http://linux.bkbits.net/linux-2.5
torvalds@ppc970.osdl.org|ChangeSet|20050111001213|56844 torvalds
# This is a BitKeeper generated diff -Nru style patch.
#
# drivers/pci/hotplug/rpaphp_pci.c
#   2005/01/07 21:43:52-08:00 olof@austin.ibm.com +4 -0
#   ppc64: IOMMU cleanups: Main cleanup patch
# 
# ChangeSet
#   2005/01/10 16:12:13-08:00 torvalds@ppc970.osdl.org 
#   Merge bk://bk.arm.linux.org.uk/linux-2.6-rmk
#   into ppc970.osdl.org:/home/torvalds/v2.6/linux
# 
# MAINTAINERS
#   2005/01/10 16:12:08-08:00 torvalds@ppc970.osdl.org +0 -0
#   Auto merged
# 
# ChangeSet
#   2005/01/10 15:18:02-08:00 roland@redhat.com 
#   [PATCH] fix __ptrace_unlink TASK_TRACED recovery for real parent
#   
#   The __ptrace_unlink code that checks for TASK_TRACED fixed the problem of a
#   thread being left in TASK_TRACED when no longer being ptraced. 
#   
#   However, an oversight in the original fix made it fail to handle the
#   case where the child is ptraced by its real parent.
#   
#   Fixed thus.
#   
#   Signed-off-by: Roland McGrath <roland@redhat.com>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# kernel/ptrace.c
#   2005/01/09 16:00:00-08:00 roland@redhat.com +25 -22
#   fix __ptrace_unlink TASK_TRACED recovery for real parent
# 
# kernel/exit.c
#   2005/01/09 16:00:00-08:00 roland@redhat.com +1 -1
#   fix __ptrace_unlink TASK_TRACED recovery for real parent
# 
# include/linux/ptrace.h
#   2005/01/09 16:00:00-08:00 roland@redhat.com +1 -0
#   fix __ptrace_unlink TASK_TRACED recovery for real parent
# 
# ChangeSet
#   2005/01/10 22:26:38+00:00 rpurdie@net.rmk.(none) 
#   [ARM PATCH] 2366/1: PXA: Add machine type detection for the Sharp SL-C7xx series
#   
#   Patch from Richard Purdie
#   
#   The Sharp SL-C7xx series of PDAs (Corgi, Shepherd, Husky) don't set
#   the machine type upon startup. Fixing this isn't possible as the
#   devices have been produced and the bootloaders are in ROM. 
#   
#   This header code detects the differences between them and sets the
#   machine type accordingly. By doing this one kernel can support the
#   series of PXA25x machines.
#   
#   The code also detects Poodle (Sharp SL-5600) which is also a PXA25x
#   device allowing a common kernel to support that device as well. (The
#   base machine code is under development for this device).
#   
#   Signed-off-by: Richard Purdie
#   Signed-off-by: Russell King
# 
# arch/arm/boot/compressed/Makefile
#   2005/01/10 00:00:00+00:00 rpurdie@net.rmk.(none) +4 -0
#   [PATCH] 2366/1: PXA: Add machine type detection for the Sharp SL-C7xx series
# 
# arch/arm/boot/compressed/head-sharpsl.S
#   2005/01/10 00:00:00+00:00 rpurdie@net.rmk.(none) +92 -0
#   [PATCH] 2366/1: PXA: Add machine type detection for the Sharp SL-C7xx series
# 
# arch/arm/boot/compressed/head-sharpsl.S
#   2005/01/10 00:00:00+00:00 rpurdie@net.rmk.(none) +0 -0
#   BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/boot/compressed/head-sharpsl.S
# 
# ChangeSet
#   2005/01/10 22:19:47+00:00 rpurdie@net.rmk.(none) 
#   [ARM PATCH] 2371/1: PXA: Add machine support for the Sharp SL-C7xx series of PDAs
#   
#   Patch from Richard Purdie
#   
#   Add base machine support for the Sharp SL-C7xx series of PDAs 
#   (Corgi - SL-C700, Shepherd - SL-C750 and Husky - SL-C760). See 
#   linux-arm-kernel for a support commitment for this code.
#   
#   Depends on 2370/1 (SCOOP Driver).
#   
#   Signed-off-by: Richard Purdie
#   Signed-off-by: Russell King
# 
# include/asm-arm/arch-pxa/corgi.h
#   2005/01/10 00:00:00+00:00 rpurdie@net.rmk.(none) +133 -0
#   [PATCH] 2371/1: PXA: Add machine support for the Sharp SL-C7xx series of PDAs
# 
# arch/arm/mach-pxa/Makefile
#   2005/01/10 00:00:00+00:00 rpurdie@net.rmk.(none) +1 -0
#   [PATCH] 2371/1: PXA: Add machine support for the Sharp SL-C7xx series of PDAs
# 
# arch/arm/mach-pxa/Kconfig
#   2005/01/10 00:00:00+00:00 rpurdie@net.rmk.(none) +20 -0
#   [PATCH] 2371/1: PXA: Add machine support for the Sharp SL-C7xx series of PDAs
# 
# include/asm-arm/arch-pxa/corgi.h
#   2005/01/10 00:00:00+00:00 rpurdie@net.rmk.(none) +0 -0
#   BitKeeper file /usr/src/bk/linux-2.6-rmk/include/asm-arm/arch-pxa/corgi.h
# 
# MAINTAINERS
#   2005/01/10 00:00:00+00:00 rpurdie@net.rmk.(none) +5 -0
#   [PATCH] 2371/1: PXA: Add machine support for the Sharp SL-C7xx series of PDAs
# 
# arch/arm/mach-pxa/corgi.c
#   2005/01/10 00:00:00+00:00 rpurdie@net.rmk.(none) +159 -0
#   [PATCH] 2371/1: PXA: Add machine support for the Sharp SL-C7xx series of PDAs
# 
# arch/arm/mach-pxa/corgi.c
#   2005/01/10 00:00:00+00:00 rpurdie@net.rmk.(none) +0 -0
#   BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mach-pxa/corgi.c
# 
# ChangeSet
#   2005/01/10 22:07:21+00:00 rpurdie@net.rmk.(none) 
#   [ARM PATCH] 2370/1: Add common Sharp SCOOP driver code
#   
#   Patch from Richard Purdie
#   
#   Add common driver code for the SCOOP I/O interface found on various 
#   Sharp PDAs (Collie, Poodle and Corgi models). It will be used by 
#   both SA1100 and PXA machines. 
#   
#   [A patch to update Collie to use this driver will follow.]
#   
#   Signed-off-by: Richard Purdie
#   Signed-off-by: Russell King
# 
# include/asm-arm/hardware/scoop.h
#   2005/01/10 00:00:00+00:00 rpurdie@net.rmk.(none) +47 -0
#   [PATCH] 2370/1: Add common Sharp SCOOP driver code
# 
# include/asm-arm/hardware/scoop.h
#   2005/01/10 00:00:00+00:00 rpurdie@net.rmk.(none) +0 -0
#   BitKeeper file /usr/src/bk/linux-2.6-rmk/include/asm-arm/hardware/scoop.h
# 
# arch/arm/common/Makefile
#   2005/01/10 00:00:00+00:00 rpurdie@net.rmk.(none) +1 -0
#   [PATCH] 2370/1: Add common Sharp SCOOP driver code
# 
# arch/arm/Kconfig
#   2005/01/10 00:00:00+00:00 rpurdie@net.rmk.(none) +5 -0
#   [PATCH] 2370/1: Add common Sharp SCOOP driver code
# 
# arch/arm/common/scoop.c
#   2005/01/10 00:00:00+00:00 rpurdie@net.rmk.(none) +132 -0
#   [PATCH] 2370/1: Add common Sharp SCOOP driver code
# 
# arch/arm/common/scoop.c
#   2005/01/10 00:00:00+00:00 rpurdie@net.rmk.(none) +0 -0
#   BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/common/scoop.c
# 
# ChangeSet
#   2005/01/10 21:48:31+00:00 ben-linux@org.rmk.(none) 
#   [ARM PATCH] 2374/1: S3C2410 - remove unused code from entry-macro.S
#   
#   Patch from Ben Dooks
#   
#   Remove code for decoding LCD Frame/FIFO IRQs
#   from the include/asm-arm/arch-s3c2410/entry-macro.S
#   file.
#   
#   These are not currently implemented, and should be
#   decoded by a chained IRQ handler from the irq
#   code.
#   
#   Signed-off-by: Ben Dooks
#   Signed-off-by: Russell King
# 
# ChangeSet
#   2005/01/10 13:46:50-08:00 torvalds@ppc970.osdl.org 
#   Revert moxa status update
#   
#   As Alan says:
#   
#     "The '1.8' version is for the Moxa mxser driver.  Moxa haven't
#      released any 2.6 driver for the ancient 'smartio' hardware"
#   
#   so the smartio driver stil remains valid.
#   
#   Cset exclude: james4765@gmail.com[torvalds]|ChangeSet|20050108220924|25457
# 
# Documentation/moxa-smartio
#   2005/01/10 13:46:48-08:00 torvalds@ppc970.osdl.org +0 -0
#   Exclude
# 
# include/asm-arm/arch-s3c2410/entry-macro.S
#   2005/01/10 16:01:57+00:00 ben-linux@org.rmk.(none) +1 -16
#   [PATCH] 2374/1: S3C2410 - remove unused code from entry-macro.S
# 
# ChangeSet
#   2005/01/10 21:28:56+00:00 ben-linux@org.rmk.(none) 
#   [ARM PATCH] 2373/1: S3C2410 -  fix possible loop in irq macro
#   
#   Patch from Ben Dooks
#   
#   If we read the INTPEND register and get the wrong
#   result (details below) then it looks like a possible
#   loop to go back and re-read it after calculating
#   the possible correct value for it.
#   
#   It seems that the INTPEND register, which should
#   show the unique number of the interrupt that we
#   need to handle. However, it seems that this register
#   can show the wrong interrupt under certain conditions.
#   
#   Shannon's research shows that it is very possible that
#   the occurence of an external interrupt can end up
#   merging with the base interrupt number, causing
#   the wrong result in the register.
#   
#   This patch also fixes the end position of the #ifdef
#   block and ensures as many registers as possible are
#   stacked before calling printk() for debug.
#   
#   Original patch for 2.6.9 by Shannon Holland re-written
#   for 2.6.10 by Ben Dooks.
#   
#   Signed-off-by: Shannon Holland                             
#   Signed-off-by: Ben Dooks                                 
#   Signed-off-by: Russell King
# 
# include/asm-arm/arch-s3c2410/entry-macro.S
#   2005/01/10 11:40:37+00:00 ben-linux@org.rmk.(none) +10 -6
#   [PATCH] 2373/1: S3C2410 -  fix possible loop in irq macro
# 
# ChangeSet
#   2005/01/10 13:25:12-08:00 tony.luck@intel.com 
#   [PATCH] Document "new" ia64 maintainer
#   
#   David handed over the keys a few months ago.  Time to make sure everyone
#   knows to send stuff to me.
#   
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# MAINTAINERS
#   2005/01/10 12:56:39-08:00 tony.luck@intel.com +2 -2
#   Document "new" ia64 maintainer
# 
# ChangeSet
#   2005/01/10 21:23:00+00:00 ben-linux@org.rmk.(none) 
#   [ARM PATCH] 2372/1: S3C2410 - remove s3c2410_clock_tick_rate
#   
#   Patch from Ben Dooks
#   
#   This is an old definition, and is no longer used anywhere.
#   Add a comment to that effect in the header file
#   include/asm-arm/arch-s3c2410/timex.h and remove all other
#   references.
#   
#   Thanks to Klaus Fetscher for pointing out that it isn't
#   used anymore
#   
#   Signed-off-by: Ben Dooks
#   Signed-off-by: Russell King
# 
# include/asm-arm/arch-s3c2410/timex.h
#   2005/01/10 11:13:32+00:00 ben-linux@org.rmk.(none) +7 -9
#   [PATCH] 2372/1: S3C2410 - remove s3c2410_clock_tick_rate
# 
# arch/arm/mach-s3c2410/s3c2410.c
#   2005/01/10 11:14:41+00:00 ben-linux@org.rmk.(none) +2 -3
#   [PATCH] 2372/1: S3C2410 - remove s3c2410_clock_tick_rate
# 
# ChangeSet
#   2005/01/10 11:36:46-08:00 greg@kroah.com 
#   Merge kroah.com:/home/greg/linux/BK/bleed-2.6
#   into kroah.com:/home/greg/linux/BK/i2c-2.6
# 
# include/linux/pci_ids.h
#   2005/01/10 11:36:40-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# ChangeSet
#   2005/01/10 11:28:21-08:00 greg@kroah.com 
#   Merge kroah.com:/home/greg/linux/BK/bleed-2.6
#   into kroah.com:/home/greg/linux/BK/usb-2.6
# 
# lib/Kconfig.debug
#   2005/01/10 11:28:15-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# kernel/module.c
#   2005/01/10 11:28:15-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# include/linux/pci.h
#   2005/01/10 11:28:15-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# include/linux/module.h
#   2005/01/10 11:28:15-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# drivers/pci/probe.c
#   2005/01/10 11:28:15-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# drivers/media/dvb/ttusb-dec/ttusb_dec.c
#   2005/01/10 11:28:14-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# drivers/isdn/hisax/st5481_init.c
#   2005/01/10 11:28:14-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# drivers/block/Kconfig
#   2005/01/10 11:28:14-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# arch/ia64/Kconfig
#   2005/01/10 11:28:14-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# MAINTAINERS
#   2005/01/10 11:28:14-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# ChangeSet
#   2005/01/10 11:23:42-08:00 torvalds@ppc970.osdl.org 
#   Clean up stack growth checks and move them into a common function.
#   
#   The grows-up and grows-down cases had all the same issues, but
#   differered in the details. Additionlly, historical evolution of
#   the tests had caused the result to be pretty unreadable with some
#   rather long and complex conditionals.
#   
#   Fix it all up in a more readable helper function.
#   
#   This also adds the missing RLIMIT_MEMLOCK test.
# 
# mm/mmap.c
#   2005/01/10 11:23:35-08:00 torvalds@ppc970.osdl.org +61 -44
#   Clean up stack growth checks and move them into a common function.
#   
#   The grows-up and grows-down cases had all the same issues, but
#   differered in the details. Additionlly, historical evolution of
#   the tests had caused the result to be pretty unreadable with some
#   rather long and complex conditionals.
#   
#   Fix it all up in a more readable helper function.
#   
#   This also adds the missing RLIMIT_MEMLOCK test.
# 
# ChangeSet
#   2005/01/10 09:47:42-08:00 hirofumi@mail.parknet.co.jp 
#   [PATCH] NLS: Fix overflow of nls_ascii
#   
#   The nls_ascii conversion table is just for 128 entries, but should be
#   256.
#   
#   Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/nls/nls_ascii.c
#   2005/01/10 09:31:32-08:00 hirofumi@mail.parknet.co.jp +6 -6
#   NLS: Fix overflow of nls_ascii
# 
# ChangeSet
#   2005/01/10 09:31:50-08:00 torvalds@ppc970.osdl.org 
#   Make it clear that GFP_ZERO does not work with atomic highmem allocations.
#   
#   We use a non-atomic kmap() to clear the page, which cannot be
#   used from atomic contexts.
# 
# mm/page_alloc.c
#   2005/01/10 09:31:42-08:00 torvalds@ppc970.osdl.org +8 -7
#   Make it clear that GFP_ZERO does not work with atomic highmem allocations.
#   
#   We use a non-atomic kmap() to clear the page, which cannot be
#   used from atomic contexts.
# 
# ChangeSet
#   2005/01/10 09:20:09-08:00 torvalds@ppc970.osdl.org 
#   Don't use __GFP_CLEAR for user pages.
#   
#   It doesn't do the virtual cache synchronization that clear_user_highpage()
#   does.
#   
#   Pointed out by Hugh Dickins.
# 
# mm/memory.c
#   2005/01/10 09:20:01-08:00 torvalds@ppc970.osdl.org +2 -1
#   Don't use __GFP_CLEAR for user pages.
#   
#   It doesn't do the virtual cache synchronization that clear_user_highpage()
#   does.
# 
# include/linux/gfp.h
#   2005/01/10 09:20:01-08:00 torvalds@ppc970.osdl.org +0 -1
#   Don't use __GFP_CLEAR for user pages.
#   
#   It doesn't do the virtual cache synchronization that clear_user_highpage()
#   does.
# 
# ChangeSet
#   2005/01/10 09:02:01-08:00 torvalds@ppc970.osdl.org 
#   Map new page allocations as part of "prep_new_page".
#   
#   This not only makes sense, it fixes DEBUG_PAGEALLOC together with
#   the new page zeroing, since we must map the page before we zero it.
#   
#   As per Chris Wright.
# 
# mm/page_alloc.c
#   2005/01/10 09:01:53-08:00 torvalds@ppc970.osdl.org +1 -1
#   Map new page allocations as part of "prep_new_page".
#   
#   This not only makes sense, it fixes DEBUG_PAGEALLOC together with
#   the new page zeroing, since we must map the page before we zero it.
#   
#   As per Chris Wright.
# 
# ChangeSet
#   2005/01/10 08:52:36-08:00 greg@kroah.com 
#   Merge kroah.com:/home/greg/linux/BK/bleed-2.6
#   into kroah.com:/home/greg/linux/BK/pci-2.6
# 
# drivers/pci/quirks.c
#   2005/01/10 08:52:27-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# drivers/net/via-velocity.c
#   2005/01/10 08:52:27-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# drivers/net/via-rhine.c
#   2005/01/10 08:52:27-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# drivers/net/typhoon.c
#   2005/01/10 08:52:27-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# drivers/net/starfire.c
#   2005/01/10 08:52:27-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# drivers/net/sis900.c
#   2005/01/10 08:52:27-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# drivers/net/eepro100.c
#   2005/01/10 08:52:26-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# drivers/net/e100.c
#   2005/01/10 08:52:26-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# drivers/net/amd8111e.c
#   2005/01/10 08:52:26-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# drivers/net/8139too.c
#   2005/01/10 08:52:26-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# drivers/net/8139cp.c
#   2005/01/10 08:52:26-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# drivers/net/3c59x.c
#   2005/01/10 08:52:26-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# drivers/media/video/bttv-driver.c
#   2005/01/10 08:52:26-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# arch/i386/pci/irq.c
#   2005/01/10 08:52:26-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# MAINTAINERS
#   2005/01/10 08:52:25-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# ChangeSet
#   2005/01/10 08:51:25-08:00 ak@suse.de 
#   [PATCH] Fix gcc 4 compilation in bttv
#   
#   extern declaration of static
#   
#   Signed-off-by: Andi Kleen <ak@suse.de>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/media/video/bttv.h
#   2005/01/10 08:51:17-08:00 ak@suse.de +0 -1
#   Fix gcc 4 compilation in bttv
# 
# ChangeSet
#   2005/01/10 08:51:10-08:00 ak@suse.de 
#   [PATCH] Fix gcc 4 compilation in drivers/eisa
#   
#   Drop -Werror to allow compilation with gcc 4
#   
#   Signed-off-by: Andi Kleen <ak@suse.de>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/eisa/Makefile
#   2005/01/10 08:51:02-08:00 ak@suse.de +0 -3
#   Fix gcc 4 compilation in drivers/eisa
# 
# ChangeSet
#   2005/01/10 08:50:57-08:00 ak@suse.de 
#   [PATCH] Fix gcc 4 compilation in DRM
#   
#   extern declaration of static
#   
#   Signed-off-by: Andi Kleen <ak@suse.de>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/char/drm/drmP.h
#   2005/01/10 08:50:49-08:00 ak@suse.de +0 -1
#   Fix gcc 4 compilation in DRM
# 
# ChangeSet
#   2005/01/10 08:50:42-08:00 ak@suse.de 
#   [PATCH] Fix gcc 4 compilation in ACPI
#   
#   extern declaration of static
#   
#   Signed-off-by: Andi Kleen <ak@suse.de>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/acpi/processor.h
#   2005/01/10 08:50:34-08:00 ak@suse.de +0 -1
#   Fix gcc 4 compilation in ACPI
# 
# ChangeSet
#   2005/01/10 07:59:23-08:00 gerg@snapgear.com 
#   [PATCH] m68knommu: optimize atomic macros
#   
#   For some reason the asm versions of atomic_dec_and_test and friends were
#   masked by inefficient and big macros. With it I spare up to 8k in the text
#   size of my coldfire linux and 5k on my cpu32 version.
#   
#   Patch originally submitted by Philippe De Muyter <phdm@macqel.be>
#   
#   Signed-off-by: Greg Ungerer <gerg@snapgear.com>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-m68knommu/atomic.h
#   2005/01/05 18:44:59-08:00 gerg@snapgear.com +52 -22
#   m68knommu: optimize atomic macros
# 
# ChangeSet
#   2005/01/10 07:59:09-08:00 gerg@snapgear.com 
#   [PATCH] m68knommu: new hardware support and optimizations for the ColdFire serial driver
#   
#   A number of small updates to the ColdFire serial driver:
#   
#   . support the SNEHA platform
#   . set the default baud rate for console different on the FEITH boards
#   . add support for the 527x ColdFire CPU's
#   . schedule_timeout() should not add in current jiffies value
#   . optimize way that receive error characters are processed
#   . fix condition where receiver interrupts could be left disabled after flush
#   
#   Signed-off-by: Greg Ungerer <gerg@snapgear.com>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/serial/mcfserial.c
#   2005/01/05 18:43:55-08:00 gerg@snapgear.com +41 -20
#   m68knommu: new hardware support and optimizations for the ColdFire serial driver
# 
# ChangeSet
#   2005/01/10 07:58:56-08:00 gerg@snapgear.com 
#   [PATCH] m68knommu: remove duplicate THREAD_SIZE define
#   
#   Remove duplicated definition of THREAD_SIZE, it is defined in page.h.
#   Also modify asm constraints to explicilty let gas know that the input
#   arg is a constant in the current_thread_info() function.
#   
#   Patch originally submitted by Philippe De Muyter <phdm@macqel.be>
#   
#   Signed-off-by: Greg Ungerer <gerg@snapgear.com>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-m68knommu/thread_info.h
#   2005/01/05 18:45:00-08:00 gerg@snapgear.com +1 -7
#   m68knommu: remove duplicate THREAD_SIZE define
# 
# ChangeSet
#   2005/01/10 07:58:41-08:00 gerg@snapgear.com 
#   [PATCH] m68knommu: definitions for the SDRAM registers on the ColdFire 528x CPU's
#   
#   Add definitions for the SDRAM configuration registers on the 528x
#   ColdFire CPU's.
#   
#   Signed-off-by: Greg Ungerer <gerg@snapgear.com>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-m68knommu/m528xsim.h
#   2005/01/05 18:44:59-08:00 gerg@snapgear.com +9 -0
#   m68knommu: definitions for the SDRAM registers on the ColdFire 528x CPU's
# 
# ChangeSet
#   2005/01/10 07:58:28-08:00 gerg@snapgear.com 
#   [PATCH] m68knommu: define differences in ColdFire 5270/1 and 5274/5 SDRAM registers
#   
#   The 527[01] ColdFire devices and the 527[45] devices have a very similar
#   SDRAM register setup. But some registers are at different addresses.
#   Define them appropriately so common sizing code can work for all ColdFire
#   platforms.
#   
#   Signed-off-by: Greg Ungerer <gerg@snapgear.com>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-m68knommu/m527xsim.h
#   2005/01/05 18:44:59-08:00 gerg@snapgear.com +20 -0
#   m68knommu: define differences in ColdFire 5270/1 and 5274/5 SDRAM registers
# 
# ChangeSet
#   2005/01/10 07:58:12-08:00 gerg@snapgear.com 
#   [PATCH] m68knommu: move ColdFire 5249 platform specific startup code
#   
#   Move some platform specific setup code into the ColdFire 5249 header.
#   Doing this for platforms that needs it means the startup code can be
#   identical for all ColdFire based platforms.
#   
#   Signed-off-by: Greg Ungerer <gerg@snapgear.com>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-m68knommu/m5249sim.h
#   2005/01/05 18:44:59-08:00 gerg@snapgear.com +90 -0
#   m68knommu: move ColdFire 5249 platform specific startup code
# 
# ChangeSet
#   2005/01/10 07:57:59-08:00 gerg@snapgear.com 
#   [PATCH] m68knommu: change ColdFire 5206 SDRAM register names
#   
#   Change the SDRAM register names to be consistent across all ColdFire
#   header files. Simplied their use in common memory sizing code at
#   startup time.
#   
#   Signed-off-by: Greg Ungerer <gerg@snapgear.com>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-m68knommu/m5206sim.h
#   2005/01/05 18:44:59-08:00 gerg@snapgear.com +6 -6
#   m68knommu: change ColdFire 5206 SDRAM register names
# 
# ChangeSet
#   2005/01/10 07:57:44-08:00 gerg@snapgear.com 
#   [PATCH] m68knommu: cache init code for ColdFire CPU's
#   
#   Cache initialization code for the ColdFire CPU's. They are not
#   all identical. This code is used as part of the common head
#   start code for all ColdFire platforms.
#   
#   Signed-off-by: Greg Ungerer <gerg@snapgear.com>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-m68knommu/mcfcache.h
#   2005/01/05 18:45:00-08:00 gerg@snapgear.com +125 -0
#   m68knommu: cache init code for ColdFire CPU's
# 
# include/asm-m68knommu/mcfcache.h
#   2005/01/05 18:45:00-08:00 gerg@snapgear.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-m68knommu/mcfcache.h
# 
# ChangeSet
#   2005/01/10 07:57:28-08:00 gerg@snapgear.com 
#   [PATCH] m68knommu: common head code for all ColdFire platforms
#   
#   Create a common head.S for all ColdFire architecture platforms.
#   Currently there is 20 (yep 20 of them), and they are 95% the
#   same code. This file with some header file support will replace
#   all of them.
#   
#   
#   Signed-off-by: Greg Ungerer <gerg@snapgear.com>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/m68knommu/platform/5307/head.S
#   2005/01/05 18:42:13-08:00 gerg@snapgear.com +253 -0
#   m68knommu: common head code for all ColdFire platforms
# 
# arch/m68knommu/platform/5307/head.S
#   2005/01/05 18:42:13-08:00 gerg@snapgear.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/m68knommu/platform/5307/head.S
# 
# ChangeSet
#   2005/01/10 07:46:04-08:00 david@gibson.dropbear.id.au 
#   [PATCH] ppc64: hugepage bugfix
#   
#   Fix a stupid unbalanced lock bug in the ppc64 hugepage code.  Lead
#   rapidly to a crash if both CONFIG_HUGETLB_PAGE and CONFIG_PREEMPT were
#   enabled (even without actually using hugepages at all).
#   
#   Signed-off-by: David Gibson <dwg@au1.ibm.com>
#   Acked-by: William Irwin <wli@holomorphy.com>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/ppc64/mm/hugetlbpage.c
#   2005/01/09 20:16:25-08:00 david@gibson.dropbear.id.au +2 -1
#   ppc64: hugepage bugfix
# 
# ChangeSet
#   2005/01/10 11:34:40+00:00 rmk@flint.arm.linux.org.uk 
#   [ARM] Add missing nodemask.h includes
#   
#   Signed-off-by: Russell King <rmk@arm.linux.org.uk>
# 
# arch/arm/mm/mm-armv.c
#   2005/01/10 11:28:55+00:00 rmk@flint.arm.linux.org.uk +1 -0
#   Add missing nodemask.h include
# 
# arch/arm/mm/init.c
#   2005/01/10 11:25:09+00:00 rmk@flint.arm.linux.org.uk +1 -0
#   Add missing nodemask.h include
# 
# ChangeSet
#   2005/01/09 23:00:42-08:00 greg@kroah.com 
#   PCI Hotplug: remove my old email address
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# MAINTAINERS
#   2005/01/09 23:00:32-08:00 greg@kroah.com +0 -1
#   PCI Hotplug: remove my old email address
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# ChangeSet
#   2005/01/09 21:14:10-08:00 davem@nuts.davemloft.net 
#   Merge nuts.davemloft.net:/disk1/BK/network-2.6
#   into nuts.davemloft.net:/disk1/BK/net-2.6
# 
# net/ipv4/tcp_ipv4.c
#   2005/01/09 21:13:58-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# ChangeSet
#   2005/01/09 17:36:05-08:00 gerg@snapgear.com 
#   [PATCH] m68knommu: include module.h to cleanup warnings in checksum.c
#   
#   Include module.h to cleanup compiler warnings.
#   
#   Signed-off-by: Greg Ungerer <gerg@snapgear.com>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/m68knommu/lib/checksum.c
#   2005/01/05 18:42:08-08:00 gerg@snapgear.com +1 -0
#   m68knommu: include module.h to cleanup warnings in checksum.c
# 
# ChangeSet
#   2005/01/09 17:35:53-08:00 gerg@snapgear.com 
#   [PATCH] m68knommu: remove use of obsolete MAP_NR macro processor.h
#   
#   Remove use of obsolate MAP_NR macro.
#   
#   Signed-off-by: Greg Ungerer <gerg@snapgear.com>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-m68knommu/processor.h
#   2005/01/05 18:45:00-08:00 gerg@snapgear.com +1 -1
#   m68knommu: remove use of obsolete MAP_NR macro processor.h
# 
# ChangeSet
#   2005/01/09 17:35:39-08:00 gerg@snapgear.com 
#   [PATCH] m68knommu: remove unused include/asm-m68knommu/nap.h
#   
#   Remove unused header file from include/asm-m68knommu.
#   
#   Signed-off-by: Greg Ungerer <gerg@snapgear.com>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# BitKeeper/deleted/.del-nap.h~be77fec58c87c03c
#   2005/01/09 17:35:32-08:00 gerg@snapgear.com +0 -0
#   Delete: include/asm-m68knommu/nap.h
# 
# ChangeSet
#   2005/01/09 17:35:26-08:00 gerg@snapgear.com 
#   [PATCH] m68knommu: convert use of KTHRAD_SIZE to THREAD_SIZE in process.c
#   
#   Convert KTHREAD_SIZE to THREAD_SIZE.
#   Patch original submitted by Philippe De Muyter <phdm@macqel.be>
#   
#   Signed-off-by: Greg Ungerer <gerg@snapgear.com>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/m68knommu/kernel/process.c
#   2005/01/05 18:42:09-08:00 gerg@snapgear.com +2 -2
#   m68knommu: convert use of KTHRAD_SIZE to THREAD_SIZE in process.c
# 
# ChangeSet
#   2005/01/09 17:35:10-08:00 gerg@snapgear.com 
#   [PATCH] m68knommu: optimized bitops operations for m68knommu
#   
#   Here is a patch to provide faster bitops for m68knommu, using bset/bclr/bchg
#   and btst instructions, that do test-and-set on m68k and coldfire processors.
#   We do thus avoid the need for local_irq_save/local_irq_restore.
#   
#   Patch original submitted by Philippe De Muyter <phdm@macqel.be>.
#   
#   Signed-off-by: Greg Ungerer <gerg@snapgear.com>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-m68knommu/bitops.h
#   2005/01/05 18:44:59-08:00 gerg@snapgear.com +119 -138
#   m68knommu: optimized bitops operations for m68knommu
# 
# ChangeSet
#   2005/01/09 17:34:56-08:00 gerg@snapgear.com 
#   [PATCH] m68knommu: convert KTHRAD_SIZE to THREAD_SIZE and remove unused macros
#   
#   Convert KTHREAD_SIZE to THREAD_SIZE.
#   Remove obsolate MAP_NR and VALID_PAGE macros.
#   
#   Signed-off-by: Greg Ungerer <gerg@snapgear.com>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-m68knommu/page.h
#   2005/01/05 18:45:00-08:00 gerg@snapgear.com +2 -5
#   m68knommu: convert KTHRAD_SIZE to THREAD_SIZE and remove unused macros
# 
# ChangeSet
#   2005/01/09 17:34:42-08:00 gerg@snapgear.com 
#   [PATCH] m68knommu: comment formating change to linker script
#   
#   Fix comment formatting in m68knommu linker script.
#   
#   Signed-off-by: Greg Ungerer <gerg@snapgear.com>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/m68knommu/kernel/vmlinux.lds.S
#   2005/01/05 18:42:10-08:00 gerg@snapgear.com +3 -5
#   m68knommu: comment formating change to linker script
# 
# ChangeSet
#   2005/01/09 17:34:30-08:00 gerg@snapgear.com 
#   [PATCH] m68knommu: export lib udelay symbol for modules
#   
#   Export the udelay symbol so modules get access to it as well.
#   
#   Signed-off-by: Greg Ungerer <gerg@snapgear.com>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/m68knommu/lib/delay.c
#   2005/01/05 18:42:08-08:00 gerg@snapgear.com +3 -0
#   m68knommu: export lib udelay symbol for modules
# 
# ChangeSet
#   2005/01/09 17:34:17-08:00 gerg@snapgear.com 
#   [PATCH] m68knommu: remove duplicate and unused entries in Kconfig
#   
#   Remove duplicate M5275EVB entry.
#   Remove unused HIMEMKERNEL config option.
#   
#   Signed-off-by: Greg Ungerer <gerg@snapgear.com>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/m68knommu/Kconfig
#   2005/01/05 18:42:08-08:00 gerg@snapgear.com +1 -12
#   m68knommu: remove duplicate and unused entries in Kconfig
# 
# ChangeSet
#   2005/01/09 17:34:02-08:00 gerg@snapgear.com 
#   [PATCH] m68knommu: remove unused keyboard.h
#   
#   Remove unused keyboard.h include.
#   
#   Signed-off-by: Greg Ungerer <gerg@snapgear.com>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# BitKeeper/deleted/.del-keyboard.h~74c1586c212efae6
#   2005/01/09 17:33:54-08:00 gerg@snapgear.com +0 -0
#   Delete: include/asm-m68knommu/keyboard.h
# 
# ChangeSet
#   2005/01/09 17:33:49-08:00 gerg@snapgear.com 
#   [PATCH] m68knommu: remove unneccessary SUN conditionals from m68knommu/elf.h
#   
#   Remove unneccessary SUN conditionals from m68knommu elf.h.
#   
#   Signed-off-by: Greg Ungerer <gerg@snapgear.com>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-m68knommu/elf.h
#   2005/01/05 18:44:59-08:00 gerg@snapgear.com +0 -8
#   m68knommu: remove unneccessary SUN conditionals from m68knommu/elf.h
# 
# ChangeSet
#   2005/01/09 17:33:33-08:00 gerg@snapgear.com 
#   [PATCH] m68knommu: remove use of obsolete MAP_NR macro
#   
#   Remove use of obsolete MAP_NR macro.
#   
#   Signed-off-by: Greg Ungerer <gerg@snapgear.com>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/m68knommu/mm/init.c
#   2005/01/05 18:42:13-08:00 gerg@snapgear.com +1 -1
#   m68knommu: remove use of obsolete MAP_NR macro
# 
# ChangeSet
#   2005/01/10 00:17:05+00:00 nico@org.rmk.(none) 
#   [ARM PATCH] 2369/1: remove some cruft
#   
#   Patch from Nicolas Pitre
#   
#   Those defines are incomplete and not using them by
#   instead using the explicit flags makes for clearer code.
#   
#   Signed-off-by: Nicolas Pitre
#   Signed-off-by: Russell King
# 
# include/asm-arm/arch-pxa/pxa-regs.h
#   2005/01/06 17:48:10+00:00 nico@org.rmk.(none) +0 -5
#   [PATCH] 2369/1: remove some cruft
# 
# ChangeSet
#   2005/01/09 23:57:38+00:00 rmk@flint.arm.linux.org.uk 
#   [ARM] Move common CPU initialisation into head.S
# 
# arch/arm/mm/proc-xscale.S
#   2005/01/09 23:54:05+00:00 rmk@flint.arm.linux.org.uk +17 -13
#   Remove asm/domain.h include.
#   Remove setting of page table pointer, domain access register.
#   Load bitmasks for setting/clearing bits in control register
#   rather than making up the constants from individual instructions.
# 
# arch/arm/mm/proc-v6.S
#   2005/01/09 23:54:05+00:00 rmk@flint.arm.linux.org.uk +20 -27
#   Remove asm/domain.h include.
#   Remove setting of page table pointer, domain access register.
#   Load bitmasks for setting/clearing bits in control register
#   rather than making up the constants from individual instructions.
# 
# arch/arm/mm/proc-sa1100.S
#   2005/01/09 23:54:05+00:00 rmk@flint.arm.linux.org.uk +21 -15
#   Remove asm/domain.h include.
#   Remove setting of page table pointer, domain access register.
#   Load bitmasks for setting/clearing bits in control register
#   rather than making up the constants from individual instructions.
# 
# arch/arm/mm/proc-sa110.S
#   2005/01/09 23:54:05+00:00 rmk@flint.arm.linux.org.uk +18 -12
#   Remove asm/domain.h include.
#   Remove setting of page table pointer, domain access register.
#   Load bitmasks for setting/clearing bits in control register
#   rather than making up the constants from individual instructions.
# 
# arch/arm/mm/proc-arm926.S
#   2005/01/09 23:54:04+00:00 rmk@flint.arm.linux.org.uk +17 -27
#   Remove asm/domain.h include.
#   Remove setting of page table pointer, domain access register.
#   Load bitmasks for setting/clearing bits in control register
#   rather than making up the constants from individual instructions.
# 
# arch/arm/mm/proc-arm925.S
#   2005/01/09 23:54:04+00:00 rmk@flint.arm.linux.org.uk +17 -30
#   Remove asm/domain.h include.
#   Remove setting of page table pointer, domain access register.
#   Load bitmasks for setting/clearing bits in control register
#   rather than making up the constants from individual instructions.
# 
# arch/arm/mm/proc-arm922.S
#   2005/01/09 23:54:04+00:00 rmk@flint.arm.linux.org.uk +17 -27
#   Remove asm/domain.h include.
#   Remove setting of page table pointer, domain access register.
#   Load bitmasks for setting/clearing bits in control register
#   rather than making up the constants from individual instructions.
# 
# arch/arm/mm/proc-arm920.S
#   2005/01/09 23:54:04+00:00 rmk@flint.arm.linux.org.uk +17 -27
#   Remove asm/domain.h include.
#   Remove setting of page table pointer, domain access register.
#   Load bitmasks for setting/clearing bits in control register
#   rather than making up the constants from individual instructions.
# 
# arch/arm/mm/proc-arm720.S
#   2005/01/09 23:54:03+00:00 rmk@flint.arm.linux.org.uk +52 -37
#   Remove asm/domain.h include.
#   Remove setting of page table pointer, domain access register.
#   Load bitmasks for setting/clearing bits in control register
#   rather than making up the constants from individual instructions.
# 
# arch/arm/mm/proc-arm6_7.S
#   2005/01/09 23:54:03+00:00 rmk@flint.arm.linux.org.uk +0 -12
#   Remove asm/domain.h include.
#   Remove setting of page table pointer, domain access register.
#   Load bitmasks for setting/clearing bits in control register
#   rather than making up the constants from individual instructions.
# 
# arch/arm/mm/proc-arm1026.S
#   2005/01/09 23:54:03+00:00 rmk@flint.arm.linux.org.uk +18 -27
#   Remove asm/domain.h include.
#   Remove setting of page table pointer, domain access register.
#   Load bitmasks for setting/clearing bits in control register
#   rather than making up the constants from individual instructions.
# 
# arch/arm/mm/proc-arm1022.S
#   2005/01/09 23:54:03+00:00 rmk@flint.arm.linux.org.uk +17 -27
#   Remove asm/domain.h include.
#   Remove setting of page table pointer, domain access register.
#   Load bitmasks for setting/clearing bits in control register
#   rather than making up the constants from individual instructions.
# 
# arch/arm/mm/proc-arm1020e.S
#   2005/01/09 23:54:02+00:00 rmk@flint.arm.linux.org.uk +17 -29
#   Remove asm/domain.h include.
#   Remove setting of page table pointer, domain access register.
#   Load bitmasks for setting/clearing bits in control register
#   rather than making up the constants from individual instructions.
# 
# arch/arm/mm/proc-arm1020.S
#   2005/01/09 23:54:02+00:00 rmk@flint.arm.linux.org.uk +17 -28
#   Remove asm/domain.h include.
#   Remove setting of page table pointer, domain access register.
#   Load bitmasks for setting/clearing bits in control register
#   rather than making up the constants from individual instructions.
# 
# arch/arm/kernel/head.S
#   2005/01/09 23:54:02+00:00 rmk@flint.arm.linux.org.uk +19 -1
#   Add common bits for dcache disable, icache disable, branch prediction
#   disable.  Setup domain access register and page table pointers in
#   common code.
# 
# ChangeSet
#   2005/01/09 19:39:16+00:00 rmk@flint.arm.linux.org.uk 
#   [ARM] Rehash initial kernel setup code.
#   
#   Essentially, this set of changes:
#   1. makes the register usage in head.S more sane
#   2. makes way for passing the location of the tagged list via "r2"
#      (as the booting document suggests)
# 
# arch/arm/kernel/head.S
#   2005/01/09 19:35:24+00:00 rmk@flint.arm.linux.org.uk +59 -41
#   Move __turn_mmu_on after __mmap_switched.
#   Rearrange __mmap_switched to use less registers.
#   Add __enable_mmu to take common parts of initialising CP#15
# 
# arch/arm/kernel/head.S
#   2005/01/09 17:27:17+00:00 rmk@flint.arm.linux.org.uk +14 -8
#   Mark functions as type %function and objects as %objects
#   Exterminate some misleading "architecture" names which should be
#   "machine" names.
# 
# arch/arm/kernel/head.S
#   2005/01/09 17:23:20+00:00 rmk@flint.arm.linux.org.uk +37 -29
#   Don't save the value of r0 on kernel entry.
#   Set the PSR directly rather than using r0.
#   In __create_page_tables:
#    change r8 -> r7, r2 -> r6
#    load physio and pgoffio when required
# 
# arch/arm/kernel/head.S
#   2005/01/09 14:42:43+00:00 rmk@flint.arm.linux.org.uk +13 -21
#   Move loading of archinfo elements into __create_page_tables
#   Make __lookup_* return pointer to their structures in r5
# 
# arch/arm/kernel/head.S
#   2005/01/09 14:35:14+00:00 rmk@flint.arm.linux.org.uk +13 -13
#   Rearrange loading of addresses to be consistent between __lookup_*
#   functions.
# 
# arch/arm/kernel/head.S
#   2005/01/09 14:28:57+00:00 rmk@flint.arm.linux.org.uk +22 -19
#   __lookup_architecture_type:
#    change r4 -> r5, r7 -> r6
#    return pointer to mach_info structure in r8
#   
#   __lookup_processor_type:
#    change r10 -> r5, r6 -> r10, r7 -> r6
#    retain returning pointer to proc_info_list structure in r10
#   
#   In both functions, we now use r5 as the current pointer, and r6 as
#   the limiting address.
# 
# arch/arm/kernel/head.S
#   2005/01/09 14:14:42+00:00 rmk@flint.arm.linux.org.uk +15 -15
#   __lookup_processor_type:
#    change r5 to r3
#   
#   __lookup_architecture_type:
#    change r5 to r3, and initial uses of r4 to r3
# 
# arch/arm/kernel/head.S
#   2005/01/09 13:55:16+00:00 rmk@flint.arm.linux.org.uk +9 -4
#   Use #define'd constants for accessing struct proc_info_list elements
#   Only load mmuflags when required inside __create_page_tables, rather than in __lookup_processor_id
# 
# arch/arm/kernel/head.S
#   2005/01/09 13:49:33+00:00 rmk@flint.arm.linux.org.uk +4 -4
#   Change label 2 -> 3
# 
# ChangeSet
#   2005/01/09 11:23:21+00:00 rmk@flint.arm.linux.org.uk 
#   [ARM] Minor white space cleanup
# 
# arch/arm/mach-sa1100/neponset.c
#   2005/01/09 11:18:57+00:00 rmk@flint.arm.linux.org.uk +2 -2
#   Clean up white space.
# 
# arch/arm/common/sa1111.c
#   2005/01/09 11:18:51+00:00 rmk@flint.arm.linux.org.uk +5 -6
#   Clean up white space.
# 
# arch/arm/kernel/asm-offsets.c
#   2005/01/09 11:18:22+00:00 rmk@flint.arm.linux.org.uk +1 -1
#   Clean up white space.
# 
# ChangeSet
#   2005/01/09 11:13:19+00:00 rmk@flint.arm.linux.org.uk 
#   [ARM] Ensure we do not remap pages outside the allocated range.
# 
# arch/arm/mm/consistent.c
#   2005/01/09 10:58:52+00:00 rmk@flint.arm.linux.org.uk +1 -1
#   Ensure we do not remap pages outside the allocated range.
# 
# ChangeSet
#   2005/01/08 20:26:48-08:00 torvalds@evo.osdl.org 
#   Re-use the buffer page for pipe data.
#   
#   This brings the latency back to previous levels, and in
#   fact seems to drive it a bit lower.
# 
# include/linux/pipe_fs_i.h
#   2005/01/08 20:26:36-08:00 torvalds@evo.osdl.org +1 -0
#   Re-use the buffer page for pipe data.
#   
#   This brings the latency back to previous levels, and in
#   fact seems to drive it a bit lower.
# 
# fs/pipe.c
#   2005/01/08 20:26:36-08:00 torvalds@evo.osdl.org +26 -17
#   Re-use the buffer page for pipe data.
#   
#   This brings the latency back to previous levels, and in
#   fact seems to drive it a bit lower.
# 
# ChangeSet
#   2005/01/08 19:59:53-08:00 alan@lxorguk.ukuu.org.uk 
#   [PATCH] SDLA firmware upgrade should require CAP_SYS_RAWIO (not just CAP_NET_ADMIN)
#   
#   There were a few variants on the list trying to work out what the valid
#   ranges to verify for write are but they sort of missed the point, if you
#   can load new firmware you can have fun anyway.
# 
# drivers/net/wan/sdla.c
#   2005/01/07 07:49:56-08:00 alan@lxorguk.ukuu.org.uk +2 -0
#   SDLA firmware upgrade should require CAP_SYS_RAWIO (not just CAP_NET_ADMIN)
# 
# ChangeSet
#   2005/01/08 17:10:33-08:00 torvalds@ppc970.osdl.org 
#   Merge bk://gkernel.bkbits.net/libata-2.6
#   into ppc970.osdl.org:/home/torvalds/v2.6/linux
# 
# drivers/scsi/ahci.c
#   2005/01/08 17:10:29-08:00 torvalds@ppc970.osdl.org +0 -0
#   Auto merged
# 
# drivers/pci/quirks.c
#   2005/01/08 17:10:29-08:00 torvalds@ppc970.osdl.org +0 -0
#   Auto merged
# 
# ChangeSet
#   2005/01/08 17:09:19-08:00 torvalds@ppc970.osdl.org 
#   Merge bk://gkernel.bkbits.net/net-drivers-2.6
#   into ppc970.osdl.org:/home/torvalds/v2.6/linux
# 
# drivers/net/tulip/tulip_core.c
#   2005/01/08 17:09:15-08:00 torvalds@ppc970.osdl.org +0 -0
#   Auto merged
# 
# drivers/net/3c509.c
#   2005/01/08 17:09:15-08:00 torvalds@ppc970.osdl.org +0 -0
#   Auto merged
# 
# ChangeSet
#   2005/01/08 17:05:23-08:00 torvalds@ppc970.osdl.org 
#   Merge bk://gkernel.bkbits.net/misc-2.6
#   into ppc970.osdl.org:/home/torvalds/v2.6/linux
# 
# sound/oss/via82cxxx_audio.c
#   2005/01/08 17:05:19-08:00 torvalds@ppc970.osdl.org +0 -0
#   Auto merged
# 
# drivers/block/sx8.c
#   2005/01/08 17:05:19-08:00 torvalds@ppc970.osdl.org +0 -1
#   Auto merged
# 
# ChangeSet
#   2005/01/08 16:06:16-08:00 akpm@osdl.org 
#   [PATCH] Fix ppc64 !HOTPLUG_CPU build
#   
#   idle_task_exit() only exists when CONFIG_HOTPLUG_CPU is enabled
# 
# include/linux/sched.h
#   2005/01/07 18:23:24-08:00 akpm@osdl.org +6 -1
#   Fix ppc64 !HOTPLUG_CPU build
# 
# ChangeSet
#   2005/01/08 14:35:06-08:00 bunk@stusta.de 
#   [PATCH] OSS: misc cleanups
#   
#   The patch below contains cleanups under sound/oss/ including the
#   following:
#   - make needlessly global code static
#   - kill cs4232.h (it contained two function prototypes: one is now static
#     and the other one was already stale)
#   - removed the following unused global functions:
#     - cs4232.c: init_cs4281
#     - emu10k1/hwaccess.c: sumVolumeToAttenuation
#     - emu10k1/hwaccess.c: emu10k1_set_stop_on_loop
#     - sb_common.c: sb_dsp_disable_midi
#     - sb_common.c: sb_dsp_disable_recording
#     - wavfront.c: attach_wffx
#   - cs46xx.c: #ifndef CS46XX_ACPI_SUPPORT cs46xx_pm_callback
#   - emu10k1/hwaccess.c: #ifdef DBGEMU emu10k1_writefn0_2
#   - opl3sa2.c: remove the unused struct opl3sa2_dev
#   - removed the following unused EXPORT_SYMBOL's:
#     - ac97.c: ac97_set_mixer
#     - ac97.c: ac97_get_register
#     - ac97.c: ac97_get_mixer_scaled
#     - sb_common.c: sb_dsp_disable_midi
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# sound/oss/wavfront.c
#   2005/01/07 21:44:37-08:00 bunk@stusta.de +34 -42
#   OSS: misc cleanups
# 
# sound/oss/via82cxxx_audio.c
#   2005/01/07 21:44:37-08:00 bunk@stusta.de +1 -1
#   OSS: misc cleanups
# 
# sound/oss/trident.c
#   2005/01/07 21:44:37-08:00 bunk@stusta.de +2 -1
#   OSS: misc cleanups
# 
# sound/oss/sequencer.c
#   2005/01/07 21:44:37-08:00 bunk@stusta.de +1 -1
#   OSS: misc cleanups
# 
# sound/oss/sb_ess.c
#   2005/01/07 21:44:37-08:00 bunk@stusta.de +1 -1
#   OSS: misc cleanups
# 
# sound/oss/sb_common.c
#   2005/01/07 21:44:37-08:00 bunk@stusta.de +1 -10
#   OSS: misc cleanups
# 
# sound/oss/sb_card.c
#   2005/01/07 21:44:37-08:00 bunk@stusta.de +1 -1
#   OSS: misc cleanups
# 
# sound/oss/sb.h
#   2005/01/07 21:44:37-08:00 bunk@stusta.de +0 -3
#   OSS: misc cleanups
# 
# sound/oss/rme96xx.c
#   2005/01/07 21:44:37-08:00 bunk@stusta.de +13 -13
#   OSS: misc cleanups
# 
# sound/oss/pss.c
#   2005/01/07 21:44:37-08:00 bunk@stusta.de +2 -2
#   OSS: misc cleanups
# 
# sound/oss/pas2_card.c
#   2005/01/07 21:44:37-08:00 bunk@stusta.de +0 -10
#   OSS: misc cleanups
# 
# sound/oss/opl3sa2.c
#   2005/01/07 21:44:37-08:00 bunk@stusta.de +1 -4
#   OSS: misc cleanups
# 
# sound/oss/nm256_audio.c
#   2005/01/07 21:44:37-08:00 bunk@stusta.de +2 -2
#   OSS: misc cleanups
# 
# sound/oss/maestro3.h
#   2005/01/07 21:44:37-08:00 bunk@stusta.de +2 -2
#   OSS: misc cleanups
# 
# sound/oss/maestro3.c
#   2005/01/07 21:44:37-08:00 bunk@stusta.de +10 -10
#   OSS: misc cleanups
# 
# sound/oss/maestro.c
#   2005/01/07 21:44:37-08:00 bunk@stusta.de +5 -5
#   OSS: misc cleanups
# 
# sound/oss/gus_wave.c
#   2005/01/07 21:44:37-08:00 bunk@stusta.de +1 -1
#   OSS: misc cleanups
# 
# sound/oss/forte.c
#   2005/01/07 21:44:37-08:00 bunk@stusta.de +2 -2
#   OSS: misc cleanups
# 
# sound/oss/emu10k1/voicemgr.c
#   2005/01/07 21:44:37-08:00 bunk@stusta.de +2 -1
#   OSS: misc cleanups
# 
# sound/oss/emu10k1/main.c
#   2005/01/07 21:44:37-08:00 bunk@stusta.de +2 -2
#   OSS: misc cleanups
# 
# sound/oss/emu10k1/hwaccess.h
#   2005/01/07 21:44:37-08:00 bunk@stusta.de +0 -2
#   OSS: misc cleanups
# 
# sound/oss/emu10k1/hwaccess.c
#   2005/01/07 21:44:37-08:00 bunk@stusta.de +2 -36
#   OSS: misc cleanups
# 
# sound/oss/emu10k1/efxmgr.c
#   2005/01/07 21:44:37-08:00 bunk@stusta.de +2 -2
#   OSS: misc cleanups
# 
# sound/oss/emu10k1/cardwi.c
#   2005/01/07 21:44:37-08:00 bunk@stusta.de +1 -1
#   OSS: misc cleanups
# 
# sound/oss/emu10k1/cardmi.h
#   2005/01/07 21:44:37-08:00 bunk@stusta.de +0 -17
#   OSS: misc cleanups
# 
# sound/oss/emu10k1/cardmi.c
#   2005/01/07 21:44:37-08:00 bunk@stusta.de +37 -22
#   OSS: misc cleanups
# 
# sound/oss/emu10k1/audio.h
#   2005/01/07 21:44:37-08:00 bunk@stusta.de +0 -3
#   OSS: misc cleanups
# 
# sound/oss/emu10k1/audio.c
#   2005/01/07 21:44:37-08:00 bunk@stusta.de +6 -3
#   OSS: misc cleanups
# 
# sound/oss/cs46xxpm-24.h
#   2005/01/07 21:44:37-08:00 bunk@stusta.de +0 -1
#   OSS: misc cleanups
# 
# sound/oss/cs46xx_wrapper-24.h
#   2005/01/07 21:44:37-08:00 bunk@stusta.de +1 -1
#   OSS: misc cleanups
# 
# sound/oss/cs46xx.c
#   2005/01/07 21:44:37-08:00 bunk@stusta.de +15 -10
#   OSS: misc cleanups
# 
# sound/oss/cs4281/cs4281pm-24.c
#   2005/01/07 21:44:37-08:00 bunk@stusta.de +3 -3
#   OSS: misc cleanups
# 
# sound/oss/cs4281/cs4281m.c
#   2005/01/07 21:44:37-08:00 bunk@stusta.de +16 -22
#   OSS: misc cleanups
# 
# sound/oss/cs4281/cs4281_wrapper-24.c
#   2005/01/07 21:44:37-08:00 bunk@stusta.de +2 -2
#   OSS: misc cleanups
# 
# sound/oss/cs4232.c
#   2005/01/07 21:44:37-08:00 bunk@stusta.de +1 -2
#   OSS: misc cleanups
# 
# sound/oss/awe_wave.c
#   2005/01/07 21:44:37-08:00 bunk@stusta.de +4 -4
#   OSS: misc cleanups
# 
# sound/oss/aedsp16.c
#   2005/01/07 21:44:37-08:00 bunk@stusta.de +5 -5
#   OSS: misc cleanups
# 
# sound/oss/ad1889.c
#   2005/01/07 21:44:37-08:00 bunk@stusta.de +2 -2
#   OSS: misc cleanups
# 
# sound/oss/ad1848.c
#   2005/01/07 21:44:37-08:00 bunk@stusta.de +4 -4
#   OSS: misc cleanups
# 
# sound/oss/ad1816.c
#   2005/01/07 21:44:37-08:00 bunk@stusta.de +4 -3
#   OSS: misc cleanups
# 
# sound/oss/ac97.h
#   2005/01/07 21:44:37-08:00 bunk@stusta.de +0 -16
#   OSS: misc cleanups
# 
# sound/oss/ac97.c
#   2005/01/07 21:44:37-08:00 bunk@stusta.de +5 -8
#   OSS: misc cleanups
# 
# BitKeeper/deleted/.del-cs4232.h~ea4a828b4c69bb8d
#   2005/01/08 14:34:57-08:00 bunk@stusta.de +0 -0
#   Delete: sound/oss/cs4232.h
# 
# ChangeSet
#   2005/01/08 14:34:47-08:00 bunk@stusta.de 
#   [PATCH] init/initramfs.c: make unpack_to_rootfs static
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# init/initramfs.c
#   2005/01/07 21:44:37-08:00 bunk@stusta.de +1 -1
#   init/initramfs.c: make unpack_to_rootfs static
# 
# ChangeSet
#   2005/01/08 14:34:30-08:00 a.othieno@bluewin.ch 
#   [PATCH] arch/alpha/Kconfig: Kill stale reference to Documentation/smp.tex
#   
#   This reference to the long gone Documentation/smp.tex somehow evaded
#   Randy's cleanup from circa March.  This marks off the last of those stale
#   references.
#   
#   Signed-off-by: Arthur Othieno <a.othieno@bluewin.ch>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/alpha/Kconfig
#   2005/01/07 21:44:36-08:00 a.othieno@bluewin.ch +1 -1
#   arch/alpha/Kconfig: Kill stale reference to Documentation/smp.tex
# 
# ChangeSet
#   2005/01/08 14:34:14-08:00 bunk@stusta.de 
#   [PATCH] bttv-driver.c: make some variables static
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/media/video/bttvp.h
#   2005/01/07 21:44:36-08:00 bunk@stusta.de +0 -3
#   bttv-driver.c: make some variables static
# 
# drivers/media/video/bttv-driver.c
#   2005/01/07 21:44:36-08:00 bunk@stusta.de +3 -3
#   bttv-driver.c: make some variables static
# 
# ChangeSet
#   2005/01/08 14:33:56-08:00 wli@holomorphy.com 
#   [PATCH] remove CT_TO_SECS()/CT_TO_USECS()
#   
#   CT_TO_SECS() and CT_TO_USECS() are used nowhere in the tree.  This patch
#   removes them.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/sched.h
#   2005/01/07 21:44:36-08:00 wli@holomorphy.com +0 -3
#   remove CT_TO_SECS()/CT_TO_USECS()
# 
# ChangeSet
#   2005/01/08 14:33:39-08:00 bunk@stusta.de 
#   [PATCH] remove IN_STRING_C
#   
#   IN_STRING_C was an i386-specific hack by Andi Kleen to provide out-of-line
#   versions of some lib/string.c functions that aren't directly used on i386
#   (because there are inline assembly versions).
#   
#   This can cause problems if gcc chooses to transparently replace a call to one
#   string function with a call to another string function (the example Andi gave
#   was a replacement of a sprintf call with a strcpy call) which generates a
#   function call to the replacement function.
#   
#   The problems observed by Andi only occur in recent kernels without
#   -fno-unit-at-a-time.
#   
#   With -ffreestanding it can't even cause any problems in case we'd one day drop
#   the -fno-unit-at-a-time since gcc mustn't assume in a freestanding environment
#   that all standard C library functions are available.
#   
#   The effect of this patch is a small space saving in the kernel.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# lib/string.c
#   2005/01/07 21:44:36-08:00 bunk@stusta.de +0 -2
#   remove IN_STRING_C
# 
# include/asm-i386/string.h
#   2005/01/07 21:44:36-08:00 bunk@stusta.de +0 -3
#   remove IN_STRING_C
# 
# ChangeSet
#   2005/01/08 14:33:23-08:00 bunk@stusta.de 
#   [PATCH] scsi/aic7xxx/: remove two useless variables
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/scsi/aic7xxx/aic7xxx_osm.c
#   2005/01/07 21:44:36-08:00 bunk@stusta.de +0 -12
#   scsi/aic7xxx/: remove two useless variables
# 
# drivers/scsi/aic7xxx/aic79xx_osm.c
#   2005/01/07 21:44:35-08:00 bunk@stusta.de +0 -12
#   scsi/aic7xxx/: remove two useless variables
# 
# ChangeSet
#   2005/01/08 14:33:07-08:00 bunk@stusta.de 
#   [PATCH] remove unused include/asm-m68k/adb_mouse.h
#   
#   Remove a completely unused header file.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# BitKeeper/deleted/.del-adb_mouse.h~4c67d3096af667ed
#   2005/01/08 14:33:00-08:00 bunk@stusta.de +0 -0
#   Delete: include/asm-m68k/adb_mouse.h
# 
# ChangeSet
#   2005/01/08 14:32:50-08:00 chrisw@osdl.org 
#   [PATCH] binfmt_script.c: make em86_format static
#   
#   This patch by Chris Wright <chrisw@osdl.org> makes the needlessly global
#   struct em86_format static.
#   
#   Signed-off-by: Chris Wright <chrisw@osdl.org>
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/binfmt_em86.c
#   2005/01/07 21:44:35-08:00 chrisw@osdl.org +1 -1
#   binfmt_script.c: make em86_format static
# 
# ChangeSet
#   2005/01/08 14:32:35-08:00 bunk@stusta.de 
#   [PATCH] befs: #if 0 two unused global functions
#   
#   The patch below #if 0's two unussed global functions.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/befs/debug.c
#   2005/01/07 21:44:35-08:00 bunk@stusta.de +2 -0
#   befs: #if 0 two unused global functions
# 
# ChangeSet
#   2005/01/08 14:32:17-08:00 bunk@stusta.de 
#   [PATCH] AFS: afs_voltypes isn't always required
#   
#   afs_voltypes is only used #ifdef __KDEBUG, and even then it doesn't has to be
#   a global symbol.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/afs/volume.c
#   2005/01/07 21:44:34-08:00 bunk@stusta.de +3 -1
#   AFS: afs_voltypes isn't always required
# 
# fs/afs/types.h
#   2005/01/07 21:44:34-08:00 bunk@stusta.de +0 -2
#   AFS: afs_voltypes isn't always required
# 
# ChangeSet
#   2005/01/08 14:32:00-08:00 bunk@stusta.de 
#   [PATCH] cris: remove kernel 2.0 #ifdef's
#   
#   Remove some kernel 2.0 #ifdef's from arch/cris/arch-v10/kernel/fasttimer.c
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/cris/arch-v10/kernel/fasttimer.c
#   2005/01/07 21:44:34-08:00 bunk@stusta.de +2 -28
#   cris: remove kernel 2.0 #ifdef's
# 
# ChangeSet
#   2005/01/08 14:31:43-08:00 olh@suse.de 
#   [PATCH] fix typo and email in SAK.txt
#   
#   Signed-off-by: Olaf Hering <olh@suse.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# Documentation/SAK.txt
#   2005/01/07 21:44:34-08:00 olh@suse.de +2 -2
#   fix typo and email in SAK.txt
# 
# ChangeSet
#   2005/01/08 14:31:26-08:00 bunk@stusta.de 
#   [PATCH] some parport_pc.c cleanups
#   
#   The patch below makes the following changes to
#   drivers/parport/parport_pc.c :
#   - make some needlessly global functions static
#   - #if 0 two currently unused functions
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/parport_pc.h
#   2005/01/07 21:44:34-08:00 bunk@stusta.de +0 -6
#   some parport_pc.c cleanups
# 
# drivers/parport/parport_pc.c
#   2005/01/07 21:44:34-08:00 bunk@stusta.de +17 -13
#   some parport_pc.c cleanups
# 
# ChangeSet
#   2005/01/08 14:31:09-08:00 bunk@stusta.de 
#   [PATCH] prism54: small prismcompat cleanup
#   
#   - the FW_LOADER is already guaranteed through the Kconfig file
#   - prism54_synchronize_irq is also #define'd to synchronize_irq
#     in prismcompat24.h, so there's no need for it
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/net/wireless/prism54/prismcompat.h
#   2005/01/07 21:44:34-08:00 bunk@stusta.de +0 -6
#   prism54: small prismcompat cleanup
# 
# drivers/net/wireless/prism54/islpci_dev.c
#   2005/01/07 21:44:34-08:00 bunk@stusta.de +1 -1
#   prism54: small prismcompat cleanup
# 
# ChangeSet
#   2005/01/08 14:30:52-08:00 bunk@stusta.de 
#   [PATCH] sched.c: remove an unused function
#   
#   The patch below removes an unused function from kernel/sched.c
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Acked-by: Ingo Molnar <mingo@elte.hu>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# kernel/sched.c
#   2005/01/07 21:44:34-08:00 bunk@stusta.de +0 -6
#   sched.c: remove an unused function
# 
# ChangeSet
#   2005/01/08 14:30:35-08:00 bunk@stusta.de 
#   [PATCH] scsi/aic7xxx/aic79xx_osm.c: remove an unused function
#   
#   The patch below removes an unused function from 
#   drivers/scsi/aic7xxx/aic79xx_osm.c
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/scsi/aic7xxx/aic79xx_osm.c
#   2005/01/07 21:56:12-08:00 bunk@stusta.de +0 -26
#   scsi/aic7xxx/aic79xx_osm.c: remove an unused function
# 
# ChangeSet
#   2005/01/08 14:30:18-08:00 bunk@stusta.de 
#   [PATCH] scsi/ahci.c: remove an unused function
#   
#   The patch below removes an unused function from drivers/scsi/ahci.c
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/scsi/ahci.c
#   2005/01/07 21:44:34-08:00 bunk@stusta.de +0 -9
#   scsi/ahci.c: remove an unused function
# 
# ChangeSet
#   2005/01/08 14:30:01-08:00 bunk@stusta.de 
#   [PATCH] sched.c: remove an unused macro
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Acked-by: Ingo Molnar <mingo@elte.hu>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# kernel/sched.c
#   2005/01/07 21:56:14-08:00 bunk@stusta.de +0 -6
#   sched.c: remove an unused macro
# 
# ChangeSet
#   2005/01/08 14:29:45-08:00 bunk@stusta.de 
#   [PATCH] DVB av7110_hw.c: remove unused functions
#   
#   The patch below removes three unused functions from
#   drivers/media/dvb/ttpci/av7110_hw.c
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/media/dvb/ttpci/av7110_hw.c
#   2005/01/07 21:44:33-08:00 bunk@stusta.de +0 -15
#   DVB av7110_hw.c: remove unused functions
# 
# ChangeSet
#   2005/01/08 14:29:27-08:00 bunk@stusta.de 
#   [PATCH] OSS: remove unused functions
#   
#   The patch below removes some unused functions from OSS.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# sound/oss/ymfpci.c
#   2005/01/07 21:44:33-08:00 bunk@stusta.de +0 -5
#   OSS: remove unused functions
# 
# sound/oss/cs46xx.c
#   2005/01/07 21:56:11-08:00 bunk@stusta.de +0 -25
#   OSS: remove unused functions
# 
# sound/oss/cmpci.c
#   2005/01/07 21:44:33-08:00 bunk@stusta.de +0 -9
#   OSS: remove unused functions
# 
# sound/oss/ad1889.c
#   2005/01/07 21:56:11-08:00 bunk@stusta.de +0 -14
#   OSS: remove unused functions
# 
# ChangeSet
#   2005/01/08 14:29:10-08:00 bunk@stusta.de 
#   [PATCH] mark QNX4FS_RW as BROKEN
#   
#   Anders Larsen wrote:
#   
#     If you remove any code inside the #ifdef CONFIG_QNX4FS_RW we might as well
#     remove the option "config QNX4FS_RW" altogether.  It's horribly broken, and
#     I don't intend to fix it; while I was thinking about how to properly
#     implement write-support, somebody else went away and did it.  As that
#     alternative seems to work well and is being actively maintained, I won't try
#     to reinvent it.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/Kconfig
#   2005/01/07 21:44:33-08:00 bunk@stusta.de +1 -1
#   mark QNX4FS_RW as BROKEN
# 
# ChangeSet
#   2005/01/08 14:28:57-08:00 ptushnik@gmail.com 
#   [PATCH] Fix kernel/timer.c comment typo
#   
#   Signed-off-by: Vasia Pupkin <ptushnik@gmail.com>
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# kernel/timer.c
#   2005/01/07 21:44:33-08:00 ptushnik@gmail.com +1 -1
#   Fix kernel/timer.c comment typo
# 
# ChangeSet
#   2005/01/08 14:28:40-08:00 bunk@stusta.de 
#   [PATCH] small proc_fs cleanups
#   
#   The patch below does the following cleanups in the proc_fs code:
#   - remove an unused global function
#   - make two functions static
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/proc_fs.h
#   2005/01/07 21:44:33-08:00 bunk@stusta.de +0 -5
#   small proc_fs cleanups
# 
# fs/proc/proc_misc.c
#   2005/01/07 21:44:33-08:00 bunk@stusta.de +2 -2
#   small proc_fs cleanups
# 
# fs/proc/kcore.c
#   2005/01/07 21:44:33-08:00 bunk@stusta.de +0 -17
#   small proc_fs cleanups
# 
# ChangeSet
#   2005/01/08 14:28:23-08:00 bunk@stusta.de 
#   [PATCH] devpts/inode.c: make one struct static
#   
#   The patch below makes struct devpts_file_inode_operations in fs/devpts/inode.c
#   static.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/devpts/inode.c
#   2005/01/07 21:44:32-08:00 bunk@stusta.de +1 -1
#   devpts/inode.c: make one struct static
# 
# ChangeSet
#   2005/01/08 14:28:05-08:00 bunk@stusta.de 
#   [PATCH] bio.c: make bio_destructor static
#   
#   bio_destructor in fs/bio.c isn't used outside of this file, and after quickly
#   thinking about it I didn't find a reason why it should.
#   
#   The patch below makes it static.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Acked-by: Jens Axboe <axboe@suse.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/bio.c
#   2005/01/07 21:44:32-08:00 bunk@stusta.de +1 -1
#   bio.c: make bio_destructor static
# 
# ChangeSet
#   2005/01/08 14:27:43-08:00 bunk@stusta.de 
#   [PATCH] binfmt_script.c: make struct script_format static
#   
#   The patch below makes struct script_format in fs/binfmt_script.c static.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/binfmt_script.c
#   2005/01/07 21:44:32-08:00 bunk@stusta.de +1 -1
#   binfmt_script.c: make struct script_format static
# 
# ChangeSet
#   2005/01/08 14:27:26-08:00 bunk@stusta.de 
#   [PATCH] ISDN b1pcmcia.c: remove an unused variable
#   
#   drivers/isdn/hardware/avm/b1pcmcia.c: In function `b1pcmcia_init':
#   drivers/isdn/hardware/avm/b1pcmcia.c:203: warning: unused variable `err'
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/isdn/hardware/avm/b1pcmcia.c
#   2005/01/07 21:44:32-08:00 bunk@stusta.de +0 -1
#   ISDN b1pcmcia.c: remove an unused variable
# 
# ChangeSet
#   2005/01/08 14:27:08-08:00 bunk@stusta.de 
#   [PATCH] video drivers: remove unused functions
#   
#   The patch below removes some unused function from drivers/video/
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/video/tridentfb.c
#   2005/01/07 21:44:32-08:00 bunk@stusta.de +0 -7
#   video drivers: remove unused functions
# 
# drivers/video/tdfxfb.c
#   2005/01/07 21:44:32-08:00 bunk@stusta.de +0 -35
#   video drivers: remove unused functions
# 
# drivers/video/radeonfb.c
#   2005/01/07 21:44:32-08:00 bunk@stusta.de +0 -24
#   video drivers: remove unused functions
# 
# drivers/video/pm2fb.c
#   2005/01/07 21:44:32-08:00 bunk@stusta.de +0 -7
#   video drivers: remove unused functions
# 
# drivers/video/neofb.c
#   2005/01/07 21:44:32-08:00 bunk@stusta.de +0 -5
#   video drivers: remove unused functions
# 
# drivers/video/i810/i810_accel.c
#   2005/01/07 21:44:32-08:00 bunk@stusta.de +0 -43
#   video drivers: remove unused functions
# 
# drivers/video/console/mdacon.c
#   2005/01/07 21:44:32-08:00 bunk@stusta.de +0 -11
#   video drivers: remove unused functions
# 
# ChangeSet
#   2005/01/08 14:26:51-08:00 bunk@stusta.de 
#   [PATCH] watchdog/machzwd.c: remove unused functions
#   
#   The patch below removes unused functions from drivers/char/watchdog/machzwd.c
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/char/watchdog/machzwd.c
#   2005/01/07 21:44:30-08:00 bunk@stusta.de +0 -29
#   watchdog/machzwd.c: remove unused functions
# 
# ChangeSet
#   2005/01/08 14:26:34-08:00 bunk@stusta.de 
#   [PATCH] NFS: remove an unused function
#   
#   The patch below removes an unused function from fs/nfsd/nfs3xdr.c
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Acked-by: Neil Brown <neilb@cse.unsw.edu.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/nfsd/nfs3xdr.c
#   2005/01/07 21:44:30-08:00 bunk@stusta.de +0 -16
#   NFS: remove an unused function
# 
# ChangeSet
#   2005/01/08 14:26:17-08:00 bunk@stusta.de 
#   [PATCH] media/video/ir-kbd-i2c.c: remove an unused function
#   
#   The patch below removes an unused function from
#   drivers/media/video/ir-kbd-i2c.c
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/media/video/ir-kbd-i2c.c
#   2005/01/07 21:44:29-08:00 bunk@stusta.de +0 -10
#   media/video/ir-kbd-i2c.c: remove an unused function
# 
# ChangeSet
#   2005/01/08 14:26:00-08:00 bunk@stusta.de 
#   [PATCH] floppy.c: remove an unused function
#   
#   The patch below removes an unused function from drivers/block/floppy.c
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/block/floppy.c
#   2005/01/07 21:44:29-08:00 bunk@stusta.de +0 -5
#   floppy.c: remove an unused function
# 
# ChangeSet
#   2005/01/08 14:25:43-08:00 bunk@stusta.de 
#   [PATCH] DRM: remove unused functions
#   
#   The patch below removes two unused functions from DRM.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Acked-by: Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/char/drm/i915_dma.c
#   2005/01/07 21:44:29-08:00 bunk@stusta.de +0 -18
#   DRM: remove unused functions
# 
# drivers/char/drm/i810_dma.c
#   2005/01/07 21:44:29-08:00 bunk@stusta.de +0 -18
#   DRM: remove unused functions
# 
# ChangeSet
#   2005/01/08 14:25:21-08:00 rddunlap@osdl.org 
#   [PATCH] IPMI: use C99 struct inits.
#   
#   Convert IPMI driver struct usage to C99 initializers.
#   
#   Signed-off-by: Randy Dunlap <rddunlap@osdl.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/char/ipmi/ipmi_watchdog.c
#   2005/01/07 21:44:29-08:00 rddunlap@osdl.org +12 -12
#   IPMI: use C99 struct inits.
# 
# drivers/char/ipmi/ipmi_poweroff.c
#   2005/01/07 21:44:29-08:00 rddunlap@osdl.org +9 -3
#   IPMI: use C99 struct inits.
# 
# drivers/char/ipmi/ipmi_msghandler.c
#   2005/01/07 21:44:29-08:00 rddunlap@osdl.org +3 -3
#   IPMI: use C99 struct inits.
# 
# ChangeSet
#   2005/01/08 14:25:08-08:00 janitor@sternwelten.at 
#   [PATCH] ifdef typos mips: AU1[0X]00_USB_DEVICE
#   
#   AU1000_USB_DEVICE appears 3 times.
#   AU1X00_USB_DEVICE appears 44 times, and is nowhere defined.
#   One ifdef starts with "X" version, and ends with "0", so it's quite
#   obvious these is supposed to be one option.
#   
#   Makes you wonder if anybody uses these devices.
#   
#   Signed-off-by: Domen Puncer <domen@coderock.org>
#   Acked-by: Randy Dunlap <rddunlap@osdl.org>
#   Signed-off-by: Maximilian Attems <janitor@sternwelten.at>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/mips/configs/pb1500_defconfig
#   2005/01/07 21:44:28-08:00 janitor@sternwelten.at +1 -1
#   ifdef typos mips: AU1[0X]00_USB_DEVICE
# 
# arch/mips/au1000/mtx-1/board_setup.c
#   2005/01/07 21:44:28-08:00 janitor@sternwelten.at +1 -1
#   ifdef typos mips: AU1[0X]00_USB_DEVICE
# 
# arch/mips/Kconfig
#   2005/01/07 21:44:28-08:00 janitor@sternwelten.at +1 -1
#   ifdef typos mips: AU1[0X]00_USB_DEVICE
# 
# ChangeSet
#   2005/01/08 14:24:51-08:00 janitor@sternwelten.at 
#   [PATCH] ifdef typos: drivers_usb_net_usbnet.c
#   
#   Although neither symbol is not defined (yet?); code uses some
#   GENELINK_* (_ACK too), so this seems right.
#   
#   Signed-off-by: Domen Puncer <domen@coderock.org>
#   Acked-by: Randy Dunlap <rddunlap@osdl.org>
#   Signed-off-by: Maximilian Attems <janitor@sternwelten.at>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/usb/net/usbnet.c
#   2005/01/07 21:44:29-08:00 janitor@sternwelten.at +1 -1
#   ifdef typos: drivers_usb_net_usbnet.c
# 
# ChangeSet
#   2005/01/08 14:24:33-08:00 janitor@sternwelten.at 
#   [PATCH] ifdef typos: drivers_net_wireless_wavelan_cs.c
#   
#   wavelan.p.h defines *_ERROR
#   wavelan_cs.p.h defines *_ERRORS
#   Since only second one is included, change #ifdefs
#   
#   Signed-off-by: Domen Puncer <domen@coderock.org>
#   Acked-by: Randy Dunlap <rddunlap@osdl.org>
#   Signed-off-by: Maximilian Attems <janitor@sternwelten.at>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/net/wireless/wavelan_cs.c
#   2005/01/07 21:44:28-08:00 janitor@sternwelten.at +2 -2
#   ifdef typos: drivers_net_wireless_wavelan_cs.c
# 
# ChangeSet
#   2005/01/08 14:24:16-08:00 janitor@sternwelten.at 
#   [PATCH] ifdef typos: drivers_char_ipmi_ipmi_si_intf.c
#   
#   CONFIG_ACPI_INTERPETER is wrong.
#   
#   Signed-off-by: Domen Puncer <domen@coderock.org>
#   Acked-by: Randy Dunlap <rddunlap@osdl.org>
#   Signed-off-by: Maximilian Attems <janitor@sternwelten.at>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/char/ipmi/ipmi_si_intf.c
#   2005/01/07 21:44:28-08:00 janitor@sternwelten.at +1 -1
#   ifdef typos: drivers_char_ipmi_ipmi_si_intf.c
# 
# ChangeSet
#   2005/01/08 14:23:58-08:00 janitor@sternwelten.at 
#   [PATCH] ifdef typos: arch_sh_boards_renesas_hs7751rvoip_io.c
#   
#   CONFIG_HS7751RVOIP_CIDEC is mistyped.
#   
#   Signed-off-by: Domen Puncer <domen@coderock.org>
#   Acked-by: Randy Dunlap <rddunlap@osdl.org>
#   Signed-off-by: Maximilian Attems <janitor@sternwelten.at>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/sh/boards/renesas/hs7751rvoip/io.c
#   2005/01/07 21:44:28-08:00 janitor@sternwelten.at +2 -2
#   ifdef typos: arch_sh_boards_renesas_hs7751rvoip_io.c
# 
# ChangeSet
#   2005/01/08 14:23:42-08:00 janitor@sternwelten.at 
#   [PATCH] ifdef typos: arch_ppc_syslib_ppc4xx_dma.c
#   
#   ppc4xx_dma.h defines PPC4xx_DMA_64BIT.
#   
#   Signed-off-by: Domen Puncer <domen@coderock.org>
#   Acked-by: Randy Dunlap <rddunlap@osdl.org>
#   Signed-off-by: Maximilian Attems <janitor@sternwelten.at>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/ppc/syslib/ppc4xx_dma.c
#   2005/01/07 21:44:28-08:00 janitor@sternwelten.at +2 -2
#   ifdef typos: arch_ppc_syslib_ppc4xx_dma.c
# 
# ChangeSet
#   2005/01/08 14:23:24-08:00 janitor@sternwelten.at 
#   [PATCH] ifdef typos: arch_ppc_platforms_prep_setup.c -another one
#   
#   Obvious typo, FB_VGA16 is from Kconfig.
#   
#   Signed-off-by: Domen Puncer <domen@coderock.org>
#   Acked-by: Randy Dunlap <rddunlap@osdl.org>
#   Signed-off-by: Maximilian Attems <janitor@sternwelten.at>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/ppc/platforms/prep_setup.c
#   2005/01/07 21:44:28-08:00 janitor@sternwelten.at +1 -1
#   ifdef typos: arch_ppc_platforms_prep_setup.c -another one
# 
# ChangeSet
#   2005/01/08 14:23:04-08:00 janitor@sternwelten.at 
#   [PATCH] ifdef typos: arch_ppc_platforms_prep_setup.c
#   
#   CONFIG_PREP_PRESIDUAL is mistyped.
#   
#   Signed-off-by: Domen Puncer <domen@coderock.org>
#   Acked-by: Randy Dunlap <rddunlap@osdl.org>
#   Signed-off-by: Maximilian Attems <janitor@sternwelten.at>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/ppc/platforms/prep_setup.c
#   2005/01/07 21:56:18-08:00 janitor@sternwelten.at +1 -1
#   ifdef typos: arch_ppc_platforms_prep_setup.c
# 
# ChangeSet
#   2005/01/08 14:22:46-08:00 bunk@stusta.de 
#   [PATCH] small drivers/media/radio/ cleanups
#   
#   the patch below makes the following cleanups under drivers/media/radio/ :
#   - remove two unused global variables
#   - make some needlessly global code static
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/media/radio/radio-zoltrix.c
#   2005/01/07 21:44:27-08:00 bunk@stusta.de +2 -2
#   small drivers/media/radio/ cleanups
# 
# drivers/media/radio/radio-terratec.c
#   2005/01/07 21:44:27-08:00 bunk@stusta.de +1 -1
#   small drivers/media/radio/ cleanups
# 
# drivers/media/radio/radio-maxiradio.c
#   2005/01/07 21:44:27-08:00 bunk@stusta.de +2 -2
#   small drivers/media/radio/ cleanups
# 
# drivers/media/radio/radio-maestro.c
#   2005/01/07 21:44:27-08:00 bunk@stusta.de +2 -2
#   small drivers/media/radio/ cleanups
# 
# drivers/media/radio/radio-gemtek.c
#   2005/01/07 21:44:27-08:00 bunk@stusta.de +1 -1
#   small drivers/media/radio/ cleanups
# 
# drivers/media/radio/radio-cadet.c
#   2005/01/07 21:44:27-08:00 bunk@stusta.de +2 -2
#   small drivers/media/radio/ cleanups
# 
# drivers/media/radio/radio-aimslab.c
#   2005/01/07 21:44:27-08:00 bunk@stusta.de +2 -2
#   small drivers/media/radio/ cleanups
# 
# ChangeSet
#   2005/01/08 14:22:28-08:00 bunk@stusta.de 
#   [PATCH] small MCA cleanups
#   
#   The patch below does the following cleanups in the MCA code:
#   - make some needlessly global code static
#   - remove three unused global functions from mca-legacy.c (two of them
#     were EXPORT_SYMBOL'ed); this should IMHO be safe since mca-legacy
#     is not an API drivers should move to
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Acked-by: James Bottomley <James.Bottomley@SteelEye.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/mca-legacy.h
#   2005/01/07 21:44:27-08:00 bunk@stusta.de +0 -5
#   small MCA cleanups
# 
# drivers/mca/mca-proc.c
#   2005/01/07 21:44:27-08:00 bunk@stusta.de +2 -2
#   small MCA cleanups
# 
# drivers/mca/mca-legacy.c
#   2005/01/07 21:44:27-08:00 bunk@stusta.de +0 -59
#   small MCA cleanups
# 
# drivers/mca/mca-bus.c
#   2005/01/07 21:44:27-08:00 bunk@stusta.de +1 -1
#   small MCA cleanups
# 
# ChangeSet
#   2005/01/08 14:22:11-08:00 bunk@stusta.de 
#   [PATCH] lockd: fix two struct definitions
#   
#   Under fs/lockd/, there are two structs declared extern although they are in
#   the same file.  Furtheremore, they don't have to be global since their only
#   users are in the same file.
#   
#   Most of the changes to svc.c are only indent fixes caused by making the 
#   struct static.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/lockd/svc.c
#   2005/01/07 21:44:27-08:00 bunk@stusta.de +8 -8
#   lockd: fix two struct definitions
# 
# fs/lockd/mon.c
#   2005/01/07 21:44:27-08:00 bunk@stusta.de +2 -2
#   lockd: fix two struct definitions
# 
# ChangeSet
#   2005/01/08 14:21:50-08:00 akpm@osdl.org 
#   [PATCH] MODULE_PARM conversions
#   
#   Rusty Russell <rusty@rustcorp.com.au>
#   
#   MODULE_PARM conversions for x86 `allyesconfig'.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# sound/oss/wavfront.c
#   2005/01/07 21:56:11-08:00 akpm@osdl.org +12 -12
#   MODULE_PARM conversions
# 
# sound/oss/uart6850.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# sound/oss/trix.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +10 -10
#   MODULE_PARM conversions
# 
# sound/oss/sscape.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +7 -7
#   MODULE_PARM conversions
# 
# sound/oss/sonicvibes.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# sound/oss/sgalaxy.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +5 -5
#   MODULE_PARM conversions
# 
# sound/oss/rme96xx.c
#   2005/01/07 21:56:11-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# sound/oss/pss.c
#   2005/01/07 21:56:11-08:00 akpm@osdl.org +14 -14
#   MODULE_PARM conversions
# 
# sound/oss/pas2_card.c
#   2005/01/07 21:56:11-08:00 akpm@osdl.org +11 -11
#   MODULE_PARM conversions
# 
# sound/oss/opl3sa2.c
#   2005/01/07 21:56:11-08:00 akpm@osdl.org +10 -10
#   MODULE_PARM conversions
# 
# sound/oss/opl3sa.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +6 -6
#   MODULE_PARM conversions
# 
# sound/oss/opl3.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# sound/oss/nm256_audio.c
#   2005/01/07 21:56:11-08:00 akpm@osdl.org +4 -4
#   MODULE_PARM conversions
# 
# sound/oss/msnd_pinnacle.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +17 -18
#   MODULE_PARM conversions
# 
# sound/oss/mpu401.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# sound/oss/maui.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# sound/oss/maestro3.c
#   2005/01/07 21:56:11-08:00 akpm@osdl.org +3 -3
#   MODULE_PARM conversions
# 
# sound/oss/maestro.c
#   2005/01/07 21:56:11-08:00 akpm@osdl.org +4 -4
#   MODULE_PARM conversions
# 
# sound/oss/mad16.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +13 -13
#   MODULE_PARM conversions
# 
# sound/oss/gus_card.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +8 -8
#   MODULE_PARM conversions
# 
# sound/oss/es1371.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +3 -3
#   MODULE_PARM conversions
# 
# sound/oss/es1370.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# sound/oss/cs46xx.c
#   2005/01/07 21:56:15-08:00 akpm@osdl.org +8 -8
#   MODULE_PARM conversions
# 
# sound/oss/cs4281/cs4281m.c
#   2005/01/07 21:56:11-08:00 akpm@osdl.org +3 -3
#   MODULE_PARM conversions
# 
# sound/oss/cs4232.c
#   2005/01/07 21:56:11-08:00 akpm@osdl.org +10 -10
#   MODULE_PARM conversions
# 
# sound/oss/cmpci.c
#   2005/01/07 21:56:15-08:00 akpm@osdl.org +11 -11
#   MODULE_PARM conversions
# 
# sound/oss/awe_wave.c
#   2005/01/07 21:56:11-08:00 akpm@osdl.org +3 -3
#   MODULE_PARM conversions
# 
# sound/oss/ali5455.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +7 -6
#   MODULE_PARM conversions
# 
# sound/oss/aedsp16.c
#   2005/01/07 21:56:11-08:00 akpm@osdl.org +6 -6
#   MODULE_PARM conversions
# 
# sound/oss/adlib_card.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# sound/oss/ad1848.c
#   2005/01/07 21:56:11-08:00 akpm@osdl.org +11 -11
#   MODULE_PARM conversions
# 
# sound/oss/ad1816.c
#   2005/01/07 21:56:11-08:00 akpm@osdl.org +8 -8
#   MODULE_PARM conversions
# 
# sound/oss/aci.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +3 -3
#   MODULE_PARM conversions
# 
# drivers/video/vfb.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# drivers/video/tridentfb.c
#   2005/01/07 21:56:16-08:00 akpm@osdl.org +10 -10
#   MODULE_PARM conversions
# 
# drivers/video/sstfb.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +5 -5
#   MODULE_PARM conversions
# 
# drivers/video/matrox/matroxfb_crtc2.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/video/hgafb.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/video/cyber2000fb.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/video/console/mdacon.c
#   2005/01/07 21:56:16-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# drivers/telephony/ixj.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +3 -3
#   MODULE_PARM conversions
# 
# drivers/scsi/sim710.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/scsi/qlogicfas.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# drivers/scsi/pcmcia/qlogic_stub.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# drivers/scsi/pcmcia/nsp_cs.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +4 -4
#   MODULE_PARM conversions
# 
# drivers/scsi/pcmcia/fdomain_stub.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +3 -3
#   MODULE_PARM conversions
# 
# drivers/scsi/pcmcia/aha152x_stub.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +8 -8
#   MODULE_PARM conversions
# 
# drivers/scsi/nsp32.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +3 -3
#   MODULE_PARM conversions
# 
# drivers/scsi/in2000.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/scsi/g_NCR5380.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +7 -7
#   MODULE_PARM conversions
# 
# drivers/scsi/fdomain.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/scsi/aic7xxx/aic79xx_osm.c
#   2005/01/07 21:56:14-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/scsi/aacraid/aachba.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +7 -7
#   MODULE_PARM conversions
# 
# drivers/scsi/NCR_D700.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/parport/parport_cs.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# drivers/net/znet.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/net/yellowfin.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +7 -7
#   MODULE_PARM conversions
# 
# drivers/net/wireless/wl3501_cs.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +3 -3
#   MODULE_PARM conversions
# 
# drivers/net/wireless/wavelan_cs.p.h
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +4 -4
#   MODULE_PARM conversions
# 
# drivers/net/wireless/ray_cs.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +13 -13
#   MODULE_PARM conversions
# 
# drivers/net/wireless/orinoco_cs.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +3 -3
#   MODULE_PARM conversions
# 
# drivers/net/wireless/orinoco.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# drivers/net/wireless/netwave_cs.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +6 -6
#   MODULE_PARM conversions
# 
# drivers/net/wireless/atmel_cs.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +3 -3
#   MODULE_PARM conversions
# 
# drivers/net/wireless/arlan-main.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +22 -25
#   MODULE_PARM conversions
# 
# drivers/net/wireless/airo_cs.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +3 -3
#   MODULE_PARM conversions
# 
# drivers/net/wireless/airo.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +14 -14
#   MODULE_PARM conversions
# 
# drivers/net/wan/x25_asy.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/net/wan/syncppp.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/net/wan/sealevel.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +5 -5
#   MODULE_PARM conversions
# 
# drivers/net/wan/hostess_sv11.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +3 -3
#   MODULE_PARM conversions
# 
# drivers/net/wan/farsync.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +6 -5
#   MODULE_PARM conversions
# 
# drivers/net/wan/dscc4.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# drivers/net/wan/cycx_main.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/net/wan/cosa.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +3 -3
#   MODULE_PARM conversions
# 
# drivers/net/tulip/winbond-840.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +6 -6
#   MODULE_PARM conversions
# 
# drivers/net/tulip/tulip_core.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +6 -6
#   MODULE_PARM conversions
# 
# drivers/net/tulip/dmfe.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +9 -9
#   MODULE_PARM conversions
# 
# drivers/net/tulip/de2104x.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# drivers/net/tokenring/olympic.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +4 -4
#   MODULE_PARM conversions
# 
# drivers/net/tokenring/lanstreamer.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +3 -4
#   MODULE_PARM conversions
# 
# drivers/net/tokenring/3c359.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +3 -3
#   MODULE_PARM conversions
# 
# drivers/net/tlan.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +0 -10
#   MODULE_PARM conversions
# 
# drivers/net/sunhme.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/net/sundance.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +4 -4
#   MODULE_PARM conversions
# 
# drivers/net/starfire.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +9 -9
#   MODULE_PARM conversions
# 
# drivers/net/smc-mca.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# drivers/net/ppp_async.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/net/plip.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# drivers/net/pcmcia/xirc2ps_cs.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +3 -3
#   MODULE_PARM conversions
# 
# drivers/net/pcmcia/smc91c92_cs.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# drivers/net/pcmcia/pcnet_cs.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +4 -4
#   MODULE_PARM conversions
# 
# drivers/net/pcmcia/nmclan_cs.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# drivers/net/pcmcia/fmvj18x_cs.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# drivers/net/pcmcia/com20020_cs.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +8 -8
#   MODULE_PARM conversions
# 
# drivers/net/pcmcia/axnet_cs.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# drivers/net/pcmcia/3c589_cs.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# drivers/net/pcmcia/3c574_cs.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# drivers/net/ne2k-pci.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +3 -3
#   MODULE_PARM conversions
# 
# drivers/net/natsemi.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +6 -6
#   MODULE_PARM conversions
# 
# drivers/net/lp486e.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +7 -7
#   MODULE_PARM conversions
# 
# drivers/net/ixgb/ixgb_param.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# drivers/net/irda/w83977af_ir.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +3 -3
#   MODULE_PARM conversions
# 
# drivers/net/irda/vlsi_ir.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +8 -8
#   MODULE_PARM conversions
# 
# drivers/net/irda/via-ircc.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/net/irda/tekram-sir.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# drivers/net/irda/smsc-ircc2.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +6 -6
#   MODULE_PARM conversions
# 
# drivers/net/irda/nsc-ircc.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +5 -5
#   MODULE_PARM conversions
# 
# drivers/net/irda/irtty-sir.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +3 -3
#   MODULE_PARM conversions
# 
# drivers/net/irda/donauboe.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# drivers/net/irda/ali-ircc.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +3 -3
#   MODULE_PARM conversions
# 
# drivers/net/hp100.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +4 -4
#   MODULE_PARM conversions
# 
# drivers/net/hamradio/baycom_ser_hdx.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +3 -3
#   MODULE_PARM conversions
# 
# drivers/net/hamradio/baycom_ser_fdx.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +4 -4
#   MODULE_PARM conversions
# 
# drivers/net/hamradio/baycom_par.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# drivers/net/hamradio/baycom_epp.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# drivers/net/hamachi.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +15 -15
#   MODULE_PARM conversions
# 
# drivers/net/fealnx.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +6 -6
#   MODULE_PARM conversions
# 
# drivers/net/epic100.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +4 -4
#   MODULE_PARM conversions
# 
# drivers/net/eepro100.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +12 -12
#   MODULE_PARM conversions
# 
# drivers/net/dl2k.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +10 -10
#   MODULE_PARM conversions
# 
# drivers/net/dgrs.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +8 -8
#   MODULE_PARM conversions
# 
# drivers/net/de620.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +6 -6
#   MODULE_PARM conversions
# 
# drivers/net/de600.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +3 -3
#   MODULE_PARM conversions
# 
# drivers/net/bonding/bond_main.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +10 -10
#   MODULE_PARM conversions
# 
# drivers/net/atp.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +5 -5
#   MODULE_PARM conversions
# 
# drivers/net/arcnet/arcnet.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/net/appletalk/ipddp.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/net/amd8111e.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +3 -3
#   MODULE_PARM conversions
# 
# drivers/net/82596.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +4 -4
#   MODULE_PARM conversions
# 
# drivers/net/3c59x.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +31 -30
#   MODULE_PARM conversions
# 
# drivers/net/3c515.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +10 -9
#   MODULE_PARM conversions
# 
# drivers/net/3c509.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +5 -5
#   MODULE_PARM conversions
# 
# drivers/mtd/maps/scx200_docflash.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +9 -9
#   MODULE_PARM conversions
# 
# drivers/mtd/ftl.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/mtd/devices/slram.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +3 -3
#   MODULE_PARM conversions
# 
# drivers/mtd/devices/pmc551.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +5 -4
#   MODULE_PARM conversions
# 
# drivers/mtd/devices/docprobe.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/mtd/devices/blkmtd.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +4 -4
#   MODULE_PARM conversions
# 
# drivers/media/video/zr36060.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# drivers/media/video/zr36050.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/media/video/zr36016.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/media/video/zoran_driver.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/media/video/zoran_device.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/media/video/zoran_card.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +13 -13
#   MODULE_PARM conversions
# 
# drivers/media/video/w9966.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +3 -3
#   MODULE_PARM conversions
# 
# drivers/media/video/vpx3220.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/media/video/videocodec.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/media/video/tuner-3036.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/media/video/stradis.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/media/video/saa7185.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/media/video/saa7114.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/media/video/saa7110.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/media/video/pms.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +3 -3
#   MODULE_PARM conversions
# 
# drivers/media/video/hexium_orion.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/media/video/hexium_gemini.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/media/video/dpc7146.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/media/video/cpia.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/media/video/c-qcam.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +5 -4
#   MODULE_PARM conversions
# 
# drivers/media/video/bw-qcam.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +4 -4
#   MODULE_PARM conversions
# 
# drivers/media/video/bt856.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/media/video/bt819.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/media/video/adv7175.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/media/video/adv7170.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/media/radio/radio-zoltrix.c
#   2005/01/07 21:56:19-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# drivers/media/radio/radio-typhoon.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +6 -6
#   MODULE_PARM conversions
# 
# drivers/media/radio/radio-trust.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# drivers/media/radio/radio-terratec.c
#   2005/01/07 21:56:19-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# drivers/media/radio/radio-sf16fmr2.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# drivers/media/radio/radio-sf16fmi.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# drivers/media/radio/radio-rtrack2.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# drivers/media/radio/radio-maxiradio.c
#   2005/01/07 21:56:19-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/media/radio/radio-maestro.c
#   2005/01/07 21:56:19-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/media/radio/radio-gemtek.c
#   2005/01/07 21:56:19-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# drivers/media/radio/radio-gemtek-pci.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +3 -3
#   MODULE_PARM conversions
# 
# drivers/media/radio/radio-cadet.c
#   2005/01/07 21:56:19-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# drivers/media/radio/radio-aztech.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# drivers/media/radio/radio-aimslab.c
#   2005/01/07 21:56:19-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# drivers/media/radio/miropcm20-radio.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/isdn/tpam/tpam_main.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/isdn/sc/init.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +5 -4
#   MODULE_PARM conversions
# 
# drivers/isdn/pcbit/module.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +3 -2
#   MODULE_PARM conversions
# 
# drivers/isdn/icn/icn.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +4 -4
#   MODULE_PARM conversions
# 
# drivers/isdn/hisax/teles_cs.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +4 -4
#   MODULE_PARM conversions
# 
# drivers/isdn/hisax/st5481_init.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +3 -3
#   MODULE_PARM conversions
# 
# drivers/isdn/hisax/sedlbauer_cs.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +4 -4
#   MODULE_PARM conversions
# 
# drivers/isdn/hisax/hisax_isac.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/isdn/hisax/hisax_fcpcipnp.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +3 -3
#   MODULE_PARM conversions
# 
# drivers/isdn/hisax/elsa_cs.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +4 -4
#   MODULE_PARM conversions
# 
# drivers/isdn/hisax/avma1_cs.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +3 -3
#   MODULE_PARM conversions
# 
# drivers/isdn/hardware/eicon/divasmain.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/isdn/hardware/eicon/divamnt.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# drivers/isdn/act2000/module.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +4 -4
#   MODULE_PARM conversions
# 
# drivers/ide/legacy/ide-cs.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# drivers/char/toshiba.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/char/tipar.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# drivers/char/synclinkmp.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +5 -5
#   MODULE_PARM conversions
# 
# drivers/char/synclink.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +10 -10
#   MODULE_PARM conversions
# 
# drivers/char/scx200_gpio.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/char/pcmcia/synclink_cs.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +7 -7
#   MODULE_PARM conversions
# 
# drivers/char/n_hdlc.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# drivers/char/mwave/mwavedd.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +5 -5
#   MODULE_PARM conversions
# 
# drivers/char/applicom.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +5 -4
#   MODULE_PARM conversions
# 
# drivers/char/agp/sis-agp.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# drivers/char/agp/amd64-agp.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/cdrom/sonycd535.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/cdrom/sjcd.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/cdrom/optcd.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/cdrom/mcdx.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +8 -3
#   MODULE_PARM conversions
# 
# drivers/cdrom/mcd.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +8 -4
#   MODULE_PARM conversions
# 
# drivers/cdrom/isp16.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +4 -4
#   MODULE_PARM conversions
# 
# drivers/cdrom/gscd.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -2
#   MODULE_PARM conversions
# 
# drivers/cdrom/aztcd.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/block/paride/pt.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +7 -7
#   MODULE_PARM conversions
# 
# drivers/block/paride/pg.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +7 -7
#   MODULE_PARM conversions
# 
# drivers/block/paride/pf.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +9 -9
#   MODULE_PARM conversions
# 
# drivers/block/paride/pd.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +9 -9
#   MODULE_PARM conversions
# 
# drivers/block/paride/pcd.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +8 -8
#   MODULE_PARM conversions
# 
# drivers/block/paride/bpck6.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/block/nbd.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/block/cpqarray.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/acpi/asus_acpi.c
#   2005/01/07 21:44:25-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# ChangeSet
#   2005/01/08 14:21:13-08:00 akpm@osdl.org 
#   [PATCH] MODULE_PARM conversions
#   
#   Rusty Russell <rusty@rustcorp.com.au>
#   
#   MODULE_PARM conversions for x86 `allmodconfig'.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# sound/oss/ymfpci.c
#   2005/01/07 21:56:15-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# drivers/video/matrox/matroxfb_base.c
#   2005/01/07 21:44:22-08:00 akpm@osdl.org +37 -37
#   MODULE_PARM conversions
# 
# drivers/scsi/ibmmca.c
#   2005/01/07 21:44:22-08:00 akpm@osdl.org +6 -3
#   MODULE_PARM conversions
# 
# drivers/scsi/gdth.c
#   2005/01/07 21:44:22-08:00 akpm@osdl.org +12 -12
#   MODULE_PARM conversions
# 
# drivers/scsi/aha1542.c
#   2005/01/07 21:44:22-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# drivers/scsi/aha152x.c
#   2005/01/07 21:44:22-08:00 akpm@osdl.org +26 -26
#   MODULE_PARM conversions
# 
# drivers/net/wireless/wavelan.p.h
#   2005/01/07 21:44:21-08:00 akpm@osdl.org +5 -4
#   MODULE_PARM conversions
# 
# drivers/net/wireless/wavelan.c
#   2005/01/07 21:44:21-08:00 akpm@osdl.org +2 -1
#   MODULE_PARM conversions
# 
# drivers/net/wd.c
#   2005/01/07 21:44:22-08:00 akpm@osdl.org +4 -4
#   MODULE_PARM conversions
# 
# drivers/net/wan/sbni.c
#   2005/01/07 21:44:21-08:00 akpm@osdl.org +6 -8
#   MODULE_PARM conversions
# 
# drivers/net/tokenring/smctr.c
#   2005/01/07 21:44:21-08:00 akpm@osdl.org +3 -3
#   MODULE_PARM conversions
# 
# drivers/net/tokenring/skisa.c
#   2005/01/07 21:44:21-08:00 akpm@osdl.org +3 -3
#   MODULE_PARM conversions
# 
# drivers/net/tokenring/proteon.c
#   2005/01/07 21:44:21-08:00 akpm@osdl.org +3 -3
#   MODULE_PARM conversions
# 
# drivers/net/tokenring/ibmtr.c
#   2005/01/07 21:44:21-08:00 akpm@osdl.org +3 -3
#   MODULE_PARM conversions
# 
# drivers/net/smc9194.c
#   2005/01/07 21:44:22-08:00 akpm@osdl.org +3 -3
#   MODULE_PARM conversions
# 
# drivers/net/smc-ultra.c
#   2005/01/07 21:44:22-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# drivers/net/shaper.c
#   2005/01/07 21:44:22-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/net/seeq8005.c
#   2005/01/07 21:44:22-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# drivers/net/pcmcia/ibmtr_cs.c
#   2005/01/07 21:44:21-08:00 akpm@osdl.org +7 -7
#   MODULE_PARM conversions
# 
# drivers/net/ni65.c
#   2005/01/07 21:44:22-08:00 akpm@osdl.org +3 -3
#   MODULE_PARM conversions
# 
# drivers/net/ni52.c
#   2005/01/07 21:44:22-08:00 akpm@osdl.org +4 -4
#   MODULE_PARM conversions
# 
# drivers/net/ne2.c
#   2005/01/07 21:44:22-08:00 akpm@osdl.org +3 -3
#   MODULE_PARM conversions
# 
# drivers/net/ne.c
#   2005/01/07 21:44:22-08:00 akpm@osdl.org +3 -3
#   MODULE_PARM conversions
# 
# drivers/net/lne390.c
#   2005/01/07 21:44:22-08:00 akpm@osdl.org +3 -3
#   MODULE_PARM conversions
# 
# drivers/net/lance.c
#   2005/01/07 21:44:22-08:00 akpm@osdl.org +4 -4
#   MODULE_PARM conversions
# 
# drivers/net/ibmlana.c
#   2005/01/07 21:44:22-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# drivers/net/hp.c
#   2005/01/07 21:44:22-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# drivers/net/hp-plus.c
#   2005/01/07 21:44:22-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# drivers/net/ewrk3.c
#   2005/01/07 21:44:22-08:00 akpm@osdl.org +2 -3
#   MODULE_PARM conversions
# 
# drivers/net/eth16i.c
#   2005/01/07 21:44:22-08:00 akpm@osdl.org +4 -4
#   MODULE_PARM conversions
# 
# drivers/net/es3210.c
#   2005/01/07 21:44:22-08:00 akpm@osdl.org +3 -3
#   MODULE_PARM conversions
# 
# drivers/net/eexpress.c
#   2005/01/07 21:44:22-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# drivers/net/e2100.c
#   2005/01/07 21:44:22-08:00 akpm@osdl.org +4 -4
#   MODULE_PARM conversions
# 
# drivers/net/cs89x0.c
#   2005/01/07 21:44:22-08:00 akpm@osdl.org +8 -8
#   MODULE_PARM conversions
# 
# drivers/net/at1700.c
#   2005/01/07 21:44:22-08:00 akpm@osdl.org +3 -3
#   MODULE_PARM conversions
# 
# drivers/net/appletalk/ltpc.c
#   2005/01/07 21:44:21-08:00 akpm@osdl.org +4 -4
#   MODULE_PARM conversions
# 
# drivers/net/appletalk/cops.c
#   2005/01/07 21:44:21-08:00 akpm@osdl.org +3 -3
#   MODULE_PARM conversions
# 
# drivers/net/ac3200.c
#   2005/01/07 21:44:22-08:00 akpm@osdl.org +3 -3
#   MODULE_PARM conversions
# 
# drivers/net/3c523.c
#   2005/01/07 21:44:22-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# drivers/net/3c507.c
#   2005/01/07 21:44:22-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# drivers/net/3c505.c
#   2005/01/07 21:44:22-08:00 akpm@osdl.org +3 -3
#   MODULE_PARM conversions
# 
# drivers/net/3c503.c
#   2005/01/07 21:44:22-08:00 akpm@osdl.org +3 -3
#   MODULE_PARM conversions
# 
# drivers/net/3c501.c
#   2005/01/07 21:44:22-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# drivers/mtd/devices/mtdram.c
#   2005/01/07 21:44:21-08:00 akpm@osdl.org +2 -2
#   MODULE_PARM conversions
# 
# drivers/media/video/cpia_pp.c
#   2005/01/07 21:44:21-08:00 akpm@osdl.org +1 -1
#   MODULE_PARM conversions
# 
# drivers/isdn/hisax/config.c
#   2005/01/07 21:44:21-08:00 akpm@osdl.org +8 -10
#   MODULE_PARM conversions
# 
# drivers/block/xd.c
#   2005/01/07 21:44:21-08:00 akpm@osdl.org +3 -3
#   MODULE_PARM conversions
# 
# drivers/block/ps2esdi.c
#   2005/01/07 21:44:21-08:00 akpm@osdl.org +4 -4
#   MODULE_PARM conversions
# 
# ChangeSet
#   2005/01/08 14:20:53-08:00 akpm@osdl.org 
#   [PATCH] remove early_param test code
#   
#   Remove some unused test code
#   
#   Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# init/main.c
#   2005/01/07 21:44:21-08:00 akpm@osdl.org +0 -13
#   remove early_param test code
# 
# ChangeSet
#   2005/01/08 14:20:35-08:00 bunk@stusta.de 
#   [PATCH] fs/coda/psdev.c shouldn't include lp.h
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/coda/psdev.c
#   2005/01/07 21:44:20-08:00 bunk@stusta.de +0 -1
#   fs/coda/psdev.c shouldn't include lp.h
# 
# ChangeSet
#   2005/01/08 14:20:20-08:00 bunk@stusta.de 
#   [PATCH] cdrom.c: make several functions static (fwd)
#   
#   The patch below makes several functions in cdrom.c static.
#   
#   This includes cdrom_is_mrw and cdrom_is_random_writable which were
#   EXPORT_SYMBOL'ed but weren't used anywhere outside of cdrom.h .
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/cdrom.h
#   2005/01/07 21:44:20-08:00 bunk@stusta.de +0 -2
#   cdrom.c: make several functions static (fwd)
# 
# drivers/cdrom/cdrom.c
#   2005/01/07 21:44:20-08:00 bunk@stusta.de +11 -13
#   cdrom.c: make several functions static (fwd)
# 
# ChangeSet
#   2005/01/08 14:20:02-08:00 bunk@stusta.de 
#   [PATCH] reiser3 cleanups
#   
#   The patch below contains some cleanups for reiser3.
#   It consists of:
#   - removal of unused code
#   - making needlessly global code static
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/reiserfs_fs_sb.h
#   2005/01/07 21:44:20-08:00 bunk@stusta.de +0 -1
#   reiser3 cleanups
# 
# include/linux/reiserfs_fs.h
#   2005/01/07 21:44:20-08:00 bunk@stusta.de +0 -32
#   reiser3 cleanups
# 
# include/linux/reiserfs_acl.h
#   2005/01/07 21:44:20-08:00 bunk@stusta.de +0 -2
#   reiser3 cleanups
# 
# fs/reiserfs/xattr_acl.c
#   2005/01/07 21:44:20-08:00 bunk@stusta.de +3 -1
#   reiser3 cleanups
# 
# fs/reiserfs/super.c
#   2005/01/07 21:44:20-08:00 bunk@stusta.de +7 -25
#   reiser3 cleanups
# 
# fs/reiserfs/stree.c
#   2005/01/07 21:44:20-08:00 bunk@stusta.de +9 -75
#   reiser3 cleanups
# 
# fs/reiserfs/prints.c
#   2005/01/07 21:44:20-08:00 bunk@stusta.de +2 -73
#   reiser3 cleanups
# 
# fs/reiserfs/journal.c
#   2005/01/07 21:44:20-08:00 bunk@stusta.de +6 -19
#   reiser3 cleanups
# 
# fs/reiserfs/item_ops.c
#   2005/01/07 21:44:20-08:00 bunk@stusta.de +5 -5
#   reiser3 cleanups
# 
# fs/reiserfs/ioctl.c
#   2005/01/07 21:44:20-08:00 bunk@stusta.de +3 -1
#   reiser3 cleanups
# 
# fs/reiserfs/inode.c
#   2005/01/07 21:44:20-08:00 bunk@stusta.de +5 -13
#   reiser3 cleanups
# 
# fs/reiserfs/ibalance.c
#   2005/01/07 21:44:20-08:00 bunk@stusta.de +2 -2
#   reiser3 cleanups
# 
# fs/reiserfs/fix_node.c
#   2005/01/07 21:44:20-08:00 bunk@stusta.de +1 -1
#   reiser3 cleanups
# 
# fs/reiserfs/file.c
#   2005/01/07 21:44:20-08:00 bunk@stusta.de +7 -7
#   reiser3 cleanups
# 
# fs/reiserfs/do_balan.c
#   2005/01/07 21:44:20-08:00 bunk@stusta.de +3 -3
#   reiser3 cleanups
# 
# fs/reiserfs/dir.c
#   2005/01/07 21:44:20-08:00 bunk@stusta.de +2 -2
#   reiser3 cleanups
# 
# fs/reiserfs/bitmap.c
#   2005/01/07 21:44:20-08:00 bunk@stusta.de +1 -1
#   reiser3 cleanups
# 
# ChangeSet
#   2005/01/08 14:19:45-08:00 bunk@stusta.de 
#   [PATCH] small ftape cleanups
#   
#   The patch below does cleanups under drivers/char/rio/ including the
#   following:
#   
#   - remove some completely unused code
#   - make some needlessly global code static
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/char/ftape/zftape/zftape_syms.c
#   2005/01/07 21:44:20-08:00 bunk@stusta.de +0 -1
#   small ftape cleanups
# 
# drivers/char/ftape/zftape/zftape-vtbl.h
#   2005/01/07 21:44:20-08:00 bunk@stusta.de +0 -1
#   small ftape cleanups
# 
# drivers/char/ftape/zftape/zftape-vtbl.c
#   2005/01/07 21:44:20-08:00 bunk@stusta.de +2 -2
#   small ftape cleanups
# 
# drivers/char/ftape/zftape/zftape-rw.h
#   2005/01/07 21:44:20-08:00 bunk@stusta.de +0 -1
#   small ftape cleanups
# 
# drivers/char/ftape/zftape/zftape-rw.c
#   2005/01/07 21:44:20-08:00 bunk@stusta.de +0 -1
#   small ftape cleanups
# 
# drivers/char/ftape/zftape/zftape-init.h
#   2005/01/07 21:44:20-08:00 bunk@stusta.de +0 -1
#   small ftape cleanups
# 
# drivers/char/ftape/zftape/zftape-init.c
#   2005/01/07 21:44:20-08:00 bunk@stusta.de +0 -13
#   small ftape cleanups
# 
# drivers/char/ftape/zftape/zftape-buffers.h
#   2005/01/07 21:44:20-08:00 bunk@stusta.de +0 -1
#   small ftape cleanups
# 
# drivers/char/ftape/zftape/zftape-buffers.c
#   2005/01/07 21:44:20-08:00 bunk@stusta.de +0 -7
#   small ftape cleanups
# 
# drivers/char/ftape/lowlevel/ftape-rw.h
#   2005/01/07 21:44:20-08:00 bunk@stusta.de +0 -1
#   small ftape cleanups
# 
# drivers/char/ftape/lowlevel/ftape-rw.c
#   2005/01/07 21:44:20-08:00 bunk@stusta.de +1 -1
#   small ftape cleanups
# 
# drivers/char/ftape/lowlevel/ftape-proc.c
#   2005/01/07 21:44:20-08:00 bunk@stusta.de +2 -2
#   small ftape cleanups
# 
# drivers/char/ftape/lowlevel/ftape-io.h
#   2005/01/07 21:44:20-08:00 bunk@stusta.de +0 -4
#   small ftape cleanups
# 
# drivers/char/ftape/lowlevel/ftape-io.c
#   2005/01/07 21:44:20-08:00 bunk@stusta.de +2 -22
#   small ftape cleanups
# 
# drivers/char/ftape/lowlevel/ftape-init.c
#   2005/01/07 21:44:20-08:00 bunk@stusta.de +0 -6
#   small ftape cleanups
# 
# drivers/char/ftape/lowlevel/ftape-ctl.h
#   2005/01/07 21:44:20-08:00 bunk@stusta.de +0 -1
#   small ftape cleanups
# 
# drivers/char/ftape/lowlevel/ftape-ctl.c
#   2005/01/07 21:44:20-08:00 bunk@stusta.de +5 -10
#   small ftape cleanups
# 
# drivers/char/ftape/lowlevel/ftape-bsm.h
#   2005/01/07 21:44:20-08:00 bunk@stusta.de +0 -1
#   small ftape cleanups
# 
# drivers/char/ftape/lowlevel/ftape-bsm.c
#   2005/01/07 21:44:20-08:00 bunk@stusta.de +7 -1
#   small ftape cleanups
# 
# drivers/char/ftape/lowlevel/fdc-io.h
#   2005/01/07 21:44:20-08:00 bunk@stusta.de +0 -5
#   small ftape cleanups
# 
# drivers/char/ftape/lowlevel/fdc-io.c
#   2005/01/07 21:44:20-08:00 bunk@stusta.de +10 -57
#   small ftape cleanups
# 
# drivers/char/ftape/lowlevel/fc-10.c
#   2005/01/07 21:44:20-08:00 bunk@stusta.de +2 -2
#   small ftape cleanups
# 
# drivers/char/ftape/compressor/zftape-compress.c
#   2005/01/07 21:44:20-08:00 bunk@stusta.de +0 -4
#   small ftape cleanups
# 
# ChangeSet
#   2005/01/08 14:19:26-08:00 kraxel@bytesex.org 
#   [PATCH] drivers/media/video: the easy cleanups
#   
#   This patch only makes code that is neither mentioned in a header file nor
#   declared extern in another file static.
#   
#   Additionally, it does remove the unused function stradis_driver from stradis.c
#   (or what should the comment mean?).
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Gerd Knorr <kraxel@bytesex.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/media/video/tuner-3036.c
#   2005/01/07 21:56:23-08:00 kraxel@bytesex.org +2 -2
#   drivers/media/video: the easy cleanups
# 
# drivers/media/video/stradis.c
#   2005/01/07 21:56:23-08:00 kraxel@bytesex.org +0 -7
#   drivers/media/video: the easy cleanups
# 
# drivers/media/video/saa7134/saa7134-video.c
#   2005/01/07 21:44:20-08:00 kraxel@bytesex.org +7 -7
#   drivers/media/video: the easy cleanups
# 
# drivers/media/video/saa7134/saa7134-core.c
#   2005/01/07 21:44:20-08:00 kraxel@bytesex.org +1 -1
#   drivers/media/video: the easy cleanups
# 
# drivers/media/video/pms.c
#   2005/01/07 21:56:23-08:00 kraxel@bytesex.org +1 -1
#   drivers/media/video: the easy cleanups
# 
# drivers/media/video/mxb.h
#   2005/01/07 21:44:20-08:00 kraxel@bytesex.org +1 -1
#   drivers/media/video: the easy cleanups
# 
# drivers/media/video/mxb.c
#   2005/01/07 21:44:20-08:00 kraxel@bytesex.org +2 -2
#   drivers/media/video: the easy cleanups
# 
# drivers/media/video/hexium_orion.c
#   2005/01/07 21:56:23-08:00 kraxel@bytesex.org +2 -2
#   drivers/media/video: the easy cleanups
# 
# drivers/media/video/dpc7146.c
#   2005/01/07 21:56:23-08:00 kraxel@bytesex.org +3 -4
#   drivers/media/video: the easy cleanups
# 
# drivers/media/video/c-qcam.c
#   2005/01/07 21:56:23-08:00 kraxel@bytesex.org +2 -2
#   drivers/media/video: the easy cleanups
# 
# drivers/media/video/bw-qcam.c
#   2005/01/07 21:56:23-08:00 kraxel@bytesex.org +4 -4
#   drivers/media/video: the easy cleanups
# 
# drivers/media/video/bttv-i2c.c
#   2005/01/07 21:44:19-08:00 kraxel@bytesex.org +1 -1
#   drivers/media/video: the easy cleanups
# 
# drivers/media/video/bttv-driver.c
#   2005/01/07 21:56:11-08:00 kraxel@bytesex.org +3 -3
#   drivers/media/video: the easy cleanups
# 
# drivers/media/video/bttv-cards.c
#   2005/01/07 21:44:19-08:00 kraxel@bytesex.org +10 -10
#   drivers/media/video: the easy cleanups
# 
# drivers/media/video/bt819.c
#   2005/01/07 21:56:23-08:00 kraxel@bytesex.org +1 -1
#   drivers/media/video: the easy cleanups
# 
# ChangeSet
#   2005/01/08 14:19:09-08:00 kraxel@bytesex.org 
#   [PATCH] zoran_device.c: make zr36057_init_vfe static
#   
#   The patch below makes function zr36057_init_vfe in
#   drivers/media/video/zoran_device.c which has no external users static.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Gerd Knorr <kraxel@bytesex.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/media/video/zoran_device.h
#   2005/01/07 21:44:19-08:00 kraxel@bytesex.org +0 -1
#   zoran_device.c: make zr36057_init_vfe static
# 
# drivers/media/video/zoran_device.c
#   2005/01/07 21:56:23-08:00 kraxel@bytesex.org +4 -1
#   zoran_device.c: make zr36057_init_vfe static
# 
# ChangeSet
#   2005/01/08 14:18:51-08:00 kraxel@bytesex.org 
#   [PATCH] media/video/msp3400.c: remove unused struct d1
#   
#   This struct is simply unused.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Gerd Knorr <kraxel@bytesex.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/media/video/msp3400.c
#   2005/01/07 21:44:19-08:00 kraxel@bytesex.org +0 -8
#   media/video/msp3400.c: remove unused struct d1
# 
# ChangeSet
#   2005/01/08 14:18:35-08:00 kraxel@bytesex.org 
#   [PATCH] zoran_driver.c: make zoran_num_formats static
#   
#   zoran_num_formats was referenced from two other files as extern, but was used
#   in none of them.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Gerd Knorr <kraxel@bytesex.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/media/video/zoran_driver.c
#   2005/01/07 21:56:23-08:00 kraxel@bytesex.org +1 -1
#   zoran_driver.c: make zoran_num_formats static
# 
# drivers/media/video/zoran_device.c
#   2005/01/07 21:56:28-08:00 kraxel@bytesex.org +0 -1
#   zoran_driver.c: make zoran_num_formats static
# 
# drivers/media/video/zoran_card.c
#   2005/01/07 21:56:23-08:00 kraxel@bytesex.org +0 -1
#   zoran_driver.c: make zoran_num_formats static
# 
# ChangeSet
#   2005/01/08 14:18:18-08:00 olsimar@wanadoo.fr 
#   [PATCH] bttv help fix
#   
#   I found one mistake in the help of bttv in 2.6.10-rc2-bk4 :
#   
#   "I2C bit-banging interfaces" in the character device section.
#   
#   or it's in the device drivers section since 2.6.X.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/media/video/Kconfig
#   2005/01/07 21:44:19-08:00 olsimar@wanadoo.fr +1 -1
#   bttv help fix
# 
# ChangeSet
#   2005/01/08 14:18:01-08:00 kraxel@bytesex.org 
#   [PATCH] bttv-risc.c: make some functions static
#   
#   The patch below makes some functions in drivers/media/video/bttv-risc.c that
#   currently have no other in-kernel users static.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Gerd Knorr <kraxel@bytesex.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/media/video/bttvp.h
#   2005/01/07 21:56:11-08:00 kraxel@bytesex.org +0 -16
#   bttv-risc.c: make some functions static
# 
# drivers/media/video/bttv-risc.c
#   2005/01/07 21:44:18-08:00 kraxel@bytesex.org +4 -4
#   bttv-risc.c: make some functions static
# 
# ChangeSet
#   2005/01/08 14:17:44-08:00 kraxel@bytesex.org 
#   [PATCH] bttv-i2c.c: make two functions static
#   
#   The patch below makes two functions in drivers/media/video/bttv-i2c.c without
#   external users static.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Gerd Knorr <kraxel@bytesex.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/media/video/bttv.h
#   2005/01/07 21:44:18-08:00 kraxel@bytesex.org +0 -2
#   bttv-i2c.c: make two functions static
# 
# drivers/media/video/bttv-i2c.c
#   2005/01/07 21:56:28-08:00 kraxel@bytesex.org +2 -2
#   bttv-i2c.c: make two functions static
# 
# ChangeSet
#   2005/01/08 14:17:23-08:00 blaisorblade_spam@yahoo.it 
#   [PATCH] ext3: use generic_open_file to fix possible preemption bugs
#   
#   Ext3 is currently using a duplicate version of generic_open_file, and this
#   should be fixed, before it gets out of sync.
#   
#   In fact, it *has* got out of sync.
#   
#   Apart some cosmetic changes (which are not a problem), note that it
#   directly reads inode->i_size, while the generic version uses i_size_read().
#   
#   I'm not sure if this bug can actually be triggered, but here follows a
#   possible scenario: when
#   
#   - a file is brought into inode cache
#   - that file is either truncated or extended (i.e.  inode->i_size is changed)
#     and after this it changes it's "more than 2Gb" property,
#   - and process B opens that file in the meanwhile,
#   
#   I suppose the size check can be hurted by a race condition, doesn't it?
#   
#   Similar checks should probably be done for other FS's. Also, ext2 does not
#   have this problem - someone fixed this problem in ext2 but not ext3? How?
#   
#   Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/ext3/file.c
#   2005/01/07 21:44:18-08:00 blaisorblade_spam@yahoo.it +1 -15
#   ext3: use generic_open_file to fix possible preemption bugs
# 
# ChangeSet
#   2005/01/08 14:17:06-08:00 linville@tuxdriver.com 
#   [PATCH] oss: AC97 quirk facility
#   
#   Add a quirk facility for AC97 in OSS, and add a quirk list for the
#   i810_audio driver.
#   
#   This allows automatically "correct" behaviour for sound hardware w/ known
#   oddities.  For example, many cards have the headphone and line-out outputs
#   swapped or headphone outputs only.
#   
#   The code is stolen shamelessly from ALSA, FWIW...
#   
#   Signed-off-by: John W. Linville <linville@tuxdriver.com>
#   
#   From: William Lee Irwin III <wli@holomorphy.com>
#   
#   include/linux/ac97_codec.h:337: warning: `struct pci_dev' declared inside parameter list
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# sound/oss/i810_audio.c
#   2005/01/07 21:44:18-08:00 linville@tuxdriver.com +122 -0
#   oss: AC97 quirk facility
# 
# sound/oss/ac97_codec.c
#   2005/01/07 21:44:18-08:00 linville@tuxdriver.com +91 -0
#   oss: AC97 quirk facility
# 
# include/linux/ac97_codec.h
#   2005/01/07 21:44:18-08:00 linville@tuxdriver.com +22 -0
#   oss: AC97 quirk facility
# 
# ChangeSet
#   2005/01/08 14:16:49-08:00 bunk@stusta.de 
#   [PATCH] char/cyclades.c: remove unused code
#   
#   The patch below removes unused code from drivers/char/cyclades.c
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/char/cyclades.c
#   2005/01/07 21:44:18-08:00 bunk@stusta.de +0 -21
#   char/cyclades.c: remove unused code
# 
# ChangeSet
#   2005/01/08 14:16:32-08:00 bunk@stusta.de 
#   [PATCH] telephony/ixj.c cleanup
#   
#   - remove ixj_register and ixj_unregister. these were EXPORT_SYMBOL'ed static
#     (sic) functions it seems the only reason why this "worked" was that there
#     were exactly zero users of them...
#   
#   - remove four local variables that are after this removal no longer
#     required
#   
#   - make five functions that were needlessly global static
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/telephony/ixj.c
#   2005/01/07 21:56:23-08:00 bunk@stusta.de +5 -100
#   telephony/ixj.c cleanup
# 
# ChangeSet
#   2005/01/08 14:16:10-08:00 bunk@stusta.de 
#   [PATCH] DEBUG_BUGVERBOSE for i386
#   
#   The patch below implements CONFIG_DEBUG_BUGVERBOSE for i386 (more exactly, it
#   allows disabling the verbose BUG() reporting).
#   
#   Also, require CONFIG_EMBEDDED for this option: we don't want to make it easy
#   for people to disable useful debug info.
#   
#   (With lots of help from Roman Zippel <zippel@linux-m68k.org>)
#   
#   Signed-off-by: Adrian Bunk <bunk@fs.tum.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# lib/Kconfig.debug
#   2005/01/07 21:44:17-08:00 bunk@stusta.de +3 -2
#   DEBUG_BUGVERBOSE for i386
# 
# include/asm-i386/bug.h
#   2005/01/07 21:44:17-08:00 bunk@stusta.de +1 -1
#   DEBUG_BUGVERBOSE for i386
# 
# ChangeSet
#   2005/01/08 14:15:53-08:00 bunk@stusta.de 
#   [PATCH] small char/generic_serial.c cleanup
#   
#   The patch below does the following changes to
#   drivers/char/generic_serial.c :
#   - make two needlessly global functions static
#   - remove the completely unused EXPORT_SYMBOL'ed function gs_do_softint
#   
#   AFAIR the latter should be safe, since drivers are moving away from
#   generic_serial.c.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/generic_serial.h
#   2005/01/07 21:44:17-08:00 bunk@stusta.de +0 -1
#   small char/generic_serial.c cleanup
# 
# drivers/char/generic_serial.c
#   2005/01/07 21:44:17-08:00 bunk@stusta.de +2 -24
#   small char/generic_serial.c cleanup
# 
# ChangeSet
#   2005/01/08 14:15:36-08:00 bunk@stusta.de 
#   [PATCH] small drivers/char/rio/ cleanups
#   
#   The patch below does cleanups under drivers/char/rio/ including the
#   following:
#   
#   - remove some completely unused code
#   - make some needlessly global code static
#   - remove #ifndef linux code
#   - remove never enabled #ifdef XPRINT_SUPPORT code
#   - RIOStrlen -> string.h strlen
#   - RIOStrCmp -> string.h strcmp
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/char/rio/riotty.c
#   2005/01/07 21:44:16-08:00 bunk@stusta.de +11 -6
#   small drivers/char/rio/ cleanups
# 
# drivers/char/rio/riotable.c
#   2005/01/07 21:44:16-08:00 bunk@stusta.de +3 -16
#   small drivers/char/rio/ cleanups
# 
# drivers/char/rio/rioroute.c
#   2005/01/07 21:44:16-08:00 bunk@stusta.de +12 -6
#   small drivers/char/rio/ cleanups
# 
# drivers/char/rio/riointr.c
#   2005/01/07 21:44:16-08:00 bunk@stusta.de +3 -163
#   small drivers/char/rio/ cleanups
# 
# drivers/char/rio/rioinit.c
#   2005/01/07 21:44:16-08:00 bunk@stusta.de +15 -42
#   small drivers/char/rio/ cleanups
# 
# drivers/char/rio/rioctrl.c
#   2005/01/07 21:44:16-08:00 bunk@stusta.de +1 -32
#   small drivers/char/rio/ cleanups
# 
# drivers/char/rio/riocmd.c
#   2005/01/07 21:44:16-08:00 bunk@stusta.de +1 -57
#   small drivers/char/rio/ cleanups
# 
# drivers/char/rio/rioboot.c
#   2005/01/07 21:44:16-08:00 bunk@stusta.de +3 -1
#   small drivers/char/rio/ cleanups
# 
# drivers/char/rio/rio_linux.c
#   2005/01/07 21:44:16-08:00 bunk@stusta.de +8 -18
#   small drivers/char/rio/ cleanups
# 
# drivers/char/rio/func.h
#   2005/01/07 21:44:16-08:00 bunk@stusta.de +0 -21
#   small drivers/char/rio/ cleanups
# 
# ChangeSet
#   2005/01/08 14:15:18-08:00 jdittmer@ppp0.net 
#   [PATCH] btaudio module_param conversion
#   
#   btaudio module_param conversion
#   
#   Signed-off-by: Jan Dittmer <jdittmer@ppp0.net>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# sound/oss/btaudio.c
#   2005/01/07 21:44:16-08:00 jdittmer@ppp0.net +9 -9
#   btaudio module_param conversion
# 
# ChangeSet
#   2005/01/08 14:15:01-08:00 jdittmer@ppp0.net 
#   [PATCH] media/video module_param conversion
#   
#   Convert module_param in tda7432 and tda9875.  I hope I got the file
#   permissions right.
#   
#   Signed-off-by: Jan Dittmer <jdittmer@ppp0.net>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/media/video/tda9875.c
#   2005/01/07 21:44:16-08:00 jdittmer@ppp0.net +2 -2
#   media/video module_param conversion
# 
# drivers/media/video/tda7432.c
#   2005/01/07 21:44:16-08:00 jdittmer@ppp0.net +6 -6
#   media/video module_param conversion
# 
# ChangeSet
#   2005/01/08 14:14:44-08:00 jdittmer@ppp0.net 
#   [PATCH] sr module_param conversion
#   
#   module_param conversion for SCSI cdrom driver
#   
#   Signed-off-by: Jan Dittmer <jdittmer@ppp0.net>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/scsi/sr_ioctl.c
#   2005/01/07 21:44:16-08:00 jdittmer@ppp0.net +3 -0
#   sr module_param conversion
# 
# drivers/scsi/sr.c
#   2005/01/07 21:44:16-08:00 jdittmer@ppp0.net +0 -3
#   sr module_param conversion
# 
# ChangeSet
#   2005/01/08 14:14:27-08:00 jdittmer@ppp0.net 
#   [PATCH] isapnp module_param conversion
#   
#   module_param conversion for isapnp
#   
#   Signed-off-by: Jan Dittmer <jdittmer@ppp0.net>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/pnp/isapnp/core.c
#   2005/01/07 21:44:16-08:00 jdittmer@ppp0.net +4 -4
#   isapnp module_param conversion
# 
# ChangeSet
#   2005/01/08 14:14:10-08:00 jdittmer@sfhq.hn.org 
#   [PATCH] eth1394 MODULE_PARM conversion
#   
#   Convert MODULE_PARM to module_param
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/ieee1394/eth1394.c
#   2005/01/07 21:44:16-08:00 jdittmer@sfhq.hn.org +2 -2
#   eth1394 MODULE_PARM conversion
# 
# ChangeSet
#   2005/01/08 14:13:53-08:00 anton@samba.org 
#   [PATCH] update hugetlb documentation
#   
#   The hugetlb documentation includes two example programs however they need
#   some attention.  At the moment they are ia64 specific (they use MAP_FIXED
#   which will fail on other architectures), and they contain a number of
#   compiler warnings.
#   
#   Also update the documentation to include the ppc64 page sizes.
#   
#   Signed-off-by: Anton Blanchard <anton@samba.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# Documentation/vm/hugetlbpage.txt
#   2005/01/07 21:44:15-08:00 anton@samba.org +161 -99
#   update hugetlb documentation
# 
# ChangeSet
#   2005/01/08 14:13:36-08:00 james4765@verizon.net 
#   [PATCH] tipar: Code cleanup
#   
#   Correct the following issues:
#   
#   - Remove reference to 2.5 kernel code.
#   
#   - Switch some ints to unsigned ints.
#   
#   - Correct KERN_ constants in printk's, and move most to pr_debug &
#     pr_info Fix some >80 column lines and indenting.
#   
#   Compile tested.
#   
#   Signed-off-by: James Nelson <james4765@gmail.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/char/tipar.c
#   2005/01/07 21:56:23-08:00 james4765@verizon.net +22 -23
#   tipar: Code cleanup
# 
# ChangeSet
#   2005/01/08 14:13:20-08:00 james4765@verizon.net 
#   [PATCH] tipar: Document driver options
#   
#   Document kernel parameters for tipar driver.
#   
#   Signed-off-by: James Nelson <james4765@gmail.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# Documentation/kernel-parameters.txt
#   2005/01/07 21:44:15-08:00 james4765@verizon.net +6 -2
#   tipar: Document driver options
# 
# ChangeSet
#   2005/01/08 14:13:03-08:00 james4765@verizon.net 
#   [PATCH] cyclades: Put README.cycladeZ in Documentation/serial
#   
#   Put README.cycladesZ in Documentation/serial.
#   
#   Firmware is still needed, but the README file shouldn't be in drivers/char.
#   
#   Signed-off-by: James Nelson <james4765@gmail.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# Documentation/README.cycladesZ
#   2005/01/07 21:44:15-08:00 james4765@verizon.net +0 -0
#   cyclades: Put README.cycladeZ in Documentation/serial
# 
# ChangeSet
#   2005/01/08 14:12:34-08:00 james4765@verizon.net 
#   [PATCH] sh: Remove x86-specific help in Kconfig
#   
#   Remove x86-specific bus refernces in arch/sh/drivers/pci/Kconfig.
#   
#   Signed-off-by: James Nelson <james4765@gmail.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/sh/drivers/pci/Kconfig
#   2005/01/07 21:44:15-08:00 james4765@verizon.net +1 -2
#   sh: Remove x86-specific help in Kconfig
# 
# ChangeSet
#   2005/01/08 14:12:17-08:00 james4765@verizon.net 
#   [PATCH] cpqarray: Correct mailing list address in source code
#   
#   Correct mailing list address in cpqarray source code.
#   
#   Signed-off-by: James Nelson <james4765@gmail.com>
#   Acked-by: Mike Miller <mike.miller@hp.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/block/smart1,2.h
#   2005/01/07 21:44:15-08:00 james4765@verizon.net +1 -1
#   cpqarray: Correct mailing list address in source code
# 
# drivers/block/ida_ioctl.h
#   2005/01/07 21:44:15-08:00 james4765@verizon.net +1 -1
#   cpqarray: Correct mailing list address in source code
# 
# drivers/block/ida_cmd.h
#   2005/01/07 21:44:15-08:00 james4765@verizon.net +1 -1
#   cpqarray: Correct mailing list address in source code
# 
# drivers/block/cpqarray.h
#   2005/01/07 21:44:15-08:00 james4765@verizon.net +1 -1
#   cpqarray: Correct mailing list address in source code
# 
# drivers/block/cpqarray.c
#   2005/01/07 21:56:23-08:00 james4765@verizon.net +1 -1
#   cpqarray: Correct mailing list address in source code
# 
# ChangeSet
#   2005/01/08 14:11:59-08:00 james4765@verizon.net 
#   [PATCH] cciss: Correct mailing list address in source code
#   
#   Correct mailing list address in cciss source code.
#   
#   Signed-off-by: James Nelson <james4765@gmail.com>
#   Acked-by: Mike Miller <mike.miller@hp.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/block/cciss_scsi.h
#   2005/01/07 21:44:14-08:00 james4765@verizon.net +1 -1
#   cciss: Correct mailing list address in source code
# 
# drivers/block/cciss_scsi.c
#   2005/01/07 21:44:14-08:00 james4765@verizon.net +1 -1
#   cciss: Correct mailing list address in source code
# 
# drivers/block/cciss.c
#   2005/01/07 21:44:14-08:00 james4765@verizon.net +1 -1
#   cciss: Correct mailing list address in source code
# 
# ChangeSet
#   2005/01/08 14:11:42-08:00 james4765@verizon.net 
#   [PATCH] cciss: Documentation update
#   
#   Updates to cciss documentation.
#   
#   mkdev.cciss is no longer needed, since it is handled by the MAKEDEV program.
#   
#   Signed-off-by: James Nelson <james4765@gmail.com>
#   Acked-by: Mike Miller <mike.miller@hp.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# Documentation/cciss.txt
#   2005/01/07 21:44:14-08:00 james4765@verizon.net +13 -14
#   cciss: Documentation update
# 
# Documentation/00-INDEX
#   2005/01/07 21:44:14-08:00 james4765@verizon.net +0 -2
#   cciss: Documentation update
# 
# BitKeeper/deleted/.del-mkdev.cciss~5a4d5569a4e33fe1
#   2005/01/08 14:11:35-08:00 james4765@verizon.net +0 -0
#   Delete: Documentation/mkdev.cciss
# 
# ChangeSet
#   2005/01/08 14:11:25-08:00 pavel@ucw.cz 
#   [PATCH] docs: add sparse howto
#   
#   Installing / using sparse is not exactly trivial, this should make setting it
#   up easier.
#   
#   Adapted From: Linus Torvalds <torvalds@osdl.org>
#   Signed-off-by: Pavel Machek <pavel@suse.cz>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# Documentation/sparse.txt
#   2005/01/07 21:44:14-08:00 pavel@ucw.cz +72 -0
#   docs: add sparse howto
# 
# Documentation/sparse.txt
#   2005/01/07 21:44:14-08:00 pavel@ucw.cz +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/Documentation/sparse.txt
# 
# ChangeSet
#   2005/01/08 14:11:07-08:00 pavel@ucw.cz 
#   [PATCH] pm: remove outdated docs
#   
#   pm_access / pm_dev_idle was removed from recent kernels. This should
#   stop confusion.
#   
#   Signed-off-by: Pavel Machek <pavel@suse.cz>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# Documentation/pm.txt
#   2005/01/07 21:44:14-08:00 pavel@ucw.cz +0 -48
#   pm: remove outdated docs
# 
# ChangeSet
#   2005/01/08 14:10:50-08:00 james4765@gmail.com 
#   [PATCH] riscom8: Update staus and documentation of driver
#   
#   I could not locate the original author or any active support effort being
#   done.
#   
#   This is definitely an orphaned driver.
#   
#   Signed-off-by: James Nelson <james4765@gmail.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# MAINTAINERS
#   2005/01/07 21:44:14-08:00 james4765@gmail.com +1 -3
#   riscom8: Update staus and documentation of driver
# 
# Documentation/riscom8.txt
#   2005/01/07 21:44:14-08:00 james4765@gmail.com +11 -31
#   riscom8: Update staus and documentation of driver
# 
# ChangeSet
#   2005/01/08 14:10:33-08:00 james4765@gmail.com 
#   [PATCH] stallion: Update to Documentation/stallion.txt
#   
#   Some updating and removal of dead links in the text file.
#   
#   The 5.5 package is not carried on the sunsite.unc.edu or tsx-11.mit.edu FTP
#   servers, and the support@stallion.com address bounces.
#   
#   Signed-off-by: James Nelson <james4765@gmail.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# Documentation/stallion.txt
#   2005/01/07 21:44:14-08:00 james4765@gmail.com +33 -37
#   stallion: Update to Documentation/stallion.txt
# 
# ChangeSet
#   2005/01/08 14:10:17-08:00 james4765@gmail.com 
#   [PATCH] specialix: remove bouncing e-mail address
#   
#   Signed-off-by: James Nelson <james4765@gmail.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# MAINTAINERS
#   2005/01/07 21:56:34-08:00 james4765@gmail.com +0 -1
#   specialix: remove bouncing e-mail address
# 
# ChangeSet
#   2005/01/08 14:10:00-08:00 james4765@gmail.com 
#   [PATCH] moxa: Remove README.moxa from Documentation/00-INDEX
#   
#   Signed-off-by: James Nelson <james4765@gmail.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# Documentation/00-INDEX
#   2005/01/07 21:56:33-08:00 james4765@gmail.com +0 -2
#   moxa: Remove README.moxa from Documentation/00-INDEX
# 
# ChangeSet
#   2005/01/08 14:09:43-08:00 james4765@gmail.com 
#   [PATCH] moxa: Remove ancient changelog README.moxa
#   
#   The driver at Moxa's website is version 1.8.  There is no need for this file.
#   
#   Signed-off-by: James Nelson <james4765@gmail.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# BitKeeper/deleted/.del-README.moxa~389d90b5599720e2
#   2005/01/08 14:09:35-08:00 james4765@gmail.com +0 -0
#   Delete: Documentation/README.moxa
# 
# ChangeSet
#   2005/01/08 14:09:06-08:00 tglx@linutronix.de 
#   [PATCH] Lock initializer cleanup (Core)
#   
#   Kernel core files converted to use the new lock initializers.
#   
#   Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
#   Acked-by: Ingo Molnar <mingo@elte.hu>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# mm/vmalloc.c
#   2005/01/07 21:44:13-08:00 tglx@linutronix.de +1 -1
#   Lock initializer cleanup (Core)
# 
# mm/thrash.c
#   2005/01/07 21:44:13-08:00 tglx@linutronix.de +1 -1
#   Lock initializer cleanup (Core)
# 
# mm/swapfile.c
#   2005/01/07 21:44:13-08:00 tglx@linutronix.de +1 -1
#   Lock initializer cleanup (Core)
# 
# mm/shmem.c
#   2005/01/07 21:44:13-08:00 tglx@linutronix.de +1 -1
#   Lock initializer cleanup (Core)
# 
# mm/pdflush.c
#   2005/01/07 21:44:13-08:00 tglx@linutronix.de +1 -1
#   Lock initializer cleanup (Core)
# 
# mm/oom_kill.c
#   2005/01/07 21:44:13-08:00 tglx@linutronix.de +1 -1
#   Lock initializer cleanup (Core)
# 
# mm/nommu.c
#   2005/01/07 21:44:13-08:00 tglx@linutronix.de +1 -1
#   Lock initializer cleanup (Core)
# 
# mm/mlock.c
#   2005/01/07 21:44:13-08:00 tglx@linutronix.de +1 -1
#   Lock initializer cleanup (Core)
# 
# mm/hugetlb.c
#   2005/01/07 21:44:13-08:00 tglx@linutronix.de +1 -1
#   Lock initializer cleanup (Core)
# 
# mm/highmem.c
#   2005/01/07 21:44:13-08:00 tglx@linutronix.de +1 -1
#   Lock initializer cleanup (Core)
# 
# lib/kobject_uevent.c
#   2005/01/07 21:44:13-08:00 tglx@linutronix.de +1 -1
#   Lock initializer cleanup (Core)
# 
# kernel/workqueue.c
#   2005/01/07 21:44:13-08:00 tglx@linutronix.de +1 -1
#   Lock initializer cleanup (Core)
# 
# kernel/user.c
#   2005/01/07 21:44:13-08:00 tglx@linutronix.de +1 -1
#   Lock initializer cleanup (Core)
# 
# kernel/timer.c
#   2005/01/07 21:56:15-08:00 tglx@linutronix.de +1 -1
#   Lock initializer cleanup (Core)
# 
# kernel/sys.c
#   2005/01/07 21:44:13-08:00 tglx@linutronix.de +1 -1
#   Lock initializer cleanup (Core)
# 
# kernel/resource.c
#   2005/01/07 21:44:13-08:00 tglx@linutronix.de +1 -1
#   Lock initializer cleanup (Core)
# 
# kernel/profile.c
#   2005/01/07 21:44:13-08:00 tglx@linutronix.de +1 -1
#   Lock initializer cleanup (Core)
# 
# kernel/printk.c
#   2005/01/07 21:44:13-08:00 tglx@linutronix.de +2 -2
#   Lock initializer cleanup (Core)
# 
# kernel/posix-timers.c
#   2005/01/07 21:44:13-08:00 tglx@linutronix.de +1 -1
#   Lock initializer cleanup (Core)
# 
# kernel/pid.c
#   2005/01/07 21:44:13-08:00 tglx@linutronix.de +1 -1
#   Lock initializer cleanup (Core)
# 
# kernel/module.c
#   2005/01/07 21:44:13-08:00 tglx@linutronix.de +1 -1
#   Lock initializer cleanup (Core)
# 
# kernel/kprobes.c
#   2005/01/07 21:44:13-08:00 tglx@linutronix.de +1 -1
#   Lock initializer cleanup (Core)
# 
# kernel/intermodule.c
#   2005/01/07 21:44:13-08:00 tglx@linutronix.de +1 -1
#   Lock initializer cleanup (Core)
# 
# kernel/fork.c
#   2005/01/07 21:44:13-08:00 tglx@linutronix.de +2 -2
#   Lock initializer cleanup (Core)
# 
# kernel/exec_domain.c
#   2005/01/07 21:44:13-08:00 tglx@linutronix.de +1 -1
#   Lock initializer cleanup (Core)
# 
# kernel/dma.c
#   2005/01/07 21:44:13-08:00 tglx@linutronix.de +1 -1
#   Lock initializer cleanup (Core)
# 
# kernel/capability.c
#   2005/01/07 21:44:13-08:00 tglx@linutronix.de +1 -1
#   Lock initializer cleanup (Core)
# 
# kernel/audit.c
#   2005/01/07 21:44:13-08:00 tglx@linutronix.de +4 -4
#   Lock initializer cleanup (Core)
# 
# ChangeSet
#   2005/01/08 14:08:46-08:00 tglx@linutronix.de 
#   [PATCH] Lock initializer cleanup (character devices)
#   
#   Character devices converted to use the new lock initializers.
#   
#   Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
#   Acked-by: Ingo Molnar <mingo@elte.hu>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/char/viocons.c
#   2005/01/07 21:44:12-08:00 tglx@linutronix.de +2 -2
#   Lock initializer cleanup (character devices)
# 
# drivers/char/tty_io.c
#   2005/01/07 21:44:12-08:00 tglx@linutronix.de +2 -2
#   Lock initializer cleanup (character devices)
# 
# drivers/char/sysrq.c
#   2005/01/07 21:44:12-08:00 tglx@linutronix.de +1 -1
#   Lock initializer cleanup (character devices)
# 
# drivers/char/rtc.c
#   2005/01/07 21:44:12-08:00 tglx@linutronix.de +1 -1
#   Lock initializer cleanup (character devices)
# 
# drivers/char/random.c
#   2005/01/07 21:44:12-08:00 tglx@linutronix.de +1 -1
#   Lock initializer cleanup (character devices)
# 
# drivers/char/qtronix.c
#   2005/01/07 21:44:12-08:00 tglx@linutronix.de +1 -1
#   Lock initializer cleanup (character devices)
# 
# drivers/char/nvram.c
#   2005/01/07 21:44:12-08:00 tglx@linutronix.de +1 -1
#   Lock initializer cleanup (character devices)
# 
# drivers/char/mwave/3780i.c
#   2005/01/07 21:44:12-08:00 tglx@linutronix.de +1 -1
#   Lock initializer cleanup (character devices)
# 
# drivers/char/ipmi/ipmi_watchdog.c
#   2005/01/07 21:56:17-08:00 tglx@linutronix.de +1 -1
#   Lock initializer cleanup (character devices)
# 
# drivers/char/ipmi/ipmi_msghandler.c
#   2005/01/07 21:56:17-08:00 tglx@linutronix.de +1 -1
#   Lock initializer cleanup (character devices)
# 
# drivers/char/hw_random.c
#   2005/01/07 21:44:12-08:00 tglx@linutronix.de +1 -1
#   Lock initializer cleanup (character devices)
# 
# drivers/char/hvcs.c
#   2005/01/07 21:44:12-08:00 tglx@linutronix.de +2 -2
#   Lock initializer cleanup (character devices)
# 
# drivers/char/hvc_console.c
#   2005/01/07 21:44:12-08:00 tglx@linutronix.de +1 -1
#   Lock initializer cleanup (character devices)
# 
# drivers/char/hpet.c
#   2005/01/07 21:44:12-08:00 tglx@linutronix.de +2 -2
#   Lock initializer cleanup (character devices)
# 
# drivers/char/genrtc.c
#   2005/01/07 21:44:12-08:00 tglx@linutronix.de +1 -1
#   Lock initializer cleanup (character devices)
# 
# drivers/char/efirtc.c
#   2005/01/07 21:44:12-08:00 tglx@linutronix.de +1 -1
#   Lock initializer cleanup (character devices)
# 
# drivers/char/ec3104_keyb.c
#   2005/01/07 21:44:12-08:00 tglx@linutronix.de +1 -1
#   Lock initializer cleanup (character devices)
# 
# drivers/char/ds1286.c
#   2005/01/07 21:44:12-08:00 tglx@linutronix.de +1 -1
#   Lock initializer cleanup (character devices)
# 
# ChangeSet
#   2005/01/08 14:08:28-08:00 tglx@linutronix.de 
#   [PATCH] Lock initializer cleanup (common headers)
#   
#   First part of the patch series. Define initializer macros
#   
#   Often used structures in the kernel are almost all declared and
#   initialized by macros in the form:
#   
#   DEFINE_TYPE(name)
#   
#   Spinlocks and rwlocks are declared and initialized by:
#   type name = INITIALIZER;
#   
#   After converting the runtime initialization of spinlocks/rwlocks to
#   macro form it is consequent to change the declaration and initializion
#   of global and static locks to the macro form too. This conversion
#   identifies those variables as "special", common code controlled
#   entities similar to list_heads, mutexes... Besides consistency and code
#   clearness this also helps automatic lock validators and debugging code.
#   
#   The patch converts
#   -rwlock_t snd_card_rwlock = RW_LOCK_UNLOCKED;
#   +DEFINE_RWLOCK(snd_card_rwlock);
#   and
#   -static spinlock_t slave_active_lock = SPIN_LOCK_UNLOCKED;
#   +static DEFINE_SPINLOCK(slave_active_lock);
#   
#   There is no runtime overhead or actual code change resulting out of this
#   patch, other than a small reduction in the kernel source code size.
#   
#   The conversion was done with a script, it was verified manually and it
#   was reviewed, compiled and tested as far as possible on x86, ARM, PPC.
#   
#   Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
#   Acked-by: Ingo Molnar <mingo@elte.hu>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/spinlock.h
#   2005/01/07 21:44:12-08:00 tglx@linutronix.de +3 -0
#   Lock initializer cleanup (common headers)
# 
# ChangeSet
#   2005/01/08 14:08:11-08:00 tglx@linutronix.de 
#   [PATCH] Lock initializer unifying: sound
#   
#   To make spinlock/rwlock initialization consistent all over the kernel,
#   this patch converts explicit lock-initializers into spin_lock_init() and
#   rwlock_init() calls.
#   
#   Currently, spinlocks and rwlocks are initialized in two different ways:
#   
#     lock = SPIN_LOCK_UNLOCKED
#     spin_lock_init(&lock)
#   
#     rwlock = RW_LOCK_UNLOCKED
#     rwlock_init(&rwlock)
#   
#   this patch converts all explicit lock initializations to
#   spin_lock_init() or rwlock_init(). (Besides consistency this also helps
#   automatic lock validators and debugging code.)
#   
#   The conversion was done with a script, it was verified manually and it
#   was reviewed, compiled and tested as far as possible on x86, ARM, PPC.
#   
#   There is no runtime overhead or actual code change resulting out of this
#   patch, because spin_lock_init() and rwlock_init() are macros and are
#   thus equivalent to the explicit initialization method.
#   
#   That's the second batch of the unifying patches.
#   
#   Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
#   Acked-by: Ingo Molnar <mingo@elte.hu>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# sound/oss/vwsnd.c
#   2005/01/07 21:44:11-08:00 tglx@linutronix.de +3 -3
#   Lock initializer unifying: sound
# 
# sound/oss/sb_common.c
#   2005/01/07 21:56:11-08:00 tglx@linutronix.de +1 -1
#   Lock initializer unifying: sound
# 
# sound/oss/emu10k1/main.c
#   2005/01/07 21:56:11-08:00 tglx@linutronix.de +2 -2
#   Lock initializer unifying: sound
# 
# sound/oss/emu10k1/audio.c
#   2005/01/07 21:56:11-08:00 tglx@linutronix.de +2 -2
#   Lock initializer unifying: sound
# 
# ChangeSet
#   2005/01/08 14:07:54-08:00 tglx@linutronix.de 
#   [PATCH] Lock initializer unifying: Video
#   
#   To make spinlock/rwlock initialization consistent all over the kernel,
#   this patch converts explicit lock-initializers into spin_lock_init() and
#   rwlock_init() calls.
#   
#   Currently, spinlocks and rwlocks are initialized in two different ways:
#   
#     lock = SPIN_LOCK_UNLOCKED
#     spin_lock_init(&lock)
#   
#     rwlock = RW_LOCK_UNLOCKED
#     rwlock_init(&rwlock)
#   
#   this patch converts all explicit lock initializations to
#   spin_lock_init() or rwlock_init(). (Besides consistency this also helps
#   automatic lock validators and debugging code.)
#   
#   The conversion was done with a script, it was verified manually and it
#   was reviewed, compiled and tested as far as possible on x86, ARM, PPC.
#   
#   There is no runtime overhead or actual code change resulting out of this
#   patch, because spin_lock_init() and rwlock_init() are macros and are
#   thus equivalent to the explicit initialization method.
#   
#   That's the second batch of the unifying patches.
#   
#   Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
#   Acked-by: Ingo Molnar <mingo@elte.hu>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/video/console/sticore.c
#   2005/01/07 21:44:11-08:00 tglx@linutronix.de +1 -1
#   Lock initializer unifying: Video
# 
# ChangeSet
#   2005/01/08 14:07:37-08:00 tglx@linutronix.de 
#   [PATCH] Lock initializer unifying: Filesystems
#   
#   To make spinlock/rwlock initialization consistent all over the kernel,
#   this patch converts explicit lock-initializers into spin_lock_init() and
#   rwlock_init() calls.
#   
#   Currently, spinlocks and rwlocks are initialized in two different ways:
#   
#     lock = SPIN_LOCK_UNLOCKED
#     spin_lock_init(&lock)
#   
#     rwlock = RW_LOCK_UNLOCKED
#     rwlock_init(&rwlock)
#   
#   this patch converts all explicit lock initializations to
#   spin_lock_init() or rwlock_init(). (Besides consistency this also helps
#   automatic lock validators and debugging code.)
#   
#   The conversion was done with a script, it was verified manually and it
#   was reviewed, compiled and tested as far as possible on x86, ARM, PPC.
#   
#   There is no runtime overhead or actual code change resulting out of this
#   patch, because spin_lock_init() and rwlock_init() are macros and are
#   thus equivalent to the explicit initialization method.
#   
#   That's the second batch of the unifying patches.
#   
#   Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
#   Acked-by: Ingo Molnar <mingo@elte.hu>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/xfs/linux-2.6/xfs_vfs.c
#   2005/01/07 21:44:11-08:00 tglx@linutronix.de +1 -1
#   Lock initializer unifying: Filesystems
# 
# fs/reiserfs/super.c
#   2005/01/07 21:56:27-08:00 tglx@linutronix.de +1 -1
#   Lock initializer unifying: Filesystems
# 
# fs/file_table.c
#   2005/01/07 21:44:11-08:00 tglx@linutronix.de +1 -1
#   Lock initializer unifying: Filesystems
# 
# fs/dcache.c
#   2005/01/07 21:44:11-08:00 tglx@linutronix.de +1 -1
#   Lock initializer unifying: Filesystems
# 
# fs/cifs/misc.c
#   2005/01/07 21:44:11-08:00 tglx@linutronix.de +1 -1
#   Lock initializer unifying: Filesystems
# 
# fs/cifs/cifsfs.c
#   2005/01/07 21:44:11-08:00 tglx@linutronix.de +2 -2
#   Lock initializer unifying: Filesystems
# 
# ChangeSet
#   2005/01/08 14:07:19-08:00 tglx@linutronix.de 
#   [PATCH] Lock initializer unifying: drivers/serial
#   
#   To make spinlock/rwlock initialization consistent all over the kernel,
#   this patch converts explicit lock-initializers into spin_lock_init() and
#   rwlock_init() calls.
#   
#   Currently, spinlocks and rwlocks are initialized in two different ways:
#   
#     lock = SPIN_LOCK_UNLOCKED
#     spin_lock_init(&lock)
#   
#     rwlock = RW_LOCK_UNLOCKED
#     rwlock_init(&rwlock)
#   
#   this patch converts all explicit lock initializations to
#   spin_lock_init() or rwlock_init(). (Besides consistency this also helps
#   automatic lock validators and debugging code.)
#   
#   The conversion was done with a script, it was verified manually and it
#   was reviewed, compiled and tested as far as possible on x86, ARM, PPC.
#   
#   There is no runtime overhead or actual code change resulting out of this
#   patch, because spin_lock_init() and rwlock_init() are macros and are
#   thus equivalent to the explicit initialization method.
#   
#   That's the second batch of the unifying patches.
#   
#   This patch removes also a double init in icom.c
#   
#   Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
#   Acked-by: Ingo Molnar <mingo@elte.hu>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/serial/sn_console.c
#   2005/01/07 21:44:10-08:00 tglx@linutronix.de +1 -1
#   Lock initializer unifying: drivers/serial
# 
# drivers/serial/mpc52xx_uart.c
#   2005/01/07 21:44:10-08:00 tglx@linutronix.de +2 -2
#   Lock initializer unifying: drivers/serial
# 
# drivers/serial/icom.c
#   2005/01/07 21:44:10-08:00 tglx@linutronix.de +0 -1
#   Lock initializer unifying: drivers/serial
# 
# ChangeSet
#   2005/01/08 14:07:02-08:00 tglx@linutronix.de 
#   [PATCH] Lock initializer unifying: media drivers
#   
#   To make spinlock/rwlock initialization consistent all over the kernel,
#   this patch converts explicit lock-initializers into spin_lock_init() and
#   rwlock_init() calls.
#   
#   Currently, spinlocks and rwlocks are initialized in two different ways:
#   
#     lock = SPIN_LOCK_UNLOCKED
#     spin_lock_init(&lock)
#   
#     rwlock = RW_LOCK_UNLOCKED
#     rwlock_init(&rwlock)
#   
#   this patch converts all explicit lock initializations to
#   spin_lock_init() or rwlock_init(). (Besides consistency this also helps
#   automatic lock validators and debugging code.)
#   
#   The conversion was done with a script, it was verified manually and it
#   was reviewed, compiled and tested as far as possible on x86, ARM, PPC.
#   
#   There is no runtime overhead or actual code change resulting out of this
#   patch, because spin_lock_init() and rwlock_init() are macros and are
#   thus equivalent to the explicit initialization method.
#   
#   That's the second batch of the unifying patches.
#   
#   Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
#   Acked-by: Ingo Molnar <mingo@elte.hu>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/media/video/zr36120.c
#   2005/01/07 21:44:10-08:00 tglx@linutronix.de +1 -1
#   Lock initializer unifying: media drivers
# 
# drivers/media/video/saa7134/saa7134-core.c
#   2005/01/07 21:56:28-08:00 tglx@linutronix.de +1 -1
#   Lock initializer unifying: media drivers
# 
# drivers/media/video/meye.c
#   2005/01/07 21:44:10-08:00 tglx@linutronix.de +2 -2
#   Lock initializer unifying: media drivers
# 
# drivers/media/video/cx88/cx88-video.c
#   2005/01/07 21:44:10-08:00 tglx@linutronix.de +1 -1
#   Lock initializer unifying: media drivers
# 
# drivers/media/video/cx88/cx88-mpeg.c
#   2005/01/07 21:44:10-08:00 tglx@linutronix.de +1 -1
#   Lock initializer unifying: media drivers
# 
# drivers/media/video/bttv-driver.c
#   2005/01/07 21:56:28-08:00 tglx@linutronix.de +2 -2
#   Lock initializer unifying: media drivers
# 
# drivers/media/dvb/ttusb-dec/ttusb_dec.c
#   2005/01/07 21:44:10-08:00 tglx@linutronix.de +2 -2
#   Lock initializer unifying: media drivers
# 
# drivers/media/dvb/b2c2/skystar2.c
#   2005/01/07 21:44:10-08:00 tglx@linutronix.de +1 -1
#   Lock initializer unifying: media drivers
# 
# drivers/media/common/saa7146_core.c
#   2005/01/07 21:44:10-08:00 tglx@linutronix.de +2 -2
#   Lock initializer unifying: media drivers
# 
# ChangeSet
#   2005/01/08 14:06:45-08:00 tglx@linutronix.de 
#   [PATCH] Lock initializer unifying: Raid
#   
#   To make spinlock/rwlock initialization consistent all over the kernel,
#   this patch converts explicit lock-initializers into spin_lock_init() and
#   rwlock_init() calls.
#   
#   Currently, spinlocks and rwlocks are initialized in two different ways:
#   
#     lock = SPIN_LOCK_UNLOCKED
#     spin_lock_init(&lock)
#   
#     rwlock = RW_LOCK_UNLOCKED
#     rwlock_init(&rwlock)
#   
#   this patch converts all explicit lock initializations to
#   spin_lock_init() or rwlock_init(). (Besides consistency this also helps
#   automatic lock validators and debugging code.)
#   
#   The conversion was done with a script, it was verified manually and it
#   was reviewed, compiled and tested as far as possible on x86, ARM, PPC.
#   
#   There is no runtime overhead or actual code change resulting out of this
#   patch, because spin_lock_init() and rwlock_init() are macros and are
#   thus equivalent to the explicit initialization method.
#   
#   That's the second batch of the unifying patches.
#   
#   Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
#   Acked-by: Ingo Molnar <mingo@elte.hu>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/md/raid6main.c
#   2005/01/07 21:44:10-08:00 tglx@linutronix.de +2 -2
#   Lock initializer unifying: Raid
# 
# drivers/md/raid5.c
#   2005/01/07 21:44:10-08:00 tglx@linutronix.de +2 -2
#   Lock initializer unifying: Raid
# 
# drivers/md/raid10.c
#   2005/01/07 21:44:10-08:00 tglx@linutronix.de +2 -2
#   Lock initializer unifying: Raid
# 
# drivers/md/raid1.c
#   2005/01/07 21:44:10-08:00 tglx@linutronix.de +2 -2
#   Lock initializer unifying: Raid
# 
# drivers/md/multipath.c
#   2005/01/07 21:44:10-08:00 tglx@linutronix.de +1 -1
#   Lock initializer unifying: Raid
# 
# drivers/md/kcopyd.c
#   2005/01/07 21:44:10-08:00 tglx@linutronix.de +1 -1
#   Lock initializer unifying: Raid
# 
# ChangeSet
#   2005/01/08 14:06:27-08:00 tglx@linutronix.de 
#   [PATCH] Lock initializer unifying: ISDN
#   
#   To make spinlock/rwlock initialization consistent all over the kernel,
#   this patch converts explicit lock-initializers into spin_lock_init() and
#   rwlock_init() calls.
#   
#   Currently, spinlocks and rwlocks are initialized in two different ways:
#   
#     lock = SPIN_LOCK_UNLOCKED
#     spin_lock_init(&lock)
#   
#     rwlock = RW_LOCK_UNLOCKED
#     rwlock_init(&rwlock)
#   
#   this patch converts all explicit lock initializations to
#   spin_lock_init() or rwlock_init(). (Besides consistency this also helps
#   automatic lock validators and debugging code.)
#   
#   The conversion was done with a script, it was verified manually and it
#   was reviewed, compiled and tested as far as possible on x86, ARM, PPC.
#   
#   There is no runtime overhead or actual code change resulting out of this
#   patch, because spin_lock_init() and rwlock_init() are macros and are
#   thus equivalent to the explicit initialization method.
#   
#   That's the second batch of the unifying patches.
#   
#   Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
#   Acked-by: Ingo Molnar <mingo@elte.hu>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/isdn/tpam/tpam_main.c
#   2005/01/07 21:56:23-08:00 tglx@linutronix.de +1 -1
#   Lock initializer unifying: ISDN
# 
# ChangeSet
#   2005/01/08 14:06:10-08:00 tglx@linutronix.de 
#   [PATCH] Lock initializer unifying: Firewire
#   
#   To make spinlock/rwlock initialization consistent all over the kernel,
#   this patch converts explicit lock-initializers into spin_lock_init() and
#   rwlock_init() calls.
#   
#   Currently, spinlocks and rwlocks are initialized in two different ways:
#   
#     lock = SPIN_LOCK_UNLOCKED
#     spin_lock_init(&lock)
#   
#     rwlock = RW_LOCK_UNLOCKED
#     rwlock_init(&rwlock)
#   
#   this patch converts all explicit lock initializations to
#   spin_lock_init() or rwlock_init(). (Besides consistency this also helps
#   automatic lock validators and debugging code.)
#   
#   The conversion was done with a script, it was verified manually and it
#   was reviewed, compiled and tested as far as possible on x86, ARM, PPC.
#   
#   There is no runtime overhead or actual code change resulting out of this
#   patch, because spin_lock_init() and rwlock_init() are macros and are
#   thus equivalent to the explicit initialization method.
#   
#   That's the second batch of the unifying patches.
#   
#   Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
#   Acked-by: Ingo Molnar <mingo@elte.hu>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/ieee1394/sbp2.c
#   2005/01/07 21:44:10-08:00 tglx@linutronix.de +1 -1
#   Lock initializer unifying: Firewire
# 
# drivers/ieee1394/pcilynx.c
#   2005/01/07 21:44:10-08:00 tglx@linutronix.de +5 -5
#   Lock initializer unifying: Firewire
# 
# drivers/ieee1394/csr.c
#   2005/01/07 21:44:10-08:00 tglx@linutronix.de +1 -1
#   Lock initializer unifying: Firewire
# 
# ChangeSet
#   2005/01/08 14:05:57-08:00 tglx@linutronix.de 
#   [PATCH] Lock initializer unifying: RIO
#   
#   To make spinlock/rwlock initialization consistent all over the kernel,
#   this patch converts explicit lock-initializers into spin_lock_init() and
#   rwlock_init() calls.
#   
#   Currently, spinlocks and rwlocks are initialized in two different ways:
#   
#     lock = SPIN_LOCK_UNLOCKED
#     spin_lock_init(&lock)
#   
#     rwlock = RW_LOCK_UNLOCKED
#     rwlock_init(&rwlock)
#   
#   this patch converts all explicit lock initializations to
#   spin_lock_init() or rwlock_init(). (Besides consistency this also helps
#   automatic lock validators and debugging code.)
#   
#   The conversion was done with a script, it was verified manually and it
#   was reviewed, compiled and tested as far as possible on x86, ARM, PPC.
#   
#   There is no runtime overhead or actual code change resulting out of this
#   patch, because spin_lock_init() and rwlock_init() are macros and are
#   thus equivalent to the explicit initialization method.
#   
#   That's the second batch of the unifying patches.
#   
#   Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
#   Acked-by: Ingo Molnar <mingo@elte.hu>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/char/rio/rioinit.c
#   2005/01/07 21:56:31-08:00 tglx@linutronix.de +1 -1
#   Lock initializer unifying: RIO
# 
# drivers/char/rio/rioctrl.c
#   2005/01/07 21:56:31-08:00 tglx@linutronix.de +1 -1
#   Lock initializer unifying: RIO
# 
# drivers/char/rio/rioboot.c
#   2005/01/07 21:56:31-08:00 tglx@linutronix.de +2 -2
#   Lock initializer unifying: RIO
# 
# drivers/char/rio/rio_linux.c
#   2005/01/07 21:56:31-08:00 tglx@linutronix.de +4 -4
#   Lock initializer unifying: RIO
# 
# ChangeSet
#   2005/01/08 14:05:40-08:00 tglx@linutronix.de 
#   [PATCH] Lock initializer unifying: character devices
#   
#   To make spinlock/rwlock initialization consistent all over the kernel,
#   this patch converts explicit lock-initializers into spin_lock_init() and
#   rwlock_init() calls.
#   
#   Currently, spinlocks and rwlocks are initialized in two different ways:
#   
#     lock = SPIN_LOCK_UNLOCKED
#     spin_lock_init(&lock)
#   
#     rwlock = RW_LOCK_UNLOCKED
#     rwlock_init(&rwlock)
#   
#   this patch converts all explicit lock initializations to
#   spin_lock_init() or rwlock_init(). (Besides consistency this also helps
#   automatic lock validators and debugging code.)
#   
#   The conversion was done with a script, it was verified manually and it
#   was reviewed, compiled and tested as far as possible on x86, ARM, PPC.
#   
#   There is no runtime overhead or actual code change resulting out of this
#   patch, because spin_lock_init() and rwlock_init() are macros and are
#   thus equivalent to the explicit initialization method.
#   
#   That's the second batch of the unifying patches.
#   
#   Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
#   Acked-by: Ingo Molnar <mingo@elte.hu>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/char/sonypi.c
#   2005/01/07 21:44:09-08:00 tglx@linutronix.de +2 -2
#   Lock initializer unifying: character devices
# 
# drivers/char/random.c
#   2005/01/07 21:56:36-08:00 tglx@linutronix.de +1 -1
#   Lock initializer unifying: character devices
# 
# drivers/char/hvsi.c
#   2005/01/07 21:44:09-08:00 tglx@linutronix.de +1 -1
#   Lock initializer unifying: character devices
# 
# drivers/char/hvcs.c
#   2005/01/07 21:56:36-08:00 tglx@linutronix.de +1 -1
#   Lock initializer unifying: character devices
# 
# drivers/char/hvc_console.c
#   2005/01/07 21:56:36-08:00 tglx@linutronix.de +1 -1
#   Lock initializer unifying: character devices
# 
# ChangeSet
#   2005/01/08 14:05:19-08:00 tglx@linutronix.de 
#   [PATCH] Lock initializer unifying: DRM
#   
#   To make spinlock/rwlock initialization consistent all over the kernel,
#   this patch converts explicit lock-initializers into spin_lock_init() and
#   rwlock_init() calls.
#   
#   Currently, spinlocks and rwlocks are initialized in two different ways:
#   
#     lock = SPIN_LOCK_UNLOCKED
#     spin_lock_init(&lock)
#   
#     rwlock = RW_LOCK_UNLOCKED
#     rwlock_init(&rwlock)
#   
#   this patch converts all explicit lock initializations to
#   spin_lock_init() or rwlock_init(). (Besides consistency this also helps
#   automatic lock validators and debugging code.)
#   
#   The conversion was done with a script, it was verified manually and it
#   was reviewed, compiled and tested as far as possible on x86, ARM, PPC.
#   
#   There is no runtime overhead or actual code change resulting out of this
#   patch, because spin_lock_init() and rwlock_init() are macros and are
#   thus equivalent to the explicit initialization method.
#   
#   That's the second batch of the unifying patches.
#   
#   Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
#   Acked-by: Ingo Molnar <mingo@elte.hu>
#   Acked-by: Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/char/drm/gamma_lists.h
#   2005/01/07 21:44:09-08:00 tglx@linutronix.de +3 -3
#   Lock initializer unifying: DRM
# 
# ChangeSet
#   2005/01/08 14:05:02-08:00 tglx@linutronix.de 
#   [PATCH] Lock initializer unifying: Block devices
#   
#   To make spinlock/rwlock initialization consistent all over the kernel,
#   this patch converts explicit lock-initializers into spin_lock_init() and
#   rwlock_init() calls.
#   
#   Currently, spinlocks and rwlocks are initialized in two different ways:
#   
#     lock = SPIN_LOCK_UNLOCKED
#     spin_lock_init(&lock)
#   
#     rwlock = RW_LOCK_UNLOCKED
#     rwlock_init(&rwlock)
#   
#   this patch converts all explicit lock initializations to
#   spin_lock_init() or rwlock_init(). (Besides consistency this also helps
#   automatic lock validators and debugging code.)
#   
#   The conversion was done with a script, it was verified manually and it
#   was reviewed, compiled and tested as far as possible on x86, ARM, PPC.
#   
#   There is no runtime overhead or actual code change resulting out of this
#   patch, because spin_lock_init() and rwlock_init() are macros and are
#   thus equivalent to the explicit initialization method.
#   
#   That's the second batch of the unifying patches.
#   
#   Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
#   Acked-by: Ingo Molnar <mingo@elte.hu>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/block/cciss_scsi.c
#   2005/01/07 21:56:33-08:00 tglx@linutronix.de +1 -1
#   Lock initializer unifying: Block devices
# 
# drivers/block/DAC960.c
#   2005/01/07 21:44:09-08:00 tglx@linutronix.de +1 -1
#   Lock initializer unifying: Block devices
# 
# ChangeSet
#   2005/01/08 14:04:45-08:00 tglx@linutronix.de 
#   [PATCH] Lock initializer unifying: Misc drivers
#   
#   To make spinlock/rwlock initialization consistent all over the kernel,
#   this patch converts explicit lock-initializers into spin_lock_init() and
#   rwlock_init() calls.
#   
#   Currently, spinlocks and rwlocks are initialized in two different ways:
#   
#     lock = SPIN_LOCK_UNLOCKED
#     spin_lock_init(&lock)
#   
#     rwlock = RW_LOCK_UNLOCKED
#     rwlock_init(&rwlock)
#   
#   this patch converts all explicit lock initializations to
#   spin_lock_init() or rwlock_init(). (Besides consistency this also helps
#   automatic lock validators and debugging code.)
#   
#   The conversion was done with a script, it was verified manually and it
#   was reviewed, compiled and tested as far as possible on x86, ARM, PPC.
#   
#   There is no runtime overhead or actual code change resulting out of this
#   patch, because spin_lock_init() and rwlock_init() are macros and are
#   thus equivalent to the explicit initialization method.
#   
#   That's the second batch of the unifying patches.
#   
#   Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
#   Acked-by: Ingo Molnar <mingo@elte.hu>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/parport/share.c
#   2005/01/07 21:44:09-08:00 tglx@linutronix.de +1 -1
#   Lock initializer unifying: Misc drivers
# 
# drivers/misc/ibmasm/module.c
#   2005/01/07 21:44:09-08:00 tglx@linutronix.de +1 -1
#   Lock initializer unifying: Misc drivers
# 
# drivers/message/fusion/mptlan.c
#   2005/01/07 21:44:09-08:00 tglx@linutronix.de +2 -2
#   Lock initializer unifying: Misc drivers
# 
# drivers/acpi/ec.c
#   2005/01/07 21:44:09-08:00 tglx@linutronix.de +2 -2
#   Lock initializer unifying: Misc drivers
# 
# ChangeSet
#   2005/01/08 14:04:28-08:00 tglx@linutronix.de 
#   [PATCH] Lock initializer unifying: MIPS
#   
#   To make spinlock/rwlock initialization consistent all over the kernel,
#   this patch converts explicit lock-initializers into spin_lock_init() and
#   rwlock_init() calls.
#   
#   Currently, spinlocks and rwlocks are initialized in two different ways:
#   
#     lock = SPIN_LOCK_UNLOCKED
#     spin_lock_init(&lock)
#   
#     rwlock = RW_LOCK_UNLOCKED
#     rwlock_init(&rwlock)
#   
#   this patch converts all explicit lock initializations to
#   spin_lock_init() or rwlock_init(). (Besides consistency this also helps
#   automatic lock validators and debugging code.)
#   
#   The conversion was done with a script, it was verified manually and it
#   was reviewed, compiled and tested as far as possible on x86, ARM, PPC.
#   
#   There is no runtime overhead or actual code change resulting out of this
#   patch, because spin_lock_init() and rwlock_init() are macros and are
#   thus equivalent to the explicit initialization method.
#   
#   That's the second batch of the unifying patches.
#   
#   Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
#   Acked-by: Ingo Molnar <mingo@elte.hu>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/mips/gt64120/ev64120/irq.c
#   2005/01/07 21:44:08-08:00 tglx@linutronix.de +1 -1
#   Lock initializer unifying: MIPS
# 
# ChangeSet
#   2005/01/08 14:04:11-08:00 tglx@linutronix.de 
#   [PATCH] Lock initializer unifying: M32R
#   
#   To make spinlock/rwlock initialization consistent all over the kernel,
#   this patch converts explicit lock-initializers into spin_lock_init() and
#   rwlock_init() calls.
#   
#   Currently, spinlocks and rwlocks are initialized in two different ways:
#   
#     lock = SPIN_LOCK_UNLOCKED
#     spin_lock_init(&lock)
#   
#     rwlock = RW_LOCK_UNLOCKED
#     rwlock_init(&rwlock)
#   
#   this patch converts all explicit lock initializations to
#   spin_lock_init() or rwlock_init(). (Besides consistency this also helps
#   automatic lock validators and debugging code.)
#   
#   The conversion was done with a script, it was verified manually and it
#   was reviewed, compiled and tested as far as possible on x86, ARM, PPC.
#   
#   There is no runtime overhead or actual code change resulting out of this
#   patch, because spin_lock_init() and rwlock_init() are macros and are
#   thus equivalent to the explicit initialization method.
#   
#   That's the second batch of the unifying patches.
#   
#   Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
#   Acked-by: Ingo Molnar <mingo@elte.hu>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/m32r/kernel/smpboot.c
#   2005/01/07 21:44:08-08:00 tglx@linutronix.de +1 -1
#   Lock initializer unifying: M32R
# 
# ChangeSet
#   2005/01/08 14:03:54-08:00 tglx@linutronix.de 
#   [PATCH] Lock initializer unifying: IA64
#   
#   To make spinlock/rwlock initialization consistent all over the kernel,
#   this patch converts explicit lock-initializers into spin_lock_init() and
#   rwlock_init() calls.
#   
#   Currently, spinlocks and rwlocks are initialized in two different ways:
#   
#     lock = SPIN_LOCK_UNLOCKED
#     spin_lock_init(&lock)
#   
#     rwlock = RW_LOCK_UNLOCKED
#     rwlock_init(&rwlock)
#   
#   this patch converts all explicit lock initializations to
#   spin_lock_init() or rwlock_init(). (Besides consistency this also helps
#   automatic lock validators and debugging code.)
#   
#   The conversion was done with a script, it was verified manually and it
#   was reviewed, compiled and tested as far as possible on x86, ARM, PPC.
#   
#   There is no runtime overhead or actual code change resulting out of this
#   patch, because spin_lock_init() and rwlock_init() are macros and are
#   thus equivalent to the explicit initialization method.
#   
#   That's the second batch of the unifying patches.
#   
#   Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
#   Acked-by: Ingo Molnar <mingo@elte.hu>
#   Acked-by: "Luck, Tony" <tony.luck@intel.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/ia64/kernel/unwind.c
#   2005/01/07 21:44:08-08:00 tglx@linutronix.de +1 -1
#   Lock initializer unifying: IA64
# 
# ChangeSet
#   2005/01/08 14:03:35-08:00 tglx@linutronix.de 
#   [PATCH] Lock initializer unifying: ALPHA
#   
#   To make spinlock/rwlock initialization consistent all over the kernel,
#   this patch converts explicit lock-initializers into spin_lock_init() and
#   rwlock_init() calls.
#   
#   Currently, spinlocks and rwlocks are initialized in two different ways:
#   
#     lock = SPIN_LOCK_UNLOCKED
#     spin_lock_init(&lock)
#   
#     rwlock = RW_LOCK_UNLOCKED
#     rwlock_init(&rwlock)
#   
#   this patch converts all explicit lock initializations to
#   spin_lock_init() or rwlock_init(). (Besides consistency this also helps
#   automatic lock validators and debugging code.)
#   
#   The conversion was done with a script, it was verified manually and it
#   was reviewed, compiled and tested as far as possible on x86, ARM, PPC.
#   
#   There is no runtime overhead or actual code change resulting out of this
#   patch, because spin_lock_init() and rwlock_init() are macros and are
#   thus equivalent to the explicit initialization method.
#   
#   That's the second batch of the unifying patches.
#   
#   Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
#   Acked-by: Ingo Molnar <mingo@elte.hu>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/alpha/kernel/srmcons.c
#   2005/01/07 21:44:08-08:00 tglx@linutronix.de +1 -1
#   Lock initializer unifying: ALPHA
# 
# arch/alpha/kernel/core_marvel.c
#   2005/01/07 21:44:08-08:00 tglx@linutronix.de +1 -1
#   Lock initializer unifying: ALPHA
# 
# ChangeSet
#   2005/01/08 14:03:18-08:00 akpm@osdl.org 
#   [PATCH] invalidate_inode_pages2() mmap coherency fix
#   
#   - When invalidating pages, take care to shoot down any ptes which map them
#     as well.
#   
#     This ensures that the next mmap access to the page will generate a major
#     fault, so NFS's server-side modifications are picked up.
#   
#     This also allows us to call invalidate_complete_page() on all pages, so
#     filesytems such as ext3 get a chance to invalidate the buffer_heads.
#   
#   - Don't mark in-pagetable pages as non-uptodate any more.  That broke a
#     previous guarantee that mapped-into-user-process pages are always uptodate.
#   
#   - Check the return value of invalidate_complete_page().  It can fail if
#     someone redirties a page after generic_file_direct_IO() write it back.
#   
#   But we still have a problem.  If invalidate_inode_pages2() calls
#   unmap_mapping_range(), that can cause zap_pte_range() to dirty the pagecache
#   pages.  That will redirty the page's buffers and will cause
#   invalidate_complete_page() to fail.
#   
#   So, in generic_file_direct_IO() we do a complete pte shootdown on the file
#   up-front, prior to writing back dirty pagecache.  This is only done for
#   O_DIRECT writes.  It _could_ be done for O_DIRECT reads too, providing full
#   mmap-vs-direct-IO coherency for both O_DIRECT reads and O_DIRECT writes, but
#   permitting the pte shootdown on O_DIRECT reads trivially allows people to nuke
#   other people's mapped pagecache.
#   
#   NFS also uses invalidate_inode_pages2() for handling server-side modification
#   notifications.  But in the NFS case the clear_page_dirty() in
#   invalidate_inode_pages2() is sufficient, because NFS doesn't have to worry
#   about the "dirty buffers against a clean page" problem. (I think)
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# mm/truncate.c
#   2005/01/07 21:44:08-08:00 akpm@osdl.org +43 -24
#   invalidate_inode_pages2() mmap coherency fix
# 
# mm/filemap.c
#   2005/01/07 21:44:08-08:00 akpm@osdl.org +15 -3
#   invalidate_inode_pages2() mmap coherency fix
# 
# include/linux/fs.h
#   2005/01/07 21:44:08-08:00 akpm@osdl.org +1 -1
#   invalidate_inode_pages2() mmap coherency fix
# 
# ChangeSet
#   2005/01/08 14:03:01-08:00 akpm@osdl.org 
#   [PATCH] readpage-vs-invalidate fix
#   
#   A while ago we merged a patch which tried to solve a problem wherein a
#   concurrent read() and invalidate_inode_pages() would cause the read() to
#   return -EIO because invalidate cleared PageUptodate() at the wrong time.
#   
#   That patch tests for (page_count(page) != 2) in invalidate_complete_page() and
#   bales out if false.
#   
#   Problem is, the page may be in the per-cpu LRU front-ends over in
#   lru_cache_add.  This elevates the refcount pending spillage of the page onto
#   the LRU for real.  That causes a false positive in invalidate_complete_page(),
#   causing the page to not get invalidated.  This screws up the logic in my new
#   O_DIRECT-vs-buffered coherency fix.
#   
#   So let's solve the invalidate-vs-read in a different manner.  Over on the
#   read() side, add an explicit check to see if the page was invalidated.  If so,
#   just drop it on the floor and redo the read from scratch.
#   
#   Note that only do_generic_mapping_read() needs treatment.  filemap_nopage(),
#   filemap_getpage() and read_cache_page() are already doing the
#   oh-it-was-invalidated-so-try-again thing.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# mm/truncate.c
#   2005/01/07 21:56:40-08:00 akpm@osdl.org +0 -4
#   readpage-vs-invalidate fix
# 
# mm/filemap.c
#   2005/01/07 21:56:40-08:00 akpm@osdl.org +11 -1
#   readpage-vs-invalidate fix
# 
# ChangeSet
#   2005/01/08 14:02:44-08:00 rusty@rustcorp.com.au 
#   [PATCH] Remove EXPORT_SYMBOL_NOVERS
#   
#   Vadim Lobanov points out that EXPORT_SYMBOL_NOVERS is no longer used; in
#   fact, SH still uses it, but once we fix that, the kernel is clean.  Remove
#   it.
#   
#   Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/module.h
#   2005/01/07 21:44:07-08:00 rusty@rustcorp.com.au +0 -5
#   Remove EXPORT_SYMBOL_NOVERS
# 
# arch/sh/kernel/sh_ksyms.c
#   2005/01/07 21:44:07-08:00 rusty@rustcorp.com.au +2 -2
#   Remove EXPORT_SYMBOL_NOVERS
# 
# Makefile
#   2005/01/07 21:44:07-08:00 rusty@rustcorp.com.au +1 -1
#   Remove EXPORT_SYMBOL_NOVERS
# 
# ChangeSet
#   2005/01/08 14:02:27-08:00 hpa@zytor.com 
#   [PATCH] raid6: altivec support
#   
#   This patch adds Altivec support for RAID-6, if appropriately configured on
#   the ppc or ppc64 architectures.  Note that it changes the compile flags for
#   ppc64 in order to handle -maltivec correctly; this change was vetted on the
#   ppc64 mailing list and OK'd by paulus.
#   
#   Signed-off-by: H. Peter Anvin <hpa@zytor.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/md/raid6altivec.uc
#   2005/01/07 21:44:07-08:00 hpa@zytor.com +122 -0
#   raid6: altivec support
# 
# drivers/md/raid6algos.c
#   2005/01/07 21:44:07-08:00 hpa@zytor.com +10 -0
#   raid6: altivec support
# 
# drivers/md/Makefile
#   2005/01/07 21:44:07-08:00 hpa@zytor.com +30 -0
#   raid6: altivec support
# 
# arch/ppc64/Makefile
#   2005/01/07 21:44:07-08:00 hpa@zytor.com +4 -0
#   raid6: altivec support
# 
# drivers/md/raid6altivec.uc
#   2005/01/07 21:44:07-08:00 hpa@zytor.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/drivers/md/raid6altivec.uc
# 
# ChangeSet
#   2005/01/08 14:02:09-08:00 david-b@pacbell.net 
#   [PATCH] fbdev: rivafb should recognize NF2/IGP
#   
#   I got tired of not seeing the boot time penguin on my Shuttle SN41G2, and
#   not having a decently large text display when I bypass X11.  XFree86 says
#   it's "Chipset GeForce4 MX Integrated GPU", and the kernel driver has hooks
#   for this chip ID although it doesn't have a #define to match.
#   
#   Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/video/riva/fbdev.c
#   2005/01/07 21:44:07-08:00 david-b@pacbell.net +3 -0
#   fbdev: rivafb should recognize NF2/IGP
# 
# ChangeSet
#   2005/01/08 14:01:54-08:00 kamezawa.hiroyu@jp.fujitsu.com 
#   [PATCH] no buddy bitmap patch revist: for ia64
#   
#   This patch is for ia64 kernel, and defines CONFIG_HOLES_IN_ZONE in
#   arch/ia64/Kconfig.  IA64 has memory holes smaller than its MAX_ORDER and
#   its virtual memmap allows holes in a zone's memmap.
#   
#   This patch makes vmemmap aligned with IA64_GRANULE_SIZE in
#   arch/ia64/mm/init.c.
#   
#   Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/ia64/mm/init.c
#   2005/01/07 21:44:07-08:00 kamezawa.hiroyu@jp.fujitsu.com +0 -1
#   no buddy bitmap patch revist: for ia64
# 
# arch/ia64/Kconfig
#   2005/01/07 21:44:07-08:00 kamezawa.hiroyu@jp.fujitsu.com +4 -0
#   no buddy bitmap patch revist: for ia64
# 
# ChangeSet
#   2005/01/08 14:01:35-08:00 kamezawa.hiroyu@jp.fujitsu.com 
#   [PATCH] no buddy bitmap patch revisit: for mm/page_alloc.c
#   
#   This patch removes bitmaps from page allocator in mm/page_alloc.c.
#   
#   This buddy system uses page->private field to record free page's order
#   instead of using bitmaps.
#   
#   The algorithm of the buddy system is unchanged. Only bitmaps are removed.
#   
#   In this buddy system, 2 pages,a page and "buddy", can be coalesced when
#   
#   (buddy->private & PG_private) &&
#   (page_order(page)) == (page_order(buddy)) &&
#   !PageReserved(buddy) &&
#   page_count(buddy) == 0
#   
#   this also means "buddy" is a head of continuous free pages
#   of length of (1 << page_order(buddy)).
#   
#   bad_range() is called from inner loop of __free_pages_bulk().
#   In many archs, bad_range() is only a sanity check, it will always return 0.
#   But if a zone's memmap has a hole, it sometimes returns 1.
#   An architecture with memory holes in a zone has to define CONFIG_HOLES_IN_ZONE.
#   When CONFIG_HOLES_IN_ZONE is defined, pfn_valid() is called for checking
#   whether a buddy pages is valid or not.
#   
#   Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# mm/page_alloc.c
#   2005/01/07 21:44:07-08:00 kamezawa.hiroyu@jp.fujitsu.com +82 -82
#   no buddy bitmap patch revisit: for mm/page_alloc.c
# 
# ChangeSet
#   2005/01/08 14:01:18-08:00 kamezawa.hiroyu@jp.fujitsu.com 
#   [PATCH] no buddy bitmap patch revist: intro and includes
#   
#   Followings are patches for removing bitmaps from the buddy allocator.  This
#   is benefical to memory-hot-plug stuffs, because this removes a data
#   structure which must meet to a host's physical memory layout.
#   
#   This is one step to manage physical memory in nonlinear / discontiguous way
#   and will reduce some amounts of codes to implement memory-hot-plug.
#   
#   This patch removes bitmaps from zone->free_area[] in include/linux/mmzone.h,
#   and adds some comments on page->private field in include/linux/mm.h.
#   
#   non-atomic ops for changing PG_private bit is added in include/page-flags.h.
#   zone->lock is always acquired when PG_private of "a free page" is changed.
#   
#   Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/page-flags.h
#   2005/01/07 21:44:07-08:00 kamezawa.hiroyu@jp.fujitsu.com +2 -0
#   no buddy bitmap patch revist: intro and includes
# 
# include/linux/mmzone.h
#   2005/01/07 21:44:07-08:00 kamezawa.hiroyu@jp.fujitsu.com +0 -1
#   no buddy bitmap patch revist: intro and includes
# 
# include/linux/mm.h
#   2005/01/07 21:44:07-08:00 kamezawa.hiroyu@jp.fujitsu.com +2 -0
#   no buddy bitmap patch revist: intro and includes
# 
# ChangeSet
#   2005/01/08 14:01:01-08:00 wli@holomorphy.com 
#   [PATCH] vm: for -mm only: remove remap_page_range() completely
#   
#   All in-tree references to remap_page_range() have been removed by prior
#   patches in the series.  This patch, intended to be applied after some waiting
#   period for people to adjust to the API change, notice __deprecated, etc., does
#   the final removal of remap_page_range() as a function symbol declared within
#   kernel headers and/or implemented in kernel sources.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/mm.h
#   2005/01/07 21:56:41-08:00 wli@holomorphy.com +0 -7
#   vm: for -mm only: remove remap_page_range() completely
# 
# ChangeSet
#   2005/01/08 14:00:48-08:00 neilb@cse.unsw.edu.au 
#   [PATCH] md: improve 'hash' code in linear.c
#   
#   The hashtable that linear uses to find the right device stores
#   two pointers for every entry.
#   
#   The second is always one of:
#      The first plus 1
#      NULL
#   When NULL, it is never accessed, so any value can be stored.
#   
#   Thus it could always be "first plus 1", and so we don't need to store
#   it as it is trivial to calculate.
#   
#   This patch halves the size of this table, which results in some simpler
#   code as well.
#   
#   Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/raid/linear.h
#   2005/01/07 21:44:06-08:00 neilb@cse.unsw.edu.au +1 -6
#   md: improve 'hash' code in linear.c
# 
# drivers/md/linear.c
#   2005/01/07 21:44:06-08:00 neilb@cse.unsw.edu.au +14 -24
#   md: improve 'hash' code in linear.c
# 
# ChangeSet
#   2005/01/08 14:00:31-08:00 nathanl@austin.ibm.com 
#   [PATCH] cpu_down() warning fix
#   
#   Fix (harmless?) smp_processor_id() usage in preemptible section of
#   cpu_down.
#   
#   Signed-off-by: Nathan Lynch <nathanl@austin.ibm.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# kernel/cpu.c
#   2005/01/07 21:44:06-08:00 nathanl@austin.ibm.com +2 -1
#   cpu_down() warning fix
# 
# ChangeSet
#   2005/01/08 14:00:14-08:00 mingo@elte.hu 
#   [PATCH] oprofile preempt warning fixes
#   
#   From: Peter Zijlstra <peter@programming.kicks-ass.net>
#   
#   I have to use oprofile a lot but do want to enable preemption checks.
#   This gives some noise; I think andrew allready mentioned fixin this.
#   
#   The following patch fixes about half of the warnings.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/oprofile/buffer_sync.c
#   2005/01/07 21:44:06-08:00 mingo@elte.hu +2 -2
#   oprofile preempt warning fixes
# 
# ChangeSet
#   2005/01/08 13:59:57-08:00 mingo@elte.hu 
#   [PATCH] remove the BKL by turning it into a semaphore
#   
#   This is the current remove-BKL patch.  I test-booted it on x86 and x64, trying
#   every conceivable combination of SMP, PREEMPT and PREEMPT_BKL.  All other
#   architectures should compile as well.  (most of the testing was done with the
#   zaphod patch undone but it applies cleanly on vanilla -mm3 as well and should
#   work fine.)
#   
#   this is the debugging-enabled variant of the patch which has two main
#   debugging features:
#   
#    - debug potentially illegal smp_processor_id() use. Has caught a number
#      of real bugs - e.g. look at the printk.c fix in the patch.
#   
#    - make it possible to enable/disable the BKL via a .config. If this 
#      goes upstream we dont want this of course, but for now it gives
#      people a chance to find out whether any particular problem was caused
#      by this patch.
#   
#   This patch has one important fix over the previous BKL patch: on PREEMPT
#   kernels if we preempted BKL-using code then the code still auto-dropped the
#   BKL by mistake.  This caused a number of breakages for testers, which
#   breakages went away once this bug was fixed.
#   
#   Also the debugging mechanism has been improved alot relative to the previous
#   BKL patch.
#   
#   Would be nice to test-drive this in -mm.  There will likely be some more
#   smp_processor_id() false positives but they are 1) harmless 2) easy to fix up.
#   We could as well find more real smp_processor_id() related breakages as well.
#   
#   The most noteworthy fact is that no BKL-using code was found yet that relied
#   on smp_processor_id(), which is promising from a compatibility POV.
#   
#   Signed-off-by: Ingo Molnar <mingo@elte.hu>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# lib/kernel_lock.c
#   2005/01/07 21:44:05-08:00 mingo@elte.hu +140 -2
#   remove the BKL by turning it into a semaphore
# 
# lib/Kconfig.debug
#   2005/01/07 21:56:31-08:00 mingo@elte.hu +10 -0
#   remove the BKL by turning it into a semaphore
# 
# kernel/timer.c
#   2005/01/07 21:56:35-08:00 mingo@elte.hu +8 -1
#   remove the BKL by turning it into a semaphore
# 
# kernel/stop_machine.c
#   2005/01/07 21:44:05-08:00 mingo@elte.hu +2 -2
#   remove the BKL by turning it into a semaphore
# 
# kernel/softirq.c
#   2005/01/07 21:44:05-08:00 mingo@elte.hu +2 -2
#   remove the BKL by turning it into a semaphore
# 
# kernel/sched.c
#   2005/01/07 21:56:14-08:00 mingo@elte.hu +55 -8
#   remove the BKL by turning it into a semaphore
# 
# kernel/printk.c
#   2005/01/07 21:56:35-08:00 mingo@elte.hu +2 -1
#   remove the BKL by turning it into a semaphore
# 
# kernel/module.c
#   2005/01/07 21:56:35-08:00 mingo@elte.hu +1 -1
#   remove the BKL by turning it into a semaphore
# 
# init/main.c
#   2005/01/07 21:56:26-08:00 mingo@elte.hu +4 -0
#   remove the BKL by turning it into a semaphore
# 
# include/net/snmp.h
#   2005/01/07 21:44:05-08:00 mingo@elte.hu +7 -7
#   remove the BKL by turning it into a semaphore
# 
# include/net/route.h
#   2005/01/07 21:44:05-08:00 mingo@elte.hu +1 -1
#   remove the BKL by turning it into a semaphore
# 
# include/linux/smp_lock.h
#   2005/01/07 21:44:05-08:00 mingo@elte.hu +7 -7
#   remove the BKL by turning it into a semaphore
# 
# include/linux/smp.h
#   2005/01/07 21:44:05-08:00 mingo@elte.hu +31 -2
#   remove the BKL by turning it into a semaphore
# 
# include/linux/preempt.h
#   2005/01/07 21:44:05-08:00 mingo@elte.hu +10 -9
#   remove the BKL by turning it into a semaphore
# 
# include/linux/interrupt.h
#   2005/01/07 21:44:05-08:00 mingo@elte.hu +2 -2
#   remove the BKL by turning it into a semaphore
# 
# include/linux/hardirq.h
#   2005/01/07 21:44:05-08:00 mingo@elte.hu +9 -5
#   remove the BKL by turning it into a semaphore
# 
# include/asm-x86_64/smp.h
#   2005/01/07 21:44:05-08:00 mingo@elte.hu +1 -1
#   remove the BKL by turning it into a semaphore
# 
# include/asm-i386/smp.h
#   2005/01/07 21:44:05-08:00 mingo@elte.hu +1 -1
#   remove the BKL by turning it into a semaphore
# 
# arch/x86_64/lib/delay.c
#   2005/01/07 21:44:05-08:00 mingo@elte.hu +1 -1
#   remove the BKL by turning it into a semaphore
# 
# arch/x86_64/Kconfig
#   2005/01/07 21:44:05-08:00 mingo@elte.hu +11 -0
#   remove the BKL by turning it into a semaphore
# 
# arch/sparc64/lib/delay.c
#   2005/01/07 21:44:05-08:00 mingo@elte.hu +1 -1
#   remove the BKL by turning it into a semaphore
# 
# arch/sh/lib/delay.c
#   2005/01/07 21:44:05-08:00 mingo@elte.hu +1 -1
#   remove the BKL by turning it into a semaphore
# 
# arch/i386/lib/delay.c
#   2005/01/07 21:44:05-08:00 mingo@elte.hu +1 -1
#   remove the BKL by turning it into a semaphore
# 
# arch/i386/kernel/traps.c
#   2005/01/07 21:44:05-08:00 mingo@elte.hu +1 -1
#   remove the BKL by turning it into a semaphore
# 
# arch/i386/kernel/process.c
#   2005/01/07 21:44:05-08:00 mingo@elte.hu +1 -1
#   remove the BKL by turning it into a semaphore
# 
# arch/i386/Kconfig
#   2005/01/07 21:44:05-08:00 mingo@elte.hu +11 -0
#   remove the BKL by turning it into a semaphore
# 
# ChangeSet
#   2005/01/08 13:59:38-08:00 hugh@veritas.com 
#   [PATCH] vmtrunc: restart_addr in truncate_count
#   
#   Despite its restart_pgoff pretentions, unmap_mapping_range_vma was fatally
#   unable to distinguish a vma to be restarted from the case where that vma
#   has been freed, and its vm_area_struct reused for the top part of a
#   !new_below split of an isomorphic vma yet to be scanned.
#   
#   The obvious answer is to note restart_vma in the struct address_space, and
#   cancel it when that vma is freed; but I'm reluctant to enlarge every struct
#   inode just for this.  Another answer is to flag valid restart in the
#   vm_area_struct; but vm_flags is protected by down_write of mmap_sem, which
#   we cannot take within down_write of i_sem.  If we're going to need yet
#   another field, better to record the restart_addr itself: restart_vma only
#   recorded the last restart, but a busy tree could well use more.
#   
#   Actually, we don't need another field: we can neatly (though naughtily)
#   keep restart_addr in vm_truncate_count, provided mapping->truncate_count
#   leaps over those values which look like a page-aligned address.  Zero
#   remains good for forcing a scan (though now interpreted as restart_addr 0),
#   and it turns out no change is needed to any of the vm_truncate_count
#   settings in dup_mmap, vma_link, vma_adjust, move_one_page.
#   
#   Signed-off-by: Hugh Dickins <hugh@veritas.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# mm/memory.c
#   2005/01/07 21:44:05-08:00 hugh@veritas.com +20 -37
#   vmtrunc: restart_addr in truncate_count
# 
# include/linux/mm.h
#   2005/01/07 21:56:42-08:00 hugh@veritas.com +2 -5
#   vmtrunc: restart_addr in truncate_count
# 
# ChangeSet
#   2005/01/08 13:59:23-08:00 hugh@veritas.com 
#   [PATCH] vmtrunc: bug if page_mapped
#   
#   If unmap_mapping_range (and mapping->truncate_count) are doing their jobs
#   right, truncate_complete_page should never find the page mapped: add BUG_ON
#   for our immediate testing, but this patch should probably not go to mainline -
#   a mapped page here is not a catastrophe.
#   
#   Signed-off-by: Hugh Dickins <hugh@veritas.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# mm/truncate.c
#   2005/01/07 21:56:40-08:00 hugh@veritas.com +1 -0
#   vmtrunc: bug if page_mapped
# 
# ChangeSet
#   2005/01/08 13:59:06-08:00 hugh@veritas.com 
#   [PATCH] vmtrunc: vm_truncate_count race caution
#   
#   Fix some unlikely races in respect of vm_truncate_count.
#   
#   Firstly, it's supposed to be guarded by i_mmap_lock, but some places copy a
#   vma structure by *new_vma = *old_vma: if the compiler implements that with a
#   bytewise copy, new_vma->vm_truncate_count could be munged, and new_vma later
#   appear up-to-date when it's not; so set it properly once under lock.
#   
#   vma_link set vm_truncate_count to mapping->truncate_count when adding an empty
#   vma: if new vmas are being added profusely while vmtruncate is in progess,
#   this lets them be skipped without scanning.
#   
#   vma_adjust has vm_truncate_count problem much like it had with anon_vma under
#   mprotect merge: when merging be careful not to leave vma marked as up-to-date
#   when it might not be, lest unmap_mapping_range in progress - set
#   vm_truncate_count 0 when in doubt.  Similarly when mremap moving ptes from one
#   vma to another.
#   
#   Cut a little code from __anon_vma_merge: now vma_adjust sets "importer" in the
#   remove_next case (to get its vm_truncate_count right), its anon_vma is already
#   linked by the time __anon_vma_merge is called.
#   
#   Signed-off-by: Hugh Dickins <hugh@veritas.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# mm/rmap.c
#   2005/01/07 21:44:05-08:00 hugh@veritas.com +1 -8
#   vmtrunc: vm_truncate_count race caution
# 
# mm/mremap.c
#   2005/01/07 21:44:05-08:00 hugh@veritas.com +10 -6
#   vmtrunc: vm_truncate_count race caution
# 
# mm/mmap.c
#   2005/01/07 21:44:05-08:00 hugh@veritas.com +13 -1
#   vmtrunc: vm_truncate_count race caution
# 
# kernel/fork.c
#   2005/01/07 21:56:35-08:00 hugh@veritas.com +1 -0
#   vmtrunc: vm_truncate_count race caution
# 
# ChangeSet
#   2005/01/08 13:58:53-08:00 hugh@veritas.com 
#   [PATCH] vmtrunc: unmap_mapping dropping i_mmap_lock
#   
#   vmtruncate (or more generally, unmap_mapping_range) has been observed
#   responsible for very high latencies: the lockbreak work in unmap_vmas is good
#   for munmap or exit_mmap, but no use while mapping->i_mmap_lock is held, to
#   keep our place in the prio_tree (or list) of a file's vmas.
#   
#   Extend the zap_details block with i_mmap_lock pointer, so unmap_vmas can
#   detect if that needs lockbreak, and break_addr so it can notify where it left
#   off.
#   
#   Add unmap_mapping_range_vma, used from both prio_tree and nonlinear list
#   handlers.  This is what now calls zap_page_range (above unmap_vmas), but
#   handles the lockbreak and restart issues: letting unmap_mapping_range_ tree or
#   list know when they need to start over because lock was dropped.
#   
#   When restarting, of course there's a danger of never making progress.  Add
#   vm_truncate_count field to vm_area_struct, update that to mapping->
#   truncate_count once fully scanned, skip up-to-date vmas without a scan (and
#   without dropping i_mmap_lock).
#   
#   Further danger of never making progress if a vma is very large: when breaking
#   out, save restart_vma and restart_addr (and restart_pgoff to confirm, in case
#   vma gets reused), to help continue where we left off.
#   
#   Signed-off-by: Hugh Dickins <hugh@veritas.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# mm/memory.c
#   2005/01/07 21:56:43-08:00 hugh@veritas.com +153 -13
#   vmtrunc: unmap_mapping dropping i_mmap_lock
# 
# include/linux/mm.h
#   2005/01/07 21:56:43-08:00 hugh@veritas.com +7 -1
#   vmtrunc: unmap_mapping dropping i_mmap_lock
# 
# ChangeSet
#   2005/01/08 13:58:36-08:00 hugh@veritas.com 
#   [PATCH] vmtrunc: unmap_mapping_range_tree
#   
#   Move unmap_mapping_range's nonlinear vma handling out to its own inline,
#   parallel to the prio_tree handling; unmap_mapping_range_list is a better name
#   for the nonlinear list, rename the other unmap_mapping_range_tree.
#   
#   Signed-off-by: Hugh Dickins <hugh@veritas.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# mm/memory.c
#   2005/01/07 21:56:43-08:00 hugh@veritas.com +23 -19
#   vmtrunc: unmap_mapping_range_tree
# 
# ChangeSet
#   2005/01/08 13:58:19-08:00 hugh@veritas.com 
#   [PATCH] vmtrunc: restore unmap_vmas zap_bytes
#   
#   The low-latency unmap_vmas patch silently moved the zap_bytes test after the
#   TLB finish and lockbreak and regather: why?  That not only makes zap_bytes
#   redundant (might as well use ZAP_BLOCK_SIZE), it makes the unmap_vmas level
#   redundant too - it's all about saving TLB flushes when unmapping a series of
#   small vmas.
#   
#   Move zap_bytes test back before the lockbreak, and delete the curious comment
#   that a small zap block size doesn't matter: it's true need_flush prevents TLB
#   flush when no page has been unmapped, but unmapping pages in small blocks
#   involves many more TLB flushes than in large blocks.
#   
#   Signed-off-by: Hugh Dickins <hugh@veritas.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# mm/memory.c
#   2005/01/07 21:56:43-08:00 hugh@veritas.com +3 -6
#   vmtrunc: restore unmap_vmas zap_bytes
# 
# ChangeSet
#   2005/01/08 13:58:02-08:00 hugh@veritas.com 
#   [PATCH] vmtrunc: truncate_count not atomic
#   
#   Why is mapping->truncate_count atomic?  It's incremented inside i_mmap_lock
#   (and i_sem), and the reads don't need it to be atomic.
#   
#   And why smp_rmb() before call to ->nopage?  The compiler cannot reorder the
#   initial assignment of sequence after the call to ->nopage, and no cpu (yet!)
#   can read from the future, which is all that matters there.
#   
#   And delete totally bogus reset of truncate_count from blkmtd add_device.
#   truncate_count is all about detecting i_size changes: i_size does not change
#   there; and if it did, the count should be incremented not reset.
#   
#   Signed-off-by: Hugh Dickins <hugh@veritas.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# mm/memory.c
#   2005/01/07 21:56:44-08:00 hugh@veritas.com +5 -7
#   vmtrunc: truncate_count not atomic
# 
# include/linux/fs.h
#   2005/01/07 21:56:40-08:00 hugh@veritas.com +1 -1
#   vmtrunc: truncate_count not atomic
# 
# fs/inode.c
#   2005/01/07 21:44:04-08:00 hugh@veritas.com +0 -1
#   vmtrunc: truncate_count not atomic
# 
# drivers/mtd/devices/blkmtd.c
#   2005/01/07 21:56:23-08:00 hugh@veritas.com +0 -1
#   vmtrunc: truncate_count not atomic
# 
# ChangeSet
#   2005/01/08 13:57:45-08:00 akpm@osdl.org 
#   [PATCH] block2mtd: avoid touching truncate_count
#   
#   blockmtd doesn't need to initialise address_space.truncate_count:
#   open_bdev_excl did that.
#   
#   Plus I have a patch queued up which removes ->truncate_count.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/mtd/devices/block2mtd.c
#   2005/01/07 21:44:04-08:00 akpm@osdl.org +0 -1
#   block2mtd: avoid touching truncate_count
# 
# ChangeSet
#   2005/01/08 13:57:28-08:00 colpatch@us.ibm.com 
#   [PATCH] Replace 'numnodes' with 'node_online_map' - arch-independent
#   
#   From: William Lee Irwin III <wli@holomorphy.com>
#   
#   Without passing this parameter by reference, the changes to used_node_mask
#   are meaningless and do not affect the caller's copy.
#   
#   This leads to boot-time failure. This proposed fix passes it by reference.
#   
#   Signed-off-by: William Irwin <wli@holomorphy.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# mm/page_alloc.c
#   2005/01/07 21:56:41-08:00 colpatch@us.ibm.com +27 -21
#   Replace 'numnodes' with 'node_online_map' - arch-independent
# 
# mm/mempolicy.c
#   2005/01/07 21:44:04-08:00 colpatch@us.ibm.com +1 -1
#   Replace 'numnodes' with 'node_online_map' - arch-independent
# 
# mm/hugetlb.c
#   2005/01/07 21:56:35-08:00 colpatch@us.ibm.com +3 -2
#   Replace 'numnodes' with 'node_online_map' - arch-independent
# 
# include/linux/topology.h
#   2005/01/07 21:44:04-08:00 colpatch@us.ibm.com +3 -10
#   Replace 'numnodes' with 'node_online_map' - arch-independent
# 
# include/linux/mmzone.h
#   2005/01/07 21:56:41-08:00 colpatch@us.ibm.com +0 -1
#   Replace 'numnodes' with 'node_online_map' - arch-independent
# 
# drivers/base/node.c
#   2005/01/07 21:44:04-08:00 colpatch@us.ibm.com +2 -1
#   Replace 'numnodes' with 'node_online_map' - arch-independent
# 
# Documentation/vm/numa
#   2005/01/07 21:44:04-08:00 colpatch@us.ibm.com +1 -1
#   Replace 'numnodes' with 'node_online_map' - arch-independent
# 
# ChangeSet
#   2005/01/08 13:57:12-08:00 colpatch@us.ibm.com 
#   [PATCH] Replace 'numnodes' with 'node_online_map' - x86_64
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-x86_64/numa.h
#   2005/01/07 21:44:04-08:00 colpatch@us.ibm.com +0 -3
#   Replace 'numnodes' with 'node_online_map' - x86_64
# 
# arch/x86_64/mm/srat.c
#   2005/01/07 21:44:04-08:00 colpatch@us.ibm.com +5 -8
#   Replace 'numnodes' with 'node_online_map' - x86_64
# 
# arch/x86_64/mm/numa.c
#   2005/01/07 21:44:04-08:00 colpatch@us.ibm.com +7 -8
#   Replace 'numnodes' with 'node_online_map' - x86_64
# 
# arch/x86_64/mm/k8topology.c
#   2005/01/07 21:44:04-08:00 colpatch@us.ibm.com +5 -4
#   Replace 'numnodes' with 'node_online_map' - x86_64
# 
# arch/x86_64/kernel/setup64.c
#   2005/01/07 21:44:04-08:00 colpatch@us.ibm.com +2 -1
#   Replace 'numnodes' with 'node_online_map' - x86_64
# 
# ChangeSet
#   2005/01/08 13:56:50-08:00 colpatch@us.ibm.com 
#   [PATCH] Replace 'numnodes' with 'node_online_map' - ppc64
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/ppc64/mm/numa.c
#   2005/01/07 21:44:04-08:00 colpatch@us.ibm.com +6 -8
#   Replace 'numnodes' with 'node_online_map' - ppc64
# 
# arch/ppc64/mm/init.c
#   2005/01/07 21:44:04-08:00 colpatch@us.ibm.com +1 -1
#   Replace 'numnodes' with 'node_online_map' - ppc64
# 
# ChangeSet
#   2005/01/08 13:56:34-08:00 colpatch@us.ibm.com 
#   [PATCH] Replace 'numnodes' with 'node_online_map' - parisc
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/parisc/mm/init.c
#   2005/01/07 21:44:03-08:00 colpatch@us.ibm.com +0 -2
#   Replace 'numnodes' with 'node_online_map' - parisc
# 
# ChangeSet
#   2005/01/08 13:56:15-08:00 colpatch@us.ibm.com 
#   [PATCH] Replace 'numnodes' with 'node_online_map' - mips
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-mips/sn/sn_private.h
#   2005/01/07 21:44:03-08:00 colpatch@us.ibm.com +2 -2
#   Replace 'numnodes' with 'node_online_map' - mips
# 
# arch/mips/sgi-ip27/ip27-smp.c
#   2005/01/07 21:44:03-08:00 colpatch@us.ibm.com +9 -5
#   Replace 'numnodes' with 'node_online_map' - mips
# 
# arch/mips/sgi-ip27/ip27-reset.c
#   2005/01/07 21:44:03-08:00 colpatch@us.ibm.com +2 -2
#   Replace 'numnodes' with 'node_online_map' - mips
# 
# arch/mips/sgi-ip27/ip27-nmi.c
#   2005/01/07 21:44:03-08:00 colpatch@us.ibm.com +4 -4
#   Replace 'numnodes' with 'node_online_map' - mips
# 
# arch/mips/sgi-ip27/ip27-memory.c
#   2005/01/07 21:44:03-08:00 colpatch@us.ibm.com +16 -16
#   Replace 'numnodes' with 'node_online_map' - mips
# 
# arch/mips/sgi-ip27/ip27-klnuma.c
#   2005/01/07 21:44:03-08:00 colpatch@us.ibm.com +11 -17
#   Replace 'numnodes' with 'node_online_map' - mips
# 
# arch/mips/sgi-ip27/ip27-init.c
#   2005/01/07 21:44:03-08:00 colpatch@us.ibm.com +0 -1
#   Replace 'numnodes' with 'node_online_map' - mips
# 
# ChangeSet
#   2005/01/08 13:55:59-08:00 colpatch@us.ibm.com 
#   [PATCH] Replace 'numnodes' with 'node_online_map' - m32r
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/m32r/mm/init.c
#   2005/01/07 21:44:03-08:00 colpatch@us.ibm.com +3 -3
#   Replace 'numnodes' with 'node_online_map' - m32r
# 
# arch/m32r/mm/discontig.c
#   2005/01/07 21:44:03-08:00 colpatch@us.ibm.com +3 -3
#   Replace 'numnodes' with 'node_online_map' - m32r
# 
# arch/m32r/kernel/setup.c
#   2005/01/07 21:44:03-08:00 colpatch@us.ibm.com +3 -1
#   Replace 'numnodes' with 'node_online_map' - m32r
# 
# ChangeSet
#   2005/01/08 13:55:38-08:00 colpatch@us.ibm.com 
#   [PATCH] Replace 'numnodes' with 'node_online_map' - ia64
#   
#   From: Jesse Barnes <jbarnes@engr.sgi.com>
#   
#   Here are some compile fixes for this patch.  Looks like simple typos.
#   
#   Signed-off-by: Jesse Barnes <jbarnes@sgi.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-ia64/numa.h
#   2005/01/07 21:44:03-08:00 colpatch@us.ibm.com +1 -1
#   Replace 'numnodes' with 'node_online_map' - ia64
# 
# include/asm-ia64/nodedata.h
#   2005/01/07 21:44:03-08:00 colpatch@us.ibm.com +1 -1
#   Replace 'numnodes' with 'node_online_map' - ia64
# 
# include/asm-ia64/mmzone.h
#   2005/01/07 21:44:03-08:00 colpatch@us.ibm.com +5 -6
#   Replace 'numnodes' with 'node_online_map' - ia64
# 
# arch/ia64/sn/kernel/sn2/sn2_smp.c
#   2005/01/07 21:44:03-08:00 colpatch@us.ibm.com +6 -8
#   Replace 'numnodes' with 'node_online_map' - ia64
# 
# arch/ia64/sn/kernel/sn2/prominfo_proc.c
#   2005/01/07 21:44:03-08:00 colpatch@us.ibm.com +7 -6
#   Replace 'numnodes' with 'node_online_map' - ia64
# 
# arch/ia64/sn/kernel/setup.c
#   2005/01/07 21:44:03-08:00 colpatch@us.ibm.com +9 -8
#   Replace 'numnodes' with 'node_online_map' - ia64
# 
# arch/ia64/sn/kernel/io_init.c
#   2005/01/07 21:44:03-08:00 colpatch@us.ibm.com +1 -1
#   Replace 'numnodes' with 'node_online_map' - ia64
# 
# arch/ia64/mm/discontig.c
#   2005/01/07 21:44:03-08:00 colpatch@us.ibm.com +41 -29
#   Replace 'numnodes' with 'node_online_map' - ia64
# 
# arch/ia64/kernel/topology.c
#   2005/01/07 21:44:03-08:00 colpatch@us.ibm.com +2 -1
#   Replace 'numnodes' with 'node_online_map' - ia64
# 
# arch/ia64/kernel/acpi.c
#   2005/01/07 21:44:03-08:00 colpatch@us.ibm.com +13 -9
#   Replace 'numnodes' with 'node_online_map' - ia64
# 
# ChangeSet
#   2005/01/08 13:55:22-08:00 colpatch@us.ibm.com 
#   [PATCH] Replace 'numnodes' with 'node_online_map' - i386
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-i386/mach-numaq/mach_apic.h
#   2005/01/07 21:44:03-08:00 colpatch@us.ibm.com +6 -4
#   Replace 'numnodes' with 'node_online_map' - i386
# 
# arch/i386/pci/numa.c
#   2005/01/07 21:44:03-08:00 colpatch@us.ibm.com +4 -3
#   Replace 'numnodes' with 'node_online_map' - i386
# 
# arch/i386/mm/discontig.c
#   2005/01/07 21:44:03-08:00 colpatch@us.ibm.com +17 -11
#   Replace 'numnodes' with 'node_online_map' - i386
# 
# arch/i386/kernel/srat.c
#   2005/01/07 21:44:03-08:00 colpatch@us.ibm.com +18 -14
#   Replace 'numnodes' with 'node_online_map' - i386
# 
# arch/i386/kernel/numaq.c
#   2005/01/07 21:44:03-08:00 colpatch@us.ibm.com +4 -6
#   Replace 'numnodes' with 'node_online_map' - i386
# 
# arch/i386/kernel/mpparse.c
#   2005/01/07 21:44:03-08:00 colpatch@us.ibm.com +2 -2
#   Replace 'numnodes' with 'node_online_map' - i386
# 
# ChangeSet
#   2005/01/08 13:55:05-08:00 colpatch@us.ibm.com 
#   [PATCH] Replace 'numnodes' with 'node_online_map' - arm
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-arm/arch-pxa/memory.h
#   2005/01/07 21:44:02-08:00 colpatch@us.ibm.com +0 -2
#   Replace 'numnodes' with 'node_online_map' - arm
# 
# arch/arm26/mm/init.c
#   2005/01/07 21:44:02-08:00 colpatch@us.ibm.com +2 -1
#   Replace 'numnodes' with 'node_online_map' - arm
# 
# arch/arm/mm/mm-armv.c
#   2005/01/07 21:44:02-08:00 colpatch@us.ibm.com +1 -1
#   Replace 'numnodes' with 'node_online_map' - arm
# 
# arch/arm/mm/init.c
#   2005/01/07 21:44:02-08:00 colpatch@us.ibm.com +15 -19
#   Replace 'numnodes' with 'node_online_map' - arm
# 
# ChangeSet
#   2005/01/08 13:54:48-08:00 colpatch@us.ibm.com 
#   [PATCH] Replace 'numnodes' with 'node_online_map' - alpha
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/alpha/mm/numa.c
#   2005/01/07 21:44:02-08:00 colpatch@us.ibm.com +5 -5
#   Replace 'numnodes' with 'node_online_map' - alpha
# 
# ChangeSet
#   2005/01/08 13:54:31-08:00 nickpiggin@yahoo.com.au 
#   [PATCH] debug sched domains before attach
#   
#   Change the sched-domain debug routine to be called on a per-CPU basis, and
#   executed before the domain is actually attached to the CPU.  Previously, all
#   CPUs would have their new domains attached, and then the debug routine would
#   loop over all of them.
#   
#   This has two advantages: First, there is no longer any theoretical races: we
#   are running the debug routine on a domain that isn't yet active, and should
#   have no racing access from another CPU.  Second, if there is a problem with a
#   domain, the validator will have a better chance to catch the error and print a
#   diagnostic _before_ the domain is attached, which may take down the system.
#   
#   Also, change reporting of detected error conditions to KERN_ERR instead of
#   KERN_DEBUG, so they have a better chance of being seen in a hang on boot
#   situation.
#   
#   The patch also does an unrelated (and harmless) cleanup in migration_thread().
#   
#   Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au>
#   Acked-by: Ingo Molnar <mingo@elte.hu>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# kernel/sched.c
#   2005/01/07 21:56:43-08:00 nickpiggin@yahoo.com.au +91 -95
#   debug sched domains before attach
# 
# ChangeSet
#   2005/01/08 13:54:15-08:00 mingo@elte.hu 
#   [PATCH] Fix smp_processor_id() warning in numa_node_id()
#   
#   The patch below fixes smp_processor_id() warnings that are triggered by
#   numa_node_id().
#   
#   All uses of numa_node_id() in mm/mempolicy.c seem to use it as a 'hint'
#   only, not as a correctness number.  Once a node is established, it's used
#   in a preemption-safe way.  So the simple fix is to disable the checking for
#   numa_node_id().  But additional review would be more than welcome, because
#   this patch turns off the preemption-checking of numa_node_id() permanently.
#   Tested on amd64.
#   
#   Signed-off-by: Ingo Molnar <mingo@elte.hu>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/mmzone.h
#   2005/01/07 21:56:45-08:00 mingo@elte.hu +1 -1
#   Fix smp_processor_id() warning in numa_node_id()
# 
# ChangeSet
#   2005/01/08 13:53:57-08:00 mingo@elte.hu 
#   [PATCH] oprofile smp_processor_id() fixes
#   
#   Clean up a few suspicious-looking uses of smp_processor_id() in preemptible
#   code.
#   
#   The current_cpu_data use is unclean but most likely safe.  I haven't seen any
#   outright bugs.  Since oprofile does not seem to be ready for different-type
#   CPUs (do we even care?), the patch below documents this property by using
#   boot_cpu_data.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/i386/oprofile/nmi_int.c
#   2005/01/07 21:44:02-08:00 mingo@elte.hu +4 -4
#   oprofile smp_processor_id() fixes
# 
# ChangeSet
#   2005/01/08 13:53:41-08:00 mingo@elte.hu 
#   [PATCH] idle thread preemption fix
#   
#   The early bootup stage is pretty fragile because the idle thread is not yet
#   functioning as such and so we need preemption disabled.  Whether the bootup
#   fails or not seems to depend on timing details so e.g.  the presence of
#   SCHED_SMT makes it go away.
#   
#   Disabling preemption explicitly has another advantage: the atomicity check
#   in schedule() will catch early-bootup schedule() calls from now on.
#   
#   The patch also fixes another preempt-bkl buglet: interrupt-driven
#   forced-preemption didnt go through preempt_schedule() so it resulted in
#   auto-dropping of the BKL.  Now we go through preempt_schedule() which
#   properly deals with the BKL.
#   
#   Signed-off-by: Ingo Molnar <mingo@elte.hu>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# init/main.c
#   2005/01/07 21:56:43-08:00 mingo@elte.hu +7 -0
#   idle thread preemption fix
# 
# arch/i386/kernel/entry.S
#   2005/01/07 21:44:02-08:00 mingo@elte.hu +1 -2
#   idle thread preemption fix
# 
# ChangeSet
#   2005/01/08 13:53:24-08:00 mingo@elte.hu 
#   [PATCH] sched: fix scheduling latencies for !PREEMPT kernels
#   
#   This patch adds a handful of cond_resched() points to a number of key,
#   scheduling-latency related non-inlined functions.
#   
#   This reduces preemption latency for !PREEMPT kernels.  These are scheduling
#   points complementary to PREEMPT_VOLUNTARY scheduling points (might_sleep()
#   places) - i.e.  these are all points where an explicit cond_resched() had
#   to be added.
#   
#   Has been tested as part of the -VP patchset.
#   
#   Signed-off-by: Ingo Molnar <mingo@elte.hu>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# mm/vmscan.c
#   2005/01/07 21:44:01-08:00 mingo@elte.hu +3 -0
#   sched: fix scheduling latencies for !PREEMPT kernels
# 
# mm/slab.c
#   2005/01/07 21:44:01-08:00 mingo@elte.hu +1 -1
#   sched: fix scheduling latencies for !PREEMPT kernels
# 
# mm/memory.c
#   2005/01/07 21:56:45-08:00 mingo@elte.hu +1 -0
#   sched: fix scheduling latencies for !PREEMPT kernels
# 
# kernel/printk.c
#   2005/01/07 21:56:43-08:00 mingo@elte.hu +3 -0
#   sched: fix scheduling latencies for !PREEMPT kernels
# 
# fs/select.c
#   2005/01/07 21:44:01-08:00 mingo@elte.hu +1 -0
#   sched: fix scheduling latencies for !PREEMPT kernels
# 
# fs/fs-writeback.c
#   2005/01/07 21:44:01-08:00 mingo@elte.hu +1 -0
#   sched: fix scheduling latencies for !PREEMPT kernels
# 
# fs/exec.c
#   2005/01/07 21:44:01-08:00 mingo@elte.hu +1 -0
#   sched: fix scheduling latencies for !PREEMPT kernels
# 
# ChangeSet
#   2005/01/08 13:53:06-08:00 mingo@elte.hu 
#   [PATCH] sched: fix scheduling latencies in vgacon.c
#   
#   This patch fixes scheduling latencies in vgacon_do_font_op().  The code is
#   protected by vga_lock already so it's safe to drop (and re-acquire) the
#   BKL.
#   
#   Has been tested in the -VP patchset.
#   
#   Signed-off-by: Ingo Molnar <mingo@elte.hu>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/video/console/vgacon.c
#   2005/01/07 21:44:01-08:00 mingo@elte.hu +3 -0
#   sched: fix scheduling latencies in vgacon.c
# 
# ChangeSet
#   2005/01/08 13:52:50-08:00 mingo@elte.hu 
#   [PATCH] sched: fix scheduling latencies in mttr.c
#   
#   Fix scheduling latencies in the MTRR-setting codepath.  Also, fix bad bug:
#   MTRR's _must_ be set with interrupts disabled!
#   
#   From: Bernard Blackham <bernard@blackham.com.au>
#   
#   The patch sched-fix-scheduling-latencies-in-mttr in recent -mm kernels has
#   the bad side-effect of re-enabling interrupts even if they were disabled.
#   This caused bugs in Software Suspend 2 which reenabled MTRRs whilst
#   interrupts were already disabled.
#   
#   Attached is a replacement patch which uses spin_lock_irqsave instead of
#   spin_lock_irq.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/i386/kernel/cpu/mtrr/generic.c
#   2005/01/07 21:44:00-08:00 mingo@elte.hu +16 -3
#   sched: fix scheduling latencies in mttr.c
# 
# ChangeSet
#   2005/01/08 13:52:32-08:00 mingo@elte.hu 
#   [PATCH] fix keventd execution dependency
#   
#   We dont want to execute off keventd since it might hold a semaphore our
#   callers hold too.  This can happen when kthread_create() is called from
#   within keventd.  This happened due to the IRQ threading patches but it
#   could happen with other code too.
#   
#   Signed-off-by: Ingo Molnar <mingo@elte.hu>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# kernel/kthread.c
#   2005/01/07 21:44:00-08:00 mingo@elte.hu +21 -4
#   fix keventd execution dependency
# 
# ChangeSet
#   2005/01/08 13:52:14-08:00 mingo@elte.hu 
#   [PATCH] sched: mm: fix scheduling latencies in filemap_sync()
#   
#   The attached patch, written by Andrew Morton, fixes long scheduling
#   latencies in filemap_sync().
#   
#   Has been tested as part of the -VP patchset.
#   
#   Signed-off-by: Ingo Molnar <mingo@elte.hu>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# mm/msync.c
#   2005/01/07 21:44:00-08:00 mingo@elte.hu +27 -2
#   sched: mm: fix scheduling latencies in filemap_sync()
# 
# ChangeSet
#   2005/01/08 13:51:58-08:00 mingo@elte.hu 
#   [PATCH] sched: mm: fix scheduling latencies in get_user_pages()
#   
#   The attached patch fixes long scheduling latencies in get_user_pages().
#   
#   Has been tested as part of the -VP patchset.
#   
#   Signed-off-by: Ingo Molnar <mingo@elte.hu>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# mm/memory.c
#   2005/01/07 21:56:48-08:00 mingo@elte.hu +2 -0
#   sched: mm: fix scheduling latencies in get_user_pages()
# 
# ChangeSet
#   2005/01/08 13:51:41-08:00 mingo@elte.hu 
#   [PATCH] sched: mm: fix scheduling latencies in unmap_vmas()
#   
#   The attached patch fixes long latencies in unmap_vmas().  We had lockbreak
#   code in that function already but it did not take delayed effects of
#   TLB-gather into account.
#   
#   Has been tested as part of the -VP patchset.
#   
#   Signed-off-by: Ingo Molnar <mingo@elte.hu>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# mm/memory.c
#   2005/01/07 21:56:48-08:00 mingo@elte.hu +11 -15
#   sched: mm: fix scheduling latencies in unmap_vmas()
# 
# ChangeSet
#   2005/01/08 13:51:22-08:00 mingo@elte.hu 
#   [PATCH] sched: net: fix scheduling latencies in __release_sock
#   
#   The attached patch fixes long scheduling latencies caused by backlog
#   triggered by __release_sock().  That code only executes in process context,
#   and we've made the backlog queue private already at this point so it is
#   safe to do a cond_resched_softirq().
#   
#   Signed-off-by: Ingo Molnar <mingo@elte.hu>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# net/core/sock.c
#   2005/01/07 21:43:59-08:00 mingo@elte.hu +9 -0
#   sched: net: fix scheduling latencies in __release_sock
# 
# ChangeSet
#   2005/01/08 13:51:03-08:00 mingo@elte.hu 
#   [PATCH] sched: net: fix scheduling latencies in netstat
#   
#   The attached patch fixes long scheduling latencies caused by access to the
#   /proc/net/tcp file.  The seqfile functions keep softirqs disabled for a
#   very long time (i've seen reports of 20+ msecs, if there are enough sockets
#   in the system).  With the attached patch it's below 100 usecs.
#   
#   The cond_resched_softirq() relies on the implicit knowledge that this code
#   executes in process context and runs with softirqs disabled.
#   
#   Potentially enabling softirqs means that the socket list might change
#   between buckets - but this is not an issue since seqfiles have a 4K
#   iteration granularity anyway and /proc/net/tcp is often (much) larger than
#   that.
#   
#   Signed-off-by: Ingo Molnar <mingo@elte.hu>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# net/ipv4/tcp_ipv4.c
#   2005/01/07 21:43:59-08:00 mingo@elte.hu +8 -1
#   sched: net: fix scheduling latencies in netstat
# 
# ChangeSet
#   2005/01/08 13:50:46-08:00 mingo@elte.hu 
#   [PATCH] sched: vfs: fix scheduling latencies in prune_dcache() and select_parent()
#   
#   The attached patch fixes long scheduling latencies in select_parent() and
#   prune_dcache().  The prune_dcache() lock-break is easy, but for
#   select_parent() the only viable solution i found was to break out if
#   there's a resched necessary - the reordering is not necessary and the
#   dcache scanning/shrinking will later on do it anyway.
#   
#   Signed-off-by: Ingo Molnar <mingo@elte.hu>
#   Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/dcache.c
#   2005/01/07 21:56:37-08:00 mingo@elte.hu +20 -1
#   sched: vfs: fix scheduling latencies in prune_dcache() and select_parent()
# 
# ChangeSet
#   2005/01/08 13:50:26-08:00 mingo@elte.hu 
#   [PATCH] break latency in invalidate_list()
#   
#   break latency in invalidate_list().
#   
#   Signed-off-by: Ingo Molnar <mingo@elte.hu>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/inode.c
#   2005/01/07 21:56:45-08:00 mingo@elte.hu +8 -0
#   break latency in invalidate_list()
# 
# ChangeSet
#   2005/01/08 13:50:09-08:00 mingo@elte.hu 
#   [PATCH] sched: ext3: fix scheduling latencies in ext3
#   
#   The attached patch fixes long scheduling latencies in the ext3 code, and it
#   also cleans up the existing lock-break functionality to use the new
#   primitives.
#   
#   This patch has been in the -VP patchset for quite some time.
#   
#   Signed-off-by: Ingo Molnar <mingo@elte.hu>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/jbd/recovery.c
#   2005/01/07 21:43:58-08:00 mingo@elte.hu +2 -0
#   sched: ext3: fix scheduling latencies in ext3
# 
# fs/jbd/commit.c
#   2005/01/07 21:43:58-08:00 mingo@elte.hu +10 -7
#   sched: ext3: fix scheduling latencies in ext3
# 
# fs/jbd/checkpoint.c
#   2005/01/07 21:43:58-08:00 mingo@elte.hu +12 -0
#   sched: ext3: fix scheduling latencies in ext3
# 
# fs/ext3/super.c
#   2005/01/07 21:43:58-08:00 mingo@elte.hu +7 -1
#   sched: ext3: fix scheduling latencies in ext3
# 
# fs/ext3/namei.c
#   2005/01/07 21:43:58-08:00 mingo@elte.hu +1 -0
#   sched: ext3: fix scheduling latencies in ext3
# 
# fs/ext3/ialloc.c
#   2005/01/07 21:43:58-08:00 mingo@elte.hu +1 -0
#   sched: ext3: fix scheduling latencies in ext3
# 
# fs/ext3/balloc.c
#   2005/01/07 21:43:58-08:00 mingo@elte.hu +5 -0
#   sched: ext3: fix scheduling latencies in ext3
# 
# ChangeSet
#   2005/01/08 13:49:52-08:00 mingo@elte.hu 
#   [PATCH] sched: add cond_resched_softirq()
#   
#   It adds cond_resched_softirq() which can be used by _process context_
#   softirqs-disabled codepaths to preempt if necessary.  The function will
#   enable softirqs before scheduling.  (Later patches will use this
#   primitive.)
#   
#   Signed-off-by: Ingo Molnar <mingo@elte.hu>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# kernel/sched.c
#   2005/01/07 21:56:47-08:00 mingo@elte.hu +16 -0
#   sched: add cond_resched_softirq()
# 
# include/linux/sched.h
#   2005/01/07 21:56:11-08:00 mingo@elte.hu +3 -0
#   sched: add cond_resched_softirq()
# 
# ChangeSet
#   2005/01/08 13:49:36-08:00 mingo@elte.hu 
#   [PATCH] add lock_need_resched()
#   
#   Add lock_need_resched() which is to check for the necessity of lock-break
#   in a critical section.  Used by later latency-break patches.
#   
#   tested on x86, should work on all architectures.
#   
#   Signed-off-by: Ingo Molnar <mingo@elte.hu>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/sched.h
#   2005/01/07 21:56:50-08:00 mingo@elte.hu +11 -0
#   add lock_need_resched()
# 
# ChangeSet
#   2005/01/08 13:49:19-08:00 mingo@elte.hu 
#   [PATCH] preempt cleanup
#   
#   This is another generic fallout from the voluntary-preempt patchset: a
#   cleanup of the cond_resched() infrastructure, in preparation of the latency
#   reduction patches.  The changes:
#   
#    - uninline cond_resched() - this makes the footprint smaller,
#      especially once the number of cond_resched() points increase.
#   
#    - add a 'was rescheduled' return value to cond_resched. This makes it
#      symmetric to cond_resched_lock() and later latency reduction patches
#      rely on the ability to tell whether there was any preemption.
#   
#    - make cond_resched() more robust by using the same mechanism as
#      preempt_kernel(): by using PREEMPT_ACTIVE. This preserves the task's
#      state - e.g. if the task is in TASK_ZOMBIE but gets preempted via
#      cond_resched() just prior scheduling off then this approach preserves
#      TASK_ZOMBIE.
#   
#    - the patch also adds need_lockbreak() which critical sections can use 
#      to detect lock-break requests.
#   
#   Signed-off-by: Ingo Molnar <mingo@elte.hu>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# kernel/sched.c
#   2005/01/07 21:56:50-08:00 mingo@elte.hu +17 -6
#   preempt cleanup
# 
# include/linux/sched.h
#   2005/01/07 21:56:50-08:00 mingo@elte.hu +16 -7
#   preempt cleanup
# 
# include/linux/hardirq.h
#   2005/01/07 21:56:43-08:00 mingo@elte.hu +1 -1
#   preempt cleanup
# 
# ChangeSet
#   2005/01/08 13:49:02-08:00 mingo@elte.hu 
#   [PATCH] improve preemption on SMP
#   
#   SMP locking latencies are one of the last architectural problems that cause
#   millisec-category scheduling delays.  CONFIG_PREEMPT tries to solve some of
#   the SMP issues but there are still lots of problems remaining: spinlocks
#   nested at multiple levels, spinning with irqs turned off, and non-nested
#   spinning with preemption turned off permanently.
#   
#   The nesting problem goes like this: if a piece of kernel code (e.g.  the MM
#   or ext3's journalling code) does the following:
#   
#   	spin_lock(&spinlock_1);
#   	...
#   	spin_lock(&spinlock_2);
#   	...
#   
#   then even with CONFIG_PREEMPT enabled, current kernels may spin on
#   spinlock_2 indefinitely.  A number of critical sections break their long
#   paths by using cond_resched_lock(), but this does not break the path on
#   SMP, because need_resched() *of the other CPU* is not set so
#   cond_resched_lock() doesnt notice that a reschedule is due.
#   
#   to solve this problem i've introduced a new spinlock field,
#   lock->break_lock, which signals towards the holding CPU that a
#   spinlock-break is requested by another CPU.  This field is only set if a
#   CPU is spinning in a spinlock function [at any locking depth], so the
#   default overhead is zero.  I've extended cond_resched_lock() to check for
#   this flag - in this case we can also save a reschedule.  I've added the
#   lock_need_resched(lock) and need_lockbreak(lock) methods to check for the
#   need to break out of a critical section.
#   
#   Another latency problem was that the stock kernel, even with CONFIG_PREEMPT
#   enabled, didnt have any spin-nicely preemption logic for the following,
#   commonly used SMP locking primitives: read_lock(), spin_lock_irqsave(),
#   spin_lock_irq(), spin_lock_bh(), read_lock_irqsave(), read_lock_irq(),
#   read_lock_bh(), write_lock_irqsave(), write_lock_irq(), write_lock_bh().
#   Only spin_lock() and write_lock() [the two simplest cases] where covered.
#   
#   In addition to the preemption latency problems, the _irq() variants in the
#   above list didnt do any IRQ-enabling while spinning - possibly resulting in
#   excessive irqs-off sections of code!
#   
#   preempt-smp.patch fixes all these latency problems by spinning irq-nicely
#   (if possible) and by requesting lock-breaks if needed.  Two
#   architecture-level changes were necessary for this: the addition of the
#   break_lock field to spinlock_t and rwlock_t, and the addition of the
#   _raw_read_trylock() function.
#   
#   Testing done by Mark H Johnson and myself indicate SMP latencies comparable
#   to the UP kernel - while they were basically indefinitely high without this
#   patch.
#   
#   i successfully test-compiled and test-booted this patch ontop of BK-curr
#   using the following .config combinations: SMP && PREEMPT, !SMP && PREEMPT,
#   SMP && !PREEMPT and !SMP && !PREEMPT on x86, !SMP && !PREEMPT and SMP &&
#   PREEMPT on x64.  I also test-booted x86 with the generic_read_trylock
#   function to check that it works fine.  Essentially the same patch has been
#   in testing as part of the voluntary-preempt patches for some time already.
#   
#   NOTE to architecture maintainers: generic_raw_read_trylock() is a crude
#   version that should be replaced with the proper arch-optimized version
#   ASAP.
#   
#   From: Hugh Dickins <hugh@veritas.com>
#   
#   The i386 and x86_64 _raw_read_trylocks in preempt-smp.patch are too
#   successful: atomic_read() returns a signed integer.
#   
#   Signed-off-by: Ingo Molnar <mingo@elte.hu>
#   Signed-off-by: Hugh Dickins <hugh@veritas.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# kernel/spinlock.c
#   2005/01/07 21:43:58-08:00 mingo@elte.hu +147 -88
#   improve preemption on SMP
# 
# kernel/sched.c
#   2005/01/07 21:56:50-08:00 mingo@elte.hu +31 -0
#   improve preemption on SMP
# 
# include/linux/spinlock.h
#   2005/01/07 21:56:36-08:00 mingo@elte.hu +17 -6
#   improve preemption on SMP
# 
# include/linux/sched.h
#   2005/01/07 21:56:50-08:00 mingo@elte.hu +1 -17
#   improve preemption on SMP
# 
# include/asm-x86_64/spinlock.h
#   2005/01/07 21:43:58-08:00 mingo@elte.hu +16 -0
#   improve preemption on SMP
# 
# include/asm-sparc64/spinlock.h
#   2005/01/07 21:43:58-08:00 mingo@elte.hu +2 -0
#   improve preemption on SMP
# 
# include/asm-sparc/spinlock.h
#   2005/01/07 21:43:58-08:00 mingo@elte.hu +20 -3
#   improve preemption on SMP
# 
# include/asm-sh/spinlock.h
#   2005/01/07 21:43:58-08:00 mingo@elte.hu +8 -0
#   improve preemption on SMP
# 
# include/asm-s390/spinlock.h
#   2005/01/07 21:43:58-08:00 mingo@elte.hu +8 -0
#   improve preemption on SMP
# 
# include/asm-ppc64/spinlock.h
#   2005/01/07 21:43:58-08:00 mingo@elte.hu +8 -0
#   improve preemption on SMP
# 
# include/asm-ppc/spinlock.h
#   2005/01/07 21:43:58-08:00 mingo@elte.hu +8 -0
#   improve preemption on SMP
# 
# include/asm-parisc/system.h
#   2005/01/07 21:43:58-08:00 mingo@elte.hu +3 -0
#   improve preemption on SMP
# 
# include/asm-parisc/spinlock.h
#   2005/01/07 21:43:58-08:00 mingo@elte.hu +5 -0
#   improve preemption on SMP
# 
# include/asm-mips/spinlock.h
#   2005/01/07 21:43:58-08:00 mingo@elte.hu +8 -0
#   improve preemption on SMP
# 
# include/asm-ia64/spinlock.h
#   2005/01/07 21:43:58-08:00 mingo@elte.hu +8 -0
#   improve preemption on SMP
# 
# include/asm-i386/spinlock.h
#   2005/01/07 21:43:58-08:00 mingo@elte.hu +16 -0
#   improve preemption on SMP
# 
# include/asm-arm/spinlock.h
#   2005/01/07 21:43:58-08:00 mingo@elte.hu +8 -0
#   improve preemption on SMP
# 
# include/asm-alpha/spinlock.h
#   2005/01/07 21:43:58-08:00 mingo@elte.hu +6 -0
#   improve preemption on SMP
# 
# ChangeSet
#   2005/01/08 13:48:44-08:00 nathanl@austin.ibm.com 
#   [PATCH] ppc64: call idle_task_exit from cpu_die
#   
#   Call idle_task_exit from cpu_die to avoid mm_struct leak.
#   
#   Signed-off-by: Nathan Lynch <nathanl@austin.ibm.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/ppc64/kernel/setup.c
#   2005/01/07 21:43:57-08:00 nathanl@austin.ibm.com +1 -0
#   ppc64: call idle_task_exit from cpu_die
# 
# ChangeSet
#   2005/01/08 13:48:27-08:00 nathanl@austin.ibm.com 
#   [PATCH] introduce idle_task_exit
#   
#   Heiko Carstens figured out that offlining a cpu can leak mm_structs because
#   the dying cpu's idle task fails to switch to init_mm and mmdrop its
#   active_mm before the cpu is down.  This patch introduces idle_task_exit,
#   which allows the idle task to do this as Ingo suggested.
#   
#   I will follow this up with a patch for ppc64 which calls idle_task_exit
#   from cpu_die.
#   
#   Signed-off-by: Nathan Lynch <nathanl@austin.ibm.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# kernel/sched.c
#   2005/01/07 21:56:51-08:00 nathanl@austin.ibm.com +14 -0
#   introduce idle_task_exit
# 
# include/linux/sched.h
#   2005/01/07 21:56:51-08:00 nathanl@austin.ibm.com +1 -0
#   introduce idle_task_exit
# 
# ChangeSet
#   2005/01/08 13:48:10-08:00 josha@sgi.com 
#   [PATCH] sched: remove outdated/misleading comments
#   
#   This patch removes two outdated/misleading comments from the CPU scheduler.
#   
#   1) The first comment removed is simply incorrect.  The function it
#      comments on is not used for what the comments says it is anymore.
#   
#   2) The second comment is a leftover from when the "if" block it comments
#      on contained a goto.  It does not any more, and the comment doesn't make
#      sense.
#   
#   There isn't really a reason to add different comments, though someone might
#   feel differently in the case of the second one.  I'll leave adding a
#   comment to anybody who wants to - more important to just get rid of them
#   now.
#   
#   Signed-off-by: Josh Aas <josha@sgi.com>
#   Acked-by: Ingo Molnar <mingo@elte.hu>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# kernel/sched.c
#   2005/01/07 21:56:51-08:00 josha@sgi.com +1 -9
#   sched: remove outdated/misleading comments
# 
# ChangeSet
#   2005/01/08 13:47:53-08:00 dcn@sgi.com 
#   [PATCH] export sched_setscheduler() for kernel module use
#   
#   This patch exports sched_setscheduler() so that it can be used by a kernel
#   module to set a kthread's scheduling policy and associated parameters.
#   
#   Signed-off-by: Dean Nelson <dcn@sgi.com>
#   Acked-by: Ingo Molnar <mingo@elte.hu>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# kernel/sched.c
#   2005/01/07 21:56:51-08:00 dcn@sgi.com +45 -46
#   export sched_setscheduler() for kernel module use
# 
# include/linux/sched.h
#   2005/01/07 21:56:51-08:00 dcn@sgi.com +1 -0
#   export sched_setscheduler() for kernel module use
# 
# ChangeSet
#   2005/01/08 13:47:36-08:00 rml@novell.com 
#   [PATCH] sched: no need to recalculate rq
#   
#   no need to call task_rq in setscheduler; just use rq
#   
#   Signed-Off-By: Robert Love <rml@novell.com>
#   Acked-by: Ingo Molnar <mingo@elte.hu>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# kernel/sched.c
#   2005/01/07 21:56:51-08:00 rml@novell.com +2 -2
#   sched: no need to recalculate rq
# 
# ChangeSet
#   2005/01/08 13:47:19-08:00 oleg@tv-sign.ru 
#   [PATCH] don't hide thread_group_leader() from grep
#   
#   Replace open-coded thread_group_leader() calls.
#   
#   Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
#   Acked-by: Ingo Molnar <mingo@elte.hu>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/exec.c
#   2005/01/07 21:56:48-08:00 oleg@tv-sign.ru +3 -3
#   don't hide thread_group_leader() from grep
# 
# fs/binfmt_elf.c
#   2005/01/07 21:43:57-08:00 oleg@tv-sign.ru +1 -1
#   don't hide thread_group_leader() from grep
# 
# ChangeSet
#   2005/01/08 13:47:03-08:00 oleg@tv-sign.ru 
#   [PATCH] sched: use cached current value
#   
#   schedule() can use prev instead of get_current().
#   
#   Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
#   Acked-by: Ingo Molnar <mingo@elte.hu>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# kernel/sched.c
#   2005/01/07 21:56:52-08:00 oleg@tv-sign.ru +3 -3
#   sched: use cached current value
# 
# ChangeSet
#   2005/01/08 13:46:46-08:00 kernel@kolivas.org 
#   [PATCH] sched: remove_interactive_credit
#   
#   Special casing tasks by interactive credit was helpful for preventing fully
#   cpu bound tasks from easily rising to interactive status.
#   
#   However it did not select out tasks that had periods of being fully cpu
#   bound and then sleeping while waiting on pipes, signals etc.  This led to a
#   more disproportionate share of cpu time.
#   
#   Backing this out will no longer special case only fully cpu bound tasks,
#   and prevents the variable behaviour that occurs at startup before tasks
#   declare themseleves interactive or not, and speeds up application startup
#   slightly under certain circumstances.  It does cost in interactivity
#   slightly as load rises but it is worth it for the fairness gains.
#   
#   Signed-off-by: Con Kolivas <kernel@kolivas.org>
#   Acked-by: Ingo Molnar <mingo@elte.hu>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# kernel/sched.c
#   2005/01/07 21:56:52-08:00 kernel@kolivas.org +9 -37
#   sched: remove_interactive_credit
# 
# include/linux/sched.h
#   2005/01/07 21:56:51-08:00 kernel@kolivas.org +0 -1
#   sched: remove_interactive_credit
# 
# ChangeSet
#   2005/01/08 13:46:30-08:00 kernel@kolivas.org 
#   [PATCH] sched: requeue_granularity
#   
#   Change the granularity code to requeue tasks at their best priority instead
#   of changing priority while they're running.  This keeps tasks at their top
#   interactive level during their whole timeslice.
#   
#   Signed-off-by: Con Kolivas <kernel@kolivas.org>
#   Acked-by: Ingo Molnar <mingo@elte.hu>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# kernel/sched.c
#   2005/01/07 21:56:52-08:00 kernel@kolivas.org +1 -3
#   sched: requeue_granularity
# 
# ChangeSet
#   2005/01/08 13:46:13-08:00 kernel@kolivas.org 
#   [PATCH] sched: add_requeue_task
#   
#   We can requeue tasks for cheaper then doing a complete dequeue followed by
#   an enqueue.  Add the requeue_task function and perform it where possible.
#   
#   This will be hit frequently by upcoming changes to the requeueing in
#   timeslice granularity.
#   
#   Signed-off-by: Con Kolivas <kernel@kolivas.org>
#   Acked-by: Ingo Molnar <mingo@elte.hu>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# kernel/sched.c
#   2005/01/07 21:56:52-08:00 kernel@kolivas.org +18 -4
#   sched: add_requeue_task
# 
# ChangeSet
#   2005/01/08 13:45:57-08:00 kernel@kolivas.org 
#   [PATCH] sched: adjust_timeslice_granularity
#   
#   The minimum timeslice was decreased from 10ms to 5ms.  In the process, the
#   timeslice granularity was leading to much more rapid round robinning of
#   interactive tasks at cache trashing levels.
#   
#   Restore minimum granularity to 10ms.
#   
#   Signed-off-by: Con Kolivas <kernel@kolivas.org>
#   Acked-by: Ingo Molnar <mingo@elte.hu>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# kernel/sched.c
#   2005/01/07 21:56:52-08:00 kernel@kolivas.org +4 -2
#   sched: adjust_timeslice_granularity
# 
# ChangeSet
#   2005/01/08 13:45:40-08:00 kernel@kolivas.org 
#   [PATCH] sched: alter_kthread_prio
#   
#   Timeslice proportion has been increased substantially for -niced tasks.  As
#   a result of this kernel threads have much larger timeslices than they
#   previously had.
#   
#   Change kernel threads' nice value to -5 to bring their timeslice back in
#   line with previous behaviour.  This means kernel threads will be less
#   likely to cause large latencies under periods of system stress for normal
#   nice 0 tasks.
#   
#   Signed-off-by: Con Kolivas <kernel@kolivas.org>
#   Acked-by: Ingo Molnar <mingo@elte.hu>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# kernel/workqueue.c
#   2005/01/07 21:56:35-08:00 kernel@kolivas.org +1 -1
#   sched: alter_kthread_prio
# 
# ChangeSet
#   2005/01/08 13:45:24-08:00 kernel@kolivas.org 
#   [PATCH] sched.c whitespace mangler
#   
#   Convert whitespace in sched.c to tabs
#   
#   Signed-off-by: Con Kolivas <kernel@kolivas.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# kernel/sched.c
#   2005/01/07 21:56:53-08:00 kernel@kolivas.org +2 -2
#   sched.c whitespace mangler
# 
# ChangeSet
#   2005/01/08 13:45:08-08:00 anton@samba.org 
#   [PATCH] sched: reset cache_hot_time
#   
#   Reset cache_hot_time to sane values (in the ms range).  Some recent changes
#   resulted in values in the us range.
#   
#   Signed-off-by: Anton Blanchard <anton@samba.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/topology.h
#   2005/01/07 21:56:45-08:00 anton@samba.org +1 -1
#   sched: reset cache_hot_time
# 
# include/asm-x86_64/topology.h
#   2005/01/07 21:43:55-08:00 anton@samba.org +1 -1
#   sched: reset cache_hot_time
# 
# include/asm-ppc64/topology.h
#   2005/01/07 21:43:55-08:00 anton@samba.org +1 -1
#   sched: reset cache_hot_time
# 
# include/asm-i386/topology.h
#   2005/01/07 21:43:55-08:00 anton@samba.org +1 -1
#   sched: reset cache_hot_time
# 
# ChangeSet
#   2005/01/08 13:44:51-08:00 colpatch@us.ibm.com 
#   [PATCH] sched: active_load_balance() fixlet
#   
#   There is a small problem with the active_load_balance() patch that Darren
#   sent out last week.  As soon as we discover a potential 'target_cpu' from
#   'cpu_group' to try to push tasks to, we cease considering other CPUs in
#   that group as potential 'target_cpu's.  We break out of the
#   for_each_cpu_mask() loop and try to push tasks to that CPU.  The problem is
#   that there may well be other idle cpus in that group that we should also
#   try to push tasks to.  Here is a patch to fix that small problem.  The
#   solution is to simply move the code that tries to push the tasks into the
#   for_each_cpu_mask() loop and do away with the whole 'target_cpu' thing
#   entirely.  Compiled & booted on a 16-way x440.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# kernel/sched.c
#   2005/01/07 21:56:53-08:00 colpatch@us.ibm.com +32 -33
#   sched: active_load_balance() fixlet
# 
# ChangeSet
#   2005/01/08 13:44:34-08:00 habanero@us.ibm.com 
#   [PATCH] sched: newidle fix
#   
#   Allow idle_balance to search an incresingly larger span of cpus to find a
#   cpu.  Minor change, NODE_SD_INIT gets SD_BALANCE_NEWIDLE flag.  This is
#   critical for x86_64, where there is only one cpu oer node.  In the current
#   code, idle_balance for Opteron -never- works.
#   
#   Signed-off-by: <habanero@us.ibm.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-x86_64/topology.h
#   2005/01/07 21:56:53-08:00 habanero@us.ibm.com +1 -0
#   sched: newidle fix
# 
# include/asm-ppc64/topology.h
#   2005/01/07 21:56:53-08:00 habanero@us.ibm.com +1 -0
#   sched: newidle fix
# 
# include/asm-ia64/topology.h
#   2005/01/07 21:43:55-08:00 habanero@us.ibm.com +1 -0
#   sched: newidle fix
# 
# include/asm-i386/topology.h
#   2005/01/07 21:56:53-08:00 habanero@us.ibm.com +1 -0
#   sched: newidle fix
# 
# ChangeSet
#   2005/01/08 13:44:22-08:00 habanero@us.ibm.com 
#   [PATCH] sched: can_migrate exception for idle cpus
#   
#   Fix can_migrate to allow aggressive steal for idle cpus.  This -was- in
#   mainline, but I believe sched_domains kind of blasted it outta there.  IMO,
#   it's a no brainer for an idle cpu (with all that cache going to waste) to
#   be granted to steal a task.  The one enhancement I have made was to make
#   sure the whole cpu was idle.
#   
#   Signed-off-by: <habanero@us.ibm.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# kernel/sched.c
#   2005/01/07 21:56:53-08:00 habanero@us.ibm.com +27 -23
#   sched: can_migrate exception for idle cpus
# 
# ChangeSet
#   2005/01/08 13:44:05-08:00 habanero@us.ibm.com 
#   [PATCH] sched: more agressive wake_idle()
#   
#   This patch addresses some problems with wake_idle().  Currently wake_idle()
#   will wake a task on an alternate cpu if:
#   
#   1) task->cpu is not idle
#   2) an idle cpu can be found
#   
#   However the span of cpus to look for is very limited (only the task->cpu's
#   sibling).  The scheduler should find the closest idle cpu, starting with
#   the lowest level domain, then going to higher level domains if allowed
#   (doamin has flag SD_WAKE_IDLE).  This patch does this.
#   
#   This and the other two patches (also to be submitted) combined have
#   provided as much at 5% improvement on that "online transaction DB workload"
#   and 2% on the industry standard J@EE workload.
#   
#   I asked Martin Bligh to test these for regression, and he did not find any.
#    I would like to submit for inclusion to -mm and barring any problems
#   eventually to mainline.
#   
#   Signed-off-by: <habanero@us.ibm.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# kernel/sched.c
#   2005/01/07 21:56:53-08:00 habanero@us.ibm.com +15 -15
#   sched: more agressive wake_idle()
# 
# include/linux/topology.h
#   2005/01/07 21:56:53-08:00 habanero@us.ibm.com +1 -0
#   sched: more agressive wake_idle()
# 
# include/asm-x86_64/topology.h
#   2005/01/07 21:56:53-08:00 habanero@us.ibm.com +1 -0
#   sched: more agressive wake_idle()
# 
# include/asm-ppc64/topology.h
#   2005/01/07 21:56:53-08:00 habanero@us.ibm.com +1 -0
#   sched: more agressive wake_idle()
# 
# include/asm-ia64/topology.h
#   2005/01/07 21:56:53-08:00 habanero@us.ibm.com +1 -0
#   sched: more agressive wake_idle()
# 
# include/asm-i386/topology.h
#   2005/01/07 21:56:53-08:00 habanero@us.ibm.com +1 -0
#   sched: more agressive wake_idle()
# 
# ChangeSet
#   2005/01/08 13:43:47-08:00 neilb@cse.unsw.edu.au 
#   [PATCH] nfsd4_setclientid_confirm locking fix
#   
#   Avoid unlock-without-lock problem on error path in nfsd4_setclientid_confirm
#   
#   Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
#   Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/nfsd/nfs4state.c
#   2005/01/07 21:43:54-08:00 neilb@cse.unsw.edu.au +1 -2
#   nfsd4_setclientid_confirm locking fix
# 
# ChangeSet
#   2005/01/08 13:43:31-08:00 gnb@melbourne.sgi.com 
#   [PATCH] oprofile: fix ia64 callgraph bug with old gcc
#   
#   With Keith Owens <kaos@sgi.com>
#   
#   This patch from Keith Owens fixes a bug in the ia64 port of oprofile when
#   built without the kdb patch and with a pre-3.4 gcc.
#   
#   If you build a standard kernel with gcc < 3.4 then
#   ia64_spinlock_contention_pre3_4 is defined.  But a standard kernel does not
#   have ia64_spinlock_contention_pre3_4_end, that label is only added by the
#   kdb patch.  To get the backtrace profiling with gcc < 3.4, the _end label
#   needs to be added as part of the kernprof patch, then I will remove it from
#   kdb.
#   
#   Signed-off-by: Keith Owens <kaos@sgi.com>
#   Signed-off-by: Greg Banks <gnb@melbourne.sgi.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/ia64/kernel/head.S
#   2005/01/07 21:43:54-08:00 gnb@melbourne.sgi.com +2 -0
#   oprofile: fix ia64 callgraph bug with old gcc
# 
# ChangeSet
#   2005/01/08 13:43:14-08:00 tharbaugh@lnxi.com 
#   [PATCH] initramfs: unprivileged image creation
#   
#   This patch makes several tweaks so that an initramfs image can be
#   completely created by an unprivileged user.  It should maintain
#   compatibility with previous initramfs early userspace cpio/image creation
#   and it updates documentation.
#   
#   There are a few very important tweaks:
#   
#   CONFIG_INITRAMFS_SOURCE is now either a single cpio archive that is
#   directly used or a list of directories and files for building a cpio
#   archive for the initramfs image.  Making the cpio archive listable in
#   CONFIG_INITRAMFS_SOURCE makes the cpio step more official and automated so
#   that it doesn't have to be copied by hand to usr/initramfs_data.cpio (I
#   think this was broken anyway and would be overwritten).  The alternative
#   list of directories *and* files means that files can be install in a "root"
#   directory and device-special files can be listed in a file list.
#   
#   CONFIG_ROOT_UID and CONFIG_ROOT_GID are now available for doing simple
#   user/group ID translation.  That means that user ID 500, group ID 500 can
#   create all the files in the "root" directory, but that they can all be
#   owned by user ID 0, group ID 0 in the cpio image.
#   
#   Various documentation updates to pull it all together.
#   
#   Removal of old cruft that was unused/misleading.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# usr/Makefile
#   2005/01/07 21:43:54-08:00 tharbaugh@lnxi.com +35 -15
#   initramfs: unprivileged image creation
# 
# scripts/gen_initramfs_list.sh
#   2005/01/07 21:43:54-08:00 tharbaugh@lnxi.com +101 -28
#   initramfs: unprivileged image creation
# 
# drivers/block/Kconfig
#   2005/01/07 21:43:54-08:00 tharbaugh@lnxi.com +37 -5
#   initramfs: unprivileged image creation
# 
# Documentation/early-userspace/README
#   2005/01/07 21:43:54-08:00 tharbaugh@lnxi.com +56 -13
#   initramfs: unprivileged image creation
# 
# ChangeSet
#   2005/01/08 13:42:57-08:00 tytso@mit.edu 
#   [PATCH] ext3 htree telldir() fix
#   
#   telldir() is broken on large ext3 dir_index'd directories because
#   getdents() gives d_off==0 for the first entry
#   
#   Here's a patch which fixes the problem, but note the following warning
#   from the readdir man page:
#   
#          According to POSIX, the dirent structure contains a field char d_name[]
#          of  unspecified  size,  with  at most NAME_MAX characters preceding the
#          terminating null character.  Use of other fields will harm  the  porta-
#          bility  of  your  programs.
#   
#   Also, as always, telldir() and seekdir() are truly awful interfaces
#   because they implicitly assume that (a) a directory is a linear data
#   structure, and (b) that the position in a directory can be expressed
#   in a cookie which hsa only 31 bits on 32-bit systems. 
#   
#   So there will be hash colliions that will cause programs that assume
#   that seekdir(dirent->d_off) will always return the next directory
#   entry to sometimes lose directory entries in the
#   not-as-unlikely-as-we-would wish case of a 31-bit hash collision.
#   Really, any program which is using telldir/seekdir really should be
#   rewritten to not use these interfaces if at all possible.  So with
#   these caveats....
#   
#   
#   What we need to do is wire '.' and '..' to have hash values of (0,0) and
#   (2,0), respectively, without ignoring other existing dirents with colliding
#   hashes.  (In those cases the programs will break, but they are statistically
#   rare, and there's not much we can do in those cases anyway.)
#   
#   Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/ext3/namei.c
#   2005/01/07 21:56:50-08:00 tytso@mit.edu +6 -2
#   ext3 htree telldir() fix
# 
# ChangeSet
#   2005/01/08 13:42:41-08:00 miltonm@bga.com 
#   [PATCH] INITRAMFS: allow no trailer
#   
#   According to "initramfs buffer format -- third draft"
#   http://lwn.net/2002/0117/a/initramfs-buffer-format.php3 "the cpio
#   "TRAILER!!!" entry (cpio end-of-archive) is optional, but is not ignored"
#   
#   The kernel handling does not follow this spec.  If you add null padding
#   after an uncompressed cpio without TRAILER!!!  the kernel complains "no
#   cpio magic".  In a gzipped archive one gets "junk in gzipped archive"
#   without the TRAILER!!!
#   
#   This patch changes the state transitions so the kernel will follow the spec.
#   
#   Tested: padded uncompressed, padded compressed, unpadded compressed (error)
#   and trailing junk in compressed (error)
#   
#   ===
#   
#   I have a boot loader that knows how to load files, determine their size,
#   and advance to the next 4-byte boundary and reports the total size of the
#   files loaded.  It doesn't understand about converting this number to some
#   ASCII representation.
#   
#   With this patch I can embed the contents of a file padded with NULs
#   with out knowing the exact size of the file with the following files:
#   
#   1) file containing cpio header & file name, padded to 4 bytes
#   2) contents of file
#   3) pad file of zeros, the size at least as large as the that specified
#      for the file.
#   
#   hpa points out that you should be careful with the headers, use unique
#   inode numbers and/or add a cpio header with just TRAILER!!!  to reset the
#   inode hash table to avoid unwanted hard links.  I just put this sequence as
#   the last files loaded.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# init/initramfs.c
#   2005/01/07 21:56:11-08:00 miltonm@bga.com +6 -3
#   INITRAMFS: allow no trailer
# 
# ChangeSet
#   2005/01/08 13:42:25-08:00 tharbaugh@lnxi.com 
#   [PATCH] gen_init_cpio symlink, pipe and socket support
#   
#   This patch makes gen_init_cpio more complete by adding symlink, pipe and
#   socket support.  It updates scripts/gen_initramfs_list.sh to support the
#   new types.  The patch applies to the recent mm series that already have the
#   updated gen_init_cpio and gen_initramfs_list.sh.
#   
#   From: William Lee Irwin III <wli@holomorphy.com>
#   
#   The rest of gen_init_cpio.c seems to cast the result of strlen() to handle
#   this situation, so this patch follows suit while killing off size_t -related
#   printk() warnings.
#   
#   Signed-off-by: William Irwin <wli@holomorphy.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# usr/gen_init_cpio.c
#   2005/01/07 21:43:53-08:00 tharbaugh@lnxi.com +124 -14
#   gen_init_cpio symlink, pipe and socket support
# 
# scripts/gen_initramfs_list.sh
#   2005/01/07 21:56:54-08:00 tharbaugh@lnxi.com +15 -3
#   gen_init_cpio symlink, pipe and socket support
# 
# drivers/block/Kconfig
#   2005/01/07 21:56:54-08:00 tharbaugh@lnxi.com +3 -18
#   gen_init_cpio symlink, pipe and socket support
# 
# Documentation/early-userspace/README
#   2005/01/07 21:56:54-08:00 tharbaugh@lnxi.com +15 -7
#   gen_init_cpio symlink, pipe and socket support
# 
# ChangeSet
#   2005/01/08 13:42:10-08:00 rddunlap@osdl.org 
#   [PATCH] ibmasm: fix init/exit sections
#   
#   Fix init & exit section usage, started with this diagnostic from
#   reference_discarded.pl (make buildcheck):
#   
#   Error: ./drivers/misc/ibmasm/module.o .data refers to 00000058 R_386_32          .exit.text
#   
#   Signed-off-by: Randy Dunlap <rddunlap@osdl.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/misc/ibmasm/module.c
#   2005/01/07 21:56:39-08:00 rddunlap@osdl.org +2 -2
#   ibmasm: fix init/exit sections
# 
# ChangeSet
#   2005/01/08 13:41:53-08:00 jgarzik@pobox.com 
#   [PATCH] fix sx8 blk driver device naming
#   
#   Attached fixes sysfs naming of sx8 block devs to follow LANANA naming.
#   
#   You then get /sys/block/sx8!0, etc instead of /sys/block/sx80_0 (device
#   names should be /dev/sx8/0 instead of /dev/sx80_0)
#   
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/block/sx8.c
#   2005/01/07 21:43:53-08:00 jgarzik@pobox.com +1 -1
#   fix sx8 blk driver device naming
# 
# ChangeSet
#   2005/01/08 13:41:36-08:00 pmeda@akamai.com 
#   [PATCH] readdir: return value missed in getdents64
#   
#   Small issue: return value missed in getdents64, but handled in getdents.
#   
#   Signed-Off-by: Prasanna Meda <pmeda@akamai.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/readdir.c
#   2005/01/07 21:43:53-08:00 pmeda@akamai.com +2 -1
#   readdir: return value missed in getdents64
# 
# ChangeSet
#   2005/01/08 13:41:19-08:00 stsp@aknet.ru 
#   [PATCH] fix cdrom autoclose
#   
#   The attached patch fixes the CD-ROM autoclose.  It is broken in recent
#   kernels for CD-ROMs that do not properly report that the tray is opened.
#   Now on such a drives the kernel will do one close attempt and check for the
#   disc again.  This is how it used to work in the past.
#   
#   Signed-off-by: Stas Sergeev <stsp@aknet.ru>
#   Acked-by: Alexander Kern <alex.kern@gmx.de>
#   Acked-by: Jens Axboe <axboe@suse.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/ide/ide-cd.c
#   2005/01/07 21:43:53-08:00 stsp@aknet.ru +2 -2
#   fix cdrom autoclose
# 
# drivers/cdrom/cdrom.c
#   2005/01/07 21:56:27-08:00 stsp@aknet.ru +2 -0
#   fix cdrom autoclose
# 
# ChangeSet
#   2005/01/08 13:41:01-08:00 nathanl@austin.ibm.com 
#   [PATCH] prohibit slash in proc directory entry names
#   
#   proc_create() needs to check that the name of an entry to be created does
#   not contain a '/' character.
#   
#   To test, I hacked the ibmveth driver to try to call request_irq with a
#   bogus "foo/bar" devname.  The creation of the /proc/irq/1234/xxx entry
#   silently fails, as intended.  Perhaps the irq code should be made to check
#   for the failure.
#   
#   Signed-off-by: Nathan Lynch <nathanl@austin.ibm.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/proc/generic.c
#   2005/01/07 21:43:53-08:00 nathanl@austin.ibm.com +5 -0
#   prohibit slash in proc directory entry names
# 
# ChangeSet
#   2005/01/08 13:40:44-08:00 olh@suse.de 
#   [PATCH] request_irq: avoid slash in proc directory entries
#   
#   A few users of request_irq pass a string with '/'.
#   As a result, ls -l /proc/irq/*/* will fail to list these entries.
#   
#   Signed-off-by: Olaf Hering <olh@suse.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# sound/isa/opl3sa2.c
#   2005/01/07 21:43:53-08:00 olh@suse.de +1 -1
#   request_irq: avoid slash in proc directory entries
# 
# include/asm-sh64/keyboard.h
#   2005/01/07 21:43:53-08:00 olh@suse.de +1 -1
#   request_irq: avoid slash in proc directory entries
# 
# include/asm-sh/mpc1211/keyboard.h
#   2005/01/07 21:43:53-08:00 olh@suse.de +1 -1
#   request_irq: avoid slash in proc directory entries
# 
# drivers/net/wan/hostess_sv11.c
#   2005/01/07 21:56:23-08:00 olh@suse.de +1 -1
#   request_irq: avoid slash in proc directory entries
# 
# drivers/macintosh/via-pmu.c
#   2005/01/07 21:43:53-08:00 olh@suse.de +1 -1
#   request_irq: avoid slash in proc directory entries
# 
# drivers/input/serio/maceps2.c
#   2005/01/07 21:43:53-08:00 olh@suse.de +1 -1
#   request_irq: avoid slash in proc directory entries
# 
# ChangeSet
#   2005/01/08 13:40:27-08:00 olof@austin.ibm.com 
#   [PATCH] ppc64: IOMMU cleanups: Main cleanup patch
#   
#   Earlier cleanup efforts of the ppc64 IOMMU code have mostly been targeted
#   at simplifying the allocation schemes and modularising things for the
#   various platforms.  The IOMMU init functions are still a mess.  This is an
#   attempt to clean them up and make them somewhat easier to follow.
#   
#   The new rules are:
#   
#   1. iommu_init_early_<arch> is called before any PCI/VIO init is done
#   2. The pcibios fixup routines will call the iommu_{bus,dev}_setup functions
#      appropriately as devices are added.
#   
#   TCE space allocation has changed somewhat:
#   
#   * On LPARs, nothing is really different. ibm,dma-window properties are still
#     used to determine table sizes.
#   * On pSeries SMP-mode (non-LPAR), the full TCE space per PHB is split up
#     in 256MB chunks, each handed out to one child bus/slot as needed. This
#     makes current max 7 child buses per PHB, something we're currently below
#     on all machine models I'm aware of.
#   * Exception to the above: Pre-POWER4 machines with Python PHBs have a full
#     GB of DMA space allocated at the PHB level, since there are no EADS-level
#     tables on such systems.
#   * PowerMac and Maple still work like before: all buses/slots share one table.
#   * VIO works like before, ibm,my-dma-window is used like before.
#   * iSeries has not been touched much at all, besides the changed unit of
#     the it_size variable in struct iommu_table.
#   
#   Other things changed:
#   * Powermac and maple PCI/IOMMU inits have been changed a bit to conform to
#     the new init structure
#   * pci_dma_direct.c has been renamed pci_direct_iommu.c to match
#     pci_iommu.c (see separate patch)
#   * Likewise, a couple of the pci direct init functions have been renamed.
#   
#   Signed-off-by: Olof Johansson <olof@austin.ibm.com>
#   Acked-by: Paul Mackerras <paulus@samba.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-ppc64/pci-bridge.h
#   2005/01/07 21:43:52-08:00 olof@austin.ibm.com +8 -0
#   ppc64: IOMMU cleanups: Main cleanup patch
# 
# include/asm-ppc64/machdep.h
#   2005/01/07 21:43:52-08:00 olof@austin.ibm.com +2 -0
#   ppc64: IOMMU cleanups: Main cleanup patch
# 
# include/asm-ppc64/iommu.h
#   2005/01/07 21:43:52-08:00 olof@austin.ibm.com +5 -8
#   ppc64: IOMMU cleanups: Main cleanup patch
# 
# arch/ppc64/kernel/vio.c
#   2005/01/07 21:43:52-08:00 olof@austin.ibm.com +7 -11
#   ppc64: IOMMU cleanups: Main cleanup patch
# 
# arch/ppc64/kernel/u3_iommu.c
#   2005/01/07 21:43:52-08:00 olof@austin.ibm.com +63 -41
#   ppc64: IOMMU cleanups: Main cleanup patch
# 
# arch/ppc64/kernel/prom.c
#   2005/01/07 21:43:52-08:00 olof@austin.ibm.com +0 -11
#   ppc64: IOMMU cleanups: Main cleanup patch
# 
# arch/ppc64/kernel/pmac_setup.c
#   2005/01/07 21:43:52-08:00 olof@austin.ibm.com +2 -5
#   ppc64: IOMMU cleanups: Main cleanup patch
# 
# arch/ppc64/kernel/pmac_pci.c
#   2005/01/07 21:43:52-08:00 olof@austin.ibm.com +0 -2
#   ppc64: IOMMU cleanups: Main cleanup patch
# 
# arch/ppc64/kernel/pci_direct_iommu.c
#   2005/01/07 21:43:52-08:00 olof@austin.ibm.com +1 -1
#   ppc64: IOMMU cleanups: Main cleanup patch
# 
# arch/ppc64/kernel/pci.c
#   2005/01/07 21:43:52-08:00 olof@austin.ibm.com +5 -0
#   ppc64: IOMMU cleanups: Main cleanup patch
# 
# arch/ppc64/kernel/pSeries_setup.c
#   2005/01/07 21:43:52-08:00 olof@austin.ibm.com +1 -4
#   ppc64: IOMMU cleanups: Main cleanup patch
# 
# arch/ppc64/kernel/pSeries_pci.c
#   2005/01/07 21:43:52-08:00 olof@austin.ibm.com +1 -4
#   ppc64: IOMMU cleanups: Main cleanup patch
# 
# arch/ppc64/kernel/pSeries_iommu.c
#   2005/01/07 21:43:52-08:00 olof@austin.ibm.com +145 -138
#   ppc64: IOMMU cleanups: Main cleanup patch
# 
# arch/ppc64/kernel/maple_setup.c
#   2005/01/07 21:43:52-08:00 olof@austin.ibm.com +2 -5
#   ppc64: IOMMU cleanups: Main cleanup patch
# 
# arch/ppc64/kernel/maple_pci.c
#   2005/01/07 21:43:52-08:00 olof@austin.ibm.com +0 -3
#   ppc64: IOMMU cleanups: Main cleanup patch
# 
# arch/ppc64/kernel/iommu.c
#   2005/01/07 21:43:52-08:00 olof@austin.ibm.com +9 -12
#   ppc64: IOMMU cleanups: Main cleanup patch
# 
# arch/ppc64/kernel/iSeries_setup.c
#   2005/01/07 21:43:52-08:00 olof@austin.ibm.com +1 -2
#   ppc64: IOMMU cleanups: Main cleanup patch
# 
# arch/ppc64/kernel/iSeries_iommu.c
#   2005/01/07 21:43:52-08:00 olof@austin.ibm.com +8 -3
#   ppc64: IOMMU cleanups: Main cleanup patch
# 
# arch/ppc64/kernel/Makefile
#   2005/01/07 21:43:52-08:00 olof@austin.ibm.com +1 -1
#   ppc64: IOMMU cleanups: Main cleanup patch
# 
# ChangeSet
#   2005/01/08 13:40:11-08:00 olof@austin.ibm.com 
#   [PATCH] ppc64: IOMMU cleanups: rename pci_dma_direct.c
#   
#   This patch renames pci_dma_direct.c to pci_direct_iommu.c to comply to the
#   naming convention of the other iommu files.
#   
#   This is part of the iommu cleanup, but broken out as a separate patch since
#   for mainline, a BK rename is more appropriate.  Still, we need a patch to
#   apply for non-BK-based trees (-mm)
#   
#   Signed-off-by: Olof Johansson <olof@austin.ibm.com>
#   Acked-by: Paul Mackerras <paulus@samba.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/ppc64/kernel/pci_direct_iommu.c
#   2005/01/07 21:56:56-08:00 olof@austin.ibm.com +0 -0
#   ppc64: IOMMU cleanups: rename pci_dma_direct.c
# 
# ChangeSet
#   2005/01/08 13:39:35-08:00 paulus@samba.org 
#   [PATCH] ppc64: Log machine check errors to error log and NVRAM
#   
#   This patch is from Jake Moilanen <moilanen@austin.ibm.com>.
#   
#   Log machine check errors to error log and NVRAM.
#   
#   Signed-off-by: Dave Altobelli <dalto@austin.ibm.com>
#   Signed-off-by: Jake Moilanen <moilanen@austin.ibm.com>
#   Signed-off-by: Paul Mackerras <paulus@samba.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/ppc64/kernel/ras.c
#   2005/01/07 21:43:52-08:00 paulus@samba.org +31 -15
#   ppc64: Log machine check errors to error log and NVRAM
# 
# ChangeSet
#   2005/01/08 13:39:22-08:00 paulus@samba.org 
#   [PATCH] ppc64: clean up trap handling in head.S
#   
#   This patch is from Jake Moilanen <moilanen@austin.ibm.com>.
#   
#   Changed the naming conventions for head.S to more closely follow the Linux
#   naming conventions.
#   
#   Signed-off-by: Jake Moilanen <moilanen@austin.ibm.com>
#   Signed-off-by: Paul Mackerras <paulus@samba.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/ppc64/lib/sstep.c
#   2005/01/07 21:43:52-08:00 paulus@samba.org +2 -2
#   ppc64: clean up trap handling in head.S
# 
# arch/ppc64/kernel/pSeries_smp.c
#   2005/01/07 21:43:52-08:00 paulus@samba.org +3 -3
#   ppc64: clean up trap handling in head.S
# 
# arch/ppc64/kernel/head.S
#   2005/01/07 21:43:52-08:00 paulus@samba.org +108 -108
#   ppc64: clean up trap handling in head.S
# 
# arch/ppc64/kernel/entry.S
#   2005/01/07 21:43:52-08:00 paulus@samba.org +3 -3
#   ppc64: clean up trap handling in head.S
# 
# arch/ppc64/kernel/LparData.c
#   2005/01/07 21:43:52-08:00 paulus@samba.org +35 -35
#   ppc64: clean up trap handling in head.S
# 
# ChangeSet
#   2005/01/08 13:39:05-08:00 paulus@samba.org 
#   [PATCH] ppc64: clean up trap handling
#   
#   This patch is from Jake Moilanen <moilanen@austin.ibm.com>.
#   
#   Clean-up of traps.c.  Moved the machine dependent calls to a ppc_md call,
#   and moved the pSeries specific code to ras.c.
#   
#   I also changed the naming convention to more closely follow the Linux
#   standards.
#   
#   Signed-off-by: Jake Moilanen <moilanen@austin.ibm.com>
#   Signed-off-by: Paul Mackerras <paulus@samba.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-ppc64/machdep.h
#   2005/01/07 21:56:56-08:00 paulus@samba.org +4 -0
#   ppc64: clean up trap handling
# 
# arch/ppc64/kernel/traps.c
#   2005/01/07 21:43:52-08:00 paulus@samba.org +23 -125
#   ppc64: clean up trap handling
# 
# arch/ppc64/kernel/ras.c
#   2005/01/07 21:56:57-08:00 paulus@samba.org +104 -0
#   ppc64: clean up trap handling
# 
# arch/ppc64/kernel/pSeries_setup.c
#   2005/01/07 21:56:56-08:00 paulus@samba.org +9 -3
#   ppc64: clean up trap handling
# 
# arch/ppc64/kernel/head.S
#   2005/01/07 21:56:57-08:00 paulus@samba.org +14 -14
#   ppc64: clean up trap handling
# 
# ChangeSet
#   2005/01/08 13:38:49-08:00 paulus@samba.org 
#   [PATCH] ppc64: use newer RTAS call when available
#   
#   This patch is from Nathan Fontenot <nfont@austin.ibm.com> originally.
#   
#   The PPC64 EEH code needs a small update to start using the
#   ibm,read-slot-reset-state2 rtas call if available.  The currently used
#   ibm,read-slot-reset-state call will be going away on future machines.
#   
#   This patch attempts to use the newer rtas call if available and falls back
#   the older version otherwise.  This will maintain EEH slot checking
#   capabilities on all future and current firmware levels.
#   
#   Signed-off-by: Nathan Fontenot <nfont@austin.ibm.com>
#   Signed-off-by: Paul Mackerras <paulus@samba.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/ppc64/kernel/eeh.c
#   2005/01/07 21:43:51-08:00 paulus@samba.org +27 -10
#   ppc64: use newer RTAS call when available
# 
# ChangeSet
#   2005/01/08 13:38:32-08:00 david@gibson.dropbear.id.au 
#   [PATCH] ppc64: add performance monitor register information to processor.h
#   
#   Most special purpose registers on the ppc64 have both the SPR number, and
#   the various fields within the register defined in asm-ppc64/processor.h.
#   So far that's not true for the performance counter control registers, MMCR0
#   and MMCRA.  They have the SPR numbers defined, but the internal fields are
#   defined in the oprofile code and (just a few) in traps.c where they're
#   actually used.
#   
#   This patch moves all the MMCR0 and MMCRA definitions, plus the MSR
#   performance monitor bit, MSR_PMM, into processor.h.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-ppc64/processor.h
#   2005/01/07 21:43:51-08:00 david@gibson.dropbear.id.au +25 -0
#   ppc64: add performance monitor register information to processor.h
# 
# arch/ppc64/oprofile/op_impl.h
#   2005/01/07 21:43:51-08:00 david@gibson.dropbear.id.au +0 -38
#   ppc64: add performance monitor register information to processor.h
# 
# arch/ppc64/kernel/traps.c
#   2005/01/07 21:56:57-08:00 david@gibson.dropbear.id.au +0 -3
#   ppc64: add performance monitor register information to processor.h
# 
# ChangeSet
#   2005/01/08 13:38:16-08:00 nickpiggin@yahoo.com.au 
#   [PATCH] compound pages optimisation
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/page-flags.h
#   2005/01/07 21:56:41-08:00 nickpiggin@yahoo.com.au +4 -0
#   compound pages optimisation
# 
# ChangeSet
#   2005/01/08 13:37:59-08:00 riel@redhat.com 
#   [PATCH] vmscan: count writeback pages in nr_scanned
#   
#   OOM kills have been observed with 70% of the pages in lowmem being in the
#   writeback state.  If we count those pages in sc->nr_scanned, the VM should
#   throttle and wait for IO completion, instead of OOM killing.
#   
#   (akpm: this is how the code was designed to work - we broke it six months
#   ago).
#   
#   Signed-off-by: Rik van Riel <riel@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# mm/vmscan.c
#   2005/01/07 21:56:48-08:00 riel@redhat.com +3 -3
#   vmscan: count writeback pages in nr_scanned
# 
# ChangeSet
#   2005/01/08 13:37:43-08:00 takata@linux-m32r.org 
#   [PATCH] m32r: build fix
#   
#   This patch is required to fix compile errors for m32r.
#   
#   This was originally given by the following patch:
#     [PATCH] move irq_enter and irq_exit to common code
#     http://www.ussg.iu.edu/hypermail/linux/kernel/0411.1/1738.html
#   
#   I think it was maybe accidentally dropped only for the m32r arch due to a
#   patching conflict with the other patches or something like that.
#   
#   Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-m32r/hardirq.h
#   2005/01/07 21:43:51-08:00 takata@linux-m32r.org +0 -12
#   m32r: build fix
# 
# ChangeSet
#   2005/01/08 13:37:26-08:00 wli@holomorphy.com 
#   [PATCH] hugetlbfs MAINTAINERS update
#   
#   I'm being at least sometimes deferred to for hugetlb maintenance.
#   I also originally wrote the fs methods, and generally get stuck
#   working on it on a regular basis. So here is a MAINTAINERS entry
#   reflecting that.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# MAINTAINERS
#   2005/01/07 21:56:34-08:00 wli@holomorphy.com +5 -0
#   hugetlbfs MAINTAINERS update
# 
# ChangeSet
#   2005/01/08 13:37:05-08:00 takata@linux-m32r.org 
#   [PATCH] oprofile: update m32r for api changes
#   
#   oprofile m32r arch updates, including some API changes.
#   
#   Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/m32r/oprofile/init.c
#   2005/01/07 21:43:51-08:00 takata@linux-m32r.org +1 -5
#   oprofile: update m32r for api changes
# 
# ChangeSet
#   2005/01/08 13:36:49-08:00 akpm@osdl.org 
#   [PATCH] cs416x: use upcase in config
#   
#   Kconfig symbols are always uppercase.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/input/gameport/Makefile
#   2005/01/07 21:43:50-08:00 akpm@osdl.org +1 -1
#   cs416x: use upcase in config
# 
# drivers/input/gameport/Kconfig
#   2005/01/07 21:43:50-08:00 akpm@osdl.org +1 -1
#   cs416x: use upcase in config
# 
# ChangeSet
#   2005/01/08 13:04:22-08:00 torvalds@evo.osdl.org 
#   Merge small pipe writes into the write buffers
# 
# fs/pipe.c
#   2005/01/08 13:04:12-08:00 torvalds@evo.osdl.org +22 -0
#   Merge small pipe writes into the write buffers
# 
# ChangeSet
#   2005/01/08 12:33:15-08:00 hch@lst.de 
#   [PATCH] fix double iget in romfs_fill_super
#   
#   Acked-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/romfs/inode.c
#   2005/01/08 06:49:55-08:00 hch@lst.de +1 -2
#   fix double iget in romfs_fill_super
# 
# ChangeSet
#   2005/01/08 12:07:50-08:00 torvalds@evo.osdl.org 
#   Fix TASK_SIZE range check that got lost in recent
#   clear_page_range()/4-level page table updates.
# 
# mm/mmap.c
#   2005/01/08 12:07:40-08:00 torvalds@evo.osdl.org +3 -0
#   Fix TASK_SIZE range check that got lost in recent
#   clear_page_range()/4-level page table updates.
# 
# ChangeSet
#   2005/01/08 07:35:05-08:00 greg@kroah.com 
#   Cset exclude: jmunsin@iki.fi|ChangeSet|20041221190949|45117
#   
#   Reverted due to problems reported by users
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/i2c/chips/it87.c
#   2005/01/08 07:35:02-08:00 greg@kroah.com +0 -0
#   Reverted due to problems reported by users
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# ChangeSet
#   2005/01/08 00:43:14-05:00 jgarzik@pobox.com 
#   [netdrvr s2io] make debug_level variable static
#   
#   Fixes 'make allyesconfig' build conflict with infiniband, which
#   also has a global variable named 'debug_level'.
# 
# drivers/net/s2io.h
#   2005/01/08 00:43:08-05:00 jgarzik@pobox.com +1 -1
#   [netdrvr s2io] make debug_level variable static
#   
#   Fixes 'make allyesconfig' build conflict with infiniband, which
#   also has a global variable named 'debug_level'.
# 
# ChangeSet
#   2005/01/08 00:04:18+00:00 dave.jiang@com.rmk.(none) 
#   [ARM PATCH] 2363/1: IQ80332 platform port
#   
#   Patch from Dave Jiang
#   
#   Signed-off-by: Dave Jiang
#   
#   This is the IQ80332 platform port that's based off the IOP33x CPU. The IQ80332 is an PCI-express CRB based off the IOP332 processor. Otherwise functionalites are fairly similar to IQ80331.
#   Signed-off-by: Russell King
# 
# include/asm-arm/arch-iop3xx/uncompress.h
#   2005/01/06 17:40:32+00:00 dave.jiang@com.rmk.(none) +5 -3
#   [PATCH] 2363/1: IQ80332 platform port
# 
# include/asm-arm/arch-iop3xx/timex.h
#   2005/01/06 17:40:32+00:00 dave.jiang@com.rmk.(none) +1 -1
#   [PATCH] 2363/1: IQ80332 platform port
# 
# include/asm-arm/arch-iop3xx/iop331-irqs.h
#   2005/01/06 17:40:32+00:00 dave.jiang@com.rmk.(none) +23 -0
#   [PATCH] 2363/1: IQ80332 platform port
# 
# include/asm-arm/arch-iop3xx/hardware.h
#   2005/01/06 17:40:32+00:00 dave.jiang@com.rmk.(none) +1 -0
#   [PATCH] 2363/1: IQ80332 platform port
# 
# arch/arm/mm/proc-xscale.S
#   2005/01/07 23:19:48+00:00 dave.jiang@com.rmk.(none) +2 -2
#   [PATCH] 2363/1: IQ80332 platform port
# 
# arch/arm/mach-iop3xx/iop331-setup.c
#   2005/01/06 17:40:32+00:00 dave.jiang@com.rmk.(none) +84 -8
#   [PATCH] 2363/1: IQ80332 platform port
# 
# include/asm-arm/arch-iop3xx/iq80332.h
#   2005/01/06 17:40:32+00:00 dave.jiang@com.rmk.(none) +23 -0
#   [PATCH] 2363/1: IQ80332 platform port
# 
# include/asm-arm/arch-iop3xx/iq80332.h
#   2005/01/06 17:40:32+00:00 dave.jiang@com.rmk.(none) +0 -0
#   BitKeeper file /usr/src/bk/linux-2.6-rmk/include/asm-arm/arch-iop3xx/iq80332.h
# 
# arch/arm/mach-iop3xx/iq80332-pci.c
#   2005/01/06 17:40:32+00:00 dave.jiang@com.rmk.(none) +128 -0
#   [PATCH] 2363/1: IQ80332 platform port
# 
# arch/arm/mach-iop3xx/iq80332-mm.c
#   2005/01/06 17:40:32+00:00 dave.jiang@com.rmk.(none) +36 -0
#   [PATCH] 2363/1: IQ80332 platform port
# 
# arch/arm/mach-iop3xx/Makefile
#   2005/01/06 17:41:33+00:00 dave.jiang@com.rmk.(none) +2 -0
#   [PATCH] 2363/1: IQ80332 platform port
# 
# arch/arm/mach-iop3xx/Kconfig
#   2005/01/06 17:42:01+00:00 dave.jiang@com.rmk.(none) +15 -2
#   [PATCH] 2363/1: IQ80332 platform port
# 
# arch/arm/mach-iop3xx/iq80332-pci.c
#   2005/01/06 17:40:32+00:00 dave.jiang@com.rmk.(none) +0 -0
#   BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mach-iop3xx/iq80332-pci.c
# 
# arch/arm/mach-iop3xx/iq80332-mm.c
#   2005/01/06 17:40:32+00:00 dave.jiang@com.rmk.(none) +0 -0
#   BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mach-iop3xx/iq80332-mm.c
# 
# arch/arm/configs/iq80332_defconfig
#   2005/01/06 17:51:11+00:00 dave.jiang@com.rmk.(none) +864 -0
#   [PATCH] 2363/1: IQ80332 platform port
# 
# arch/arm/configs/iq80332_defconfig
#   2005/01/06 17:51:11+00:00 dave.jiang@com.rmk.(none) +0 -0
#   BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/configs/iq80332_defconfig
# 
# ChangeSet
#   2005/01/07 15:58:52-08:00 torvalds@ppc970.osdl.org 
#   Fix do_brk() locking in library loader
#   
#   The regular executable loader path doesn't need the locking,
#   because it's the only user of its VM. But the same is not true
#   at library load time. So get the mmap semaphore.
# 
# fs/binfmt_elf.c
#   2005/01/07 15:58:45-08:00 torvalds@ppc970.osdl.org +4 -1
#   Fix do_brk() locking in library loader
# 
# fs/binfmt_aout.c
#   2005/01/07 15:58:44-08:00 torvalds@ppc970.osdl.org +2 -0
#   Fix do_brk() locking in library loader
# 
# ChangeSet
#   2005/01/07 23:36:26+00:00 dave.jiang@com.rmk.(none) 
#   [ARM PATCH] 2362/1: cleanup of PCI defines for IOP321 platforms
#   
#   Patch from Dave Jiang
#   
#   Signed-off-by: Dave Jiang
#   
#   Major cleanup of the 321 PCI defines to make them more coherent. Unified some groups that were per platform to common proc specific. Removed some magic numbers.
#   Signed-off-by: Russell King
# 
# include/asm-arm/arch-iop3xx/iq80321.h
#   2005/01/06 17:40:32+00:00 dave.jiang@com.rmk.(none) +0 -11
#   [PATCH] 2362/1: cleanup of PCI defines for IOP321 platforms
# 
# include/asm-arm/arch-iop3xx/iq31244.h
#   2005/01/06 17:40:32+00:00 dave.jiang@com.rmk.(none) +0 -12
#   [PATCH] 2362/1: cleanup of PCI defines for IOP321 platforms
# 
# include/asm-arm/arch-iop3xx/iop321.h
#   2005/01/06 17:40:32+00:00 dave.jiang@com.rmk.(none) +19 -9
#   [PATCH] 2362/1: cleanup of PCI defines for IOP321 platforms
# 
# arch/arm/mach-iop3xx/iq80321-pci.c
#   2005/01/06 17:40:32+00:00 dave.jiang@com.rmk.(none) +9 -24
#   [PATCH] 2362/1: cleanup of PCI defines for IOP321 platforms
# 
# arch/arm/mach-iop3xx/iq31244-pci.c
#   2005/01/06 17:40:32+00:00 dave.jiang@com.rmk.(none) +10 -12
#   [PATCH] 2362/1: cleanup of PCI defines for IOP321 platforms
# 
# arch/arm/mach-iop3xx/iop321-setup.c
#   2005/01/06 17:40:32+00:00 dave.jiang@com.rmk.(none) +59 -2
#   [PATCH] 2362/1: cleanup of PCI defines for IOP321 platforms
# 
# arch/arm/mach-iop3xx/iop321-pci.c
#   2005/01/06 17:40:32+00:00 dave.jiang@com.rmk.(none) +0 -8
#   [PATCH] 2362/1: cleanup of PCI defines for IOP321 platforms
# 
# ChangeSet
#   2005/01/07 23:30:11+00:00 dave.jiang@com.rmk.(none) 
#   [ARM PATCH] 2361/1: clean up irq handling code for IOP33x platforms
#   
#   Patch from Dave Jiang
#   
#   Signed-off-by: Dave Jiang
#   
#   Substitute 2 asm instr w/ one recommend by RMK.
#   Signed-off-by: Russell King
# 
# ChangeSet
#   2005/01/07 15:29:10-08:00 rddunlap@osdl.org 
#   [PATCH] add cpufreq info to Documentation/feature-removal-schedule.txt
#   
#   Add 2.4.x cpufreq /proc and sysctl interface removal
#   to the feature-removal-schedule.
#   
#   Signed-off-by: Randy Dunlap <rddunlap@osdl.org>
# 
# Documentation/feature-removal-schedule.txt
#   2005/01/07 08:55:51-08:00 rddunlap@osdl.org +9 -0
#   add cpufreq info to Documentation/feature-removal-schedule.txt
# 
# include/asm-arm/arch-iop3xx/entry-macro.S
#   2005/01/07 22:51:34+00:00 dave.jiang@com.rmk.(none) +3 -8
#   [PATCH] 2361/1: clean up irq handling code for IOP33x platforms
# 
# ChangeSet
#   2005/01/07 15:24:29-08:00 greg@kroah.com 
#   [PATCH] add feature-removal-schedule.txt documentation
#   
#   Add Documentation/feature-removal-schedule.txt as a way to notify
#   everyone when and what is going to be removed.
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# Documentation/feature-removal-schedule.txt
#   2005/01/07 15:21:31-08:00 greg@kroah.com +17 -0
#   add feature-removal-schedule.txt documentation
# 
# Documentation/feature-removal-schedule.txt
#   2005/01/07 15:21:31-08:00 greg@kroah.com +0 -0
#   BitKeeper file /home/greg/linux/BK/usb-2.6/Documentation/feature-removal-schedule.txt
# 
# ChangeSet
#   2005/01/07 15:19:51-08:00 greg@kroah.com 
#   Fix up udev url in Documentation/Changes file
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# Documentation/Changes
#   2005/01/07 15:19:23-08:00 greg@kroah.com +5 -5
#   Fix up udev url in Documentation/Changes file
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# ChangeSet
#   2005/01/07 14:36:18-08:00 greg@kroah.com 
#   merge
# 
# sound/usb/usx2y/usbusx2yaudio.c
#   2005/01/07 14:35:57-08:00 greg@kroah.com +0 -8
#   merge
# 
# sound/usb/usx2y/usbusx2y.c
#   2005/01/07 14:22:57-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# sound/usb/usx2y/usX2Yhwdep.c
#   2005/01/07 14:22:57-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# sound/usb/usbmixer.c
#   2005/01/07 14:22:57-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# sound/usb/usbmidi.c
#   2005/01/07 14:22:56-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# sound/usb/usbaudio.c
#   2005/01/07 14:22:56-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# kernel/params.c
#   2005/01/07 14:22:56-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# kernel/module.c
#   2005/01/07 14:22:56-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# init/Kconfig
#   2005/01/07 14:22:56-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# include/linux/if_ether.h
#   2005/01/07 14:22:56-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# fs/sysfs/mount.c
#   2005/01/07 14:22:56-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# fs/Makefile
#   2005/01/07 14:22:55-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# drivers/usb/input/hid-input.c
#   2005/01/07 14:22:55-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# drivers/usb/input/hid-core.c
#   2005/01/07 14:22:55-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# drivers/usb/core/inode.c
#   2005/01/07 14:22:55-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# drivers/Makefile
#   2005/01/07 14:22:55-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# arch/s390/Kconfig
#   2005/01/07 14:22:55-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# arch/ppc64/Kconfig
#   2005/01/07 14:22:55-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# arch/ia64/Kconfig
#   2005/01/07 14:22:55-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# MAINTAINERS
#   2005/01/07 14:22:54-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# ChangeSet
#   2005/01/07 22:07:15+00:00 dsaxena@net.rmk.(none) 
#   [ARM PATCH] 2358/1: Add IXP46x I2C platform device
#   
#   Patch from Deepak Saxena
#   
#   The IXP46x chips from Intel include the same I2C controller as found
#   on the IOP3xx.  This patch adds a hook to the platform-level init code
#   to add that device to the device tree if running on a 46x CPU. A
#   separate patch has been sent upstream via Greg KH for the changes to the
#   I2C driver to support both IOP and IXP systems.
#   
#   While at it, we fix a minor issue with the code where we were sending 
#   the wrong ptr to platform_add_devices(). I am not sure how it ever 
#   worked...
#   
#   Signed-off-by: Deepak Saxena
#   Signed-off-by: Russell King
# 
# include/asm-arm/arch-ixp4xx/platform.h
#   2005/01/06 23:52:26+00:00 dsaxena@net.rmk.(none) +1 -0
#   [PATCH] 2358/1: Add IXP46x I2C platform device
# 
# include/asm-arm/arch-ixp4xx/irqs.h
#   2005/01/06 23:56:24+00:00 dsaxena@net.rmk.(none) +6 -8
#   [PATCH] 2358/1: Add IXP46x I2C platform device
# 
# arch/arm/mach-ixp4xx/prpmc1100-setup.c
#   2005/01/07 00:02:29+00:00 dsaxena@net.rmk.(none) +3 -1
#   [PATCH] 2358/1: Add IXP46x I2C platform device
# 
# arch/arm/mach-ixp4xx/ixdp425-setup.c
#   2005/01/07 00:02:26+00:00 dsaxena@net.rmk.(none) +3 -1
#   [PATCH] 2358/1: Add IXP46x I2C platform device
# 
# arch/arm/mach-ixp4xx/coyote-setup.c
#   2005/01/07 00:02:23+00:00 dsaxena@net.rmk.(none) +2 -1
#   [PATCH] 2358/1: Add IXP46x I2C platform device
# 
# arch/arm/mach-ixp4xx/common.c
#   2005/01/06 23:57:01+00:00 dsaxena@net.rmk.(none) +37 -0
#   [PATCH] 2358/1: Add IXP46x I2C platform device
# 
# ChangeSet
#   2005/01/07 13:54:11-08:00 greg@kroah.com 
#   Merge kroah.com:/home/greg/linux/BK/bleed-2.6
#   into kroah.com:/home/greg/linux/BK/i2c-2.6
# 
# include/linux/pci_ids.h
#   2005/01/07 13:54:03-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# ChangeSet
#   2005/01/07 11:16:13-08:00 rddunlap@osdl.org 
#   [PATCH] i2c-ali1563: fix init & exit section usage
#   
#   Fix init & exit section usages, beginning with this diagnostic
#   from reference_discarded.pl (make buildcheck):
#   Error: ./drivers/i2c/busses/i2c-ali1563.o .data refers to 00000278 R_386_32          .exit.text
#   
#   Signed-off-by: Randy Dunlap <rddunlap@osdl.org>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/i2c/busses/i2c-ali1563.c
#   2005/01/06 21:42:07-08:00 rddunlap@osdl.org +4 -4
#   i2c-ali1563: fix init & exit section usage
# 
# ChangeSet
#   2005/01/07 11:15:15-08:00 ladis@linux-mips.org 
#   [PATCH] I2C: let I2C_ALGO_SGI depend on MIPS
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/i2c/algos/Kconfig
#   2005/01/07 01:10:10-08:00 ladis@linux-mips.org +1 -1
#   I2C: let I2C_ALGO_SGI depend on MIPS
# 
# ChangeSet
#   2005/01/07 11:14:41-08:00 mhoffman@lightlink.com 
#   [PATCH] I2C: add new sensors driver: SMSC LPC47B397-NC
#   
#   This patch (3rd time's a charm) adds support for the SMSC LPC47B397-NC
#   sensor chip.  It was sponsored by In-Store Broadcasting Network.
#   
#   Signed-off-by: Craig Kelly (In-Store Broadcasting Network)
#   Signed-off-by: Glenn Ball (Utilitek Systems, Inc.)
#   Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
# 
# include/linux/i2c-id.h
#   2004/12/26 17:48:26-08:00 mhoffman@lightlink.com +1 -0
#   I2C: add new sensors driver: SMSC LPC47B397-NC
# 
# drivers/i2c/chips/smsc47b397.c
#   2005/01/03 19:52:41-08:00 mhoffman@lightlink.com +353 -0
#   I2C: add new sensors driver: SMSC LPC47B397-NC
# 
# drivers/i2c/chips/Makefile
#   2005/01/03 19:00:53-08:00 mhoffman@lightlink.com +1 -0
#   I2C: add new sensors driver: SMSC LPC47B397-NC
# 
# drivers/i2c/chips/smsc47b397.c
#   2005/01/03 19:52:41-08:00 mhoffman@lightlink.com +0 -0
#   BitKeeper file /home/greg/linux/BK/i2c-2.6/drivers/i2c/chips/smsc47b397.c
# 
# drivers/i2c/chips/Kconfig
#   2005/01/03 18:59:59-08:00 mhoffman@lightlink.com +12 -0
#   I2C: add new sensors driver: SMSC LPC47B397-NC
# 
# Documentation/i2c/chips/smsc47b397.txt
#   2005/01/03 18:56:20-08:00 mhoffman@lightlink.com +146 -0
#   I2C: add new sensors driver: SMSC LPC47B397-NC
# 
# Documentation/i2c/chips/smsc47b397.txt
#   2005/01/03 18:56:20-08:00 mhoffman@lightlink.com +0 -0
#   BitKeeper file /home/greg/linux/BK/i2c-2.6/Documentation/i2c/chips/smsc47b397.txt
# 
# ChangeSet
#   2005/01/07 10:33:57-08:00 eike-hotplug@sf-tec.de 
#   [PATCH] PCI Hotplug: don't check pointer before kalling kfree in ibmphp_pci.c
#   
#   Calling kfree() with a NULL pointer is no error so we don't need this check.
#   
#   Signed-off-by: Rolf Eike Beer <eike-hotplug@sf-tec.de>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/pci/hotplug/ibmphp_pci.c
#   2004/12/26 10:19:56-08:00 eike-hotplug@sf-tec.de +1 -2
#   PCI Hotplug: don't check pointer before kalling kfree in ibmphp_pci.c
# 
# ChangeSet
#   2005/01/07 10:33:32-08:00 eike-hotplug@sf-tec.de 
#   [PATCH] PCI Hotplug: use PCI_DEVFN in ibmphp_pci.c
#   
#   This patch changes ibmphp_pci.c to use the PCI_DEVFN makro where possible
#   instead of doing the match itself.
#   
#   Signed-off-by: Rolf Eike Beer <eike-hotplug@sf-tec.de>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/pci/hotplug/ibmphp_pci.c
#   2004/12/26 09:00:02-08:00 eike-hotplug@sf-tec.de +14 -9
#   PCI Hotplug: use PCI_DEVFN in ibmphp_pci.c
# 
# ChangeSet
#   2005/01/07 10:33:06-08:00 eike-hotplug@sf-tec.de 
#   [PATCH] PCI Hotplug: Remove unneeded kmalloc casts from ibmphp_pci.c
#   
#   this patch removes some unneeded casts from ibmphp_pci.c that cast the result
#   of kmalloc to some pointer type. It also uses "sizeof(*result)" instead of
#   "sizeof(type_of_result)".
#   
#   Signed-off-by: Rolf Eike Beer <eike-hotplug@sf-tec.de>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/pci/hotplug/ibmphp_pci.c
#   2004/12/26 08:18:17-08:00 eike-hotplug@sf-tec.de +15 -15
#   PCI Hotplug: Remove unneeded kmalloc casts from ibmphp_pci.c
# 
# ChangeSet
#   2005/01/07 10:32:39-08:00 domen@coderock.org 
#   [PATCH] hotplug/acpiphp_ibm: module_param fix
#   
#   File permissins should be octal number.
#   
#   
#   Signed-off-by: Domen Puncer <domen@coderock.org>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/pci/hotplug/acpiphp_ibm.c
#   2004/12/29 01:48:10-08:00 domen@coderock.org +1 -1
#   hotplug/acpiphp_ibm: module_param fix
# 
# ChangeSet
#   2005/01/07 10:29:46-08:00 david-b@pacbell.net 
#   [PATCH] USB: ehci "hc died" on startup (chip bug workaround)
#   
#   This fixes OSDL bugid #3056 for at least some users, where the EHCI
#   driver gets a "fatal error" IRQ on startup ... only on certain boards,
#   starting with the 2.6.6 or 2.6.7 kernels.  These IRQs normally indicate
#   that an invalid DMA address got passed to the controller, or something
#   equally nasty and unrecoverable.
#   
#   But it turns out that some of these controllers (at least ALI and Intel)
#   are lying.  They're issuing these IRQs without stopping, contrary to the
#   EHCI spec ... so these IRQs can be recovered from.  Thanks to Christian
#   Iversen for noticing that his ALI controller would continue operating,
#   which was the first real break in this annoying case.
#   
#   This patch tests for these bogus IRQs, and ignores them ... working around
#   what's clearly a chip bug.  It's not clear why we started triggering that
#   bug, but at least EHCI is now usable on boards exhibiting this problem.
#   
#   Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/host/ehci-hcd.c
#   2005/01/04 12:01:46-08:00 david-b@pacbell.net +13 -6
#   USB: ehci "hc died" on startup (chip bug workaround)
# 
# ChangeSet
#   2005/01/07 09:07:22-08:00 david-b@pacbell.net 
#   [PATCH] USB: ohci diagnostic tweak
#   
#   This changes the OHCI "USB HC TakeOver failed" message to be a bit
#   more informative, by fingering the root cause:  a BIOS/SMM bug.
#   
#   That way they're more likely to either bug the board vendor, or find
#   workarounds (like tweaking the BIOS setup, or the ohci_hcd no_handshake
#   parameter) before giving up or (wrongly) reporting a Linux bug.
#   
#   Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/host/ohci-hcd.c
#   2005/01/05 12:21:53-08:00 david-b@pacbell.net +2 -1
#   USB: ohci diagnostic tweak
# 
# ChangeSet
#   2005/01/07 08:46:29-08:00 david-b@pacbell.net 
#   [PATCH] USB: usb makefile tweaks
#   
#   Two minor Makefile fixes, catching up to some driver removals.
#   
#   Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/Makefile
#   2005/01/05 12:21:54-08:00 david-b@pacbell.net +1 -2
#   USB: usb makefile tweaks
# 
# ChangeSet
#   2005/01/07 08:45:52-08:00 david-b@pacbell.net 
#   [PATCH] USB: definitions for USB2 debug device, debug port
#   
#   This provides basic definitions to support "USB2 Debug Devices", as
#   supported by certain EHCI root hub ports (from ALI, Intel, NVidia, and
#   other vendors).  Docs are available at Intel's USB spec webpage.
#   
#   The basic idea is to help debug "legacy free" systems, with no serial port
#   for a console or debugger to use.  The USB debug port uses PIO to send and
#   receive at most 8 bytes of high speed data at a time, so it can support one
#   I/O channel without needing _any_ of the usbcore infrastructure, or DMA,
#   or IRQs.  (Cost can be 2KB rather than ~150KB.)
#   
#   Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# include/linux/usb_ch9.h
#   2004/11/29 07:19:14-08:00 david-b@pacbell.net +13 -0
#   USB: definitions for USB2 debug device, debug port
# 
# drivers/usb/host/ehci.h
#   2004/11/30 01:43:30-08:00 david-b@pacbell.net +24 -0
#   USB: definitions for USB2 debug device, debug port
# 
# ChangeSet
#   2005/01/07 08:45:22-08:00 david-b@pacbell.net 
#   [PATCH] USB: minor usb doc/comment fixes
#   
#   Some minor doc/comment fixes for USB.
#   
#   Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# include/linux/usb.h
#   2005/01/05 12:21:53-08:00 david-b@pacbell.net +2 -2
#   USB: minor usb doc/comment fixes
# 
# drivers/usb/gadget/omap_udc.c
#   2005/01/05 12:21:53-08:00 david-b@pacbell.net +1 -1
#   USB: minor usb doc/comment fixes
# 
# drivers/usb/gadget/epautoconf.c
#   2005/01/05 12:21:54-08:00 david-b@pacbell.net +3 -0
#   USB: minor usb doc/comment fixes
# 
# ChangeSet
#   2005/01/07 08:29:15-08:00 jgarzik@pobox.com 
#   [PATCH] x86-64: kernel/sys.c build fix
#   
#   On x86-64, the attached patch is required to fix
#   
#   > kernel/sys.c: In function `sys_setsid':
#   > kernel/sys.c:1078: error: `tty_sem' undeclared (first use in this function)
#   > kernel/sys.c:1078: error: (Each undeclared identifier is reported only once
#   > kernel/sys.c:1078: error: for each function it appears in.)
#   
#   kernel/sys.c needs the tty_sem declaration from linux/tty.h.
# 
# kernel/sys.c
#   2005/01/06 23:25:46-08:00 jgarzik@pobox.com +1 -0
#   x86-64: kernel/sys.c build fix
# 
# ChangeSet
#   2005/01/07 10:46:02+00:00 rmk@flint.arm.linux.org.uk 
#   [MMC] Remove linux/blkdev.h include.
#   
#   Since we no longer pass a struct request to the MMC host drivers,
#   it seems pointless including linux/blkdev.h.  Instead, include
#   linux/highmem.h and asm/scatterlist.h as appropriate.
#   
#   Signed-off-by: Russell King <rmk@arm.linux.org.uk>
# 
# drivers/mmc/wbsd.c
#   2005/01/07 10:41:35+00:00 rmk@flint.arm.linux.org.uk +2 -2
#   Remove linux/blkdev.h include.
#   Add linux/highmem.h and asm/scatterlist.h includes.
# 
# drivers/mmc/mmci.c
#   2005/01/07 10:41:09+00:00 rmk@flint.arm.linux.org.uk +2 -1
#   Remove linux/blkdev.h include.
#   Add linux/highmem.h and asm/scatterlist.h includes.
# 
# drivers/mmc/pxamci.c
#   2005/01/07 10:40:31+00:00 rmk@flint.arm.linux.org.uk +1 -1
#   Remove linux/blkdev.h include.
#   Add asm/scatterlist.h include.
# 
# ChangeSet
#   2005/01/06 23:12:02-05:00 ak@suse.de 
#   [PATCH] Fix ADMtek Comet on x86-64
#   
#   This Tulip clone doesn't like an Cache Line setting over 8 words.
#   This broke it on x86-64.  Make it the same as on i386.
#   
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/tulip/tulip_core.c
#   2004/07/28 08:45:05-04:00 ak@suse.de +2 -2
#   Fix ADMtek Comet on x86-64
# 
# ChangeSet
#   2005/01/06 23:08:35-05:00 gortan@tttech.com 
#   8139cp: support for TTTech MC322
# 
# include/linux/pci_ids.h
#   2005/01/06 23:08:29-05:00 gortan@tttech.com +3 -0
#   8139cp: support for TTTech MC322
# 
# drivers/net/8139cp.c
#   2005/01/06 23:08:29-05:00 gortan@tttech.com +2 -0
#   8139cp: support for TTTech MC322
# 
# ChangeSet
#   2005/01/06 22:59:40-05:00 bunk@stusta.de 
#   [PATCH] OSS via82cxxx_audio.c: remove unused CONFIG_SOUND_VIA82CXXX_PROCFS code
#   
#   > >How else is this information available?
#   >
#   > lspci.  it's just a verbose dump of PCI config registers.
#   
#   Sounds reasonable.
#   
#   Below is a patch to remove the CONFIG_SOUND_VIA82CXXX_PROCFS code.
#   
#   
#   diffstat output:
#    sound/oss/via82cxxx_audio.c |  218 ------------------------------------
#    1 files changed, 1 insertion(+), 217 deletions(-)
#   
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# sound/oss/via82cxxx_audio.c
#   2004/11/14 21:45:28-05:00 bunk@stusta.de +1 -217
#   OSS via82cxxx_audio.c: remove unused CONFIG_SOUND_VIA82CXXX_PROCFS code
# 
# ChangeSet
#   2005/01/06 22:49:55-05:00 manfred@colorfullife.com 
#   [PATCH] forcedeth: add ethtool get/set_settings support
#   
#   The patch adds ethtool get_ and set_settings support to the forcedeth nic
#   driver. This allows to force a certain link speed with ethtool -s.
#   
#   Supported link speeds: 10 HD&FD, 100 HD&FD, 1000 FD
#   
#   1000 HD is not supported (probably a hardware restriction), 1000 FD is
#   only supported with autonegotiation enabled.
#   
#   Changelog:
#   - Code reorganization: move ethtool functions further down in forcedeth.c
#     (no code changes within the existing ethtool functions)
#   - add support for setting the link setting bits in the nic with
#   autodetection in the PHY disabled (i.e. use a netdev_priv() variable
#   instead of querying the PHY)
#   - implement get_settings and set_settings ethtool functions.
#   
#   Signed-Off-By: Manfred Spraul <manfred@colorfullife.com>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/forcedeth.c
#   2004/11/16 23:55:13-05:00 manfred@colorfullife.com +254 -51
#   forcedeth: add ethtool get/set_settings support
# 
# ChangeSet
#   2005/01/06 22:45:32-05:00 shemminger@osdl.org 
#   [PATCH] via-velocity: convert to module_param
#   
#   Convert via-velocity driver to module_param.
#   
#   Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/via-velocity.c
#   2004/11/29 12:39:10-05:00 shemminger@osdl.org +3 -3
#   via-velocity: convert to module_param
# 
# ChangeSet
#   2005/01/07 04:11:38+01:00 bzolnier@trik.(none) 
#   [ide] kill current_capacity()
#   
#   Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
# 
# include/linux/ide.h
#   2005/01/04 18:39:25+01:00 bzolnier@trik.(none) +0 -5
#   [ide] kill current_capacity()
# 
# drivers/ide/ide.c
#   2005/01/04 18:39:25+01:00 bzolnier@trik.(none) +0 -18
#   [ide] kill current_capacity()
# 
# drivers/ide/ide-floppy.c
#   2005/01/04 18:39:25+01:00 bzolnier@trik.(none) +2 -2
#   [ide] kill current_capacity()
# 
# drivers/ide/ide-disk.c
#   2005/01/04 18:39:25+01:00 bzolnier@trik.(none) +2 -2
#   [ide] kill current_capacity()
# 
# ChangeSet
#   2005/01/06 22:09:11-05:00 katzj@redhat.com 
#   [PATCH] Fix sx8 device naming in sysfs
#   
#   Attached fixes sysfs naming of sx8 block devs to follow LANANA naming.
#   
#   You then get /sys/block/sx8!0, etc instead of /sys/block/sx80_0 (device
#   names should be /dev/sx8/0 instead of /dev/sx80_0)
#   
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/block/sx8.c
#   2004/12/01 22:44:22-05:00 katzj@redhat.com +1 -1
#   Fix sx8 device naming in sysfs
# 
# ChangeSet
#   2005/01/07 04:06:22+01:00 bzolnier@trik.(none) 
#   [ide] ide_driver_t->abort() cleanup
#   
#   * add drive->media != ide_disk check to ide_abort()
#   * kill ide_cdrom_abort() and idedisk_abort()
#   * split __ide_abort() out of ide_abort()
#   * call driver->abort() inside ide_abort()
#   * convert the only user of driver->abort()
#   * fix default_abort() and idescsi_atapi_abort()
#   * make idescsi_atapi_abort() static
#   
#   Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
# 
# include/linux/ide.h
#   2005/01/03 23:56:40+01:00 bzolnier@trik.(none) +3 -1
#   [ide] ide_driver_t->abort() cleanup
# 
# drivers/scsi/ide-scsi.c
#   2005/01/03 23:56:40+01:00 bzolnier@trik.(none) +2 -13
#   [ide] ide_driver_t->abort() cleanup
# 
# drivers/ide/ide.c
#   2005/01/03 23:56:40+01:00 bzolnier@trik.(none) +5 -4
#   [ide] ide_driver_t->abort() cleanup
# 
# drivers/ide/ide-io.c
#   2005/01/03 23:56:40+01:00 bzolnier@trik.(none) +11 -11
#   [ide] ide_driver_t->abort() cleanup
# 
# drivers/ide/ide-disk.c
#   2005/01/03 23:56:40+01:00 bzolnier@trik.(none) +0 -21
#   [ide] ide_driver_t->abort() cleanup
# 
# drivers/ide/ide-cd.c
#   2005/01/03 23:56:40+01:00 bzolnier@trik.(none) +0 -18
#   [ide] ide_driver_t->abort() cleanup
# 
# ChangeSet
#   2005/01/06 22:05:47-05:00 alex.kern@gmx.de 
#   [PATCH] new PCI_ID for tulip
#   
#   it exist a PCCARD from SIEMENS, its relabeled DLINK.
#   
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/tulip/tulip_core.c
#   2004/11/26 09:20:09-05:00 alex.kern@gmx.de +1 -0
#   new PCI_ID for tulip
# 
# ChangeSet
#   2005/01/07 04:03:18+01:00 bzolnier@trik.(none) 
#   [ide] rework ide_driver_t->error
#   
#   * split __ide_error() out of ide_error()
#   * call driver->error() inside ide_error()
#   * convert all users of driver->error()
#   * fix default_cleanup() and idescsi_atapi_error()
#   * make idescsi_atapi_error() static
#   
#   Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
# 
# include/linux/ide.h
#   2005/01/07 04:03:05+01:00 bzolnier@trik.(none) +3 -1
#   [ide] rework ide_driver_t->error
# 
# drivers/scsi/ide-scsi.c
#   2005/01/07 04:03:05+01:00 bzolnier@trik.(none) +2 -16
#   [ide] rework ide_driver_t->error
# 
# drivers/ide/ide.c
#   2005/01/07 04:03:05+01:00 bzolnier@trik.(none) +3 -2
#   [ide] rework ide_driver_t->error
# 
# drivers/ide/ide-taskfile.c
#   2005/01/07 04:03:04+01:00 bzolnier@trik.(none) +4 -4
#   [ide] rework ide_driver_t->error
# 
# drivers/ide/ide-iops.c
#   2005/01/07 04:03:04+01:00 bzolnier@trik.(none) +2 -2
#   [ide] rework ide_driver_t->error
# 
# drivers/ide/ide-io.c
#   2005/01/07 04:03:04+01:00 bzolnier@trik.(none) +14 -6
#   [ide] rework ide_driver_t->error
# 
# drivers/ide/ide-dma.c
#   2005/01/07 04:03:04+01:00 bzolnier@trik.(none) +1 -1
#   [ide] rework ide_driver_t->error
# 
# drivers/ide/ide-cd.c
#   2005/01/07 04:03:04+01:00 bzolnier@trik.(none) +5 -5
#   [ide] rework ide_driver_t->error
# 
# drivers/ide/cris/ide-v10.c
#   2005/01/07 04:03:04+01:00 bzolnier@trik.(none) +1 -1
#   [ide] rework ide_driver_t->error
# 
# drivers/ide/arm/icside.c
#   2005/01/07 04:03:04+01:00 bzolnier@trik.(none) +1 -1
#   [ide] rework ide_driver_t->error
# 
# ChangeSet
#   2005/01/06 21:44:09-05:00 ganesh.venkatesan@intel.com 
#   [PATCH] e100: Documentation/networking/e100.txt update
#   
#   Signed-off-by: Ganesh Venkatesan <ganesh.venkatesan@intel.com>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# Documentation/networking/e100.txt
#   2005/01/06 14:01:18-05:00 ganesh.venkatesan@intel.com +2 -10
#   e100: Documentation/networking/e100.txt update
# 
# ChangeSet
#   2005/01/06 21:43:32-05:00 ganesh.venkatesan@intel.com 
#   [PATCH] e1000: Documentation/networking/e1000.txt update
#   
#   Signed-off-by: Ganesh Venkatesan <ganesh.venkatesan@intel.com>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# Documentation/networking/e1000.txt
#   2005/01/06 14:01:12-05:00 ganesh.venkatesan@intel.com +18 -22
#   e1000: Documentation/networking/e1000.txt update
# 
# ChangeSet
#   2005/01/07 03:35:46+01:00 bzolnier@trik.(none) 
#   [ide] cleanup ide_error()
#   
#   * move idedisk_error() and ide_cdrom_error() to ide-io.c
#   * rename idedisk_error() to ide_ata_error()
#   * rename ide_cdrom_error() to ide_atapi_error()
#   * use ide_{ata,atapi}_error() in ide_error()
#   
#   Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
# 
# drivers/ide/ide-io.c
#   2005/01/02 22:35:51+01:00 bzolnier@trik.(none) +79 -58
#   [ide] cleanup ide_error()
# 
# drivers/ide/ide-disk.c
#   2005/01/02 22:35:51+01:00 bzolnier@trik.(none) +0 -61
#   [ide] cleanup ide_error()
# 
# drivers/ide/ide-cd.c
#   2005/01/02 22:35:51+01:00 bzolnier@trik.(none) +0 -41
#   [ide] cleanup ide_error()
# 
# ChangeSet
#   2005/01/07 03:31:43+01:00 bzolnier@trik.(none) 
#   [ide] cleanup ide_dump_status()
#   
#   * move idedisk_dump_status() and ide_dump_status() to ide-lib.c
#   * rename idedisk_dump_status() to ide_dump_ata_status()
#   * use ide_dump_{ata,atapi}_status() in ide_dump_status()
#   * use ide_dump_status() in ide-cd.c, ide-disk.c and ide-scsi.c
#   * make ide_dump_opcode() and ide_dump_atapi_status)() static
#   
#   Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
# 
# include/linux/ide.h
#   2005/01/02 20:49:13+01:00 bzolnier@trik.(none) +1 -9
#   [ide] cleanup ide_dump_status()
# 
# drivers/scsi/ide-scsi.c
#   2005/01/02 20:49:13+01:00 bzolnier@trik.(none) +1 -1
#   [ide] cleanup ide_dump_status()
# 
# drivers/ide/ide.c
#   2005/01/02 20:49:13+01:00 bzolnier@trik.(none) +0 -88
#   [ide] cleanup ide_dump_status()
# 
# drivers/ide/ide-lib.c
#   2005/01/02 20:49:13+01:00 bzolnier@trik.(none) +94 -4
#   [ide] cleanup ide_dump_status()
# 
# drivers/ide/ide-disk.c
#   2005/01/02 20:49:13+01:00 bzolnier@trik.(none) +1 -74
#   [ide] cleanup ide_dump_status()
# 
# drivers/ide/ide-cd.c
#   2005/01/02 20:49:13+01:00 bzolnier@trik.(none) +2 -1
#   [ide] cleanup ide_dump_status()
# 
# ChangeSet
#   2005/01/06 21:30:57-05:00 ganesh.venkatesan@intel.com 
#   [PATCH] e1000: Driver version number, white spaces, comments, device id
#   & other changes
#   
#   Signed-off-by: Ganesh Venkatesan <ganesh.venkatesan@intel.com>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/e1000/e1000_main.c
#   2004/12/03 10:24:39-05:00 ganesh.venkatesan@intel.com +83 -79
#   e1000: Driver version number, white spaces, comments, device id & other
#   changes
# 
# drivers/net/e1000/e1000_hw.h
#   2004/12/03 10:24:39-05:00 ganesh.venkatesan@intel.com +1 -0
#   e1000: Driver version number, white spaces, comments, device id & other
#   changes
# 
# drivers/net/e1000/e1000_hw.c
#   2004/12/03 10:24:38-05:00 ganesh.venkatesan@intel.com +8 -3
#   e1000: Driver version number, white spaces, comments, device id & other
#   changes
# 
# ChangeSet
#   2005/01/06 21:30:44-05:00 ganesh.venkatesan@intel.com 
#   [PATCH] e1000: Applied smart speed fix where the code was forcing smart
#   speed on all the time.  Now it will honor the setting defined in the
#   eeprom.
#   
#   Signed-off-by: Ganesh Venkatesan <ganesh.venkatesan@intel.com>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/e1000/e1000_hw.h
#   2004/12/03 10:24:39-05:00 ganesh.venkatesan@intel.com +7 -0
#   e1000: Applied smart speed fix where the code was forcing smart speed on
#   all the time.  Now it will honor the setting defined in the eeprom.
# 
# drivers/net/e1000/e1000_hw.c
#   2004/12/03 10:24:38-05:00 ganesh.venkatesan@intel.com +22 -7
#   e1000: Applied smart speed fix where the code was forcing smart speed on
#   all the time.  Now it will honor the setting defined in the eeprom.
# 
# ChangeSet
#   2005/01/06 21:30:30-05:00 ganesh.venkatesan@intel.com 
#   [PATCH] e1000: Applied eeprom fix where it was possible to read/write
#   one more word than what should have been possible.
#   
#   Signed-off-by: Ganesh Venkatesan <ganesh.venkatesan@intel.com>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/e1000/e1000_hw.c
#   2004/12/03 10:24:38-05:00 ganesh.venkatesan@intel.com +2 -2
#   e1000: Applied eeprom fix where it was possible to read/write one more
#   word than what should have been possible.
# 
# ChangeSet
#   2005/01/06 21:30:15-05:00 ganesh.venkatesan@intel.com 
#   [PATCH] e1000:  Added workaround to prevent inadvertent gigabit waveform
#   to be sent out on the wire due to init-time operations on the IGP phy.
#   
#   Signed-off-by: Ganesh Venkatesan <ganesh.venkatesan@intel.com>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/e1000/e1000_hw.c
#   2004/12/03 10:24:38-05:00 ganesh.venkatesan@intel.com +77 -4
#   e1000:  Added workaround to prevent inadvertent gigabit waveform to be
#   sent out on the wire due to init-time operations on the IGP phy.
# 
# ChangeSet
#   2005/01/06 21:30:00-05:00 ganesh.venkatesan@intel.com 
#   [PATCH] e1000: Kernel API change for Module_param_array_named
#   
#   Signed-off-by: Ganesh Venkatesan <ganesh.venkatesan@intel.com>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/e1000/e1000_param.c
#   2004/12/03 10:24:39-05:00 ganesh.venkatesan@intel.com +1 -1
#   e1000: Kernel API change for Module_param_array_named
# 
# ChangeSet
#   2005/01/06 21:29:45-05:00 ganesh.venkatesan@intel.com 
#   [PATCH] e1000: {set, get}_wol is now symmetric for 82545EM adapters
#   
#   Signed-off-by: Ganesh Venkatesan <ganesh.venkatesan@intel.com>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/e1000/e1000_ethtool.c
#   2004/12/03 10:24:38-05:00 ganesh.venkatesan@intel.com +2 -0
#   e1000: {set, get}_wol is now symmetric for 82545EM adapters
# 
# ChangeSet
#   2005/01/06 21:29:32-05:00 ganesh.venkatesan@intel.com 
#   [PATCH] e1000: Fix tx resource cleanup logic
#   
#   Signed-off-by: Ganesh Venkatesan <ganesh.venkatesan@intel.com>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/e1000/e1000_main.c
#   2004/12/03 10:24:39-05:00 ganesh.venkatesan@intel.com +20 -26
#   e1000: Fix tx resource cleanup logic
# 
# ChangeSet
#   2005/01/06 21:29:19-05:00 ganesh.venkatesan@intel.com 
#   [PATCH] e1000:  Replace schedule_timeout() with
#   msleep()/msleep_interruptible() nacc@us.ibm.com
#   
#   Signed-off-by: Ganesh Venkatesan <ganesh.venkatesan@intel.com>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/e1000/e1000_osdep.h
#   2004/12/03 10:24:39-05:00 ganesh.venkatesan@intel.com +2 -7
#   e1000:  Replace schedule_timeout() with msleep()/msleep_interruptible()
#   nacc@us.ibm.com
# 
# drivers/net/e1000/e1000_ethtool.c
#   2004/12/03 10:24:38-05:00 ganesh.venkatesan@intel.com +1 -3
#   e1000:  Replace schedule_timeout() with msleep()/msleep_interruptible()
#   nacc@us.ibm.com
# 
# ChangeSet
#   2005/01/06 21:29:03-05:00 ganesh.venkatesan@intel.com 
#   [PATCH] e1000: remove a redundant assignment to a local nr_frags in e1000_xmit_frame.
#   
#   Signed-off-by: Ganesh Venkatesan <ganesh.venkatesan@intel.com>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/e1000/e1000_main.c
#   2004/12/03 10:24:39-05:00 ganesh.venkatesan@intel.com +0 -1
#   e1000:  remove a redundant assignment to a local nr_frags in e1000_xmit_frame.
# 
# ChangeSet
#   2005/01/06 21:28:48-05:00 ganesh.venkatesan@intel.com 
#   [PATCH] e1000: Avoid filling tx_ring completely - shemminger@osdl.org
#   
#   Signed-off-by: Ganesh Venkatesan <ganesh.venkatesan@intel.com>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/e1000/e1000_main.c
#   2004/12/03 10:24:39-05:00 ganesh.venkatesan@intel.com +4 -0
#   e1000: Avoid filling tx_ring completely - shemminger@osdl.org
# 
# ChangeSet
#   2005/01/06 21:28:33-05:00 ganesh.venkatesan@intel.com 
#   [PATCH] e1000: Enabling NETIF_F_SG without checksum offload is illegal
#   -- jdmason@us.ibm.com
#   
#   Signed-off-by: Ganesh Venkatesan <ganesh.venkatesan@intel.com>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/e1000/e1000_main.c
#   2004/12/03 10:24:39-05:00 ganesh.venkatesan@intel.com +0 -2
#   e1000: Enabling NETIF_F_SG without checksum offload is illegal --
#   jdmason@us.ibm.com
# 
# ChangeSet
#   2005/01/06 21:28:20-05:00 ganesh.venkatesan@intel.com 
#   [PATCH] e1000: Fix ethtool diagnostics -- specifically for blade server
#   implementations
#   
#   Signed-off-by: Ganesh Venkatesan <ganesh.venkatesan@intel.com>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/e1000/e1000_ethtool.c
#   2004/12/03 10:24:38-05:00 ganesh.venkatesan@intel.com +37 -25
#   e1000: Fix ethtool diagnostics -- specifically for blade server
#   implementations
# 
# ChangeSet
#   2005/01/06 21:28:05-05:00 ganesh.venkatesan@intel.com 
#   [PATCH] e1000: Fix kernel panic when the interface is brought down while
#   the NAPI enabled driver is under stress
#   
#   Signed-off-by: Ganesh Venkatesan <ganesh.venkatesan@intel.com>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/e1000/e1000_main.c
#   2004/12/03 10:24:39-05:00 ganesh.venkatesan@intel.com +4 -1
#   e1000: Fix kernel panic when the interface is brought down while the
#   NAPI enabled driver is under stress
# 
# ChangeSet
#   2005/01/06 21:27:50-05:00 ganesh.venkatesan@intel.com 
#   [PATCH] e1000: ITR does not default correctly on 2.6.x kernels
#   
#   Signed-off-by: Ganesh Venkatesan <ganesh.venkatesan@intel.com>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/e1000/e1000_param.c
#   2004/12/03 10:24:39-05:00 ganesh.venkatesan@intel.com +2 -4
#   e1000: ITR does not default correctly on 2.6.x
# 
# ChangeSet
#   2005/01/07 03:27:20+01:00 bzolnier@trik.(none) 
#   [ide] add ide_dump_opcode()
#   
#   * add it to ide-lib.c and cleanup ide{disk}_dump_status()
#   * as a bonus it fixes unknown opcode reporting in ide_dump_status()
#   * use ide_dump_opcode() in ide_dump_atapi_status()
#   
#   Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
# 
# include/linux/ide.h
#   2005/01/02 20:31:45+01:00 bzolnier@trik.(none) +2 -0
#   [ide] add ide_dump_opcode()
# 
# drivers/ide/ide.c
#   2005/01/02 20:31:45+01:00 bzolnier@trik.(none) +1 -26
#   [ide] add ide_dump_opcode()
# 
# drivers/ide/ide-lib.c
#   2005/01/02 20:31:45+01:00 bzolnier@trik.(none) +38 -0
#   [ide] add ide_dump_opcode()
# 
# drivers/ide/ide-disk.c
#   2005/01/02 20:31:45+01:00 bzolnier@trik.(none) +1 -31
#   [ide] add ide_dump_opcode()
# 
# ChangeSet
#   2005/01/06 21:23:45-05:00 ganesh.venkatesan@intel.com 
#   [PATCH] e100: Update driver version number
#   
#   Signed-off-by: Ganesh Venkatesan <ganesh.venkatesan@intel.com>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/e100.c
#   2004/12/02 13:09:36-05:00 ganesh.venkatesan@intel.com +1 -1
#   e100: Update driver version number
# 
# ChangeSet
#   2005/01/06 21:23:35-05:00 ganesh.venkatesan@intel.com 
#   [PATCH] e100: Sort Device IDs
#   
#   Signed-off-by: Ganesh Venkatesan <ganesh.venkatesan@intel.com>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/e100.c
#   2004/12/02 13:09:36-05:00 ganesh.venkatesan@intel.com +1 -1
#   e100: Sort Device IDs
# 
# ChangeSet
#   2005/01/06 21:23:23-05:00 ganesh.venkatesan@intel.com 
#   [PATCH] e100: Replace locally implemented delay routines
#   
#   Signed-off-by: Ganesh Venkatesan <ganesh.venkatesan@intel.com>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/e100.c
#   2004/12/02 13:09:36-05:00 ganesh.venkatesan@intel.com +5 -10
#   e100: Replace locally implemented delay routines
# 
# ChangeSet
#   2005/01/07 03:19:40+01:00 bzolnier@trik.(none) 
#   [ide] kill write-only ide_driver_t->sense
#   
#   also kill default_sense() in ide.c
#   
#   Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
# 
# include/linux/ide.h
#   2005/01/02 18:59:15+01:00 bzolnier@trik.(none) +0 -1
#   [ide] kill write-only ide_driver_t->sense
# 
# drivers/ide/ide.c
#   2005/01/02 18:59:15+01:00 bzolnier@trik.(none) +0 -6
#   [ide] kill write-only ide_driver_t->sense
# 
# drivers/ide/ide-disk.c
#   2005/01/02 18:59:15+01:00 bzolnier@trik.(none) +0 -1
#   [ide] kill write-only ide_driver_t->sense
# 
# drivers/ide/ide-cd.c
#   2005/01/02 18:59:15+01:00 bzolnier@trik.(none) +0 -1
#   [ide] kill write-only ide_driver_t->sense
# 
# ChangeSet
#   2005/01/07 03:17:30+01:00 bzolnier@trik.(none) 
#   [ide] PCI quirk for ICH3-M IDE
#   
#   From: Jim Paris <jim@jtan.com>
#   
#   Bartlomiej: I have an ICH3-M controller on my laptop.  The BIOS is
#   leaving the prog-if as 0x8E (primary = legacy, secondary = native).
#   When the PCI interrupt is routed (either in the IDE driver's
#   pci_enable_device, or earlier if pci=routeirq is used), unhandled
#   interrupts cause IRQ 9 to be disabled, breaking most of my other
#   hardware.  This seems to be caused by having the nonexistant secondary
#   interface set to native mode.  According to the datasheet I checked,
#   having different modes for primary/secondary is not an allowed
#   combination anyway, so the following PCI quirk checks for this case
#   and forces both interfaces to legacy if true.
#   
#   It may make sense to make this more generic (this problem may affect
#   other PCI IDs as well), or it may be better solved in the IDE driver,
#   at least when pci=routeirq is not used.  But the following patch does
#   work well for me.
#   
#   Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
# 
# drivers/pci/quirks.c
#   2005/01/07 03:17:15+01:00 bzolnier@trik.(none) +20 -0
#   [ide] PCI quirk for ICH3-M IDE
# 
# ChangeSet
#   2005/01/06 21:10:14-05:00 jason.d.gaston@intel.com 
#   [PATCH] SATA support for Intel ICH7
#   
#   Reposting patch with word wrap turned off.  Please let me know if
#   this is still not formated correctly.
#   
#   This patch adds the Intel ICH7 DID's to the ata_piix.c SATA driver,
#   ahci.c SATA AHCI driver and quirks.c for ICH7 SATA support.
#   
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/scsi/ata_piix.c
#   2004/12/28 10:07:38-05:00 jason.d.gaston@intel.com +15 -0
#   SATA support for Intel ICH7 - 2.6.10 - repost
# 
# drivers/scsi/ahci.c
#   2004/12/28 10:07:38-05:00 jason.d.gaston@intel.com +6 -2
#   SATA support for Intel ICH7 - 2.6.10 - repost
# 
# drivers/pci/quirks.c
#   2004/12/30 07:24:21-05:00 jason.d.gaston@intel.com +5 -1
#   SATA support for Intel ICH7 - 2.6.10 - repost
# 
# ChangeSet
#   2005/01/06 21:08:34-05:00 alan@lxorguk.ukuu.org.uk 
#   [PATCH] ULi support for 526X tulip variants
#   
#   Signed-off-by: Alan Cox <alan@redhat.com>
#   
#   from a 2.4 change by Clear Zhang (signed off by Clear Zhang)
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/tulip/tulip_core.c
#   2004/12/29 18:50:19-05:00 alan@lxorguk.ukuu.org.uk +26 -9
#   ULi support for 526X tulip variants
# 
# drivers/net/tulip/tulip.h
#   2004/12/29 18:49:34-05:00 alan@lxorguk.ukuu.org.uk +6 -2
#   ULi support for 526X tulip variants
# 
# drivers/net/tulip/timer.c
#   2004/12/29 18:50:40-05:00 alan@lxorguk.ukuu.org.uk +1 -0
#   ULi support for 526X tulip variants
# 
# drivers/net/tulip/media.c
#   2004/12/30 17:28:58-05:00 alan@lxorguk.ukuu.org.uk +36 -1
#   ULi support for 526X tulip variants
# 
# ChangeSet
#   2005/01/06 21:08:19-05:00 akpm@osdl.org 
#   [PATCH] Multicast filtering for tun.c
#   
#   From: Shaun Jackman <sjackman@gmail.com>
#   
#   This patch adds multicast filtering to the TUN network driver, for
#   packets being sent from the network device to the character device.
#   
#   * drivers/net/tun.c: Add multicast filtering for packets travelling from
#     the network device to the character device.
#   
#   * include/linux/if_tun.h (tun_struct): Add interface flags, a hardware
#     device addres, and a multicast filter.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# include/linux/if_tun.h
#   2005/01/05 00:57:36-05:00 akpm@osdl.org +5 -0
#   Multicast filtering for tun.c
# 
# drivers/net/tun.c
#   2005/01/05 00:57:36-05:00 akpm@osdl.org +139 -12
#   Multicast filtering for tun.c
# 
# ChangeSet
#   2005/01/06 21:08:07-05:00 akpm@osdl.org 
#   [PATCH] xircom_tulip_cb.c build fix
#   
#   From: Bernhard Rosenkraenzer <bero@arklinux.org>,
#         Adrian Bunk <bunk@stusta.de>
#   
#   - Define `debug' before using it.
#   
#   - remove now-unneeded module_parm_array hack.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/tulip/xircom_tulip_cb.c
#   2005/01/05 00:54:42-05:00 akpm@osdl.org +9 -10
#   xircom_tulip_cb.c build fix
# 
# ChangeSet
#   2005/01/06 21:07:54-05:00 akpm@osdl.org 
#   [PATCH] net: Netconsole poll support for 3c509
#   
#   From: Con Kolivas <kernel@kolivas.org>
#   
#   This patch provides poll support to allow netconsole to work with 3c509
#   network cards.
#   
#   Status: Compiled, debugged and tested working by Michael Buesch.
#   
#   Signed-off-by: Con Kolivas <kernel@kolivas.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/3c509.c
#   2005/01/05 00:57:36-05:00 akpm@osdl.org +19 -0
#   net: Netconsole poll support for 3c509
# 
# ChangeSet
#   2005/01/06 21:07:40-05:00 akpm@osdl.org 
#   [PATCH] via-rhine warning fix
#   
#   drivers/net/via-rhine.c: In function `rhine_init_one':
#   drivers/net/via-rhine.c:864: warning: long unsigned int format, pointer arg (arg 4)
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/via-rhine.c
#   2004/12/07 01:36:20-05:00 akpm@osdl.org +1 -1
#   via-rhine warning fix
# 
# ChangeSet
#   2005/01/07 03:05:26+01:00 bzolnier@trik.(none) 
#   [ide] fix erroneous rq->buffer = NULL in ide-io.c:ide_dma_timeout_retry()
#   
#   From: Prarit Bhargava <prarit@sgi.com>
#   
#   Please see discussion related to this patch here,
#   
#   http://marc.theaimsgroup.com/?l=linux-ide&m=110485007824374&w=2
#   
#   Acked-by: Jens Axboe <axboe@suse.de>
#   Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
# 
# drivers/ide/ide-io.c
#   2005/01/07 03:05:14+01:00 bzolnier@trik.(none) +1 -1
#   [ide] fix erroneous rq->buffer = NULL in ide-io.c:ide_dma_timeout_retry()
# 
# ChangeSet
#   2005/01/06 17:58:16-08:00 viro@parcelfarce.linux.theplanet.co.uk 
#   [PATCH] Fix up compiler inefficiencies
#   
#   Oh, bugger...
#   
#   The recent mmzone.h change triggered some very, very ugly things in
#   next_zone(), is_highmem(), is_normal() and zone_idx() because it changed
#   the size of "struct zone" subtly.
#   
#   Pointer subtraction is no fun when sizeof of object gets weird and poor
#   gcc blows its brains out trying to optimize that...  This slowed down an
#   ARM cross-build by a factor of 2.5. 
#   
#   Turn the pointer subtraction tests into pointer addition tests instead
#   where possible, making them trivial to deal with (and gets better code,
#   in addition to faster compile).
#   
#   zone_idx() still does a subtraction.
# 
# include/linux/mmzone.h
#   2005/01/06 15:40:27-08:00 viro@parcelfarce.linux.theplanet.co.uk +3 -3
#   Fix up compiler inefficiencies
# 
# ChangeSet
#   2005/01/07 02:47:15+01:00 bzolnier@trik.(none) 
#   [ide] disable debug in IDE ppc/pmac driver
#   
#   Ben did not disagree to hide the 3 additional lines printed when booting
#   my ibook with the 'quiet' cmdline option.
#   I think these debug printk have no real value for normal operation.
#   
#   Signed-off-by: Olaf Hering <olh@suse.de>
#   Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
# 
# drivers/ide/ppc/pmac.c
#   2004/12/31 10:22:20+01:00 bzolnier@trik.(none) +1 -1
#   [ide] disable debug in IDE ppc/pmac driver
# 
# ChangeSet
#   2005/01/07 02:42:30+01:00 bzolnier@trik.(none) 
#   [ide] remove CRD-8480C from the DMA blacklist
#   
#   Reported to work OK by Daniel Robitaille <robitaille@gmail.com>.
#   
#   Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
# 
# drivers/ide/ide-dma.c
#   2005/01/07 02:42:18+01:00 bzolnier@trik.(none) +0 -1
#   [ide] remove CRD-8480C from the DMA blacklist
# 
# ChangeSet
#   2005/01/07 02:35:49+01:00 bzolnier@trik.(none) 
#   [ide] remove pci_disable_device() calls from setup-pci.c and sgiioc4.c
#   
#   On Mon, 03 Jan 2005 21:44:33 +0000, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
#   >
#   > Different PCI functions are but nothing requires that the PCI function
#   > that is the IDE controller is only the IDE controller. In some cases
#   > other logic lives in the "spare" BAR register areas of the device.
#   >
#   > One example where the weird design makes it obvious is the CS5520. Here
#   > the 5520 bridge has the IDE in one BAR and all sorts of other logic
#   > (including the xBUS virtual ISA environment) in the same PCI function.
#   > On that chip a pci_disable_device on the IDE pci_dev turns off mundane
#   > things like the timer chips keyboard and mouse 8).
#   >
#   > Other vendors do equally evil things and providing the chip reports IDE
#   > class and has the IDE BARs set up nobody else is any the wiser and
#   > presumably gate count goes down.
#   
#   Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
# 
# drivers/ide/setup-pci.c
#   2005/01/07 02:35:35+01:00 bzolnier@trik.(none) +5 -22
#   [ide] remove pci_disable_device() calls from setup-pci.c and sgiioc4.c
# 
# drivers/ide/pci/sgiioc4.c
#   2005/01/07 02:35:35+01:00 bzolnier@trik.(none) +1 -7
#   [ide] remove pci_disable_device() calls from setup-pci.c and sgiioc4.c
# 
# ChangeSet
#   2005/01/06 17:29:21-08:00 oliver@neukum.org 
#   [PATCH] USB: another workaround for cdc-acm
#   
#   there are a lot of buggy modems.
#   
#   
#   Signed-Off-By: Oliver Neukum <oliver@neukum.name>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/class/cdc-acm.h
#   2004/12/24 05:09:42-08:00 oliver@neukum.org +2 -1
#   USB: another workaround for cdc-acm
# 
# drivers/usb/class/cdc-acm.c
#   2004/12/24 05:09:42-08:00 oliver@neukum.org +15 -0
#   USB: another workaround for cdc-acm
# 
# ChangeSet
#   2005/01/06 17:28:51-08:00 jlamanna@gmail.com 
#   [PATCH] USB: ov511.c - vfree() checking cleanups
#   
#   ov511.c vfree() checking cleanups.
#   
#   Signed-off by: James Lamanna <jlamanna@gmail.com>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/media/ov511.c
#   2005/01/04 11:29:17-08:00 jlamanna@gmail.com +4 -8
#   USB: ov511.c - vfree() checking cleanups
# 
# ChangeSet
#   2005/01/06 17:28:25-08:00 david-b@pacbell.net 
#   [PATCH] Driver Core: handle bridged platform bus segments
#   
#   During setup to access platform bus segments through bridges, the current
#   platform_device_register() ignores the resource parent specified by the
#   bridge.  That means it'll always detect a (false) resource conflict with
#   the bridge, and fail the resource reservation step.
#   
#   This patch makes that code use the specified parent resource, defaulting
#   to "iomem_resource" or "ioport_resource" only for a NULL parent (that is,
#   for devices that aren't accessed through a bridge).
#   
#   Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/base/platform.c
#   2004/12/18 11:38:35-08:00 david-b@pacbell.net +7 -5
#   Driver Core: handle bridged platform bus segments
# 
# ChangeSet
#   2005/01/06 17:27:58-08:00 david-b@pacbell.net 
#   [PATCH] USB: fix serial gadget oops during enumeration
#   
#   This prevents the serial gadget driver from oopsing during enumeration
#   when spinlocks are configured, and slab poisoning is active...
#   
#   Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/gadget/serial.c
#   2005/01/06 12:29:34-08:00 david-b@pacbell.net +1 -1
#   USB: fix serial gadget oops during enumeration
# 
# ChangeSet
#   2005/01/06 19:47:40-05:00 akpm@osdl.org 
#   [PATCH] r8169: oversized driver field for ethtool
#   
#   From: Francois Romieu <romieu@fr.zoreil.com>
#   
#   Reported by Richard Dawe <rich@phekda.gotadsl.co.uk>:
#   - RTL8169_DRIVER_NAME contains more than the 32 characters allowed for the
#     driver field;
#   - remove RTL8169_DRIVER_NAME as it is only used once.
#   
#   Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/r8169.c
#   2005/01/05 00:57:36-05:00 akpm@osdl.org +4 -4
#   r8169: oversized driver field for ethtool
# 
# ChangeSet
#   2005/01/06 19:47:22-05:00 akpm@osdl.org 
#   [PATCH] r8169: reduce max MTU for large frames
#   
#   From: Francois Romieu <romieu@fr.zoreil.com>
#   
#   The device does not support the whole mtu range it claims. Experimenting
#   with the Tx threshold and/or the PCI burst size does not seem to improve
#   the behavior.
#   
#   Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/r8169.c
#   2005/01/05 00:57:45-05:00 akpm@osdl.org +3 -2
#   r8169: reduce max MTU for large frames
# 
# ChangeSet
#   2005/01/06 19:47:06-05:00 akpm@osdl.org 
#   [PATCH] r8169: Large Send enablement
#   
#   From: Francois Romieu <romieu@fr.zoreil.com>
#   
#   Large Send enablement.
#   
#   Acked-by: Francois Romieu <romieu@fr.zoreil.com>
#   Signed-off-by: Jon Mason <jdmason@us.ibm.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/r8169.c
#   2005/01/05 00:57:45-05:00 akpm@osdl.org +67 -13
#   r8169: Large Send enablement
# 
# ChangeSet
#   2005/01/06 19:46:44-05:00 akpm@osdl.org 
#   [PATCH] r8169: C 101
#   
#   From: Francois Romieu <romieu@fr.zoreil.com>
#   
#   Back to C101 and code which gives the expected result.
#   
#   Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/r8169.c
#   2005/01/05 00:57:45-05:00 akpm@osdl.org +1 -1
#   r8169: C 101
# 
# ChangeSet
#   2005/01/06 19:46:27-05:00 akpm@osdl.org 
#   [PATCH] r8169: missing netif_poll_enable and irq ack
#   
#   From: Francois Romieu <romieu@fr.zoreil.com>
#   
#   - (noticed by Jon D. Mason) rtl8169_wait_for_quiescence() needs to disable
#     the NAPI processing but it has no reason to lock any part of the driver
#     which would try to do the same at a later time. Let's reenable NAPI
#     processing as soon as possible.
#   - properly ack any aborted interruption: a reset of the device is not
#     always enough.
#   
#   Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/r8169.c
#   2005/01/05 00:57:45-05:00 akpm@osdl.org +9 -0
#   r8169: missing netif_poll_enable and irq ack
# 
# ChangeSet
#   2005/01/06 16:41:45-08:00 torvalds@ppc970.osdl.org 
#   Merge http://lia64.bkbits.net/linux-ia64-release-2.6.11
#   into ppc970.osdl.org:/home/torvalds/v2.6/linux
# 
# arch/ia64/kernel/irq_ia64.c
#   2005/01/06 16:41:41-08:00 torvalds@ppc970.osdl.org +0 -0
#   Auto merged
# 
# ChangeSet
#   2005/01/06 16:40:16-08:00 alan@lxorguk.ukuu.org.uk 
#   [PATCH] First cut at setsid/tty locking
#   
#   Use the existing "tty_sem" to protect against the process tty changes
#   too.
# 
# kernel/sys.c
#   2005/01/04 10:47:32-08:00 alan@lxorguk.ukuu.org.uk +2 -0
#   First cut at setsid/tty locking
# 
# kernel/exit.c
#   2005/01/04 10:45:27-08:00 alan@lxorguk.ukuu.org.uk +2 -0
#   First cut at setsid/tty locking
# 
# drivers/char/tty_io.c
#   2005/01/04 11:42:29-08:00 alan@lxorguk.ukuu.org.uk +29 -10
#   First cut at setsid/tty locking
# 
# ChangeSet
#   2005/01/06 16:40:02-08:00 alan@lxorguk.ukuu.org.uk 
#   [PATCH] Resurrect ISICOM serial
#   
#   The isicom driver had bitrotted badly and although it had some 2.6
#   cleanup work didn't actually do anything useful.  ISIcom had their own
#   2.4 driver which didn't work with 2.6 either but had done the hard work
#   like the locking rewrites.  So I nailed them together and then fixed
#   some obvious bugs in the ISIcom driver version.
# 
# include/linux/isicom.h
#   2005/01/06 10:28:30-08:00 alan@lxorguk.ukuu.org.uk +0 -173
#   Resurrect ISICOM serial
# 
# drivers/char/isicom.c
#   2005/01/06 10:53:25-08:00 alan@lxorguk.ukuu.org.uk +500 -336
#   Resurrect ISICOM serial
# 
# drivers/char/Kconfig
#   2005/01/06 10:42:18-08:00 alan@lxorguk.ukuu.org.uk +1 -1
#   Resurrect ISICOM serial
# 
# ChangeSet
#   2005/01/06 16:39:32-08:00 jbarnes@engr.sgi.com 
#   [PATCH] fix oops when reading resourceN files in sysfs
#   
#   On Thursday, January 6, 2005 12:25 pm, Jesse Barnes wrote:
#   > [Sorry about the bogus reply, I don't have the original message.]
#   >
#   > That shouldn't happen.  Maybe you were running an old version of the tree
#   > or an old version of my sysfs mmap patch?  When I do a 'bk pull' of
#   > gregkh's latest usb tree into a recent Linus tree, I get an -EINVAL, not an
#   > oops.  An earlier version of my patch had this bug though, so maybe that's
#   > what you're seeing?
#   
#   Ugg.  How about this?
#   
#   Zero out newly allocated bin_attributes for legacy I/O, memory and resource
#   files since we won't fill in all of the file operation methods.  This will
#   allow the checks in bin.c for the existence of a method to work properly
#   instead of checking garbage memory.
#   
#   Signed-off-by: Jesse Barnes <jbarnes@sgi.com>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/pci/probe.c
#   2005/01/06 12:32:19-08:00 jbarnes@engr.sgi.com +1 -0
#   fix oops when reading resourceN files in sysfs
# 
# drivers/pci/pci-sysfs.c
#   2005/01/06 12:30:29-08:00 jbarnes@engr.sgi.com +1 -0
#   fix oops when reading resourceN files in sysfs
# 
# ChangeSet
#   2005/01/06 16:39:01-08:00 juhl-lkml@dif.dk 
#   [PATCH] add printing of udev version to scripts/ver_linux
#   
#   Since udev is starting to be used a lot of places and I've seen people get
#   asked about their udev version a few times on lkml I figured it was
#   perhaps time that scripts/ver_linux reported this info so it would get
#   into more bugreports by default.
#   
#   This patch adds printing of udev version to scripts/ver_linux
#   
#   Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# scripts/ver_linux
#   2004/12/29 17:21:34-08:00 juhl-lkml@dif.dk +2 -0
#   add printing of udev version to scripts/ver_linux
# 
# Documentation/Changes
#   2004/12/29 17:42:10-08:00 juhl-lkml@dif.dk +9 -1
#   add printing of udev version to scripts/ver_linux
# 
# ChangeSet
#   2005/01/06 16:38:08-08:00 akpm@osdl.org 
#   [PATCH] debugfs-typo-fix
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# include/linux/debugfs.h
#   2004/12/27 10:29:51-08:00 akpm@osdl.org +1 -1
#   debugfs-typo-fix
# 
# ChangeSet
#   2005/01/07 00:37:02+00:00 dave.jiang@com.rmk.(none) 
#   [ARM PATCH] 2356/1: cleanup for compliance of machine ID and ATAG for IOP platforms
#   
#   Patch from Dave Jiang
#   
#   Signed-off-by: Dave Jiang
#   
#   Latest IOP official release of redboot now supports the proper machine IDs for all IOP platforms and also pass in the correct amount of memory available via ATAG. Removing hard coded stuff now that we can get the proper info from redboot.
#   Signed-off-by: Russell King
# 
# ChangeSet
#   2005/01/06 16:35:37-08:00 kas@fi.muni.cz 
#   [PATCH] cosa.h ioctl numbers
#   
#   Make COSA ioctl numbers compatible with previous kernels.
#   
#   Signed-off-by: Jan "Yenya" Kasprzak <kas@fi.muni.cz>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/net/wan/cosa.h
#   2004/12/02 05:09:23-08:00 kas@fi.muni.cz +8 -2
#   cosa.h ioctl numbers
# 
# ChangeSet
#   2005/01/06 16:35:24-08:00 kas@fi.muni.cz 
#   [PATCH] cosa.c intialization crash
#   
#   This fixes crash on insmod of the cosa.ko module - the sppp_attach() was
#   called too early when dev->priv has not been set up yet. 
#   
#   Signed-off-by: Jan "Yenya" Kasprzak <kas@fi.muni.cz>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/net/wan/cosa.c
#   2004/11/14 17:26:39-08:00 kas@fi.muni.cz +1 -1
#   cosa.c intialization crash
# 
# ChangeSet
#   2005/01/06 16:35:10-08:00 yuasa@hh.iij4u.or.jp 
#   [PATCH] mips: remove duplicate _end entry
#   
#   This is already declared in asm-generic/sections.h
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-mips/sections.h
#   2005/01/06 08:59:05-08:00 yuasa@hh.iij4u.or.jp +0 -1
#   mips: remove duplicate _end entry
# 
# ChangeSet
#   2005/01/06 16:34:59-08:00 hch@lst.de 
#   [PATCH] ppc64: export ppc64_caches for afs/ntfs
#   
#   they use clear_page, which in turn uses ppc64_caches so it needs to be
#   exported.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/ppc64/kernel/setup.c
#   2005/01/06 08:59:01-08:00 hch@lst.de +1 -0
#   ppc64: export ppc64_caches for afs/ntfs
# 
# ChangeSet
#   2005/01/06 16:34:44-08:00 bunk@stusta.de 
#   [PATCH] fix MTD_BLOCK2MTD dependency
#   
#   The patch below fixes an obviously wrong dependency.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/mtd/devices/Kconfig
#   2005/01/06 08:58:55-08:00 bunk@stusta.de +1 -1
#   fix MTD_BLOCK2MTD dependency
# 
# ChangeSet
#   2005/01/06 16:34:31-08:00 akpm@osdl.org 
#   [PATCH] mmc build fix
#   
#   Usual workaround for the gcc-2.95.x macro expansion bug.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/mmc/wbsd.c
#   2005/01/06 08:58:54-08:00 akpm@osdl.org +1 -1
#   mmc build fix
# 
# ChangeSet
#   2005/01/06 16:34:18-08:00 heiko.carstens@de.ibm.com 
#   [PATCH] s390: add missing pte_read function
#   
#   this patch adds the missing pte_read function and makes s390 compile again.
#   
#   Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-s390/pgtable.h
#   2005/01/06 08:58:52-08:00 heiko.carstens@de.ibm.com +8 -0
#   s390: add missing pte_read function
# 
# ChangeSet
#   2005/01/06 16:34:05-08:00 akpm@osdl.org 
#   [PATCH] __GFP_ZERO pktcdvd fix
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/block/pktcdvd.c
#   2005/01/06 08:58:50-08:00 akpm@osdl.org +1 -1
#   __GFP_ZERO pktcdvd fix
# 
# ChangeSet
#   2005/01/06 16:29:13-08:00 torvalds@ppc970.osdl.org 
#   Make pipe data structure be a circular list of pages, rather than
#   a circular list of one page.
#   
#   This improves pipe throughput, and allows us to (eventually)
#   use these lists of page buffers for moving data around efficiently.
# 
# include/linux/pipe_fs_i.h
#   2005/01/06 16:29:06-08:00 torvalds@ppc970.osdl.org +10 -9
#   Make pipe data structure be a circular list of pages, rather than
#   a circular list of one page.
#   
#   This improves pipe throughput, and allows us to (eventually)
#   use these lists of page buffers for moving data around efficiently.
# 
# fs/pipe.c
#   2005/01/06 16:29:05-08:00 torvalds@ppc970.osdl.org +87 -43
#   Make pipe data structure be a circular list of pages, rather than
#   a circular list of one page.
#   
#   This improves pipe throughput, and allows us to (eventually)
#   use these lists of page buffers for moving data around efficiently.
# 
# arch/arm/configs/iq80331_defconfig
#   2005/01/06 17:50:02+00:00 dave.jiang@com.rmk.(none) +86 -19
#   [PATCH] 2356/1: cleanup for compliance of machine ID and ATAG for IOP platforms
# 
# arch/arm/configs/iq80321_defconfig
#   2005/01/06 17:52:28+00:00 dave.jiang@com.rmk.(none) +84 -7
#   [PATCH] 2356/1: cleanup for compliance of machine ID and ATAG for IOP platforms
# 
# arch/arm/configs/iq31244_defconfig
#   2005/01/06 17:53:21+00:00 dave.jiang@com.rmk.(none) +7 -6
#   [PATCH] 2356/1: cleanup for compliance of machine ID and ATAG for IOP platforms
# 
# arch/arm/configs/ep80219_defconfig
#   2005/01/06 17:54:44+00:00 dave.jiang@com.rmk.(none) +7 -6
#   [PATCH] 2356/1: cleanup for compliance of machine ID and ATAG for IOP platforms
# 
# arch/arm/boot/compressed/head-xscale.S
#   2005/01/06 17:40:31+00:00 dave.jiang@com.rmk.(none) +0 -14
#   [PATCH] 2356/1: cleanup for compliance of machine ID and ATAG for IOP platforms
# 
# ChangeSet
#   2005/01/07 00:23:13+00:00 dave.jiang@com.rmk.(none) 
#   [ARM PATCH] 2355/1: cleanup of PCI defines for IOP33x platforms
#   
#   Patch from Dave Jiang
#   
#   Signed-off-by: Dave Jiang
#   
#   Major cleanup of the IOP33x family platform PCI defines. Hopefully should be more coherent and removed some magic numbers. Also should be finalized with the latest redboot ATU config.
#   Signed-off-by: Russell King
# 
# ChangeSet
#   2005/01/06 16:22:21-08:00 R.Marek@sh.cvut.cz 
#   [PATCH] I2C: vid version detection fix
#   
#   AMD 64 uses same VID table as Opteron.
#   
#   Source:
#   http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/25112.PDF
#   
#   Signed-off-by: Rudolf Marek <r.marek@sh.cvut.cz>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/i2c/i2c-sensor-vid.c
#   2004/12/23 05:51:13-08:00 R.Marek@sh.cvut.cz +2 -3
#   I2C: vid version detection fix
# 
# include/asm-arm/arch-iop3xx/iq80331.h
#   2005/01/06 17:40:32+00:00 dave.jiang@com.rmk.(none) +0 -15
#   [PATCH] 2355/1: cleanup of PCI defines for IOP33x platforms
# 
# include/asm-arm/arch-iop3xx/iop331.h
#   2005/01/06 17:40:32+00:00 dave.jiang@com.rmk.(none) +34 -13
#   [PATCH] 2355/1: cleanup of PCI defines for IOP33x platforms
# 
# arch/arm/mach-iop3xx/iq80331-pci.c
#   2005/01/06 17:40:32+00:00 dave.jiang@com.rmk.(none) +9 -25
#   [PATCH] 2355/1: cleanup of PCI defines for IOP33x platforms
# 
# arch/arm/mach-iop3xx/iop331-pci.c
#   2005/01/06 17:40:32+00:00 dave.jiang@com.rmk.(none) +20 -15
#   [PATCH] 2355/1: cleanup of PCI defines for IOP33x platforms
# 
# ChangeSet
#   2005/01/07 00:12:42+00:00 dave.jiang@com.rmk.(none) 
#   [ARM PATCH] 2352/1: Increase amount of physical memory addressable on IOP platforms
#   
#   Patch from Dave Jiang
#   
#   Signed-off-by: Dave Jiang
#   
#   Move the VMALLOC_END to 0xfe000000 from 0xe8000000 to increase the amount of physical memory addressable on XScale IOP platforms.
#   Signed-off-by: Russell King
# 
# include/asm-arm/arch-iop3xx/vmalloc.h
#   2005/01/04 20:37:02+00:00 dave.jiang@com.rmk.(none) +4 -1
#   [PATCH] 2352/1: Increase amount of physical memory addressable on IOP platforms
# 
# ChangeSet
#   2005/01/06 23:58:39+00:00 gtj.member@com.rmk.(none) 
#   [ARM PATCH] 2334/1: Corrects ixp4xx USB base addr and adds QMGRr/EthA/EthB in ixp4xx-regs.h
#   
#   Patch from George Joseph
#   
#   Corrects the IXP4XX_USB_BASE offset to be 0xB000 instead of overlapping TIMER at 0x5000.  Also adds IXP4XX_QMGR_BASE and offsets for EthA and EthB.
#   
#   Signed-off-by: George T. Joseph
#   Signed-off-by: Russell King
# 
# include/asm-arm/arch-ixp4xx/ixp4xx-regs.h
#   2004/12/27 04:37:50+00:00 gtj.member@com.rmk.(none) +10 -2
#   [PATCH] 2334/1: Corrects ixp4xx USB base addr and adds QMGRr/EthA/EthB in ixp4xx-regs.h
# 
# ChangeSet
#   2005/01/06 23:27:12+00:00 rmk@flint.arm.linux.org.uk 
#   [ARM] Add basic SMP support.
#   
#   Add the beginnings of SMP support to the ARM architecture, providing
#   smp.c, smp.h, and cpu.h.  Convert setup.c to use per-cpu for
#   topology initialisation.
#   
#   Signed-off-by: Russell King <rmk@arm.linux.org.uk>
# 
# include/asm-arm/cpu.h
#   2005/01/06 23:23:36+00:00 rmk@flint.arm.linux.org.uk +26 -0
# 
# include/asm-arm/cpu.h
#   2005/01/06 23:23:36+00:00 rmk@flint.arm.linux.org.uk +0 -0
#   BitKeeper file /usr/src/bk/linux-2.6-smp/include/asm-arm/cpu.h
# 
# arch/arm/kernel/smp.c
#   2005/01/06 23:23:27+00:00 rmk@flint.arm.linux.org.uk +406 -0
# 
# arch/arm/kernel/smp.c
#   2005/01/06 23:23:27+00:00 rmk@flint.arm.linux.org.uk +0 -0
#   BitKeeper file /usr/src/bk/linux-2.6-smp/arch/arm/kernel/smp.c
# 
# include/asm-arm/smp.h
#   2005/01/06 23:23:26+00:00 rmk@flint.arm.linux.org.uk +46 -5
#   Add SMP basics.
# 
# arch/arm/kernel/setup.c
#   2005/01/06 23:23:26+00:00 rmk@flint.arm.linux.org.uk +18 -2
#   Convert topology_init to register cpu structures from within
#   cpuinfo_arm.
# 
# arch/arm/kernel/Makefile
#   2005/01/06 23:23:26+00:00 rmk@flint.arm.linux.org.uk +1 -0
#   Add smp.o object to the build.
# 
# arch/arm/Kconfig
#   2005/01/06 23:23:26+00:00 rmk@flint.arm.linux.org.uk +27 -0
#   Add SMP configuration options.
# 
# ChangeSet
#   2005/01/06 15:13:51-08:00 davem@nuts.davemloft.net 
#   Merge bk://kernel.bkbits.net/acme/connection_sock-2.6
#   into nuts.davemloft.net:/disk1/BK/net-2.6
# 
# net/sunrpc/xprt.c
#   2005/01/06 15:13:40-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# net/ipv4/tcp_timer.c
#   2005/01/06 15:13:39-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# net/ipv4/tcp_minisocks.c
#   2005/01/06 15:13:39-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# net/ipv4/tcp_input.c
#   2005/01/06 15:13:39-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# net/ipv4/tcp.c
#   2005/01/06 15:13:39-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# net/ipv4/ip_sockglue.c
#   2005/01/06 15:13:39-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# include/net/tcp.h
#   2005/01/06 15:13:39-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# include/linux/ipv6.h
#   2005/01/06 15:13:38-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# ChangeSet
#   2005/01/06 15:05:54-08:00 dsaxena@plexity.net 
#   [PATCH] Update IOP3xx I2C bus driver
#   
#   The following patch is a major cleanup of the IOP3xx I2C bus driver
#   that is found on Intel's IOP and IXP chipsets. The existing driver in
#   the 2.6 tree uses hardcoded I/O addresses based on board configuration
#   which is just going to get ugly as more chips use this unit. The update
#   switches to using the driver model and passing in the I/O addresses
#   via platform_device resources. The patch also updates the ID name to
#   more closely match the actual usage of the device.
#   
#   I have tested this new driver on IXP46x systems and Dave Jiang has
#   tested it on both IOP321 and IOP331 systems. ARM-specific patches
#   to provide platform-level hooks will go upstream after this patch
#   is integrated.
#   
#   An example of using the new driver (from IXP46x ARM code) follows:
#   
#   static struct resource ixp46x_i2c_resources[] = {
#   	[0] = {
#   		.start 	= 0xc8011000,
#   		.end	= 0xc801101c,
#   		.flags	= IORESOURCE_MEM,
#   	},
#   	[1] = {
#   		.start 	= IRQ_IXP4XX_I2C,
#   		.end	= IRQ_IXP4XX_I2C,
#   		.flags	= IORESOURCE_IRQ
#   	}
#   };
#   
#   static struct platform_device ixp46x_i2c_controller = {
#   	.name		= "IOP3xx-I2C",
#   	.id		= 0,
#   	.num_resources	= 2,
#   	.resource	= &ixp46x_i2c_resources
#   };
#   
#   static struct platform_device *ixp46x_devices[] __initdata = {
#   	&ixp46x_i2c_controller
#   };
#   
#   void __init ixp4xx_init(void)
#   {
#   	if (cpu_is_ixp46x()) {
#   		platform_add_devices(ixp46x_devices,
#   				ARRAY_SIZE(ixp46x_devices));
#   	}
#   }
#   
#   Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# include/linux/i2c-id.h
#   2004/12/20 18:53:47-08:00 dsaxena@plexity.net +2 -2
#   Update IOP3xx I2C bus driver
# 
# drivers/i2c/busses/i2c-iop3xx.h
#   2005/01/04 11:03:30-08:00 dsaxena@plexity.net +50 -61
#   Update IOP3xx I2C bus driver
# 
# drivers/i2c/busses/i2c-iop3xx.c
#   2005/01/04 16:22:34-08:00 dsaxena@plexity.net +282 -263
#   Update IOP3xx I2C bus driver
# 
# drivers/i2c/busses/Kconfig
#   2004/12/17 02:34:42-08:00 dsaxena@plexity.net +8 -2
#   Update IOP3xx I2C bus driver
# 
# ChangeSet
#   2005/01/06 15:05:25-08:00 khali@linux-fr.org 
#   [PATCH] I2C: Update fscher pwm functionality
#   
#   This is a small update to the fscher hardware monitoring chip driver.
#   More specifically it fixes two aspects of pwm:
#   1* Use the new sysfs names (e.g. pwm1 instead of fan1_pwm).
#   2* Better handling of out-of-range pwm values.
#   
#   Signed-off-by: Jean Delvare <khali@linux-fr.org>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/i2c/chips/fscher.c
#   2005/01/05 11:40:34-08:00 khali@linux-fr.org +6 -5
#   I2C: Update fscher pwm functionality
# 
# ChangeSet
#   2005/01/06 15:04:58-08:00 david-b@pacbell.net 
#   [PATCH] I2C: minor isp1301_omap tweaks
#   
#   Minor cleanups to the isp130_omap driver:  enable the right
#   amount of VBUS current draw in non-OTG configurations; get rid
#   of a warning from GCC 2.95.3 ("int" function returns no value);
#   use kcalloc() not kmalloc+memset.
#   
#   Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/i2c/chips/isp1301_omap.c
#   2005/01/05 12:21:54-08:00 david-b@pacbell.net +4 -5
#   I2C: minor isp1301_omap tweaks
# 
# ChangeSet
#   2005/01/06 15:01:07-08:00 davem@nuts.davemloft.net 
#   [TG3]: Update driver version and reldate.
#   
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# drivers/net/tg3.c
#   2005/01/06 15:00:46-08:00 davem@nuts.davemloft.net +2 -2
#   [TG3]: Update driver version and reldate.
#   
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# ChangeSet
#   2005/01/06 14:58:57-08:00 davem@nuts.davemloft.net 
#   [TG3]: Fix signedness issues in PHY read/write loops.
#   
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# drivers/net/tg3.c
#   2005/01/06 14:58:36-08:00 davem@nuts.davemloft.net +10 -6
#   [TG3]: Fix signedness issues in PHY read/write loops.
#   
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# ChangeSet
#   2005/01/06 14:55:45-08:00 davem@nuts.davemloft.net 
#   [TG3]: Return 0 when PHY read times out, not all-ones.
#   
#   Noticed by Peter Chubb.
#   
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# ChangeSet
#   2005/01/06 14:55:28-08:00 jbarnes@sgi.com 
#   [IA64] swiotlb.c: long line, whitespace, and other cleanup
#   
#   Clean up swiotlb.c a bit in preparation for some other changes that might be 
#   coming (e.g. moving it to the top level lib/ directory, adding support for 
#   more uses).  Mostly whitespace and long line fixes, along with a few printk 
#   fixes.
#   
#   Signed-off-by: Jesse Barnes <jbarnes@sgi.com>
#   Signed-off-by: Tony Luck <tony.luck@intel.com>
# 
# drivers/net/tg3.c
#   2005/01/06 14:55:16-08:00 davem@nuts.davemloft.net +1 -1
#   [TG3]: Return 0 when PHY read times out, not all-ones.
#   
#   Noticed by Peter Chubb.
#   
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# arch/ia64/lib/swiotlb.c
#   2005/01/06 14:53:12-08:00 jbarnes@sgi.com +161 -131
#   long line, whitespace, and other cleanup
# 
# ChangeSet
#   2005/01/06 17:37:45-05:00 jgarzik@pobox.com 
#   Merge pobox.com:/garz/repo/netdev-2.6/viro-old-eth
#   into pobox.com:/garz/repo/net-drivers-2.6
# 
# drivers/net/tokenring/3c359.c
#   2005/01/06 17:37:42-05:00 jgarzik@pobox.com +0 -0
#   Auto merged
# 
# drivers/net/pcmcia/xirc2ps_cs.c
#   2005/01/06 17:37:42-05:00 jgarzik@pobox.com +0 -0
#   Auto merged
# 
# drivers/net/pcmcia/smc91c92_cs.c
#   2005/01/06 17:37:42-05:00 jgarzik@pobox.com +0 -0
#   Auto merged
# 
# drivers/net/depca.c
#   2005/01/06 17:37:42-05:00 jgarzik@pobox.com +0 -0
#   Auto merged
# 
# drivers/net/3c507.c
#   2005/01/06 17:37:42-05:00 jgarzik@pobox.com +0 -0
#   Auto merged
# 
# ChangeSet
#   2005/01/06 17:36:39-05:00 jgarzik@pobox.com 
#   Merge pobox.com:/garz/repo/netdev-2.6/iomap
#   into pobox.com:/garz/repo/net-drivers-2.6
# 
# drivers/net/eepro100.c
#   2005/01/06 17:36:36-05:00 jgarzik@pobox.com +0 -0
#   Auto merged
# 
# drivers/net/Kconfig
#   2005/01/06 17:36:36-05:00 jgarzik@pobox.com +0 -0
#   Auto merged
# 
# ChangeSet
#   2005/01/06 17:35:36-05:00 jgarzik@pobox.com 
#   Merge pobox.com:/garz/repo/netdev-2.6/8390
#   into pobox.com:/garz/repo/net-drivers-2.6
# 
# drivers/net/8390.c
#   2005/01/06 17:35:33-05:00 jgarzik@pobox.com +0 -0
#   Auto merged
# 
# ChangeSet
#   2005/01/06 13:55:55-08:00 khali@linux-fr.org 
#   [PATCH] I2C: Add byte commands to i2c-stub
#   
#   While working on EEPROMs, DDC/EDID and the like these last few days, I
#   wanted to use your i2c-stub driver to test my code. However, I noticed
#   that it wouldn't handle byte commands, while both i2cdetect and the
#   eeprom driver need it for proper operation. Thus I added this
#   functionality to the driver. What do you think about it?
#   
#   Signed-off-by: Jean Delvare <khali@linux-fr.org>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/i2c/busses/i2c-stub.c
#   2004/12/26 01:07:31-08:00 khali@linux-fr.org +20 -2
#   I2C: Add byte commands to i2c-stub
# 
# Documentation/i2c/i2c-stub
#   2004/12/26 06:08:02-08:00 khali@linux-fr.org +7 -2
#   I2C: Add byte commands to i2c-stub
# 
# ChangeSet
#   2005/01/06 13:55:26-08:00 khali@linux-fr.org 
#   [PATCH] I2C: Fix MAX6657/8/9 detection in lm90
#   
#   I received no additional feedback about my MAX6657/8/9 detection fix.
#   Since it was correct for the only chips I got a report for, I propose we
#   apply it. After all, maybe people don't know they have such a chip
#   because the detection was previously not correct.
#   
#   The patch below is the one I sent to the LM Sensors and Linux Kernel
#   mailing-lists two weeks ago, unchanged. Thanks.
#   
#   Signed-off-by: Jean Delvare <khali@linux-fr.org>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/i2c/chips/lm90.c
#   2004/12/12 07:28:42-08:00 khali@linux-fr.org +20 -8
#   I2C: Fix MAX6657/8/9 detection in lm90
# 
# ChangeSet
#   2005/01/06 13:54:52-08:00 khali@linux-fr.org 
#   [PATCH] I2C: Improve VID code for the W83627THF
#   
#   This patch cleans up and improves the VID pins value retrieval for the
#   W83627THF chip in the w83627hf driver. Tested successfully by Mark
#   Hoffman. The previous code was using an unrelated lock and reading
#   register values it didn't need. The new code supports 6-bit VID values
#   (as defined by Intel VRM 10), and also ensures that the GPIO pins are
#   possibly used as VID inputs.
#   
#   Signed-off-by: Jean Delvare <khali@linux-fr.org>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/i2c/chips/w83627hf.c
#   2004/12/19 04:57:59-08:00 khali@linux-fr.org +23 -8
#   I2C: Improve VID code for the W83627THF
# 
# ChangeSet
#   2005/01/06 13:54:20-08:00 khali@linux-fr.org 
#   [PATCH] I2C: Add secondary Super-I/O address support to
#   
#   This patch adds support for the secondary Super-I/O address to the
#   w83627hf driver. Most manufacturer use the primary address but at least
#   the EPoX EP-9NDA3+ had a Winbond W83627THF at the secondary address.
#   
#   Signed-off-by: Jean Delvare <khali@linux-fr.org>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/i2c/chips/w83627hf.c
#   2004/12/19 03:55:31-08:00 khali@linux-fr.org +8 -4
#   I2C: Add secondary Super-I/O address support to
# 
# ChangeSet
#   2005/01/06 13:53:47-08:00 mhoffman@lightlink.com 
#   [PATCH] I2C: probe fewer addresses for asb100 (sensors) driver
#   
#   This patch limits SMBus scanning for the asb100 sensor chip
#   to just one address - the only one we've ever seen in practice.
#   
#   Signed-off-by Mark M. Hoffman <mhoffman@lightlink.com>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/i2c/chips/asb100.c
#   2005/01/02 13:17:16-08:00 mhoffman@lightlink.com +1 -2
#   I2C: probe fewer addresses for asb100 (sensors) driver
# 
# ChangeSet
#   2005/01/06 10:23:40-08:00 domen@coderock.org 
#   [PATCH] arm26: Remove unreferenced file
#   
#   Remove nowhere referenced file. (egrep "filename\." didn't find anything)
#   
#   Signed-off-by: Domen Puncer <domen@coderock.org>
#   Signed-off-by: Ian Molton <spyro@f2s.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# BitKeeper/deleted/.del-ian_char.h~cbf9cbbdf02cc3a8
#   2005/01/06 10:23:32-08:00 domen@coderock.org +0 -0
#   Delete: include/asm-arm26/ian_char.h
# 
# ChangeSet
#   2005/01/06 09:10:17-08:00 torvalds@ppc970.osdl.org 
#   Use 'free_pipe_info()' helper function for pipe closedown.
#   
#   This avoids having fs/fifo.c having to know anything about
#   pipe data passing details, and cleans up the code.
# 
# include/linux/pipe_fs_i.h
#   2005/01/06 09:10:08-08:00 torvalds@ppc970.osdl.org +1 -0
#   Use 'free_pipe_info()' helper function for pipe closedown.
#   
#   This avoids having fs/fifo.c having to know anything about
#   pipe data passing details, and cleans up the code.
# 
# fs/pipe.c
#   2005/01/06 09:10:08-08:00 torvalds@ppc970.osdl.org +10 -7
#   Use 'free_pipe_info()' helper function for pipe closedown.
#   
#   This avoids having fs/fifo.c having to know anything about
#   pipe data passing details, and cleans up the code.
# 
# fs/fifo.c
#   2005/01/06 09:10:08-08:00 torvalds@ppc970.osdl.org +2 -6
#   Use 'free_pipe_info()' helper function for pipe closedown.
#   
#   This avoids having fs/fifo.c having to know anything about
#   pipe data passing details, and cleans up the code.
# 
# ChangeSet
#   2005/01/05 16:12:23-08:00 dhowells@redhat.com 
#   [PATCH] FRV: Update banner comments at the top of frv arch files
#   
#   This updates the banner comments at the top of the frv arch files so
#   that they don't proclaim to be part of the m68k arch and also to
#   attribute responsibility for them to myself. 
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# ChangeSet
#   2005/01/05 16:12:09-08:00 dhowells@redhat.com 
#   [PATCH] Make pud_alloc() and pmd_alloc() non-existant on !MMU
#   
#   This makes the general pud_alloc() and pmd_alloc() inline functions
#   unavailable if CONFIG_MMU is not defined. 
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# ChangeSet
#   2005/01/05 16:11:57-08:00 dhowells@redhat.com 
#   [PATCH] FRV: provide stub asm/a.out.h
#   
#   This provides a stub asm/a.out.h for the FRV arch.  This shouldn't be
#   necessary as FRV doesn't support the AOUT binfmt, but it seems to be
#   required by some archs for compilation of fs/exec.c.
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# ChangeSet
#   2005/01/05 16:11:43-08:00 dhowells@redhat.com 
#   [PATCH] FRV: remove excess argument passed to expand_stack()
#   
#   This removes the excess argument being passed to expand_stack() as it
#   isn't needed in -bk8.
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# ChangeSet
#   2005/01/05 16:11:30-08:00 dhowells@redhat.com 
#   [PATCH] FRV: vperfctr syscalls don't exist in -bk8
#   
#   This marks the vperfctr syscalls as unavailable as they aren't actually
#   implemented in -bk8. 
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# ChangeSet
#   2005/01/05 15:46:52-08:00 torvalds@ppc970.osdl.org 
#   fbmem: don't mix code/declarations. That messes up gcc-2.95
# 
# ChangeSet
#   2005/01/05 15:36:59-08:00 clameter@sgi.com 
#   [PATCH] Make page allocator aware of requests for zeroed memory
#   
#   Thisintroduces __GFP_ZERO as an additional gfp_mask element to allow to
#   request zeroed pages from the page allocator:
#   
#    - Modifies the page allocator so that it zeroes memory if __GFP_ZERO is
#      set
#   
#    - Replace all page zeroing after allocating pages by prior allocations with
#      allocations using __GFP_ZERO
#   
#   Signed-off-by: Christoph Lameter <clameter@sgi.com>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# ChangeSet
#   2005/01/06 00:17:21+00:00 rmk@flint.arm.linux.org.uk 
#   [ARM] Update mach-types file.
#   
#   Signed-off-by: Russell King <rmk@arm.linux.org.uk>
# 
# arch/arm/tools/mach-types
#   2005/01/06 00:12:49+00:00 rmk@flint.arm.linux.org.uk +37 -4
#   Update.
# 
# arch/frv/mm/kmap.c
#   2005/01/05 06:47:05-08:00 dhowells@redhat.com +9 -3
#   FRV: Update banner comments at the top of frv arch files
# 
# arch/frv/mb93090-mb00/pci-frv.c
#   2005/01/05 06:49:38-08:00 dhowells@redhat.com +9 -84
#   FRV: Update banner comments at the top of frv arch files
# 
# arch/frv/kernel/time.c
#   2005/01/05 06:43:44-08:00 dhowells@redhat.com +8 -8
#   FRV: Update banner comments at the top of frv arch files
# 
# arch/frv/kernel/sys_frv.c
#   2005/01/05 06:43:03-08:00 dhowells@redhat.com +9 -5
#   FRV: Update banner comments at the top of frv arch files
# 
# arch/frv/kernel/signal.c
#   2005/01/05 06:42:07-08:00 dhowells@redhat.com +8 -5
#   FRV: Update banner comments at the top of frv arch files
# 
# arch/frv/kernel/setup.c
#   2005/01/05 06:41:37-08:00 dhowells@redhat.com +9 -14
#   FRV: Update banner comments at the top of frv arch files
# 
# arch/frv/kernel/ptrace.c
#   2005/01/05 06:40:51-08:00 dhowells@redhat.com +8 -15
#   FRV: Update banner comments at the top of frv arch files
# 
# arch/frv/kernel/process.c
#   2005/01/05 06:39:32-08:00 dhowells@redhat.com +8 -10
#   FRV: Update banner comments at the top of frv arch files
# 
# include/linux/mm.h
#   2005/01/05 05:51:04-08:00 dhowells@redhat.com +2 -0
#   Make pud_alloc() and pmd_alloc() non-existant on !MMU
# 
# include/asm-frv/a.out.h
#   2005/01/05 05:33:46-08:00 dhowells@redhat.com +5 -0
#   FRV: provide stub asm/a.out.h
# 
# include/asm-frv/a.out.h
#   2005/01/05 05:33:46-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/a.out.h
# 
# arch/frv/mm/fault.c
#   2005/01/05 05:30:51-08:00 dhowells@redhat.com +2 -7
#   FRV: remove excess argument passed to expand_stack()
# 
# arch/frv/kernel/entry.S
#   2005/01/05 05:47:01-08:00 dhowells@redhat.com +5 -5
#   FRV: vperfctr syscalls don't exist in -bk8
# 
# ChangeSet
#   2005/01/05 23:58:22+00:00 rmk@flint.arm.linux.org.uk 
#   [ARM] Quieten compiler warnings, etc with ARM set_pmd()
#   
#   Signed-off-by: Russell King <rmk@arm.linux.org.uk>
# 
# include/asm-arm/pgtable.h
#   2005/01/05 23:55:41+00:00 rmk@flint.arm.linux.org.uk +1 -1
#   Ensure set_pmd behaves like a function.
# 
# arch/arm/mm/mm-armv.c
#   2005/01/05 23:55:41+00:00 rmk@flint.arm.linux.org.uk +1 -1
#   Kill parens warning
# 
# drivers/video/fbmem.c
#   2005/01/05 15:46:41-08:00 torvalds@ppc970.osdl.org +1 -1
#   Don't mix code/declarations. That messes up gcc-2.95
# 
# ChangeSet
#   2005/01/05 23:44:45+00:00 buytenh@org.rmk.(none) 
#   [ARM PATCH] 2351/1: fix compilation for ixp2000 enp2611 and ixdp2400 platforms
#   
#   Patch from Lennert Buytenhek
#   
#   Instead of 'struct sys_timer', the ixdp2400 code has 'struct timer' and the enp2611 has just 'struct', preventing compilation for both machine types.  This patch fixes it up.
#   
#   Signed-off-by: Lennert Buytenhek
#   Signed-off-by: Russell King
# 
# arch/arm/mach-ixp2000/ixdp2400.c
#   2005/01/05 18:28:28+00:00 buytenh@org.rmk.(none) +1 -1
#   [PATCH] 2351/1: fix compilation for ixp2000 enp2611 and ixdp2400 platforms
# 
# arch/arm/mach-ixp2000/enp2611.c
#   2005/01/05 18:28:33+00:00 buytenh@org.rmk.(none) +1 -1
#   [PATCH] 2351/1: fix compilation for ixp2000 enp2611 and ixdp2400 platforms
# 
# ChangeSet
#   2005/01/05 23:38:44+00:00 dsaxena@net.rmk.(none) 
#   [ARM PATCH] 2348/1: Fix IXDP2800 PCI irq mapping
#   
#   Patch from Deepak Saxena
#   
#   Our case statments are looking at the devfn, but the existing code
#   does a switch(PCI_SLOT(dev->devfn)). This causes all PCI devices 
#   behind the first bridge to be configured with IRQ 0. Bad.
#   
#   Signed-off-by: Deepak Saxena
#   Signed-off-by: Russell King
# 
# mm/shmem.c
#   2005/01/05 09:30:39-08:00 clameter@sgi.com +3 -5
#   Make page allocator aware of requests for zeroed memory
# 
# mm/page_alloc.c
#   2005/01/05 09:32:52-08:00 clameter@sgi.com +14 -6
#   Make page allocator aware of requests for zeroed memory
# 
# mm/memory.c
#   2005/01/05 09:30:39-08:00 clameter@sgi.com +1 -2
#   Make page allocator aware of requests for zeroed memory
# 
# kernel/profile.c
#   2005/01/05 09:30:39-08:00 clameter@sgi.com +4 -8
#   Make page allocator aware of requests for zeroed memory
# 
# include/linux/gfp.h
#   2005/01/05 09:30:39-08:00 clameter@sgi.com +2 -0
#   Make page allocator aware of requests for zeroed memory
# 
# include/asm-sparc64/pgalloc.h
#   2005/01/05 09:30:39-08:00 clameter@sgi.com +1 -2
#   Make page allocator aware of requests for zeroed memory
# 
# include/asm-sh64/pgalloc.h
#   2005/01/05 09:30:39-08:00 clameter@sgi.com +3 -9
#   Make page allocator aware of requests for zeroed memory
# 
# include/asm-sh/pgalloc.h
#   2005/01/05 09:30:39-08:00 clameter@sgi.com +2 -6
#   Make page allocator aware of requests for zeroed memory
# 
# include/asm-parisc/pgalloc.h
#   2005/01/05 09:30:39-08:00 clameter@sgi.com +2 -6
#   Make page allocator aware of requests for zeroed memory
# 
# include/asm-mips/pgalloc.h
#   2005/01/05 09:30:39-08:00 clameter@sgi.com +1 -3
#   Make page allocator aware of requests for zeroed memory
# 
# include/asm-m68k/motorola_pgalloc.h
#   2005/01/05 09:30:39-08:00 clameter@sgi.com +2 -4
#   Make page allocator aware of requests for zeroed memory
# 
# include/asm-m32r/pgalloc.h
#   2005/01/05 09:30:39-08:00 clameter@sgi.com +3 -11
#   Make page allocator aware of requests for zeroed memory
# 
# include/asm-ia64/pgalloc.h
#   2005/01/05 09:30:39-08:00 clameter@sgi.com +4 -12
#   Make page allocator aware of requests for zeroed memory
# 
# include/asm-cris/pgalloc.h
#   2005/01/05 09:30:39-08:00 clameter@sgi.com +2 -6
#   Make page allocator aware of requests for zeroed memory
# 
# include/asm-arm/pgalloc.h
#   2005/01/05 09:30:39-08:00 clameter@sgi.com +2 -4
#   Make page allocator aware of requests for zeroed memory
# 
# include/asm-alpha/pgalloc.h
#   2005/01/05 09:30:39-08:00 clameter@sgi.com +1 -3
#   Make page allocator aware of requests for zeroed memory
# 
# drivers/block/pktcdvd.c
#   2005/01/05 09:30:39-08:00 clameter@sgi.com +1 -3
#   Make page allocator aware of requests for zeroed memory
# 
# arch/um/kernel/mem.c
#   2005/01/05 09:30:39-08:00 clameter@sgi.com +2 -6
#   Make page allocator aware of requests for zeroed memory
# 
# arch/sparc64/mm/init.c
#   2005/01/05 09:30:39-08:00 clameter@sgi.com +1 -2
#   Make page allocator aware of requests for zeroed memory
# 
# arch/ppc/mm/pgtable.c
#   2005/01/05 09:30:39-08:00 clameter@sgi.com +2 -5
#   Make page allocator aware of requests for zeroed memory
# 
# arch/i386/mm/pgtable.c
#   2005/01/05 09:30:39-08:00 clameter@sgi.com +3 -8
#   Make page allocator aware of requests for zeroed memory
# 
# arch/alpha/mm/init.c
#   2005/01/05 09:30:39-08:00 clameter@sgi.com +2 -5
#   Make page allocator aware of requests for zeroed memory
# 
# arch/arm/mach-ixp2000/ixdp2800.c
#   2005/01/05 00:26:43+00:00 dsaxena@net.rmk.(none) +1 -1
#   [PATCH] 2348/1: Fix IXDP2800 PCI irq mapping
# 
# ChangeSet
#   2005/01/05 13:12:57-08:00 davem@nuts.davemloft.net 
#   [SPARC64]: We really do need to mask the start/end args to flush_tlb_pgtables().
#   
#   The callers used to do it, but with the 4-level page
#   table code this is no longer the case.  Noticed by
#   Nick Piggin and Andrew Morton.
#   
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# arch/sparc64/mm/tlb.c
#   2005/01/05 13:11:53-08:00 davem@nuts.davemloft.net +1 -3
#   [SPARC64]: We really do need to mask the start/end args to flush_tlb_pgtables().
# 
# ChangeSet
#   2005/01/05 11:12:32-08:00 torvalds@ppc970.osdl.org 
#   Merge bk://drm.bkbits.net/drm-linus
#   into ppc970.osdl.org:/home/torvalds/v2.6/linux
# 
# arch/sparc64/Kconfig
#   2005/01/05 11:12:27-08:00 torvalds@ppc970.osdl.org +0 -0
#   Auto merged
# 
# ChangeSet
#   2005/01/05 11:11:30-08:00 viro@parcelfarce.linux.theplanet.co.uk 
#   [PATCH] Fix megaraid oops on unload
#   
#   Reported by Wakko Warner.
#   
#   The megaraid driver is trying to remove a non-empty directory in procfs.
#   
#   Trivially fixed by first unregistering the driver, which will remove all
#   the per-controller files in the megaraid directory, and only _then_
#   removing the megaraid /proc directory entry.
# 
# drivers/scsi/megaraid.c
#   2005/01/05 10:03:52-08:00 viro@parcelfarce.linux.theplanet.co.uk +2 -2
#   Fix megaraid oops on unload
# 
# ChangeSet
#   2005/01/05 19:11:47+01:00 dwmw2@shinybook.infradead.org 
#   Merge shinybook.infradead.org:/home/dwmw2/bk/linus-2.6
#   into shinybook.infradead.org:/home/dwmw2/bk/mtd-2.6
# 
# fs/jffs2/fs.c
#   2005/01/05 19:11:38+01:00 dwmw2@shinybook.infradead.org +0 -0
#   Auto merged
# 
# fs/Kconfig
#   2005/01/05 19:11:38+01:00 dwmw2@shinybook.infradead.org +0 -0
#   Auto merged
# 
# MAINTAINERS
#   2005/01/05 19:11:38+01:00 dwmw2@shinybook.infradead.org +0 -0
#   Auto merged
# 
# ChangeSet
#   2005/01/05 19:08:53+01:00 domen@coderock.org 
#   MTD: Remove gratuitous (void *) casts.
#   
#   Signed-off-by: Domen Puncer <domen@coderock.org>
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# drivers/mtd/nand/s3c2410.c
#   2005/01/05 19:08:37+01:00 domen@coderock.org +6 -6
#   Removes casts of (void *) pointers.
# 
# drivers/mtd/nand/diskonchip.c
#   2005/01/05 19:08:37+01:00 domen@coderock.org +40 -40
#   Removes casts of (void *) pointers.
# 
# drivers/mtd/mtdchar.c
#   2005/01/05 19:08:37+01:00 domen@coderock.org +6 -6
#   Removes casts of (void *) pointers.
# 
# drivers/mtd/maps/uclinux.c
#   2005/01/05 19:08:36+01:00 domen@coderock.org +3 -3
#   Removes casts of (void *) pointers.
# 
# drivers/mtd/maps/ocelot.c
#   2005/01/05 19:08:36+01:00 domen@coderock.org +2 -2
#   Removes casts of (void *) pointers.
# 
# drivers/mtd/devices/slram.c
#   2005/01/05 19:08:36+01:00 domen@coderock.org +5 -5
#   Removes casts of (void *) pointers.
# 
# drivers/mtd/devices/pmc551.c
#   2005/01/05 19:08:36+01:00 domen@coderock.org +6 -6
#   Removes casts of (void *) pointers.
# 
# drivers/mtd/devices/phram.c
#   2005/01/05 19:08:36+01:00 domen@coderock.org +5 -5
#   Removes casts of (void *) pointers.
# 
# drivers/mtd/devices/mtdram.c
#   2005/01/05 19:08:36+01:00 domen@coderock.org +3 -3
#   Removes casts of (void *) pointers.
# 
# drivers/mtd/devices/ms02-nv.c
#   2005/01/05 19:08:36+01:00 domen@coderock.org +4 -4
#   Removes casts of (void *) pointers.
# 
# drivers/mtd/devices/doc2001plus.c
#   2005/01/05 19:08:36+01:00 domen@coderock.org +12 -12
#   Removes casts of (void *) pointers.
# 
# drivers/mtd/devices/doc2001.c
#   2005/01/05 19:08:36+01:00 domen@coderock.org +10 -10
#   Removes casts of (void *) pointers.
# 
# drivers/mtd/devices/doc2000.c
#   2005/01/05 19:08:36+01:00 domen@coderock.org +11 -11
#   Removes casts of (void *) pointers.
# 
# drivers/mtd/chips/map_rom.c
#   2005/01/05 19:08:36+01:00 domen@coderock.org +2 -2
#   Removes casts of (void *) pointers.
# 
# drivers/mtd/chips/map_ram.c
#   2005/01/05 19:08:36+01:00 domen@coderock.org +4 -4
#   Removes casts of (void *) pointers.
# 
# drivers/mtd/chips/jedec.c
#   2005/01/05 19:08:36+01:00 domen@coderock.org +8 -8
#   Removes casts of (void *) pointers.
# 
# ChangeSet
#   2005/01/05 18:53:19+01:00 dwmw2@shinybook.infradead.org 
#   MTD: Remove long-obsolete DiskOnChip 1000 driver.
# 
# BitKeeper/deleted/.del-doc1000.c~2174a9c913a860d8
#   2005/01/05 18:52:41+01:00 dwmw2@shinybook.infradead.org +0 -0
#   Delete: drivers/mtd/devices/doc1000.c
# 
# ChangeSet
#   2005/01/05 18:47:09+01:00 dwmw2@shinybook.infradead.org 
#   MTD: Cosmetic ident catchup.
#   
#   Let the CVS idents catch up where changes have been made upstream.
#   
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# include/linux/mtd/gen_probe.h
#   2005/01/05 18:46:53+01:00 dwmw2@shinybook.infradead.org +1 -1
#   revision 1.3
#   date: 2004/10/20 22:10:33;  author: dwmw2;  state: Exp;  lines: +2 -2
#   merge from 2.6.9 -- change asm/bitops.h to linux/bitops.h
# 
# include/linux/mtd/doc2000.h
#   2005/01/05 18:46:53+01:00 dwmw2@shinybook.infradead.org +1 -1
#   revision 1.24
#   date: 2005/01/05 12:40:38;  author: dwmw2;  state: Exp;  lines: +3 -3
#   [PATCH] diskonchip missing iomem annotations
#           some trivial iomem annotations were still missing; since 2.6.10
#   and mtd snapshot are identical in that area, same patch goes to Linus and
#   dwmw2.
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
# 
# drivers/mtd/maps/sc520cdp.c
#   2005/01/05 18:46:53+01:00 dwmw2@shinybook.infradead.org +1 -1
#   revision 1.21
#   date: 2004/12/13 10:27:08;  author: dedekind;  state: Exp;  lines: +2 -2
#   Roll-back: remove wrong cast which hides error instead of fix it.
#   ----------------------------
#   revision 1.20
#   date: 2004/12/11 15:41:19;  author: dedekind;  state: Exp;  lines: +2 -2
#   Cast type to prevent warning.
# 
# drivers/mtd/devices/docprobe.c
#   2005/01/05 18:46:53+01:00 dwmw2@shinybook.infradead.org +1 -1
#   revision 1.44
#   date: 2005/01/05 12:40:36;  author: dwmw2;  state: Exp;  lines: +9 -9
#   [PATCH] diskonchip missing iomem annotations
#           some trivial iomem annotations were still missing; since 2.6.10
#   and mtd snapshot are identical in that area, same patch goes to Linus and
#   dwmw2.
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
# 
# drivers/mtd/devices/doc2001plus.c
#   2005/01/05 18:46:53+01:00 dwmw2@shinybook.infradead.org +1 -1
#   revision 1.12
#   date: 2005/01/05 12:40:36;  author: dwmw2;  state: Exp;  lines: +4 -4
#   [PATCH] diskonchip missing iomem annotations
#           some trivial iomem annotations were still missing; since 2.6.10
#   and mtd snapshot are identical in that area, same patch goes to Linus and
#   dwmw2.
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
# 
# drivers/mtd/devices/doc2001.c
#   2005/01/05 18:46:53+01:00 dwmw2@shinybook.infradead.org +1 -1
#   revision 1.47
#   date: 2005/01/05 12:40:36;  author: dwmw2;  state: Exp;  lines: +4 -4
#   [PATCH] diskonchip missing iomem annotations
#           some trivial iomem annotations were still missing; since 2.6.10
#   and mtd snapshot are identical in that area, same patch goes to Linus and
#   dwmw2.
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
# 
# drivers/mtd/devices/doc2000.c
#   2005/01/05 18:46:53+01:00 dwmw2@shinybook.infradead.org +1 -1
#   revision 1.65
#   date: 2005/01/05 12:40:36;  author: dwmw2;  state: Exp;  lines: +5 -5
#   [PATCH] diskonchip missing iomem annotations
#           some trivial iomem annotations were still missing; since 2.6.10
#   and mtd snapshot are identical in that area, same patch goes to Linus and
#   dwmw2.
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
# 
# drivers/mtd/chips/Kconfig
#   2005/01/05 18:46:53+01:00 dwmw2@shinybook.infradead.org +1 -1
#   revision 1.13
#   date: 2004/12/01 15:49:10;  author: nico;  state: Exp;  lines: +3 -2
#   allows MTD XIP to compile on every target with a fallback to reduced
#   responsiveness, and warn about it.
#   ----------------------------
#   revision 1.12
#   date: 2004/12/01 14:52:17;  author: nico;  state: Exp;  lines: +2 -3
#   fix a Kconfig dependency to prevent too much grief for the brave on lkml
# 
# ChangeSet
#   2005/01/05 18:43:36+01:00 dwmw2@shinybook.infradead.org 
#   [MTD] add missing dependencies on MTD_PARTITIONS
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# drivers/mtd/nand/Kconfig
#   2005/01/05 18:43:20+01:00 dwmw2@shinybook.infradead.org +2 -2
#   revision 1.26
#   date: 2005/01/05 12:42:24;  author: dwmw2;  state: Exp;  lines: +2 -2
#   [2.6 patch] add missing dependencies on MTD_PARTITIONS
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
# 
# drivers/mtd/maps/Kconfig
#   2005/01/05 18:43:20+01:00 dwmw2@shinybook.infradead.org +3 -3
#   revision 1.42
#   date: 2005/01/05 16:59:50;  author: dwmw2;  state: Exp;  lines: +9 -1
#   add chestnut map driver
#   ----------------------------
#   revision 1.41
#   date: 2005/01/05 12:42:24;  author: dwmw2;  state: Exp;  lines: +2 -2
#   [2.6 patch] add missing dependencies on MTD_PARTITIONS
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
# 
# ChangeSet
#   2005/01/05 18:39:49+01:00 dwmw2@shinybook.infradead.org 
#   MTD: Fix config option name in Makefile for IBM 750FX/750GX boards.
#   
#   Also some cosmetic fixes in the map driver itself.
#   
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# drivers/mtd/maps/chestnut.c
#   2005/01/05 18:39:35+01:00 dwmw2@shinybook.infradead.org +4 -2
#   cosmetic fixes.
# 
# drivers/mtd/maps/Makefile
#   2005/01/05 18:39:35+01:00 dwmw2@shinybook.infradead.org +2 -2
#   revision 1.23
#   date: 2005/01/05 17:06:36;  author: dwmw2;  state: Exp;  lines: +2 -2
#   Fix chestnut config option name
# 
# ChangeSet
#   2005/01/05 18:36:19+01:00 dwmw2@shinybook.infradead.org 
#   MTD: include moduleparam.h in DiskOnChip driver
#   
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# drivers/mtd/nand/diskonchip.c
#   2005/01/05 18:36:04+01:00 dwmw2@shinybook.infradead.org +2 -1
#   revision 1.44
#   date: 2005/01/05 17:34:27;  author: dwmw2;  state: Exp;  lines: +2 -1
#   include moduleparam.h
# 
# ChangeSet
#   2005/01/05 18:25:43+01:00 rpurdie@rpsys.net 
#   MTD SharpSL NAND driver: Calculate partitions sizes at runtime.
#   
#   This allows one kernel build to support multiple machines.
#   
#   Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# drivers/mtd/nand/sharpsl.c
#   2005/01/05 18:25:27+01:00 rpurdie@rpsys.net +19 -32
#   revision 1.3
#   date: 2005/01/03 14:53:50;  author: rpurdie;  state: Exp;  lines: +19 -32
#   NAND Sharpsl: Work out partition sizes at runtime instead of compile time allowing one kernel to support multiple machines.
# 
# ChangeSet
#   2005/01/05 18:22:57+01:00 joern@wh.fh-wedel.de 
#   [MTD] New blockdev-backed 'fake' MTD device.
#   
#   Rewritten alternative driver by Gareth Bult and Jörn Engel.
#   
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# drivers/mtd/devices/block2mtd.c
#   2005/01/05 18:22:39+01:00 joern@wh.fh-wedel.de +505 -0
# 
# drivers/mtd/devices/block2mtd.c
#   2005/01/05 18:22:39+01:00 joern@wh.fh-wedel.de +0 -0
#   BitKeeper file /home/dwmw2/bk/mtd-2.6/drivers/mtd/devices/block2mtd.c
# 
# drivers/mtd/devices/Makefile
#   2005/01/05 18:22:39+01:00 joern@wh.fh-wedel.de +2 -1
#   revision 1.7
#   date: 2004/12/22 17:51:15;  author: joern;  state: Exp;  lines: +2 -1
#   Add Kconfig and Makefile entries for block2mtd.
# 
# drivers/mtd/devices/Kconfig
#   2005/01/05 18:22:39+01:00 joern@wh.fh-wedel.de +10 -1
#   revision 1.15
#   date: 2004/12/22 17:51:15;  author: joern;  state: Exp;  lines: +10 -1
#   Add Kconfig and Makefile entries for block2mtd.
# 
# ChangeSet
#   2005/01/05 18:17:59+01:00 juhl-lkml@dif.dk 
#   [MTD] remove unnecessary casts from drivers/mtd/maps/nettel.c and kill two warnings
#   
#   I took a look at the cause for these warnings in the 2.6.10 kernel,
#   
#   drivers/mtd/maps/nettel.c:361: warning: assignment makes pointer from integer without a cast
#   drivers/mtd/maps/nettel.c:395: warning: assignment makes pointer from integer without a cast
#   
#   and as far as I can see the casts in there (to unsigned long and back to
#   void*) are completely unnessesary ('virt' in 'struct map_info' is a void
#   __iomem *), and getting rid of those casts buys us a warning free build.
#   
#   Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# drivers/mtd/maps/nettel.c
#   2005/01/05 18:17:45+01:00 juhl-lkml@dif.dk +9 -11
#   revision 1.10
#   date: 2005/01/05 17:11:29;  author: dwmw2;  state: Exp;  lines: +9 -11
#   [patch] remove unnessesary casts from drivers/mtd/maps/nettel.c and kill two warnings
#   
#   I took a look at the cause for these warnings in the 2.6.10 kernel,
#   
#   drivers/mtd/maps/nettel.c:361: warning: assignment makes pointer from integer without a cast
#   drivers/mtd/maps/nettel.c:395: warning: assignment makes pointer from integer without a cast
#   
#   and as far as I can see the casts in there (to unsigned long and back to
#   void*) are completely unnessesary ('virt' in 'struct map_info' is a void
#   __iomem *), and getting rid of those casts buys us a warning free build.
#   
#   Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
# 
# ChangeSet
#   2005/01/05 18:15:36+01:00 dwmw2@shinybook.infradead.org 
#   [MTD] Bug in 2.6.10 mtd driver for physmem mapped flash chips
#   
#   The patch below fixes a small but fatal bug in the code that handles
#   non-buswidth-aligned writes. The problem is that the code used the same
#   index in both map_word and buf, therefore putting the wrong words in the
#   map_word that partially contains old data and partially contains new
#   data. The result: corrupt data is being written.
#   
#   Signed-off-by: Koen Martens <kmartens@sonologic.nl>
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# include/linux/mtd/map.h
#   2005/01/05 18:13:39+01:00 kmartens@sonologic.nl +2 -2
#   revision 1.46
#   date: 2005/01/05 17:09:44;  author: dwmw2;  state: Exp;  lines: +2 -2
#   [PATCH] Bug in 2.6.10 mtd driver for physmem mapped flash chips
#   
#   The patch below fixes a small but fatal bug in the code that handles
#   non-buswidth-aligned writes. The problem is that the code used the same
#   index in both map_word and buf, therefore putting the wrong words in the
#   map_word that partially contains old data and partially contains new
#   data. The result: corrupt data is being written.
#   
#   Signed-off-by: Koen Martens <kmartens@sonologic.nl>
# 
# ChangeSet
#   2005/01/05 08:10:25+01:00 perex@suse.cz 
#   [ALSA] 1.0.8rc2
# 
# include/sound/version.h
#   2005/01/05 08:09:58+01:00 perex@suse.cz +2 -2
#   1.0.8rc2
# 
# ChangeSet
#   2005/01/04 21:57:13-08:00 rbultje@ronald.bitfreak.net 
#   [PATCH] zr36067 driver - reduce stack size usage
#   
#   Reduce local variable (large struct) stack usage in zoran_do_ioctl() from 1028
#   bytes to 324 bytes (on x86-32) by declaring & using only 1 "struct
#   zoran_jpg_settings" instead of 5 instances of it.  Reduced from 5 * 180 bytes
#   to 1 * 180 bytes, plus other locals in each case.
#   
#   Signed-off-by: Randy Dunlap <rddunlap@osdl.org>
#   Signed-off-by: Ronald S. Bultje <rbultje@ronald.bitfreak.net>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/media/video/zoran_driver.c
#   2005/01/04 18:48:34-08:00 rbultje@ronald.bitfreak.net +7 -7
#   zr36067 driver - reduce stack size usage
# 
# ChangeSet
#   2005/01/04 21:57:00-08:00 rbultje@ronald.bitfreak.net 
#   [PATCH] zr36067 driver - ppc/be port
#   
#   Attached patch adds some host<->le conversion functions for 32-bit integers.
#   The hardware expects 32-bit integers, which the host does not always provide. 
#   With the attached patch, the hardware runs fine on PPC hardware as well.
#   
#   Original patch by Ben Capper <benandeve@optusnet.com.au>.
#   
#   Signed-off-by: Ronald S. Bultje <rbultje@ronald.bitfreak.net>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/media/video/zoran_driver.c
#   2005/01/04 20:24:03-08:00 rbultje@ronald.bitfreak.net +33 -23
#   zr36067 driver - ppc/be port
# 
# drivers/media/video/zoran_device.c
#   2005/01/04 18:48:33-08:00 rbultje@ronald.bitfreak.net +18 -13
#   zr36067 driver - ppc/be port
# 
# ChangeSet
#   2005/01/04 21:56:47-08:00 rbultje@ronald.bitfreak.net 
#   [PATCH] zr36067 driver - correct jpeg app/com markers
#   
#   Attached patch fixes the writing of APP (application-specific) and COM
#   (comment) markers in the JPEG stream as generated by the zr36050 or zr36060
#   encoders, both part of the zr36067 driver.
#   
#   During separating those bits out of the main zoran driver, we accidently
#   removed the interface through which applications can adapt those markers,
#   replacing them by unchangeable (static) markers.  Some video formats,
#   particularly Quicktime and AVI, require specific container-specific markers in
#   the stream for interlaced streams.  Those markers specify field order and
#   such.
#   
#   The attached patch re-adds this feature so that decoders depending on those
#   container-specific markers for correct playback will work correctly.
#   
#   Signed-off-by: Ronald S. Bultje <rbultje@ronald.bitfreak.net>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/media/video/zr36060.h
#   2005/01/04 18:48:33-08:00 rbultje@ronald.bitfreak.net +6 -0
#   zr36067 driver - correct jpeg app/com markers
# 
# drivers/media/video/zr36060.c
#   2005/01/04 18:48:33-08:00 rbultje@ronald.bitfreak.net +62 -34
#   zr36067 driver - correct jpeg app/com markers
# 
# drivers/media/video/zr36050.h
#   2005/01/04 18:48:33-08:00 rbultje@ronald.bitfreak.net +6 -0
#   zr36067 driver - correct jpeg app/com markers
# 
# drivers/media/video/zr36050.c
#   2005/01/04 18:48:33-08:00 rbultje@ronald.bitfreak.net +62 -32
#   zr36067 driver - correct jpeg app/com markers
# 
# drivers/media/video/zoran_device.c
#   2005/01/04 20:24:03-08:00 rbultje@ronald.bitfreak.net +18 -1
#   zr36067 driver - correct jpeg app/com markers
# 
# drivers/media/video/videocodec.h
#   2005/01/04 18:48:33-08:00 rbultje@ronald.bitfreak.net +11 -0
#   zr36067 driver - correct jpeg app/com markers
# 
# ChangeSet
#   2005/01/04 21:56:34-08:00 adaplas@hotpop.com 
#   [PATCH] fbdev: Reduce stack usage of intelfb
#   
#   Reduce stack usage in intelfb_set_par() from 2404 bytes (on x86-32) to 12
#   bytes.
#   
#   Signed-off-by: Randy Dunlap <rddunlap@osdl.org>
#   Signed-off-by: Antonino Daplas <adaplas@pol.net>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/video/intelfb/intelfbdrv.c
#   2005/01/04 18:48:33-08:00 adaplas@hotpop.com +16 -9
#   fbdev: Reduce stack usage of intelfb
# 
# ChangeSet
#   2005/01/04 21:56:21-08:00 adaplas@hotpop.com 
#   [PATCH] fbdev: Fix default timings in vga16fb
#   
#   From: Martin Wilck
#   
#   ..I am asking because we have encountered a video device that obviously 
#   has problems displaying the standard mode of the vga16fb driver...
#   
#   The default timings give a vtotal of 529 instead of 525 in 640x480@60.
#   
#   Signed-off-by: Antonino Daplas <adaplas@pol.net>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/video/vga16fb.c
#   2005/01/04 18:48:33-08:00 adaplas@hotpop.com +2 -2
#   fbdev: Fix default timings in vga16fb
# 
# ChangeSet
#   2005/01/04 21:56:08-08:00 adaplas@hotpop.com 
#   [PATCH] fbdev: Add Viewsonic PF775a to broken display database
#   
#   Add Viewsonic PF775a to broken display database
#   
#   Signed-off-by: Antonino Daplas <adaplas@pol.net>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/video/fbmon.c
#   2005/01/04 18:48:33-08:00 adaplas@hotpop.com +37 -30
#   fbdev: Add Viewsonic PF775a to broken display database
# 
# ChangeSet
#   2005/01/04 21:55:55-08:00 adaplas@hotpop.com 
#   [PATCH] fbdev: Do a symbol_put for each symbol_get in savagefb
#   
#   Do a symbol_put() for each symbol_get() in savagefb.
#   
#   Signed-off-by: Antonino Daplas <adaplas@pol.net>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/video/savage/savagefb-i2c.c
#   2005/01/04 18:48:33-08:00 adaplas@hotpop.com +9 -1
#   fbdev: Do a symbol_put for each symbol_get in savagefb
# 
# ChangeSet
#   2005/01/04 21:55:42-08:00 adaplas@hotpop.com 
#   [PATCH] fbdev: Check return value of fb_add_videomode
#   
#   The function fb_add_videomode can fail, check return value. 
#   
#   Signed-off-by: Antonino Daplas <adaplas@pol.net>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/video/fbmem.c
#   2005/01/04 18:48:32-08:00 adaplas@hotpop.com +5 -3
#   fbdev: Check return value of fb_add_videomode
# 
# ChangeSet
#   2005/01/04 21:55:29-08:00 adaplas@hotpop.com 
#   [PATCH] fbcon/fbdev: Add blanking notification
#   
#   Add blanking event to the notifier call chain.  This can be used by fbcon
#   to blank/unblank the console, and theoretically, by backlight drivers.
#   
#   Signed-off-by: Antonino Daplas <adaplas@pol.net>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/fb.h
#   2005/01/04 18:48:32-08:00 adaplas@hotpop.com +3 -2
#   fbcon/fbdev: Add blanking notification
# 
# drivers/video/fbmem.c
#   2005/01/04 20:24:04-08:00 adaplas@hotpop.com +18 -8
#   fbcon/fbdev: Add blanking notification
# 
# drivers/video/console/fbcon.h
#   2005/01/04 18:48:32-08:00 adaplas@hotpop.com +1 -0
#   fbcon/fbdev: Add blanking notification
# 
# drivers/video/console/fbcon.c
#   2005/01/04 18:48:32-08:00 adaplas@hotpop.com +47 -42
#   fbcon/fbdev: Add blanking notification
# 
# drivers/char/vt.c
#   2005/01/04 18:48:32-08:00 adaplas@hotpop.com +2 -1
#   fbcon/fbdev: Add blanking notification
# 
# ChangeSet
#   2005/01/04 21:55:16-08:00 adaplas@hotpop.com 
#   [PATCH] fbdev: Revive global_mode_option
#   
#   The global_mode_option is useful for choosing the initial video mode
#   without specifying the driver, ie 'video=1024x768@60'.  After the
#   initialization cleanup, this variable was accidentally removed.  This patch
#   brings it back again.
#   
#   Signed-off-by: Antonino Daplas <adaplas@pol.net>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/video/modedb.c
#   2005/01/04 18:48:32-08:00 adaplas@hotpop.com +1 -3
#   fbdev: Revive global_mode_option
# 
# drivers/video/fbmem.c
#   2005/01/04 20:24:05-08:00 adaplas@hotpop.com +21 -8
#   fbdev: Revive global_mode_option
# 
# ChangeSet
#   2005/01/04 21:55:03-08:00 adaplas@hotpop.com 
#   [PATCH] fbdev: Revive BIOS-less booting for Rage XL cards
#   
#   The file drivers/video/aty/xlinit.c is currently unused.  This file might be
#   useful to boot some types of RageXL cards on non-x86 platforms.
#   
#   Signed-off-by: Antonino Daplas <adaplas@pol.net>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/video/aty/xlinit.c
#   2005/01/04 18:48:32-08:00 adaplas@hotpop.com +1 -14
#   fbdev: Revive BIOS-less booting for Rage XL cards
# 
# drivers/video/aty/atyfb_base.c
#   2005/01/04 18:48:32-08:00 adaplas@hotpop.com +4 -1
#   fbdev: Revive BIOS-less booting for Rage XL cards
# 
# drivers/video/aty/atyfb.h
#   2005/01/04 18:48:32-08:00 adaplas@hotpop.com +19 -5
#   fbdev: Revive BIOS-less booting for Rage XL cards
# 
# drivers/video/aty/Makefile
#   2005/01/04 18:48:32-08:00 adaplas@hotpop.com +2 -0
#   fbdev: Revive BIOS-less booting for Rage XL cards
# 
# ChangeSet
#   2005/01/04 21:54:49-08:00 adaplas@hotpop.com 
#   [PATCH] fbdev: Cleanup i2c code of rivafb
#   
#   - Change timings to as close as possible to VESA specs and
#     use msecs_to_jiffies() instead of hard-coded number
#   - Attempt to read all i2c busses regardless of chipset type
#   
#   Signed-off-by: Antonino Daplas <adaplas@pol.net>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/video/riva/rivafb-i2c.c
#   2005/01/04 18:48:32-08:00 adaplas@hotpop.com +13 -31
#   fbdev: Cleanup i2c code of rivafb
# 
# drivers/video/riva/fbdev.c
#   2005/01/04 18:48:32-08:00 adaplas@hotpop.com +5 -3
#   fbdev: Cleanup i2c code of rivafb
# 
# ChangeSet
#   2005/01/04 21:54:37-08:00 jbarnes@engr.sgi.com 
#   [PATCH] fix ROM enable/disable in r128 and radeon fb drivers
#   
#   Both the r128 and radeon fb drivers do bad things with the PCI BAR
#   corresponding to their option ROM.  They incorrectly use the host address
#   instead of the BAR address to enable the ROM, and then incorrectly lose the
#   original value on unmap.  This patch fixes both problems.  Tested on Altix.
#   
#   Signed-off-by: Jesse Barnes <jbarnes@sgi.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/video/aty/radeon_base.c
#   2005/01/04 18:48:32-08:00 jbarnes@engr.sgi.com +3 -30
#   fix ROM enable/disable in r128 and radeon fb drivers
# 
# drivers/video/aty/aty128fb.c
#   2005/01/04 18:48:32-08:00 jbarnes@engr.sgi.com +5 -37
#   fix ROM enable/disable in r128 and radeon fb drivers
# 
# ChangeSet
#   2005/01/04 21:54:23-08:00 jim.hague@acm.org 
#   [PATCH] pm2fb: fix fbi image display on 24 bit depth big endian
#   
#   Handle 24bit on big-endian by leaving the hardware in RGB and using the
#   colour offset to reverse red/blue.  Leaving the hardware in RGB means that
#   fbi displays images correctly (abeit fortuitously) and the console is
#   correct, thanks to a recent patch to the console code correcting an endian
#   bug in fbcon_putc().
#   
#   Signed-off-by: Jim Hague <jim.hague@acm.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/video/pm2fb.c
#   2005/01/04 18:48:32-08:00 jim.hague@acm.org +11 -5
#   pm2fb: fix fbi image display on 24 bit depth big endian
# 
# ChangeSet
#   2005/01/04 21:54:11-08:00 jim.hague@acm.org 
#   [PATCH] pm2fb: fix big-endian (Sparc) support
#   
#   A collection of changes that taken together makes the driver work correctly on
#   big-endian systems, specifically Sparc.
#   
#   - Remove old PM2FB_BE_APERTURE define and use __BIG_ENDIAN
#     throughout. PM2FB_BE_APERTURE wasn't defined on Sparc; this
#     was incorrect.
#   - Replace colour mode magic numbers with suitable constants,
#     and tidy colour mode handling. Use BGR not RGB at 24bit on
#     big-endian.
#   - Replace aperture magic numbers with constants. Rearrange code to
#     emphasise second aperture is not used. Add short explanations
#     of aperture settings for big endian.
#   - Update comments to note that the driver now works on Sparc.
#   - Revisit 32bit depth colour offsets and ensure transp is set.
#   
#   Signed-off-by: Jim Hague <jim.hague@acm.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/video/permedia2.h
#   2005/01/04 18:48:31-08:00 jim.hague@acm.org +11 -0
#   pm2fb: fix big-endian (Sparc) support
# 
# drivers/video/pm2fb.c
#   2005/01/04 20:24:05-08:00 jim.hague@acm.org +43 -34
#   pm2fb: fix big-endian (Sparc) support
# 
# ChangeSet
#   2005/01/04 21:53:58-08:00 jim.hague@acm.org 
#   [PATCH] pm2fb: use modedb in modules
#   
#   - modedb is now available in modules.
#   
#   Signed-off-by: Jim Hague <jim.hague@acm.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/video/pm2fb.c
#   2005/01/04 20:24:06-08:00 jim.hague@acm.org +1 -4
#   pm2fb: use modedb in modules
# 
# ChangeSet
#   2005/01/04 21:53:45-08:00 jim.hague@acm.org 
#   [PATCH] pm2fb: save/restore memory config
#   
#   - From 2.4 driver: Save memory config registers at init and restore after card
#     reset. Reset card on mode change.
#   
#   Signed-off-by: Jim Hague <jim.hague@acm.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/video/pm2fb.c
#   2005/01/04 20:24:06-08:00 jim.hague@acm.org +43 -17
#   pm2fb: save/restore memory config
# 
# ChangeSet
#   2005/01/04 21:53:32-08:00 jim.hague@acm.org 
#   [PATCH] pm2fb: module parameters and module-conditional code
#   
#   - Update MODULE_PARM to module_param.
#   - Omit some non-module code from module builds and vice-versa.
#   
#   Signed-off-by: Jim Hague <jim.hague@acm.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/video/pm2fb.c
#   2005/01/04 20:24:06-08:00 jim.hague@acm.org +14 -3
#   pm2fb: module parameters and module-conditional code
# 
# ChangeSet
#   2005/01/04 21:53:19-08:00 kraxel@bytesex.org 
#   [PATCH] fbdev: sysfs fix
#   
#   Make sure the fbdev sysfs class is registered before all drivers, otherwise
#   some symlinks are missing.
#   
#   Signed-off-by: Gerd Knorr <kraxel@bytesex.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/video/fbmem.c
#   2005/01/04 20:24:05-08:00 kraxel@bytesex.org +1 -1
#   fbdev: sysfs fix
# 
# ChangeSet
#   2005/01/04 21:53:06-08:00 thomas@winischhofer.net 
#   [PATCH] fbdev: SiS framebuffer driver update 1.7.17
#   
#   attached is an update for sisfb, lifting it up to version 1.7.17.
#   
#   It contains all changes done behind my back by other people (viro,
#   torvalds, adaplas) in the meantime. Furthermore,
#   
#   - all remaining sparse warnings were fixed (mainly caused by the ROM code)
#   
#   - problems with very old and brand new BIOSes from SiS were fixed,
#   
#   - LCD setup was simplified, allowing more display modes than before,
#   
#   - UMC/charter bridge type handling was added,
#   
#   - a code clean-up was performed, the new FB_BLANK-flags were taken over,
#   VBLANK status info was corrected, etc.
#   
#   Signed-off-by: Thomas Winischhofer <thomas@winischhofer.net>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/video/sis/vstruct.h
#   2005/01/04 18:48:31-08:00 thomas@winischhofer.net +8 -11
#   fbdev: SiS framebuffer driver update 1.7.17
# 
# drivers/video/sis/vgatypes.h
#   2005/01/04 18:48:31-08:00 thomas@winischhofer.net +14 -49
#   fbdev: SiS framebuffer driver update 1.7.17
# 
# drivers/video/sis/sis_main.h
#   2005/01/04 18:48:31-08:00 thomas@winischhofer.net +39 -36
#   fbdev: SiS framebuffer driver update 1.7.17
# 
# drivers/video/sis/sis_main.c
#   2005/01/04 18:48:31-08:00 thomas@winischhofer.net +117 -119
#   fbdev: SiS framebuffer driver update 1.7.17
# 
# drivers/video/sis/sis.h
#   2005/01/04 18:48:31-08:00 thomas@winischhofer.net +118 -46
#   fbdev: SiS framebuffer driver update 1.7.17
# 
# drivers/video/sis/osdef.h
#   2005/01/04 18:48:31-08:00 thomas@winischhofer.net +14 -11
#   fbdev: SiS framebuffer driver update 1.7.17
# 
# drivers/video/sis/oem310.h
#   2005/01/04 18:48:31-08:00 thomas@winischhofer.net +1 -1
#   fbdev: SiS framebuffer driver update 1.7.17
# 
# drivers/video/sis/oem300.h
#   2005/01/04 18:48:31-08:00 thomas@winischhofer.net +18 -18
#   fbdev: SiS framebuffer driver update 1.7.17
# 
# drivers/video/sis/initdef.h
#   2005/01/04 18:48:31-08:00 thomas@winischhofer.net +16 -10
#   fbdev: SiS framebuffer driver update 1.7.17
# 
# drivers/video/sis/init301.h
#   2005/01/04 18:48:31-08:00 thomas@winischhofer.net +75 -79
#   fbdev: SiS framebuffer driver update 1.7.17
# 
# drivers/video/sis/init301.c
#   2005/01/04 18:48:31-08:00 thomas@winischhofer.net +812 -518
#   fbdev: SiS framebuffer driver update 1.7.17
# 
# drivers/video/sis/init.h
#   2005/01/04 18:48:31-08:00 thomas@winischhofer.net +275 -258
#   fbdev: SiS framebuffer driver update 1.7.17
# 
# drivers/video/sis/init.c
#   2005/01/04 18:48:31-08:00 thomas@winischhofer.net +345 -298
#   fbdev: SiS framebuffer driver update 1.7.17
# 
# drivers/video/sis/310vtbl.h
#   2005/01/04 18:48:31-08:00 thomas@winischhofer.net +166 -47
#   fbdev: SiS framebuffer driver update 1.7.17
# 
# drivers/video/sis/300vtbl.h
#   2005/01/04 18:48:31-08:00 thomas@winischhofer.net +94 -91
#   fbdev: SiS framebuffer driver update 1.7.17
# 
# ChangeSet
#   2005/01/04 21:52:52-08:00 wli@holomorphy.com 
#   [PATCH] invalidate_inodes speedup
#   
#   With Kirill Korotaev <kk@sw.ru>
#   
#   invalidate_inodes() can take a large amount of time searching the inode
#   lists for inodes which belong to this fs.  Add a separate list for this
#   search.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/fs.h
#   2005/01/04 18:48:30-08:00 wli@holomorphy.com +2 -0
#   invalidate_inodes speedup
# 
# fs/super.c
#   2005/01/04 18:48:30-08:00 wli@holomorphy.com +1 -0
#   invalidate_inodes speedup
# 
# fs/inode.c
#   2005/01/04 18:48:30-08:00 wli@holomorphy.com +18 -29
#   invalidate_inodes speedup
# 
# fs/hugetlbfs/inode.c
#   2005/01/04 18:48:30-08:00 wli@holomorphy.com +2 -0
#   invalidate_inodes speedup
# 
# ChangeSet
#   2005/01/04 21:52:38-08:00 neilb@cse.unsw.edu.au 
#   [PATCH] knfsd: clear the recall_lru of delegations at shutdown
#   
#   Signed-off-by: Andy Adamson <andros@citi.umich.edu>
#   Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/nfsd/nfs4state.c
#   2005/01/04 18:48:30-08:00 neilb@cse.unsw.edu.au +10 -0
#   knfsd: clear the recall_lru of delegations at shutdown
# 
# ChangeSet
#   2005/01/04 21:52:26-08:00 neilb@cse.unsw.edu.au 
#   [PATCH] knfsd: add to the laundromat service for delegations.
#   
#   Walk the recall_lru and reap unused or timed-out delegations.
#   
#   Signed-off-by: Andy Adamson <andros@citi.umich.edu>
#   Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/nfsd/nfs4state.c
#   2005/01/04 20:24:08-08:00 neilb@cse.unsw.edu.au +23 -4
#   knfsd: add to the laundromat service for delegations.
# 
# ChangeSet
#   2005/01/04 21:52:12-08:00 neilb@cse.unsw.edu.au 
#   [PATCH] knfsd: add the DELEGRETURN operation.
#   
#   Signed-off-by: Andy Adamson <andros@citi.umich.edu>
#   Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/nfsd/xdr4.h
#   2005/01/04 18:48:30-08:00 neilb@cse.unsw.edu.au +7 -0
#   knfsd: add the DELEGRETURN operation.
# 
# fs/nfsd/nfs4xdr.c
#   2005/01/04 18:48:30-08:00 neilb@cse.unsw.edu.au +17 -0
#   knfsd: add the DELEGRETURN operation.
# 
# fs/nfsd/nfs4state.c
#   2005/01/04 20:24:08-08:00 neilb@cse.unsw.edu.au +16 -0
#   knfsd: add the DELEGRETURN operation.
# 
# fs/nfsd/nfs4proc.c
#   2005/01/04 18:48:30-08:00 neilb@cse.unsw.edu.au +3 -0
#   knfsd: add the DELEGRETURN operation.
# 
# ChangeSet
#   2005/01/04 21:51:59-08:00 neilb@cse.unsw.edu.au 
#   [PATCH] knfsd: add checking of delegation stateids to nfs4_preprocess_stateid_op.
#   
#   Call release_delegation on delegreturn (DELEG_RET).
#   
#   Signed-off-by: Andy Adamson <andros@citi.umich.edu>
#   Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/nfsd/state.h
#   2005/01/04 18:48:30-08:00 neilb@cse.unsw.edu.au +1 -0
#   knfsd: add checking of delegation stateids to nfs4_preprocess_stateid_op.
# 
# fs/nfsd/nfs4state.c
#   2005/01/04 20:24:08-08:00 neilb@cse.unsw.edu.au +38 -24
#   knfsd: add checking of delegation stateids to nfs4_preprocess_stateid_op.
# 
# ChangeSet
#   2005/01/04 21:51:46-08:00 neilb@cse.unsw.edu.au 
#   [PATCH] knfsd: check for openmode violations given a delegation stateid.
#   
#   Signed-off-by: Andy Adamson <andros@citi.umich.edu>
#   Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/nfsd/nfs4state.c
#   2005/01/04 20:24:08-08:00 neilb@cse.unsw.edu.au +14 -0
#   knfsd: check for openmode violations given a delegation stateid.
# 
# ChangeSet
#   2005/01/04 21:51:33-08:00 neilb@cse.unsw.edu.au 
#   [PATCH] knfsd: remove unnecessary stateowner existence check.
#   
#   At OPEN:
#   Check for delegations in the process of being recalled.
#   Attempt to hand out a delegation.
#   
#   Signed-off-by: Andy Adamson <andros@citi.umich.edu>
#   Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/nfsd/nfs4state.c
#   2005/01/04 20:24:09-08:00 neilb@cse.unsw.edu.au +19 -17
#   knfsd: remove unnecessary stateowner existence check.
# 
# ChangeSet
#   2005/01/04 21:51:20-08:00 neilb@cse.unsw.edu.au 
#   [PATCH] knfsd: attempt to hand out a delegation
#   
#   Signed-off-by: Andy Adamson <andros@citi.umich.edu>
#   Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/nfsd/nfs4state.c
#   2005/01/04 20:24:09-08:00 neilb@cse.unsw.edu.au +59 -0
#   knfsd: attempt to hand out a delegation
# 
# ChangeSet
#   2005/01/04 21:51:07-08:00 neilb@cse.unsw.edu.au 
#   [PATCH] knfsd: helper functions for deciding to grant a delegation.
#   
#   Signed-off-by: Andy Adamson <andros@citi.umich.edu>
#   Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/nfsd/nfs4state.c
#   2005/01/04 20:24:09-08:00 neilb@cse.unsw.edu.au +37 -0
#   knfsd: helper functions for deciding to grant a delegation.
# 
# ChangeSet
#   2005/01/04 21:50:54-08:00 neilb@cse.unsw.edu.au 
#   [PATCH] knfsd: kernel thread for delegation callback
#   
#   Any task can call break_lease or time_out_leases
#   on a v4 delegated file which results in a recall callback rpc sent to the
#   NFSv4 client holding the delegation, and/or the FL_LEASE to be removed.
#   Spawn a kernel thread to perform the callback.
#   
#   Signed-off-by: Andy Adamson <andros@citi.umich.edu>
#   Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/nfsd/nfs4state.c
#   2005/01/04 20:24:09-08:00 neilb@cse.unsw.edu.au +96 -0
#   knfsd: kernel thread for delegation callback
# 
# ChangeSet
#   2005/01/04 21:50:42-08:00 neilb@cse.unsw.edu.au 
#   [PATCH] knfsd: delegation recall callback rpc.
#   
#   Signed-off-by: Andy Adamson <andros@citi.umich.edu>
#   Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/nfsd/state.h
#   2005/01/04 20:24:08-08:00 neilb@cse.unsw.edu.au +1 -0
#   knfsd: delegation recall callback rpc.
# 
# fs/nfsd/nfs4callback.c
#   2005/01/04 18:48:29-08:00 neilb@cse.unsw.edu.au +315 -1
#   knfsd: delegation recall callback rpc.
# 
# ChangeSet
#   2005/01/04 21:50:29-08:00 neilb@cse.unsw.edu.au 
#   [PATCH] knfsd: delay nfsd_colse for delegations until reaping
#   
#   Because nfsd_close() can call locks_remove_flock() which removes leases,
#   delay nfsd_close() for delegations until the delegation is reaped.
#   
#   Don't release an nfs4_file struct with delegations.
#   
#   Signed-off-by: Andy Adamson <andros@citi.umich.edu>
#   Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/nfsd/nfs4state.c
#   2005/01/04 20:24:09-08:00 neilb@cse.unsw.edu.au +18 -3
#   knfsd: delay nfsd_colse for delegations until reaping
# 
# ChangeSet
#   2005/01/04 21:50:16-08:00 neilb@cse.unsw.edu.au 
#   [PATCH] knfsd: changes to expire_client
#   
#   ... to shutdown the rpc callback client and remove all
#   client associated delegations
#   
#   Signed-off-by: Andy Adamson <andros@citi.umich.edu>
#   Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/nfsd/nfs4state.c
#   2005/01/04 20:24:09-08:00 neilb@cse.unsw.edu.au +22 -1
#   knfsd: changes to expire_client
# 
# ChangeSet
#   2005/01/04 21:50:03-08:00 neilb@cse.unsw.edu.au 
#   [PATCH] knfsd: add the delegation release and free functions
#   
#   Signed-off-by: Andy Adamson <andros@citi.umich.edu>
#   Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/nfsd/nfs4state.c
#   2005/01/04 20:24:10-08:00 neilb@cse.unsw.edu.au +63 -0
#   knfsd: add the delegation release and free functions
# 
# ChangeSet
#   2005/01/04 21:49:50-08:00 neilb@cse.unsw.edu.au 
#   [PATCH] knfsd: find a delegation for a file given a stateid.
#   
#   Signed-off-by: Andy Adamson <andros@citi.umich.edu>
#   Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/nfsd/nfs4state.c
#   2005/01/04 20:24:10-08:00 neilb@cse.unsw.edu.au +27 -0
#   knfsd: find a delegation for a file given a stateid.
# 
# ChangeSet
#   2005/01/04 21:49:38-08:00 neilb@cse.unsw.edu.au 
#   [PATCH] knfsd: allocate and initialize the delegation structure.
#   
#   Declare and initialize the recall_lru list.
#   
#   Signed-off-by: Andy Adamson <andros@citi.umich.edu>
#   Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/nfsd/nfs4state.c
#   2005/01/04 20:24:10-08:00 neilb@cse.unsw.edu.au +56 -2
#   knfsd: allocate and initialize the delegation structure.
# 
# ChangeSet
#   2005/01/04 21:49:25-08:00 neilb@cse.unsw.edu.au 
#   [PATCH] knfsd: add structures for delegation support
#   
#   Signed-off-by: Andy Adamson <andros@citi.umich.edu>
#   Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/nfsd/state.h
#   2005/01/04 20:24:09-08:00 neilb@cse.unsw.edu.au +37 -0
#   knfsd: add structures for delegation support
# 
# ChangeSet
#   2005/01/04 21:49:12-08:00 neilb@cse.unsw.edu.au 
#   [PATCH] knfsd: get rid of the special delegation_stateid_t, use the existing stateid_t.
#   
#   Signed-off-by: Andy Adamson <andros@citi.umich.edu>
#   Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/nfsd/xdr4.h
#   2005/01/04 20:24:08-08:00 neilb@cse.unsw.edu.au +3 -13
#   knfsd: get rid of the special delegation_stateid_t, use the existing stateid_t.
# 
# fs/nfsd/nfs4xdr.c
#   2005/01/04 20:24:08-08:00 neilb@cse.unsw.edu.au +6 -6
#   knfsd: get rid of the special delegation_stateid_t, use the existing stateid_t.
# 
# ChangeSet
#   2005/01/04 21:48:59-08:00 neilb@cse.unsw.edu.au 
#   [PATCH] knfsd: check for existence of file_lock parameter inside of the kernel lock.
#   
#   Signed-off-by: Andy Adamson <andros@citi.umich.edu>
#   Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/locks.c
#   2005/01/04 18:48:28-08:00 neilb@cse.unsw.edu.au +3 -5
#   knfsd: check for existence of file_lock parameter inside of the kernel lock.
# 
# ChangeSet
#   2005/01/04 21:48:47-08:00 neilb@cse.unsw.edu.au 
#   [PATCH] knfsd: probe the callback path upon a successful setclientid_confirm
#   
#   Signed-off-by: Andy Adamson <andros@citi.umich.edu>
#   Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/nfsd/nfs4state.c
#   2005/01/04 20:24:10-08:00 neilb@cse.unsw.edu.au +5 -1
#   knfsd: probe the callback path upon a successful setclientid_confirm
# 
# ChangeSet
#   2005/01/04 21:48:34-08:00 neilb@cse.unsw.edu.au 
#   [PATCH] knfsd: preparation for delegation: client callback probe
#   
#   client callback rpc to probe the callback
#   channel on setclientid with a null request.
#   
#   Signed-off-by: Andy Adamson <andros@citi.umich.edu>
#   Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/nfsd/state.h
#   2005/01/04 20:24:10-08:00 neilb@cse.unsw.edu.au +1 -0
#   knfsd: preparation for delegation: client callback probe
# 
# fs/nfsd/nfs4callback.c
#   2005/01/04 20:24:09-08:00 neilb@cse.unsw.edu.au +269 -0
#   knfsd: preparation for delegation: client callback probe
# 
# fs/nfsd/Makefile
#   2005/01/04 18:48:27-08:00 neilb@cse.unsw.edu.au +1 -1
#   knfsd: preparation for delegation: client callback probe
# 
# fs/nfsd/nfs4callback.c
#   2005/01/04 20:24:09-08:00 neilb@cse.unsw.edu.au +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/fs/nfsd/nfs4callback.c
# 
# ChangeSet
#   2005/01/04 21:48:20-08:00 neilb@cse.unsw.edu.au 
#   [PATCH] knfsd: count the nfs4_client structure usage
#   
#   ... to protect the null (probe) callback asynchronous rpc's reference.
#   
#   Atomically inc and set the cb_set flag.
#   
#   Signed-off-by: Andy Adamson <andros@citi.umich.edu>
#   Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/nfsd/state.h
#   2005/01/04 20:24:11-08:00 neilb@cse.unsw.edu.au +3 -1
#   knfsd: count the nfs4_client structure usage
# 
# fs/nfsd/nfs4state.c
#   2005/01/04 20:24:11-08:00 neilb@cse.unsw.edu.au +12 -2
#   knfsd: count the nfs4_client structure usage
# 
# ChangeSet
#   2005/01/04 21:48:08-08:00 neilb@cse.unsw.edu.au 
#   [PATCH] knfsd: check the callback netid in gen_callback.
#   
#   since we only support tcp, don't save the netinfo.
#   
#   Signed-off-by: Andy Adamson <andros@citi.umich.edu>
#   Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/nfsd/state.h
#   2005/01/04 20:24:11-08:00 neilb@cse.unsw.edu.au +0 -1
#   knfsd: check the callback netid in gen_callback.
# 
# fs/nfsd/nfs4state.c
#   2005/01/04 20:24:11-08:00 neilb@cse.unsw.edu.au +14 -7
#   knfsd: check the callback netid in gen_callback.
# 
# ChangeSet
#   2005/01/04 21:47:55-08:00 neilb@cse.unsw.edu.au 
#   [PATCH] knfsd: move nfserr_openmode checking from nfsd_read/write into nfs4_preprocess_stateid_op() in preparation for delegation state.
#   
#   Signed-off-by: Andy Adamson <andros@citi.umich.edu>
#   Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/nfsd/state.h
#   2005/01/04 20:24:11-08:00 neilb@cse.unsw.edu.au +4 -3
#   knfsd: move nfserr_openmode checking from nfsd_read/write into nfs4_preprocess_stateid_op() in preparation for delegation state.
# 
# fs/nfsd/nfs4state.c
#   2005/01/04 20:24:11-08:00 neilb@cse.unsw.edu.au +35 -7
#   knfsd: move nfserr_openmode checking from nfsd_read/write into nfs4_preprocess_stateid_op() in preparation for delegation state.
# 
# fs/nfsd/nfs4proc.c
#   2005/01/04 20:24:08-08:00 neilb@cse.unsw.edu.au +4 -36
#   knfsd: move nfserr_openmode checking from nfsd_read/write into nfs4_preprocess_stateid_op() in preparation for delegation state.
# 
# ChangeSet
#   2005/01/04 21:47:42-08:00 neilb@cse.unsw.edu.au 
#   [PATCH] knfsd: nfsd4: encode_dirent: trivial cleanup
#   
#   Trim a couple redundant comments, minor whitespace cleanup.
#   
#   Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
#   Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/nfsd/nfs4xdr.c
#   2005/01/04 20:24:10-08:00 neilb@cse.unsw.edu.au +3 -12
#   knfsd: nfsd4: encode_dirent: trivial cleanup
# 
# ChangeSet
#   2005/01/04 21:47:29-08:00 neilb@cse.unsw.edu.au 
#   [PATCH] knfsd: nfsd4: encode_dirent: fix dropit return
#   
#   We need to handle nfserr_dropit as a special case here, since we don't
#   want to return it in the rdattr_error attribute.
#   
#   Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
#   Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/nfsd/nfs4xdr.c
#   2005/01/04 20:24:12-08:00 neilb@cse.unsw.edu.au +2 -0
#   knfsd: nfsd4: encode_dirent: fix dropit return
# 
# ChangeSet
#   2005/01/04 21:47:16-08:00 neilb@cse.unsw.edu.au 
#   [PATCH] knfsd: nfsd4: encode_dirent: simplify control flow
#   
#   Replace series of if's by a switch, remove (now unnecessary) label "out".
#   
#   Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
#   Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/nfsd/nfs4xdr.c
#   2005/01/04 20:24:12-08:00 neilb@cse.unsw.edu.au +20 -21
#   knfsd: nfsd4: encode_dirent: simplify control flow
# 
# ChangeSet
#   2005/01/04 21:47:03-08:00 neilb@cse.unsw.edu.au 
#   [PATCH] knfsd: nfsd4: encode_dirent: simplify error handling
#   
#   Minor simplification of error handling in encode_dirent.
#   
#   Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
#   Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/nfsd/nfs4xdr.c
#   2005/01/04 20:24:12-08:00 neilb@cse.unsw.edu.au +12 -11
#   knfsd: nfsd4: encode_dirent: simplify error handling
# 
# ChangeSet
#   2005/01/04 21:46:50-08:00 neilb@cse.unsw.edu.au 
#   [PATCH] knfsd: nfsd4: encode_dirent: move rdattr_error code to new function
#   
#   Move code to encode the special rdattr_error attribute to
#   nfsd4_encode_rdattr_error().
#   
#   Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
#   Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/nfsd/nfs4xdr.c
#   2005/01/04 20:24:12-08:00 neilb@cse.unsw.edu.au +20 -11
#   knfsd: nfsd4: encode_dirent: move rdattr_error code to new function
# 
# ChangeSet
#   2005/01/04 21:46:37-08:00 neilb@cse.unsw.edu.au 
#   [PATCH] knfsd: nfsd4: encode_dirent: simplify nfs4_encode_dirent_fattr
#   
#   Make nfsd4_encode_dirent_fattr() slightly more concise.
#   
#   Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
#   Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/nfsd/nfs4xdr.c
#   2005/01/04 20:24:12-08:00 neilb@cse.unsw.edu.au +4 -7
#   knfsd: nfsd4: encode_dirent: simplify nfs4_encode_dirent_fattr
# 
# ChangeSet
#   2005/01/04 21:46:24-08:00 neilb@cse.unsw.edu.au 
#   [PATCH] knfsd: nfsd4: encode_dirent: more readdir attribute encoding to new function
#   
#   Move readdir attribute encoding to nfsd4_encode_dirent_fattr(), remove
#   the (no-longer used) error label.
#   
#   Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
#   Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/nfsd/nfs4xdr.c
#   2005/01/04 20:24:12-08:00 neilb@cse.unsw.edu.au +41 -32
#   knfsd: nfsd4: encode_dirent: more readdir attribute encoding to new function
# 
# ChangeSet
#   2005/01/04 21:46:12-08:00 neilb@cse.unsw.edu.au 
#   [PATCH] knfsd: nfsd4: encode_dirent: superfluous local variables
#   
#   The local variables bmval0 and bmval1 turn out not to really help much.
#   
#   Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
#   Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/nfsd/nfs4xdr.c
#   2005/01/04 20:24:12-08:00 neilb@cse.unsw.edu.au +3 -10
#   knfsd: nfsd4: encode_dirent: superfluous local variables
# 
# ChangeSet
#   2005/01/04 21:45:59-08:00 neilb@cse.unsw.edu.au 
#   [PATCH] knfsd: nfsd4: encode_dirent: superfluous assignment
#   
#   Remove unused assignment
#   
#   Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
#   Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/nfsd/nfs4xdr.c
#   2005/01/04 20:24:13-08:00 neilb@cse.unsw.edu.au +1 -2
#   knfsd: nfsd4: encode_dirent: superfluous assignment
# 
# ChangeSet
#   2005/01/04 21:45:46-08:00 neilb@cse.unsw.edu.au 
#   [PATCH] knfsd: nfsd4 encode_dirent cleanup
#   
#   No sensible client is ever going to request only the RDATTR_ERROR attribute, so
#   there's no point optimizing for that case.
#   
#   Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
#   Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/nfsd/nfs4xdr.c
#   2005/01/04 20:24:13-08:00 neilb@cse.unsw.edu.au +47 -59
#   knfsd: nfsd4 encode_dirent cleanup
# 
# ChangeSet
#   2005/01/04 21:45:32-08:00 neilb@cse.unsw.edu.au 
#   [PATCH] knfsd: nfsd4: use the fsid export option when returning the fsid attribute
#   
#   Return the special NFSv4 pseudo filesystem fsid (0/0) in a GETATTR on an
#   NFSv4 pseudo filesystem node.
#   
#   Signed-off-by: Andy Adamson <andros@citi.umich.edu>
#   Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
#   Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/nfsd/nfs4xdr.c
#   2005/01/04 20:24:13-08:00 neilb@cse.unsw.edu.au +10 -5
#   knfsd: nfsd4: use the fsid export option when returning the fsid attribute
# 
# ChangeSet
#   2005/01/04 21:45:20-08:00 neilb@cse.unsw.edu.au 
#   [PATCH] knfsd: nfsd4: fix fileid in readdir responses
#   
#   We were reporting mounted_on fileid instead of fileid in readdir responses.
#   
#   Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
#   Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/nfsd/nfs4xdr.c
#   2005/01/04 20:24:13-08:00 neilb@cse.unsw.edu.au +1 -3
#   knfsd: nfsd4: fix fileid in readdir responses
# 
# ChangeSet
#   2005/01/04 21:45:08-08:00 neilb@cse.unsw.edu.au 
#   [PATCH] knfsd: rpcsec_gss: comparing pointer to 0 instead of NULL
#   
#   Just noticed while fixing some other sparse-related stuff.
#   
#   Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
#   Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# net/sunrpc/auth_gss/svcauth_gss.c
#   2005/01/04 18:48:25-08:00 neilb@cse.unsw.edu.au +1 -1
#   knfsd: rpcsec_gss: comparing pointer to 0 instead of NULL
# 
# ChangeSet
#   2005/01/04 21:44:55-08:00 neilb@cse.unsw.edu.au 
#   [PATCH] knfsd: nfsd4: fix open_downgrade decode error.
#   
#   Fix open downgrade decode error.
#   
#   Signed-off-by: Andy Adamson <andros@umich.edu>
#   Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
#   Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/nfsd/nfs4xdr.c
#   2005/01/04 20:24:13-08:00 neilb@cse.unsw.edu.au +1 -1
#   knfsd: nfsd4: fix open_downgrade decode error.
# 
# ChangeSet
#   2005/01/04 21:44:42-08:00 neilb@cse.unsw.edu.au 
#   [PATCH] knfsd: svcrpc: share code duplicated between auth_unix and auth_null
#   
#   Call a helper function from svcauth_unix_accept() and svcauth_null_accept()
#   instead of duplicating code.
#   
#   Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
#   Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# net/sunrpc/svcauth_unix.c
#   2005/01/04 18:48:25-08:00 neilb@cse.unsw.edu.au +36 -52
#   knfsd: svcrpc: share code duplicated between auth_unix and auth_null
# 
# ChangeSet
#   2005/01/04 21:44:30-08:00 neilb@cse.unsw.edu.au 
#   [PATCH] knfsd: svcrpc: auth_null fixes
#   
#   Fix some discrepencies between the server-side auth_null and auth_unix rpc
#   code: in particular, make sure we return an auth error in the auth_null case
#   instead of dropping when we fail to match an export entry, and make sure such
#   responses are encoded correctly.
#   
#   Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
#   Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# net/sunrpc/svcauth_unix.c
#   2005/01/04 20:24:14-08:00 neilb@cse.unsw.edu.au +18 -12
#   knfsd: svcrpc: auth_null fixes
# 
# ChangeSet
#   2005/01/04 21:44:16-08:00 neilb@cse.unsw.edu.au 
#   [PATCH] knfsd: nfsd_translate_wouldblocks
#   
#   -EAGAIN has a special treatment in the nfsd code since it's used to indicate
#   that an upcall has been initiated and that a request should be dropped pending
#   the upcall result.
#   
#   But when the break_lease functions return -EWOULDBLOCK (==-EAGAIN on most
#   architectures), we actually prefer to return nfserr_jukebox.  So translate
#   -EAGAIN returns to -ETIMEDOUT (which will be translated to nfserr_jukebox).
#   
#   Undo the mapping of -EWOULDBLOCK to nfserr_jukebox, since on most
#   architectures that has the undesireable effect of mapping -EAGAIN to
#   nfserr_jukebox.
#   
#   Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
#   Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/nfsd/vfs.c
#   2005/01/04 18:48:24-08:00 neilb@cse.unsw.edu.au +4 -0
#   knfsd: nfsd_translate_wouldblocks
# 
# fs/nfsd/nfsproc.c
#   2005/01/04 18:48:24-08:00 neilb@cse.unsw.edu.au +0 -1
#   knfsd: nfsd_translate_wouldblocks
# 
# ChangeSet
#   2005/01/04 21:44:04-08:00 penberg@cs.helsinki.fi 
#   [PATCH] oprofile: minor cleanups
#   
#   This patch has the following cleanups to oprofile:
#   
#     - Remove spurious casts
#     - vfree() accepts NULL pointers so remove redundant test
#     - The parameter for __free_cpu_buffer() is not used so merge the function
#       with free_cpu_buffer()
#   
#   Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/oprofile/cpu_buffer.c
#   2005/01/04 18:48:24-08:00 penberg@cs.helsinki.fi +4 -11
#   oprofile: minor cleanups
# 
# drivers/oprofile/buffer_sync.c
#   2005/01/04 18:48:24-08:00 penberg@cs.helsinki.fi +1 -1
#   oprofile: minor cleanups
# 
# ChangeSet
#   2005/01/04 21:43:51-08:00 gnb@melbourne.sgi.com 
#   [PATCH] oprofile: update sparc64 for api changes
#   
#   oprofile sparc64 arch updates, including some internal API changes.
#   
#   Signed-off-by: John Levon <levon@movementarian.org>
#   Signed-off-by: Greg Banks <gnb@melbourne.sgi.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/sparc64/oprofile/init.c
#   2005/01/04 18:48:24-08:00 gnb@melbourne.sgi.com +1 -4
#   oprofile: update sparc64 for api changes
# 
# ChangeSet
#   2005/01/04 21:43:39-08:00 gnb@melbourne.sgi.com 
#   [PATCH] oprofile: update sh for api changes
#   
#   oprofile sh arch updates, including some internal API changes.
#   
#   Signed-off-by: John Levon <levon@movementarian.org>
#   Signed-off-by: Greg Banks <gnb@melbourne.sgi.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/sh/oprofile/op_model_null.c
#   2005/01/04 18:48:24-08:00 gnb@melbourne.sgi.com +1 -2
#   oprofile: update sh for api changes
# 
# ChangeSet
#   2005/01/04 21:43:26-08:00 gnb@melbourne.sgi.com 
#   [PATCH] oprofile: update s390 for api changes
#   
#   oprofile s390 arch updates, including some internal API changes.
#   
#   Signed-off-by: John Levon <levon@movementarian.org>
#   Signed-off-by: Greg Banks <gnb@melbourne.sgi.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/s390/oprofile/init.c
#   2005/01/04 18:48:24-08:00 gnb@melbourne.sgi.com +1 -6
#   oprofile: update s390 for api changes
# 
# ChangeSet
#   2005/01/04 21:43:13-08:00 gnb@melbourne.sgi.com 
#   [PATCH] oprofile: update parisc for api changes
#   
#   oprofile parisc arch updates, including some internal API changes.
#   
#   Signed-off-by: John Levon <levon@movementarian.org>
#   Signed-off-by: Greg Banks <gnb@melbourne.sgi.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/parisc/oprofile/init.c
#   2005/01/04 18:48:24-08:00 gnb@melbourne.sgi.com +1 -4
#   oprofile: update parisc for api changes
# 
# ChangeSet
#   2005/01/04 21:43:03-08:00 gnb@melbourne.sgi.com 
#   [PATCH] oprofile: update ppc for api changes
#   
#   oprofile ppc64 arch updates, including some internal API changes.
#   
#   Signed-off-by: John Levon <levon@movementarian.org>
#   Signed-off-by: Greg Banks <gnb@melbourne.sgi.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/ppc64/oprofile/op_model_rs64.c
#   2005/01/04 18:48:24-08:00 gnb@melbourne.sgi.com +1 -2
#   oprofile: update ppc for api changes
# 
# arch/ppc64/oprofile/op_model_power4.c
#   2005/01/04 18:48:24-08:00 gnb@melbourne.sgi.com +1 -2
#   oprofile: update ppc for api changes
# 
# arch/ppc64/oprofile/common.c
#   2005/01/04 18:48:24-08:00 gnb@melbourne.sgi.com +13 -20
#   oprofile: update ppc for api changes
# 
# ChangeSet
#   2005/01/04 21:42:50-08:00 gnb@melbourne.sgi.com 
#   [PATCH] oprofile: update arm for api changes
#   
#   oprofile arm arch updates, including some internal API changes.
#   
#   Signed-off-by: John Levon <levon@movementarian.org>
#   Signed-off-by: Greg Banks <gnb@melbourne.sgi.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/arm/oprofile/op_model_xscale.c
#   2005/01/04 18:48:24-08:00 gnb@melbourne.sgi.com +2 -3
#   oprofile: update arm for api changes
# 
# arch/arm/oprofile/init.c
#   2005/01/04 18:48:24-08:00 gnb@melbourne.sgi.com +2 -5
#   oprofile: update arm for api changes
# 
# arch/arm/oprofile/common.c
#   2005/01/04 18:48:24-08:00 gnb@melbourne.sgi.com +8 -13
#   oprofile: update arm for api changes
# 
# ChangeSet
#   2005/01/04 21:42:37-08:00 gnb@melbourne.sgi.com 
#   [PATCH] oprofile: update alpha for api changes
#   
#   oprofile alpha arch updates, including some internal API changes.
#   
#   Signed-off-by: John Levon <levon@movementarian.org>
#   Signed-off-by: Greg Banks <gnb@melbourne.sgi.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/alpha/oprofile/op_model_ev67.c
#   2005/01/04 18:48:23-08:00 gnb@melbourne.sgi.com +3 -5
#   oprofile: update alpha for api changes
# 
# arch/alpha/oprofile/op_model_ev6.c
#   2005/01/04 18:48:23-08:00 gnb@melbourne.sgi.com +1 -2
#   oprofile: update alpha for api changes
# 
# arch/alpha/oprofile/op_model_ev5.c
#   2005/01/04 18:48:23-08:00 gnb@melbourne.sgi.com +1 -2
#   oprofile: update alpha for api changes
# 
# arch/alpha/oprofile/op_model_ev4.c
#   2005/01/04 18:48:23-08:00 gnb@melbourne.sgi.com +1 -2
#   oprofile: update alpha for api changes
# 
# arch/alpha/oprofile/common.c
#   2005/01/04 18:48:23-08:00 gnb@melbourne.sgi.com +9 -16
#   oprofile: update alpha for api changes
# 
# ChangeSet
#   2005/01/04 21:42:25-08:00 gnb@melbourne.sgi.com 
#   [PATCH] oprofile: ia64 support for oprofile stack trace sampling
#   
#   oprofile ia64 arch updates, including some internal API changes and support
#   for stack trace sampling.
#   
#   Signed-off-by: John Levon <levon@movementarian.org>
#   Signed-off-by: Keith Owens <kaos@melbourne.sgi.com>
#   Signed-off-by: Greg Banks <gnb@melbourne.sgi.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/ia64/oprofile/backtrace.c
#   2005/01/04 18:48:23-08:00 gnb@melbourne.sgi.com +150 -0
#   oprofile: ia64 support for oprofile stack trace sampling
# 
# arch/ia64/oprofile/perfmon.c
#   2005/01/04 18:48:23-08:00 gnb@melbourne.sgi.com +5 -10
#   oprofile: ia64 support for oprofile stack trace sampling
# 
# arch/ia64/oprofile/init.c
#   2005/01/04 18:48:23-08:00 gnb@melbourne.sgi.com +6 -4
#   oprofile: ia64 support for oprofile stack trace sampling
# 
# arch/ia64/oprofile/backtrace.c
#   2005/01/04 18:48:23-08:00 gnb@melbourne.sgi.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/ia64/oprofile/backtrace.c
# 
# arch/ia64/oprofile/Makefile
#   2005/01/04 18:48:23-08:00 gnb@melbourne.sgi.com +1 -1
#   oprofile: ia64 support for oprofile stack trace sampling
# 
# arch/ia64/kernel/unwind.c
#   2005/01/04 18:48:23-08:00 gnb@melbourne.sgi.com +2 -0
#   oprofile: ia64 support for oprofile stack trace sampling
# 
# arch/ia64/kernel/ia64_ksyms.c
#   2005/01/04 18:48:23-08:00 gnb@melbourne.sgi.com +3 -0
#   oprofile: ia64 support for oprofile stack trace sampling
# 
# ChangeSet
#   2005/01/04 21:42:11-08:00 gnb@melbourne.sgi.com 
#   [PATCH] oprofile: i386 support for stack trace sampling
#   
#   oprofile i386 arch updates, including some internal API changes and support
#   for stack trace sampling.
#   
#   (akpm: I added a nasty hack to fix the x86_64 build.  However the feature is
#   untested on x86_64 and probably doesn't work yet).
#   
#   Signed-off-by: John Levon <levon@movementarian.org>
#   Signed-off-by: Greg Banks <gnb@melbourne.sgi.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/x86_64/oprofile/Makefile
#   2005/01/04 18:48:23-08:00 gnb@melbourne.sgi.com +1 -1
#   oprofile: i386 support for stack trace sampling
# 
# arch/i386/oprofile/op_x86_model.h
#   2005/01/04 18:48:23-08:00 gnb@melbourne.sgi.com +2 -3
#   oprofile: i386 support for stack trace sampling
# 
# arch/i386/oprofile/op_model_ppro.c
#   2005/01/04 18:48:23-08:00 gnb@melbourne.sgi.com +3 -6
#   oprofile: i386 support for stack trace sampling
# 
# arch/i386/oprofile/op_model_p4.c
#   2005/01/04 18:48:23-08:00 gnb@melbourne.sgi.com +3 -6
#   oprofile: i386 support for stack trace sampling
# 
# arch/i386/oprofile/op_model_athlon.c
#   2005/01/04 18:48:23-08:00 gnb@melbourne.sgi.com +3 -6
#   oprofile: i386 support for stack trace sampling
# 
# arch/i386/oprofile/nmi_timer_int.c
#   2005/01/04 18:48:23-08:00 gnb@melbourne.sgi.com +5 -11
#   oprofile: i386 support for stack trace sampling
# 
# arch/i386/oprofile/nmi_int.c
#   2005/01/04 18:48:23-08:00 gnb@melbourne.sgi.com +23 -26
#   oprofile: i386 support for stack trace sampling
# 
# arch/i386/oprofile/init.c
#   2005/01/04 18:48:23-08:00 gnb@melbourne.sgi.com +10 -6
#   oprofile: i386 support for stack trace sampling
# 
# arch/i386/oprofile/backtrace.c
#   2005/01/04 18:48:23-08:00 gnb@melbourne.sgi.com +124 -0
#   oprofile: i386 support for stack trace sampling
# 
# arch/i386/oprofile/Makefile
#   2005/01/04 18:48:23-08:00 gnb@melbourne.sgi.com +1 -1
#   oprofile: i386 support for stack trace sampling
# 
# arch/i386/oprofile/backtrace.c
#   2005/01/04 18:48:23-08:00 gnb@melbourne.sgi.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/i386/oprofile/backtrace.c
# 
# ChangeSet
#   2005/01/04 21:41:57-08:00 gnb@sgi.com 
#   [PATCH] oprofile: backtrace operation does not initialized
#   
#   Allow stack tracing to work when sampling on timer is forced using the
#   timer=1 boot option.  Reported by Akinobu Mita.
#   
#   Signed-off-by: Greg Banks <gnb@melbourne.sgi.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/oprofile/timer_int.c
#   2005/01/04 18:48:23-08:00 gnb@sgi.com +3 -0
#   oprofile: backtrace operation does not initialized
# 
# drivers/oprofile/oprof.c
#   2005/01/04 18:48:23-08:00 gnb@sgi.com +2 -4
#   oprofile: backtrace operation does not initialized
# 
# ChangeSet
#   2005/01/04 21:41:45-08:00 gnb@melbourne.sgi.com 
#   [PATCH] oprofile: arch-independent code for stack trace sampling
#   
#   oprofile arch-independent updates, including some internal API changes and
#   support for stack trace sampling.
#   
#   Signed-off-by: John Levon <levon@movementarian.org>
#   Signed-off-by: Greg Banks <gnb@melbourne.sgi.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/oprofile.h
#   2005/01/04 18:48:23-08:00 gnb@melbourne.sgi.com +15 -5
#   oprofile: arch-independent code for stack trace sampling
# 
# drivers/oprofile/timer_int.c
#   2005/01/04 20:24:16-08:00 gnb@melbourne.sgi.com +8 -15
#   oprofile: arch-independent code for stack trace sampling
# 
# drivers/oprofile/oprofile_stats.h
#   2005/01/04 18:48:23-08:00 gnb@melbourne.sgi.com +1 -0
#   oprofile: arch-independent code for stack trace sampling
# 
# drivers/oprofile/oprofile_stats.c
#   2005/01/04 18:48:23-08:00 gnb@melbourne.sgi.com +4 -0
#   oprofile: arch-independent code for stack trace sampling
# 
# drivers/oprofile/oprofile_files.c
#   2005/01/04 18:48:23-08:00 gnb@melbourne.sgi.com +37 -5
#   oprofile: arch-independent code for stack trace sampling
# 
# drivers/oprofile/oprof.h
#   2005/01/04 18:48:23-08:00 gnb@melbourne.sgi.com +5 -1
#   oprofile: arch-independent code for stack trace sampling
# 
# drivers/oprofile/oprof.c
#   2005/01/04 20:24:16-08:00 gnb@melbourne.sgi.com +41 -30
#   oprofile: arch-independent code for stack trace sampling
# 
# drivers/oprofile/event_buffer.h
#   2005/01/04 18:48:23-08:00 gnb@melbourne.sgi.com +2 -0
#   oprofile: arch-independent code for stack trace sampling
# 
# drivers/oprofile/cpu_buffer.h
#   2005/01/04 18:48:23-08:00 gnb@melbourne.sgi.com +6 -0
#   oprofile: arch-independent code for stack trace sampling
# 
# drivers/oprofile/cpu_buffer.c
#   2005/01/04 20:24:14-08:00 gnb@melbourne.sgi.com +115 -26
#   oprofile: arch-independent code for stack trace sampling
# 
# drivers/oprofile/buffer_sync.c
#   2005/01/04 20:24:14-08:00 gnb@melbourne.sgi.com +46 -11
#   oprofile: arch-independent code for stack trace sampling
# 
# ChangeSet
#   2005/01/04 21:41:31-08:00 gnb@melbourne.sgi.com 
#   [PATCH] oprofile: add check_user_page_readable()
#   
#   Add check_user_page_readable() for kernel modules which need to follow user
#   space addresses but can't use get_user().
#   
#   Signed-off-by: John Levon <levon@movementarian.org>
#   Signed-off-by: Greg Banks <gnb@melbourne.sgi.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# mm/memory.c
#   2005/01/04 18:48:23-08:00 gnb@melbourne.sgi.com +18 -2
#   oprofile: add check_user_page_readable()
# 
# include/linux/mm.h
#   2005/01/04 18:48:23-08:00 gnb@melbourne.sgi.com +1 -0
#   oprofile: add check_user_page_readable()
# 
# ChangeSet
#   2005/01/04 21:41:17-08:00 sds@epoch.ncsc.mil 
#   [PATCH] SELinux: eliminate unaligned accesses by policy loading code
#   
#   This patch rewrites the SELinux next_entry() function and all callers to
#   copy entry data from the binary policy into properly aligned buffers,
#   eliminating unaligned accesses.  This patch is in response to a bug report
#   from Prarit Bhargava for SELinux and ia64, and he has confirmed that this
#   patch eliminates the unaligned access warnings.
#   
#   Signed-off-by:  Stephen Smalley <sds@epoch.ncsc.mil>
#   Signed-off-by:  James Morris <jmorris@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# security/selinux/ss/policydb.h
#   2005/01/04 18:48:22-08:00 sds@epoch.ncsc.mil +4 -6
#   SELinux: eliminate unaligned accesses by policy loading code
# 
# security/selinux/ss/policydb.c
#   2005/01/04 18:48:22-08:00 sds@epoch.ncsc.mil +106 -155
#   SELinux: eliminate unaligned accesses by policy loading code
# 
# security/selinux/ss/mls.c
#   2005/01/04 18:48:22-08:00 sds@epoch.ncsc.mil +43 -46
#   SELinux: eliminate unaligned accesses by policy loading code
# 
# security/selinux/ss/ebitmap.c
#   2005/01/04 18:48:22-08:00 sds@epoch.ncsc.mil +7 -8
#   SELinux: eliminate unaligned accesses by policy loading code
# 
# security/selinux/ss/conditional.c
#   2005/01/04 18:48:22-08:00 sds@epoch.ncsc.mil +24 -24
#   SELinux: eliminate unaligned accesses by policy loading code
# 
# security/selinux/ss/avtab.c
#   2005/01/04 18:48:22-08:00 sds@epoch.ncsc.mil +17 -11
#   SELinux: eliminate unaligned accesses by policy loading code
# 
# ChangeSet
#   2005/01/04 21:41:04-08:00 sds@epoch.ncsc.mil 
#   [PATCH] SELinux: add member node to selinuxfs
#   
#   This patch adds a member node to selinuxfs to export the security_member_sid
#   interface to userspace for obtaining security polyinstantiation decisions.
#   
#   Signed-off-by:  Stephen Smalley <sds@epoch.ncsc.mil>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# security/selinux/selinuxfs.c
#   2005/01/04 18:48:22-08:00 sds@epoch.ncsc.mil +65 -0
#   SELinux: add member node to selinuxfs
# 
# ChangeSet
#   2005/01/04 21:40:51-08:00 sds@epoch.ncsc.mil 
#   [PATCH] SELinux: enhance SELinux control of executable mappings
#   
#   This patch adds new permission checks to the SELinux mmap and mprotect hooks
#   to enable control over the ability to make executable a mapping that can
#   contain data not covered by the existing file-based permission checks.
#   
#   The task->self execmem permission controls the ability to create an executable
#   anonymous mapping or a writable executable private file mapping.  The
#   task->file execmod permission controls the ability to make executable a
#   previously written private file mapping, e.g.  for text relocations.  Thanks
#   to Roland McGrath for input and feedback on earlier versions of this patch.
#   
#   Signed-off-by:  Stephen Smalley <sds@epoch.ncsc.mil>
#   Signed-off-by:  James Morris <jmorris@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# security/selinux/include/av_permissions.h
#   2005/01/04 18:48:22-08:00 sds@epoch.ncsc.mil +2 -0
#   SELinux: enhance SELinux control of executable mappings
# 
# security/selinux/include/av_perm_to_string.h
#   2005/01/04 18:48:22-08:00 sds@epoch.ncsc.mil +2 -0
#   SELinux: enhance SELinux control of executable mappings
# 
# security/selinux/hooks.c
#   2005/01/04 18:48:22-08:00 sds@epoch.ncsc.mil +23 -0
#   SELinux: enhance SELinux control of executable mappings
# 
# ChangeSet
#   2005/01/04 21:40:39-08:00 sds@epoch.ncsc.mil 
#   [PATCH] SELinux: add dynamic context transition support to SELinux
#   
#   This patch for adds dynamic context transition support to SELinux via writes
#   to the existing /proc/pid/attr/current interface.
#   
#   Previously, SELinux only supported exec-based context transitions.  This
#   functionality allows privileged applications to apply privilege bracketing
#   without necessarily being refactored to an exec-based model (although such a
#   model has advantages in least privilege and isolation).
#   
#   A process must have setcurrent permission to use this mechanism at all, and
#   the dyntransition permission must be granted between the old and new security
#   contexts.  Multi-threaded processes are not allowed to use this operation, as
#   it will yield an inconsistency among the security contexts of the threads
#   sharing the same mm.
#   
#   Ptrace permission is revalidated against the new context if the process is
#   being ptraced.
#   
#   Author:  Darrel Goeddel <dgoeddel@trustedcs.com>
#   Signed-off-by:  Stephen Smalley <sds@epoch.ncsc.mil>
#   Signed-off-by:  James Morris <jmorris@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# security/selinux/ss/services.c
#   2005/01/04 18:48:22-08:00 sds@epoch.ncsc.mil +3 -2
#   SELinux: add dynamic context transition support to SELinux
# 
# security/selinux/include/av_permissions.h
#   2005/01/04 20:24:17-08:00 sds@epoch.ncsc.mil +2 -0
#   SELinux: add dynamic context transition support to SELinux
# 
# security/selinux/include/av_perm_to_string.h
#   2005/01/04 20:24:17-08:00 sds@epoch.ncsc.mil +2 -0
#   SELinux: add dynamic context transition support to SELinux
# 
# security/selinux/hooks.c
#   2005/01/04 20:24:17-08:00 sds@epoch.ncsc.mil +49 -3
#   SELinux: add dynamic context transition support to SELinux
# 
# ChangeSet
#   2005/01/04 21:40:25-08:00 sds@epoch.ncsc.mil 
#   [PATCH] SELinux: audit task comm if exe cannot be determined
#   
#   This patch ensures that the comm is included in the audit message if avc_audit
#   is unable to determine the exe due to the mmap_sem being held.  This is
#   helpful in tracking down the causes of permission denials that occur in the
#   mmap/mprotect hooks.
#   
#   Signed-off-by:  Stephen Smalley <sds@epoch.ncsc.mil>
#   Signed-off-by:  James Morris <jmorris@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# security/selinux/avc.c
#   2005/01/04 18:48:22-08:00 sds@epoch.ncsc.mil +2 -0
#   SELinux: audit task comm if exe cannot be determined
# 
# ChangeSet
#   2005/01/04 21:40:12-08:00 sds@epoch.ncsc.mil 
#   [PATCH] SELinux: update selinux_task_setscheduler
#   
#   This patch updates the selinux_task_setscheduler hook function to use the
#   standard helper for task permission checks since it is now safe to audit from
#   this hook (due to the upstream change to setscheduler() to not hold the
#   runqueue lock during the security hook call).
#   
#   Signed-off-by:  Stephen Smalley <sds@epoch.ncsc.mil>
#   Signed-off-by:  James Morris <jmorris@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# security/selinux/hooks.c
#   2005/01/04 20:24:17-08:00 sds@epoch.ncsc.mil +1 -10
#   SELinux: update selinux_task_setscheduler
# 
# ChangeSet
#   2005/01/04 21:39:59-08:00 sds@epoch.ncsc.mil 
#   [PATCH] SELinux: regenerate SELinux module headers
#   
#   This patch regenerates the SELinux module headers to use a new format and
#   updates their use by the AVC.
#   
#   Signed-off-by:  Stephen Smalley <sds@epoch.ncsc.mil>
#   Signed-off-by:  James Morris <jmorris@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# security/selinux/include/flask.h
#   2005/01/04 18:48:22-08:00 sds@epoch.ncsc.mil +2 -0
#   SELinux: regenerate SELinux module headers
# 
# security/selinux/include/common_perm_to_string.h
#   2005/01/04 18:48:22-08:00 sds@epoch.ncsc.mil +54 -61
#   SELinux: regenerate SELinux module headers
# 
# security/selinux/include/class_to_string.h
#   2005/01/04 18:48:22-08:00 sds@epoch.ncsc.mil +54 -56
#   SELinux: regenerate SELinux module headers
# 
# security/selinux/include/av_permissions.h
#   2005/01/04 20:24:17-08:00 sds@epoch.ncsc.mil +14 -3
#   SELinux: regenerate SELinux module headers
# 
# security/selinux/include/av_perm_to_string.h
#   2005/01/04 20:24:17-08:00 sds@epoch.ncsc.mil +222 -225
#   SELinux: regenerate SELinux module headers
# 
# security/selinux/include/av_inherit.h
#   2005/01/04 18:48:22-08:00 sds@epoch.ncsc.mil +29 -43
#   SELinux: regenerate SELinux module headers
# 
# security/selinux/avc.c
#   2005/01/04 20:24:17-08:00 sds@epoch.ncsc.mil +34 -3
#   SELinux: regenerate SELinux module headers
# 
# ChangeSet
#   2005/01/04 21:39:47-08:00 jmorris@redhat.com 
#   [PATCH] SELinux scalability: AVC statistics and tuning
#   
#   This patch adds an selinuxfs based API to the AVC, to allow monitoring of
#   the cache, and tuning of the cache size.  The latter is mediated via the
#   new setsecparam permission.
#   
#   AVC statistics may be monitored via the avcstat utility:
#   http://people.redhat.com/jmorris/selinux/perf/avcstat.c
#   
#   Signed-off-by: James Morris <jmorris@redhat.com>
#   Signed-off-by: Stephen Smalley <sds@epoch.ncsc.mil>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# security/selinux/selinuxfs.c
#   2005/01/04 20:24:17-08:00 jmorris@redhat.com +224 -1
#   SELinux scalability: AVC statistics and tuning
# 
# security/selinux/include/avc.h
#   2005/01/04 18:48:21-08:00 jmorris@redhat.com +17 -9
#   SELinux scalability: AVC statistics and tuning
# 
# security/selinux/include/av_permissions.h
#   2005/01/04 20:24:18-08:00 jmorris@redhat.com +1 -0
#   SELinux scalability: AVC statistics and tuning
# 
# security/selinux/include/av_perm_to_string.h
#   2005/01/04 20:24:18-08:00 jmorris@redhat.com +1 -0
#   SELinux scalability: AVC statistics and tuning
# 
# security/selinux/avc.c
#   2005/01/04 20:24:18-08:00 jmorris@redhat.com +35 -51
#   SELinux scalability: AVC statistics and tuning
# 
# security/selinux/Kconfig
#   2005/01/04 18:48:21-08:00 jmorris@redhat.com +9 -0
#   SELinux scalability: AVC statistics and tuning
# 
# ChangeSet
#   2005/01/04 21:39:34-08:00 jmorris@redhat.com 
#   [PATCH] SELinux: atomic_dec_and_test() bug
#   
#   Atomic underflow debugging in this kernel exposed a bug in the AVC RCU
#   code, fix below.  The effect of this bug would be delayed node reclamation.
#   
#   Signed-off-by: James Morris <jmorris@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# security/selinux/avc.c
#   2005/01/04 20:24:18-08:00 jmorris@redhat.com +1 -1
#   SELinux: atomic_dec_and_test() bug
# 
# ChangeSet
#   2005/01/04 21:39:21-08:00 jmorris@redhat.com 
#   [PATCH] SELinux scalability: convert AVC to RCU
#   
#   The following patch improves the scalability of SELinux by replacing the
#   global avc_lock with an RCU based scheme by Kaigai Kohei.  The size of the
#   cache is made tunable, to allow administrators to tune systems for different
#   workloads, while statistics are exported via selinuxfs to allow AVC
#   performance to be monitored at a low level.
#   
#   AVC nodes are also allocated now via a slab cache, and AVC references have
#   been removed from the code.
#   
#   This code has been extensively tested and benchmarked (see benchmark results
#   below).  Baseline performance is not improved, although it is clear that
#   dramatic scalability improvements are achieved.
#   
#   Baseline performance and networking scalability are areas where work is
#   ongoing (in particular, we need to add caching of some network security
#   objects so that we don't fallback to policy database lookups on each
#   permission call).
#   
#   Benchmark results:
#   
#   ===============================================================================================
#   
#   System: 4 node 16-way IA64 NUMA
#   
#   - 'Stream' is based on http://www.cs.virginia.edu/stream/ , HPC memory bandwidth test,
#     higher result is better.
#   - Hackbench: scheduler scalability benchmark by Rusty, lower is better.
#   
#   Standard kernel:
#     2.6.9-1.648_EL  SELINUX=0 : Stream 6159.987MB/s HackBench 53.144
#     2.6.9-1.648_EL  SELINUX=1 : Stream 5872.529MB/s HackBench 1043.132
#   
#   Kernel with RCU/AVC patches:
#     2.6.9-1.689_avcrcu.root SELINUX=0 : Stream 8829.647MB/s HackBench 53.976
#     2.6.9-1.689_avcrcu.root SELINUX=1 : Stream 8817.117MB/s HackBench 50.975
#   
#   ===============================================================================================
#   
#   System: 8-way PIII 900Mhz Xeon with 9GB RAM
#   Fileystem: ext2 for all testing.
#   
#   Notes:
#       AVC was reset before tests, so avc was flushed.
#       System was run in enforcing mode.
#   
#   Key:
#       std-nolsm:      standard kernel with LSM disabled
#       std-lsmcap:     standard kernel with LSM enabled, capabilities LSM
#       std-sel-strict: standard kernel with SELinux enabled, capabilities secondary LSM
#       rcu-sel-strict: as above with RCU & AVC stats patches
# 
# security/selinux/selinuxfs.c
#   2005/01/04 20:24:18-08:00 jmorris@redhat.com +1 -1
#   SELinux scalability: convert AVC to RCU
# 
# security/selinux/include/objsec.h
#   2005/01/04 18:48:21-08:00 jmorris@redhat.com +0 -6
#   SELinux scalability: convert AVC to RCU
# 
# security/selinux/include/avc.h
#   2005/01/04 20:24:18-08:00 jmorris@redhat.com +2 -21
#   SELinux scalability: convert AVC to RCU
# 
# security/selinux/hooks.c
#   2005/01/04 20:24:18-08:00 jmorris@redhat.com +64 -98
#   SELinux scalability: convert AVC to RCU
# 
# security/selinux/avc.c
#   2005/01/04 20:24:18-08:00 jmorris@redhat.com +253 -226
#   SELinux scalability: convert AVC to RCU
# 
# ChangeSet
#   2005/01/04 21:39:08-08:00 jmorris@redhat.com 
#   [PATCH] SELinux scalability: add spin_trylock_irq and  spin_trylock_irqsave
#   
#   This patch from Kaigai Kohei <kaigai@ak.jp.nec.com> adds irq and irqsave
#   trylock spinlock variants for use by the SELinux AVC RCU patch.
#   
#   Signed-off-by: Kaigai Kohei <kaigai@ak.jp.nec.com>
#   Signed-off-by: Stephen Smalley <sds@epoch.ncsc.mil>
#   Signed-off-by: James Morris <jmorris@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/spinlock.h
#   2005/01/04 18:48:21-08:00 jmorris@redhat.com +14 -0
#   SELinux scalability: add spin_trylock_irq and  spin_trylock_irqsave
# 
# ChangeSet
#   2005/01/04 21:38:55-08:00 oleg@tv-sign.ru 
#   [PATCH] uninline/kill __exit_mm()
#   
#   __exit_mm() is an inlined version of exit_mm().  This patch unifies them.
#   
#   Saves 356 byte in exit.o.
#   
#   Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# kernel/exit.c
#   2005/01/04 18:48:21-08:00 oleg@tv-sign.ru +2 -7
#   uninline/kill __exit_mm()
# 
# ChangeSet
#   2005/01/04 21:38:42-08:00 roland@redhat.com 
#   [PATCH] task_struct.exit_state usage
#   
#   I just did a quick audit of the use of exit_state and the EXIT_* bit
#   macros.  I guess I didn't really review these changes very closely when you
#   did them originally.  :-(
#   
#   I found several places that seem like lossy cases of query-replace without
#   enough thought about the code.  Linus has previously said the >= tests
#   ought to be & tests instead.  But for exit_state, it can only ever be 0,
#   EXIT_DEAD, or EXIT_ZOMBIE--so a nonzero test is actually the same as
#   testing & (EXIT_DEAD|EXIT_ZOMBIE), and maybe its code is a tiny bit better.
#    The case like in choose_new_parent is just confusing, to have the
#   always-false test for EXIT_* bits in ->state there too.
#   
#   The two cases in wants_signal and do_process_times are actual regressions
#   that will give us back old bugs in race conditions.  These places had
#   s/TASK/EXIT/ but not s/state/exit_state/, and now there tests for exiting
#   tasks are now wrong and never catching them.  I take it back: there is no
#   regression in wants_signal in practice I think, because of the PF_EXITING
#   test that makes the EXIT_* state checks superfluous anyway.  So that is
#   just another cosmetic case of confusing code.  But in do_process_times,
#   there is that SIGXCPU-while-exiting race condition back again.
#   
#   Signed-off-by: Roland McGrath <roland@redhat.com>
#   Acked-by: Ingo Molnar <mingo@elte.hu>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# kernel/timer.c
#   2005/01/04 18:48:21-08:00 roland@redhat.com +1 -1
#   task_struct.exit_state usage
# 
# kernel/signal.c
#   2005/01/04 18:48:21-08:00 roland@redhat.com +3 -3
#   task_struct.exit_state usage
# 
# kernel/sched.c
#   2005/01/04 18:48:21-08:00 roland@redhat.com +1 -1
#   task_struct.exit_state usage
# 
# kernel/exit.c
#   2005/01/04 20:24:19-08:00 roland@redhat.com +4 -4
#   task_struct.exit_state usage
# 
# ChangeSet
#   2005/01/04 21:38:28-08:00 roland@redhat.com 
#   [PATCH] move waitchld_exit from task_struct to signal_struct
#   
#   There is really no point in each task_struct having its own waitchld_exit. 
#   In the only use of it, the waitchld_exit of each thread in a group gets
#   woken up at the same time.  So, there might as well just be one wait queue
#   for the whole thread group.  This patch does that by moving the field from
#   task_struct to signal_struct.  It should have no effect on the behavior,
#   but saves a little work and a little storage in the multithreaded case.
#   
#   Signed-off-by: Roland McGrath <roland@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# security/selinux/hooks.c
#   2005/01/04 20:24:19-08:00 roland@redhat.com +1 -1
#   move waitchld_exit from task_struct to signal_struct
# 
# kernel/signal.c
#   2005/01/04 20:24:19-08:00 roland@redhat.com +3 -19
#   move waitchld_exit from task_struct to signal_struct
# 
# kernel/fork.c
#   2005/01/04 18:48:20-08:00 roland@redhat.com +1 -1
#   move waitchld_exit from task_struct to signal_struct
# 
# kernel/exit.c
#   2005/01/04 20:24:19-08:00 roland@redhat.com +2 -2
#   move waitchld_exit from task_struct to signal_struct
# 
# include/linux/sched.h
#   2005/01/04 18:48:20-08:00 roland@redhat.com +2 -1
#   move waitchld_exit from task_struct to signal_struct
# 
# include/linux/init_task.h
#   2005/01/04 18:48:20-08:00 roland@redhat.com +1 -1
#   move waitchld_exit from task_struct to signal_struct
# 
# arch/mips/kernel/irixsig.c
#   2005/01/04 18:48:20-08:00 roland@redhat.com +2 -2
#   move waitchld_exit from task_struct to signal_struct
# 
# ChangeSet
#   2005/01/04 21:38:15-08:00 roland@redhat.com 
#   [PATCH] fix ptracer death race yielding bogus BUG_ON
#   
#   There is a BUG_ON in ptrace_stop that hits if the thread is not ptraced.
#   However, there is no synchronization between a thread deciding to do a
#   ptrace stop and so going here, and its ptracer dying and so detaching from
#   it and clearing its ->ptrace field. 
#   
#   The RHEL3 2.4-based kernel has a backport of a slightly older version of
#   the 2.6 signals code, which has a different but equivalent BUG_ON.  This
#   actually bit users in practice (when the debugger dies), but was
#   exceedingly difficult to reproduce in contrived circumstances.  We moved
#   forward in RHEL3 just by removing the BUG_ON, and that fixed the real user
#   problems even though I was never able to reproduce the scenario myself. 
#   So, to my knowledge this scenario has never actually been seen in practice
#   under 2.6.  But it's plain to see from the code that it is indeed possible.
#   
#   This patch removes that BUG_ON, but also goes further and tries to handle
#   this case more gracefully than simply avoiding the crash.  By removing the
#   BUG_ON alone, it becomes possible for the real parent of a process to see
#   spurious SIGCHLD notifications intended for the debugger that has just
#   died, and have its child wind up stopped unexpectedly.  This patch avoids
#   that possibility by detecting the case when we are about to do the ptrace
#   stop but our ptracer has gone away, and simply eliding that ptrace stop
#   altogether as if we hadn't been ptraced when we hit the interesting event
#   (signal or ptrace_notify call for syscall tracing or something like that).
#   
#   Signed-off-by: Roland McGrath <roland@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# kernel/signal.c
#   2005/01/04 20:24:19-08:00 roland@redhat.com +22 -8
#   fix ptracer death race yielding bogus BUG_ON
# 
# ChangeSet
#   2005/01/04 21:38:01-08:00 roland@redhat.com 
#   [PATCH] move group_exit flag into signal_struct.flags word
#   
#   After my last change, there are plenty of unused bits available in the new
#   flags word in signal_struct.  This patch moves the `group_exit' flag into
#   one of those bits, saving a word in signal_struct.
#   
#   Signed-off-by: Roland McGrath <roland@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# kernel/signal.c
#   2005/01/04 20:24:20-08:00 roland@redhat.com +10 -5
#   move group_exit flag into signal_struct.flags word
# 
# kernel/fork.c
#   2005/01/04 20:24:19-08:00 roland@redhat.com +1 -2
#   move group_exit flag into signal_struct.flags word
# 
# kernel/exit.c
#   2005/01/04 20:24:19-08:00 roland@redhat.com +5 -5
#   move group_exit flag into signal_struct.flags word
# 
# include/linux/sched.h
#   2005/01/04 20:24:19-08:00 roland@redhat.com +1 -1
#   move group_exit flag into signal_struct.flags word
# 
# fs/exec.c
#   2005/01/04 18:48:20-08:00 roland@redhat.com +3 -4
#   move group_exit flag into signal_struct.flags word
# 
# ChangeSet
#   2005/01/04 21:37:48-08:00 roland@redhat.com 
#   [PATCH] fix stop signal race
#   
#   The `sig_avoid_stop_race' checks fail to catch a related race scenario that
#   can happen.  I don't think this has been seen in nature, but it could
#   happen in the same sorts of situations where the observed problems come up
#   that those checks work around.  This patch takes a different approach to
#   catching this race condition.  The new approach plugs the hole, and I think
#   is also cleaner.
#   
#   The issue is a race between one CPU processing a stop signal while another
#   CPU processes a SIGCONT or SIGKILL.  There is a window in stop-signal
#   processing where the siglock must be released.  If a SIGCONT or SIGKILL
#   comes along here on another CPU, then the stop signal in the midst of being
#   processed needs to be discarded rather than having the stop take place
#   after the SIGCONT or SIGKILL has been generated.  The existing workaround
#   checks for this case explicitly by looking for a pending SIGCONT or SIGKILL
#   after reacquiring the lock.
#   
#   However, there is another problem related to the same race issue.  In the
#   window where the processing of the stop signal has released the siglock,
#   the stop signal is not represented in the pending set any more, but it is
#   still "pending" and not "delivered" in POSIX terms.  The SIGCONT coming in
#   this window is required to clear all pending stop signals.  But, if a stop
#   signal has been dequeued but not yet processed, the SIGCONT generation will
#   fail to clear it (in handle_stop_signal).  Likewise, a SIGKILL coming here
#   should prevent the stop processing and make the thread die immediately
#   instead.  The `sig_avoid_stop_race' code checks for this by examining the
#   pending set to see if SIGCONT or SIGKILL is in it.  But this fails to
#   handle the case where another CPU running another thread in the same
#   process has already dequeued the signal (so it no longer can be found in
#   the pending set).  We must catch this as well, so that the same problems do
#   not arise when another thread on another CPU acted real fast.
#   
#   I've fixed this dumping the `sig_avoid_stop_race' kludge in favor of a
#   little explicit bookkeeping.  Now, dequeuing any stop signal sets a flag
#   saying that a pending stop signal has been taken on by some CPU since the
#   last time all pending stop signals were cleared due to SIGCONT/SIGKILL. 
#   The processing of stop signals checks the flag after the window where it
#   released the lock, and abandons the signal the flag has been cleared.  The
#   code that clears pending stop signals on SIGCONT generation also clears
#   this flag.  The various places that are trying to ensure the process dies
#   quickly (SIGKILL or other unhandled signals) also clear the flag.  I've
#   made this a general flags word in signal_struct, and replaced the
#   stop_state field with flag bits in this word.
#   
#   Signed-off-by: Roland McGrath <roland@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# kernel/signal.c
#   2005/01/04 20:24:20-08:00 roland@redhat.com +67 -48
#   fix stop signal race
# 
# kernel/fork.c
#   2005/01/04 20:24:20-08:00 roland@redhat.com +1 -1
#   fix stop signal race
# 
# kernel/exit.c
#   2005/01/04 20:24:20-08:00 roland@redhat.com +4 -3
#   fix stop signal race
# 
# include/linux/sched.h
#   2005/01/04 20:24:20-08:00 roland@redhat.com +9 -2
#   fix stop signal race
# 
# ChangeSet
#   2005/01/04 21:37:34-08:00 coywolf@gmail.com 
#   [PATCH] remove redundant sys_delete_module()
#   
#   Peter Chubb recently split out a standalone sys_ni.c file for the not
#   implemented syscalls.  This patch removes the redundant sys_delete_module()
#   in module.c.
#   
#   Signed-off-by: Coywolf Qi Hunt <coywolf@gmail.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# kernel/module.c
#   2005/01/04 18:48:20-08:00 coywolf@gmail.com +0 -7
#   remove redundant sys_delete_module()
# 
# ChangeSet
#   2005/01/04 21:37:20-08:00 oleg@tv-sign.ru 
#   [PATCH] fix conflicting cpu_idle() declarations
#   
#   cpu_idle() is referenced from generic code (init/main.c).  It is
#   declared/defined in
#   
#   init/main.c:				void cpu_idle(void)
#   
#   i386/kernel/process.c			void cpu_idle(void)
#   i386/kernel/smpboot.c:			int  cpu_idle(void)
#   i386/mach-voyager/voyager_smp.c:	int  cpu_idle(void)
#   
#   ppc/kernel/idle.c:			int  cpu_idle(void)
#   ppc/kernel/smp.c:			int  cpu_idle(void *unused)
#   
#   ppc64/kernel/idle.c:			int  cpu_idle(void)
#   ppc64/kernel/smp.c:			int  cpu_idle(void *unused)
#   
#   sparc/kernel/process.c:			int  cpu_idle(void)
#   
#   sparc64/kernel/process.c:		int  cpu_idle(void)
#   
#   sh/kernel/process.c:			void cpu_idle(void *unused)
#   sh/kernel/smp.c:			int  cpu_idle(void *unused)
#   
#   ia64/kernel/smpboot.c:			int  cpu_idle(void)
#   ia64/kernel/process.c:			void cpu_idle(void *unused)
#   
#   sh64/kernel/process.c:			void cpu_idle(void *unused)
#   
#   s390/kernel/process.c:			int  cpu_idle(void)
#   s390/kernel/smp.c:			int  cpu_idle(void * unused)
#   
#   m32r/kernel/process.c:			void cpu_idle(void)
#   m32r/kernel/smpboot.c			int  cpu_idle(void)
#   
#   Other arches beleive that cpu_idle is void(void).
#   
#   This patch puts 'void cpu_idle(void)' in include/linux/smp.h
#   and fixes conflicting definitions.
#   
#   Also removes now unneeded declarations in x86_64, alpha, parisc.
#   
#   Only i386 part is tested.
#   
#   Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# init/main.c
#   2005/01/04 18:48:20-08:00 oleg@tv-sign.ru +0 -1
#   fix conflicting cpu_idle() declarations
# 
# include/linux/smp.h
#   2005/01/04 18:48:20-08:00 oleg@tv-sign.ru +2 -0
#   fix conflicting cpu_idle() declarations
# 
# include/asm-x86_64/proto.h
#   2005/01/04 18:48:20-08:00 oleg@tv-sign.ru +0 -1
#   fix conflicting cpu_idle() declarations
# 
# arch/sparc64/kernel/process.c
#   2005/01/04 18:48:20-08:00 oleg@tv-sign.ru +4 -4
#   fix conflicting cpu_idle() declarations
# 
# arch/sparc/kernel/sun4m_smp.c
#   2005/01/04 18:48:20-08:00 oleg@tv-sign.ru +0 -1
#   fix conflicting cpu_idle() declarations
# 
# arch/sparc/kernel/sun4d_smp.c
#   2005/01/04 18:48:20-08:00 oleg@tv-sign.ru +0 -1
#   fix conflicting cpu_idle() declarations
# 
# arch/sparc/kernel/process.c
#   2005/01/04 18:48:20-08:00 oleg@tv-sign.ru +3 -6
#   fix conflicting cpu_idle() declarations
# 
# arch/sh64/kernel/process.c
#   2005/01/04 18:48:20-08:00 oleg@tv-sign.ru +1 -1
#   fix conflicting cpu_idle() declarations
# 
# arch/sh/kernel/smp.c
#   2005/01/04 18:48:20-08:00 oleg@tv-sign.ru +2 -2
#   fix conflicting cpu_idle() declarations
# 
# arch/sh/kernel/process.c
#   2005/01/04 18:48:20-08:00 oleg@tv-sign.ru +1 -1
#   fix conflicting cpu_idle() declarations
# 
# arch/s390/kernel/smp.c
#   2005/01/04 18:48:20-08:00 oleg@tv-sign.ru +2 -2
#   fix conflicting cpu_idle() declarations
# 
# arch/s390/kernel/process.c
#   2005/01/04 18:48:20-08:00 oleg@tv-sign.ru +1 -2
#   fix conflicting cpu_idle() declarations
# 
# arch/ppc64/kernel/smp.c
#   2005/01/04 18:48:20-08:00 oleg@tv-sign.ru +2 -2
#   fix conflicting cpu_idle() declarations
# 
# arch/ppc64/kernel/idle.c
#   2005/01/04 18:48:20-08:00 oleg@tv-sign.ru +1 -2
#   fix conflicting cpu_idle() declarations
# 
# arch/ppc/kernel/smp.c
#   2005/01/04 18:48:20-08:00 oleg@tv-sign.ru +2 -2
#   fix conflicting cpu_idle() declarations
# 
# arch/ppc/kernel/idle.c
#   2005/01/04 18:48:20-08:00 oleg@tv-sign.ru +1 -2
#   fix conflicting cpu_idle() declarations
# 
# arch/parisc/kernel/smp.c
#   2005/01/04 18:48:20-08:00 oleg@tv-sign.ru +0 -1
#   fix conflicting cpu_idle() declarations
# 
# arch/m32r/kernel/smpboot.c
#   2005/01/04 18:48:20-08:00 oleg@tv-sign.ru +2 -2
#   fix conflicting cpu_idle() declarations
# 
# arch/ia64/kernel/smpboot.c
#   2005/01/04 18:48:20-08:00 oleg@tv-sign.ru +2 -3
#   fix conflicting cpu_idle() declarations
# 
# arch/ia64/kernel/process.c
#   2005/01/04 18:48:20-08:00 oleg@tv-sign.ru +1 -1
#   fix conflicting cpu_idle() declarations
# 
# arch/i386/mach-voyager/voyager_smp.c
#   2005/01/04 18:48:20-08:00 oleg@tv-sign.ru +2 -3
#   fix conflicting cpu_idle() declarations
# 
# arch/i386/kernel/smpboot.c
#   2005/01/04 18:48:20-08:00 oleg@tv-sign.ru +2 -4
#   fix conflicting cpu_idle() declarations
# 
# arch/alpha/kernel/proto.h
#   2005/01/04 18:48:20-08:00 oleg@tv-sign.ru +0 -3
#   fix conflicting cpu_idle() declarations
# 
# ChangeSet
#   2005/01/04 21:37:07-08:00 james4765@verizon.net 
#   [PATCH] lcd: fix memory leak, code cleanup
#   
#   This patch addresses the following issues:
#   
#   - Fix log-spamming and cryptic error messages, and add KERN_ constants.
#   
#   - Convert some ints to unsigned ints.
#   
#   - Add checks for CAP_SYS_ADMIN for FLASH_Burn and FLASH_Erase ioctls.
#   
#   - Identify use of global variable.
#   
#   - Fix memory leak in FLASH_Burn ioctl.
#   
#   - Fix error return codes in lcd_ioctl().
#   
#   - Move variable "index" in lcd_ioctl() to smaller scope to reduce memory
#     usage.
#   
#   - Convert cli()/sti() to spin_lock_irqsave()/spin_unlock_irqrestore().
#     Fix legibility issues in FLASH_Burn ioctl.
#   
#   Signed-off-by: James Nelson <james4765@gmail.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/char/lcd.h
#   2005/01/04 18:48:19-08:00 james4765@verizon.net +2 -0
#   lcd: fix memory leak, code cleanup
# 
# drivers/char/lcd.c
#   2005/01/04 18:48:19-08:00 james4765@verizon.net +44 -42
#   lcd: fix memory leak, code cleanup
# 
# ChangeSet
#   2005/01/04 21:36:54-08:00 werner@almesberger.net 
#   [PATCH] prio_tree: move general code from mm/ to lib/
#   
#   Last but not least, move the general prio_tree code from mm/ to lib/.  This
#   patch also duplicates some macros, which are used in the VMA code for
#   debugging purposes, so we can't properly separate them yet.
#   
#   Note that this patch conflicts with a patch in 2.6.10-rc3-mm1
#   (frv-better-mmap-support-in-uclinux.patch), which removes mm/prio_tree in
#   systems without an MMU.  Not making that other patch provide a dummy for
#   prio_tree_init should resolve the conflict.  (That's just from reading the
#   patch - I haven't actually tried this.)
#   
#   Signed-off-by: Werner Almesberger <werner@almesberger.net>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# mm/prio_tree.c
#   2005/01/04 18:48:19-08:00 werner@almesberger.net +6 -459
#   prio_tree: move general code from mm/ to lib/
# 
# lib/prio_tree.c
#   2005/01/04 18:48:19-08:00 werner@almesberger.net +484 -0
#   prio_tree: move general code from mm/ to lib/
# 
# lib/Makefile
#   2005/01/04 18:48:19-08:00 werner@almesberger.net +1 -1
#   prio_tree: move general code from mm/ to lib/
# 
# lib/prio_tree.c
#   2005/01/04 18:48:19-08:00 werner@almesberger.net +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/lib/prio_tree.c
# 
# ChangeSet
#   2005/01/04 21:36:41-08:00 werner@almesberger.net 
#   [PATCH] prio_tree: generalization
#   
#   Export prio_tree functions such that they can be used by other subsystems than
#   only VMAs.  Also adds a mode to prio_tree to use it with keys explicitly
#   included in the prio_tree meta-data.
#   
#   The plan is to also consider converting VMAs to use explicit keys, so that the
#   old "raw" mode can be removed.
#   
#   Signed-off-by: Werner Almesberger <werner@almesberger.net>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# mm/prio_tree.c
#   2005/01/04 20:24:21-08:00 werner@almesberger.net +33 -32
#   prio_tree: generalization
# 
# include/linux/prio_tree.h
#   2005/01/04 18:48:19-08:00 werner@almesberger.net +45 -2
#   prio_tree: generalization
# 
# include/linux/mm.h
#   2005/01/04 20:24:16-08:00 werner@almesberger.net +1 -1
#   prio_tree: generalization
# 
# fs/inode.c
#   2005/01/04 20:24:07-08:00 werner@almesberger.net +1 -1
#   prio_tree: generalization
# 
# ChangeSet
#   2005/01/04 21:36:27-08:00 werner@almesberger.net 
#   [PATCH] prio_tree: roll call to prio_tree_first into prio_tree_next
#   
#   Allow prio_tree_next to be used as the only function for tree traversal,
#   similar to how vma_prio_tree_next works.
#   
#   This patch isn't needed for the generalization, but since it affects the API,
#   it's better to include it first.
#   
#   Signed-off-by: Werner Almesberger <werner@almesberger.net>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# mm/prio_tree.c
#   2005/01/04 20:24:21-08:00 werner@almesberger.net +4 -1
#   prio_tree: roll call to prio_tree_first into prio_tree_next
# 
# include/linux/prio_tree.h
#   2005/01/04 20:24:21-08:00 werner@almesberger.net +1 -0
#   prio_tree: roll call to prio_tree_first into prio_tree_next
# 
# ChangeSet
#   2005/01/04 21:36:15-08:00 akpm@osdl.org 
#   [PATCH] msync(): set PF_SYNCWRITE
#   
#   Pass the "we are doing synchronous writes" hint down from msync().
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# mm/msync.c
#   2005/01/04 18:48:19-08:00 akpm@osdl.org +4 -0
#   msync(): set PF_SYNCWRITE
# 
# ChangeSet
#   2005/01/04 21:36:02-08:00 nanhai.zou@intel.com 
#   [PATCH] compat: sigtimedwait
#   
#   - Merge sys32_rt_sigtimedwait function in X86_64, IA64, PPC64, MIPS,
#     SPARC64, S390 32 bit layer into 1 compat_rt_sigtimedwait function.  It will
#     also fix a bug of copy wrong information to 32 bit userspace siginfo
#     structure on X86_64, IA64 and SPARC64 when calling sigtimedwait on 32 bit
#     layer.
#   
#   - Change all name the of siginfo_t32 structure in X86_64, IA64, MIPS,
#     SPARC64 and S390 to the name compat_siginfo_t as used in PPC64.
#   
#   - Patch introduced a macro __COMPAT_ENDIAN_SWAP__ in
#     include/asm-mips/compat.h when MIPS kernel is compiled in little-endian
#     mode.  This macro is used to do byte swapping in function
#     sigset_from_compat.
#   
#   - This patch is only tested on X86_64 and IA_64.
#   
#   Signed-off-by: Zou Nan hai <Nanhai.zou@intel.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# kernel/compat.c
#   2005/01/04 18:48:19-08:00 nanhai.zou@intel.com +86 -0
#   compat: sigtimedwait
# 
# include/linux/compat.h
#   2005/01/04 18:48:19-08:00 nanhai.zou@intel.com +3 -1
#   compat: sigtimedwait
# 
# include/asm-x86_64/ia32.h
#   2005/01/04 18:48:19-08:00 nanhai.zou@intel.com +3 -5
#   compat: sigtimedwait
# 
# include/asm-sparc64/siginfo.h
#   2005/01/04 18:48:19-08:00 nanhai.zou@intel.com +1 -4
#   compat: sigtimedwait
# 
# include/asm-mips/compat.h
#   2005/01/04 18:48:19-08:00 nanhai.zou@intel.com +3 -0
#   compat: sigtimedwait
# 
# arch/x86_64/ia32/sys_ia32.c
#   2005/01/04 18:48:19-08:00 nanhai.zou@intel.com +4 -43
#   compat: sigtimedwait
# 
# arch/x86_64/ia32/ia32entry.S
#   2005/01/04 18:48:19-08:00 nanhai.zou@intel.com +1 -1
#   compat: sigtimedwait
# 
# arch/x86_64/ia32/ia32_signal.c
#   2005/01/04 18:48:19-08:00 nanhai.zou@intel.com +6 -6
#   compat: sigtimedwait
# 
# arch/sparc64/kernel/systbls.S
#   2005/01/04 18:48:19-08:00 nanhai.zou@intel.com +1 -1
#   compat: sigtimedwait
# 
# arch/sparc64/kernel/sys_sparc32.c
#   2005/01/04 18:48:19-08:00 nanhai.zou@intel.com +4 -89
#   compat: sigtimedwait
# 
# arch/sparc64/kernel/signal32.c
#   2005/01/04 18:48:19-08:00 nanhai.zou@intel.com +7 -7
#   compat: sigtimedwait
# 
# arch/s390/kernel/syscalls.S
#   2005/01/04 18:48:19-08:00 nanhai.zou@intel.com +1 -1
#   compat: sigtimedwait
# 
# arch/s390/kernel/ptrace.c
#   2005/01/04 18:48:19-08:00 nanhai.zou@intel.com +2 -2
#   compat: sigtimedwait
# 
# arch/s390/kernel/compat_wrapper.S
#   2005/01/04 18:48:19-08:00 nanhai.zou@intel.com +3 -3
#   compat: sigtimedwait
# 
# arch/s390/kernel/compat_signal.c
#   2005/01/04 18:48:19-08:00 nanhai.zou@intel.com +5 -5
#   compat: sigtimedwait
# 
# arch/s390/kernel/compat_linux.h
#   2005/01/04 18:48:19-08:00 nanhai.zou@intel.com +2 -5
#   compat: sigtimedwait
# 
# arch/s390/kernel/compat_linux.c
#   2005/01/04 18:48:19-08:00 nanhai.zou@intel.com +1 -85
#   compat: sigtimedwait
# 
# arch/ppc64/kernel/signal32.c
#   2005/01/04 18:48:19-08:00 nanhai.zou@intel.com +3 -33
#   compat: sigtimedwait
# 
# arch/ppc64/kernel/misc.S
#   2005/01/04 18:48:19-08:00 nanhai.zou@intel.com +1 -1
#   compat: sigtimedwait
# 
# arch/mips/kernel/signal32.c
#   2005/01/04 18:48:19-08:00 nanhai.zou@intel.com +7 -98
#   compat: sigtimedwait
# 
# arch/mips/kernel/scall64-o32.S
#   2005/01/04 18:48:19-08:00 nanhai.zou@intel.com +1 -1
#   compat: sigtimedwait
# 
# arch/mips/kernel/scall64-n32.S
#   2005/01/04 18:48:19-08:00 nanhai.zou@intel.com +1 -1
#   compat: sigtimedwait
# 
# arch/ia64/ia32/sys_ia32.c
#   2005/01/04 18:48:19-08:00 nanhai.zou@intel.com +1 -1
#   compat: sigtimedwait
# 
# arch/ia64/ia32/ia32priv.h
#   2005/01/04 18:48:19-08:00 nanhai.zou@intel.com +2 -6
#   compat: sigtimedwait
# 
# arch/ia64/ia32/ia32_signal.c
#   2005/01/04 18:48:19-08:00 nanhai.zou@intel.com +6 -33
#   compat: sigtimedwait
# 
# arch/ia64/ia32/ia32_entry.S
#   2005/01/04 18:48:19-08:00 nanhai.zou@intel.com +1 -1
#   compat: sigtimedwait
# 
# ChangeSet
#   2005/01/04 21:35:46-08:00 hch@lst.de 
#   [PATCH] remove dead ext3_put_inode prototype
#   
#   ext3_put_inode has been removed a while ago.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/ext3_fs.h
#   2005/01/04 18:48:18-08:00 hch@lst.de +0 -1
#   remove dead ext3_put_inode prototype
# 
# ChangeSet
#   2005/01/04 21:35:33-08:00 hch@lst.de 
#   [PATCH] udf: fix reservation discarding
#   
#   UDF discards file preallocations on every ->put_inode which is totally
#   bogus.  It already discards them in ->release which makes sense for normal
#   writes, so the only additional discard is in ->clear_inode so we make sure
#   we don't leak any reservations for shared writeable mappings.
#   
#   This follows similar changes to ext2 and ext3.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/udf/udfdecl.h
#   2005/01/04 18:48:18-08:00 hch@lst.de +0 -1
#   udf: fix reservation discarding
# 
# fs/udf/super.c
#   2005/01/04 18:48:18-08:00 hch@lst.de +0 -1
#   udf: fix reservation discarding
# 
# fs/udf/inode.c
#   2005/01/04 18:48:18-08:00 hch@lst.de +6 -24
#   udf: fix reservation discarding
# 
# ChangeSet
#   2005/01/04 21:35:19-08:00 hch@lst.de 
#   [PATCH] udf: simplify udf_iget, fix race
#   
#   udf_iget calls __udf_read_inode after the inode has been unlocked and other
#   threads could access it.  Switching to iget_locked() fixes this race and
#   nicely simplifies the code.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/udf/super.c
#   2005/01/04 20:24:23-08:00 hch@lst.de +0 -1
#   udf: simplify udf_iget, fix race
# 
# fs/udf/inode.c
#   2005/01/04 20:24:23-08:00 hch@lst.de +15 -69
#   udf: simplify udf_iget, fix race
# 
# ChangeSet
#   2005/01/04 21:35:06-08:00 zwane@arm.linux.org.uk 
#   [PATCH] Remove RCU abuse in cpu_idle()
#   
#   Introduce cpu_idle_wait() on architectures requiring modification of
#   pm_idle from modules, this will ensure that all processors have updated
#   their cached values of pm_idle upon exit.  This patch is to address the bug
#   report at http://bugme.osdl.org/show_bug.cgi?id=1716 and replaces the
#   current code fix which is in violation of normal RCU usage as pointed out
#   by Stephen, Dipankar and Paul.
#   
#   Signed-off-by: Zwane Mwaikambo <zwane@arm.linux.org.uk>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-x86_64/system.h
#   2005/01/04 18:48:18-08:00 zwane@arm.linux.org.uk +2 -0
#   Remove RCU abuse in cpu_idle()
# 
# include/asm-ia64/system.h
#   2005/01/04 18:48:18-08:00 zwane@arm.linux.org.uk +1 -0
#   Remove RCU abuse in cpu_idle()
# 
# include/asm-i386/system.h
#   2005/01/04 18:48:18-08:00 zwane@arm.linux.org.uk +1 -0
#   Remove RCU abuse in cpu_idle()
# 
# drivers/acpi/processor_idle.c
#   2005/01/04 18:48:18-08:00 zwane@arm.linux.org.uk +1 -1
#   Remove RCU abuse in cpu_idle()
# 
# arch/x86_64/kernel/process.c
#   2005/01/04 18:48:18-08:00 zwane@arm.linux.org.uk +24 -7
#   Remove RCU abuse in cpu_idle()
# 
# arch/ia64/kernel/process.c
#   2005/01/04 20:24:21-08:00 zwane@arm.linux.org.uk +24 -7
#   Remove RCU abuse in cpu_idle()
# 
# arch/i386/kernel/process.c
#   2005/01/04 18:48:18-08:00 zwane@arm.linux.org.uk +25 -9
#   Remove RCU abuse in cpu_idle()
# 
# arch/i386/kernel/apm.c
#   2005/01/04 18:48:18-08:00 zwane@arm.linux.org.uk +1 -1
#   Remove RCU abuse in cpu_idle()
# 
# ChangeSet
#   2005/01/04 21:34:52-08:00 mason@suse.com 
#   [PATCH] __getblk_slow can loop forever when pages are partially mapped
#   
#   When a block device is accessed via read/write, it is possible for some of
#   the buffers on a page to be mapped and others not.  __getblk and friends
#   assume this can't happen, and can end up looping forever when pages have
#   some unmapped buffers.  Picture:
#   
#   lseek(/dev/xxx, 2048, SEEK_SET)
#   write(/dev/xxx, 2048 bytes)
#   
#   Assuming the block size is 1k, page 0 has 4 buffers, two are mapped by
#   __block_prepare_write and two are not.  Next, another process triggers
#   getblk(/dev/xxx, blocknr = 0);
#   
#   __getblk_slow will loop forever.  __find_get_block fails because the buffer
#   isn't mapped.  grow_dev_page does nothing because there are buffers on the
#   page with the correct size.  madhav@veritas.com and others at Veritas
#   tracked this down.
#   
#   The fix below has two parts.  First, it changes __find_get_block to avoid
#   the buffer_error warnings when it finds unmapped buffers on the page.
#   
#   Second, it changes grow_dev_page to map the buffers on the page by calling
#   init_page_buffers.  init_page_buffers is changed so we don't stomp on
#   uptodate bits for the buffers.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/buffer.c
#   2005/01/04 18:48:18-08:00 mason@suse.com +23 -13
#   __getblk_slow can loop forever when pages are partially mapped
# 
# ChangeSet
#   2005/01/04 21:34:39-08:00 kaneshige.kenji@jp.fujitsu.com 
#   [PATCH] IRQ resource deallocation: ia64
#   
#   This is an ia64 portion of IRQ resource deallocation. It implements
#   pcibios_disable_device() and acpi_unregister_gsi() for ia64.
#   
#       o acpi_unregister_gsi()
#   
#           Summary of changes for implementing this interface:
#   
#           - Add new function iosapic_unregister_intr() into
#             arch/ia64/kernel/iosapic.c. This function frees an interrupt
#             vector and related data structures.
#   
#           - Add new function free_irq_vector() into
#             arch/ia64/kernel/irq_ia64.c. This frees an unused vector.
#   
#           - Change assign_irq_vector() to be able to support
#             free_irq_vector().
#   
#       o pcibios_disable_device()
#   
#           This calls acpi_pci_irq_disable() to deallocate IRQ resources.
#   
#   Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-ia64/iosapic.h
#   2005/01/04 18:48:18-08:00 kaneshige.kenji@jp.fujitsu.com +4 -0
#   IRQ resource deallocation: ia64
# 
# include/asm-ia64/hw_irq.h
#   2005/01/04 18:48:18-08:00 kaneshige.kenji@jp.fujitsu.com +2 -0
#   IRQ resource deallocation: ia64
# 
# arch/ia64/pci/pci.c
#   2005/01/04 18:48:18-08:00 kaneshige.kenji@jp.fujitsu.com +8 -0
#   IRQ resource deallocation: ia64
# 
# arch/ia64/kernel/irq_ia64.c
#   2005/01/04 18:48:18-08:00 kaneshige.kenji@jp.fujitsu.com +23 -4
#   IRQ resource deallocation: ia64
# 
# arch/ia64/kernel/irq.c
#   2005/01/04 18:48:18-08:00 kaneshige.kenji@jp.fujitsu.com +3 -0
#   IRQ resource deallocation: ia64
# 
# arch/ia64/kernel/iosapic.c
#   2005/01/04 18:48:18-08:00 kaneshige.kenji@jp.fujitsu.com +87 -9
#   IRQ resource deallocation: ia64
# 
# arch/ia64/kernel/acpi.c
#   2005/01/04 18:48:18-08:00 kaneshige.kenji@jp.fujitsu.com +9 -0
#   IRQ resource deallocation: ia64
# 
# arch/ia64/Kconfig
#   2005/01/04 18:48:18-08:00 kaneshige.kenji@jp.fujitsu.com +5 -0
#   IRQ resource deallocation: ia64
# 
# ChangeSet
#   2005/01/04 21:34:25-08:00 kaneshige.kenji@jp.fujitsu.com 
#   [PATCH] IRQ resource deallocation: ACPI
#   
#   Architecture dependent IRQ resources such as interrupt vector for PCI
#   devices are allocated at pci_enable_device() time on i386, x86-64 and
#   ia64 platform. Today, however, these IRQ resources are never
#   deallocated even if they are no longer used. The following set of
#   patches adds supports to deallocate IRQ resources at
#   pci_disable_device() time.
#   
#   The motivation of the set of patches is as follows:
#   
#       - IRQ resources such as interrupt vectors should be freed if they
#         are no longer used because the amount of these resources are
#         limited. By deallocating IRQ resources, we can recycle them.
#   
#       - I think some hardwares will support hot-pluggable I/O units with
#         I/O xAPICs in the near future. So I/O xAPIC hot-plug support by
#         OS will be needed soon. IRQ resouces deallocation will be one of
#         the most important stuff for I/O xAPIC hot-plug.
#   
#   For now, the following set of patches has ia64 implementation only.
#   i386 and x86_64 implementations are TBD.
#   
#   
#   
#   
#   This patch is ACPI portion of IRQ deallocation. This patch defines the
#   following new interface. The implementation of this interface depends
#   on each platform.
#   
#       o void acpi_unregister_gsi(u32 gsi)
#   
#           This is a opposite portion of acpi_register_gsi(). This has a
#           responsibility for deallocating IRQ resources associated with
#           the specified GSI number.
#   
#           We need to consider the case of shared interrupt. In the case
#           of shared interrupt, acpi_register_gsi() is called multiple
#           times for one gsi. That is, registrations and unregistrations
#           can be nested.
#   
#           This function undoes the effect of one call to
#           acpi_register_gsi(). If this matches the last registration,
#           IRQ resources associated with the specified GSI number are
#           freed.
#   
#   This patch also adds the following new function.
#   
#       o void acpi_pci_irq_disable (struct pci_dev *dev)
#   
#           This function is a opposite portion of
#           acpi_pci_enable_irq(). It clears the device's linux IRQ number
#           and calls acpi_unregister_gsi() to deallocate IRQ resources.
#   
#   Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/acpi.h
#   2005/01/04 18:48:17-08:00 kaneshige.kenji@jp.fujitsu.com +13 -0
#   IRQ resource deallocation: ACPI
# 
# drivers/acpi/pci_irq.c
#   2005/01/04 18:48:17-08:00 kaneshige.kenji@jp.fujitsu.com +52 -0
#   IRQ resource deallocation: ACPI
# 
# ChangeSet
#   2005/01/04 21:34:13-08:00 manfred@colorfullife.com 
#   [PATCH] fix missing wakeup in ipc/sem
#   
#   My patch that removed the spin_lock calls from the tail of sys_semtimedop
#   introduced a bug:
#   
#   Before my patch was merged, every operation that altered an array called
#   update_queue.  That call woke up threads that were waiting until a
#   semaphore value becomes 0.  I've accidentially removed that call.
#   
#   The attached patch fixes that by modifying update_queue: the function now
#   loops internally and wakes up all threads.  The patch also removes
#   update_queue calls from the error path of sys_semtimedop: failed operations
#   do not modify the array, no need to rescan the list of waiting threads.
#   
#   Signed-Off-By: Manfred Spraul <manfred@colorfullife.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# ipc/sem.c
#   2005/01/04 18:48:17-08:00 manfred@colorfullife.com +21 -6
#   fix missing wakeup in ipc/sem
# 
# include/linux/sem.h
#   2005/01/04 18:48:17-08:00 manfred@colorfullife.com +1 -0
#   fix missing wakeup in ipc/sem
# 
# ChangeSet
#   2005/01/04 21:34:00-08:00 agruen@suse.de 
#   [PATCH] Ext[23]: apply umask to symlinks with ACLs configured out
#   
#   Keith Young <stripyd@stripydog.com> has reported that when ACLs are not
#   compiled in, the default implementation of ext[23]_init_acl applies the
#   umask to all new files, including symlinks, which is wrong.  In this case
#   the VFS already takes care of applying the umask when needed, so ext2 and
#   ext3 need not bother about it.  Remove the superfluous statements.
#   
#   Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/ext3/acl.h
#   2005/01/04 18:48:17-08:00 agruen@suse.de +0 -1
#   Ext[23]: apply umask to symlinks with ACLs configured out
# 
# fs/ext2/acl.h
#   2005/01/04 18:48:17-08:00 agruen@suse.de +0 -1
#   Ext[23]: apply umask to symlinks with ACLs configured out
# 
# ChangeSet
#   2005/01/04 21:33:47-08:00 akpm@osdl.org 
#   [PATCH] get_blkdev_list() cleanup
#   
#   - Move prototype to genhd.h
#   
#   - It is only needed for /proc
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/genhd.h
#   2005/01/04 18:48:17-08:00 akpm@osdl.org +1 -0
#   get_blkdev_list() cleanup
# 
# fs/proc/proc_misc.c
#   2005/01/04 18:48:17-08:00 akpm@osdl.org +0 -1
#   get_blkdev_list() cleanup
# 
# drivers/block/genhd.c
#   2005/01/04 18:48:17-08:00 akpm@osdl.org +2 -0
#   get_blkdev_list() cleanup
# 
# ChangeSet
#   2005/01/04 21:33:34-08:00 sfr@canb.auug.org.au 
#   [PATCH] noone uses HAVE_ARCH_SI_CODES or HAVE_ARCH_SIGEVENT_T
#   
#   Since asm-generic/siginfo.h was created, the architectures have been slowly
#   fixed/modified until noone uses HAVE_ARCH_SI_CODES or HAVE_ARCH_SIGEVENT_T
#   any more, so this patch removes the checks for them.
#   
#   Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-generic/siginfo.h
#   2005/01/04 18:48:17-08:00 sfr@canb.auug.org.au +0 -7
#   noone uses HAVE_ARCH_SI_CODES or HAVE_ARCH_SIGEVENT_T
# 
# ChangeSet
#   2005/01/04 21:33:21-08:00 franz_pletz@t-online.de 
#   [PATCH] loop device resursion avoidance
#   
#   With Andries Brouwer <Andries.Brouwer@cwi.nl>
#   
#   Fix various recursion scenarios wherein it was possible to mount a loop
#   device on itself, either directly or via intermediate loops devices.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/block/loop.c
#   2005/01/04 18:48:17-08:00 franz_pletz@t-online.de +28 -5
#   loop device resursion avoidance
# 
# ChangeSet
#   2005/01/04 21:33:09-08:00 penberg@cs.helsinki.fi 
#   [PATCH] noop iosched: remove unused includes
#   
#   This patch removes unused includes from drivers/block/noop-iosched.c.
#   
#   Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/block/noop-iosched.c
#   2005/01/04 18:48:17-08:00 penberg@cs.helsinki.fi +0 -7
#   noop iosched: remove unused includes
# 
# ChangeSet
#   2005/01/04 21:32:56-08:00 penberg@cs.helsinki.fi 
#   [PATCH] noop iosched: make code static
#   
#   This patch makes code static in drivers/block/noop-iosched.c and adds
#   __init and __exit for module initialization and cleanup functions.
#   
#   Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/block/noop-iosched.c
#   2005/01/04 20:24:25-08:00 penberg@cs.helsinki.fi +9 -9
#   noop iosched: make code static
# 
# ChangeSet
#   2005/01/04 21:32:43-08:00 rddunlap@osdl.org 
#   [PATCH] cpumask: range check before using value
#   
#   When setting the 'cpu_isolated_map' mask, check that the user input value
#   is valid (in range 0 ..  NR_CPUS - 1).  Also fix up kernel-parameters.txt
#   for this parameter.
#   
#   Signed-off-by: Randy Dunlap <rddunlap@osdl.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# kernel/sched.c
#   2005/01/04 20:24:19-08:00 rddunlap@osdl.org +3 -1
#   cpumask: range check before using value
# 
# Documentation/kernel-parameters.txt
#   2005/01/04 18:48:16-08:00 rddunlap@osdl.org +3 -1
#   cpumask: range check before using value
# 
# ChangeSet
#   2005/01/04 21:32:30-08:00 zwane@holomorphy.com 
#   [PATCH] fix alt-sysrq deadlock
#   
#   __handle_sysrq was modified to do a spin_lock_irqsave so we were entering
#   smp_send_stop with interrupts.  So reenable interrupts to prevent the
#   possible smp_call_function() deadlock.
#   
#   (It's still deadlocky if the sysrq handler is against called via an
#   interrupt from a different device, but that seems unlikely).
#   
#   Signed-off-by: Zwane Mwaikambo <zwane@holomorphy.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/char/sysrq.c
#   2005/01/04 18:48:16-08:00 zwane@holomorphy.com +1 -0
#   fix alt-sysrq deadlock
# 
# ChangeSet
#   2005/01/04 21:32:17-08:00 pmeda@akamai.com 
#   [PATCH] Add PR_GET_NAME
#   
#   A while back we added the PR_SET_NAME prctl, but no PR_GET_NAME.  I guess
#   we should add this, if only to enable testing of PR_SET_NAME.
#   
#   Signed-off-by: Prasanna Meda <pmeda@akamai.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# kernel/sys.c
#   2005/01/04 18:48:16-08:00 pmeda@akamai.com +9 -0
#   Add PR_GET_NAME
# 
# include/linux/prctl.h
#   2005/01/04 18:48:16-08:00 pmeda@akamai.com +1 -0
#   Add PR_GET_NAME
# 
# ChangeSet
#   2005/01/04 21:32:05-08:00 rddunlap@osdl.org 
#   [PATCH] panic_timeout: move to kernel.h
#   
#   Move 'panic_timeout' to linux/kernel.h.
#   
#   ipmi_watchdog.c wanted to know why panic_timeout isn't in some header file.
#    However, ipmi_watchdog.c doesn't even use it, so that reference was
#   deleted.  Other references now use kernel.h instead of straight extern int.
#   
#   Signed-off-by: Randy Dunlap <rddunlap@osdl.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# kernel/sysctl.c
#   2005/01/04 18:48:16-08:00 rddunlap@osdl.org +0 -1
#   panic_timeout: move to kernel.h
# 
# include/linux/kernel.h
#   2005/01/04 18:48:16-08:00 rddunlap@osdl.org +1 -0
#   panic_timeout: move to kernel.h
# 
# drivers/char/ipmi/ipmi_watchdog.c
#   2005/01/04 18:48:16-08:00 rddunlap@osdl.org +0 -2
#   panic_timeout: move to kernel.h
# 
# arch/v850/kernel/sim85e2.c
#   2005/01/04 18:48:16-08:00 rddunlap@osdl.org +0 -2
#   panic_timeout: move to kernel.h
# 
# arch/v850/kernel/fpga85e2c.c
#   2005/01/04 18:48:16-08:00 rddunlap@osdl.org +0 -1
#   panic_timeout: move to kernel.h
# 
# arch/ppc64/kernel/setup.c
#   2005/01/04 18:48:16-08:00 rddunlap@osdl.org +1 -1
#   panic_timeout: move to kernel.h
# 
# arch/ppc64/kernel/iSeries_pci.c
#   2005/01/04 18:48:16-08:00 rddunlap@osdl.org +0 -2
#   panic_timeout: move to kernel.h
# 
# arch/ppc/kernel/setup.c
#   2005/01/04 18:48:16-08:00 rddunlap@osdl.org +1 -1
#   panic_timeout: move to kernel.h
# 
# arch/mips/sibyte/swarm/setup.c
#   2005/01/04 18:48:16-08:00 rddunlap@osdl.org +1 -2
#   panic_timeout: move to kernel.h
# 
# arch/mips/jmr3927/rbhma3100/setup.c
#   2005/01/04 18:48:16-08:00 rddunlap@osdl.org +0 -1
#   panic_timeout: move to kernel.h
# 
# arch/mips/ddb5xxx/ddb5477/setup.c
#   2005/01/04 18:48:16-08:00 rddunlap@osdl.org +0 -2
#   panic_timeout: move to kernel.h
# 
# arch/mips/ddb5xxx/ddb5476/setup.c
#   2005/01/04 18:48:16-08:00 rddunlap@osdl.org +0 -2
#   panic_timeout: move to kernel.h
# 
# arch/mips/ddb5xxx/ddb5074/setup.c
#   2005/01/04 18:48:16-08:00 rddunlap@osdl.org +0 -2
#   panic_timeout: move to kernel.h
# 
# ChangeSet
#   2005/01/04 21:31:50-08:00 Matt_Domsch@dell.com 
#   [PATCH] EDD: add edd=off and edd=skipmbr options
#   
#   EDD: add edd=off and edd=skipmbr command line options
#      
#   New command line options
#   edd=off     (or edd=of)
#   edd=skipmbr (or edd=sk)
#   
#   runtime options for disabling all EDD int13 calls completely, or for
#   skipping the int13 READ SECTOR calls, respectively.
#   
#   These are provided to allow Linux distributions to include CONFIG_EDD=m, yet
#   allow end-users to disable parts of EDD which may not work well with their
#   system's BIOS.
#   
#   I incorporated comments from Randy Dunlap, and got an ack from Andi Kleen.
#   
#   Signed-off-by: Matt Domsch <Matt_Domsch@dell.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/edd.h
#   2005/01/04 18:48:16-08:00 Matt_Domsch@dell.com +4 -0
#   EDD: add edd=off and edd=skipmbr options
# 
# arch/i386/boot/edd.S
#   2005/01/04 18:48:16-08:00 Matt_Domsch@dell.com +40 -2
#   EDD: add edd=off and edd=skipmbr options
# 
# Documentation/kernel-parameters.txt
#   2005/01/04 20:24:26-08:00 Matt_Domsch@dell.com +5 -0
#   EDD: add edd=off and edd=skipmbr options
# 
# ChangeSet
#   2005/01/04 21:31:38-08:00 jamagallon@able.es 
#   [PATCH] make gconfig work with gtk-2.4
#   
#   I need this to make gconfig work under gtk-2.4.  Without this, it just
#   coredumps.  There is some problem with pixmap creation/usage from XPM in
#   the way it is done in gconf, so I just added some stock icons.  It is even
#   prettier..;)
#   
#   Could someone test this still works on gtk-2.0 or 2.2 ?
#   
#   Changes:
#   
#   - change the wiget class 'button' in glade files to something known to
#     glade (GtkToolButton)
#   - use 'stock-id' property for toolbar buttons instead of "stock_pixmap"
#   - change unknown signal "pressed" to "clicked"
#   - remove manual setting of icons in gconf.c
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# scripts/kconfig/gconf.glade
#   2005/01/04 18:48:16-08:00 jamagallon@able.es +21 -19
#   make gconfig work with gtk-2.4
# 
# scripts/kconfig/gconf.c
#   2005/01/04 18:48:16-08:00 jamagallon@able.es +0 -32
#   make gconfig work with gtk-2.4
# 
# ChangeSet
#   2005/01/04 21:31:25-08:00 rusty@rustcorp.com.au 
#   [PATCH] sys_sched_setaffinity() on UP should fail for non-zero CPUs.
#   
#   Return EINVAL for invalid sched_setaffinity on UP.  I was a little
#   surprised that sys_sched_setaffinity for CPU 1 didn't fail on my UP box.
#   With CONFIG_SMP it would have.
#   
#   Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/sched.h
#   2005/01/04 20:24:20-08:00 rusty@rustcorp.com.au +3 -0
#   sys_sched_setaffinity() on UP should fail for non-zero CPUs.
# 
# ChangeSet
#   2005/01/04 21:31:12-08:00 tvrtko.ursulin@sophos.com 
#   [PATCH] smb_file_open() retval fix
#   
#   Correctly propagate the return value from smb_open(). 
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/smbfs/file.c
#   2005/01/04 18:48:15-08:00 tvrtko.ursulin@sophos.com +1 -1
#   smb_file_open() retval fix
# 
# ChangeSet
#   2005/01/04 21:31:02-08:00 manfred@colorfullife.com 
#   [PATCH] rcu: simplify quiescent state detection
#   
#   Based on an initial patch from Oleg Nesterov <oleg@tv-sign.ru>
#   
#   rcu_data.last_qsctr is not needed.  Actually, not even a counter is needed,
#   just a flag that indicates that there was a quiescent state.
#   
#   Signed-Off-By: Manfred Spraul <manfred@colorfullife.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# kernel/rcupdate.c
#   2005/01/04 18:48:15-08:00 manfred@colorfullife.com +5 -6
#   rcu: simplify quiescent state detection
# 
# include/linux/rcupdate.h
#   2005/01/04 18:48:15-08:00 manfred@colorfullife.com +7 -6
#   rcu: simplify quiescent state detection
# 
# ChangeSet
#   2005/01/04 21:30:48-08:00 manfred@colorfullife.com 
#   [PATCH] rcu: make two internal structs static
#   
#   The patch below makes two needlessly global structs static.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Manfred Spraul <manfred@colorfullife.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# kernel/rcupdate.c
#   2005/01/04 20:24:27-08:00 manfred@colorfullife.com +2 -2
#   rcu: make two internal structs static
# 
# ChangeSet
#   2005/01/04 21:30:36-08:00 oleg@tv-sign.ru 
#   [PATCH] rcu: eliminate rcu_ctrlblk.lock
#   
#   rcu_ctrlblk.lock is used to read the ->cur and ->next_pending
#   atomically in __rcu_process_callbacks(). It can be replaced
#   by a couple of memory barriers.
#   
#   rcu_start_batch:
#   	rcp->next_pending = 0;
#   	smp_wmb();
#   	rcp->cur++;
#   
#   __rcu_process_callbacks:
#   	rdp->batch = rcp->cur + 1;
#   	smp_rmb();
#   	if (!rcp->next_pending)
#   		rcu_start_batch(rcp, rsp, 1);
#   
#   This way, if __rcu_process_callbacks() sees incremented ->cur value,
#   it must also see that ->next_pending == 0 (or rcu_start_batch() is
#   already in progress on another cpu).
#   
#   Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# kernel/rcupdate.c
#   2005/01/04 20:24:27-08:00 oleg@tv-sign.ru +15 -13
#   rcu: eliminate rcu_ctrlblk.lock
# 
# include/linux/rcupdate.h
#   2005/01/04 20:24:27-08:00 oleg@tv-sign.ru +0 -1
#   rcu: eliminate rcu_ctrlblk.lock
# 
# ChangeSet
#   2005/01/04 21:30:23-08:00 bunk@stusta.de 
#   [PATCH] remove ip2 programs
#   
#   drivers/char/ip2/ contained three programs. Besides shipping programs at
#   this place doesn't sound like a good idea, they didn't even all compile.
#   
#   The patch below removes them.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# BitKeeper/deleted/.del-ip2trace.c~6156ba3af01310d9
#   2005/01/04 21:30:15-08:00 bunk@stusta.de +0 -0
#   Delete: drivers/char/ip2/ip2trace.c
# 
# BitKeeper/deleted/.del-ip2stat.c~11d3f1fb72bca2c
#   2005/01/04 21:30:15-08:00 bunk@stusta.de +0 -0
#   Delete: drivers/char/ip2/ip2stat.c
# 
# BitKeeper/deleted/.del-ip2mkdev.c~6ae07a714e53a9bf
#   2005/01/04 21:30:15-08:00 bunk@stusta.de +0 -0
#   Delete: drivers/char/ip2/ip2mkdev.c
# 
# BitKeeper/deleted/.del-Makefile~f7a579dfc5bdb816
#   2005/01/04 21:30:15-08:00 bunk@stusta.de +0 -0
#   Delete: drivers/char/ip2/Makefile
# 
# ChangeSet
#   2005/01/04 21:30:08-08:00 ak@suse.de 
#   [PATCH] Sync in core time granuality with filesystems
#   
#   This patch corrects a problem that was originally added with the nanosecond
#   timestamps in stat patch.  The problem is that some file systems don't have
#   enough space in their on disk inode to save nanosecond timestamps, so they
#   truncate the c/a/mtime to seconds when flushing an dirty node.  In core the
#   inode would have full jiffies granuality.
#   
#   This can be observed by programs as a timestamp that jumps backwards under
#   specific loads when an inode is flushed and then reloaded from disk.
#   
#   The problem was already known when the original patch went in, but it
#   wasn't deemed important enough at that time.  So far there has been only
#   one report of it causing problems.  Now Tridge is worried that it will
#   break running Excel over samba4 because Excel seems to do very anal
#   timestamp checking and samba4 will supply 100ns timestamps over the
#   network.
#   
#   This patch solves it by putting the time resolution into the superblock of
#   a fs and always rounding the in core timestamps to that granuality.
#   
#   This also supercedes some previous ext2/3 hacks to flush the inode less
#   often when only the subsecond timestamp changes.
#   
#   I tried to keep the overhead low, in particular it tries to keep divisions
#   out of fast paths as far as possible.
#   
#   The patch is quite big but 99% of it is just relatively straight forward
#   search'n'replace in a lot of fs.  Unconverted filesystems will default to a
#   1ns granuality, but may still show the problem if they continue to use
#   CURRENT_TIME.  I converted all in tree fs.
#   
#   One possible future extension of this would be to have two time
#   granualities per superblock - one that specifies the visible resolution,
#   and the other to specify how often timestamps should be flushed to disk,
#   which could be tuned with a mount option per fs (e.g.  often m/atimes don't
#   need to be flushed every second).  Would be easy to do as an addon if
#   someone is interested.
#   
#   Signed-off-by: Andi Kleen <ak@suse.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# net/sunrpc/rpc_pipe.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +1 -0
#   Sync in core time granuality with filesystems
# 
# kernel/time.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +46 -1
#   Sync in core time granuality with filesystems
# 
# include/linux/time.h
#   2005/01/04 18:48:14-08:00 ak@suse.de +3 -0
#   Sync in core time granuality with filesystems
# 
# include/linux/fs.h
#   2005/01/04 20:24:07-08:00 ak@suse.de +6 -2
#   Sync in core time granuality with filesystems
# 
# fs/xfs/linux-2.6/xfs_super.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +1 -0
#   Sync in core time granuality with filesystems
# 
# fs/vfat/namei.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +10 -9
#   Sync in core time granuality with filesystems
# 
# fs/umsdos/emd.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +1 -1
#   Sync in core time granuality with filesystems
# 
# fs/ufs/truncate.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +1 -1
#   Sync in core time granuality with filesystems
# 
# fs/ufs/namei.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +2 -2
#   Sync in core time granuality with filesystems
# 
# fs/ufs/inode.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +2 -2
#   Sync in core time granuality with filesystems
# 
# fs/ufs/ialloc.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +1 -1
#   Sync in core time granuality with filesystems
# 
# fs/ufs/dir.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +2 -2
#   Sync in core time granuality with filesystems
# 
# fs/udf/super.c
#   2005/01/04 20:24:23-08:00 ak@suse.de +1 -0
#   Sync in core time granuality with filesystems
# 
# fs/udf/namei.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +6 -6
#   Sync in core time granuality with filesystems
# 
# fs/udf/inode.c
#   2005/01/04 20:24:23-08:00 ak@suse.de +2 -2
#   Sync in core time granuality with filesystems
# 
# fs/udf/ialloc.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +1 -1
#   Sync in core time granuality with filesystems
# 
# fs/sysv/namei.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +2 -2
#   Sync in core time granuality with filesystems
# 
# fs/sysv/itree.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +2 -2
#   Sync in core time granuality with filesystems
# 
# fs/sysv/ialloc.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +1 -1
#   Sync in core time granuality with filesystems
# 
# fs/sysv/dir.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +3 -3
#   Sync in core time granuality with filesystems
# 
# fs/sysfs/mount.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +1 -0
#   Sync in core time granuality with filesystems
# 
# fs/super.c
#   2005/01/04 20:24:07-08:00 ak@suse.de +1 -0
#   Sync in core time granuality with filesystems
# 
# fs/smbfs/proto.h
#   2005/01/04 18:48:14-08:00 ak@suse.de +2 -1
#   Sync in core time granuality with filesystems
# 
# fs/smbfs/proc.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +3 -2
#   Sync in core time granuality with filesystems
# 
# fs/smbfs/inode.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +2 -1
#   Sync in core time granuality with filesystems
# 
# fs/smbfs/file.c
#   2005/01/04 20:24:27-08:00 ak@suse.de +3 -2
#   Sync in core time granuality with filesystems
# 
# fs/reiserfs/xattr.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +3 -3
#   Sync in core time granuality with filesystems
# 
# fs/reiserfs/stree.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +2 -2
#   Sync in core time granuality with filesystems
# 
# fs/reiserfs/namei.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +6 -6
#   Sync in core time granuality with filesystems
# 
# fs/reiserfs/ioctl.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +2 -2
#   Sync in core time granuality with filesystems
# 
# fs/reiserfs/inode.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +2 -1
#   Sync in core time granuality with filesystems
# 
# fs/ramfs/inode.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +1 -0
#   Sync in core time granuality with filesystems
# 
# fs/qnx4/truncate.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +1 -1
#   Sync in core time granuality with filesystems
# 
# fs/qnx4/namei.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +2 -2
#   Sync in core time granuality with filesystems
# 
# fs/qnx4/inode.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +1 -1
#   Sync in core time granuality with filesystems
# 
# fs/proc/inode.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +1 -0
#   Sync in core time granuality with filesystems
# 
# fs/openpromfs/inode.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +1 -0
#   Sync in core time granuality with filesystems
# 
# fs/ntfs/super.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +2 -0
#   Sync in core time granuality with filesystems
# 
# fs/ntfs/mft.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +2 -1
#   Sync in core time granuality with filesystems
# 
# fs/nfs/inode.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +3 -0
#   Sync in core time granuality with filesystems
# 
# fs/msdos/namei.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +8 -8
#   Sync in core time granuality with filesystems
# 
# fs/minix/namei.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +2 -2
#   Sync in core time granuality with filesystems
# 
# fs/minix/itree_common.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +2 -2
#   Sync in core time granuality with filesystems
# 
# fs/minix/dir.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +3 -3
#   Sync in core time granuality with filesystems
# 
# fs/minix/bitmap.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +1 -1
#   Sync in core time granuality with filesystems
# 
# fs/locks.c
#   2005/01/04 20:24:11-08:00 ak@suse.de +1 -1
#   Sync in core time granuality with filesystems
# 
# fs/libfs.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +2 -0
#   Sync in core time granuality with filesystems
# 
# fs/jfs/super.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +1 -1
#   Sync in core time granuality with filesystems
# 
# fs/jfs/namei.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +1 -1
#   Sync in core time granuality with filesystems
# 
# fs/jffs2/fs.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +1 -1
#   Sync in core time granuality with filesystems
# 
# fs/jffs/inode-v23.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +4 -4
#   Sync in core time granuality with filesystems
# 
# fs/inode.c
#   2005/01/04 20:24:21-08:00 ak@suse.de +5 -19
#   Sync in core time granuality with filesystems
# 
# fs/hugetlbfs/inode.c
#   2005/01/04 20:24:07-08:00 ak@suse.de +1 -0
#   Sync in core time granuality with filesystems
# 
# fs/hpfs/file.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +1 -1
#   Sync in core time granuality with filesystems
# 
# fs/hfsplus/ioctl.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +1 -1
#   Sync in core time granuality with filesystems
# 
# fs/hfsplus/inode.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +1 -1
#   Sync in core time granuality with filesystems
# 
# fs/hfsplus/dir.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +3 -3
#   Sync in core time granuality with filesystems
# 
# fs/hfsplus/catalog.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +4 -4
#   Sync in core time granuality with filesystems
# 
# fs/hfs/inode.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +1 -1
#   Sync in core time granuality with filesystems
# 
# fs/hfs/dir.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +2 -2
#   Sync in core time granuality with filesystems
# 
# fs/hfs/catalog.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +4 -4
#   Sync in core time granuality with filesystems
# 
# fs/fat/file.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +2 -2
#   Sync in core time granuality with filesystems
# 
# fs/fat/dir.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +1 -1
#   Sync in core time granuality with filesystems
# 
# fs/ext3/xattr.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +1 -1
#   Sync in core time granuality with filesystems
# 
# fs/ext3/super.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +0 -1
#   Sync in core time granuality with filesystems
# 
# fs/ext3/namei.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +7 -7
#   Sync in core time granuality with filesystems
# 
# fs/ext3/ioctl.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +2 -2
#   Sync in core time granuality with filesystems
# 
# fs/ext3/inode.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +2 -2
#   Sync in core time granuality with filesystems
# 
# fs/ext3/ialloc.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +1 -1
#   Sync in core time granuality with filesystems
# 
# fs/ext2/xattr.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +1 -1
#   Sync in core time granuality with filesystems
# 
# fs/ext2/super.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +0 -1
#   Sync in core time granuality with filesystems
# 
# fs/ext2/namei.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +3 -3
#   Sync in core time granuality with filesystems
# 
# fs/ext2/ioctl.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +2 -2
#   Sync in core time granuality with filesystems
# 
# fs/ext2/inode.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +2 -2
#   Sync in core time granuality with filesystems
# 
# fs/ext2/ialloc.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +1 -1
#   Sync in core time granuality with filesystems
# 
# fs/ext2/dir.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +3 -3
#   Sync in core time granuality with filesystems
# 
# fs/devpts/inode.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +1 -0
#   Sync in core time granuality with filesystems
# 
# fs/devfs/base.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +1 -0
#   Sync in core time granuality with filesystems
# 
# fs/coda/inode.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +1 -1
#   Sync in core time granuality with filesystems
# 
# fs/coda/file.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +1 -1
#   Sync in core time granuality with filesystems
# 
# fs/coda/dir.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +1 -1
#   Sync in core time granuality with filesystems
# 
# fs/cifs/inode.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +2 -2
#   Sync in core time granuality with filesystems
# 
# fs/cifs/file.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +6 -4
#   Sync in core time granuality with filesystems
# 
# fs/cifs/connect.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +2 -0
#   Sync in core time granuality with filesystems
# 
# fs/binfmt_misc.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +2 -1
#   Sync in core time granuality with filesystems
# 
# fs/bfs/inode.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +1 -1
#   Sync in core time granuality with filesystems
# 
# fs/bfs/dir.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +7 -7
#   Sync in core time granuality with filesystems
# 
# fs/bad_inode.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +2 -1
#   Sync in core time granuality with filesystems
# 
# fs/autofs4/inode.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +1 -0
#   Sync in core time granuality with filesystems
# 
# fs/autofs/inode.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +1 -0
#   Sync in core time granuality with filesystems
# 
# fs/attr.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +8 -4
#   Sync in core time granuality with filesystems
# 
# fs/affs/inode.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +1 -1
#   Sync in core time granuality with filesystems
# 
# fs/affs/file.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +1 -1
#   Sync in core time granuality with filesystems
# 
# fs/affs/amigaffs.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +3 -3
#   Sync in core time granuality with filesystems
# 
# fs/adfs/inode.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +1 -1
#   Sync in core time granuality with filesystems
# 
# drivers/usb/gadget/inode.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +1 -0
#   Sync in core time granuality with filesystems
# 
# drivers/usb/core/inode.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +1 -0
#   Sync in core time granuality with filesystems
# 
# drivers/oprofile/oprofilefs.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +1 -0
#   Sync in core time granuality with filesystems
# 
# drivers/misc/ibmasm/ibmasmfs.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +1 -0
#   Sync in core time granuality with filesystems
# 
# drivers/isdn/capi/capifs.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +1 -0
#   Sync in core time granuality with filesystems
# 
# drivers/char/tty_io.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +3 -2
#   Sync in core time granuality with filesystems
# 
# drivers/char/sonypi.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +4 -2
#   Sync in core time granuality with filesystems
# 
# drivers/char/random.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +3 -2
#   Sync in core time granuality with filesystems
# 
# drivers/char/qtronix.c
#   2005/01/04 18:48:14-08:00 ak@suse.de +2 -1
#   Sync in core time granuality with filesystems
# 
# ChangeSet
#   2005/01/04 21:29:47-08:00 schwidefsky@de.ibm.com 
#   [PATCH] sys_stime needs a compat function
#   
#   I realized that the best way to get the sys_time/sys_stime problem fixed is
#   to make sys_time 64 bit safe by using "time_t *" instead of "int *" and to
#   introduce two proper compat functions compat_sys_time and compat_sys_stime.
#   
#   The prototype change of sys_time is transparent for 32 bit architectures
#   because both "int" and "time_t" are 32 bit.  For 64 bit the type change
#   would be wrong but luckily no 64 bit architecture uses sys_time/sys_stime
#   in 64 bit mode.  The patch makes the following change:
#   
#   ia64     : Remove sys32_time, use compat_sys_time and
#              add (!!) compat_sys_stime to compat syscall table.
#   mips     : Use compat_sys_time/compat_sys_stime in 32 bit syscall table.
#              Add #ifdef magic to compile sys_time/sys_stime and
#              compat_sys_time/compat_sys_stime only if needed.
#   parisc   : Remove sys32_time, use compat_sys_time and compat_sys_stime.
#   ppc64    : remove sys32_time, ppc64_sys32_stime and ppc64_sys_stime.
#              Use common compat_sys_time, compat_sys_stime and sys_stime.
#   s390     : Use compat_sys_stime. Add #ifdef magic to compile
#              sys_time/sys_stime and compat_sys_time/compat_sys_stime only
#              if needed.
#   sparc64  : Use compat_sys_time/compat_Sys_stime in 32 bit syscall table.
#   um       : Remove um_time and um_stime. Use common functions sys_time and
#              sys_stime. This adds a CAP_SYS_TIME check to UMs stime call.
#   x86_64   : Remove sys32_time. Use compat_sys_time and compat_sys_stime
#              in 32 bit syscall table.
#   
#   The original stime bug is fixed for mips, parisc, s390, sparc64 and
#   x86_64. Can the arch-maintainers please take a look at this?
#   
#   From: Martin Schwidefsky <schwidefsky@de.ibm.com>
#   
#   Convert compat_time_t to time_t in 32 bit emulation for sys_stime and
#   consolidate all the different implementation of sys_time, sys_stime and
#   their 32-bit emulation parts.
#   
#   Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# kernel/time.c
#   2005/01/04 20:24:30-08:00 schwidefsky@de.ibm.com +2 -4
#   sys_stime needs a compat function
# 
# kernel/compat.c
#   2005/01/04 20:24:22-08:00 schwidefsky@de.ibm.com +40 -0
#   sys_stime needs a compat function
# 
# include/linux/syscalls.h
#   2005/01/04 18:48:14-08:00 schwidefsky@de.ibm.com +1 -1
#   sys_stime needs a compat function
# 
# include/asm-x86_64/unistd.h
#   2005/01/04 18:48:14-08:00 schwidefsky@de.ibm.com +1 -1
#   sys_stime needs a compat function
# 
# include/asm-sparc64/unistd.h
#   2005/01/04 18:48:14-08:00 schwidefsky@de.ibm.com +1 -0
#   sys_stime needs a compat function
# 
# include/asm-s390/unistd.h
#   2005/01/04 18:48:14-08:00 schwidefsky@de.ibm.com +3 -2
#   sys_stime needs a compat function
# 
# include/asm-ppc64/unistd.h
#   2005/01/04 18:48:14-08:00 schwidefsky@de.ibm.com +1 -0
#   sys_stime needs a compat function
# 
# include/asm-parisc/unistd.h
#   2005/01/04 18:48:14-08:00 schwidefsky@de.ibm.com +1 -0
#   sys_stime needs a compat function
# 
# include/asm-mips/unistd.h
#   2005/01/04 18:48:14-08:00 schwidefsky@de.ibm.com +6 -1
#   sys_stime needs a compat function
# 
# include/asm-ia64/unistd.h
#   2005/01/04 18:48:14-08:00 schwidefsky@de.ibm.com +1 -0
#   sys_stime needs a compat function
# 
# arch/x86_64/ia32/sys_ia32.c
#   2005/01/04 20:24:22-08:00 schwidefsky@de.ibm.com +0 -20
#   sys_stime needs a compat function
# 
# arch/x86_64/ia32/ia32entry.S
#   2005/01/04 20:24:22-08:00 schwidefsky@de.ibm.com +2 -2
#   sys_stime needs a compat function
# 
# arch/sparc64/kernel/systbls.S
#   2005/01/04 20:24:22-08:00 schwidefsky@de.ibm.com +2 -2
#   sys_stime needs a compat function
# 
# arch/s390/kernel/compat_wrapper.S
#   2005/01/04 20:24:22-08:00 schwidefsky@de.ibm.com +3 -3
#   sys_stime needs a compat function
# 
# arch/ppc64/kernel/time.c
#   2005/01/04 18:48:14-08:00 schwidefsky@de.ibm.com +0 -54
#   sys_stime needs a compat function
# 
# arch/ppc64/kernel/sys_ppc32.c
#   2005/01/04 18:48:14-08:00 schwidefsky@de.ibm.com +0 -17
#   sys_stime needs a compat function
# 
# arch/ppc64/kernel/misc.S
#   2005/01/04 20:24:22-08:00 schwidefsky@de.ibm.com +3 -3
#   sys_stime needs a compat function
# 
# arch/parisc/kernel/syscall_table.S
#   2005/01/04 18:48:14-08:00 schwidefsky@de.ibm.com +2 -2
#   sys_stime needs a compat function
# 
# arch/parisc/kernel/sys_parisc32.c
#   2005/01/04 18:48:14-08:00 schwidefsky@de.ibm.com +0 -15
#   sys_stime needs a compat function
# 
# arch/mips/kernel/scall64-o32.S
#   2005/01/04 20:24:22-08:00 schwidefsky@de.ibm.com +2 -2
#   sys_stime needs a compat function
# 
# arch/ia64/ia32/sys_ia32.c
#   2005/01/04 20:24:22-08:00 schwidefsky@de.ibm.com +0 -21
#   sys_stime needs a compat function
# 
# arch/ia64/ia32/ia32_entry.S
#   2005/01/04 20:24:22-08:00 schwidefsky@de.ibm.com +2 -2
#   sys_stime needs a compat function
# 
# ChangeSet
#   2005/01/04 21:29:33-08:00 bunk@stusta.de 
#   [PATCH] compile with -ffreestanding
#   
#   For the kernel, it would be logical to use -ffreestanding.  The kernel is
#   not a hosted environment with a standard C library.
#   
#   The gcc option -ffreestanding is supported by both gcc 2.95 and 3.4, which
#   covers the whole range of currently supported compilers.
#   
#   Regarding changes caused by this patch:
#   
#   Andi Kleen reported:
#     Newer gcc rewrites sprintf(buf,"%s",str) to strcpy(buf,str) transparently.
#   
#   This is only true with unit-at-a-time (disabled on i386 but enabled on
#   x86_64).  The Linux kernel doesn't offer a standard C library, and such
#   transparent replacements of kernel functions with builtins are quite
#   fragile.
#   
#   Even with -ffreestanding, it's still possilble to explicitely use a gcc
#   builtin if desired.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# Makefile
#   2005/01/04 18:48:13-08:00 bunk@stusta.de +2 -1
#   compile with -ffreestanding
# 
# ChangeSet
#   2005/01/04 21:29:20-08:00 alexn@dsv.su.se 
#   [PATCH] Off by one in drivers/parport/probe.c
#   
#   This fixes a theoretical bug indicated in:
#   http://bugme.osdl.org/show_bug.cgi?id=240
#   
#   It prevents overflow in case the required buffer is larger than the passed
#   buffer.  This I found to be the minimally intrusive change.
#   
#   Signed-off-by: Alexander Nyberg <alexn@dsv.su.se>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/parport/probe.c
#   2005/01/04 18:48:13-08:00 alexn@dsv.su.se +11 -2
#   Off by one in drivers/parport/probe.c
# 
# ChangeSet
#   2005/01/04 21:29:07-08:00 alex@clusterfs.com 
#   [PATCH] ext3: support for EA in inode
#   
#   1) intent of the patch is to get possibility to store EAs in the body of large
#      inode. it saves space and improves performance in some cases
#   
#   2) the patch is quite simple: it works the same way original xattr does, but
#      using other storage (inode body). body has priority over separate block.
#      original routines (ext3_xattr_get, ext3_xattr_list, ext3_xattr_set) are
#      renamed to ext3_xattr_block_*. new routines that handle inode storate are
#      added (ext3_xattr_ibody_get, ext3_xattr_ibody_list, ext3_xattr_ibody_set).
#      routines ext3_xattr_get, ext3_xattr_list and ext3_xattr_set allow user to
#      accesss both the storages transparently
#   
#   3) the change makes sense on filesystem with inode size >= 256 bytes only.
#      2.4 kernels don't support such a filesystems, AFAIK. 2.6 kernels do support
#      and ignore EAs stored in a body w/o the patch
#   
#   4) debugfs and e2fsck need to be patched to deal with EAs in inode
#      the patch will be sent later
#   
#   5) testing results:
#   	a) Andrew Samba Master (tridge) has done successful tests
#   	b) we've been using ea-in-inode feature in Lustre for many months
#   
#   Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
#   Signed-off-by: Alex Tomas <alex@clusterfs.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/ext3_fs_i.h
#   2005/01/04 18:48:13-08:00 alex@clusterfs.com +3 -0
#   ext3: support for EA in inode
# 
# include/linux/ext3_fs.h
#   2005/01/04 20:24:22-08:00 alex@clusterfs.com +3 -0
#   ext3: support for EA in inode
# 
# fs/ext3/xattr.h
#   2005/01/04 18:48:13-08:00 alex@clusterfs.com +2 -1
#   ext3: support for EA in inode
# 
# fs/ext3/xattr.c
#   2005/01/04 20:24:30-08:00 alex@clusterfs.com +603 -36
#   ext3: support for EA in inode
# 
# fs/ext3/inode.c
#   2005/01/04 20:24:30-08:00 alex@clusterfs.com +9 -1
#   ext3: support for EA in inode
# 
# fs/ext3/ialloc.c
#   2005/01/04 20:24:30-08:00 alex@clusterfs.com +5 -0
#   ext3: support for EA in inode
# 
# ChangeSet
#   2005/01/04 21:28:54-08:00 akpm@osdl.org 
#   [PATCH] Reduce i_sem usage during file sync operations
#   
#   We hold i_sem during the various sync() operations to prevent livelocks:
#   if another thread is dirtying the file, a sync() may never return.
#   
#   Or at least, that used to be true when we were using the per-address_space
#   page lists.  Since writeback has used radix tree traversal it is not possible
#   to livelock the sync() operations, because they only visit each page a single
#   time.
#   
#   sync_page_range() (used by O_SYNC writes) has not been holding i_sem for quite
#   some time, for the above reasons.
#   
#   The patch converts fsync(), fdatasync() and msync() to also not hold i_sem
#   during the radix-tree-based writeback.
#   
#   Now, we _do_ still need to hold i_sem across the file->f_op->fsync() call,
#   because that is still based on a list_head walk, and is still livelockable.
#   
#   But in the case of msync() I deliberately left i_sem untaken.  This is because
#   we're currently deadlockable in msync, because mmap_sem is already held, and
#   mmap_sem nexts inside i_sem, due to direct-io.c.
#   
#   And yes, the ranking of down_read() veruss down() does matter:
#   
#   	Task A			Task B		Task C
#   
#   	down_read(rwsem)
#   				down(sem)
#   						down_write(rwsem)
#   	down(sem)
#   				down_read(rwsem)
#   
#   
#   C's down_write() will cause B's down_read to block.  B holds `sem', so A will
#   never release `rwsem'.
#   
#   So the patch fixes a hard-to-hit triple-task deadlock, but adds a possible
#   livelock in msync().  It is possible to fix sys_msync() so that it takes i_sem
#   outside i_mmap_sem.  Later.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# mm/msync.c
#   2005/01/04 20:24:22-08:00 akpm@osdl.org +4 -2
#   Reduce i_sem usage during file sync operations
# 
# fs/buffer.c
#   2005/01/04 20:24:24-08:00 akpm@osdl.org +9 -5
#   Reduce i_sem usage during file sync operations
# 
# ChangeSet
#   2005/01/04 21:28:41-08:00 akpm@osdl.org 
#   [PATCH] suppress might_sleep() if oopsing
#   
#   We can call might_sleep() functions on the oops handling path (under do_exit).
#   
#   There seem little point in emitting spurious might_sleep() warnings into the
#   logs after the kernel has oopsed.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# kernel/sched.c
#   2005/01/04 20:24:26-08:00 akpm@osdl.org +1 -1
#   suppress might_sleep() if oopsing
# 
# ChangeSet
#   2005/01/04 21:28:28-08:00 pmeda@akamai.com 
#   [PATCH] fork: total_forks not counted under tasklist_lock
#   
#   Bring the total_forks under tasklist_lock.  When most of the fork code
#   icluding nr_threads is moved to copy_process() from do_fork() code in 2.6,
#   this is left out.
#   
#   Althought accuracy of total_forks is not important, it would be nice to add
#   this.  It does not involve additional cost, and the code will be cleaner if
#   it is grouped with nr_threads.  The difference is, total_forks will
#   increase on fork, but nr_threads will increase on fork and decrease on the
#   exit.
#   
#   I also moved extern decleration to sched.h from proc_misc.c.
#   
#   Signed-off-by: Prasanna Meda <pmeda@akamai.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# kernel/fork.c
#   2005/01/04 20:24:20-08:00 pmeda@akamai.com +6 -6
#   fork: total_forks not counted under tasklist_lock
# 
# include/linux/sched.h
#   2005/01/04 20:24:27-08:00 pmeda@akamai.com +1 -0
#   fork: total_forks not counted under tasklist_lock
# 
# fs/proc/proc_misc.c
#   2005/01/04 20:24:25-08:00 pmeda@akamai.com +0 -1
#   fork: total_forks not counted under tasklist_lock
# 
# ChangeSet
#   2005/01/04 21:28:15-08:00 shaohua.li@intel.com 
#   [PATCH] time runx too fast after S3
#   
#   After resume from S3, 'date' shows time run too fast.
#   
#   Signed-off-by: Li Shaohua <shaohua.li@intel.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/i386/kernel/time.c
#   2005/01/04 18:48:13-08:00 shaohua.li@intel.com +3 -2
#   time runx too fast after S3
# 
# ChangeSet
#   2005/01/04 21:28:02-08:00 colpatch@us.ibm.com 
#   [PATCH] cpumask_t initializers
#   
#   In the course of another patch I've been working on, I stumbled across
#   some weirdness with some of the SD_*_INIT sched_domains initializers.  A
#   day or so of digging narrowed it down to the CPU_MASK_NONE initializer
#   nested inside the sched_domain initializers.  The errors I got were:
#   
#   kernel/sched.c:4812: error: initializer element is not constant
#   kernel/sched.c:4812: error: (near initialization for `sched_domain_dummy')
#   kernel/sched.c:4812: error: initializer element is not constant
#   
#   which was this line:
#   
#   static struct sched_domain sched_domain_dummy = SD_CPU_INIT;
#   
#   Janis Johnson, a GCC hacker, told me the following:
# 
# include/linux/cpumask.h
#   2005/01/04 18:48:12-08:00 colpatch@us.ibm.com +8 -8
#   cpumask_t initializers
# 
# ChangeSet
#   2005/01/04 21:27:49-08:00 sct@redhat.com 
#   [PATCH] ext3: handle attempted double-delete of metadata.
#   
#   This patch improves ext3's ability to deal with corruption on-disk.  If we
#   try to delete a metadata block twice, we confuse ext3's internal revoke
#   error-checking, resulting in a BUG().  But this can occur in practice due
#   to a corrupt indirect block, so we should attempt to fail gracefully.
#   
#   Downgrade the assert failure to a JH_EXPECT_BH failure, and return EIO when
#   it occurs.
#   
#   This is easily reproduced with a sample ext3 fs image containing an inode
#   which references the same indirect block more than once.  Deleting that
#   inode will BUG() an unfixed kernel with:
#   
#   Assertion failure in journal_revoke() at fs/jbd/revoke.c:379:
#   "!buffer_revoked(bh)"
#   
#   With the fix, ext3 recovers gracefully.
#   
#   Signed-off-by: Stephen Tweedie <sct@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/jbd/revoke.c
#   2005/01/04 18:48:12-08:00 sct@redhat.com +6 -1
#   ext3: handle attempted double-delete of metadata.
# 
# ChangeSet
#   2005/01/04 21:27:36-08:00 sct@redhat.com 
#   [PATCH] ext3: handle attempted delete of bitmap blocks.
#   
#   This patch improves ext3's ability to deal with corruption on-disk.  If we
#   ever get a corrupt inode or indirect block, then an attempt to delete it
#   can end up trying to remove any block on the fs, including bitmap blocks.
#   This can cause ext3 to assert-fail as we end up trying to do an ext3_forget
#   on a buffer with b_committed_data set.
#   
#   The fix is to downgrade this to an IO error and journal abort, so that we
#   take the filesystem readonly but don't bring down the whole kernel.
#   
#   Make J_EXPECT_JH() return a value so it can be easily tested and yet still
#   retained as an assert failure if we build ext3 with full internal debugging
#   enabled.  Make journal_forget() return an error code so that in this case
#   the error can be passed up to the caller.
#   
#   This is easily reproduced with a sample ext3 fs image containing an inode
#   whose direct and indirect blocks refer to a block bitmap block.  Allocating
#   new blocks and then deleting that inode will BUG() with:
#   
#   Assertion failure in journal_forget() at fs/jbd/transaction.c:1228:
#   "!jh->b_committed_data"
#   
#   With the fix, ext3 recovers gracefully.
#   
#   Signed-off-by: Stephen Tweedie <sct@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/jbd.h
#   2005/01/04 18:48:12-08:00 sct@redhat.com +7 -5
#   ext3: handle attempted delete of bitmap blocks.
# 
# include/linux/ext3_jbd.h
#   2005/01/04 18:48:12-08:00 sct@redhat.com +8 -3
#   ext3: handle attempted delete of bitmap blocks.
# 
# fs/jbd/transaction.c
#   2005/01/04 18:48:12-08:00 sct@redhat.com +12 -4
#   ext3: handle attempted delete of bitmap blocks.
# 
# fs/ext3/inode.c
#   2005/01/04 20:24:31-08:00 sct@redhat.com +1 -1
#   ext3: handle attempted delete of bitmap blocks.
# 
# ChangeSet
#   2005/01/04 21:27:23-08:00 sct@redhat.com 
#   [PATCH] ext3: cleanup handling of aborted transactions.
#   
#   This patch improves ext3's error logging when we encounter an on-disk
#   corruption.  Previously, a transaction (such as a truncate) which encountered
#   many corruptions (eg.  a single highly-corrupt indirect block) would emit
#   copious "aborting transaction" errors to the log.
#   
#   Even worse, encountering an aborted journal can count as such an error,
#   leading to a flood of spurious "aborting transaction: Journal has aborted"
#   errors.
#   
#   With the fix, only emit that message on the first error.  The patch also
#   restores a missing \n in that printk path.
#   
#   Signed-off-by: Stephen Tweedie <sct@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/ext3/super.c
#   2005/01/04 20:24:30-08:00 sct@redhat.com +9 -4
#   ext3: cleanup handling of aborted transactions.
# 
# ChangeSet
#   2005/01/04 21:27:10-08:00 bunk@stusta.de 
#   [PATCH] kill blk.h
#   
#   All blk.h users were converted in 2.5, and at the same time blk.h began 
#   giving a warning.
#   
#   The patch below removes this obsolete file.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# BitKeeper/deleted/.del-blk.h~82e746e9684702f1
#   2005/01/04 21:27:03-08:00 bunk@stusta.de +0 -0
#   Delete: include/linux/blk.h
# 
# ChangeSet
#   2005/01/04 21:26:58-08:00 minyard@acm.org 
#   [PATCH] Cleanups for the IPMI driver
#   
#   This patch removes some unneeded cruft that Adrian found, and also turns
#   off the shutdown of the timer when removing the module.  Since the timer is
#   shutdown when the driver is closed (unless no way out is specified) this is
#   unnecessary and defeats the no way out option.
#   
#   - remove some completely unused code
#   - make some needlessly global code static
#   - removal of some EXPORT_SYMBOL'ed code with zero users.
#   - Removal of the timer shutdown on module removal
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Corey Minyard <minyard@acm.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/ipmi.h
#   2005/01/04 18:48:12-08:00 minyard@acm.org +0 -63
#   Cleanups for the IPMI driver
# 
# drivers/char/ipmi/ipmi_watchdog.c
#   2005/01/04 20:24:26-08:00 minyard@acm.org +0 -21
#   Cleanups for the IPMI driver
# 
# drivers/char/ipmi/ipmi_si_intf.c
#   2005/01/04 18:48:12-08:00 minyard@acm.org +2 -2
#   Cleanups for the IPMI driver
# 
# drivers/char/ipmi/ipmi_poweroff.c
#   2005/01/04 18:48:12-08:00 minyard@acm.org +3 -3
#   Cleanups for the IPMI driver
# 
# drivers/char/ipmi/ipmi_msghandler.c
#   2005/01/04 18:48:12-08:00 minyard@acm.org +2 -97
#   Cleanups for the IPMI driver
# 
# ChangeSet
#   2005/01/04 21:26:45-08:00 holt@sgi.com 
#   [PATCH] Hold BKL for shorter period in generic_shutdown_super().
#   
#   Testing revealed long pauses of the entire system while autofs initiated
#   umounts as a result of timing out the mounts.
#   
#   It was noticed that during a umount, the BKL is held while scanning the
#   inode_list and removing and inodes that are candidates.  This patch moves
#   locking until after the first pass had gone through the inode_list.
#   
#   Testing revelead that on an ia64 machine with a filesystem that had 8.4
#   Million inodes, there were no observable pauses during the umount.  This
#   was down from over 4 seconds without this patch.
#   
#   Signed-Off-By: Robin Holt <holt@sgi.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/super.c
#   2005/01/04 20:24:30-08:00 holt@sgi.com +1 -1
#   Hold BKL for shorter period in generic_shutdown_super().
# 
# ChangeSet
#   2005/01/04 21:26:32-08:00 hch@lst.de 
#   [PATCH] remove unused irq_cpustat fields
#   
#   The only common field in irq_cpustat is __softirq_pending, i386 and ppc
#   have some of their own.
#   
#   Remove all unused obsolete fields from various architectures.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-v850/hardirq.h
#   2005/01/04 18:48:11-08:00 hch@lst.de +0 -2
#   remove unused irq_cpustat fields
# 
# include/asm-ppc64/hardirq.h
#   2005/01/04 18:48:11-08:00 hch@lst.de +0 -1
#   remove unused irq_cpustat fields
# 
# include/asm-parisc/hardirq.h
#   2005/01/04 18:48:11-08:00 hch@lst.de +0 -3
#   remove unused irq_cpustat fields
# 
# include/asm-m68knommu/hardirq.h
#   2005/01/04 18:48:11-08:00 hch@lst.de +0 -2
#   remove unused irq_cpustat fields
# 
# include/asm-m32r/hardirq.h
#   2005/01/04 18:48:11-08:00 hch@lst.de +0 -2
#   remove unused irq_cpustat fields
# 
# include/asm-h8300/hardirq.h
#   2005/01/04 18:48:11-08:00 hch@lst.de +0 -2
#   remove unused irq_cpustat fields
# 
# include/asm-cris/hardirq.h
#   2005/01/04 18:48:11-08:00 hch@lst.de +0 -4
#   remove unused irq_cpustat fields
# 
# include/asm-arm26/hardirq.h
#   2005/01/04 18:48:11-08:00 hch@lst.de +0 -4
#   remove unused irq_cpustat fields
# 
# include/asm-alpha/hardirq.h
#   2005/01/04 18:48:11-08:00 hch@lst.de +0 -3
#   remove unused irq_cpustat fields
# 
# ChangeSet
#   2005/01/04 21:26:18-08:00 hch@lst.de 
#   [PATCH] move irq_enter and irq_exit to common code
#   
#   This code is the same for all architectures with the following invariants:
#   
#   - arm gurantees irqs are disabled when calling irq_exit so it can call
#     __do_softirq directly instead of do_softirq
#   
#   - arm26 is totally broken for about half a year, I didn't care for it
#   
#   - some architectures use softirq_pending(smp_processor_id()) instead of
#     local_softirq_pending, but they always evaluate to the same
#   
#   This patch moves the out of line irq_exit implementation from
#   kernel/irq/handle.c which depends on CONFIG_GENERIC_HARDIRQS to
#   kernel/softirq.c which is always compiled, tweaks it for the arm special
#   case and moves the irq_enter/irq_exit/nmi_enter/nmi_exit bits from
#   asm-*/hardirq.h to linux/hardirq.h
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# kernel/softirq.c
#   2005/01/04 18:48:11-08:00 hch@lst.de +17 -0
#   move irq_enter and irq_exit to common code
# 
# kernel/irq/handle.c
#   2005/01/04 18:48:11-08:00 hch@lst.de +0 -11
#   move irq_enter and irq_exit to common code
# 
# include/linux/hardirq.h
#   2005/01/04 18:48:11-08:00 hch@lst.de +0 -2
#   move irq_enter and irq_exit to common code
# 
# include/asm-v850/hardirq.h
#   2005/01/04 20:24:33-08:00 hch@lst.de +0 -9
#   move irq_enter and irq_exit to common code
# 
# include/asm-sparc64/hardirq.h
#   2005/01/04 18:48:11-08:00 hch@lst.de +0 -9
#   move irq_enter and irq_exit to common code
# 
# include/asm-sparc/hardirq.h
#   2005/01/04 18:48:11-08:00 hch@lst.de +0 -9
#   move irq_enter and irq_exit to common code
# 
# include/asm-sh/hardirq.h
#   2005/01/04 18:48:11-08:00 hch@lst.de +0 -12
#   move irq_enter and irq_exit to common code
# 
# include/asm-s390/hardirq.h
#   2005/01/04 18:48:11-08:00 hch@lst.de +1 -15
#   move irq_enter and irq_exit to common code
# 
# include/asm-parisc/hardirq.h
#   2005/01/04 20:24:33-08:00 hch@lst.de +0 -9
#   move irq_enter and irq_exit to common code
# 
# include/asm-m68knommu/hardirq.h
#   2005/01/04 20:24:33-08:00 hch@lst.de +0 -9
#   move irq_enter and irq_exit to common code
# 
# include/asm-m68k/hardirq.h
#   2005/01/04 18:48:11-08:00 hch@lst.de +0 -9
#   move irq_enter and irq_exit to common code
# 
# include/asm-h8300/hardirq.h
#   2005/01/04 20:24:33-08:00 hch@lst.de +0 -9
#   move irq_enter and irq_exit to common code
# 
# include/asm-cris/hardirq.h
#   2005/01/04 20:24:33-08:00 hch@lst.de +0 -9
#   move irq_enter and irq_exit to common code
# 
# include/asm-arm/hardirq.h
#   2005/01/04 18:48:11-08:00 hch@lst.de +1 -11
#   move irq_enter and irq_exit to common code
# 
# include/asm-alpha/hardirq.h
#   2005/01/04 20:24:33-08:00 hch@lst.de +0 -10
#   move irq_enter and irq_exit to common code
# 
# arch/ia64/kernel/irq_ia64.c
#   2005/01/04 20:24:24-08:00 hch@lst.de +0 -15
#   move irq_enter and irq_exit to common code
# 
# ChangeSet
#   2005/01/04 21:26:05-08:00 rddunlap@osdl.org 
#   [PATCH] handle quoted module parameters
#   
#   Fix module parameter quote handling.
#   Module parameter strings (with spaces) are quoted like so:
#   "modprm=this test"
#   and not like this:
#   modprm="this test"
#   
#   Signed-off-by: Randy Dunlap <rddunlap@osdl.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# kernel/params.c
#   2005/01/04 18:48:11-08:00 rddunlap@osdl.org +12 -3
#   handle quoted module parameters
# 
# ChangeSet
#   2005/01/04 21:25:52-08:00 dev@sw.ru 
#   [PATCH] 4/4GB: Incorrect bound check in do_getname()
#   
#   This patch fixes incorrect address range check in do_getname().
#   Theoretically this can lead to do_getname() failure on kernel address space
#   string on the TASK_SIZE boundary addresses when 4GB split is ON.
#   
#   (akpm: I don't see why this check exists at all, actually.  afaict the only
#   effect of removing it is that we'll then generate -EFAULT on a
#   non-null-terminated pathname which ends exactly at TASK_SIZE).
#   
#   Signed-Off-By: Kirill Korotaev <dev@sw.ru>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/namei.c
#   2005/01/04 18:48:11-08:00 dev@sw.ru +6 -5
#   4/4GB: Incorrect bound check in do_getname()
# 
# ChangeSet
#   2005/01/04 21:25:39-08:00 jlan@engr.sgi.com 
#   [PATCH] enhanced Memory accounting data collection
#   
#   This patch is to offer common accounting data collection method at memory
#   usage for various accounting packages including BSD accounting, ELSA, CSA
#   and any other acct packages that use a common layer of data collection.
#   
#   New struct fields are added to mm_struct to save high watermarks of rss
#   usage as well as virtual memory usage.
#   
#   New struct fields are added to task_struct to collect accumulated rss usage
#   and vm usages.
#   
#   These data are collected on per process basis.
#   
#   Signed-off-by: Jay Lan <jlan@sgi.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# mm/swapfile.c
#   2005/01/04 18:48:11-08:00 jlan@engr.sgi.com +3 -0
#   enhanced Memory accounting data collection
# 
# mm/rmap.c
#   2005/01/04 18:48:11-08:00 jlan@engr.sgi.com +3 -0
#   enhanced Memory accounting data collection
# 
# mm/mremap.c
#   2005/01/04 18:48:11-08:00 jlan@engr.sgi.com +6 -0
#   enhanced Memory accounting data collection
# 
# mm/mmap.c
#   2005/01/04 18:48:11-08:00 jlan@engr.sgi.com +10 -0
#   enhanced Memory accounting data collection
# 
# mm/memory.c
#   2005/01/04 20:24:16-08:00 jlan@engr.sgi.com +30 -2
#   enhanced Memory accounting data collection
# 
# kernel/fork.c
#   2005/01/04 20:24:32-08:00 jlan@engr.sgi.com +6 -0
#   enhanced Memory accounting data collection
# 
# kernel/exit.c
#   2005/01/04 20:24:20-08:00 jlan@engr.sgi.com +2 -0
#   enhanced Memory accounting data collection
# 
# kernel/acct.c
#   2005/01/04 18:48:11-08:00 jlan@engr.sgi.com +31 -0
#   enhanced Memory accounting data collection
# 
# include/linux/sched.h
#   2005/01/04 20:24:32-08:00 jlan@engr.sgi.com +8 -0
#   enhanced Memory accounting data collection
# 
# include/linux/mm.h
#   2005/01/04 20:24:21-08:00 jlan@engr.sgi.com +3 -0
#   enhanced Memory accounting data collection
# 
# include/linux/acct.h
#   2005/01/04 18:48:11-08:00 jlan@engr.sgi.com +4 -0
#   enhanced Memory accounting data collection
# 
# fs/exec.c
#   2005/01/04 20:24:20-08:00 jlan@engr.sgi.com +3 -0
#   enhanced Memory accounting data collection
# 
# ChangeSet
#   2005/01/04 21:25:25-08:00 jlan@engr.sgi.com 
#   [PATCH] enhanced I/O accounting data patch
#   
#   This patch is to offer common accounting data collection method at I/O for
#   various accounting packages including BSD accounting, ELSA, CSA and any
#   other acct packages that use a common layer of data collection.
#   
#   Patch is made to fs/read_write.c to collect per process data on character
#   read/written in bytes and number of read/write syscalls made.
#   
#   New struct fields are added to task_struct to store the data.
#   
#   These data are collected on per process basis.
#   
#   Signed-off-by: Jay Lan <jlan@sgi.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# kernel/fork.c
#   2005/01/04 20:24:35-08:00 jlan@engr.sgi.com +12 -3
#   enhanced I/O accounting data patch
# 
# include/linux/sched.h
#   2005/01/04 20:24:35-08:00 jlan@engr.sgi.com +2 -0
#   enhanced I/O accounting data patch
# 
# fs/read_write.c
#   2005/01/04 18:48:11-08:00 jlan@engr.sgi.com +21 -2
#   enhanced I/O accounting data patch
# 
# ChangeSet
#   2005/01/04 21:25:12-08:00 dhowells@redhat.com 
#   [PATCH] Cross-reference nommu VMAs with mappings
#   
#   The attached patch includes prio-tree support and adds cross-referencing of
#   VMAs with address spaces back in, as is done under normal MMU Linux.
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# mm/nommu.c
#   2005/01/04 18:48:10-08:00 dhowells@redhat.com +18 -4
#   Cross-reference nommu VMAs with mappings
# 
# mm/Makefile
#   2005/01/04 18:48:10-08:00 dhowells@redhat.com +2 -2
#   Cross-reference nommu VMAs with mappings
# 
# ChangeSet
#   2005/01/04 21:24:59-08:00 dhowells@redhat.com 
#   [PATCH] Permit nommu MAP_SHARED of memory backed files
#   
#   The attached patch applies some further fixes and extensions to the nommu mmap
#   implementation:
#   
#    (1) /proc/maps distinguishes shareable private mappings and real shared
#        mappings by marking the former with 's' and the latter with 'S'.
#   
#    (2) Rearrange and optimise the checking portion of do_mmap_pgoff() to make it
#        easier to follow.
#   
#    (3) Only set VM_SHARED on MAP_SHARED mappings. Its presence indicates that the
#        backing memory is supplied by the underlying file or chardev.
#   
#        VM_MAYSHARE indicates that a VMA may be shared if it's a private VMA. The
#        memory for a private VMA is allocated by do_mmap_pgoff() from a kmalloc
#        slab and then the file contents are read into it before returning.
#   
#    (4) Permit MAP_SHARED + PROT_WRITE on memory-backed files[*] and chardevs to
#        indicate a contiguous area of memory when its get_unmapped_area() is
#        called if the backing fs/chardev is willing.
#   
#        [*] file->f_mapping->backing_dev_info->memory_backed == 1
#   
#    (5) Require chardevs and files that support to provide a get_unmapped_area()
#        file operation.
#   
#    (6) Made sure a private mapping of /dev/zero is possible. Shared mappings of
#        /dev/zero are not currently supported because this'd need greater
#        interaction of mmap with the chardev driver than is currently supported.
#   
#    (7) Add in some extra checks from mm/mmap.c: security, file having write
#        access for a writable shared mapping, file not being in append mode.
#   
#    (8) Only account the mapping memory if it's allocated here; memory belonging
#        to a shared chardev or file is not accounted.
#   
#   With this patch it should be possible to map contiguous flash files directly
#   out of ROM simply by providing get_unmapped_area() for a read-only/shared
#   mapping.
#   
#   I think that it might be worth splitting do_mmap_pgoff() up into smaller
#   subfunctions: one to handle the checking, one to handle shared mappings and
#   one to handle private mappings.
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# mm/nommu.c
#   2005/01/04 20:24:35-08:00 dhowells@redhat.com +123 -59
#   Permit nommu MAP_SHARED of memory backed files
# 
# fs/proc/nommu.c
#   2005/01/04 18:48:10-08:00 dhowells@redhat.com +1 -1
#   Permit nommu MAP_SHARED of memory backed files
# 
# ChangeSet
#   2005/01/04 21:24:46-08:00 dhowells@redhat.com 
#   [PATCH] Fix nommu MAP_SHARED handling
#   
#   The attached patch does the following things:
#   
#    (1) It uniquifies permitted overlapping VMAs (eg: MAP_SHARED on chardevs) in
#        nommu_vma_tree. Identical entries break the assumptions on which rbtrees
#        work. Since we don't need to share VMAs in this case, we uniquify such
#        VMAs by using the pointer to the VMA. They're only kept in the tree for
#        /proc/maps visibility.
#   
#    (2) Extracts VMA unlinking into its own function so that the source is
#        adjacent to the VMA linking function.
#   
#    (3) No longer releases memory belonging to a shared chardev or file (the
#        underlying driver is expected to provide mappable memory).
#   
#    (4) Frees the file attached to a VMA whether or not that VMA is shared or is
#        a memory-mapped I/O mapping.
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# mm/nommu.c
#   2005/01/04 20:24:36-08:00 dhowells@redhat.com +50 -16
#   Fix nommu MAP_SHARED handling
# 
# ChangeSet
#   2005/01/04 21:24:34-08:00 dhowells@redhat.com 
#   [PATCH] Implement nommu find_vma()
#   
#   The attached patch implements a nommu version of find_vma().
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# mm/nommu.c
#   2005/01/04 20:24:36-08:00 dhowells@redhat.com +12 -1
#   Implement nommu find_vma()
# 
# ChangeSet
#   2005/01/04 21:24:21-08:00 dhowells@redhat.com 
#   [PATCH] FRV: Change PML4 -> PUD
#   
#   The attached patch changes the PML4 bits of the FRV arch to the new PUD way.
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-frv/pgtable.h
#   2005/01/04 18:48:10-08:00 dhowells@redhat.com +96 -33
#   FRV: Change PML4 -> PUD
# 
# include/asm-frv/pgalloc.h
#   2005/01/04 18:48:10-08:00 dhowells@redhat.com +1 -3
#   FRV: Change PML4 -> PUD
# 
# include/asm-frv/page.h
#   2005/01/04 18:48:10-08:00 dhowells@redhat.com +7 -6
#   FRV: Change PML4 -> PUD
# 
# include/asm-frv/mmu_context.h
#   2005/01/04 18:48:10-08:00 dhowells@redhat.com +3 -3
#   FRV: Change PML4 -> PUD
# 
# arch/frv/mm/pgalloc.c
#   2005/01/04 18:48:10-08:00 dhowells@redhat.com +1 -1
#   FRV: Change PML4 -> PUD
# 
# arch/frv/mm/mmu-context.c
#   2005/01/04 18:48:10-08:00 dhowells@redhat.com +1 -3
#   FRV: Change PML4 -> PUD
# 
# arch/frv/mm/init.c
#   2005/01/04 18:48:10-08:00 dhowells@redhat.com +3 -1
#   FRV: Change PML4 -> PUD
# 
# arch/frv/mm/fault.c
#   2005/01/04 18:48:10-08:00 dhowells@redhat.com +15 -8
#   FRV: Change PML4 -> PUD
# 
# arch/frv/mm/dma-alloc.c
#   2005/01/04 18:48:10-08:00 dhowells@redhat.com +4 -2
#   FRV: Change PML4 -> PUD
# 
# arch/frv/kernel/gdb-stub.c
#   2005/01/04 18:48:10-08:00 dhowells@redhat.com +3 -1
#   FRV: Change PML4 -> PUD
# 
# ChangeSet
#   2005/01/04 21:24:08-08:00 dhowells@redhat.com 
#   [PATCH] FRV: FR55x CPU support fixes
#   
#   The attached patch fixes the following issues with support for the FR55x CPUs:
#   
#    (1) The FR555 has a 64-byte cacheline size; everything else that we've come
#        across has a 32-byte cacheline size.
#   
#    (2) Fix machine_restart() for FR55x.
#   
#    (3) Fix frv_cpu_suspend() for FR55x.
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Mark Salter <msalter@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-frv/cache.h
#   2005/01/04 18:48:10-08:00 dhowells@redhat.com +3 -1
#   FRV: FR55x CPU support fixes
# 
# arch/frv/kernel/sleep.S
#   2005/01/04 18:48:10-08:00 dhowells@redhat.com +33 -15
#   FRV: FR55x CPU support fixes
# 
# arch/frv/kernel/setup.c
#   2005/01/04 18:48:10-08:00 dhowells@redhat.com +2 -2
#   FRV: FR55x CPU support fixes
# 
# arch/frv/kernel/process.c
#   2005/01/04 18:48:10-08:00 dhowells@redhat.com +7 -1
#   FRV: FR55x CPU support fixes
# 
# arch/frv/kernel/head.S
#   2005/01/04 18:48:10-08:00 dhowells@redhat.com +4 -3
#   FRV: FR55x CPU support fixes
# 
# arch/frv/Kconfig
#   2005/01/04 18:48:10-08:00 dhowells@redhat.com +5 -0
#   FRV: FR55x CPU support fixes
# 
# ChangeSet
#   2005/01/04 21:23:55-08:00 dhowells@redhat.com 
#   [PATCH] FRV: pagetable handling fixes
#   
#   The attached patch makes the following fixes to the frv arch:
#   
#    (1) pte_offset() should no longer be around; the fault handler should use
#        pte_offset_kernel() instead when fixing up vmalloc misses.
#   
#    (2) The PGEs/PMEs do not hold PTEs. They have greater address resolution and
#        fewer control bits.
#   
#    (3) The data access error pattern in ESR15.EC should be 10000 not 10100.
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-frv/spr-regs.h
#   2005/01/04 18:48:10-08:00 dhowells@redhat.com +1 -1
#   FRV: pagetable handling fixes
# 
# include/asm-frv/pgtable.h
#   2005/01/04 20:24:36-08:00 dhowells@redhat.com +1 -2
#   FRV: pagetable handling fixes
# 
# arch/frv/mm/pgalloc.c
#   2005/01/04 20:24:36-08:00 dhowells@redhat.com +1 -1
#   FRV: pagetable handling fixes
# 
# arch/frv/mm/fault.c
#   2005/01/04 20:24:36-08:00 dhowells@redhat.com +1 -1
#   FRV: pagetable handling fixes
# 
# ChangeSet
#   2005/01/04 21:23:40-08:00 dhowells@redhat.com 
#   [PATCH] frv: accidental TLB entry write-protect fix
#   
#   The attached patch stops the FRV kernel-instruction-TLB-miss handler from
#   setting the write-protect bit on a mapping entry when punting an entry from
#   the mapping fast cache registers (DAMR1/IAMR1) to the TLB.
#   
#   This patch derives the WP value from the DAMPR1 register (which actually has
#   a WP bit) rather than the IAMPR1 register (which does not).
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/frv/mm/tlb-miss.S
#   2005/01/04 18:48:09-08:00 dhowells@redhat.com +2 -2
#   frv: accidental TLB entry write-protect fix
# 
# ChangeSet
#   2005/01/04 21:23:27-08:00 dhowells@redhat.com 
#   [PATCH] frv: update the trap tables comment
#   
#   The attached patch updates the FRV trap tables comment to make it more
#   appropriate.
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/frv/kernel/entry-table.S
#   2005/01/04 18:48:09-08:00 dhowells@redhat.com +29 -11
#   frv: update the trap tables comment
# 
# ChangeSet
#   2005/01/04 21:23:15-08:00 dhowells@redhat.com 
#   [PATCH] frv: perfctr_info syscall
#   
#   The attached patch gets rid of the perfctr_info syscall from the FRV arch now
#   that its implementation has gone and it has been removed from the i386 arch
#   and the i386 syscalls have been renumbered.
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-frv/unistd.h
#   2005/01/04 18:48:09-08:00 dhowells@redhat.com +6 -7
#   frv: perfctr_info syscall
# 
# arch/frv/kernel/entry.S
#   2005/01/04 18:48:09-08:00 dhowells@redhat.com +3 -3
#   frv: perfctr_info syscall
# 
# ChangeSet
#   2005/01/04 21:23:02-08:00 dhowells@redhat.com 
#   [PATCH] frv: Minix & ext2 bitops fixes
#   
#   The attached patch does two things:
#   
#    (1) Implements the ext2/ext3 bitops in terms of the main bitops functions.
#   
#    (2) Changes the Minix bitops to use the ext2 bitops (LE) rather than the main
#        bitops (BE).
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-frv/bitops.h
#   2005/01/04 18:48:09-08:00 dhowells@redhat.com +11 -60
#   frv: Minix & ext2 bitops fixes
# 
# ChangeSet
#   2005/01/04 21:22:49-08:00 dhowells@redhat.com 
#   [PATCH] FRV: debugging fixes
#   
#   The attached patch fixes three debugging problems in the frv arch:
#   
#    (1) Single-stepping in userspace steps through into the kernel-mode interrupt
#        handler when a hardware interrupt happens, and sometimes it gets past
#        where the debug-mode handler would normally catch it. This patch extends
#        the range of detected PC values.
#   
#    (2) When setting up the kernel-mode exception frame from the debug-mode
#        handler for a userspace debugging event, we weren't setting the LR
#        register to generate a return to the exception handler epilogue.
#   
#    (3) sys_ptrace() now needs to "put" the inferior task_struct not "free" it as
#        was done in 2.4.
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/frv/kernel/ptrace.c
#   2005/01/04 18:48:09-08:00 dhowells@redhat.com +1 -1
#   FRV: debugging fixes
# 
# arch/frv/kernel/break.S
#   2005/01/04 18:48:09-08:00 dhowells@redhat.com +7 -0
#   FRV: debugging fixes
# 
# ChangeSet
#   2005/01/04 21:22:36-08:00 dhowells@redhat.com 
#   [PATCH] Make more syscalls available for the FR-V arch
#   
#   The attached patch makes more syscalls available for the FR-V arch.
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-frv/unistd.h
#   2005/01/04 20:24:37-08:00 dhowells@redhat.com +12 -1
#   Make more syscalls available for the FR-V arch
# 
# arch/frv/kernel/entry.S
#   2005/01/04 20:24:37-08:00 dhowells@redhat.com +12 -1
#   Make more syscalls available for the FR-V arch
# 
# ChangeSet
#   2005/01/04 21:22:23-08:00 dhowells@redhat.com 
#   [PATCH] frv: nommu changes
#   
#   The attached patch changes the nommu bits of the FRV arch to incorporate the
#   name changes made to the nommu core stuff.
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-frv/mmu.h
#   2005/01/04 18:48:09-08:00 dhowells@redhat.com +1 -1
#   frv: nommu changes
# 
# arch/frv/kernel/ptrace.c
#   2005/01/04 20:24:37-08:00 dhowells@redhat.com +3 -3
#   frv: nommu changes
# 
# ChangeSet
#   2005/01/04 21:22:10-08:00 dhowells@redhat.com 
#   [PATCH] Further nommu /proc changes
#   
#   The attached patch changes the nommu procfs routines to match the nommu
#   changes in patch 1/1.
#   
#   This is an exercise in structure renaming and handling the fact that the list
#   of VMAs in the system is now held together by vma->vm_rb.
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/proc/task_nommu.c
#   2005/01/04 18:48:08-08:00 dhowells@redhat.com +26 -24
#   Further nommu /proc changes
# 
# fs/proc/nommu.c
#   2005/01/04 20:24:36-08:00 dhowells@redhat.com +12 -17
#   Further nommu /proc changes
# 
# ChangeSet
#   2005/01/04 21:21:58-08:00 dhowells@redhat.com 
#   [PATCH] Further nommu changes
#   
#   The attached patch further changes the nommu stuff previously changed. These
#   new changes do the following:
#   
#    (0) Some additional variables have been defined to make nommu even compile.
#   
#    (1) Get rid of the alternate vm_area_struct. The nommu mmap now uses the
#        normal one. There's a refcount field added to the normal one, contingent
#        on !CONFIG_MMU.
#   
#    (2) vm_rb is now used to keep track of the VMAs in an rbtree rather than
#        adding a separate list.
#   
#    (3) mm_tblock_struct is now vm_list_struct.
#   
#    (4) put_vma() now calls vma->vm_ops->close() if available on nommu.
#   
#    (5) A dummy generic_file_vm_ops has been provided. It does nothing, but
#        permits tiny-shmem to compile.
#   
#        tiny-shmem and ramfs still need attention, such that files contained
#        therein can be mmapped shared-writably to some extent on nommu.
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# mm/tiny-shmem.c
#   2005/01/04 18:48:08-08:00 dhowells@redhat.com +0 -2
#   Further nommu changes
# 
# mm/nommu.c
#   2005/01/04 20:24:36-08:00 dhowells@redhat.com +122 -55
#   Further nommu changes
# 
# include/linux/mm.h
#   2005/01/04 20:24:35-08:00 dhowells@redhat.com +12 -18
#   Further nommu changes
# 
# ChangeSet
#   2005/01/04 21:21:45-08:00 dhowells@redhat.com 
#   [PATCH] Fix some ELF-FDPIC binfmt problems
#   
#   The attached patch fixes the following problems in the ELF-FDPIC binfmt
#   driver:
#   
#    (1) elf_fdpic_map_file() should be passed an mm_struct pointer, not NULL.
#   
#    (2) do_mmap() should be called with the mmap_sem held.
#   
#    (3) mm_struct::end_brk doesn't exist in 2.6 (debugging only).
#   
#    (4) Avoid debugging warnings by casting certain values to unsigned long
#        before printing them.
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/binfmt_elf_fdpic.c
#   2005/01/04 18:48:08-08:00 dhowells@redhat.com +14 -6
#   Fix some ELF-FDPIC binfmt problems
# 
# ChangeSet
#   2005/01/04 21:21:32-08:00 dhowells@redhat.com 
#   [PATCH] FRV: Add FDPIC ELF binary format driver
#   
#   The attached patch adds a new binary format driver that allows a special
#   variety of ELF to be used that permits the dynamic sections that comprise an
#   executable, its dynamic loader and its shared libaries and its stack and data
#   to be located anywhere within the address space.
#   
#   This is used to provide shared libraries and shared executables (at least, as
#   far as the read-only dynamic sections go) on uClinux. Not only that, but the
#   same binaries can be run on MMU linux without a problem.
#   
#   This is achieved by:
#   
#    (1) Passing loadmaps to the dynamic loader (or to a statically linked
#        executable) to indicate the whereabouts of the various dynamic sections.
#   
#    (2) Using a GOT inside the program.
#   
#    (3) Passing setup_arg_pages() the stack pointer to be.
#   
#    (4) Allowing the arch greated control over how an executable is laid out in
#        memory in MMU Linux.
#   
#    (5) Rewriting mm/nommu.c to support MAP_PRIVATE on files, thus allowing _mmap_
#        to handle sharing of private-readonly mappings.
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/elf-fdpic.h
#   2005/01/04 18:48:08-08:00 dhowells@redhat.com +68 -0
#   FRV: Add FDPIC ELF binary format driver
# 
# fs/binfmt_elf_fdpic.c
#   2005/01/04 20:24:38-08:00 dhowells@redhat.com +1093 -0
#   FRV: Add FDPIC ELF binary format driver
# 
# include/linux/personality.h
#   2005/01/04 18:48:08-08:00 dhowells@redhat.com +4 -0
#   FRV: Add FDPIC ELF binary format driver
# 
# include/linux/elf-fdpic.h
#   2005/01/04 18:48:08-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/linux/elf-fdpic.h
# 
# fs/binfmt_elf_fdpic.c
#   2005/01/04 20:24:38-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/fs/binfmt_elf_fdpic.c
# 
# fs/Makefile
#   2005/01/04 18:48:08-08:00 dhowells@redhat.com +1 -0
#   FRV: Add FDPIC ELF binary format driver
# 
# fs/Kconfig.binfmt
#   2005/01/04 18:48:08-08:00 dhowells@redhat.com +13 -0
#   FRV: Add FDPIC ELF binary format driver
# 
# ChangeSet
#   2005/01/04 21:21:18-08:00 dhowells@redhat.com 
#   [PATCH] Fix usage of setup_arg_pages() in IA64, MIPS, S390 and Sparc64
#   
#   The attached patch fixes the usage of setup_arg_pages() in the IA64, MIPS,
#   S390 and Sparc64 arches.  This function now takes an extra parameter: the
#   initial top of stack.  This is useful in uClinux when there's no fixed
#   location to which the stack pointer can be initialised.
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/sparc64/kernel/binfmt_aout32.c
#   2005/01/04 18:48:08-08:00 dhowells@redhat.com +1 -1
#   Fix usage of setup_arg_pages() in IA64, MIPS, S390 and Sparc64
# 
# arch/mips/kernel/irixelf.c
#   2005/01/04 18:48:08-08:00 dhowells@redhat.com +1 -1
#   Fix usage of setup_arg_pages() in IA64, MIPS, S390 and Sparc64
# 
# arch/ia64/ia32/binfmt_elf32.c
#   2005/01/04 18:48:08-08:00 dhowells@redhat.com +1 -1
#   Fix usage of setup_arg_pages() in IA64, MIPS, S390 and Sparc64
# 
# ChangeSet
#   2005/01/04 21:21:04-08:00 dhowells@redhat.com 
#   [PATCH] FRV: change setup_arg_pages() to take stack pointer
#   
#   The attached patch changes setup_arg_pages() to take the proposed initial stack
#   top for the new executable image. This makes it easier for the binfmt to place
#   the stack at a non-fixed location, such as happens in !MMU configurations.
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/binfmts.h
#   2005/01/04 18:48:08-08:00 dhowells@redhat.com +3 -1
#   FRV: change setup_arg_pages() to take stack pointer
# 
# fs/exec.c
#   2005/01/04 20:24:35-08:00 dhowells@redhat.com +7 -5
#   FRV: change setup_arg_pages() to take stack pointer
# 
# fs/binfmt_som.c
#   2005/01/04 18:48:08-08:00 dhowells@redhat.com +1 -1
#   FRV: change setup_arg_pages() to take stack pointer
# 
# fs/binfmt_elf.c
#   2005/01/04 18:48:08-08:00 dhowells@redhat.com +1 -1
#   FRV: change setup_arg_pages() to take stack pointer
# 
# fs/binfmt_aout.c
#   2005/01/04 18:48:08-08:00 dhowells@redhat.com +1 -1
#   FRV: change setup_arg_pages() to take stack pointer
# 
# arch/x86_64/ia32/ia32_binfmt.c
#   2005/01/04 18:48:08-08:00 dhowells@redhat.com +4 -3
#   FRV: change setup_arg_pages() to take stack pointer
# 
# arch/x86_64/ia32/ia32_aout.c
#   2005/01/04 18:48:08-08:00 dhowells@redhat.com +3 -2
#   FRV: change setup_arg_pages() to take stack pointer
# 
# ChangeSet
#   2005/01/04 21:20:51-08:00 dhowells@redhat.com 
#   [PATCH] FRV: procfs changes for nommu changes
#   
#   The attached patch splits some memory-related procfs files into MMU and !MMU
#   versions and places them in separate conditionally-compiled files. A header
#   file local to the fs/proc/ directory is used to declare functions and the like.
#   
#   Additionally, a !MMU-only proc file (/proc/maps) is provided so that master VMA
#   list in a uClinux kernel is viewable.
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/proc/nommu.c
#   2005/01/04 20:24:38-08:00 dhowells@redhat.com +140 -0
#   FRV: procfs changes for nommu changes
# 
# fs/proc/mmu.c
#   2005/01/04 18:48:08-08:00 dhowells@redhat.com +67 -0
#   FRV: procfs changes for nommu changes
# 
# fs/proc/task_nommu.c
#   2005/01/04 20:24:38-08:00 dhowells@redhat.com +53 -18
#   FRV: procfs changes for nommu changes
# 
# fs/proc/task_mmu.c
#   2005/01/04 18:48:08-08:00 dhowells@redhat.com +32 -0
#   FRV: procfs changes for nommu changes
# 
# fs/proc/proc_misc.c
#   2005/01/04 20:24:32-08:00 dhowells@redhat.com +6 -44
#   FRV: procfs changes for nommu changes
# 
# fs/proc/nommu.c
#   2005/01/04 20:24:38-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/fs/proc/nommu.c
# 
# fs/proc/mmu.c
#   2005/01/04 18:48:08-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/fs/proc/mmu.c
# 
# fs/proc/internal.h
#   2005/01/04 18:48:08-08:00 dhowells@redhat.com +48 -0
#   FRV: procfs changes for nommu changes
# 
# fs/proc/base.c
#   2005/01/04 18:48:08-08:00 dhowells@redhat.com +1 -42
#   FRV: procfs changes for nommu changes
# 
# fs/proc/array.c
#   2005/01/04 18:48:08-08:00 dhowells@redhat.com +1 -0
#   FRV: procfs changes for nommu changes
# 
# fs/proc/Makefile
#   2005/01/04 18:48:08-08:00 dhowells@redhat.com +2 -2
#   FRV: procfs changes for nommu changes
# 
# fs/proc/internal.h
#   2005/01/04 18:48:08-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/fs/proc/internal.h
# 
# ChangeSet
#   2005/01/04 21:20:39-08:00 dhowells@redhat.com 
#   [PATCH] FRV: Better mmap support in uClinux
#   
#   The attached patch changes mm/nommu.c to better support mmap() when MMU
#   support is disabled (as it is in uClinux).
#   
#   This was discussed on the uclibc mailing list in a thread revolving around the
#   following message:
#   
#   	Date: Thu, 1 Apr 2004 12:05:50 +1000
#   	From: David McCullough <davidm@snapgear.com>
#   	To: David Howells <dhowells@redhat.com>
#   	Cc: Alexandre Oliva <aoliva@redhat.com>, uclibc@uclibc.org
#   	Subject: Re: [uClibc] mmaps for malloc should be private
#   	Message-ID: <20040401020550.GG3150@beast>
#   
#   The revised rules are:
#   
#    (1) Anonymous mappings can be shared or private, read or write.
#   
#    (2) Chardevs can be mapped shared, provided they supply a get_unmapped_area()
#        file operation and use that to set the address of the mapping (as a frame
#        buffer driver might do, for instance).
#   
#    (3) Files (and blockdevs) cannot be mapped shared since it is not really
#        possible to honour this by writing any changes back to the backing device.
#   
#    (4) Files (or sections thereof) can be mapped read-only private, in which case
#        the mapped bit will be read into memory and shared, and its address will
#        be returned. Any excess beyond EOF will be cleared.
#   
#    (5) Files (or sections thereof) can be mapped writable private, in which case
#        a private copy of the mapped bit will be read into a new bit memory, and
#        its address will be returned. Any excess beyond EOF will be cleared.
#   
#   Mappings are per MM structure still. You can only unmap what you've mapped.
#   
#   Fork semantics are irrelevant, since there's no fork.
#   
#   A global list of VMA's is maintained to keep track of the bits of memory
#   currently mapped on the system.
#   
#   The new binfmt makes use of (4) to implement shared libraries.
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# mm/nommu.c
#   2005/01/04 20:24:38-08:00 dhowells@redhat.com +339 -159
#   FRV: Better mmap support in uClinux
# 
# include/linux/mm.h
#   2005/01/04 20:24:38-08:00 dhowells@redhat.com +30 -0
#   FRV: Better mmap support in uClinux
# 
# ChangeSet
#   2005/01/04 21:20:24-08:00 dhowells@redhat.com 
#   [PATCH] FRV: Make calibrate_delay() optional
#   
#   The attached patch makes calibrate_delay() optional. In this architecture, it's
#   a waste of time since we can predict exactly what it's going to come up with
#   just by looking at the CPU's hardware clock registers. Thus far, we haven't
#   seen a board with any clock not dependent on the CPU's clock.
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# init/main.c
#   2005/01/04 20:24:21-08:00 dhowells@redhat.com +0 -70
#   FRV: Make calibrate_delay() optional
# 
# init/Makefile
#   2005/01/04 18:48:07-08:00 dhowells@redhat.com +2 -0
#   FRV: Make calibrate_delay() optional
# 
# init/calibrate.c
#   2005/01/04 18:48:07-08:00 dhowells@redhat.com +79 -0
#   FRV: Make calibrate_delay() optional
# 
# include/linux/delay.h
#   2005/01/04 18:48:07-08:00 dhowells@redhat.com +1 -0
#   FRV: Make calibrate_delay() optional
# 
# include/asm-x86_64/proto.h
#   2005/01/04 20:24:21-08:00 dhowells@redhat.com +0 -1
#   FRV: Make calibrate_delay() optional
# 
# include/asm-m32r/smp.h
#   2005/01/04 18:48:07-08:00 dhowells@redhat.com +0 -1
#   FRV: Make calibrate_delay() optional
# 
# arch/x86_64/Kconfig
#   2005/01/04 18:48:07-08:00 dhowells@redhat.com +4 -0
#   FRV: Make calibrate_delay() optional
# 
# arch/v850/Kconfig
#   2005/01/04 18:48:07-08:00 dhowells@redhat.com +3 -0
#   FRV: Make calibrate_delay() optional
# 
# arch/um/Kconfig
#   2005/01/04 18:48:07-08:00 dhowells@redhat.com +4 -0
#   FRV: Make calibrate_delay() optional
# 
# arch/sparc64/Kconfig
#   2005/01/04 18:48:07-08:00 dhowells@redhat.com +4 -0
#   FRV: Make calibrate_delay() optional
# 
# arch/sparc/Kconfig
#   2005/01/04 18:48:07-08:00 dhowells@redhat.com +4 -0
#   FRV: Make calibrate_delay() optional
# 
# arch/sh64/Kconfig
#   2005/01/04 18:48:07-08:00 dhowells@redhat.com +4 -0
#   FRV: Make calibrate_delay() optional
# 
# arch/sh/Kconfig
#   2005/01/04 18:48:07-08:00 dhowells@redhat.com +4 -0
#   FRV: Make calibrate_delay() optional
# 
# arch/s390/Kconfig
#   2005/01/04 18:48:07-08:00 dhowells@redhat.com +4 -0
#   FRV: Make calibrate_delay() optional
# 
# arch/ppc64/Kconfig
#   2005/01/04 18:48:07-08:00 dhowells@redhat.com +4 -0
#   FRV: Make calibrate_delay() optional
# 
# arch/ppc/Kconfig
#   2005/01/04 18:48:07-08:00 dhowells@redhat.com +4 -0
#   FRV: Make calibrate_delay() optional
# 
# arch/parisc/Kconfig
#   2005/01/04 18:48:07-08:00 dhowells@redhat.com +4 -0
#   FRV: Make calibrate_delay() optional
# 
# arch/mips/Kconfig
#   2005/01/04 18:48:07-08:00 dhowells@redhat.com +4 -0
#   FRV: Make calibrate_delay() optional
# 
# arch/m68knommu/Kconfig
#   2005/01/04 18:48:07-08:00 dhowells@redhat.com +4 -0
#   FRV: Make calibrate_delay() optional
# 
# arch/m68k/Kconfig
#   2005/01/04 18:48:07-08:00 dhowells@redhat.com +4 -0
#   FRV: Make calibrate_delay() optional
# 
# arch/ia64/Kconfig
#   2005/01/04 20:24:24-08:00 dhowells@redhat.com +4 -0
#   FRV: Make calibrate_delay() optional
# 
# arch/i386/Kconfig
#   2005/01/04 18:48:07-08:00 dhowells@redhat.com +4 -0
#   FRV: Make calibrate_delay() optional
# 
# arch/h8300/Kconfig
#   2005/01/04 18:48:07-08:00 dhowells@redhat.com +4 -0
#   FRV: Make calibrate_delay() optional
# 
# arch/cris/Kconfig
#   2005/01/04 18:48:07-08:00 dhowells@redhat.com +4 -0
#   FRV: Make calibrate_delay() optional
# 
# arch/arm26/Kconfig
#   2005/01/04 18:48:07-08:00 dhowells@redhat.com +4 -0
#   FRV: Make calibrate_delay() optional
# 
# arch/arm/Kconfig
#   2005/01/04 18:48:07-08:00 dhowells@redhat.com +4 -0
#   FRV: Make calibrate_delay() optional
# 
# arch/alpha/Kconfig
#   2005/01/04 18:48:07-08:00 dhowells@redhat.com +4 -0
#   FRV: Make calibrate_delay() optional
# 
# init/calibrate.c
#   2005/01/04 18:48:07-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/init/calibrate.c
# 
# ChangeSet
#   2005/01/04 21:20:09-08:00 dhowells@redhat.com 
#   [PATCH] FRV: Remaining Fujitsu FR-V arch include files
#   
#   The attached patch provides the remaining arch-specific include files for
#   the Fujitsu FR-V CPU arch.
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-frv/virtconvert.h
#   2005/01/04 18:48:07-08:00 dhowells@redhat.com +42 -0
#   FRV: Remaining Fujitsu FR-V arch include files
# 
# include/asm-frv/user.h
#   2005/01/04 18:48:07-08:00 dhowells@redhat.com +80 -0
#   FRV: Remaining Fujitsu FR-V arch include files
# 
# include/asm-frv/unistd.h
#   2005/01/04 20:24:37-08:00 dhowells@redhat.com +491 -0
#   FRV: Remaining Fujitsu FR-V arch include files
# 
# include/linux/suspend.h
#   2005/01/04 18:48:07-08:00 dhowells@redhat.com +1 -1
#   FRV: Remaining Fujitsu FR-V arch include files
# 
# include/linux/elf.h
#   2005/01/04 18:48:07-08:00 dhowells@redhat.com +5 -2
#   FRV: Remaining Fujitsu FR-V arch include files
# 
# include/asm-frv/virtconvert.h
#   2005/01/04 18:48:07-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/virtconvert.h
# 
# include/asm-frv/user.h
#   2005/01/04 18:48:07-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/user.h
# 
# include/asm-frv/unistd.h
#   2005/01/04 20:24:37-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/unistd.h
# 
# include/asm-frv/unaligned.h
#   2005/01/04 18:48:07-08:00 dhowells@redhat.com +203 -0
#   FRV: Remaining Fujitsu FR-V arch include files
# 
# include/asm-frv/unaligned.h
#   2005/01/04 18:48:07-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/unaligned.h
# 
# ChangeSet
#   2005/01/04 21:19:55-08:00 dhowells@redhat.com 
#   [PATCH] FRV: Yet more Fujitsu FR-V arch include files
#   
#   The attached patch provides the third 100KB or so of the arch-specific
#   include files for the Fujitsu FR-V CPU arch.
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-frv/ucontext.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +12 -0
#   FRV: Yet more Fujitsu FR-V arch include files
# 
# include/asm-frv/uaccess.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +317 -0
#   FRV: Yet more Fujitsu FR-V arch include files
# 
# include/asm-frv/types.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +74 -0
#   FRV: Yet more Fujitsu FR-V arch include files
# 
# include/asm-frv/topology.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +14 -0
#   FRV: Yet more Fujitsu FR-V arch include files
# 
# include/asm-frv/tlbflush.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +76 -0
#   FRV: Yet more Fujitsu FR-V arch include files
# 
# include/asm-frv/tlb.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +23 -0
#   FRV: Yet more Fujitsu FR-V arch include files
# 
# include/asm-frv/timex.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +25 -0
#   FRV: Yet more Fujitsu FR-V arch include files
# 
# include/asm-frv/timer-regs.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +106 -0
#   FRV: Yet more Fujitsu FR-V arch include files
# 
# include/asm-frv/thread_info.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +158 -0
#   FRV: Yet more Fujitsu FR-V arch include files
# 
# include/asm-frv/termios.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +74 -0
#   FRV: Yet more Fujitsu FR-V arch include files
# 
# include/asm-frv/termbits.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +177 -0
#   FRV: Yet more Fujitsu FR-V arch include files
# 
# include/asm-frv/system.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +123 -0
#   FRV: Yet more Fujitsu FR-V arch include files
# 
# include/asm-frv/suspend.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +20 -0
#   FRV: Yet more Fujitsu FR-V arch include files
# 
# include/asm-frv/string.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +51 -0
#   FRV: Yet more Fujitsu FR-V arch include files
# 
# include/asm-frv/statfs.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +7 -0
#   FRV: Yet more Fujitsu FR-V arch include files
# 
# include/asm-frv/stat.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +100 -0
#   FRV: Yet more Fujitsu FR-V arch include files
# 
# include/asm-frv/spr-regs.h
#   2005/01/04 20:24:36-08:00 dhowells@redhat.com +401 -0
#   FRV: Yet more Fujitsu FR-V arch include files
# 
# include/asm-frv/spinlock.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +17 -0
#   FRV: Yet more Fujitsu FR-V arch include files
# 
# include/asm-frv/sockios.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +13 -0
#   FRV: Yet more Fujitsu FR-V arch include files
# 
# include/asm-frv/socket.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +51 -0
#   FRV: Yet more Fujitsu FR-V arch include files
# 
# include/asm-frv/smp.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +10 -0
#   FRV: Yet more Fujitsu FR-V arch include files
# 
# include/asm-frv/signal.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +187 -0
#   FRV: Yet more Fujitsu FR-V arch include files
# 
# include/asm-frv/siginfo.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +12 -0
#   FRV: Yet more Fujitsu FR-V arch include files
# 
# include/asm-frv/sigcontext.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +26 -0
#   FRV: Yet more Fujitsu FR-V arch include files
# 
# include/asm-frv/shmparam.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +7 -0
#   FRV: Yet more Fujitsu FR-V arch include files
# 
# include/asm-frv/shmbuf.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +43 -0
#   FRV: Yet more Fujitsu FR-V arch include files
# 
# include/asm-frv/setup.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +25 -0
#   FRV: Yet more Fujitsu FR-V arch include files
# 
# include/asm-frv/serial.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +19 -0
#   FRV: Yet more Fujitsu FR-V arch include files
# 
# include/asm-frv/serial-regs.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +44 -0
#   FRV: Yet more Fujitsu FR-V arch include files
# 
# include/asm-frv/sembuf.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +26 -0
#   FRV: Yet more Fujitsu FR-V arch include files
# 
# include/asm-frv/semaphore.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +161 -0
#   FRV: Yet more Fujitsu FR-V arch include files
# 
# include/asm-frv/segment.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +46 -0
#   FRV: Yet more Fujitsu FR-V arch include files
# 
# include/asm-frv/sections.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +46 -0
#   FRV: Yet more Fujitsu FR-V arch include files
# 
# include/asm-frv/scatterlist.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +32 -0
#   FRV: Yet more Fujitsu FR-V arch include files
# 
# include/asm-frv/resource.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +53 -0
#   FRV: Yet more Fujitsu FR-V arch include files
# 
# include/asm-frv/ucontext.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/ucontext.h
# 
# include/asm-frv/uaccess.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/uaccess.h
# 
# include/asm-frv/types.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/types.h
# 
# include/asm-frv/topology.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/topology.h
# 
# include/asm-frv/tlbflush.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/tlbflush.h
# 
# include/asm-frv/tlb.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/tlb.h
# 
# include/asm-frv/timex.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/timex.h
# 
# include/asm-frv/timer-regs.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/timer-regs.h
# 
# include/asm-frv/thread_info.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/thread_info.h
# 
# include/asm-frv/termios.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/termios.h
# 
# include/asm-frv/termbits.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/termbits.h
# 
# include/asm-frv/system.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/system.h
# 
# include/asm-frv/suspend.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/suspend.h
# 
# include/asm-frv/string.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/string.h
# 
# include/asm-frv/statfs.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/statfs.h
# 
# include/asm-frv/stat.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/stat.h
# 
# include/asm-frv/spr-regs.h
#   2005/01/04 20:24:36-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/spr-regs.h
# 
# include/asm-frv/spinlock.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/spinlock.h
# 
# include/asm-frv/sockios.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/sockios.h
# 
# include/asm-frv/socket.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/socket.h
# 
# include/asm-frv/smp.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/smp.h
# 
# include/asm-frv/signal.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/signal.h
# 
# include/asm-frv/siginfo.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/siginfo.h
# 
# include/asm-frv/sigcontext.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/sigcontext.h
# 
# include/asm-frv/shmparam.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/shmparam.h
# 
# include/asm-frv/shmbuf.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/shmbuf.h
# 
# include/asm-frv/setup.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/setup.h
# 
# include/asm-frv/serial.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/serial.h
# 
# include/asm-frv/serial-regs.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/serial-regs.h
# 
# include/asm-frv/sembuf.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/sembuf.h
# 
# include/asm-frv/semaphore.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/semaphore.h
# 
# include/asm-frv/segment.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/segment.h
# 
# include/asm-frv/sections.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/sections.h
# 
# include/asm-frv/scatterlist.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/scatterlist.h
# 
# include/asm-frv/resource.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/resource.h
# 
# include/asm-frv/registers.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +255 -0
#   FRV: Yet more Fujitsu FR-V arch include files
# 
# include/asm-frv/registers.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/registers.h
# 
# ChangeSet
#   2005/01/04 21:19:42-08:00 wli@holomorphy.com 
#   [PATCH] convert FRV to use remap_pfn_range
#   
#   This patch converts FRV to use remap_pfn_range() in its
#   io_remap_page_range() function.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-frv/pgtable.h
#   2005/01/04 20:24:36-08:00 wli@holomorphy.com +2 -1
#   convert FRV to use remap_pfn_range
# 
# ChangeSet
#   2005/01/04 21:19:30-08:00 dhowells@redhat.com 
#   [PATCH] FRV: More Fujitsu FR-V arch include files
#   
#   The attached patch provides the second 100KB or so of the arch-specific
#   include files for the Fujitsu FR-V CPU arch.
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-frv/ptrace.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +86 -0
#   FRV: More Fujitsu FR-V arch include files
# 
# include/asm-frv/processor.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +153 -0
#   FRV: More Fujitsu FR-V arch include files
# 
# include/asm-frv/posix_types.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +66 -0
#   FRV: More Fujitsu FR-V arch include files
# 
# include/asm-frv/poll.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +23 -0
#   FRV: More Fujitsu FR-V arch include files
# 
# include/asm-frv/pgtable.h
#   2005/01/04 20:24:41-08:00 dhowells@redhat.com +491 -0
#   FRV: More Fujitsu FR-V arch include files
# 
# include/asm-frv/pgalloc.h
#   2005/01/04 20:24:36-08:00 dhowells@redhat.com +66 -0
#   FRV: More Fujitsu FR-V arch include files
# 
# include/asm-frv/percpu.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +6 -0
#   FRV: More Fujitsu FR-V arch include files
# 
# include/asm-frv/pci.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +108 -0
#   FRV: More Fujitsu FR-V arch include files
# 
# include/asm-frv/param.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +23 -0
#   FRV: More Fujitsu FR-V arch include files
# 
# include/asm-frv/page.h
#   2005/01/04 20:24:36-08:00 dhowells@redhat.com +104 -0
#   FRV: More Fujitsu FR-V arch include files
# 
# include/asm-frv/namei.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +18 -0
#   FRV: More Fujitsu FR-V arch include files
# 
# include/asm-frv/msgbuf.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +32 -0
#   FRV: More Fujitsu FR-V arch include files
# 
# include/asm-frv/module.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +20 -0
#   FRV: More Fujitsu FR-V arch include files
# 
# include/asm-frv/mmu_context.h
#   2005/01/04 20:24:36-08:00 dhowells@redhat.com +50 -0
#   FRV: More Fujitsu FR-V arch include files
# 
# include/asm-frv/mmu.h
#   2005/01/04 20:24:37-08:00 dhowells@redhat.com +42 -0
#   FRV: More Fujitsu FR-V arch include files
# 
# include/asm-frv/mman.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +44 -0
#   FRV: More Fujitsu FR-V arch include files
# 
# include/asm-frv/mem-layout.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +78 -0
#   FRV: More Fujitsu FR-V arch include files
# 
# include/asm-frv/mb93493-regs.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +279 -0
#   FRV: More Fujitsu FR-V arch include files
# 
# include/asm-frv/mb93493-irqs.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +52 -0
#   FRV: More Fujitsu FR-V arch include files
# 
# include/asm-frv/mb93093-fpga-irqs.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +31 -0
#   FRV: More Fujitsu FR-V arch include files
# 
# include/asm-frv/mb93091-fpga-irqs.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +44 -0
#   FRV: More Fujitsu FR-V arch include files
# 
# include/asm-frv/mb86943a.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +39 -0
#   FRV: More Fujitsu FR-V arch include files
# 
# include/asm-frv/mb-regs.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +185 -0
#   FRV: More Fujitsu FR-V arch include files
# 
# include/asm-frv/math-emu.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +301 -0
#   FRV: More Fujitsu FR-V arch include files
# 
# include/asm-frv/local.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +6 -0
#   FRV: More Fujitsu FR-V arch include files
# 
# include/asm-frv/linkage.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +7 -0
#   FRV: More Fujitsu FR-V arch include files
# 
# include/asm-frv/kmap_types.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +29 -0
#   FRV: More Fujitsu FR-V arch include files
# 
# include/asm-frv/irq.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +44 -0
#   FRV: More Fujitsu FR-V arch include files
# 
# include/asm-frv/irq-routing.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +70 -0
#   FRV: More Fujitsu FR-V arch include files
# 
# include/asm-frv/irc-regs.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +53 -0
#   FRV: More Fujitsu FR-V arch include files
# 
# include/asm-frv/ipc.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +33 -0
#   FRV: More Fujitsu FR-V arch include files
# 
# include/asm-frv/ptrace.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/ptrace.h
# 
# include/asm-frv/processor.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/processor.h
# 
# include/asm-frv/posix_types.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/posix_types.h
# 
# include/asm-frv/poll.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/poll.h
# 
# include/asm-frv/pgtable.h
#   2005/01/04 20:24:41-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/pgtable.h
# 
# include/asm-frv/pgalloc.h
#   2005/01/04 20:24:36-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/pgalloc.h
# 
# include/asm-frv/percpu.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/percpu.h
# 
# include/asm-frv/pci.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/pci.h
# 
# include/asm-frv/param.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/param.h
# 
# include/asm-frv/page.h
#   2005/01/04 20:24:36-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/page.h
# 
# include/asm-frv/namei.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/namei.h
# 
# include/asm-frv/msgbuf.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/msgbuf.h
# 
# include/asm-frv/module.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/module.h
# 
# include/asm-frv/mmu_context.h
#   2005/01/04 20:24:36-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/mmu_context.h
# 
# include/asm-frv/mmu.h
#   2005/01/04 20:24:37-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/mmu.h
# 
# include/asm-frv/mman.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/mman.h
# 
# include/asm-frv/mem-layout.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/mem-layout.h
# 
# include/asm-frv/mb93493-regs.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/mb93493-regs.h
# 
# include/asm-frv/mb93493-irqs.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/mb93493-irqs.h
# 
# include/asm-frv/mb93093-fpga-irqs.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/mb93093-fpga-irqs.h
# 
# include/asm-frv/mb93091-fpga-irqs.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/mb93091-fpga-irqs.h
# 
# include/asm-frv/mb86943a.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/mb86943a.h
# 
# include/asm-frv/mb-regs.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/mb-regs.h
# 
# include/asm-frv/math-emu.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/math-emu.h
# 
# include/asm-frv/local.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/local.h
# 
# include/asm-frv/linkage.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/linkage.h
# 
# include/asm-frv/kmap_types.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/kmap_types.h
# 
# include/asm-frv/irq.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/irq.h
# 
# include/asm-frv/irq-routing.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/irq-routing.h
# 
# include/asm-frv/irc-regs.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/irc-regs.h
# 
# include/asm-frv/ipcbuf.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +30 -0
#   FRV: More Fujitsu FR-V arch include files
# 
# include/asm-frv/ipc.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/ipc.h
# 
# include/asm-frv/ipcbuf.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/ipcbuf.h
# 
# ChangeSet
#   2005/01/04 21:19:15-08:00 dhowells@redhat.com 
#   [PATCH] frv: Fix PCI config space write
#   
#   The attached patch makes byte and word writes to PCI config space work. 
#   The problem was that the pointer to the appropriate chunk of the config
#   port needs to be juggled to allow for the fact that FRV is big endian in
#   this case.
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/frv/mb93090-mb00/pci-vdk.c
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +8 -3
#   frv: Fix PCI config space write
# 
# ChangeSet
#   2005/01/04 21:19:03-08:00 dhowells@redhat.com 
#   [PATCH] frv: PCI DMA fixes
#   
#   The attached patch makes cache flushing work correctly on DMA consistent
#   memory for the frv arch.  On the FRV unmapped memory can't be flushed
#   directly, but has to be kmapped first since the flush instructions take
#   virtual pointers not physical ones.
#   
#   It also splits the MMU and !MMU versions into separate files.
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-frv/dma-mapping.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +6 -32
#   frv: PCI DMA fixes
# 
# arch/frv/mb93090-mb00/pci-dma.c
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +62 -81
#   frv: PCI DMA fixes
# 
# arch/frv/mb93090-mb00/pci-dma-nommu.c
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +152 -0
#   frv: PCI DMA fixes
# 
# arch/frv/mb93090-mb00/Makefile
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +9 -1
#   frv: PCI DMA fixes
# 
# arch/frv/mb93090-mb00/pci-dma-nommu.c
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/mb93090-mb00/pci-dma-nommu.c
# 
# ChangeSet
#   2005/01/04 21:18:48-08:00 dhowells@redhat.com 
#   [PATCH] frv: emove obsolete hardirq stuff from includes
#   
#   The attached patch removes irq_enter() and friends from asm-frv/hardirq.h as
#   they are now mandatorily defined in linux/hardirq.h.
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-frv/hardirq.h
#   2005/01/04 18:48:06-08:00 dhowells@redhat.com +0 -13
#   frv: emove obsolete hardirq stuff from includes
# 
# ChangeSet
#   2005/01/04 21:18:35-08:00 dhowells@redhat.com 
#   [PATCH] FRV: First batch of Fujitsu FR-V arch include files
#   
#   The attached patch provides the first 100KB or so of the arch-specific
#   include files for the Fujitsu FR-V CPU arch.
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-frv/ioctls.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +82 -0
#   FRV: First batch of Fujitsu FR-V arch include files
# 
# include/asm-frv/ioctl.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +80 -0
#   FRV: First batch of Fujitsu FR-V arch include files
# 
# include/asm-frv/io.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +278 -0
#   FRV: First batch of Fujitsu FR-V arch include files
# 
# include/asm-frv/init.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +12 -0
#   FRV: First batch of Fujitsu FR-V arch include files
# 
# include/asm-frv/ide.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +43 -0
#   FRV: First batch of Fujitsu FR-V arch include files
# 
# include/asm-frv/hw_irq.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +16 -0
#   FRV: First batch of Fujitsu FR-V arch include files
# 
# include/asm-frv/highmem.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +183 -0
#   FRV: First batch of Fujitsu FR-V arch include files
# 
# include/asm-frv/hardirq.h
#   2005/01/04 20:24:42-08:00 dhowells@redhat.com +43 -0
#   FRV: First batch of Fujitsu FR-V arch include files
# 
# include/asm-frv/gpio-regs.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +116 -0
#   FRV: First batch of Fujitsu FR-V arch include files
# 
# include/asm-frv/gdb-stub.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +118 -0
#   FRV: First batch of Fujitsu FR-V arch include files
# 
# include/asm-frv/fpu.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +12 -0
#   FRV: First batch of Fujitsu FR-V arch include files
# 
# include/asm-frv/fcntl.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +88 -0
#   FRV: First batch of Fujitsu FR-V arch include files
# 
# include/asm-frv/errno.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +7 -0
#   FRV: First batch of Fujitsu FR-V arch include files
# 
# include/asm-frv/elf.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +147 -0
#   FRV: First batch of Fujitsu FR-V arch include files
# 
# include/asm-frv/dma.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +129 -0
#   FRV: First batch of Fujitsu FR-V arch include files
# 
# include/asm-frv/dma-mapping.h
#   2005/01/04 20:24:41-08:00 dhowells@redhat.com +210 -0
#   FRV: First batch of Fujitsu FR-V arch include files
# 
# include/asm-frv/dm9000.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +37 -0
#   FRV: First batch of Fujitsu FR-V arch include files
# 
# include/asm-frv/div64.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +1 -0
#   FRV: First batch of Fujitsu FR-V arch include files
# 
# include/asm-frv/delay.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +50 -0
#   FRV: First batch of Fujitsu FR-V arch include files
# 
# include/asm-frv/current.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +30 -0
#   FRV: First batch of Fujitsu FR-V arch include files
# 
# include/asm-frv/cputime.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +6 -0
#   FRV: First batch of Fujitsu FR-V arch include files
# 
# include/asm-frv/cpumask.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +6 -0
#   FRV: First batch of Fujitsu FR-V arch include files
# 
# include/asm-frv/cpu-irqs.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +87 -0
#   FRV: First batch of Fujitsu FR-V arch include files
# 
# include/asm-frv/checksum.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +183 -0
#   FRV: First batch of Fujitsu FR-V arch include files
# 
# include/asm-frv/cacheflush.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +91 -0
#   FRV: First batch of Fujitsu FR-V arch include files
# 
# include/asm-frv/cache.h
#   2005/01/04 20:24:36-08:00 dhowells@redhat.com +22 -0
#   FRV: First batch of Fujitsu FR-V arch include files
# 
# include/asm-frv/byteorder.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +13 -0
#   FRV: First batch of Fujitsu FR-V arch include files
# 
# include/asm-frv/busctl-regs.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +41 -0
#   FRV: First batch of Fujitsu FR-V arch include files
# 
# include/asm-frv/bugs.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +14 -0
#   FRV: First batch of Fujitsu FR-V arch include files
# 
# include/asm-frv/bug.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +51 -0
#   FRV: First batch of Fujitsu FR-V arch include files
# 
# include/asm-frv/bitops.h
#   2005/01/04 20:24:37-08:00 dhowells@redhat.com +390 -0
#   FRV: First batch of Fujitsu FR-V arch include files
# 
# include/asm-frv/ax88796.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +22 -0
#   FRV: First batch of Fujitsu FR-V arch include files
# 
# include/asm-frv/ioctls.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/ioctls.h
# 
# include/asm-frv/ioctl.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/ioctl.h
# 
# include/asm-frv/io.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/io.h
# 
# include/asm-frv/init.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/init.h
# 
# include/asm-frv/ide.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/ide.h
# 
# include/asm-frv/hw_irq.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/hw_irq.h
# 
# include/asm-frv/highmem.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/highmem.h
# 
# include/asm-frv/hardirq.h
#   2005/01/04 20:24:42-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/hardirq.h
# 
# include/asm-frv/gpio-regs.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/gpio-regs.h
# 
# include/asm-frv/gdb-stub.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/gdb-stub.h
# 
# include/asm-frv/fpu.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/fpu.h
# 
# include/asm-frv/fcntl.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/fcntl.h
# 
# include/asm-frv/errno.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/errno.h
# 
# include/asm-frv/elf.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/elf.h
# 
# include/asm-frv/dma.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/dma.h
# 
# include/asm-frv/dma-mapping.h
#   2005/01/04 20:24:41-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/dma-mapping.h
# 
# include/asm-frv/dm9000.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/dm9000.h
# 
# include/asm-frv/div64.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/div64.h
# 
# include/asm-frv/delay.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/delay.h
# 
# include/asm-frv/current.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/current.h
# 
# include/asm-frv/cputime.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/cputime.h
# 
# include/asm-frv/cpumask.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/cpumask.h
# 
# include/asm-frv/cpu-irqs.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/cpu-irqs.h
# 
# include/asm-frv/checksum.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/checksum.h
# 
# include/asm-frv/cacheflush.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/cacheflush.h
# 
# include/asm-frv/cache.h
#   2005/01/04 20:24:36-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/cache.h
# 
# include/asm-frv/byteorder.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/byteorder.h
# 
# include/asm-frv/busctl-regs.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/busctl-regs.h
# 
# include/asm-frv/bugs.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/bugs.h
# 
# include/asm-frv/bug.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/bug.h
# 
# include/asm-frv/bitops.h
#   2005/01/04 20:24:37-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/bitops.h
# 
# include/asm-frv/ax88796.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/ax88796.h
# 
# include/asm-frv/atomic.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +417 -0
#   FRV: First batch of Fujitsu FR-V arch include files
# 
# include/asm-frv/atomic.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-frv/atomic.h
# 
# ChangeSet
#   2005/01/04 21:18:21-08:00 haveblue@us.ibm.com 
#   [PATCH] kill off highmem_start_page
#   
#   People love to do comparisons with highmem_start_page.  However, where
#   CONFIG_HIGHMEM=y and there is no actual highmem, there's no real page at
#   *highmem_start_page.
#   
#   That's usually not a problem, but CONFIG_NONLINEAR is a bit more strict and
#   catches the bogus address tranlations. 
#   
#   There are about a gillion different ways to find out of a 'struct page' is
#   highmem or not.  Why not just check page_flags?  Just use PageHighMem()
#   wherever there used to be a highmem_start_page comparison.  Then, kill off
#   highmem_start_page.
#   
#   This removes more code than it adds, and gets rid of some nasty
#   #ifdefs in .c files.
#   
#   Signed-off-by: Dave Hansen <haveblue@us.ibm.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/frv/mm/init.c
#   2005/01/04 20:24:36-08:00 haveblue@us.ibm.com +0 -5
#   kill off highmem_start_page
# 
# arch/frv/mm/highmem.c
#   2005/01/04 18:48:05-08:00 haveblue@us.ibm.com +2 -2
#   kill off highmem_start_page
# 
# ChangeSet
#   2005/01/04 21:18:08-08:00 dhowells@redhat.com 
#   [PATCH] Put memory in DMA zone not Normal zone in FRV arch
#   
#   The attached patch makes the FR-V arch put all its memory in the DMA zone
#   rather than the Normal zone since all the memory is available as a DMA
#   target.
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/frv/mm/init.c
#   2005/01/04 20:24:42-08:00 dhowells@redhat.com +2 -2
#   Put memory in DMA zone not Normal zone in FRV arch
# 
# ChangeSet
#   2005/01/04 21:17:55-08:00 dhowells@redhat.com 
#   [PATCH] FRV: Fujitsu FR-V CPU arch implementation part 9
#   
#   The attached patches provides part 9 of an architecture implementation
#   for the Fujitsu FR-V CPU series, configurably as Linux or uClinux.
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/frv/mm/unaligned.c
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +218 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 9
# 
# arch/frv/mm/tlb-miss.S
#   2005/01/04 20:24:37-08:00 dhowells@redhat.com +631 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 9
# 
# arch/frv/mm/tlb-flush.S
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +185 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 9
# 
# arch/frv/mm/pgalloc.c
#   2005/01/04 20:24:36-08:00 dhowells@redhat.com +159 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 9
# 
# arch/frv/mm/mmu-context.c
#   2005/01/04 20:24:36-08:00 dhowells@redhat.com +210 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 9
# 
# arch/frv/mm/kmap.c
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +56 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 9
# 
# arch/frv/mm/init.c
#   2005/01/04 20:24:42-08:00 dhowells@redhat.com +244 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 9
# 
# arch/frv/mm/highmem.c
#   2005/01/04 20:24:42-08:00 dhowells@redhat.com +33 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 9
# 
# arch/frv/mm/fault.c
#   2005/01/04 20:24:36-08:00 dhowells@redhat.com +323 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 9
# 
# arch/frv/mm/extable.c
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +91 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 9
# 
# arch/frv/mm/elf-fdpic.c
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +123 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 9
# 
# arch/frv/mm/dma-alloc.c
#   2005/01/04 20:24:36-08:00 dhowells@redhat.com +186 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 9
# 
# arch/frv/mm/Makefile
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +9 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 9
# 
# arch/frv/mm/unaligned.c
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/mm/unaligned.c
# 
# arch/frv/mm/tlb-miss.S
#   2005/01/04 20:24:37-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/mm/tlb-miss.S
# 
# arch/frv/mm/tlb-flush.S
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/mm/tlb-flush.S
# 
# arch/frv/mm/pgalloc.c
#   2005/01/04 20:24:36-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/mm/pgalloc.c
# 
# arch/frv/mm/mmu-context.c
#   2005/01/04 20:24:36-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/mm/mmu-context.c
# 
# arch/frv/mm/kmap.c
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/mm/kmap.c
# 
# arch/frv/mm/init.c
#   2005/01/04 20:24:42-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/mm/init.c
# 
# arch/frv/mm/highmem.c
#   2005/01/04 20:24:42-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/mm/highmem.c
# 
# arch/frv/mm/fault.c
#   2005/01/04 20:24:36-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/mm/fault.c
# 
# arch/frv/mm/extable.c
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/mm/extable.c
# 
# arch/frv/mm/elf-fdpic.c
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/mm/elf-fdpic.c
# 
# arch/frv/mm/dma-alloc.c
#   2005/01/04 20:24:36-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/mm/dma-alloc.c
# 
# arch/frv/mm/cache-page.c
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +66 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 9
# 
# arch/frv/mm/Makefile
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/mm/Makefile
# 
# arch/frv/mm/cache-page.c
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/mm/cache-page.c
# 
# ChangeSet
#   2005/01/04 21:17:41-08:00 dhowells@redhat.com 
#   [PATCH] FRV: Fujitsu FR-V CPU arch implementation part 8
#   
#   The attached patches provides part 8 of an architecture implementation
#   for the Fujitsu FR-V CPU series, configurably as Linux or uClinux.
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/frv/mb93090-mb00/pci-vdk.c
#   2005/01/04 20:24:41-08:00 dhowells@redhat.com +462 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 8
# 
# arch/frv/mb93090-mb00/pci-irq.c
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +70 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 8
# 
# arch/frv/mb93090-mb00/pci-frv.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +47 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 8
# 
# arch/frv/mb93090-mb00/pci-frv.c
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +363 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 8
# 
# arch/frv/mb93090-mb00/pci-dma.c
#   2005/01/04 20:24:41-08:00 dhowells@redhat.com +124 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 8
# 
# arch/frv/mb93090-mb00/pci-vdk.c
#   2005/01/04 20:24:41-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/mb93090-mb00/pci-vdk.c
# 
# arch/frv/mb93090-mb00/pci-irq.c
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/mb93090-mb00/pci-irq.c
# 
# arch/frv/mb93090-mb00/pci-frv.h
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/mb93090-mb00/pci-frv.h
# 
# arch/frv/mb93090-mb00/pci-frv.c
#   2005/01/04 18:48:05-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/mb93090-mb00/pci-frv.c
# 
# arch/frv/mb93090-mb00/pci-dma.c
#   2005/01/04 20:24:41-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/mb93090-mb00/pci-dma.c
# 
# arch/frv/mb93090-mb00/Makefile
#   2005/01/04 20:24:41-08:00 dhowells@redhat.com +5 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 8
# 
# arch/frv/mb93090-mb00/Makefile
#   2005/01/04 20:24:41-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/mb93090-mb00/Makefile
# 
# ChangeSet
#   2005/01/04 21:17:28-08:00 dhowells@redhat.com 
#   [PATCH] FRV: Fujitsu FR-V CPU arch implementation part 7
#   
#   The attached patches provides part 7 of an architecture implementation
#   for the Fujitsu FR-V CPU series, configurably as Linux or uClinux.
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/frv/lib/outsl_sw.S
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +45 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 7
# 
# arch/frv/lib/outsl_ns.S
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +59 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 7
# 
# arch/frv/lib/memset.S
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +182 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 7
# 
# arch/frv/lib/memcpy.S
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +135 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 7
# 
# arch/frv/lib/insl_sw.S
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +40 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 7
# 
# arch/frv/lib/insl_ns.S
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +52 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 7
# 
# arch/frv/lib/checksum.c
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +148 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 7
# 
# arch/frv/lib/cache.S
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +98 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 7
# 
# arch/frv/lib/atomic-ops.S
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +265 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 7
# 
# arch/frv/lib/__negdi2.S
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +28 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 7
# 
# arch/frv/lib/__muldi3.S
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +32 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 7
# 
# arch/frv/lib/__lshrdi3.S
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +40 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 7
# 
# arch/frv/lib/__ashrdi3.S
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +41 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 7
# 
# arch/frv/lib/Makefile
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +8 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 7
# 
# arch/frv/lib/outsl_sw.S
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/lib/outsl_sw.S
# 
# arch/frv/lib/outsl_ns.S
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/lib/outsl_ns.S
# 
# arch/frv/lib/memset.S
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/lib/memset.S
# 
# arch/frv/lib/memcpy.S
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/lib/memcpy.S
# 
# arch/frv/lib/insl_sw.S
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/lib/insl_sw.S
# 
# arch/frv/lib/insl_ns.S
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/lib/insl_ns.S
# 
# arch/frv/lib/checksum.c
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/lib/checksum.c
# 
# arch/frv/lib/cache.S
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/lib/cache.S
# 
# arch/frv/lib/atomic-ops.S
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/lib/atomic-ops.S
# 
# arch/frv/lib/__negdi2.S
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/lib/__negdi2.S
# 
# arch/frv/lib/__muldi3.S
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/lib/__muldi3.S
# 
# arch/frv/lib/__lshrdi3.S
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/lib/__lshrdi3.S
# 
# arch/frv/lib/__ashrdi3.S
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/lib/__ashrdi3.S
# 
# arch/frv/lib/__ashldi3.S
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +40 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 7
# 
# arch/frv/lib/Makefile
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/lib/Makefile
# 
# arch/frv/lib/__ashldi3.S
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/lib/__ashldi3.S
# 
# ChangeSet
#   2005/01/04 21:17:14-08:00 dhowells@redhat.com 
#   [PATCH] FRV: Fujitsu FR-V CPU arch implementation part 6
#   
#   The attached patches provides part 6 of an architecture implementation
#   for the Fujitsu FR-V CPU series, configurably as Linux or uClinux.
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/frv/kernel/uaccess.c
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +95 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 6
# 
# arch/frv/kernel/traps.c
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +431 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 6
# 
# arch/frv/kernel/time.c
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +234 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 6
# 
# arch/frv/kernel/sys_frv.c
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +210 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 6
# 
# arch/frv/kernel/uaccess.c
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/kernel/uaccess.c
# 
# arch/frv/kernel/traps.c
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/kernel/traps.c
# 
# arch/frv/kernel/time.c
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/kernel/time.c
# 
# arch/frv/kernel/sysctl.c
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +206 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 6
# 
# arch/frv/kernel/sys_frv.c
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/kernel/sys_frv.c
# 
# arch/frv/kernel/sysctl.c
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/kernel/sysctl.c
# 
# ChangeSet
#   2005/01/04 21:17:01-08:00 dhowells@redhat.com 
#   [PATCH] FRV: Fujitsu FR-V CPU arch implementation part 5
#   
#   The attached patches provides part 5 of an architecture implementation
#   for the Fujitsu FR-V CPU series, configurably as Linux or uClinux.
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/frv/kernel/switch_to.S
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +486 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 5
# 
# arch/frv/kernel/sleep.S
#   2005/01/04 20:24:36-08:00 dhowells@redhat.com +356 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 5
# 
# arch/frv/kernel/signal.c
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +595 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 5
# 
# arch/frv/kernel/setup.c
#   2005/01/04 20:24:36-08:00 dhowells@redhat.com +1202 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 5
# 
# arch/frv/kernel/semaphore.c
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +142 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 5
# 
# arch/frv/kernel/ptrace.c
#   2005/01/04 20:24:37-08:00 dhowells@redhat.com +771 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 5
# 
# arch/frv/kernel/switch_to.S
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/kernel/switch_to.S
# 
# arch/frv/kernel/sleep.S
#   2005/01/04 20:24:36-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/kernel/sleep.S
# 
# arch/frv/kernel/signal.c
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/kernel/signal.c
# 
# arch/frv/kernel/setup.c
#   2005/01/04 20:24:36-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/kernel/setup.c
# 
# arch/frv/kernel/semaphore.c
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/kernel/semaphore.c
# 
# arch/frv/kernel/ptrace.c
#   2005/01/04 20:24:37-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/kernel/ptrace.c
# 
# ChangeSet
#   2005/01/04 21:16:47-08:00 dhowells@redhat.com 
#   [PATCH] FRV: Fujitsu FR-V CPU arch implementation part 4
#   
#   The attached patches provides part 4 of an architecture implementation
#   for the Fujitsu FR-V CPU series, configurably as Linux or uClinux.
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/frv/kernel/process.c
#   2005/01/04 20:24:36-08:00 dhowells@redhat.com +384 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 4
# 
# arch/frv/kernel/pm.c
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +432 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 4
# 
# arch/frv/kernel/pm-mb93093.c
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +66 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 4
# 
# arch/frv/kernel/local.h
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +56 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 4
# 
# arch/frv/kernel/kernel_thread.S
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +77 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 4
# 
# arch/frv/kernel/irq.c
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +764 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 4
# 
# arch/frv/kernel/irq-routing.c
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +291 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 4
# 
# arch/frv/kernel/irq-mb93493.c
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +108 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 4
# 
# arch/frv/kernel/irq-mb93093.c
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +99 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 4
# 
# arch/frv/kernel/irq-mb93091.c
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +116 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 4
# 
# arch/frv/kernel/init_task.c
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +39 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 4
# 
# arch/frv/kernel/head-uc-fr555.S
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +347 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 4
# 
# arch/frv/kernel/head-uc-fr451.S
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +174 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 4
# 
# arch/frv/kernel/Makefile
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +22 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 4
# 
# arch/frv/kernel/process.c
#   2005/01/04 20:24:36-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/kernel/process.c
# 
# arch/frv/kernel/pm.c
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/kernel/pm.c
# 
# arch/frv/kernel/pm-mb93093.c
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/kernel/pm-mb93093.c
# 
# arch/frv/kernel/local.h
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/kernel/local.h
# 
# arch/frv/kernel/kernel_thread.S
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/kernel/kernel_thread.S
# 
# arch/frv/kernel/irq.c
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/kernel/irq.c
# 
# arch/frv/kernel/irq-routing.c
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/kernel/irq-routing.c
# 
# arch/frv/kernel/irq-mb93493.c
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/kernel/irq-mb93493.c
# 
# arch/frv/kernel/irq-mb93093.c
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/kernel/irq-mb93093.c
# 
# arch/frv/kernel/irq-mb93091.c
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/kernel/irq-mb93091.c
# 
# arch/frv/kernel/init_task.c
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/kernel/init_task.c
# 
# arch/frv/kernel/head-uc-fr555.S
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/kernel/head-uc-fr555.S
# 
# arch/frv/kernel/head-uc-fr451.S
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/kernel/head-uc-fr451.S
# 
# arch/frv/kernel/head-uc-fr401.S
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +311 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 4
# 
# arch/frv/kernel/Makefile
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/kernel/Makefile
# 
# arch/frv/kernel/head-uc-fr401.S
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/kernel/head-uc-fr401.S
# 
# ChangeSet
#   2005/01/04 21:16:34-08:00 dhowells@redhat.com 
#   [PATCH] FRV: Fujitsu FR-V CPU arch implementation part 3
#   
#   The attached patches provides part 3 of an architecture implementation
#   for the Fujitsu FR-V CPU series, configurably as Linux or uClinux.
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/frv/kernel/head.inc
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +50 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 3
# 
# arch/frv/kernel/head.S
#   2005/01/04 20:24:36-08:00 dhowells@redhat.com +638 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 3
# 
# arch/frv/kernel/head-mmu-fr451.S
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +374 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 3
# 
# arch/frv/kernel/head.inc
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/kernel/head.inc
# 
# arch/frv/kernel/head.S
#   2005/01/04 20:24:36-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/kernel/head.S
# 
# arch/frv/kernel/head-mmu-fr451.S
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/kernel/head-mmu-fr451.S
# 
# arch/frv/kernel/gdb-stub.c
#   2005/01/04 20:24:36-08:00 dhowells@redhat.com +2082 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 3
# 
# arch/frv/kernel/gdb-io.h
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +55 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 3
# 
# arch/frv/kernel/gdb-io.c
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +216 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 3
# 
# arch/frv/kernel/frv_ksyms.c
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +124 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 3
# 
# arch/frv/kernel/gdb-stub.c
#   2005/01/04 20:24:36-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/kernel/gdb-stub.c
# 
# arch/frv/kernel/gdb-io.h
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/kernel/gdb-io.h
# 
# arch/frv/kernel/gdb-io.c
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/kernel/gdb-io.c
# 
# arch/frv/kernel/frv_ksyms.c
#   2005/01/04 18:48:04-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/kernel/frv_ksyms.c
# 
# ChangeSet
#   2005/01/04 21:16:20-08:00 dhowells@redhat.com 
#   [PATCH] FRV: Fujitsu FR-V CPU arch implementation part 2
#   
#   The attached patches provides part 2 of an architecture implementation
#   for the Fujitsu FR-V CPU series, configurably as Linux or uClinux.
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/frv/kernel/entry.S
#   2005/01/04 20:24:37-08:00 dhowells@redhat.com +1420 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 2
# 
# arch/frv/kernel/entry-table.S
#   2005/01/04 20:24:37-08:00 dhowells@redhat.com +277 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 2
# 
# arch/frv/kernel/dma.c
#   2005/01/04 18:48:03-08:00 dhowells@redhat.com +464 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 2
# 
# arch/frv/kernel/debug-stub.c
#   2005/01/04 18:48:03-08:00 dhowells@redhat.com +259 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 2
# 
# arch/frv/kernel/cmode.S
#   2005/01/04 18:48:03-08:00 dhowells@redhat.com +190 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 2
# 
# arch/frv/kernel/entry.S
#   2005/01/04 20:24:37-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/kernel/entry.S
# 
# arch/frv/kernel/entry-table.S
#   2005/01/04 20:24:37-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/kernel/entry-table.S
# 
# arch/frv/kernel/dma.c
#   2005/01/04 18:48:03-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/kernel/dma.c
# 
# arch/frv/kernel/debug-stub.c
#   2005/01/04 18:48:03-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/kernel/debug-stub.c
# 
# arch/frv/kernel/cmode.S
#   2005/01/04 18:48:03-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/kernel/cmode.S
# 
# arch/frv/kernel/break.S
#   2005/01/04 20:24:37-08:00 dhowells@redhat.com +713 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 2
# 
# arch/frv/kernel/break.S
#   2005/01/04 20:24:37-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/kernel/break.S
# 
# ChangeSet
#   2005/01/04 21:16:06-08:00 dhowells@redhat.com 
#   [PATCH] FRV: Fujitsu FR-V CPU arch implementation part 1
#   
#   The attached patches provides part 1 of an architecture implementation
#   for the Fujitsu FR-V CPU series, configurably as Linux or uClinux.
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/frv/kernel/vmlinux.lds.S
#   2005/01/04 18:48:03-08:00 dhowells@redhat.com +187 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 1
# 
# arch/frv/boot/Makefile
#   2005/01/04 18:48:03-08:00 dhowells@redhat.com +73 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 1
# 
# arch/frv/Makefile
#   2005/01/04 18:48:03-08:00 dhowells@redhat.com +118 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 1
# 
# arch/frv/Kconfig
#   2005/01/04 20:24:36-08:00 dhowells@redhat.com +496 -0
#   FRV: Fujitsu FR-V CPU arch implementation part 1
# 
# arch/frv/kernel/vmlinux.lds.S
#   2005/01/04 18:48:03-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/kernel/vmlinux.lds.S
# 
# arch/frv/boot/Makefile
#   2005/01/04 18:48:03-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/boot/Makefile
# 
# arch/frv/Makefile
#   2005/01/04 18:48:03-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/Makefile
# 
# arch/frv/Kconfig
#   2005/01/04 20:24:36-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/frv/Kconfig
# 
# ChangeSet
#   2005/01/04 21:15:53-08:00 dhowells@redhat.com 
#   [PATCH] FRV: Fujitsu FR-V arch documentation
#   
#   The attached patch provides the arch-specific documentation for the Fujitsu
#   FR-V CPU arch.
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# Documentation/fujitsu/frv/mmu-layout.txt
#   2005/01/04 18:48:03-08:00 dhowells@redhat.com +306 -0
#   FRV: Fujitsu FR-V arch documentation
# 
# Documentation/fujitsu/frv/gdbstub.txt
#   2005/01/04 18:48:03-08:00 dhowells@redhat.com +130 -0
#   FRV: Fujitsu FR-V arch documentation
# 
# Documentation/fujitsu/frv/gdbinit
#   2005/01/04 18:48:03-08:00 dhowells@redhat.com +102 -0
#   FRV: Fujitsu FR-V arch documentation
# 
# Documentation/fujitsu/frv/features.txt
#   2005/01/04 18:48:03-08:00 dhowells@redhat.com +310 -0
#   FRV: Fujitsu FR-V arch documentation
# 
# Documentation/fujitsu/frv/configuring.txt
#   2005/01/04 18:48:03-08:00 dhowells@redhat.com +125 -0
#   FRV: Fujitsu FR-V arch documentation
# 
# Documentation/fujitsu/frv/clock.txt
#   2005/01/04 18:48:03-08:00 dhowells@redhat.com +65 -0
#   FRV: Fujitsu FR-V arch documentation
# 
# Documentation/fujitsu/frv/booting.txt
#   2005/01/04 18:48:03-08:00 dhowells@redhat.com +181 -0
#   FRV: Fujitsu FR-V arch documentation
# 
# Documentation/fujitsu/frv/README.txt
#   2005/01/04 18:48:03-08:00 dhowells@redhat.com +51 -0
#   FRV: Fujitsu FR-V arch documentation
# 
# Documentation/fujitsu/frv/mmu-layout.txt
#   2005/01/04 18:48:03-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/Documentation/fujitsu/frv/mmu-layout.txt
# 
# Documentation/fujitsu/frv/gdbstub.txt
#   2005/01/04 18:48:03-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/Documentation/fujitsu/frv/gdbstub.txt
# 
# Documentation/fujitsu/frv/gdbinit
#   2005/01/04 18:48:03-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/Documentation/fujitsu/frv/gdbinit
# 
# Documentation/fujitsu/frv/features.txt
#   2005/01/04 18:48:03-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/Documentation/fujitsu/frv/features.txt
# 
# Documentation/fujitsu/frv/configuring.txt
#   2005/01/04 18:48:03-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/Documentation/fujitsu/frv/configuring.txt
# 
# Documentation/fujitsu/frv/clock.txt
#   2005/01/04 18:48:03-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/Documentation/fujitsu/frv/clock.txt
# 
# Documentation/fujitsu/frv/booting.txt
#   2005/01/04 18:48:03-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/Documentation/fujitsu/frv/booting.txt
# 
# Documentation/fujitsu/frv/atomic-ops.txt
#   2005/01/04 18:48:03-08:00 dhowells@redhat.com +134 -0
#   FRV: Fujitsu FR-V arch documentation
# 
# Documentation/fujitsu/frv/README.txt
#   2005/01/04 18:48:03-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/Documentation/fujitsu/frv/README.txt
# 
# Documentation/fujitsu/frv/atomic-ops.txt
#   2005/01/04 18:48:03-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/Documentation/fujitsu/frv/atomic-ops.txt
# 
# ChangeSet
#   2005/01/04 21:15:39-08:00 dhowells@redhat.com 
#   [PATCH] FRV: Fujitsu FR-V CPU arch maintainer record
#   
#   The attached patch supplies the maintainer record for an architecture
#   implementation for the Fujistu FR-V CPU series.
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# MAINTAINERS
#   2005/01/04 18:48:03-08:00 dhowells@redhat.com +5 -0
#   FRV: Fujitsu FR-V CPU arch maintainer record
# 
# ChangeSet
#   2005/01/04 21:15:26-08:00 dhowells@redhat.com 
#   [PATCH] VM routine fixes
#   
#   The attached patch fixes a number of problems in the VM routines:
#   
#    (1) Some inline funcs don't compile if CONFIG_MMU is not set.
#   
#    (2) swapper_pml4 needn't exist if CONFIG_MMU is not set.
#   
#    (3) __free_pages_ok() doesn't counter set_page_refs() different behaviour if
#        CONFIG_MMU is not set.
#   
#    (4) swsusp.c invokes TLB flushing functions without including the header file
#        that declares them.
#   
#   CONFIG_SHMEM semantics:
#   
#   - If MMU: Always enabled if !EMBEDDED
#   
#   - If MMU && EMBEDDED: configurable
#   
#   - If !MMU: disabled
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# mm/tiny-shmem.c
#   2005/01/04 20:24:38-08:00 dhowells@redhat.com +2 -0
#   VM routine fixes
# 
# mm/page_alloc.c
#   2005/01/04 18:48:03-08:00 dhowells@redhat.com +11 -2
#   VM routine fixes
# 
# mm/internal.h
#   2005/01/04 18:48:03-08:00 dhowells@redhat.com +13 -0
#   VM routine fixes
# 
# mm/bootmem.c
#   2005/01/04 18:48:03-08:00 dhowells@redhat.com +6 -4
#   VM routine fixes
# 
# mm/Makefile
#   2005/01/04 20:24:35-08:00 dhowells@redhat.com +2 -2
#   VM routine fixes
# 
# kernel/sysctl.c
#   2005/01/04 20:24:26-08:00 dhowells@redhat.com +4 -0
#   VM routine fixes
# 
# kernel/power/swsusp.c
#   2005/01/04 18:48:03-08:00 dhowells@redhat.com +1 -0
#   VM routine fixes
# 
# init/Kconfig
#   2005/01/04 18:48:03-08:00 dhowells@redhat.com +2 -1
#   VM routine fixes
# 
# mm/internal.h
#   2005/01/04 18:48:03-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/mm/internal.h
# 
# ChangeSet
#   2005/01/04 21:15:13-08:00 dhowells@redhat.com 
#   [PATCH] frv: add initdata variable spec in a header file
#   
#   The attached patch marks a variable as __initdata in a header file so that
#   the FRV gcc generates the correct access method as initdata variables are
#   too far from the GPREL pointer to access directly.
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/bootmem.h
#   2005/01/04 18:48:03-08:00 dhowells@redhat.com +1 -1
#   frv: add initdata variable spec in a header file
# 
# ChangeSet
#   2005/01/04 21:15:00-08:00 dhowells@redhat.com 
#   [PATCH] GP-REL data support
#   
#   The attached patch makes it possible to support gp-rel addressing for small
#   variables.  Since the FR-V cpu's have fixed-length instructions and plenty of
#   general-purpose registers, one register is nominated as a base for the small
#   data area.  This makes it possible to use single-insn accesses to access
#   global and static variables instead of having to use multiple instructions.
#   
#   This, however, causes problems with small variables used to pinpoint the
#   beginning and end of sections.  The compiler assumes it can use gp-rel
#   addressing for these, but the linker then complains because the displacement
#   is out of range.
#   
#   By declaring certain variables as arrays or by forcing them into named
#   sections, the compiler is persuaded to access them as if they can be outside
#   the displacement range.  Declaring the variables as "const void" type also
#   works.
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# security/security.c
#   2005/01/04 18:48:02-08:00 dhowells@redhat.com +2 -2
#   GP-REL data support
# 
# kernel/power/swsusp.c
#   2005/01/04 20:24:45-08:00 dhowells@redhat.com +1 -1
#   GP-REL data support
# 
# kernel/kallsyms.c
#   2005/01/04 18:48:02-08:00 dhowells@redhat.com +3 -4
#   GP-REL data support
# 
# init/version.c
#   2005/01/04 18:48:02-08:00 dhowells@redhat.com +1 -1
#   GP-REL data support
# 
# init/main.c
#   2005/01/04 20:24:40-08:00 dhowells@redhat.com +7 -9
#   GP-REL data support
# 
# init/initramfs.c
#   2005/01/04 18:48:02-08:00 dhowells@redhat.com +3 -3
#   GP-REL data support
# 
# include/linux/kernel.h
#   2005/01/04 20:24:26-08:00 dhowells@redhat.com +2 -0
#   GP-REL data support
# 
# include/linux/jiffies.h
#   2005/01/04 18:48:02-08:00 dhowells@redhat.com +8 -2
#   GP-REL data support
# 
# include/linux/init.h
#   2005/01/04 18:48:02-08:00 dhowells@redhat.com +2 -2
#   GP-REL data support
# 
# include/asm-sparc64/sections.h
#   2005/01/04 18:48:02-08:00 dhowells@redhat.com +1 -1
#   GP-REL data support
# 
# include/asm-ppc/sections.h
#   2005/01/04 18:48:02-08:00 dhowells@redhat.com +0 -2
#   GP-REL data support
# 
# include/asm-ia64/sections.h
#   2005/01/04 18:48:02-08:00 dhowells@redhat.com +0 -1
#   GP-REL data support
# 
# include/asm-generic/sections.h
#   2005/01/04 18:48:02-08:00 dhowells@redhat.com +1 -0
#   GP-REL data support
# 
# fs/proc/proc_misc.c
#   2005/01/04 20:24:39-08:00 dhowells@redhat.com +0 -1
#   GP-REL data support
# 
# drivers/char/tty_io.c
#   2005/01/04 20:24:30-08:00 dhowells@redhat.com +2 -2
#   GP-REL data support
# 
# ChangeSet
#   2005/01/04 21:14:46-08:00 dhowells@redhat.com 
#   [PATCH] out-of-line implementation of find_next_bit()
#   
#   The attached patch provides an out-of-line implementation of find_next_bit()
#   and rearranges linux/bitops.h to avoid a dependency loop between inline
#   functions in there and in asm/bitops.h trying to include one another.
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# lib/find_next_bit.c
#   2005/01/04 18:48:02-08:00 dhowells@redhat.com +55 -0
#   out-of-line implementation of find_next_bit()
# 
# lib/Makefile
#   2005/01/04 20:24:21-08:00 dhowells@redhat.com +1 -0
#   out-of-line implementation of find_next_bit()
# 
# include/linux/bitops.h
#   2005/01/04 18:48:02-08:00 dhowells@redhat.com +6 -1
#   out-of-line implementation of find_next_bit()
# 
# lib/find_next_bit.c
#   2005/01/04 18:48:02-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/lib/find_next_bit.c
# 
# ChangeSet
#   2005/01/04 21:14:32-08:00 sfr@canb.auug.org.au 
#   [PATCH] ppc64: tidy up the htab_data structure
#   
#   More tidying up.
#   
#   The htab_data structure contained 5 fields or which two were completely
#   unused and one other was just kept for printing at boot time.  I have mode
#   the remaining two into global variables.
#   
#   Built and booted on iSeries (which is always lpar) and on pSeries without
#   partitioning.
#   
#   Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-ppc64/mmu.h
#   2005/01/04 18:48:02-08:00 sfr@canb.auug.org.au +2 -9
#   ppc64: tidy up the htab_data structure
# 
# arch/ppc64/mm/init.c
#   2005/01/04 18:48:02-08:00 sfr@canb.auug.org.au +1 -1
#   ppc64: tidy up the htab_data structure
# 
# arch/ppc64/mm/hugetlbpage.c
#   2005/01/04 18:48:02-08:00 sfr@canb.auug.org.au +4 -4
#   ppc64: tidy up the htab_data structure
# 
# arch/ppc64/mm/hash_utils.c
#   2005/01/04 18:48:02-08:00 sfr@canb.auug.org.au +7 -7
#   ppc64: tidy up the htab_data structure
# 
# arch/ppc64/mm/hash_native.c
#   2005/01/04 18:48:02-08:00 sfr@canb.auug.org.au +9 -9
#   ppc64: tidy up the htab_data structure
# 
# arch/ppc64/mm/hash_low.S
#   2005/01/04 18:48:02-08:00 sfr@canb.auug.org.au +2 -2
#   ppc64: tidy up the htab_data structure
# 
# arch/ppc64/kernel/setup.c
#   2005/01/04 20:24:26-08:00 sfr@canb.auug.org.au +3 -3
#   ppc64: tidy up the htab_data structure
# 
# arch/ppc64/kernel/pSeries_lpar.c
#   2005/01/04 18:48:02-08:00 sfr@canb.auug.org.au +1 -1
#   ppc64: tidy up the htab_data structure
# 
# arch/ppc64/kernel/iSeries_setup.c
#   2005/01/04 18:48:02-08:00 sfr@canb.auug.org.au +3 -5
#   ppc64: tidy up the htab_data structure
# 
# ChangeSet
#   2005/01/04 21:14:19-08:00 sfr@canb.auug.org.au 
#   [PATCH] ppc64: use c99 initializers
#   
#   This patch is just more clean up in the ppc64 arch.  It uses c99 initializers
#   for various iSeries structures that are used to pass information to the
#   hypervisor.  Also itLpNaca is not used by any code that could be in a module,
#   so don't export it.
#   
#   Built and booted.
#   
#   Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/ppc64/kernel/ppc_ksyms.c
#   2005/01/04 18:48:02-08:00 sfr@canb.auug.org.au +0 -3
#   ppc64: use c99 initializers
# 
# arch/ppc64/kernel/LparData.c
#   2005/01/04 18:48:02-08:00 sfr@canb.auug.org.au +61 -59
#   ppc64: use c99 initializers
# 
# ChangeSet
#   2005/01/04 21:14:06-08:00 sfr@canb.auug.org.au 
#   [PATCH] ppc64: remove StudlyCaps from lppaca structure
#   
#   This patch just renames all the fields (and the structure name) of the
#   lppaca structure to rid us of some more StudyCaps.
#   
#   Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-ppc64/time.h
#   2005/01/04 18:48:02-08:00 sfr@canb.auug.org.au +2 -2
#   ppc64: remove StudlyCaps from lppaca structure
# 
# include/asm-ppc64/spinlock.h
#   2005/01/04 18:48:02-08:00 sfr@canb.auug.org.au +1 -1
#   ppc64: remove StudlyCaps from lppaca structure
# 
# include/asm-ppc64/paca.h
#   2005/01/04 18:48:02-08:00 sfr@canb.auug.org.au +4 -4
#   ppc64: remove StudlyCaps from lppaca structure
# 
# include/asm-ppc64/lppaca.h
#   2005/01/04 18:48:02-08:00 sfr@canb.auug.org.au +56 -58
#   ppc64: remove StudlyCaps from lppaca structure
# 
# arch/ppc64/xmon/xmon.c
#   2005/01/04 18:48:02-08:00 sfr@canb.auug.org.au +4 -4
#   ppc64: remove StudlyCaps from lppaca structure
# 
# arch/ppc64/lib/locks.c
#   2005/01/04 18:48:02-08:00 sfr@canb.auug.org.au +2 -2
#   ppc64: remove StudlyCaps from lppaca structure
# 
# arch/ppc64/kernel/time.c
#   2005/01/04 20:24:30-08:00 sfr@canb.auug.org.au +2 -2
#   ppc64: remove StudlyCaps from lppaca structure
# 
# arch/ppc64/kernel/sysfs.c
#   2005/01/04 18:48:02-08:00 sfr@canb.auug.org.au +1 -1
#   ppc64: remove StudlyCaps from lppaca structure
# 
# arch/ppc64/kernel/pacaData.c
#   2005/01/04 18:48:02-08:00 sfr@canb.auug.org.au +8 -8
#   ppc64: remove StudlyCaps from lppaca structure
# 
# arch/ppc64/kernel/lparcfg.c
#   2005/01/04 18:48:02-08:00 sfr@canb.auug.org.au +6 -6
#   ppc64: remove StudlyCaps from lppaca structure
# 
# arch/ppc64/kernel/irq.c
#   2005/01/04 18:48:02-08:00 sfr@canb.auug.org.au +4 -4
#   ppc64: remove StudlyCaps from lppaca structure
# 
# arch/ppc64/kernel/idle.c
#   2005/01/04 20:24:21-08:00 sfr@canb.auug.org.au +8 -8
#   ppc64: remove StudlyCaps from lppaca structure
# 
# arch/ppc64/kernel/iSeries_smp.c
#   2005/01/04 18:48:02-08:00 sfr@canb.auug.org.au +3 -3
#   ppc64: remove StudlyCaps from lppaca structure
# 
# arch/ppc64/kernel/iSeries_setup.c
#   2005/01/04 20:24:46-08:00 sfr@canb.auug.org.au +2 -2
#   ppc64: remove StudlyCaps from lppaca structure
# 
# arch/ppc64/kernel/asm-offsets.c
#   2005/01/04 18:48:02-08:00 sfr@canb.auug.org.au +4 -4
#   ppc64: remove StudlyCaps from lppaca structure
# 
# ChangeSet
#   2005/01/04 21:13:53-08:00 sfr@canb.auug.org.au 
#   [PATCH] ppc64: move the lppaca defining header file
#   
#   This patch just renames asm/iSeries/ItLpPaca.h to asm/lppaca.h as the
#   lppaca structure is no longer just legacy iSeries specific.
#   
#   Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-ppc64/paca.h
#   2005/01/04 20:24:47-08:00 sfr@canb.auug.org.au +1 -1
#   ppc64: move the lppaca defining header file
# 
# include/asm-ppc64/lppaca.h
#   2005/01/04 20:24:47-08:00 sfr@canb.auug.org.au +28 -28
#   ppc64: move the lppaca defining header file
# 
# include/asm-ppc64/iSeries/LparData.h
#   2005/01/04 18:48:01-08:00 sfr@canb.auug.org.au +0 -1
#   ppc64: move the lppaca defining header file
# 
# arch/ppc64/kernel/sysfs.c
#   2005/01/04 20:24:47-08:00 sfr@canb.auug.org.au +1 -1
#   ppc64: move the lppaca defining header file
# 
# arch/ppc64/kernel/pacaData.c
#   2005/01/04 20:24:47-08:00 sfr@canb.auug.org.au +1 -1
#   ppc64: move the lppaca defining header file
# 
# arch/ppc64/kernel/lparcfg.c
#   2005/01/04 20:24:47-08:00 sfr@canb.auug.org.au +1 -1
#   ppc64: move the lppaca defining header file
# 
# arch/ppc64/kernel/iSeries_proc.c
#   2005/01/04 18:48:01-08:00 sfr@canb.auug.org.au +1 -1
#   ppc64: move the lppaca defining header file
# 
# arch/ppc64/kernel/asm-offsets.c
#   2005/01/04 20:24:47-08:00 sfr@canb.auug.org.au +1 -1
#   ppc64: move the lppaca defining header file
# 
# arch/ppc64/kernel/LparData.c
#   2005/01/04 20:24:46-08:00 sfr@canb.auug.org.au +1 -1
#   ppc64: move the lppaca defining header file
# 
# ChangeSet
#   2005/01/04 21:13:18-08:00 sfr@canb.auug.org.au 
#   [PATCH] ppc64: use xPMCRegsInUse
#   
#   This fixes an aweful piece of code that could have just referenced
#   xPMCRegsInUse in the lppaca structure.
#   
#   Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/ppc64/kernel/sysfs.c
#   2005/01/04 20:24:47-08:00 sfr@canb.auug.org.au +4 -4
#   ppc64: use xPMCRegsInUse
# 
# ChangeSet
#   2005/01/04 21:13:07-08:00 sfr@canb.auug.org.au 
#   [PATCH] ppc64: remove the naca from all but iSeries
#   
#   This patch finally removes the naca from all architectures except legacy
#   iSeries and in the process makes it a structure instead of a pointer.
#   
#   Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-ppc64/naca.h
#   2005/01/04 18:48:01-08:00 sfr@canb.auug.org.au +1 -2
#   ppc64: remove the naca from all but iSeries
# 
# include/asm-ppc64/iSeries/HvReleaseData.h
#   2005/01/04 18:48:01-08:00 sfr@canb.auug.org.au +1 -0
#   ppc64: remove the naca from all but iSeries
# 
# arch/ppc64/kernel/pacaData.c
#   2005/01/04 20:24:47-08:00 sfr@canb.auug.org.au +0 -3
#   ppc64: remove the naca from all but iSeries
# 
# arch/ppc64/kernel/iSeries_setup.c
#   2005/01/04 20:24:47-08:00 sfr@canb.auug.org.au +8 -8
#   ppc64: remove the naca from all but iSeries
# 
# arch/ppc64/kernel/head.S
#   2005/01/04 18:48:01-08:00 sfr@canb.auug.org.au +2 -19
#   ppc64: remove the naca from all but iSeries
# 
# arch/ppc64/kernel/LparData.c
#   2005/01/04 20:24:47-08:00 sfr@canb.auug.org.au +1 -1
#   ppc64: remove the naca from all but iSeries
# 
# ChangeSet
#   2005/01/04 21:12:54-08:00 sfr@canb.auug.org.au 
#   [PATCH] ppc64: remove debug_switch from the naca
#   
#   The patch moves the debug_switch from the naca to a global variable.
#   
#   Also, a couple of trivial naming tidy ups.
#   
#   Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-ppc64/ppcdebug.h
#   2005/01/04 18:48:01-08:00 sfr@canb.auug.org.au +4 -1
#   ppc64: remove debug_switch from the naca
# 
# include/asm-ppc64/naca.h
#   2005/01/04 20:24:47-08:00 sfr@canb.auug.org.au +0 -3
#   ppc64: remove debug_switch from the naca
# 
# arch/ppc64/xmon/xmon.c
#   2005/01/04 20:24:47-08:00 sfr@canb.auug.org.au +5 -6
#   ppc64: remove debug_switch from the naca
# 
# arch/ppc64/kernel/udbg.c
#   2005/01/04 18:48:01-08:00 sfr@canb.auug.org.au +2 -3
#   ppc64: remove debug_switch from the naca
# 
# arch/ppc64/kernel/setup.c
#   2005/01/04 20:24:46-08:00 sfr@canb.auug.org.au +10 -11
#   ppc64: remove debug_switch from the naca
# 
# arch/ppc64/kernel/pSeries_setup.c
#   2005/01/04 18:48:01-08:00 sfr@canb.auug.org.au +1 -2
#   ppc64: remove debug_switch from the naca
# 
# ChangeSet
#   2005/01/04 21:12:41-08:00 sfr@canb.auug.org.au 
#   [PATCH] ppc64: remove serialPortAddr from the naca
#   
#   The serialPortAddr field of the naca was only being used locally, remove
#   it.
#   
#   Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-ppc64/naca.h
#   2005/01/04 20:24:48-08:00 sfr@canb.auug.org.au +0 -1
#   ppc64: remove serialPortAddr from the naca
# 
# arch/ppc64/kernel/setup.c
#   2005/01/04 20:24:48-08:00 sfr@canb.auug.org.au +4 -3
#   ppc64: remove serialPortAddr from the naca
# 
# arch/ppc64/kernel/pSeries_setup.c
#   2005/01/04 20:24:48-08:00 sfr@canb.auug.org.au +6 -4
#   ppc64: remove serialPortAddr from the naca
# 
# arch/ppc64/kernel/maple_setup.c
#   2005/01/04 18:48:01-08:00 sfr@canb.auug.org.au +7 -5
#   ppc64: remove serialPortAddr from the naca
# 
# ChangeSet
#   2005/01/04 21:12:28-08:00 sfr@canb.auug.org.au 
#   [PATCH] ppc64: remove the paca pointer form the naca
#   
#   The only place that was using the paca pointer that was in the naca was some
#   assembler that used it to find a parameter to pass to some C code.  That C
#   code did not even declare that parameter!
#   
#   Remove the paca pointer.
#   
#   Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-ppc64/naca.h
#   2005/01/04 20:24:48-08:00 sfr@canb.auug.org.au +0 -2
#   ppc64: remove the paca pointer form the naca
# 
# arch/ppc64/kernel/head.S
#   2005/01/04 20:24:47-08:00 sfr@canb.auug.org.au +1 -9
#   ppc64: remove the paca pointer form the naca
# 
# arch/ppc64/kernel/asm-offsets.c
#   2005/01/04 20:24:47-08:00 sfr@canb.auug.org.au +0 -3
#   ppc64: remove the paca pointer form the naca
# 
# ChangeSet
#   2005/01/04 21:12:14-08:00 sfr@canb.auug.org.au 
#   [PATCH] ppc64: remove /proc/ppc64/{naca,paca/xx}
#   
#   This patch removes the (unused) /proc entries for the naca and the (per cpu)
#   pacas.  Also it removes a lot of no longer necessary includes of <asm/naca.h>.
#   
#   Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-ppc64/iSeries/LparData.h
#   2005/01/04 20:24:47-08:00 sfr@canb.auug.org.au +0 -2
#   ppc64: remove /proc/ppc64/{naca,paca/xx}
# 
# arch/ppc64/mm/stab.c
#   2005/01/04 18:48:01-08:00 sfr@canb.auug.org.au +0 -1
#   ppc64: remove /proc/ppc64/{naca,paca/xx}
# 
# arch/ppc64/mm/slb.c
#   2005/01/04 18:48:01-08:00 sfr@canb.auug.org.au +0 -1
#   ppc64: remove /proc/ppc64/{naca,paca/xx}
# 
# arch/ppc64/mm/init.c
#   2005/01/04 20:24:46-08:00 sfr@canb.auug.org.au +0 -1
#   ppc64: remove /proc/ppc64/{naca,paca/xx}
# 
# arch/ppc64/kernel/smp.c
#   2005/01/04 20:24:21-08:00 sfr@canb.auug.org.au +0 -1
#   ppc64: remove /proc/ppc64/{naca,paca/xx}
# 
# arch/ppc64/kernel/prom_init.c
#   2005/01/04 18:48:01-08:00 sfr@canb.auug.org.au +0 -1
#   ppc64: remove /proc/ppc64/{naca,paca/xx}
# 
# arch/ppc64/kernel/proc_ppc64.c
#   2005/01/04 18:48:01-08:00 sfr@canb.auug.org.au +0 -38
#   ppc64: remove /proc/ppc64/{naca,paca/xx}
# 
# arch/ppc64/kernel/pci_dn.c
#   2005/01/04 18:48:01-08:00 sfr@canb.auug.org.au +0 -1
#   ppc64: remove /proc/ppc64/{naca,paca/xx}
# 
# arch/ppc64/kernel/pSeries_smp.c
#   2005/01/04 18:48:01-08:00 sfr@canb.auug.org.au +0 -1
#   ppc64: remove /proc/ppc64/{naca,paca/xx}
# 
# arch/ppc64/kernel/pSeries_pci.c
#   2005/01/04 18:48:01-08:00 sfr@canb.auug.org.au +0 -1
#   ppc64: remove /proc/ppc64/{naca,paca/xx}
# 
# arch/ppc64/kernel/iSeries_smp.c
#   2005/01/04 20:24:47-08:00 sfr@canb.auug.org.au +0 -1
#   ppc64: remove /proc/ppc64/{naca,paca/xx}
# 
# arch/ppc64/kernel/iSeries_proc.c
#   2005/01/04 20:24:47-08:00 sfr@canb.auug.org.au +0 -1
#   ppc64: remove /proc/ppc64/{naca,paca/xx}
# 
# arch/ppc64/kernel/iSeries_pci.c
#   2005/01/04 20:24:26-08:00 sfr@canb.auug.org.au +0 -1
#   ppc64: remove /proc/ppc64/{naca,paca/xx}
# 
# ChangeSet
#   2005/01/04 21:12:02-08:00 sfr@canb.auug.org.au 
#   [PATCH] ppc64: remove interrupt_controller from naca
#   
#   This patch just moves the interrupt_controller field of the naca into a
#   global variable.
#   
#   Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-ppc64/processor.h
#   2005/01/04 18:48:00-08:00 sfr@canb.auug.org.au +1 -0
#   ppc64: remove interrupt_controller from naca
# 
# include/asm-ppc64/naca.h
#   2005/01/04 20:24:48-08:00 sfr@canb.auug.org.au +0 -1
#   ppc64: remove interrupt_controller from naca
# 
# arch/ppc64/kernel/xics.c
#   2005/01/04 18:48:00-08:00 sfr@canb.auug.org.au +1 -2
#   ppc64: remove interrupt_controller from naca
# 
# arch/ppc64/kernel/setup.c
#   2005/01/04 20:24:48-08:00 sfr@canb.auug.org.au +1 -1
#   ppc64: remove interrupt_controller from naca
# 
# arch/ppc64/kernel/prom.c
#   2005/01/04 18:48:00-08:00 sfr@canb.auug.org.au +1 -2
#   ppc64: remove interrupt_controller from naca
# 
# arch/ppc64/kernel/pmac_setup.c
#   2005/01/04 18:48:00-08:00 sfr@canb.auug.org.au +1 -2
#   ppc64: remove interrupt_controller from naca
# 
# arch/ppc64/kernel/pSeries_smp.c
#   2005/01/04 20:24:48-08:00 sfr@canb.auug.org.au +1 -1
#   ppc64: remove interrupt_controller from naca
# 
# arch/ppc64/kernel/pSeries_setup.c
#   2005/01/04 20:24:48-08:00 sfr@canb.auug.org.au +4 -4
#   ppc64: remove interrupt_controller from naca
# 
# arch/ppc64/kernel/pSeries_pci.c
#   2005/01/04 20:24:48-08:00 sfr@canb.auug.org.au +2 -2
#   ppc64: remove interrupt_controller from naca
# 
# arch/ppc64/kernel/maple_setup.c
#   2005/01/04 20:24:48-08:00 sfr@canb.auug.org.au +1 -1
#   ppc64: remove interrupt_controller from naca
# 
# arch/ppc64/kernel/irq.c
#   2005/01/04 20:24:47-08:00 sfr@canb.auug.org.au +2 -1
#   ppc64: remove interrupt_controller from naca
# 
# ChangeSet
#   2005/01/04 21:11:49-08:00 sfr@canb.auug.org.au 
#   [PATCH] ppc64: remove the page table size from the naca
#   
#   This patch just removes the page table size field from the naca (and makes
#   it ppc64_pft_size instead).
#   
#   Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-ppc64/page.h
#   2005/01/04 18:48:00-08:00 sfr@canb.auug.org.au +2 -0
#   ppc64: remove the page table size from the naca
# 
# include/asm-ppc64/naca.h
#   2005/01/04 20:24:49-08:00 sfr@canb.auug.org.au +0 -2
#   ppc64: remove the page table size from the naca
# 
# arch/ppc64/mm/hash_utils.c
#   2005/01/04 20:24:46-08:00 sfr@canb.auug.org.au +1 -2
#   ppc64: remove the page table size from the naca
# 
# arch/ppc64/kernel/setup.c
#   2005/01/04 20:24:49-08:00 sfr@canb.auug.org.au +3 -1
#   ppc64: remove the page table size from the naca
# 
# arch/ppc64/kernel/prom.c
#   2005/01/04 20:24:49-08:00 sfr@canb.auug.org.au +6 -6
#   ppc64: remove the page table size from the naca
# 
# arch/ppc64/kernel/pSeries_lpar.c
#   2005/01/04 20:24:46-08:00 sfr@canb.auug.org.au +1 -2
#   ppc64: remove the page table size from the naca
# 
# ChangeSet
#   2005/01/04 21:11:36-08:00 sfr@canb.auug.org.au 
#   [PATCH] ppc64: consolidate cache sizing variables
#   
#   This patch consolidates the variables that define the PPC64 cache sizes into a
#   single structure (the were in the naca and the systemcfg structures).  Those
#   that were in the systemcfg structure are left there just because they are
#   exported to user mode through /proc.
#   
#   Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-ppc64/systemcfg.h
#   2005/01/04 18:48:00-08:00 sfr@canb.auug.org.au +5 -12
#   ppc64: consolidate cache sizing variables
# 
# include/asm-ppc64/processor.h
#   2005/01/04 20:24:49-08:00 sfr@canb.auug.org.au +1 -0
#   ppc64: consolidate cache sizing variables
# 
# include/asm-ppc64/page.h
#   2005/01/04 20:24:49-08:00 sfr@canb.auug.org.au +3 -3
#   ppc64: consolidate cache sizing variables
# 
# include/asm-ppc64/naca.h
#   2005/01/04 20:24:49-08:00 sfr@canb.auug.org.au +1 -11
#   ppc64: consolidate cache sizing variables
# 
# include/asm-ppc64/cache.h
#   2005/01/04 18:48:00-08:00 sfr@canb.auug.org.au +19 -0
#   ppc64: consolidate cache sizing variables
# 
# arch/ppc64/kernel/traps.c
#   2005/01/04 18:48:00-08:00 sfr@canb.auug.org.au +1 -0
#   ppc64: consolidate cache sizing variables
# 
# arch/ppc64/kernel/time.c
#   2005/01/04 20:24:47-08:00 sfr@canb.auug.org.au +1 -0
#   ppc64: consolidate cache sizing variables
# 
# arch/ppc64/kernel/sysfs.c
#   2005/01/04 20:24:47-08:00 sfr@canb.auug.org.au +1 -0
#   ppc64: consolidate cache sizing variables
# 
# arch/ppc64/kernel/sys_ppc32.c
#   2005/01/04 20:24:30-08:00 sfr@canb.auug.org.au +1 -0
#   ppc64: consolidate cache sizing variables
# 
# arch/ppc64/kernel/setup.c
#   2005/01/04 20:24:49-08:00 sfr@canb.auug.org.au +19 -14
#   ppc64: consolidate cache sizing variables
# 
# arch/ppc64/kernel/rtasd.c
#   2005/01/04 18:48:00-08:00 sfr@canb.auug.org.au +1 -0
#   ppc64: consolidate cache sizing variables
# 
# arch/ppc64/kernel/rtas.c
#   2005/01/04 18:48:00-08:00 sfr@canb.auug.org.au +1 -0
#   ppc64: consolidate cache sizing variables
# 
# arch/ppc64/kernel/rtas-proc.c
#   2005/01/04 18:48:00-08:00 sfr@canb.auug.org.au +1 -0
#   ppc64: consolidate cache sizing variables
# 
# arch/ppc64/kernel/ppc_ksyms.c
#   2005/01/04 20:24:46-08:00 sfr@canb.auug.org.au +0 -2
#   ppc64: consolidate cache sizing variables
# 
# arch/ppc64/kernel/pmac_setup.c
#   2005/01/04 20:24:49-08:00 sfr@canb.auug.org.au +1 -0
#   ppc64: consolidate cache sizing variables
# 
# arch/ppc64/kernel/pacaData.c
#   2005/01/04 20:24:47-08:00 sfr@canb.auug.org.au +4 -0
#   ppc64: consolidate cache sizing variables
# 
# arch/ppc64/kernel/pSeries_iommu.c
#   2005/01/04 18:48:00-08:00 sfr@canb.auug.org.au +1 -0
#   ppc64: consolidate cache sizing variables
# 
# arch/ppc64/kernel/nvram.c
#   2005/01/04 18:48:00-08:00 sfr@canb.auug.org.au +1 -0
#   ppc64: consolidate cache sizing variables
# 
# arch/ppc64/kernel/misc.S
#   2005/01/04 20:24:30-08:00 sfr@canb.auug.org.au +15 -22
#   ppc64: consolidate cache sizing variables
# 
# arch/ppc64/kernel/idle.c
#   2005/01/04 20:24:47-08:00 sfr@canb.auug.org.au +1 -0
#   ppc64: consolidate cache sizing variables
# 
# arch/ppc64/kernel/iSeries_setup.c
#   2005/01/04 20:24:47-08:00 sfr@canb.auug.org.au +17 -13
#   ppc64: consolidate cache sizing variables
# 
# arch/ppc64/kernel/eeh.c
#   2005/01/04 18:48:00-08:00 sfr@canb.auug.org.au +1 -0
#   ppc64: consolidate cache sizing variables
# 
# arch/ppc64/kernel/asm-offsets.c
#   2005/01/04 20:24:48-08:00 sfr@canb.auug.org.au +7 -6
#   ppc64: consolidate cache sizing variables
# 
# ChangeSet
#   2005/01/04 21:11:24-08:00 paulus@samba.org 
#   [PATCH] ppc64: simplify timer_interrupt
#   
#   This patch is from Milton Miller <miltonm@bga.com>.
#   
#   When the update_process_times call was moved out of do_timer for the UP
#   case, the replicator didn't track down the hiding and just added ifndef
#   SMP.
#   
#   This removes the ifdefs and the indirection of calling another file for one
#   function in a third file.
#   
#   Signed-off-by: Milton Miller <miltonm@bga.com>
#   Signed-off-by: Paul Mackerras <paulus@samba.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/ppc64/kernel/time.c
#   2005/01/04 20:24:50-08:00 paulus@samba.org +1 -9
#   ppc64: simplify timer_interrupt
# 
# arch/ppc64/kernel/smp.c
#   2005/01/04 20:24:48-08:00 paulus@samba.org +0 -5
#   ppc64: simplify timer_interrupt
# 
# ChangeSet
#   2005/01/04 21:11:12-08:00 anton@samba.org 
#   [PATCH] ppc64: remove stale prom.h code
#   
#   Remove some stale code in prom.h
#   
#   Signed-off-by: Anton Blanchard <anton@samba.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-ppc64/prom.h
#   2005/01/04 18:48:00-08:00 anton@samba.org +0 -28
#   ppc64: remove stale prom.h code
# 
# ChangeSet
#   2005/01/04 21:10:59-08:00 anton@samba.org 
#   [PATCH] ppc64: fix some compiler warnings
#   
#   Fix some compiler warnings:
#   
#   - The first two are spurious gcc warnings, but quieten them up regardless
#   - Add a missing include
#   - Use register_sysrq_key instead of __sysrq_put_key_op
#   
#   Signed-off-by: Anton Blanchard <anton@samba.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/ppc64/xmon/start.c
#   2005/01/04 18:47:59-08:00 anton@samba.org +1 -1
#   ppc64: fix some compiler warnings
# 
# arch/ppc64/mm/hash_native.c
#   2005/01/04 20:24:46-08:00 anton@samba.org +1 -1
#   ppc64: fix some compiler warnings
# 
# arch/ppc64/kernel/pSeries_setup.c
#   2005/01/04 20:24:49-08:00 anton@samba.org +1 -0
#   ppc64: fix some compiler warnings
# 
# arch/ppc64/kernel/pSeries_lpar.c
#   2005/01/04 20:24:49-08:00 anton@samba.org +1 -1
#   ppc64: fix some compiler warnings
# 
# ChangeSet
#   2005/01/04 21:10:46-08:00 anton@samba.org 
#   [PATCH] ppc64: Clarify rtasd printk
#   
#   On machines with RTAS but without event-scan support we would incorrectly
#   claim there was no RTAS on the system.
#   
#   Signed-off-by: Anton Blanchard <anton@samba.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/ppc64/kernel/rtasd.c
#   2005/01/04 20:24:50-08:00 anton@samba.org +1 -1
#   ppc64: Clarify rtasd printk
# 
# ChangeSet
#   2005/01/04 21:10:33-08:00 anton@samba.org 
#   [PATCH] ppc64: catch bad xmon read/write SPR commands
#   
#   Protect the read/write SPR xmon commands.
#   
#   Signed-off-by: Anton Blanchard <anton@samba.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/ppc64/xmon/xmon.c
#   2005/01/04 20:24:48-08:00 anton@samba.org +22 -2
#   ppc64: catch bad xmon read/write SPR commands
# 
# arch/ppc64/kernel/traps.c
#   2005/01/04 20:24:50-08:00 anton@samba.org +3 -0
#   ppc64: catch bad xmon read/write SPR commands
# 
# ChangeSet
#   2005/01/04 21:10:19-08:00 anton@samba.org 
#   [PATCH] ppc64: limit xmon dump length
#   
#   A number of people (myself included) have pasted bad input into xmon that
#   it parsed as a request to dump gigabytes of memory.
#   
#   Place a limit of 128kB on the dump commands.  Also remove a stale function
#   prototype thats been lying around.
#   
#   Signed-off-by: Anton Blanchard <anton@samba.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/ppc64/xmon/xmon.c
#   2005/01/04 20:24:51-08:00 anton@samba.org +9 -6
#   ppc64: limit xmon dump length
# 
# ChangeSet
#   2005/01/04 21:10:06-08:00 serue@us.ibm.com 
#   [PATCH] capset returns -EPERM when pid==current->pid
#   
#   In the current kernel/capability.c:sys_capset() code, permission is
#   denied if CAP_SETPCAP is not held and pid is positive.  pid=0 means use
#   the current process, and this is allowed.  But using the current
#   process' pid is not allowed.  The man page for capsetp simply says that
#   CAP_SETPCAP is required to use this function, and does not mention the
#   exception for pid=0. 
#   
#   The current behavior seems inconsistent.  The attached patch also
#   allows a process to call capset() on itself.
#   
#   Signed-off-by: Chris Wright <chrisw@osdl.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# kernel/capability.c
#   2005/01/04 18:47:39-08:00 serue@us.ibm.com +1 -1
#   capset returns -EPERM when pid==current->pid
# 
# ChangeSet
#   2005/01/04 21:09:53-08:00 serue@us.ibm.com 
#   [PATCH] properly split capset_check+capset_set
#   
#   The attached patch removes checks from kernel/capability.c which are
#   redundant with cap_capset_check() code, and moves the capset_check() calls
#   to immediately before the capset_set() calls.  This allows capset_check()
#   to accurately check the setter's permission to set caps on the target.
#   Please apply.
#   
#   Signed-off-by: Serge Hallyn <serue@us.ibm.com>
#   Signed-off-by: Chris Wright <chrisw@osdl.org>
#   Signed-off-by:  Stephen Smalley <sds@epoch.ncsc.mil>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# security/selinux/hooks.c
#   2005/01/04 20:24:19-08:00 serue@us.ibm.com +0 -6
#   properly split capset_check+capset_set
# 
# kernel/capability.c
#   2005/01/04 20:24:51-08:00 serue@us.ibm.com +38 -25
#   properly split capset_check+capset_set
# 
# ChangeSet
#   2005/01/04 21:09:40-08:00 oleg@tv-sign.ru 
#   [PATCH] fix double sync_page_range() in generic_file_aio_write()
#   
#   generic_file_aio_write():
#   	generic_file_aio_write_nolock():
#   		if (SYNC) sync_page_range_nolock();
#   	if (SYNC) sync_page_range();
#   
#   I think that generic_file_aio_write() should use
#   __generic_file_aio_write_nolock() instead.
#   
#   Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# mm/filemap.c
#   2005/01/04 18:47:39-08:00 oleg@tv-sign.ru +1 -1
#   fix double sync_page_range() in generic_file_aio_write()
# 
# ChangeSet
#   2005/01/04 21:09:27-08:00 wli@holomorphy.com 
#   [PATCH] fix arch/x86_64/ia32/syscall32.c misdeclared pud variable
#   
#   pud needs to be declared as a pud_t in order to avoid an assignment from
#   incompatible pointer type warning or two; this patch makes it so.
#   
#   Signed-off-by: William Irwin <wli@holomorphy.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/x86_64/ia32/syscall32.c
#   2005/01/04 18:46:40-08:00 wli@holomorphy.com +1 -1
#   fix arch/x86_64/ia32/syscall32.c misdeclared pud variable
# 
# ChangeSet
#   2005/01/04 21:09:14-08:00 heiko.carstens@de.ibm.com 
#   [PATCH] s390: fix pgd_index() compile warnings
#   
#   the patch below fixes a few compile warnings due to missing parenthesizes.
#   
#   Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-s390/pgtable.h
#   2005/01/04 18:46:40-08:00 heiko.carstens@de.ibm.com +1 -1
#   s390: fix pgd_index() compile warnings
# 
# ChangeSet
#   2005/01/04 20:15:26-08:00 rusty@rustcorp.com.au 
#   [PATCH] More ECN Fixes: make writable before writing
#   
#   Patrick McHardy spotted this, on top of previous fix.  I neatened it.
#   
#   Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# net/ipv4/netfilter/ipt_ECN.c
#   2005/01/04 18:49:02-08:00 rusty@rustcorp.com.au +27 -30
#   More ECN Fixes: make writable before writing
# 
# ChangeSet
#   2005/01/04 20:15:13-08:00 rusty@rustcorp.com.au 
#   [PATCH] ftp nonlinear packet fix
#   
#   FTP connection tracking assumes it can just dereference tcphdr; not
#   neccessarily true now we don't linearize in ftp conntrack helper or
#   tcp connection tracking.  Also found by nfsim.
#   
#   Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# net/ipv4/netfilter/ip_nat_ftp.c
#   2005/01/04 18:15:50-08:00 rusty@rustcorp.com.au +10 -7
#   ftp nonlinear packet fix
# 
# ChangeSet
#   2005/01/04 20:15:00-08:00 rusty@rustcorp.com.au 
#   [PATCH] Fix for NAT core on nonlinear skbs
#   
#   The nat core calls skb_ip_make_writable() with a length too short.
#   Found by nfsim.
#   
#   Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# net/ipv4/netfilter/ip_nat_core.c
#   2005/01/04 00:08:51-08:00 rusty@rustcorp.com.au +1 -1
#   Fix for NAT core on nonlinear skbs
# 
# ChangeSet
#   2005/01/04 20:14:47-08:00 rusty@rustcorp.com.au 
#   [PATCH] Fix for UDP and TCP NAT on nonlinear skbs
#   
#   UDP and TCP refer to potentially stale pointers after calling
#   skb_ip_make_writable(), and UDP calls it with the wrong len argument.
#   All found by nfsim.
#   
#   Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# net/ipv4/netfilter/ip_nat_proto_udp.c
#   2005/01/04 00:19:58-08:00 rusty@rustcorp.com.au +5 -5
#   Fix for UDP and TCP NAT on nonlinear skbs
# 
# net/ipv4/netfilter/ip_nat_proto_tcp.c
#   2005/01/04 00:23:52-08:00 rusty@rustcorp.com.au +4 -4
#   Fix for UDP and TCP NAT on nonlinear skbs
# 
# ChangeSet
#   2005/01/04 20:14:34-08:00 rusty@rustcorp.com.au 
#   [PATCH] Conntrack Hash Allocation using __get_free_pages
#   
#   Here is a patch that just makes it use get_free_pages to test the TLB
#   theory.  Another obvious improvement would be to not use list_heads for
#   the hash table buckets - a single pointer would likely suffice and it
#   would cut the hash table in half, saving cache, TLB and memory.
#   
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# net/ipv4/netfilter/ip_conntrack_core.c
#   2005/01/04 03:25:56-08:00 rusty@rustcorp.com.au +28 -5
#   Conntrack Hash Allocation using __get_free_pages
# 
# ChangeSet
#   2005/01/04 20:14:21-08:00 rusty@rustcorp.com.au 
#   [PATCH] Multiport revision with port ranges (replaces "mport")
#   
#   The multiport match doesn't support ranges of ports, so a new match
#   called "mport" was written.  Now we have versioning of matches and
#   targets, we can simply put this extension in multiport revision 1.
#   
#   Also, removes gratuitous checking in match: we basically trust
#   iptables userspace these days.
#   
#   Signed-off-by: Pablo Neira Ayuso <pablo@eurodev.net>
#   Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (modified)
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# net/ipv4/netfilter/ipt_multiport.c
#   2005/01/04 18:02:41-08:00 rusty@rustcorp.com.au +104 -17
#   Multiport revision with port ranges (replaces "mport")
# 
# include/linux/netfilter_ipv4/ipt_multiport.h
#   2005/01/04 18:02:41-08:00 rusty@rustcorp.com.au +8 -0
#   Multiport revision with port ranges (replaces "mport")
# 
# ChangeSet
#   2005/01/04 20:14:08-08:00 rusty@rustcorp.com.au 
#   [PATCH] Add bitops to ipt_MARK without breaking compatbility
#   
#   Anders Fugmann <afu@fugmann.dhs.org> wrote a patch to add bitops to
#   ipt_MARK.  I made a version based on the revision patch.
#   
#   Bart De Schuymer <bdschuym@pandora.be> provided the idea of overriding
#   the target type.
#   
#   Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# net/ipv4/netfilter/ipt_MARK.c
#   2004/12/28 20:20:29-08:00 rusty@rustcorp.com.au +99 -16
#   Add bitops to ipt_MARK without breaking compatbility
# 
# include/linux/netfilter_ipv4/ipt_MARK.h
#   2004/12/28 20:18:20-08:00 rusty@rustcorp.com.au +12 -0
#   Add bitops to ipt_MARK without breaking compatbility
# 
# ChangeSet
#   2005/01/04 20:13:55-08:00 rusty@rustcorp.com.au 
#   [PATCH] iptables revision getsockopt
#   
#   This adds a new getsockopt to iptables, which allows userspace to
#   query the revision number of extensions.  iptables 1.3.0 (to be
#   released soon) already has support for this.
#   
#   Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# net/ipv4/netfilter/ip_tables.c
#   2004/12/31 15:51:37-08:00 rusty@rustcorp.com.au +84 -0
#   iptables revision getsockopt
# 
# include/linux/netfilter_ipv4/ip_tables.h
#   2004/12/31 02:31:06-08:00 rusty@rustcorp.com.au +14 -3
#   iptables revision getsockopt
# 
# ChangeSet
#   2005/01/04 20:13:42-08:00 rusty@rustcorp.com.au 
#   [PATCH] Steal a Character To Create a Revision Number
#   
#   Pablo Neira <pablo@eurodev.net> came up with the idea of stealing the
#   last byte in the (already nul-terminated) name of a target/match to
#   create a version.
#   
#   That patch motivated me to clean up the match and target searching in
#   ip_tables, which makes this patch more trivial.  I also renamed
#   "version" to "revision" since the word "version" was used for iptables
#   itself.
#   
#   Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# net/ipv4/netfilter/ip_tables.c
#   2004/12/28 21:58:29-08:00 rusty@rustcorp.com.au +46 -25
#   Steal a Character To Create a Revision Number
# 
# include/linux/netfilter_ipv4/ip_tables.h
#   2004/12/28 21:58:29-08:00 rusty@rustcorp.com.au +12 -4
#   Steal a Character To Create a Revision Number
# 
# ChangeSet
#   2005/01/04 20:13:30-08:00 rusty@rustcorp.com.au 
#   [PATCH] Clean up the kmod handling code in iptables.c
#   
#   We now have a convenient kmod macro try_then_request_module(). 
#   
#   1) Split our current "generic" function into separate
#      find_target_lock(), find_table_lock() and find_match_lock()
#      functions explicitly.
#   
#   2) Have those functions do try_module_get() for us, and fix up the one
#      caller who didn't do that anyway.
#   
#   3) Have the caller use try_then_request_module().
#   
#   4) Remove __ipt_mutex_up() and __ipt_find_target_lock() which weren't
#      used (even in patch-o-matic AFAICT).
#   
#   This cleanup takes us closer to using standard list macros everywhere,
#   and makes the version patch simpler.
#   
#   Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# net/ipv4/netfilter/ip_tables.c
#   2004/12/31 17:27:36-08:00 rusty@rustcorp.com.au +68 -105
#   Clean up the kmod handling code in iptables.c
# 
# include/linux/netfilter_ipv4/ip_tables.h
#   2004/12/31 17:26:37-08:00 rusty@rustcorp.com.au +0 -4
#   Clean up the kmod handling code in iptables.c
# 
# ChangeSet
#   2005/01/04 20:13:17-08:00 rusty@rustcorp.com.au 
#   [PATCH] Remove Randomness in Selecting NAT IP Address
#   
#   We currently choose a "random" IP address to NAT to, where we have a
#   range.  Martin Josefsson pointed out that he uses the SAME target in
#   iptables because changing IP addresses breaks Internet banking sites
#   (among others) which assume the customer will be coming from a
#   consistent IP address.
#   
#   In fact, we spend a fair bit of effort trying to balance the number of
#   connections we NAT to each IP address.  We can come pretty damn close
#   just hashing the source and destination IP addresses, and it has the
#   consistency property which is so desirable, as well as being faster.
#   
#   Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# net/ipv4/netfilter/ip_nat_core.c
#   2004/12/12 17:03:20-08:00 rusty@rustcorp.com.au +11 -89
#   Remove Randomness in Selecting NAT IP Address
# 
# include/linux/netfilter_ipv4/ip_nat.h
#   2004/12/12 17:03:20-08:00 rusty@rustcorp.com.au +1 -1
#   Remove Randomness in Selecting NAT IP Address
# 
# ChangeSet
#   2005/01/04 20:13:04-08:00 rusty@rustcorp.com.au 
#   [PATCH] Warn when old code would have done extra mangling
#   
#   Now we no longer do extra mangling, warn in that case.
#   
#   Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# net/ipv4/netfilter/ip_nat_core.c
#   2004/12/12 17:03:19-08:00 rusty@rustcorp.com.au +22 -0
#   Warn when old code would have done extra mangling
# 
# ChangeSet
#   2005/01/04 20:12:51-08:00 rusty@rustcorp.com.au 
#   [PATCH] Remove do_extra_mangle: double NAT on LOCAL_OUT
#   
#   On NF_IP_LOCAL_OUT, when destination NAT changes the destination
#   interface, we also change the source address, so the packet is the
#   same as if it were generated to go that way in the first place.  This
#   is not strictly necessary, I believe.
#   
#   This patch rips that code out to see what breaks.
#   
#   Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# net/ipv4/netfilter/ip_nat_core.c
#   2004/12/12 17:03:19-08:00 rusty@rustcorp.com.au +24 -74
#   Remove do_extra_mangle: double NAT on LOCAL_OUT
# 
# ChangeSet
#   2005/01/04 20:12:38-08:00 rusty@rustcorp.com.au 
#   [PATCH] Don't try too hard to NAT to unique tuple
#   
#   On NF_IP_LOCAL_OUT or NF_IP_PRE_ROUTING, if destination NAT is not
#   sufficient to create a unique tuple, we try changing the source port
#   as well.  However, this is also not strictly necessary: if the tuple
#   is not unique, we will also try to change the source on the
#   NF_IP_POST_ROUTING hook.
#   
#   When we finally confirm the connection, if the tuple is still not
#   unique the packet will be dropped (this is required anyway as we could
#   race: the conntrack is not placed in the hash until the packet is
#   about to leave the box anyway).
#   
#   In fact, we only need best effort *everywhere*.
#   
#   This patch rips that code out to see what breaks.
#   
#   Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# net/ipv4/netfilter/ip_nat_core.c
#   2004/12/12 17:03:18-08:00 rusty@rustcorp.com.au +29 -61
#   Don't try too hard to NAT to unique tuple
# 
# ChangeSet
#   2005/01/04 20:12:25-08:00 rusty@rustcorp.com.au 
#   [PATCH] ip_conntrack_alter_reply doesn't need to loop
#   
#   ip_conntrack_alter_reply checks that the reply isn't already taken,
#   but there's little point, since there's *still* a race after it is
#   called (which we handle at confirm time anyway).
#   
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# net/ipv4/netfilter/ip_nat_core.c
#   2005/01/04 03:11:54-08:00 rusty@rustcorp.com.au +14 -27
#   ip_conntrack_alter_reply doesn't need to loop
# 
# net/ipv4/netfilter/ip_conntrack_core.c
#   2005/01/04 03:11:54-08:00 rusty@rustcorp.com.au +4 -10
#   ip_conntrack_alter_reply doesn't need to loop
# 
# include/linux/netfilter_ipv4/ip_conntrack.h
#   2005/01/04 03:11:54-08:00 rusty@rustcorp.com.au +2 -3
#   ip_conntrack_alter_reply doesn't need to loop
# 
# ChangeSet
#   2005/01/04 20:12:12-08:00 rusty@rustcorp.com.au 
#   [PATCH] Remove NAT to multiple ranges
#   
#   The NAT code has the concept of multiple ranges: you can say "map this
#   connection onto IP 192.168.1.2 - 192.168.1.4, 192.168.1.7 ports
#   1024-65535, and 192.168.1.10".  I implemented this because we could.
#   
#   But it's not actually *used* by many (any?) people, and you can
#   approximate this by a random match (from patch-o-matic) if you really
#   want to.  It adds complexity to the code.
#   
#   Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# net/ipv4/netfilter/ipt_SAME.c
#   2005/01/04 03:11:48-08:00 rusty@rustcorp.com.au +11 -11
#   Remove NAT to multiple ranges
# 
# net/ipv4/netfilter/ipt_REDIRECT.c
#   2005/01/04 03:11:48-08:00 rusty@rustcorp.com.au +7 -7
#   Remove NAT to multiple ranges
# 
# net/ipv4/netfilter/ipt_NETMAP.c
#   2005/01/04 03:11:48-08:00 rusty@rustcorp.com.au +7 -7
#   Remove NAT to multiple ranges
# 
# net/ipv4/netfilter/ipt_MASQUERADE.c
#   2005/01/04 03:11:48-08:00 rusty@rustcorp.com.au +7 -7
#   Remove NAT to multiple ranges
# 
# net/ipv4/netfilter/ip_nat_tftp.c
#   2005/01/04 03:11:48-08:00 rusty@rustcorp.com.au +7 -9
#   Remove NAT to multiple ranges
# 
# net/ipv4/netfilter/ip_nat_rule.c
#   2005/01/04 03:11:48-08:00 rusty@rustcorp.com.au +15 -17
#   Remove NAT to multiple ranges
# 
# net/ipv4/netfilter/ip_nat_irc.c
#   2005/01/04 03:11:48-08:00 rusty@rustcorp.com.au +4 -5
#   Remove NAT to multiple ranges
# 
# net/ipv4/netfilter/ip_nat_ftp.c
#   2005/01/04 03:11:48-08:00 rusty@rustcorp.com.au +6 -7
#   Remove NAT to multiple ranges
# 
# net/ipv4/netfilter/ip_nat_core.c
#   2005/01/04 03:11:48-08:00 rusty@rustcorp.com.au +120 -176
#   Remove NAT to multiple ranges
# 
# net/ipv4/netfilter/ip_nat_amanda.c
#   2005/01/04 03:11:48-08:00 rusty@rustcorp.com.au +6 -7
#   Remove NAT to multiple ranges
# 
# include/linux/netfilter_ipv4/ip_nat.h
#   2005/01/04 03:11:48-08:00 rusty@rustcorp.com.au +6 -4
#   Remove NAT to multiple ranges
# 
# ChangeSet
#   2005/01/04 20:11:59-08:00 rusty@rustcorp.com.au 
#   [PATCH] When ipt_ECN needs TCP, check it is not inverted
#   
#   Writing the nfsim testcase for the ECN target revealed a hole in the
#   rule checking: when checking whether the rule specified TCP, you need
#   to check it isn't inverted.
#   
#   Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# net/ipv4/netfilter/ipt_ECN.c
#   2005/01/04 02:24:01-08:00 rusty@rustcorp.com.au +1 -1
#   When ipt_ECN needs TCP, check it is not inverted
# 
# ChangeSet
#   2005/01/04 20:11:46-08:00 rusty@rustcorp.com.au 
#   [PATCH] ipt_REJECT Target nonlinear fixes
#   
#   nfsim now generates non-linear packets: when run under valgrind it
#   finds linear assumptions very nicely.  This is the second thing I
#   tried, and it found a real bug.
#   
#   In this case, checking the UDP checksum is correct, but overkill, and
#   like the ICMP header handling, does not handle non-linear packets.  Remove UDP
#   checksum, fix ICMP error.
#   
#   Signed-off-by: Rusty Russell
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# net/ipv4/netfilter/ipt_REJECT.c
#   2005/01/03 19:56:45-08:00 rusty@rustcorp.com.au +5 -19
#   ipt_REJECT Target nonlinear fixes
# 
# ChangeSet
#   2005/01/04 15:59:03-08:00 chrisw@osdl.org 
#   [PATCH] fix up dummy security module code merge
#   
#   OK, somehow I managed to botch this one.  It happens to work fine, but I
#   should have been more careful with forward porting this 1+ year old patch.
#   The exec-time calc should go in bprm_apply_creds, not bprm_free_security.
#   
#   Thanks to Stephen for spotting my mistake.
#   
#   Signed-off-by: Chris Wright <chrisw@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# security/dummy.c
#   2005/01/04 14:45:31-08:00 chrisw@osdl.org +2 -1
#   fix up dummy security module code merge
# 
# ChangeSet
#   2005/01/04 15:57:57-08:00 torvalds@ppc970.osdl.org 
#   Merge bk://nfsclient.bkbits.net/linux-2.6
#   into ppc970.osdl.org:/home/torvalds/v2.6/linux
# 
# fs/nfs/direct.c
#   2005/01/04 15:57:52-08:00 torvalds@ppc970.osdl.org +0 -0
#   Auto merged
# 
# ChangeSet
#   2005/01/04 15:57:25-08:00 brugolsky@telemetry-investments.com 
#   [PATCH] NFS client O_DIRECT error case fix
#   
#   The NFS direct-io error return path for request sizes greater than
#   MAX_DIRECTIO_SIZE fails to initialize the returned page struct array
#   pointer to NULL.
#   
#   Discovered using AKPM's ext3-tools: odwrite -ko 0 16385 foo
#   
#   Signed-off-by: Bill Rugolsky <brugolsky@telemetry-investments.com>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/nfs/direct.c
#   2005/01/04 13:55:37-08:00 brugolsky@telemetry-investments.com +3 -1
#   NFS client O_DIRECT error case fix
# 
# ChangeSet
#   2005/01/04 22:45:01+00:00 Liam.Girdwood@com.rmk.(none) 
#   [ARM PATCH] 2347/1: PXA SSP PSP bit definition
#   
#   Patch from Liam Girdwood
#   
#   This patch adds a bit definition for the SSP port PSP mode.
#   
#   Signed-off-by: Liam Girdwood
#   Signed-off-by: Russell King
# 
# include/asm-arm/arch-pxa/pxa-regs.h
#   2005/01/03 12:22:28+00:00 Liam.Girdwood@com.rmk.(none) +1 -0
#   [PATCH] 2347/1: PXA SSP PSP bit definition
# 
# ChangeSet
#   2005/01/04 22:39:50+00:00 dsaxena@net.rmk.(none) 
#   [ARM PATCH] 2346/1: Update IXP4xx documentation
#   
#   Patch from Deepak Saxena
#   
#   This patch updates the IXP4xx documentation with information about 
#   the latest chipsets and supported devices.
#   
#   Supercedes 2308/1
#   
#   Signed-off-by: Deepak Saxena
#   Signed-off-by: Russell King
# 
# Documentation/arm/IXP4xx
#   2005/01/04 16:44:55+00:00 dsaxena@net.rmk.(none) +14 -4
#   [PATCH] 2346/1: Update IXP4xx documentation
# 
# ChangeSet
#   2005/01/04 22:34:56+00:00 ben-linux@org.rmk.(none) 
#   [ARM PATCH] 2345/1: S3C24XX - serial init depending on cpu detected
#   
#   Patch from Ben Dooks
#   
#   Use the cpu-type detected in arch/arm/mach-s3c2410/cpu.c
#   to work out which uart initialisation routine to call,
#   instead of relying on the one called within mach-xxxx.c.
#   
#   This allows one machine-type to run with either an 2410 or
#   2440 cpu installed.
#   
#   Thanks to Dimitry Andric for the original patch.
#   
#   Signed-off-by: Ben Dooks
#   Signed-off-by: Russell King
# 
# arch/arm/mach-s3c2410/s3c2440.h
#   2005/01/04 15:43:25+00:00 ben-linux@org.rmk.(none) +1 -4
#   [PATCH] 2345/1: S3C24XX - serial init depending on cpu detected
# 
# arch/arm/mach-s3c2410/s3c2410.h
#   2005/01/04 15:43:30+00:00 ben-linux@org.rmk.(none) +2 -5
#   [PATCH] 2345/1: S3C24XX - serial init depending on cpu detected
# 
# arch/arm/mach-s3c2410/mach-vr1000.c
#   2005/01/04 15:44:18+00:00 ben-linux@org.rmk.(none) +2 -1
#   [PATCH] 2345/1: S3C24XX - serial init depending on cpu detected
# 
# arch/arm/mach-s3c2410/mach-smdk2410.c
#   2005/01/04 15:46:33+00:00 ben-linux@org.rmk.(none) +1 -1
#   [PATCH] 2345/1: S3C24XX - serial init depending on cpu detected
# 
# arch/arm/mach-s3c2410/mach-rx3715.c
#   2005/01/04 15:43:30+00:00 ben-linux@org.rmk.(none) +1 -1
#   [PATCH] 2345/1: S3C24XX - serial init depending on cpu detected
# 
# arch/arm/mach-s3c2410/mach-h1940.c
#   2005/01/04 15:45:18+00:00 ben-linux@org.rmk.(none) +3 -2
#   [PATCH] 2345/1: S3C24XX - serial init depending on cpu detected
# 
# arch/arm/mach-s3c2410/mach-bast.c
#   2005/01/04 15:44:50+00:00 ben-linux@org.rmk.(none) +3 -2
#   [PATCH] 2345/1: S3C24XX - serial init depending on cpu detected
# 
# arch/arm/mach-s3c2410/cpu.h
#   2005/01/04 15:52:12+00:00 ben-linux@org.rmk.(none) +12 -4
#   [PATCH] 2345/1: S3C24XX - serial init depending on cpu detected
# 
# arch/arm/mach-s3c2410/cpu.c
#   2005/01/04 15:42:39+00:00 ben-linux@org.rmk.(none) +35 -20
#   [PATCH] 2345/1: S3C24XX - serial init depending on cpu detected
# 
# ChangeSet
#   2005/01/04 22:29:29+00:00 ben-linux@org.rmk.(none) 
#   [ARM PATCH] 2344/1: S3C2440 - fix mapping of watchdog for reboot
#   
#   Patch from Ben Dooks
#   
#   Ensure the watchdog timer is mapped for use with
#   the reboot code. Also fixes minor comment typo.
#   
#   Signed-off-by: Dimitry Andric
#   
#   Signed-off-by: Ben Dooks
#   Signed-off-by: Russell King
# 
# ChangeSet
#   2005/01/04 14:28:02-08:00 Andries.Brouwer@cwi.nl 
#   [PATCH] remove duplicated patch fragment
#   
#   Acked-by: Chris Wright <chrisw@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# security/commoncap.c
#   2005/01/04 09:35:49-08:00 Andries.Brouwer@cwi.nl +0 -4
#   remove duplicated patch fragment
# 
# arch/arm/mach-s3c2410/s3c2440.c
#   2005/01/04 15:00:40+00:00 ben-linux@org.rmk.(none) +2 -1
#   [PATCH] 2344/1: S3C2440 - fix mapping of watchdog for reboot
# 
# ChangeSet
#   2005/01/04 22:24:26+00:00 ben-linux@org.rmk.(none) 
#   [ARM PATCH] 2343/1: S3C2410 / S3C2440 MAINTAINERS entries
#   
#   Patch from Ben Dooks
#   
#   Mainter entries for ARM/S3C2410 and ARM/S3C2410 ARM
#   Architectures, mainted by Ben Dooks on behalf of
#   Simtec Electronics.
#   
#   Signed-off-by: Ben Dooks
#   Signed-off-by: Russell King
# 
# MAINTAINERS
#   2005/01/04 12:16:47+00:00 ben-linux@org.rmk.(none) +14 -0
#   [PATCH] 2343/1: S3C2410 / S3C2440 MAINTAINERS entries
# 
# ChangeSet
#   2005/01/04 13:54:13-08:00 chrisw@osdl.org 
#   [PATCH] track capabilities in default dummy security module code
#   
#   Switch dummy logic around to set cap_* bits during exec and set*uid based
#   on basic uid check.  Then check cap_* bits during capable() (rather than
#   doing basic uid check).  This ensures that capability bits are properly
#   initialized in case the capability module is later loaded.
#   
#   Signed-off-by: Chris Wright <chrisw@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# security/dummy.c
#   2005/01/04 13:14:10-08:00 chrisw@osdl.org +3 -4
#   track capabilities in default dummy security module code
# 
# ChangeSet
#   2005/01/04 20:03:09+00:00 rmk@flint.arm.linux.org.uk 
#   [ARM] Fix slab corruption issues triggered with pud_t integration.
#   
#   When the page tables are wrapped from 4 levels to 2 levels, the new
#   MM code requires PMD_SHIFT to match PUD_SHIFT, which must also
#   match PGDIR_SHIFT.  If PMD_SHIFT is smaller than PUD_SHIFT, we risk
#   freeing a still-in-use table (== page) which can then get re-used
#   for the slab cache.
#   
#   Testing and inspection shows that there isn't any real benefit from
#   keeping PMD_SHIFT set to 20.
#   
#   In addition, add some comments concerning the granularity of
#   alloc_init_section() and fix a missing PMD assignment in the
#   rebooting code.  Somehow we managed to get away with that, although
#   it is actually wrong.  Maybe I've just been lucky until now.
#   
#   Signed-off-by: Russell King <rmk@arm.linux.org.uk>
# 
# include/asm-arm/pgtable.h
#   2005/01/04 19:59:55+00:00 rmk@flint.arm.linux.org.uk +1 -1
#   Set PMD_SHIFT to 21 isntead of 20.
# 
# arch/arm/mm/mm-armv.c
#   2005/01/04 19:59:55+00:00 rmk@flint.arm.linux.org.uk +6 -1
#   Add comments concerning alloc_init_section's granularity.
#   Fix setup_mm_for_reboot() to set second half of pgdir entry.
# 
# ChangeSet
#   2005/01/04 19:49:09+01:00 trond.myklebust@fys.uio.no 
#   RPC: call_verify
#   	Don't label all retries as "server seeing garbage".
#   	Report correct error for buffer overflows.
#   	Fix incorrect buffer overflow test that was masking
#   		AUTH_REJECTEDCRED, AUTH_REJECTEDVERF,... errors.
#   
#    Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
# 
# net/sunrpc/clnt.c
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +30 -19
#   RPC: call_verify
# 
# ChangeSet
#   2005/01/04 19:48:45+01:00 trond.myklebust@fys.uio.no 
#    Subject: [PATCH] NFS: incorrect "df" results
#   
#    Description:
#    Fix an NFS client bug introduced in 2.6.9-rc1.  The "df" command was
#    reporting the size of NFS file systems incorrectly.
#   
#    Signed-off-by: Chuck Lever <cel@netapp.com>
#    Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
# 
# fs/nfs/inode.c
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +15 -1
#    Subject: [PATCH] NFS: incorrect "df" results
# 
# ChangeSet
#   2005/01/04 19:48:17+01:00 trond.myklebust@fys.uio.no 
#   NFS: Ensure ACCESS caches are invalidated together with the attribute
#        cache.
#   
#    Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
# 
# include/linux/nfs_fs.h
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +2 -1
#   NFS: Ensure ACCESS caches are invalidated together with the attribute
# 
# fs/nfs/inode.c
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +8 -19
#   NFS: Ensure ACCESS caches are invalidated together with the attribute
# 
# fs/nfs/dir.c
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +2 -1
#   NFS: Ensure ACCESS caches are invalidated together with the attribute
# 
# ChangeSet
#   2005/01/04 19:47:52+01:00 trond.myklebust@fys.uio.no 
#    Subject: [PATCH] NFS: use attribute timeout instead of "noac" mount option
#   
#    The behavior enabled by the "noac" mount option should be precisely
#    equivalent to setting acreg{min,max} or acdir{min,max} to zero via mount
#    options.
#   
#    Signed-off-by: Chuck Lever <cel@netapp.com>
#    Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
# 
# fs/nfs/inode.c
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +1 -1
#    Subject: [PATCH] NFS: use attribute timeout instead of "noac" mount option
# 
# ChangeSet
#   2005/01/04 19:47:24+01:00 trond.myklebust@fys.uio.no 
#    Subject: [PATCH] NFS: Direct reads and writes need to flush dirty cache pages
#   
#    Other parts of the NFS client invoke nfs_wb_all() when they want to flush dirty
#    cache pages.  The direct path needs to do that, too.
#   
#    Signed-off-by: Chuck Lever <cel@netapp.com>
#    Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
# 
# fs/nfs/direct.c
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +4 -0
#    Subject: [PATCH] NFS: Direct reads and writes need to flush dirty cache pages
# 
# ChangeSet
#   2005/01/04 19:47:00+01:00 trond.myklebust@fys.uio.no 
#    Subject: [PATCH] NFS: Use parallel read operations to do direct read requests
#   
#    The initial implementation of NFS direct reads was entirely synchronous.
#    The direct read logic issued one NFS READ operation at a time, and waited
#    for the server's reply before issuing the next one.  For large direct
#    read requests, this is unnecessarily slow.
#   
#    This patch changes the NFS direct read path to dispatch NFS READ operations
#    for a single direct read request in parallel and wait for them once.  The
#    direct read path is still synchronous in nature, but because the NFS READ
#    operations are going in parallel, the completion wait should be much shorter.
#   
#    Signed-off-by: Chuck Lever <cel@netapp.com>
#    Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
# 
# fs/nfs/inode.c
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +22 -3
#    Subject: [PATCH] NFS: Use parallel read operations to do direct read requests
# 
# fs/nfs/direct.c
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +262 -69
#    Subject: [PATCH] NFS: Use parallel read operations to do direct read requests
# 
# ChangeSet
#   2005/01/04 19:46:31+01:00 trond.myklebust@fys.uio.no 
#    Subject: [PATCH] NFS: Direct read path allocates nfs_read_data on the stack
#   
#    Reduce stack utilization in the NFS direct read path by using a
#    dynamically allocated nfs_read_data structure instead of allocating one
#    on the stack.  This reduces stack utilization of nfs_direct_read_seg
#    from over 900 bytes to less than 100 bytes.
#   
#    Signed-off-by: Chuck Lever <cel@netapp.com>
#    Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
# 
# include/linux/nfs_fs.h
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +20 -0
#    Subject: [PATCH] NFS: Direct read path allocates nfs_read_data on the stack
# 
# fs/nfs/read.c
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +2 -17
#    Subject: [PATCH] NFS: Direct read path allocates nfs_read_data on the stack
# 
# fs/nfs/direct.c
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +33 -34
#    Subject: [PATCH] NFS: Direct read path allocates nfs_read_data on the stack
# 
# ChangeSet
#   2005/01/04 19:46:04+01:00 trond.myklebust@fys.uio.no 
#    Subject: [PATCH] NFS: Direct write path allocates nfs_write_data on the stack
#   
#    Reduce stack utilization in the NFS direct write path by using a
#    dynamically allocated nfs_write_data structure instead of allocating one
#    on the stack.  This reduces stack utilization of nfs_direct_write_seg
#    from over 900 bytes to less than 100 bytes.
#   
#    Signed-off-by: Chuck Lever <cel@netapp.com>
#    Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
# 
# include/linux/nfs_fs.h
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +39 -0
#    Subject: [PATCH] NFS: Direct write path allocates nfs_write_data on the stack
# 
# fs/nfs/write.c
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +3 -36
#    Subject: [PATCH] NFS: Direct write path allocates nfs_write_data on the stack
# 
# fs/nfs/direct.c
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +37 -38
#    Subject: [PATCH] NFS: Direct write path allocates nfs_write_data on the stack
# 
# ChangeSet
#   2005/01/04 19:45:37+01:00 trond.myklebust@fys.uio.no 
#    Subject: [PATCH] NFS: better handling of short writes in direct write path
#   
#    Immediately return control to the application if a short NFS write is
#    detected in the NFS client's direct write path.  This is better behavior
#    than what the direct write path does today, which could result in data
#    appearing at the wrong offset in the file.
#   
#    Eventually this code path should retry short writes at least once before
#    giving up.
#   
#    Signed-off-by: Chuck Lever <cel@netapp.com>
#    Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
# 
# fs/nfs/direct.c
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +6 -1
#    Subject: [PATCH] NFS: better handling of short writes in direct write path
# 
# ChangeSet
#   2005/01/04 19:45:13+01:00 trond.myklebust@fys.uio.no 
#    Subject: [PATCH] NFS: Use sizeof() instead of C macro
#   
#    Replace a C macro with sizeof().
#   
#    Signed-off-by: Chuck Lever <cel@netapp.com>
#    Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
# 
# fs/nfs/direct.c
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +5 -6
#    Subject: [PATCH] NFS: Use sizeof() instead of C macro
# 
# ChangeSet
#   2005/01/04 19:44:43+01:00 trond.myklebust@fys.uio.no 
#    Subject: [PATCH] RPC: display XIDs in host order
#   
#    Description:
#    Ethereal and other tools display RPC XIDs in host order.  This patch
#    changes the RPC trace messages that display XIDs to print them in host
#    order so they can be easily matched to XIDs that appear in Ethereal.
#   
#    Signed-off-by: Chuck Lever <cel@netapp.com>
#    Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
# 
# net/sunrpc/xprt.c
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +4 -3
#    Subject: [PATCH] RPC: display XIDs in host order
# 
# ChangeSet
#   2005/01/04 19:44:19+01:00 trond.myklebust@fys.uio.no 
#    Subject: [PATCH] NFS: report return code on GETATTR and SETATTR
#   
#    Improve trace debugging messages for NFSv2/3 GETATTR and SETATTR
#    procedures.
#   
#    Signed-off-by: Chuck Lever <cel@netapp.com>
#    Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
# 
# fs/nfs/proc.c
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +4 -4
#    Subject: [PATCH] NFS: report return code on GETATTR and SETATTR
# 
# fs/nfs/nfs3proc.c
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +5 -5
#    Subject: [PATCH] NFS: report return code on GETATTR and SETATTR
# 
# ChangeSet
#   2005/01/04 19:43:50+01:00 trond.myklebust@fys.uio.no 
#    Subject: [PATCH] NFS: short write warning
#   
#    Recently a patch set was accepted to allow the Linux NFS client to handle
#    short writes by retrying the unwritten portion of the request.  The only
#    case that now results in an error is when the server makes no progress;
#    that is, writes zero bytes.
#   
#    This patch changes the kernel log warning that is generated in that case
#    to reflect the error condition more accurately.
#   
#    Signed-off-by: Chuck Lever <cel@netapp.com>
#    Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
# 
# fs/nfs/write.c
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +2 -1
#    Subject: [PATCH] NFS: short write warning
# 
# ChangeSet
#   2005/01/04 19:43:24+01:00 trond.myklebust@fys.uio.no 
#    NFS: Fix dentry refcount accounting error which causes unnecessary
#    sillyrenames when renaming to an existing file.
#   
#    Signed-off-by: Greg Banks <gnb@melbourne.sgi.com>
#    Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
# 
# fs/nfs/dir.c
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +2 -4
#    NFS: Fix dentry refcount accounting error which causes unnecessary
# 
# ChangeSet
#   2005/01/04 19:42:56+01:00 trond.myklebust@fys.uio.no 
#     NFS: when we mount with the "nolock" flag we need to use local locking.
#   
#     Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
# 
# fs/nfs/inode.c
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +15 -8
#     NFS: when we mount with the "nolock" flag we need to use local locking.
# 
# fs/nfs/file.c
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +29 -21
#     NFS: when we mount with the "nolock" flag we need to use local locking.
# 
# ChangeSet
#   2005/01/04 19:42:30+01:00 trond.myklebust@fys.uio.no 
#     VFS: Remove LOCK_USE_CLNT. It should no longer be necessary.
#   
#     Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
# 
# include/linux/fs.h
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +0 -5
#     VFS: Remove LOCK_USE_CLNT. It should no longer be necessary.
# 
# fs/locks.c
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +0 -6
#     VFS: Remove LOCK_USE_CLNT. It should no longer be necessary.
# 
# ChangeSet
#   2005/01/04 19:42:03+01:00 trond.myklebust@fys.uio.no 
#    RPC: Optimize away unnecessary del_timer_sync() operations, when we
#         know there are no pending timers.
#   
#    Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
# 
# net/sunrpc/sched.c
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +7 -1
#    RPC: Optimize away unnecessary del_timer_sync() operations, when we
# 
# include/linux/sunrpc/sched.h
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +1 -0
#    RPC: Optimize away unnecessary del_timer_sync() operations, when we
# 
# ChangeSet
#   2005/01/04 19:41:37+01:00 trond.myklebust@fys.uio.no 
#    VFS: Avoid dentry aliasing problems in filesystems like NFS, where
#         inodes may be marked as stale in one instance (causing the dentry
#         to be dropped) then re-enabled in the next instance.
#   
#    Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
# 
# include/linux/dcache.h
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +18 -0
#    VFS: Avoid dentry aliasing problems in filesystems like NFS, where
# 
# fs/nfs/dir.c
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +25 -16
#    VFS: Avoid dentry aliasing problems in filesystems like NFS, where
# 
# fs/dcache.c
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +48 -0
#    VFS: Avoid dentry aliasing problems in filesystems like NFS, where
# 
# ChangeSet
#   2005/01/04 19:41:11+01:00 trond.myklebust@fys.uio.no 
#   NFSv2/v3/v4: ESTALE should not be a permanent condition on directories.
#   
#   Although it usually means that someone has deleted a file on the server,
#   the ESTALE error may also indicate that the sysadmin has used exportfs to
#   deny our client access to the server. Most NFS implementations therefore
#   consider it a non-permanent condition, and allow inodes to "recover" when
#   the sysadmin re-enables access.
#   If, however, you want to work with broken servers, like unfsd, that reuse
#   filehandles for new files after the original file gets deleted, then
#   "recovery" is impossible, since it may be that the filehandle now points
#   to a different file. Note that this is broken server behaviour that may
#   happen even without us ever seeing the ESTALE error.
#   In order to minimize (but we can never eliminate entirely) this race
#   condition on unfsd servers, Linux has traditionally made ESTALE a
#   permanent condition on all filehandles except the root filehandle.
#   
#   The problem is that if we apply this strict staleness criterion to
#   directories (particularly so for he current directory), then all
#   processes will need to re-walk the path starting from the mount point,
#   in order to recover from the sysadmin intervention case. As this is not
#   usual on other *NIX implementations, and may in any case be undermined by
#   caching rules etc, this is being seen as a usability problem.
#   
#   This patch makes ESTALE a non-permanent condition on directories, but
#   preserves the current behaviour for non-directories.
#   
#   Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
# 
# fs/nfs/inode.c
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +7 -7
#   NFSv2/v3/v4: ESTALE should not be a permanent condition on directories.
# 
# ChangeSet
#   2005/01/04 19:40:47+01:00 trond.myklebust@fys.uio.no 
#    Subject: [PATCH] NFS: Sync NFS writes still use kmalloc
#   
#    Replace the kmalloc() and kfree() calls in this path with appropriate
#    invocations of nfs_writedata_alloc() and nfs_writedata_free().  This
#    makes nfs_writepage_sync match all the other write paths in fs/nfs/write.c.
#   
#    Category: Maintainability, performance
#   
#   Signed-off-by: Chuck Lever <cel@netapp.com>
#   Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
# 
# fs/nfs/write.c
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +2 -4
#    Subject: [PATCH] NFS: Sync NFS writes still use kmalloc
# 
# ChangeSet
#   2005/01/04 19:40:18+01:00 trond.myklebust@fys.uio.no 
#   RPCSEC_GSS: Miscellaneous cleanup of auth_gss.c: we're passing something
#   as a void * when we know perfectly well what it is.  And we're passing
#   some arguments that we don't actually use.
#   
#   Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
#   Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
# 
# net/sunrpc/auth_gss/auth_gss.c
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +7 -10
#   RPCSEC_GSS: Miscellaneous cleanup of auth_gss.c: we're passing something
# 
# ChangeSet
#   2005/01/04 19:39:55+01:00 trond.myklebust@fys.uio.no 
#   RPC: The RPCAUTH_CRED_DEAD flag had been unused for some time before I
#   unwisely revived it for use with the gss code.  Having removed that use
#   from the gss code, it's time to remove all references to it.
#   
#   Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
#   Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
# 
# net/sunrpc/auth.c
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +0 -12
#   RPC: The RPCAUTH_CRED_DEAD flag had been unused for some time before I
# 
# include/linux/sunrpc/auth.h
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +0 -2
#   RPC: The RPCAUTH_CRED_DEAD flag had been unused for some time before I
# 
# ChangeSet
#   2005/01/04 19:39:27+01:00 trond.myklebust@fys.uio.no 
#   RPC: Instead of setting a flag (RPCAUTH_CRED_DEAD) in the cred to
#   indicate failure of an upcall to get a gss context for that cred,
#   set the status of waiting tasks to indicate failure.
#   
#   This solves problems e.g. with creds with the CRED_DEAD flag set
#   never being refreshed, which caused krb5 mounts to fail after the
#   context used to do RENEWS expired.
#   
#   Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
#   Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
# 
# net/sunrpc/clnt.c
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +1 -1
#   RPC: Instead of setting a flag (RPCAUTH_CRED_DEAD) in the cred to
# 
# net/sunrpc/auth_gss/auth_gss.c
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +3 -1
#   RPC: Instead of setting a flag (RPCAUTH_CRED_DEAD) in the cred to
# 
# ChangeSet
#   2005/01/04 19:39:01+01:00 trond.myklebust@fys.uio.no 
#   RPCSEC_GSS: When the gss code notices that a cred has expired, mark
#   the cred containing the context non-uptodate, triggering creation of
#   a new context.
#   
#   Note that on the send-side operations (get_mic, wrap), we mark the
#   cred as not uptodate, but continue trying to use it; the server can
#   complain if it wants to, and the next time through we'll refresh it.
#   
#   Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
#   Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
# 
# net/sunrpc/auth_gss/auth_gss.c
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +19 -8
#   RPCSEC_GSS: When the gss code notices that a cred has expired, mark
# 
# ChangeSet
#   2005/01/04 19:38:37+01:00 trond.myklebust@fys.uio.no 
#   NFSv4: Convert the NFSv4 close and open_downgrade operations to use
#          asynchronous RPC calls.
#   
#   Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
# 
# include/linux/nfs_fs.h
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +1 -2
#   NFSv4: Convert the NFSv4 close and open_downgrade operations to use
# 
# fs/nfs/nfs4state.c
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +4 -6
#   NFSv4: Convert the NFSv4 close and open_downgrade operations to use
# 
# fs/nfs/nfs4proc.c
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +78 -93
#   NFSv4: Convert the NFSv4 close and open_downgrade operations to use
# 
# ChangeSet
#   2005/01/04 19:38:13+01:00 trond.myklebust@fys.uio.no 
#   NFSv4: setattr, close and open_downgrade should use the state_owner's
#          credentials when they are available.
#   
#   Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
# 
# fs/nfs/nfs4proc.c
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +4 -0
#   NFSv4: setattr, close and open_downgrade should use the state_owner's
# 
# ChangeSet
#   2005/01/04 19:37:47+01:00 trond.myklebust@fys.uio.no 
#   NFSv4: Make nfs4_do_open() take a dentry argument.
#   
#   Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
# 
# fs/nfs/nfs4proc.c
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +8 -8
#   NFSv4: Make nfs4_do_open() take a dentry argument.
# 
# ChangeSet
#   2005/01/04 19:37:20+01:00 trond.myklebust@fys.uio.no 
#   NFS: Change rpc_ops->create() to take a dentry argument rather than a
#        qstr.
#   
#   Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
# 
# include/linux/nfs_xdr.h
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +1 -1
#   NFS: Change rpc_ops->create() to take a dentry argument rather than a
# 
# fs/nfs/proc.c
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +4 -4
#   NFS: Change rpc_ops->create() to take a dentry argument rather than a
# 
# fs/nfs/nfs4proc.c
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +2 -2
#   NFS: Change rpc_ops->create() to take a dentry argument rather than a
# 
# fs/nfs/nfs3proc.c
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +5 -5
#   NFS: Change rpc_ops->create() to take a dentry argument rather than a
# 
# fs/nfs/dir.c
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +1 -7
#   NFS: Change rpc_ops->create() to take a dentry argument rather than a
# 
# ChangeSet
#   2005/01/04 19:36:52+01:00 trond.myklebust@fys.uio.no 
#   NFS: The fact that readdirplus calls now create dentries from within readdir
#        calls renders nfs_cached_lookup() obsolete.
#   
#   Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
# 
# fs/nfs/dir.c
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +6 -106
#   NFS: The fact that readdirplus calls now create dentries from within readdir
# 
# ChangeSet
#   2005/01/04 19:36:29+01:00 trond.myklebust@fys.uio.no 
#   NFS: Make readdirplus create dentries on the fly when we're running
#        through the directory.
#   
#   Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
# 
# fs/nfs/dir.c
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +59 -18
#   NFS: Make readdirplus create dentries on the fly when we're running
# 
# ChangeSet
#   2005/01/04 19:36:01+01:00 trond.myklebust@fys.uio.no 
#   RPC: Add missing calls to flush_dcache_page() in net/sunrpc/xdr.c
#   
#   Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
# 
# net/sunrpc/xdr.c
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +4 -0
#   RPC: Add missing calls to flush_dcache_page() in net/sunrpc/xdr.c
# 
# ChangeSet
#   2005/01/04 19:35:39+01:00 trond.myklebust@fys.uio.no 
#   RPC: More aggressive RPC debugging code.
#   
#     People are worrying about spinlock deadlocks in the debugging code, without
#     actually worrying about the bugs that triggered the debugging code in the
#     first place.
#     Convert to BUG_ON() in order to ensure that bugs are reported.
#   
#   Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
# 
# net/sunrpc/sched.c
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +4 -13
#   RPC: More aggressive RPC debugging code.
# 
# ChangeSet
#   2005/01/04 19:35:12+01:00 trond.myklebust@fys.uio.no 
#   RPC: Fix a bug in rpc_killall_tasks().
#   
#     Shirly Ma reported seeing problems with rpc_killall_tasks() causing
#     the task->tk_magic debugging test to trigger. It turns out we may be
#     killing tasks that are not yet running or even initialized.
#   
#   Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
# 
# net/sunrpc/sched.c
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +9 -6
#   RPC: Fix a bug in rpc_killall_tasks().
# 
# ChangeSet
#   2005/01/04 19:34:47+01:00 trond.myklebust@fys.uio.no 
#   RPC: Remove the rpc_queue_lock global spinlock. Replace it with per-rpc_queue
#        spinlocks.
#   
#   Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
# 
# net/sunrpc/sched.c
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +30 -39
#   RPC: Remove the rpc_queue_lock global spinlock. Replace it with per-rpc_queue
# 
# include/linux/sunrpc/sched.h
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +4 -0
#   RPC: Remove the rpc_queue_lock global spinlock. Replace it with per-rpc_queue
# 
# ChangeSet
#   2005/01/04 19:34:21+01:00 trond.myklebust@fys.uio.no 
#   RPC: Convert rpciod into a work queue for greater flexibility.
#   
#   Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
# 
# net/sunrpc/xprt.c
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +1 -1
#   RPC: Convert rpciod into a work queue for greater flexibility.
# 
# net/sunrpc/sched.c
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +138 -330
#   RPC: Convert rpciod into a work queue for greater flexibility.
# 
# include/linux/sunrpc/sched.h
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +43 -18
#   RPC: Convert rpciod into a work queue for greater flexibility.
# 
# fs/nfs/unlink.c
#   2005/01/04 01:00:00+01:00 trond.myklebust@fys.uio.no +1 -2
#   RPC: Convert rpciod into a work queue for greater flexibility.
# 
# ChangeSet
#   2005/01/04 10:06:07-08:00 torvalds@ppc970.osdl.org 
#   Mark HPUSBSCSI scanner broken. You're supposed to use libusb.
# 
# drivers/usb/image/Kconfig
#   2005/01/04 10:06:00-08:00 torvalds@ppc970.osdl.org +1 -1
#   Mark HPUSBSCSI scanner broken. You're supposed to use libusb.
# 
# ChangeSet
#   2005/01/04 08:16:58-08:00 torvalds@ppc970.osdl.org 
#   Hide question about SERIO_LIBPS2 unless there is some remote
#   reason the user migth want to see it.
#   
#   Under any normal use it gets auto-selected by PS/2 mouse or ATKBD
#   support anyway, and if those aren't selected there's no reason to
#   select this one either unless you have some very special uses.
# 
# drivers/input/serio/Kconfig
#   2005/01/04 08:16:51-08:00 torvalds@ppc970.osdl.org +1 -1
#   Hide question about SERIO_LIBPS2 unless there is some remote
#   reason the user migth want to see it.
# 
# ChangeSet
#   2005/01/04 08:03:51-08:00 torvalds@ppc970.osdl.org 
#   Merge bk://linux-sam.bkbits.net/kbuild
#   into ppc970.osdl.org:/home/torvalds/v2.6/linux
# 
# mm/memory.c
#   2005/01/04 08:03:47-08:00 torvalds@ppc970.osdl.org +0 -0
#   Auto merged
# 
# include/linux/mm.h
#   2005/01/04 08:03:46-08:00 torvalds@ppc970.osdl.org +0 -0
#   Auto merged
# 
# include/asm-x86_64/page.h
#   2005/01/04 08:03:46-08:00 torvalds@ppc970.osdl.org +0 -0
#   Auto merged
# 
# arch/x86_64/mm/init.c
#   2005/01/04 08:03:46-08:00 torvalds@ppc970.osdl.org +0 -0
#   Auto merged
# 
# ChangeSet
#   2005/01/04 16:27:54+01:00 perex@suse.cz 
#   [ALSA] Print values at errors
#   
#   EMU10K1/EMU10K2 driver
#   Print out the invalid values at resource allocation errors, too.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/emu10k1/emu10k1x.c
#   2005/01/04 07:00:47+01:00 perex@suse.cz +2 -2
#   [ALSA] Print values at errors
#   
#   D:2005/01/04 14:00:47
#   C:EMU10K1/EMU10K2 driver
#   F:pci/emu10k1/emu10k1x.c:1.4->1.5 
#   L:Print out the invalid values at resource allocation errors, too.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/04 16:26:38+01:00 perex@suse.cz 
#   [ALSA] Don't probe sample rates on non-VRA chips
#   
#   ES1968 driver,CA0106 driver,EMU10K1/EMU10K2 driver
#   Don't probe sample rates on chips which need no VRA.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/es1968.c
#   2005/01/04 06:55:46+01:00 perex@suse.cz +1 -0
#   [ALSA] Don't probe sample rates on non-VRA chips
#   
#   D:2005/01/04 13:55:46
#   C:ES1968 driver,CA0106 driver,EMU10K1/EMU10K2 driver
#   F:pci/es1968.c:1.81->1.82 
#   F:pci/ca0106/ca0106_main.c:1.2->1.3 
#   F:pci/emu10k1/emu10k1x.c:1.3->1.4 
#   F:pci/emu10k1/emumixer.c:1.27->1.28 
#   L:Don't probe sample rates on chips which need no VRA.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/emu10k1/emumixer.c
#   2005/01/04 06:55:46+01:00 perex@suse.cz +1 -0
#   [ALSA] Don't probe sample rates on non-VRA chips
#   
#   D:2005/01/04 13:55:46
#   C:ES1968 driver,CA0106 driver,EMU10K1/EMU10K2 driver
#   F:pci/es1968.c:1.81->1.82 
#   F:pci/ca0106/ca0106_main.c:1.2->1.3 
#   F:pci/emu10k1/emu10k1x.c:1.3->1.4 
#   F:pci/emu10k1/emumixer.c:1.27->1.28 
#   L:Don't probe sample rates on chips which need no VRA.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/emu10k1/emu10k1x.c
#   2005/01/04 06:55:46+01:00 perex@suse.cz +2 -0
#   [ALSA] Don't probe sample rates on non-VRA chips
#   
#   D:2005/01/04 13:55:46
#   C:ES1968 driver,CA0106 driver,EMU10K1/EMU10K2 driver
#   F:pci/es1968.c:1.81->1.82 
#   F:pci/ca0106/ca0106_main.c:1.2->1.3 
#   F:pci/emu10k1/emu10k1x.c:1.3->1.4 
#   F:pci/emu10k1/emumixer.c:1.27->1.28 
#   L:Don't probe sample rates on chips which need no VRA.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ca0106/ca0106_main.c
#   2005/01/04 06:55:46+01:00 perex@suse.cz +2 -0
#   [ALSA] Don't probe sample rates on non-VRA chips
#   
#   D:2005/01/04 13:55:46
#   C:ES1968 driver,CA0106 driver,EMU10K1/EMU10K2 driver
#   F:pci/es1968.c:1.81->1.82 
#   F:pci/ca0106/ca0106_main.c:1.2->1.3 
#   F:pci/emu10k1/emu10k1x.c:1.3->1.4 
#   F:pci/emu10k1/emumixer.c:1.27->1.28 
#   L:Don't probe sample rates on chips which need no VRA.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/04 16:25:23+01:00 perex@suse.cz 
#   [ALSA] Add codec id in component names
#   
#   AC97 Codec Core
#   Added codec id number to the component names.
#   The component becomes like 'AC97a:12345678'.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ac97/ac97_codec.c
#   2005/01/04 04:10:22+01:00 perex@suse.cz +6 -2
#   [ALSA] Add codec id in component names
#   
#   D:2005/01/04 11:10:22
#   C:AC97 Codec Core
#   F:pci/ac97/ac97_codec.c:1.165->1.166 
#   L:Added codec id number to the component names.
#   L:The component becomes like 'AC97a:12345678'.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/04 16:24:14+01:00 perex@suse.cz 
#   [ALSA] Fix C-Media codecs
#   
#   AC97 Codec Core
#   Don't create PCM (and Master for CM9739/9761) volume controls for some of
#   C-Media codecs.  The volume is supposed to be controlled via softvol plugin.
#   
#   The wrong (duble) entry for a CM9761 model is removed, too.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ac97/ac97_patch.c
#   2005/01/04 04:01:01+01:00 perex@suse.cz +15 -0
#   [ALSA] Fix C-Media codecs
#   
#   D:2005/01/04 11:00:59
#   C:AC97 Codec Core
#   F:include/ac97_codec.h:1.61->1.62 
#   F:pci/ac97/ac97_codec.c:1.164->1.165 
#   F:pci/ac97/ac97_patch.c:1.65->1.66 
#   L:Don't create PCM (and Master for CM9739/9761) volume controls for some of
#   L:C-Media codecs.  The volume is supposed to be controlled via softvol plugin.
#   L:
#   L:The wrong (duble) entry for a CM9761 model is removed, too.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ac97/ac97_codec.c
#   2005/01/04 04:01:00+01:00 perex@suse.cz +10 -3
#   [ALSA] Fix C-Media codecs
#   
#   D:2005/01/04 11:00:59
#   C:AC97 Codec Core
#   F:include/ac97_codec.h:1.61->1.62 
#   F:pci/ac97/ac97_codec.c:1.164->1.165 
#   F:pci/ac97/ac97_patch.c:1.65->1.66 
#   L:Don't create PCM (and Master for CM9739/9761) volume controls for some of
#   L:C-Media codecs.  The volume is supposed to be controlled via softvol plugin.
#   L:
#   L:The wrong (duble) entry for a CM9761 model is removed, too.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# include/sound/ac97_codec.h
#   2005/01/04 04:00:59+01:00 perex@suse.cz +2 -0
#   [ALSA] Fix C-Media codecs
#   
#   D:2005/01/04 11:00:59
#   C:AC97 Codec Core
#   F:include/ac97_codec.h:1.61->1.62 
#   F:pci/ac97/ac97_codec.c:1.164->1.165 
#   F:pci/ac97/ac97_patch.c:1.65->1.66 
#   L:Don't create PCM (and Master for CM9739/9761) volume controls for some of
#   L:C-Media codecs.  The volume is supposed to be controlled via softvol plugin.
#   L:
#   L:The wrong (duble) entry for a CM9761 model is removed, too.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/04 15:46:20+01:00 dwmw2@shinybook.infradead.org 
#   Merge shinybook.infradead.org:/home/dwmw2/bk/linus-2.6
#   into shinybook.infradead.org:/home/dwmw2/bk/mtd-2.6
# 
# drivers/mtd/maps/Makefile
#   2005/01/04 15:46:11+01:00 dwmw2@shinybook.infradead.org +0 -0
#   Auto merged
# 
# drivers/mtd/maps/Kconfig
#   2005/01/04 15:46:11+01:00 dwmw2@shinybook.infradead.org +0 -0
#   Auto merged
# 
# MAINTAINERS
#   2005/01/04 15:46:11+01:00 dwmw2@shinybook.infradead.org +0 -0
#   Auto merged
# 
# CREDITS
#   2005/01/04 15:46:11+01:00 dwmw2@shinybook.infradead.org +0 -0
#   Auto merged
# 
# ChangeSet
#   2005/01/04 09:06:19+01:00 vojtech@suse.cz 
#   Merge suse.cz:/home/vojtech/bk/linus into suse.cz:/home/vojtech/bk/input
# 
# Documentation/kernel-parameters.txt
#   2005/01/04 09:06:16+01:00 vojtech@suse.cz +0 -0
#   Auto merged
# 
# ChangeSet
#   2005/01/04 08:36:32+01:00 perex@suse.cz 
#   [ALSA] Add a DXS entry for ABIT VA-20
#   
#   VIA82xx driver
#   Added a DXS whitelist entry for ABIT VA-20.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/via82xx.c
#   2005/01/03 12:13:16+01:00 perex@suse.cz +1 -0
#   [ALSA] Add a DXS entry for ABIT VA-20
#   
#   D:2005/01/03 19:13:16
#   C:VIA82xx driver
#   F:pci/via82xx.c:1.134->1.135 
#   L:Added a DXS whitelist entry for ABIT VA-20.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/04 08:35:21+01:00 perex@suse.cz 
#   [ALSA] Fix NULL pointer access
#   
#   MIXART driver
#   Fixed NULL pointer access when id string isn't given.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/mixart/mixart.c
#   2005/01/03 10:59:55+01:00 perex@suse.cz +1 -1
#   [ALSA] Fix NULL pointer access
#   
#   D:2005/01/03 17:59:55
#   C:MIXART driver
#   F:pci/mixart/mixart.c:1.22->1.23 
#   L:Fixed NULL pointer access when id string isn't given.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/04 08:34:08+01:00 perex@suse.cz 
#   [ALSA] Add a new ID
#   
#   CA0106 driver
#   I attach a minor update that corrects the DMA mask, and adds an extra
#   ID. This sound card can handle 32bit DMA addresses.
#   
#   Signed-off-by: James Courtier-Dutton  <James@superbug.demon.co.uk>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ca0106/ca0106_main.c
#   2005/01/03 10:31:24+01:00 perex@suse.cz +4 -3
#   [ALSA] Add a new ID
#   
#   D:2005/01/03 17:31:24
#   C:CA0106 driver
#   F:pci/ca0106/ca0106_main.c:1.1->1.2 
#   L:I attach a minor update that corrects the DMA mask, and adds an extra
#   L:ID. This sound card can handle 32bit DMA addresses.
#   Signed-off-by: James Courtier-Dutton  <James@superbug.demon.co.uk>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/04 08:28:18+01:00 perex@suse.cz 
#   [ALSA] Clean up and fix stereo mutes
#   
#   AC97 Codec Core
#   Clean up the build of controls.  The volume resolution detection is
#   unified.
#   Fixed minor bugs to handle stereo mutes.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ac97/ac97_codec.c
#   2005/01/03 07:33:41+01:00 perex@suse.cz +86 -134
#   [ALSA] Clean up and fix stereo mutes
#   
#   D:2005/01/03 14:33:41
#   C:AC97 Codec Core
#   F:pci/ac97/ac97_codec.c:1.163->1.164 
#   L:Clean up the build of controls.  The volume resolution detection is
#   L:unified.
#   L:Fixed minor bugs to handle stereo mutes.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/04 08:26:44+01:00 perex@suse.cz 
#   [ALSA] Clean up handling of user-defined controls
#   
#   Control Midlevel
#   Cleaned up the code to handle user-defined controls.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/control.c
#   2005/01/03 07:32:26+01:00 perex@suse.cz +5 -21
#   [ALSA] Clean up handling of user-defined controls
#   
#   D:2005/01/03 14:32:26
#   C:Control Midlevel
#   F:core/control.c:1.54->1.55 
#   L:Cleaned up the code to handle user-defined controls.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/04 06:48:44+01:00 akpm@osdl.org 
#   bk-kbuild-in_gate_area_no_task-warning-fix
#   
#   arch/x86_64/mm/init.c: In function `in_gate_area_no_task':
#   arch/x86_64/mm/init.c:656: warning: suggest parentheses around && within ||
#   In file included from include/asm/numa.h:5,
#                    from arch/x86_64/kernel/setup.c:60:
#   
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
# 
# arch/x86_64/mm/init.c
#   2004/12/29 12:37:56+01:00 akpm@osdl.org +2 -2
#   bk-kbuild-in_gate_area_no_task-warning-fix
# 
# ChangeSet
#   2005/01/03 21:21:57-08:00 zwane@arm.linux.org.uk 
#   [PATCH] NX: Fix noexec kernel parameter
#   
#   noexec_setup runs too late to take any effect, so parse it earlier.
#   
#   Signed-off-by: Zwane Mwaikambo <zwane@arm.linux.org.uk>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-x86_64/pgtable.h
#   2005/01/03 15:49:21-08:00 zwane@arm.linux.org.uk +1 -0
#   NX: Fix noexec kernel parameter
# 
# include/asm-i386/pgtable.h
#   2005/01/03 15:49:21-08:00 zwane@arm.linux.org.uk +2 -0
#   NX: Fix noexec kernel parameter
# 
# arch/x86_64/kernel/setup64.c
#   2005/01/03 15:50:30-08:00 zwane@arm.linux.org.uk +1 -4
#   NX: Fix noexec kernel parameter
# 
# arch/x86_64/kernel/setup.c
#   2005/01/03 15:50:31-08:00 zwane@arm.linux.org.uk +3 -0
#   NX: Fix noexec kernel parameter
# 
# arch/i386/mm/init.c
#   2005/01/03 15:50:32-08:00 zwane@arm.linux.org.uk +1 -4
#   NX: Fix noexec kernel parameter
# 
# arch/i386/kernel/setup.c
#   2005/01/03 15:50:31-08:00 zwane@arm.linux.org.uk +4 -0
#   NX: Fix noexec kernel parameter
# 
# ChangeSet
#   2005/01/03 21:16:56-08:00 heiko.carstens@de.ibm.com 
#   [PATCH] s390: SCLP device driver cleanup
#   
#   From: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
#   
#   sclp: core driver cleanup
#   
#   Details:
#   - moved signal shutdown (quiesce) handling into a separate file
#   - cleanup of SCLP core driver:
#     . introduced driver states instead of bits
#     . introduced request retry count and retry limit
#     . sclp_add_request now returns an error code if a request couldn't be started
#     . introduced separate request structure for init_mask requests to simplify
#       code
#     . request timer is now manually checked in sclp_sync_wait because timer
#       interrupts are disabled in this context
#     . removed busy timer - request timer now handles both cases
#     . split up sclp_start_request into __sclp_start_request and sclp_process
#       queue
#     . removed sclp_error_message (unused)
#     . introduced sclp_check_handler function to split up initial init mask
#       test from standard init mask request processing
#     . introduced sclp_deactivate and sclp_reactivate for simplified reboot
#       event handling (and potential use in suspend/resume scenario)
#     . added protection against multiple concurrent init mask calls
#   - minor changes in SCLP core driver:
#     . updated comments
#     . renamed functions to be consistent with "function name starts with __ =>
#       needs lock"
#     . renamed internal functions for consistency reasons
#     . introduced inlined helper functions to simplify code
#     . moved EXPORT_SYMBOL definitions next to function definition
#   - changes in sclp console driver
#     . removed callback recursion to prevent stack overflow
#   - changes to CPI module
#     . added check for sclp_add_request return code
#     . changed printks to specify a message level
#   - changes to generic sclp tty layer
#     . removed timed buffer retry after error (timers may not work in some
#       situations)
#     . introduced return code for sclp_emit_buffer
#   - changes to sclp tty driver
#     . removed callback recursion
#   - changes to sclp vt220 driver
#     . removed callback recursion
#     . removed timed buffer retry after error
#   - modified sclp_init_mask to prevent problems with some compiler versions
#   
#   Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/s390/char/sclp_quiesce.c
#   2005/01/03 15:49:39-08:00 heiko.carstens@de.ibm.com +114 -0
#   s390: SCLP device driver cleanup
# 
# drivers/s390/char/sclp_vt220.c
#   2005/01/03 15:49:39-08:00 heiko.carstens@de.ibm.com +35 -59
#   s390: SCLP device driver cleanup
# 
# drivers/s390/char/sclp_tty.c
#   2005/01/03 15:49:39-08:00 heiko.carstens@de.ibm.com +20 -20
#   s390: SCLP device driver cleanup
# 
# drivers/s390/char/sclp_rw.h
#   2005/01/03 15:49:39-08:00 heiko.carstens@de.ibm.com +1 -3
#   s390: SCLP device driver cleanup
# 
# drivers/s390/char/sclp_rw.c
#   2005/01/03 15:49:39-08:00 heiko.carstens@de.ibm.com +23 -39
#   s390: SCLP device driver cleanup
# 
# drivers/s390/char/sclp_quiesce.c
#   2005/01/03 15:49:39-08:00 heiko.carstens@de.ibm.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/drivers/s390/char/sclp_quiesce.c
# 
# drivers/s390/char/sclp_cpi.c
#   2005/01/03 15:49:39-08:00 heiko.carstens@de.ibm.com +14 -5
#   s390: SCLP device driver cleanup
# 
# drivers/s390/char/sclp_con.c
#   2005/01/03 15:49:39-08:00 heiko.carstens@de.ibm.com +20 -19
#   s390: SCLP device driver cleanup
# 
# drivers/s390/char/sclp.h
#   2005/01/03 15:49:39-08:00 heiko.carstens@de.ibm.com +4 -2
#   s390: SCLP device driver cleanup
# 
# drivers/s390/char/sclp.c
#   2005/01/03 15:49:39-08:00 heiko.carstens@de.ibm.com +667 -605
#   s390: SCLP device driver cleanup
# 
# drivers/s390/char/Makefile
#   2005/01/03 15:49:39-08:00 heiko.carstens@de.ibm.com +1 -1
#   s390: SCLP device driver cleanup
# 
# ChangeSet
#   2005/01/03 21:16:43-08:00 heiko.carstens@de.ibm.com 
#   [PATCH] s390: DCSS driver cleanup fix
#   
#   From: Carsten Otte <cotte@de.ibm.com>
#   
#    - Fix codingstyle.
#   
#   Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/s390/mm/extmem.c
#   2005/01/03 15:49:39-08:00 heiko.carstens@de.ibm.com +2 -1
#   s390: DCSS driver cleanup fix
# 
# ChangeSet
#   2005/01/03 21:16:29-08:00 heiko.carstens@de.ibm.com 
#   [PATCH] s390: Character device drivers
#   
#   From: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
#   From: Stefan Bader <shbader@de.ibm.com>
#   
#   character device driver changes:
#    - tape: Correct module count usage.
#    - 3270: Use mod_timer only when timer is pending.
#   
#   Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/s390/char/tty3270.c
#   2005/01/03 15:49:39-08:00 heiko.carstens@de.ibm.com +3 -2
#   s390: Character device drivers
# 
# drivers/s390/char/tape_core.c
#   2005/01/03 15:49:39-08:00 heiko.carstens@de.ibm.com +9 -2
#   s390: Character device drivers
# 
# drivers/s390/char/con3270.c
#   2005/01/03 15:49:39-08:00 heiko.carstens@de.ibm.com +4 -2
#   s390: Character device drivers
# 
# ChangeSet
#   2005/01/03 21:16:16-08:00 heiko.carstens@de.ibm.com 
#   [PATCH] s390: DASD driver
#   
#   From: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
#   
#   dasd driver changes:
#    - Modify format analysis routine to use block size provided by on-disk label.
#    - Search data structures when referencing use_diag/ro attribute values.
#    - Correct return code checking when allocating memory.
#   
#   Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/s390/block/dasd_proc.c
#   2005/01/03 15:49:39-08:00 heiko.carstens@de.ibm.com +6 -4
#   s390: DASD driver
# 
# drivers/s390/block/dasd_eckd.c
#   2005/01/03 15:49:39-08:00 heiko.carstens@de.ibm.com +13 -13
#   s390: DASD driver
# 
# drivers/s390/block/dasd_diag.c
#   2005/01/03 15:49:39-08:00 heiko.carstens@de.ibm.com +11 -5
#   s390: DASD driver
# 
# drivers/s390/block/dasd_devmap.c
#   2005/01/03 15:49:39-08:00 heiko.carstens@de.ibm.com +15 -8
#   s390: DASD driver
# 
# ChangeSet
#   2005/01/03 21:16:02-08:00 heiko.carstens@de.ibm.com 
#   [PATCH] s390: Network device driver patches
#   
#   From: Ursula Braun-Krahl <braunu@de.ibm.com>
#   From: Peter Tiedemann <ptiedem@de.ibm.com>
#   From: Thomas Spatzier <tspat@de.ibm.com>
#   From: Frank Pavlic <pavlic@de.ibm.com>
#   
#    - ctc: make sysfs attribute buffer early available.
#    - ctc: remove memory leak for channel ccw struct.
#    - qeth: remove redundant info card->info.ifname.
#    - qeth: enable recovery with retries in qeth_hardsetup_card after unit check.
#    - qeth: do not allow to set layer2 attribute on IQD devices.
#   
#   Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/s390/net/qeth_sys.c
#   2005/01/03 15:49:39-08:00 heiko.carstens@de.ibm.com +15 -8
#   s390: Network device driver patches
# 
# drivers/s390/net/qeth_proc.c
#   2005/01/03 15:49:39-08:00 heiko.carstens@de.ibm.com +4 -4
#   s390: Network device driver patches
# 
# drivers/s390/net/qeth_main.c
#   2005/01/03 15:49:39-08:00 heiko.carstens@de.ibm.com +69 -59
#   s390: Network device driver patches
# 
# drivers/s390/net/qeth.h
#   2005/01/03 15:49:39-08:00 heiko.carstens@de.ibm.com +8 -2
#   s390: Network device driver patches
# 
# drivers/s390/net/ctcmain.c
#   2005/01/03 15:49:39-08:00 heiko.carstens@de.ibm.com +10 -6
#   s390: Network device driver patches
# 
# ChangeSet
#   2005/01/03 21:15:47-08:00 heiko.carstens@de.ibm.com 
#   [PATCH] s390: Common I/O layer
#   
#   From: Cornelia Huck <cohuck@de.ibm.com>
#   
#   common i/o layer changes:
#   
#    - Cope with changed cdev->handler.
#    - Split clearing of subchannels from reipl function and declare it in header.
#   
#   Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-s390/cio.h
#   2005/01/03 15:49:38-08:00 heiko.carstens@de.ibm.com +2 -0
#   s390: Common I/O layer
# 
# drivers/s390/cio/qdio.c
#   2005/01/03 15:49:38-08:00 heiko.carstens@de.ibm.com +10 -1
#   s390: Common I/O layer
# 
# drivers/s390/cio/cio.c
#   2005/01/03 15:49:38-08:00 heiko.carstens@de.ibm.com +13 -6
#   s390: Common I/O layer
# 
# ChangeSet
#   2005/01/03 21:15:33-08:00 heiko.carstens@de.ibm.com 
#   [PATCH] s390: core patches
#   
#   s390 core changes:
#    - Disable pfault pseudo page faults before stopping a cpu.
#    - Add exception table for diag10 instruction.
#    - Move initialization of active_mm of idle task to smp_create_idle.
#    - Regenerate default configuration.
#   
#   Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/s390/mm/init.c
#   2005/01/03 15:49:38-08:00 heiko.carstens@de.ibm.com +17 -4
#   s390: core patches
# 
# arch/s390/kernel/smp.c
#   2005/01/03 15:49:38-08:00 heiko.carstens@de.ibm.com +8 -1
#   s390: core patches
# 
# arch/s390/kernel/setup.c
#   2005/01/03 15:49:38-08:00 heiko.carstens@de.ibm.com +0 -3
#   s390: core patches
# 
# arch/s390/defconfig
#   2005/01/03 15:49:38-08:00 heiko.carstens@de.ibm.com +7 -2
#   s390: core patches
# 
# ChangeSet
#   2005/01/03 21:15:20-08:00 schwidefsky@de.ibm.com 
#   [PATCH] s390: remove compat setup_arg_pages32
#   
#   Remove the s390 version of setup_arg_pages32 function and use the generic
#   setup_arg_pages function instead.
#   
#   Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/s390/kernel/binfmt_elf32.c
#   2005/01/03 15:49:38-08:00 schwidefsky@de.ibm.com +0 -3
#   s390: remove compat setup_arg_pages32
# 
# arch/s390/kernel/Makefile
#   2005/01/03 15:49:38-08:00 schwidefsky@de.ibm.com +1 -1
#   s390: remove compat setup_arg_pages32
# 
# BitKeeper/deleted/.del-compat_exec.c~5f9e0c0b8a034dac
#   2005/01/03 21:15:12-08:00 schwidefsky@de.ibm.com +0 -0
#   Delete: arch/s390/kernel/compat_exec.c
# 
# ChangeSet
#   2005/01/03 21:15:06-08:00 kraxel@bytesex.org 
#   [PATCH] uml: sysfs support for the uml block devices.
#   
#   Signed-off-by: Gerd Knorr <kraxel@bytesex.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/um/drivers/ubd_kern.c
#   2005/01/03 15:49:38-08:00 kraxel@bytesex.org +18 -0
#   uml: sysfs support for the uml block devices.
# 
# ChangeSet
#   2005/01/03 21:14:52-08:00 kraxel@bytesex.org 
#   [PATCH] uml: sysfs support for uml network driver.
#   
#   Add sysfs support to the uml network driver.  Also comment the eth_init
#   function, I think that one is never ever needed as the devices are initialized
#   when the underlying transport mechanism registeres.
#   
#   Signed-off-by: Gerd Knorr <kraxel@bytesex.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/um/include/net_kern.h
#   2005/01/03 15:49:38-08:00 kraxel@bytesex.org +1 -0
#   uml: sysfs support for uml network driver.
# 
# arch/um/drivers/net_kern.c
#   2005/01/03 15:49:38-08:00 kraxel@bytesex.org +22 -2
#   uml: sysfs support for uml network driver.
# 
# ChangeSet
#   2005/01/03 21:14:36-08:00 kraxel@bytesex.org 
#   [PATCH] uml: raise tty limit
#   
#   Signed-off-by: Gerd Knorr <kraxel@bytesex.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/um/drivers/stdio_console.c
#   2005/01/03 15:49:38-08:00 kraxel@bytesex.org +1 -1
#   uml: raise tty limit
# 
# ChangeSet
#   2005/01/03 21:14:23-08:00 kraxel@bytesex.org 
#   [PATCH] uml: fix umldir init order
#   
#   Fixup initialization order when creating the $HOME/.uml/<umid> directory and
#   the files therein, also make the error messages more useful.
#   
#   Signed-off-by: Gerd Knorr <kraxel@bytesex.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/um/kernel/umid.c
#   2005/01/03 15:49:38-08:00 kraxel@bytesex.org +9 -10
#   uml: fix umldir init order
# 
# ChangeSet
#   2005/01/03 21:14:09-08:00 kraxel@bytesex.org 
#   [PATCH] uml: symbol export
#   
#   export a missing symbol, IIRC xfs needs that one.
#   
#   Signed-off-by: Gerd Knorr <kraxel@bytesex.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/um/kernel/um_arch.c
#   2005/01/03 15:49:37-08:00 kraxel@bytesex.org +1 -0
#   uml: symbol export
# 
# ChangeSet
#   2005/01/03 21:13:54-08:00 jdike@addtoit.com 
#   [PATCH] uml: Fix highmem compilation
#   
#   Remove a reference to an unused variable.
#   
#   Signed-off-by: Jeff Dike <jdike@addtoit.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/um/kernel/mem.c
#   2005/01/03 15:49:37-08:00 jdike@addtoit.com +0 -3
#   uml: Fix highmem compilation
# 
# ChangeSet
#   2005/01/03 21:13:41-08:00 jdike@addtoit.com 
#   [PATCH] uml: Remove bogus __NR_sigreturn check
#   
#   Before Bodo's signal fixes and my signal delivery rework, it was possible for
#   a process to execute UML code by running the default signal restorer.  This
#   is no longer possible, so this check can be removed from the sanity test for
#   UML accidentally tracing itself.
#   
#   Signed-off-by: Jeff Dike <jdike@addtoit.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/um/kernel/tt/syscall_user.c
#   2005/01/03 15:49:37-08:00 jdike@addtoit.com +1 -2
#   uml: Remove bogus __NR_sigreturn check
# 
# ChangeSet
#   2005/01/03 21:13:28-08:00 jdike@addtoit.com 
#   [PATCH] uml: declare ptrace_setfpregs
#   
#   Add a declaration for ptrace_setfpregs
#   
#   Signed-off-by: Jeff Dike <jdike@addtoit.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/um/include/ptrace_user.h
#   2005/01/03 15:49:37-08:00 jdike@addtoit.com +1 -0
#   uml: declare ptrace_setfpregs
# 
# ChangeSet
#   2005/01/03 21:13:13-08:00 jdike@addtoit.com 
#   [PATCH] uml: use SYSEMU_SINGLESTEP
#   
#   This implements using the new ptrace option SYSEMU_SINGLESTEP in UML
#   (advanced sysemu) in SKAS and TT modes.
#   To have a fast selection of the appropriate ptrace option to use next,
#   a 2 dimensional arry is used and singlestepping() is modified to return
#   0,1 or 2:
#       0 = don't do singlestepping
#       1 = singlestep a syscall
#       2 = singlestep a "non syscall" instruction
#   
#   In do_syscall() writing of the syscall number is supressed, if the
#   advanced sysemu is in use (that does it itself).
#   
#   Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
#   Signed-off-by: Jeff Dike <jdike@addtoit.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/um/kernel/tt/tracer.c
#   2005/01/03 15:49:37-08:00 jdike@addtoit.com +7 -11
#   uml: use SYSEMU_SINGLESTEP
# 
# arch/um/kernel/tt/syscall_user.c
#   2005/01/03 15:50:15-08:00 jdike@addtoit.com +4 -0
#   uml: use SYSEMU_SINGLESTEP
# 
# arch/um/kernel/skas/process.c
#   2005/01/03 15:49:37-08:00 jdike@addtoit.com +4 -6
#   uml: use SYSEMU_SINGLESTEP
# 
# arch/um/kernel/process_kern.c
#   2005/01/03 15:49:37-08:00 jdike@addtoit.com +2 -2
#   uml: use SYSEMU_SINGLESTEP
# 
# arch/um/include/ptrace_user.h
#   2005/01/03 15:50:16-08:00 jdike@addtoit.com +7 -0
#   uml: use SYSEMU_SINGLESTEP
# 
# ChangeSet
#   2005/01/03 21:12:59-08:00 jdike@addtoit.com 
#   [PATCH] uml: detect SYSEMU_SINGLESTEP
#   
#   From: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
#   
#   This implements checking for the new ptrace option SYSEMU_SINGLESTEP
#   (advanced sysemu) and allows the values 0,1,2 for /proc/sysemu,
#   if advanced sysemu is available:
#      0 = don't use sysemu
#      1 = use sysemu, but don't use advanced sysemu
#      2 = use sysemu and advanced sysemu
#   
#   Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
#   Signed-off-by: Jeff Dike <jdike@addtoit.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/um/kernel/process_kern.c
#   2005/01/03 15:50:16-08:00 jdike@addtoit.com +4 -2
#   uml: detect SYSEMU_SINGLESTEP
# 
# arch/um/kernel/process.c
#   2005/01/03 15:49:37-08:00 jdike@addtoit.com +36 -2
#   uml: detect SYSEMU_SINGLESTEP
# 
# arch/um/include/sysdep-i386/ptrace.h
#   2005/01/03 15:49:37-08:00 jdike@addtoit.com +3 -0
#   uml: detect SYSEMU_SINGLESTEP
# 
# arch/um/include/ptrace_user.h
#   2005/01/03 15:50:16-08:00 jdike@addtoit.com +3 -0
#   uml: detect SYSEMU_SINGLESTEP
# 
# ChangeSet
#   2005/01/03 21:12:43-08:00 jdike@addtoit.com 
#   [PATCH] uml: fix update_process_times call
#   
#   From: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
#   
#   In call to update_process_times() set parameter user
#   correctly. (was from for SKAS).
#   
#   Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
#   Signed-off-by: Jeff Dike <jdike@addtoit.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/um/kernel/time_kern.c
#   2005/01/03 15:49:37-08:00 jdike@addtoit.com +1 -1
#   uml: fix update_process_times call
# 
# ChangeSet
#   2005/01/03 21:12:30-08:00 jdike@addtoit.com 
#   [PATCH] uml: correctly restore extramask in sigreturn
#   
#   From: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
#   
#   Restoring of current->blocked in sys_sigreturn is wrong.
#   The first (long ) of the mask correctly is fetched from sc->oldmask.
#   The further longs again come from there, but correctly should be
#   taken from frame->extramask.
#   
#   Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
#   Signed-off-by: Jeff Dike <jdike@addtoit.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/um/sys-i386/signal.c
#   2005/01/03 15:49:36-08:00 jdike@addtoit.com +4 -3
#   uml: correctly restore extramask in sigreturn
# 
# ChangeSet
#   2005/01/03 21:12:17-08:00 jdike@addtoit.com 
#   [PATCH] uml: SYSEMU fixes
#   
#   From: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
#   
#   Usage of SYSEMU in TT mode is modified, so that always the
#   same method is used in do_syscall as has been used before in
#   ptrace(PTRACE_SYSCALL/SYSEMU, ...)
#   
#   Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
#   Signed-off-by: Jeff Dike <jdike@addtoit.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/um/kernel/tt/tracer.c
#   2005/01/03 15:50:16-08:00 jdike@addtoit.com +4 -4
#   uml: SYSEMU fixes
# 
# arch/um/kernel/tt/syscall_user.c
#   2005/01/03 15:50:16-08:00 jdike@addtoit.com +3 -6
#   uml: SYSEMU fixes
# 
# arch/um/kernel/tt/include/tt.h
#   2005/01/03 15:49:36-08:00 jdike@addtoit.com +1 -1
#   uml: SYSEMU fixes
# 
# ChangeSet
#   2005/01/03 21:12:04-08:00 jdike@addtoit.com 
#   [PATCH] uml: Allow vsyscall code to build on 2.4
#   
#   From: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
#   
#   This patch fixes compilation on 2.4 hosts by not relying on macros from 2.6
#   host kernel headers in one userspace file. It's about AT_SYSINFO_* macros.
#   
#   Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it>
#   Signed-off-by: Jeff Dike <jdike@addtoit.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/um/os-Linux/elf_aux.c
#   2005/01/03 15:49:36-08:00 jdike@addtoit.com +1 -0
#   uml: Allow vsyscall code to build on 2.4
# 
# arch/um/include/elf_user.h
#   2005/01/03 15:49:36-08:00 jdike@addtoit.com +19 -0
#   uml: Allow vsyscall code to build on 2.4
# 
# arch/um/include/elf_user.h
#   2005/01/03 15:49:36-08:00 jdike@addtoit.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/um/include/elf_user.h
# 
# ChangeSet
#   2005/01/03 21:11:51-08:00 jdike@addtoit.com 
#   [PATCH] uml: Fix setting of TIF_SIGPENDING
#   
#   From: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
#   
#   My older patch, that sets TIF_SIGPENDING after an ptrace-interception
#   in syscall_trace() is wrong.
#   Some syscalls want to be called without any signal pending. If a signal
#   is pending on syscall-entry, they immediately return with -ERESTARTNOINTR.
#   Thus, on return to user, the pending signals can be processed and the
#   kernel will lower eip by 2 to have the syscall restarted after that.
#   Since my change sets TIF_SIGPENDING on the entry and exit interception,
#   stracing such a syscall looped! Try "strace ls" to see what happens.
#   Fix: set TIF_SIGPENDING on the exit interception only. This avoids the
#   loop and is enough for security.
#   
#   Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
#   Signed-off-by: Jeff Dike <jdike@addtoit.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/um/kernel/ptrace.c
#   2005/01/03 15:49:36-08:00 jdike@addtoit.com +2 -2
#   uml: Fix setting of TIF_SIGPENDING
# 
# ChangeSet
#   2005/01/03 21:11:38-08:00 jdike@addtoit.com 
#   [PATCH] uml: system call restart fixes
#   
#   From: Bodo Stroesser
#   
#   The implementation of sys_sigreturn() and sys_rt_sigreturn() in UML
#   must be changed.
#   This is necessary, since the return value of sys_*_sigreturn()
#   is the value of eax in the thread, that was interrupted by the
#   signal handler. If accidentaly eax contains -ERESTART_*, orig_eax
#   *must* be -1 to avoid syscall restart processing in kern_do_signal().
#   If orig_eax is >=0, eip might be lowered by 2, the process will fail.
#   In UML PT_REGS_SYSCALL_NR() or UPT_SYSCALL_NR() have to be used
#   instead of orig_eax.
#   
#   While writing and testing an exploit for this, I saw that for most
#   interrupts, the syscall number is undefined. So even on a return from
#   interrupt a wrong syscall restart handling could happen.
#   
#   And also: UML resumes a process with ptrace(PTRACE_SYSCALL/SYSEMU/SINGLESTEP
#   when a syscall in UML in SKAS mode has been processed. But since there
#   is a valid syscall number in the host's orig_eax, the host could do
#   a wrong syscall restarting if the syscall in UML was a sigreturn() returning
#   -ERESTART* To avoid this, in SKAS -1 should be written to regs.orig_eax
#   before restore_registers().
#   
#   Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
#   Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it>
#   Signed-off-by: Jeff Dike <jdike@addtoit.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/um/sys-i386/signal.c
#   2005/01/03 15:50:16-08:00 jdike@addtoit.com +4 -0
#   uml: system call restart fixes
# 
# arch/um/kernel/tt/tracer.c
#   2005/01/03 15:50:16-08:00 jdike@addtoit.com +4 -1
#   uml: system call restart fixes
# 
# arch/um/kernel/skas/process.c
#   2005/01/03 15:50:16-08:00 jdike@addtoit.com +5 -1
#   uml: system call restart fixes
# 
# ChangeSet
#   2005/01/03 21:11:23-08:00 jdike@addtoit.com 
#   [PATCH] uml: export end_iomem
#   
#   From: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
#   
#   some modules need end_iomem to be exported.
#   
#   Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
#   Signed-off-by: Jeff Dike <jdike@addtoit.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/um/kernel/ksyms.c
#   2005/01/03 15:49:36-08:00 jdike@addtoit.com +1 -0
#   uml: export end_iomem
# 
# ChangeSet
#   2005/01/03 21:11:10-08:00 jdike@addtoit.com 
#   [PATCH] uml: small vsyscall fixes
#   
#   From: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
#   
#   As Jeff pointed out, the check for address wrapping in access_ok_skas
#   was wrong. Also, change vsyscall_ehdr and vsyscall_end to be
#   unsigned long and export them, since modules need them for access_ok_skas
#   
#   Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
#   Signed-off-by: Jeff Dike <jdike@addtoit.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-um/archparam-i386.h
#   2005/01/03 15:49:36-08:00 jdike@addtoit.com +3 -3
#   uml: small vsyscall fixes
# 
# arch/um/os-Linux/user_syms.c
#   2005/01/03 15:49:36-08:00 jdike@addtoit.com +3 -0
#   uml: small vsyscall fixes
# 
# arch/um/os-Linux/elf_aux.c
#   2005/01/03 15:50:16-08:00 jdike@addtoit.com +3 -3
#   uml: small vsyscall fixes
# 
# arch/um/kernel/skas/include/uaccess-skas.h
#   2005/01/03 15:49:36-08:00 jdike@addtoit.com +2 -2
#   uml: small vsyscall fixes
# 
# ChangeSet
#   2005/01/03 21:10:59-08:00 jdike@addtoit.com 
#   [PATCH] uml: defconfig update
#   
#   Update defconfig for 2.6.10-rc2-mm4.
#   
#   Signed-off-by: Jeff Dike <jdike@addtoit.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/um/defconfig
#   2005/01/03 15:49:35-08:00 jdike@addtoit.com +7 -5
#   uml: defconfig update
# 
# ChangeSet
#   2005/01/03 21:10:46-08:00 jdike@addtoit.com 
#   [PATCH] uml: kill host processes properly
#   
#   This patch changes how UML kills ptraced processes in order to be more
#   correct in the presence of the ptrace changes in 2.6.9.  It used to be that
#   ptrace stopped processes could simply be killed and they would go away.  Now,
#   there's a new run state for ptraced processes which doesn't receive signals
#   until they are PTRACE_KILLed or PTRACE_CONTinued.  So, this patch kills the
#   process, as usual, then PTRACE_KILL and PTRACE_CONT.  This is done in
#   os_kill_ptrace_process() for use from skas mode, and in tracer() when it
#   sees a child process getting a SIGKILL.
#   
#   Signed-off-by: Jeff Dike <jdike@addtoit.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/um/os-Linux/process.c
#   2005/01/03 15:49:35-08:00 jdike@addtoit.com +7 -0
#   uml: kill host processes properly
# 
# arch/um/kernel/tt/tracer.c
#   2005/01/03 15:50:17-08:00 jdike@addtoit.com +7 -1
#   uml: kill host processes properly
# 
# arch/um/kernel/tt/process_kern.c
#   2005/01/03 15:49:35-08:00 jdike@addtoit.com +3 -2
#   uml: kill host processes properly
# 
# arch/um/kernel/tt/exec_user.c
#   2005/01/03 15:49:35-08:00 jdike@addtoit.com +2 -1
#   uml: kill host processes properly
# 
# ChangeSet
#   2005/01/03 21:10:34-08:00 jdike@addtoit.com 
#   [PATCH] uml: Add TRACESYSGOOD support
#   
#   From: Bodo Stroesser
#   
#   Patch 1/3 to implement usage of PTRACE_O_TRACESYSGOOD
#   This is necessary, to fix UMLs bad behavior when a process does
#   a systemcall with syscall-number less than 0.
#   
#   Insert a check for availability and function of
#   ptrace(PTRACE_SETOPTIONS,,,PTRACE_O_TRACESYSGOOD)
#   into the normal ptrace checks at startup.
#   
#   Patch 2/3 to implement usage of PTRACE_O_TRACESYSGOOD
#   This is necessary, to fix UMLs bad behavior when a process does
#   a systemcall with syscall-number less than 0.
#   
#   This patch makes SKAS-mode use PTRACE_O_TRACESYSGOOD and fixes
#   the problems in SKAS.
#   
#   Patch 3/3 to implement usage of PTRACE_O_TRACESYSGOOD
#   This is necessary, to fix UMLs bad behavior when a process does
#   a systemcall with syscall-number less than 0.
#   
#   This patch makes TT-mode use PTRACE_O_TRACESYSGOOD and fixes
#   the problems in TT.
#   I'm not quite sure, that this patch doesn't cause problems with
#   debugger usage. It should be testet by someone, who has more
#   know how about TT-mode debugger.
#   
#   Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
#   Signed-off-by: Jeff Dike <jdike@addtoit.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/um/kernel/tt/tracer.c
#   2005/01/03 15:50:17-08:00 jdike@addtoit.com +18 -3
#   uml: Add TRACESYSGOOD support
# 
# arch/um/kernel/tt/syscall_user.c
#   2005/01/03 15:50:16-08:00 jdike@addtoit.com +6 -8
#   uml: Add TRACESYSGOOD support
# 
# arch/um/kernel/tt/include/tt.h
#   2005/01/03 15:50:16-08:00 jdike@addtoit.com +1 -0
#   uml: Add TRACESYSGOOD support
# 
# arch/um/kernel/tt/exec_user.c
#   2005/01/03 15:50:17-08:00 jdike@addtoit.com +4 -0
#   uml: Add TRACESYSGOOD support
# 
# arch/um/kernel/skas/process.c
#   2005/01/03 15:50:17-08:00 jdike@addtoit.com +13 -9
#   uml: Add TRACESYSGOOD support
# 
# arch/um/kernel/process.c
#   2005/01/03 15:50:16-08:00 jdike@addtoit.com +6 -2
#   uml: Add TRACESYSGOOD support
# 
# ChangeSet
#   2005/01/03 21:10:21-08:00 jdike@addtoit.com 
#   [PATCH] uml: include vsyscall page in core dumps
#   
#   From: Bodo Stroesser
#   
#   Complete the dump with the vsyscall-information, if a vsyscall-page
#   is available.
#   
#   Signed-off-by: Bodo Stroesser <bodo.stroesser@fujitsu-siemens.com>
#   Signed-off-by: Jeff Dike <jdike@addtoit.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-um/archparam-i386.h
#   2005/01/03 15:50:17-08:00 jdike@addtoit.com +18 -26
#   uml: include vsyscall page in core dumps
# 
# ChangeSet
#   2005/01/03 21:10:08-08:00 jdike@addtoit.com 
#   [PATCH] uml: make vsyscall page into process page tables
#   
#   From: Bodo Stroesser
#   
#   To make the vsyscall-page available for copy_from_user() and
#   ptrace(), we should use kernel's "gate-vma" mechanism.
#   Therefore we need a valid page structure. To have this, one
#   page (or more) is allocated at boot time, the contents of the
#   vsyscall-page is copied into this page and the page's pte is
#   inserted in swapper's pagetables.
#   Now it will be copied into the pagetables of all processes.
#   
#   Note: this alone doesn't work, since FIXADDR_USER_START and
#         FIXADDR_USER_END are not yet defined correctly. Also
#         access_ok_skas() does not yet grant read accesses to
#         pages not in the normal user area.
#   
#   Risks:
#   Please check the first hunk! I don't know, whether this change is OK.
#   Maybe fixrange_init() is wrong anyway with 3-level-pagetables?
#   
#   Here access_ok_skas() and FIXADDR_USER_XXXX are fixed.
#   Now everything should work fine, while the processes are
#   running. But if a process crashes, the vsyscall-page will
#   not be dumped.
#   
#   Signed-off-by: Bodo Stroesser <bodo.stroesser@fujitsu-siemens.com>
#   Signed-off-by: Jeff Dike <jdike@addtoit.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-um/pgtable.h
#   2005/01/03 15:49:35-08:00 jdike@addtoit.com +2 -0
#   uml: make vsyscall page into process page tables
# 
# include/asm-um/fixmap.h
#   2005/01/03 15:49:35-08:00 jdike@addtoit.com +3 -3
#   uml: make vsyscall page into process page tables
# 
# arch/um/kernel/skas/include/uaccess-skas.h
#   2005/01/03 15:50:17-08:00 jdike@addtoit.com +6 -1
#   uml: make vsyscall page into process page tables
# 
# arch/um/kernel/mem.c
#   2005/01/03 15:50:15-08:00 jdike@addtoit.com +25 -0
#   uml: make vsyscall page into process page tables
# 
# ChangeSet
#   2005/01/03 21:09:55-08:00 jdike@addtoit.com 
#   [PATCH] uml: add elf vsyscall support
#   
#   From: Bodo Stroesser
#   
#   This is the first patch of a series of four.
#   These patches allow the use of sysenter-systemcalls in UML
#   if the host support sysenter.
#   Some facts have to be noted:
#   - the sysenter instruction does not save anything, not even the
#     return address. Thus the host-kernel builds a stackframe with an
#     fixed return address for the backjump to the vsyscall-page. All
#     kernels that support sysenter thus must have a vsyscall-page
#   - The hosts vsyscall-page is visible in all memory-contexts on the
#     host, even in those of the processes running on UML. This cannot
#     be changed.
#   So the best way to implement sysenter is to integrate the host's
#   vsyscall-page into UML, if available.
#   
#   This patch creates a new source file containing an UML
#   initialization function. The function scans the Elf-auxiliary vector
#   that is prepared by the host for relevant information about:
#   - vsyscall elf-header
#   - vsyscall entry
#   - machine type (called "platform", e.g. "i586" or "i686")
#   - hardware capabilities
#   These informations are inserted into the Elf-auxiliary-vector that is
#   generated if an UML process calls "execXX()". If the information from
#   the auxiliray-vector is not complete, UML uses the previos default
#   values, with one exception: if the host has no vsyscall-page, UML now
#   does no longer insert AT_SYSINFO or AT_SYSINFO_EHDR elements. (I think,
#   that's better than writing dummies)
#   
#   Since the host's vsyscall-page is always visible to UML processes, this
#   change is enough to let UML with an i686-compiled glibc use sysenter.
#   
#   what's missing:
#   - is_syscall() in SKAS cannot access the code in the vsyscall-page via
#     copy_from_user(), thus singlesteppers still could break out. (Note:
#     that's not new, if someone jumps willingly to the sysenter-entry in
#     the vsyscall-page, he can do that without the patch, too).
#   - a debugger cannot access the code in the vsyscall-page via
#     ptrace( PEEKTEXT, ...)
#   
#   Risks:
#   could there by any feature of the host's processor, that is indicated in
#   the hardware capabilities, but must not be used in UML?
#   
#   Signed-off-by: Bodo Stroesser <bodo.stroesser@fujitsu-siemens.com>
#   Signed-off-by: Jeff Dike <jdike@addtoit.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-um/elf.h
#   2005/01/03 15:49:35-08:00 jdike@addtoit.com +2 -1
#   uml: add elf vsyscall support
# 
# include/asm-um/archparam-i386.h
#   2005/01/03 15:50:18-08:00 jdike@addtoit.com +13 -12
#   uml: add elf vsyscall support
# 
# arch/um/os-Linux/elf_aux.c
#   2005/01/03 15:50:17-08:00 jdike@addtoit.com +66 -0
#   uml: add elf vsyscall support
# 
# arch/um/os-Linux/Makefile
#   2005/01/03 15:49:35-08:00 jdike@addtoit.com +3 -2
#   uml: add elf vsyscall support
# 
# arch/um/kernel/um_arch.c
#   2005/01/03 15:50:15-08:00 jdike@addtoit.com +0 -5
#   uml: add elf vsyscall support
# 
# arch/um/kernel/main.c
#   2005/01/03 15:49:35-08:00 jdike@addtoit.com +4 -0
#   uml: add elf vsyscall support
# 
# arch/um/os-Linux/elf_aux.c
#   2005/01/03 15:50:17-08:00 jdike@addtoit.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/um/os-Linux/elf_aux.c
# 
# ChangeSet
#   2005/01/03 21:09:42-08:00 blaisorblade_spam@yahoo.it 
#   [PATCH] uml: finish fixing run_helper failure path
#   
#   Fix some bugs left in the failure path of run_helper by the previous patch:
#   it was missing one
#   
#   os_close_file(fds[1])
#   
#   which is conditional.  To use the goto handling model, I set the fd to -1
#   if it's already closed (I don't want to check if keeping one more pipe-end
#   open is no problem).
#   
#   Also do some cosmethic cleanup:
#   
#   * "err" was what we returned even on success, so just use a neutral "ret".
#   
#   * use tabs, not spaces.
#   
#   * a little more comments.
#   
#   Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/um/kernel/helper.c
#   2005/01/03 15:49:35-08:00 blaisorblade_spam@yahoo.it +27 -21
#   uml: finish fixing run_helper failure path
# 
# arch/um/drivers/net_user.c
#   2005/01/03 15:49:35-08:00 blaisorblade_spam@yahoo.it +2 -1
#   uml: finish fixing run_helper failure path
# 
# ChangeSet
#   2005/01/03 21:09:29-08:00 blaisorblade_spam@yahoo.it 
#   [PATCH] Uml: first part rework of run_helper() and users.
#   
#   With Jeff Dike <jdike@addtoit.com>,
#   
#   Fixed a file descriptor leak in the network driver when changing an IP
#   address.
#   
#   Fixed the error handling in run_helper.
#   
#   Paolo notes:
#   
#   Actually, this is part one of the change, the exact one extracted from Jeff
#   Dike's incrementals tree before 2.6.9-rc big UML merge.
#   
#   There is some changes must be done, so I'm also sending a second patch with
#   this one, too.  Separated for tracking purposes.
#   
#   Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/um/kernel/helper.c
#   2005/01/03 15:50:18-08:00 blaisorblade_spam@yahoo.it +5 -9
#   Uml: first part rework of run_helper() and users.
# 
# arch/um/drivers/net_user.c
#   2005/01/03 15:50:18-08:00 blaisorblade_spam@yahoo.it +2 -1
#   Uml: first part rework of run_helper() and users.
# 
# ChangeSet
#   2005/01/03 21:09:16-08:00 kraxel@bytesex.org 
#   [PATCH] uml: terminal cleanup
#   
#   This is a major cleanup of the uml terminal drivers and console handling
#   (console as in "where the kernel messages go to", not as in "linux
#   virtual terminals").  The changes in detail:
#   
#    (1) There is a new console driver calles "stderr" which (as the name
#        implies) simply dumps all kernel messages to stderr.  That one
#        is registered very early in the boot process via console_initcall()
#        and will print every almost kernel message instantly: Both very
#        early in the boot process and very late in shutdown.
#        Note that this is not enabled by default, see below for details.
#   
#    (2) Ditched the early-console-init hackery in stdio_console.c
#        (open_console(NULL) + related stuff) into the waste basket, not
#        needed any more as you can use the new stderr console driver to
#        get the kernel messages if your kernel crashes very early in the
#        boot process.
#   
#    (3) Handle console initialitation for the uml stdio console and
#        virtual serial lines the normal way using the console->setup()
#        function.  Now all kernel messages appear on your console device
#        once it is initialized without any dirty tricks.
#   
#    (4) The (2) changes allow a number of further cleanups:  As we don't
#        open a line without a tty_struct any more we can ...
#         * hook struct line into tty->driver_data
#         * pass around tty_struct instead of struct line everythere
#         * get rid of some trivial wrappers in ssl.c and stdio_console.c
#           because we can get struct line via tty_struct all the time now.
#   
#    (5) Change the ordering in the arch/um/drivers/Makefile and thus
#        the link and initialization order to make sure the stdio console
#        and not the virtual serial line is the default console device.
#   
#    (6) Fixed a number of Documentation/CodingStyle issues within the
#        code (not systematically, but usually just the places I was
#        touching anyway or where it bugged me while browsing the code
#        because it was hard to read).
#   
#   Looks like that cleanup also fixed some strange tty issues I've seen in
#   the past (like console getty not responding to input sometimes, suse's
#   /sbin/blogd causing trouble).
#   
#   Finally some usage notes for using the new stderr console:
#   
#   If the stderr console is enabled, then it is the default console device
#   because it registeres very early in the boot process.  But as it isn't
#   linked to a tty device this makes init unhappy, you'll see "can't open
#   initial console" error messages.  Because you usually don't want that
#   the stderr console is turned off by default.  That also maintains the
#   behavior that /dev/tty0 is the first console device registered and thus
#   the default console.
#   
#   There are basically two useful use cases for the stderr console:
#   
#    (1) Your kernel dies before the normal console device is initialized
#        and thus you don't see any messages.  Just enable the stderr
#        console to see them by adding "stderr=1" to the kernel command line.
#   
#    (2) You want to have the kernel messages on both stderr and your
#        console terminal device.  Try something like this:
#   
#   	$ ./linux stderr=1 console=stderr console=ttyS0 ssl0=xterm
#   
#        This example sets up the console on a virtual serial line and
#        pops up an xterm for that.
#   
#   Signed-off-by: Gerd Knorr <kraxel@bytesex.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/um/include/line.h
#   2005/01/03 15:49:34-08:00 kraxel@bytesex.org +9 -7
#   uml: terminal cleanup
# 
# arch/um/include/chan_user.h
#   2005/01/03 15:49:34-08:00 kraxel@bytesex.org +3 -2
#   uml: terminal cleanup
# 
# arch/um/include/chan_kern.h
#   2005/01/03 15:49:34-08:00 kraxel@bytesex.org +7 -3
#   uml: terminal cleanup
# 
# arch/um/drivers/xterm.c
#   2005/01/03 15:49:34-08:00 kraxel@bytesex.org +2 -2
#   uml: terminal cleanup
# 
# arch/um/drivers/stdio_console.c
#   2005/01/03 15:50:15-08:00 kraxel@bytesex.org +46 -102
#   uml: terminal cleanup
# 
# arch/um/drivers/stderr_console.c
#   2005/01/03 15:49:34-08:00 kraxel@bytesex.org +45 -0
#   uml: terminal cleanup
# 
# arch/um/drivers/ssl.c
#   2005/01/03 15:49:34-08:00 kraxel@bytesex.org +38 -88
#   uml: terminal cleanup
# 
# arch/um/drivers/pty.c
#   2005/01/03 15:49:34-08:00 kraxel@bytesex.org +2 -1
#   uml: terminal cleanup
# 
# arch/um/drivers/line.c
#   2005/01/03 15:49:34-08:00 kraxel@bytesex.org +167 -96
#   uml: terminal cleanup
# 
# arch/um/drivers/chan_user.c
#   2005/01/03 15:49:34-08:00 kraxel@bytesex.org +5 -5
#   uml: terminal cleanup
# 
# arch/um/drivers/chan_kern.c
#   2005/01/03 15:49:34-08:00 kraxel@bytesex.org +28 -12
#   uml: terminal cleanup
# 
# arch/um/drivers/Makefile
#   2005/01/03 15:49:34-08:00 kraxel@bytesex.org +4 -3
#   uml: terminal cleanup
# 
# arch/um/Kconfig_char
#   2005/01/03 15:49:34-08:00 kraxel@bytesex.org +6 -0
#   uml: terminal cleanup
# 
# arch/um/drivers/stderr_console.c
#   2005/01/03 15:49:34-08:00 kraxel@bytesex.org +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/um/drivers/stderr_console.c
# 
# ChangeSet
#   2005/01/03 21:09:02-08:00 blaisorblade_spam@yahoo.it 
#   [PATCH] hostfs: uml: add some other pagecache methods
#   
#   This is a follow-up to my previous "hostfs - uml: set .sendfile to
#   generic_file_sendfile" patch. I was asking whether other methods should have
#   been added, and comparing with ext3 I found some more ones.
#   
#   However, I have not specific clues about them: I know they use the pagecache,
#   which relies on *page methods, which are defined by hostfs. So I think it
#   could work.
#   
#   I have a doubt, whether hostfs needs the commented out method below:
#   
#   static struct address_space_operations hostfs_aops = {
#   	.writepage 	= hostfs_writepage,
#   	.readpage	= hostfs_readpage,
#   /* 	.set_page_dirty = __set_page_dirty_nobuffers, */
#   	.prepare_write	= hostfs_prepare_write,
#   	.commit_write	= hostfs_commit_write
#   };
#   
#   Hostfs does not have a underlying device (and I have some rough idea that
#   buffers cache block devices data), so I wonder if that is needed or not.
#   
#   Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/hostfs/hostfs_kern.c
#   2005/01/03 15:49:34-08:00 blaisorblade_spam@yahoo.it +5 -0
#   hostfs: uml: add some other pagecache methods
# 
# ChangeSet
#   2005/01/03 21:08:49-08:00 blaisorblade_spam@yahoo.it 
#   [PATCH] hostfs: uml: set .sendfile to generic_file_sendfile
#   
#   Make hostfs use the generic sendfile implementation.
#   
#   Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/hostfs/hostfs_kern.c
#   2005/01/03 15:50:19-08:00 blaisorblade_spam@yahoo.it +1 -0
#   hostfs: uml: set .sendfile to generic_file_sendfile
# 
# ChangeSet
#   2005/01/03 21:08:33-08:00 jdike@addtoit.com 
#   [PATCH] uml: unregister signal handlers at reboot
#   
#   From: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
#   
#   In most cases reboot failed on my system.  After "Restarting system.", UML
#   exited without further messages.  I found an SIGIO being processed by
#   sig_handler() resp.  sig_handler_common_skas().  Don't know, why this exits,
#   maybe the context is no longer valid at this time.  So, I changed the sequence
#   in the reboot part of main() to stop the timers and disable the fds before
#   unblocking the signals.  Since this wasn't enough, I also added
#   set_handler(SIGXXX, SIG_IGN) calls to disable_timer() and
#   deactivate_all_fds().  Now reboot works fine in SKAS and it still works in TT.
#   
#   Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
#   Signed-off-by: Jeff Dike <jdike@addtoit.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/um/kernel/time.c
#   2005/01/03 15:49:34-08:00 jdike@addtoit.com +3 -0
#   uml: unregister signal handlers at reboot
# 
# arch/um/kernel/main.c
#   2005/01/03 15:50:18-08:00 jdike@addtoit.com +8 -6
#   uml: unregister signal handlers at reboot
# 
# arch/um/kernel/irq_user.c
#   2005/01/03 15:49:34-08:00 jdike@addtoit.com +2 -0
#   uml: unregister signal handlers at reboot
# 
# ChangeSet
#   2005/01/03 21:08:20-08:00 jdike@addtoit.com 
#   [PATCH] uml: free host resources associated with freed IRQs
#   
#   This adds a free_irq_by_irq_and_dev call which was accidentally removed when
#   the UML free_irq was replaced by generic code.
#   
#   Signed-off-by: Jeff Dike <jdike@addtoit.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/um/kernel/irq_user.c
#   2005/01/03 15:50:19-08:00 jdike@addtoit.com +4 -1
#   uml: free host resources associated with freed IRQs
# 
# ChangeSet
#   2005/01/03 21:08:05-08:00 jdike@addtoit.com 
#   [PATCH] uml: close host file descriptors properly
#   
#   This process closes some file descriptors which were left open incorrectly.
#   These are the initrd descriptor, the temporary test file used for testing /tmp
#   for execution permission, and a descriptor used by the netork to connect to
#   the switch.  In the network case, we add network devices to the opened list as
#   soon as they are added to UML, rather than when they are configured.  This
#   ensures that close_devices will remove the device properly on shutdown.
#   
#   Signed-off-by: Jeff Dike <jdike@addtoit.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/um/kernel/mem_user.c
#   2005/01/03 15:49:34-08:00 jdike@addtoit.com +2 -0
#   uml: close host file descriptors properly
# 
# arch/um/kernel/initrd_user.c
#   2005/01/03 15:49:34-08:00 jdike@addtoit.com +2 -0
#   uml: close host file descriptors properly
# 
# arch/um/drivers/net_kern.c
#   2005/01/03 15:50:15-08:00 jdike@addtoit.com +8 -9
#   uml: close host file descriptors properly
# 
# ChangeSet
#   2005/01/03 21:07:51-08:00 jdike@addtoit.com 
#   [PATCH] uml: fix sigreturn to not copy_user under a spinlock
#   
#   Fix sys_sigreturn and sys_rt_sigreturn to avoid calling copy_from_user inside
#   a spinlock.  We copy the blocked signal mask into a local sigset_t before the
#   spinlock and then just assign from it inside the lock.
#   
#   Signed-off-by: Jeff Dike <jdike@addtoit.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/um/sys-i386/signal.c
#   2005/01/03 15:50:17-08:00 jdike@addtoit.com +31 -8
#   uml: fix sigreturn to not copy_user under a spinlock
# 
# ChangeSet
#   2005/01/03 21:07:36-08:00 jdike@addtoit.com 
#   [PATCH] uml: remove a quilt-induced duplicity
#   
#   This piece appears to have gone in twice.
#   
#   Signed-off-by: Milton Miller <miltonm@bga.com>
#   Signed-off-by: Jeff Dike <jdike@addtoit.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/um/kernel/tt/trap_user.c
#   2005/01/03 15:49:33-08:00 jdike@addtoit.com +0 -7
#   uml: remove a quilt-induced duplicity
# 
# ChangeSet
#   2005/01/03 21:07:23-08:00 jdike@addtoit.com 
#   [PATCH] uml: unistd.h cleanup
#   
#   From: Chris Wedgewood: this removes unnecessary cruft from unistd.h
#   
#   Signed-off-by: Jeff Dike <jdike@addtoit.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-um/unistd.h
#   2005/01/03 15:49:33-08:00 jdike@addtoit.com +15 -91
#   uml: unistd.h cleanup
# 
# ChangeSet
#   2005/01/03 21:07:08-08:00 jdike@addtoit.com 
#   [PATCH] uml: make restorer match i386
#   
#   From: Bodo Stroesser
#   
#   Signed-off-by: Jeff Dike <jdike@addtoit.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/um/sys-i386/signal.c
#   2005/01/03 15:50:19-08:00 jdike@addtoit.com +4 -4
#   uml: make restorer match i386
# 
# ChangeSet
#   2005/01/03 21:06:56-08:00 jdike@addtoit.com 
#   [PATCH] uml: redo the signal delivery mechanism
#   
#   This patch rips out the old signal delivery mechanism and replaces it with a
#   sane one.
#   
#   Specifically, UML used to capture a host signal frame and use it as a template
#   for its own signal frames.  This was a worthy idea, because it promised a
#   degree of architecture-independence for this part of UML, but impractical. 
#   There are some environments, notably 32 bit emulation on a 64 bit box, where
#   you can't use the host signal frame as a template for your own.  Plus, this
#   code is as complicated, even to someone who understands what it's doing, as
#   the standard fill-in-a-structure-and-write-it-to-the-stack.  For everyone
#   else, it is incomprehensible.
#   
#   So, this reimplements signal handling in the way that everyone else does.  It
#   gives up on architecture independence, and moves this code into the
#   x86-specific stuff.
#   
#   Signed-off-by: Jeff Dike <jdike@addtoit.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/um/sys-i386/signal.c
#   2005/01/03 21:06:48-08:00 jdike@addtoit.com +348 -0
# 
# arch/um/sys-i386/signal.c
#   2005/01/03 21:06:48-08:00 jdike@addtoit.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/um/sys-i386/signal.c
# 
# arch/um/sys-i386/sigcontext.c
#   2005/01/03 15:49:33-08:00 jdike@addtoit.com +3 -11
#   uml: redo the signal delivery mechanism
# 
# arch/um/sys-i386/Makefile
#   2005/01/03 15:49:33-08:00 jdike@addtoit.com +1 -1
#   uml: redo the signal delivery mechanism
# 
# arch/um/kernel/tt/tracer.c
#   2005/01/03 15:50:18-08:00 jdike@addtoit.com +0 -2
#   uml: redo the signal delivery mechanism
# 
# arch/um/kernel/tt/include/mode-tt.h
#   2005/01/03 15:49:33-08:00 jdike@addtoit.com +0 -3
#   uml: redo the signal delivery mechanism
# 
# arch/um/kernel/tt/Makefile
#   2005/01/03 15:49:33-08:00 jdike@addtoit.com +1 -1
#   uml: redo the signal delivery mechanism
# 
# arch/um/kernel/trap_user.c
#   2005/01/03 15:49:33-08:00 jdike@addtoit.com +0 -1
#   uml: redo the signal delivery mechanism
# 
# arch/um/kernel/skas/process_kern.c
#   2005/01/03 15:49:33-08:00 jdike@addtoit.com +0 -2
#   uml: redo the signal delivery mechanism
# 
# arch/um/kernel/skas/include/mode-skas.h
#   2005/01/03 15:49:33-08:00 jdike@addtoit.com +0 -5
#   uml: redo the signal delivery mechanism
# 
# arch/um/kernel/skas/Makefile
#   2005/01/03 15:49:33-08:00 jdike@addtoit.com +0 -1
#   uml: redo the signal delivery mechanism
# 
# arch/um/kernel/signal_kern.c
#   2005/01/03 15:49:33-08:00 jdike@addtoit.com +0 -47
#   uml: redo the signal delivery mechanism
# 
# arch/um/kernel/process_kern.c
#   2005/01/03 15:50:16-08:00 jdike@addtoit.com +0 -2
#   uml: redo the signal delivery mechanism
# 
# arch/um/kernel/Makefile
#   2005/01/03 15:49:33-08:00 jdike@addtoit.com +1 -1
#   uml: redo the signal delivery mechanism
# 
# arch/um/include/frame_kern.h
#   2005/01/03 15:49:33-08:00 jdike@addtoit.com +2 -2
#   uml: redo the signal delivery mechanism
# 
# BitKeeper/deleted/.del-sigcontext.c~b35dd0fe749335be
#   2005/01/03 21:06:48-08:00 jdike@addtoit.com +0 -0
#   Delete: arch/um/kernel/tt/sys-i386/sigcontext.c
# 
# BitKeeper/deleted/.del-Makefile~4a159f77562eb97f
#   2005/01/03 21:06:48-08:00 jdike@addtoit.com +0 -0
#   Delete: arch/um/kernel/tt/sys-i386/Makefile
# 
# BitKeeper/deleted/.del-sigcontext.c~dc098287cfac9b8f
#   2005/01/03 21:06:47-08:00 jdike@addtoit.com +0 -0
#   Delete: arch/um/kernel/skas/sys-i386/sigcontext.c
# 
# BitKeeper/deleted/.del-frame_kern.c~31f934208c027579
#   2005/01/03 21:06:47-08:00 jdike@addtoit.com +0 -0
#   Delete: arch/um/kernel/frame_kern.c
# 
# BitKeeper/deleted/.del-Makefile~70edd8cf705113bd
#   2005/01/03 21:06:47-08:00 jdike@addtoit.com +0 -0
#   Delete: arch/um/kernel/skas/sys-i386/Makefile
# 
# BitKeeper/deleted/.del-frame_user.h~fc044711b94cb67f
#   2005/01/03 21:06:46-08:00 jdike@addtoit.com +0 -0
#   Delete: arch/um/include/sysdep-i386/frame_user.h
# 
# BitKeeper/deleted/.del-frame_kern.h~b26a6fac31fb4a97
#   2005/01/03 21:06:46-08:00 jdike@addtoit.com +0 -0
#   Delete: arch/um/include/sysdep-i386/frame_kern.h
# 
# BitKeeper/deleted/.del-frame.c~af97c27d9803081
#   2005/01/03 21:06:46-08:00 jdike@addtoit.com +0 -0
#   Delete: arch/um/kernel/frame.c
# 
# BitKeeper/deleted/.del-frame_user.h~ae3ef5f79112d87b
#   2005/01/03 21:06:45-08:00 jdike@addtoit.com +0 -0
#   Delete: arch/um/include/frame_user.h
# 
# BitKeeper/deleted/.del-frame.h~be06e0bb2f485f1
#   2005/01/03 21:06:45-08:00 jdike@addtoit.com +0 -0
#   Delete: arch/um/include/frame.h
# 
# BitKeeper/deleted/.del-frame.h~4e4bd718a128c004
#   2005/01/03 21:06:45-08:00 jdike@addtoit.com +0 -0
#   Delete: arch/um/include/sysdep-i386/frame.h
# 
# ChangeSet
#   2005/01/03 21:05:26-08:00 blaisorblade_spam@yahoo.it 
#   [PATCH] uml: fix some ptrace functions returns values
#   
#   From: Jeff Dike <jdike@addtoit.com>
#   
#   This patch adds ptrace_setfpregs and makes these functions return -errno on
#   failure.
#   
#   Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/um/sys-i386/ptrace_user.c
#   2005/01/03 15:49:33-08:00 blaisorblade_spam@yahoo.it +16 -3
#   uml: fix some ptrace functions returns values
# 
# ChangeSet
#   2005/01/03 21:05:13-08:00 blaisorblade_spam@yahoo.it 
#   [PATCH] uml: fix __wrap_free comment
#   
#   Reworded the comment about __wrap_free detection of the allocator used to
#   allocate the pointer (it can free a pointer created by either the host
#   malloc(), kmalloc() or vmalloc()).
#   
#   Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/um/kernel/main.c
#   2005/01/03 15:50:19-08:00 blaisorblade_spam@yahoo.it +6 -3
#   uml: fix __wrap_free comment
# 
# ChangeSet
#   2005/01/03 21:05:00-08:00 blaisorblade_spam@yahoo.it 
#   [PATCH] uml: remove most devfs_mk_symlink calls
#   
#   Remove uses of devfs_mk_symlink().
#   
#   We didn't do this before to avoid breaking most user setups, but this patch
#   should be quite harmless.
#   
#   I've excluded the hottest part, i.e.  the ubd symlink, while removing the
#   other; I released a end-user tree with this patch and there was a good number
#   of people using the symlink rather than the preferred name.  That part will be
#   merged later, I think.
#   
#   Since now we have evidence of less and less users using devfs, we think that
#   it will not cause too much problems.
#   
#   Acked-by: Jeff Dike <jdike@addtoit.com>
#   Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/um/drivers/mmapper_kern.c
#   2005/01/03 15:49:32-08:00 blaisorblade_spam@yahoo.it +0 -1
#   uml: remove most devfs_mk_symlink calls
# 
# arch/um/drivers/line.c
#   2005/01/03 15:50:19-08:00 blaisorblade_spam@yahoo.it +1 -8
#   uml: remove most devfs_mk_symlink calls
# 
# ChangeSet
#   2005/01/03 21:04:47-08:00 takata@linux-m32r.org 
#   [PATCH] m32r: Update include/asm-m32r/mmu_context.h
#   
#   This patch updates include/asm-m32r/mmu_context.h.
#   
#   	* include/asm-m32r/mmu_context.h:
#   	- Add #ifdef __KERNEL__
#   	- Change __inline__ to inline for __KERNEL__ portion.
#   
#   Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-m32r/mmu_context.h
#   2005/01/03 15:49:32-08:00 takata@linux-m32r.org +11 -10
#   m32r: Update include/asm-m32r/mmu_context.h
# 
# ChangeSet
#   2005/01/03 21:04:34-08:00 takata@linux-m32r.org 
#   [PATCH] m32r: Update include/asm-m32r/system.h
#   
#   This patch updates include/asm-m32r/system.h.
#   
#   	* include/asm-m32r/system.h:
#   	- Use barrier() as mb().
#   	- Change __inline__ to inline.
#   
#   Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-m32r/system.h
#   2005/01/03 15:49:32-08:00 takata@linux-m32r.org +4 -8
#   m32r: Update include/asm-m32r/system.h
# 
# ChangeSet
#   2005/01/03 21:04:21-08:00 takata@linux-m32r.org 
#   [PATCH] m32r: Use generic hardirq framework
#   
#   This patch is for employing the generic hardirq framework for m32r.
#   Now CONFIG_GENERIC_HARDIRQS is set to Y by default.
#   
#     - Update to use GENERIC_HARDIRQ framework. 
#     - Fix PREEMPT_ACTIVE definition (changeset 1.2000.16.20)
#   
#   Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-m32r/thread_info.h
#   2005/01/03 15:49:32-08:00 takata@linux-m32r.org +1 -1
#   m32r: Use generic hardirq framework
# 
# include/asm-m32r/irq.h
#   2005/01/03 15:49:32-08:00 takata@linux-m32r.org +3 -14
#   m32r: Use generic hardirq framework
# 
# include/asm-m32r/hardirq.h
#   2005/01/03 15:49:32-08:00 takata@linux-m32r.org +8 -0
#   m32r: Use generic hardirq framework
# 
# arch/m32r/kernel/irq.c
#   2005/01/03 15:49:32-08:00 takata@linux-m32r.org +9 -938
#   m32r: Use generic hardirq framework
# 
# arch/m32r/Kconfig
#   2005/01/03 15:49:32-08:00 takata@linux-m32r.org +7 -3
#   m32r: Use generic hardirq framework
# 
# ChangeSet
#   2005/01/03 21:04:08-08:00 takata@linux-m32r.org 
#   [PATCH] m32r: Make kernel headers for mutual  exclusion
#   
#   Here is a patch to update kernel headers for mutual exclusion,
#   atomic.h, bitops.h and semaphore.h of m32r.
#   This patch is for making these headers publishable to userland.
#   
#   	* include/asm-m32r/assembler.h (M32R_LOCK, M32R_UNLOCK):
#   	  Define M32R_LOCK and M32R_UNLOCK macros. For SMP configuration,
#   	  these macros are expanded to m32r's LOCK and UNLOCK instructions.
#   	  While, for UP configuration, these are simply expanded to m32r's
#   	  LD(load) and ST(store) instructions, respectively.
#   
#   	* include/asm-m32r/atomic.h, include/asm-m32r/bitops.h,
#   	  include/asm-m32r/semaphore.h:
#   	  - Change macros from LOAD and STORE to M32R_LOCK and M32R_UNLOCK,
#   	    respectively.  It is because LOAD and STORE are too generic words.
#   	  - Change inline to __inline__.
#   	    Retrieve __inline__ modifiers for functions which are placed
#   	    outside of __KERNEL__ region in these headers, because those
#   	    functions might be included and used from ISO C program in
#   	    userland.
#   
#   Currently, it seems that these headers are allowed to be included from
#   userland.  Indeed, they are kernel stuff, but these headers provide
#   useful definitions and functions even for userland applications, I think.
#   
#   Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-m32r/semaphore.h
#   2005/01/03 15:49:32-08:00 takata@linux-m32r.org +9 -18
#   m32r: Make kernel headers for mutual  exclusion
# 
# include/asm-m32r/bitops.h
#   2005/01/03 15:49:32-08:00 takata@linux-m32r.org +33 -48
#   m32r: Make kernel headers for mutual  exclusion
# 
# include/asm-m32r/atomic.h
#   2005/01/03 15:49:32-08:00 takata@linux-m32r.org +19 -29
#   m32r: Make kernel headers for mutual  exclusion
# 
# include/asm-m32r/assembler.h
#   2005/01/03 15:49:32-08:00 takata@linux-m32r.org +24 -11
#   m32r: Make kernel headers for mutual  exclusion
# 
# ChangeSet
#   2005/01/03 21:03:55-08:00 takata@linux-m32r.org 
#   [PATCH] m32r: Use kmalloc for m32r stacks
#   
#   - Use kmalloc for m32r stacks (cf. changeset 1.1046.533.10)
#   - Update for CONFIG_DEBUG_STACK_USAGE
#   
#   This modification was taken from include/asm-i386/thread_info.h.
#   
#   Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-m32r/thread_info.h
#   2005/01/03 15:50:21-08:00 takata@linux-m32r.org +15 -3
#   m32r: Use kmalloc for m32r stacks
# 
# ChangeSet
#   2005/01/03 21:03:42-08:00 takata@linux-m32r.org 
#   [PATCH] m32r: include/asm-m32r/thread_info.h minor  updates
#   
#   - Use THREAD_SIZE for __ASSEMBLY__ portion.
#   - Update comments.
#   - Fix a typo: user-thead --> user-thread.
#   
#   NOTE: Now there are two THREAD_SIZE definitions in the following patch,
#   one is in C part and the other is in __ASSEMBLY__ part.
#   I'm going to consolidate these THREAD_SIZE definitions.  So, I have to
#   change PAGE_SIZE definition of include/asm-m32r/page.h to be includable
#   into asm portion...
#   
#   Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-m32r/thread_info.h
#   2005/01/03 15:50:21-08:00 takata@linux-m32r.org +15 -11
#   m32r: include/asm-m32r/thread_info.h minor  updates
# 
# ChangeSet
#   2005/01/03 21:03:29-08:00 takata@linux-m32r.org 
#   [PATCH] m32r: Clean up include/asm-m32r/pgtable-2level.h
#   
#   - Add #ifdef __KERNEL__
#   - Change __inline__ to inline for __KERNEL__ portion.
#   - Remove RCS ID string.
#   
#   Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-m32r/pgtable-2level.h
#   2005/01/03 15:49:31-08:00 takata@linux-m32r.org +7 -5
#   m32r: Clean up include/asm-m32r/pgtable-2level.h
# 
# ChangeSet
#   2005/01/03 21:03:16-08:00 takata@linux-m32r.org 
#   [PATCH] m32r: Remove PAGE_USER
#   
#   - Remove _PAGE_USER bit from pte.
#   - The m32r doesn't support _PAGE_USER bit by hardware.
#   
#   Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-m32r/pgtable.h
#   2005/01/03 15:49:31-08:00 takata@linux-m32r.org +13 -25
#   m32r: Remove PAGE_USER
# 
# include/asm-m32r/pgtable-2level.h
#   2005/01/03 15:50:21-08:00 takata@linux-m32r.org +2 -3
#   m32r: Remove PAGE_USER
# 
# ChangeSet
#   2005/01/03 21:03:04-08:00 takata@linux-m32r.org 
#   [PATCH] m32r: Support PAGE_NONE
#   
#   - Support PAGE_NONE attribute for memory protection.
#   - Add _PAGE_PROTNONE bit to pte (software bit).
#   
#   Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
#   Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-m32r/pgtable.h
#   2005/01/03 15:50:22-08:00 takata@linux-m32r.org +7 -5
#   m32r: Support PAGE_NONE
# 
# include/asm-m32r/pgtable-2level.h
#   2005/01/03 15:50:22-08:00 takata@linux-m32r.org +3 -4
#   m32r: Support PAGE_NONE
# 
# ChangeSet
#   2005/01/03 21:02:51-08:00 takata@linux-m32r.org 
#   [PATCH] m32r: Clean up include/asm-m32r/pgtable.h
#   
#   - Change PAGE_*_X to PAGE_*_EXEC for good readability.
#   - Add #include __KERNEL__
#   - Change __inline__ to inline for the __KERNEL__ portion.
#   
#   Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-m32r/pgtable.h
#   2005/01/03 15:50:22-08:00 takata@linux-m32r.org +70 -98
#   m32r: Clean up include/asm-m32r/pgtable.h
# 
# ChangeSet
#   2005/01/03 21:02:38-08:00 takata@linux-m32r.org 
#   [PATCH] m32r: Clean up arch/m32r/mm/fault.c
#   
#   - Fix a typo: ACE_USEMODE --> ACE_USERMODE.
#   - Update copyright statement, and so on.
#   
#   Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/m32r/mm/fault.c
#   2005/01/03 15:49:31-08:00 takata@linux-m32r.org +2 -3
#   m32r: Clean up arch/m32r/mm/fault.c
# 
# ChangeSet
#   2005/01/03 21:02:25-08:00 takata@linux-m32r.org 
#   [PATCH] m32r: Don't encode ACE_INSTRUCTION in address
#   
#   - To be more comprehensive, keep ACE_INSTRUCTION (access exception
#     on instruction execution) information in thread_info->flags,
#     instead of encoding it into address parameter.
#   
#   Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
#   Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-m32r/thread_info.h
#   2005/01/03 15:50:21-08:00 takata@linux-m32r.org +16 -0
#   m32r: Don't encode ACE_INSTRUCTION in address
# 
# arch/m32r/mm/fault.c
#   2005/01/03 15:50:22-08:00 takata@linux-m32r.org +4 -3
#   m32r: Don't encode ACE_INSTRUCTION in address
# 
# ChangeSet
#   2005/01/03 21:02:12-08:00 takata@linux-m32r.org 
#   [PATCH] m32r: Cause SIGSEGV for nonexec page execution
#   
#   - Cause a segmentation fault for an illegal execution of a code on
#     non-executable memory page.
#   
#   Signed-off-by: Naoto Sugai <sugai@isl.melco.co.jp>
#   Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-m32r/pgtable.h
#   2005/01/03 15:50:22-08:00 takata@linux-m32r.org +10 -11
#   m32r: Cause SIGSEGV for nonexec page execution
# 
# arch/m32r/mm/fault.c
#   2005/01/03 15:50:22-08:00 takata@linux-m32r.org +24 -13
#   m32r: Cause SIGSEGV for nonexec page execution
# 
# ChangeSet
#   2005/01/03 21:01:59-08:00 takata@linux-m32r.org 
#   [PATCH] m32r: Update ptrace.c for multithread  debugging
#   
#   This patch updates ptrace.c to support multithread debugging.  So far, only
#   one breakpoint's location was kept by kernel, however, in the multithreaded
#   application's debug, it is required to kept multi-point breakpoint locations
#   by kernel.
#   
#   In this implementation, maximum number of MAX_TRAPS(=10 (by default))
#   breakpoint's information will be kept in the "debug_trap" member of the
#   thread_struct for each thread.
#   
#   	* include/asm-m32r/processor.h: 
#   	  Modify debug_trap struct to keep multipoint breakpoint locations
#   	  for multithread debugging.
#   
#   	* arch/m32r/kernel/ptrace.c:
#   	- Update to support multithread debugging.
#   	- Remove unused functions, withdraw_debug_trap_for_signal() and
#   	  embed_debug_trap_for_signal().
#   
#   Signed-off-by: Kei Sakamoto <ksakamot@linux-m32r.org>
#   Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-m32r/processor.h
#   2005/01/03 15:49:30-08:00 takata@linux-m32r.org +4 -2
#   m32r: Update ptrace.c for multithread  debugging
# 
# arch/m32r/kernel/ptrace.c
#   2005/01/03 15:49:30-08:00 takata@linux-m32r.org +30 -59
#   m32r: Update ptrace.c for multithread  debugging
# 
# ChangeSet
#   2005/01/03 21:01:46-08:00 takata@linux-m32r.org 
#   [PATCH] m32r: Support pgprot_noncached()
#   
#   This patch updates include/asm-m32r/pgtable.h to add pgprot_noncached().
#   It is required to fix a problem of an userspace application, which mmaps
#   io registers.
#   
#   This patch also modifies drivers/video/fbmem.c to support noncachable
#   framebuffer access for m32r.
#   In this routine, pgprot_writecombine() is used hopefully, even though
#   the current m32r never does write-combining or write-coalescing...
#   
#   Please apply this.
#   
#   	* include/asm-m32r/pgtable.h
#   	  (pgprot_noncached, pgprot_writecombine): Newly added.
#   
#   	* drivers/video/fbmem.c (fb_mmap): Add m32r support.
#   
#   Signed-off-by: Mamoru Sakugawa <sakugawa@linux-m32r.org>
#   Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-m32r/pgtable.h
#   2005/01/03 15:50:22-08:00 takata@linux-m32r.org +13 -0
#   m32r: Support pgprot_noncached()
# 
# drivers/video/fbmem.c
#   2005/01/03 15:49:30-08:00 takata@linux-m32r.org +2 -1
#   m32r: Support pgprot_noncached()
# 
# ChangeSet
#   2005/01/03 21:01:33-08:00 takata@linux-m32r.org 
#   [PATCH] m32r: Add new relocation types to elf.h
#   
#   include/asm-m32r/elf.h:
#   
#     Add relocations R_M32R_GOTOFF_HI_ULO, R_M32R_GOTOFF_HI_SLO, and
#     R_M32R_GOTOFF_LO.  These relocations are required to implement GOTOFF
#     support for m32r.
#   
#   Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-m32r/elf.h
#   2005/01/03 15:49:30-08:00 takata@linux-m32r.org +3 -0
#   m32r: Add new relocation types to elf.h
# 
# ChangeSet
#   2005/01/03 21:01:20-08:00 akpm@osdl.org 
#   [PATCH] swsusp-try_to_freeze-to-make-freezing-hooks-nicer fix
#   
#   In file included from include/linux/ptrace.h:77,
#                    from arch/ppc64/lib/sstep.c:12:
#   include/linux/sched.h: In function `freeze_processes':
#   include/linux/sched.h:1189: warning: no return statement in function returning non-void
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/sched.h
#   2005/01/03 15:49:30-08:00 akpm@osdl.org +1 -1
#   swsusp-try_to_freeze-to-make-freezing-hooks-nicer fix
# 
# ChangeSet
#   2005/01/03 21:01:05-08:00 pavel@ucw.cz 
#   [PATCH] swsusp: try_to_freeze to make freezing hooks nicer
#   
#   This moves refrigerator changes to sched.h, so that every file user of
#   refrigerator does not have to include suspend.h, and makes refrigerator
#   support easier by introducing try_to_freeze.
#   
#   Adapted from patch by Nigel Cunningham
#   Signed-off-by: Pavel Machek <pavel@suse.cz>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/suspend.h
#   2005/01/03 15:49:30-08:00 pavel@ucw.cz +5 -15
#   swsusp: try_to_freeze to make freezing hooks nicer
# 
# include/linux/sched.h
#   2005/01/03 15:50:23-08:00 pavel@ucw.cz +28 -0
#   swsusp: try_to_freeze to make freezing hooks nicer
# 
# ChangeSet
#   2005/01/03 21:00:51-08:00 pavel@ucw.cz 
#   [PATCH] swsusp: Kill O(n^2) algorithm in swsusp
#   
#   Some machines are spending minutes of CPU time during suspend in stupid O(n^2)
#   algorithm.  This patch replaces it with O(n) algorithm, making swsusp usable
#   to some people.
#   
#   Signed-off-by: Pavel Machek <pavel@suse.cz>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# mm/page_alloc.c
#   2005/01/03 15:49:30-08:00 pavel@ucw.cz +17 -13
#   swsusp: Kill O(n^2) algorithm in swsusp
# 
# kernel/power/swsusp.c
#   2005/01/03 15:49:30-08:00 pavel@ucw.cz +56 -75
#   swsusp: Kill O(n^2) algorithm in swsusp
# 
# include/linux/suspend.h
#   2005/01/03 15:50:23-08:00 pavel@ucw.cz +1 -0
#   swsusp: Kill O(n^2) algorithm in swsusp
# 
# include/linux/page-flags.h
#   2005/01/03 15:49:30-08:00 pavel@ucw.cz +5 -0
#   swsusp: Kill O(n^2) algorithm in swsusp
# 
# ChangeSet
#   2005/01/03 21:00:38-08:00 pavel@ucw.cz 
#   [PATCH] swsusp: Small cleanups
#   
#   This adds statics at few places and fixes stale references to pmdisk.
#   
#   Signed-off-by: Pavel Machek <pavel@suse.cz>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# kernel/power/swsusp.c
#   2005/01/03 15:50:23-08:00 pavel@ucw.cz +3 -3
#   swsusp: Small cleanups
# 
# ChangeSet
#   2005/01/03 21:00:25-08:00 pavel@ucw.cz 
#   [PATCH] swsusp: kill one-line helpers, handle read errors
#   
#   swsusp contains few one-line helpers that only make reading/understanding code
#   more difficult.  Also warn the user when something goes wrong, instead of
#   waking machine with corrupt data.
#   
#   Signed-off-by: Pavel Machek <pavel@suse.cz>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# kernel/power/swsusp.c
#   2005/01/03 15:50:23-08:00 pavel@ucw.cz +8 -15
#   swsusp: kill one-line helpers, handle read errors
# 
# ChangeSet
#   2005/01/03 21:00:12-08:00 pavel@ucw.cz 
#   [PATCH] swsusp: kill unused variable
#   
#   Variable used only for writing is bad idea.
#   
#   Signed-off-by: Pavel Machek <pavel@suse.cz>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# kernel/power/swsusp.c
#   2005/01/03 15:50:23-08:00 pavel@ucw.cz +0 -2
#   swsusp: kill unused variable
# 
# ChangeSet
#   2005/01/03 20:59:56-08:00 pavel@ucw.cz 
#   [PATCH] fix naming in swsusp
#   
#   At few points we still reference to swsusp as "pmdisk"...  it might confuse
#   someone not knowing full history.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# kernel/power/swsusp.c
#   2005/01/03 15:50:24-08:00 pavel@ucw.cz +2 -2
#   fix naming in swsusp
# 
# ChangeSet
#   2005/01/03 20:59:43-08:00 rmk+lkml@arm.linux.org.uk 
#   [PATCH] typeof(dev->power.saved_state)
#   
#   arch/arm/common/sa1111.c: In function `sa1111_suspend':
#   arch/arm/common/sa1111.c:816: warning: assignment from incompatible pointer type
#   
#   This is a rather annoying, and IMHO pointless warning.  First question:
#   what is the reasoning for using an array of unsigned bytes here?  Are we
#   expecting to power manage devices which only have byte wide registers?
#   
#   In reality, devices have half-word and word sized registers as well, which
#   means that dev->power.saved_state actually points to device specific data
#   (or even device driver specific data) for the device.  As such, it makes
#   far more sense for this to be a 'void *'.
#   
#   I'd rather not go around the ARM kernel tree adding pointless casts to 'u8
#   *' and back again because the wrong type for this was picked in the
#   structure definition, so here's a patch which changes this to void *.
#   
#   Signed-off-by: Russell King <rmk@arm.linux.org.uk>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/pm.h
#   2005/01/03 15:49:29-08:00 rmk+lkml@arm.linux.org.uk +1 -1
#   typeof(dev->power.saved_state)
# 
# ChangeSet
#   2005/01/03 20:59:29-08:00 bjorn.helgaas@hp.com 
#   [PATCH] ia64: remove HCDP support for early printk
#   
#   This is only used by the ia64 early_printk patch, which isn't in the
#   mainline tree.  If anybody is still using that patch, hcdp_early_uart()
#   should be incorporated into it.
#   
#   Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/firmware/pcdp.c
#   2005/01/03 15:49:29-08:00 bjorn.helgaas@hp.com +0 -41
#   ia64: remove HCDP support for early printk
# 
# ChangeSet
#   2005/01/03 20:59:13-08:00 spyro@f2s.com 
#   [PATCH] arm26: better unistd.h (reimplemented based on arm32)
#   
#   Some long overdue updates to this file. newer macros taken from arm32.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-arm26/unistd.h
#   2005/01/03 15:49:29-08:00 spyro@f2s.com +153 -164
#   arm26: better unistd.h (reimplemented based on arm32)
# 
# ChangeSet
#   2005/01/03 20:59:00-08:00 spyro@f2s.com 
#   [PATCH] arm26: better put_user macros.
#   
#   Better put_user macro.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-arm26/uaccess.h
#   2005/01/03 15:49:29-08:00 spyro@f2s.com +36 -1
#   arm26: better put_user macros.
# 
# ChangeSet
#   2005/01/03 20:58:49-08:00 spyro@f2s.com 
#   [PATCH] arm26: TLB update
#   
#   A keep-it-compiling patch based on the arm32 code.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-arm26/tlb.h
#   2005/01/03 15:49:29-08:00 spyro@f2s.com +16 -1
#   arm26: TLB update
# 
# ChangeSet
#   2005/01/03 20:58:33-08:00 spyro@f2s.com 
#   [PATCH] arm26: replace arm32 time handling code with smaller version
#   
#   ARM26 systems only have one possible clock, thus we can merge all this into
#   one source file and drop the ability to dynamically alter it.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/arm26/kernel/time.c
#   2005/01/03 15:49:29-08:00 spyro@f2s.com +47 -7
#   arm26: replace arm32 time handling code with smaller version
# 
# BitKeeper/deleted/.del-time-acorn.c~657720ddfef2529c
#   2005/01/03 20:58:26-08:00 spyro@f2s.com +0 -0
#   Delete: arch/arm26/kernel/time-acorn.c
# 
# ChangeSet
#   2005/01/03 20:58:20-08:00 spyro@f2s.com 
#   [PATCH] arm26: update system.h to some semblance of recentness.
#   
#   The arm26 version of this had become horribly out of date.  this is a
#   sideways-port of the arm32 version, dropping the unwanted stuff and adjusted
#   for arm26 compatability.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-arm26/system.h
#   2005/01/03 15:49:28-08:00 spyro@f2s.com +146 -100
#   arm26: update system.h to some semblance of recentness.
# 
# ChangeSet
#   2005/01/03 20:58:07-08:00 spyro@f2s.com 
#   [PATCH] arm26: softirq update
#   
#   New irq exit handler (part of the softirq changes)
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-arm26/hardirq.h
#   2005/01/03 15:49:28-08:00 spyro@f2s.com +10 -7
#   arm26: softirq update
# 
# ChangeSet
#   2005/01/03 20:57:54-08:00 spyro@f2s.com 
#   [PATCH] arm26: remove shark (arm32) from arm26
#   
#   Drop shark support from arm26 (shark isn't arm26 based)
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# BitKeeper/deleted/.del-ofw-shark.c~ad19e9fa95bda312
#   2005/01/03 20:57:47-08:00 spyro@f2s.com +0 -0
#   Delete: arch/arm26/boot/compressed/ofw-shark.c
# 
# ChangeSet
#   2005/01/03 20:57:41-08:00 spyro@f2s.com 
#   [PATCH] arm26: move some files to better locations
#   
#   This diff effects a restructuring of arm26s directory layout.  A number of
#   files can now move to more logical locations, since there are no machine
#   specific directories anymore.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/arm26/mm/small_page.c
#   2005/01/03 15:49:28-08:00 spyro@f2s.com +5 -2
#   arm26: move some files to better locations
# 
# arch/arm26/mm/memc.c
#   2005/01/03 15:49:28-08:00 spyro@f2s.com +1 -1
#   arm26: move some files to better locations
# 
# arch/arm26/machine/latches.c
#   2005/01/03 15:49:28-08:00 spyro@f2s.com +2 -2
#   arm26: move some files to better locations
# 
# arch/arm26/lib/io-writesw.S
#   2005/01/03 15:49:28-08:00 spyro@f2s.com +1 -1
#   arm26: move some files to better locations
# 
# arch/arm26/lib/io-readsw.S
#   2005/01/03 15:49:28-08:00 spyro@f2s.com +1 -1
#   arm26: move some files to better locations
# 
# arch/arm26/lib/io-readsl.S
#   2005/01/03 15:49:28-08:00 spyro@f2s.com +1 -1
#   arm26: move some files to better locations
# 
# arch/arm26/kernel/head.S
#   2005/01/03 15:49:28-08:00 spyro@f2s.com +6 -4
#   arm26: move some files to better locations
# 
# arch/arm26/kernel/calls.S
#   2005/01/03 20:57:32-08:00 spyro@f2s.com +265 -0
# 
# arch/arm26/kernel/calls.S
#   2005/01/03 20:57:32-08:00 spyro@f2s.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/arm26/kernel/calls.S
# 
# BitKeeper/deleted/.del-calls.h~a2e7fd7f114305ce
#   2005/01/03 20:57:32-08:00 spyro@f2s.com +0 -0
#   Delete: include/asm-arm26/calls.h
# 
# ChangeSet
#   2005/01/03 20:51:11-08:00 spyro@f2s.com 
#   [PATCH] arm26: new execve code
#   
#   This pulls in the execve changes made in arm32.
#   
#   Also, drops some old arm32 power management stuff thats no longer relevant
#   in process.c.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/arm26/kernel/sys_arm.c
#   2005/01/03 15:49:28-08:00 spyro@f2s.com +41 -0
#   arm26: new execve code
# 
# arch/arm26/kernel/process.c
#   2005/01/03 15:49:28-08:00 spyro@f2s.com +42 -60
#   arm26: new execve code
# 
# ChangeSet
#   2005/01/03 20:50:56-08:00 spyro@f2s.com 
#   [PATCH] arm26:cleanup trap handling assembly
#   
#   This removes some unneeded definitions and makes the naming used within the
#   file more consistent.
#   
#   Also adds some macros to make it easier to see how the interrupt handler is
#   structured.
#   
#   The assembled output is identical to the original.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/arm26/kernel/entry.S
#   2005/01/03 15:49:28-08:00 spyro@f2s.com +93 -121
#   arm26:cleanup trap handling assembly
# 
# ChangeSet
#   2005/01/03 20:50:42-08:00 spyro@f2s.com 
#   [PATCH] arm26: necessary compilation fixes for 2.6.10
#   
#   Various trivial fixes required to get a clean compile.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-arm26/thread_info.h
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +2 -1
#   arm26: necessary compilation fixes for 2.6.10
# 
# include/asm-arm26/setup.h
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +1 -1
#   arm26: necessary compilation fixes for 2.6.10
# 
# include/asm-arm26/posix_types.h
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +4 -4
#   arm26: necessary compilation fixes for 2.6.10
# 
# include/asm-arm26/irqchip.h
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +0 -17
#   arm26: necessary compilation fixes for 2.6.10
# 
# include/asm-arm26/dma-mapping.h
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +2 -0
#   arm26: necessary compilation fixes for 2.6.10
# 
# include/asm-arm26/checksum.h
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +8 -6
#   arm26: necessary compilation fixes for 2.6.10
# 
# arch/arm26/lib/putuser.S
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +3 -2
#   arm26: necessary compilation fixes for 2.6.10
# 
# arch/arm26/lib/getuser.S
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +3 -2
#   arm26: necessary compilation fixes for 2.6.10
# 
# arch/arm26/kernel/semaphore.c
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +7 -1
#   arm26: necessary compilation fixes for 2.6.10
# 
# arch/arm26/kernel/armksyms.c
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +4 -10
#   arm26: necessary compilation fixes for 2.6.10
# 
# include/asm-arm26/dma-mapping.h
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-arm26/dma-mapping.h
# 
# ChangeSet
#   2005/01/03 20:50:29-08:00 spyro@f2s.com 
#   [PATCH] arm26: update comments, headers, notes
#   
#   Add and update comments all throughout the arm26 tree.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-arm26/hardware.h
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +1 -0
#   arm26: update comments, headers, notes
# 
# arch/arm26/mm/proc-funcs.S
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +1 -1
#   arm26: update comments, headers, notes
# 
# arch/arm26/mm/fault.c
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +1 -2
#   arm26: update comments, headers, notes
# 
# arch/arm26/mm/extable.c
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +7 -1
#   arm26: update comments, headers, notes
# 
# arch/arm26/machine/irq.c
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +1 -1
#   arm26: update comments, headers, notes
# 
# arch/arm26/machine/dma.c
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +1 -1
#   arm26: update comments, headers, notes
# 
# arch/arm26/lib/testsetbit.S
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +1 -1
#   arm26: update comments, headers, notes
# 
# arch/arm26/lib/testclearbit.S
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +1 -1
#   arm26: update comments, headers, notes
# 
# arch/arm26/lib/testchangebit.S
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +1 -1
#   arm26: update comments, headers, notes
# 
# arch/arm26/lib/strrchr.S
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +1 -1
#   arm26: update comments, headers, notes
# 
# arch/arm26/lib/strchr.S
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +1 -1
#   arm26: update comments, headers, notes
# 
# arch/arm26/lib/setbit.S
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +1 -1
#   arm26: update comments, headers, notes
# 
# arch/arm26/lib/memzero.S
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +1 -1
#   arm26: update comments, headers, notes
# 
# arch/arm26/lib/memset.S
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +1 -1
#   arm26: update comments, headers, notes
# 
# arch/arm26/lib/memcpy.S
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +1 -1
#   arm26: update comments, headers, notes
# 
# arch/arm26/lib/memchr.S
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +1 -1
#   arm26: update comments, headers, notes
# 
# arch/arm26/lib/io-writesl.S
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +1 -1
#   arm26: update comments, headers, notes
# 
# arch/arm26/lib/io-writesb.S
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +1 -1
#   arm26: update comments, headers, notes
# 
# arch/arm26/lib/io-readsb.S
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +1 -1
#   arm26: update comments, headers, notes
# 
# arch/arm26/lib/io-acorn.S
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +1 -1
#   arm26: update comments, headers, notes
# 
# arch/arm26/lib/floppydma.S
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +1 -1
#   arm26: update comments, headers, notes
# 
# arch/arm26/lib/ecard.S
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +1 -1
#   arm26: update comments, headers, notes
# 
# arch/arm26/lib/delay.S
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +1 -1
#   arm26: update comments, headers, notes
# 
# arch/arm26/lib/csumpartialcopygeneric.S
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +1 -1
#   arm26: update comments, headers, notes
# 
# arch/arm26/lib/csumpartialcopy.S
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +1 -1
#   arm26: update comments, headers, notes
# 
# arch/arm26/lib/csumpartial.S
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +1 -1
#   arm26: update comments, headers, notes
# 
# arch/arm26/lib/csumipv6.S
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +1 -1
#   arm26: update comments, headers, notes
# 
# arch/arm26/lib/copy_page.S
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +1 -1
#   arm26: update comments, headers, notes
# 
# arch/arm26/lib/clearbit.S
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +1 -1
#   arm26: update comments, headers, notes
# 
# arch/arm26/lib/changebit.S
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +1 -1
#   arm26: update comments, headers, notes
# 
# arch/arm26/lib/backtrace.S
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +1 -1
#   arm26: update comments, headers, notes
# 
# arch/arm26/kernel/setup.c
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +2 -2
#   arm26: update comments, headers, notes
# 
# arch/arm26/kernel/init_task.c
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +4 -2
#   arm26: update comments, headers, notes
# 
# arch/arm26/kernel/compat.c
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +1 -1
#   arm26: update comments, headers, notes
# 
# arch/arm26/boot/install.sh
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +2 -2
#   arm26: update comments, headers, notes
# 
# arch/arm26/boot/compressed/vmlinux.lds.in
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +1 -1
#   arm26: update comments, headers, notes
# 
# arch/arm26/boot/compressed/uncompress.h
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +0 -1
#   arm26: update comments, headers, notes
# 
# arch/arm26/boot/compressed/ll_char_wr.S
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +1 -1
#   arm26: update comments, headers, notes
# 
# arch/arm26/boot/compressed/head.S
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +1 -1
#   arm26: update comments, headers, notes
# 
# arch/arm26/ACKNOWLEDGEMENTS
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +2 -0
#   arm26: update comments, headers, notes
# 
# ChangeSet
#   2005/01/03 20:50:15-08:00 spyro@f2s.com 
#   [PATCH] arm26 build system updates
#   
#   - Updates to makefiles required by the other changes in this patchset.
#   
#   - Also add some entries to the linker scripts.  The linker scripts really
#     ought to be merged into one script but that will have to wait.
#   
#   - Add a comment for building xipImages Update the compiler flags used to
#     build arm26 so gcc 3.4 doesnt barf.
#   
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/arm26/mm/Makefile
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +2 -1
#   arm26 build system updates
# 
# arch/arm26/machine/Makefile
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +1 -5
#   arm26 build system updates
# 
# arch/arm26/lib/Makefile
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +6 -6
#   arm26 build system updates
# 
# arch/arm26/kernel/vmlinux-arm26.lds.in
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +2 -1
#   arm26 build system updates
# 
# arch/arm26/kernel/vmlinux-arm26-xip.lds.in
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +4 -1
#   arm26 build system updates
# 
# arch/arm26/kernel/Makefile
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +7 -8
#   arm26 build system updates
# 
# arch/arm26/boot/Makefile
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +5 -3
#   arm26 build system updates
# 
# arch/arm26/Makefile
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +7 -7
#   arm26 build system updates
# 
# ChangeSet
#   2005/01/03 20:49:59-08:00 spyro@f2s.com 
#   [PATCH] arm26: update the atomic ops
#   
#   Replace the macros for atomic ops and bring arm26 up to current definitions.
#   make the arm26 mm code use the proper macros also.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-arm26/bitops.h
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +28 -45
#   arm26: update the atomic ops
# 
# include/asm-arm26/atomic.h
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +33 -76
#   arm26: update the atomic ops
# 
# arch/arm26/mm/init.c
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +2 -3
#   arm26: update the atomic ops
# 
# ChangeSet
#   2005/01/03 20:49:46-08:00 spyro@f2s.com 
#   [PATCH] arm26: remove arm32 cruft
#   
#   This patch drops some more stuff left over from the old combined arm26/32
#   architecture.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/arm26/kernel/traps.c
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +6 -6
#   arm26: remove arm32 cruft
# 
# arch/arm26/kernel/ecard.c
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +23 -78
#   arm26: remove arm32 cruft
# 
# arch/arm26/kernel/dma.c
#   2005/01/03 15:49:27-08:00 spyro@f2s.com +1 -30
#   arm26: remove arm32 cruft
# 
# ChangeSet
#   2005/01/03 20:49:33-08:00 ysato@users.sourceforge.jp 
#   [PATCH] H8/300 new systemcall support
#   
#   Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-h8300/unistd.h
#   2005/01/03 15:49:26-08:00 ysato@users.sourceforge.jp +22 -1
#   H8/300 new systemcall support
# 
# arch/h8300/kernel/syscalls.S
#   2005/01/03 15:49:26-08:00 ysato@users.sourceforge.jp +15 -0
#   H8/300 new systemcall support
# 
# ChangeSet
#   2005/01/03 20:49:20-08:00 ak@suse.de 
#   [PATCH] x86_64: Eliminate some useless printks in ACPI numa.c
#   
#   Eliminate some useless printks in ACPI numa.c
#   
#   They trigger all the time on x86-64 with CONFIG_ACPI_NUMA
#   
#   Signed-off-by: Andi Kleen <ak@suse.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/acpi/numa.c
#   2005/01/03 15:49:26-08:00 ak@suse.de +0 -7
#   x86_64: Eliminate some useless printks in ACPI numa.c
# 
# ChangeSet
#   2005/01/03 20:49:07-08:00 ak@suse.de 
#   [PATCH] x86_64: Add x86_64 support for Jack Steiner's SLIT sysfs patch
#   
#   Add x86_64 support for Jack Steiner's SLIT sysfs patch
#   
#   Make Jack's code compile on x86-64 and add x86-64 low level support to save
#   the SLIT pointer and a node_distance() implementation.
#   
#   Requires the previous SRAT patch.
#   
#   Signed-off-by: Andi Kleen <ak@suse.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-x86_64/topology.h
#   2005/01/03 15:49:26-08:00 ak@suse.de +6 -0
#   x86_64: Add x86_64 support for Jack Steiner's SLIT sysfs patch
# 
# drivers/base/node.c
#   2005/01/03 15:49:26-08:00 ak@suse.de +2 -2
#   x86_64: Add x86_64 support for Jack Steiner's SLIT sysfs patch
# 
# arch/x86_64/mm/srat.c
#   2005/01/03 15:49:26-08:00 ak@suse.de +28 -1
#   x86_64: Add x86_64 support for Jack Steiner's SLIT sysfs patch
# 
# ChangeSet
#   2005/01/03 20:48:54-08:00 ak@suse.de 
#   [PATCH] x86_64: Add SLIT (inter node distance) information to sysfs.
#   
#   Add SLIT (inter node distance) information to sysfs.
#   
#   [This is Jack's patch that he submitted on l-k. I'm submitting
#   it for him because I need it for my x86-64 followon SLIT patch.
#   Hope I don't stomp onto his toes with that one. If you already 
#   merged it please ignore]
#   
#   From: Jack Steiner
#   
#   Here is an update patch to externalize the SLIT information. I think I have
#   encorporated all the comments that were posted previously)
#   
#   For example:
#   
#           # cd /sys/devices/system
#           # find .
#           ./node
#           ./node/node5
#           ./node/node5/distance
#           ./node/node5/numastat
#           ./node/node5/meminfo
#           ./node/node5/cpumap
#   
#           # cat ./node/node0/distance
#           10 20 64 42 42 22
#   
#           # cat node/*/distance
#           10 20 64 42 42 22
#           20 10 42 22 64 84
#           64 42 10 20 22 42
#           42 22 20 10 42 62
#           42 64 22 42 10 20
#           22 84 42 62 20 10
#   
#   Signed-off-by: Jack Steiner <steiner@sgi.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/topology.h
#   2005/01/03 15:49:26-08:00 ak@suse.de +4 -1
#   x86_64: Add SLIT (inter node distance) information to sysfs.
# 
# include/asm-i386/topology.h
#   2005/01/03 15:49:26-08:00 ak@suse.de +0 -3
#   x86_64: Add SLIT (inter node distance) information to sysfs.
# 
# drivers/base/node.c
#   2005/01/03 15:50:27-08:00 ak@suse.de +19 -0
#   x86_64: Add SLIT (inter node distance) information to sysfs.
# 
# ChangeSet
#   2005/01/03 20:48:43-08:00 ak@suse.de 
#   [PATCH] x86_64: Remove unneeded ifdef in hardirq.h
#   
#   Remove unneeded ifdef in hardirq.h
#   
#   I can't see any reason for the #ifdef CONFIG_X86 introduced to the x86_64
#   hardirq.h as part of the generic irq subsystem changes.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Andi Kleen <ak@suse.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-x86_64/hardirq.h
#   2005/01/03 15:49:26-08:00 ak@suse.de +0 -2
#   x86_64: Remove unneeded ifdef in hardirq.h
# 
# ChangeSet
#   2005/01/03 20:48:28-08:00 ak@suse.de 
#   [PATCH] x86_64: Fix EM64T config description
#   
#   Fix EM64T config description
#   
#   From: Xose Vazquez Perez <xose@wanadoo.es>
#   
#   Signed-off-by: Andi Kleen <ak@suse.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/x86_64/Kconfig
#   2005/01/03 15:49:26-08:00 ak@suse.de +4 -3
#   x86_64: Fix EM64T config description
# 
# ChangeSet
#   2005/01/03 20:48:15-08:00 ak@suse.de 
#   [PATCH] x86_64: Fix some outdated assumptions that CPU numbers are equal numbers.
#   
#   Fix some outdated assumptions that CPU numbers are equal numbers.
#   
#   Depends on the unlimited cpus patch.
#   
#   Signed-off-by: Andi Kleen <ak@suse.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/x86_64/mm/numa.c
#   2005/01/03 15:49:26-08:00 ak@suse.de +1 -4
#   x86_64: Fix some outdated assumptions that CPU numbers are equal numbers.
# 
# arch/x86_64/kernel/setup64.c
#   2005/01/03 15:49:26-08:00 ak@suse.de +3 -4
#   x86_64: Fix some outdated assumptions that CPU numbers are equal numbers.
# 
# ChangeSet
#   2005/01/03 20:48:03-08:00 ak@suse.de 
#   [PATCH] x86_64: Fix a warning in the CMP support code for !CONFIG_NUMA
#   
#   Fix a warning in the CMP support code for !CONFIG_NUMA
#   
#   Signed-off-by: Andi Kleen <ak@suse.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/x86_64/kernel/setup.c
#   2005/01/03 15:49:25-08:00 ak@suse.de +2 -0
#   x86_64: Fix a warning in the CMP support code for !CONFIG_NUMA
# 
# ChangeSet
#   2005/01/03 20:47:50-08:00 ak@suse.de 
#   [PATCH] x86_64: Allow to configure more CPUs and nodes.
#   
#   Allow to configure more CPUs and nodes.
#   
#   With clustered mode and AMD's big flat APIC mode there is no reason anymore to
#   limit the max number of CPUs to 8.  Increase the limit to 256 for now, which
#   is the current APIC limit. 
#   
#   Untested for now.
#   
#   Also increase the max number of nodes to 64.  Remove the MAXNODE define and
#   replace it with MAX_NUMNODES everywhere or the constant if the hardware limits
#   the number of nodes.
#   
#   Also remove some obsolete comments.
#   
#   Signed-off-by: Andi Kleen <ak@suse.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-x86_64/numnodes.h
#   2005/01/03 15:49:25-08:00 ak@suse.de +1 -2
#   x86_64: Allow to configure more CPUs and nodes.
# 
# include/asm-x86_64/numa.h
#   2005/01/03 15:49:25-08:00 ak@suse.de +1 -3
#   x86_64: Allow to configure more CPUs and nodes.
# 
# include/asm-x86_64/mmzone.h
#   2005/01/03 15:49:25-08:00 ak@suse.de +0 -1
#   x86_64: Allow to configure more CPUs and nodes.
# 
# arch/x86_64/mm/numa.c
#   2005/01/03 15:50:27-08:00 ak@suse.de +4 -4
#   x86_64: Allow to configure more CPUs and nodes.
# 
# arch/x86_64/mm/k8topology.c
#   2005/01/03 15:49:25-08:00 ak@suse.de +2 -2
#   x86_64: Allow to configure more CPUs and nodes.
# 
# arch/x86_64/Kconfig
#   2005/01/03 15:50:27-08:00 ak@suse.de +4 -6
#   x86_64: Allow to configure more CPUs and nodes.
# 
# ChangeSet
#   2005/01/03 20:47:37-08:00 ak@suse.de 
#   [PATCH] x86_64: Export phys_proc_id
#   
#   Export phys_proc_id
#   
#   This is useful for the powernow-k8 driver which needs to know that two CPUs
#   share a die.
#   
#   It cannot use cpu_sibling_map anymore, so this is an alternative.
#   
#   Signed-off-by: Andi Kleen <ak@suse.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/x86_64/kernel/smpboot.c
#   2005/01/03 15:49:25-08:00 ak@suse.de +1 -0
#   x86_64: Export phys_proc_id
# 
# ChangeSet
#   2005/01/03 20:47:24-08:00 ak@suse.de 
#   [PATCH] x86_64: Always print segfaults for init.
#   
#   Always print segfaults for init. 
#   
#   This gives better debugging output when something is really wrong with the
#   kernel.
#   
#   Signed-off-by: Andi Kleen <ak@suse.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/x86_64/mm/fault.c
#   2005/01/03 15:49:25-08:00 ak@suse.de +5 -2
#   x86_64: Always print segfaults for init.
# 
# ChangeSet
#   2005/01/03 20:47:11-08:00 ak@suse.de 
#   [PATCH] x86_64: Add a missing newline in /proc/cpuinfo
#   
#   Add a missing newline in /proc/cpuinfo
#   
#   Signed-off-by: Andi Kleen <ak@suse.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/x86_64/kernel/setup.c
#   2005/01/03 15:50:28-08:00 ak@suse.de +1 -0
#   x86_64: Add a missing newline in /proc/cpuinfo
# 
# ChangeSet
#   2005/01/03 20:46:58-08:00 ak@suse.de 
#   [PATCH] x86_64: Add a missing __iomem pointed out by Linus.
#   
#   Add a missing __iomem pointed out by Linus.
#   
#   Signed-off-by: Andi Kleen <ak@suse.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/x86_64/kernel/early_printk.c
#   2005/01/03 15:49:25-08:00 ak@suse.de +1 -1
#   x86_64: Add a missing __iomem pointed out by Linus.
# 
# ChangeSet
#   2005/01/03 20:46:45-08:00 ak@suse.de 
#   [PATCH] x86_64: Scheduler support for AMD CMP
#   
#   Scheduler support for AMD CMP
#   
#   AMD dual core looks like HT but isn't really.  Hide it from the scheduler. 
#   This works around problems with the domain scheduler.  Also probably gives
#   slightly better scheduling and disables SMT nice which is harmful on dual
#   core.
#   
#   We still display it like HT in /proc/cpuinfo.  This is to make it appear the
#   same to license managers so that they count dual cores only as a single
#   physical CPU.
#   
#   Signed-off-by: Andi Kleen <ak@suse.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/x86_64/kernel/setup.c
#   2005/01/03 15:50:28-08:00 ak@suse.de +18 -6
#   x86_64: Scheduler support for AMD CMP
# 
# ChangeSet
#   2005/01/03 20:46:32-08:00 ak@suse.de 
#   [PATCH] x86_64: Rename HTVALID to CMP_LEGACY
#   
#   Rename HTVALID to CMP_LEGACY
#   
#   AMD renamed the HTVALID CPUID flag to CMP_LEGACY and reverted its meaning. 
#   Follow this for /proc/cpuinfo
#   
#   Needed for the followon CMP patches.
#   
#   Signed-off-by: Andi Kleen <ak@suse.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-x86_64/cpufeature.h
#   2005/01/03 15:49:25-08:00 ak@suse.de +1 -1
#   x86_64: Rename HTVALID to CMP_LEGACY
# 
# arch/x86_64/kernel/setup.c
#   2005/01/03 15:50:28-08:00 ak@suse.de +1 -1
#   x86_64: Rename HTVALID to CMP_LEGACY
# 
# ChangeSet
#   2005/01/03 20:46:17-08:00 ak@suse.de 
#   [PATCH] x86_64: Remove debug information for vsyscalls
#   
#   Remove debug information for vsyscalls
#   
#   This helps gdb apparently because it doesn't like code with debugging
#   information before other code (?)
#   
#   Via the kgdb folks.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/x86_64/kernel/Makefile
#   2005/01/03 15:49:24-08:00 ak@suse.de +2 -0
#   x86_64: Remove debug information for vsyscalls
# 
# ChangeSet
#   2005/01/03 20:46:04-08:00 ak@suse.de 
#   [PATCH] x86_64: Allow a kernel debugger to hide single steps in more cases.
#   
#   Allow a kernel debugger to hide single steps in more cases.
#   
#   Apparently helps the kgdb people.
#   
#   Signed-off-by: Andi Kleen <ak@suse.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-x86_64/kdebug.h
#   2005/01/03 15:49:24-08:00 ak@suse.de +1 -0
#   x86_64: Allow a kernel debugger to hide single steps in more cases.
# 
# arch/x86_64/kernel/traps.c
#   2005/01/03 15:49:24-08:00 ak@suse.de +3 -1
#   x86_64: Allow a kernel debugger to hide single steps in more cases.
# 
# ChangeSet
#   2005/01/03 20:45:51-08:00 ak@suse.de 
#   [PATCH] x86_64: Update uptime after suspend
#   
#   Update uptime after suspend
#   
#   Derived from i386
#   
#   Adjust jiffies after suspend to keep uptime. 
#   
#   Signed-off-by: Andi Kleen <ak@suse.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/x86_64/mm/srat.c
#   2005/01/03 15:50:27-08:00 ak@suse.de +4 -4
#   x86_64: Update uptime after suspend
# 
# arch/x86_64/kernel/time.c
#   2005/01/03 15:49:24-08:00 ak@suse.de +6 -2
#   x86_64: Update uptime after suspend
# 
# ChangeSet
#   2005/01/03 20:45:38-08:00 ak@suse.de 
#   [PATCH] x86_64: Add SRAT NUMA discovery to x86-64.
#   
#   Add SRAT NUMA discovery to x86-64.
#   
#   Previously the NUMA nodes on Opteron systems were directly read from the
#   hardware registers of the northbridge.
#   
#   This version also supports reading it from the more generic ACPI SRAT table.
#   This allows to support NUMA on all kinds of systems and in general gives more
#   flexibility, but needs a bit of BIOS support.
#   
#   This implementation was not done before because the SRAT specification had a
#   bad license from Microsoft that didn't allow to implement it on other OS.  Now
#   that ACPI 3.0 is released and SRAT is part of it that isn't a concern anymore.
#   
#   One side effect of this is that holes not described in SRAT (e.g.  usually the
#   640K DOS and 4GB PCI memory holes) will not included in the nodes and won't
#   get mem_map entries allocated.  This may have side effects for some drivers.
#   
#   Some support for handling dual core AMD CPUs is included.
#   
#   SLIT parsing is done in a later patch.  Depends on earlier patches to split up
#   the ACPI boot parsing and to add better CMP support on x86-64.
#   
#   Can be disabled with numa=noacpi
#   
#   Signed-off-by: Andi Kleen <ak@suse.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-x86_64/numa.h
#   2005/01/03 15:50:28-08:00 ak@suse.de +1 -0
#   x86_64: Add SRAT NUMA discovery to x86-64.
# 
# include/asm-x86_64/acpi.h
#   2005/01/03 15:49:24-08:00 ak@suse.de +4 -0
#   x86_64: Add SRAT NUMA discovery to x86-64.
# 
# drivers/acpi/Kconfig
#   2005/01/03 15:49:24-08:00 ak@suse.de +1 -1
#   x86_64: Add SRAT NUMA discovery to x86-64.
# 
# arch/x86_64/mm/srat.c
#   2005/01/03 15:50:29-08:00 ak@suse.de +182 -0
#   x86_64: Add SRAT NUMA discovery to x86-64.
# 
# arch/x86_64/mm/numa.c
#   2005/01/03 15:50:28-08:00 ak@suse.de +17 -3
#   x86_64: Add SRAT NUMA discovery to x86-64.
# 
# arch/x86_64/mm/k8topology.c
#   2005/01/03 15:50:28-08:00 ak@suse.de +1 -3
#   x86_64: Add SRAT NUMA discovery to x86-64.
# 
# arch/x86_64/mm/Makefile
#   2005/01/03 15:49:24-08:00 ak@suse.de +1 -0
#   x86_64: Add SRAT NUMA discovery to x86-64.
# 
# arch/x86_64/kernel/setup.c
#   2005/01/03 15:50:29-08:00 ak@suse.de +16 -5
#   x86_64: Add SRAT NUMA discovery to x86-64.
# 
# arch/x86_64/mm/srat.c
#   2005/01/03 15:50:29-08:00 ak@suse.de +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/x86_64/mm/srat.c
# 
# ChangeSet
#   2005/01/03 20:45:23-08:00 ak@suse.de 
#   [PATCH] x86_64: Split ACPI boot table parsing
#   
#   Split ACPI boot table parsing
#   
#   Split ACPI boot table parsing into two parts.  First a acpi_boot_table_init()
#   call that initializes the basic ACPI table parsing machinery and discovers the
#   RSDP, and then another call to actually parse the various boot tables.
#   
#   This is needed for a followon patch that implements SRAT support, because
#   nodes need to be set up before the other ACPI tables can be parsed.
#   
#   On x86-64 I moved the early initialization very early because that is needed
#   for the SRAT parser.
#   
#   On i386 it should be a nop.
#   
#   Signed-off-by: Andi Kleen <ak@suse.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/acpi.h
#   2005/01/03 15:49:24-08:00 ak@suse.de +6 -0
#   x86_64: Split ACPI boot table parsing
# 
# arch/x86_64/kernel/setup.c
#   2005/01/03 15:50:29-08:00 ak@suse.de +14 -7
#   x86_64: Split ACPI boot table parsing
# 
# arch/i386/kernel/setup.c
#   2005/01/03 15:49:24-08:00 ak@suse.de +1 -0
#   x86_64: Split ACPI boot table parsing
# 
# arch/i386/kernel/acpi/boot.c
#   2005/01/03 15:49:24-08:00 ak@suse.de +21 -3
#   x86_64: Split ACPI boot table parsing
# 
# ChangeSet
#   2005/01/03 20:45:08-08:00 ak@suse.de 
#   [PATCH] x86_64: Handle NX correctly in pageattr
#   
#   Handle NX correctly in pageattr
#   
#   Second attempt to try to fix an long standing NX bug in change_page_attr.
#   Hopefully this version will be better.
#   
#   The kernel text mapping aliases part of the physical memory and needs its
#   caching attributes changed too.  But when doing this one has to be very
#   careful to handle the NX bit correctly.
#   
#   A previous slightly different version of this broke the X server on some RH
#   systems.  I hope this version will be better, but if you have X server
#   problems please revert this one.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/x86_64/mm/pageattr.c
#   2005/01/03 15:49:24-08:00 ak@suse.de +4 -3
#   x86_64: Handle NX correctly in pageattr
# 
# ChangeSet
#   2005/01/03 20:44:54-08:00 ak@suse.de 
#   [PATCH] x86_64: Collected ioremap fixes
#   
#   Collected ioremap fixes
#   
#   - Call change_page_attr correctly
#   - Fix a race during iounmap
#   - Handle mmio holes without mem_map correctly (needed for SRAT patch)
#   - Some cleanups
#   
#   Signed-off-by: Andi Kleen <ak@suse.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-x86_64/cacheflush.h
#   2005/01/03 15:49:24-08:00 ak@suse.de +1 -0
#   x86_64: Collected ioremap fixes
# 
# arch/x86_64/mm/pageattr.c
#   2005/01/03 15:50:29-08:00 ak@suse.de +21 -15
#   x86_64: Collected ioremap fixes
# 
# arch/x86_64/mm/ioremap.c
#   2005/01/03 15:49:24-08:00 ak@suse.de +48 -28
#   x86_64: Collected ioremap fixes
# 
# ChangeSet
#   2005/01/03 20:44:39-08:00 ak@suse.de 
#   [PATCH] x86_64: Add reboot=force
#   
#   Add reboot=force
#   
#   reboot=force doesn't wait for any other CPUs on reboot.  This is useful when
#   you really need a system to reboot on its own.
#   
#   Signed-off-by: Andi Kleen <ak@suse.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-x86_64/proto.h
#   2005/01/03 15:49:23-08:00 ak@suse.de +2 -0
#   x86_64: Add reboot=force
# 
# arch/x86_64/kernel/smp.c
#   2005/01/03 15:49:23-08:00 ak@suse.de +3 -0
#   x86_64: Add reboot=force
# 
# arch/x86_64/kernel/reboot.c
#   2005/01/03 15:49:23-08:00 ak@suse.de +23 -14
#   x86_64: Add reboot=force
# 
# ChangeSet
#   2005/01/03 20:44:26-08:00 ak@suse.de 
#   [PATCH] x86_64: Remove BIOS reboot code
#   
#   Remove BIOS reboot code
#   
#   Remove the never quite working BIOS reboot code.  This gets rid of a lot of
#   code.
#   
#   Signed-off-by: Andi Kleen <ak@suse.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/x86_64/kernel/reboot.c
#   2005/01/03 15:50:30-08:00 ak@suse.de +1 -34
#   x86_64: Remove BIOS reboot code
# 
# arch/x86_64/kernel/Makefile
#   2005/01/03 15:50:29-08:00 ak@suse.de +1 -1
#   x86_64: Remove BIOS reboot code
# 
# BitKeeper/deleted/.del-warmreboot.S~b112755cbbb477d
#   2005/01/03 20:44:19-08:00 ak@suse.de +0 -0
#   Delete: arch/x86_64/kernel/warmreboot.S
# 
# ChangeSet
#   2005/01/03 20:44:13-08:00 ak@suse.de 
#   [PATCH] x86_64: Remove duplicated FAKE_STACK_FRAME macro.
#   
#   Remove duplicated FAKE_STACK_FRAME macro.
#   
#   FAKE_STACK_FRAME macro is defined twice.  The one that gets used is in
#   arch/x86_64/kernel/entry.S, and is slightly different codewise, although
#   should have the same end result (uses pushq rather than addq %rsp + movq and
#   has the extra dwarf annotations).
#   
#   Signed-off-by: Chris Wright <chrisw@osdl.org>
#   Signed-off-by: Andi Kleen <ak@suse.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-x86_64/calling.h
#   2005/01/03 15:49:23-08:00 ak@suse.de +0 -16
#   x86_64: Remove duplicated FAKE_STACK_FRAME macro.
# 
# ChangeSet
#   2005/01/03 20:44:00-08:00 ak@suse.de 
#   [PATCH] x86_64: Reenable MGA DRI on x86-64
#   
#   Reenable MGA DRI on x86-64
#   
#   Has been reported as working.
#   
#   Signed-off-by: Andi Kleen <ak@suse.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/char/drm/Kconfig
#   2005/01/03 15:49:23-08:00 ak@suse.de +1 -1
#   x86_64: Reenable MGA DRI on x86-64
# 
# ChangeSet
#   2005/01/03 20:43:47-08:00 pbadari@us.ibm.com 
#   [PATCH] x86_64: numa_add_cpu() fix
#   
#   Problem is with "c - cpu_data" arthimetic.  "c" could be "boot_cpu_data" or
#   "cpu_data".
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/x86_64/kernel/setup.c
#   2005/01/03 15:50:29-08:00 pbadari@us.ibm.com +2 -1
#   x86_64: numa_add_cpu() fix
# 
# ChangeSet
#   2005/01/03 20:43:34-08:00 ak@suse.de 
#   [PATCH] x86_64: Fix bugs in the AMD K8 CMP support code.
#   
#   Fix bugs in the AMD K8 CMP support code.
#   
#   Check the correct cpuid level and move numa_add_cpu to the correct place.
#   
#   Signed-off-by: Andi Kleen <ak@suse.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/x86_64/kernel/setup64.c
#   2005/01/03 15:50:27-08:00 ak@suse.de +0 -4
#   x86_64: Fix bugs in the AMD K8 CMP support code.
# 
# arch/x86_64/kernel/setup.c
#   2005/01/03 15:50:30-08:00 ak@suse.de +5 -1
#   x86_64: Fix bugs in the AMD K8 CMP support code.
# 
# ChangeSet
#   2005/01/03 20:43:21-08:00 ak@suse.de 
#   [PATCH] x86_64: Add a real pfn_valid
#   
#   Add a real pfn_valid
#   
#   This adds a real pfn_valid.  Needed together with the SRAT patch which can
#   generated memmap less holes for mmio.  In general it will help to handle
#   memory holes better.
#   
#   Signed-off-by: Andi Kleen <ak@suse.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-x86_64/mmzone.h
#   2005/01/03 15:50:28-08:00 ak@suse.de +3 -4
#   x86_64: Add a real pfn_valid
# 
# ChangeSet
#   2005/01/03 20:43:08-08:00 prasanna@in.ibm.com 
#   [PATCH] x86_64: do_general_protection() retval check
#   
#   This patch adds the return value check for the exception notifiers at
#   do_general_protection as pointed out by Chuck Ebbert.
#   
#   Signed-off-by: Prasanna S Panchamukhi <prasanna@in.ibm.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/x86_64/kernel/traps.c
#   2005/01/03 15:50:29-08:00 prasanna@in.ibm.com +3 -2
#   x86_64: do_general_protection() retval check
# 
# ChangeSet
#   2005/01/03 20:42:52-08:00 zwane@linuxpower.ca 
#   [PATCH] Intel thermal monitor for x86_64
#   
#   Patch adds support for notification of overheating conditions on intel
#   x86_64 processors.  Tested on EM64T, test booted on AMD64.
#   
#   Hardware courtesy of Intel Corporation
#   
#   Signed-off-by: Zwane Mwaikambo <zwane@linuxpower.ca>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-x86_64/mce.h
#   2005/01/03 15:49:22-08:00 zwane@linuxpower.ca +13 -0
#   Intel thermal monitor for x86_64
# 
# arch/x86_64/kernel/traps.c
#   2005/01/03 15:50:31-08:00 zwane@linuxpower.ca +4 -0
#   Intel thermal monitor for x86_64
# 
# arch/x86_64/kernel/mce_intel.c
#   2005/01/03 15:49:22-08:00 zwane@linuxpower.ca +99 -0
#   Intel thermal monitor for x86_64
# 
# arch/x86_64/kernel/mce.c
#   2005/01/03 15:49:22-08:00 zwane@linuxpower.ca +13 -1
#   Intel thermal monitor for x86_64
# 
# arch/x86_64/kernel/i8259.c
#   2005/01/03 15:49:22-08:00 zwane@linuxpower.ca +2 -0
#   Intel thermal monitor for x86_64
# 
# arch/x86_64/kernel/entry.S
#   2005/01/03 15:49:22-08:00 zwane@linuxpower.ca +3 -0
#   Intel thermal monitor for x86_64
# 
# arch/x86_64/kernel/Makefile
#   2005/01/03 15:50:30-08:00 zwane@linuxpower.ca +1 -0
#   Intel thermal monitor for x86_64
# 
# arch/x86_64/Kconfig
#   2005/01/03 15:50:28-08:00 zwane@linuxpower.ca +7 -0
#   Intel thermal monitor for x86_64
# 
# arch/x86_64/kernel/mce_intel.c
#   2005/01/03 15:49:22-08:00 zwane@linuxpower.ca +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/x86_64/kernel/mce_intel.c
# 
# ChangeSet
#   2005/01/03 20:42:35-08:00 hpa@zytor.com 
#   [PATCH] /proc/sys/kernel/bootloader_type
#   
#   This patch exports to userspace the boot loader ID which has been exported
#   by (b)zImage boot loaders since boot protocol version 2.
#   
#   It is needed so that update tools that update kernels from vendors know which
#   bootloader file they need to update; eg right now those tools do all kinds of
#   hairy heuristics to find out if it's grub or lilo or ..  that installed the
#   kernel.  Those heuristics are fragile in the presence of more than one
#   bootloader (which isn't that uncommon in OS upgrade situations).
#   
#   Tested on i386 and x86-64; as far as I know those are the only
#   architectures which use zImage/bzImage format.
#   
#   Signed-Off-By: H. Peter Anvin <hpa@zytor.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# kernel/sysctl.c
#   2005/01/03 15:49:22-08:00 hpa@zytor.com +10 -0
#   /proc/sys/kernel/bootloader_type
# 
# include/linux/sysctl.h
#   2005/01/03 15:49:22-08:00 hpa@zytor.com +1 -0
#   /proc/sys/kernel/bootloader_type
# 
# include/asm-x86_64/processor.h
#   2005/01/03 15:49:22-08:00 hpa@zytor.com +2 -0
#   /proc/sys/kernel/bootloader_type
# 
# include/asm-i386/processor.h
#   2005/01/03 15:49:22-08:00 hpa@zytor.com +3 -0
#   /proc/sys/kernel/bootloader_type
# 
# arch/x86_64/kernel/setup.c
#   2005/01/03 15:50:31-08:00 hpa@zytor.com +4 -0
#   /proc/sys/kernel/bootloader_type
# 
# arch/i386/kernel/setup.c
#   2005/01/03 15:50:29-08:00 hpa@zytor.com +4 -0
#   /proc/sys/kernel/bootloader_type
# 
# ChangeSet
#   2005/01/03 20:42:19-08:00 hpa@zytor.com 
#   [PATCH] i386 boot loader IDs
#   
#   This patch adds some i386 boot loader IDs that were used but never
#   officially recorded as assigned.  This makes them nice and official.
#   
#   Signed-Off-By: H. Peter Anvin <hpa@zytor.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# Documentation/i386/boot.txt
#   2005/01/03 15:49:22-08:00 hpa@zytor.com +3 -0
#   i386 boot loader IDs
# 
# ChangeSet
#   2005/01/03 20:42:05-08:00 vgoyal@in.ibm.com 
#   [PATCH] Secondary cpus boot-up for non default location built kernels
#   
#   This patch fixes the problem of secondary cpus not coming up over a reboot.
#    This problem was seen when a kernel compiled for non default (16MB)
#   location is booted.
#   
#   Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/i386/kernel/trampoline.S
#   2005/01/03 15:49:22-08:00 vgoyal@in.ibm.com +8 -2
#   Secondary cpus boot-up for non default location built kernels
# 
# ChangeSet
#   2005/01/03 20:41:53-08:00 haveblue@us.ibm.com 
#   [PATCH] remove pfn_to_pgdat() on x86
#   
#   This function is unused on i386.
#   
#   Signed-off-by: Dave Hansen <haveblue@us.ibm.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-i386/mmzone.h
#   2005/01/03 15:49:22-08:00 haveblue@us.ibm.com +0 -6
#   remove pfn_to_pgdat() on x86
# 
# ChangeSet
#   2005/01/03 20:41:40-08:00 hpa@zytor.com 
#   [PATCH] Trivial cleanup in arch/i386/kernel/head.S
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/i386/kernel/head.S
#   2005/01/03 15:49:22-08:00 hpa@zytor.com +3 -5
#   Trivial cleanup in arch/i386/kernel/head.S
# 
# ChangeSet
#   2005/01/03 20:41:26-08:00 zwane@arm.linux.org.uk 
#   [PATCH] NX: Triple fault with 4k kernel mappings and PAE
#   
#   Booting with NX, CONFIG_X86_PAE and CONFIG_DEBUG_PAGEALLOC or mem=nopentium
#   triple faults really early during boot as it appears to be tripping over
#   pages from PAGE_OFFSET -> PAGE_OFFSET + 0x100000 not being marked as
#   executable.
#   
#   Signed-off-by: Zwane Mwaikambo <zwane@arm.linux.org.uk>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/i386/mm/init.c
#   2005/01/03 15:49:21-08:00 zwane@arm.linux.org.uk +1 -1
#   NX: Triple fault with 4k kernel mappings and PAE
# 
# ChangeSet
#   2005/01/03 20:41:13-08:00 zwane@linuxpower.ca 
#   [PATCH] Cyrix MII cpuid returns stale %ecx
#   
#   This patch is for the following bug, thanks to Ondrej Zary for reporting,
#   testing and submitting a patch.
#   
#   http://bugzilla.kernel.org/show_bug.cgi?id=3767
#   
#   It appears that the Cyrix MII won't touch %ecx at all resulting in stale
#   data being returned as extended attributes, so clear ecx before issuing the
#   cpuid.  I have also made the capability print code display all the
#   capability words for easier debugging in future.
#   
#   Signed-off-by: Zwane Mwaikambo <zwane@linuxpower.ca>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-i386/processor.h
#   2005/01/03 15:50:31-08:00 zwane@linuxpower.ca +3 -1
#   Cyrix MII cpuid returns stale %ecx
# 
# arch/i386/kernel/cpu/common.c
#   2005/01/03 15:49:21-08:00 zwane@linuxpower.ca +13 -16
#   Cyrix MII cpuid returns stale %ecx
# 
# ChangeSet
#   2005/01/03 20:41:00-08:00 venkatesh.pallipadi@intel.com 
#   [PATCH] x86: remove data-header and code overlap in boot/setup.S
#   
#   The setup.S data and code is not cleanly separated.  The current space
#   reserved for setup header is not enough to fit the complete header.  As a
#   result, part of the header (EDDBUF) will overwrite the initial code.
#   
#   I haven't seen any negative impact of this bug.  As, by the time the setup
#   code is overwritten, we would have finished executing it anyway.  But, I
#   think it is better to separate the header and code and prevent this
#   data_overwriting_the_code condition.
#   
#   The atatched patch adds some space in the header to fit all the data listed
#   in Documentation/i386/zero-page.txt for both i386 and x86_64 (and updates
#   zero-page.txt).
#   
#   Signed-off-by:: "Venkatesh Pallipadi" <venkatesh.pallipadi@intel.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/x86_64/boot/setup.S
#   2005/01/03 15:49:21-08:00 venkatesh.pallipadi@intel.com +3 -1
#   x86: remove data-header and code overlap in boot/setup.S
# 
# arch/i386/boot/setup.S
#   2005/01/03 15:49:21-08:00 venkatesh.pallipadi@intel.com +3 -1
#   x86: remove data-header and code overlap in boot/setup.S
# 
# Documentation/i386/zero-page.txt
#   2005/01/03 15:49:21-08:00 venkatesh.pallipadi@intel.com +4 -0
#   x86: remove data-header and code overlap in boot/setup.S
# 
# ChangeSet
#   2005/01/03 20:40:47-08:00 mbligh@aracnet.com 
#   [PATCH] Assign PKMAP_BASE dynamically
#   
#   Badari hit a problem when configuring PAE off (ie CONFIG_4G) where the
#   pkmap area could end up overlapping the fixmap area.  For some reason,
#   PKMAP_BASE was defined statically, which seems rather pointless, and asking
#   for trouble.  Patch below definines it dynamically, under the fixmap area. 
#   The ordering of the VMALLOC_RESERVE space is:
#   
#   FIXADDR_TOP
#   			fixed_addresses
#   FIXADDR_START
#   			temp fixed addresses
#   FIXADDR_BOOT_START
#   			Persistent kmap area
#   PKMAP_BASE
#   VMALLOC_END
#   			Vmalloc area
#   VMALLOC_START
#   high_memory
#   
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-i386/highmem.h
#   2005/01/03 15:49:21-08:00 mbligh@aracnet.com +16 -5
#   Assign PKMAP_BASE dynamically
# 
# include/asm-i386/fixmap.h
#   2005/01/03 15:49:21-08:00 mbligh@aracnet.com +3 -1
#   Assign PKMAP_BASE dynamically
# 
# ChangeSet
#   2005/01/03 20:40:34-08:00 dhowells@redhat.com 
#   [PATCH] IDE_ARCH_OBSOLETE_INIT fix
#   
#   The attached patch fixes the IDE driver to initialise correctly in the case
#   that IDE_ARCH_OBSOLETE_INIT is not defined.  Not defining this macro would
#   seem to be the correct thing to do since it includes the word "obsolete" in
#   its name.
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/ide/setup-pci.c
#   2005/01/03 15:49:21-08:00 dhowells@redhat.com +5 -0
#   IDE_ARCH_OBSOLETE_INIT fix
# 
# ChangeSet
#   2005/01/03 20:40:21-08:00 dhowells@redhat.com 
#   [PATCH] Termio userspace access error handling
#   
#   The attached patch creates a generic set of termio userspace access functions
#   with proper error handling.  None of the current archs check for errors in
#   this case.
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-generic/termios.h
#   2005/01/03 15:49:21-08:00 dhowells@redhat.com +69 -0
#   Termio userspace access error handling
# 
# include/asm-generic/termios.h
#   2005/01/03 15:49:21-08:00 dhowells@redhat.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-generic/termios.h
# 
# ChangeSet
#   2005/01/03 20:40:08-08:00 ananth@in.ibm.com 
#   [PATCH] Kprobes: wrapper to define jprobe.entry
#   
#   Here is a patch that adds a wrapper for defining jprobe.entry to make
#   t easy to handle the three dword function descriptors defined by the
#   PowerPC ELF ABI.
#   
#   x86, ppc64 and x86_64 are also updated.
#   
#   Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-x86_64/kprobes.h
#   2005/01/03 15:49:21-08:00 ananth@in.ibm.com +2 -0
#   Kprobes: wrapper to define jprobe.entry
# 
# include/asm-sparc64/kprobes.h
#   2005/01/03 15:49:21-08:00 ananth@in.ibm.com +2 -0
#   Kprobes: wrapper to define jprobe.entry
# 
# include/asm-ppc64/kprobes.h
#   2005/01/03 15:49:21-08:00 ananth@in.ibm.com +2 -0
#   Kprobes: wrapper to define jprobe.entry
# 
# include/asm-i386/kprobes.h
#   2005/01/03 15:49:21-08:00 ananth@in.ibm.com +2 -0
#   Kprobes: wrapper to define jprobe.entry
# 
# ChangeSet
#   2005/01/03 20:39:55-08:00 david@gibson.dropbear.id.au 
#   [PATCH] ppc64: tweaks to ppc64 cpu sysfs information
#   
#   Currently the ppc64 sysfs code registers an entry for each possible cpu in
#   sysfs, rather than just online cpus.  That makes sense, since the sysfs
#   entries are needed to control onlining of the cpus.  However, this is done
#   even if CONFIG_HOTPLUG_CPU is not set, or if it is not a hotplug capable
#   (DLPAR) machine, which is a bit misleading.  Secondly it also registers all
#   the other sysfs entries (mostly performance monitoring controls) on all
#   possible cpus, although they are quite meaningless on non-online cpus.
#   
#   This patch alters the code to only register sysfs directories at boot for
#   cpus which are either online or could be onlined (cpu is possible, and
#   CONFIG_HOTPLUG_CPU and an lpar machine).  Furthermore, the entries apart
#   from 'online' itself and 'physical_id' are only registered for online CPUs
#   (and deregistered again if a cpu goes offline).
#   
#   Currently the ppc64 sysfs code registers an entry for each possible cpu in
#   sysfs, rather than just online cpus.  That makes sense, since the sysfs
#   entries are needed to control onlining of the cpus.  However, this is done
#   even if CONFIG_HOTPLUG_CPU is not set, or if it is not a hotplug capable
#   (DLPAR) machine, which is a bit misleading.  Secondly it also registers all
#   the other sysfs entries (mostly performance monitoring controls) on all
#   possible cpus, although they are quite meaningless on non-online cpus.
#   
#   This patch alters the code to only register sysfs directories at boot for
#   cpus which are either online or could be onlined (cpu is possible, and
#   CONFIG_HOTPLUG_CPU and an lpar machine).  Furthermore, the entries apart
#   from 'online' itself and 'physical_id' are only registered for online CPUs
#   (and deregistered again if a cpu goes offline).
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/ppc64/kernel/sysfs.c
#   2005/01/03 15:49:20-08:00 david@gibson.dropbear.id.au +85 -14
#   ppc64: tweaks to ppc64 cpu sysfs information
# 
# ChangeSet
#   2005/01/03 20:39:42-08:00 ananth@in.ibm.com 
#   [PATCH] ppc64: kprobes implementation
#   
#   Kprobes (Kernel dynamic probes) is a lightweight mechanism for kernel
#   modules to insert probes into a running kernel, without the need to modify
#   the underlying source.  The probe handlers can then be coded to log
#   relevent data at the probe point.  More information on kprobes can be found
#   at:
#   
#   http://www-124.ibm.com/developerworks/oss/linux/projects/kprobes/
#   
#   Jprobes (or jumper probes) is a small infrastructure to access function
#   arguments.  It can be used by defining a small stub with the same template
#   as the routine in kernel, within which the required parameters can be
#   logged.
#   
#   Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-ppc64/kprobes.h
#   2005/01/03 15:50:33-08:00 ananth@in.ibm.com +54 -0
#   ppc64: kprobes implementation
# 
# include/asm-ppc64/kdebug.h
#   2005/01/03 15:49:20-08:00 ananth@in.ibm.com +43 -0
#   ppc64: kprobes implementation
# 
# include/asm-ppc64/sstep.h
#   2005/01/03 15:49:20-08:00 ananth@in.ibm.com +11 -0
#   ppc64: kprobes implementation
# 
# include/asm-ppc64/kprobes.h
#   2005/01/03 15:50:33-08:00 ananth@in.ibm.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-ppc64/kprobes.h
# 
# include/asm-ppc64/kdebug.h
#   2005/01/03 15:49:20-08:00 ananth@in.ibm.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-ppc64/kdebug.h
# 
# arch/ppc64/xmon/xmon.c
#   2005/01/03 15:49:20-08:00 ananth@in.ibm.com +0 -11
#   ppc64: kprobes implementation
# 
# arch/ppc64/mm/fault.c
#   2005/01/03 15:49:20-08:00 ananth@in.ibm.com +8 -0
#   ppc64: kprobes implementation
# 
# arch/ppc64/lib/Makefile
#   2005/01/03 15:49:20-08:00 ananth@in.ibm.com +1 -1
#   ppc64: kprobes implementation
# 
# arch/ppc64/kernel/traps.c
#   2005/01/03 15:49:20-08:00 ananth@in.ibm.com +24 -0
#   ppc64: kprobes implementation
# 
# arch/ppc64/kernel/kprobes.c
#   2005/01/03 15:49:20-08:00 ananth@in.ibm.com +258 -0
#   ppc64: kprobes implementation
# 
# arch/ppc64/kernel/Makefile
#   2005/01/03 15:49:20-08:00 ananth@in.ibm.com +1 -0
#   ppc64: kprobes implementation
# 
# arch/ppc64/Kconfig.debug
#   2005/01/03 15:49:20-08:00 ananth@in.ibm.com +10 -0
#   ppc64: kprobes implementation
# 
# arch/ppc64/kernel/kprobes.c
#   2005/01/03 15:49:20-08:00 ananth@in.ibm.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/kernel/kprobes.c
# 
# ChangeSet
#   2005/01/03 20:39:27-08:00 a.othieno@bluewin.ch 
#   [PATCH] ppc32: Resurrect Documentation/powerpc/cpu_features.txt
#   
#   Documentation/powerpc/cpu_features.txt mysteriously disappeared sometime
#   when 2.5 forked off.
#   
#   Searching through BK logs on linux.bkbits.net didn't reveal anything,
#   unfortunately.  The only reference I could pick up from searching the
#   available lkml archives is the 2.4.20-pre11 ChangeLog where this was first
#   merged.
#   
#   Thus far, nothing indicates it was intentionally removed, and AFAICS, is
#   still up to date with the current code.
#   
#   Signed-off-by: Arthur Othieno <a.othieno@bluewin.ch>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# Documentation/powerpc/cpu_features.txt
#   2005/01/03 15:49:20-08:00 a.othieno@bluewin.ch +56 -0
#   ppc32: Resurrect Documentation/powerpc/cpu_features.txt
# 
# Documentation/powerpc/cpu_features.txt
#   2005/01/03 15:49:20-08:00 a.othieno@bluewin.ch +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/Documentation/powerpc/cpu_features.txt
# 
# Documentation/powerpc/00-INDEX
#   2005/01/03 15:49:20-08:00 a.othieno@bluewin.ch +3 -0
#   ppc32: Resurrect Documentation/powerpc/cpu_features.txt
# 
# ChangeSet
#   2005/01/03 20:39:14-08:00 mporter@kernel.crashing.org 
#   [PATCH] ppc32: fix io_remap_page_range for 36-bit phys platforms
#   
#   Fixes io_remap_page_range() to use the 32-bit address translator similar to
#   ioremap().  Someday u64 start/end resources should make this unnecessary.
#   Fixes set_pte() to handle a long long pte_t properly.
#   
#   Signed-off-by: Matt Porter <mporter@kernel.crashing.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-ppc/pgtable.h
#   2005/01/03 15:49:20-08:00 mporter@kernel.crashing.org +15 -1
#   ppc32: fix io_remap_page_range for 36-bit phys platforms
# 
# arch/ppc/syslib/ibm44x_common.c
#   2005/01/03 15:49:20-08:00 mporter@kernel.crashing.org +2 -0
#   ppc32: fix io_remap_page_range for 36-bit phys platforms
# 
# arch/ppc/Kconfig
#   2005/01/03 15:49:20-08:00 mporter@kernel.crashing.org +5 -0
#   ppc32: fix io_remap_page_range for 36-bit phys platforms
# 
# ChangeSet
#   2005/01/03 20:39:01-08:00 mporter@kernel.crashing.org 
#   [PATCH] ppc32: add uImage to default targets
#   
#   We'd like to get a uImage when just using 'make' on many targets.  After
#   some discussion, it made sense to simply add uImage to the default targets
#   since it adds minimal build overhead and will work on all platforms.  Also,
#   fix a dependency in the boot stuff.
#   
#   Signed-off-by: Matt Porter <mporter@kernel.crashing.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/ppc/boot/simple/misc.c
#   2005/01/03 15:49:20-08:00 mporter@kernel.crashing.org +1 -1
#   ppc32: add uImage to default targets
# 
# arch/ppc/Makefile
#   2005/01/03 15:49:20-08:00 mporter@kernel.crashing.org +1 -1
#   ppc32: add uImage to default targets
# 
# ChangeSet
#   2005/01/03 20:38:48-08:00 minyard@acm.org 
#   [PATCH] PPC debug setcontext syscall implementation.
#   
#   Add a debugging interface for PowerPC that allows signal handlers (or any
#   jump to a context, really) to perform debug functions.  It allows the a
#   user program to turn on single-stepping, for instance, and the thread will
#   get a trap after executing the next instruction.  It can also (on supported
#   PPC processors) turn on branch tracing and get a trap after the next branch
#   instruction is executed.  This is useful for in-application debugging.
#   
#   Note that you can enable single-stepping on x86 processors directly from
#   signal handlers.  Newer x86 processors have the equivalent of a
#   branch-trace bit in the IA32_DEBUGCTL MSR and could have similar function
#   to this syscall.  Most other processors could benefit from a similar
#   interface, except for ARM which is extraordinarily broken for debugging.
#   
#   Future uses of this could be adding the ability to set the hardware
#   breakpoint registers from a signal handler.
#   
#   Signed-off-by: Corey Minyard <minyard@mvista.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-ppc/unistd.h
#   2005/01/03 15:49:20-08:00 minyard@acm.org +1 -1
#   PPC debug setcontext syscall implementation.
# 
# include/asm-ppc/signal.h
#   2005/01/03 15:49:20-08:00 minyard@acm.org +19 -0
#   PPC debug setcontext syscall implementation.
# 
# arch/ppc/kernel/traps.c
#   2005/01/03 15:49:20-08:00 minyard@acm.org +1 -1
#   PPC debug setcontext syscall implementation.
# 
# arch/ppc/kernel/signal.c
#   2005/01/03 15:49:20-08:00 minyard@acm.org +90 -0
#   PPC debug setcontext syscall implementation.
# 
# arch/ppc/kernel/misc.S
#   2005/01/03 15:49:20-08:00 minyard@acm.org +1 -1
#   PPC debug setcontext syscall implementation.
# 
# arch/ppc/kernel/entry.S
#   2005/01/03 15:49:20-08:00 minyard@acm.org +17 -13
#   PPC debug setcontext syscall implementation.
# 
# ChangeSet
#   2005/01/03 20:38:35-08:00 mporter@kernel.crashing.org 
#   [PATCH] ppc32: remove bogus SPRN_CPC0_GPIO define
#   
#   This trivial patch removes long-standing typo in ibm44x.h.  In fact, we
#   already have correct DCRN_CPC0_GPIO define later in the same file.
#   
#   Signed-off-by: Eugene Surovegin <ebs@ebshome.net>
#   Signed-off-by: Matt Porter <mporter@kernel.crashing.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-ppc/ibm44x.h
#   2005/01/03 15:49:19-08:00 mporter@kernel.crashing.org +0 -5
#   ppc32: remove bogus SPRN_CPC0_GPIO define
# 
# ChangeSet
#   2005/01/03 20:38:22-08:00 mporter@kernel.crashing.org 
#   [PATCH] ppc32: fix ebony.c warnings
#   
#   This patch removes annoying warnings in ebony.c.  Fix is similar to one I
#   made in ocotea.c before.
#   
#   Signed-off-by: Eugene Surovegin <ebs@ebshome.net>
#   Signed-off-by: Matt Porter <mporter@kernel.crashing.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/ppc/platforms/4xx/ebony.c
#   2005/01/03 15:49:19-08:00 mporter@kernel.crashing.org +1 -1
#   ppc32: fix ebony.c warnings
# 
# ChangeSet
#   2005/01/03 20:38:09-08:00 galak@somerset.sps.mot.com 
#   [PATCH] Fix prototypes & externs in e500 oprofile support
#   
#   Remove prototypes and externs out of the .c files
#   
#   Signed-off-by: Andy Fleming <afleming@freescale.com>
#   Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-ppc/perfmon.h
#   2005/01/03 15:49:19-08:00 galak@somerset.sps.mot.com +4 -0
#   Fix prototypes & externs in e500 oprofile support
# 
# arch/ppc/oprofile/common.c
#   2005/01/03 15:49:19-08:00 galak@somerset.sps.mot.com +0 -1
#   Fix prototypes & externs in e500 oprofile support
# 
# arch/ppc/kernel/traps.c
#   2005/01/03 15:50:34-08:00 galak@somerset.sps.mot.com +1 -2
#   Fix prototypes & externs in e500 oprofile support
# 
# arch/ppc/kernel/perfmon_fsl_booke.c
#   2005/01/03 15:49:19-08:00 galak@somerset.sps.mot.com +1 -9
#   Fix prototypes & externs in e500 oprofile support
# 
# ChangeSet
#   2005/01/03 20:37:56-08:00 galak@linen.sps.mot.com 
#   [PATCH] ppc32: performance Monitor/Oprofile support for e500
#   
#   Adds oprofile support for the e500 PowerPC core.
#   
#   Signed-off-by: Andy Fleming <afleming@freescale.com>
#   Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-ppc/perfmon.h
#   2005/01/03 20:37:48-08:00 galak@linen.sps.mot.com +18 -0
# 
# arch/ppc/oprofile/op_model_fsl_booke.c
#   2005/01/03 20:37:48-08:00 galak@linen.sps.mot.com +185 -0
# 
# arch/ppc/oprofile/op_impl.h
#   2005/01/03 20:37:48-08:00 galak@linen.sps.mot.com +45 -0
# 
# arch/ppc/oprofile/common.c
#   2005/01/03 20:37:48-08:00 galak@linen.sps.mot.com +163 -0
# 
# arch/ppc/kernel/perfmon_fsl_booke.c
#   2005/01/03 20:37:48-08:00 galak@linen.sps.mot.com +230 -0
# 
# arch/ppc/kernel/perfmon.c
#   2005/01/03 20:37:48-08:00 galak@linen.sps.mot.com +94 -0
# 
# include/asm-ppc/reg_booke.h
#   2005/01/03 15:49:19-08:00 galak@linen.sps.mot.com +53 -0
#   ppc32: performance Monitor/Oprofile support for e500
# 
# include/asm-ppc/perfmon.h
#   2005/01/03 20:37:48-08:00 galak@linen.sps.mot.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-ppc/perfmon.h
# 
# arch/ppc/oprofile/op_model_fsl_booke.c
#   2005/01/03 20:37:48-08:00 galak@linen.sps.mot.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/oprofile/op_model_fsl_booke.c
# 
# arch/ppc/oprofile/op_impl.h
#   2005/01/03 20:37:48-08:00 galak@linen.sps.mot.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/oprofile/op_impl.h
# 
# arch/ppc/oprofile/common.c
#   2005/01/03 20:37:48-08:00 galak@linen.sps.mot.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/oprofile/common.c
# 
# arch/ppc/oprofile/Makefile
#   2005/01/03 15:49:19-08:00 galak@linen.sps.mot.com +1 -1
#   ppc32: performance Monitor/Oprofile support for e500
# 
# arch/ppc/kernel/traps.c
#   2005/01/03 15:50:34-08:00 galak@linen.sps.mot.com +6 -0
#   ppc32: performance Monitor/Oprofile support for e500
# 
# arch/ppc/kernel/perfmon_fsl_booke.c
#   2005/01/03 20:37:48-08:00 galak@linen.sps.mot.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/kernel/perfmon_fsl_booke.c
# 
# arch/ppc/kernel/perfmon.c
#   2005/01/03 20:37:48-08:00 galak@linen.sps.mot.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/kernel/perfmon.c
# 
# arch/ppc/kernel/head_e500.S
#   2005/01/03 15:49:19-08:00 galak@linen.sps.mot.com +2 -1
#   ppc32: performance Monitor/Oprofile support for e500
# 
# arch/ppc/kernel/Makefile
#   2005/01/03 15:49:19-08:00 galak@linen.sps.mot.com +2 -1
#   ppc32: performance Monitor/Oprofile support for e500
# 
# BitKeeper/deleted/.del-init.c~f4279b05cb33da1b
#   2005/01/03 20:37:48-08:00 galak@linen.sps.mot.com +0 -0
#   Delete: arch/ppc/oprofile/init.c
# 
# ChangeSet
#   2005/01/03 20:33:46-08:00 mporter@kernel.crashing.org 
#   [PATCH] ppc32: PPC4xx PIC rewrite/cleanup
#   
#   Patch from Eugene to do some cleanup of the PPC4xx PIC code.  Separates the
#   interrupts that can have polarity/triggering modified for platform
#   modification if necessary.  Between the two of us, it's tested on most of
#   the affected platforms.
#   
#   Signed-off-by: Eugene Surovegin <ebs@ebshome.net>
#   Signed-off-by: Matt Porter <mporter@kernel.crashing.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/ppc/syslib/ppc403_pic.c
#   2005/01/03 15:49:19-08:00 mporter@kernel.crashing.org +127 -0
#   ppc32: PPC4xx PIC rewrite/cleanup
# 
# include/asm-ppc/ppc4xx_pic.h
#   2005/01/03 15:49:19-08:00 mporter@kernel.crashing.org +38 -13
#   ppc32: PPC4xx PIC rewrite/cleanup
# 
# include/asm-ppc/ibm44x.h
#   2005/01/03 15:50:34-08:00 mporter@kernel.crashing.org +1 -3
#   ppc32: PPC4xx PIC rewrite/cleanup
# 
# arch/ppc/syslib/xilinx_pic.c
#   2005/01/03 15:49:19-08:00 mporter@kernel.crashing.org +5 -4
#   ppc32: PPC4xx PIC rewrite/cleanup
# 
# arch/ppc/syslib/ppc4xx_setup.c
#   2005/01/03 15:49:19-08:00 mporter@kernel.crashing.org +0 -5
#   ppc32: PPC4xx PIC rewrite/cleanup
# 
# arch/ppc/syslib/ppc4xx_pic.c
#   2005/01/03 15:49:19-08:00 mporter@kernel.crashing.org +189 -480
#   ppc32: PPC4xx PIC rewrite/cleanup
# 
# arch/ppc/syslib/ppc403_pic.c
#   2005/01/03 15:49:19-08:00 mporter@kernel.crashing.org +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/syslib/ppc403_pic.c
# 
# arch/ppc/syslib/ibm44x_common.c
#   2005/01/03 15:50:34-08:00 mporter@kernel.crashing.org +1 -11
#   ppc32: PPC4xx PIC rewrite/cleanup
# 
# arch/ppc/syslib/Makefile
#   2005/01/03 15:49:19-08:00 mporter@kernel.crashing.org +4 -0
#   ppc32: PPC4xx PIC rewrite/cleanup
# 
# arch/ppc/platforms/4xx/sycamore.c
#   2005/01/03 15:49:19-08:00 mporter@kernel.crashing.org +15 -37
#   ppc32: PPC4xx PIC rewrite/cleanup
# 
# arch/ppc/platforms/4xx/redwood6.c
#   2005/01/03 15:49:19-08:00 mporter@kernel.crashing.org +12 -38
#   ppc32: PPC4xx PIC rewrite/cleanup
# 
# arch/ppc/platforms/4xx/ocotea.c
#   2005/01/03 15:49:19-08:00 mporter@kernel.crashing.org +0 -6
#   ppc32: PPC4xx PIC rewrite/cleanup
# 
# arch/ppc/platforms/4xx/oak.c
#   2005/01/03 15:49:19-08:00 mporter@kernel.crashing.org +2 -28
#   ppc32: PPC4xx PIC rewrite/cleanup
# 
# arch/ppc/platforms/4xx/ibmstbx25.c
#   2005/01/03 15:49:19-08:00 mporter@kernel.crashing.org +9 -0
#   ppc32: PPC4xx PIC rewrite/cleanup
# 
# arch/ppc/platforms/4xx/ibmnp405h.h
#   2005/01/03 15:49:19-08:00 mporter@kernel.crashing.org +1 -3
#   ppc32: PPC4xx PIC rewrite/cleanup
# 
# arch/ppc/platforms/4xx/ibm440gx.c
#   2005/01/03 15:49:19-08:00 mporter@kernel.crashing.org +17 -0
#   ppc32: PPC4xx PIC rewrite/cleanup
# 
# arch/ppc/platforms/4xx/ibm440gp.c
#   2005/01/03 15:49:19-08:00 mporter@kernel.crashing.org +13 -0
#   ppc32: PPC4xx PIC rewrite/cleanup
# 
# arch/ppc/platforms/4xx/ibm405gpr.c
#   2005/01/03 15:49:19-08:00 mporter@kernel.crashing.org +9 -0
#   ppc32: PPC4xx PIC rewrite/cleanup
# 
# arch/ppc/platforms/4xx/ibm405gp.c
#   2005/01/03 15:49:19-08:00 mporter@kernel.crashing.org +9 -0
#   ppc32: PPC4xx PIC rewrite/cleanup
# 
# arch/ppc/platforms/4xx/ibm405ep.c
#   2005/01/03 15:49:19-08:00 mporter@kernel.crashing.org +9 -0
#   ppc32: PPC4xx PIC rewrite/cleanup
# 
# arch/ppc/platforms/4xx/ebony.c
#   2005/01/03 15:50:34-08:00 mporter@kernel.crashing.org +15 -69
#   ppc32: PPC4xx PIC rewrite/cleanup
# 
# ChangeSet
#   2005/01/03 20:33:32-08:00 rvinson@mvista.com 
#   [PATCH] ppc32: add Support for IBM 750FX and 750GX Eval Boards
#   
#   I've added support for the IBM 750FX and 750GX Eval Boards
#   (Chestnut/Buckeye).
#   
#   Signed-off-by: Randy Vinson <rvinson@mvista.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/mtd/maps/chestnut.c
#   2005/01/03 15:49:19-08:00 rvinson@mvista.com +89 -0
#   ppc32: add Support for IBM 750FX and 750GX Eval Boards
# 
# arch/ppc/platforms/chestnut.h
#   2005/01/03 15:49:19-08:00 rvinson@mvista.com +128 -0
#   ppc32: add Support for IBM 750FX and 750GX Eval Boards
# 
# arch/ppc/platforms/chestnut.c
#   2005/01/03 15:49:19-08:00 rvinson@mvista.com +623 -0
#   ppc32: add Support for IBM 750FX and 750GX Eval Boards
# 
# include/asm-ppc/serial.h
#   2005/01/03 15:49:19-08:00 rvinson@mvista.com +2 -0
#   ppc32: add Support for IBM 750FX and 750GX Eval Boards
# 
# include/asm-ppc/mv64x60_defs.h
#   2005/01/03 15:49:19-08:00 rvinson@mvista.com +2 -0
#   ppc32: add Support for IBM 750FX and 750GX Eval Boards
# 
# drivers/mtd/maps/chestnut.c
#   2005/01/03 15:49:19-08:00 rvinson@mvista.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/drivers/mtd/maps/chestnut.c
# 
# drivers/mtd/maps/Makefile
#   2005/01/03 15:49:19-08:00 rvinson@mvista.com +1 -0
#   ppc32: add Support for IBM 750FX and 750GX Eval Boards
# 
# drivers/mtd/maps/Kconfig
#   2005/01/03 15:49:19-08:00 rvinson@mvista.com +8 -0
#   ppc32: add Support for IBM 750FX and 750GX Eval Boards
# 
# arch/ppc/syslib/Makefile
#   2005/01/03 15:50:35-08:00 rvinson@mvista.com +1 -0
#   ppc32: add Support for IBM 750FX and 750GX Eval Boards
# 
# arch/ppc/platforms/chestnut.h
#   2005/01/03 15:49:19-08:00 rvinson@mvista.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/platforms/chestnut.h
# 
# arch/ppc/platforms/chestnut.c
#   2005/01/03 15:49:19-08:00 rvinson@mvista.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/platforms/chestnut.c
# 
# arch/ppc/platforms/Makefile
#   2005/01/03 15:49:19-08:00 rvinson@mvista.com +1 -0
#   ppc32: add Support for IBM 750FX and 750GX Eval Boards
# 
# arch/ppc/configs/chestnut_defconfig
#   2005/01/03 15:49:19-08:00 rvinson@mvista.com +739 -0
#   ppc32: add Support for IBM 750FX and 750GX Eval Boards
# 
# arch/ppc/boot/simple/misc-chestnut.S
#   2005/01/03 15:49:19-08:00 rvinson@mvista.com +41 -0
#   ppc32: add Support for IBM 750FX and 750GX Eval Boards
# 
# arch/ppc/boot/simple/Makefile
#   2005/01/03 15:49:19-08:00 rvinson@mvista.com +3 -0
#   ppc32: add Support for IBM 750FX and 750GX Eval Boards
# 
# arch/ppc/Kconfig
#   2005/01/03 15:50:34-08:00 rvinson@mvista.com +12 -1
#   ppc32: add Support for IBM 750FX and 750GX Eval Boards
# 
# arch/ppc/configs/chestnut_defconfig
#   2005/01/03 15:49:19-08:00 rvinson@mvista.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/configs/chestnut_defconfig
# 
# arch/ppc/boot/simple/misc-chestnut.S
#   2005/01/03 15:49:19-08:00 rvinson@mvista.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/boot/simple/misc-chestnut.S
# 
# ChangeSet
#   2005/01/03 20:33:18-08:00 mgreer@mvista.com 
#   [PATCH] ppc32: support for Artesyn Katana cPCI boards
#   
#   This patch adds support for the Artesyn Katana 750i, 752i, and 3750.
#   
#   Signed-off-by: Mark A. Greer <mgreer@mvista.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/ppc/platforms/katana.h
#   2005/01/03 15:49:18-08:00 mgreer@mvista.com +231 -0
#   ppc32: support for Artesyn Katana cPCI boards
# 
# arch/ppc/platforms/katana.c
#   2005/01/03 15:49:18-08:00 mgreer@mvista.com +660 -0
#   ppc32: support for Artesyn Katana cPCI boards
# 
# arch/ppc/configs/katana_defconfig
#   2005/01/03 15:49:18-08:00 mgreer@mvista.com +651 -0
#   ppc32: support for Artesyn Katana cPCI boards
# 
# arch/ppc/boot/simple/misc-katana.c
#   2005/01/03 15:49:18-08:00 mgreer@mvista.com +15 -0
#   ppc32: support for Artesyn Katana cPCI boards
# 
# arch/ppc/syslib/Makefile
#   2005/01/03 15:50:35-08:00 mgreer@mvista.com +1 -0
#   ppc32: support for Artesyn Katana cPCI boards
# 
# arch/ppc/platforms/katana.h
#   2005/01/03 15:49:18-08:00 mgreer@mvista.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/platforms/katana.h
# 
# arch/ppc/platforms/katana.c
#   2005/01/03 15:49:18-08:00 mgreer@mvista.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/platforms/katana.c
# 
# arch/ppc/platforms/Makefile
#   2005/01/03 15:50:35-08:00 mgreer@mvista.com +1 -0
#   ppc32: support for Artesyn Katana cPCI boards
# 
# arch/ppc/configs/katana_defconfig
#   2005/01/03 15:49:18-08:00 mgreer@mvista.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/configs/katana_defconfig
# 
# arch/ppc/boot/simple/misc-katana.c
#   2005/01/03 15:49:18-08:00 mgreer@mvista.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/boot/simple/misc-katana.c
# 
# arch/ppc/boot/simple/Makefile
#   2005/01/03 15:50:35-08:00 mgreer@mvista.com +4 -0
#   ppc32: support for Artesyn Katana cPCI boards
# 
# arch/ppc/Kconfig
#   2005/01/03 15:50:35-08:00 mgreer@mvista.com +11 -0
#   ppc32: support for Artesyn Katana cPCI boards
# 
# ChangeSet
#   2005/01/03 20:33:05-08:00 mgreer@mvista.com 
#   [PATCH] ppc32: support for Force CPCI-690 board
#   
#   This patch adds support for the Force CPCI-690 cPCI board.
#   
#   Signed-off-by: Mark A. Greer <mgreer@mvista.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/ppc/platforms/cpci690.h
#   2005/01/03 15:49:18-08:00 mgreer@mvista.com +73 -0
#   ppc32: support for Force CPCI-690 board
# 
# arch/ppc/platforms/cpci690.c
#   2005/01/03 15:49:18-08:00 mgreer@mvista.com +493 -0
#   ppc32: support for Force CPCI-690 board
# 
# arch/ppc/configs/cpci690_defconfig
#   2005/01/03 15:49:18-08:00 mgreer@mvista.com +686 -0
#   ppc32: support for Force CPCI-690 board
# 
# arch/ppc/boot/simple/misc-cpci690.c
#   2005/01/03 15:49:18-08:00 mgreer@mvista.com +15 -0
#   ppc32: support for Force CPCI-690 board
# 
# arch/ppc/syslib/Makefile
#   2005/01/03 15:50:35-08:00 mgreer@mvista.com +4 -0
#   ppc32: support for Force CPCI-690 board
# 
# arch/ppc/platforms/cpci690.h
#   2005/01/03 15:49:18-08:00 mgreer@mvista.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/platforms/cpci690.h
# 
# arch/ppc/platforms/cpci690.c
#   2005/01/03 15:49:18-08:00 mgreer@mvista.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/platforms/cpci690.c
# 
# arch/ppc/platforms/Makefile
#   2005/01/03 15:50:35-08:00 mgreer@mvista.com +1 -0
#   ppc32: support for Force CPCI-690 board
# 
# arch/ppc/configs/cpci690_defconfig
#   2005/01/03 15:49:18-08:00 mgreer@mvista.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/configs/cpci690_defconfig
# 
# arch/ppc/boot/simple/misc-cpci690.c
#   2005/01/03 15:49:18-08:00 mgreer@mvista.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/boot/simple/misc-cpci690.c
# 
# arch/ppc/boot/simple/Makefile
#   2005/01/03 15:50:35-08:00 mgreer@mvista.com +6 -0
#   ppc32: support for Force CPCI-690 board
# 
# arch/ppc/Kconfig
#   2005/01/03 15:50:35-08:00 mgreer@mvista.com +6 -1
#   ppc32: support for Force CPCI-690 board
# 
# ChangeSet
#   2005/01/03 20:32:51-08:00 mgreer@mvista.com 
#   [PATCH] ppc32: support for Marvell EV-64260[ab]-BP eval platform
#   
#   This patch adds support for a line of evaluation platforms from Marvell
#   that use the Marvell GT64260[ab] host bridges.
#   
#   This patch depends on the Marvell host bridge support patch (mv64x60).
#   
#   Signed-off-by: Mark A. Greer <mgreer@mvista.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/ppc/syslib/Makefile
#   2005/01/03 15:50:35-08:00 mgreer@mvista.com +1 -2
#   ppc32: support for Marvell EV-64260[ab]-BP eval platform
# 
# arch/ppc/platforms/ev64260.h
#   2005/01/03 15:49:18-08:00 mgreer@mvista.com +82 -21
#   ppc32: support for Marvell EV-64260[ab]-BP eval platform
# 
# arch/ppc/platforms/ev64260.c
#   2005/01/03 20:32:43-08:00 mgreer@mvista.com +631 -0
# 
# arch/ppc/platforms/Makefile
#   2005/01/03 15:50:35-08:00 mgreer@mvista.com +1 -1
#   ppc32: support for Marvell EV-64260[ab]-BP eval platform
# 
# arch/ppc/configs/ev64260_defconfig
#   2005/01/03 15:49:18-08:00 mgreer@mvista.com +311 -133
#   ppc32: support for Marvell EV-64260[ab]-BP eval platform
# 
# arch/ppc/boot/simple/misc-ev64260.S
#   2005/01/03 15:49:18-08:00 mgreer@mvista.com +46 -36
#   ppc32: support for Marvell EV-64260[ab]-BP eval platform
# 
# arch/ppc/boot/simple/head.S
#   2005/01/03 15:49:18-08:00 mgreer@mvista.com +3 -3
#   ppc32: support for Marvell EV-64260[ab]-BP eval platform
# 
# arch/ppc/boot/simple/Makefile
#   2005/01/03 15:50:35-08:00 mgreer@mvista.com +1 -1
#   ppc32: support for Marvell EV-64260[ab]-BP eval platform
# 
# arch/ppc/platforms/ev64260.c
#   2005/01/03 20:32:43-08:00 mgreer@mvista.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/platforms/ev64260.c
# 
# BitKeeper/deleted/.del-gt64260_tty.c~5b3e07594e3e7d82
#   2005/01/03 20:32:43-08:00 mgreer@mvista.com +0 -0
#   Delete: arch/ppc/boot/simple/gt64260_tty.c
# 
# BitKeeper/deleted/.del-ev64260_setup.c~e8d75ac5d9c1c70e
#   2005/01/03 20:32:43-08:00 mgreer@mvista.com +0 -0
#   Delete: arch/ppc/platforms/ev64260_setup.c
# 
# ChangeSet
#   2005/01/03 20:32:15-08:00 mgreer@mvista.com 
#   [PATCH] ppc32-marvell-host-bridge-support-mv64x60 review fixes
#   
#   Here is an incremental patch [hopefully] with your concerns addressed.
#   Note that the arch/ppc/boot code is not kernel code and only exists for a
#   short period of time before execution jumps to the kernel.
#   
#   Signed-off-by: Mark A. Greer <mgreer@mvista.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/ppc/syslib/mv64x60.c
#   2005/01/03 15:49:18-08:00 mgreer@mvista.com +104 -96
#   ppc32-marvell-host-bridge-support-mv64x60 review fixes
# 
# arch/ppc/syslib/mv64360_pic.c
#   2005/01/03 15:49:18-08:00 mgreer@mvista.com +18 -8
#   ppc32-marvell-host-bridge-support-mv64x60 review fixes
# 
# arch/ppc/syslib/gt64260_pic.c
#   2005/01/03 15:49:18-08:00 mgreer@mvista.com +16 -6
#   ppc32-marvell-host-bridge-support-mv64x60 review fixes
# 
# arch/ppc/boot/simple/mv64x60_tty.c
#   2005/01/03 15:49:18-08:00 mgreer@mvista.com +29 -24
#   ppc32-marvell-host-bridge-support-mv64x60 review fixes
# 
# arch/ppc/boot/include/mpsc_defs.h
#   2005/01/03 15:49:18-08:00 mgreer@mvista.com +146 -0
#   ppc32-marvell-host-bridge-support-mv64x60 review fixes
# 
# arch/ppc/boot/include/mpsc_defs.h
#   2005/01/03 15:49:18-08:00 mgreer@mvista.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/boot/include/mpsc_defs.h
# 
# ChangeSet
#   2005/01/03 20:32:01-08:00 mgreer@mvista.com 
#   [PATCH] ppc32: Marvell host bridge support (mv64x60)
#   
#   This patch adds core support for a line of host bridges from Marvell
#   (formerly Galileo).  This code has been tested with a GT64260a, GT64260b,
#   MV64360, and MV64460.  Patches for platforms that use these bridges will be
#   sent separately.
#   
#   The patch is rather large so a link is provided.
#   
#   Signed-off-by: Mark A. Greer <mgreer@mvista.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-ppc/mv64x60_defs.h
#   2005/01/03 20:31:54-08:00 mgreer@mvista.com +927 -0
# 
# include/asm-ppc/mv64x60.h
#   2005/01/03 20:31:54-08:00 mgreer@mvista.com +343 -0
# 
# arch/ppc/syslib/mv64x60_win.c
#   2005/01/03 20:31:54-08:00 mgreer@mvista.com +1168 -0
# 
# arch/ppc/syslib/mv64x60_dbg.c
#   2005/01/03 20:31:54-08:00 mgreer@mvista.com +123 -0
# 
# arch/ppc/syslib/mv64x60.c
#   2005/01/03 20:31:54-08:00 mgreer@mvista.com +2246 -0
# 
# arch/ppc/syslib/mv64360_pic.c
#   2005/01/03 20:31:54-08:00 mgreer@mvista.com +407 -0
# 
# arch/ppc/boot/simple/mv64x60_tty.c
#   2005/01/03 20:31:54-08:00 mgreer@mvista.com +381 -0
# 
# arch/ppc/boot/simple/mv64x60_stub.c
#   2005/01/03 20:31:54-08:00 mgreer@mvista.com +24 -0
# 
# arch/ppc/boot/simple/misc-mv64x60.S
#   2005/01/03 20:31:54-08:00 mgreer@mvista.com +57 -0
# 
# include/linux/mv643xx.h
#   2005/01/03 15:49:18-08:00 mgreer@mvista.com +49 -0
#   ppc32: Marvell host bridge support (mv64x60)
# 
# include/asm-ppc/mv64x60_defs.h
#   2005/01/03 20:31:54-08:00 mgreer@mvista.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-ppc/mv64x60_defs.h
# 
# include/asm-ppc/mv64x60.h
#   2005/01/03 20:31:54-08:00 mgreer@mvista.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-ppc/mv64x60.h
# 
# arch/ppc/syslib/mv64x60_win.c
#   2005/01/03 20:31:54-08:00 mgreer@mvista.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/syslib/mv64x60_win.c
# 
# arch/ppc/syslib/mv64x60_dbg.c
#   2005/01/03 20:31:54-08:00 mgreer@mvista.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/syslib/mv64x60_dbg.c
# 
# arch/ppc/syslib/mv64x60.c
#   2005/01/03 20:31:54-08:00 mgreer@mvista.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/syslib/mv64x60.c
# 
# arch/ppc/syslib/mv64360_pic.c
#   2005/01/03 20:31:54-08:00 mgreer@mvista.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/syslib/mv64360_pic.c
# 
# arch/ppc/syslib/gt64260_pic.c
#   2005/01/03 15:50:36-08:00 mgreer@mvista.com +164 -87
#   ppc32: Marvell host bridge support (mv64x60)
# 
# arch/ppc/syslib/Makefile
#   2005/01/03 15:50:36-08:00 mgreer@mvista.com +3 -0
#   ppc32: Marvell host bridge support (mv64x60)
# 
# arch/ppc/boot/simple/mv64x60_tty.c
#   2005/01/03 20:31:54-08:00 mgreer@mvista.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/boot/simple/mv64x60_tty.c
# 
# arch/ppc/boot/simple/mv64x60_stub.c
#   2005/01/03 20:31:54-08:00 mgreer@mvista.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/boot/simple/mv64x60_stub.c
# 
# arch/ppc/boot/simple/misc-mv64x60.S
#   2005/01/03 20:31:54-08:00 mgreer@mvista.com +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/boot/simple/misc-mv64x60.S
# 
# arch/ppc/boot/simple/Makefile
#   2005/01/03 15:50:36-08:00 mgreer@mvista.com +3 -2
#   ppc32: Marvell host bridge support (mv64x60)
# 
# arch/ppc/Kconfig
#   2005/01/03 15:50:35-08:00 mgreer@mvista.com +42 -4
#   ppc32: Marvell host bridge support (mv64x60)
# 
# BitKeeper/deleted/.del-gt64260_common.c~ed2987317531dc82
#   2005/01/03 20:31:54-08:00 mgreer@mvista.com +0 -0
#   Delete: arch/ppc/syslib/gt64260_common.c
# 
# ChangeSet
#   2005/01/03 20:20:09-08:00 trini@kernel.crashing.org 
#   [PATCH] ppc32: Switch to KBUILD_DEFCONFIG
#   
#   The following patch switches ppc32 from using arch/ppc/defconfig to
#   arch/ppc/configs/common_defconfig as a defconfig.  These files are supposed
#   to be identical, but always end up out of sync.  This also updates the
#   common_defconfig with current options.
#   
#   Signed-off-by: Tom Rini <trini@kernel.crashing.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/ppc/configs/common_defconfig
#   2005/01/03 15:49:17-08:00 trini@kernel.crashing.org +137 -42
#   ppc32: Switch to KBUILD_DEFCONFIG
# 
# arch/ppc/Makefile
#   2005/01/03 15:50:34-08:00 trini@kernel.crashing.org +3 -0
#   ppc32: Switch to KBUILD_DEFCONFIG
# 
# BitKeeper/deleted/.del-defconfig~924a0ab4bf2d23b6
#   2005/01/03 20:20:02-08:00 trini@kernel.crashing.org +0 -0
#   Delete: arch/ppc/defconfig
# 
# ChangeSet
#   2005/01/03 20:19:56-08:00 galak@somerset.sps.mot.com 
#   [PATCH] ppc32: refactor common book-e exception code
#   
#   Moves common handling of InstructionStorage, Alignment, Program, and
#   Decrementer exceptions handlers for Book-E processors (44x & e500) into
#   common code.
#   
#   Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/ppc/kernel/head_e500.S
#   2005/01/03 15:50:34-08:00 galak@somerset.sps.mot.com +4 -25
#   ppc32: refactor common book-e exception code
# 
# arch/ppc/kernel/head_booke.h
#   2005/01/03 15:49:17-08:00 galak@somerset.sps.mot.com +33 -0
#   ppc32: refactor common book-e exception code
# 
# arch/ppc/kernel/head_44x.S
#   2005/01/03 15:49:17-08:00 galak@somerset.sps.mot.com +4 -23
#   ppc32: refactor common book-e exception code
# 
# ChangeSet
#   2005/01/03 20:19:43-08:00 galak@somerset.sps.mot.com 
#   [PATCH] ppc32: freescale Book-E MMU cleanup
#   
#   Updates the Freescale Book-E MMU usage to match the architecture spec.
#   This is mainly growing the widths of fields in various registers to match
#   the architecture spec instead of the implementation.
#   
#   Signed-off-by: Becky Gill <becky.gill@freescale.com>
#   Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-ppc/mmu.h
#   2005/01/03 15:49:17-08:00 galak@somerset.sps.mot.com +13 -11
#   ppc32: freescale Book-E MMU cleanup
# 
# arch/ppc/mm/fsl_booke_mmu.c
#   2005/01/03 15:49:17-08:00 galak@somerset.sps.mot.com +3 -3
#   ppc32: freescale Book-E MMU cleanup
# 
# arch/ppc/kernel/head_e500.S
#   2005/01/03 15:50:37-08:00 galak@somerset.sps.mot.com +9 -11
#   ppc32: freescale Book-E MMU cleanup
# 
# ChangeSet
#   2005/01/03 20:19:30-08:00 gandalf@netfilter.org 
#   [PATCH] Fix broken RST handling in ip_conntrack
#   
#   Here's a patch that fixes a pretty serious bug introduced by a recent
#   "bugfix".  The problem is that RST packets are ignored if they follow an
#   ACK packet, this means that the timeout of the connection isn't decreased,
#   so we get lots of old connections lingering around until the timeout
#   expires, the default timeout for state ESTABLISHED is 5 days.
#   
#   This needs to go into -bk as soon as possible.  The bug is present in
#   2.6.10 as well.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# net/ipv4/netfilter/ip_conntrack_proto_tcp.c
#   2005/01/03 15:49:17-08:00 gandalf@netfilter.org +2 -1
#   Fix broken RST handling in ip_conntrack
# 
# ChangeSet
#   2005/01/03 20:19:17-08:00 rusty@rustcorp.com.au 
#   [PATCH] netfilter: Fix cleanup in ipt_recent should ipt_registrater_match error
#   
#   When ipt_registrater_match() fails, ipt_recent doesn't remove its proc
#   entry.  Found by nfsim.
#   
#   Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# net/ipv4/netfilter/ipt_recent.c
#   2005/01/03 15:49:17-08:00 rusty@rustcorp.com.au +5 -2
#   netfilter: Fix cleanup in ipt_recent should ipt_registrater_match error
# 
# ChangeSet
#   2005/01/03 20:19:04-08:00 rusty@rustcorp.com.au 
#   [PATCH] netfilter: Remove copy_to_user Warnings in Netfilter
#   
#   After changing firewall rules, we try to return the counters to userspace.  We
#   didn't fail at that point if the copy failed, but it doesn't really matter.
#   Someone added a warn_unused_result attribute to copy_to_user, so we get bogus
#   warnings.
#   
#   Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# net/ipv6/netfilter/ip6_tables.c
#   2005/01/03 15:49:17-08:00 rusty@rustcorp.com.au +4 -3
#   netfilter: Remove copy_to_user Warnings in Netfilter
# 
# net/ipv4/netfilter/ip_tables.c
#   2005/01/03 15:49:17-08:00 rusty@rustcorp.com.au +4 -4
#   netfilter: Remove copy_to_user Warnings in Netfilter
# 
# net/ipv4/netfilter/arp_tables.c
#   2005/01/03 15:49:17-08:00 rusty@rustcorp.com.au +4 -4
#   netfilter: Remove copy_to_user Warnings in Netfilter
# 
# ChangeSet
#   2005/01/03 20:18:48-08:00 rusty@rustcorp.com.au 
#   [PATCH] netfilter: Remove IPCHAINS and IPFWADM compatibility
#   
#   We've been threatening to do this for ages: remove the backwards compatibility
#   code.  We can now combine ip_conntrack_core.c and ip_conntrack_standalone.c,
#   likewise for the NAT code, but that will come later.
#   
#   Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# net/ipv4/netfilter/Makefile
#   2005/01/03 15:49:16-08:00 rusty@rustcorp.com.au +2 -16
#   netfilter: Remove IPCHAINS and IPFWADM compatibility
# 
# net/ipv4/netfilter/Kconfig
#   2005/01/03 15:49:16-08:00 rusty@rustcorp.com.au +1 -26
#   netfilter: Remove IPCHAINS and IPFWADM compatibility
# 
# BitKeeper/deleted/.del-ip_fw_compat_redir.c~71f45a07f87c6c11
#   2005/01/03 20:18:41-08:00 rusty@rustcorp.com.au +0 -0
#   Delete: net/ipv4/netfilter/ip_fw_compat_redir.c
# 
# BitKeeper/deleted/.del-ip_fw_compat_masq.c~2732fae4afde00b
#   2005/01/03 20:18:40-08:00 rusty@rustcorp.com.au +0 -0
#   Delete: net/ipv4/netfilter/ip_fw_compat_masq.c
# 
# BitKeeper/deleted/.del-ip_fw_compat.h~e6b495cea8febf37
#   2005/01/03 20:18:40-08:00 rusty@rustcorp.com.au +0 -0
#   Delete: net/ipv4/netfilter/ip_fw_compat.h
# 
# BitKeeper/deleted/.del-ipfwadm_core.c~1ec6656495906ffe
#   2005/01/03 20:18:39-08:00 rusty@rustcorp.com.au +0 -0
#   Delete: net/ipv4/netfilter/ipfwadm_core.c
# 
# BitKeeper/deleted/.del-ipchains_core.c~ea158d1212825a07
#   2005/01/03 20:18:39-08:00 rusty@rustcorp.com.au +0 -0
#   Delete: net/ipv4/netfilter/ipchains_core.c
# 
# BitKeeper/deleted/.del-ip_fw_compat.c~63568190cfb99895
#   2005/01/03 20:18:39-08:00 rusty@rustcorp.com.au +0 -0
#   Delete: net/ipv4/netfilter/ip_fw_compat.c
# 
# BitKeeper/deleted/.del-ipfwadm_core.h~e011b25dbeb1ed51
#   2005/01/03 20:18:38-08:00 rusty@rustcorp.com.au +0 -0
#   Delete: include/linux/netfilter_ipv4/ipfwadm_core.h
# 
# BitKeeper/deleted/.del-ipchains_core.h~3ab28b61cde4afa2
#   2005/01/03 20:18:38-08:00 rusty@rustcorp.com.au +0 -0
#   Delete: include/linux/netfilter_ipv4/ipchains_core.h
# 
# BitKeeper/deleted/.del-compat_firewall.h~7ef67ef6a7f02b90
#   2005/01/03 20:18:38-08:00 rusty@rustcorp.com.au +0 -0
#   Delete: include/linux/netfilter_ipv4/compat_firewall.h
# 
# ChangeSet
#   2005/01/03 20:18:31-08:00 rusty@rustcorp.com.au 
#   [PATCH] netfilter: Add comment above remove_expectations in destroy_conntrack()
#   
#   I removed this code in a previous patch, and Patrick McHardy explained
#   what was wrong.  Add a comment.
#   
#   Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# net/ipv4/netfilter/ip_conntrack_core.c
#   2005/01/03 15:49:16-08:00 rusty@rustcorp.com.au +4 -1
#   netfilter: Add comment above remove_expectations in destroy_conntrack()
# 
# ChangeSet
#   2005/01/03 20:18:18-08:00 rusty@rustcorp.com.au 
#   [PATCH] netfilter: Fix ip_ct_selective_cleanup(), and rename ip_ct_iterate_cleanup()
#   
#   Several places use ip_ct_selective_cleanup() as a general iterator, which it
#   was not intended for (it takes a const ip_conntrack *).  So rename it, and
#   make it take a non-const argument.
#   
#   Also, it missed unconfirmed connections, which aren't in the hash table.  This
#   introduces a potential problem for users which expect to iterate all
#   connections (such as the helper deletion code).  So keep a linked list of
#   unconfirmed connections as well.
#   
#   Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# net/ipv4/netfilter/ipt_MASQUERADE.c
#   2005/01/03 15:49:16-08:00 rusty@rustcorp.com.au +3 -3
#   netfilter: Fix ip_ct_selective_cleanup(), and rename ip_ct_iterate_cleanup()
# 
# net/ipv4/netfilter/ip_nat_helper.c
#   2005/01/03 15:49:16-08:00 rusty@rustcorp.com.au +2 -2
#   netfilter: Fix ip_ct_selective_cleanup(), and rename ip_ct_iterate_cleanup()
# 
# net/ipv4/netfilter/ip_nat_core.c
#   2005/01/03 15:49:16-08:00 rusty@rustcorp.com.au +3 -3
#   netfilter: Fix ip_ct_selective_cleanup(), and rename ip_ct_iterate_cleanup()
# 
# net/ipv4/netfilter/ip_conntrack_standalone.c
#   2005/01/03 15:49:16-08:00 rusty@rustcorp.com.au +3 -3
#   netfilter: Fix ip_ct_selective_cleanup(), and rename ip_ct_iterate_cleanup()
# 
# net/ipv4/netfilter/ip_conntrack_core.c
#   2005/01/03 15:50:38-08:00 rusty@rustcorp.com.au +39 -15
#   netfilter: Fix ip_ct_selective_cleanup(), and rename ip_ct_iterate_cleanup()
# 
# include/linux/netfilter_ipv4/ip_conntrack.h
#   2005/01/03 15:49:16-08:00 rusty@rustcorp.com.au +3 -3
#   netfilter: Fix ip_ct_selective_cleanup(), and rename ip_ct_iterate_cleanup()
# 
# ChangeSet
#   2005/01/03 20:18:05-08:00 rusty@rustcorp.com.au 
#   [PATCH] netfilter: Fix ip_conntrack_proto_sctp exit on sysctl fail
#   
#   On failure from register_sysctl_table, we return with exit 0.  Oops.  init and
#   fini should also be static.  nfsim found these.
#   
#   Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# net/ipv4/netfilter/ip_conntrack_proto_sctp.c
#   2005/01/03 15:49:16-08:00 rusty@rustcorp.com.au +3 -2
#   netfilter: Fix ip_conntrack_proto_sctp exit on sysctl fail
# 
# ChangeSet
#   2005/01/03 20:17:52-08:00 rusty@rustcorp.com.au 
#   [PATCH] netfilter: fix return values of ipt_recent checkentry
#   
#   Peejix's nfsim test for ipt_recent, written two days ago, revealed this bugs
#   with ipt_recent: checkentry() returns true or false, not an error.  (Maybe it
#   should, but that's a much larger change).  Also, make hash_func() static.
#   
#   Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# net/ipv4/netfilter/ipt_recent.c
#   2005/01/03 15:50:37-08:00 rusty@rustcorp.com.au +9 -9
#   netfilter: fix return values of ipt_recent checkentry
# 
# ChangeSet
#   2005/01/03 20:17:39-08:00 bcasavan@sgi.com 
#   [PATCH] TCP hashes: NUMA interleaving
#   
#   Modifies the TCP ehash and TCP bhash to enable the use of vmalloc to
#   alleviate boottime memory allocation imbalances on NUMA systems, utilizing
#   flags to the alloc_large_system_hash routine in order to centralize the
#   enabling of this behavior.
#   
#   Signed-off-by: Brent Casavant <bcasavan@sgi.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# net/ipv4/tcp.c
#   2005/01/03 15:49:16-08:00 bcasavan@sgi.com +29 -33
#   TCP hashes: NUMA interleaving
# 
# ChangeSet
#   2005/01/03 20:17:25-08:00 bcasavan@sgi.com 
#   [PATCH] filesystem hashes: NUMA interleaving
#   
#   The following patch modifies the dentry cache and inode cache to enable the
#   use of vmalloc to alleviate boottime memory allocation imbalances on NUMA
#   systems, utilizing flags to the alloc_large_system_hash routine in order to
#   centralize the enabling of this behavior.
#   
#   In general, for each hash, we check at the early allocation point whether
#   hash distribution is enabled, and if so we defer allocation.  At the late
#   allocation point we perform the allocation if it was not earlier deferred. 
#   These late allocation points are the same points utilized prior to the
#   addition of alloc_large_system_hash to the kernel.
#   
#   Signed-off-by: Brent Casavant <bcasavan@sgi.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/inode.c
#   2005/01/03 15:49:16-08:00 bcasavan@sgi.com +25 -0
#   filesystem hashes: NUMA interleaving
# 
# fs/dcache.c
#   2005/01/03 15:49:16-08:00 bcasavan@sgi.com +25 -0
#   filesystem hashes: NUMA interleaving
# 
# ChangeSet
#   2005/01/03 20:17:12-08:00 bcasavan@sgi.com 
#   [PATCH] alloc_large_system_hash: NUMA interleaving
#   
#   NUMA systems running current Linux kernels suffer from substantial inequities
#   in the amount of memory allocated from each NUMA node during boot.  In
#   particular, several large hashes are allocated using alloc_bootmem, and as
#   such are allocated contiguously from a single node each.
#   
#   This becomes a problem for certain workloads that are relatively common on
#   big-iron HPC NUMA systems.  In particular, a number of MPI and OpenMP
#   applications which require nearly all available processors in the system and
#   nearly all the memory on each node run into difficulties.  Due to the uneven
#   memory distribution onto a few nodes, any thread on those nodes will require a
#   portion of its memory be allocated from remote nodes.  Any access to those
#   memory locations will be slower than local accesses, and thereby slows down
#   the effective computation rate for the affected CPUs/threads.  This problem is
#   further amplified if the application is tightly synchronized between threads
#   (as is often the case), as they entire job can run only at the speed of the
#   slowest thread.
#   
#   Additionally since these hashes are usually accessed by all CPUS in the
#   system, the NUMA network link on the node which hosts the hash experiences
#   disproportionate traffic levels, thereby reducing the memory bandwidth
#   available to that node's CPUs, and further penalizing performance of the
#   threads executed thereupon.
#   
#   As such, it is desired to find a way to distribute these large hash
#   allocations more evenly across NUMA nodes.  Fortunately current kernels do
#   perform allocation interleaving for vmalloc() during boot, which provides a
#   stepping stone to a solution.
#   
#   This series of patches enables (but does not require) the kernel to allocate
#   several boot time hashes using vmalloc rather than alloc_bootmem, thereby
#   causing the hashes to be interleaved amongst NUMA nodes.  In particular the
#   dentry cache, inode cache, TCP ehash, and TCP bhash have been changed to be
#   allocated in this manner.  Due to the limited vmalloc space on architectures
#   such as i386, this behavior is turned on by default only for IA64 NUMA systems
#   (though there is no reason other interested architectures could not enable it
#   if desired).  Non-IA64 and non-NUMA systems continue to use the existing
#   alloc_bootmem() allocation mechanism.  A boot line parameter "hashdist" can be
#   set to override the default behavior.
#   
#   The following two sets of example output show the uneven distribution just
#   after boot, using init=/bin/sh to eliminate as much non-kernel allocation as
#   possible.
#   
#   Without the boot hash distribution patches:
#   
#    Nid  MemTotal   MemFree   MemUsed      (in kB)
#      0   3870656   3697696    172960
#      1   3882992   3866656     16336
#      2   3883008   3866784     16224
#      3   3882992   3866464     16528
#      4   3883008   3866592     16416
#      5   3883008   3866720     16288
#      6   3882992   3342176    540816
#      7   3883008   3865440     17568
#      8   3882992   3866560     16432
#      9   3883008   3866400     16608
#     10   3882992   3866592     16400
#     11   3883008   3866400     16608
#     12   3882992   3866400     16592
#     13   3883008   3866432     16576
#     14   3883008   3866528     16480
#     15   3864768   3848256     16512
#    ToT  62097440  61152096    945344
#   
#   Notice that nodes 0 and 6 have a substantially larger memory utilization
#   than all other nodes.
#   
#   With the boot hash distribution patch:
#   
#    Nid  MemTotal   MemFree   MemUsed      (in kB)
#      0   3870656   3789792     80864
#      1   3882992   3843776     39216
#      2   3883008   3843808     39200
#      3   3882992   3843904     39088
#      4   3883008   3827488     55520
#      5   3883008   3843712     39296
#      6   3882992   3843936     39056
#      7   3883008   3844096     38912
#      8   3882992   3843712     39280
#      9   3883008   3844000     39008
#     10   3882992   3843872     39120
#     11   3883008   3843872     39136
#     12   3882992   3843808     39184
#     13   3883008   3843936     39072
#     14   3883008   3843712     39296
#     15   3864768   3825760     39008
#    ToT  62097440  61413184    684256
#   
#   While not perfectly even, we can see that there is a substantial improvement
#   in the spread of memory allocated by the kernel during boot.  The remaining
#   uneveness may be due in part to further boot time allocations that could be
#   addressed in a similar manner, but some difference is due to the somewhat
#   special nature of node 0 during boot.  However the uneveness has fallen to a
#   much more acceptable level (at least to a level that SGI isn't concerned
#   about).
#   
#   The astute reader will also notice that in this example, with this patch
#   approximately 256 MB less memory was allocated during boot.  This is due to
#   the size limits of a single vmalloc.  More specifically, this is because the
#   automatically computed size of the TCP ehash exceeds the maximum size which a
#   single vmalloc can accomodate.  However this is of little practical concern as
#   the vmalloc size limit simply reduces one ridiculously large allocation
#   (512MB) to a slightly less ridiculously large allocation (256MB).  In practice
#   machines with large memory configurations are using the thash_entries setting
#   to limit the size of the TCP ehash _much_ lower than either of the
#   automatically computed values.  Illustrative of the exceedingly large nature
#   of the automatically computed size, SGI currently recommends that customers
#   boot with thash_entries=2097152, which works out to a 32MB allocation.  In any
#   case, setting hashdist=0 will allow for allocations in excess of vmalloc
#   limits, if so desired.
#   
#   Other than the vmalloc limit, great care was taken to ensure that the size of
#   TCP hash allocations was not altered by this patch.  Due to slightly different
#   computation techniques between the existing TCP code and
#   alloc_large_system_hash (which is now utilized), some of the magic constants
#   in the TCP hash allocation code were changed.  On all sizes of system (128MB
#   through 64GB) that I had access to, the patched code preserves the previous
#   hash size, as long as the vmalloc limit (256MB on IA64) is not encountered.
#   
#   There was concern that changing the TCP-related hashes to use vmalloc space
#   may adversely impact network performance.  To this end the netperf set of
#   benchmarks was run.  Some individual tests seemed to benefit slightly, some
#   seemed to be harmed slightly, but in all cases the average difference with and
#   without these patches was well within the variabilty I would see from run to
#   run.
#   
#   The following is the overall netperf averages (30 10 second runs each) against
#   an older kernel with these same patches.  These tests were run over loopback
#   as GigE results were so inconsistent run to run both with and without these
#   patches that they provided no meaningful comparison that I could discern.  I
#   used the same kernel (IA64 generic) for each run, simply varying the new
#   "hashdist" boot parameter to turn on or off the new allocation behavior.  In
#   all cases the thash_entries value was manually specified as discussed
#   previously to eliminate any variability that might result from that size
#   difference.
#   
#   HP ZX1, hashdist=0
#   ==================
#   TCP_RR = 19389
#   TCP_MAERTS = 6561 
#   TCP_STREAM = 6590 
#   TCP_CC = 9483
#   TCP_CRR = 8633 
#   
#   HP ZX1, hashdist=1
#   ==================
#   TCP_RR = 19411
#   TCP_MAERTS = 6559 
#   TCP_STREAM = 6584 
#   TCP_CC = 9454
#   TCP_CRR = 8626 
#   
#   SGI Altix, hashdist=0
#   =====================
#   TCP_RR = 16871
#   TCP_MAERTS = 3925 
#   TCP_STREAM = 4055 
#   TCP_CC = 8438
#   TCP_CRR = 7750 
#   
#   SGI Altix, hashdist=1
#   =====================
#   TCP_RR = 17040
#   TCP_MAERTS = 3913 
#   TCP_STREAM = 4044 
#   TCP_CC = 8367
#   TCP_CRR = 7538 
#   
#   I believe the TCP_CC and TCP_CRR are the tests most sensitive to this
#   particular change.  But again, I want to emphasize that even the differences
#   you see above are _well_ within the variability I saw from run to run of any
#   given test.
#   
#   In addition, Jose Santos at IBM has run specSFS, which has been particularly
#   sensitive to TLB issues, against these patches and saw no performance
#   degredation (differences down in the noise).
#   
#   
#   
#   This patch:
#   
#   Modifies alloc_large_system_hash to enable the use of vmalloc to alleviate
#   boottime allocation imbalances on NUMA systems.
#   
#   Due to limited vmalloc space on some architectures (i.e.  x86), the use of
#   vmalloc is enabled by default only on NUMA IA64 kernels.  There should be
#   no problem enabling this change for any other interested NUMA architecture.
#   
#   Signed-off-by: Brent Casavant <bcasavan@sgi.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# mm/page_alloc.c
#   2005/01/03 15:50:23-08:00 bcasavan@sgi.com +36 -9
#   alloc_large_system_hash: NUMA interleaving
# 
# include/linux/bootmem.h
#   2005/01/03 15:49:15-08:00 bcasavan@sgi.com +17 -2
#   alloc_large_system_hash: NUMA interleaving
# 
# fs/inode.c
#   2005/01/03 15:50:38-08:00 bcasavan@sgi.com +3 -2
#   alloc_large_system_hash: NUMA interleaving
# 
# fs/dcache.c
#   2005/01/03 15:50:38-08:00 bcasavan@sgi.com +3 -2
#   alloc_large_system_hash: NUMA interleaving
# 
# Documentation/kernel-parameters.txt
#   2005/01/03 15:49:15-08:00 bcasavan@sgi.com +5 -0
#   alloc_large_system_hash: NUMA interleaving
# 
# ChangeSet
#   2005/01/03 20:16:59-08:00 alex.williamson@hp.com 
#   [PATCH] collect page_states only from online cpus
#   
#   I noticed the function __read_page_state() curiously high in a q-tools
#   profile of a write to a software raid0 device.  Seems this is because we're
#   checking page_states for all possible cpus and we have NR_CPUS possible
#   when CONFIG_HOTPLUG_CPU=y.  The default config for ia64 is now NR_CPUS=512,
#   so on a little 8-way box, this is a significant waste of time.  The patch
#   below updates __read_page_state() and __get_page_state() to only count
#   page_state info for online cpus.  To keep the stats consistent, the
#   page_alloc notifier is updated to move page_states off of the cpu going
#   offline.  On my profile, this dropped __read_page_state() back into the
#   noise and boosted block write performance by 5% (as measured by spew -
#   http://spew.berlios.de).
#   
#   Signed-off-by: Alex Williamson <alex.williamson@hp.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# mm/page_alloc.c
#   2005/01/03 15:50:39-08:00 alex.williamson@hp.com +22 -11
#   collect page_states only from online cpus
# 
# ChangeSet
#   2005/01/03 20:16:46-08:00 manfred@colorfullife.com 
#   [PATCH] slab: Add more arch overrides to control object alignment
#   
#   Add ARCH_SLAB_MINALIGN and document ARCH_KMALLOC_MINALIGN: The flags allow
#   the arch code to override the default minimum object aligment
#   (BYTES_PER_WORD).
#   
#   Signed-Off-By: Manfred Spraul <manfred@colorfullife.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# mm/slab.c
#   2005/01/03 15:49:15-08:00 manfred@colorfullife.com +55 -25
#   slab: Add more arch overrides to control object alignment
# 
# ChangeSet
#   2005/01/03 20:16:33-08:00 akpm@osdl.org 
#   [PATCH] do_anonymous_page() use SetPageReferenced
#   
#   mark_page_accessed() is more heavyweight than we need: the page is already
#   headed for the active list, so setting the software-referenced bit is
#   equivalent.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# mm/memory.c
#   2005/01/03 15:49:15-08:00 akpm@osdl.org +1 -1
#   do_anonymous_page() use SetPageReferenced
# 
# ChangeSet
#   2005/01/03 20:16:19-08:00 miquels@cistron.nl 
#   [PATCH] mark_page_accessed() for read()s on non-page boundaries
#   
#   When reading a (partial) page from disk using read(), the kernel only marks
#   the page as "accessed" if the read started at a page boundary.  This means
#   that files that are accessed randomly at non-page boundaries (usually
#   database style files) will not be cached properly.
#   
#   The patch below uses the readahead state instead.  If a page is read(), it
#   is marked as "accessed" if the previous read() was for a different page,
#   whatever the offset in the page.
#   
#   Testing results:
#   
#   
#   - Boot kernel with mem=128M
#   
#   - create a testfile of size 8 MB on a partition. Unmount/mount.
#   
#   - then generate about 10 MB/sec streaming writes
#   
#   	for i in `seq 1 1000`
#   	do
#   		dd if=/dev/zero of=junkfile.$i bs=1M count=10
#   		sync
#   		cat junkfile.$i > /dev/null
#   		sleep 1
#   	done
#   
#   - use an application that reads 128 bytes 64000 times from a
#     random offset in the 64 MB testfile.
#   
#   1. Linux 2.6.10-rc3 vanilla, no streaming writes:
#   
#   # time ~/rr testfile
#   Read 128 bytes 64000 times
#   ~/rr testfile  0.03s user 0.22s system 5% cpu 4.456 total
#   
#   2. Linux 2.6.10-rc3 vanilla, streaming writes:
#   
#   # time ~/rr testfile
#   Read 128 bytes 64000 times
#   ~/rr testfile  0.03s user 0.16s system 2% cpu 7.667 total
#   # time ~/rr testfile
#   Read 128 bytes 64000 times
#   ~/rr testfile  0.03s user 0.37s system 1% cpu 23.294 total
#   # time ~/rr testfile
#   Read 128 bytes 64000 times
#   ~/rr testfile  0.02s user 0.99s system 1% cpu 1:11.52 total
#   # time ~/rr testfile
#   Read 128 bytes 64000 times
#   ~/rr testfile  0.03s user 0.21s system 2% cpu 10.273 total
#   
#   3. Linux 2.6.10-rc3 with read-page-access.patch , streaming writes:
#   
#   # time ~/rr testfile
#   Read 128 bytes 64000 times
#   ~/rr testfile  0.02s user 0.21s system 3% cpu 7.634 total
#   # time ~/rr testfile
#   Read 128 bytes 64000 times
#   ~/rr testfile  0.04s user 0.22s system 2% cpu 9.588 total
#   # time ~/rr testfile
#   Read 128 bytes 64000 times
#   ~/rr testfile  0.02s user 0.12s system 24% cpu 0.563 total
#   # time ~/rr testfile
#   Read 128 bytes 64000 times
#   ~/rr testfile  0.03s user 0.13s system 98% cpu 0.163 total
#   
#   As expected, with the read-page-access.patch, the kernel keeps the 8 MB
#   testfile cached as expected, while without it, it doesn't.
#   
#   So this is useful for workloads where one smallish (wrt RAM) file is read
#   randomly over and over again (like heavily used database indexes), while
#   other I/O is going on.  Plain 2.6 caches those files poorly, if the app
#   uses plain read().
#   
#   Signed-Off-By: Miquel van Smoorenburg <miquels@cistron.nl>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# mm/readahead.c
#   2005/01/03 15:49:15-08:00 miquels@cistron.nl +2 -0
#   mark_page_accessed() for read()s on non-page boundaries
# 
# mm/filemap.c
#   2005/01/03 15:49:15-08:00 miquels@cistron.nl +3 -2
#   mark_page_accessed() for read()s on non-page boundaries
# 
# ChangeSet
#   2005/01/03 20:16:04-08:00 haveblue@us.ibm.com 
#   [PATCH] make sure ioremap only tests valid addresses
#   
#   When CONFIG_HIGHMEM=y, but ZONE_NORMAL isn't quite full, there is, of
#   course, no actual memory at *high_memory.  This isn't a problem with normal
#   virt<->phys translations because it's never dereferenced, but
#   CONFIG_NONLINEAR is a bit more finicky.  So, don't do virt_to_phys() to
#   non-existent addresses.
#   
#   Signed-off-by: Dave Hansen <haveblue@us.ibm.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/i386/mm/ioremap.c
#   2005/01/03 15:49:15-08:00 haveblue@us.ibm.com +3 -3
#   make sure ioremap only tests valid addresses
# 
# ChangeSet
#   2005/01/03 20:15:51-08:00 haveblue@us.ibm.com 
#   [PATCH] kill off highmem_start_page
#   
#   People love to do comparisons with highmem_start_page.  However, where
#   CONFIG_HIGHMEM=y and there is no actual highmem, there's no real page at
#   *highmem_start_page.
#   
#   That's usually not a problem, but CONFIG_NONLINEAR is a bit more strict and
#   catches the bogus address tranlations. 
#   
#   There are about a gillion different ways to find out of a 'struct page' is
#   highmem or not.  Why not just check page_flags?  Just use PageHighMem()
#   wherever there used to be a highmem_start_page comparison.  Then, kill off
#   highmem_start_page.
#   
#   This removes more code than it adds, and gets rid of some nasty
#   #ifdefs in .c files.
#   
#   Signed-off-by: Dave Hansen <haveblue@us.ibm.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# net/core/dev.c
#   2005/01/03 15:49:15-08:00 haveblue@us.ibm.com +1 -1
#   kill off highmem_start_page
# 
# mm/memory.c
#   2005/01/03 15:50:39-08:00 haveblue@us.ibm.com +0 -2
#   kill off highmem_start_page
# 
# include/linux/highmem.h
#   2005/01/03 15:49:15-08:00 haveblue@us.ibm.com +0 -2
#   kill off highmem_start_page
# 
# include/asm-sparc/highmem.h
#   2005/01/03 15:49:15-08:00 haveblue@us.ibm.com +2 -2
#   kill off highmem_start_page
# 
# include/asm-ppc/highmem.h
#   2005/01/03 15:49:15-08:00 haveblue@us.ibm.com +3 -3
#   kill off highmem_start_page
# 
# arch/um/kernel/mem.c
#   2005/01/03 15:50:18-08:00 haveblue@us.ibm.com +0 -2
#   kill off highmem_start_page
# 
# arch/sparc/mm/init.c
#   2005/01/03 15:49:15-08:00 haveblue@us.ibm.com +0 -2
#   kill off highmem_start_page
# 
# arch/sparc/mm/highmem.c
#   2005/01/03 15:49:15-08:00 haveblue@us.ibm.com +1 -1
#   kill off highmem_start_page
# 
# arch/ppc/mm/init.c
#   2005/01/03 15:49:15-08:00 haveblue@us.ibm.com +0 -1
#   kill off highmem_start_page
# 
# arch/mips/mm/init.c
#   2005/01/03 15:49:15-08:00 haveblue@us.ibm.com +0 -1
#   kill off highmem_start_page
# 
# arch/mips/mm/highmem.c
#   2005/01/03 15:49:15-08:00 haveblue@us.ibm.com +3 -3
#   kill off highmem_start_page
# 
# arch/i386/mm/pageattr.c
#   2005/01/03 15:49:15-08:00 haveblue@us.ibm.com +1 -4
#   kill off highmem_start_page
# 
# arch/i386/mm/init.c
#   2005/01/03 15:50:32-08:00 haveblue@us.ibm.com +0 -1
#   kill off highmem_start_page
# 
# arch/i386/mm/highmem.c
#   2005/01/03 15:49:15-08:00 haveblue@us.ibm.com +3 -3
#   kill off highmem_start_page
# 
# arch/i386/mm/discontig.c
#   2005/01/03 15:49:15-08:00 haveblue@us.ibm.com +0 -5
#   kill off highmem_start_page
# 
# ChangeSet
#   2005/01/03 20:15:37-08:00 Andries.Brouwer@cwi.nl 
#   [PATCH] mm: overcommit updates
#   
#   Alan made overcommit mode 2 and it doesnt work at all.  A process passing
#   the limit often does so at a moment of stack extension, and is killed by a
#   segfault, not better than being OOM-killed.
#   
#   Another problem is that close to the edge no other processes can be
#   started, so that a sysadmin has problems logging in and investigating.
#   
#   Below a patch that does 3 things:
#   
#   (1) It reserves a reasonable amount of virtual stack space (amount
#       randomly chosen, no guarantees given) when the process is started, so
#       that the common utilities will not be killed by segfault on stack
#       extension.
#   
#   (2) It reserves a reasonable amount of virtual memory for root, so that
#       root can do things when the system is out-of-memory
#   
#   (3) It limits a single process to 97% of what is left, so that also an
#       ordinary user is able to use getty, login, bash, ps, kill and similar
#       things when one of her processes got out of control.
#   
#   Since the current overcommit mode 2 is not really useful, I did not give
#   this a new number.
#   
#   The patch is just for playing, not to be applied by Linus.  But, Andrew, I
#   hope that you would be willing to put this in -mm so that people can
#   experiment.  Of course it only does something if one sets overcommit mode
#   to 2.
#   
#   The past month I have pressured people asking for feedback, and now have
#   about a dozen reports, mostly positive, one very positive.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# security/dummy.c
#   2005/01/03 15:49:14-08:00 Andries.Brouwer@cwi.nl +8 -0
#   mm: overcommit updates
# 
# security/commoncap.c
#   2005/01/03 15:49:14-08:00 Andries.Brouwer@cwi.nl +8 -0
#   mm: overcommit updates
# 
# fs/exec.c
#   2005/01/03 15:49:14-08:00 Andries.Brouwer@cwi.nl +11 -8
#   mm: overcommit updates
# 
# ChangeSet
#   2005/01/03 20:15:21-08:00 andrea@novell.com 
#   [PATCH] mempolicy optimisation
#   
#   Some optimizations in mempolicy.c (like to avoid rebalancing the tree while
#   destroying it and by breaking loops early and not checking for invariant
#   conditions in the replace operation).
#   
#   Signed-off-by: Andrea Arcangeli <andrea@novell.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# mm/mempolicy.c
#   2005/01/03 15:49:14-08:00 andrea@novell.com +4 -6
#   mempolicy optimisation
# 
# ChangeSet
#   2005/01/03 20:15:08-08:00 linuxram@us.ibm.com 
#   [PATCH] Simplified readahead congestion control
#   
#   Reinstate the feature wherein readahead will be bypassed if the underlying
#   queue is read-congersted.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# mm/readahead.c
#   2005/01/03 15:50:39-08:00 linuxram@us.ibm.com +92 -32
#   Simplified readahead congestion control
# 
# ChangeSet
#   2005/01/03 20:14:55-08:00 slpratt@austin.ibm.com 
#   [PATCH] Simplified readahead
#   
#   With Ram Pai <linuxram@us.ibm.com>
#   
#   - request size is now passed into page_cache_readahead.  This allows the
#     removal of the size averaging code in the current readahead logic.
#   
#   - readahead rampup is now faster  (especially for larger request sizes)
#   
#   - No longer "slow read path".  Readahead is turn off at first random access,
#     turned back on at first sequential access.
#   
#   - Code now handles thrashing, slowly reducing readahead window until
#     thrashing stops, or min size reached.
#   
#   - Returned to old behavior where first access is assumed sequential only if
#     at offset 0.
#   
#   - designed to handle larger (1M or above) window sizes efficiently
#   
#   
#   Benchmark results:
#   
#   machine 1: 8 way pentiumIV 1GB memory, tests run to 36GB SCSI disk
#   (Similar results were seen on a 1 way 866Mhz box with IDE disk.)
#   
#   TioBench:
#   
#   tiobench.pl --dir /mnt/tmp --block 4096 --size 4000 --numruns 2 --threads 1(4,16,64)
#   
#   4k request size sequential read results in MB/sec
#   
#     Threads         2.6.9    w/patches    %diff         diff
# 
# mm/readahead.c
#   2005/01/03 15:50:40-08:00 slpratt@austin.ibm.com +181 -240
#   Simplified readahead
# 
# mm/filemap.c
#   2005/01/03 15:50:39-08:00 slpratt@austin.ibm.com +15 -4
#   Simplified readahead
# 
# include/linux/mm.h
#   2005/01/03 15:49:14-08:00 slpratt@austin.ibm.com +5 -2
#   Simplified readahead
# 
# include/linux/fs.h
#   2005/01/03 15:49:14-08:00 slpratt@austin.ibm.com +4 -3
#   Simplified readahead
# 
# ChangeSet
#   2005/01/03 20:14:42-08:00 nickpiggin@yahoo.com.au 
#   [PATCH] mm: teach kswapd about higher order areas
#   
#   Teach kswapd to free memory on behalf of higher order allocators.  This
#   could be important for higher order atomic allocations because they
#   otherwise have no means to free the memory themselves.
#   
#   Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# mm/vmscan.c
#   2005/01/03 15:49:14-08:00 nickpiggin@yahoo.com.au +31 -8
#   mm: teach kswapd about higher order areas
# 
# mm/page_alloc.c
#   2005/01/03 15:50:39-08:00 nickpiggin@yahoo.com.au +2 -1
#   mm: teach kswapd about higher order areas
# 
# include/linux/mmzone.h
#   2005/01/03 15:49:14-08:00 nickpiggin@yahoo.com.au +3 -2
#   mm: teach kswapd about higher order areas
# 
# ChangeSet
#   2005/01/03 20:14:29-08:00 nickpiggin@yahoo.com.au 
#   [PATCH] mm: higher order watermarks
#   
#   Move the watermark checking code into a single function.  Extend it to
#   account for the order of the allocation and the number of free pages that
#   could satisfy such a request.
#   
#   From: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
#   
#   Fix typo in Nick's kswapd-high-order awareness patch
#   
#   Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# mm/page_alloc.c
#   2005/01/03 15:50:40-08:00 nickpiggin@yahoo.com.au +39 -19
#   mm: higher order watermarks
# 
# include/linux/mmzone.h
#   2005/01/03 15:50:40-08:00 nickpiggin@yahoo.com.au +2 -0
#   mm: higher order watermarks
# 
# ChangeSet
#   2005/01/03 20:14:14-08:00 nickpiggin@yahoo.com.au 
#   [PATCH] mm: keep count of free areas
#   
#   Keep track of the number of free pages of each order in the buddy allocator.
#   
#   Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# mm/page_alloc.c
#   2005/01/03 15:50:40-08:00 nickpiggin@yahoo.com.au +9 -14
#   mm: keep count of free areas
# 
# include/linux/mmzone.h
#   2005/01/03 15:50:40-08:00 nickpiggin@yahoo.com.au +1 -0
#   mm: keep count of free areas
# 
# ChangeSet
#   2005/01/03 20:14:02-08:00 rjmx@rjmx.net 
#   [PATCH] CS461x gameport code isn't being included in build
#   
#   With Cal Peake <cp@absolutedigital.net>
#   
#   I've found a typo in drivers/input/gameport/Makefile in kernel 2.6.9 which
#   effectively prevents the CS461x gameport code from being included.
#   
#   Signed-off-by: Ron Murray <rjmx@rjmx.net>
#   Signed-off-by: Cal Peake <cp@absolutedigital.net>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/input/gameport/Makefile
#   2005/01/03 15:49:13-08:00 rjmx@rjmx.net +1 -1
#   CS461x gameport code isn't being included in build
# 
# ChangeSet
#   2005/01/03 20:13:49-08:00 akpm@osdl.org 
#   [PATCH] vmscan: total_scanned fix
#   
#   We haven't been incrementing local variable total_scanned since the
#   scan_control stuff went in.  That broke kswapd throttling.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# mm/vmscan.c
#   2005/01/03 15:50:40-08:00 akpm@osdl.org +1 -0
#   vmscan: total_scanned fix
# 
# ChangeSet
#   2005/01/03 20:13:31-08:00 jack@suse.cz 
#   [PATCH] Allow disabling quota messages to console
#   
#   Allow disabling of quota messages to console (they can disturb other
#   output).
#   
#   Signed-off-by: Jan Kara <jack@suse.cz>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/sysctl.h
#   2005/01/03 15:50:31-08:00 jack@suse.cz +2 -1
#   Allow disabling quota messages to console
# 
# fs/dquot.c
#   2005/01/03 15:49:13-08:00 jack@suse.cz +14 -0
#   Allow disabling quota messages to console
# 
# ChangeSet
#   2005/01/03 20:13:18-08:00 jack@suse.cz 
#   [PATCH] Fix of quota deadlock on pagelock: reiserfs
#   
#   Implement quota journaling and quota reading and writing functions for
#   reiserfs.  Solves also several other deadlocks possible for reiserfs due to
#   the lock inversion on journal_begin and quota locks.
#   
#   From: Vladimir Saveliev <vs@namesys.com>
#   
#   When CONFIG_QUOTA is defined reiserfs's finish_unfinished sets and clears
#   MS_ACTIVE bit in s_flags field of super block.  If that bit was set already
#   it should not be set.
#   
#   Signed-off-by: Jan Kara <jack@suse.cz>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/reiserfs_fs_sb.h
#   2005/01/03 15:49:13-08:00 jack@suse.cz +4 -0
#   Fix of quota deadlock on pagelock: reiserfs
# 
# include/linux/reiserfs_fs.h
#   2005/01/03 15:49:13-08:00 jack@suse.cz +16 -0
#   Fix of quota deadlock on pagelock: reiserfs
# 
# fs/reiserfs/super.c
#   2005/01/03 15:49:13-08:00 jack@suse.cz +410 -5
#   Fix of quota deadlock on pagelock: reiserfs
# 
# fs/reiserfs/namei.c
#   2005/01/03 15:49:13-08:00 jack@suse.cz +27 -33
#   Fix of quota deadlock on pagelock: reiserfs
# 
# fs/reiserfs/inode.c
#   2005/01/03 15:49:13-08:00 jack@suse.cz +37 -17
#   Fix of quota deadlock on pagelock: reiserfs
# 
# fs/reiserfs/file.c
#   2005/01/03 15:49:13-08:00 jack@suse.cz +3 -3
#   Fix of quota deadlock on pagelock: reiserfs
# 
# ChangeSet
#   2005/01/03 20:13:03-08:00 jack@suse.cz 
#   [PATCH] Fix of quota deadlock on pagelock: ext3
#   
#   Implementation of quota reading and writing functions for ext3.
#   
#   Signed-off-by: Jan Kara <jack@suse.cz>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/ext3_jbd.h
#   2005/01/03 15:49:13-08:00 jack@suse.cz +2 -0
#   Fix of quota deadlock on pagelock: ext3
# 
# fs/ext3/super.c
#   2005/01/03 15:49:13-08:00 jack@suse.cz +132 -31
#   Fix of quota deadlock on pagelock: ext3
# 
# fs/ext3/inode.c
#   2005/01/03 15:49:13-08:00 jack@suse.cz +1 -1
#   Fix of quota deadlock on pagelock: ext3
# 
# ChangeSet
#   2005/01/03 20:12:49-08:00 jack@suse.cz 
#   [PATCH] Fix of quota deadlock on pagelock: ext2
#   
#   Implementation of quota reading and writing functions for ext2.
#   
#   Signed-off-by: Jan Kara <jack@suse.cz>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/ext2/super.c
#   2005/01/03 15:49:13-08:00 jack@suse.cz +114 -0
#   Fix of quota deadlock on pagelock: ext2
# 
# fs/ext2/inode.c
#   2005/01/03 15:49:13-08:00 jack@suse.cz +1 -1
#   Fix of quota deadlock on pagelock: ext2
# 
# fs/ext2/ext2.h
#   2005/01/03 15:49:13-08:00 jack@suse.cz +1 -0
#   Fix of quota deadlock on pagelock: ext2
# 
# ChangeSet
#   2005/01/03 20:12:36-08:00 jack@suse.cz 
#   [PATCH] quota umount race fix
#   
#   Fix possible races between umount and quota on/off.
#   
#   Finally I decided to take a reference to vfsmount during vfs_quota_on() and
#   to drop it after the final cleanup in the vfs_quota_off().  This way we
#   should be all the time guarded against umount.  This way was protected also
#   the old code which used filp_open() for opening quota files.  I was also
#   thinking about other ways of protection but there would be always a window
#   (provided I don't want to play much with namespace locks) where
#   vfs_quota_on() could be called while umount() is in progress resulting in
#   the "Busy inodes after unmount" messages...
#   
#   Get a reference to vfsmount during quotaon() so that we are guarded against
#   umount (as was the old code using filp_open()).
#   
#   Signed-off-by: Jan Kara <jack@suse.cz>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/quotaops.h
#   2005/01/03 15:49:13-08:00 jack@suse.cz +1 -1
#   quota umount race fix
# 
# include/linux/quota.h
#   2005/01/03 15:49:13-08:00 jack@suse.cz +1 -0
#   quota umount race fix
# 
# fs/dquot.c
#   2005/01/03 15:50:41-08:00 jack@suse.cz +33 -12
#   quota umount race fix
# 
# ChangeSet
#   2005/01/03 20:12:24-08:00 jack@suse.cz 
#   [PATCH] Fix of quota deadlock on pagelock: quota core
#   
#   The four patches in this series fix deadlocks with quotas of pagelock (the
#   problem was lock inversion on PageLock and transaction start - quota code
#   needed to first start a transaction and then write the data which subsequently
#   needed acquisition of PageLock while the standard ordering - PageLock first
#   and transaction start later - was used e.g.  by pdflush).  They implement a
#   new way of quota access to disk: Every filesystem that would like to implement
#   quotas now has to provide quota_read() and quota_write() functions.  These
#   functions must obey quota lock ordering (in particular they should not take
#   PageLock inside a transaction).
#   
#   The first patch implements the changes in the quota core, the other three
#   patches implement needed functions in ext2, ext3 and reiserfs.  The patch for
#   reiserfs also fixes several other lock inversion problems (similar as ext3
#   had) and implements the journaled quota functionality (which comes almost for
#   free after the locking fixes...).
#   
#   The quota core patch makes quota support in other filesystems (except XFS
#   which implements everything on its own ;)) unfunctional (quotaon() will refuse
#   to turn on quotas on them).  When the patches get reasonable wide testing and
#   it will seem that no major changes will be needed I can make fixes also for
#   the other filesystems (JFS, UDF, UFS).
#   
#   This patch:
#   
#   The patch implements the new way of quota io in the quota core.  Every
#   filesystem wanting to support quotas has to provide functions quota_read()
#   and quota_write() obeying quota locking rules.  As the writes and reads
#   bypass the pagecache there is some ugly stuff ensuring that userspace can
#   see all the data after quotaoff() (or Q_SYNC quotactl).  In future I plan
#   to make quota files inaccessible from userspace (with the exception of
#   quotacheck(8) which will take care about the cache flushing and such stuff
#   itself) so that this synchronization stuff can be removed...
#   
#   The rewrite of the quota core. Quota uses the filesystem read() and write()
#   functions no more to avoid possible deadlocks on PageLock. From now on every
#   filesystem supporting quotas must provide functions quota_read() and
#   quota_write() which obey the quota locking rules (e.g. they cannot acquire the
#   PageLock).
#   
#   Signed-off-by: Jan Kara <jack@suse.cz>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# security/selinux/hooks.c
#   2005/01/03 15:49:12-08:00 jack@suse.cz +2 -2
#   Fix of quota deadlock on pagelock: quota core
# 
# security/dummy.c
#   2005/01/03 15:50:40-08:00 jack@suse.cz +1 -1
#   Fix of quota deadlock on pagelock: quota core
# 
# include/linux/security.h
#   2005/01/03 15:49:12-08:00 jack@suse.cz +4 -4
#   Fix of quota deadlock on pagelock: quota core
# 
# include/linux/quota.h
#   2005/01/03 15:50:42-08:00 jack@suse.cz +1 -1
#   Fix of quota deadlock on pagelock: quota core
# 
# include/linux/fs.h
#   2005/01/03 15:50:40-08:00 jack@suse.cz +3 -0
#   Fix of quota deadlock on pagelock: quota core
# 
# fs/quota_v2.c
#   2005/01/03 15:49:12-08:00 jack@suse.cz +101 -126
#   Fix of quota deadlock on pagelock: quota core
# 
# fs/quota_v1.c
#   2005/01/03 15:49:12-08:00 jack@suse.cz +12 -50
#   Fix of quota deadlock on pagelock: quota core
# 
# fs/quota.c
#   2005/01/03 15:49:12-08:00 jack@suse.cz +42 -3
#   Fix of quota deadlock on pagelock: quota core
# 
# fs/dquot.c
#   2005/01/03 15:50:42-08:00 jack@suse.cz +82 -81
#   Fix of quota deadlock on pagelock: quota core
# 
# ChangeSet
#   2005/01/03 20:12:10-08:00 jack@suse.cz 
#   [PATCH] Fix reiserfs quota debug messages
#   
#   Attached patch fixes debug messages of quota code in reiserfs so that they
#   compile.  Chris Mason agreed the patch.
#   
#   Signed-off-by: Jan Kara <jack@suse.cz>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/reiserfs/stree.c
#   2005/01/03 15:49:12-08:00 jack@suse.cz +7 -7
#   Fix reiserfs quota debug messages
# 
# fs/reiserfs/bitmap.c
#   2005/01/03 15:49:12-08:00 jack@suse.cz +4 -4
#   Fix reiserfs quota debug messages
# 
# ChangeSet
#   2005/01/03 20:11:57-08:00 jack@suse.cz 
#   [PATCH] Expose reiserfs_sync_fs()
#   
#   Attached patch exposes reiserfs_sync_fs().  This call is needed by the new
#   quota code to write data to disk on quotaoff so that userspace can see them
#   afterwards.  Chris Mason agrees with the patch.
#   
#   Make reiserfs provide the sync_fs() function so that the quota code
#   has a way to reliably force a transaction to disk.
#   
#   Signed-off-by: Jan Kara <jack@suse.cz>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# fs/reiserfs/super.c
#   2005/01/03 15:50:41-08:00 jack@suse.cz +4 -2
#   Expose reiserfs_sync_fs()
# 
# ChangeSet
#   2005/01/03 22:48:10+00:00 mzzhgg@de.rmk.(none) 
#   [SERIAL] support for another Rockwell PNP modem
#   
#   From: Lennart Poettering
#   
#   Trivial patch against Linux 2.6.10 which adds PNP support for a
#   certain kind of Rockwell 28.8/ISA modems.
# 
# drivers/serial/8250_pnp.c
#   2005/01/03 22:44:47+00:00 mzzhgg@de.rmk.(none) +2 -0
#   [PATCH] support for another Rockwell PNP modem
# 
# ChangeSet
#   2005/01/03 18:56:59+00:00 rmk@flint.arm.linux.org.uk 
#   [MMC] Remove deprecated data->req
#   
#   Since all users of this have now been eliminated, we can eliminate
#   the element itself.  MMC host drivers now operate only on the
#   scatter lists passed to them, rather than needing knowledge of
#   block devices.
#   
#   Signed-off-by: Russell King <rmk@arm.linux.org.uk>
# 
# include/linux/mmc/mmc.h
#   2005/01/03 18:53:11+00:00 rmk@flint.arm.linux.org.uk +0 -1
#   Remove req element - it's deprecated.
# 
# drivers/mmc/mmc_block.c
#   2005/01/03 18:53:11+00:00 rmk@flint.arm.linux.org.uk +0 -1
#   Remove assignment of data->req - this element is deprecated.
# 
# ChangeSet
#   2005/01/03 18:37:35+00:00 drzeus-list@cx.rmk.(none) 
#   [MMC] Fix warning in wbsd
#   
#   From: Pierre Ossman
#   
#   Cleanup that fixes a warning in the wbsd module.
# 
# drivers/mmc/wbsd.c
#   2005/01/03 18:33:55+00:00 drzeus-list@cx.rmk.(none) +0 -2
#   [PATCH] Fix warning in wbsd
# 
# ChangeSet
#   2005/01/03 18:28:00+00:00 rmk@flint.arm.linux.org.uk 
#   [ARM] Fix some pointer/integer conversion warnings for RiscPC.
#   
#   Signed-off-by: Russell King <rmk@arm.linux.org.uk>
# 
# include/asm-arm/arch-rpc/io.h
#   2005/01/03 18:24:20+00:00 rmk@flint.arm.linux.org.uk +11 -9
#   Fix implicit pointer/integer conversion warnings.
# 
# ChangeSet
#   2005/01/03 18:07:07+00:00 rmk@flint.arm.linux.org.uk 
#   [ARm] Silence a couple of compiler warnings.
#   
#   Signed-off-by: Russell King <rmk@arm.linux.org.uk>
# 
# arch/arm/mach-integrator/time.c
#   2005/01/03 18:03:45+00:00 rmk@flint.arm.linux.org.uk +2 -0
#   Add asm/mach/time.h to silence a couple of compiler warnings.
# 
# ChangeSet
#   2005/01/03 17:02:08+00:00 Liam.Girdwood@com.rmk.(none) 
#   [ARM PATCH] 2342/1: Support PXA SSP configuration changes when port is open
#   
#   Patch from Liam Girdwood
#   
#   This patch allows the PXA SSP port configuration to be changed without
#   the need to close the port.
#   
#   Signed-off-by: Liam Girdwood
#   Signed-off-by: Russell King
# 
# include/asm-arm/arch-pxa/ssp.h
#   2005/01/03 14:00:31+00:00 Liam.Girdwood@com.rmk.(none) +2 -2
#   [PATCH] 2342/1: Support PXA SSP configuration changes when port is open
# 
# arch/arm/mach-pxa/ssp.c
#   2005/01/03 16:36:03+00:00 Liam.Girdwood@com.rmk.(none) +57 -13
#   [PATCH] 2342/1: Support PXA SSP configuration changes when port is open
# 
# ChangeSet
#   2005/01/03 16:33:30+00:00 rmk@flint.arm.linux.org.uk 
#   [ARM] Swap DOMAIN_USER and DOMAIN_KERNEL indicies
#   
#   This changes kernel domains to use domain 0 rather than domain 1,
#   in preparation to supporting supersection mappings.
#   
#   Signed-off-by: Russell King <rmk@arm.linux.org.uk>
# 
# include/asm-arm/domain.h
#   2005/01/03 16:29:47+00:00 rmk@flint.arm.linux.org.uk +5 -5
#   Swap DOMAIN_USER and DOMAIN_KERNEL indicies.
# 
# ChangeSet
#   2005/01/03 16:13:30+00:00 Liam.Girdwood@com.rmk.(none) 
#   [ARM PATCH] 2340/1: Added PXA27x SSP port 3 to kernel io address range
#   
#   Patch from Liam Girdwood
#   
#   This patch adds the PXA27x SSP port 3 configuration register space (Phys
#   0x41900000) to the kernel memory table.
#   
#   Signed-off-by: Liam Girdwood
#   Signed-off-by: Russell King
# 
# arch/arm/mach-pxa/generic.c
#   2004/12/17 12:44:02+00:00 Liam.Girdwood@com.rmk.(none) +1 -1
#   [PATCH] 2340/1: Added PXA27x SSP port 3 to kernel io address range
# 
# ChangeSet
#   2005/01/03 15:12:29+01:00 perex@suse.cz 
#   Merge suse.cz:/home/perex/bk/linux-sound/linux-sound
#   into suse.cz:/home/perex/bk/linux-sound/work
# 
# sound/pci/ymfpci/ymfpci_main.c
#   2005/01/03 15:12:05+01:00 perex@suse.cz +0 -0
#   Auto merged
# 
# sound/pci/vx222/vx222.c
#   2005/01/03 15:12:05+01:00 perex@suse.cz +0 -0
#   Auto merged
# 
# sound/pci/trident/trident_main.c
#   2005/01/03 15:12:05+01:00 perex@suse.cz +0 -0
#   Auto merged
# 
# sound/pci/rme9652/hdsp.c
#   2005/01/03 15:12:04+01:00 perex@suse.cz +0 -0
#   Auto merged
# 
# sound/pci/nm256/nm256.c
#   2005/01/03 15:12:04+01:00 perex@suse.cz +0 -0
#   Auto merged
# 
# sound/pci/mixart/mixart.c
#   2005/01/03 15:12:04+01:00 perex@suse.cz +0 -0
#   Auto merged
# 
# sound/pci/korg1212/korg1212.c
#   2005/01/03 15:12:03+01:00 perex@suse.cz +0 -8
#   Auto merged
# 
# sound/pci/ice1712/ice1724.c
#   2005/01/03 15:12:03+01:00 perex@suse.cz +0 -0
#   Auto merged
# 
# sound/pci/emu10k1/emu10k1_main.c
#   2005/01/03 15:12:02+01:00 perex@suse.cz +0 -0
#   Auto merged
# 
# sound/pci/cs46xx/cs46xx_lib.c
#   2005/01/03 15:12:02+01:00 perex@suse.cz +0 -0
#   Auto merged
# 
# sound/pci/ali5451/ali5451.c
#   2005/01/03 15:12:02+01:00 perex@suse.cz +0 -0
#   Auto merged
# 
# sound/pci/via82xx.c
#   2005/01/03 15:12:01+01:00 perex@suse.cz +0 -0
#   Auto merged
# 
# sound/pci/sonicvibes.c
#   2005/01/03 15:12:01+01:00 perex@suse.cz +0 -0
#   Auto merged
# 
# sound/pci/rme96.c
#   2005/01/03 15:12:01+01:00 perex@suse.cz +0 -0
#   Auto merged
# 
# sound/pci/rme32.c
#   2005/01/03 15:12:00+01:00 perex@suse.cz +0 -0
#   Auto merged
# 
# sound/pci/maestro3.c
#   2005/01/03 15:12:00+01:00 perex@suse.cz +0 -0
#   Auto merged
# 
# sound/pci/intel8x0m.c
#   2005/01/03 15:12:00+01:00 perex@suse.cz +0 -0
#   Auto merged
# 
# sound/pci/intel8x0.c
#   2005/01/03 15:12:00+01:00 perex@suse.cz +0 -0
#   Auto merged
# 
# sound/pci/fm801.c
#   2005/01/03 15:11:59+01:00 perex@suse.cz +0 -0
#   Auto merged
# 
# sound/pci/es1968.c
#   2005/01/03 15:11:59+01:00 perex@suse.cz +0 -0
#   Auto merged
# 
# sound/pci/es1938.c
#   2005/01/03 15:11:59+01:00 perex@suse.cz +0 -0
#   Auto merged
# 
# sound/pci/ens1370.c
#   2005/01/03 15:11:58+01:00 perex@suse.cz +0 -0
#   Auto merged
# 
# sound/pci/cs4281.c
#   2005/01/03 15:11:58+01:00 perex@suse.cz +0 -0
#   Auto merged
# 
# sound/pci/cmipci.c
#   2005/01/03 15:11:58+01:00 perex@suse.cz +0 -0
#   Auto merged
# 
# sound/pci/azt3328.c
#   2005/01/03 15:11:57+01:00 perex@suse.cz +0 -0
#   Auto merged
# 
# sound/pci/atiixp_modem.c
#   2005/01/03 15:11:57+01:00 perex@suse.cz +0 -0
#   Auto merged
# 
# sound/pci/atiixp.c
#   2005/01/03 15:11:57+01:00 perex@suse.cz +0 -0
#   Auto merged
# 
# sound/core/pcm_native.c
#   2005/01/03 15:11:56+01:00 perex@suse.cz +0 -0
#   Auto merged
# 
# sound/core/pcm_misc.c
#   2005/01/03 15:11:56+01:00 perex@suse.cz +0 -7
#   Auto merged
# 
# ChangeSet
#   2005/01/03 14:55:25+01:00 perex@suse.cz 
#   Merge suse.cz:/home/perex/bk/linux-sound/linux-2.5
#   into suse.cz:/home/perex/bk/linux-sound/linux-sound
# 
# sound/pci/ymfpci/ymfpci_main.c
#   2005/01/03 14:55:00+01:00 perex@suse.cz +0 -5
#   Auto merged
# 
# sound/pci/vx222/vx222.c
#   2005/01/03 14:55:00+01:00 perex@suse.cz +0 -4
#   Auto merged
# 
# sound/pci/trident/trident_main.c
#   2005/01/03 14:55:00+01:00 perex@suse.cz +0 -7
#   Auto merged
# 
# sound/pci/rme9652/rme9652.c
#   2005/01/03 14:55:00+01:00 perex@suse.cz +0 -1
#   Auto merged
# 
# sound/pci/rme9652/hdsp.c
#   2005/01/03 14:54:59+01:00 perex@suse.cz +0 -1
#   Auto merged
# 
# sound/pci/nm256/nm256.c
#   2005/01/03 14:54:59+01:00 perex@suse.cz +0 -8
#   Auto merged
# 
# sound/pci/mixart/mixart.c
#   2005/01/03 14:54:59+01:00 perex@suse.cz +0 -6
#   Auto merged
# 
# sound/pci/korg1212/korg1212.c
#   2005/01/03 14:54:59+01:00 perex@suse.cz +0 -20
#   Auto merged
# 
# sound/pci/ice1712/ice1724.c
#   2005/01/03 14:54:57+01:00 perex@suse.cz +0 -5
#   Auto merged
# 
# sound/pci/ice1712/ice1712.c
#   2005/01/03 14:54:57+01:00 perex@suse.cz +0 -6
#   Auto merged
# 
# sound/pci/emu10k1/emu10k1_main.c
#   2005/01/03 14:54:57+01:00 perex@suse.cz +0 -6
#   Auto merged
# 
# sound/pci/via82xx.c
#   2005/01/03 14:54:56+01:00 perex@suse.cz +0 -5
#   Auto merged
# 
# sound/pci/cs46xx/cs46xx_lib.c
#   2005/01/03 14:54:56+01:00 perex@suse.cz +0 -6
#   Auto merged
# 
# sound/pci/ali5451/ali5451.c
#   2005/01/03 14:54:56+01:00 perex@suse.cz +0 -6
#   Auto merged
# 
# sound/pci/sonicvibes.c
#   2005/01/03 14:54:55+01:00 perex@suse.cz +0 -6
#   Auto merged
# 
# sound/pci/rme96.c
#   2005/01/03 14:54:55+01:00 perex@suse.cz +0 -1
#   Auto merged
# 
# sound/pci/rme32.c
#   2005/01/03 14:54:55+01:00 perex@suse.cz +0 -1
#   Auto merged
# 
# sound/pci/maestro3.c
#   2005/01/03 14:54:55+01:00 perex@suse.cz +0 -9
#   Auto merged
# 
# sound/pci/intel8x0m.c
#   2005/01/03 14:54:55+01:00 perex@suse.cz +0 -6
#   Auto merged
# 
# sound/pci/intel8x0.c
#   2005/01/03 14:54:55+01:00 perex@suse.cz +0 -8
#   Auto merged
# 
# sound/pci/fm801.c
#   2005/01/03 14:54:54+01:00 perex@suse.cz +0 -5
#   Auto merged
# 
# sound/pci/es1968.c
#   2005/01/03 14:54:54+01:00 perex@suse.cz +0 -8
#   Auto merged
# 
# sound/pci/es1938.c
#   2005/01/03 14:54:54+01:00 perex@suse.cz +0 -7
#   Auto merged
# 
# sound/pci/ens1370.c
#   2005/01/03 14:54:54+01:00 perex@suse.cz +0 -5
#   Auto merged
# 
# sound/pci/cs4281.c
#   2005/01/03 14:54:53+01:00 perex@suse.cz +0 -7
#   Auto merged
# 
# sound/pci/cmipci.c
#   2005/01/03 14:54:53+01:00 perex@suse.cz +0 -5
#   Auto merged
# 
# sound/pci/bt87x.c
#   2005/01/03 14:54:53+01:00 perex@suse.cz +0 -5
#   Auto merged
# 
# sound/pci/azt3328.c
#   2005/01/03 14:54:53+01:00 perex@suse.cz +0 -6
#   Auto merged
# 
# sound/pci/atiixp_modem.c
#   2005/01/03 14:54:53+01:00 perex@suse.cz +0 -6
#   Auto merged
# 
# sound/pci/atiixp.c
#   2005/01/03 14:54:53+01:00 perex@suse.cz +0 -6
#   Auto merged
# 
# sound/pci/als4000.c
#   2005/01/03 14:54:53+01:00 perex@suse.cz +0 -6
#   Auto merged
# 
# sound/core/pcm_native.c
#   2005/01/03 14:54:52+01:00 perex@suse.cz +0 -1
#   Auto merged
# 
# ChangeSet
#   2005/01/03 14:17:36+01:00 perex@suse.cz 
#   [ALSA] Fix spinlock
#   
#   au88x0 driver
#   Fixed possible spin deadlocks.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/au88x0/au88x0_pcm.c
#   2005/01/03 05:08:24+01:00 perex@suse.cz +9 -0
#   [ALSA] Fix spinlock
#   
#   D:2005/01/03 12:08:24
#   C:au88x0 driver
#   F:pci/au88x0/au88x0_core.c:1.9->1.10 
#   F:pci/au88x0/au88x0_pcm.c:1.5->1.6 
#   L:Fixed possible spin deadlocks.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/au88x0/au88x0_core.c
#   2005/01/03 05:08:24+01:00 perex@suse.cz +6 -2
#   [ALSA] Fix spinlock
#   
#   D:2005/01/03 12:08:24
#   C:au88x0 driver
#   F:pci/au88x0/au88x0_core.c:1.9->1.10 
#   F:pci/au88x0/au88x0_pcm.c:1.5->1.6 
#   L:Fixed possible spin deadlocks.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 14:16:30+01:00 perex@suse.cz 
#   [ALSA] Add CODEC and BUS device types
#   
#   OPL3,OPL4,I2C lib core,L3 drivers,AK4117 receiver,ALSA Core
#   EMU8000 driver,AC97 Codec Core,AK4531 codec
#   Added SNDRV_DEV_CODEC and SNDRV_DEV_BUS types to tell from the lowlevel
#   components.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ac97/ak4531_codec.c
#   2005/01/03 05:05:21+01:00 perex@suse.cz +1 -1
#   [ALSA] Add CODEC and BUS device types
#   
#   D:2005/01/03 12:05:19
#   C:OPL3,OPL4,I2C lib core,L3 drivers,AK4117 receiver,ALSA Core
#   C:EMU8000 driver,AC97 Codec Core,AK4531 codec
#   F:drivers/opl3/opl3_lib.c:1.24->1.25 
#   F:drivers/opl4/opl4_lib.c:1.8->1.9 
#   F:i2c/i2c.c:1.11->1.12 
#   F:i2c/l3/uda1341.c:1.14->1.15 
#   F:i2c/other/ak4117.c:1.3->1.4 
#   F:include/core.h:1.63->1.64 
#   F:isa/sb/emu8000.c:1.23->1.24 
#   F:pci/ac97/ac97_codec.c:1.162->1.163 
#   F:pci/ac97/ak4531_codec.c:1.14->1.15 
#   L:Added SNDRV_DEV_CODEC and SNDRV_DEV_BUS types to tell from the lowlevel
#   L:components.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ac97/ac97_codec.c
#   2005/01/03 05:05:21+01:00 perex@suse.cz +2 -2
#   [ALSA] Add CODEC and BUS device types
#   
#   D:2005/01/03 12:05:19
#   C:OPL3,OPL4,I2C lib core,L3 drivers,AK4117 receiver,ALSA Core
#   C:EMU8000 driver,AC97 Codec Core,AK4531 codec
#   F:drivers/opl3/opl3_lib.c:1.24->1.25 
#   F:drivers/opl4/opl4_lib.c:1.8->1.9 
#   F:i2c/i2c.c:1.11->1.12 
#   F:i2c/l3/uda1341.c:1.14->1.15 
#   F:i2c/other/ak4117.c:1.3->1.4 
#   F:include/core.h:1.63->1.64 
#   F:isa/sb/emu8000.c:1.23->1.24 
#   F:pci/ac97/ac97_codec.c:1.162->1.163 
#   F:pci/ac97/ak4531_codec.c:1.14->1.15 
#   L:Added SNDRV_DEV_CODEC and SNDRV_DEV_BUS types to tell from the lowlevel
#   L:components.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/isa/sb/emu8000.c
#   2005/01/03 05:05:20+01:00 perex@suse.cz +1 -1
#   [ALSA] Add CODEC and BUS device types
#   
#   D:2005/01/03 12:05:19
#   C:OPL3,OPL4,I2C lib core,L3 drivers,AK4117 receiver,ALSA Core
#   C:EMU8000 driver,AC97 Codec Core,AK4531 codec
#   F:drivers/opl3/opl3_lib.c:1.24->1.25 
#   F:drivers/opl4/opl4_lib.c:1.8->1.9 
#   F:i2c/i2c.c:1.11->1.12 
#   F:i2c/l3/uda1341.c:1.14->1.15 
#   F:i2c/other/ak4117.c:1.3->1.4 
#   F:include/core.h:1.63->1.64 
#   F:isa/sb/emu8000.c:1.23->1.24 
#   F:pci/ac97/ac97_codec.c:1.162->1.163 
#   F:pci/ac97/ak4531_codec.c:1.14->1.15 
#   L:Added SNDRV_DEV_CODEC and SNDRV_DEV_BUS types to tell from the lowlevel
#   L:components.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/i2c/other/ak4117.c
#   2005/01/03 05:05:20+01:00 perex@suse.cz +1 -1
#   [ALSA] Add CODEC and BUS device types
#   
#   D:2005/01/03 12:05:19
#   C:OPL3,OPL4,I2C lib core,L3 drivers,AK4117 receiver,ALSA Core
#   C:EMU8000 driver,AC97 Codec Core,AK4531 codec
#   F:drivers/opl3/opl3_lib.c:1.24->1.25 
#   F:drivers/opl4/opl4_lib.c:1.8->1.9 
#   F:i2c/i2c.c:1.11->1.12 
#   F:i2c/l3/uda1341.c:1.14->1.15 
#   F:i2c/other/ak4117.c:1.3->1.4 
#   F:include/core.h:1.63->1.64 
#   F:isa/sb/emu8000.c:1.23->1.24 
#   F:pci/ac97/ac97_codec.c:1.162->1.163 
#   F:pci/ac97/ak4531_codec.c:1.14->1.15 
#   L:Added SNDRV_DEV_CODEC and SNDRV_DEV_BUS types to tell from the lowlevel
#   L:components.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/i2c/l3/uda1341.c
#   2005/01/03 05:05:20+01:00 perex@suse.cz +2 -2
#   [ALSA] Add CODEC and BUS device types
#   
#   D:2005/01/03 12:05:19
#   C:OPL3,OPL4,I2C lib core,L3 drivers,AK4117 receiver,ALSA Core
#   C:EMU8000 driver,AC97 Codec Core,AK4531 codec
#   F:drivers/opl3/opl3_lib.c:1.24->1.25 
#   F:drivers/opl4/opl4_lib.c:1.8->1.9 
#   F:i2c/i2c.c:1.11->1.12 
#   F:i2c/l3/uda1341.c:1.14->1.15 
#   F:i2c/other/ak4117.c:1.3->1.4 
#   F:include/core.h:1.63->1.64 
#   F:isa/sb/emu8000.c:1.23->1.24 
#   F:pci/ac97/ac97_codec.c:1.162->1.163 
#   F:pci/ac97/ak4531_codec.c:1.14->1.15 
#   L:Added SNDRV_DEV_CODEC and SNDRV_DEV_BUS types to tell from the lowlevel
#   L:components.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/i2c/i2c.c
#   2005/01/03 05:05:19+01:00 perex@suse.cz +1 -1
#   [ALSA] Add CODEC and BUS device types
#   
#   D:2005/01/03 12:05:19
#   C:OPL3,OPL4,I2C lib core,L3 drivers,AK4117 receiver,ALSA Core
#   C:EMU8000 driver,AC97 Codec Core,AK4531 codec
#   F:drivers/opl3/opl3_lib.c:1.24->1.25 
#   F:drivers/opl4/opl4_lib.c:1.8->1.9 
#   F:i2c/i2c.c:1.11->1.12 
#   F:i2c/l3/uda1341.c:1.14->1.15 
#   F:i2c/other/ak4117.c:1.3->1.4 
#   F:include/core.h:1.63->1.64 
#   F:isa/sb/emu8000.c:1.23->1.24 
#   F:pci/ac97/ac97_codec.c:1.162->1.163 
#   F:pci/ac97/ak4531_codec.c:1.14->1.15 
#   L:Added SNDRV_DEV_CODEC and SNDRV_DEV_BUS types to tell from the lowlevel
#   L:components.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/drivers/opl4/opl4_lib.c
#   2005/01/03 05:05:19+01:00 perex@suse.cz +6 -7
#   [ALSA] Add CODEC and BUS device types
#   
#   D:2005/01/03 12:05:19
#   C:OPL3,OPL4,I2C lib core,L3 drivers,AK4117 receiver,ALSA Core
#   C:EMU8000 driver,AC97 Codec Core,AK4531 codec
#   F:drivers/opl3/opl3_lib.c:1.24->1.25 
#   F:drivers/opl4/opl4_lib.c:1.8->1.9 
#   F:i2c/i2c.c:1.11->1.12 
#   F:i2c/l3/uda1341.c:1.14->1.15 
#   F:i2c/other/ak4117.c:1.3->1.4 
#   F:include/core.h:1.63->1.64 
#   F:isa/sb/emu8000.c:1.23->1.24 
#   F:pci/ac97/ac97_codec.c:1.162->1.163 
#   F:pci/ac97/ak4531_codec.c:1.14->1.15 
#   L:Added SNDRV_DEV_CODEC and SNDRV_DEV_BUS types to tell from the lowlevel
#   L:components.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/drivers/opl3/opl3_lib.c
#   2005/01/03 05:05:19+01:00 perex@suse.cz +1 -1
#   [ALSA] Add CODEC and BUS device types
#   
#   D:2005/01/03 12:05:19
#   C:OPL3,OPL4,I2C lib core,L3 drivers,AK4117 receiver,ALSA Core
#   C:EMU8000 driver,AC97 Codec Core,AK4531 codec
#   F:drivers/opl3/opl3_lib.c:1.24->1.25 
#   F:drivers/opl4/opl4_lib.c:1.8->1.9 
#   F:i2c/i2c.c:1.11->1.12 
#   F:i2c/l3/uda1341.c:1.14->1.15 
#   F:i2c/other/ak4117.c:1.3->1.4 
#   F:include/core.h:1.63->1.64 
#   F:isa/sb/emu8000.c:1.23->1.24 
#   F:pci/ac97/ac97_codec.c:1.162->1.163 
#   F:pci/ac97/ak4531_codec.c:1.14->1.15 
#   L:Added SNDRV_DEV_CODEC and SNDRV_DEV_BUS types to tell from the lowlevel
#   L:components.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# include/sound/core.h
#   2005/01/03 05:05:20+01:00 perex@suse.cz +2 -0
#   [ALSA] Add CODEC and BUS device types
#   
#   D:2005/01/03 12:05:19
#   C:OPL3,OPL4,I2C lib core,L3 drivers,AK4117 receiver,ALSA Core
#   C:EMU8000 driver,AC97 Codec Core,AK4531 codec
#   F:drivers/opl3/opl3_lib.c:1.24->1.25 
#   F:drivers/opl4/opl4_lib.c:1.8->1.9 
#   F:i2c/i2c.c:1.11->1.12 
#   F:i2c/l3/uda1341.c:1.14->1.15 
#   F:i2c/other/ak4117.c:1.3->1.4 
#   F:include/core.h:1.63->1.64 
#   F:isa/sb/emu8000.c:1.23->1.24 
#   F:pci/ac97/ac97_codec.c:1.162->1.163 
#   F:pci/ac97/ak4531_codec.c:1.14->1.15 
#   L:Added SNDRV_DEV_CODEC and SNDRV_DEV_BUS types to tell from the lowlevel
#   L:components.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 14:15:19+01:00 perex@suse.cz 
#   [ALSA] Remove superfluous code
#   
#   USB USX2Y
#   Removed the superfluous creation/deletion of lowlevel component.
#   It's not used at all.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/usb/usx2y/usbusx2yaudio.c
#   2005/01/03 04:46:29+01:00 perex@suse.cz +0 -20
#   [ALSA] Remove superfluous code
#   
#   D:2005/01/03 11:46:29
#   C:USB USX2Y
#   F:usb/usx2y/usbusx2yaudio.c:1.8->1.9 
#   L:Removed the superfluous creation/deletion of lowlevel component.
#   L:It's not used at all.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 14:14:10+01:00 perex@suse.cz 
#   [ALSA] Fix the order of creation of instances
#   
#   AZT3328 driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver
#   Maestro3 driver,SonicVibes driver,CS46xx driver,KORG1212 driver
#   NM256 driver,Trident driver,YMFPCI driver
#   Make sure that the chip instance is created at first before other components.
#   This will fix occasional oops at unloading due to the access to the released
#   resources.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ymfpci/ymfpci_main.c
#   2005/01/03 04:45:33+01:00 perex@suse.cz +2 -2
#   [ALSA] Fix the order of creation of instances
#   
#   D:2005/01/03 11:45:31
#   C:AZT3328 driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver
#   C:Maestro3 driver,SonicVibes driver,CS46xx driver,KORG1212 driver
#   C:NM256 driver,Trident driver,YMFPCI driver
#   F:pci/azt3328.c:1.23->1.24 
#   F:pci/cmipci.c:1.76->1.77 
#   F:pci/cs4281.c:1.68->1.69 
#   F:pci/ens1370.c:1.73->1.74 
#   F:pci/maestro3.c:1.67->1.68 
#   F:pci/sonicvibes.c:1.44->1.45 
#   F:pci/cs46xx/cs46xx_lib.c:1.92->1.93 
#   F:pci/korg1212/korg1212.c:1.52->1.53 
#   F:pci/nm256/nm256.c:1.57->1.58 
#   F:pci/trident/trident_main.c:1.68->1.69 
#   F:pci/ymfpci/ymfpci_main.c:1.63->1.64 
#   L:Make sure that the chip instance is created at first before other components.
#   L:This will fix occasional oops at unloading due to the access to the released
#   L:resources.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/trident/trident_main.c
#   2005/01/03 04:45:32+01:00 perex@suse.cz +5 -7
#   [ALSA] Fix the order of creation of instances
#   
#   D:2005/01/03 11:45:31
#   C:AZT3328 driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver
#   C:Maestro3 driver,SonicVibes driver,CS46xx driver,KORG1212 driver
#   C:NM256 driver,Trident driver,YMFPCI driver
#   F:pci/azt3328.c:1.23->1.24 
#   F:pci/cmipci.c:1.76->1.77 
#   F:pci/cs4281.c:1.68->1.69 
#   F:pci/ens1370.c:1.73->1.74 
#   F:pci/maestro3.c:1.67->1.68 
#   F:pci/sonicvibes.c:1.44->1.45 
#   F:pci/cs46xx/cs46xx_lib.c:1.92->1.93 
#   F:pci/korg1212/korg1212.c:1.52->1.53 
#   F:pci/nm256/nm256.c:1.57->1.58 
#   F:pci/trident/trident_main.c:1.68->1.69 
#   F:pci/ymfpci/ymfpci_main.c:1.63->1.64 
#   L:Make sure that the chip instance is created at first before other components.
#   L:This will fix occasional oops at unloading due to the access to the released
#   L:resources.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/sonicvibes.c
#   2005/01/03 04:45:32+01:00 perex@suse.cz +2 -1
#   [ALSA] Fix the order of creation of instances
#   
#   D:2005/01/03 11:45:31
#   C:AZT3328 driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver
#   C:Maestro3 driver,SonicVibes driver,CS46xx driver,KORG1212 driver
#   C:NM256 driver,Trident driver,YMFPCI driver
#   F:pci/azt3328.c:1.23->1.24 
#   F:pci/cmipci.c:1.76->1.77 
#   F:pci/cs4281.c:1.68->1.69 
#   F:pci/ens1370.c:1.73->1.74 
#   F:pci/maestro3.c:1.67->1.68 
#   F:pci/sonicvibes.c:1.44->1.45 
#   F:pci/cs46xx/cs46xx_lib.c:1.92->1.93 
#   F:pci/korg1212/korg1212.c:1.52->1.53 
#   F:pci/nm256/nm256.c:1.57->1.58 
#   F:pci/trident/trident_main.c:1.68->1.69 
#   F:pci/ymfpci/ymfpci_main.c:1.63->1.64 
#   L:Make sure that the chip instance is created at first before other components.
#   L:This will fix occasional oops at unloading due to the access to the released
#   L:resources.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/nm256/nm256.c
#   2005/01/03 04:45:32+01:00 perex@suse.cz +6 -6
#   [ALSA] Fix the order of creation of instances
#   
#   D:2005/01/03 11:45:31
#   C:AZT3328 driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver
#   C:Maestro3 driver,SonicVibes driver,CS46xx driver,KORG1212 driver
#   C:NM256 driver,Trident driver,YMFPCI driver
#   F:pci/azt3328.c:1.23->1.24 
#   F:pci/cmipci.c:1.76->1.77 
#   F:pci/cs4281.c:1.68->1.69 
#   F:pci/ens1370.c:1.73->1.74 
#   F:pci/maestro3.c:1.67->1.68 
#   F:pci/sonicvibes.c:1.44->1.45 
#   F:pci/cs46xx/cs46xx_lib.c:1.92->1.93 
#   F:pci/korg1212/korg1212.c:1.52->1.53 
#   F:pci/nm256/nm256.c:1.57->1.58 
#   F:pci/trident/trident_main.c:1.68->1.69 
#   F:pci/ymfpci/ymfpci_main.c:1.63->1.64 
#   L:Make sure that the chip instance is created at first before other components.
#   L:This will fix occasional oops at unloading due to the access to the released
#   L:resources.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/maestro3.c
#   2005/01/03 04:45:32+01:00 perex@suse.cz +13 -19
#   [ALSA] Fix the order of creation of instances
#   
#   D:2005/01/03 11:45:31
#   C:AZT3328 driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver
#   C:Maestro3 driver,SonicVibes driver,CS46xx driver,KORG1212 driver
#   C:NM256 driver,Trident driver,YMFPCI driver
#   F:pci/azt3328.c:1.23->1.24 
#   F:pci/cmipci.c:1.76->1.77 
#   F:pci/cs4281.c:1.68->1.69 
#   F:pci/ens1370.c:1.73->1.74 
#   F:pci/maestro3.c:1.67->1.68 
#   F:pci/sonicvibes.c:1.44->1.45 
#   F:pci/cs46xx/cs46xx_lib.c:1.92->1.93 
#   F:pci/korg1212/korg1212.c:1.52->1.53 
#   F:pci/nm256/nm256.c:1.57->1.58 
#   F:pci/trident/trident_main.c:1.68->1.69 
#   F:pci/ymfpci/ymfpci_main.c:1.63->1.64 
#   L:Make sure that the chip instance is created at first before other components.
#   L:This will fix occasional oops at unloading due to the access to the released
#   L:resources.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/korg1212/korg1212.c
#   2005/01/03 04:45:32+01:00 perex@suse.cz +8 -14
#   [ALSA] Fix the order of creation of instances
#   
#   D:2005/01/03 11:45:31
#   C:AZT3328 driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver
#   C:Maestro3 driver,SonicVibes driver,CS46xx driver,KORG1212 driver
#   C:NM256 driver,Trident driver,YMFPCI driver
#   F:pci/azt3328.c:1.23->1.24 
#   F:pci/cmipci.c:1.76->1.77 
#   F:pci/cs4281.c:1.68->1.69 
#   F:pci/ens1370.c:1.73->1.74 
#   F:pci/maestro3.c:1.67->1.68 
#   F:pci/sonicvibes.c:1.44->1.45 
#   F:pci/cs46xx/cs46xx_lib.c:1.92->1.93 
#   F:pci/korg1212/korg1212.c:1.52->1.53 
#   F:pci/nm256/nm256.c:1.57->1.58 
#   F:pci/trident/trident_main.c:1.68->1.69 
#   F:pci/ymfpci/ymfpci_main.c:1.63->1.64 
#   L:Make sure that the chip instance is created at first before other components.
#   L:This will fix occasional oops at unloading due to the access to the released
#   L:resources.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ens1370.c
#   2005/01/03 04:45:32+01:00 perex@suse.cz +2 -1
#   [ALSA] Fix the order of creation of instances
#   
#   D:2005/01/03 11:45:31
#   C:AZT3328 driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver
#   C:Maestro3 driver,SonicVibes driver,CS46xx driver,KORG1212 driver
#   C:NM256 driver,Trident driver,YMFPCI driver
#   F:pci/azt3328.c:1.23->1.24 
#   F:pci/cmipci.c:1.76->1.77 
#   F:pci/cs4281.c:1.68->1.69 
#   F:pci/ens1370.c:1.73->1.74 
#   F:pci/maestro3.c:1.67->1.68 
#   F:pci/sonicvibes.c:1.44->1.45 
#   F:pci/cs46xx/cs46xx_lib.c:1.92->1.93 
#   F:pci/korg1212/korg1212.c:1.52->1.53 
#   F:pci/nm256/nm256.c:1.57->1.58 
#   F:pci/trident/trident_main.c:1.68->1.69 
#   F:pci/ymfpci/ymfpci_main.c:1.63->1.64 
#   L:Make sure that the chip instance is created at first before other components.
#   L:This will fix occasional oops at unloading due to the access to the released
#   L:resources.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/cs46xx/cs46xx_lib.c
#   2005/01/03 04:45:32+01:00 perex@suse.cz +4 -4
#   [ALSA] Fix the order of creation of instances
#   
#   D:2005/01/03 11:45:31
#   C:AZT3328 driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver
#   C:Maestro3 driver,SonicVibes driver,CS46xx driver,KORG1212 driver
#   C:NM256 driver,Trident driver,YMFPCI driver
#   F:pci/azt3328.c:1.23->1.24 
#   F:pci/cmipci.c:1.76->1.77 
#   F:pci/cs4281.c:1.68->1.69 
#   F:pci/ens1370.c:1.73->1.74 
#   F:pci/maestro3.c:1.67->1.68 
#   F:pci/sonicvibes.c:1.44->1.45 
#   F:pci/cs46xx/cs46xx_lib.c:1.92->1.93 
#   F:pci/korg1212/korg1212.c:1.52->1.53 
#   F:pci/nm256/nm256.c:1.57->1.58 
#   F:pci/trident/trident_main.c:1.68->1.69 
#   F:pci/ymfpci/ymfpci_main.c:1.63->1.64 
#   L:Make sure that the chip instance is created at first before other components.
#   L:This will fix occasional oops at unloading due to the access to the released
#   L:resources.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/cs4281.c
#   2005/01/03 04:45:31+01:00 perex@suse.cz +4 -4
#   [ALSA] Fix the order of creation of instances
#   
#   D:2005/01/03 11:45:31
#   C:AZT3328 driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver
#   C:Maestro3 driver,SonicVibes driver,CS46xx driver,KORG1212 driver
#   C:NM256 driver,Trident driver,YMFPCI driver
#   F:pci/azt3328.c:1.23->1.24 
#   F:pci/cmipci.c:1.76->1.77 
#   F:pci/cs4281.c:1.68->1.69 
#   F:pci/ens1370.c:1.73->1.74 
#   F:pci/maestro3.c:1.67->1.68 
#   F:pci/sonicvibes.c:1.44->1.45 
#   F:pci/cs46xx/cs46xx_lib.c:1.92->1.93 
#   F:pci/korg1212/korg1212.c:1.52->1.53 
#   F:pci/nm256/nm256.c:1.57->1.58 
#   F:pci/trident/trident_main.c:1.68->1.69 
#   F:pci/ymfpci/ymfpci_main.c:1.63->1.64 
#   L:Make sure that the chip instance is created at first before other components.
#   L:This will fix occasional oops at unloading due to the access to the released
#   L:resources.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/cmipci.c
#   2005/01/03 04:45:31+01:00 perex@suse.cz +11 -14
#   [ALSA] Fix the order of creation of instances
#   
#   D:2005/01/03 11:45:31
#   C:AZT3328 driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver
#   C:Maestro3 driver,SonicVibes driver,CS46xx driver,KORG1212 driver
#   C:NM256 driver,Trident driver,YMFPCI driver
#   F:pci/azt3328.c:1.23->1.24 
#   F:pci/cmipci.c:1.76->1.77 
#   F:pci/cs4281.c:1.68->1.69 
#   F:pci/ens1370.c:1.73->1.74 
#   F:pci/maestro3.c:1.67->1.68 
#   F:pci/sonicvibes.c:1.44->1.45 
#   F:pci/cs46xx/cs46xx_lib.c:1.92->1.93 
#   F:pci/korg1212/korg1212.c:1.52->1.53 
#   F:pci/nm256/nm256.c:1.57->1.58 
#   F:pci/trident/trident_main.c:1.68->1.69 
#   F:pci/ymfpci/ymfpci_main.c:1.63->1.64 
#   L:Make sure that the chip instance is created at first before other components.
#   L:This will fix occasional oops at unloading due to the access to the released
#   L:resources.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/azt3328.c
#   2005/01/03 04:45:31+01:00 perex@suse.cz +4 -4
#   [ALSA] Fix the order of creation of instances
#   
#   D:2005/01/03 11:45:31
#   C:AZT3328 driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver
#   C:Maestro3 driver,SonicVibes driver,CS46xx driver,KORG1212 driver
#   C:NM256 driver,Trident driver,YMFPCI driver
#   F:pci/azt3328.c:1.23->1.24 
#   F:pci/cmipci.c:1.76->1.77 
#   F:pci/cs4281.c:1.68->1.69 
#   F:pci/ens1370.c:1.73->1.74 
#   F:pci/maestro3.c:1.67->1.68 
#   F:pci/sonicvibes.c:1.44->1.45 
#   F:pci/cs46xx/cs46xx_lib.c:1.92->1.93 
#   F:pci/korg1212/korg1212.c:1.52->1.53 
#   F:pci/nm256/nm256.c:1.57->1.58 
#   F:pci/trident/trident_main.c:1.68->1.69 
#   F:pci/ymfpci/ymfpci_main.c:1.63->1.64 
#   L:Make sure that the chip instance is created at first before other components.
#   L:This will fix occasional oops at unloading due to the access to the released
#   L:resources.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 14:13:22+01:00 dtor_core@ameritech.net 
#   Input: i8042 - fix "debug" parameter sysfs permissions.
#   
#   Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
#   Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
# 
# ChangeSet
#   2005/01/03 14:12:59+01:00 perex@suse.cz 
#   [ALSA] Clean up codes
#   
#   ALSA<-OSS emulation
#   Got rid of the unused float codes (the legacy code for sharing with ALSA
#   library).
#   Add assert to the invalid conversion indices which results in oops
#   (just to be sure).
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/oss/route.c
#   2005/01/03 04:41:51+01:00 perex@suse.cz +6 -70
#   [ALSA] Clean up codes
#   
#   D:2005/01/03 11:41:50
#   C:ALSA<-OSS emulation
#   F:core/oss/mulaw.c:1.5->1.6 
#   F:core/oss/pcm_plugin.c:1.24->1.25 
#   F:core/oss/pcm_plugin.h:1.7->1.8 
#   F:core/oss/rate.c:1.9->1.10 
#   F:core/oss/route.c:1.11->1.12 
#   L:Got rid of the unused float codes (the legacy code for sharing with ALSA
#   L:library).
#   L:Add assert to the invalid conversion indices which results in oops
#   L:(just to be sure).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/oss/rate.c
#   2005/01/03 04:41:51+01:00 perex@suse.cz +2 -0
#   [ALSA] Clean up codes
#   
#   D:2005/01/03 11:41:50
#   C:ALSA<-OSS emulation
#   F:core/oss/mulaw.c:1.5->1.6 
#   F:core/oss/pcm_plugin.c:1.24->1.25 
#   F:core/oss/pcm_plugin.h:1.7->1.8 
#   F:core/oss/rate.c:1.9->1.10 
#   F:core/oss/route.c:1.11->1.12 
#   L:Got rid of the unused float codes (the legacy code for sharing with ALSA
#   L:library).
#   L:Add assert to the invalid conversion indices which results in oops
#   L:(just to be sure).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/oss/pcm_plugin.h
#   2005/01/03 04:41:51+01:00 perex@suse.cz +0 -1
#   [ALSA] Clean up codes
#   
#   D:2005/01/03 11:41:50
#   C:ALSA<-OSS emulation
#   F:core/oss/mulaw.c:1.5->1.6 
#   F:core/oss/pcm_plugin.c:1.24->1.25 
#   F:core/oss/pcm_plugin.h:1.7->1.8 
#   F:core/oss/rate.c:1.9->1.10 
#   F:core/oss/route.c:1.11->1.12 
#   L:Got rid of the unused float codes (the legacy code for sharing with ALSA
#   L:library).
#   L:Add assert to the invalid conversion indices which results in oops
#   L:(just to be sure).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/oss/pcm_plugin.c
#   2005/01/03 04:41:51+01:00 perex@suse.cz +1 -2
#   [ALSA] Clean up codes
#   
#   D:2005/01/03 11:41:50
#   C:ALSA<-OSS emulation
#   F:core/oss/mulaw.c:1.5->1.6 
#   F:core/oss/pcm_plugin.c:1.24->1.25 
#   F:core/oss/pcm_plugin.h:1.7->1.8 
#   F:core/oss/rate.c:1.9->1.10 
#   F:core/oss/route.c:1.11->1.12 
#   L:Got rid of the unused float codes (the legacy code for sharing with ALSA
#   L:library).
#   L:Add assert to the invalid conversion indices which results in oops
#   L:(just to be sure).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/oss/mulaw.c
#   2005/01/03 04:41:50+01:00 perex@suse.cz +1 -0
#   [ALSA] Clean up codes
#   
#   D:2005/01/03 11:41:50
#   C:ALSA<-OSS emulation
#   F:core/oss/mulaw.c:1.5->1.6 
#   F:core/oss/pcm_plugin.c:1.24->1.25 
#   F:core/oss/pcm_plugin.h:1.7->1.8 
#   F:core/oss/rate.c:1.9->1.10 
#   F:core/oss/route.c:1.11->1.12 
#   L:Got rid of the unused float codes (the legacy code for sharing with ALSA
#   L:library).
#   L:Add assert to the invalid conversion indices which results in oops
#   L:(just to be sure).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 14:11:51+01:00 perex@suse.cz 
#   [ALSA] Description about snd_card_set_dev()
#   
#   Documentation
#   Added the description about snd_card_set_dev().
#   Misc cleanup.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# drivers/input/serio/i8042.c
#   2005/01/03 14:11:49+01:00 dtor_core@ameritech.net +1 -1
#   Input: i8042 - fix "debug" parameter sysfs permissions.
#   
#   Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
#   Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
# 
# Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
#   2005/01/03 04:39:57+01:00 perex@suse.cz +37 -4
#   [ALSA] Description about snd_card_set_dev()
#   
#   D:2005/01/03 11:39:57
#   C:Documentation
#   F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.45->1.46 
#   L:Added the description about snd_card_set_dev().
#   L:Misc cleanup.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 14:10:46+01:00 perex@suse.cz 
#   [ALSA] Fix the release of resources at error path
#   
#   Control Midlevel
#   Implemented free callback to fix the release of control resources
#   before calling register.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/control.c
#   2005/01/03 04:38:29+01:00 perex@suse.cz +19 -8
#   [ALSA] Fix the release of resources at error path
#   
#   D:2005/01/03 11:38:29
#   C:Control Midlevel
#   F:core/control.c:1.53->1.54 
#   L:Implemented free callback to fix the release of control resources
#   L:before calling register.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 14:09:39+01:00 perex@suse.cz 
#   [ALSA] Update documentation for hotplug fw loader
#   
#   Documentation
#   Updated descriptions about the firmware loading for the recent support of
#   hotplug firmware loader.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# Documentation/sound/alsa/MIXART.txt
#   2005/01/03 04:37:10+01:00 perex@suse.cz +4 -0
#   [ALSA] Update documentation for hotplug fw loader
#   
#   D:2005/01/03 11:37:10
#   C:Documentation
#   F:Documentation/ALSA-Configuration.txt:1.58->1.59 
#   F:Documentation/MIXART.txt:1.1->1.2 
#   L:Updated descriptions about the firmware loading for the recent support of
#   L:hotplug firmware loader.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# Documentation/sound/alsa/ALSA-Configuration.txt
#   2005/01/03 04:37:10+01:00 perex@suse.cz +6 -3
#   [ALSA] Update documentation for hotplug fw loader
#   
#   D:2005/01/03 11:37:10
#   C:Documentation
#   F:Documentation/ALSA-Configuration.txt:1.58->1.59 
#   F:Documentation/MIXART.txt:1.1->1.2 
#   L:Updated descriptions about the firmware loading for the recent support of
#   L:hotplug firmware loader.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 14:08:33+01:00 perex@suse.cz 
#   [ALSA] Add hotplug firmware loader support
#   
#   RME HDSP driver
#   Added the hotplug firmware loader support without hdsploader.
#   The firmware data must be installed beforehand in the proper place from
#   the latest alsa-firmware package.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/rme9652/hdsp.c
#   2005/01/03 04:36:06+01:00 perex@suse.cz +102 -5
#   [ALSA] Add hotplug firmware loader support
#   
#   D:2005/01/03 11:36:06
#   C:RME HDSP driver
#   F:pci/rme9652/hdsp.c:1.77->1.78 
#   L:Added the hotplug firmware loader support without hdsploader.
#   L:The firmware data must be installed beforehand in the proper place from
#   L:the latest alsa-firmware package.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 13:40:30+01:00 perex@suse.cz 
#   [ALSA] Fix compile warning
#   
#   EMU10K1/EMU10K2 driver
#   Removed an unused variable to fix a compile warning.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/emu10k1/emu10k1x.c
#   2004/12/30 08:54:44+01:00 perex@suse.cz +0 -1
#   [ALSA] Fix compile warning
#   
#   D:2004/12/30 15:54:44
#   C:EMU10K1/EMU10K2 driver
#   F:pci/emu10k1/emu10k1x.c:1.2->1.3 
#   L:Removed an unused variable to fix a compile warning.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 13:38:17+01:00 perex@suse.cz 
#   [ALSA] Fix compile warning (make inline)
#   
#   AZT3328 driver
#   Fixed compile warning when built without joystick support.
#   (Optimized via inline.)
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/azt3328.c
#   2004/12/30 08:53:54+01:00 perex@suse.cz +2 -2
#   [ALSA] Fix compile warning (make inline)
#   
#   D:2004/12/30 15:53:54
#   C:AZT3328 driver
#   F:pci/azt3328.c:1.22->1.23 
#   L:Fixed compile warning when built without joystick support.
#   L:(Optimized via inline.)
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 13:36:57+01:00 perex@suse.cz 
#   [ALSA] Fix open handling
#   
#   USB USX2Y
#   Return -EBUSY from snd_usX2Y_usbpcm_open(), if the associated hwdep
#   device is not opened.
#   
#   It now works as originally intended. Had forgotten a pair of parenthesis.
#   
#   Signed-off-by: Karsten Wiese <annabellesgarden@yahoo.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/usb/usx2y/usx2yhwdeppcm.c
#   2004/12/29 06:08:28+01:00 perex@suse.cz +2 -2
#   [ALSA] Fix open handling
#   
#   D:2004/12/29 13:08:28
#   C:USB USX2Y
#   F:usb/usx2y/usbusx2y.c:1.7->1.8 
#   F:usb/usx2y/usx2yhwdeppcm.c:1.1->1.2 
#   L:Return -EBUSY from snd_usX2Y_usbpcm_open(), if the associated hwdep
#   L:device is not opened.
#   L:
#   L:It now works as originally intended. Had forgotten a pair of parenthesis.
#   Signed-off-by: Karsten Wiese <annabellesgarden@yahoo.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/usb/usx2y/usbusx2y.c
#   2004/12/29 06:08:28+01:00 perex@suse.cz +5 -1
#   [ALSA] Fix open handling
#   
#   D:2004/12/29 13:08:28
#   C:USB USX2Y
#   F:usb/usx2y/usbusx2y.c:1.7->1.8 
#   F:usb/usx2y/usx2yhwdeppcm.c:1.1->1.2 
#   L:Return -EBUSY from snd_usX2Y_usbpcm_open(), if the associated hwdep
#   L:device is not opened.
#   L:
#   L:It now works as originally intended. Had forgotten a pair of parenthesis.
#   Signed-off-by: Karsten Wiese <annabellesgarden@yahoo.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 13:15:38+01:00 vojtech@suse.cz 
#   Merge suse.cz:/home/vojtech/bk/linus into suse.cz:/home/vojtech/bk/input
# 
# Documentation/kernel-parameters.txt
#   2005/01/03 13:15:35+01:00 vojtech@suse.cz +0 -0
#   Auto merged
# 
# ChangeSet
#   2005/01/03 13:07:33+01:00 perex@suse.cz 
#   [ALSA CVS]  delete unused file
#   
#   Remove nowhere referenced file. (egrep "filename\." didn't find
#   anything)
#   
#   Signed-off-by: Domen Puncer <domen@coderock.org>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# BitKeeper/deleted/.del-soundmem.h~20ad5e5d845ef7b5
#   2005/01/03 13:04:54+01:00 perex@suse.cz +0 -0
#   Delete: include/sound/soundmem.h
# 
# BitKeeper/deleted/.del-seq_oss_misc.c~f7618d1851f8b851
#   2005/01/03 13:04:18+01:00 perex@suse.cz +0 -0
#   Delete: sound/core/seq/oss/seq_oss_misc.c
# 
# ChangeSet
#   2005/01/03 11:48:48+01:00 perex@suse.cz 
#   [ALSA] Code clean up
#   
#   EMU10K1/EMU10K2 driver
#   Small code clean up.  Use snd_pcm_lib_preallocage_pages_for_all()
#   for buffer allocation.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/emu10k1/emu10k1x.c
#   2004/12/27 09:17:07+01:00 perex@suse.cz +6 -19
#   [ALSA] Code clean up
#   
#   D:2004/12/27 16:17:07
#   C:EMU10K1/EMU10K2 driver
#   F:pci/emu10k1/emu10k1x.c:1.1->1.2 
#   L:Small code clean up.  Use snd_pcm_lib_preallocage_pages_for_all()
#   L:for buffer allocation.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 11:47:44+01:00 perex@suse.cz 
#   [ALSA] Avoid VRA on codec chips
#   
#   YMFPCI driver
#   Avoid VRA setting on ac97 codec chips.  YMFPCI doesn't need VRA.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ymfpci/ymfpci_main.c
#   2004/12/27 09:09:19+01:00 perex@suse.cz +5 -0
#   [ALSA] Avoid VRA on codec chips
#   
#   D:2004/12/27 16:09:19
#   C:YMFPCI driver
#   F:pci/ymfpci/ymfpci_main.c:1.62->1.63 
#   L:Avoid VRA setting on ac97 codec chips.  YMFPCI doesn't need VRA.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 11:46:35+01:00 perex@suse.cz 
#   [ALSA] Add snd-ca0106 driver
#   
#   Documentation,PCI drivers,CA0106 driver
#   Added snd-ca0106 driver for SB Audigy LS / Live 24bit boards
#   by James Courtier-Dutton <James@superbug.demon.co.uk>.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ca0106/ca0106_proc.c
#   2005/01/03 10:00:44+01:00 perex@suse.cz +437 -0
#   [ALSA] Add snd-ca0106 driver
#   
#   D:2004/12/27 15:32:37
#   C:Documentation,PCI drivers,CA0106 driver
#   F:Documentation/ALSA-Configuration.txt:1.57->1.58 
#   F:pci/Kconfig:1.38->1.39 
#   F:pci/Makefile:1.18->1.19 
#   F:pci/ca0106/Makefile:INITIAL->1.1 
#   F:pci/ca0106/ca0106.h:INITIAL->1.1 
#   F:pci/ca0106/ca0106_main.c:INITIAL->1.1 
#   F:pci/ca0106/ca0106_mixer.c:INITIAL->1.1 
#   F:pci/ca0106/ca0106_proc.c:INITIAL->1.1 
#   L:Added snd-ca0106 driver for SB Audigy LS / Live 24bit boards
#   L:by James Courtier-Dutton <James@superbug.demon.co.uk>.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ca0106/ca0106_mixer.c
#   2005/01/03 10:00:39+01:00 perex@suse.cz +635 -0
#   [ALSA] Add snd-ca0106 driver
#   
#   D:2004/12/27 15:32:37
#   C:Documentation,PCI drivers,CA0106 driver
#   F:Documentation/ALSA-Configuration.txt:1.57->1.58 
#   F:pci/Kconfig:1.38->1.39 
#   F:pci/Makefile:1.18->1.19 
#   F:pci/ca0106/Makefile:INITIAL->1.1 
#   F:pci/ca0106/ca0106.h:INITIAL->1.1 
#   F:pci/ca0106/ca0106_main.c:INITIAL->1.1 
#   F:pci/ca0106/ca0106_mixer.c:INITIAL->1.1 
#   F:pci/ca0106/ca0106_proc.c:INITIAL->1.1 
#   L:Added snd-ca0106 driver for SB Audigy LS / Live 24bit boards
#   L:by James Courtier-Dutton <James@superbug.demon.co.uk>.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ca0106/ca0106_main.c
#   2005/01/03 10:00:33+01:00 perex@suse.cz +1271 -0
#   [ALSA] Add snd-ca0106 driver
#   
#   D:2004/12/27 15:32:37
#   C:Documentation,PCI drivers,CA0106 driver
#   F:Documentation/ALSA-Configuration.txt:1.57->1.58 
#   F:pci/Kconfig:1.38->1.39 
#   F:pci/Makefile:1.18->1.19 
#   F:pci/ca0106/Makefile:INITIAL->1.1 
#   F:pci/ca0106/ca0106.h:INITIAL->1.1 
#   F:pci/ca0106/ca0106_main.c:INITIAL->1.1 
#   F:pci/ca0106/ca0106_mixer.c:INITIAL->1.1 
#   F:pci/ca0106/ca0106_proc.c:INITIAL->1.1 
#   L:Added snd-ca0106 driver for SB Audigy LS / Live 24bit boards
#   L:by James Courtier-Dutton <James@superbug.demon.co.uk>.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ca0106/ca0106.h
#   2005/01/03 10:00:27+01:00 perex@suse.cz +549 -0
#   [ALSA] Add snd-ca0106 driver
#   
#   D:2004/12/27 15:32:37
#   C:Documentation,PCI drivers,CA0106 driver
#   F:Documentation/ALSA-Configuration.txt:1.57->1.58 
#   F:pci/Kconfig:1.38->1.39 
#   F:pci/Makefile:1.18->1.19 
#   F:pci/ca0106/Makefile:INITIAL->1.1 
#   F:pci/ca0106/ca0106.h:INITIAL->1.1 
#   F:pci/ca0106/ca0106_main.c:INITIAL->1.1 
#   F:pci/ca0106/ca0106_mixer.c:INITIAL->1.1 
#   F:pci/ca0106/ca0106_proc.c:INITIAL->1.1 
#   L:Added snd-ca0106 driver for SB Audigy LS / Live 24bit boards
#   L:by James Courtier-Dutton <James@superbug.demon.co.uk>.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/Makefile
#   2004/12/27 08:32:37+01:00 perex@suse.cz +1 -0
#   [ALSA] Add snd-ca0106 driver
#   
#   D:2004/12/27 15:32:37
#   C:Documentation,PCI drivers,CA0106 driver
#   F:Documentation/ALSA-Configuration.txt:1.57->1.58 
#   F:pci/Kconfig:1.38->1.39 
#   F:pci/Makefile:1.18->1.19 
#   F:pci/ca0106/Makefile:INITIAL->1.1 
#   F:pci/ca0106/ca0106.h:INITIAL->1.1 
#   F:pci/ca0106/ca0106_main.c:INITIAL->1.1 
#   F:pci/ca0106/ca0106_mixer.c:INITIAL->1.1 
#   F:pci/ca0106/ca0106_proc.c:INITIAL->1.1 
#   L:Added snd-ca0106 driver for SB Audigy LS / Live 24bit boards
#   L:by James Courtier-Dutton <James@superbug.demon.co.uk>.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ca0106/ca0106_proc.c
#   2005/01/03 10:00:44+01:00 perex@suse.cz +0 -0
#   BitKeeper file /home/perex/bk/linux-sound/work/sound/pci/ca0106/ca0106_proc.c
# 
# sound/pci/ca0106/ca0106_mixer.c
#   2005/01/03 10:00:39+01:00 perex@suse.cz +0 -0
#   BitKeeper file /home/perex/bk/linux-sound/work/sound/pci/ca0106/ca0106_mixer.c
# 
# sound/pci/ca0106/ca0106_main.c
#   2005/01/03 10:00:33+01:00 perex@suse.cz +0 -0
#   BitKeeper file /home/perex/bk/linux-sound/work/sound/pci/ca0106/ca0106_main.c
# 
# sound/pci/ca0106/ca0106.h
#   2005/01/03 10:00:27+01:00 perex@suse.cz +0 -0
#   BitKeeper file /home/perex/bk/linux-sound/work/sound/pci/ca0106/ca0106.h
# 
# sound/pci/Kconfig
#   2004/12/27 08:32:37+01:00 perex@suse.cz +11 -0
#   [ALSA] Add snd-ca0106 driver
#   
#   D:2004/12/27 15:32:37
#   C:Documentation,PCI drivers,CA0106 driver
#   F:Documentation/ALSA-Configuration.txt:1.57->1.58 
#   F:pci/Kconfig:1.38->1.39 
#   F:pci/Makefile:1.18->1.19 
#   F:pci/ca0106/Makefile:INITIAL->1.1 
#   F:pci/ca0106/ca0106.h:INITIAL->1.1 
#   F:pci/ca0106/ca0106_main.c:INITIAL->1.1 
#   F:pci/ca0106/ca0106_mixer.c:INITIAL->1.1 
#   F:pci/ca0106/ca0106_proc.c:INITIAL->1.1 
#   L:Added snd-ca0106 driver for SB Audigy LS / Live 24bit boards
#   L:by James Courtier-Dutton <James@superbug.demon.co.uk>.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# Documentation/sound/alsa/ALSA-Configuration.txt
#   2004/12/27 08:32:37+01:00 perex@suse.cz +8 -0
#   [ALSA] Add snd-ca0106 driver
#   
#   D:2004/12/27 15:32:37
#   C:Documentation,PCI drivers,CA0106 driver
#   F:Documentation/ALSA-Configuration.txt:1.57->1.58 
#   F:pci/Kconfig:1.38->1.39 
#   F:pci/Makefile:1.18->1.19 
#   F:pci/ca0106/Makefile:INITIAL->1.1 
#   F:pci/ca0106/ca0106.h:INITIAL->1.1 
#   F:pci/ca0106/ca0106_main.c:INITIAL->1.1 
#   F:pci/ca0106/ca0106_mixer.c:INITIAL->1.1 
#   F:pci/ca0106/ca0106_proc.c:INITIAL->1.1 
#   L:Added snd-ca0106 driver for SB Audigy LS / Live 24bit boards
#   L:by James Courtier-Dutton <James@superbug.demon.co.uk>.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ca0106/Makefile
#   2005/01/03 10:00:23+01:00 perex@suse.cz +3 -0
#   [ALSA] Add snd-ca0106 driver
#   
#   D:2004/12/27 15:32:37
#   C:Documentation,PCI drivers,CA0106 driver
#   F:Documentation/ALSA-Configuration.txt:1.57->1.58 
#   F:pci/Kconfig:1.38->1.39 
#   F:pci/Makefile:1.18->1.19 
#   F:pci/ca0106/Makefile:INITIAL->1.1 
#   F:pci/ca0106/ca0106.h:INITIAL->1.1 
#   F:pci/ca0106/ca0106_main.c:INITIAL->1.1 
#   F:pci/ca0106/ca0106_mixer.c:INITIAL->1.1 
#   F:pci/ca0106/ca0106_proc.c:INITIAL->1.1 
#   L:Added snd-ca0106 driver for SB Audigy LS / Live 24bit boards
#   L:by James Courtier-Dutton <James@superbug.demon.co.uk>.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ca0106/Makefile
#   2005/01/03 10:00:23+01:00 perex@suse.cz +0 -0
#   BitKeeper file /home/perex/bk/linux-sound/work/sound/pci/ca0106/Makefile
# 
# ChangeSet
#   2005/01/03 11:45:19+01:00 perex@suse.cz 
#   [ALSA] Add emu10k1x driver
#   
#   Documentation,PCI drivers,EMU10K1/EMU10K2 driver
#   Added the new driver, snd-emu10k1x, for SB Live Dell OEM version
#   by Francisco Moraes <fmoraes@nc.rr.com>.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/emu10k1/Makefile
#   2004/12/27 08:18:34+01:00 perex@suse.cz +2 -0
#   [ALSA] Add emu10k1x driver
#   
#   D:2004/12/27 15:18:33
#   C:Documentation,PCI drivers,EMU10K1/EMU10K2 driver
#   F:Documentation/ALSA-Configuration.txt:1.56->1.57 
#   F:pci/Kconfig:1.37->1.38 
#   F:pci/emu10k1/Makefile:1.11->1.12 
#   F:pci/emu10k1/emu10k1x.c:INITIAL->1.1 
#   L:Added the new driver, snd-emu10k1x, for SB Live Dell OEM version
#   L:by Francisco Moraes <fmoraes@nc.rr.com>.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/Kconfig
#   2004/12/27 08:18:34+01:00 perex@suse.cz +12 -0
#   [ALSA] Add emu10k1x driver
#   
#   D:2004/12/27 15:18:33
#   C:Documentation,PCI drivers,EMU10K1/EMU10K2 driver
#   F:Documentation/ALSA-Configuration.txt:1.56->1.57 
#   F:pci/Kconfig:1.37->1.38 
#   F:pci/emu10k1/Makefile:1.11->1.12 
#   F:pci/emu10k1/emu10k1x.c:INITIAL->1.1 
#   L:Added the new driver, snd-emu10k1x, for SB Live Dell OEM version
#   L:by Francisco Moraes <fmoraes@nc.rr.com>.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# Documentation/sound/alsa/ALSA-Configuration.txt
#   2004/12/27 08:18:33+01:00 perex@suse.cz +7 -0
#   [ALSA] Add emu10k1x driver
#   
#   D:2004/12/27 15:18:33
#   C:Documentation,PCI drivers,EMU10K1/EMU10K2 driver
#   F:Documentation/ALSA-Configuration.txt:1.56->1.57 
#   F:pci/Kconfig:1.37->1.38 
#   F:pci/emu10k1/Makefile:1.11->1.12 
#   F:pci/emu10k1/emu10k1x.c:INITIAL->1.1 
#   L:Added the new driver, snd-emu10k1x, for SB Live Dell OEM version
#   L:by Francisco Moraes <fmoraes@nc.rr.com>.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/emu10k1/emu10k1x.c
#   2005/01/03 09:59:54+01:00 perex@suse.cz +1656 -0
#   [ALSA] Add emu10k1x driver
#   
#   D:2004/12/27 15:18:33
#   C:Documentation,PCI drivers,EMU10K1/EMU10K2 driver
#   F:Documentation/ALSA-Configuration.txt:1.56->1.57 
#   F:pci/Kconfig:1.37->1.38 
#   F:pci/emu10k1/Makefile:1.11->1.12 
#   F:pci/emu10k1/emu10k1x.c:INITIAL->1.1 
#   L:Added the new driver, snd-emu10k1x, for SB Live Dell OEM version
#   L:by Francisco Moraes <fmoraes@nc.rr.com>.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/emu10k1/emu10k1x.c
#   2005/01/03 09:59:54+01:00 perex@suse.cz +0 -0
#   BitKeeper file /home/perex/bk/linux-sound/work/sound/pci/emu10k1/emu10k1x.c
# 
# ChangeSet
#   2005/01/03 11:44:08+01:00 perex@suse.cz 
#   [ALSA] Allow strings for ac97_quirk options
#   
#   AC97 Codec Core,Intel8x0 driver,VIA82xx driver
#   Since there are many ac97_quirk values, the number is no longer good to
#   remember what it really means.  Now ac97_quirk option becomes as a string
#   option, and more undstandable.  For example, you can pass like
#   'ac97_quirk=hp_only'.  The old number is still kept and parsed for backward
#   compatibility.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/via82xx.c
#   2004/12/27 07:36:39+01:00 perex@suse.cz +4 -4
#   [ALSA] Allow strings for ac97_quirk options
#   
#   D:2004/12/27 14:36:39
#   C:AC97 Codec Core,Intel8x0 driver,VIA82xx driver
#   F:include/ac97_codec.h:1.60->1.61 
#   F:pci/intel8x0.c:1.185->1.186 
#   F:pci/via82xx.c:1.133->1.134 
#   F:pci/ac97/ac97_codec.c:1.161->1.162 
#   L:Since there are many ac97_quirk values, the number is no longer good to
#   L:remember what it really means.  Now ac97_quirk option becomes as a string
#   L:option, and more undstandable.  For example, you can pass like
#   L:'ac97_quirk=hp_only'.  The old number is still kept and parsed for backward
#   L:compatibility.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/intel8x0.c
#   2004/12/27 07:36:39+01:00 perex@suse.cz +4 -4
#   [ALSA] Allow strings for ac97_quirk options
#   
#   D:2004/12/27 14:36:39
#   C:AC97 Codec Core,Intel8x0 driver,VIA82xx driver
#   F:include/ac97_codec.h:1.60->1.61 
#   F:pci/intel8x0.c:1.185->1.186 
#   F:pci/via82xx.c:1.133->1.134 
#   F:pci/ac97/ac97_codec.c:1.161->1.162 
#   L:Since there are many ac97_quirk values, the number is no longer good to
#   L:remember what it really means.  Now ac97_quirk option becomes as a string
#   L:option, and more undstandable.  For example, you can pass like
#   L:'ac97_quirk=hp_only'.  The old number is still kept and parsed for backward
#   L:compatibility.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ac97/ac97_codec.c
#   2004/12/27 07:36:39+01:00 perex@suse.cz +70 -30
#   [ALSA] Allow strings for ac97_quirk options
#   
#   D:2004/12/27 14:36:39
#   C:AC97 Codec Core,Intel8x0 driver,VIA82xx driver
#   F:include/ac97_codec.h:1.60->1.61 
#   F:pci/intel8x0.c:1.185->1.186 
#   F:pci/via82xx.c:1.133->1.134 
#   F:pci/ac97/ac97_codec.c:1.161->1.162 
#   L:Since there are many ac97_quirk values, the number is no longer good to
#   L:remember what it really means.  Now ac97_quirk option becomes as a string
#   L:option, and more undstandable.  For example, you can pass like
#   L:'ac97_quirk=hp_only'.  The old number is still kept and parsed for backward
#   L:compatibility.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# include/sound/ac97_codec.h
#   2004/12/27 07:36:39+01:00 perex@suse.cz +1 -1
#   [ALSA] Allow strings for ac97_quirk options
#   
#   D:2004/12/27 14:36:39
#   C:AC97 Codec Core,Intel8x0 driver,VIA82xx driver
#   F:include/ac97_codec.h:1.60->1.61 
#   F:pci/intel8x0.c:1.185->1.186 
#   F:pci/via82xx.c:1.133->1.134 
#   F:pci/ac97/ac97_codec.c:1.161->1.162 
#   L:Since there are many ac97_quirk values, the number is no longer good to
#   L:remember what it really means.  Now ac97_quirk option becomes as a string
#   L:option, and more undstandable.  For example, you can pass like
#   L:'ac97_quirk=hp_only'.  The old number is still kept and parsed for backward
#   L:compatibility.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 11:42:58+01:00 perex@suse.cz 
#   [ALSA] Fix handling of user-defined controls
#   
#   Control Midlevel,ALSA Core
#   Fixed handling of user-defined controls.
#   The max number of user-defined controls is limited, too (as default 32).
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/control.c
#   2004/12/27 07:26:19+01:00 perex@suse.cz +44 -32
#   [ALSA] Fix handling of user-defined controls
#   
#   D:2004/12/27 14:26:19
#   C:Control Midlevel,ALSA Core
#   F:core/control.c:1.52->1.53 
#   F:include/core.h:1.62->1.63 
#   L:Fixed handling of user-defined controls.
#   L:The max number of user-defined controls is limited, too (as default 32).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# include/sound/core.h
#   2004/12/27 07:26:20+01:00 perex@suse.cz +1 -0
#   [ALSA] Fix handling of user-defined controls
#   
#   D:2004/12/27 14:26:19
#   C:Control Midlevel,ALSA Core
#   F:core/control.c:1.52->1.53 
#   F:include/core.h:1.62->1.63 
#   L:Fixed handling of user-defined controls.
#   L:The max number of user-defined controls is limited, too (as default 32).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 11:41:53+01:00 perex@suse.cz 
#   [ALSA] Don't probe rates when bus->no_vra is set
#   
#   AC97 Codec Core
#   Don't probe rates and set VRA/VRM bits when bus->no_vra is set.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ac97/ac97_codec.c
#   2004/12/27 07:00:40+01:00 perex@suse.cz +12 -2
#   [ALSA] Don't probe rates when bus->no_vra is set
#   
#   D:2004/12/27 14:00:40
#   C:AC97 Codec Core
#   F:pci/ac97/ac97_codec.c:1.160->1.161 
#   L:Don't probe rates and set VRA/VRM bits when bus->no_vra is set.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 11:40:49+01:00 perex@suse.cz 
#   [ALSA] Use msleep() in ac97 callbacks
#   
#   CS46xx driver,NM256 driver
#   Use msleep() instead of mdelay() in ac97 callbacks (spinlock was removed).
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/nm256/nm256.c
#   2004/12/27 06:34:44+01:00 perex@suse.cz +2 -2
#   [ALSA] Use msleep() in ac97 callbacks
#   
#   D:2004/12/27 13:34:44
#   C:CS46xx driver,NM256 driver
#   F:pci/cs46xx/cs46xx_lib.c:1.91->1.92 
#   F:pci/nm256/nm256.c:1.56->1.57 
#   L:Use msleep() instead of mdelay() in ac97 callbacks (spinlock was removed).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/cs46xx/cs46xx_lib.c
#   2004/12/27 06:34:44+01:00 perex@suse.cz +1 -1
#   [ALSA] Use msleep() in ac97 callbacks
#   
#   D:2004/12/27 13:34:44
#   C:CS46xx driver,NM256 driver
#   F:pci/cs46xx/cs46xx_lib.c:1.91->1.92 
#   F:pci/nm256/nm256.c:1.56->1.57 
#   L:Use msleep() instead of mdelay() in ac97 callbacks (spinlock was removed).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 11:39:40+01:00 perex@suse.cz 
#   [ALSA] Spinlock removal and loop fix
#   
#   au88x0 driver
#   Removed unnecessary spinlocks.
#   The invalid (typo) loop in the codec read callback is fixed.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/au88x0/au88x0_core.c
#   2004/12/27 06:31:45+01:00 perex@suse.cz +3 -17
#   [ALSA] Spinlock removal and loop fix
#   
#   D:2004/12/27 13:31:45
#   C:au88x0 driver
#   F:pci/au88x0/au88x0_core.c:1.8->1.9 
#   L:Removed unnecessary spinlocks.
#   L:The invalid (typo) loop in the codec read callback is fixed.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 11:38:37+01:00 perex@suse.cz 
#   [ALSA] Fix spinlocks
#   
#   FM801 driver
#   Fixed the possible deadlock with no irq spinlock.
#   Also, spin_lock_irqsave() is replaced with spin_lock_irq() in some places.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/fm801.c
#   2004/12/27 06:29:27+01:00 perex@suse.cz +7 -8
#   [ALSA] Fix spinlocks
#   
#   D:2004/12/27 13:29:27
#   C:FM801 driver
#   F:pci/fm801.c:1.54->1.55 
#   L:Fixed the possible deadlock with no irq spinlock.
#   L:Also, spin_lock_irqsave() is replaced with spin_lock_irq() in some places.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 11:37:31+01:00 perex@suse.cz 
#   [ALSA] Remove unnecessary ac97 spinlocks
#   
#   ATIIXP driver,ATIIXP-modem driver,ENS1370/1+ driver,Intel8x0 driver
#   Intel8x0-modem driver,Maestro3 driver,VIA82xx driver
#   VIA82xx-modem driver
#   Removed unnecessary spinlocks in ac97 callbacks.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/via82xx_modem.c
#   2004/12/27 06:27:19+01:00 perex@suse.cz +0 -7
#   [ALSA] Remove unnecessary ac97 spinlocks
#   
#   D:2004/12/27 13:27:09
#   C:ATIIXP driver,ATIIXP-modem driver,ENS1370/1+ driver,Intel8x0 driver
#   C:Intel8x0-modem driver,Maestro3 driver,VIA82xx driver
#   C:VIA82xx-modem driver
#   F:pci/atiixp.c:1.27->1.28 
#   F:pci/atiixp_modem.c:1.11->1.12 
#   F:pci/ens1370.c:1.72->1.73 
#   F:pci/intel8x0.c:1.184->1.185 
#   F:pci/intel8x0m.c:1.24->1.25 
#   F:pci/maestro3.c:1.66->1.67 
#   F:pci/via82xx.c:1.132->1.133 
#   F:pci/via82xx_modem.c:1.2->1.3 
#   L:Removed unnecessary spinlocks in ac97 callbacks.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/via82xx.c
#   2004/12/27 06:27:19+01:00 perex@suse.cz +0 -7
#   [ALSA] Remove unnecessary ac97 spinlocks
#   
#   D:2004/12/27 13:27:09
#   C:ATIIXP driver,ATIIXP-modem driver,ENS1370/1+ driver,Intel8x0 driver
#   C:Intel8x0-modem driver,Maestro3 driver,VIA82xx driver
#   C:VIA82xx-modem driver
#   F:pci/atiixp.c:1.27->1.28 
#   F:pci/atiixp_modem.c:1.11->1.12 
#   F:pci/ens1370.c:1.72->1.73 
#   F:pci/intel8x0.c:1.184->1.185 
#   F:pci/intel8x0m.c:1.24->1.25 
#   F:pci/maestro3.c:1.66->1.67 
#   F:pci/via82xx.c:1.132->1.133 
#   F:pci/via82xx_modem.c:1.2->1.3 
#   L:Removed unnecessary spinlocks in ac97 callbacks.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/maestro3.c
#   2004/12/27 06:27:19+01:00 perex@suse.cz +7 -17
#   [ALSA] Remove unnecessary ac97 spinlocks
#   
#   D:2004/12/27 13:27:09
#   C:ATIIXP driver,ATIIXP-modem driver,ENS1370/1+ driver,Intel8x0 driver
#   C:Intel8x0-modem driver,Maestro3 driver,VIA82xx driver
#   C:VIA82xx-modem driver
#   F:pci/atiixp.c:1.27->1.28 
#   F:pci/atiixp_modem.c:1.11->1.12 
#   F:pci/ens1370.c:1.72->1.73 
#   F:pci/intel8x0.c:1.184->1.185 
#   F:pci/intel8x0m.c:1.24->1.25 
#   F:pci/maestro3.c:1.66->1.67 
#   F:pci/via82xx.c:1.132->1.133 
#   F:pci/via82xx_modem.c:1.2->1.3 
#   L:Removed unnecessary spinlocks in ac97 callbacks.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/intel8x0m.c
#   2004/12/27 06:27:19+01:00 perex@suse.cz +0 -6
#   [ALSA] Remove unnecessary ac97 spinlocks
#   
#   D:2004/12/27 13:27:09
#   C:ATIIXP driver,ATIIXP-modem driver,ENS1370/1+ driver,Intel8x0 driver
#   C:Intel8x0-modem driver,Maestro3 driver,VIA82xx driver
#   C:VIA82xx-modem driver
#   F:pci/atiixp.c:1.27->1.28 
#   F:pci/atiixp_modem.c:1.11->1.12 
#   F:pci/ens1370.c:1.72->1.73 
#   F:pci/intel8x0.c:1.184->1.185 
#   F:pci/intel8x0m.c:1.24->1.25 
#   F:pci/maestro3.c:1.66->1.67 
#   F:pci/via82xx.c:1.132->1.133 
#   F:pci/via82xx_modem.c:1.2->1.3 
#   L:Removed unnecessary spinlocks in ac97 callbacks.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/intel8x0.c
#   2004/12/27 06:27:10+01:00 perex@suse.cz +1 -15
#   [ALSA] Remove unnecessary ac97 spinlocks
#   
#   D:2004/12/27 13:27:09
#   C:ATIIXP driver,ATIIXP-modem driver,ENS1370/1+ driver,Intel8x0 driver
#   C:Intel8x0-modem driver,Maestro3 driver,VIA82xx driver
#   C:VIA82xx-modem driver
#   F:pci/atiixp.c:1.27->1.28 
#   F:pci/atiixp_modem.c:1.11->1.12 
#   F:pci/ens1370.c:1.72->1.73 
#   F:pci/intel8x0.c:1.184->1.185 
#   F:pci/intel8x0m.c:1.24->1.25 
#   F:pci/maestro3.c:1.66->1.67 
#   F:pci/via82xx.c:1.132->1.133 
#   F:pci/via82xx_modem.c:1.2->1.3 
#   L:Removed unnecessary spinlocks in ac97 callbacks.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ens1370.c
#   2004/12/27 06:27:10+01:00 perex@suse.cz +7 -15
#   [ALSA] Remove unnecessary ac97 spinlocks
#   
#   D:2004/12/27 13:27:09
#   C:ATIIXP driver,ATIIXP-modem driver,ENS1370/1+ driver,Intel8x0 driver
#   C:Intel8x0-modem driver,Maestro3 driver,VIA82xx driver
#   C:VIA82xx-modem driver
#   F:pci/atiixp.c:1.27->1.28 
#   F:pci/atiixp_modem.c:1.11->1.12 
#   F:pci/ens1370.c:1.72->1.73 
#   F:pci/intel8x0.c:1.184->1.185 
#   F:pci/intel8x0m.c:1.24->1.25 
#   F:pci/maestro3.c:1.66->1.67 
#   F:pci/via82xx.c:1.132->1.133 
#   F:pci/via82xx_modem.c:1.2->1.3 
#   L:Removed unnecessary spinlocks in ac97 callbacks.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/atiixp_modem.c
#   2004/12/27 06:27:09+01:00 perex@suse.cz +1 -9
#   [ALSA] Remove unnecessary ac97 spinlocks
#   
#   D:2004/12/27 13:27:09
#   C:ATIIXP driver,ATIIXP-modem driver,ENS1370/1+ driver,Intel8x0 driver
#   C:Intel8x0-modem driver,Maestro3 driver,VIA82xx driver
#   C:VIA82xx-modem driver
#   F:pci/atiixp.c:1.27->1.28 
#   F:pci/atiixp_modem.c:1.11->1.12 
#   F:pci/ens1370.c:1.72->1.73 
#   F:pci/intel8x0.c:1.184->1.185 
#   F:pci/intel8x0m.c:1.24->1.25 
#   F:pci/maestro3.c:1.66->1.67 
#   F:pci/via82xx.c:1.132->1.133 
#   F:pci/via82xx_modem.c:1.2->1.3 
#   L:Removed unnecessary spinlocks in ac97 callbacks.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/atiixp.c
#   2004/12/27 06:27:09+01:00 perex@suse.cz +1 -9
#   [ALSA] Remove unnecessary ac97 spinlocks
#   
#   D:2004/12/27 13:27:09
#   C:ATIIXP driver,ATIIXP-modem driver,ENS1370/1+ driver,Intel8x0 driver
#   C:Intel8x0-modem driver,Maestro3 driver,VIA82xx driver
#   C:VIA82xx-modem driver
#   F:pci/atiixp.c:1.27->1.28 
#   F:pci/atiixp_modem.c:1.11->1.12 
#   F:pci/ens1370.c:1.72->1.73 
#   F:pci/intel8x0.c:1.184->1.185 
#   F:pci/intel8x0m.c:1.24->1.25 
#   F:pci/maestro3.c:1.66->1.67 
#   F:pci/via82xx.c:1.132->1.133 
#   F:pci/via82xx_modem.c:1.2->1.3 
#   L:Removed unnecessary spinlocks in ac97 callbacks.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 11:36:22+01:00 perex@suse.cz 
#   [ALSA] Remove spinlock in callbacks
#   
#   AC97 Codec Core,AK4531 codec
#   Removed spinlocks in callback, use sempahore instead since all ac97
#   callbacks are supposed to be non-atomic.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ac97/ak4531_codec.c
#   2004/12/27 06:24:29+01:00 perex@suse.cz +13 -19
#   [ALSA] Remove spinlock in callbacks
#   
#   D:2004/12/27 13:24:29
#   C:AC97 Codec Core,AK4531 codec
#   F:include/ac97_codec.h:1.59->1.60 
#   F:include/ak4531_codec.h:1.4->1.5 
#   F:pci/ac97/ac97_codec.c:1.159->1.160 
#   F:pci/ac97/ac97_local.h:1.10->1.11 
#   F:pci/ac97/ac97_patch.c:1.64->1.65 
#   F:pci/ac97/ac97_pcm.c:1.18->1.19 
#   F:pci/ac97/ac97_proc.c:1.12->1.13 
#   F:pci/ac97/ak4531_codec.c:1.13->1.14 
#   L:Removed spinlocks in callback, use sempahore instead since all ac97
#   L:callbacks are supposed to be non-atomic.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ac97/ac97_proc.c
#   2004/12/27 06:24:29+01:00 perex@suse.cz +6 -6
#   [ALSA] Remove spinlock in callbacks
#   
#   D:2004/12/27 13:24:29
#   C:AC97 Codec Core,AK4531 codec
#   F:include/ac97_codec.h:1.59->1.60 
#   F:include/ak4531_codec.h:1.4->1.5 
#   F:pci/ac97/ac97_codec.c:1.159->1.160 
#   F:pci/ac97/ac97_local.h:1.10->1.11 
#   F:pci/ac97/ac97_patch.c:1.64->1.65 
#   F:pci/ac97/ac97_pcm.c:1.18->1.19 
#   F:pci/ac97/ac97_proc.c:1.12->1.13 
#   F:pci/ac97/ak4531_codec.c:1.13->1.14 
#   L:Removed spinlocks in callback, use sempahore instead since all ac97
#   L:callbacks are supposed to be non-atomic.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ac97/ac97_pcm.c
#   2004/12/27 06:24:29+01:00 perex@suse.cz +5 -7
#   [ALSA] Remove spinlock in callbacks
#   
#   D:2004/12/27 13:24:29
#   C:AC97 Codec Core,AK4531 codec
#   F:include/ac97_codec.h:1.59->1.60 
#   F:include/ak4531_codec.h:1.4->1.5 
#   F:pci/ac97/ac97_codec.c:1.159->1.160 
#   F:pci/ac97/ac97_local.h:1.10->1.11 
#   F:pci/ac97/ac97_patch.c:1.64->1.65 
#   F:pci/ac97/ac97_pcm.c:1.18->1.19 
#   F:pci/ac97/ac97_proc.c:1.12->1.13 
#   F:pci/ac97/ak4531_codec.c:1.13->1.14 
#   L:Removed spinlocks in callback, use sempahore instead since all ac97
#   L:callbacks are supposed to be non-atomic.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ac97/ac97_patch.c
#   2004/12/27 06:24:29+01:00 perex@suse.cz +2 -2
#   [ALSA] Remove spinlock in callbacks
#   
#   D:2004/12/27 13:24:29
#   C:AC97 Codec Core,AK4531 codec
#   F:include/ac97_codec.h:1.59->1.60 
#   F:include/ak4531_codec.h:1.4->1.5 
#   F:pci/ac97/ac97_codec.c:1.159->1.160 
#   F:pci/ac97/ac97_local.h:1.10->1.11 
#   F:pci/ac97/ac97_patch.c:1.64->1.65 
#   F:pci/ac97/ac97_pcm.c:1.18->1.19 
#   F:pci/ac97/ac97_proc.c:1.12->1.13 
#   F:pci/ac97/ak4531_codec.c:1.13->1.14 
#   L:Removed spinlocks in callback, use sempahore instead since all ac97
#   L:callbacks are supposed to be non-atomic.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ac97/ac97_local.h
#   2004/12/27 06:24:29+01:00 perex@suse.cz +3 -0
#   [ALSA] Remove spinlock in callbacks
#   
#   D:2004/12/27 13:24:29
#   C:AC97 Codec Core,AK4531 codec
#   F:include/ac97_codec.h:1.59->1.60 
#   F:include/ak4531_codec.h:1.4->1.5 
#   F:pci/ac97/ac97_codec.c:1.159->1.160 
#   F:pci/ac97/ac97_local.h:1.10->1.11 
#   F:pci/ac97/ac97_patch.c:1.64->1.65 
#   F:pci/ac97/ac97_pcm.c:1.18->1.19 
#   F:pci/ac97/ac97_proc.c:1.12->1.13 
#   F:pci/ac97/ak4531_codec.c:1.13->1.14 
#   L:Removed spinlocks in callback, use sempahore instead since all ac97
#   L:callbacks are supposed to be non-atomic.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ac97/ac97_codec.c
#   2004/12/27 06:24:29+01:00 perex@suse.cz +52 -45
#   [ALSA] Remove spinlock in callbacks
#   
#   D:2004/12/27 13:24:29
#   C:AC97 Codec Core,AK4531 codec
#   F:include/ac97_codec.h:1.59->1.60 
#   F:include/ak4531_codec.h:1.4->1.5 
#   F:pci/ac97/ac97_codec.c:1.159->1.160 
#   F:pci/ac97/ac97_local.h:1.10->1.11 
#   F:pci/ac97/ac97_patch.c:1.64->1.65 
#   F:pci/ac97/ac97_pcm.c:1.18->1.19 
#   F:pci/ac97/ac97_proc.c:1.12->1.13 
#   F:pci/ac97/ak4531_codec.c:1.13->1.14 
#   L:Removed spinlocks in callback, use sempahore instead since all ac97
#   L:callbacks are supposed to be non-atomic.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# include/sound/ak4531_codec.h
#   2004/12/27 06:24:29+01:00 perex@suse.cz +1 -1
#   [ALSA] Remove spinlock in callbacks
#   
#   D:2004/12/27 13:24:29
#   C:AC97 Codec Core,AK4531 codec
#   F:include/ac97_codec.h:1.59->1.60 
#   F:include/ak4531_codec.h:1.4->1.5 
#   F:pci/ac97/ac97_codec.c:1.159->1.160 
#   F:pci/ac97/ac97_local.h:1.10->1.11 
#   F:pci/ac97/ac97_patch.c:1.64->1.65 
#   F:pci/ac97/ac97_pcm.c:1.18->1.19 
#   F:pci/ac97/ac97_proc.c:1.12->1.13 
#   F:pci/ac97/ak4531_codec.c:1.13->1.14 
#   L:Removed spinlocks in callback, use sempahore instead since all ac97
#   L:callbacks are supposed to be non-atomic.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# include/sound/ac97_codec.h
#   2004/12/27 06:24:29+01:00 perex@suse.cz +2 -2
#   [ALSA] Remove spinlock in callbacks
#   
#   D:2004/12/27 13:24:29
#   C:AC97 Codec Core,AK4531 codec
#   F:include/ac97_codec.h:1.59->1.60 
#   F:include/ak4531_codec.h:1.4->1.5 
#   F:pci/ac97/ac97_codec.c:1.159->1.160 
#   F:pci/ac97/ac97_local.h:1.10->1.11 
#   F:pci/ac97/ac97_patch.c:1.64->1.65 
#   F:pci/ac97/ac97_pcm.c:1.18->1.19 
#   F:pci/ac97/ac97_proc.c:1.12->1.13 
#   F:pci/ac97/ak4531_codec.c:1.13->1.14 
#   L:Removed spinlocks in callback, use sempahore instead since all ac97
#   L:callbacks are supposed to be non-atomic.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 11:35:15+01:00 perex@suse.cz 
#   [ALSA] Unify ac97 control callbacks
#   
#   AC97 Codec Core
#   Unified single_* and double_* control callbacks.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ac97/ac97_patch.c
#   2004/12/27 06:16:41+01:00 perex@suse.cz +7 -7
#   [ALSA] Unify ac97 control callbacks
#   
#   D:2004/12/27 13:16:41
#   C:AC97 Codec Core
#   F:pci/ac97/ac97_codec.c:1.158->1.159 
#   F:pci/ac97/ac97_local.h:1.9->1.10 
#   F:pci/ac97/ac97_patch.c:1.63->1.64 
#   L:Unified single_* and double_* control callbacks.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ac97/ac97_local.h
#   2004/12/27 06:16:41+01:00 perex@suse.cz +11 -11
#   [ALSA] Unify ac97 control callbacks
#   
#   D:2004/12/27 13:16:41
#   C:AC97 Codec Core
#   F:pci/ac97/ac97_codec.c:1.158->1.159 
#   F:pci/ac97/ac97_local.h:1.9->1.10 
#   F:pci/ac97/ac97_patch.c:1.63->1.64 
#   L:Unified single_* and double_* control callbacks.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ac97/ac97_codec.c
#   2004/12/27 06:16:41+01:00 perex@suse.cz +47 -88
#   [ALSA] Unify ac97 control callbacks
#   
#   D:2004/12/27 13:16:41
#   C:AC97 Codec Core
#   F:pci/ac97/ac97_codec.c:1.158->1.159 
#   F:pci/ac97/ac97_local.h:1.9->1.10 
#   F:pci/ac97/ac97_patch.c:1.63->1.64 
#   L:Unified single_* and double_* control callbacks.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 11:34:08+01:00 perex@suse.cz 
#   [ALSA] Replace long delays with msleep()
#   
#   au88x0 driver
#   Long udelay()'s are replaced with msleep() as much as possible.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/au88x0/au88x0_core.c
#   2004/12/27 06:08:53+01:00 perex@suse.cz +13 -13
#   [ALSA] Replace long delays with msleep()
#   
#   D:2004/12/27 13:08:53
#   C:au88x0 driver
#   F:pci/au88x0/au88x0_core.c:1.7->1.8 
#   L:Long udelay()'s are replaced with msleep() as much as possible.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 11:33:00+01:00 perex@suse.cz 
#   [ALSA] Fix creation of control devices over udev
#   
#   Control Midlevel,ALSA Core
#   Don't create control devices before the driver initialization finishes
#   (ALSA BTS #742).
#   
#   The control device is now handled in the device list together with others
#   (holding the card instance as the device pointer).
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/sound.c
#   2004/12/27 06:02:10+01:00 perex@suse.cz +8 -14
#   [ALSA] Fix creation of control devices over udev
#   
#   D:2004/12/27 13:02:10
#   C:Control Midlevel,ALSA Core
#   F:core/control.c:1.51->1.52 
#   F:core/init.c:1.53->1.54 
#   F:core/sound.c:1.70->1.71 
#   F:include/control.h:1.10->1.11 
#   F:include/core.h:1.61->1.62 
#   L:Don't create control devices before the driver initialization finishes
#   L:(ALSA BTS #742).
#   L:
#   L:The control device is now handled in the device list together with others
#   L:(holding the card instance as the device pointer).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/init.c
#   2004/12/27 06:02:10+01:00 perex@suse.cz +2 -8
#   [ALSA] Fix creation of control devices over udev
#   
#   D:2004/12/27 13:02:10
#   C:Control Midlevel,ALSA Core
#   F:core/control.c:1.51->1.52 
#   F:core/init.c:1.53->1.54 
#   F:core/sound.c:1.70->1.71 
#   F:include/control.h:1.10->1.11 
#   F:include/core.h:1.61->1.62 
#   L:Don't create control devices before the driver initialization finishes
#   L:(ALSA BTS #742).
#   L:
#   L:The control device is now handled in the device list together with others
#   L:(holding the card instance as the device pointer).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/control.c
#   2004/12/27 06:02:10+01:00 perex@suse.cz +25 -9
#   [ALSA] Fix creation of control devices over udev
#   
#   D:2004/12/27 13:02:10
#   C:Control Midlevel,ALSA Core
#   F:core/control.c:1.51->1.52 
#   F:core/init.c:1.53->1.54 
#   F:core/sound.c:1.70->1.71 
#   F:include/control.h:1.10->1.11 
#   F:include/core.h:1.61->1.62 
#   L:Don't create control devices before the driver initialization finishes
#   L:(ALSA BTS #742).
#   L:
#   L:The control device is now handled in the device list together with others
#   L:(holding the card instance as the device pointer).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# include/sound/core.h
#   2004/12/27 06:02:10+01:00 perex@suse.cz +1 -0
#   [ALSA] Fix creation of control devices over udev
#   
#   D:2004/12/27 13:02:10
#   C:Control Midlevel,ALSA Core
#   F:core/control.c:1.51->1.52 
#   F:core/init.c:1.53->1.54 
#   F:core/sound.c:1.70->1.71 
#   F:include/control.h:1.10->1.11 
#   F:include/core.h:1.61->1.62 
#   L:Don't create control devices before the driver initialization finishes
#   L:(ALSA BTS #742).
#   L:
#   L:The control device is now handled in the device list together with others
#   L:(holding the card instance as the device pointer).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# include/sound/control.h
#   2004/12/27 06:02:10+01:00 perex@suse.cz +2 -4
#   [ALSA] Fix creation of control devices over udev
#   
#   D:2004/12/27 13:02:10
#   C:Control Midlevel,ALSA Core
#   F:core/control.c:1.51->1.52 
#   F:core/init.c:1.53->1.54 
#   F:core/sound.c:1.70->1.71 
#   F:include/control.h:1.10->1.11 
#   F:include/core.h:1.61->1.62 
#   L:Don't create control devices before the driver initialization finishes
#   L:(ALSA BTS #742).
#   L:
#   L:The control device is now handled in the device list together with others
#   L:(holding the card instance as the device pointer).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 11:31:49+01:00 perex@suse.cz 
#   [ALSA] Add mute LED quirk
#   
#   AC97 Codec Core,Intel8x0 driver
#   A new quirk type, AC97_TUNE_MUTE_LED, is added for HP/Compaq laptops.
#   With this quirk, the EAPD bit is used to control the mute LED in
#   conjunction with the master mute switch.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/intel8x0.c
#   2004/12/27 05:58:56+01:00 perex@suse.cz +12 -0
#   [ALSA] Add mute LED quirk
#   
#   D:2004/12/27 12:58:56
#   C:AC97 Codec Core,Intel8x0 driver
#   F:include/ac97_codec.h:1.58->1.59 
#   F:pci/intel8x0.c:1.183->1.184 
#   F:pci/ac97/ac97_codec.c:1.157->1.158 
#   L:A new quirk type, AC97_TUNE_MUTE_LED, is added for HP/Compaq laptops.
#   L:With this quirk, the EAPD bit is used to control the mute LED in
#   L:conjunction with the master mute switch.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ac97/ac97_codec.c
#   2004/12/27 05:58:56+01:00 perex@suse.cz +39 -0
#   [ALSA] Add mute LED quirk
#   
#   D:2004/12/27 12:58:56
#   C:AC97 Codec Core,Intel8x0 driver
#   F:include/ac97_codec.h:1.58->1.59 
#   F:pci/intel8x0.c:1.183->1.184 
#   F:pci/ac97/ac97_codec.c:1.157->1.158 
#   L:A new quirk type, AC97_TUNE_MUTE_LED, is added for HP/Compaq laptops.
#   L:With this quirk, the EAPD bit is used to control the mute LED in
#   L:conjunction with the master mute switch.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# include/sound/ac97_codec.h
#   2004/12/27 05:58:56+01:00 perex@suse.cz +1 -0
#   [ALSA] Add mute LED quirk
#   
#   D:2004/12/27 12:58:56
#   C:AC97 Codec Core,Intel8x0 driver
#   F:include/ac97_codec.h:1.58->1.59 
#   F:pci/intel8x0.c:1.183->1.184 
#   F:pci/ac97/ac97_codec.c:1.157->1.158 
#   L:A new quirk type, AC97_TUNE_MUTE_LED, is added for HP/Compaq laptops.
#   L:With this quirk, the EAPD bit is used to control the mute LED in
#   L:conjunction with the master mute switch.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 11:30:44+01:00 perex@suse.cz 
#   [ALSA] Fix compile warning
#   
#   Wavefront drivers
#   Fixed compile warning regarding the sign of char.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/isa/wavefront/wavefront_synth.c
#   2004/12/23 10:01:25+01:00 perex@suse.cz +1 -1
#   [ALSA] Fix compile warning
#   
#   D:2004/12/23 17:01:25
#   C:Wavefront drivers
#   F:isa/wavefront/wavefront_synth.c:1.22->1.23 
#   L:Fixed compile warning regarding the sign of char.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 11:29:35+01:00 perex@suse.cz 
#   [ALSA] Fix the wrong sign of format data entries
#   
#   PCM Midlevel
#   Fix suggested by Benjamin Herrenschmidt <benh@kernel.crashing.org>
#   
#   On architectures like PPC, char is handled as 'unsigned char', thus the
#   pcm_format_data table entries with -1 give a positive 255.  This causes
#   Oops with OSS-emulation on such architectures.
#   
#   The patch simply adds the right signed/unsigned prefix to fix this problem.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/pcm_misc.c
#   2004/12/22 11:10:29+01:00 perex@suse.cz +7 -4
#   [ALSA] Fix the wrong sign of format data entries
#   
#   D:2004/12/22 18:10:29
#   C:PCM Midlevel
#   F:core/pcm_misc.c:1.14->1.15 
#   L:Fix suggested by Benjamin Herrenschmidt <benh@kernel.crashing.org>
#   L:
#   L:On architectures like PPC, char is handled as 'unsigned char', thus the
#   L:pcm_format_data table entries with -1 give a positive 255.  This causes
#   L:Oops with OSS-emulation on such architectures.
#   L:
#   L:The patch simply adds the right signed/unsigned prefix to fix this problem.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 11:28:17+01:00 perex@suse.cz 
#   [ALSA] Fix invalid 'AutoSync Reference' value
#   
#   RME HDSP driver
#   The value returned by controllers for control number 14 ('AutoSync
#   Reference') is incorrect and different from that reported by doing
#   a cat /proc/asound/card0/hdsp.
#   The value reported is not 'AutoSync Reference' but 'Preferred Sync
#   Reference' instead.
#   
#   Signed-off-by: Remy Bruno <remy.bruno@trinnov.com>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/rme9652/hdsp.c
#   2004/12/21 10:59:41+01:00 perex@suse.cz +1 -1
#   [ALSA] Fix invalid 'AutoSync Reference' value
#   
#   D:2004/12/21 17:59:41
#   C:RME HDSP driver
#   F:pci/rme9652/hdsp.c:1.76->1.77 
#   L:The value returned by controllers for control number 14 ('AutoSync
#   L:Reference') is incorrect and different from that reported by doing
#   L:a cat /proc/asound/card0/hdsp.
#   L:The value reported is not 'AutoSync Reference' but 'Preferred Sync
#   L:Reference' instead.
#   Signed-off-by: Remy Bruno <remy.bruno@trinnov.com>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 11:27:08+01:00 perex@suse.cz 
#   [ALSA] Add PCXHR hwdep iface type
#   
#   ALSA Core
#   Added SNDRV_HWDEP_IFACE_PCXHR for Digigram PCXHR driver.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# include/sound/asound.h
#   2004/12/21 06:48:54+01:00 perex@suse.cz +2 -1
#   [ALSA] Add PCXHR hwdep iface type
#   
#   D:2004/12/21 13:48:54
#   C:ALSA Core
#   F:include/asound.h:1.47->1.48 
#   L:Added SNDRV_HWDEP_IFACE_PCXHR for Digigram PCXHR driver.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 11:25:59+01:00 perex@suse.cz 
#   [ALSA] Fix the invalid DMA pointer value
#   
#   PPC PMAC driver
#   Fixed the bug returning invalid DMA pointer values.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/ppc/pmac.c
#   2004/12/21 03:52:47+01:00 perex@suse.cz +2 -1
#   [ALSA] Fix the invalid DMA pointer value
#   
#   D:2004/12/21 10:52:47
#   C:PPC PMAC driver
#   F:ppc/pmac.c:1.42->1.43 
#   L:Fixed the bug returning invalid DMA pointer values.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 11:24:51+01:00 perex@suse.cz 
#   [ALSA] Fix compilation errors
#   
#   Digigram VX core,MIXART driver
#   Fix compilation errors when built without hotplug fw loader.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/mixart/mixart_hwdep.c
#   2004/12/20 07:35:04+01:00 perex@suse.cz +6 -8
#   [ALSA] Fix compilation errors
#   
#   D:2004/12/20 14:35:04
#   C:Digigram VX core,MIXART driver
#   F:drivers/vx/vx_hwdep.c:1.3->1.4 
#   F:pci/mixart/mixart_hwdep.c:1.7->1.8 
#   L:Fix compilation errors when built without hotplug fw loader.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/drivers/vx/vx_hwdep.c
#   2004/12/20 07:35:04+01:00 perex@suse.cz +2 -2
#   [ALSA] Fix compilation errors
#   
#   D:2004/12/20 14:35:04
#   C:Digigram VX core,MIXART driver
#   F:drivers/vx/vx_hwdep.c:1.3->1.4 
#   F:pci/mixart/mixart_hwdep.c:1.7->1.8 
#   L:Fix compilation errors when built without hotplug fw loader.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 11:23:45+01:00 perex@suse.cz 
#   [ALSA] Fix CMI9739A silent problem
#   
#   AC97 Codec Core
#   Fix by Zinx Verituse <zinx@epicsol.org>
#   The patch for cmi9739a is added.  The undocumented unmute bits are
#   enabled.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ac97/ac97_patch.c
#   2004/12/20 07:03:32+01:00 perex@suse.cz +5 -1
#   [ALSA] Fix CMI9739A silent problem
#   
#   D:2004/12/20 14:03:21
#   C:AC97 Codec Core
#   F:pci/ac97/ac97_codec.c:1.156->1.157 
#   F:pci/ac97/ac97_patch.c:1.62->1.63 
#   L:Fix by Zinx Verituse <zinx@epicsol.org>
#   L:The patch for cmi9739a is added.  The undocumented unmute bits are
#   L:enabled.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ac97/ac97_codec.c
#   2004/12/20 07:03:21+01:00 perex@suse.cz +1 -0
#   [ALSA] Fix CMI9739A silent problem
#   
#   D:2004/12/20 14:03:21
#   C:AC97 Codec Core
#   F:pci/ac97/ac97_codec.c:1.156->1.157 
#   F:pci/ac97/ac97_patch.c:1.62->1.63 
#   L:Fix by Zinx Verituse <zinx@epicsol.org>
#   L:The patch for cmi9739a is added.  The undocumented unmute bits are
#   L:enabled.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 11:22:40+01:00 perex@suse.cz 
#   [ALSA] Fix interrupt generation on MIDI input for es1938 sound cards
#   
#   ES1938 driver
#   The patch ensures that a es1938 based sound card generates interrupts on
#   incoming MIDI events. I tested the patch successfully on an ess Solo-1 in
#   a AlphaPC UX/164.
#   
#   Signed-off-by: Andreas Feldner <pelzi@flying-snail.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/es1938.c
#   2004/12/20 06:37:55+01:00 perex@suse.cz +11 -4
#   [ALSA] Fix interrupt generation on MIDI input for es1938 sound cards
#   
#   D:2004/12/20 13:37:55
#   C:ES1938 driver
#   F:pci/es1938.c:1.44->1.45 
#   L:The patch ensures that a es1938 based sound card generates interrupts on
#   L:incoming MIDI events. I tested the patch successfully on an ess Solo-1 in
#   L:a AlphaPC UX/164.
#   Signed-off-by: Andreas Feldner <pelzi@flying-snail.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 11:21:34+01:00 perex@suse.cz 
#   [ALSA] Add description about hotplug fw loader
#   
#   Documentation
#   New descriptions about hotplug fw loader for vx and mixart drivers.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# Documentation/sound/alsa/ALSA-Configuration.txt
#   2004/12/20 06:23:55+01:00 perex@suse.cz +22 -7
#   [ALSA] Add description about hotplug fw loader
#   
#   D:2004/12/20 13:23:55
#   C:Documentation
#   F:Documentation/ALSA-Configuration.txt:1.55->1.56 
#   L:New descriptions about hotplug fw loader for vx and mixart drivers.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 11:20:24+01:00 perex@suse.cz 
#   [ALSA] Hotplug firmware loader support
#   
#   Digigram VX core,MIXART driver,Digigram VX222 driver
#   Digigram VX Pocket driver
#   The hogplut fw loader is supported by vxpocket, vxp440, vx2222 and mixart
#   drivers.  The old ALSA fw loader is still supported for built-in kernels.
#   To use the hotplug, the new firmware data must be installed beforehand
#   from the latest alsa-tools package.
#   
#   The experimental suspend/resume for vxpocket, vxp440 and vx222 are added,
#   too.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pcmcia/vx/vxp_ops.c
#   2004/12/20 04:28:07+01:00 perex@suse.cz +13 -15
#   [ALSA] Hotplug firmware loader support
#   
#   D:2004/12/20 11:28:06
#   C:Digigram VX core,MIXART driver,Digigram VX222 driver
#   C:Digigram VX Pocket driver
#   F:drivers/vx/vx_core.c:1.10->1.11 
#   F:drivers/vx/vx_hwdep.c:1.2->1.3 
#   F:drivers/vx/vx_pcm.c:1.7->1.8 
#   F:include/vx_core.h:1.4->1.5 
#   F:pci/mixart/mixart.c:1.21->1.22 
#   F:pci/mixart/mixart_hwdep.c:1.6->1.7 
#   F:pci/mixart/mixart_hwdep.h:1.1->1.2 
#   F:pci/vx222/vx222.c:1.11->1.12 
#   F:pci/vx222/vx222_ops.c:1.7->1.8 
#   F:pcmcia/vx/vx_entry.c:1.6->1.7 
#   F:pcmcia/vx/vxp_ops.c:1.4->1.5 
#   L:The hogplut fw loader is supported by vxpocket, vxp440, vx2222 and mixart
#   L:drivers.  The old ALSA fw loader is still supported for built-in kernels.
#   L:To use the hotplug, the new firmware data must be installed beforehand
#   L:from the latest alsa-tools package.
#   L:
#   L:The experimental suspend/resume for vxpocket, vxp440 and vx222 are added,
#   L:too.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pcmcia/vx/vx_entry.c
#   2004/12/20 04:28:07+01:00 perex@suse.cz +51 -27
#   [ALSA] Hotplug firmware loader support
#   
#   D:2004/12/20 11:28:06
#   C:Digigram VX core,MIXART driver,Digigram VX222 driver
#   C:Digigram VX Pocket driver
#   F:drivers/vx/vx_core.c:1.10->1.11 
#   F:drivers/vx/vx_hwdep.c:1.2->1.3 
#   F:drivers/vx/vx_pcm.c:1.7->1.8 
#   F:include/vx_core.h:1.4->1.5 
#   F:pci/mixart/mixart.c:1.21->1.22 
#   F:pci/mixart/mixart_hwdep.c:1.6->1.7 
#   F:pci/mixart/mixart_hwdep.h:1.1->1.2 
#   F:pci/vx222/vx222.c:1.11->1.12 
#   F:pci/vx222/vx222_ops.c:1.7->1.8 
#   F:pcmcia/vx/vx_entry.c:1.6->1.7 
#   F:pcmcia/vx/vxp_ops.c:1.4->1.5 
#   L:The hogplut fw loader is supported by vxpocket, vxp440, vx2222 and mixart
#   L:drivers.  The old ALSA fw loader is still supported for built-in kernels.
#   L:To use the hotplug, the new firmware data must be installed beforehand
#   L:from the latest alsa-tools package.
#   L:
#   L:The experimental suspend/resume for vxpocket, vxp440 and vx222 are added,
#   L:too.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/vx222/vx222_ops.c
#   2004/12/20 04:28:07+01:00 perex@suse.cz +11 -15
#   [ALSA] Hotplug firmware loader support
#   
#   D:2004/12/20 11:28:06
#   C:Digigram VX core,MIXART driver,Digigram VX222 driver
#   C:Digigram VX Pocket driver
#   F:drivers/vx/vx_core.c:1.10->1.11 
#   F:drivers/vx/vx_hwdep.c:1.2->1.3 
#   F:drivers/vx/vx_pcm.c:1.7->1.8 
#   F:include/vx_core.h:1.4->1.5 
#   F:pci/mixart/mixart.c:1.21->1.22 
#   F:pci/mixart/mixart_hwdep.c:1.6->1.7 
#   F:pci/mixart/mixart_hwdep.h:1.1->1.2 
#   F:pci/vx222/vx222.c:1.11->1.12 
#   F:pci/vx222/vx222_ops.c:1.7->1.8 
#   F:pcmcia/vx/vx_entry.c:1.6->1.7 
#   F:pcmcia/vx/vxp_ops.c:1.4->1.5 
#   L:The hogplut fw loader is supported by vxpocket, vxp440, vx2222 and mixart
#   L:drivers.  The old ALSA fw loader is still supported for built-in kernels.
#   L:To use the hotplug, the new firmware data must be installed beforehand
#   L:from the latest alsa-tools package.
#   L:
#   L:The experimental suspend/resume for vxpocket, vxp440 and vx222 are added,
#   L:too.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/vx222/vx222.c
#   2004/12/20 04:28:07+01:00 perex@suse.cz +6 -1
#   [ALSA] Hotplug firmware loader support
#   
#   D:2004/12/20 11:28:06
#   C:Digigram VX core,MIXART driver,Digigram VX222 driver
#   C:Digigram VX Pocket driver
#   F:drivers/vx/vx_core.c:1.10->1.11 
#   F:drivers/vx/vx_hwdep.c:1.2->1.3 
#   F:drivers/vx/vx_pcm.c:1.7->1.8 
#   F:include/vx_core.h:1.4->1.5 
#   F:pci/mixart/mixart.c:1.21->1.22 
#   F:pci/mixart/mixart_hwdep.c:1.6->1.7 
#   F:pci/mixart/mixart_hwdep.h:1.1->1.2 
#   F:pci/vx222/vx222.c:1.11->1.12 
#   F:pci/vx222/vx222_ops.c:1.7->1.8 
#   F:pcmcia/vx/vx_entry.c:1.6->1.7 
#   F:pcmcia/vx/vxp_ops.c:1.4->1.5 
#   L:The hogplut fw loader is supported by vxpocket, vxp440, vx2222 and mixart
#   L:drivers.  The old ALSA fw loader is still supported for built-in kernels.
#   L:To use the hotplug, the new firmware data must be installed beforehand
#   L:from the latest alsa-tools package.
#   L:
#   L:The experimental suspend/resume for vxpocket, vxp440 and vx222 are added,
#   L:too.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/mixart/mixart_hwdep.h
#   2004/12/20 04:28:07+01:00 perex@suse.cz +1 -2
#   [ALSA] Hotplug firmware loader support
#   
#   D:2004/12/20 11:28:06
#   C:Digigram VX core,MIXART driver,Digigram VX222 driver
#   C:Digigram VX Pocket driver
#   F:drivers/vx/vx_core.c:1.10->1.11 
#   F:drivers/vx/vx_hwdep.c:1.2->1.3 
#   F:drivers/vx/vx_pcm.c:1.7->1.8 
#   F:include/vx_core.h:1.4->1.5 
#   F:pci/mixart/mixart.c:1.21->1.22 
#   F:pci/mixart/mixart_hwdep.c:1.6->1.7 
#   F:pci/mixart/mixart_hwdep.h:1.1->1.2 
#   F:pci/vx222/vx222.c:1.11->1.12 
#   F:pci/vx222/vx222_ops.c:1.7->1.8 
#   F:pcmcia/vx/vx_entry.c:1.6->1.7 
#   F:pcmcia/vx/vxp_ops.c:1.4->1.5 
#   L:The hogplut fw loader is supported by vxpocket, vxp440, vx2222 and mixart
#   L:drivers.  The old ALSA fw loader is still supported for built-in kernels.
#   L:To use the hotplug, the new firmware data must be installed beforehand
#   L:from the latest alsa-tools package.
#   L:
#   L:The experimental suspend/resume for vxpocket, vxp440 and vx222 are added,
#   L:too.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/mixart/mixart_hwdep.c
#   2004/12/20 04:28:07+01:00 perex@suse.cz +117 -59
#   [ALSA] Hotplug firmware loader support
#   
#   D:2004/12/20 11:28:06
#   C:Digigram VX core,MIXART driver,Digigram VX222 driver
#   C:Digigram VX Pocket driver
#   F:drivers/vx/vx_core.c:1.10->1.11 
#   F:drivers/vx/vx_hwdep.c:1.2->1.3 
#   F:drivers/vx/vx_pcm.c:1.7->1.8 
#   F:include/vx_core.h:1.4->1.5 
#   F:pci/mixart/mixart.c:1.21->1.22 
#   F:pci/mixart/mixart_hwdep.c:1.6->1.7 
#   F:pci/mixart/mixart_hwdep.h:1.1->1.2 
#   F:pci/vx222/vx222.c:1.11->1.12 
#   F:pci/vx222/vx222_ops.c:1.7->1.8 
#   F:pcmcia/vx/vx_entry.c:1.6->1.7 
#   F:pcmcia/vx/vxp_ops.c:1.4->1.5 
#   L:The hogplut fw loader is supported by vxpocket, vxp440, vx2222 and mixart
#   L:drivers.  The old ALSA fw loader is still supported for built-in kernels.
#   L:To use the hotplug, the new firmware data must be installed beforehand
#   L:from the latest alsa-tools package.
#   L:
#   L:The experimental suspend/resume for vxpocket, vxp440 and vx222 are added,
#   L:too.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/mixart/mixart.c
#   2004/12/20 04:28:06+01:00 perex@suse.cz +7 -7
#   [ALSA] Hotplug firmware loader support
#   
#   D:2004/12/20 11:28:06
#   C:Digigram VX core,MIXART driver,Digigram VX222 driver
#   C:Digigram VX Pocket driver
#   F:drivers/vx/vx_core.c:1.10->1.11 
#   F:drivers/vx/vx_hwdep.c:1.2->1.3 
#   F:drivers/vx/vx_pcm.c:1.7->1.8 
#   F:include/vx_core.h:1.4->1.5 
#   F:pci/mixart/mixart.c:1.21->1.22 
#   F:pci/mixart/mixart_hwdep.c:1.6->1.7 
#   F:pci/mixart/mixart_hwdep.h:1.1->1.2 
#   F:pci/vx222/vx222.c:1.11->1.12 
#   F:pci/vx222/vx222_ops.c:1.7->1.8 
#   F:pcmcia/vx/vx_entry.c:1.6->1.7 
#   F:pcmcia/vx/vxp_ops.c:1.4->1.5 
#   L:The hogplut fw loader is supported by vxpocket, vxp440, vx2222 and mixart
#   L:drivers.  The old ALSA fw loader is still supported for built-in kernels.
#   L:To use the hotplug, the new firmware data must be installed beforehand
#   L:from the latest alsa-tools package.
#   L:
#   L:The experimental suspend/resume for vxpocket, vxp440 and vx222 are added,
#   L:too.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/drivers/vx/vx_pcm.c
#   2004/12/20 04:28:06+01:00 perex@suse.cz +6 -2
#   [ALSA] Hotplug firmware loader support
#   
#   D:2004/12/20 11:28:06
#   C:Digigram VX core,MIXART driver,Digigram VX222 driver
#   C:Digigram VX Pocket driver
#   F:drivers/vx/vx_core.c:1.10->1.11 
#   F:drivers/vx/vx_hwdep.c:1.2->1.3 
#   F:drivers/vx/vx_pcm.c:1.7->1.8 
#   F:include/vx_core.h:1.4->1.5 
#   F:pci/mixart/mixart.c:1.21->1.22 
#   F:pci/mixart/mixart_hwdep.c:1.6->1.7 
#   F:pci/mixart/mixart_hwdep.h:1.1->1.2 
#   F:pci/vx222/vx222.c:1.11->1.12 
#   F:pci/vx222/vx222_ops.c:1.7->1.8 
#   F:pcmcia/vx/vx_entry.c:1.6->1.7 
#   F:pcmcia/vx/vxp_ops.c:1.4->1.5 
#   L:The hogplut fw loader is supported by vxpocket, vxp440, vx2222 and mixart
#   L:drivers.  The old ALSA fw loader is still supported for built-in kernels.
#   L:To use the hotplug, the new firmware data must be installed beforehand
#   L:from the latest alsa-tools package.
#   L:
#   L:The experimental suspend/resume for vxpocket, vxp440 and vx222 are added,
#   L:too.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/drivers/vx/vx_hwdep.c
#   2004/12/20 04:28:06+01:00 perex@suse.cz +132 -6
#   [ALSA] Hotplug firmware loader support
#   
#   D:2004/12/20 11:28:06
#   C:Digigram VX core,MIXART driver,Digigram VX222 driver
#   C:Digigram VX Pocket driver
#   F:drivers/vx/vx_core.c:1.10->1.11 
#   F:drivers/vx/vx_hwdep.c:1.2->1.3 
#   F:drivers/vx/vx_pcm.c:1.7->1.8 
#   F:include/vx_core.h:1.4->1.5 
#   F:pci/mixart/mixart.c:1.21->1.22 
#   F:pci/mixart/mixart_hwdep.c:1.6->1.7 
#   F:pci/mixart/mixart_hwdep.h:1.1->1.2 
#   F:pci/vx222/vx222.c:1.11->1.12 
#   F:pci/vx222/vx222_ops.c:1.7->1.8 
#   F:pcmcia/vx/vx_entry.c:1.6->1.7 
#   F:pcmcia/vx/vxp_ops.c:1.4->1.5 
#   L:The hogplut fw loader is supported by vxpocket, vxp440, vx2222 and mixart
#   L:drivers.  The old ALSA fw loader is still supported for built-in kernels.
#   L:To use the hotplug, the new firmware data must be installed beforehand
#   L:from the latest alsa-tools package.
#   L:
#   L:The experimental suspend/resume for vxpocket, vxp440 and vx222 are added,
#   L:too.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/drivers/vx/vx_core.c
#   2004/12/20 04:28:06+01:00 perex@suse.cz +66 -48
#   [ALSA] Hotplug firmware loader support
#   
#   D:2004/12/20 11:28:06
#   C:Digigram VX core,MIXART driver,Digigram VX222 driver
#   C:Digigram VX Pocket driver
#   F:drivers/vx/vx_core.c:1.10->1.11 
#   F:drivers/vx/vx_hwdep.c:1.2->1.3 
#   F:drivers/vx/vx_pcm.c:1.7->1.8 
#   F:include/vx_core.h:1.4->1.5 
#   F:pci/mixart/mixart.c:1.21->1.22 
#   F:pci/mixart/mixart_hwdep.c:1.6->1.7 
#   F:pci/mixart/mixart_hwdep.h:1.1->1.2 
#   F:pci/vx222/vx222.c:1.11->1.12 
#   F:pci/vx222/vx222_ops.c:1.7->1.8 
#   F:pcmcia/vx/vx_entry.c:1.6->1.7 
#   F:pcmcia/vx/vxp_ops.c:1.4->1.5 
#   L:The hogplut fw loader is supported by vxpocket, vxp440, vx2222 and mixart
#   L:drivers.  The old ALSA fw loader is still supported for built-in kernels.
#   L:To use the hotplug, the new firmware data must be installed beforehand
#   L:from the latest alsa-tools package.
#   L:
#   L:The experimental suspend/resume for vxpocket, vxp440 and vx222 are added,
#   L:too.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# include/sound/vx_core.h
#   2004/12/20 04:28:06+01:00 perex@suse.cz +19 -14
#   [ALSA] Hotplug firmware loader support
#   
#   D:2004/12/20 11:28:06
#   C:Digigram VX core,MIXART driver,Digigram VX222 driver
#   C:Digigram VX Pocket driver
#   F:drivers/vx/vx_core.c:1.10->1.11 
#   F:drivers/vx/vx_hwdep.c:1.2->1.3 
#   F:drivers/vx/vx_pcm.c:1.7->1.8 
#   F:include/vx_core.h:1.4->1.5 
#   F:pci/mixart/mixart.c:1.21->1.22 
#   F:pci/mixart/mixart_hwdep.c:1.6->1.7 
#   F:pci/mixart/mixart_hwdep.h:1.1->1.2 
#   F:pci/vx222/vx222.c:1.11->1.12 
#   F:pci/vx222/vx222_ops.c:1.7->1.8 
#   F:pcmcia/vx/vx_entry.c:1.6->1.7 
#   F:pcmcia/vx/vxp_ops.c:1.4->1.5 
#   L:The hogplut fw loader is supported by vxpocket, vxp440, vx2222 and mixart
#   L:drivers.  The old ALSA fw loader is still supported for built-in kernels.
#   L:To use the hotplug, the new firmware data must be installed beforehand
#   L:from the latest alsa-tools package.
#   L:
#   L:The experimental suspend/resume for vxpocket, vxp440 and vx222 are added,
#   L:too.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 11:19:17+01:00 perex@suse.cz 
#   [ALSA] Fix memory corruption
#   
#   Digigram VX core
#   Fixed the memory corruption by the wrong sized kmalloc.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/drivers/vx/vx_core.c
#   2004/12/20 04:03:54+01:00 perex@suse.cz +1 -1
#   [ALSA] Fix memory corruption
#   
#   D:2004/12/20 11:03:54
#   C:Digigram VX core
#   F:drivers/vx/vx_core.c:1.9->1.10 
#   L:Fixed the memory corruption by the wrong sized kmalloc.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 11:18:07+01:00 perex@suse.cz 
#   [ALSA] Return -EBADFD when the device is disconnected
#   
#   USB generic driver
#   The trigger callback returns -EBADFD when the device is disconnected.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/usb/usbaudio.c
#   2004/12/16 09:12:51+01:00 perex@suse.cz +4 -1
#   [ALSA] Return -EBADFD when the device is disconnected
#   
#   D:2004/12/16 16:12:51
#   C:USB generic driver
#   F:usb/usbaudio.c:1.112->1.113 
#   L:The trigger callback returns -EBADFD when the device is disconnected.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 11:17:01+01:00 perex@suse.cz 
#   [ALSA] Add volatile to IO pinters
#   
#   ALSA Core
#   Add volatile prefix to IO pointers for copy_to_user_fromio() and
#   copy_from_user_toio() functions.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/memory.c
#   2004/12/16 04:15:00+01:00 perex@suse.cz +2 -2
#   [ALSA] Add volatile to IO pinters
#   
#   D:2004/12/16 11:15:00
#   C:ALSA Core
#   F:core/memory.c:1.35->1.36 
#   F:include/core.h:1.60->1.61 
#   L:Add volatile prefix to IO pointers for copy_to_user_fromio() and
#   L:copy_from_user_toio() functions.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# include/sound/core.h
#   2004/12/16 04:15:01+01:00 perex@suse.cz +2 -2
#   [ALSA] Add volatile to IO pinters
#   
#   D:2004/12/16 11:15:00
#   C:ALSA Core
#   F:core/memory.c:1.35->1.36 
#   F:include/core.h:1.60->1.61 
#   L:Add volatile prefix to IO pointers for copy_to_user_fromio() and
#   L:copy_from_user_toio() functions.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 11:15:54+01:00 perex@suse.cz 
#   [ALSA] buffersize and constraints on pmac
#   
#   PPC PMAC driver
#   Buffersize is a bit small compared to the OSS driver (dmasound.h says
#   128kb is limit for Amiga, for pmac 256kb is used)
#   At least on Snapper, some samplerates cause choppy sound when
#   periods<3 or buffersize is not a multiple of periodsize.
#   
#   Signed-off-by: Danny Tholen <obiwan@mailmij.org>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/ppc/pmac.c
#   2004/12/15 14:47:31+01:00 perex@suse.cz +6 -4
#   [ALSA] buffersize and constraints on pmac
#   
#   D:2004/12/15 21:47:31
#   C:PPC PMAC driver
#   F:ppc/pmac.c:1.41->1.42 
#   L:Buffersize is a bit small compared to the OSS driver (dmasound.h says
#   L:128kb is limit for Amiga, for pmac 256kb is used)
#   L:At least on Snapper, some samplerates cause choppy sound when
#   L:periods<3 or buffersize is not a multiple of periodsize.
#   Signed-off-by: Danny Tholen <obiwan@mailmij.org>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 11:14:41+01:00 perex@suse.cz 
#   [ALSA] Export snd_ctl_elem_read/write() functions
#   
#   Control Midlevel,ALSA Core,IOCTL32 emulation
#   snd_ctl_elem_read() and snd_ctl_elem_write() functions are exported
#   to be accessible from other kernel modules.  They can be used for
#   suspend/resume codes, for example.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/sound.c
#   2004/12/15 08:45:17+01:00 perex@suse.cz +0 -2
#   [ALSA] Export snd_ctl_elem_read/write() functions
#   
#   D:2004/12/15 15:45:17
#   C:Control Midlevel,ALSA Core,IOCTL32 emulation
#   F:core/control.c:1.50->1.51 
#   F:core/sound.c:1.69->1.70 
#   F:core/ioctl32/ioctl32.c:1.25->1.26 
#   F:include/control.h:1.9->1.10 
#   L:snd_ctl_elem_read() and snd_ctl_elem_write() functions are exported
#   L:to be accessible from other kernel modules.  They can be used for
#   L:suspend/resume codes, for example.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/ioctl32/ioctl32.c
#   2004/12/15 08:45:18+01:00 perex@suse.cz +1 -1
#   [ALSA] Export snd_ctl_elem_read/write() functions
#   
#   D:2004/12/15 15:45:17
#   C:Control Midlevel,ALSA Core,IOCTL32 emulation
#   F:core/control.c:1.50->1.51 
#   F:core/sound.c:1.69->1.70 
#   F:core/ioctl32/ioctl32.c:1.25->1.26 
#   F:include/control.h:1.9->1.10 
#   L:snd_ctl_elem_read() and snd_ctl_elem_write() functions are exported
#   L:to be accessible from other kernel modules.  They can be used for
#   L:suspend/resume codes, for example.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/control.c
#   2004/12/15 08:45:17+01:00 perex@suse.cz +3 -4
#   [ALSA] Export snd_ctl_elem_read/write() functions
#   
#   D:2004/12/15 15:45:17
#   C:Control Midlevel,ALSA Core,IOCTL32 emulation
#   F:core/control.c:1.50->1.51 
#   F:core/sound.c:1.69->1.70 
#   F:core/ioctl32/ioctl32.c:1.25->1.26 
#   F:include/control.h:1.9->1.10 
#   L:snd_ctl_elem_read() and snd_ctl_elem_write() functions are exported
#   L:to be accessible from other kernel modules.  They can be used for
#   L:suspend/resume codes, for example.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# include/sound/control.h
#   2004/12/15 08:45:18+01:00 perex@suse.cz +1 -2
#   [ALSA] Export snd_ctl_elem_read/write() functions
#   
#   D:2004/12/15 15:45:17
#   C:Control Midlevel,ALSA Core,IOCTL32 emulation
#   F:core/control.c:1.50->1.51 
#   F:core/sound.c:1.69->1.70 
#   F:core/ioctl32/ioctl32.c:1.25->1.26 
#   F:include/control.h:1.9->1.10 
#   L:snd_ctl_elem_read() and snd_ctl_elem_write() functions are exported
#   L:to be accessible from other kernel modules.  They can be used for
#   L:suspend/resume codes, for example.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 11:13:30+01:00 perex@suse.cz 
#   [ALSA] Clean up power-management
#   
#   Documentation,SA11xx UDA1341 driver,Control Midlevel,ALSA Core
#   ES18xx driver,OPL3SA2 driver,AD1848 driver,CS4231 driver,ATIIXP driver
#   ATIIXP-modem driver,CS4281 driver,ES1938 driver,ES1968 driver
#   Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver,VIA82xx driver
#   VIA82xx-modem driver,ALI5451 driver,CS46xx driver,NM256 driver
#   Trident driver,YMFPCI driver,Sound Core PDAudioCF driver
#   PPC PMAC driver
#   Clean up for PM code.
#   snd_power_change() is called in the common routines instead of driver's callback.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/ppc/pmac.c
#   2004/12/15 08:26:13+01:00 perex@suse.cz +0 -2
#   [ALSA] Clean up power-management
#   
#   D:2004/12/15 15:26:08
#   C:Documentation,SA11xx UDA1341 driver,Control Midlevel,ALSA Core
#   C:ES18xx driver,OPL3SA2 driver,AD1848 driver,CS4231 driver,ATIIXP driver
#   C:ATIIXP-modem driver,CS4281 driver,ES1938 driver,ES1968 driver
#   C:Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver,VIA82xx driver
#   C:VIA82xx-modem driver,ALI5451 driver,CS46xx driver,NM256 driver
#   C:Trident driver,YMFPCI driver,Sound Core PDAudioCF driver
#   C:PPC PMAC driver
#   F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.44->1.45 
#   F:arm/sa11xx-uda1341.c:1.18->1.19 
#   F:core/control.c:1.49->1.50 
#   F:core/init.c:1.52->1.53 
#   F:isa/es18xx.c:1.52->1.53 
#   F:isa/opl3sa2.c:1.40->1.41 
#   F:isa/ad1848/ad1848_lib.c:1.38->1.39 
#   F:isa/cs423x/cs4231_lib.c:1.46->1.47 
#   F:pci/atiixp.c:1.26->1.27 
#   F:pci/atiixp_modem.c:1.10->1.11 
#   F:pci/cs4281.c:1.67->1.68 
#   F:pci/es1938.c:1.43->1.44 
#   F:pci/es1968.c:1.80->1.81 
#   F:pci/intel8x0.c:1.182->1.183 
#   F:pci/intel8x0m.c:1.23->1.24 
#   F:pci/maestro3.c:1.65->1.66 
#   F:pci/via82xx.c:1.131->1.132 
#   F:pci/via82xx_modem.c:1.1->1.2 
#   F:pci/ali5451/ali5451.c:1.59->1.60 
#   F:pci/cs46xx/cs46xx_lib.c:1.90->1.91 
#   F:pci/nm256/nm256.c:1.55->1.56 
#   F:pci/trident/trident_main.c:1.67->1.68 
#   F:pci/ymfpci/ymfpci_main.c:1.61->1.62 
#   F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.5->1.6 
#   F:ppc/pmac.c:1.40->1.41 
#   L:Clean up for PM code.
#   L:snd_power_change() is called in the common routines instead of driver's callback.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pcmcia/pdaudiocf/pdaudiocf_core.c
#   2004/12/15 08:26:13+01:00 perex@suse.cz +0 -2
#   [ALSA] Clean up power-management
#   
#   D:2004/12/15 15:26:08
#   C:Documentation,SA11xx UDA1341 driver,Control Midlevel,ALSA Core
#   C:ES18xx driver,OPL3SA2 driver,AD1848 driver,CS4231 driver,ATIIXP driver
#   C:ATIIXP-modem driver,CS4281 driver,ES1938 driver,ES1968 driver
#   C:Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver,VIA82xx driver
#   C:VIA82xx-modem driver,ALI5451 driver,CS46xx driver,NM256 driver
#   C:Trident driver,YMFPCI driver,Sound Core PDAudioCF driver
#   C:PPC PMAC driver
#   F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.44->1.45 
#   F:arm/sa11xx-uda1341.c:1.18->1.19 
#   F:core/control.c:1.49->1.50 
#   F:core/init.c:1.52->1.53 
#   F:isa/es18xx.c:1.52->1.53 
#   F:isa/opl3sa2.c:1.40->1.41 
#   F:isa/ad1848/ad1848_lib.c:1.38->1.39 
#   F:isa/cs423x/cs4231_lib.c:1.46->1.47 
#   F:pci/atiixp.c:1.26->1.27 
#   F:pci/atiixp_modem.c:1.10->1.11 
#   F:pci/cs4281.c:1.67->1.68 
#   F:pci/es1938.c:1.43->1.44 
#   F:pci/es1968.c:1.80->1.81 
#   F:pci/intel8x0.c:1.182->1.183 
#   F:pci/intel8x0m.c:1.23->1.24 
#   F:pci/maestro3.c:1.65->1.66 
#   F:pci/via82xx.c:1.131->1.132 
#   F:pci/via82xx_modem.c:1.1->1.2 
#   F:pci/ali5451/ali5451.c:1.59->1.60 
#   F:pci/cs46xx/cs46xx_lib.c:1.90->1.91 
#   F:pci/nm256/nm256.c:1.55->1.56 
#   F:pci/trident/trident_main.c:1.67->1.68 
#   F:pci/ymfpci/ymfpci_main.c:1.61->1.62 
#   F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.5->1.6 
#   F:ppc/pmac.c:1.40->1.41 
#   L:Clean up for PM code.
#   L:snd_power_change() is called in the common routines instead of driver's callback.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ymfpci/ymfpci_main.c
#   2004/12/15 08:26:13+01:00 perex@suse.cz +0 -2
#   [ALSA] Clean up power-management
#   
#   D:2004/12/15 15:26:08
#   C:Documentation,SA11xx UDA1341 driver,Control Midlevel,ALSA Core
#   C:ES18xx driver,OPL3SA2 driver,AD1848 driver,CS4231 driver,ATIIXP driver
#   C:ATIIXP-modem driver,CS4281 driver,ES1938 driver,ES1968 driver
#   C:Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver,VIA82xx driver
#   C:VIA82xx-modem driver,ALI5451 driver,CS46xx driver,NM256 driver
#   C:Trident driver,YMFPCI driver,Sound Core PDAudioCF driver
#   C:PPC PMAC driver
#   F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.44->1.45 
#   F:arm/sa11xx-uda1341.c:1.18->1.19 
#   F:core/control.c:1.49->1.50 
#   F:core/init.c:1.52->1.53 
#   F:isa/es18xx.c:1.52->1.53 
#   F:isa/opl3sa2.c:1.40->1.41 
#   F:isa/ad1848/ad1848_lib.c:1.38->1.39 
#   F:isa/cs423x/cs4231_lib.c:1.46->1.47 
#   F:pci/atiixp.c:1.26->1.27 
#   F:pci/atiixp_modem.c:1.10->1.11 
#   F:pci/cs4281.c:1.67->1.68 
#   F:pci/es1938.c:1.43->1.44 
#   F:pci/es1968.c:1.80->1.81 
#   F:pci/intel8x0.c:1.182->1.183 
#   F:pci/intel8x0m.c:1.23->1.24 
#   F:pci/maestro3.c:1.65->1.66 
#   F:pci/via82xx.c:1.131->1.132 
#   F:pci/via82xx_modem.c:1.1->1.2 
#   F:pci/ali5451/ali5451.c:1.59->1.60 
#   F:pci/cs46xx/cs46xx_lib.c:1.90->1.91 
#   F:pci/nm256/nm256.c:1.55->1.56 
#   F:pci/trident/trident_main.c:1.67->1.68 
#   F:pci/ymfpci/ymfpci_main.c:1.61->1.62 
#   F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.5->1.6 
#   F:ppc/pmac.c:1.40->1.41 
#   L:Clean up for PM code.
#   L:snd_power_change() is called in the common routines instead of driver's callback.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/via82xx_modem.c
#   2004/12/15 08:26:12+01:00 perex@suse.cz +0 -2
#   [ALSA] Clean up power-management
#   
#   D:2004/12/15 15:26:08
#   C:Documentation,SA11xx UDA1341 driver,Control Midlevel,ALSA Core
#   C:ES18xx driver,OPL3SA2 driver,AD1848 driver,CS4231 driver,ATIIXP driver
#   C:ATIIXP-modem driver,CS4281 driver,ES1938 driver,ES1968 driver
#   C:Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver,VIA82xx driver
#   C:VIA82xx-modem driver,ALI5451 driver,CS46xx driver,NM256 driver
#   C:Trident driver,YMFPCI driver,Sound Core PDAudioCF driver
#   C:PPC PMAC driver
#   F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.44->1.45 
#   F:arm/sa11xx-uda1341.c:1.18->1.19 
#   F:core/control.c:1.49->1.50 
#   F:core/init.c:1.52->1.53 
#   F:isa/es18xx.c:1.52->1.53 
#   F:isa/opl3sa2.c:1.40->1.41 
#   F:isa/ad1848/ad1848_lib.c:1.38->1.39 
#   F:isa/cs423x/cs4231_lib.c:1.46->1.47 
#   F:pci/atiixp.c:1.26->1.27 
#   F:pci/atiixp_modem.c:1.10->1.11 
#   F:pci/cs4281.c:1.67->1.68 
#   F:pci/es1938.c:1.43->1.44 
#   F:pci/es1968.c:1.80->1.81 
#   F:pci/intel8x0.c:1.182->1.183 
#   F:pci/intel8x0m.c:1.23->1.24 
#   F:pci/maestro3.c:1.65->1.66 
#   F:pci/via82xx.c:1.131->1.132 
#   F:pci/via82xx_modem.c:1.1->1.2 
#   F:pci/ali5451/ali5451.c:1.59->1.60 
#   F:pci/cs46xx/cs46xx_lib.c:1.90->1.91 
#   F:pci/nm256/nm256.c:1.55->1.56 
#   F:pci/trident/trident_main.c:1.67->1.68 
#   F:pci/ymfpci/ymfpci_main.c:1.61->1.62 
#   F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.5->1.6 
#   F:ppc/pmac.c:1.40->1.41 
#   L:Clean up for PM code.
#   L:snd_power_change() is called in the common routines instead of driver's callback.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/via82xx.c
#   2004/12/15 08:26:12+01:00 perex@suse.cz +30 -17
#   [ALSA] Clean up power-management
#   
#   D:2004/12/15 15:26:08
#   C:Documentation,SA11xx UDA1341 driver,Control Midlevel,ALSA Core
#   C:ES18xx driver,OPL3SA2 driver,AD1848 driver,CS4231 driver,ATIIXP driver
#   C:ATIIXP-modem driver,CS4281 driver,ES1938 driver,ES1968 driver
#   C:Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver,VIA82xx driver
#   C:VIA82xx-modem driver,ALI5451 driver,CS46xx driver,NM256 driver
#   C:Trident driver,YMFPCI driver,Sound Core PDAudioCF driver
#   C:PPC PMAC driver
#   F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.44->1.45 
#   F:arm/sa11xx-uda1341.c:1.18->1.19 
#   F:core/control.c:1.49->1.50 
#   F:core/init.c:1.52->1.53 
#   F:isa/es18xx.c:1.52->1.53 
#   F:isa/opl3sa2.c:1.40->1.41 
#   F:isa/ad1848/ad1848_lib.c:1.38->1.39 
#   F:isa/cs423x/cs4231_lib.c:1.46->1.47 
#   F:pci/atiixp.c:1.26->1.27 
#   F:pci/atiixp_modem.c:1.10->1.11 
#   F:pci/cs4281.c:1.67->1.68 
#   F:pci/es1938.c:1.43->1.44 
#   F:pci/es1968.c:1.80->1.81 
#   F:pci/intel8x0.c:1.182->1.183 
#   F:pci/intel8x0m.c:1.23->1.24 
#   F:pci/maestro3.c:1.65->1.66 
#   F:pci/via82xx.c:1.131->1.132 
#   F:pci/via82xx_modem.c:1.1->1.2 
#   F:pci/ali5451/ali5451.c:1.59->1.60 
#   F:pci/cs46xx/cs46xx_lib.c:1.90->1.91 
#   F:pci/nm256/nm256.c:1.55->1.56 
#   F:pci/trident/trident_main.c:1.67->1.68 
#   F:pci/ymfpci/ymfpci_main.c:1.61->1.62 
#   F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.5->1.6 
#   F:ppc/pmac.c:1.40->1.41 
#   L:Clean up for PM code.
#   L:snd_power_change() is called in the common routines instead of driver's callback.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/trident/trident_main.c
#   2004/12/15 08:26:13+01:00 perex@suse.cz +0 -2
#   [ALSA] Clean up power-management
#   
#   D:2004/12/15 15:26:08
#   C:Documentation,SA11xx UDA1341 driver,Control Midlevel,ALSA Core
#   C:ES18xx driver,OPL3SA2 driver,AD1848 driver,CS4231 driver,ATIIXP driver
#   C:ATIIXP-modem driver,CS4281 driver,ES1938 driver,ES1968 driver
#   C:Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver,VIA82xx driver
#   C:VIA82xx-modem driver,ALI5451 driver,CS46xx driver,NM256 driver
#   C:Trident driver,YMFPCI driver,Sound Core PDAudioCF driver
#   C:PPC PMAC driver
#   F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.44->1.45 
#   F:arm/sa11xx-uda1341.c:1.18->1.19 
#   F:core/control.c:1.49->1.50 
#   F:core/init.c:1.52->1.53 
#   F:isa/es18xx.c:1.52->1.53 
#   F:isa/opl3sa2.c:1.40->1.41 
#   F:isa/ad1848/ad1848_lib.c:1.38->1.39 
#   F:isa/cs423x/cs4231_lib.c:1.46->1.47 
#   F:pci/atiixp.c:1.26->1.27 
#   F:pci/atiixp_modem.c:1.10->1.11 
#   F:pci/cs4281.c:1.67->1.68 
#   F:pci/es1938.c:1.43->1.44 
#   F:pci/es1968.c:1.80->1.81 
#   F:pci/intel8x0.c:1.182->1.183 
#   F:pci/intel8x0m.c:1.23->1.24 
#   F:pci/maestro3.c:1.65->1.66 
#   F:pci/via82xx.c:1.131->1.132 
#   F:pci/via82xx_modem.c:1.1->1.2 
#   F:pci/ali5451/ali5451.c:1.59->1.60 
#   F:pci/cs46xx/cs46xx_lib.c:1.90->1.91 
#   F:pci/nm256/nm256.c:1.55->1.56 
#   F:pci/trident/trident_main.c:1.67->1.68 
#   F:pci/ymfpci/ymfpci_main.c:1.61->1.62 
#   F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.5->1.6 
#   F:ppc/pmac.c:1.40->1.41 
#   L:Clean up for PM code.
#   L:snd_power_change() is called in the common routines instead of driver's callback.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/nm256/nm256.c
#   2004/12/15 08:26:13+01:00 perex@suse.cz +0 -2
#   [ALSA] Clean up power-management
#   
#   D:2004/12/15 15:26:08
#   C:Documentation,SA11xx UDA1341 driver,Control Midlevel,ALSA Core
#   C:ES18xx driver,OPL3SA2 driver,AD1848 driver,CS4231 driver,ATIIXP driver
#   C:ATIIXP-modem driver,CS4281 driver,ES1938 driver,ES1968 driver
#   C:Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver,VIA82xx driver
#   C:VIA82xx-modem driver,ALI5451 driver,CS46xx driver,NM256 driver
#   C:Trident driver,YMFPCI driver,Sound Core PDAudioCF driver
#   C:PPC PMAC driver
#   F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.44->1.45 
#   F:arm/sa11xx-uda1341.c:1.18->1.19 
#   F:core/control.c:1.49->1.50 
#   F:core/init.c:1.52->1.53 
#   F:isa/es18xx.c:1.52->1.53 
#   F:isa/opl3sa2.c:1.40->1.41 
#   F:isa/ad1848/ad1848_lib.c:1.38->1.39 
#   F:isa/cs423x/cs4231_lib.c:1.46->1.47 
#   F:pci/atiixp.c:1.26->1.27 
#   F:pci/atiixp_modem.c:1.10->1.11 
#   F:pci/cs4281.c:1.67->1.68 
#   F:pci/es1938.c:1.43->1.44 
#   F:pci/es1968.c:1.80->1.81 
#   F:pci/intel8x0.c:1.182->1.183 
#   F:pci/intel8x0m.c:1.23->1.24 
#   F:pci/maestro3.c:1.65->1.66 
#   F:pci/via82xx.c:1.131->1.132 
#   F:pci/via82xx_modem.c:1.1->1.2 
#   F:pci/ali5451/ali5451.c:1.59->1.60 
#   F:pci/cs46xx/cs46xx_lib.c:1.90->1.91 
#   F:pci/nm256/nm256.c:1.55->1.56 
#   F:pci/trident/trident_main.c:1.67->1.68 
#   F:pci/ymfpci/ymfpci_main.c:1.61->1.62 
#   F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.5->1.6 
#   F:ppc/pmac.c:1.40->1.41 
#   L:Clean up for PM code.
#   L:snd_power_change() is called in the common routines instead of driver's callback.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/maestro3.c
#   2004/12/15 08:26:11+01:00 perex@suse.cz +0 -2
#   [ALSA] Clean up power-management
#   
#   D:2004/12/15 15:26:08
#   C:Documentation,SA11xx UDA1341 driver,Control Midlevel,ALSA Core
#   C:ES18xx driver,OPL3SA2 driver,AD1848 driver,CS4231 driver,ATIIXP driver
#   C:ATIIXP-modem driver,CS4281 driver,ES1938 driver,ES1968 driver
#   C:Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver,VIA82xx driver
#   C:VIA82xx-modem driver,ALI5451 driver,CS46xx driver,NM256 driver
#   C:Trident driver,YMFPCI driver,Sound Core PDAudioCF driver
#   C:PPC PMAC driver
#   F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.44->1.45 
#   F:arm/sa11xx-uda1341.c:1.18->1.19 
#   F:core/control.c:1.49->1.50 
#   F:core/init.c:1.52->1.53 
#   F:isa/es18xx.c:1.52->1.53 
#   F:isa/opl3sa2.c:1.40->1.41 
#   F:isa/ad1848/ad1848_lib.c:1.38->1.39 
#   F:isa/cs423x/cs4231_lib.c:1.46->1.47 
#   F:pci/atiixp.c:1.26->1.27 
#   F:pci/atiixp_modem.c:1.10->1.11 
#   F:pci/cs4281.c:1.67->1.68 
#   F:pci/es1938.c:1.43->1.44 
#   F:pci/es1968.c:1.80->1.81 
#   F:pci/intel8x0.c:1.182->1.183 
#   F:pci/intel8x0m.c:1.23->1.24 
#   F:pci/maestro3.c:1.65->1.66 
#   F:pci/via82xx.c:1.131->1.132 
#   F:pci/via82xx_modem.c:1.1->1.2 
#   F:pci/ali5451/ali5451.c:1.59->1.60 
#   F:pci/cs46xx/cs46xx_lib.c:1.90->1.91 
#   F:pci/nm256/nm256.c:1.55->1.56 
#   F:pci/trident/trident_main.c:1.67->1.68 
#   F:pci/ymfpci/ymfpci_main.c:1.61->1.62 
#   F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.5->1.6 
#   F:ppc/pmac.c:1.40->1.41 
#   L:Clean up for PM code.
#   L:snd_power_change() is called in the common routines instead of driver's callback.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/intel8x0m.c
#   2004/12/15 08:26:11+01:00 perex@suse.cz +0 -2
#   [ALSA] Clean up power-management
#   
#   D:2004/12/15 15:26:08
#   C:Documentation,SA11xx UDA1341 driver,Control Midlevel,ALSA Core
#   C:ES18xx driver,OPL3SA2 driver,AD1848 driver,CS4231 driver,ATIIXP driver
#   C:ATIIXP-modem driver,CS4281 driver,ES1938 driver,ES1968 driver
#   C:Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver,VIA82xx driver
#   C:VIA82xx-modem driver,ALI5451 driver,CS46xx driver,NM256 driver
#   C:Trident driver,YMFPCI driver,Sound Core PDAudioCF driver
#   C:PPC PMAC driver
#   F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.44->1.45 
#   F:arm/sa11xx-uda1341.c:1.18->1.19 
#   F:core/control.c:1.49->1.50 
#   F:core/init.c:1.52->1.53 
#   F:isa/es18xx.c:1.52->1.53 
#   F:isa/opl3sa2.c:1.40->1.41 
#   F:isa/ad1848/ad1848_lib.c:1.38->1.39 
#   F:isa/cs423x/cs4231_lib.c:1.46->1.47 
#   F:pci/atiixp.c:1.26->1.27 
#   F:pci/atiixp_modem.c:1.10->1.11 
#   F:pci/cs4281.c:1.67->1.68 
#   F:pci/es1938.c:1.43->1.44 
#   F:pci/es1968.c:1.80->1.81 
#   F:pci/intel8x0.c:1.182->1.183 
#   F:pci/intel8x0m.c:1.23->1.24 
#   F:pci/maestro3.c:1.65->1.66 
#   F:pci/via82xx.c:1.131->1.132 
#   F:pci/via82xx_modem.c:1.1->1.2 
#   F:pci/ali5451/ali5451.c:1.59->1.60 
#   F:pci/cs46xx/cs46xx_lib.c:1.90->1.91 
#   F:pci/nm256/nm256.c:1.55->1.56 
#   F:pci/trident/trident_main.c:1.67->1.68 
#   F:pci/ymfpci/ymfpci_main.c:1.61->1.62 
#   F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.5->1.6 
#   F:ppc/pmac.c:1.40->1.41 
#   L:Clean up for PM code.
#   L:snd_power_change() is called in the common routines instead of driver's callback.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/intel8x0.c
#   2004/12/15 08:26:11+01:00 perex@suse.cz +0 -2
#   [ALSA] Clean up power-management
#   
#   D:2004/12/15 15:26:08
#   C:Documentation,SA11xx UDA1341 driver,Control Midlevel,ALSA Core
#   C:ES18xx driver,OPL3SA2 driver,AD1848 driver,CS4231 driver,ATIIXP driver
#   C:ATIIXP-modem driver,CS4281 driver,ES1938 driver,ES1968 driver
#   C:Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver,VIA82xx driver
#   C:VIA82xx-modem driver,ALI5451 driver,CS46xx driver,NM256 driver
#   C:Trident driver,YMFPCI driver,Sound Core PDAudioCF driver
#   C:PPC PMAC driver
#   F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.44->1.45 
#   F:arm/sa11xx-uda1341.c:1.18->1.19 
#   F:core/control.c:1.49->1.50 
#   F:core/init.c:1.52->1.53 
#   F:isa/es18xx.c:1.52->1.53 
#   F:isa/opl3sa2.c:1.40->1.41 
#   F:isa/ad1848/ad1848_lib.c:1.38->1.39 
#   F:isa/cs423x/cs4231_lib.c:1.46->1.47 
#   F:pci/atiixp.c:1.26->1.27 
#   F:pci/atiixp_modem.c:1.10->1.11 
#   F:pci/cs4281.c:1.67->1.68 
#   F:pci/es1938.c:1.43->1.44 
#   F:pci/es1968.c:1.80->1.81 
#   F:pci/intel8x0.c:1.182->1.183 
#   F:pci/intel8x0m.c:1.23->1.24 
#   F:pci/maestro3.c:1.65->1.66 
#   F:pci/via82xx.c:1.131->1.132 
#   F:pci/via82xx_modem.c:1.1->1.2 
#   F:pci/ali5451/ali5451.c:1.59->1.60 
#   F:pci/cs46xx/cs46xx_lib.c:1.90->1.91 
#   F:pci/nm256/nm256.c:1.55->1.56 
#   F:pci/trident/trident_main.c:1.67->1.68 
#   F:pci/ymfpci/ymfpci_main.c:1.61->1.62 
#   F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.5->1.6 
#   F:ppc/pmac.c:1.40->1.41 
#   L:Clean up for PM code.
#   L:snd_power_change() is called in the common routines instead of driver's callback.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/es1968.c
#   2004/12/15 08:26:11+01:00 perex@suse.cz +0 -2
#   [ALSA] Clean up power-management
#   
#   D:2004/12/15 15:26:08
#   C:Documentation,SA11xx UDA1341 driver,Control Midlevel,ALSA Core
#   C:ES18xx driver,OPL3SA2 driver,AD1848 driver,CS4231 driver,ATIIXP driver
#   C:ATIIXP-modem driver,CS4281 driver,ES1938 driver,ES1968 driver
#   C:Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver,VIA82xx driver
#   C:VIA82xx-modem driver,ALI5451 driver,CS46xx driver,NM256 driver
#   C:Trident driver,YMFPCI driver,Sound Core PDAudioCF driver
#   C:PPC PMAC driver
#   F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.44->1.45 
#   F:arm/sa11xx-uda1341.c:1.18->1.19 
#   F:core/control.c:1.49->1.50 
#   F:core/init.c:1.52->1.53 
#   F:isa/es18xx.c:1.52->1.53 
#   F:isa/opl3sa2.c:1.40->1.41 
#   F:isa/ad1848/ad1848_lib.c:1.38->1.39 
#   F:isa/cs423x/cs4231_lib.c:1.46->1.47 
#   F:pci/atiixp.c:1.26->1.27 
#   F:pci/atiixp_modem.c:1.10->1.11 
#   F:pci/cs4281.c:1.67->1.68 
#   F:pci/es1938.c:1.43->1.44 
#   F:pci/es1968.c:1.80->1.81 
#   F:pci/intel8x0.c:1.182->1.183 
#   F:pci/intel8x0m.c:1.23->1.24 
#   F:pci/maestro3.c:1.65->1.66 
#   F:pci/via82xx.c:1.131->1.132 
#   F:pci/via82xx_modem.c:1.1->1.2 
#   F:pci/ali5451/ali5451.c:1.59->1.60 
#   F:pci/cs46xx/cs46xx_lib.c:1.90->1.91 
#   F:pci/nm256/nm256.c:1.55->1.56 
#   F:pci/trident/trident_main.c:1.67->1.68 
#   F:pci/ymfpci/ymfpci_main.c:1.61->1.62 
#   F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.5->1.6 
#   F:ppc/pmac.c:1.40->1.41 
#   L:Clean up for PM code.
#   L:snd_power_change() is called in the common routines instead of driver's callback.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/es1938.c
#   2004/12/15 08:26:11+01:00 perex@suse.cz +0 -2
#   [ALSA] Clean up power-management
#   
#   D:2004/12/15 15:26:08
#   C:Documentation,SA11xx UDA1341 driver,Control Midlevel,ALSA Core
#   C:ES18xx driver,OPL3SA2 driver,AD1848 driver,CS4231 driver,ATIIXP driver
#   C:ATIIXP-modem driver,CS4281 driver,ES1938 driver,ES1968 driver
#   C:Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver,VIA82xx driver
#   C:VIA82xx-modem driver,ALI5451 driver,CS46xx driver,NM256 driver
#   C:Trident driver,YMFPCI driver,Sound Core PDAudioCF driver
#   C:PPC PMAC driver
#   F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.44->1.45 
#   F:arm/sa11xx-uda1341.c:1.18->1.19 
#   F:core/control.c:1.49->1.50 
#   F:core/init.c:1.52->1.53 
#   F:isa/es18xx.c:1.52->1.53 
#   F:isa/opl3sa2.c:1.40->1.41 
#   F:isa/ad1848/ad1848_lib.c:1.38->1.39 
#   F:isa/cs423x/cs4231_lib.c:1.46->1.47 
#   F:pci/atiixp.c:1.26->1.27 
#   F:pci/atiixp_modem.c:1.10->1.11 
#   F:pci/cs4281.c:1.67->1.68 
#   F:pci/es1938.c:1.43->1.44 
#   F:pci/es1968.c:1.80->1.81 
#   F:pci/intel8x0.c:1.182->1.183 
#   F:pci/intel8x0m.c:1.23->1.24 
#   F:pci/maestro3.c:1.65->1.66 
#   F:pci/via82xx.c:1.131->1.132 
#   F:pci/via82xx_modem.c:1.1->1.2 
#   F:pci/ali5451/ali5451.c:1.59->1.60 
#   F:pci/cs46xx/cs46xx_lib.c:1.90->1.91 
#   F:pci/nm256/nm256.c:1.55->1.56 
#   F:pci/trident/trident_main.c:1.67->1.68 
#   F:pci/ymfpci/ymfpci_main.c:1.61->1.62 
#   F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.5->1.6 
#   F:ppc/pmac.c:1.40->1.41 
#   L:Clean up for PM code.
#   L:snd_power_change() is called in the common routines instead of driver's callback.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/cs46xx/cs46xx_lib.c
#   2004/12/15 08:26:12+01:00 perex@suse.cz +0 -2
#   [ALSA] Clean up power-management
#   
#   D:2004/12/15 15:26:08
#   C:Documentation,SA11xx UDA1341 driver,Control Midlevel,ALSA Core
#   C:ES18xx driver,OPL3SA2 driver,AD1848 driver,CS4231 driver,ATIIXP driver
#   C:ATIIXP-modem driver,CS4281 driver,ES1938 driver,ES1968 driver
#   C:Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver,VIA82xx driver
#   C:VIA82xx-modem driver,ALI5451 driver,CS46xx driver,NM256 driver
#   C:Trident driver,YMFPCI driver,Sound Core PDAudioCF driver
#   C:PPC PMAC driver
#   F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.44->1.45 
#   F:arm/sa11xx-uda1341.c:1.18->1.19 
#   F:core/control.c:1.49->1.50 
#   F:core/init.c:1.52->1.53 
#   F:isa/es18xx.c:1.52->1.53 
#   F:isa/opl3sa2.c:1.40->1.41 
#   F:isa/ad1848/ad1848_lib.c:1.38->1.39 
#   F:isa/cs423x/cs4231_lib.c:1.46->1.47 
#   F:pci/atiixp.c:1.26->1.27 
#   F:pci/atiixp_modem.c:1.10->1.11 
#   F:pci/cs4281.c:1.67->1.68 
#   F:pci/es1938.c:1.43->1.44 
#   F:pci/es1968.c:1.80->1.81 
#   F:pci/intel8x0.c:1.182->1.183 
#   F:pci/intel8x0m.c:1.23->1.24 
#   F:pci/maestro3.c:1.65->1.66 
#   F:pci/via82xx.c:1.131->1.132 
#   F:pci/via82xx_modem.c:1.1->1.2 
#   F:pci/ali5451/ali5451.c:1.59->1.60 
#   F:pci/cs46xx/cs46xx_lib.c:1.90->1.91 
#   F:pci/nm256/nm256.c:1.55->1.56 
#   F:pci/trident/trident_main.c:1.67->1.68 
#   F:pci/ymfpci/ymfpci_main.c:1.61->1.62 
#   F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.5->1.6 
#   F:ppc/pmac.c:1.40->1.41 
#   L:Clean up for PM code.
#   L:snd_power_change() is called in the common routines instead of driver's callback.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/cs4281.c
#   2004/12/15 08:26:11+01:00 perex@suse.cz +0 -2
#   [ALSA] Clean up power-management
#   
#   D:2004/12/15 15:26:08
#   C:Documentation,SA11xx UDA1341 driver,Control Midlevel,ALSA Core
#   C:ES18xx driver,OPL3SA2 driver,AD1848 driver,CS4231 driver,ATIIXP driver
#   C:ATIIXP-modem driver,CS4281 driver,ES1938 driver,ES1968 driver
#   C:Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver,VIA82xx driver
#   C:VIA82xx-modem driver,ALI5451 driver,CS46xx driver,NM256 driver
#   C:Trident driver,YMFPCI driver,Sound Core PDAudioCF driver
#   C:PPC PMAC driver
#   F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.44->1.45 
#   F:arm/sa11xx-uda1341.c:1.18->1.19 
#   F:core/control.c:1.49->1.50 
#   F:core/init.c:1.52->1.53 
#   F:isa/es18xx.c:1.52->1.53 
#   F:isa/opl3sa2.c:1.40->1.41 
#   F:isa/ad1848/ad1848_lib.c:1.38->1.39 
#   F:isa/cs423x/cs4231_lib.c:1.46->1.47 
#   F:pci/atiixp.c:1.26->1.27 
#   F:pci/atiixp_modem.c:1.10->1.11 
#   F:pci/cs4281.c:1.67->1.68 
#   F:pci/es1938.c:1.43->1.44 
#   F:pci/es1968.c:1.80->1.81 
#   F:pci/intel8x0.c:1.182->1.183 
#   F:pci/intel8x0m.c:1.23->1.24 
#   F:pci/maestro3.c:1.65->1.66 
#   F:pci/via82xx.c:1.131->1.132 
#   F:pci/via82xx_modem.c:1.1->1.2 
#   F:pci/ali5451/ali5451.c:1.59->1.60 
#   F:pci/cs46xx/cs46xx_lib.c:1.90->1.91 
#   F:pci/nm256/nm256.c:1.55->1.56 
#   F:pci/trident/trident_main.c:1.67->1.68 
#   F:pci/ymfpci/ymfpci_main.c:1.61->1.62 
#   F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.5->1.6 
#   F:ppc/pmac.c:1.40->1.41 
#   L:Clean up for PM code.
#   L:snd_power_change() is called in the common routines instead of driver's callback.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/atiixp_modem.c
#   2004/12/15 08:26:11+01:00 perex@suse.cz +0 -2
#   [ALSA] Clean up power-management
#   
#   D:2004/12/15 15:26:08
#   C:Documentation,SA11xx UDA1341 driver,Control Midlevel,ALSA Core
#   C:ES18xx driver,OPL3SA2 driver,AD1848 driver,CS4231 driver,ATIIXP driver
#   C:ATIIXP-modem driver,CS4281 driver,ES1938 driver,ES1968 driver
#   C:Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver,VIA82xx driver
#   C:VIA82xx-modem driver,ALI5451 driver,CS46xx driver,NM256 driver
#   C:Trident driver,YMFPCI driver,Sound Core PDAudioCF driver
#   C:PPC PMAC driver
#   F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.44->1.45 
#   F:arm/sa11xx-uda1341.c:1.18->1.19 
#   F:core/control.c:1.49->1.50 
#   F:core/init.c:1.52->1.53 
#   F:isa/es18xx.c:1.52->1.53 
#   F:isa/opl3sa2.c:1.40->1.41 
#   F:isa/ad1848/ad1848_lib.c:1.38->1.39 
#   F:isa/cs423x/cs4231_lib.c:1.46->1.47 
#   F:pci/atiixp.c:1.26->1.27 
#   F:pci/atiixp_modem.c:1.10->1.11 
#   F:pci/cs4281.c:1.67->1.68 
#   F:pci/es1938.c:1.43->1.44 
#   F:pci/es1968.c:1.80->1.81 
#   F:pci/intel8x0.c:1.182->1.183 
#   F:pci/intel8x0m.c:1.23->1.24 
#   F:pci/maestro3.c:1.65->1.66 
#   F:pci/via82xx.c:1.131->1.132 
#   F:pci/via82xx_modem.c:1.1->1.2 
#   F:pci/ali5451/ali5451.c:1.59->1.60 
#   F:pci/cs46xx/cs46xx_lib.c:1.90->1.91 
#   F:pci/nm256/nm256.c:1.55->1.56 
#   F:pci/trident/trident_main.c:1.67->1.68 
#   F:pci/ymfpci/ymfpci_main.c:1.61->1.62 
#   F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.5->1.6 
#   F:ppc/pmac.c:1.40->1.41 
#   L:Clean up for PM code.
#   L:snd_power_change() is called in the common routines instead of driver's callback.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/atiixp.c
#   2004/12/15 08:26:11+01:00 perex@suse.cz +0 -2
#   [ALSA] Clean up power-management
#   
#   D:2004/12/15 15:26:08
#   C:Documentation,SA11xx UDA1341 driver,Control Midlevel,ALSA Core
#   C:ES18xx driver,OPL3SA2 driver,AD1848 driver,CS4231 driver,ATIIXP driver
#   C:ATIIXP-modem driver,CS4281 driver,ES1938 driver,ES1968 driver
#   C:Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver,VIA82xx driver
#   C:VIA82xx-modem driver,ALI5451 driver,CS46xx driver,NM256 driver
#   C:Trident driver,YMFPCI driver,Sound Core PDAudioCF driver
#   C:PPC PMAC driver
#   F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.44->1.45 
#   F:arm/sa11xx-uda1341.c:1.18->1.19 
#   F:core/control.c:1.49->1.50 
#   F:core/init.c:1.52->1.53 
#   F:isa/es18xx.c:1.52->1.53 
#   F:isa/opl3sa2.c:1.40->1.41 
#   F:isa/ad1848/ad1848_lib.c:1.38->1.39 
#   F:isa/cs423x/cs4231_lib.c:1.46->1.47 
#   F:pci/atiixp.c:1.26->1.27 
#   F:pci/atiixp_modem.c:1.10->1.11 
#   F:pci/cs4281.c:1.67->1.68 
#   F:pci/es1938.c:1.43->1.44 
#   F:pci/es1968.c:1.80->1.81 
#   F:pci/intel8x0.c:1.182->1.183 
#   F:pci/intel8x0m.c:1.23->1.24 
#   F:pci/maestro3.c:1.65->1.66 
#   F:pci/via82xx.c:1.131->1.132 
#   F:pci/via82xx_modem.c:1.1->1.2 
#   F:pci/ali5451/ali5451.c:1.59->1.60 
#   F:pci/cs46xx/cs46xx_lib.c:1.90->1.91 
#   F:pci/nm256/nm256.c:1.55->1.56 
#   F:pci/trident/trident_main.c:1.67->1.68 
#   F:pci/ymfpci/ymfpci_main.c:1.61->1.62 
#   F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.5->1.6 
#   F:ppc/pmac.c:1.40->1.41 
#   L:Clean up for PM code.
#   L:snd_power_change() is called in the common routines instead of driver's callback.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ali5451/ali5451.c
#   2004/12/15 08:26:12+01:00 perex@suse.cz +0 -2
#   [ALSA] Clean up power-management
#   
#   D:2004/12/15 15:26:08
#   C:Documentation,SA11xx UDA1341 driver,Control Midlevel,ALSA Core
#   C:ES18xx driver,OPL3SA2 driver,AD1848 driver,CS4231 driver,ATIIXP driver
#   C:ATIIXP-modem driver,CS4281 driver,ES1938 driver,ES1968 driver
#   C:Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver,VIA82xx driver
#   C:VIA82xx-modem driver,ALI5451 driver,CS46xx driver,NM256 driver
#   C:Trident driver,YMFPCI driver,Sound Core PDAudioCF driver
#   C:PPC PMAC driver
#   F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.44->1.45 
#   F:arm/sa11xx-uda1341.c:1.18->1.19 
#   F:core/control.c:1.49->1.50 
#   F:core/init.c:1.52->1.53 
#   F:isa/es18xx.c:1.52->1.53 
#   F:isa/opl3sa2.c:1.40->1.41 
#   F:isa/ad1848/ad1848_lib.c:1.38->1.39 
#   F:isa/cs423x/cs4231_lib.c:1.46->1.47 
#   F:pci/atiixp.c:1.26->1.27 
#   F:pci/atiixp_modem.c:1.10->1.11 
#   F:pci/cs4281.c:1.67->1.68 
#   F:pci/es1938.c:1.43->1.44 
#   F:pci/es1968.c:1.80->1.81 
#   F:pci/intel8x0.c:1.182->1.183 
#   F:pci/intel8x0m.c:1.23->1.24 
#   F:pci/maestro3.c:1.65->1.66 
#   F:pci/via82xx.c:1.131->1.132 
#   F:pci/via82xx_modem.c:1.1->1.2 
#   F:pci/ali5451/ali5451.c:1.59->1.60 
#   F:pci/cs46xx/cs46xx_lib.c:1.90->1.91 
#   F:pci/nm256/nm256.c:1.55->1.56 
#   F:pci/trident/trident_main.c:1.67->1.68 
#   F:pci/ymfpci/ymfpci_main.c:1.61->1.62 
#   F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.5->1.6 
#   F:ppc/pmac.c:1.40->1.41 
#   L:Clean up for PM code.
#   L:snd_power_change() is called in the common routines instead of driver's callback.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/isa/opl3sa2.c
#   2004/12/15 08:26:10+01:00 perex@suse.cz +0 -2
#   [ALSA] Clean up power-management
#   
#   D:2004/12/15 15:26:08
#   C:Documentation,SA11xx UDA1341 driver,Control Midlevel,ALSA Core
#   C:ES18xx driver,OPL3SA2 driver,AD1848 driver,CS4231 driver,ATIIXP driver
#   C:ATIIXP-modem driver,CS4281 driver,ES1938 driver,ES1968 driver
#   C:Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver,VIA82xx driver
#   C:VIA82xx-modem driver,ALI5451 driver,CS46xx driver,NM256 driver
#   C:Trident driver,YMFPCI driver,Sound Core PDAudioCF driver
#   C:PPC PMAC driver
#   F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.44->1.45 
#   F:arm/sa11xx-uda1341.c:1.18->1.19 
#   F:core/control.c:1.49->1.50 
#   F:core/init.c:1.52->1.53 
#   F:isa/es18xx.c:1.52->1.53 
#   F:isa/opl3sa2.c:1.40->1.41 
#   F:isa/ad1848/ad1848_lib.c:1.38->1.39 
#   F:isa/cs423x/cs4231_lib.c:1.46->1.47 
#   F:pci/atiixp.c:1.26->1.27 
#   F:pci/atiixp_modem.c:1.10->1.11 
#   F:pci/cs4281.c:1.67->1.68 
#   F:pci/es1938.c:1.43->1.44 
#   F:pci/es1968.c:1.80->1.81 
#   F:pci/intel8x0.c:1.182->1.183 
#   F:pci/intel8x0m.c:1.23->1.24 
#   F:pci/maestro3.c:1.65->1.66 
#   F:pci/via82xx.c:1.131->1.132 
#   F:pci/via82xx_modem.c:1.1->1.2 
#   F:pci/ali5451/ali5451.c:1.59->1.60 
#   F:pci/cs46xx/cs46xx_lib.c:1.90->1.91 
#   F:pci/nm256/nm256.c:1.55->1.56 
#   F:pci/trident/trident_main.c:1.67->1.68 
#   F:pci/ymfpci/ymfpci_main.c:1.61->1.62 
#   F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.5->1.6 
#   F:ppc/pmac.c:1.40->1.41 
#   L:Clean up for PM code.
#   L:snd_power_change() is called in the common routines instead of driver's callback.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/isa/es18xx.c
#   2004/12/15 08:26:10+01:00 perex@suse.cz +0 -2
#   [ALSA] Clean up power-management
#   
#   D:2004/12/15 15:26:08
#   C:Documentation,SA11xx UDA1341 driver,Control Midlevel,ALSA Core
#   C:ES18xx driver,OPL3SA2 driver,AD1848 driver,CS4231 driver,ATIIXP driver
#   C:ATIIXP-modem driver,CS4281 driver,ES1938 driver,ES1968 driver
#   C:Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver,VIA82xx driver
#   C:VIA82xx-modem driver,ALI5451 driver,CS46xx driver,NM256 driver
#   C:Trident driver,YMFPCI driver,Sound Core PDAudioCF driver
#   C:PPC PMAC driver
#   F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.44->1.45 
#   F:arm/sa11xx-uda1341.c:1.18->1.19 
#   F:core/control.c:1.49->1.50 
#   F:core/init.c:1.52->1.53 
#   F:isa/es18xx.c:1.52->1.53 
#   F:isa/opl3sa2.c:1.40->1.41 
#   F:isa/ad1848/ad1848_lib.c:1.38->1.39 
#   F:isa/cs423x/cs4231_lib.c:1.46->1.47 
#   F:pci/atiixp.c:1.26->1.27 
#   F:pci/atiixp_modem.c:1.10->1.11 
#   F:pci/cs4281.c:1.67->1.68 
#   F:pci/es1938.c:1.43->1.44 
#   F:pci/es1968.c:1.80->1.81 
#   F:pci/intel8x0.c:1.182->1.183 
#   F:pci/intel8x0m.c:1.23->1.24 
#   F:pci/maestro3.c:1.65->1.66 
#   F:pci/via82xx.c:1.131->1.132 
#   F:pci/via82xx_modem.c:1.1->1.2 
#   F:pci/ali5451/ali5451.c:1.59->1.60 
#   F:pci/cs46xx/cs46xx_lib.c:1.90->1.91 
#   F:pci/nm256/nm256.c:1.55->1.56 
#   F:pci/trident/trident_main.c:1.67->1.68 
#   F:pci/ymfpci/ymfpci_main.c:1.61->1.62 
#   F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.5->1.6 
#   F:ppc/pmac.c:1.40->1.41 
#   L:Clean up for PM code.
#   L:snd_power_change() is called in the common routines instead of driver's callback.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/isa/cs423x/cs4231_lib.c
#   2004/12/15 08:26:11+01:00 perex@suse.cz +2 -6
#   [ALSA] Clean up power-management
#   
#   D:2004/12/15 15:26:08
#   C:Documentation,SA11xx UDA1341 driver,Control Midlevel,ALSA Core
#   C:ES18xx driver,OPL3SA2 driver,AD1848 driver,CS4231 driver,ATIIXP driver
#   C:ATIIXP-modem driver,CS4281 driver,ES1938 driver,ES1968 driver
#   C:Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver,VIA82xx driver
#   C:VIA82xx-modem driver,ALI5451 driver,CS46xx driver,NM256 driver
#   C:Trident driver,YMFPCI driver,Sound Core PDAudioCF driver
#   C:PPC PMAC driver
#   F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.44->1.45 
#   F:arm/sa11xx-uda1341.c:1.18->1.19 
#   F:core/control.c:1.49->1.50 
#   F:core/init.c:1.52->1.53 
#   F:isa/es18xx.c:1.52->1.53 
#   F:isa/opl3sa2.c:1.40->1.41 
#   F:isa/ad1848/ad1848_lib.c:1.38->1.39 
#   F:isa/cs423x/cs4231_lib.c:1.46->1.47 
#   F:pci/atiixp.c:1.26->1.27 
#   F:pci/atiixp_modem.c:1.10->1.11 
#   F:pci/cs4281.c:1.67->1.68 
#   F:pci/es1938.c:1.43->1.44 
#   F:pci/es1968.c:1.80->1.81 
#   F:pci/intel8x0.c:1.182->1.183 
#   F:pci/intel8x0m.c:1.23->1.24 
#   F:pci/maestro3.c:1.65->1.66 
#   F:pci/via82xx.c:1.131->1.132 
#   F:pci/via82xx_modem.c:1.1->1.2 
#   F:pci/ali5451/ali5451.c:1.59->1.60 
#   F:pci/cs46xx/cs46xx_lib.c:1.90->1.91 
#   F:pci/nm256/nm256.c:1.55->1.56 
#   F:pci/trident/trident_main.c:1.67->1.68 
#   F:pci/ymfpci/ymfpci_main.c:1.61->1.62 
#   F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.5->1.6 
#   F:ppc/pmac.c:1.40->1.41 
#   L:Clean up for PM code.
#   L:snd_power_change() is called in the common routines instead of driver's callback.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/isa/ad1848/ad1848_lib.c
#   2004/12/15 08:26:11+01:00 perex@suse.cz +0 -8
#   [ALSA] Clean up power-management
#   
#   D:2004/12/15 15:26:08
#   C:Documentation,SA11xx UDA1341 driver,Control Midlevel,ALSA Core
#   C:ES18xx driver,OPL3SA2 driver,AD1848 driver,CS4231 driver,ATIIXP driver
#   C:ATIIXP-modem driver,CS4281 driver,ES1938 driver,ES1968 driver
#   C:Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver,VIA82xx driver
#   C:VIA82xx-modem driver,ALI5451 driver,CS46xx driver,NM256 driver
#   C:Trident driver,YMFPCI driver,Sound Core PDAudioCF driver
#   C:PPC PMAC driver
#   F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.44->1.45 
#   F:arm/sa11xx-uda1341.c:1.18->1.19 
#   F:core/control.c:1.49->1.50 
#   F:core/init.c:1.52->1.53 
#   F:isa/es18xx.c:1.52->1.53 
#   F:isa/opl3sa2.c:1.40->1.41 
#   F:isa/ad1848/ad1848_lib.c:1.38->1.39 
#   F:isa/cs423x/cs4231_lib.c:1.46->1.47 
#   F:pci/atiixp.c:1.26->1.27 
#   F:pci/atiixp_modem.c:1.10->1.11 
#   F:pci/cs4281.c:1.67->1.68 
#   F:pci/es1938.c:1.43->1.44 
#   F:pci/es1968.c:1.80->1.81 
#   F:pci/intel8x0.c:1.182->1.183 
#   F:pci/intel8x0m.c:1.23->1.24 
#   F:pci/maestro3.c:1.65->1.66 
#   F:pci/via82xx.c:1.131->1.132 
#   F:pci/via82xx_modem.c:1.1->1.2 
#   F:pci/ali5451/ali5451.c:1.59->1.60 
#   F:pci/cs46xx/cs46xx_lib.c:1.90->1.91 
#   F:pci/nm256/nm256.c:1.55->1.56 
#   F:pci/trident/trident_main.c:1.67->1.68 
#   F:pci/ymfpci/ymfpci_main.c:1.61->1.62 
#   F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.5->1.6 
#   F:ppc/pmac.c:1.40->1.41 
#   L:Clean up for PM code.
#   L:snd_power_change() is called in the common routines instead of driver's callback.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/init.c
#   2004/12/15 08:26:10+01:00 perex@suse.cz +10 -1
#   [ALSA] Clean up power-management
#   
#   D:2004/12/15 15:26:08
#   C:Documentation,SA11xx UDA1341 driver,Control Midlevel,ALSA Core
#   C:ES18xx driver,OPL3SA2 driver,AD1848 driver,CS4231 driver,ATIIXP driver
#   C:ATIIXP-modem driver,CS4281 driver,ES1938 driver,ES1968 driver
#   C:Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver,VIA82xx driver
#   C:VIA82xx-modem driver,ALI5451 driver,CS46xx driver,NM256 driver
#   C:Trident driver,YMFPCI driver,Sound Core PDAudioCF driver
#   C:PPC PMAC driver
#   F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.44->1.45 
#   F:arm/sa11xx-uda1341.c:1.18->1.19 
#   F:core/control.c:1.49->1.50 
#   F:core/init.c:1.52->1.53 
#   F:isa/es18xx.c:1.52->1.53 
#   F:isa/opl3sa2.c:1.40->1.41 
#   F:isa/ad1848/ad1848_lib.c:1.38->1.39 
#   F:isa/cs423x/cs4231_lib.c:1.46->1.47 
#   F:pci/atiixp.c:1.26->1.27 
#   F:pci/atiixp_modem.c:1.10->1.11 
#   F:pci/cs4281.c:1.67->1.68 
#   F:pci/es1938.c:1.43->1.44 
#   F:pci/es1968.c:1.80->1.81 
#   F:pci/intel8x0.c:1.182->1.183 
#   F:pci/intel8x0m.c:1.23->1.24 
#   F:pci/maestro3.c:1.65->1.66 
#   F:pci/via82xx.c:1.131->1.132 
#   F:pci/via82xx_modem.c:1.1->1.2 
#   F:pci/ali5451/ali5451.c:1.59->1.60 
#   F:pci/cs46xx/cs46xx_lib.c:1.90->1.91 
#   F:pci/nm256/nm256.c:1.55->1.56 
#   F:pci/trident/trident_main.c:1.67->1.68 
#   F:pci/ymfpci/ymfpci_main.c:1.61->1.62 
#   F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.5->1.6 
#   F:ppc/pmac.c:1.40->1.41 
#   L:Clean up for PM code.
#   L:snd_power_change() is called in the common routines instead of driver's callback.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/control.c
#   2004/12/15 08:26:10+01:00 perex@suse.cz +10 -5
#   [ALSA] Clean up power-management
#   
#   D:2004/12/15 15:26:08
#   C:Documentation,SA11xx UDA1341 driver,Control Midlevel,ALSA Core
#   C:ES18xx driver,OPL3SA2 driver,AD1848 driver,CS4231 driver,ATIIXP driver
#   C:ATIIXP-modem driver,CS4281 driver,ES1938 driver,ES1968 driver
#   C:Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver,VIA82xx driver
#   C:VIA82xx-modem driver,ALI5451 driver,CS46xx driver,NM256 driver
#   C:Trident driver,YMFPCI driver,Sound Core PDAudioCF driver
#   C:PPC PMAC driver
#   F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.44->1.45 
#   F:arm/sa11xx-uda1341.c:1.18->1.19 
#   F:core/control.c:1.49->1.50 
#   F:core/init.c:1.52->1.53 
#   F:isa/es18xx.c:1.52->1.53 
#   F:isa/opl3sa2.c:1.40->1.41 
#   F:isa/ad1848/ad1848_lib.c:1.38->1.39 
#   F:isa/cs423x/cs4231_lib.c:1.46->1.47 
#   F:pci/atiixp.c:1.26->1.27 
#   F:pci/atiixp_modem.c:1.10->1.11 
#   F:pci/cs4281.c:1.67->1.68 
#   F:pci/es1938.c:1.43->1.44 
#   F:pci/es1968.c:1.80->1.81 
#   F:pci/intel8x0.c:1.182->1.183 
#   F:pci/intel8x0m.c:1.23->1.24 
#   F:pci/maestro3.c:1.65->1.66 
#   F:pci/via82xx.c:1.131->1.132 
#   F:pci/via82xx_modem.c:1.1->1.2 
#   F:pci/ali5451/ali5451.c:1.59->1.60 
#   F:pci/cs46xx/cs46xx_lib.c:1.90->1.91 
#   F:pci/nm256/nm256.c:1.55->1.56 
#   F:pci/trident/trident_main.c:1.67->1.68 
#   F:pci/ymfpci/ymfpci_main.c:1.61->1.62 
#   F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.5->1.6 
#   F:ppc/pmac.c:1.40->1.41 
#   L:Clean up for PM code.
#   L:snd_power_change() is called in the common routines instead of driver's callback.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/arm/sa11xx-uda1341.c
#   2004/12/15 08:26:10+01:00 perex@suse.cz +1 -3
#   [ALSA] Clean up power-management
#   
#   D:2004/12/15 15:26:08
#   C:Documentation,SA11xx UDA1341 driver,Control Midlevel,ALSA Core
#   C:ES18xx driver,OPL3SA2 driver,AD1848 driver,CS4231 driver,ATIIXP driver
#   C:ATIIXP-modem driver,CS4281 driver,ES1938 driver,ES1968 driver
#   C:Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver,VIA82xx driver
#   C:VIA82xx-modem driver,ALI5451 driver,CS46xx driver,NM256 driver
#   C:Trident driver,YMFPCI driver,Sound Core PDAudioCF driver
#   C:PPC PMAC driver
#   F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.44->1.45 
#   F:arm/sa11xx-uda1341.c:1.18->1.19 
#   F:core/control.c:1.49->1.50 
#   F:core/init.c:1.52->1.53 
#   F:isa/es18xx.c:1.52->1.53 
#   F:isa/opl3sa2.c:1.40->1.41 
#   F:isa/ad1848/ad1848_lib.c:1.38->1.39 
#   F:isa/cs423x/cs4231_lib.c:1.46->1.47 
#   F:pci/atiixp.c:1.26->1.27 
#   F:pci/atiixp_modem.c:1.10->1.11 
#   F:pci/cs4281.c:1.67->1.68 
#   F:pci/es1938.c:1.43->1.44 
#   F:pci/es1968.c:1.80->1.81 
#   F:pci/intel8x0.c:1.182->1.183 
#   F:pci/intel8x0m.c:1.23->1.24 
#   F:pci/maestro3.c:1.65->1.66 
#   F:pci/via82xx.c:1.131->1.132 
#   F:pci/via82xx_modem.c:1.1->1.2 
#   F:pci/ali5451/ali5451.c:1.59->1.60 
#   F:pci/cs46xx/cs46xx_lib.c:1.90->1.91 
#   F:pci/nm256/nm256.c:1.55->1.56 
#   F:pci/trident/trident_main.c:1.67->1.68 
#   F:pci/ymfpci/ymfpci_main.c:1.61->1.62 
#   F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.5->1.6 
#   F:ppc/pmac.c:1.40->1.41 
#   L:Clean up for PM code.
#   L:snd_power_change() is called in the common routines instead of driver's callback.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
#   2004/12/15 08:26:08+01:00 perex@suse.cz +2 -6
#   [ALSA] Clean up power-management
#   
#   D:2004/12/15 15:26:08
#   C:Documentation,SA11xx UDA1341 driver,Control Midlevel,ALSA Core
#   C:ES18xx driver,OPL3SA2 driver,AD1848 driver,CS4231 driver,ATIIXP driver
#   C:ATIIXP-modem driver,CS4281 driver,ES1938 driver,ES1968 driver
#   C:Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver,VIA82xx driver
#   C:VIA82xx-modem driver,ALI5451 driver,CS46xx driver,NM256 driver
#   C:Trident driver,YMFPCI driver,Sound Core PDAudioCF driver
#   C:PPC PMAC driver
#   F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.44->1.45 
#   F:arm/sa11xx-uda1341.c:1.18->1.19 
#   F:core/control.c:1.49->1.50 
#   F:core/init.c:1.52->1.53 
#   F:isa/es18xx.c:1.52->1.53 
#   F:isa/opl3sa2.c:1.40->1.41 
#   F:isa/ad1848/ad1848_lib.c:1.38->1.39 
#   F:isa/cs423x/cs4231_lib.c:1.46->1.47 
#   F:pci/atiixp.c:1.26->1.27 
#   F:pci/atiixp_modem.c:1.10->1.11 
#   F:pci/cs4281.c:1.67->1.68 
#   F:pci/es1938.c:1.43->1.44 
#   F:pci/es1968.c:1.80->1.81 
#   F:pci/intel8x0.c:1.182->1.183 
#   F:pci/intel8x0m.c:1.23->1.24 
#   F:pci/maestro3.c:1.65->1.66 
#   F:pci/via82xx.c:1.131->1.132 
#   F:pci/via82xx_modem.c:1.1->1.2 
#   F:pci/ali5451/ali5451.c:1.59->1.60 
#   F:pci/cs46xx/cs46xx_lib.c:1.90->1.91 
#   F:pci/nm256/nm256.c:1.55->1.56 
#   F:pci/trident/trident_main.c:1.67->1.68 
#   F:pci/ymfpci/ymfpci_main.c:1.61->1.62 
#   F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.5->1.6 
#   F:ppc/pmac.c:1.40->1.41 
#   L:Clean up for PM code.
#   L:snd_power_change() is called in the common routines instead of driver's callback.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 11:12:14+01:00 perex@suse.cz 
#   [ALSA] Midiman Delta DIO2496 has two stereo analog outs
#   
#   ICE1712 driver
#   
#   
#   Signed-off-by: Jaroslav Kysela <perex@suse.cz>
# 
# sound/pci/ice1712/delta.c
#   2004/12/13 04:42:15+01:00 perex@suse.cz +3 -0
#   [ALSA] Midiman Delta DIO2496 has two stereo analog outs
#   
#   D:2004/12/13 11:42:15
#   C:ICE1712 driver
#   F:pci/ice1712/delta.c:1.19->1.20 
#   L:
#   Signed-off-by: Jaroslav Kysela <perex@suse.cz>
# 
# ChangeSet
#   2005/01/03 11:11:06+01:00 perex@suse.cz 
#   [ALSA] [trivial] Fix compile warning
#   
#   Intel8x0 driver
#   Fix compile warning abount unused variables.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/intel8x0.c
#   2004/12/10 08:38:05+01:00 perex@suse.cz +0 -1
#   [ALSA] [trivial] Fix compile warning
#   
#   D:2004/12/10 15:38:05
#   C:Intel8x0 driver
#   F:pci/intel8x0.c:1.181->1.182 
#   L:Fix compile warning abount unused variables.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 11:09:59+01:00 perex@suse.cz 
#   [ALSA] Fix non-symmetrical page_attr changes
#   
#   Intel8x0 driver
#   Fixed non-symmetrical calls of change_page_attr() which may cause BUG().
#   This bug happens only on 440MX.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/intel8x0.c
#   2004/12/10 04:12:22+01:00 perex@suse.cz +25 -5
#   [ALSA] Fix non-symmetrical page_attr changes
#   
#   D:2004/12/10 11:12:22
#   C:Intel8x0 driver
#   F:pci/intel8x0.c:1.180->1.181 
#   L:Fixed non-symmetrical calls of change_page_attr() which may cause BUG().
#   L:This bug happens only on 440MX.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 11:08:53+01:00 perex@suse.cz 
#   [ALSA] Add missing USX2Y_PCM hwdep entry
#   
#   ALSA Core
#   Added the missing SNDRV_HWDEP_IFACE_USX2Y_PCM definition.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# include/sound/asound.h
#   2004/12/10 04:10:22+01:00 perex@suse.cz +2 -1
#   [ALSA] Add missing USX2Y_PCM hwdep entry
#   
#   D:2004/12/10 11:10:22
#   C:ALSA Core
#   F:include/asound.h:1.46->1.47 
#   L:Added the missing SNDRV_HWDEP_IFACE_USX2Y_PCM definition.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 11:07:46+01:00 perex@suse.cz 
#   [ALSA] Add missing source codes in the last hwdep-pcm patch.
#   
#   USB USX2Y
#   The missing source files in the last hwdep-pcm patch are added.
#   
#   Signed-off-by: Karsten Wiese <annabellesgarden@yahoo.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/usb/usx2y/usx2yhwdeppcm.h
#   2005/01/03 09:50:31+01:00 perex@suse.cz +21 -0
#   [ALSA] Add missing source codes in the last hwdep-pcm patch.
#   
#   D:2004/12/08 19:29:21
#   C:USB USX2Y
#   F:usb/usx2y/usx2yhwdeppcm.c:INITIAL->1.1 
#   F:usb/usx2y/usx2yhwdeppcm.h:INITIAL->1.1 
#   L:The missing source files in the last hwdep-pcm patch are added.
#   Signed-off-by: Karsten Wiese <annabellesgarden@yahoo.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/usb/usx2y/usx2yhwdeppcm.h
#   2005/01/03 09:50:31+01:00 perex@suse.cz +0 -0
#   BitKeeper file /home/perex/bk/linux-sound/work/sound/usb/usx2y/usx2yhwdeppcm.h
# 
# sound/usb/usx2y/usx2yhwdeppcm.c
#   2005/01/03 09:50:27+01:00 perex@suse.cz +807 -0
#   [ALSA] Add missing source codes in the last hwdep-pcm patch.
#   
#   D:2004/12/08 19:29:21
#   C:USB USX2Y
#   F:usb/usx2y/usx2yhwdeppcm.c:INITIAL->1.1 
#   F:usb/usx2y/usx2yhwdeppcm.h:INITIAL->1.1 
#   L:The missing source files in the last hwdep-pcm patch are added.
#   Signed-off-by: Karsten Wiese <annabellesgarden@yahoo.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/usb/usx2y/usx2yhwdeppcm.c
#   2005/01/03 09:50:27+01:00 perex@suse.cz +0 -0
#   BitKeeper file /home/perex/bk/linux-sound/work/sound/usb/usx2y/usx2yhwdeppcm.c
# 
# ChangeSet
#   2005/01/03 11:06:35+01:00 perex@suse.cz 
#   [ALSA] hwdep interface for pcm data
#   
#   USB,USB USX2Y
#   Implements 'rawusb' pcm data transfer through hwdep interface:
#   The usb_hc moves pcm data from/into memory via DMA.
#   That memory is mmaped by jack's usx2y driver.
#   Jack's usx2y driver is the first/last executable code to read/write pcm data.
#   Read/write is a combination of power of 2 period shaping and float/int
#   conversation.
#   
#   Compared to standard alsa/jack we leave out power of 2 period shaping
#   inside snd-usb-usx2y which needs memcpy() and additional buffers.
#   As a side effect possible unwanted pcm-data coruption resulting of
#   standard alsa's snd-usb-usx2y period shaping scheme falls away.
#   Result is sane jack operation at buffering schemes down to 128frames,
#   2 periods.
#   
#   Also changed Kconfig file, so snd-usb-usx2y is only available for X86,
#   PPC or ALPHA platforms, as on others DMA-memory isn't mmapable.
#   
#   Signed-off-by: Karsten Wiese <annabellesgarden@yahoo.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/usb/usx2y/usx2y.h
#   2004/12/08 12:28:03+01:00 perex@suse.cz +4 -2
#   [ALSA] hwdep interface for pcm data
#   
#   D:2004/12/08 19:27:51
#   C:USB,USB USX2Y
#   F:usb/Kconfig:1.7->1.8 
#   F:usb/usx2y/Makefile:1.1->1.2 
#   F:usb/usx2y/usX2Yhwdep.c:1.3->1.4 
#   F:usb/usx2y/usbusx2y.h:1.2->1.3 
#   F:usb/usx2y/usbusx2yaudio.c:1.7->1.8 
#   F:usb/usx2y/usx2y.h:1.1->1.2 
#   L:Implements 'rawusb' pcm data transfer through hwdep interface:
#   L:The usb_hc moves pcm data from/into memory via DMA.
#   L:That memory is mmaped by jack's usx2y driver.
#   L:Jack's usx2y driver is the first/last executable code to read/write pcm data.
#   L:Read/write is a combination of power of 2 period shaping and float/int
#   L:conversation.
#   L:
#   L:Compared to standard alsa/jack we leave out power of 2 period shaping
#   L:inside snd-usb-usx2y which needs memcpy() and additional buffers.
#   L:As a side effect possible unwanted pcm-data coruption resulting of
#   L:standard alsa's snd-usb-usx2y period shaping scheme falls away.
#   L:Result is sane jack operation at buffering schemes down to 128frames,
#   L:2 periods.
#   L:
#   L:Also changed Kconfig file, so snd-usb-usx2y is only available for X86,
#   L:PPC or ALPHA platforms, as on others DMA-memory isn't mmapable.
#   Signed-off-by: Karsten Wiese <annabellesgarden@yahoo.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/usb/usx2y/usbusx2yaudio.c
#   2004/12/08 12:28:03+01:00 perex@suse.cz +3 -1
#   [ALSA] hwdep interface for pcm data
#   
#   D:2004/12/08 19:27:51
#   C:USB,USB USX2Y
#   F:usb/Kconfig:1.7->1.8 
#   F:usb/usx2y/Makefile:1.1->1.2 
#   F:usb/usx2y/usX2Yhwdep.c:1.3->1.4 
#   F:usb/usx2y/usbusx2y.h:1.2->1.3 
#   F:usb/usx2y/usbusx2yaudio.c:1.7->1.8 
#   F:usb/usx2y/usx2y.h:1.1->1.2 
#   L:Implements 'rawusb' pcm data transfer through hwdep interface:
#   L:The usb_hc moves pcm data from/into memory via DMA.
#   L:That memory is mmaped by jack's usx2y driver.
#   L:Jack's usx2y driver is the first/last executable code to read/write pcm data.
#   L:Read/write is a combination of power of 2 period shaping and float/int
#   L:conversation.
#   L:
#   L:Compared to standard alsa/jack we leave out power of 2 period shaping
#   L:inside snd-usb-usx2y which needs memcpy() and additional buffers.
#   L:As a side effect possible unwanted pcm-data coruption resulting of
#   L:standard alsa's snd-usb-usx2y period shaping scheme falls away.
#   L:Result is sane jack operation at buffering schemes down to 128frames,
#   L:2 periods.
#   L:
#   L:Also changed Kconfig file, so snd-usb-usx2y is only available for X86,
#   L:PPC or ALPHA platforms, as on others DMA-memory isn't mmapable.
#   Signed-off-by: Karsten Wiese <annabellesgarden@yahoo.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/usb/usx2y/usbusx2y.h
#   2004/12/08 12:28:03+01:00 perex@suse.cz +2 -0
#   [ALSA] hwdep interface for pcm data
#   
#   D:2004/12/08 19:27:51
#   C:USB,USB USX2Y
#   F:usb/Kconfig:1.7->1.8 
#   F:usb/usx2y/Makefile:1.1->1.2 
#   F:usb/usx2y/usX2Yhwdep.c:1.3->1.4 
#   F:usb/usx2y/usbusx2y.h:1.2->1.3 
#   F:usb/usx2y/usbusx2yaudio.c:1.7->1.8 
#   F:usb/usx2y/usx2y.h:1.1->1.2 
#   L:Implements 'rawusb' pcm data transfer through hwdep interface:
#   L:The usb_hc moves pcm data from/into memory via DMA.
#   L:That memory is mmaped by jack's usx2y driver.
#   L:Jack's usx2y driver is the first/last executable code to read/write pcm data.
#   L:Read/write is a combination of power of 2 period shaping and float/int
#   L:conversation.
#   L:
#   L:Compared to standard alsa/jack we leave out power of 2 period shaping
#   L:inside snd-usb-usx2y which needs memcpy() and additional buffers.
#   L:As a side effect possible unwanted pcm-data coruption resulting of
#   L:standard alsa's snd-usb-usx2y period shaping scheme falls away.
#   L:Result is sane jack operation at buffering schemes down to 128frames,
#   L:2 periods.
#   L:
#   L:Also changed Kconfig file, so snd-usb-usx2y is only available for X86,
#   L:PPC or ALPHA platforms, as on others DMA-memory isn't mmapable.
#   Signed-off-by: Karsten Wiese <annabellesgarden@yahoo.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/usb/usx2y/usX2Yhwdep.c
#   2004/12/08 12:28:03+01:00 perex@suse.cz +4 -0
#   [ALSA] hwdep interface for pcm data
#   
#   D:2004/12/08 19:27:51
#   C:USB,USB USX2Y
#   F:usb/Kconfig:1.7->1.8 
#   F:usb/usx2y/Makefile:1.1->1.2 
#   F:usb/usx2y/usX2Yhwdep.c:1.3->1.4 
#   F:usb/usx2y/usbusx2y.h:1.2->1.3 
#   F:usb/usx2y/usbusx2yaudio.c:1.7->1.8 
#   F:usb/usx2y/usx2y.h:1.1->1.2 
#   L:Implements 'rawusb' pcm data transfer through hwdep interface:
#   L:The usb_hc moves pcm data from/into memory via DMA.
#   L:That memory is mmaped by jack's usx2y driver.
#   L:Jack's usx2y driver is the first/last executable code to read/write pcm data.
#   L:Read/write is a combination of power of 2 period shaping and float/int
#   L:conversation.
#   L:
#   L:Compared to standard alsa/jack we leave out power of 2 period shaping
#   L:inside snd-usb-usx2y which needs memcpy() and additional buffers.
#   L:As a side effect possible unwanted pcm-data coruption resulting of
#   L:standard alsa's snd-usb-usx2y period shaping scheme falls away.
#   L:Result is sane jack operation at buffering schemes down to 128frames,
#   L:2 periods.
#   L:
#   L:Also changed Kconfig file, so snd-usb-usx2y is only available for X86,
#   L:PPC or ALPHA platforms, as on others DMA-memory isn't mmapable.
#   Signed-off-by: Karsten Wiese <annabellesgarden@yahoo.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/usb/usx2y/Makefile
#   2004/12/08 12:28:03+01:00 perex@suse.cz +1 -1
#   [ALSA] hwdep interface for pcm data
#   
#   D:2004/12/08 19:27:51
#   C:USB,USB USX2Y
#   F:usb/Kconfig:1.7->1.8 
#   F:usb/usx2y/Makefile:1.1->1.2 
#   F:usb/usx2y/usX2Yhwdep.c:1.3->1.4 
#   F:usb/usx2y/usbusx2y.h:1.2->1.3 
#   F:usb/usx2y/usbusx2yaudio.c:1.7->1.8 
#   F:usb/usx2y/usx2y.h:1.1->1.2 
#   L:Implements 'rawusb' pcm data transfer through hwdep interface:
#   L:The usb_hc moves pcm data from/into memory via DMA.
#   L:That memory is mmaped by jack's usx2y driver.
#   L:Jack's usx2y driver is the first/last executable code to read/write pcm data.
#   L:Read/write is a combination of power of 2 period shaping and float/int
#   L:conversation.
#   L:
#   L:Compared to standard alsa/jack we leave out power of 2 period shaping
#   L:inside snd-usb-usx2y which needs memcpy() and additional buffers.
#   L:As a side effect possible unwanted pcm-data coruption resulting of
#   L:standard alsa's snd-usb-usx2y period shaping scheme falls away.
#   L:Result is sane jack operation at buffering schemes down to 128frames,
#   L:2 periods.
#   L:
#   L:Also changed Kconfig file, so snd-usb-usx2y is only available for X86,
#   L:PPC or ALPHA platforms, as on others DMA-memory isn't mmapable.
#   Signed-off-by: Karsten Wiese <annabellesgarden@yahoo.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/usb/Kconfig
#   2004/12/08 12:27:51+01:00 perex@suse.cz +1 -1
#   [ALSA] hwdep interface for pcm data
#   
#   D:2004/12/08 19:27:51
#   C:USB,USB USX2Y
#   F:usb/Kconfig:1.7->1.8 
#   F:usb/usx2y/Makefile:1.1->1.2 
#   F:usb/usx2y/usX2Yhwdep.c:1.3->1.4 
#   F:usb/usx2y/usbusx2y.h:1.2->1.3 
#   F:usb/usx2y/usbusx2yaudio.c:1.7->1.8 
#   F:usb/usx2y/usx2y.h:1.1->1.2 
#   L:Implements 'rawusb' pcm data transfer through hwdep interface:
#   L:The usb_hc moves pcm data from/into memory via DMA.
#   L:That memory is mmaped by jack's usx2y driver.
#   L:Jack's usx2y driver is the first/last executable code to read/write pcm data.
#   L:Read/write is a combination of power of 2 period shaping and float/int
#   L:conversation.
#   L:
#   L:Compared to standard alsa/jack we leave out power of 2 period shaping
#   L:inside snd-usb-usx2y which needs memcpy() and additional buffers.
#   L:As a side effect possible unwanted pcm-data coruption resulting of
#   L:standard alsa's snd-usb-usx2y period shaping scheme falls away.
#   L:Result is sane jack operation at buffering schemes down to 128frames,
#   L:2 periods.
#   L:
#   L:Also changed Kconfig file, so snd-usb-usx2y is only available for X86,
#   L:PPC or ALPHA platforms, as on others DMA-memory isn't mmapable.
#   Signed-off-by: Karsten Wiese <annabellesgarden@yahoo.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 11:05:24+01:00 perex@suse.cz 
#   [ALSA] Fix detection of Xbox
#   
#   AC97 Codec Core
#   Unfortunately, on newer xboxes, the chip reports less info than
#   before, making another change necessary - this change is backwards
#   compatible, and doesn't break earlier xboxes, of course.
#   
#   The patch is originally from Ed Hucek <hostmaster@ed-soft.at>.
#   
#   Signed-off-by: David Pye <dmp@davidmpye.dyndns.org>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ac97/ac97_codec.c
#   2004/12/08 12:15:08+01:00 perex@suse.cz +2 -1
#   [ALSA] Fix detection of Xbox
#   
#   D:2004/12/08 19:15:08
#   C:AC97 Codec Core
#   F:pci/ac97/ac97_codec.c:1.155->1.156 
#   L:Unfortunately, on newer xboxes, the chip reports less info than
#   L:before, making another change necessary - this change is backwards
#   L:compatible, and doesn't break earlier xboxes, of course.
#   L:
#   L:The patch is originally from Ed Hucek <hostmaster@ed-soft.at>.
#   Signed-off-by: David Pye <dmp@davidmpye.dyndns.org>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 11:04:20+01:00 perex@suse.cz 
#   ALSA CVS update
#   ENS1370/1+ driver
#   Trivial patch to enable rear out selection for ens1373 on
#   the Gigabyte GA-8IEXP motherboard.
#   
#   Signed-off-by: Andrew Dennison <andrew-lists@optusnet.com.au>
#   Signed-off-by: Jaroslav Kysela <perex@suse.cz>
# 
# sound/pci/ens1370.c
#   2004/12/08 05:46:41+01:00 perex@suse.cz +4 -2
#   ALSA CVS update
#   D:2004/12/08 12:46:41
#   C:ENS1370/1+ driver
#   F:pci/ens1370.c:1.71->1.72 
#   L:Trivial patch to enable rear out selection for ens1373 on
#   L:the Gigabyte GA-8IEXP motherboard.
#   Signed-off-by: Andrew Dennison <andrew-lists@optusnet.com.au>
#   Signed-off-by: Jaroslav Kysela <perex@suse.cz>
# 
# ChangeSet
#   2005/01/03 11:03:12+01:00 perex@suse.cz 
#   [ALSA] misc cleanups
#   
#   OPL3,Digigram VX core,I2C cs8427,SoundFont,Common EMU synth
#   The patch below contains the following changes in ALSA code not touched
#   by my previous patches:
#   - make some needlessly global code static
#   - remove the following unused global functions:
#     - sound/i2c/cs84: snd_cs8427_detect
#     - sound/synth/emux/emux_synth.c: snd_emux_release_voice
#     - sound/synth/emux/soundfont.: snd_soundfont_mem_used
#   - remove the following unused EXPORT_SYMBOL's:
#     - sound/i2c/cs8427.c: snd_cs8427_detect
#     - sound/i2c/cs8427.c: snd_cs8427_reg_read
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/synth/emux/soundfont.c
#   2004/12/07 08:36:07+01:00 perex@suse.cz +0 -8
#   [ALSA] misc cleanups
#   
#   D:2004/12/07 15:36:06
#   C:OPL3,Digigram VX core,I2C cs8427,SoundFont,Common EMU synth
#   F:drivers/opl3/opl3_drums.c:1.4->1.5 
#   F:drivers/opl3/opl3_lib.c:1.23->1.24 
#   F:drivers/opl3/opl3_midi.c:1.6->1.7 
#   F:drivers/opl3/opl3_seq.c:1.15->1.16 
#   F:drivers/vx/vx_cmd.c:1.1->1.2 
#   F:drivers/vx/vx_cmd.h:1.1->1.2 
#   F:drivers/vx/vx_uer.c:1.2->1.3 
#   F:i2c/cs8427.c:1.22->1.23 
#   F:include/cs8427.h:1.7->1.8 
#   F:include/soundfont.h:1.7->1.8 
#   F:include/vx_core.h:1.3->1.4 
#   F:synth/emux/emux_synth.c:1.10->1.11 
#   F:synth/emux/soundfont.c:1.13->1.14 
#   L:The patch below contains the following changes in ALSA code not touched
#   L:by my previous patches:
#   L:- make some needlessly global code static
#   L:- remove the following unused global functions:
#   L:  - sound/i2c/cs84: snd_cs8427_detect
#   L:  - sound/synth/emux/emux_synth.c: snd_emux_release_voice
#   L:  - sound/synth/emux/soundfont.: snd_soundfont_mem_used
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - sound/i2c/cs8427.c: snd_cs8427_detect
#   L:  - sound/i2c/cs8427.c: snd_cs8427_reg_read
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/synth/emux/emux_synth.c
#   2004/12/07 08:36:07+01:00 perex@suse.cz +0 -10
#   [ALSA] misc cleanups
#   
#   D:2004/12/07 15:36:06
#   C:OPL3,Digigram VX core,I2C cs8427,SoundFont,Common EMU synth
#   F:drivers/opl3/opl3_drums.c:1.4->1.5 
#   F:drivers/opl3/opl3_lib.c:1.23->1.24 
#   F:drivers/opl3/opl3_midi.c:1.6->1.7 
#   F:drivers/opl3/opl3_seq.c:1.15->1.16 
#   F:drivers/vx/vx_cmd.c:1.1->1.2 
#   F:drivers/vx/vx_cmd.h:1.1->1.2 
#   F:drivers/vx/vx_uer.c:1.2->1.3 
#   F:i2c/cs8427.c:1.22->1.23 
#   F:include/cs8427.h:1.7->1.8 
#   F:include/soundfont.h:1.7->1.8 
#   F:include/vx_core.h:1.3->1.4 
#   F:synth/emux/emux_synth.c:1.10->1.11 
#   F:synth/emux/soundfont.c:1.13->1.14 
#   L:The patch below contains the following changes in ALSA code not touched
#   L:by my previous patches:
#   L:- make some needlessly global code static
#   L:- remove the following unused global functions:
#   L:  - sound/i2c/cs84: snd_cs8427_detect
#   L:  - sound/synth/emux/emux_synth.c: snd_emux_release_voice
#   L:  - sound/synth/emux/soundfont.: snd_soundfont_mem_used
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - sound/i2c/cs8427.c: snd_cs8427_detect
#   L:  - sound/i2c/cs8427.c: snd_cs8427_reg_read
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/i2c/cs8427.c
#   2004/12/07 08:36:07+01:00 perex@suse.cz +4 -14
#   [ALSA] misc cleanups
#   
#   D:2004/12/07 15:36:06
#   C:OPL3,Digigram VX core,I2C cs8427,SoundFont,Common EMU synth
#   F:drivers/opl3/opl3_drums.c:1.4->1.5 
#   F:drivers/opl3/opl3_lib.c:1.23->1.24 
#   F:drivers/opl3/opl3_midi.c:1.6->1.7 
#   F:drivers/opl3/opl3_seq.c:1.15->1.16 
#   F:drivers/vx/vx_cmd.c:1.1->1.2 
#   F:drivers/vx/vx_cmd.h:1.1->1.2 
#   F:drivers/vx/vx_uer.c:1.2->1.3 
#   F:i2c/cs8427.c:1.22->1.23 
#   F:include/cs8427.h:1.7->1.8 
#   F:include/soundfont.h:1.7->1.8 
#   F:include/vx_core.h:1.3->1.4 
#   F:synth/emux/emux_synth.c:1.10->1.11 
#   F:synth/emux/soundfont.c:1.13->1.14 
#   L:The patch below contains the following changes in ALSA code not touched
#   L:by my previous patches:
#   L:- make some needlessly global code static
#   L:- remove the following unused global functions:
#   L:  - sound/i2c/cs84: snd_cs8427_detect
#   L:  - sound/synth/emux/emux_synth.c: snd_emux_release_voice
#   L:  - sound/synth/emux/soundfont.: snd_soundfont_mem_used
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - sound/i2c/cs8427.c: snd_cs8427_detect
#   L:  - sound/i2c/cs8427.c: snd_cs8427_reg_read
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/drivers/vx/vx_uer.c
#   2004/12/07 08:36:07+01:00 perex@suse.cz +1 -1
#   [ALSA] misc cleanups
#   
#   D:2004/12/07 15:36:06
#   C:OPL3,Digigram VX core,I2C cs8427,SoundFont,Common EMU synth
#   F:drivers/opl3/opl3_drums.c:1.4->1.5 
#   F:drivers/opl3/opl3_lib.c:1.23->1.24 
#   F:drivers/opl3/opl3_midi.c:1.6->1.7 
#   F:drivers/opl3/opl3_seq.c:1.15->1.16 
#   F:drivers/vx/vx_cmd.c:1.1->1.2 
#   F:drivers/vx/vx_cmd.h:1.1->1.2 
#   F:drivers/vx/vx_uer.c:1.2->1.3 
#   F:i2c/cs8427.c:1.22->1.23 
#   F:include/cs8427.h:1.7->1.8 
#   F:include/soundfont.h:1.7->1.8 
#   F:include/vx_core.h:1.3->1.4 
#   F:synth/emux/emux_synth.c:1.10->1.11 
#   F:synth/emux/soundfont.c:1.13->1.14 
#   L:The patch below contains the following changes in ALSA code not touched
#   L:by my previous patches:
#   L:- make some needlessly global code static
#   L:- remove the following unused global functions:
#   L:  - sound/i2c/cs84: snd_cs8427_detect
#   L:  - sound/synth/emux/emux_synth.c: snd_emux_release_voice
#   L:  - sound/synth/emux/soundfont.: snd_soundfont_mem_used
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - sound/i2c/cs8427.c: snd_cs8427_detect
#   L:  - sound/i2c/cs8427.c: snd_cs8427_reg_read
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/drivers/vx/vx_cmd.h
#   2004/12/07 08:36:07+01:00 perex@suse.cz +0 -2
#   [ALSA] misc cleanups
#   
#   D:2004/12/07 15:36:06
#   C:OPL3,Digigram VX core,I2C cs8427,SoundFont,Common EMU synth
#   F:drivers/opl3/opl3_drums.c:1.4->1.5 
#   F:drivers/opl3/opl3_lib.c:1.23->1.24 
#   F:drivers/opl3/opl3_midi.c:1.6->1.7 
#   F:drivers/opl3/opl3_seq.c:1.15->1.16 
#   F:drivers/vx/vx_cmd.c:1.1->1.2 
#   F:drivers/vx/vx_cmd.h:1.1->1.2 
#   F:drivers/vx/vx_uer.c:1.2->1.3 
#   F:i2c/cs8427.c:1.22->1.23 
#   F:include/cs8427.h:1.7->1.8 
#   F:include/soundfont.h:1.7->1.8 
#   F:include/vx_core.h:1.3->1.4 
#   F:synth/emux/emux_synth.c:1.10->1.11 
#   F:synth/emux/soundfont.c:1.13->1.14 
#   L:The patch below contains the following changes in ALSA code not touched
#   L:by my previous patches:
#   L:- make some needlessly global code static
#   L:- remove the following unused global functions:
#   L:  - sound/i2c/cs84: snd_cs8427_detect
#   L:  - sound/synth/emux/emux_synth.c: snd_emux_release_voice
#   L:  - sound/synth/emux/soundfont.: snd_soundfont_mem_used
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - sound/i2c/cs8427.c: snd_cs8427_detect
#   L:  - sound/i2c/cs8427.c: snd_cs8427_reg_read
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/drivers/vx/vx_cmd.c
#   2004/12/07 08:36:07+01:00 perex@suse.cz +1 -1
#   [ALSA] misc cleanups
#   
#   D:2004/12/07 15:36:06
#   C:OPL3,Digigram VX core,I2C cs8427,SoundFont,Common EMU synth
#   F:drivers/opl3/opl3_drums.c:1.4->1.5 
#   F:drivers/opl3/opl3_lib.c:1.23->1.24 
#   F:drivers/opl3/opl3_midi.c:1.6->1.7 
#   F:drivers/opl3/opl3_seq.c:1.15->1.16 
#   F:drivers/vx/vx_cmd.c:1.1->1.2 
#   F:drivers/vx/vx_cmd.h:1.1->1.2 
#   F:drivers/vx/vx_uer.c:1.2->1.3 
#   F:i2c/cs8427.c:1.22->1.23 
#   F:include/cs8427.h:1.7->1.8 
#   F:include/soundfont.h:1.7->1.8 
#   F:include/vx_core.h:1.3->1.4 
#   F:synth/emux/emux_synth.c:1.10->1.11 
#   F:synth/emux/soundfont.c:1.13->1.14 
#   L:The patch below contains the following changes in ALSA code not touched
#   L:by my previous patches:
#   L:- make some needlessly global code static
#   L:- remove the following unused global functions:
#   L:  - sound/i2c/cs84: snd_cs8427_detect
#   L:  - sound/synth/emux/emux_synth.c: snd_emux_release_voice
#   L:  - sound/synth/emux/soundfont.: snd_soundfont_mem_used
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - sound/i2c/cs8427.c: snd_cs8427_detect
#   L:  - sound/i2c/cs8427.c: snd_cs8427_reg_read
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/drivers/opl3/opl3_seq.c
#   2004/12/07 08:36:07+01:00 perex@suse.cz +2 -2
#   [ALSA] misc cleanups
#   
#   D:2004/12/07 15:36:06
#   C:OPL3,Digigram VX core,I2C cs8427,SoundFont,Common EMU synth
#   F:drivers/opl3/opl3_drums.c:1.4->1.5 
#   F:drivers/opl3/opl3_lib.c:1.23->1.24 
#   F:drivers/opl3/opl3_midi.c:1.6->1.7 
#   F:drivers/opl3/opl3_seq.c:1.15->1.16 
#   F:drivers/vx/vx_cmd.c:1.1->1.2 
#   F:drivers/vx/vx_cmd.h:1.1->1.2 
#   F:drivers/vx/vx_uer.c:1.2->1.3 
#   F:i2c/cs8427.c:1.22->1.23 
#   F:include/cs8427.h:1.7->1.8 
#   F:include/soundfont.h:1.7->1.8 
#   F:include/vx_core.h:1.3->1.4 
#   F:synth/emux/emux_synth.c:1.10->1.11 
#   F:synth/emux/soundfont.c:1.13->1.14 
#   L:The patch below contains the following changes in ALSA code not touched
#   L:by my previous patches:
#   L:- make some needlessly global code static
#   L:- remove the following unused global functions:
#   L:  - sound/i2c/cs84: snd_cs8427_detect
#   L:  - sound/synth/emux/emux_synth.c: snd_emux_release_voice
#   L:  - sound/synth/emux/soundfont.: snd_soundfont_mem_used
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - sound/i2c/cs8427.c: snd_cs8427_detect
#   L:  - sound/i2c/cs8427.c: snd_cs8427_reg_read
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/drivers/opl3/opl3_midi.c
#   2004/12/07 08:36:07+01:00 perex@suse.cz +1 -1
#   [ALSA] misc cleanups
#   
#   D:2004/12/07 15:36:06
#   C:OPL3,Digigram VX core,I2C cs8427,SoundFont,Common EMU synth
#   F:drivers/opl3/opl3_drums.c:1.4->1.5 
#   F:drivers/opl3/opl3_lib.c:1.23->1.24 
#   F:drivers/opl3/opl3_midi.c:1.6->1.7 
#   F:drivers/opl3/opl3_seq.c:1.15->1.16 
#   F:drivers/vx/vx_cmd.c:1.1->1.2 
#   F:drivers/vx/vx_cmd.h:1.1->1.2 
#   F:drivers/vx/vx_uer.c:1.2->1.3 
#   F:i2c/cs8427.c:1.22->1.23 
#   F:include/cs8427.h:1.7->1.8 
#   F:include/soundfont.h:1.7->1.8 
#   F:include/vx_core.h:1.3->1.4 
#   F:synth/emux/emux_synth.c:1.10->1.11 
#   F:synth/emux/soundfont.c:1.13->1.14 
#   L:The patch below contains the following changes in ALSA code not touched
#   L:by my previous patches:
#   L:- make some needlessly global code static
#   L:- remove the following unused global functions:
#   L:  - sound/i2c/cs84: snd_cs8427_detect
#   L:  - sound/synth/emux/emux_synth.c: snd_emux_release_voice
#   L:  - sound/synth/emux/soundfont.: snd_soundfont_mem_used
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - sound/i2c/cs8427.c: snd_cs8427_detect
#   L:  - sound/i2c/cs8427.c: snd_cs8427_reg_read
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/drivers/opl3/opl3_lib.c
#   2004/12/07 08:36:07+01:00 perex@suse.cz +2 -2
#   [ALSA] misc cleanups
#   
#   D:2004/12/07 15:36:06
#   C:OPL3,Digigram VX core,I2C cs8427,SoundFont,Common EMU synth
#   F:drivers/opl3/opl3_drums.c:1.4->1.5 
#   F:drivers/opl3/opl3_lib.c:1.23->1.24 
#   F:drivers/opl3/opl3_midi.c:1.6->1.7 
#   F:drivers/opl3/opl3_seq.c:1.15->1.16 
#   F:drivers/vx/vx_cmd.c:1.1->1.2 
#   F:drivers/vx/vx_cmd.h:1.1->1.2 
#   F:drivers/vx/vx_uer.c:1.2->1.3 
#   F:i2c/cs8427.c:1.22->1.23 
#   F:include/cs8427.h:1.7->1.8 
#   F:include/soundfont.h:1.7->1.8 
#   F:include/vx_core.h:1.3->1.4 
#   F:synth/emux/emux_synth.c:1.10->1.11 
#   F:synth/emux/soundfont.c:1.13->1.14 
#   L:The patch below contains the following changes in ALSA code not touched
#   L:by my previous patches:
#   L:- make some needlessly global code static
#   L:- remove the following unused global functions:
#   L:  - sound/i2c/cs84: snd_cs8427_detect
#   L:  - sound/synth/emux/emux_synth.c: snd_emux_release_voice
#   L:  - sound/synth/emux/soundfont.: snd_soundfont_mem_used
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - sound/i2c/cs8427.c: snd_cs8427_detect
#   L:  - sound/i2c/cs8427.c: snd_cs8427_reg_read
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/drivers/opl3/opl3_drums.c
#   2004/12/07 08:36:06+01:00 perex@suse.cz +4 -4
#   [ALSA] misc cleanups
#   
#   D:2004/12/07 15:36:06
#   C:OPL3,Digigram VX core,I2C cs8427,SoundFont,Common EMU synth
#   F:drivers/opl3/opl3_drums.c:1.4->1.5 
#   F:drivers/opl3/opl3_lib.c:1.23->1.24 
#   F:drivers/opl3/opl3_midi.c:1.6->1.7 
#   F:drivers/opl3/opl3_seq.c:1.15->1.16 
#   F:drivers/vx/vx_cmd.c:1.1->1.2 
#   F:drivers/vx/vx_cmd.h:1.1->1.2 
#   F:drivers/vx/vx_uer.c:1.2->1.3 
#   F:i2c/cs8427.c:1.22->1.23 
#   F:include/cs8427.h:1.7->1.8 
#   F:include/soundfont.h:1.7->1.8 
#   F:include/vx_core.h:1.3->1.4 
#   F:synth/emux/emux_synth.c:1.10->1.11 
#   F:synth/emux/soundfont.c:1.13->1.14 
#   L:The patch below contains the following changes in ALSA code not touched
#   L:by my previous patches:
#   L:- make some needlessly global code static
#   L:- remove the following unused global functions:
#   L:  - sound/i2c/cs84: snd_cs8427_detect
#   L:  - sound/synth/emux/emux_synth.c: snd_emux_release_voice
#   L:  - sound/synth/emux/soundfont.: snd_soundfont_mem_used
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - sound/i2c/cs8427.c: snd_cs8427_detect
#   L:  - sound/i2c/cs8427.c: snd_cs8427_reg_read
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# include/sound/vx_core.h
#   2004/12/07 08:36:07+01:00 perex@suse.cz +0 -1
#   [ALSA] misc cleanups
#   
#   D:2004/12/07 15:36:06
#   C:OPL3,Digigram VX core,I2C cs8427,SoundFont,Common EMU synth
#   F:drivers/opl3/opl3_drums.c:1.4->1.5 
#   F:drivers/opl3/opl3_lib.c:1.23->1.24 
#   F:drivers/opl3/opl3_midi.c:1.6->1.7 
#   F:drivers/opl3/opl3_seq.c:1.15->1.16 
#   F:drivers/vx/vx_cmd.c:1.1->1.2 
#   F:drivers/vx/vx_cmd.h:1.1->1.2 
#   F:drivers/vx/vx_uer.c:1.2->1.3 
#   F:i2c/cs8427.c:1.22->1.23 
#   F:include/cs8427.h:1.7->1.8 
#   F:include/soundfont.h:1.7->1.8 
#   F:include/vx_core.h:1.3->1.4 
#   F:synth/emux/emux_synth.c:1.10->1.11 
#   F:synth/emux/soundfont.c:1.13->1.14 
#   L:The patch below contains the following changes in ALSA code not touched
#   L:by my previous patches:
#   L:- make some needlessly global code static
#   L:- remove the following unused global functions:
#   L:  - sound/i2c/cs84: snd_cs8427_detect
#   L:  - sound/synth/emux/emux_synth.c: snd_emux_release_voice
#   L:  - sound/synth/emux/soundfont.: snd_soundfont_mem_used
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - sound/i2c/cs8427.c: snd_cs8427_detect
#   L:  - sound/i2c/cs8427.c: snd_cs8427_reg_read
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# include/sound/soundfont.h
#   2004/12/07 08:36:07+01:00 perex@suse.cz +0 -1
#   [ALSA] misc cleanups
#   
#   D:2004/12/07 15:36:06
#   C:OPL3,Digigram VX core,I2C cs8427,SoundFont,Common EMU synth
#   F:drivers/opl3/opl3_drums.c:1.4->1.5 
#   F:drivers/opl3/opl3_lib.c:1.23->1.24 
#   F:drivers/opl3/opl3_midi.c:1.6->1.7 
#   F:drivers/opl3/opl3_seq.c:1.15->1.16 
#   F:drivers/vx/vx_cmd.c:1.1->1.2 
#   F:drivers/vx/vx_cmd.h:1.1->1.2 
#   F:drivers/vx/vx_uer.c:1.2->1.3 
#   F:i2c/cs8427.c:1.22->1.23 
#   F:include/cs8427.h:1.7->1.8 
#   F:include/soundfont.h:1.7->1.8 
#   F:include/vx_core.h:1.3->1.4 
#   F:synth/emux/emux_synth.c:1.10->1.11 
#   F:synth/emux/soundfont.c:1.13->1.14 
#   L:The patch below contains the following changes in ALSA code not touched
#   L:by my previous patches:
#   L:- make some needlessly global code static
#   L:- remove the following unused global functions:
#   L:  - sound/i2c/cs84: snd_cs8427_detect
#   L:  - sound/synth/emux/emux_synth.c: snd_emux_release_voice
#   L:  - sound/synth/emux/soundfont.: snd_soundfont_mem_used
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - sound/i2c/cs8427.c: snd_cs8427_detect
#   L:  - sound/i2c/cs8427.c: snd_cs8427_reg_read
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# include/sound/cs8427.h
#   2004/12/07 08:36:07+01:00 perex@suse.cz +0 -3
#   [ALSA] misc cleanups
#   
#   D:2004/12/07 15:36:06
#   C:OPL3,Digigram VX core,I2C cs8427,SoundFont,Common EMU synth
#   F:drivers/opl3/opl3_drums.c:1.4->1.5 
#   F:drivers/opl3/opl3_lib.c:1.23->1.24 
#   F:drivers/opl3/opl3_midi.c:1.6->1.7 
#   F:drivers/opl3/opl3_seq.c:1.15->1.16 
#   F:drivers/vx/vx_cmd.c:1.1->1.2 
#   F:drivers/vx/vx_cmd.h:1.1->1.2 
#   F:drivers/vx/vx_uer.c:1.2->1.3 
#   F:i2c/cs8427.c:1.22->1.23 
#   F:include/cs8427.h:1.7->1.8 
#   F:include/soundfont.h:1.7->1.8 
#   F:include/vx_core.h:1.3->1.4 
#   F:synth/emux/emux_synth.c:1.10->1.11 
#   F:synth/emux/soundfont.c:1.13->1.14 
#   L:The patch below contains the following changes in ALSA code not touched
#   L:by my previous patches:
#   L:- make some needlessly global code static
#   L:- remove the following unused global functions:
#   L:  - sound/i2c/cs84: snd_cs8427_detect
#   L:  - sound/synth/emux/emux_synth.c: snd_emux_release_voice
#   L:  - sound/synth/emux/soundfont.: snd_soundfont_mem_used
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - sound/i2c/cs8427.c: snd_cs8427_detect
#   L:  - sound/i2c/cs8427.c: snd_cs8427_reg_read
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 11:02:01+01:00 perex@suse.cz 
#   [ALSA] Add 'Duplicate Front' control
#   
#   CS46xx driver
#   A new mixer control 'Duplicate Front' is added for the board with
#   a single codec.  This toggles the duplication of front signal to
#   the rear speakers.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/cs46xx/cs46xx_lib.c
#   2004/12/06 12:47:42+01:00 perex@suse.cz +35 -4
#   [ALSA] Add 'Duplicate Front' control
#   
#   D:2004/12/06 19:47:42
#   C:CS46xx driver
#   F:pci/cs46xx/cs46xx_lib.c:1.89->1.90 
#   L:A new mixer control 'Duplicate Front' is added for the board with
#   L:a single codec.  This toggles the duplication of front signal to
#   L:the rear speakers.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 11:00:47+01:00 perex@suse.cz 
#   [ALSA] opl4 depends on opl3
#   
#   OPL3
#   Compiling OPL4 doesn't include the snd-opl3-lib. This change in the
#   Makefile enables now the compiling of snd-opl3-lib.o for OPL4 soundcards.
#   
#   Signed-off-by: Martin Langer <martin-langer@gmx.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/drivers/opl3/Makefile
#   2004/12/06 12:46:27+01:00 perex@suse.cz +1 -0
#   [ALSA] opl4 depends on opl3
#   
#   D:2004/12/06 19:46:27
#   C:OPL3
#   F:drivers/opl3/Makefile:1.22->1.23 
#   L:Compiling OPL4 doesn't include the snd-opl3-lib. This change in the
#   L:Makefile enables now the compiling of snd-opl3-lib.o for OPL4 soundcards.
#   Signed-off-by: Martin Langer <martin-langer@gmx.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 10:59:39+01:00 perex@suse.cz 
#   [ALSA] Update user-space access from sscape driver
#   
#   Sound Scape driver
#   I see that the copy_to/from_user() functions have been updated across
#   Linux 2.4 and 2.6, and that verify_read/write() has been replaced by
#    access_ok(). I have patched the SoundScape driver accordingly.
#   
#   Signed-off-by: Chris Rankin <rankincj@yahoo.com>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/isa/sscape.c
#   2004/12/06 08:32:12+01:00 perex@suse.cz +13 -14
#   [ALSA] Update user-space access from sscape driver
#   
#   D:2004/12/06 15:32:12
#   C:Sound Scape driver
#   F:isa/sscape.c:1.18->1.19 
#   L:I see that the copy_to/from_user() functions have been updated across
#   L:Linux 2.4 and 2.6, and that verify_read/write() has been replaced by
#   L: access_ok(). I have patched the SoundScape driver accordingly.
#   Signed-off-by: Chris Rankin <rankincj@yahoo.com>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 09:19:11+01:00 perex@suse.cz 
#   [ALSA] disable legacy IRQs before request_irq() to avoid unhandled interrupts
#   
#   VIA82xx driver
#   
#   
#   Signed-off-by: Christian Koerner <ckoerner@sysgo.com>
#   Signed-off-by: Jaroslav Kysela <perex@suse.cz>
# 
# sound/pci/via82xx.c
#   2004/12/03 08:12:56+01:00 perex@suse.cz +2 -3
#   [ALSA] disable legacy IRQs before request_irq() to avoid unhandled interrupts
#   
#   D:2004/12/03 15:12:56
#   C:VIA82xx driver
#   F:pci/via82xx.c:1.130->1.131 
#   L:
#   Signed-off-by: Christian Koerner <ckoerner@sysgo.com>
#   Signed-off-by: Jaroslav Kysela <perex@suse.cz>
# 
# ChangeSet
#   2005/01/03 09:18:06+01:00 perex@suse.cz 
#   [ALSA] IEC958 Capture mixer controls and Universe support
#   
#   ICE1712 driver,ICE1724 driver
#    * Added SPI read routine
#    * Added IEC958 Capture mixer controls
#    * Improved Universe support
#    * Headphone Amp renamed to External Amplifier
#    * Fixed GPIO bug in Prodigy code (There is no GPIO23 on ICE1724)
#   
#   Signed-off-by: Peter Christensen <peter@developers.dk>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ice1712/ice1724.c
#   2004/12/03 06:17:13+01:00 perex@suse.cz +1 -1
#   [ALSA] IEC958 Capture mixer controls and Universe support
#   
#   D:2004/12/03 13:17:13
#   C:ICE1712 driver,ICE1724 driver
#   F:pci/ice1712/aureon.c:1.23->1.24 
#   F:pci/ice1712/aureon.h:1.5->1.6 
#   F:pci/ice1712/ice1712.h:1.26->1.27 
#   F:pci/ice1712/ice1724.c:1.48->1.49 
#   L: * Added SPI read routine
#   L: * Added IEC958 Capture mixer controls
#   L: * Improved Universe support
#   L: * Headphone Amp renamed to External Amplifier
#   L: * Fixed GPIO bug in Prodigy code (There is no GPIO23 on ICE1724)
#   Signed-off-by: Peter Christensen <peter@developers.dk>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ice1712/ice1712.h
#   2004/12/03 06:17:13+01:00 perex@suse.cz +1 -0
#   [ALSA] IEC958 Capture mixer controls and Universe support
#   
#   D:2004/12/03 13:17:13
#   C:ICE1712 driver,ICE1724 driver
#   F:pci/ice1712/aureon.c:1.23->1.24 
#   F:pci/ice1712/aureon.h:1.5->1.6 
#   F:pci/ice1712/ice1712.h:1.26->1.27 
#   F:pci/ice1712/ice1724.c:1.48->1.49 
#   L: * Added SPI read routine
#   L: * Added IEC958 Capture mixer controls
#   L: * Improved Universe support
#   L: * Headphone Amp renamed to External Amplifier
#   L: * Fixed GPIO bug in Prodigy code (There is no GPIO23 on ICE1724)
#   Signed-off-by: Peter Christensen <peter@developers.dk>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ice1712/aureon.h
#   2004/12/03 06:17:13+01:00 perex@suse.cz +3 -7
#   [ALSA] IEC958 Capture mixer controls and Universe support
#   
#   D:2004/12/03 13:17:13
#   C:ICE1712 driver,ICE1724 driver
#   F:pci/ice1712/aureon.c:1.23->1.24 
#   F:pci/ice1712/aureon.h:1.5->1.6 
#   F:pci/ice1712/ice1712.h:1.26->1.27 
#   F:pci/ice1712/ice1724.c:1.48->1.49 
#   L: * Added SPI read routine
#   L: * Added IEC958 Capture mixer controls
#   L: * Improved Universe support
#   L: * Headphone Amp renamed to External Amplifier
#   L: * Fixed GPIO bug in Prodigy code (There is no GPIO23 on ICE1724)
#   Signed-off-by: Peter Christensen <peter@developers.dk>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ice1712/aureon.c
#   2004/12/03 06:17:13+01:00 perex@suse.cz +453 -51
#   [ALSA] IEC958 Capture mixer controls and Universe support
#   
#   D:2004/12/03 13:17:13
#   C:ICE1712 driver,ICE1724 driver
#   F:pci/ice1712/aureon.c:1.23->1.24 
#   F:pci/ice1712/aureon.h:1.5->1.6 
#   F:pci/ice1712/ice1712.h:1.26->1.27 
#   F:pci/ice1712/ice1724.c:1.48->1.49 
#   L: * Added SPI read routine
#   L: * Added IEC958 Capture mixer controls
#   L: * Improved Universe support
#   L: * Headphone Amp renamed to External Amplifier
#   L: * Fixed GPIO bug in Prodigy code (There is no GPIO23 on ICE1724)
#   Signed-off-by: Peter Christensen <peter@developers.dk>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 09:17:03+01:00 perex@suse.cz 
#   [ALSA] Fix sleep in h/w volume control
#   
#   ES1968 driver
#   Fixed sleeps in h/w volume control tasklet.
#   Also, msleep()s in ac97 accessor callbacks are removed since the chip
#   works without such delays.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/es1968.c
#   2004/12/03 06:15:42+01:00 perex@suse.cz +23 -14
#   [ALSA] Fix sleep in h/w volume control
#   
#   D:2004/12/03 13:15:42
#   C:ES1968 driver
#   F:pci/es1968.c:1.79->1.80 
#   L:Fixed sleeps in h/w volume control tasklet.
#   L:Also, msleep()s in ac97 accessor callbacks are removed since the chip
#   L:works without such delays.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 09:15:56+01:00 perex@suse.cz 
#   [ALSA] Use macro usb_maxpacket() for portability
#   
#   USB USX2Y
#   In future kernels struct usb_device won't have the epmaxpacketin/out members.
#   Use macro usb_maxpacket() instead of directly accessing those members.
#   
#   Signed-off-by: Karsten Wiese <annabellesgarden@yahoo.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/usb/usx2y/usbusx2yaudio.c
#   2004/12/02 07:41:21+01:00 perex@suse.cz +12 -14
#   [ALSA] Use macro usb_maxpacket() for portability
#   
#   D:2004/12/02 14:41:21
#   C:USB USX2Y
#   F:usb/usx2y/usbusx2y.c:1.6->1.7 
#   F:usb/usx2y/usbusx2yaudio.c:1.6->1.7 
#   L:In future kernels struct usb_device won't have the epmaxpacketin/out members.
#   L:Use macro usb_maxpacket() instead of directly accessing those members.
#   Signed-off-by: Karsten Wiese <annabellesgarden@yahoo.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/usb/usx2y/usbusx2y.c
#   2004/12/02 07:41:21+01:00 perex@suse.cz +5 -1
#   [ALSA] Use macro usb_maxpacket() for portability
#   
#   D:2004/12/02 14:41:21
#   C:USB USX2Y
#   F:usb/usx2y/usbusx2y.c:1.6->1.7 
#   F:usb/usx2y/usbusx2yaudio.c:1.6->1.7 
#   L:In future kernels struct usb_device won't have the epmaxpacketin/out members.
#   L:Use macro usb_maxpacket() instead of directly accessing those members.
#   Signed-off-by: Karsten Wiese <annabellesgarden@yahoo.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 09:14:44+01:00 perex@suse.cz 
#   [ALSA] Remove the NULL pointer check in kfree/vfree wrappers
#   
#   ALSA Core
#   The check of NULL pointer in kfree/vfree wrappers is removed.
#   kfree() and vfree() accept NULL pointer.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/memory.c
#   2004/12/02 07:40:33+01:00 perex@suse.cz +2 -6
#   [ALSA] Remove the NULL pointer check in kfree/vfree wrappers
#   
#   D:2004/12/02 14:40:33
#   C:ALSA Core
#   F:core/memory.c:1.34->1.35 
#   L:The check of NULL pointer in kfree/vfree wrappers is removed.
#   L:kfree() and vfree() accept NULL pointer.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 09:13:42+01:00 perex@suse.cz 
#   [ALSA] Added VIA82xx-modem driver
#   
#   Documentation,PCI drivers,VIA82xx-modem driver
#   Added the VIA82xx AC97 modem driver by Sasha Khapyorsky <sashak@smlink.com>.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/Makefile
#   2004/12/01 07:05:07+01:00 perex@suse.cz +2 -0
#   [ALSA] Added VIA82xx-modem driver
#   
#   D:2004/12/01 14:05:07
#   C:Documentation,PCI drivers,VIA82xx-modem driver
#   F:Documentation/ALSA-Configuration.txt:1.54->1.55 
#   F:pci/Kconfig:1.36->1.37 
#   F:pci/Makefile:1.17->1.18 
#   F:pci/via82xx_modem.c:INITIAL->1.1 
#   L:Added the VIA82xx AC97 modem driver by Sasha Khapyorsky <sashak@smlink.com>.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/Kconfig
#   2004/12/01 07:05:07+01:00 perex@suse.cz +11 -0
#   [ALSA] Added VIA82xx-modem driver
#   
#   D:2004/12/01 14:05:07
#   C:Documentation,PCI drivers,VIA82xx-modem driver
#   F:Documentation/ALSA-Configuration.txt:1.54->1.55 
#   F:pci/Kconfig:1.36->1.37 
#   F:pci/Makefile:1.17->1.18 
#   F:pci/via82xx_modem.c:INITIAL->1.1 
#   L:Added the VIA82xx AC97 modem driver by Sasha Khapyorsky <sashak@smlink.com>.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# Documentation/sound/alsa/ALSA-Configuration.txt
#   2004/12/01 07:05:07+01:00 perex@suse.cz +9 -0
#   [ALSA] Added VIA82xx-modem driver
#   
#   D:2004/12/01 14:05:07
#   C:Documentation,PCI drivers,VIA82xx-modem driver
#   F:Documentation/ALSA-Configuration.txt:1.54->1.55 
#   F:pci/Kconfig:1.36->1.37 
#   F:pci/Makefile:1.17->1.18 
#   F:pci/via82xx_modem.c:INITIAL->1.1 
#   L:Added the VIA82xx AC97 modem driver by Sasha Khapyorsky <sashak@smlink.com>.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/via82xx_modem.c
#   2004/12/06 15:25:10+01:00 perex@suse.cz +1265 -0
#   [ALSA] Added VIA82xx-modem driver
#   
#   D:2004/12/01 14:05:07
#   C:Documentation,PCI drivers,VIA82xx-modem driver
#   F:Documentation/ALSA-Configuration.txt:1.54->1.55 
#   F:pci/Kconfig:1.36->1.37 
#   F:pci/Makefile:1.17->1.18 
#   F:pci/via82xx_modem.c:INITIAL->1.1 
#   L:Added the VIA82xx AC97 modem driver by Sasha Khapyorsky <sashak@smlink.com>.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/via82xx_modem.c
#   2004/12/06 15:25:10+01:00 perex@suse.cz +0 -0
#   BitKeeper file /home/perex/bk/linux-sound/work/sound/pci/via82xx_modem.c
# 
# ChangeSet
#   2005/01/03 09:12:28+01:00 perex@suse.cz 
#   [ALSA] ALSA core: misc cleanups
#   
#   HWDEP Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel
#   ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer
#   The patch below does the following cleanups under sound/core/ :
#   - make needlessly global code static
#   - remove the following stale prototypes from pcm.h
#     (the functions are not or no longer present):
#     - snd_pcm_capture_ready_jiffies
#     - snd_pcm_playback_ready_jiffies
#   - remove the following unused global functions:
#     - oss/pcm_plugin.c: snd_pcm_plug_capture_channels_mask
#     - seq/seq_instr.c: snd_seq_cluster_new
#     - seq/seq_instr.c: snd_seq_cluster_free
#   - move global to static inline functions
#     - pcm_lib.c: snd_pcm_playback_ready
#     - pcm_lib.c: snd_pcm_capture_ready
#     - pcm_lib.c: snd_pcm_playback_empty
#     - pcm_lib.c: snd_pcm_capture_empty
#     - pcm_lib.c: snd_pcm_playback_data
#   - remove the following unused EXPORT_SYMBOL's:
#     - snd_create_proc_entry
#     - snd_interval_ratden
#     - snd_midi_channel_init
#     - snd_midi_channel_init_set
#     - snd_pcm_playback_empty
#     - snd_pcm_capture_empty
#     - snd_pcm_playback_data
#     - snd_pcm_capture_poll
#     - snd_pcm_playback_ready
#     - snd_pcm_capture_ready
#     - snd_pcm_format_size
#     - snd_pcm_open
#     - snd_pcm_playback_poll
#     - snd_pcm_playback_ready
#     - snd_pcm_release
#     - snd_pcm_subformat_name
#     - snd_remove_proc_entry
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/sound.c
#   2004/11/30 13:03:16+01:00 perex@suse.cz +1 -3
#   [ALSA] ALSA core: misc cleanups
#   
#   D:2004/11/30 20:03:13
#   C:HWDEP Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer
#   F:core/hwdep.c:1.27->1.28 
#   F:core/info.c:1.50->1.51 
#   F:core/memory.c:1.33->1.34 
#   F:core/pcm.c:1.48->1.49 
#   F:core/pcm_lib.c:1.59->1.60 
#   F:core/pcm_native.c:1.110->1.111 
#   F:core/rawmidi.c:1.49->1.50 
#   F:core/sound.c:1.68->1.69 
#   F:core/oss/mixer_oss.c:1.36->1.37 
#   F:core/oss/pcm_oss.c:1.82->1.83 
#   F:core/oss/pcm_plugin.c:1.23->1.24 
#   F:core/oss/route.c:1.10->1.11 
#   F:core/seq/seq_clientmgr.c:1.39->1.40 
#   F:core/seq/seq_clientmgr.h:1.7->1.8 
#   F:core/seq/seq_instr.c:1.11->1.12 
#   F:core/seq/seq_memory.c:1.18->1.19 
#   F:core/seq/seq_memory.h:1.4->1.5 
#   F:core/seq/seq_midi.c:1.24->1.25 
#   F:core/seq/seq_midi_emul.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_device.h:1.5->1.6 
#   F:core/seq/oss/seq_oss_init.c:1.14->1.15 
#   F:include/info.h:1.18->1.19 
#   F:include/pcm.h:1.51->1.52 
#   F:include/rawmidi.h:1.11->1.12 
#   F:include/seq_midi_emul.h:1.3->1.4 
#   L:The patch below does the following cleanups under sound/core/ :
#   L:- make needlessly global code static
#   L:- remove the following stale prototypes from pcm.h
#   L:  (the functions are not or no longer present):
#   L:  - snd_pcm_capture_ready_jiffies
#   L:  - snd_pcm_playback_ready_jiffies
#   L:- remove the following unused global functions:
#   L:  - oss/pcm_plugin.c: snd_pcm_plug_capture_channels_mask
#   L:  - seq/seq_instr.c: snd_seq_cluster_new
#   L:  - seq/seq_instr.c: snd_seq_cluster_free
#   L:- move global to static inline functions
#   L:  - pcm_lib.c: snd_pcm_playback_ready
#   L:  - pcm_lib.c: snd_pcm_capture_ready
#   L:  - pcm_lib.c: snd_pcm_playback_empty
#   L:  - pcm_lib.c: snd_pcm_capture_empty
#   L:  - pcm_lib.c: snd_pcm_playback_data
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - snd_create_proc_entry
#   L:  - snd_interval_ratden
#   L:  - snd_midi_channel_init
#   L:  - snd_midi_channel_init_set
#   L:  - snd_pcm_playback_empty
#   L:  - snd_pcm_capture_empty
#   L:  - snd_pcm_playback_data
#   L:  - snd_pcm_capture_poll
#   L:  - snd_pcm_playback_ready
#   L:  - snd_pcm_capture_ready
#   L:  - snd_pcm_format_size
#   L:  - snd_pcm_open
#   L:  - snd_pcm_playback_poll
#   L:  - snd_pcm_playback_ready
#   L:  - snd_pcm_release
#   L:  - snd_pcm_subformat_name
#   L:  - snd_remove_proc_entry
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/seq/seq_midi_emul.c
#   2004/11/30 13:03:17+01:00 perex@suse.cz +4 -6
#   [ALSA] ALSA core: misc cleanups
#   
#   D:2004/11/30 20:03:13
#   C:HWDEP Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer
#   F:core/hwdep.c:1.27->1.28 
#   F:core/info.c:1.50->1.51 
#   F:core/memory.c:1.33->1.34 
#   F:core/pcm.c:1.48->1.49 
#   F:core/pcm_lib.c:1.59->1.60 
#   F:core/pcm_native.c:1.110->1.111 
#   F:core/rawmidi.c:1.49->1.50 
#   F:core/sound.c:1.68->1.69 
#   F:core/oss/mixer_oss.c:1.36->1.37 
#   F:core/oss/pcm_oss.c:1.82->1.83 
#   F:core/oss/pcm_plugin.c:1.23->1.24 
#   F:core/oss/route.c:1.10->1.11 
#   F:core/seq/seq_clientmgr.c:1.39->1.40 
#   F:core/seq/seq_clientmgr.h:1.7->1.8 
#   F:core/seq/seq_instr.c:1.11->1.12 
#   F:core/seq/seq_memory.c:1.18->1.19 
#   F:core/seq/seq_memory.h:1.4->1.5 
#   F:core/seq/seq_midi.c:1.24->1.25 
#   F:core/seq/seq_midi_emul.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_device.h:1.5->1.6 
#   F:core/seq/oss/seq_oss_init.c:1.14->1.15 
#   F:include/info.h:1.18->1.19 
#   F:include/pcm.h:1.51->1.52 
#   F:include/rawmidi.h:1.11->1.12 
#   F:include/seq_midi_emul.h:1.3->1.4 
#   L:The patch below does the following cleanups under sound/core/ :
#   L:- make needlessly global code static
#   L:- remove the following stale prototypes from pcm.h
#   L:  (the functions are not or no longer present):
#   L:  - snd_pcm_capture_ready_jiffies
#   L:  - snd_pcm_playback_ready_jiffies
#   L:- remove the following unused global functions:
#   L:  - oss/pcm_plugin.c: snd_pcm_plug_capture_channels_mask
#   L:  - seq/seq_instr.c: snd_seq_cluster_new
#   L:  - seq/seq_instr.c: snd_seq_cluster_free
#   L:- move global to static inline functions
#   L:  - pcm_lib.c: snd_pcm_playback_ready
#   L:  - pcm_lib.c: snd_pcm_capture_ready
#   L:  - pcm_lib.c: snd_pcm_playback_empty
#   L:  - pcm_lib.c: snd_pcm_capture_empty
#   L:  - pcm_lib.c: snd_pcm_playback_data
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - snd_create_proc_entry
#   L:  - snd_interval_ratden
#   L:  - snd_midi_channel_init
#   L:  - snd_midi_channel_init_set
#   L:  - snd_pcm_playback_empty
#   L:  - snd_pcm_capture_empty
#   L:  - snd_pcm_playback_data
#   L:  - snd_pcm_capture_poll
#   L:  - snd_pcm_playback_ready
#   L:  - snd_pcm_capture_ready
#   L:  - snd_pcm_format_size
#   L:  - snd_pcm_open
#   L:  - snd_pcm_playback_poll
#   L:  - snd_pcm_playback_ready
#   L:  - snd_pcm_release
#   L:  - snd_pcm_subformat_name
#   L:  - snd_remove_proc_entry
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/seq/seq_midi.c
#   2004/11/30 13:03:17+01:00 perex@suse.cz +4 -4
#   [ALSA] ALSA core: misc cleanups
#   
#   D:2004/11/30 20:03:13
#   C:HWDEP Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer
#   F:core/hwdep.c:1.27->1.28 
#   F:core/info.c:1.50->1.51 
#   F:core/memory.c:1.33->1.34 
#   F:core/pcm.c:1.48->1.49 
#   F:core/pcm_lib.c:1.59->1.60 
#   F:core/pcm_native.c:1.110->1.111 
#   F:core/rawmidi.c:1.49->1.50 
#   F:core/sound.c:1.68->1.69 
#   F:core/oss/mixer_oss.c:1.36->1.37 
#   F:core/oss/pcm_oss.c:1.82->1.83 
#   F:core/oss/pcm_plugin.c:1.23->1.24 
#   F:core/oss/route.c:1.10->1.11 
#   F:core/seq/seq_clientmgr.c:1.39->1.40 
#   F:core/seq/seq_clientmgr.h:1.7->1.8 
#   F:core/seq/seq_instr.c:1.11->1.12 
#   F:core/seq/seq_memory.c:1.18->1.19 
#   F:core/seq/seq_memory.h:1.4->1.5 
#   F:core/seq/seq_midi.c:1.24->1.25 
#   F:core/seq/seq_midi_emul.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_device.h:1.5->1.6 
#   F:core/seq/oss/seq_oss_init.c:1.14->1.15 
#   F:include/info.h:1.18->1.19 
#   F:include/pcm.h:1.51->1.52 
#   F:include/rawmidi.h:1.11->1.12 
#   F:include/seq_midi_emul.h:1.3->1.4 
#   L:The patch below does the following cleanups under sound/core/ :
#   L:- make needlessly global code static
#   L:- remove the following stale prototypes from pcm.h
#   L:  (the functions are not or no longer present):
#   L:  - snd_pcm_capture_ready_jiffies
#   L:  - snd_pcm_playback_ready_jiffies
#   L:- remove the following unused global functions:
#   L:  - oss/pcm_plugin.c: snd_pcm_plug_capture_channels_mask
#   L:  - seq/seq_instr.c: snd_seq_cluster_new
#   L:  - seq/seq_instr.c: snd_seq_cluster_free
#   L:- move global to static inline functions
#   L:  - pcm_lib.c: snd_pcm_playback_ready
#   L:  - pcm_lib.c: snd_pcm_capture_ready
#   L:  - pcm_lib.c: snd_pcm_playback_empty
#   L:  - pcm_lib.c: snd_pcm_capture_empty
#   L:  - pcm_lib.c: snd_pcm_playback_data
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - snd_create_proc_entry
#   L:  - snd_interval_ratden
#   L:  - snd_midi_channel_init
#   L:  - snd_midi_channel_init_set
#   L:  - snd_pcm_playback_empty
#   L:  - snd_pcm_capture_empty
#   L:  - snd_pcm_playback_data
#   L:  - snd_pcm_capture_poll
#   L:  - snd_pcm_playback_ready
#   L:  - snd_pcm_capture_ready
#   L:  - snd_pcm_format_size
#   L:  - snd_pcm_open
#   L:  - snd_pcm_playback_poll
#   L:  - snd_pcm_playback_ready
#   L:  - snd_pcm_release
#   L:  - snd_pcm_subformat_name
#   L:  - snd_remove_proc_entry
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/seq/seq_memory.h
#   2004/11/30 13:03:17+01:00 perex@suse.cz +0 -1
#   [ALSA] ALSA core: misc cleanups
#   
#   D:2004/11/30 20:03:13
#   C:HWDEP Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer
#   F:core/hwdep.c:1.27->1.28 
#   F:core/info.c:1.50->1.51 
#   F:core/memory.c:1.33->1.34 
#   F:core/pcm.c:1.48->1.49 
#   F:core/pcm_lib.c:1.59->1.60 
#   F:core/pcm_native.c:1.110->1.111 
#   F:core/rawmidi.c:1.49->1.50 
#   F:core/sound.c:1.68->1.69 
#   F:core/oss/mixer_oss.c:1.36->1.37 
#   F:core/oss/pcm_oss.c:1.82->1.83 
#   F:core/oss/pcm_plugin.c:1.23->1.24 
#   F:core/oss/route.c:1.10->1.11 
#   F:core/seq/seq_clientmgr.c:1.39->1.40 
#   F:core/seq/seq_clientmgr.h:1.7->1.8 
#   F:core/seq/seq_instr.c:1.11->1.12 
#   F:core/seq/seq_memory.c:1.18->1.19 
#   F:core/seq/seq_memory.h:1.4->1.5 
#   F:core/seq/seq_midi.c:1.24->1.25 
#   F:core/seq/seq_midi_emul.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_device.h:1.5->1.6 
#   F:core/seq/oss/seq_oss_init.c:1.14->1.15 
#   F:include/info.h:1.18->1.19 
#   F:include/pcm.h:1.51->1.52 
#   F:include/rawmidi.h:1.11->1.12 
#   F:include/seq_midi_emul.h:1.3->1.4 
#   L:The patch below does the following cleanups under sound/core/ :
#   L:- make needlessly global code static
#   L:- remove the following stale prototypes from pcm.h
#   L:  (the functions are not or no longer present):
#   L:  - snd_pcm_capture_ready_jiffies
#   L:  - snd_pcm_playback_ready_jiffies
#   L:- remove the following unused global functions:
#   L:  - oss/pcm_plugin.c: snd_pcm_plug_capture_channels_mask
#   L:  - seq/seq_instr.c: snd_seq_cluster_new
#   L:  - seq/seq_instr.c: snd_seq_cluster_free
#   L:- move global to static inline functions
#   L:  - pcm_lib.c: snd_pcm_playback_ready
#   L:  - pcm_lib.c: snd_pcm_capture_ready
#   L:  - pcm_lib.c: snd_pcm_playback_empty
#   L:  - pcm_lib.c: snd_pcm_capture_empty
#   L:  - pcm_lib.c: snd_pcm_playback_data
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - snd_create_proc_entry
#   L:  - snd_interval_ratden
#   L:  - snd_midi_channel_init
#   L:  - snd_midi_channel_init_set
#   L:  - snd_pcm_playback_empty
#   L:  - snd_pcm_capture_empty
#   L:  - snd_pcm_playback_data
#   L:  - snd_pcm_capture_poll
#   L:  - snd_pcm_playback_ready
#   L:  - snd_pcm_capture_ready
#   L:  - snd_pcm_format_size
#   L:  - snd_pcm_open
#   L:  - snd_pcm_playback_poll
#   L:  - snd_pcm_playback_ready
#   L:  - snd_pcm_release
#   L:  - snd_pcm_subformat_name
#   L:  - snd_remove_proc_entry
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/seq/seq_memory.c
#   2004/11/30 13:03:17+01:00 perex@suse.cz +1 -1
#   [ALSA] ALSA core: misc cleanups
#   
#   D:2004/11/30 20:03:13
#   C:HWDEP Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer
#   F:core/hwdep.c:1.27->1.28 
#   F:core/info.c:1.50->1.51 
#   F:core/memory.c:1.33->1.34 
#   F:core/pcm.c:1.48->1.49 
#   F:core/pcm_lib.c:1.59->1.60 
#   F:core/pcm_native.c:1.110->1.111 
#   F:core/rawmidi.c:1.49->1.50 
#   F:core/sound.c:1.68->1.69 
#   F:core/oss/mixer_oss.c:1.36->1.37 
#   F:core/oss/pcm_oss.c:1.82->1.83 
#   F:core/oss/pcm_plugin.c:1.23->1.24 
#   F:core/oss/route.c:1.10->1.11 
#   F:core/seq/seq_clientmgr.c:1.39->1.40 
#   F:core/seq/seq_clientmgr.h:1.7->1.8 
#   F:core/seq/seq_instr.c:1.11->1.12 
#   F:core/seq/seq_memory.c:1.18->1.19 
#   F:core/seq/seq_memory.h:1.4->1.5 
#   F:core/seq/seq_midi.c:1.24->1.25 
#   F:core/seq/seq_midi_emul.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_device.h:1.5->1.6 
#   F:core/seq/oss/seq_oss_init.c:1.14->1.15 
#   F:include/info.h:1.18->1.19 
#   F:include/pcm.h:1.51->1.52 
#   F:include/rawmidi.h:1.11->1.12 
#   F:include/seq_midi_emul.h:1.3->1.4 
#   L:The patch below does the following cleanups under sound/core/ :
#   L:- make needlessly global code static
#   L:- remove the following stale prototypes from pcm.h
#   L:  (the functions are not or no longer present):
#   L:  - snd_pcm_capture_ready_jiffies
#   L:  - snd_pcm_playback_ready_jiffies
#   L:- remove the following unused global functions:
#   L:  - oss/pcm_plugin.c: snd_pcm_plug_capture_channels_mask
#   L:  - seq/seq_instr.c: snd_seq_cluster_new
#   L:  - seq/seq_instr.c: snd_seq_cluster_free
#   L:- move global to static inline functions
#   L:  - pcm_lib.c: snd_pcm_playback_ready
#   L:  - pcm_lib.c: snd_pcm_capture_ready
#   L:  - pcm_lib.c: snd_pcm_playback_empty
#   L:  - pcm_lib.c: snd_pcm_capture_empty
#   L:  - pcm_lib.c: snd_pcm_playback_data
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - snd_create_proc_entry
#   L:  - snd_interval_ratden
#   L:  - snd_midi_channel_init
#   L:  - snd_midi_channel_init_set
#   L:  - snd_pcm_playback_empty
#   L:  - snd_pcm_capture_empty
#   L:  - snd_pcm_playback_data
#   L:  - snd_pcm_capture_poll
#   L:  - snd_pcm_playback_ready
#   L:  - snd_pcm_capture_ready
#   L:  - snd_pcm_format_size
#   L:  - snd_pcm_open
#   L:  - snd_pcm_playback_poll
#   L:  - snd_pcm_playback_ready
#   L:  - snd_pcm_release
#   L:  - snd_pcm_subformat_name
#   L:  - snd_remove_proc_entry
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/seq/seq_instr.c
#   2004/11/30 13:03:17+01:00 perex@suse.cz +3 -13
#   [ALSA] ALSA core: misc cleanups
#   
#   D:2004/11/30 20:03:13
#   C:HWDEP Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer
#   F:core/hwdep.c:1.27->1.28 
#   F:core/info.c:1.50->1.51 
#   F:core/memory.c:1.33->1.34 
#   F:core/pcm.c:1.48->1.49 
#   F:core/pcm_lib.c:1.59->1.60 
#   F:core/pcm_native.c:1.110->1.111 
#   F:core/rawmidi.c:1.49->1.50 
#   F:core/sound.c:1.68->1.69 
#   F:core/oss/mixer_oss.c:1.36->1.37 
#   F:core/oss/pcm_oss.c:1.82->1.83 
#   F:core/oss/pcm_plugin.c:1.23->1.24 
#   F:core/oss/route.c:1.10->1.11 
#   F:core/seq/seq_clientmgr.c:1.39->1.40 
#   F:core/seq/seq_clientmgr.h:1.7->1.8 
#   F:core/seq/seq_instr.c:1.11->1.12 
#   F:core/seq/seq_memory.c:1.18->1.19 
#   F:core/seq/seq_memory.h:1.4->1.5 
#   F:core/seq/seq_midi.c:1.24->1.25 
#   F:core/seq/seq_midi_emul.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_device.h:1.5->1.6 
#   F:core/seq/oss/seq_oss_init.c:1.14->1.15 
#   F:include/info.h:1.18->1.19 
#   F:include/pcm.h:1.51->1.52 
#   F:include/rawmidi.h:1.11->1.12 
#   F:include/seq_midi_emul.h:1.3->1.4 
#   L:The patch below does the following cleanups under sound/core/ :
#   L:- make needlessly global code static
#   L:- remove the following stale prototypes from pcm.h
#   L:  (the functions are not or no longer present):
#   L:  - snd_pcm_capture_ready_jiffies
#   L:  - snd_pcm_playback_ready_jiffies
#   L:- remove the following unused global functions:
#   L:  - oss/pcm_plugin.c: snd_pcm_plug_capture_channels_mask
#   L:  - seq/seq_instr.c: snd_seq_cluster_new
#   L:  - seq/seq_instr.c: snd_seq_cluster_free
#   L:- move global to static inline functions
#   L:  - pcm_lib.c: snd_pcm_playback_ready
#   L:  - pcm_lib.c: snd_pcm_capture_ready
#   L:  - pcm_lib.c: snd_pcm_playback_empty
#   L:  - pcm_lib.c: snd_pcm_capture_empty
#   L:  - pcm_lib.c: snd_pcm_playback_data
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - snd_create_proc_entry
#   L:  - snd_interval_ratden
#   L:  - snd_midi_channel_init
#   L:  - snd_midi_channel_init_set
#   L:  - snd_pcm_playback_empty
#   L:  - snd_pcm_capture_empty
#   L:  - snd_pcm_playback_data
#   L:  - snd_pcm_capture_poll
#   L:  - snd_pcm_playback_ready
#   L:  - snd_pcm_capture_ready
#   L:  - snd_pcm_format_size
#   L:  - snd_pcm_open
#   L:  - snd_pcm_playback_poll
#   L:  - snd_pcm_playback_ready
#   L:  - snd_pcm_release
#   L:  - snd_pcm_subformat_name
#   L:  - snd_remove_proc_entry
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/seq/seq_clientmgr.h
#   2004/11/30 13:03:17+01:00 perex@suse.cz +0 -1
#   [ALSA] ALSA core: misc cleanups
#   
#   D:2004/11/30 20:03:13
#   C:HWDEP Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer
#   F:core/hwdep.c:1.27->1.28 
#   F:core/info.c:1.50->1.51 
#   F:core/memory.c:1.33->1.34 
#   F:core/pcm.c:1.48->1.49 
#   F:core/pcm_lib.c:1.59->1.60 
#   F:core/pcm_native.c:1.110->1.111 
#   F:core/rawmidi.c:1.49->1.50 
#   F:core/sound.c:1.68->1.69 
#   F:core/oss/mixer_oss.c:1.36->1.37 
#   F:core/oss/pcm_oss.c:1.82->1.83 
#   F:core/oss/pcm_plugin.c:1.23->1.24 
#   F:core/oss/route.c:1.10->1.11 
#   F:core/seq/seq_clientmgr.c:1.39->1.40 
#   F:core/seq/seq_clientmgr.h:1.7->1.8 
#   F:core/seq/seq_instr.c:1.11->1.12 
#   F:core/seq/seq_memory.c:1.18->1.19 
#   F:core/seq/seq_memory.h:1.4->1.5 
#   F:core/seq/seq_midi.c:1.24->1.25 
#   F:core/seq/seq_midi_emul.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_device.h:1.5->1.6 
#   F:core/seq/oss/seq_oss_init.c:1.14->1.15 
#   F:include/info.h:1.18->1.19 
#   F:include/pcm.h:1.51->1.52 
#   F:include/rawmidi.h:1.11->1.12 
#   F:include/seq_midi_emul.h:1.3->1.4 
#   L:The patch below does the following cleanups under sound/core/ :
#   L:- make needlessly global code static
#   L:- remove the following stale prototypes from pcm.h
#   L:  (the functions are not or no longer present):
#   L:  - snd_pcm_capture_ready_jiffies
#   L:  - snd_pcm_playback_ready_jiffies
#   L:- remove the following unused global functions:
#   L:  - oss/pcm_plugin.c: snd_pcm_plug_capture_channels_mask
#   L:  - seq/seq_instr.c: snd_seq_cluster_new
#   L:  - seq/seq_instr.c: snd_seq_cluster_free
#   L:- move global to static inline functions
#   L:  - pcm_lib.c: snd_pcm_playback_ready
#   L:  - pcm_lib.c: snd_pcm_capture_ready
#   L:  - pcm_lib.c: snd_pcm_playback_empty
#   L:  - pcm_lib.c: snd_pcm_capture_empty
#   L:  - pcm_lib.c: snd_pcm_playback_data
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - snd_create_proc_entry
#   L:  - snd_interval_ratden
#   L:  - snd_midi_channel_init
#   L:  - snd_midi_channel_init_set
#   L:  - snd_pcm_playback_empty
#   L:  - snd_pcm_capture_empty
#   L:  - snd_pcm_playback_data
#   L:  - snd_pcm_capture_poll
#   L:  - snd_pcm_playback_ready
#   L:  - snd_pcm_capture_ready
#   L:  - snd_pcm_format_size
#   L:  - snd_pcm_open
#   L:  - snd_pcm_playback_poll
#   L:  - snd_pcm_playback_ready
#   L:  - snd_pcm_release
#   L:  - snd_pcm_subformat_name
#   L:  - snd_remove_proc_entry
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/seq/seq_clientmgr.c
#   2004/11/30 13:03:17+01:00 perex@suse.cz +2 -2
#   [ALSA] ALSA core: misc cleanups
#   
#   D:2004/11/30 20:03:13
#   C:HWDEP Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer
#   F:core/hwdep.c:1.27->1.28 
#   F:core/info.c:1.50->1.51 
#   F:core/memory.c:1.33->1.34 
#   F:core/pcm.c:1.48->1.49 
#   F:core/pcm_lib.c:1.59->1.60 
#   F:core/pcm_native.c:1.110->1.111 
#   F:core/rawmidi.c:1.49->1.50 
#   F:core/sound.c:1.68->1.69 
#   F:core/oss/mixer_oss.c:1.36->1.37 
#   F:core/oss/pcm_oss.c:1.82->1.83 
#   F:core/oss/pcm_plugin.c:1.23->1.24 
#   F:core/oss/route.c:1.10->1.11 
#   F:core/seq/seq_clientmgr.c:1.39->1.40 
#   F:core/seq/seq_clientmgr.h:1.7->1.8 
#   F:core/seq/seq_instr.c:1.11->1.12 
#   F:core/seq/seq_memory.c:1.18->1.19 
#   F:core/seq/seq_memory.h:1.4->1.5 
#   F:core/seq/seq_midi.c:1.24->1.25 
#   F:core/seq/seq_midi_emul.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_device.h:1.5->1.6 
#   F:core/seq/oss/seq_oss_init.c:1.14->1.15 
#   F:include/info.h:1.18->1.19 
#   F:include/pcm.h:1.51->1.52 
#   F:include/rawmidi.h:1.11->1.12 
#   F:include/seq_midi_emul.h:1.3->1.4 
#   L:The patch below does the following cleanups under sound/core/ :
#   L:- make needlessly global code static
#   L:- remove the following stale prototypes from pcm.h
#   L:  (the functions are not or no longer present):
#   L:  - snd_pcm_capture_ready_jiffies
#   L:  - snd_pcm_playback_ready_jiffies
#   L:- remove the following unused global functions:
#   L:  - oss/pcm_plugin.c: snd_pcm_plug_capture_channels_mask
#   L:  - seq/seq_instr.c: snd_seq_cluster_new
#   L:  - seq/seq_instr.c: snd_seq_cluster_free
#   L:- move global to static inline functions
#   L:  - pcm_lib.c: snd_pcm_playback_ready
#   L:  - pcm_lib.c: snd_pcm_capture_ready
#   L:  - pcm_lib.c: snd_pcm_playback_empty
#   L:  - pcm_lib.c: snd_pcm_capture_empty
#   L:  - pcm_lib.c: snd_pcm_playback_data
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - snd_create_proc_entry
#   L:  - snd_interval_ratden
#   L:  - snd_midi_channel_init
#   L:  - snd_midi_channel_init_set
#   L:  - snd_pcm_playback_empty
#   L:  - snd_pcm_capture_empty
#   L:  - snd_pcm_playback_data
#   L:  - snd_pcm_capture_poll
#   L:  - snd_pcm_playback_ready
#   L:  - snd_pcm_capture_ready
#   L:  - snd_pcm_format_size
#   L:  - snd_pcm_open
#   L:  - snd_pcm_playback_poll
#   L:  - snd_pcm_playback_ready
#   L:  - snd_pcm_release
#   L:  - snd_pcm_subformat_name
#   L:  - snd_remove_proc_entry
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/seq/oss/seq_oss_init.c
#   2004/11/30 13:03:17+01:00 perex@suse.cz +20 -19
#   [ALSA] ALSA core: misc cleanups
#   
#   D:2004/11/30 20:03:13
#   C:HWDEP Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer
#   F:core/hwdep.c:1.27->1.28 
#   F:core/info.c:1.50->1.51 
#   F:core/memory.c:1.33->1.34 
#   F:core/pcm.c:1.48->1.49 
#   F:core/pcm_lib.c:1.59->1.60 
#   F:core/pcm_native.c:1.110->1.111 
#   F:core/rawmidi.c:1.49->1.50 
#   F:core/sound.c:1.68->1.69 
#   F:core/oss/mixer_oss.c:1.36->1.37 
#   F:core/oss/pcm_oss.c:1.82->1.83 
#   F:core/oss/pcm_plugin.c:1.23->1.24 
#   F:core/oss/route.c:1.10->1.11 
#   F:core/seq/seq_clientmgr.c:1.39->1.40 
#   F:core/seq/seq_clientmgr.h:1.7->1.8 
#   F:core/seq/seq_instr.c:1.11->1.12 
#   F:core/seq/seq_memory.c:1.18->1.19 
#   F:core/seq/seq_memory.h:1.4->1.5 
#   F:core/seq/seq_midi.c:1.24->1.25 
#   F:core/seq/seq_midi_emul.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_device.h:1.5->1.6 
#   F:core/seq/oss/seq_oss_init.c:1.14->1.15 
#   F:include/info.h:1.18->1.19 
#   F:include/pcm.h:1.51->1.52 
#   F:include/rawmidi.h:1.11->1.12 
#   F:include/seq_midi_emul.h:1.3->1.4 
#   L:The patch below does the following cleanups under sound/core/ :
#   L:- make needlessly global code static
#   L:- remove the following stale prototypes from pcm.h
#   L:  (the functions are not or no longer present):
#   L:  - snd_pcm_capture_ready_jiffies
#   L:  - snd_pcm_playback_ready_jiffies
#   L:- remove the following unused global functions:
#   L:  - oss/pcm_plugin.c: snd_pcm_plug_capture_channels_mask
#   L:  - seq/seq_instr.c: snd_seq_cluster_new
#   L:  - seq/seq_instr.c: snd_seq_cluster_free
#   L:- move global to static inline functions
#   L:  - pcm_lib.c: snd_pcm_playback_ready
#   L:  - pcm_lib.c: snd_pcm_capture_ready
#   L:  - pcm_lib.c: snd_pcm_playback_empty
#   L:  - pcm_lib.c: snd_pcm_capture_empty
#   L:  - pcm_lib.c: snd_pcm_playback_data
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - snd_create_proc_entry
#   L:  - snd_interval_ratden
#   L:  - snd_midi_channel_init
#   L:  - snd_midi_channel_init_set
#   L:  - snd_pcm_playback_empty
#   L:  - snd_pcm_capture_empty
#   L:  - snd_pcm_playback_data
#   L:  - snd_pcm_capture_poll
#   L:  - snd_pcm_playback_ready
#   L:  - snd_pcm_capture_ready
#   L:  - snd_pcm_format_size
#   L:  - snd_pcm_open
#   L:  - snd_pcm_playback_poll
#   L:  - snd_pcm_playback_ready
#   L:  - snd_pcm_release
#   L:  - snd_pcm_subformat_name
#   L:  - snd_remove_proc_entry
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/seq/oss/seq_oss_device.h
#   2004/11/30 13:03:17+01:00 perex@suse.cz +0 -1
#   [ALSA] ALSA core: misc cleanups
#   
#   D:2004/11/30 20:03:13
#   C:HWDEP Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer
#   F:core/hwdep.c:1.27->1.28 
#   F:core/info.c:1.50->1.51 
#   F:core/memory.c:1.33->1.34 
#   F:core/pcm.c:1.48->1.49 
#   F:core/pcm_lib.c:1.59->1.60 
#   F:core/pcm_native.c:1.110->1.111 
#   F:core/rawmidi.c:1.49->1.50 
#   F:core/sound.c:1.68->1.69 
#   F:core/oss/mixer_oss.c:1.36->1.37 
#   F:core/oss/pcm_oss.c:1.82->1.83 
#   F:core/oss/pcm_plugin.c:1.23->1.24 
#   F:core/oss/route.c:1.10->1.11 
#   F:core/seq/seq_clientmgr.c:1.39->1.40 
#   F:core/seq/seq_clientmgr.h:1.7->1.8 
#   F:core/seq/seq_instr.c:1.11->1.12 
#   F:core/seq/seq_memory.c:1.18->1.19 
#   F:core/seq/seq_memory.h:1.4->1.5 
#   F:core/seq/seq_midi.c:1.24->1.25 
#   F:core/seq/seq_midi_emul.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_device.h:1.5->1.6 
#   F:core/seq/oss/seq_oss_init.c:1.14->1.15 
#   F:include/info.h:1.18->1.19 
#   F:include/pcm.h:1.51->1.52 
#   F:include/rawmidi.h:1.11->1.12 
#   F:include/seq_midi_emul.h:1.3->1.4 
#   L:The patch below does the following cleanups under sound/core/ :
#   L:- make needlessly global code static
#   L:- remove the following stale prototypes from pcm.h
#   L:  (the functions are not or no longer present):
#   L:  - snd_pcm_capture_ready_jiffies
#   L:  - snd_pcm_playback_ready_jiffies
#   L:- remove the following unused global functions:
#   L:  - oss/pcm_plugin.c: snd_pcm_plug_capture_channels_mask
#   L:  - seq/seq_instr.c: snd_seq_cluster_new
#   L:  - seq/seq_instr.c: snd_seq_cluster_free
#   L:- move global to static inline functions
#   L:  - pcm_lib.c: snd_pcm_playback_ready
#   L:  - pcm_lib.c: snd_pcm_capture_ready
#   L:  - pcm_lib.c: snd_pcm_playback_empty
#   L:  - pcm_lib.c: snd_pcm_capture_empty
#   L:  - pcm_lib.c: snd_pcm_playback_data
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - snd_create_proc_entry
#   L:  - snd_interval_ratden
#   L:  - snd_midi_channel_init
#   L:  - snd_midi_channel_init_set
#   L:  - snd_pcm_playback_empty
#   L:  - snd_pcm_capture_empty
#   L:  - snd_pcm_playback_data
#   L:  - snd_pcm_capture_poll
#   L:  - snd_pcm_playback_ready
#   L:  - snd_pcm_capture_ready
#   L:  - snd_pcm_format_size
#   L:  - snd_pcm_open
#   L:  - snd_pcm_playback_poll
#   L:  - snd_pcm_playback_ready
#   L:  - snd_pcm_release
#   L:  - snd_pcm_subformat_name
#   L:  - snd_remove_proc_entry
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/rawmidi.c
#   2004/11/30 13:03:16+01:00 perex@suse.cz +5 -3
#   [ALSA] ALSA core: misc cleanups
#   
#   D:2004/11/30 20:03:13
#   C:HWDEP Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer
#   F:core/hwdep.c:1.27->1.28 
#   F:core/info.c:1.50->1.51 
#   F:core/memory.c:1.33->1.34 
#   F:core/pcm.c:1.48->1.49 
#   F:core/pcm_lib.c:1.59->1.60 
#   F:core/pcm_native.c:1.110->1.111 
#   F:core/rawmidi.c:1.49->1.50 
#   F:core/sound.c:1.68->1.69 
#   F:core/oss/mixer_oss.c:1.36->1.37 
#   F:core/oss/pcm_oss.c:1.82->1.83 
#   F:core/oss/pcm_plugin.c:1.23->1.24 
#   F:core/oss/route.c:1.10->1.11 
#   F:core/seq/seq_clientmgr.c:1.39->1.40 
#   F:core/seq/seq_clientmgr.h:1.7->1.8 
#   F:core/seq/seq_instr.c:1.11->1.12 
#   F:core/seq/seq_memory.c:1.18->1.19 
#   F:core/seq/seq_memory.h:1.4->1.5 
#   F:core/seq/seq_midi.c:1.24->1.25 
#   F:core/seq/seq_midi_emul.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_device.h:1.5->1.6 
#   F:core/seq/oss/seq_oss_init.c:1.14->1.15 
#   F:include/info.h:1.18->1.19 
#   F:include/pcm.h:1.51->1.52 
#   F:include/rawmidi.h:1.11->1.12 
#   F:include/seq_midi_emul.h:1.3->1.4 
#   L:The patch below does the following cleanups under sound/core/ :
#   L:- make needlessly global code static
#   L:- remove the following stale prototypes from pcm.h
#   L:  (the functions are not or no longer present):
#   L:  - snd_pcm_capture_ready_jiffies
#   L:  - snd_pcm_playback_ready_jiffies
#   L:- remove the following unused global functions:
#   L:  - oss/pcm_plugin.c: snd_pcm_plug_capture_channels_mask
#   L:  - seq/seq_instr.c: snd_seq_cluster_new
#   L:  - seq/seq_instr.c: snd_seq_cluster_free
#   L:- move global to static inline functions
#   L:  - pcm_lib.c: snd_pcm_playback_ready
#   L:  - pcm_lib.c: snd_pcm_capture_ready
#   L:  - pcm_lib.c: snd_pcm_playback_empty
#   L:  - pcm_lib.c: snd_pcm_capture_empty
#   L:  - pcm_lib.c: snd_pcm_playback_data
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - snd_create_proc_entry
#   L:  - snd_interval_ratden
#   L:  - snd_midi_channel_init
#   L:  - snd_midi_channel_init_set
#   L:  - snd_pcm_playback_empty
#   L:  - snd_pcm_capture_empty
#   L:  - snd_pcm_playback_data
#   L:  - snd_pcm_capture_poll
#   L:  - snd_pcm_playback_ready
#   L:  - snd_pcm_capture_ready
#   L:  - snd_pcm_format_size
#   L:  - snd_pcm_open
#   L:  - snd_pcm_playback_poll
#   L:  - snd_pcm_playback_ready
#   L:  - snd_pcm_release
#   L:  - snd_pcm_subformat_name
#   L:  - snd_remove_proc_entry
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/pcm_native.c
#   2004/11/30 13:03:15+01:00 perex@suse.cz +8 -8
#   [ALSA] ALSA core: misc cleanups
#   
#   D:2004/11/30 20:03:13
#   C:HWDEP Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer
#   F:core/hwdep.c:1.27->1.28 
#   F:core/info.c:1.50->1.51 
#   F:core/memory.c:1.33->1.34 
#   F:core/pcm.c:1.48->1.49 
#   F:core/pcm_lib.c:1.59->1.60 
#   F:core/pcm_native.c:1.110->1.111 
#   F:core/rawmidi.c:1.49->1.50 
#   F:core/sound.c:1.68->1.69 
#   F:core/oss/mixer_oss.c:1.36->1.37 
#   F:core/oss/pcm_oss.c:1.82->1.83 
#   F:core/oss/pcm_plugin.c:1.23->1.24 
#   F:core/oss/route.c:1.10->1.11 
#   F:core/seq/seq_clientmgr.c:1.39->1.40 
#   F:core/seq/seq_clientmgr.h:1.7->1.8 
#   F:core/seq/seq_instr.c:1.11->1.12 
#   F:core/seq/seq_memory.c:1.18->1.19 
#   F:core/seq/seq_memory.h:1.4->1.5 
#   F:core/seq/seq_midi.c:1.24->1.25 
#   F:core/seq/seq_midi_emul.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_device.h:1.5->1.6 
#   F:core/seq/oss/seq_oss_init.c:1.14->1.15 
#   F:include/info.h:1.18->1.19 
#   F:include/pcm.h:1.51->1.52 
#   F:include/rawmidi.h:1.11->1.12 
#   F:include/seq_midi_emul.h:1.3->1.4 
#   L:The patch below does the following cleanups under sound/core/ :
#   L:- make needlessly global code static
#   L:- remove the following stale prototypes from pcm.h
#   L:  (the functions are not or no longer present):
#   L:  - snd_pcm_capture_ready_jiffies
#   L:  - snd_pcm_playback_ready_jiffies
#   L:- remove the following unused global functions:
#   L:  - oss/pcm_plugin.c: snd_pcm_plug_capture_channels_mask
#   L:  - seq/seq_instr.c: snd_seq_cluster_new
#   L:  - seq/seq_instr.c: snd_seq_cluster_free
#   L:- move global to static inline functions
#   L:  - pcm_lib.c: snd_pcm_playback_ready
#   L:  - pcm_lib.c: snd_pcm_capture_ready
#   L:  - pcm_lib.c: snd_pcm_playback_empty
#   L:  - pcm_lib.c: snd_pcm_capture_empty
#   L:  - pcm_lib.c: snd_pcm_playback_data
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - snd_create_proc_entry
#   L:  - snd_interval_ratden
#   L:  - snd_midi_channel_init
#   L:  - snd_midi_channel_init_set
#   L:  - snd_pcm_playback_empty
#   L:  - snd_pcm_capture_empty
#   L:  - snd_pcm_playback_data
#   L:  - snd_pcm_capture_poll
#   L:  - snd_pcm_playback_ready
#   L:  - snd_pcm_capture_ready
#   L:  - snd_pcm_format_size
#   L:  - snd_pcm_open
#   L:  - snd_pcm_playback_poll
#   L:  - snd_pcm_playback_ready
#   L:  - snd_pcm_release
#   L:  - snd_pcm_subformat_name
#   L:  - snd_remove_proc_entry
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/pcm_lib.c
#   2004/11/30 13:03:15+01:00 perex@suse.cz +9 -89
#   [ALSA] ALSA core: misc cleanups
#   
#   D:2004/11/30 20:03:13
#   C:HWDEP Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer
#   F:core/hwdep.c:1.27->1.28 
#   F:core/info.c:1.50->1.51 
#   F:core/memory.c:1.33->1.34 
#   F:core/pcm.c:1.48->1.49 
#   F:core/pcm_lib.c:1.59->1.60 
#   F:core/pcm_native.c:1.110->1.111 
#   F:core/rawmidi.c:1.49->1.50 
#   F:core/sound.c:1.68->1.69 
#   F:core/oss/mixer_oss.c:1.36->1.37 
#   F:core/oss/pcm_oss.c:1.82->1.83 
#   F:core/oss/pcm_plugin.c:1.23->1.24 
#   F:core/oss/route.c:1.10->1.11 
#   F:core/seq/seq_clientmgr.c:1.39->1.40 
#   F:core/seq/seq_clientmgr.h:1.7->1.8 
#   F:core/seq/seq_instr.c:1.11->1.12 
#   F:core/seq/seq_memory.c:1.18->1.19 
#   F:core/seq/seq_memory.h:1.4->1.5 
#   F:core/seq/seq_midi.c:1.24->1.25 
#   F:core/seq/seq_midi_emul.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_device.h:1.5->1.6 
#   F:core/seq/oss/seq_oss_init.c:1.14->1.15 
#   F:include/info.h:1.18->1.19 
#   F:include/pcm.h:1.51->1.52 
#   F:include/rawmidi.h:1.11->1.12 
#   F:include/seq_midi_emul.h:1.3->1.4 
#   L:The patch below does the following cleanups under sound/core/ :
#   L:- make needlessly global code static
#   L:- remove the following stale prototypes from pcm.h
#   L:  (the functions are not or no longer present):
#   L:  - snd_pcm_capture_ready_jiffies
#   L:  - snd_pcm_playback_ready_jiffies
#   L:- remove the following unused global functions:
#   L:  - oss/pcm_plugin.c: snd_pcm_plug_capture_channels_mask
#   L:  - seq/seq_instr.c: snd_seq_cluster_new
#   L:  - seq/seq_instr.c: snd_seq_cluster_free
#   L:- move global to static inline functions
#   L:  - pcm_lib.c: snd_pcm_playback_ready
#   L:  - pcm_lib.c: snd_pcm_capture_ready
#   L:  - pcm_lib.c: snd_pcm_playback_empty
#   L:  - pcm_lib.c: snd_pcm_capture_empty
#   L:  - pcm_lib.c: snd_pcm_playback_data
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - snd_create_proc_entry
#   L:  - snd_interval_ratden
#   L:  - snd_midi_channel_init
#   L:  - snd_midi_channel_init_set
#   L:  - snd_pcm_playback_empty
#   L:  - snd_pcm_capture_empty
#   L:  - snd_pcm_playback_data
#   L:  - snd_pcm_capture_poll
#   L:  - snd_pcm_playback_ready
#   L:  - snd_pcm_capture_ready
#   L:  - snd_pcm_format_size
#   L:  - snd_pcm_open
#   L:  - snd_pcm_playback_poll
#   L:  - snd_pcm_playback_ready
#   L:  - snd_pcm_release
#   L:  - snd_pcm_subformat_name
#   L:  - snd_remove_proc_entry
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/pcm.c
#   2004/11/30 13:03:15+01:00 perex@suse.cz +12 -18
#   [ALSA] ALSA core: misc cleanups
#   
#   D:2004/11/30 20:03:13
#   C:HWDEP Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer
#   F:core/hwdep.c:1.27->1.28 
#   F:core/info.c:1.50->1.51 
#   F:core/memory.c:1.33->1.34 
#   F:core/pcm.c:1.48->1.49 
#   F:core/pcm_lib.c:1.59->1.60 
#   F:core/pcm_native.c:1.110->1.111 
#   F:core/rawmidi.c:1.49->1.50 
#   F:core/sound.c:1.68->1.69 
#   F:core/oss/mixer_oss.c:1.36->1.37 
#   F:core/oss/pcm_oss.c:1.82->1.83 
#   F:core/oss/pcm_plugin.c:1.23->1.24 
#   F:core/oss/route.c:1.10->1.11 
#   F:core/seq/seq_clientmgr.c:1.39->1.40 
#   F:core/seq/seq_clientmgr.h:1.7->1.8 
#   F:core/seq/seq_instr.c:1.11->1.12 
#   F:core/seq/seq_memory.c:1.18->1.19 
#   F:core/seq/seq_memory.h:1.4->1.5 
#   F:core/seq/seq_midi.c:1.24->1.25 
#   F:core/seq/seq_midi_emul.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_device.h:1.5->1.6 
#   F:core/seq/oss/seq_oss_init.c:1.14->1.15 
#   F:include/info.h:1.18->1.19 
#   F:include/pcm.h:1.51->1.52 
#   F:include/rawmidi.h:1.11->1.12 
#   F:include/seq_midi_emul.h:1.3->1.4 
#   L:The patch below does the following cleanups under sound/core/ :
#   L:- make needlessly global code static
#   L:- remove the following stale prototypes from pcm.h
#   L:  (the functions are not or no longer present):
#   L:  - snd_pcm_capture_ready_jiffies
#   L:  - snd_pcm_playback_ready_jiffies
#   L:- remove the following unused global functions:
#   L:  - oss/pcm_plugin.c: snd_pcm_plug_capture_channels_mask
#   L:  - seq/seq_instr.c: snd_seq_cluster_new
#   L:  - seq/seq_instr.c: snd_seq_cluster_free
#   L:- move global to static inline functions
#   L:  - pcm_lib.c: snd_pcm_playback_ready
#   L:  - pcm_lib.c: snd_pcm_capture_ready
#   L:  - pcm_lib.c: snd_pcm_playback_empty
#   L:  - pcm_lib.c: snd_pcm_capture_empty
#   L:  - pcm_lib.c: snd_pcm_playback_data
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - snd_create_proc_entry
#   L:  - snd_interval_ratden
#   L:  - snd_midi_channel_init
#   L:  - snd_midi_channel_init_set
#   L:  - snd_pcm_playback_empty
#   L:  - snd_pcm_capture_empty
#   L:  - snd_pcm_playback_data
#   L:  - snd_pcm_capture_poll
#   L:  - snd_pcm_playback_ready
#   L:  - snd_pcm_capture_ready
#   L:  - snd_pcm_format_size
#   L:  - snd_pcm_open
#   L:  - snd_pcm_playback_poll
#   L:  - snd_pcm_playback_ready
#   L:  - snd_pcm_release
#   L:  - snd_pcm_subformat_name
#   L:  - snd_remove_proc_entry
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/oss/route.c
#   2004/11/30 13:03:17+01:00 perex@suse.cz +6 -6
#   [ALSA] ALSA core: misc cleanups
#   
#   D:2004/11/30 20:03:13
#   C:HWDEP Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer
#   F:core/hwdep.c:1.27->1.28 
#   F:core/info.c:1.50->1.51 
#   F:core/memory.c:1.33->1.34 
#   F:core/pcm.c:1.48->1.49 
#   F:core/pcm_lib.c:1.59->1.60 
#   F:core/pcm_native.c:1.110->1.111 
#   F:core/rawmidi.c:1.49->1.50 
#   F:core/sound.c:1.68->1.69 
#   F:core/oss/mixer_oss.c:1.36->1.37 
#   F:core/oss/pcm_oss.c:1.82->1.83 
#   F:core/oss/pcm_plugin.c:1.23->1.24 
#   F:core/oss/route.c:1.10->1.11 
#   F:core/seq/seq_clientmgr.c:1.39->1.40 
#   F:core/seq/seq_clientmgr.h:1.7->1.8 
#   F:core/seq/seq_instr.c:1.11->1.12 
#   F:core/seq/seq_memory.c:1.18->1.19 
#   F:core/seq/seq_memory.h:1.4->1.5 
#   F:core/seq/seq_midi.c:1.24->1.25 
#   F:core/seq/seq_midi_emul.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_device.h:1.5->1.6 
#   F:core/seq/oss/seq_oss_init.c:1.14->1.15 
#   F:include/info.h:1.18->1.19 
#   F:include/pcm.h:1.51->1.52 
#   F:include/rawmidi.h:1.11->1.12 
#   F:include/seq_midi_emul.h:1.3->1.4 
#   L:The patch below does the following cleanups under sound/core/ :
#   L:- make needlessly global code static
#   L:- remove the following stale prototypes from pcm.h
#   L:  (the functions are not or no longer present):
#   L:  - snd_pcm_capture_ready_jiffies
#   L:  - snd_pcm_playback_ready_jiffies
#   L:- remove the following unused global functions:
#   L:  - oss/pcm_plugin.c: snd_pcm_plug_capture_channels_mask
#   L:  - seq/seq_instr.c: snd_seq_cluster_new
#   L:  - seq/seq_instr.c: snd_seq_cluster_free
#   L:- move global to static inline functions
#   L:  - pcm_lib.c: snd_pcm_playback_ready
#   L:  - pcm_lib.c: snd_pcm_capture_ready
#   L:  - pcm_lib.c: snd_pcm_playback_empty
#   L:  - pcm_lib.c: snd_pcm_capture_empty
#   L:  - pcm_lib.c: snd_pcm_playback_data
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - snd_create_proc_entry
#   L:  - snd_interval_ratden
#   L:  - snd_midi_channel_init
#   L:  - snd_midi_channel_init_set
#   L:  - snd_pcm_playback_empty
#   L:  - snd_pcm_capture_empty
#   L:  - snd_pcm_playback_data
#   L:  - snd_pcm_capture_poll
#   L:  - snd_pcm_playback_ready
#   L:  - snd_pcm_capture_ready
#   L:  - snd_pcm_format_size
#   L:  - snd_pcm_open
#   L:  - snd_pcm_playback_poll
#   L:  - snd_pcm_playback_ready
#   L:  - snd_pcm_release
#   L:  - snd_pcm_subformat_name
#   L:  - snd_remove_proc_entry
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/oss/pcm_plugin.c
#   2004/11/30 13:03:17+01:00 perex@suse.cz +2 -29
#   [ALSA] ALSA core: misc cleanups
#   
#   D:2004/11/30 20:03:13
#   C:HWDEP Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer
#   F:core/hwdep.c:1.27->1.28 
#   F:core/info.c:1.50->1.51 
#   F:core/memory.c:1.33->1.34 
#   F:core/pcm.c:1.48->1.49 
#   F:core/pcm_lib.c:1.59->1.60 
#   F:core/pcm_native.c:1.110->1.111 
#   F:core/rawmidi.c:1.49->1.50 
#   F:core/sound.c:1.68->1.69 
#   F:core/oss/mixer_oss.c:1.36->1.37 
#   F:core/oss/pcm_oss.c:1.82->1.83 
#   F:core/oss/pcm_plugin.c:1.23->1.24 
#   F:core/oss/route.c:1.10->1.11 
#   F:core/seq/seq_clientmgr.c:1.39->1.40 
#   F:core/seq/seq_clientmgr.h:1.7->1.8 
#   F:core/seq/seq_instr.c:1.11->1.12 
#   F:core/seq/seq_memory.c:1.18->1.19 
#   F:core/seq/seq_memory.h:1.4->1.5 
#   F:core/seq/seq_midi.c:1.24->1.25 
#   F:core/seq/seq_midi_emul.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_device.h:1.5->1.6 
#   F:core/seq/oss/seq_oss_init.c:1.14->1.15 
#   F:include/info.h:1.18->1.19 
#   F:include/pcm.h:1.51->1.52 
#   F:include/rawmidi.h:1.11->1.12 
#   F:include/seq_midi_emul.h:1.3->1.4 
#   L:The patch below does the following cleanups under sound/core/ :
#   L:- make needlessly global code static
#   L:- remove the following stale prototypes from pcm.h
#   L:  (the functions are not or no longer present):
#   L:  - snd_pcm_capture_ready_jiffies
#   L:  - snd_pcm_playback_ready_jiffies
#   L:- remove the following unused global functions:
#   L:  - oss/pcm_plugin.c: snd_pcm_plug_capture_channels_mask
#   L:  - seq/seq_instr.c: snd_seq_cluster_new
#   L:  - seq/seq_instr.c: snd_seq_cluster_free
#   L:- move global to static inline functions
#   L:  - pcm_lib.c: snd_pcm_playback_ready
#   L:  - pcm_lib.c: snd_pcm_capture_ready
#   L:  - pcm_lib.c: snd_pcm_playback_empty
#   L:  - pcm_lib.c: snd_pcm_capture_empty
#   L:  - pcm_lib.c: snd_pcm_playback_data
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - snd_create_proc_entry
#   L:  - snd_interval_ratden
#   L:  - snd_midi_channel_init
#   L:  - snd_midi_channel_init_set
#   L:  - snd_pcm_playback_empty
#   L:  - snd_pcm_capture_empty
#   L:  - snd_pcm_playback_data
#   L:  - snd_pcm_capture_poll
#   L:  - snd_pcm_playback_ready
#   L:  - snd_pcm_capture_ready
#   L:  - snd_pcm_format_size
#   L:  - snd_pcm_open
#   L:  - snd_pcm_playback_poll
#   L:  - snd_pcm_playback_ready
#   L:  - snd_pcm_release
#   L:  - snd_pcm_subformat_name
#   L:  - snd_remove_proc_entry
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/oss/pcm_oss.c
#   2004/11/30 13:03:17+01:00 perex@suse.cz +2 -2
#   [ALSA] ALSA core: misc cleanups
#   
#   D:2004/11/30 20:03:13
#   C:HWDEP Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer
#   F:core/hwdep.c:1.27->1.28 
#   F:core/info.c:1.50->1.51 
#   F:core/memory.c:1.33->1.34 
#   F:core/pcm.c:1.48->1.49 
#   F:core/pcm_lib.c:1.59->1.60 
#   F:core/pcm_native.c:1.110->1.111 
#   F:core/rawmidi.c:1.49->1.50 
#   F:core/sound.c:1.68->1.69 
#   F:core/oss/mixer_oss.c:1.36->1.37 
#   F:core/oss/pcm_oss.c:1.82->1.83 
#   F:core/oss/pcm_plugin.c:1.23->1.24 
#   F:core/oss/route.c:1.10->1.11 
#   F:core/seq/seq_clientmgr.c:1.39->1.40 
#   F:core/seq/seq_clientmgr.h:1.7->1.8 
#   F:core/seq/seq_instr.c:1.11->1.12 
#   F:core/seq/seq_memory.c:1.18->1.19 
#   F:core/seq/seq_memory.h:1.4->1.5 
#   F:core/seq/seq_midi.c:1.24->1.25 
#   F:core/seq/seq_midi_emul.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_device.h:1.5->1.6 
#   F:core/seq/oss/seq_oss_init.c:1.14->1.15 
#   F:include/info.h:1.18->1.19 
#   F:include/pcm.h:1.51->1.52 
#   F:include/rawmidi.h:1.11->1.12 
#   F:include/seq_midi_emul.h:1.3->1.4 
#   L:The patch below does the following cleanups under sound/core/ :
#   L:- make needlessly global code static
#   L:- remove the following stale prototypes from pcm.h
#   L:  (the functions are not or no longer present):
#   L:  - snd_pcm_capture_ready_jiffies
#   L:  - snd_pcm_playback_ready_jiffies
#   L:- remove the following unused global functions:
#   L:  - oss/pcm_plugin.c: snd_pcm_plug_capture_channels_mask
#   L:  - seq/seq_instr.c: snd_seq_cluster_new
#   L:  - seq/seq_instr.c: snd_seq_cluster_free
#   L:- move global to static inline functions
#   L:  - pcm_lib.c: snd_pcm_playback_ready
#   L:  - pcm_lib.c: snd_pcm_capture_ready
#   L:  - pcm_lib.c: snd_pcm_playback_empty
#   L:  - pcm_lib.c: snd_pcm_capture_empty
#   L:  - pcm_lib.c: snd_pcm_playback_data
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - snd_create_proc_entry
#   L:  - snd_interval_ratden
#   L:  - snd_midi_channel_init
#   L:  - snd_midi_channel_init_set
#   L:  - snd_pcm_playback_empty
#   L:  - snd_pcm_capture_empty
#   L:  - snd_pcm_playback_data
#   L:  - snd_pcm_capture_poll
#   L:  - snd_pcm_playback_ready
#   L:  - snd_pcm_capture_ready
#   L:  - snd_pcm_format_size
#   L:  - snd_pcm_open
#   L:  - snd_pcm_playback_poll
#   L:  - snd_pcm_playback_ready
#   L:  - snd_pcm_release
#   L:  - snd_pcm_subformat_name
#   L:  - snd_remove_proc_entry
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/oss/mixer_oss.c
#   2004/11/30 13:03:16+01:00 perex@suse.cz +2 -2
#   [ALSA] ALSA core: misc cleanups
#   
#   D:2004/11/30 20:03:13
#   C:HWDEP Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer
#   F:core/hwdep.c:1.27->1.28 
#   F:core/info.c:1.50->1.51 
#   F:core/memory.c:1.33->1.34 
#   F:core/pcm.c:1.48->1.49 
#   F:core/pcm_lib.c:1.59->1.60 
#   F:core/pcm_native.c:1.110->1.111 
#   F:core/rawmidi.c:1.49->1.50 
#   F:core/sound.c:1.68->1.69 
#   F:core/oss/mixer_oss.c:1.36->1.37 
#   F:core/oss/pcm_oss.c:1.82->1.83 
#   F:core/oss/pcm_plugin.c:1.23->1.24 
#   F:core/oss/route.c:1.10->1.11 
#   F:core/seq/seq_clientmgr.c:1.39->1.40 
#   F:core/seq/seq_clientmgr.h:1.7->1.8 
#   F:core/seq/seq_instr.c:1.11->1.12 
#   F:core/seq/seq_memory.c:1.18->1.19 
#   F:core/seq/seq_memory.h:1.4->1.5 
#   F:core/seq/seq_midi.c:1.24->1.25 
#   F:core/seq/seq_midi_emul.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_device.h:1.5->1.6 
#   F:core/seq/oss/seq_oss_init.c:1.14->1.15 
#   F:include/info.h:1.18->1.19 
#   F:include/pcm.h:1.51->1.52 
#   F:include/rawmidi.h:1.11->1.12 
#   F:include/seq_midi_emul.h:1.3->1.4 
#   L:The patch below does the following cleanups under sound/core/ :
#   L:- make needlessly global code static
#   L:- remove the following stale prototypes from pcm.h
#   L:  (the functions are not or no longer present):
#   L:  - snd_pcm_capture_ready_jiffies
#   L:  - snd_pcm_playback_ready_jiffies
#   L:- remove the following unused global functions:
#   L:  - oss/pcm_plugin.c: snd_pcm_plug_capture_channels_mask
#   L:  - seq/seq_instr.c: snd_seq_cluster_new
#   L:  - seq/seq_instr.c: snd_seq_cluster_free
#   L:- move global to static inline functions
#   L:  - pcm_lib.c: snd_pcm_playback_ready
#   L:  - pcm_lib.c: snd_pcm_capture_ready
#   L:  - pcm_lib.c: snd_pcm_playback_empty
#   L:  - pcm_lib.c: snd_pcm_capture_empty
#   L:  - pcm_lib.c: snd_pcm_playback_data
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - snd_create_proc_entry
#   L:  - snd_interval_ratden
#   L:  - snd_midi_channel_init
#   L:  - snd_midi_channel_init_set
#   L:  - snd_pcm_playback_empty
#   L:  - snd_pcm_capture_empty
#   L:  - snd_pcm_playback_data
#   L:  - snd_pcm_capture_poll
#   L:  - snd_pcm_playback_ready
#   L:  - snd_pcm_capture_ready
#   L:  - snd_pcm_format_size
#   L:  - snd_pcm_open
#   L:  - snd_pcm_playback_poll
#   L:  - snd_pcm_playback_ready
#   L:  - snd_pcm_release
#   L:  - snd_pcm_subformat_name
#   L:  - snd_remove_proc_entry
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/memory.c
#   2004/11/30 13:03:15+01:00 perex@suse.cz +1 -1
#   [ALSA] ALSA core: misc cleanups
#   
#   D:2004/11/30 20:03:13
#   C:HWDEP Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer
#   F:core/hwdep.c:1.27->1.28 
#   F:core/info.c:1.50->1.51 
#   F:core/memory.c:1.33->1.34 
#   F:core/pcm.c:1.48->1.49 
#   F:core/pcm_lib.c:1.59->1.60 
#   F:core/pcm_native.c:1.110->1.111 
#   F:core/rawmidi.c:1.49->1.50 
#   F:core/sound.c:1.68->1.69 
#   F:core/oss/mixer_oss.c:1.36->1.37 
#   F:core/oss/pcm_oss.c:1.82->1.83 
#   F:core/oss/pcm_plugin.c:1.23->1.24 
#   F:core/oss/route.c:1.10->1.11 
#   F:core/seq/seq_clientmgr.c:1.39->1.40 
#   F:core/seq/seq_clientmgr.h:1.7->1.8 
#   F:core/seq/seq_instr.c:1.11->1.12 
#   F:core/seq/seq_memory.c:1.18->1.19 
#   F:core/seq/seq_memory.h:1.4->1.5 
#   F:core/seq/seq_midi.c:1.24->1.25 
#   F:core/seq/seq_midi_emul.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_device.h:1.5->1.6 
#   F:core/seq/oss/seq_oss_init.c:1.14->1.15 
#   F:include/info.h:1.18->1.19 
#   F:include/pcm.h:1.51->1.52 
#   F:include/rawmidi.h:1.11->1.12 
#   F:include/seq_midi_emul.h:1.3->1.4 
#   L:The patch below does the following cleanups under sound/core/ :
#   L:- make needlessly global code static
#   L:- remove the following stale prototypes from pcm.h
#   L:  (the functions are not or no longer present):
#   L:  - snd_pcm_capture_ready_jiffies
#   L:  - snd_pcm_playback_ready_jiffies
#   L:- remove the following unused global functions:
#   L:  - oss/pcm_plugin.c: snd_pcm_plug_capture_channels_mask
#   L:  - seq/seq_instr.c: snd_seq_cluster_new
#   L:  - seq/seq_instr.c: snd_seq_cluster_free
#   L:- move global to static inline functions
#   L:  - pcm_lib.c: snd_pcm_playback_ready
#   L:  - pcm_lib.c: snd_pcm_capture_ready
#   L:  - pcm_lib.c: snd_pcm_playback_empty
#   L:  - pcm_lib.c: snd_pcm_capture_empty
#   L:  - pcm_lib.c: snd_pcm_playback_data
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - snd_create_proc_entry
#   L:  - snd_interval_ratden
#   L:  - snd_midi_channel_init
#   L:  - snd_midi_channel_init_set
#   L:  - snd_pcm_playback_empty
#   L:  - snd_pcm_capture_empty
#   L:  - snd_pcm_playback_data
#   L:  - snd_pcm_capture_poll
#   L:  - snd_pcm_playback_ready
#   L:  - snd_pcm_capture_ready
#   L:  - snd_pcm_format_size
#   L:  - snd_pcm_open
#   L:  - snd_pcm_playback_poll
#   L:  - snd_pcm_playback_ready
#   L:  - snd_pcm_release
#   L:  - snd_pcm_subformat_name
#   L:  - snd_remove_proc_entry
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/info.c
#   2004/11/30 13:03:15+01:00 perex@suse.cz +4 -4
#   [ALSA] ALSA core: misc cleanups
#   
#   D:2004/11/30 20:03:13
#   C:HWDEP Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer
#   F:core/hwdep.c:1.27->1.28 
#   F:core/info.c:1.50->1.51 
#   F:core/memory.c:1.33->1.34 
#   F:core/pcm.c:1.48->1.49 
#   F:core/pcm_lib.c:1.59->1.60 
#   F:core/pcm_native.c:1.110->1.111 
#   F:core/rawmidi.c:1.49->1.50 
#   F:core/sound.c:1.68->1.69 
#   F:core/oss/mixer_oss.c:1.36->1.37 
#   F:core/oss/pcm_oss.c:1.82->1.83 
#   F:core/oss/pcm_plugin.c:1.23->1.24 
#   F:core/oss/route.c:1.10->1.11 
#   F:core/seq/seq_clientmgr.c:1.39->1.40 
#   F:core/seq/seq_clientmgr.h:1.7->1.8 
#   F:core/seq/seq_instr.c:1.11->1.12 
#   F:core/seq/seq_memory.c:1.18->1.19 
#   F:core/seq/seq_memory.h:1.4->1.5 
#   F:core/seq/seq_midi.c:1.24->1.25 
#   F:core/seq/seq_midi_emul.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_device.h:1.5->1.6 
#   F:core/seq/oss/seq_oss_init.c:1.14->1.15 
#   F:include/info.h:1.18->1.19 
#   F:include/pcm.h:1.51->1.52 
#   F:include/rawmidi.h:1.11->1.12 
#   F:include/seq_midi_emul.h:1.3->1.4 
#   L:The patch below does the following cleanups under sound/core/ :
#   L:- make needlessly global code static
#   L:- remove the following stale prototypes from pcm.h
#   L:  (the functions are not or no longer present):
#   L:  - snd_pcm_capture_ready_jiffies
#   L:  - snd_pcm_playback_ready_jiffies
#   L:- remove the following unused global functions:
#   L:  - oss/pcm_plugin.c: snd_pcm_plug_capture_channels_mask
#   L:  - seq/seq_instr.c: snd_seq_cluster_new
#   L:  - seq/seq_instr.c: snd_seq_cluster_free
#   L:- move global to static inline functions
#   L:  - pcm_lib.c: snd_pcm_playback_ready
#   L:  - pcm_lib.c: snd_pcm_capture_ready
#   L:  - pcm_lib.c: snd_pcm_playback_empty
#   L:  - pcm_lib.c: snd_pcm_capture_empty
#   L:  - pcm_lib.c: snd_pcm_playback_data
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - snd_create_proc_entry
#   L:  - snd_interval_ratden
#   L:  - snd_midi_channel_init
#   L:  - snd_midi_channel_init_set
#   L:  - snd_pcm_playback_empty
#   L:  - snd_pcm_capture_empty
#   L:  - snd_pcm_playback_data
#   L:  - snd_pcm_capture_poll
#   L:  - snd_pcm_playback_ready
#   L:  - snd_pcm_capture_ready
#   L:  - snd_pcm_format_size
#   L:  - snd_pcm_open
#   L:  - snd_pcm_playback_poll
#   L:  - snd_pcm_playback_ready
#   L:  - snd_pcm_release
#   L:  - snd_pcm_subformat_name
#   L:  - snd_remove_proc_entry
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/hwdep.c
#   2004/11/30 13:03:13+01:00 perex@suse.cz +1 -1
#   [ALSA] ALSA core: misc cleanups
#   
#   D:2004/11/30 20:03:13
#   C:HWDEP Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer
#   F:core/hwdep.c:1.27->1.28 
#   F:core/info.c:1.50->1.51 
#   F:core/memory.c:1.33->1.34 
#   F:core/pcm.c:1.48->1.49 
#   F:core/pcm_lib.c:1.59->1.60 
#   F:core/pcm_native.c:1.110->1.111 
#   F:core/rawmidi.c:1.49->1.50 
#   F:core/sound.c:1.68->1.69 
#   F:core/oss/mixer_oss.c:1.36->1.37 
#   F:core/oss/pcm_oss.c:1.82->1.83 
#   F:core/oss/pcm_plugin.c:1.23->1.24 
#   F:core/oss/route.c:1.10->1.11 
#   F:core/seq/seq_clientmgr.c:1.39->1.40 
#   F:core/seq/seq_clientmgr.h:1.7->1.8 
#   F:core/seq/seq_instr.c:1.11->1.12 
#   F:core/seq/seq_memory.c:1.18->1.19 
#   F:core/seq/seq_memory.h:1.4->1.5 
#   F:core/seq/seq_midi.c:1.24->1.25 
#   F:core/seq/seq_midi_emul.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_device.h:1.5->1.6 
#   F:core/seq/oss/seq_oss_init.c:1.14->1.15 
#   F:include/info.h:1.18->1.19 
#   F:include/pcm.h:1.51->1.52 
#   F:include/rawmidi.h:1.11->1.12 
#   F:include/seq_midi_emul.h:1.3->1.4 
#   L:The patch below does the following cleanups under sound/core/ :
#   L:- make needlessly global code static
#   L:- remove the following stale prototypes from pcm.h
#   L:  (the functions are not or no longer present):
#   L:  - snd_pcm_capture_ready_jiffies
#   L:  - snd_pcm_playback_ready_jiffies
#   L:- remove the following unused global functions:
#   L:  - oss/pcm_plugin.c: snd_pcm_plug_capture_channels_mask
#   L:  - seq/seq_instr.c: snd_seq_cluster_new
#   L:  - seq/seq_instr.c: snd_seq_cluster_free
#   L:- move global to static inline functions
#   L:  - pcm_lib.c: snd_pcm_playback_ready
#   L:  - pcm_lib.c: snd_pcm_capture_ready
#   L:  - pcm_lib.c: snd_pcm_playback_empty
#   L:  - pcm_lib.c: snd_pcm_capture_empty
#   L:  - pcm_lib.c: snd_pcm_playback_data
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - snd_create_proc_entry
#   L:  - snd_interval_ratden
#   L:  - snd_midi_channel_init
#   L:  - snd_midi_channel_init_set
#   L:  - snd_pcm_playback_empty
#   L:  - snd_pcm_capture_empty
#   L:  - snd_pcm_playback_data
#   L:  - snd_pcm_capture_poll
#   L:  - snd_pcm_playback_ready
#   L:  - snd_pcm_capture_ready
#   L:  - snd_pcm_format_size
#   L:  - snd_pcm_open
#   L:  - snd_pcm_playback_poll
#   L:  - snd_pcm_playback_ready
#   L:  - snd_pcm_release
#   L:  - snd_pcm_subformat_name
#   L:  - snd_remove_proc_entry
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# include/sound/seq_midi_emul.h
#   2004/11/30 13:03:18+01:00 perex@suse.cz +0 -2
#   [ALSA] ALSA core: misc cleanups
#   
#   D:2004/11/30 20:03:13
#   C:HWDEP Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer
#   F:core/hwdep.c:1.27->1.28 
#   F:core/info.c:1.50->1.51 
#   F:core/memory.c:1.33->1.34 
#   F:core/pcm.c:1.48->1.49 
#   F:core/pcm_lib.c:1.59->1.60 
#   F:core/pcm_native.c:1.110->1.111 
#   F:core/rawmidi.c:1.49->1.50 
#   F:core/sound.c:1.68->1.69 
#   F:core/oss/mixer_oss.c:1.36->1.37 
#   F:core/oss/pcm_oss.c:1.82->1.83 
#   F:core/oss/pcm_plugin.c:1.23->1.24 
#   F:core/oss/route.c:1.10->1.11 
#   F:core/seq/seq_clientmgr.c:1.39->1.40 
#   F:core/seq/seq_clientmgr.h:1.7->1.8 
#   F:core/seq/seq_instr.c:1.11->1.12 
#   F:core/seq/seq_memory.c:1.18->1.19 
#   F:core/seq/seq_memory.h:1.4->1.5 
#   F:core/seq/seq_midi.c:1.24->1.25 
#   F:core/seq/seq_midi_emul.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_device.h:1.5->1.6 
#   F:core/seq/oss/seq_oss_init.c:1.14->1.15 
#   F:include/info.h:1.18->1.19 
#   F:include/pcm.h:1.51->1.52 
#   F:include/rawmidi.h:1.11->1.12 
#   F:include/seq_midi_emul.h:1.3->1.4 
#   L:The patch below does the following cleanups under sound/core/ :
#   L:- make needlessly global code static
#   L:- remove the following stale prototypes from pcm.h
#   L:  (the functions are not or no longer present):
#   L:  - snd_pcm_capture_ready_jiffies
#   L:  - snd_pcm_playback_ready_jiffies
#   L:- remove the following unused global functions:
#   L:  - oss/pcm_plugin.c: snd_pcm_plug_capture_channels_mask
#   L:  - seq/seq_instr.c: snd_seq_cluster_new
#   L:  - seq/seq_instr.c: snd_seq_cluster_free
#   L:- move global to static inline functions
#   L:  - pcm_lib.c: snd_pcm_playback_ready
#   L:  - pcm_lib.c: snd_pcm_capture_ready
#   L:  - pcm_lib.c: snd_pcm_playback_empty
#   L:  - pcm_lib.c: snd_pcm_capture_empty
#   L:  - pcm_lib.c: snd_pcm_playback_data
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - snd_create_proc_entry
#   L:  - snd_interval_ratden
#   L:  - snd_midi_channel_init
#   L:  - snd_midi_channel_init_set
#   L:  - snd_pcm_playback_empty
#   L:  - snd_pcm_capture_empty
#   L:  - snd_pcm_playback_data
#   L:  - snd_pcm_capture_poll
#   L:  - snd_pcm_playback_ready
#   L:  - snd_pcm_capture_ready
#   L:  - snd_pcm_format_size
#   L:  - snd_pcm_open
#   L:  - snd_pcm_playback_poll
#   L:  - snd_pcm_playback_ready
#   L:  - snd_pcm_release
#   L:  - snd_pcm_subformat_name
#   L:  - snd_remove_proc_entry
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# include/sound/rawmidi.h
#   2004/11/30 13:03:18+01:00 perex@suse.cz +0 -7
#   [ALSA] ALSA core: misc cleanups
#   
#   D:2004/11/30 20:03:13
#   C:HWDEP Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer
#   F:core/hwdep.c:1.27->1.28 
#   F:core/info.c:1.50->1.51 
#   F:core/memory.c:1.33->1.34 
#   F:core/pcm.c:1.48->1.49 
#   F:core/pcm_lib.c:1.59->1.60 
#   F:core/pcm_native.c:1.110->1.111 
#   F:core/rawmidi.c:1.49->1.50 
#   F:core/sound.c:1.68->1.69 
#   F:core/oss/mixer_oss.c:1.36->1.37 
#   F:core/oss/pcm_oss.c:1.82->1.83 
#   F:core/oss/pcm_plugin.c:1.23->1.24 
#   F:core/oss/route.c:1.10->1.11 
#   F:core/seq/seq_clientmgr.c:1.39->1.40 
#   F:core/seq/seq_clientmgr.h:1.7->1.8 
#   F:core/seq/seq_instr.c:1.11->1.12 
#   F:core/seq/seq_memory.c:1.18->1.19 
#   F:core/seq/seq_memory.h:1.4->1.5 
#   F:core/seq/seq_midi.c:1.24->1.25 
#   F:core/seq/seq_midi_emul.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_device.h:1.5->1.6 
#   F:core/seq/oss/seq_oss_init.c:1.14->1.15 
#   F:include/info.h:1.18->1.19 
#   F:include/pcm.h:1.51->1.52 
#   F:include/rawmidi.h:1.11->1.12 
#   F:include/seq_midi_emul.h:1.3->1.4 
#   L:The patch below does the following cleanups under sound/core/ :
#   L:- make needlessly global code static
#   L:- remove the following stale prototypes from pcm.h
#   L:  (the functions are not or no longer present):
#   L:  - snd_pcm_capture_ready_jiffies
#   L:  - snd_pcm_playback_ready_jiffies
#   L:- remove the following unused global functions:
#   L:  - oss/pcm_plugin.c: snd_pcm_plug_capture_channels_mask
#   L:  - seq/seq_instr.c: snd_seq_cluster_new
#   L:  - seq/seq_instr.c: snd_seq_cluster_free
#   L:- move global to static inline functions
#   L:  - pcm_lib.c: snd_pcm_playback_ready
#   L:  - pcm_lib.c: snd_pcm_capture_ready
#   L:  - pcm_lib.c: snd_pcm_playback_empty
#   L:  - pcm_lib.c: snd_pcm_capture_empty
#   L:  - pcm_lib.c: snd_pcm_playback_data
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - snd_create_proc_entry
#   L:  - snd_interval_ratden
#   L:  - snd_midi_channel_init
#   L:  - snd_midi_channel_init_set
#   L:  - snd_pcm_playback_empty
#   L:  - snd_pcm_capture_empty
#   L:  - snd_pcm_playback_data
#   L:  - snd_pcm_capture_poll
#   L:  - snd_pcm_playback_ready
#   L:  - snd_pcm_capture_ready
#   L:  - snd_pcm_format_size
#   L:  - snd_pcm_open
#   L:  - snd_pcm_playback_poll
#   L:  - snd_pcm_playback_ready
#   L:  - snd_pcm_release
#   L:  - snd_pcm_subformat_name
#   L:  - snd_remove_proc_entry
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# include/sound/pcm.h
#   2004/11/30 13:03:18+01:00 perex@suse.cz +74 -17
#   [ALSA] ALSA core: misc cleanups
#   
#   D:2004/11/30 20:03:13
#   C:HWDEP Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer
#   F:core/hwdep.c:1.27->1.28 
#   F:core/info.c:1.50->1.51 
#   F:core/memory.c:1.33->1.34 
#   F:core/pcm.c:1.48->1.49 
#   F:core/pcm_lib.c:1.59->1.60 
#   F:core/pcm_native.c:1.110->1.111 
#   F:core/rawmidi.c:1.49->1.50 
#   F:core/sound.c:1.68->1.69 
#   F:core/oss/mixer_oss.c:1.36->1.37 
#   F:core/oss/pcm_oss.c:1.82->1.83 
#   F:core/oss/pcm_plugin.c:1.23->1.24 
#   F:core/oss/route.c:1.10->1.11 
#   F:core/seq/seq_clientmgr.c:1.39->1.40 
#   F:core/seq/seq_clientmgr.h:1.7->1.8 
#   F:core/seq/seq_instr.c:1.11->1.12 
#   F:core/seq/seq_memory.c:1.18->1.19 
#   F:core/seq/seq_memory.h:1.4->1.5 
#   F:core/seq/seq_midi.c:1.24->1.25 
#   F:core/seq/seq_midi_emul.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_device.h:1.5->1.6 
#   F:core/seq/oss/seq_oss_init.c:1.14->1.15 
#   F:include/info.h:1.18->1.19 
#   F:include/pcm.h:1.51->1.52 
#   F:include/rawmidi.h:1.11->1.12 
#   F:include/seq_midi_emul.h:1.3->1.4 
#   L:The patch below does the following cleanups under sound/core/ :
#   L:- make needlessly global code static
#   L:- remove the following stale prototypes from pcm.h
#   L:  (the functions are not or no longer present):
#   L:  - snd_pcm_capture_ready_jiffies
#   L:  - snd_pcm_playback_ready_jiffies
#   L:- remove the following unused global functions:
#   L:  - oss/pcm_plugin.c: snd_pcm_plug_capture_channels_mask
#   L:  - seq/seq_instr.c: snd_seq_cluster_new
#   L:  - seq/seq_instr.c: snd_seq_cluster_free
#   L:- move global to static inline functions
#   L:  - pcm_lib.c: snd_pcm_playback_ready
#   L:  - pcm_lib.c: snd_pcm_capture_ready
#   L:  - pcm_lib.c: snd_pcm_playback_empty
#   L:  - pcm_lib.c: snd_pcm_capture_empty
#   L:  - pcm_lib.c: snd_pcm_playback_data
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - snd_create_proc_entry
#   L:  - snd_interval_ratden
#   L:  - snd_midi_channel_init
#   L:  - snd_midi_channel_init_set
#   L:  - snd_pcm_playback_empty
#   L:  - snd_pcm_capture_empty
#   L:  - snd_pcm_playback_data
#   L:  - snd_pcm_capture_poll
#   L:  - snd_pcm_playback_ready
#   L:  - snd_pcm_capture_ready
#   L:  - snd_pcm_format_size
#   L:  - snd_pcm_open
#   L:  - snd_pcm_playback_poll
#   L:  - snd_pcm_playback_ready
#   L:  - snd_pcm_release
#   L:  - snd_pcm_subformat_name
#   L:  - snd_remove_proc_entry
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# include/sound/info.h
#   2004/11/30 13:03:17+01:00 perex@suse.cz +0 -9
#   [ALSA] ALSA core: misc cleanups
#   
#   D:2004/11/30 20:03:13
#   C:HWDEP Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer
#   F:core/hwdep.c:1.27->1.28 
#   F:core/info.c:1.50->1.51 
#   F:core/memory.c:1.33->1.34 
#   F:core/pcm.c:1.48->1.49 
#   F:core/pcm_lib.c:1.59->1.60 
#   F:core/pcm_native.c:1.110->1.111 
#   F:core/rawmidi.c:1.49->1.50 
#   F:core/sound.c:1.68->1.69 
#   F:core/oss/mixer_oss.c:1.36->1.37 
#   F:core/oss/pcm_oss.c:1.82->1.83 
#   F:core/oss/pcm_plugin.c:1.23->1.24 
#   F:core/oss/route.c:1.10->1.11 
#   F:core/seq/seq_clientmgr.c:1.39->1.40 
#   F:core/seq/seq_clientmgr.h:1.7->1.8 
#   F:core/seq/seq_instr.c:1.11->1.12 
#   F:core/seq/seq_memory.c:1.18->1.19 
#   F:core/seq/seq_memory.h:1.4->1.5 
#   F:core/seq/seq_midi.c:1.24->1.25 
#   F:core/seq/seq_midi_emul.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_device.h:1.5->1.6 
#   F:core/seq/oss/seq_oss_init.c:1.14->1.15 
#   F:include/info.h:1.18->1.19 
#   F:include/pcm.h:1.51->1.52 
#   F:include/rawmidi.h:1.11->1.12 
#   F:include/seq_midi_emul.h:1.3->1.4 
#   L:The patch below does the following cleanups under sound/core/ :
#   L:- make needlessly global code static
#   L:- remove the following stale prototypes from pcm.h
#   L:  (the functions are not or no longer present):
#   L:  - snd_pcm_capture_ready_jiffies
#   L:  - snd_pcm_playback_ready_jiffies
#   L:- remove the following unused global functions:
#   L:  - oss/pcm_plugin.c: snd_pcm_plug_capture_channels_mask
#   L:  - seq/seq_instr.c: snd_seq_cluster_new
#   L:  - seq/seq_instr.c: snd_seq_cluster_free
#   L:- move global to static inline functions
#   L:  - pcm_lib.c: snd_pcm_playback_ready
#   L:  - pcm_lib.c: snd_pcm_capture_ready
#   L:  - pcm_lib.c: snd_pcm_playback_empty
#   L:  - pcm_lib.c: snd_pcm_capture_empty
#   L:  - pcm_lib.c: snd_pcm_playback_data
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - snd_create_proc_entry
#   L:  - snd_interval_ratden
#   L:  - snd_midi_channel_init
#   L:  - snd_midi_channel_init_set
#   L:  - snd_pcm_playback_empty
#   L:  - snd_pcm_capture_empty
#   L:  - snd_pcm_playback_data
#   L:  - snd_pcm_capture_poll
#   L:  - snd_pcm_playback_ready
#   L:  - snd_pcm_capture_ready
#   L:  - snd_pcm_format_size
#   L:  - snd_pcm_open
#   L:  - snd_pcm_playback_poll
#   L:  - snd_pcm_playback_ready
#   L:  - snd_pcm_release
#   L:  - snd_pcm_subformat_name
#   L:  - snd_remove_proc_entry
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 09:11:10+01:00 perex@suse.cz 
#   [ALSA] check __copy_to_user in sscape_upload_bootblock()
#   
#   Sound Scape driver
#   __copy_to_user() is called without checking its return value in
#   sound/isa/sscape.c::sscape_upload_bootblock .
#   
#   Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/isa/sscape.c
#   2004/11/30 07:37:33+01:00 perex@suse.cz +2 -1
#   [ALSA] check __copy_to_user in sscape_upload_bootblock()
#   
#   D:2004/11/30 14:37:33
#   C:Sound Scape driver
#   F:isa/sscape.c:1.17->1.18 
#   L:__copy_to_user() is called without checking its return value in
#   L:sound/isa/sscape.c::sscape_upload_bootblock .
#   Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 09:10:09+01:00 perex@suse.cz 
#   [ALSA] ifdef typos: sound_isa_es18xx.c
#   
#   ES18xx driver
#   Changed CONFIG_PNP_ to CONFIG_PNP, also fixed a comment related to
#   another CONFIG_PNP.
#   
#   Signed-off-by: Domen Puncer <domen@coderock.org>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/isa/es18xx.c
#   2004/11/30 07:34:07+01:00 perex@suse.cz +2 -2
#   [ALSA] ifdef typos: sound_isa_es18xx.c
#   
#   D:2004/11/30 14:34:07
#   C:ES18xx driver
#   F:isa/es18xx.c:1.51->1.52 
#   L:Changed CONFIG_PNP_ to CONFIG_PNP, also fixed a comment related to
#   L:another CONFIG_PNP.
#   Signed-off-by: Domen Puncer <domen@coderock.org>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 09:08:30+01:00 perex@suse.cz 
#   [ALSA] ifdef typos: sound_isa_cs423x_cs4231_lib.c
#   
#   CS4231 driver
#   Funny typo.
#   
#   Acked-by: Randy Dunlap <rddunlap@osdl.org>
#   
#   Signed-off-by: Domen Puncer <domen@coderock.org>
#   Signed-off-by: Maximilian Attems <janitor@sternwelten.at>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/isa/cs423x/cs4231_lib.c
#   2004/11/30 07:33:24+01:00 perex@suse.cz +1 -1
#   [ALSA] ifdef typos: sound_isa_cs423x_cs4231_lib.c
#   
#   D:2004/11/30 14:33:24
#   C:CS4231 driver
#   F:isa/cs423x/cs4231_lib.c:1.45->1.46 
#   L:Funny typo.
#   L:
#   L:Acked-by: Randy Dunlap <rddunlap@osdl.org>
#   Signed-off-by: Domen Puncer <domen@coderock.org>
#   Signed-off-by: Maximilian Attems <janitor@sternwelten.at>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 09:06:34+01:00 perex@suse.cz 
#   [ALSA] Fix interface type for some mixer controls
#   
#   RME96 driver
#   The interface type of some basic mixer controls is changed from
#   IFACE_PCM to IFACE_MIXER so that it can be accessed from mixer apps.
#   
#   Signed-off-by: Peter Chrisensen <peter@developers.dk>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/rme96.c
#   2004/11/29 08:03:28+01:00 perex@suse.cz +5 -5
#   [ALSA] Fix interface type for some mixer controls
#   
#   D:2004/11/29 15:03:28
#   C:RME96 driver
#   F:pci/rme96.c:1.47->1.48 
#   L:The interface type of some basic mixer controls is changed from
#   L:IFACE_PCM to IFACE_MIXER so that it can be accessed from mixer apps.
#   Signed-off-by: Peter Chrisensen <peter@developers.dk>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 09:04:45+01:00 perex@suse.cz 
#   [ALSA] Fix the interface type of mixer controls
#   
#   RME32 driver
#   The patch will change SNDRV_CTL_ELEM_IFACE_PCM to
#   SNDRV_CTL_ELEM_IFACE_MIXER for some mixer elements of rme32.
#   
#   Signed-off-by: Martin Langer <martin-langer@gmx.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/rme32.c
#   2004/11/29 08:00:58+01:00 perex@suse.cz +3 -3
#   [ALSA] Fix the interface type of mixer controls
#   
#   D:2004/11/29 15:00:58
#   C:RME32 driver
#   F:pci/rme32.c:1.50->1.51 
#   L:The patch will change SNDRV_CTL_ELEM_IFACE_PCM to
#   L:SNDRV_CTL_ELEM_IFACE_MIXER for some mixer elements of rme32.
#   Signed-off-by: Martin Langer <martin-langer@gmx.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/03 09:03:11+01:00 perex@suse.cz 
#   [ALSA] [trivial] Fix compilation warnings on 64bit
#   
#   SPARC cs4231 driver
#   Fixed the compilation warnings about the pointer size.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/sparc/cs4231.c
#   2004/11/29 07:36:33+01:00 perex@suse.cz +3 -3
#   [ALSA] [trivial] Fix compilation warnings on 64bit
#   
#   D:2004/11/29 14:36:33
#   C:SPARC cs4231 driver
#   F:sparc/cs4231.c:1.19->1.20 
#   L:Fixed the compilation warnings about the pointer size.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2005/01/02 17:51:04-08:00 nickpiggin@yahoo.com.au 
#   [PATCH] ia64 4-level pgtable fix
#   
#   Fix a 4-level page table bug that slipped through (introduced by me,
#   not Andi).
#   
#   Compiles and boots on ia64 and 2-level i386.
#   
#   Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# mm/memory.c
#   2005/01/02 16:40:56-08:00 nickpiggin@yahoo.com.au +2 -2
#   ia64 4-level pgtable fix
# 
# include/asm-ia64/pgtable.h
#   2005/01/02 16:45:04-08:00 nickpiggin@yahoo.com.au +1 -1
#   ia64 4-level pgtable fix
# 
# ChangeSet
#   2005/01/02 17:49:03-08:00 torvalds@evo.osdl.org 
#   x86 single-step: fix up comments and cleanup.
#   
#   Pretty much all the TF-related comments were stale, and
#   had been for a long time. Fix them up, clean up code.
# 
# arch/i386/kernel/traps.c
#   2005/01/02 17:48:53-08:00 torvalds@evo.osdl.org +11 -15
#   x86 single-step: fix up comments and cleanup.
#   
#   Pretty much all the TF-related comments were stale, and
#   had been for a long time. Fix them up, clean up code.
# 
# ChangeSet
#   2005/01/02 17:17:29-08:00 torvalds@ppc970.osdl.org 
#   x86 ptrace: remove long stale (and bitrotted) test for
#   PT_DTRACE without PT_PTRACED.
#   
#   Long ago, the "D" in PT_DTRACE meant "Delayed", and it was used
#   as a flag to mark that we had ptrace'd the process but no longer
#   did so. That hasn't been true in a while now, and the flag should
#   probably be renamed, but in the meantime the test for PT_PTRACED
#   being cleared had been corrupted into something totally nonsensical.
#   
#   Pointed out by Andi Kleen.
# 
# arch/i386/kernel/traps.c
#   2005/01/02 17:17:15-08:00 torvalds@ppc970.osdl.org +0 -2
#   x86 ptrace: remove long stale (and bitrotted) test for
#   PT_DTRACE without PT_PTRACED.
#   
#   Long ago, the "D" in PT_DTRACE meant "Delayed", and it was used
#   as a flag to mark that we had ptrace'd the process but no longer
#   did so. That hasn't been true in a while now, and the flag should
#   probably be renamed, but in the meantime the test for PT_PTRACED
#   being cleared had been corrupted into something totally nonsensical.
#   
#   Pointed out by Andi Kleen.
# 
# ChangeSet
#   2005/01/02 20:27:25+00:00 rmk@flint.arm.linux.org.uk 
#   [MMC] Fix UNSTUFF_BITS
#   
#   Quieten down compiler warnings, and fix an off-by-one bug when
#   deciding whether to include the next word.
# 
# drivers/mmc/mmc.c
#   2005/01/02 20:24:16+00:00 rmk@flint.arm.linux.org.uk +4 -3
#   Quieten compiler warnings.
#   Fix off-by-one bug when deciding whether to include the next word.
# 
# ChangeSet
#   2005/01/02 20:19:07+00:00 rmk@flint.arm.linux.org.uk 
#   [ARM] Add DMA mmap support for SA1100/PXA framebuffer drivers.
#   
#   Since the framebuffers are allocated via dma_alloc_writecombine() we
#   should use the DMA mmap interface to map these buffers.
#   
#   Signed-off-by: Russell King <rmk@arm.linux.org.uk>
# 
# ChangeSet
#   2005/01/02 21:17:55+01:00 kaos@ocs.com.au 
#   kallsyms: Avoid kallsyms corner case on _etext and _einittext
#   
#   Avoid kallsyms corner case on _etext and _einittext with
#   CONFIG_KALLSYMS_ALL=n.
#   
#   Signed-off-by: Keith Owens <kaos@ocs.com.au>
#   Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
# 
# scripts/kallsyms.c
#   2005/01/01 11:22:13+01:00 kaos@ocs.com.au +9 -0
#   kallsyms: Avoid kallsyms corner case on _etext and _einittext
# 
# drivers/video/sa1100fb.c
#   2005/01/02 20:16:28+00:00 rmk@flint.arm.linux.org.uk +30 -2
#   Add DMA mmap support for SA1100 FB.
# 
# drivers/video/pxafb.c
#   2005/01/02 20:16:28+00:00 rmk@flint.arm.linux.org.uk +15 -0
#   Add DMA mmap support for PXA FB.
# 
# ChangeSet
#   2005/01/02 11:45:13-08:00 torvalds@evo.osdl.org 
#   acpi video device enumeration: fix incorrect device list allocation
#   
#   It didn't allocate space for the final terminating entry,
#   which caused it to overwrite the next slab entry, which in turn
#   sometimes ended up being a slab array cache pointer. End result:
#   total slab cache corruption at a random time afterwards. Very
#   nasty.
# 
# drivers/acpi/video.c
#   2005/01/02 11:45:03-08:00 torvalds@evo.osdl.org +1 -1
#   acpi video device enumeration: fix incorrect device list allocation
#   
#   It didn't allocate space for the final terminating entry,
#   which caused it to overwrite the next slab entry, which in turn
#   sometimes ended up being a slab array cache pointer. End result:
#   total slab cache corruption at a random time afterwards. Very
#   nasty.
# 
# ChangeSet
#   2005/01/02 10:49:42-08:00 viro@parcelfarce.linux.theplanet.co.uk 
#   [PATCH] diskonchip missing iomem annotations
#   
#   some trivial iomem annotations were still missing
#   
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/mtd/doc2000.h
#   2004/12/29 12:36:39-08:00 viro@parcelfarce.linux.theplanet.co.uk +2 -2
#   diskonchip missing iomem annotations
# 
# drivers/mtd/nand/diskonchip.c
#   2004/12/29 12:36:39-08:00 viro@parcelfarce.linux.theplanet.co.uk +2 -2
#   diskonchip missing iomem annotations
# 
# drivers/mtd/devices/docprobe.c
#   2004/12/29 12:36:39-08:00 viro@parcelfarce.linux.theplanet.co.uk +8 -8
#   diskonchip missing iomem annotations
# 
# drivers/mtd/devices/doc2001plus.c
#   2004/12/29 12:36:39-08:00 viro@parcelfarce.linux.theplanet.co.uk +3 -3
#   diskonchip missing iomem annotations
# 
# drivers/mtd/devices/doc2001.c
#   2004/12/29 12:36:39-08:00 viro@parcelfarce.linux.theplanet.co.uk +3 -3
#   diskonchip missing iomem annotations
# 
# drivers/mtd/devices/doc2000.c
#   2004/12/29 12:36:39-08:00 viro@parcelfarce.linux.theplanet.co.uk +4 -4
#   diskonchip missing iomem annotations
# 
# ChangeSet
#   2005/01/02 10:49:27-08:00 viro@parcelfarce.linux.theplanet.co.uk 
#   [PATCH] pc300 portability fixes
#   
#   local variable used to store flags after spin_lock_irqsave() should be
#   unsigned long, not u32.  That should complete the 64bit cleanups in
#   there.
#   
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/net/wan/pc300_drv.c
#   2004/12/29 11:25:16-08:00 viro@parcelfarce.linux.theplanet.co.uk +5 -5
#   pc300 portability fixes
# 
# ChangeSet
#   2005/01/02 10:49:14-08:00 viro@parcelfarce.linux.theplanet.co.uk 
#   [PATCH] ppc uaccess annotations
#   
#    - get_user() __gu_val should be unsigned long (same as with i386 patch)
#    - __copy_to_user() et.al. didn't have proper type checking
#    - documented the casts in __copy_tofrom_user() calls with __force.
#   
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-ppc/uaccess.h
#   2004/12/29 11:25:16-08:00 viro@parcelfarce.linux.theplanet.co.uk +18 -10
#   ppc uaccess annotations
# 
# ChangeSet
#   2005/01/02 10:47:03-08:00 rusty@rustcorp.com.au 
#   [PATCH] Fix cleanup path when sysctl registration fails
#   
#   nfsim gains sysctl support, and sure enough, --failtest uncovered an
#   unregister when the registration had failed.
#   
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# net/ipv4/netfilter/ip_conntrack_standalone.c
#   2004/12/30 00:18:29-08:00 rusty@rustcorp.com.au +3 -1
#   Fix cleanup path when sysctl registration fails
# 
# ChangeSet
#   2005/01/02 10:46:04-08:00 rusty@rustcorp.com.au 
#   [PATCH] Fix proc removal in ip_conntrack_standalone
#   
#   Someone thought it would be clever if proc code ignores removal of
#   non-existent entries.  Hence, we missed that /proc/net/stat/ip_conntrack
#   is never removed on module removal or init failure.
#   
#   Found by nfsim.
#   
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# net/ipv4/netfilter/ip_conntrack_standalone.c
#   2004/12/29 22:39:53-08:00 rusty@rustcorp.com.au +2 -2
#   Fix proc removal in ip_conntrack_standalone
# 
# ChangeSet
#   2005/01/02 09:49:29-08:00 rddunlap@osdl.org 
#   [PATCH] parport_pc: don't mix module parameter styles
#   
#   Somehow parport_pc.c ended up with mixed old-style and new-style module
#   parameters, but mixing them is not allowed.
#   
#   Use module_param() instead of MODULE_PARM() -- cannot be mixed.
#   
#   Signed-off-by: Randy Dunlap <rddunlap@osdl.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/parport/parport_pc.c
#   2005/01/02 01:37:36-08:00 rddunlap@osdl.org +2 -2
#   parport_pc: don't mix module parameter styles
# 
# ChangeSet
#   2005/01/02 09:49:16-08:00 wli@holomorphy.com 
#   [PATCH] sparc32: fix blank screen problem in cg6.c
#   
#   Although the CG6 framebuffer is detected and initialized, without this
#   patch all it displays is a blank screen. Tested on an Ultra 1 with a
#   TGX+.
#   
#   Originally from Bob Breuer for the CG14.
#   
#   Signed-off-by: Adam Kropelin <akropel1@rochester.rr.com>
#   Acked-by: William Irwin <wli@holomorphy.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/video/cg6.c
#   2005/01/02 01:37:36-08:00 wli@holomorphy.com +4 -0
#   sparc32: fix blank screen problem in cg6.c
# 
# ChangeSet
#   2005/01/02 09:49:03-08:00 wli@holomorphy.com 
#   [PATCH] sparc32: remove conflicting definition of _exit()
#   
#   sparc32 had a conflicting _exit, removed the line from asm-
#   sparc/unistd.h. This is the same change that DaveM made to sparc64 here:
#   http://linux.bkbits.net:8080/linux-2.6/diffs/include/asm-
#   sparc64/unistd.h@1.33
#   
#   Warning was:
#   In file included from include/linux/unistd.h:9,
#                    from init/main.c:45:
#   include/asm/unistd.h:489: warning: conflicting types for built-in
#   function '_exit'
#   
#   Signed-off-by: Tom 'spot' Callaway <tcallawa@redhat.com>
#   Acked-by: William Irwin <wli@holomorphy.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-sparc/unistd.h
#   2005/01/02 01:37:36-08:00 wli@holomorphy.com +0 -1
#   sparc32: remove conflicting definition of _exit()
# 
# ChangeSet
#   2005/01/02 09:48:52-08:00 wli@holomorphy.com 
#   [PATCH] sparc32: fix incomplete irqreturn_t sweep in include/asm-sparc/floppy.h
#   
#   Squelch the floppy compile warning:
#   
#   include/asm/floppy.h: In function `sun_fd_request_irq':
#   include/asm/floppy.h:276: warning: passing arg 2 of `request_fast_irq'
#   from incompatible pointer type
#   
#   Signed-off-by: Tom 'spot' Callaway <tcallawa@redhat.com>
#   Acked-by: William Irwin <wli@holomorphy.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-sparc/floppy.h
#   2005/01/02 01:37:36-08:00 wli@holomorphy.com +1 -1
#   sparc32: fix incomplete irqreturn_t sweep in include/asm-sparc/floppy.h
# 
# ChangeSet
#   2005/01/02 09:48:39-08:00 wli@holomorphy.com 
#   [PATCH] sparc32: fix missing handling for VM fault codes
#   
#   Fix missing cases for vm fault codes in sparc32 fault handling, and
#   convert the entire file to using symbolic fault codes. This fixes a
#   latent bug where an allocation failure returns to the kernel instead of
#   delivering an error as expected.
#   
#   Signed-off-by: William Irwin <wli@holomorphy.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/sparc/mm/fault.c
#   2005/01/02 01:37:36-08:00 wli@holomorphy.com +12 -8
#   sparc32: fix missing handling for VM fault codes
# 
# ChangeSet
#   2005/01/02 09:48:26-08:00 wli@holomorphy.com 
#   [PATCH] sparc32: fix sbus rtc warnings
#   
#   Add a sparc #ifdef to drivers/char/rtc.c and iomem annotations to
#   drivers/sbus/char/rtc.c
#   
#   Signed-off-by: William Irwin <wli@holomorphy.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/sbus/char/rtc.c
#   2005/01/02 01:37:35-08:00 wli@holomorphy.com +3 -2
#   sparc32: fix sbus rtc warnings
# 
# drivers/char/rtc.c
#   2005/01/02 01:37:35-08:00 wli@holomorphy.com +1 -1
#   sparc32: fix sbus rtc warnings
# 
# ChangeSet
#   2005/01/02 09:48:13-08:00 wli@holomorphy.com 
#   [PATCH] sparc32: unused variable in sunsu.c
#   
#   serio is unused except in the #ifdef CONFIG_SERIO paths. To kill the
#   warning, make the declaration conditional on the same.
#   
#   Signed-off-by: William Irwin <wli@holomorphy.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/serial/sunsu.c
#   2005/01/02 01:37:35-08:00 wli@holomorphy.com +2 -0
#   sparc32: unused variable in sunsu.c
# 
# ChangeSet
#   2005/01/02 09:48:00-08:00 wli@holomorphy.com 
#   [PATCH] sparc32: arch/sparc/kernel/pcic.c iomem annotations
#   
#   arch/sparc/kernel/pcic.c trips numerous warnings due to iomem
#   annotations. This patch adds various needed iomem annotations.
#   
#   Signed-off-by: William Irwin <wli@holomorphy.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-sparc/pcic.h
#   2005/01/02 01:37:35-08:00 wli@holomorphy.com +3 -3
#   sparc32: arch/sparc/kernel/pcic.c iomem annotations
# 
# include/asm-sparc/io.h
#   2005/01/02 01:37:35-08:00 wli@holomorphy.com +6 -6
#   sparc32: arch/sparc/kernel/pcic.c iomem annotations
# 
# arch/sparc/kernel/pcic.c
#   2005/01/02 01:37:35-08:00 wli@holomorphy.com +10 -11
#   sparc32: arch/sparc/kernel/pcic.c iomem annotations
# 
# ChangeSet
#   2005/01/02 09:47:47-08:00 wli@holomorphy.com 
#   [PATCH] sparc32: fix missing return value for svr4_setcontext()
#   
#   sparc32 svr4_setcontext() needs to return a value in the SIGSEGV path.
#   
#   Signed-off-by: William Irwin <wli@holomorphy.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/sparc/kernel/signal.c
#   2005/01/02 01:37:35-08:00 wli@holomorphy.com +1 -0
#   sparc32: fix missing return value for svr4_setcontext()
# 
# ChangeSet
#   2005/01/02 09:47:34-08:00 wli@holomorphy.com 
#   [PATCH] sparc32: fix initrd memcpy problem
#   
#   The latter hunk of the forwarded patch has already been applied, so
#   please apply the patch as it appears in the un-forwarded part. I've
#   taken some liberties in adding the Acked/Signed-off lines in what I
#   hope is an agreeable way.
#   
#   On Sun, Nov 14, 2004 at 11:16:40PM -0500, Jurij Smakov wrote:
#   > As a followup: I have tried fiddling more with the memcpy() routine.
#   > Insight from Rob Radez and comments in arch/sparc/lib/blockops.S suggest,
#   > that __copy_1page assumes that the memory regions copied are aligned on a
#   > double-word boundary. I have checked, that in the cramfs case it wasn't
#   > true, the destination was not aligned on the double-word boundary. So, I
#   > have implemented a simple workaround (see patch below), which together
#   > with Bob Breuer's iommu.c fix [0] made 2.6.8 kernel to boot on my
#   > machine (SS10 with Ross Hypersparc CPU)! I also confirm, that adding the
#   > suggested fix to the srmmu.c also [1] breaks sunlance on my machine. With
#   > that "fix" the line 'eth0: Memory error, status 88c3, addr 3713ba' is
#   > displayed continuously during boot, when it comes to configuring network
#   > interfaces. The successful patch for me is:
#   
#   Acked-by: William Irwin  <wli@holomorphy.com>
#   Acked-by: Dave Miller  <davem@davemloft.net>
#   Signed-off-by: Jurij Smakov <jurij@wooyd.org>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-sparc/string.h
#   2005/01/02 01:37:35-08:00 wli@holomorphy.com +3 -0
#   sparc32: fix initrd memcpy problem
# 
# ChangeSet
#   2005/01/02 09:47:21-08:00 wli@holomorphy.com 
#   [PATCH] sparc32: sun4d update
#   
#   Chris Newport and Thomas Bogendoerfer have been working to get the
#   sun4d port functional again. This patch updates 2.6.10-rc3 to a current
#   snapshot of their work. It does the following 3 things:
#   
#   (1) add sun4d hook to sbus_bus_ranges_init()
#   (2) fix up pgd_offset() call in sun4d iommu code
#   (3) fix up sun4d's definition of current
#   
#   Signed-off-by: Chris Newport <crn@netunix.com>
#   Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
#   Acked-by: William Irwin <wli@holomorphy.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-sparc/winmacro.h
#   2005/01/02 01:37:35-08:00 wli@holomorphy.com +6 -3
#   sparc32: sun4d update
# 
# include/asm-sparc/sbus.h
#   2005/01/02 01:37:35-08:00 wli@holomorphy.com +2 -0
#   sparc32: sun4d update
# 
# include/asm-sparc/asi.h
#   2005/01/02 01:37:35-08:00 wli@holomorphy.com +2 -1
#   sparc32: sun4d update
# 
# drivers/sbus/sbus.c
#   2005/01/02 01:37:35-08:00 wli@holomorphy.com +14 -0
#   sparc32: sun4d update
# 
# arch/sparc/prom/ranges.c
#   2005/01/02 01:37:35-08:00 wli@holomorphy.com +1 -1
#   sparc32: sun4d update
# 
# arch/sparc/mm/io-unit.c
#   2005/01/02 01:37:35-08:00 wli@holomorphy.com +1 -1
#   sparc32: sun4d update
# 
# arch/sparc/kernel/sun4d_smp.c
#   2005/01/02 01:37:35-08:00 wli@holomorphy.com +5 -13
#   sparc32: sun4d update
# 
# ChangeSet
#   2005/01/02 09:47:08-08:00 wli@holomorphy.com 
#   [PATCH] sparc32: fix hypersparc dvma
#   
#   DVMA is having aliasing problems. Bob originally sent in the following
#   description:
#   
#   At some point in the past, Bob Breuer wrote:
#   > Here's the preliminary patch.  This time around, both the hme
#   > and esp drivers are working for me.  This replaces my previous
#   > patch and is against the vanilla 2.6.9 kernel.  I've tried to
#   > reduce the amount of unnecessary cache flushing, therefore this
#   > will need some testing on non-hypersparc cpus also.  It needs
#   > some cleanup yet, and will be rediffed against a later kernel.
#   > I'm looking for comments and feedback.
#   
#   This patch represents one of those subsequent rediffings.
#   
#   Signed-off-by: Bob Breuer <breuerr@mc.net>
#   Acked-by: William Irwin <wli@holomorphy.com>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-sparc/bitext.h
#   2005/01/02 01:37:34-08:00 wli@holomorphy.com +1 -0
#   sparc32: fix hypersparc dvma
# 
# arch/sparc/mm/iommu.c
#   2005/01/02 01:37:34-08:00 wli@holomorphy.com +22 -6
#   sparc32: fix hypersparc dvma
# 
# arch/sparc/lib/bitext.c
#   2005/01/02 01:37:34-08:00 wli@holomorphy.com +12 -6
#   sparc32: fix hypersparc dvma
# 
# ChangeSet
#   2005/01/02 09:46:55-08:00 akpm@osdl.org 
#   [PATCH] floppy build fix
#   
#   drivers/block/floppy.c: In function `init_module':
#   drivers/block/floppy.c:4598: error: parse error before "UTS_RELEASE"
#   
#   Not sure what went wrong here - just kill the thing.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/block/floppy.c
#   2005/01/02 01:37:34-08:00 akpm@osdl.org +0 -2
#   floppy build fix
# 
# ChangeSet
#   2005/01/02 09:46:42-08:00 akpm@osdl.org 
#   [PATCH] fix inet6_sk for non IPV6 builds again
#   
#   The recent ipv6 "fix" broke the build:
#   
#   security/selinux/avc.c: In function `avc_audit':
#   security/selinux/avc.c:581: warning: implicit declaration of function `inet6_sk'
#   security/selinux/avc.c:581: warning: initialization makes pointer from integer without a cast
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/ipv6.h
#   2005/01/02 01:37:34-08:00 akpm@osdl.org +11 -0
#   fix inet6_sk for non IPV6 builds again
# 
# ChangeSet
#   2005/01/02 09:46:29-08:00 michal@logix.cz 
#   [PATCH] Add Michal Ludvig to CREDITS
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# CREDITS
#   2005/01/02 01:37:34-08:00 michal@logix.cz +9 -0
#   Add Michal Ludvig to CREDITS
# 
# ChangeSet
#   2005/01/02 09:46:16-08:00 michal@logix.cz 
#   [PATCH] VIA PadLock compilation fixes
#   
#   This patch contains two fixes for VIA PadLock compilation with GCC 2.95.3
#   and GCC 3.4.3 (original patch was tested with 3.3.4 only).
#   
#   Signed-off-by: Michal Ludvig <michal@logix.cz>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/crypto/padlock-aes.c
#   2005/01/02 01:37:34-08:00 michal@logix.cz +14 -16
#   VIA PadLock compilation fixes
# 
# ChangeSet
#   2005/01/02 09:46:03-08:00 akpm@osdl.org 
#   [PATCH] ia64 PTRS_PER_PGD build fix
#   
#   mm/memory.c:1944:6: missing binary operator before token "long"
#   
#   The preprocessor doesn't like the typecast....
#   
#   PTRS_PER_PGD isn't used in assembly code, so this looks to be safe enough..
#   
#   This patch helps, but the ia64 build is still broken.  There is no
#   implementation of __pmd_alloc().
#   
#   Cc: Nick Piggin <nickpiggin@yahoo.com.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-ia64/pgtable.h
#   2005/01/02 01:37:13-08:00 akpm@osdl.org +1 -1
#   ia64 PTRS_PER_PGD build fix
# 
# ChangeSet
#   2005/01/02 09:45:50-08:00 akpm@osdl.org 
#   [PATCH] sparc64 pmd_offset() fix
#   
#   mm/memory.c: In function `zeromap_pud_range':
#   mm/memory.c:1053: warning: suggest parentheses around + or - inside shift
#   mm/memory.c: In function `remap_pud_range':
#   mm/memory.c:1170: warning: suggest parentheses around + or - inside shift
#   
#   Parenthesize this macro arg.
#   
#   Cc: Nick Piggin <nickpiggin@yahoo.com.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-sparc64/pgtable.h
#   2005/01/02 01:36:40-08:00 akpm@osdl.org +1 -1
#   sparc64 pmd_offset() fix
# 
# ChangeSet
#   2005/01/02 09:45:38-08:00 akpm@osdl.org 
#   [PATCH] setup_pci.c build fix
#   
#   On sparc64:
#   
#   drivers/ide/setup-pci.c:310: error: `DMA_32BIT_MASK' undeclared (first use in this function)
#   drivers/ide/setup-pci.c:310: error: (Each undeclared identifier is reported only once
#   drivers/ide/setup-pci.c:310: error: for each function it appears in.)
#   
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/ide/setup-pci.c
#   2005/01/02 01:36:39-08:00 akpm@osdl.org +1 -0
#   setup_pci.c build fix
# 
# ChangeSet
#   2005/01/02 09:40:33-08:00 rusty@rustcorp.com.au 
#   [PATCH] ipt_ECN corrupt checksum fix
#   
#   Nasty bug, caught while writing the ECN target test.  Corrupts
#   checksums of packets when target is used on them.
#   
#   Let this be a warning on the evils of casts.
#   
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# net/ipv4/netfilter/ipt_ECN.c
#   2005/01/02 02:56:47-08:00 rusty@rustcorp.com.au +1 -1
#   ipt_ECN corrupt checksum fix
# 
# ChangeSet
#   2005/01/02 20:08:59+11:00 airlied@starflyer.(none) 
#   drm: mark ffb as broken because it actually is
#   
#   The ffb driver has been broken since 2.6.8 at least, so mark it
#   as so. This also contains some fixes so it at least compiles.
#   
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/ffb_drv.h
#   2005/01/02 20:08:50+11:00 airlied@starflyer.(none) +1 -1
#   drm: mark ffb as broken because it actually is
#   
#   The ffb driver has been broken since 2.6.8 at least, so mark it
#   as so. This also contains some fixes so it at least compiles.
#   
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/ffb_drv.c
#   2005/01/02 20:08:50+11:00 airlied@starflyer.(none) +71 -26
#   drm: mark ffb as broken because it actually is
#   
#   The ffb driver has been broken since 2.6.8 at least, so mark it
#   as so. This also contains some fixes so it at least compiles.
#   
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# arch/sparc64/Kconfig
#   2005/01/02 20:08:50+11:00 airlied@starflyer.(none) +1 -1
#   drm: mark ffb as broken because it actually is
#   
#   The ffb driver has been broken since 2.6.8 at least, so mark it
#   as so. This also contains some fixes so it at least compiles.
#   
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# ChangeSet
#   2005/01/01 14:02:07-08:00 ak@suse.de 
#   [PATCH] convert x86_64 to 4 level page tables
#   
#   Converted to true 4levels.  The address space per process is expanded to
#   47bits now, the supported physical address space is 46bits. 
#   
#   Lmbench fork/exit numbers are down a few percent because it has to walk
#   much more pagetables, but some planned future optimizations will
#   hopefully recover it.
#   
#   See Documentation/x86_64/mm.txt for more details on the memory map.
#   
#   Signed-off-by: Andi Kleen <ak@suse.de>
#   
#   Converted to pud_t by Nick Piggin.
#   
#   Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-x86_64/processor.h
#   2004/12/22 01:33:05-08:00 ak@suse.de +2 -2
#   convert x86_64 to 4 level page tables
# 
# include/asm-x86_64/pgtable.h
#   2004/12/22 01:34:25-08:00 ak@suse.de +57 -83
#   convert x86_64 to 4 level page tables
# 
# include/asm-x86_64/pgalloc.h
#   2004/12/22 01:33:05-08:00 ak@suse.de +33 -5
#   convert x86_64 to 4 level page tables
# 
# include/asm-x86_64/pda.h
#   2004/12/22 01:33:05-08:00 ak@suse.de +0 -1
#   convert x86_64 to 4 level page tables
# 
# include/asm-x86_64/page.h
#   2004/12/22 01:33:05-08:00 ak@suse.de +6 -6
#   convert x86_64 to 4 level page tables
# 
# include/asm-x86_64/mmu_context.h
#   2004/12/22 01:33:05-08:00 ak@suse.de +1 -4
#   convert x86_64 to 4 level page tables
# 
# include/asm-x86_64/e820.h
#   2004/12/22 01:33:05-08:00 ak@suse.de +0 -3
#   convert x86_64 to 4 level page tables
# 
# arch/x86_64/mm/pageattr.c
#   2004/12/22 01:33:05-08:00 ak@suse.de +21 -13
#   convert x86_64 to 4 level page tables
# 
# arch/x86_64/mm/ioremap.c
#   2004/12/22 01:33:05-08:00 ak@suse.de +33 -10
#   convert x86_64 to 4 level page tables
# 
# arch/x86_64/mm/init.c
#   2004/12/22 01:33:05-08:00 ak@suse.de +46 -55
#   convert x86_64 to 4 level page tables
# 
# arch/x86_64/mm/fault.c
#   2004/12/22 01:33:05-08:00 ak@suse.de +65 -46
#   convert x86_64 to 4 level page tables
# 
# arch/x86_64/kernel/setup64.c
#   2004/12/22 01:33:05-08:00 ak@suse.de +2 -11
#   convert x86_64 to 4 level page tables
# 
# arch/x86_64/kernel/reboot.c
#   2004/12/22 01:33:05-08:00 ak@suse.de +1 -1
#   convert x86_64 to 4 level page tables
# 
# arch/x86_64/kernel/init_task.c
#   2004/12/22 01:33:05-08:00 ak@suse.de +0 -2
#   convert x86_64 to 4 level page tables
# 
# arch/x86_64/kernel/head.S
#   2004/12/22 01:33:05-08:00 ak@suse.de +0 -1
#   convert x86_64 to 4 level page tables
# 
# arch/x86_64/kernel/acpi/sleep.c
#   2004/12/22 01:33:05-08:00 ak@suse.de +6 -2
#   convert x86_64 to 4 level page tables
# 
# arch/x86_64/ia32/syscall32.c
#   2004/12/22 01:33:05-08:00 ak@suse.de +19 -12
#   convert x86_64 to 4 level page tables
# 
# Documentation/x86_64/mm.txt
#   2004/12/22 01:33:05-08:00 ak@suse.de +22 -146
#   convert x86_64 to 4 level page tables
# 
# ChangeSet
#   2005/01/01 14:01:54-08:00 nickpiggin@yahoo.com.au 
#   [PATCH] convert ia64 to generic nopud header
#   
#   Convert ia64 architecture over to handle 4 level pagetables.
#   
#   Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-ia64/tlb.h
#   2004/12/22 01:32:06-08:00 nickpiggin@yahoo.com.au +6 -0
#   convert ia64 to generic nopud header
# 
# include/asm-ia64/pgtable.h
#   2004/12/22 01:32:20-08:00 nickpiggin@yahoo.com.au +8 -8
#   convert ia64 to generic nopud header
# 
# include/asm-ia64/pgalloc.h
#   2004/12/22 01:32:06-08:00 nickpiggin@yahoo.com.au +2 -3
#   convert ia64 to generic nopud header
# 
# arch/ia64/mm/init.c
#   2004/12/22 01:32:06-08:00 nickpiggin@yahoo.com.au +12 -2
#   convert ia64 to generic nopud header
# 
# arch/ia64/mm/hugetlbpage.c
#   2004/12/22 01:32:06-08:00 nickpiggin@yahoo.com.au +14 -6
#   convert ia64 to generic nopud header
# 
# arch/ia64/mm/fault.c
#   2004/12/22 01:32:06-08:00 nickpiggin@yahoo.com.au +6 -1
#   convert ia64 to generic nopud header
# 
# ChangeSet
#   2005/01/01 14:01:39-08:00 ak@suse.de 
#   [PATCH] convert i386 to generic nopud header
#   
#   i386 works with 2 and 3 levels
#   
#   Signed-off-by: Andi Kleen <ak@suse.de>
#   
#   Converted to use pud_t by Nick Piggin
#   
#   Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-i386/pgtable.h
#   2004/12/22 01:31:49-08:00 ak@suse.de +1 -0
#   convert i386 to generic nopud header
# 
# include/asm-i386/pgtable-3level.h
#   2004/12/22 01:31:49-08:00 ak@suse.de +13 -11
#   convert i386 to generic nopud header
# 
# include/asm-i386/pgalloc.h
#   2004/12/22 01:31:49-08:00 ak@suse.de +1 -2
#   convert i386 to generic nopud header
# 
# arch/i386/mm/pgtable.c
#   2004/12/22 01:31:49-08:00 ak@suse.de +10 -2
#   convert i386 to generic nopud header
# 
# arch/i386/mm/pageattr.c
#   2004/12/22 01:31:49-08:00 ak@suse.de +10 -4
#   convert i386 to generic nopud header
# 
# arch/i386/mm/ioremap.c
#   2004/12/22 01:31:49-08:00 ak@suse.de +6 -1
#   convert i386 to generic nopud header
# 
# arch/i386/mm/init.c
#   2004/12/22 01:31:49-08:00 ak@suse.de +12 -6
#   convert i386 to generic nopud header
# 
# arch/i386/mm/hugetlbpage.c
#   2004/12/22 01:31:49-08:00 ak@suse.de +6 -2
#   convert i386 to generic nopud header
# 
# arch/i386/mm/fault.c
#   2004/12/22 01:31:49-08:00 ak@suse.de +10 -3
#   convert i386 to generic nopud header
# 
# arch/i386/kernel/vm86.c
#   2004/12/22 01:31:49-08:00 ak@suse.de +10 -1
#   convert i386 to generic nopud header
# 
# ChangeSet
#   2005/01/01 14:01:24-08:00 nickpiggin@yahoo.com.au 
#   [PATCH] introduce fallback header
#   
#   Add a temporary "fallback" header so architectures can run with the 4level
#   patgetables patch without modification. All architectures should be
#   converted to use the folding headers (include/asm-generic/pgtable-nop?d.h)
#   as soon as possible, and the fallback header removed.
#   
#   Make all architectures include the fallback header, except i386, because that
#   architecture has earlier been converted to use pgtable-nopmd.h under the 3
#   level system, which is not compatible with the fallback header.
#   
#   Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# mm/memory.c
#   2004/12/22 01:36:07-08:00 nickpiggin@yahoo.com.au +25 -0
#   introduce fallback header
# 
# include/linux/mm.h
#   2004/12/22 01:36:07-08:00 nickpiggin@yahoo.com.au +6 -0
#   introduce fallback header
# 
# include/asm-x86_64/pgtable.h
#   2004/12/22 01:38:06-08:00 nickpiggin@yahoo.com.au +2 -0
#   introduce fallback header
# 
# include/asm-v850/pgtable.h
#   2004/12/22 01:36:07-08:00 nickpiggin@yahoo.com.au +2 -0
#   introduce fallback header
# 
# include/asm-um/pgtable.h
#   2004/12/22 01:36:07-08:00 nickpiggin@yahoo.com.au +2 -0
#   introduce fallback header
# 
# include/asm-sparc64/pgtable.h
#   2004/12/22 01:36:07-08:00 nickpiggin@yahoo.com.au +2 -0
#   introduce fallback header
# 
# include/asm-generic/4level-fixup.h
#   2004/12/22 01:38:01-08:00 nickpiggin@yahoo.com.au +34 -0
#   introduce fallback header
# 
# include/asm-sparc/pgtable.h
#   2004/12/22 01:36:07-08:00 nickpiggin@yahoo.com.au +2 -0
#   introduce fallback header
# 
# include/asm-sh64/pgtable.h
#   2004/12/22 01:36:07-08:00 nickpiggin@yahoo.com.au +2 -0
#   introduce fallback header
# 
# include/asm-sh/pgtable.h
#   2004/12/22 01:36:07-08:00 nickpiggin@yahoo.com.au +2 -0
#   introduce fallback header
# 
# include/asm-s390/pgtable.h
#   2004/12/22 01:36:07-08:00 nickpiggin@yahoo.com.au +2 -0
#   introduce fallback header
# 
# include/asm-ppc64/pgtable.h
#   2004/12/22 01:36:07-08:00 nickpiggin@yahoo.com.au +2 -0
#   introduce fallback header
# 
# include/asm-ppc/pgtable.h
#   2004/12/22 01:36:07-08:00 nickpiggin@yahoo.com.au +2 -0
#   introduce fallback header
# 
# include/asm-parisc/pgtable.h
#   2004/12/22 01:36:07-08:00 nickpiggin@yahoo.com.au +2 -0
#   introduce fallback header
# 
# include/asm-mips/pgtable.h
#   2004/12/22 01:36:07-08:00 nickpiggin@yahoo.com.au +2 -0
#   introduce fallback header
# 
# include/asm-m68knommu/pgtable.h
#   2004/12/22 01:36:07-08:00 nickpiggin@yahoo.com.au +2 -0
#   introduce fallback header
# 
# include/asm-m68k/pgtable.h
#   2004/12/22 01:36:07-08:00 nickpiggin@yahoo.com.au +2 -0
#   introduce fallback header
# 
# include/asm-m32r/pgtable.h
#   2004/12/22 01:36:07-08:00 nickpiggin@yahoo.com.au +2 -0
#   introduce fallback header
# 
# include/asm-ia64/pgtable.h
#   2004/12/22 01:38:07-08:00 nickpiggin@yahoo.com.au +2 -0
#   introduce fallback header
# 
# include/asm-h8300/pgtable.h
#   2004/12/22 01:36:07-08:00 nickpiggin@yahoo.com.au +2 -0
#   introduce fallback header
# 
# include/asm-generic/tlb.h
#   2004/12/22 01:36:07-08:00 nickpiggin@yahoo.com.au +2 -0
#   introduce fallback header
# 
# include/asm-generic/4level-fixup.h
#   2004/12/22 01:38:01-08:00 nickpiggin@yahoo.com.au +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-generic/4level-fixup.h
# 
# include/asm-cris/pgtable.h
#   2004/12/22 01:36:07-08:00 nickpiggin@yahoo.com.au +2 -0
#   introduce fallback header
# 
# include/asm-arm26/pgtable.h
#   2004/12/22 01:36:07-08:00 nickpiggin@yahoo.com.au +2 -0
#   introduce fallback header
# 
# include/asm-arm/pgtable.h
#   2004/12/22 01:36:07-08:00 nickpiggin@yahoo.com.au +2 -0
#   introduce fallback header
# 
# include/asm-alpha/pgtable.h
#   2004/12/22 01:36:07-08:00 nickpiggin@yahoo.com.au +2 -0
#   introduce fallback header
# 
# ChangeSet
#   2005/01/01 14:01:09-08:00 ak@suse.de 
#   [PATCH] convert Linux to 4-level page tables
#   
#   Extend the Linux MM to 4level page tables.
#   
#   This is the core patch for mm/*, fs/*, include/linux/*
#   
#   It breaks all architectures, which will be fixed in separate patches.
#   
#   The conversion is quite straight forward.  All the functions walking the page
#   table hierarchy have been changed to deal with another level at the top.  The
#   additional level is called pml4. 
#   
#   mm/memory.c has changed a lot because it did most of the heavy lifting here.
#   Most of the changes here are extensions of the previous code.  
#   
#   Signed-off-by: Andi Kleen <ak@suse.de>
#   
#   Converted by Nick Piggin to use the pud_t 'page upper' level between pgd
#   and pmd instead of Andi's pml4 level above pgd. 
#   
#   Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# mm/vmalloc.c
#   2004/12/22 01:31:46-08:00 ak@suse.de +83 -30
#   convert Linux to 4-level page tables
# 
# mm/swapfile.c
#   2004/12/22 01:31:46-08:00 ak@suse.de +60 -21
#   convert Linux to 4-level page tables
# 
# mm/rmap.c
#   2004/12/22 01:31:46-08:00 ak@suse.de +18 -3
#   convert Linux to 4-level page tables
# 
# mm/msync.c
#   2004/12/22 01:31:46-08:00 ak@suse.de +43 -12
#   convert Linux to 4-level page tables
# 
# mm/mremap.c
#   2004/12/22 01:31:46-08:00 ak@suse.de +23 -6
#   convert Linux to 4-level page tables
# 
# mm/mprotect.c
#   2004/12/22 01:31:46-08:00 ak@suse.de +47 -18
#   convert Linux to 4-level page tables
# 
# mm/mempolicy.c
#   2004/12/22 01:31:46-08:00 ak@suse.de +17 -5
#   convert Linux to 4-level page tables
# 
# mm/memory.c
#   2004/12/22 01:35:55-08:00 ak@suse.de +317 -91
#   convert Linux to 4-level page tables
# 
# mm/fremap.c
#   2004/12/22 01:31:46-08:00 ak@suse.de +14 -4
#   convert Linux to 4-level page tables
# 
# include/linux/mm.h
#   2004/12/22 01:35:55-08:00 ak@suse.de +14 -6
#   convert Linux to 4-level page tables
# 
# fs/exec.c
#   2004/12/22 01:31:46-08:00 ak@suse.de +5 -1
#   convert Linux to 4-level page tables
# 
# drivers/char/drm/drm_memory.h
#   2004/12/22 01:31:46-08:00 ak@suse.de +2 -1
#   convert Linux to 4-level page tables
# 
# ChangeSet
#   2005/01/01 14:00:55-08:00 nickpiggin@yahoo.com.au 
#   [PATCH] introduce 4-level nopud folding header
#   
#   Generic headers to fold the 4-level pagetable into 3 levels.
#   
#   Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-generic/tlb.h
#   2004/12/22 01:35:55-08:00 nickpiggin@yahoo.com.au +6 -0
#   introduce 4-level nopud folding header
# 
# include/asm-generic/pgtable-nopud.h
#   2004/12/22 01:31:45-08:00 nickpiggin@yahoo.com.au +56 -0
#   introduce 4-level nopud folding header
# 
# include/asm-generic/pgtable-nopmd.h
#   2004/12/22 01:31:45-08:00 nickpiggin@yahoo.com.au +23 -22
#   introduce 4-level nopud folding header
# 
# include/asm-generic/pgtable-nopud.h
#   2004/12/22 01:31:45-08:00 nickpiggin@yahoo.com.au +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-generic/pgtable-nopud.h
# 
# ChangeSet
#   2005/01/01 14:00:42-08:00 nickpiggin@yahoo.com.au 
#   [PATCH] replace clear_page_tables with clear_page_range
#   
#   Rename clear_page_tables to clear_page_range. clear_page_range takes byte
#   ranges, and aggressively frees page table pages. Maybe useful to control
#   page table memory consumption on 4-level architectures (and even 3 level
#   ones).
#   
#   Possible downsides are:
#   - flush_tlb_pgtables gets called more often (only a problem for sparc64
#     AFAIKS).
#   
#   - the opportunistic "expand to fill PGDIR_SIZE hole" logic that ensures
#     something actually gets done under the old system is still in place.
#     This could sometimes make unmapping small regions more inefficient. There
#     are some other solutions to look at if this is the case though.
#   
#   Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# mm/mmap.c
#   2004/12/22 01:31:45-08:00 nickpiggin@yahoo.com.au +10 -14
#   replace clear_page_tables with clear_page_range
# 
# mm/memory.c
#   2004/12/22 01:35:56-08:00 nickpiggin@yahoo.com.au +49 -31
#   replace clear_page_tables with clear_page_range
# 
# include/linux/mm.h
#   2004/12/22 01:35:56-08:00 nickpiggin@yahoo.com.au +1 -1
#   replace clear_page_tables with clear_page_range
# 
# arch/ia64/mm/hugetlbpage.c
#   2004/12/22 01:35:53-08:00 nickpiggin@yahoo.com.au +2 -13
#   replace clear_page_tables with clear_page_range
# 
# arch/i386/mm/pgtable.c
#   2004/12/22 01:35:54-08:00 nickpiggin@yahoo.com.au +1 -1
#   replace clear_page_tables with clear_page_range
# 
# ChangeSet
#   2005/01/01 14:00:27-08:00 ak@suse.de 
#   [PATCH] split copy_page_range
#   
#   Split copy_page_range into the usual set of page table walking functions.
#   Needed to handle the complexity when moving to 4 levels.
#   
#   Signed-off-by: Andi Kleen <ak@suse.de>
#   
#   Split out from Andi Kleen's 4level patch by Nick Piggin.
#   
#   Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# mm/memory.c
#   2004/12/22 01:35:58-08:00 ak@suse.de +153 -139
#   split copy_page_range
# 
# ChangeSet
#   2005/01/01 14:00:15-08:00 nickpiggin@yahoo.com.au 
#   [PATCH] convert i386 to generic nopmd header
#   
#   Adapt the i386 architecture to use the generic 2-level folding header.
#   Just to show how it is done.
#   
#   Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-i386/pgtable.h
#   2004/12/22 01:35:54-08:00 nickpiggin@yahoo.com.au +3 -10
#   convert i386 to generic nopmd header
# 
# include/asm-i386/pgtable-3level.h
#   2004/12/22 01:35:54-08:00 nickpiggin@yahoo.com.au +11 -0
#   convert i386 to generic nopmd header
# 
# include/asm-i386/pgtable-2level.h
#   2004/12/22 01:31:43-08:00 nickpiggin@yahoo.com.au +8 -25
#   convert i386 to generic nopmd header
# 
# include/asm-i386/pgtable-2level-defs.h
#   2004/12/22 01:31:43-08:00 nickpiggin@yahoo.com.au +0 -2
#   convert i386 to generic nopmd header
# 
# include/asm-i386/pgalloc.h
#   2004/12/22 01:35:54-08:00 nickpiggin@yahoo.com.au +7 -10
#   convert i386 to generic nopmd header
# 
# include/asm-i386/page.h
#   2004/12/22 01:31:43-08:00 nickpiggin@yahoo.com.au +2 -4
#   convert i386 to generic nopmd header
# 
# include/asm-i386/mmzone.h
#   2004/12/22 01:31:44-08:00 nickpiggin@yahoo.com.au +0 -1
#   convert i386 to generic nopmd header
# 
# ChangeSet
#   2005/01/01 14:00:01-08:00 nickpiggin@yahoo.com.au 
#   [PATCH] generic 3-level nopmd folding header
#   
#   Generic headers to fold the 3-level pagetable into 2 levels.
#   
#   Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-generic/pgtable-nopmd.h
#   2004/12/22 01:35:57-08:00 nickpiggin@yahoo.com.au +59 -0
#   generic 3-level nopmd folding header
# 
# include/asm-generic/pgtable-nopmd.h
#   2004/12/22 01:35:57-08:00 nickpiggin@yahoo.com.au +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/include/asm-generic/pgtable-nopmd.h
# 
# ChangeSet
#   2005/01/01 13:59:48-08:00 nickpiggin@yahoo.com.au 
#   [PATCH] parentheses to x86-64 macro
#   
#   Add parentheses to x86-64's pgd_index's arguments
#   
#   Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-x86_64/pgtable.h
#   2004/12/22 01:35:55-08:00 nickpiggin@yahoo.com.au +1 -1
#   parentheses to x86-64 macro
# 
# ChangeSet
#   2005/01/01 13:47:42-08:00 torvalds@evo.osdl.org 
#   x86: single-step over "popf" without corrupting state.
#   
#   This still leaves "pushf" able to see that somebody is
#   single-stepping us, but that is at least something you
#   can work around.
# 
# arch/i386/kernel/ptrace.c
#   2005/01/01 13:47:31-08:00 torvalds@evo.osdl.org +83 -1
#   x86: single-step over "popf" without corrupting state.
#   
#   This still leaves "pushf" able to see that somebody is
#   single-stepping us, but that is at least something you
#   can work around.
# 
# ChangeSet
#   2005/01/01 13:11:08-08:00 torvalds@evo.osdl.org 
#   x86: be a lot more careful about TF handling.
#   
#   This should fix Wine for some games that otherwise
#   seem to think that they run under a debugger.
# 
# arch/i386/kernel/traps.c
#   2005/01/01 13:10:57-08:00 torvalds@evo.osdl.org +11 -2
#   x86: be a lot more careful about TF handling.
#   
#   This should fix Wine for some games that otherwise
#   seem to think that they run under a debugger.
# 
# arch/i386/kernel/signal.c
#   2005/01/01 13:10:57-08:00 torvalds@evo.osdl.org +7 -21
#   x86: be a lot more careful about TF handling.
#   
#   This should fix Wine for some games that otherwise
#   seem to think that they run under a debugger.
# 
# arch/i386/kernel/ptrace.c
#   2005/01/01 13:10:57-08:00 torvalds@evo.osdl.org +27 -8
#   x86: be a lot more careful about TF handling.
#   
#   This should fix Wine for some games that otherwise
#   seem to think that they run under a debugger.
# 
# ChangeSet
#   2005/01/01 12:24:01-08:00 torvalds@evo.osdl.org 
#   x86: common send_sigtrap helper for debug event SIGTRAP's,
#   and use that for system call single-step events.
#   
#   This one also gets the user mode test right, and makes sure
#   the siginfo is not leaking any stack contents.
# 
# include/asm-i386/ptrace.h
#   2005/01/01 12:23:50-08:00 torvalds@evo.osdl.org +2 -0
#   x86: common send_sigtrap helper for debug event SIGTRAP's,
#   and use that for system call single-step events.
#   
#   This one also gets the user mode test right, and makes sure
#   the siginfo is not leaking any stack contents.
# 
# arch/i386/kernel/traps.c
#   2005/01/01 12:23:50-08:00 torvalds@evo.osdl.org +1 -13
#   x86: common send_sigtrap helper for debug event SIGTRAP's,
#   and use that for system call single-step events.
#   
#   This one also gets the user mode test right, and makes sure
#   the siginfo is not leaking any stack contents.
# 
# arch/i386/kernel/ptrace.c
#   2005/01/01 12:23:50-08:00 torvalds@evo.osdl.org +27 -5
#   x86: common send_sigtrap helper for debug event SIGTRAP's,
#   and use that for system call single-step events.
#   
#   This one also gets the user mode test right, and makes sure
#   the siginfo is not leaking any stack contents.
# 
# ChangeSet
#   2005/01/01 12:21:12-08:00 torvalds@evo.osdl.org 
#   Now that sparse looks into asms, fix the fake anti-optimizer cast
#   macro to use the right address space.
# 
# include/asm-i386/uaccess.h
#   2005/01/01 12:21:02-08:00 torvalds@evo.osdl.org +1 -1
#   Now that sparse looks into asms, fix the fake anti-optimizer cast
#   macro to use the right address space.
# 
# ChangeSet
#   2005/01/01 19:02:55+00:00 rmk@flint.arm.linux.org.uk 
#   [ARM] Remove static mapping for RTC on Integrator/AP
# 
# arch/arm/mach-integrator/integrator_ap.c
#   2005/01/01 18:59:49+00:00 rmk@flint.arm.linux.org.uk +0 -2
#   Remove static mapping for RTC
# 
# ChangeSet
#   2005/01/01 18:08:52+00:00 rmk@flint.arm.linux.org.uk 
#   [ARM] Update Integrator RTC driver.
#   
#   This updates the Integrator RTC driver to use the ARM common RTC
#   interface, and converts the driver to behave as a standard AMBA
#   peripheral driver.
# 
# arch/arm/mach-integrator/time.c
#   2005/01/01 18:06:08+00:00 rmk@flint.arm.linux.org.uk +180 -15
#   Convert integrator RTC driver to use common rtc interface and
#   convert to a standard AMBA driver.
# 
# ChangeSet
#   2005/01/01 16:29:07+00:00 dsaxena@net.rmk.(none) 
#   [ARM PATCH] 2338/1: IXP465 and IXDPG465 header file updates
#   
#   Patch from Deepak Saxena
#   
#   Update IXP4xx header files with new registers for IXP46x CPU family.
#   
#   Replaces 2306/1
#   
#   Signed-off-by: Deepak Saxena
#   Signed-off-by: Russell King
# 
# include/asm-arm/arch-ixp4xx/ixp4xx-regs.h
#   2004/12/30 19:13:53+00:00 dsaxena@net.rmk.(none) +32 -0
#   [PATCH] 2338/1: IXP465 and IXDPG465 header file updates
# 
# include/asm-arm/arch-ixp4xx/irqs.h
#   2004/12/30 19:13:53+00:00 dsaxena@net.rmk.(none) +21 -1
#   [PATCH] 2338/1: IXP465 and IXDPG465 header file updates
# 
# include/asm-arm/arch-ixp4xx/hardware.h
#   2004/12/30 19:13:53+00:00 dsaxena@net.rmk.(none) +7 -0
#   [PATCH] 2338/1: IXP465 and IXDPG465 header file updates
# 
# include/asm-arm/arch-ixp4xx/entry-macro.S
#   2004/12/30 19:13:46+00:00 dsaxena@net.rmk.(none) +13 -0
#   [PATCH] 2338/1: IXP465 and IXDPG465 header file updates
# 
# ChangeSet
#   2005/01/01 23:20:59+11:00 airlied@starflyer.(none) 
#   drm: core changes broke i810/830
#   
#   Reported by Joseph Fannin during -mm, revert incorrect change.
#   
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/i830_drv.c
#   2005/01/01 23:20:50+11:00 airlied@starflyer.(none) +1 -1
#   drm: core changes broke i810/830
#   
#   Reported by Joseph Fannin during -mm, revert incorrect change.
#   
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/i810_drv.c
#   2005/01/01 23:20:50+11:00 airlied@starflyer.(none) +1 -1
#   drm: core changes broke i810/830
#   
#   Reported by Joseph Fannin during -mm, revert incorrect change.
#   
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# ChangeSet
#   2004/12/31 18:36:38+11:00 airlied@starflyer.(none) 
#   drm: make reclaim_buffers take dev argument
#   
#   Allow drivers to override reclaim_buffers in an OS-independent 
#   way by passing drm_device_t* as first parameter, like in the
#   BSD version.
#   
#   From: Felix Kuehling <fxhuehl@gmx.de>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/i830_drv.h
#   2004/12/31 18:36:29+11:00 airlied@starflyer.(none) +1 -1
#   drm: make reclaim_buffers take dev argument
#   
#   Allow drivers to override reclaim_buffers in an OS-independent 
#   way by passing drm_device_t* as first parameter, like in the
#   BSD version.
#   
#   From: Felix Kuehling <fxhuehl@gmx.de>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/i830_dma.c
#   2004/12/31 18:36:29+11:00 airlied@starflyer.(none) +2 -4
#   drm: make reclaim_buffers take dev argument
#   
#   Allow drivers to override reclaim_buffers in an OS-independent 
#   way by passing drm_device_t* as first parameter, like in the
#   BSD version.
#   
#   From: Felix Kuehling <fxhuehl@gmx.de>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/i810_drv.h
#   2004/12/31 18:36:29+11:00 airlied@starflyer.(none) +1 -1
#   drm: make reclaim_buffers take dev argument
#   
#   Allow drivers to override reclaim_buffers in an OS-independent 
#   way by passing drm_device_t* as first parameter, like in the
#   BSD version.
#   
#   From: Felix Kuehling <fxhuehl@gmx.de>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/i810_dma.c
#   2004/12/31 18:36:29+11:00 airlied@starflyer.(none) +2 -4
#   drm: make reclaim_buffers take dev argument
#   
#   Allow drivers to override reclaim_buffers in an OS-independent 
#   way by passing drm_device_t* as first parameter, like in the
#   BSD version.
#   
#   From: Felix Kuehling <fxhuehl@gmx.de>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_fops.c
#   2004/12/31 18:36:29+11:00 airlied@starflyer.(none) +1 -1
#   drm: make reclaim_buffers take dev argument
#   
#   Allow drivers to override reclaim_buffers in an OS-independent 
#   way by passing drm_device_t* as first parameter, like in the
#   BSD version.
#   
#   From: Felix Kuehling <fxhuehl@gmx.de>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_dma.c
#   2004/12/31 18:36:29+11:00 airlied@starflyer.(none) +1 -3
#   drm: make reclaim_buffers take dev argument
#   
#   Allow drivers to override reclaim_buffers in an OS-independent 
#   way by passing drm_device_t* as first parameter, like in the
#   BSD version.
#   
#   From: Felix Kuehling <fxhuehl@gmx.de>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drmP.h
#   2004/12/31 18:36:29+11:00 airlied@starflyer.(none) +2 -2
#   drm: make reclaim_buffers take dev argument
#   
#   Allow drivers to override reclaim_buffers in an OS-independent 
#   way by passing drm_device_t* as first parameter, like in the
#   BSD version.
#   
#   From: Felix Kuehling <fxhuehl@gmx.de>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# ChangeSet
#   2004/12/31 18:24:53+11:00 airlied@starflyer.(none) 
#   drm: use spin_lock_init instead of SPIN_LOCK_UNLOCKED
#   
#   From: Jon Smirl <jonsmirl@gmail.com>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_stub.c
#   2004/12/31 18:24:45+11:00 airlied@starflyer.(none) +1 -1
#   drm: use spin_lock_init instead of SPIN_LOCK_UNLOCKED
#   
#   From: Jon Smirl <jonsmirl@gmail.com>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# ChangeSet
#   2004/12/31 18:18:54+11:00 airlied@starflyer.(none) 
#   drm: correct historic mis-attribution of copyright
#   
#   From: Keith Withwell <keithw@tungstengraphics.com>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/sis_ds.h
#   2004/12/31 18:18:45+11:00 airlied@starflyer.(none) +2 -2
#   drm: correct historic mis-attribution of copyright
#   
#   From: Keith Withwell <keithw@tungstengraphics.com>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/sis_ds.c
#   2004/12/31 18:18:45+11:00 airlied@starflyer.(none) +2 -2
#   drm: correct historic mis-attribution of copyright
#   
#   From: Keith Withwell <keithw@tungstengraphics.com>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# ChangeSet
#   2004/12/31 18:15:21+11:00 airlied@starflyer.(none) 
#   Make 1-bit fields be unsigned (no sign bit :).
#   sparse complains about them:
#   drivers/char/drm/sis_ds.h:88:12: warning: dubious one-bit signed bitfield
#   drivers/char/drm/sis_ds.h:89:16: warning: dubious one-bit signed bitfield
#   
#   Signed-off-by: Randy Dunlap <rddunlap@osdl.org>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/sis_ds.h
#   2004/12/31 18:15:12+11:00 airlied@starflyer.(none) +2 -2
#   Make 1-bit fields be unsigned (no sign bit :).
#   sparse complains about them:
#   drivers/char/drm/sis_ds.h:88:12: warning: dubious one-bit signed bitfield
#   drivers/char/drm/sis_ds.h:89:16: warning: dubious one-bit signed bitfield
#   
#   Signed-off-by: Randy Dunlap <rddunlap@osdl.org>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# ChangeSet
#   2004/12/31 12:46:36+11:00 airlied@starflyer.(none) 
#   drm: Use wbinvd macro instead of assembly for it,
#   
#   From: Stefan Dirsch <sndirsch@suse.de>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/ati_pcigart.c
#   2004/12/31 12:46:27+11:00 airlied@starflyer.(none) +1 -1
#   drm: Use wbinvd macro instead of assembly for it,
#   
#   From: Stefan Dirsch <sndirsch@suse.de>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# ChangeSet
#   2004/12/31 00:26:38+00:00 dsaxena@net.rmk.(none) 
#   [ARM PATCH] 2307/1: Add IXP46x and IXDPG465 implementation
#   
#   Patch from Deepak Saxena
#   
#   Patch adds implementation details for IXP46x CPUs and new IXDPG465
#   reference platform. 
#   
#   Signed-off-by: Deepak Saxena
#   Signed-off-by: Russell King
# 
# arch/arm/mach-ixp4xx/ixdp425-setup.c
#   2004/12/14 18:39:27+00:00 dsaxena@net.rmk.(none) +18 -0
#   [PATCH] 2307/1: Add IXP46x and IXDPG465 implementation
# 
# arch/arm/mach-ixp4xx/ixdp425-pci.c
#   2004/12/14 17:57:55+00:00 dsaxena@net.rmk.(none) +2 -3
#   [PATCH] 2307/1: Add IXP46x and IXDPG465 implementation
# 
# arch/arm/mach-ixp4xx/common.c
#   2004/12/14 17:22:07+00:00 dsaxena@net.rmk.(none) +18 -4
#   [PATCH] 2307/1: Add IXP46x and IXDPG465 implementation
# 
# arch/arm/mach-ixp4xx/common-pci.c
#   2004/12/14 03:16:53+00:00 dsaxena@net.rmk.(none) +4 -3
#   [PATCH] 2307/1: Add IXP46x and IXDPG465 implementation
# 
# arch/arm/mach-ixp4xx/Kconfig
#   2004/12/14 17:43:46+00:00 dsaxena@net.rmk.(none) +17 -1
#   [PATCH] 2307/1: Add IXP46x and IXDPG465 implementation
# 
# ChangeSet
#   2004/12/31 00:20:31+00:00 dsaxena@net.rmk.(none) 
#   [ARM PATCH] 2339/1: Don't mask IRQ_STATUS with IXP2000_VALID_IRQ_MASK
#   
#   Patch from Deepak Saxena
#   
#   Supersedes 2226/1
#   
#   According to the IXP Programmer's Reference Manual, a read from
#   IRQ_STATUS can only return '1' for IRQ sources that have been
#   explicitly enabled in IRQ_ENABLE. So if we never enable 'invalid'
#   IRQ sources, we don't actually have to mask off IRQ_STATUS with
#   IXP2000_VALID_IRQ_MASK.
#   
#   Signed-off-by: Deepak Saxena
#   Signed-off-by: Russell King
# 
# include/asm-arm/arch-ixp2000/entry-macro.S
#   2004/12/30 20:07:56+00:00 dsaxena@net.rmk.(none) +0 -5
#   [PATCH] 2339/1: Don't mask IRQ_STATUS with IXP2000_VALID_IRQ_MASK
# 
# ChangeSet
#   2004/12/31 00:14:52+00:00 rmk@flint.arm.linux.org.uk 
#   [ARM] Add missing end of comment.
# 
# include/asm-arm/arch-integrator/entry-macro.S
#   2004/12/31 00:12:02+00:00 rmk@flint.arm.linux.org.uk +1 -0
#   Add missing end of comment.
# 
# ChangeSet
#   2004/12/31 00:03:58+00:00 rmk@flint.arm.linux.org.uk 
#   [ARM] Add CLCD driver mmap method and callbacks.
#   
#   Convert CLCD driver such that boards can use the dma_mmap_*()
#   interfaces where appropriate.
#   
#   Signed-off-by: Russell King <rmk@arm.linux.org.uk>
# 
# include/asm-arm/hardware/amba_clcd.h
#   2004/12/31 00:00:46+00:00 rmk@flint.arm.linux.org.uk +5 -0
#   Add CLCD board mmap method.
# 
# drivers/video/amba-clcd.c
#   2004/12/31 00:00:46+00:00 rmk@flint.arm.linux.org.uk +18 -0
#   Add CLCD mmap support.
# 
# arch/arm/mach-versatile/core.c
#   2004/12/31 00:00:45+00:00 rmk@flint.arm.linux.org.uk +9 -0
#   Add Versatile CLCD mmap support.
# 
# arch/arm/mach-integrator/integrator_cp.c
#   2004/12/31 00:00:45+00:00 rmk@flint.arm.linux.org.uk +9 -0
#   Add Integrator/CP CLCD mmap support.
# 
# arch/arm/mach-integrator/impd1.c
#   2004/12/31 00:00:45+00:00 rmk@flint.arm.linux.org.uk +13 -0
#   Add IM-PD/1 CLCD mmap support.
# 
# ChangeSet
#   2004/12/30 15:23:01-08:00 torvalds@ppc970.osdl.org 
#   Merge bk://bart.bkbits.net/ide-2.6
#   into ppc970.osdl.org:/home/torvalds/v2.6/linux
# 
# include/linux/pci_ids.h
#   2004/12/30 15:22:56-08:00 torvalds@ppc970.osdl.org +0 -0
#   Auto merged
# 
# arch/i386/pci/irq.c
#   2004/12/30 15:22:56-08:00 torvalds@ppc970.osdl.org +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/12/30 15:21:16-08:00 acme@conectiva.com.br 
#   [PATCH] Fix net/core/sock.o build failure
#   
#   This fixes a build failure that happens when you don't select IPV6.
#   
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/ipv6.h
#   2004/12/29 14:22:45-08:00 acme@conectiva.com.br +1 -1
#   Fix net/core/sock.o build failure
# 
# ChangeSet
#   2004/12/30 22:40:35+01:00 bzolnier@trik.(none) 
#   [patch] Intel ICH7 DID's, PIRQ and PATA support
#   
#   From: Jason Gaston <jason.d.gaston@intel.com>
#   
#   This patch adds the Intel ICH7 DID's to the pci_ids.h file
#   and updates the piix driver and related files for PATA support.
#   
#   bart: this patch also adds PIRQ support
#   
#   Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
# 
# include/linux/pci_ids.h
#   2004/12/28 16:07:28+01:00 bzolnier@trik.(none) +24 -0
#   [patch] Intel ICH7 DID's, PIRQ and PATA support
# 
# drivers/ide/pci/piix.h
#   2004/12/28 16:07:28+01:00 bzolnier@trik.(none) +2 -1
#   [patch] Intel ICH7 DID's, PIRQ and PATA support
# 
# drivers/ide/pci/piix.c
#   2004/12/28 16:07:28+01:00 bzolnier@trik.(none) +3 -0
#   [patch] Intel ICH7 DID's, PIRQ and PATA support
# 
# arch/i386/pci/irq.c
#   2004/12/28 16:07:28+01:00 bzolnier@trik.(none) +2 -0
#   [patch] Intel ICH7 DID's, PIRQ and PATA support
# 
# ChangeSet
#   2004/12/30 20:29:23+01:00 bzolnier@trik.(none) 
#   [ide] make host drivers aware of the changes made to ide_setup_pci_device{s}
#   
#   - nothing clever here: the most noticeable change is the change of
#     returned value for (*init_setup) in struct ide_pci_device_s which
#     goes from void to int. Anything else is editing and checking for
#     errors in the output of the compiler;
#   - pci_disable_device() added for the error path in pci_init_sgiioc4();
#   - BUG() removed in amd74xx_probe(): good old printk() is enough.
#   
#   Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
#   Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
# 
# include/linux/ide.h
#   2004/12/29 23:58:32+01:00 bzolnier@trik.(none) +1 -1
#   [ide] make host drivers aware of the changes made to ide_setup_pci_device{s}
# 
# drivers/ide/pci/via82cxxx.c
#   2004/12/29 23:58:32+01:00 bzolnier@trik.(none) +1 -2
#   [ide] make host drivers aware of the changes made to ide_setup_pci_device{s}
# 
# drivers/ide/pci/trm290.c
#   2004/12/29 23:58:32+01:00 bzolnier@trik.(none) +1 -2
#   [ide] make host drivers aware of the changes made to ide_setup_pci_device{s}
# 
# drivers/ide/pci/triflex.c
#   2004/12/29 23:58:32+01:00 bzolnier@trik.(none) +1 -3
#   [ide] make host drivers aware of the changes made to ide_setup_pci_device{s}
# 
# drivers/ide/pci/slc90e66.c
#   2004/12/29 23:58:32+01:00 bzolnier@trik.(none) +1 -2
#   [ide] make host drivers aware of the changes made to ide_setup_pci_device{s}
# 
# drivers/ide/pci/sl82c105.c
#   2004/12/29 23:58:32+01:00 bzolnier@trik.(none) +1 -2
#   [ide] make host drivers aware of the changes made to ide_setup_pci_device{s}
# 
# drivers/ide/pci/sis5513.c
#   2004/12/29 23:58:32+01:00 bzolnier@trik.(none) +1 -2
#   [ide] make host drivers aware of the changes made to ide_setup_pci_device{s}
# 
# drivers/ide/pci/siimage.c
#   2004/12/29 23:58:32+01:00 bzolnier@trik.(none) +1 -2
#   [ide] make host drivers aware of the changes made to ide_setup_pci_device{s}
# 
# drivers/ide/pci/sgiioc4.c
#   2004/12/29 23:58:32+01:00 bzolnier@trik.(none) +15 -4
#   [ide] make host drivers aware of the changes made to ide_setup_pci_device{s}
# 
# drivers/ide/pci/serverworks.h
#   2004/12/29 23:58:32+01:00 bzolnier@trik.(none) +2 -2
#   [ide] make host drivers aware of the changes made to ide_setup_pci_device{s}
# 
# drivers/ide/pci/serverworks.c
#   2004/12/29 23:58:32+01:00 bzolnier@trik.(none) +5 -6
#   [ide] make host drivers aware of the changes made to ide_setup_pci_device{s}
# 
# drivers/ide/pci/sc1200.c
#   2004/12/29 23:58:32+01:00 bzolnier@trik.(none) +1 -2
#   [ide] make host drivers aware of the changes made to ide_setup_pci_device{s}
# 
# drivers/ide/pci/rz1000.c
#   2004/12/29 23:58:32+01:00 bzolnier@trik.(none) +1 -2
#   [ide] make host drivers aware of the changes made to ide_setup_pci_device{s}
# 
# drivers/ide/pci/piix.h
#   2004/12/29 23:58:32+01:00 bzolnier@trik.(none) +1 -1
#   [ide] make host drivers aware of the changes made to ide_setup_pci_device{s}
# 
# drivers/ide/pci/piix.c
#   2004/12/29 23:58:32+01:00 bzolnier@trik.(none) +3 -4
#   [ide] make host drivers aware of the changes made to ide_setup_pci_device{s}
# 
# drivers/ide/pci/pdc202xx_old.h
#   2004/12/29 23:58:32+01:00 bzolnier@trik.(none) +3 -3
#   [ide] make host drivers aware of the changes made to ide_setup_pci_device{s}
# 
# drivers/ide/pci/pdc202xx_old.c
#   2004/12/29 23:58:32+01:00 bzolnier@trik.(none) +11 -9
#   [ide] make host drivers aware of the changes made to ide_setup_pci_device{s}
# 
# drivers/ide/pci/pdc202xx_new.h
#   2004/12/29 23:58:32+01:00 bzolnier@trik.(none) +3 -3
#   [ide] make host drivers aware of the changes made to ide_setup_pci_device{s}
# 
# drivers/ide/pci/pdc202xx_new.c
#   2004/12/29 23:58:32+01:00 bzolnier@trik.(none) +13 -14
#   [ide] make host drivers aware of the changes made to ide_setup_pci_device{s}
# 
# drivers/ide/pci/opti621.h
#   2004/12/29 23:58:32+01:00 bzolnier@trik.(none) +1 -1
#   [ide] make host drivers aware of the changes made to ide_setup_pci_device{s}
# 
# drivers/ide/pci/opti621.c
#   2004/12/29 23:58:32+01:00 bzolnier@trik.(none) +3 -4
#   [ide] make host drivers aware of the changes made to ide_setup_pci_device{s}
# 
# drivers/ide/pci/ns87415.c
#   2004/12/29 23:58:32+01:00 bzolnier@trik.(none) +1 -2
#   [ide] make host drivers aware of the changes made to ide_setup_pci_device{s}
# 
# drivers/ide/pci/it8172.c
#   2004/12/30 20:27:27+01:00 bzolnier@trik.(none) +1 -2
#   [ide] make host drivers aware of the changes made to ide_setup_pci_device{s}
# 
# drivers/ide/pci/hpt366.h
#   2004/12/29 23:58:32+01:00 bzolnier@trik.(none) +3 -3
#   [ide] make host drivers aware of the changes made to ide_setup_pci_device{s}
# 
# drivers/ide/pci/hpt366.c
#   2004/12/29 23:58:32+01:00 bzolnier@trik.(none) +16 -17
#   [ide] make host drivers aware of the changes made to ide_setup_pci_device{s}
# 
# drivers/ide/pci/hpt34x.c
#   2004/12/29 23:58:32+01:00 bzolnier@trik.(none) +1 -2
#   [ide] make host drivers aware of the changes made to ide_setup_pci_device{s}
# 
# drivers/ide/pci/generic.c
#   2004/12/30 20:27:07+01:00 bzolnier@trik.(none) +1 -2
#   [ide] make host drivers aware of the changes made to ide_setup_pci_device{s}
# 
# drivers/ide/pci/cy82c693.c
#   2004/12/29 23:58:32+01:00 bzolnier@trik.(none) +3 -2
#   [ide] make host drivers aware of the changes made to ide_setup_pci_device{s}
# 
# drivers/ide/pci/cs5530.c
#   2004/12/29 23:58:32+01:00 bzolnier@trik.(none) +1 -2
#   [ide] make host drivers aware of the changes made to ide_setup_pci_device{s}
# 
# drivers/ide/pci/cmd64x.c
#   2004/12/29 23:58:32+01:00 bzolnier@trik.(none) +1 -2
#   [ide] make host drivers aware of the changes made to ide_setup_pci_device{s}
# 
# drivers/ide/pci/atiixp.c
#   2004/12/29 23:58:32+01:00 bzolnier@trik.(none) +1 -2
#   [ide] make host drivers aware of the changes made to ide_setup_pci_device{s}
# 
# drivers/ide/pci/amd74xx.c
#   2004/12/29 23:58:32+01:00 bzolnier@trik.(none) +6 -3
#   [ide] make host drivers aware of the changes made to ide_setup_pci_device{s}
# 
# drivers/ide/pci/alim15x3.c
#   2004/12/29 23:58:32+01:00 bzolnier@trik.(none) +1 -2
#   [ide] make host drivers aware of the changes made to ide_setup_pci_device{s}
# 
# drivers/ide/pci/aec62xx.h
#   2004/12/29 23:58:32+01:00 bzolnier@trik.(none) +2 -2
#   [ide] make host drivers aware of the changes made to ide_setup_pci_device{s}
# 
# drivers/ide/pci/aec62xx.c
#   2004/12/29 23:58:32+01:00 bzolnier@trik.(none) +5 -6
#   [ide] make host drivers aware of the changes made to ide_setup_pci_device{s}
# 
# ChangeSet
#   2004/12/30 20:16:30+01:00 bzolnier@trik.(none) 
#   [ide] propagate the error status in ide_pci_enable/ide_setup_pci_controller
#   
#   - no need to overwrite the status code returned by the pci_xyz() functions;
#   - jump into the new century and use DMA_32BIT_MASK;
#   - misc cleanup in the error paths. It should not add a huge value in
#     ide_pci_enable() due to the FIXME comment but it should not bite too hard
#     either.
#   
#   Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
#   Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
# 
# drivers/ide/setup-pci.c
#   2004/12/30 20:16:19+01:00 bzolnier@trik.(none) +37 -21
#   [ide] propagate the error status in ide_pci_enable/ide_setup_pci_controller
# 
# ChangeSet
#   2004/12/30 20:08:53+01:00 bzolnier@trik.(none) 
#   [ide] clean up error path in do_ide_setup_pci_device()
#   
#   ide_setup_pci_controller() puts the device in a PCI enabled state.
#   The patch adds a small helper to balance it when things go wrong.
#   
#   Actually the helper does not *exactly* balance the setup: if it can
#   not do a better job, ide_setup_pci_controller() may only enable some
#   BARS whereas the new counterpart will try to disable everything.
#   
#   Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
#   Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
# 
# drivers/ide/setup-pci.c
#   2004/12/29 23:42:45+01:00 bzolnier@trik.(none) +13 -2
#   [ide] clean up error path in do_ide_setup_pci_device()
# 
# ChangeSet
#   2004/12/30 19:26:14+01:00 bzolnier@trik.(none) 
#   [ide] propagation of error code in PCI IDE setup
#   
#   - Change the return value and the prototype of do_ide_setup_pci_device
#     Due to lack of appropriate return status code, the current clients of
#     do_ide_setup_pci_device() can not distinguish a failing invocation
#     from a successfull one. The patch modify do_ide_setup_pci_device() so
#     that it can propagate some of the errors from the lower layers.
#   
#   - Make ide_setup_pci_device() aware of the change and propagate the news
#     itself. I only gave a quick sight to create_proc_ide_interfaces() (and
#     ide_remove_proc_entries()) but they do seem sane and it should not matter
#     if it fails or not.
#   
#   - ide_setup_pci_devices(): mostly the same thing than ide_setup_pci_device().
#     do not look trivially suspect.
#   
#   Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
#   Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
# 
# include/linux/ide.h
#   2004/12/30 19:26:04+01:00 bzolnier@trik.(none) +2 -2
#   [ide] propagation of error code in PCI IDE setup
# 
# drivers/ide/setup-pci.c
#   2004/12/30 19:26:04+01:00 bzolnier@trik.(none) +55 -28
#   [ide] propagation of error code in PCI IDE setup
# 
# ChangeSet
#   2004/12/30 19:07:00+01:00 bzolnier@trik.(none) 
#   [ide] fix return codes in the generic PCI IDE driver
#   
#   From: Alan Cox <alan@redhat.com>
#   
#   This patch updates ide/pci/generic.c to fix the incorrect returns
#   causing PCI devices to be left reserved wrongly by the driver.
#   
#   From: Francois Romieu <romieu@fr.zoreil.com>
#   
#   Use -ENODEV instead of -EAGAIN.
#   
#   Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
# 
# drivers/ide/pci/generic.c
#   2004/12/30 19:06:50+01:00 bzolnier@trik.(none) +8 -6
#   [ide] fix return codes in the generic PCI IDE driver
# 
# ChangeSet
#   2004/12/30 19:00:56+01:00 bzolnier@trik.(none) 
#   [ide] it8172: incorrect return from it8172_init_one()
#   
#   From: Alan Cox <alan@lxorguk.ukuu.org.uk>
#   
#   Several IDE drivers return positive values as errors in the PCI setup
#   code. Unfortunately the PCI layer considers positive values as success
#   so the driver skips the device but still claims it and things then go
#   downhill.
#   
#   This fixes the IT8172 driver.
#   
#   From: Francois Romieu <romieu@fr.zoreil.com>
#   
#   Use -ENODEV instead of -EAGAIN.
#   
#   Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
# 
# drivers/ide/pci/it8172.c
#   2004/12/30 19:00:46+01:00 bzolnier@trik.(none) +1 -1
#   [ide] it8172: incorrect return from it8172_init_one()
# 
# ChangeSet
#   2004/12/30 16:55:25+00:00 rmk@flint.arm.linux.org.uk 
#   [ARM] Add DMA mmap() support.
#   
#   This adds DMA mmap() support for the ARM architecture, as discussed
#   around March 2003 on the linux-arch and linux-kernel mailing lists.
#   
#   Subsystems such as ALSA (for sample ring buffers) and video drivers
#   (for framebuffers in system memory) require this infrastructure to
#   provide userspace with an architecture clean method to mmap these
#   memory areas.
#   
#   Signed-off-by: Russell King <rmk@arm.linux.org.uk>
# 
# include/asm-arm/dma-mapping.h
#   2004/12/30 16:52:24+00:00 rmk@flint.arm.linux.org.uk +19 -0
#   Add prototypes for DMA mmap support.
# 
# arch/arm/mm/consistent.c
#   2004/12/30 16:52:24+00:00 rmk@flint.arm.linux.org.uk +55 -1
#   Add support for mmap()ing DMA regions.
# 
# ChangeSet
#   2004/12/29 17:32:38-08:00 viro@parcelfarce.linux.theplanet.co.uk 
#   [PATCH] i386 uaccess annotations
#   
#   get_user() stores result in a local variable that later gets cast to
#   integer or pointer type.  The proper type for that is unsigned long. 
#   
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-i386/uaccess.h
#   2004/12/29 11:25:15-08:00 viro@parcelfarce.linux.theplanet.co.uk +4 -2
#   i386 uaccess annotations
# 
# ChangeSet
#   2004/12/29 23:21:55+01:00 bzolnier@trik.(none) 
#   [ide] fix cleanup_module() in ide.c
#   
#   DMA should be already released by ide_unregister()
#   (unless interface is still busy).
#   
#   Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
# 
# drivers/ide/ide.c
#   2004/12/29 23:21:46+01:00 bzolnier@trik.(none) +1 -4
#   [ide] fix cleanup_module() in ide.c
# 
# ChangeSet
#   2004/12/29 23:11:22+01:00 bzolnier@trik.(none) 
#   [ide] ide-proc: kill destroy_proc_ide_interfaces()
#   
#   /proc interface entries should be already unregistered
#   by ide_unregister() (unless interface is still busy).
#   
#   Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
# 
# drivers/ide/ide-proc.c
#   2004/12/26 00:19:15+01:00 bzolnier@trik.(none) +0 -15
#   [ide] ide-proc: kill destroy_proc_ide_interfaces()
# 
# ChangeSet
#   2004/12/29 21:00:56+00:00 davis_g@com.rmk.(none) 
#   [ARM PATCH] 2327/1: Thumb ld/st alignment fault fixups
#   
#   Patch from George G. Davis
#   
#   Adds support for Thumb ld/st alignment fault fixups via conversion of
#   Thumb ld/st instruction forms into equivalent ARM instructions and
#   reusing ARM alignment fault handler for Thumb instructions. This
#   implementation was inspired by and initially based on the algorithm
#   found in gdb/sim/arm/thumbemu.c.
#   
#   I've backed out the silly 'T' suffix on PC in this version as requested
#   by RMK. At this point, I prefer to avoid making any of the other changes
#   discussed, e.g. dump_instr() for bad instruction cases, in order to get
#   the basic Thumb support change committed.
#   
#   Thanks!
#   
#   Signed-off-by: George G. Davis
#   Signed-off-by: Russell King
# 
# arch/arm/mm/alignment.c
#   2004/12/29 00:00:00+00:00 davis_g@com.rmk.(none) +145 -7
#   [PATCH] 2327/1: Thumb ld/st alignment fault fixups
# 
# ChangeSet
#   2004/12/29 20:39:53+00:00 tony@com.rmk.(none) 
#   [ARM PATCH] 2336/1: OMAP update 1/2: Arch files, take 2
#   
#   Patch from Tony Lindgren
#   
#   This patch syncs the mainline kernel with the linux-omap tree.
#   The highlights of the patch are:
#   - Add OMAP board specific low-level init functions for smc91x Ethernet
#   - DMA audio functions by Nishant Menon
#   - Remove references to OMAP specific serial.h
#   
#   This is an updated version of ARM patch 2331/1 with extra comments
#   added to the omap_get_dma_src_pos() and omap_get_dma_dst_pos() functions
#   as recommended by RMK.
#   
#   Signed-off-by: Tony Lindgren
#   Signed-off-by: Russell King
# 
# arch/arm/mach-omap/pm.c
#   2004/12/27 20:48:59+00:00 tony@com.rmk.(none) +9 -3
#   [PATCH] 2336/1: OMAP update 1/2: Arch files, take 2
# 
# arch/arm/mach-omap/dma.c
#   2004/12/27 20:46:42+00:00 tony@com.rmk.(none) +49 -4
#   [PATCH] 2336/1: OMAP update 1/2: Arch files, take 2
# 
# arch/arm/mach-omap/common.c
#   2004/12/27 22:18:34+00:00 tony@com.rmk.(none) +7 -7
#   [PATCH] 2336/1: OMAP update 1/2: Arch files, take 2
# 
# arch/arm/mach-omap/board-perseus2.c
#   2004/12/27 20:48:59+00:00 tony@com.rmk.(none) +17 -5
#   [PATCH] 2336/1: OMAP update 1/2: Arch files, take 2
# 
# arch/arm/mach-omap/board-osk.c
#   2004/12/27 22:18:34+00:00 tony@com.rmk.(none) +13 -3
#   [PATCH] 2336/1: OMAP update 1/2: Arch files, take 2
# 
# arch/arm/mach-omap/board-innovator.c
#   2004/12/27 22:18:34+00:00 tony@com.rmk.(none) +21 -8
#   [PATCH] 2336/1: OMAP update 1/2: Arch files, take 2
# 
# arch/arm/mach-omap/board-h3.c
#   2004/12/27 22:18:34+00:00 tony@com.rmk.(none) +21 -7
#   [PATCH] 2336/1: OMAP update 1/2: Arch files, take 2
# 
# arch/arm/mach-omap/board-h2.c
#   2004/12/27 22:18:34+00:00 tony@com.rmk.(none) +15 -3
#   [PATCH] 2336/1: OMAP update 1/2: Arch files, take 2
# 
# ChangeSet
#   2004/12/29 10:43:28-08:00 viro@parcelfarce.linux.theplanet.co.uk 
#   [PATCH] ppc __iomem annotations - ->cfg_addr
#   
#   ->cfg_addr is an iomem pointer; annotated as such, setup_indirect_pci()
#   cleaned up. 
#   
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-ppc/pci-bridge.h
#   2004/12/28 16:02:37-08:00 viro@parcelfarce.linux.theplanet.co.uk +2 -2
#   ppc __iomem annotations - ->cfg_addr
# 
# arch/ppc/syslib/indirect_pci.c
#   2004/12/28 16:02:37-08:00 viro@parcelfarce.linux.theplanet.co.uk +8 -8
#   ppc __iomem annotations - ->cfg_addr
# 
# arch/ppc/platforms/pmac_pci.c
#   2004/12/28 16:02:37-08:00 viro@parcelfarce.linux.theplanet.co.uk +2 -4
#   ppc __iomem annotations - ->cfg_addr
# 
# ChangeSet
#   2004/12/29 10:43:15-08:00 viro@parcelfarce.linux.theplanet.co.uk 
#   [PATCH] ppc __iomem annotations - openpic
#   
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-ppc/open_pic.h
#   2004/12/28 16:02:36-08:00 viro@parcelfarce.linux.theplanet.co.uk +2 -2
#   ppc __iomem annotations - openpic
# 
# arch/ppc/syslib/open_pic_defs.h
#   2004/12/28 16:02:36-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -1
#   ppc __iomem annotations - openpic
# 
# arch/ppc/syslib/open_pic.c
#   2004/12/28 16:02:36-08:00 viro@parcelfarce.linux.theplanet.co.uk +21 -21
#   ppc __iomem annotations - openpic
# 
# ChangeSet
#   2004/12/29 10:43:02-08:00 viro@parcelfarce.linux.theplanet.co.uk 
#   [PATCH] ppc __iomem annotations - gg2
#   
#   gg2_pci_config_base is an iomem pointer.
#   
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-ppc/gg2.h
#   2004/12/28 16:02:36-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -1
#   ppc __iomem annotations - gg2
# 
# arch/ppc/platforms/chrp_setup.c
#   2004/12/28 16:02:36-08:00 viro@parcelfarce.linux.theplanet.co.uk +4 -5
#   ppc __iomem annotations - gg2
# 
# arch/ppc/platforms/chrp_pci.c
#   2004/12/28 16:02:36-08:00 viro@parcelfarce.linux.theplanet.co.uk +4 -3
#   ppc __iomem annotations - gg2
# 
# ChangeSet
#   2004/12/29 10:42:49-08:00 viro@parcelfarce.linux.theplanet.co.uk 
#   [PATCH] ppc __iomem annotations - ->cfg_data
#   
#   struct pci_controller ->cfg_data annotated as iomem pointer; users
#   modified accordingly... 
#   
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-ppc/pci-bridge.h
#   2004/12/28 16:02:36-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -1
#   ppc __iomem annotations - ->cfg_data
# 
# arch/ppc/syslib/indirect_pci.c
#   2004/12/28 16:02:36-08:00 viro@parcelfarce.linux.theplanet.co.uk +9 -9
#   ppc __iomem annotations - ->cfg_data
# 
# arch/ppc/platforms/prep_pci.c
#   2004/12/28 16:02:36-08:00 viro@parcelfarce.linux.theplanet.co.uk +8 -8
#   ppc __iomem annotations - ->cfg_data
# 
# arch/ppc/platforms/pmac_pci.c
#   2004/12/28 16:02:36-08:00 viro@parcelfarce.linux.theplanet.co.uk +40 -42
#   ppc __iomem annotations - ->cfg_data
# 
# arch/ppc/platforms/chrp_pci.c
#   2004/12/28 16:02:36-08:00 viro@parcelfarce.linux.theplanet.co.uk +9 -10
#   ppc __iomem annotations - ->cfg_data
# 
# ChangeSet
#   2004/12/29 10:42:36-08:00 viro@parcelfarce.linux.theplanet.co.uk 
#   [PATCH] av7110_hw __user annotations fix
#   
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/media/dvb/ttpci/av7110_hw.c
#   2004/12/28 11:29:54-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -1
#   av7110_hw __user annotations fix
# 
# ChangeSet
#   2004/12/29 10:42:23-08:00 viro@parcelfarce.linux.theplanet.co.uk 
#   [PATCH] dib3000 portability fix
#   
#   size_t is %zd, not %d...
#   
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/media/dvb/frontends/dib3000-common.h
#   2004/12/28 11:29:54-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -1
#   dib3000 portability fix
# 
# ChangeSet
#   2004/12/29 10:42:10-08:00 viro@parcelfarce.linux.theplanet.co.uk 
#   [PATCH] tda80xx.c portability fix
#   
#   should include asm/irq.h, not linux/irq.h
#   
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/media/dvb/frontends/tda80xx.c
#   2004/12/28 11:29:53-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -1
#   tda80xx.c portability fix
# 
# ChangeSet
#   2004/12/29 10:41:57-08:00 viro@parcelfarce.linux.theplanet.co.uk 
#   [PATCH] more isa-ectomy
#   
#   switch to ioremap + normal iomem access primitives
#   
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/char/i8k.c
#   2004/12/28 11:07:48-08:00 viro@parcelfarce.linux.theplanet.co.uk +25 -22
#   more isa-ectomy
# 
# arch/i386/kernel/traps.c
#   2004/12/28 11:07:48-08:00 viro@parcelfarce.linux.theplanet.co.uk +3 -1
#   more isa-ectomy
# 
# arch/i386/kernel/dmi_scan.c
#   2004/12/28 11:07:48-08:00 viro@parcelfarce.linux.theplanet.co.uk +7 -6
#   more isa-ectomy
# 
# ChangeSet
#   2004/12/29 10:41:44-08:00 viro@parcelfarce.linux.theplanet.co.uk 
#   [PATCH] hotplug NULL noise removal
#   
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/pci/hotplug/pciehp_hpc.c
#   2004/12/28 11:02:33-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -1
#   hotplug NULL noise removal
# 
# ChangeSet
#   2004/12/29 10:41:31-08:00 viro@parcelfarce.linux.theplanet.co.uk 
#   [PATCH] ppc io.h annotations
#   
#    * prototypes converted to standard ones
#    * bunch of useless casts killed in ioread*/iowrite*
#   
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-ppc/io.h
#   2004/12/27 19:11:33-08:00 viro@parcelfarce.linux.theplanet.co.uk +12 -10
#   ppc io.h annotations
# 
# ChangeSet
#   2004/12/29 10:41:18-08:00 viro@parcelfarce.linux.theplanet.co.uk 
#   [PATCH] x86_64 io.h annotations
#   
#   x86-64 memcpy_toio(), memcpy_fromio(), memset_io() and read{b,w,l,q}(),
#   switched to standard prototypes. 
#   
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-x86_64/io.h
#   2004/12/27 18:56:21-08:00 viro@parcelfarce.linux.theplanet.co.uk +12 -12
#   x86_64 io.h annotations
# 
# arch/x86_64/lib/io.c
#   2004/12/27 18:56:21-08:00 viro@parcelfarce.linux.theplanet.co.uk +4 -4
#   x86_64 io.h annotations
# 
# ChangeSet
#   2004/12/29 10:41:06-08:00 viro@parcelfarce.linux.theplanet.co.uk 
#   [PATCH] cinergy __user annotations
#   
#   __user annotations in new code.
#   
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/media/dvb/cinergyT2/cinergyT2.c
#   2004/12/26 22:04:22-08:00 viro@parcelfarce.linux.theplanet.co.uk +4 -4
#   cinergy __user annotations
# 
# ChangeSet
#   2004/12/29 10:40:52-08:00 viro@parcelfarce.linux.theplanet.co.uk 
#   [PATCH] mxser annotations and compile fixes
#   
#    a) __user annotations
#    b) NULL noise removals
#    c) added missing ifdef CONFIG_PCI around the loop over mxser_pcibrds
#       during init.
#    d) declaration of CMSPAR in case if it had been undefined moved up
#       prior to the first use
#   
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/char/mxser.c
#   2004/12/26 22:04:22-08:00 viro@parcelfarce.linux.theplanet.co.uk +47 -43
#   mxser annotations and compile fixes
# 
# ChangeSet
#   2004/12/29 10:40:39-08:00 viro@parcelfarce.linux.theplanet.co.uk 
#   [PATCH] zatm fix
#   
#   Repairs the breakage introduced in gcc4 fixes.  Original had expanded
#   to
#   
#   	((struct zatm_dev *)(dev)->dev_data) = zatm_dev;
#   
#   and that's what gcc4 had complained about (cast-as-lvalue).  Proper fix is,
#   of course,
#   
#   	dev->dev_data = zatm_dev;
#   
#   What we have in 2.6.10 is
#   
#   	dev = (struct atm_dev *)zatm_dev;
#   
#   which doesn't cause complaints, but doesn't do anything good (leak + corruption
#   at the very least).
#   
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/atm/zatm.c
#   2004/12/26 22:04:22-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -1
#   zatm fix
# 
# ChangeSet
#   2004/12/29 10:40:24-08:00 viro@parcelfarce.linux.theplanet.co.uk 
#   [PATCH] affs headers cleanup
#   
#   kernel-only stuff moved from affs headers in include/linux to
#   fs/affs/affs.h; includes in fs/affs/*.c sanitized. 
#   
#   That's the patch that had been ACKed by Roman + move of function-like
#   macros from amigaffs.h (also ACKed) + removal of ancient #if 0'ed junk
#   from declaration of affs_inode_info (spotted and suggested by Roman).
#   
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/linux/amigaffs.h
#   2004/12/26 22:04:23-08:00 viro@parcelfarce.linux.theplanet.co.uk +0 -132
#   affs headers cleanup
# 
# include/linux/affs_fs.h
#   2004/12/26 22:04:23-08:00 viro@parcelfarce.linux.theplanet.co.uk +0 -89
#   affs headers cleanup
# 
# fs/affs/symlink.c
#   2004/12/26 22:04:23-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -8
#   affs headers cleanup
# 
# fs/affs/super.c
#   2004/12/26 22:04:23-08:00 viro@parcelfarce.linux.theplanet.co.uk +2 -18
#   affs headers cleanup
# 
# fs/affs/namei.c
#   2004/12/26 22:04:23-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -14
#   affs headers cleanup
# 
# fs/affs/inode.c
#   2004/12/26 22:04:23-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -21
#   affs headers cleanup
# 
# fs/affs/file.c
#   2004/12/26 22:04:23-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -18
#   affs headers cleanup
# 
# fs/affs/dir.c
#   2004/12/26 22:04:23-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -11
#   affs headers cleanup
# 
# fs/affs/affs.h
#   2004/12/29 10:40:16-08:00 viro@parcelfarce.linux.theplanet.co.uk +304 -0
# 
# fs/affs/bitmap.c
#   2004/12/26 22:04:23-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -9
#   affs headers cleanup
# 
# fs/affs/amigaffs.c
#   2004/12/26 22:04:23-08:00 viro@parcelfarce.linux.theplanet.co.uk +1 -8
#   affs headers cleanup
# 
# fs/affs/affs.h
#   2004/12/29 10:40:16-08:00 viro@parcelfarce.linux.theplanet.co.uk +0 -0
#   BitKeeper file /home/torvalds/v2.6/linux/fs/affs/affs.h
# 
# BitKeeper/deleted/.del-affs_fs_sb.h~92e539b5b05bc854
#   2004/12/29 10:40:16-08:00 viro@parcelfarce.linux.theplanet.co.uk +0 -0
#   Delete: include/linux/affs_fs_sb.h
# 
# BitKeeper/deleted/.del-affs_fs_i.h~383cf65512c8acae
#   2004/12/29 10:40:15-08:00 viro@parcelfarce.linux.theplanet.co.uk +0 -0
#   Delete: include/linux/affs_fs_i.h
# 
# ChangeSet
#   2004/12/29 09:13:40-08:00 matthew@wil.cx 
#   [IA64] Enable ForteMedia in zx1 defconfig
#   
#   Patch from Matthew Wilcox:
#   The FM801 chip is built-in to the zx2000 workstation.  There's a lot
#   of noise in the patch because the defconfig hasn't been updated in a
#   few releases.
#   
#   Tony> I tweaked a couple of other CONFIG options (enabled MCA_RECOVERY
#   and TMPFS_XATTR, disabled TCPDIAG).
#   
#   Signed-off-by: Tony Luck <tony.luck@intel.com>
# 
# arch/ia64/configs/zx1_defconfig
#   2004/12/29 09:08:14-08:00 matthew@wil.cx +195 -20
#   Enable ForteMedia in zx1 defconfig
# 
# ChangeSet
#   2004/12/29 10:25:36-06:00 domen@coderock.org 
#   JFS: delete unused file
#   
#   Remove nowhere referenced file. (egrep "filename\." didn't find anything)
#   
#   Signed-off-by: Domen Puncer <domen@coderock.org>
#   Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
# 
# BitKeeper/deleted/.del-jfs_defragfs.h~1e8a3d543f69975a
#   2004/12/29 10:20:36-06:00 shaggy@austin.ibm.com +0 -0
#   Delete: fs/jfs/jfs_defragfs.h
# 
# ChangeSet
#   2004/12/29 15:41:46+00:00 tony@com.rmk.(none) 
#   [ARM PATCH] 2329/1: Update Kconfig for OMAP processor options
#   
#   Patch from Tony Lindgren
#   
#   Updates processor specific Kconfig options for OMAP
#   
#   Signed-off-by: Tony Lindgren
#   Signed-off-by: Russell King
# 
# arch/arm/mm/Kconfig
#   2004/12/27 22:18:35+00:00 tony@com.rmk.(none) +5 -4
#   [PATCH] 2329/1: Update Kconfig for OMAP processor options
# 
# ChangeSet
#   2004/12/29 15:36:14+00:00 tony@com.rmk.(none) 
#   [ARM PATCH] 2328/1: ARM Kconfig updates for OMAP leds
#   
#   Patch from Tony Lindgren
#   
#   ARM Kconfig updates for OMAP leds
#   
#   Signed-off-by: Tony Lindgren
#   Signed-off-by: Russell King
# 
# arch/arm/Kconfig
#   2004/12/27 20:12:55+00:00 tony@com.rmk.(none) +2 -2
#   [PATCH] 2328/1: ARM Kconfig updates for OMAP leds
# 
# ChangeSet
#   2004/12/29 15:30:34+00:00 dsaxena@net.rmk.(none) 
#   [ARM PATCH] 2326/1: Fix IXP2000 timer implementation
#   
#   Patch from Deepak Saxena
#   
#   This patch fixes two issues with the IXP2000 timer implementation:
#   
#   - We currently to not account for lost timer interrupts
#   - We currently do not check for rollover within gettimeoffset()
#   
#   Signed-off-by: Deepak Saxena
#   Signed-off-by: Russell King
# 
# include/asm-arm/arch-ixp2000/ixp2000-regs.h
#   2004/12/22 23:25:34+00:00 dsaxena@net.rmk.(none) +1 -0
#   [PATCH] 2326/1: Fix IXP2000 timer implementation
# 
# arch/arm/mach-ixp2000/core.c
#   2004/12/22 21:31:45+00:00 dsaxena@net.rmk.(none) +29 -6
#   [PATCH] 2326/1: Fix IXP2000 timer implementation
# 
# ChangeSet
#   2004/12/29 15:25:09+00:00 dsaxena@net.rmk.(none) 
#   [ARM PATCH] 2325/1: Cleanup IXP2000 reset handling
#   
#   Patch from Deepak Saxena
#   
#   On IXDP2801 we need to write a magic sequence to the CPLD to ensure
#   a full system reset instead of just CPU reset. Also cleanup some
#   comments and copyrights while we are in here.
#   
#   Signed-off-by: Deepak Saxena
#   Signed-off-by: Russell King
# 
# include/asm-arm/arch-ixp2000/system.h
#   2004/12/22 21:07:23+00:00 dsaxena@net.rmk.(none) +21 -2
#   [PATCH] 2325/1: Cleanup IXP2000 reset handling
# 
# ChangeSet
#   2004/12/29 15:20:01+00:00 davis_g@com.rmk.(none) 
#   [ARM PATCH] 2324/1: Convert ARM proc files to use domain and pgtable manifest constants
#   
#   Patch from George G. Davis
#   
#   Convert ARM proc files to use manifest constants defined in pgtable.h
#   and domain.h. This is a prelude to allow renumbering domains. The
#   domain renumbering is required to implement support for ARMv6 MMU
#   super sections where domain 0 is implied. Although this is technically
#   only required for ARMv6, it seemed reasonable to clean up all proc
#   files while here.
#   
#   I did a test build with and without this patch applied and confirmed
#   that all proc file binaries are unchanged when this patch is applied.
#   
#   Signed-off-by: George G. Davis
#   Signed-off-by: Russell King
# 
# include/asm-arm/domain.h
#   2004/12/29 00:00:00+00:00 davis_g@com.rmk.(none) +3 -1
#   [PATCH] 2324/1: Convert ARM proc files to use domain and pgtable manifest constants
# 
# arch/arm/mm/proc-xscale.S
#   2004/12/29 00:00:00+00:00 davis_g@com.rmk.(none) +55 -11
#   [PATCH] 2324/1: Convert ARM proc files to use domain and pgtable manifest constants
# 
# arch/arm/mm/proc-v6.S
#   2004/12/29 00:00:00+00:00 davis_g@com.rmk.(none) +10 -2
#   [PATCH] 2324/1: Convert ARM proc files to use domain and pgtable manifest constants
# 
# arch/arm/mm/proc-sa1100.S
#   2004/12/29 00:00:00+00:00 davis_g@com.rmk.(none) +15 -3
#   [PATCH] 2324/1: Convert ARM proc files to use domain and pgtable manifest constants
# 
# arch/arm/mm/proc-sa110.S
#   2004/12/29 00:00:00+00:00 davis_g@com.rmk.(none) +10 -2
#   [PATCH] 2324/1: Convert ARM proc files to use domain and pgtable manifest constants
# 
# arch/arm/mm/proc-arm926.S
#   2004/12/29 00:00:00+00:00 davis_g@com.rmk.(none) +11 -2
#   [PATCH] 2324/1: Convert ARM proc files to use domain and pgtable manifest constants
# 
# arch/arm/mm/proc-arm925.S
#   2004/12/29 00:00:00+00:00 davis_g@com.rmk.(none) +13 -3
#   [PATCH] 2324/1: Convert ARM proc files to use domain and pgtable manifest constants
# 
# arch/arm/mm/proc-arm922.S
#   2004/12/29 00:00:00+00:00 davis_g@com.rmk.(none) +11 -2
#   [PATCH] 2324/1: Convert ARM proc files to use domain and pgtable manifest constants
# 
# arch/arm/mm/proc-arm920.S
#   2004/12/29 00:00:00+00:00 davis_g@com.rmk.(none) +11 -2
#   [PATCH] 2324/1: Convert ARM proc files to use domain and pgtable manifest constants
# 
# arch/arm/mm/proc-arm720.S
#   2004/12/29 00:00:00+00:00 davis_g@com.rmk.(none) +21 -4
#   [PATCH] 2324/1: Convert ARM proc files to use domain and pgtable manifest constants
# 
# arch/arm/mm/proc-arm6_7.S
#   2004/12/29 00:00:00+00:00 davis_g@com.rmk.(none) +15 -3
#   [PATCH] 2324/1: Convert ARM proc files to use domain and pgtable manifest constants
# 
# arch/arm/mm/proc-arm1026.S
#   2004/12/29 00:00:00+00:00 davis_g@com.rmk.(none) +9 -2
#   [PATCH] 2324/1: Convert ARM proc files to use domain and pgtable manifest constants
# 
# arch/arm/mm/proc-arm1022.S
#   2004/12/29 00:00:00+00:00 davis_g@com.rmk.(none) +9 -2
#   [PATCH] 2324/1: Convert ARM proc files to use domain and pgtable manifest constants
# 
# arch/arm/mm/proc-arm1020e.S
#   2004/12/29 00:00:00+00:00 davis_g@com.rmk.(none) +10 -2
#   [PATCH] 2324/1: Convert ARM proc files to use domain and pgtable manifest constants
# 
# arch/arm/mm/proc-arm1020.S
#   2004/12/29 00:00:00+00:00 davis_g@com.rmk.(none) +8 -2
#   [PATCH] 2324/1: Convert ARM proc files to use domain and pgtable manifest constants
# 
# ChangeSet
#   2004/12/29 15:02:36+00:00 tony@com.rmk.(none) 
#   [ARM PATCH] 2332/1: OMAP update 1/2: Include files
#   
#   Patch from Tony Lindgren
#   
#   This patch syncs the mainline kernel with the linux-omap tree.
#   The patch mostly contains minor fixes and extra register definitions
#   by various OMAP developers.
#   
#   Signed-off-by: Tony Lindgren
#   Signed-off-by: Russell King
# 
# include/asm-arm/arch-omap/omap16xx.h
#   2004/12/27 20:09:02+00:00 tony@com.rmk.(none) +2 -1
#   [PATCH] 2332/1: OMAP update 1/2: Include files
# 
# include/asm-arm/arch-omap/mux.h
#   2004/12/27 20:09:02+00:00 tony@com.rmk.(none) +12 -0
#   [PATCH] 2332/1: OMAP update 1/2: Include files
# 
# include/asm-arm/arch-omap/irqs.h
#   2004/12/27 20:09:02+00:00 tony@com.rmk.(none) +2 -0
#   [PATCH] 2332/1: OMAP update 1/2: Include files
# 
# include/asm-arm/arch-omap/hardware.h
#   2004/12/27 20:09:02+00:00 tony@com.rmk.(none) +1 -1
#   [PATCH] 2332/1: OMAP update 1/2: Include files
# 
# include/asm-arm/arch-omap/gpio.h
#   2004/12/27 20:09:02+00:00 tony@com.rmk.(none) +1 -0
#   [PATCH] 2332/1: OMAP update 1/2: Include files
# 
# include/asm-arm/arch-omap/dma.h
#   2004/12/27 20:09:02+00:00 tony@com.rmk.(none) +4 -0
#   [PATCH] 2332/1: OMAP update 1/2: Include files
# 
# ChangeSet
#   2004/12/28 23:28:15-08:00 drm.adm@bkbits.net 
#   Merge bkbits.net:/repos/l/linux/linux-2.5
#   into bkbits.net:/repos/d/drm/drm-2.6
# 
# drivers/char/drm/drm_drv.c
#   2004/12/28 23:27:40-08:00 drm.adm@bkbits.net +1 -1
#   backout conflicting changes .. will 
#   later...
# 
# drivers/char/drm/drm_drv.c
#   2004/12/28 23:23:50-08:00 drm.adm@bkbits.net +0 -0
#   Merge rename: drivers/char/drm/drm_drv.h -> drivers/char/drm/drm_drv.c
# 
# ChangeSet
#   2004/12/29 00:15:39+01:00 sam@mars.ravnborg.org 
#   kbuild: Use -isystem `gcc --print-file-name=include`
#   
#   Using "-nostdinc -isystem `gcc --print-file-name=include" let
#   us see full path to compiler specific files when compiling with make V=1
#   Furthermore it lets us use same definition for sparse (CHECKFLAGS) and the kernel.
#   Tested with gcc 3.3.4 only.
#   
#   Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
# 
# scripts/Makefile.build
#   2004/12/29 00:15:17+01:00 sam@mars.ravnborg.org +0 -1
#   This assignment is done in top-level Makefile for now
# 
# Makefile
#   2004/12/29 00:15:17+01:00 sam@mars.ravnborg.org +3 -1
#   Use full path to dir with compiler specific files
# 
# ChangeSet
#   2004/12/28 23:00:28+01:00 ahaas@airmail.net 
#   kbuild: Trivial Makefile patch
#   
#   The comment doesn't match the function name.
#   
#   From: "Art Haas" <ahaas@airmail.net>
#   Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
# 
# Makefile
#   2004/12/24 18:24:28+01:00 ahaas@airmail.net +1 -1
#   kbuild: Trivial Makefile patch
# 
# ChangeSet
#   2004/12/28 22:59:46+01:00 sam@mars.ravnborg.org 
#   kbuild: skip localversion files with '~' anywhere in their name
#   
#   Idea from:  Blaisorblade <blaisorblade_spam@yahoo.it>
#   Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
# 
# Makefile
#   2004/12/28 22:59:28+01:00 sam@mars.ravnborg.org +5 -6
#   skip localversion files with '~' anywhere in their name
# 
# ChangeSet
#   2004/12/28 13:50:56-08:00 matthew@wil.cx 
#   [IA64] Fix memcpy_fromio prototype
#   
#   Remove one layer of indirection from memcpy_fromio/memcpy_toio/memset_io
#   and fix the prototypes to be const where appropriate.
#    
#   Signed-off-by: Matthew Wilcox <matthew@wil.cx>
#   Signed-off-by: Tony Luck <tony.luck@intel.com>
# 
# include/asm-ia64/io.h
#   2004/12/28 13:49:53-08:00 matthew@wil.cx +3 -8
#   Fix memcpy_fromio prototype
# 
# arch/ia64/lib/io.c
#   2004/12/28 13:49:37-08:00 matthew@wil.cx +7 -10
#   Fix memcpy_fromio prototype
# 
# ChangeSet
#   2004/12/28 13:46:10-08:00 davidm@hpl.hp.com 
#   [IA64] Fix swiotlb some more:
#    
#   - don't fault in unmap_single() when unmapping a coherent buffer.
#   - make swiotlb_alloc_coherent() more resilient for devices with
#     weird DMA masks
#   - make swiotlb_dma_supported() return a useful value
#   
#   Signed-off-by: David Mosberger-Tang <davidm@hpl.hp.com>
#   Signed-off-by: Tony Luck <tony.luck@intel.com>
# 
# arch/ia64/lib/swiotlb.c
#   2004/12/28 13:43:39-08:00 davidm@hpl.hp.com +18 -4
#   more swiotlb fixes
# 
# ChangeSet
#   2004/12/28 22:42:36+01:00 mpm@selenic.com 
#   kbuild: make kernelrelease
#   
#   This patch makes it easy to programmatically get at the kernel
#   makefile's idea of the kernel version from external scripts and
#   makefiles with something like V=`make kernelrelease`.
#   
#   Alternatives include parsing Makefile (errorprone and broken by things
#   like localversion) and running the C preprocessor on version.h (which
#   requires a) building version.h somewhere and b) is really ugly).
#   
#   From: Matt Mackall <mpm@selenic.com>
#   Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
# 
# Makefile
#   2004/12/21 01:18:25+01:00 mpm@selenic.com +3 -0
#   kbuild: make kernelrelease
# 
# ChangeSet
#   2004/12/28 13:42:03-08:00 davidm@hpl.hp.com 
#   [IA64] contig.c: fix bug in DMA-zone initialization
#   
#   Below is a patch that fixes count_dma_pages().  Without this fix, only
#   memory areas entirely below MAX_DMA_ADDRESS are counted as DMA-pages.
#   While it doesn't really make a difference in practice (MAX_DMA_ADDRESS
#   is equal to ~0UL on zx1), it's clearly not what was intended to be
#   there.  I found the bug only because I briefly experimented with
#   lowering MAX_DMA_ADDRESS.
#   
#   Tony> The discontig.c version of this code already gets this right.
#    
#   Signed-off-by: David Mosberger-Tang <davidm@hpl.hp.com>
#   Signed-off-by: Tony Luck <tony.luck@intel.com>
# 
# arch/ia64/mm/contig.c
#   2004/12/28 13:38:55-08:00 davidm@hpl.hp.com +2 -2
#   fix bug in DMA-zone initialization
# 
# ChangeSet
#   2004/12/28 13:22:45-08:00 matthew@wil.cx 
#   [IA64] Perfmon over-initialises its inodes
#   
#   i_sb and i_sock are both initialised by alloc_inode()
#   
#   Signed-off-by: Matthew Wilcox <matthew@wil.cx>
#   Acked-by: Stephane Eranian <eranian@hpl.hp.com>
#   Signed-off-by: Tony Luck <tony.luck@intel.com>
# 
# arch/ia64/kernel/perfmon.c
#   2004/12/28 13:20:10-08:00 matthew@wil.cx +0 -2
#   i_sb and i_sock are both initialised by alloc_inode()
# 
# ChangeSet
#   2004/12/28 22:16:26+01:00 kaos@ocs.com.au 
#   kallsyms: gate page is part of the kernel, honour CONFIG_KALLSYMS_ALL
#   
#   * Treat the gate page as part of the kernel, to improve kernel backtraces.
#   
#   * Honour CONFIG_KALLSYMS_ALL, all symbols are valid, not just text.
#   
#   Signed-off-by: Keith Owens <kaos@ocs.com.au>
#   Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
# 
# kernel/kallsyms.c
#   2004/11/28 04:42:24+01:00 kaos@ocs.com.au +11 -4
#   kallsyms: gate page is part of the kernel, honour CONFIG_KALLSYMS_ALL
# 
# ChangeSet
#   2004/12/28 22:16:00+01:00 kaos@ocs.com.au 
#   kallsyms: Add in_gate_area_no_task()
#   
#   Add in_gate_area_no_task() for use in places where no task is valid
#   (e.g. kallsyms).  If you have a valid task, use in_gate_area() as
#   before.
#   
#   Signed-off-by: Keith Owens <kaos@ocs.com.au>
#   Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
# 
# ChangeSet
#   2004/12/28 13:15:44-08:00 tony.luck@intel.com 
#   [IA64] irq_ia64.c typo s/_IA64_REG_AR_SP/_IA64_REG_SP/
#   
#   Patch supplied by Sourav Sen from HP:
#     If I turn on IRQ_DEBUG in arch/ia64/kernel/irq_ia64.c in 2.6.8.1,
#     the compilation does not go thru as there isn't any _IA64_REG_AR_SP
#   
#   Signed-off-by: Tony Luck <tony.luck@intel.com>
# 
# mm/memory.c
#   2004/11/28 04:42:20+01:00 kaos@ocs.com.au +1 -1
#   kallsyms: Add in_gate_area_no_task()
# 
# include/linux/mm.h
#   2004/11/28 04:42:20+01:00 kaos@ocs.com.au +6 -0
#   kallsyms: Add in_gate_area_no_task()
# 
# arch/x86_64/mm/init.c
#   2004/11/28 04:42:20+01:00 kaos@ocs.com.au +10 -0
#   kallsyms: Add in_gate_area_no_task()
# 
# ChangeSet
#   2004/12/28 22:15:34+01:00 kaos@ocs.com.au 
#   kallsyms: Clean up x86-64 special casing of in_gate_area()
#   
#   x86-64 has special case code for in_gate_area(), but it is not clean.
#   
#   * Replace CONFIG_ARCH_GATE_AREA with __HAVE_ARCH_GATE_AREA.
#     ARCH_GATE_AREA is not a config option.
#   
#   * The definitions of get_gate_vma() and in_gate_area() are identical in
#     include/asm-x86_64/page.h and include/linux/mm.h.  Fold the duplicate
#     definitions into include/linux/mm.h.
#   
#   Does not affect kallsyms directly, this patch just creates a clean base
#   for patch 2.
#   
#   Signed-off-by: Keith Owens <kaos@ocs.com.au>
#   Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
# 
# mm/memory.c
#   2004/11/28 04:42:14+01:00 kaos@ocs.com.au +2 -2
#   kallsyms: Clean up x86-64 special casing of in_gate_area()
# 
# include/linux/mm.h
#   2004/11/28 04:42:14+01:00 kaos@ocs.com.au +0 -2
#   kallsyms: Clean up x86-64 special casing of in_gate_area()
# 
# include/asm-x86_64/page.h
#   2004/11/28 04:42:14+01:00 kaos@ocs.com.au +1 -7
#   kallsyms: Clean up x86-64 special casing of in_gate_area()
# 
# arch/ia64/kernel/irq_ia64.c
#   2004/12/28 13:12:43-08:00 tony.luck@intel.com +1 -1
#   typo s/_IA64_REG_AR_SP/_IA64_REG_SP/
# 
# ChangeSet
#   2004/12/28 22:05:31+01:00 bzolnier@trik.(none) 
#   [ide] serverworks: add support for CSB6 RAID
#   
#   From: Alan Cox <alan@lxorguk.ukuu.org.uk>
#   
#   The ServerWorks chips include a RAID variant that the 2.6 driver didn't
#   support. This enables support for this and removes a pile of #if and
#   other pointless obfuscations. This removes the need to use various
#   vendor binary only drivers for CSB6 RAID.
#   
#   Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
# 
# drivers/ide/pci/serverworks.c
#   2004/12/26 19:50:17+01:00 bzolnier@trik.(none) +2 -18
#   [ide] serverworks: add support for CSB6 RAID
# 
# ChangeSet
#   2004/12/28 20:35:01+01:00 bzolnier@trik.(none) 
#   [ide] add "ide=nodma" to documentation
#   
#   Here's a quick patch to add the currently-undocumented ide=nodma option
#   to the Documentation/ide.txt file. Since the code does not mark this
#   option as obsolete as far as I can see, I can only assume that it should
#   be in the documentation
#   
#   Signed-off-by: Vadim Lobanov <vlobanov@speakeasy.net>
#   Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
# 
# Documentation/ide.txt
#   2004/12/26 22:58:19+01:00 bzolnier@trik.(none) +2 -0
#   [ide] add "ide=nodma" to documentation
# 
# ChangeSet
#   2004/12/28 16:22:56-02:00 acme@conectiva.com.br 
#   [TCP] merge tcp_sock with tcp_opt
#   
#   No need for two structs, follow the new inet_sock layout
#   style.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/sunrpc/xprt.c
#   2004/12/28 16:22:40-02:00 acme@conectiva.com.br +1 -2
#   [TCP] merge tcp_sock with tcp_opt
#   
#   No need for two structs, follow the new inet_sock layout
#   style.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/sunrpc/svcsock.c
#   2004/12/28 16:22:40-02:00 acme@conectiva.com.br +1 -1
#   [TCP] merge tcp_sock with tcp_opt
#   
#   No need for two structs, follow the new inet_sock layout
#   style.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv6/tcp_ipv6.c
#   2004/12/28 16:22:40-02:00 acme@conectiva.com.br +14 -14
#   [TCP] merge tcp_sock with tcp_opt
#   
#   No need for two structs, follow the new inet_sock layout
#   style.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv6/ipv6_sockglue.c
#   2004/12/28 16:22:40-02:00 acme@conectiva.com.br +2 -2
#   [TCP] merge tcp_sock with tcp_opt
#   
#   No need for two structs, follow the new inet_sock layout
#   style.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/tcp_timer.c
#   2004/12/28 16:22:40-02:00 acme@conectiva.com.br +10 -10
#   [TCP] merge tcp_sock with tcp_opt
#   
#   No need for two structs, follow the new inet_sock layout
#   style.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/tcp_output.c
#   2004/12/28 16:22:40-02:00 acme@conectiva.com.br +32 -31
#   [TCP] merge tcp_sock with tcp_opt
#   
#   No need for two structs, follow the new inet_sock layout
#   style.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/tcp_minisocks.c
#   2004/12/28 16:22:40-02:00 acme@conectiva.com.br +6 -6
#   [TCP] merge tcp_sock with tcp_opt
#   
#   No need for two structs, follow the new inet_sock layout
#   style.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/tcp_ipv4.c
#   2004/12/28 16:22:40-02:00 acme@conectiva.com.br +15 -15
#   [TCP] merge tcp_sock with tcp_opt
#   
#   No need for two structs, follow the new inet_sock layout
#   style.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/tcp_input.c
#   2004/12/28 16:22:40-02:00 acme@conectiva.com.br +120 -120
#   [TCP] merge tcp_sock with tcp_opt
#   
#   No need for two structs, follow the new inet_sock layout
#   style.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/tcp_diag.c
#   2004/12/28 16:22:40-02:00 acme@conectiva.com.br +2 -2
#   [TCP] merge tcp_sock with tcp_opt
#   
#   No need for two structs, follow the new inet_sock layout
#   style.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/tcp.c
#   2004/12/28 16:22:40-02:00 acme@conectiva.com.br +24 -24
#   [TCP] merge tcp_sock with tcp_opt
#   
#   No need for two structs, follow the new inet_sock layout
#   style.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/syncookies.c
#   2004/12/28 16:22:40-02:00 acme@conectiva.com.br +3 -3
#   [TCP] merge tcp_sock with tcp_opt
#   
#   No need for two structs, follow the new inet_sock layout
#   style.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/ip_sockglue.c
#   2004/12/28 16:22:40-02:00 acme@conectiva.com.br +1 -1
#   [TCP] merge tcp_sock with tcp_opt
#   
#   No need for two structs, follow the new inet_sock layout
#   style.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# include/net/tcp_ecn.h
#   2004/12/28 16:22:40-02:00 acme@conectiva.com.br +15 -22
#   [TCP] merge tcp_sock with tcp_opt
#   
#   No need for two structs, follow the new inet_sock layout
#   style.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# include/net/tcp.h
#   2004/12/28 16:22:40-02:00 acme@conectiva.com.br +56 -56
#   [TCP] merge tcp_sock with tcp_opt
#   
#   No need for two structs, follow the new inet_sock layout
#   style.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# include/linux/tcp.h
#   2004/12/28 16:22:40-02:00 acme@conectiva.com.br +5 -9
#   [TCP] merge tcp_sock with tcp_opt
#   
#   No need for two structs, follow the new inet_sock layout
#   style.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# include/linux/ipv6.h
#   2004/12/28 16:22:40-02:00 acme@conectiva.com.br +1 -2
#   [TCP] merge tcp_sock with tcp_opt
#   
#   No need for two structs, follow the new inet_sock layout
#   style.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# ChangeSet
#   2004/12/28 19:12:15+01:00 sam@mars.ravnborg.org 
#   kbuild: drop use of /usr/bin/env in top-level Makefile
#   
#   The use of env is not needed, and caused the output makefile to be
#   created in some setups where it was not supposed to.
#   Seems to be an issue with GNU sh-utils version of env.
#   
#   One user also reported env to be located in another place (/usr/local/bin/..).
#   This patch fixes bug: http://bugme.osdl.org/show_bug.cgi?id=3953
#   
#   Thanks to "Mark Williams (MWP)" <mwp@internode.on.net> for helping tracking this down.
#   
#   Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
# 
# Makefile
#   2004/12/28 19:11:36+01:00 sam@mars.ravnborg.org +1 -1
#   Drop usage of /usr/bin/env
# 
# ChangeSet
#   2004/12/27 22:45:18-08:00 davem@nuts.davemloft.net 
#   [SPARC64]: Include infiniband driver config and update defconfig.
#   
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# arch/sparc64/defconfig
#   2004/12/27 22:44:46-08:00 davem@nuts.davemloft.net +24 -4
#   [SPARC64]: Include infiniband driver config and update defconfig.
# 
# arch/sparc64/Kconfig
#   2004/12/27 22:44:46-08:00 davem@nuts.davemloft.net +2 -0
#   [SPARC64]: Include infiniband driver config and update defconfig.
# 
# ChangeSet
#   2004/12/27 22:30:04-08:00 davem@nuts.davemloft.net 
#   Merge nuts.davemloft.net:/disk1/BK/ib-2.6
#   into nuts.davemloft.net:/disk1/BK/net-2.6
# 
# net/ipv4/arp.c
#   2004/12/27 22:29:52-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# include/net/ip.h
#   2004/12/27 22:29:52-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# MAINTAINERS
#   2004/12/27 22:29:52-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/12/27 22:26:29-08:00 roland@topspin.com 
#   [INFINIBAND]: InfiniBand MAINTAINERS entry
#   
#   Add OpenIB maintainers information to MAINTAINERS.
#   
#   Signed-off-by: Roland Dreier <roland@topspin.com>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# MAINTAINERS
#   2004/12/27 22:26:10-08:00 roland@topspin.com +11 -0
#   [INFINIBAND]: InfiniBand MAINTAINERS entry
#   
#   Add OpenIB maintainers information to MAINTAINERS.
#   
#   Signed-off-by: Roland Dreier <roland@topspin.com>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# ChangeSet
#   2004/12/27 22:25:37-08:00 roland@topspin.com 
#   [INFINIBAND]: Add InfiniBand Documentation files
#   
#   Add files to Documentation/infiniband that describe the tree under
#   /sys/class/infiniband, the IPoIB driver and the userspace MAD access driver.
#   
#   Signed-off-by: Roland Dreier <roland@topspin.com>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# Documentation/infiniband/user_mad.txt
#   2004/12/27 22:25:05-08:00 roland@topspin.com +81 -0
#   [INFINIBAND]: Add InfiniBand Documentation files
# 
# Documentation/infiniband/sysfs.txt
#   2004/12/27 22:25:05-08:00 roland@topspin.com +64 -0
#   [INFINIBAND]: Add InfiniBand Documentation files
# 
# Documentation/infiniband/user_mad.txt
#   2004/12/27 22:25:05-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/Documentation/infiniband/user_mad.txt
# 
# Documentation/infiniband/sysfs.txt
#   2004/12/27 22:25:05-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/Documentation/infiniband/sysfs.txt
# 
# Documentation/infiniband/ipoib.txt
#   2004/12/27 22:25:04-08:00 roland@topspin.com +56 -0
#   [INFINIBAND]: Add InfiniBand Documentation files
# 
# Documentation/infiniband/ipoib.txt
#   2004/12/27 22:25:04-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/Documentation/infiniband/ipoib.txt
# 
# ChangeSet
#   2004/12/27 22:24:37-08:00 roland@topspin.com 
#   [INFINIBAND]: Document InfiniBand ioctl use
#   
#   Add the 0x1b ioctl magic number used by ib_umad module to
#   Documentation/ioctl-number.txt.
#   
#   Signed-off-by: Roland Dreier <roland@topspin.com>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# Documentation/ioctl-number.txt
#   2004/12/27 22:24:18-08:00 roland@topspin.com +1 -0
#   [INFINIBAND]: Document InfiniBand ioctl use
#   
#   Add the 0x1b ioctl magic number used by ib_umad module to
#   Documentation/ioctl-number.txt.
#   
#   Signed-off-by: Roland Dreier <roland@topspin.com>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# ChangeSet
#   2004/12/27 22:23:44-08:00 roland@topspin.com 
#   [INFINIBAND]: Add IPoIB userspace MAD support
#   
#   Add a driver that provides a character special device for each
#   InfiniBand port.  This device allows userspace to send and receive
#   MADs via write() and read() (with some control operations implemented
#   as ioctls).
#   
#   All operations are 32/64 clean and have been tested with 32-bit
#   userspace running on a ppc64 kernel.
#   
#   Signed-off-by: Roland Dreier <roland@topspin.com>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# drivers/infiniband/core/Makefile
#   2004/12/27 22:23:12-08:00 roland@topspin.com +3 -1
#   [INFINIBAND]: Add IPoIB userspace MAD support
# 
# drivers/infiniband/include/ib_user_mad.h
#   2004/12/27 22:23:10-08:00 roland@topspin.com +123 -0
#   [INFINIBAND]: Add IPoIB userspace MAD support
# 
# drivers/infiniband/include/ib_user_mad.h
#   2004/12/27 22:23:10-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/include/ib_user_mad.h
# 
# drivers/infiniband/core/user_mad.c
#   2004/12/27 22:23:08-08:00 roland@topspin.com +738 -0
#   [INFINIBAND]: Add IPoIB userspace MAD support
# 
# drivers/infiniband/core/user_mad.c
#   2004/12/27 22:23:08-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/core/user_mad.c
# 
# ChangeSet
#   2004/12/27 22:22:21-08:00 roland@topspin.com 
#   [INFINIBAND]: Add IPoIB multicast and partition code
#   
#   Add functions for handling IPoIB multicast and multiple partitions.
#   
#   Signed-off-by: Roland Dreier <roland@topspin.com>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# drivers/infiniband/ulp/ipoib/ipoib_vlan.c
#   2004/12/27 22:21:51-08:00 roland@topspin.com +177 -0
#   [INFINIBAND]: Add IPoIB multicast and partition code
# 
# drivers/infiniband/ulp/ipoib/ipoib_vlan.c
#   2004/12/27 22:21:51-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/ulp/ipoib/ipoib_vlan.c
# 
# drivers/infiniband/ulp/ipoib/ipoib_multicast.c
#   2004/12/27 22:21:49-08:00 roland@topspin.com +981 -0
#   [INFINIBAND]: Add IPoIB multicast and partition code
# 
# drivers/infiniband/ulp/ipoib/ipoib_multicast.c
#   2004/12/27 22:21:49-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
# 
# ChangeSet
#   2004/12/27 22:21:15-08:00 roland@topspin.com 
#   [INFINIBAND]: Add IPoIB (IP-over-InfiniBand) driver
#   
#   Add a driver that implements the (IPoIB) IP-over-InfiniBand protocol.
#   This is a network device driver of type ARPHRD_INFINIBAND (and
#   addr_len INFINIBAND_ALEN bytes).
#   
#   The ARP/ND implementation for this driver is not completely
#   straightforward, because InfiniBand requires an additional path lookup
#   be performed (through an IB-specific mechanism) after a remote
#   hardware address has been resolved.  We are very open to suggestions
#   of a better way to handle this than the current implementation.
#   
#   Although IB has a special multicast group join mode intended to
#   support IP multicast routing (non member join), no means to identify
#   different multicast styles has yet been determined, so all joins by
#   the driver are currently full member joins.  We are looking for
#   guidance in how to solve this.
#   
#   The IPoIB protocol/encapsulation is described in the Internet-Drafts
#     http://www.ietf.org/internet-drafts/draft-ietf-ipoib-architecture-04.txt
#     http://www.ietf.org/internet-drafts/draft-ietf-ipoib-ip-over-infiniband-08.txt
#   
#   Signed-off-by: Roland Dreier <roland@topspin.com>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# drivers/infiniband/Makefile
#   2004/12/27 22:20:37-08:00 roland@topspin.com +1 -0
#   [INFINIBAND]: Add IPoIB (IP-over-InfiniBand) driver
# 
# drivers/infiniband/Kconfig
#   2004/12/27 22:20:37-08:00 roland@topspin.com +2 -0
#   [INFINIBAND]: Add IPoIB (IP-over-InfiniBand) driver
# 
# drivers/infiniband/ulp/ipoib/ipoib_verbs.c
#   2004/12/27 22:20:35-08:00 roland@topspin.com +254 -0
#   [INFINIBAND]: Add IPoIB (IP-over-InfiniBand) driver
# 
# drivers/infiniband/ulp/ipoib/ipoib_main.c
#   2004/12/27 22:20:35-08:00 roland@topspin.com +1079 -0
#   [INFINIBAND]: Add IPoIB (IP-over-InfiniBand) driver
# 
# drivers/infiniband/ulp/ipoib/ipoib_ib.c
#   2004/12/27 22:20:35-08:00 roland@topspin.com +678 -0
#   [INFINIBAND]: Add IPoIB (IP-over-InfiniBand) driver
# 
# drivers/infiniband/ulp/ipoib/ipoib_fs.c
#   2004/12/27 22:20:35-08:00 roland@topspin.com +287 -0
#   [INFINIBAND]: Add IPoIB (IP-over-InfiniBand) driver
# 
# drivers/infiniband/ulp/ipoib/ipoib.h
#   2004/12/27 22:20:35-08:00 roland@topspin.com +350 -0
#   [INFINIBAND]: Add IPoIB (IP-over-InfiniBand) driver
# 
# drivers/infiniband/ulp/ipoib/Makefile
#   2004/12/27 22:20:35-08:00 roland@topspin.com +11 -0
#   [INFINIBAND]: Add IPoIB (IP-over-InfiniBand) driver
# 
# drivers/infiniband/ulp/ipoib/ipoib_verbs.c
#   2004/12/27 22:20:35-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/ulp/ipoib/ipoib_verbs.c
# 
# drivers/infiniband/ulp/ipoib/ipoib_main.c
#   2004/12/27 22:20:35-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/ulp/ipoib/ipoib_main.c
# 
# drivers/infiniband/ulp/ipoib/ipoib_ib.c
#   2004/12/27 22:20:35-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/ulp/ipoib/ipoib_ib.c
# 
# drivers/infiniband/ulp/ipoib/ipoib_fs.c
#   2004/12/27 22:20:35-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/ulp/ipoib/ipoib_fs.c
# 
# drivers/infiniband/ulp/ipoib/ipoib.h
#   2004/12/27 22:20:35-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/ulp/ipoib/ipoib.h
# 
# drivers/infiniband/ulp/ipoib/Makefile
#   2004/12/27 22:20:35-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/ulp/ipoib/Makefile
# 
# drivers/infiniband/ulp/ipoib/Kconfig
#   2004/12/27 22:20:33-08:00 roland@topspin.com +33 -0
#   [INFINIBAND]: Add IPoIB (IP-over-InfiniBand) driver
# 
# drivers/infiniband/ulp/ipoib/Kconfig
#   2004/12/27 22:20:33-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/ulp/ipoib/Kconfig
# 
# ChangeSet
#   2004/12/27 22:19:47-08:00 roland@topspin.com 
#   [INFINIBAND]: IPoIB IPv6 support
#   
#   Add ipv6_ib_mc_map() to convert IPv6 multicast addresses to IPoIB
#   hardware addresses, and add support for autoconfiguration for devices
#   with type ARPHRD_INFINIBAND.
#   
#   The mapping for multicast addresses is described in
#     http://www.ietf.org/internet-drafts/draft-ietf-ipoib-ip-over-infiniband-08.txt
#   
#   Signed-off-by: Nitin Hande <Nitin.Hande@Sun.Com>
#   Signed-off-by: Roland Dreier <roland@topspin.com>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv6/ndisc.c
#   2004/12/27 22:19:28-08:00 roland@topspin.com +3 -0
#   [INFINIBAND]: IPoIB IPv6 support
#   
#   Add ipv6_ib_mc_map() to convert IPv6 multicast addresses to IPoIB
#   hardware addresses, and add support for autoconfiguration for devices
#   with type ARPHRD_INFINIBAND.
#   
#   The mapping for multicast addresses is described in
#     http://www.ietf.org/internet-drafts/draft-ietf-ipoib-ip-over-infiniband-08.txt
#   
#   Signed-off-by: Nitin Hande <Nitin.Hande@Sun.Com>
#   Signed-off-by: Roland Dreier <roland@topspin.com>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv6/addrconf.c
#   2004/12/27 22:19:28-08:00 roland@topspin.com +9 -1
#   [INFINIBAND]: IPoIB IPv6 support
#   
#   Add ipv6_ib_mc_map() to convert IPv6 multicast addresses to IPoIB
#   hardware addresses, and add support for autoconfiguration for devices
#   with type ARPHRD_INFINIBAND.
#   
#   The mapping for multicast addresses is described in
#     http://www.ietf.org/internet-drafts/draft-ietf-ipoib-ip-over-infiniband-08.txt
#   
#   Signed-off-by: Nitin Hande <Nitin.Hande@Sun.Com>
#   Signed-off-by: Roland Dreier <roland@topspin.com>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# include/net/if_inet6.h
#   2004/12/27 22:19:27-08:00 roland@topspin.com +15 -0
#   [INFINIBAND]: IPoIB IPv6 support
#   
#   Add ipv6_ib_mc_map() to convert IPv6 multicast addresses to IPoIB
#   hardware addresses, and add support for autoconfiguration for devices
#   with type ARPHRD_INFINIBAND.
#   
#   The mapping for multicast addresses is described in
#     http://www.ietf.org/internet-drafts/draft-ietf-ipoib-ip-over-infiniband-08.txt
#   
#   Signed-off-by: Nitin Hande <Nitin.Hande@Sun.Com>
#   Signed-off-by: Roland Dreier <roland@topspin.com>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# ChangeSet
#   2004/12/27 22:18:50-08:00 roland@topspin.com 
#   [INFINIBAND]: IPoIB IPv4 multicast
#   
#   Add ip_ib_mc_map() to convert IPv4 multicast addresses to IPoIB
#   hardware addresses.  Also add <linux/if_infiniband.h> so INFINIBAND_ALEN
#   has a home.
#   
#   The mapping for multicast addresses is described in
#     http://www.ietf.org/internet-drafts/draft-ietf-ipoib-ip-over-infiniband-08.txt
#   
#   Signed-off-by: Roland Dreier <roland@topspin.com>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/arp.c
#   2004/12/27 22:18:16-08:00 roland@topspin.com +3 -0
#   [INFINIBAND]: IPoIB IPv4 multicast
# 
# include/net/ip.h
#   2004/12/27 22:18:16-08:00 roland@topspin.com +33 -0
#   [INFINIBAND]: IPoIB IPv4 multicast
# 
# include/linux/if_infiniband.h
#   2004/12/27 22:18:10-08:00 roland@topspin.com +29 -0
#   [INFINIBAND]: IPoIB IPv4 multicast
# 
# include/linux/if_infiniband.h
#   2004/12/27 22:18:10-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/include/linux/if_infiniband.h
# 
# ChangeSet
#   2004/12/27 22:17:23-08:00 roland@topspin.com 
#   [INFINIBAND]: Add Mellanox HCA low-level driver (MAD)
#   
#   Add MAD (management datagram) code for Mellanox HCA driver.
#   
#   Signed-off-by: Roland Dreier <roland@topspin.com>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# drivers/infiniband/hw/mthca/mthca_mad.c
#   2004/12/27 22:16:54-08:00 roland@topspin.com +320 -0
#   [INFINIBAND]: Add Mellanox HCA low-level driver (MAD)
# 
# drivers/infiniband/hw/mthca/mthca_mad.c
#   2004/12/27 22:16:54-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/hw/mthca/mthca_mad.c
# 
# ChangeSet
#   2004/12/27 22:16:33-08:00 roland@topspin.com 
#   [INFINIBAND]: Add Mellanox HCA low-level driver (last bits)
#   
#   Add code for remaining InfiniBand objects (address vectors, multicast
#   groups, memory regions and protection domains)
#   
#   Signed-off-by: Roland Dreier <roland@topspin.com>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# drivers/infiniband/hw/mthca/mthca_pd.c
#   2004/12/27 22:16:03-08:00 roland@topspin.com +80 -0
#   [INFINIBAND]: Add Mellanox HCA low-level driver (last bits)
# 
# drivers/infiniband/hw/mthca/mthca_mr.c
#   2004/12/27 22:16:03-08:00 roland@topspin.com +396 -0
#   [INFINIBAND]: Add Mellanox HCA low-level driver (last bits)
# 
# drivers/infiniband/hw/mthca/mthca_mcg.c
#   2004/12/27 22:16:03-08:00 roland@topspin.com +376 -0
#   [INFINIBAND]: Add Mellanox HCA low-level driver (last bits)
# 
# drivers/infiniband/hw/mthca/mthca_pd.c
#   2004/12/27 22:16:03-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/hw/mthca/mthca_pd.c
# 
# drivers/infiniband/hw/mthca/mthca_mr.c
#   2004/12/27 22:16:03-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/hw/mthca/mthca_mr.c
# 
# drivers/infiniband/hw/mthca/mthca_mcg.c
#   2004/12/27 22:16:03-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/hw/mthca/mthca_mcg.c
# 
# drivers/infiniband/hw/mthca/mthca_av.c
#   2004/12/27 22:16:02-08:00 roland@topspin.com +219 -0
#   [INFINIBAND]: Add Mellanox HCA low-level driver (last bits)
# 
# drivers/infiniband/hw/mthca/mthca_av.c
#   2004/12/27 22:16:02-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/hw/mthca/mthca_av.c
# 
# ChangeSet
#   2004/12/27 22:15:37-08:00 roland@topspin.com 
#   [INFINIBAND]: Add Mellanox HCA low-level driver (QP/CQ)
#   
#   Add CQ (completion queue) and QP (queue pair) code for Mellanox HCA driver.
#   
#   Signed-off-by: Roland Dreier <roland@topspin.com>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# drivers/infiniband/hw/mthca/mthca_qp.c
#   2004/12/27 22:15:08-08:00 roland@topspin.com +1536 -0
#   [INFINIBAND]: Add Mellanox HCA low-level driver (QP/CQ)
# 
# drivers/infiniband/hw/mthca/mthca_qp.c
#   2004/12/27 22:15:08-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/hw/mthca/mthca_qp.c
# 
# drivers/infiniband/hw/mthca/mthca_cq.c
#   2004/12/27 22:15:07-08:00 roland@topspin.com +836 -0
#   [INFINIBAND]: Add Mellanox HCA low-level driver (QP/CQ)
# 
# drivers/infiniband/hw/mthca/mthca_cq.c
#   2004/12/27 22:15:07-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/hw/mthca/mthca_cq.c
# 
# ChangeSet
#   2004/12/27 22:14:43-08:00 roland@topspin.com 
#   [INFINIBAND]: Add Mellanox HCA low-level driver (initialization)
#   
#   Add device initializaton code for Mellanox HCA driver.
#   
#   Signed-off-by: Roland Dreier <roland@topspin.com>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# drivers/infiniband/hw/mthca/mthca_reset.c
#   2004/12/27 22:14:13-08:00 roland@topspin.com +232 -0
#   [INFINIBAND]: Add Mellanox HCA low-level driver (initialization)
# 
# drivers/infiniband/hw/mthca/mthca_profile.h
#   2004/12/27 22:14:13-08:00 roland@topspin.com +62 -0
#   [INFINIBAND]: Add Mellanox HCA low-level driver (initialization)
# 
# drivers/infiniband/hw/mthca/mthca_reset.c
#   2004/12/27 22:14:13-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/hw/mthca/mthca_reset.c
# 
# drivers/infiniband/hw/mthca/mthca_profile.h
#   2004/12/27 22:14:13-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/hw/mthca/mthca_profile.h
# 
# drivers/infiniband/hw/mthca/mthca_profile.c
#   2004/12/27 22:14:11-08:00 roland@topspin.com +226 -0
#   [INFINIBAND]: Add Mellanox HCA low-level driver (initialization)
# 
# drivers/infiniband/hw/mthca/mthca_profile.c
#   2004/12/27 22:14:11-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/hw/mthca/mthca_profile.c
# 
# ChangeSet
#   2004/12/27 22:13:44-08:00 roland@topspin.com 
#   [INFINIBAND]: Add Mellanox HCA low-level driver (EQ)
#   
#   Add event queue code for Mellanox HCA driver.
#   
#   Signed-off-by: Roland Dreier <roland@topspin.com>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# drivers/infiniband/hw/mthca/mthca_eq.c
#   2004/12/27 22:13:13-08:00 roland@topspin.com +690 -0
#   [INFINIBAND]: Add Mellanox HCA low-level driver (EQ)
# 
# drivers/infiniband/hw/mthca/mthca_eq.c
#   2004/12/27 22:13:13-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/hw/mthca/mthca_eq.c
# 
# ChangeSet
#   2004/12/27 22:12:48-08:00 roland@topspin.com 
#   [INFINIBAND]: Add Mellanox HCA low-level driver (FW commands)
#   
#   Add firmware command processing code for Mellanox HCA driver.
#   
#   Signed-off-by: Roland Dreier <roland@topspin.com>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# drivers/infiniband/hw/mthca/mthca_cmd.h
#   2004/12/27 22:12:16-08:00 roland@topspin.com +276 -0
#   [INFINIBAND]: Add Mellanox HCA low-level driver (FW commands)
# 
# drivers/infiniband/hw/mthca/mthca_cmd.h
#   2004/12/27 22:12:16-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/hw/mthca/mthca_cmd.h
# 
# drivers/infiniband/hw/mthca/mthca_cmd.c
#   2004/12/27 22:12:15-08:00 roland@topspin.com +1573 -0
#   [INFINIBAND]: Add Mellanox HCA low-level driver (FW commands)
# 
# drivers/infiniband/hw/mthca/mthca_cmd.c
#   2004/12/27 22:12:15-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/hw/mthca/mthca_cmd.c
# 
# ChangeSet
#   2004/12/27 22:11:50-08:00 roland@topspin.com 
#   [INFINIBAND]: Add Mellanox HCA low-level driver (midlayer interface)
#   
#   Add midlayer interface code for Mellanox HCA driver.
#   
#   Signed-off-by: Roland Dreier <roland@topspin.com>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# drivers/infiniband/hw/mthca/mthca_provider.h
#   2004/12/27 22:11:18-08:00 roland@topspin.com +225 -0
#   [INFINIBAND]: Add Mellanox HCA low-level driver (midlayer interface)
# 
# drivers/infiniband/hw/mthca/mthca_provider.h
#   2004/12/27 22:11:18-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/hw/mthca/mthca_provider.h
# 
# drivers/infiniband/hw/mthca/mthca_provider.c
#   2004/12/27 22:11:16-08:00 roland@topspin.com +627 -0
#   [INFINIBAND]: Add Mellanox HCA low-level driver (midlayer interface)
# 
# drivers/infiniband/hw/mthca/mthca_provider.c
#   2004/12/27 22:11:16-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/hw/mthca/mthca_provider.c
# 
# ChangeSet
#   2004/12/27 22:10:49-08:00 roland@topspin.com 
#   [INFINIBAND]: Add Mellanox HCA low-level driver
#   
#   Add a low-level driver for Mellanox MT23108 and MT25208 HCAs.  The
#   MT25208 is only fully supported when in MT23108 compatibility mode;
#   only the very beginnings of support for native MT25208 mode (required
#   for HCAs without local memory) is present.
#   
#   (As a side note, I believe this driver would be the first in-tree
#   consumer of the PCI MSI/MSI-X API)
#   
#   Signed-off-by: Roland Dreier <roland@topspin.com>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# drivers/infiniband/Makefile
#   2004/12/27 22:10:10-08:00 roland@topspin.com +1 -0
#   [INFINIBAND]: Add Mellanox HCA low-level driver
# 
# drivers/infiniband/Kconfig
#   2004/12/27 22:10:10-08:00 roland@topspin.com +2 -0
#   [INFINIBAND]: Add Mellanox HCA low-level driver
# 
# drivers/infiniband/hw/mthca/mthca_main.c
#   2004/12/27 22:10:08-08:00 roland@topspin.com +936 -0
#   [INFINIBAND]: Add Mellanox HCA low-level driver
# 
# drivers/infiniband/hw/mthca/mthca_doorbell.h
#   2004/12/27 22:10:08-08:00 roland@topspin.com +123 -0
#   [INFINIBAND]: Add Mellanox HCA low-level driver
# 
# drivers/infiniband/hw/mthca/mthca_dev.h
#   2004/12/27 22:10:08-08:00 roland@topspin.com +391 -0
#   [INFINIBAND]: Add Mellanox HCA low-level driver
# 
# drivers/infiniband/hw/mthca/mthca_config_reg.h
#   2004/12/27 22:10:08-08:00 roland@topspin.com +55 -0
#   [INFINIBAND]: Add Mellanox HCA low-level driver
# 
# drivers/infiniband/hw/mthca/mthca_allocator.c
#   2004/12/27 22:10:08-08:00 roland@topspin.com +179 -0
#   [INFINIBAND]: Add Mellanox HCA low-level driver
# 
# drivers/infiniband/hw/mthca/Makefile
#   2004/12/27 22:10:08-08:00 roland@topspin.com +12 -0
#   [INFINIBAND]: Add Mellanox HCA low-level driver
# 
# drivers/infiniband/hw/mthca/mthca_main.c
#   2004/12/27 22:10:08-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/hw/mthca/mthca_main.c
# 
# drivers/infiniband/hw/mthca/mthca_doorbell.h
#   2004/12/27 22:10:08-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/hw/mthca/mthca_doorbell.h
# 
# drivers/infiniband/hw/mthca/mthca_dev.h
#   2004/12/27 22:10:08-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/hw/mthca/mthca_dev.h
# 
# drivers/infiniband/hw/mthca/mthca_config_reg.h
#   2004/12/27 22:10:08-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/hw/mthca/mthca_config_reg.h
# 
# drivers/infiniband/hw/mthca/mthca_allocator.c
#   2004/12/27 22:10:08-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/hw/mthca/mthca_allocator.c
# 
# drivers/infiniband/hw/mthca/Makefile
#   2004/12/27 22:10:08-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/hw/mthca/Makefile
# 
# drivers/infiniband/hw/mthca/Kconfig
#   2004/12/27 22:10:06-08:00 roland@topspin.com +26 -0
#   [INFINIBAND]: Add Mellanox HCA low-level driver
# 
# drivers/infiniband/hw/mthca/Kconfig
#   2004/12/27 22:10:06-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/hw/mthca/Kconfig
# 
# ChangeSet
#   2004/12/27 22:09:20-08:00 roland@topspin.com 
#   [INFINIBAND]: Add InfiniBand SA (Subnet Administration) query support
#   
#   Add support for sending queries to the SA (Subnet Administration).  In
#   particular the PathRecord and MCMember (multicast group member) used
#   by the IP-over-InfiniBand driver are implemented.
#   
#   Signed-off-by: Roland Dreier <roland@topspin.com>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# drivers/infiniband/core/Makefile
#   2004/12/27 22:08:42-08:00 roland@topspin.com +3 -1
#   [INFINIBAND]: Add InfiniBand SA (Subnet Administration) query support
# 
# drivers/infiniband/include/ib_sa.h
#   2004/12/27 22:08:39-08:00 roland@topspin.com +280 -0
#   [INFINIBAND]: Add InfiniBand SA (Subnet Administration) query support
# 
# drivers/infiniband/include/ib_sa.h
#   2004/12/27 22:08:39-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/include/ib_sa.h
# 
# drivers/infiniband/core/sa_query.c
#   2004/12/27 22:08:37-08:00 roland@topspin.com +866 -0
#   [INFINIBAND]: Add InfiniBand SA (Subnet Administration) query support
# 
# drivers/infiniband/core/sa_query.c
#   2004/12/27 22:08:37-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/core/sa_query.c
# 
# ChangeSet
#   2004/12/27 22:07:43-08:00 roland@topspin.com 
#   [INFINIBAND]: Add InfiniBand MAD SMI support
#   
#   Add MAD layer SMI (Subnet Management Interface) code.
#   
#   Signed-off-by: Roland Dreier <roland@topspin.com>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# drivers/infiniband/core/smi.h
#   2004/12/27 22:07:11-08:00 roland@topspin.com +67 -0
#   [INFINIBAND]: Add InfiniBand MAD SMI support
# 
# drivers/infiniband/core/smi.h
#   2004/12/27 22:07:11-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/core/smi.h
# 
# drivers/infiniband/core/smi.c
#   2004/12/27 22:07:09-08:00 roland@topspin.com +234 -0
#   [INFINIBAND]: Add InfiniBand MAD SMI support
# 
# drivers/infiniband/core/smi.c
#   2004/12/27 22:07:09-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/core/smi.c
# 
# ChangeSet
#   2004/12/27 22:06:34-08:00 roland@topspin.com 
#   [INFINIBAND]: Add InfiniBand MAD (management datagram) support (private headers)
#   
#   Add MAD layer private implementation headers.
#   
#   Signed-off-by: Roland Dreier <roland@topspin.com>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# drivers/infiniband/core/mad_priv.h
#   2004/12/27 22:06:02-08:00 roland@topspin.com +194 -0
#   [INFINIBAND]: Add InfiniBand MAD (management datagram) support (private headers)
# 
# drivers/infiniband/core/agent_priv.h
#   2004/12/27 22:06:02-08:00 roland@topspin.com +64 -0
#   [INFINIBAND]: Add InfiniBand MAD (management datagram) support (private headers)
# 
# drivers/infiniband/core/mad_priv.h
#   2004/12/27 22:06:02-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/core/mad_priv.h
# 
# drivers/infiniband/core/agent_priv.h
#   2004/12/27 22:06:02-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/core/agent_priv.h
# 
# drivers/infiniband/core/agent.h
#   2004/12/27 22:06:00-08:00 roland@topspin.com +55 -0
#   [INFINIBAND]: Add InfiniBand MAD (management datagram) support (private headers)
# 
# drivers/infiniband/core/agent.h
#   2004/12/27 22:06:00-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/core/agent.h
# 
# ChangeSet
#   2004/12/27 22:05:25-08:00 roland@topspin.com 
#   [INFINIBAND]: Add InfiniBand MAD (management datagram) support
#   
#   Add support for handling InfiniBand MADs (management datagrams),
#   including sending and receiving MADs as well as passing MADs on to
#   local agents.
#   
#   This is required for an SM (subnet manager) to discover and configure
#   the host, since the SM's query MADs must be passed to the local SMA
#   (subnet management agent).  In addition, this support is used by upper
#   level protocols to send queries to and receive responses from the SM.
#   
#   Signed-off-by: Roland Dreier <roland@topspin.com>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# drivers/infiniband/core/Makefile
#   2004/12/27 22:04:49-08:00 roland@topspin.com +3 -1
#   [INFINIBAND]: Add InfiniBand MAD (management datagram) support
# 
# drivers/infiniband/core/mad.c
#   2004/12/27 22:04:26-08:00 roland@topspin.com +2632 -0
#   [INFINIBAND]: Add InfiniBand MAD (management datagram) support
# 
# drivers/infiniband/core/mad.c
#   2004/12/27 22:04:26-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/core/mad.c
# 
# drivers/infiniband/core/agent.c
#   2004/12/27 22:04:25-08:00 roland@topspin.com +399 -0
#   [INFINIBAND]: Add InfiniBand MAD (management datagram) support
# 
# drivers/infiniband/core/agent.c
#   2004/12/27 22:04:25-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/core/agent.c
# 
# ChangeSet
#   2004/12/27 22:03:33-08:00 roland@topspin.com 
#   [INFINIBAND]: Add InfiniBand MAD (management datagram) support (public headers)
#   
#   Add public headers for handling InfiniBand MADs (management
#   datagrams), including sending and receiving MADs as well as passing
#   MADs on to local agents.
#   
#   Signed-off-by: Roland Dreier <roland@topspin.com>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# drivers/infiniband/include/ib_smi.h
#   2004/12/27 22:03:05-08:00 roland@topspin.com +96 -0
#   [INFINIBAND]: Add InfiniBand MAD (management datagram) support (public headers)
# 
# drivers/infiniband/include/ib_smi.h
#   2004/12/27 22:03:05-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/include/ib_smi.h
# 
# drivers/infiniband/include/ib_mad.h
#   2004/12/27 22:03:03-08:00 roland@topspin.com +404 -0
#   [INFINIBAND]: Add InfiniBand MAD (management datagram) support (public headers)
# 
# drivers/infiniband/include/ib_mad.h
#   2004/12/27 22:03:03-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/include/ib_mad.h
# 
# ChangeSet
#   2004/12/27 22:02:08-08:00 roland@topspin.com 
#   [INFINIBAND]: Hook up drivers/infiniband
#   
#   Add the appropriate lines to drivers/Kconfig and drivers/Makefile so
#   that the kernel configuration and build systems know about drivers/infiniband.
#   
#   Signed-off-by: Roland Dreier <roland@topspin.com>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# drivers/Makefile
#   2004/12/27 22:01:46-08:00 roland@topspin.com +1 -0
#   [INFINIBAND]: Hook up drivers/infiniband
#   
#   Add the appropriate lines to drivers/Kconfig and drivers/Makefile so
#   that the kernel configuration and build systems know about drivers/infiniband.
#   
#   Signed-off-by: Roland Dreier <roland@topspin.com>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# drivers/Kconfig
#   2004/12/27 22:01:46-08:00 roland@topspin.com +2 -0
#   [INFINIBAND]: Hook up drivers/infiniband
#   
#   Add the appropriate lines to drivers/Kconfig and drivers/Makefile so
#   that the kernel configuration and build systems know about drivers/infiniband.
#   
#   Signed-off-by: Roland Dreier <roland@topspin.com>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# ChangeSet
#   2004/12/27 21:58:49-08:00 roland@topspin.com 
#   [INFINIBAND]: Add core InfiniBand support
#   
#   Add implementation of core InfiniBand support.  This can be thought of
#   as a midlayer that provides an abstraction between low-level hardware
#   drivers and upper level protocols (such as IP-over-InfiniBand).
#   
#   Signed-off-by: Roland Dreier <roland@topspin.com>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# drivers/infiniband/core/verbs.c
#   2004/12/27 21:58:13-08:00 roland@topspin.com +433 -0
#   [INFINIBAND]: Add core InfiniBand support
# 
# drivers/infiniband/core/ud_header.c
#   2004/12/27 21:58:13-08:00 roland@topspin.com +365 -0
#   [INFINIBAND]: Add core InfiniBand support
# 
# drivers/infiniband/core/sysfs.c
#   2004/12/27 21:58:13-08:00 roland@topspin.com +725 -0
#   [INFINIBAND]: Add core InfiniBand support
# 
# drivers/infiniband/core/packer.c
#   2004/12/27 21:58:13-08:00 roland@topspin.com +201 -0
#   [INFINIBAND]: Add core InfiniBand support
# 
# drivers/infiniband/core/fmr_pool.c
#   2004/12/27 21:58:13-08:00 roland@topspin.com +507 -0
#   [INFINIBAND]: Add core InfiniBand support
# 
# drivers/infiniband/core/device.c
#   2004/12/27 21:58:13-08:00 roland@topspin.com +614 -0
#   [INFINIBAND]: Add core InfiniBand support
# 
# drivers/infiniband/core/core_priv.h
#   2004/12/27 21:58:13-08:00 roland@topspin.com +52 -0
#   [INFINIBAND]: Add core InfiniBand support
# 
# drivers/infiniband/core/cache.c
#   2004/12/27 21:58:13-08:00 roland@topspin.com +328 -0
#   [INFINIBAND]: Add core InfiniBand support
# 
# drivers/infiniband/core/Makefile
#   2004/12/27 21:58:13-08:00 roland@topspin.com +6 -0
#   [INFINIBAND]: Add core InfiniBand support
# 
# drivers/infiniband/Makefile
#   2004/12/27 21:58:13-08:00 roland@topspin.com +1 -0
#   [INFINIBAND]: Add core InfiniBand support
# 
# drivers/infiniband/core/verbs.c
#   2004/12/27 21:58:13-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/core/verbs.c
# 
# drivers/infiniband/core/ud_header.c
#   2004/12/27 21:58:13-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/core/ud_header.c
# 
# drivers/infiniband/core/sysfs.c
#   2004/12/27 21:58:13-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/core/sysfs.c
# 
# drivers/infiniband/core/packer.c
#   2004/12/27 21:58:13-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/core/packer.c
# 
# drivers/infiniband/core/fmr_pool.c
#   2004/12/27 21:58:13-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/core/fmr_pool.c
# 
# drivers/infiniband/core/device.c
#   2004/12/27 21:58:13-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/core/device.c
# 
# drivers/infiniband/core/core_priv.h
#   2004/12/27 21:58:13-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/core/core_priv.h
# 
# drivers/infiniband/core/cache.c
#   2004/12/27 21:58:13-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/core/cache.c
# 
# drivers/infiniband/core/Makefile
#   2004/12/27 21:58:13-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/core/Makefile
# 
# drivers/infiniband/Makefile
#   2004/12/27 21:58:13-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/Makefile
# 
# drivers/infiniband/Kconfig
#   2004/12/27 21:58:11-08:00 roland@topspin.com +10 -0
#   [INFINIBAND]: Add core InfiniBand support
# 
# drivers/infiniband/Kconfig
#   2004/12/27 21:58:11-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/Kconfig
# 
# ChangeSet
#   2004/12/27 21:57:29-08:00 roland@topspin.com 
#   [INFINIBAND]: Add core InfiniBand support (public headers)
#   
#   Add public headers for core InfiniBand support.  This can be thought
#   of as a midlayer that provides an abstraction between low-level
#   hardware drivers and upper level protocols (such as
#   IP-over-InfiniBand).
#   
#   Signed-off-by: Roland Dreier <roland@topspin.com>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# drivers/infiniband/include/ib_verbs.h
#   2004/12/27 21:56:56-08:00 roland@topspin.com +1249 -0
#   [INFINIBAND]: Add core InfiniBand support (public headers)
#   
#   Add public headers for core InfiniBand support.  This can be thought
#   of as a midlayer that provides an abstraction between low-level
#   hardware drivers and upper level protocols (such as
#   IP-over-InfiniBand).
#   
#   Signed-off-by: Roland Dreier <roland@topspin.com>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# drivers/infiniband/include/ib_pack.h
#   2004/12/27 21:56:56-08:00 roland@topspin.com +245 -0
#   [INFINIBAND]: Add core InfiniBand support (public headers)
#   
#   Add public headers for core InfiniBand support.  This can be thought
#   of as a midlayer that provides an abstraction between low-level
#   hardware drivers and upper level protocols (such as
#   IP-over-InfiniBand).
#   
#   Signed-off-by: Roland Dreier <roland@topspin.com>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# drivers/infiniband/include/ib_fmr_pool.h
#   2004/12/27 21:56:56-08:00 roland@topspin.com +92 -0
#   [INFINIBAND]: Add core InfiniBand support (public headers)
#   
#   Add public headers for core InfiniBand support.  This can be thought
#   of as a midlayer that provides an abstraction between low-level
#   hardware drivers and upper level protocols (such as
#   IP-over-InfiniBand).
#   
#   Signed-off-by: Roland Dreier <roland@topspin.com>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# drivers/infiniband/include/ib_verbs.h
#   2004/12/27 21:56:56-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/include/ib_verbs.h
# 
# drivers/infiniband/include/ib_pack.h
#   2004/12/27 21:56:56-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/include/ib_pack.h
# 
# drivers/infiniband/include/ib_fmr_pool.h
#   2004/12/27 21:56:56-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/include/ib_fmr_pool.h
# 
# drivers/infiniband/include/ib_cache.h
#   2004/12/27 21:56:54-08:00 roland@topspin.com +53 -0
#   [INFINIBAND]: Add core InfiniBand support (public headers)
#   
#   Add public headers for core InfiniBand support.  This can be thought
#   of as a midlayer that provides an abstraction between low-level
#   hardware drivers and upper level protocols (such as
#   IP-over-InfiniBand).
#   
#   Signed-off-by: Roland Dreier <roland@topspin.com>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# drivers/infiniband/include/ib_cache.h
#   2004/12/27 21:56:54-08:00 roland@topspin.com +0 -0
#   BitKeeper file /disk1/BK/ib-2.6/drivers/infiniband/include/ib_cache.h
# 
# ChangeSet
#   2004/12/27 21:30:55-08:00 davem@nuts.davemloft.net 
#   Merge bk://kernel.bkbits.net/acme/connection_sock-2.6
#   into nuts.davemloft.net:/disk1/BK/net-2.6
# 
# net/ipv4/udp.c
#   2004/12/27 21:30:44-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# net/ipv4/tcp_timer.c
#   2004/12/27 21:30:44-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# net/ipv4/tcp_minisocks.c
#   2004/12/27 21:30:43-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# net/ipv4/tcp_input.c
#   2004/12/27 21:30:43-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# net/ipv4/raw.c
#   2004/12/27 21:30:43-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# net/ipv4/ip_sockglue.c
#   2004/12/27 21:30:43-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# net/ipv4/igmp.c
#   2004/12/27 21:30:43-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# net/ipv4/icmp.c
#   2004/12/27 21:30:43-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# net/ipv4/af_inet.c
#   2004/12/27 21:30:43-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# include/net/tcp.h
#   2004/12/27 21:30:42-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/12/27 21:26:00-08:00 tgraf@suug.ch 
#   [PKT_SCHED]: dsmark should ignore ECN bits
#   
#   Taking ECN bits into account doesn't make sense. The two bits were
#   still unused at the time the code was written so this brings back the
#   old behaviour.
#   
#   Signed-off-by: Thomas Graf <tgraf@suug.ch>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/sched/sch_dsmark.c
#   2004/12/27 21:25:39-08:00 tgraf@suug.ch +5 -2
#   [PKT_SCHED]: dsmark should ignore ECN bits
#   
#   Taking ECN bits into account doesn't make sense. The two bits were
#   still unused at the time the code was written so this brings back the
#   old behaviour.
#   
#   Signed-off-by: Thomas Graf <tgraf@suug.ch>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# ChangeSet
#   2004/12/27 21:25:02-08:00 oleg@tv-sign.ru 
#   [NET]: Use prefetching in skb_queue_walk().
#   
#   This patch changes skb_queue_walk() in the same manner
#   as in list_for_each() prefetch optimization, see
#   http://marc.theaimsgroup.com/?l=linux-kernel&m=110399132418587
#   
#   Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# include/linux/skbuff.h
#   2004/12/27 21:24:42-08:00 oleg@tv-sign.ru +3 -3
#   [NET]: Use prefetching in skb_queue_walk().
#   
#   This patch changes skb_queue_walk() in the same manner
#   as in list_for_each() prefetch optimization, see
#   http://marc.theaimsgroup.com/?l=linux-kernel&m=110399132418587
#   
#   Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# ChangeSet
#   2004/12/27 21:12:16-08:00 davem@nuts.davemloft.net 
#   [LLC]: llc_sap_list_lock really does need to be exported.
#   
#   For the case where CONFIG_LLC2 is modular and thus
#   llc_proc.c needs to get at this symbol.
#   
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/llc/llc_core.c
#   2004/12/27 21:11:29-08:00 davem@nuts.davemloft.net +1 -0
#   [LLC]: llc_sap_list_lock really does need to be exported.
# 
# ChangeSet
#   2004/12/27 21:08:40-08:00 davem@nuts.davemloft.net 
#   [SPARC64]: Fix typo in previous change, s/IS_SOCK/S_ISSOCK/
#   
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# arch/sparc64/solaris/timod.c
#   2004/12/27 21:08:08-08:00 davem@nuts.davemloft.net +1 -1
#   [SPARC64]: Fix typo in previous change, s/IS_SOCK/S_ISSOCK/
# 
# ChangeSet
#   2004/12/27 21:04:56-08:00 davem@nuts.davemloft.net 
#   [IRDA]: More staticization becomes possible in ircomm_ttp.c
#   
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/irda/ircomm/ircomm_ttp.c
#   2004/12/27 21:04:23-08:00 davem@nuts.davemloft.net +57 -27
#   [IRDA]: More staticization becomes possible in ircomm_ttp.c
# 
# ChangeSet
#   2004/12/27 20:55:17-08:00 matthew@wil.cx 
#   [SPARC64]: Stop referencing i_sock directly.
#   
#   Use S_ISSOCK() instead.
#   
#   Signed-off-by: Matthew Wilcox <matthew@wil.cx>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# arch/sparc64/solaris/timod.c
#   2004/12/27 20:54:56-08:00 matthew@wil.cx +2 -4
#   [SPARC64]: Stop referencing i_sock directly.
#   
#   Use S_ISSOCK() instead.
#   
#   Signed-off-by: Matthew Wilcox <matthew@wil.cx>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# arch/sparc64/solaris/socksys.c
#   2004/12/27 20:54:56-08:00 matthew@wil.cx +1 -1
#   [SPARC64]: Stop referencing i_sock directly.
#   
#   Use S_ISSOCK() instead.
#   
#   Signed-off-by: Matthew Wilcox <matthew@wil.cx>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# arch/sparc64/solaris/ioctl.c
#   2004/12/27 20:54:56-08:00 matthew@wil.cx +2 -2
#   [SPARC64]: Stop referencing i_sock directly.
#   
#   Use S_ISSOCK() instead.
#   
#   Signed-off-by: Matthew Wilcox <matthew@wil.cx>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# ChangeSet
#   2004/12/27 20:54:03-08:00 juhl-lkml@dif.dk 
#   [IRDA]: Kill useless parens from return statements in irnet.h
#   
#   Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/irda/irnet/irnet.h
#   2004/12/27 20:53:24-08:00 juhl-lkml@dif.dk +2 -2
#   [IRDA]: Kill useless parens from return statements in irnet.h
# 
# ChangeSet
#   2004/12/27 20:52:34-08:00 bunk@stusta.de 
#   [IPVS]: Remove subscribers-only mailing list from MAINTAINERS.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# MAINTAINERS
#   2004/12/27 20:52:13-08:00 bunk@stusta.de +0 -1
#   [IPVS]: Remove subscribers-only mailing list from MAINTAINERS.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# ChangeSet
#   2004/12/27 20:51:40-08:00 bunk@stusta.de 
#   [PKT_SCHED]: Staticize and other cleanups.
#   
#   The patch below contans the following possible cleanups:
#   - make some needlessly global code static
#   - sch_htb.c: #undef HTB_DEBUG
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/sched/sch_prio.c
#   2004/12/27 20:51:20-08:00 bunk@stusta.de +2 -1
#   [PKT_SCHED]: Staticize and other cleanups.
#   
#   The patch below contans the following possible cleanups:
#   - make some needlessly global code static
#   - sch_htb.c: #undef HTB_DEBUG
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/sched/sch_ingress.c
#   2004/12/27 20:51:20-08:00 bunk@stusta.de +1 -1
#   [PKT_SCHED]: Staticize and other cleanups.
#   
#   The patch below contans the following possible cleanups:
#   - make some needlessly global code static
#   - sch_htb.c: #undef HTB_DEBUG
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/sched/sch_htb.c
#   2004/12/27 20:51:20-08:00 bunk@stusta.de +1 -1
#   [PKT_SCHED]: Staticize and other cleanups.
#   
#   The patch below contans the following possible cleanups:
#   - make some needlessly global code static
#   - sch_htb.c: #undef HTB_DEBUG
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/sched/sch_generic.c
#   2004/12/27 20:51:20-08:00 bunk@stusta.de +2 -2
#   [PKT_SCHED]: Staticize and other cleanups.
#   
#   The patch below contans the following possible cleanups:
#   - make some needlessly global code static
#   - sch_htb.c: #undef HTB_DEBUG
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/sched/sch_dsmark.c
#   2004/12/27 20:51:20-08:00 bunk@stusta.de +1 -1
#   [PKT_SCHED]: Staticize and other cleanups.
#   
#   The patch below contans the following possible cleanups:
#   - make some needlessly global code static
#   - sch_htb.c: #undef HTB_DEBUG
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/sched/sch_api.c
#   2004/12/27 20:51:20-08:00 bunk@stusta.de +6 -5
#   [PKT_SCHED]: Staticize and other cleanups.
#   
#   The patch below contans the following possible cleanups:
#   - make some needlessly global code static
#   - sch_htb.c: #undef HTB_DEBUG
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/sched/police.c
#   2004/12/27 20:51:20-08:00 bunk@stusta.de +4 -4
#   [PKT_SCHED]: Staticize and other cleanups.
#   
#   The patch below contans the following possible cleanups:
#   - make some needlessly global code static
#   - sch_htb.c: #undef HTB_DEBUG
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/sched/gact.c
#   2004/12/27 20:51:20-08:00 bunk@stusta.de +1 -1
#   [PKT_SCHED]: Staticize and other cleanups.
#   
#   The patch below contans the following possible cleanups:
#   - make some needlessly global code static
#   - sch_htb.c: #undef HTB_DEBUG
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# include/net/act_api.h
#   2004/12/27 20:51:20-08:00 bunk@stusta.de +0 -3
#   [PKT_SCHED]: Staticize and other cleanups.
#   
#   The patch below contans the following possible cleanups:
#   - make some needlessly global code static
#   - sch_htb.c: #undef HTB_DEBUG
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# ChangeSet
#   2004/12/27 20:50:34-08:00 bunk@stusta.de 
#   [RXRPC]: Staticize and remove unused globals and exports.
#   
#   The patch below contains the following possible cleanups:
#   - make some needlessly global code static
#   - remove the following unused global function:
#     - transport.c: rxrpc_clear_transport
#   - remove the following unneeded EXPORT_SYMBOL:
#     - rxrpc_syms.c: rxrpc_call_flush
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/rxrpc/transport.c
#   2004/12/27 20:50:14-08:00 bunk@stusta.de +0 -10
#   [RXRPC]: Staticize and remove unused globals and exports.
#   
#   The patch below contains the following possible cleanups:
#   - make some needlessly global code static
#   - remove the following unused global function:
#     - transport.c: rxrpc_clear_transport
#   - remove the following unneeded EXPORT_SYMBOL:
#     - rxrpc_syms.c: rxrpc_call_flush
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/rxrpc/rxrpc_syms.c
#   2004/12/27 20:50:14-08:00 bunk@stusta.de +0 -1
#   [RXRPC]: Staticize and remove unused globals and exports.
#   
#   The patch below contains the following possible cleanups:
#   - make some needlessly global code static
#   - remove the following unused global function:
#     - transport.c: rxrpc_clear_transport
#   - remove the following unneeded EXPORT_SYMBOL:
#     - rxrpc_syms.c: rxrpc_call_flush
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/rxrpc/peer.c
#   2004/12/27 20:50:14-08:00 bunk@stusta.de +3 -1
#   [RXRPC]: Staticize and remove unused globals and exports.
#   
#   The patch below contains the following possible cleanups:
#   - make some needlessly global code static
#   - remove the following unused global function:
#     - transport.c: rxrpc_clear_transport
#   - remove the following unneeded EXPORT_SYMBOL:
#     - rxrpc_syms.c: rxrpc_call_flush
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/rxrpc/internal.h
#   2004/12/27 20:50:14-08:00 bunk@stusta.de +0 -3
#   [RXRPC]: Staticize and remove unused globals and exports.
#   
#   The patch below contains the following possible cleanups:
#   - make some needlessly global code static
#   - remove the following unused global function:
#     - transport.c: rxrpc_clear_transport
#   - remove the following unneeded EXPORT_SYMBOL:
#     - rxrpc_syms.c: rxrpc_call_flush
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/rxrpc/connection.c
#   2004/12/27 20:50:13-08:00 bunk@stusta.de +3 -1
#   [RXRPC]: Staticize and remove unused globals and exports.
#   
#   The patch below contains the following possible cleanups:
#   - make some needlessly global code static
#   - remove the following unused global function:
#     - transport.c: rxrpc_clear_transport
#   - remove the following unneeded EXPORT_SYMBOL:
#     - rxrpc_syms.c: rxrpc_call_flush
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/rxrpc/call.c
#   2004/12/27 20:50:13-08:00 bunk@stusta.de +9 -6
#   [RXRPC]: Staticize and remove unused globals and exports.
#   
#   The patch below contains the following possible cleanups:
#   - make some needlessly global code static
#   - remove the following unused global function:
#     - transport.c: rxrpc_clear_transport
#   - remove the following unneeded EXPORT_SYMBOL:
#     - rxrpc_syms.c: rxrpc_call_flush
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# include/rxrpc/transport.h
#   2004/12/27 20:50:13-08:00 bunk@stusta.de +0 -2
#   [RXRPC]: Staticize and remove unused globals and exports.
#   
#   The patch below contains the following possible cleanups:
#   - make some needlessly global code static
#   - remove the following unused global function:
#     - transport.c: rxrpc_clear_transport
#   - remove the following unneeded EXPORT_SYMBOL:
#     - rxrpc_syms.c: rxrpc_call_flush
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# include/rxrpc/packet.h
#   2004/12/27 20:50:13-08:00 bunk@stusta.de +0 -2
#   [RXRPC]: Staticize and remove unused globals and exports.
#   
#   The patch below contains the following possible cleanups:
#   - make some needlessly global code static
#   - remove the following unused global function:
#     - transport.c: rxrpc_clear_transport
#   - remove the following unneeded EXPORT_SYMBOL:
#     - rxrpc_syms.c: rxrpc_call_flush
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# include/rxrpc/call.h
#   2004/12/27 20:50:13-08:00 bunk@stusta.de +0 -5
#   [RXRPC]: Staticize and remove unused globals and exports.
#   
#   The patch below contains the following possible cleanups:
#   - make some needlessly global code static
#   - remove the following unused global function:
#     - transport.c: rxrpc_clear_transport
#   - remove the following unneeded EXPORT_SYMBOL:
#     - rxrpc_syms.c: rxrpc_call_flush
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# ChangeSet
#   2004/12/27 20:49:18-08:00 bunk@stusta.de 
#   [ROSE]: Staticize and remove unused global functions.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/rose/rose_subr.c
#   2004/12/27 20:48:58-08:00 bunk@stusta.de +3 -1
#   [ROSE]: Staticize and remove unused global functions.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/rose/rose_route.c
#   2004/12/27 20:48:58-08:00 bunk@stusta.de +2 -2
#   [ROSE]: Staticize and remove unused global functions.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/rose/rose_link.c
#   2004/12/27 20:48:58-08:00 bunk@stusta.de +7 -32
#   [ROSE]: Staticize and remove unused global functions.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/rose/rose_dev.c
#   2004/12/27 20:48:58-08:00 bunk@stusta.de +0 -32
#   [ROSE]: Staticize and remove unused global functions.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/rose/af_rose.c
#   2004/12/27 20:48:58-08:00 bunk@stusta.de +1 -1
#   [ROSE]: Staticize and remove unused global functions.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# include/net/rose.h
#   2004/12/27 20:48:57-08:00 bunk@stusta.de +0 -8
#   [ROSE]: Staticize and remove unused global functions.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# ChangeSet
#   2004/12/27 20:48:19-08:00 bunk@stusta.de 
#   [NETROM]: Make needlessly global code static.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/netrom/nr_route.c
#   2004/12/27 20:47:59-08:00 bunk@stusta.de +3 -2
#   [NETROM]: Make needlessly global code static.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/netrom/af_netrom.c
#   2004/12/27 20:47:59-08:00 bunk@stusta.de +1 -1
#   [NETROM]: Make needlessly global code static.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# ChangeSet
#   2004/12/27 20:46:42-08:00 bunk@stusta.de 
#   [LLC]: Staticize and remove unnecessary functions and exports.
#   
#   The patch below contains the following possible cleanups:
#   - make some needlessly global code static
#   - remove the following unused global functions:
#     - lc_c_ac.c: llc_conn_ac_report_status
#     - lc_c_ac.c: llc_conn_ac_send_dm_rsp_f_set_f_flag
#     - lc_c_ac.c: llc_conn_ac_resend_i_cmd_p_set_1
#     - lc_c_ac.c: llc_conn_ac_resend_i_cmd_p_set_1_or_send_rr
#     - lc_c_ac.c: llc_conn_ac_send_ack_cmd_p_set_1
#     - lc_c_ac.c: llc_conn_ac_send_ua_rsp_f_set_f_flag
#     - lc_c_ac.c: llc_conn_ac_set_f_flag_p
#     - llc_c_ev.c: llc_conn_ev_conn_resp
#     - llc_c_ev.c: llc_conn_ev_rst_resp
#     - llc_c_ev.c: llc_conn_ev_rx_xxx_cmd_pbit_set_0
#     - llc_c_ev.c: llc_conn_ev_rx_xxx_yyy
#     - llc_c_ev.c: llc_conn_ev_any_tmr_exp
#     - llc_c_ev.c: llc_conn_ev_qlfy_init_p_f_cycle
#     - llc_c_ev.c: llc_conn_ev_qlfy_set_status_impossible
#     - llc_c_ev.c: llc_conn_ev_qlfy_set_status_received
#     - llc_if.c: llc_build_and_send_reset_pkt
#     - llc_pdu.c: llc_pdu_decode_cr_bit
#   - remove the following unneeded EXPORT_SYMBOL:
#     - llc_core.c: llc_sap_list_lock
#   
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/llc/llc_station.c
#   2004/12/27 20:46:22-08:00 bunk@stusta.de +1 -1
#   [LLC]: Staticize and remove unnecessary functions and exports.
#   
#   The patch below contains the following possible cleanups:
#   - make some needlessly global code static
#   - remove the following unused global functions:
#     - lc_c_ac.c: llc_conn_ac_report_status
#     - lc_c_ac.c: llc_conn_ac_send_dm_rsp_f_set_f_flag
#     - lc_c_ac.c: llc_conn_ac_resend_i_cmd_p_set_1
#     - lc_c_ac.c: llc_conn_ac_resend_i_cmd_p_set_1_or_send_rr
#     - lc_c_ac.c: llc_conn_ac_send_ack_cmd_p_set_1
#     - lc_c_ac.c: llc_conn_ac_send_ua_rsp_f_set_f_flag
#     - lc_c_ac.c: llc_conn_ac_set_f_flag_p
#     - llc_c_ev.c: llc_conn_ev_conn_resp
#     - llc_c_ev.c: llc_conn_ev_rst_resp
#     - llc_c_ev.c: llc_conn_ev_rx_xxx_cmd_pbit_set_0
#     - llc_c_ev.c: llc_conn_ev_rx_xxx_yyy
#     - llc_c_ev.c: llc_conn_ev_any_tmr_exp
#     - llc_c_ev.c: llc_conn_ev_qlfy_init_p_f_cycle
#     - llc_c_ev.c: llc_conn_ev_qlfy_set_status_impossible
#     - llc_c_ev.c: llc_conn_ev_qlfy_set_status_received
#     - llc_if.c: llc_build_and_send_reset_pkt
#     - llc_pdu.c: llc_pdu_decode_cr_bit
#   - remove the following unneeded EXPORT_SYMBOL:
#     - llc_core.c: llc_sap_list_lock
#   
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/llc/llc_sap.c
#   2004/12/27 20:46:22-08:00 bunk@stusta.de +3 -2
#   [LLC]: Staticize and remove unnecessary functions and exports.
#   
#   The patch below contains the following possible cleanups:
#   - make some needlessly global code static
#   - remove the following unused global functions:
#     - lc_c_ac.c: llc_conn_ac_report_status
#     - lc_c_ac.c: llc_conn_ac_send_dm_rsp_f_set_f_flag
#     - lc_c_ac.c: llc_conn_ac_resend_i_cmd_p_set_1
#     - lc_c_ac.c: llc_conn_ac_resend_i_cmd_p_set_1_or_send_rr
#     - lc_c_ac.c: llc_conn_ac_send_ack_cmd_p_set_1
#     - lc_c_ac.c: llc_conn_ac_send_ua_rsp_f_set_f_flag
#     - lc_c_ac.c: llc_conn_ac_set_f_flag_p
#     - llc_c_ev.c: llc_conn_ev_conn_resp
#     - llc_c_ev.c: llc_conn_ev_rst_resp
#     - llc_c_ev.c: llc_conn_ev_rx_xxx_cmd_pbit_set_0
#     - llc_c_ev.c: llc_conn_ev_rx_xxx_yyy
#     - llc_c_ev.c: llc_conn_ev_any_tmr_exp
#     - llc_c_ev.c: llc_conn_ev_qlfy_init_p_f_cycle
#     - llc_c_ev.c: llc_conn_ev_qlfy_set_status_impossible
#     - llc_c_ev.c: llc_conn_ev_qlfy_set_status_received
#     - llc_if.c: llc_build_and_send_reset_pkt
#     - llc_pdu.c: llc_pdu_decode_cr_bit
#   - remove the following unneeded EXPORT_SYMBOL:
#     - llc_core.c: llc_sap_list_lock
#   
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/llc/llc_proc.c
#   2004/12/27 20:46:22-08:00 bunk@stusta.de +2 -2
#   [LLC]: Staticize and remove unnecessary functions and exports.
#   
#   The patch below contains the following possible cleanups:
#   - make some needlessly global code static
#   - remove the following unused global functions:
#     - lc_c_ac.c: llc_conn_ac_report_status
#     - lc_c_ac.c: llc_conn_ac_send_dm_rsp_f_set_f_flag
#     - lc_c_ac.c: llc_conn_ac_resend_i_cmd_p_set_1
#     - lc_c_ac.c: llc_conn_ac_resend_i_cmd_p_set_1_or_send_rr
#     - lc_c_ac.c: llc_conn_ac_send_ack_cmd_p_set_1
#     - lc_c_ac.c: llc_conn_ac_send_ua_rsp_f_set_f_flag
#     - lc_c_ac.c: llc_conn_ac_set_f_flag_p
#     - llc_c_ev.c: llc_conn_ev_conn_resp
#     - llc_c_ev.c: llc_conn_ev_rst_resp
#     - llc_c_ev.c: llc_conn_ev_rx_xxx_cmd_pbit_set_0
#     - llc_c_ev.c: llc_conn_ev_rx_xxx_yyy
#     - llc_c_ev.c: llc_conn_ev_any_tmr_exp
#     - llc_c_ev.c: llc_conn_ev_qlfy_init_p_f_cycle
#     - llc_c_ev.c: llc_conn_ev_qlfy_set_status_impossible
#     - llc_c_ev.c: llc_conn_ev_qlfy_set_status_received
#     - llc_if.c: llc_build_and_send_reset_pkt
#     - llc_pdu.c: llc_pdu_decode_cr_bit
#   - remove the following unneeded EXPORT_SYMBOL:
#     - llc_core.c: llc_sap_list_lock
#   
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/llc/llc_pdu.c
#   2004/12/27 20:46:22-08:00 bunk@stusta.de +0 -13
#   [LLC]: Staticize and remove unnecessary functions and exports.
#   
#   The patch below contains the following possible cleanups:
#   - make some needlessly global code static
#   - remove the following unused global functions:
#     - lc_c_ac.c: llc_conn_ac_report_status
#     - lc_c_ac.c: llc_conn_ac_send_dm_rsp_f_set_f_flag
#     - lc_c_ac.c: llc_conn_ac_resend_i_cmd_p_set_1
#     - lc_c_ac.c: llc_conn_ac_resend_i_cmd_p_set_1_or_send_rr
#     - lc_c_ac.c: llc_conn_ac_send_ack_cmd_p_set_1
#     - lc_c_ac.c: llc_conn_ac_send_ua_rsp_f_set_f_flag
#     - lc_c_ac.c: llc_conn_ac_set_f_flag_p
#     - llc_c_ev.c: llc_conn_ev_conn_resp
#     - llc_c_ev.c: llc_conn_ev_rst_resp
#     - llc_c_ev.c: llc_conn_ev_rx_xxx_cmd_pbit_set_0
#     - llc_c_ev.c: llc_conn_ev_rx_xxx_yyy
#     - llc_c_ev.c: llc_conn_ev_any_tmr_exp
#     - llc_c_ev.c: llc_conn_ev_qlfy_init_p_f_cycle
#     - llc_c_ev.c: llc_conn_ev_qlfy_set_status_impossible
#     - llc_c_ev.c: llc_conn_ev_qlfy_set_status_received
#     - llc_if.c: llc_build_and_send_reset_pkt
#     - llc_pdu.c: llc_pdu_decode_cr_bit
#   - remove the following unneeded EXPORT_SYMBOL:
#     - llc_core.c: llc_sap_list_lock
#   
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/llc/llc_if.c
#   2004/12/27 20:46:22-08:00 bunk@stusta.de +0 -24
#   [LLC]: Staticize and remove unnecessary functions and exports.
#   
#   The patch below contains the following possible cleanups:
#   - make some needlessly global code static
#   - remove the following unused global functions:
#     - lc_c_ac.c: llc_conn_ac_report_status
#     - lc_c_ac.c: llc_conn_ac_send_dm_rsp_f_set_f_flag
#     - lc_c_ac.c: llc_conn_ac_resend_i_cmd_p_set_1
#     - lc_c_ac.c: llc_conn_ac_resend_i_cmd_p_set_1_or_send_rr
#     - lc_c_ac.c: llc_conn_ac_send_ack_cmd_p_set_1
#     - lc_c_ac.c: llc_conn_ac_send_ua_rsp_f_set_f_flag
#     - lc_c_ac.c: llc_conn_ac_set_f_flag_p
#     - llc_c_ev.c: llc_conn_ev_conn_resp
#     - llc_c_ev.c: llc_conn_ev_rst_resp
#     - llc_c_ev.c: llc_conn_ev_rx_xxx_cmd_pbit_set_0
#     - llc_c_ev.c: llc_conn_ev_rx_xxx_yyy
#     - llc_c_ev.c: llc_conn_ev_any_tmr_exp
#     - llc_c_ev.c: llc_conn_ev_qlfy_init_p_f_cycle
#     - llc_c_ev.c: llc_conn_ev_qlfy_set_status_impossible
#     - llc_c_ev.c: llc_conn_ev_qlfy_set_status_received
#     - llc_if.c: llc_build_and_send_reset_pkt
#     - llc_pdu.c: llc_pdu_decode_cr_bit
#   - remove the following unneeded EXPORT_SYMBOL:
#     - llc_core.c: llc_sap_list_lock
#   
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/llc/llc_core.c
#   2004/12/27 20:46:22-08:00 bunk@stusta.de +3 -4
#   [LLC]: Staticize and remove unnecessary functions and exports.
#   
#   The patch below contains the following possible cleanups:
#   - make some needlessly global code static
#   - remove the following unused global functions:
#     - lc_c_ac.c: llc_conn_ac_report_status
#     - lc_c_ac.c: llc_conn_ac_send_dm_rsp_f_set_f_flag
#     - lc_c_ac.c: llc_conn_ac_resend_i_cmd_p_set_1
#     - lc_c_ac.c: llc_conn_ac_resend_i_cmd_p_set_1_or_send_rr
#     - lc_c_ac.c: llc_conn_ac_send_ack_cmd_p_set_1
#     - lc_c_ac.c: llc_conn_ac_send_ua_rsp_f_set_f_flag
#     - lc_c_ac.c: llc_conn_ac_set_f_flag_p
#     - llc_c_ev.c: llc_conn_ev_conn_resp
#     - llc_c_ev.c: llc_conn_ev_rst_resp
#     - llc_c_ev.c: llc_conn_ev_rx_xxx_cmd_pbit_set_0
#     - llc_c_ev.c: llc_conn_ev_rx_xxx_yyy
#     - llc_c_ev.c: llc_conn_ev_any_tmr_exp
#     - llc_c_ev.c: llc_conn_ev_qlfy_init_p_f_cycle
#     - llc_c_ev.c: llc_conn_ev_qlfy_set_status_impossible
#     - llc_c_ev.c: llc_conn_ev_qlfy_set_status_received
#     - llc_if.c: llc_build_and_send_reset_pkt
#     - llc_pdu.c: llc_pdu_decode_cr_bit
#   - remove the following unneeded EXPORT_SYMBOL:
#     - llc_core.c: llc_sap_list_lock
#   
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/llc/llc_conn.c
#   2004/12/27 20:46:22-08:00 bunk@stusta.de +4 -3
#   [LLC]: Staticize and remove unnecessary functions and exports.
#   
#   The patch below contains the following possible cleanups:
#   - make some needlessly global code static
#   - remove the following unused global functions:
#     - lc_c_ac.c: llc_conn_ac_report_status
#     - lc_c_ac.c: llc_conn_ac_send_dm_rsp_f_set_f_flag
#     - lc_c_ac.c: llc_conn_ac_resend_i_cmd_p_set_1
#     - lc_c_ac.c: llc_conn_ac_resend_i_cmd_p_set_1_or_send_rr
#     - lc_c_ac.c: llc_conn_ac_send_ack_cmd_p_set_1
#     - lc_c_ac.c: llc_conn_ac_send_ua_rsp_f_set_f_flag
#     - lc_c_ac.c: llc_conn_ac_set_f_flag_p
#     - llc_c_ev.c: llc_conn_ev_conn_resp
#     - llc_c_ev.c: llc_conn_ev_rst_resp
#     - llc_c_ev.c: llc_conn_ev_rx_xxx_cmd_pbit_set_0
#     - llc_c_ev.c: llc_conn_ev_rx_xxx_yyy
#     - llc_c_ev.c: llc_conn_ev_any_tmr_exp
#     - llc_c_ev.c: llc_conn_ev_qlfy_init_p_f_cycle
#     - llc_c_ev.c: llc_conn_ev_qlfy_set_status_impossible
#     - llc_c_ev.c: llc_conn_ev_qlfy_set_status_received
#     - llc_if.c: llc_build_and_send_reset_pkt
#     - llc_pdu.c: llc_pdu_decode_cr_bit
#   - remove the following unneeded EXPORT_SYMBOL:
#     - llc_core.c: llc_sap_list_lock
#   
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/llc/llc_c_ev.c
#   2004/12/27 20:46:22-08:00 bunk@stusta.de +0 -88
#   [LLC]: Staticize and remove unnecessary functions and exports.
#   
#   The patch below contains the following possible cleanups:
#   - make some needlessly global code static
#   - remove the following unused global functions:
#     - lc_c_ac.c: llc_conn_ac_report_status
#     - lc_c_ac.c: llc_conn_ac_send_dm_rsp_f_set_f_flag
#     - lc_c_ac.c: llc_conn_ac_resend_i_cmd_p_set_1
#     - lc_c_ac.c: llc_conn_ac_resend_i_cmd_p_set_1_or_send_rr
#     - lc_c_ac.c: llc_conn_ac_send_ack_cmd_p_set_1
#     - lc_c_ac.c: llc_conn_ac_send_ua_rsp_f_set_f_flag
#     - lc_c_ac.c: llc_conn_ac_set_f_flag_p
#     - llc_c_ev.c: llc_conn_ev_conn_resp
#     - llc_c_ev.c: llc_conn_ev_rst_resp
#     - llc_c_ev.c: llc_conn_ev_rx_xxx_cmd_pbit_set_0
#     - llc_c_ev.c: llc_conn_ev_rx_xxx_yyy
#     - llc_c_ev.c: llc_conn_ev_any_tmr_exp
#     - llc_c_ev.c: llc_conn_ev_qlfy_init_p_f_cycle
#     - llc_c_ev.c: llc_conn_ev_qlfy_set_status_impossible
#     - llc_c_ev.c: llc_conn_ev_qlfy_set_status_received
#     - llc_if.c: llc_build_and_send_reset_pkt
#     - llc_pdu.c: llc_pdu_decode_cr_bit
#   - remove the following unneeded EXPORT_SYMBOL:
#     - llc_core.c: llc_sap_list_lock
#   
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/llc/llc_c_ac.c
#   2004/12/27 20:46:22-08:00 bunk@stusta.de +14 -113
#   [LLC]: Staticize and remove unnecessary functions and exports.
#   
#   The patch below contains the following possible cleanups:
#   - make some needlessly global code static
#   - remove the following unused global functions:
#     - lc_c_ac.c: llc_conn_ac_report_status
#     - lc_c_ac.c: llc_conn_ac_send_dm_rsp_f_set_f_flag
#     - lc_c_ac.c: llc_conn_ac_resend_i_cmd_p_set_1
#     - lc_c_ac.c: llc_conn_ac_resend_i_cmd_p_set_1_or_send_rr
#     - lc_c_ac.c: llc_conn_ac_send_ack_cmd_p_set_1
#     - lc_c_ac.c: llc_conn_ac_send_ua_rsp_f_set_f_flag
#     - lc_c_ac.c: llc_conn_ac_set_f_flag_p
#     - llc_c_ev.c: llc_conn_ev_conn_resp
#     - llc_c_ev.c: llc_conn_ev_rst_resp
#     - llc_c_ev.c: llc_conn_ev_rx_xxx_cmd_pbit_set_0
#     - llc_c_ev.c: llc_conn_ev_rx_xxx_yyy
#     - llc_c_ev.c: llc_conn_ev_any_tmr_exp
#     - llc_c_ev.c: llc_conn_ev_qlfy_init_p_f_cycle
#     - llc_c_ev.c: llc_conn_ev_qlfy_set_status_impossible
#     - llc_c_ev.c: llc_conn_ev_qlfy_set_status_received
#     - llc_if.c: llc_build_and_send_reset_pkt
#     - llc_pdu.c: llc_pdu_decode_cr_bit
#   - remove the following unneeded EXPORT_SYMBOL:
#     - llc_core.c: llc_sap_list_lock
#   
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# include/net/llc_sap.h
#   2004/12/27 20:46:22-08:00 bunk@stusta.de +0 -1
#   [LLC]: Staticize and remove unnecessary functions and exports.
#   
#   The patch below contains the following possible cleanups:
#   - make some needlessly global code static
#   - remove the following unused global functions:
#     - lc_c_ac.c: llc_conn_ac_report_status
#     - lc_c_ac.c: llc_conn_ac_send_dm_rsp_f_set_f_flag
#     - lc_c_ac.c: llc_conn_ac_resend_i_cmd_p_set_1
#     - lc_c_ac.c: llc_conn_ac_resend_i_cmd_p_set_1_or_send_rr
#     - lc_c_ac.c: llc_conn_ac_send_ack_cmd_p_set_1
#     - lc_c_ac.c: llc_conn_ac_send_ua_rsp_f_set_f_flag
#     - lc_c_ac.c: llc_conn_ac_set_f_flag_p
#     - llc_c_ev.c: llc_conn_ev_conn_resp
#     - llc_c_ev.c: llc_conn_ev_rst_resp
#     - llc_c_ev.c: llc_conn_ev_rx_xxx_cmd_pbit_set_0
#     - llc_c_ev.c: llc_conn_ev_rx_xxx_yyy
#     - llc_c_ev.c: llc_conn_ev_any_tmr_exp
#     - llc_c_ev.c: llc_conn_ev_qlfy_init_p_f_cycle
#     - llc_c_ev.c: llc_conn_ev_qlfy_set_status_impossible
#     - llc_c_ev.c: llc_conn_ev_qlfy_set_status_received
#     - llc_if.c: llc_build_and_send_reset_pkt
#     - llc_pdu.c: llc_pdu_decode_cr_bit
#   - remove the following unneeded EXPORT_SYMBOL:
#     - llc_core.c: llc_sap_list_lock
#   
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# include/net/llc_pdu.h
#   2004/12/27 20:46:21-08:00 bunk@stusta.de +0 -1
#   [LLC]: Staticize and remove unnecessary functions and exports.
#   
#   The patch below contains the following possible cleanups:
#   - make some needlessly global code static
#   - remove the following unused global functions:
#     - lc_c_ac.c: llc_conn_ac_report_status
#     - lc_c_ac.c: llc_conn_ac_send_dm_rsp_f_set_f_flag
#     - lc_c_ac.c: llc_conn_ac_resend_i_cmd_p_set_1
#     - lc_c_ac.c: llc_conn_ac_resend_i_cmd_p_set_1_or_send_rr
#     - lc_c_ac.c: llc_conn_ac_send_ack_cmd_p_set_1
#     - lc_c_ac.c: llc_conn_ac_send_ua_rsp_f_set_f_flag
#     - lc_c_ac.c: llc_conn_ac_set_f_flag_p
#     - llc_c_ev.c: llc_conn_ev_conn_resp
#     - llc_c_ev.c: llc_conn_ev_rst_resp
#     - llc_c_ev.c: llc_conn_ev_rx_xxx_cmd_pbit_set_0
#     - llc_c_ev.c: llc_conn_ev_rx_xxx_yyy
#     - llc_c_ev.c: llc_conn_ev_any_tmr_exp
#     - llc_c_ev.c: llc_conn_ev_qlfy_init_p_f_cycle
#     - llc_c_ev.c: llc_conn_ev_qlfy_set_status_impossible
#     - llc_c_ev.c: llc_conn_ev_qlfy_set_status_received
#     - llc_if.c: llc_build_and_send_reset_pkt
#     - llc_pdu.c: llc_pdu_decode_cr_bit
#   - remove the following unneeded EXPORT_SYMBOL:
#     - llc_core.c: llc_sap_list_lock
#   
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# include/net/llc_conn.h
#   2004/12/27 20:46:21-08:00 bunk@stusta.de +0 -3
#   [LLC]: Staticize and remove unnecessary functions and exports.
#   
#   The patch below contains the following possible cleanups:
#   - make some needlessly global code static
#   - remove the following unused global functions:
#     - lc_c_ac.c: llc_conn_ac_report_status
#     - lc_c_ac.c: llc_conn_ac_send_dm_rsp_f_set_f_flag
#     - lc_c_ac.c: llc_conn_ac_resend_i_cmd_p_set_1
#     - lc_c_ac.c: llc_conn_ac_resend_i_cmd_p_set_1_or_send_rr
#     - lc_c_ac.c: llc_conn_ac_send_ack_cmd_p_set_1
#     - lc_c_ac.c: llc_conn_ac_send_ua_rsp_f_set_f_flag
#     - lc_c_ac.c: llc_conn_ac_set_f_flag_p
#     - llc_c_ev.c: llc_conn_ev_conn_resp
#     - llc_c_ev.c: llc_conn_ev_rst_resp
#     - llc_c_ev.c: llc_conn_ev_rx_xxx_cmd_pbit_set_0
#     - llc_c_ev.c: llc_conn_ev_rx_xxx_yyy
#     - llc_c_ev.c: llc_conn_ev_any_tmr_exp
#     - llc_c_ev.c: llc_conn_ev_qlfy_init_p_f_cycle
#     - llc_c_ev.c: llc_conn_ev_qlfy_set_status_impossible
#     - llc_c_ev.c: llc_conn_ev_qlfy_set_status_received
#     - llc_if.c: llc_build_and_send_reset_pkt
#     - llc_pdu.c: llc_pdu_decode_cr_bit
#   - remove the following unneeded EXPORT_SYMBOL:
#     - llc_core.c: llc_sap_list_lock
#   
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# include/net/llc_c_ev.h
#   2004/12/27 20:46:21-08:00 bunk@stusta.de +0 -12
#   [LLC]: Staticize and remove unnecessary functions and exports.
#   
#   The patch below contains the following possible cleanups:
#   - make some needlessly global code static
#   - remove the following unused global functions:
#     - lc_c_ac.c: llc_conn_ac_report_status
#     - lc_c_ac.c: llc_conn_ac_send_dm_rsp_f_set_f_flag
#     - lc_c_ac.c: llc_conn_ac_resend_i_cmd_p_set_1
#     - lc_c_ac.c: llc_conn_ac_resend_i_cmd_p_set_1_or_send_rr
#     - lc_c_ac.c: llc_conn_ac_send_ack_cmd_p_set_1
#     - lc_c_ac.c: llc_conn_ac_send_ua_rsp_f_set_f_flag
#     - lc_c_ac.c: llc_conn_ac_set_f_flag_p
#     - llc_c_ev.c: llc_conn_ev_conn_resp
#     - llc_c_ev.c: llc_conn_ev_rst_resp
#     - llc_c_ev.c: llc_conn_ev_rx_xxx_cmd_pbit_set_0
#     - llc_c_ev.c: llc_conn_ev_rx_xxx_yyy
#     - llc_c_ev.c: llc_conn_ev_any_tmr_exp
#     - llc_c_ev.c: llc_conn_ev_qlfy_init_p_f_cycle
#     - llc_c_ev.c: llc_conn_ev_qlfy_set_status_impossible
#     - llc_c_ev.c: llc_conn_ev_qlfy_set_status_received
#     - llc_if.c: llc_build_and_send_reset_pkt
#     - llc_pdu.c: llc_pdu_decode_cr_bit
#   - remove the following unneeded EXPORT_SYMBOL:
#     - llc_core.c: llc_sap_list_lock
#   
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# include/net/llc_c_ac.h
#   2004/12/27 20:46:21-08:00 bunk@stusta.de +0 -19
#   [LLC]: Staticize and remove unnecessary functions and exports.
#   
#   The patch below contains the following possible cleanups:
#   - make some needlessly global code static
#   - remove the following unused global functions:
#     - lc_c_ac.c: llc_conn_ac_report_status
#     - lc_c_ac.c: llc_conn_ac_send_dm_rsp_f_set_f_flag
#     - lc_c_ac.c: llc_conn_ac_resend_i_cmd_p_set_1
#     - lc_c_ac.c: llc_conn_ac_resend_i_cmd_p_set_1_or_send_rr
#     - lc_c_ac.c: llc_conn_ac_send_ack_cmd_p_set_1
#     - lc_c_ac.c: llc_conn_ac_send_ua_rsp_f_set_f_flag
#     - lc_c_ac.c: llc_conn_ac_set_f_flag_p
#     - llc_c_ev.c: llc_conn_ev_conn_resp
#     - llc_c_ev.c: llc_conn_ev_rst_resp
#     - llc_c_ev.c: llc_conn_ev_rx_xxx_cmd_pbit_set_0
#     - llc_c_ev.c: llc_conn_ev_rx_xxx_yyy
#     - llc_c_ev.c: llc_conn_ev_any_tmr_exp
#     - llc_c_ev.c: llc_conn_ev_qlfy_init_p_f_cycle
#     - llc_c_ev.c: llc_conn_ev_qlfy_set_status_impossible
#     - llc_c_ev.c: llc_conn_ev_qlfy_set_status_received
#     - llc_if.c: llc_build_and_send_reset_pkt
#     - llc_pdu.c: llc_pdu_decode_cr_bit
#   - remove the following unneeded EXPORT_SYMBOL:
#     - llc_core.c: llc_sap_list_lock
#   
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# ChangeSet
#   2004/12/27 20:45:07-08:00 bunk@stusta.de 
#   [IRDA]: Staticize and remove unnecessary exports.
#   
#   The patch below contains the following possible cleanups:
#   - make some needlessly global code static
#   - remove the following unused global functions:
#     - discovery.c: irlmp_find_device
#     - ircomm/ircomm_param.c: ircomm_param_flush
#     - irda_device.c: irda_device_set_dtr_rts
#     - irda_device.c: irda_device_change_speed
#     - irda_device.c: irda_device_set_mode
#     - iriap.c: iriap_getinfobasedetails_request
#     - iriap.c: iriap_getinfobasedetails_confirm
#     - iriap.c: iriap_getobjects_request
#     - iriap.c: iriap_getobjects_confirm
#     - iriap.c: iriap_getvalue
#     - irlan_client.c: irlan_client_reconnect_data_channel
#     - irlap_frame.c: irlap_send_frmr_frame
#     - irlmp.c: irlmp_status_request
#   - remove the follwong unused global variables:
#     - irnet/irnet_ppp.c: irnet_ppp_ops
#     - irsysctl.c: sysctl_compression
#   - qos.c: #ifndef CONFIG_IRDA_DYNAMIC_WINDOW irlap_requested_line_capacity
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/irda/qos.c
#   2004/12/27 20:44:25-08:00 bunk@stusta.de +16 -9
#   [IRDA]: Staticize and remove unnecessary exports.
# 
# net/irda/parameters.c
#   2004/12/27 20:44:25-08:00 bunk@stusta.de +6 -5
#   [IRDA]: Staticize and remove unnecessary exports.
# 
# net/irda/irttp.c
#   2004/12/27 20:44:25-08:00 bunk@stusta.de +8 -4
#   [IRDA]: Staticize and remove unnecessary exports.
# 
# net/irda/irsysctl.c
#   2004/12/27 20:44:25-08:00 bunk@stusta.de +0 -1
#   [IRDA]: Staticize and remove unnecessary exports.
# 
# net/irda/irnet/irnet_ppp.h
#   2004/12/27 20:44:25-08:00 bunk@stusta.de +0 -7
#   [IRDA]: Staticize and remove unnecessary exports.
# 
# net/irda/irnet/irnet_ppp.c
#   2004/12/27 20:44:25-08:00 bunk@stusta.de +7 -1
#   [IRDA]: Staticize and remove unnecessary exports.
# 
# net/irda/irnet/irnet.h
#   2004/12/27 20:44:25-08:00 bunk@stusta.de +0 -2
#   [IRDA]: Staticize and remove unnecessary exports.
# 
# net/irda/irmod.c
#   2004/12/27 20:44:25-08:00 bunk@stusta.de +2 -2
#   [IRDA]: Staticize and remove unnecessary exports.
# 
# net/irda/irlmp.c
#   2004/12/27 20:44:25-08:00 bunk@stusta.de +5 -7
#   [IRDA]: Staticize and remove unnecessary exports.
# 
# net/irda/irlap_frame.c
#   2004/12/27 20:44:25-08:00 bunk@stusta.de +5 -30
#   [IRDA]: Staticize and remove unnecessary exports.
# 
# net/irda/irlap_event.c
#   2004/12/27 20:44:25-08:00 bunk@stusta.de +1 -1
#   [IRDA]: Staticize and remove unnecessary exports.
# 
# net/irda/irlap.c
#   2004/12/27 20:44:25-08:00 bunk@stusta.de +5 -3
#   [IRDA]: Staticize and remove unnecessary exports.
# 
# net/irda/irlan/irlan_provider.c
#   2004/12/27 20:44:25-08:00 bunk@stusta.de +3 -3
#   [IRDA]: Staticize and remove unnecessary exports.
# 
# net/irda/irlan/irlan_common.c
#   2004/12/27 20:44:25-08:00 bunk@stusta.de +20 -12
#   [IRDA]: Staticize and remove unnecessary exports.
# 
# net/irda/irlan/irlan_client.c
#   2004/12/27 20:44:25-08:00 bunk@stusta.de +3 -38
#   [IRDA]: Staticize and remove unnecessary exports.
# 
# net/irda/irias_object.c
#   2004/12/27 20:44:25-08:00 bunk@stusta.de +3 -3
#   [IRDA]: Staticize and remove unnecessary exports.
# 
# net/irda/iriap.c
#   2004/12/27 20:44:25-08:00 bunk@stusta.de +19 -32
#   [IRDA]: Staticize and remove unnecessary exports.
# 
# net/irda/irda_device.c
#   2004/12/27 20:44:25-08:00 bunk@stusta.de +1 -69
#   [IRDA]: Staticize and remove unnecessary exports.
# 
# net/irda/ircomm/ircomm_tty_ioctl.c
#   2004/12/27 20:44:25-08:00 bunk@stusta.de +1 -1
#   [IRDA]: Staticize and remove unnecessary exports.
# 
# net/irda/ircomm/ircomm_tty_attach.c
#   2004/12/27 20:44:25-08:00 bunk@stusta.de +7 -5
#   [IRDA]: Staticize and remove unnecessary exports.
# 
# net/irda/ircomm/ircomm_tty.c
#   2004/12/27 20:44:25-08:00 bunk@stusta.de +4 -3
#   [IRDA]: Staticize and remove unnecessary exports.
# 
# net/irda/ircomm/ircomm_param.c
#   2004/12/27 20:44:25-08:00 bunk@stusta.de +0 -17
#   [IRDA]: Staticize and remove unnecessary exports.
# 
# net/irda/ircomm/ircomm_lmp.c
#   2004/12/27 20:44:25-08:00 bunk@stusta.de +65 -63
#   [IRDA]: Staticize and remove unnecessary exports.
# 
# net/irda/ircomm/ircomm_event.c
#   2004/12/27 20:44:25-08:00 bunk@stusta.de +1 -1
#   [IRDA]: Staticize and remove unnecessary exports.
# 
# net/irda/ircomm/ircomm_core.c
#   2004/12/27 20:44:25-08:00 bunk@stusta.de +2 -2
#   [IRDA]: Staticize and remove unnecessary exports.
# 
# net/irda/discovery.c
#   2004/12/27 20:44:25-08:00 bunk@stusta.de +0 -35
#   [IRDA]: Staticize and remove unnecessary exports.
# 
# net/irda/af_irda.c
#   2004/12/27 20:44:25-08:00 bunk@stusta.de +2 -2
#   [IRDA]: Staticize and remove unnecessary exports.
# 
# include/net/irda/qos.h
#   2004/12/27 20:44:25-08:00 bunk@stusta.de +0 -1
#   [IRDA]: Staticize and remove unnecessary exports.
# 
# include/net/irda/parameters.h
#   2004/12/27 20:44:25-08:00 bunk@stusta.de +0 -2
#   [IRDA]: Staticize and remove unnecessary exports.
# 
# include/net/irda/irttp.h
#   2004/12/27 20:44:25-08:00 bunk@stusta.de +0 -3
#   [IRDA]: Staticize and remove unnecessary exports.
# 
# include/net/irda/irlmp.h
#   2004/12/27 20:44:25-08:00 bunk@stusta.de +0 -3
#   [IRDA]: Staticize and remove unnecessary exports.
# 
# include/net/irda/irlap_frame.h
#   2004/12/27 20:44:25-08:00 bunk@stusta.de +0 -1
#   [IRDA]: Staticize and remove unnecessary exports.
# 
# include/net/irda/irlap.h
#   2004/12/27 20:44:25-08:00 bunk@stusta.de +0 -2
#   [IRDA]: Staticize and remove unnecessary exports.
# 
# include/net/irda/irlan_common.h
#   2004/12/27 20:44:25-08:00 bunk@stusta.de +0 -3
#   [IRDA]: Staticize and remove unnecessary exports.
# 
# include/net/irda/irlan_client.h
#   2004/12/27 20:44:25-08:00 bunk@stusta.de +0 -3
#   [IRDA]: Staticize and remove unnecessary exports.
# 
# include/net/irda/iriap.h
#   2004/12/27 20:44:25-08:00 bunk@stusta.de +0 -10
#   [IRDA]: Staticize and remove unnecessary exports.
# 
# include/net/irda/irda_device.h
#   2004/12/27 20:44:25-08:00 bunk@stusta.de +0 -2
#   [IRDA]: Staticize and remove unnecessary exports.
# 
# include/net/irda/ircomm_tty_attach.h
#   2004/12/27 20:44:25-08:00 bunk@stusta.de +0 -1
#   [IRDA]: Staticize and remove unnecessary exports.
# 
# include/net/irda/ircomm_tty.h
#   2004/12/27 20:44:25-08:00 bunk@stusta.de +0 -2
#   [IRDA]: Staticize and remove unnecessary exports.
# 
# include/net/irda/ircomm_ttp.h
#   2004/12/27 20:44:25-08:00 bunk@stusta.de +0 -31
#   [IRDA]: Staticize and remove unnecessary exports.
# 
# include/net/irda/ircomm_param.h
#   2004/12/27 20:44:25-08:00 bunk@stusta.de +0 -1
#   [IRDA]: Staticize and remove unnecessary exports.
# 
# include/net/irda/ircomm_lmp.h
#   2004/12/27 20:44:25-08:00 bunk@stusta.de +0 -27
#   [IRDA]: Staticize and remove unnecessary exports.
# 
# include/net/irda/ircomm_event.h
#   2004/12/27 20:44:25-08:00 bunk@stusta.de +0 -1
#   [IRDA]: Staticize and remove unnecessary exports.
# 
# ChangeSet
#   2004/12/27 20:34:31-08:00 kaber@trash.net 
#   [IPV4]: Let people know where to obtain the ss tool from.
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/Kconfig
#   2004/12/27 20:34:11-08:00 kaber@trash.net +4 -1
#   [IPV4]: Let people know where to obtain the ss tool from.
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# ChangeSet
#   2004/12/27 19:50:18-08:00 bunk@stusta.de 
#   [IPV4]: Staticize and remove unneeded exports.
#   
#   The patch below contains the following possible cleanups:
#   - make some needlessly global code static
#   - remove the following unused global functions:
#     - fib_rules.c: fib_rules_map_destination
#     - xfrm4_policy.: xfrm4_fini
#   - remove the following unneeded EXPORT_SYMBOL:
#     - tcp_timer.c: tcp_timer_bug_msg
#   
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/xfrm4_policy.c
#   2004/12/27 19:49:58-08:00 bunk@stusta.de +0 -7
#   [IPV4]: Staticize and remove unneeded exports.
#   
#   The patch below contains the following possible cleanups:
#   - make some needlessly global code static
#   - remove the following unused global functions:
#     - fib_rules.c: fib_rules_map_destination
#     - xfrm4_policy.: xfrm4_fini
#   - remove the following unneeded EXPORT_SYMBOL:
#     - tcp_timer.c: tcp_timer_bug_msg
#   
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/udp.c
#   2004/12/27 19:49:58-08:00 bunk@stusta.de +8 -5
#   [IPV4]: Staticize and remove unneeded exports.
#   
#   The patch below contains the following possible cleanups:
#   - make some needlessly global code static
#   - remove the following unused global functions:
#     - fib_rules.c: fib_rules_map_destination
#     - xfrm4_policy.: xfrm4_fini
#   - remove the following unneeded EXPORT_SYMBOL:
#     - tcp_timer.c: tcp_timer_bug_msg
#   
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/tcp_timer.c
#   2004/12/27 19:49:58-08:00 bunk@stusta.de +0 -3
#   [IPV4]: Staticize and remove unneeded exports.
#   
#   The patch below contains the following possible cleanups:
#   - make some needlessly global code static
#   - remove the following unused global functions:
#     - fib_rules.c: fib_rules_map_destination
#     - xfrm4_policy.: xfrm4_fini
#   - remove the following unneeded EXPORT_SYMBOL:
#     - tcp_timer.c: tcp_timer_bug_msg
#   
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/tcp_minisocks.c
#   2004/12/27 19:49:58-08:00 bunk@stusta.de +3 -1
#   [IPV4]: Staticize and remove unneeded exports.
#   
#   The patch below contains the following possible cleanups:
#   - make some needlessly global code static
#   - remove the following unused global functions:
#     - fib_rules.c: fib_rules_map_destination
#     - xfrm4_policy.: xfrm4_fini
#   - remove the following unneeded EXPORT_SYMBOL:
#     - tcp_timer.c: tcp_timer_bug_msg
#   
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/tcp_input.c
#   2004/12/27 19:49:57-08:00 bunk@stusta.de +14 -2
#   [IPV4]: Staticize and remove unneeded exports.
#   
#   The patch below contains the following possible cleanups:
#   - make some needlessly global code static
#   - remove the following unused global functions:
#     - fib_rules.c: fib_rules_map_destination
#     - xfrm4_policy.: xfrm4_fini
#   - remove the following unneeded EXPORT_SYMBOL:
#     - tcp_timer.c: tcp_timer_bug_msg
#   
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/route.c
#   2004/12/27 19:49:57-08:00 bunk@stusta.de +16 -16
#   [IPV4]: Staticize and remove unneeded exports.
#   
#   The patch below contains the following possible cleanups:
#   - make some needlessly global code static
#   - remove the following unused global functions:
#     - fib_rules.c: fib_rules_map_destination
#     - xfrm4_policy.: xfrm4_fini
#   - remove the following unneeded EXPORT_SYMBOL:
#     - tcp_timer.c: tcp_timer_bug_msg
#   
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/raw.c
#   2004/12/27 19:49:57-08:00 bunk@stusta.de +2 -2
#   [IPV4]: Staticize and remove unneeded exports.
#   
#   The patch below contains the following possible cleanups:
#   - make some needlessly global code static
#   - remove the following unused global functions:
#     - fib_rules.c: fib_rules_map_destination
#     - xfrm4_policy.: xfrm4_fini
#   - remove the following unneeded EXPORT_SYMBOL:
#     - tcp_timer.c: tcp_timer_bug_msg
#   
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/ipconfig.c
#   2004/12/27 19:49:57-08:00 bunk@stusta.de +6 -6
#   [IPV4]: Staticize and remove unneeded exports.
#   
#   The patch below contains the following possible cleanups:
#   - make some needlessly global code static
#   - remove the following unused global functions:
#     - fib_rules.c: fib_rules_map_destination
#     - xfrm4_policy.: xfrm4_fini
#   - remove the following unneeded EXPORT_SYMBOL:
#     - tcp_timer.c: tcp_timer_bug_msg
#   
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/ip_sockglue.c
#   2004/12/27 19:49:57-08:00 bunk@stusta.de +1 -1
#   [IPV4]: Staticize and remove unneeded exports.
#   
#   The patch below contains the following possible cleanups:
#   - make some needlessly global code static
#   - remove the following unused global functions:
#     - fib_rules.c: fib_rules_map_destination
#     - xfrm4_policy.: xfrm4_fini
#   - remove the following unneeded EXPORT_SYMBOL:
#     - tcp_timer.c: tcp_timer_bug_msg
#   
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/ip_gre.c
#   2004/12/27 19:49:57-08:00 bunk@stusta.de +3 -3
#   [IPV4]: Staticize and remove unneeded exports.
#   
#   The patch below contains the following possible cleanups:
#   - make some needlessly global code static
#   - remove the following unused global functions:
#     - fib_rules.c: fib_rules_map_destination
#     - xfrm4_policy.: xfrm4_fini
#   - remove the following unneeded EXPORT_SYMBOL:
#     - tcp_timer.c: tcp_timer_bug_msg
#   
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/igmp.c
#   2004/12/27 19:49:57-08:00 bunk@stusta.de +8 -8
#   [IPV4]: Staticize and remove unneeded exports.
#   
#   The patch below contains the following possible cleanups:
#   - make some needlessly global code static
#   - remove the following unused global functions:
#     - fib_rules.c: fib_rules_map_destination
#     - xfrm4_policy.: xfrm4_fini
#   - remove the following unneeded EXPORT_SYMBOL:
#     - tcp_timer.c: tcp_timer_bug_msg
#   
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/icmp.c
#   2004/12/27 19:49:57-08:00 bunk@stusta.de +2 -2
#   [IPV4]: Staticize and remove unneeded exports.
#   
#   The patch below contains the following possible cleanups:
#   - make some needlessly global code static
#   - remove the following unused global functions:
#     - fib_rules.c: fib_rules_map_destination
#     - xfrm4_policy.: xfrm4_fini
#   - remove the following unneeded EXPORT_SYMBOL:
#     - tcp_timer.c: tcp_timer_bug_msg
#   
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/fib_rules.c
#   2004/12/27 19:49:57-08:00 bunk@stusta.de +1 -7
#   [IPV4]: Staticize and remove unneeded exports.
#   
#   The patch below contains the following possible cleanups:
#   - make some needlessly global code static
#   - remove the following unused global functions:
#     - fib_rules.c: fib_rules_map_destination
#     - xfrm4_policy.: xfrm4_fini
#   - remove the following unneeded EXPORT_SYMBOL:
#     - tcp_timer.c: tcp_timer_bug_msg
#   
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/fib_frontend.c
#   2004/12/27 19:49:57-08:00 bunk@stusta.de +3 -3
#   [IPV4]: Staticize and remove unneeded exports.
#   
#   The patch below contains the following possible cleanups:
#   - make some needlessly global code static
#   - remove the following unused global functions:
#     - fib_rules.c: fib_rules_map_destination
#     - xfrm4_policy.: xfrm4_fini
#   - remove the following unneeded EXPORT_SYMBOL:
#     - tcp_timer.c: tcp_timer_bug_msg
#   
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/devinet.c
#   2004/12/27 19:49:57-08:00 bunk@stusta.de +2 -2
#   [IPV4]: Staticize and remove unneeded exports.
#   
#   The patch below contains the following possible cleanups:
#   - make some needlessly global code static
#   - remove the following unused global functions:
#     - fib_rules.c: fib_rules_map_destination
#     - xfrm4_policy.: xfrm4_fini
#   - remove the following unneeded EXPORT_SYMBOL:
#     - tcp_timer.c: tcp_timer_bug_msg
#   
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/arp.c
#   2004/12/27 19:49:57-08:00 bunk@stusta.de +4 -4
#   [IPV4]: Staticize and remove unneeded exports.
#   
#   The patch below contains the following possible cleanups:
#   - make some needlessly global code static
#   - remove the following unused global functions:
#     - fib_rules.c: fib_rules_map_destination
#     - xfrm4_policy.: xfrm4_fini
#   - remove the following unneeded EXPORT_SYMBOL:
#     - tcp_timer.c: tcp_timer_bug_msg
#   
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/af_inet.c
#   2004/12/27 19:49:57-08:00 bunk@stusta.de +4 -4
#   [IPV4]: Staticize and remove unneeded exports.
#   
#   The patch below contains the following possible cleanups:
#   - make some needlessly global code static
#   - remove the following unused global functions:
#     - fib_rules.c: fib_rules_map_destination
#     - xfrm4_policy.: xfrm4_fini
#   - remove the following unneeded EXPORT_SYMBOL:
#     - tcp_timer.c: tcp_timer_bug_msg
#   
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# include/net/xfrm.h
#   2004/12/27 19:49:57-08:00 bunk@stusta.de +0 -1
#   [IPV4]: Staticize and remove unneeded exports.
#   
#   The patch below contains the following possible cleanups:
#   - make some needlessly global code static
#   - remove the following unused global functions:
#     - fib_rules.c: fib_rules_map_destination
#     - xfrm4_policy.: xfrm4_fini
#   - remove the following unneeded EXPORT_SYMBOL:
#     - tcp_timer.c: tcp_timer_bug_msg
#   
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# include/net/tcp.h
#   2004/12/27 19:49:57-08:00 bunk@stusta.de +0 -16
#   [IPV4]: Staticize and remove unneeded exports.
#   
#   The patch below contains the following possible cleanups:
#   - make some needlessly global code static
#   - remove the following unused global functions:
#     - fib_rules.c: fib_rules_map_destination
#     - xfrm4_policy.: xfrm4_fini
#   - remove the following unneeded EXPORT_SYMBOL:
#     - tcp_timer.c: tcp_timer_bug_msg
#   
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# include/net/ipconfig.h
#   2004/12/27 19:49:57-08:00 bunk@stusta.de +0 -11
#   [IPV4]: Staticize and remove unneeded exports.
#   
#   The patch below contains the following possible cleanups:
#   - make some needlessly global code static
#   - remove the following unused global functions:
#     - fib_rules.c: fib_rules_map_destination
#     - xfrm4_policy.: xfrm4_fini
#   - remove the following unneeded EXPORT_SYMBOL:
#     - tcp_timer.c: tcp_timer_bug_msg
#   
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# include/net/ip_fib.h
#   2004/12/27 19:49:57-08:00 bunk@stusta.de +0 -2
#   [IPV4]: Staticize and remove unneeded exports.
#   
#   The patch below contains the following possible cleanups:
#   - make some needlessly global code static
#   - remove the following unused global functions:
#     - fib_rules.c: fib_rules_map_destination
#     - xfrm4_policy.: xfrm4_fini
#   - remove the following unneeded EXPORT_SYMBOL:
#     - tcp_timer.c: tcp_timer_bug_msg
#   
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# include/net/ip.h
#   2004/12/27 19:49:57-08:00 bunk@stusta.de +0 -2
#   [IPV4]: Staticize and remove unneeded exports.
#   
#   The patch below contains the following possible cleanups:
#   - make some needlessly global code static
#   - remove the following unused global functions:
#     - fib_rules.c: fib_rules_map_destination
#     - xfrm4_policy.: xfrm4_fini
#   - remove the following unneeded EXPORT_SYMBOL:
#     - tcp_timer.c: tcp_timer_bug_msg
#   
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# ChangeSet
#   2004/12/27 18:54:21-08:00 bunk@stusta.de 
#   [IPX]: Make needlessly global code static.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipx/ipx_proc.c
#   2004/12/27 18:54:01-08:00 bunk@stusta.de +3 -3
#   [IPX]: Make needlessly global code static.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipx/af_ipx.c
#   2004/12/27 18:54:01-08:00 bunk@stusta.de +8 -2
#   [IPX]: Make needlessly global code static.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# include/net/ipx.h
#   2004/12/27 18:54:01-08:00 bunk@stusta.de +0 -8
#   [IPX]: Make needlessly global code static.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# ChangeSet
#   2004/12/27 18:49:21-08:00 bunk@stusta.de 
#   [IPVS]: Make needlessly global code static.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/ipvs/ip_vs_proto_icmp.c
#   2004/12/27 18:49:01-08:00 bunk@stusta.de +2 -2
#   [IPVS]: Make needlessly global code static.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/ipvs/ip_vs_proto.c
#   2004/12/27 18:49:01-08:00 bunk@stusta.de +2 -2
#   [IPVS]: Make needlessly global code static.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/ipvs/ip_vs_ctl.c
#   2004/12/27 18:49:01-08:00 bunk@stusta.de +1 -1
#   [IPVS]: Make needlessly global code static.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/ipvs/ip_vs_conn.c
#   2004/12/27 18:49:01-08:00 bunk@stusta.de +1 -1
#   [IPVS]: Make needlessly global code static.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/ipvs/ip_vs_app.c
#   2004/12/27 18:49:01-08:00 bunk@stusta.de +1 -1
#   [IPVS]: Make needlessly global code static.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# ChangeSet
#   2004/12/27 18:41:46-08:00 bunk@stusta.de 
#   [AF_PACKET]: Make needlessly global code static.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/packet/af_packet.c
#   2004/12/27 18:41:26-08:00 bunk@stusta.de +11 -10
#   [AF_PACKET]: Make needlessly global code static.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# ChangeSet
#   2004/12/27 18:40:25-08:00 bunk@stusta.de 
#   [NETLINK]: Staticize and remove unused functions.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/netlink/af_netlink.c
#   2004/12/27 18:40:05-08:00 bunk@stusta.de +1 -27
#   [NETLINK]: Staticize and remove unused functions.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# include/linux/netlink.h
#   2004/12/27 18:40:05-08:00 bunk@stusta.de +0 -3
#   [NETLINK]: Staticize and remove unused functions.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# ChangeSet
#   2004/12/27 18:38:23-08:00 bunk@stusta.de 
#   [AF_NET]: Mark pfkey_table static.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/key/af_key.c
#   2004/12/27 18:38:03-08:00 bunk@stusta.de +1 -1
#   [AF_NET]: Mark pfkey_table static.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# ChangeSet
#   2004/12/27 18:36:20-08:00 bunk@stusta.de 
#   [NET]: Mark eth_header_parse static.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ethernet/eth.c
#   2004/12/27 18:36:00-08:00 bunk@stusta.de +1 -1
#   [NET]: Mark eth_header_parse static.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# include/linux/etherdevice.h
#   2004/12/27 18:36:00-08:00 bunk@stusta.de +0 -2
#   [NET]: Mark eth_header_parse static.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# ChangeSet
#   2004/12/27 18:33:52-08:00 bunk@stusta.de 
#   [XFRM]: Staticize, and remove unused global functions.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/xfrm/xfrm_user.c
#   2004/12/27 18:33:32-08:00 bunk@stusta.de +2 -2
#   [XFRM]: Staticize, and remove unused global functions.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/xfrm/xfrm_state.c
#   2004/12/27 18:33:32-08:00 bunk@stusta.de +5 -2
#   [XFRM]: Staticize, and remove unused global functions.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/xfrm/xfrm_policy.c
#   2004/12/27 18:33:32-08:00 bunk@stusta.de +4 -4
#   [XFRM]: Staticize, and remove unused global functions.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/xfrm/xfrm_export.c
#   2004/12/27 18:33:32-08:00 bunk@stusta.de +0 -1
#   [XFRM]: Staticize, and remove unused global functions.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/xfrm/xfrm_algo.c
#   2004/12/27 18:33:32-08:00 bunk@stusta.de +0 -8
#   [XFRM]: Staticize, and remove unused global functions.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# include/net/xfrm.h
#   2004/12/27 18:33:32-08:00 bunk@stusta.de +0 -5
#   [XFRM]: Staticize, and remove unused global functions.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# ChangeSet
#   2004/12/27 18:32:23-08:00 bunk@stusta.de 
#   [X25]: Staticize, and remove unused global functions.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/x25/x25_proc.c
#   2004/12/27 18:32:03-08:00 bunk@stusta.de +2 -2
#   [X25]: Staticize, and remove unused global functions.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/x25/x25_link.c
#   2004/12/27 18:32:03-08:00 bunk@stusta.de +5 -28
#   [X25]: Staticize, and remove unused global functions.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/x25/x25_dev.c
#   2004/12/27 18:32:03-08:00 bunk@stusta.de +0 -23
#   [X25]: Staticize, and remove unused global functions.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/x25/af_x25.c
#   2004/12/27 18:32:03-08:00 bunk@stusta.de +4 -4
#   [X25]: Staticize, and remove unused global functions.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# include/net/x25.h
#   2004/12/27 18:32:03-08:00 bunk@stusta.de +0 -5
#   [X25]: Staticize, and remove unused global functions.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# ChangeSet
#   2004/12/27 18:30:49-08:00 bunk@stusta.de 
#   [AF_UNIX]: Mark needlessly global code static.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/unix/sysctl_net_unix.c
#   2004/12/27 18:30:29-08:00 bunk@stusta.de +1 -1
#   [AF_UNIX]: Mark needlessly global code static.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/unix/af_unix.c
#   2004/12/27 18:30:29-08:00 bunk@stusta.de +1 -1
#   [AF_UNIX]: Mark needlessly global code static.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# ChangeSet
#   2004/12/27 18:29:36-08:00 bunk@stusta.de 
#   [SUNRPC]: Staticize, kill unused functions, and remove unneeded exports.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/sunrpc/xprt.c
#   2004/12/27 18:29:16-08:00 bunk@stusta.de +5 -3
#   [SUNRPC]: Staticize, kill unused functions, and remove unneeded exports.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/sunrpc/xdr.c
#   2004/12/27 18:29:16-08:00 bunk@stusta.de +3 -130
#   [SUNRPC]: Staticize, kill unused functions, and remove unneeded exports.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/sunrpc/svcauth_unix.c
#   2004/12/27 18:29:16-08:00 bunk@stusta.de +3 -3
#   [SUNRPC]: Staticize, kill unused functions, and remove unneeded exports.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/sunrpc/svcauth.c
#   2004/12/27 18:29:16-08:00 bunk@stusta.de +2 -1
#   [SUNRPC]: Staticize, kill unused functions, and remove unneeded exports.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/sunrpc/sunrpc_syms.c
#   2004/12/27 18:29:16-08:00 bunk@stusta.de +0 -1
#   [SUNRPC]: Staticize, kill unused functions, and remove unneeded exports.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/sunrpc/sched.c
#   2004/12/27 18:29:16-08:00 bunk@stusta.de +4 -1
#   [SUNRPC]: Staticize, kill unused functions, and remove unneeded exports.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/sunrpc/rpc_pipe.c
#   2004/12/27 18:29:16-08:00 bunk@stusta.de +2 -7
#   [SUNRPC]: Staticize, kill unused functions, and remove unneeded exports.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/sunrpc/pmap_clnt.c
#   2004/12/27 18:29:16-08:00 bunk@stusta.de +2 -2
#   [SUNRPC]: Staticize, kill unused functions, and remove unneeded exports.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/sunrpc/cache.c
#   2004/12/27 18:29:16-08:00 bunk@stusta.de +9 -32
#   [SUNRPC]: Staticize, kill unused functions, and remove unneeded exports.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/sunrpc/auth_gss/svcauth_gss.c
#   2004/12/27 18:29:16-08:00 bunk@stusta.de +2 -2
#   [SUNRPC]: Staticize, kill unused functions, and remove unneeded exports.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/sunrpc/auth_gss/gss_spkm3_mech.c
#   2004/12/27 18:29:16-08:00 bunk@stusta.de +3 -6
#   [SUNRPC]: Staticize, kill unused functions, and remove unneeded exports.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/sunrpc/auth_gss/gss_krb5_mech.c
#   2004/12/27 18:29:16-08:00 bunk@stusta.de +0 -3
#   [SUNRPC]: Staticize, kill unused functions, and remove unneeded exports.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/sunrpc/auth_gss/gss_krb5_crypto.c
#   2004/12/27 18:29:16-08:00 bunk@stusta.de +1 -1
#   [SUNRPC]: Staticize, kill unused functions, and remove unneeded exports.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/sunrpc/auth_gss/gss_generic_token.c
#   2004/12/27 18:29:16-08:00 bunk@stusta.de +0 -35
#   [SUNRPC]: Staticize, kill unused functions, and remove unneeded exports.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/sunrpc/auth_gss/auth_gss.c
#   2004/12/27 18:29:16-08:00 bunk@stusta.de +1 -1
#   [SUNRPC]: Staticize, kill unused functions, and remove unneeded exports.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/sunrpc/auth.c
#   2004/12/27 18:29:16-08:00 bunk@stusta.de +1 -1
#   [SUNRPC]: Staticize, kill unused functions, and remove unneeded exports.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# include/linux/sunrpc/xprt.h
#   2004/12/27 18:29:16-08:00 bunk@stusta.de +0 -3
#   [SUNRPC]: Staticize, kill unused functions, and remove unneeded exports.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# include/linux/sunrpc/xdr.h
#   2004/12/27 18:29:16-08:00 bunk@stusta.de +0 -6
#   [SUNRPC]: Staticize, kill unused functions, and remove unneeded exports.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# include/linux/sunrpc/sched.h
#   2004/12/27 18:29:16-08:00 bunk@stusta.de +0 -1
#   [SUNRPC]: Staticize, kill unused functions, and remove unneeded exports.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# include/linux/sunrpc/gss_asn1.h
#   2004/12/27 18:29:16-08:00 bunk@stusta.de +0 -2
#   [SUNRPC]: Staticize, kill unused functions, and remove unneeded exports.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# include/linux/sunrpc/cache.h
#   2004/12/27 18:29:16-08:00 bunk@stusta.de +0 -5
#   [SUNRPC]: Staticize, kill unused functions, and remove unneeded exports.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# include/linux/sunrpc/auth.h
#   2004/12/27 18:29:16-08:00 bunk@stusta.de +0 -2
#   [SUNRPC]: Staticize, kill unused functions, and remove unneeded exports.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# ChangeSet
#   2004/12/27 18:25:23-08:00 bunk@stusta.de 
#   [NET]: No need to export sock_readv_writev
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/socket.c
#   2004/12/27 18:25:03-08:00 bunk@stusta.de +3 -2
#   [NET]: No need to export sock_readv_writev
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# include/linux/net.h
#   2004/12/27 18:25:03-08:00 bunk@stusta.de +0 -4
#   [NET]: No need to export sock_readv_writev
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# ChangeSet
#   2004/12/27 18:24:18-08:00 bunk@stusta.de 
#   [AX25]: Staticize functions, and remove unused global function.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ax25/ax25_ds_subr.c
#   2004/12/27 18:23:58-08:00 bunk@stusta.de +1 -1
#   [AX25]: Staticize functions, and remove unused global function.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ax25/ax25_addr.c
#   2004/12/27 18:23:58-08:00 bunk@stusta.de +0 -20
#   [AX25]: Staticize functions, and remove unused global function.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ax25/af_ax25.c
#   2004/12/27 18:23:58-08:00 bunk@stusta.de +1 -1
#   [AX25]: Staticize functions, and remove unused global function.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# include/net/ax25.h
#   2004/12/27 18:23:58-08:00 bunk@stusta.de +0 -3
#   [AX25]: Staticize functions, and remove unused global function.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# ChangeSet
#   2004/12/27 18:23:16-08:00 bunk@stusta.de 
#   [APPLETALK]: Make some code static.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/appletalk/ddp.c
#   2004/12/27 18:22:56-08:00 bunk@stusta.de +3 -3
#   [APPLETALK]: Make some code static.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/appletalk/atalk_proc.c
#   2004/12/27 18:22:56-08:00 bunk@stusta.de +3 -3
#   [APPLETALK]: Make some code static.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/appletalk/aarp.c
#   2004/12/27 18:22:56-08:00 bunk@stusta.de +2 -2
#   [APPLETALK]: Make some code static.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# include/linux/atalk.h
#   2004/12/27 18:22:56-08:00 bunk@stusta.de +0 -2
#   [APPLETALK]: Make some code static.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# ChangeSet
#   2004/12/27 18:18:32-08:00 bunk@stusta.de 
#   [SUNRPC]: Remove unused file net/sunrpc/auth_gss/sunrpcgss_syms.c
#   
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# BitKeeper/deleted/.del-sunrpcgss_syms.c~1faadca444e4da14
#   2004/12/27 18:17:57-08:00 bunk@stusta.de +0 -0
#   Delete: net/sunrpc/auth_gss/sunrpcgss_syms.c
# 
# ChangeSet
#   2004/12/27 18:15:09-08:00 bunk@stusta.de 
#   [SUNRPC]: Remove unused file net/sunrpc/svcauth_des.c
#   
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# BitKeeper/deleted/.del-svcauth_des.c~6e3893ce7064e0ed
#   2004/12/27 18:14:36-08:00 bunk@stusta.de +0 -0
#   Delete: net/sunrpc/svcauth_des.c
# 
# ChangeSet
#   2004/12/27 18:12:59-08:00 bunk@stusta.de 
#   [SUNRPC]: Remove unused file net/sunrpc/auth_gss/gss_pseudoflavors.c
#   
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# BitKeeper/deleted/.del-gss_pseudoflavors.c~2f397379d8d33406
#   2004/12/27 18:12:09-08:00 bunk@stusta.de +0 -0
#   Delete: net/sunrpc/auth_gss/gss_pseudoflavors.c
# 
# ChangeSet
#   2004/12/27 18:08:07-08:00 chas@cmf.nrl.navy.mil 
#   [ATM]: small atm cleanups (from Adrian Bunk <bunk@stusta.de>)
#   
#   Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# drivers/atm/nicstarmac.h
#   2004/12/27 18:07:47-08:00 chas@cmf.nrl.navy.mil +0 -1
#   [ATM]: small atm cleanups (from Adrian Bunk <bunk@stusta.de>)
#   
#   Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# drivers/atm/nicstarmac.c
#   2004/12/27 18:07:47-08:00 chas@cmf.nrl.navy.mil +4 -1
#   [ATM]: small atm cleanups (from Adrian Bunk <bunk@stusta.de>)
#   
#   Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# drivers/atm/iphase.h
#   2004/12/27 18:07:47-08:00 chas@cmf.nrl.navy.mil +0 -4
#   [ATM]: small atm cleanups (from Adrian Bunk <bunk@stusta.de>)
#   
#   Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# drivers/atm/iphase.c
#   2004/12/27 18:07:47-08:00 chas@cmf.nrl.navy.mil +7 -10
#   [ATM]: small atm cleanups (from Adrian Bunk <bunk@stusta.de>)
#   
#   Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# drivers/atm/idt77252.h
#   2004/12/27 18:07:47-08:00 chas@cmf.nrl.navy.mil +1 -1
#   [ATM]: small atm cleanups (from Adrian Bunk <bunk@stusta.de>)
#   
#   Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# drivers/atm/idt77105.h
#   2004/12/27 18:07:47-08:00 chas@cmf.nrl.navy.mil +0 -1
#   [ATM]: small atm cleanups (from Adrian Bunk <bunk@stusta.de>)
#   
#   Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# drivers/atm/idt77105.c
#   2004/12/27 18:07:47-08:00 chas@cmf.nrl.navy.mil +1 -1
#   [ATM]: small atm cleanups (from Adrian Bunk <bunk@stusta.de>)
#   
#   Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# drivers/atm/he.h
#   2004/12/27 18:07:47-08:00 chas@cmf.nrl.navy.mil +0 -43
#   [ATM]: small atm cleanups (from Adrian Bunk <bunk@stusta.de>)
#   
#   Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# drivers/atm/he.c
#   2004/12/27 18:07:47-08:00 chas@cmf.nrl.navy.mil +43 -1
#   [ATM]: small atm cleanups (from Adrian Bunk <bunk@stusta.de>)
#   
#   Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# drivers/atm/firestream.c
#   2004/12/27 18:07:47-08:00 chas@cmf.nrl.navy.mil +6 -6
#   [ATM]: small atm cleanups (from Adrian Bunk <bunk@stusta.de>)
#   
#   Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# drivers/atm/atmtcp.c
#   2004/12/27 18:07:47-08:00 chas@cmf.nrl.navy.mil +3 -3
#   [ATM]: small atm cleanups (from Adrian Bunk <bunk@stusta.de>)
#   
#   Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# drivers/atm/ambassador.c
#   2004/12/27 18:07:47-08:00 chas@cmf.nrl.navy.mil +2 -2
#   [ATM]: small atm cleanups (from Adrian Bunk <bunk@stusta.de>)
#   
#   Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# ChangeSet
#   2004/12/27 18:06:57-08:00 tgraf@suug.ch 
#   [PKT_SCHED]: Validate policer configuration TLVs.
#   
#   Signed-off-by: Thomas Graf <tgraf@suug.ch>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/sched/police.c
#   2004/12/27 18:06:37-08:00 tgraf@suug.ch +22 -8
#   [PKT_SCHED]: Validate policer configuration TLVs.
#   
#   Signed-off-by: Thomas Graf <tgraf@suug.ch>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# ChangeSet
#   2004/12/27 23:57:10-02:00 acme@conectiva.com.br 
#   [INET] move inet_sock into inet_opt and rename it to inet_sock
#   
#   With this we can remove all the cut'n'pasted layouts in all inet_sock
#   derived classes, such as tcp_sock, udp_sock, sctp_sock, etc.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# security/selinux/avc.c
#   2004/12/27 23:56:34-02:00 acme@conectiva.com.br +2 -2
#   [INET] move inet_sock into inet_opt and rename it to inet_sock
#   
#   With this we can remove all the cut'n'pasted layouts in all inet_sock
#   derived classes, such as tcp_sock, udp_sock, sctp_sock, etc.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/sctp/protocol.c
#   2004/12/27 23:56:34-02:00 acme@conectiva.com.br +2 -2
#   [INET] move inet_sock into inet_opt and rename it to inet_sock
#   
#   With this we can remove all the cut'n'pasted layouts in all inet_sock
#   derived classes, such as tcp_sock, udp_sock, sctp_sock, etc.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/sctp/ipv6.c
#   2004/12/27 23:56:34-02:00 acme@conectiva.com.br +3 -3
#   [INET] move inet_sock into inet_opt and rename it to inet_sock
#   
#   With this we can remove all the cut'n'pasted layouts in all inet_sock
#   derived classes, such as tcp_sock, udp_sock, sctp_sock, etc.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/sctp/input.c
#   2004/12/27 23:56:34-02:00 acme@conectiva.com.br +1 -1
#   [INET] move inet_sock into inet_opt and rename it to inet_sock
#   
#   With this we can remove all the cut'n'pasted layouts in all inet_sock
#   derived classes, such as tcp_sock, udp_sock, sctp_sock, etc.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv6/udp.c
#   2004/12/27 23:56:34-02:00 acme@conectiva.com.br +6 -6
#   [INET] move inet_sock into inet_opt and rename it to inet_sock
#   
#   With this we can remove all the cut'n'pasted layouts in all inet_sock
#   derived classes, such as tcp_sock, udp_sock, sctp_sock, etc.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv6/tcp_ipv6.c
#   2004/12/27 23:56:34-02:00 acme@conectiva.com.br +10 -10
#   [INET] move inet_sock into inet_opt and rename it to inet_sock
#   
#   With this we can remove all the cut'n'pasted layouts in all inet_sock
#   derived classes, such as tcp_sock, udp_sock, sctp_sock, etc.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv6/raw.c
#   2004/12/27 23:56:34-02:00 acme@conectiva.com.br +5 -5
#   [INET] move inet_sock into inet_opt and rename it to inet_sock
#   
#   With this we can remove all the cut'n'pasted layouts in all inet_sock
#   derived classes, such as tcp_sock, udp_sock, sctp_sock, etc.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv6/ip6_output.c
#   2004/12/27 23:56:34-02:00 acme@conectiva.com.br +3 -3
#   [INET] move inet_sock into inet_opt and rename it to inet_sock
#   
#   With this we can remove all the cut'n'pasted layouts in all inet_sock
#   derived classes, such as tcp_sock, udp_sock, sctp_sock, etc.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv6/datagram.c
#   2004/12/27 23:56:34-02:00 acme@conectiva.com.br +2 -2
#   [INET] move inet_sock into inet_opt and rename it to inet_sock
#   
#   With this we can remove all the cut'n'pasted layouts in all inet_sock
#   derived classes, such as tcp_sock, udp_sock, sctp_sock, etc.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv6/af_inet6.c
#   2004/12/27 23:56:34-02:00 acme@conectiva.com.br +4 -6
#   [INET] move inet_sock into inet_opt and rename it to inet_sock
#   
#   With this we can remove all the cut'n'pasted layouts in all inet_sock
#   derived classes, such as tcp_sock, udp_sock, sctp_sock, etc.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/udp.c
#   2004/12/27 23:56:34-02:00 acme@conectiva.com.br +10 -10
#   [INET] move inet_sock into inet_opt and rename it to inet_sock
#   
#   With this we can remove all the cut'n'pasted layouts in all inet_sock
#   derived classes, such as tcp_sock, udp_sock, sctp_sock, etc.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/tcp_timer.c
#   2004/12/27 23:56:34-02:00 acme@conectiva.com.br +1 -1
#   [INET] move inet_sock into inet_opt and rename it to inet_sock
#   
#   With this we can remove all the cut'n'pasted layouts in all inet_sock
#   derived classes, such as tcp_sock, udp_sock, sctp_sock, etc.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/tcp_output.c
#   2004/12/27 23:56:34-02:00 acme@conectiva.com.br +1 -1
#   [INET] move inet_sock into inet_opt and rename it to inet_sock
#   
#   With this we can remove all the cut'n'pasted layouts in all inet_sock
#   derived classes, such as tcp_sock, udp_sock, sctp_sock, etc.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/tcp_minisocks.c
#   2004/12/27 23:56:34-02:00 acme@conectiva.com.br +1 -1
#   [INET] move inet_sock into inet_opt and rename it to inet_sock
#   
#   With this we can remove all the cut'n'pasted layouts in all inet_sock
#   derived classes, such as tcp_sock, udp_sock, sctp_sock, etc.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/tcp_ipv4.c
#   2004/12/27 23:56:34-02:00 acme@conectiva.com.br +16 -16
#   [INET] move inet_sock into inet_opt and rename it to inet_sock
#   
#   With this we can remove all the cut'n'pasted layouts in all inet_sock
#   derived classes, such as tcp_sock, udp_sock, sctp_sock, etc.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/tcp_input.c
#   2004/12/27 23:56:34-02:00 acme@conectiva.com.br +1 -1
#   [INET] move inet_sock into inet_opt and rename it to inet_sock
#   
#   With this we can remove all the cut'n'pasted layouts in all inet_sock
#   derived classes, such as tcp_sock, udp_sock, sctp_sock, etc.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/tcp_diag.c
#   2004/12/27 23:56:34-02:00 acme@conectiva.com.br +7 -7
#   [INET] move inet_sock into inet_opt and rename it to inet_sock
#   
#   With this we can remove all the cut'n'pasted layouts in all inet_sock
#   derived classes, such as tcp_sock, udp_sock, sctp_sock, etc.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/tcp.c
#   2004/12/27 23:56:34-02:00 acme@conectiva.com.br +2 -2
#   [INET] move inet_sock into inet_opt and rename it to inet_sock
#   
#   With this we can remove all the cut'n'pasted layouts in all inet_sock
#   derived classes, such as tcp_sock, udp_sock, sctp_sock, etc.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/raw.c
#   2004/12/27 23:56:34-02:00 acme@conectiva.com.br +7 -7
#   [INET] move inet_sock into inet_opt and rename it to inet_sock
#   
#   With this we can remove all the cut'n'pasted layouts in all inet_sock
#   derived classes, such as tcp_sock, udp_sock, sctp_sock, etc.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/netfilter/ip_conntrack_core.c
#   2004/12/27 23:56:34-02:00 acme@conectiva.com.br +1 -1
#   [INET] move inet_sock into inet_opt and rename it to inet_sock
#   
#   With this we can remove all the cut'n'pasted layouts in all inet_sock
#   derived classes, such as tcp_sock, udp_sock, sctp_sock, etc.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/ipvs/ip_vs_sync.c
#   2004/12/27 23:56:34-02:00 acme@conectiva.com.br +3 -3
#   [INET] move inet_sock into inet_opt and rename it to inet_sock
#   
#   With this we can remove all the cut'n'pasted layouts in all inet_sock
#   derived classes, such as tcp_sock, udp_sock, sctp_sock, etc.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/ip_sockglue.c
#   2004/12/27 23:56:34-02:00 acme@conectiva.com.br +6 -6
#   [INET] move inet_sock into inet_opt and rename it to inet_sock
#   
#   With this we can remove all the cut'n'pasted layouts in all inet_sock
#   derived classes, such as tcp_sock, udp_sock, sctp_sock, etc.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/ip_output.c
#   2004/12/27 23:56:34-02:00 acme@conectiva.com.br +8 -8
#   [INET] move inet_sock into inet_opt and rename it to inet_sock
#   
#   With this we can remove all the cut'n'pasted layouts in all inet_sock
#   derived classes, such as tcp_sock, udp_sock, sctp_sock, etc.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/igmp.c
#   2004/12/27 23:56:34-02:00 acme@conectiva.com.br +8 -8
#   [INET] move inet_sock into inet_opt and rename it to inet_sock
#   
#   With this we can remove all the cut'n'pasted layouts in all inet_sock
#   derived classes, such as tcp_sock, udp_sock, sctp_sock, etc.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/icmp.c
#   2004/12/27 23:56:33-02:00 acme@conectiva.com.br +2 -2
#   [INET] move inet_sock into inet_opt and rename it to inet_sock
#   
#   With this we can remove all the cut'n'pasted layouts in all inet_sock
#   derived classes, such as tcp_sock, udp_sock, sctp_sock, etc.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/datagram.c
#   2004/12/27 23:56:33-02:00 acme@conectiva.com.br +1 -1
#   [INET] move inet_sock into inet_opt and rename it to inet_sock
#   
#   With this we can remove all the cut'n'pasted layouts in all inet_sock
#   derived classes, such as tcp_sock, udp_sock, sctp_sock, etc.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/af_inet.c
#   2004/12/27 23:56:33-02:00 acme@conectiva.com.br +5 -5
#   [INET] move inet_sock into inet_opt and rename it to inet_sock
#   
#   With this we can remove all the cut'n'pasted layouts in all inet_sock
#   derived classes, such as tcp_sock, udp_sock, sctp_sock, etc.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# include/net/tcp.h
#   2004/12/27 23:56:33-02:00 acme@conectiva.com.br +1 -1
#   [INET] move inet_sock into inet_opt and rename it to inet_sock
#   
#   With this we can remove all the cut'n'pasted layouts in all inet_sock
#   derived classes, such as tcp_sock, udp_sock, sctp_sock, etc.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# include/net/sctp/sctp.h
#   2004/12/27 23:56:33-02:00 acme@conectiva.com.br +3 -9
#   [INET] move inet_sock into inet_opt and rename it to inet_sock
#   
#   With this we can remove all the cut'n'pasted layouts in all inet_sock
#   derived classes, such as tcp_sock, udp_sock, sctp_sock, etc.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# include/net/icmp.h
#   2004/12/27 23:56:33-02:00 acme@conectiva.com.br +1 -7
#   [INET] move inet_sock into inet_opt and rename it to inet_sock
#   
#   With this we can remove all the cut'n'pasted layouts in all inet_sock
#   derived classes, such as tcp_sock, udp_sock, sctp_sock, etc.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# include/linux/udp.h
#   2004/12/27 23:56:33-02:00 acme@conectiva.com.br +1 -5
#   [INET] move inet_sock into inet_opt and rename it to inet_sock
#   
#   With this we can remove all the cut'n'pasted layouts in all inet_sock
#   derived classes, such as tcp_sock, udp_sock, sctp_sock, etc.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# include/linux/tcp.h
#   2004/12/27 23:56:33-02:00 acme@conectiva.com.br +1 -5
#   [INET] move inet_sock into inet_opt and rename it to inet_sock
#   
#   With this we can remove all the cut'n'pasted layouts in all inet_sock
#   derived classes, such as tcp_sock, udp_sock, sctp_sock, etc.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# include/linux/ipv6.h
#   2004/12/27 23:56:33-02:00 acme@conectiva.com.br +4 -10
#   [INET] move inet_sock into inet_opt and rename it to inet_sock
#   
#   With this we can remove all the cut'n'pasted layouts in all inet_sock
#   derived classes, such as tcp_sock, udp_sock, sctp_sock, etc.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# include/linux/ip.h
#   2004/12/27 23:56:33-02:00 acme@conectiva.com.br +10 -14
#   [INET] move inet_sock into inet_opt and rename it to inet_sock
#   
#   With this we can remove all the cut'n'pasted layouts in all inet_sock
#   derived classes, such as tcp_sock, udp_sock, sctp_sock, etc.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# ChangeSet
#   2004/12/27 15:41:28-05:00 stkn@gentoo.org 
#   [libata] add #include (fixes 2.4 alpha build)
# 
# drivers/scsi/libata-core.c
#   2004/12/27 15:41:22-05:00 stkn@gentoo.org +1 -0
#   [libata] add #include (fixes 2.4 alpha build)
# 
# ChangeSet
#   2004/12/27 15:29:14-05:00 albertcc@tw.ibm.com 
#   [libata] verify ATAPI DMA for a given request is OK
#   
#   After some testing, it seems that some PATA host adapter (ex. pdc20275) cannot 
#   work reliably with specific request buffer sizes under ATAPI DMA mode.
#   
#   Detailed test result:
#   4096, 2048, 1024, 512, 256: OK
#   384, 257, 255, 128, 96, 64, 32:  failed (irq lost)
#    
#   It seems multiple of 256 bytes are the safe ATAPI DMA buffer sizes to use.
#   
#   Attached please find the patch to fix the pdc2027x ATAPI DMA problem.
#   
#   Changes:
#   1. Add a callback function "check_atapi_dma()" to ata_port_operations such that libata core
#   can ask the driver: "Can this command be processed in ATAPI DMA mode safely? " 
#   when the the command is received.
#   2. ATAPI DMA is off by default if the callback function is not provided by the driver
#   
#   If the callback function is not provided by the driver, the ATAPI DMA should be as is.
#   The ATAPI DMA is already controlled by dev->flags.
#   
#   BTW, the patch isolates the ATAPI DMA workaround to the pdc20275 driver itself,
#   not impacting libata core .
#    
#   Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
# 
# include/linux/libata.h
#   2004/12/27 15:29:08-05:00 albertcc@tw.ibm.com +2 -0
#   [libata] verify ATAPI DMA for a given request is OK
#   
#   After some testing, it seems that some PATA host adapter (ex. pdc20275) cannot 
#   work reliably with specific request buffer sizes under ATAPI DMA mode.
#   
#   Detailed test result:
#   4096, 2048, 1024, 512, 256: OK
#   384, 257, 255, 128, 96, 64, 32:  failed (irq lost)
#    
#   It seems multiple of 256 bytes are the safe ATAPI DMA buffer sizes to use.
#   
#   Attached please find the patch to fix the pdc2027x ATAPI DMA problem.
#   
#   Changes:
#   1. Add a callback function "check_atapi_dma()" to ata_port_operations such that libata core
#   can ask the driver: "Can this command be processed in ATAPI DMA mode safely? " 
#   when the the command is received.
#   2. ATAPI DMA is off by default if the callback function is not provided by the driver
#   
#   If the callback function is not provided by the driver, the ATAPI DMA should be as is.
#   The ATAPI DMA is already controlled by dev->flags.
#   
#   BTW, the patch isolates the ATAPI DMA workaround to the pdc20275 driver itself,
#   not impacting libata core .
#    
#   Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
# 
# drivers/scsi/libata.h
#   2004/12/27 15:29:08-05:00 albertcc@tw.ibm.com +1 -0
#   [libata] verify ATAPI DMA for a given request is OK
#   
#   After some testing, it seems that some PATA host adapter (ex. pdc20275) cannot 
#   work reliably with specific request buffer sizes under ATAPI DMA mode.
#   
#   Detailed test result:
#   4096, 2048, 1024, 512, 256: OK
#   384, 257, 255, 128, 96, 64, 32:  failed (irq lost)
#    
#   It seems multiple of 256 bytes are the safe ATAPI DMA buffer sizes to use.
#   
#   Attached please find the patch to fix the pdc2027x ATAPI DMA problem.
#   
#   Changes:
#   1. Add a callback function "check_atapi_dma()" to ata_port_operations such that libata core
#   can ask the driver: "Can this command be processed in ATAPI DMA mode safely? " 
#   when the the command is received.
#   2. ATAPI DMA is off by default if the callback function is not provided by the driver
#   
#   If the callback function is not provided by the driver, the ATAPI DMA should be as is.
#   The ATAPI DMA is already controlled by dev->flags.
#   
#   BTW, the patch isolates the ATAPI DMA workaround to the pdc20275 driver itself,
#   not impacting libata core .
#    
#   Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
# 
# drivers/scsi/libata-scsi.c
#   2004/12/27 15:29:08-05:00 albertcc@tw.ibm.com +5 -0
#   [libata] verify ATAPI DMA for a given request is OK
#   
#   After some testing, it seems that some PATA host adapter (ex. pdc20275) cannot 
#   work reliably with specific request buffer sizes under ATAPI DMA mode.
#   
#   Detailed test result:
#   4096, 2048, 1024, 512, 256: OK
#   384, 257, 255, 128, 96, 64, 32:  failed (irq lost)
#    
#   It seems multiple of 256 bytes are the safe ATAPI DMA buffer sizes to use.
#   
#   Attached please find the patch to fix the pdc2027x ATAPI DMA problem.
#   
#   Changes:
#   1. Add a callback function "check_atapi_dma()" to ata_port_operations such that libata core
#   can ask the driver: "Can this command be processed in ATAPI DMA mode safely? " 
#   when the the command is received.
#   2. ATAPI DMA is off by default if the callback function is not provided by the driver
#   
#   If the callback function is not provided by the driver, the ATAPI DMA should be as is.
#   The ATAPI DMA is already controlled by dev->flags.
#   
#   BTW, the patch isolates the ATAPI DMA workaround to the pdc20275 driver itself,
#   not impacting libata core .
#    
#   Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
# 
# drivers/scsi/libata-core.c
#   2004/12/27 15:29:08-05:00 albertcc@tw.ibm.com +17 -0
#   [libata] verify ATAPI DMA for a given request is OK
#   
#   After some testing, it seems that some PATA host adapter (ex. pdc20275) cannot 
#   work reliably with specific request buffer sizes under ATAPI DMA mode.
#   
#   Detailed test result:
#   4096, 2048, 1024, 512, 256: OK
#   384, 257, 255, 128, 96, 64, 32:  failed (irq lost)
#    
#   It seems multiple of 256 bytes are the safe ATAPI DMA buffer sizes to use.
#   
#   Attached please find the patch to fix the pdc2027x ATAPI DMA problem.
#   
#   Changes:
#   1. Add a callback function "check_atapi_dma()" to ata_port_operations such that libata core
#   can ask the driver: "Can this command be processed in ATAPI DMA mode safely? " 
#   when the the command is received.
#   2. ATAPI DMA is off by default if the callback function is not provided by the driver
#   
#   If the callback function is not provided by the driver, the ATAPI DMA should be as is.
#   The ATAPI DMA is already controlled by dev->flags.
#   
#   BTW, the patch isolates the ATAPI DMA workaround to the pdc20275 driver itself,
#   not impacting libata core .
#    
#   Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
# 
# ChangeSet
#   2004/12/27 15:24:53-05:00 albertcc@tw.ibm.com 
#   [libata] PIO error handling improvement
#   
#   Tested burning CD-RW with libata-dev-2.6 and cdrecord:
#   1. ATAPI DMA mode - tested OK
#   2. ATAPI PIO mode - test failed when cdrecord finishes burning and issues MODE_SELECT to the device.
#   
#    After checking the log, it showed that MODE_SELECT caused ata_pio_complete() to return error.
#   However, the error is not handled by ata_pio_task().
#   
#   Attached please find the patch for ata_pio_task() error handling for your review.
#   (The patch is against the libata-dev-2.6 tree. )
#   
#   Changes in the patch:
#   1. End the PIO task when PIO_ST_IDLE state is entered
#   2. End the PIO task after PIO_ST_TMOUT and PIO_ST_ERR state handled by ata_pio_error()
#   3. Remove the first "if" statement to handle the error condition returned from 
#      ata_pio_block(), ata_pio_complete() and ata_pio_poll().
#   
#   Change #2 is not so necessary since ata_pio_error() will put the cmd to  PIO_ST_IDLE state
#   after the error condition is handled. The change just saves a function call to queue_work().
#   
#   Tested OK on on my machine with pdc20275 and ASUS CD-RW drive.
#   
#   Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
# 
# drivers/scsi/libata-core.c
#   2004/12/27 15:24:47-05:00 albertcc@tw.ibm.com +9 -10
#   [libata] PIO error handling improvement
#   
#   Tested burning CD-RW with libata-dev-2.6 and cdrecord:
#   1. ATAPI DMA mode - tested OK
#   2. ATAPI PIO mode - test failed when cdrecord finishes burning and issues MODE_SELECT to the device.
#   
#    After checking the log, it showed that MODE_SELECT caused ata_pio_complete() to return error.
#   However, the error is not handled by ata_pio_task().
#   
#   Attached please find the patch for ata_pio_task() error handling for your review.
#   (The patch is against the libata-dev-2.6 tree. )
#   
#   Changes in the patch:
#   1. End the PIO task when PIO_ST_IDLE state is entered
#   2. End the PIO task after PIO_ST_TMOUT and PIO_ST_ERR state handled by ata_pio_error()
#   3. Remove the first "if" statement to handle the error condition returned from 
#      ata_pio_block(), ata_pio_complete() and ata_pio_poll().
#   
#   Change #2 is not so necessary since ata_pio_error() will put the cmd to  PIO_ST_IDLE state
#   after the error condition is handled. The change just saves a function call to queue_work().
#   
#   Tested OK on on my machine with pdc20275 and ASUS CD-RW drive.
#   
#   Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
# 
# ChangeSet
#   2004/12/27 15:22:51-05:00 albertcc@tw.ibm.com 
#   [libata] use PIO mode for request sense
#   
#   Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
# 
# drivers/scsi/libata-core.c
#   2004/12/27 15:22:45-05:00 albertcc@tw.ibm.com +4 -11
#   [libata] use PIO mode for request sense
#   
#   Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
# 
# ChangeSet
#   2004/12/27 15:18:56-05:00 penguin@muskoka.com 
#   [PATCH] 2.6.9 Use skb_padto() in drivers/net/8390.c
#   
#   The 8390 driver had been fixed for leaking information in short packets
#   prior to skb_padto() existing.  This change gets rid of the scratch area on
#   the stack and makes it use skb_padto().  Thanks to Mark Smith for bringing
#   this to my attention.
#   
#   Signed-off-by: Paul Gortmaker <p_gortmaker@yahoo.com>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/8390.c
#   2004/12/16 13:06:23-05:00 penguin@muskoka.com +9 -12
#   2.6.9 Use skb_padto() in drivers/net/8390.c
# 
# ChangeSet
#   2004/12/27 15:13:29-05:00 bunk@stusta.de 
#   [PATCH] drivers/char/hw_random.c: make a variable static
#   
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/char/hw_random.c
#   2004/11/06 18:10:39-05:00 bunk@stusta.de +1 -1
#   drivers/char/hw_random.c: make a variable static (fwd)
# 
# ChangeSet
#   2004/12/27 15:13:16-05:00 james4765@verizon.net 
#   [PATCH] hw_random: Minor cleanup to hw_random.c
#   
#   Clean up in drivers/char/hw_random.c:
#   Make debug #defines a little easier to understand.
#   Small whitespace cleanup.
#   Change some printk()'s into pr_info()'s.
#   Add KERN_ constant to debug printk().
#   
#   Signed-off-by: James Nelson <james4765@gmail.com>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/char/hw_random.c
#   2004/12/26 11:22:27-05:00 james4765@verizon.net +15 -18
#   hw_random: Minor cleanup to hw_random.c
# 
# ChangeSet
#   2004/12/27 10:28:42-08:00 torvalds@ppc970.osdl.org 
#   Merge bk://linux-scsi.bkbits.net/scsi-for-linus-2.6
#   into ppc970.osdl.org:/home/torvalds/v2.6/linux
# 
# include/linux/pci_ids.h
#   2004/12/27 10:28:38-08:00 torvalds@ppc970.osdl.org +0 -0
#   Auto merged
# 
# drivers/scsi/qla2xxx/qla_rscn.c
#   2004/12/27 10:28:38-08:00 torvalds@ppc970.osdl.org +0 -0
#   Auto merged
# 
# drivers/scsi/aacraid/linit.c
#   2004/12/27 10:28:38-08:00 torvalds@ppc970.osdl.org +0 -0
#   Auto merged
# 
# drivers/scsi/scsi_lib.c
#   2004/12/27 10:28:37-08:00 torvalds@ppc970.osdl.org +0 -0
#   Auto merged
# 
# drivers/scsi/aacraid/aacraid.h
#   2004/12/27 10:28:37-08:00 torvalds@ppc970.osdl.org +0 -0
#   Auto merged
# 
# drivers/scsi/Kconfig
#   2004/12/27 10:28:37-08:00 torvalds@ppc970.osdl.org +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/12/27 10:24:28-08:00 arjan@infradead.org 
#   [PATCH] drivers/acpi/ibm_acpi.o .init.text refers to .exit.text
#   
#   the ibm_acpi.c driver references acpi_ibm_exit() from it's __init function,
#   which means the exit function isn't allowed to be __exit since __exit
#   functions are not part of vmlinux while __init functions are.
#   
#   Signed-off-by: Arjan van de Ven <arjan@infradead.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/acpi/ibm_acpi.c
#   2004/12/27 02:20:31-08:00 arjan@infradead.org +1 -1
#   drivers/acpi/ibm_acpi.o .init.text refers to .exit.text
# 
# ChangeSet
#   2004/12/27 10:21:04-08:00 torvalds@ppc970.osdl.org 
#   Merge bk://linux-voyager.bkbits.net/mca-2.6
#   into ppc970.osdl.org:/home/torvalds/v2.6/linux
# 
# include/asm-sparc/processor.h
#   2004/12/27 10:21:00-08:00 torvalds@ppc970.osdl.org +0 -0
#   Auto merged
# 
# arch/i386/kernel/time.c
#   2004/12/27 10:21:00-08:00 torvalds@ppc970.osdl.org +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/12/27 10:19:24-08:00 torvalds@ppc970.osdl.org 
#   Revert duplicate AC97 id's.
#   
#   They were already there, properly sorted too.
# 
# sound/pci/intel8x0.c
#   2004/12/27 10:19:17-08:00 torvalds@ppc970.osdl.org +0 -18
#   Revert duplicate AC97 id's.
#   
#   They were already there, properly sorted too.
# 
# ChangeSet
#   2004/12/27 10:06:23-06:00 jejb@mulgrave.(none) 
#   SCSI: fix compile warning in fc transport class
#   
#     CC [M]  drivers/scsi/scsi_transport_fc.o
#   drivers/scsi/scsi_transport_fc.c: In function `fc_stat_show':
#   drivers/scsi/scsi_transport_fc.c:634: warning: long long unsigned int format, long unsigned int arg (arg 4)
#   
#   To us %llx on a 64 bit platform we have to cast u64 to 
#   unsigned long long.
#   
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
# 
# drivers/scsi/scsi_transport_fc.c
#   2004/12/27 10:04:13-06:00 jejb@mulgrave.(none) +1 -1
#   SCSI: fix compile warning in fc transport class
# 
# ChangeSet
#   2004/12/27 09:52:25-06:00 jejb@mulgrave.(none) 
#   SCSI: Add FC transport host attributes
#   
#   From: 	James.Smart@Emulex.Com
#   
#   This patch updates the fc_transport with attributes for local FC ports
#   (e.g. Hosts).  The port attributes are defined per HBAAPI v2.0 definitions.
#   
#   This patch results in the following in /sys/class:
#   -----------------------------------------------------
#   
#   [jsmart@elxware class]$ cd /sys/class
#   [jsmart@elxware class]$ ls
#   fc_host       graphics  misc     pci_bus       scsi_host  usb_host
#   fc_transport  input     net      scsi_device   tty        vc
#   firmware      mem       netlink  scsi_generic  usb
#   [jsmart@elxware class]$ cd fc_host
#   [jsmart@elxware fc_host]$ ls
#   host4
#   
#   [jsmart@elxware fc_host]$ cd host4
#   [jsmart@elxware host4]$ ls
#   device                 host_port_maxframe_size      host_port_supported_speeds
#   host_fabric_name       host_port_name               host_port_symbolic_name
#   host_link_down_tmo     host_port_speed              host_port_type
#   host_node_name         host_port_state              host_tgtid_bind_type
#   host_port_active_fc4s  host_port_supported_classes  statistics
#   host_port_id           host_port_supported_fc4s
#   [jsmart@elxware host4]$ ls -ld *
#   lrwxrwxrwx  1 root root    0 Oct 13 18:24 device -> ../../../devices/platform/host4
#   -r--r--r--  1 root root 4096 Oct 13 18:24 host_fabric_name
#   -rw-r--r--  1 root root 4096 Oct 13 18:24 host_link_down_tmo
#   -r--r--r--  1 root root 4096 Oct 13 18:24 host_node_name
#   -r--r--r--  1 root root 4096 Oct 13 18:24 host_port_active_fc4s
#   -r--r--r--  1 root root 4096 Oct 13 18:24 host_port_id
#   -r--r--r--  1 root root 4096 Oct 13 18:24 host_port_maxframe_size
#   -r--r--r--  1 root root 4096 Oct 13 18:24 host_port_name
#   -r--r--r--  1 root root 4096 Oct 13 18:24 host_port_speed
#   -r--r--r--  1 root root 4096 Oct 13 18:24 host_port_state
#   -r--r--r--  1 root root 4096 Oct 13 18:24 host_port_supported_classes
#   -r--r--r--  1 root root 4096 Oct 13 18:24 host_port_supported_fc4s
#   -r--r--r--  1 root root 4096 Oct 13 18:24 host_port_supported_speeds
#   -r--r--r--  1 root root 4096 Oct 13 18:24 host_port_symbolic_name
#   -r--r--r--  1 root root 4096 Oct 13 18:24 host_port_type
#   -rw-r--r--  1 root root 4096 Oct 13 18:24 host_tgtid_bind_type
#   drwxr-xr-x  2 root root    0 Oct 13 18:24 statistics
#   
#   
#   Using the following script (/tmp/show_attributes):
#       #!/bin/sh
#       FILES=`ls *`
#       for file in $FILES; do
#         if [ -f $file ] ; then
#           echo "$file : " `cat $file`
#         fi
#       done
#   
#   Here's a sample of querying the attributes:
#   
#   [jsmart@elxware /]$ cd /sys/class/fc_host/host4
#   [jsmart@elxware host4]$ /tmp/show_attributes
#   host_fabric_name :  0x33334444ffeeddcc
#   host_link_down_tmo :  30
#   host_node_name :  0x78563412aabbccdd
#   host_port_active_fc4s :  hex: 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f
#   host_port_id :  0x789abc
#   host_port_maxframe_size :  2511 bytes
#   host_port_name :  0xefcdab9011223344
#   host_port_speed :  2 Gbit
#   host_port_state :  Online
#   host_port_supported_classes :  Class 2, Class 3
#   host_port_supported_fc4s :  hex: 80 81 82 83 84 85 86 87 88 89 8a 8b 8c 8d 8e 8f 90 91 92 93 94 95 96 97 98 99 9a 9b 9c 9d 9e 9f
#   host_port_supported_speeds :  2 Gbit, 4 Gbit, 10 Gbit
#   host_port_symbolic_name :  LP9052 Dual Port Adapter
#   host_port_type :  NPort (fabric via point-to-point)
#   host_tgtid_bind_type :  wwpn (World Wide Port Name)
#   
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
# 
# include/scsi/scsi_transport_fc.h
#   2004/12/27 09:51:06-06:00 jejb@mulgrave.(none) +207 -28
#   SCSI: Add FC transport host attributes
# 
# drivers/scsi/scsi_transport_fc.c
#   2004/12/27 09:51:06-06:00 jejb@mulgrave.(none) +400 -53
#   SCSI: Add FC transport host attributes
# 
# ChangeSet
#   2004/12/27 09:13:20-06:00 sleddog@us.ibm.com 
#   [PATCH] ibmvscsi: replace schedule_timeout() with msleep()
#   
#   Description: Use msleep() instead of schedule_timeout()
#   to guarantee the task delays as expected.  Originally
#   submitted to linux-scsi by the janitors, and resubmitted
#   by boutcher (after testing :-)
#   
#   Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
#   Signed-off-by: Maximilian Attems <janitor@sternwelten.at>
#   Signed-off-by: Dave Boutcher <boutcher@us.ibm.com>
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
# 
# drivers/scsi/ibmvscsi/ibmvscsi.c
#   2004/10/20 19:41:22-05:00 sleddog@us.ibm.com +2 -2
#   ibmvscsi: replace schedule_timeout() with msleep()
# 
# ChangeSet
#   2004/12/27 10:58:39+00:00 dvrabel@com.rmk.(none) 
#   [ARM PATCH] 2323/1: Expand IXP4XX_WATCHDOG config help text
#   
#   Patch from David Vrabel
#   
#   Expand the IXP4XX_WATCHDOG (IXP4xx internal watchdog) config option help text with a note about its ineffectiveness.
#   
#   Signed-off-by: David Vrabel
#   Signed-off-by: Russell King
# 
# drivers/char/watchdog/Kconfig
#   2004/12/22 10:54:00+00:00 dvrabel@com.rmk.(none) +5 -0
#   [PATCH] 2323/1: Expand IXP4XX_WATCHDOG config help text
# 
# ChangeSet
#   2004/12/27 10:53:36+00:00 catalin.marinas@com.rmk.(none) 
#   [ARM PATCH] 2322/1: Enable ARM922T configuration option for Integrator
#   
#   Patch from Catalin Marinas
#   
#   This patch enables the ARM922T configuration option for the
#   Integrator platforms (there is an Excalibur core module available).
#   
#   Signed-off-by: Catalin Marinas
#   Signed-off-by: Russell King
# 
# arch/arm/mm/Kconfig
#   2004/12/27 00:00:00+00:00 catalin.marinas@com.rmk.(none) +3 -3
#   [PATCH] 2322/1: Enable ARM922T configuration option for Integrator
# 
# ChangeSet
#   2004/12/27 10:48:52+00:00 dsaxena@net.rmk.(none) 
#   [ARM PATCH] 2264/1: Move platform-specific code out of entry-armv.S
#   
#   Patch from Deepak Saxena
#   
#   This patch borrows from the uclinux source where they have moved
#   the per-platform code for get_irqnr_and_base, disable_fiq, and
#   irq_prio_table out of entry-armv.S. However, instead of putting the
#   macros in arch/arm/mach-$(MACHINE)/entry-header.S, we just have
#   it in the machine's incdir. This means we don't need the extra
#   complexity of creating symlink at build time. The patch also removes 
#   the irq_prio_table as a requirement for all machines and makes it
#   specific to IOC/IOMD machines. 
#     
#   This patch drastically shrinks entry-armv.S and allows us to delete 
#   and add machines without having to touch generic code (there were two 
#   dead machines laying around in entry-armv.S).
#     
#   Tested on IXP4xx and test-built for just about every defconfig.
#   
#   Signed-off-by: Deepak Saxena
#   Signed-off-by: Russell King
# 
# include/asm-arm/hardware/entry-macro-iomd.S
#   2004/11/17 23:16:28+00:00 dsaxena@net.rmk.(none) +145 -0
#   [PATCH] 2264/1: Move platform-specific code out of entry-armv.S
# 
# include/asm-arm/arch-versatile/entry-macro.S
#   2004/11/17 23:16:28+00:00 dsaxena@net.rmk.(none) +35 -0
#   [PATCH] 2264/1: Move platform-specific code out of entry-armv.S
# 
# include/asm-arm/arch-shark/entry-macro.S
#   2004/11/17 23:16:28+00:00 dsaxena@net.rmk.(none) +35 -0
#   [PATCH] 2264/1: Move platform-specific code out of entry-armv.S
# 
# include/asm-arm/arch-sa1100/entry-macro.S
#   2004/11/17 23:16:28+00:00 dsaxena@net.rmk.(none) +41 -0
#   [PATCH] 2264/1: Move platform-specific code out of entry-armv.S
# 
# include/asm-arm/arch-s3c2410/entry-macro.S
#   2004/11/17 23:16:28+00:00 dsaxena@net.rmk.(none) +127 -0
#   [PATCH] 2264/1: Move platform-specific code out of entry-armv.S
# 
# include/asm-arm/arch-rpc/entry-macro.S
#   2004/11/17 23:16:28+00:00 dsaxena@net.rmk.(none) +3 -0
#   [PATCH] 2264/1: Move platform-specific code out of entry-armv.S
# 
# include/asm-arm/arch-pxa/entry-macro.S
#   2004/11/17 23:16:28+00:00 dsaxena@net.rmk.(none) +31 -0
#   [PATCH] 2264/1: Move platform-specific code out of entry-armv.S
# 
# arch/arm/kernel/entry-header.S
#   2004/11/17 23:16:28+00:00 dsaxena@net.rmk.(none) +1 -0
#   [PATCH] 2264/1: Move platform-specific code out of entry-armv.S
# 
# include/asm-arm/hardware/entry-macro-iomd.S
#   2004/11/17 23:16:28+00:00 dsaxena@net.rmk.(none) +0 -0
#   BitKeeper file /usr/src/bk/linux-2.6-rmk/include/asm-arm/hardware/entry-macro-iomd.S
# 
# include/asm-arm/arch-versatile/entry-macro.S
#   2004/11/17 23:16:28+00:00 dsaxena@net.rmk.(none) +0 -0
#   BitKeeper file /usr/src/bk/linux-2.6-rmk/include/asm-arm/arch-versatile/entry-macro.S
# 
# include/asm-arm/arch-shark/entry-macro.S
#   2004/11/17 23:16:28+00:00 dsaxena@net.rmk.(none) +0 -0
#   BitKeeper file /usr/src/bk/linux-2.6-rmk/include/asm-arm/arch-shark/entry-macro.S
# 
# include/asm-arm/arch-sa1100/entry-macro.S
#   2004/11/17 23:16:28+00:00 dsaxena@net.rmk.(none) +0 -0
#   BitKeeper file /usr/src/bk/linux-2.6-rmk/include/asm-arm/arch-sa1100/entry-macro.S
# 
# include/asm-arm/arch-s3c2410/entry-macro.S
#   2004/11/17 23:16:28+00:00 dsaxena@net.rmk.(none) +0 -0
#   BitKeeper file /usr/src/bk/linux-2.6-rmk/include/asm-arm/arch-s3c2410/entry-macro.S
# 
# include/asm-arm/arch-rpc/entry-macro.S
#   2004/11/17 23:16:28+00:00 dsaxena@net.rmk.(none) +0 -0
#   BitKeeper file /usr/src/bk/linux-2.6-rmk/include/asm-arm/arch-rpc/entry-macro.S
# 
# include/asm-arm/arch-pxa/entry-macro.S
#   2004/11/17 23:16:28+00:00 dsaxena@net.rmk.(none) +0 -0
#   BitKeeper file /usr/src/bk/linux-2.6-rmk/include/asm-arm/arch-pxa/entry-macro.S
# 
# include/asm-arm/arch-omap/entry-macro.S
#   2004/11/17 23:16:28+00:00 dsaxena@net.rmk.(none) +32 -0
#   [PATCH] 2264/1: Move platform-specific code out of entry-armv.S
# 
# include/asm-arm/arch-lh7a40x/entry-macro.S
#   2004/11/17 23:16:28+00:00 dsaxena@net.rmk.(none) +67 -0
#   [PATCH] 2264/1: Move platform-specific code out of entry-armv.S
# 
# include/asm-arm/arch-l7200/entry-macro.S
#   2004/11/17 23:16:28+00:00 dsaxena@net.rmk.(none) +29 -0
#   [PATCH] 2264/1: Move platform-specific code out of entry-armv.S
# 
# include/asm-arm/arch-ixp4xx/entry-macro.S
#   2004/11/17 23:16:28+00:00 dsaxena@net.rmk.(none) +26 -0
#   [PATCH] 2264/1: Move platform-specific code out of entry-armv.S
# 
# include/asm-arm/arch-ixp2000/entry-macro.S
#   2004/11/17 23:16:28+00:00 dsaxena@net.rmk.(none) +59 -0
#   [PATCH] 2264/1: Move platform-specific code out of entry-armv.S
# 
# include/asm-arm/arch-iop3xx/entry-macro.S
#   2004/11/17 23:16:28+00:00 dsaxena@net.rmk.(none) +61 -0
#   [PATCH] 2264/1: Move platform-specific code out of entry-armv.S
# 
# include/asm-arm/arch-integrator/entry-macro.S
#   2004/11/17 23:16:28+00:00 dsaxena@net.rmk.(none) +35 -0
#   [PATCH] 2264/1: Move platform-specific code out of entry-armv.S
# 
# include/asm-arm/arch-imx/entry-macro.S
#   2004/11/17 23:16:28+00:00 dsaxena@net.rmk.(none) +29 -0
#   [PATCH] 2264/1: Move platform-specific code out of entry-armv.S
# 
# include/asm-arm/arch-h720x/entry-macro.S
#   2004/11/17 23:16:28+00:00 dsaxena@net.rmk.(none) +60 -0
#   [PATCH] 2264/1: Move platform-specific code out of entry-armv.S
# 
# include/asm-arm/arch-epxa10db/entry-macro.S
#   2004/11/17 23:16:28+00:00 dsaxena@net.rmk.(none) +25 -0
#   [PATCH] 2264/1: Move platform-specific code out of entry-armv.S
# 
# include/asm-arm/arch-ebsa285/entry-macro.S
#   2004/11/17 23:16:28+00:00 dsaxena@net.rmk.(none) +105 -0
#   [PATCH] 2264/1: Move platform-specific code out of entry-armv.S
# 
# include/asm-arm/arch-ebsa110/entry-macro.S
#   2004/11/17 23:16:28+00:00 dsaxena@net.rmk.(none) +33 -0
#   [PATCH] 2264/1: Move platform-specific code out of entry-armv.S
# 
# include/asm-arm/arch-clps711x/entry-macro.S
#   2004/11/17 23:16:28+00:00 dsaxena@net.rmk.(none) +51 -0
#   [PATCH] 2264/1: Move platform-specific code out of entry-armv.S
# 
# arch/arm/kernel/entry-armv.S
#   2004/11/17 23:16:28+00:00 dsaxena@net.rmk.(none) +0 -996
#   [PATCH] 2264/1: Move platform-specific code out of entry-armv.S
# 
# include/asm-arm/arch-omap/entry-macro.S
#   2004/11/17 23:16:28+00:00 dsaxena@net.rmk.(none) +0 -0
#   BitKeeper file /usr/src/bk/linux-2.6-rmk/include/asm-arm/arch-omap/entry-macro.S
# 
# include/asm-arm/arch-lh7a40x/entry-macro.S
#   2004/11/17 23:16:28+00:00 dsaxena@net.rmk.(none) +0 -0
#   BitKeeper file /usr/src/bk/linux-2.6-rmk/include/asm-arm/arch-lh7a40x/entry-macro.S
# 
# include/asm-arm/arch-l7200/entry-macro.S
#   2004/11/17 23:16:28+00:00 dsaxena@net.rmk.(none) +0 -0
#   BitKeeper file /usr/src/bk/linux-2.6-rmk/include/asm-arm/arch-l7200/entry-macro.S
# 
# include/asm-arm/arch-ixp4xx/entry-macro.S
#   2004/11/17 23:16:28+00:00 dsaxena@net.rmk.(none) +0 -0
#   BitKeeper file /usr/src/bk/linux-2.6-rmk/include/asm-arm/arch-ixp4xx/entry-macro.S
# 
# include/asm-arm/arch-ixp2000/entry-macro.S
#   2004/11/17 23:16:28+00:00 dsaxena@net.rmk.(none) +0 -0
#   BitKeeper file /usr/src/bk/linux-2.6-rmk/include/asm-arm/arch-ixp2000/entry-macro.S
# 
# include/asm-arm/arch-iop3xx/entry-macro.S
#   2004/11/17 23:16:28+00:00 dsaxena@net.rmk.(none) +0 -0
#   BitKeeper file /usr/src/bk/linux-2.6-rmk/include/asm-arm/arch-iop3xx/entry-macro.S
# 
# include/asm-arm/arch-integrator/entry-macro.S
#   2004/11/17 23:16:28+00:00 dsaxena@net.rmk.(none) +0 -0
#   BitKeeper file /usr/src/bk/linux-2.6-rmk/include/asm-arm/arch-integrator/entry-macro.S
# 
# include/asm-arm/arch-imx/entry-macro.S
#   2004/11/17 23:16:28+00:00 dsaxena@net.rmk.(none) +0 -0
#   BitKeeper file /usr/src/bk/linux-2.6-rmk/include/asm-arm/arch-imx/entry-macro.S
# 
# include/asm-arm/arch-h720x/entry-macro.S
#   2004/11/17 23:16:28+00:00 dsaxena@net.rmk.(none) +0 -0
#   BitKeeper file /usr/src/bk/linux-2.6-rmk/include/asm-arm/arch-h720x/entry-macro.S
# 
# include/asm-arm/arch-epxa10db/entry-macro.S
#   2004/11/17 23:16:28+00:00 dsaxena@net.rmk.(none) +0 -0
#   BitKeeper file /usr/src/bk/linux-2.6-rmk/include/asm-arm/arch-epxa10db/entry-macro.S
# 
# include/asm-arm/arch-ebsa285/entry-macro.S
#   2004/11/17 23:16:28+00:00 dsaxena@net.rmk.(none) +0 -0
#   BitKeeper file /usr/src/bk/linux-2.6-rmk/include/asm-arm/arch-ebsa285/entry-macro.S
# 
# include/asm-arm/arch-ebsa110/entry-macro.S
#   2004/11/17 23:16:28+00:00 dsaxena@net.rmk.(none) +0 -0
#   BitKeeper file /usr/src/bk/linux-2.6-rmk/include/asm-arm/arch-ebsa110/entry-macro.S
# 
# include/asm-arm/arch-clps711x/entry-macro.S
#   2004/11/17 23:16:28+00:00 dsaxena@net.rmk.(none) +0 -0
#   BitKeeper file /usr/src/bk/linux-2.6-rmk/include/asm-arm/arch-clps711x/entry-macro.S
# 
# include/asm-arm/arch-cl7500/entry-macro.S
#   2004/11/17 23:16:28+00:00 dsaxena@net.rmk.(none) +3 -0
#   [PATCH] 2264/1: Move platform-specific code out of entry-armv.S
# 
# include/asm-arm/arch-cl7500/entry-macro.S
#   2004/11/17 23:16:28+00:00 dsaxena@net.rmk.(none) +0 -0
#   BitKeeper file /usr/src/bk/linux-2.6-rmk/include/asm-arm/arch-cl7500/entry-macro.S
# 
# ChangeSet
#   2004/12/27 04:31:00-05:00 jgarzik@pobox.com 
#   Merge pobox.com:/garz/repo/netdev-2.6/janitor
#   into pobox.com:/garz/repo/net-drivers-2.6
# 
# drivers/net/tulip/tulip_core.c
#   2004/12/27 04:30:57-05:00 jgarzik@pobox.com +0 -0
#   Auto merged
# 
# drivers/net/r8169.c
#   2004/12/27 04:30:57-05:00 jgarzik@pobox.com +0 -0
#   Auto merged
# 
# drivers/net/e100.c
#   2004/12/27 04:30:57-05:00 jgarzik@pobox.com +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/12/27 04:29:21-05:00 jgarzik@pobox.com 
#   Merge pobox.com:/garz/repo/netdev-2.6/misc
#   into pobox.com:/garz/repo/net-drivers-2.6
# 
# drivers/net/Kconfig
#   2004/12/27 04:29:18-05:00 jgarzik@pobox.com +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/12/27 04:26:39-05:00 jgarzik@pobox.com 
#   Merge pobox.com:/garz/repo/netdev-2.6/viro-eth1
#   into pobox.com:/garz/repo/net-drivers-2.6
# 
# drivers/net/wireless/netwave_cs.c
#   2004/12/27 04:26:36-05:00 jgarzik@pobox.com +0 -0
#   Auto merged
# 
# drivers/net/wireless/airo.c
#   2004/12/27 04:26:36-05:00 jgarzik@pobox.com +0 -0
#   Auto merged
# 
# drivers/net/tokenring/olympic.c
#   2004/12/27 04:26:36-05:00 jgarzik@pobox.com +0 -0
#   Auto merged
# 
# drivers/net/tokenring/lanstreamer.c
#   2004/12/27 04:26:36-05:00 jgarzik@pobox.com +0 -0
#   Auto merged
# 
# drivers/net/sundance.c
#   2004/12/27 04:26:36-05:00 jgarzik@pobox.com +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/12/27 10:21:15+01:00 vojtech@suse.cz 
#   Merge suse.cz:/home/vojtech/bk/linus into suse.cz:/home/vojtech/bk/input
# 
# drivers/usb/input/hid-core.c
#   2004/12/27 10:21:12+01:00 vojtech@suse.cz +0 -0
#   Auto merged
# 
# drivers/input/tsdev.c
#   2004/12/27 10:21:12+01:00 vojtech@suse.cz +0 -5
#   Auto merged
# 
# drivers/input/mousedev.c
#   2004/12/27 10:21:12+01:00 vojtech@suse.cz +0 -2
#   Auto merged
# 
# drivers/input/joydev.c
#   2004/12/27 10:21:12+01:00 vojtech@suse.cz +0 -2
#   Auto merged
# 
# drivers/input/evdev.c
#   2004/12/27 10:21:12+01:00 vojtech@suse.cz +0 -2
#   Auto merged
# 
# Documentation/kernel-parameters.txt
#   2004/12/27 10:21:12+01:00 vojtech@suse.cz +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/12/26 22:20:57-08:00 alan@lxorguk.ukuu.org.uk 
#   [PATCH] Early ALI watchdog support
#   
#   Originally submitted by Mike Waychison <Michael.Waychison@sun.com> in
#   August but apparently lost.
#   
#   Signed-off-by: Alan Cox <alan@redhat.com>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/char/watchdog/alim7101_wdt.c
#   2004/12/26 09:25:46-08:00 alan@lxorguk.ukuu.org.uk +42 -4
#   Early ALI watchdog support
# 
# ChangeSet
#   2004/12/26 22:20:44-08:00 alan@lxorguk.ukuu.org.uk 
#   [PATCH] quiet scsi ioctls warnings
#   
#   SCSI ioctls can ask for a lot of memory and fail. We don't need to vomit
#   in the log file for this case. Again taken from the Red Hat minor
#   patches applied for FC3.
#   
#   Original-patch: Arjan van de Ven <arjanv@redhat.com>
#   Signed-off-by: Alan Cox <alan@redhat.com>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# drivers/block/scsi_ioctl.c
#   2004/12/26 09:27:51-08:00 alan@lxorguk.ukuu.org.uk +1 -1
#   quiet scsi ioctls warnings
# 
# ChangeSet
#   2004/12/26 22:20:32-08:00 alan@lxorguk.ukuu.org.uk 
#   [PATCH] Paul Laufer CREDITS address update
#   
#   Paul Laufer informed the list that he had changed address and his change
#   of address had been ignored so CREDITS was still wrong although other
#   files had been updated.
#   
#   Fix this.
#   
#   Signed-off-by: Alan Cox <alan@redhat.com>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# CREDITS
#   2004/12/26 09:29:08-08:00 alan@lxorguk.ukuu.org.uk +1 -1
#   Paul Laufer CREDITS address update
# 
# ChangeSet
#   2004/12/26 22:20:19-08:00 alan@lxorguk.ukuu.org.uk 
#   [PATCH] make microcode text less confusing
#   
#   Red Hat got some confused customers due to this message. The confused
#   user case is when they update the BIOS and all of a sudden we have "no
#   suitable data" yet we did before. We (Arjan van de Ven) thus changed it
#   to "No new microcode" which is much much clearer.
#   
#   Signed-off-by: Alan Cox <alan@redhat.com>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/i386/kernel/microcode.c
#   2004/12/26 09:30:43-08:00 alan@lxorguk.ukuu.org.uk +1 -1
#   make microcode text less confusing
# 
# ChangeSet
#   2004/12/26 22:20:06-08:00 alan@lxorguk.ukuu.org.uk 
#   [PATCH] i810 more AC97 tunings
#   
#   Add some more funky AC97 knowledge to the intel8x0 driver. These come
#   from Red Hat and its partners and are included in our shipping code.
#   
#   Signed-off-by: Alan Cox <alan@redhat.com>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# sound/pci/intel8x0.c
#   2004/12/26 08:56:05-08:00 alan@lxorguk.ukuu.org.uk +18 -0
#   i810 more AC97 tunings
# 
# ChangeSet
#   2004/12/26 22:15:27-08:00 torvalds@ppc970.osdl.org 
#   Merge bk://linux-dj.bkbits.net/agpgart
#   into ppc970.osdl.org:/home/torvalds/v2.6/linux
# 
# include/linux/pci_ids.h
#   2004/12/26 22:15:23-08:00 torvalds@ppc970.osdl.org +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/12/26 22:14:57-05:00 jgarzik@pobox.com 
#   Merge pobox.com:/garz/repo/netdev-2.6/s2io
#   into pobox.com:/garz/repo/net-drivers-2.6
# 
# drivers/net/Kconfig
#   2004/12/26 22:14:54-05:00 jgarzik@pobox.com +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/12/26 22:13:59-05:00 jgarzik@pobox.com 
#   Merge pobox.com:/garz/repo/netdev-2.6/r8169
#   into pobox.com:/garz/repo/net-drivers-2.6
# 
# drivers/net/r8169.c
#   2004/12/26 22:13:57-05:00 jgarzik@pobox.com +0 -0
#   Auto merged
# 
# drivers/net/Kconfig
#   2004/12/26 22:13:56-05:00 jgarzik@pobox.com +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/12/25 13:54:06-08:00 davem@nuts.davemloft.net 
#   Merge nuts.davemloft.net:/disk1/BK/net-2.6.11
#   into nuts.davemloft.net:/disk1/BK/net-2.6
# 
# net/sched/act_api.c
#   2004/12/25 13:53:55-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/12/24 00:03:49-05:00 len.brown@intel.com 
#   Merge intel.com:/home/lenb/src/26-stable-dev
#   into intel.com:/home/lenb/src/26-latest-dev
# 
# drivers/acpi/pci_irq.c
#   2004/12/24 00:03:38-05:00 len.brown@intel.com +0 -0
#   Auto merged
# 
# drivers/acpi/hardware/hwsleep.c
#   2004/12/24 00:03:38-05:00 len.brown@intel.com +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/12/23 23:43:30-05:00 len.brown@intel.com 
#   [ACPI] Fix suspend/resume lockup issue
#   by leaving Bus Master Arbitration enabled.
#   The ACPI spec mandates it be disabled only for C3.
#   
#   http://bugzilla.kernel.org/show_bug.cgi?id=3599
#   
#   Signed-off-by: David Shaohua Li <shaohua.li@intel.com>
#   Signed-off-by: Len Brown <len.brown@intel.com>
# 
# drivers/acpi/hardware/hwsleep.c
#   2004/12/16 23:21:28-05:00 len.brown@intel.com +0 -16
#   Fix suspend/resume lockup issue
#   by leaving Bus Master Arbitration enabled.
# 
# ChangeSet
#   2004/12/23 23:38:32-05:00 len.brown@intel.com 
#   [ACPI] apply via_interrupt_line_quirk in ACPI mode
#   the same way it is applied in legacy mode.
#   Delete redundant quirks.
#   
#   http://bugzilla.kernel.org/show_bug.cgi?id=3319
#   
#   Signed-off-by: David Shaohua Li <shaohua.li@intel.com>
#   Signed-off-by: Len Brown <len.brown@intel.com>
# 
# drivers/pci/quirks.c
#   2004/12/23 23:38:24-05:00 len.brown@intel.com +5 -24
#   via_interrupt_line_quirk
# 
# drivers/acpi/pci_irq.c
#   2004/12/23 23:38:24-05:00 len.brown@intel.com +4 -0
#   via_interrupt_line_quirk
# 
# arch/i386/pci/irq.c
#   2004/12/23 23:38:24-05:00 len.brown@intel.com +2 -2
#   via_interrupt_line_quirk
# 
# ChangeSet
#   2004/12/23 23:11:56-05:00 len.brown@intel.com 
#   [ACPI] another fix to the stack-audit patch
#   http://bugzilla.kernel.org/show_bug.cgi?id=2901
#     
#   Signed-off-by: Len Brown <len.brown@intel.com>
# 
# drivers/acpi/pci_irq.c
#   2004/12/23 23:11:50-05:00 len.brown@intel.com +2 -5
#   another fix to the stack-audit patch
# 
# ChangeSet
#   2004/12/23 15:10:05-05:00 len.brown@intel.com 
#   Merge intel.com:/home/lenb/src/26-stable-dev
#   into intel.com:/home/lenb/src/26-latest-dev
# 
# drivers/acpi/thermal.c
#   2004/12/23 15:10:01-05:00 len.brown@intel.com +0 -0
#   Auto merged
# 
# drivers/acpi/pci_bind.c
#   2004/12/23 15:10:01-05:00 len.brown@intel.com +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/12/23 15:07:34-05:00 len.brown@intel.com 
#   [ACPI] two fixups where promotion and demotion were mixed up
#   
#   Signed-off-by: Dominik Brodowski <linux@brodo.de>
#   Signed-off-by: Len Brown <len.brown@intel.com>
# 
# drivers/acpi/processor_idle.c
#   2004/12/23 08:39:58-05:00 len.brown@intel.com +2 -2
#   two fixups where promotion and demotion were mixed up
# 
# ChangeSet
#   2004/12/23 14:39:34-05:00 len.brown@intel.com 
#   [ACPI] fix to the stack-audit patch
#   http://bugzilla.kernel.org/show_bug.cgi?id=2901
#   
#   Signed-off-by: Len Brown <len.brown@intel.com>
# 
# drivers/acpi/thermal.c
#   2004/12/23 14:39:26-05:00 len.brown@intel.com +1 -1
#   fix stack-audit patch
# 
# drivers/acpi/pci_bind.c
#   2004/12/23 14:39:26-05:00 len.brown@intel.com +1 -1
#   fix stack-audit patch
# 
# ChangeSet
#   2004/12/23 14:20:02-05:00 len.brown@intel.com 
#   [ACPI] add "processor.nocst" parameter
#   which blocks _CST parsing and always uses FADT info instead.
#   
#   Signed-off-by: Dominik Brodowski <linux@brodo.de>
#   Signed-off-by: Len Brown <len.brown@intel.com>
# 
# drivers/acpi/processor_idle.c
#   2004/12/23 08:25:32-05:00 len.brown@intel.com +10 -3
#   add "processor.nocst" parameter
# 
# ChangeSet
#   2004/12/23 14:18:22-05:00 len.brown@intel.com 
#   [ACPI] Let C4 demote to C3, not directly to C2.
#   
#   Signed-off-by: Dominik Brodowski <linux@brodo.de>
#   Signed-off-by: Len Brown <len.brown@intel.com>
# 
# drivers/acpi/processor_idle.c
#   2004/12/23 08:25:29-05:00 len.brown@intel.com +1 -4
#   Let C4 demote to C3, not directly to C2.
# 
# ChangeSet
#   2004/12/23 14:13:35-05:00 len.brown@intel.com 
#   
#   [ACPI] tweak /proc/acpi/processor/CPU0/power format
#   Current policy is to name both C-state-types and the actual C-States
#   "C[0-n]". Follow this rule...
#   
#   Signed-off-by: Dominik Brodowski <linux@brodo.de
#   Signed-off-by: Len Brown <len.brown@intel.com>
# 
# drivers/acpi/processor_idle.c
#   2004/12/23 08:25:24-05:00 len.brown@intel.com +7 -7
#   tweak /proc/acpi/processor/CPU0/power format
# 
# ChangeSet
#   2004/12/23 13:06:55-06:00 jejb@mulgrave.(none) 
#   SCSI: update 53c700 to use the change_queue_type API
#   
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
# 
# drivers/scsi/53c700.h
#   2004/12/23 13:05:45-06:00 jejb@mulgrave.(none) +21 -1
#   SCSI: update 53c700 to use the change_queue_type API
# 
# drivers/scsi/53c700.c
#   2004/12/23 13:05:44-06:00 jejb@mulgrave.(none) +55 -23
#   SCSI: update 53c700 to use the change_queue_type API
# 
# ChangeSet
#   2004/12/23 13:01:49-06:00 jejb@mulgrave.(none) 
#   SCSI: add queue_type entry in sysfs
#   
#   This adds an extra attribute to tell you what type of queueing the
#   driver is using: none, simple or ordered.  If the driver supplies the
#   change_queue_type API, you can also alter this (which would allow the
#   turning on or off of TCQ).
#   
#   I also fixed the change_queue_depth not to allow the user to go below
#   one.
#   
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
# 
# include/scsi/scsi_tcq.h
#   2004/12/23 13:00:32-06:00 jejb@mulgrave.(none) +46 -6
#   SCSI: add queue_type entry in sysfs
# 
# include/scsi/scsi_host.h
#   2004/12/23 13:00:32-06:00 jejb@mulgrave.(none) +12 -2
#   SCSI: add queue_type entry in sysfs
# 
# drivers/scsi/scsi_sysfs.c
#   2004/12/23 13:00:32-06:00 jejb@mulgrave.(none) +57 -0
#   SCSI: add queue_type entry in sysfs
# 
# ChangeSet
#   2004/12/23 12:37:42-06:00 p_gortmaker@yahoo.com 
#   [PATCH] scsi/advansys.c fix !CONFIG_PCI
#   
#   advansys.c fails to build for old ISA cards when CONFIG_PCI is not
#   enabled.
#   
#   Signed-off-by: Paul Gortmaker <p_gortmaker@yahoo.com>
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
# 
# drivers/scsi/advansys.c
#   2004/12/19 23:04:35-06:00 p_gortmaker@yahoo.com +5 -5
#   scsi/advansys.c fix !CONFIG_PCI
# 
# ChangeSet
#   2004/12/23 13:16:18-05:00 len.brown@intel.com 
#   [ACPI] max_cstate shall limit C-states not C-state-types.
#   
#   Signed-off-by: Dominik Brodowski <linux@brodo.de>
#   Signed-off-by: Len Brown <len.brown@intel.com>
# 
# drivers/acpi/processor_idle.c
#   2004/12/23 08:24:13-05:00 len.brown@intel.com +6 -4
#   max_cstate shall limit C-states not C-state types.
# 
# drivers/acpi/osl.c
#   2004/12/23 08:09:11-05:00 len.brown@intel.com +2 -1
#   max_cstate shall limit C-states not C-state types.
# 
# ChangeSet
#   2004/12/22 23:31:52-08:00 greg@kroah.com 
#   Merge kroah.com:/home/greg/linux/BK/bleed-2.6
#   into kroah.com:/home/greg/linux/BK/usb-2.6
# 
# drivers/usb/serial/keyspan.c
#   2004/12/22 23:31:49-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# drivers/usb/atm/usb_atm.c
#   2004/12/22 23:31:49-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/12/22 15:48:48-08:00 greg@kroah.com 
#   Merge kroah.com:/home/greg/linux/BK/bleed-2.6
#   into kroah.com:/home/greg/linux/BK/usb-2.6
# 
# drivers/usb/host/ohci-hub.c
#   2004/12/22 15:48:43-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# drivers/usb/host/ehci-hub.c
#   2004/12/22 15:48:43-08:00 greg@kroah.com +0 -1
#   Auto merged
# 
# drivers/usb/core/devio.c
#   2004/12/22 15:48:43-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# MAINTAINERS
#   2004/12/22 15:48:43-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/12/22 18:25:25-05:00 davej@redhat.com 
#   [AGPGART] Fix agp=off.
#   
#   agp=off disabled the agpgart driver, but not the chipset specific drivers,
#   which still did their init routines. Chaos ensued.
#   
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# drivers/char/agp/via-agp.c
#   2004/12/22 18:25:04-05:00 davej@redhat.com +2 -0
#   [AGPGART] Fix agp=off.
#   
#   agp=off disabled the agpgart driver, but not the chipset specific drivers,
#   which still did their init routines. Chaos ensued.
#   
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# drivers/char/agp/uninorth-agp.c
#   2004/12/22 18:25:04-05:00 davej@redhat.com +2 -0
#   [AGPGART] Fix agp=off.
#   
#   agp=off disabled the agpgart driver, but not the chipset specific drivers,
#   which still did their init routines. Chaos ensued.
#   
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# drivers/char/agp/sworks-agp.c
#   2004/12/22 18:25:04-05:00 davej@redhat.com +2 -0
#   [AGPGART] Fix agp=off.
#   
#   agp=off disabled the agpgart driver, but not the chipset specific drivers,
#   which still did their init routines. Chaos ensued.
#   
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# drivers/char/agp/sis-agp.c
#   2004/12/22 18:25:04-05:00 davej@redhat.com +2 -0
#   [AGPGART] Fix agp=off.
#   
#   agp=off disabled the agpgart driver, but not the chipset specific drivers,
#   which still did their init routines. Chaos ensued.
#   
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# drivers/char/agp/nvidia-agp.c
#   2004/12/22 18:25:04-05:00 davej@redhat.com +2 -0
#   [AGPGART] Fix agp=off.
#   
#   agp=off disabled the agpgart driver, but not the chipset specific drivers,
#   which still did their init routines. Chaos ensued.
#   
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# drivers/char/agp/i460-agp.c
#   2004/12/22 18:25:04-05:00 davej@redhat.com +2 -0
#   [AGPGART] Fix agp=off.
#   
#   agp=off disabled the agpgart driver, but not the chipset specific drivers,
#   which still did their init routines. Chaos ensued.
#   
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# drivers/char/agp/hp-agp.c
#   2004/12/22 18:25:04-05:00 davej@redhat.com +2 -0
#   [AGPGART] Fix agp=off.
#   
#   agp=off disabled the agpgart driver, but not the chipset specific drivers,
#   which still did their init routines. Chaos ensued.
#   
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# drivers/char/agp/efficeon-agp.c
#   2004/12/22 18:25:04-05:00 davej@redhat.com +3 -0
#   [AGPGART] Fix agp=off.
#   
#   agp=off disabled the agpgart driver, but not the chipset specific drivers,
#   which still did their init routines. Chaos ensued.
#   
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# drivers/char/agp/ati-agp.c
#   2004/12/22 18:25:04-05:00 davej@redhat.com +2 -0
#   [AGPGART] Fix agp=off.
#   
#   agp=off disabled the agpgart driver, but not the chipset specific drivers,
#   which still did their init routines. Chaos ensued.
#   
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# drivers/char/agp/amd-k7-agp.c
#   2004/12/22 18:25:04-05:00 davej@redhat.com +2 -0
#   [AGPGART] Fix agp=off.
#   
#   agp=off disabled the agpgart driver, but not the chipset specific drivers,
#   which still did their init routines. Chaos ensued.
#   
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# drivers/char/agp/alpha-agp.c
#   2004/12/22 18:25:04-05:00 davej@redhat.com +2 -0
#   [AGPGART] Fix agp=off.
#   
#   agp=off disabled the agpgart driver, but not the chipset specific drivers,
#   which still did their init routines. Chaos ensued.
#   
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# drivers/char/agp/ali-agp.c
#   2004/12/22 18:25:04-05:00 davej@redhat.com +2 -0
#   [AGPGART] Fix agp=off.
#   
#   agp=off disabled the agpgart driver, but not the chipset specific drivers,
#   which still did their init routines. Chaos ensued.
#   
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# ChangeSet
#   2004/12/22 17:10:35-05:00 davej@redhat.com 
#   [AGPGART] ULI M1689 support.
#   
#   From: Peer.Chen@uli.com.tw
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# include/linux/pci_ids.h
#   2004/12/22 17:10:20-05:00 davej@redhat.com +1 -0
#   [AGPGART] ULI M1689 support.
#   
#   From: Peer.Chen@uli.com.tw
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# drivers/char/agp/amd64-agp.c
#   2004/12/22 17:10:20-05:00 davej@redhat.com +77 -1
#   [AGPGART] ULI M1689 support.
#   
#   From: Peer.Chen@uli.com.tw
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# ChangeSet
#   2004/12/22 13:50:21-08:00 davej@redhat.com 
#   [PATCH] driver core: Fix up vesafb failure probing.
#   
#   bus.c file invokes a probe callback for most devices in a list, then checks
#   for -ENODEV return ("no such device"), if so it remains silent. However, some
#   drivers (including vesafb.c) may return -ENXIO ("no such device or address"),
#   which is indeed error -6.
#   
#   I shut up the warning with the attached patch, that basically ignores
#   both -ENODEV and -ENXIO.
#   
#   >From https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=125890
#   
#   original patch by:  Alessandro Suardi <alessandro.suardi@oracle.com>
#   Signed-off-by: Dave Jones <davej@redhat.com>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/base/bus.c
#   2004/08/25 15:25:13-07:00 davej@redhat.com +1 -1
#   driver core: Fix up vesafb failure probing.
# 
# ChangeSet
#   2004/12/22 13:06:36-08:00 jbarnes@engr.sgi.com 
#   [PATCH] PCI: add legacy resources to sysfs for pci busses
#   
#   This patch adds legacy_io and legacy_mem files to the pci_bus class hierarchy
#   in sysfs.  The files can be used (if the platform supports them) to access
#   legacy I/O port space and legacy ISA memory space--useful for things like x86
#   emulators or VGA card POSTing.  The interfaces are documented in
#   Documentation/filesystems/sysfs-pci.txt.
#   
#   Signed-off-by: Jesse Barnes <jbarnes@sgi.com>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# include/linux/pci.h
#   2004/12/21 12:32:38-08:00 jbarnes@engr.sgi.com +2 -0
#   PCI: add legacy resources to sysfs for pci busses
# 
# drivers/pci/probe.c
#   2004/12/22 10:28:40-08:00 jbarnes@engr.sgi.com +67 -15
#   PCI: add legacy resources to sysfs for pci busses
# 
# drivers/pci/pci-sysfs.c
#   2004/12/21 14:03:35-08:00 jbarnes@engr.sgi.com +70 -0
#   PCI: add legacy resources to sysfs for pci busses
# 
# Documentation/filesystems/sysfs-pci.txt
#   2004/12/21 16:57:43-08:00 jbarnes@engr.sgi.com +25 -1
#   PCI: add legacy resources to sysfs for pci busses
# 
# ChangeSet
#   2004/12/22 10:11:27-08:00 matthew@wil.cx 
#   [PATCH] PCI: Software visible configuration request retry status
#   
#   PCI Express allows cards to return "Configuration Request Retry" if they're
#   not ready to handle accesses to configuration space.  The PCI Express 1.0a
#   specification says that the Root Complex should retry the access.  ECN 27
#   http://www.pcisig.com/specifications/pciexpress/ECN_CRS_Software_Visibility_No27.pdf
#   allows software to handle the CRS.
#   
#   Signed-off-by: Matthew Wilcox <matthew@wil.cx>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# include/linux/pci.h
#   2004/12/21 13:07:02-08:00 matthew@wil.cx +14 -0
#   PCI: Software visible configuration request retry status
# 
# drivers/pci/probe.c
#   2004/12/21 13:07:00-08:00 matthew@wil.cx +39 -3
#   PCI: Software visible configuration request retry status
# 
# ChangeSet
#   2004/12/22 09:51:50-08:00 duncan.sands@math.u-psud.fr 
#   [PATCH] usb atm: macro consolidation, fixes debugging problem
#   
#   Hi Greg, the recent reorganisation of the speedtouch driver broke the logic
#   that turns on debugging output in speedtch.c and usb_atm.c when DEBUG or
#   CONFIG_USB_DEBUG is set.  This patch fixes things up, and moves duplicated
#   debugging code into the header file.
#   
#   Signed-off-by: Duncan Sands <baldrick@free.fr>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/atm/usb_atm.h
#   2004/12/22 07:03:04-08:00 duncan.sands@math.u-psud.fr +18 -1
#   usb atm: macro consolidation, fixes debugging problem
# 
# drivers/usb/atm/usb_atm.c
#   2004/12/22 07:01:24-08:00 duncan.sands@math.u-psud.fr +0 -17
#   usb atm: macro consolidation, fixes debugging problem
# 
# drivers/usb/atm/speedtch.c
#   2004/12/22 05:52:40-08:00 duncan.sands@math.u-psud.fr +0 -20
#   usb atm: macro consolidation, fixes debugging problem
# 
# ChangeSet
#   2004/12/22 09:46:15-08:00 greg@kroah.com 
#   PCI: fix bttv-driver "cleanup" that called an incorrect function.
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/media/video/bttv-driver.c
#   2004/12/22 09:45:15-08:00 greg@kroah.com +1 -1
#   PCI: fix bttv-driver "cleanup" that called an incorrect function.
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# ChangeSet
#   2004/12/22 08:51:13-08:00 greg@kroah.com 
#   PCI: fix typo on previous pci_set_power_state() patch for hte sis900 driver.
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/net/sis900.c
#   2004/12/22 08:50:45-08:00 greg@kroah.com +1 -1
#   PCI: fix typo on previous pci_set_power_state() patch for hte sis900 driver.
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# ChangeSet
#   2004/12/22 02:14:30-05:00 len.brown@intel.com 
#   [ACPI] Export /sys/module/processor/parameters/max_cstate
#   
#   Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.de>
#   Signed-off-by: Len Brown <len.brown@intel.com>
# 
# drivers/acpi/processor_idle.c
#   2004/12/14 07:19:52-05:00 len.brown@intel.com +1 -1
#   Import patch acpi-16-max-cstate-in-sysfs
# 
# ChangeSet
#   2004/12/21 22:43:19-08:00 greg@kroah.com 
#   debugfs: add /sys/kernel/debug mount point for people to mount debugfs on.
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# fs/debugfs/inode.c
#   2004/12/21 22:43:11-08:00 greg@kroah.com +14 -1
#   debugfs: add /sys/kernel/debug mount point for people to mount debugfs on.
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# ChangeSet
#   2004/12/21 22:40:34-08:00 greg@kroah.com 
#   sysfs: export the /sys/kernel subsystem for people to use.
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# kernel/ksysfs.c
#   2004/12/21 22:40:12-08:00 greg@kroah.com +2 -1
#   sysfs: export the /sys/kernel subsystem for people to use.
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# include/linux/kobject.h
#   2004/12/21 22:40:12-08:00 greg@kroah.com +2 -0
#   sysfs: export the /sys/kernel subsystem for people to use.
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# ChangeSet
#   2004/12/22 01:03:07-05:00 len.brown@intel.com 
#   [ACPI] Consolidate code in processor_idle().
#   Only symbols "exported" are _init(), _exit() and _cst_has_changed()
#   
#   Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.de>
#   Signed-off-by: Len Brown <len.brown@intel.com>
# 
# include/acpi/processor.h
#   2004/12/14 07:14:54-05:00 len.brown@intel.com +4 -6
#   Import patch acpi-15-power-only-init-modify-exit
# 
# drivers/acpi/processor_idle.c
#   2004/12/14 07:14:54-05:00 len.brown@intel.com +109 -8
#   Import patch acpi-15-power-only-init-modify-exit
# 
# drivers/acpi/processor_core.c
#   2004/12/14 07:14:54-05:00 len.brown@intel.com +2 -67
#   Import patch acpi-15-power-only-init-modify-exit
# 
# ChangeSet
#   2004/12/22 00:54:22-05:00 len.brown@intel.com 
#   [ACPI] Notify the BIOS that Linux can handle _CST.
#   
#   http://bugzilla.kernel.org/show_bug.cgi?id=1958
#   
#   Signed-off-by: Bruno Ducrot <ducrot@poupinou.org>
#   Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.de>
#   Signed-off-by: Len Brown <len.brown@intel.com>
# 
# drivers/acpi/processor_core.c
#   2004/12/14 07:14:15-05:00 len.brown@intel.com +8 -0
#   Notify the BIOS that Linux can handle _CST.
# 
# ChangeSet
#   2004/12/22 00:48:28-05:00 len.brown@intel.com 
#   [ACPI] Handle _CST change notifications
#   
#   It is necessary to unload the processor idle handle for
#   a short period of time to avoid for nasty races --
#   and we don't want to grab too many locks
#   so that the idle handler continues to be speedy.
#   
#   http://bugzilla.kernel.org/show_bug.cgi?id=1958
#   
#   Signed-off-by: Bruno Ducrot <ducrot@poupinou.org>
#   Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.de>
#   Signed-off-by: Len Brown <len.brown@intel.com>
# 
# include/acpi/processor.h
#   2004/12/14 07:13:36-05:00 len.brown@intel.com +1 -0
#   Handle _CST change notifications
# 
# drivers/acpi/processor_idle.c
#   2004/12/14 07:13:36-05:00 len.brown@intel.com +27 -0
#   Handle _CST change notifications
# 
# drivers/acpi/processor_core.c
#   2004/12/14 07:13:36-05:00 len.brown@intel.com +1 -1
#   Handle _CST change notifications
# 
# ChangeSet
#   2004/12/22 00:45:13-05:00 len.brown@intel.com 
#   [ACPI] Add _CST parsing
#   
#   http://bugzilla.kernel.org/show_bug.cgi?id=1958
#   
#   Signed-off-by: Bruno Ducrot <ducrot@poupinou.org>
#   Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.de>
#   Signed-off-by: Len Brown <len.brown@intel.com>
# 
# include/acpi/processor.h
#   2004/12/14 07:12:57-05:00 len.brown@intel.com +14 -1
#   Add _CST parsing
# 
# drivers/acpi/processor_idle.c
#   2004/12/14 07:12:57-05:00 len.brown@intel.com +149 -10
#   Add _CST parsing
# 
# ChangeSet
#   2004/12/22 00:26:58-05:00 len.brown@intel.com 
#   [ACPI] make the c-state policy decisions of demotion and promotion
#   independent of the assumption "one state per type."
#   make the state a pointer inside struct acpi_processor_cx_policy.
#   make max_cstate aware of c-state types instead of c-state number.
#   
#   http://bugzilla.kernel.org/show_bug.cgi?id=1958
#   
#   Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.de>
#   Signed-off-by: Len Brown <len.brown@intel.com>
# 
# include/acpi/processor.h
#   2004/12/14 07:12:12-05:00 len.brown@intel.com +3 -1
#   Import patch acpi-11-power-policy-independent-of-states
# 
# drivers/acpi/processor_idle.c
#   2004/12/14 07:11:00-05:00 len.brown@intel.com +71 -66
#   Import patch acpi-11-power-policy-independent-of-states
# 
# ChangeSet
#   2004/12/22 00:16:32-05:00 len.brown@intel.com 
#   [ACPI] make power.state a pointer
#   
#   http://bugzilla.kernel.org/show_bug.cgi?id=1958
#   
#   Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.de>
#   Signed-off-by: Len Brown <len.brown@intel.com>
# 
# include/acpi/processor.h
#   2004/12/14 07:08:31-05:00 len.brown@intel.com +1 -1
#   make power.state a pointer
# 
# drivers/acpi/processor_idle.c
#   2004/12/14 07:09:32-05:00 len.brown@intel.com +32 -18
#   make power.state a pointer
# 
# ChangeSet
#   2004/12/22 00:12:13-05:00 len.brown@intel.com 
#   [ACPI] deleted unused default c-state
#   
#   http://bugzilla.kernel.org/show_bug.cgi?id=1958
#   
#   Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.de>
#   Signed-off-by: Len Brown <len.brown@intel.com>
# 
# drivers/acpi/processor_idle.c
#   2004/12/13 19:29:47-05:00 len.brown@intel.com +0 -3
#   deleted unused default c-state
# 
# ChangeSet
#   2004/12/22 00:05:34-05:00 len.brown@intel.com 
#   [ACPI] Split up the extraction of information from the FADT
#   and the pblk_address (acpi_processor_get_power_info_fadt())
#   and the validation whether the state is indeed available
#   (acpi_processor_power_verify()).
#   
#   http://bugzilla.kernel.org/show_bug.cgi?id=1958
#   
#   Signed-off-by: Bruno Ducrot <ducrot@poupinou.org>
#   Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.de>
#   Signed-off-by: Len Brown <len.brown@intel.com>
# 
# include/acpi/processor.h
#   2004/12/13 19:24:07-05:00 len.brown@intel.com +1 -0
#   acpi_processor_get_power_info_fadt() & acpi_processor_power_verify()
# 
# drivers/acpi/processor_idle.c
#   2004/12/13 19:28:33-05:00 len.brown@intel.com +162 -118
#   acpi_processor_get_power_info_fadt() & acpi_processor_power_verify()
# 
# drivers/acpi/processor_core.c
#   2004/12/13 19:24:07-05:00 len.brown@intel.com +2 -4
#   acpi_processor_get_power_info_fadt() & acpi_processor_power_verify()
# 
# ChangeSet
#   2004/12/21 23:54:21-05:00 davej@redhat.com 
#   [AGPGART] Fix up two stupid bugs in the posting fixes.
#   
#   Spotted by MASAO TAKAHASHI
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# drivers/char/agp/intel-agp.c
#   2004/12/21 23:53:58-05:00 davej@redhat.com +2 -2
#   [AGPGART] Fix up two stupid bugs in the posting fixes.
#   
#   Spotted by MASAO TAKAHASHI
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# ChangeSet
#   2004/12/21 23:53:22-05:00 len.brown@intel.com 
#   [ACPI] Differentiate between C-States and C-state type.
#   
#   http://bugzilla.kernel.org/show_bug.cgi?id=1958
#   
#   Signed-off-by: Bruno Ducrot <ducrot@poupinou.org>
#   Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.de>
#   Signed-off-by: Len Brown <len.brown@intel.com>
# 
# include/acpi/processor.h
#   2004/12/13 19:22:59-05:00 len.brown@intel.com +1 -0
#   C-state type
# 
# drivers/acpi/processor_idle.c
#   2004/12/13 19:23:33-05:00 len.brown@intel.com +42 -17
#   C-state type
# 
# ChangeSet
#   2004/12/21 22:58:56-05:00 len.brown@intel.com 
#   [ACPI] Shorten the times IRQs are disabled in throttling.
#   During calculations no disabling is necessary.
#   
#   Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.de>
#   Signed-off-by: Len Brown <len.brown@intel.com>
# 
# drivers/acpi/processor_throttling.c
#   2004/11/27 10:29:36-05:00 len.brown@intel.com +4 -4
#   Shorten the times IRQs are disabled in throttling.
# 
# ChangeSet
#   2004/12/21 22:57:16-05:00 len.brown@intel.com 
#   [ACPI] Finalize the splitting of processor.c by moving the rest to processor_core.c
#   
#   Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.de>
#   Signed-off-by: Len Brown <len.brown@intel.com>
# 
# drivers/acpi/processor_core.c
#   2004/12/13 19:21:31-05:00 len.brown@intel.com +26 -28
#   Finalize the splitting of processor.c by moving the rest to processor_core.c
# 
# drivers/acpi/Makefile
#   2004/12/13 19:20:38-05:00 len.brown@intel.com +4 -4
#   Finalize the splitting of processor.c by moving the rest to processor_core.c
# 
# ChangeSet
#   2004/12/21 22:54:46-05:00 len.brown@intel.com 
#   [ACPI] Split the ACPI Processor passive cooling code into a different file
#   
#   Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.de>
#   Signed-off-by: Len Brown <len.brown@intel.com>
# 
# drivers/acpi/processor_thermal.c
#   2004/12/13 19:20:03-05:00 len.brown@intel.com +406 -0
#   Split the ACPI Processor passive cooling code into a different file
# 
# include/acpi/processor.h
#   2004/12/13 19:20:03-05:00 len.brown@intel.com +19 -0
#   Split the ACPI Processor passive cooling code into a different file
# 
# drivers/acpi/processor_thermal.c
#   2004/12/13 19:20:03-05:00 len.brown@intel.com +0 -0
#   BitKeeper file /home/lenb/src/26-latest-dev/drivers/acpi/processor_thermal.c
# 
# drivers/acpi/processor.c
#   2004/12/13 19:20:03-05:00 len.brown@intel.com +2 -360
#   Split the ACPI Processor passive cooling code into a different file
# 
# drivers/acpi/Makefile
#   2004/12/13 19:20:03-05:00 len.brown@intel.com +2 -1
#   Split the ACPI Processor passive cooling code into a different file
# 
# ChangeSet
#   2004/12/21 22:53:35-05:00 len.brown@intel.com 
#   [ACPI] Split the ACPI Processor C-States handling into a different file
#   
#   Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.de>
#   Signed-off-by: Len Brown <len.brown@intel.com>
# 
# drivers/acpi/processor_idle.c
#   2004/12/13 19:37:33-05:00 len.brown@intel.com +637 -0
#   Split the ACPI Processor C-States handling into a different file
# 
# include/acpi/processor.h
#   2004/12/13 19:37:21-05:00 len.brown@intel.com +8 -0
#   Split the ACPI Processor C-States handling into a different file
# 
# drivers/acpi/processor_idle.c
#   2004/12/13 19:37:33-05:00 len.brown@intel.com +0 -0
#   BitKeeper file /home/lenb/src/26-latest-dev/drivers/acpi/processor_idle.c
# 
# drivers/acpi/processor.c
#   2004/12/13 19:37:21-05:00 len.brown@intel.com +3 -588
#   Split the ACPI Processor C-States handling into a different file
# 
# drivers/acpi/Makefile
#   2004/12/13 19:37:21-05:00 len.brown@intel.com +2 -2
#   Split the ACPI Processor C-States handling into a different file
# 
# ChangeSet
#   2004/12/21 22:51:57-05:00 len.brown@intel.com 
#   [ACPI] Split the ACPI Processor T-States handling into a different file
#   
#   Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.de>
#   Signed-off-by: Len Brown <len.brown@intel.com>
# 
# include/acpi/processor.h
#   2004/12/13 19:09:37-05:00 len.brown@intel.com +22 -0
#   Split the ACPI Processor T-States handling into a different file
# 
# drivers/acpi/processor_throttling.c
#   2004/12/13 19:09:37-05:00 len.brown@intel.com +351 -0
#   Split the ACPI Processor T-States handling into a different file
# 
# drivers/acpi/processor.c
#   2004/12/13 19:09:56-05:00 len.brown@intel.com +1 -313
#   Split the ACPI Processor T-States handling into a different file
# 
# drivers/acpi/Makefile
#   2004/12/13 19:09:37-05:00 len.brown@intel.com +1 -1
#   Split the ACPI Processor T-States handling into a different file
# 
# drivers/acpi/processor_throttling.c
#   2004/12/13 19:09:37-05:00 len.brown@intel.com +0 -0
#   BitKeeper file /home/lenb/src/26-latest-dev/drivers/acpi/processor_throttling.c
# 
# ChangeSet
#   2004/12/21 22:47:29-05:00 len.brown@intel.com 
#   [ACPI] Split the ACPI Processor P-States library into a different file
#   
#   Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.de>
#   Signed-off-by: Len Brown <len.brown@intel.com>
# 
# drivers/acpi/processor_perflib.c
#   2004/12/13 19:08:55-05:00 len.brown@intel.com +666 -0
#   Split the ACPI Processor P-States library into a different file
# 
# include/acpi/processor.h
#   2004/12/13 19:04:00-05:00 len.brown@intel.com +25 -0
#   Split the ACPI Processor P-States library into a different file
# 
# drivers/acpi/processor_perflib.c
#   2004/12/13 19:08:55-05:00 len.brown@intel.com +0 -0
#   BitKeeper file /home/lenb/src/26-latest-dev/drivers/acpi/processor_perflib.c
# 
# drivers/acpi/processor.c
#   2004/12/13 19:07:47-05:00 len.brown@intel.com +3 -641
#   Split the ACPI Processor P-States library into a different file
# 
# drivers/acpi/Makefile
#   2004/12/13 19:04:00-05:00 len.brown@intel.com +6 -1
#   Split the ACPI Processor P-States library into a different file
# 
# ChangeSet
#   2004/12/21 22:08:59-05:00 len.brown@intel.com 
#   Merge intel.com:/home/lenb/src/26-stable-dev
#   into intel.com:/home/lenb/src/26-latest-dev
# 
# drivers/acpi/tables/tbconvrt.c
#   2004/12/21 22:08:55-05:00 len.brown@intel.com +0 -0
#   Auto merged
# 
# drivers/acpi/pci_link.c
#   2004/12/21 22:08:55-05:00 len.brown@intel.com +0 -0
#   Auto merged
# 
# drivers/acpi/osl.c
#   2004/12/21 22:08:55-05:00 len.brown@intel.com +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/12/21 16:51:39-08:00 jbarnes@engr.sgi.com 
#   [PATCH] driver core: allow struct bin_attributes in class devices
#   
#   This small patch adds routines to create and remove bin_attribute files
#   for class devices.  One intended use is for binary files corresponding to
#   PCI busses, like bus legacy I/O ports or ISA memory.
#   
#   Signed-off-by: Jesse Barnes <jbarnes@sgi.com>
# 
# include/linux/device.h
#   2004/12/21 16:16:06-08:00 jbarnes@engr.sgi.com +4 -1
#   driver core: allow struct bin_attributes in class devices
# 
# drivers/base/class.c
#   2004/12/21 16:29:34-08:00 jbarnes@engr.sgi.com +18 -0
#   driver core: allow struct bin_attributes in class devices
# 
# ChangeSet
#   2004/12/21 16:48:08-08:00 rddunlap@osdl.org 
#   [PATCH] cpqphp: reduce stack usage
#   
#   Reduce local stack usage in cpqhp_set_irq()
#   from 1028 bytes to 12 bytes (on x86-32).
#   
#   This was the 16th largest offender according to my
#   recent 'make checkstack' run (and 2 other patches
#   for large ones have recently been submitted).
#   
#   Signed-off-by: Randy Dunlap <rddunlap@osdl.org>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/pci/hotplug/cpqphp_pci.c
#   2004/12/21 16:08:33-08:00 rddunlap@osdl.org +21 -9
#   cpqphp: reduce stack usage
# 
# ChangeSet
#   2004/12/21 16:47:28-08:00 pavel@ucw.cz 
#   [PATCH] PCI: fix sparse warnings in drivers/net/* and bttv
#   
#   This should fix sparse warnings in drivers/net/* and bttv.
#   
#   Signed-off-by: Pavel Machek <pavel@suse.cz>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/net/via-velocity.c
#   2004/12/21 15:29:11-08:00 pavel@ucw.cz +16 -16
#   PCI: fix sparse warnings in drivers/net/* and bttv
# 
# drivers/net/via-rhine.c
#   2004/12/21 15:29:20-08:00 pavel@ucw.cz +1 -1
#   PCI: fix sparse warnings in drivers/net/* and bttv
# 
# drivers/net/typhoon.c
#   2004/12/21 15:34:59-08:00 pavel@ucw.cz +3 -3
#   PCI: fix sparse warnings in drivers/net/* and bttv
# 
# drivers/net/starfire.c
#   2004/12/21 15:29:11-08:00 pavel@ucw.cz +1 -1
#   PCI: fix sparse warnings in drivers/net/* and bttv
# 
# drivers/net/sis900.c
#   2004/12/21 15:34:43-08:00 pavel@ucw.cz +2 -2
#   PCI: fix sparse warnings in drivers/net/* and bttv
# 
# drivers/net/pci-skeleton.c
#   2004/12/21 15:34:18-08:00 pavel@ucw.cz +2 -2
#   PCI: fix sparse warnings in drivers/net/* and bttv
# 
# drivers/net/eepro100.c
#   2004/12/21 15:29:11-08:00 pavel@ucw.cz +4 -4
#   PCI: fix sparse warnings in drivers/net/* and bttv
# 
# drivers/net/e100.c
#   2004/12/21 15:34:04-08:00 pavel@ucw.cz +2 -2
#   PCI: fix sparse warnings in drivers/net/* and bttv
# 
# drivers/net/amd8111e.c
#   2004/12/21 15:33:46-08:00 pavel@ucw.cz +8 -8
#   PCI: fix sparse warnings in drivers/net/* and bttv
# 
# drivers/net/8139too.c
#   2004/12/21 15:29:11-08:00 pavel@ucw.cz +2 -2
#   PCI: fix sparse warnings in drivers/net/* and bttv
# 
# drivers/net/8139cp.c
#   2004/12/21 15:32:48-08:00 pavel@ucw.cz +3 -3
#   PCI: fix sparse warnings in drivers/net/* and bttv
# 
# drivers/net/3c59x.c
#   2004/12/21 15:32:24-08:00 pavel@ucw.cz +4 -4
#   PCI: fix sparse warnings in drivers/net/* and bttv
# 
# drivers/media/video/bttv-driver.c
#   2004/12/21 15:30:21-08:00 pavel@ucw.cz +2 -2
#   PCI: fix sparse warnings in drivers/net/* and bttv
# 
# ChangeSet
#   2004/12/21 16:21:25-08:00 pavel@suse.cz 
#   [PATCH] PCI: clean up state usage in pci core
#   
#   > Now, care to send patches to fix up all of the new sparse warnings in
#   > the drivers/pci/* directory?
#   
#   This should reduce number of warnings in pci.c. It will still warn on
#   comparison (because we are using __bitwise, but in fact we want
#   something like "this is unique but arithmetic is still ok"), but that
#   probably needs to be fixed in sparse.
#   
#   Also killed "function does not return anything" warning.
#   
#   
#   Signed-off-by: Pavel Machek <pavel@suse.cz>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/pci/pci.c
#   2004/12/21 16:13:43-08:00 pavel@suse.cz +14 -9
#   PCI: clean up state usage in pci core
# 
# ChangeSet
#   2004/12/21 16:57:44-05:00 len.brown@intel.com 
#   [ACPI] ACPICA 20041210 from Bob Moore
#   
#   ACPI 3.0 support is nearing completion in both the iASL
#   compiler and the ACPI CA core subsystem.
#   
#   Fixed a problem in the ToDecimalString operator where the
#   resulting string length was incorrectly calculated. The
#   length is now calculated exactly, eliminating incorrect
#   AE_STRING_LIMIT exceptions.
#   
#   Fixed a problem in the ToHexString operator to allow a
#   maximum 200 character string to be produced.
#   
#   Fixed a problem in the internal string-to-buffer and
#   buffer-to-buffer copy routine where the length of the
#   resulting buffer was not truncated to the new size (if
#   the target buffer already existed).
#   
#   Signed-off-by: Len Brown <len.brown@intel.com>
# 
# include/acpi/amlresrc.h
#   2004/12/21 16:41:33-05:00 len.brown@intel.com +25 -1
#   ACPICA 20041210
# 
# include/acpi/actbl2.h
#   2004/12/21 16:41:34-05:00 len.brown@intel.com +1 -1
#   ACPICA 20041210
# 
# include/acpi/aclocal.h
#   2004/12/21 16:41:34-05:00 len.brown@intel.com +1 -1
#   ACPICA 20041210
# 
# include/acpi/acdisasm.h
#   2004/12/21 16:41:34-05:00 len.brown@intel.com +6 -0
#   ACPICA 20041210
# 
# include/acpi/acconfig.h
#   2004/12/21 16:41:34-05:00 len.brown@intel.com +2 -2
#   ACPICA 20041210
# 
# drivers/acpi/tables/tbconvrt.c
#   2004/12/21 16:41:37-05:00 len.brown@intel.com +2 -2
#   ACPICA 20041210
# 
# drivers/acpi/executer/exstorob.c
#   2004/12/21 16:41:38-05:00 len.brown@intel.com +10 -9
#   ACPICA 20041210
# 
# drivers/acpi/executer/exconvrt.c
#   2004/12/21 16:41:38-05:00 len.brown@intel.com +56 -40
#   ACPICA 20041210
# 
# ChangeSet
#   2004/12/21 12:12:05-08:00 jbarnes@engr.sgi.com 
#   [PATCH] PCI: export PCI resources in sysfs
#   
#   This patch exports PCI resources to userspace in the corresponding sysfs
#   device directory.  It depends on the platform HAVE_PCI_MMAP code, and is
#   #ifdef'd accordingly.  I've also added documentation describing the sysfs PCI
#   device file layout.
#   
#   Signed-off-by: Jesse Barnes <jbarnes@sgi.com>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# include/linux/pci.h
#   2004/12/21 11:21:50-08:00 jbarnes@engr.sgi.com +1 -0
#   PCI: export PCI resources in sysfs
# 
# drivers/pci/pci-sysfs.c
#   2004/12/21 11:28:57-08:00 jbarnes@engr.sgi.com +92 -0
#   PCI: export PCI resources in sysfs
# 
# Documentation/filesystems/sysfs-pci.txt
#   2004/12/21 11:50:26-08:00 jbarnes@engr.sgi.com +64 -0
#   PCI: export PCI resources in sysfs
# 
# Documentation/filesystems/sysfs-pci.txt
#   2004/12/21 11:50:26-08:00 jbarnes@engr.sgi.com +0 -0
#   BitKeeper file /home/greg/linux/BK/usb-2.6/Documentation/filesystems/sysfs-pci.txt
# 
# ChangeSet
#   2004/12/21 11:57:56-08:00 pavel@suse.cz 
#   [PATCH] PCI: add prototype for pci_choose_state()
#   
#   This adds missing prototype for pci_choose_state.
#   
#   Signed-off-by: Pavel Machek <pavel@suse.cz>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# include/linux/pci.h
#   2004/12/17 15:35:33-08:00 pavel@suse.cz +2 -0
#   PCI: add prototype for pci_choose_state()
# 
# ChangeSet
#   2004/12/21 11:21:08-08:00 david-b@pacbell.net 
#   [PATCH] USB: fix Scheduling while atomic warning when resuming.
#   
#   From: David Brownell <david-b@pacbell.net>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/host/ehci-hub.c
#   2004/12/20 03:48:01-08:00 david-b@pacbell.net +1 -1
#   USB: fix Scheduling while atomic warning when resuming.
# 
# ChangeSet
#   2004/12/21 11:20:39-08:00 david-b@pacbell.net 
#   [PATCH] USB: ohci build tweaks
#   
#   Resolves some build glitches that snuck into OHCI.
#   
#   Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/host/ohci-hcd.c
#   2004/12/20 03:29:21-08:00 david-b@pacbell.net +2 -11
#   USB: ohci build tweaks
# 
# ChangeSet
#   2004/12/21 11:20:03-08:00 oliver@neukum.org 
#   [PATCH] USB: additional device id for kaweth driver
#   
#   thanks to Magnus an additional device id.
#   
#   Signed-Off-By: Oliver Neukum <oliver@neukum.name>
# 
# drivers/usb/net/kaweth.c
#   2004/12/18 13:56:06-08:00 oliver@neukum.org +1 -0
#   USB: additional device id for kaweth driver
# 
# ChangeSet
#   2004/12/21 11:09:21-08:00 khali@linux-fr.org 
#   [PATCH] I2C: Remove checksum code in eeprom driver
#   
#   As a follow-up to my earlier proposal to remove the checksum code from
#   the i2c eeprom driver, here is a patch that does just that. This shrinks
#   the driver size by around 5%, and paves the way for further fixes and
#   cleanups.
#   
#   Signed-off-by: Jean Delvare <khali@linux-fr.org>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/i2c/chips/eeprom.c
#   2004/12/19 10:57:19-08:00 khali@linux-fr.org +0 -19
#   I2C: Remove checksum code in eeprom driver
# 
# ChangeSet
#   2004/12/21 11:08:43-08:00 sjhill@realitydiluted.com 
#   [PATCH] I2C patch from MIPS tree...
#   
#   Here is a newer i2c patch from the mainline Linux/MIPS kernel
#   tree. Some more changes came in since yesterday. Please apply
#   this for inclusion in the next Linux release. Thanks.
#   
#   Signed-off-by: Steven J. Hill <sjhill@realitydiluted.com>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# include/linux/i2c-id.h
#   2004/11/18 20:42:15-08:00 sjhill@realitydiluted.com +11 -0
#   I2C patch from MIPS tree...
# 
# include/linux/i2c-algo-sibyte.h
#   2003/12/15 18:10:45-08:00 sjhill@realitydiluted.com +33 -0
#   I2C patch from MIPS tree...
# 
# include/linux/i2c-algo-sgi.h
#   2003/12/15 18:10:45-08:00 sjhill@realitydiluted.com +27 -0
#   I2C patch from MIPS tree...
# 
# drivers/i2c/busses/i2c-sibyte.c
#   2004/12/18 20:42:44-08:00 sjhill@realitydiluted.com +71 -0
#   I2C patch from MIPS tree...
# 
# drivers/i2c/busses/Makefile
#   2004/11/18 20:39:29-08:00 sjhill@realitydiluted.com +1 -0
#   I2C patch from MIPS tree...
# 
# drivers/i2c/busses/Kconfig
#   2004/12/05 09:25:02-08:00 sjhill@realitydiluted.com +6 -0
#   I2C patch from MIPS tree...
# 
# drivers/i2c/algos/i2c-algo-sibyte.c
#   2003/09/30 07:27:22-07:00 sjhill@realitydiluted.com +231 -0
#   I2C patch from MIPS tree...
# 
# drivers/i2c/algos/Makefile
#   2004/11/18 20:39:29-08:00 sjhill@realitydiluted.com +2 -0
#   I2C patch from MIPS tree...
# 
# include/linux/i2c-algo-sibyte.h
#   2003/12/15 18:10:45-08:00 sjhill@realitydiluted.com +0 -0
#   BitKeeper file /home/greg/linux/BK/i2c-2.6/include/linux/i2c-algo-sibyte.h
# 
# include/linux/i2c-algo-sgi.h
#   2003/12/15 18:10:45-08:00 sjhill@realitydiluted.com +0 -0
#   BitKeeper file /home/greg/linux/BK/i2c-2.6/include/linux/i2c-algo-sgi.h
# 
# drivers/i2c/busses/i2c-sibyte.c
#   2004/12/18 20:42:44-08:00 sjhill@realitydiluted.com +0 -0
#   BitKeeper file /home/greg/linux/BK/i2c-2.6/drivers/i2c/busses/i2c-sibyte.c
# 
# drivers/i2c/algos/i2c-algo-sibyte.c
#   2003/09/30 07:27:22-07:00 sjhill@realitydiluted.com +0 -0
#   BitKeeper file /home/greg/linux/BK/i2c-2.6/drivers/i2c/algos/i2c-algo-sibyte.c
# 
# drivers/i2c/algos/i2c-algo-sgi.c
#   2003/09/30 07:27:22-07:00 sjhill@realitydiluted.com +189 -0
#   I2C patch from MIPS tree...
# 
# drivers/i2c/algos/Kconfig
#   2004/11/18 20:39:29-08:00 sjhill@realitydiluted.com +13 -0
#   I2C patch from MIPS tree...
# 
# drivers/i2c/algos/i2c-algo-sgi.c
#   2003/09/30 07:27:22-07:00 sjhill@realitydiluted.com +0 -0
#   BitKeeper file /home/greg/linux/BK/i2c-2.6/drivers/i2c/algos/i2c-algo-sgi.c
# 
# ChangeSet
#   2004/12/21 11:08:03-08:00 khali@linux-fr.org 
#   [PATCH] I2C: Use PCI_DEVICE in bus drivers
#   
#   > Hint, the PCI_DEVICE() macro makes this a lot simpler :)
#   
#   What about this cleanup patch then? It generalizes the use of
#   PCI_DEVICE() among i2c/busses drivers (with some pci ids cleanups for
#   free).
#   
#   Signed-off-by: Jean Delvare <khali@linux-fr.org>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# include/linux/pci_ids.h
#   2004/12/18 08:38:47-08:00 khali@linux-fr.org +6 -0
#   I2C: Use PCI_DEVICE in bus drivers
# 
# drivers/i2c/busses/i2c-viapro.c
#   2004/12/18 09:34:28-08:00 khali@linux-fr.org +16 -56
#   I2C: Use PCI_DEVICE in bus drivers
# 
# drivers/i2c/busses/i2c-sis96x.c
#   2004/12/18 08:55:31-08:00 khali@linux-fr.org +1 -11
#   I2C: Use PCI_DEVICE in bus drivers
# 
# drivers/i2c/busses/i2c-prosavage.c
#   2004/12/18 08:55:31-08:00 khali@linux-fr.org +0 -7
#   I2C: Use PCI_DEVICE in bus drivers
# 
# drivers/i2c/busses/i2c-piix4.c
#   2004/12/18 09:30:22-08:00 khali@linux-fr.org +12 -42
#   I2C: Use PCI_DEVICE in bus drivers
# 
# drivers/i2c/busses/i2c-nforce2.c
#   2004/12/18 08:55:31-08:00 khali@linux-fr.org +4 -8
#   I2C: Use PCI_DEVICE in bus drivers
# 
# drivers/i2c/busses/i2c-i801.c
#   2004/12/18 08:55:31-08:00 khali@linux-fr.org +8 -48
#   I2C: Use PCI_DEVICE in bus drivers
# 
# drivers/i2c/busses/i2c-hydra.c
#   2004/12/18 08:55:31-08:00 khali@linux-fr.org +1 -6
#   I2C: Use PCI_DEVICE in bus drivers
# 
# drivers/i2c/busses/i2c-amd8111.c
#   2004/12/18 08:55:31-08:00 khali@linux-fr.org +1 -1
#   I2C: Use PCI_DEVICE in bus drivers
# 
# drivers/i2c/busses/i2c-amd756.c
#   2004/12/18 08:55:31-08:00 khali@linux-fr.org +10 -5
#   I2C: Use PCI_DEVICE in bus drivers
# 
# drivers/i2c/busses/i2c-ali15x3.c
#   2004/12/18 08:55:31-08:00 khali@linux-fr.org +1 -6
#   I2C: Use PCI_DEVICE in bus drivers
# 
# drivers/i2c/busses/i2c-ali1563.c
#   2004/12/18 08:55:31-08:00 khali@linux-fr.org +1 -6
#   I2C: Use PCI_DEVICE in bus drivers
# 
# drivers/i2c/busses/i2c-ali1535.c
#   2004/12/18 08:55:31-08:00 khali@linux-fr.org +1 -6
#   I2C: Use PCI_DEVICE in bus drivers
# 
# ChangeSet
#   2004/12/21 10:50:37-08:00 ecashin@coraid.com 
#   [PATCH] rename ETH_P_AOE
#   
#   Rename old ETH_P_EDP2 ("EtherDrive Protocol 2") to ETH_P_AOE (ATA over
#   Ethernet).
#   
#   Signed-off-by: Ed L. Cashin <ecashin@coraid.com>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# include/linux/if_ether.h
#   2004/12/20 08:16:55-08:00 ecashin@coraid.com +1 -1
#   rename ETH_P_AOE
# 
# drivers/block/aoe/aoe.h
#   2004/12/20 08:16:23-08:00 ecashin@coraid.com +0 -1
#   rename ETH_P_AOE
# 
# ChangeSet
#   2004/12/21 10:37:07-08:00 jbarnes@engr.sgi.com 
#   [PATCH] sysfs: add mmap support to struct bin_attribute files
#   
#   This patch adds an mmap method and some more error checking to struct
#   bin_attribute--good for things like exporting PCI resources directly.  I
#   wasn't sure about the return values for the case where an attribute is
#   missing a given method, and it looks like mm.h can't be included in sysfs.h,
#   so I had to forward declare struct vm_area_struct.  Other than that, it works
#   fine for my test cases.
#   
#   Signed-off-by: Jesse Barnes <jbarnes@sgi.com>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# include/linux/sysfs.h
#   2004/12/21 09:31:01-08:00 jbarnes@engr.sgi.com +6 -0
#   sysfs: add mmap support to struct bin_attribute files
# 
# fs/sysfs/bin.c
#   2004/12/21 09:32:08-08:00 jbarnes@engr.sgi.com +25 -2
#   sysfs: add mmap support to struct bin_attribute files
# 
# ChangeSet
#   2004/12/21 10:36:52-08:00 tj@home-tj.org 
#   [PATCH] module sysfs: module parameters reimplemented using attr group
#   
#           Reimplement parameter attributes using attribute group.
#   	This makes more sense, for, while they reside in a separate
#           subdirectory, they belong to the ownig module and their
#           lifetime exactly equals the lifetime of the owning module,
#           and it's simpler.
#   
#   
#   Signed-off-by: Tejun Heo <tj@home-tj.org>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# kernel/params.c
#   2004/11/22 22:08:22-08:00 tj@home-tj.org +54 -125
#   module sysfs: module parameters reimplemented using attr group
# 
# include/linux/module.h
#   2004/11/22 22:08:22-08:00 tj@home-tj.org +2 -2
#   module sysfs: module parameters reimplemented using attr group
# 
# ChangeSet
#   2004/12/21 10:36:35-08:00 tj@home-tj.org 
#   [PATCH] module sysfs: sections attr reimplemented using attr group
#   
#           Reimplement section attributes using attribute group.  This
#           makes more sense, for, while they reside in a separate
#           subdirectory, they belong to the ownig module and their
#           lifetime exactly equals the lifetime of the owning module,
#           and it's simpler.
#   
#   
#   Signed-off-by: Tejun Heo <tj@home-tj.org>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# kernel/module.c
#   2004/11/22 22:08:15-08:00 tj@home-tj.org +35 -40
#   module sysfs: sections attr reimplemented using attr group
# 
# include/linux/module.h
#   2004/11/22 22:08:15-08:00 tj@home-tj.org +4 -4
#   module sysfs: sections attr reimplemented using attr group
# 
# ChangeSet
#   2004/12/21 10:36:20-08:00 tj@home-tj.org 
#   [PATCH] module sysfs: expand module_attribute methods
#   
#           Modify module_attribute show/store methods to accept self
#           argument to enable further extensions.
#   
#   
#   Signed-off-by: Tejun Heo <tj@home-tj.org>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# kernel/params.c
#   2004/12/19 17:41:15-08:00 tj@home-tj.org +1 -1
#   module sysfs: expand module_attribute methods
# 
# kernel/module.c
#   2004/12/19 17:41:15-08:00 tj@home-tj.org +2 -1
#   module sysfs: expand module_attribute methods
# 
# include/linux/module.h
#   2004/12/19 17:41:15-08:00 tj@home-tj.org +3 -2
#   module sysfs: expand module_attribute methods
# 
# ChangeSet
#   2004/12/21 10:36:03-08:00 tj@home-tj.org 
#   [PATCH] module sysfs: make module.mkobj inline
#   
#       Make module.mkobj inline.  As this is simpler and what's
#       usually done with kobjs when it's representing an entity.
#   
#   
#   Signed-off-by: Tejun Heo <tj@home-tj.org>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# kernel/params.c
#   2004/11/22 22:08:01-08:00 tj@home-tj.org +4 -8
#   module sysfs: make module.mkobj inline
# 
# kernel/module.c
#   2004/11/22 22:08:01-08:00 tj@home-tj.org +11 -24
#   module sysfs: make module.mkobj inline
# 
# include/linux/module.h
#   2004/11/22 22:08:01-08:00 tj@home-tj.org +1 -1
#   module sysfs: make module.mkobj inline
# 
# ChangeSet
#   2004/12/21 10:01:15-08:00 greg@kroah.com 
#   USB: explicitly mark the endianness of some visor data fields.
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/serial/visor.h
#   2004/12/21 10:01:03-08:00 greg@kroah.com +3 -3
#   USB: explicitly mark the endianness of some visor data fields.
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/serial/visor.c
#   2004/12/21 10:01:03-08:00 greg@kroah.com +1 -3
#   USB: explicitly mark the endianness of some visor data fields.
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# ChangeSet
#   2004/12/21 12:54:09-05:00 len.brown@intel.com 
#   [ACPI] fix return syntax
#   
#   Signed-off-by: Pavel Machek <pavel@suse.cz>
#   Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
# 
# drivers/acpi/toshiba_acpi.c
#   2004/12/20 17:46:15-05:00 len.brown@intel.com +2 -2
#   fix return syntax
# 
# drivers/acpi/pci_link.c
#   2004/12/20 17:42:13-05:00 len.brown@intel.com +2 -2
#   fix return syntax
# 
# drivers/acpi/osl.c
#   2004/12/20 17:40:29-05:00 len.brown@intel.com +3 -3
#   fix return syntax
# 
# drivers/acpi/asus_acpi.c
#   2004/12/20 17:35:32-05:00 len.brown@intel.com +9 -9
#   fix return syntax
# 
# ChangeSet
#   2004/12/21 09:41:18-06:00 bunk@stusta.de 
#   [PATCH] SCSI NCR53C9x.c: some cleanups
#   
#   Make two functions static
#   
#   Remove the old polling esp_command() entry point.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
# 
# drivers/scsi/NCR53C9x.h
#   2004/11/13 09:27:41-06:00 bunk@stusta.de +0 -1
#   SCSI NCR53C9x.c: some cleanups
# 
# drivers/scsi/NCR53C9x.c
#   2004/11/13 09:28:23-06:00 bunk@stusta.de +2 -13
#   SCSI NCR53C9x.c: some cleanups
# 
# ChangeSet
#   2004/12/21 09:36:37-06:00 bunk@stusta.de 
#   [PATCH] SCSI mca_53c9x.c: make 2 functions static
#   
#   The patch below makes two functions without external users static.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
# 
# drivers/scsi/mca_53c9x.c
#   2004/11/13 15:42:22-06:00 bunk@stusta.de +2 -2
#   SCSI mca_53c9x.c: make 2 functions static
# 
# ChangeSet
#   2004/12/21 09:32:13-06:00 bunk@stusta.de 
#   [PATCH] SCSI ibmmca.c: make a struct static
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
# 
# drivers/scsi/ibmmca.c
#   2004/11/13 14:50:49-06:00 bunk@stusta.de +1 -1
#   SCSI ibmmca.c: make a struct static
# 
# ChangeSet
#   2004/12/21 14:53:09+01:00 perex@suse.cz 
#   [ALSA] Fix targets for GUS and OPL4
#   
#   ALSA sequencer
#   The the obj targets for GUS and OPL4 are fixed.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/seq/Makefile
#   2004/11/29 07:35:25+01:00 perex@suse.cz +2 -0
#   [ALSA] Fix targets for GUS and OPL4
#   
#   D:2004/11/29 14:35:25
#   C:ALSA sequencer
#   F:core/seq/Makefile:1.34->1.35 
#   L:The the obj targets for GUS and OPL4 are fixed.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2004/12/21 14:52:00+01:00 perex@suse.cz 
#   [ALSA] Clean up of kfree()/vfree() NULL checks
#   
#   ALSA Core,PCM Midlevel,Memalloc module,Timer Midlevel,IOCTL32 emulation
#   ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer,I2C cs8427
#   L3 drivers,GUS Library,EMU8000 driver,Wavefront drivers,Maestro3 driver
#   AC97 Codec Core,ALI5451 driver,CS46xx driver,EMU10K1/EMU10K2 driver
#   ICE1712 driver,Trident driver,YMFPCI driver,PPC PMAC driver
#   Common EMU synth,USB generic driver,USB USX2Y
#   I've cleaned up sound/ directory from 'if (x) {k/v}free(x);' and similar
#   constructions. I'm going to to this for most of the kernel if I found
#   some time.
#   
#   Signed-off-by: Marcel Sebek <sebek64@post.cz>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/usb/usx2y/usbusx2y.c
#   2004/11/29 07:09:49+01:00 perex@suse.cz +2 -4
#   [ALSA] Clean up of kfree()/vfree() NULL checks
#   
#   D:2004/11/29 14:09:44
#   C:ALSA Core,PCM Midlevel,Memalloc module,Timer Midlevel,IOCTL32 emulation
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer,I2C cs8427
#   C:L3 drivers,GUS Library,EMU8000 driver,Wavefront drivers,Maestro3 driver
#   C:AC97 Codec Core,ALI5451 driver,CS46xx driver,EMU10K1/EMU10K2 driver
#   C:ICE1712 driver,Trident driver,YMFPCI driver,PPC PMAC driver
#   C:Common EMU synth,USB generic driver,USB USX2Y
#   F:core/info.c:1.49->1.50 
#   F:core/init.c:1.51->1.52 
#   F:core/pcm.c:1.47->1.48 
#   F:core/pcm_native.c:1.109->1.110 
#   F:core/sgbuf.c:1.8->1.9 
#   F:core/timer.c:1.62->1.63 
#   F:core/ioctl32/ioctl32.c:1.24->1.25 
#   F:core/oss/mixer_oss.c:1.35->1.36 
#   F:core/oss/pcm_oss.c:1.81->1.82 
#   F:core/oss/pcm_plugin.c:1.22->1.23 
#   F:core/oss/route.c:1.9->1.10 
#   F:core/seq/seq_instr.c:1.10->1.11 
#   F:core/seq/seq_memory.c:1.17->1.18 
#   F:core/seq/seq_midi_emul.c:1.12->1.13 
#   F:core/seq/seq_midi_event.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_readq.c:1.10->1.11 
#   F:i2c/cs8427.c:1.21->1.22 
#   F:i2c/l3/uda1341.c:1.13->1.14 
#   F:isa/gus/gus_mem.c:1.10->1.11 
#   F:isa/sb/emu8000_pcm.c:1.15->1.16 
#   F:isa/wavefront/wavefront_fx.c:1.15->1.16 
#   F:pci/maestro3.c:1.64->1.65 
#   F:pci/ac97/ac97_codec.c:1.154->1.155 
#   F:pci/ali5451/ali5451.c:1.58->1.59 
#   F:pci/cs46xx/dsp_spos.c:1.29->1.30 
#   F:pci/emu10k1/emu10k1_main.c:1.41->1.42 
#   F:pci/emu10k1/emupcm.c:1.34->1.35 
#   F:pci/ice1712/ak4xxx.c:1.9->1.10 
#   F:pci/trident/trident_main.c:1.66->1.67 
#   F:pci/ymfpci/ymfpci_main.c:1.60->1.61 
#   F:ppc/pmac.c:1.38->1.39 
#   F:synth/emux/emux.c:1.12->1.13 
#   F:synth/emux/emux_seq.c:1.12->1.13 
#   F:usb/usbaudio.c:1.111->1.112 
#   F:usb/usbmidi.c:1.34->1.35 
#   F:usb/usbmixer.c:1.33->1.34 
#   F:usb/usx2y/usbusx2y.c:1.5->1.6 
#   L:I've cleaned up sound/ directory from 'if (x) {k/v}free(x);' and similar
#   L:constructions. I'm going to to this for most of the kernel if I found
#   L:some time.
#   Signed-off-by: Marcel Sebek <sebek64@post.cz>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/usb/usbmixer.c
#   2004/11/29 07:09:48+01:00 perex@suse.cz +1 -1
#   [ALSA] Clean up of kfree()/vfree() NULL checks
#   
#   D:2004/11/29 14:09:44
#   C:ALSA Core,PCM Midlevel,Memalloc module,Timer Midlevel,IOCTL32 emulation
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer,I2C cs8427
#   C:L3 drivers,GUS Library,EMU8000 driver,Wavefront drivers,Maestro3 driver
#   C:AC97 Codec Core,ALI5451 driver,CS46xx driver,EMU10K1/EMU10K2 driver
#   C:ICE1712 driver,Trident driver,YMFPCI driver,PPC PMAC driver
#   C:Common EMU synth,USB generic driver,USB USX2Y
#   F:core/info.c:1.49->1.50 
#   F:core/init.c:1.51->1.52 
#   F:core/pcm.c:1.47->1.48 
#   F:core/pcm_native.c:1.109->1.110 
#   F:core/sgbuf.c:1.8->1.9 
#   F:core/timer.c:1.62->1.63 
#   F:core/ioctl32/ioctl32.c:1.24->1.25 
#   F:core/oss/mixer_oss.c:1.35->1.36 
#   F:core/oss/pcm_oss.c:1.81->1.82 
#   F:core/oss/pcm_plugin.c:1.22->1.23 
#   F:core/oss/route.c:1.9->1.10 
#   F:core/seq/seq_instr.c:1.10->1.11 
#   F:core/seq/seq_memory.c:1.17->1.18 
#   F:core/seq/seq_midi_emul.c:1.12->1.13 
#   F:core/seq/seq_midi_event.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_readq.c:1.10->1.11 
#   F:i2c/cs8427.c:1.21->1.22 
#   F:i2c/l3/uda1341.c:1.13->1.14 
#   F:isa/gus/gus_mem.c:1.10->1.11 
#   F:isa/sb/emu8000_pcm.c:1.15->1.16 
#   F:isa/wavefront/wavefront_fx.c:1.15->1.16 
#   F:pci/maestro3.c:1.64->1.65 
#   F:pci/ac97/ac97_codec.c:1.154->1.155 
#   F:pci/ali5451/ali5451.c:1.58->1.59 
#   F:pci/cs46xx/dsp_spos.c:1.29->1.30 
#   F:pci/emu10k1/emu10k1_main.c:1.41->1.42 
#   F:pci/emu10k1/emupcm.c:1.34->1.35 
#   F:pci/ice1712/ak4xxx.c:1.9->1.10 
#   F:pci/trident/trident_main.c:1.66->1.67 
#   F:pci/ymfpci/ymfpci_main.c:1.60->1.61 
#   F:ppc/pmac.c:1.38->1.39 
#   F:synth/emux/emux.c:1.12->1.13 
#   F:synth/emux/emux_seq.c:1.12->1.13 
#   F:usb/usbaudio.c:1.111->1.112 
#   F:usb/usbmidi.c:1.34->1.35 
#   F:usb/usbmixer.c:1.33->1.34 
#   F:usb/usx2y/usbusx2y.c:1.5->1.6 
#   L:I've cleaned up sound/ directory from 'if (x) {k/v}free(x);' and similar
#   L:constructions. I'm going to to this for most of the kernel if I found
#   L:some time.
#   Signed-off-by: Marcel Sebek <sebek64@post.cz>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/usb/usbmidi.c
#   2004/11/29 07:09:48+01:00 perex@suse.cz +2 -4
#   [ALSA] Clean up of kfree()/vfree() NULL checks
#   
#   D:2004/11/29 14:09:44
#   C:ALSA Core,PCM Midlevel,Memalloc module,Timer Midlevel,IOCTL32 emulation
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer,I2C cs8427
#   C:L3 drivers,GUS Library,EMU8000 driver,Wavefront drivers,Maestro3 driver
#   C:AC97 Codec Core,ALI5451 driver,CS46xx driver,EMU10K1/EMU10K2 driver
#   C:ICE1712 driver,Trident driver,YMFPCI driver,PPC PMAC driver
#   C:Common EMU synth,USB generic driver,USB USX2Y
#   F:core/info.c:1.49->1.50 
#   F:core/init.c:1.51->1.52 
#   F:core/pcm.c:1.47->1.48 
#   F:core/pcm_native.c:1.109->1.110 
#   F:core/sgbuf.c:1.8->1.9 
#   F:core/timer.c:1.62->1.63 
#   F:core/ioctl32/ioctl32.c:1.24->1.25 
#   F:core/oss/mixer_oss.c:1.35->1.36 
#   F:core/oss/pcm_oss.c:1.81->1.82 
#   F:core/oss/pcm_plugin.c:1.22->1.23 
#   F:core/oss/route.c:1.9->1.10 
#   F:core/seq/seq_instr.c:1.10->1.11 
#   F:core/seq/seq_memory.c:1.17->1.18 
#   F:core/seq/seq_midi_emul.c:1.12->1.13 
#   F:core/seq/seq_midi_event.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_readq.c:1.10->1.11 
#   F:i2c/cs8427.c:1.21->1.22 
#   F:i2c/l3/uda1341.c:1.13->1.14 
#   F:isa/gus/gus_mem.c:1.10->1.11 
#   F:isa/sb/emu8000_pcm.c:1.15->1.16 
#   F:isa/wavefront/wavefront_fx.c:1.15->1.16 
#   F:pci/maestro3.c:1.64->1.65 
#   F:pci/ac97/ac97_codec.c:1.154->1.155 
#   F:pci/ali5451/ali5451.c:1.58->1.59 
#   F:pci/cs46xx/dsp_spos.c:1.29->1.30 
#   F:pci/emu10k1/emu10k1_main.c:1.41->1.42 
#   F:pci/emu10k1/emupcm.c:1.34->1.35 
#   F:pci/ice1712/ak4xxx.c:1.9->1.10 
#   F:pci/trident/trident_main.c:1.66->1.67 
#   F:pci/ymfpci/ymfpci_main.c:1.60->1.61 
#   F:ppc/pmac.c:1.38->1.39 
#   F:synth/emux/emux.c:1.12->1.13 
#   F:synth/emux/emux_seq.c:1.12->1.13 
#   F:usb/usbaudio.c:1.111->1.112 
#   F:usb/usbmidi.c:1.34->1.35 
#   F:usb/usbmixer.c:1.33->1.34 
#   F:usb/usx2y/usbusx2y.c:1.5->1.6 
#   L:I've cleaned up sound/ directory from 'if (x) {k/v}free(x);' and similar
#   L:constructions. I'm going to to this for most of the kernel if I found
#   L:some time.
#   Signed-off-by: Marcel Sebek <sebek64@post.cz>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/usb/usbaudio.c
#   2004/11/29 07:09:48+01:00 perex@suse.cz +5 -10
#   [ALSA] Clean up of kfree()/vfree() NULL checks
#   
#   D:2004/11/29 14:09:44
#   C:ALSA Core,PCM Midlevel,Memalloc module,Timer Midlevel,IOCTL32 emulation
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer,I2C cs8427
#   C:L3 drivers,GUS Library,EMU8000 driver,Wavefront drivers,Maestro3 driver
#   C:AC97 Codec Core,ALI5451 driver,CS46xx driver,EMU10K1/EMU10K2 driver
#   C:ICE1712 driver,Trident driver,YMFPCI driver,PPC PMAC driver
#   C:Common EMU synth,USB generic driver,USB USX2Y
#   F:core/info.c:1.49->1.50 
#   F:core/init.c:1.51->1.52 
#   F:core/pcm.c:1.47->1.48 
#   F:core/pcm_native.c:1.109->1.110 
#   F:core/sgbuf.c:1.8->1.9 
#   F:core/timer.c:1.62->1.63 
#   F:core/ioctl32/ioctl32.c:1.24->1.25 
#   F:core/oss/mixer_oss.c:1.35->1.36 
#   F:core/oss/pcm_oss.c:1.81->1.82 
#   F:core/oss/pcm_plugin.c:1.22->1.23 
#   F:core/oss/route.c:1.9->1.10 
#   F:core/seq/seq_instr.c:1.10->1.11 
#   F:core/seq/seq_memory.c:1.17->1.18 
#   F:core/seq/seq_midi_emul.c:1.12->1.13 
#   F:core/seq/seq_midi_event.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_readq.c:1.10->1.11 
#   F:i2c/cs8427.c:1.21->1.22 
#   F:i2c/l3/uda1341.c:1.13->1.14 
#   F:isa/gus/gus_mem.c:1.10->1.11 
#   F:isa/sb/emu8000_pcm.c:1.15->1.16 
#   F:isa/wavefront/wavefront_fx.c:1.15->1.16 
#   F:pci/maestro3.c:1.64->1.65 
#   F:pci/ac97/ac97_codec.c:1.154->1.155 
#   F:pci/ali5451/ali5451.c:1.58->1.59 
#   F:pci/cs46xx/dsp_spos.c:1.29->1.30 
#   F:pci/emu10k1/emu10k1_main.c:1.41->1.42 
#   F:pci/emu10k1/emupcm.c:1.34->1.35 
#   F:pci/ice1712/ak4xxx.c:1.9->1.10 
#   F:pci/trident/trident_main.c:1.66->1.67 
#   F:pci/ymfpci/ymfpci_main.c:1.60->1.61 
#   F:ppc/pmac.c:1.38->1.39 
#   F:synth/emux/emux.c:1.12->1.13 
#   F:synth/emux/emux_seq.c:1.12->1.13 
#   F:usb/usbaudio.c:1.111->1.112 
#   F:usb/usbmidi.c:1.34->1.35 
#   F:usb/usbmixer.c:1.33->1.34 
#   F:usb/usx2y/usbusx2y.c:1.5->1.6 
#   L:I've cleaned up sound/ directory from 'if (x) {k/v}free(x);' and similar
#   L:constructions. I'm going to to this for most of the kernel if I found
#   L:some time.
#   Signed-off-by: Marcel Sebek <sebek64@post.cz>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/synth/emux/emux_seq.c
#   2004/11/29 07:09:47+01:00 perex@suse.cz +1 -2
#   [ALSA] Clean up of kfree()/vfree() NULL checks
#   
#   D:2004/11/29 14:09:44
#   C:ALSA Core,PCM Midlevel,Memalloc module,Timer Midlevel,IOCTL32 emulation
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer,I2C cs8427
#   C:L3 drivers,GUS Library,EMU8000 driver,Wavefront drivers,Maestro3 driver
#   C:AC97 Codec Core,ALI5451 driver,CS46xx driver,EMU10K1/EMU10K2 driver
#   C:ICE1712 driver,Trident driver,YMFPCI driver,PPC PMAC driver
#   C:Common EMU synth,USB generic driver,USB USX2Y
#   F:core/info.c:1.49->1.50 
#   F:core/init.c:1.51->1.52 
#   F:core/pcm.c:1.47->1.48 
#   F:core/pcm_native.c:1.109->1.110 
#   F:core/sgbuf.c:1.8->1.9 
#   F:core/timer.c:1.62->1.63 
#   F:core/ioctl32/ioctl32.c:1.24->1.25 
#   F:core/oss/mixer_oss.c:1.35->1.36 
#   F:core/oss/pcm_oss.c:1.81->1.82 
#   F:core/oss/pcm_plugin.c:1.22->1.23 
#   F:core/oss/route.c:1.9->1.10 
#   F:core/seq/seq_instr.c:1.10->1.11 
#   F:core/seq/seq_memory.c:1.17->1.18 
#   F:core/seq/seq_midi_emul.c:1.12->1.13 
#   F:core/seq/seq_midi_event.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_readq.c:1.10->1.11 
#   F:i2c/cs8427.c:1.21->1.22 
#   F:i2c/l3/uda1341.c:1.13->1.14 
#   F:isa/gus/gus_mem.c:1.10->1.11 
#   F:isa/sb/emu8000_pcm.c:1.15->1.16 
#   F:isa/wavefront/wavefront_fx.c:1.15->1.16 
#   F:pci/maestro3.c:1.64->1.65 
#   F:pci/ac97/ac97_codec.c:1.154->1.155 
#   F:pci/ali5451/ali5451.c:1.58->1.59 
#   F:pci/cs46xx/dsp_spos.c:1.29->1.30 
#   F:pci/emu10k1/emu10k1_main.c:1.41->1.42 
#   F:pci/emu10k1/emupcm.c:1.34->1.35 
#   F:pci/ice1712/ak4xxx.c:1.9->1.10 
#   F:pci/trident/trident_main.c:1.66->1.67 
#   F:pci/ymfpci/ymfpci_main.c:1.60->1.61 
#   F:ppc/pmac.c:1.38->1.39 
#   F:synth/emux/emux.c:1.12->1.13 
#   F:synth/emux/emux_seq.c:1.12->1.13 
#   F:usb/usbaudio.c:1.111->1.112 
#   F:usb/usbmidi.c:1.34->1.35 
#   F:usb/usbmixer.c:1.33->1.34 
#   F:usb/usx2y/usbusx2y.c:1.5->1.6 
#   L:I've cleaned up sound/ directory from 'if (x) {k/v}free(x);' and similar
#   L:constructions. I'm going to to this for most of the kernel if I found
#   L:some time.
#   Signed-off-by: Marcel Sebek <sebek64@post.cz>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/synth/emux/emux.c
#   2004/11/29 07:09:47+01:00 perex@suse.cz +2 -6
#   [ALSA] Clean up of kfree()/vfree() NULL checks
#   
#   D:2004/11/29 14:09:44
#   C:ALSA Core,PCM Midlevel,Memalloc module,Timer Midlevel,IOCTL32 emulation
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer,I2C cs8427
#   C:L3 drivers,GUS Library,EMU8000 driver,Wavefront drivers,Maestro3 driver
#   C:AC97 Codec Core,ALI5451 driver,CS46xx driver,EMU10K1/EMU10K2 driver
#   C:ICE1712 driver,Trident driver,YMFPCI driver,PPC PMAC driver
#   C:Common EMU synth,USB generic driver,USB USX2Y
#   F:core/info.c:1.49->1.50 
#   F:core/init.c:1.51->1.52 
#   F:core/pcm.c:1.47->1.48 
#   F:core/pcm_native.c:1.109->1.110 
#   F:core/sgbuf.c:1.8->1.9 
#   F:core/timer.c:1.62->1.63 
#   F:core/ioctl32/ioctl32.c:1.24->1.25 
#   F:core/oss/mixer_oss.c:1.35->1.36 
#   F:core/oss/pcm_oss.c:1.81->1.82 
#   F:core/oss/pcm_plugin.c:1.22->1.23 
#   F:core/oss/route.c:1.9->1.10 
#   F:core/seq/seq_instr.c:1.10->1.11 
#   F:core/seq/seq_memory.c:1.17->1.18 
#   F:core/seq/seq_midi_emul.c:1.12->1.13 
#   F:core/seq/seq_midi_event.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_readq.c:1.10->1.11 
#   F:i2c/cs8427.c:1.21->1.22 
#   F:i2c/l3/uda1341.c:1.13->1.14 
#   F:isa/gus/gus_mem.c:1.10->1.11 
#   F:isa/sb/emu8000_pcm.c:1.15->1.16 
#   F:isa/wavefront/wavefront_fx.c:1.15->1.16 
#   F:pci/maestro3.c:1.64->1.65 
#   F:pci/ac97/ac97_codec.c:1.154->1.155 
#   F:pci/ali5451/ali5451.c:1.58->1.59 
#   F:pci/cs46xx/dsp_spos.c:1.29->1.30 
#   F:pci/emu10k1/emu10k1_main.c:1.41->1.42 
#   F:pci/emu10k1/emupcm.c:1.34->1.35 
#   F:pci/ice1712/ak4xxx.c:1.9->1.10 
#   F:pci/trident/trident_main.c:1.66->1.67 
#   F:pci/ymfpci/ymfpci_main.c:1.60->1.61 
#   F:ppc/pmac.c:1.38->1.39 
#   F:synth/emux/emux.c:1.12->1.13 
#   F:synth/emux/emux_seq.c:1.12->1.13 
#   F:usb/usbaudio.c:1.111->1.112 
#   F:usb/usbmidi.c:1.34->1.35 
#   F:usb/usbmixer.c:1.33->1.34 
#   F:usb/usx2y/usbusx2y.c:1.5->1.6 
#   L:I've cleaned up sound/ directory from 'if (x) {k/v}free(x);' and similar
#   L:constructions. I'm going to to this for most of the kernel if I found
#   L:some time.
#   Signed-off-by: Marcel Sebek <sebek64@post.cz>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/ppc/pmac.c
#   2004/11/29 07:09:47+01:00 perex@suse.cz +1 -1
#   [ALSA] Clean up of kfree()/vfree() NULL checks
#   
#   D:2004/11/29 14:09:44
#   C:ALSA Core,PCM Midlevel,Memalloc module,Timer Midlevel,IOCTL32 emulation
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer,I2C cs8427
#   C:L3 drivers,GUS Library,EMU8000 driver,Wavefront drivers,Maestro3 driver
#   C:AC97 Codec Core,ALI5451 driver,CS46xx driver,EMU10K1/EMU10K2 driver
#   C:ICE1712 driver,Trident driver,YMFPCI driver,PPC PMAC driver
#   C:Common EMU synth,USB generic driver,USB USX2Y
#   F:core/info.c:1.49->1.50 
#   F:core/init.c:1.51->1.52 
#   F:core/pcm.c:1.47->1.48 
#   F:core/pcm_native.c:1.109->1.110 
#   F:core/sgbuf.c:1.8->1.9 
#   F:core/timer.c:1.62->1.63 
#   F:core/ioctl32/ioctl32.c:1.24->1.25 
#   F:core/oss/mixer_oss.c:1.35->1.36 
#   F:core/oss/pcm_oss.c:1.81->1.82 
#   F:core/oss/pcm_plugin.c:1.22->1.23 
#   F:core/oss/route.c:1.9->1.10 
#   F:core/seq/seq_instr.c:1.10->1.11 
#   F:core/seq/seq_memory.c:1.17->1.18 
#   F:core/seq/seq_midi_emul.c:1.12->1.13 
#   F:core/seq/seq_midi_event.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_readq.c:1.10->1.11 
#   F:i2c/cs8427.c:1.21->1.22 
#   F:i2c/l3/uda1341.c:1.13->1.14 
#   F:isa/gus/gus_mem.c:1.10->1.11 
#   F:isa/sb/emu8000_pcm.c:1.15->1.16 
#   F:isa/wavefront/wavefront_fx.c:1.15->1.16 
#   F:pci/maestro3.c:1.64->1.65 
#   F:pci/ac97/ac97_codec.c:1.154->1.155 
#   F:pci/ali5451/ali5451.c:1.58->1.59 
#   F:pci/cs46xx/dsp_spos.c:1.29->1.30 
#   F:pci/emu10k1/emu10k1_main.c:1.41->1.42 
#   F:pci/emu10k1/emupcm.c:1.34->1.35 
#   F:pci/ice1712/ak4xxx.c:1.9->1.10 
#   F:pci/trident/trident_main.c:1.66->1.67 
#   F:pci/ymfpci/ymfpci_main.c:1.60->1.61 
#   F:ppc/pmac.c:1.38->1.39 
#   F:synth/emux/emux.c:1.12->1.13 
#   F:synth/emux/emux_seq.c:1.12->1.13 
#   F:usb/usbaudio.c:1.111->1.112 
#   F:usb/usbmidi.c:1.34->1.35 
#   F:usb/usbmixer.c:1.33->1.34 
#   F:usb/usx2y/usbusx2y.c:1.5->1.6 
#   L:I've cleaned up sound/ directory from 'if (x) {k/v}free(x);' and similar
#   L:constructions. I'm going to to this for most of the kernel if I found
#   L:some time.
#   Signed-off-by: Marcel Sebek <sebek64@post.cz>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ymfpci/ymfpci_main.c
#   2004/11/29 07:09:47+01:00 perex@suse.cz +2 -4
#   [ALSA] Clean up of kfree()/vfree() NULL checks
#   
#   D:2004/11/29 14:09:44
#   C:ALSA Core,PCM Midlevel,Memalloc module,Timer Midlevel,IOCTL32 emulation
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer,I2C cs8427
#   C:L3 drivers,GUS Library,EMU8000 driver,Wavefront drivers,Maestro3 driver
#   C:AC97 Codec Core,ALI5451 driver,CS46xx driver,EMU10K1/EMU10K2 driver
#   C:ICE1712 driver,Trident driver,YMFPCI driver,PPC PMAC driver
#   C:Common EMU synth,USB generic driver,USB USX2Y
#   F:core/info.c:1.49->1.50 
#   F:core/init.c:1.51->1.52 
#   F:core/pcm.c:1.47->1.48 
#   F:core/pcm_native.c:1.109->1.110 
#   F:core/sgbuf.c:1.8->1.9 
#   F:core/timer.c:1.62->1.63 
#   F:core/ioctl32/ioctl32.c:1.24->1.25 
#   F:core/oss/mixer_oss.c:1.35->1.36 
#   F:core/oss/pcm_oss.c:1.81->1.82 
#   F:core/oss/pcm_plugin.c:1.22->1.23 
#   F:core/oss/route.c:1.9->1.10 
#   F:core/seq/seq_instr.c:1.10->1.11 
#   F:core/seq/seq_memory.c:1.17->1.18 
#   F:core/seq/seq_midi_emul.c:1.12->1.13 
#   F:core/seq/seq_midi_event.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_readq.c:1.10->1.11 
#   F:i2c/cs8427.c:1.21->1.22 
#   F:i2c/l3/uda1341.c:1.13->1.14 
#   F:isa/gus/gus_mem.c:1.10->1.11 
#   F:isa/sb/emu8000_pcm.c:1.15->1.16 
#   F:isa/wavefront/wavefront_fx.c:1.15->1.16 
#   F:pci/maestro3.c:1.64->1.65 
#   F:pci/ac97/ac97_codec.c:1.154->1.155 
#   F:pci/ali5451/ali5451.c:1.58->1.59 
#   F:pci/cs46xx/dsp_spos.c:1.29->1.30 
#   F:pci/emu10k1/emu10k1_main.c:1.41->1.42 
#   F:pci/emu10k1/emupcm.c:1.34->1.35 
#   F:pci/ice1712/ak4xxx.c:1.9->1.10 
#   F:pci/trident/trident_main.c:1.66->1.67 
#   F:pci/ymfpci/ymfpci_main.c:1.60->1.61 
#   F:ppc/pmac.c:1.38->1.39 
#   F:synth/emux/emux.c:1.12->1.13 
#   F:synth/emux/emux_seq.c:1.12->1.13 
#   F:usb/usbaudio.c:1.111->1.112 
#   F:usb/usbmidi.c:1.34->1.35 
#   F:usb/usbmixer.c:1.33->1.34 
#   F:usb/usx2y/usbusx2y.c:1.5->1.6 
#   L:I've cleaned up sound/ directory from 'if (x) {k/v}free(x);' and similar
#   L:constructions. I'm going to to this for most of the kernel if I found
#   L:some time.
#   Signed-off-by: Marcel Sebek <sebek64@post.cz>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/trident/trident_main.c
#   2004/11/29 07:09:47+01:00 perex@suse.cz +1 -2
#   [ALSA] Clean up of kfree()/vfree() NULL checks
#   
#   D:2004/11/29 14:09:44
#   C:ALSA Core,PCM Midlevel,Memalloc module,Timer Midlevel,IOCTL32 emulation
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer,I2C cs8427
#   C:L3 drivers,GUS Library,EMU8000 driver,Wavefront drivers,Maestro3 driver
#   C:AC97 Codec Core,ALI5451 driver,CS46xx driver,EMU10K1/EMU10K2 driver
#   C:ICE1712 driver,Trident driver,YMFPCI driver,PPC PMAC driver
#   C:Common EMU synth,USB generic driver,USB USX2Y
#   F:core/info.c:1.49->1.50 
#   F:core/init.c:1.51->1.52 
#   F:core/pcm.c:1.47->1.48 
#   F:core/pcm_native.c:1.109->1.110 
#   F:core/sgbuf.c:1.8->1.9 
#   F:core/timer.c:1.62->1.63 
#   F:core/ioctl32/ioctl32.c:1.24->1.25 
#   F:core/oss/mixer_oss.c:1.35->1.36 
#   F:core/oss/pcm_oss.c:1.81->1.82 
#   F:core/oss/pcm_plugin.c:1.22->1.23 
#   F:core/oss/route.c:1.9->1.10 
#   F:core/seq/seq_instr.c:1.10->1.11 
#   F:core/seq/seq_memory.c:1.17->1.18 
#   F:core/seq/seq_midi_emul.c:1.12->1.13 
#   F:core/seq/seq_midi_event.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_readq.c:1.10->1.11 
#   F:i2c/cs8427.c:1.21->1.22 
#   F:i2c/l3/uda1341.c:1.13->1.14 
#   F:isa/gus/gus_mem.c:1.10->1.11 
#   F:isa/sb/emu8000_pcm.c:1.15->1.16 
#   F:isa/wavefront/wavefront_fx.c:1.15->1.16 
#   F:pci/maestro3.c:1.64->1.65 
#   F:pci/ac97/ac97_codec.c:1.154->1.155 
#   F:pci/ali5451/ali5451.c:1.58->1.59 
#   F:pci/cs46xx/dsp_spos.c:1.29->1.30 
#   F:pci/emu10k1/emu10k1_main.c:1.41->1.42 
#   F:pci/emu10k1/emupcm.c:1.34->1.35 
#   F:pci/ice1712/ak4xxx.c:1.9->1.10 
#   F:pci/trident/trident_main.c:1.66->1.67 
#   F:pci/ymfpci/ymfpci_main.c:1.60->1.61 
#   F:ppc/pmac.c:1.38->1.39 
#   F:synth/emux/emux.c:1.12->1.13 
#   F:synth/emux/emux_seq.c:1.12->1.13 
#   F:usb/usbaudio.c:1.111->1.112 
#   F:usb/usbmidi.c:1.34->1.35 
#   F:usb/usbmixer.c:1.33->1.34 
#   F:usb/usx2y/usbusx2y.c:1.5->1.6 
#   L:I've cleaned up sound/ directory from 'if (x) {k/v}free(x);' and similar
#   L:constructions. I'm going to to this for most of the kernel if I found
#   L:some time.
#   Signed-off-by: Marcel Sebek <sebek64@post.cz>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/maestro3.c
#   2004/11/29 07:09:46+01:00 perex@suse.cz +1 -2
#   [ALSA] Clean up of kfree()/vfree() NULL checks
#   
#   D:2004/11/29 14:09:44
#   C:ALSA Core,PCM Midlevel,Memalloc module,Timer Midlevel,IOCTL32 emulation
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer,I2C cs8427
#   C:L3 drivers,GUS Library,EMU8000 driver,Wavefront drivers,Maestro3 driver
#   C:AC97 Codec Core,ALI5451 driver,CS46xx driver,EMU10K1/EMU10K2 driver
#   C:ICE1712 driver,Trident driver,YMFPCI driver,PPC PMAC driver
#   C:Common EMU synth,USB generic driver,USB USX2Y
#   F:core/info.c:1.49->1.50 
#   F:core/init.c:1.51->1.52 
#   F:core/pcm.c:1.47->1.48 
#   F:core/pcm_native.c:1.109->1.110 
#   F:core/sgbuf.c:1.8->1.9 
#   F:core/timer.c:1.62->1.63 
#   F:core/ioctl32/ioctl32.c:1.24->1.25 
#   F:core/oss/mixer_oss.c:1.35->1.36 
#   F:core/oss/pcm_oss.c:1.81->1.82 
#   F:core/oss/pcm_plugin.c:1.22->1.23 
#   F:core/oss/route.c:1.9->1.10 
#   F:core/seq/seq_instr.c:1.10->1.11 
#   F:core/seq/seq_memory.c:1.17->1.18 
#   F:core/seq/seq_midi_emul.c:1.12->1.13 
#   F:core/seq/seq_midi_event.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_readq.c:1.10->1.11 
#   F:i2c/cs8427.c:1.21->1.22 
#   F:i2c/l3/uda1341.c:1.13->1.14 
#   F:isa/gus/gus_mem.c:1.10->1.11 
#   F:isa/sb/emu8000_pcm.c:1.15->1.16 
#   F:isa/wavefront/wavefront_fx.c:1.15->1.16 
#   F:pci/maestro3.c:1.64->1.65 
#   F:pci/ac97/ac97_codec.c:1.154->1.155 
#   F:pci/ali5451/ali5451.c:1.58->1.59 
#   F:pci/cs46xx/dsp_spos.c:1.29->1.30 
#   F:pci/emu10k1/emu10k1_main.c:1.41->1.42 
#   F:pci/emu10k1/emupcm.c:1.34->1.35 
#   F:pci/ice1712/ak4xxx.c:1.9->1.10 
#   F:pci/trident/trident_main.c:1.66->1.67 
#   F:pci/ymfpci/ymfpci_main.c:1.60->1.61 
#   F:ppc/pmac.c:1.38->1.39 
#   F:synth/emux/emux.c:1.12->1.13 
#   F:synth/emux/emux_seq.c:1.12->1.13 
#   F:usb/usbaudio.c:1.111->1.112 
#   F:usb/usbmidi.c:1.34->1.35 
#   F:usb/usbmixer.c:1.33->1.34 
#   F:usb/usx2y/usbusx2y.c:1.5->1.6 
#   L:I've cleaned up sound/ directory from 'if (x) {k/v}free(x);' and similar
#   L:constructions. I'm going to to this for most of the kernel if I found
#   L:some time.
#   Signed-off-by: Marcel Sebek <sebek64@post.cz>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ice1712/ak4xxx.c
#   2004/11/29 07:09:47+01:00 perex@suse.cz +1 -2
#   [ALSA] Clean up of kfree()/vfree() NULL checks
#   
#   D:2004/11/29 14:09:44
#   C:ALSA Core,PCM Midlevel,Memalloc module,Timer Midlevel,IOCTL32 emulation
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer,I2C cs8427
#   C:L3 drivers,GUS Library,EMU8000 driver,Wavefront drivers,Maestro3 driver
#   C:AC97 Codec Core,ALI5451 driver,CS46xx driver,EMU10K1/EMU10K2 driver
#   C:ICE1712 driver,Trident driver,YMFPCI driver,PPC PMAC driver
#   C:Common EMU synth,USB generic driver,USB USX2Y
#   F:core/info.c:1.49->1.50 
#   F:core/init.c:1.51->1.52 
#   F:core/pcm.c:1.47->1.48 
#   F:core/pcm_native.c:1.109->1.110 
#   F:core/sgbuf.c:1.8->1.9 
#   F:core/timer.c:1.62->1.63 
#   F:core/ioctl32/ioctl32.c:1.24->1.25 
#   F:core/oss/mixer_oss.c:1.35->1.36 
#   F:core/oss/pcm_oss.c:1.81->1.82 
#   F:core/oss/pcm_plugin.c:1.22->1.23 
#   F:core/oss/route.c:1.9->1.10 
#   F:core/seq/seq_instr.c:1.10->1.11 
#   F:core/seq/seq_memory.c:1.17->1.18 
#   F:core/seq/seq_midi_emul.c:1.12->1.13 
#   F:core/seq/seq_midi_event.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_readq.c:1.10->1.11 
#   F:i2c/cs8427.c:1.21->1.22 
#   F:i2c/l3/uda1341.c:1.13->1.14 
#   F:isa/gus/gus_mem.c:1.10->1.11 
#   F:isa/sb/emu8000_pcm.c:1.15->1.16 
#   F:isa/wavefront/wavefront_fx.c:1.15->1.16 
#   F:pci/maestro3.c:1.64->1.65 
#   F:pci/ac97/ac97_codec.c:1.154->1.155 
#   F:pci/ali5451/ali5451.c:1.58->1.59 
#   F:pci/cs46xx/dsp_spos.c:1.29->1.30 
#   F:pci/emu10k1/emu10k1_main.c:1.41->1.42 
#   F:pci/emu10k1/emupcm.c:1.34->1.35 
#   F:pci/ice1712/ak4xxx.c:1.9->1.10 
#   F:pci/trident/trident_main.c:1.66->1.67 
#   F:pci/ymfpci/ymfpci_main.c:1.60->1.61 
#   F:ppc/pmac.c:1.38->1.39 
#   F:synth/emux/emux.c:1.12->1.13 
#   F:synth/emux/emux_seq.c:1.12->1.13 
#   F:usb/usbaudio.c:1.111->1.112 
#   F:usb/usbmidi.c:1.34->1.35 
#   F:usb/usbmixer.c:1.33->1.34 
#   F:usb/usx2y/usbusx2y.c:1.5->1.6 
#   L:I've cleaned up sound/ directory from 'if (x) {k/v}free(x);' and similar
#   L:constructions. I'm going to to this for most of the kernel if I found
#   L:some time.
#   Signed-off-by: Marcel Sebek <sebek64@post.cz>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/emu10k1/emupcm.c
#   2004/11/29 07:09:47+01:00 perex@suse.cz +1 -2
#   [ALSA] Clean up of kfree()/vfree() NULL checks
#   
#   D:2004/11/29 14:09:44
#   C:ALSA Core,PCM Midlevel,Memalloc module,Timer Midlevel,IOCTL32 emulation
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer,I2C cs8427
#   C:L3 drivers,GUS Library,EMU8000 driver,Wavefront drivers,Maestro3 driver
#   C:AC97 Codec Core,ALI5451 driver,CS46xx driver,EMU10K1/EMU10K2 driver
#   C:ICE1712 driver,Trident driver,YMFPCI driver,PPC PMAC driver
#   C:Common EMU synth,USB generic driver,USB USX2Y
#   F:core/info.c:1.49->1.50 
#   F:core/init.c:1.51->1.52 
#   F:core/pcm.c:1.47->1.48 
#   F:core/pcm_native.c:1.109->1.110 
#   F:core/sgbuf.c:1.8->1.9 
#   F:core/timer.c:1.62->1.63 
#   F:core/ioctl32/ioctl32.c:1.24->1.25 
#   F:core/oss/mixer_oss.c:1.35->1.36 
#   F:core/oss/pcm_oss.c:1.81->1.82 
#   F:core/oss/pcm_plugin.c:1.22->1.23 
#   F:core/oss/route.c:1.9->1.10 
#   F:core/seq/seq_instr.c:1.10->1.11 
#   F:core/seq/seq_memory.c:1.17->1.18 
#   F:core/seq/seq_midi_emul.c:1.12->1.13 
#   F:core/seq/seq_midi_event.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_readq.c:1.10->1.11 
#   F:i2c/cs8427.c:1.21->1.22 
#   F:i2c/l3/uda1341.c:1.13->1.14 
#   F:isa/gus/gus_mem.c:1.10->1.11 
#   F:isa/sb/emu8000_pcm.c:1.15->1.16 
#   F:isa/wavefront/wavefront_fx.c:1.15->1.16 
#   F:pci/maestro3.c:1.64->1.65 
#   F:pci/ac97/ac97_codec.c:1.154->1.155 
#   F:pci/ali5451/ali5451.c:1.58->1.59 
#   F:pci/cs46xx/dsp_spos.c:1.29->1.30 
#   F:pci/emu10k1/emu10k1_main.c:1.41->1.42 
#   F:pci/emu10k1/emupcm.c:1.34->1.35 
#   F:pci/ice1712/ak4xxx.c:1.9->1.10 
#   F:pci/trident/trident_main.c:1.66->1.67 
#   F:pci/ymfpci/ymfpci_main.c:1.60->1.61 
#   F:ppc/pmac.c:1.38->1.39 
#   F:synth/emux/emux.c:1.12->1.13 
#   F:synth/emux/emux_seq.c:1.12->1.13 
#   F:usb/usbaudio.c:1.111->1.112 
#   F:usb/usbmidi.c:1.34->1.35 
#   F:usb/usbmixer.c:1.33->1.34 
#   F:usb/usx2y/usbusx2y.c:1.5->1.6 
#   L:I've cleaned up sound/ directory from 'if (x) {k/v}free(x);' and similar
#   L:constructions. I'm going to to this for most of the kernel if I found
#   L:some time.
#   Signed-off-by: Marcel Sebek <sebek64@post.cz>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/emu10k1/emu10k1_main.c
#   2004/11/29 07:09:47+01:00 perex@suse.cz +2 -4
#   [ALSA] Clean up of kfree()/vfree() NULL checks
#   
#   D:2004/11/29 14:09:44
#   C:ALSA Core,PCM Midlevel,Memalloc module,Timer Midlevel,IOCTL32 emulation
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer,I2C cs8427
#   C:L3 drivers,GUS Library,EMU8000 driver,Wavefront drivers,Maestro3 driver
#   C:AC97 Codec Core,ALI5451 driver,CS46xx driver,EMU10K1/EMU10K2 driver
#   C:ICE1712 driver,Trident driver,YMFPCI driver,PPC PMAC driver
#   C:Common EMU synth,USB generic driver,USB USX2Y
#   F:core/info.c:1.49->1.50 
#   F:core/init.c:1.51->1.52 
#   F:core/pcm.c:1.47->1.48 
#   F:core/pcm_native.c:1.109->1.110 
#   F:core/sgbuf.c:1.8->1.9 
#   F:core/timer.c:1.62->1.63 
#   F:core/ioctl32/ioctl32.c:1.24->1.25 
#   F:core/oss/mixer_oss.c:1.35->1.36 
#   F:core/oss/pcm_oss.c:1.81->1.82 
#   F:core/oss/pcm_plugin.c:1.22->1.23 
#   F:core/oss/route.c:1.9->1.10 
#   F:core/seq/seq_instr.c:1.10->1.11 
#   F:core/seq/seq_memory.c:1.17->1.18 
#   F:core/seq/seq_midi_emul.c:1.12->1.13 
#   F:core/seq/seq_midi_event.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_readq.c:1.10->1.11 
#   F:i2c/cs8427.c:1.21->1.22 
#   F:i2c/l3/uda1341.c:1.13->1.14 
#   F:isa/gus/gus_mem.c:1.10->1.11 
#   F:isa/sb/emu8000_pcm.c:1.15->1.16 
#   F:isa/wavefront/wavefront_fx.c:1.15->1.16 
#   F:pci/maestro3.c:1.64->1.65 
#   F:pci/ac97/ac97_codec.c:1.154->1.155 
#   F:pci/ali5451/ali5451.c:1.58->1.59 
#   F:pci/cs46xx/dsp_spos.c:1.29->1.30 
#   F:pci/emu10k1/emu10k1_main.c:1.41->1.42 
#   F:pci/emu10k1/emupcm.c:1.34->1.35 
#   F:pci/ice1712/ak4xxx.c:1.9->1.10 
#   F:pci/trident/trident_main.c:1.66->1.67 
#   F:pci/ymfpci/ymfpci_main.c:1.60->1.61 
#   F:ppc/pmac.c:1.38->1.39 
#   F:synth/emux/emux.c:1.12->1.13 
#   F:synth/emux/emux_seq.c:1.12->1.13 
#   F:usb/usbaudio.c:1.111->1.112 
#   F:usb/usbmidi.c:1.34->1.35 
#   F:usb/usbmixer.c:1.33->1.34 
#   F:usb/usx2y/usbusx2y.c:1.5->1.6 
#   L:I've cleaned up sound/ directory from 'if (x) {k/v}free(x);' and similar
#   L:constructions. I'm going to to this for most of the kernel if I found
#   L:some time.
#   Signed-off-by: Marcel Sebek <sebek64@post.cz>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/cs46xx/dsp_spos.c
#   2004/11/29 07:09:46+01:00 perex@suse.cz +3 -9
#   [ALSA] Clean up of kfree()/vfree() NULL checks
#   
#   D:2004/11/29 14:09:44
#   C:ALSA Core,PCM Midlevel,Memalloc module,Timer Midlevel,IOCTL32 emulation
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer,I2C cs8427
#   C:L3 drivers,GUS Library,EMU8000 driver,Wavefront drivers,Maestro3 driver
#   C:AC97 Codec Core,ALI5451 driver,CS46xx driver,EMU10K1/EMU10K2 driver
#   C:ICE1712 driver,Trident driver,YMFPCI driver,PPC PMAC driver
#   C:Common EMU synth,USB generic driver,USB USX2Y
#   F:core/info.c:1.49->1.50 
#   F:core/init.c:1.51->1.52 
#   F:core/pcm.c:1.47->1.48 
#   F:core/pcm_native.c:1.109->1.110 
#   F:core/sgbuf.c:1.8->1.9 
#   F:core/timer.c:1.62->1.63 
#   F:core/ioctl32/ioctl32.c:1.24->1.25 
#   F:core/oss/mixer_oss.c:1.35->1.36 
#   F:core/oss/pcm_oss.c:1.81->1.82 
#   F:core/oss/pcm_plugin.c:1.22->1.23 
#   F:core/oss/route.c:1.9->1.10 
#   F:core/seq/seq_instr.c:1.10->1.11 
#   F:core/seq/seq_memory.c:1.17->1.18 
#   F:core/seq/seq_midi_emul.c:1.12->1.13 
#   F:core/seq/seq_midi_event.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_readq.c:1.10->1.11 
#   F:i2c/cs8427.c:1.21->1.22 
#   F:i2c/l3/uda1341.c:1.13->1.14 
#   F:isa/gus/gus_mem.c:1.10->1.11 
#   F:isa/sb/emu8000_pcm.c:1.15->1.16 
#   F:isa/wavefront/wavefront_fx.c:1.15->1.16 
#   F:pci/maestro3.c:1.64->1.65 
#   F:pci/ac97/ac97_codec.c:1.154->1.155 
#   F:pci/ali5451/ali5451.c:1.58->1.59 
#   F:pci/cs46xx/dsp_spos.c:1.29->1.30 
#   F:pci/emu10k1/emu10k1_main.c:1.41->1.42 
#   F:pci/emu10k1/emupcm.c:1.34->1.35 
#   F:pci/ice1712/ak4xxx.c:1.9->1.10 
#   F:pci/trident/trident_main.c:1.66->1.67 
#   F:pci/ymfpci/ymfpci_main.c:1.60->1.61 
#   F:ppc/pmac.c:1.38->1.39 
#   F:synth/emux/emux.c:1.12->1.13 
#   F:synth/emux/emux_seq.c:1.12->1.13 
#   F:usb/usbaudio.c:1.111->1.112 
#   F:usb/usbmidi.c:1.34->1.35 
#   F:usb/usbmixer.c:1.33->1.34 
#   F:usb/usx2y/usbusx2y.c:1.5->1.6 
#   L:I've cleaned up sound/ directory from 'if (x) {k/v}free(x);' and similar
#   L:constructions. I'm going to to this for most of the kernel if I found
#   L:some time.
#   Signed-off-by: Marcel Sebek <sebek64@post.cz>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ali5451/ali5451.c
#   2004/11/29 07:09:46+01:00 perex@suse.cz +1 -2
#   [ALSA] Clean up of kfree()/vfree() NULL checks
#   
#   D:2004/11/29 14:09:44
#   C:ALSA Core,PCM Midlevel,Memalloc module,Timer Midlevel,IOCTL32 emulation
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer,I2C cs8427
#   C:L3 drivers,GUS Library,EMU8000 driver,Wavefront drivers,Maestro3 driver
#   C:AC97 Codec Core,ALI5451 driver,CS46xx driver,EMU10K1/EMU10K2 driver
#   C:ICE1712 driver,Trident driver,YMFPCI driver,PPC PMAC driver
#   C:Common EMU synth,USB generic driver,USB USX2Y
#   F:core/info.c:1.49->1.50 
#   F:core/init.c:1.51->1.52 
#   F:core/pcm.c:1.47->1.48 
#   F:core/pcm_native.c:1.109->1.110 
#   F:core/sgbuf.c:1.8->1.9 
#   F:core/timer.c:1.62->1.63 
#   F:core/ioctl32/ioctl32.c:1.24->1.25 
#   F:core/oss/mixer_oss.c:1.35->1.36 
#   F:core/oss/pcm_oss.c:1.81->1.82 
#   F:core/oss/pcm_plugin.c:1.22->1.23 
#   F:core/oss/route.c:1.9->1.10 
#   F:core/seq/seq_instr.c:1.10->1.11 
#   F:core/seq/seq_memory.c:1.17->1.18 
#   F:core/seq/seq_midi_emul.c:1.12->1.13 
#   F:core/seq/seq_midi_event.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_readq.c:1.10->1.11 
#   F:i2c/cs8427.c:1.21->1.22 
#   F:i2c/l3/uda1341.c:1.13->1.14 
#   F:isa/gus/gus_mem.c:1.10->1.11 
#   F:isa/sb/emu8000_pcm.c:1.15->1.16 
#   F:isa/wavefront/wavefront_fx.c:1.15->1.16 
#   F:pci/maestro3.c:1.64->1.65 
#   F:pci/ac97/ac97_codec.c:1.154->1.155 
#   F:pci/ali5451/ali5451.c:1.58->1.59 
#   F:pci/cs46xx/dsp_spos.c:1.29->1.30 
#   F:pci/emu10k1/emu10k1_main.c:1.41->1.42 
#   F:pci/emu10k1/emupcm.c:1.34->1.35 
#   F:pci/ice1712/ak4xxx.c:1.9->1.10 
#   F:pci/trident/trident_main.c:1.66->1.67 
#   F:pci/ymfpci/ymfpci_main.c:1.60->1.61 
#   F:ppc/pmac.c:1.38->1.39 
#   F:synth/emux/emux.c:1.12->1.13 
#   F:synth/emux/emux_seq.c:1.12->1.13 
#   F:usb/usbaudio.c:1.111->1.112 
#   F:usb/usbmidi.c:1.34->1.35 
#   F:usb/usbmixer.c:1.33->1.34 
#   F:usb/usx2y/usbusx2y.c:1.5->1.6 
#   L:I've cleaned up sound/ directory from 'if (x) {k/v}free(x);' and similar
#   L:constructions. I'm going to to this for most of the kernel if I found
#   L:some time.
#   Signed-off-by: Marcel Sebek <sebek64@post.cz>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ac97/ac97_codec.c
#   2004/11/29 07:09:46+01:00 perex@suse.cz +1 -2
#   [ALSA] Clean up of kfree()/vfree() NULL checks
#   
#   D:2004/11/29 14:09:44
#   C:ALSA Core,PCM Midlevel,Memalloc module,Timer Midlevel,IOCTL32 emulation
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer,I2C cs8427
#   C:L3 drivers,GUS Library,EMU8000 driver,Wavefront drivers,Maestro3 driver
#   C:AC97 Codec Core,ALI5451 driver,CS46xx driver,EMU10K1/EMU10K2 driver
#   C:ICE1712 driver,Trident driver,YMFPCI driver,PPC PMAC driver
#   C:Common EMU synth,USB generic driver,USB USX2Y
#   F:core/info.c:1.49->1.50 
#   F:core/init.c:1.51->1.52 
#   F:core/pcm.c:1.47->1.48 
#   F:core/pcm_native.c:1.109->1.110 
#   F:core/sgbuf.c:1.8->1.9 
#   F:core/timer.c:1.62->1.63 
#   F:core/ioctl32/ioctl32.c:1.24->1.25 
#   F:core/oss/mixer_oss.c:1.35->1.36 
#   F:core/oss/pcm_oss.c:1.81->1.82 
#   F:core/oss/pcm_plugin.c:1.22->1.23 
#   F:core/oss/route.c:1.9->1.10 
#   F:core/seq/seq_instr.c:1.10->1.11 
#   F:core/seq/seq_memory.c:1.17->1.18 
#   F:core/seq/seq_midi_emul.c:1.12->1.13 
#   F:core/seq/seq_midi_event.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_readq.c:1.10->1.11 
#   F:i2c/cs8427.c:1.21->1.22 
#   F:i2c/l3/uda1341.c:1.13->1.14 
#   F:isa/gus/gus_mem.c:1.10->1.11 
#   F:isa/sb/emu8000_pcm.c:1.15->1.16 
#   F:isa/wavefront/wavefront_fx.c:1.15->1.16 
#   F:pci/maestro3.c:1.64->1.65 
#   F:pci/ac97/ac97_codec.c:1.154->1.155 
#   F:pci/ali5451/ali5451.c:1.58->1.59 
#   F:pci/cs46xx/dsp_spos.c:1.29->1.30 
#   F:pci/emu10k1/emu10k1_main.c:1.41->1.42 
#   F:pci/emu10k1/emupcm.c:1.34->1.35 
#   F:pci/ice1712/ak4xxx.c:1.9->1.10 
#   F:pci/trident/trident_main.c:1.66->1.67 
#   F:pci/ymfpci/ymfpci_main.c:1.60->1.61 
#   F:ppc/pmac.c:1.38->1.39 
#   F:synth/emux/emux.c:1.12->1.13 
#   F:synth/emux/emux_seq.c:1.12->1.13 
#   F:usb/usbaudio.c:1.111->1.112 
#   F:usb/usbmidi.c:1.34->1.35 
#   F:usb/usbmixer.c:1.33->1.34 
#   F:usb/usx2y/usbusx2y.c:1.5->1.6 
#   L:I've cleaned up sound/ directory from 'if (x) {k/v}free(x);' and similar
#   L:constructions. I'm going to to this for most of the kernel if I found
#   L:some time.
#   Signed-off-by: Marcel Sebek <sebek64@post.cz>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/isa/wavefront/wavefront_fx.c
#   2004/11/29 07:09:45+01:00 perex@suse.cz +1 -2
#   [ALSA] Clean up of kfree()/vfree() NULL checks
#   
#   D:2004/11/29 14:09:44
#   C:ALSA Core,PCM Midlevel,Memalloc module,Timer Midlevel,IOCTL32 emulation
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer,I2C cs8427
#   C:L3 drivers,GUS Library,EMU8000 driver,Wavefront drivers,Maestro3 driver
#   C:AC97 Codec Core,ALI5451 driver,CS46xx driver,EMU10K1/EMU10K2 driver
#   C:ICE1712 driver,Trident driver,YMFPCI driver,PPC PMAC driver
#   C:Common EMU synth,USB generic driver,USB USX2Y
#   F:core/info.c:1.49->1.50 
#   F:core/init.c:1.51->1.52 
#   F:core/pcm.c:1.47->1.48 
#   F:core/pcm_native.c:1.109->1.110 
#   F:core/sgbuf.c:1.8->1.9 
#   F:core/timer.c:1.62->1.63 
#   F:core/ioctl32/ioctl32.c:1.24->1.25 
#   F:core/oss/mixer_oss.c:1.35->1.36 
#   F:core/oss/pcm_oss.c:1.81->1.82 
#   F:core/oss/pcm_plugin.c:1.22->1.23 
#   F:core/oss/route.c:1.9->1.10 
#   F:core/seq/seq_instr.c:1.10->1.11 
#   F:core/seq/seq_memory.c:1.17->1.18 
#   F:core/seq/seq_midi_emul.c:1.12->1.13 
#   F:core/seq/seq_midi_event.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_readq.c:1.10->1.11 
#   F:i2c/cs8427.c:1.21->1.22 
#   F:i2c/l3/uda1341.c:1.13->1.14 
#   F:isa/gus/gus_mem.c:1.10->1.11 
#   F:isa/sb/emu8000_pcm.c:1.15->1.16 
#   F:isa/wavefront/wavefront_fx.c:1.15->1.16 
#   F:pci/maestro3.c:1.64->1.65 
#   F:pci/ac97/ac97_codec.c:1.154->1.155 
#   F:pci/ali5451/ali5451.c:1.58->1.59 
#   F:pci/cs46xx/dsp_spos.c:1.29->1.30 
#   F:pci/emu10k1/emu10k1_main.c:1.41->1.42 
#   F:pci/emu10k1/emupcm.c:1.34->1.35 
#   F:pci/ice1712/ak4xxx.c:1.9->1.10 
#   F:pci/trident/trident_main.c:1.66->1.67 
#   F:pci/ymfpci/ymfpci_main.c:1.60->1.61 
#   F:ppc/pmac.c:1.38->1.39 
#   F:synth/emux/emux.c:1.12->1.13 
#   F:synth/emux/emux_seq.c:1.12->1.13 
#   F:usb/usbaudio.c:1.111->1.112 
#   F:usb/usbmidi.c:1.34->1.35 
#   F:usb/usbmixer.c:1.33->1.34 
#   F:usb/usx2y/usbusx2y.c:1.5->1.6 
#   L:I've cleaned up sound/ directory from 'if (x) {k/v}free(x);' and similar
#   L:constructions. I'm going to to this for most of the kernel if I found
#   L:some time.
#   Signed-off-by: Marcel Sebek <sebek64@post.cz>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/isa/sb/emu8000_pcm.c
#   2004/11/29 07:09:45+01:00 perex@suse.cz +1 -2
#   [ALSA] Clean up of kfree()/vfree() NULL checks
#   
#   D:2004/11/29 14:09:44
#   C:ALSA Core,PCM Midlevel,Memalloc module,Timer Midlevel,IOCTL32 emulation
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer,I2C cs8427
#   C:L3 drivers,GUS Library,EMU8000 driver,Wavefront drivers,Maestro3 driver
#   C:AC97 Codec Core,ALI5451 driver,CS46xx driver,EMU10K1/EMU10K2 driver
#   C:ICE1712 driver,Trident driver,YMFPCI driver,PPC PMAC driver
#   C:Common EMU synth,USB generic driver,USB USX2Y
#   F:core/info.c:1.49->1.50 
#   F:core/init.c:1.51->1.52 
#   F:core/pcm.c:1.47->1.48 
#   F:core/pcm_native.c:1.109->1.110 
#   F:core/sgbuf.c:1.8->1.9 
#   F:core/timer.c:1.62->1.63 
#   F:core/ioctl32/ioctl32.c:1.24->1.25 
#   F:core/oss/mixer_oss.c:1.35->1.36 
#   F:core/oss/pcm_oss.c:1.81->1.82 
#   F:core/oss/pcm_plugin.c:1.22->1.23 
#   F:core/oss/route.c:1.9->1.10 
#   F:core/seq/seq_instr.c:1.10->1.11 
#   F:core/seq/seq_memory.c:1.17->1.18 
#   F:core/seq/seq_midi_emul.c:1.12->1.13 
#   F:core/seq/seq_midi_event.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_readq.c:1.10->1.11 
#   F:i2c/cs8427.c:1.21->1.22 
#   F:i2c/l3/uda1341.c:1.13->1.14 
#   F:isa/gus/gus_mem.c:1.10->1.11 
#   F:isa/sb/emu8000_pcm.c:1.15->1.16 
#   F:isa/wavefront/wavefront_fx.c:1.15->1.16 
#   F:pci/maestro3.c:1.64->1.65 
#   F:pci/ac97/ac97_codec.c:1.154->1.155 
#   F:pci/ali5451/ali5451.c:1.58->1.59 
#   F:pci/cs46xx/dsp_spos.c:1.29->1.30 
#   F:pci/emu10k1/emu10k1_main.c:1.41->1.42 
#   F:pci/emu10k1/emupcm.c:1.34->1.35 
#   F:pci/ice1712/ak4xxx.c:1.9->1.10 
#   F:pci/trident/trident_main.c:1.66->1.67 
#   F:pci/ymfpci/ymfpci_main.c:1.60->1.61 
#   F:ppc/pmac.c:1.38->1.39 
#   F:synth/emux/emux.c:1.12->1.13 
#   F:synth/emux/emux_seq.c:1.12->1.13 
#   F:usb/usbaudio.c:1.111->1.112 
#   F:usb/usbmidi.c:1.34->1.35 
#   F:usb/usbmixer.c:1.33->1.34 
#   F:usb/usx2y/usbusx2y.c:1.5->1.6 
#   L:I've cleaned up sound/ directory from 'if (x) {k/v}free(x);' and similar
#   L:constructions. I'm going to to this for most of the kernel if I found
#   L:some time.
#   Signed-off-by: Marcel Sebek <sebek64@post.cz>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/isa/gus/gus_mem.c
#   2004/11/29 07:09:45+01:00 perex@suse.cz +1 -2
#   [ALSA] Clean up of kfree()/vfree() NULL checks
#   
#   D:2004/11/29 14:09:44
#   C:ALSA Core,PCM Midlevel,Memalloc module,Timer Midlevel,IOCTL32 emulation
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer,I2C cs8427
#   C:L3 drivers,GUS Library,EMU8000 driver,Wavefront drivers,Maestro3 driver
#   C:AC97 Codec Core,ALI5451 driver,CS46xx driver,EMU10K1/EMU10K2 driver
#   C:ICE1712 driver,Trident driver,YMFPCI driver,PPC PMAC driver
#   C:Common EMU synth,USB generic driver,USB USX2Y
#   F:core/info.c:1.49->1.50 
#   F:core/init.c:1.51->1.52 
#   F:core/pcm.c:1.47->1.48 
#   F:core/pcm_native.c:1.109->1.110 
#   F:core/sgbuf.c:1.8->1.9 
#   F:core/timer.c:1.62->1.63 
#   F:core/ioctl32/ioctl32.c:1.24->1.25 
#   F:core/oss/mixer_oss.c:1.35->1.36 
#   F:core/oss/pcm_oss.c:1.81->1.82 
#   F:core/oss/pcm_plugin.c:1.22->1.23 
#   F:core/oss/route.c:1.9->1.10 
#   F:core/seq/seq_instr.c:1.10->1.11 
#   F:core/seq/seq_memory.c:1.17->1.18 
#   F:core/seq/seq_midi_emul.c:1.12->1.13 
#   F:core/seq/seq_midi_event.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_readq.c:1.10->1.11 
#   F:i2c/cs8427.c:1.21->1.22 
#   F:i2c/l3/uda1341.c:1.13->1.14 
#   F:isa/gus/gus_mem.c:1.10->1.11 
#   F:isa/sb/emu8000_pcm.c:1.15->1.16 
#   F:isa/wavefront/wavefront_fx.c:1.15->1.16 
#   F:pci/maestro3.c:1.64->1.65 
#   F:pci/ac97/ac97_codec.c:1.154->1.155 
#   F:pci/ali5451/ali5451.c:1.58->1.59 
#   F:pci/cs46xx/dsp_spos.c:1.29->1.30 
#   F:pci/emu10k1/emu10k1_main.c:1.41->1.42 
#   F:pci/emu10k1/emupcm.c:1.34->1.35 
#   F:pci/ice1712/ak4xxx.c:1.9->1.10 
#   F:pci/trident/trident_main.c:1.66->1.67 
#   F:pci/ymfpci/ymfpci_main.c:1.60->1.61 
#   F:ppc/pmac.c:1.38->1.39 
#   F:synth/emux/emux.c:1.12->1.13 
#   F:synth/emux/emux_seq.c:1.12->1.13 
#   F:usb/usbaudio.c:1.111->1.112 
#   F:usb/usbmidi.c:1.34->1.35 
#   F:usb/usbmixer.c:1.33->1.34 
#   F:usb/usx2y/usbusx2y.c:1.5->1.6 
#   L:I've cleaned up sound/ directory from 'if (x) {k/v}free(x);' and similar
#   L:constructions. I'm going to to this for most of the kernel if I found
#   L:some time.
#   Signed-off-by: Marcel Sebek <sebek64@post.cz>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/i2c/l3/uda1341.c
#   2004/11/29 07:09:45+01:00 perex@suse.cz +2 -3
#   [ALSA] Clean up of kfree()/vfree() NULL checks
#   
#   D:2004/11/29 14:09:44
#   C:ALSA Core,PCM Midlevel,Memalloc module,Timer Midlevel,IOCTL32 emulation
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer,I2C cs8427
#   C:L3 drivers,GUS Library,EMU8000 driver,Wavefront drivers,Maestro3 driver
#   C:AC97 Codec Core,ALI5451 driver,CS46xx driver,EMU10K1/EMU10K2 driver
#   C:ICE1712 driver,Trident driver,YMFPCI driver,PPC PMAC driver
#   C:Common EMU synth,USB generic driver,USB USX2Y
#   F:core/info.c:1.49->1.50 
#   F:core/init.c:1.51->1.52 
#   F:core/pcm.c:1.47->1.48 
#   F:core/pcm_native.c:1.109->1.110 
#   F:core/sgbuf.c:1.8->1.9 
#   F:core/timer.c:1.62->1.63 
#   F:core/ioctl32/ioctl32.c:1.24->1.25 
#   F:core/oss/mixer_oss.c:1.35->1.36 
#   F:core/oss/pcm_oss.c:1.81->1.82 
#   F:core/oss/pcm_plugin.c:1.22->1.23 
#   F:core/oss/route.c:1.9->1.10 
#   F:core/seq/seq_instr.c:1.10->1.11 
#   F:core/seq/seq_memory.c:1.17->1.18 
#   F:core/seq/seq_midi_emul.c:1.12->1.13 
#   F:core/seq/seq_midi_event.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_readq.c:1.10->1.11 
#   F:i2c/cs8427.c:1.21->1.22 
#   F:i2c/l3/uda1341.c:1.13->1.14 
#   F:isa/gus/gus_mem.c:1.10->1.11 
#   F:isa/sb/emu8000_pcm.c:1.15->1.16 
#   F:isa/wavefront/wavefront_fx.c:1.15->1.16 
#   F:pci/maestro3.c:1.64->1.65 
#   F:pci/ac97/ac97_codec.c:1.154->1.155 
#   F:pci/ali5451/ali5451.c:1.58->1.59 
#   F:pci/cs46xx/dsp_spos.c:1.29->1.30 
#   F:pci/emu10k1/emu10k1_main.c:1.41->1.42 
#   F:pci/emu10k1/emupcm.c:1.34->1.35 
#   F:pci/ice1712/ak4xxx.c:1.9->1.10 
#   F:pci/trident/trident_main.c:1.66->1.67 
#   F:pci/ymfpci/ymfpci_main.c:1.60->1.61 
#   F:ppc/pmac.c:1.38->1.39 
#   F:synth/emux/emux.c:1.12->1.13 
#   F:synth/emux/emux_seq.c:1.12->1.13 
#   F:usb/usbaudio.c:1.111->1.112 
#   F:usb/usbmidi.c:1.34->1.35 
#   F:usb/usbmixer.c:1.33->1.34 
#   F:usb/usx2y/usbusx2y.c:1.5->1.6 
#   L:I've cleaned up sound/ directory from 'if (x) {k/v}free(x);' and similar
#   L:constructions. I'm going to to this for most of the kernel if I found
#   L:some time.
#   Signed-off-by: Marcel Sebek <sebek64@post.cz>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/i2c/cs8427.c
#   2004/11/29 07:09:45+01:00 perex@suse.cz +1 -2
#   [ALSA] Clean up of kfree()/vfree() NULL checks
#   
#   D:2004/11/29 14:09:44
#   C:ALSA Core,PCM Midlevel,Memalloc module,Timer Midlevel,IOCTL32 emulation
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer,I2C cs8427
#   C:L3 drivers,GUS Library,EMU8000 driver,Wavefront drivers,Maestro3 driver
#   C:AC97 Codec Core,ALI5451 driver,CS46xx driver,EMU10K1/EMU10K2 driver
#   C:ICE1712 driver,Trident driver,YMFPCI driver,PPC PMAC driver
#   C:Common EMU synth,USB generic driver,USB USX2Y
#   F:core/info.c:1.49->1.50 
#   F:core/init.c:1.51->1.52 
#   F:core/pcm.c:1.47->1.48 
#   F:core/pcm_native.c:1.109->1.110 
#   F:core/sgbuf.c:1.8->1.9 
#   F:core/timer.c:1.62->1.63 
#   F:core/ioctl32/ioctl32.c:1.24->1.25 
#   F:core/oss/mixer_oss.c:1.35->1.36 
#   F:core/oss/pcm_oss.c:1.81->1.82 
#   F:core/oss/pcm_plugin.c:1.22->1.23 
#   F:core/oss/route.c:1.9->1.10 
#   F:core/seq/seq_instr.c:1.10->1.11 
#   F:core/seq/seq_memory.c:1.17->1.18 
#   F:core/seq/seq_midi_emul.c:1.12->1.13 
#   F:core/seq/seq_midi_event.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_readq.c:1.10->1.11 
#   F:i2c/cs8427.c:1.21->1.22 
#   F:i2c/l3/uda1341.c:1.13->1.14 
#   F:isa/gus/gus_mem.c:1.10->1.11 
#   F:isa/sb/emu8000_pcm.c:1.15->1.16 
#   F:isa/wavefront/wavefront_fx.c:1.15->1.16 
#   F:pci/maestro3.c:1.64->1.65 
#   F:pci/ac97/ac97_codec.c:1.154->1.155 
#   F:pci/ali5451/ali5451.c:1.58->1.59 
#   F:pci/cs46xx/dsp_spos.c:1.29->1.30 
#   F:pci/emu10k1/emu10k1_main.c:1.41->1.42 
#   F:pci/emu10k1/emupcm.c:1.34->1.35 
#   F:pci/ice1712/ak4xxx.c:1.9->1.10 
#   F:pci/trident/trident_main.c:1.66->1.67 
#   F:pci/ymfpci/ymfpci_main.c:1.60->1.61 
#   F:ppc/pmac.c:1.38->1.39 
#   F:synth/emux/emux.c:1.12->1.13 
#   F:synth/emux/emux_seq.c:1.12->1.13 
#   F:usb/usbaudio.c:1.111->1.112 
#   F:usb/usbmidi.c:1.34->1.35 
#   F:usb/usbmixer.c:1.33->1.34 
#   F:usb/usx2y/usbusx2y.c:1.5->1.6 
#   L:I've cleaned up sound/ directory from 'if (x) {k/v}free(x);' and similar
#   L:constructions. I'm going to to this for most of the kernel if I found
#   L:some time.
#   Signed-off-by: Marcel Sebek <sebek64@post.cz>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/timer.c
#   2004/11/29 07:09:44+01:00 perex@suse.cz +4 -8
#   [ALSA] Clean up of kfree()/vfree() NULL checks
#   
#   D:2004/11/29 14:09:44
#   C:ALSA Core,PCM Midlevel,Memalloc module,Timer Midlevel,IOCTL32 emulation
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer,I2C cs8427
#   C:L3 drivers,GUS Library,EMU8000 driver,Wavefront drivers,Maestro3 driver
#   C:AC97 Codec Core,ALI5451 driver,CS46xx driver,EMU10K1/EMU10K2 driver
#   C:ICE1712 driver,Trident driver,YMFPCI driver,PPC PMAC driver
#   C:Common EMU synth,USB generic driver,USB USX2Y
#   F:core/info.c:1.49->1.50 
#   F:core/init.c:1.51->1.52 
#   F:core/pcm.c:1.47->1.48 
#   F:core/pcm_native.c:1.109->1.110 
#   F:core/sgbuf.c:1.8->1.9 
#   F:core/timer.c:1.62->1.63 
#   F:core/ioctl32/ioctl32.c:1.24->1.25 
#   F:core/oss/mixer_oss.c:1.35->1.36 
#   F:core/oss/pcm_oss.c:1.81->1.82 
#   F:core/oss/pcm_plugin.c:1.22->1.23 
#   F:core/oss/route.c:1.9->1.10 
#   F:core/seq/seq_instr.c:1.10->1.11 
#   F:core/seq/seq_memory.c:1.17->1.18 
#   F:core/seq/seq_midi_emul.c:1.12->1.13 
#   F:core/seq/seq_midi_event.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_readq.c:1.10->1.11 
#   F:i2c/cs8427.c:1.21->1.22 
#   F:i2c/l3/uda1341.c:1.13->1.14 
#   F:isa/gus/gus_mem.c:1.10->1.11 
#   F:isa/sb/emu8000_pcm.c:1.15->1.16 
#   F:isa/wavefront/wavefront_fx.c:1.15->1.16 
#   F:pci/maestro3.c:1.64->1.65 
#   F:pci/ac97/ac97_codec.c:1.154->1.155 
#   F:pci/ali5451/ali5451.c:1.58->1.59 
#   F:pci/cs46xx/dsp_spos.c:1.29->1.30 
#   F:pci/emu10k1/emu10k1_main.c:1.41->1.42 
#   F:pci/emu10k1/emupcm.c:1.34->1.35 
#   F:pci/ice1712/ak4xxx.c:1.9->1.10 
#   F:pci/trident/trident_main.c:1.66->1.67 
#   F:pci/ymfpci/ymfpci_main.c:1.60->1.61 
#   F:ppc/pmac.c:1.38->1.39 
#   F:synth/emux/emux.c:1.12->1.13 
#   F:synth/emux/emux_seq.c:1.12->1.13 
#   F:usb/usbaudio.c:1.111->1.112 
#   F:usb/usbmidi.c:1.34->1.35 
#   F:usb/usbmixer.c:1.33->1.34 
#   F:usb/usx2y/usbusx2y.c:1.5->1.6 
#   L:I've cleaned up sound/ directory from 'if (x) {k/v}free(x);' and similar
#   L:constructions. I'm going to to this for most of the kernel if I found
#   L:some time.
#   Signed-off-by: Marcel Sebek <sebek64@post.cz>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/sgbuf.c
#   2004/11/29 07:09:44+01:00 perex@suse.cz +2 -4
#   [ALSA] Clean up of kfree()/vfree() NULL checks
#   
#   D:2004/11/29 14:09:44
#   C:ALSA Core,PCM Midlevel,Memalloc module,Timer Midlevel,IOCTL32 emulation
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer,I2C cs8427
#   C:L3 drivers,GUS Library,EMU8000 driver,Wavefront drivers,Maestro3 driver
#   C:AC97 Codec Core,ALI5451 driver,CS46xx driver,EMU10K1/EMU10K2 driver
#   C:ICE1712 driver,Trident driver,YMFPCI driver,PPC PMAC driver
#   C:Common EMU synth,USB generic driver,USB USX2Y
#   F:core/info.c:1.49->1.50 
#   F:core/init.c:1.51->1.52 
#   F:core/pcm.c:1.47->1.48 
#   F:core/pcm_native.c:1.109->1.110 
#   F:core/sgbuf.c:1.8->1.9 
#   F:core/timer.c:1.62->1.63 
#   F:core/ioctl32/ioctl32.c:1.24->1.25 
#   F:core/oss/mixer_oss.c:1.35->1.36 
#   F:core/oss/pcm_oss.c:1.81->1.82 
#   F:core/oss/pcm_plugin.c:1.22->1.23 
#   F:core/oss/route.c:1.9->1.10 
#   F:core/seq/seq_instr.c:1.10->1.11 
#   F:core/seq/seq_memory.c:1.17->1.18 
#   F:core/seq/seq_midi_emul.c:1.12->1.13 
#   F:core/seq/seq_midi_event.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_readq.c:1.10->1.11 
#   F:i2c/cs8427.c:1.21->1.22 
#   F:i2c/l3/uda1341.c:1.13->1.14 
#   F:isa/gus/gus_mem.c:1.10->1.11 
#   F:isa/sb/emu8000_pcm.c:1.15->1.16 
#   F:isa/wavefront/wavefront_fx.c:1.15->1.16 
#   F:pci/maestro3.c:1.64->1.65 
#   F:pci/ac97/ac97_codec.c:1.154->1.155 
#   F:pci/ali5451/ali5451.c:1.58->1.59 
#   F:pci/cs46xx/dsp_spos.c:1.29->1.30 
#   F:pci/emu10k1/emu10k1_main.c:1.41->1.42 
#   F:pci/emu10k1/emupcm.c:1.34->1.35 
#   F:pci/ice1712/ak4xxx.c:1.9->1.10 
#   F:pci/trident/trident_main.c:1.66->1.67 
#   F:pci/ymfpci/ymfpci_main.c:1.60->1.61 
#   F:ppc/pmac.c:1.38->1.39 
#   F:synth/emux/emux.c:1.12->1.13 
#   F:synth/emux/emux_seq.c:1.12->1.13 
#   F:usb/usbaudio.c:1.111->1.112 
#   F:usb/usbmidi.c:1.34->1.35 
#   F:usb/usbmixer.c:1.33->1.34 
#   F:usb/usx2y/usbusx2y.c:1.5->1.6 
#   L:I've cleaned up sound/ directory from 'if (x) {k/v}free(x);' and similar
#   L:constructions. I'm going to to this for most of the kernel if I found
#   L:some time.
#   Signed-off-by: Marcel Sebek <sebek64@post.cz>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/seq/seq_midi_event.c
#   2004/11/29 07:09:45+01:00 perex@suse.cz +2 -4
#   [ALSA] Clean up of kfree()/vfree() NULL checks
#   
#   D:2004/11/29 14:09:44
#   C:ALSA Core,PCM Midlevel,Memalloc module,Timer Midlevel,IOCTL32 emulation
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer,I2C cs8427
#   C:L3 drivers,GUS Library,EMU8000 driver,Wavefront drivers,Maestro3 driver
#   C:AC97 Codec Core,ALI5451 driver,CS46xx driver,EMU10K1/EMU10K2 driver
#   C:ICE1712 driver,Trident driver,YMFPCI driver,PPC PMAC driver
#   C:Common EMU synth,USB generic driver,USB USX2Y
#   F:core/info.c:1.49->1.50 
#   F:core/init.c:1.51->1.52 
#   F:core/pcm.c:1.47->1.48 
#   F:core/pcm_native.c:1.109->1.110 
#   F:core/sgbuf.c:1.8->1.9 
#   F:core/timer.c:1.62->1.63 
#   F:core/ioctl32/ioctl32.c:1.24->1.25 
#   F:core/oss/mixer_oss.c:1.35->1.36 
#   F:core/oss/pcm_oss.c:1.81->1.82 
#   F:core/oss/pcm_plugin.c:1.22->1.23 
#   F:core/oss/route.c:1.9->1.10 
#   F:core/seq/seq_instr.c:1.10->1.11 
#   F:core/seq/seq_memory.c:1.17->1.18 
#   F:core/seq/seq_midi_emul.c:1.12->1.13 
#   F:core/seq/seq_midi_event.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_readq.c:1.10->1.11 
#   F:i2c/cs8427.c:1.21->1.22 
#   F:i2c/l3/uda1341.c:1.13->1.14 
#   F:isa/gus/gus_mem.c:1.10->1.11 
#   F:isa/sb/emu8000_pcm.c:1.15->1.16 
#   F:isa/wavefront/wavefront_fx.c:1.15->1.16 
#   F:pci/maestro3.c:1.64->1.65 
#   F:pci/ac97/ac97_codec.c:1.154->1.155 
#   F:pci/ali5451/ali5451.c:1.58->1.59 
#   F:pci/cs46xx/dsp_spos.c:1.29->1.30 
#   F:pci/emu10k1/emu10k1_main.c:1.41->1.42 
#   F:pci/emu10k1/emupcm.c:1.34->1.35 
#   F:pci/ice1712/ak4xxx.c:1.9->1.10 
#   F:pci/trident/trident_main.c:1.66->1.67 
#   F:pci/ymfpci/ymfpci_main.c:1.60->1.61 
#   F:ppc/pmac.c:1.38->1.39 
#   F:synth/emux/emux.c:1.12->1.13 
#   F:synth/emux/emux_seq.c:1.12->1.13 
#   F:usb/usbaudio.c:1.111->1.112 
#   F:usb/usbmidi.c:1.34->1.35 
#   F:usb/usbmixer.c:1.33->1.34 
#   F:usb/usx2y/usbusx2y.c:1.5->1.6 
#   L:I've cleaned up sound/ directory from 'if (x) {k/v}free(x);' and similar
#   L:constructions. I'm going to to this for most of the kernel if I found
#   L:some time.
#   Signed-off-by: Marcel Sebek <sebek64@post.cz>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/seq/seq_midi_emul.c
#   2004/11/29 07:09:45+01:00 perex@suse.cz +1 -2
#   [ALSA] Clean up of kfree()/vfree() NULL checks
#   
#   D:2004/11/29 14:09:44
#   C:ALSA Core,PCM Midlevel,Memalloc module,Timer Midlevel,IOCTL32 emulation
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer,I2C cs8427
#   C:L3 drivers,GUS Library,EMU8000 driver,Wavefront drivers,Maestro3 driver
#   C:AC97 Codec Core,ALI5451 driver,CS46xx driver,EMU10K1/EMU10K2 driver
#   C:ICE1712 driver,Trident driver,YMFPCI driver,PPC PMAC driver
#   C:Common EMU synth,USB generic driver,USB USX2Y
#   F:core/info.c:1.49->1.50 
#   F:core/init.c:1.51->1.52 
#   F:core/pcm.c:1.47->1.48 
#   F:core/pcm_native.c:1.109->1.110 
#   F:core/sgbuf.c:1.8->1.9 
#   F:core/timer.c:1.62->1.63 
#   F:core/ioctl32/ioctl32.c:1.24->1.25 
#   F:core/oss/mixer_oss.c:1.35->1.36 
#   F:core/oss/pcm_oss.c:1.81->1.82 
#   F:core/oss/pcm_plugin.c:1.22->1.23 
#   F:core/oss/route.c:1.9->1.10 
#   F:core/seq/seq_instr.c:1.10->1.11 
#   F:core/seq/seq_memory.c:1.17->1.18 
#   F:core/seq/seq_midi_emul.c:1.12->1.13 
#   F:core/seq/seq_midi_event.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_readq.c:1.10->1.11 
#   F:i2c/cs8427.c:1.21->1.22 
#   F:i2c/l3/uda1341.c:1.13->1.14 
#   F:isa/gus/gus_mem.c:1.10->1.11 
#   F:isa/sb/emu8000_pcm.c:1.15->1.16 
#   F:isa/wavefront/wavefront_fx.c:1.15->1.16 
#   F:pci/maestro3.c:1.64->1.65 
#   F:pci/ac97/ac97_codec.c:1.154->1.155 
#   F:pci/ali5451/ali5451.c:1.58->1.59 
#   F:pci/cs46xx/dsp_spos.c:1.29->1.30 
#   F:pci/emu10k1/emu10k1_main.c:1.41->1.42 
#   F:pci/emu10k1/emupcm.c:1.34->1.35 
#   F:pci/ice1712/ak4xxx.c:1.9->1.10 
#   F:pci/trident/trident_main.c:1.66->1.67 
#   F:pci/ymfpci/ymfpci_main.c:1.60->1.61 
#   F:ppc/pmac.c:1.38->1.39 
#   F:synth/emux/emux.c:1.12->1.13 
#   F:synth/emux/emux_seq.c:1.12->1.13 
#   F:usb/usbaudio.c:1.111->1.112 
#   F:usb/usbmidi.c:1.34->1.35 
#   F:usb/usbmixer.c:1.33->1.34 
#   F:usb/usx2y/usbusx2y.c:1.5->1.6 
#   L:I've cleaned up sound/ directory from 'if (x) {k/v}free(x);' and similar
#   L:constructions. I'm going to to this for most of the kernel if I found
#   L:some time.
#   Signed-off-by: Marcel Sebek <sebek64@post.cz>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/seq/seq_memory.c
#   2004/11/29 07:09:45+01:00 perex@suse.cz +1 -2
#   [ALSA] Clean up of kfree()/vfree() NULL checks
#   
#   D:2004/11/29 14:09:44
#   C:ALSA Core,PCM Midlevel,Memalloc module,Timer Midlevel,IOCTL32 emulation
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer,I2C cs8427
#   C:L3 drivers,GUS Library,EMU8000 driver,Wavefront drivers,Maestro3 driver
#   C:AC97 Codec Core,ALI5451 driver,CS46xx driver,EMU10K1/EMU10K2 driver
#   C:ICE1712 driver,Trident driver,YMFPCI driver,PPC PMAC driver
#   C:Common EMU synth,USB generic driver,USB USX2Y
#   F:core/info.c:1.49->1.50 
#   F:core/init.c:1.51->1.52 
#   F:core/pcm.c:1.47->1.48 
#   F:core/pcm_native.c:1.109->1.110 
#   F:core/sgbuf.c:1.8->1.9 
#   F:core/timer.c:1.62->1.63 
#   F:core/ioctl32/ioctl32.c:1.24->1.25 
#   F:core/oss/mixer_oss.c:1.35->1.36 
#   F:core/oss/pcm_oss.c:1.81->1.82 
#   F:core/oss/pcm_plugin.c:1.22->1.23 
#   F:core/oss/route.c:1.9->1.10 
#   F:core/seq/seq_instr.c:1.10->1.11 
#   F:core/seq/seq_memory.c:1.17->1.18 
#   F:core/seq/seq_midi_emul.c:1.12->1.13 
#   F:core/seq/seq_midi_event.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_readq.c:1.10->1.11 
#   F:i2c/cs8427.c:1.21->1.22 
#   F:i2c/l3/uda1341.c:1.13->1.14 
#   F:isa/gus/gus_mem.c:1.10->1.11 
#   F:isa/sb/emu8000_pcm.c:1.15->1.16 
#   F:isa/wavefront/wavefront_fx.c:1.15->1.16 
#   F:pci/maestro3.c:1.64->1.65 
#   F:pci/ac97/ac97_codec.c:1.154->1.155 
#   F:pci/ali5451/ali5451.c:1.58->1.59 
#   F:pci/cs46xx/dsp_spos.c:1.29->1.30 
#   F:pci/emu10k1/emu10k1_main.c:1.41->1.42 
#   F:pci/emu10k1/emupcm.c:1.34->1.35 
#   F:pci/ice1712/ak4xxx.c:1.9->1.10 
#   F:pci/trident/trident_main.c:1.66->1.67 
#   F:pci/ymfpci/ymfpci_main.c:1.60->1.61 
#   F:ppc/pmac.c:1.38->1.39 
#   F:synth/emux/emux.c:1.12->1.13 
#   F:synth/emux/emux_seq.c:1.12->1.13 
#   F:usb/usbaudio.c:1.111->1.112 
#   F:usb/usbmidi.c:1.34->1.35 
#   F:usb/usbmixer.c:1.33->1.34 
#   F:usb/usx2y/usbusx2y.c:1.5->1.6 
#   L:I've cleaned up sound/ directory from 'if (x) {k/v}free(x);' and similar
#   L:constructions. I'm going to to this for most of the kernel if I found
#   L:some time.
#   Signed-off-by: Marcel Sebek <sebek64@post.cz>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/seq/seq_instr.c
#   2004/11/29 07:09:45+01:00 perex@suse.cz +0 -2
#   [ALSA] Clean up of kfree()/vfree() NULL checks
#   
#   D:2004/11/29 14:09:44
#   C:ALSA Core,PCM Midlevel,Memalloc module,Timer Midlevel,IOCTL32 emulation
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer,I2C cs8427
#   C:L3 drivers,GUS Library,EMU8000 driver,Wavefront drivers,Maestro3 driver
#   C:AC97 Codec Core,ALI5451 driver,CS46xx driver,EMU10K1/EMU10K2 driver
#   C:ICE1712 driver,Trident driver,YMFPCI driver,PPC PMAC driver
#   C:Common EMU synth,USB generic driver,USB USX2Y
#   F:core/info.c:1.49->1.50 
#   F:core/init.c:1.51->1.52 
#   F:core/pcm.c:1.47->1.48 
#   F:core/pcm_native.c:1.109->1.110 
#   F:core/sgbuf.c:1.8->1.9 
#   F:core/timer.c:1.62->1.63 
#   F:core/ioctl32/ioctl32.c:1.24->1.25 
#   F:core/oss/mixer_oss.c:1.35->1.36 
#   F:core/oss/pcm_oss.c:1.81->1.82 
#   F:core/oss/pcm_plugin.c:1.22->1.23 
#   F:core/oss/route.c:1.9->1.10 
#   F:core/seq/seq_instr.c:1.10->1.11 
#   F:core/seq/seq_memory.c:1.17->1.18 
#   F:core/seq/seq_midi_emul.c:1.12->1.13 
#   F:core/seq/seq_midi_event.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_readq.c:1.10->1.11 
#   F:i2c/cs8427.c:1.21->1.22 
#   F:i2c/l3/uda1341.c:1.13->1.14 
#   F:isa/gus/gus_mem.c:1.10->1.11 
#   F:isa/sb/emu8000_pcm.c:1.15->1.16 
#   F:isa/wavefront/wavefront_fx.c:1.15->1.16 
#   F:pci/maestro3.c:1.64->1.65 
#   F:pci/ac97/ac97_codec.c:1.154->1.155 
#   F:pci/ali5451/ali5451.c:1.58->1.59 
#   F:pci/cs46xx/dsp_spos.c:1.29->1.30 
#   F:pci/emu10k1/emu10k1_main.c:1.41->1.42 
#   F:pci/emu10k1/emupcm.c:1.34->1.35 
#   F:pci/ice1712/ak4xxx.c:1.9->1.10 
#   F:pci/trident/trident_main.c:1.66->1.67 
#   F:pci/ymfpci/ymfpci_main.c:1.60->1.61 
#   F:ppc/pmac.c:1.38->1.39 
#   F:synth/emux/emux.c:1.12->1.13 
#   F:synth/emux/emux_seq.c:1.12->1.13 
#   F:usb/usbaudio.c:1.111->1.112 
#   F:usb/usbmidi.c:1.34->1.35 
#   F:usb/usbmixer.c:1.33->1.34 
#   F:usb/usx2y/usbusx2y.c:1.5->1.6 
#   L:I've cleaned up sound/ directory from 'if (x) {k/v}free(x);' and similar
#   L:constructions. I'm going to to this for most of the kernel if I found
#   L:some time.
#   Signed-off-by: Marcel Sebek <sebek64@post.cz>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/seq/oss/seq_oss_readq.c
#   2004/11/29 07:09:45+01:00 perex@suse.cz +1 -2
#   [ALSA] Clean up of kfree()/vfree() NULL checks
#   
#   D:2004/11/29 14:09:44
#   C:ALSA Core,PCM Midlevel,Memalloc module,Timer Midlevel,IOCTL32 emulation
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer,I2C cs8427
#   C:L3 drivers,GUS Library,EMU8000 driver,Wavefront drivers,Maestro3 driver
#   C:AC97 Codec Core,ALI5451 driver,CS46xx driver,EMU10K1/EMU10K2 driver
#   C:ICE1712 driver,Trident driver,YMFPCI driver,PPC PMAC driver
#   C:Common EMU synth,USB generic driver,USB USX2Y
#   F:core/info.c:1.49->1.50 
#   F:core/init.c:1.51->1.52 
#   F:core/pcm.c:1.47->1.48 
#   F:core/pcm_native.c:1.109->1.110 
#   F:core/sgbuf.c:1.8->1.9 
#   F:core/timer.c:1.62->1.63 
#   F:core/ioctl32/ioctl32.c:1.24->1.25 
#   F:core/oss/mixer_oss.c:1.35->1.36 
#   F:core/oss/pcm_oss.c:1.81->1.82 
#   F:core/oss/pcm_plugin.c:1.22->1.23 
#   F:core/oss/route.c:1.9->1.10 
#   F:core/seq/seq_instr.c:1.10->1.11 
#   F:core/seq/seq_memory.c:1.17->1.18 
#   F:core/seq/seq_midi_emul.c:1.12->1.13 
#   F:core/seq/seq_midi_event.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_readq.c:1.10->1.11 
#   F:i2c/cs8427.c:1.21->1.22 
#   F:i2c/l3/uda1341.c:1.13->1.14 
#   F:isa/gus/gus_mem.c:1.10->1.11 
#   F:isa/sb/emu8000_pcm.c:1.15->1.16 
#   F:isa/wavefront/wavefront_fx.c:1.15->1.16 
#   F:pci/maestro3.c:1.64->1.65 
#   F:pci/ac97/ac97_codec.c:1.154->1.155 
#   F:pci/ali5451/ali5451.c:1.58->1.59 
#   F:pci/cs46xx/dsp_spos.c:1.29->1.30 
#   F:pci/emu10k1/emu10k1_main.c:1.41->1.42 
#   F:pci/emu10k1/emupcm.c:1.34->1.35 
#   F:pci/ice1712/ak4xxx.c:1.9->1.10 
#   F:pci/trident/trident_main.c:1.66->1.67 
#   F:pci/ymfpci/ymfpci_main.c:1.60->1.61 
#   F:ppc/pmac.c:1.38->1.39 
#   F:synth/emux/emux.c:1.12->1.13 
#   F:synth/emux/emux_seq.c:1.12->1.13 
#   F:usb/usbaudio.c:1.111->1.112 
#   F:usb/usbmidi.c:1.34->1.35 
#   F:usb/usbmixer.c:1.33->1.34 
#   F:usb/usx2y/usbusx2y.c:1.5->1.6 
#   L:I've cleaned up sound/ directory from 'if (x) {k/v}free(x);' and similar
#   L:constructions. I'm going to to this for most of the kernel if I found
#   L:some time.
#   Signed-off-by: Marcel Sebek <sebek64@post.cz>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/pcm_native.c
#   2004/11/29 07:09:44+01:00 perex@suse.cz +1 -1
#   [ALSA] Clean up of kfree()/vfree() NULL checks
#   
#   D:2004/11/29 14:09:44
#   C:ALSA Core,PCM Midlevel,Memalloc module,Timer Midlevel,IOCTL32 emulation
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer,I2C cs8427
#   C:L3 drivers,GUS Library,EMU8000 driver,Wavefront drivers,Maestro3 driver
#   C:AC97 Codec Core,ALI5451 driver,CS46xx driver,EMU10K1/EMU10K2 driver
#   C:ICE1712 driver,Trident driver,YMFPCI driver,PPC PMAC driver
#   C:Common EMU synth,USB generic driver,USB USX2Y
#   F:core/info.c:1.49->1.50 
#   F:core/init.c:1.51->1.52 
#   F:core/pcm.c:1.47->1.48 
#   F:core/pcm_native.c:1.109->1.110 
#   F:core/sgbuf.c:1.8->1.9 
#   F:core/timer.c:1.62->1.63 
#   F:core/ioctl32/ioctl32.c:1.24->1.25 
#   F:core/oss/mixer_oss.c:1.35->1.36 
#   F:core/oss/pcm_oss.c:1.81->1.82 
#   F:core/oss/pcm_plugin.c:1.22->1.23 
#   F:core/oss/route.c:1.9->1.10 
#   F:core/seq/seq_instr.c:1.10->1.11 
#   F:core/seq/seq_memory.c:1.17->1.18 
#   F:core/seq/seq_midi_emul.c:1.12->1.13 
#   F:core/seq/seq_midi_event.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_readq.c:1.10->1.11 
#   F:i2c/cs8427.c:1.21->1.22 
#   F:i2c/l3/uda1341.c:1.13->1.14 
#   F:isa/gus/gus_mem.c:1.10->1.11 
#   F:isa/sb/emu8000_pcm.c:1.15->1.16 
#   F:isa/wavefront/wavefront_fx.c:1.15->1.16 
#   F:pci/maestro3.c:1.64->1.65 
#   F:pci/ac97/ac97_codec.c:1.154->1.155 
#   F:pci/ali5451/ali5451.c:1.58->1.59 
#   F:pci/cs46xx/dsp_spos.c:1.29->1.30 
#   F:pci/emu10k1/emu10k1_main.c:1.41->1.42 
#   F:pci/emu10k1/emupcm.c:1.34->1.35 
#   F:pci/ice1712/ak4xxx.c:1.9->1.10 
#   F:pci/trident/trident_main.c:1.66->1.67 
#   F:pci/ymfpci/ymfpci_main.c:1.60->1.61 
#   F:ppc/pmac.c:1.38->1.39 
#   F:synth/emux/emux.c:1.12->1.13 
#   F:synth/emux/emux_seq.c:1.12->1.13 
#   F:usb/usbaudio.c:1.111->1.112 
#   F:usb/usbmidi.c:1.34->1.35 
#   F:usb/usbmixer.c:1.33->1.34 
#   F:usb/usx2y/usbusx2y.c:1.5->1.6 
#   L:I've cleaned up sound/ directory from 'if (x) {k/v}free(x);' and similar
#   L:constructions. I'm going to to this for most of the kernel if I found
#   L:some time.
#   Signed-off-by: Marcel Sebek <sebek64@post.cz>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/pcm.c
#   2004/11/29 07:09:44+01:00 perex@suse.cz +1 -2
#   [ALSA] Clean up of kfree()/vfree() NULL checks
#   
#   D:2004/11/29 14:09:44
#   C:ALSA Core,PCM Midlevel,Memalloc module,Timer Midlevel,IOCTL32 emulation
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer,I2C cs8427
#   C:L3 drivers,GUS Library,EMU8000 driver,Wavefront drivers,Maestro3 driver
#   C:AC97 Codec Core,ALI5451 driver,CS46xx driver,EMU10K1/EMU10K2 driver
#   C:ICE1712 driver,Trident driver,YMFPCI driver,PPC PMAC driver
#   C:Common EMU synth,USB generic driver,USB USX2Y
#   F:core/info.c:1.49->1.50 
#   F:core/init.c:1.51->1.52 
#   F:core/pcm.c:1.47->1.48 
#   F:core/pcm_native.c:1.109->1.110 
#   F:core/sgbuf.c:1.8->1.9 
#   F:core/timer.c:1.62->1.63 
#   F:core/ioctl32/ioctl32.c:1.24->1.25 
#   F:core/oss/mixer_oss.c:1.35->1.36 
#   F:core/oss/pcm_oss.c:1.81->1.82 
#   F:core/oss/pcm_plugin.c:1.22->1.23 
#   F:core/oss/route.c:1.9->1.10 
#   F:core/seq/seq_instr.c:1.10->1.11 
#   F:core/seq/seq_memory.c:1.17->1.18 
#   F:core/seq/seq_midi_emul.c:1.12->1.13 
#   F:core/seq/seq_midi_event.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_readq.c:1.10->1.11 
#   F:i2c/cs8427.c:1.21->1.22 
#   F:i2c/l3/uda1341.c:1.13->1.14 
#   F:isa/gus/gus_mem.c:1.10->1.11 
#   F:isa/sb/emu8000_pcm.c:1.15->1.16 
#   F:isa/wavefront/wavefront_fx.c:1.15->1.16 
#   F:pci/maestro3.c:1.64->1.65 
#   F:pci/ac97/ac97_codec.c:1.154->1.155 
#   F:pci/ali5451/ali5451.c:1.58->1.59 
#   F:pci/cs46xx/dsp_spos.c:1.29->1.30 
#   F:pci/emu10k1/emu10k1_main.c:1.41->1.42 
#   F:pci/emu10k1/emupcm.c:1.34->1.35 
#   F:pci/ice1712/ak4xxx.c:1.9->1.10 
#   F:pci/trident/trident_main.c:1.66->1.67 
#   F:pci/ymfpci/ymfpci_main.c:1.60->1.61 
#   F:ppc/pmac.c:1.38->1.39 
#   F:synth/emux/emux.c:1.12->1.13 
#   F:synth/emux/emux_seq.c:1.12->1.13 
#   F:usb/usbaudio.c:1.111->1.112 
#   F:usb/usbmidi.c:1.34->1.35 
#   F:usb/usbmixer.c:1.33->1.34 
#   F:usb/usx2y/usbusx2y.c:1.5->1.6 
#   L:I've cleaned up sound/ directory from 'if (x) {k/v}free(x);' and similar
#   L:constructions. I'm going to to this for most of the kernel if I found
#   L:some time.
#   Signed-off-by: Marcel Sebek <sebek64@post.cz>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/oss/route.c
#   2004/11/29 07:09:44+01:00 perex@suse.cz +1 -2
#   [ALSA] Clean up of kfree()/vfree() NULL checks
#   
#   D:2004/11/29 14:09:44
#   C:ALSA Core,PCM Midlevel,Memalloc module,Timer Midlevel,IOCTL32 emulation
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer,I2C cs8427
#   C:L3 drivers,GUS Library,EMU8000 driver,Wavefront drivers,Maestro3 driver
#   C:AC97 Codec Core,ALI5451 driver,CS46xx driver,EMU10K1/EMU10K2 driver
#   C:ICE1712 driver,Trident driver,YMFPCI driver,PPC PMAC driver
#   C:Common EMU synth,USB generic driver,USB USX2Y
#   F:core/info.c:1.49->1.50 
#   F:core/init.c:1.51->1.52 
#   F:core/pcm.c:1.47->1.48 
#   F:core/pcm_native.c:1.109->1.110 
#   F:core/sgbuf.c:1.8->1.9 
#   F:core/timer.c:1.62->1.63 
#   F:core/ioctl32/ioctl32.c:1.24->1.25 
#   F:core/oss/mixer_oss.c:1.35->1.36 
#   F:core/oss/pcm_oss.c:1.81->1.82 
#   F:core/oss/pcm_plugin.c:1.22->1.23 
#   F:core/oss/route.c:1.9->1.10 
#   F:core/seq/seq_instr.c:1.10->1.11 
#   F:core/seq/seq_memory.c:1.17->1.18 
#   F:core/seq/seq_midi_emul.c:1.12->1.13 
#   F:core/seq/seq_midi_event.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_readq.c:1.10->1.11 
#   F:i2c/cs8427.c:1.21->1.22 
#   F:i2c/l3/uda1341.c:1.13->1.14 
#   F:isa/gus/gus_mem.c:1.10->1.11 
#   F:isa/sb/emu8000_pcm.c:1.15->1.16 
#   F:isa/wavefront/wavefront_fx.c:1.15->1.16 
#   F:pci/maestro3.c:1.64->1.65 
#   F:pci/ac97/ac97_codec.c:1.154->1.155 
#   F:pci/ali5451/ali5451.c:1.58->1.59 
#   F:pci/cs46xx/dsp_spos.c:1.29->1.30 
#   F:pci/emu10k1/emu10k1_main.c:1.41->1.42 
#   F:pci/emu10k1/emupcm.c:1.34->1.35 
#   F:pci/ice1712/ak4xxx.c:1.9->1.10 
#   F:pci/trident/trident_main.c:1.66->1.67 
#   F:pci/ymfpci/ymfpci_main.c:1.60->1.61 
#   F:ppc/pmac.c:1.38->1.39 
#   F:synth/emux/emux.c:1.12->1.13 
#   F:synth/emux/emux_seq.c:1.12->1.13 
#   F:usb/usbaudio.c:1.111->1.112 
#   F:usb/usbmidi.c:1.34->1.35 
#   F:usb/usbmixer.c:1.33->1.34 
#   F:usb/usx2y/usbusx2y.c:1.5->1.6 
#   L:I've cleaned up sound/ directory from 'if (x) {k/v}free(x);' and similar
#   L:constructions. I'm going to to this for most of the kernel if I found
#   L:some time.
#   Signed-off-by: Marcel Sebek <sebek64@post.cz>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/oss/pcm_plugin.c
#   2004/11/29 07:09:44+01:00 perex@suse.cz +5 -10
#   [ALSA] Clean up of kfree()/vfree() NULL checks
#   
#   D:2004/11/29 14:09:44
#   C:ALSA Core,PCM Midlevel,Memalloc module,Timer Midlevel,IOCTL32 emulation
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer,I2C cs8427
#   C:L3 drivers,GUS Library,EMU8000 driver,Wavefront drivers,Maestro3 driver
#   C:AC97 Codec Core,ALI5451 driver,CS46xx driver,EMU10K1/EMU10K2 driver
#   C:ICE1712 driver,Trident driver,YMFPCI driver,PPC PMAC driver
#   C:Common EMU synth,USB generic driver,USB USX2Y
#   F:core/info.c:1.49->1.50 
#   F:core/init.c:1.51->1.52 
#   F:core/pcm.c:1.47->1.48 
#   F:core/pcm_native.c:1.109->1.110 
#   F:core/sgbuf.c:1.8->1.9 
#   F:core/timer.c:1.62->1.63 
#   F:core/ioctl32/ioctl32.c:1.24->1.25 
#   F:core/oss/mixer_oss.c:1.35->1.36 
#   F:core/oss/pcm_oss.c:1.81->1.82 
#   F:core/oss/pcm_plugin.c:1.22->1.23 
#   F:core/oss/route.c:1.9->1.10 
#   F:core/seq/seq_instr.c:1.10->1.11 
#   F:core/seq/seq_memory.c:1.17->1.18 
#   F:core/seq/seq_midi_emul.c:1.12->1.13 
#   F:core/seq/seq_midi_event.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_readq.c:1.10->1.11 
#   F:i2c/cs8427.c:1.21->1.22 
#   F:i2c/l3/uda1341.c:1.13->1.14 
#   F:isa/gus/gus_mem.c:1.10->1.11 
#   F:isa/sb/emu8000_pcm.c:1.15->1.16 
#   F:isa/wavefront/wavefront_fx.c:1.15->1.16 
#   F:pci/maestro3.c:1.64->1.65 
#   F:pci/ac97/ac97_codec.c:1.154->1.155 
#   F:pci/ali5451/ali5451.c:1.58->1.59 
#   F:pci/cs46xx/dsp_spos.c:1.29->1.30 
#   F:pci/emu10k1/emu10k1_main.c:1.41->1.42 
#   F:pci/emu10k1/emupcm.c:1.34->1.35 
#   F:pci/ice1712/ak4xxx.c:1.9->1.10 
#   F:pci/trident/trident_main.c:1.66->1.67 
#   F:pci/ymfpci/ymfpci_main.c:1.60->1.61 
#   F:ppc/pmac.c:1.38->1.39 
#   F:synth/emux/emux.c:1.12->1.13 
#   F:synth/emux/emux_seq.c:1.12->1.13 
#   F:usb/usbaudio.c:1.111->1.112 
#   F:usb/usbmidi.c:1.34->1.35 
#   F:usb/usbmixer.c:1.33->1.34 
#   F:usb/usx2y/usbusx2y.c:1.5->1.6 
#   L:I've cleaned up sound/ directory from 'if (x) {k/v}free(x);' and similar
#   L:constructions. I'm going to to this for most of the kernel if I found
#   L:some time.
#   Signed-off-by: Marcel Sebek <sebek64@post.cz>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/oss/pcm_oss.c
#   2004/11/29 07:09:44+01:00 perex@suse.cz +5 -10
#   [ALSA] Clean up of kfree()/vfree() NULL checks
#   
#   D:2004/11/29 14:09:44
#   C:ALSA Core,PCM Midlevel,Memalloc module,Timer Midlevel,IOCTL32 emulation
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer,I2C cs8427
#   C:L3 drivers,GUS Library,EMU8000 driver,Wavefront drivers,Maestro3 driver
#   C:AC97 Codec Core,ALI5451 driver,CS46xx driver,EMU10K1/EMU10K2 driver
#   C:ICE1712 driver,Trident driver,YMFPCI driver,PPC PMAC driver
#   C:Common EMU synth,USB generic driver,USB USX2Y
#   F:core/info.c:1.49->1.50 
#   F:core/init.c:1.51->1.52 
#   F:core/pcm.c:1.47->1.48 
#   F:core/pcm_native.c:1.109->1.110 
#   F:core/sgbuf.c:1.8->1.9 
#   F:core/timer.c:1.62->1.63 
#   F:core/ioctl32/ioctl32.c:1.24->1.25 
#   F:core/oss/mixer_oss.c:1.35->1.36 
#   F:core/oss/pcm_oss.c:1.81->1.82 
#   F:core/oss/pcm_plugin.c:1.22->1.23 
#   F:core/oss/route.c:1.9->1.10 
#   F:core/seq/seq_instr.c:1.10->1.11 
#   F:core/seq/seq_memory.c:1.17->1.18 
#   F:core/seq/seq_midi_emul.c:1.12->1.13 
#   F:core/seq/seq_midi_event.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_readq.c:1.10->1.11 
#   F:i2c/cs8427.c:1.21->1.22 
#   F:i2c/l3/uda1341.c:1.13->1.14 
#   F:isa/gus/gus_mem.c:1.10->1.11 
#   F:isa/sb/emu8000_pcm.c:1.15->1.16 
#   F:isa/wavefront/wavefront_fx.c:1.15->1.16 
#   F:pci/maestro3.c:1.64->1.65 
#   F:pci/ac97/ac97_codec.c:1.154->1.155 
#   F:pci/ali5451/ali5451.c:1.58->1.59 
#   F:pci/cs46xx/dsp_spos.c:1.29->1.30 
#   F:pci/emu10k1/emu10k1_main.c:1.41->1.42 
#   F:pci/emu10k1/emupcm.c:1.34->1.35 
#   F:pci/ice1712/ak4xxx.c:1.9->1.10 
#   F:pci/trident/trident_main.c:1.66->1.67 
#   F:pci/ymfpci/ymfpci_main.c:1.60->1.61 
#   F:ppc/pmac.c:1.38->1.39 
#   F:synth/emux/emux.c:1.12->1.13 
#   F:synth/emux/emux_seq.c:1.12->1.13 
#   F:usb/usbaudio.c:1.111->1.112 
#   F:usb/usbmidi.c:1.34->1.35 
#   F:usb/usbmixer.c:1.33->1.34 
#   F:usb/usx2y/usbusx2y.c:1.5->1.6 
#   L:I've cleaned up sound/ directory from 'if (x) {k/v}free(x);' and similar
#   L:constructions. I'm going to to this for most of the kernel if I found
#   L:some time.
#   Signed-off-by: Marcel Sebek <sebek64@post.cz>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/oss/mixer_oss.c
#   2004/11/29 07:09:44+01:00 perex@suse.cz +12 -24
#   [ALSA] Clean up of kfree()/vfree() NULL checks
#   
#   D:2004/11/29 14:09:44
#   C:ALSA Core,PCM Midlevel,Memalloc module,Timer Midlevel,IOCTL32 emulation
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer,I2C cs8427
#   C:L3 drivers,GUS Library,EMU8000 driver,Wavefront drivers,Maestro3 driver
#   C:AC97 Codec Core,ALI5451 driver,CS46xx driver,EMU10K1/EMU10K2 driver
#   C:ICE1712 driver,Trident driver,YMFPCI driver,PPC PMAC driver
#   C:Common EMU synth,USB generic driver,USB USX2Y
#   F:core/info.c:1.49->1.50 
#   F:core/init.c:1.51->1.52 
#   F:core/pcm.c:1.47->1.48 
#   F:core/pcm_native.c:1.109->1.110 
#   F:core/sgbuf.c:1.8->1.9 
#   F:core/timer.c:1.62->1.63 
#   F:core/ioctl32/ioctl32.c:1.24->1.25 
#   F:core/oss/mixer_oss.c:1.35->1.36 
#   F:core/oss/pcm_oss.c:1.81->1.82 
#   F:core/oss/pcm_plugin.c:1.22->1.23 
#   F:core/oss/route.c:1.9->1.10 
#   F:core/seq/seq_instr.c:1.10->1.11 
#   F:core/seq/seq_memory.c:1.17->1.18 
#   F:core/seq/seq_midi_emul.c:1.12->1.13 
#   F:core/seq/seq_midi_event.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_readq.c:1.10->1.11 
#   F:i2c/cs8427.c:1.21->1.22 
#   F:i2c/l3/uda1341.c:1.13->1.14 
#   F:isa/gus/gus_mem.c:1.10->1.11 
#   F:isa/sb/emu8000_pcm.c:1.15->1.16 
#   F:isa/wavefront/wavefront_fx.c:1.15->1.16 
#   F:pci/maestro3.c:1.64->1.65 
#   F:pci/ac97/ac97_codec.c:1.154->1.155 
#   F:pci/ali5451/ali5451.c:1.58->1.59 
#   F:pci/cs46xx/dsp_spos.c:1.29->1.30 
#   F:pci/emu10k1/emu10k1_main.c:1.41->1.42 
#   F:pci/emu10k1/emupcm.c:1.34->1.35 
#   F:pci/ice1712/ak4xxx.c:1.9->1.10 
#   F:pci/trident/trident_main.c:1.66->1.67 
#   F:pci/ymfpci/ymfpci_main.c:1.60->1.61 
#   F:ppc/pmac.c:1.38->1.39 
#   F:synth/emux/emux.c:1.12->1.13 
#   F:synth/emux/emux_seq.c:1.12->1.13 
#   F:usb/usbaudio.c:1.111->1.112 
#   F:usb/usbmidi.c:1.34->1.35 
#   F:usb/usbmixer.c:1.33->1.34 
#   F:usb/usx2y/usbusx2y.c:1.5->1.6 
#   L:I've cleaned up sound/ directory from 'if (x) {k/v}free(x);' and similar
#   L:constructions. I'm going to to this for most of the kernel if I found
#   L:some time.
#   Signed-off-by: Marcel Sebek <sebek64@post.cz>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/ioctl32/ioctl32.c
#   2004/11/29 07:09:44+01:00 perex@suse.cz +1 -2
#   [ALSA] Clean up of kfree()/vfree() NULL checks
#   
#   D:2004/11/29 14:09:44
#   C:ALSA Core,PCM Midlevel,Memalloc module,Timer Midlevel,IOCTL32 emulation
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer,I2C cs8427
#   C:L3 drivers,GUS Library,EMU8000 driver,Wavefront drivers,Maestro3 driver
#   C:AC97 Codec Core,ALI5451 driver,CS46xx driver,EMU10K1/EMU10K2 driver
#   C:ICE1712 driver,Trident driver,YMFPCI driver,PPC PMAC driver
#   C:Common EMU synth,USB generic driver,USB USX2Y
#   F:core/info.c:1.49->1.50 
#   F:core/init.c:1.51->1.52 
#   F:core/pcm.c:1.47->1.48 
#   F:core/pcm_native.c:1.109->1.110 
#   F:core/sgbuf.c:1.8->1.9 
#   F:core/timer.c:1.62->1.63 
#   F:core/ioctl32/ioctl32.c:1.24->1.25 
#   F:core/oss/mixer_oss.c:1.35->1.36 
#   F:core/oss/pcm_oss.c:1.81->1.82 
#   F:core/oss/pcm_plugin.c:1.22->1.23 
#   F:core/oss/route.c:1.9->1.10 
#   F:core/seq/seq_instr.c:1.10->1.11 
#   F:core/seq/seq_memory.c:1.17->1.18 
#   F:core/seq/seq_midi_emul.c:1.12->1.13 
#   F:core/seq/seq_midi_event.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_readq.c:1.10->1.11 
#   F:i2c/cs8427.c:1.21->1.22 
#   F:i2c/l3/uda1341.c:1.13->1.14 
#   F:isa/gus/gus_mem.c:1.10->1.11 
#   F:isa/sb/emu8000_pcm.c:1.15->1.16 
#   F:isa/wavefront/wavefront_fx.c:1.15->1.16 
#   F:pci/maestro3.c:1.64->1.65 
#   F:pci/ac97/ac97_codec.c:1.154->1.155 
#   F:pci/ali5451/ali5451.c:1.58->1.59 
#   F:pci/cs46xx/dsp_spos.c:1.29->1.30 
#   F:pci/emu10k1/emu10k1_main.c:1.41->1.42 
#   F:pci/emu10k1/emupcm.c:1.34->1.35 
#   F:pci/ice1712/ak4xxx.c:1.9->1.10 
#   F:pci/trident/trident_main.c:1.66->1.67 
#   F:pci/ymfpci/ymfpci_main.c:1.60->1.61 
#   F:ppc/pmac.c:1.38->1.39 
#   F:synth/emux/emux.c:1.12->1.13 
#   F:synth/emux/emux_seq.c:1.12->1.13 
#   F:usb/usbaudio.c:1.111->1.112 
#   F:usb/usbmidi.c:1.34->1.35 
#   F:usb/usbmixer.c:1.33->1.34 
#   F:usb/usx2y/usbusx2y.c:1.5->1.6 
#   L:I've cleaned up sound/ directory from 'if (x) {k/v}free(x);' and similar
#   L:constructions. I'm going to to this for most of the kernel if I found
#   L:some time.
#   Signed-off-by: Marcel Sebek <sebek64@post.cz>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/init.c
#   2004/11/29 07:09:44+01:00 perex@suse.cz +2 -3
#   [ALSA] Clean up of kfree()/vfree() NULL checks
#   
#   D:2004/11/29 14:09:44
#   C:ALSA Core,PCM Midlevel,Memalloc module,Timer Midlevel,IOCTL32 emulation
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer,I2C cs8427
#   C:L3 drivers,GUS Library,EMU8000 driver,Wavefront drivers,Maestro3 driver
#   C:AC97 Codec Core,ALI5451 driver,CS46xx driver,EMU10K1/EMU10K2 driver
#   C:ICE1712 driver,Trident driver,YMFPCI driver,PPC PMAC driver
#   C:Common EMU synth,USB generic driver,USB USX2Y
#   F:core/info.c:1.49->1.50 
#   F:core/init.c:1.51->1.52 
#   F:core/pcm.c:1.47->1.48 
#   F:core/pcm_native.c:1.109->1.110 
#   F:core/sgbuf.c:1.8->1.9 
#   F:core/timer.c:1.62->1.63 
#   F:core/ioctl32/ioctl32.c:1.24->1.25 
#   F:core/oss/mixer_oss.c:1.35->1.36 
#   F:core/oss/pcm_oss.c:1.81->1.82 
#   F:core/oss/pcm_plugin.c:1.22->1.23 
#   F:core/oss/route.c:1.9->1.10 
#   F:core/seq/seq_instr.c:1.10->1.11 
#   F:core/seq/seq_memory.c:1.17->1.18 
#   F:core/seq/seq_midi_emul.c:1.12->1.13 
#   F:core/seq/seq_midi_event.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_readq.c:1.10->1.11 
#   F:i2c/cs8427.c:1.21->1.22 
#   F:i2c/l3/uda1341.c:1.13->1.14 
#   F:isa/gus/gus_mem.c:1.10->1.11 
#   F:isa/sb/emu8000_pcm.c:1.15->1.16 
#   F:isa/wavefront/wavefront_fx.c:1.15->1.16 
#   F:pci/maestro3.c:1.64->1.65 
#   F:pci/ac97/ac97_codec.c:1.154->1.155 
#   F:pci/ali5451/ali5451.c:1.58->1.59 
#   F:pci/cs46xx/dsp_spos.c:1.29->1.30 
#   F:pci/emu10k1/emu10k1_main.c:1.41->1.42 
#   F:pci/emu10k1/emupcm.c:1.34->1.35 
#   F:pci/ice1712/ak4xxx.c:1.9->1.10 
#   F:pci/trident/trident_main.c:1.66->1.67 
#   F:pci/ymfpci/ymfpci_main.c:1.60->1.61 
#   F:ppc/pmac.c:1.38->1.39 
#   F:synth/emux/emux.c:1.12->1.13 
#   F:synth/emux/emux_seq.c:1.12->1.13 
#   F:usb/usbaudio.c:1.111->1.112 
#   F:usb/usbmidi.c:1.34->1.35 
#   F:usb/usbmixer.c:1.33->1.34 
#   F:usb/usx2y/usbusx2y.c:1.5->1.6 
#   L:I've cleaned up sound/ directory from 'if (x) {k/v}free(x);' and similar
#   L:constructions. I'm going to to this for most of the kernel if I found
#   L:some time.
#   Signed-off-by: Marcel Sebek <sebek64@post.cz>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/info.c
#   2004/11/29 07:09:44+01:00 perex@suse.cz +1 -2
#   [ALSA] Clean up of kfree()/vfree() NULL checks
#   
#   D:2004/11/29 14:09:44
#   C:ALSA Core,PCM Midlevel,Memalloc module,Timer Midlevel,IOCTL32 emulation
#   C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer,I2C cs8427
#   C:L3 drivers,GUS Library,EMU8000 driver,Wavefront drivers,Maestro3 driver
#   C:AC97 Codec Core,ALI5451 driver,CS46xx driver,EMU10K1/EMU10K2 driver
#   C:ICE1712 driver,Trident driver,YMFPCI driver,PPC PMAC driver
#   C:Common EMU synth,USB generic driver,USB USX2Y
#   F:core/info.c:1.49->1.50 
#   F:core/init.c:1.51->1.52 
#   F:core/pcm.c:1.47->1.48 
#   F:core/pcm_native.c:1.109->1.110 
#   F:core/sgbuf.c:1.8->1.9 
#   F:core/timer.c:1.62->1.63 
#   F:core/ioctl32/ioctl32.c:1.24->1.25 
#   F:core/oss/mixer_oss.c:1.35->1.36 
#   F:core/oss/pcm_oss.c:1.81->1.82 
#   F:core/oss/pcm_plugin.c:1.22->1.23 
#   F:core/oss/route.c:1.9->1.10 
#   F:core/seq/seq_instr.c:1.10->1.11 
#   F:core/seq/seq_memory.c:1.17->1.18 
#   F:core/seq/seq_midi_emul.c:1.12->1.13 
#   F:core/seq/seq_midi_event.c:1.13->1.14 
#   F:core/seq/oss/seq_oss_readq.c:1.10->1.11 
#   F:i2c/cs8427.c:1.21->1.22 
#   F:i2c/l3/uda1341.c:1.13->1.14 
#   F:isa/gus/gus_mem.c:1.10->1.11 
#   F:isa/sb/emu8000_pcm.c:1.15->1.16 
#   F:isa/wavefront/wavefront_fx.c:1.15->1.16 
#   F:pci/maestro3.c:1.64->1.65 
#   F:pci/ac97/ac97_codec.c:1.154->1.155 
#   F:pci/ali5451/ali5451.c:1.58->1.59 
#   F:pci/cs46xx/dsp_spos.c:1.29->1.30 
#   F:pci/emu10k1/emu10k1_main.c:1.41->1.42 
#   F:pci/emu10k1/emupcm.c:1.34->1.35 
#   F:pci/ice1712/ak4xxx.c:1.9->1.10 
#   F:pci/trident/trident_main.c:1.66->1.67 
#   F:pci/ymfpci/ymfpci_main.c:1.60->1.61 
#   F:ppc/pmac.c:1.38->1.39 
#   F:synth/emux/emux.c:1.12->1.13 
#   F:synth/emux/emux_seq.c:1.12->1.13 
#   F:usb/usbaudio.c:1.111->1.112 
#   F:usb/usbmidi.c:1.34->1.35 
#   F:usb/usbmixer.c:1.33->1.34 
#   F:usb/usx2y/usbusx2y.c:1.5->1.6 
#   L:I've cleaned up sound/ directory from 'if (x) {k/v}free(x);' and similar
#   L:constructions. I'm going to to this for most of the kernel if I found
#   L:some time.
#   Signed-off-by: Marcel Sebek <sebek64@post.cz>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2004/12/21 14:50:34+01:00 perex@suse.cz 
#   [ALSA] Fix ioctl32 wrapper (for SPARC)
#   
#   IOCTL32 emulation
#   Fix ioctl32 wrapper design, using compat_alloc_user_space() now.
#   This will fix the crash on SPARC64.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/ioctl32/timer32.c
#   2004/11/29 05:13:51+01:00 perex@suse.cz +5 -5
#   [ALSA] Fix ioctl32 wrapper (for SPARC)
#   
#   D:2004/11/29 12:13:51
#   C:IOCTL32 emulation
#   F:core/ioctl32/hwdep32.c:1.9->1.10 
#   F:core/ioctl32/ioctl32.c:1.23->1.24 
#   F:core/ioctl32/ioctl32.h:1.16->1.17 
#   F:core/ioctl32/pcm32.c:1.22->1.23 
#   F:core/ioctl32/rawmidi32.c:1.7->1.8 
#   F:core/ioctl32/seq32.c:1.6->1.7 
#   F:core/ioctl32/timer32.c:1.8->1.9 
#   L:Fix ioctl32 wrapper design, using compat_alloc_user_space() now.
#   L:This will fix the crash on SPARC64.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/ioctl32/seq32.c
#   2004/11/29 05:13:51+01:00 perex@suse.cz +4 -2
#   [ALSA] Fix ioctl32 wrapper (for SPARC)
#   
#   D:2004/11/29 12:13:51
#   C:IOCTL32 emulation
#   F:core/ioctl32/hwdep32.c:1.9->1.10 
#   F:core/ioctl32/ioctl32.c:1.23->1.24 
#   F:core/ioctl32/ioctl32.h:1.16->1.17 
#   F:core/ioctl32/pcm32.c:1.22->1.23 
#   F:core/ioctl32/rawmidi32.c:1.7->1.8 
#   F:core/ioctl32/seq32.c:1.6->1.7 
#   F:core/ioctl32/timer32.c:1.8->1.9 
#   L:Fix ioctl32 wrapper design, using compat_alloc_user_space() now.
#   L:This will fix the crash on SPARC64.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/ioctl32/rawmidi32.c
#   2004/11/29 05:13:51+01:00 perex@suse.cz +9 -7
#   [ALSA] Fix ioctl32 wrapper (for SPARC)
#   
#   D:2004/11/29 12:13:51
#   C:IOCTL32 emulation
#   F:core/ioctl32/hwdep32.c:1.9->1.10 
#   F:core/ioctl32/ioctl32.c:1.23->1.24 
#   F:core/ioctl32/ioctl32.h:1.16->1.17 
#   F:core/ioctl32/pcm32.c:1.22->1.23 
#   F:core/ioctl32/rawmidi32.c:1.7->1.8 
#   F:core/ioctl32/seq32.c:1.6->1.7 
#   F:core/ioctl32/timer32.c:1.8->1.9 
#   L:Fix ioctl32 wrapper design, using compat_alloc_user_space() now.
#   L:This will fix the crash on SPARC64.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/ioctl32/pcm32.c
#   2004/11/29 05:13:51+01:00 perex@suse.cz +107 -226
#   [ALSA] Fix ioctl32 wrapper (for SPARC)
#   
#   D:2004/11/29 12:13:51
#   C:IOCTL32 emulation
#   F:core/ioctl32/hwdep32.c:1.9->1.10 
#   F:core/ioctl32/ioctl32.c:1.23->1.24 
#   F:core/ioctl32/ioctl32.h:1.16->1.17 
#   F:core/ioctl32/pcm32.c:1.22->1.23 
#   F:core/ioctl32/rawmidi32.c:1.7->1.8 
#   F:core/ioctl32/seq32.c:1.6->1.7 
#   F:core/ioctl32/timer32.c:1.8->1.9 
#   L:Fix ioctl32 wrapper design, using compat_alloc_user_space() now.
#   L:This will fix the crash on SPARC64.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/ioctl32/ioctl32.h
#   2004/11/29 05:13:51+01:00 perex@suse.cz +29 -58
#   [ALSA] Fix ioctl32 wrapper (for SPARC)
#   
#   D:2004/11/29 12:13:51
#   C:IOCTL32 emulation
#   F:core/ioctl32/hwdep32.c:1.9->1.10 
#   F:core/ioctl32/ioctl32.c:1.23->1.24 
#   F:core/ioctl32/ioctl32.h:1.16->1.17 
#   F:core/ioctl32/pcm32.c:1.22->1.23 
#   F:core/ioctl32/rawmidi32.c:1.7->1.8 
#   F:core/ioctl32/seq32.c:1.6->1.7 
#   F:core/ioctl32/timer32.c:1.8->1.9 
#   L:Fix ioctl32 wrapper design, using compat_alloc_user_space() now.
#   L:This will fix the crash on SPARC64.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/ioctl32/ioctl32.c
#   2004/11/29 05:13:51+01:00 perex@suse.cz +173 -137
#   [ALSA] Fix ioctl32 wrapper (for SPARC)
#   
#   D:2004/11/29 12:13:51
#   C:IOCTL32 emulation
#   F:core/ioctl32/hwdep32.c:1.9->1.10 
#   F:core/ioctl32/ioctl32.c:1.23->1.24 
#   F:core/ioctl32/ioctl32.h:1.16->1.17 
#   F:core/ioctl32/pcm32.c:1.22->1.23 
#   F:core/ioctl32/rawmidi32.c:1.7->1.8 
#   F:core/ioctl32/seq32.c:1.6->1.7 
#   F:core/ioctl32/timer32.c:1.8->1.9 
#   L:Fix ioctl32 wrapper design, using compat_alloc_user_space() now.
#   L:This will fix the crash on SPARC64.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/ioctl32/hwdep32.c
#   2004/11/29 05:13:51+01:00 perex@suse.cz +16 -16
#   [ALSA] Fix ioctl32 wrapper (for SPARC)
#   
#   D:2004/11/29 12:13:51
#   C:IOCTL32 emulation
#   F:core/ioctl32/hwdep32.c:1.9->1.10 
#   F:core/ioctl32/ioctl32.c:1.23->1.24 
#   F:core/ioctl32/ioctl32.h:1.16->1.17 
#   F:core/ioctl32/pcm32.c:1.22->1.23 
#   F:core/ioctl32/rawmidi32.c:1.7->1.8 
#   F:core/ioctl32/seq32.c:1.6->1.7 
#   F:core/ioctl32/timer32.c:1.8->1.9 
#   L:Fix ioctl32 wrapper design, using compat_alloc_user_space() now.
#   L:This will fix the crash on SPARC64.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2004/12/21 14:49:25+01:00 perex@suse.cz 
#   [ALSA] Export functions for ioctl32 wrapper
#   
#   Control Midlevel,PCM Midlevel,ALSA Core
#   Export some functions to access from ioctl32 wrapper.
#   This will reduce the memory footprint (doublly kmalloc's for the same
#   ioctl records).
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/sound.c
#   2004/11/29 05:12:05+01:00 perex@suse.cz +4 -0
#   [ALSA] Export functions for ioctl32 wrapper
#   
#   D:2004/11/29 12:12:05
#   C:Control Midlevel,PCM Midlevel,ALSA Core
#   F:core/control.c:1.48->1.49 
#   F:core/pcm_lib.c:1.58->1.59 
#   F:core/pcm_native.c:1.108->1.109 
#   F:core/sound.c:1.67->1.68 
#   F:include/control.h:1.8->1.9 
#   F:include/pcm.h:1.50->1.51 
#   L:Export some functions to access from ioctl32 wrapper.
#   L:This will reduce the memory footprint (doublly kmalloc's for the same
#   L:ioctl records).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/pcm_native.c
#   2004/11/29 05:12:05+01:00 perex@suse.cz +2 -2
#   [ALSA] Export functions for ioctl32 wrapper
#   
#   D:2004/11/29 12:12:05
#   C:Control Midlevel,PCM Midlevel,ALSA Core
#   F:core/control.c:1.48->1.49 
#   F:core/pcm_lib.c:1.58->1.59 
#   F:core/pcm_native.c:1.108->1.109 
#   F:core/sound.c:1.67->1.68 
#   F:include/control.h:1.8->1.9 
#   F:include/pcm.h:1.50->1.51 
#   L:Export some functions to access from ioctl32 wrapper.
#   L:This will reduce the memory footprint (doublly kmalloc's for the same
#   L:ioctl records).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/pcm_lib.c
#   2004/11/29 05:12:05+01:00 perex@suse.cz +1 -0
#   [ALSA] Export functions for ioctl32 wrapper
#   
#   D:2004/11/29 12:12:05
#   C:Control Midlevel,PCM Midlevel,ALSA Core
#   F:core/control.c:1.48->1.49 
#   F:core/pcm_lib.c:1.58->1.59 
#   F:core/pcm_native.c:1.108->1.109 
#   F:core/sound.c:1.67->1.68 
#   F:include/control.h:1.8->1.9 
#   F:include/pcm.h:1.50->1.51 
#   L:Export some functions to access from ioctl32 wrapper.
#   L:This will reduce the memory footprint (doublly kmalloc's for the same
#   L:ioctl records).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/control.c
#   2004/11/29 05:12:05+01:00 perex@suse.cz +40 -22
#   [ALSA] Export functions for ioctl32 wrapper
#   
#   D:2004/11/29 12:12:05
#   C:Control Midlevel,PCM Midlevel,ALSA Core
#   F:core/control.c:1.48->1.49 
#   F:core/pcm_lib.c:1.58->1.59 
#   F:core/pcm_native.c:1.108->1.109 
#   F:core/sound.c:1.67->1.68 
#   F:include/control.h:1.8->1.9 
#   F:include/pcm.h:1.50->1.51 
#   L:Export some functions to access from ioctl32 wrapper.
#   L:This will reduce the memory footprint (doublly kmalloc's for the same
#   L:ioctl records).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# include/sound/pcm.h
#   2004/11/29 05:12:05+01:00 perex@suse.cz +1 -0
#   [ALSA] Export functions for ioctl32 wrapper
#   
#   D:2004/11/29 12:12:05
#   C:Control Midlevel,PCM Midlevel,ALSA Core
#   F:core/control.c:1.48->1.49 
#   F:core/pcm_lib.c:1.58->1.59 
#   F:core/pcm_native.c:1.108->1.109 
#   F:core/sound.c:1.67->1.68 
#   F:include/control.h:1.8->1.9 
#   F:include/pcm.h:1.50->1.51 
#   L:Export some functions to access from ioctl32 wrapper.
#   L:This will reduce the memory footprint (doublly kmalloc's for the same
#   L:ioctl records).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# include/sound/control.h
#   2004/11/29 05:12:05+01:00 perex@suse.cz +4 -0
#   [ALSA] Export functions for ioctl32 wrapper
#   
#   D:2004/11/29 12:12:05
#   C:Control Midlevel,PCM Midlevel,ALSA Core
#   F:core/control.c:1.48->1.49 
#   F:core/pcm_lib.c:1.58->1.59 
#   F:core/pcm_native.c:1.108->1.109 
#   F:core/sound.c:1.67->1.68 
#   F:include/control.h:1.8->1.9 
#   F:include/pcm.h:1.50->1.51 
#   L:Export some functions to access from ioctl32 wrapper.
#   L:This will reduce the memory footprint (doublly kmalloc's for the same
#   L:ioctl records).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2004/12/21 14:47:55+01:00 perex@suse.cz 
#   [ALSA] Fix compilation without CONFIG_PM
#   
#   AC97 Codec Core
#   Fixed the compilation without CONFIG_PM.
#   The resume callback is built only with CONFIG_PM.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ac97/ac97_patch.c
#   2004/11/29 04:36:56+01:00 perex@suse.cz +16 -0
#   [ALSA] Fix compilation without CONFIG_PM
#   
#   D:2004/11/29 11:36:56
#   C:AC97 Codec Core
#   F:include/ac97_codec.h:1.57->1.58 
#   F:pci/ac97/ac97_patch.c:1.61->1.62 
#   L:Fixed the compilation without CONFIG_PM.
#   L:The resume callback is built only with CONFIG_PM.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# include/sound/ac97_codec.h
#   2004/11/29 04:36:56+01:00 perex@suse.cz +2 -0
#   [ALSA] Fix compilation without CONFIG_PM
#   
#   D:2004/11/29 11:36:56
#   C:AC97 Codec Core
#   F:include/ac97_codec.h:1.57->1.58 
#   F:pci/ac97/ac97_patch.c:1.61->1.62 
#   L:Fixed the compilation without CONFIG_PM.
#   L:The resume callback is built only with CONFIG_PM.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2004/12/21 11:32:36+00:00 abem.se@shinybook.infradead.org 
#   JFFS2: Fix list corruption and memory leak on write retry.
#   
#   Reported by Per Hedblom <per.hedblom@abem.se>
#   
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# fs/jffs2/gc.c
#   2004/12/21 11:32:21+00:00 abem.se@shinybook.infradead.org +2 -2
#   revision 1.144
#   date: 2004/12/21 11:18:50;  author: dwmw2;  state: Exp;  lines: +2 -2
#   Fix list-corrupting typo in write retry. Thanks to Per Hedblom
# 
# ChangeSet
#   2004/12/21 11:28:46+00:00 dmarlin@redhat.com 
#   JFFS2: Fix freeing of block table on mount failure.
#   
#   We weren't correctly using vfree() where appropriate in the error case.
#   
#   Signed-off-by: David Marlin <dmarlin@redhat.com>
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# fs/jffs2/build.c
#   2004/12/21 11:28:32+00:00 dmarlin@redhat.com +6 -2
#   revision 1.69
#   date: 2004/12/16 20:22:18;  author: dmarlin;  state: Exp;  lines: +6 -2
#   Perform vfree if MTD_NO_VIRTBLOCKS is used.
# 
# ChangeSet
#   2004/12/21 11:26:03+00:00 jarkko.lavinen@nokia.com 
#   MTD: Make nand_write_page() ECC buffer size consistent with nand_read_ecc()
#   
#   We already increased it to 12 because we were overrunning the buffer. 
#   Increase it again to be consistent with the 32 bytes we use elsewhere.
#   
#     Signed-off-by: Jarkko Lavinen <Jarkko.Lavinen@nokia.com>
#     Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# drivers/mtd/nand/nand_base.c
#   2004/12/21 11:25:49+00:00 jarkko.lavinen@nokia.com +2 -2
#   revision 1.126
#   date: 2004/12/13 11:22:25;  author: lavinen;  state: Exp;  lines: +2 -2
#   Use 32 ecc bytes in nand_write_page(), similar to nand_read_ec().
# 
# ChangeSet
#   2004/12/21 11:22:51+00:00 nico@cam.org 
#   MTD: Fix optimisation which breaks with newer Intel L18 flash chips.
#   
#   Increase region info and chip instance independently from each other.
#   Someone tried to be clever with chip masking here...
#   But it breaks with L18 flash where the chip structures are "virtual"
#   chips not real ones.
#   
#   Signed-off-by: Nicolas Pitre <nico@cam.org>
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# drivers/mtd/chips/cfi_util.c
#   2004/12/21 11:22:36+00:00 nico@cam.org +3 -4
#   revision 1.8
#   date: 2004/12/14 19:55:56;  author: nico;  state: Exp;  lines: +3 -4
#   Increase region info and chip instance independently from each other.
#   Someone tried to be clever with chip masking here...
#   But it breaks with L18 flash where the chip structures are "virtual"
#   chips not real ones.
# 
# ChangeSet
#   2004/12/20 21:58:46-05:00 len.brown@intel.com 
#   Merge intel.com:/home/lenb/src/26-stable-dev
#   into intel.com:/home/lenb/src/26-latest-dev
# 
# include/asm-i386/acpi.h
#   2004/12/20 21:58:42-05:00 len.brown@intel.com +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/12/20 17:25:07-08:00 greg@kroah.com 
#   USB Gadget: fix up simple sparse warnings (NULL stuff) in dummy_hcd.c driver
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/gadget/dummy_hcd.c
#   2004/12/20 17:24:38-08:00 greg@kroah.com +13 -13
#   USB Gadget: fix up simple sparse warnings (NULL stuff) in dummy_hcd.c driver
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# ChangeSet
#   2004/12/20 17:15:36-08:00 greg@kroah.com 
#   USB: change wMaxPacketSize field in struct usb_config_descriptor to be __le16
#     
#   Yet another step in the quest to get all USB data structures to be native
#   endian.
#     
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# sound/usb/usx2y/usbusx2yaudio.c
#   2004/12/20 17:15:10-08:00 greg@kroah.com +2 -2
#   USB: change wMaxPacketSize field in struct usb_config_descriptor to be __le16
#     
#   Yet another step in the quest to get all USB data structures to be native
#   endian.
#     
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# sound/usb/usbaudio.c
#   2004/12/20 17:15:10-08:00 greg@kroah.com +4 -4
#   USB: change wMaxPacketSize field in struct usb_config_descriptor to be __le16
#     
#   Yet another step in the quest to get all USB data structures to be native
#   endian.
#     
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# include/linux/usb_ch9.h
#   2004/12/20 17:15:10-08:00 greg@kroah.com +1 -1
#   USB: change wMaxPacketSize field in struct usb_config_descriptor to be __le16
#     
#   Yet another step in the quest to get all USB data structures to be native
#   endian.
#     
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# include/linux/usb.h
#   2004/12/20 17:15:10-08:00 greg@kroah.com +1 -1
#   USB: change wMaxPacketSize field in struct usb_config_descriptor to be __le16
#     
#   Yet another step in the quest to get all USB data structures to be native
#   endian.
#     
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/w1/dscore.c
#   2004/12/20 17:15:10-08:00 greg@kroah.com +1 -1
#   USB: change wMaxPacketSize field in struct usb_config_descriptor to be __le16
#     
#   Yet another step in the quest to get all USB data structures to be native
#   endian.
#     
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/usb-skeleton.c
#   2004/12/20 17:15:10-08:00 greg@kroah.com +1 -1
#   USB: change wMaxPacketSize field in struct usb_config_descriptor to be __le16
#     
#   Yet another step in the quest to get all USB data structures to be native
#   endian.
#     
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/serial/usb-serial.c
#   2004/12/20 17:15:10-08:00 greg@kroah.com +4 -4
#   USB: change wMaxPacketSize field in struct usb_config_descriptor to be __le16
#     
#   Yet another step in the quest to get all USB data structures to be native
#   endian.
#     
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/misc/usbtest.c
#   2004/12/20 17:15:10-08:00 greg@kroah.com +3 -3
#   USB: change wMaxPacketSize field in struct usb_config_descriptor to be __le16
#     
#   Yet another step in the quest to get all USB data structures to be native
#   endian.
#     
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/misc/legousbtower.c
#   2004/12/20 17:15:10-08:00 greg@kroah.com +2 -2
#   USB: change wMaxPacketSize field in struct usb_config_descriptor to be __le16
#     
#   Yet another step in the quest to get all USB data structures to be native
#   endian.
#     
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/misc/auerswald.c
#   2004/12/20 17:15:10-08:00 greg@kroah.com +1 -1
#   USB: change wMaxPacketSize field in struct usb_config_descriptor to be __le16
#     
#   Yet another step in the quest to get all USB data structures to be native
#   endian.
#     
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/media/ultracam.c
#   2004/12/20 17:15:10-08:00 greg@kroah.com +4 -4
#   USB: change wMaxPacketSize field in struct usb_config_descriptor to be __le16
#     
#   Yet another step in the quest to get all USB data structures to be native
#   endian.
#     
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/media/ov511.c
#   2004/12/20 17:15:10-08:00 greg@kroah.com +1 -1
#   USB: change wMaxPacketSize field in struct usb_config_descriptor to be __le16
#     
#   Yet another step in the quest to get all USB data structures to be native
#   endian.
#     
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/media/konicawc.c
#   2004/12/20 17:15:10-08:00 greg@kroah.com +5 -5
#   USB: change wMaxPacketSize field in struct usb_config_descriptor to be __le16
#     
#   Yet another step in the quest to get all USB data structures to be native
#   endian.
#     
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/media/ibmcam.c
#   2004/12/20 17:15:10-08:00 greg@kroah.com +2 -2
#   USB: change wMaxPacketSize field in struct usb_config_descriptor to be __le16
#     
#   Yet another step in the quest to get all USB data structures to be native
#   endian.
#     
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/input/ati_remote.c
#   2004/12/20 17:15:10-08:00 greg@kroah.com +1 -1
#   USB: change wMaxPacketSize field in struct usb_config_descriptor to be __le16
#     
#   Yet another step in the quest to get all USB data structures to be native
#   endian.
#     
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/image/mdc800.c
#   2004/12/20 17:15:10-08:00 greg@kroah.com +40 -5
#   USB: change wMaxPacketSize field in struct usb_config_descriptor to be __le16
#     
#   Yet another step in the quest to get all USB data structures to be native
#   endian.
#     
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/host/ohci-q.c
#   2004/12/20 17:15:10-08:00 greg@kroah.com +2 -2
#   USB: change wMaxPacketSize field in struct usb_config_descriptor to be __le16
#     
#   Yet another step in the quest to get all USB data structures to be native
#   endian.
#     
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/host/hc_crisv10.c
#   2004/12/20 17:15:10-08:00 greg@kroah.com +2 -2
#   USB: change wMaxPacketSize field in struct usb_config_descriptor to be __le16
#     
#   Yet another step in the quest to get all USB data structures to be native
#   endian.
#     
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/gadget/file_storage.c
#   2004/12/20 17:15:10-08:00 greg@kroah.com +1 -1
#   USB: change wMaxPacketSize field in struct usb_config_descriptor to be __le16
#     
#   Yet another step in the quest to get all USB data structures to be native
#   endian.
#     
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/gadget/dummy_hcd.c
#   2004/12/20 17:15:10-08:00 greg@kroah.com +2 -2
#   USB: change wMaxPacketSize field in struct usb_config_descriptor to be __le16
#     
#   Yet another step in the quest to get all USB data structures to be native
#   endian.
#     
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/core/hub.c
#   2004/12/20 17:15:10-08:00 greg@kroah.com +5 -5
#   USB: change wMaxPacketSize field in struct usb_config_descriptor to be __le16
#     
#   Yet another step in the quest to get all USB data structures to be native
#   endian.
#     
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/core/hcd.c
#   2004/12/20 17:15:10-08:00 greg@kroah.com +3 -3
#   USB: change wMaxPacketSize field in struct usb_config_descriptor to be __le16
#     
#   Yet another step in the quest to get all USB data structures to be native
#   endian.
#     
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/core/devices.c
#   2004/12/20 17:15:10-08:00 greg@kroah.com +2 -2
#   USB: change wMaxPacketSize field in struct usb_config_descriptor to be __le16
#     
#   Yet another step in the quest to get all USB data structures to be native
#   endian.
#     
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/core/config.c
#   2004/12/20 17:15:10-08:00 greg@kroah.com +0 -1
#   USB: change wMaxPacketSize field in struct usb_config_descriptor to be __le16
#     
#   Yet another step in the quest to get all USB data structures to be native
#   endian.
#     
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/class/cdc-acm.c
#   2004/12/20 17:15:10-08:00 greg@kroah.com +3 -3
#   USB: change wMaxPacketSize field in struct usb_config_descriptor to be __le16
#     
#   Yet another step in the quest to get all USB data structures to be native
#   endian.
#     
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/class/bluetty.c
#   2004/12/20 17:15:10-08:00 greg@kroah.com +3 -3
#   USB: change wMaxPacketSize field in struct usb_config_descriptor to be __le16
#     
#   Yet another step in the quest to get all USB data structures to be native
#   endian.
#     
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/class/audio.c
#   2004/12/20 17:15:10-08:00 greg@kroah.com +1 -1
#   USB: change wMaxPacketSize field in struct usb_config_descriptor to be __le16
#     
#   Yet another step in the quest to get all USB data structures to be native
#   endian.
#     
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/net/irda/irda-usb.c
#   2004/12/20 17:15:10-08:00 greg@kroah.com +1 -1
#   USB: change wMaxPacketSize field in struct usb_config_descriptor to be __le16
#     
#   Yet another step in the quest to get all USB data structures to be native
#   endian.
#     
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/media/dvb/b2c2/b2c2-usb-core.c
#   2004/12/20 17:15:10-08:00 greg@kroah.com +1 -1
#   USB: change wMaxPacketSize field in struct usb_config_descriptor to be __le16
#     
#   Yet another step in the quest to get all USB data structures to be native
#   endian.
#     
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/isdn/hisax/st5481_usb.c
#   2004/12/20 17:15:10-08:00 greg@kroah.com +2 -2
#   USB: change wMaxPacketSize field in struct usb_config_descriptor to be __le16
#     
#   Yet another step in the quest to get all USB data structures to be native
#   endian.
#     
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/isdn/hisax/st5481_d.c
#   2004/12/20 17:15:10-08:00 greg@kroah.com +1 -1
#   USB: change wMaxPacketSize field in struct usb_config_descriptor to be __le16
#     
#   Yet another step in the quest to get all USB data structures to be native
#   endian.
#     
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/isdn/hisax/st5481_b.c
#   2004/12/20 17:15:10-08:00 greg@kroah.com +1 -1
#   USB: change wMaxPacketSize field in struct usb_config_descriptor to be __le16
#     
#   Yet another step in the quest to get all USB data structures to be native
#   endian.
#     
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/isdn/hisax/hfc_usb.c
#   2004/12/20 17:15:10-08:00 greg@kroah.com +4 -4
#   USB: change wMaxPacketSize field in struct usb_config_descriptor to be __le16
#     
#   Yet another step in the quest to get all USB data structures to be native
#   endian.
#     
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/char/watchdog/pcwd_usb.c
#   2004/12/20 17:15:10-08:00 greg@kroah.com +1 -1
#   USB: change wMaxPacketSize field in struct usb_config_descriptor to be __le16
#     
#   Yet another step in the quest to get all USB data structures to be native
#   endian.
#     
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/bluetooth/hci_usb.c
#   2004/12/20 17:15:10-08:00 greg@kroah.com +5 -5
#   USB: change wMaxPacketSize field in struct usb_config_descriptor to be __le16
#     
#   Yet another step in the quest to get all USB data structures to be native
#   endian.
#     
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/bluetooth/bfusb.c
#   2004/12/20 17:15:10-08:00 greg@kroah.com +1 -1
#   USB: change wMaxPacketSize field in struct usb_config_descriptor to be __le16
#     
#   Yet another step in the quest to get all USB data structures to be native
#   endian.
#     
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# arch/mips/au1000/common/usbdev.c
#   2004/12/20 17:15:10-08:00 greg@kroah.com +1 -1
#   USB: change wMaxPacketSize field in struct usb_config_descriptor to be __le16
#     
#   Yet another step in the quest to get all USB data structures to be native
#   endian.
#     
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# ChangeSet
#   2004/12/20 16:17:10-08:00 greg@kroah.com 
#   USB: change wTotalLength field in struct usb_config_descriptor to be __le16
#   
#   Another step in the quest to get all USB data structures to be native
#   endian.
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# sound/usb/usbmidi.c
#   2004/12/20 16:16:44-08:00 greg@kroah.com +1 -1
#   USB: change wTotalLength field in struct usb_config_descriptor to be __le16
#   
#   Another step in the quest to get all USB data structures to be native
#   endian.
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# sound/usb/usbaudio.c
#   2004/12/20 16:16:44-08:00 greg@kroah.com +4 -3
#   USB: change wTotalLength field in struct usb_config_descriptor to be __le16
#   
#   Another step in the quest to get all USB data structures to be native
#   endian.
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# include/linux/usb_ch9.h
#   2004/12/20 16:16:44-08:00 greg@kroah.com +1 -1
#   USB: change wTotalLength field in struct usb_config_descriptor to be __le16
#   
#   Another step in the quest to get all USB data structures to be native
#   endian.
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/misc/usbtest.c
#   2004/12/20 16:16:44-08:00 greg@kroah.com +2 -3
#   USB: change wTotalLength field in struct usb_config_descriptor to be __le16
#   
#   Another step in the quest to get all USB data structures to be native
#   endian.
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/host/hc_crisv10.c
#   2004/12/20 16:16:44-08:00 greg@kroah.com +1 -1
#   USB: change wTotalLength field in struct usb_config_descriptor to be __le16
#   
#   Another step in the quest to get all USB data structures to be native
#   endian.
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/core/inode.c
#   2004/12/20 16:16:44-08:00 greg@kroah.com +1 -1
#   USB: change wTotalLength field in struct usb_config_descriptor to be __le16
#   
#   Another step in the quest to get all USB data structures to be native
#   endian.
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/core/hub.c
#   2004/12/20 16:16:44-08:00 greg@kroah.com +4 -4
#   USB: change wTotalLength field in struct usb_config_descriptor to be __le16
#   
#   Another step in the quest to get all USB data structures to be native
#   endian.
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/core/hcd.c
#   2004/12/20 16:16:44-08:00 greg@kroah.com +2 -2
#   USB: change wTotalLength field in struct usb_config_descriptor to be __le16
#   
#   Another step in the quest to get all USB data structures to be native
#   endian.
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/core/devio.c
#   2004/12/20 16:16:44-08:00 greg@kroah.com +1 -1
#   USB: change wTotalLength field in struct usb_config_descriptor to be __le16
#   
#   Another step in the quest to get all USB data structures to be native
#   endian.
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/core/config.c
#   2004/12/20 16:16:44-08:00 greg@kroah.com +1 -1
#   USB: change wTotalLength field in struct usb_config_descriptor to be __le16
#   
#   Another step in the quest to get all USB data structures to be native
#   endian.
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/class/usb-midi.c
#   2004/12/20 16:16:44-08:00 greg@kroah.com +2 -2
#   USB: change wTotalLength field in struct usb_config_descriptor to be __le16
#   
#   Another step in the quest to get all USB data structures to be native
#   endian.
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/class/audio.c
#   2004/12/20 16:16:44-08:00 greg@kroah.com +1 -1
#   USB: change wTotalLength field in struct usb_config_descriptor to be __le16
#   
#   Another step in the quest to get all USB data structures to be native
#   endian.
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# arch/mips/au1000/common/usbdev.c
#   2004/12/20 16:16:44-08:00 greg@kroah.com +2 -2
#   USB: change wTotalLength field in struct usb_config_descriptor to be __le16
#   
#   Another step in the quest to get all USB data structures to be native
#   endian.
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# ChangeSet
#   2004/12/20 15:43:59-08:00 greg@kroah.com 
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# sound/usb/usx2y/usbusx2yaudio.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +2 -2
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# sound/usb/usx2y/usbusx2y.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +6 -5
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# sound/usb/usx2y/usX2Yhwdep.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +2 -2
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# sound/usb/usbmixer.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +3 -3
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# sound/usb/usbmidi.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +3 -3
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# sound/usb/usbaudio.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +27 -20
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# include/linux/usb_ch9.h
#   2004/12/20 15:43:29-08:00 greg@kroah.com +5 -5
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/storage/usb.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +11 -9
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/storage/transport.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +1 -1
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/storage/scsiglue.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +1 -1
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/serial/visor.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +2 -2
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/serial/usb-serial.h
#   2004/12/20 15:43:29-08:00 greg@kroah.com +0 -4
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/serial/usb-serial.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +7 -7
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/serial/ti_usb_3410_5052.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +4 -1
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/serial/mct_u232.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +5 -4
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/serial/kobil_sct.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +1 -1
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/serial/keyspan_pda.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +3 -3
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/serial/keyspan.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +6 -6
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/serial/io_ti.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +2 -2
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/serial/io_edgeport.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +2 -2
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/serial/belkin_sa.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +2 -2
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/net/kaweth.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +4 -4
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/net/catc.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +3 -2
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/misc/uss720.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +2 -1
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/misc/usbtest.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +5 -5
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/misc/usblcd.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +9 -6
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/misc/legousbtower.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +0 -7
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/misc/emi62.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +2 -4
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/misc/emi26.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +3 -5
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/misc/auerswald.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +3 -6
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/media/w9968cf.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +4 -4
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/media/vicam.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +0 -6
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/media/ultracam.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +2 -6
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/media/stv680.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +2 -1
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/media/sn9c102_tas5130d1b.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +2 -2
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/media/sn9c102_tas5110c1b.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +3 -3
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/media/sn9c102_core.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +2 -2
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/media/se401.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +11 -11
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/media/ov511.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +3 -3
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/media/konicawc.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +4 -4
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/media/ibmcam.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +6 -15
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/media/dabusb.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +6 -3
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/input/xpad.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +5 -5
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/input/wacom.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +3 -3
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/input/usbmouse.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +3 -3
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/input/usbkbd.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +3 -3
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/input/touchkitusb.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +3 -3
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/input/powermate.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +7 -6
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/input/mtouchusb.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +3 -3
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/input/kbtab.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +3 -3
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/input/hiddev.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +3 -3
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/input/hid-lgff.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +2 -2
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/input/hid-input.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +3 -3
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/input/hid-ff.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +2 -2
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/input/hid-core.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +5 -3
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/input/ati_remote.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +5 -12
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/input/aiptek.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +3 -3
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/image/microtek.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +2 -2
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/host/hc_crisv10.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +4 -4
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/core/usb.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +11 -11
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/core/sysfs.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +20 -6
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/core/otg_whitelist.h
#   2004/12/20 15:43:29-08:00 greg@kroah.com +8 -8
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/core/message.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +1 -6
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/core/hub.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +1 -1
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/core/hcd.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +8 -8
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/core/devices.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +7 -3
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/class/usblp.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +10 -9
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/class/usb-midi.h
#   2004/12/20 15:43:29-08:00 greg@kroah.com +2 -2
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/class/usb-midi.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +14 -12
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/class/audio.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +2 -1
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/atm/speedtch.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +6 -5
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/net/irda/stir4200.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +2 -2
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/net/irda/irda-usb.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +2 -2
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/media/dvb/ttusb-dec/ttusb_dec.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +4 -4
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +3 -3
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/media/dvb/dibusb/dvb-dibusb.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +6 -6
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/isdn/hisax/st5481_init.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +2 -1
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/isdn/hisax/hfc_usb.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +4 -3
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/char/watchdog/pcwd_usb.c
#   2004/12/20 15:43:29-08:00 greg@kroah.com +0 -6
#   USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16
#   
#   These fields are in the struct usb_device_descriptor, and now we keep the 
#   native (on-the-wire mode) format of these fields.  Any driver using these
#   fields needs to convert it to cpu endian before using them.
#   
#   All USB drivers in the kernel tree have been fixed up to work properly with
#   this change.  All out-of-the USB kernel drivers are on their own...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# ChangeSet
#   2004/12/20 15:17:24-08:00 shemminger@osdl.org 
#   [TCP]: Efficient port randomization (rev 3)
#   
#   okay, here is the revised version. Testing shows that it
#   is more consistent, and just as fast as existing code,
#   probably because of the getting rid of portalloc_lock and
#   better distribution.
#   
#   Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# ChangeSet
#   2004/12/20 15:17:05-08:00 greg@kroah.com 
#   Merge kroah.com:/home/greg/linux/BK/driver-2.6
#   into kroah.com:/home/greg/linux/BK/usb-2.6
# 
# net/ipv4/tcp_ipv4.c
#   2004/12/20 15:17:01-08:00 shemminger@osdl.org +25 -37
#   [TCP]: Efficient port randomization (rev 3)
#   
#   okay, here is the revised version. Testing shows that it
#   is more consistent, and just as fast as existing code,
#   probably because of the getting rid of portalloc_lock and
#   better distribution.
#   
#   Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# include/linux/random.h
#   2004/12/20 15:17:01-08:00 shemminger@osdl.org +1 -0
#   [TCP]: Efficient port randomization (rev 3)
#   
#   okay, here is the revised version. Testing shows that it
#   is more consistent, and just as fast as existing code,
#   probably because of the getting rid of portalloc_lock and
#   better distribution.
#   
#   Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# drivers/char/random.c
#   2004/12/20 15:17:01-08:00 shemminger@osdl.org +18 -0
#   [TCP]: Efficient port randomization (rev 3)
#   
#   okay, here is the revised version. Testing shows that it
#   is more consistent, and just as fast as existing code,
#   probably because of the getting rid of portalloc_lock and
#   better distribution.
#   
#   Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# drivers/usb/host/uhci-hcd.h
#   2004/12/20 15:17:01-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# drivers/usb/host/uhci-hcd.c
#   2004/12/20 15:17:00-08:00 greg@kroah.com +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/12/20 15:01:26-08:00 stern@rowland.harvard.edu 
#   [PATCH] USB: Another hub driver cleanup [13/13]
#   
#   This patch does some more cleaning up of the hub driver.  The idea is to
#   use 1-based port numbers everywhere, in accordance with the usage of the
#   USB spec, the values stored in USB messages, and the values printed in the
#   system log.  The downside is that we have to subtract 1 to index the
#   children[] array, but that's a lot better than all the additions of 1 that
#   were there before.  To emphasize the nature of this change, I renamed the
#   "port" local variable to "port1" every place it is used.
#   
#   Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/core/usb.c
#   2004/12/19 04:18:52-08:00 stern@rowland.harvard.edu +4 -4
#   USB: Another hub driver cleanup [13/13]
# 
# drivers/usb/core/hub.c
#   2004/12/19 04:19:54-08:00 stern@rowland.harvard.edu +142 -138
#   USB: Another hub driver cleanup [13/13]
# 
# ChangeSet
#   2004/12/20 15:01:03-08:00 stern@rowland.harvard.edu 
#   [PATCH] USB: Hub driver cleanups [12/13]
#   
#   This patch does a little cleanup of the hub driver, nothing dramatic
#   (although it is long because it touches a lot of code).  The main feature
#   is that the private hub structure is passed as an argument to internal
#   routines rather than the hub device structure.  This simplifies
#   conversions, because it's easier to go from the private structure to the
#   device structure than vice versa.  The other change is to store a pointer
#   to the interface's embedded struct device rather than the interface
#   itself.  This helps because that pointer is mainly used for dev_xxx log
#   messages.
#   
#   Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/core/hub.h
#   2004/12/19 04:14:07-08:00 stern@rowland.harvard.edu +1 -1
#   USB: Hub driver cleanups [12/13]
# 
# drivers/usb/core/hub.c
#   2004/12/19 04:16:29-08:00 stern@rowland.harvard.edu +98 -104
#   USB: Hub driver cleanups [12/13]
# 
# ChangeSet
#   2004/12/20 15:00:38-08:00 stern@rowland.harvard.edu 
#   [PATCH] USB: Hub driver: several bug fixes and simplifications [11/13]
#   
#   This patch adds several relatively minor bug fixes and code
#   simplifications for the hub driver.
#   
#   	Perhaps most significantly, a test is added to usbfs to prevent
#   	users from unbinding the hub driver from a hub with children.
#   	That could cause some bad headaches, and it's best to avoid the
#   	situation.
#   
#   	Don't set unused bits in the change_bits and event_bits fields
#   	(this aids in debugging, nothing more).
#   
#   	Use the correct spinlock in the hub ioctl routine!
#   
#   	Add an argument to hub_port_disable, indicating whether the
#   	device behind the disabled port should be marked NOTATTACHED.
#   	Normally it should, but for retries during usb_reset_device
#   	it should not.
#   
#   	Pass the child device as an argument to hub_port_suspend and
#   	hub_port_resume rather than making them recalculate it.
#   
#   	Call usb_set_device_state in the suspend/resume code rather
#   	than setting udev->state directly.
#   
#   	Set udev->power.power_state in the suspend/resume code so that
#   	the correct values are visible in sysfs.
#   
#   	Recognize during hub_port_resume that the child device udev
#   	might be NULL (this will happen when a new device is plugged
#   	into a suspended port).
#   
#   	Don't allow hub_port_init to drop the usb_address0_sem lock
#   	while a device on the bus is still using address 0!
#   
#   	Make khubd acquire a reference to the hub interface rather than
#   	the hub device.  This simplifies disconnect/unbind testing.
#   
#   	Don't print a debugging message about hub events while not
#   	holding some lock to protect the hub.
#   
#   	Remember to drop the reference acquired above if we fail to
#   	lock the hub.
#   
#   Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/core/hub.c
#   2004/12/19 04:11:13-08:00 stern@rowland.harvard.edu +55 -46
#   USB: Hub driver: several bug fixes and simplifications [11/13]
# 
# drivers/usb/core/devio.c
#   2004/12/19 04:11:40-08:00 stern@rowland.harvard.edu +11 -0
#   USB: Hub driver: several bug fixes and simplifications [11/13]
# 
# ChangeSet
#   2004/12/20 15:00:14-08:00 stern@rowland.harvard.edu 
#   [PATCH] USB: Hub driver: improve error checking and retries [10/13]
#   
#   Here's another "cleanup" type patch, most of which was written by David
#   Brownell.  It causes the hub driver to retry a couple of different types
#   of transfers if they timeout (which seems to help with some flakey
#   devices), and it adds some error checking for the ep0 maxpacket value sent
#   by the device.
#   
#   From: David Brownell <david-b@pacbell.net>
#   Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/core/hub.c
#   2004/12/19 04:07:33-08:00 stern@rowland.harvard.edu +41 -17
#   USB: Hub driver: improve error checking and retries [10/13]
# 
# ChangeSet
#   2004/12/20 14:20:30-08:00 stern@rowland.harvard.edu 
#   [PATCH] USB: Create usb_hcd structures within usbcore [6/13]
#   
#   This patch alters the dummy_hcd driver, removing the routine that
#   allocates the hcd structure and introducing inline functions to convert
#   safely between the public and private hcd structures.
#   
#   Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/gadget/dummy_hcd.c
#   2004/12/18 07:26:30-08:00 stern@rowland.harvard.edu +14 -30
#   USB: Create usb_hcd structures within usbcore [6/13]
# 
# ChangeSet
#   2004/12/20 14:20:07-08:00 stern@rowland.harvard.edu 
#   [PATCH] USB: Create usb_hcd structures within usbcore [5/13]
#   
#   This patch alters the non-PCI OHCI drivers, removing the routines that
#   allocate the hcd structures and introducing inline functions to convert
#   safely between the public and private hcd structures.
#   
#   Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/host/sl811.h
#   2004/12/18 07:22:52-08:00 stern@rowland.harvard.edu +6 -2
#   USB: Create usb_hcd structures within usbcore [5/13]
# 
# drivers/usb/host/sl811-hcd.c
#   2004/12/18 07:22:52-08:00 stern@rowland.harvard.edu +107 -91
#   USB: Create usb_hcd structures within usbcore [5/13]
# 
# drivers/usb/host/ohci-sa1111.c
#   2004/12/18 07:22:52-08:00 stern@rowland.harvard.edu +12 -16
#   USB: Create usb_hcd structures within usbcore [5/13]
# 
# drivers/usb/host/ohci-pxa27x.c
#   2004/12/18 07:22:52-08:00 stern@rowland.harvard.edu +16 -25
#   USB: Create usb_hcd structures within usbcore [5/13]
# 
# drivers/usb/host/ohci-omap.c
#   2004/12/18 07:22:52-08:00 stern@rowland.harvard.edu +26 -34
#   USB: Create usb_hcd structures within usbcore [5/13]
# 
# drivers/usb/host/ohci-lh7a404.c
#   2004/12/18 07:22:52-08:00 stern@rowland.harvard.edu +17 -26
#   USB: Create usb_hcd structures within usbcore [5/13]
# 
# ChangeSet
#   2004/12/20 14:19:38-08:00 stern@rowland.harvard.edu 
#   [PATCH] USB: Create usb_hcd structures within usbcore [4/13]
#   
#   This patch alters the UHCI driver, removing the routine that allocates the
#   hcd structure and introducing inline functions to convert safely between
#   the public and private hcd structures.
#   
#   Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/host/uhci-hcd.h
#   2004/12/18 07:22:52-08:00 stern@rowland.harvard.edu +12 -4
#   USB: Create usb_hcd structures within usbcore [4/13]
# 
# drivers/usb/host/uhci-hcd.c
#   2004/12/18 07:22:52-08:00 stern@rowland.harvard.edu +5 -18
#   USB: Create usb_hcd structures within usbcore [4/13]
# 
# ChangeSet
#   2004/12/20 14:19:05-08:00 stern@rowland.harvard.edu 
#   [PATCH] USB: Create usb_hcd structures within usbcore [3/13]
#   
#   This patch alters the OHCI driver, removing the routine that allocates the
#   hcd structure and introducing inline functions to convert safely between
#   the public and private hcd structures.  It also moves the code to
#   initialize the private structure into the reset routine, since the
#   allocation routine is now gone.  That particular aspect should be reviewed
#   by David, but for now it seems to work.
#   
#   Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/host/ohci.h
#   2004/12/18 07:22:52-08:00 stern@rowland.harvard.edu +14 -11
#   USB: Create usb_hcd structures within usbcore [3/13]
# 
# drivers/usb/host/ohci-q.c
#   2004/12/18 07:22:52-08:00 stern@rowland.harvard.edu +16 -16
#   USB: Create usb_hcd structures within usbcore [3/13]
# 
# drivers/usb/host/ohci-pci.c
#   2004/12/18 07:22:52-08:00 stern@rowland.harvard.edu +3 -5
#   USB: Create usb_hcd structures within usbcore [3/13]
# 
# drivers/usb/host/ohci-mem.c
#   2004/12/18 07:22:52-08:00 stern@rowland.harvard.edu +9 -16
#   USB: Create usb_hcd structures within usbcore [3/13]
# 
# drivers/usb/host/ohci-hub.c
#   2004/12/18 07:22:52-08:00 stern@rowland.harvard.edu +13 -14
#   USB: Create usb_hcd structures within usbcore [3/13]
# 
# drivers/usb/host/ohci-hcd.c
#   2004/12/18 07:22:52-08:00 stern@rowland.harvard.edu +17 -17
#   USB: Create usb_hcd structures within usbcore [3/13]
# 
# drivers/usb/host/ohci-dbg.c
#   2004/12/18 07:22:52-08:00 stern@rowland.harvard.edu +13 -9
#   USB: Create usb_hcd structures within usbcore [3/13]
# 
# ChangeSet
#   2004/12/20 14:18:23-08:00 stern@rowland.harvard.edu 
#   [PATCH] USB: Create usb_hcd structures within usbcore [2/13]
#   
#   This patch alters the EHCI driver, removing the routine that allocates the
#   hcd structure and introducing inline functions to convert safely between
#   the public and private hcd structures.
#   
#   Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/host/ehci.h
#   2004/12/18 07:22:52-08:00 stern@rowland.harvard.edu +14 -9
#   USB: Create usb_hcd structures within usbcore [2/13]
# 
# drivers/usb/host/ehci-sched.c
#   2004/12/18 07:22:52-08:00 stern@rowland.harvard.edu +17 -17
#   USB: Create usb_hcd structures within usbcore [2/13]
# 
# drivers/usb/host/ehci-q.c
#   2004/12/18 07:22:52-08:00 stern@rowland.harvard.edu +12 -11
#   USB: Create usb_hcd structures within usbcore [2/13]
# 
# drivers/usb/host/ehci-mem.c
#   2004/12/18 07:22:52-08:00 stern@rowland.harvard.edu +6 -25
#   USB: Create usb_hcd structures within usbcore [2/13]
# 
# drivers/usb/host/ehci-hub.c
#   2004/12/18 07:22:52-08:00 stern@rowland.harvard.edu +6 -6
#   USB: Create usb_hcd structures within usbcore [2/13]
# 
# drivers/usb/host/ehci-hcd.c
#   2004/12/18 07:22:52-08:00 stern@rowland.harvard.edu +22 -23
#   USB: Create usb_hcd structures within usbcore [2/13]
# 
# drivers/usb/host/ehci-dbg.c
#   2004/12/18 07:22:52-08:00 stern@rowland.harvard.edu +17 -13
#   USB: Create usb_hcd structures within usbcore [2/13]
# 
# ChangeSet
#   2004/12/20 14:17:44-08:00 stern@rowland.harvard.edu 
#   [PATCH] USB: Create usb_hcd structures within usbcore [1/13]
#   
#   This patch changes the usbcore routines, making them fully responsible for
#   the entire lifecycle of each usb_hcd.  It also splits up registration of
#   the USB host class_device into an _init and an _add phase, to match the
#   initialization and registration of the USB bus belonging to the host.
#   
#   
#   Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/core/hcd.h
#   2004/12/18 05:54:45-08:00 stern@rowland.harvard.edu +13 -14
#   USB: Create usb_hcd structures within usbcore [1/13]
# 
# drivers/usb/core/hcd.c
#   2004/12/18 05:54:45-08:00 stern@rowland.harvard.edu +48 -11
#   USB: Create usb_hcd structures within usbcore [1/13]
# 
# drivers/usb/core/hcd-pci.c
#   2004/12/18 05:54:45-08:00 stern@rowland.harvard.edu +5 -16
#   USB: Create usb_hcd structures within usbcore [1/13]
# 
# ChangeSet
#   2004/12/20 10:37:42-08:00 greg@kroah.com 
#   USB: change warning level in ftdi_sio driver of a debug message.
#   
#   This keeps users happy as it really isn't an error.
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/serial/ftdi_sio.c
#   2004/12/20 10:37:18-08:00 greg@kroah.com +1 -1
#   USB: change warning level in ftdi_sio driver of a debug message.
#   
#   This keeps users happy as it really isn't an error.
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# ChangeSet
#   2004/12/20 12:40:03-05:00 len.brown@intel.com 
#   Merge intel.com:/home/lenb/bk/26-latest-ref
#   into intel.com:/home/lenb/src/26-latest-dev
# 
# Documentation/kernel-parameters.txt
#   2004/12/20 12:39:59-05:00 len.brown@intel.com +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/12/19 14:59:06-06:00 brking@us.ibm.com 
#   [PATCH] ipr: Bump driver version to 2.0.12
#   
#   Bump driver version
#   
#   Signed-off-by: Brian King <brking@us.ibm.com>
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
# 
# drivers/scsi/ipr.h
#   2004/12/14 17:09:02-06:00 brking@us.ibm.com +2 -2
#   ipr: Bump driver version to 2.0.12
# 
# ChangeSet
#   2004/12/19 14:54:06-06:00 brking@us.ibm.com 
#   [PATCH] ipr: whitespace fixes
#   
#   Whitespace fixes.
#   
#   Signed-off-by: Brian King <brking@us.ibm.com>
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
# 
# drivers/scsi/ipr.h
#   2004/12/14 17:06:41-06:00 brking@us.ibm.com +11 -11
#   ipr: whitespace fixes
# 
# ChangeSet
#   2004/12/19 14:50:00-06:00 brking@us.ibm.com 
#   [PATCH] ipr: Remove dead code
#   
#   Removes some unused debug code.
#   
#   Signed-off-by: Brian King <brking@us.ibm.com>
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
# 
# drivers/scsi/ipr.h
#   2004/12/14 17:06:38-06:00 brking@us.ibm.com +0 -15
#   ipr: Remove dead code
# 
# ChangeSet
#   2004/12/19 14:44:29-06:00 brking@us.ibm.com 
#   [PATCH] ipr: new RAID error
#   
#   Adds support for logging a new RAID error that can be returned on
#   new ipr adapters.
#   
#   Signed-off-by: Brian King <brking@us.ibm.com>
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
# 
# drivers/scsi/ipr.c
#   2004/12/14 17:06:35-06:00 brking@us.ibm.com +2 -0
#   ipr: new RAID error
# 
# ChangeSet
#   2004/12/19 14:33:37-06:00 brking@us.ibm.com 
#   [PATCH] ipr: PCI-X capabilities setup fix
#   
#   From: Andrew Vasquez <andrew.vasquez@qlogic.com>
#   
#   While performing some PCI-X command register tuning with some of
#   QLogic's cards, I stumbled upon some suspect code in ipr.c.  It appears
#   the two functions ipr_save_pcix_cmd_reg() and ipr_set_pcix_cmd_reg() are
#   actually reading/updating the PCI-X capabilities register and not in
#   fact the PCI-X command register -- some code from
#   ipr_save_pcix_cmd_reg():
#   
#   	...
#           int pcix_cmd_reg = pci_find_capability(ioa_cfg->pdev, PCI_CAP_ID_PCIX);
#   
#           if (pcix_cmd_reg == 0) {
#                   dev_err(&ioa_cfg->pdev->dev, "Failed to save PCI-X command register\n");
#                   return -EIO;
#           }
#   
#   pcix_cmd_reg points to the PCI-X capabilities register.  Yet, the read:
#   
#           if (pci_read_config_word(ioa_cfg->pdev, pcix_cmd_reg,
#                                    &ioa_cfg->saved_pcix_cmd_reg) != PCIBIOS_SUCCESSFUL) {
#                   dev_err(&ioa_cfg->pdev->dev, "Failed to save PCI-X command register\n");
#                   return -EIO;
#           }
#   
#   and subsequent update of the bits:
#   
#           ioa_cfg->saved_pcix_cmd_reg |= PCI_X_CMD_DPERR_E | PCI_X_CMD_ERO;
#   
#   should actually apply to the PCI-X Command register 2 bytes further into
#   config space.  So, the following:
#   
#           if (pci_read_config_word(ioa_cfg->pdev, pcix_cmd_reg,
#   
#   should actually read as:
#   
#           if (pci_read_config_word(ioa_cfg->pdev, pcix_cmd_reg + PCI_X_CMD,
#   
#   The same is true for the 'save' case.
#   
#   Luckily, most devices hardwire the PCI-X capabilities register so the
#   write is effectively a NOOP.
#   
#   Signed-off-by: Brian King <brking@us.ibm.com>
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
# 
# drivers/scsi/ipr.c
#   2004/12/14 17:06:30-06:00 brking@us.ibm.com +2 -2
#   ipr: PCI-X capabilities setup fix
# 
# ChangeSet
#   2004/12/19 13:55:16-06:00 brking@us.ibm.com 
#   [PATCH] ipr: Allow Query Resource State adapter command to
#   
#   The ipr adapters support an adapter command directed at the device
#   resource called "Query Resource State". It can be used to retrieve
#   state information about the resource it is sent to, including the
#   currently negotiated scsi speed. The adapter interface requires the
#   IPR_RQTYPE_IOACMD to be set on this command, so we set it if the
#   command code matches.
#   
#   Signed-off-by: Brian King <brking@us.ibm.com>
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
# 
# drivers/scsi/ipr.h
#   2004/12/14 17:06:25-06:00 brking@us.ibm.com +1 -0
#   ipr: Allow Query Resource State adapter command to
# 
# drivers/scsi/ipr.c
#   2004/12/14 17:06:25-06:00 brking@us.ibm.com +2 -1
#   ipr: Allow Query Resource State adapter command to
# 
# ChangeSet
#   2004/12/19 13:49:55-06:00 markh@osdl.org 
#   [PATCH] aacraid 2.6: Support for new cards
#   
#   This patch adds support for new aacraid cards.
#   
#   Signed-off-by: Mark Haverkamp <markh@osdl.org>
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
# 
# drivers/scsi/aacraid/linit.c
#   2004/12/14 16:01:39-06:00 markh@osdl.org +66 -58
#   aacraid 2.6: Support for new cards
# 
# drivers/scsi/aacraid/aacraid.h
#   2004/12/06 12:17:29-06:00 markh@osdl.org +18 -1
#   aacraid 2.6: Support for new cards
# 
# ChangeSet
#   2004/12/19 13:23:28-06:00 jejb@mulgrave.(none) 
#   SCSI: convert 53c700 driver to use change_queue_depth API
#   
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
# 
# drivers/scsi/53c700.c
#   2004/12/19 13:21:53-06:00 jejb@mulgrave.(none) +6 -17
#   convert 53c700 driver to use change_queue_depth API
# 
# ChangeSet
#   2004/12/19 13:19:57-06:00 jejb@mulgrave.(none) 
#   SCSI:add change_queue_depth API to scsi host template
#   
#   Originally, the 53c700 driver implemented queue_depth changing as an
#   attribute override, primarily as a demonstration of how it should be
#   done.  Now that a large number of drivers wish to implement this
#   functionality, it should become an API rather than an attribute
#   override, since the latter are supposed to be used as one off extensions
#   rather than the de-facto API.
#   
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
# 
# include/scsi/scsi_host.h
#   2004/12/19 13:18:37-06:00 jejb@mulgrave.(none) +12 -0
#   add change_queue_depth API to scsi host template
# 
# drivers/scsi/scsi_sysfs.c
#   2004/12/19 13:18:37-06:00 jejb@mulgrave.(none) +37 -3
#   add change_queue_depth API to scsi host template
# 
# ChangeSet
#   2004/12/19 12:43:44-06:00 andrew.vasquez@qlogic.com 
#   qla2xxx: Update driver version
#   
#   Update version number to 8.00.02b4-k.
#   
#   Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
# 
# drivers/scsi/qla2xxx/qla_version.h
#   2004/12/09 00:18:01-06:00 andrew.vasquez@qlogic.com +3 -3
#   qla2xxx: Update driver version
# 
# ChangeSet
#   2004/12/19 12:41:11-06:00 jejb@mulgrave.(none) 
#   qla2xxx: 23xx/63xx firmware updates
#   
#   From: 	Andrew Vasquez <andrew.vasquez@qlogic.com>
#   
#   Resync with latest released firmware -- 3.03.08.
#   
#   Remove ql6322_fw.c file.
#   
#   Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
# 
# drivers/scsi/qla2xxx/ql6312_fw.c
#   2004/12/19 12:38:40-06:00 jejb@mulgrave.(none) +6911 -6666
#   qla2xxx: 23xx/63xx firmware updates
# 
# drivers/scsi/qla2xxx/ql2322_fw.c
#   2004/12/19 12:38:40-06:00 jejb@mulgrave.(none) +6629 -6590
#   qla2xxx: 23xx/63xx firmware updates
# 
# drivers/scsi/qla2xxx/ql2300_fw.c
#   2004/12/19 12:38:39-06:00 jejb@mulgrave.(none) +6983 -6941
#   qla2xxx: 23xx/63xx firmware updates
# 
# BitKeeper/deleted/.del-ql6322_fw.c~29d555524cf69da
#   2004/12/19 12:37:05-06:00 jejb@mulgrave.(none) +0 -7433
#   Delete: drivers/scsi/qla2xxx/ql6322_fw.c
# 
# ChangeSet
#   2004/12/19 12:32:44-06:00 andrew.vasquez@qlogic.com 
#   qla2xxx: Consolidate ISP63xx support
#   
#   Recent ISP6312 FLX firmware can support both ISP6312 and
#   ISP6322 chips.  Consolidate ISP6322 handling into the
#   ISP6312 firmware loader files.
#   
#   Remove ql6322.c file.
#   
#   Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
# 
# drivers/scsi/qla2xxx/qla_def.h
#   2004/12/09 00:16:47-06:00 andrew.vasquez@qlogic.com +1 -5
#   qla2xxx: Consolidate ISP63xx support
# 
# drivers/scsi/qla2xxx/ql6312.c
#   2004/12/09 00:16:47-06:00 andrew.vasquez@qlogic.com +13 -1
#   qla2xxx: Consolidate ISP63xx support
# 
# drivers/scsi/qla2xxx/Makefile
#   2004/12/09 00:16:47-06:00 andrew.vasquez@qlogic.com +0 -2
#   qla2xxx: Consolidate ISP63xx support
# 
# drivers/scsi/qla2xxx/Kconfig
#   2004/12/09 00:16:47-06:00 andrew.vasquez@qlogic.com +4 -10
#   qla2xxx: Consolidate ISP63xx support
# 
# BitKeeper/deleted/.del-ql6322.c~c61deeb919dae129
#   2004/12/19 12:31:11-06:00 andrew.vasquez@qlogic.com +0 -0
#   Delete: drivers/scsi/qla2xxx/ql6322.c
# 
# ChangeSet
#   2004/12/19 12:28:06-06:00 andrew.vasquez@qlogic.com 
#   qla2xxx: Code scrubbing
#   
#   Misc. driver-code scrubbing:
#   
#        o Correct qla2300 module description.
#        o Resync with latest firmware structure definitions.
#        o White-space cleanup.
#        o Add additional display of driver internals when debug
#          is enabled.
#   
#   Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
# 
# drivers/scsi/qla2xxx/qla_os.c
#   2004/12/09 00:15:37-06:00 andrew.vasquez@qlogic.com +10 -10
#   qla2xxx: Code scrubbing
# 
# drivers/scsi/qla2xxx/qla_isr.c
#   2004/12/09 00:15:37-06:00 andrew.vasquez@qlogic.com +5 -4
#   qla2xxx: Code scrubbing
# 
# drivers/scsi/qla2xxx/qla_init.c
#   2004/12/09 00:15:37-06:00 andrew.vasquez@qlogic.com +1 -1
#   qla2xxx: Code scrubbing
# 
# drivers/scsi/qla2xxx/qla_def.h
#   2004/12/09 00:15:37-06:00 andrew.vasquez@qlogic.com +11 -6
#   qla2xxx: Code scrubbing
# 
# drivers/scsi/qla2xxx/ql2300.c
#   2004/12/09 00:15:37-06:00 andrew.vasquez@qlogic.com +1 -1
#   qla2xxx: Code scrubbing
# 
# ChangeSet
#   2004/12/19 12:23:34-06:00 andrew.vasquez@qlogic.com 
#   qla2xxx: ISR fixes
#   
#   Interrupt handler fixes:
#   
#        o Mark HBA offline in case the firmware cannot recover
#          after and ISP system-error.
#        o Correct issue where the loop-down-timer was not properly
#          being cleared during a port-update event.
#   
#   Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
# 
# drivers/scsi/qla2xxx/qla_isr.c
#   2004/12/09 00:15:02-06:00 andrew.vasquez@qlogic.com +12 -4
#   qla2xxx: ISR fixes
# 
# ChangeSet
#   2004/12/19 12:16:44-06:00 andrew.vasquez@qlogic.com 
#   qla2xxx: Small fixes
#   
#        o Issue a big-hammer to recover if the driver is unable
#          retrieve the host's loop-id.
#        o Correct failure to not add an fc_lun_t object for lun
#          0.
#        o Interrogate only the relevant bits (peripheral
#          qualifier and device-type) of INQUIRY data.
#        o Correct issue where driver would incorrectly fail-out
#          of initializing an ISP if an device-discovery SNS scan
#          failed.
#        o Correct issue where the qla2x00_fabric_login() would
#          return an incorrect error status during mailbox
#          command execution.
#   
#   Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
# 
# drivers/scsi/qla2xxx/qla_init.c
#   2004/12/09 00:14:27-06:00 andrew.vasquez@qlogic.com +22 -11
#   qla2xxx: Small fixes
# 
# ChangeSet
#   2004/12/19 12:12:20-06:00 andrew.vasquez@qlogic.com 
#   qla2xxx: NVRAM id-list updates
#   
#   Resync with latest NVRAM subsystem ID list.
#   
#   Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
# 
# drivers/scsi/qla2xxx/qla_devtbl.h
#   2004/12/09 00:13:51-06:00 andrew.vasquez@qlogic.com +63 -29
#   qla2xxx: NVRAM id-list updates
# 
# ChangeSet
#   2004/12/19 12:07:33-06:00 andrew.vasquez@qlogic.com 
#   qla2xxx: NVRAM updates
#   
#   Address several NVRAM access issues:
#   
#        o Add support for write-protected NVRAM chips used with
#          ISP2322 and ISP6322.
#        o Correct code to not perform an erase data during NVRAM
#          update.
#        o Correct issuance of NVRAM delay after PCI posting call.
#   
#   Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
# 
# drivers/scsi/qla2xxx/qla_sup.c
#   2004/12/09 00:13:14-06:00 andrew.vasquez@qlogic.com +60 -33
#   qla2xxx: NVRAM updates
# 
# drivers/scsi/qla2xxx/qla_os.c
#   2004/12/09 00:13:14-06:00 andrew.vasquez@qlogic.com +1 -0
#   qla2xxx: NVRAM updates
# 
# drivers/scsi/qla2xxx/qla_gbl.h
#   2004/12/09 00:13:14-06:00 andrew.vasquez@qlogic.com +1 -0
#   qla2xxx: NVRAM updates
# 
# drivers/scsi/qla2xxx/qla_def.h
#   2004/12/09 00:13:14-06:00 andrew.vasquez@qlogic.com +2 -0
#   qla2xxx: NVRAM updates
# 
# ChangeSet
#   2004/12/19 12:00:57-06:00 andrew.vasquez@qlogic.com 
#   qla2xxx: Tx/Rx Sensitivity additions
#   
#   Add support for new transmit/receive sensitivity settings when
#   updating an ISPs serial-link options.
#   
#   Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
# 
# drivers/scsi/qla2xxx/qla_init.c
#   2004/12/09 00:12:38-06:00 andrew.vasquez@qlogic.com +45 -14
#   qla2xxx: Tx/Rx Sensitivity additions
# 
# drivers/scsi/qla2xxx/qla_def.h
#   2004/12/09 00:12:38-06:00 andrew.vasquez@qlogic.com +22 -3
#   qla2xxx: Tx/Rx Sensitivity additions
# 
# ChangeSet
#   2004/12/19 11:54:26-06:00 andrew.vasquez@qlogic.com 
#   qla2xxx: Dead code removal
#   
#   From: Christoph Hellwig <hch@lst.de>
#   
#   remove dead code, add missing statics
#   
#   Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
# 
# drivers/scsi/qla2xxx/qla_rscn.c
#   2004/12/09 00:12:03-06:00 andrew.vasquez@qlogic.com +1 -1
#   qla2xxx: Dead code removal
# 
# drivers/scsi/qla2xxx/qla_os.c
#   2004/12/09 00:12:03-06:00 andrew.vasquez@qlogic.com +16 -125
#   qla2xxx: Dead code removal
# 
# drivers/scsi/qla2xxx/qla_mbx.c
#   2004/12/09 00:12:03-06:00 andrew.vasquez@qlogic.com +1 -502
#   qla2xxx: Dead code removal
# 
# drivers/scsi/qla2xxx/qla_iocb.c
#   2004/12/09 00:12:03-06:00 andrew.vasquez@qlogic.com +2 -95
#   qla2xxx: Dead code removal
# 
# drivers/scsi/qla2xxx/qla_init.c
#   2004/12/09 00:12:03-06:00 andrew.vasquez@qlogic.com +4 -509
#   qla2xxx: Dead code removal
# 
# drivers/scsi/qla2xxx/qla_gbl.h
#   2004/12/09 00:12:03-06:00 andrew.vasquez@qlogic.com +0 -43
#   qla2xxx: Dead code removal
# 
# drivers/scsi/qla2xxx/qla_devtbl.h
#   2004/12/09 00:12:03-06:00 andrew.vasquez@qlogic.com +2 -2
#   qla2xxx: Dead code removal
# 
# ChangeSet
#   2004/12/19 10:06:32-06:00 jejb@mulgrave.(none) 
#   SCSI: Add FC transport host statistics
#   
#   From: 	James.Smart@Emulex.Com
#   
#   This patch updates the fc_transport with statistics for local FC ports
#   (e.g. Hosts).  The statistics are defined per HBAAPI v2.0 definitions.
#   
#   Caveats:
#   ------------
#   - The information below is supplied by a simple test driver 
#   that does not
#     talk to real hardware, but fully acts as a LLDD that supports the
#     fc transport.
#   
#   
#   This patch results in the following in /sys/class:
#   -----------------------------------------------------
#   
#   [jsmart@elxware class]$ cd /sys/class
#   [jsmart@elxware class]$ ls
#   fc_host       graphics  misc     pci_bus       scsi_host  usb_host
#   fc_transport  input     net      scsi_device   tty        vc
#   firmware      mem       netlink  scsi_generic  usb
#   [jsmart@elxware class]$ cd fc_host
#   [jsmart@elxware fc_host]$ ls
#   host4
#   
#   [jsmart@elxware fc_host]$ cd host4
#   [jsmart@elxware host4]$ ls
#   device                 host_link_down_tmo           statistics
#   [jsmart@elxware host4]$ ls -ld *
#   lrwxrwxrwx  1 root root    0 Oct 13 17:16 device -> 
#   ../../../devices/platform/host4
#   -rw-r--r--  1 root root 4096 Oct 13 17:16 host_link_down_tmo
#   drwxr-xr-x  2 root root    0 Oct 13 17:16 statistics
#   
#   [jsmart@elxware host4]$ cd statistics
#   dumped_frames         invalid_crc_count      
#   prim_seq_protocol_err_count
#   error_frames          invalid_tx_word_count  reset_statistics
#   fcp_control_requests  link_failure_count     rx_frames
#   fcp_input_megabytes   lip_count              rx_words
#   fcp_input_requests    loss_of_signal_count   seconds_since_last_reset
#   fcp_output_megabytes  loss_of_sync_count     tx_frames
#   fcp_output_requests   nos_count              tx_words
#   
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
# 
# include/scsi/scsi_transport_fc.h
#   2004/12/19 10:05:27-06:00 jejb@mulgrave.(none) +36 -0
#   Add FC transport host statistics
# 
# drivers/scsi/scsi_transport_fc.c
#   2004/12/19 10:05:27-06:00 jejb@mulgrave.(none) +110 -0
#   Add FC transport host statistics
# 
# ChangeSet
#   2004/12/19 10:01:12-06:00 jejb@mulgrave.(none) 
#   SCSI: Add basic infrastructure for transport host statistics
#   
#   From: 	James.Smart@Emulex.Com
#   
#   This patch adds the basic hooks to the scsi subsystem to 
#   support transport-specific statistics to be added to a host. 
#   Its basic nature follows the way in which net devices showed 
#   their statistics.
#   
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
# 
# include/scsi/scsi_transport.h
#   2004/12/19 09:59:15-06:00 jejb@mulgrave.(none) +1 -0
#   Add basic infrastructure for transport host statistics
# 
# drivers/scsi/scsi_sysfs.c
#   2004/12/19 09:59:15-06:00 jejb@mulgrave.(none) +8 -0
#   Add basic infrastructure for transport host statistics
# 
# drivers/scsi/hosts.c
#   2004/12/19 09:59:14-06:00 jejb@mulgrave.(none) +6 -2
#   Add basic infrastructure for transport host statistics
# 
# ChangeSet
#   2004/12/17 16:11:38-08:00 zaitcev@redhat.com 
#   [PATCH] Clean mct_u232 in 2.6.10-rc2
#   
#   I would like to clean up mct_u232 a little bit, although primarily to make
#   my fixes to 2.4 branch look better. The attached patch does this:
#    - zeroes whole private structure
#    - zaps dangling pointer (or why do we check it then)
#    - removes unused code for FIX_WRITE_RETURN_CODE_PROBLEM
#    - changes version
#    - makes the diagnostic name not quite as pompous
#    - makes debugging printouts a little more informative
#   
#   From: Pete Zaitcev <zaitcev@redhat.com>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/serial/mct_u232.c
#   2004/11/27 15:49:19-08:00 zaitcev@redhat.com +12 -136
#   Clean mct_u232 in 2.6.10-rc2
# 
# ChangeSet
#   2004/12/17 15:43:58-08:00 macro@mips.com 
#   [PATCH] PCI: PCI early fixup missing bits
#   
#    A few bits seem to be missing for PCI early fixup to work -- the
#   pci_fixup_device() helper ignores fixups of the pci_fixup_early type.
#   Also the local class variable needs to be refreshed after performing the
#   fixups for they can change dev->class.
#   
#   
#   Signed-off-by: Maciej W. Rozycki <macro@mips.com>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
#   
#   patch-mips-2.6.10-rc2-20041124-pci_fixup_early-1
# 
# drivers/pci/quirks.c
#   2004/12/15 10:36:15-08:00 macro@mips.com +7 -0
#   PCI: PCI early fixup missing bits
# 
# drivers/pci/probe.c
#   2004/12/15 10:45:32-08:00 macro@mips.com +1 -0
#   PCI: PCI early fixup missing bits
# 
# ChangeSet
#   2004/12/17 15:41:32-08:00 greg@kroah.com 
#   [PATCH] USB: fix up some sparse warnings in the new garmin_gps driver
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/serial/garmin_gps.c
#   2004/12/17 15:37:26-08:00 greg@kroah.com +5 -6
#   USB: fix up some sparse warnings in the new garmin_gps driver
# 
# ChangeSet
#   2004/12/17 15:40:33-08:00 hkneissel@t-online.de 
#   [PATCH] Re: garmin gps driver patch 0.23
#   
#   From: Hermann Kneissel <hkneissel@t-online.de>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/serial/garmin_gps.c
#   2004/12/05 10:55:05-08:00 hkneissel@t-online.de +1542 -0
#   Re: garmin gps driver patch 0.23
# 
# drivers/usb/serial/Makefile
#   2004/12/05 10:44:05-08:00 hkneissel@t-online.de +1 -0
#   Re: garmin gps driver patch 0.23
# 
# drivers/usb/serial/Kconfig
#   2004/12/05 10:44:05-08:00 hkneissel@t-online.de +13 -0
#   Re: garmin gps driver patch 0.23
# 
# drivers/usb/serial/garmin_gps.c
#   2004/12/05 10:55:05-08:00 hkneissel@t-online.de +0 -0
#   BitKeeper file /home/greg/linux/BK/usb-2.6/drivers/usb/serial/garmin_gps.c
# 
# ChangeSet
#   2004/12/17 15:39:44-08:00 stern@rowland.harvard.edu 
#   [PATCH] USB: dummy_hcd: update to match the new endpoint changes
#   
#   Here's the patch to make dummy_hcd build properly once again.  I did some
#   quick light testing to make sure that it still works too.  The patch takes
#   the easy way out by allocating a new private data structure for each URB,
#   just to keep a single united list of all the outstanding URBs.  More
#   extensive changes would be needed to make effective use of the
#   per-endpoint queues now available, and it's probably not worth the effort.
#   
#   
#   Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/gadget/dummy_hcd.c
#   2004/12/17 13:26:37-08:00 stern@rowland.harvard.edu +35 -25
#   USB: dummy_hcd: update to match the new endpoint changes
# 
# ChangeSet
#   2004/12/17 15:39:21-08:00 david-b@pacbell.net 
#   [PATCH] USB: gadget kconfig doc updates
#   
#   This updates the "USB Gadget" Kconfig support:
#   
#       -	Highlighting the the two Documentation/usb files have
#   	information about how to interoperate with MS-Windows
#   	using RNDIS or CDC-ACM;
#   
#       -	Flagging CDC ACM and CDC Ethernet support in the config
#       	menu descriptions;
#   
#       -	Providing a bit more description about what a "gadget driver"
#   	does, for the benefit of folk coming to this part of Linux
#   	with background in similar proprietary driver stacks.
#   
#       -	Pointing to the Linux-USB website for this API, and the
#   	kerneldoc.
#   
#   In short:  make important driver framework information more accessible.
#   
#   Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/gadget/Kconfig
#   2004/12/17 14:20:16-08:00 david-b@pacbell.net +33 -2
#   USB: gadget kconfig doc updates
# 
# ChangeSet
#   2004/12/17 15:30:27-08:00 khali@linux-fr.org 
#   [PATCH] I2C: Discard old driver porting documentation
#   
#   The Documentation/i2c/i2c-old-porting file is outdated. There are no
#   more drivers left to be ported from that old i2c model (from the times
#   of Linux 2.2). Let's simply delete that file.
#   
#   Signed-off-by: Jean Delvare <khali@linux-fr.org>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# BitKeeper/deleted/.del-i2c-old-porting~d27f4c2ae78bed8b
#   2004/12/17 15:30:09-08:00 khali@linux-fr.org +0 -0
#   Delete: Documentation/i2c/i2c-old-porting
# 
# ChangeSet
#   2004/12/17 15:12:52-08:00 chrisw@osdl.org 
#   [PATCH] sysfs: Allocate sysfs_dirent structures from their own slab.
#   
#   * Andrew Morton (akpm@osdl.org) wrote:
#   > That's all well and good, but sysfs_new_dirent() should be using a
#   > standalone slab cache for allocating sysfs_dirent instances.  That way, we
#   > use 36 bytes for each one rather than 64.
#   
#   Reasonable, here's a patch (lightly tested).  Without, size-64 looks
#   like so:
#   
#   size-64             4064   4108     76   52    1 : tunables   32   16 8 : slabdata     79     79      0 : globalstat    4263   4079    79    0 0    0   84    0 : cpustat  15986    337  12286      3
#   
#   And with:
#   
#   size-64             1196   1196     76   52    1 : tunables   32   16 8 : slabdata     23     23      0 : globalstat    1297   1196    23    0 0    0   84    0 : cpustat  12418    108  11349      1
#   sysfs_dir_cache     2862   2916     48   81    1 : tunables   32   16 8 : slabdata     36     36      0 : globalstat    2931   2874    36    0 0    0  113    0 : cpustat   2756    216    110      0
#   
#   
#   Allocate sysfs_dirent structures from their own slab.
#   
#   Signed-off-by: Chris Wright <chrisw@osdl.org>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# fs/sysfs/sysfs.h
#   2004/12/01 13:58:42-08:00 chrisw@osdl.org +2 -1
#   sysfs: Allocate sysfs_dirent structures from their own slab.
# 
# fs/sysfs/mount.c
#   2004/12/01 14:43:44-08:00 chrisw@osdl.org +15 -2
#   sysfs: Allocate sysfs_dirent structures from their own slab.
# 
# fs/sysfs/dir.c
#   2004/12/01 13:29:11-08:00 chrisw@osdl.org +1 -1
#   sysfs: Allocate sysfs_dirent structures from their own slab.
# 
# ChangeSet
#   2004/12/17 14:50:58-08:00 greg@kroah.com 
#   [PATCH] AOE: fix up sparse warnings and get rid of a kmalloc in the aoe driver.
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/block/aoe/aoenet.c
#   2004/12/17 14:48:49-08:00 greg@kroah.com +7 -5
#   AOE: fix up sparse warnings and get rid of a kmalloc in the aoe driver.
# 
# drivers/block/aoe/aoechr.c
#   2004/12/17 14:48:49-08:00 greg@kroah.com +6 -22
#   AOE: fix up sparse warnings and get rid of a kmalloc in the aoe driver.
# 
# drivers/block/aoe/aoeblk.c
#   2004/12/17 14:48:49-08:00 greg@kroah.com +2 -2
#   AOE: fix up sparse warnings and get rid of a kmalloc in the aoe driver.
# 
# drivers/block/aoe/aoe.h
#   2004/12/17 14:48:49-08:00 greg@kroah.com +1 -1
#   AOE: fix up sparse warnings and get rid of a kmalloc in the aoe driver.
# 
# ChangeSet
#   2004/12/17 14:50:31-08:00 ecashin@coraid.com 
#   [PATCH] add ATA over Ethernet driver
#   
#   Provide support for ATA over Ethernet devices
#   
#   Signed-off-by: Ed L. Cashin <ecashin@coraid.com>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/block/aoe/aoenet.c
#   2004/12/17 07:11:25-08:00 ecashin@coraid.com +173 -0
#   add ATA over Ethernet driver
# 
# drivers/block/aoe/aoemain.c
#   2004/12/17 07:11:25-08:00 ecashin@coraid.com +93 -0
#   add ATA over Ethernet driver
# 
# drivers/block/aoe/aoedev.c
#   2004/12/17 07:11:25-08:00 ecashin@coraid.com +194 -0
#   add ATA over Ethernet driver
# 
# drivers/block/aoe/aoecmd.c
#   2004/12/17 07:11:25-08:00 ecashin@coraid.com +627 -0
#   add ATA over Ethernet driver
# 
# drivers/block/aoe/aoechr.c
#   2004/12/17 07:11:25-08:00 ecashin@coraid.com +295 -0
#   add ATA over Ethernet driver
# 
# drivers/block/aoe/aoeblk.c
#   2004/12/17 07:11:25-08:00 ecashin@coraid.com +251 -0
#   add ATA over Ethernet driver
# 
# drivers/block/aoe/aoe.h
#   2004/12/17 07:11:25-08:00 ecashin@coraid.com +163 -0
#   add ATA over Ethernet driver
# 
# drivers/block/aoe/Makefile
#   2004/12/17 07:11:25-08:00 ecashin@coraid.com +6 -0
#   add ATA over Ethernet driver
# 
# Documentation/aoe/status.sh
#   2004/12/17 07:11:25-08:00 ecashin@coraid.com +15 -0
#   add ATA over Ethernet driver
# 
# Documentation/aoe/mkshelf.sh
#   2004/12/17 07:11:25-08:00 ecashin@coraid.com +23 -0
#   add ATA over Ethernet driver
# 
# Documentation/aoe/mkdevs.sh
#   2004/12/17 07:11:25-08:00 ecashin@coraid.com +33 -0
#   add ATA over Ethernet driver
# 
# Documentation/aoe/autoload.sh
#   2004/12/17 07:11:25-08:00 ecashin@coraid.com +17 -0
#   add ATA over Ethernet driver
# 
# drivers/block/aoe/aoenet.c
#   2004/12/17 07:11:25-08:00 ecashin@coraid.com +0 -0
#   BitKeeper file /home/greg/linux/BK/driver-2.6/drivers/block/aoe/aoenet.c
# 
# drivers/block/aoe/aoemain.c
#   2004/12/17 07:11:25-08:00 ecashin@coraid.com +0 -0
#   BitKeeper file /home/greg/linux/BK/driver-2.6/drivers/block/aoe/aoemain.c
# 
# drivers/block/aoe/aoedev.c
#   2004/12/17 07:11:25-08:00 ecashin@coraid.com +0 -0
#   BitKeeper file /home/greg/linux/BK/driver-2.6/drivers/block/aoe/aoedev.c
# 
# drivers/block/aoe/aoecmd.c
#   2004/12/17 07:11:25-08:00 ecashin@coraid.com +0 -0
#   BitKeeper file /home/greg/linux/BK/driver-2.6/drivers/block/aoe/aoecmd.c
# 
# drivers/block/aoe/aoechr.c
#   2004/12/17 07:11:25-08:00 ecashin@coraid.com +0 -0
#   BitKeeper file /home/greg/linux/BK/driver-2.6/drivers/block/aoe/aoechr.c
# 
# drivers/block/aoe/aoeblk.c
#   2004/12/17 07:11:25-08:00 ecashin@coraid.com +0 -0
#   BitKeeper file /home/greg/linux/BK/driver-2.6/drivers/block/aoe/aoeblk.c
# 
# drivers/block/aoe/aoe.h
#   2004/12/17 07:11:25-08:00 ecashin@coraid.com +0 -0
#   BitKeeper file /home/greg/linux/BK/driver-2.6/drivers/block/aoe/aoe.h
# 
# drivers/block/aoe/Makefile
#   2004/12/17 07:11:25-08:00 ecashin@coraid.com +0 -0
#   BitKeeper file /home/greg/linux/BK/driver-2.6/drivers/block/aoe/Makefile
# 
# drivers/block/Kconfig
#   2004/12/17 07:11:25-08:00 ecashin@coraid.com +8 -0
#   add ATA over Ethernet driver
# 
# drivers/Makefile
#   2004/12/17 07:11:25-08:00 ecashin@coraid.com +1 -0
#   add ATA over Ethernet driver
# 
# MAINTAINERS
#   2004/12/17 07:12:42-08:00 ecashin@coraid.com +6 -0
#   add ATA over Ethernet driver
# 
# Documentation/aoe/status.sh
#   2004/12/17 07:11:25-08:00 ecashin@coraid.com +0 -0
#   BitKeeper file /home/greg/linux/BK/driver-2.6/Documentation/aoe/status.sh
# 
# Documentation/aoe/mkshelf.sh
#   2004/12/17 07:11:25-08:00 ecashin@coraid.com +0 -0
#   BitKeeper file /home/greg/linux/BK/driver-2.6/Documentation/aoe/mkshelf.sh
# 
# Documentation/aoe/mkdevs.sh
#   2004/12/17 07:11:25-08:00 ecashin@coraid.com +0 -0
#   BitKeeper file /home/greg/linux/BK/driver-2.6/Documentation/aoe/mkdevs.sh
# 
# Documentation/aoe/autoload.sh
#   2004/12/17 07:11:25-08:00 ecashin@coraid.com +0 -0
#   BitKeeper file /home/greg/linux/BK/driver-2.6/Documentation/aoe/autoload.sh
# 
# Documentation/aoe/aoe.txt
#   2004/12/17 07:11:25-08:00 ecashin@coraid.com +75 -0
#   add ATA over Ethernet driver
# 
# Documentation/aoe/aoe.txt
#   2004/12/17 07:11:25-08:00 ecashin@coraid.com +0 -0
#   BitKeeper file /home/greg/linux/BK/driver-2.6/Documentation/aoe/aoe.txt
# 
# ChangeSet
#   2004/12/17 14:11:24-08:00 galak@linen.sps.mot.com 
#   [PATCH] Driver Core: Add platform_get_resource_byname & platform_get_resource_byirq
#   
#   Adds the ability to find a resource or irq on a platform device by its
#   resource name.  This patch also tweaks how resource names get set.
#   Before, resources names were set to pdev->dev.bus_id, now that only
#   happens if the resource name has not been previous set.
#   
#   All of this allows us to find a resource without assuming what order the
#   resources are in.
#   
#   Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# include/linux/device.h
#   2004/12/08 15:22:36-08:00 galak@linen.sps.mot.com +2 -0
#   Driver Core: Add platform_get_resource_byname & platform_get_resource_byirq
# 
# drivers/base/platform.c
#   2004/12/08 14:59:52-08:00 galak@linen.sps.mot.com +39 -1
#   Driver Core: Add platform_get_resource_byname & platform_get_resource_byirq
# 
# ChangeSet
#   2004/12/17 14:03:28-08:00 pavel@ucw.cz 
#   [PATCH] PCI: add pci_choose_state()
#   
#   Could this go to "after 2.6.10 tree", too? It is a helper that
#   converts system state into PCI state. We really do not want to have
#   this copied into every driver, because it will need to change when
#   system state gets type-checked / expanded to struct.
#   
#   
#   From: Pavel Machek <pavel@ucw.cz>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/pci/pci.c
#   2004/11/14 14:36:46-08:00 pavel@ucw.cz +24 -0
#   PCI: add pci_choose_state()
# 
# ChangeSet
#   2004/12/17 14:02:40-08:00 greg@kroah.com 
#   [PATCH] PCI: fix up function calls for CONFIG_PCI=N
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# include/linux/pci.h
#   2004/12/17 13:59:08-08:00 greg@kroah.com +2 -2
#   PCI: fix up function calls for CONFIG_PCI=N
# 
# ChangeSet
#   2004/12/17 14:01:35-08:00 pavel@ucw.cz 
#   [PATCH] PCI: Cleanup PCI power states
#   
#   > > > > This is step 0 before adding type-safety to PCI layer... It introduces
#   > > > > constants and uses them to clean driver up. I'd like this to go in
#   > > > > now, so that I can convert drivers during 2.6.10... Please apply,
#   
#   Okay, here it is, slightly expanded version. It actually makes use of
#   newly defined type for type-checking purposes; still no code changes.
#   
#   From: Pavel Machek <pavel@ucw.cz>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# include/linux/pci.h
#   2004/12/17 13:50:59-08:00 pavel@ucw.cz +11 -3
#   PCI: Cleanup PCI power states
# 
# drivers/pci/pci.c
#   2004/12/17 13:50:20-08:00 pavel@ucw.cz +4 -4
#   PCI: Cleanup PCI power states
# 
# ChangeSet
#   2004/12/17 13:44:31-08:00 macro@mips.com 
#   [PATCH] PCI: Don't touch BARs of host bridges
#   
#    BARs of host bridges often have special meaning and AFAIK are best left
#   to be setup by the firmware or system-specific startup code and kept
#   intact by the generic resource handler.  For example a couple of host
#   bridges used for MIPS processors interpret BARs as target-mode decoders
#   for accessing host memory by PCI masters (which is quite reasonable).
#   For them it's desirable to keep their decoded address range overlapping
#   with the host RAM for simplicity if nothing else (I can imagine running
#   out of address space with lots of memory and 32-bit PCI with no DAC
#   support in the participating devices).
#   
#    This is already the case with the i386 and ppc platform-specific PCI
#   resource allocators.  Please consider the following change for the generic
#   allocator.  Currently we have a pile of hacks implemented for host bridges
#   to be left untouched and I'd be pleased to remove them.
#   
#   From: "Maciej W. Rozycki" <macro@mips.com>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/pci/setup-bus.c
#   2004/12/08 05:32:06-08:00 macro@mips.com +7 -2
#   PCI: Don't touch BARs of host bridges
# 
# ChangeSet
#   2004/12/17 13:44:10-08:00 dhowells@redhat.com 
#   [PATCH] PCI: Make pci_set_power_state() check register version
#   
#   The attached patch makes pci_set_power_state() check the PM register version
#   and ignore non-version 2 registers. Trampling on earlier version PM registers
#   such as are sported by the Promise 20269 IDE card can cause the system to
#   hang.
#   
#   Signed-Off-By: David Howells <dhowells@redhat.com>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/pci/pci.c
#   2004/12/17 08:50:10-08:00 dhowells@redhat.com +9 -3
#   PCI: Make pci_set_power_state() check register version
# 
# ChangeSet
#   2004/12/17 13:32:32-08:00 khali@linux-fr.org 
#   [PATCH] I2C: i2c-nforce2 supports the nForce3 250Gb
#   
#   One more PCI ID for the i2c-nforce2 driver, this time for the nForce3
#   250Gb variant. Tested, works.
#   
#   (Also cleans up a duplicate define in pci_ids.h.)
#   
#   Signed-off-by: Jean Delvare <khali@linux-fr.org>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# include/linux/pci_ids.h
#   2004/12/17 10:45:43-08:00 khali@linux-fr.org +1 -1
#   I2C: i2c-nforce2 supports the nForce3 250Gb
# 
# drivers/i2c/busses/i2c-nforce2.c
#   2004/12/17 10:46:33-08:00 khali@linux-fr.org +3 -0
#   I2C: i2c-nforce2 supports the nForce3 250Gb
# 
# ChangeSet
#   2004/12/17 11:45:25-08:00 david-b@pacbell.net 
#   [PATCH] USB: EHCI periodic schedule tree
#   
#   This implements an interrupt schedule tree for EHCI; the bug's listed
#   in bugzilla (http://bugme.osdl.org/show_bug.cgi?id=3374) and affects
#   the ability to handle certain devices and configurations.
#   
#   Now multiple interrupt transfers are supported per microframe.  Scheduling
#   prevents overcommit for reserved bandwidth and, for full/low speed devices,
#   the relevant transaction translator's buffer.  (TT-per-port hubs are already
#   initialized into the multi-TT mode.)
#   
#   The interrupt transfer schedule is arranged in a sparse tree, just like OHCI.
#   A key difference is that OHCI implements a "best fit" scheduling policy,
#   while this implements "first fit" for EHCI.  (There's no load balancing;
#   it's not really needed in most users' configurations.)
#   
#   There's also logic here to handle "high bandwidth" transfers, guaranteed
#   streaming of from 8-24 KB of data per millisecond.
#   
#   Also includes some related cleanups for descheduling interrupt transfers.
#   Those will probably be split into a separate patch.
#   
#   Against 2.6.10-rc3-bk5 ... this hasn't recently been tested much, but the
#   main old bug seems to be gone so it shouldn't make too much trouble.
#   
#   
#   From: David Brownell <david-b@pacbell.net>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/host/ehci-sched.c
#   2004/12/09 20:16:58-08:00 david-b@pacbell.net +207 -147
#   USB: EHCI periodic schedule tree
# 
# drivers/usb/host/ehci-q.c
#   2004/12/09 11:05:31-08:00 david-b@pacbell.net +7 -5
#   USB: EHCI periodic schedule tree
# 
# drivers/usb/host/ehci-hcd.c
#   2004/12/09 19:14:10-08:00 david-b@pacbell.net +13 -6
#   USB: EHCI periodic schedule tree
# 
# ChangeSet
#   2004/12/17 11:42:46-08:00 phil@ipom.com 
#   [PATCH] USB Storage: unusual_devs: prolific atapi controler
#   
#   This adds an unusual devices entry for a Prolific ATAPI-6 conmtroller
#   that needs the FIX_CAPACITY flag.
#   
#   
#   Signed-off-by: Alex Butcher <alex.butcher@assursys.co.uk>
#   Signed-off-by: Phil Dibowitz <phil@ipom.com>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/storage/unusual_devs.h
#   2004/12/17 11:42:25-08:00 phil@ipom.com +7 -0
#   [PATCH] USB Storage: unusual_devs: prolific atapi controler
#   
#   This adds an unusual devices entry for a Prolific ATAPI-6 conmtroller
#   that needs the FIX_CAPACITY flag.
#   
#   
#   Signed-off-by: Alex Butcher <alex.butcher@assursys.co.uk>
#   Signed-off-by: Phil Dibowitz <phil@ipom.com>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# ChangeSet
#   2004/12/17 11:41:58-08:00 david-b@pacbell.net 
#   [PATCH] USB: EHCI "park" mode disabled
#   
#   This changes the default initialization of the EHCI "park" mode so
#   that silicon which supports it (NF2, NF3, ALI, GeneSys, ...) will not
#   use it unless explicitly told to do so by a (new) module parameter.
#   
#   This is a workaround for some problems observed on some NF2 systems:
#   
#       - Throughput ("hdparm -tT") is lower than expected with recent high
#         performance drives (Maxtor) ... disabling "park" increases it by
#         about 2 MByte/sec, but it's still much slower than expected.
#         (USB analyser traces should be informative here.)
#   
#       - Some data corruption observed on reads from drives using an
#         ALI storage adapter ... disabling "park" stops the corruption.
#         (Strongly suggestive of hardware or peripheral firmware bugs;
#         multiple back-to-back bulk-IN packets should work just fine.)
#   
#   The "don't use park mode" workaround will at most reduce USB (and PCI)
#   throughput slightly on systems that work as expected, but some of those
#   can re-enable the "park" mode.
#   
#   Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/host/ehci-hcd.c
#   2004/12/17 11:41:37-08:00 david-b@pacbell.net +22 -5
#   [PATCH] USB: EHCI "park" mode disabled
#   
#   This changes the default initialization of the EHCI "park" mode so
#   that silicon which supports it (NF2, NF3, ALI, GeneSys, ...) will not
#   use it unless explicitly told to do so by a (new) module parameter.
#   
#   This is a workaround for some problems observed on some NF2 systems:
#   
#       - Throughput ("hdparm -tT") is lower than expected with recent high
#         performance drives (Maxtor) ... disabling "park" increases it by
#         about 2 MByte/sec, but it's still much slower than expected.
#         (USB analyser traces should be informative here.)
#   
#       - Some data corruption observed on reads from drives using an
#         ALI storage adapter ... disabling "park" stops the corruption.
#         (Strongly suggestive of hardware or peripheral firmware bugs;
#         multiple back-to-back bulk-IN packets should work just fine.)
#   
#   The "don't use park mode" workaround will at most reduce USB (and PCI)
#   throughput slightly on systems that work as expected, but some of those
#   can re-enable the "park" mode.
#   
#   Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# ChangeSet
#   2004/12/17 11:41:02-08:00 mdharm-usb@one-eyed-alien.net 
#   [PATCH] USB Storage: Increase Genesys delay
#   
#   This is patch as436 from Alan Stern.
#   
#   This patch increases the delay used for Genesys devices about 10%.  At
#   least one user reports that this created a significant improvement in
#   operation.
#   
#   Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
#   Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/storage/transport.c
#   2004/12/17 11:40:27-08:00 mdharm-usb@one-eyed-alien.net +3 -2
#   [PATCH] USB Storage: Increase Genesys delay
#   
#   This is patch as436 from Alan Stern.
#   
#   This patch increases the delay used for Genesys devices about 10%.  At
#   least one user reports that this created a significant improvement in
#   operation.
#   
#   Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
#   Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# ChangeSet
#   2004/12/17 11:39:40-08:00 david-b@pacbell.net 
#   [PATCH] USB: HCDs and per-device state (16/15)
#   
#   SL811 changes getting rid of the "hcd_dev" support, using
#   usb_host_endpoint to hold the QH.  This also eliminates the
#   "sl811h_req" data type.  Compile-tested only!
#   
#   Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/host/sl811.h
#   2004/12/17 11:39:15-08:00 david-b@pacbell.net +1 -9
#   [PATCH] USB: HCDs and per-device state (16/15)
#   
#   SL811 changes getting rid of the "hcd_dev" support, using
#   usb_host_endpoint to hold the QH.  This also eliminates the
#   "sl811h_req" data type.  Compile-tested only!
#   
#   Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/host/sl811-hcd.c
#   2004/12/17 11:39:15-08:00 david-b@pacbell.net +52 -97
#   [PATCH] USB: HCDs and per-device state (16/15)
#   
#   SL811 changes getting rid of the "hcd_dev" support, using
#   usb_host_endpoint to hold the QH.  This also eliminates the
#   "sl811h_req" data type.  Compile-tested only!
#   
#   Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# ChangeSet
#   2004/12/16 16:14:27-08:00 matthew@wil.cx 
#   [PATCH] PCI: cope with duplicate bus numbers better
#   
#   Make pci_scan_bridge() a little more robust in the presence of broken
#   firmware.
#   
#   Signed-off-by: Matthew Wilcox <matthew@wil.cx>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/pci/probe.c
#   2004/12/13 10:27:42-08:00 matthew@wil.cx +12 -1
#   PCI: cope with duplicate bus numbers better
# 
# ChangeSet
#   2004/12/16 15:59:38-08:00 eike-hotplug@sf-tec.de 
#   [PATCH] PCI Hotplug: ibmphp_core.c: useless casts
#   
#   this patch removes some useless casts to and from (void *) as well as a cast
#   where a (struct pci_bus *) is cast to a (struct pci_bus *).
#   
#   Signed-off-by: Rolf Eike Beer <eike-hotplug@sf-tec.de>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/pci/hotplug/ibmphp_core.c
#   2004/12/10 08:06:11-08:00 eike-hotplug@sf-tec.de +18 -24
#   PCI Hotplug: ibmphp_core.c: useless casts
# 
# ChangeSet
#   2004/12/16 15:59:19-08:00 eike-hotplug@sf-tec.de 
#   [PATCH] PCI Hotplug: ibmphp_core.c: coding style
#   
#   this is a cleanup patch for ibmphp_core.c. It does not change anything, it
#   only wraps long lines and removes spaces before opening braces of funtions.
#   
#   Signed-off-by: Rolf Eike Beer <eike-hotplug@sf-tec.de>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/pci/hotplug/ibmphp_core.c
#   2004/12/10 08:06:11-08:00 eike-hotplug@sf-tec.de +432 -356
#   PCI Hotplug: ibmphp_core.c: coding style
# 
# ChangeSet
#   2004/12/16 15:59:03-08:00 bunk@stusta.de 
#   [PATCH] PCI Hotplug: drivers/pci/hotplug/ : simply use MODULE
#   
#   The patch below lets five files under drivers/pci/hotplug/ simply use
#   MODULE to check whether they are compiled as part of a module.
#   
#   MODULE is the common idiom for checking whether a file is built as part
#   of a module.
#   
#   In theory, my patch shouldn't have made any difference, but if you look
#   closely, the previous #if's in cpcihp_generic.c and cpci_hotplug_pci.c
#   weren't correct.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/pci/hotplug/shpchp.h
#   2004/12/11 08:40:03-08:00 bunk@stusta.de +1 -1
#   PCI Hotplug: drivers/pci/hotplug/ : simply use MODULE
# 
# drivers/pci/hotplug/ibmphp.h
#   2004/12/11 08:35:26-08:00 bunk@stusta.de +1 -1
#   PCI Hotplug: drivers/pci/hotplug/ : simply use MODULE
# 
# drivers/pci/hotplug/fakephp.c
#   2004/12/11 08:39:23-08:00 bunk@stusta.de +1 -1
#   PCI Hotplug: drivers/pci/hotplug/ : simply use MODULE
# 
# drivers/pci/hotplug/cpcihp_generic.c
#   2004/12/11 08:35:56-08:00 bunk@stusta.de +1 -1
#   PCI Hotplug: drivers/pci/hotplug/ : simply use MODULE
# 
# drivers/pci/hotplug/cpci_hotplug_pci.c
#   2004/12/11 08:38:58-08:00 bunk@stusta.de +1 -1
#   PCI Hotplug: drivers/pci/hotplug/ : simply use MODULE
# 
# ChangeSet
#   2004/12/16 15:58:45-08:00 bunk@stusta.de 
#   [PATCH] PCI: arch/i386/pci/: make some code static
#   
#   The patch below makes some needlessly global code static.
#   
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# arch/i386/pci/pci.h
#   2004/12/11 15:05:09-08:00 bunk@stusta.de +0 -2
#   PCI: arch/i386/pci/: make some code static
# 
# arch/i386/pci/irq.c
#   2004/12/11 15:11:24-08:00 bunk@stusta.de +3 -1
#   PCI: arch/i386/pci/: make some code static
# 
# arch/i386/pci/fixup.c
#   2004/12/11 15:04:46-08:00 bunk@stusta.de +2 -2
#   PCI: arch/i386/pci/: make some code static
# 
# ChangeSet
#   2004/12/16 15:58:28-08:00 tglx@linutronix.de 
#   [PATCH] PCI: Fix debug statement
#   
#   Make the debug of setup-irq.c compile and work again
#   
#   Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/pci/setup-irq.c
#   2004/12/15 16:00:00-08:00 tglx@linutronix.de +2 -1
#   PCI: Fix debug statement
# 
# ChangeSet
#   2004/12/16 14:39:21-08:00 phil@ipom.com 
#   [PATCH] USB Storage: unusual_devs: prolific atapi controler
#   
#   This adds an unusual devices entry for a Prolific ATAPI-6 conmtroller
#   that needs the FIX_CAPACITY flag.
#   
#   
#   Signed-off-by: Alex Butcher <alex.butcher@assursys.co.uk>
#   Signed-off-by: Phil Dibowitz <phil@ipom.com>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/storage/unusual_devs.h
#   2004/12/14 23:49:23-08:00 phil@ipom.com +7 -0
#   USB Storage: unusual_devs: prolific atapi controler
# 
# ChangeSet
#   2004/12/16 13:19:24-08:00 greg@kroah.com 
#   USB: convert uhci-hcd driver to use debugfs.
#   
#   Look, we saved 24 lines of code...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/host/uhci-hcd.h
#   2004/12/16 13:19:18-08:00 greg@kroah.com +2 -4
#   USB: convert uhci-hcd driver to use debugfs.
#   
#   Look, we saved 24 lines of code...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/host/uhci-hcd.c
#   2004/12/16 13:19:17-08:00 greg@kroah.com +20 -40
#   USB: convert uhci-hcd driver to use debugfs.
#   
#   Look, we saved 24 lines of code...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/host/uhci-debug.c
#   2004/12/16 13:19:17-08:00 greg@kroah.com +17 -19
#   USB: convert uhci-hcd driver to use debugfs.
#   
#   Look, we saved 24 lines of code...
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# ChangeSet
#   2004/12/16 13:16:18-08:00 greg@kroah.com 
#   debugfs: add debugfs
#   
#   debugfs is a filesystem that is just for debug data.  Start moving stuff out of proc and sysfs now :)
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# include/linux/debugfs.h
#   2004/12/16 13:16:11-08:00 greg@kroah.com +90 -0
# 
# fs/debugfs/inode.c
#   2004/12/16 13:16:11-08:00 greg@kroah.com +315 -0
# 
# include/linux/debugfs.h
#   2004/12/16 13:16:11-08:00 greg@kroah.com +0 -0
#   BitKeeper file /home/greg/linux/BK/driver-2.6/include/linux/debugfs.h
# 
# fs/debugfs/inode.c
#   2004/12/16 13:16:11-08:00 greg@kroah.com +0 -0
#   BitKeeper file /home/greg/linux/BK/driver-2.6/fs/debugfs/inode.c
# 
# fs/debugfs/file.c
#   2004/12/16 13:16:10-08:00 greg@kroah.com +262 -0
# 
# fs/debugfs/Makefile
#   2004/12/16 13:16:10-08:00 greg@kroah.com +4 -0
# 
# lib/Kconfig.debug
#   2004/12/16 13:16:10-08:00 greg@kroah.com +10 -0
#   debugfs: add debugfs
#   
#   debugfs is a filesystem that is just for debug data.  Start moving stuff out of proc and sysfs now :)
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# fs/debugfs/file.c
#   2004/12/16 13:16:10-08:00 greg@kroah.com +0 -0
#   BitKeeper file /home/greg/linux/BK/driver-2.6/fs/debugfs/file.c
# 
# fs/debugfs/Makefile
#   2004/12/16 13:16:10-08:00 greg@kroah.com +0 -0
#   BitKeeper file /home/greg/linux/BK/driver-2.6/fs/debugfs/Makefile
# 
# fs/Makefile
#   2004/12/16 13:16:10-08:00 greg@kroah.com +1 -0
#   debugfs: add debugfs
#   
#   debugfs is a filesystem that is just for debug data.  Start moving stuff out of proc and sysfs now :)
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# Documentation/DocBook/kernel-api.tmpl
#   2004/12/16 13:16:10-08:00 greg@kroah.com +9 -0
#   debugfs: add debugfs
#   
#   debugfs is a filesystem that is just for debug data.  Start moving stuff out of proc and sysfs now :)
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# ChangeSet
#   2004/12/16 01:32:04-05:00 davej@redhat.com 
#   [AGPGART] Fix masking (causes crash on 460GX).
#   virt_to_page(phys_to_virt(masked_addr)) still works.  But the 460GX
#   sticks bits in the middle, so the free blows up.
#   
#   I've tested the agp_allocate_memory() change on Intel 460GX.  I don't have
#   hardware to test the Intel MCH change, but it looks to me like the same
#   problem.
#   
#   Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# drivers/char/agp/intel-mch-agp.c
#   2004/12/16 01:31:44-05:00 davej@redhat.com +1 -1
#   [AGPGART] Fix masking (causes crash on 460GX).
#   virt_to_page(phys_to_virt(masked_addr)) still works.  But the 460GX
#   sticks bits in the middle, so the free blows up.
#   
#   I've tested the agp_allocate_memory() change on Intel 460GX.  I don't have
#   hardware to test the Intel MCH change, but it looks to me like the same
#   problem.
#   
#   Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# drivers/char/agp/generic.c
#   2004/12/16 01:31:44-05:00 davej@redhat.com +1 -2
#   [AGPGART] Fix masking (causes crash on 460GX).
#   virt_to_page(phys_to_virt(masked_addr)) still works.  But the 460GX
#   sticks bits in the middle, so the free blows up.
#   
#   I've tested the agp_allocate_memory() change on Intel 460GX.  I don't have
#   hardware to test the Intel MCH change, but it looks to me like the same
#   problem.
#   
#   Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# ChangeSet
#   2004/12/16 01:26:04-05:00 davej@redhat.com 
#   [AGPGART] Announce Intel 460GX when found.
#   
#   Most AGP chipset drivers announce the bridge found, and i460gx used
#   to, but it seems to have gotten dropped somewhere along the way.
#   
#   Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# drivers/char/agp/i460-agp.c
#   2004/12/16 01:25:44-05:00 davej@redhat.com +2 -0
#   [AGPGART] Announce Intel 460GX when found.
#   
#   Most AGP chipset drivers announce the bridge found, and i460gx used
#   to, but it seems to have gotten dropped somewhere along the way.
#   
#   Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# ChangeSet
#   2004/12/15 20:46:09-05:00 davej@redhat.com 
#   [AGPGART] Add missing cache flush to the generic remove routine.
#   
#   It's not entirely clear whether this is needed, or it was working around
#   the missing PCI Posting workaround.  Until we know any better, make
#   the generic routine do what the per chipset routines do.
#   
#   Spotted-by: Alan Cox
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# drivers/char/agp/generic.c
#   2004/12/15 20:45:49-05:00 davej@redhat.com +1 -0
#   [AGPGART] Add missing cache flush to the generic remove routine.
#   
#   It's not entirely clear whether this is needed, or it was working around
#   the missing PCI Posting workaround.  Until we know any better, make
#   the generic routine do what the per chipset routines do.
#   
#   Spotted-by: Alan Cox
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# ChangeSet
#   2004/12/15 20:43:26-05:00 davej@redhat.com 
#   [AGPGART] Remove unnecessary parenthesis on return statements.
#   
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# drivers/char/agp/intel-mch-agp.c
#   2004/12/15 20:43:09-05:00 davej@redhat.com +18 -18
#   [AGPGART] Remove unnecessary parenthesis on return statements.
#   
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# drivers/char/agp/intel-agp.c
#   2004/12/15 20:43:09-05:00 davej@redhat.com +28 -28
#   [AGPGART] Remove unnecessary parenthesis on return statements.
#   
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# drivers/char/agp/i460-agp.c
#   2004/12/15 20:43:09-05:00 davej@redhat.com +2 -2
#   [AGPGART] Remove unnecessary parenthesis on return statements.
#   
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# drivers/char/agp/efficeon-agp.c
#   2004/12/15 20:43:09-05:00 davej@redhat.com +2 -2
#   [AGPGART] Remove unnecessary parenthesis on return statements.
#   
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# ChangeSet
#   2004/12/15 20:30:41-05:00 davej@redhat.com 
#   [AGPGART] Another missing PCI Posting bugfix.
#   
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# drivers/char/agp/sworks-agp.c
#   2004/12/15 20:30:19-05:00 davej@redhat.com +1 -0
#   [AGPGART] Another missing PCI Posting bugfix.
#   
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# ChangeSet
#   2004/12/15 20:24:52-05:00 davej@redhat.com 
#   [AGPGART] More PCI Posting bugs.
#   
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# drivers/char/agp/nvidia-agp.c
#   2004/12/15 20:24:29-05:00 davej@redhat.com +3 -1
#   [AGPGART] More PCI Posting bugs.
#   
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# drivers/char/agp/generic.c
#   2004/12/15 20:24:29-05:00 davej@redhat.com +9 -3
#   [AGPGART] More PCI Posting bugs.
#   
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# drivers/char/agp/amd64-agp.c
#   2004/12/15 20:24:29-05:00 davej@redhat.com +1 -0
#   [AGPGART] More PCI Posting bugs.
#   
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# ChangeSet
#   2004/12/15 19:56:29-05:00 davej@redhat.com 
#   [AGPGART] Fix up PCI posting bugs.
#   Also remove a pointless wrapper.
#   
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# drivers/char/agp/sworks-agp.c
#   2004/12/15 19:54:35-05:00 davej@redhat.com +12 -13
#   [AGPGART] Fix up PCI posting bugs.
#   Also remove a pointless wrapper.
#   
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# drivers/char/agp/intel-mch-agp.c
#   2004/12/15 19:54:35-05:00 davej@redhat.com +22 -18
#   [AGPGART] Fix up PCI posting bugs.
#   Also remove a pointless wrapper.
#   
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# drivers/char/agp/intel-agp.c
#   2004/12/15 19:54:34-05:00 davej@redhat.com +55 -53
#   [AGPGART] Fix up PCI posting bugs.
#   Also remove a pointless wrapper.
#   
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# drivers/char/agp/hp-agp.c
#   2004/12/15 19:54:34-05:00 davej@redhat.com +28 -23
#   [AGPGART] Fix up PCI posting bugs.
#   Also remove a pointless wrapper.
#   
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# drivers/char/agp/ati-agp.c
#   2004/12/15 19:54:34-05:00 davej@redhat.com +12 -5
#   [AGPGART] Fix up PCI posting bugs.
#   Also remove a pointless wrapper.
#   
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# drivers/char/agp/amd-k7-agp.c
#   2004/12/15 19:54:34-05:00 davej@redhat.com +19 -12
#   [AGPGART] Fix up PCI posting bugs.
#   Also remove a pointless wrapper.
#   
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# drivers/char/agp/agp.h
#   2004/12/15 19:54:34-05:00 davej@redhat.com +0 -10
#   [AGPGART] Fix up PCI posting bugs.
#   Also remove a pointless wrapper.
#   
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# ChangeSet
#   2004/12/15 16:38:01-08:00 david-b@pacbell.net 
#   [PATCH] USB: better messages for "no-IRQ" cases (15/15)
#   
#   This changes the usbcore message about HCD IRQ problems so it makes
#   sense on systems without ACPI or an APIC.  It also updates the comments;
#   the issue doesn't appiear only with PCI, and with the recent enumeration
#   changes it doesn't happen just with set_address either.
#   
#   Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/core/hcd.c
#   2004/11/27 19:12:58-08:00 david-b@pacbell.net +4 -3
#   USB: better messages for "no-IRQ" cases (15/15)
# 
# ChangeSet
#   2004/12/15 16:37:38-08:00 david-b@pacbell.net 
#   [PATCH] USB: UHCI and HCD API change (14/15)
#   
#   UHCI changes to match the updated HCD glue calls.  Since it's handed the
#   relevant endpoint queue on a silver platter, the driver no longer needs
#   to search anything to find the queue entries.
#   
#   Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/host/uhci-hcd.c
#   2004/11/25 14:34:58-08:00 david-b@pacbell.net +5 -34
#   USB: UHCI and HCD API change (14/15)
# 
# ChangeSet
#   2004/12/15 16:37:08-08:00 david-b@pacbell.net 
#   [PATCH] USB: OHCI and HCD API changes (13/15)
#   
#   Updates the OHCI HCD to match API updates.  This includes both new
#   changes (struct hcd_dev gone) and older ones (endpoints now properly
#   enabled/disabled, so "re"init paths aren't needed).
#   
#   Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/host/ohci-q.c
#   2004/11/28 02:18:33-08:00 david-b@pacbell.net +20 -26
#   USB: OHCI and HCD API changes (13/15)
# 
# drivers/usb/host/ohci-hcd.c
#   2004/11/28 01:49:39-08:00 david-b@pacbell.net +9 -14
#   USB: OHCI and HCD API changes (13/15)
# 
# ChangeSet
#   2004/12/15 16:36:14-08:00 david-b@pacbell.net 
#   [PATCH] USB: EHCI and HCD API updates (12/15)
#   
#   Updates the EHCI HCD to match API updates.  This includes both new
#   changes (struct hcd_dev gone) and older ones (endpoints now properly
#   enabled/disabled, so "re"init paths aren't needed).  Hmm, the ISO
#   stuff could avoid that lookup now too.
#   
#   Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/host/ehci.h
#   2004/11/28 12:58:17-08:00 david-b@pacbell.net +2 -1
#   USB: EHCI and HCD API updates (12/15)
# 
# drivers/usb/host/ehci-sched.c
#   2004/11/28 01:49:39-08:00 david-b@pacbell.net +14 -19
#   USB: EHCI and HCD API updates (12/15)
# 
# drivers/usb/host/ehci-q.c
#   2004/11/28 02:22:29-08:00 david-b@pacbell.net +6 -27
#   USB: EHCI and HCD API updates (12/15)
# 
# drivers/usb/host/ehci-hcd.c
#   2004/11/28 01:49:39-08:00 david-b@pacbell.net +8 -12
#   USB: EHCI and HCD API updates (12/15)
# 
# ChangeSet
#   2004/12/15 16:35:49-08:00 david-b@pacbell.net 
#   [PATCH] USB: maintain usb_host_endpoint.urb_list (11/15)
#   
#   This patch changes the HCD glue code to use the URB queue now kept in
#   usb_host_endpoint, and matching HCD API changes.
#   
#   Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/core/usb.c
#   2004/11/28 03:03:48-08:00 david-b@pacbell.net +1 -0
#   USB: maintain usb_host_endpoint.urb_list (11/15)
# 
# drivers/usb/core/message.c
#   2004/11/28 01:49:39-08:00 david-b@pacbell.net +1 -1
#   USB: maintain usb_host_endpoint.urb_list (11/15)
# 
# drivers/usb/core/hcd.c
#   2004/11/28 03:03:48-08:00 david-b@pacbell.net +28 -30
#   USB: maintain usb_host_endpoint.urb_list (11/15)
# 
# drivers/usb/core/config.c
#   2004/11/28 01:49:39-08:00 david-b@pacbell.net +1 -0
#   USB: maintain usb_host_endpoint.urb_list (11/15)
# 
# ChangeSet
#   2004/12/15 16:35:26-08:00 david-b@pacbell.net 
#   [PATCH] USB: remove some now-unused HCD infrastructure (10/15)
#   
#   This removes the code supporting usb_device->hcpriv allocation/deallocation,
#   and hcd_dev-dev_list, from usbcore and the HCDs.
#   
#   Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/host/ohci-sa1111.c
#   2004/11/23 15:58:24-08:00 david-b@pacbell.net +0 -2
#   USB: remove some now-unused HCD infrastructure (10/15)
# 
# drivers/usb/host/ohci-pxa27x.c
#   2004/11/23 15:58:24-08:00 david-b@pacbell.net +0 -2
#   USB: remove some now-unused HCD infrastructure (10/15)
# 
# drivers/usb/host/ohci-omap.c
#   2004/11/24 14:11:42-08:00 david-b@pacbell.net +0 -1
#   USB: remove some now-unused HCD infrastructure (10/15)
# 
# drivers/usb/host/ohci-lh7a404.c
#   2004/11/23 15:58:24-08:00 david-b@pacbell.net +0 -2
#   USB: remove some now-unused HCD infrastructure (10/15)
# 
# drivers/usb/core/usb.c
#   2004/11/27 21:40:33-08:00 david-b@pacbell.net +0 -9
#   USB: remove some now-unused HCD infrastructure (10/15)
# 
# drivers/usb/core/hcd.c
#   2004/11/25 18:21:39-08:00 david-b@pacbell.net +0 -74
#   USB: remove some now-unused HCD infrastructure (10/15)
# 
# drivers/usb/core/hcd-pci.c
#   2004/11/23 15:58:24-08:00 david-b@pacbell.net +0 -2
#   USB: remove some now-unused HCD infrastructure (10/15)
# 
# ChangeSet
#   2004/12/15 16:35:03-08:00 david-b@pacbell.net 
#   [PATCH] USB: HCD/usb_bus interface cleanup (9/15)
#   
#   This changes the usbcore interfaces provided to HCDs:
#   
#     - Remove usb_device->hcpriv and it allocation/deallocation hooks
#   
#     - Replace struct hcd_dev with more appropriate per-endpoint state
#   
#     - Update HCD apis to use usb_host_endpoint in key places
#   
#   Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# include/linux/usb.h
#   2004/11/27 21:57:16-08:00 david-b@pacbell.net +14 -3
#   USB: HCD/usb_bus interface cleanup (9/15)
# 
# drivers/usb/core/hcd.h
#   2004/11/24 18:46:01-08:00 david-b@pacbell.net +6 -14
#   USB: HCD/usb_bus interface cleanup (9/15)
# 
# ChangeSet
#   2004/12/15 16:34:41-08:00 david-b@pacbell.net 
#   [PATCH] USB: usbtest and usb_dev->epmaxpacket (8/15)
#   
#   Makes usbtest stop referencing the udev->epmaxpacket[] arrays.
#   
#   Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/misc/usbtest.c
#   2004/11/27 15:14:58-08:00 david-b@pacbell.net +2 -2
#   USB: usbtest and usb_dev->epmaxpacket (8/15)
# 
# ChangeSet
#   2004/12/15 16:34:18-08:00 david-b@pacbell.net 
#   [PATCH] USB: EHCI HCD and usb_dev->epmaxpacket (7/15)
#   
#   Makes EHCI stop referencing the udev->epmaxpacket[] arrays.
#   
#   Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/host/ehci-sched.c
#   2004/11/27 15:14:57-08:00 david-b@pacbell.net +1 -2
#   USB: EHCI HCD and usb_dev->epmaxpacket (7/15)
# 
# ChangeSet
#   2004/12/15 16:33:56-08:00 david-b@pacbell.net 
#   [PATCH] USB: CRIS HCD and usb_dev->epmaxpacket (6/15)
#   
#   Makes the CRIS HCD stop referencing the udev->epmaxpacket[] arrays.
#   Also makes it stop providing device allocate/deallocate routines;
#   this HCD doesn't need them, and a later patch will remove that API.
#   
#   Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/host/hc_crisv10.c
#   2004/11/27 15:14:57-08:00 david-b@pacbell.net +1 -19
#   USB: CRIS HCD and usb_dev->epmaxpacket (6/15)
# 
# ChangeSet
#   2004/12/15 16:33:30-08:00 david-b@pacbell.net 
#   [PATCH] USB: auerswald and usb_dev->ep[] (5/15)
#   
#   Update the auerswald driver to stop using the now-vanished
#   usb_epnum_to_ep_desc() function.
#   
#   Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/misc/auerswald.c
#   2004/11/27 15:14:57-08:00 david-b@pacbell.net +6 -4
#   USB: auerswald and usb_dev->ep[] (5/15)
# 
# ChangeSet
#   2004/12/15 16:33:06-08:00 david-b@pacbell.net 
#   [PATCH] USB: ALSA and usb_dev->ep[] (4/15)
#   
#   Makes an ALSA audio driver stop referencing the udev->epmaxpacket[] arrays.
#   
#   Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# sound/usb/usx2y/usbusx2yaudio.c
#   2004/11/27 15:14:58-08:00 david-b@pacbell.net +9 -2
#   USB: ALSA and usb_dev->ep[] (4/15)
# 
# ChangeSet
#   2004/12/15 16:32:41-08:00 david-b@pacbell.net 
#   [PATCH] USB: usbfs changes for usb_dev->ep[] (3/15)
#   
#   Updates usbfs to stop using usb_epnum_to_ep_desc().  In the process,
#   it acquires better error detection on its urb submit path.
#   
#   Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/core/devio.c
#   2004/11/27 15:14:57-08:00 david-b@pacbell.net +25 -14
#   USB: usbfs changes for usb_dev->ep[] (3/15)
# 
# ChangeSet
#   2004/12/15 16:32:16-08:00 david-b@pacbell.net 
#   [PATCH] USB: usbcore changes for usb_dev->ep[](2/15)
#   
#   This patch updates usbcore to match interface changes in the previous patch.
#   
#    - udev->ep[] arrays are updated during config change events and
#      as needed during enumeration;
#   
#    - usb_epnum_to_ep_desc() vanishes;
#   
#    - so do the udev->epmaxpacket[] arrays.
#   
#   Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/core/usb.h
#   2004/11/27 15:14:57-08:00 david-b@pacbell.net +0 -2
#   USB: usbcore changes for usb_dev->ep[](2/15)
# 
# drivers/usb/core/usb.c
#   2004/11/27 15:25:45-08:00 david-b@pacbell.net +5 -39
#   USB: usbcore changes for usb_dev->ep[](2/15)
# 
# drivers/usb/core/urb.c
#   2004/11/27 15:14:57-08:00 david-b@pacbell.net +1 -1
#   USB: usbcore changes for usb_dev->ep[](2/15)
# 
# drivers/usb/core/message.c
#   2004/11/27 15:33:11-08:00 david-b@pacbell.net +25 -20
#   USB: usbcore changes for usb_dev->ep[](2/15)
# 
# drivers/usb/core/hub.c
#   2004/11/27 15:14:57-08:00 david-b@pacbell.net +25 -20
#   USB: usbcore changes for usb_dev->ep[](2/15)
# 
# drivers/usb/core/hcd.c
#   2004/11/27 15:29:53-08:00 david-b@pacbell.net +2 -8
#   USB: usbcore changes for usb_dev->ep[](2/15)
# 
# ChangeSet
#   2004/12/15 16:31:49-08:00 david-b@pacbell.net 
#   [PATCH] USB: usb_dev->ep[] not usb_dev->epmaxpacket (1/15)
#   
#   This starts updating the usbcore interface to use endpoints in places it
#   previously used pipes or other representations of the endpoint.
#   
#       - add new arrays of "struct usb_host_endpoint" pointers, matching
#         current config and altsetting
#   
#       - get rid of the two epmaxpacket[] arrays; they duplicate information
#         that's now readily accessible from the usb_host_endpoint.
#   
#       - resolve a FIXME by removing a function that only existed because
#         the usb_host_endpoint wasn't readily accessible.
#   
#   It also removes most of an old rant about pipes, trimming it down so
#   only the important bits remain.
#   
#   Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# include/linux/usb.h
#   2004/11/27 16:19:34-08:00 david-b@pacbell.net +37 -36
#   USB: usb_dev->ep[] not usb_dev->epmaxpacket (1/15)
# 
# ChangeSet
#   2004/12/15 16:01:46-08:00 eolson@MIT.EDU 
#   [PATCH] ftdi_sio: Add sysfs attributes for event character and latency
#   
#   Setting the event character and latency timer can greatly improve
#   performance for some applications which use the ftdi_sio module (a
#   serial->USB converter). The following patch adds sysfs attributes,
#   exposing these configuration registers.
#   
#   Signed-off-by: Edwin Olson (eolson@mit.edu)
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/serial/ftdi_sio.h
#   2004/11/30 17:44:06-08:00 eolson@MIT.EDU +51 -0
#   ftdi_sio: Add sysfs attributes for event character and latency
# 
# drivers/usb/serial/ftdi_sio.c
#   2004/11/30 17:41:48-08:00 eolson@MIT.EDU +133 -0
#   ftdi_sio: Add sysfs attributes for event character and latency
# 
# ChangeSet
#   2004/12/15 16:01:23-08:00 eolson@MIT.EDU 
#   [PATCH] usb-serial: add tty_hangup on disconnect
#   
#   When a USB serial device is disconnected, user applications performing a
#   read() now receive an error code, rather than waiting indefinitely. The
#   included patch is originally from Al Borchers, massaged to apply to
#   2.6.9 and 2.6.10-rc2. I've tested it on 2.6.9, but not on 2.6.10-rc2.
#   
#   Al Borcher's original post:
#   http://www.mail-archive.com/linux-usb-devel@lists.sourceforge.net/msg27475.html
#   
#   Signed-off-by: Edwin Olson (eolson@mit.edu)
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/serial/usb-serial.c
#   2004/11/30 18:23:16-08:00 eolson@MIT.EDU +7 -0
#   usb-serial: add tty_hangup on disconnect
# 
# ChangeSet
#   2004/12/15 15:12:10-08:00 phil@ipom.com 
#   [PATCH] USB Storage: Remove old XLATE-only entries from unusual_devs.h
#   
#   This patch removes all entries from unusual_devs.h that appear to have
#   only been there for the MODE_XLATE flag which was removed in my previous
#   patch.
#   
#   
#   Signed-off-by: Phil Dibowitz <phil@ipom.com>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/storage/unusual_devs.h
#   2004/12/12 22:31:31-08:00 phil@ipom.com +0 -26
#   USB Storage: Remove old XLATE-only entries from unusual_devs.h
# 
# ChangeSet
#   2004/12/15 15:11:26-08:00 david-b@pacbell.net 
#   [PATCH] USB: update drivers/usb/README
#   
#   This just adds a bit more info to drivers/usb/README, mostly
#   just pointing to where documentation is to be found (including
#   current kerneldoc).
#   
#   Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/README
#   2004/12/09 08:21:57-08:00 david-b@pacbell.net +28 -5
#   USB: update drivers/usb/README
# 
# ChangeSet
#   2004/12/15 15:10:26-08:00 phil@ipom.com 
#   [PATCH] USB Storage: Remove MODE_XLATE flag from unusual_devs.h
#   
#   This patch removes all MODE_XLATE flags from unusual_devs.h. Since the
#   file is no longer close to in sync with the 2.4 version, Alan and I
#   agreed it's reasonable to remove all of these now.
#   
#   Signed-off-by: Phil Dibowitz <phil@ipom.com>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/storage/unusual_devs.h
#   2004/12/12 22:27:51-08:00 phil@ipom.com +29 -29
#   USB Storage: Remove MODE_XLATE flag from unusual_devs.h
# 
# ChangeSet
#   2004/12/15 14:47:29-08:00 greg@kroah.com 
#   USB: delete the tiglusb driver as it's not needed
#   
#   You can use a userspace program and libusb instead.  The author asked for
#   this driver to be removed because of this.
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/misc/Makefile
#   2004/12/15 14:46:53-08:00 greg@kroah.com +0 -1
#   USB: delete the tiglusb driver as it's not needed
#   
#   You can use a userspace program and libusb instead.  The author asked for
#   this driver to be removed because of this.
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/misc/Kconfig
#   2004/12/15 14:46:53-08:00 greg@kroah.com +0 -20
#   USB: delete the tiglusb driver as it's not needed
#   
#   You can use a userspace program and libusb instead.  The author asked for
#   this driver to be removed because of this.
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/Makefile
#   2004/12/15 14:46:53-08:00 greg@kroah.com +0 -1
#   USB: delete the tiglusb driver as it's not needed
#   
#   You can use a userspace program and libusb instead.  The author asked for
#   this driver to be removed because of this.
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# BitKeeper/deleted/.del-tiglusb.h~fea5e7d62d81ebc8
#   2004/12/15 14:46:58-08:00 greg@kroah.com +0 -0
#   Delete: drivers/usb/misc/tiglusb.h
# 
# BitKeeper/deleted/.del-tiglusb.c~45d27891df0ae808
#   2004/12/15 14:46:58-08:00 greg@kroah.com +0 -0
#   Delete: drivers/usb/misc/tiglusb.c
# 
# ChangeSet
#   2004/12/15 14:26:09-08:00 mdharm-usb@one-eyed-alien.net 
#   [PATCH] USB Storage: support 'bulk32' devices
#   
#   This patch implements support for what we call "bulk32" devices.  These are
#   devices that use the BBB transport mechanism with the slight modification
#   that the CBW is padded to 32 bytes (instead of the standard 31 bytes).
#   
#   Signed-off-by: Theodore Kilgore <kilgota@banach.math.auburn.edu>
#   Signed-off-by: Phil Dibowitz <phil@ipom.com>
#   Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/storage/usb.h
#   2004/11/14 16:10:43-08:00 mdharm-usb@one-eyed-alien.net +1 -0
#   USB Storage: support 'bulk32' devices
# 
# drivers/usb/storage/unusual_devs.h
#   2004/11/14 16:10:23-08:00 mdharm-usb@one-eyed-alien.net +24 -0
#   USB Storage: support 'bulk32' devices
# 
# drivers/usb/storage/transport.c
#   2004/11/14 16:10:22-08:00 mdharm-usb@one-eyed-alien.net +8 -1
#   USB Storage: support 'bulk32' devices
# 
# ChangeSet
#   2004/12/15 14:25:46-08:00 luca.risolia@studio.unibo.it 
#   [PATCH] USB: SN9C10x driver updates
#   
#   SN9C10x driver updates.
#   
#   Changes: + new, - removed, * cleanup, @ bugfix, = sync with kernels
#   
#   * SN9C10x system clock fine-tuning when switching from native to compressed
#     format and viceversa for each image sensor
#   + Add sn9c102_i2c_try_raw_read()
#   + Frame header available from sysfs interface
#   + Documentation updates: new "Video frame formats" paragraph, new entries in
#     "Credits" and frame header description
#   + Plugin's for HV7131D and MI-0343 image sensors
#   
#   Signed-off-by: Luca Risolia <luca.risolia@studio.unibo.it>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/media/sn9c102_mi0343.c
#   2004/12/05 15:07:33-08:00 luca.risolia@studio.unibo.it +363 -0
#   USB: SN9C10x driver updates
# 
# drivers/usb/media/sn9c102_tas5130d1b.c
#   2004/12/05 15:07:14-08:00 luca.risolia@studio.unibo.it +18 -4
#   USB: SN9C10x driver updates
# 
# drivers/usb/media/sn9c102_tas5110c1b.c
#   2004/12/05 15:07:14-08:00 luca.risolia@studio.unibo.it +18 -4
#   USB: SN9C10x driver updates
# 
# drivers/usb/media/sn9c102_sensor.h
#   2004/12/05 15:07:38-08:00 luca.risolia@studio.unibo.it +44 -18
#   USB: SN9C10x driver updates
# 
# drivers/usb/media/sn9c102_pas202bcb.c
#   2004/12/05 15:07:04-08:00 luca.risolia@studio.unibo.it +21 -28
#   USB: SN9C10x driver updates
# 
# drivers/usb/media/sn9c102_pas106b.c
#   2004/12/05 15:07:04-08:00 luca.risolia@studio.unibo.it +19 -26
#   USB: SN9C10x driver updates
# 
# drivers/usb/media/sn9c102_mi0343.c
#   2004/12/05 15:07:33-08:00 luca.risolia@studio.unibo.it +0 -0
#   BitKeeper file /home/greg/linux/BK/usb-2.6/drivers/usb/media/sn9c102_mi0343.c
# 
# drivers/usb/media/sn9c102_core.c
#   2004/12/05 15:06:37-08:00 luca.risolia@studio.unibo.it +81 -34
#   USB: SN9C10x driver updates
# 
# drivers/usb/media/sn9c102.h
#   2004/12/05 15:06:48-08:00 luca.risolia@studio.unibo.it +9 -4
#   USB: SN9C10x driver updates
# 
# drivers/usb/media/Makefile
#   2004/12/05 15:09:23-08:00 luca.risolia@studio.unibo.it +1 -1
#   USB: SN9C10x driver updates
# 
# Documentation/usb/sn9c102.txt
#   2004/12/05 15:28:11-08:00 luca.risolia@studio.unibo.it +159 -43
#   USB: SN9C10x driver updates
# 
# drivers/usb/media/sn9c102_hv7131d.c
#   2004/12/05 15:07:24-08:00 luca.risolia@studio.unibo.it +271 -0
#   USB: SN9C10x driver updates
# 
# drivers/usb/media/sn9c102_hv7131d.c
#   2004/12/05 15:07:24-08:00 luca.risolia@studio.unibo.it +0 -0
#   BitKeeper file /home/greg/linux/BK/usb-2.6/drivers/usb/media/sn9c102_hv7131d.c
# 
# ChangeSet
#   2004/12/15 14:13:33-08:00 greg@kroah.com 
#   [PATCH] USB: fix sparse and compiler warnings in ti_usb_3410_5052.c
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/serial/ti_usb_3410_5052.c
#   2004/12/15 14:11:05-08:00 greg@kroah.com +11 -11
#   USB: fix sparse and compiler warnings in ti_usb_3410_5052.c
# 
# ChangeSet
#   2004/12/15 14:13:03-08:00 alborchers@steinerpoint.com 
#   [PATCH] USB: serial driver for TI USB 3410/5052 chips (2/3)
#   
#   * New USB serial driver for devices based on the TI USB
#     3410 and 5052 chips.  (2/3)
#   
#   Signed-off-by: Al Borchers <alborchers@steinerpoint.com>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/serial/ti_fw_3410.h
#   2004/12/02 00:25:00-08:00 alborchers@steinerpoint.com +885 -0
#   USB: serial driver for TI USB 3410/5052 chips (2/3)
# 
# drivers/usb/serial/ti_fw_3410.h
#   2004/12/02 00:25:00-08:00 alborchers@steinerpoint.com +0 -0
#   BitKeeper file /home/greg/linux/BK/usb-2.6/drivers/usb/serial/ti_fw_3410.h
# 
# ChangeSet
#   2004/12/15 14:12:32-08:00 alborchers@steinerpoint.com 
#   [PATCH] USB: serial driver for TI USB 3410/5052 chips (1/3)
#   
#   * New USB serial driver for devices based on the TI USB
#     3410 and 5052 chips.  (1/3)
#   
#   * Changed to use circ_buf.h.
#   
#   Signed-off-by: Al Borchers <alborchers@steinerpoint.com>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/serial/ti_usb_3410_5052.h
#   2004/12/02 00:25:00-08:00 alborchers@steinerpoint.com +224 -0
#   USB: serial driver for TI USB 3410/5052 chips (1/3)
# 
# drivers/usb/serial/ti_usb_3410_5052.h
#   2004/12/02 00:25:00-08:00 alborchers@steinerpoint.com +0 -0
#   BitKeeper file /home/greg/linux/BK/usb-2.6/drivers/usb/serial/ti_usb_3410_5052.h
# 
# drivers/usb/serial/ti_usb_3410_5052.c
#   2004/12/02 21:52:26-08:00 alborchers@steinerpoint.com +1839 -0
#   USB: serial driver for TI USB 3410/5052 chips (1/3)
# 
# drivers/usb/serial/Makefile
#   2004/12/02 00:24:15-08:00 alborchers@steinerpoint.com +1 -0
#   USB: serial driver for TI USB 3410/5052 chips (1/3)
# 
# drivers/usb/serial/Kconfig
#   2004/12/02 00:23:49-08:00 alborchers@steinerpoint.com +10 -0
#   USB: serial driver for TI USB 3410/5052 chips (1/3)
# 
# drivers/usb/serial/ti_usb_3410_5052.c
#   2004/12/02 21:52:26-08:00 alborchers@steinerpoint.com +0 -0
#   BitKeeper file /home/greg/linux/BK/usb-2.6/drivers/usb/serial/ti_usb_3410_5052.c
# 
# ChangeSet
#   2004/12/15 14:12:02-08:00 alborchers@steinerpoint.com 
#   [PATCH] USB: serial driver for TI USB 3410/5052 chips (3/3)
#   
#   * New USB serial driver for devices based on the TI USB
#     3410 and 5052 chips.  (3/3)
#   
#   Signed-off-by: Al Borchers <alborchers@steinerpoint.com>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/serial/ti_fw_5052.h
#   2004/12/02 00:25:00-08:00 alborchers@steinerpoint.com +885 -0
#   USB: serial driver for TI USB 3410/5052 chips (3/3)
# 
# drivers/usb/serial/ti_fw_5052.h
#   2004/12/02 00:25:00-08:00 alborchers@steinerpoint.com +0 -0
#   BitKeeper file /home/greg/linux/BK/usb-2.6/drivers/usb/serial/ti_fw_5052.h
# 
# ChangeSet
#   2004/12/15 12:56:22-08:00 davem@nuts.davemloft.net 
#   Merge nuts.davemloft.net:/disk1/BK/network-2.6.11
#   into nuts.davemloft.net:/disk1/BK/net-2.6.11
# 
# net/ipv4/netfilter/ip_conntrack_standalone.c
#   2004/12/15 12:56:11-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# net/core/dev.c
#   2004/12/15 12:56:10-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# include/net/act_api.h
#   2004/12/15 12:56:10-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# arch/sparc64/defconfig
#   2004/12/15 12:56:10-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# arch/mips/defconfig
#   2004/12/15 12:56:10-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# arch/mips/configs/rm200_defconfig
#   2004/12/15 12:56:10-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# arch/mips/configs/ip22_defconfig
#   2004/12/15 12:56:10-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# arch/m68k/configs/sun3x_defconfig
#   2004/12/15 12:56:10-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# arch/m68k/configs/sun3_defconfig
#   2004/12/15 12:56:10-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# arch/m68k/configs/q40_defconfig
#   2004/12/15 12:56:09-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# arch/m68k/configs/mvme16x_defconfig
#   2004/12/15 12:56:09-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# arch/m68k/configs/mvme147_defconfig
#   2004/12/15 12:56:09-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# arch/m68k/configs/mac_defconfig
#   2004/12/15 12:56:09-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# arch/m68k/configs/hp300_defconfig
#   2004/12/15 12:56:09-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# arch/m68k/configs/bvme6000_defconfig
#   2004/12/15 12:56:09-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# arch/m68k/configs/atari_defconfig
#   2004/12/15 12:56:09-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# arch/m68k/configs/apollo_defconfig
#   2004/12/15 12:56:09-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# arch/m68k/configs/amiga_defconfig
#   2004/12/15 12:56:09-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/12/15 11:43:29-08:00 domen@coderock.org 
#   [PATCH] it87: /proc/ioports fix
#   
#   When request_region is called name is set to "", use module name.
#   
#   Signed-off-by: Domen Puncer <domen@coderock.org>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/i2c/chips/it87.c
#   2004/12/10 05:41:29-08:00 domen@coderock.org +1 -1
#   it87: /proc/ioports fix
# 
# ChangeSet
#   2004/12/15 11:37:45-08:00 khali@linux-fr.org 
#   [PATCH] I2C: i2c-algo-bit should support I2C_FUNC_I2C
#   
#   > Very few drivers seem to support the I2C_FUNC_I2C functionality, is
#   > there a reason for that?
#   
#   Yes, most bus drivers are for SMBus, not I2C, masters. SMBus is a subset
#   of I2C. These SMBus master are fully I2C-capable, although in most cases
#   it doesn't matter. Most chip drivers are for SMBus clients as well.
#   Almost all hardware monitoring chips are SMBus devices. So it's not
#   surprising not to see I2C_FUNC_I2C widely used.
#   
#   > I have an I2C bus on my platform constructed from a couple of GPIO lines
#   > using the i2c-algo-bit driver. The device on the bus is a DS1307 I2C RTC
#   > and the driver for that currently checks for
#   > 	I2C_FUNC_SMBUS_WORD_DATA | I2C_FUNC_SMBUS_WRITE_BYTE
#   > however the datasheet suggests it is a simple i2c device with none of
#   > this smbus stuff, Russell King queried this here
#   > http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=2021/1
#   
#   First, note that all SMBus commands are valid I2C transfers. In fact,
#   the SMBus specification doesn't do much except put names on specific I2C
#   transfers, and sometimes give meanings to the data being transfered. As
#   a result, "I2C" clients, although not specifically SMBus-compatible, may
#   enjoy SMBus commands such as SMBUS_READ_BYTE, SMBUS_READ_BYTE_DATA and
#   SMBUS_WRITE_BYTE_DATA. One typical example of that are EEPROMs and the
#   eeprom driver. It relies on i2c_smbus_write_byte and i2c_smbus_read_byte
#   (BTW I just noticed that it doesn't properly check for these
#   functionalities... have to fix that) because it's so much easier to call
#   these standard functions than rewrite I2C code manually. Also, this let
#   us access the EEPROMs on SMBus (non-I2C) busses.
#   
#   Now, note that Russell is not quite correct in is assertion: "Do we
#   really require SMBUS functionality, or is i2c functionality sufficient?"
#   It's actually the other way around. SMBus puts restrictions on what a
#   valid I2C transfer is. "Do we need the full I2C functionality or is the
#   SMBus subset sufficient?" would make more sense.
#   
#   As for the exact functionality you need to check, let's just see how you
#   access the bus. As far as I can see (providing that the code below
#   Russell's comments is still valid), you rely on:
#    * i2c_smbus_write_byte_data
#    * i2c_smbus_read_byte_data
#    * i2c_transfer
#   
#   So yo *need* to check for the availability of I2C_FUNC_SMBUS_BYTE_DATA
#   on the adapter (which is part of I2C_FUNC_SMBUS_EMUL so any bus driver
#   using that, including any relying on i2c-algo-bit, will work with your
#   client driver) for the first two. And you also need to check for
#   I2C_FUNC_I2C for the third one.
#   
#   Of course, any adapter with I2C_FUNC_I2C will be able to do SMBus byte
#   data transfers, but since you do not use i2c_transfer to do them, you
#   need to check the functionality separately (I think).
#   
#   Also, I think that what you do with i2c_transfer is similar to
#   I2C_FUNC_SMBUS_READ_I2C_BLOCK, which is supported by some SMBus
#   (non-I2C) masters. If you convert your code to use
#   i2c_smbus_read_i2c_block_data, then you don't rely on the full I2C
#   capatbilities of the bus, which means that your chip driver will be
#   useable on more plateforms. That said, note that this feature is
#   unimplemented on most SMBus master drivers as of now, and broken on a
#   number of others (but I guess we would start paying more attention to
#   them if there were more users for this function).
#   
#   > If I change it to a check for I2C_FUNC_I2C and change the algo-bit
#   > driver to declare I2C_FUNC_I2C then the driver continues to work fine.
#   
#   You are right that i2c-algo-bit should declare itself I2C_FUNC_I2C
#   capable. I even think that every bus being I2C_FUNC_SMBUS_EMUL capable
#   is very likely to be I2C_FUNC_I2C capable. This means that other
#   algorithms (ite, pcf, maybe pca) could most probably be declared
#   I2C_FUNC_I2C capable as well. Can anyone confirm?
#   
#   > Given the above, is the following patch appropriate, or is there
#   > something about the relationship between i2c and smbus that I don't
#   > understand.
#   
#   I admit that the relationship between I2C and SMBus is somewhat tricky,
#   it took me some time to get it and even then I am sometimes not sure to
#   understand exactly what implies what ;) So we cannot blame you for not
#   getting it at first. I hope I helped make things a little clearer. If
#   not I welcome questions.
#   
#   Whether or not you change your code to use SMBus only in your driver to
#   make it more widely useable, your patch to i2c-algo-bit is valid, I am
#   signing it too and will apply it to the 2.4 version of the driver as
#   well.
#   
#   Signed-off-by: Ian Campbell <icampbell@arcom.com>
#   Signed-off-by: Jean Delvare <khali@linux-fr.org>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/i2c/algos/i2c-algo-bit.c
#   2004/11/30 01:26:27-08:00 khali@linux-fr.org +2 -2
#   I2C: i2c-algo-bit should support I2C_FUNC_I2C
# 
# ChangeSet
#   2004/12/15 11:37:22-08:00 icampbell@arcom.com 
#   [PATCH] I2C: i2c-algo-bit should support I2C_FUNC_I2C
#   
#   Signed-off-by: Ian Campbell <icampbell@arcom.com>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/i2c/algos/i2c-algo-pcf.c
#   2004/12/07 02:14:58-08:00 icampbell@arcom.com +2 -2
#   I2C: i2c-algo-bit should support I2C_FUNC_I2C
# 
# drivers/i2c/algos/i2c-algo-pca.c
#   2004/12/07 03:14:09-08:00 icampbell@arcom.com +2 -2
#   I2C: i2c-algo-bit should support I2C_FUNC_I2C
# 
# ChangeSet
#   2004/12/15 11:36:57-08:00 khali@linux-fr.org 
#   [PATCH] I2C: use chip driver name to request regions
#   
#   > Trivial patch against 2.6.10-rc3-bk2.
#   > When request_region is called name is set to "", use module name.
#   
#   Correct. I even think we should do the same for other chip drivers. For
#   now they all use an arbitrary string. Using the driver's name would be
#   both more consistent and more efficient (spares some bytes of memory).
#   
#   
#   Signed-off-by: Jean Delvare <khali@linux-fr.org>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/i2c/chips/w83781d.c
#   2004/12/10 10:38:41-08:00 khali@linux-fr.org +2 -1
#   I2C: use chip driver name to request regions
# 
# drivers/i2c/chips/w83627hf.c
#   2004/12/10 10:38:55-08:00 khali@linux-fr.org +1 -1
#   I2C: use chip driver name to request regions
# 
# drivers/i2c/chips/via686a.c
#   2004/12/10 10:39:07-08:00 khali@linux-fr.org +1 -1
#   I2C: use chip driver name to request regions
# 
# drivers/i2c/chips/smsc47m1.c
#   2004/12/10 10:39:17-08:00 khali@linux-fr.org +1 -1
#   I2C: use chip driver name to request regions
# 
# drivers/i2c/chips/pc87360.c
#   2004/12/10 10:39:34-08:00 khali@linux-fr.org +2 -1
#   I2C: use chip driver name to request regions
# 
# drivers/i2c/chips/lm78.c
#   2004/12/10 10:39:43-08:00 khali@linux-fr.org +1 -1
#   I2C: use chip driver name to request regions
# 
# ChangeSet
#   2004/12/15 11:29:09-08:00 johnpol@2ka.mipt.ru 
#   [PATCH] w1: Documentation bits for generic w1 behaviour.
#   
#   Documentation bits for generic w1 behaviour.
#   
#   Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# Documentation/w1/w1.generic
#   2004/12/01 05:04:16-08:00 johnpol@2ka.mipt.ru +19 -0
#   w1: Documentation bits for generic w1 behaviour.
# 
# Documentation/w1/w1.generic
#   2004/12/01 05:04:16-08:00 johnpol@2ka.mipt.ru +0 -0
#   BitKeeper file /home/greg/linux/BK/i2c-2.6/Documentation/w1/w1.generic
# 
# ChangeSet
#   2004/12/15 11:15:47-08:00 greg@kroah.com 
#   [PATCH] misc: remove miscdevice.h from pci hotplug drivers as they do not need it.
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/pci/hotplug/shpchp_core.c
#   2004/12/15 11:14:47-08:00 greg@kroah.com +0 -1
#   misc: remove miscdevice.h from pci hotplug drivers as they do not need it.
# 
# drivers/pci/hotplug/pciehp_core.c
#   2004/12/15 11:14:47-08:00 greg@kroah.com +0 -1
#   misc: remove miscdevice.h from pci hotplug drivers as they do not need it.
# 
# ChangeSet
#   2004/12/15 11:15:21-08:00 bunk@stusta.de 
#   [PATCH] select HOTPLUG
#   
#   The patch below changes all dependencies on HOTPLUG to selects.
#   
#   The help text of HOTPLUG is adjusted in a way, that manually selecting
#   it is only required for external modules.
#   
#   If an option already depends on PCMCIA or selects FW_LOADER an explicit
#   select of HOTPLUG is not required.
#   
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# init/Kconfig
#   2004/12/01 18:36:04-08:00 bunk@stusta.de +3 -14
#   select HOTPLUG
# 
# drivers/pcmcia/Kconfig
#   2004/12/01 18:28:08-08:00 bunk@stusta.de +1 -1
#   select HOTPLUG
# 
# drivers/pci/hotplug/Kconfig
#   2004/12/01 18:23:19-08:00 bunk@stusta.de +1 -1
#   select HOTPLUG
# 
# drivers/parport/Kconfig
#   2004/12/01 18:27:11-08:00 bunk@stusta.de +1 -1
#   select HOTPLUG
# 
# drivers/net/wireless/Kconfig
#   2004/12/01 18:21:37-08:00 bunk@stusta.de +1 -1
#   select HOTPLUG
# 
# drivers/net/tokenring/Kconfig
#   2004/12/01 18:22:29-08:00 bunk@stusta.de +1 -1
#   select HOTPLUG
# 
# drivers/net/pcmcia/Kconfig
#   2004/12/01 18:38:54-08:00 bunk@stusta.de +1 -1
#   select HOTPLUG
# 
# drivers/base/Kconfig
#   2004/12/01 18:20:59-08:00 bunk@stusta.de +1 -1
#   select HOTPLUG
# 
# arch/s390/Kconfig
#   2004/12/01 18:30:16-08:00 bunk@stusta.de +2 -1
#   select HOTPLUG
# 
# arch/ppc64/Kconfig
#   2004/12/01 18:29:36-08:00 bunk@stusta.de +2 -1
#   select HOTPLUG
# 
# arch/ia64/Kconfig
#   2004/12/01 18:29:14-08:00 bunk@stusta.de +7 -6
#   select HOTPLUG
# 
# ChangeSet
#   2004/12/15 10:51:58-08:00 greg@kroah.com 
#   Documentation: fix some grammer in the stable_api_nonsense.txt file
#   
#   Thanks to Andries Brouwer <aebr@win.tue.nl> for pointing this out.
# 
# Documentation/stable_api_nonsense.txt
#   2004/12/15 10:51:20-08:00 greg@kroah.com +2 -2
#   Documentation: fix some grammer in the stable_api_nonsense.txt file
#   
#   Thanks to Andries Brouwer <aebr@win.tue.nl> for pointing this out.
# 
# ChangeSet
#   2004/12/15 10:49:05-08:00 greg@kroah.com 
#   [PATCH] misc: remove device.h #include from miscdevice.h
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# include/linux/miscdevice.h
#   2004/12/15 10:47:19-08:00 greg@kroah.com +1 -1
#   misc: remove device.h #include from miscdevice.h
# 
# ChangeSet
#   2004/12/15 10:48:19-08:00 rml@novell.com 
#   [PATCH] add class_device to miscdevice
#   
#   Currently misc_register() throws away the return from
#   class_simple_device_add().  This makes it impossible to get to the
#   class_device of the directories in /sys/class/misc and, for example,
#   thus impossible to add attributes to those directories.
#   
#   Attached patch adds a class_device structure to the miscdevice structure
#   and assigns to it the value returned from class_simple_device_add() in
#   misc_register(), thus caching the value and allowing us to f.e. later
#   call class_device_create_file().
#   
#   We need this for inotify, but I can see plenty of other misc. devices
#   wanting this and consider it missing but required functionality.
#   
#   
#   Add the class_device structure to miscdevice so that we can add sysfs
#   attributes to /sys/class/misc/foo
#   
#   Signed-Off-By: Robert Love <rml@novell.com>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# include/linux/miscdevice.h
#   2004/11/16 11:09:04-08:00 rml@novell.com +3 -2
#   add class_device to miscdevice
# 
# drivers/char/misc.c
#   2004/11/16 11:11:17-08:00 rml@novell.com +6 -8
#   add class_device to miscdevice
# 
# ChangeSet
#   2004/12/15 13:42:10-05:00 davej@redhat.com 
#   [AGPGART] Fix TLB flushing issues with change_page_attr()
#   
#   Calls to change_page_attr() need an explicit call to
#   global_flush_tlb() afterwards.  The AGP code didn't
#   do this in a number of cases.  This patch makes
#   map_page_into_agp/unmap_page_from_agp do the calls
#   themselves, which takes care of most of the problem.
#   
#   The Intel AGP driver also has some slightly different calls to what
#   map_page_into_agp() does, as it changes 4 contiguous pages.
#   Introduce explicit flushes afterwards there too.
#   
#   Thanks to Alan Cox for pointing this out.
#   
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# include/asm-x86_64/agp.h
#   2004/12/15 13:42:04-05:00 davej@redhat.com +2 -3
#   [AGPGART] Fix TLB flushing issues with change_page_attr()
#   
#   Calls to change_page_attr() need an explicit call to
#   global_flush_tlb() afterwards.  The AGP code didn't
#   do this in a number of cases.  This patch makes
#   map_page_into_agp/unmap_page_from_agp do the calls
#   themselves, which takes care of most of the problem.
#   
#   The Intel AGP driver also has some slightly different calls to what
#   map_page_into_agp() does, as it changes 4 contiguous pages.
#   Introduce explicit flushes afterwards there too.
#   
#   Thanks to Alan Cox for pointing this out.
#   
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# include/asm-i386/agp.h
#   2004/12/15 13:42:04-05:00 davej@redhat.com +2 -2
#   [AGPGART] Fix TLB flushing issues with change_page_attr()
#   
#   Calls to change_page_attr() need an explicit call to
#   global_flush_tlb() afterwards.  The AGP code didn't
#   do this in a number of cases.  This patch makes
#   map_page_into_agp/unmap_page_from_agp do the calls
#   themselves, which takes care of most of the problem.
#   
#   The Intel AGP driver also has some slightly different calls to what
#   map_page_into_agp() does, as it changes 4 contiguous pages.
#   Introduce explicit flushes afterwards there too.
#   
#   Thanks to Alan Cox for pointing this out.
#   
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# drivers/char/agp/intel-agp.c
#   2004/12/15 13:42:04-05:00 davej@redhat.com +5 -2
#   [AGPGART] Fix TLB flushing issues with change_page_attr()
#   
#   Calls to change_page_attr() need an explicit call to
#   global_flush_tlb() afterwards.  The AGP code didn't
#   do this in a number of cases.  This patch makes
#   map_page_into_agp/unmap_page_from_agp do the calls
#   themselves, which takes care of most of the problem.
#   
#   The Intel AGP driver also has some slightly different calls to what
#   map_page_into_agp() does, as it changes 4 contiguous pages.
#   Introduce explicit flushes afterwards there too.
#   
#   Thanks to Alan Cox for pointing this out.
#   
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# drivers/char/agp/generic.c
#   2004/12/15 13:42:04-05:00 davej@redhat.com +23 -0
#   [AGPGART] Fix TLB flushing issues with change_page_attr()
#   
#   Calls to change_page_attr() need an explicit call to
#   global_flush_tlb() afterwards.  The AGP code didn't
#   do this in a number of cases.  This patch makes
#   map_page_into_agp/unmap_page_from_agp do the calls
#   themselves, which takes care of most of the problem.
#   
#   The Intel AGP driver also has some slightly different calls to what
#   map_page_into_agp() does, as it changes 4 contiguous pages.
#   Introduce explicit flushes afterwards there too.
#   
#   Thanks to Alan Cox for pointing this out.
#   
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# drivers/char/agp/ati-agp.c
#   2004/12/15 13:42:04-05:00 davej@redhat.com +0 -3
#   [AGPGART] Fix TLB flushing issues with change_page_attr()
#   
#   Calls to change_page_attr() need an explicit call to
#   global_flush_tlb() afterwards.  The AGP code didn't
#   do this in a number of cases.  This patch makes
#   map_page_into_agp/unmap_page_from_agp do the calls
#   themselves, which takes care of most of the problem.
#   
#   The Intel AGP driver also has some slightly different calls to what
#   map_page_into_agp() does, as it changes 4 contiguous pages.
#   Introduce explicit flushes afterwards there too.
#   
#   Thanks to Alan Cox for pointing this out.
#   
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# ChangeSet
#   2004/12/15 13:41:06-05:00 davej@redhat.com 
#   [AGPGART] Add support for ALI M1681/M1683
#   
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# include/linux/pci_ids.h
#   2004/12/15 13:41:00-05:00 davej@redhat.com +3 -1
#   [AGPGART] Add support for ALI M1681/M1683
#   
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# drivers/char/agp/ali-agp.c
#   2004/12/15 13:41:00-05:00 davej@redhat.com +9 -0
#   [AGPGART] Add support for ALI M1681/M1683
#   
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# ChangeSet
#   2004/12/15 13:40:41-05:00 davej@redhat.com 
#   [AGPGART] Simplify global_cache_flush
#   
#   on_each_cpu does the right thing in the UP case, so we can
#   kill those ugly ifdefs.
#   
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# drivers/char/agp/generic.c
#   2004/12/15 13:40:34-05:00 davej@redhat.com +0 -6
#   [AGPGART] Simplify global_cache_flush
#   
#   on_each_cpu does the right thing in the UP case, so we can
#   kill those ugly ifdefs.
#   
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# ChangeSet
#   2004/12/15 13:39:28-05:00 davej@redhat.com 
#   [AGPGART] isoch.c: replace pci_find_device with pci_get_device
#   
#   As pci_find_device is going away soon I have converted this file to use
#   pci_get_device instead. for_each_pci_dev is just a macro wrapper around
#   pci_get_device.  I have compile tested it. If anyone has this hardware
#   and could test it that would be great.
#   
#   Signed-off-by: Hanna Linder <hannal@us.ibm.com>
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# drivers/char/agp/isoch.c
#   2004/12/15 13:39:21-05:00 davej@redhat.com +1 -1
#   [AGPGART] isoch.c: replace pci_find_device with pci_get_device
#   
#   As pci_find_device is going away soon I have converted this file to use
#   pci_get_device instead. for_each_pci_dev is just a macro wrapper around
#   pci_get_device.  I have compile tested it. If anyone has this hardware
#   and could test it that would be great.
#   
#   Signed-off-by: Hanna Linder <hannal@us.ibm.com>
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# ChangeSet
#   2004/12/15 13:38:35-05:00 davej@redhat.com 
#   [AGPGART] intel-mch-agp.c: replace pci_find_device with pci_get_device
#   
#   As pci_find_device is going away soon I have converted this file to use
#   pci_get_device instead. I have compile tested it. If anyone has this hardware
#   and could test it that would be great.
#   
#   Signed-off-by: Hanna Linder <hannal@us.ibm.com>
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# drivers/char/agp/intel-mch-agp.c
#   2004/12/15 13:38:28-05:00 davej@redhat.com +3 -2
#   [AGPGART] intel-mch-agp.c: replace pci_find_device with pci_get_device
#   
#   As pci_find_device is going away soon I have converted this file to use
#   pci_get_device instead. I have compile tested it. If anyone has this hardware
#   and could test it that would be great.
#   
#   Signed-off-by: Hanna Linder <hannal@us.ibm.com>
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# ChangeSet
#   2004/12/15 13:38:11-05:00 davej@redhat.com 
#   [AGPGART] intel-agp.c: replace pci_find_device with pci_get_device
#   
#   As pci_find_device is going away soon I have converted this file to use
#   pci_get_device instead. I have compile tested it. If anyone has this hardware
#   and could test it that would be great.
#   
#   Signed-off-by: Hanna Linder <hannal@us.ibm.com>
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# drivers/char/agp/intel-agp.c
#   2004/12/15 13:38:05-05:00 davej@redhat.com +4 -3
#   [AGPGART] intel-agp.c: replace pci_find_device with pci_get_device
#   
#   As pci_find_device is going away soon I have converted this file to use
#   pci_get_device instead. I have compile tested it. If anyone has this hardware
#   and could test it that would be great.
#   
#   Signed-off-by: Hanna Linder <hannal@us.ibm.com>
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# ChangeSet
#   2004/12/15 13:36:47-05:00 davej@redhat.com 
#   [AGPGART] generic.c: replace pci_find_device with pci_get_device
#   
#   As pci_find_device is going away soon I have converted this file
#   to use pci_get_device instead. I have compile tested it.
#   If anyone has this hardware and could test it that would be great.
#   
#   Signed-off-by: Hanna Linder <hannal@us.ibm.com>
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# drivers/char/agp/generic.c
#   2004/12/15 13:36:41-05:00 davej@redhat.com +2 -2
#   [AGPGART] generic.c: replace pci_find_device with pci_get_device
#   
#   As pci_find_device is going away soon I have converted this file
#   to use pci_get_device instead. I have compile tested it.
#   If anyone has this hardware and could test it that would be great.
#   
#   Signed-off-by: Hanna Linder <hannal@us.ibm.com>
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# ChangeSet
#   2004/12/15 13:34:02-05:00 davej@redhat.com 
#   [AGPGART] amd64-agp.c replace pci_find_device with pci_get_device
#   As pci_find_device is going away soon I have converted this file
#   to use pci_get_device instead. I have compile tested it.
#   If anyone has this hardware and could test it that would be great.
#   
#   Signed-off-by: Hanna Linder <hannal@us.ibm.com>
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# drivers/char/agp/amd64-agp.c
#   2004/12/15 13:33:56-05:00 davej@redhat.com +8 -3
#   [AGPGART] amd64-agp.c replace pci_find_device with pci_get_device
#   As pci_find_device is going away soon I have converted this file
#   to use pci_get_device instead. I have compile tested it.
#   If anyone has this hardware and could test it that would be great.
#   
#   Signed-off-by: Hanna Linder <hannal@us.ibm.com>
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# ChangeSet
#   2004/12/13 07:58:37-08:00 jfs.adm@bkbits.net 
#   Merge bk://linux.bkbits.net/linux-2.5
#   into bkbits.net:/repos/j/jfs/linux-2.5
# 
# fs/Kconfig
#   2004/12/13 07:58:30-08:00 jfs.adm@bkbits.net +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/12/13 11:55:52+00:00 nico@cam.org 
#   MTD XIP support: allyesconfig compile fix.
#   
#   People insist on turning stuff on which doesn't make sense. Make it compile
#   in the case where the platform doesn't provide the necessary XIP primitives.
#   
#   Signed-off-by: Nicolas Pitre <nico@cam.org>
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# include/linux/mtd/xip.h
#   2004/12/13 11:55:38+00:00 nico@cam.org +10 -2
#   revision 1.2
#   date: 2004/12/01 15:49:10;  author: nico;  state: Exp;  lines: +10 -2
#   allows MTD XIP to compile on every target with a fallback to reduced
#   responsiveness, and warn about it.
# 
# ChangeSet
#   2004/12/13 11:53:24+00:00 cs.helsinki.fi@shinybook.infradead.org 
#   MTD: New mapping driver for IBM 405GP 'Walnut' board.
#   
#   Signed-off-by: Heikki O Lindholm <holindho@cs.helsinki.fi>
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# drivers/mtd/maps/walnut.c
#   2004/12/13 11:53:07+00:00 cs.helsinki.fi@shinybook.infradead.org +122 -0
# 
# drivers/mtd/maps/walnut.c
#   2004/12/13 11:53:07+00:00 cs.helsinki.fi@shinybook.infradead.org +0 -0
#   BitKeeper file /home/dwmw2/bk/mtd-2.6/drivers/mtd/maps/walnut.c
# 
# drivers/mtd/maps/Makefile
#   2004/12/13 11:53:07+00:00 cs.helsinki.fi@shinybook.infradead.org +2 -1
#   revision 1.21
#   date: 2004/12/09 20:01:05;  author: holindho;  state: Exp;  lines: +2 -1
#   Added IBM 405GP Walnut flash mapping.
# 
# drivers/mtd/maps/Kconfig
#   2004/12/13 11:53:07+00:00 cs.helsinki.fi@shinybook.infradead.org +9 -1
#   revision 1.40
#   date: 2004/12/09 20:01:05;  author: holindho;  state: Exp;  lines: +9 -1
#   Added IBM 405GP Walnut flash mapping.
# 
# ChangeSet
#   2004/12/13 11:47:54+00:00 cs.helsinki.fi@shinybook.infradead.org 
#   MTD: Use JEDEC probe for flash chips on Ebony board.
#   
#   Signed-off-by: Heikki O Lindholm <holindho@cs.helsinki.fi>
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# drivers/mtd/maps/ebony.c
#   2004/12/13 11:47:39+00:00 cs.helsinki.fi@shinybook.infradead.org +3 -3
#   revision 1.15
#   date: 2004/12/09 18:39:54;  author: holindho;  state: Exp;  lines: +3 -3
#   Changed ebony to use JEDEC, since the factory config has JEDEC (AMD) parts. Enabled writing to BIOS area also. Change ok'd by the maintainer (Matt Porter).
# 
# drivers/mtd/maps/Kconfig
#   2004/12/13 11:47:39+00:00 cs.helsinki.fi@shinybook.infradead.org +2 -2
#   revision 1.39
#   date: 2004/12/09 18:39:54;  author: holindho;  state: Exp;  lines: +2 -2
#   Changed ebony to use JEDEC, since the factory config has JEDEC (AMD) parts. Enabled writing to BIOS area also. Change ok'd by the maintainer (Matt Porter).
# 
# ChangeSet
#   2004/12/13 11:44:09+00:00 dvrabel@arcom.co.uk 
#   MTD: AMD/Fujitsu flash driver cleanup
#   
#   Use get_chip() helper function instead of open-coding it.
#   
#   Signed-off-by: David Vrabel <dvrabel@arcom.co.uk>
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# drivers/mtd/chips/cfi_cmdset_0002.c
#   2004/12/13 11:43:54+00:00 dvrabel@arcom.co.uk +8 -18
#   revision 1.114
#   date: 2004/12/11 15:43:53;  author: dedekind;  state: Exp;  lines: +2 -2
#   Remove unused variable.
#   ----------------------------
#   revision 1.113
#   date: 2004/12/03 10:26:41;  author: dvrabel;  state: Exp;  lines: +7 -17
#   Use chip_ready() in do_write_oneword().
# 
# ChangeSet
#   2004/12/13 11:40:43+00:00 joern@wh.fh-wedel.de 
#   MTD: phram device cleanup.
#   
#    - Remove old slram-like interface
#    - Fewer memory allocations
#    - Saner usage example
#   
#   Signed-off-by: Jörn Engel <joern@wh.fh-wedel.de>
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# drivers/mtd/devices/phram.c
#   2004/12/13 11:40:29+00:00 joern@wh.fh-wedel.de +26 -104
#   revision 1.10
#   date: 2004/12/10 17:53:13;  author: joern;  state: Exp;  lines: +3 -3
#   o Fix a typo.
#   o Pick a saner example.
#   ----------------------------
#   revision 1.9
#   date: 2004/12/10 17:49:18;  author: joern;  state: Exp;  lines: +1 -67
#   Remove slram interface.
#   ----------------------------
#   revision 1.8
#   date: 2004/12/10 17:46:31;  author: joern;  state: Exp;  lines: +22 -29
#   o Remove one kmalloc by embedding struct mtdinfo in struct phram_mtd_list.
#   o Shorten "mtdinfo" to "mtd".  No information lost.
#   ----------------------------
#   revision 1.7
#   date: 2004/12/10 17:33:50;  author: joern;  state: Exp;  lines: +3 -8
#   Since many people bugged me to actively develop it, I might as well take
#   the copyright...
# 
# ChangeSet
#   2004/12/13 11:37:09+00:00 dedekind@infradead.org 
#   MTD NAND flash simulator update.
#   
#    - Default to 8MiB instead of 64MiB
#    - Use generic LP NAND command definition
#    - Other minor cleanup
#   
#   Signed-off-by: Artem Bityuckiy <dedekind@infradead.org>
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# drivers/mtd/nand/nandsim.c
#   2004/12/13 11:36:55+00:00 dedekind@infradead.org +13 -19
#   revision 1.7
#   date: 2004/12/06 11:53:06;  author: dedekind;  state: Exp;  lines: +6 -6
#   Update the state name too.
#   ----------------------------
#   revision 1.6
#   date: 2004/12/06 11:49:07;  author: dedekind;  state: Exp;  lines: +2 -8
#   MTD now have 0x30 LP NAND read command macro, use it instead of custom
#   macro.
#   ----------------------------
#   revision 1.5
#   date: 2004/12/06 11:42:40;  author: dedekind;  state: Exp;  lines: +5 -5
#   Several tweaks.
#   ----------------------------
#   revision 1.4
#   date: 2004/12/06 10:02:01;  author: dedekind;  state: Exp;  lines: +2 -2
#   By default simulate 8MiB flash instead of 64MiB in order to not to waste
#   RAM too much especially if nandsim is not compiled as module.
# 
# ChangeSet
#   2004/12/13 11:33:49+00:00 dwmw2@shinybook.infradead.org 
#   JFFS2 locking fix: Don't hold references to obsolete nodes without lock.
#   
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# fs/jffs2/nodelist.c
#   2004/12/13 11:33:34+00:00 dwmw2@shinybook.infradead.org +25 -13
#   revision 1.90
#   date: 2004/12/08 17:59:20;  author: dwmw2;  state: Exp;  lines: +25 -13
#   Adjust jffs2_get_inode_nodes() so we don't use node refs after they're obsoleted.
# 
# ChangeSet
#   2004/12/13 11:30:33+00:00 jarkko.lavinen@nokia.com 
#   MTD: Increase nand_write_page() ECC buffer size to cope with 12-byte ECC.
#   
#   Signed-off-by: Jarkko Lavinen <Jarkko.Lavinen@nokia.com>
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# drivers/mtd/nand/nand_base.c
#   2004/12/13 11:30:18+00:00 jarkko.lavinen@nokia.com +2 -2
#   ----------------------------
#   revision 1.126
#   date: 2004/12/13 11:22:25;  author: lavinen;  state: Exp;  lines: +2 -2
#   Use 32 ecc bytes in nand_write_page(), similar to nand_read_ec().
#   ----------------------------
#   revision 1.125
#   date: 2004/12/03 14:06:14;  author: lavinen;  state: Exp;  lines: +1 -2
#   Removed the unneeded setting of eccbytes to 12.
#   ----------------------------
#   revision 1.124
#   date: 2004/12/03 13:23:33;  author: lavinen;  state: Exp;  lines: +3 -2
#   Fixed for the 12 byte HW ecc support.
#   ----------------------------
# 
# ChangeSet
#   2004/12/13 10:56:24+00:00 dwmw2@shinybook.infradead.org 
#   Merge shinybook.infradead.org:/home/dwmw2/bk/linus-2.6
#   into shinybook.infradead.org:/home/dwmw2/bk/mtd-2.6
# 
# fs/Kconfig
#   2004/12/13 10:56:15+00:00 dwmw2@shinybook.infradead.org +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/12/11 19:15:36-06:00 jejb@mulgrave.(none) 
#   SCSI: Quieten the incorrect state change message
#   
#   Make it a scsi logging message instead (under ERROR_RECOVERY)
#   
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
# 
# drivers/scsi/scsi_lib.c
#   2004/12/11 19:14:44-06:00 jejb@mulgrave.(none) +6 -5
#   SCSI: Quieten the incorrect state change message
# 
# ChangeSet
#   2004/12/08 00:40:23-05:00 len.brown@intel.com 
#   [ACPI] fix polarity of CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI message
#   
#   Signed-off-by: Len Brown <len.brown@intel.com>
# 
# arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c
#   2004/12/08 00:36:27-05:00 len.brown@intel.com +1 -1
#   complain about CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI missing only when it is missing
# 
# ChangeSet
#   2004/12/08 00:33:06-05:00 len.brown@intel.com 
#   [ACPI] remove duplicate _PDC #defines resulting from mis-merge
#   
#   Signed-off-by: Zhenyu Z. Wang <zhenyu.z.wang@intel.com>
#   Signed-off-by: Len Brown <len.brown@intel.com>
# 
# include/asm-i386/acpi.h
#   2004/12/08 00:32:58-05:00 len.brown@intel.com +0 -6
#   remove duplicate #defines resulting from mis-merge
# 
# ChangeSet
#   2004/12/07 19:27:33-05:00 jgarzik@pobox.com 
#   drivers/block/floppy:  kill #include linux/version.h
#   
#   Appears to be unnecessary.
# 
# drivers/block/floppy.c
#   2004/12/07 19:27:27-05:00 jgarzik@pobox.com +0 -1
#   drivers/block/floppy:  kill #include linux/version.h
#   
#   Appears to be unnecessary.
# 
# ChangeSet
#   2004/12/07 18:46:10-05:00 jgarzik@pobox.com 
#   Merge pobox.com:/garz/repo/linux-2.6 into pobox.com:/garz/repo/misc-2.6
# 
# sound/oss/soundcard.c
#   2004/12/07 18:46:07-05:00 jgarzik@pobox.com +0 -0
#   Auto merged
# 
# sound/oss/i810_audio.c
#   2004/12/07 18:46:07-05:00 jgarzik@pobox.com +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/12/07 15:38:26-06:00 shaggy@austin.ibm.com 
#   JFS: flush new iag from bd_inode's mapping
#   
#   This is a fix to help jfs work with grub.  A new IAG is created in
#   the bd_inode's mapping, but subsequently modified in a different
#   mapping.  We should invalidate the former page to keep grub from
#   using that cached page.  It isn't useful to have it cached anyway,
#   since jfs will never access it again through that mapping.
#   
#   Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
# 
# fs/jfs/jfs_metapage.c
#   2004/12/07 15:38:08-06:00 shaggy@austin.ibm.com +1 -8
#   META_discard no longer implies that we clear the write flag
# 
# fs/jfs/jfs_imap.c
#   2004/12/07 15:38:08-06:00 shaggy@austin.ibm.com +6 -0
#   Invalidate page of newly initialized iag
# 
# ChangeSet
#   2004/12/06 17:23:23-05:00 len.brown@intel.com 
#   Merge intel.com:/home/lenb/src/26-stable-dev
#   into intel.com:/home/lenb/src/26-latest-dev
# 
# drivers/acpi/tables/tbxfroot.c
#   2004/12/06 17:23:20-05:00 len.brown@intel.com +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/12/06 17:12:37-05:00 len.brown@intel.com 
#   [ACPI] ACPICA 20041203 from Bob Moore and Alexey Starikovskiy
#   
#   The low-level field insertion/extraction code (exfldio)
#   has been completely rewritten to eliminate unnecessary
#   complexity, bugs, and boundary conditions.
#   
#   Fixed a problem in the ToInteger, ToBuffer, ToHexString,
#   and ToDecimalString operators where the input operand could
#   be inadvertently deleted if no conversion was necessary
#   (e.g., if the input to ToInteger was an Integer object.)
#   
#   Fixed a problem with the ToDecimalString and ToHexString
#   where an incorrect exception code was returned if the
#   resulting string would be > 200 chars.  AE_STRING_LIMIT is
#   now returned.
#   
#   Fixed a problem with the Concatenate operator where AE_OK
#   was always returned, even if the operation failed.
#   
#   Fixed a problem in oswinxf (used by AcpiExec and iASL)
#   to allow > 128 semaphores to be allocated.
#   
#   Signed-off-by: Len Brown <len.brown@intel.com>
# 
# include/acpi/amlcode.h
#   2004/12/06 16:15:20-05:00 len.brown@intel.com +1 -0
#   ACPICA 20041203
# 
# include/acpi/acobject.h
#   2004/12/06 16:15:20-05:00 len.brown@intel.com +1 -3
#   ACPICA 20041203
# 
# include/acpi/acmacros.h
#   2004/12/06 16:15:21-05:00 len.brown@intel.com +1 -0
#   ACPICA 20041203
# 
# include/acpi/acconfig.h
#   2004/12/06 16:15:21-05:00 len.brown@intel.com +1 -1
#   ACPICA 20041203
# 
# drivers/acpi/parser/psopcode.c
#   2004/12/06 16:15:25-05:00 len.brown@intel.com +4 -4
#   ACPICA 20041203
# 
# drivers/acpi/executer/exprep.c
#   2004/12/06 16:15:26-05:00 len.brown@intel.com +2 -22
#   ACPICA 20041203
# 
# drivers/acpi/executer/exoparg1.c
#   2004/12/06 16:15:26-05:00 len.brown@intel.com +22 -4
#   ACPICA 20041203
# 
# drivers/acpi/executer/exmisc.c
#   2004/12/06 16:15:26-05:00 len.brown@intel.com +1 -1
#   ACPICA 20041203
# 
# drivers/acpi/executer/exfldio.c
#   2004/12/06 16:15:26-05:00 len.brown@intel.com +114 -432
#   ACPICA 20041203
# 
# drivers/acpi/executer/exdump.c
#   2004/12/06 16:15:26-05:00 len.brown@intel.com +0 -3
#   ACPICA 20041203
# 
# drivers/acpi/events/evgpe.c
#   2004/12/06 16:15:25-05:00 len.brown@intel.com +13 -13
#   ACPICA 20041203
# 
# drivers/acpi/dispatcher/dswexec.c
#   2004/12/06 16:15:25-05:00 len.brown@intel.com +16 -8
#   ACPICA 20041203
# 
# drivers/acpi/dispatcher/dsopcode.c
#   2004/12/06 16:15:25-05:00 len.brown@intel.com +2 -3
#   ACPICA 20041203
# 
# ChangeSet
#   2004/12/06 16:57:17-05:00 len.brown@intel.com 
#   [ACPI] ACPICA 20041119 from Bob Moore
#   
#   Fixed a problem in acpi_ex_convert_to_integer
#   where new integers were not truncated to 32 bits for
#   32-bit ACPI tables. This routine converts buffers and
#   strings to integers.
#   
#   Implemented support to store a value to an Index() on a
#   String object.  This is an ACPI 2.0 feature that had not
#   yet been implemented.
#   
#   Implemented new behavior for storing objects to individual
#   package elements (via the Index() operator). The
#   previous behavior was to invoke the implicit conversion
#   rules if an object was already present at the index.
#   The new behavior is to simply delete any existing object
#   and directly store the new object. Although the ACPI
#   specification seems unclear on this subject, other ACPI
#   implementations behave in this manner.  (This is the root
#   of the AE_BAD_HEX_CONSTANT issue.)
#   
#   Modified the RSDP memory scan mechanism to support the
#   extended checksum for ACPI 2.0 (and above) RSDPs. Note
#   that the search continues until a valid RSDP signature is
#   found with a valid checksum.
#   
#   Signed-off-by: Len Brown <len.brown@intel.com>
# 
# include/acpi/acoutput.h
#   2004/12/06 16:02:10-05:00 len.brown@intel.com +1 -1
#   ACPICA 20041119
# 
# include/acpi/acmacros.h
#   2004/12/06 16:02:10-05:00 len.brown@intel.com +12 -12
#   ACPICA 20041119
# 
# include/acpi/acconfig.h
#   2004/12/06 16:02:10-05:00 len.brown@intel.com +1 -1
#   ACPICA 20041119
# 
# drivers/acpi/tables/tbxfroot.c
#   2004/12/06 16:02:13-05:00 len.brown@intel.com +34 -11
#   ACPICA 20041119
# 
# drivers/acpi/tables/tbrsdt.c
#   2004/12/06 16:02:13-05:00 len.brown@intel.com +1 -0
#   ACPICA 20041119
# 
# drivers/acpi/executer/exstore.c
#   2004/12/06 16:02:13-05:00 len.brown@intel.com +26 -36
#   ACPICA 20041119
# 
# drivers/acpi/executer/exoparg2.c
#   2004/12/06 16:02:13-05:00 len.brown@intel.com +2 -2
#   ACPICA 20041119
# 
# drivers/acpi/executer/exdump.c
#   2004/12/06 16:56:20-05:00 len.brown@intel.com +5 -3
#   ACPICA 20041119
# 
# drivers/acpi/executer/exconvrt.c
#   2004/12/06 16:02:13-05:00 len.brown@intel.com +9 -7
#   ACPICA 20041119
# 
# drivers/acpi/executer/exconfig.c
#   2004/12/06 16:02:13-05:00 len.brown@intel.com +1 -1
#   ACPICA 20041119
# 
# ChangeSet
#   2004/12/06 15:58:53-05:00 len.brown@intel.com 
#   merge
# 
# drivers/acpi/processor.c
#   2004/12/06 15:58:46-05:00 len.brown@intel.com +1 -1
#   merge
# 
# ChangeSet
#   2004/12/06 14:38:49-06:00 bunk@stusta.de 
#   [PATCH] i386 mca.c: small cleanups
#   
#   The patch below contains the following cleanups:
#   - make spinlock mca_lock static
#   - make struct mca_standard_resources static
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
# 
# include/asm-i386/mca.h
#   2004/12/01 01:03:10-06:00 bunk@stusta.de +0 -3
#   i386 mca.c: small cleanups
# 
# arch/i386/kernel/mca.c
#   2004/12/01 01:03:44-06:00 bunk@stusta.de +2 -2
#   i386 mca.c: small cleanups
# 
# include/linux/acpi.h
#   2004/12/06 15:23:34-05:00 len.brown@intel.com +0 -0
#   Auto merged
# 
# drivers/acpi/pci_irq.c
#   2004/12/06 15:23:34-05:00 len.brown@intel.com +0 -0
#   Auto merged
# 
# drivers/acpi/pci_bind.c
#   2004/12/06 15:23:34-05:00 len.brown@intel.com +0 -0
#   Auto merged
# 
# drivers/acpi/bus.c
#   2004/12/06 15:23:33-05:00 len.brown@intel.com +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/12/06 14:23:20-06:00 matthew@wil.cx 
#   [PATCH] Move MCA_bus to linux/mca.h
#   
#    - Move MCA_bus declaration from <asm/processor.h> to <linux/mca.h>
#    - Define it in mca.c, not setup.c
#    - EXPORT_SYMBOL it at the site of its definition.
#    - Fix up random files to include <linux/mca.h> for the use of the MCA_bus
#      symbol
#    - Delete some unnecessary ifdefs.
#    - Delete some unneeded comments.
#   
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
# 
# include/linux/mca.h
#   2004/12/01 14:54:03-06:00 matthew@wil.cx +3 -11
#   Move MCA_bus to linux/mca.h
# 
# include/asm-x86_64/processor.h
#   2004/12/01 14:54:03-06:00 matthew@wil.cx +0 -6
#   Move MCA_bus to linux/mca.h
# 
# include/asm-v850/processor.h
#   2004/12/01 14:54:03-06:00 matthew@wil.cx +0 -7
#   Move MCA_bus to linux/mca.h
# 
# include/asm-sparc64/processor.h
#   2004/12/01 14:54:03-06:00 matthew@wil.cx +0 -4
#   Move MCA_bus to linux/mca.h
# 
# include/asm-sparc/processor.h
#   2004/12/01 14:54:03-06:00 matthew@wil.cx +0 -6
#   Move MCA_bus to linux/mca.h
# 
# include/asm-sh64/processor.h
#   2004/12/01 14:54:03-06:00 matthew@wil.cx +0 -6
#   Move MCA_bus to linux/mca.h
# 
# include/asm-sh/processor.h
#   2004/12/01 14:54:03-06:00 matthew@wil.cx +0 -6
#   Move MCA_bus to linux/mca.h
# 
# include/asm-ppc64/processor.h
#   2004/12/01 14:54:01-06:00 matthew@wil.cx +0 -6
#   Move MCA_bus to linux/mca.h
# 
# include/asm-ppc/processor.h
#   2004/12/01 14:54:01-06:00 matthew@wil.cx +0 -6
#   Move MCA_bus to linux/mca.h
# 
# include/asm-parisc/processor.h
#   2004/12/01 14:54:01-06:00 matthew@wil.cx +0 -3
#   Move MCA_bus to linux/mca.h
# 
# include/asm-mips/processor.h
#   2004/12/01 14:54:01-06:00 matthew@wil.cx +0 -6
#   Move MCA_bus to linux/mca.h
# 
# include/asm-m68knommu/processor.h
#   2004/12/01 14:54:01-06:00 matthew@wil.cx +0 -5
#   Move MCA_bus to linux/mca.h
# 
# include/asm-i386/processor.h
#   2004/12/01 14:54:00-06:00 matthew@wil.cx +0 -5
#   Move MCA_bus to linux/mca.h
# 
# include/asm-h8300/processor.h
#   2004/12/01 14:53:59-06:00 matthew@wil.cx +0 -5
#   Move MCA_bus to linux/mca.h
# 
# include/asm-arm26/processor.h
#   2004/12/01 14:53:59-06:00 matthew@wil.cx +0 -3
#   Move MCA_bus to linux/mca.h
# 
# include/asm-arm/processor.h
#   2004/12/01 14:53:59-06:00 matthew@wil.cx +0 -3
#   Move MCA_bus to linux/mca.h
# 
# include/asm-alpha/processor.h
#   2004/12/01 14:53:59-06:00 matthew@wil.cx +0 -6
#   Move MCA_bus to linux/mca.h
# 
# drivers/serial/8250.c
#   2004/12/01 14:53:57-06:00 matthew@wil.cx +1 -2
#   Move MCA_bus to linux/mca.h
# 
# arch/i386/kernel/time.c
#   2004/12/01 14:53:46-06:00 matthew@wil.cx +2 -3
#   Move MCA_bus to linux/mca.h
# 
# arch/i386/kernel/setup.c
#   2004/12/01 14:53:46-06:00 matthew@wil.cx +11 -2
#   Move MCA_bus to linux/mca.h
# 
# arch/i386/kernel/mca.c
#   2004/12/01 14:53:40-06:00 matthew@wil.cx +3 -0
#   Move MCA_bus to linux/mca.h
# 
# arch/i386/kernel/i386_ksyms.c
#   2004/12/01 14:53:40-06:00 matthew@wil.cx +0 -1
#   Move MCA_bus to linux/mca.h
# 
# ChangeSet
#   2004/12/06 15:00:40-05:00 len.brown@intel.com 
#   build fix
# 
# include/acpi/acpixf.h
#   2004/12/06 15:00:29-05:00 len.brown@intel.com +1 -1
#   build fix
# 
# ChangeSet
#   2004/12/06 11:38:01-06:00 jejb@mulgrave.(none) 
#   Rename SCSI ChangeLog to reflect its venarability
#   
#   The last time it was modified was 1997, so add the 
#   date range of applicability to its name.
#   
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
# 
# Documentation/scsi/ChangeLog.1992-1997
#   2004/12/06 11:36:04-06:00 jejb@mulgrave.(none) +0 -0
#   Rename: Documentation/scsi/ChangeLog -> Documentation/scsi/ChangeLog.1992-1997
# 
# ChangeSet
#   2004/12/06 14:40:48+01:00 perex@suse.cz 
#   Merge suse.cz:/home/perex/bk/linux-sound/linux-2.5
#   into suse.cz:/home/perex/bk/linux-sound/linux-sound
# 
# sound/core/init.c
#   2004/12/06 14:40:20+01:00 perex@suse.cz +0 -4
#   Auto merged
# 
# ChangeSet
#   2004/12/06 01:43:31-05:00 len.brown@intel.com 
#   Merge intel.com:/home/lenb/src/26-stable-dev
#   into intel.com:/home/lenb/src/26-latest-dev
# 
# drivers/acpi/ec.c
#   2004/12/06 01:43:27-05:00 len.brown@intel.com +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/12/06 01:40:07-05:00 len.brown@intel.com 
#   [ACPI] 32-bit EC access
#   
#   http://bugzilla.kernel.org/show_bug.cgi?id=1744
#   
#   Signed-off-by: Luming Yu <luming.yu@intel.com>
#   Signed-off-by: Len Brown <len.brown@intel.com>
# 
# drivers/acpi/ec.c
#   2004/12/01 08:46:15-05:00 len.brown@intel.com +24 -0
#   32-bit EC access
# 
# ChangeSet
#   2004/12/06 00:09:58-05:00 len.brown@intel.com 
#   Merge intel.com:/home/lenb/src/26-stable-dev
#   into intel.com:/home/lenb/src/26-latest-dev
# 
# drivers/acpi/events/evxfevnt.c
#   2004/12/06 00:09:54-05:00 len.brown@intel.com +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/12/06 00:08:27-05:00 len.brown@intel.com 
#   build fix
# 
# drivers/acpi/events/evxfevnt.c
#   2004/12/06 00:08:18-05:00 len.brown@intel.com +1 -2
#   build fix
# 
# ChangeSet
#   2004/12/06 00:03:42-05:00 len.brown@intel.com 
#   Merge intel.com:/home/lenb/src/26-stable-dev
#   into intel.com:/home/lenb/src/26-latest-dev
# 
# drivers/acpi/thermal.c
#   2004/12/06 00:03:38-05:00 len.brown@intel.com +0 -0
#   Auto merged
# 
# drivers/acpi/sleep/proc.c
#   2004/12/06 00:03:38-05:00 len.brown@intel.com +0 -0
#   Auto merged
# 
# drivers/acpi/pci_link.c
#   2004/12/06 00:03:38-05:00 len.brown@intel.com +0 -0
#   Auto merged
# 
# drivers/acpi/pci_irq.c
#   2004/12/06 00:03:38-05:00 len.brown@intel.com +0 -0
#   Auto merged
# 
# drivers/acpi/ec.c
#   2004/12/06 00:03:38-05:00 len.brown@intel.com +0 -0
#   Auto merged
# 
# drivers/acpi/bus.c
#   2004/12/06 00:03:38-05:00 len.brown@intel.com +0 -0
#   Auto merged
# 
# Documentation/kernel-parameters.txt
#   2004/12/06 00:03:38-05:00 len.brown@intel.com +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/12/05 23:40:35-05:00 len.brown@intel.com 
#   [ACPI] fixes from stack consumption audit
#   
#   http://bugzilla.kernel.org/show_bug.cgi?id=2901
#   
#   Signed-off-by: Luming Yu <luming.yu@intel.com>
#   Signed-off-by: Len Brown <len.brown@intel.com>
# 
# drivers/acpi/video.c
#   2004/12/01 06:31:48-05:00 len.brown@intel.com +7 -6
#   stack consumption audit
# 
# drivers/acpi/thermal.c
#   2004/12/01 06:49:30-05:00 len.brown@intel.com +22 -5
#   stack consumption audit
# 
# drivers/acpi/pci_link.c
#   2004/12/01 06:42:40-05:00 len.brown@intel.com +36 -26
#   stack consumption audit
# 
# drivers/acpi/pci_irq.c
#   2004/12/01 06:31:47-05:00 len.brown@intel.com +12 -2
#   stack consumption audit
# 
# drivers/acpi/pci_bind.c
#   2004/12/01 06:31:47-05:00 len.brown@intel.com +30 -7
#   stack consumption audit
# 
# ChangeSet
#   2004/12/05 23:38:12-05:00 len.brown@intel.com 
#   [ACPI] handle GPE sharing between button and lid
#   
#   http://bugzilla.kernel.org/show_bug.cgi?id=3518
#   
#   Signed-off-by: David Shaohua Li <shaohua.li@intel.com>
#   Signed-off-by: Len Brown <len.brown@intel.com>
# 
# drivers/acpi/sleep/proc.c
#   2004/12/05 23:38:04-05:00 len.brown@intel.com +17 -0
#   sharing GPE w/ button and LID
# 
# ChangeSet
#   2004/12/05 23:23:53-05:00 len.brown@intel.com 
#   [ACPI] add "acpi_fake_ecdt" workaround for Gateway:
#   ex_access_region Region EmbeddedControl(3) has no handler
#   
#   http://bugzilla.kernel.org/show_bug.cgi?id=1690
#   
#   Signed-off-by: David Shaohua Li <shaohua.li@intel.com>
#   Signed-off-by: Len Brown <len.brown@intel.com>
# 
# drivers/acpi/ec.c
#   2004/12/05 23:23:45-05:00 len.brown@intel.com +107 -4
#   "acpi_fake_ecdt"
# 
# Documentation/kernel-parameters.txt
#   2004/12/05 23:23:45-05:00 len.brown@intel.com +2 -0
#   "acpi_fake_ecdt"
# 
# ChangeSet
#   2004/12/05 23:10:31-05:00 len.brown@intel.com 
#   [ACPI] fix "Error getting context for object" warning
#   http://bugzilla.kernel.org/show_bug.cgi?id=3805
#   
#   Signed-off-by: David Shaohua Li <shaohua.li@intel.com>
#   Signed-off-by: Len Brown <len.brown@intel.com>
# 
# drivers/pnp/pnpacpi/core.c
#   2004/11/25 20:28:37-05:00 len.brown@intel.com +3 -3
#   fix "Error getting context for object" warning
# 
# drivers/acpi/bus.c
#   2004/11/25 20:09:42-05:00 len.brown@intel.com +1 -1
#   fix "Error getting context for object" warning
# 
# ChangeSet
#   2004/12/05 22:52:35-05:00 len.brown@intel.com 
#   [ACPI] S3 resume using RTC
#   http://bugzilla.kernel.org/show_bug.cgi?id=1320
#   
#   By: Patrick Mochel, Karol Kozimor, Shaohua Li
#   Signed-off-by: Len Brown <len.brown@intel.com>
# 
# drivers/acpi/sleep/proc.c
#   2004/11/22 22:02:27-05:00 len.brown@intel.com +36 -25
#   wake on RTC
# 
# ChangeSet
#   2004/12/03 22:40:32-05:00 len.brown@intel.com 
#   [ACPI] fix VIA IRQ issue by enabling VIA quirk
#   http://bugzilla.kernel.org/show_bug.cgi?id=3319
#   
#   Signed-off-by: David Shaohua Li <shaohua.li@intel.com>
#   Signed-off-by: Len Brown <len.brown@intel.com>
# 
# drivers/pci/quirks.c
#   2004/12/02 20:01:29-05:00 len.brown@intel.com +1 -0
#   yet another example of VIA quirk
# 
# ChangeSet
#   2004/12/02 16:45:38-06:00 shaggy@austin.ibm.com 
#   JFS: speed up nointegrity mount
#   
#   No need to flush metadata to advance the journal's sync-point if
#   we're not really writing to the journal
#   
#   Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
# 
# fs/jfs/jfs_logmgr.c
#   2004/12/02 16:45:17-06:00 shaggy@austin.ibm.com +4 -0
#   don't need to flush metadata to disk for nointegrity
# 
# ChangeSet
#   2004/12/02 17:12:47-05:00 rl@hellgate.ch 
#   [PATCH] via-rhine: WOL band-aid
#   
#   After I disabled legacy WOL (i.e. controlled by EEPROM rather than
#   driver) in 2.6.9, several people reported regressions. Legacy WOL had
#   worked for them, but now it didn't anymore. The Right Way (TM) to fix
#   this will get the driver to set up working WOL for all hardware, but a
#   simpler solution will have to do for the time being: If a user requests
#   magic packet WOL, the driver re-enables legacy WOL. Yeah, I know it's
#   cheating.
#   
#   This version applies against -mm. I suggest to put it there for testing
#   and into 2.6.11 if feedback is good.
#   
#   Thanks to Pavel Ruzicka for testing.
#   
#   Roger
#   
#   Signed-off-by: Roger Luethi <rl@hellgate.ch>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/via-rhine.c
#   2004/11/30 17:32:01-05:00 rl@hellgate.ch +13 -5
#   via-rhine: WOL band-aid
# 
# ChangeSet
#   2004/12/02 16:54:31-05:00 jgarzik@pobox.com 
#   Merge pobox.com:/garz/repo/linux-2.6
#   into pobox.com:/garz/repo/netdev-2.6/via-rhine
# 
# drivers/net/via-rhine.c
#   2004/12/02 16:54:27-05:00 jgarzik@pobox.com +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/12/01 21:50:03-08:00 davem@nuts.davemloft.net 
#   Merge nuts.davemloft.net:/disk1/BK/net-2.6.11-work
#   into nuts.davemloft.net:/disk1/BK/net-2.6.11
# 
# net/xfrm/xfrm_policy.c
#   2004/12/01 21:49:52-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# net/core/skbuff.c
#   2004/12/01 21:49:52-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# arch/sparc64/defconfig
#   2004/12/01 21:49:52-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# arch/mips/configs/rm200_defconfig
#   2004/12/01 21:49:51-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# arch/m68k/configs/sun3x_defconfig
#   2004/12/01 21:49:51-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# arch/m68k/configs/sun3_defconfig
#   2004/12/01 21:49:51-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# arch/m68k/configs/q40_defconfig
#   2004/12/01 21:49:51-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# arch/m68k/configs/mvme16x_defconfig
#   2004/12/01 21:49:51-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# arch/m68k/configs/mvme147_defconfig
#   2004/12/01 21:49:51-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# arch/m68k/configs/mac_defconfig
#   2004/12/01 21:49:51-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# arch/m68k/configs/hp300_defconfig
#   2004/12/01 21:49:51-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# arch/m68k/configs/bvme6000_defconfig
#   2004/12/01 21:49:51-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# arch/m68k/configs/atari_defconfig
#   2004/12/01 21:49:51-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# arch/m68k/configs/apollo_defconfig
#   2004/12/01 21:49:51-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# arch/m68k/configs/amiga_defconfig
#   2004/12/01 21:49:51-08:00 davem@nuts.davemloft.net +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/12/01 23:50:22-05:00 len.brown@intel.com 
#   Merge intel.com:/home/lenb/bk/26-latest-ref
#   into intel.com:/home/lenb/src/26-latest-dev
# 
# arch/ia64/kernel/process.c
#   2004/12/01 23:50:18-05:00 len.brown@intel.com +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/12/01 19:21:17-05:00 len.brown@intel.com 
#   Merge intel.com:/home/lenb/bk/26-latest-ref
#   into intel.com:/home/lenb/src/26-latest-dev
# 
# arch/ia64/kernel/process.c
#   2004/12/01 19:21:13-05:00 len.brown@intel.com +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/12/01 16:17:57-06:00 shaggy@austin.ibm.com 
#   JFS: add security and trusted xattrs
#   
#   Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
# 
# fs/jfs/xattr.c
#   2004/12/01 16:17:46-06:00 shaggy@austin.ibm.com +55 -4
#   Add security and trusted xattrs
# 
# fs/Kconfig
#   2004/12/01 16:17:46-06:00 shaggy@austin.ibm.com +12 -0
#   Add jfs security labels (xattrs)
# 
# ChangeSet
#   2004/11/30 22:04:39-08:00 tgraf@suug.ch 
#   [RTNETLINK]: Link attribute modification by interface name.
#   
#   This patch allows modification of link attributes by the interface name,
#   avoids the requirement of translating a name to an ifindex first, and
#   provides better atomicity to userspace.  It works by setting the ifindex
#   to a negative number and provide the interface name via the IFLA_IFNAME
#   TLV and let the kernel lookup the device by name instead of ifindex. Changing
#   the interface name will not work using this method because IFLA_IFNAME also
#   transports the new interface name.  The patch also fixes a possible source for
#   bugs if IFNAMSIZ is ever changed to a number not aligned to RTA_ALIGNTO.
#   
#   Signed-off-by: Thomas Graf <tgraf@suug.ch>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/core/rtnetlink.c
#   2004/11/30 22:04:20-08:00 tgraf@suug.ch +18 -3
#   [RTNETLINK]: Link attribute modification by interface name.
#   
#   This patch allows modification of link attributes by the interface name,
#   avoids the requirement of translating a name to an ifindex first, and
#   provides better atomicity to userspace.  It works by setting the ifindex
#   to a negative number and provide the interface name via the IFLA_IFNAME
#   TLV and let the kernel lookup the device by name instead of ifindex. Changing
#   the interface name will not work using this method because IFLA_IFNAME also
#   transports the new interface name.  The patch also fixes a possible source for
#   bugs if IFNAMSIZ is ever changed to a number not aligned to RTA_ALIGNTO.
#   
#   Signed-off-by: Thomas Graf <tgraf@suug.ch>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# ChangeSet
#   2004/11/30 22:01:06-08:00 michal@logix.cz 
#   [CRYPTO]: Standalone VIA PadLock driver.
#   
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# include/linux/crypto.h
#   2004/11/30 22:00:21-08:00 michal@logix.cz +3 -0
#   [CRYPTO]: Standalone VIA PadLock driver.
# 
# drivers/Makefile
#   2004/11/30 22:00:21-08:00 michal@logix.cz +1 -0
#   [CRYPTO]: Standalone VIA PadLock driver.
# 
# crypto/Kconfig
#   2004/11/30 22:00:21-08:00 michal@logix.cz +1 -0
#   [CRYPTO]: Standalone VIA PadLock driver.
# 
# drivers/crypto/padlock.h
#   2004/11/30 22:00:15-08:00 michal@logix.cz +36 -0
#   [CRYPTO]: Standalone VIA PadLock driver.
# 
# drivers/crypto/padlock-generic.c
#   2004/11/30 22:00:15-08:00 michal@logix.cz +63 -0
#   [CRYPTO]: Standalone VIA PadLock driver.
# 
# drivers/crypto/padlock-aes.c
#   2004/11/30 22:00:15-08:00 michal@logix.cz +470 -0
#   [CRYPTO]: Standalone VIA PadLock driver.
# 
# drivers/crypto/Makefile
#   2004/11/30 22:00:15-08:00 michal@logix.cz +7 -0
#   [CRYPTO]: Standalone VIA PadLock driver.
# 
# drivers/crypto/padlock.h
#   2004/11/30 22:00:15-08:00 michal@logix.cz +0 -0
#   BitKeeper file /disk1/BK/net-2.6.11/drivers/crypto/padlock.h
# 
# drivers/crypto/padlock-generic.c
#   2004/11/30 22:00:15-08:00 michal@logix.cz +0 -0
#   BitKeeper file /disk1/BK/net-2.6.11/drivers/crypto/padlock-generic.c
# 
# drivers/crypto/padlock-aes.c
#   2004/11/30 22:00:15-08:00 michal@logix.cz +0 -0
#   BitKeeper file /disk1/BK/net-2.6.11/drivers/crypto/padlock-aes.c
# 
# drivers/crypto/Makefile
#   2004/11/30 22:00:15-08:00 michal@logix.cz +0 -0
#   BitKeeper file /disk1/BK/net-2.6.11/drivers/crypto/Makefile
# 
# drivers/crypto/Kconfig
#   2004/11/30 22:00:13-08:00 michal@logix.cz +23 -0
#   [CRYPTO]: Standalone VIA PadLock driver.
# 
# drivers/crypto/Kconfig
#   2004/11/30 22:00:13-08:00 michal@logix.cz +0 -0
#   BitKeeper file /disk1/BK/net-2.6.11/drivers/crypto/Kconfig
# 
# ChangeSet
#   2004/11/30 21:55:37-08:00 bunk@stusta.de 
#   [CRYPTO]: Make some code static
#   
#   This patch below makes some needlessly global code
#   static.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# crypto/tcrypt.h
#   2004/11/30 21:55:18-08:00 bunk@stusta.de +51 -51
#   [CRYPTO]: Make some code static
#   
#   This patch below makes some needlessly global code
#   static.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# crypto/tcrypt.c
#   2004/11/30 21:55:18-08:00 bunk@stusta.de +1 -1
#   [CRYPTO]: Make some code static
#   
#   This patch below makes some needlessly global code
#   static.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# crypto/sha512.c
#   2004/11/30 21:55:18-08:00 bunk@stusta.de +1 -1
#   [CRYPTO]: Make some code static
#   
#   This patch below makes some needlessly global code
#   static.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# ChangeSet
#   2004/11/30 21:51:06-08:00 robert.olsson@data.slu.se 
#   [IPV4]: FIB cleanup, fib_detect_death()
#   
#   Remove dependancy upon fib_hash specific
#   fn_hash_select_dflt and move it over to
#   fib_semantics.c
#   
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/fib_semantics.c
#   2004/11/30 21:50:04-08:00 robert.olsson@data.slu.se +23 -0
#   [IPV4]: FIB cleanup, fib_detect_death()
# 
# net/ipv4/fib_lookup.h
#   2004/11/30 21:50:04-08:00 robert.olsson@data.slu.se +3 -0
#   [IPV4]: FIB cleanup, fib_detect_death()
# 
# net/ipv4/fib_hash.c
#   2004/11/30 21:50:04-08:00 robert.olsson@data.slu.se +2 -25
#   [IPV4]: FIB cleanup, fib_detect_death()
# 
# ChangeSet
#   2004/11/30 21:45:25-08:00 robert.olsson@data.slu.se 
#   [IPV4]: FIB cleanup, fib_find_alias()
#   
#   Abstract out fib_node arg usage in fib_find_alias(),
#   move to fib_semantics.c
#   
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/fib_semantics.c
#   2004/11/30 21:44:45-08:00 robert.olsson@data.slu.se +18 -0
#   [IPV4]: FIB cleanup, fib_find_alias()
# 
# net/ipv4/fib_lookup.h
#   2004/11/30 21:44:45-08:00 robert.olsson@data.slu.se +2 -0
#   [IPV4]: FIB cleanup, fib_find_alias()
# 
# net/ipv4/fib_hash.c
#   2004/11/30 21:44:45-08:00 robert.olsson@data.slu.se +10 -22
#   [IPV4]: FIB cleanup, fib_find_alias()
# 
# ChangeSet
#   2004/11/30 21:37:16-08:00 davem@nuts.davemloft.net 
#   [IPV4]: FIB cleanup, rtmsg_fib()
#   
#   Based largely upon a patch by Robert Olsson.
#   
#   Abstract out rtmsg_fib() so that it does not depend
#   upon fib_hash internal datastructures, move it to
#   fib_semantics.c
#   
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv4/fib_semantics.c
#   2004/11/30 21:36:06-08:00 davem@nuts.davemloft.net +27 -0
#   [IPV4]: FIB cleanup, rtmsg_fib()
# 
# net/ipv4/fib_lookup.h
#   2004/11/30 21:36:06-08:00 davem@nuts.davemloft.net +3 -0
#   [IPV4]: FIB cleanup, rtmsg_fib()
# 
# net/ipv4/fib_hash.c
#   2004/11/30 21:36:06-08:00 davem@nuts.davemloft.net +2 -34
#   [IPV4]: FIB cleanup, rtmsg_fib()
# 
# ChangeSet
#   2004/11/30 17:38:34-05:00 len.brown@intel.com 
#   merge
# 
# drivers/acpi/scan.c
#   2004/11/30 17:38:27-05:00 len.brown@intel.com +0 -2
#   merge
# 
# BitKeeper/deleted/.del-acpi_ksyms.c~3e52a41ca5aed029
#   2004/11/30 17:15:57-05:00 len.brown@intel.com +0 -0
#   Auto merged
# 
# drivers/acpi/pci_irq.c
#   2004/11/30 17:15:57-05:00 len.brown@intel.com +0 -0
#   Auto merged
# 
# drivers/acpi/pci_bind.c
#   2004/11/30 17:15:57-05:00 len.brown@intel.com +0 -0
#   Auto merged
# 
# drivers/acpi/bus.c
#   2004/11/30 17:15:57-05:00 len.brown@intel.com +0 -0
#   Auto merged
# 
# drivers/acpi/Makefile
#   2004/11/30 17:15:57-05:00 len.brown@intel.com +0 -0
#   Auto merged
# 
# arch/i386/kernel/acpi/boot.c
#   2004/11/30 17:15:57-05:00 len.brown@intel.com +0 -0
#   Auto merged
# 
# BitKeeper/deleted/.del-acpi_ksyms.c~3e52a41ca5aed029
#   2004/11/30 17:15:57-05:00 len.brown@intel.com +0 -0
#   Merge rename: drivers/acpi/acpi_ksyms.c -> BitKeeper/deleted/.del-acpi_ksyms.c~3e52a41ca5aed029
# 
# ChangeSet
#   2004/11/30 00:15:24+00:00 dwmw2@shinybook.infradead.org 
#   Merge shinybook.infradead.org:/home/dwmw2/bk/linus-2.6
#   into shinybook.infradead.org:/home/dwmw2/bk/mtd-2.6
# 
# MAINTAINERS
#   2004/11/30 00:15:16+00:00 dwmw2@shinybook.infradead.org +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/11/29 22:58:33+00:00 dedekind@infradead.org 
#   JFFS2: jffs2_get_inode_nodes(): Remove gratuitous memset on new nodes.
#   
#   We're about to set every field in the node structure. No need to spend
#   time filling it with zeroes. This is a fairly hot path.
#   
#   Signed-off-by: Artem Bityuckiy <dedekind@infradead.org>
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# fs/jffs2/nodelist.c
#   2004/11/29 22:58:12+00:00 dedekind@infradead.org +2 -2
#   Remove unneeded memset
# 
# ChangeSet
#   2004/11/29 22:55:00+00:00 dedekind@infradead.org 
#   JFFS2: Include vmalloc.h to fix compile warning.
#   
#   The previous fixes to use vmalloc for the eraseblock array missed it.
#   
#   Signed-off-by: Artem Bityuckiy <dedekind@infradead.org>
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# fs/jffs2/fs.c
#   2004/11/29 22:54:38+00:00 dedekind@infradead.org +2 -1
#   Include vmalloc.h header to prevent warning.
# 
# ChangeSet
#   2004/11/29 22:43:46+00:00 bunk@stusta.de 
#   MTD: Use select in Kconfig where appropriate.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# drivers/mtd/nand/Kconfig
#   2004/11/29 22:43:24+00:00 bunk@stusta.de +2 -3
#   The patch below switches options to use select where appropriate.
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
# 
# drivers/mtd/devices/Kconfig
#   2004/11/29 22:43:24+00:00 bunk@stusta.de +8 -9
#   The patch below switches options to use select where appropriate.
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
# 
# drivers/mtd/chips/Kconfig
#   2004/11/29 22:43:24+00:00 bunk@stusta.de +6 -5
#   The patch below switches options to use select where appropriate.
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
# 
# ChangeSet
#   2004/11/29 22:34:26+00:00 dwmw2@shinybook.infradead.org 
#   Merge linux-mtd@bkbits.net:mtd-2.6
#   into shinybook.infradead.org:/home/dwmw2/bk/mtd-2.6
# 
# MAINTAINERS
#   2004/11/29 22:34:18+00:00 dwmw2@shinybook.infradead.org +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/11/29 11:11:50+01:00 perex@suse.cz 
#   Merge
# 
# sound/pci/cs46xx/dsp_spos.c
#   2004/11/29 11:11:24+01:00 perex@suse.cz +0 -2
#   SCCS merged
# 
# sound/pci/cmipci.c
#   2004/11/29 11:04:01+01:00 perex@suse.cz +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/11/29 10:47:59+01:00 perex@suse.cz 
#   Merge suse.cz:/home/perex/bk/linux-sound/linux-2.5
#   into suse.cz:/home/perex/bk/linux-sound/linux-sound
# 
# sound/sparc/cs4231.c
#   2004/11/29 10:47:35+01:00 perex@suse.cz +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/11/29 10:31:20+01:00 perex@suse.cz 
#   [ALSA] alternate CS4235 ident string
#   
#   CS4236+ driver
#   The patch adds an alternate CS4235 ident string
#   
#   Signed-off-by: Pang Lih Wuei <basic@mozdev.org>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/isa/cs423x/cs4236.c
#   2004/11/26 04:31:19+01:00 perex@suse.cz +2 -0
#   [ALSA] alternate CS4235 ident string
#   
#   D:2004/11/26 11:31:19
#   C:CS4236+ driver
#   F:isa/cs423x/cs4236.c:1.46->1.47 
#   L:The patch adds an alternate CS4235 ident string
#   Signed-off-by: Pang Lih Wuei <basic@mozdev.org>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2004/11/29 10:30:14+01:00 perex@suse.cz 
#   [ALSA] alternate ALS0200 ident string
#   
#   ALS100 driver
#   The patch adds an alternate ALS0200 ident string
#   
#   Signed-off-by: Pang Lih Wuei <basic@mozdev.org>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/isa/als100.c
#   2004/11/26 04:30:48+01:00 perex@suse.cz +2 -0
#   [ALSA] alternate ALS0200 ident string
#   
#   D:2004/11/26 11:30:48
#   C:ALS100 driver
#   F:isa/als100.c:1.28->1.29 
#   L:The patch adds an alternate ALS0200 ident string
#   Signed-off-by: Pang Lih Wuei <basic@mozdev.org>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2004/11/29 10:29:08+01:00 perex@suse.cz 
#   [ALSA] Disable 'IEC958 Input Monitor' switch for ALC codecs
#   
#   AC97 Codec Core
#   'IEC958 Input Monitor' switch for ALC codecs produces only the
#   cracky noises, and KDE seems to turn this on as default in the
#   initialization.
#   So, better to remove this switch.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ac97/ac97_patch.c
#   2004/11/25 08:47:05+01:00 perex@suse.cz +4 -2
#   [ALSA] Disable 'IEC958 Input Monitor' switch for ALC codecs
#   
#   D:2004/11/25 15:47:05
#   C:AC97 Codec Core
#   F:pci/ac97/ac97_patch.c:1.60->1.61 
#   L:'IEC958 Input Monitor' switch for ALC codecs produces only the
#   L:cracky noises, and KDE seems to turn this on as default in the
#   L:initialization.
#   L:So, better to remove this switch.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2004/11/29 10:27:54+01:00 perex@suse.cz 
#   [ALSA] ALSA ISA drivers: misc cleanups
#   
#   AD1848 driver,CS4231 driver,ES1688 driver,GUS Library,SB drivers
#   Wavefront drivers,ES18xx driver,OPL3SA2 driver,AD1816A driver
#   Opti9xx drivers,SB16/AWE driver,SB8 driver
#   The patch below makes cleanups under sound/isa/ including:
#   - make needlessly global code static
#   - ad1816a/ad1816a_lib.c: much code was unused starting with the
#                            global function snd_ad1816a_timer
#   - removed EXPORT_SYMBOL's:
#     - cs423x/cs4231_lib.c: snd_cs4231_outm
#     - es1688/es1688_lib.c: snd_es1688_mixer_read
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/isa/wavefront/wavefront_synth.c
#   2004/11/25 08:17:53+01:00 perex@suse.cz +49 -49
#   [ALSA] ALSA ISA drivers: misc cleanups
#   
#   D:2004/11/25 15:17:52
#   C:AD1848 driver,CS4231 driver,ES1688 driver,GUS Library,SB drivers
#   C:Wavefront drivers,ES18xx driver,OPL3SA2 driver,AD1816A driver
#   C:Opti9xx drivers,SB16/AWE driver,SB8 driver
#   F:include/ad1848.h:1.11->1.12 
#   F:include/cs4231.h:1.8->1.9 
#   F:include/es1688.h:1.7->1.8 
#   F:include/gus.h:1.10->1.11 
#   F:include/sb.h:1.13->1.14 
#   F:include/snd_wavefront.h:1.5->1.6 
#   F:isa/es18xx.c:1.50->1.51 
#   F:isa/opl3sa2.c:1.39->1.40 
#   F:isa/ad1816a/ad1816a_lib.c:1.24->1.25 
#   F:isa/ad1848/ad1848_lib.c:1.37->1.38 
#   F:isa/cs423x/cs4231_lib.c:1.44->1.45 
#   F:isa/es1688/es1688_lib.c:1.28->1.29 
#   F:isa/gus/gus_dma.c:1.7->1.8 
#   F:isa/opti9xx/opti92x-ad1848.c:1.48->1.49 
#   F:isa/sb/sb16_main.c:1.21->1.22 
#   F:isa/sb/sb8_main.c:1.17->1.18 
#   F:isa/sb/sb_common.c:1.21->1.22 
#   F:isa/wavefront/wavefront.c:1.31->1.32 
#   F:isa/wavefront/wavefront_synth.c:1.21->1.22 
#   L:The patch below makes cleanups under sound/isa/ including:
#   L:- make needlessly global code static
#   L:- ad1816a/ad1816a_lib.c: much code was unused starting with the
#   L:                         global function snd_ad1816a_timer
#   L:- removed EXPORT_SYMBOL's:
#   L:  - cs423x/cs4231_lib.c: snd_cs4231_outm
#   L:  - es1688/es1688_lib.c: snd_es1688_mixer_read
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/isa/wavefront/wavefront.c
#   2004/11/25 08:17:53+01:00 perex@suse.cz +3 -3
#   [ALSA] ALSA ISA drivers: misc cleanups
#   
#   D:2004/11/25 15:17:52
#   C:AD1848 driver,CS4231 driver,ES1688 driver,GUS Library,SB drivers
#   C:Wavefront drivers,ES18xx driver,OPL3SA2 driver,AD1816A driver
#   C:Opti9xx drivers,SB16/AWE driver,SB8 driver
#   F:include/ad1848.h:1.11->1.12 
#   F:include/cs4231.h:1.8->1.9 
#   F:include/es1688.h:1.7->1.8 
#   F:include/gus.h:1.10->1.11 
#   F:include/sb.h:1.13->1.14 
#   F:include/snd_wavefront.h:1.5->1.6 
#   F:isa/es18xx.c:1.50->1.51 
#   F:isa/opl3sa2.c:1.39->1.40 
#   F:isa/ad1816a/ad1816a_lib.c:1.24->1.25 
#   F:isa/ad1848/ad1848_lib.c:1.37->1.38 
#   F:isa/cs423x/cs4231_lib.c:1.44->1.45 
#   F:isa/es1688/es1688_lib.c:1.28->1.29 
#   F:isa/gus/gus_dma.c:1.7->1.8 
#   F:isa/opti9xx/opti92x-ad1848.c:1.48->1.49 
#   F:isa/sb/sb16_main.c:1.21->1.22 
#   F:isa/sb/sb8_main.c:1.17->1.18 
#   F:isa/sb/sb_common.c:1.21->1.22 
#   F:isa/wavefront/wavefront.c:1.31->1.32 
#   F:isa/wavefront/wavefront_synth.c:1.21->1.22 
#   L:The patch below makes cleanups under sound/isa/ including:
#   L:- make needlessly global code static
#   L:- ad1816a/ad1816a_lib.c: much code was unused starting with the
#   L:                         global function snd_ad1816a_timer
#   L:- removed EXPORT_SYMBOL's:
#   L:  - cs423x/cs4231_lib.c: snd_cs4231_outm
#   L:  - es1688/es1688_lib.c: snd_es1688_mixer_read
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/isa/sb/sb_common.c
#   2004/11/25 08:17:53+01:00 perex@suse.cz +1 -1
#   [ALSA] ALSA ISA drivers: misc cleanups
#   
#   D:2004/11/25 15:17:52
#   C:AD1848 driver,CS4231 driver,ES1688 driver,GUS Library,SB drivers
#   C:Wavefront drivers,ES18xx driver,OPL3SA2 driver,AD1816A driver
#   C:Opti9xx drivers,SB16/AWE driver,SB8 driver
#   F:include/ad1848.h:1.11->1.12 
#   F:include/cs4231.h:1.8->1.9 
#   F:include/es1688.h:1.7->1.8 
#   F:include/gus.h:1.10->1.11 
#   F:include/sb.h:1.13->1.14 
#   F:include/snd_wavefront.h:1.5->1.6 
#   F:isa/es18xx.c:1.50->1.51 
#   F:isa/opl3sa2.c:1.39->1.40 
#   F:isa/ad1816a/ad1816a_lib.c:1.24->1.25 
#   F:isa/ad1848/ad1848_lib.c:1.37->1.38 
#   F:isa/cs423x/cs4231_lib.c:1.44->1.45 
#   F:isa/es1688/es1688_lib.c:1.28->1.29 
#   F:isa/gus/gus_dma.c:1.7->1.8 
#   F:isa/opti9xx/opti92x-ad1848.c:1.48->1.49 
#   F:isa/sb/sb16_main.c:1.21->1.22 
#   F:isa/sb/sb8_main.c:1.17->1.18 
#   F:isa/sb/sb_common.c:1.21->1.22 
#   F:isa/wavefront/wavefront.c:1.31->1.32 
#   F:isa/wavefront/wavefront_synth.c:1.21->1.22 
#   L:The patch below makes cleanups under sound/isa/ including:
#   L:- make needlessly global code static
#   L:- ad1816a/ad1816a_lib.c: much code was unused starting with the
#   L:                         global function snd_ad1816a_timer
#   L:- removed EXPORT_SYMBOL's:
#   L:  - cs423x/cs4231_lib.c: snd_cs4231_outm
#   L:  - es1688/es1688_lib.c: snd_es1688_mixer_read
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/isa/sb/sb8_main.c
#   2004/11/25 08:17:53+01:00 perex@suse.cz +2 -2
#   [ALSA] ALSA ISA drivers: misc cleanups
#   
#   D:2004/11/25 15:17:52
#   C:AD1848 driver,CS4231 driver,ES1688 driver,GUS Library,SB drivers
#   C:Wavefront drivers,ES18xx driver,OPL3SA2 driver,AD1816A driver
#   C:Opti9xx drivers,SB16/AWE driver,SB8 driver
#   F:include/ad1848.h:1.11->1.12 
#   F:include/cs4231.h:1.8->1.9 
#   F:include/es1688.h:1.7->1.8 
#   F:include/gus.h:1.10->1.11 
#   F:include/sb.h:1.13->1.14 
#   F:include/snd_wavefront.h:1.5->1.6 
#   F:isa/es18xx.c:1.50->1.51 
#   F:isa/opl3sa2.c:1.39->1.40 
#   F:isa/ad1816a/ad1816a_lib.c:1.24->1.25 
#   F:isa/ad1848/ad1848_lib.c:1.37->1.38 
#   F:isa/cs423x/cs4231_lib.c:1.44->1.45 
#   F:isa/es1688/es1688_lib.c:1.28->1.29 
#   F:isa/gus/gus_dma.c:1.7->1.8 
#   F:isa/opti9xx/opti92x-ad1848.c:1.48->1.49 
#   F:isa/sb/sb16_main.c:1.21->1.22 
#   F:isa/sb/sb8_main.c:1.17->1.18 
#   F:isa/sb/sb_common.c:1.21->1.22 
#   F:isa/wavefront/wavefront.c:1.31->1.32 
#   F:isa/wavefront/wavefront_synth.c:1.21->1.22 
#   L:The patch below makes cleanups under sound/isa/ including:
#   L:- make needlessly global code static
#   L:- ad1816a/ad1816a_lib.c: much code was unused starting with the
#   L:                         global function snd_ad1816a_timer
#   L:- removed EXPORT_SYMBOL's:
#   L:  - cs423x/cs4231_lib.c: snd_cs4231_outm
#   L:  - es1688/es1688_lib.c: snd_es1688_mixer_read
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/isa/sb/sb16_main.c
#   2004/11/25 08:17:53+01:00 perex@suse.cz +5 -5
#   [ALSA] ALSA ISA drivers: misc cleanups
#   
#   D:2004/11/25 15:17:52
#   C:AD1848 driver,CS4231 driver,ES1688 driver,GUS Library,SB drivers
#   C:Wavefront drivers,ES18xx driver,OPL3SA2 driver,AD1816A driver
#   C:Opti9xx drivers,SB16/AWE driver,SB8 driver
#   F:include/ad1848.h:1.11->1.12 
#   F:include/cs4231.h:1.8->1.9 
#   F:include/es1688.h:1.7->1.8 
#   F:include/gus.h:1.10->1.11 
#   F:include/sb.h:1.13->1.14 
#   F:include/snd_wavefront.h:1.5->1.6 
#   F:isa/es18xx.c:1.50->1.51 
#   F:isa/opl3sa2.c:1.39->1.40 
#   F:isa/ad1816a/ad1816a_lib.c:1.24->1.25 
#   F:isa/ad1848/ad1848_lib.c:1.37->1.38 
#   F:isa/cs423x/cs4231_lib.c:1.44->1.45 
#   F:isa/es1688/es1688_lib.c:1.28->1.29 
#   F:isa/gus/gus_dma.c:1.7->1.8 
#   F:isa/opti9xx/opti92x-ad1848.c:1.48->1.49 
#   F:isa/sb/sb16_main.c:1.21->1.22 
#   F:isa/sb/sb8_main.c:1.17->1.18 
#   F:isa/sb/sb_common.c:1.21->1.22 
#   F:isa/wavefront/wavefront.c:1.31->1.32 
#   F:isa/wavefront/wavefront_synth.c:1.21->1.22 
#   L:The patch below makes cleanups under sound/isa/ including:
#   L:- make needlessly global code static
#   L:- ad1816a/ad1816a_lib.c: much code was unused starting with the
#   L:                         global function snd_ad1816a_timer
#   L:- removed EXPORT_SYMBOL's:
#   L:  - cs423x/cs4231_lib.c: snd_cs4231_outm
#   L:  - es1688/es1688_lib.c: snd_es1688_mixer_read
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/isa/opti9xx/opti92x-ad1848.c
#   2004/11/25 08:17:53+01:00 perex@suse.cz +6 -6
#   [ALSA] ALSA ISA drivers: misc cleanups
#   
#   D:2004/11/25 15:17:52
#   C:AD1848 driver,CS4231 driver,ES1688 driver,GUS Library,SB drivers
#   C:Wavefront drivers,ES18xx driver,OPL3SA2 driver,AD1816A driver
#   C:Opti9xx drivers,SB16/AWE driver,SB8 driver
#   F:include/ad1848.h:1.11->1.12 
#   F:include/cs4231.h:1.8->1.9 
#   F:include/es1688.h:1.7->1.8 
#   F:include/gus.h:1.10->1.11 
#   F:include/sb.h:1.13->1.14 
#   F:include/snd_wavefront.h:1.5->1.6 
#   F:isa/es18xx.c:1.50->1.51 
#   F:isa/opl3sa2.c:1.39->1.40 
#   F:isa/ad1816a/ad1816a_lib.c:1.24->1.25 
#   F:isa/ad1848/ad1848_lib.c:1.37->1.38 
#   F:isa/cs423x/cs4231_lib.c:1.44->1.45 
#   F:isa/es1688/es1688_lib.c:1.28->1.29 
#   F:isa/gus/gus_dma.c:1.7->1.8 
#   F:isa/opti9xx/opti92x-ad1848.c:1.48->1.49 
#   F:isa/sb/sb16_main.c:1.21->1.22 
#   F:isa/sb/sb8_main.c:1.17->1.18 
#   F:isa/sb/sb_common.c:1.21->1.22 
#   F:isa/wavefront/wavefront.c:1.31->1.32 
#   F:isa/wavefront/wavefront_synth.c:1.21->1.22 
#   L:The patch below makes cleanups under sound/isa/ including:
#   L:- make needlessly global code static
#   L:- ad1816a/ad1816a_lib.c: much code was unused starting with the
#   L:                         global function snd_ad1816a_timer
#   L:- removed EXPORT_SYMBOL's:
#   L:  - cs423x/cs4231_lib.c: snd_cs4231_outm
#   L:  - es1688/es1688_lib.c: snd_es1688_mixer_read
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/isa/opl3sa2.c
#   2004/11/25 08:17:52+01:00 perex@suse.cz +5 -5
#   [ALSA] ALSA ISA drivers: misc cleanups
#   
#   D:2004/11/25 15:17:52
#   C:AD1848 driver,CS4231 driver,ES1688 driver,GUS Library,SB drivers
#   C:Wavefront drivers,ES18xx driver,OPL3SA2 driver,AD1816A driver
#   C:Opti9xx drivers,SB16/AWE driver,SB8 driver
#   F:include/ad1848.h:1.11->1.12 
#   F:include/cs4231.h:1.8->1.9 
#   F:include/es1688.h:1.7->1.8 
#   F:include/gus.h:1.10->1.11 
#   F:include/sb.h:1.13->1.14 
#   F:include/snd_wavefront.h:1.5->1.6 
#   F:isa/es18xx.c:1.50->1.51 
#   F:isa/opl3sa2.c:1.39->1.40 
#   F:isa/ad1816a/ad1816a_lib.c:1.24->1.25 
#   F:isa/ad1848/ad1848_lib.c:1.37->1.38 
#   F:isa/cs423x/cs4231_lib.c:1.44->1.45 
#   F:isa/es1688/es1688_lib.c:1.28->1.29 
#   F:isa/gus/gus_dma.c:1.7->1.8 
#   F:isa/opti9xx/opti92x-ad1848.c:1.48->1.49 
#   F:isa/sb/sb16_main.c:1.21->1.22 
#   F:isa/sb/sb8_main.c:1.17->1.18 
#   F:isa/sb/sb_common.c:1.21->1.22 
#   F:isa/wavefront/wavefront.c:1.31->1.32 
#   F:isa/wavefront/wavefront_synth.c:1.21->1.22 
#   L:The patch below makes cleanups under sound/isa/ including:
#   L:- make needlessly global code static
#   L:- ad1816a/ad1816a_lib.c: much code was unused starting with the
#   L:                         global function snd_ad1816a_timer
#   L:- removed EXPORT_SYMBOL's:
#   L:  - cs423x/cs4231_lib.c: snd_cs4231_outm
#   L:  - es1688/es1688_lib.c: snd_es1688_mixer_read
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/isa/gus/gus_dma.c
#   2004/11/25 08:17:53+01:00 perex@suse.cz +6 -6
#   [ALSA] ALSA ISA drivers: misc cleanups
#   
#   D:2004/11/25 15:17:52
#   C:AD1848 driver,CS4231 driver,ES1688 driver,GUS Library,SB drivers
#   C:Wavefront drivers,ES18xx driver,OPL3SA2 driver,AD1816A driver
#   C:Opti9xx drivers,SB16/AWE driver,SB8 driver
#   F:include/ad1848.h:1.11->1.12 
#   F:include/cs4231.h:1.8->1.9 
#   F:include/es1688.h:1.7->1.8 
#   F:include/gus.h:1.10->1.11 
#   F:include/sb.h:1.13->1.14 
#   F:include/snd_wavefront.h:1.5->1.6 
#   F:isa/es18xx.c:1.50->1.51 
#   F:isa/opl3sa2.c:1.39->1.40 
#   F:isa/ad1816a/ad1816a_lib.c:1.24->1.25 
#   F:isa/ad1848/ad1848_lib.c:1.37->1.38 
#   F:isa/cs423x/cs4231_lib.c:1.44->1.45 
#   F:isa/es1688/es1688_lib.c:1.28->1.29 
#   F:isa/gus/gus_dma.c:1.7->1.8 
#   F:isa/opti9xx/opti92x-ad1848.c:1.48->1.49 
#   F:isa/sb/sb16_main.c:1.21->1.22 
#   F:isa/sb/sb8_main.c:1.17->1.18 
#   F:isa/sb/sb_common.c:1.21->1.22 
#   F:isa/wavefront/wavefront.c:1.31->1.32 
#   F:isa/wavefront/wavefront_synth.c:1.21->1.22 
#   L:The patch below makes cleanups under sound/isa/ including:
#   L:- make needlessly global code static
#   L:- ad1816a/ad1816a_lib.c: much code was unused starting with the
#   L:                         global function snd_ad1816a_timer
#   L:- removed EXPORT_SYMBOL's:
#   L:  - cs423x/cs4231_lib.c: snd_cs4231_outm
#   L:  - es1688/es1688_lib.c: snd_es1688_mixer_read
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/isa/es18xx.c
#   2004/11/25 08:17:52+01:00 perex@suse.cz +3 -3
#   [ALSA] ALSA ISA drivers: misc cleanups
#   
#   D:2004/11/25 15:17:52
#   C:AD1848 driver,CS4231 driver,ES1688 driver,GUS Library,SB drivers
#   C:Wavefront drivers,ES18xx driver,OPL3SA2 driver,AD1816A driver
#   C:Opti9xx drivers,SB16/AWE driver,SB8 driver
#   F:include/ad1848.h:1.11->1.12 
#   F:include/cs4231.h:1.8->1.9 
#   F:include/es1688.h:1.7->1.8 
#   F:include/gus.h:1.10->1.11 
#   F:include/sb.h:1.13->1.14 
#   F:include/snd_wavefront.h:1.5->1.6 
#   F:isa/es18xx.c:1.50->1.51 
#   F:isa/opl3sa2.c:1.39->1.40 
#   F:isa/ad1816a/ad1816a_lib.c:1.24->1.25 
#   F:isa/ad1848/ad1848_lib.c:1.37->1.38 
#   F:isa/cs423x/cs4231_lib.c:1.44->1.45 
#   F:isa/es1688/es1688_lib.c:1.28->1.29 
#   F:isa/gus/gus_dma.c:1.7->1.8 
#   F:isa/opti9xx/opti92x-ad1848.c:1.48->1.49 
#   F:isa/sb/sb16_main.c:1.21->1.22 
#   F:isa/sb/sb8_main.c:1.17->1.18 
#   F:isa/sb/sb_common.c:1.21->1.22 
#   F:isa/wavefront/wavefront.c:1.31->1.32 
#   F:isa/wavefront/wavefront_synth.c:1.21->1.22 
#   L:The patch below makes cleanups under sound/isa/ including:
#   L:- make needlessly global code static
#   L:- ad1816a/ad1816a_lib.c: much code was unused starting with the
#   L:                         global function snd_ad1816a_timer
#   L:- removed EXPORT_SYMBOL's:
#   L:  - cs423x/cs4231_lib.c: snd_cs4231_outm
#   L:  - es1688/es1688_lib.c: snd_es1688_mixer_read
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/isa/es1688/es1688_lib.c
#   2004/11/25 08:17:53+01:00 perex@suse.cz +2 -3
#   [ALSA] ALSA ISA drivers: misc cleanups
#   
#   D:2004/11/25 15:17:52
#   C:AD1848 driver,CS4231 driver,ES1688 driver,GUS Library,SB drivers
#   C:Wavefront drivers,ES18xx driver,OPL3SA2 driver,AD1816A driver
#   C:Opti9xx drivers,SB16/AWE driver,SB8 driver
#   F:include/ad1848.h:1.11->1.12 
#   F:include/cs4231.h:1.8->1.9 
#   F:include/es1688.h:1.7->1.8 
#   F:include/gus.h:1.10->1.11 
#   F:include/sb.h:1.13->1.14 
#   F:include/snd_wavefront.h:1.5->1.6 
#   F:isa/es18xx.c:1.50->1.51 
#   F:isa/opl3sa2.c:1.39->1.40 
#   F:isa/ad1816a/ad1816a_lib.c:1.24->1.25 
#   F:isa/ad1848/ad1848_lib.c:1.37->1.38 
#   F:isa/cs423x/cs4231_lib.c:1.44->1.45 
#   F:isa/es1688/es1688_lib.c:1.28->1.29 
#   F:isa/gus/gus_dma.c:1.7->1.8 
#   F:isa/opti9xx/opti92x-ad1848.c:1.48->1.49 
#   F:isa/sb/sb16_main.c:1.21->1.22 
#   F:isa/sb/sb8_main.c:1.17->1.18 
#   F:isa/sb/sb_common.c:1.21->1.22 
#   F:isa/wavefront/wavefront.c:1.31->1.32 
#   F:isa/wavefront/wavefront_synth.c:1.21->1.22 
#   L:The patch below makes cleanups under sound/isa/ including:
#   L:- make needlessly global code static
#   L:- ad1816a/ad1816a_lib.c: much code was unused starting with the
#   L:                         global function snd_ad1816a_timer
#   L:- removed EXPORT_SYMBOL's:
#   L:  - cs423x/cs4231_lib.c: snd_cs4231_outm
#   L:  - es1688/es1688_lib.c: snd_es1688_mixer_read
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/isa/cs423x/cs4231_lib.c
#   2004/11/25 08:17:53+01:00 perex@suse.cz +5 -6
#   [ALSA] ALSA ISA drivers: misc cleanups
#   
#   D:2004/11/25 15:17:52
#   C:AD1848 driver,CS4231 driver,ES1688 driver,GUS Library,SB drivers
#   C:Wavefront drivers,ES18xx driver,OPL3SA2 driver,AD1816A driver
#   C:Opti9xx drivers,SB16/AWE driver,SB8 driver
#   F:include/ad1848.h:1.11->1.12 
#   F:include/cs4231.h:1.8->1.9 
#   F:include/es1688.h:1.7->1.8 
#   F:include/gus.h:1.10->1.11 
#   F:include/sb.h:1.13->1.14 
#   F:include/snd_wavefront.h:1.5->1.6 
#   F:isa/es18xx.c:1.50->1.51 
#   F:isa/opl3sa2.c:1.39->1.40 
#   F:isa/ad1816a/ad1816a_lib.c:1.24->1.25 
#   F:isa/ad1848/ad1848_lib.c:1.37->1.38 
#   F:isa/cs423x/cs4231_lib.c:1.44->1.45 
#   F:isa/es1688/es1688_lib.c:1.28->1.29 
#   F:isa/gus/gus_dma.c:1.7->1.8 
#   F:isa/opti9xx/opti92x-ad1848.c:1.48->1.49 
#   F:isa/sb/sb16_main.c:1.21->1.22 
#   F:isa/sb/sb8_main.c:1.17->1.18 
#   F:isa/sb/sb_common.c:1.21->1.22 
#   F:isa/wavefront/wavefront.c:1.31->1.32 
#   F:isa/wavefront/wavefront_synth.c:1.21->1.22 
#   L:The patch below makes cleanups under sound/isa/ including:
#   L:- make needlessly global code static
#   L:- ad1816a/ad1816a_lib.c: much code was unused starting with the
#   L:                         global function snd_ad1816a_timer
#   L:- removed EXPORT_SYMBOL's:
#   L:  - cs423x/cs4231_lib.c: snd_cs4231_outm
#   L:  - es1688/es1688_lib.c: snd_es1688_mixer_read
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/isa/ad1848/ad1848_lib.c
#   2004/11/25 08:17:52+01:00 perex@suse.cz +2 -2
#   [ALSA] ALSA ISA drivers: misc cleanups
#   
#   D:2004/11/25 15:17:52
#   C:AD1848 driver,CS4231 driver,ES1688 driver,GUS Library,SB drivers
#   C:Wavefront drivers,ES18xx driver,OPL3SA2 driver,AD1816A driver
#   C:Opti9xx drivers,SB16/AWE driver,SB8 driver
#   F:include/ad1848.h:1.11->1.12 
#   F:include/cs4231.h:1.8->1.9 
#   F:include/es1688.h:1.7->1.8 
#   F:include/gus.h:1.10->1.11 
#   F:include/sb.h:1.13->1.14 
#   F:include/snd_wavefront.h:1.5->1.6 
#   F:isa/es18xx.c:1.50->1.51 
#   F:isa/opl3sa2.c:1.39->1.40 
#   F:isa/ad1816a/ad1816a_lib.c:1.24->1.25 
#   F:isa/ad1848/ad1848_lib.c:1.37->1.38 
#   F:isa/cs423x/cs4231_lib.c:1.44->1.45 
#   F:isa/es1688/es1688_lib.c:1.28->1.29 
#   F:isa/gus/gus_dma.c:1.7->1.8 
#   F:isa/opti9xx/opti92x-ad1848.c:1.48->1.49 
#   F:isa/sb/sb16_main.c:1.21->1.22 
#   F:isa/sb/sb8_main.c:1.17->1.18 
#   F:isa/sb/sb_common.c:1.21->1.22 
#   F:isa/wavefront/wavefront.c:1.31->1.32 
#   F:isa/wavefront/wavefront_synth.c:1.21->1.22 
#   L:The patch below makes cleanups under sound/isa/ including:
#   L:- make needlessly global code static
#   L:- ad1816a/ad1816a_lib.c: much code was unused starting with the
#   L:                         global function snd_ad1816a_timer
#   L:- removed EXPORT_SYMBOL's:
#   L:  - cs423x/cs4231_lib.c: snd_cs4231_outm
#   L:  - es1688/es1688_lib.c: snd_es1688_mixer_read
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/isa/ad1816a/ad1816a_lib.c
#   2004/11/25 08:17:52+01:00 perex@suse.cz +7 -3
#   [ALSA] ALSA ISA drivers: misc cleanups
#   
#   D:2004/11/25 15:17:52
#   C:AD1848 driver,CS4231 driver,ES1688 driver,GUS Library,SB drivers
#   C:Wavefront drivers,ES18xx driver,OPL3SA2 driver,AD1816A driver
#   C:Opti9xx drivers,SB16/AWE driver,SB8 driver
#   F:include/ad1848.h:1.11->1.12 
#   F:include/cs4231.h:1.8->1.9 
#   F:include/es1688.h:1.7->1.8 
#   F:include/gus.h:1.10->1.11 
#   F:include/sb.h:1.13->1.14 
#   F:include/snd_wavefront.h:1.5->1.6 
#   F:isa/es18xx.c:1.50->1.51 
#   F:isa/opl3sa2.c:1.39->1.40 
#   F:isa/ad1816a/ad1816a_lib.c:1.24->1.25 
#   F:isa/ad1848/ad1848_lib.c:1.37->1.38 
#   F:isa/cs423x/cs4231_lib.c:1.44->1.45 
#   F:isa/es1688/es1688_lib.c:1.28->1.29 
#   F:isa/gus/gus_dma.c:1.7->1.8 
#   F:isa/opti9xx/opti92x-ad1848.c:1.48->1.49 
#   F:isa/sb/sb16_main.c:1.21->1.22 
#   F:isa/sb/sb8_main.c:1.17->1.18 
#   F:isa/sb/sb_common.c:1.21->1.22 
#   F:isa/wavefront/wavefront.c:1.31->1.32 
#   F:isa/wavefront/wavefront_synth.c:1.21->1.22 
#   L:The patch below makes cleanups under sound/isa/ including:
#   L:- make needlessly global code static
#   L:- ad1816a/ad1816a_lib.c: much code was unused starting with the
#   L:                         global function snd_ad1816a_timer
#   L:- removed EXPORT_SYMBOL's:
#   L:  - cs423x/cs4231_lib.c: snd_cs4231_outm
#   L:  - es1688/es1688_lib.c: snd_es1688_mixer_read
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# include/sound/snd_wavefront.h
#   2004/11/25 08:17:52+01:00 perex@suse.cz +0 -1
#   [ALSA] ALSA ISA drivers: misc cleanups
#   
#   D:2004/11/25 15:17:52
#   C:AD1848 driver,CS4231 driver,ES1688 driver,GUS Library,SB drivers
#   C:Wavefront drivers,ES18xx driver,OPL3SA2 driver,AD1816A driver
#   C:Opti9xx drivers,SB16/AWE driver,SB8 driver
#   F:include/ad1848.h:1.11->1.12 
#   F:include/cs4231.h:1.8->1.9 
#   F:include/es1688.h:1.7->1.8 
#   F:include/gus.h:1.10->1.11 
#   F:include/sb.h:1.13->1.14 
#   F:include/snd_wavefront.h:1.5->1.6 
#   F:isa/es18xx.c:1.50->1.51 
#   F:isa/opl3sa2.c:1.39->1.40 
#   F:isa/ad1816a/ad1816a_lib.c:1.24->1.25 
#   F:isa/ad1848/ad1848_lib.c:1.37->1.38 
#   F:isa/cs423x/cs4231_lib.c:1.44->1.45 
#   F:isa/es1688/es1688_lib.c:1.28->1.29 
#   F:isa/gus/gus_dma.c:1.7->1.8 
#   F:isa/opti9xx/opti92x-ad1848.c:1.48->1.49 
#   F:isa/sb/sb16_main.c:1.21->1.22 
#   F:isa/sb/sb8_main.c:1.17->1.18 
#   F:isa/sb/sb_common.c:1.21->1.22 
#   F:isa/wavefront/wavefront.c:1.31->1.32 
#   F:isa/wavefront/wavefront_synth.c:1.21->1.22 
#   L:The patch below makes cleanups under sound/isa/ including:
#   L:- make needlessly global code static
#   L:- ad1816a/ad1816a_lib.c: much code was unused starting with the
#   L:                         global function snd_ad1816a_timer
#   L:- removed EXPORT_SYMBOL's:
#   L:  - cs423x/cs4231_lib.c: snd_cs4231_outm
#   L:  - es1688/es1688_lib.c: snd_es1688_mixer_read
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# include/sound/sb.h
#   2004/11/25 08:17:52+01:00 perex@suse.cz +0 -4
#   [ALSA] ALSA ISA drivers: misc cleanups
#   
#   D:2004/11/25 15:17:52
#   C:AD1848 driver,CS4231 driver,ES1688 driver,GUS Library,SB drivers
#   C:Wavefront drivers,ES18xx driver,OPL3SA2 driver,AD1816A driver
#   C:Opti9xx drivers,SB16/AWE driver,SB8 driver
#   F:include/ad1848.h:1.11->1.12 
#   F:include/cs4231.h:1.8->1.9 
#   F:include/es1688.h:1.7->1.8 
#   F:include/gus.h:1.10->1.11 
#   F:include/sb.h:1.13->1.14 
#   F:include/snd_wavefront.h:1.5->1.6 
#   F:isa/es18xx.c:1.50->1.51 
#   F:isa/opl3sa2.c:1.39->1.40 
#   F:isa/ad1816a/ad1816a_lib.c:1.24->1.25 
#   F:isa/ad1848/ad1848_lib.c:1.37->1.38 
#   F:isa/cs423x/cs4231_lib.c:1.44->1.45 
#   F:isa/es1688/es1688_lib.c:1.28->1.29 
#   F:isa/gus/gus_dma.c:1.7->1.8 
#   F:isa/opti9xx/opti92x-ad1848.c:1.48->1.49 
#   F:isa/sb/sb16_main.c:1.21->1.22 
#   F:isa/sb/sb8_main.c:1.17->1.18 
#   F:isa/sb/sb_common.c:1.21->1.22 
#   F:isa/wavefront/wavefront.c:1.31->1.32 
#   F:isa/wavefront/wavefront_synth.c:1.21->1.22 
#   L:The patch below makes cleanups under sound/isa/ including:
#   L:- make needlessly global code static
#   L:- ad1816a/ad1816a_lib.c: much code was unused starting with the
#   L:                         global function snd_ad1816a_timer
#   L:- removed EXPORT_SYMBOL's:
#   L:  - cs423x/cs4231_lib.c: snd_cs4231_outm
#   L:  - es1688/es1688_lib.c: snd_es1688_mixer_read
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# include/sound/gus.h
#   2004/11/25 08:17:52+01:00 perex@suse.cz +0 -4
#   [ALSA] ALSA ISA drivers: misc cleanups
#   
#   D:2004/11/25 15:17:52
#   C:AD1848 driver,CS4231 driver,ES1688 driver,GUS Library,SB drivers
#   C:Wavefront drivers,ES18xx driver,OPL3SA2 driver,AD1816A driver
#   C:Opti9xx drivers,SB16/AWE driver,SB8 driver
#   F:include/ad1848.h:1.11->1.12 
#   F:include/cs4231.h:1.8->1.9 
#   F:include/es1688.h:1.7->1.8 
#   F:include/gus.h:1.10->1.11 
#   F:include/sb.h:1.13->1.14 
#   F:include/snd_wavefront.h:1.5->1.6 
#   F:isa/es18xx.c:1.50->1.51 
#   F:isa/opl3sa2.c:1.39->1.40 
#   F:isa/ad1816a/ad1816a_lib.c:1.24->1.25 
#   F:isa/ad1848/ad1848_lib.c:1.37->1.38 
#   F:isa/cs423x/cs4231_lib.c:1.44->1.45 
#   F:isa/es1688/es1688_lib.c:1.28->1.29 
#   F:isa/gus/gus_dma.c:1.7->1.8 
#   F:isa/opti9xx/opti92x-ad1848.c:1.48->1.49 
#   F:isa/sb/sb16_main.c:1.21->1.22 
#   F:isa/sb/sb8_main.c:1.17->1.18 
#   F:isa/sb/sb_common.c:1.21->1.22 
#   F:isa/wavefront/wavefront.c:1.31->1.32 
#   F:isa/wavefront/wavefront_synth.c:1.21->1.22 
#   L:The patch below makes cleanups under sound/isa/ including:
#   L:- make needlessly global code static
#   L:- ad1816a/ad1816a_lib.c: much code was unused starting with the
#   L:                         global function snd_ad1816a_timer
#   L:- removed EXPORT_SYMBOL's:
#   L:  - cs423x/cs4231_lib.c: snd_cs4231_outm
#   L:  - es1688/es1688_lib.c: snd_es1688_mixer_read
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# include/sound/es1688.h
#   2004/11/25 08:17:52+01:00 perex@suse.cz +0 -1
#   [ALSA] ALSA ISA drivers: misc cleanups
#   
#   D:2004/11/25 15:17:52
#   C:AD1848 driver,CS4231 driver,ES1688 driver,GUS Library,SB drivers
#   C:Wavefront drivers,ES18xx driver,OPL3SA2 driver,AD1816A driver
#   C:Opti9xx drivers,SB16/AWE driver,SB8 driver
#   F:include/ad1848.h:1.11->1.12 
#   F:include/cs4231.h:1.8->1.9 
#   F:include/es1688.h:1.7->1.8 
#   F:include/gus.h:1.10->1.11 
#   F:include/sb.h:1.13->1.14 
#   F:include/snd_wavefront.h:1.5->1.6 
#   F:isa/es18xx.c:1.50->1.51 
#   F:isa/opl3sa2.c:1.39->1.40 
#   F:isa/ad1816a/ad1816a_lib.c:1.24->1.25 
#   F:isa/ad1848/ad1848_lib.c:1.37->1.38 
#   F:isa/cs423x/cs4231_lib.c:1.44->1.45 
#   F:isa/es1688/es1688_lib.c:1.28->1.29 
#   F:isa/gus/gus_dma.c:1.7->1.8 
#   F:isa/opti9xx/opti92x-ad1848.c:1.48->1.49 
#   F:isa/sb/sb16_main.c:1.21->1.22 
#   F:isa/sb/sb8_main.c:1.17->1.18 
#   F:isa/sb/sb_common.c:1.21->1.22 
#   F:isa/wavefront/wavefront.c:1.31->1.32 
#   F:isa/wavefront/wavefront_synth.c:1.21->1.22 
#   L:The patch below makes cleanups under sound/isa/ including:
#   L:- make needlessly global code static
#   L:- ad1816a/ad1816a_lib.c: much code was unused starting with the
#   L:                         global function snd_ad1816a_timer
#   L:- removed EXPORT_SYMBOL's:
#   L:  - cs423x/cs4231_lib.c: snd_cs4231_outm
#   L:  - es1688/es1688_lib.c: snd_es1688_mixer_read
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# include/sound/cs4231.h
#   2004/11/25 08:17:52+01:00 perex@suse.cz +0 -5
#   [ALSA] ALSA ISA drivers: misc cleanups
#   
#   D:2004/11/25 15:17:52
#   C:AD1848 driver,CS4231 driver,ES1688 driver,GUS Library,SB drivers
#   C:Wavefront drivers,ES18xx driver,OPL3SA2 driver,AD1816A driver
#   C:Opti9xx drivers,SB16/AWE driver,SB8 driver
#   F:include/ad1848.h:1.11->1.12 
#   F:include/cs4231.h:1.8->1.9 
#   F:include/es1688.h:1.7->1.8 
#   F:include/gus.h:1.10->1.11 
#   F:include/sb.h:1.13->1.14 
#   F:include/snd_wavefront.h:1.5->1.6 
#   F:isa/es18xx.c:1.50->1.51 
#   F:isa/opl3sa2.c:1.39->1.40 
#   F:isa/ad1816a/ad1816a_lib.c:1.24->1.25 
#   F:isa/ad1848/ad1848_lib.c:1.37->1.38 
#   F:isa/cs423x/cs4231_lib.c:1.44->1.45 
#   F:isa/es1688/es1688_lib.c:1.28->1.29 
#   F:isa/gus/gus_dma.c:1.7->1.8 
#   F:isa/opti9xx/opti92x-ad1848.c:1.48->1.49 
#   F:isa/sb/sb16_main.c:1.21->1.22 
#   F:isa/sb/sb8_main.c:1.17->1.18 
#   F:isa/sb/sb_common.c:1.21->1.22 
#   F:isa/wavefront/wavefront.c:1.31->1.32 
#   F:isa/wavefront/wavefront_synth.c:1.21->1.22 
#   L:The patch below makes cleanups under sound/isa/ including:
#   L:- make needlessly global code static
#   L:- ad1816a/ad1816a_lib.c: much code was unused starting with the
#   L:                         global function snd_ad1816a_timer
#   L:- removed EXPORT_SYMBOL's:
#   L:  - cs423x/cs4231_lib.c: snd_cs4231_outm
#   L:  - es1688/es1688_lib.c: snd_es1688_mixer_read
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# include/sound/ad1848.h
#   2004/11/25 08:17:52+01:00 perex@suse.cz +0 -4
#   [ALSA] ALSA ISA drivers: misc cleanups
#   
#   D:2004/11/25 15:17:52
#   C:AD1848 driver,CS4231 driver,ES1688 driver,GUS Library,SB drivers
#   C:Wavefront drivers,ES18xx driver,OPL3SA2 driver,AD1816A driver
#   C:Opti9xx drivers,SB16/AWE driver,SB8 driver
#   F:include/ad1848.h:1.11->1.12 
#   F:include/cs4231.h:1.8->1.9 
#   F:include/es1688.h:1.7->1.8 
#   F:include/gus.h:1.10->1.11 
#   F:include/sb.h:1.13->1.14 
#   F:include/snd_wavefront.h:1.5->1.6 
#   F:isa/es18xx.c:1.50->1.51 
#   F:isa/opl3sa2.c:1.39->1.40 
#   F:isa/ad1816a/ad1816a_lib.c:1.24->1.25 
#   F:isa/ad1848/ad1848_lib.c:1.37->1.38 
#   F:isa/cs423x/cs4231_lib.c:1.44->1.45 
#   F:isa/es1688/es1688_lib.c:1.28->1.29 
#   F:isa/gus/gus_dma.c:1.7->1.8 
#   F:isa/opti9xx/opti92x-ad1848.c:1.48->1.49 
#   F:isa/sb/sb16_main.c:1.21->1.22 
#   F:isa/sb/sb8_main.c:1.17->1.18 
#   F:isa/sb/sb_common.c:1.21->1.22 
#   F:isa/wavefront/wavefront.c:1.31->1.32 
#   F:isa/wavefront/wavefront_synth.c:1.21->1.22 
#   L:The patch below makes cleanups under sound/isa/ including:
#   L:- make needlessly global code static
#   L:- ad1816a/ad1816a_lib.c: much code was unused starting with the
#   L:                         global function snd_ad1816a_timer
#   L:- removed EXPORT_SYMBOL's:
#   L:  - cs423x/cs4231_lib.c: snd_cs4231_outm
#   L:  - es1688/es1688_lib.c: snd_es1688_mixer_read
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2004/11/29 10:26:43+01:00 perex@suse.cz 
#   [ALSA] misc clean up
#   
#   Intel8x0 driver
#   Clean up the module init code after removal of midi/joystick support.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/intel8x0.c
#   2004/11/25 04:43:23+01:00 perex@suse.cz +1 -5
#   [ALSA] misc clean up
#   
#   D:2004/11/25 11:43:23
#   C:Intel8x0 driver
#   F:pci/intel8x0.c:1.179->1.180 
#   L:Clean up the module init code after removal of midi/joystick support.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2004/11/29 10:09:26+01:00 perex@suse.cz 
#   [ALSA] fix weird placement of static keyword in sound/core/pcm_memory.c
#   
#   PCM Midlevel
#   This patch moves the 'static' keyword to the beginning of the declaration
#   to eliminate the following warning when building with gcc -W
#   sound/core/pcm_memory.c:40: warning: 'static' is not at beginning of declaration
#   
#   This has no actal imact on the code, but it's one less warning to sift
#   through when looking for potential trouble-code with -W
#   I have a hard time thinking of a reason to not apply this trivial patch :)
#   
#   Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/pcm_memory.c
#   2004/11/25 04:42:15+01:00 perex@suse.cz +1 -1
#   [ALSA] fix weird placement of static keyword in sound/core/pcm_memory.c
#   
#   PCM Midlevel
#   This patch moves the 'static' keyword to the beginning of the declaration
#   to eliminate the following warning when building with gcc -W
#   sound/core/pcm_memory.c:40: warning: 'static' is not at beginning of declaration
#   
#   This has no actal imact on the code, but it's one less warning to sift
#   through when looking for potential trouble-code with -W
#   I have a hard time thinking of a reason to not apply this trivial patch :)
#   
#   Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2004/11/29 09:25:32+01:00 perex@suse.cz 
#   [ALSA] Fix the detection of Audigy2 ZS
#   
#   EMU10K1/EMU10K2 driver
#   Fix the detection of the older model of Audigy2 ZS.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/emu10k1/emu10k1_main.c
#   2004/11/23 09:39:46+01:00 perex@suse.cz +1 -1
#   [ALSA] Fix the detection of Audigy2 ZS
#   
#   D:2004/11/23 16:39:46
#   C:EMU10K1/EMU10K2 driver
#   F:pci/emu10k1/emu10k1_main.c:1.40->1.41 
#   L:Fix the detection of the older model of Audigy2 ZS.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2004/11/29 09:24:27+01:00 perex@suse.cz 
#   [ALSA] [trivial] Fix compile warnings
#   
#   ALSA Core,CS46xx driver,MIXART driver
#   Fix trivial compile warnings.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/mixart/mixart_core.c
#   2004/11/23 09:06:33+01:00 perex@suse.cz +4 -1
#   [ALSA] [trivial] Fix compile warnings
#   
#   D:2004/11/23 16:06:17
#   C:ALSA Core,CS46xx driver,MIXART driver
#   F:core/memory.c:1.32->1.33 
#   F:pci/cs46xx/dsp_spos.c:1.28->1.29 
#   F:pci/mixart/mixart_core.c:1.8->1.9 
#   L:Fix trivial compile warnings.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/cs46xx/dsp_spos.c
#   2004/11/23 09:06:17+01:00 perex@suse.cz +2 -2
#   [ALSA] [trivial] Fix compile warnings
#   
#   D:2004/11/23 16:06:17
#   C:ALSA Core,CS46xx driver,MIXART driver
#   F:core/memory.c:1.32->1.33 
#   F:pci/cs46xx/dsp_spos.c:1.28->1.29 
#   F:pci/mixart/mixart_core.c:1.8->1.9 
#   L:Fix trivial compile warnings.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/memory.c
#   2004/11/23 09:06:17+01:00 perex@suse.cz +1 -1
#   [ALSA] [trivial] Fix compile warnings
#   
#   D:2004/11/23 16:06:17
#   C:ALSA Core,CS46xx driver,MIXART driver
#   F:core/memory.c:1.32->1.33 
#   F:pci/cs46xx/dsp_spos.c:1.28->1.29 
#   F:pci/mixart/mixart_core.c:1.8->1.9 
#   L:Fix trivial compile warnings.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2004/11/29 09:23:22+01:00 perex@suse.cz 
#   [ALSA] Fixed problem with changing size of etram
#   
#   EMU10K1/EMU10K2 driver
#   It doesn't work to double the etram size, because of a bad comparison
#   statement.
#   
#   Signed-off-by: Mikael Magnusson <mikma@users.sourceforge.net>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/emu10k1/emufx.c
#   2004/11/23 08:11:54+01:00 perex@suse.cz +1 -1
#   [ALSA] Fixed problem with changing size of etram
#   
#   D:2004/11/23 15:11:54
#   C:EMU10K1/EMU10K2 driver
#   F:pci/emu10k1/emufx.c:1.65->1.66 
#   L:It doesn't work to double the etram size, because of a bad comparison
#   L:statement.
#   Signed-off-by: Mikael Magnusson <mikma@users.sourceforge.net>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2004/11/29 09:22:20+01:00 perex@suse.cz 
#   [ALSA] add register dump to proc
#   
#   EMU10K1/EMU10K2 driver
#   The register dump proc files are added.
#   Enabled only when CONFIG_SND_DEBUG=y.
#   
#   Signed-off-by: James Courtier-Dutton
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/emu10k1/emuproc.c
#   2004/11/23 08:06:17+01:00 perex@suse.cz +173 -0
#   [ALSA] add register dump to proc
#   
#   D:2004/11/23 15:06:17
#   C:EMU10K1/EMU10K2 driver
#   F:pci/emu10k1/emuproc.c:1.22->1.23 
#   L:The register dump proc files are added.
#   L:Enabled only when CONFIG_SND_DEBUG=y.
#   Signed-off-by: James Courtier-Dutton
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2004/11/29 09:21:15+01:00 perex@suse.cz 
#   [ALSA] check CONFIG_COMPAT for snd-ioctl32
#   
#   ALSA Core
#   check CONFIG_COMPAT for selection of snd-ioctl32 module.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/Kconfig
#   2004/11/23 08:04:38+01:00 perex@suse.cz +1 -1
#   [ALSA] check CONFIG_COMPAT for snd-ioctl32
#   
#   D:2004/11/23 15:04:38
#   C:ALSA Core
#   F:core/Kconfig:1.6->1.7 
#   L:check CONFIG_COMPAT for selection of snd-ioctl32 module.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2004/11/29 09:20:09+01:00 perex@suse.cz 
#   [ALSA] make some code static
#   
#   Sound Core PDAudioCF driver
#   The patch below makes some needlessly global code static.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pcmcia/pdaudiocf/pdaudiocf_core.c
#   2004/11/22 11:59:07+01:00 perex@suse.cz +2 -2
#   [ALSA] make some code static
#   
#   D:2004/11/22 18:59:07
#   C:Sound Core PDAudioCF driver
#   F:pcmcia/pdaudiocf/pdaudiocf.h:1.6->1.7 
#   F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.4->1.5 
#   L:The patch below makes some needlessly global code static.
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pcmcia/pdaudiocf/pdaudiocf.h
#   2004/11/22 11:59:07+01:00 perex@suse.cz +0 -2
#   [ALSA] make some code static
#   
#   D:2004/11/22 18:59:07
#   C:Sound Core PDAudioCF driver
#   F:pcmcia/pdaudiocf/pdaudiocf.h:1.6->1.7 
#   F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.4->1.5 
#   L:The patch below makes some needlessly global code static.
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2004/11/29 09:19:06+01:00 perex@suse.cz 
#   [ALSA] Support for Audigy2 Value SB0400
#   
#   EMU10K1/EMU10K2 driver
#   This adds support for the SB0400 version of the Audigy2 Value, that uses
#   the new CA0108 chip.
#   
#   Signed-off-by: James Courtier-Dutton
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/emu10k1/emufx.c
#   2004/11/22 11:45:50+01:00 perex@suse.cz +4 -0
#   [ALSA] Support for Audigy2 Value SB0400
#   
#   D:2004/11/22 18:45:49
#   C:EMU10K1/EMU10K2 driver
#   F:pci/emu10k1/emu10k1.c:1.29->1.30 
#   F:pci/emu10k1/emu10k1_main.c:1.39->1.40 
#   F:pci/emu10k1/emufx.c:1.64->1.65 
#   L:This adds support for the SB0400 version of the Audigy2 Value, that uses
#   L:the new CA0108 chip.
#   Signed-off-by: James Courtier-Dutton
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/emu10k1/emu10k1_main.c
#   2004/11/22 11:45:49+01:00 perex@suse.cz +28 -1
#   [ALSA] Support for Audigy2 Value SB0400
#   
#   D:2004/11/22 18:45:49
#   C:EMU10K1/EMU10K2 driver
#   F:pci/emu10k1/emu10k1.c:1.29->1.30 
#   F:pci/emu10k1/emu10k1_main.c:1.39->1.40 
#   F:pci/emu10k1/emufx.c:1.64->1.65 
#   L:This adds support for the SB0400 version of the Audigy2 Value, that uses
#   L:the new CA0108 chip.
#   Signed-off-by: James Courtier-Dutton
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/emu10k1/emu10k1.c
#   2004/11/22 11:45:49+01:00 perex@suse.cz +24 -2
#   [ALSA] Support for Audigy2 Value SB0400
#   
#   D:2004/11/22 18:45:49
#   C:EMU10K1/EMU10K2 driver
#   F:pci/emu10k1/emu10k1.c:1.29->1.30 
#   F:pci/emu10k1/emu10k1_main.c:1.39->1.40 
#   F:pci/emu10k1/emufx.c:1.64->1.65 
#   L:This adds support for the SB0400 version of the Audigy2 Value, that uses
#   L:the new CA0108 chip.
#   Signed-off-by: James Courtier-Dutton
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2004/11/29 09:18:01+01:00 perex@suse.cz 
#   [ALSA] Fixes the 'It disables the right channel' bug
#   
#   EMU10K1/EMU10K2 driver
#   
#   
#   Signed-off-by: James Courtier-Dutton
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# include/sound/emu10k1.h
#   2004/11/22 11:42:01+01:00 perex@suse.cz +2 -2
#   [ALSA] Fixes the 'It disables the right channel' bug
#   
#   D:2004/11/22 18:42:01
#   C:EMU10K1/EMU10K2 driver
#   F:include/emu10k1.h:1.52->1.53 
#   L:
#   Signed-off-by: James Courtier-Dutton
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2004/11/29 09:16:54+01:00 perex@suse.cz 
#   [ALSA] ALSA PCI drivers: misc cleanups
#   
#   EMU10K1/EMU10K2 driver,Trident driver,YMFPCI driver,AZT3328 driver
#   SonicVibes driver,AC97 Codec Core,CS46xx driver,KORG1212 driver
#   RME HDSP driver,RME9652 driver
#   The patch below does the following cleanups under sound/pci/ :
#   - make some needlessly global code static
#   - remove the following unused EXPORT_SYMBOL's:
#     - trident/trident_main.c: snd_trident_clear_voices
#     - trident/trident_main.c: snd_trident_synth_bzero
#   - remove the following unused global functions:
#     - azt3328.c: snd_azf3328_mixer_read
#     - emu10k1/io.c: snd_emu10k1_sum_vol_attn
#     - trident/trident_main.c: snd_trident_detach_synthesizer
#     - trident/trident_memory.c: snd_trident_synth_bzero
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ymfpci/ymfpci_main.c
#   2004/11/22 11:36:06+01:00 perex@suse.cz +2 -2
#   [ALSA] ALSA PCI drivers: misc cleanups
#   
#   D:2004/11/22 18:36:04
#   C:EMU10K1/EMU10K2 driver,Trident driver,YMFPCI driver,AZT3328 driver
#   C:SonicVibes driver,AC97 Codec Core,CS46xx driver,KORG1212 driver
#   C:RME HDSP driver,RME9652 driver
#   F:include/emu10k1.h:1.51->1.52 
#   F:include/trident.h:1.20->1.21 
#   F:include/ymfpci.h:1.17->1.18 
#   F:pci/azt3328.c:1.21->1.22 
#   F:pci/sonicvibes.c:1.43->1.44 
#   F:pci/ac97/ac97_codec.c:1.153->1.154 
#   F:pci/cs46xx/cs46xx_lib.c:1.88->1.89 
#   F:pci/cs46xx/cs46xx_lib.h:1.13->1.14 
#   F:pci/cs46xx/dsp_spos.c:1.27->1.28 
#   F:pci/cs46xx/dsp_spos_scb_lib.c:1.25->1.26 
#   F:pci/cs46xx/imgs/cwcdma.h:1.1->1.2 
#   F:pci/emu10k1/emu10k1_synth.c:1.9->1.10 
#   F:pci/emu10k1/emufx.c:1.63->1.64 
#   F:pci/emu10k1/io.c:1.7->1.8 
#   F:pci/korg1212/korg1212.c:1.51->1.52 
#   F:pci/rme9652/hdsp.c:1.75->1.76 
#   F:pci/rme9652/rme9652.c:1.55->1.56 
#   F:pci/trident/trident_main.c:1.65->1.66 
#   F:pci/trident/trident_memory.c:1.17->1.18 
#   F:pci/trident/trident_synth.c:1.16->1.17 
#   F:pci/ymfpci/ymfpci_main.c:1.59->1.60 
#   L:The patch below does the following cleanups under sound/pci/ :
#   L:- make some needlessly global code static
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - trident/trident_main.c: snd_trident_clear_voices
#   L:  - trident/trident_main.c: snd_trident_synth_bzero
#   L:- remove the following unused global functions:
#   L:  - azt3328.c: snd_azf3328_mixer_read
#   L:  - emu10k1/io.c: snd_emu10k1_sum_vol_attn
#   L:  - trident/trident_main.c: snd_trident_detach_synthesizer
#   L:  - trident/trident_memory.c: snd_trident_synth_bzero
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/trident/trident_synth.c
#   2004/11/22 11:36:06+01:00 perex@suse.cz +1 -1
#   [ALSA] ALSA PCI drivers: misc cleanups
#   
#   D:2004/11/22 18:36:04
#   C:EMU10K1/EMU10K2 driver,Trident driver,YMFPCI driver,AZT3328 driver
#   C:SonicVibes driver,AC97 Codec Core,CS46xx driver,KORG1212 driver
#   C:RME HDSP driver,RME9652 driver
#   F:include/emu10k1.h:1.51->1.52 
#   F:include/trident.h:1.20->1.21 
#   F:include/ymfpci.h:1.17->1.18 
#   F:pci/azt3328.c:1.21->1.22 
#   F:pci/sonicvibes.c:1.43->1.44 
#   F:pci/ac97/ac97_codec.c:1.153->1.154 
#   F:pci/cs46xx/cs46xx_lib.c:1.88->1.89 
#   F:pci/cs46xx/cs46xx_lib.h:1.13->1.14 
#   F:pci/cs46xx/dsp_spos.c:1.27->1.28 
#   F:pci/cs46xx/dsp_spos_scb_lib.c:1.25->1.26 
#   F:pci/cs46xx/imgs/cwcdma.h:1.1->1.2 
#   F:pci/emu10k1/emu10k1_synth.c:1.9->1.10 
#   F:pci/emu10k1/emufx.c:1.63->1.64 
#   F:pci/emu10k1/io.c:1.7->1.8 
#   F:pci/korg1212/korg1212.c:1.51->1.52 
#   F:pci/rme9652/hdsp.c:1.75->1.76 
#   F:pci/rme9652/rme9652.c:1.55->1.56 
#   F:pci/trident/trident_main.c:1.65->1.66 
#   F:pci/trident/trident_memory.c:1.17->1.18 
#   F:pci/trident/trident_synth.c:1.16->1.17 
#   F:pci/ymfpci/ymfpci_main.c:1.59->1.60 
#   L:The patch below does the following cleanups under sound/pci/ :
#   L:- make some needlessly global code static
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - trident/trident_main.c: snd_trident_clear_voices
#   L:  - trident/trident_main.c: snd_trident_synth_bzero
#   L:- remove the following unused global functions:
#   L:  - azt3328.c: snd_azf3328_mixer_read
#   L:  - emu10k1/io.c: snd_emu10k1_sum_vol_attn
#   L:  - trident/trident_main.c: snd_trident_detach_synthesizer
#   L:  - trident/trident_memory.c: snd_trident_synth_bzero
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/trident/trident_memory.c
#   2004/11/22 11:36:06+01:00 perex@suse.cz +0 -23
#   [ALSA] ALSA PCI drivers: misc cleanups
#   
#   D:2004/11/22 18:36:04
#   C:EMU10K1/EMU10K2 driver,Trident driver,YMFPCI driver,AZT3328 driver
#   C:SonicVibes driver,AC97 Codec Core,CS46xx driver,KORG1212 driver
#   C:RME HDSP driver,RME9652 driver
#   F:include/emu10k1.h:1.51->1.52 
#   F:include/trident.h:1.20->1.21 
#   F:include/ymfpci.h:1.17->1.18 
#   F:pci/azt3328.c:1.21->1.22 
#   F:pci/sonicvibes.c:1.43->1.44 
#   F:pci/ac97/ac97_codec.c:1.153->1.154 
#   F:pci/cs46xx/cs46xx_lib.c:1.88->1.89 
#   F:pci/cs46xx/cs46xx_lib.h:1.13->1.14 
#   F:pci/cs46xx/dsp_spos.c:1.27->1.28 
#   F:pci/cs46xx/dsp_spos_scb_lib.c:1.25->1.26 
#   F:pci/cs46xx/imgs/cwcdma.h:1.1->1.2 
#   F:pci/emu10k1/emu10k1_synth.c:1.9->1.10 
#   F:pci/emu10k1/emufx.c:1.63->1.64 
#   F:pci/emu10k1/io.c:1.7->1.8 
#   F:pci/korg1212/korg1212.c:1.51->1.52 
#   F:pci/rme9652/hdsp.c:1.75->1.76 
#   F:pci/rme9652/rme9652.c:1.55->1.56 
#   F:pci/trident/trident_main.c:1.65->1.66 
#   F:pci/trident/trident_memory.c:1.17->1.18 
#   F:pci/trident/trident_synth.c:1.16->1.17 
#   F:pci/ymfpci/ymfpci_main.c:1.59->1.60 
#   L:The patch below does the following cleanups under sound/pci/ :
#   L:- make some needlessly global code static
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - trident/trident_main.c: snd_trident_clear_voices
#   L:  - trident/trident_main.c: snd_trident_synth_bzero
#   L:- remove the following unused global functions:
#   L:  - azt3328.c: snd_azf3328_mixer_read
#   L:  - emu10k1/io.c: snd_emu10k1_sum_vol_attn
#   L:  - trident/trident_main.c: snd_trident_detach_synthesizer
#   L:  - trident/trident_memory.c: snd_trident_synth_bzero
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/trident/trident_main.c
#   2004/11/22 11:36:06+01:00 perex@suse.cz +14 -24
#   [ALSA] ALSA PCI drivers: misc cleanups
#   
#   D:2004/11/22 18:36:04
#   C:EMU10K1/EMU10K2 driver,Trident driver,YMFPCI driver,AZT3328 driver
#   C:SonicVibes driver,AC97 Codec Core,CS46xx driver,KORG1212 driver
#   C:RME HDSP driver,RME9652 driver
#   F:include/emu10k1.h:1.51->1.52 
#   F:include/trident.h:1.20->1.21 
#   F:include/ymfpci.h:1.17->1.18 
#   F:pci/azt3328.c:1.21->1.22 
#   F:pci/sonicvibes.c:1.43->1.44 
#   F:pci/ac97/ac97_codec.c:1.153->1.154 
#   F:pci/cs46xx/cs46xx_lib.c:1.88->1.89 
#   F:pci/cs46xx/cs46xx_lib.h:1.13->1.14 
#   F:pci/cs46xx/dsp_spos.c:1.27->1.28 
#   F:pci/cs46xx/dsp_spos_scb_lib.c:1.25->1.26 
#   F:pci/cs46xx/imgs/cwcdma.h:1.1->1.2 
#   F:pci/emu10k1/emu10k1_synth.c:1.9->1.10 
#   F:pci/emu10k1/emufx.c:1.63->1.64 
#   F:pci/emu10k1/io.c:1.7->1.8 
#   F:pci/korg1212/korg1212.c:1.51->1.52 
#   F:pci/rme9652/hdsp.c:1.75->1.76 
#   F:pci/rme9652/rme9652.c:1.55->1.56 
#   F:pci/trident/trident_main.c:1.65->1.66 
#   F:pci/trident/trident_memory.c:1.17->1.18 
#   F:pci/trident/trident_synth.c:1.16->1.17 
#   F:pci/ymfpci/ymfpci_main.c:1.59->1.60 
#   L:The patch below does the following cleanups under sound/pci/ :
#   L:- make some needlessly global code static
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - trident/trident_main.c: snd_trident_clear_voices
#   L:  - trident/trident_main.c: snd_trident_synth_bzero
#   L:- remove the following unused global functions:
#   L:  - azt3328.c: snd_azf3328_mixer_read
#   L:  - emu10k1/io.c: snd_emu10k1_sum_vol_attn
#   L:  - trident/trident_main.c: snd_trident_detach_synthesizer
#   L:  - trident/trident_memory.c: snd_trident_synth_bzero
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/sonicvibes.c
#   2004/11/22 11:36:04+01:00 perex@suse.cz +2 -2
#   [ALSA] ALSA PCI drivers: misc cleanups
#   
#   D:2004/11/22 18:36:04
#   C:EMU10K1/EMU10K2 driver,Trident driver,YMFPCI driver,AZT3328 driver
#   C:SonicVibes driver,AC97 Codec Core,CS46xx driver,KORG1212 driver
#   C:RME HDSP driver,RME9652 driver
#   F:include/emu10k1.h:1.51->1.52 
#   F:include/trident.h:1.20->1.21 
#   F:include/ymfpci.h:1.17->1.18 
#   F:pci/azt3328.c:1.21->1.22 
#   F:pci/sonicvibes.c:1.43->1.44 
#   F:pci/ac97/ac97_codec.c:1.153->1.154 
#   F:pci/cs46xx/cs46xx_lib.c:1.88->1.89 
#   F:pci/cs46xx/cs46xx_lib.h:1.13->1.14 
#   F:pci/cs46xx/dsp_spos.c:1.27->1.28 
#   F:pci/cs46xx/dsp_spos_scb_lib.c:1.25->1.26 
#   F:pci/cs46xx/imgs/cwcdma.h:1.1->1.2 
#   F:pci/emu10k1/emu10k1_synth.c:1.9->1.10 
#   F:pci/emu10k1/emufx.c:1.63->1.64 
#   F:pci/emu10k1/io.c:1.7->1.8 
#   F:pci/korg1212/korg1212.c:1.51->1.52 
#   F:pci/rme9652/hdsp.c:1.75->1.76 
#   F:pci/rme9652/rme9652.c:1.55->1.56 
#   F:pci/trident/trident_main.c:1.65->1.66 
#   F:pci/trident/trident_memory.c:1.17->1.18 
#   F:pci/trident/trident_synth.c:1.16->1.17 
#   F:pci/ymfpci/ymfpci_main.c:1.59->1.60 
#   L:The patch below does the following cleanups under sound/pci/ :
#   L:- make some needlessly global code static
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - trident/trident_main.c: snd_trident_clear_voices
#   L:  - trident/trident_main.c: snd_trident_synth_bzero
#   L:- remove the following unused global functions:
#   L:  - azt3328.c: snd_azf3328_mixer_read
#   L:  - emu10k1/io.c: snd_emu10k1_sum_vol_attn
#   L:  - trident/trident_main.c: snd_trident_detach_synthesizer
#   L:  - trident/trident_memory.c: snd_trident_synth_bzero
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/rme9652/rme9652.c
#   2004/11/22 11:36:06+01:00 perex@suse.cz +1 -1
#   [ALSA] ALSA PCI drivers: misc cleanups
#   
#   D:2004/11/22 18:36:04
#   C:EMU10K1/EMU10K2 driver,Trident driver,YMFPCI driver,AZT3328 driver
#   C:SonicVibes driver,AC97 Codec Core,CS46xx driver,KORG1212 driver
#   C:RME HDSP driver,RME9652 driver
#   F:include/emu10k1.h:1.51->1.52 
#   F:include/trident.h:1.20->1.21 
#   F:include/ymfpci.h:1.17->1.18 
#   F:pci/azt3328.c:1.21->1.22 
#   F:pci/sonicvibes.c:1.43->1.44 
#   F:pci/ac97/ac97_codec.c:1.153->1.154 
#   F:pci/cs46xx/cs46xx_lib.c:1.88->1.89 
#   F:pci/cs46xx/cs46xx_lib.h:1.13->1.14 
#   F:pci/cs46xx/dsp_spos.c:1.27->1.28 
#   F:pci/cs46xx/dsp_spos_scb_lib.c:1.25->1.26 
#   F:pci/cs46xx/imgs/cwcdma.h:1.1->1.2 
#   F:pci/emu10k1/emu10k1_synth.c:1.9->1.10 
#   F:pci/emu10k1/emufx.c:1.63->1.64 
#   F:pci/emu10k1/io.c:1.7->1.8 
#   F:pci/korg1212/korg1212.c:1.51->1.52 
#   F:pci/rme9652/hdsp.c:1.75->1.76 
#   F:pci/rme9652/rme9652.c:1.55->1.56 
#   F:pci/trident/trident_main.c:1.65->1.66 
#   F:pci/trident/trident_memory.c:1.17->1.18 
#   F:pci/trident/trident_synth.c:1.16->1.17 
#   F:pci/ymfpci/ymfpci_main.c:1.59->1.60 
#   L:The patch below does the following cleanups under sound/pci/ :
#   L:- make some needlessly global code static
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - trident/trident_main.c: snd_trident_clear_voices
#   L:  - trident/trident_main.c: snd_trident_synth_bzero
#   L:- remove the following unused global functions:
#   L:  - azt3328.c: snd_azf3328_mixer_read
#   L:  - emu10k1/io.c: snd_emu10k1_sum_vol_attn
#   L:  - trident/trident_main.c: snd_trident_detach_synthesizer
#   L:  - trident/trident_memory.c: snd_trident_synth_bzero
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/rme9652/hdsp.c
#   2004/11/22 11:36:06+01:00 perex@suse.cz +4 -4
#   [ALSA] ALSA PCI drivers: misc cleanups
#   
#   D:2004/11/22 18:36:04
#   C:EMU10K1/EMU10K2 driver,Trident driver,YMFPCI driver,AZT3328 driver
#   C:SonicVibes driver,AC97 Codec Core,CS46xx driver,KORG1212 driver
#   C:RME HDSP driver,RME9652 driver
#   F:include/emu10k1.h:1.51->1.52 
#   F:include/trident.h:1.20->1.21 
#   F:include/ymfpci.h:1.17->1.18 
#   F:pci/azt3328.c:1.21->1.22 
#   F:pci/sonicvibes.c:1.43->1.44 
#   F:pci/ac97/ac97_codec.c:1.153->1.154 
#   F:pci/cs46xx/cs46xx_lib.c:1.88->1.89 
#   F:pci/cs46xx/cs46xx_lib.h:1.13->1.14 
#   F:pci/cs46xx/dsp_spos.c:1.27->1.28 
#   F:pci/cs46xx/dsp_spos_scb_lib.c:1.25->1.26 
#   F:pci/cs46xx/imgs/cwcdma.h:1.1->1.2 
#   F:pci/emu10k1/emu10k1_synth.c:1.9->1.10 
#   F:pci/emu10k1/emufx.c:1.63->1.64 
#   F:pci/emu10k1/io.c:1.7->1.8 
#   F:pci/korg1212/korg1212.c:1.51->1.52 
#   F:pci/rme9652/hdsp.c:1.75->1.76 
#   F:pci/rme9652/rme9652.c:1.55->1.56 
#   F:pci/trident/trident_main.c:1.65->1.66 
#   F:pci/trident/trident_memory.c:1.17->1.18 
#   F:pci/trident/trident_synth.c:1.16->1.17 
#   F:pci/ymfpci/ymfpci_main.c:1.59->1.60 
#   L:The patch below does the following cleanups under sound/pci/ :
#   L:- make some needlessly global code static
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - trident/trident_main.c: snd_trident_clear_voices
#   L:  - trident/trident_main.c: snd_trident_synth_bzero
#   L:- remove the following unused global functions:
#   L:  - azt3328.c: snd_azf3328_mixer_read
#   L:  - emu10k1/io.c: snd_emu10k1_sum_vol_attn
#   L:  - trident/trident_main.c: snd_trident_detach_synthesizer
#   L:  - trident/trident_memory.c: snd_trident_synth_bzero
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/korg1212/korg1212.c
#   2004/11/22 11:36:06+01:00 perex@suse.cz +2 -1
#   [ALSA] ALSA PCI drivers: misc cleanups
#   
#   D:2004/11/22 18:36:04
#   C:EMU10K1/EMU10K2 driver,Trident driver,YMFPCI driver,AZT3328 driver
#   C:SonicVibes driver,AC97 Codec Core,CS46xx driver,KORG1212 driver
#   C:RME HDSP driver,RME9652 driver
#   F:include/emu10k1.h:1.51->1.52 
#   F:include/trident.h:1.20->1.21 
#   F:include/ymfpci.h:1.17->1.18 
#   F:pci/azt3328.c:1.21->1.22 
#   F:pci/sonicvibes.c:1.43->1.44 
#   F:pci/ac97/ac97_codec.c:1.153->1.154 
#   F:pci/cs46xx/cs46xx_lib.c:1.88->1.89 
#   F:pci/cs46xx/cs46xx_lib.h:1.13->1.14 
#   F:pci/cs46xx/dsp_spos.c:1.27->1.28 
#   F:pci/cs46xx/dsp_spos_scb_lib.c:1.25->1.26 
#   F:pci/cs46xx/imgs/cwcdma.h:1.1->1.2 
#   F:pci/emu10k1/emu10k1_synth.c:1.9->1.10 
#   F:pci/emu10k1/emufx.c:1.63->1.64 
#   F:pci/emu10k1/io.c:1.7->1.8 
#   F:pci/korg1212/korg1212.c:1.51->1.52 
#   F:pci/rme9652/hdsp.c:1.75->1.76 
#   F:pci/rme9652/rme9652.c:1.55->1.56 
#   F:pci/trident/trident_main.c:1.65->1.66 
#   F:pci/trident/trident_memory.c:1.17->1.18 
#   F:pci/trident/trident_synth.c:1.16->1.17 
#   F:pci/ymfpci/ymfpci_main.c:1.59->1.60 
#   L:The patch below does the following cleanups under sound/pci/ :
#   L:- make some needlessly global code static
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - trident/trident_main.c: snd_trident_clear_voices
#   L:  - trident/trident_main.c: snd_trident_synth_bzero
#   L:- remove the following unused global functions:
#   L:  - azt3328.c: snd_azf3328_mixer_read
#   L:  - emu10k1/io.c: snd_emu10k1_sum_vol_attn
#   L:  - trident/trident_main.c: snd_trident_detach_synthesizer
#   L:  - trident/trident_memory.c: snd_trident_synth_bzero
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/emu10k1/io.c
#   2004/11/22 11:36:05+01:00 perex@suse.cz +0 -25
#   [ALSA] ALSA PCI drivers: misc cleanups
#   
#   D:2004/11/22 18:36:04
#   C:EMU10K1/EMU10K2 driver,Trident driver,YMFPCI driver,AZT3328 driver
#   C:SonicVibes driver,AC97 Codec Core,CS46xx driver,KORG1212 driver
#   C:RME HDSP driver,RME9652 driver
#   F:include/emu10k1.h:1.51->1.52 
#   F:include/trident.h:1.20->1.21 
#   F:include/ymfpci.h:1.17->1.18 
#   F:pci/azt3328.c:1.21->1.22 
#   F:pci/sonicvibes.c:1.43->1.44 
#   F:pci/ac97/ac97_codec.c:1.153->1.154 
#   F:pci/cs46xx/cs46xx_lib.c:1.88->1.89 
#   F:pci/cs46xx/cs46xx_lib.h:1.13->1.14 
#   F:pci/cs46xx/dsp_spos.c:1.27->1.28 
#   F:pci/cs46xx/dsp_spos_scb_lib.c:1.25->1.26 
#   F:pci/cs46xx/imgs/cwcdma.h:1.1->1.2 
#   F:pci/emu10k1/emu10k1_synth.c:1.9->1.10 
#   F:pci/emu10k1/emufx.c:1.63->1.64 
#   F:pci/emu10k1/io.c:1.7->1.8 
#   F:pci/korg1212/korg1212.c:1.51->1.52 
#   F:pci/rme9652/hdsp.c:1.75->1.76 
#   F:pci/rme9652/rme9652.c:1.55->1.56 
#   F:pci/trident/trident_main.c:1.65->1.66 
#   F:pci/trident/trident_memory.c:1.17->1.18 
#   F:pci/trident/trident_synth.c:1.16->1.17 
#   F:pci/ymfpci/ymfpci_main.c:1.59->1.60 
#   L:The patch below does the following cleanups under sound/pci/ :
#   L:- make some needlessly global code static
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - trident/trident_main.c: snd_trident_clear_voices
#   L:  - trident/trident_main.c: snd_trident_synth_bzero
#   L:- remove the following unused global functions:
#   L:  - azt3328.c: snd_azf3328_mixer_read
#   L:  - emu10k1/io.c: snd_emu10k1_sum_vol_attn
#   L:  - trident/trident_main.c: snd_trident_detach_synthesizer
#   L:  - trident/trident_memory.c: snd_trident_synth_bzero
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/emu10k1/emufx.c
#   2004/11/22 11:36:05+01:00 perex@suse.cz +1 -1
#   [ALSA] ALSA PCI drivers: misc cleanups
#   
#   D:2004/11/22 18:36:04
#   C:EMU10K1/EMU10K2 driver,Trident driver,YMFPCI driver,AZT3328 driver
#   C:SonicVibes driver,AC97 Codec Core,CS46xx driver,KORG1212 driver
#   C:RME HDSP driver,RME9652 driver
#   F:include/emu10k1.h:1.51->1.52 
#   F:include/trident.h:1.20->1.21 
#   F:include/ymfpci.h:1.17->1.18 
#   F:pci/azt3328.c:1.21->1.22 
#   F:pci/sonicvibes.c:1.43->1.44 
#   F:pci/ac97/ac97_codec.c:1.153->1.154 
#   F:pci/cs46xx/cs46xx_lib.c:1.88->1.89 
#   F:pci/cs46xx/cs46xx_lib.h:1.13->1.14 
#   F:pci/cs46xx/dsp_spos.c:1.27->1.28 
#   F:pci/cs46xx/dsp_spos_scb_lib.c:1.25->1.26 
#   F:pci/cs46xx/imgs/cwcdma.h:1.1->1.2 
#   F:pci/emu10k1/emu10k1_synth.c:1.9->1.10 
#   F:pci/emu10k1/emufx.c:1.63->1.64 
#   F:pci/emu10k1/io.c:1.7->1.8 
#   F:pci/korg1212/korg1212.c:1.51->1.52 
#   F:pci/rme9652/hdsp.c:1.75->1.76 
#   F:pci/rme9652/rme9652.c:1.55->1.56 
#   F:pci/trident/trident_main.c:1.65->1.66 
#   F:pci/trident/trident_memory.c:1.17->1.18 
#   F:pci/trident/trident_synth.c:1.16->1.17 
#   F:pci/ymfpci/ymfpci_main.c:1.59->1.60 
#   L:The patch below does the following cleanups under sound/pci/ :
#   L:- make some needlessly global code static
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - trident/trident_main.c: snd_trident_clear_voices
#   L:  - trident/trident_main.c: snd_trident_synth_bzero
#   L:- remove the following unused global functions:
#   L:  - azt3328.c: snd_azf3328_mixer_read
#   L:  - emu10k1/io.c: snd_emu10k1_sum_vol_attn
#   L:  - trident/trident_main.c: snd_trident_detach_synthesizer
#   L:  - trident/trident_memory.c: snd_trident_synth_bzero
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/emu10k1/emu10k1_synth.c
#   2004/11/22 11:36:05+01:00 perex@suse.cz +2 -2
#   [ALSA] ALSA PCI drivers: misc cleanups
#   
#   D:2004/11/22 18:36:04
#   C:EMU10K1/EMU10K2 driver,Trident driver,YMFPCI driver,AZT3328 driver
#   C:SonicVibes driver,AC97 Codec Core,CS46xx driver,KORG1212 driver
#   C:RME HDSP driver,RME9652 driver
#   F:include/emu10k1.h:1.51->1.52 
#   F:include/trident.h:1.20->1.21 
#   F:include/ymfpci.h:1.17->1.18 
#   F:pci/azt3328.c:1.21->1.22 
#   F:pci/sonicvibes.c:1.43->1.44 
#   F:pci/ac97/ac97_codec.c:1.153->1.154 
#   F:pci/cs46xx/cs46xx_lib.c:1.88->1.89 
#   F:pci/cs46xx/cs46xx_lib.h:1.13->1.14 
#   F:pci/cs46xx/dsp_spos.c:1.27->1.28 
#   F:pci/cs46xx/dsp_spos_scb_lib.c:1.25->1.26 
#   F:pci/cs46xx/imgs/cwcdma.h:1.1->1.2 
#   F:pci/emu10k1/emu10k1_synth.c:1.9->1.10 
#   F:pci/emu10k1/emufx.c:1.63->1.64 
#   F:pci/emu10k1/io.c:1.7->1.8 
#   F:pci/korg1212/korg1212.c:1.51->1.52 
#   F:pci/rme9652/hdsp.c:1.75->1.76 
#   F:pci/rme9652/rme9652.c:1.55->1.56 
#   F:pci/trident/trident_main.c:1.65->1.66 
#   F:pci/trident/trident_memory.c:1.17->1.18 
#   F:pci/trident/trident_synth.c:1.16->1.17 
#   F:pci/ymfpci/ymfpci_main.c:1.59->1.60 
#   L:The patch below does the following cleanups under sound/pci/ :
#   L:- make some needlessly global code static
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - trident/trident_main.c: snd_trident_clear_voices
#   L:  - trident/trident_main.c: snd_trident_synth_bzero
#   L:- remove the following unused global functions:
#   L:  - azt3328.c: snd_azf3328_mixer_read
#   L:  - emu10k1/io.c: snd_emu10k1_sum_vol_attn
#   L:  - trident/trident_main.c: snd_trident_detach_synthesizer
#   L:  - trident/trident_memory.c: snd_trident_synth_bzero
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/cs46xx/imgs/cwcdma.h
#   2004/11/22 11:36:05+01:00 perex@suse.cz +4 -4
#   [ALSA] ALSA PCI drivers: misc cleanups
#   
#   D:2004/11/22 18:36:04
#   C:EMU10K1/EMU10K2 driver,Trident driver,YMFPCI driver,AZT3328 driver
#   C:SonicVibes driver,AC97 Codec Core,CS46xx driver,KORG1212 driver
#   C:RME HDSP driver,RME9652 driver
#   F:include/emu10k1.h:1.51->1.52 
#   F:include/trident.h:1.20->1.21 
#   F:include/ymfpci.h:1.17->1.18 
#   F:pci/azt3328.c:1.21->1.22 
#   F:pci/sonicvibes.c:1.43->1.44 
#   F:pci/ac97/ac97_codec.c:1.153->1.154 
#   F:pci/cs46xx/cs46xx_lib.c:1.88->1.89 
#   F:pci/cs46xx/cs46xx_lib.h:1.13->1.14 
#   F:pci/cs46xx/dsp_spos.c:1.27->1.28 
#   F:pci/cs46xx/dsp_spos_scb_lib.c:1.25->1.26 
#   F:pci/cs46xx/imgs/cwcdma.h:1.1->1.2 
#   F:pci/emu10k1/emu10k1_synth.c:1.9->1.10 
#   F:pci/emu10k1/emufx.c:1.63->1.64 
#   F:pci/emu10k1/io.c:1.7->1.8 
#   F:pci/korg1212/korg1212.c:1.51->1.52 
#   F:pci/rme9652/hdsp.c:1.75->1.76 
#   F:pci/rme9652/rme9652.c:1.55->1.56 
#   F:pci/trident/trident_main.c:1.65->1.66 
#   F:pci/trident/trident_memory.c:1.17->1.18 
#   F:pci/trident/trident_synth.c:1.16->1.17 
#   F:pci/ymfpci/ymfpci_main.c:1.59->1.60 
#   L:The patch below does the following cleanups under sound/pci/ :
#   L:- make some needlessly global code static
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - trident/trident_main.c: snd_trident_clear_voices
#   L:  - trident/trident_main.c: snd_trident_synth_bzero
#   L:- remove the following unused global functions:
#   L:  - azt3328.c: snd_azf3328_mixer_read
#   L:  - emu10k1/io.c: snd_emu10k1_sum_vol_attn
#   L:  - trident/trident_main.c: snd_trident_detach_synthesizer
#   L:  - trident/trident_memory.c: snd_trident_synth_bzero
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/cs46xx/dsp_spos_scb_lib.c
#   2004/11/22 11:36:05+01:00 perex@suse.cz +8 -4
#   [ALSA] ALSA PCI drivers: misc cleanups
#   
#   D:2004/11/22 18:36:04
#   C:EMU10K1/EMU10K2 driver,Trident driver,YMFPCI driver,AZT3328 driver
#   C:SonicVibes driver,AC97 Codec Core,CS46xx driver,KORG1212 driver
#   C:RME HDSP driver,RME9652 driver
#   F:include/emu10k1.h:1.51->1.52 
#   F:include/trident.h:1.20->1.21 
#   F:include/ymfpci.h:1.17->1.18 
#   F:pci/azt3328.c:1.21->1.22 
#   F:pci/sonicvibes.c:1.43->1.44 
#   F:pci/ac97/ac97_codec.c:1.153->1.154 
#   F:pci/cs46xx/cs46xx_lib.c:1.88->1.89 
#   F:pci/cs46xx/cs46xx_lib.h:1.13->1.14 
#   F:pci/cs46xx/dsp_spos.c:1.27->1.28 
#   F:pci/cs46xx/dsp_spos_scb_lib.c:1.25->1.26 
#   F:pci/cs46xx/imgs/cwcdma.h:1.1->1.2 
#   F:pci/emu10k1/emu10k1_synth.c:1.9->1.10 
#   F:pci/emu10k1/emufx.c:1.63->1.64 
#   F:pci/emu10k1/io.c:1.7->1.8 
#   F:pci/korg1212/korg1212.c:1.51->1.52 
#   F:pci/rme9652/hdsp.c:1.75->1.76 
#   F:pci/rme9652/rme9652.c:1.55->1.56 
#   F:pci/trident/trident_main.c:1.65->1.66 
#   F:pci/trident/trident_memory.c:1.17->1.18 
#   F:pci/trident/trident_synth.c:1.16->1.17 
#   F:pci/ymfpci/ymfpci_main.c:1.59->1.60 
#   L:The patch below does the following cleanups under sound/pci/ :
#   L:- make some needlessly global code static
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - trident/trident_main.c: snd_trident_clear_voices
#   L:  - trident/trident_main.c: snd_trident_synth_bzero
#   L:- remove the following unused global functions:
#   L:  - azt3328.c: snd_azf3328_mixer_read
#   L:  - emu10k1/io.c: snd_emu10k1_sum_vol_attn
#   L:  - trident/trident_main.c: snd_trident_detach_synthesizer
#   L:  - trident/trident_memory.c: snd_trident_synth_bzero
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/cs46xx/dsp_spos.c
#   2004/11/22 11:36:05+01:00 perex@suse.cz +5 -3
#   [ALSA] ALSA PCI drivers: misc cleanups
#   
#   D:2004/11/22 18:36:04
#   C:EMU10K1/EMU10K2 driver,Trident driver,YMFPCI driver,AZT3328 driver
#   C:SonicVibes driver,AC97 Codec Core,CS46xx driver,KORG1212 driver
#   C:RME HDSP driver,RME9652 driver
#   F:include/emu10k1.h:1.51->1.52 
#   F:include/trident.h:1.20->1.21 
#   F:include/ymfpci.h:1.17->1.18 
#   F:pci/azt3328.c:1.21->1.22 
#   F:pci/sonicvibes.c:1.43->1.44 
#   F:pci/ac97/ac97_codec.c:1.153->1.154 
#   F:pci/cs46xx/cs46xx_lib.c:1.88->1.89 
#   F:pci/cs46xx/cs46xx_lib.h:1.13->1.14 
#   F:pci/cs46xx/dsp_spos.c:1.27->1.28 
#   F:pci/cs46xx/dsp_spos_scb_lib.c:1.25->1.26 
#   F:pci/cs46xx/imgs/cwcdma.h:1.1->1.2 
#   F:pci/emu10k1/emu10k1_synth.c:1.9->1.10 
#   F:pci/emu10k1/emufx.c:1.63->1.64 
#   F:pci/emu10k1/io.c:1.7->1.8 
#   F:pci/korg1212/korg1212.c:1.51->1.52 
#   F:pci/rme9652/hdsp.c:1.75->1.76 
#   F:pci/rme9652/rme9652.c:1.55->1.56 
#   F:pci/trident/trident_main.c:1.65->1.66 
#   F:pci/trident/trident_memory.c:1.17->1.18 
#   F:pci/trident/trident_synth.c:1.16->1.17 
#   F:pci/ymfpci/ymfpci_main.c:1.59->1.60 
#   L:The patch below does the following cleanups under sound/pci/ :
#   L:- make some needlessly global code static
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - trident/trident_main.c: snd_trident_clear_voices
#   L:  - trident/trident_main.c: snd_trident_synth_bzero
#   L:- remove the following unused global functions:
#   L:  - azt3328.c: snd_azf3328_mixer_read
#   L:  - emu10k1/io.c: snd_emu10k1_sum_vol_attn
#   L:  - trident/trident_main.c: snd_trident_detach_synthesizer
#   L:  - trident/trident_memory.c: snd_trident_synth_bzero
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/cs46xx/cs46xx_lib.h
#   2004/11/22 11:36:05+01:00 perex@suse.cz +0 -40
#   [ALSA] ALSA PCI drivers: misc cleanups
#   
#   D:2004/11/22 18:36:04
#   C:EMU10K1/EMU10K2 driver,Trident driver,YMFPCI driver,AZT3328 driver
#   C:SonicVibes driver,AC97 Codec Core,CS46xx driver,KORG1212 driver
#   C:RME HDSP driver,RME9652 driver
#   F:include/emu10k1.h:1.51->1.52 
#   F:include/trident.h:1.20->1.21 
#   F:include/ymfpci.h:1.17->1.18 
#   F:pci/azt3328.c:1.21->1.22 
#   F:pci/sonicvibes.c:1.43->1.44 
#   F:pci/ac97/ac97_codec.c:1.153->1.154 
#   F:pci/cs46xx/cs46xx_lib.c:1.88->1.89 
#   F:pci/cs46xx/cs46xx_lib.h:1.13->1.14 
#   F:pci/cs46xx/dsp_spos.c:1.27->1.28 
#   F:pci/cs46xx/dsp_spos_scb_lib.c:1.25->1.26 
#   F:pci/cs46xx/imgs/cwcdma.h:1.1->1.2 
#   F:pci/emu10k1/emu10k1_synth.c:1.9->1.10 
#   F:pci/emu10k1/emufx.c:1.63->1.64 
#   F:pci/emu10k1/io.c:1.7->1.8 
#   F:pci/korg1212/korg1212.c:1.51->1.52 
#   F:pci/rme9652/hdsp.c:1.75->1.76 
#   F:pci/rme9652/rme9652.c:1.55->1.56 
#   F:pci/trident/trident_main.c:1.65->1.66 
#   F:pci/trident/trident_memory.c:1.17->1.18 
#   F:pci/trident/trident_synth.c:1.16->1.17 
#   F:pci/ymfpci/ymfpci_main.c:1.59->1.60 
#   L:The patch below does the following cleanups under sound/pci/ :
#   L:- make some needlessly global code static
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - trident/trident_main.c: snd_trident_clear_voices
#   L:  - trident/trident_main.c: snd_trident_synth_bzero
#   L:- remove the following unused global functions:
#   L:  - azt3328.c: snd_azf3328_mixer_read
#   L:  - emu10k1/io.c: snd_emu10k1_sum_vol_attn
#   L:  - trident/trident_main.c: snd_trident_detach_synthesizer
#   L:  - trident/trident_memory.c: snd_trident_synth_bzero
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/cs46xx/cs46xx_lib.c
#   2004/11/22 11:36:04+01:00 perex@suse.cz +24 -10
#   [ALSA] ALSA PCI drivers: misc cleanups
#   
#   D:2004/11/22 18:36:04
#   C:EMU10K1/EMU10K2 driver,Trident driver,YMFPCI driver,AZT3328 driver
#   C:SonicVibes driver,AC97 Codec Core,CS46xx driver,KORG1212 driver
#   C:RME HDSP driver,RME9652 driver
#   F:include/emu10k1.h:1.51->1.52 
#   F:include/trident.h:1.20->1.21 
#   F:include/ymfpci.h:1.17->1.18 
#   F:pci/azt3328.c:1.21->1.22 
#   F:pci/sonicvibes.c:1.43->1.44 
#   F:pci/ac97/ac97_codec.c:1.153->1.154 
#   F:pci/cs46xx/cs46xx_lib.c:1.88->1.89 
#   F:pci/cs46xx/cs46xx_lib.h:1.13->1.14 
#   F:pci/cs46xx/dsp_spos.c:1.27->1.28 
#   F:pci/cs46xx/dsp_spos_scb_lib.c:1.25->1.26 
#   F:pci/cs46xx/imgs/cwcdma.h:1.1->1.2 
#   F:pci/emu10k1/emu10k1_synth.c:1.9->1.10 
#   F:pci/emu10k1/emufx.c:1.63->1.64 
#   F:pci/emu10k1/io.c:1.7->1.8 
#   F:pci/korg1212/korg1212.c:1.51->1.52 
#   F:pci/rme9652/hdsp.c:1.75->1.76 
#   F:pci/rme9652/rme9652.c:1.55->1.56 
#   F:pci/trident/trident_main.c:1.65->1.66 
#   F:pci/trident/trident_memory.c:1.17->1.18 
#   F:pci/trident/trident_synth.c:1.16->1.17 
#   F:pci/ymfpci/ymfpci_main.c:1.59->1.60 
#   L:The patch below does the following cleanups under sound/pci/ :
#   L:- make some needlessly global code static
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - trident/trident_main.c: snd_trident_clear_voices
#   L:  - trident/trident_main.c: snd_trident_synth_bzero
#   L:- remove the following unused global functions:
#   L:  - azt3328.c: snd_azf3328_mixer_read
#   L:  - emu10k1/io.c: snd_emu10k1_sum_vol_attn
#   L:  - trident/trident_main.c: snd_trident_detach_synthesizer
#   L:  - trident/trident_memory.c: snd_trident_synth_bzero
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/azt3328.c
#   2004/11/22 11:36:04+01:00 perex@suse.cz +5 -24
#   [ALSA] ALSA PCI drivers: misc cleanups
#   
#   D:2004/11/22 18:36:04
#   C:EMU10K1/EMU10K2 driver,Trident driver,YMFPCI driver,AZT3328 driver
#   C:SonicVibes driver,AC97 Codec Core,CS46xx driver,KORG1212 driver
#   C:RME HDSP driver,RME9652 driver
#   F:include/emu10k1.h:1.51->1.52 
#   F:include/trident.h:1.20->1.21 
#   F:include/ymfpci.h:1.17->1.18 
#   F:pci/azt3328.c:1.21->1.22 
#   F:pci/sonicvibes.c:1.43->1.44 
#   F:pci/ac97/ac97_codec.c:1.153->1.154 
#   F:pci/cs46xx/cs46xx_lib.c:1.88->1.89 
#   F:pci/cs46xx/cs46xx_lib.h:1.13->1.14 
#   F:pci/cs46xx/dsp_spos.c:1.27->1.28 
#   F:pci/cs46xx/dsp_spos_scb_lib.c:1.25->1.26 
#   F:pci/cs46xx/imgs/cwcdma.h:1.1->1.2 
#   F:pci/emu10k1/emu10k1_synth.c:1.9->1.10 
#   F:pci/emu10k1/emufx.c:1.63->1.64 
#   F:pci/emu10k1/io.c:1.7->1.8 
#   F:pci/korg1212/korg1212.c:1.51->1.52 
#   F:pci/rme9652/hdsp.c:1.75->1.76 
#   F:pci/rme9652/rme9652.c:1.55->1.56 
#   F:pci/trident/trident_main.c:1.65->1.66 
#   F:pci/trident/trident_memory.c:1.17->1.18 
#   F:pci/trident/trident_synth.c:1.16->1.17 
#   F:pci/ymfpci/ymfpci_main.c:1.59->1.60 
#   L:The patch below does the following cleanups under sound/pci/ :
#   L:- make some needlessly global code static
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - trident/trident_main.c: snd_trident_clear_voices
#   L:  - trident/trident_main.c: snd_trident_synth_bzero
#   L:- remove the following unused global functions:
#   L:  - azt3328.c: snd_azf3328_mixer_read
#   L:  - emu10k1/io.c: snd_emu10k1_sum_vol_attn
#   L:  - trident/trident_main.c: snd_trident_detach_synthesizer
#   L:  - trident/trident_memory.c: snd_trident_synth_bzero
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ac97/ac97_codec.c
#   2004/11/22 11:36:04+01:00 perex@suse.cz +1 -1
#   [ALSA] ALSA PCI drivers: misc cleanups
#   
#   D:2004/11/22 18:36:04
#   C:EMU10K1/EMU10K2 driver,Trident driver,YMFPCI driver,AZT3328 driver
#   C:SonicVibes driver,AC97 Codec Core,CS46xx driver,KORG1212 driver
#   C:RME HDSP driver,RME9652 driver
#   F:include/emu10k1.h:1.51->1.52 
#   F:include/trident.h:1.20->1.21 
#   F:include/ymfpci.h:1.17->1.18 
#   F:pci/azt3328.c:1.21->1.22 
#   F:pci/sonicvibes.c:1.43->1.44 
#   F:pci/ac97/ac97_codec.c:1.153->1.154 
#   F:pci/cs46xx/cs46xx_lib.c:1.88->1.89 
#   F:pci/cs46xx/cs46xx_lib.h:1.13->1.14 
#   F:pci/cs46xx/dsp_spos.c:1.27->1.28 
#   F:pci/cs46xx/dsp_spos_scb_lib.c:1.25->1.26 
#   F:pci/cs46xx/imgs/cwcdma.h:1.1->1.2 
#   F:pci/emu10k1/emu10k1_synth.c:1.9->1.10 
#   F:pci/emu10k1/emufx.c:1.63->1.64 
#   F:pci/emu10k1/io.c:1.7->1.8 
#   F:pci/korg1212/korg1212.c:1.51->1.52 
#   F:pci/rme9652/hdsp.c:1.75->1.76 
#   F:pci/rme9652/rme9652.c:1.55->1.56 
#   F:pci/trident/trident_main.c:1.65->1.66 
#   F:pci/trident/trident_memory.c:1.17->1.18 
#   F:pci/trident/trident_synth.c:1.16->1.17 
#   F:pci/ymfpci/ymfpci_main.c:1.59->1.60 
#   L:The patch below does the following cleanups under sound/pci/ :
#   L:- make some needlessly global code static
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - trident/trident_main.c: snd_trident_clear_voices
#   L:  - trident/trident_main.c: snd_trident_synth_bzero
#   L:- remove the following unused global functions:
#   L:  - azt3328.c: snd_azf3328_mixer_read
#   L:  - emu10k1/io.c: snd_emu10k1_sum_vol_attn
#   L:  - trident/trident_main.c: snd_trident_detach_synthesizer
#   L:  - trident/trident_memory.c: snd_trident_synth_bzero
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# include/sound/ymfpci.h
#   2004/11/22 11:36:04+01:00 perex@suse.cz +0 -3
#   [ALSA] ALSA PCI drivers: misc cleanups
#   
#   D:2004/11/22 18:36:04
#   C:EMU10K1/EMU10K2 driver,Trident driver,YMFPCI driver,AZT3328 driver
#   C:SonicVibes driver,AC97 Codec Core,CS46xx driver,KORG1212 driver
#   C:RME HDSP driver,RME9652 driver
#   F:include/emu10k1.h:1.51->1.52 
#   F:include/trident.h:1.20->1.21 
#   F:include/ymfpci.h:1.17->1.18 
#   F:pci/azt3328.c:1.21->1.22 
#   F:pci/sonicvibes.c:1.43->1.44 
#   F:pci/ac97/ac97_codec.c:1.153->1.154 
#   F:pci/cs46xx/cs46xx_lib.c:1.88->1.89 
#   F:pci/cs46xx/cs46xx_lib.h:1.13->1.14 
#   F:pci/cs46xx/dsp_spos.c:1.27->1.28 
#   F:pci/cs46xx/dsp_spos_scb_lib.c:1.25->1.26 
#   F:pci/cs46xx/imgs/cwcdma.h:1.1->1.2 
#   F:pci/emu10k1/emu10k1_synth.c:1.9->1.10 
#   F:pci/emu10k1/emufx.c:1.63->1.64 
#   F:pci/emu10k1/io.c:1.7->1.8 
#   F:pci/korg1212/korg1212.c:1.51->1.52 
#   F:pci/rme9652/hdsp.c:1.75->1.76 
#   F:pci/rme9652/rme9652.c:1.55->1.56 
#   F:pci/trident/trident_main.c:1.65->1.66 
#   F:pci/trident/trident_memory.c:1.17->1.18 
#   F:pci/trident/trident_synth.c:1.16->1.17 
#   F:pci/ymfpci/ymfpci_main.c:1.59->1.60 
#   L:The patch below does the following cleanups under sound/pci/ :
#   L:- make some needlessly global code static
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - trident/trident_main.c: snd_trident_clear_voices
#   L:  - trident/trident_main.c: snd_trident_synth_bzero
#   L:- remove the following unused global functions:
#   L:  - azt3328.c: snd_azf3328_mixer_read
#   L:  - emu10k1/io.c: snd_emu10k1_sum_vol_attn
#   L:  - trident/trident_main.c: snd_trident_detach_synthesizer
#   L:  - trident/trident_memory.c: snd_trident_synth_bzero
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# include/sound/trident.h
#   2004/11/22 11:36:04+01:00 perex@suse.cz +0 -4
#   [ALSA] ALSA PCI drivers: misc cleanups
#   
#   D:2004/11/22 18:36:04
#   C:EMU10K1/EMU10K2 driver,Trident driver,YMFPCI driver,AZT3328 driver
#   C:SonicVibes driver,AC97 Codec Core,CS46xx driver,KORG1212 driver
#   C:RME HDSP driver,RME9652 driver
#   F:include/emu10k1.h:1.51->1.52 
#   F:include/trident.h:1.20->1.21 
#   F:include/ymfpci.h:1.17->1.18 
#   F:pci/azt3328.c:1.21->1.22 
#   F:pci/sonicvibes.c:1.43->1.44 
#   F:pci/ac97/ac97_codec.c:1.153->1.154 
#   F:pci/cs46xx/cs46xx_lib.c:1.88->1.89 
#   F:pci/cs46xx/cs46xx_lib.h:1.13->1.14 
#   F:pci/cs46xx/dsp_spos.c:1.27->1.28 
#   F:pci/cs46xx/dsp_spos_scb_lib.c:1.25->1.26 
#   F:pci/cs46xx/imgs/cwcdma.h:1.1->1.2 
#   F:pci/emu10k1/emu10k1_synth.c:1.9->1.10 
#   F:pci/emu10k1/emufx.c:1.63->1.64 
#   F:pci/emu10k1/io.c:1.7->1.8 
#   F:pci/korg1212/korg1212.c:1.51->1.52 
#   F:pci/rme9652/hdsp.c:1.75->1.76 
#   F:pci/rme9652/rme9652.c:1.55->1.56 
#   F:pci/trident/trident_main.c:1.65->1.66 
#   F:pci/trident/trident_memory.c:1.17->1.18 
#   F:pci/trident/trident_synth.c:1.16->1.17 
#   F:pci/ymfpci/ymfpci_main.c:1.59->1.60 
#   L:The patch below does the following cleanups under sound/pci/ :
#   L:- make some needlessly global code static
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - trident/trident_main.c: snd_trident_clear_voices
#   L:  - trident/trident_main.c: snd_trident_synth_bzero
#   L:- remove the following unused global functions:
#   L:  - azt3328.c: snd_azf3328_mixer_read
#   L:  - emu10k1/io.c: snd_emu10k1_sum_vol_attn
#   L:  - trident/trident_main.c: snd_trident_detach_synthesizer
#   L:  - trident/trident_memory.c: snd_trident_synth_bzero
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# include/sound/emu10k1.h
#   2004/11/22 11:36:04+01:00 perex@suse.cz +0 -2
#   [ALSA] ALSA PCI drivers: misc cleanups
#   
#   D:2004/11/22 18:36:04
#   C:EMU10K1/EMU10K2 driver,Trident driver,YMFPCI driver,AZT3328 driver
#   C:SonicVibes driver,AC97 Codec Core,CS46xx driver,KORG1212 driver
#   C:RME HDSP driver,RME9652 driver
#   F:include/emu10k1.h:1.51->1.52 
#   F:include/trident.h:1.20->1.21 
#   F:include/ymfpci.h:1.17->1.18 
#   F:pci/azt3328.c:1.21->1.22 
#   F:pci/sonicvibes.c:1.43->1.44 
#   F:pci/ac97/ac97_codec.c:1.153->1.154 
#   F:pci/cs46xx/cs46xx_lib.c:1.88->1.89 
#   F:pci/cs46xx/cs46xx_lib.h:1.13->1.14 
#   F:pci/cs46xx/dsp_spos.c:1.27->1.28 
#   F:pci/cs46xx/dsp_spos_scb_lib.c:1.25->1.26 
#   F:pci/cs46xx/imgs/cwcdma.h:1.1->1.2 
#   F:pci/emu10k1/emu10k1_synth.c:1.9->1.10 
#   F:pci/emu10k1/emufx.c:1.63->1.64 
#   F:pci/emu10k1/io.c:1.7->1.8 
#   F:pci/korg1212/korg1212.c:1.51->1.52 
#   F:pci/rme9652/hdsp.c:1.75->1.76 
#   F:pci/rme9652/rme9652.c:1.55->1.56 
#   F:pci/trident/trident_main.c:1.65->1.66 
#   F:pci/trident/trident_memory.c:1.17->1.18 
#   F:pci/trident/trident_synth.c:1.16->1.17 
#   F:pci/ymfpci/ymfpci_main.c:1.59->1.60 
#   L:The patch below does the following cleanups under sound/pci/ :
#   L:- make some needlessly global code static
#   L:- remove the following unused EXPORT_SYMBOL's:
#   L:  - trident/trident_main.c: snd_trident_clear_voices
#   L:  - trident/trident_main.c: snd_trident_synth_bzero
#   L:- remove the following unused global functions:
#   L:  - azt3328.c: snd_azf3328_mixer_read
#   L:  - emu10k1/io.c: snd_emu10k1_sum_vol_attn
#   L:  - trident/trident_main.c: snd_trident_detach_synthesizer
#   L:  - trident/trident_memory.c: snd_trident_synth_bzero
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2004/11/29 09:15:45+01:00 perex@suse.cz 
#   [ALSA] fix display of send routing in /proc
#   
#   EMU10K1/EMU10K2 driver
#   The emu10k1's send routing is a per channel setting.  The emu10k1 has 4
#   sends per channel, the Audigy 8.  Currently we only display the first 4
#   sends for the first channel.  This patch updates the /proc file to
#   display the send routing for all 64 channels, and to display the last 4
#   sends if present.
#   
#   Signed-off-by: Lee Revell <rlrevell@joe-job.com>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/emu10k1/emuproc.c
#   2004/11/22 06:18:36+01:00 perex@suse.cz +30 -17
#   [ALSA] fix display of send routing in /proc
#   
#   D:2004/11/22 13:18:36
#   C:EMU10K1/EMU10K2 driver
#   F:pci/emu10k1/emuproc.c:1.21->1.22 
#   L:The emu10k1's send routing is a per channel setting.  The emu10k1 has 4
#   L:sends per channel, the Audigy 8.  Currently we only display the first 4
#   L:sends for the first channel.  This patch updates the /proc file to
#   L:display the send routing for all 64 channels, and to display the last 4
#   L:sends if present.
#   Signed-off-by: Lee Revell <rlrevell@joe-job.com>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2004/11/29 09:14:38+01:00 perex@suse.cz 
#   [ALSA] AD18xx/19xx resume fix
#   
#   AC97 Codec Core
#   Added resume callback so that the codec-specific resume code can be
#   called properly.  Moved AD-specific initialization code into it.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ac97/ac97_patch.c
#   2004/11/19 06:51:32+01:00 perex@suse.cz +80 -6
#   [ALSA] AD18xx/19xx resume fix
#   
#   D:2004/11/19 13:51:32
#   C:AC97 Codec Core
#   F:include/ac97_codec.h:1.56->1.57 
#   F:pci/ac97/ac97_codec.c:1.152->1.153 
#   F:pci/ac97/ac97_local.h:1.8->1.9 
#   F:pci/ac97/ac97_patch.c:1.59->1.60 
#   L:Added resume callback so that the codec-specific resume code can be
#   L:called properly.  Moved AD-specific initialization code into it.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ac97/ac97_local.h
#   2004/11/19 06:51:32+01:00 perex@suse.cz +2 -0
#   [ALSA] AD18xx/19xx resume fix
#   
#   D:2004/11/19 13:51:32
#   C:AC97 Codec Core
#   F:include/ac97_codec.h:1.56->1.57 
#   F:pci/ac97/ac97_codec.c:1.152->1.153 
#   F:pci/ac97/ac97_local.h:1.8->1.9 
#   F:pci/ac97/ac97_patch.c:1.59->1.60 
#   L:Added resume callback so that the codec-specific resume code can be
#   L:called properly.  Moved AD-specific initialization code into it.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ac97/ac97_codec.c
#   2004/11/19 06:51:32+01:00 perex@suse.cz +46 -61
#   [ALSA] AD18xx/19xx resume fix
#   
#   D:2004/11/19 13:51:32
#   C:AC97 Codec Core
#   F:include/ac97_codec.h:1.56->1.57 
#   F:pci/ac97/ac97_codec.c:1.152->1.153 
#   F:pci/ac97/ac97_local.h:1.8->1.9 
#   F:pci/ac97/ac97_patch.c:1.59->1.60 
#   L:Added resume callback so that the codec-specific resume code can be
#   L:called properly.  Moved AD-specific initialization code into it.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# include/sound/ac97_codec.h
#   2004/11/19 06:51:32+01:00 perex@suse.cz +1 -0
#   [ALSA] AD18xx/19xx resume fix
#   
#   D:2004/11/19 13:51:32
#   C:AC97 Codec Core
#   F:include/ac97_codec.h:1.56->1.57 
#   F:pci/ac97/ac97_codec.c:1.152->1.153 
#   F:pci/ac97/ac97_local.h:1.8->1.9 
#   F:pci/ac97/ac97_patch.c:1.59->1.60 
#   L:Added resume callback so that the codec-specific resume code can be
#   L:called properly.  Moved AD-specific initialization code into it.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2004/11/29 09:13:36+01:00 perex@suse.cz 
#   [ALSA] sort DXS whitelist
#   
#   VIA82xx driver
#   DXS whitelist entries are sorted.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/via82xx.c
#   2004/11/18 12:46:26+01:00 perex@suse.cz +4 -4
#   [ALSA] sort DXS whitelist
#   
#   D:2004/11/18 19:46:26
#   C:VIA82xx driver
#   F:pci/via82xx.c:1.129->1.130 
#   L:DXS whitelist entries are sorted.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2004/11/29 09:12:32+01:00 perex@suse.cz 
#   [ALSA] via82xx: Enable DXS on ABIT KV8 Pro
#   
#   VIA82xx driver
#   From Marko Kreen <marko@l-t.ee>:
#   
#   Enable DXS for via audio chip on ABIT KV8 Pro.
#   
#   Works for me.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/via82xx.c
#   2004/11/18 12:43:16+01:00 perex@suse.cz +1 -0
#   [ALSA] via82xx: Enable DXS on ABIT KV8 Pro
#   
#   D:2004/11/18 19:43:16
#   C:VIA82xx driver
#   F:pci/via82xx.c:1.128->1.129 
#   L:From Marko Kreen <marko@l-t.ee>:
#   L:
#   L:Enable DXS for via audio chip on ABIT KV8 Pro.
#   L:
#   L:Works for me.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2004/11/29 09:11:28+01:00 perex@suse.cz 
#   [ALSA] Addition of pci_disable_device() and cleanup
#   
#   Documentation
#   Added pci_disable_device() in the removal and error paths.
#   Replaced with C-style comments in many places.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
#   2004/11/18 09:34:15+01:00 perex@suse.cz +88 -66
#   [ALSA] Addition of pci_disable_device() and cleanup
#   
#   D:2004/11/18 16:34:15
#   C:Documentation
#   F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.43->1.44 
#   L:Added pci_disable_device() in the removal and error paths.
#   L:Replaced with C-style comments in many places.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2004/11/29 09:10:14+01:00 perex@suse.cz 
#   [ALSA] Add pci_disable_device() to removal and error paths
#   
#   ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver
#   BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver
#   ES1938 driver,ES1968 driver,FM801 driver,Intel8x0 driver
#   Intel8x0-modem driver,Maestro3 driver,RME32 driver,RME96 driver
#   SonicVibes driver,VIA82xx driver,ALI5451 driver,CS46xx driver
#   EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver
#   MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver
#   Trident driver,Digigram VX222 driver,YMFPCI driver
#   pci_disable_device() is called properly in the removal and error
#   paths.  Also, the pci_set_master() is added to the resume callbacks if
#   missing (just to be sure).
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ymfpci/ymfpci_main.c
#   2004/11/18 07:52:54+01:00 perex@suse.cz +5 -1
#   [ALSA] Add pci_disable_device() to removal and error paths
#   
#   D:2004/11/18 14:52:49
#   C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver
#   C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver
#   C:ES1938 driver,ES1968 driver,FM801 driver,Intel8x0 driver
#   C:Intel8x0-modem driver,Maestro3 driver,RME32 driver,RME96 driver
#   C:SonicVibes driver,VIA82xx driver,ALI5451 driver,CS46xx driver
#   C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver
#   C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver
#   C:Trident driver,Digigram VX222 driver,YMFPCI driver
#   F:pci/als4000.c:1.38->1.39 
#   F:pci/atiixp.c:1.25->1.26 
#   F:pci/atiixp_modem.c:1.9->1.10 
#   F:pci/azt3328.c:1.20->1.21 
#   F:pci/bt87x.c:1.17->1.18 
#   F:pci/cmipci.c:1.74->1.75 
#   F:pci/cs4281.c:1.66->1.67 
#   F:pci/ens1370.c:1.70->1.71 
#   F:pci/es1938.c:1.42->1.43 
#   F:pci/es1968.c:1.78->1.79 
#   F:pci/fm801.c:1.53->1.54 
#   F:pci/intel8x0.c:1.178->1.179 
#   F:pci/intel8x0m.c:1.22->1.23 
#   F:pci/maestro3.c:1.63->1.64 
#   F:pci/rme32.c:1.49->1.50 
#   F:pci/rme96.c:1.46->1.47 
#   F:pci/sonicvibes.c:1.42->1.43 
#   F:pci/via82xx.c:1.127->1.128 
#   F:pci/ali5451/ali5451.c:1.57->1.58 
#   F:pci/cs46xx/cs46xx_lib.c:1.87->1.88 
#   F:pci/emu10k1/emu10k1_main.c:1.38->1.39 
#   F:pci/ice1712/ice1712.c:1.63->1.64 
#   F:pci/ice1712/ice1724.c:1.47->1.48 
#   F:pci/korg1212/korg1212.c:1.50->1.51 
#   F:pci/mixart/mixart.c:1.20->1.21 
#   F:pci/nm256/nm256.c:1.54->1.55 
#   F:pci/rme9652/hdsp.c:1.74->1.75 
#   F:pci/rme9652/rme9652.c:1.54->1.55 
#   F:pci/trident/trident_main.c:1.64->1.65 
#   F:pci/vx222/vx222.c:1.10->1.11 
#   F:pci/ymfpci/ymfpci_main.c:1.58->1.59 
#   L:pci_disable_device() is called properly in the removal and error
#   L:paths.  Also, the pci_set_master() is added to the resume callbacks if
#   L:missing (just to be sure).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/vx222/vx222.c
#   2004/11/18 07:52:53+01:00 perex@suse.cz +4 -1
#   [ALSA] Add pci_disable_device() to removal and error paths
#   
#   D:2004/11/18 14:52:49
#   C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver
#   C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver
#   C:ES1938 driver,ES1968 driver,FM801 driver,Intel8x0 driver
#   C:Intel8x0-modem driver,Maestro3 driver,RME32 driver,RME96 driver
#   C:SonicVibes driver,VIA82xx driver,ALI5451 driver,CS46xx driver
#   C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver
#   C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver
#   C:Trident driver,Digigram VX222 driver,YMFPCI driver
#   F:pci/als4000.c:1.38->1.39 
#   F:pci/atiixp.c:1.25->1.26 
#   F:pci/atiixp_modem.c:1.9->1.10 
#   F:pci/azt3328.c:1.20->1.21 
#   F:pci/bt87x.c:1.17->1.18 
#   F:pci/cmipci.c:1.74->1.75 
#   F:pci/cs4281.c:1.66->1.67 
#   F:pci/ens1370.c:1.70->1.71 
#   F:pci/es1938.c:1.42->1.43 
#   F:pci/es1968.c:1.78->1.79 
#   F:pci/fm801.c:1.53->1.54 
#   F:pci/intel8x0.c:1.178->1.179 
#   F:pci/intel8x0m.c:1.22->1.23 
#   F:pci/maestro3.c:1.63->1.64 
#   F:pci/rme32.c:1.49->1.50 
#   F:pci/rme96.c:1.46->1.47 
#   F:pci/sonicvibes.c:1.42->1.43 
#   F:pci/via82xx.c:1.127->1.128 
#   F:pci/ali5451/ali5451.c:1.57->1.58 
#   F:pci/cs46xx/cs46xx_lib.c:1.87->1.88 
#   F:pci/emu10k1/emu10k1_main.c:1.38->1.39 
#   F:pci/ice1712/ice1712.c:1.63->1.64 
#   F:pci/ice1712/ice1724.c:1.47->1.48 
#   F:pci/korg1212/korg1212.c:1.50->1.51 
#   F:pci/mixart/mixart.c:1.20->1.21 
#   F:pci/nm256/nm256.c:1.54->1.55 
#   F:pci/rme9652/hdsp.c:1.74->1.75 
#   F:pci/rme9652/rme9652.c:1.54->1.55 
#   F:pci/trident/trident_main.c:1.64->1.65 
#   F:pci/vx222/vx222.c:1.10->1.11 
#   F:pci/ymfpci/ymfpci_main.c:1.58->1.59 
#   L:pci_disable_device() is called properly in the removal and error
#   L:paths.  Also, the pci_set_master() is added to the resume callbacks if
#   L:missing (just to be sure).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/via82xx.c
#   2004/11/18 07:52:51+01:00 perex@suse.cz +5 -1
#   [ALSA] Add pci_disable_device() to removal and error paths
#   
#   D:2004/11/18 14:52:49
#   C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver
#   C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver
#   C:ES1938 driver,ES1968 driver,FM801 driver,Intel8x0 driver
#   C:Intel8x0-modem driver,Maestro3 driver,RME32 driver,RME96 driver
#   C:SonicVibes driver,VIA82xx driver,ALI5451 driver,CS46xx driver
#   C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver
#   C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver
#   C:Trident driver,Digigram VX222 driver,YMFPCI driver
#   F:pci/als4000.c:1.38->1.39 
#   F:pci/atiixp.c:1.25->1.26 
#   F:pci/atiixp_modem.c:1.9->1.10 
#   F:pci/azt3328.c:1.20->1.21 
#   F:pci/bt87x.c:1.17->1.18 
#   F:pci/cmipci.c:1.74->1.75 
#   F:pci/cs4281.c:1.66->1.67 
#   F:pci/ens1370.c:1.70->1.71 
#   F:pci/es1938.c:1.42->1.43 
#   F:pci/es1968.c:1.78->1.79 
#   F:pci/fm801.c:1.53->1.54 
#   F:pci/intel8x0.c:1.178->1.179 
#   F:pci/intel8x0m.c:1.22->1.23 
#   F:pci/maestro3.c:1.63->1.64 
#   F:pci/rme32.c:1.49->1.50 
#   F:pci/rme96.c:1.46->1.47 
#   F:pci/sonicvibes.c:1.42->1.43 
#   F:pci/via82xx.c:1.127->1.128 
#   F:pci/ali5451/ali5451.c:1.57->1.58 
#   F:pci/cs46xx/cs46xx_lib.c:1.87->1.88 
#   F:pci/emu10k1/emu10k1_main.c:1.38->1.39 
#   F:pci/ice1712/ice1712.c:1.63->1.64 
#   F:pci/ice1712/ice1724.c:1.47->1.48 
#   F:pci/korg1212/korg1212.c:1.50->1.51 
#   F:pci/mixart/mixart.c:1.20->1.21 
#   F:pci/nm256/nm256.c:1.54->1.55 
#   F:pci/rme9652/hdsp.c:1.74->1.75 
#   F:pci/rme9652/rme9652.c:1.54->1.55 
#   F:pci/trident/trident_main.c:1.64->1.65 
#   F:pci/vx222/vx222.c:1.10->1.11 
#   F:pci/ymfpci/ymfpci_main.c:1.58->1.59 
#   L:pci_disable_device() is called properly in the removal and error
#   L:paths.  Also, the pci_set_master() is added to the resume callbacks if
#   L:missing (just to be sure).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/trident/trident_main.c
#   2004/11/18 07:52:53+01:00 perex@suse.cz +7 -1
#   [ALSA] Add pci_disable_device() to removal and error paths
#   
#   D:2004/11/18 14:52:49
#   C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver
#   C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver
#   C:ES1938 driver,ES1968 driver,FM801 driver,Intel8x0 driver
#   C:Intel8x0-modem driver,Maestro3 driver,RME32 driver,RME96 driver
#   C:SonicVibes driver,VIA82xx driver,ALI5451 driver,CS46xx driver
#   C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver
#   C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver
#   C:Trident driver,Digigram VX222 driver,YMFPCI driver
#   F:pci/als4000.c:1.38->1.39 
#   F:pci/atiixp.c:1.25->1.26 
#   F:pci/atiixp_modem.c:1.9->1.10 
#   F:pci/azt3328.c:1.20->1.21 
#   F:pci/bt87x.c:1.17->1.18 
#   F:pci/cmipci.c:1.74->1.75 
#   F:pci/cs4281.c:1.66->1.67 
#   F:pci/ens1370.c:1.70->1.71 
#   F:pci/es1938.c:1.42->1.43 
#   F:pci/es1968.c:1.78->1.79 
#   F:pci/fm801.c:1.53->1.54 
#   F:pci/intel8x0.c:1.178->1.179 
#   F:pci/intel8x0m.c:1.22->1.23 
#   F:pci/maestro3.c:1.63->1.64 
#   F:pci/rme32.c:1.49->1.50 
#   F:pci/rme96.c:1.46->1.47 
#   F:pci/sonicvibes.c:1.42->1.43 
#   F:pci/via82xx.c:1.127->1.128 
#   F:pci/ali5451/ali5451.c:1.57->1.58 
#   F:pci/cs46xx/cs46xx_lib.c:1.87->1.88 
#   F:pci/emu10k1/emu10k1_main.c:1.38->1.39 
#   F:pci/ice1712/ice1712.c:1.63->1.64 
#   F:pci/ice1712/ice1724.c:1.47->1.48 
#   F:pci/korg1212/korg1212.c:1.50->1.51 
#   F:pci/mixart/mixart.c:1.20->1.21 
#   F:pci/nm256/nm256.c:1.54->1.55 
#   F:pci/rme9652/hdsp.c:1.74->1.75 
#   F:pci/rme9652/rme9652.c:1.54->1.55 
#   F:pci/trident/trident_main.c:1.64->1.65 
#   F:pci/vx222/vx222.c:1.10->1.11 
#   F:pci/ymfpci/ymfpci_main.c:1.58->1.59 
#   L:pci_disable_device() is called properly in the removal and error
#   L:paths.  Also, the pci_set_master() is added to the resume callbacks if
#   L:missing (just to be sure).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/sonicvibes.c
#   2004/11/18 07:52:51+01:00 perex@suse.cz +6 -1
#   [ALSA] Add pci_disable_device() to removal and error paths
#   
#   D:2004/11/18 14:52:49
#   C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver
#   C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver
#   C:ES1938 driver,ES1968 driver,FM801 driver,Intel8x0 driver
#   C:Intel8x0-modem driver,Maestro3 driver,RME32 driver,RME96 driver
#   C:SonicVibes driver,VIA82xx driver,ALI5451 driver,CS46xx driver
#   C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver
#   C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver
#   C:Trident driver,Digigram VX222 driver,YMFPCI driver
#   F:pci/als4000.c:1.38->1.39 
#   F:pci/atiixp.c:1.25->1.26 
#   F:pci/atiixp_modem.c:1.9->1.10 
#   F:pci/azt3328.c:1.20->1.21 
#   F:pci/bt87x.c:1.17->1.18 
#   F:pci/cmipci.c:1.74->1.75 
#   F:pci/cs4281.c:1.66->1.67 
#   F:pci/ens1370.c:1.70->1.71 
#   F:pci/es1938.c:1.42->1.43 
#   F:pci/es1968.c:1.78->1.79 
#   F:pci/fm801.c:1.53->1.54 
#   F:pci/intel8x0.c:1.178->1.179 
#   F:pci/intel8x0m.c:1.22->1.23 
#   F:pci/maestro3.c:1.63->1.64 
#   F:pci/rme32.c:1.49->1.50 
#   F:pci/rme96.c:1.46->1.47 
#   F:pci/sonicvibes.c:1.42->1.43 
#   F:pci/via82xx.c:1.127->1.128 
#   F:pci/ali5451/ali5451.c:1.57->1.58 
#   F:pci/cs46xx/cs46xx_lib.c:1.87->1.88 
#   F:pci/emu10k1/emu10k1_main.c:1.38->1.39 
#   F:pci/ice1712/ice1712.c:1.63->1.64 
#   F:pci/ice1712/ice1724.c:1.47->1.48 
#   F:pci/korg1212/korg1212.c:1.50->1.51 
#   F:pci/mixart/mixart.c:1.20->1.21 
#   F:pci/nm256/nm256.c:1.54->1.55 
#   F:pci/rme9652/hdsp.c:1.74->1.75 
#   F:pci/rme9652/rme9652.c:1.54->1.55 
#   F:pci/trident/trident_main.c:1.64->1.65 
#   F:pci/vx222/vx222.c:1.10->1.11 
#   F:pci/ymfpci/ymfpci_main.c:1.58->1.59 
#   L:pci_disable_device() is called properly in the removal and error
#   L:paths.  Also, the pci_set_master() is added to the resume callbacks if
#   L:missing (just to be sure).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/rme9652/rme9652.c
#   2004/11/18 07:52:53+01:00 perex@suse.cz +1 -0
#   [ALSA] Add pci_disable_device() to removal and error paths
#   
#   D:2004/11/18 14:52:49
#   C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver
#   C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver
#   C:ES1938 driver,ES1968 driver,FM801 driver,Intel8x0 driver
#   C:Intel8x0-modem driver,Maestro3 driver,RME32 driver,RME96 driver
#   C:SonicVibes driver,VIA82xx driver,ALI5451 driver,CS46xx driver
#   C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver
#   C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver
#   C:Trident driver,Digigram VX222 driver,YMFPCI driver
#   F:pci/als4000.c:1.38->1.39 
#   F:pci/atiixp.c:1.25->1.26 
#   F:pci/atiixp_modem.c:1.9->1.10 
#   F:pci/azt3328.c:1.20->1.21 
#   F:pci/bt87x.c:1.17->1.18 
#   F:pci/cmipci.c:1.74->1.75 
#   F:pci/cs4281.c:1.66->1.67 
#   F:pci/ens1370.c:1.70->1.71 
#   F:pci/es1938.c:1.42->1.43 
#   F:pci/es1968.c:1.78->1.79 
#   F:pci/fm801.c:1.53->1.54 
#   F:pci/intel8x0.c:1.178->1.179 
#   F:pci/intel8x0m.c:1.22->1.23 
#   F:pci/maestro3.c:1.63->1.64 
#   F:pci/rme32.c:1.49->1.50 
#   F:pci/rme96.c:1.46->1.47 
#   F:pci/sonicvibes.c:1.42->1.43 
#   F:pci/via82xx.c:1.127->1.128 
#   F:pci/ali5451/ali5451.c:1.57->1.58 
#   F:pci/cs46xx/cs46xx_lib.c:1.87->1.88 
#   F:pci/emu10k1/emu10k1_main.c:1.38->1.39 
#   F:pci/ice1712/ice1712.c:1.63->1.64 
#   F:pci/ice1712/ice1724.c:1.47->1.48 
#   F:pci/korg1212/korg1212.c:1.50->1.51 
#   F:pci/mixart/mixart.c:1.20->1.21 
#   F:pci/nm256/nm256.c:1.54->1.55 
#   F:pci/rme9652/hdsp.c:1.74->1.75 
#   F:pci/rme9652/rme9652.c:1.54->1.55 
#   F:pci/trident/trident_main.c:1.64->1.65 
#   F:pci/vx222/vx222.c:1.10->1.11 
#   F:pci/ymfpci/ymfpci_main.c:1.58->1.59 
#   L:pci_disable_device() is called properly in the removal and error
#   L:paths.  Also, the pci_set_master() is added to the resume callbacks if
#   L:missing (just to be sure).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/rme9652/hdsp.c
#   2004/11/18 07:52:53+01:00 perex@suse.cz +1 -0
#   [ALSA] Add pci_disable_device() to removal and error paths
#   
#   D:2004/11/18 14:52:49
#   C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver
#   C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver
#   C:ES1938 driver,ES1968 driver,FM801 driver,Intel8x0 driver
#   C:Intel8x0-modem driver,Maestro3 driver,RME32 driver,RME96 driver
#   C:SonicVibes driver,VIA82xx driver,ALI5451 driver,CS46xx driver
#   C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver
#   C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver
#   C:Trident driver,Digigram VX222 driver,YMFPCI driver
#   F:pci/als4000.c:1.38->1.39 
#   F:pci/atiixp.c:1.25->1.26 
#   F:pci/atiixp_modem.c:1.9->1.10 
#   F:pci/azt3328.c:1.20->1.21 
#   F:pci/bt87x.c:1.17->1.18 
#   F:pci/cmipci.c:1.74->1.75 
#   F:pci/cs4281.c:1.66->1.67 
#   F:pci/ens1370.c:1.70->1.71 
#   F:pci/es1938.c:1.42->1.43 
#   F:pci/es1968.c:1.78->1.79 
#   F:pci/fm801.c:1.53->1.54 
#   F:pci/intel8x0.c:1.178->1.179 
#   F:pci/intel8x0m.c:1.22->1.23 
#   F:pci/maestro3.c:1.63->1.64 
#   F:pci/rme32.c:1.49->1.50 
#   F:pci/rme96.c:1.46->1.47 
#   F:pci/sonicvibes.c:1.42->1.43 
#   F:pci/via82xx.c:1.127->1.128 
#   F:pci/ali5451/ali5451.c:1.57->1.58 
#   F:pci/cs46xx/cs46xx_lib.c:1.87->1.88 
#   F:pci/emu10k1/emu10k1_main.c:1.38->1.39 
#   F:pci/ice1712/ice1712.c:1.63->1.64 
#   F:pci/ice1712/ice1724.c:1.47->1.48 
#   F:pci/korg1212/korg1212.c:1.50->1.51 
#   F:pci/mixart/mixart.c:1.20->1.21 
#   F:pci/nm256/nm256.c:1.54->1.55 
#   F:pci/rme9652/hdsp.c:1.74->1.75 
#   F:pci/rme9652/rme9652.c:1.54->1.55 
#   F:pci/trident/trident_main.c:1.64->1.65 
#   F:pci/vx222/vx222.c:1.10->1.11 
#   F:pci/ymfpci/ymfpci_main.c:1.58->1.59 
#   L:pci_disable_device() is called properly in the removal and error
#   L:paths.  Also, the pci_set_master() is added to the resume callbacks if
#   L:missing (just to be sure).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/rme96.c
#   2004/11/18 07:52:50+01:00 perex@suse.cz +1 -0
#   [ALSA] Add pci_disable_device() to removal and error paths
#   
#   D:2004/11/18 14:52:49
#   C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver
#   C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver
#   C:ES1938 driver,ES1968 driver,FM801 driver,Intel8x0 driver
#   C:Intel8x0-modem driver,Maestro3 driver,RME32 driver,RME96 driver
#   C:SonicVibes driver,VIA82xx driver,ALI5451 driver,CS46xx driver
#   C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver
#   C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver
#   C:Trident driver,Digigram VX222 driver,YMFPCI driver
#   F:pci/als4000.c:1.38->1.39 
#   F:pci/atiixp.c:1.25->1.26 
#   F:pci/atiixp_modem.c:1.9->1.10 
#   F:pci/azt3328.c:1.20->1.21 
#   F:pci/bt87x.c:1.17->1.18 
#   F:pci/cmipci.c:1.74->1.75 
#   F:pci/cs4281.c:1.66->1.67 
#   F:pci/ens1370.c:1.70->1.71 
#   F:pci/es1938.c:1.42->1.43 
#   F:pci/es1968.c:1.78->1.79 
#   F:pci/fm801.c:1.53->1.54 
#   F:pci/intel8x0.c:1.178->1.179 
#   F:pci/intel8x0m.c:1.22->1.23 
#   F:pci/maestro3.c:1.63->1.64 
#   F:pci/rme32.c:1.49->1.50 
#   F:pci/rme96.c:1.46->1.47 
#   F:pci/sonicvibes.c:1.42->1.43 
#   F:pci/via82xx.c:1.127->1.128 
#   F:pci/ali5451/ali5451.c:1.57->1.58 
#   F:pci/cs46xx/cs46xx_lib.c:1.87->1.88 
#   F:pci/emu10k1/emu10k1_main.c:1.38->1.39 
#   F:pci/ice1712/ice1712.c:1.63->1.64 
#   F:pci/ice1712/ice1724.c:1.47->1.48 
#   F:pci/korg1212/korg1212.c:1.50->1.51 
#   F:pci/mixart/mixart.c:1.20->1.21 
#   F:pci/nm256/nm256.c:1.54->1.55 
#   F:pci/rme9652/hdsp.c:1.74->1.75 
#   F:pci/rme9652/rme9652.c:1.54->1.55 
#   F:pci/trident/trident_main.c:1.64->1.65 
#   F:pci/vx222/vx222.c:1.10->1.11 
#   F:pci/ymfpci/ymfpci_main.c:1.58->1.59 
#   L:pci_disable_device() is called properly in the removal and error
#   L:paths.  Also, the pci_set_master() is added to the resume callbacks if
#   L:missing (just to be sure).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/rme32.c
#   2004/11/18 07:52:50+01:00 perex@suse.cz +1 -0
#   [ALSA] Add pci_disable_device() to removal and error paths
#   
#   D:2004/11/18 14:52:49
#   C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver
#   C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver
#   C:ES1938 driver,ES1968 driver,FM801 driver,Intel8x0 driver
#   C:Intel8x0-modem driver,Maestro3 driver,RME32 driver,RME96 driver
#   C:SonicVibes driver,VIA82xx driver,ALI5451 driver,CS46xx driver
#   C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver
#   C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver
#   C:Trident driver,Digigram VX222 driver,YMFPCI driver
#   F:pci/als4000.c:1.38->1.39 
#   F:pci/atiixp.c:1.25->1.26 
#   F:pci/atiixp_modem.c:1.9->1.10 
#   F:pci/azt3328.c:1.20->1.21 
#   F:pci/bt87x.c:1.17->1.18 
#   F:pci/cmipci.c:1.74->1.75 
#   F:pci/cs4281.c:1.66->1.67 
#   F:pci/ens1370.c:1.70->1.71 
#   F:pci/es1938.c:1.42->1.43 
#   F:pci/es1968.c:1.78->1.79 
#   F:pci/fm801.c:1.53->1.54 
#   F:pci/intel8x0.c:1.178->1.179 
#   F:pci/intel8x0m.c:1.22->1.23 
#   F:pci/maestro3.c:1.63->1.64 
#   F:pci/rme32.c:1.49->1.50 
#   F:pci/rme96.c:1.46->1.47 
#   F:pci/sonicvibes.c:1.42->1.43 
#   F:pci/via82xx.c:1.127->1.128 
#   F:pci/ali5451/ali5451.c:1.57->1.58 
#   F:pci/cs46xx/cs46xx_lib.c:1.87->1.88 
#   F:pci/emu10k1/emu10k1_main.c:1.38->1.39 
#   F:pci/ice1712/ice1712.c:1.63->1.64 
#   F:pci/ice1712/ice1724.c:1.47->1.48 
#   F:pci/korg1212/korg1212.c:1.50->1.51 
#   F:pci/mixart/mixart.c:1.20->1.21 
#   F:pci/nm256/nm256.c:1.54->1.55 
#   F:pci/rme9652/hdsp.c:1.74->1.75 
#   F:pci/rme9652/rme9652.c:1.54->1.55 
#   F:pci/trident/trident_main.c:1.64->1.65 
#   F:pci/vx222/vx222.c:1.10->1.11 
#   F:pci/ymfpci/ymfpci_main.c:1.58->1.59 
#   L:pci_disable_device() is called properly in the removal and error
#   L:paths.  Also, the pci_set_master() is added to the resume callbacks if
#   L:missing (just to be sure).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/nm256/nm256.c
#   2004/11/18 07:52:52+01:00 perex@suse.cz +8 -4
#   [ALSA] Add pci_disable_device() to removal and error paths
#   
#   D:2004/11/18 14:52:49
#   C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver
#   C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver
#   C:ES1938 driver,ES1968 driver,FM801 driver,Intel8x0 driver
#   C:Intel8x0-modem driver,Maestro3 driver,RME32 driver,RME96 driver
#   C:SonicVibes driver,VIA82xx driver,ALI5451 driver,CS46xx driver
#   C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver
#   C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver
#   C:Trident driver,Digigram VX222 driver,YMFPCI driver
#   F:pci/als4000.c:1.38->1.39 
#   F:pci/atiixp.c:1.25->1.26 
#   F:pci/atiixp_modem.c:1.9->1.10 
#   F:pci/azt3328.c:1.20->1.21 
#   F:pci/bt87x.c:1.17->1.18 
#   F:pci/cmipci.c:1.74->1.75 
#   F:pci/cs4281.c:1.66->1.67 
#   F:pci/ens1370.c:1.70->1.71 
#   F:pci/es1938.c:1.42->1.43 
#   F:pci/es1968.c:1.78->1.79 
#   F:pci/fm801.c:1.53->1.54 
#   F:pci/intel8x0.c:1.178->1.179 
#   F:pci/intel8x0m.c:1.22->1.23 
#   F:pci/maestro3.c:1.63->1.64 
#   F:pci/rme32.c:1.49->1.50 
#   F:pci/rme96.c:1.46->1.47 
#   F:pci/sonicvibes.c:1.42->1.43 
#   F:pci/via82xx.c:1.127->1.128 
#   F:pci/ali5451/ali5451.c:1.57->1.58 
#   F:pci/cs46xx/cs46xx_lib.c:1.87->1.88 
#   F:pci/emu10k1/emu10k1_main.c:1.38->1.39 
#   F:pci/ice1712/ice1712.c:1.63->1.64 
#   F:pci/ice1712/ice1724.c:1.47->1.48 
#   F:pci/korg1212/korg1212.c:1.50->1.51 
#   F:pci/mixart/mixart.c:1.20->1.21 
#   F:pci/nm256/nm256.c:1.54->1.55 
#   F:pci/rme9652/hdsp.c:1.74->1.75 
#   F:pci/rme9652/rme9652.c:1.54->1.55 
#   F:pci/trident/trident_main.c:1.64->1.65 
#   F:pci/vx222/vx222.c:1.10->1.11 
#   F:pci/ymfpci/ymfpci_main.c:1.58->1.59 
#   L:pci_disable_device() is called properly in the removal and error
#   L:paths.  Also, the pci_set_master() is added to the resume callbacks if
#   L:missing (just to be sure).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/mixart/mixart.c
#   2004/11/18 07:52:52+01:00 perex@suse.cz +6 -1
#   [ALSA] Add pci_disable_device() to removal and error paths
#   
#   D:2004/11/18 14:52:49
#   C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver
#   C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver
#   C:ES1938 driver,ES1968 driver,FM801 driver,Intel8x0 driver
#   C:Intel8x0-modem driver,Maestro3 driver,RME32 driver,RME96 driver
#   C:SonicVibes driver,VIA82xx driver,ALI5451 driver,CS46xx driver
#   C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver
#   C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver
#   C:Trident driver,Digigram VX222 driver,YMFPCI driver
#   F:pci/als4000.c:1.38->1.39 
#   F:pci/atiixp.c:1.25->1.26 
#   F:pci/atiixp_modem.c:1.9->1.10 
#   F:pci/azt3328.c:1.20->1.21 
#   F:pci/bt87x.c:1.17->1.18 
#   F:pci/cmipci.c:1.74->1.75 
#   F:pci/cs4281.c:1.66->1.67 
#   F:pci/ens1370.c:1.70->1.71 
#   F:pci/es1938.c:1.42->1.43 
#   F:pci/es1968.c:1.78->1.79 
#   F:pci/fm801.c:1.53->1.54 
#   F:pci/intel8x0.c:1.178->1.179 
#   F:pci/intel8x0m.c:1.22->1.23 
#   F:pci/maestro3.c:1.63->1.64 
#   F:pci/rme32.c:1.49->1.50 
#   F:pci/rme96.c:1.46->1.47 
#   F:pci/sonicvibes.c:1.42->1.43 
#   F:pci/via82xx.c:1.127->1.128 
#   F:pci/ali5451/ali5451.c:1.57->1.58 
#   F:pci/cs46xx/cs46xx_lib.c:1.87->1.88 
#   F:pci/emu10k1/emu10k1_main.c:1.38->1.39 
#   F:pci/ice1712/ice1712.c:1.63->1.64 
#   F:pci/ice1712/ice1724.c:1.47->1.48 
#   F:pci/korg1212/korg1212.c:1.50->1.51 
#   F:pci/mixart/mixart.c:1.20->1.21 
#   F:pci/nm256/nm256.c:1.54->1.55 
#   F:pci/rme9652/hdsp.c:1.74->1.75 
#   F:pci/rme9652/rme9652.c:1.54->1.55 
#   F:pci/trident/trident_main.c:1.64->1.65 
#   F:pci/vx222/vx222.c:1.10->1.11 
#   F:pci/ymfpci/ymfpci_main.c:1.58->1.59 
#   L:pci_disable_device() is called properly in the removal and error
#   L:paths.  Also, the pci_set_master() is added to the resume callbacks if
#   L:missing (just to be sure).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/maestro3.c
#   2004/11/18 07:52:50+01:00 perex@suse.cz +9 -1
#   [ALSA] Add pci_disable_device() to removal and error paths
#   
#   D:2004/11/18 14:52:49
#   C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver
#   C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver
#   C:ES1938 driver,ES1968 driver,FM801 driver,Intel8x0 driver
#   C:Intel8x0-modem driver,Maestro3 driver,RME32 driver,RME96 driver
#   C:SonicVibes driver,VIA82xx driver,ALI5451 driver,CS46xx driver
#   C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver
#   C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver
#   C:Trident driver,Digigram VX222 driver,YMFPCI driver
#   F:pci/als4000.c:1.38->1.39 
#   F:pci/atiixp.c:1.25->1.26 
#   F:pci/atiixp_modem.c:1.9->1.10 
#   F:pci/azt3328.c:1.20->1.21 
#   F:pci/bt87x.c:1.17->1.18 
#   F:pci/cmipci.c:1.74->1.75 
#   F:pci/cs4281.c:1.66->1.67 
#   F:pci/ens1370.c:1.70->1.71 
#   F:pci/es1938.c:1.42->1.43 
#   F:pci/es1968.c:1.78->1.79 
#   F:pci/fm801.c:1.53->1.54 
#   F:pci/intel8x0.c:1.178->1.179 
#   F:pci/intel8x0m.c:1.22->1.23 
#   F:pci/maestro3.c:1.63->1.64 
#   F:pci/rme32.c:1.49->1.50 
#   F:pci/rme96.c:1.46->1.47 
#   F:pci/sonicvibes.c:1.42->1.43 
#   F:pci/via82xx.c:1.127->1.128 
#   F:pci/ali5451/ali5451.c:1.57->1.58 
#   F:pci/cs46xx/cs46xx_lib.c:1.87->1.88 
#   F:pci/emu10k1/emu10k1_main.c:1.38->1.39 
#   F:pci/ice1712/ice1712.c:1.63->1.64 
#   F:pci/ice1712/ice1724.c:1.47->1.48 
#   F:pci/korg1212/korg1212.c:1.50->1.51 
#   F:pci/mixart/mixart.c:1.20->1.21 
#   F:pci/nm256/nm256.c:1.54->1.55 
#   F:pci/rme9652/hdsp.c:1.74->1.75 
#   F:pci/rme9652/rme9652.c:1.54->1.55 
#   F:pci/trident/trident_main.c:1.64->1.65 
#   F:pci/vx222/vx222.c:1.10->1.11 
#   F:pci/ymfpci/ymfpci_main.c:1.58->1.59 
#   L:pci_disable_device() is called properly in the removal and error
#   L:paths.  Also, the pci_set_master() is added to the resume callbacks if
#   L:missing (just to be sure).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/korg1212/korg1212.c
#   2004/11/18 07:52:52+01:00 perex@suse.cz +20 -4
#   [ALSA] Add pci_disable_device() to removal and error paths
#   
#   D:2004/11/18 14:52:49
#   C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver
#   C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver
#   C:ES1938 driver,ES1968 driver,FM801 driver,Intel8x0 driver
#   C:Intel8x0-modem driver,Maestro3 driver,RME32 driver,RME96 driver
#   C:SonicVibes driver,VIA82xx driver,ALI5451 driver,CS46xx driver
#   C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver
#   C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver
#   C:Trident driver,Digigram VX222 driver,YMFPCI driver
#   F:pci/als4000.c:1.38->1.39 
#   F:pci/atiixp.c:1.25->1.26 
#   F:pci/atiixp_modem.c:1.9->1.10 
#   F:pci/azt3328.c:1.20->1.21 
#   F:pci/bt87x.c:1.17->1.18 
#   F:pci/cmipci.c:1.74->1.75 
#   F:pci/cs4281.c:1.66->1.67 
#   F:pci/ens1370.c:1.70->1.71 
#   F:pci/es1938.c:1.42->1.43 
#   F:pci/es1968.c:1.78->1.79 
#   F:pci/fm801.c:1.53->1.54 
#   F:pci/intel8x0.c:1.178->1.179 
#   F:pci/intel8x0m.c:1.22->1.23 
#   F:pci/maestro3.c:1.63->1.64 
#   F:pci/rme32.c:1.49->1.50 
#   F:pci/rme96.c:1.46->1.47 
#   F:pci/sonicvibes.c:1.42->1.43 
#   F:pci/via82xx.c:1.127->1.128 
#   F:pci/ali5451/ali5451.c:1.57->1.58 
#   F:pci/cs46xx/cs46xx_lib.c:1.87->1.88 
#   F:pci/emu10k1/emu10k1_main.c:1.38->1.39 
#   F:pci/ice1712/ice1712.c:1.63->1.64 
#   F:pci/ice1712/ice1724.c:1.47->1.48 
#   F:pci/korg1212/korg1212.c:1.50->1.51 
#   F:pci/mixart/mixart.c:1.20->1.21 
#   F:pci/nm256/nm256.c:1.54->1.55 
#   F:pci/rme9652/hdsp.c:1.74->1.75 
#   F:pci/rme9652/rme9652.c:1.54->1.55 
#   F:pci/trident/trident_main.c:1.64->1.65 
#   F:pci/vx222/vx222.c:1.10->1.11 
#   F:pci/ymfpci/ymfpci_main.c:1.58->1.59 
#   L:pci_disable_device() is called properly in the removal and error
#   L:paths.  Also, the pci_set_master() is added to the resume callbacks if
#   L:missing (just to be sure).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/intel8x0m.c
#   2004/11/18 07:52:50+01:00 perex@suse.cz +6 -1
#   [ALSA] Add pci_disable_device() to removal and error paths
#   
#   D:2004/11/18 14:52:49
#   C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver
#   C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver
#   C:ES1938 driver,ES1968 driver,FM801 driver,Intel8x0 driver
#   C:Intel8x0-modem driver,Maestro3 driver,RME32 driver,RME96 driver
#   C:SonicVibes driver,VIA82xx driver,ALI5451 driver,CS46xx driver
#   C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver
#   C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver
#   C:Trident driver,Digigram VX222 driver,YMFPCI driver
#   F:pci/als4000.c:1.38->1.39 
#   F:pci/atiixp.c:1.25->1.26 
#   F:pci/atiixp_modem.c:1.9->1.10 
#   F:pci/azt3328.c:1.20->1.21 
#   F:pci/bt87x.c:1.17->1.18 
#   F:pci/cmipci.c:1.74->1.75 
#   F:pci/cs4281.c:1.66->1.67 
#   F:pci/ens1370.c:1.70->1.71 
#   F:pci/es1938.c:1.42->1.43 
#   F:pci/es1968.c:1.78->1.79 
#   F:pci/fm801.c:1.53->1.54 
#   F:pci/intel8x0.c:1.178->1.179 
#   F:pci/intel8x0m.c:1.22->1.23 
#   F:pci/maestro3.c:1.63->1.64 
#   F:pci/rme32.c:1.49->1.50 
#   F:pci/rme96.c:1.46->1.47 
#   F:pci/sonicvibes.c:1.42->1.43 
#   F:pci/via82xx.c:1.127->1.128 
#   F:pci/ali5451/ali5451.c:1.57->1.58 
#   F:pci/cs46xx/cs46xx_lib.c:1.87->1.88 
#   F:pci/emu10k1/emu10k1_main.c:1.38->1.39 
#   F:pci/ice1712/ice1712.c:1.63->1.64 
#   F:pci/ice1712/ice1724.c:1.47->1.48 
#   F:pci/korg1212/korg1212.c:1.50->1.51 
#   F:pci/mixart/mixart.c:1.20->1.21 
#   F:pci/nm256/nm256.c:1.54->1.55 
#   F:pci/rme9652/hdsp.c:1.74->1.75 
#   F:pci/rme9652/rme9652.c:1.54->1.55 
#   F:pci/trident/trident_main.c:1.64->1.65 
#   F:pci/vx222/vx222.c:1.10->1.11 
#   F:pci/ymfpci/ymfpci_main.c:1.58->1.59 
#   L:pci_disable_device() is called properly in the removal and error
#   L:paths.  Also, the pci_set_master() is added to the resume callbacks if
#   L:missing (just to be sure).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/intel8x0.c
#   2004/11/18 07:52:50+01:00 perex@suse.cz +6 -1
#   [ALSA] Add pci_disable_device() to removal and error paths
#   
#   D:2004/11/18 14:52:49
#   C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver
#   C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver
#   C:ES1938 driver,ES1968 driver,FM801 driver,Intel8x0 driver
#   C:Intel8x0-modem driver,Maestro3 driver,RME32 driver,RME96 driver
#   C:SonicVibes driver,VIA82xx driver,ALI5451 driver,CS46xx driver
#   C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver
#   C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver
#   C:Trident driver,Digigram VX222 driver,YMFPCI driver
#   F:pci/als4000.c:1.38->1.39 
#   F:pci/atiixp.c:1.25->1.26 
#   F:pci/atiixp_modem.c:1.9->1.10 
#   F:pci/azt3328.c:1.20->1.21 
#   F:pci/bt87x.c:1.17->1.18 
#   F:pci/cmipci.c:1.74->1.75 
#   F:pci/cs4281.c:1.66->1.67 
#   F:pci/ens1370.c:1.70->1.71 
#   F:pci/es1938.c:1.42->1.43 
#   F:pci/es1968.c:1.78->1.79 
#   F:pci/fm801.c:1.53->1.54 
#   F:pci/intel8x0.c:1.178->1.179 
#   F:pci/intel8x0m.c:1.22->1.23 
#   F:pci/maestro3.c:1.63->1.64 
#   F:pci/rme32.c:1.49->1.50 
#   F:pci/rme96.c:1.46->1.47 
#   F:pci/sonicvibes.c:1.42->1.43 
#   F:pci/via82xx.c:1.127->1.128 
#   F:pci/ali5451/ali5451.c:1.57->1.58 
#   F:pci/cs46xx/cs46xx_lib.c:1.87->1.88 
#   F:pci/emu10k1/emu10k1_main.c:1.38->1.39 
#   F:pci/ice1712/ice1712.c:1.63->1.64 
#   F:pci/ice1712/ice1724.c:1.47->1.48 
#   F:pci/korg1212/korg1212.c:1.50->1.51 
#   F:pci/mixart/mixart.c:1.20->1.21 
#   F:pci/nm256/nm256.c:1.54->1.55 
#   F:pci/rme9652/hdsp.c:1.74->1.75 
#   F:pci/rme9652/rme9652.c:1.54->1.55 
#   F:pci/trident/trident_main.c:1.64->1.65 
#   F:pci/vx222/vx222.c:1.10->1.11 
#   F:pci/ymfpci/ymfpci_main.c:1.58->1.59 
#   L:pci_disable_device() is called properly in the removal and error
#   L:paths.  Also, the pci_set_master() is added to the resume callbacks if
#   L:missing (just to be sure).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ice1712/ice1724.c
#   2004/11/18 07:52:52+01:00 perex@suse.cz +5 -1
#   [ALSA] Add pci_disable_device() to removal and error paths
#   
#   D:2004/11/18 14:52:49
#   C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver
#   C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver
#   C:ES1938 driver,ES1968 driver,FM801 driver,Intel8x0 driver
#   C:Intel8x0-modem driver,Maestro3 driver,RME32 driver,RME96 driver
#   C:SonicVibes driver,VIA82xx driver,ALI5451 driver,CS46xx driver
#   C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver
#   C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver
#   C:Trident driver,Digigram VX222 driver,YMFPCI driver
#   F:pci/als4000.c:1.38->1.39 
#   F:pci/atiixp.c:1.25->1.26 
#   F:pci/atiixp_modem.c:1.9->1.10 
#   F:pci/azt3328.c:1.20->1.21 
#   F:pci/bt87x.c:1.17->1.18 
#   F:pci/cmipci.c:1.74->1.75 
#   F:pci/cs4281.c:1.66->1.67 
#   F:pci/ens1370.c:1.70->1.71 
#   F:pci/es1938.c:1.42->1.43 
#   F:pci/es1968.c:1.78->1.79 
#   F:pci/fm801.c:1.53->1.54 
#   F:pci/intel8x0.c:1.178->1.179 
#   F:pci/intel8x0m.c:1.22->1.23 
#   F:pci/maestro3.c:1.63->1.64 
#   F:pci/rme32.c:1.49->1.50 
#   F:pci/rme96.c:1.46->1.47 
#   F:pci/sonicvibes.c:1.42->1.43 
#   F:pci/via82xx.c:1.127->1.128 
#   F:pci/ali5451/ali5451.c:1.57->1.58 
#   F:pci/cs46xx/cs46xx_lib.c:1.87->1.88 
#   F:pci/emu10k1/emu10k1_main.c:1.38->1.39 
#   F:pci/ice1712/ice1712.c:1.63->1.64 
#   F:pci/ice1712/ice1724.c:1.47->1.48 
#   F:pci/korg1212/korg1212.c:1.50->1.51 
#   F:pci/mixart/mixart.c:1.20->1.21 
#   F:pci/nm256/nm256.c:1.54->1.55 
#   F:pci/rme9652/hdsp.c:1.74->1.75 
#   F:pci/rme9652/rme9652.c:1.54->1.55 
#   F:pci/trident/trident_main.c:1.64->1.65 
#   F:pci/vx222/vx222.c:1.10->1.11 
#   F:pci/ymfpci/ymfpci_main.c:1.58->1.59 
#   L:pci_disable_device() is called properly in the removal and error
#   L:paths.  Also, the pci_set_master() is added to the resume callbacks if
#   L:missing (just to be sure).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ice1712/ice1712.c
#   2004/11/18 07:52:52+01:00 perex@suse.cz +6 -1
#   [ALSA] Add pci_disable_device() to removal and error paths
#   
#   D:2004/11/18 14:52:49
#   C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver
#   C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver
#   C:ES1938 driver,ES1968 driver,FM801 driver,Intel8x0 driver
#   C:Intel8x0-modem driver,Maestro3 driver,RME32 driver,RME96 driver
#   C:SonicVibes driver,VIA82xx driver,ALI5451 driver,CS46xx driver
#   C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver
#   C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver
#   C:Trident driver,Digigram VX222 driver,YMFPCI driver
#   F:pci/als4000.c:1.38->1.39 
#   F:pci/atiixp.c:1.25->1.26 
#   F:pci/atiixp_modem.c:1.9->1.10 
#   F:pci/azt3328.c:1.20->1.21 
#   F:pci/bt87x.c:1.17->1.18 
#   F:pci/cmipci.c:1.74->1.75 
#   F:pci/cs4281.c:1.66->1.67 
#   F:pci/ens1370.c:1.70->1.71 
#   F:pci/es1938.c:1.42->1.43 
#   F:pci/es1968.c:1.78->1.79 
#   F:pci/fm801.c:1.53->1.54 
#   F:pci/intel8x0.c:1.178->1.179 
#   F:pci/intel8x0m.c:1.22->1.23 
#   F:pci/maestro3.c:1.63->1.64 
#   F:pci/rme32.c:1.49->1.50 
#   F:pci/rme96.c:1.46->1.47 
#   F:pci/sonicvibes.c:1.42->1.43 
#   F:pci/via82xx.c:1.127->1.128 
#   F:pci/ali5451/ali5451.c:1.57->1.58 
#   F:pci/cs46xx/cs46xx_lib.c:1.87->1.88 
#   F:pci/emu10k1/emu10k1_main.c:1.38->1.39 
#   F:pci/ice1712/ice1712.c:1.63->1.64 
#   F:pci/ice1712/ice1724.c:1.47->1.48 
#   F:pci/korg1212/korg1212.c:1.50->1.51 
#   F:pci/mixart/mixart.c:1.20->1.21 
#   F:pci/nm256/nm256.c:1.54->1.55 
#   F:pci/rme9652/hdsp.c:1.74->1.75 
#   F:pci/rme9652/rme9652.c:1.54->1.55 
#   F:pci/trident/trident_main.c:1.64->1.65 
#   F:pci/vx222/vx222.c:1.10->1.11 
#   F:pci/ymfpci/ymfpci_main.c:1.58->1.59 
#   L:pci_disable_device() is called properly in the removal and error
#   L:paths.  Also, the pci_set_master() is added to the resume callbacks if
#   L:missing (just to be sure).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/fm801.c
#   2004/11/18 07:52:50+01:00 perex@suse.cz +5 -1
#   [ALSA] Add pci_disable_device() to removal and error paths
#   
#   D:2004/11/18 14:52:49
#   C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver
#   C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver
#   C:ES1938 driver,ES1968 driver,FM801 driver,Intel8x0 driver
#   C:Intel8x0-modem driver,Maestro3 driver,RME32 driver,RME96 driver
#   C:SonicVibes driver,VIA82xx driver,ALI5451 driver,CS46xx driver
#   C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver
#   C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver
#   C:Trident driver,Digigram VX222 driver,YMFPCI driver
#   F:pci/als4000.c:1.38->1.39 
#   F:pci/atiixp.c:1.25->1.26 
#   F:pci/atiixp_modem.c:1.9->1.10 
#   F:pci/azt3328.c:1.20->1.21 
#   F:pci/bt87x.c:1.17->1.18 
#   F:pci/cmipci.c:1.74->1.75 
#   F:pci/cs4281.c:1.66->1.67 
#   F:pci/ens1370.c:1.70->1.71 
#   F:pci/es1938.c:1.42->1.43 
#   F:pci/es1968.c:1.78->1.79 
#   F:pci/fm801.c:1.53->1.54 
#   F:pci/intel8x0.c:1.178->1.179 
#   F:pci/intel8x0m.c:1.22->1.23 
#   F:pci/maestro3.c:1.63->1.64 
#   F:pci/rme32.c:1.49->1.50 
#   F:pci/rme96.c:1.46->1.47 
#   F:pci/sonicvibes.c:1.42->1.43 
#   F:pci/via82xx.c:1.127->1.128 
#   F:pci/ali5451/ali5451.c:1.57->1.58 
#   F:pci/cs46xx/cs46xx_lib.c:1.87->1.88 
#   F:pci/emu10k1/emu10k1_main.c:1.38->1.39 
#   F:pci/ice1712/ice1712.c:1.63->1.64 
#   F:pci/ice1712/ice1724.c:1.47->1.48 
#   F:pci/korg1212/korg1212.c:1.50->1.51 
#   F:pci/mixart/mixart.c:1.20->1.21 
#   F:pci/nm256/nm256.c:1.54->1.55 
#   F:pci/rme9652/hdsp.c:1.74->1.75 
#   F:pci/rme9652/rme9652.c:1.54->1.55 
#   F:pci/trident/trident_main.c:1.64->1.65 
#   F:pci/vx222/vx222.c:1.10->1.11 
#   F:pci/ymfpci/ymfpci_main.c:1.58->1.59 
#   L:pci_disable_device() is called properly in the removal and error
#   L:paths.  Also, the pci_set_master() is added to the resume callbacks if
#   L:missing (just to be sure).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/es1968.c
#   2004/11/18 07:52:50+01:00 perex@suse.cz +8 -1
#   [ALSA] Add pci_disable_device() to removal and error paths
#   
#   D:2004/11/18 14:52:49
#   C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver
#   C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver
#   C:ES1938 driver,ES1968 driver,FM801 driver,Intel8x0 driver
#   C:Intel8x0-modem driver,Maestro3 driver,RME32 driver,RME96 driver
#   C:SonicVibes driver,VIA82xx driver,ALI5451 driver,CS46xx driver
#   C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver
#   C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver
#   C:Trident driver,Digigram VX222 driver,YMFPCI driver
#   F:pci/als4000.c:1.38->1.39 
#   F:pci/atiixp.c:1.25->1.26 
#   F:pci/atiixp_modem.c:1.9->1.10 
#   F:pci/azt3328.c:1.20->1.21 
#   F:pci/bt87x.c:1.17->1.18 
#   F:pci/cmipci.c:1.74->1.75 
#   F:pci/cs4281.c:1.66->1.67 
#   F:pci/ens1370.c:1.70->1.71 
#   F:pci/es1938.c:1.42->1.43 
#   F:pci/es1968.c:1.78->1.79 
#   F:pci/fm801.c:1.53->1.54 
#   F:pci/intel8x0.c:1.178->1.179 
#   F:pci/intel8x0m.c:1.22->1.23 
#   F:pci/maestro3.c:1.63->1.64 
#   F:pci/rme32.c:1.49->1.50 
#   F:pci/rme96.c:1.46->1.47 
#   F:pci/sonicvibes.c:1.42->1.43 
#   F:pci/via82xx.c:1.127->1.128 
#   F:pci/ali5451/ali5451.c:1.57->1.58 
#   F:pci/cs46xx/cs46xx_lib.c:1.87->1.88 
#   F:pci/emu10k1/emu10k1_main.c:1.38->1.39 
#   F:pci/ice1712/ice1712.c:1.63->1.64 
#   F:pci/ice1712/ice1724.c:1.47->1.48 
#   F:pci/korg1212/korg1212.c:1.50->1.51 
#   F:pci/mixart/mixart.c:1.20->1.21 
#   F:pci/nm256/nm256.c:1.54->1.55 
#   F:pci/rme9652/hdsp.c:1.74->1.75 
#   F:pci/rme9652/rme9652.c:1.54->1.55 
#   F:pci/trident/trident_main.c:1.64->1.65 
#   F:pci/vx222/vx222.c:1.10->1.11 
#   F:pci/ymfpci/ymfpci_main.c:1.58->1.59 
#   L:pci_disable_device() is called properly in the removal and error
#   L:paths.  Also, the pci_set_master() is added to the resume callbacks if
#   L:missing (just to be sure).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/es1938.c
#   2004/11/18 07:52:50+01:00 perex@suse.cz +7 -1
#   [ALSA] Add pci_disable_device() to removal and error paths
#   
#   D:2004/11/18 14:52:49
#   C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver
#   C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver
#   C:ES1938 driver,ES1968 driver,FM801 driver,Intel8x0 driver
#   C:Intel8x0-modem driver,Maestro3 driver,RME32 driver,RME96 driver
#   C:SonicVibes driver,VIA82xx driver,ALI5451 driver,CS46xx driver
#   C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver
#   C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver
#   C:Trident driver,Digigram VX222 driver,YMFPCI driver
#   F:pci/als4000.c:1.38->1.39 
#   F:pci/atiixp.c:1.25->1.26 
#   F:pci/atiixp_modem.c:1.9->1.10 
#   F:pci/azt3328.c:1.20->1.21 
#   F:pci/bt87x.c:1.17->1.18 
#   F:pci/cmipci.c:1.74->1.75 
#   F:pci/cs4281.c:1.66->1.67 
#   F:pci/ens1370.c:1.70->1.71 
#   F:pci/es1938.c:1.42->1.43 
#   F:pci/es1968.c:1.78->1.79 
#   F:pci/fm801.c:1.53->1.54 
#   F:pci/intel8x0.c:1.178->1.179 
#   F:pci/intel8x0m.c:1.22->1.23 
#   F:pci/maestro3.c:1.63->1.64 
#   F:pci/rme32.c:1.49->1.50 
#   F:pci/rme96.c:1.46->1.47 
#   F:pci/sonicvibes.c:1.42->1.43 
#   F:pci/via82xx.c:1.127->1.128 
#   F:pci/ali5451/ali5451.c:1.57->1.58 
#   F:pci/cs46xx/cs46xx_lib.c:1.87->1.88 
#   F:pci/emu10k1/emu10k1_main.c:1.38->1.39 
#   F:pci/ice1712/ice1712.c:1.63->1.64 
#   F:pci/ice1712/ice1724.c:1.47->1.48 
#   F:pci/korg1212/korg1212.c:1.50->1.51 
#   F:pci/mixart/mixart.c:1.20->1.21 
#   F:pci/nm256/nm256.c:1.54->1.55 
#   F:pci/rme9652/hdsp.c:1.74->1.75 
#   F:pci/rme9652/rme9652.c:1.54->1.55 
#   F:pci/trident/trident_main.c:1.64->1.65 
#   F:pci/vx222/vx222.c:1.10->1.11 
#   F:pci/ymfpci/ymfpci_main.c:1.58->1.59 
#   L:pci_disable_device() is called properly in the removal and error
#   L:paths.  Also, the pci_set_master() is added to the resume callbacks if
#   L:missing (just to be sure).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ens1370.c
#   2004/11/18 07:52:50+01:00 perex@suse.cz +5 -1
#   [ALSA] Add pci_disable_device() to removal and error paths
#   
#   D:2004/11/18 14:52:49
#   C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver
#   C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver
#   C:ES1938 driver,ES1968 driver,FM801 driver,Intel8x0 driver
#   C:Intel8x0-modem driver,Maestro3 driver,RME32 driver,RME96 driver
#   C:SonicVibes driver,VIA82xx driver,ALI5451 driver,CS46xx driver
#   C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver
#   C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver
#   C:Trident driver,Digigram VX222 driver,YMFPCI driver
#   F:pci/als4000.c:1.38->1.39 
#   F:pci/atiixp.c:1.25->1.26 
#   F:pci/atiixp_modem.c:1.9->1.10 
#   F:pci/azt3328.c:1.20->1.21 
#   F:pci/bt87x.c:1.17->1.18 
#   F:pci/cmipci.c:1.74->1.75 
#   F:pci/cs4281.c:1.66->1.67 
#   F:pci/ens1370.c:1.70->1.71 
#   F:pci/es1938.c:1.42->1.43 
#   F:pci/es1968.c:1.78->1.79 
#   F:pci/fm801.c:1.53->1.54 
#   F:pci/intel8x0.c:1.178->1.179 
#   F:pci/intel8x0m.c:1.22->1.23 
#   F:pci/maestro3.c:1.63->1.64 
#   F:pci/rme32.c:1.49->1.50 
#   F:pci/rme96.c:1.46->1.47 
#   F:pci/sonicvibes.c:1.42->1.43 
#   F:pci/via82xx.c:1.127->1.128 
#   F:pci/ali5451/ali5451.c:1.57->1.58 
#   F:pci/cs46xx/cs46xx_lib.c:1.87->1.88 
#   F:pci/emu10k1/emu10k1_main.c:1.38->1.39 
#   F:pci/ice1712/ice1712.c:1.63->1.64 
#   F:pci/ice1712/ice1724.c:1.47->1.48 
#   F:pci/korg1212/korg1212.c:1.50->1.51 
#   F:pci/mixart/mixart.c:1.20->1.21 
#   F:pci/nm256/nm256.c:1.54->1.55 
#   F:pci/rme9652/hdsp.c:1.74->1.75 
#   F:pci/rme9652/rme9652.c:1.54->1.55 
#   F:pci/trident/trident_main.c:1.64->1.65 
#   F:pci/vx222/vx222.c:1.10->1.11 
#   F:pci/ymfpci/ymfpci_main.c:1.58->1.59 
#   L:pci_disable_device() is called properly in the removal and error
#   L:paths.  Also, the pci_set_master() is added to the resume callbacks if
#   L:missing (just to be sure).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/emu10k1/emu10k1_main.c
#   2004/11/18 07:52:51+01:00 perex@suse.cz +6 -1
#   [ALSA] Add pci_disable_device() to removal and error paths
#   
#   D:2004/11/18 14:52:49
#   C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver
#   C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver
#   C:ES1938 driver,ES1968 driver,FM801 driver,Intel8x0 driver
#   C:Intel8x0-modem driver,Maestro3 driver,RME32 driver,RME96 driver
#   C:SonicVibes driver,VIA82xx driver,ALI5451 driver,CS46xx driver
#   C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver
#   C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver
#   C:Trident driver,Digigram VX222 driver,YMFPCI driver
#   F:pci/als4000.c:1.38->1.39 
#   F:pci/atiixp.c:1.25->1.26 
#   F:pci/atiixp_modem.c:1.9->1.10 
#   F:pci/azt3328.c:1.20->1.21 
#   F:pci/bt87x.c:1.17->1.18 
#   F:pci/cmipci.c:1.74->1.75 
#   F:pci/cs4281.c:1.66->1.67 
#   F:pci/ens1370.c:1.70->1.71 
#   F:pci/es1938.c:1.42->1.43 
#   F:pci/es1968.c:1.78->1.79 
#   F:pci/fm801.c:1.53->1.54 
#   F:pci/intel8x0.c:1.178->1.179 
#   F:pci/intel8x0m.c:1.22->1.23 
#   F:pci/maestro3.c:1.63->1.64 
#   F:pci/rme32.c:1.49->1.50 
#   F:pci/rme96.c:1.46->1.47 
#   F:pci/sonicvibes.c:1.42->1.43 
#   F:pci/via82xx.c:1.127->1.128 
#   F:pci/ali5451/ali5451.c:1.57->1.58 
#   F:pci/cs46xx/cs46xx_lib.c:1.87->1.88 
#   F:pci/emu10k1/emu10k1_main.c:1.38->1.39 
#   F:pci/ice1712/ice1712.c:1.63->1.64 
#   F:pci/ice1712/ice1724.c:1.47->1.48 
#   F:pci/korg1212/korg1212.c:1.50->1.51 
#   F:pci/mixart/mixart.c:1.20->1.21 
#   F:pci/nm256/nm256.c:1.54->1.55 
#   F:pci/rme9652/hdsp.c:1.74->1.75 
#   F:pci/rme9652/rme9652.c:1.54->1.55 
#   F:pci/trident/trident_main.c:1.64->1.65 
#   F:pci/vx222/vx222.c:1.10->1.11 
#   F:pci/ymfpci/ymfpci_main.c:1.58->1.59 
#   L:pci_disable_device() is called properly in the removal and error
#   L:paths.  Also, the pci_set_master() is added to the resume callbacks if
#   L:missing (just to be sure).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/cs46xx/cs46xx_lib.c
#   2004/11/18 07:52:51+01:00 perex@suse.cz +6 -1
#   [ALSA] Add pci_disable_device() to removal and error paths
#   
#   D:2004/11/18 14:52:49
#   C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver
#   C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver
#   C:ES1938 driver,ES1968 driver,FM801 driver,Intel8x0 driver
#   C:Intel8x0-modem driver,Maestro3 driver,RME32 driver,RME96 driver
#   C:SonicVibes driver,VIA82xx driver,ALI5451 driver,CS46xx driver
#   C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver
#   C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver
#   C:Trident driver,Digigram VX222 driver,YMFPCI driver
#   F:pci/als4000.c:1.38->1.39 
#   F:pci/atiixp.c:1.25->1.26 
#   F:pci/atiixp_modem.c:1.9->1.10 
#   F:pci/azt3328.c:1.20->1.21 
#   F:pci/bt87x.c:1.17->1.18 
#   F:pci/cmipci.c:1.74->1.75 
#   F:pci/cs4281.c:1.66->1.67 
#   F:pci/ens1370.c:1.70->1.71 
#   F:pci/es1938.c:1.42->1.43 
#   F:pci/es1968.c:1.78->1.79 
#   F:pci/fm801.c:1.53->1.54 
#   F:pci/intel8x0.c:1.178->1.179 
#   F:pci/intel8x0m.c:1.22->1.23 
#   F:pci/maestro3.c:1.63->1.64 
#   F:pci/rme32.c:1.49->1.50 
#   F:pci/rme96.c:1.46->1.47 
#   F:pci/sonicvibes.c:1.42->1.43 
#   F:pci/via82xx.c:1.127->1.128 
#   F:pci/ali5451/ali5451.c:1.57->1.58 
#   F:pci/cs46xx/cs46xx_lib.c:1.87->1.88 
#   F:pci/emu10k1/emu10k1_main.c:1.38->1.39 
#   F:pci/ice1712/ice1712.c:1.63->1.64 
#   F:pci/ice1712/ice1724.c:1.47->1.48 
#   F:pci/korg1212/korg1212.c:1.50->1.51 
#   F:pci/mixart/mixart.c:1.20->1.21 
#   F:pci/nm256/nm256.c:1.54->1.55 
#   F:pci/rme9652/hdsp.c:1.74->1.75 
#   F:pci/rme9652/rme9652.c:1.54->1.55 
#   F:pci/trident/trident_main.c:1.64->1.65 
#   F:pci/vx222/vx222.c:1.10->1.11 
#   F:pci/ymfpci/ymfpci_main.c:1.58->1.59 
#   L:pci_disable_device() is called properly in the removal and error
#   L:paths.  Also, the pci_set_master() is added to the resume callbacks if
#   L:missing (just to be sure).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/cs4281.c
#   2004/11/18 07:52:50+01:00 perex@suse.cz +7 -1
#   [ALSA] Add pci_disable_device() to removal and error paths
#   
#   D:2004/11/18 14:52:49
#   C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver
#   C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver
#   C:ES1938 driver,ES1968 driver,FM801 driver,Intel8x0 driver
#   C:Intel8x0-modem driver,Maestro3 driver,RME32 driver,RME96 driver
#   C:SonicVibes driver,VIA82xx driver,ALI5451 driver,CS46xx driver
#   C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver
#   C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver
#   C:Trident driver,Digigram VX222 driver,YMFPCI driver
#   F:pci/als4000.c:1.38->1.39 
#   F:pci/atiixp.c:1.25->1.26 
#   F:pci/atiixp_modem.c:1.9->1.10 
#   F:pci/azt3328.c:1.20->1.21 
#   F:pci/bt87x.c:1.17->1.18 
#   F:pci/cmipci.c:1.74->1.75 
#   F:pci/cs4281.c:1.66->1.67 
#   F:pci/ens1370.c:1.70->1.71 
#   F:pci/es1938.c:1.42->1.43 
#   F:pci/es1968.c:1.78->1.79 
#   F:pci/fm801.c:1.53->1.54 
#   F:pci/intel8x0.c:1.178->1.179 
#   F:pci/intel8x0m.c:1.22->1.23 
#   F:pci/maestro3.c:1.63->1.64 
#   F:pci/rme32.c:1.49->1.50 
#   F:pci/rme96.c:1.46->1.47 
#   F:pci/sonicvibes.c:1.42->1.43 
#   F:pci/via82xx.c:1.127->1.128 
#   F:pci/ali5451/ali5451.c:1.57->1.58 
#   F:pci/cs46xx/cs46xx_lib.c:1.87->1.88 
#   F:pci/emu10k1/emu10k1_main.c:1.38->1.39 
#   F:pci/ice1712/ice1712.c:1.63->1.64 
#   F:pci/ice1712/ice1724.c:1.47->1.48 
#   F:pci/korg1212/korg1212.c:1.50->1.51 
#   F:pci/mixart/mixart.c:1.20->1.21 
#   F:pci/nm256/nm256.c:1.54->1.55 
#   F:pci/rme9652/hdsp.c:1.74->1.75 
#   F:pci/rme9652/rme9652.c:1.54->1.55 
#   F:pci/trident/trident_main.c:1.64->1.65 
#   F:pci/vx222/vx222.c:1.10->1.11 
#   F:pci/ymfpci/ymfpci_main.c:1.58->1.59 
#   L:pci_disable_device() is called properly in the removal and error
#   L:paths.  Also, the pci_set_master() is added to the resume callbacks if
#   L:missing (just to be sure).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/cmipci.c
#   2004/11/18 07:52:50+01:00 perex@suse.cz +5 -1
#   [ALSA] Add pci_disable_device() to removal and error paths
#   
#   D:2004/11/18 14:52:49
#   C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver
#   C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver
#   C:ES1938 driver,ES1968 driver,FM801 driver,Intel8x0 driver
#   C:Intel8x0-modem driver,Maestro3 driver,RME32 driver,RME96 driver
#   C:SonicVibes driver,VIA82xx driver,ALI5451 driver,CS46xx driver
#   C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver
#   C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver
#   C:Trident driver,Digigram VX222 driver,YMFPCI driver
#   F:pci/als4000.c:1.38->1.39 
#   F:pci/atiixp.c:1.25->1.26 
#   F:pci/atiixp_modem.c:1.9->1.10 
#   F:pci/azt3328.c:1.20->1.21 
#   F:pci/bt87x.c:1.17->1.18 
#   F:pci/cmipci.c:1.74->1.75 
#   F:pci/cs4281.c:1.66->1.67 
#   F:pci/ens1370.c:1.70->1.71 
#   F:pci/es1938.c:1.42->1.43 
#   F:pci/es1968.c:1.78->1.79 
#   F:pci/fm801.c:1.53->1.54 
#   F:pci/intel8x0.c:1.178->1.179 
#   F:pci/intel8x0m.c:1.22->1.23 
#   F:pci/maestro3.c:1.63->1.64 
#   F:pci/rme32.c:1.49->1.50 
#   F:pci/rme96.c:1.46->1.47 
#   F:pci/sonicvibes.c:1.42->1.43 
#   F:pci/via82xx.c:1.127->1.128 
#   F:pci/ali5451/ali5451.c:1.57->1.58 
#   F:pci/cs46xx/cs46xx_lib.c:1.87->1.88 
#   F:pci/emu10k1/emu10k1_main.c:1.38->1.39 
#   F:pci/ice1712/ice1712.c:1.63->1.64 
#   F:pci/ice1712/ice1724.c:1.47->1.48 
#   F:pci/korg1212/korg1212.c:1.50->1.51 
#   F:pci/mixart/mixart.c:1.20->1.21 
#   F:pci/nm256/nm256.c:1.54->1.55 
#   F:pci/rme9652/hdsp.c:1.74->1.75 
#   F:pci/rme9652/rme9652.c:1.54->1.55 
#   F:pci/trident/trident_main.c:1.64->1.65 
#   F:pci/vx222/vx222.c:1.10->1.11 
#   F:pci/ymfpci/ymfpci_main.c:1.58->1.59 
#   L:pci_disable_device() is called properly in the removal and error
#   L:paths.  Also, the pci_set_master() is added to the resume callbacks if
#   L:missing (just to be sure).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/bt87x.c
#   2004/11/18 07:52:50+01:00 perex@suse.cz +5 -1
#   [ALSA] Add pci_disable_device() to removal and error paths
#   
#   D:2004/11/18 14:52:49
#   C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver
#   C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver
#   C:ES1938 driver,ES1968 driver,FM801 driver,Intel8x0 driver
#   C:Intel8x0-modem driver,Maestro3 driver,RME32 driver,RME96 driver
#   C:SonicVibes driver,VIA82xx driver,ALI5451 driver,CS46xx driver
#   C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver
#   C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver
#   C:Trident driver,Digigram VX222 driver,YMFPCI driver
#   F:pci/als4000.c:1.38->1.39 
#   F:pci/atiixp.c:1.25->1.26 
#   F:pci/atiixp_modem.c:1.9->1.10 
#   F:pci/azt3328.c:1.20->1.21 
#   F:pci/bt87x.c:1.17->1.18 
#   F:pci/cmipci.c:1.74->1.75 
#   F:pci/cs4281.c:1.66->1.67 
#   F:pci/ens1370.c:1.70->1.71 
#   F:pci/es1938.c:1.42->1.43 
#   F:pci/es1968.c:1.78->1.79 
#   F:pci/fm801.c:1.53->1.54 
#   F:pci/intel8x0.c:1.178->1.179 
#   F:pci/intel8x0m.c:1.22->1.23 
#   F:pci/maestro3.c:1.63->1.64 
#   F:pci/rme32.c:1.49->1.50 
#   F:pci/rme96.c:1.46->1.47 
#   F:pci/sonicvibes.c:1.42->1.43 
#   F:pci/via82xx.c:1.127->1.128 
#   F:pci/ali5451/ali5451.c:1.57->1.58 
#   F:pci/cs46xx/cs46xx_lib.c:1.87->1.88 
#   F:pci/emu10k1/emu10k1_main.c:1.38->1.39 
#   F:pci/ice1712/ice1712.c:1.63->1.64 
#   F:pci/ice1712/ice1724.c:1.47->1.48 
#   F:pci/korg1212/korg1212.c:1.50->1.51 
#   F:pci/mixart/mixart.c:1.20->1.21 
#   F:pci/nm256/nm256.c:1.54->1.55 
#   F:pci/rme9652/hdsp.c:1.74->1.75 
#   F:pci/rme9652/rme9652.c:1.54->1.55 
#   F:pci/trident/trident_main.c:1.64->1.65 
#   F:pci/vx222/vx222.c:1.10->1.11 
#   F:pci/ymfpci/ymfpci_main.c:1.58->1.59 
#   L:pci_disable_device() is called properly in the removal and error
#   L:paths.  Also, the pci_set_master() is added to the resume callbacks if
#   L:missing (just to be sure).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/azt3328.c
#   2004/11/18 07:52:50+01:00 perex@suse.cz +6 -1
#   [ALSA] Add pci_disable_device() to removal and error paths
#   
#   D:2004/11/18 14:52:49
#   C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver
#   C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver
#   C:ES1938 driver,ES1968 driver,FM801 driver,Intel8x0 driver
#   C:Intel8x0-modem driver,Maestro3 driver,RME32 driver,RME96 driver
#   C:SonicVibes driver,VIA82xx driver,ALI5451 driver,CS46xx driver
#   C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver
#   C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver
#   C:Trident driver,Digigram VX222 driver,YMFPCI driver
#   F:pci/als4000.c:1.38->1.39 
#   F:pci/atiixp.c:1.25->1.26 
#   F:pci/atiixp_modem.c:1.9->1.10 
#   F:pci/azt3328.c:1.20->1.21 
#   F:pci/bt87x.c:1.17->1.18 
#   F:pci/cmipci.c:1.74->1.75 
#   F:pci/cs4281.c:1.66->1.67 
#   F:pci/ens1370.c:1.70->1.71 
#   F:pci/es1938.c:1.42->1.43 
#   F:pci/es1968.c:1.78->1.79 
#   F:pci/fm801.c:1.53->1.54 
#   F:pci/intel8x0.c:1.178->1.179 
#   F:pci/intel8x0m.c:1.22->1.23 
#   F:pci/maestro3.c:1.63->1.64 
#   F:pci/rme32.c:1.49->1.50 
#   F:pci/rme96.c:1.46->1.47 
#   F:pci/sonicvibes.c:1.42->1.43 
#   F:pci/via82xx.c:1.127->1.128 
#   F:pci/ali5451/ali5451.c:1.57->1.58 
#   F:pci/cs46xx/cs46xx_lib.c:1.87->1.88 
#   F:pci/emu10k1/emu10k1_main.c:1.38->1.39 
#   F:pci/ice1712/ice1712.c:1.63->1.64 
#   F:pci/ice1712/ice1724.c:1.47->1.48 
#   F:pci/korg1212/korg1212.c:1.50->1.51 
#   F:pci/mixart/mixart.c:1.20->1.21 
#   F:pci/nm256/nm256.c:1.54->1.55 
#   F:pci/rme9652/hdsp.c:1.74->1.75 
#   F:pci/rme9652/rme9652.c:1.54->1.55 
#   F:pci/trident/trident_main.c:1.64->1.65 
#   F:pci/vx222/vx222.c:1.10->1.11 
#   F:pci/ymfpci/ymfpci_main.c:1.58->1.59 
#   L:pci_disable_device() is called properly in the removal and error
#   L:paths.  Also, the pci_set_master() is added to the resume callbacks if
#   L:missing (just to be sure).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/atiixp_modem.c
#   2004/11/18 07:52:50+01:00 perex@suse.cz +6 -1
#   [ALSA] Add pci_disable_device() to removal and error paths
#   
#   D:2004/11/18 14:52:49
#   C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver
#   C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver
#   C:ES1938 driver,ES1968 driver,FM801 driver,Intel8x0 driver
#   C:Intel8x0-modem driver,Maestro3 driver,RME32 driver,RME96 driver
#   C:SonicVibes driver,VIA82xx driver,ALI5451 driver,CS46xx driver
#   C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver
#   C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver
#   C:Trident driver,Digigram VX222 driver,YMFPCI driver
#   F:pci/als4000.c:1.38->1.39 
#   F:pci/atiixp.c:1.25->1.26 
#   F:pci/atiixp_modem.c:1.9->1.10 
#   F:pci/azt3328.c:1.20->1.21 
#   F:pci/bt87x.c:1.17->1.18 
#   F:pci/cmipci.c:1.74->1.75 
#   F:pci/cs4281.c:1.66->1.67 
#   F:pci/ens1370.c:1.70->1.71 
#   F:pci/es1938.c:1.42->1.43 
#   F:pci/es1968.c:1.78->1.79 
#   F:pci/fm801.c:1.53->1.54 
#   F:pci/intel8x0.c:1.178->1.179 
#   F:pci/intel8x0m.c:1.22->1.23 
#   F:pci/maestro3.c:1.63->1.64 
#   F:pci/rme32.c:1.49->1.50 
#   F:pci/rme96.c:1.46->1.47 
#   F:pci/sonicvibes.c:1.42->1.43 
#   F:pci/via82xx.c:1.127->1.128 
#   F:pci/ali5451/ali5451.c:1.57->1.58 
#   F:pci/cs46xx/cs46xx_lib.c:1.87->1.88 
#   F:pci/emu10k1/emu10k1_main.c:1.38->1.39 
#   F:pci/ice1712/ice1712.c:1.63->1.64 
#   F:pci/ice1712/ice1724.c:1.47->1.48 
#   F:pci/korg1212/korg1212.c:1.50->1.51 
#   F:pci/mixart/mixart.c:1.20->1.21 
#   F:pci/nm256/nm256.c:1.54->1.55 
#   F:pci/rme9652/hdsp.c:1.74->1.75 
#   F:pci/rme9652/rme9652.c:1.54->1.55 
#   F:pci/trident/trident_main.c:1.64->1.65 
#   F:pci/vx222/vx222.c:1.10->1.11 
#   F:pci/ymfpci/ymfpci_main.c:1.58->1.59 
#   L:pci_disable_device() is called properly in the removal and error
#   L:paths.  Also, the pci_set_master() is added to the resume callbacks if
#   L:missing (just to be sure).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/atiixp.c
#   2004/11/18 07:52:49+01:00 perex@suse.cz +6 -1
#   [ALSA] Add pci_disable_device() to removal and error paths
#   
#   D:2004/11/18 14:52:49
#   C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver
#   C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver
#   C:ES1938 driver,ES1968 driver,FM801 driver,Intel8x0 driver
#   C:Intel8x0-modem driver,Maestro3 driver,RME32 driver,RME96 driver
#   C:SonicVibes driver,VIA82xx driver,ALI5451 driver,CS46xx driver
#   C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver
#   C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver
#   C:Trident driver,Digigram VX222 driver,YMFPCI driver
#   F:pci/als4000.c:1.38->1.39 
#   F:pci/atiixp.c:1.25->1.26 
#   F:pci/atiixp_modem.c:1.9->1.10 
#   F:pci/azt3328.c:1.20->1.21 
#   F:pci/bt87x.c:1.17->1.18 
#   F:pci/cmipci.c:1.74->1.75 
#   F:pci/cs4281.c:1.66->1.67 
#   F:pci/ens1370.c:1.70->1.71 
#   F:pci/es1938.c:1.42->1.43 
#   F:pci/es1968.c:1.78->1.79 
#   F:pci/fm801.c:1.53->1.54 
#   F:pci/intel8x0.c:1.178->1.179 
#   F:pci/intel8x0m.c:1.22->1.23 
#   F:pci/maestro3.c:1.63->1.64 
#   F:pci/rme32.c:1.49->1.50 
#   F:pci/rme96.c:1.46->1.47 
#   F:pci/sonicvibes.c:1.42->1.43 
#   F:pci/via82xx.c:1.127->1.128 
#   F:pci/ali5451/ali5451.c:1.57->1.58 
#   F:pci/cs46xx/cs46xx_lib.c:1.87->1.88 
#   F:pci/emu10k1/emu10k1_main.c:1.38->1.39 
#   F:pci/ice1712/ice1712.c:1.63->1.64 
#   F:pci/ice1712/ice1724.c:1.47->1.48 
#   F:pci/korg1212/korg1212.c:1.50->1.51 
#   F:pci/mixart/mixart.c:1.20->1.21 
#   F:pci/nm256/nm256.c:1.54->1.55 
#   F:pci/rme9652/hdsp.c:1.74->1.75 
#   F:pci/rme9652/rme9652.c:1.54->1.55 
#   F:pci/trident/trident_main.c:1.64->1.65 
#   F:pci/vx222/vx222.c:1.10->1.11 
#   F:pci/ymfpci/ymfpci_main.c:1.58->1.59 
#   L:pci_disable_device() is called properly in the removal and error
#   L:paths.  Also, the pci_set_master() is added to the resume callbacks if
#   L:missing (just to be sure).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/als4000.c
#   2004/11/18 07:52:49+01:00 perex@suse.cz +6 -1
#   [ALSA] Add pci_disable_device() to removal and error paths
#   
#   D:2004/11/18 14:52:49
#   C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver
#   C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver
#   C:ES1938 driver,ES1968 driver,FM801 driver,Intel8x0 driver
#   C:Intel8x0-modem driver,Maestro3 driver,RME32 driver,RME96 driver
#   C:SonicVibes driver,VIA82xx driver,ALI5451 driver,CS46xx driver
#   C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver
#   C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver
#   C:Trident driver,Digigram VX222 driver,YMFPCI driver
#   F:pci/als4000.c:1.38->1.39 
#   F:pci/atiixp.c:1.25->1.26 
#   F:pci/atiixp_modem.c:1.9->1.10 
#   F:pci/azt3328.c:1.20->1.21 
#   F:pci/bt87x.c:1.17->1.18 
#   F:pci/cmipci.c:1.74->1.75 
#   F:pci/cs4281.c:1.66->1.67 
#   F:pci/ens1370.c:1.70->1.71 
#   F:pci/es1938.c:1.42->1.43 
#   F:pci/es1968.c:1.78->1.79 
#   F:pci/fm801.c:1.53->1.54 
#   F:pci/intel8x0.c:1.178->1.179 
#   F:pci/intel8x0m.c:1.22->1.23 
#   F:pci/maestro3.c:1.63->1.64 
#   F:pci/rme32.c:1.49->1.50 
#   F:pci/rme96.c:1.46->1.47 
#   F:pci/sonicvibes.c:1.42->1.43 
#   F:pci/via82xx.c:1.127->1.128 
#   F:pci/ali5451/ali5451.c:1.57->1.58 
#   F:pci/cs46xx/cs46xx_lib.c:1.87->1.88 
#   F:pci/emu10k1/emu10k1_main.c:1.38->1.39 
#   F:pci/ice1712/ice1712.c:1.63->1.64 
#   F:pci/ice1712/ice1724.c:1.47->1.48 
#   F:pci/korg1212/korg1212.c:1.50->1.51 
#   F:pci/mixart/mixart.c:1.20->1.21 
#   F:pci/nm256/nm256.c:1.54->1.55 
#   F:pci/rme9652/hdsp.c:1.74->1.75 
#   F:pci/rme9652/rme9652.c:1.54->1.55 
#   F:pci/trident/trident_main.c:1.64->1.65 
#   F:pci/vx222/vx222.c:1.10->1.11 
#   F:pci/ymfpci/ymfpci_main.c:1.58->1.59 
#   L:pci_disable_device() is called properly in the removal and error
#   L:paths.  Also, the pci_set_master() is added to the resume callbacks if
#   L:missing (just to be sure).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ali5451/ali5451.c
#   2004/11/18 07:52:51+01:00 perex@suse.cz +6 -1
#   [ALSA] Add pci_disable_device() to removal and error paths
#   
#   D:2004/11/18 14:52:49
#   C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver
#   C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver
#   C:ES1938 driver,ES1968 driver,FM801 driver,Intel8x0 driver
#   C:Intel8x0-modem driver,Maestro3 driver,RME32 driver,RME96 driver
#   C:SonicVibes driver,VIA82xx driver,ALI5451 driver,CS46xx driver
#   C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver
#   C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver
#   C:Trident driver,Digigram VX222 driver,YMFPCI driver
#   F:pci/als4000.c:1.38->1.39 
#   F:pci/atiixp.c:1.25->1.26 
#   F:pci/atiixp_modem.c:1.9->1.10 
#   F:pci/azt3328.c:1.20->1.21 
#   F:pci/bt87x.c:1.17->1.18 
#   F:pci/cmipci.c:1.74->1.75 
#   F:pci/cs4281.c:1.66->1.67 
#   F:pci/ens1370.c:1.70->1.71 
#   F:pci/es1938.c:1.42->1.43 
#   F:pci/es1968.c:1.78->1.79 
#   F:pci/fm801.c:1.53->1.54 
#   F:pci/intel8x0.c:1.178->1.179 
#   F:pci/intel8x0m.c:1.22->1.23 
#   F:pci/maestro3.c:1.63->1.64 
#   F:pci/rme32.c:1.49->1.50 
#   F:pci/rme96.c:1.46->1.47 
#   F:pci/sonicvibes.c:1.42->1.43 
#   F:pci/via82xx.c:1.127->1.128 
#   F:pci/ali5451/ali5451.c:1.57->1.58 
#   F:pci/cs46xx/cs46xx_lib.c:1.87->1.88 
#   F:pci/emu10k1/emu10k1_main.c:1.38->1.39 
#   F:pci/ice1712/ice1712.c:1.63->1.64 
#   F:pci/ice1712/ice1724.c:1.47->1.48 
#   F:pci/korg1212/korg1212.c:1.50->1.51 
#   F:pci/mixart/mixart.c:1.20->1.21 
#   F:pci/nm256/nm256.c:1.54->1.55 
#   F:pci/rme9652/hdsp.c:1.74->1.75 
#   F:pci/rme9652/rme9652.c:1.54->1.55 
#   F:pci/trident/trident_main.c:1.64->1.65 
#   F:pci/vx222/vx222.c:1.10->1.11 
#   F:pci/ymfpci/ymfpci_main.c:1.58->1.59 
#   L:pci_disable_device() is called properly in the removal and error
#   L:paths.  Also, the pci_set_master() is added to the resume callbacks if
#   L:missing (just to be sure).
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2004/11/29 09:09:03+01:00 perex@suse.cz 
#   [ALSA] whitespace cleanup
#   
#   EMU10K1/EMU10K2 driver
#   
#   
#   Signed-off-by: Lee Revell <rlrevell@joe-job.com>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/emu10k1/emumixer.c
#   2004/11/18 06:32:00+01:00 perex@suse.cz +35 -35
#   [ALSA] whitespace cleanup
#   
#   D:2004/11/18 13:32:00
#   C:EMU10K1/EMU10K2 driver
#   F:pci/emu10k1/emumixer.c:1.26->1.27 
#   L:
#   Signed-off-by: Lee Revell <rlrevell@joe-job.com>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2004/11/29 09:07:59+01:00 perex@suse.cz 
#   [ALSA] minor send routing cleanup
#   
#   EMU10K1/EMU10K2 driver
#   Use snd_emu10k1_compose_audigy_fxrt* macro where appropriate.  Also add
#   a few comments to explain send routing structure.
#   
#   Signed-off-by: Lee Revell <rlrevell@joe-job.com>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/emu10k1/emupcm.c
#   2004/11/17 06:38:10+01:00 perex@suse.cz +3 -8
#   [ALSA] minor send routing cleanup
#   
#   D:2004/11/17 13:38:10
#   C:EMU10K1/EMU10K2 driver
#   F:include/emu10k1.h:1.50->1.51 
#   F:pci/emu10k1/emupcm.c:1.33->1.34 
#   L:Use snd_emu10k1_compose_audigy_fxrt* macro where appropriate.  Also add
#   L:a few comments to explain send routing structure.
#   Signed-off-by: Lee Revell <rlrevell@joe-job.com>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# include/sound/emu10k1.h
#   2004/11/17 06:38:10+01:00 perex@suse.cz +1 -0
#   [ALSA] minor send routing cleanup
#   
#   D:2004/11/17 13:38:10
#   C:EMU10K1/EMU10K2 driver
#   F:include/emu10k1.h:1.50->1.51 
#   F:pci/emu10k1/emupcm.c:1.33->1.34 
#   L:Use snd_emu10k1_compose_audigy_fxrt* macro where appropriate.  Also add
#   L:a few comments to explain send routing structure.
#   Signed-off-by: Lee Revell <rlrevell@joe-job.com>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2004/11/29 09:06:58+01:00 perex@suse.cz 
#   [ALSA] fix chorus/reverb FX loader
#   
#   EMU8000 driver
#   Fixed the chorus/reverb FX loader callback.
#   The header bytes must be eliminated.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/isa/sb/emu8000_callback.c
#   2004/11/16 08:43:28+01:00 perex@suse.cz +4 -0
#   [ALSA] fix chorus/reverb FX loader
#   
#   D:2004/11/16 15:43:28
#   C:EMU8000 driver
#   F:isa/sb/emu8000_callback.c:1.10->1.11 
#   L:Fixed the chorus/reverb FX loader callback.
#   L:The header bytes must be eliminated.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2004/11/29 09:05:55+01:00 perex@suse.cz 
#   [ALSA] fix MIDI GS chorus/reverb mode
#   
#   ALSA sequencer
#   Fixed the parsing of MIDI GS chorus/reverb mode SYSEX messages.
#   They were swapped.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/seq/seq_midi_emul.c
#   2004/11/16 08:41:03+01:00 perex@suse.cz +2 -2
#   [ALSA] fix MIDI GS chorus/reverb mode
#   
#   D:2004/11/16 15:41:03
#   C:ALSA sequencer
#   F:core/seq/seq_midi_emul.c:1.11->1.12 
#   L:Fixed the parsing of MIDI GS chorus/reverb mode SYSEX messages.
#   L:They were swapped.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2004/11/29 09:04:54+01:00 perex@suse.cz 
#   [ALSA] fix iomem mmap
#   
#   PCM Midlevel
#   The patch adds the definition vm_private_data again to
#   snd_pcm_lib_mmap_iomem(). It got lost during the rewrite of
#   the mmap stuff.
#   
#   Signed-off-by: Martin Langer <martin-langer@gmx.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/pcm_native.c
#   2004/11/16 08:19:03+01:00 perex@suse.cz +1 -0
#   [ALSA] fix iomem mmap
#   
#   D:2004/11/16 15:19:03
#   C:PCM Midlevel
#   F:core/pcm_native.c:1.107->1.108 
#   L:The patch adds the definition vm_private_data again to
#   L:snd_pcm_lib_mmap_iomem(). It got lost during the rewrite of
#   L:the mmap stuff.
#   Signed-off-by: Martin Langer <martin-langer@gmx.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2004/11/29 09:03:52+01:00 perex@suse.cz 
#   [ALSA] add Line/Headphone jack detection for AD1981A/B
#   
#   AC97 Codec Core
#   Line/Headphone Jack Sense mixer switches are added to
#   AD1981A/B.
#   
#   HP sense is activated as default.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ac97/ac97_patch.c
#   2004/11/16 08:00:41+01:00 perex@suse.cz +21 -2
#   [ALSA] add Line/Headphone jack detection for AD1981A/B
#   
#   D:2004/11/16 15:00:41
#   C:AC97 Codec Core
#   F:pci/ac97/ac97_patch.c:1.58->1.59 
#   L:Line/Headphone Jack Sense mixer switches are added to
#   L:AD1981A/B.
#   L:
#   L:HP sense is activated as default.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2004/11/29 09:02:48+01:00 perex@suse.cz 
#   [ALSA] Add pci_save_state() in suspend
#   
#   ALSA Core
#   Added pci_save_state() in the ALSA suspend core callback since
#   its call was removed from the PCI core driver in the recent
#   version.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/core/init.c
#   2004/11/16 02:51:57+01:00 perex@suse.cz +4 -1
#   [ALSA] Add pci_save_state() in suspend
#   
#   D:2004/11/16 09:51:57
#   C:ALSA Core
#   F:core/init.c:1.50->1.51 
#   L:Added pci_save_state() in the ALSA suspend core callback since
#   L:its call was removed from the PCI core driver in the recent
#   L:version.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2004/11/29 09:01:49+01:00 perex@suse.cz 
#   [ALSA] fix sleep in atomic during prepare callback
#   
#   Intel8x0 driver
#   Fixed the sleep in spinlock during prepare callback.
#   This happened only on Nforce chips.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/intel8x0.c
#   2004/11/16 02:44:23+01:00 perex@suse.cz +2 -0
#   [ALSA] fix sleep in atomic during prepare callback
#   
#   D:2004/11/16 09:44:23
#   C:Intel8x0 driver
#   F:pci/intel8x0.c:1.177->1.178 
#   L:Fixed the sleep in spinlock during prepare callback.
#   L:This happened only on Nforce chips.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2004/11/29 09:00:41+01:00 perex@suse.cz 
#   [ALSA] AC97 quirks for Dell
#   
#   Intel8x0 driver
#   Added ac97 quirks for some dell machines.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/intel8x0.c
#   2004/11/15 12:09:55+01:00 perex@suse.cz +12 -0
#   [ALSA] AC97 quirks for Dell
#   
#   D:2004/11/15 19:09:55
#   C:Intel8x0 driver
#   F:pci/intel8x0.c:1.176->1.177 
#   L:Added ac97 quirks for some dell machines.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2004/11/29 08:59:30+01:00 perex@suse.cz 
#   [ALSA] Fix WM8770 Init
#   
#   ICE1712 driver
#   Corrects WM8770 ADC mux initialization
#   
#   Signed-off-by: Peter Christensen <peter@developers.dk>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/ice1712/aureon.c
#   2004/11/15 12:08:44+01:00 perex@suse.cz +3 -3
#   [ALSA] Fix WM8770 Init
#   
#   D:2004/11/15 19:08:44
#   C:ICE1712 driver
#   F:pci/ice1712/aureon.c:1.22->1.23 
#   L:Corrects WM8770 ADC mux initialization
#   Signed-off-by: Peter Christensen <peter@developers.dk>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2004/11/29 08:58:10+01:00 perex@suse.cz 
#   [ALSA] Fix the missing line in the patch for hdsp accurate_ptr
#   
#   RME HDSP driver
#   Fixed missing line in the patch for hdsp accurate_ptr.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/rme9652/hdsp.c
#   2004/11/15 12:06:51+01:00 perex@suse.cz +1 -0
#   [ALSA] Fix the missing line in the patch for hdsp accurate_ptr
#   
#   D:2004/11/15 19:06:51
#   C:RME HDSP driver
#   F:pci/rme9652/hdsp.c:1.73->1.74 
#   L:Fixed missing line in the patch for hdsp accurate_ptr.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2004/11/28 19:18:16+00:00 dwmw2@dwmw2.baythorne.internal 
#   Merge dwmw2.baythorne.internal:/inst/bk/linus-2.6
#   into dwmw2.baythorne.internal:/inst/bk/mtd-2.6
# 
# drivers/mtd/maps/ts5500_flash.c
#   2004/11/28 19:18:10+00:00 dwmw2@dwmw2.baythorne.internal +0 -4
#   Auto merged
# 
# drivers/mtd/maps/scx200_docflash.c
#   2004/11/28 19:18:10+00:00 dwmw2@dwmw2.baythorne.internal +0 -2
#   Auto merged
# 
# drivers/mtd/maps/scb2_flash.c
#   2004/11/28 19:18:10+00:00 dwmw2@dwmw2.baythorne.internal +0 -2
#   Auto merged
# 
# drivers/mtd/maps/sc520cdp.c
#   2004/11/28 19:18:10+00:00 dwmw2@dwmw2.baythorne.internal +0 -6
#   Auto merged
# 
# drivers/mtd/maps/sbc_gxx.c
#   2004/11/28 19:18:10+00:00 dwmw2@dwmw2.baythorne.internal +0 -2
#   Auto merged
# 
# drivers/mtd/maps/physmap.c
#   2004/11/28 19:18:10+00:00 dwmw2@dwmw2.baythorne.internal +0 -3
#   Auto merged
# 
# drivers/mtd/maps/pci.c
#   2004/11/28 19:18:10+00:00 dwmw2@dwmw2.baythorne.internal +0 -3
#   Auto merged
# 
# drivers/mtd/maps/nettel.c
#   2004/11/28 19:18:10+00:00 dwmw2@dwmw2.baythorne.internal +0 -2
#   Auto merged
# 
# drivers/mtd/maps/netsc520.c
#   2004/11/28 19:18:10+00:00 dwmw2@dwmw2.baythorne.internal +0 -3
#   Auto merged
# 
# drivers/mtd/maps/l440gx.c
#   2004/11/28 19:18:10+00:00 dwmw2@dwmw2.baythorne.internal +0 -3
#   Auto merged
# 
# drivers/mtd/maps/ichxrom.c
#   2004/11/28 19:18:10+00:00 dwmw2@dwmw2.baythorne.internal +0 -3
#   Auto merged
# 
# drivers/mtd/maps/elan-104nc.c
#   2004/11/28 19:18:10+00:00 dwmw2@dwmw2.baythorne.internal +0 -1
#   Auto merged
# 
# drivers/mtd/maps/ebony.c
#   2004/11/28 19:18:10+00:00 dwmw2@dwmw2.baythorne.internal +0 -6
#   Auto merged
# 
# drivers/mtd/maps/dilnetpc.c
#   2004/11/28 19:18:10+00:00 dwmw2@dwmw2.baythorne.internal +0 -3
#   Auto merged
# 
# drivers/mtd/maps/amd76xrom.c
#   2004/11/28 19:18:10+00:00 dwmw2@dwmw2.baythorne.internal +0 -3
#   Auto merged
# 
# MAINTAINERS
#   2004/11/28 19:18:10+00:00 dwmw2@dwmw2.baythorne.internal +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/11/28 19:16:07+00:00 dwmw2@dwmw2.baythorne.internal 
#           NULL noise removal, missing __iomem in a couple of declarations,
#   removal of bogus cast to void * in iounmap() calls.
#   
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# drivers/mtd/maps/ts5500_flash.c
#   2004/11/28 09:52:32+00:00 dwmw2@dwmw2.baythorne.internal +5 -5
#           NULL noise removal, missing __iomem in a couple of declarations,
#   removal of bogus cast to void * in iounmap() calls.
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
# 
# drivers/mtd/maps/scx200_docflash.c
#   2004/11/28 09:52:32+00:00 dwmw2@dwmw2.baythorne.internal +3 -3
#           NULL noise removal, missing __iomem in a couple of declarations,
#   removal of bogus cast to void * in iounmap() calls.
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
# 
# drivers/mtd/maps/scb2_flash.c
#   2004/11/28 09:52:32+00:00 dwmw2@dwmw2.baythorne.internal +3 -3
#           NULL noise removal, missing __iomem in a couple of declarations,
#   removal of bogus cast to void * in iounmap() calls.
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
# 
# drivers/mtd/maps/sc520cdp.c
#   2004/11/28 09:52:32+00:00 dwmw2@dwmw2.baythorne.internal +7 -7
#           NULL noise removal, missing __iomem in a couple of declarations,
#   removal of bogus cast to void * in iounmap() calls.
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
# 
# drivers/mtd/maps/sbc_gxx.c
#   2004/11/28 09:52:32+00:00 dwmw2@dwmw2.baythorne.internal +3 -3
#           NULL noise removal, missing __iomem in a couple of declarations,
#   removal of bogus cast to void * in iounmap() calls.
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
# 
# drivers/mtd/maps/physmap.c
#   2004/11/28 09:52:32+00:00 dwmw2@dwmw2.baythorne.internal +4 -4
#           NULL noise removal, missing __iomem in a couple of declarations,
#   removal of bogus cast to void * in iounmap() calls.
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
# 
# drivers/mtd/maps/pci.c
#   2004/11/28 09:52:32+00:00 dwmw2@dwmw2.baythorne.internal +4 -4
#           NULL noise removal, missing __iomem in a couple of declarations,
#   removal of bogus cast to void * in iounmap() calls.
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
# 
# drivers/mtd/maps/nettel.c
#   2004/11/28 09:52:32+00:00 dwmw2@dwmw2.baythorne.internal +3 -3
#           NULL noise removal, missing __iomem in a couple of declarations,
#   removal of bogus cast to void * in iounmap() calls.
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
# 
# drivers/mtd/maps/netsc520.c
#   2004/11/28 09:52:32+00:00 dwmw2@dwmw2.baythorne.internal +4 -4
#           NULL noise removal, missing __iomem in a couple of declarations,
#   removal of bogus cast to void * in iounmap() calls.
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
# 
# drivers/mtd/maps/l440gx.c
#   2004/11/28 09:52:32+00:00 dwmw2@dwmw2.baythorne.internal +4 -4
#           NULL noise removal, missing __iomem in a couple of declarations,
#   removal of bogus cast to void * in iounmap() calls.
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
# 
# drivers/mtd/maps/ichxrom.c
#   2004/11/28 09:52:32+00:00 dwmw2@dwmw2.baythorne.internal +4 -4
#           NULL noise removal, missing __iomem in a couple of declarations,
#   removal of bogus cast to void * in iounmap() calls.
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
# 
# drivers/mtd/maps/elan-104nc.c
#   2004/11/28 09:52:32+00:00 dwmw2@dwmw2.baythorne.internal +2 -2
#           NULL noise removal, missing __iomem in a couple of declarations,
#   removal of bogus cast to void * in iounmap() calls.
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
# 
# drivers/mtd/maps/ebony.c
#   2004/11/28 09:52:32+00:00 dwmw2@dwmw2.baythorne.internal +7 -8
#           NULL noise removal, missing __iomem in a couple of declarations,
#   removal of bogus cast to void * in iounmap() calls.
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
# 
# drivers/mtd/maps/dilnetpc.c
#   2004/11/28 09:52:32+00:00 dwmw2@dwmw2.baythorne.internal +4 -4
#           NULL noise removal, missing __iomem in a couple of declarations,
#   removal of bogus cast to void * in iounmap() calls.
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
# 
# drivers/mtd/maps/amd76xrom.c
#   2004/11/28 09:52:32+00:00 dwmw2@dwmw2.baythorne.internal +4 -4
#           NULL noise removal, missing __iomem in a couple of declarations,
#   removal of bogus cast to void * in iounmap() calls.
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
# 
# ChangeSet
#   2004/11/28 00:40:38+00:00 dwmw2@shinybook.infradead.org 
#   Merge shinybook.infradead.org:/home/dwmw2/bk/linus-2.6
#   into shinybook.infradead.org:/home/dwmw2/bk/mtd-2.6
# 
# MAINTAINERS
#   2004/11/28 00:40:30+00:00 dwmw2@shinybook.infradead.org +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/11/28 00:33:43+00:00 dwmw2@shinybook.infradead.org 
#   rslib: Spelling fixes.
#   
#   Some of the fixes from Joe Perches <joe@perches.com> got missed out
#   of the last update.
#   
#   Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# lib/reed_solomon/reed_solomon.c
#   2004/11/28 00:33:19+00:00 dwmw2@shinybook.infradead.org +8 -8
#   revision 1.5
#   date: 2004/10/22 15:41:47;  author: gleixner;  state: Exp;  lines: +8 -8
#   Joe Perches <joe@perches.com> provided the spelling and
#   grammar fixes for Documentation.
#   I'm happy if somebody takes care of my language related
#   nescience. :)
# 
# ChangeSet
#   2004/11/28 00:19:24+00:00 dwmw2@shinybook.infradead.org 
#   JFFS2: Allow NAND driver to disable virtual eraseblocks.
#   
#   In order to keep the RAM usage down with large devices and smaller
#   erase block sizes, we were using blocks in JFFS2 larger than the 
#   physical erase size. This means that bad blocks lose a lot more space
#   though; allow it to be disabled.
#   
#   Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# include/mtd/mtd-abi.h
#   2004/11/28 00:19:02+00:00 dwmw2@shinybook.infradead.org +2 -1
#   revision 1.7
#   date: 2004/11/23 15:37:32;  author: gleixner;  state: Exp;  lines: +2 -1
#   Disable virtual eraseblocks on request (MTD_NO_VIRTBLOCKS) is set. Be careful this can eat up a lot of memory
# 
# fs/jffs2/super.c
#   2004/11/28 00:19:01+00:00 dwmw2@shinybook.infradead.org +5 -2
#   revision 1.104
#   date: 2004/11/23 15:37:31;  author: gleixner;  state: Exp;  lines: +5 -2
#   Disable virtual eraseblocks on request (MTD_NO_VIRTBLOCKS) is set. Be careful this can eat up a lot of memory
# 
# fs/jffs2/fs.c
#   2004/11/28 00:19:01+00:00 dwmw2@shinybook.infradead.org +12 -7
#   revision 1.50
#   date: 2004/11/23 15:37:31;  author: gleixner;  state: Exp;  lines: +12 -7
#   Disable virtual eraseblocks on request (MTD_NO_VIRTBLOCKS) is set. Be careful this can eat up a lot of memory
# 
# fs/jffs2/build.c
#   2004/11/28 00:19:01+00:00 dwmw2@shinybook.infradead.org +7 -2
#   revision 1.68
#   date: 2004/11/27 13:38:10;  author: gleixner;  state: Exp;  lines: +3 -1
#   include headers to make it build
#   ----------------------------
#   revision 1.67
#   date: 2004/11/23 15:37:31;  author: gleixner;  state: Exp;  lines: +5 -2
#   Disable virtual eraseblocks on request (MTD_NO_VIRTBLOCKS) is set. Be careful this can eat up a lot of memory
# 
# ChangeSet
#   2004/11/28 00:15:04+00:00 dwmw2@shinybook.infradead.org 
#   JFFS2: Split eraseblock refiling into separate function
#   
#   ...in preparation for further cleanups from Estelle Hammache which
#   will need to call it from elsewhere.
#   
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# fs/jffs2/wbuf.c
#   2004/11/28 00:14:42+00:00 dwmw2@shinybook.infradead.org +21 -16
#   revision 1.82
#   date: 2004/11/20 22:08:31;  author: dwmw2;  state: Exp;  lines: +21 -16
#   separate out block refiling
# 
# ChangeSet
#   2004/11/28 00:11:59+00:00 dwmw2@shinybook.infradead.org 
#   JFFS2: Initialise bad_count for each eraseblock correctly.
#   
#   Patch from Estelle Hammache <estelle.hammache@st.com>
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# fs/jffs2/build.c
#   2004/11/28 00:11:36+00:00 dwmw2@shinybook.infradead.org +2 -1
#   revision 1.66
#   date: 2004/11/20 19:18:07;  author: dwmw2;  state: Exp;  lines: +2 -1
#   Patch from Estelle Hammache: initialise bad_count.
# 
# ChangeSet
#   2004/11/28 00:07:08+00:00 dwmw2@shinybook.infradead.org 
#   JFFS2: Various fixes for recent RAM use reduction.
#   
#   We recently started trying to merge the jffs2_raw_node_ref structures
#   for adjacent obsolete nodes. Fix a bunch of problems in that:
#    - Free inode cache structure for a dead inode which is now completely gone.
#    - Fix races vs. erase code which also walks the same lists.
#    - Fix BUG() when trying to merge with a node which still belongs to an inode.
#   
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# fs/jffs2/nodemgmt.c
#   2004/11/28 00:06:46+00:00 dwmw2@shinybook.infradead.org +60 -16
#   revision 1.115
#   date: 2004/11/22 11:07:21;  author: dwmw2;  state: Exp;  lines: +5 -5
#   Fix another bug in the merging of obsolete nodes
#   ----------------------------
#   revision 1.114
#   date: 2004/11/20 16:39:59;  author: dwmw2;  state: Exp;  lines: +6 -2
#   Add another reason why we can't currently merge obsolete node refs on
#   NAND.
#   ----------------------------
#   revision 1.113
#   date: 2004/11/20 16:25:19;  author: dwmw2;  state: Exp;  lines: +7 -1
#   Free inocache if it's all gone.
#   ----------------------------
#   revision 1.112
#   date: 2004/11/20 14:25:05;  author: dwmw2;  state: Exp;  lines: +46 -12
#   Fix race in jffs2_mark_node_obsolete(). There was nothing preventing the
#   block from being erased and 'ref' from being freed before we even got
#   around to marking it obsolete and then trying to merge nodes.
# 
# fs/jffs2/build.c
#   2004/11/28 00:06:46+00:00 dwmw2@shinybook.infradead.org +5 -2
#   revision 1.65
#   date: 2004/11/20 16:19:38;  author: dwmw2;  state: Exp;  lines: +5 -2
#   Fix freeing of refs belonging to unlinked inode
# 
# ChangeSet
#   2004/11/27 23:58:00+00:00 dwmw2@shinybook.infradead.org 
#   JFFS2: Fix oops in read_inode.
#   
#   If the node with lowest version in a file was in the range
#   0xfffff000 onwards, we oopsed because our rounding was bogus.
#   
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# fs/jffs2/readinode.c
#   2004/11/27 23:57:39+00:00 dwmw2@shinybook.infradead.org +2 -2
#   revision 1.117
#   date: 2004/11/20 18:06:54;  author: dwmw2;  state: Exp;  lines: +2 -2
#   Fix oops if we happen to have a node in the range 0xfffff000 onwards as the
#   lowest versioned node in the inode.
# 
# ChangeSet
#   2004/11/27 23:36:47+00:00 dwmw2@shinybook.infradead.org 
#   MTD: NAND flash simulator
#   
#   We want to contribute the NAND flash simulator which we successfully use 
#   when developing JFFS2. It is very useful tool which helps to develop 
#   without real flash.
#   
#   It supports several options which allow to select which flash type to 
#   emulate (just flash IDs which are in nand_ids.c file). See modinfo for 
#   other options.
#   
#   Signed-off-by: Artem B. Bityuckiy <dedekind@yandex.ru>
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# drivers/mtd/nand/nandsim.c
#   2004/11/27 23:36:22+00:00 dwmw2@shinybook.infradead.org +1619 -0
# 
# drivers/mtd/nand/nandsim.c
#   2004/11/27 23:36:22+00:00 dwmw2@shinybook.infradead.org +0 -0
#   BitKeeper file /home/dwmw2/bk/mtd-2.6/drivers/mtd/nand/nandsim.c
# 
# drivers/mtd/nand/Makefile
#   2004/11/27 23:36:22+00:00 dwmw2@shinybook.infradead.org +2 -1
#   revision 1.15
#   date: 2004/11/26 12:28:22;  author: dedekind;  state: Exp;  lines: +2 -1
#   Add the NAND simulator's records
# 
# drivers/mtd/nand/Kconfig
#   2004/11/27 23:36:22+00:00 dwmw2@shinybook.infradead.org +9 -1
#   revision 1.24
#   date: 2004/11/26 12:28:22;  author: dedekind;  state: Exp;  lines: +9 -1
#   Add the NAND simulator's records
# 
# ChangeSet
#   2004/11/27 23:18:34+00:00 dwmw2@shinybook.infradead.org 
#   MTD: Support NOR and NAND flash on Sharp SL Series PDAs.
#   
#   Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# drivers/mtd/nand/sharpsl.c
#   2004/11/27 23:18:12+00:00 dwmw2@shinybook.infradead.org +273 -0
# 
# drivers/mtd/nand/sharpsl.c
#   2004/11/27 23:18:12+00:00 dwmw2@shinybook.infradead.org +0 -0
#   BitKeeper file /home/dwmw2/bk/mtd-2.6/drivers/mtd/nand/sharpsl.c
# 
# drivers/mtd/maps/sharpsl-flash.c
#   2004/11/27 23:18:10+00:00 dwmw2@shinybook.infradead.org +101 -0
# 
# drivers/mtd/nand/Makefile
#   2004/11/27 23:18:10+00:00 dwmw2@shinybook.infradead.org +2 -1
#   revision 1.14
#   date: 2004/11/24 19:33:56;  author: rpurdie;  state: Exp;  lines: +2 -1
#   Add the sharpsl nand driver. This supports the NAND chip on the Sharp SL Series
#   of PDAs.
# 
# drivers/mtd/nand/Kconfig
#   2004/11/27 23:18:10+00:00 dwmw2@shinybook.infradead.org +6 -1
#   revision 1.23
#   date: 2004/11/24 19:33:56;  author: rpurdie;  state: Exp;  lines: +6 -1
#   Add the sharpsl nand driver. This supports the NAND chip on the Sharp SL Series
#   of PDAs.
# 
# drivers/mtd/maps/sharpsl-flash.c
#   2004/11/27 23:18:10+00:00 dwmw2@shinybook.infradead.org +0 -0
#   BitKeeper file /home/dwmw2/bk/mtd-2.6/drivers/mtd/maps/sharpsl-flash.c
# 
# drivers/mtd/maps/Makefile
#   2004/11/27 23:18:10+00:00 dwmw2@shinybook.infradead.org +2 -1
#   revision 1.20
#   date: 2004/11/24 19:42:51;  author: rpurdie;  state: Exp;  lines: +2 -1
#   Add mapping for the flash chip on Sharp SL Series PDAs.
# 
# drivers/mtd/maps/Kconfig
#   2004/11/27 23:18:10+00:00 dwmw2@shinybook.infradead.org +7 -1
#   revision 1.38
#   date: 2004/11/24 19:42:51;  author: rpurdie;  state: Exp;  lines: +7 -1
#   Add mapping for the flash chip on Sharp SL Series PDAs.
# 
# ChangeSet
#   2004/11/27 23:02:48+00:00 dwmw2@shinybook.infradead.org 
#   MTD: Fix timing setup for NAND flash on Samsung S3C2410.
#   
#   Spotted by Shannon Holland.
#   
#   Signed-off-by: Ben Dooks <ben@simtec.co.uk>
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# drivers/mtd/nand/s3c2410.c
#   2004/11/27 23:02:28+00:00 dwmw2@shinybook.infradead.org +2 -2
#   revision 1.6
#   date: 2004/11/24 12:25:48;  author: bjd;  state: Exp;  lines: +2 -2
#   correct timing setup to use plat->twrph1 instead of
#   plat->twrph0 for timing setup for the NAND controllers
#   twrph1 configuration
#   
#   Thanks to Shannon Holland for pointing this out
# 
# ChangeSet
#   2004/11/27 22:59:41+00:00 dwmw2@shinybook.infradead.org 
#   MTD: Fix oops on erase in NFTL/INFTL (again).
#   
#   Only this time, set the field we were dereferencing _after_ we zero it not before.
#   
#   Signed-off-by: Kalev Lember <kalev@colleduc.ee>
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# drivers/mtd/nftlmount.c
#   2004/11/27 22:59:16+00:00 dwmw2@shinybook.infradead.org +3 -4
#   revision 1.40
#   date: 2004/11/22 14:38:29;  author: kalev;  state: Exp;  lines: +3 -4
#   fix oops
# 
# drivers/mtd/inftlmount.c
#   2004/11/27 22:59:16+00:00 dwmw2@shinybook.infradead.org +3 -4
#   revision 1.16
#   date: 2004/11/22 13:50:53;  author: kalev;  state: Exp;  lines: +3 -4
#   fix oops
#   (the instr was zeroed _after_  setting instr->mtd)
# 
# ChangeSet
#   2004/11/27 22:53:43+00:00 dwmw2@shinybook.infradead.org 
#   MTD: Make phram work again
#   
#   o Add simple usage example.
#   o Fix up unit handling (k, M. G).
#   o Use correct size limit for setup string.
#   o Remove pointless printk message.
#   o Fix mtdblock to not allocate a read-modify-write buffer for CAP_RAM
#     devices (and fail to do so, returning an error).
#   
#   Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de>
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# drivers/mtd/mtdblock.c
#   2004/11/27 22:53:20+00:00 dwmw2@shinybook.infradead.org +2 -2
#   revision 1.66
#   date: 2004/11/25 13:52:52;  author: joern;  state: Exp;  lines: +2 -2
#   Fix up slram and phram.
# 
# drivers/mtd/devices/phram.c
#   2004/11/27 22:53:20+00:00 dwmw2@shinybook.infradead.org +10 -6
#   revision 1.6
#   date: 2004/11/25 16:51:09;  author: joern;  state: Exp;  lines: +2 -2
#   Brown Paperbag category.  Patch should be self-explaining to anyone who
#   knows how to deal with multi-dimensional arrays in c (i.e. not me).
#   ----------------------------
#   revision 1.5
#   date: 2004/11/25 13:54:09;  author: joern;  state: Exp;  lines: +6 -4
#   Make dwmw2 happy and add an i to [kMG].
#   ----------------------------
#   revision 1.4
#   date: 2004/11/25 13:52:53;  author: joern;  state: Exp;  lines: +7 -5
#   Fix up slram and phram.
# 
# ChangeSet
#   2004/11/27 22:47:33+00:00 dwmw2@shinybook.infradead.org 
#   MTD: mtdpart_setup() is used from platform code. Remove 'static'.
#   
#   Signed-off-by: Jarkko Lavinen <jarkko.lavinen@nokia.com>
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# drivers/mtd/cmdlinepart.c
#   2004/11/27 22:47:11+00:00 dwmw2@shinybook.infradead.org +4 -2
#   revision 1.17
#   date: 2004/11/26 11:18:47;  author: lavinen;  state: Exp;  lines: +4 -2
#   Changed mtdpart_setup() back to public,
# 
# ChangeSet
#   2004/11/27 22:42:45+00:00 dwmw2@shinybook.infradead.org 
#   MTD: Fix RedBoot FIS table detection.
#   
#   The redboot partitioning code currently searches for a FIS table entry
#   named "RedBoot" (including the trailing \0) in one of the first three
#   entries to try and verify that the sector it is looking at really is a
#   FIS partition table.
#   
#   Firstly it fails when RedBoot is stored in some other Flash chip such as
#   a boot PROM, in this case there is no "RedBoot" entry in the partition
#   table. However there will always be a "FIS directory" entry in any valid
#   FIS directory.
#           
#   Secondly it can fail since the RedBoot entry is not always in the first
#   3 slots -- this can happen for example on an x86 based platform where
#   the processor expects the boot device to be at the top of memory rather
#   than the bottom and so RedBoot is at the end of the flash device.
#   Equally when using "FIS directory" as the entry to search for it very
#   likely is not in the first three since the directory is typically at the
#   end of the flash.
#   
#   Signed-off-by: Ian Campbell <icampbell@arcom.com>
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# drivers/mtd/redboot.c
#   2004/11/27 22:42:22+00:00 dwmw2@shinybook.infradead.org +24 -8
#   revision 1.17
#   date: 2004/11/22 11:33:56;  author: ijc;  state: Exp;  lines: +14 -3
#   RedBoot has a compile time configuration option called
#   CYGNUM_REDBOOT_FIS_DIRECTORY_BLOCK. Add a similar option
#   to the redboot parsing code.
#   ----------------------------
#   revision 1.16
#   date: 2004/11/22 11:32:13;  author: ijc;  state: Exp;  lines: +11 -6
#   Search for a directory entry named "FIS directory" rather the "RedBoot"
#   since RedBoot can potentially be in another device but there should
#   always be a FIS directory present (or we wouldn't be looking for it...).
#   
#   Also search all blocks not just the first 3 since the directory is often at
#   the end of flash rather than the beginning.
# 
# drivers/mtd/Kconfig
#   2004/11/27 22:42:22+00:00 dwmw2@shinybook.infradead.org +20 -3
#   revision 1.7
#   date: 2004/11/22 11:33:56;  author: ijc;  state: Exp;  lines: +20 -3
#   RedBoot has a compile time configuration option called
#   CYGNUM_REDBOOT_FIS_DIRECTORY_BLOCK. Add a similar option
#   to the redboot parsing code.
# 
# ChangeSet
#   2004/11/27 13:35:38+01:00 kaber@coreworks.de 
#   [NETFILTER]: Verify NAT manips have been applied before reversing them in icmp_reply_translation
#   
#   ICMP errors may be generated for packets that don't have
#   all NAT manips applied yet. Verify manips have been applied
#   before reversing them.
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# net/ipv4/netfilter/ip_nat_core.c
#   2004/11/27 13:35:30+01:00 kaber@coreworks.de +36 -0
#   [NETFILTER]: Verify NAT manips have been applied before reversing them in icmp_reply_translation
#   
#   ICMP errors may be generated for packets that don't have
#   all NAT manips applied yet. Verify manips have been applied
#   before reversing them.
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# net/ipv4/netfilter/ip_conntrack_standalone.c
#   2004/11/27 13:35:30+01:00 kaber@coreworks.de +1 -0
#   [NETFILTER]: Verify NAT manips have been applied before reversing them in icmp_reply_translation
#   
#   ICMP errors may be generated for packets that don't have
#   all NAT manips applied yet. Verify manips have been applied
#   before reversing them.
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# ChangeSet
#   2004/11/27 13:26:24+01:00 kaber@coreworks.de 
#   [NETFILTER]: Apply PRE_ROUTING manips in LOCAL_OUT for locally generated icmp errors
#   
#   Locally generated ICMP errors never hit PRE_ROUTING. Fixes invalid
#   addressed ICMP errors for SNATed packets.
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# net/ipv4/netfilter/ip_nat_core.c
#   2004/11/27 13:26:17+01:00 kaber@coreworks.de +8 -0
#   [NETFILTER]: Apply PRE_ROUTING manips in LOCAL_OUT for locally generated icmp errors
#   
#   Locally generated ICMP errors never hit PRE_ROUTING. Fixes invalid
#   addressed ICMP errors for SNATed packets.
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# ChangeSet
#   2004/11/27 13:15:30+01:00 kaber@coreworks.de 
#   [NETFILTER]: Save a level of indentation in icmp_reply_translation
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# net/ipv4/netfilter/ip_nat_core.c
#   2004/11/27 13:15:22+01:00 kaber@coreworks.de +25 -29
#   [NETFILTER]: Save a level of indentation in icmp_reply_translation
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# ChangeSet
#   2004/11/27 12:20:20+01:00 kaber@coreworks.de 
#   [NETFILTER]: Remove CONFIG_IP_NF_NAT_LOCAL config option
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# net/ipv4/netfilter/ip_nat_standalone.c
#   2004/11/27 12:20:13+01:00 kaber@coreworks.de +4 -22
#   [NETFILTER]: Remove CONFIG_IP_NF_NAT_LOCAL config option
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# net/ipv4/netfilter/ip_nat_rule.c
#   2004/11/27 12:20:13+01:00 kaber@coreworks.de +0 -11
#   [NETFILTER]: Remove CONFIG_IP_NF_NAT_LOCAL config option
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# net/ipv4/netfilter/ip_nat_core.c
#   2004/11/27 12:20:13+01:00 kaber@coreworks.de +0 -8
#   [NETFILTER]: Remove CONFIG_IP_NF_NAT_LOCAL config option
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# net/ipv4/netfilter/Kconfig
#   2004/11/27 12:20:13+01:00 kaber@coreworks.de +0 -14
#   [NETFILTER]: Remove CONFIG_IP_NF_NAT_LOCAL config option
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# include/linux/netfilter_ipv4/ip_nat.h
#   2004/11/27 12:20:13+01:00 kaber@coreworks.de +0 -5
#   [NETFILTER]: Remove CONFIG_IP_NF_NAT_LOCAL config option
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# arch/sparc64/defconfig
#   2004/11/27 12:20:13+01:00 kaber@coreworks.de +0 -1
#   [NETFILTER]: Remove CONFIG_IP_NF_NAT_LOCAL config option
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# arch/ppc64/defconfig
#   2004/11/27 12:20:13+01:00 kaber@coreworks.de +0 -1
#   [NETFILTER]: Remove CONFIG_IP_NF_NAT_LOCAL config option
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# arch/ppc64/configs/pSeries_defconfig
#   2004/11/27 12:20:13+01:00 kaber@coreworks.de +0 -1
#   [NETFILTER]: Remove CONFIG_IP_NF_NAT_LOCAL config option
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# arch/ppc64/configs/iSeries_defconfig
#   2004/11/27 12:20:13+01:00 kaber@coreworks.de +0 -1
#   [NETFILTER]: Remove CONFIG_IP_NF_NAT_LOCAL config option
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# arch/ppc64/configs/g5_defconfig
#   2004/11/27 12:20:13+01:00 kaber@coreworks.de +0 -1
#   [NETFILTER]: Remove CONFIG_IP_NF_NAT_LOCAL config option
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# arch/ppc/defconfig
#   2004/11/27 12:20:13+01:00 kaber@coreworks.de +0 -1
#   [NETFILTER]: Remove CONFIG_IP_NF_NAT_LOCAL config option
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# arch/ppc/configs/pplus_defconfig
#   2004/11/27 12:20:13+01:00 kaber@coreworks.de +0 -1
#   [NETFILTER]: Remove CONFIG_IP_NF_NAT_LOCAL config option
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# arch/ppc/configs/pmac_defconfig
#   2004/11/27 12:20:13+01:00 kaber@coreworks.de +0 -1
#   [NETFILTER]: Remove CONFIG_IP_NF_NAT_LOCAL config option
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# arch/ppc/configs/pcore_defconfig
#   2004/11/27 12:20:13+01:00 kaber@coreworks.de +0 -1
#   [NETFILTER]: Remove CONFIG_IP_NF_NAT_LOCAL config option
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# arch/ppc/configs/menf1_defconfig
#   2004/11/27 12:20:13+01:00 kaber@coreworks.de +0 -1
#   [NETFILTER]: Remove CONFIG_IP_NF_NAT_LOCAL config option
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# arch/ppc/configs/k2_defconfig
#   2004/11/27 12:20:13+01:00 kaber@coreworks.de +0 -1
#   [NETFILTER]: Remove CONFIG_IP_NF_NAT_LOCAL config option
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# arch/ppc/configs/ibmchrp_defconfig
#   2004/11/27 12:20:13+01:00 kaber@coreworks.de +0 -1
#   [NETFILTER]: Remove CONFIG_IP_NF_NAT_LOCAL config option
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# arch/ppc/configs/common_defconfig
#   2004/11/27 12:20:13+01:00 kaber@coreworks.de +0 -1
#   [NETFILTER]: Remove CONFIG_IP_NF_NAT_LOCAL config option
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# arch/ppc/configs/apus_defconfig
#   2004/11/27 12:20:13+01:00 kaber@coreworks.de +0 -1
#   [NETFILTER]: Remove CONFIG_IP_NF_NAT_LOCAL config option
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# arch/ppc/configs/adir_defconfig
#   2004/11/27 12:20:13+01:00 kaber@coreworks.de +0 -1
#   [NETFILTER]: Remove CONFIG_IP_NF_NAT_LOCAL config option
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# arch/parisc/configs/n4000_defconfig
#   2004/11/27 12:20:13+01:00 kaber@coreworks.de +0 -1
#   [NETFILTER]: Remove CONFIG_IP_NF_NAT_LOCAL config option
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# arch/parisc/configs/c3000_defconfig
#   2004/11/27 12:20:13+01:00 kaber@coreworks.de +0 -1
#   [NETFILTER]: Remove CONFIG_IP_NF_NAT_LOCAL config option
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# arch/parisc/configs/a500_defconfig
#   2004/11/27 12:20:13+01:00 kaber@coreworks.de +0 -1
#   [NETFILTER]: Remove CONFIG_IP_NF_NAT_LOCAL config option
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# arch/mips/defconfig
#   2004/11/27 12:20:13+01:00 kaber@coreworks.de +0 -1
#   [NETFILTER]: Remove CONFIG_IP_NF_NAT_LOCAL config option
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# arch/mips/configs/rm200_defconfig
#   2004/11/27 12:20:13+01:00 kaber@coreworks.de +0 -1
#   [NETFILTER]: Remove CONFIG_IP_NF_NAT_LOCAL config option
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# arch/mips/configs/ip22_defconfig
#   2004/11/27 12:20:13+01:00 kaber@coreworks.de +0 -1
#   [NETFILTER]: Remove CONFIG_IP_NF_NAT_LOCAL config option
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# arch/m68k/configs/sun3x_defconfig
#   2004/11/27 12:20:13+01:00 kaber@coreworks.de +0 -1
#   [NETFILTER]: Remove CONFIG_IP_NF_NAT_LOCAL config option
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# arch/m68k/configs/sun3_defconfig
#   2004/11/27 12:20:13+01:00 kaber@coreworks.de +0 -1
#   [NETFILTER]: Remove CONFIG_IP_NF_NAT_LOCAL config option
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# arch/m68k/configs/q40_defconfig
#   2004/11/27 12:20:13+01:00 kaber@coreworks.de +0 -1
#   [NETFILTER]: Remove CONFIG_IP_NF_NAT_LOCAL config option
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# arch/m68k/configs/mvme16x_defconfig
#   2004/11/27 12:20:13+01:00 kaber@coreworks.de +0 -1
#   [NETFILTER]: Remove CONFIG_IP_NF_NAT_LOCAL config option
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# arch/m68k/configs/mvme147_defconfig
#   2004/11/27 12:20:13+01:00 kaber@coreworks.de +0 -1
#   [NETFILTER]: Remove CONFIG_IP_NF_NAT_LOCAL config option
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# arch/m68k/configs/mac_defconfig
#   2004/11/27 12:20:13+01:00 kaber@coreworks.de +0 -1
#   [NETFILTER]: Remove CONFIG_IP_NF_NAT_LOCAL config option
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# arch/m68k/configs/hp300_defconfig
#   2004/11/27 12:20:13+01:00 kaber@coreworks.de +0 -1
#   [NETFILTER]: Remove CONFIG_IP_NF_NAT_LOCAL config option
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# arch/m68k/configs/bvme6000_defconfig
#   2004/11/27 12:20:13+01:00 kaber@coreworks.de +0 -1
#   [NETFILTER]: Remove CONFIG_IP_NF_NAT_LOCAL config option
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# arch/m68k/configs/atari_defconfig
#   2004/11/27 12:20:13+01:00 kaber@coreworks.de +0 -1
#   [NETFILTER]: Remove CONFIG_IP_NF_NAT_LOCAL config option
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# arch/m68k/configs/apollo_defconfig
#   2004/11/27 12:20:13+01:00 kaber@coreworks.de +0 -1
#   [NETFILTER]: Remove CONFIG_IP_NF_NAT_LOCAL config option
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# arch/m68k/configs/amiga_defconfig
#   2004/11/27 12:20:13+01:00 kaber@coreworks.de +0 -1
#   [NETFILTER]: Remove CONFIG_IP_NF_NAT_LOCAL config option
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# arch/i386/defconfig
#   2004/11/27 12:20:13+01:00 kaber@coreworks.de +0 -1
#   [NETFILTER]: Remove CONFIG_IP_NF_NAT_LOCAL config option
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# arch/arm/configs/ixp4xx_defconfig
#   2004/11/27 12:20:13+01:00 kaber@coreworks.de +0 -1
#   [NETFILTER]: Remove CONFIG_IP_NF_NAT_LOCAL config option
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# arch/arm/configs/ebsa110_defconfig
#   2004/11/27 12:20:12+01:00 kaber@coreworks.de +0 -1
#   [NETFILTER]: Remove CONFIG_IP_NF_NAT_LOCAL config option
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# arch/alpha/defconfig
#   2004/11/27 12:20:12+01:00 kaber@coreworks.de +0 -1
#   [NETFILTER]: Remove CONFIG_IP_NF_NAT_LOCAL config option
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# ChangeSet
#   2004/11/27 12:14:54+01:00 kaber@coreworks.de 
#   [NETFILTER]: Release dst_entry in PRE_ROUTING after NAT
#   
#   Fixes NAT on loopback.
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# net/ipv4/netfilter/ip_nat_standalone.c
#   2004/11/27 12:14:47+01:00 kaber@coreworks.de +24 -1
#   [NETFILTER]: Release dst_entry in PRE_ROUTING after NAT
#   
#   Fixes NAT on loopback.
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# ChangeSet
#   2004/11/26 11:50:43-06:00 bunk@stusta.de 
#   [PATCH] remove bouncing email address of Deanna Bonds
#   
#   The patch below (applies against both 2.4 and 2.6) removes the bouncing
#   email address of Deanna Bonds (I didn't find a nmore recent address).
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
# 
# drivers/scsi/dpti.h
#   2004/11/24 12:23:56-06:00 bunk@stusta.de +0 -1
#   remove bouncing email address of Deanna Bonds
# 
# drivers/scsi/dpt_i2o.c
#   2004/11/24 12:24:37-06:00 bunk@stusta.de +0 -1
#   remove bouncing email address of Deanna Bonds
# 
# drivers/scsi/dpt/dpti_ioctl.h
#   2004/11/24 12:24:27-06:00 bunk@stusta.de +0 -1
#   remove bouncing email address of Deanna Bonds
# 
# drivers/scsi/aacraid/README
#   2004/11/24 12:24:16-06:00 bunk@stusta.de +1 -1
#   remove bouncing email address of Deanna Bonds
# 
# ChangeSet
#   2004/11/26 11:47:06-06:00 bunk@stusta.de 
#   [PATCH] SCSI aic7xxx_old.c: make a function static
#   
#   The patch below makes the needlessly global function aic7xxx_info 
#   static.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
# 
# drivers/scsi/aic7xxx_old/aic7xxx_proc.c
#   2004/11/13 10:16:45-06:00 bunk@stusta.de +1 -1
#   SCSI aic7xxx_old.c: make a function static
# 
# drivers/scsi/aic7xxx_old.c
#   2004/11/13 10:16:12-06:00 bunk@stusta.de +1 -1
#   SCSI aic7xxx_old.c: make a function static
# 
# ChangeSet
#   2004/11/26 11:45:27-06:00 jejb@mulgrave.(none) 
#   LSI Logic - SAS and FC PCI ID's
#   
#   From: 	Moore, Eric Dean <Eric.Moore@lsil.com>
#   
#   Here are new PCI ID's for SAS and Fibre Channel
#   LSI Logic controllers.
#   
#   Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
# 
# include/linux/pci_ids.h
#   2004/11/26 11:44:15-06:00 jejb@mulgrave.(none) +10 -0
#   LSI Logic - SAS and FC PCI ID's
# 
# ChangeSet
#   2004/11/26 11:33:06-06:00 jejb@mulgrave.(none) 
#   fixup dynamic scan aids EXPORT_SYMBOL mismerge
#   
#   OK, so I exported the wrong symbols ...
#   
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
# 
# drivers/scsi/scsi_scan.c
#   2004/11/26 11:31:38-06:00 jejb@mulgrave.(none) +2 -1
#   fixup dynamic scan aids EXPORT_SYMBOL mismerge
# 
# ChangeSet
#   2004/11/26 10:16:03-06:00 jejb@mulgrave.(none) 
#   scsi: 	LLDD dynamic scan aids
#   
#   From: 	James.Smart@Emulex.Com
#   
#   With rejection fixes around the removal of scsi_syms.c
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
# 
# include/scsi/scsi_host.h
#   2004/11/26 10:15:26-06:00 jejb@mulgrave.(none) +3 -0
#   scsi: 	LLDD dynamic scan aids
# 
# drivers/scsi/scsi_scan.c
#   2004/11/26 10:15:26-06:00 jejb@mulgrave.(none) +13 -0
#   scsi: 	LLDD dynamic scan aids
# 
# ChangeSet
#   2004/11/26 10:10:46-06:00 axboe@suse.de 
#   [PATCH] kill locking around scsi_done()
#   
#   Lets show the mid layer as a good example and remove the host lock
#   around the scsi_done() call.
#   
#   Signed-off-by: Jens Axboe <axboe@suse.de>
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
#   
#   ===== drivers/scsi/scsi.c 1.148 vs edited =====
# 
# drivers/scsi/scsi.c
#   2004/11/20 16:25:38-06:00 axboe@suse.de +0 -2
#   kill locking around scsi_done()
# 
# ChangeSet
#   2004/11/26 10:07:03-06:00 bunk@stusta.de 
#   [PATCH] kill scsi_syms.c
#   
#   The patch below removes scsi_syms.c and moves the EXPORT_SYMBOL's to the
#   files where the actual functions are.
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
# 
# drivers/scsi/scsicam.c
#   2004/11/20 14:31:54-06:00 bunk@stusta.de +3 -0
#   kill scsi_syms.c
# 
# drivers/scsi/scsi_sysfs.c
#   2004/11/20 14:44:12-06:00 bunk@stusta.de +3 -0
#   kill scsi_syms.c
# 
# drivers/scsi/scsi_scan.c
#   2004/11/20 14:43:37-06:00 bunk@stusta.de +5 -0
#   kill scsi_syms.c
# 
# drivers/scsi/scsi_lib.c
#   2004/11/20 14:46:26-06:00 bunk@stusta.de +9 -1
#   kill scsi_syms.c
# 
# drivers/scsi/scsi_ioctl.c
#   2004/11/20 14:36:32-06:00 bunk@stusta.de +3 -0
#   kill scsi_syms.c
# 
# drivers/scsi/scsi_error.c
#   2004/11/20 14:46:48-06:00 bunk@stusta.de +6 -0
#   kill scsi_syms.c
# 
# drivers/scsi/scsi.c
#   2004/11/20 14:46:12-06:00 bunk@stusta.de +11 -0
#   kill scsi_syms.c
# 
# drivers/scsi/hosts.c
#   2004/11/20 14:30:51-06:00 bunk@stusta.de +8 -0
#   kill scsi_syms.c
# 
# drivers/scsi/constants.c
#   2004/11/20 14:35:16-06:00 bunk@stusta.de +9 -0
#   kill scsi_syms.c
# 
# drivers/scsi/Makefile
#   2004/11/20 14:26:17-06:00 bunk@stusta.de +1 -1
#   kill scsi_syms.c
# 
# Documentation/scsi/scsi_mid_low_api.txt
#   2004/11/20 14:25:56-06:00 bunk@stusta.de +2 -2
#   kill scsi_syms.c
# 
# BitKeeper/deleted/.del-scsi_syms.c~8c75b2d48ed73d87
#   2004/11/26 10:06:12-06:00 bunk@stusta.de +0 -0
#   Delete: drivers/scsi/scsi_syms.c
# 
# ChangeSet
#   2004/11/25 12:07:52-06:00 jejb@mulgrave.(none) 
#   convert eata to pass pointers around
#   
#   From: 	Christoph Hellwig <hch@lst.de>
#   
#   pass pointers to Scsi_Host and the private data around instead of using
#   indices into global arrays all over the place.
#   
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
# 
# drivers/scsi/eata.c
#   2004/11/25 12:05:43-06:00 jejb@mulgrave.(none) +291 -298
#   convert eata to pass pointers around
# 
# ChangeSet
#   2004/11/25 11:54:54-06:00 hch@lst.de 
#   [PATCH] feed eata.c through Lindent
#   
#   the driver oopses on load for me currently, but to debug it I need to
#   actually be able to read the source..
#   
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
# 
# drivers/scsi/eata.c
#   2004/11/02 07:28:36-06:00 hch@lst.de +1770 -1568
#   feed eata.c through Lindent
# 
# ChangeSet
#   2004/11/25 11:08:32-06:00 jejb@mulgrave.(none) 
#   Merge ssh://linux-scsi@linux-scsi.bkbits.net/scsi-misc-2.6
#   into mulgrave.(none):/home/jejb/BK/scsi-misc-2.6
# 
# drivers/scsi/hosts.c
#   2004/11/25 11:08:25-06:00 jejb@mulgrave.(none) +0 -0
#   Auto merged
# 
# drivers/scsi/Kconfig
#   2004/11/25 11:08:25-06:00 jejb@mulgrave.(none) +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/11/24 00:04:10-08:00 lcapitulino@conectiva.com.br 
#   [NET]: __sock_create() cleanup
#   
#   The 'i' variable in net/socket.c::__sock_create() is not necessary.  It's
#   have been used to store error codes but there is an 'err' variable already.
#   
#   Signed-off-by: Luiz Capitulino <lcapitulino@conectiva.com.br>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/socket.c
#   2004/11/24 00:03:51-08:00 lcapitulino@conectiva.com.br +6 -8
#   [NET]: __sock_create() cleanup
#   
#   The 'i' variable in net/socket.c::__sock_create() is not necessary.  It's
#   have been used to store error codes but there is an 'err' variable already.
#   
#   Signed-off-by: Luiz Capitulino <lcapitulino@conectiva.com.br>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# ChangeSet
#   2004/11/23 23:57:00-08:00 ahendry@tusc.com.au 
#   [X25]: Remove unused header files.
#   
#   Signed-off-by: Andrew Hendry <ahendry@tusc.com.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/x25/x25_timer.c
#   2004/11/23 23:56:41-08:00 ahendry@tusc.com.au +0 -14
#   [X25]: Remove unused header files.
#   
#   Signed-off-by: Andrew Hendry <ahendry@tusc.com.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/x25/x25_subr.c
#   2004/11/23 23:56:41-08:00 ahendry@tusc.com.au +0 -14
#   [X25]: Remove unused header files.
#   
#   Signed-off-by: Andrew Hendry <ahendry@tusc.com.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/x25/x25_out.c
#   2004/11/23 23:56:41-08:00 ahendry@tusc.com.au +0 -13
#   [X25]: Remove unused header files.
#   
#   Signed-off-by: Andrew Hendry <ahendry@tusc.com.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/x25/x25_link.c
#   2004/11/23 23:56:41-08:00 ahendry@tusc.com.au +0 -13
#   [X25]: Remove unused header files.
#   
#   Signed-off-by: Andrew Hendry <ahendry@tusc.com.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/x25/x25_in.c
#   2004/11/23 23:56:41-08:00 ahendry@tusc.com.au +0 -14
#   [X25]: Remove unused header files.
#   
#   Signed-off-by: Andrew Hendry <ahendry@tusc.com.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/x25/x25_facilities.c
#   2004/11/23 23:56:41-08:00 ahendry@tusc.com.au +0 -14
#   [X25]: Remove unused header files.
#   
#   Signed-off-by: Andrew Hendry <ahendry@tusc.com.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/x25/x25_dev.c
#   2004/11/23 23:56:41-08:00 ahendry@tusc.com.au +0 -19
#   [X25]: Remove unused header files.
#   
#   Signed-off-by: Andrew Hendry <ahendry@tusc.com.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/x25/sysctl_net_x25.c
#   2004/11/23 23:56:41-08:00 ahendry@tusc.com.au +0 -1
#   [X25]: Remove unused header files.
#   
#   Signed-off-by: Andrew Hendry <ahendry@tusc.com.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/x25/af_x25.c
#   2004/11/23 23:56:41-08:00 ahendry@tusc.com.au +0 -9
#   [X25]: Remove unused header files.
#   
#   Signed-off-by: Andrew Hendry <ahendry@tusc.com.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# ChangeSet
#   2004/11/23 23:56:04-08:00 ahendry@tusc.com.au 
#   [X25]: When receiving a call, check listening sockets for matching call user data.
#   
#   If a listening socket sets call user data, ensure it only receives calls
#   with matching call user data.  Also ensure incoming calls with matching
#   call user data dont go to another listening socket.
#   
#   Signed-off-by: Andrew Hendry <ahendry@tusc.com.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/x25/x25_subr.c
#   2004/11/23 23:55:45-08:00 ahendry@tusc.com.au +19 -0
#   [X25]: When receiving a call, check listening sockets for matching call user data.
#   
#   If a listening socket sets call user data, ensure it only receives calls
#   with matching call user data.  Also ensure incoming calls with matching
#   call user data dont go to another listening socket.
#   
#   Signed-off-by: Andrew Hendry <ahendry@tusc.com.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/x25/af_x25.c
#   2004/11/23 23:55:45-08:00 ahendry@tusc.com.au +47 -15
#   [X25]: When receiving a call, check listening sockets for matching call user data.
#   
#   If a listening socket sets call user data, ensure it only receives calls
#   with matching call user data.  Also ensure incoming calls with matching
#   call user data dont go to another listening socket.
#   
#   Signed-off-by: Andrew Hendry <ahendry@tusc.com.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# include/net/x25.h
#   2004/11/23 23:55:45-08:00 ahendry@tusc.com.au +1 -0
#   [X25]: When receiving a call, check listening sockets for matching call user data.
#   
#   If a listening socket sets call user data, ensure it only receives calls
#   with matching call user data.  Also ensure incoming calls with matching
#   call user data dont go to another listening socket.
#   
#   Signed-off-by: Andrew Hendry <ahendry@tusc.com.au>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# ChangeSet
#   2004/11/23 23:54:43-08:00 simlo@phys.au.dk 
#   [ARCNET]: Fixes.
#   
#   As previously reported the ArcNet driver didn't work with Preempt and SMB
#   on.  They do now.  I have changed the locking system from being a global
#   arcnet lock to being a lock per device.  I used the lock in
#   dev->hard_start_xmit = arcnet_send_packet.  
#   
#   Furthermore I added the 'CAP mode' encapsulation.  As far as I see it it is
#   the only encapsulation which actually makes ArcNet usefull over ethernet. 
#   Previously, the driver just ignored the hardware transmit status, now you
#   can get hardware acknowledge and excessive nacks back to userspace via a
#   raw socket.  The capmode.c is nearly just a copy of arc-rawmode.c.  The
#   difference is that it inserts a ack_tx() handle into the general driver
#   framework.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# include/linux/if_ether.h
#   2004/11/23 23:53:52-08:00 simlo@phys.au.dk +1 -0
#   [ARCNET]: Fixes.
# 
# include/linux/if_arcnet.h
#   2004/11/23 23:53:52-08:00 simlo@phys.au.dk +14 -0
#   [ARCNET]: Fixes.
# 
# include/linux/com20020.h
#   2004/11/23 23:53:52-08:00 simlo@phys.au.dk +19 -11
#   [ARCNET]: Fixes.
# 
# include/linux/arcdevice.h
#   2004/11/23 23:53:52-08:00 simlo@phys.au.dk +17 -4
#   [ARCNET]: Fixes.
# 
# drivers/net/arcnet/rfc1201.c
#   2004/11/23 23:53:52-08:00 simlo@phys.au.dk +2 -0
#   [ARCNET]: Fixes.
# 
# drivers/net/arcnet/rfc1051.c
#   2004/11/23 23:53:52-08:00 simlo@phys.au.dk +3 -0
#   [ARCNET]: Fixes.
# 
# drivers/net/arcnet/com20020.c
#   2004/11/23 23:53:52-08:00 simlo@phys.au.dk +19 -9
#   [ARCNET]: Fixes.
# 
# drivers/net/arcnet/com20020-isa.c
#   2004/11/23 23:53:52-08:00 simlo@phys.au.dk +0 -1
#   [ARCNET]: Fixes.
# 
# drivers/net/arcnet/arcnet.c
#   2004/11/23 23:53:52-08:00 simlo@phys.au.dk +176 -77
#   [ARCNET]: Fixes.
# 
# drivers/net/arcnet/arc-rawmode.c
#   2004/11/23 23:53:52-08:00 simlo@phys.au.dk +7 -2
#   [ARCNET]: Fixes.
# 
# drivers/net/arcnet/Makefile
#   2004/11/23 23:53:52-08:00 simlo@phys.au.dk +1 -0
#   [ARCNET]: Fixes.
# 
# drivers/net/arcnet/Kconfig
#   2004/11/23 23:53:52-08:00 simlo@phys.au.dk +19 -0
#   [ARCNET]: Fixes.
# 
# drivers/net/arcnet/capmode.c
#   2004/11/23 23:53:48-08:00 simlo@phys.au.dk +296 -0
#   [ARCNET]: Fixes.
# 
# drivers/net/arcnet/capmode.c
#   2004/11/23 23:53:48-08:00 simlo@phys.au.dk +0 -0
#   BitKeeper file /disk1/BK/net-2.6.11/drivers/net/arcnet/capmode.c
# 
# ChangeSet
#   2004/11/23 23:52:02-08:00 acme@conectiva.com.br 
#   [XFRM]: Export xfrm_policy_delete()
#   
#   Will be needed for DCCP.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/xfrm/xfrm_policy.c
#   2004/11/23 23:51:43-08:00 acme@conectiva.com.br +2 -0
#   [XFRM]: Export xfrm_policy_delete()
#   
#   Will be needed for DCCP.
#   
#   Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# ChangeSet
#   2004/11/23 23:50:00-08:00 kaber@trash.net 
#   [PKT_SCHED]: Clean up tcf_action_init memory handling
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/sched/act_api.c
#   2004/11/23 23:49:41-08:00 kaber@trash.net +47 -57
#   [PKT_SCHED]: Clean up tcf_action_init memory handling
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# include/net/pkt_cls.h
#   2004/11/23 23:49:41-08:00 kaber@trash.net +6 -20
#   [PKT_SCHED]: Clean up tcf_action_init memory handling
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# include/net/act_api.h
#   2004/11/23 23:49:41-08:00 kaber@trash.net +2 -2
#   [PKT_SCHED]: Clean up tcf_action_init memory handling
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# ChangeSet
#   2004/11/23 23:47:34-08:00 bdschuym@pandora.be 
#   [EBTABLES]: Add userspace logging via netlink socket.
#   
#   The patch below adds the ebtables ulog watcher, that sends packets
#   to userspace. It is based on ipt_ULOG.c.
#   
#   The complete packet, including Ethernet header, is sent to userspace.
#   The in and out bridge ports are also sent to userspace. Logging is
#   of course not restricted to IP packets.
#   An example of a userspace program that receives and parses packets
#   sent by the ulog watcher is in the ebtables CVS tree under
#   examples/ulog/
#   
#   Signed-off-by: Bart De Schuymer <bdschuym@pandora.be>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/bridge/netfilter/ebtables.c
#   2004/11/23 23:46:46-08:00 bdschuym@pandora.be +3 -3
#   [EBTABLES]: Add userspace logging via netlink socket.
# 
# net/bridge/netfilter/ebt_log.c
#   2004/11/23 23:46:46-08:00 bdschuym@pandora.be +3 -2
#   [EBTABLES]: Add userspace logging via netlink socket.
# 
# net/bridge/netfilter/Makefile
#   2004/11/23 23:46:46-08:00 bdschuym@pandora.be +1 -0
#   [EBTABLES]: Add userspace logging via netlink socket.
# 
# net/bridge/netfilter/Kconfig
#   2004/11/23 23:46:46-08:00 bdschuym@pandora.be +16 -2
#   [EBTABLES]: Add userspace logging via netlink socket.
# 
# include/linux/netfilter_bridge/ebtables.h
#   2004/11/23 23:46:46-08:00 bdschuym@pandora.be +3 -3
#   [EBTABLES]: Add userspace logging via netlink socket.
# 
# net/bridge/netfilter/ebt_ulog.c
#   2004/11/23 23:46:41-08:00 bdschuym@pandora.be +295 -0
#   [EBTABLES]: Add userspace logging via netlink socket.
# 
# net/bridge/netfilter/ebt_ulog.c
#   2004/11/23 23:46:41-08:00 bdschuym@pandora.be +0 -0
#   BitKeeper file /disk1/BK/net-2.6.11/net/bridge/netfilter/ebt_ulog.c
# 
# include/linux/netfilter_bridge/ebt_ulog.h
#   2004/11/23 23:46:38-08:00 bdschuym@pandora.be +36 -0
#   [EBTABLES]: Add userspace logging via netlink socket.
# 
# include/linux/netfilter_bridge/ebt_ulog.h
#   2004/11/23 23:46:38-08:00 bdschuym@pandora.be +0 -0
#   BitKeeper file /disk1/BK/net-2.6.11/include/linux/netfilter_bridge/ebt_ulog.h
# 
# ChangeSet
#   2004/11/23 18:52:13+11:00 airlied@starflyer.(none) 
#   drm: move the enable device before filling in device info
#   
#   This moves the pci_enable_device to before the device info is 
#   filled out as without routeirq this goes wrong..
#   
#   Thanks to Ralf Gerbig <rge@quengel.org> for testing this.
#   
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_stub.c
#   2004/11/23 18:52:04+11:00 airlied@starflyer.(none) +3 -1
#   drm: move the enable device before filling in device info
#   
#   This moves the pci_enable_device to before the device info is 
#   filled out as without routeirq this goes wrong..
#   
#   Thanks to Ralf Gerbig <rge@quengel.org> for testing this.
#   
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# ChangeSet
#   2004/11/20 12:53:46+00:00 dwmw2@shinybook.infradead.org 
#   MTD: Use msleep() in cfi_udelay() helper function.
#   
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# include/linux/mtd/cfi.h
#   2004/11/20 12:53:23+00:00 dwmw2@shinybook.infradead.org +6 -8
#   revision 1.50
#   date: 2004/11/20 12:46:51;  author: dwmw2;  state: Exp;  lines: +6 -8
#   Fix cfi_udelay() to use msleep()
# 
# ChangeSet
#   2004/11/20 12:48:27+00:00 dwmw2@shinybook.infradead.org 
#   MTD NOR chip drivers: use msleep()
#   
#   Description: Use msleep() instead of schedule_timeout()
#   to guarantee the task delays as expected.
#   
#   Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
#   Signed-off-by: Maximilian Attems <janitor@sternwelten.at>
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# drivers/mtd/chips/cfi_cmdset_0020.c
#   2004/11/20 12:48:03+00:00 dwmw2@shinybook.infradead.org +4 -4
#   Description: Use msleep() instead of schedule_timeout()
#   to guarantee the task delays as expected.
# 
# drivers/mtd/chips/cfi_cmdset_0002.c
#   2004/11/20 12:48:03+00:00 dwmw2@shinybook.infradead.org +3 -5
#   Description: Use msleep() instead of schedule_timeout()
#   to guarantee the task delays as expected.
# 
# drivers/mtd/chips/amd_flash.c
#   2004/11/20 12:48:02+00:00 dwmw2@shinybook.infradead.org +2 -2
#   Description: Use msleep() instead of schedule_timeout()
#   to guarantee the task delays as expected.
# 
# ChangeSet
#   2004/11/20 12:25:45+00:00 dwmw2@shinybook.infradead.org 
#   JFFS2: Fix race on read access to NAND write-buffer.
#   
#   With SMP or preempt, we could attempt to read data from the wbuf 
#   while it was being updated. Introduce a new rwsem to prevent this,
#   and update the documentation accordingly
#   
#   Signed-off-by: Artem Bityuckiy <dedekind@infradead.org>
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# include/linux/jffs2_fs_sb.h
#   2004/11/20 12:25:23+00:00 dwmw2@shinybook.infradead.org +5 -4
#   revision 1.48
#   date: 2004/11/20 10:41:12;  author: dwmw2;  state: Exp;  lines: +4 -2
#   include rwsem.h and make wbuf_sem nand-only
#   ----------------------------
#   revision 1.47
#   date: 2004/11/19 13:41:17;  author: dedekind;  state: Exp;  lines: +3 -4
#   Bugfix: fix the race bug when a writed and reader concurrently access
#   the wbuf. Introduce new rw semaphore to fix this.
# 
# fs/jffs2/wbuf.c
#   2004/11/20 12:25:23+00:00 dwmw2@shinybook.infradead.org +41 -19
#   revision 1.81
#   date: 2004/11/20 10:44:07;  author: dwmw2;  state: Exp;  lines: +3 -2
#   wbuf_sem is now nand-only
#   ----------------------------
#   revision 1.80
#   date: 2004/11/20 10:35:40;  author: dwmw2;  state: Exp;  lines: +23 -15
#   Clean up wbuf_sem a bit, document it.
#   ----------------------------
#   revision 1.79
#   date: 2004/11/20 10:21:40;  author: dwmw2;  state: Exp;  lines: +2 -2
#   Fix deadlock on wbuf_sem if jffs2_flash_writev() is writing to a new
#   block and flushes the wbuf on the old.
#   ----------------------------
#   revision 1.78
#   date: 2004/11/19 13:41:16;  author: dedekind;  state: Exp;  lines: +33 -20
#   Bugfix: fix the race bug when a writed and reader concurrently access
#   the wbuf. Introduce new rw semaphore to fix this.
# 
# fs/jffs2/README.Locking
#   2004/11/20 12:25:23+00:00 dwmw2@shinybook.infradead.org +14 -1
#   revision 1.9
#   date: 2004/11/20 10:35:40;  author: dwmw2;  state: Exp;  lines: +14 -1
#   Clean up wbuf_sem a bit, document it.
# 
# ChangeSet
#   2004/11/20 10:58:16+00:00 dwmw2@shinybook.infradead.org 
#   JFFS2: Fix memory leak if jffs2_scan_medium() fails.
#   
#   We weren't releasing all the temporary dirent structures we may have
#   built up during the first part of the scan.
#   
#   Signed-off-by: Artem Bityuckiy <dedekind@infradead.org>
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# fs/jffs2/build.c
#   2004/11/20 10:57:52+00:00 dwmw2@shinybook.infradead.org +17 -6
#   revision 1.64
#   date: 2004/11/20 10:44:07;  author: dwmw2;  state: Exp;  lines: +1 -2
#   wbuf_sem is now nand-only
#   ----------------------------
#   revision 1.63
#   date: 2004/11/20 08:45:15;  author: dwmw2;  state: Exp;  lines: +2 -2
#   remove double semicolon
#   ----------------------------
#   revision 1.62
#   date: 2004/11/19 13:41:16;  author: dedekind;  state: Exp;  lines: +2 -1
#   Bugfix: fix the race bug when a writed and reader concurrently access
#   the wbuf. Introduce new rw semaphore to fix this.
#   ----------------------------
#   revision 1.61
#   date: 2004/11/18 11:17:41;  author: dedekind;  state: Exp;  lines: +17 -6
#   Bugfix: do not forget to free memory if the jffs2_scan_inode_node()
#   fails.
# 
# ChangeSet
#   2004/11/20 09:08:57+00:00 dwmw2@shinybook.infradead.org 
#   JFFS2: Discard dirents which point to non-existent inodes.
#   
#   If a directory entry refers to an inode which doesn't actually exist,
#   we weren't marking it obsolete, so it was still visible in the file
#   system, and would give EIO if you ever tried to stat it. Once upon
#   a time, perl -e 'unlink' and rm -f would manage to unlink such things
#   but nowadays they both try to stat it first and stupidly refuse to 
#   even attempt the unlink if the stat fails, and this is more of a 
#   problem. So we throw it away ourselves. 
#   
#   Signed-off-by: Artem Bityuckiy <dedekind@infradead.org>
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# fs/jffs2/build.c
#   2004/11/20 09:08:37+00:00 dwmw2@shinybook.infradead.org +4 -3
#   revision 1.60
#   date: 2004/11/17 17:13:13;  author: dedekind;  state: Exp;  lines: +3 -3
#   Do the pass1 with the JFFS2_SB_FLAG_MOUNTING flag set in order to preven
#   the physical flash writing if we have found the inode-less direntry.
#   ----------------------------
#   revision 1.59
#   date: 2004/11/17 12:56:15;  author: dedekind;  state: Exp;  lines: +2 -2
#   Fix the last bugfix: use the jffs2_mark_node_obsolete() function instead
#   of directly marking the node obsolete. This will not break the
#   free/dirty space counters.
#   ----------------------------
#   revision 1.58
#   date: 2004/11/17 11:47:08;  author: dedekind;  state: Exp;  lines: +2 -1
#   Bugfix: when we have found an inodeless direntry, mark the correspondent
#   node_ref as obsolete in order to let the GC to kill this direntry.
# 
# ChangeSet
#   2004/11/20 09:00:26+00:00 dwmw2@shinybook.infradead.org 
#   JFFS2: Remove obsolete structure definitions and update comments.
#   
#   New eyes are looking over ancient code and comments which were put
#   in as the design was first coming together... and which don't make
#   even the slightest bit of sense any more.
#   
#   Signed-off-by: Artem Bityuckiy <dedekind@infradead.org>
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# fs/jffs2/scan.c
#   2004/11/20 09:00:03+00:00 dwmw2@shinybook.infradead.org +3 -6
#   revision 1.115
#   date: 2004/11/17 12:59:08;  author: dedekind;  state: Exp;  lines: +3 -6
#   Change/remove old and depricated comments.
# 
# fs/jffs2/nodelist.h
#   2004/11/20 09:00:03+00:00 dwmw2@shinybook.infradead.org +5 -23
#   revision 1.126
#   date: 2004/11/19 15:06:29;  author: dedekind;  state: Exp;  lines: +1 -19
#   Remove archaic outdated stuff.
#   ----------------------------
#   revision 1.125
#   date: 2004/11/17 12:59:08;  author: dedekind;  state: Exp;  lines: +5 -5
#   Change/remove old and depricated comments.
# 
# ChangeSet
#   2004/11/20 08:52:36+00:00 dwmw2@shinybook.infradead.org 
#   MTD: Fix JEDEC probe of chips which don't require unlock sequence
#   
#   Signed-off-by: Thayne Harbaugh <tharbaugh@lnxi.com>
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# drivers/mtd/chips/jedec_probe.c
#   2004/11/20 08:52:15+00:00 dwmw2@shinybook.infradead.org +6 -3
#   revision 1.61
#   date: 2004/11/19 20:52:16;  author: thayne;  state: Exp;  lines: +6 -1
#   Make sure that every enum uaddr has an entry in unlock_addrs[]
# 
# ChangeSet
#   2004/11/18 14:13:50-08:00 hch@lst.de 
#   [NET]: Use local_softirq_pending instead of softirq_pending in netif_rx_ni
#   
#   Some architectures can optimize local_softirq_pending much better than
#   softirq_pending(smp_processor_id()), and for all others the former is
#   just a macro expanding to the later.
#   
#   Also this is the last use of softirq_pending() in common code, once this
#   is in we can soon kill the notation of beeing able to query other cpus
#   softirq pending count.
#   
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/core/dev.c
#   2004/11/18 14:13:32-08:00 hch@lst.de +1 -1
#   [NET]: Use local_softirq_pending instead of softirq_pending in netif_rx_ni
#   
#   Some architectures can optimize local_softirq_pending much better than
#   softirq_pending(smp_processor_id()), and for all others the former is
#   just a macro expanding to the later.
#   
#   Also this is the last use of softirq_pending() in common code, once this
#   is in we can soon kill the notation of beeing able to query other cpus
#   softirq pending count.
#   
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# ChangeSet
#   2004/11/18 14:12:39-08:00 hch@lst.de 
#   [NET]: Kill drivers/net/net_init.c
#   
#   After the last patch only three routines are left in this file, but all
#   of the fir into net/core/dev.c much better:
#   
#    - {un,}register_netdev are just wrappers around {un,}register_netdevice
#      from dev.c
#    - alloc_netdev's counterpart, free_netdev is in dev.c aswell.
#   
#   So move over the remaining contents and add some kerneldoc comments
#   describing the functions.
#   
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/core/dev.c
#   2004/11/18 14:12:03-08:00 hch@lst.de +108 -4
#   [NET]: Kill drivers/net/net_init.c
# 
# drivers/net/Makefile
#   2004/11/18 14:12:03-08:00 hch@lst.de +1 -1
#   [NET]: Kill drivers/net/net_init.c
# 
# BitKeeper/deleted/.del-net_init.c~818a1a4060953d02
#   2004/11/18 14:11:43-08:00 davem@nuts.davemloft.net +0 -0
#   Delete: drivers/net/net_init.c
# 
# ChangeSet
#   2004/11/18 14:03:59-08:00 Ian.Pratt@cl.cam.ac.uk 
#   [NET]: Add alloc_skb_from_cache.
#   
#   This serves two purposes: firstly, we like to allocate page-sized skbs
#   as this means we zero-copy transfer of network buffers between guest
#   operating systems. Secondly, it enables us to have a cache of pages
#   that have been used for network buffers that we can be more lax about
#   scrubbing when they change VM ownership (since they could be sniffed on
#   the wire).
#   
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/core/skbuff.c
#   2004/11/18 14:02:13-08:00 Ian.Pratt@cl.cam.ac.uk +53 -0
#   [NET]: Add alloc_skb_from_cache.
# 
# include/linux/skbuff.h
#   2004/11/18 14:02:13-08:00 Ian.Pratt@cl.cam.ac.uk +6 -0
#   [NET]: Add alloc_skb_from_cache.
# 
# ChangeSet
#   2004/11/18 12:06:01+01:00 vojtech@suse.cz 
#   Manual merge
# 
# drivers/usb/input/hid-core.c
#   2004/11/18 12:05:54+01:00 vojtech@suse.cz +5 -4
#   Manual merge
# 
# drivers/input/serio/serio.c
#   2004/11/18 11:50:15+01:00 vojtech@suse.cz +0 -0
#   Auto merged
# 
# drivers/input/serio/i8042.c
#   2004/11/18 11:50:15+01:00 vojtech@suse.cz +0 -0
#   Auto merged
# 
# drivers/input/input.c
#   2004/11/18 11:50:15+01:00 vojtech@suse.cz +0 -0
#   Auto merged
# 
# Documentation/kernel-parameters.txt
#   2004/11/18 11:50:15+01:00 vojtech@suse.cz +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/11/17 16:08:01-08:00 util@deuroconsult.ro 
#   [PKT_SCHED]: Allow using nfmark as key in U32 classifier.
#   
#   Signed-off-by: Catalin(ux aka Dino) BOIE <catab at umbrella.ro>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/sched/cls_u32.c
#   2004/11/17 16:07:25-08:00 util@deuroconsult.ro +39 -0
#   [PKT_SCHED]: Allow using nfmark as key in U32 classifier.
#   
#   Signed-off-by: Catalin(ux aka Dino) BOIE <catab at umbrella.ro>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/sched/Kconfig
#   2004/11/17 16:07:25-08:00 util@deuroconsult.ro +12 -0
#   [PKT_SCHED]: Allow using nfmark as key in U32 classifier.
#   
#   Signed-off-by: Catalin(ux aka Dino) BOIE <catab at umbrella.ro>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# include/linux/pkt_cls.h
#   2004/11/17 16:07:25-08:00 util@deuroconsult.ro +1 -0
#   [PKT_SCHED]: Allow using nfmark as key in U32 classifier.
#   
#   Signed-off-by: Catalin(ux aka Dino) BOIE <catab at umbrella.ro>
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# ChangeSet
#   2004/11/17 12:51:43-06:00 shaggy@austin.ibm.com 
#   JFS: fix race in jfs_commit_inode
#   
#   There was a race that resulted in old, deleted inodes being written
#   to disk after the inode number had been reused.  jfs_commit_inode
#   needs to verify that the inode is still linked and dirty before
#   committing it.
#   
#   Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
# 
# fs/jfs/inode.c
#   2004/11/17 12:51:26-06:00 shaggy@austin.ibm.com +8 -3
#   jfs_commit_inode needs to re-verify that inode is still linked
#   and dirty
# 
# ChangeSet
#   2004/11/17 10:34:09-06:00 akpm@osdl.org 
#   [PATCH] iscsi_transport build fix
#   
#   drivers/scsi/scsi_transport_iscsi.c:176: structure has no member named `sin6_addr'
#   
#   Older gcc's dont support anonymous unions.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
# 
# include/scsi/scsi_transport_iscsi.h
#   2004/11/17 03:55:50-06:00 akpm@osdl.org +3 -3
#   iscsi_transport build fix
# 
# ChangeSet
#   2004/11/17 10:45:15+00:00 dwmw2@shinybook.infradead.org 
#   MTD: Fix chip ident definition for AMD 29F002T devices.
#   
#   They were missing unlock address and command set fields.
#   
#   From: David Vrabel <dvrabel@arcom.com>
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# drivers/mtd/chips/jedec_probe.c
#   2004/11/17 10:44:46+00:00 dwmw2@shinybook.infradead.org +43 -28
#   revision 1.59
#   date: 2004/11/17 09:46:24;  author: dvrabel;  state: Exp;  lines: +43 -28
#   Add missing uddr and CmdSet fields to the entries for the 29F002T devices.
# 
# ChangeSet
#   2004/11/17 09:36:39+00:00 dwmw2@shinybook.infradead.org 
#   JFFS2: Remove definition of obsolete struct jffs2_scan_info
#   
#   We no longer use this, since we rewrote the mount code to behave
#   entirely differently and not build up all the trees on mount.
#   
#   Signed-off-by: Artem Bityuckiy <dedekind@infradead.org>
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# fs/jffs2/nodelist.h
#   2004/11/17 09:36:16+00:00 dwmw2@shinybook.infradead.org +1 -8
#   revision 1.124
#   date: 2004/11/17 09:30:02;  author: dedekind;  state: Exp;  lines: +1 -8
#   Remove unused depricated struct jffs2_scan_info definition,
# 
# ChangeSet
#   2004/11/16 16:05:58-06:00 jejb@mulgrave.(none) 
#   SCSI: Add missing state transition BLOCK->OFFLINE
#   
#   From: 	James.Smart@Emulex.Com
#   
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
# 
# drivers/scsi/scsi_lib.c
#   2004/11/16 16:05:38-06:00 jejb@mulgrave.(none) +1 -0
#   SCSI: Add missing state transition BLOCK->OFFLINE
# 
# ChangeSet
#   2004/11/16 16:01:31-06:00 dougg@torque.net 
#   SCSI: descriptor sense format, mid-level
#   
#      - generalize sense data logic to cope with both fixed and
#        descriptor format
#      - use KERN_INFO on most printk()s to limit console noise
#      - retire mid-level usage of sense_class(), sense_error() and
#        sense_valid() macros which are SCSI-1 remnants. Now only
#        cpqfcTSinit.c seems to use them
#   
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
# 
# drivers/scsi/scsi_scan.c
#   2004/11/08 02:33:25-06:00 dougg@torque.net +21 -12
#   descriptor sense format, mid-level
# 
# drivers/scsi/scsi_lib.c
#   2004/11/08 01:14:41-06:00 dougg@torque.net +16 -12
#   descriptor sense format, mid-level
# 
# drivers/scsi/scsi_ioctl.c
#   2004/11/08 04:56:44-06:00 dougg@torque.net +18 -12
#   descriptor sense format, mid-level
# 
# drivers/scsi/scsi_error.c
#   2004/11/08 00:43:52-06:00 dougg@torque.net +35 -12
#   descriptor sense format, mid-level
# 
# ChangeSet
#   2004/11/16 15:23:21-06:00 michaelc@cs.wisc.edu 
#   [PATCH] iSCSI transport class
#   
#   The attached patch adds an iSCSI transport class. It was
#   built against scsi-misc-2.6. It allows the software/virtual
#   iSCSI driver to remove at least one of its ioctl commands.
#   The patch also assumes the no multipath/failover rule in
#   llds applies to iSCSI drivers, so when we remove our
#   portal/portal_group failover support it will allow us to
#   kill all our ioctl commands execpt the session creation one
#   (that will take more thought).
#   
#   We would like to build some functions like the
#   unblock/block capabilites into the iscsi transport class
#   like James Smart has done with FC class. but initially we
#   would like to begin with this smaller patch that only provides
#   an iscsi sysfs interface.
#   
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
# 
# include/scsi/scsi_transport_iscsi.h
#   2004/10/29 05:55:13-05:00 michaelc@cs.wisc.edu +178 -0
#   iSCSI transport class
# 
# include/scsi/scsi_transport_iscsi.h
#   2004/10/29 05:55:13-05:00 michaelc@cs.wisc.edu +0 -0
#   BitKeeper file /home/jejb/BK/scsi-misc-2.6/include/scsi/scsi_transport_iscsi.h
# 
# drivers/scsi/scsi_transport_iscsi.c
#   2004/10/29 06:30:20-05:00 michaelc@cs.wisc.edu +355 -0
#   iSCSI transport class
# 
# drivers/scsi/Makefile
#   2004/10/28 22:57:11-05:00 michaelc@cs.wisc.edu +1 -1
#   iSCSI transport class
# 
# drivers/scsi/Kconfig
#   2004/10/28 22:57:11-05:00 michaelc@cs.wisc.edu +8 -0
#   iSCSI transport class
# 
# drivers/scsi/scsi_transport_iscsi.c
#   2004/10/29 06:30:20-05:00 michaelc@cs.wisc.edu +0 -0
#   BitKeeper file /home/jejb/BK/scsi-misc-2.6/drivers/scsi/scsi_transport_iscsi.c
# 
# ChangeSet
#   2004/11/16 20:53:10+00:00 dwmw2@shinybook.infradead.org 
#   Email address update.
#   
#   The work address is increasingly unreliable and incompetently run.
#   Time to remove all visible instances of it and rely only on one 
#   which isn't run by crack-monkeys.
#   
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# kernel/workqueue.c
#   2004/11/16 20:52:49+00:00 dwmw2@shinybook.infradead.org +1 -1
#   Update email address to one at a competently-run domain.
# 
# include/linux/jffs2.h
#   2004/11/16 20:52:49+00:00 dwmw2@shinybook.infradead.org +2 -2
#   Update email address to one at a competently-run domain.
# 
# fs/jffs2/writev.c
#   2004/11/16 20:52:49+00:00 dwmw2@shinybook.infradead.org +2 -2
#   Update email address to one at a competently-run domain.
# 
# fs/jffs2/write.c
#   2004/11/16 20:52:48+00:00 dwmw2@shinybook.infradead.org +2 -2
#   Update email address to one at a competently-run domain.
# 
# fs/jffs2/wbuf.c
#   2004/11/16 20:52:48+00:00 dwmw2@shinybook.infradead.org +2 -2
#   Update email address to one at a competently-run domain.
# 
# fs/jffs2/symlink.c
#   2004/11/16 20:52:48+00:00 dwmw2@shinybook.infradead.org +2 -2
#   Update email address to one at a competently-run domain.
# 
# fs/jffs2/super.c
#   2004/11/16 20:52:48+00:00 dwmw2@shinybook.infradead.org +2 -2
#   Update email address to one at a competently-run domain.
# 
# fs/jffs2/scan.c
#   2004/11/16 20:52:48+00:00 dwmw2@shinybook.infradead.org +2 -2
#   Update email address to one at a competently-run domain.
# 
# fs/jffs2/readinode.c
#   2004/11/16 20:52:48+00:00 dwmw2@shinybook.infradead.org +2 -2
#   Update email address to one at a competently-run domain.
# 
# fs/jffs2/read.c
#   2004/11/16 20:52:48+00:00 dwmw2@shinybook.infradead.org +2 -2
#   Update email address to one at a competently-run domain.
# 
# fs/jffs2/pushpull.h
#   2004/11/16 20:52:48+00:00 dwmw2@shinybook.infradead.org +2 -2
#   Update email address to one at a competently-run domain.
# 
# fs/jffs2/os-linux.h
#   2004/11/16 20:52:48+00:00 dwmw2@shinybook.infradead.org +2 -2
#   Update email address to one at a competently-run domain.
# 
# fs/jffs2/nodemgmt.c
#   2004/11/16 20:52:48+00:00 dwmw2@shinybook.infradead.org +2 -2
#   Update email address to one at a competently-run domain.
# 
# fs/jffs2/nodelist.h
#   2004/11/16 20:52:48+00:00 dwmw2@shinybook.infradead.org +2 -2
#   Update email address to one at a competently-run domain.
# 
# fs/jffs2/nodelist.c
#   2004/11/16 20:52:48+00:00 dwmw2@shinybook.infradead.org +2 -2
#   Update email address to one at a competently-run domain.
# 
# fs/jffs2/malloc.c
#   2004/11/16 20:52:48+00:00 dwmw2@shinybook.infradead.org +2 -2
#   Update email address to one at a competently-run domain.
# 
# fs/jffs2/ioctl.c
#   2004/11/16 20:52:48+00:00 dwmw2@shinybook.infradead.org +2 -2
#   Update email address to one at a competently-run domain.
# 
# fs/jffs2/gc.c
#   2004/11/16 20:52:48+00:00 dwmw2@shinybook.infradead.org +2 -2
#   Update email address to one at a competently-run domain.
# 
# fs/jffs2/fs.c
#   2004/11/16 20:52:48+00:00 dwmw2@shinybook.infradead.org +2 -2
#   Update email address to one at a competently-run domain.
# 
# fs/jffs2/file.c
#   2004/11/16 20:52:48+00:00 dwmw2@shinybook.infradead.org +2 -2
#   Update email address to one at a competently-run domain.
# 
# fs/jffs2/erase.c
#   2004/11/16 20:52:48+00:00 dwmw2@shinybook.infradead.org +2 -2
#   Update email address to one at a competently-run domain.
# 
# fs/jffs2/dir.c
#   2004/11/16 20:52:48+00:00 dwmw2@shinybook.infradead.org +2 -2
#   Update email address to one at a competently-run domain.
# 
# fs/jffs2/compr_zlib.c
#   2004/11/16 20:52:48+00:00 dwmw2@shinybook.infradead.org +2 -2
#   Update email address to one at a competently-run domain.
# 
# fs/jffs2/build.c
#   2004/11/16 20:52:48+00:00 dwmw2@shinybook.infradead.org +2 -2
#   Update email address to one at a competently-run domain.
# 
# fs/jffs2/background.c
#   2004/11/16 20:52:48+00:00 dwmw2@shinybook.infradead.org +2 -2
#   Update email address to one at a competently-run domain.
# 
# drivers/char/applicom.c
#   2004/11/16 20:52:48+00:00 dwmw2@shinybook.infradead.org +1 -1
#   Update email address to one at a competently-run domain.
# 
# MAINTAINERS
#   2004/11/16 20:52:48+00:00 dwmw2@shinybook.infradead.org +1 -1
#   Update email address to one at a competently-run domain.
# 
# CREDITS
#   2004/11/16 20:52:47+00:00 dwmw2@shinybook.infradead.org +0 -1
#   Update email address to one at a competently-run domain.
# 
# ChangeSet
#   2004/11/16 20:12:00+00:00 dwmw2@shinybook.infradead.org 
#   JFFS2: Add notes on inocache_lock spinlock to README.Locking
#   
#   Signed-off-by: Artem Bityuckiy <dedekind@infradead.org>
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# fs/jffs2/README.Locking
#   2004/11/16 20:11:36+00:00 dwmw2@shinybook.infradead.org +26 -7
#   revision 1.8
#   date: 2004/11/14 11:43:41;  author: dedekind;  state: Exp;  lines: +3 -3
#   Fix typos in the newly added text.
#   ----------------------------
#   revision 1.7
#   date: 2004/11/14 11:38:54;  author: dedekind;  state: Exp;  lines: +20 -1
#   Add some information about the inocache_lock spinlock.
# 
# ChangeSet
#   2004/11/16 13:49:34-06:00 jejb@mulgrave.(none) 
#   SCSI: Add transport destructors
#   
#   From: 	James.Smart@Emulex.Com
#   
#   This patch adds host/target/sdev destructor functions to the transport
#   template. The FC transport is updated to utilize them to cancel any
#   outstanding timer. It slightly rearranges the slave_xxx functions so
#   the transport is always involved prior to the LLDD.
#   
#   Minor rejection fixes and
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
# 
# include/scsi/scsi_transport.h
#   2004/11/16 13:48:01-06:00 jejb@mulgrave.(none) +5 -0
#   SCSI: Add transport destructors
# 
# drivers/scsi/scsi_transport_fc.c
#   2004/11/16 13:48:01-06:00 jejb@mulgrave.(none) +16 -0
#   SCSI: Add transport destructors
# 
# drivers/scsi/scsi_sysfs.c
#   2004/11/16 13:48:01-06:00 jejb@mulgrave.(none) +5 -0
#   SCSI: Add transport destructors
# 
# drivers/scsi/scsi_scan.c
#   2004/11/16 13:48:01-06:00 jejb@mulgrave.(none) +13 -6
#   SCSI: Add transport destructors
# 
# drivers/scsi/hosts.c
#   2004/11/16 13:48:01-06:00 jejb@mulgrave.(none) +6 -1
#   SCSI: Add transport destructors
# 
# ChangeSet
#   2004/11/16 13:42:53-06:00 jejb@mulgrave.(none) 
#   SCSI: updates to constants.c
#   
#   From: 	Douglas Gilbert <dougg@torque.net>
#   
#     - bring opcode names, asc/ascq strings and sense format
#       into line with SPC-3 rev 21 (22 September 2004)
#     - drop SCSI-1 sense buffer decoding [still output it in hex]
#     - opcode names include those that depend on service actions
#       including variable length commands **
#     - decodes both fixed and descriptor sense data formats
#     - use KERN_INFO on printk()s that start on new lines
#     - flag vendor specific asc and acsq codes
#     - print all bytes of a cdb after the name (previously skipped
#       the first byte)
#     - cleanup file, tab to 8 spaces
#   
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
# 
# drivers/scsi/constants.c
#   2004/11/16 13:41:26-06:00 jejb@mulgrave.(none) +578 -339
#   SCSI: updates to constants.c
# 
# ChangeSet
#   2004/11/16 13:29:04-06:00 jejb@mulgrave.(none) 
#   update the fc_transport_class to use a workqueue instead of a timeout
#   
#   The amount of work that has to be done in the timeout routines is really
#   a bit much if there's a large number of LUNS.  Plus the
#   device_for_each_child needs user context to get the bus semaphore, so
#   the solution is to migrate them from a timer to delayed work.
#   
#   There's still a race here in that the timer may still be ticking when
#   the device is destroyed ... To fix this, I think we may need to
#   introduce a destroy callback to the transport class.
#   
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
# 
# include/scsi/scsi_transport_fc.h
#   2004/11/16 13:26:54-06:00 jejb@mulgrave.(none) +6 -6
#   update the fc_transport_class to use a workqueue instead of a timeout
# 
# drivers/scsi/scsi_transport_fc.c
#   2004/11/16 13:26:54-06:00 jejb@mulgrave.(none) +17 -17
#   update the fc_transport_class to use a workqueue instead of a timeout
# 
# ChangeSet
#   2004/11/16 19:04:30+00:00 dwmw2@shinybook.infradead.org 
#   JFFS2: Move very noisy debugging messages from level 1 to level 2.
#   
#   Signed-off-by: Artem Bityuckiy <dedekind@infradead.org>
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# fs/jffs2/readinode.c
#   2004/11/16 19:04:09+00:00 dwmw2@shinybook.infradead.org +4 -2
#   Nove very noisy debugging messages from level 1 to level 2.
# 
# fs/jffs2/read.c
#   2004/11/16 19:04:09+00:00 dwmw2@shinybook.infradead.org +2 -2
#   Nove very noisy debugging messages from level 1 to level 2.
# 
# fs/jffs2/nodemgmt.c
#   2004/11/16 19:04:09+00:00 dwmw2@shinybook.infradead.org +2 -2
#   Nove very noisy debugging messages from level 1 to level 2.
# 
# fs/jffs2/nodelist.h
#   2004/11/16 19:04:09+00:00 dwmw2@shinybook.infradead.org +2 -2
#   Nove very noisy debugging messages from level 1 to level 2.
# 
# fs/jffs2/gc.c
#   2004/11/16 19:04:09+00:00 dwmw2@shinybook.infradead.org +3 -3
#   Nove very noisy debugging messages from level 1 to level 2.
# 
# fs/jffs2/fs.c
#   2004/11/16 19:04:09+00:00 dwmw2@shinybook.infradead.org +2 -2
#   Nove very noisy debugging messages from level 1 to level 2.
# 
# fs/jffs2/build.c
#   2004/11/16 19:04:09+00:00 dwmw2@shinybook.infradead.org +3 -3
#   Nove very noisy debugging messages from level 1 to level 2.
# 
# ChangeSet
#   2004/11/16 19:02:03+00:00 dwmw2@shinybook.infradead.org 
#   MTD: NAND driver updates
#   
#    - Support 2048-byte HW ECC (from Juha Yrjölä <juha.yrjola@nokia.com>)
#    - Allow board drivers to provide pattern for bad block scanning
#   
#   Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# include/linux/mtd/nand.h
#   2004/11/16 19:01:44+00:00 dwmw2@shinybook.infradead.org +7 -1
#   revision 1.68
#   date: 2004/11/12 10:40:37;  author: gleixner;  state: Exp;  lines: +3 -1
#   Allow board drivers to provide their own scan pattern for bad block scanning
#   ----------------------------
#   revision 1.67
#   date: 2004/11/01 20:03:59;  author: gleixner;  state: Exp;  lines: +5 -1
#   Cleanup HW-ECC. Calc ecc bytes during setup. Add HW12_2048 ECC mode (Initial Patch provided by Juha Yrjola <juha.yrjola@nokia.com>)
# 
# drivers/mtd/nand/nand_bbt.c
#   2004/11/16 19:01:44+00:00 dwmw2@shinybook.infradead.org +12 -10
#   revision 1.28
#   date: 2004/11/13 10:19:09;  author: gleixner;  state: Exp;  lines: +9 -5
#   Do not enforce flahsbased bad block tables. Stupid me
#   ----------------------------
#   revision 1.27
#   date: 2004/11/12 10:40:36;  author: gleixner;  state: Exp;  lines: +8 -10
#   Allow board drivers to provide their own scan pattern for bad block scanning
# 
# drivers/mtd/nand/nand_base.c
#   2004/11/16 19:01:44+00:00 dwmw2@shinybook.infradead.org +48 -51
#   revision 1.123
#   date: 2004/11/02 22:36:59;  author: gleixner;  state: Exp;  lines: +2 -2
#   Fix typo. Hmm, I start to adopt dwmw2's bad habits. Pointed out by Ed Berube <eberube@gmail.com>
#   ----------------------------
#   revision 1.122
#   date: 2004/11/01 20:03:57;  author: gleixner;  state: Exp;  lines: +48 -51
#   Cleanup HW-ECC. Calc ecc bytes during setup. Add HW12_2048 ECC mode (Initial Patch provided by Juha Yrjola <juha.yrjola@nokia.com>)
# 
# ChangeSet
#   2004/11/16 18:58:15+00:00 dwmw2@shinybook.infradead.org 
#   MTD: Provide XIP support for Intel flash chips.
#   
#   This allows for MTD support to be used on flash memory which is also used
#   for XIP purposes, either XIP kernel or XIP userspace.  The whole idea is
#   to relocate functions actually modifying the flash state away from array mode
#   to ram and run them with interrupt disabled.  When the flash needs some time
#   to complete a certain operation, we poll the processor for pending (but still
#   masked) interrupts, and when they occur we suspend the flash operation in order
#   to unmask interrupts and let the system run again.
#   
#   Signed-off-by: Nicolas Pitre <nico@cam.org>
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# include/linux/mtd/xip.h
#   2004/11/16 18:57:52+00:00 dwmw2@shinybook.infradead.org +99 -0
# 
# include/linux/mtd/xip.h
#   2004/11/16 18:57:52+00:00 dwmw2@shinybook.infradead.org +0 -0
#   BitKeeper file /home/dwmw2/bk/mtd-2.6/include/linux/mtd/xip.h
# 
# include/linux/mtd/flashchip.h
#   2004/11/16 18:57:52+00:00 dwmw2@shinybook.infradead.org +3 -1
#   revision 1.15
#   date: 2004/11/05 22:41:06;  author: nico;  state: Exp;  lines: +3 -1
#   This allows for MTD support to be used on flash memory which is also used
#   for XIP purposes, either XIP kernel or XIP userspace.  The whole idea is
#   to relocate functions actually modifying the flash state away from array mode
#   to ram and run them with interrupt disabled.  When the flash needs some time
#   to complete a certain operation, we poll the processor for pending (but still
#   masked) interrupts, and when they occur we suspend the flash operation in order
#   to unmask interrupts and let the system run again.
# 
# drivers/mtd/chips/cfi_util.c
#   2004/11/16 18:57:51+00:00 dwmw2@shinybook.infradead.org +22 -13
#   revision 1.7
#   date: 2004/11/05 22:41:05;  author: nico;  state: Exp;  lines: +13 -2
#   This allows for MTD support to be used on flash memory which is also used
#   for XIP purposes, either XIP kernel or XIP userspace.  The whole idea is
#   to relocate functions actually modifying the flash state away from array mode
#   to ram and run them with interrupt disabled.  When the flash needs some time
#   to complete a certain operation, we poll the processor for pending (but still
#   masked) interrupts, and when they occur we suspend the flash operation in order
#   to unmask interrupts and let the system run again.
#   ----------------------------
#   revision 1.6
#   date: 2004/11/01 06:02:24;  author: nico;  state: Exp;  lines: +10 -12
#   Prerequisite cleanup for the upcoming patch.
#   This should not have changed the code logic at all.  Sue me if it did.
# 
# drivers/mtd/chips/cfi_probe.c
#   2004/11/16 18:57:51+00:00 dwmw2@shinybook.infradead.org +77 -31
#   revision 1.83
#   date: 2004/11/16 18:19:02;  author: nico;  state: Exp;  lines: +2 -2
#   fix bogus comment
#   ----------------------------
#   revision 1.81
#   date: 2004/11/05 22:41:05;  author: nico;  state: Exp;  lines: +54 -7
#   This allows for MTD support to be used on flash memory which is also used
#   for XIP purposes, either XIP kernel or XIP userspace.  The whole idea is
#   to relocate functions actually modifying the flash state away from array mode
#   to ram and run them with interrupt disabled.  When the flash needs some time
#   to complete a certain operation, we poll the processor for pending (but still
#   masked) interrupts, and when they occur we suspend the flash operation in order
#   to unmask interrupts and let the system run again.
#   ----------------------------
#   revision 1.80
#   date: 2004/11/01 06:02:24;  author: nico;  state: Exp;  lines: +23 -24
#   Prerequisite cleanup for the upcoming patch.
#   This should not have changed the code logic at all.  Sue me if it did.
# 
# drivers/mtd/chips/cfi_cmdset_0001.c
#   2004/11/16 18:57:51+00:00 dwmw2@shinybook.infradead.org +291 -30
#   revision 1.163
#   date: 2004/11/15 20:56:31;  author: nico;  state: Exp;  lines: +106 -26
#   Determine number of hw partitions from extended query data instead of
#   hardcoding it.
#   ----------------------------
#   revision 1.162
#   date: 2004/11/11 11:13:19;  author: dwmw2;  state: Exp;  lines: +12 -2
#   Restore oldstate to FL_READY on resume (or suspend failure).
#   ----------------------------
#   revision 1.161
#   date: 2004/11/05 22:41:04;  author: nico;  state: Exp;  lines: +289 -27
#   This allows for MTD support to be used on flash memory which is also used
#   for XIP purposes, either XIP kernel or XIP userspace.  The whole idea is
#   to relocate functions actually modifying the flash state away from array mode
#   to ram and run them with interrupt disabled.  When the flash needs some time
#   to complete a certain operation, we poll the processor for pending (but still
#   masked) interrupts, and when they occur we suspend the flash operation in order
#   to unmask interrupts and let the system run again.
# 
# drivers/mtd/chips/Kconfig
#   2004/11/16 18:57:51+00:00 dwmw2@shinybook.infradead.org +10 -1
#   revision 1.10
#   date: 2004/11/05 22:41:04;  author: nico;  state: Exp;  lines: +10 -1
#   This allows for MTD support to be used on flash memory which is also used
#   for XIP purposes, either XIP kernel or XIP userspace.  The whole idea is
#   to relocate functions actually modifying the flash state away from array mode
#   to ram and run them with interrupt disabled.  When the flash needs some time
#   to complete a certain operation, we poll the processor for pending (but still
#   masked) interrupts, and when they occur we suspend the flash operation in order
#   to unmask interrupts and let the system run again.
# 
# ChangeSet
#   2004/11/16 18:54:16+00:00 dwmw2@shinybook.infradead.org 
#   JFFS2: Add support for bizarre NOR flash with ECC. 
#   
#   Signed-off-by: Josh Boyer <jdub@us.ibm.com>
#   Signed-off-by: David Woodhouse <dwmw2@infradead.org>
# 
# include/linux/jffs2_fs_sb.h
#   2004/11/16 18:53:54+00:00 dwmw2@shinybook.infradead.org +2 -2
#   revision 1.46
#   date: 2004/11/03 12:57:39;  author: jwboyer;  state: Exp;  lines: +2 -2
#   Adding ECC'd NOR support to JFFS2.  Works with cfi_cmdset_0020.c
#    
#   Signed-off-by: Josh Boyer <jdub@us.ibm.com>
# 
# fs/jffs2/wbuf.c
#   2004/11/16 18:53:54+00:00 dwmw2@shinybook.infradead.org +59 -9
#   revision 1.76
#   date: 2004/11/05 12:41:10;  author: jwboyer;  state: Exp;  lines: +3 -1
#   Fixed compilation with NAND=y but NOR_ECC=n.  Ferenc was right in the first
#   place.  Perhaps my stupidity is a reason to remove these config options finally
#   ----------------------------
#   revision 1.75
#   date: 2004/11/04 22:10:28;  author: jwboyer;  state: Exp;  lines: +1 -5
#   Fixup the fix from Ferenc.  Stupid me
#   ----------------------------
#   revision 1.74
#   date: 2004/11/04 21:42:14;  author: havasi;  state: Exp;  lines: +5 -1
#   Make it compilable without JFFS2_FS_NOR_ECC, too
#   ----------------------------
#   revision 1.73
#   date: 2004/11/03 12:57:39;  author: jwboyer;  state: Exp;  lines: +57 -9
#   Adding ECC'd NOR support to JFFS2.  Works with cfi_cmdset_0020.c
#    
#   Signed-off-by: Josh Boyer <jdub@us.ibm.com>
# 
# fs/jffs2/scan.c
#   2004/11/16 18:53:54+00:00 dwmw2@shinybook.infradead.org +3 -3
#   revision 1.113
#   date: 2004/11/03 12:57:39;  author: jwboyer;  state: Exp;  lines: +3 -3
#   Adding ECC'd NOR support to JFFS2.  Works with cfi_cmdset_0020.c
#    
#   Signed-off-by: Josh Boyer <jdub@us.ibm.com>
#   ----------------------------
# 
# fs/jffs2/os-linux.h
#   2004/11/16 18:53:54+00:00 dwmw2@shinybook.infradead.org +18 -4
#   revision 1.50
#   date: 2004/11/04 22:10:28;  author: jwboyer;  state: Exp;  lines: +5 -2
#   Fixup the fix from Ferenc.  Stupid me
#   ----------------------------
#   revision 1.49
#   date: 2004/11/04 21:42:14;  author: havasi;  state: Exp;  lines: +3 -3
#   Make it compilable without JFFS2_FS_NOR_ECC, too
#   ----------------------------
#   revision 1.48
#   date: 2004/11/03 12:57:39;  author: jwboyer;  state: Exp;  lines: +15 -4
#   Adding ECC'd NOR support to JFFS2.  Works with cfi_cmdset_0020.c
#    
#   Signed-off-by: Josh Boyer <jdub@us.ibm.com>
# 
# fs/jffs2/fs.c
#   2004/11/16 18:53:54+00:00 dwmw2@shinybook.infradead.org +9 -1
#   revision 1.47
#   date: 2004/11/03 12:57:39;  author: jwboyer;  state: Exp;  lines: +9 -1
#   Adding ECC'd NOR support to JFFS2.  Works with cfi_cmdset_0020.c
#    
#   Signed-off-by: Josh Boyer <jdub@us.ibm.com>
# 
# fs/jffs2/erase.c
#   2004/11/16 18:53:54+00:00 dwmw2@shinybook.infradead.org +7 -3
#   revision 1.65
#   date: 2004/11/13 10:51:47;  author: dedekind;  state: Exp;  lines: +2 -2
#   Use kvec instead of iovec structure to pass to the
#   jffs2_flash_direct_writev() function.
#   ----------------------------
#   revision 1.64
#   date: 2004/11/12 15:25:14;  author: jwboyer;  state: Exp;  lines: +5 -10
#   Make cleanmarkers on NOR always write directly.  This fixes some ECOS problems
#   as well.
#   ----------------------------
#   revision 1.63
#   date: 2004/11/11 12:38:28;  author: dwmw2;  state: Exp;  lines: +2 -1
#   Set bad_offset when erase fails under eCos
#   ----------------------------
#   revision 1.62
#   date: 2004/11/03 12:57:39;  author: jwboyer;  state: Exp;  lines: +10 -2
#   Adding ECC'd NOR support to JFFS2.  Works with cfi_cmdset_0020.c
#                                                                                   
#   Signed-off-by: Josh Boyer <jdub@us.ibm.com>
# 
# fs/jffs2/Makefile
#   2004/11/16 18:53:54+00:00 dwmw2@shinybook.infradead.org +2 -1
#   revision 1.7
#   date: 2004/11/03 12:57:38;  author: jwboyer;  state: Exp;  lines: +2 -1
#   Adding ECC'd NOR support to JFFS2.  Works with cfi_cmdset_0020.c
#    
#   Signed-off-by: Josh Boyer <jdub@us.ibm.com>
# 
# fs/Kconfig
#   2004/11/16 18:53:54+00:00 dwmw2@shinybook.infradead.org +9 -0
#   revision 1.8
#   date: 2004/11/03 12:57:37;  author: jwboyer;  state: Exp;  lines: +9 -0
#   Adding ECC'd NOR support to JFFS2.  Works with cfi_cmdset_0020.c
#    
#   Signed-off-by: Josh Boyer <jdub@us.ibm.com>
# 
# ChangeSet
#   2004/11/16 02:17:36-05:00 jgarzik@pobox.com 
#   [libata sata_uli] add 5281 support, fix SATA phy setup for others
#   
#   Contributed by Peer Chen @ ULi and tested by a user.
# 
# drivers/scsi/sata_uli.c
#   2004/11/16 02:17:30-05:00 jgarzik@pobox.com +23 -28
#   [libata sata_uli] add 5281 support, fix SATA phy setup for others
#   
#   Contributed by Peer Chen @ ULi and tested by a user.
# 
# ChangeSet
#   2004/11/14 22:20:03-05:00 jgarzik@pobox.com 
#   [sound/oss] use module_param() in soundcard.c and uart401.c
# 
# ChangeSet
#   2004/11/14 22:19:16-05:00 jgarzik@pobox.com 
#   [sound/oss i810_audio] use module_param()
#   
#   Also, set MODULE_AUTHOR and correct module name in a macro.
# 
# ChangeSet
#   2004/11/14 18:33:29-05:00 webvenza@libero.it 
#   [PATCH] convert sis900 to new style parameters
#   
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# ChangeSet
#   2004/11/14 19:16:42-05:00 ralf@linux-mips.org 
#   [PATCH] Another big 6pack patch
#   
#   Below another 6pack patch which I've got sitting in my repository for a
#   while already.  The patch does:
#   
#    o Update my callsign
#    o Cleanup the internal for synchronization with a 6pack TNC a little bit
#      so it won't result in heaps and piles of messages in syslogs as it used
#      to do.
#    o Does paranoia checks for the maximum allowable packet size on transmit.
#      There was a slight chance this might have resulted in a crash in just
#      the right configuration.
#    o Verifies the address family for the SIOCSIFHWADDR network interface
#      ioctl.
#    o Tries to do proper locking so nothing will access dev->dev_addr in
#      midflight while changing the layer 2 address.
#    o Uses an intermediate buffer for the SIOCSIFHWADDR ioctl so an error in
#      copy_from_user can't result in a half-modified MAC address.
#    o Swaps the arguments of decode_prio_command, decode_std_command and
#      decode_data such that for consistency the struct sixpack pointer will be
#      the first argument like everywhere else.
#   
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# ChangeSet
#   2004/11/14 18:29:10-05:00 jgarzik@pobox.com 
#   Merge pobox.com:/garz/repo/linux-2.6
#   into pobox.com:/garz/repo/netdev-2.6/misc
# 
# sound/oss/uart401.c
#   2004/11/14 22:19:57-05:00 jgarzik@pobox.com +4 -4
#   [sound/oss] use module_param() in soundcard.c and uart401.c
# 
# sound/oss/soundcard.c
#   2004/11/14 22:19:57-05:00 jgarzik@pobox.com +2 -2
#   [sound/oss] use module_param() in soundcard.c and uart401.c
# 
# sound/oss/i810_audio.c
#   2004/11/14 22:19:11-05:00 jgarzik@pobox.com +6 -6
#   [sound/oss i810_audio] use module_param()
#   
#   Also, set MODULE_AUTHOR and correct module name in a macro.
# 
# drivers/net/hamradio/6pack.c
#   2004/11/02 13:51:05-05:00 ralf@linux-mips.org +179 -191
#   Another big 6pack patch
# 
# drivers/net/sis900.c
#   2004/11/12 10:33:20-05:00 webvenza@libero.it +4 -3
#   convert sis900 to new style parameters
# 
# drivers/net/Kconfig
#   2004/11/14 18:29:06-05:00 jgarzik@pobox.com +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/11/13 20:37:46-05:00 shemminger@osdl.org 
#   [PATCH] sk98: ethtool pause param support
#   
#   The basic stuff comes from the newer code from SysKonnect, but there
#   code had ugly way to find the PNMI instance. This driver seems full
#   of places where they do unnecessary board/port bookeeping (*sigh*)
#   
#   Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/sk98lin/skethtool.c
#   2004/11/03 17:39:56-05:00 shemminger@osdl.org +108 -1
#   (9/23) sk98: ethtool pause param support
# 
# ChangeSet
#   2004/11/13 20:37:35-05:00 shemminger@osdl.org 
#   [PATCH] sk98: ethtool phy support
#   
#   The basic stuff comes from the newer code from SysKonnect, but I redid
#   it using a per board timer rather than a global timer.
#   
#   Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/sk98lin/skge.c
#   2004/11/03 17:31:05-05:00 shemminger@osdl.org +6 -0
#   (8/23) sk98: ethtool phy support
# 
# drivers/net/sk98lin/skethtool.c
#   2004/11/03 17:31:05-05:00 shemminger@osdl.org +118 -0
#   (8/23) sk98: ethtool phy support
# 
# drivers/net/sk98lin/h/skdrv2nd.h
#   2004/11/03 17:31:05-05:00 shemminger@osdl.org +2 -0
#   (8/23) sk98: ethtool phy support
# 
# ChangeSet
#   2004/11/13 20:37:24-05:00 shemminger@osdl.org 
#   [PATCH] sk98: basic ethtool support
#   
#   The basic stuff comes from the newer code from SysKonnect, but I redid
#   it using ethtool_ops and a cleaner way of doing the stats (from e100)
#   
#   Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/sk98lin/skethtool.c
#   2004/11/03 17:28:47-05:00 shemminger@osdl.org +330 -0
#   (7/23) sk98: basic ethtool support
# 
# drivers/net/sk98lin/skge.c
#   2004/11/03 17:28:47-05:00 shemminger@osdl.org +4 -0
#   (7/23) sk98: basic ethtool support
# 
# drivers/net/sk98lin/skethtool.c
#   2004/11/03 17:28:47-05:00 shemminger@osdl.org +0 -0
#   BitKeeper file /garz/repo/netdev-2.6/sk98lin/drivers/net/sk98lin/skethtool.c
# 
# drivers/net/sk98lin/Makefile
#   2004/11/03 17:28:47-05:00 shemminger@osdl.org +1 -0
#   (7/23) sk98: basic ethtool support
# 
# ChangeSet
#   2004/11/13 20:37:13-05:00 shemminger@osdl.org 
#   [PATCH] sk98: add netpoll console support
#   
#   Add netpoll console support
#   
#   From: Michal Schmidt <xschmi00@stud.feec.vutbr.cz>
#   Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/sk98lin/skge.c
#   2004/11/03 17:08:32-05:00 shemminger@osdl.org +21 -0
#   (6/23) sk98: add netpoll console support
# 
# ChangeSet
#   2004/11/13 20:37:02-05:00 shemminger@osdl.org 
#   [PATCH] sk98: use module_param
#   
#   Use new format module_param rather than now deprecated MODULE_PARM
#   
#   Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/sk98lin/skge.c
#   2004/11/03 17:08:18-05:00 shemminger@osdl.org +21 -20
#   (5/23) sk98: use module_param
# 
# ChangeSet
#   2004/11/13 20:36:52-05:00 shemminger@osdl.org 
#   [PATCH] sk98: use netdev_priv
#   
#   Use netdev_priv when dereferenceing net_device private
#   
#   Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/sk98lin/skge.c
#   2004/11/03 17:07:58-05:00 shemminger@osdl.org +33 -38
#   (4/23) sk98: use netdev_priv
# 
# ChangeSet
#   2004/11/13 20:36:41-05:00 shemminger@osdl.org 
#   [PATCH] sk98: /proc interface related changes
#   
#   The /proc intereface can be cleaned up a lot:
#   + Pass the device to through the proc data/seq_private hook.
#   + No longer needs to have a list of network devices
#   + use seq_printf directly rather than indirection into a buffer
#   + failure to create proc directory or interface should not
#     be fatal.
#   + if PROC_FS not configured, let the stubs cause the necessary
#     code elimination rather than using #ifdef
#   
#   Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/sk98lin/skproc.c
#   2004/11/05 19:25:13-05:00 shemminger@osdl.org +170 -283
#   (3/23) sk98: /proc interface related changes
# 
# drivers/net/sk98lin/skge.c
#   2004/11/05 19:25:13-05:00 shemminger@osdl.org +37 -66
#   (3/23) sk98: /proc interface related changes
# 
# drivers/net/sk98lin/h/skdrv2nd.h
#   2004/11/05 19:25:13-05:00 shemminger@osdl.org +1 -2
#   (3/23) sk98: /proc interface related changes
# 
# ChangeSet
#   2004/11/13 20:36:31-05:00 shemminger@osdl.org 
#   [PATCH] sk98: local variable can be constant
#   
#   The table OnesHash is only used in this file, and should
#   be made a local constant.
#   
#   Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/sk98lin/skaddr.c
#   2004/11/03 17:07:28-05:00 shemminger@osdl.org +1 -1
#   (2/23) sk98: local variable can be constant
# 
# ChangeSet
#   2004/11/13 20:36:20-05:00 shemminger@osdl.org 
#   [PATCH] sk98: no explicit module ref counting needed
#   
#   Network driver's shouldn't be doing module reference counting
#   on 2.6.  This is a bad replication of 2.4 behaviour
#   
#   Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/sk98lin/skge.c
#   2004/11/03 17:07:09-05:00 shemminger@osdl.org +3 -31
#   (1/23) sk98: no explicit module ref counting needed
# 
# ChangeSet
#   2004/11/11 19:18:27+01:00 perex@suse.cz 
#   ALSA 1.0.7
# 
# include/sound/version.h
#   2004/11/11 19:17:49+01:00 perex@suse.cz +2 -2
#   ALSA 1.0.7
# 
# ChangeSet
#   2004/11/11 22:23:44+11:00 airlied@starflyer.(none) 
#   drm: in-correct locking in intel drms
#   
#   The locking in the intel drms is incorrect it doesn't check
#   the current context owns the lock, just that someone does.
#   This could allow strange things to happen with multiple clients.
#   
#   From: Stefan Dirsch <sndirsch@suse.de>
#   Approved-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/i915_irq.c
#   2004/11/11 22:23:34+11:00 airlied@starflyer.(none) +1 -4
#   drm: in-correct locking in intel drms
#   
#   The locking in the intel drms is incorrect it doesn't check
#   the current context owns the lock, just that someone does.
#   This could allow strange things to happen with multiple clients.
#   
#   From: Stefan Dirsch <sndirsch@suse.de>
#   Approved-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/i915_dma.c
#   2004/11/11 22:23:34+11:00 airlied@starflyer.(none) +5 -16
#   drm: in-correct locking in intel drms
#   
#   The locking in the intel drms is incorrect it doesn't check
#   the current context owns the lock, just that someone does.
#   This could allow strange things to happen with multiple clients.
#   
#   From: Stefan Dirsch <sndirsch@suse.de>
#   Approved-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/i830_irq.c
#   2004/11/11 22:23:34+11:00 airlied@starflyer.(none) +1 -4
#   drm: in-correct locking in intel drms
#   
#   The locking in the intel drms is incorrect it doesn't check
#   the current context owns the lock, just that someone does.
#   This could allow strange things to happen with multiple clients.
#   
#   From: Stefan Dirsch <sndirsch@suse.de>
#   Approved-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/i830_dma.c
#   2004/11/11 22:23:34+11:00 airlied@starflyer.(none) +6 -24
#   drm: in-correct locking in intel drms
#   
#   The locking in the intel drms is incorrect it doesn't check
#   the current context owns the lock, just that someone does.
#   This could allow strange things to happen with multiple clients.
#   
#   From: Stefan Dirsch <sndirsch@suse.de>
#   Approved-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/i810_dma.c
#   2004/11/11 22:23:34+11:00 airlied@starflyer.(none) +10 -37
#   drm: in-correct locking in intel drms
#   
#   The locking in the intel drms is incorrect it doesn't check
#   the current context owns the lock, just that someone does.
#   This could allow strange things to happen with multiple clients.
#   
#   From: Stefan Dirsch <sndirsch@suse.de>
#   Approved-by: Dave Airlie <airlied@linux.ie>
# 
# ChangeSet
#   2004/11/11 11:52:13+01:00 perex@suse.cz 
#   [ALSA] nonblock_open=1 by default for OSS PCM API emulation
#   
#   Documentation,ALSA<-OSS emulation
#   
#   
#   Signed-off-by: Jaroslav Kysela <perex@suse.cz>
# 
# ChangeSet
#   2004/11/11 21:52:12+11:00 airlied@starflyer.(none) 
#   drm: remove use of drm_agp use agp backend directly.
#   
#   This removes the inter module stuff between the DRM and AGP.
#   
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_drv.c
#   2004/11/11 21:52:02+11:00 airlied@starflyer.(none) +0 -1
#   drm: remove use of drm_agp use agp backend directly.
#   
#   This removes the inter module stuff between the DRM and AGP.
#   
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_agpsupport.c
#   2004/11/11 21:52:02+11:00 airlied@starflyer.(none) +37 -66
#   drm: remove use of drm_agp use agp backend directly.
#   
#   This removes the inter module stuff between the DRM and AGP.
#   
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drmP.h
#   2004/11/11 21:52:02+11:00 airlied@starflyer.(none) +0 -1
#   drm: remove use of drm_agp use agp backend directly.
#   
#   This removes the inter module stuff between the DRM and AGP.
#   
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# sound/core/oss/pcm_oss.c
#   2004/11/10 23:41:05+01:00 perex@suse.cz +1 -1
#   [ALSA] nonblock_open=1 by default for OSS PCM API emulation
#   
#   D:2004/11/11 06:41:03
#   C:Documentation,ALSA<-OSS emulation
#   F:Documentation/OSS-Emulation.txt:1.7->1.8 
#   F:core/oss/pcm_oss.c:1.80->1.81 
#   L:
#   Signed-off-by: Jaroslav Kysela <perex@suse.cz>
# 
# Documentation/sound/alsa/OSS-Emulation.txt
#   2004/11/10 23:41:03+01:00 perex@suse.cz +5 -6
#   [ALSA] nonblock_open=1 by default for OSS PCM API emulation
#   
#   D:2004/11/11 06:41:03
#   C:Documentation,ALSA<-OSS emulation
#   F:Documentation/OSS-Emulation.txt:1.7->1.8 
#   F:core/oss/pcm_oss.c:1.80->1.81 
#   L:
#   Signed-off-by: Jaroslav Kysela <perex@suse.cz>
# 
# ChangeSet
#   2004/11/11 11:51:08+01:00 perex@suse.cz 
#   [ALSA] fix parsing of mixer unit descriptors
#   
#   USB generic driver
#   MU descriptor parsing code completely rewritten; the old code confused
#   the number of input audio channel clusters and the number of input
#   channels.  Furthermore, check all bmControls bits so that mixer
#   controls are created even if the first output channel doesn't have
#   a control.
#   
#   Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
# 
# sound/usb/usbmixer.c
#   2004/11/10 10:29:55+01:00 perex@suse.cz +40 -19
#   [ALSA] fix parsing of mixer unit descriptors
#   
#   D:2004/11/10 17:29:55
#   C:USB generic driver
#   F:usb/usbmixer.c:1.32->1.33 
#   L:MU descriptor parsing code completely rewritten; the old code confused
#   L:the number of input audio channel clusters and the number of input
#   L:channels.  Furthermore, check all bmControls bits so that mixer
#   L:controls are created even if the first output channel doesn't have
#   L:a control.
#   Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
# 
# ChangeSet
#   2004/11/11 11:50:04+01:00 perex@suse.cz 
#   [ALSA] read bmControls array in correct order
#   
#   USB generic driver
#   The driver used some code from audio.c that reads the bmControl array
#   backwards; this would not work here as we get a pointer to the
#   beginning of the array.
#   
#   Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
# 
# sound/usb/usbmixer.c
#   2004/11/10 06:48:03+01:00 perex@suse.cz +1 -1
#   [ALSA] read bmControls array in correct order
#   
#   D:2004/11/10 13:48:03
#   C:USB generic driver
#   F:usb/usbmixer.c:1.31->1.32 
#   L:The driver used some code from audio.c that reads the bmControl array
#   L:backwards; this would not work here as we get a pointer to the
#   L:beginning of the array.
#   Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
# 
# ChangeSet
#   2004/11/11 11:48:57+01:00 perex@suse.cz 
#   [ALSA] handle missing control bitmap when parsing MUDs
#   
#   USB generic driver
#   The AudioTrak Maya44 USB has a mixer unit descriptor without a
#   bmControl field; handle this as if all bits are zero.
#   
#   Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
# 
# sound/usb/usbmixer.c
#   2004/11/10 06:44:15+01:00 perex@suse.cz +5 -2
#   [ALSA] handle missing control bitmap when parsing MUDs
#   
#   D:2004/11/10 13:44:15
#   C:USB generic driver
#   F:usb/usbmixer.c:1.30->1.31 
#   L:The AudioTrak Maya44 USB has a mixer unit descriptor without a
#   L:bmControl field; handle this as if all bits are zero.
#   Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
# 
# ChangeSet
#   2004/11/11 11:47:49+01:00 perex@suse.cz 
#   [ALSA] emu10k1 - fixed remaining problems with new DSP code loading
#   
#   EMU10K1/EMU10K2 driver
#   
#   
#   Signed-off-by: Jaroslav Kysela <perex@suse.cz>
# 
# sound/pci/emu10k1/emufx.c
#   2004/11/10 04:54:36+01:00 perex@suse.cz +12 -22
#   [ALSA] emu10k1 - fixed remaining problems with new DSP code loading
#   
#   D:2004/11/10 11:54:36
#   C:EMU10K1/EMU10K2 driver
#   F:pci/emu10k1/emufx.c:1.62->1.63 
#   L:
#   Signed-off-by: Jaroslav Kysela <perex@suse.cz>
# 
# ChangeSet
#   2004/11/11 11:46:44+01:00 perex@suse.cz 
#   [ALSA] [emu10k1] add interval timer support
#   
#   EMU10K1/EMU10K2 driver
#   
#   
#   Signed-off-by: Lee Revell <rlrevell@joe-job.com>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/emu10k1/irq.c
#   2004/11/10 02:49:12+01:00 perex@suse.cz +2 -2
#   [ALSA] [emu10k1] add interval timer support
#   
#   D:2004/11/10 09:49:11
#   C:EMU10K1/EMU10K2 driver
#   F:include/emu10k1.h:1.49->1.50 
#   F:pci/emu10k1/Makefile:1.10->1.11 
#   F:pci/emu10k1/emu10k1.c:1.28->1.29 
#   F:pci/emu10k1/irq.c:1.10->1.11 
#   F:pci/emu10k1/timer.c:INITIAL->1.1 
#   L:
#   Signed-off-by: Lee Revell <rlrevell@joe-job.com>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/emu10k1/emu10k1.c
#   2004/11/10 02:49:12+01:00 perex@suse.cz +6 -0
#   [ALSA] [emu10k1] add interval timer support
#   
#   D:2004/11/10 09:49:11
#   C:EMU10K1/EMU10K2 driver
#   F:include/emu10k1.h:1.49->1.50 
#   F:pci/emu10k1/Makefile:1.10->1.11 
#   F:pci/emu10k1/emu10k1.c:1.28->1.29 
#   F:pci/emu10k1/irq.c:1.10->1.11 
#   F:pci/emu10k1/timer.c:INITIAL->1.1 
#   L:
#   Signed-off-by: Lee Revell <rlrevell@joe-job.com>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/emu10k1/Makefile
#   2004/11/10 02:49:12+01:00 perex@suse.cz +1 -1
#   [ALSA] [emu10k1] add interval timer support
#   
#   D:2004/11/10 09:49:11
#   C:EMU10K1/EMU10K2 driver
#   F:include/emu10k1.h:1.49->1.50 
#   F:pci/emu10k1/Makefile:1.10->1.11 
#   F:pci/emu10k1/emu10k1.c:1.28->1.29 
#   F:pci/emu10k1/irq.c:1.10->1.11 
#   F:pci/emu10k1/timer.c:INITIAL->1.1 
#   L:
#   Signed-off-by: Lee Revell <rlrevell@joe-job.com>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# include/sound/emu10k1.h
#   2004/11/10 02:49:11+01:00 perex@suse.cz +4 -0
#   [ALSA] [emu10k1] add interval timer support
#   
#   D:2004/11/10 09:49:11
#   C:EMU10K1/EMU10K2 driver
#   F:include/emu10k1.h:1.49->1.50 
#   F:pci/emu10k1/Makefile:1.10->1.11 
#   F:pci/emu10k1/emu10k1.c:1.28->1.29 
#   F:pci/emu10k1/irq.c:1.10->1.11 
#   F:pci/emu10k1/timer.c:INITIAL->1.1 
#   L:
#   Signed-off-by: Lee Revell <rlrevell@joe-job.com>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/emu10k1/timer.c
#   2004/11/11 10:45:36+01:00 perex@suse.cz +99 -0
#   [ALSA] [emu10k1] add interval timer support
#   
#   D:2004/11/10 09:49:11
#   C:EMU10K1/EMU10K2 driver
#   F:include/emu10k1.h:1.49->1.50 
#   F:pci/emu10k1/Makefile:1.10->1.11 
#   F:pci/emu10k1/emu10k1.c:1.28->1.29 
#   F:pci/emu10k1/irq.c:1.10->1.11 
#   F:pci/emu10k1/timer.c:INITIAL->1.1 
#   L:
#   Signed-off-by: Lee Revell <rlrevell@joe-job.com>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/emu10k1/timer.c
#   2004/11/11 10:45:36+01:00 perex@suse.cz +0 -0
#   BitKeeper file /home/perex/bk/linux-sound/work/sound/pci/emu10k1/timer.c
# 
# ChangeSet
#   2004/11/11 11:45:39+01:00 perex@suse.cz 
#   [ALSA] Fixed issues with Abit AV8
#   
#   VIA82xx driver
#   Added Abit AV8 sound card to the white list to use
#   VIA_DXS_NO_VRA by default. This resolves issues with
#   programs wanting to use 41k streams. It also fixes
#   gstreamer issue with alsasink module interaction.
#   
#   Signed-off-by: Jerone Young <jerone@gmail.com>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/via82xx.c
#   2004/11/09 10:43:36+01:00 perex@suse.cz +1 -0
#   [ALSA] Fixed issues with Abit AV8
#   
#   D:2004/11/09 17:43:36
#   C:VIA82xx driver
#   F:pci/via82xx.c:1.126->1.127 
#   L:Added Abit AV8 sound card to the white list to use
#   L:VIA_DXS_NO_VRA by default. This resolves issues with
#   L:programs wanting to use 41k streams. It also fixes
#   L:gstreamer issue with alsasink module interaction.
#   Signed-off-by: Jerone Young <jerone@gmail.com>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2004/11/11 11:44:32+01:00 perex@suse.cz 
#   [ALSA] Add subvendor ID to the pci id table of vx222 driver
#   
#   Digigram VX222 driver
#   The subsystem ID is added to the pci id table of vx222 driver
#   to make the matching more strict since it (PLX) conflicts with
#   other devices.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/vx222/vx222.c
#   2004/11/09 09:05:37+01:00 perex@suse.cz +2 -2
#   [ALSA] Add subvendor ID to the pci id table of vx222 driver
#   
#   D:2004/11/09 16:05:37
#   C:Digigram VX222 driver
#   F:pci/vx222/vx222.c:1.9->1.10 
#   L:The subsystem ID is added to the pci id table of vx222 driver
#   L:to make the matching more strict since it (PLX) conflicts with
#   L:other devices.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2004/11/11 11:43:26+01:00 perex@suse.cz 
#   [ALSA] removes unneeded spin_lock_irqsave()s from snd-es1968
#   
#   ES1968 driver
#   spin_lock_irqsave(&chip->reg_lock) was called a second time in sequence from
#   snd_es1968_bob_start() called from es1968_measure_clock().
#   While this didn't cause harm on my UP laptop with mainline kernels,
#   it made 'insmod snd-es1968' hang on kernel 2.6.9-mm1-RT-V0.6.9.
#   The patch assumes that 2 callpaths don't need explicit spinlock protection:
#   1: The trigger callback, because it is called with IRQs disabled.
#   2. PM's suspend/resume callbacks, because  those are called while ortdinary
#      user processes are frozen.
#      Thus the spin_lock_irqsave(&chip->reg_lock)  calls in snd_es1968_bob_start()
#      / snd_es1968_bob_stop() are not needed.
#   
#   Signed-off-by: Karsten Wiese <annabellesgarden@yahoo.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# sound/pci/es1968.c
#   2004/11/09 02:18:44+01:00 perex@suse.cz +0 -6
#   [ALSA] removes unneeded spin_lock_irqsave()s from snd-es1968
#   
#   D:2004/11/09 09:18:44
#   C:ES1968 driver
#   F:pci/es1968.c:1.77->1.78 
#   L:spin_lock_irqsave(&chip->reg_lock) was called a second time in sequence from
#   L:snd_es1968_bob_start() called from es1968_measure_clock().
#   L:While this didn't cause harm on my UP laptop with mainline kernels,
#   L:it made 'insmod snd-es1968' hang on kernel 2.6.9-mm1-RT-V0.6.9.
#   L:The patch assumes that 2 callpaths don't need explicit spinlock protection:
#   L:1: The trigger callback, because it is called with IRQs disabled.
#   L:2. PM's suspend/resume callbacks, because  those are called while ortdinary
#   L:   user processes are frozen.
#   L:   Thus the spin_lock_irqsave(&chip->reg_lock)  calls in snd_es1968_bob_start()
#   L:   / snd_es1968_bob_stop() are not needed.
#   Signed-off-by: Karsten Wiese <annabellesgarden@yahoo.de>
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2004/11/11 11:42:23+01:00 perex@suse.cz 
#   [ALSA] Fixed the description of module_parm_array()
#   
#   Documentation
#   Fixed the description about module_param_array() for the latest change.
#   
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
#   2004/11/09 02:16:33+01:00 perex@suse.cz +3 -7
#   [ALSA] Fixed the description of module_parm_array()
#   
#   D:2004/11/09 09:16:33
#   C:Documentation
#   F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.42->1.43 
#   L:Fixed the description about module_param_array() for the latest change.
#   Signed-off-by: Takashi Iwai <tiwai@suse.de>
# 
# ChangeSet
#   2004/11/11 11:41:13+01:00 perex@suse.cz 
#   [ALSA] remove snd_seq_simple_id
#   
#   Instrument layer,GUS Library,Trident driver
#   remove uses of the snd_seq_simple_id symbol because it is
#   no longer exported
#   
#   Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
# 
# sound/pci/trident/trident_synth.c
#   2004/11/09 01:05:14+01:00 perex@suse.cz +1 -1
#   [ALSA] remove snd_seq_simple_id
#   
#   D:2004/11/09 08:05:14
#   C:Instrument layer,GUS Library,Trident driver
#   F:include/ainstr_simple.h:1.4->1.5 
#   F:isa/gus/gus_sample.c:1.5->1.6 
#   F:pci/trident/trident_synth.c:1.15->1.16 
#   L:remove uses of the snd_seq_simple_id symbol because it is
#   L:no longer exported
#   Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
# 
# sound/isa/gus/gus_sample.c
#   2004/11/09 01:05:14+01:00 perex@suse.cz +1 -1
#   [ALSA] remove snd_seq_simple_id
#   
#   D:2004/11/09 08:05:14
#   C:Instrument layer,GUS Library,Trident driver
#   F:include/ainstr_simple.h:1.4->1.5 
#   F:isa/gus/gus_sample.c:1.5->1.6 
#   F:pci/trident/trident_synth.c:1.15->1.16 
#   L:remove uses of the snd_seq_simple_id symbol because it is
#   L:no longer exported
#   Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
# 
# include/sound/ainstr_simple.h
#   2004/11/09 01:05:14+01:00 perex@suse.cz +0 -2
#   [ALSA] remove snd_seq_simple_id
#   
#   D:2004/11/09 08:05:14
#   C:Instrument layer,GUS Library,Trident driver
#   F:include/ainstr_simple.h:1.4->1.5 
#   F:isa/gus/gus_sample.c:1.5->1.6 
#   F:pci/trident/trident_synth.c:1.15->1.16 
#   L:remove uses of the snd_seq_simple_id symbol because it is
#   L:no longer exported
#   Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
# 
# ChangeSet
#   2004/11/11 11:40:08+01:00 perex@suse.cz 
#   [ALSA] Added SNDRV_HWDEP_IFACE_BLUETOOTH
#   
#   ALSA Core
#   
#   
#   Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
#   Signed-off-by: Jaroslav Kysela <perex@suse.cz>
# 
# include/sound/asound.h
#   2004/11/08 05:20:03+01:00 perex@suse.cz +2 -1
#   [ALSA] Added SNDRV_HWDEP_IFACE_BLUETOOTH
#   
#   D:2004/11/08 12:20:03
#   C:ALSA Core
#   F:include/asound.h:1.45->1.46 
#   L:
#   Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
#   Signed-off-by: Jaroslav Kysela <perex@suse.cz>
# 
# ChangeSet
#   2004/11/11 11:39:05+01:00 perex@suse.cz 
#   [ALSA] emu10k1 - another attempt to correct the new emufx DSP code
#   
#   EMU10K1/EMU10K2 driver
#   
#   
#   Signed-off-by: Jaroslav Kysela <perex@suse.cz>
# 
# sound/pci/emu10k1/emufx.c
#   2004/11/07 23:42:44+01:00 perex@suse.cz +8 -6
#   [ALSA] emu10k1 - another attempt to correct the new emufx DSP code
#   
#   D:2004/11/08 06:42:44
#   C:EMU10K1/EMU10K2 driver
#   F:pci/emu10k1/emufx.c:1.61->1.62 
#   L:
#   Signed-off-by: Jaroslav Kysela <perex@suse.cz>
# 
# ChangeSet
#   2004/11/11 11:37:58+01:00 perex@suse.cz 
#   [ALSA] replace schedule_timeout() with msleep()
#   
#   SPARC cs4231 driver
#   Uses msleep() instead of schedule_timeout() to guarantee the task
#   delays as expected.
#   
#   Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
#   Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
# 
# sound/sparc/cs4231.c
#   2004/11/04 00:57:41+01:00 perex@suse.cz +8 -9
#   [ALSA] replace schedule_timeout() with msleep()
#   
#   D:2004/11/04 07:57:41
#   C:SPARC cs4231 driver
#   F:sparc/cs4231.c:1.18->1.19 
#   L:Uses msleep() instead of schedule_timeout() to guarantee the task
#   L:delays as expected.
#   Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
#   Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
# 
# ChangeSet
#   2004/11/11 11:22:49+01:00 perex@suse.cz 
#   [ALSA] replace schedule_timeout() with msleep()
#       
#   CS4231 driver
#   Uses msleep() instead of schedule_timeout() to guarantee
#   the task delays as expected. This lead to several related changes, as
#   the current code assumes the value of HZ is 100. Use timeout as an
#   iteration variable to count out how many 10ms delays should be used.
#       
#   Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
#   Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
# 
# ChangeSet
#   2004/11/11 21:15:33+11:00 airlied@starflyer.(none) 
#   drm: fix Kconfig dependency
#   
#   fixup DRM/AGP Kconfig inter-dependency...
#   
#   From: Roman Zippel <zippel@linux-m68k.org>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/Kconfig
#   2004/11/11 21:15:23+11:00 airlied@starflyer.(none) +1 -0
#   drm: fix Kconfig dependency
#   
#   fixup DRM/AGP Kconfig inter-dependency...
#   
#   From: Roman Zippel <zippel@linux-m68k.org>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# sound/isa/cs423x/cs4231_lib.c
#   2004/11/03 02:10:40+01:00 perex@suse.cz +6 -15
#   [ALSA] replace schedule_timeout() with msleep()
#   
#   CS4231 driver
#   Uses msleep() instead of schedule_timeout() to guarantee
#   the task delays as expected. This lead to several related changes, as
#   the current code assumes the value of HZ is 100. Use timeout as an
#   iteration variable to count out how many 10ms delays should be used.
#   
#   Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
#   Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
# 
# ChangeSet
#   2004/11/11 20:53:06+11:00 airlied@starflyer.(none) 
#   drm: fix warning for missing vunmap
#   
#   In file included from drivers/char/drm/drmP.h:795,
#                    from drivers/char/drm/drm_dma.c:36:
#   drivers/char/drm/drm_memory.h: In function `drm_ioremapfree':
#   drivers/char/drm/drm_memory.h:191: warning: implicit declaration of function
#   `vunmap'
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_memory.h
#   2004/11/11 20:52:55+11:00 airlied@starflyer.(none) +1 -0
#   drm: fix warning for missing vunmap
#   
#   In file included from drivers/char/drm/drmP.h:795,
#                    from drivers/char/drm/drm_dma.c:36:
#   drivers/char/drm/drm_memory.h: In function `drm_ioremapfree':
#   drivers/char/drm/drm_memory.h:191: warning: implicit declaration of function
#   `vunmap'
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# ChangeSet
#   2004/11/11 10:09:08+01:00 perex@suse.cz 
#   Merge
# 
# sound/core/info.c
#   2004/11/11 10:08:40+01:00 perex@suse.cz +1 -5
#   SCCS merged
# 
# ChangeSet
#   2004/11/11 02:56:38-05:00 len.brown@intel.com 
#   [ACPI] CPU hotplug, use kobject_hotplug(), kobject_register()
#   
#   Signed-off-by: Anil S. Keshavamurthy <anil.s.keshavamurthy@intel.com>
#   Signed-off-by: Len Brown <len.brown@intel.com>
# 
# drivers/acpi/scan.c
#   2004/11/11 02:56:31-05:00 len.brown@intel.com +1 -2
#   Use kobject_register()
# 
# drivers/acpi/processor.c
#   2004/11/11 02:56:31-05:00 len.brown@intel.com +4 -54
#   Use kobject_hotplug()
# 
# drivers/acpi/container.c
#   2004/11/11 02:56:31-05:00 len.brown@intel.com +3 -49
#   Use kobject_hotplug()
# 
# ChangeSet
#   2004/11/11 02:44:40-05:00 len.brown@intel.com 
#   merge
# 
# include/linux/acpi.h
#   2004/11/11 02:44:32-05:00 len.brown@intel.com +0 -0
#   merge
# 
# drivers/acpi/scan.c
#   2004/11/11 02:44:32-05:00 len.brown@intel.com +0 -0
#   merge
# 
# drivers/acpi/processor.c
#   2004/11/11 02:44:32-05:00 len.brown@intel.com +5 -4
#   merge
# 
# drivers/acpi/pci_irq.c
#   2004/11/10 23:16:23-05:00 len.brown@intel.com +0 -0
#   Auto merged
# 
# drivers/acpi/bus.c
#   2004/11/10 23:16:23-05:00 len.brown@intel.com +0 -0
#   Auto merged
# 
# arch/i386/kernel/acpi/boot.c
#   2004/11/10 23:16:17-05:00 len.brown@intel.com +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/11/10 16:28:17-08:00 torvalds@ppc970.osdl.org 
#   Fix the fix.
#   
#   Silly #endif placement problem.
# 
# arch/i386/kernel/io_apic.c
#   2004/11/10 16:28:10-08:00 torvalds@ppc970.osdl.org +1 -1
#   Fix the fix.
#   
#   Silly #endif placement problem.
# 
# ChangeSet
#   2004/11/10 16:25:01-08:00 acme@conectiva.com.br 
#   [PATCH] fix  platform_rename_gsi related ia32 build breakage
#   
#   "platform_rename_gsi" does not exist unless CONFIG_ACPI_BOOT is defined.
# 
# arch/i386/kernel/io_apic.c
#   2004/11/10 15:58:57-08:00 acme@conectiva.com.br +2 -0
#   fix  platform_rename_gsi related ia32 build breakage
# 
# ChangeSet
#   2004/11/10 22:34:21+11:00 airlied@starflyer.(none) 
#   drm: move ati_pcigart into drm core
#   
#   This moves the ati_pcigart code into the drm core.
#   
#   From: Jon Smirl <jonsmirl@gmail.com>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/radeon_drv.c
#   2004/11/10 22:34:12+11:00 airlied@starflyer.(none) +0 -1
#   drm: move ati_pcigart into drm core
#   
#   This moves the ati_pcigart code into the drm core.
#   
#   From: Jon Smirl <jonsmirl@gmail.com>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/radeon_cp.c
#   2004/11/10 22:34:12+11:00 airlied@starflyer.(none) +0 -1
#   drm: move ati_pcigart into drm core
#   
#   This moves the ati_pcigart code into the drm core.
#   
#   From: Jon Smirl <jonsmirl@gmail.com>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/r128_drv.c
#   2004/11/10 22:34:12+11:00 airlied@starflyer.(none) +0 -1
#   drm: move ati_pcigart into drm core
#   
#   This moves the ati_pcigart code into the drm core.
#   
#   From: Jon Smirl <jonsmirl@gmail.com>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/r128_cce.c
#   2004/11/10 22:34:12+11:00 airlied@starflyer.(none) +0 -1
#   drm: move ati_pcigart into drm core
#   
#   This moves the ati_pcigart code into the drm core.
#   
#   From: Jon Smirl <jonsmirl@gmail.com>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/ati_pcigart.c
#   2004/11/10 22:34:12+11:00 airlied@starflyer.(none) +6 -5
#   drm: move ati_pcigart into drm core
#   
#   This moves the ati_pcigart code into the drm core.
#   
#   From: Jon Smirl <jonsmirl@gmail.com>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/Makefile
#   2004/11/10 22:34:12+11:00 airlied@starflyer.(none) +1 -1
#   drm: move ati_pcigart into drm core
#   
#   This moves the ati_pcigart code into the drm core.
#   
#   From: Jon Smirl <jonsmirl@gmail.com>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/ati_pcigart.c
#   2004/11/10 22:26:00+11:00 airlied@starflyer.(none) +0 -0
#   Rename: drivers/char/drm/ati_pcigart.h -> drivers/char/drm/ati_pcigart.c
# 
# ChangeSet
#   2004/11/08 23:32:53-05:00 jgarzik@pobox.com 
#   Hand-merge module_param() conflicts in s2io net driver.
# 
# drivers/net/s2io.c
#   2004/11/08 23:32:47-05:00 jgarzik@pobox.com +2 -14
#   Hand-merge module_param() conflicts in s2io net driver.
# 
# drivers/net/s2io.h
#   2004/11/08 23:27:33-05:00 jgarzik@pobox.com +0 -0
#   Auto merged
# 
# drivers/net/Kconfig
#   2004/11/08 23:27:33-05:00 jgarzik@pobox.com +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/11/08 23:13:41-05:00 raghavendra.koushik@s2io.com 
#   [PATCH] S2io: styling
#   
#   Attached is the patch to implement comments about styling
#   and few other changes.
#   Following is list of changes.
#   1. Incorporated Randy's comment about C99 format for s2io_driver
#      structure initialization.
#   2. Driver version displayed at load time.
#   3. If initialization failed in s2io_init_nic(), appropriate error
#      codes are returned.
#   4. #ifdef SET_ETHTOOL_OPS removed in couple of places.
#   
#   Signed-off-by: Raghavendra Koushik <raghavendra.koushik@s2io.com>
#   Signed-off-by: Ravinandan Arakali <ravinandan.arakali@s2io.com>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/s2io.h
#   2004/10/26 19:45:48-04:00 raghavendra.koushik@s2io.com +0 -6
#   S2io: styling
# 
# drivers/net/s2io.c
#   2004/10/26 19:45:48-04:00 raghavendra.koushik@s2io.com +14 -7
#   S2io: styling
# 
# ChangeSet
#   2004/11/08 23:13:28-05:00 raghavendra.koushik@s2io.com 
#   [PATCH] S2io: modified loadable parameters
#   
#   Attached is the patch to implement module loadable parameters as per new API.
#   Following is the list of changes.
#   
#   1. Used new module_param() API.
#   2. List of variables for tx_fifo_len and rx_ring_sz replaced with array.
#   3. Some of the module parameters which can be set thru setpci command have
#      been removed, such as latency_timer, max_read_byte_cnt, max_split_transactions.
#   4. Other parameters which were felt to be not required, such as rx_prio,
#      tx_prio have been removed.
#   5. Interrupt moderation parameters(such as tx_urange_*) are no longer module
#      loadable parameters since they can be configured thru' a separate patch
#      available to customers.
#   6. Changed default max_read_byte_count to 1024.
#   7. If scatter-gather is enabled, checksum is enabled too.
#   8. Not verifying if module loadable parameters are within valid range
#      (verify_load_param() removed).
#   
#   Signed-off-by: Raghavendra Koushik <raghavendra.koushik@s2io.com>
#   Signed-off-by: Ravinandan Arakali <ravinandan.arakali@s2io.com>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/s2io.h
#   2004/10/26 19:43:20-04:00 raghavendra.koushik@s2io.com +0 -1
#   S2io: modified loadable parameters
# 
# drivers/net/s2io.c
#   2004/10/26 19:43:20-04:00 raghavendra.koushik@s2io.com +58 -428
#   S2io: modified loadable parameters
# 
# ChangeSet
#   2004/11/08 23:13:17-05:00 raghavendra.koushik@s2io.com 
#   [PATCH] S2io: 2 buffer mode with copy
#   
#   This patch addresses the comments by Chris Leech about
#   skb->mac.ethernet resulting in NULL dereference with the old method
#   of implementing 2 buffer mode. The new method performs a copy of the
#   MAC header to the head of the payload. This is a stop-gap measure till
#   the fragmented skb receive feature in the kernel is made functional.
#   
#   Also, using GFP_KERNEL flag for buffer0, buffer1 memory allocation
#   instead of GFP_ATOMIC.
#   
#   Signed-off-by: Raghavendra Koushik <raghavendra.koushik@s2io.com>
#   Signed-off-by: Ravinandan Arakali <ravinandan.arakali@s2io.com>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/s2io.c
#   2004/10/26 19:40:43-04:00 raghavendra.koushik@s2io.com +14 -24
#   S2io: 2 buffer mode with copy
# 
# ChangeSet
#   2004/11/08 23:13:06-05:00 raghavendra.koushik@s2io.com 
#   [PATCH] S2io: new functions for card restart
#   
#   The attached patch incorporates Jeff's comments related to creating
#   separate functions for restarting the NIC(without using close and
#   open entry points) and few other comments. Complete list of changes
#   are as follows:
#   
#   1. Two new functions s2io_card_down() and s2io_card_up() are defined
#   and are called during reset procedure instead of close and open
#   routines.
#   2. tasklet_status field is now made as unsigned long.
#   3. On getting serious error, queue is stopped before resetting the card.
#   4. Removed the check for "queue stopped" in xmit routine.
#   
#   Signed-off-by: Raghavendra Koushik <raghavendra.koushik@s2io.com>
#   Signed-off-by: Ravinandan Arakali <ravinandan.arakali@s2io.com>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/s2io.h
#   2004/10/26 19:36:17-04:00 raghavendra.koushik@s2io.com +7 -1
#   S2io: new functions for card restart
# 
# drivers/net/s2io.c
#   2004/10/26 19:36:17-04:00 raghavendra.koushik@s2io.com +145 -131
#   S2io: new functions for card restart
# 
# ChangeSet
#   2004/11/08 23:12:25-05:00 raghavendra.koushik@s2io.com 
#   [PATCH] S2io: two buffer mode
#   
#   Attached is the patch for implementing 2-buffer mode on Rx path.
#   
#   On certain systems when a DMA has to happen on an un-aligned memory
#   location performance will take a significant hit. It's standard
#   practice to offset the Rx buffer address by 2 (as Mac header is 14
#   bytes) so the IP header starts from an aligned location.  Obviously
#   using a single Rx buffer both cannot be achieved. Thus XFrame supports
#   something called 2 buffer Rx mode, where in the Rx'ed frame is split
#   into 2 parts, one is the Ethernet header and the other is the Ethernet
#   payload. So now we can allocate proper aligned memory for both buffers,
#   hence the DMA is not slowed down. Also, the Ethernet payload(starting
#   from L3 header) is on an aligned location so OS need not have to do
#   un-aligned accesses to process IP header. To achieve this, the kernel
#   function eth_type_trans functionality has to be partially implemented
#   in the driver itself.
#   
#   Signed-off-by: Raghavendra Koushik <raghavendra.koushik@s2io.com>
#   Signed-off-by: Ravinandan Arakali <ravinandan.arakali@s2io.com>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/s2io.h
#   2004/10/12 00:22:23-04:00 raghavendra.koushik@s2io.com +57 -0
#   S2io: two buffer mode
# 
# drivers/net/s2io.c
#   2004/10/12 19:49:28-04:00 raghavendra.koushik@s2io.com +389 -1
#   S2io: two buffer mode
# 
# drivers/net/Kconfig
#   2004/10/11 23:06:36-04:00 raghavendra.koushik@s2io.com +11 -0
#   S2io: two buffer mode
# 
# ChangeSet
#   2004/11/08 23:12:13-05:00 raghavendra.koushik@s2io.com 
#   [PATCH] S2io: NAPI fix
#   
#   1. When processing Rx packets, making sure that get offset of ring
#   does not cross the put offset.
#   
#   2. when NAPI is not in use a new spinlock(put_lock) is used to make
#   sure accessing put offset of ring is atomic.
#   
#   3. Also introduced a new vaiable put_pos in nic_t to keep track of
#   absolute position of the put pointer of Rx ring.
#   
#   4. When NAPI is used, fill_rx_buffer is not called from the interrupt
#   handler(s2io_isr) .
#   
#   5. In s2io_poll, decrementing packets processed is done inside the
#   while loop unlike out side it as was being done last time.
#   
#   Signed-off-by: Raghavendra Koushik <raghavendra.koushik@s2io.com>
#   Signed-off-by: Ravinandan Arakali <ravinandan.arakali@s2io.com>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/s2io.h
#   2004/10/12 00:19:45-04:00 raghavendra.koushik@s2io.com +8 -0
#   S2io: NAPI fix
# 
# drivers/net/s2io.c
#   2004/10/12 00:19:45-04:00 raghavendra.koushik@s2io.com +110 -74
#   S2io: NAPI fix
# 
# ChangeSet
#   2004/11/08 23:12:02-05:00 raghavendra.koushik@s2io.com 
#   [PATCH] S2io: new txd allocation
#   
#   The attached patch contains a modified scheme for allocating Tx descriptor
#   blocks.
#   More description follows.
#   
#   In the old scheme, the entire Tx descriptor space was allocated in
#   one go. This could cause driver load to fail on systems with low(or
#   scattered) memory. The Tx descriptor blocks are now allocated on
#   per-page basis. A new structure (list_info) has been introduced in
#   nic_t structure to keep track of the physical and virtual addresses
#   of every TxD allocated this way.
#   
#   Signed-off-by: Raghavendra Koushik <raghavendra.koushik@s2io.com>
#   Signed-off-by: Ravinandan Arakali <ravinandan.arakali@s2io.com>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/s2io.h
#   2004/10/11 20:20:24-04:00 raghavendra.koushik@s2io.com +9 -8
#   S2io: new txd allocation
# 
# drivers/net/s2io.c
#   2004/10/11 20:20:24-04:00 raghavendra.koushik@s2io.com +99 -55
#   S2io: new txd allocation
# 
# ChangeSet
#   2004/11/08 23:11:50-05:00 raghavendra.koushik@s2io.com 
#   [PATCH] S2io: module loadable parameters
#   
#   1. Max Txds per List.
#   
#   2. statistics refresh time
#   
#   3. pause frame control parameters including gap between two successive
#   frames, threshold watermarks
#   
#   4. RTI and TTI configuration parameters including ranges, packet
#   counts and timeout periods.  For further information please read the
#   section 3.5 of XFrame H/W spec.
#   
#   5. PCI/PCI-X configuration variables latency_timer, MMRBC and OST.
#   
#   6. OS offload features TSO (If support available) and checksum offload.
#   
#   7. If NAPI is not in use, a variable indicate_max_pkts can be used
#   to limit number of Rx side packets processed for one call to Rx
#   Intr handler.
#   
#   Signed-off-by: Raghavendra Koushik <raghavendra.koushik@s2io.com>
#   Signed-off-by: Ravinandan Arakali <ravinandan.arakali@s2io.com>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/s2io.h
#   2004/10/11 18:34:23-04:00 raghavendra.koushik@s2io.com +3 -3
#   S2io: module loadable parameters
# 
# drivers/net/s2io.c
#   2004/10/11 18:34:23-04:00 raghavendra.koushik@s2io.com +416 -77
#   S2io: module loadable parameters
# 
# ChangeSet
#   2004/11/08 23:11:10-05:00 raghavendra.koushik@s2io.com 
#   [PATCH] S2io: hardware fixes
#   
#   1. Xena3's with a set of subsystem IDs had Link LED problems, fixed
#   that specifically for them.
#   
#   2. To write into the Keyed Mac_Cfg register to enable broadcast,
#   writing two 32 bit writes into it along with a write to the key
#   register rather than a single write to key and a 64 bit write to
#   mac_cfg. This is necessary on 32 bit systems where a writeq(64 bit
#   write) is actually two writel (32 bit writes).
#   
#   3. Writes to some special registers mentioned in UG is being done by
#   a special macro which defines which 32 bits of the 64 bit register
#   is to be written first. Again this applies only on 32 bit systems.
#   
#   4. Configured pause frame related water marks and a shared_split
#   value which describes the Max TXDMA related split transaction that
#   can be used without giving room for the Rx transactions.
#   
#   5. The mac_rmac_err_reg R1 register will be cleared in  the interrupt
#   handler itself rather than in the scheduled task as was being done
#   previously.
#   
#   6. Even on PCC_FB_ECC error the card will be reset by disabling
#   adapter enable bit.
#   
#   Signed-off-by: Raghavendra Koushik <raghavendra.koushik@s2io.com>
#   Signed-off-by: Ravinandan Arakali <ravinandan.arakali@s2io.com>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/s2io.h
#   2004/10/08 18:20:09-04:00 raghavendra.koushik@s2io.com +21 -0
#   S2io: hardware fixes
# 
# drivers/net/s2io.c
#   2004/10/07 14:45:41-04:00 raghavendra.koushik@s2io.com +109 -21
#   S2io: hardware fixes
# 
# ChangeSet
#   2004/11/08 23:10:59-05:00 raghavendra.koushik@s2io.com 
#   [PATCH] S2io: optimizations
#   
#   1. Definitions of LOW and PANIC levels of the Rx buffers have changed.
#   
#   2. In wait_for_cmd_complete there is no longer a writeq but just a
#   read and wait for strobe bit to reset.
#   
#   3. In s2io_isr, the isr_lock has been done away with also the NICs
#   interrupt are no longer disabled explicitly on entering the interrupt
#   handler and re-enabled again before leaving it.
#   
#   4. Also clearing the semaphore "tasklet_status" when exiting
#   erroneously from s2io_isr after failing fill_rx_buffer call.
#   
#   5. The set/reset Tx Csum function through ethtool was added to the
#   ethtool_ops structure.
#   
#   6. Added a Rx side error code in the rx_osm_handler function.
#   
#   7. No longer stopping and waking Tx queue when link state changes in
#   s2io_link function.
#   
#   8. removed the isr_lock spinlock from the s2io_nic structure.
#   
#   9. changed parameters which determine thresholds(LOW and PANIC)
#   to replenish Rx buffers.
#      This has been found to result in better performance.
#   
#   Signed-off-by: Raghavendra Koushik <raghavendra.koushik@s2io.com>
#   Signed-off-by: Ravinandan Arakali <ravinandan.arakali@s2io.com>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/s2io.h
#   2004/10/06 20:37:48-04:00 raghavendra.koushik@s2io.com +0 -1
#   S2io: optimizations
# 
# drivers/net/s2io.c
#   2004/10/06 20:37:33-04:00 raghavendra.koushik@s2io.com +26 -59
#   S2io: optimizations
# 
# ChangeSet
#   2004/11/08 23:10:48-05:00 raghavendra.koushik@s2io.com 
#   [PATCH] S2io: sw bug fixes
#   
#   1. In free_rx_buffers clearing out RxDs not owned by Xena.
#   
#   2. In alarm_intr_handler, when a serr error occurs, schedule a task
#   to reset the card rather than stopping Tx queue.
#   
#   3. In s2io_close freeing IRQ before calling s2io_reset also added a
#   new call to flush queued tasks. This is not done if the s2io_close
#   itself is called from a queued task like s2io_restart_nic.
#   
#   4. read_eeprom function has been changed such that data to be returned
#   is sent as an input argument and the return value represents a
#   pass/fail. The previous implementation as Randy had pointed out was
#   error prone as on failure it returned -1 which can be interpreted
#   as all ff's, so any data area which contained ff's in the eeprom was
#   likely to be treated as an error.
#   
#   5. Added a flag "task_flag" to track if the call to s2io_close is
#   coming from the s2io_restart_nic function or from the ifconfig <I/F>
#   down called by user.
#   
#   6. Moved register_netdev call from just after setting entry points
#   to the end of the s2io_init_nic function.
#   
#   7. In s2io.h field added a new member into the s2io_nic structure
#   called "task_flag".
#   
#   Signed-off-by: Raghavendra Koushik <raghavendra.koushik@s2io.com>
#   Signed-off-by: Ravinandan Arakali <ravinandan.arakali@s2io.com>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/s2io.h
#   2004/10/06 19:19:53-04:00 raghavendra.koushik@s2io.com +2 -0
#   S2io: sw bug fixes
# 
# drivers/net/s2io.c
#   2004/10/06 19:19:53-04:00 raghavendra.koushik@s2io.com +37 -21
#   S2io: sw bug fixes
# 
# ChangeSet
#   2004/11/08 23:10:36-05:00 raghavendra.koushik@s2io.com 
#   [PATCH] S2io: cosmetic changes
#   
#   1. Indentation, change in comment styles, variable name changes etc.
#   2. Changed the value written to dtx_control register to force XGXS reset.
#   3. weight parameter(NAPI) changed to 90 for better performance.
#   
#   Signed-off-by: Raghavendra Koushik <raghavendra.koushik@s2io.com>
#   Signed-off-by: Ravinandan Arakali <ravinandan.arakali@s2io.com>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/s2io.h
#   2004/10/06 16:03:08-04:00 raghavendra.koushik@s2io.com +63 -127
#   S2io: cosmetic changes
# 
# drivers/net/s2io.c
#   2004/10/06 16:03:08-04:00 raghavendra.koushik@s2io.com +1000 -943
#   S2io: cosmetic changes
# 
# drivers/net/s2io-regs.h
#   2004/10/06 16:03:08-04:00 raghavendra.koushik@s2io.com +3 -0
#   S2io: cosmetic changes
# 
# ChangeSet
#   2004/11/06 12:44:08-05:00 nacc@us.ibm.com 
#   [PATCH] net/gt96100eth: replace gt96100_delay() with msleep_interruptible()
#   
#   Uses msleep_interruptible() instead of schedule_timeout()
#   in the gt96100_delay() function. Corrects one comment to correspond to
#   the code.
#   
#   Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/gt96100eth.c
#   2004/11/05 12:45:48-05:00 nacc@us.ibm.com +3 -5
#   net/gt96100eth: replace gt96100_delay() with msleep_interruptible()
# 
# ChangeSet
#   2004/11/06 12:26:16-05:00 jgarzik@pobox.com 
#   Merge pobox.com:/garz/repo/linux-2.6
#   into pobox.com:/garz/repo/netdev-2.6/janitor
# 
# drivers/net/8390.c
#   2004/11/06 12:26:13-05:00 jgarzik@pobox.com +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/11/05 20:00:41+11:00 airlied@starflyer.(none) 
#   drm: make pcigart functions inline
#   
#   with these unstatic uninline the kernel wouldn't build with both configured.
#   
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/radeon_cp.c
#   2004/11/05 20:00:30+11:00 airlied@starflyer.(none) +1 -0
#   drm: make pcigart functions inline
#   
#   with these unstatic uninline the kernel wouldn't build with both configured.
#   
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/r128_cce.c
#   2004/11/05 20:00:30+11:00 airlied@starflyer.(none) +1 -0
#   drm: make pcigart functions inline
#   
#   with these unstatic uninline the kernel wouldn't build with both configured.
#   
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/ati_pcigart.h
#   2004/11/05 20:00:30+11:00 airlied@starflyer.(none) +39 -38
#   drm: make pcigart functions inline
#   
#   with these unstatic uninline the kernel wouldn't build with both configured.
#   
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# ChangeSet
#   2004/11/04 22:32:38+11:00 airlied@starflyer.(none) 
#   drm: rearrange some functions for new split
#   
#   This change moves some functions into different C files to align things
#   a bit more correctly...
#   
#   From: Jon Smirl <jonsmirl@gmail.com>
#   Approved-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_stub.c
#   2004/11/04 22:32:28+11:00 airlied@starflyer.(none) +73 -7
#   drm: rearrange some functions for new split
#   
#   This change moves some functions into different C files to align things
#   a bit more correctly...
#   
#   From: Jon Smirl <jonsmirl@gmail.com>
#   Approved-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_lock.c
#   2004/11/04 22:32:28+11:00 airlied@starflyer.(none) +139 -4
#   drm: rearrange some functions for new split
#   
#   This change moves some functions into different C files to align things
#   a bit more correctly...
#   
#   From: Jon Smirl <jonsmirl@gmail.com>
#   Approved-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_ioctl.c
#   2004/11/04 22:32:28+11:00 airlied@starflyer.(none) +8 -0
#   drm: rearrange some functions for new split
#   
#   This change moves some functions into different C files to align things
#   a bit more correctly...
#   
#   From: Jon Smirl <jonsmirl@gmail.com>
#   Approved-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_fops.c
#   2004/11/04 22:32:28+11:00 airlied@starflyer.(none) +290 -0
#   drm: rearrange some functions for new split
#   
#   This change moves some functions into different C files to align things
#   a bit more correctly...
#   
#   From: Jon Smirl <jonsmirl@gmail.com>
#   Approved-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_drv.c
#   2004/11/04 22:32:28+11:00 airlied@starflyer.(none) +7 -503
#   drm: rearrange some functions for new split
#   
#   This change moves some functions into different C files to align things
#   a bit more correctly...
#   
#   From: Jon Smirl <jonsmirl@gmail.com>
#   Approved-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drmP.h
#   2004/11/04 22:32:28+11:00 airlied@starflyer.(none) +12 -10
#   drm: rearrange some functions for new split
#   
#   This change moves some functions into different C files to align things
#   a bit more correctly...
#   
#   From: Jon Smirl <jonsmirl@gmail.com>
#   Approved-by: Dave Airlie <airlied@linux.ie>
# 
# ChangeSet
#   2004/11/04 21:35:52+11:00 airlied@starflyer.(none) 
#   drm: move fops into drivers
#   
#   move the drm file operations into the driver.
#   
#   From: Jon Smirl <jonsmirl@gmail.com>
#   Approved-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/tdfx_drv.c
#   2004/11/04 21:35:43+11:00 airlied@starflyer.(none) +9 -0
#   drm: move fops into drivers
#   
#   move the drm file operations into the driver.
#   
#   From: Jon Smirl <jonsmirl@gmail.com>
#   Approved-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/sis_drv.c
#   2004/11/04 21:35:43+11:00 airlied@starflyer.(none) +9 -0
#   drm: move fops into drivers
#   
#   move the drm file operations into the driver.
#   
#   From: Jon Smirl <jonsmirl@gmail.com>
#   Approved-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/radeon_drv.c
#   2004/11/04 21:35:43+11:00 airlied@starflyer.(none) +9 -0
#   drm: move fops into drivers
#   
#   move the drm file operations into the driver.
#   
#   From: Jon Smirl <jonsmirl@gmail.com>
#   Approved-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/r128_drv.c
#   2004/11/04 21:35:43+11:00 airlied@starflyer.(none) +9 -0
#   drm: move fops into drivers
#   
#   move the drm file operations into the driver.
#   
#   From: Jon Smirl <jonsmirl@gmail.com>
#   Approved-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/mga_drv.c
#   2004/11/04 21:35:43+11:00 airlied@starflyer.(none) +9 -0
#   drm: move fops into drivers
#   
#   move the drm file operations into the driver.
#   
#   From: Jon Smirl <jonsmirl@gmail.com>
#   Approved-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/i915_drv.c
#   2004/11/04 21:35:43+11:00 airlied@starflyer.(none) +9 -0
#   drm: move fops into drivers
#   
#   move the drm file operations into the driver.
#   
#   From: Jon Smirl <jonsmirl@gmail.com>
#   Approved-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/i830_drv.c
#   2004/11/04 21:35:43+11:00 airlied@starflyer.(none) +9 -0
#   drm: move fops into drivers
#   
#   move the drm file operations into the driver.
#   
#   From: Jon Smirl <jonsmirl@gmail.com>
#   Approved-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/i810_drv.c
#   2004/11/04 21:35:43+11:00 airlied@starflyer.(none) +9 -0
#   drm: move fops into drivers
#   
#   move the drm file operations into the driver.
#   
#   From: Jon Smirl <jonsmirl@gmail.com>
#   Approved-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_vm.c
#   2004/11/04 21:35:43+11:00 airlied@starflyer.(none) +1 -0
#   drm: move fops into drivers
#   
#   move the drm file operations into the driver.
#   
#   From: Jon Smirl <jonsmirl@gmail.com>
#   Approved-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_stub.c
#   2004/11/04 21:35:43+11:00 airlied@starflyer.(none) +1 -1
#   drm: move fops into drivers
#   
#   move the drm file operations into the driver.
#   
#   From: Jon Smirl <jonsmirl@gmail.com>
#   Approved-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_fops.c
#   2004/11/04 21:35:43+11:00 airlied@starflyer.(none) +1 -0
#   drm: move fops into drivers
#   
#   move the drm file operations into the driver.
#   
#   From: Jon Smirl <jonsmirl@gmail.com>
#   Approved-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_drv.c
#   2004/11/04 21:35:43+11:00 airlied@starflyer.(none) +0 -13
#   drm: move fops into drivers
#   
#   move the drm file operations into the driver.
#   
#   From: Jon Smirl <jonsmirl@gmail.com>
#   Approved-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drmP.h
#   2004/11/04 21:35:43+11:00 airlied@starflyer.(none) +1 -3
#   drm: move fops into drivers
#   
#   move the drm file operations into the driver.
#   
#   From: Jon Smirl <jonsmirl@gmail.com>
#   Approved-by: Dave Airlie <airlied@linux.ie>
# 
# ChangeSet
#   2004/11/02 22:20:24+11:00 airlied@starflyer.(none) 
#   drm: rename fn_tbl to driver as it is no longer a function table
#   
#   This renames the drm_driver_fn to drm_driver and fn_tbl to driver,
#   this name is makes much more sense now.
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/tdfx_drv.c
#   2004/11/02 22:20:15+11:00 airlied@starflyer.(none) +3 -3
#   drm: rename fn_tbl to driver as it is no longer a function table
#   
#   This renames the drm_driver_fn to drm_driver and fn_tbl to driver,
#   this name is makes much more sense now.
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/sis_drv.c
#   2004/11/02 22:20:15+11:00 airlied@starflyer.(none) +3 -3
#   drm: rename fn_tbl to driver as it is no longer a function table
#   
#   This renames the drm_driver_fn to drm_driver and fn_tbl to driver,
#   this name is makes much more sense now.
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/radeon_drv.c
#   2004/11/02 22:20:15+11:00 airlied@starflyer.(none) +3 -3
#   drm: rename fn_tbl to driver as it is no longer a function table
#   
#   This renames the drm_driver_fn to drm_driver and fn_tbl to driver,
#   this name is makes much more sense now.
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/r128_drv.c
#   2004/11/02 22:20:15+11:00 airlied@starflyer.(none) +3 -3
#   drm: rename fn_tbl to driver as it is no longer a function table
#   
#   This renames the drm_driver_fn to drm_driver and fn_tbl to driver,
#   this name is makes much more sense now.
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/mga_drv.c
#   2004/11/02 22:20:15+11:00 airlied@starflyer.(none) +3 -3
#   drm: rename fn_tbl to driver as it is no longer a function table
#   
#   This renames the drm_driver_fn to drm_driver and fn_tbl to driver,
#   this name is makes much more sense now.
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/i915_drv.c
#   2004/11/02 22:20:15+11:00 airlied@starflyer.(none) +3 -3
#   drm: rename fn_tbl to driver as it is no longer a function table
#   
#   This renames the drm_driver_fn to drm_driver and fn_tbl to driver,
#   this name is makes much more sense now.
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/i830_drv.c
#   2004/11/02 22:20:15+11:00 airlied@starflyer.(none) +3 -3
#   drm: rename fn_tbl to driver as it is no longer a function table
#   
#   This renames the drm_driver_fn to drm_driver and fn_tbl to driver,
#   this name is makes much more sense now.
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/i810_drv.c
#   2004/11/02 22:20:15+11:00 airlied@starflyer.(none) +3 -3
#   drm: rename fn_tbl to driver as it is no longer a function table
#   
#   This renames the drm_driver_fn to drm_driver and fn_tbl to driver,
#   this name is makes much more sense now.
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/gamma_dma.c
#   2004/11/02 22:20:15+11:00 airlied@starflyer.(none) +6 -6
#   drm: rename fn_tbl to driver as it is no longer a function table
#   
#   This renames the drm_driver_fn to drm_driver and fn_tbl to driver,
#   this name is makes much more sense now.
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/ffb_drv.c
#   2004/11/02 22:20:15+11:00 airlied@starflyer.(none) +8 -8
#   drm: rename fn_tbl to driver as it is no longer a function table
#   
#   This renames the drm_driver_fn to drm_driver and fn_tbl to driver,
#   this name is makes much more sense now.
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_vm.c
#   2004/11/02 22:20:15+11:00 airlied@starflyer.(none) +2 -2
#   drm: rename fn_tbl to driver as it is no longer a function table
#   
#   This renames the drm_driver_fn to drm_driver and fn_tbl to driver,
#   this name is makes much more sense now.
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_stub.c
#   2004/11/02 22:20:15+11:00 airlied@starflyer.(none) +2 -2
#   drm: rename fn_tbl to driver as it is no longer a function table
#   
#   This renames the drm_driver_fn to drm_driver and fn_tbl to driver,
#   this name is makes much more sense now.
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_proc.c
#   2004/11/02 22:20:15+11:00 airlied@starflyer.(none) +2 -2
#   drm: rename fn_tbl to driver as it is no longer a function table
#   
#   This renames the drm_driver_fn to drm_driver and fn_tbl to driver,
#   this name is makes much more sense now.
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_irq.c
#   2004/11/02 22:20:15+11:00 airlied@starflyer.(none) +6 -6
#   drm: rename fn_tbl to driver as it is no longer a function table
#   
#   This renames the drm_driver_fn to drm_driver and fn_tbl to driver,
#   this name is makes much more sense now.
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_ioctl.c
#   2004/11/02 22:20:15+11:00 airlied@starflyer.(none) +6 -6
#   drm: rename fn_tbl to driver as it is no longer a function table
#   
#   This renames the drm_driver_fn to drm_driver and fn_tbl to driver,
#   this name is makes much more sense now.
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_fops.c
#   2004/11/02 22:20:15+11:00 airlied@starflyer.(none) +2 -2
#   drm: rename fn_tbl to driver as it is no longer a function table
#   
#   This renames the drm_driver_fn to drm_driver and fn_tbl to driver,
#   this name is makes much more sense now.
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_drv.c
#   2004/11/02 22:20:15+11:00 airlied@starflyer.(none) +45 -45
#   drm: rename fn_tbl to driver as it is no longer a function table
#   
#   This renames the drm_driver_fn to drm_driver and fn_tbl to driver,
#   this name is makes much more sense now.
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_context.c
#   2004/11/02 22:20:15+11:00 airlied@starflyer.(none) +4 -4
#   drm: rename fn_tbl to driver as it is no longer a function table
#   
#   This renames the drm_driver_fn to drm_driver and fn_tbl to driver,
#   this name is makes much more sense now.
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_bufs.c
#   2004/11/02 22:20:15+11:00 airlied@starflyer.(none) +3 -3
#   drm: rename fn_tbl to driver as it is no longer a function table
#   
#   This renames the drm_driver_fn to drm_driver and fn_tbl to driver,
#   this name is makes much more sense now.
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drmP.h
#   2004/11/02 22:20:15+11:00 airlied@starflyer.(none) +7 -7
#   drm: rename fn_tbl to driver as it is no longer a function table
#   
#   This renames the drm_driver_fn to drm_driver and fn_tbl to driver,
#   this name is makes much more sense now.
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# ChangeSet
#   2004/11/02 21:59:29+11:00 airlied@starflyer.(none) 
#   drm: drm_memory.c missing from build
#   
#   Add drm_memory.c to build.
#   
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_memory.c
#   2004/11/02 21:57:07+11:00 airlied@starflyer.(none) +181 -0
# 
# drivers/char/drm/drm_memory.c
#   2004/11/02 21:57:07+11:00 airlied@starflyer.(none) +0 -0
#   BitKeeper file /home/airlied/bitkeeper/drm-test/drivers/char/drm/drm_memory.c
# 
# ChangeSet
#   2004/11/02 21:55:16+11:00 airlied@starflyer.(none) 
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/tdfx_drv.c
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +59 -4
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/sis_mm.c
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +2 -10
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/sis_ds.c
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +8 -9
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/sis_drv.h
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +14 -0
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/sis_drv.c
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +75 -2
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/sis_drm.h
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +15 -6
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/radeon_state.c
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +7 -23
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/radeon_mem.c
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +10 -11
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/radeon_irq.c
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +5 -6
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/radeon_drv.h
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +21 -0
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/radeon_drv.c
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +136 -2
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/radeon_cp.c
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +6 -7
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/r128_state.c
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +44 -57
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/r128_irq.c
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +1 -2
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/r128_drv.h
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +16 -1
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/r128_drv.c
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +99 -2
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/r128_cce.c
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +8 -9
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/mga_warp.c
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +0 -1
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/mga_state.c
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +0 -1
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/mga_irq.c
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +1 -2
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/mga_drv.h
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +15 -0
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/mga_drv.c
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +92 -2
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/mga_dma.c
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +8 -26
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/i915_mem.c
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +10 -11
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/i915_irq.c
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +0 -1
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/i915_drv.h
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +24 -0
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/i915_drv.c
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +92 -2
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/i915_drm.h
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +25 -12
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/i915_dma.c
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +5 -22
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/i830_irq.c
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +0 -1
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/i830_drv.h
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +33 -0
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/i830_drv.c
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +101 -2
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/i830_drm.h
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +29 -14
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/i830_dma.c
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +15 -40
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/i810_drv.h
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +31 -4
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/i810_drv.c
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +93 -2
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/i810_drm.h
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +31 -15
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/i810_dma.c
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +16 -32
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/ffb_drv.c
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +4 -6
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_vm.c
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +61 -59
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_stub.c
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +34 -120
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_scatter.c
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +18 -18
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_proc.c
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +40 -40
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_memory.h
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +0 -158
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_lock.c
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +5 -5
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_irq.c
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +20 -18
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_ioctl.c
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +17 -19
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_init.c
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +1 -77
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_fops.c
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +12 -10
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_drv.c
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +277 -275
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_drawable.c
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +2 -2
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_dma.c
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +14 -13
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_core.h
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +11 -17
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_context.c
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +32 -32
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_bufs.c
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +70 -69
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_auth.c
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +15 -15
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_agpsupport.c
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +31 -31
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drmP.h
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +157 -137
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/ati_pcigart.h
#   2004/11/02 21:55:07+11:00 airlied@starflyer.(none) +8 -8
#   drm: core/personality split for 2.6 kernel
#   
#   This changeset gets rid of the DRM() macros and implements a core DRM module
#   linked to a per graphics card personality module..
#   
#   Remove old 2.4 module parameters and switch to 2.6 module parameters 
#   
#   From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# ChangeSet
#   2004/11/01 20:44:28+01:00 vojtech@suse.cz 
#   Merge suse.cz:/home/vojtech/bk/linus into suse.cz:/home/vojtech/bk/input
# 
# include/linux/input.h
#   2004/11/01 20:44:12+01:00 vojtech@suse.cz +0 -0
#   Auto merged
# 
# drivers/input/serio/Kconfig
#   2004/11/01 20:44:12+01:00 vojtech@suse.cz +0 -0
#   Auto merged
# 
# Documentation/kernel-parameters.txt
#   2004/11/01 20:44:12+01:00 vojtech@suse.cz +0 -0
#   Auto merged
# 
# drivers/char/drm/drm_memory.h
#   2004/11/01 20:27:56+11:00 airlied@starflyer.(none) +0 -0
#   Rename: drivers/char/drm/drm_memory.c -> drivers/char/drm/drm_memory.h
# 
# drivers/char/drm/tdfx_drv.h
#   2004/11/01 20:12:34+11:00 airlied@starflyer.(none) +0 -0
#   Rename: drivers/char/drm/tdfx.h -> drivers/char/drm/tdfx_drv.h
# 
# ChangeSet
#   2004/10/31 20:52:40+11:00 airlied@starflyer.(none) 
#   Merge starflyer.(none):/home/airlied/bitkeeper/drm-core
#   into starflyer.(none):/home/airlied/bitkeeper/drm-test
# 
# drivers/char/drm/drm_stub.c
#   2004/10/31 20:52:36+11:00 airlied@starflyer.(none) +0 -0
#   Auto merged
# 
# drivers/char/drm/drm_proc.c
#   2004/10/31 20:52:36+11:00 airlied@starflyer.(none) +0 -0
#   Auto merged
# 
# drivers/char/drm/drm_memory.c
#   2004/10/31 20:52:36+11:00 airlied@starflyer.(none) +0 -0
#   Auto merged
# 
# drivers/char/drm/drm_irq.c
#   2004/10/31 20:52:36+11:00 airlied@starflyer.(none) +0 -0
#   Auto merged
# 
# drivers/char/drm/drm_drv.c
#   2004/10/31 20:52:36+11:00 airlied@starflyer.(none) +0 -0
#   Auto merged
# 
# drivers/char/drm/drm_stub.c
#   2004/10/31 20:52:36+11:00 airlied@starflyer.(none) +0 -0
#   Merge rename: drivers/char/drm/drm_stub.h -> drivers/char/drm/drm_stub.c
# 
# drivers/char/drm/drm_proc.c
#   2004/10/31 20:52:36+11:00 airlied@starflyer.(none) +0 -0
#   Merge rename: drivers/char/drm/drm_proc.h -> drivers/char/drm/drm_proc.c
# 
# drivers/char/drm/drm_memory.c
#   2004/10/31 20:52:36+11:00 airlied@starflyer.(none) +0 -0
#   Merge rename: drivers/char/drm/drm_memory.h -> drivers/char/drm/drm_memory.c
# 
# drivers/char/drm/drm_irq.c
#   2004/10/31 20:52:36+11:00 airlied@starflyer.(none) +0 -0
#   Merge rename: drivers/char/drm/drm_irq.h -> drivers/char/drm/drm_irq.c
# 
# drivers/char/drm/drm_drv.c
#   2004/10/31 20:52:36+11:00 airlied@starflyer.(none) +0 -0
#   Merge rename: drivers/char/drm/drm_drv.h -> drivers/char/drm/drm_drv.c
# 
# ChangeSet
#   2004/10/31 01:14:20-05:00 len.brown@intel.com 
#   [ACPI] fix mis-merge in processor.c
# 
# drivers/acpi/processor.c
#   2004/10/31 01:14:09-05:00 len.brown@intel.com +2 -60
#   delete dupe acpi_processor_start() definition
# 
# ChangeSet
#   2004/10/30 10:59:44-04:00 margitsw@t-online.de 
#   [PATCH] prism54 sparse fixes
#   
#   *  On top of Linus's sparse changes, here is a
#   *  fix that further reduces sparse warnings.
#   
#   We are still left with 2 warnings caused by the
#   member "data.pointer" in struct "iwreq_data" being
#   "__user" (from wireless.h).
#   
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/wireless/prism54/prismcompat.h
#   2004/10/09 09:20:50-04:00 margitsw@t-online.de +4 -0
#   prism54 sparse fixes
# 
# drivers/net/wireless/prism54/isl_ioctl.c
#   2004/10/09 08:43:06-04:00 margitsw@t-online.de +14 -10
#   prism54 sparse fixes
# 
# ChangeSet
#   2004/10/30 10:59:34-04:00 margitsw@t-online.de 
#   [PATCH] prism54 fix resume processing
#   
#   *  We need to enable the device on resume.
#   
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/wireless/prism54/islpci_hotplug.c
#   2004/10/07 13:16:27-04:00 margitsw@t-online.de +2 -0
#   prism54 fix resume processing
# 
# ChangeSet
#   2004/10/30 10:31:06-04:00 shemminger@osdl.org 
#   [PATCH] xircom_tulip_cb: convert to using module_param
#   
#   Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/tulip/xircom_tulip_cb.c
#   2004/10/18 18:27:10-04:00 shemminger@osdl.org +9 -6
#   xircom_tulip_cb: convert to using module_param
# 
# ChangeSet
#   2004/10/30 10:29:27-04:00 shemminger@osdl.org 
#   [PATCH] tlan: enable faster hash function
#   
#   Cleanout dead code, and use better hash function. The faster hash function
#   was already there, but not turned on by default.  Tested hash function for
#   10 million random addresses.
#   
#   Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/tlan.h
#   2004/10/19 14:14:54-04:00 shemminger@osdl.org +21 -55
#   tlan: enable faster hash function
# 
# ChangeSet
#   2004/10/30 10:29:16-04:00 shemminger@osdl.org 
#   [PATCH] tlan: make inline's static (rev2)
#   
#   Make inline functions static to avoid polluting global namespace.
#   
#   Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/tlan.h
#   2004/10/19 14:09:38-04:00 shemminger@osdl.org +12 -12
#   tlan: make inline's static (rev2)
# 
# ChangeSet
#   2004/10/30 10:29:05-04:00 shemminger@osdl.org 
#   [PATCH] tlan: get rid of unneeded global vars (rev 2)
#   
#   The global variable media_map is never used. And the media table media
#   can be static.
#   
#   Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/tlan.c
#   2004/10/19 14:05:01-04:00 shemminger@osdl.org +1 -3
#   tlan: get rid of unneeded global vars (rev 2)
# 
# ChangeSet
#   2004/10/30 10:28:50-04:00 shemminger@osdl.org 
#   [PATCH] tlan: use netdev_priv (rev 2)
#   
#   Use netdev_priv
#   
#   Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/tlan.c
#   2004/10/19 14:03:02-04:00 shemminger@osdl.org +34 -34
#   tlan: use netdev_priv (rev 2)
# 
# ChangeSet
#   2004/10/30 10:26:58-04:00 shemminger@osdl.org 
#   [PATCH] hp100: use inline for comple usage of dev->priv
#   
#   Make a separate function for the one more complex usage of netdev_priv.
#   
#   Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/hp100.c
#   2004/10/18 18:57:57-04:00 shemminger@osdl.org +8 -1
#   hp100: use inline for comple usage of dev->priv
# 
# ChangeSet
#   2004/10/30 10:26:47-04:00 shemminger@osdl.org 
#   [PATCH] hp100: use netdev_priv (rev 2)
#   
#   Here is a revised version of the hp100 patch sequence.
#   First one just does netdev_priv.
#   Worked with Jean to get these patches tested.
#   
#   Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/hp100.c
#   2004/10/18 18:51:14-04:00 shemminger@osdl.org +28 -28
#   hp100: use netdev_priv (rev 2)
# 
# ChangeSet
#   2004/10/30 10:21:25-04:00 linville@tuxdriver.com 
#   [PATCH] tulip: Add MODULE_VERSION
#   
#   Add MODULE_VERSION to the tulip-based drivers
#   
#   Signed-off-by: John W. Linville <linville@tuxdriver.com>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/tulip/xircom_tulip_cb.c
#   2004/10/29 20:00:00-04:00 linville@tuxdriver.com +1 -0
#   tulip: Add MODULE_VERSION
# 
# drivers/net/tulip/winbond-840.c
#   2004/10/29 20:00:00-04:00 linville@tuxdriver.com +1 -0
#   tulip: Add MODULE_VERSION
# 
# drivers/net/tulip/tulip_core.c
#   2004/10/29 20:00:00-04:00 linville@tuxdriver.com +1 -0
#   tulip: Add MODULE_VERSION
# 
# drivers/net/tulip/dmfe.c
#   2004/10/29 20:00:00-04:00 linville@tuxdriver.com +1 -0
#   tulip: Add MODULE_VERSION
# 
# drivers/net/tulip/de2104x.c
#   2004/10/29 20:00:00-04:00 linville@tuxdriver.com +1 -0
#   tulip: Add MODULE_VERSION
# 
# ChangeSet
#   2004/10/30 10:21:14-04:00 linville@tuxdriver.com 
#   [PATCH] e100: Add MODULE_VERSION
#   
#   Add MODULE_VERSION to e100 driver.
#   
#   Signed-off-by: John W. Linville <linville@tuxdriver.com>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/e100.c
#   2004/10/29 20:00:00-04:00 linville@tuxdriver.com +1 -0
#   e100: Add MODULE_VERSION
# 
# ChangeSet
#   2004/10/30 10:21:02-04:00 linville@tuxdriver.com 
#   [PATCH] r8169: Add MODULE_VERSION
#   
#   Add MODULE_VERSION to r8169 driver.
#   
#   Signed-off-by: John W. Linville <linville@tuxdriver.com>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/r8169.c
#   2004/10/29 20:00:00-04:00 linville@tuxdriver.com +1 -0
#   r8169: Add MODULE_VERSION
# 
# ChangeSet
#   2004/10/30 10:20:51-04:00 linville@tuxdriver.com 
#   [PATCH] 8139too: Add MODULE_VERSION
#   
#   Add MODULE_VERSION to 8139too driver.
#   
#   Signed-off-by: John W. Linville <linville@tuxdriver.com>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/8139too.c
#   2004/10/29 20:00:00-04:00 linville@tuxdriver.com +1 -0
#   8139too: Add MODULE_VERSION
# 
# ChangeSet
#   2004/10/30 10:20:40-04:00 linville@tuxdriver.com 
#   [PATCH] 3c59x: Add MODULE_VERSION
#   
#   Add MODULE_VERSION to 3c59x driver.
#   
#   Signed-off-by: John W. Linville <linville@tuxdriver.com>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/3c59x.c
#   2004/10/29 20:00:00-04:00 linville@tuxdriver.com +1 -0
#   3c59x: Add MODULE_VERSION
# 
# ChangeSet
#   2004/10/30 09:21:19-04:00 linville@tuxdriver.com 
#   [PATCH] r8169: simplify trick if() expression
#   
#   Simplify tricky if() expression in rtl8169_vlan_rx_register().
#   
#   Signed-off-by: John W. Linville <linville@tuxdriver.com>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/r8169.c
#   2004/10/22 21:44:26-04:00 linville@tuxdriver.com +2 -1
#   r8169: simplify trick if() expression
# 
# ChangeSet
#   2004/10/30 09:21:07-04:00 linville@tuxdriver.com 
#   [PATCH] r8169: fix RxVlan bit manipulation
#   
#   Fix manipulation of RxVlan bit in rtl8169_vlan_rx_register(), and
#   remove it from rtl8169_vlan_rx_kill_vid().
#   
#   Signed-off-by: John W. Linville <linville@tuxdriver.com>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/r8169.c
#   2004/10/21 14:44:23-04:00 linville@tuxdriver.com +4 -6
#   r8169: fix RxVlan bit manipulation
# 
# ChangeSet
#   2004/10/30 09:20:56-04:00 linville@tuxdriver.com 
#   [PATCH] r8169: endian-swap return of rtl8169_tx_vlan_tag()
#   
#   Endian-swap return of rtl8169_tx_vlan_tag() in rtl8169_start_xmit()
#   
#   Signed-off-by: John W. Linville <linville@tuxdriver.com>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/r8169.c
#   2004/10/21 14:49:05-04:00 linville@tuxdriver.com +1 -1
#   r8169: endian-swap return of rtl8169_tx_vlan_tag()
# 
# ChangeSet
#   2004/10/30 15:01:05+02:00 perex@suse.cz 
#   [ALSA] emu10k1 - fixes against the last emufx changes
#   
#   EMU10K1/EMU10K2 driver
#   The indirect pointers are allocated correctly now for default DSP code.
#   Also, one bug in emu10k1_fx8010_code_t has been fixed as well.
#   
#   Signed-off-by: Jaroslav Kysela <perex@suse.cz>
# 
# sound/pci/emu10k1/emufx.c
#   2004/10/30 02:44:20+02:00 perex@suse.cz +38 -24
#   [ALSA] emu10k1 - fixes against the last emufx changes
#   
#   D:2004/10/30 08:44:19
#   C:EMU10K1/EMU10K2 driver
#   F:include/emu10k1.h:1.48->1.49 
#   F:pci/emu10k1/emufx.c:1.60->1.61 
#   L:The indirect pointers are allocated correctly now for default DSP code.
#   L:Also, one bug in emu10k1_fx8010_code_t has been fixed as well.
#   Signed-off-by: Jaroslav Kysela <perex@suse.cz>
# 
# include/sound/emu10k1.h
#   2004/10/30 02:44:19+02:00 perex@suse.cz +3 -3
#   [ALSA] emu10k1 - fixes against the last emufx changes
#   
#   D:2004/10/30 08:44:19
#   C:EMU10K1/EMU10K2 driver
#   F:include/emu10k1.h:1.48->1.49 
#   F:pci/emu10k1/emufx.c:1.60->1.61 
#   L:The indirect pointers are allocated correctly now for default DSP code.
#   L:Also, one bug in emu10k1_fx8010_code_t has been fixed as well.
#   Signed-off-by: Jaroslav Kysela <perex@suse.cz>
# 
# ChangeSet
#   2004/10/30 08:36:13-04:00 hch@lst.de 
#   [PATCH] unexport ei_tx_timeout
#   
#   not used by any module
#   
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/8390.c
#   2004/10/23 10:17:41-04:00 hch@lst.de +0 -1
#   unexport ei_tx_timeout
# 
# ChangeSet
#   2004/10/30 08:30:02-04:00 webvenza@libero.it 
#   [PATCH] Add Altimata PHY to sis900 driver
#   
#   The attached patch fixes a long standing detection problem with the
#   sis900 driver.
#   This PHY chip is used on some Pentium 4  with SiS chipset and on the
#   Acer Aspire 1705SMi (at least) notebook.
#   
#   Signed-Off-By: Daniele Venzano <webvenza@libero.it>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/sis900.c
#   2004/10/29 20:00:00-04:00 webvenza@libero.it +1 -0
#   Add Altimata PHY to sis900 driver
# 
# ChangeSet
#   2004/10/30 08:14:50-04:00 bunk@stusta.de 
#   [PATCH] net/skfp/smt.c: remove an unused function
#   
#   The patch below removes an unused function from drivers/net/skfp/smt.c
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/skfp/smt.c
#   2004/10/28 17:19:00-04:00 bunk@stusta.de +0 -7
#   net/skfp/smt.c: remove an unused function
# 
# ChangeSet
#   2004/10/30 08:14:39-04:00 bunk@stusta.de 
#   [PATCH] net/3c505.c: remove unused functions
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/3c505.c
#   2004/10/28 17:23:08-04:00 bunk@stusta.de +0 -10
#   net/3c505.c: remove unused functions
# 
# ChangeSet
#   2004/10/30 08:14:29-04:00 bunk@stusta.de 
#   [PATCH] bonding: remove an unused function
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/bonding/bond_3ad.c
#   2004/10/28 17:18:19-04:00 bunk@stusta.de +0 -10
#   bonding: remove an unused function
# 
# ChangeSet
#   2004/10/30 08:14:16-04:00 dave@thedillows.org 
#   [PATCH] net/typhoon.c: use previously-unused function
#   
#   A response to Adrian Bunk's "remove unused function" cleanup patch.
#   
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/typhoon.c
#   2004/10/28 20:06:45-04:00 dave@thedillows.org +1 -2
#   net/typhoon.c: remove an unused function
# 
# ChangeSet
#   2004/10/30 08:14:05-04:00 khc@pm.waw.pl 
#   [PATCH] net/wan/n2.c: remove an unused function
#   
#   Adrian Bunk <bunk@stusta.de> writes:
#   > The patch below removes an unused function from drivers/net/wan/n2.c
#   
#   A similar thing, for C101 card.
#   
#   Signed-off-by: Krzysztof Halasa <khc@pm.waw.pl>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/wan/c101.c
#   2004/10/28 20:18:31-04:00 khc@pm.waw.pl +0 -3
#   net/wan/n2.c: remove an unused function
# 
# ChangeSet
#   2004/10/30 08:13:54-04:00 bunk@stusta.de 
#   [PATCH] net/wan/n2.c: remove an unused function
#   
#   Signed-off-by: Adrian Bunk <bunk@stusta.de>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/wan/n2.c
#   2004/10/28 17:20:30-04:00 bunk@stusta.de +0 -5
#   net/wan/n2.c: remove an unused function
# 
# ChangeSet
#   2004/10/29 17:40:37+02:00 perex@suse.cz 
#   [ALSA] fixed emu10k1_fx8010_code_t structure to be less than 8192 bytes
#   
#   EMU10K1/EMU10K2 driver
#   This patch fixes emu10k1_fx8010_code_t structure using indirect pointers
#   to be less than 8192 bytes to follow the ioctl semantics.
#   
#   Signed-off-by: Jaroslav Kysela <perex@suse.cz>
# 
# sound/pci/emu10k1/emufx.c
#   2004/10/28 08:24:17+02:00 perex@suse.cz +100 -55
#   [ALSA] fixed emu10k1_fx8010_code_t structure to be less than 8192 bytes
#   
#   D:2004/10/28 14:24:17
#   C:EMU10K1/EMU10K2 driver
#   F:include/emu10k1.h:1.47->1.48 
#   F:pci/emu10k1/emufx.c:1.59->1.60 
#   L:This patch fixes emu10k1_fx8010_code_t structure using indirect pointers
#   L:to be less than 8192 bytes to follow the ioctl semantics.
#   Signed-off-by: Jaroslav Kysela <perex@suse.cz>
# 
# include/sound/emu10k1.h
#   2004/10/28 08:24:17+02:00 perex@suse.cz +4 -4
#   [ALSA] fixed emu10k1_fx8010_code_t structure to be less than 8192 bytes
#   
#   D:2004/10/28 14:24:17
#   C:EMU10K1/EMU10K2 driver
#   F:include/emu10k1.h:1.47->1.48 
#   F:pci/emu10k1/emufx.c:1.59->1.60 
#   L:This patch fixes emu10k1_fx8010_code_t structure using indirect pointers
#   L:to be less than 8192 bytes to follow the ioctl semantics.
#   Signed-off-by: Jaroslav Kysela <perex@suse.cz>
# 
# ChangeSet
#   2004/10/29 17:19:01+02:00 perex@suse.cz 
#   [ALSA] remove kernel version info from proc file
#   
#   ALSA Core
#   The kernel version information isn't necessary for the driver
#   in the kernel tree, so move it to the alsa-driver package.
#   
#   This removes a dependency to <linux/version.h>.
#   
#   Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
# 
# sound/core/info.c
#   2004/10/28 02:10:50+02:00 perex@suse.cz +3 -12
#   [ALSA] remove kernel version info from proc file
#   
#   D:2004/10/28 08:10:50
#   C:ALSA Core
#   F:core/info.c:1.48->1.49 
#   L:The kernel version information isn't necessary for the driver
#   L:in the kernel tree, so move it to the alsa-driver package.
#   L:
#   L:This removes a dependency to <linux/version.h>.
#   Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
# 
# ChangeSet
#   2004/10/29 17:17:57+02:00 perex@suse.cz 
#   [ALSA] Limit parity error messages
#   
#   BT87x driver
#   Some systems generate tons of PCI parity errors, so shut up
#   when more than 20 have been detected.
#   
#   Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
# 
# sound/pci/bt87x.c
#   2004/10/27 11:51:57+02:00 perex@suse.cz +43 -18
#   [ALSA] Limit parity error messages
#   
#   D:2004/10/27 17:51:57
#   C:BT87x driver
#   F:pci/bt87x.c:1.16->1.17 
#   L:Some systems generate tons of PCI parity errors, so shut up
#   L:when more than 20 have been detected.
#   Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
# 
# ChangeSet
#   2004/10/29 17:16:52+02:00 perex@suse.cz 
#   [ALSA] remove dead exports
#   
#   ALSA Core,Instrument layer,AD1848 driver,ES1688 driver
#   Alsa currently has tons of dead exports, often with totally unused
#   functions behind them.
#   This removes some of them.
#   
#   Signed-off-by: Christoph Hellwig <hch@lst.de>
#   Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
# 
# sound/isa/es1688/es1688_lib.c
#   2004/10/27 02:53:01+02:00 perex@suse.cz +1 -2
#   [ALSA] remove dead exports
#   
#   D:2004/10/27 08:52:59
#   C:ALSA Core,Instrument layer,AD1848 driver,ES1688 driver
#   F:core/init.c:1.49->1.50 
#   F:core/sound.c:1.66->1.67 
#   F:core/seq/instr/ainstr_fm.c:1.8->1.9 
#   F:core/seq/instr/ainstr_gf1.c:1.9->1.10 
#   F:core/seq/instr/ainstr_iw.c:1.10->1.11 
#   F:core/seq/instr/ainstr_simple.c:1.8->1.9 
#   F:include/ad1848.h:1.10->1.11 
#   F:include/ainstr_fm.h:1.3->1.4 
#   F:include/ainstr_gf1.h:1.4->1.5 
#   F:include/ainstr_iw.h:1.4->1.5 
#   F:include/core.h:1.59->1.60 
#   F:include/es1688.h:1.6->1.7 
#   F:isa/ad1848/ad1848_lib.c:1.36->1.37 
#   F:isa/es1688/es1688_lib.c:1.27->1.28 
#   L:Alsa currently has tons of dead exports, often with totally unused
#   L:functions behind them.
#   L:This removes some of them.
#   Signed-off-by: Christoph Hellwig <hch@lst.de>
#   Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
# 
# sound/isa/ad1848/ad1848_lib.c
#   2004/10/27 02:53:01+02:00 perex@suse.cz +6 -12
#   [ALSA] remove dead exports
#   
#   D:2004/10/27 08:52:59
#   C:ALSA Core,Instrument layer,AD1848 driver,ES1688 driver
#   F:core/init.c:1.49->1.50 
#   F:core/sound.c:1.66->1.67 
#   F:core/seq/instr/ainstr_fm.c:1.8->1.9 
#   F:core/seq/instr/ainstr_gf1.c:1.9->1.10 
#   F:core/seq/instr/ainstr_iw.c:1.10->1.11 
#   F:core/seq/instr/ainstr_simple.c:1.8->1.9 
#   F:include/ad1848.h:1.10->1.11 
#   F:include/ainstr_fm.h:1.3->1.4 
#   F:include/ainstr_gf1.h:1.4->1.5 
#   F:include/ainstr_iw.h:1.4->1.5 
#   F:include/core.h:1.59->1.60 
#   F:include/es1688.h:1.6->1.7 
#   F:isa/ad1848/ad1848_lib.c:1.36->1.37 
#   F:isa/es1688/es1688_lib.c:1.27->1.28 
#   L:Alsa currently has tons of dead exports, often with totally unused
#   L:functions behind them.
#   L:This removes some of them.
#   Signed-off-by: Christoph Hellwig <hch@lst.de>
#   Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
# 
# sound/core/sound.c
#   2004/10/27 02:53:00+02:00 perex@suse.cz +0 -1
#   [ALSA] remove dead exports
#   
#   D:2004/10/27 08:52:59
#   C:ALSA Core,Instrument layer,AD1848 driver,ES1688 driver
#   F:core/init.c:1.49->1.50 
#   F:core/sound.c:1.66->1.67 
#   F:core/seq/instr/ainstr_fm.c:1.8->1.9 
#   F:core/seq/instr/ainstr_gf1.c:1.9->1.10 
#   F:core/seq/instr/ainstr_iw.c:1.10->1.11 
#   F:core/seq/instr/ainstr_simple.c:1.8->1.9 
#   F:include/ad1848.h:1.10->1.11 
#   F:include/ainstr_fm.h:1.3->1.4 
#   F:include/ainstr_gf1.h:1.4->1.5 
#   F:include/ainstr_iw.h:1.4->1.5 
#   F:include/core.h:1.59->1.60 
#   F:include/es1688.h:1.6->1.7 
#   F:isa/ad1848/ad1848_lib.c:1.36->1.37 
#   F:isa/es1688/es1688_lib.c:1.27->1.28 
#   L:Alsa currently has tons of dead exports, often with totally unused
#   L:functions behind them.
#   L:This removes some of them.
#   Signed-off-by: Christoph Hellwig <hch@lst.de>
#   Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
# 
# sound/core/seq/instr/ainstr_simple.c
#   2004/10/27 02:53:00+02:00 perex@suse.cz +1 -4
#   [ALSA] remove dead exports
#   
#   D:2004/10/27 08:52:59
#   C:ALSA Core,Instrument layer,AD1848 driver,ES1688 driver
#   F:core/init.c:1.49->1.50 
#   F:core/sound.c:1.66->1.67 
#   F:core/seq/instr/ainstr_fm.c:1.8->1.9 
#   F:core/seq/instr/ainstr_gf1.c:1.9->1.10 
#   F:core/seq/instr/ainstr_iw.c:1.10->1.11 
#   F:core/seq/instr/ainstr_simple.c:1.8->1.9 
#   F:include/ad1848.h:1.10->1.11 
#   F:include/ainstr_fm.h:1.3->1.4 
#   F:include/ainstr_gf1.h:1.4->1.5 
#   F:include/ainstr_iw.h:1.4->1.5 
#   F:include/core.h:1.59->1.60 
#   F:include/es1688.h:1.6->1.7 
#   F:isa/ad1848/ad1848_lib.c:1.36->1.37 
#   F:isa/es1688/es1688_lib.c:1.27->1.28 
#   L:Alsa currently has tons of dead exports, often with totally unused
#   L:functions behind them.
#   L:This removes some of them.
#   Signed-off-by: Christoph Hellwig <hch@lst.de>
#   Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
# 
# sound/core/seq/instr/ainstr_iw.c
#   2004/10/27 02:53:00+02:00 perex@suse.cz +1 -4
#   [ALSA] remove dead exports
#   
#   D:2004/10/27 08:52:59
#   C:ALSA Core,Instrument layer,AD1848 driver,ES1688 driver
#   F:core/init.c:1.49->1.50 
#   F:core/sound.c:1.66->1.67 
#   F:core/seq/instr/ainstr_fm.c:1.8->1.9 
#   F:core/seq/instr/ainstr_gf1.c:1.9->1.10 
#   F:core/seq/instr/ainstr_iw.c:1.10->1.11 
#   F:core/seq/instr/ainstr_simple.c:1.8->1.9 
#   F:include/ad1848.h:1.10->1.11 
#   F:include/ainstr_fm.h:1.3->1.4 
#   F:include/ainstr_gf1.h:1.4->1.5 
#   F:include/ainstr_iw.h:1.4->1.5 
#   F:include/core.h:1.59->1.60 
#   F:include/es1688.h:1.6->1.7 
#   F:isa/ad1848/ad1848_lib.c:1.36->1.37 
#   F:isa/es1688/es1688_lib.c:1.27->1.28 
#   L:Alsa currently has tons of dead exports, often with totally unused
#   L:functions behind them.
#   L:This removes some of them.
#   Signed-off-by: Christoph Hellwig <hch@lst.de>
#   Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
# 
# sound/core/seq/instr/ainstr_gf1.c
#   2004/10/27 02:53:00+02:00 perex@suse.cz +1 -4
#   [ALSA] remove dead exports
#   
#   D:2004/10/27 08:52:59
#   C:ALSA Core,Instrument layer,AD1848 driver,ES1688 driver
#   F:core/init.c:1.49->1.50 
#   F:core/sound.c:1.66->1.67 
#   F:core/seq/instr/ainstr_fm.c:1.8->1.9 
#   F:core/seq/instr/ainstr_gf1.c:1.9->1.10 
#   F:core/seq/instr/ainstr_iw.c:1.10->1.11 
#   F:core/seq/instr/ainstr_simple.c:1.8->1.9 
#   F:include/ad1848.h:1.10->1.11 
#   F:include/ainstr_fm.h:1.3->1.4 
#   F:include/ainstr_gf1.h:1.4->1.5 
#   F:include/ainstr_iw.h:1.4->1.5 
#   F:include/core.h:1.59->1.60 
#   F:include/es1688.h:1.6->1.7 
#   F:isa/ad1848/ad1848_lib.c:1.36->1.37 
#   F:isa/es1688/es1688_lib.c:1.27->1.28 
#   L:Alsa currently has tons of dead exports, often with totally unused
#   L:functions behind them.
#   L:This removes some of them.
#   Signed-off-by: Christoph Hellwig <hch@lst.de>
#   Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
# 
# sound/core/seq/instr/ainstr_fm.c
#   2004/10/27 02:53:00+02:00 perex@suse.cz +1 -4
#   [ALSA] remove dead exports
#   
#   D:2004/10/27 08:52:59
#   C:ALSA Core,Instrument layer,AD1848 driver,ES1688 driver
#   F:core/init.c:1.49->1.50 
#   F:core/sound.c:1.66->1.67 
#   F:core/seq/instr/ainstr_fm.c:1.8->1.9 
#   F:core/seq/instr/ainstr_gf1.c:1.9->1.10 
#   F:core/seq/instr/ainstr_iw.c:1.10->1.11 
#   F:core/seq/instr/ainstr_simple.c:1.8->1.9 
#   F:include/ad1848.h:1.10->1.11 
#   F:include/ainstr_fm.h:1.3->1.4 
#   F:include/ainstr_gf1.h:1.4->1.5 
#   F:include/ainstr_iw.h:1.4->1.5 
#   F:include/core.h:1.59->1.60 
#   F:include/es1688.h:1.6->1.7 
#   F:isa/ad1848/ad1848_lib.c:1.36->1.37 
#   F:isa/es1688/es1688_lib.c:1.27->1.28 
#   L:Alsa currently has tons of dead exports, often with totally unused
#   L:functions behind them.
#   L:This removes some of them.
#   Signed-off-by: Christoph Hellwig <hch@lst.de>
#   Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
# 
# sound/core/init.c
#   2004/10/27 02:52:59+02:00 perex@suse.cz +0 -3
#   [ALSA] remove dead exports
#   
#   D:2004/10/27 08:52:59
#   C:ALSA Core,Instrument layer,AD1848 driver,ES1688 driver
#   F:core/init.c:1.49->1.50 
#   F:core/sound.c:1.66->1.67 
#   F:core/seq/instr/ainstr_fm.c:1.8->1.9 
#   F:core/seq/instr/ainstr_gf1.c:1.9->1.10 
#   F:core/seq/instr/ainstr_iw.c:1.10->1.11 
#   F:core/seq/instr/ainstr_simple.c:1.8->1.9 
#   F:include/ad1848.h:1.10->1.11 
#   F:include/ainstr_fm.h:1.3->1.4 
#   F:include/ainstr_gf1.h:1.4->1.5 
#   F:include/ainstr_iw.h:1.4->1.5 
#   F:include/core.h:1.59->1.60 
#   F:include/es1688.h:1.6->1.7 
#   F:isa/ad1848/ad1848_lib.c:1.36->1.37 
#   F:isa/es1688/es1688_lib.c:1.27->1.28 
#   L:Alsa currently has tons of dead exports, often with totally unused
#   L:functions behind them.
#   L:This removes some of them.
#   Signed-off-by: Christoph Hellwig <hch@lst.de>
#   Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
# 
# include/sound/es1688.h
#   2004/10/27 02:53:01+02:00 perex@suse.cz +0 -2
#   [ALSA] remove dead exports
#   
#   D:2004/10/27 08:52:59
#   C:ALSA Core,Instrument layer,AD1848 driver,ES1688 driver
#   F:core/init.c:1.49->1.50 
#   F:core/sound.c:1.66->1.67 
#   F:core/seq/instr/ainstr_fm.c:1.8->1.9 
#   F:core/seq/instr/ainstr_gf1.c:1.9->1.10 
#   F:core/seq/instr/ainstr_iw.c:1.10->1.11 
#   F:core/seq/instr/ainstr_simple.c:1.8->1.9 
#   F:include/ad1848.h:1.10->1.11 
#   F:include/ainstr_fm.h:1.3->1.4 
#   F:include/ainstr_gf1.h:1.4->1.5 
#   F:include/ainstr_iw.h:1.4->1.5 
#   F:include/core.h:1.59->1.60 
#   F:include/es1688.h:1.6->1.7 
#   F:isa/ad1848/ad1848_lib.c:1.36->1.37 
#   F:isa/es1688/es1688_lib.c:1.27->1.28 
#   L:Alsa currently has tons of dead exports, often with totally unused
#   L:functions behind them.
#   L:This removes some of them.
#   Signed-off-by: Christoph Hellwig <hch@lst.de>
#   Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
# 
# include/sound/core.h
#   2004/10/27 02:53:01+02:00 perex@suse.cz +0 -1
#   [ALSA] remove dead exports
#   
#   D:2004/10/27 08:52:59
#   C:ALSA Core,Instrument layer,AD1848 driver,ES1688 driver
#   F:core/init.c:1.49->1.50 
#   F:core/sound.c:1.66->1.67 
#   F:core/seq/instr/ainstr_fm.c:1.8->1.9 
#   F:core/seq/instr/ainstr_gf1.c:1.9->1.10 
#   F:core/seq/instr/ainstr_iw.c:1.10->1.11 
#   F:core/seq/instr/ainstr_simple.c:1.8->1.9 
#   F:include/ad1848.h:1.10->1.11 
#   F:include/ainstr_fm.h:1.3->1.4 
#   F:include/ainstr_gf1.h:1.4->1.5 
#   F:include/ainstr_iw.h:1.4->1.5 
#   F:include/core.h:1.59->1.60 
#   F:include/es1688.h:1.6->1.7 
#   F:isa/ad1848/ad1848_lib.c:1.36->1.37 
#   F:isa/es1688/es1688_lib.c:1.27->1.28 
#   L:Alsa currently has tons of dead exports, often with totally unused
#   L:functions behind them.
#   L:This removes some of them.
#   Signed-off-by: Christoph Hellwig <hch@lst.de>
#   Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
# 
# include/sound/ainstr_iw.h
#   2004/10/27 02:53:01+02:00 perex@suse.cz +0 -2
#   [ALSA] remove dead exports
#   
#   D:2004/10/27 08:52:59
#   C:ALSA Core,Instrument layer,AD1848 driver,ES1688 driver
#   F:core/init.c:1.49->1.50 
#   F:core/sound.c:1.66->1.67 
#   F:core/seq/instr/ainstr_fm.c:1.8->1.9 
#   F:core/seq/instr/ainstr_gf1.c:1.9->1.10 
#   F:core/seq/instr/ainstr_iw.c:1.10->1.11 
#   F:core/seq/instr/ainstr_simple.c:1.8->1.9 
#   F:include/ad1848.h:1.10->1.11 
#   F:include/ainstr_fm.h:1.3->1.4 
#   F:include/ainstr_gf1.h:1.4->1.5 
#   F:include/ainstr_iw.h:1.4->1.5 
#   F:include/core.h:1.59->1.60 
#   F:include/es1688.h:1.6->1.7 
#   F:isa/ad1848/ad1848_lib.c:1.36->1.37 
#   F:isa/es1688/es1688_lib.c:1.27->1.28 
#   L:Alsa currently has tons of dead exports, often with totally unused
#   L:functions behind them.
#   L:This removes some of them.
#   Signed-off-by: Christoph Hellwig <hch@lst.de>
#   Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
# 
# include/sound/ainstr_gf1.h
#   2004/10/27 02:53:01+02:00 perex@suse.cz +0 -2
#   [ALSA] remove dead exports
#   
#   D:2004/10/27 08:52:59
#   C:ALSA Core,Instrument layer,AD1848 driver,ES1688 driver
#   F:core/init.c:1.49->1.50 
#   F:core/sound.c:1.66->1.67 
#   F:core/seq/instr/ainstr_fm.c:1.8->1.9 
#   F:core/seq/instr/ainstr_gf1.c:1.9->1.10 
#   F:core/seq/instr/ainstr_iw.c:1.10->1.11 
#   F:core/seq/instr/ainstr_simple.c:1.8->1.9 
#   F:include/ad1848.h:1.10->1.11 
#   F:include/ainstr_fm.h:1.3->1.4 
#   F:include/ainstr_gf1.h:1.4->1.5 
#   F:include/ainstr_iw.h:1.4->1.5 
#   F:include/core.h:1.59->1.60 
#   F:include/es1688.h:1.6->1.7 
#   F:isa/ad1848/ad1848_lib.c:1.36->1.37 
#   F:isa/es1688/es1688_lib.c:1.27->1.28 
#   L:Alsa currently has tons of dead exports, often with totally unused
#   L:functions behind them.
#   L:This removes some of them.
#   Signed-off-by: Christoph Hellwig <hch@lst.de>
#   Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
# 
# include/sound/ainstr_fm.h
#   2004/10/27 02:53:00+02:00 perex@suse.cz +0 -2
#   [ALSA] remove dead exports
#   
#   D:2004/10/27 08:52:59
#   C:ALSA Core,Instrument layer,AD1848 driver,ES1688 driver
#   F:core/init.c:1.49->1.50 
#   F:core/sound.c:1.66->1.67 
#   F:core/seq/instr/ainstr_fm.c:1.8->1.9 
#   F:core/seq/instr/ainstr_gf1.c:1.9->1.10 
#   F:core/seq/instr/ainstr_iw.c:1.10->1.11 
#   F:core/seq/instr/ainstr_simple.c:1.8->1.9 
#   F:include/ad1848.h:1.10->1.11 
#   F:include/ainstr_fm.h:1.3->1.4 
#   F:include/ainstr_gf1.h:1.4->1.5 
#   F:include/ainstr_iw.h:1.4->1.5 
#   F:include/core.h:1.59->1.60 
#   F:include/es1688.h:1.6->1.7 
#   F:isa/ad1848/ad1848_lib.c:1.36->1.37 
#   F:isa/es1688/es1688_lib.c:1.27->1.28 
#   L:Alsa currently has tons of dead exports, often with totally unused
#   L:functions behind them.
#   L:This removes some of them.
#   Signed-off-by: Christoph Hellwig <hch@lst.de>
#   Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
# 
# include/sound/ad1848.h
#   2004/10/27 02:53:00+02:00 perex@suse.cz +0 -5
#   [ALSA] remove dead exports
#   
#   D:2004/10/27 08:52:59
#   C:ALSA Core,Instrument layer,AD1848 driver,ES1688 driver
#   F:core/init.c:1.49->1.50 
#   F:core/sound.c:1.66->1.67 
#   F:core/seq/instr/ainstr_fm.c:1.8->1.9 
#   F:core/seq/instr/ainstr_gf1.c:1.9->1.10 
#   F:core/seq/instr/ainstr_iw.c:1.10->1.11 
#   F:core/seq/instr/ainstr_simple.c:1.8->1.9 
#   F:include/ad1848.h:1.10->1.11 
#   F:include/ainstr_fm.h:1.3->1.4 
#   F:include/ainstr_gf1.h:1.4->1.5 
#   F:include/ainstr_iw.h:1.4->1.5 
#   F:include/core.h:1.59->1.60 
#   F:include/es1688.h:1.6->1.7 
#   F:isa/ad1848/ad1848_lib.c:1.36->1.37 
#   F:isa/es1688/es1688_lib.c:1.27->1.28 
#   L:Alsa currently has tons of dead exports, often with totally unused
#   L:functions behind them.
#   L:This removes some of them.
#   Signed-off-by: Christoph Hellwig <hch@lst.de>
#   Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
# 
# ChangeSet
#   2004/10/29 17:15:45+02:00 perex@suse.cz 
#   [ALSA] remove old compatibility code
#   
#   USB USX2Y
#   
#   
#   Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
# 
# sound/usb/usx2y/usbusx2yaudio.c
#   2004/10/27 02:38:35+02:00 perex@suse.cz +1 -1
#   [ALSA] remove old compatibility code
#   
#   D:2004/10/27 08:38:35
#   C:USB USX2Y
#   F:usb/usx2y/usbusx2yaudio.c:1.5->1.6 
#   L:
#   Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
# 
# ChangeSet
#   2004/10/29 17:14:41+02:00 perex@suse.cz 
#   [ALSA] fix data type mismatch in sign_invert
#   
#   au88x0 driver
#   the last sign_invert cleanup introduced a data type mismatch
#   (an unsigned value can never be negative)
#   
#   Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
# 
# sound/pci/au88x0/au88x0_eq.c
#   2004/10/27 02:31:16+02:00 perex@suse.cz +1 -1
#   [ALSA] fix data type mismatch in sign_invert
#   
#   D:2004/10/27 08:31:16
#   C:au88x0 driver
#   F:pci/au88x0/au88x0_eq.c:1.7->1.8 
#   L:the last sign_invert cleanup introduced a data type mismatch
#   L:(an unsigned value can never be negative)
#   Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
# 
# ChangeSet
#   2004/10/29 17:13:39+02:00 perex@suse.cz 
#   [ALSA] au88x0: comment and whitespace cleanup
#   
#   au88x0 driver
#   Remove an obsolete comment and cleanup up some whitespace a bit
#   
#   Signed-off-by: Jeff Muizelaar <muizelaar@rogers.com>
#   Signed-off-by: Jaroslav Kysela <perex@suse.cz>
# 
# sound/pci/au88x0/au88x0.c
#   2004/10/26 08:12:31+02:00 perex@suse.cz +5 -8
#   [ALSA] au88x0: comment and whitespace cleanup
#   
#   D:2004/10/26 14:12:31
#   C:au88x0 driver
#   F:pci/au88x0/au88x0.c:1.15->1.16 
#   L:Remove an obsolete comment and cleanup up some whitespace a bit
#   Signed-off-by: Jeff Muizelaar <muizelaar@rogers.com>
#   Signed-off-by: Jaroslav Kysela <perex@suse.cz>
# 
# ChangeSet
#   2004/10/29 17:12:40+02:00 perex@suse.cz 
#   [ALSA] au88x0: name typo
#   
#   au88x0 driver
#   Fix the spelling of my name
#   
#   Signed-off-by: Jeff Muizelaar <muizelaar@rogers.com>
#   Signed-off-by: Jaroslav Kysela <perex@suse.cz>
# 
# sound/pci/au88x0/au88x0_core.c
#   2004/10/26 08:11:34+02:00 perex@suse.cz +1 -1
#   [ALSA] au88x0: name typo
#   
#   D:2004/10/26 14:11:34
#   C:au88x0 driver
#   F:pci/au88x0/au88x0.c:1.14->1.15 
#   F:pci/au88x0/au88x0_core.c:1.6->1.7 
#   L:Fix the spelling of my name
#   Signed-off-by: Jeff Muizelaar <muizelaar@rogers.com>
#   Signed-off-by: Jaroslav Kysela <perex@suse.cz>
# 
# sound/pci/au88x0/au88x0.c
#   2004/10/26 08:11:34+02:00 perex@suse.cz +1 -1
#   [ALSA] au88x0: name typo
#   
#   D:2004/10/26 14:11:34
#   C:au88x0 driver
#   F:pci/au88x0/au88x0.c:1.14->1.15 
#   F:pci/au88x0/au88x0_core.c:1.6->1.7 
#   L:Fix the spelling of my name
#   Signed-off-by: Jeff Muizelaar <muizelaar@rogers.com>
#   Signed-off-by: Jaroslav Kysela <perex@suse.cz>
# 
# ChangeSet
#   2004/10/29 17:11:35+02:00 perex@suse.cz 
#   [ALSA] au88x0: sign_invert cleanup
#   
#   au88x0 driver
#   Remove unecessary ' & 0xffff'ing of the result of sign_invert
#   
#   Signed-off-by: Jeff Muizelaar <muizelaar@rogers.com>
#   Signed-off-by: Jaroslav Kysela <perex@suse.cz>
# 
# sound/pci/au88x0/au88x0_eq.c
#   2004/10/26 08:10:54+02:00 perex@suse.cz +15 -15
#   [ALSA] au88x0: sign_invert cleanup
#   
#   D:2004/10/26 14:10:54
#   C:au88x0 driver
#   F:pci/au88x0/au88x0_eq.c:1.6->1.7 
#   L:Remove unecessary ' & 0xffff'ing of the result of sign_invert
#   Signed-off-by: Jeff Muizelaar <muizelaar@rogers.com>
#   Signed-off-by: Jaroslav Kysela <perex@suse.cz>
# 
# ChangeSet
#   2004/10/29 17:10:29+02:00 perex@suse.cz 
#   [ALSA] au88x0: set-levels cleanup
#   
#   au88x0 driver
#   Cleanup vortex_EqHw_SetLevels and add a bit of documentation
#   
#   Signed-off-by: Jeff Muizelaar <muizelaar@rogers.com>
#   Signed-off-by: Jaroslav Kysela <perex@suse.cz>
# 
# sound/pci/au88x0/au88x0_eq.c
#   2004/10/26 08:09:32+02:00 perex@suse.cz +15 -11
#   [ALSA] au88x0: set-levels cleanup
#   
#   D:2004/10/26 14:09:32
#   C:au88x0 driver
#   F:pci/au88x0/au88x0_eq.c:1.5->1.6 
#   L:Cleanup vortex_EqHw_SetLevels and add a bit of documentation
#   Signed-off-by: Jeff Muizelaar <muizelaar@rogers.com>
#   Signed-off-by: Jaroslav Kysela <perex@suse.cz>
# 
# ChangeSet
#   2004/10/29 17:09:28+02:00 perex@suse.cz 
#   [ALSA] au88x0: fix is-quad oops
#   
#   au88x0 driver
#   Fixes an oops on module removal caused by dereferencing the codec pointer.
#   This is not the best solution, but it is the easiest and fixes things for
#   now.
#   
#   Signed-off-by: Jeff Muizelaar <muizelaar@rogers.com>
#   Signed-off-by: Jaroslav Kysela <perex@suse.cz>
# 
# sound/pci/au88x0/au88x0_mixer.c
#   2004/10/26 08:08:31+02:00 perex@suse.cz +3 -1
#   [ALSA] au88x0: fix is-quad oops
#   
#   D:2004/10/26 14:08:31
#   C:au88x0 driver
#   F:pci/au88x0/au88x0.h:1.9->1.10 
#   F:pci/au88x0/au88x0_mixer.c:1.3->1.4 
#   L:Fixes an oops on module removal caused by dereferencing the codec pointer.
#   L:This is not the best solution, but it is the easiest and fixes things for
#   L:now.
#   Signed-off-by: Jeff Muizelaar <muizelaar@rogers.com>
#   Signed-off-by: Jaroslav Kysela <perex@suse.cz>
# 
# sound/pci/au88x0/au88x0.h
#   2004/10/26 08:08:31+02:00 perex@suse.cz +4 -1
#   [ALSA] au88x0: fix is-quad oops
#   
#   D:2004/10/26 14:08:31
#   C:au88x0 driver
#   F:pci/au88x0/au88x0.h:1.9->1.10 
#   F:pci/au88x0/au88x0_mixer.c:1.3->1.4 
#   L:Fixes an oops on module removal caused by dereferencing the codec pointer.
#   L:This is not the best solution, but it is the easiest and fixes things for
#   L:now.
#   Signed-off-by: Jeff Muizelaar <muizelaar@rogers.com>
#   Signed-off-by: Jaroslav Kysela <perex@suse.cz>
# 
# ChangeSet
#   2004/10/29 17:08:26+02:00 perex@suse.cz 
#   [ALSA] au88x0: add resetup dma
#   
#   au88x0 driver
#   Add adbdma_resetup for refreshing the hw page table on pcm start
#   
#   Signed-off-by: Jeff Muizelaar <muizelaar@rogers.com>
#   Signed-off-by: Jaroslav Kysela <perex@suse.cz>
# 
# sound/pci/au88x0/au88x0_pcm.c
#   2004/10/26 08:04:51+02:00 perex@suse.cz +3 -1
#   [ALSA] au88x0: add resetup dma
#   
#   D:2004/10/26 14:04:51
#   C:au88x0 driver
#   F:pci/au88x0/au88x0.h:1.8->1.9 
#   F:pci/au88x0/au88x0_core.c:1.5->1.6 
#   F:pci/au88x0/au88x0_pcm.c:1.4->1.5 
#   L:Add adbdma_resetup for refreshing the hw page table on pcm start
#   Signed-off-by: Jeff Muizelaar <muizelaar@rogers.com>
#   Signed-off-by: Jaroslav Kysela <perex@suse.cz>
# 
# sound/pci/au88x0/au88x0_core.c
#   2004/10/26 08:04:51+02:00 perex@suse.cz +27 -0
#   [ALSA] au88x0: add resetup dma
#   
#   D:2004/10/26 14:04:51
#   C:au88x0 driver
#   F:pci/au88x0/au88x0.h:1.8->1.9 
#   F:pci/au88x0/au88x0_core.c:1.5->1.6 
#   F:pci/au88x0/au88x0_pcm.c:1.4->1.5 
#   L:Add adbdma_resetup for refreshing the hw page table on pcm start
#   Signed-off-by: Jeff Muizelaar <muizelaar@rogers.com>
#   Signed-off-by: Jaroslav Kysela <perex@suse.cz>
# 
# sound/pci/au88x0/au88x0.h
#   2004/10/26 08:04:51+02:00 perex@suse.cz +1 -0
#   [ALSA] au88x0: add resetup dma
#   
#   D:2004/10/26 14:04:51
#   C:au88x0 driver
#   F:pci/au88x0/au88x0.h:1.8->1.9 
#   F:pci/au88x0/au88x0_core.c:1.5->1.6 
#   F:pci/au88x0/au88x0_pcm.c:1.4->1.5 
#   L:Add adbdma_resetup for refreshing the hw page table on pcm start
#   Signed-off-by: Jeff Muizelaar <muizelaar@rogers.com>
#   Signed-off-by: Jaroslav Kysela <perex@suse.cz>
# 
# ChangeSet
#   2004/10/29 17:07:18+02:00 perex@suse.cz 
#   [ALSA] snd-usb-usx2y - crash fix for OHCI USB-HCDs
#   
#   USB USX2Y
#   Version: 0.8.6
#   Work on this started, when rumors spread that OHCI equipped machines would
#   crash. This was due to me missing two facts:
#   1) Ohci has a bigger usb frame number wrap around.
#   2) It only supports URB_ISO_ASAP when submitting iso urbs.
#   These issues are fixed now.
#   
#   Signed-off-by: Karsten Wiese <annabellesgarden@yahoo.de>
#   Signed-off-by: Jaroslav Kysela <perex@suse.cz>
# 
# sound/usb/usx2y/usbusx2yaudio.c
#   2004/10/26 08:03:03+02:00 perex@suse.cz +394 -373
#   [ALSA] snd-usb-usx2y - crash fix for OHCI USB-HCDs
#   
#   D:2004/10/26 14:03:03
#   C:USB USX2Y
#   F:usb/usx2y/usX2Yhwdep.c:1.2->1.3 
#   F:usb/usx2y/usbusx2y.c:1.4->1.5 
#   F:usb/usx2y/usbusx2y.h:1.1->1.2 
#   F:usb/usx2y/usbusx2yaudio.c:1.4->1.5 
#   L:Version: 0.8.6
#   L:Work on this started, when rumors spread that OHCI equipped machines would
#   L:crash. This was due to me missing two facts:
#   L:1) Ohci has a bigger usb frame number wrap around.
#   L:2) It only supports URB_ISO_ASAP when submitting iso urbs.
#   L:These issues are fixed now.
#   Signed-off-by: Karsten Wiese <annabellesgarden@yahoo.de>
#   Signed-off-by: Jaroslav Kysela <perex@suse.cz>
# 
# sound/usb/usx2y/usbusx2y.h
#   2004/10/26 08:03:03+02:00 perex@suse.cz +33 -12
#   [ALSA] snd-usb-usx2y - crash fix for OHCI USB-HCDs
#   
#   D:2004/10/26 14:03:03
#   C:USB USX2Y
#   F:usb/usx2y/usX2Yhwdep.c:1.2->1.3 
#   F:usb/usx2y/usbusx2y.c:1.4->1.5 
#   F:usb/usx2y/usbusx2y.h:1.1->1.2 
#   F:usb/usx2y/usbusx2yaudio.c:1.4->1.5 
#   L:Version: 0.8.6
#   L:Work on this started, when rumors spread that OHCI equipped machines would
#   L:crash. This was due to me missing two facts:
#   L:1) Ohci has a bigger usb frame number wrap around.
#   L:2) It only supports URB_ISO_ASAP when submitting iso urbs.
#   L:These issues are fixed now.
#   Signed-off-by: Karsten Wiese <annabellesgarden@yahoo.de>
#   Signed-off-by: Jaroslav Kysela <perex@suse.cz>
# 
# sound/usb/usx2y/usbusx2y.c
#   2004/10/26 08:03:03+02:00 perex@suse.cz +21 -4
#   [ALSA] snd-usb-usx2y - crash fix for OHCI USB-HCDs
#   
#   D:2004/10/26 14:03:03
#   C:USB USX2Y
#   F:usb/usx2y/usX2Yhwdep.c:1.2->1.3 
#   F:usb/usx2y/usbusx2y.c:1.4->1.5 
#   F:usb/usx2y/usbusx2y.h:1.1->1.2 
#   F:usb/usx2y/usbusx2yaudio.c:1.4->1.5 
#   L:Version: 0.8.6
#   L:Work on this started, when rumors spread that OHCI equipped machines would
#   L:crash. This was due to me missing two facts:
#   L:1) Ohci has a bigger usb frame number wrap around.
#   L:2) It only supports URB_ISO_ASAP when submitting iso urbs.
#   L:These issues are fixed now.
#   Signed-off-by: Karsten Wiese <annabellesgarden@yahoo.de>
#   Signed-off-by: Jaroslav Kysela <perex@suse.cz>
# 
# sound/usb/usx2y/usX2Yhwdep.c
#   2004/10/26 08:03:03+02:00 perex@suse.cz +2 -8
#   [ALSA] snd-usb-usx2y - crash fix for OHCI USB-HCDs
#   
#   D:2004/10/26 14:03:03
#   C:USB USX2Y
#   F:usb/usx2y/usX2Yhwdep.c:1.2->1.3 
#   F:usb/usx2y/usbusx2y.c:1.4->1.5 
#   F:usb/usx2y/usbusx2y.h:1.1->1.2 
#   F:usb/usx2y/usbusx2yaudio.c:1.4->1.5 
#   L:Version: 0.8.6
#   L:Work on this started, when rumors spread that OHCI equipped machines would
#   L:crash. This was due to me missing two facts:
#   L:1) Ohci has a bigger usb frame number wrap around.
#   L:2) It only supports URB_ISO_ASAP when submitting iso urbs.
#   L:These issues are fixed now.
#   Signed-off-by: Karsten Wiese <annabellesgarden@yahoo.de>
#   Signed-off-by: Jaroslav Kysela <perex@suse.cz>
# 
# ChangeSet
#   2004/10/29 17:02:54+02:00 perex@suse.cz 
#   [ALSA] rearrange OSS SPARC dependencies
#   
#   Sound Core
#   rearrange the SPARC symbols in the OSS dependencies to
#   prevent alsa-driver's mod-deps from throwing up
#   
#   Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
# 
# sound/Kconfig
#   2004/10/26 01:03:18+02:00 perex@suse.cz +1 -1
#   [ALSA] rearrange OSS SPARC dependencies
#   
#   D:2004/10/26 07:03:18
#   C:Sound Core
#   F:Kconfig:1.8->1.9 
#   L:rearrange the SPARC symbols in the OSS dependencies to
#   L:prevent alsa-driver's mod-deps from throwing up
#   Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
# 
# ChangeSet
#   2004/10/29 17:01:52+02:00 perex@suse.cz 
#   [ALSA] fix sequencer sleeping in interrupt context
#   
#   ALSA sequencer,ALSA<-OSS sequencer
#   
#   
#   Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
# 
# sound/core/seq/seq_clientmgr.c
#   2004/10/25 04:43:30+02:00 perex@suse.cz +1 -1
#   [ALSA] fix sequencer sleeping in interrupt context
#   
#   D:2004/10/25 10:43:30
#   C:ALSA sequencer,ALSA<-OSS sequencer
#   F:core/seq/seq_clientmgr.c:1.38->1.39 
#   F:core/seq/oss/seq_oss_timer.c:1.7->1.8 
#   L:
#   Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
# 
# sound/core/seq/oss/seq_oss_timer.c
#   2004/10/25 04:43:30+02:00 perex@suse.cz +1 -1
#   [ALSA] fix sequencer sleeping in interrupt context
#   
#   D:2004/10/25 10:43:30
#   C:ALSA sequencer,ALSA<-OSS sequencer
#   F:core/seq/seq_clientmgr.c:1.38->1.39 
#   F:core/seq/oss/seq_oss_timer.c:1.7->1.8 
#   L:
#   Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
# 
# ChangeSet
#   2004/10/29 17:00:31+02:00 perex@suse.cz 
#   [ALSA] use blacklist/whitelist for (non-)audio Bt878 cards
#   
#   Documentation,PCI drivers,BT87x driver
#   Some Bt87x cards use PCI function 1 for MPEG data instead of
#   audio data, so we blacklist those in the audio driver.
#   
#   Further add a whitelist for cards where audio is known to work
#   (many other cards do not implement the audio connection).
#   Unknown cards can be enabled manually.
#   
#   Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
# 
# sound/pci/bt87x.c
#   2004/10/25 03:41:06+02:00 perex@suse.cz +72 -16
#   [ALSA] use blacklist/whitelist for (non-)audio Bt878 cards
#   
#   D:2004/10/25 09:41:07
#   C:Documentation,PCI drivers,BT87x driver
#   F:Documentation/ALSA-Configuration.txt:1.53->1.54 
#   F:Documentation/Bt87x.txt:INITIAL->1.1 
#   F:pci/Kconfig:1.35->1.36 
#   F:pci/bt87x.c:1.15->1.16 
#   L:Some Bt87x cards use PCI function 1 for MPEG data instead of
#   L:audio data, so we blacklist those in the audio driver.
#   L:
#   L:Further add a whitelist for cards where audio is known to work
#   L:(many other cards do not implement the audio connection).
#   L:Unknown cards can be enabled manually.
#   Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
# 
# sound/pci/Kconfig
#   2004/10/25 03:40:56+02:00 perex@suse.cz +3 -2
#   [ALSA] use blacklist/whitelist for (non-)audio Bt878 cards
#   
#   D:2004/10/25 09:41:07
#   C:Documentation,PCI drivers,BT87x driver
#   F:Documentation/ALSA-Configuration.txt:1.53->1.54 
#   F:Documentation/Bt87x.txt:INITIAL->1.1 
#   F:pci/Kconfig:1.35->1.36 
#   F:pci/bt87x.c:1.15->1.16 
#   L:Some Bt87x cards use PCI function 1 for MPEG data instead of
#   L:audio data, so we blacklist those in the audio driver.
#   L:
#   L:Further add a whitelist for cards where audio is known to work
#   L:(many other cards do not implement the audio connection).
#   L:Unknown cards can be enabled manually.
#   Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
# 
# Documentation/sound/alsa/ALSA-Configuration.txt
#   2004/10/25 03:41:07+02:00 perex@suse.cz +1 -0
#   [ALSA] use blacklist/whitelist for (non-)audio Bt878 cards
#   
#   D:2004/10/25 09:41:07
#   C:Documentation,PCI drivers,BT87x driver
#   F:Documentation/ALSA-Configuration.txt:1.53->1.54 
#   F:Documentation/Bt87x.txt:INITIAL->1.1 
#   F:pci/Kconfig:1.35->1.36 
#   F:pci/bt87x.c:1.15->1.16 
#   L:Some Bt87x cards use PCI function 1 for MPEG data instead of
#   L:audio data, so we blacklist those in the audio driver.
#   L:
#   L:Further add a whitelist for cards where audio is known to work
#   L:(many other cards do not implement the audio connection).
#   L:Unknown cards can be enabled manually.
#   Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
# 
# Documentation/sound/alsa/Bt87x.txt
#   2004/10/29 16:45:58+02:00 perex@suse.cz +78 -0
#   [ALSA] use blacklist/whitelist for (non-)audio Bt878 cards
#   
#   D:2004/10/25 09:41:07
#   C:Documentation,PCI drivers,BT87x driver
#   F:Documentation/ALSA-Configuration.txt:1.53->1.54 
#   F:Documentation/Bt87x.txt:INITIAL->1.1 
#   F:pci/Kconfig:1.35->1.36 
#   F:pci/bt87x.c:1.15->1.16 
#   L:Some Bt87x cards use PCI function 1 for MPEG data instead of
#   L:audio data, so we blacklist those in the audio driver.
#   L:
#   L:Further add a whitelist for cards where audio is known to work
#   L:(many other cards do not implement the audio connection).
#   L:Unknown cards can be enabled manually.
#   Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
# 
# Documentation/sound/alsa/Bt87x.txt
#   2004/10/29 16:45:58+02:00 perex@suse.cz +0 -0
#   BitKeeper file /home/perex/bk/linux-sound/work/Documentation/sound/alsa/Bt87x.txt
# 
# ChangeSet
#   2004/10/28 05:00:02-04:00 len.brown@intel.com 
#   merge
# 
# include/acpi/acpi_bus.h
#   2004/10/28 04:59:55-04:00 len.brown@intel.com +0 -0
#   merge
# 
# drivers/acpi/processor.c
#   2004/10/28 04:59:55-04:00 len.brown@intel.com +66 -2
#   merge
# 
# include/linux/acpi.h
#   2004/10/28 04:45:11-04:00 len.brown@intel.com +0 -0
#   Auto merged
# 
# drivers/acpi/scan.c
#   2004/10/28 04:45:11-04:00 len.brown@intel.com +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/10/28 04:01:25-04:00 len.brown@intel.com 
#   [ACPI] Initial container driver to support hotplug notifications
#   on ACPI0004, PNP0A05 and PNP0A06 devices.
#   
#   Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
#   Signed-off-by: Len Brown <len.brown@intel.com>
# 
# include/acpi/container.h
#   2004/09/24 18:26:34-04:00 len.brown@intel.com +13 -0
#   Import patch container_drv.patch
# 
# drivers/acpi/container.c
#   2004/09/24 18:26:34-04:00 len.brown@intel.com +344 -0
#   Import patch container_drv.patch
# 
# include/acpi/container.h
#   2004/09/24 18:26:34-04:00 len.brown@intel.com +0 -0
#   BitKeeper file /home/lenb/src/26-latest-hotplug/include/acpi/container.h
# 
# drivers/acpi/container.c
#   2004/09/24 18:26:34-04:00 len.brown@intel.com +0 -0
#   BitKeeper file /home/lenb/src/26-latest-hotplug/drivers/acpi/container.c
# 
# drivers/acpi/Makefile
#   2004/09/24 18:26:34-04:00 len.brown@intel.com +1 -0
#   Import patch container_drv.patch
# 
# drivers/acpi/Kconfig
#   2004/09/24 18:26:34-04:00 len.brown@intel.com +9 -1
#   Import patch container_drv.patch
# 
# ChangeSet
#   2004/10/28 03:55:03-04:00 len.brown@intel.com 
#   [ACPI] Extend processor driver to support ACPI-based Physical CPU hotplug
#   
#   Signed-off-by Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
#   Signed-off-by: Len Brown <len.brown2intel.com>
# 
# drivers/acpi/processor.c
#   2004/10/28 03:54:49-04:00 len.brown@intel.com +414 -66
#   Import patch processor_drv.patch
# 
# drivers/acpi/Kconfig
#   2004/09/24 18:26:31-04:00 len.brown@intel.com +8 -0
#   Import patch processor_drv.patch
# 
# ChangeSet
#   2004/10/28 03:41:43-04:00 len.brown@intel.com 
#   IA64 CPU hotplug topology
#   
#   Extend support for dynamic registration and unregistration of the cpu,
#   by implementing and exporting arch_register_cpu()/arch_unregister_cpu().
#   Also combine multiple implementation of topology_init() functions to
#   single topology_init() in case of ia64 architecture.
#   
#   Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
#   Signed-off-by: Len Brown <len.brown@intel.com>
# 
# include/linux/cpu.h
#   2004/09/24 18:26:27-04:00 len.brown@intel.com +3 -0
#   Import patch topology.patch
# 
# include/asm-ia64/cpu.h
#   2004/09/24 18:26:27-04:00 len.brown@intel.com +5 -0
#   Import patch topology.patch
# 
# include/asm-i386/cpu.h
#   2004/09/24 18:26:27-04:00 len.brown@intel.com +4 -13
#   Import patch topology.patch
# 
# drivers/base/cpu.c
#   2004/09/24 18:26:27-04:00 len.brown@intel.com +18 -2
#   Import patch topology.patch
# 
# arch/ia64/mm/numa.c
#   2004/10/28 03:36:29-04:00 len.brown@intel.com +0 -36
#   Import patch topology.patch
# 
# arch/ia64/kernel/topology.c
#   2004/09/24 18:26:27-04:00 len.brown@intel.com +70 -23
#   Import patch topology.patch
# 
# arch/ia64/kernel/Makefile
#   2004/09/24 18:26:27-04:00 len.brown@intel.com +2 -1
#   Import patch topology.patch
# 
# arch/ia64/dig/Makefile
#   2004/09/24 18:26:27-04:00 len.brown@intel.com +0 -5
#   Import patch topology.patch
# 
# arch/i386/mach-default/topology.c
#   2004/09/24 18:26:27-04:00 len.brown@intel.com +31 -0
#   Import patch topology.patch
# 
# ChangeSet
#   2004/10/28 03:28:17-04:00 len.brown@intel.com 
#   [ACPI] IA64-specific support for mapping lsapic to cpu array.
#   analogous i386 and x86_64 code TBD
#   
#   Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
#   Signed-off-by: Len Brown <len.brown@intel.com>
# 
# include/linux/acpi.h
#   2004/09/27 12:55:27-04:00 len.brown@intel.com +14 -0
#   Import patch acpi_hotplug_arch.patch
# 
# include/asm-ia64/acpi.h
#   2004/09/27 13:00:17-04:00 len.brown@intel.com +1 -1
#   Import patch acpi_hotplug_arch.patch
# 
# drivers/acpi/numa.c
#   2004/09/27 13:04:23-04:00 len.brown@intel.com +20 -1
#   Import patch acpi_hotplug_arch.patch
# 
# arch/ia64/kernel/acpi.c
#   2004/10/28 03:26:31-04:00 len.brown@intel.com +106 -2
#   Import patch acpi_hotplug_arch.patch
# 
# arch/i386/kernel/acpi/boot.c
#   2004/09/27 12:55:27-04:00 len.brown@intel.com +22 -0
#   Import patch acpi_hotplug_arch.patch
# 
# ChangeSet
#   2004/10/28 03:14:52-04:00 len.brown@intel.com 
#   [ACPI] create ACPI hotplug eject interface
#   
#   The kernel when it receives an hardware sci eject request it simply passes this
#   to user mode agent and the agent in turn will offline all the child devices and
#   then echo's 1 onto the eject file for that acpi device.
#   
#   This patch provides the sysfs "eject" interface for the user mode agent
#   to notify the core acpi so that the core acpi can trim its bus which 
#   causes .remove function to be called for all child devices.
#   
#   For example for LSB0 which is an ejectable device, we will see
#   /sys/firmware/acpi/namespace/ACPI/_SB/LSB/eject.
#   
#   Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
#   Signed-off-by: Len Brown <len.brown@intel.com>
# 
# drivers/acpi/scan.c
#   2004/09/24 18:26:20-04:00 len.brown@intel.com +153 -0
#   Import patch acpi_core_eject.patch
# 
# ChangeSet
#   2004/10/28 02:59:39-04:00 len.brown@intel.com 
#   [ACPI] Provide core hotplug support in ACPI
#   
#   Create acpi_bus_trim(), acpi_bus_remove() and acpi_pci_unbind(),
#   The reverse of of acpi_bus_scan(), acpi_bus_add() and acpi_pci_bind()
#   
#   Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
#   Signed-off-by: Len Brown <len.brown@intel.com>
# 
# include/acpi/acpi_drivers.h
#   2004/09/24 18:26:17-04:00 len.brown@intel.com +2 -0
#   Import patch acpi_core.patch
# 
# include/acpi/acpi_bus.h
#   2004/10/28 02:59:06-04:00 len.brown@intel.com +9 -1
#   Import patch acpi_core.patch
# 
# drivers/acpi/scan.c
#   2004/09/24 18:26:17-04:00 len.brown@intel.com +122 -9
#   Import patch acpi_core.patch
# 
# drivers/acpi/pci_irq.c
#   2004/09/24 18:26:17-04:00 len.brown@intel.com +39 -3
#   Import patch acpi_core.patch
# 
# drivers/acpi/pci_bind.c
#   2004/09/24 18:26:17-04:00 len.brown@intel.com +45 -0
#   Import patch acpi_core.patch
# 
# drivers/acpi/bus.c
#   2004/09/24 18:26:17-04:00 len.brown@intel.com +0 -4
#   Import patch acpi_core.patch
# 
# drivers/acpi/acpi_ksyms.c
#   2004/09/24 18:26:17-04:00 len.brown@intel.com +3 -0
#   Import patch acpi_core.patch
# 
# ChangeSet
#   2004/10/28 00:32:55-04:00 trini@kernel.crashing.org 
#   [PATCH] IBM EMAC Kconfig changes: Add 'select CRC32'
#   
#   On Mon, Oct 25, 2004 at 09:12:03AM -0700, Tom Rini wrote:
#   
#   > In trying to build for IBM 440GP Eval with CRC32=n, I noticed two
#   > things.  First, all of the IBM EMAC Kconfig bits are space, not tab
#   > indented, and that IBM EMAC doesn't select CRC32 like all of the other
#   > enet drivers that need it do.
#   
#   Add a 'select CRC32'
#   
#   Signed-off-by: Tom Rini <trini@kernel.crashing.org>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/Kconfig
#   2004/10/27 20:00:00-04:00 trini@kernel.crashing.org +1 -0
#   IBM EMAC Kconfig changes: Add 'select CRC32'
# 
# ChangeSet
#   2004/10/28 00:32:45-04:00 trini@kernel.crashing.org 
#   [PATCH] IBM EMAC Kconfig changes
#   
#   In trying to build for IBM 440GP Eval with CRC32=n, I noticed two
#   things.  First, all of the IBM EMAC Kconfig bits are space, not tab
#   indented, and that IBM EMAC doesn't select CRC32 like all of the other
#   enet drivers that need it do.
#   
#   Fix spacing of IBM EMAC Kconfig options.
#   
#   Signed-off-by: Tom Rini <trini@kernel.crashing.org>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/Kconfig
#   2004/10/27 20:00:00-04:00 trini@kernel.crashing.org +21 -21
#   IBM EMAC Kconfig changes
# 
# ChangeSet
#   2004/10/27 10:40:50-04:00 shemminger@osdl.org 
#   [PATCH] via-velocity: get rid of unused global
#   
#   Get rid of unused global variable, name the enum instead.
#   
#   Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/via-velocity.h
#   2004/10/18 17:04:11-04:00 shemminger@osdl.org +2 -2
#   via-velocity: get rid of unused global
# 
# ChangeSet
#   2004/10/27 22:33:20+10:00 airlied@starflyer.(none) 
#   drm: device minor fixups and /proc fixups
#   
#   This patch fixes up the DRM to do better minor number accounting
#   and /proc directory creation, the old code was buggy in a number
#   of situations with multiple cards, and rather ugly. It is also 
#   a step on the way to the drm_core module.
#   
#   From: Jon Smirl and Dave Airlie
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_stub.h
#   2004/10/27 22:33:12+10:00 airlied@starflyer.(none) +173 -135
#   drm: device minor fixups and /proc fixups
#   
#   This patch fixes up the DRM to do better minor number accounting
#   and /proc directory creation, the old code was buggy in a number
#   of situations with multiple cards, and rather ugly. It is also 
#   a step on the way to the drm_core module.
#   
#   From: Jon Smirl and Dave Airlie
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_proc.h
#   2004/10/27 22:33:12+10:00 airlied@starflyer.(none) +6 -14
#   drm: device minor fixups and /proc fixups
#   
#   This patch fixes up the DRM to do better minor number accounting
#   and /proc directory creation, the old code was buggy in a number
#   of situations with multiple cards, and rather ugly. It is also 
#   a step on the way to the drm_core module.
#   
#   From: Jon Smirl and Dave Airlie
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_drv.h
#   2004/10/27 22:33:12+10:00 airlied@starflyer.(none) +89 -97
#   drm: device minor fixups and /proc fixups
#   
#   This patch fixes up the DRM to do better minor number accounting
#   and /proc directory creation, the old code was buggy in a number
#   of situations with multiple cards, and rather ugly. It is also 
#   a step on the way to the drm_core module.
#   
#   From: Jon Smirl and Dave Airlie
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drmP.h
#   2004/10/27 22:33:12+10:00 airlied@starflyer.(none) +24 -5
#   drm: device minor fixups and /proc fixups
#   
#   This patch fixes up the DRM to do better minor number accounting
#   and /proc directory creation, the old code was buggy in a number
#   of situations with multiple cards, and rather ugly. It is also 
#   a step on the way to the drm_core module.
#   
#   From: Jon Smirl and Dave Airlie
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# ChangeSet
#   2004/10/27 12:09:04+02:00 vojtech@suse.cz 
#   Manual merge
# 
# drivers/input/serio/i8042-io.h
#   2004/10/27 12:08:57+02:00 vojtech@suse.cz +2 -4
#   Manual merge
# 
# ChangeSet
#   2004/10/27 01:11:44-05:00 dtor_core@ameritech.net 
#   Input: parkbd - switch to using module_param. Parameter names are
#          parkbd.port and parkbd.mode
#   
#   Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
# 
# drivers/input/serio/parkbd.c
#   2004/10/27 01:10:52-05:00 dtor_core@ameritech.net +8 -11
#   Switch to using module_param()
# 
# Documentation/kernel-parameters.txt
#   2004/10/27 01:10:52-05:00 dtor_core@ameritech.net +7 -0
#   Document parkbd options.
# 
# ChangeSet
#   2004/10/26 17:14:34-04:00 akpm@osdl.org 
#   [PATCH] ray_cs export cleanup
#   
#   From: Arjan van de Ven <arjan@fenrus.demon.nl>
#   
#   The ray_cs driver author seemed to have assumed that he needs to exports
#   functions he registers with the core kernel via function pointers, that of
#   course isn't the case so the cleanup below removes this; these functions
#   aren't used anywhere else nor meant to be (they're even static).
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/wireless/ray_cs.c
#   2004/10/24 05:01:51-04:00 akpm@osdl.org +0 -4
#   ray_cs export cleanup
# 
# ChangeSet
#   2004/10/25 22:10:39-04:00 akpm@osdl.org 
#   [PATCH] r8169 module_param build fix
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
# 
# drivers/net/r8169.c
#   2004/10/24 05:47:51-04:00 akpm@osdl.org +1 -1
#   r8169-module_param-fix
# 
# ChangeSet
#   2004/10/25 21:22:35-04:00 jgarzik@pobox.com 
#   Merge pobox.com:/garz/repo/linux-2.6
#   into pobox.com:/garz/repo/netdev-2.6/r8169
# 
# drivers/net/Kconfig
#   2004/10/25 21:22:31-04:00 jgarzik@pobox.com +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/10/24 16:48:01-05:00 jejb@mulgrave.(none) 
#   scsi_debug v 1.75
#   
#   From: 	Douglas Gilbert <dougg@torque.net>
#   
#       - fix highmem data transfers
#            - fix kunmap_atomic() argument
#            - disable clustering
#       - allow every_nth < 0 for error continuously once
#         count is reached
#       - minor sense buffer handling cleanup
#   
#   Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
# 
# drivers/scsi/scsi_debug.c
#   2004/10/24 16:47:49-05:00 jejb@mulgrave.(none) +265 -214
#   scsi_debug v 1.75
# 
# ChangeSet
#   2004/10/24 21:02:03+02:00 vojtech@suse.cz 
#   Merge bk://dtor.bkbits.net/input/ into suse.cz:/home/vojtech/bk/input
# 
# drivers/input/keyboard/lkkbd.c
#   2004/10/24 21:01:51+02:00 vojtech@suse.cz +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/10/24 20:59:23+02:00 vojtech@suse.cz 
#   Merge suse.cz:/home/vojtech/bk/linus into suse.cz:/home/vojtech/bk/input
# 
# drivers/usb/input/hid-core.c
#   2004/10/24 20:59:06+02:00 vojtech@suse.cz +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/10/24 16:44:56+10:00 airlied@starflyer.(none) 
#   drm: memory allocation patch 
#   
#   This removes some unnecessary macros for allocating DRM memory.
#   It doesn't change any functionality.
#   
#   From: Jon Smirl <jonsmirl@gmail.com>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/radeon_state.c
#   2004/10/24 16:44:47+10:00 airlied@starflyer.(none) +2 -1
#   drm: memory allocation patch 
#   
#   This removes some unnecessary macros for allocating DRM memory.
#   It doesn't change any functionality.
#   
#   From: Jon Smirl <jonsmirl@gmail.com>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/radeon_mem.c
#   2004/10/24 16:44:47+10:00 airlied@starflyer.(none) +10 -10
#   drm: memory allocation patch 
#   
#   This removes some unnecessary macros for allocating DRM memory.
#   It doesn't change any functionality.
#   
#   From: Jon Smirl <jonsmirl@gmail.com>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/r128_state.c
#   2004/10/24 16:44:47+10:00 airlied@starflyer.(none) +42 -42
#   drm: memory allocation patch 
#   
#   This removes some unnecessary macros for allocating DRM memory.
#   It doesn't change any functionality.
#   
#   From: Jon Smirl <jonsmirl@gmail.com>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/i915_mem.c
#   2004/10/24 16:44:47+10:00 airlied@starflyer.(none) +10 -10
#   drm: memory allocation patch 
#   
#   This removes some unnecessary macros for allocating DRM memory.
#   It doesn't change any functionality.
#   
#   From: Jon Smirl <jonsmirl@gmail.com>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_os_linux.h
#   2004/10/24 16:44:47+10:00 airlied@starflyer.(none) +0 -5
#   drm: memory allocation patch 
#   
#   This removes some unnecessary macros for allocating DRM memory.
#   It doesn't change any functionality.
#   
#   From: Jon Smirl <jonsmirl@gmail.com>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_memory_debug.h
#   2004/10/24 16:44:47+10:00 airlied@starflyer.(none) +1 -1
#   drm: memory allocation patch 
#   
#   This removes some unnecessary macros for allocating DRM memory.
#   It doesn't change any functionality.
#   
#   From: Jon Smirl <jonsmirl@gmail.com>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_memory.h
#   2004/10/24 16:44:47+10:00 airlied@starflyer.(none) +3 -17
#   drm: memory allocation patch 
#   
#   This removes some unnecessary macros for allocating DRM memory.
#   It doesn't change any functionality.
#   
#   From: Jon Smirl <jonsmirl@gmail.com>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_irq.h
#   2004/10/24 16:44:47+10:00 airlied@starflyer.(none) +2 -2
#   drm: memory allocation patch 
#   
#   This removes some unnecessary macros for allocating DRM memory.
#   It doesn't change any functionality.
#   
#   From: Jon Smirl <jonsmirl@gmail.com>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drmP.h
#   2004/10/24 16:44:47+10:00 airlied@starflyer.(none) +20 -2
#   drm: memory allocation patch 
#   
#   This removes some unnecessary macros for allocating DRM memory.
#   It doesn't change any functionality.
#   
#   From: Jon Smirl <jonsmirl@gmail.com>
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# ChangeSet
#   2004/10/24 11:54:23+10:00 airlied@starflyer.(none) 
#   drm: initial core move infrastructure change
#   
#   Initial infrastructure - move old H files to C files
#   also Kconfig and Makefile changes
#   
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/Makefile
#   2004/10/24 11:54:11+10:00 airlied@starflyer.(none) +6 -0
#   drm: initial core move infrastructure change
#   
#   Initial infrastructure - move old H files to C files
#   also Kconfig and Makefile changes
#   
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/Kconfig
#   2004/10/24 11:54:11+10:00 airlied@starflyer.(none) +1 -1
#   drm: initial core move infrastructure change
#   
#   Initial infrastructure - move old H files to C files
#   also Kconfig and Makefile changes
#   
#   Signed-off-by: Dave Airlie <airlied@linux.ie>
# 
# drivers/char/drm/drm_scatter.c
#   2004/10/24 11:49:08+10:00 airlied@starflyer.(none) +0 -0
#   Rename: drivers/char/drm/drm_scatter.h -> drivers/char/drm/drm_scatter.c
# 
# drivers/char/drm/drm_agpsupport.c
#   2004/10/24 11:49:02+10:00 airlied@starflyer.(none) +0 -0
#   Rename: drivers/char/drm/drm_agpsupport.h -> drivers/char/drm/drm_agpsupport.c
# 
# drivers/char/drm/drm_vm.c
#   2004/10/24 11:48:49+10:00 airlied@starflyer.(none) +0 -0
#   Rename: drivers/char/drm/drm_vm.h -> drivers/char/drm/drm_vm.c
# 
# drivers/char/drm/drm_stub.c
#   2004/10/24 11:48:41+10:00 airlied@starflyer.(none) +0 -0
#   Rename: drivers/char/drm/drm_stub.h -> drivers/char/drm/drm_stub.c
# 
# drivers/char/drm/drm_proc.c
#   2004/10/24 11:48:34+10:00 airlied@starflyer.(none) +0 -0
#   Rename: drivers/char/drm/drm_proc.h -> drivers/char/drm/drm_proc.c
# 
# drivers/char/drm/drm_memory.c
#   2004/10/24 11:48:27+10:00 airlied@starflyer.(none) +0 -0
#   Rename: drivers/char/drm/drm_memory.h -> drivers/char/drm/drm_memory.c
# 
# drivers/char/drm/drm_lock.c
#   2004/10/24 11:48:21+10:00 airlied@starflyer.(none) +0 -0
#   Rename: drivers/char/drm/drm_lock.h -> drivers/char/drm/drm_lock.c
# 
# drivers/char/drm/drm_irq.c
#   2004/10/24 11:48:14+10:00 airlied@starflyer.(none) +0 -0
#   Rename: drivers/char/drm/drm_irq.h -> drivers/char/drm/drm_irq.c
# 
# drivers/char/drm/drm_ioctl.c
#   2004/10/24 11:48:08+10:00 airlied@starflyer.(none) +0 -0
#   Rename: drivers/char/drm/drm_ioctl.h -> drivers/char/drm/drm_ioctl.c
# 
# drivers/char/drm/drm_init.c
#   2004/10/24 11:48:02+10:00 airlied@starflyer.(none) +0 -0
#   Rename: drivers/char/drm/drm_init.h -> drivers/char/drm/drm_init.c
# 
# drivers/char/drm/drm_fops.c
#   2004/10/24 11:47:54+10:00 airlied@starflyer.(none) +0 -0
#   Rename: drivers/char/drm/drm_fops.h -> drivers/char/drm/drm_fops.c
# 
# drivers/char/drm/drm_drv.c
#   2004/10/24 11:47:46+10:00 airlied@starflyer.(none) +0 -0
#   Rename: drivers/char/drm/drm_drv.h -> drivers/char/drm/drm_drv.c
# 
# drivers/char/drm/drm_drawable.c
#   2004/10/24 11:47:39+10:00 airlied@starflyer.(none) +0 -0
#   Rename: drivers/char/drm/drm_drawable.h -> drivers/char/drm/drm_drawable.c
# 
# drivers/char/drm/drm_dma.c
#   2004/10/24 11:47:32+10:00 airlied@starflyer.(none) +0 -0
#   Rename: drivers/char/drm/drm_dma.h -> drivers/char/drm/drm_dma.c
# 
# drivers/char/drm/drm_context.c
#   2004/10/24 11:47:27+10:00 airlied@starflyer.(none) +0 -0
#   Rename: drivers/char/drm/drm_context.h -> drivers/char/drm/drm_context.c
# 
# drivers/char/drm/drm_bufs.c
#   2004/10/24 11:47:19+10:00 airlied@starflyer.(none) +0 -0
#   Rename: drivers/char/drm/drm_bufs.h -> drivers/char/drm/drm_bufs.c
# 
# drivers/char/drm/drm_auth.c
#   2004/10/24 11:46:56+10:00 airlied@starflyer.(none) +0 -0
#   Rename: drivers/char/drm/drm_auth.h -> drivers/char/drm/drm_auth.c
# 
# ChangeSet
#   2004/10/21 23:57:49-05:00 dtor_core@ameritech.net 
#   Input: gscps2 - remove unused statically allocated gscps2_serio_port
#          variable as the port is allocated dynamically.
#   
#   Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
# 
# drivers/input/serio/gscps2.c
#   2004/10/21 23:57:31-05:00 dtor_core@ameritech.net +0 -13
#   Remove unused statically allocated gscps2_serio_port as the port is
#   allocated dynamically.
# 
# ChangeSet
#   2004/10/21 23:56:41-05:00 dtor_core@ameritech.net 
#   Input: get rid of pm_dev in input core as it is deprecated and
#          nothing uses it anyway.
#   
#   Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
# 
# include/linux/input.h
#   2004/10/21 23:56:15-05:00 dtor_core@ameritech.net +0 -1
#   Get rid of pm_dev in input core as it is deprecated and nothing
#   uses it anyway.
# 
# drivers/input/touchscreen/h3600_ts_input.c
#   2004/10/21 23:56:15-05:00 dtor_core@ameritech.net +3 -2
#   Move pm_dev into h3600_dev structure (not that it works anyway).
# 
# drivers/input/input.c
#   2004/10/21 23:56:15-05:00 dtor_core@ameritech.net +0 -4
#   Get rid of pm_dev in input core as it is deprecated and nothing
#   uses it anyway.
# 
# ChangeSet
#   2004/10/21 23:55:41-05:00 dtor_core@ameritech.net 
#   Input: i8042 - get rid of reboot notifier as suspend method
#          should do the job.
#   
#   Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
# 
# drivers/input/serio/i8042.c
#   2004/10/21 23:55:20-05:00 dtor_core@ameritech.net +5 -28
#   Get rid of reboot notifier as suspend method shoudl do the job.
# 
# ChangeSet
#   2004/10/21 23:53:52-05:00 dtor_core@ameritech.net 
#   Input: i8042 - get rid of old style power management handler since
#          APM calls both pm_send and device_suspend.
#   
#   Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
# 
# drivers/input/serio/i8042.c
#   2004/10/21 23:53:26-05:00 dtor_core@ameritech.net +30 -59
#   Get rid of old style power management handler since APM calls both
#   pm_send and device_suspend so in fact we were resuming everything
#   twice.
# 
# ChangeSet
#   2004/10/21 23:52:36-05:00 dtor_core@ameritech.net 
#   Input: i8042 - allow turning debugging on and off "on-fly"
#          so people do not have to recompile their kernels to
#          provide debug info.
#   
#          Adds new parameter i8042.debug also accessible through
#          sysfs. 
#   
#   Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
# 
# drivers/input/serio/i8042.h
#   2004/10/21 23:52:18-05:00 dtor_core@ameritech.net +6 -2
#   Allow debugging to be turned on and off "on-fly"
# 
# drivers/input/serio/i8042.c
#   2004/10/21 23:52:18-05:00 dtor_core@ameritech.net +7 -1
#   Allow debugging to be turned on and off "on-fly"
# 
# ChangeSet
#   2004/10/21 23:51:43-05:00 dtor_core@ameritech.net 
#   Input: when creating input devices for hardware attached to
#          a serio port properly set input_device->dev pointer
#          so when corresponding class device is created it will
#          show proper links to parent device and driver in sysfs
#          hierarchy.
#   
#   Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
# 
# drivers/input/mouse/vsxxxaa.c
#   2004/10/21 23:51:23-05:00 dtor_core@ameritech.net +1 -0
#   Link input device with serio's device so when class device is
#   registered appropriate links to device and driver are created.
# 
# drivers/input/mouse/sermouse.c
#   2004/10/21 23:51:23-05:00 dtor_core@ameritech.net +1 -0
#   Link input device with serio's device so when class device is
#   registered appropriate links to device and driver are created.
# 
# drivers/input/mouse/psmouse-base.c
#   2004/10/21 23:51:23-05:00 dtor_core@ameritech.net +1 -0
#   Link input device with serio's device so when class device is
#   registered appropriate links to device and driver are created.
# 
# drivers/input/keyboard/xtkbd.c
#   2004/10/21 23:51:23-05:00 dtor_core@ameritech.net +1 -0
#   Link input device with serio's device so when class device is
#   registered appropriate links to device and driver are created.
# 
# drivers/input/keyboard/sunkbd.c
#   2004/10/21 23:51:23-05:00 dtor_core@ameritech.net +1 -0
#   Link input device with serio's device so when class device is
#   registered appropriate links to device and driver are created.
# 
# drivers/input/keyboard/newtonkbd.c
#   2004/10/21 23:51:23-05:00 dtor_core@ameritech.net +1 -0
#   Link input device with serio's device so when class device is
#   registered appropriate links to device and driver are created.
# 
# drivers/input/keyboard/lkkbd.c
#   2004/10/21 23:51:23-05:00 dtor_core@ameritech.net +1 -0
#   Link input device with serio's device so when class device is
#   registered appropriate links to device and driver are created.
# 
# drivers/input/keyboard/atkbd.c
#   2004/10/21 23:51:23-05:00 dtor_core@ameritech.net +1 -0
#   Link input device with serio's device so when class device is
#   registered appropriate links to device and driver are created.
# 
# drivers/input/joystick/warrior.c
#   2004/10/21 23:51:23-05:00 dtor_core@ameritech.net +1 -0
#   Link input device with serio's device so when class device is
#   registered appropriate links to device and driver are created.
# 
# drivers/input/joystick/twidjoy.c
#   2004/10/21 23:51:23-05:00 dtor_core@ameritech.net +1 -0
#   Link input device with serio's device so when class device is
#   registered appropriate links to device and driver are created.
# 
# drivers/input/joystick/stinger.c
#   2004/10/21 23:51:23-05:00 dtor_core@ameritech.net +1 -0
#   Link input device with serio's device so when class device is
#   registered appropriate links to device and driver are created.
# 
# drivers/input/joystick/spaceorb.c
#   2004/10/21 23:51:23-05:00 dtor_core@ameritech.net +1 -0
#   Link input device with serio's device so when class device is
#   registered appropriate links to device and driver are created.
# 
# drivers/input/joystick/spaceball.c
#   2004/10/21 23:51:23-05:00 dtor_core@ameritech.net +1 -0
#   Link input device with serio's device so when class device is
#   registered appropriate links to device and driver are created.
# 
# drivers/input/joystick/magellan.c
#   2004/10/21 23:51:23-05:00 dtor_core@ameritech.net +1 -0
#   Link input device with serio's device so when class device is
#   registered appropriate links to device and driver are created.
# 
# drivers/input/joystick/iforce/iforce-main.c
#   2004/10/21 23:51:23-05:00 dtor_core@ameritech.net +15 -1
#   Link input device with serio's device so when class device is
#   registered appropriate links to device and driver are created.
# 
# ChangeSet
#   2004/10/21 23:50:25-05:00 dtor_core@ameritech.net 
#   Input: evdev, joydev, mousedev, tsdev - remove class device and devfs
#          entry when hardware driver disconnects instead of waiting for
#          the last user to drop off. This way hardware drivers can be
#          unloaded at any time.
#   
#   Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
# 
# drivers/input/tsdev.c
#   2004/10/21 23:49:57-05:00 dtor_core@ameritech.net +5 -5
#   Remove class device and devfs entry when hardware is disconncted;
#   do not wait till the last user drops off.
# 
# drivers/input/mousedev.c
#   2004/10/21 23:49:57-05:00 dtor_core@ameritech.net +2 -2
#   Remove class device and devfs entry when hardware is disconncted;
#   do not wait till the last user drops off.
# 
# drivers/input/joydev.c
#   2004/10/21 23:49:57-05:00 dtor_core@ameritech.net +2 -2
#   Remove class device and devfs entry when hardware is disconncted;
#   do not wait till the last user drops off.
# 
# drivers/input/evdev.c
#   2004/10/21 23:49:57-05:00 dtor_core@ameritech.net +2 -2
#   Remove class device and devfs entry when hardware is disconncted;
#   do not wait till the last user drops off.
# 
# ChangeSet
#   2004/10/21 23:49:17-05:00 dtor_core@ameritech.net 
#   Input: couple of whitespace fixes.
#   
#   Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
# 
# drivers/input/mouse/vsxxxaa.c
#   2004/10/21 23:48:57-05:00 dtor_core@ameritech.net +1 -1
#   Whitespace fixes
# 
# drivers/input/mouse/sermouse.c
#   2004/10/21 23:48:57-05:00 dtor_core@ameritech.net +12 -12
#   Whitespace fixes
# 
# ChangeSet
#   2004/10/21 18:41:34-04:00 viro@www.linux.org.uk 
#   [PATCH] mace iomem annotations - trivial part
#   
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
# 
# drivers/net/mace.c
#   2004/10/21 10:48:48-04:00 viro@www.linux.org.uk +32 -34
#   (17/18) mace iomem annotations - trivial part
# 
# ChangeSet
#   2004/10/21 18:40:03-04:00 viro@www.linux.org.uk 
#   [PATCH] airo iomem annotations
#   
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
# 
# drivers/net/wireless/airo.c
#   2004/10/21 10:48:47-04:00 viro@www.linux.org.uk +21 -21
#   (14/18) airo iomem annotations
# 
# ChangeSet
#   2004/10/21 18:39:52-04:00 viro@www.linux.org.uk 
#   [PATCH] wavelan_cs iomem annotations
#   
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
# 
# drivers/net/wireless/wavelan_cs.p.h
#   2004/10/21 10:48:47-04:00 viro@www.linux.org.uk +1 -0
#   (13/18) wavelan_cs iomem annotations
# 
# drivers/net/wireless/wavelan_cs.c
#   2004/10/21 10:48:47-04:00 viro@www.linux.org.uk +14 -11
#   (13/18) wavelan_cs iomem annotations
# 
# ChangeSet
#   2004/10/21 18:36:57-04:00 viro@www.linux.org.uk 
#   [PATCH] lne390 iomem annotations and fixes
#   
#   annotated, killed isa_... uses by making ioremap() unconditional, fixed
#   the use of isa_... on already remapped address.
#   
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
# 
# drivers/net/lne390.c
#   2004/10/21 10:48:46-04:00 viro@www.linux.org.uk +27 -37
#   (11/18) lne390 iomem annotations and fixes
# 
# ChangeSet
#   2004/10/21 18:28:58-04:00 viro@www.linux.org.uk 
#   [PATCH] skfp iomem annotations, switch to io{read,write}
#   
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
# 
# drivers/net/skfp/skfddi.c
#   2004/10/21 10:48:45-04:00 viro@www.linux.org.uk +16 -9
#   (8/18) skfp iomem annotations, switch to io{read,write}
# 
# drivers/net/skfp/h/types.h
#   2004/10/21 10:48:45-04:00 viro@www.linux.org.uk +6 -15
#   (8/18) skfp iomem annotations, switch to io{read,write}
# 
# drivers/net/skfp/h/targetos.h
#   2004/10/21 10:48:45-04:00 viro@www.linux.org.uk +1 -1
#   (8/18) skfp iomem annotations, switch to io{read,write}
# 
# drivers/net/skfp/h/targethw.h
#   2004/10/21 10:48:45-04:00 viro@www.linux.org.uk +1 -5
#   (8/18) skfp iomem annotations, switch to io{read,write}
# 
# drivers/net/skfp/h/fplustm.h
#   2004/10/21 10:48:45-04:00 viro@www.linux.org.uk +1 -5
#   (8/18) skfp iomem annotations, switch to io{read,write}
# 
# ChangeSet
#   2004/10/21 18:26:47-04:00 viro@www.linux.org.uk 
#   [PATCH] olympic_open() cleanup and fixes
#   
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
# 
# drivers/net/tokenring/olympic.c
#   2004/10/21 10:48:44-04:00 viro@www.linux.org.uk +46 -48
#   (6/18) olympic_open() cleanup and fixes
# 
# ChangeSet
#   2004/10/21 18:26:35-04:00 viro@www.linux.org.uk 
#   [PATCH] sundance iomem annotations, switch to io{read,write}
#   
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
# 
# drivers/net/sundance.c
#   2004/10/21 10:56:28-04:00 viro@www.linux.org.uk +121 -138
#   (3/18) sundance iomem annotations, switch to io{read,write}
# 
# ChangeSet
#   2004/10/21 18:25:51-04:00 viro@www.linux.org.uk 
#   [PATCH] via-rhine iomem annotations, switch to io{read,write}
#   
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
# 
# drivers/net/via-rhine.c
#   2004/10/21 11:02:43-04:00 viro@www.linux.org.uk +127 -140
#   (2/18) via-rhine iomem annotations, switch to io{read,write}
# 
# ChangeSet
#   2004/10/21 18:17:45-04:00 jgarzik@pobox.com 
#   Merge pobox.com:/garz/repo/linux-2.6
#   into pobox.com:/garz/repo/netdev-2.6/via-rhine
# 
# drivers/net/via-rhine.c
#   2004/10/21 18:17:40-04:00 jgarzik@pobox.com +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/10/21 18:14:03-04:00 jgarzik@pobox.com 
#   Merge pobox.com:/garz/repo/linux-2.6
#   into pobox.com:/garz/repo/netdev-2.6/viro-eth1
# 
# drivers/net/wireless/netwave_cs.c
#   2004/10/21 18:14:00-04:00 jgarzik@pobox.com +0 -0
#   Auto merged
# 
# drivers/net/wireless/arlan.h
#   2004/10/21 18:13:59-04:00 jgarzik@pobox.com +0 -0
#   Auto merged
# 
# drivers/net/tokenring/lanstreamer.c
#   2004/10/21 18:13:59-04:00 jgarzik@pobox.com +0 -0
#   Auto merged
# 
# drivers/net/starfire.c
#   2004/10/21 18:13:59-04:00 jgarzik@pobox.com +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/10/21 11:59:13+02:00 vojtech@suse.cz 
#   Merge suse.cz:/data2/bk/linus into suse.cz:/data2/bk/input
# 
# drivers/input/mouse/Kconfig
#   2004/10/21 11:59:08+02:00 vojtech@suse.cz +0 -0
#   Auto merged
# 
# drivers/input/joystick/gamecon.c
#   2004/10/21 11:59:08+02:00 vojtech@suse.cz +0 -0
#   Auto merged
# 
# Documentation/kernel-parameters.txt
#   2004/10/21 11:59:08+02:00 vojtech@suse.cz +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/10/20 14:54:11+02:00 vojtech@suse.cz 
#   Manual merge
# 
# drivers/usb/input/hid-core.c
#   2004/10/20 14:54:04+02:00 vojtech@suse.cz +5 -6
#   Manual merge
# 
# Documentation/kernel-parameters.txt
#   2004/10/20 14:49:34+02:00 vojtech@suse.cz +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/10/20 10:13:15+02:00 vojtech@suse.cz 
#   input: Increase ACK timeouts in libps2 in case the RESET_BAT command is used.
#          This should fix most Synaptics "reset failed" cases. Thanks to Keith
#          Packard for the report.
#          Also add some more keyboard IDs, so that unusual keyboards are accepted
#          by libps2 and atkbd.
#   
#   Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
# 
# include/linux/libps2.h
#   2004/10/20 10:13:08+02:00 vojtech@suse.cz +1 -1
#   input: Increase ACK timeouts in libps2 in case the RESET_BAT command is used.
#          This should fix most Synaptics "reset failed" cases. Thanks to Keith
#          Packard for the report.
#          Also add some more keyboard IDs, so that unusual keyboards are accepted
#          by libps2 and atkbd.
# 
# drivers/input/serio/libps2.c
#   2004/10/20 10:13:08+02:00 vojtech@suse.cz +32 -10
#   input: Increase ACK timeouts in libps2 in case the RESET_BAT command is used.
#          This should fix most Synaptics "reset failed" cases. Thanks to Keith
#          Packard for the report.
#          Also add some more keyboard IDs, so that unusual keyboards are accepted
#          by libps2 and atkbd.
# 
# drivers/input/keyboard/atkbd.c
#   2004/10/20 10:13:08+02:00 vojtech@suse.cz +4 -1
#   input: Increase ACK timeouts in libps2 in case the RESET_BAT command is used.
#          This should fix most Synaptics "reset failed" cases. Thanks to Keith
#          Packard for the report.
#          Also add some more keyboard IDs, so that unusual keyboards are accepted
#          by libps2 and atkbd.
# 
# ChangeSet
#   2004/10/20 01:26:20-04:00 viro@www.linux.org.uk 
#   [PATCH] net/pcmcia iomem annotations
#   
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
# 
# include/pcmcia/mem_op.h
#   2004/10/15 14:46:49-04:00 viro@www.linux.org.uk +38 -51
#   (31/32) net/pcmcia iomem annotations
# 
# drivers/net/pcmcia/xirc2ps_cs.c
#   2004/10/15 14:46:34-04:00 viro@www.linux.org.uk +1 -1
#   (31/32) net/pcmcia iomem annotations
# 
# drivers/net/pcmcia/smc91c92_cs.c
#   2004/10/15 14:46:30-04:00 viro@www.linux.org.uk +1 -1
#   (31/32) net/pcmcia iomem annotations
# 
# drivers/net/pcmcia/pcnet_cs.c
#   2004/10/15 14:46:20-04:00 viro@www.linux.org.uk +21 -18
#   (31/32) net/pcmcia iomem annotations
# 
# drivers/net/pcmcia/fmvj18x_cs.c
#   2004/10/15 14:46:26-04:00 viro@www.linux.org.uk +2 -2
#   (31/32) net/pcmcia iomem annotations
# 
# ChangeSet
#   2004/10/20 01:23:43-04:00 viro@www.linux.org.uk 
#   [PATCH] netwave iomem annotations
#   
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
# 
# drivers/net/wireless/netwave_cs.c
#   2004/10/15 14:40:21-04:00 viro@www.linux.org.uk +23 -19
#   (30/32) netwave iomem annotations
# 
# ChangeSet
#   2004/10/20 01:23:33-04:00 viro@www.linux.org.uk 
#   [PATCH] arlan iomem annotations and cleanups
#   
#   iomem annotations + couple of bad implementations of offsetof() replaced with
#   the real thing.
#   
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
# 
# drivers/net/wireless/arlan.h
#   2004/10/15 14:35:50-04:00 viro@www.linux.org.uk +3 -5
#   (28/32) arlan iomem annotations and cleanups
# 
# drivers/net/wireless/arlan-proc.c
#   2004/10/15 14:32:05-04:00 viro@www.linux.org.uk +5 -5
#   (28/32) arlan iomem annotations and cleanups
# 
# drivers/net/wireless/arlan-main.c
#   2004/10/15 14:31:08-04:00 viro@www.linux.org.uk +21 -21
#   (28/32) arlan iomem annotations and cleanups
# 
# ChangeSet
#   2004/10/20 01:23:23-04:00 viro@www.linux.org.uk 
#   [PATCH] netdev_priv() in netwave_cs
#   
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
# 
# drivers/net/wireless/netwave_cs.c
#   2004/10/15 14:43:33-04:00 viro@www.linux.org.uk +18 -17
#   (29/32) netdev_priv() in netwave_cs
# 
# ChangeSet
#   2004/10/20 01:23:12-04:00 viro@www.linux.org.uk 
#   [PATCH] netdev_priv() in arlan
#   
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
# 
# drivers/net/wireless/arlan.h
#   2004/10/15 14:36:05-04:00 viro@www.linux.org.uk +10 -10
#   (27/32) netdev_priv() in arlan
# 
# drivers/net/wireless/arlan-proc.c
#   2004/10/15 14:33:52-04:00 viro@www.linux.org.uk +10 -5
#   (27/32) netdev_priv() in arlan
# 
# drivers/net/wireless/arlan-main.c
#   2004/10/15 14:26:22-04:00 viro@www.linux.org.uk +24 -24
#   (27/32) netdev_priv() in arlan
# 
# ChangeSet
#   2004/10/20 01:18:24-04:00 viro@www.linux.org.uk 
#   [PATCH] (25/32) lanstreamer iomem annotations
#   
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
# 
# drivers/net/tokenring/lanstreamer.h
#   2004/10/15 14:20:31-04:00 viro@www.linux.org.uk +1 -1
#   (25/32) lanstreamer iomem annotations
# 
# drivers/net/tokenring/lanstreamer.c
#   2004/10/15 14:20:29-04:00 viro@www.linux.org.uk +12 -12
#   (25/32) lanstreamer iomem annotations
# 
# ChangeSet
#   2004/10/20 00:55:18-04:00 viro@www.linux.org.uk 
#   [PATCH] e2100 iomem annotations and fixes
#   
#   added mission ioremap(); driver was using readw() et.al. on non-remapped
#   addresses.
#   
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
# 
# drivers/net/e2100.c
#   2004/10/15 12:44:51-04:00 viro@www.linux.org.uk +13 -5
#   (23/32) e2100 iomem annotations and fixes
# 
# ChangeSet
#   2004/10/20 00:54:19-04:00 viro@www.linux.org.uk 
#   [PATCH] 3c359 iomem annotations
#   
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
# 
# drivers/net/tokenring/3c359.h
#   2004/10/15 12:44:50-04:00 viro@www.linux.org.uk +1 -1
#   (22/32) 3c359 iomem annotations
# 
# drivers/net/tokenring/3c359.c
#   2004/10/15 12:44:50-04:00 viro@www.linux.org.uk +18 -18
#   (22/32) 3c359 iomem annotations
# 
# ChangeSet
#   2004/10/20 00:54:08-04:00 viro@www.linux.org.uk 
#   [PATCH] depca iomem annotations
#   
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
# 
# drivers/net/depca.c
#   2004/10/15 12:44:35-04:00 viro@www.linux.org.uk +12 -12
#   (20/32) depca iomem annotations
# 
# ChangeSet
#   2004/10/20 00:51:44-04:00 viro@www.linux.org.uk 
#   [PATCH] killed isa_... in 3c507
#   
#   switched to ioremap() + normal read../write..
#   
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
# 
# drivers/net/3c507.c
#   2004/10/15 12:44:28-04:00 viro@www.linux.org.uk +80 -68
#   (19/32) killed isa_... in 3c507
# 
# ChangeSet
#   2004/10/20 00:51:07-04:00 viro@www.linux.org.uk 
#   [PATCH] starfire iomem annotations
#   
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
# 
# drivers/net/starfire.c
#   2004/10/15 12:44:23-04:00 viro@www.linux.org.uk +40 -39
#   (18/32) starfire iomem annotations
# 
# ChangeSet
#   2004/10/19 11:27:26-04:00 romieu@fr.zoreil.com 
#   [PATCH] r8169: netconsole support
#   
#   netconsole support.
#   
#   Signed-off-by: John W. Linville <linville@tuxdriver.com>
# 
# drivers/net/r8169.c
#   2004/10/18 17:56:27-04:00 romieu@fr.zoreil.com +21 -0
#   r8169: netconsole support
# 
# ChangeSet
#   2004/10/19 11:27:11-04:00 romieu@fr.zoreil.com 
#   [PATCH] r8169: unneeded synchronize_irq()
#   
#   synchronize_irq() is not needed as it is already issued by free_irq().
#   
#   Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
# 
# drivers/net/r8169.c
#   2004/10/18 17:37:58-04:00 romieu@fr.zoreil.com +0 -1
#   r8169: unneeded synchronize_irq()
# 
# ChangeSet
#   2004/10/19 11:26:56-04:00 romieu@fr.zoreil.com 
#   [PATCH] r8169: always clean Tx desc
#   
#   rtl8169_unmap_tx_skb() can not assume that a Tx ring descriptor belongs
#   to the host as it can be issued during rtl8169_tx_clear() as a part of
#   a recovery process (during Tx timeout for instance).
#   
#   Simple fix: always clean the relevant descriptor entry.
#   
#   Acked-by: Francois Romieu <romieu@fr.zoreil.com>
#   Signed-off-by: Jon Mason <jdmason@us.ibm.com>
# 
# drivers/net/r8169.c
#   2004/10/18 17:31:21-04:00 romieu@fr.zoreil.com +1 -0
#   r8169: always clean Tx desc
# 
# ChangeSet
#   2004/10/19 12:58:36+02:00 vojtech@suse.cz 
#   Input: i8042 ACPI enumeration - add PNP IDs found in AMD64 laptops.
#   
#   Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
# 
# drivers/input/serio/i8042-x86ia64io.h
#   2004/10/19 12:58:22+02:00 vojtech@suse.cz +2 -2
#   Input: i8042 ACPI enumeration - add PNP IDs found in AMD64 laptops.
#   
#   Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
# 
# ChangeSet
#   2004/10/19 10:02:20+02:00 vojtech@suse.cz 
#   Merge suse.cz:/data2/bk/linus into suse.cz:/data2/bk/input
# 
# drivers/usb/input/hid-core.c
#   2004/10/19 10:02:15+02:00 vojtech@suse.cz +0 -0
#   Auto merged
# 
# drivers/input/joystick/Kconfig
#   2004/10/19 10:02:15+02:00 vojtech@suse.cz +0 -1
#   Auto merged
# 
# ChangeSet
#   2004/10/16 17:22:32-04:00 viro@www.linux.org.uk 
#   [PATCH] ne3210 iomem annotations
#   
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
# 
# drivers/net/ne3210.c
#   2004/10/15 12:44:22-04:00 viro@www.linux.org.uk +17 -17
#   (17/32) ne3210 iomem annotations
# 
# ChangeSet
#   2004/10/16 16:50:54-04:00 viro@www.linux.org.uk 
#   [PATCH] ac3200 iomem annotations and fixes
#   
#   annotated, killed isa_... uses by making ioremap() unconditional, fixed
#   the use of isa_... on already remapped address.
#   
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
# 
# drivers/net/ac3200.c
#   2004/10/15 12:44:22-04:00 viro@www.linux.org.uk +27 -37
#   (15/32) ac3200 iomem annotations and fixes
# 
# drivers/net/8390.h
#   2004/10/15 12:44:21-04:00 viro@www.linux.org.uk +1 -0
#   (15/32) ac3200 iomem annotations and fixes
# 
# ChangeSet
#   2004/10/16 13:15:38+02:00 vojtech@suse.cz 
#   input: Fix ssize_t prototype mismatch in psmouse and atkbd.
#   
#   Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
# 
# drivers/input/mouse/psmouse.h
#   2004/10/16 13:15:31+02:00 vojtech@suse.cz +1 -1
#   input: Fix ssize_t prototype mismatch in psmouse and atkbd.
# 
# drivers/input/keyboard/atkbd.c
#   2004/10/16 13:15:31+02:00 vojtech@suse.cz +2 -2
#   input: Fix ssize_t prototype mismatch in psmouse and atkbd.
# 
# ChangeSet
#   2004/10/15 19:49:50-04:00 shemminger@osdl.org 
#   [PATCH] via-rhine: free_ring should be static
#   
#   free_ring is a local function
#   
#   Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
# 
# drivers/net/via-rhine.c
#   2004/10/15 15:45:02-04:00 shemminger@osdl.org +1 -1
#   via-rhine: free_ring should be static
# 
# ChangeSet
#   2004/10/15 19:49:38-04:00 shemminger@osdl.org 
#   [PATCH] via-rhine: use module_param
#   
#   Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
# 
# drivers/net/via-rhine.c
#   2004/10/15 15:27:28-04:00 shemminger@osdl.org +4 -3
#   via-rhine: use module_param
# 
# ChangeSet
#   2004/10/15 19:22:45-04:00 shemminger@osdl.org 
#   [PATCH] r8169: use netdev_priv
#   
#   Use netdev_priv in a couple of places in realtek 8169
#   
#   Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
# 
# drivers/net/r8169.c
#   2004/10/15 18:00:43-04:00 shemminger@osdl.org +2 -2
#   r8169: use netdev_priv
# 
# ChangeSet
#   2004/10/15 19:22:14-04:00 shemminger@osdl.org 
#   [PATCH] r8169: use module_param
#   
#   Use module_param instead of deprecated MDOULE_PARM
#   
#   Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
# 
# drivers/net/r8169.c
#   2004/10/15 17:56:05-04:00 shemminger@osdl.org +5 -3
#   r8169: use module_param
# 
# ChangeSet
#   2004/10/15 14:56:05-04:00 viro@parcelfarce.linux.theplanet.co.uk 
#   [PATCH] iomem annotations in r8169
#   
#   Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
# 
# drivers/net/r8169.c
#   2004/10/13 13:49:51-04:00 viro@parcelfarce.linux.theplanet.co.uk +42 -42
#   annotations in r8169
# 
# ChangeSet
#   2004/10/13 15:54:28+02:00 vojtech@suse.cz 
#   Merge suse.cz:/data2/bk/linus into suse.cz:/data2/bk/input
# 
# drivers/usb/input/hid-core.c
#   2004/10/13 15:54:24+02:00 vojtech@suse.cz +0 -0
#   Auto merged
# 
# Documentation/kernel-parameters.txt
#   2004/10/13 15:54:24+02:00 vojtech@suse.cz +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/10/04 16:46:51-04:00 romieu@fr.zoreil.com 
#   [PATCH] r8169: cleanup
#   
#   Cleanup
#   - timeout message is redundant with net/sched/sch_generic::dev_watchdog;
#   - anti-bloat in rtl8169_get_rx_csum;
#   - format fix.
#   
#   Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
#   Signed-off-by: Jon Mason <jdmason@us.ibm.com>
# 
# drivers/net/r8169.c
#   2004/10/04 15:27:47-04:00 romieu@fr.zoreil.com +3 -5
#   r8169: cleanup
# 
# ChangeSet
#   2004/10/04 16:46:37-04:00 romieu@fr.zoreil.com 
#   [PATCH] r8169: rtl8169_close() races
#   
#   - close the race with rtl8169_interrupt() which appears when rtl8169_close()
#     uses synchronize_irq()/free_irq();
#   - netif_poll_disable() allows rtl8169_close() to wait for any pending
#     rtl8169_poll() to complete so it can safely clear the rings.
#   
#   Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
# 
# drivers/net/r8169.c
#   2004/10/04 15:26:01-04:00 romieu@fr.zoreil.com +6 -0
#   r8169: rtl8169_close() races
# 
# ChangeSet
#   2004/10/04 16:46:24-04:00 romieu@fr.zoreil.com 
#   [PATCH] r8169: automatic pci dac step down
#   
#   Automatic adjustement of highmem dma feature.
#   
#   The first interruption encountered on systems where the 8169 does not
#   perform PCI DAC correctly seems to always be a PCI error one.
#   When DAC is enabled, the driver tries to issue a complete down/up
#   sequence as an addition to the usual halt of the device.
#   
#   Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
# 
# drivers/net/r8169.c
#   2004/10/04 15:25:07-04:00 romieu@fr.zoreil.com +70 -7
#   r8169: automatic pci dac step down
# 
# ChangeSet
#   2004/10/04 16:46:10-04:00 romieu@fr.zoreil.com 
#   [PATCH] r8169: wrong advertisement of VLAN features
#   
#   Removal of an advertisement for VLAN features which is redundant with
#   rtl8169_init_one().
#   
#   Signed-off-by: Jon Mason <jdmason@us.ibm.com>
# 
# drivers/net/r8169.c
#   2004/10/04 15:17:44-04:00 romieu@fr.zoreil.com +0 -2
#   r8169: wrong advertisement of VLAN features
# 
# ChangeSet
#   2004/10/04 16:45:56-04:00 romieu@fr.zoreil.com 
#   [PATCH] r8169: Tx timeout rework
#   
#   Tx timeout rework:
#   - the ring descriptors of the chipset and the ring index of the driver
#     are synced during a reset of the device;
#   - rtl8169_interrupt: rtl8169_hw_reset() replaces the previous stop code.
#     An implicit reset of the device is added but it makes no noticeable
#     difference with the former behavior (i.e.: stop the chipset).
#   
#   Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
# 
# drivers/net/r8169.c
#   2004/10/04 15:15:41-04:00 romieu@fr.zoreil.com +65 -24
#   r8169: Tx timeout rework
# 
# ChangeSet
#   2004/09/30 01:31:12-05:00 dtor_core@ameritech.net 
#   Input: psmouse - explicitely specify packet size instead of relying
#          on protocol numbering scheme. Make protocol detection routines
#          return -1 on failure to keep them consistent with ther rest
#          of the code. Set mouse parameters right in detection routines
#          instead of doing it in psmouse_extensions.
#   
#   Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
# 
# drivers/input/mouse/synaptics.h
#   2004/09/30 01:30:53-05:00 dtor_core@ameritech.net +1 -1
#   Adjust synaptics_detect prototype.
# 
# drivers/input/mouse/synaptics.c
#   2004/09/30 01:30:53-05:00 dtor_core@ameritech.net +12 -3
#   Explicitely set up packet size and vendor/name, adjust detect
#   routine to return -1 on failure.
# 
# drivers/input/mouse/psmouse.h
#   2004/09/30 01:30:53-05:00 dtor_core@ameritech.net +1 -0
#   Add packet size to psmouse structure.
# 
# drivers/input/mouse/psmouse-base.c
#   2004/09/30 01:30:53-05:00 dtor_core@ameritech.net +82 -74
#   Explicitely set and check packet size and not rely on protocol
#   numbering scheme; rearrange detect methods to return -1 when
#   hardware is not detceted and also set psmouse properties instead
#   of duing it in psmouse_extensions.
# 
# drivers/input/mouse/logips2pp.c
#   2004/09/30 01:30:53-05:00 dtor_core@ameritech.net +3 -2
#   Explicitely set up packet size, adjust ps2pp_init to return -1
#   on failure.
# 
# drivers/input/mouse/alps.h
#   2004/09/30 01:30:53-05:00 dtor_core@ameritech.net +1 -1
#   Adjust alps_detect prototype.
# 
# drivers/input/mouse/alps.c
#   2004/09/30 01:30:53-05:00 dtor_core@ameritech.net +10 -2
#   Explicitely set up packet size and vendor/name, adjust alps_detect
#   to retrun -1 on failure.
# 
# ChangeSet
#   2004/09/30 01:30:25-05:00 dtor_core@ameritech.net 
#   Input: psmouse - make logips2pp fully decode its protocol packets
#          and not rely on generic handler to finish job.
#   
#   Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
# 
# drivers/input/mouse/psmouse-base.c
#   2004/09/30 01:30:04-05:00 dtor_core@ameritech.net +0 -7
#   Make logips2pp fully decode its protocol packets and not rely
#   on generic handler to finish job.
# 
# drivers/input/mouse/logips2pp.h
#   2004/09/30 01:30:04-05:00 dtor_core@ameritech.net +0 -1
#   Make logips2pp fully decode its protocol packets and not rely
#   on generic handler to finish job.
# 
# drivers/input/mouse/logips2pp.c
#   2004/09/30 01:30:04-05:00 dtor_core@ameritech.net +33 -10
#   Make logips2pp fully decode its protocol packets and not rely
#   on generic handler to finish job.
# 
# ChangeSet
#   2004/09/30 01:28:49-05:00 dtor_core@ameritech.net 
#   Input: psmouse - drop PS2TPP protocol (it is handled exactly like
#          PS2PP) to free spot for THINKPS protocol and keep old protocol
#          numbers for binary compatibility with Synaptics/ALPS touchpad
#          driver for X.
#   
#   Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
# 
# drivers/input/mouse/psmouse.h
#   2004/09/30 01:28:32-05:00 dtor_core@ameritech.net +0 -1
#   Remove PS2TPP protocol as it is handled exactly like PS2PP
# 
# drivers/input/mouse/psmouse-base.c
#   2004/09/30 01:28:32-05:00 dtor_core@ameritech.net +4 -7
#   Remove PS2TPP protocol as it is handled exactly like PS2PP
# 
# drivers/input/mouse/logips2pp.c
#   2004/09/30 01:28:32-05:00 dtor_core@ameritech.net +28 -24
#   Convert ps2pp_init to signal caller whether it supports
#   PS2PP protocol or not like other detection functions do.
# 
# ChangeSet
#   2004/09/30 01:28:03-05:00 dtor_core@ameritech.net 
#   Input: psmouse - export rate, resolution, resetafter and smartscroll
#          (Logitech only) as individual mouse attributes (sysfs) and allow
#          them to be set/changed independently for each mouse:
#   
#            echo -n "100" > /sys/bus/serio/devices/serio0/rate
#            echo -n "200" > /sys/bus/serio/devices/serio0/resolution
#   
#   Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
# 
# drivers/input/mouse/psmouse.h
#   2004/09/30 01:27:48-05:00 dtor_core@ameritech.net +21 -1
#   Add PSMOUSE_DEFINE_ATTR to help define psmouse sysfs attributes
# 
# drivers/input/mouse/psmouse-base.c
#   2004/09/30 01:27:48-05:00 dtor_core@ameritech.net +125 -2
#   Export rate, resolution and resetafter as sysfs attributes.
# 
# drivers/input/mouse/logips2pp.c
#   2004/09/30 01:27:48-05:00 dtor_core@ameritech.net +39 -9
#   Export smartscroll as a sysfs attribute.
# 
# ChangeSet
#   2004/09/30 01:27:24-05:00 dtor_core@ameritech.net 
#   Input: psmouse - reset mouse before doing intellimouse/explorer
#          probes in case it got confused by earlier probes; switch
#          to streaming mode before setting scale and resolution,
#          otherwise some KVMs get confused.
#   
#   Patch-by: Marko Macek <Marko.Macek@gmx.net>
#   Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
# 
# drivers/input/mouse/psmouse-base.c
#   2004/09/30 01:27:07-05:00 dtor_core@ameritech.net +11 -7
#   Reset mouse before doing intellimouse/explorer probes in case it
#   got confused by earlier probes; switch to streaming mode before
#   setting scale and resolution, otherwise some KVMs may get confused.
# 
# ChangeSet
#   2004/09/30 01:26:43-05:00 dtor_core@ameritech.net 
#   Input: synaptics - not only switch to 4-byte client protocol
#          but also revert to 3-byte mode if client selected lower
#          protocol.
#   
#   Signed-off-by: Dmitry Torokhov <dtor@mail.ru> 
# 
# drivers/input/mouse/synaptics.c
#   2004/09/30 01:26:27-05:00 dtor_core@ameritech.net +7 -3
#   Not only switch to 4-byte client protocol but also disable it
#   if client switched to 3-byte protocol. 
# 
# ChangeSet
#   2004/09/30 01:25:47-05:00 dtor_core@ameritech.net 
#   Input: psmouse - add set_rate and set_resolution handlers to make
#          adding new protocols easier and remove special knowledge
#          from psmouse-base.c
#   
#   Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
# 
# drivers/input/mouse/synaptics.h
#   2004/09/30 01:25:30-05:00 dtor_core@ameritech.net +1 -0
#   Add current mode byte to synaptics structure.
# 
# drivers/input/mouse/synaptics.c
#   2004/09/30 01:25:30-05:00 dtor_core@ameritech.net +27 -10
#   Move rate switching code into separate synaptics_set_rate handler.
# 
# drivers/input/mouse/psmouse.h
#   2004/09/30 01:25:30-05:00 dtor_core@ameritech.net +7 -1
#   Add set_rate and set_resolution handlers to make adding new
#   protocols easier and remove special knowledge from psmouse-base.c
# 
# drivers/input/mouse/psmouse-base.c
#   2004/09/30 01:25:30-05:00 dtor_core@ameritech.net +20 -23
#   Add set_rate and set_resolution handlers to make adding new
#   protocols easier and remove special knowledge from psmouse-base.c
# 
# drivers/input/mouse/logips2pp.h
#   2004/09/30 01:25:30-05:00 dtor_core@ameritech.net +0 -1
#   Remove ps2pp_set_800dpi from list of exported functions.
# 
# drivers/input/mouse/logips2pp.c
#   2004/09/30 01:25:30-05:00 dtor_core@ameritech.net +14 -8
#   Add set_resultion handler.
# 
# ChangeSet
#   2004/09/30 01:24:59-05:00 dtor_core@ameritech.net 
#   Input: add a new signature for ALPS DualPoint found in
#          Dell Inspiron 8500
#   
#   Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
# 
# drivers/input/mouse/alps.c
#   2004/09/30 01:24:37-05:00 dtor_core@ameritech.net +1 -0
#   Add a new signature for DualPoint found in Dell Inspiron 8500
# 
# ChangeSet
#   2004/09/24 12:26:54+02:00 jbglaw@lug-owl.de 
#   input: More comment fixes in lkkbd.c
#   
#   Signed-off-by: Jan-Benedict Glaw <jbglaw@lug-owl.de>
#   Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
# 
# drivers/input/keyboard/lkkbd.c
#   2004/09/24 12:26:43+02:00 jbglaw@lug-owl.de +3 -3
#   input: More comment fixes in lkkbd.c
#   
#   Signed-off-by: Jan-Benedict Glaw <jbglaw@lug-owl.de>
#   Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
# 
# ChangeSet
#   2004/09/24 11:40:14+02:00 bjorn.helgaas@hp.com 
#   Input: Add ACPI-based i8042 keyboard and aux controller enumeration; can be
#   disabled by passing i8042.noacpi as a boot parameter.
#   
#   Original code by Bjorn Helgaas <bjorn.helgaas@hp.com>, reworked by
#   Dmitry Torokhov <dtor@mail.ru>, FixedIO support from Hans-Frieder Vogt
#   <hfvogt@gmx.net>
#   
#   Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
#   Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
# 
# drivers/input/serio/i8042-x86ia64io.h
#   2004/09/24 11:40:02+02:00 bjorn.helgaas@hp.com +308 -0
# 
# drivers/input/serio/i8042.h
#   2004/09/24 11:40:02+02:00 bjorn.helgaas@hp.com +2 -0
#   Input: Add ACPI-based i8042 keyboard and aux controller enumeration; can be
#   disabled by passing i8042.noacpi as a boot parameter.
#   
#   Original code by Bjorn Helgaas <bjorn.helgaas@hp.com>, reworked by
#   Dmitry Torokhov <dtor@mail.ru>, FixedIO support from Hans-Frieder Vogt
#   <hfvogt@gmx.net>
#   
#   Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
#   Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
# 
# drivers/input/serio/i8042.c
#   2004/09/24 11:40:02+02:00 bjorn.helgaas@hp.com +6 -0
#   Input: Add ACPI-based i8042 keyboard and aux controller enumeration; can be
#   disabled by passing i8042.noacpi as a boot parameter.
#   
#   Original code by Bjorn Helgaas <bjorn.helgaas@hp.com>, reworked by
#   Dmitry Torokhov <dtor@mail.ru>, FixedIO support from Hans-Frieder Vogt
#   <hfvogt@gmx.net>
#   
#   Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
#   Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
# 
# drivers/input/serio/i8042-x86ia64io.h
#   2004/09/24 11:40:02+02:00 bjorn.helgaas@hp.com +0 -0
#   BitKeeper file /home/vojtech/bk/input/drivers/input/serio/i8042-x86ia64io.h
# 
# drivers/input/serio/i8042-io.h
#   2004/09/24 11:40:02+02:00 bjorn.helgaas@hp.com +7 -44
#   Input: Add ACPI-based i8042 keyboard and aux controller enumeration; can be
#   disabled by passing i8042.noacpi as a boot parameter.
#   
#   Original code by Bjorn Helgaas <bjorn.helgaas@hp.com>, reworked by
#   Dmitry Torokhov <dtor@mail.ru>, FixedIO support from Hans-Frieder Vogt
#   <hfvogt@gmx.net>
#   
#   Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
#   Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
# 
# Documentation/kernel-parameters.txt
#   2004/09/24 11:40:00+02:00 bjorn.helgaas@hp.com +2 -0
#   Input: Add ACPI-based i8042 keyboard and aux controller enumeration; can be
#   disabled by passing i8042.noacpi as a boot parameter.
#   
#   Original code by Bjorn Helgaas <bjorn.helgaas@hp.com>, reworked by
#   Dmitry Torokhov <dtor@mail.ru>, FixedIO support from Hans-Frieder Vogt
#   <hfvogt@gmx.net>
#   
#   Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
#   Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
# 
# ChangeSet
#   2004/09/24 11:36:34+02:00 jbglaw@lug-owl.de 
#   Input: correct the the wrong use of "DB9" to the correct name, "DE9". 
#          Also, some comments/debugging output is fixed up.
#   
#   Signed-off-by: Jan-Benedict Glaw <jbglaw@lug-owl.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
# 
# drivers/input/mouse/vsxxxaa.c
#   2004/09/24 11:36:22+02:00 jbglaw@lug-owl.de +29 -24
#   Input: correct the the wrong use of "DB9" to the correct name, "DE9". 
#          Also, some comments/debugging output is fixed up.
#   
#   Signed-off-by: Jan-Benedict Glaw <jbglaw@lug-owl.de>
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
# 
# ChangeSet
#   2004/09/24 10:30:25+02:00 lenz@cs.wisc.edu 
#   input: Add LED definitions for PDAs.
#   
#   Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
#   Signed-off-by: John Lenz <lenz@cs.wisc.edu>
# 
# include/linux/input.h
#   2004/09/24 10:30:14+02:00 lenz@cs.wisc.edu +2 -0
#   input: Add LED definitions for PDAs.
#   
#   Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
#   Signed-off-by: John Lenz <lenz@cs.wisc.edu>
# 
# ChangeSet
#   2004/09/23 13:01:47+02:00 mochel@digitalimplant.org 
#   input: Remove calls to pm_access() and pm_dev_idle() from input.c, as
#          they're empty functions anyway.
#   
#   Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
#   Patch-by: Patrick Mochel <mochel@digitalimplant.org>
# 
# drivers/input/input.c
#   2004/09/23 13:01:41+02:00 mochel@digitalimplant.org +0 -7
#   input: Remove calls to pm_access() and pm_dev_idle() from input.c, as
#          they're empty functions anyway.
#   
#   Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
#   Patch-by: Patrick Mochel <mochel@digitalimplant.org>
# 
# ChangeSet
#   2004/09/23 12:59:31+02:00 vojtech@suse.cz 
#   input: Tidy up & fix the hid-input.c driver. Dual-wheel A4 mice don't report the phantom
#            button anymore, D-Pads are mapped to Hat-switches, debug can print HID->Input
#            mappings, more mappings added, devices with reports larger than MaxPacketSize
#            work again.
#   
#   Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
# 
# include/linux/input.h
#   2004/09/23 12:59:24+02:00 vojtech@suse.cz +3 -0
#   input: Tidy up & fix the hid-input.c driver. Dual-wheel A4 mice don't report the phantom
#            button anymore, D-Pads are mapped to Hat-switches, debug can print HID->Input
#            mappings, more mappings added, devices with reports larger than MaxPacketSize
#            work again.
#   
#   Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
# 
# drivers/usb/input/hid.h
#   2004/09/23 12:59:24+02:00 vojtech@suse.cz +41 -3
#   input: Tidy up & fix the hid-input.c driver. Dual-wheel A4 mice don't report the phantom
#            button anymore, D-Pads are mapped to Hat-switches, debug can print HID->Input
#            mappings, more mappings added, devices with reports larger than MaxPacketSize
#            work again.
#   
#   Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
# 
# drivers/usb/input/hid-input.c
#   2004/09/23 12:59:24+02:00 vojtech@suse.cz +217 -246
#   input: Tidy up & fix the hid-input.c driver. Dual-wheel A4 mice don't report the phantom
#            button anymore, D-Pads are mapped to Hat-switches, debug can print HID->Input
#            mappings, more mappings added, devices with reports larger than MaxPacketSize
#            work again.
#   
#   Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
# 
# drivers/usb/input/hid-debug.h
#   2004/09/23 12:59:24+02:00 vojtech@suse.cz +263 -1
#   input: Tidy up & fix the hid-input.c driver. Dual-wheel A4 mice don't report the phantom
#            button anymore, D-Pads are mapped to Hat-switches, debug can print HID->Input
#            mappings, more mappings added, devices with reports larger than MaxPacketSize
#            work again.
#   
#   Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
# 
# drivers/usb/input/hid-core.c
#   2004/09/23 12:59:24+02:00 vojtech@suse.cz +8 -9
#   input: Tidy up & fix the hid-input.c driver. Dual-wheel A4 mice don't report the phantom
#            button anymore, D-Pads are mapped to Hat-switches, debug can print HID->Input
#            mappings, more mappings added, devices with reports larger than MaxPacketSize
#            work again.
#   
#   Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
# 
# ChangeSet
#   2004/09/22 22:35:49-05:00 dtor_core@ameritech.net 
#   Input: clean up ALPS DualPoint logic
#   
#   Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
# 
# drivers/input/mouse/alps.c
#   2004/09/22 22:35:28-05:00 dtor_core@ameritech.net +22 -37
#   Clean up DualPoint logic
# 
# ChangeSet
#   2004/09/22 10:46:32+02:00 vojtech@suse.cz 
#   input: More IOWarrior blacklist entries in hid.c, rearranging the
#          blacklist back to alphabetic order.
#   
#   Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
# 
# drivers/usb/input/hid-core.c
#   2004/09/22 10:46:25+02:00 vojtech@suse.cz +9 -7
#   input: More IOWarrior blacklist entries in hid.c, rearranging the
#          blacklist back to alphabetic order.
#   
#   Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
# 
# ChangeSet
#   2004/09/22 01:50:38-05:00 dtor_core@ameritech.net 
#   Input: atkbd - export extra, scroll, set, softrepeat and softraw as individual
#          keyboard attributes (sysfs) and allow them to be set/changed independently
#          for each keyboard:
#   
#          echo -n "2" > /sys/bus/serio/devices/serio1/set
#          echo -n "1" > /sys/bus/serio/devices/serio1/softrepeat
#   
#   Signed-off-by: Dmitry Torokhov <dtor@mail.ru> 
# 
# drivers/input/keyboard/atkbd.c
#   2004/09/22 01:50:23-05:00 dtor_core@ameritech.net +365 -76
#   Export extra, scroll, set, softrepeat and softraw as individual
#   sysfs keyboard attributes.
# 
# ChangeSet
#   2004/09/22 01:49:31-05:00 dtor_core@ameritech.net 
#   Input: add serio_[un]pin_driver() functions so attribute handlers
#          can safely access driver bound to a serio port.
#   
#   Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
# 
# include/linux/serio.h
#   2004/09/22 01:49:13-05:00 dtor_core@ameritech.net +15 -1
#   Add drv_sem to serio structure and serio_[un]pin_driver() so attribute
#   handlers can safely access driver bound to a serio port
# 
# drivers/input/serio/serio.c
#   2004/09/22 01:49:13-05:00 dtor_core@ameritech.net +12 -8
#   Take drv_sem when binding/unbinding driver to a serio port
# 
# ChangeSet
#   2004/09/22 01:48:40-05:00 dtor_core@ameritech.net 
#   Input: pull common code from psmouse and atkbd into libps2 module
#   
#   Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
# 
# include/linux/libps2.h
#   2004/09/22 01:48:17-05:00 dtor_core@ameritech.net +50 -0
#   BitKeeper file /misc/arc/dtor/include/linux/libps2.h
# 
# drivers/input/serio/Makefile
#   2004/09/22 01:48:17-05:00 dtor_core@ameritech.net +1 -0
#   Add libps2
# 
# drivers/input/serio/Kconfig
#   2004/09/22 01:48:17-05:00 dtor_core@ameritech.net +10 -0
#   Add libps2
# 
# drivers/input/mouse/synaptics.c
#   2004/09/22 01:48:17-05:00 dtor_core@ameritech.net +15 -13
#   Rename psmouse_coommand -> ps2_command
# 
# drivers/input/mouse/psmouse.h
#   2004/09/22 01:48:17-05:00 dtor_core@ameritech.net +1 -15
#   Embed ps2dev into psmouse structure
# 
# drivers/input/mouse/psmouse-base.c
#   2004/09/22 01:48:17-05:00 dtor_core@ameritech.net +52 -187
#   Switch to using libps2 to communicate with PS/2 port
# 
# drivers/input/mouse/logips2pp.c
#   2004/09/22 01:48:17-05:00 dtor_core@ameritech.net +23 -18
#   Rename psmouse_coommand -> ps2_command
# 
# drivers/input/mouse/alps.c
#   2004/09/22 01:48:17-05:00 dtor_core@ameritech.net +38 -30
#   Rename psmouse_coommand -> ps2_command
# 
# drivers/input/mouse/Kconfig
#   2004/09/22 01:48:17-05:00 dtor_core@ameritech.net +1 -0
#   Automatically select libps2 when selecting psmouse
# 
# include/linux/libps2.h
#   2004/09/22 01:48:17-05:00 dtor_core@ameritech.net +0 -0
#   BitKeeper file /usr/src/export/input/include/linux/libps2.h
# 
# drivers/input/serio/libps2.c
#   2004/09/22 01:48:17-05:00 dtor_core@ameritech.net +273 -0
#   BitKeeper file /misc/arc/dtor/drivers/input/serio/libps2.c
# 
# drivers/input/keyboard/atkbd.c
#   2004/09/22 01:48:17-05:00 dtor_core@ameritech.net +52 -238
#   Switch to using libps2 to communicate with PS/2 port
# 
# drivers/input/keyboard/Kconfig
#   2004/09/22 01:48:17-05:00 dtor_core@ameritech.net +1 -0
#   Automatically select libps2 when selecting atkbd
# 
# drivers/input/serio/libps2.c
#   2004/09/22 01:48:17-05:00 dtor_core@ameritech.net +0 -0
#   BitKeeper file /usr/src/export/input/drivers/input/serio/libps2.c
# 
# ChangeSet
#   2004/09/21 16:12:18+02:00 vojtech@suse.cz 
#   input: Add AT-compatible rawmode generation for ARM.
#   
#   Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
#   Patch-by: Woody Suwalski <woodys@xandros.com>
# 
# drivers/char/keyboard.c
#   2004/09/21 16:12:11+02:00 vojtech@suse.cz +4 -1
#   input: Add AT-compatible rawmode generation for ARM.
#   
#   Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
#   Patch-by: Woody Suwalski <woodys@xandros.com>
# 
# ChangeSet
#   2004/09/21 15:48:50+02:00 petero2@telia.com 
#   input: Add ALPS touchpad driver, driver by Neil Brown, Peter Osterlund
#          and Dmitry Torokhov, some fixes by Vojtech Pavlik.
#   
#   Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
#   Patch-by: Peter Osterlund <petero2@telia.com>
# 
# drivers/input/mouse/alps.h
#   2004/09/21 15:48:43+02:00 petero2@telia.com +17 -0
# 
# drivers/input/mouse/alps.h
#   2004/09/21 15:48:43+02:00 petero2@telia.com +0 -0
#   BitKeeper file /data2/bk/input/drivers/input/mouse/alps.h
# 
# drivers/input/mouse/alps.c
#   2004/09/21 15:48:42+02:00 petero2@telia.com +422 -0
# 
# drivers/input/mousedev.c
#   2004/09/21 15:48:42+02:00 petero2@telia.com +10 -4
#   input: Add ALPS touchpad driver, driver by Neil Brown, Peter Osterlund
#          and Dmitry Torokhov, some fixes by Vojtech Pavlik.
#   
#   Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
#   Patch-by: Peter Osterlund <petero2@telia.com>
# 
# drivers/input/mouse/psmouse.h
#   2004/09/21 15:48:42+02:00 petero2@telia.com +3 -0
#   input: Add ALPS touchpad driver, driver by Neil Brown, Peter Osterlund
#          and Dmitry Torokhov, some fixes by Vojtech Pavlik.
#   
#   Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
#   Patch-by: Peter Osterlund <petero2@telia.com>
# 
# drivers/input/mouse/psmouse-base.c
#   2004/09/21 15:48:42+02:00 petero2@telia.com +22 -1
#   input: Add ALPS touchpad driver, driver by Neil Brown, Peter Osterlund
#          and Dmitry Torokhov, some fixes by Vojtech Pavlik.
#   
#   Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
#   Patch-by: Peter Osterlund <petero2@telia.com>
# 
# drivers/input/mouse/alps.c
#   2004/09/21 15:48:42+02:00 petero2@telia.com +0 -0
#   BitKeeper file /data2/bk/input/drivers/input/mouse/alps.c
# 
# drivers/input/mouse/Makefile
#   2004/09/21 15:48:42+02:00 petero2@telia.com +1 -1
#   input: Add ALPS touchpad driver, driver by Neil Brown, Peter Osterlund
#          and Dmitry Torokhov, some fixes by Vojtech Pavlik.
#   
#   Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
#   Patch-by: Peter Osterlund <petero2@telia.com>
# 
# ChangeSet
#   2004/09/21 15:27:54+02:00 pmaydell@chiark.greenend.org.uk 
#   input: Add support for Kensington ThinkingMouse PS/2 protocol.
#   
#   Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
#   Patch-by: Peter Maydell <pmaydell@chiark.greenend.org.uk>
# 
# drivers/input/mouse/psmouse.h
#   2004/09/21 15:27:48+02:00 pmaydell@chiark.greenend.org.uk +11 -7
#   input: Add support for Kensington ThinkingMouse PS/2 protocol.
#   
#   Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
#   Patch-by: Peter Maydell <pmaydell@chiark.greenend.org.uk>
# 
# drivers/input/mouse/psmouse-base.c
#   2004/09/21 15:27:48+02:00 pmaydell@chiark.greenend.org.uk +50 -5
#   input: Add support for Kensington ThinkingMouse PS/2 protocol.
#   
#   Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
#   Patch-by: Peter Maydell <pmaydell@chiark.greenend.org.uk>
# 
# ChangeSet
#   2004/09/21 10:04:06+02:00 vojtech@suse.cz 
#   input: Some HID devices have problems returning the HID class descriptor.
#          Try a few times before giving up.
#   
#   Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
# 
# drivers/usb/input/hid-core.c
#   2004/09/21 10:04:00+02:00 vojtech@suse.cz +8 -3
#   input: Some HID devices have problems returning the HID class descriptor.
#          Try a few times before giving up.
#   
#   Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
# 
# ChangeSet
#   2004/09/21 09:24:21+02:00 pnelson@suse.cz 
#   input: Fix oops in gamecon
#   
#   Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
#   Patch-by: Peter Nelson <pnelson@andrew.cmu.edu>
# 
# drivers/input/joystick/gamecon.c
#   2004/09/21 09:24:14+02:00 pnelson@suse.cz +3 -3
#   input: Fix oops in gamecon
#   
#   Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
#   Patch-by: Peter Nelson <pnelson@andrew.cmu.edu>
# 
# ChangeSet
#   2004/09/20 18:37:18-04:00 jgarzik@pobox.com 
#   Hand-merge upstream r8169 DAC changes.
# 
# drivers/net/r8169.c
#   2004/09/20 18:37:11-04:00 jgarzik@pobox.com +0 -14
#   Hand-merge upstream r8169 DAC changes.
# 
# drivers/net/Kconfig
#   2004/09/20 18:35:32-04:00 jgarzik@pobox.com +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/09/20 14:06:35-04:00 romieu@fr.zoreil.com 
#   [PATCH] r8169: default on disabling PCIDAC
#   
#   Default to disabling PCI DAC as this option appears unsafe on amd64
#   (original suggestion by Hans-Frieder Vogt <hfvogt@arcor.de>).
#   
#   The driver will typically report PCI System error when something goes
#   wrong. The relevant interrupt is not masked any more and the driver
#   can thus be disabled.
#   
#   Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
# 
# drivers/net/r8169.c
#   2004/09/19 18:16:02-04:00 romieu@fr.zoreil.com +15 -2
#   r8169: default on disabling PCIDAC
# 
# ChangeSet
#   2004/09/19 13:46:50+02:00 olh@suse.de 
#   input: Joydump depends on gameport
#   
#   Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
#   Patch-by: Olaf Hering <olh@suse.de>
# 
# drivers/input/joystick/Kconfig
#   2004/09/19 13:46:33+02:00 olh@suse.de +1 -1
#   input: Joydump depends on gameport
#   
#   Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
#   Patch-by: Olaf Hering <olh@suse.de>
# 
# ChangeSet
#   2004/09/17 12:17:15-04:00 jgarzik@pobox.com 
#   [netdrvr eepro100] fix pci_iomap() args and info msg that follows
# 
# drivers/net/eepro100.c
#   2004/09/17 12:17:09-04:00 jgarzik@pobox.com +6 -6
#   [netdrvr eepro100] fix pci_iomap() args and info msg that follows
# 
# ChangeSet
#   2004/09/16 20:34:40-04:00 romieu@fr.zoreil.com 
#   [PATCH] r8169: Mac identifier extracted from Realtek's driver v2.2
#   
#   Mac identifier extracted from Realtek's driver v2.2.
#   
#   Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
# 
# drivers/net/r8169.c
#   2004/09/08 17:31:09-04:00 romieu@fr.zoreil.com +3 -1
#   r8169: Mac identifier extracted from Realtek's driver v2.2
# 
# ChangeSet
#   2004/09/16 20:34:28-04:00 romieu@fr.zoreil.com 
#   [PATCH] r8169: TSO support.
#   
#   TSO support. Suggestion of Jeff Garzik.
#   
#   Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
# 
# drivers/net/r8169.c
#   2004/09/08 16:53:47-04:00 romieu@fr.zoreil.com +14 -3
#   r8169: TSO support.
# 
# ChangeSet
#   2004/09/16 20:34:16-04:00 romieu@fr.zoreil.com 
#   [PATCH] r8169: hint for Tx flow control
#   
#   return 1 in start_xmit() when the required descriptors are not available
#   and wait for more room.
#   
#   Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
# 
# drivers/net/r8169.c
#   2004/09/08 16:04:04-04:00 romieu@fr.zoreil.com +7 -5
#   r8169: hint for Tx flow control
# 
# ChangeSet
#   2004/09/16 20:34:04-04:00 romieu@fr.zoreil.com 
#   [PATCH] r8169: miscalculation of available Tx descriptors
#   
#   The count of available entries in the Tx descriptors ring is badly wrong.
#   
#   Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
# 
# drivers/net/r8169.c
#   2004/09/08 16:02:35-04:00 romieu@fr.zoreil.com +9 -5
#   r8169: miscalculation of available Tx descriptors
# 
# ChangeSet
#   2004/09/16 20:27:36-04:00 jgarzik@pobox.com 
#   Merge pobox.com:/spare/repo/linux-2.6
#   into pobox.com:/spare/repo/netdev-2.6/r8169
# 
# drivers/net/Kconfig
#   2004/09/16 20:27:32-04:00 jgarzik@pobox.com +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/09/16 20:13:40-04:00 davem@davemloft.net 
#   [PATCH] eepro100.c iomap conversion
# 
# drivers/net/eepro100.c
#   2004/09/16 19:48:12-04:00 davem@davemloft.net +129 -162
#   RFC eepro100.c conversion
# 
# drivers/net/Kconfig
#   2004/09/16 19:46:57-04:00 davem@davemloft.net +0 -10
#   RFC eepro100.c conversion
# 
# ChangeSet
#   2004/08/31 03:18:42-04:00 jgarzik@pobox.com 
#   Hand-merge upstream r8169 change.
# 
# drivers/net/r8169.c
#   2004/08/31 03:18:36-04:00 jgarzik@pobox.com +1 -2
#   Hand-merge upstream r8169 change.
# 
# ChangeSet
#   2004/08/28 19:20:27-04:00 romieu@fr.zoreil.com 
#   [PATCH] r8169: vlan support
#   
#   802.1Q support.
#   Mostly stolen from the 8139cp.c driver. The relevant registers and
#   descriptors bits are identical for both chipsets.
#   
#   Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
# 
# drivers/net/r8169.c
#   2004/08/23 17:31:33-04:00 romieu@fr.zoreil.com +94 -2
#   r8169: vlan support
# 
# drivers/net/Kconfig
#   2004/08/23 17:31:33-04:00 romieu@fr.zoreil.com +9 -0
#   r8169: vlan support
# 
# ChangeSet
#   2004/08/28 19:20:17-04:00 romieu@fr.zoreil.com 
#   [PATCH] r8169: Rx checksum support
#   
#   Rx IP checksumming support.
#   
#   Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
# 
# drivers/net/r8169.c
#   2004/08/23 17:30:08-04:00 romieu@fr.zoreil.com +58 -1
#   r8169: Rx checksum support
# 
# ChangeSet
#   2004/08/28 19:20:06-04:00 romieu@fr.zoreil.com 
#   [PATCH] r8169: advertise DMA to high memory
#   
#   Advertise the ability to DMA to high memory.
#   
#   Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
# 
# drivers/net/r8169.c
#   2004/08/23 17:30:06-04:00 romieu@fr.zoreil.com +3 -4
#   r8169: advertise DMA to high memory
# 
# ChangeSet
#   2004/08/28 19:19:56-04:00 romieu@fr.zoreil.com 
#   [PATCH] r8169: Tx checksum offload
#   
#   SG and IP checksumming support on output.
#   
#   Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
# 
# drivers/net/r8169.c
#   2004/08/23 17:30:04-04:00 romieu@fr.zoreil.com +153 -58
#   r8169: Tx checksum offload
# 
# ChangeSet
#   2004/08/28 19:19:45-04:00 romieu@fr.zoreil.com 
#   [PATCH] r8169: comment a gcc 2.95.x bug
#   
#   gcc 2.95.3 bug has been experienced on gcc 2.95.4.
#   
#   Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
# 
# drivers/net/r8169.c
#   2004/08/23 17:30:03-04:00 romieu@fr.zoreil.com +1 -1
#   r8169: comment a gcc 2.95.x bug
# 
# ChangeSet
#   2004/08/28 19:19:34-04:00 romieu@fr.zoreil.com 
#   [PATCH] r8169: sync the names of a few bits with the 8139cp driver
#   
#   Sync the names of the descriptor with these which are used in the 8139cp
#   driver. Though not exactly identical the descriptors are forward compatible.
#   
#   Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
# 
# drivers/net/r8169.c
#   2004/08/23 17:30:01-04:00 romieu@fr.zoreil.com +20 -20
#   r8169: sync the names of a few bits with the 8139cp driver
# 
# ChangeSet
#   2004/08/28 19:19:23-04:00 romieu@fr.zoreil.com 
#   [PATCH] r8169: bump version number
#   
#   Help reviewers realize that the in-kernel driver has evolved lately.
#   
#   Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
# 
# drivers/net/r8169.c
#   2004/08/23 17:30:00-04:00 romieu@fr.zoreil.com +10 -1
#   r8169: bump version number
# 
# ChangeSet
#   2004/08/28 19:19:13-04:00 romieu@fr.zoreil.com 
#   [PATCH] r8169: enable MWI
#   
#   - enable Memory Write and Invalidate (disabled after reset);
#   - fix wrong goto.
#   
#   Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
# 
# drivers/net/r8169.c
#   2004/08/23 17:30:00-04:00 romieu@fr.zoreil.com +11 -6
#   r8169: enable MWI
# 
# ChangeSet
#   2004/08/28 19:19:03-04:00 romieu@fr.zoreil.com 
#   [PATCH] r8169: code cleanup
#   
#   Cleanup/code removal:
#   - MAX_ETH_FRAME_SIZE is not used;
#   - removal of assertion for impossible condition (if it happens, it will _not_
#     take long to notice anyway)
#   - introduce rtl8169_release_board() to factor out some code;
#   - rtl8169_init_board:
#     - some variables are not really needed nor do they help read the code;
#     - more explicit name for label;
#   - tp->{Rx/Tx}DescArray: no need to zeroize coherent DMA mapping.
#   
#   Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
# 
# drivers/net/r8169.c
#   2004/08/23 17:29:59-04:00 romieu@fr.zoreil.com +26 -38
#   r8169: code cleanup
# 
# ChangeSet
#   2004/08/28 19:18:52-04:00 romieu@fr.zoreil.com 
#   [PATCH] r8169: per device receive buffer size
#   
#   Turn the Rx receive buffer size into a per device variable.
#   
#   Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
# 
# drivers/net/r8169.c
#   2004/08/23 17:29:59-04:00 romieu@fr.zoreil.com +28 -23
#   r8169: per device receive buffer size
# 
# ChangeSet
#   2004/08/28 19:18:40-04:00 romieu@fr.zoreil.com 
#   [PATCH] r8169: add ethtool_ops.{get_regs_len/get_regs}
#   
#   - ethtool_ops.{get_regs_len/get_regs} for r8169;
#   - fix a dubious check: datasheet v1.21 claims on p.44 that io/memory space
#     is exactly 256 bytes wide;
#   - use SET_ETHTOOL_OPS().
#   
#   Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
# 
# drivers/net/r8169.c
#   2004/08/23 17:29:58-04:00 romieu@fr.zoreil.com +23 -3
#   r8169: add ethtool_ops.{get_regs_len/get_regs}
# 
diff -Nru a/CREDITS b/CREDITS
--- a/CREDITS	2005-01-10 20:11:21 -08:00
+++ b/CREDITS	2005-01-10 20:11:21 -08:00
@@ -1893,7 +1893,7 @@
 D: Bug fixes
 
 N: Paul Laufer
-E: pelaufer@csupomona.edu
+E: paul@laufernet.com
 D: Soundblaster driver fixes, ISAPnP quirk
 S: California, USA
 
@@ -2021,6 +2021,15 @@
 E: hjl@gnu.ai.mit.edu
 D: GCC + libraries hacker
 
+N: Michal Ludvig
+E: michal@logix.cz
+W: http://www.logix.cz/michal
+P: 1024D/C45B2218 1162 6471 D391 76E0 9F99  29DA 0C3A 2509 C45B 2218
+D: VIA PadLock driver
+D: Netfilter pkttype module
+S: Prague 4
+S: Czech Republic
+
 N: Tuomas J. Lukka
 E: Tuomas.Lukka@Helsinki.FI
 D: Original dual-monitor patches
@@ -3569,7 +3578,6 @@
 
 N: David Woodhouse
 E: dwmw2@infradead.org
-E: dwmw2@redhat.com
 D: ARCnet stuff, Applicom board driver, SO_BINDTODEVICE,
 D: some Alpha platform porting from 2.0, Memory Technology Devices,
 D: Acquire watchdog timer, PC speaker driver maintenance,
diff -Nru a/Documentation/00-INDEX b/Documentation/00-INDEX
--- a/Documentation/00-INDEX	2005-01-10 20:11:17 -08:00
+++ b/Documentation/00-INDEX	2005-01-10 20:11:17 -08:00
@@ -40,8 +40,6 @@
 	- directory with info on RCU (read-copy update).
 README.DAC960
 	- info on Mylex DAC960/DAC1100 PCI RAID Controller Driver for Linux.
-README.moxa
-	- release notes for Moxa mutiport serial card.
 SAK.txt
 	- info on Secure Attention Keys.
 SubmittingDrivers
@@ -174,8 +172,6 @@
 	- info on typical Linux memory problems.
 mips/
 	- directory with info about Linux on MIPS architecture.
-mkdev.cciss
-	- script to make /dev entries for SMART controllers (see cciss.txt).
 mono.txt
 	- how to execute Mono-based .NET binaries with the help of BINFMT_MISC.
 moxa-smartio
diff -Nru a/Documentation/Changes b/Documentation/Changes
--- a/Documentation/Changes	2005-01-10 20:11:22 -08:00
+++ b/Documentation/Changes	2005-01-10 20:11:22 -08:00
@@ -223,6 +223,11 @@
 version v0.99.0 or higher. Running old versions may cause problems
 with programs using shared memory.
 
+udev
+----
+udev is a userspace application for populating /dev dynamically with
+only entries for devices actually present. udev replaces devfs.
+
 Networking
 ==========
 
@@ -368,6 +373,10 @@
 ----------
 o  <http://powertweak.sourceforge.net/>
 
+udev
+----
+o <http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html>
+
 Networking
 **********
 
@@ -398,5 +407,4 @@
 NFS-Utils
 ---------
 o  <http://nfs.sourceforge.net/>
-
 
diff -Nru a/Documentation/DocBook/kernel-api.tmpl b/Documentation/DocBook/kernel-api.tmpl
--- a/Documentation/DocBook/kernel-api.tmpl	2005-01-10 20:11:15 -08:00
+++ b/Documentation/DocBook/kernel-api.tmpl	2005-01-10 20:11:15 -08:00
@@ -105,6 +105,15 @@
      </sect1>
   </chapter>
 
+  <chapter id="debugfs">
+     <title>The debugfs filesystem</title>
+ 
+     <sect1><title>debugfs interface</title>
+!Efs/debugfs/inode.c
+!Efs/debugfs/file.c
+     </sect1>
+  </chapter>
+
   <chapter id="vfs">
      <title>The Linux VFS</title>
      <sect1><title>The Directory Cache</title>
diff -Nru a/Documentation/README.cycladesZ b/Documentation/README.cycladesZ
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/Documentation/README.cycladesZ	2005-01-10 20:11:19 -08:00
@@ -0,0 +1,8 @@
+
+The Cyclades-Z must have firmware loaded onto the card before it will
+operate.  This operation should be performed during system startup,
+
+The firmware, loader program and the latest device driver code are
+available from Cyclades at
+    ftp://ftp.cyclades.com/pub/cyclades/cyclades-z/linux/
+
diff -Nru a/Documentation/README.moxa b/Documentation/README.moxa
--- a/Documentation/README.moxa	2005-01-10 20:11:16 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,18 +0,0 @@
- ===================================================================	
- Release Note of Linux Driver for Moxa's C104/C168/CI-104J
- ===================================================================	
-
- -------------------------------------------------------------------
- Ver. 1.1  				               Sep.  1, 1999
- -------------------------------------------------------------------
- 1. Improved:
-   a. Static driver (kernel) and dynamic driver (loadable module) 
-      modes are supported.
-   b. Multiple Smartio PCI series boards sharing the same IRQ 
-      supported.
-
- -------------------------------------------------------------------
- Ver. 1.0  				               Feb  17, 1997
- -------------------------------------------------------------------
- 1. Newly release.
-
diff -Nru a/Documentation/SAK.txt b/Documentation/SAK.txt
--- a/Documentation/SAK.txt	2005-01-10 20:11:19 -08:00
+++ b/Documentation/SAK.txt	2005-01-10 20:11:19 -08:00
@@ -1,5 +1,5 @@
 Linux 2.4.2 Secure Attention Key (SAK) handling
-18 March 2001, Andrew Morton <andrewm@uow.edu.au>
+18 March 2001, Andrew Morton <akpm@osdl.org>
 
 An operating system's Secure Attention Key is a security tool which is
 provided as protection against trojan password capturing programs.  It
@@ -44,7 +44,7 @@
    /dev/console opened.
 
    Unfortunately this includes a number of things which you don't
-   actually want killed.  This is because these appliccaitons are
+   actually want killed.  This is because these applications are
    incorrectly holding /dev/console open.  Be sure to complain to your
    Linux distributor about this!
 
diff -Nru a/Documentation/aoe/aoe.txt b/Documentation/aoe/aoe.txt
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/Documentation/aoe/aoe.txt	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,75 @@
+The EtherDrive (R) HOWTO for users of 2.6 kernels is found at ...
+
+  http://www.coraid.com/support/linux/EtherDrive-2.6-HOWTO.html
+
+  It has many tips and hints!
+
+CREATING DEVICE NODES
+
+  Users of udev should find device nodes created automatically.  Two
+  scripts are provided in Documentation/aoe as examples of static
+  device node creation for using the aoe driver.
+
+    rm -rf /dev/etherd
+    sh Documentation/aoe/mkdevs.sh /dev/etherd
+
+  ... or to make just one shelf's worth of block device nodes ...
+
+    sh Documentation/aoe/mkshelf.sh /dev/etherd 0
+
+  There is also an autoload script that shows how to edit
+  /etc/modprobe.conf to ensure that the aoe module is loaded when
+  necessary.
+
+USING DEVICE NODES
+
+  "cat /dev/etherd/err" blocks, waiting for error diagnostic output,
+  like any retransmitted packets.
+
+  "echo eth2 eth4 > /dev/etherd/interfaces" tells the aoe driver to
+  limit ATA over Ethernet traffic to eth2 and eth4.  AoE traffic from
+  untrusted networks should be ignored as a matter of security.
+
+  "echo > /dev/etherd/discover" tells the driver to find out what AoE
+  devices are available.
+
+  The block devices are named like this:
+
+	e{shelf}.{slot}
+	e{shelf}.{slot}p{part}
+
+  ... so that "e0.2" is the third blade from the left (slot 2) in the
+  first shelf (shelf address zero).  That's the whole disk.  The first
+  partition on that disk would be "e0.2p1".
+
+USING SYSFS
+
+  Each aoe block device in /sys/block has the extra attributes of
+  state, mac, and netif.  The state attribute is "up" when the device
+  is ready for I/O and "down" if detected but unusable.  The
+  "down,closewait" state shows that the device is still open and
+  cannot come up again until it has been closed.
+
+  The mac attribute is the ethernet address of the remote AoE device.
+  The netif attribute is the network interface on the localhost
+  through which we are communicating with the remote AoE device.
+
+  There is a script in this directory that formats this information
+  in a convenient way.
+
+  root@makki linux# sh Documentation/aoe/status.sh 
+    device                 mac       netif           state
+      e6.0        0010040010c6        eth0              up
+      e6.1        001004001067        eth0              up
+      e6.2        001004001068        eth0              up
+      e6.3        001004001065        eth0              up
+      e6.4        001004001066        eth0              up
+      e6.5        0010040010c7        eth0              up
+      e6.6        0010040010c8        eth0              up
+      e6.7        0010040010c9        eth0              up
+      e6.8        0010040010ca        eth0              up
+      e6.9        0010040010cb        eth0              up
+      e9.0        001004000020        eth1              up
+      e9.5        001004000025        eth1              up
+      e9.9        001004000029        eth1              up
+
diff -Nru a/Documentation/aoe/autoload.sh b/Documentation/aoe/autoload.sh
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/Documentation/aoe/autoload.sh	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,17 @@
+#!/bin/sh
+# set aoe to autoload by installing the
+# aliases in /etc/modprobe.conf
+
+f=/etc/modprobe.conf
+
+if test ! -r $f || test ! -w $f; then
+	echo "cannot configure $f for module autoloading" 1>&2
+	exit 1
+fi
+
+grep major-152 $f >/dev/null
+if [ $? = 1 ]; then
+	echo alias block-major-152 aoe >> $f
+	echo alias char-major-152 aoe >> $f
+fi
+
diff -Nru a/Documentation/aoe/mkdevs.sh b/Documentation/aoe/mkdevs.sh
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/Documentation/aoe/mkdevs.sh	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+n_shelves=10
+
+if test "$#" != "1"; then
+	echo "Usage: sh mkdevs.sh {dir}" 1>&2
+	exit 1
+fi
+dir=$1
+
+MAJOR=152
+
+echo "Creating AoE devnode files in $dir ..."
+
+set -e
+
+mkdir -p $dir
+
+# (Status info is in sysfs.  See status.sh.)
+# rm -f $dir/stat
+# mknod -m 0400 $dir/stat c $MAJOR 1
+rm -f $dir/err
+mknod -m 0400 $dir/err c $MAJOR 2
+rm -f $dir/discover
+mknod -m 0200 $dir/discover c $MAJOR 3
+rm -f $dir/interfaces
+mknod -m 0200 $dir/interfaces c $MAJOR 4
+
+i=0
+while test $i -lt $n_shelves; do
+	sh -xc "sh `dirname $0`/mkshelf.sh $dir $i"
+	i=`expr $i + 1`
+done
diff -Nru a/Documentation/aoe/mkshelf.sh b/Documentation/aoe/mkshelf.sh
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/Documentation/aoe/mkshelf.sh	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,23 @@
+#! /bin/sh
+
+if test "$#" != "2"; then
+	echo "Usage: sh mkshelf.sh {dir} {shelfaddress}" 1>&2
+	exit 1
+fi
+dir=$1
+shelf=$2
+MAJOR=152
+
+set -e
+
+minor=`echo 10 \* $shelf \* 16 | bc`
+for slot in `seq 0 9`; do
+	for part in `seq 0 15`; do
+		name=e$shelf.$slot
+		test "$part" != "0" && name=${name}p$part
+		rm -f $dir/$name
+		mknod -m 0660 $dir/$name b $MAJOR $minor
+
+		minor=`expr $minor + 1`
+	done
+done
diff -Nru a/Documentation/aoe/status.sh b/Documentation/aoe/status.sh
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/Documentation/aoe/status.sh	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,15 @@
+# collate and present sysfs information about AoE storage
+
+set -e
+format="%8s\t%12s\t%8s\t%8s\n"
+
+printf "$format" device mac netif state
+
+for d in `ls -d /sys/block/etherd* | grep -v p`; do
+	dev=`echo "$d" | sed 's/.*!//'`
+	printf "$format" \
+		"$dev" \
+		"`cat \"$d/mac\"`" \
+		"`cat \"$d/netif\"`" \
+		"`cat \"$d/state\"`"
+done | sort
diff -Nru a/Documentation/arm/IXP4xx b/Documentation/arm/IXP4xx
--- a/Documentation/arm/IXP4xx	2005-01-10 20:11:16 -08:00
+++ b/Documentation/arm/IXP4xx	2005-01-10 20:11:16 -08:00
@@ -12,8 +12,11 @@
 in industrial control and other areas due to low cost and power
 consumption. The IXP4xx family currently consists of several processors
 that support different network offload functions such as encryption,
-routing, firewalling, etc. For more information on the various
-versions of the CPU, see:
+routing, firewalling, etc. The IXP46x family is an updated version which
+supports faster speeds, new memory and flash configurations, and more
+integration such as an on-chip I2C controller.
+
+For more information on the various versions of the CPU, see:
 
    http://developer.intel.com/design/network/products/npfamily/ixp4xx.htm
 
@@ -27,7 +30,7 @@
 - Dual serial ports
 - PCI interface
 - Flash access (MTD/JFFS)
-- I2C through GPIO
+- I2C through GPIO on IXP42x
 - GPIO for input/output/interrupts 
   See include/asm-arm/arch-ixp4xx/platform.h for access functions.
 - Timers (watchdog, OS)
@@ -122,6 +125,12 @@
    also known as the Richfield board. It contains 4 PCI slots, 16MB
    of flash, two 10/100 ports and one ADSL port.
 
+Intel IXDP465 Development Platform
+http://developer.intel.com/design/network/products/npfamily/ixdp465.htm
+
+   This is basically an IXDP425 with an IXP465 and 32M of flash instead
+   of just 16.
+
 Intel IXDPG425 Development Platform
 
    This is basically and ADI Coyote board with a NEC EHCI controller
@@ -154,6 +163,7 @@
 
 The following people have contributed patches/comments/etc:
 
+Lennerty Buytenhek
 Lutz Jaenicke
 Justin Mayfield
 Robert E. Ranslam
@@ -161,4 +171,4 @@
 
 -------------------------------------------------------------------------
 
-Last Update: 11/16/2004
+Last Update: 01/04/2005
diff -Nru a/Documentation/cciss.txt b/Documentation/cciss.txt
--- a/Documentation/cciss.txt	2005-01-10 20:11:16 -08:00
+++ b/Documentation/cciss.txt	2005-01-10 20:11:16 -08:00
@@ -17,25 +17,27 @@
 	* SA 6422
 	* SA V100
 
-If nodes are not already created in the /dev/cciss directory
+If nodes are not already created in the /dev/cciss directory, run as root:
 
-# mkdev.cciss [ctlrs]
-
-Where ctlrs is the number of controllers you have (defaults to 1 if not
-specified).
+# cd /dev
+# ./MAKEDEV cciss
 
 Device Naming:
 --------------
 
-You need some entries in /dev for the cciss device.  The mkdev.cciss script
+You need some entries in /dev for the cciss device.  The MAKEDEV script
 can make device nodes for you automatically.  Currently the device setup
 is as follows:
 
 Major numbers:
 	104	cciss0	
 	105	cciss1	
-	106	cciss2 
-	etc...
+	106	cciss2
+	105	cciss3
+	108	cciss4
+	109	cciss5
+	110	cciss6
+	111	cciss7
 
 Minor numbers:
         b7 b6 b5 b4 b3 b2 b1 b0
@@ -45,7 +47,7 @@
              |
              +-------------------- Logical Volume number
 
-The suggested device naming scheme is:
+The device naming scheme is:
 /dev/cciss/c0d0			Controller 0, disk 0, whole device
 /dev/cciss/c0d0p1		Controller 0, disk 0, partition 1
 /dev/cciss/c0d0p2		Controller 0, disk 0, partition 2
@@ -117,16 +119,13 @@
 
 Note that the naming convention of the /proc filesystem entries 
 contains a number in addition to the driver name.  (E.g. "cciss0" 
-instead of just "cciss" which you might expect.)   This is because 
-of changes to the 2.4 kernel PCI interface related to PCI hot plug
-that imply the driver must register with the SCSI mid layer once per
-adapter instance rather than once per driver.
+instead of just "cciss" which you might expect.)
 
 Note: ONLY sequential access devices and medium changers are presented 
 as SCSI devices to the SCSI mid layer by the cciss driver.  Specifically, 
 physical SCSI disk drives are NOT presented to the SCSI mid layer.  The 
 physical SCSI disk drives are controlled directly by the array controller 
-hardware and it is important to prevent the OS from attempting to directly 
+hardware and it is important to prevent the kernel from attempting to directly
 access these devices too, as if the array controller were merely a SCSI 
 controller in the same way that we are allowing it to access SCSI tape drives.
 
diff -Nru a/Documentation/early-userspace/README b/Documentation/early-userspace/README
--- a/Documentation/early-userspace/README	2005-01-10 20:11:17 -08:00
+++ b/Documentation/early-userspace/README	2005-01-10 20:11:17 -08:00
@@ -1,7 +1,7 @@
 Early userspace support
 =======================
 
-Last update: 2003-08-21
+Last update: 2004-12-20 tlh
 
 
 "Early userspace" is a set of libraries and programs that provide
@@ -17,15 +17,66 @@
 - initramfs, a chunk of code that unpacks the compressed cpio image
   midway through the kernel boot process.
 - klibc, a userspace C library, currently packaged separately, that is
-  optimised for correctness and small size.
+  optimized for correctness and small size.
 
 The cpio file format used by initramfs is the "newc" (aka "cpio -c")
-format, and is documented in the file "buffer-format.txt".  If you
-want to generate your own cpio files directly instead of hacking on
-gen_init_cpio, you will need to short-circuit the build process in
-usr/ so that gen_init_cpio does not get run, then simply pop your own
-initramfs_data.cpio.gz file into place.
+format, and is documented in the file "buffer-format.txt".  There are
+two ways to add an early userspace image: specify an existing cpio
+archive to be used as the image or have the kernel build process build
+the image from specifications.
+
+CPIO ARCHIVE method
+
+You can create a cpio archive that contains the early userspace image.
+Youre cpio archive should be specified in CONFIG_INITRAMFS_SOURCE and it
+will be used directly.  Only a single cpio file may be specified in
+CONFIG_INITRAMFS_SOURCE and directory and file names are not allowed in
+combination with a cpio archive.
+
+IMAGE BUILDING method
+
+The kernel build process can also build an early userspace image from
+source parts rather than supplying a cpio archive.  This method provides
+a way to create images with root-owned files even though the image was
+built by an unprivileged user.
+
+The image is specified as one or more sources in
+CONFIG_INITRAMFS_SOURCE.  Sources can be either directories or files -
+cpio archives are *not* allowed when building from sources.
+
+A source directory will have it and all of it's contents packaged.  The
+specified directory name will be mapped to '/'.  When packaging a
+directory, limited user and group ID translation can be performed.
+INITRAMFS_ROOT_UID can be set to a user ID that needs to be mapped to
+user root (0).  INITRAMFS_ROOT_GID can be set to a group ID that needs
+to be mapped to group root (0).
+
+A source file must be directives in the format required by the
+usr/gen_init_cpio utility (run 'usr/gen_init_cpio --help' to get the
+file format).  The directives in the file will be passed directly to
+usr/gen_init_cpio.
+
+When a combination of directories and files are specified then the
+initramfs image will be an aggregate of all of them.  In this way a user
+can create a 'root-image' directory and install all files into it.
+Because device-special files cannot be created by a unprivileged user,
+special files can be listed in a 'root-files' file.  Both 'root-image'
+and 'root-files' can be listed in CONFIG_INITRAMFS_SOURCE and a complete
+early userspace image can be built by an unprivileged user.
+
+As a technical note, when directories and files are specified, the
+entire CONFIG_INITRAMFS_SOURCE is passed to
+scripts/gen_initramfs_list.sh.  This means that CONFIG_INITRAMFS_SOURCE
+can really be interpreted as any legal argument to
+gen_initramfs_list.sh.  If a directory is specified as an argument then
+the contents are scanned, uid/gid translation is performed, and
+usr/gen_init_cpio file directives are output.  If a directory is
+specified as an arugemnt to scripts/gen_initramfs_list.sh then the
+contents of the file are simply copied to the output.  All of the output
+directives from directory scanning and file contents copying are
+processed by usr/gen_init_cpio.
 
+See also 'scripts/gen_initramfs_list.sh -h'.
 
 Where's this all leading?
 =========================
diff -Nru a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/Documentation/feature-removal-schedule.txt	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,26 @@
+The following is a list of files and features that are going to be
+removed in the kernel source tree.  Every entry should contain what
+exactly is going away, why it is happening, and who is going to be doing
+the work.  When the feature is removed from the kernel, it should also
+be removed from this file.
+
+---------------------------
+
+What:	devfs
+When:	July 2005
+Files:	fs/devfs/*, include/linux/devfs_fs*.h and assorted devfs
+	function calls throughout the kernel tree
+Why:	It has been unmaintained for a number of years, has unfixable
+	races, contains a naming policy within the kernel that is
+	against the LSB, and can be replaced by using udev.
+Who:	Greg Kroah-Hartman <greg@kroah.com>
+
+---------------------------
+
+What:	/proc/sys/cpu and the sysctl interface to cpufreq (2.4.x interfaces)
+When:	January 2005
+Files:	drivers/cpufreq/: cpufreq_userspace.c, proc_intf.c
+	function calls throughout the kernel tree
+Why:	Deprecated, has been replaced/superseded by (what?)....
+Who:	Dominik Brodowski <linux@brodo.de>
+
diff -Nru a/Documentation/filesystems/sysfs-pci.txt b/Documentation/filesystems/sysfs-pci.txt
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/Documentation/filesystems/sysfs-pci.txt	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,88 @@
+Accessing PCI device resources through sysfs
+
+sysfs, usually mounted at /sys, provides access to PCI resources on platforms
+that support it.  For example, a given bus might look like this:
+
+     /sys/devices/pci0000:17
+     |-- 0000:17:00.0
+     |   |-- class
+     |   |-- config
+     |   |-- detach_state
+     |   |-- device
+     |   |-- irq
+     |   |-- local_cpus
+     |   |-- resource
+     |   |-- resource0
+     |   |-- resource1
+     |   |-- resource2
+     |   |-- rom
+     |   |-- subsystem_device
+     |   |-- subsystem_vendor
+     |   `-- vendor
+     `-- detach_state
+
+The topmost element describes the PCI domain and bus number.  In this case,
+the domain number is 0000 and the bus number is 17 (both values are in hex).
+This bus contains a single function device in slot 0.  The domain and bus
+numbers are reproduced for convenience.  Under the device directory are several
+files, each with their own function.
+
+       file		   function
+       ----		   --------
+       class		   PCI class (ascii, ro)
+       config		   PCI config space (binary, rw)
+       detach_state	   connection status (bool, rw)
+       device		   PCI device (ascii, ro)
+       irq		   IRQ number (ascii, ro)
+       local_cpus	   nearby CPU mask (cpumask, ro)
+       resource		   PCI resource host addresses (ascii, ro)
+       resource0..N	   PCI resource N, if present (binary, mmap)
+       rom		   PCI ROM resource, if present (binary, ro)
+       subsystem_device	   PCI subsystem device (ascii, ro)
+       subsystem_vendor	   PCI subsystem vendor (ascii, ro)
+       vendor		   PCI vendor (ascii, ro)
+
+  ro - read only file
+  rw - file is readable and writable
+  mmap - file is mmapable
+  ascii - file contains ascii text
+  binary - file contains binary data
+  cpumask - file contains a cpumask type
+
+The read only files are informational, writes to them will be ignored.
+Writable files can be used to perform actions on the device (e.g. changing
+config space, detaching a device).  mmapable files are available via an
+mmap of the file at offset 0 and can be used to do actual device programming
+from userspace.  Note that some platforms don't support mmapping of certain
+resources, so be sure to check the return value from any attempted mmap.
+
+Accessing legacy resources through sysfs
+
+Legacy I/O port and ISA memory resources are also provided in sysfs if the
+underlying platform supports them.  They're located in the PCI class heirarchy,
+e.g.
+
+	/sys/class/pci_bus/0000:17/
+	|-- bridge -> ../../../devices/pci0000:17
+	|-- cpuaffinity
+	|-- legacy_io
+	`-- legacy_mem
+
+The legacy_io file is a read/write file that can be used by applications to
+do legacy port I/O.  The application should open the file, seek to the desired
+port (e.g. 0x3e8) and do a read or a write of 1, 2 or 4 bytes.  The legacy_mem
+file should be mmapped with an offset corresponding to the memory offset
+desired, e.g. 0xa0000 for the VGA frame buffer.  The application can then
+simply dereference the returned pointer (after checking for errors of course)
+to access legacy memory space.
+
+Supporting PCI access on new platforms
+
+In order to support PCI resource mapping as described above, Linux platform
+code must define HAVE_PCI_MMAP and provide a pci_mmap_page_range function.
+Platforms are free to only support subsets of the mmap functionality, but
+useful return codes should be provided.
+
+Legacy resources are protected by the HAVE_PCI_LEGACY define.  Platforms
+wishing to support legacy functionality should define it and provide
+pci_legacy_read, pci_legacy_write and pci_mmap_legacy_page_range functions.
\ No newline at end of file
diff -Nru a/Documentation/fujitsu/frv/README.txt b/Documentation/fujitsu/frv/README.txt
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/Documentation/fujitsu/frv/README.txt	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,51 @@
+		       ================================
+		       Fujitsu FR-V LINUX DOCUMENTATION
+		       ================================
+
+This directory contains documentation for the Fujitsu FR-V CPU architecture
+port of Linux.
+
+The following documents are available:
+
+ (*) features.txt
+
+     A description of the basic features inherent in this architecture port.
+
+
+ (*) configuring.txt
+
+     A summary of the configuration options particular to this architecture.
+
+
+ (*) booting.txt
+
+     A description of how to boot the kernel image and a summary of the kernel
+     command line options.
+
+
+ (*) gdbstub.txt
+
+     A description of how to debug the kernel using GDB attached by serial
+     port, and a summary of the services available.
+
+
+ (*) mmu-layout.txt
+
+     A description of the virtual and physical memory layout used in the
+     MMU linux kernel, and the registers used to support it.
+
+
+ (*) gdbinit
+
+     An example .gdbinit file for use with GDB. It includes macros for viewing
+     MMU state on the FR451. See mmu-layout.txt for more information.
+
+
+ (*) clock.txt
+
+     A description of the CPU clock scaling interface.
+
+
+ (*) atomic-ops.txt
+
+     A description of how the FR-V kernel's atomic operations work.
diff -Nru a/Documentation/fujitsu/frv/atomic-ops.txt b/Documentation/fujitsu/frv/atomic-ops.txt
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/Documentation/fujitsu/frv/atomic-ops.txt	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,134 @@
+			       =====================================
+			       FUJITSU FR-V KERNEL ATOMIC OPERATIONS
+			       =====================================
+
+On the FR-V CPUs, there is only one atomic Read-Modify-Write operation: the SWAP/SWAPI
+instruction. Unfortunately, this alone can't be used to implement the following operations:
+
+ (*) Atomic add to memory
+
+ (*) Atomic subtract from memory
+
+ (*) Atomic bit modification (set, clear or invert)
+
+ (*) Atomic compare and exchange
+
+On such CPUs, the standard way of emulating such operations in uniprocessor mode is to disable
+interrupts, but on the FR-V CPUs, modifying the PSR takes a lot of clock cycles, and it has to be
+done twice. This means the CPU runs for a relatively long time with interrupts disabled,
+potentially having a great effect on interrupt latency.
+
+
+=============
+NEW ALGORITHM
+=============
+
+To get around this, the following algorithm has been implemented. It operates in a way similar to
+the LL/SC instruction pairs supported on a number of platforms.
+
+ (*) The CCCR.CC3 register is reserved within the kernel to act as an atomic modify abort flag.
+
+ (*) In the exception prologues run on kernel->kernel entry, CCCR.CC3 is set to 0 (Undefined
+     state).
+
+ (*) All atomic operations can then be broken down into the following algorithm:
+
+     (1) Set ICC3.Z to true and set CC3 to True (ORCC/CKEQ/ORCR).
+
+     (2) Load the value currently in the memory to be modified into a register.
+
+     (3) Make changes to the value.
+
+     (4) If CC3 is still True, simultaneously and atomically (by VLIW packing):
+
+	 (a) Store the modified value back to memory.
+
+	 (b) Set ICC3.Z to false (CORCC on GR29 is sufficient for this - GR29 holds the current
+	     task pointer in the kernel, and so is guaranteed to be non-zero).
+
+     (5) If ICC3.Z is still true, go back to step (1).
+
+This works in a non-SMP environment because any interrupt or other exception that happens between
+steps (1) and (4) will set CC3 to the Undefined, thus aborting the store in (4a), and causing the
+condition in ICC3 to remain with the Z flag set, thus causing step (5) to loop back to step (1).
+
+
+This algorithm suffers from two problems:
+
+ (1) The condition CCCR.CC3 is cleared unconditionally by an exception, irrespective of whether or
+     not any changes were made to the target memory location during that exception.
+
+ (2) The branch from step (5) back to step (1) may have to happen more than once until the store
+     manages to take place. In theory, this loop could cycle forever because there are too many
+     interrupts coming in, but it's unlikely.
+
+
+=======
+EXAMPLE
+=======
+
+Taking an example from include/asm-frv/atomic.h:
+
+	static inline int atomic_add_return(int i, atomic_t *v)
+	{
+		unsigned long val;
+
+		asm("0:						\n"
+
+It starts by setting ICC3.Z to true for later use, and also transforming that into CC3 being in the
+True state.
+
+		    "	orcc		gr0,gr0,gr0,icc3	\n"	<-- (1)
+		    "	ckeq		icc3,cc7		\n"	<-- (1)
+
+Then it does the load. Note that the final phase of step (1) is done at the same time as the
+load. The VLIW packing ensures they are done simultaneously. The ".p" on the load must not be
+removed without swapping the order of these two instructions.
+
+		    "	ld.p		%M0,%1			\n"	<-- (2)
+		    "	orcr		cc7,cc7,cc3		\n"	<-- (1)
+
+Then the proposed modification is generated. Note that the old value can be retained if required
+(such as in test_and_set_bit()).
+
+		    "	add%I2		%1,%2,%1		\n"	<-- (3)
+
+Then it attempts to store the value back, contingent on no exception having cleared CC3 since it
+was set to True.
+
+		    "	cst.p		%1,%M0		,cc3,#1	\n"	<-- (4a)
+
+It simultaneously records the success or failure of the store in ICC3.Z.
+
+		    "	corcc		gr29,gr29,gr0	,cc3,#1	\n"	<-- (4b)
+
+Such that the branch can then be taken if the operation was aborted.
+
+		    "	beq		icc3,#0,0b		\n"	<-- (5)
+		    : "+U"(v->counter), "=&r"(val)
+		    : "NPr"(i)
+		    : "memory", "cc7", "cc3", "icc3"
+		    );
+
+		return val;
+	}
+
+
+=============
+CONFIGURATION
+=============
+
+The atomic ops implementation can be made inline or out-of-line by changing the
+CONFIG_FRV_OUTOFLINE_ATOMIC_OPS configuration variable. Making it out-of-line has a number of
+advantages:
+
+ - The resulting kernel image may be smaller
+ - Debugging is easier as atomic ops can just be stepped over and they can be breakpointed
+
+Keeping it inline also has a number of advantages:
+
+ - The resulting kernel may be Faster
+   - no out-of-line function calls need to be made
+   - the compiler doesn't have half its registers clobbered by making a call
+
+The out-of-line implementations live in arch/frv/lib/atomic-ops.S.
diff -Nru a/Documentation/fujitsu/frv/booting.txt b/Documentation/fujitsu/frv/booting.txt
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/Documentation/fujitsu/frv/booting.txt	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,181 @@
+			  =========================
+			  BOOTING FR-V LINUX KERNEL
+			  =========================
+
+======================
+PROVIDING A FILESYSTEM
+======================
+
+First of all, a root filesystem must be made available. This can be done in
+one of two ways:
+
+  (1) NFS Export
+
+      A filesystem should be constructed in a directory on an NFS server that
+      the target board can reach. This directory should then be NFS exported
+      such that the target board can read and write into it as root.
+
+  (2) Flash Filesystem (JFFS2 Recommended)
+
+      In this case, the image must be stored or built up on flash before it
+      can be used. A complete image can be built using the mkfs.jffs2 or
+      similar program and then downloaded and stored into flash by RedBoot.
+
+
+========================
+LOADING THE KERNEL IMAGE
+========================
+
+The kernel will need to be loaded into RAM by RedBoot (or by some alternative
+boot loader) before it can be run. The kernel image (arch/frv/boot/Image) may
+be loaded in one of three ways:
+
+  (1) Load from Flash
+
+      This is the simplest. RedBoot can store an image in the flash (see the
+      RedBoot documentation) and then load it back into RAM. RedBoot keeps
+      track of the load address, entry point and size, so the command to do
+      this is simply:
+
+	fis load linux
+
+      The image is then ready to be executed.
+
+  (2) Load by TFTP
+
+      The following command will download a raw binary kernel image from the
+      default server (as negotiated by BOOTP) and store it into RAM:
+
+	load -b 0x00100000 -r /tftpboot/image.bin
+
+      The image is then ready to be executed.
+
+  (3) Load by Y-Modem
+
+      The following command will download a raw binary kernel image across the
+      serial port that RedBoot is currently using:
+
+	load -m ymodem -b 0x00100000 -r zImage
+
+      The serial client (such as minicom) must then be told to transmit the
+      program by Y-Modem.
+
+      When finished, the image will then be ready to be executed.
+
+
+==================
+BOOTING THE KERNEL
+==================
+
+Boot the image with the following RedBoot command:
+
+	exec -c "<CMDLINE>" 0x00100000
+
+For example:
+
+	exec -c "console=ttySM0,115200 ip=:::::dhcp root=/dev/mtdblock2 rw"
+
+This will start the kernel running. Note that if the GDB-stub is compiled in,
+then the kernel will immediately wait for GDB to connect over serial before
+doing anything else. See the section on kernel debugging with GDB.
+
+The kernel command line <CMDLINE> tells the kernel where its console is and
+how to find its root filesystem. This is made up of the following components,
+separated by spaces:
+
+  (*) console=ttyS<x>[,<baud>[<parity>[<bits>[<flow>]]]]
+
+      This specifies that the system console should output through on-chip
+      serial port <x> (which can be "0" or "1").
+
+      <baud> is a standard baud rate between 1200 and 115200 (default 9600).
+
+      <parity> is a parity setting of "N", "O", "E", "M" or "S" for None, Odd,
+      Even, Mark or Space. "None" is the default.
+
+      <stop> is "7" or "8" for the number of bits per character. "8" is the
+      default.
+
+      <flow> is "r" to use flow control (XCTS on serial port 2 only). The
+      default is to not use flow control.
+
+      For example:
+
+	console=ttyS0,115200
+
+      To use the first on-chip serial port at baud rate 115200, no parity, 8
+      bits, and no flow control.
+
+  (*) root=/dev/<xxxx>
+
+      This specifies the device upon which the root filesystem resides. For
+      example:
+
+	/dev/nfs	NFS root filesystem
+	/dev/mtdblock3	Fourth RedBoot partition on the System Flash
+
+  (*) rw
+
+      Start with the root filesystem mounted Read/Write.
+
+  The remaining components are all optional:
+
+  (*) ip=<ip>::::<host>:<iface>:<cfg>
+
+      Configure the network interface. If <cfg> is "off" then <ip> should
+      specify the IP address for the network device <iface>. <host> provide
+      the hostname for the device.
+
+      If <cfg> is "bootp" or "dhcp", then all of these parameters will be
+      discovered by consulting a BOOTP or DHCP server.
+
+      For example, the following might be used:
+
+	ip=192.168.73.12::::frv:eth0:off
+
+      This sets the IP address on the VDK motherboard RTL8029 ethernet chipset
+      (eth0) to be 192.168.73.12, and sets the board's hostname to be "frv".
+
+  (*) nfsroot=<server>:<dir>[,v<vers>]
+
+      This is mandatory if "root=/dev/nfs" is given as an option. It tells the
+      kernel the IP address of the NFS server providing its root filesystem,
+      and the pathname on that server of the filesystem.
+
+      The NFS version to use can also be specified. v2 and v3 are supported by
+      Linux.
+
+      For example:
+
+	nfsroot=192.168.73.1:/nfsroot-frv
+
+  (*) profile=1
+
+      Turns on the kernel profiler (accessible through /proc/profile).
+
+  (*) console=gdb0
+
+      This can be used as an alternative to the "console=ttyS..." listed
+      above. I tells the kernel to pass the console output to GDB if the
+      gdbstub is compiled in to the kernel.
+
+      If this is used, then the gdbstub passes the text to GDB, which then
+      simply dumps it to its standard output.
+
+  (*) mem=<xxx>M
+
+      Normally the kernel will work out how much SDRAM it has by reading the
+      SDRAM controller registers. That can be overridden with this
+      option. This allows the kernel to be told that it has <xxx> megabytes of
+      memory available.
+
+  (*) init=<prog> [<arg> [<arg> [<arg> ...]]]
+
+      This tells the kernel what program to run initially. By default this is
+      /sbin/init, but /sbin/sash or /bin/sh are common alternatives.
+
+  (*) vdc=...
+
+      This option configures the MB93493 companion chip visual display
+      driver. Please see Documentation/fujitsu/mb93493/vdc.txt for more
+      information.
diff -Nru a/Documentation/fujitsu/frv/clock.txt b/Documentation/fujitsu/frv/clock.txt
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/Documentation/fujitsu/frv/clock.txt	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,65 @@
+Clock scaling
+-------------
+
+The kernel supports scaling of CLCK.CMODE, CLCK.CM and CLKC.P0 clock
+registers. If built with CONFIG_PM and CONFIG_SYSCTL options enabled, four
+extra files will appear in the directory /proc/sys/pm/. Reading these files
+will show:
+
+      p0		-- current value of the P0 bit in CLKC register.
+      cm		-- current value of the CM bits in CLKC register.
+      cmode		-- current value of the CMODE bits in CLKC register.
+
+On all boards, the 'p0' file should also be writable, and either '1' or '0'
+can be rewritten, to set or clear the CLKC_P0 bit respectively, hence
+controlling whether the resource bus rate clock is halved.
+
+The 'cm' file should also be available on all boards. '0' can be written to it
+to shift the board into High-Speed mode (normal), and '1' can be written to
+shift the board into Medium-Speed mode. Selecting Low-Speed mode is not
+supported by this interface, even though some CPUs do support it.
+
+On the boards with FR405 CPU (i.e. CB60 and CB70), the 'cmode' file is also
+writable, allowing the CPU core speed (and other clock speeds) to be
+controlled from userspace.
+
+
+Determining current and possible settings
+-----------------------------------------
+
+The current state and the available masks can be found in /proc/cpuinfo. For
+example, on the CB70:
+
+	# cat /proc/cpuinfo
+	CPU-Series:     fr400
+	CPU-Core:       fr405, gr0-31, BE, CCCR
+	CPU:            mb93405
+	MMU:            Prot
+	FP-Media:       fr0-31, Media
+	System:         mb93091-cb70, mb93090-mb00
+	PM-Controls:    cmode=0xd31f, cm=0x3, p0=0x3, suspend=0x9
+	PM-Status:      cmode=3, cm=0, p0=0
+	Clock-In:       50.00 MHz
+	Clock-Core:     300.00 MHz
+	Clock-SDRAM:    100.00 MHz
+	Clock-CBus:     100.00 MHz
+	Clock-Res:      50.00 MHz
+	Clock-Ext:      50.00 MHz
+	Clock-DSU:      25.00 MHz
+	BogoMips:       300.00
+
+And on the PDK, the PM lines look like the following:
+
+	PM-Controls:    cm=0x3, p0=0x3, suspend=0x9
+	PM-Status:      cmode=9, cm=0, p0=0
+
+The PM-Controls line, if present, will indicate which /proc/sys/pm files can
+be set to what values. The specification values are bitmasks; so, for example,
+"suspend=0x9" indicates that 0 and 3 can be written validly to
+/proc/sys/pm/suspend.
+
+The PM-Controls line will only be present if CONFIG_PM is configured to Y.
+
+The PM-Status line indicates which clock controls are set to which value. If
+the file can be read, then the suspend value must be 0, and so that's not
+included.
diff -Nru a/Documentation/fujitsu/frv/configuring.txt b/Documentation/fujitsu/frv/configuring.txt
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/Documentation/fujitsu/frv/configuring.txt	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,125 @@
+		   =======================================
+		   FUJITSU FR-V LINUX KERNEL CONFIGURATION
+		   =======================================
+
+=====================
+CONFIGURATION OPTIONS
+=====================
+
+The most important setting is in the "MMU support options" tab (the first
+presented in the configuration tools available):
+
+ (*) "Kernel Type"
+
+     This options allows selection of normal, MMU-requiring linux, and uClinux
+     (which doesn't require an MMU and doesn't have inter-process protection).
+
+There are a number of settings in the "Processor type and features" section of
+the kernel configuration that need to be considered.
+
+ (*) "CPU"
+
+     The register and instruction sets at the core of the processor. This can
+     only be set to "FR40x/45x/55x" at the moment - but this permits usage of
+     the kernel with MB93091 CB10, CB11, CB30, CB41, CB60, CB70 and CB451
+     CPU boards, and with the MB93093 PDK board.
+
+ (*) "System"
+
+     This option allows a choice of basic system. This governs the peripherals
+     that are expected to be available.
+
+ (*) "Motherboard"
+
+     This specifies the type of motherboard being used, and the peripherals
+     upon it. Currently only "MB93090-MB00" can be set here.
+
+ (*) "Default cache-write mode"
+
+     This controls the initial data cache write management mode. By default
+     Write-Through is selected, but Write-Back (Copy-Back) can also be
+     selected. This can be changed dynamically once the kernel is running (see
+     features.txt).
+
+There are some architecture specific configuration options in the "General
+Setup" section of the kernel configuration too:
+
+ (*) "Reserve memory uncached for (PCI) DMA"
+
+     This requests that a uClinux kernel set aside some memory in an uncached
+     window for the use as consistent DMA memory (mainly for PCI). At least a
+     megabyte will be allocated in this way, possibly more. Any memory so
+     reserved will not be available for normal allocations.
+
+ (*) "Kernel support for ELF-FDPIC binaries"
+
+     This enables the binary-format driver for the new FDPIC ELF binaries that
+     this platform normally uses. These binaries are totally relocatable -
+     their separate sections can relocated independently, allowing them to be
+     shared on uClinux where possible. This should normally be enabled.
+
+ (*) "Kernel image protection"
+
+     This makes the protection register governing access to the core kernel
+     image prohibit access by userspace programs. This option is available on
+     uClinux only.
+
+There are also a number of settings in the "Kernel Hacking" section of the
+kernel configuration especially for debugging a kernel on this
+architecture. See the "gdbstub.txt" file for information about those.
+
+
+======================
+DEFAULT CONFIGURATIONS
+======================
+
+The kernel sources include a number of example default configurations:
+
+ (*) defconfig-mb93091
+
+     Default configuration for the MB93091-VDK with both CPU board and
+     MB93090-MB00 motherboard running uClinux.
+
+
+ (*) defconfig-mb93091-fb
+
+     Default configuration for the MB93091-VDK with CPU board,
+     MB93090-MB00 motherboard, and DAV board running uClinux.
+     Includes framebuffer driver.
+
+
+ (*) defconfig-mb93093
+
+     Default configuration for the MB93093-PDK board running uClinux.
+
+
+ (*) defconfig-cb70-standalone
+
+     Default configuration for the MB93091-VDK with only CB70 CPU board
+     running uClinux. This will use the CB70's DM9000 for network access.
+
+
+ (*) defconfig-mmu
+
+     Default configuration for the MB93091-VDK with both CB451 CPU board and
+     MB93090-MB00 motherboard running MMU linux.
+
+ (*) defconfig-mmu-audio
+
+     Default configuration for the MB93091-VDK with CB451 CPU board, DAV
+     board, and MB93090-MB00 motherboard running MMU linux. Includes
+     audio driver.
+
+ (*) defconfig-mmu-fb
+
+     Default configuration for the MB93091-VDK with CB451 CPU board, DAV
+     board, and MB93090-MB00 motherboard running MMU linux. Includes
+     framebuffer driver.
+
+ (*) defconfig-mmu-standalone
+
+     Default configuration for the MB93091-VDK with only CB451 CPU board
+     running MMU linux.
+
+
+
diff -Nru a/Documentation/fujitsu/frv/features.txt b/Documentation/fujitsu/frv/features.txt
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/Documentation/fujitsu/frv/features.txt	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,310 @@
+			 ===========================
+			 FUJITSU FR-V LINUX FEATURES
+			 ===========================
+
+This kernel port has a number of features of which the user should be aware:
+
+ (*) Linux and uClinux
+
+     The FR-V architecture port supports both normal MMU linux and uClinux out
+     of the same sources.
+
+
+ (*) CPU support
+
+     Support for the FR401, FR403, FR405, FR451 and FR555 CPUs should work with
+     the same uClinux kernel configuration.
+
+     In normal (MMU) Linux mode, only the FR451 CPU will work as that is the
+     only one with a suitably featured CPU.
+
+     The kernel is written and compiled with the assumption that only the
+     bottom 32 GR registers and no FR registers will be used by the kernel
+     itself, however all extra userspace registers will be saved on context
+     switch. Note that since most CPUs can't support lazy switching, no attempt
+     is made to do lazy register saving where that would be possible (FR555
+     only currently).
+
+
+ (*) Board support
+
+     The board on which the kernel will run can be configured on the "Processor
+     type and features" configuration tab.
+
+     Set the System to "MB93093-PDK" to boot from the MB93093 (FR403) PDK.
+
+     Set the System to "MB93091-VDK" to boot from the CB11, CB30, CB41, CB60,
+     CB70 or CB451 VDK boards. Set the Motherboard setting to "MB93090-MB00" to
+     boot with the standard ATA90590B VDK motherboard, and set it to "None" to
+     boot without any motherboard.
+
+
+ (*) Binary Formats
+
+     The only userspace binary format supported is FDPIC ELF. Normal ELF, FLAT
+     and AOUT binaries are not supported for this architecture.
+
+     FDPIC ELF supports shared library and program interpreter facilities.
+
+
+ (*) Scheduler Speed
+
+     The kernel scheduler runs at 100Hz irrespective of the clock speed on this
+     architecture. This value is set in asm/param.h (see the HZ macro defined
+     there).
+
+
+ (*) Normal (MMU) Linux Memory Layout.
+
+     See mmu-layout.txt in this directory for a description of the normal linux
+     memory layout
+
+     See include/asm-frv/mem-layout.h for constants pertaining to the memory
+     layout.
+
+     See include/asm-frv/mb-regs.h for the constants pertaining to the I/O bus
+     controller configuration.
+
+
+ (*) uClinux Memory Layout
+
+     The memory layout used by the uClinux kernel is as follows:
+
+	0x00000000 - 0x00000FFF		Null pointer catch page
+	0x20000000 - 0x200FFFFF CS2#    [PDK] FPGA
+	0xC0000000 - 0xCFFFFFFF		SDRAM
+	0xC0000000			Base of Linux kernel image
+	0xE0000000 - 0xEFFFFFFF	CS2#	[VDK] SLBUS/PCI window
+	0xF0000000 - 0xF0FFFFFF	CS5#	MB93493 CSC area (DAV daughter board)
+	0xF1000000 - 0xF1FFFFFF	CS7#	[CB70/CB451] CPU-card PCMCIA port space
+	0xFC000000 - 0xFC0FFFFF	CS1#	[VDK] MB86943 config space
+	0xFC100000 - 0xFC1FFFFF	CS6#	[CB70/CB451] CPU-card DM9000 NIC space
+	0xFC100000 - 0xFC1FFFFF	CS6#	[PDK] AX88796 NIC space
+	0xFC200000 - 0xFC2FFFFF	CS3#	MB93493 CSR area (DAV daughter board)
+	0xFD000000 - 0xFDFFFFFF	CS4#	[CB70/CB451] CPU-card extra flash space
+	0xFE000000 - 0xFEFFFFFF		Internal CPU peripherals
+	0xFF000000 - 0xFF1FFFFF	CS0#	Flash 1
+	0xFF200000 - 0xFF3FFFFF	CS0#	Flash 2
+	0xFFC00000 - 0xFFC0001F	CS0#	[VDK] FPGA
+
+     The kernel reads the size of the SDRAM from the memory bus controller
+     registers by default.
+
+     The kernel initialisation code (1) adjusts the SDRAM base addresses to
+     move the SDRAM to desired address, (2) moves the kernel image down to the
+     bottom of SDRAM, (3) adjusts the bus controller registers to move I/O
+     windows, and (4) rearranges the protection registers to protect all of
+     this.
+
+     The reasons for doing this are: (1) the page at address 0 should be
+     inaccessible so that NULL pointer errors can be caught; and (2) the bottom
+     three quarters are left unoccupied so that an FR-V CPU with an MMU can use
+     it for virtual userspace mappings.
+
+     See include/asm-frv/mem-layout.h for constants pertaining to the memory
+     layout.
+
+     See include/asm-frv/mb-regs.h for the constants pertaining to the I/O bus
+     controller configuration.
+
+
+ (*) uClinux Memory Protection
+
+     A DAMPR register is used to cover the entire region used for I/O
+     (0xE0000000 - 0xFFFFFFFF). This permits the kernel to make uncached
+     accesses to this region. Userspace is not permitted to access it.
+
+     The DAMPR/IAMPR protection registers not in use for any other purpose are
+     tiled over the top of the SDRAM such that:
+
+	(1) The core kernel image is covered by as small a tile as possible
+            granting only the kernel access to the underlying data, whilst
+            making sure no SDRAM is actually made unavailable by this approach.
+
+	(2) All other tiles are arranged to permit userspace access to the rest
+            of the SDRAM.
+
+     Barring point (1), there is nothing to protect kernel data against
+     userspace damage - but this is uClinux.
+
+
+ (*) Exceptions and Fixups
+
+     Since the FR40x and FR55x CPUs that do not have full MMUs generate
+     imprecise data error exceptions, there are currently no automatic fixup
+     services available in uClinux. This includes misaligned memory access
+     fixups.
+
+     Userspace EFAULT errors can be trapped by issuing a MEMBAR instruction and
+     forcing the fault to happen there.
+
+     On the FR451, however, data exceptions are mostly precise, and so
+     exception fixup handling is implemented as normal.
+
+
+ (*) Userspace Breakpoints
+
+     The ptrace() system call supports the following userspace debugging
+     features:
+
+	(1) Hardware assisted single step.
+
+	(2) Breakpoint via the FR-V "BREAK" instruction.
+
+	(3) Breakpoint via the FR-V "TIRA GR0, #1" instruction.
+
+	(4) Syscall entry/exit trap.
+
+     Each of the above generates a SIGTRAP.
+
+
+ (*) On-Chip Serial Ports
+
+     The FR-V on-chip serial ports are made available as ttyS0 and ttyS1. Note
+     that if the GDB stub is compiled in, ttyS1 will not actually be available
+     as it will be being used for the GDB stub.
+
+     These ports can be made by:
+
+	mknod /dev/ttyS0 c 4 64
+	mknod /dev/ttyS1 c 4 65
+
+
+ (*) Maskable Interrupts
+
+     Level 15 (Non-maskable) interrupts are dealt with by the GDB stub if
+     present, and cause a panic if not. If the GDB stub is present, ttyS1's
+     interrupts are rated at level 15.
+
+     All other interrupts are distributed over the set of available priorities
+     so that no IRQs are shared where possible. The arch interrupt handling
+     routines attempt to disentangle the various sources available through the
+     CPU's own multiplexor, and those on off-CPU peripherals.
+
+
+ (*) Accessing PCI Devices
+
+     Where PCI is available, care must be taken when dealing with drivers that
+     access PCI devices. PCI devices present their data in little-endian form,
+     but the CPU sees it in big-endian form. The macros in asm/io.h try to get
+     this right, but may not under all circumstances...
+
+
+ (*) Ax88796 Ethernet Driver
+
+     The MB93093 PDK board has an Ax88796 ethernet chipset (an NE2000 clone). A
+     driver has been written to deal specifically with this. The driver
+     provides MII services for the card.
+
+     The driver can be configured by running make xconfig, and going to:
+
+	(*) Network device support
+	    - turn on "Network device support"
+	    (*) Ethernet (10 or 100Mbit)
+		- turn on "Ethernet (10 or 100Mbit)"
+		- turn on "AX88796 NE2000 compatible chipset"
+
+     The driver can be found in:
+
+	drivers/net/ax88796.c
+	include/asm/ax88796.h
+
+
+ (*) WorkRAM Driver
+
+     This driver provides a character device that permits access to the WorkRAM
+     that can be found on the FR451 CPU. Each page is accessible through a
+     separate minor number, thereby permitting each page to have its own
+     filesystem permissions set on the device file.
+
+     The device files should be:
+
+	mknod /dev/frv/workram0 c 240 0
+	mknod /dev/frv/workram1 c 240 1
+	mknod /dev/frv/workram2 c 240 2
+	...
+
+     The driver will not permit the opening of any device file that does not
+     correspond to at least a partial page of WorkRAM. So the first device file
+     is the only one available on the FR451. If any other CPU is detected, none
+     of the devices will be openable.
+
+     The devices can be accessed with read, write and llseek, and can also be
+     mmapped. If they're mmapped, they will only map at the appropriate
+     0x7e8nnnnn address on linux and at the 0xfe8nnnnn address on uClinux. If
+     MAP_FIXED is not specified, the appropriate address will be chosen anyway.
+
+     The mappings must be MAP_SHARED not MAP_PRIVATE, and must not be
+     PROT_EXEC. They must also start at file offset 0, and must not be longer
+     than one page in size.
+
+     This driver can be configured by running make xconfig, and going to:
+
+	(*) Character devices
+	    - turn on "Fujitsu FR-V CPU WorkRAM support"
+
+
+ (*) Dynamic data cache write mode changing
+
+     It is possible to view and to change the data cache's write mode through
+     the /proc/sys/frv/cache-mode file while the kernel is running. There are
+     two modes available:
+
+	NAME	MEANING
+	=====	==========================================
+	wthru	Data cache is in Write-Through mode
+	wback	Data cache is in Write-Back/Copy-Back mode
+
+     To read the cache mode:
+
+	# cat /proc/sys/frv/cache-mode
+	wthru
+
+     To change the cache mode:
+
+	# echo wback >/proc/sys/frv/cache-mode
+	# cat /proc/sys/frv/cache-mode
+	wback
+
+
+ (*) MMU Context IDs and Pinning
+
+     On MMU Linux the CPU supports the concept of a context ID in its MMU to
+     make it more efficient (TLB entries are labelled with a context ID to link
+     them to specific tasks).
+
+     Normally once a context ID is allocated, it will remain affixed to a task
+     or CLONE_VM'd group of tasks for as long as it exists. However, since the
+     kernel is capable of supporting more tasks than there are possible ID
+     numbers, the kernel will pass context IDs from one task to another if
+     there are insufficient available.
+
+     The context ID currently in use by a task can be viewed in /proc:
+
+	# grep CXNR /proc/1/status
+	CXNR: 1
+
+     Note that kernel threads do not have a userspace context, and so will not
+     show a CXNR entry in that file.
+
+     Under some circumstances, however, it is desirable to pin a context ID on
+     a process such that the kernel won't pass it on. This can be done by
+     writing the process ID of the target process to a special file:
+
+	# echo 17 >/proc/sys/frv/pin-cxnr
+
+     Reading from the file will then show the context ID pinned.
+
+	# cat /proc/sys/frv/pin-cxnr
+	4
+
+     The context ID will remain pinned as long as any process is using that
+     context, i.e.: when the all the subscribing processes have exited or
+     exec'd; or when an unpinning request happens:
+
+	# echo 0 >/proc/sys/frv/pin-cxnr
+
+     When there isn't a pinned context, the file shows -1:
+
+	# cat /proc/sys/frv/pin-cxnr
+	-1
diff -Nru a/Documentation/fujitsu/frv/gdbinit b/Documentation/fujitsu/frv/gdbinit
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/Documentation/fujitsu/frv/gdbinit	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,102 @@
+set remotebreak 1
+
+define _amr
+
+printf "AMRx           DAMR                    IAMR         \n"
+printf "====   =====================   =====================\n"
+printf "amr0 : L:%08lx P:%08lx : L:%08lx P:%08lx\n",__debug_mmu.damr[0x0].L,__debug_mmu.damr[0x0].P,__debug_mmu.iamr[0x0].L,__debug_mmu.iamr[0x0].P
+printf "amr1 : L:%08lx P:%08lx : L:%08lx P:%08lx\n",__debug_mmu.damr[0x1].L,__debug_mmu.damr[0x1].P,__debug_mmu.iamr[0x1].L,__debug_mmu.iamr[0x1].P
+printf "amr2 : L:%08lx P:%08lx : L:%08lx P:%08lx\n",__debug_mmu.damr[0x2].L,__debug_mmu.damr[0x2].P,__debug_mmu.iamr[0x2].L,__debug_mmu.iamr[0x2].P
+printf "amr3 : L:%08lx P:%08lx : L:%08lx P:%08lx\n",__debug_mmu.damr[0x3].L,__debug_mmu.damr[0x3].P,__debug_mmu.iamr[0x3].L,__debug_mmu.iamr[0x3].P
+printf "amr4 : L:%08lx P:%08lx : L:%08lx P:%08lx\n",__debug_mmu.damr[0x4].L,__debug_mmu.damr[0x4].P,__debug_mmu.iamr[0x4].L,__debug_mmu.iamr[0x4].P
+printf "amr5 : L:%08lx P:%08lx : L:%08lx P:%08lx\n",__debug_mmu.damr[0x5].L,__debug_mmu.damr[0x5].P,__debug_mmu.iamr[0x5].L,__debug_mmu.iamr[0x5].P
+printf "amr6 : L:%08lx P:%08lx : L:%08lx P:%08lx\n",__debug_mmu.damr[0x6].L,__debug_mmu.damr[0x6].P,__debug_mmu.iamr[0x6].L,__debug_mmu.iamr[0x6].P
+printf "amr7 : L:%08lx P:%08lx : L:%08lx P:%08lx\n",__debug_mmu.damr[0x7].L,__debug_mmu.damr[0x7].P,__debug_mmu.iamr[0x7].L,__debug_mmu.iamr[0x7].P
+
+printf "amr8 : L:%08lx P:%08lx\n",__debug_mmu.damr[0x8].L,__debug_mmu.damr[0x8].P
+printf "amr9 : L:%08lx P:%08lx\n",__debug_mmu.damr[0x9].L,__debug_mmu.damr[0x9].P
+printf "amr10: L:%08lx P:%08lx\n",__debug_mmu.damr[0xa].L,__debug_mmu.damr[0xa].P
+printf "amr11: L:%08lx P:%08lx\n",__debug_mmu.damr[0xb].L,__debug_mmu.damr[0xb].P
+
+end
+
+
+define _tlb
+printf "tlb[0x00]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x0].L,__debug_mmu.tlb[0x0].P,__debug_mmu.tlb[0x40+0x0].L,__debug_mmu.tlb[0x40+0x0].P
+printf "tlb[0x01]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x1].L,__debug_mmu.tlb[0x1].P,__debug_mmu.tlb[0x40+0x1].L,__debug_mmu.tlb[0x40+0x1].P
+printf "tlb[0x02]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x2].L,__debug_mmu.tlb[0x2].P,__debug_mmu.tlb[0x40+0x2].L,__debug_mmu.tlb[0x40+0x2].P
+printf "tlb[0x03]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x3].L,__debug_mmu.tlb[0x3].P,__debug_mmu.tlb[0x40+0x3].L,__debug_mmu.tlb[0x40+0x3].P
+printf "tlb[0x04]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x4].L,__debug_mmu.tlb[0x4].P,__debug_mmu.tlb[0x40+0x4].L,__debug_mmu.tlb[0x40+0x4].P
+printf "tlb[0x05]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x5].L,__debug_mmu.tlb[0x5].P,__debug_mmu.tlb[0x40+0x5].L,__debug_mmu.tlb[0x40+0x5].P
+printf "tlb[0x06]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x6].L,__debug_mmu.tlb[0x6].P,__debug_mmu.tlb[0x40+0x6].L,__debug_mmu.tlb[0x40+0x6].P
+printf "tlb[0x07]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x7].L,__debug_mmu.tlb[0x7].P,__debug_mmu.tlb[0x40+0x7].L,__debug_mmu.tlb[0x40+0x7].P
+printf "tlb[0x08]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x8].L,__debug_mmu.tlb[0x8].P,__debug_mmu.tlb[0x40+0x8].L,__debug_mmu.tlb[0x40+0x8].P
+printf "tlb[0x09]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x9].L,__debug_mmu.tlb[0x9].P,__debug_mmu.tlb[0x40+0x9].L,__debug_mmu.tlb[0x40+0x9].P
+printf "tlb[0x0a]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0xa].L,__debug_mmu.tlb[0xa].P,__debug_mmu.tlb[0x40+0xa].L,__debug_mmu.tlb[0x40+0xa].P
+printf "tlb[0x0b]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0xb].L,__debug_mmu.tlb[0xb].P,__debug_mmu.tlb[0x40+0xb].L,__debug_mmu.tlb[0x40+0xb].P
+printf "tlb[0x0c]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0xc].L,__debug_mmu.tlb[0xc].P,__debug_mmu.tlb[0x40+0xc].L,__debug_mmu.tlb[0x40+0xc].P
+printf "tlb[0x0d]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0xd].L,__debug_mmu.tlb[0xd].P,__debug_mmu.tlb[0x40+0xd].L,__debug_mmu.tlb[0x40+0xd].P
+printf "tlb[0x0e]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0xe].L,__debug_mmu.tlb[0xe].P,__debug_mmu.tlb[0x40+0xe].L,__debug_mmu.tlb[0x40+0xe].P
+printf "tlb[0x0f]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0xf].L,__debug_mmu.tlb[0xf].P,__debug_mmu.tlb[0x40+0xf].L,__debug_mmu.tlb[0x40+0xf].P
+printf "tlb[0x10]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x10].L,__debug_mmu.tlb[0x10].P,__debug_mmu.tlb[0x40+0x10].L,__debug_mmu.tlb[0x40+0x10].P
+printf "tlb[0x11]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x11].L,__debug_mmu.tlb[0x11].P,__debug_mmu.tlb[0x40+0x11].L,__debug_mmu.tlb[0x40+0x11].P
+printf "tlb[0x12]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x12].L,__debug_mmu.tlb[0x12].P,__debug_mmu.tlb[0x40+0x12].L,__debug_mmu.tlb[0x40+0x12].P
+printf "tlb[0x13]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x13].L,__debug_mmu.tlb[0x13].P,__debug_mmu.tlb[0x40+0x13].L,__debug_mmu.tlb[0x40+0x13].P
+printf "tlb[0x14]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x14].L,__debug_mmu.tlb[0x14].P,__debug_mmu.tlb[0x40+0x14].L,__debug_mmu.tlb[0x40+0x14].P
+printf "tlb[0x15]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x15].L,__debug_mmu.tlb[0x15].P,__debug_mmu.tlb[0x40+0x15].L,__debug_mmu.tlb[0x40+0x15].P
+printf "tlb[0x16]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x16].L,__debug_mmu.tlb[0x16].P,__debug_mmu.tlb[0x40+0x16].L,__debug_mmu.tlb[0x40+0x16].P
+printf "tlb[0x17]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x17].L,__debug_mmu.tlb[0x17].P,__debug_mmu.tlb[0x40+0x17].L,__debug_mmu.tlb[0x40+0x17].P
+printf "tlb[0x18]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x18].L,__debug_mmu.tlb[0x18].P,__debug_mmu.tlb[0x40+0x18].L,__debug_mmu.tlb[0x40+0x18].P
+printf "tlb[0x19]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x19].L,__debug_mmu.tlb[0x19].P,__debug_mmu.tlb[0x40+0x19].L,__debug_mmu.tlb[0x40+0x19].P
+printf "tlb[0x1a]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x1a].L,__debug_mmu.tlb[0x1a].P,__debug_mmu.tlb[0x40+0x1a].L,__debug_mmu.tlb[0x40+0x1a].P
+printf "tlb[0x1b]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x1b].L,__debug_mmu.tlb[0x1b].P,__debug_mmu.tlb[0x40+0x1b].L,__debug_mmu.tlb[0x40+0x1b].P
+printf "tlb[0x1c]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x1c].L,__debug_mmu.tlb[0x1c].P,__debug_mmu.tlb[0x40+0x1c].L,__debug_mmu.tlb[0x40+0x1c].P
+printf "tlb[0x1d]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x1d].L,__debug_mmu.tlb[0x1d].P,__debug_mmu.tlb[0x40+0x1d].L,__debug_mmu.tlb[0x40+0x1d].P
+printf "tlb[0x1e]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x1e].L,__debug_mmu.tlb[0x1e].P,__debug_mmu.tlb[0x40+0x1e].L,__debug_mmu.tlb[0x40+0x1e].P
+printf "tlb[0x1f]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x1f].L,__debug_mmu.tlb[0x1f].P,__debug_mmu.tlb[0x40+0x1f].L,__debug_mmu.tlb[0x40+0x1f].P
+printf "tlb[0x20]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x20].L,__debug_mmu.tlb[0x20].P,__debug_mmu.tlb[0x40+0x20].L,__debug_mmu.tlb[0x40+0x20].P
+printf "tlb[0x21]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x21].L,__debug_mmu.tlb[0x21].P,__debug_mmu.tlb[0x40+0x21].L,__debug_mmu.tlb[0x40+0x21].P
+printf "tlb[0x22]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x22].L,__debug_mmu.tlb[0x22].P,__debug_mmu.tlb[0x40+0x22].L,__debug_mmu.tlb[0x40+0x22].P
+printf "tlb[0x23]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x23].L,__debug_mmu.tlb[0x23].P,__debug_mmu.tlb[0x40+0x23].L,__debug_mmu.tlb[0x40+0x23].P
+printf "tlb[0x24]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x24].L,__debug_mmu.tlb[0x24].P,__debug_mmu.tlb[0x40+0x24].L,__debug_mmu.tlb[0x40+0x24].P
+printf "tlb[0x25]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x25].L,__debug_mmu.tlb[0x25].P,__debug_mmu.tlb[0x40+0x25].L,__debug_mmu.tlb[0x40+0x25].P
+printf "tlb[0x26]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x26].L,__debug_mmu.tlb[0x26].P,__debug_mmu.tlb[0x40+0x26].L,__debug_mmu.tlb[0x40+0x26].P
+printf "tlb[0x27]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x27].L,__debug_mmu.tlb[0x27].P,__debug_mmu.tlb[0x40+0x27].L,__debug_mmu.tlb[0x40+0x27].P
+printf "tlb[0x28]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x28].L,__debug_mmu.tlb[0x28].P,__debug_mmu.tlb[0x40+0x28].L,__debug_mmu.tlb[0x40+0x28].P
+printf "tlb[0x29]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x29].L,__debug_mmu.tlb[0x29].P,__debug_mmu.tlb[0x40+0x29].L,__debug_mmu.tlb[0x40+0x29].P
+printf "tlb[0x2a]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x2a].L,__debug_mmu.tlb[0x2a].P,__debug_mmu.tlb[0x40+0x2a].L,__debug_mmu.tlb[0x40+0x2a].P
+printf "tlb[0x2b]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x2b].L,__debug_mmu.tlb[0x2b].P,__debug_mmu.tlb[0x40+0x2b].L,__debug_mmu.tlb[0x40+0x2b].P
+printf "tlb[0x2c]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x2c].L,__debug_mmu.tlb[0x2c].P,__debug_mmu.tlb[0x40+0x2c].L,__debug_mmu.tlb[0x40+0x2c].P
+printf "tlb[0x2d]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x2d].L,__debug_mmu.tlb[0x2d].P,__debug_mmu.tlb[0x40+0x2d].L,__debug_mmu.tlb[0x40+0x2d].P
+printf "tlb[0x2e]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x2e].L,__debug_mmu.tlb[0x2e].P,__debug_mmu.tlb[0x40+0x2e].L,__debug_mmu.tlb[0x40+0x2e].P
+printf "tlb[0x2f]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x2f].L,__debug_mmu.tlb[0x2f].P,__debug_mmu.tlb[0x40+0x2f].L,__debug_mmu.tlb[0x40+0x2f].P
+printf "tlb[0x30]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x30].L,__debug_mmu.tlb[0x30].P,__debug_mmu.tlb[0x40+0x30].L,__debug_mmu.tlb[0x40+0x30].P
+printf "tlb[0x31]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x31].L,__debug_mmu.tlb[0x31].P,__debug_mmu.tlb[0x40+0x31].L,__debug_mmu.tlb[0x40+0x31].P
+printf "tlb[0x32]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x32].L,__debug_mmu.tlb[0x32].P,__debug_mmu.tlb[0x40+0x32].L,__debug_mmu.tlb[0x40+0x32].P
+printf "tlb[0x33]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x33].L,__debug_mmu.tlb[0x33].P,__debug_mmu.tlb[0x40+0x33].L,__debug_mmu.tlb[0x40+0x33].P
+printf "tlb[0x34]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x34].L,__debug_mmu.tlb[0x34].P,__debug_mmu.tlb[0x40+0x34].L,__debug_mmu.tlb[0x40+0x34].P
+printf "tlb[0x35]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x35].L,__debug_mmu.tlb[0x35].P,__debug_mmu.tlb[0x40+0x35].L,__debug_mmu.tlb[0x40+0x35].P
+printf "tlb[0x36]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x36].L,__debug_mmu.tlb[0x36].P,__debug_mmu.tlb[0x40+0x36].L,__debug_mmu.tlb[0x40+0x36].P
+printf "tlb[0x37]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x37].L,__debug_mmu.tlb[0x37].P,__debug_mmu.tlb[0x40+0x37].L,__debug_mmu.tlb[0x40+0x37].P
+printf "tlb[0x38]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x38].L,__debug_mmu.tlb[0x38].P,__debug_mmu.tlb[0x40+0x38].L,__debug_mmu.tlb[0x40+0x38].P
+printf "tlb[0x39]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x39].L,__debug_mmu.tlb[0x39].P,__debug_mmu.tlb[0x40+0x39].L,__debug_mmu.tlb[0x40+0x39].P
+printf "tlb[0x3a]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x3a].L,__debug_mmu.tlb[0x3a].P,__debug_mmu.tlb[0x40+0x3a].L,__debug_mmu.tlb[0x40+0x3a].P
+printf "tlb[0x3b]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x3b].L,__debug_mmu.tlb[0x3b].P,__debug_mmu.tlb[0x40+0x3b].L,__debug_mmu.tlb[0x40+0x3b].P
+printf "tlb[0x3c]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x3c].L,__debug_mmu.tlb[0x3c].P,__debug_mmu.tlb[0x40+0x3c].L,__debug_mmu.tlb[0x40+0x3c].P
+printf "tlb[0x3d]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x3d].L,__debug_mmu.tlb[0x3d].P,__debug_mmu.tlb[0x40+0x3d].L,__debug_mmu.tlb[0x40+0x3d].P
+printf "tlb[0x3e]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x3e].L,__debug_mmu.tlb[0x3e].P,__debug_mmu.tlb[0x40+0x3e].L,__debug_mmu.tlb[0x40+0x3e].P
+printf "tlb[0x3f]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x3f].L,__debug_mmu.tlb[0x3f].P,__debug_mmu.tlb[0x40+0x3f].L,__debug_mmu.tlb[0x40+0x3f].P
+end
+
+
+define _pgd
+p (pgd_t[0x40])*(pgd_t*)(__debug_mmu.damr[0x3].L)
+end
+
+define _ptd_i
+p (pte_t[0x1000])*(pte_t*)(__debug_mmu.damr[0x4].L)
+end
+
+define _ptd_d
+p (pte_t[0x1000])*(pte_t*)(__debug_mmu.damr[0x5].L)
+end
diff -Nru a/Documentation/fujitsu/frv/gdbstub.txt b/Documentation/fujitsu/frv/gdbstub.txt
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/Documentation/fujitsu/frv/gdbstub.txt	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,130 @@
+			     ====================
+			     DEBUGGING FR-V LINUX
+			     ====================
+
+
+The kernel contains a GDB stub that talks GDB remote protocol across a serial
+port. This permits GDB to single step through the kernel, set breakpoints and
+trap exceptions that happen in kernel space and interrupt execution. It also
+permits the NMI interrupt button or serial port events to jump the kernel into
+the debugger.
+
+On the CPUs that have on-chip UARTs (FR400, FR403, FR405, FR555), the
+GDB stub hijacks a serial port for its own purposes, and makes it
+generate level 15 interrupts (NMI). The kernel proper cannot see the serial
+port in question under these conditions.
+
+On the MB93091-VDK CPU boards, the GDB stub uses UART1, which would otherwise
+be /dev/ttyS1. On the MB93093-PDK, the GDB stub uses UART0. Therefore, on the
+PDK there is no externally accessible serial port and the serial port to
+which the touch screen is attached becomes /dev/ttyS0.
+
+Note that the GDB stub runs entirely within CPU debug mode, and so should not
+incur any exceptions or interrupts whilst it is active. In particular, note
+that the clock will lose time since it is implemented in software.
+
+
+==================
+KERNEL PREPARATION
+==================
+
+Firstly, a debuggable kernel must be built. To do this, unpack the kernel tree
+and copy the configuration that you wish to use to .config. Then reconfigure
+the following things on the "Kernel Hacking" tab:
+
+  (*) "Include debugging information"
+
+      Set this to "Y". This causes all C and Assembly files to be compiled
+      to include debugging information.
+
+  (*) "In-kernel GDB stub"
+
+      Set this to "Y". This causes the GDB stub to be compiled into the
+      kernel.
+
+  (*) "Immediate activation"
+
+      Set this to "Y" if you want the GDB stub to activate as soon as possible
+      and wait for GDB to connect. This allows you to start tracing right from
+      the beginning of start_kernel() in init/main.c.
+
+  (*) "Console through GDB stub"
+
+      Set this to "Y" if you wish to be able to use "console=gdb0" on the
+      command line. That tells the kernel to pass system console messages to
+      GDB (which then prints them on its standard output). This is useful when
+      debugging the serial drivers that'd otherwise be used to pass console
+      messages to the outside world.
+
+Then build as usual, download to the board and execute. Note that if
+"Immediate activation" was selected, then the kernel will wait for GDB to
+attach. If not, then the kernel will boot immediately and GDB will have to
+interupt it or wait for an exception to occur if before doing anything with
+the kernel.
+
+
+=========================
+KERNEL DEBUGGING WITH GDB
+=========================
+
+Set the serial port on the computer that's going to run GDB to the appropriate
+baud rate. Assuming the board's debug port is connected to ttyS0/COM1 on the
+computer doing the debugging:
+
+	stty -F /dev/ttyS0 115200
+
+Then start GDB in the base of the kernel tree:
+
+	frv-uclinux-gdb linux		[uClinux]
+
+Or:
+
+	frv-uclinux-gdb vmlinux		[MMU linux]
+
+When the prompt appears:
+
+	GNU gdb frv-031024
+	Copyright 2003 Free Software Foundation, Inc.
+	GDB is free software, covered by the GNU General Public License, and you are
+	welcome to change it and/or distribute copies of it under certain conditions.
+	Type "show copying" to see the conditions.
+	There is absolutely no warranty for GDB.  Type "show warranty" for details.
+	This GDB was configured as "--host=i686-pc-linux-gnu --target=frv-uclinux"...
+	(gdb)
+
+Attach to the board like this:
+
+        (gdb) target remote /dev/ttyS0
+	Remote debugging using /dev/ttyS0
+	start_kernel () at init/main.c:395
+	(gdb)
+
+This should show the appropriate lines from the source too. The kernel can
+then be debugged almost as if it's any other program.
+
+
+===============================
+INTERRUPTING THE RUNNING KERNEL
+===============================
+
+The kernel can be interrupted whilst it is running, causing a jump back to the
+GDB stub and the debugger:
+
+  (*) Pressing Ctrl-C in GDB. This will cause GDB to try and interrupt the
+      kernel by sending an RS232 BREAK over the serial line to the GDB
+      stub. This will (mostly) immediately interrupt the kernel and return it
+      to the debugger.
+
+  (*) Pressing the NMI button on the board will also cause a jump into the
+      debugger.
+
+  (*) Setting a software breakpoint. This sets a break instruction at the
+      desired location which the GDB stub then traps the exception for.
+
+  (*) Setting a hardware breakpoint. The GDB stub is capable of using the IBAR
+      and DBAR registers to assist debugging.
+
+Furthermore, the GDB stub will intercept a number of exceptions automatically
+if they are caused by kernel execution. It will also intercept BUG() macro
+invokation.
+
diff -Nru a/Documentation/fujitsu/frv/mmu-layout.txt b/Documentation/fujitsu/frv/mmu-layout.txt
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/Documentation/fujitsu/frv/mmu-layout.txt	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,306 @@
+				 =================================
+				 FR451 MMU LINUX MEMORY MANAGEMENT
+				 =================================
+
+============
+MMU HARDWARE
+============
+
+FR451 MMU Linux puts the MMU into EDAT mode whilst running. This means that it uses both the SAT
+registers and the DAT TLB to perform address translation.
+
+There are 8 IAMLR/IAMPR register pairs and 16 DAMLR/DAMPR register pairs for SAT mode.
+
+In DAT mode, there is also a TLB organised in cache format as 64 lines x 2 ways. Each line spans a
+16KB range of addresses, but can match a larger region.
+
+
+===========================
+MEMORY MANAGEMENT REGISTERS
+===========================
+
+Certain control registers are used by the kernel memory management routines:
+
+	REGISTERS		USAGE
+	======================	==================================================
+	IAMR0, DAMR0		Kernel image and data mappings
+	IAMR1, DAMR1		First-chance TLB lookup mapping
+	DAMR2			Page attachment for cache flush by page
+	DAMR3			Current PGD mapping
+	SCR0, DAMR4		Instruction TLB PGE/PTD cache
+	SCR1, DAMR5		Data TLB PGE/PTD cache
+	DAMR6-10		kmap_atomic() mappings
+	DAMR11			I/O mapping
+	CXNR			mm_struct context ID
+	TTBR			Page directory (PGD) pointer (physical address)
+
+
+=====================
+GENERAL MEMORY LAYOUT
+=====================
+
+The physical memory layout is as follows:
+
+  PHYSICAL ADDRESS	CONTROLLER	DEVICE
+  ===================	==============	=======================================
+  00000000 - BFFFFFFF	SDRAM		SDRAM area
+  E0000000 - EFFFFFFF	L-BUS CS2#	VDK SLBUS/PCI window
+  F0000000 - F0FFFFFF	L-BUS CS5#	MB93493 CSC area (DAV daughter board)
+  F1000000 - F1FFFFFF	L-BUS CS7#	(CB70 CPU-card PCMCIA port I/O space)
+  FC000000 - FC0FFFFF	L-BUS CS1#	VDK MB86943 config space
+  FC100000 - FC1FFFFF	L-BUS CS6#	DM9000 NIC I/O space
+  FC200000 - FC2FFFFF	L-BUS CS3#	MB93493 CSR area (DAV daughter board)
+  FD000000 - FDFFFFFF	L-BUS CS4#	(CB70 CPU-card extra flash space)
+  FE000000 - FEFFFFFF			Internal CPU peripherals
+  FF000000 - FF1FFFFF	L-BUS CS0#	Flash 1
+  FF200000 - FF3FFFFF	L-BUS CS0#	Flash 2
+  FFC00000 - FFC0001F	L-BUS CS0#	FPGA
+
+The virtual memory layout is:
+
+  VIRTUAL ADDRESS    PHYSICAL	TRANSLATOR	FLAGS	SIZE	OCCUPATION
+  =================  ========	==============	=======	=======	===================================
+  00004000-BFFFFFFF  various	TLB,xAMR1	D-N-??V	3GB	Userspace
+  C0000000-CFFFFFFF  00000000	xAMPR0		-L-S--V	256MB	Kernel image and data
+  D0000000-D7FFFFFF  various	TLB,xAMR1	D-NS??V	128MB	vmalloc area
+  D8000000-DBFFFFFF  various	TLB,xAMR1	D-NS??V	64MB	kmap() area
+  DC000000-DCFFFFFF  various	TLB			1MB	Secondary kmap_atomic() frame
+  DD000000-DD27FFFF  various	DAMR			160KB	Primary kmap_atomic() frame
+  DD040000			DAMR2/IAMR2	-L-S--V	page	Page cache flush attachment point
+  DD080000			DAMR3		-L-SC-V	page	Page Directory (PGD)
+  DD0C0000			DAMR4		-L-SC-V	page	Cached insn TLB Page Table lookup
+  DD100000			DAMR5		-L-SC-V	page	Cached data TLB Page Table lookup
+  DD140000			DAMR6		-L-S--V	page	kmap_atomic(KM_BOUNCE_READ)
+  DD180000			DAMR7		-L-S--V	page	kmap_atomic(KM_SKB_SUNRPC_DATA)
+  DD1C0000			DAMR8		-L-S--V	page	kmap_atomic(KM_SKB_DATA_SOFTIRQ)
+  DD200000			DAMR9		-L-S--V	page	kmap_atomic(KM_USER0)
+  DD240000			DAMR10		-L-S--V	page	kmap_atomic(KM_USER1)
+  E0000000-FFFFFFFF  E0000000	DAMR11		-L-SC-V	512MB	I/O region
+
+IAMPR1 and DAMPR1 are used as an extension to the TLB.
+
+
+====================
+KMAP AND KMAP_ATOMIC
+====================
+
+To access pages in the page cache (which may not be directly accessible if highmem is available),
+the kernel calls kmap(), does the access and then calls kunmap(); or it calls kmap_atomic(), does
+the access and then calls kunmap_atomic().
+
+kmap() creates an attachment between an arbitrary inaccessible page and a range of virtual
+addresses by installing a PTE in a special page table. The kernel can then access this page as it
+wills. When it's finished, the kernel calls kunmap() to clear the PTE.
+
+kmap_atomic() does something slightly different. In the interests of speed, it chooses one of two
+strategies:
+
+ (1) If possible, kmap_atomic() attaches the requested page to one of DAMPR5 through DAMPR10
+     register pairs; and the matching kunmap_atomic() clears the DAMPR. This makes high memory
+     support really fast as there's no need to flush the TLB or modify the page tables. The DAMLR
+     registers being used for this are preset during boot and don't change over the lifetime of the
+     process. There's a direct mapping between the first few kmap_atomic() types, DAMR number and
+     virtual address slot.
+
+     However, there are more kmap_atomic() types defined than there are DAMR registers available,
+     so we fall back to:
+
+ (2) kmap_atomic() uses a slot in the secondary frame (determined by the type parameter), and then
+     locks an entry in the TLB to translate that slot to the specified page. The number of slots is
+     obviously limited, and their positions are controlled such that each slot is matched by a
+     different line in the TLB. kunmap() ejects the entry from the TLB.
+
+Note that the first three kmap atomic types are really just declared as placeholders. The DAMPR
+registers involved are actually modified directly.
+
+Also note that kmap() itself may sleep, kmap_atomic() may never sleep and both always succeed;
+furthermore, a driver using kmap() may sleep before calling kunmap(), but may not sleep before
+calling kunmap_atomic() if it had previously called kmap_atomic().
+
+
+===============================
+USING MORE THAN 256MB OF MEMORY
+===============================
+
+The kernel cannot access more than 256MB of memory directly. The physical layout, however, permits
+up to 3GB of SDRAM (possibly 3.25GB) to be made available. By using CONFIG_HIGHMEM, the kernel can
+allow userspace (by way of page tables) and itself (by way of kmap) to deal with the memory
+allocation.
+
+External devices can, of course, still DMA to and from all of the SDRAM, even if the kernel can't
+see it directly. The kernel translates page references into real addresses for communicating to the
+devices.
+
+
+===================
+PAGE TABLE TOPOLOGY
+===================
+
+The page tables are arranged in 2-layer format. There is a middle layer (PMD) that would be used in
+3-layer format tables but that is folded into the top layer (PGD) and so consumes no extra memory
+or processing power.
+
+  +------+     PGD    PMD
+  | TTBR |--->+-------------------+
+  +------+    |      |      : STE |
+              | PGE0 | PME0 : STE |
+              |      |      : STE |
+              +-------------------+              Page Table
+              |      |      : STE -------------->+--------+ +0x0000
+              | PGE1 | PME0 : STE -----------+   | PTE0   |
+              |      |      : STE -------+   |   +--------+
+              +-------------------+      |   |   | PTE63  |
+              |      |      : STE |      |   +-->+--------+ +0x0100
+              | PGE2 | PME0 : STE |      |       | PTE64  |
+              |      |      : STE |      |       +--------+
+              +-------------------+      |       | PTE127 |
+              |      |      : STE |      +------>+--------+ +0x0200
+              | PGE3 | PME0 : STE |              | PTE128 |
+              |      |      : STE |              +--------+
+              +-------------------+              | PTE191 |
+                                                 +--------+ +0x0300
+
+Each Page Directory (PGD) is 16KB (page size) in size and is divided into 64 entries (PGEs). Each
+PGE contains one Page Mid Directory (PMD).
+
+Each PMD is 256 bytes in size and contains a single entry (PME). Each PME holds 64 FR451 MMU
+segment table entries of 4 bytes apiece. Each PME "points to" a page table. In practice, each STE
+points to a subset of the page table, the first to PT+0x0000, the second to PT+0x0100, the third to
+PT+0x200, and so on.
+
+Each PGE and PME covers 64MB of the total virtual address space.
+
+Each Page Table (PTD) is 16KB (page size) in size, and is divided into 4096 entries (PTEs). Each
+entry can point to one 16KB page. In practice, each Linux page table is subdivided into 64 FR451
+MMU page tables. But they are all grouped together to make management easier, in particular rmap
+support is then trivial.
+
+Grouping page tables in this fashion makes PGE caching in SCR0/SCR1 more efficient because the
+coverage of the cached item is greater.
+
+Page tables for the vmalloc area are allocated at boot time and shared between all mm_structs.
+
+
+=================
+USER SPACE LAYOUT
+=================
+
+For MMU capable Linux, the regions userspace code are allowed to access are kept entirely separate
+from those dedicated to the kernel:
+
+	VIRTUAL ADDRESS    SIZE   PURPOSE
+	=================  =====  ===================================
+	00000000-00003fff  4KB    NULL pointer access trap
+	00004000-01ffffff  ~32MB  lower mmap space (grows up)
+	02000000-021fffff  2MB    Stack space (grows down from top)
+	02200000-nnnnnnnn         Executable mapping
+        nnnnnnnn-                 brk space (grows up)
+	        -bfffffff         upper mmap space (grows down)
+
+This is so arranged so as to make best use of the 16KB page tables and the way in which PGEs/PMEs
+are cached by the TLB handler. The lower mmap space is filled first, and then the upper mmap space
+is filled.
+
+
+===============================
+GDB-STUB MMU DEBUGGING SERVICES
+===============================
+
+The gdb-stub included in this kernel provides a number of services to aid in the debugging of MMU
+related kernel services:
+
+ (*) Every time the kernel stops, certain state information is dumped into __debug_mmu. This
+     variable is defined in arch/frv/kernel/gdb-stub.c. Note that the gdbinit file in this
+     directory has some useful macros for dealing with this.
+
+     (*) __debug_mmu.tlb[]
+
+	 This receives the current TLB contents. This can be viewed with the _tlb GDB macro:
+
+		(gdb) _tlb
+		tlb[0x00]: 01000005 00718203  01000002 00718203
+		tlb[0x01]: 01004002 006d4201  01004005 006d4203
+		tlb[0x02]: 01008002 006d0201  01008006 00004200
+		tlb[0x03]: 0100c006 007f4202  0100c002 0064c202
+		tlb[0x04]: 01110005 00774201  01110002 00774201
+		tlb[0x05]: 01114005 00770201  01114002 00770201
+		tlb[0x06]: 01118002 0076c201  01118005 0076c201
+		...
+		tlb[0x3d]: 010f4002 00790200  001f4002 0054ca02
+		tlb[0x3e]: 010f8005 0078c201  010f8002 0078c201
+		tlb[0x3f]: 001fc002 0056ca01  001fc005 00538a01
+
+     (*) __debug_mmu.iamr[]
+     (*) __debug_mmu.damr[]
+
+	 These receive the current IAMR and DAMR contents. These can be viewed with with the _amr
+	 GDB macro:
+
+		(gdb) _amr
+		AMRx           DAMR                    IAMR
+		====   =====================   =====================
+		amr0 : L:c0000000 P:00000cb9 : L:c0000000 P:000004b9
+		amr1 : L:01070005 P:006f9203 : L:0102c005 P:006a1201
+		amr2 : L:d8d00000 P:00000000 : L:d8d00000 P:00000000
+		amr3 : L:d8d04000 P:00534c0d : L:00000000 P:00000000
+		amr4 : L:d8d08000 P:00554c0d : L:00000000 P:00000000
+		amr5 : L:d8d0c000 P:00554c0d : L:00000000 P:00000000
+		amr6 : L:d8d10000 P:00000000 : L:00000000 P:00000000
+		amr7 : L:d8d14000 P:00000000 : L:00000000 P:00000000
+		amr8 : L:d8d18000 P:00000000
+		amr9 : L:d8d1c000 P:00000000
+		amr10: L:d8d20000 P:00000000
+		amr11: L:e0000000 P:e0000ccd
+
+ (*) The current task's page directory is bound to DAMR3.
+
+     This can be viewed with the _pgd GDB macro:
+
+	(gdb) _pgd
+	$3 = {{pge = {{ste = {0x554001, 0x554101, 0x554201, 0x554301, 0x554401,
+		  0x554501, 0x554601, 0x554701, 0x554801, 0x554901, 0x554a01,
+		  0x554b01, 0x554c01, 0x554d01, 0x554e01, 0x554f01, 0x555001,
+		  0x555101, 0x555201, 0x555301, 0x555401, 0x555501, 0x555601,
+		  0x555701, 0x555801, 0x555901, 0x555a01, 0x555b01, 0x555c01,
+		  0x555d01, 0x555e01, 0x555f01, 0x556001, 0x556101, 0x556201,
+		  0x556301, 0x556401, 0x556501, 0x556601, 0x556701, 0x556801,
+		  0x556901, 0x556a01, 0x556b01, 0x556c01, 0x556d01, 0x556e01,
+		  0x556f01, 0x557001, 0x557101, 0x557201, 0x557301, 0x557401,
+		  0x557501, 0x557601, 0x557701, 0x557801, 0x557901, 0x557a01,
+		  0x557b01, 0x557c01, 0x557d01, 0x557e01, 0x557f01}}}}, {pge = {{
+		ste = {0x0 <repeats 64 times>}}}} <repeats 51 times>, {pge = {{ste = {
+		  0x248001, 0x248101, 0x248201, 0x248301, 0x248401, 0x248501,
+		  0x248601, 0x248701, 0x248801, 0x248901, 0x248a01, 0x248b01,
+		  0x248c01, 0x248d01, 0x248e01, 0x248f01, 0x249001, 0x249101,
+		  0x249201, 0x249301, 0x249401, 0x249501, 0x249601, 0x249701,
+		  0x249801, 0x249901, 0x249a01, 0x249b01, 0x249c01, 0x249d01,
+		  0x249e01, 0x249f01, 0x24a001, 0x24a101, 0x24a201, 0x24a301,
+		  0x24a401, 0x24a501, 0x24a601, 0x24a701, 0x24a801, 0x24a901,
+		  0x24aa01, 0x24ab01, 0x24ac01, 0x24ad01, 0x24ae01, 0x24af01,
+		  0x24b001, 0x24b101, 0x24b201, 0x24b301, 0x24b401, 0x24b501,
+		  0x24b601, 0x24b701, 0x24b801, 0x24b901, 0x24ba01, 0x24bb01,
+		  0x24bc01, 0x24bd01, 0x24be01, 0x24bf01}}}}, {pge = {{ste = {
+		  0x0 <repeats 64 times>}}}} <repeats 11 times>}
+
+ (*) The PTD last used by the instruction TLB miss handler is attached to DAMR4.
+ (*) The PTD last used by the data TLB miss handler is attached to DAMR5.
+
+     These can be viewed with the _ptd_i and _ptd_d GDB macros:
+
+	(gdb) _ptd_d
+	$5 = {{pte = 0x0} <repeats 127 times>, {pte = 0x539b01}, {
+	    pte = 0x0} <repeats 896 times>, {pte = 0x719303}, {pte = 0x6d5303}, {
+	    pte = 0x0}, {pte = 0x0}, {pte = 0x0}, {pte = 0x0}, {pte = 0x0}, {
+	    pte = 0x0}, {pte = 0x0}, {pte = 0x0}, {pte = 0x0}, {pte = 0x6a1303}, {
+	    pte = 0x0} <repeats 12 times>, {pte = 0x709303}, {pte = 0x0}, {pte = 0x0},
+	  {pte = 0x6fd303}, {pte = 0x6f9303}, {pte = 0x6f5303}, {pte = 0x0}, {
+	    pte = 0x6ed303}, {pte = 0x531b01}, {pte = 0x50db01}, {
+	    pte = 0x0} <repeats 13 times>, {pte = 0x5303}, {pte = 0x7f5303}, {
+	    pte = 0x509b01}, {pte = 0x505b01}, {pte = 0x7c9303}, {pte = 0x7b9303}, {
+	    pte = 0x7b5303}, {pte = 0x7b1303}, {pte = 0x7ad303}, {pte = 0x0}, {
+	    pte = 0x0}, {pte = 0x7a1303}, {pte = 0x0}, {pte = 0x795303}, {pte = 0x0}, {
+	    pte = 0x78d303}, {pte = 0x0}, {pte = 0x0}, {pte = 0x0}, {pte = 0x0}, {
+	    pte = 0x0}, {pte = 0x775303}, {pte = 0x771303}, {pte = 0x76d303}, {
+	    pte = 0x0}, {pte = 0x765303}, {pte = 0x7c5303}, {pte = 0x501b01}, {
+	    pte = 0x4f1b01}, {pte = 0x4edb01}, {pte = 0x0}, {pte = 0x4f9b01}, {
+	    pte = 0x4fdb01}, {pte = 0x0} <repeats 2992 times>}
diff -Nru a/Documentation/i2c/chips/smsc47b397.txt b/Documentation/i2c/chips/smsc47b397.txt
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/Documentation/i2c/chips/smsc47b397.txt	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,146 @@
+November 23, 2004
+
+The following specification describes the SMSC LPC47B397-NC sensor chip
+(for which there is no public datasheet available).  This document was
+provided by Craig Kelly (In-Store Broadcast Network) and edited/corrected
+by Mark M. Hoffman <mhoffman@lightlink.com>.
+
+* * * * *
+
+Methods for detecting the HP SIO and reading the thermal data on a dc7100.
+
+The thermal information on the dc7100 is contained in the SIO Hardware Monitor
+(HWM).  The information is accessed through an index/data pair.  The index/data
+pair is located at the HWM Base Address + 0 and the HWM Base Address + 1.  The
+HWM Base address can be obtained from Logical Device 8, registers 0x60 (MSB)
+and 0x61 (LSB).  Currently we are using 0x480 for the HWM Base Address and
+0x480 and 0x481 for the index/data pair.
+
+Reading temperature information.
+The temperature information is located in the following registers:
+Temp1		0x25	(Currently, this reflects the CPU temp on all systems).
+Temp2		0x26
+Temp3		0x27
+Temp4		0x80
+
+Programming Example
+The following is an example of how to read the HWM temperature registers:
+MOV	DX,480H
+MOV	AX,25H
+OUT	DX,AL
+MOV	DX,481H
+IN	AL,DX
+
+AL contains the data in hex, the temperature in Celsius is the decimal
+equivalent.
+
+Ex: If AL contains 0x2A, the temperature is 42 degrees C.
+
+Reading tach information.
+The fan speed information is located in the following registers:
+		LSB	MSB
+Tach1		0x28	0x29	(Currently, this reflects the CPU
+				fan speed on all systems).
+Tach2		0x2A	0x2B
+Tach3		0x2C	0x2D
+Tach4		0x2E	0x2F
+
+Important!!!
+Reading the tach LSB locks the tach MSB.
+The LSB Must be read first.
+
+How to convert the tach reading to RPM.
+The tach reading (TCount) is given by:  (Tach MSB * 256) + (Tach LSB)
+The SIO counts the number of 90kHz (11.111us) pulses per revolution.
+RPM = 60/(TCount * 11.111us)
+
+Example:
+Reg 0x28 = 0x9B
+Reg 0x29 = 0x08
+
+TCount = 0x89B = 2203
+
+RPM = 60 / (2203 * 11.11111 E-6) = 2451 RPM
+
+Obtaining the SIO version.
+
+CONFIGURATION SEQUENCE
+To program the configuration registers, the following sequence must be followed:
+1. Enter Configuration Mode
+2. Configure the Configuration Registers
+3. Exit Configuration Mode.
+
+Enter Configuration Mode
+To place the chip into the Configuration State The config key (0x55) is written
+to the CONFIG PORT (0x2E). 
+
+Configuration Mode
+In configuration mode, the INDEX PORT is located at the CONFIG PORT address and
+the DATA PORT is at INDEX PORT address + 1.
+
+The desired configuration registers are accessed in two steps: 
+a.	Write the index of the Logical Device Number Configuration Register
+	(i.e., 0x07) to the INDEX PORT and then write the number of the
+	desired logical device to the DATA PORT.
+
+b.	Write the address of the desired configuration register within the
+	logical device to the INDEX PORT and then write or read the config-
+	uration register through the DATA PORT.  
+
+Note: If accessing the Global Configuration Registers, step (a) is not required.
+
+Exit Configuration Mode
+To exit the Configuration State the write 0xAA to the CONFIG PORT (0x2E).
+The chip returns to the RUN State.  (This is important).
+
+Programming Example
+The following is an example of how to read the SIO Device ID located at 0x20
+
+; ENTER CONFIGURATION MODE   
+MOV	DX,02EH
+MOV	AX,055H
+OUT	DX,AL
+; GLOBAL CONFIGURATION  REGISTER 
+MOV	DX,02EH
+MOV	AL,20H
+OUT	DX,AL 
+; READ THE DATA
+MOV	DX,02FH
+IN	AL,DX
+; EXIT CONFIGURATION MODE     
+MOV	DX,02EH
+MOV	AX,0AAH
+OUT	DX,AL
+
+The registers of interest for identifying the SIO on the dc7100 are Device ID
+(0x20) and Device Rev  (0x21).
+
+The Device ID will read 0X6F
+The Device Rev currently reads 0x01
+
+Obtaining the HWM Base Address.
+The following is an example of how to read the HWM Base Address located in
+Logical Device 8.
+
+; ENTER CONFIGURATION MODE   
+MOV	DX,02EH
+MOV	AX,055H
+OUT	DX,AL
+; CONFIGURE REGISTER CRE0,   
+; LOGICAL DEVICE 8           
+MOV	DX,02EH
+MOV	AL,07H
+OUT	DX,AL ;Point to LD# Config Reg
+MOV	DX,02FH
+MOV	AL, 08H
+OUT	DX,AL;Point to Logical Device 8
+;
+MOV	DX,02EH 
+MOV	AL,60H
+OUT	DX,AL	; Point to HWM Base Addr MSB
+MOV	DX,02FH
+IN	AL,DX	; Get MSB of HWM Base Addr
+; EXIT CONFIGURATION MODE     
+MOV	DX,02EH
+MOV	AX,0AAH
+OUT	DX,AL
diff -Nru a/Documentation/i2c/i2c-old-porting b/Documentation/i2c/i2c-old-porting
--- a/Documentation/i2c/i2c-old-porting	2005-01-10 20:11:22 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,626 +0,0 @@
-I2C Conversion Guide for I2C-old to the current I2C API
-July 2002
-For Linux Kernel v2.5.x
-Frank Davis <fdavis@si.rr.com>
--------------------------------------------------------
-
-There exists several kernel drivers that are using an old version of the I2C
-API. These drivers need to be converted to the current (kernel 2.5.x) version.
-The following document provides a guideline to make the appropriate changes to
-the affected drivers. There maybe slight modifications to this guide that are 
-specific to the driver you are working on. If you see {driver_name}, replace 
-that with the respective name of the driver, such as saa7110.c , {driver_name} 
-= saa7110.
-
--------------------------------------------------------
-
-Step 1: Include the right header file
- 
-Perform the following change within the driver
- 
-#include <linux/i2c-old.h> --> #include <linux/i2c.h>
-
-Step 2: Add and set the i2c modes
-
-Add the following code near the top of the driver
-
-static unsigned short normal_i2c[] = {34>>1, 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;
-
-Step 3: Modify the driver info struct
-
-Within the struct for the driver , such as struct {driver_name}  ,  make the 
-following change ,
-struct i2c_bus *bus --> struct i2c_client *client
-
-Make changes where this change affects references within the file.
-
-Add a semaphore to the driver struct (as above)
-
-struct semaphore lock 
-
-Step 5: Remove specific read and write functions
-
-Remove the driver specific write and read functions, usually in the form:
-{driver_name}_write , {driver_name}_read , {driver_name}_write_block , etc.
-
-Step 6: Update the write and read functions for the current I2C API
-
-Replace all references of {driver_name}_write with i2c_smbus_write_byte_data
-Replace all references of {driver_name}_read with i2c_smbus_read_byte_data or
-i2c_smbus_read_byte , depending on args passed in.
-
-** Ensure that these functions pass in the i2c_client *client , NOT the
-decoder/encoder that was passed in the driver specific write and read
-functions. 
- 
-Step 7: Modify the driver's attach function
-
-Change the driver attach function prototype :
-{driver_name}_attach(struct i2c_device *device) --> {driver_name}_attach(struct 
-i2c_adapter *adap, int addr , unsigned short flags, int kind)
-
-Create a i2c_client client...
-Add the following (where "decoder" is a reference to a struct for the driver
-info:
-
-struct i2c_client *client;
-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));
-strcpy(client->name , "{driver_name}");
-decoder->client = client;
-client->data = decoder;
-decoder->addr = addr;
-
-Towards the end of the function, add:
-
-init_MUTEX(&decoder->lock);
-i2c_attach_client(client);
-
-
-Step 8: Modify the driver's detach function
-
-Change the driver detach function prototype :
-{driver_name}_detach(struct i2c_device *device) --> {driver_name}_detach(struct 
-i2c_client *client)
-
-In the beginning of the detach function, add:
-i2c_detach_client(client);
-
-Towards the end of the detach function, add:
-kfree(client->data);
-kfree(client);
-
-Step 9: Modify the driver's command function
-
-Change the driver command function prototype :
-
-Step 10: Add the probe function after the driver's attach function.
-
-Add the following code:
-
-static int {driver_name}_probe(struct i2c_adapter *adap)
-{
-	return i2c_probe(adap, &addr_data, {driver_name}_attach);
-
-}
-
-Step 11: Modify the driver's i2c_driver
-
-Find the i2c_driver , such as
-static struct i2c_driver i2c_driver_saa7110
-It is usually located towards the end of the driver 
-Replace the values from I2C_DRIVERID_{something} to {driver_name}_attach, and 
-add the following
-I2C_DRIVERID_{driver_name} , // verify by looking in include/linux/i2c-id.h 
-I2C_DF_NOTIFY,
-{driver_name}_probe, 
-....
-
-Step 12: Adding the i2c_client 
-
-Add the i2c_client to the driver. Add the following code:
-
-static struct i2c_client client_template = {
-	"{driver_name}_client",
-	-1,
-	0,
-	0,
-	NULL,
-	{i2c_driver reference}
-};
-
-Step 13: Registering and Unregistering
-
-Replace i2c_register_driver with i2c_add_driver
-Replace i2c_unregister_driver with i2c_del_driver
-
--------------------------------------------------------
-
-Example:
-
-The following patch provides the i2c coversion patch for the saa7110 driver
-based on the above guide (for clarity).
-
-
---- drivers/media/video/saa7110.c.old	Fri Jun 28 10:22:52 2002
-+++ drivers/media/video/saa7110.c	Thu Jul  4 16:51:08 2002
-@@ -26,7 +26,7 @@
- #include <asm/io.h>
- #include <asm/uaccess.h>
- 
--#include <linux/i2c-old.h>
-+#include <linux/i2c.h>
- #include <linux/videodev.h>
- #include "linux/video_decoder.h"
- 
-@@ -37,13 +37,31 @@
- 
- #define	I2C_SAA7110		0x9C	/* or 0x9E */
- 
-+#define IF_NAME	"saa7110"
- #define	I2C_DELAY		10	/* 10 us or 100khz */
- 
-+static unsigned short normal_i2c[] = {34>>1, 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;
-+
- struct saa7110 {
--	struct	i2c_bus	*bus;
-+	struct i2c_client *client;
- 	int		addr;
- 	unsigned char	reg[36];
--
-+	struct semaphore lock;
- 	int		norm;
- 	int		input;
- 	int		enable;
-@@ -54,67 +72,10 @@
- };
- 
- /* ----------------------------------------------------------------------- */
--/* I2C support functions						   */
--/* ----------------------------------------------------------------------- */
--static
--int saa7110_write(struct saa7110 *decoder, unsigned char subaddr, unsigned char data)
--{
--	int ack;
--
--	LOCK_I2C_BUS(decoder->bus);
--	i2c_start(decoder->bus);
--	i2c_sendbyte(decoder->bus, decoder->addr, I2C_DELAY);
--	i2c_sendbyte(decoder->bus, subaddr, I2C_DELAY);
--	ack = i2c_sendbyte(decoder->bus, data, I2C_DELAY);
--	i2c_stop(decoder->bus);
--	decoder->reg[subaddr] = data;
--	UNLOCK_I2C_BUS(decoder->bus);
--	return ack;
--}
--
--static
--int saa7110_write_block(struct saa7110* decoder, unsigned const char *data, unsigned int len)
--{
--	unsigned subaddr = *data;
--
--	LOCK_I2C_BUS(decoder->bus);
--        i2c_start(decoder->bus);
--        i2c_sendbyte(decoder->bus,decoder->addr,I2C_DELAY);
--	while (len-- > 0) {
--                if (i2c_sendbyte(decoder->bus,*data,0)) {
--                        i2c_stop(decoder->bus);
--                        UNLOCK_I2C_BUS(decoder->bus);
--                        return -EAGAIN;
--                }
--		decoder->reg[subaddr++] = *data++;
--        }
--	i2c_stop(decoder->bus);
--	UNLOCK_I2C_BUS(decoder->bus);
--
--	return 0;
--}
--
--static
--int saa7110_read(struct saa7110* decoder)
--{
--	int data;
--
--	LOCK_I2C_BUS(decoder->bus);
--	i2c_start(decoder->bus);
--	i2c_sendbyte(decoder->bus, decoder->addr, I2C_DELAY);
--	i2c_start(decoder->bus);
--	i2c_sendbyte(decoder->bus, decoder->addr | 1, I2C_DELAY);
--	data = i2c_readbyte(decoder->bus, 1);
--	i2c_stop(decoder->bus);
--	UNLOCK_I2C_BUS(decoder->bus);
--	return data;
--}
--
--/* ----------------------------------------------------------------------- */
- /* SAA7110 functions							   */
- /* ----------------------------------------------------------------------- */
- static
--int saa7110_selmux(struct i2c_device *device, int chan)
-+int saa7110_selmux(struct i2c_client *client, int chan)
- {
- static	const unsigned char modes[9][8] = {
- /* mode 0 */	{ 0x00, 0xD9, 0x17, 0x40, 0x03, 0x44, 0x75, 0x16 },
-@@ -126,61 +87,59 @@
- /* mode 6 */	{ 0x80, 0x59, 0x17, 0x42, 0xA3, 0x44, 0x75, 0x12 },
- /* mode 7 */	{ 0x80, 0x9A, 0x17, 0xB1, 0x13, 0x60, 0xB5, 0x14 },
- /* mode 8 */	{ 0x80, 0x3C, 0x27, 0xC1, 0x23, 0x44, 0x75, 0x21 } };
--	struct saa7110* decoder = device->data;
- 	const unsigned char* ptr = modes[chan];
- 
--	saa7110_write(decoder,0x06,ptr[0]);	/* Luminance control	*/
--	saa7110_write(decoder,0x20,ptr[1]);	/* Analog Control #1	*/
--	saa7110_write(decoder,0x21,ptr[2]);	/* Analog Control #2	*/
--	saa7110_write(decoder,0x22,ptr[3]);	/* Mixer Control #1	*/
--	saa7110_write(decoder,0x2C,ptr[4]);	/* Mixer Control #2	*/
--	saa7110_write(decoder,0x30,ptr[5]);	/* ADCs gain control	*/
--	saa7110_write(decoder,0x31,ptr[6]);	/* Mixer Control #3	*/
--	saa7110_write(decoder,0x21,ptr[7]);	/* Analog Control #2	*/
-+	i2c_smbus_write_byte_data(client,0x06,ptr[0]);	/* Luminance control	*/
-+	i2c_smbus_write_byte_data(client,0x20,ptr[1]);	/* Analog Control #1	*/
-+	i2c_smbus_write_byte_data(client,0x21,ptr[2]);	/* Analog Control #2	*/
-+	i2c_smbus_write_byte_data(client,0x22,ptr[3]);	/* Mixer Control #1	*/
-+	i2c_smbus_write_byte_data(client,0x2C,ptr[4]);	/* Mixer Control #2	*/
-+	i2c_smbus_write_byte_data(client,0x30,ptr[5]);	/* ADCs gain control	*/
-+	i2c_smbus_write_byte_data(client,0x31,ptr[6]);	/* Mixer Control #3	*/
-+	i2c_smbus_write_byte_data(client,0x21,ptr[7]);	/* Analog Control #2	*/
- 
- 	return 0;
- }
- 
- static
--int determine_norm(struct i2c_device* dev)
-+int determine_norm(struct i2c_client* client)
- {
--	struct	saa7110* decoder = dev->data;
- 	int	status;
- 
- 	/* mode changed, start automatic detection */
--	status = saa7110_read(decoder);
-+	status = i2c_smbus_read_byte(client);
- 	if ((status & 3) == 0) {
--		saa7110_write(decoder,0x06,0x80);
-+		i2c_smbus_write_byte_data(client,0x06,0x80);
- 		if (status & 0x20) {
--			DEBUG(printk(KERN_INFO "%s: norm=bw60\n",dev->name));
--			saa7110_write(decoder,0x2E,0x81);
-+			DEBUG(printk(KERN_INFO "%s: norm=bw60\n",adp->name));
-+			i2c_smbus_write_byte_data(client,0x2E,0x81);
- 			return VIDEO_MODE_NTSC;
- 		}
--		DEBUG(printk(KERN_INFO "%s: norm=bw50\n",dev->name));
--		saa7110_write(decoder,0x2E,0x9A);
-+		DEBUG(printk(KERN_INFO "%s: norm=bw50\n",adp->name));
-+		i2c_smbus_write_byte_data(client,0x2E,0x9A);
- 		return VIDEO_MODE_PAL;
- 	}
- 
--	saa7110_write(decoder,0x06,0x00);
-+	i2c_smbus_write_byte_data(client,0x06,0x00);
- 	if (status & 0x20) {	/* 60Hz */
--		DEBUG(printk(KERN_INFO "%s: norm=ntsc\n",dev->name));
--		saa7110_write(decoder,0x0D,0x06);
--		saa7110_write(decoder,0x11,0x2C);
--		saa7110_write(decoder,0x2E,0x81);
-+		DEBUG(printk(KERN_INFO "%s: norm=ntsc\n",adp->name));
-+		i2c_smbus_write_byte_data(client,0x0D,0x06);
-+		i2c_smbus_write_byte_data(client,0x11,0x2C);
-+		i2c_smbus_write_byte_data(client,0x2E,0x81);
- 		return VIDEO_MODE_NTSC;
- 	}
- 
- 	/* 50Hz -> PAL/SECAM */
--	saa7110_write(decoder,0x0D,0x06);
--	saa7110_write(decoder,0x11,0x59);
--	saa7110_write(decoder,0x2E,0x9A);
-+	i2c_smbus_write_byte_data(client,0x0D,0x06);
-+	i2c_smbus_write_byte_data(client,0x11,0x59);
-+	i2c_smbus_write_byte_data(client,0x2E,0x9A);
- 
- 	mdelay(150);	/* pause 150 ms */
- 
--	status = saa7110_read(decoder);
-+	status = i2c_smbus_read_byte(client);
- 	if ((status & 0x03) == 0x01) {
- 		DEBUG(printk(KERN_INFO "%s: norm=secam\n",dev->name));
--		saa7110_write(decoder,0x0D,0x07);
-+		i2c_smbus_write_byte_data(client,0x0D,0x07);
- 		return VIDEO_MODE_SECAM;
- 	}
- 	DEBUG(printk(KERN_INFO "%s: norm=pal\n",dev->name));
-@@ -188,7 +147,7 @@
- }
- 
- static
--int saa7110_attach(struct i2c_device *device)
-+int saa7110_attach(struct i2c_adapter *adap, int  addr, unsigned short flags, int kind)
- {
- static	const unsigned char initseq[] = {
- 	     0, 0x4C, 0x3C, 0x0D, 0xEF, 0xBD, 0xF0, 0x00, 0x00,
-@@ -198,20 +157,28 @@
- 		0xD9, 0x17, 0x40, 0x41, 0x80, 0x41, 0x80, 0x4F,
- 		0xFE, 0x01, 0xCF, 0x0F, 0x03, 0x01, 0x81, 0x03,
- 		0x40, 0x75, 0x01, 0x8C, 0x03};
--	struct	saa7110*	decoder;
-+	struct	saa7110	*decoder;
-+	struct i2c_client *client;
- 	int			rv;
--
--	device->data = decoder = kmalloc(sizeof(struct saa7110), GFP_KERNEL);
--	if (device->data == 0)
-+	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));
-+
-+	decoder = kmalloc(sizeof(*decoder), GFP_KERNEL);
-+	if (decoder == NULL) {
-+		kfree(client);
-+		return -ENOMEM;
-+		}
- 
- 	/* clear our private data */
--	memset(decoder, 0, sizeof(struct saa7110));
--	strcpy(device->name, "saa7110");
--	decoder->bus = device->bus;
--	decoder->addr = device->addr;
-+	memset(decoder, 0, sizeof(*decoder));
-+	strcpy(client->name, IF_NAME);
-+	decoder->client = client;
-+	client->data = decoder;
-+	decoder->addr = addr;
- 	decoder->norm = VIDEO_MODE_PAL;
- 	decoder->input = 0;
- 	decoder->enable = 1;
-@@ -220,40 +187,52 @@
- 	decoder->hue = 32768;
- 	decoder->sat = 32768;
- 
--	rv = saa7110_write_block(decoder, initseq, sizeof(initseq));
-+	rv = i2c_master_send(client, initseq, sizeof(initseq));
- 	if (rv < 0)
--		printk(KERN_ERR "%s_attach: init status %d\n", device->name, rv);
-+		printk(KERN_ERR "%s_attach: init status %d\n", client->name, rv);
- 	else {
--		saa7110_write(decoder,0x21,0x16);
--		saa7110_write(decoder,0x0D,0x04);
--		DEBUG(printk(KERN_INFO "%s_attach: chip version %x\n", device->name, saa7110_read(decoder)));
--		saa7110_write(decoder,0x0D,0x06);
-+		i2c_smbus_write_byte_data(client,0x21,0x16);
-+		i2c_smbus_write_byte_data(client,0x0D,0x04);
-+		DEBUG(printk(KERN_INFO "%s_attach: chip version %x\n", client->name, i2c_smbus_read_byte(client)));
-+		i2c_smbus_write_byte_data(client,0x0D,0x06);
- 	}
- 
-+	init_MUTEX(&decoder->lock);
-+	i2c_attach_client(client);
- 	/* setup and implicit mode 0 select has been performed */
- 	return 0;
- }
- 
-+static 
-+int saa7110_probe(struct i2c_adapter *adap) 
-+{
-+	return i2c_probe(adap, &addr_data, saa7110_attach);
-+}
-+
- static
--int saa7110_detach(struct i2c_device *device)
-+int saa7110_detach(struct i2c_client *client)
- {
--	struct saa7110* decoder = device->data;
-+	struct saa7110* decoder = client->data;
- 
--	DEBUG(printk(KERN_INFO "%s_detach\n",device->name));
-+	i2c_detach_client(client);
-+
-+	DEBUG(printk(KERN_INFO "%s_detach\n",client->name));
- 
- 	/* stop further output */
--	saa7110_write(decoder,0x0E,0x00);
-+	i2c_smbus_write_byte_data(client,0x0E,0x00);
- 
--	kfree(device->data);
-+	kfree(decoder);
-+	kfree(client);
- 
- 	return 0;
- }
- 
- static
--int saa7110_command(struct i2c_device *device, unsigned int cmd, void *arg)
-+int saa7110_command(struct i2c_client *client, unsigned int cmd, void *arg)
- {
--	struct saa7110* decoder = device->data;
-+	struct saa7110* decoder = client->data;
- 	int	v;
- 
- 	switch (cmd) {
-@@ -272,11 +251,11 @@
- 
- 	 case DECODER_GET_STATUS:
- 		{
--			struct saa7110* decoder = device->data;
-+			struct saa7110* decoder = client->data;
- 			int status;
- 			int res = 0;
- 
--			status = i2c_read(device->bus,device->addr|1);
-+			status = i2c_smbus_read_byte(client);
- 			if (status & 0x40)
- 				res |= DECODER_STATUS_GOOD;
- 			if (status & 0x03)
-@@ -301,26 +280,26 @@
- 		v = *(int*)arg;
- 		if (decoder->norm != v) {
- 			decoder->norm = v;
--			saa7110_write(decoder, 0x06, 0x00);
-+			i2c_smbus_write_byte_data(client, 0x06, 0x00);
- 			switch (v) {
- 			 case VIDEO_MODE_NTSC:
--				saa7110_write(decoder, 0x0D, 0x06);
--				saa7110_write(decoder, 0x11, 0x2C);
--				saa7110_write(decoder, 0x30, 0x81);
--				saa7110_write(decoder, 0x2A, 0xDF);
-+				i2c_smbus_write_byte_data(client, 0x0D, 0x06);
-+				i2c_smbus_write_byte_data(client, 0x11, 0x2C);
-+				i2c_smbus_write_byte_data(client, 0x30, 0x81);
-+				i2c_smbus_write_byte_data(client, 0x2A, 0xDF);
- 				break;
- 			 case VIDEO_MODE_PAL:
--				saa7110_write(decoder, 0x0D, 0x06);
--				saa7110_write(decoder, 0x11, 0x59);
--				saa7110_write(decoder, 0x2E, 0x9A);
-+				i2c_smbus_write_byte_data(client, 0x0D, 0x06);
-+				i2c_smbus_write_byte_data(client, 0x11, 0x59);
-+				i2c_smbus_write_byte_data(client, 0x2E, 0x9A);
- 				break;
- 			 case VIDEO_MODE_SECAM:
--				saa7110_write(decoder, 0x0D, 0x07);
--				saa7110_write(decoder, 0x11, 0x59);
--				saa7110_write(decoder, 0x2E, 0x9A);
-+				i2c_smbus_write_byte_data(client, 0x0D, 0x07);
-+				i2c_smbus_write_byte_data(client, 0x11, 0x59);
-+				i2c_smbus_write_byte_data(client, 0x2E, 0x9A);
- 				break;
- 			 case VIDEO_MODE_AUTO:
--				*(int*)arg = determine_norm(device);
-+				*(int*)arg = determine_norm(client);
- 				break;
- 			 default:
- 				return -EPERM;
-@@ -334,7 +313,7 @@
- 			return -EINVAL;
- 		if (decoder->input != v) {
- 			decoder->input = v;
--			saa7110_selmux(device, v);
-+			saa7110_selmux(client, v);
- 		}
- 		break;
- 
-@@ -349,7 +328,7 @@
- 		v = *(int*)arg;
- 		if (decoder->enable != v) {
- 			decoder->enable = v;
--			saa7110_write(decoder,0x0E, v ? 0x18 : 0x00);
-+			i2c_smbus_write_byte_data(client,0x0E, v ? 0x18 : 0x00);
- 		}
- 		break;
- 
-@@ -360,22 +339,22 @@
- 			if (decoder->bright != pic->brightness) {
- 				/* We want 0 to 255 we get 0-65535 */
- 				decoder->bright = pic->brightness;
--				saa7110_write(decoder, 0x19, decoder->bright >> 8);
-+				i2c_smbus_write_byte_data(client, 0x19, decoder->bright >> 8);
- 			}
- 			if (decoder->contrast != pic->contrast) {
- 				/* We want 0 to 127 we get 0-65535 */
- 				decoder->contrast = pic->contrast;
--				saa7110_write(decoder, 0x13, decoder->contrast >> 9);
-+				i2c_smbus_write_byte_data(client, 0x13, decoder->contrast >> 9);
- 			}
- 			if (decoder->sat != pic->colour) {
- 				/* We want 0 to 127 we get 0-65535 */
- 				decoder->sat = pic->colour;
--				saa7110_write(decoder, 0x12, decoder->sat >> 9);
-+				i2c_smbus_write_byte_data(client, 0x12, decoder->sat >> 9);
- 			}
- 			if (decoder->hue != pic->hue) {
- 				/* We want -128 to 127 we get 0-65535 */
- 				decoder->hue = pic->hue;
--				saa7110_write(decoder, 0x07, (decoder->hue>>8)-128);
-+				i2c_smbus_write_byte_data(client, 0x07, (decoder->hue>>8)-128);
- 			}
- 		}
- 		break;
-@@ -383,7 +362,7 @@
- 	 case DECODER_DUMP:
- 		for (v=0; v<34; v+=16) {
- 			int j;
--			DEBUG(printk(KERN_INFO "%s: %03x\n",device->name,v));
-+			DEBUG(printk(KERN_INFO "%s: %03x\n",client->name,v));
- 			for (j=0; j<16; j++) {
- 				DEBUG(printk(KERN_INFO " %02x",decoder->reg[v+j]));
- 			}
-@@ -402,24 +381,30 @@
- 
- static struct i2c_driver i2c_driver_saa7110 =
- {
--	"saa7110",			/* name */
--
--	I2C_DRIVERID_VIDEODECODER,	/* in i2c.h */
--	I2C_SAA7110, I2C_SAA7110+1,	/* Addr range */
--
--	saa7110_attach,
--	saa7110_detach,
--	saa7110_command
-+	.owner		= THIS_MODULE,
-+	.name		= IF_NAME,
-+	.id		= I2C_DRIVERID_SAA7110,
-+	.flags		= I2C_DF_NOTIFY,
-+	.attach_adapter	= saa7110_probe,
-+	.detach_adapter	= saa7110_detach,
-+	.command	= saa7110_command,
- };
-+static struct i2c_client client_template = {
-+	"saa7110_client",
-+	-1,
-+	0,
-+	0,
-+	NULL,
-+	&i2c_driver_saa7110
-+};
- 
- static int saa7110_init(void)
- {
--	return i2c_register_driver(&i2c_driver_saa7110);
-+	return i2c_add_driver(&i2c_driver_saa7110);
- }
- 
- static void saa7110_exit(void)
- {
--	i2c_unregister_driver(&i2c_driver_saa7110);
-+	i2c_del_driver(&i2c_driver_saa7110);
- }
- 
- 
- 
-
diff -Nru a/Documentation/i2c/i2c-stub b/Documentation/i2c/i2c-stub
--- a/Documentation/i2c/i2c-stub	2005-01-10 20:11:23 -08:00
+++ b/Documentation/i2c/i2c-stub	2005-01-10 20:11:23 -08:00
@@ -2,13 +2,18 @@
 
 DESCRIPTION:
 
-This module is a very simple fake I2C/SMBus driver.  It implements three
-types of SMBus commands: write quick, (r/w) byte data, and (r/w) word data.
+This module is a very simple fake I2C/SMBus driver.  It implements four
+types of SMBus commands: write quick, (r/w) byte, (r/w) byte data, and
+(r/w) word data.
 
 No hardware is needed nor associated with this module.  It will accept write
 quick commands to all addresses; it will respond to the other commands (also
 to all addresses) by reading from or writing to an array in memory.  It will
 also spam the kernel logs for every command it handles.
+
+A pointer register with auto-increment is implemented for all byte
+operations.  This allows for continuous byte reads like those supported by
+EEPROMs, among others.
 
 The typical use-case is like this:
 	1. load this module
diff -Nru a/Documentation/i386/boot.txt b/Documentation/i386/boot.txt
--- a/Documentation/i386/boot.txt	2005-01-10 20:11:20 -08:00
+++ b/Documentation/i386/boot.txt	2005-01-10 20:11:20 -08:00
@@ -173,6 +173,9 @@
 	2  bootsect-loader
 	3  SYSLINUX
 	4  EtherBoot
+	5  ELILO
+	7  GRuB
+	8  U-BOOT
 
 	Please contact <hpa@zytor.com> if you need a bootloader ID
 	value assigned.
diff -Nru a/Documentation/i386/zero-page.txt b/Documentation/i386/zero-page.txt
--- a/Documentation/i386/zero-page.txt	2005-01-10 20:11:18 -08:00
+++ b/Documentation/i386/zero-page.txt	2005-01-10 20:11:18 -08:00
@@ -74,6 +74,10 @@
 0x21c	unsigned long	INITRD_SIZE, size in bytes of ramdisk image
 0x220	4 bytes		(setup.S)
 0x224	unsigned short	setup.S heap end pointer
+0x226   unsigned short	zero_pad
+0x228   unsigned long	cmd_line_ptr
+0x22c   unsigned long	ramdisk_max
+0x230   16 bytes 	trampoline
 0x290 - 0x2cf		EDD_MBR_SIG_BUFFER (edd.S)
 0x2d0 - 0x600		E820MAP
 0x600 - 0x7ff		EDDBUF (edd.S) for disk signature read sector
diff -Nru a/Documentation/ide.txt b/Documentation/ide.txt
--- a/Documentation/ide.txt	2005-01-10 20:11:20 -08:00
+++ b/Documentation/ide.txt	2005-01-10 20:11:20 -08:00
@@ -297,6 +297,8 @@
 
  "ide=reverse"		: formerly called to pci sub-system, but now local.
 
+ "ide=nodma"		: disable DMA globally for the IDE subsystem.
+
 The following are valid ONLY on ide0, which usually corresponds
 to the first ATA interface found on the particular host, and the defaults for
 the base,ctl ports must not be altered.
diff -Nru a/Documentation/infiniband/ipoib.txt b/Documentation/infiniband/ipoib.txt
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/Documentation/infiniband/ipoib.txt	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,56 @@
+IP OVER INFINIBAND
+
+  The ib_ipoib driver is an implementation of the IP over InfiniBand
+  protocol as specified by the latest Internet-Drafts issued by the
+  IETF ipoib working group.  It is a "native" implementation in the
+  sense of setting the interface type to ARPHRD_INFINIBAND and the
+  hardware address length to 20 (earlier proprietary implementations
+  masqueraded to the kernel as ethernet interfaces).
+
+Partitions and P_Keys
+
+  When the IPoIB driver is loaded, it creates one interface for each
+  port using the P_Key at index 0.  To create an interface with a
+  different P_Key, write the desired P_Key into the main interface's
+  /sys/class/net/<intf name>/create_child file.  For example:
+
+    echo 0x8001 > /sys/class/net/ib0/create_child
+
+  This will create an interface named ib0.8001 with P_Key 0x8001.  To
+  remove a subinterface, use the "delete_child" file:
+
+    echo 0x8001 > /sys/class/net/ib0/delete_child
+
+  The P_Key for any interface is given by the "pkey" file, and the
+  main interface for a subinterface is in "parent."
+
+Debugging Information
+
+  By compiling the IPoIB driver with CONFIG_INFINIBAND_IPOIB_DEBUG set
+  to 'y', tracing messages are compiled into the driver.  They are
+  turned on by setting the module parameters debug_level and
+  mcast_debug_level to 1.  These parameters can be controlled at
+  runtime through files in /sys/module/ib_ipoib/.
+
+  CONFIG_INFINIBAND_IPOIB_DEBUG also enables the "ipoib_debugfs"
+  virtual filesystem.  By mounting this filesystem, for example with
+
+    mkdir -p /ipoib_debugfs
+    mount -t ipoib_debugfs none /ipoib_debufs
+
+  it is possible to get statistics about multicast groups from the
+  files /ipoib_debugfs/ib0_mcg and so on.
+
+  The performance impact of this option is negligible, so it
+  is safe to enable this option with debug_level set to 0 for normal
+  operation.
+
+  CONFIG_INFINIBAND_IPOIB_DEBUG_DATA enables even more debug output in
+  the data path when data_debug_level is set to 1.  However, even with
+  the output disabled, enabling this configuration option will affect
+  performance, because it adds tests to the fast path.
+
+References
+
+  IETF IP over InfiniBand (ipoib) Working Group
+    http://ietf.org/html.charters/ipoib-charter.html
diff -Nru a/Documentation/infiniband/sysfs.txt b/Documentation/infiniband/sysfs.txt
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/Documentation/infiniband/sysfs.txt	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,64 @@
+SYSFS FILES
+
+  For each InfiniBand device, the InfiniBand drivers create the
+  following files under /sys/class/infiniband/<device name>:
+
+    node_guid      - Node GUID
+    sys_image_guid - System image GUID
+
+  In addition, there is a "ports" subdirectory, with one subdirectory
+  for each port.  For example, if mthca0 is a 2-port HCA, there will
+  be two directories:
+
+    /sys/class/infiniband/mthca0/ports/1
+    /sys/class/infiniband/mthca0/ports/2
+
+  (A switch will only have a single "0" subdirectory for switch port
+  0; no subdirectory is created for normal switch ports)
+
+  In each port subdirectory, the following files are created:
+
+    cap_mask       - Port capability mask
+    lid            - Port LID
+    lid_mask_count - Port LID mask count
+    rate           - Port data rate (active width * active speed)
+    sm_lid         - Subnet manager LID for port's subnet
+    sm_sl          - Subnet manager SL for port's subnet
+    state          - Port state (DOWN, INIT, ARMED, ACTIVE or ACTIVE_DEFER)
+
+  There is also a "counters" subdirectory, with files
+
+    VL15_dropped
+    excessive_buffer_overrun_errors
+    link_downed
+    link_error_recovery
+    local_link_integrity_errors
+    port_rcv_constraint_errors
+    port_rcv_data
+    port_rcv_errors
+    port_rcv_packets
+    port_rcv_remote_physical_errors
+    port_rcv_switch_relay_errors
+    port_xmit_constraint_errors
+    port_xmit_data
+    port_xmit_discards
+    port_xmit_packets
+    symbol_error
+
+  Each of these files contains the corresponding value from the port's
+  Performance Management PortCounters attribute, as described in
+  section 16.1.3.5 of the InfiniBand Architecture Specification.
+
+  The "pkeys" and "gids" subdirectories contain one file for each
+  entry in the port's P_Key or GID table respectively.  For example,
+  ports/1/pkeys/10 contains the value at index 10 in port 1's P_Key
+  table.
+
+MTHCA
+
+  The Mellanox HCA driver also creates the files:
+
+    hw_rev   - Hardware revision number
+    fw_ver   - Firmware version
+    hca_type - HCA type: "MT23108", "MT25208 (MT23108 compat mode)",
+               or "MT25208"
diff -Nru a/Documentation/infiniband/user_mad.txt b/Documentation/infiniband/user_mad.txt
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/Documentation/infiniband/user_mad.txt	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,81 @@
+USERSPACE MAD ACCESS
+
+Device files
+
+  Each port of each InfiniBand device has a "umad" device attached.
+  For example, a two-port HCA will have two devices, while a switch
+  will have one device (for switch port 0).
+
+Creating MAD agents
+
+  A MAD agent can be created by filling in a struct ib_user_mad_reg_req
+  and then calling the IB_USER_MAD_REGISTER_AGENT ioctl on a file
+  descriptor for the appropriate device file.  If the registration
+  request succeeds, a 32-bit id will be returned in the structure.
+  For example:
+
+	struct ib_user_mad_reg_req req = { /* ... */ };
+	ret = ioctl(fd, IB_USER_MAD_REGISTER_AGENT, (char *) &req);
+        if (!ret)
+		my_agent = req.id;
+	else
+		perror("agent register");
+
+  Agents can be unregistered with the IB_USER_MAD_UNREGISTER_AGENT
+  ioctl.  Also, all agents registered through a file descriptor will
+  be unregistered when the descriptor is closed.
+
+Receiving MADs
+
+  MADs are received using read().  The buffer passed to read() must be
+  large enough to hold at least one struct ib_user_mad.  For example:
+
+	struct ib_user_mad mad;
+	ret = read(fd, &mad, sizeof mad);
+	if (ret != sizeof mad)
+		perror("read");
+
+  In addition to the actual MAD contents, the other struct ib_user_mad
+  fields will be filled in with information on the received MAD.  For
+  example, the remote LID will be in mad.lid.
+
+  If a send times out, a receive will be generated with mad.status set
+  to ETIMEDOUT.  Otherwise when a MAD has been successfully received,
+  mad.status will be 0.
+
+  poll()/select() may be used to wait until a MAD can be read.
+
+Sending MADs
+
+  MADs are sent using write().  The agent ID for sending should be
+  filled into the id field of the MAD, the destination LID should be
+  filled into the lid field, and so on.  For example:
+
+	struct ib_user_mad mad;
+
+	/* fill in mad.data */
+
+	mad.id  = my_agent;	/* req.id from agent registration */
+	mad.lid = my_dest;	/* in network byte order... */
+	/* etc. */
+
+	ret = write(fd, &mad, sizeof mad);
+	if (ret != sizeof mad)
+		perror("write");
+
+/dev files
+
+  To create the appropriate character device files automatically with
+  udev, a rule like
+
+    KERNEL="umad*", NAME="infiniband/%k"
+
+  can be used.  This will create a device node named
+
+    /dev/infiniband/umad0
+
+  for the first port, and so on.  The InfiniBand device and port
+  associated with this device can be determined from the files
+
+    /sys/class/infiniband_mad/umad0/ibdev
+    /sys/class/infiniband_mad/umad0/port
diff -Nru a/Documentation/ioctl-number.txt b/Documentation/ioctl-number.txt
--- a/Documentation/ioctl-number.txt	2005-01-10 20:11:22 -08:00
+++ b/Documentation/ioctl-number.txt	2005-01-10 20:11:22 -08:00
@@ -72,6 +72,7 @@
 0x09	all	linux/md.h
 0x12	all	linux/fs.h
 		linux/blkpg.h
+0x1b	all	InfiniBand Subsystem	<http://www.openib.org/>
 0x20	all	drivers/cdrom/cm206.h
 0x22	all	scsi/sg.h
 '#'	00-3F	IEEE 1394 Subsystem	Block for the entire subsystem
diff -Nru a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
--- a/Documentation/kernel-parameters.txt	2005-01-10 20:11:23 -08:00
+++ b/Documentation/kernel-parameters.txt	2005-01-10 20:11:23 -08:00
@@ -29,6 +29,7 @@
 	CD	Appropriate CD support is enabled.
 	DEVFS	devfs support is enabled. 
 	DRM	Direct Rendering Management support is enabled. 
+	EDD	BIOS Enhanced Disk Drive Services (EDD) is enabled
 	EFI	EFI Partitioning (GPT) is enabled
 	EIDE	EIDE/ATAPI support is enabled.
 	FB	The frame buffer device is enabled.
@@ -50,6 +51,7 @@
 	MOUSE	Appropriate mouse support is enabled.
 	MTD	MTD support is enabled.
 	NET	Appropriate network support is enabled.
+	NUMA	NUMA support is enabled.
 	NFS	Appropriate NFS support is enabled.
 	OSS	OSS sound support is enabled.
 	PARIDE	The ParIDE subsystem is enabled.
@@ -150,6 +152,8 @@
 			debugging. After system has booted up, it can be set
 			via /proc/acpi/debug_level.
 
+	acpi_fake_ecdt	[HW,ACPI] Workaround failure due to BIOS lacking ECDT
+
 	ad1816=		[HW,OSS]
 			Format: <io>,<irq>,<dma>,<dma2>
 			See also Documentation/sound/oss/AD1816.
@@ -408,6 +412,10 @@
 
 	edb=		[HW,PS2]
 
+	edd=		[EDD]
+			Format: {"of[f]" | "sk[ipmbr]"}
+			See comment in arch/i386/boot/edd.S
+
 	eicon=		[HW,ISDN] 
 			Format: <id>,<membase>,<irq>
 
@@ -474,6 +482,10 @@
  
 	gvp11=		[HW,SCSI]
 
+	hashdist=	[KNL,NUMA] Large hashes allocated during boot
+			are distributed across NUMA nodes.  Defaults on
+			for IA-64, off otherwise.
+
 	hcl=		[IA-64] SGI's Hardware Graph compatibility layer
 
 	hd=		[EIDE] (E)IDE hard drive subsystem geometry
@@ -498,6 +510,8 @@
 	i8042.dumbkbd	[HW] Pretend that controlled can only read data from
 			     keyboard and can not control its state
 			     (Don't attempt to blink the leds)
+	i8042.noacpi	[HW] Don't use ACPI to discover KBD/AUX controller
+			     settings
 	i8042.noaux	[HW] Don't check for auxiliary (== mouse) port
 	i8042.nomux	[HW] Don't check presence of an active multiplexing
 			     controller
@@ -573,11 +587,13 @@
 			Format: <RDP>, <reset>, <pci_scan>, <verbosity>
 
 	isolcpus=	[KNL,SMP] Isolate CPUs from the general scheduler.
-			Format: <cpu number>, ..., <cpu number>
+			Format: <cpu number>,...,<cpu number>
 			This option can be used to specify one or more CPUs
 			to isolate from the general SMP balancing and scheduling
 			algorithms. The only way to move a process onto or off
 			an "isolated" CPU is via the CPU affinity syscalls.
+			<cpu number> begins at 0 and the maximum value is
+			"number of CPUs in system - 1".
 
 			This option is the preferred way to isolate CPUs. The
 			alternative - manually setting the CPU mask of all tasks
@@ -872,6 +888,13 @@
 	panic=		[KNL] Kernel behaviour on panic
 			Format: <timeout>
 
+	parkbd.port=	[HW] Parallel port number the keyboard adapter is
+			connected to, default is 0.
+			Format: <parport#>
+	parkbd.mode=	[HW] Parallel port keyboard adapter mode of operation,
+			0 for XT, 1 for AT (default is AT).
+			Format: <mode> 
+
 	parport=0	[HW,PPT]	Specify parallel ports. 0 disables.
 	parport=auto			Use 'auto' to force the driver to use
 	parport=0xBBB[,IRQ[,DMA]]	any IRQ/DMA settings detected (the
@@ -1319,8 +1342,12 @@
 	thash_entries=	[KNL,NET]
 			Set number of hash buckets for TCP connection
 
-	tipar=		[HW]
-			See header of drivers/char/tipar.c.
+	tipar.timeout=	[HW,PPT]
+			Set communications timeout in tenths of a second
+			(default 15).
+
+	tipar.delay=	[HW,PPT]
+			Set inter-bit delay in microseconds (default 10).
 
 	tiusb=		[HW,USB] Texas Instruments' USB GraphLink (aka SilverLink)
 			Format: <timeout>
diff -Nru a/Documentation/mkdev.cciss b/Documentation/mkdev.cciss
--- a/Documentation/mkdev.cciss	2005-01-10 20:11:16 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,40 +0,0 @@
-#!/bin/sh
-# Script to create device nodes for SMART array controllers
-# Usage:
-#	mkdev.cciss [num controllers] [num log volumes] [num partitions]
-#
-# With no arguments, the script assumes 1 controller, 16 logical volumes,
-# and 16 partitions/volume, which is adequate for most configurations.
-#
-# If you had 5 controllers and were planning on no more than 4 logical volumes
-# each, using a maximum of 8 partitions per volume, you could say:
-#
-# mkdev.cciss 5 4 8
-#
-# Of course, this has no real benefit over "mkdev.cciss 5" except that it
-# doesn't create so many device nodes in /dev/cciss.
-
-NR_CTLR=${1-1}
-NR_VOL=${2-16}
-NR_PART=${3-16}
-
-if [ ! -d /dev/cciss ]; then
-	mkdir -p /dev/cciss
-fi
-
-C=0; while [ $C -lt $NR_CTLR ]; do
-	MAJ=`expr $C + 104`
-	D=0; while [ $D -lt $NR_VOL ]; do
-		P=0; while [ $P -lt $NR_PART ]; do
-			MIN=`expr $D \* 16 + $P`
-			if [ $P -eq 0 ]; then
-				mknod /dev/cciss/c${C}d${D} b $MAJ $MIN
-			else
-				mknod /dev/cciss/c${C}d${D}p${P} b $MAJ $MIN
-			fi
-			P=`expr $P + 1`
-		done
-		D=`expr $D + 1`
-	done
-	C=`expr $C + 1`
-done
diff -Nru a/Documentation/networking/e100.txt b/Documentation/networking/e100.txt
--- a/Documentation/networking/e100.txt	2005-01-10 20:11:22 -08:00
+++ b/Documentation/networking/e100.txt	2005-01-10 20:11:22 -08:00
@@ -1,7 +1,7 @@
 Linux* Base Driver for the Intel(R) PRO/100 Family of Adapters
 ==============================================================
 
-September 13, 2004
+November 17, 2004
 
 
 Contents
@@ -18,9 +18,7 @@
 ===============
 
 This file describes the Linux* Base Driver for the Intel(R) PRO/100 Family of
-Adapters, version 3.2.x.  This driver includes support for Itanium(TM)2 and
-EM64T systems.
-
+Adapters, version 3.3.x.  This driver supports 2.4.x and 2.6.x kernels. 
 
 Identifying Your Adapter
 ========================
@@ -118,12 +116,6 @@
 
   The latest release of ethtool can be found at:
   http://sf.net/projects/gkernel.  
-
-  After ethtool is installed, ethtool-copy.h must be copied and renamed to
-  ethtool.h in your kernel source tree at <linux_kernel_src>/include/linux.  
-  Backup the original ethtool.h as needed before copying.  The driver then 
-  must be recompiled in order to take advantage of the latest ethtool 
-  features.
 
   NOTE: This driver uses mii support from the kernel. As a result, when 
   there is no link, ethtool will report speed/duplex to be 10/half.
diff -Nru a/Documentation/networking/e1000.txt b/Documentation/networking/e1000.txt
--- a/Documentation/networking/e1000.txt	2005-01-10 20:11:21 -08:00
+++ b/Documentation/networking/e1000.txt	2005-01-10 20:11:21 -08:00
@@ -1,7 +1,7 @@
 Linux* Base Driver for the Intel(R) PRO/1000 Family of Adapters
 ===============================================================
 
-September 13, 2004
+November 17, 2004
 
 
 Contents
@@ -20,8 +20,7 @@
 ===============
 
 This file describes the Linux* Base Driver for the Intel(R) PRO/1000 Family
-of Adapters, version 5.x.x.  This driver includes support for Itanium(TM)2 
-and EM64T systems.
+of Adapters, version 5.x.x.  
 
 For questions related to hardware requirements, refer to the documentation 
 supplied with your Intel PRO/1000 adapter. All hardware requirements listed 
@@ -145,9 +144,11 @@
 Default Value: 256
     This value is the number of receive descriptors allocated by the driver. 
     Increasing this value allows the driver to buffer more incoming packets. 
-    Each descriptor is 16 bytes.  A receive buffer is also allocated for each
-    descriptor and can be either 2048, 4096, 8192, or 16384 bytes, depending 
-    on the MTU setting. The maximum MTU size is 16110.
+    Each descriptor is 16 bytes.  A receive buffer is allocated for each
+    descriptor and can either be 2048 or 4096 bytes long, depending on the MTU 
+
+    setting. An incoming packet can span one or more receive descriptors. 
+    The maximum MTU size is 16110.
 
     NOTE: MTU designates the frame size. It only needs to be set for Jumbo 
           Frames.
@@ -251,17 +252,16 @@
   also be forced.
 
 The AutoNeg parameter is used when more control is required over the auto-
-negotiation process.  When this parameter is used, Speed and Duplex must not 
-be specified.  This parameter is a bitmap that specifies which speed and 
-duplex settings are advertised to the link partner.
-
-Bit            7      6      5       4       3      2      1       0
-Speed (Mbps)   N/A    N/A    1000    N/A     100    100    10      10
-Duplex                       Full            Full   Half   Full    Half
-
-For example to limit the negotiated speed/duplex on the interface to 10 Mbps 
-Half or Full duplex, set AutoNeg to 0x02: 
-    insmod e1000 AutoNeg=0x02
+negotiation process. When this parameter is used, Speed and Duplex parameters 
+must not be specified. The following table describes supported values for the 
+AutoNeg parameter:
+
+Speed (Mbps)   		 1000      100    100    10     10
+Duplex                   Full      Full   Half   Full   Half
+Value (in base 16)       0x20      0x08   0x04   0x02   0x01
+
+Example: insmod e1000 AutoNeg=0x03, loads e1000 and specifies (10 full duplex, 
+10 half duplex) for negotiation with the peer.
 
 Note that setting AutoNeg does not guarantee that the board will link at the 
 highest specified speed or duplex mode, but the board will link at the 
@@ -333,11 +333,7 @@
   version 1.6 or later is required for this functionality.
 
   The latest release of ethtool can be found from
-  http://sf.net/projects/gkernel.  After ethtool is installed,
-  ethtool-copy.h must be copied and renamed to ethtool.h in your kernel
-  source tree at <linux_kernel_src>/include/linux.  Backup the original
-  ethtool.h as needed before copying.  The driver then must be recompiled
-  in order to take advantage of the latest ethtool features.
+  http://sf.net/projects/gkernel.  
 
   NOTE: Ethtool 1.6 only supports a limited set of ethtool options. Support 
   for a more complete ethtool feature set can be enabled by upgrading 
diff -Nru a/Documentation/pm.txt b/Documentation/pm.txt
--- a/Documentation/pm.txt	2005-01-10 20:11:17 -08:00
+++ b/Documentation/pm.txt	2005-01-10 20:11:17 -08:00
@@ -91,54 +91,6 @@
 void pm_unregister_all(pm_callback cback);
 
 /*
- * Device idle/use detection
- *
- * In general, drivers for all devices should call "pm_access"
- * before accessing the hardware (ie. before reading or modifying
- * a hardware register).  Request or packet-driven drivers should
- * additionally call "pm_dev_idle" when a device is not being used.
- *
- * Examples:
- * 1) A keyboard driver would call pm_access whenever a key is pressed
- * 2) A network driver would call pm_access before submitting
- *    a packet for transmit or receive and pm_dev_idle when its
- *    transfer and receive queues are empty.
- * 3) A VGA driver would call pm_access before it accesses any
- *    of the video controller registers
- *
- * Ultimately, the PM policy manager uses the access and idle
- * information to decide when to suspend individual devices
- * or when to suspend the entire system
- */
-
-/*
- * Description: Update device access time and wake up device, if necessary
- *
- * Parameters:
- *   dev - PM device previously returned from pm_register
- *
- * Details: If called from an interrupt handler pm_access updates
- *          access time but should never need to wake up the device
- *          (if device is generating interrupts, it should be awake
- *          already)  This is important as we can not wake up
- *          devices from an interrupt handler.
- */
-void pm_access(struct pm_dev *dev);
-
-/*
- * Description: Identify device as currently being idle
- *
- * Parameters:
- *   dev - PM device previously returned from pm_register
- *
- * Details: A call to pm_dev_idle might signal to the policy manager
- *          to put a device to sleep.  If a new device request arrives
- *          between the call to pm_dev_idle and the pm_callback
- *          callback, the driver should fail the pm_callback request.
- */
-void pm_dev_idle(struct pm_dev *dev);
-
-/*
  * Power management request callback
  *
  * Parameters:
diff -Nru a/Documentation/powerpc/00-INDEX b/Documentation/powerpc/00-INDEX
--- a/Documentation/powerpc/00-INDEX	2005-01-10 20:11:21 -08:00
+++ b/Documentation/powerpc/00-INDEX	2005-01-10 20:11:21 -08:00
@@ -5,6 +5,9 @@
 
 00-INDEX
 	- this file
+cpu_features.txt
+	- info on how we support a variety of CPUs with minimal compile-time
+	options.
 ppc_htab.txt
 	- info about the Linux/PPC /proc/ppc_htab entry
 smp.txt
diff -Nru a/Documentation/powerpc/cpu_features.txt b/Documentation/powerpc/cpu_features.txt
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/Documentation/powerpc/cpu_features.txt	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,56 @@
+Hollis Blanchard <hollis@austin.ibm.com>
+5 Jun 2002
+
+This document describes the system (including self-modifying code) used in the
+PPC Linux kernel to support a variety of PowerPC CPUs without requiring
+compile-time selection.
+
+Early in the boot process the ppc32 kernel detects the current CPU type and
+chooses a set of features accordingly. Some examples include Altivec support,
+split instruction and data caches, and if the CPU supports the DOZE and NAP
+sleep modes.
+
+Detection of the feature set is simple. A list of processors can be found in
+arch/ppc/kernel/cputable.c. The PVR register is masked and compared with each
+value in the list. If a match is found, the cpu_features of cur_cpu_spec is
+assigned to the feature bitmask for this processor and a __setup_cpu function
+is called.
+
+C code may test 'cur_cpu_spec[smp_processor_id()]->cpu_features' for a
+particular feature bit. This is done in quite a few places, for example
+in ppc_setup_l2cr().
+
+Implementing cpufeatures in assembly is a little more involved. There are
+several paths that are performance-critical and would suffer if an array
+index, structure dereference, and conditional branch were added. To avoid the
+performance penalty but still allow for runtime (rather than compile-time) CPU
+selection, unused code is replaced by 'nop' instructions. This nop'ing is
+based on CPU 0's capabilities, so a multi-processor system with non-identical
+processors will not work (but such a system would likely have other problems
+anyways).
+
+After detecting the processor type, the kernel patches out sections of code
+that shouldn't be used by writing nop's over it. Using cpufeatures requires
+just 2 macros (found in include/asm-ppc/cputable.h), as seen in head.S
+transfer_to_handler:
+
+	#ifdef CONFIG_ALTIVEC
+	BEGIN_FTR_SECTION
+		mfspr	r22,SPRN_VRSAVE		/* if G4, save vrsave register value */
+		stw	r22,THREAD_VRSAVE(r23)
+	END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
+	#endif /* CONFIG_ALTIVEC */
+
+If CPU 0 supports Altivec, the code is left untouched. If it doesn't, both
+instructions are replaced with nop's.
+
+The END_FTR_SECTION macro has two simpler variations: END_FTR_SECTION_IFSET
+and END_FTR_SECTION_IFCLR. These simply test if a flag is set (in
+cur_cpu_spec[0]->cpu_features) or is cleared, respectively. These two macros
+should be used in the majority of cases.
+
+The END_FTR_SECTION macros are implemented by storing information about this
+code in the '__ftr_fixup' ELF section. When do_cpu_ftr_fixups
+(arch/ppc/kernel/misc.S) is invoked, it will iterate over the records in
+__ftr_fixup, and if the required feature is not present it will loop writing
+nop's from each BEGIN_FTR_SECTION to END_FTR_SECTION.
diff -Nru a/Documentation/riscom8.txt b/Documentation/riscom8.txt
--- a/Documentation/riscom8.txt	2005-01-10 20:11:15 -08:00
+++ b/Documentation/riscom8.txt	2005-01-10 20:11:15 -08:00
@@ -1,5 +1,12 @@
+* NOTE - this is an unmaintained driver.  The original author cannot be located.
+
+SDL Communications is now SBS Technologies, and does not have any
+information on these ancient ISA cards on their website.
+
+James Nelson <james4765@gmail.com> - 12-12-2004
+
 	This is the README for RISCom/8 multi-port serial driver
-	(C) 1994-1996 D.Gorodchanin (pgmdsg@ibi.com)
+	(C) 1994-1996 D.Gorodchanin
 	See file LICENSE for terms and conditions.
 
 NOTE: English is not my native language. 
@@ -10,47 +17,20 @@
 1) This driver can support up to 4 boards at time.
    Use string "riscom8=0xXXX,0xXXX,0xXXX,0xXXX" at LILO prompt, for
    setting I/O base addresses for boards. If you compile driver
-   as module use insmod options "iobase=0xXXX iobase1=0xXXX iobase2=..."
+   as module use modprobe options "iobase=0xXXX iobase1=0xXXX iobase2=..."
 
 2) The driver partially supports famous 'setserial' program, you can use almost
    any of its options, excluding port & irq settings.
 
 3) There are some misc. defines at the beginning of riscom8.c, please read the 
    comments and try to change some of them in case of problems.
-	
+
 4) I consider the current state of the driver as BETA.
-   If you REALLY think you found a bug, send me e-mail, I hope I'll
-   fix it. For any other problems please ask support@sdlcomm.com.
 
 5) SDL Communications WWW page is http://www.sdlcomm.com.
 
-6) You can use the script at the end of this file to create RISCom/8 devices.
+6) You can use the MAKEDEV program to create RISCom/8 /dev/ttyL* entries.
 
 7) Minor numbers for first board are 0-7, for second 8-15, etc.
 
 22 Apr 1996.
-
--------------------------------cut here-------------------------------------
-#!/bin/bash
-NORMAL_DEVICE=/dev/ttyL
-CALLOUT_DEVICE=/dev/cuL
-NORMAL_MAJOR=48
-CALLOUT_MAJOR=49
-
-echo "Creating devices... "
-for i in 0 1 2 3; do
-	echo "Board No $[$i+1]"
-	for j in 0 1 2 3 4 5 6 7; do
-		k=$[ 8 * $i + $j]
-		rm -f $NORMAL_DEVICE$k 
-		mknod $NORMAL_DEVICE$k c $NORMAL_MAJOR $k
-		chmod a+rw $NORMAL_DEVICE$k
-		echo -n $NORMAL_DEVICE$k" "
-		rm -f $CALLOUT_DEVICE$k 
-		mknod $CALLOUT_DEVICE$k c $CALLOUT_MAJOR $k
-		chmod a+rw $CALLOUT_DEVICE$k
-		echo $CALLOUT_DEVICE$k
-	done
-done
-echo "done."
--------------------------------cut here-------------------------------------
diff -Nru a/Documentation/scsi/ChangeLog b/Documentation/scsi/ChangeLog
--- a/Documentation/scsi/ChangeLog	2005-01-10 20:11:17 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,2023 +0,0 @@
-Sat Jan 18 15:51:45 1997  Richard Henderson  <rth@tamu.edu>
-
-	* Don't play with usage_count directly, instead hand around
-	the module header and use the module macros.
-
-Fri May 17 00:00:00 1996  Leonard N. Zubkoff <lnz@dandelion.com>
-
-	* BusLogic Driver Version 2.0.3 Released.
-
-Tue Apr 16 21:00:00 1996  Leonard N. Zubkoff <lnz@dandelion.com>
-
-	* BusLogic Driver Version 1.3.2 Released.
-
-Sun Dec 31 23:26:00 1995  Leonard N. Zubkoff <lnz@dandelion.com>
-
-	* BusLogic Driver Version 1.3.1 Released.
-
-Fri Nov 10 15:29:49 1995  Leonard N. Zubkoff <lnz@dandelion.com>
-
-	* Released new BusLogic driver.
-
-Wed Aug  9 22:37:04 1995  Andries Brouwer  <aeb@cwi.nl>
-
-	As a preparation for new device code, separated the various
-	functions the request->dev field had into the device proper,
-	request->rq_dev and a status field request->rq_status.
-
-	The 2nd argument of bios_param is now a kdev_t.
-
-Wed Jul 19 10:43:15 1995  Michael Neuffer  <neuffer@goofy.zdv.uni-mainz.de>
-
-        * scsi.c (scsi_proc_info): /proc/scsi/scsi now also lists all
-	attached devices.
-
-	* scsi_proc.c (proc_print_scsidevice): Added. Used by scsi.c and
-	eata_dma_proc.c to produce some device info for /proc/scsi.
-
-	* eata_dma.c (eata_queue)(eata_int_handler)(eata_scsi_done):
-	Changed handling of internal SCSI commands send to the HBA.
-
-
-Wed Jul 19 10:09:17 1995  Michael Neuffer  <neuffer@goofy.zdv.uni-mainz.de>
-
-	* Linux 1.3.11 released.
-
-	* eata_dma.c (eata_queue)(eata_int_handler): Added code to do
-	command latency measurements if requested by root through
-	/proc/scsi interface.
-	Throughout Use HZ constant for time references.
-
-	* eata_pio.c: Use HZ constant for time references.
-
-	* aic7xxx.c, aic7xxx.h, aic7xxx_asm.c: Changed copyright from BSD
-	to GNU style.
-
-	* scsi.h: Added READ_12 command opcode constant
-
-Wed Jul 19 09:25:30 1995  Michael Neuffer <neuffer@goofy.zdv.uni-mainz.de>
-
-	* Linux 1.3.10 released.
-
-	* scsi_proc.c (dispatch_scsi_info): Removed unused variable.
-
-Wed Jul 19 09:25:30 1995  Michael Neuffer  <neuffer@goofy.zdv.uni-mainz.de>
-
-	* Linux 1.3.9 released.
-
-	* scsi.c Blacklist concept expanded to 'support' more device
-	deficiencies. blacklist[] renamed to device_list[]
-	(scan_scsis): Code cleanup.
-
-	* scsi_debug.c (scsi_debug_proc_info): Added support to control
-	device lockup simulation via /proc/scsi interface.
-
-
-Wed Jul 19 09:22:34 1995  Michael Neuffer  <neuffer@goofy.zdv.uni-mainz.de>
-
-	* Linux 1.3.7 released.
-
-	* scsi_proc.c: Fixed a number of bugs in directory handling
-
-Wed Jul 19 09:18:28 1995  Michael Neuffer  <neuffer@goofy.zdv.uni-mainz.de>
-
-	* Linux 1.3.5 released.
-
-	* Native wide, multichannel and /proc/scsi support now in official
-	kernel distribution.
-
-        * scsi.c/h, hosts.c/h et al reindented to increase readability
-	(especially on 80 column wide terminals).
-
-	* scsi.c, scsi_proc.c, ../../fs/proc/inode.c: Added
-	/proc/scsi/scsi which allows root to scan for hotplugged devices.
-
-	* scsi.c (scsi_proc_info): Added, to support /proc/scsi/scsi.
-	(scan_scsis): Added some 'spaghetti' code to allow scanning for
-	single devices.
-	
-
-Thu Jun 20 15:20:27 1995  Michael Neuffer  <neuffer@goofy.zdv.uni-mainz.de>
-
-        * proc.c: Renamed to scsi_proc.c
-
-Mon Jun 12 20:32:45 1995  Michael Neuffer  <neuffer@goofy.zdv.uni-mainz.de>
-
-	* Linux 1.3.0 released.
-
-Mon May 15 19:33:14 1995  Michael Neuffer  <neuffer@goofy.zdv.uni-mainz.de>
-
-	* scsi.c: Added native multichannel and wide scsi support.
-
-	* proc.c (dispatch_scsi_info) (build_proc_dir_hba_entries):
-	Updated /proc/scsi interface.
-
-Thu May  4 17:58:48 1995  Michael Neuffer  <neuffer@goofy.zdv.uni-mainz.de>
-
-	* sd.c (requeue_sd_request): Zero out the scatterlist only if
-	scsi_malloc returned memory for it.
-
-	* eata_dma.c (register_HBA) (eata_queue): Add support for
-	large scatter/gather tables and set use_clustering accordingly
-
-	* hosts.c: Make use_clustering changeable in the Scsi_Host structure.
-
-Wed Apr 12 15:25:52 1995  Eric Youngdale  (eric@andante)
-
-	* Linux 1.2.5 released.
-
-	* buslogic.c: Update to version 1.15 (From Leonard N. Zubkoff).
-	Fixed interrupt routine to avoid races when handling multiple
-	complete commands per interrupt.  Seems to come up with faster
-	cards.
-
-	* eata_dma.c: Update to 2.3.5r. Modularize. Improved error handling
-        throughout and fixed bug interrupt routine which resulted in shifted
-        status bytes. Added blink LED state checks for ISA and EISA HBAs.
-        Memory management bug seems to have disappeared ==> increasing
-        C_P_L_CURRENT_MAX to 16 for now. Decreasing C_P_L_DIV to 3 for
-        performance reasons.
-
-	* scsi.c: If we get a FMK, EOM, or ILI when attempting to scan
-	the bus, assume that it was just noise on the bus, and ignore
-	the device.
-
-	* scsi.h: Update and add a bunch of missing commands which we
-	were never using.
-
-	* sd.c: Use restore_flags in do_sd_request - this may result in
-	latency conditions, but it gets rid of races and crashes.
-	Do not save flags again when searching for a second command to
-	queue.
-
-	* st.c: Use bytes, not STP->buffer->buffer_size when reading
-	from tape.
-
-
-Tue Apr  4 09:42:08 1995  Eric Youngdale  (eric@andante)
-
-	* Linux 1.2.4 released.
-
-	* st.c: Fix typo - restoring wrong flags.
-
-Wed Mar 29 06:55:12 1995  Eric Youngdale  (eric@andante)
-
-	* Linux 1.2.3 released.
-
-	* st.c: Perform some waiting operations with interrupts off.
-	Is this correct???
-
-Wed Mar 22 10:34:26 1995  Eric Youngdale  (eric@andante)
-
-	* Linux 1.2.2 released.
-
-	* aha152x.c: Modularize.  Add support for PCMCIA.
-
-	* eata.c: Update to version 2.0.  Fixed bug preventing media
-	detection.  If scsi_register_host returns NULL, fail gracefully.
-
-	* scsi.c: Detect as NEC (for photo-cd purposes) for the 84
-	and 25 models as "NEC_OLDCDR".
-
-	* scsi.h: Add define for NEC_OLDCDR
-
-	* sr.c: Add handling for NEC_OLDCDR.  Treat as unknown.
-
-	* u14-34f.c: Update to version 2.0.  Fixed same bug as in
-	eata.c.
-
-
-Mon Mar  6 11:11:20 1995  Eric Youngdale  (eric@andante)
-
-	* Linux 1.2.0 released.  Yeah!!!
-
-	* Minor spelling/punctuation changes throughout.  Nothing
-	substantive.
-
-Mon Feb 20 21:33:03 1995  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.95 released.
-
-	* qlogic.c: Update to version 0.41.
-
-	* seagate.c: Change some message to be more descriptive about what
-	we detected.
-
-	* sr.c: spelling/whitespace changes.
-
-Mon Feb 20 21:33:03 1995  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.94 released.
-
-Mon Feb 20 08:57:17 1995  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.93 released.
-
-	* hosts.h: Change io_port to long int from short.
-
- 	* 53c7,8xx.c: crash on AEN fixed, SCSI reset is no longer a NOP,
- 	  NULL pointer panic on odd UDCs fixed, two bugs in diagnostic output
- 	  fixed, should initialize correctly if left running, now loadable,
-  	  new memory allocation, extraneous diagnostic output suppressed,
- 	  splx() replaced with save/restore flags. [ Drew ]
-
-	* hosts.c, hosts.h, scsi_ioctl.c, sd.c, sd_ioctl.c, sg.c, sr.c,
-	sr_ioctl.c: Add special junk at end that Emacs will use for
-	formatting the file.
-
-	* qlogic.c: Update to v0.40a.  Improve parity handling.
-
-	* scsi.c: Add Hitachi DK312C to blacklist.  Change "};" to "}" in
-	many places.  Use scsi_init_malloc to get command block - may
-	need this to be dma compatible for some host adapters.
-	Restore interrupts after unregistering a host.
-
-	* sd.c: Use sti instead of restore flags - causes latency problems.
-
-	* seagate.c: Use controller_type to determine string used when
-	registering irq.
-
-	* sr.c: More photo-cd hacks to make sure we get the xa stuff right.
-	* sr.h, sr.c: Change is_xa to xa_flags field.
-
-	* st.c: Disable retries for write operations.
-
-Wed Feb 15 10:52:56 1995  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.92 released.
-
-	* eata.c: Update to 1.17.
-
-	* eata_dma.c: Update to 2.31a. Add more support for /proc/scsi.
-        Continuing modularization. Less crashes because of the bug in the
-        memory management ==> increase C_P_L_CURRENT_MAX to 10
-        and decrease C_P_L_DIV to 4.
-
-	* hosts.c: If we remove last host registered, reuse host number.
-	When freeing memory from host being deregistered, free extra_bytes
-	too.
-
-	* scsi.c (scan_scsis): memset(SDpnt, 0) and set SCmd.device to SDpnt.
-	Change memory allocation to work around bugs in __get_dma_pages.
-	Do not free host if usage count is not zero (for modules).
-
-	* sr_ioctl.c: Increase IOCTL_TIMEOUT to 3000.
-
-	* st.c: Allow for ST_EXTRA_DEVS in st data structures.
-
-	* u14-34f.c: Update to 1.17.
-
-Thu Feb  9 10:11:16 1995  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.91 released.
-
-	* eata.c: Update to 1.16.  Use wish_block instead of host->block.
-
-	* hosts.c: Initialize wish_block to 0.
-
-	* hosts.h: Add wish_block.
-
-	* scsi.c: Use wish_block as indicator that the host should be added
-	to block list.
-
-	* sg.c: Add SG_EXTRA_DEVS to number of slots.
-
-	* u14-34f.c: Use wish_block.
-
-Tue Feb  7 11:46:04 1995  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.90 released.
-
-	* eata.c: Change naming from eata_* to eata2x_*.  Now at vers 1.15.
-	Update interrupt handler to take pt_regs as arg.  Allow blocking
-	even if loaded as module.  Initialize target_time_out array.
-	Do not put sti(); in timing loop.
-
-	* hosts.c: Do not reuse host numbers.
-	Use scsi_make_blocked_list to generate blocking list.
-
-	* script_asm.pl:  Beats me.  Don't know perl.  Something to do with
-	phase index.
-
-	* scsi.c (scsi_make_blocked_list): New function - code copied from
-	hosts.c.
-
-	* scsi.c: Update code to disable photo CD for Toshiba cdroms.
-	Use just manufacturer name, not model number.
-
-	* sr.c: Fix setting density for Toshiba drives.
-
-	* u14-34f.c: Clear target_time_out array during reset.
-
-Wed Feb  1 09:20:45 1995  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.89 released.
-
-	* Makefile, u14-34f.c: Modularize.
-
-	* Makefile, eata.c: Modularize.  Now version 1.14
-
-	* NCR5380.c: Update interrupt handler with new arglist.  Minor
-	cleanups.
-
-	* eata_dma.c: Begin to modularize.  Add hooks for /proc/scsi.
-	New version 2.3.0a. Add code in interrupt handler to allow
-        certain CDROM drivers to be detected which return a
-        CHECK_CONDITION during SCSI bus scan. Add opcode check to get
-        all DATA IN and DATA OUT phases right. Utilize HBA_interpret flag.
-	Improvements in HBA identification. Various other minor stuff.
-
-	* hosts.c: Initialize ->dma_channel and ->io_port when registering
-	a new host.
-
-	* qlogic.c: Modularize and add PCMCIA support.
-
-	* scsi.c: Add Hitachi to blacklist.
-
-	* scsi.c: Change default to no lun scan (too many problem devices).
-
-	* scsi.h: Define QUEUE_FULL condition.
-
-	* sd.c: Do not check for non-existent partition until after
-	new media check.
-
-	* sg.c: Undo previous change which was wrong.
-
-	* sr_ioctl.c: Increase IOCTL_TIMEOUT to 2000.
-
-	* st.c: Patches from Kai - improve filemark handling.
-
-Tue Jan 31 17:32:12 1995  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.88 released.
-
-	* Throughout - spelling/grammar fixups.
-
-	* scsi.c: Make sure that all buffers are 16 byte aligned - some
-	drivers (buslogic) need this.
-
-	* scsi.c (scan_scsis): Remove message printed.
-
-	* scsi.c (scsi_init): Move message here.
-
-Mon Jan 30 06:40:25 1995  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.87 released.
-
-	* sr.c: Photo-cd related changes. (Gerd Knorr??).
-
-	* st.c: Changes from Kai related to EOM detection.
-
-Mon Jan 23 23:53:10 1995  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.86 released.
-
-	* 53c7,8xx.h: Change SG size to 127.
-
-	* eata_dma: Update to version 2.10i. Remove bug in the registration
-        of multiple HBAs and channels. Minor other improvements and stylistic
-        changes.
-
-	* scsi.c: Test for Toshiba XM-3401TA and exclude from detection
-	as toshiba drive - photo cd does not work with this drive.
-
-	* sr.c:  Update photocd code.
-
-Mon Jan 23 23:53:10 1995  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.85 released.
-
-	* st.c, st_ioctl.c, sg.c, sd_ioctl.c, scsi_ioctl.c, hosts.c:
-	include linux/mm.h
-
-	* qlogic.c, buslogic.c, aha1542.c: Include linux/module.h.
-
-Sun Jan 22 22:08:46 1995  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.84 released.
-
-	* Makefile: Support for loadable QLOGIC boards.
-
-	* aha152x.c: Update to version 1.8 from Juergen.
-
-	* eata_dma.c: Update from Michael Neuffer.
-        Remove hard limit of 2 commands per lun and make it better
-        configurable. Improvements in HBA identification.
-
-	* in2000.c: Fix biosparam to support large disks.
-
-	* qlogic.c: Minor changes (change sti -> restore_flags).
-
-Wed Jan 18 23:33:09 1995  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.83 released.
-
-	* aha1542.c(aha1542_intr_handle): Use arguments handed down to find
-	which irq.
-
-	* buslogic.c: Likewise.
-
-	* eata_dma.c: Use min of 2 cmd_per_lun for OCS_enabled boards.
-
-	* scsi.c: Make RECOVERED_ERROR a SUGGEST_IS_OK.
-
-	* sd.c: Fail if we are opening a non-existent partition.
-
-	* sr.c: Bump SR_TIMEOUT to 15000.
-	Do not probe for media size at boot time(hard on changers).
-	Flag device as needing sector size instead.
-
-	* sr_ioctl.c: Remove CDROMMULTISESSION_SYS ioctl.
-
-	* ultrastor.c: Fix bug in call to ultrastor_interrupt (wrong #args).
-
-Mon Jan 16 07:18:23 1995  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.82 released.
-
-	Throughout.
-	- Change all interrupt handlers to accept new calling convention.
-	In particular, we now receive the irq number as one of the arguments.
-
-	* More minor spelling corrections in some of the new files.
-
-	* aha1542.c, buslogic.c: Clean up interrupt handler a little now
-	that we receive the irq as an arg.
-
-	* aha274x.c: s/snarf_region/request_region/
-
-	* eata.c: Update to version 1.12.   Fix some comments and display a
-	message if we cannot reserve the port addresses.
-
-	* u14-34f.c: Update to version 1.13.   Fix some comments and display a
-	message if we cannot reserve the port addresses.
-
-	* eata_dma.c: Define get_board_data function (send INQUIRY command).
-	Use to improve detection of variants of different DPT boards.  Change
-	version subnumber to "0g".
-
-	* fdomain.c:  Update to version 5.26.  Improve detection of some boards
-	repackaged by IBM.
-
-	* scsi.c (scsi_register_host): Change "name" to const char *.
-
-	* sr.c: Fix problem in set mode command for Toshiba drives.
-
-	* sr.c: Fix typo from patch 81.
-
-Fri Jan 13 12:54:46 1995  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.81 released.  Codefreeze for 1.2 release announced.
-
-	Big changes here.
-
-	* eata_dma.*: New files from Michael Neuffer.
-	(neuffer@goofy.zdv.uni-mainz.de).  Should support
-	all eata/dpt cards.
-
-	* hosts.c, Makefile: Add eata_dma.
-
-	* README.st: Document MTEOM.
-
-	Patches from me (ERY) to finish support for low-level loadable scsi.
-	It now works, and is actually useful.
-
-	* Throughout - add new argument to scsi_init_malloc that takes an
-	additional parameter.  This is used as a priority to kmalloc,
-	and you can specify the GFP_DMA flag if you need DMA-able memory.
-
-	* Makefile: For source files that are loadable, always add name
-	to SCSI_SRCS.  Fill in modules: target.
-
-	* hosts.c:  Change next_host to next_scsi_host, and make global.
-	Print hosts after we have identified all of them.  Use info()
-	function if present, otherwise use name field.
-
-	* hosts.h: Change attach function to return int, not void.
-	Define number of device slots to allow for loadable devices.
-	Define tags to tell scsi module code what type of module we
-	are loading.
-
-	* scsi.c: Fix scan_scsis so that it can be run by a user process.
-	Do not use waiting loops - use up and down mechanism as long
-	as current != task[0].
-
-	* scsi.c(scan_scsis): Do not use stack variables for I/O - this
-	could be > 16Mb if we are loading a module at runtime (i.e. use
-	scsi_init_malloc to get some memory we know will be safe).
-
-	* scsi.c: Change dma freelist to be a set of pages.  This allows
-	us to dynamically adjust the size of the list by adding more pages
-	to the pagelist.  Fix scsi_malloc and scsi_free accordingly.
-
-	* scsi_module.c: Fix include.
-
-	* sd.c: Declare detach function.  Increment/decrement module usage
-	count as required.  Fix init functions to allow loaded devices.
-	Revalidate all new disks so we get the partition tables.  Define
-	detach function.
-
-	* sr.c: Likewise.
-
-	* sg.c: Declare detach function.  Allow attachment of devices on
-	loaded drivers.
-
-	* st.c: Declare detach function.  Increment/decrement module usage
-	count as required.
-
-Tue Jan 10 10:09:58 1995  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.79 released.
-
-	Patch from some undetermined individual who needs to get a life :-).
-
-	* sr.c: Attacked by spelling bee...
-
-	Patches from Gerd Knorr:
-
-	* sr.c: make printk messages for photoCD a little more informative.
-
-	* sr_ioctl.c: Fix CDROMMULTISESSION_SYS ioctl.
-
-Mon Jan  9 10:01:37 1995  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.78 released.
-
-	* Makefile: Add empty modules: target.
-
-	* Wheee.  Now change register_iomem to request_region.
-
-	* in2000.c: Bugfix - apparently this is the fix that we have
-	all been waiting for.  It fixes a problem whereby the driver
-	is not stable under heavy load.  Race condition and all that.
-	Patch from Peter Lu.
-
-Wed Jan  4 21:17:40 1995  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.77 released.
-
-	* 53c7,8xx.c: Fix from Linus - emulate splx.
-
-	Throughout:
-
-		Change "snarf_region" with "register_iomem".
-
-	* scsi_module.c: New file.  Contains support for low-level loadable
-	  scsi drivers. [ERY].
-
-	* sd.c: More s/int/long/ changes.
-
-	* seagate.c: Explicitly include linux/config.h
-
-	* sg.c: Increment/decrement module usage count on open/close.
-
-	* sg.c: Be a bit more careful about the user not supplying enough
-	  information for a valid command.  Pass correct size down to
-	  scsi_do_cmd.
-
-	* sr.c:  More changes for Photo-CD.  This apparently breaks NEC drives.
-
-	* sr_ioctl.c:  Support CDROMMULTISESSION ioctl.
-
-
-Sun Jan  1 19:55:21 1995  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.76 released.
-
-	* constants.c: Add type cast in switch statement.
-
-	* scsi.c (scsi_free): Change datatype of "offset" to long.
-	  (scsi_malloc): Change a few more variables to long.  Who
-	  did this and why was it important?  64 bit machines?
-
-
-	Lots of changes to use save_state/restore_state instead of cli/sti.
-	Files changed include:
-
-	* aha1542.c:
-	* aha1740.c:
-	* buslogic.c:
-	* in2000.c:
-	* scsi.c:
-	* scsi_debug.c:
-	* sd.c:
-	* sr.c:
-	* st.c:
-
-Wed Dec 28 16:38:29 1994  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.75 released.
-
-	* buslogic.c: Spelling fix.
-
-	* scsi.c: Add HP C1790A and C2500A scanjet to blacklist.
-
-	* scsi.c: Spelling fixup.
-
-	* sd.c: Add support for sd_hardsizes (hard sector sizes).
-
-	* ultrastor.c: Use save_flags/restore_flags instead of cli/sti.
-
-Fri Dec 23 13:36:25 1994  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.74 released.
-
-	* README.st: Update from Kai Makisara.
-
-	* eata.c: New version from Dario - version 1.11.
-	  use scsicam bios_param routine.  Add support for 2011
-	  and 2021 boards.
-
-	* hosts.c: Add support for blocking.  Linked list automatically
-	  generated when shpnt->block is set.
-
-	* scsi.c: Add sankyo & HP scanjet to blacklist.  Add support for
-	  kicking things loose when we deadlock.
-
-	* scsi.c: Recognize scanners and processors in scan_scsis.
-
-	* scsi_ioctl.h: Increase timeout to 9 seconds.
-
-	* st.c: New version from Kai - add better support for backspace.
-
-	* u14-34f.c: New version from Dario.  Supports blocking.
-
-Wed Dec 14 14:46:30 1994  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.73 released.
-
-	* buslogic.c: Update from Dave Gentzel.  Version 1.14.
-	  Add module related stuff.   More fault tolerant if out of
-	  DMA memory.
-
-	* fdomain.c: New version from Rik Faith - version 5.22.  Add support
-	  for ISA-200S SCSI adapter.
-
-	* hosts.c: Spelling.
-
-	* qlogic.c: Update to version 0.38a.  Add more support for PCMCIA.
-
-	* scsi.c: Mask device type with 0x1f during scan_scsis.
-	  Add support for deadlocking, err, make that getting out of
-	  deadlock situations that are created when we allow the user
-	  to limit requests to one host adapter at a time.
-
-	* scsi.c: Bugfix - pass pid, not SCpnt as second arg to
-	  scsi_times_out.
-
-	* scsi.c: Restore interrupt state to previous value instead of using
-	  cli/sti pairs.
-
-	* scsi.c: Add a bunch of module stuff (all commented out for now).
-
-	* scsi.c: Clean up scsi_dump_status.
-
-Tue Dec  6 12:34:20 1994  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.72 released.
-
-	* sg.c: Bugfix - always use sg_free, since we might have big buff.
-
-Fri Dec  2 11:24:53 1994  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.71 released.
-
-	* sg.c: Clear buff field when not in use.  Only call scsi_free if
-	non-null.
-
-	* scsi.h: Call wake_up(&wait_for_request) when done with a
-	command.
-
-	* scsi.c (scsi_times_out): Pass pid down so that we can protect
-	against race conditions.
-
-	* scsi.c (scsi_abort): Zero timeout field if we get the
-	NOT_RUNNING message back from low-level driver.
-
-
-	* scsi.c (scsi_done): Restore cmd_len, use_sg here.
-
-	* scsi.c (request_sense): Not here.
-
-	* hosts.h: Add new forbidden_addr, forbidden_size fields.  Who
-	added these and why????
-
-	* hosts.c (scsi_mem_init): Mark pages as reserved if they fall in
-	the forbidden regions.  I am not sure - I think this is so that
-	we can deal with boards that do incomplete decoding of their
-	address lines for the bios chips, but I am not entirely sure.
-
-	* buslogic.c: Set forbidden_addr stuff if using a buggy board.
-
-	* aha1740.c: Test for NULL pointer in SCtmp.  This should not
-	occur, but a nice message is better than a kernel segfault.
-
-	* 53c7,8xx.c: Add new PCI chip ID for 815.
-
-Fri Dec  2 11:24:53 1994  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.70 released.
-
-	* ChangeLog, st.c: Spelling.
-
-Tue Nov 29 18:48:42 1994  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.69 released.
-
-	* u14-34f.h: Non-functional change.  [Dario].
-
-	* u14-34f.c: Use block field in Scsi_Host to prevent commands from
-	being queued to more than one host at the same time (used when
-	motherboard does not deal with multiple bus-masters very well).
-	Only when SINGLE_HOST_OPERATIONS is defined.
-	Use new cmd_per_lun field.  [Dario]
-
-	* eata.c: Likewise.
-
-	* st.c: More changes from Kai.  Add ready flag to indicate drive
-	status.
-
-	* README.st: Document this.
-
-	* sr.c: Bugfix (do not subtract CD_BLOCK_OFFSET) for photo-cd
-	code.
-
-	* sg.c: Bugfix - fix problem where opcode is not correctly set up.
-
-	* seagate.[c,h]: Use #defines to set driver name.
-
-	* scsi_ioctl.c: Zero buffer before executing command.
-
-	* scsi.c: Use new cmd_per_lun field in Scsi_Hosts as appropriate.
-	Add Sony CDU55S to blacklist.
-
-	* hosts.h: Add new cmd_per_lun field to Scsi_Hosts.
-
-	* hosts.c: Initialize cmd_per_lun in Scsi_Hosts from template.
-
-	* buslogic.c: Use cmd_per_lun field - initialize to different
-	values depending upon bus type (i.e. use 1 if ISA, so we do not
-	hog memory).  Use other patches which got lost from 1.1.68.
-
-	* aha1542.c: Spelling.
-
-Tue Nov 29 15:43:50 1994  Eric Youngdale  (eric@andante.aib.com)
-
-	* Linux 1.1.68 released.
-
-	Add support for 12 byte vendor specific commands in scsi-generics,
-	more (i.e. the last mandatory) low-level changes to support
-	loadable modules, plus a few other changes people have requested
-	lately.  Changes by me (ERY) unless otherwise noted.  Spelling
-	changes appear from some unknown corner of the universe.
-
-	* Throughout: Change COMMAND_SIZE() to use SCpnt->cmd_len.
-
-	* Throughout: Change info() low level function to take a Scsi_Host
-	pointer.  This way the info function can return specific
-	information about the host in question, if desired.
-
-	* All low-level drivers: Add NULL in initializer for the
-	usage_count field added to Scsi_Host_Template.
-
-	* aha152x.[c,h]: Remove redundant info() function.
-
-	* aha1542.[c,h]: Likewise.
-
-	* aha1740.[c,h]: Likewise.
-
-	* aha274x.[c,h]: Likewise.
-
-	* eata.[c,h]: Likewise.
-
-	* pas16.[c,h]: Likewise.
-
-	* scsi_debug.[c,h]: Likewise.
-
-	* t128.[c,h]: Likewise.
-
-	* u14-34f.[c,h]: Likewise.
-
-	* ultrastor.[c,h]: Likewise.
-
-	* wd7000.[c,h]: Likewise.
-
-	* aha1542.c: Add support for command line options with lilo to set
-	DMA parameters, I/O port.  From Matt Aarnio.
-
-	* buslogic.[c,h]: New version (1.13) from Dave Gentzel.
-
-	* hosts.h: Add new field to Scsi_Hosts "block" to allow blocking
-	all I/O to certain other cards.  Helps prevent problems with some
-	ISA motherboards.
-
-	* hosts.h: Add usage_count to Scsi_Host_Template.
-
-	* hosts.h: Add n_io_port to Scsi_Host (used when releasing module).
-
-	* hosts.c: Initialize block field.
-
-	* in2000.c: Remove "static" declarations from exported functions.
-
-	* in2000.h: Likewise.
-
-	* scsi.c: Correctly set cmd_len field as required.  Save and
-	change setting when doing a request_sense, restore when done.
-	Move abort timeout message.  Fix panic in request_queueable to
-	print correct function name.
-
-	* scsi.c: When incrementing usage count, walk block linked list
-	for host, and or in SCSI_HOST_BLOCK bit.  When decrementing usage
-	count to 0, clear this bit to allow usage to continue, wake up
-	processes waiting.
-
-
-	* scsi_ioctl.c: If we have an info() function, call it, otherwise
-	if we have a "name" field, use it, else do nothing.
-
-	* sd.c, sr.c: Clear cmd_len field prior to each command we
-	generate.
-
-	* sd.h: Add "has_part_table" bit to rscsi_disks.
-
-	* sg.[c,h]: Add support for vendor specific 12 byte commands (i.e.
-	override command length in COMMAND_SIZE).
-
-	* sr.c: Bugfix from Gerd in photocd code.
-
-	* sr.c: Bugfix in get_sectorsize - always use scsi_malloc buffer -
-	we cannot guarantee that the stack is < 16Mb.
-
-Tue Nov 22 15:40:46 1994  Eric Youngdale  (eric@andante.aib.com)
-
-	* Linux 1.1.67 released.
-
-	* sr.c: Change spelling of manufactor to manufacturer.
-
-	* scsi.h: Likewise.
-
-	* scsi.c: Likewise.
-
-	* qlogic.c: Spelling corrections.
-
-	* in2000.h: Spelling corrections.
-
-	* in2000.c: Update from Bill Earnest, change from
-	jshiffle@netcom.com.  Support new bios versions.
-
-	* README.qlogic: Spelling correction.
-
-Tue Nov 22 15:40:46 1994  Eric Youngdale  (eric@andante.aib.com)
-
-	* Linux 1.1.66 released.
-
-	* u14-34f.c: Spelling corrections.
-
-	* sr.[h,c]: Add support for multi-session CDs from Gerd Knorr.
-
-	* scsi.h: Add manufactor field for keeping track of device
-	manufacturer.
-
-	* scsi.c: More spelling corrections.
-
-	* qlogic.h, qlogic.c, README.qlogic: New driver from Tom Zerucha.
-
-	* in2000.c, in2000.h: New driver from Brad McLean/Bill Earnest.
-
-	* fdomain.c: Spelling correction.
-
-	* eata.c: Spelling correction.
-
-Fri Nov 18 15:22:44 1994  Eric Youngdale  (eric@andante.aib.com)
-
-	* Linux 1.1.65 released.
-
-	* eata.h: Update version string to 1.08.00.
-
-	* eata.c: Set sg_tablesize correctly for DPT PM2012 boards.
-
-	* aha274x.seq: Spell checking.
-
-	* README.st: Likewise.
-
-	* README.aha274x: Likewise.
-
-	* ChangeLog: Likewise.
-
-Tue Nov 15 15:35:08 1994  Eric Youngdale  (eric@andante.aib.com)
-
-	* Linux 1.1.64 released.
-
-	* u14-34f.h: Update version number to 1.10.01.
-
-	* u14-34f.c: Use Scsi_Host can_queue variable instead of one from template.
-
-	* eata.[c,h]: New driver for DPT boards from Dario Ballabio.
-
-	* buslogic.c: Use can_queue field.
-
-Wed Nov 30 12:09:09 1994  Eric Youngdale  (eric@andante.aib.com)
-
-	* Linux 1.1.63 released.
-
-	* sd.c: Give I/O error if we attempt 512 byte I/O to a disk with
-	1024 byte sectors.
-
-	* scsicam.c: Make sure we do read from whole disk (mask off
-	partition).
-
-	* scsi.c: Use can_queue in Scsi_Host structure.
-	Fix panic message about invalid host.
-
-	* hosts.c: Initialize can_queue from template.
-
-	* hosts.h: Add can_queue to Scsi_Host structure.
-
-	* aha1740.c: Print out warning about NULL ecbptr.
-
-Fri Nov  4 12:40:30 1994  Eric Youngdale  (eric@andante.aib.com)
-
-	* Linux 1.1.62 released.
-
-	* fdomain.c: Update to version 5.20. (From Rik Faith).  Support
-	BIOS version 3.5.
-
-	* st.h: Add ST_EOD symbol.
-
-	* st.c: Patches from Kai Makisara - support additional densities,
-	add support for MTFSS, MTBSS, MTWSM commands.
-
-	* README.st: Update to document new commands.
-
-	* scsi.c: Add Mediavision CDR-H93MV to blacklist.
-
-Sat Oct 29 20:57:36 1994  Eric Youngdale  (eric@andante.aib.com)
-
-	* Linux 1.1.60 released.
-
-	* u14-34f.[c,h]: New driver from Dario Ballabio.
-
-	* aic7770.c, aha274x_seq.h, aha274x.seq, aha274x.h, aha274x.c,
-	README.aha274x: New files, new driver from John Aycock.
-
-
-Tue Oct 11 08:47:39 1994  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.54 released.
-
-	* Add third PCI chip id.  [Drew]
-
-	* buslogic.c: Set BUSLOGIC_CMDLUN back to 1 [Eric].
-
-	* ultrastor.c: Fix asm directives for new GCC.
-
-	* sr.c, sd.c: Use new end_scsi_request function.
-
-	* scsi.h(end_scsi_request): Return pointer to block if still
-	active, else return NULL if inactive.  Fixes race condition.
-
-Sun Oct  9 20:23:14 1994  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.53 released.
-
-	* scsi.c: Do not allocate dma bounce buffers if we have exactly
-	16Mb.
-
-Fri Sep  9 05:35:30 1994  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.51 released.
-
-	* aha152x.c: Add support for disabling the parity check.  Update
-	to version 1.4. [Juergen].
-
-	* seagate.c: Tweak debugging message.
-
-Wed Aug 31 10:15:55 1994  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.50 released.
-
-	* aha152x.c: Add eb800 for Vtech Platinum SMP boards. [Juergen].
-
-	* scsi.c: Add Quantum PD1225S to blacklist.
-
-Fri Aug 26 09:38:45 1994  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.49 released.
-
-	* sd.c: Fix bug when we were deleting the wrong entry if we
-	get an unsupported sector size device.
-
-	* sr.c: Another spelling patch.
-
-Thu Aug 25 09:15:27 1994  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.48 released.
-
-	* Throughout: Use new semantics for request_dma, as appropriate.
-
-	* sr.c: Print correct device number.
-
-Sun Aug 21 17:49:23 1994  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.47 released.
-
-	* NCR5380.c: Add support for LIMIT_TRANSFERSIZE.
-
-	* constants.h: Add prototype for print_Scsi_Cmnd.
-
-	* pas16.c: Some more minor tweaks.  Test for Mediavision board.
-	Allow for disks > 1Gb.  [Drew??]
-
-	* sr.c: Set SCpnt->transfersize.
-
-Tue Aug 16 17:29:35 1994  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.46 released.
-
-	* Throughout: More spelling fixups.
-
-	* buslogic.c: Add a few more fixups from Dave.  Disk translation
-	mainly.
-
-	* pas16.c: Add a few patches (Drew?).
-
-
-Thu Aug 11 20:45:15 1994  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.44 released.
-
-	* hosts.c: Add type casts for scsi_init_malloc.
-
-	* scsicam.c: Add type cast.
-
-Wed Aug 10 19:23:01 1994  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.43 released.
-
-	* Throughout: Spelling cleanups. [??]
-
-	* aha152x.c, NCR53*.c, fdomain.c, g_NCR5380.c, pas16.c, seagate.c,
-	 t128.c: Use request_irq, not irqaction. [??]
-
-	* aha1542.c: Move test for shost before we start to use shost.
-
-	* aha1542.c, aha1740.c, ultrastor.c, wd7000.c: Use new
-	calling sequence for request_irq.
-
-	* buslogic.c: Update from Dave Gentzel.
-
-Tue Aug  9 09:32:59 1994  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.42 released.
-
-	* NCR5380.c: Change NCR5380_print_status to static.
-
-	* seagate.c: A few more bugfixes.  Only Drew knows what they are
-	for.
-
-	* ultrastor.c: Tweak some __asm__ directives so that it works
-	with newer compilers. [??]
-
-Sat Aug  6 21:29:36 1994  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.40 released.
-
-	* NCR5380.c: Return SCSI_RESET_WAKEUP from reset function.
-
-	* aha1542.c: Reset mailbox status after a bus device reset.
-
-	* constants.c: Fix typo (;;).
-
-	* g_NCR5380.c:
-	* pas16.c:  Correct usage of NCR5380_init.
-
-	* scsi.c: Remove redundant (and unused variables).
-
-	* sd.c: Use memset to clear all of rscsi_disks before we use it.
-
-	* sg.c: Ditto, except for scsi_generics.
-
-	* sr.c: Ditto, except for scsi_CDs.
-
-	* st.c: Initialize STp->device.
-
-	* seagate.c: Fix bug. [Drew]
-
-Thu Aug  4 08:47:27 1994  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.39 released.
-
-	* Makefile: Fix typo in NCR53C7xx.
-
-	* st.c: Print correct number for device.
-
-Tue Aug  2 11:29:14 1994  Eric Youngdale  (eric@esp22)
-
-	* Linux 1.1.38 released.
-
-	Lots of changes in 1.1.38.  All from Drew unless otherwise noted.
-
-	* 53c7,8xx.c: New file from Drew.  PCI driver.
-
-	* 53c7,8xx.h: Likewise.
-
-	* 53c7,8xx.scr: Likewise.
-
-	* 53c8xx_d.h, 53c8xx_u.h, script_asm.pl: Likewise.
-
-	* scsicam.c: New file from Drew.  Read block 0 on the disk and
-	read the partition table.  Attempt to deduce the geometry from
-	the partition table if possible.  Only used by 53c[7,8]xx right
-	now, but could be used by any device for which we have no way
-	of identifying the geometry.
-
-	* sd.c: Use device letters instead of sd%d in a lot of messages.
-
-	* seagate.c: Fix bug that resulted in lockups with some devices.
-
-	* sr.c (sr_open): Return -EROFS, not -EACCES if we attempt to open
-	device for write.
-
-	* hosts.c, Makefile: Update for new driver.
-
-	* NCR5380.c, NCR5380.h, g_NCR5380.h: Update from Drew to support
-	53C400 chip.
-
-	* constants.c: Define CONST_CMND and CONST_MSG.  Other minor
-	cleanups along the way.  Improve handling of CONST_MSG.
-
-	* fdomain.c, fdomain.h: New version from Rik Faith.  Update to
-	5.18.  Should now support TMC-3260 PCI card with 18C30 chip.
-
-	* pas16.c: Update with new irq initialization.
-
-	* t128.c: Update with minor cleanups.
-
-	* scsi.c (scsi_pid): New variable - gives each command a unique
-	id. Add Quantum LPS5235S to blacklist.  Change in_scan to
-	in_scan_scsis and make global.
-
-	* scsi.h: Add some defines for extended message handling,
-	INITIATE/RELEASE_RECOVERY.  Add a few new fields to support sync
-	transfers.
-
-	* scsi_ioctl.h: Add ioctl to request synchronous transfers.
-
-
-Tue Jul 26 21:36:58 1994  Eric Youngdale  (eric@esp22)
-
-	* Linux 1.1.37 released.
-
-	* aha1542.c: Always call aha1542_mbenable, use new udelay
-	mechanism so we do not wait a long time if the board does not
-	implement this command.
-
-	* g_NCR5380.c: Remove #include <linux/config.h> and #if
-	defined(CONFIG_SCSI_*).
-
-	* seagate.c: Likewise.
-
-	Next round of changes to support loadable modules.  Getting closer
-	now, still not possible to do anything remotely usable.
-
-	hosts.c: Create a linked list of detected high level devices.
-	(scsi_register_device): New function to insert into this list.
-	(scsi_init): Call scsi_register_device for each of the known high
-	level drivers.
-
-	hosts.h: Add prototype for linked list header.  Add structure
-	definition for device template structure which defines the linked
-	list.
-
-	scsi.c: (scan_scsis): Use linked list instead of knowledge about
-	existing high level device drivers.
-	(scsi_dev_init): Use init functions for drivers on linked list
-	instead of explicit list to initialize and attach devices to high
-	level drivers.
-
-	scsi.h: Add new field "attached" to scsi_device - count of number
-	of high level devices attached.
-
-	sd.c, sr.c, sg.c, st.c: Adjust init/attach functions to use new
-	scheme.
-
-Sat Jul 23 13:03:17 1994  Eric Youngdale  (eric@esp22)
-
-	* Linux 1.1.35 released.
-
-	* ultrastor.c: Change constraint on asm() operand so that it works
-	with gcc 2.6.0.
-
-Thu Jul 21 10:37:39 1994  Eric Youngdale  (eric@esp22)
-
-	* Linux 1.1.33 released.
-
-	* sr.c(sr_open): Do not allow opens with write access.
-
-Mon Jul 18 09:51:22 1994 1994  Eric Youngdale  (eric@esp22)
-
-	* Linux 1.1.31 released.
-
-	* sd.c: Increase SD_TIMEOUT from 300 to 600.
-
-	* sr.c: Remove stray task_struct* variable that was no longer
-	used.
-
-	* sr_ioctl.c: Fix typo in up() call.
-
-Sun Jul 17 16:25:29 1994  Eric Youngdale  (eric@esp22)
-
-	* Linux 1.1.30 released.
-
-	* scsi.c (scan_scsis): Fix detection of some Toshiba CDROM drives
-	that report themselves as disk drives.
-
-	* (Throughout): Use request.sem instead of request.waiting.
-	Should fix swap problem with fdomain.
-
-Thu Jul 14 10:51:42 1994  Eric Youngdale  (eric@esp22)
-
-	* Linux 1.1.29 released.
-
-	* scsi.c (scan_scsis): Add new devices to end of linked list, not
-	to the beginning.
-
-	* scsi.h (SCSI_SLEEP): Remove brain dead hack to try to save
-	the task state before sleeping.
-
-Sat Jul  9 15:01:03 1994  Eric Youngdale  (eric@esp22)
-
-	More changes to eventually support loadable modules.  Mainly
-	we want to use linked lists instead of arrays because it is easier
-	to dynamically add and remove things this way.
-
-	Quite a bit more work is needed before loadable modules are
-	possible (and usable) with scsi, but this is most of the grunge
-	work.
-
-	* Linux 1.1.28 released.
-
-	* scsi.c, scsi.h (allocate_device, request_queueable): Change
-	argument from index into scsi_devices to a pointer to the
-	Scsi_Device struct.
-
-	* Throughout: Change all calls to allocate_device,
-	request_queueable to use new calling sequence.
-
-	* Throughout: Use SCpnt->device instead of
-	scsi_devices[SCpnt->index].  Ugh - the pointer was there all along
-	- much cleaner this way.
-
-	* scsi.c (scsi_init_malloc, scsi_free_malloc): New functions -
-	allow us to pretend that we have a working malloc when we
-	initialize.  Use this instead of passing memory_start, memory_end
-	around all over the place.
-
-	* scsi.h, st.c, sr.c, sd.c, sg.c: Change *_init1 functions to use
-	scsi_init_malloc, remove all arguments, no return value.
-
-	* scsi.h: Remove index field from Scsi_Device and Scsi_Cmnd
-	structs.
-
-	* scsi.c (scsi_dev_init): Set up for scsi_init_malloc.
-	(scan_scsis): Get SDpnt from scsi_init_malloc, and refresh
-	when we discover a device.  Free pointer before returning.
-	Change scsi_devices into a linked list.
-
-	* scsi.c (scan_scsis): Change to only scan one host.
-	(scsi_dev_init): Loop over all detected hosts, and scan them.
-
-	* hosts.c  (scsi_init_free): Change so that  number of extra bytes
-	is stored in struct, and we do not have to pass it each time.
-
-	* hosts.h: Change Scsi_Host_Template struct to include "next" and
-	"release" functions.  Initialize to NULL in all low level
-	adapters.
-
-	* hosts.c: Rename scsi_hosts to builtin_scsi_hosts, create linked
-	list scsi_hosts, linked together with the new "next" field.
-
-Wed Jul  6 05:45:02 1994  Eric Youngdale  (eric@esp22)
-
-	* Linux 1.1.25 released.
-
-	* aha152x.c: Changes from Juergen - cleanups and updates.
-
-	* sd.c, sr.c: Use new check_media_change and revalidate
-	file_operations fields.
-
-	* st.c, st.h: Add changes from Kai Makisara, dated Jun 22.
-
-	* hosts.h: Change SG_ALL back to 0xff.  Apparently soft error
-	in /dev/brain resulted in having this bumped up.
-	Change first parameter in bios_param function to be Disk * instead
-	of index into rscsi_disks.
-
-	* sd_ioctl.c: Pass pointer to rscsi_disks element instead of index
-	to array.
-
-	* sd.h: Add struct name "scsi_disk" to typedef for Scsi_Disk.
-
-	* scsi.c: Remove redundant Maxtor XT8760S from blacklist.
-	In scsi_reset, add printk when DEBUG defined.
-
-	* All low level drivers: Modify definitions of bios_param in
-	appropriate way.
-
-Thu Jun 16 10:31:59 1994  Eric Youngdale  (eric@esp22)
-
-	* Linux 1.1.20 released.
-
-	* scsi_ioctl.c: Only pass down the actual number of characters
-	required to scsi_do_cmd, not the one rounded up to a even number
-	of sectors.
-
-	* ultrastor.c: Changes from Caleb Epstein for 24f cards.  Support
-	larger SG lists.
-
-	* ultrastor.c: Changes from me - use scsi_register to register
-	host.  Add some consistency checking,
-
-Wed Jun  1 21:12:13 1994  Eric Youngdale  (eric@esp22)
-
-	* Linux 1.1.19 released.
-
-	* scsi.h: Add new return code for reset() function:
-	SCSI_RESET_PUNT.
-
-	* scsi.c: Make SCSI_RESET_PUNT the same as SCSI_RESET_WAKEUP for
-	now.
-
-	* aha1542.c: If the command responsible for the reset is not
-	pending, return SCSI_RESET_PUNT.
-
-	* aha1740.c, buslogic.c, wd7000.c, ultrastor.c: Return
-	SCSI_RESET_PUNT instead of SCSI_RESET_SNOOZE.
-
-Tue May 31 19:36:01 1994  Eric Youngdale  (eric@esp22)
-
-	* buslogic.c: Do not print out message about "must be Adaptec"
-	if we have detected a buslogic card.  Print out a warning message
-	if we are configuring for >16Mb, since the 445S at board level
-	D or earlier does not work right.  The "D" level board can be made
-	to work by flipping an undocumented switch, but this is too subtle.
-
-    Changes based upon patches in Yggdrasil distribution.
-
-	* sg.c, sg.h: Return sense data to user.
-
-	* aha1542.c, aha1740.c, buslogic.c: Do not panic if
-	sense buffer is wrong size.
-
-	* hosts.c: Test for ultrastor card before any of the others.
-
-	* scsi.c: Allow boot-time option for max_scsi_luns=? so that
-	buggy firmware has an easy work-around.
-
-Sun May 15 20:24:34 1994  Eric Youngdale  (eric@esp22)
-
-	* Linux 1.1.15 released.
-
-	Post-codefreeze thaw...
-
-	* buslogic.[c,h]: New driver from David Gentzel.
-
-	* hosts.h: Add use_clustering field to explicitly say whether
-	clustering should be used for devices attached to this host
-	adapter.  The buslogic board apparently supports large SG lists,
-	but it is apparently faster if sd.c condenses this into a smaller
-	list.
-
-	* sd.c: Use this field instead of heuristic.
-
-	* All host adapter include files: Add appropriate initializer for
-	use_clustering field.
-
-	* scsi.h: Add #defines for return codes for the abort and reset
-	functions.  There are now a specific set of return codes to fully
-	specify all of the possible things that the low-level adapter
-	could do.
-
-	* scsi.c: Act based upon return codes from abort/reset functions.
-
-	* All host adapter abort/reset functions: Return new return code.
-
-	* Add code in scsi.c to help debug timeouts.  Use #define
-	DEBUG_TIMEOUT to enable this.
-
-	* scsi.c: If the host->irq field is set, use
-	disable_irq/enable_irq before calling queuecommand if we
-	are not already in an interrupt.  Reduce races, and we
-	can be sloppier about cli/sti in the interrupt routines now
-	(reduce interrupt latency).
-
-	* constants.c: Fix some things to eliminate warnings.  Add some
-	sense descriptions that were omitted before.
-
-	* aha1542.c: Watch for SCRD from host adapter - if we see it, set
-	a flag.  Currently we only print out the number of pending
-	commands that might need to be restarted.
-
-	* aha1542.c (aha1542_abort): Look for lost interrupts, OGMB still
-	full, and attempt to recover.  Otherwise give up.
-
-	* aha1542.c (aha1542_reset): Try BUS DEVICE RESET, and then pass
-	DID_RESET back up to the upper level code for all commands running
-	on this target (even on different LUNs).
-
-Sat May  7 14:54:01 1994
-
-	* Linux 1.1.12 released.
-
-	* st.c, st.h: New version from Kai.  Supports boot time
-	specification of number of buffers.
-
-	* wd7000.[c,h]: Updated driver from John Boyd.  Now supports
-	more than one wd7000 board in machine at one time, among other things.
-
-Wed Apr 20 22:20:35 1994
-
-	* Linux 1.1.8 released.
-
-	* sd.c: Add a few type casts where scsi_malloc is called.
-
-Wed Apr 13 12:53:29 1994
-
-	* Linux 1.1.4 released.
-
-	* scsi.c: Clean up a few printks (use %p to print pointers).
-
-Wed Apr 13 11:33:02 1994
-
-	* Linux 1.1.3 released.
-
-	* fdomain.c: Update to version 5.16 (Handle different FIFO sizes
-	better).
-
-Fri Apr  8 08:57:19 1994
-
-	* Linux 1.1.2 released.
-
-	* Throughout: SCSI portion of cluster diffs added.
-
-Tue Apr  5 07:41:50 1994
-
-	* Linux 1.1 development tree initiated.
-
-	* The linux 1.0 development tree is now effectively frozen except
-	for obvious bugfixes.
-
-******************************************************************
-******************************************************************
-******************************************************************
-******************************************************************
-
-Sun Apr 17 00:17:39 1994
-
-	* Linux 1.0, patchlevel 9 released.
-
-	* fdomain.c: Update to version 5.16 (Handle different FIFO sizes
-	better).
-
-Thu Apr  7 08:36:20 1994
-
-	* Linux 1.0, patchlevel8 released.
-
-	* fdomain.c: Update to version 5.15 from 5.9.  Handles 3.4 bios.
-
-Sun Apr  3 14:43:03 1994
-
-	* Linux 1.0, patchlevel6 released.
-
-	* wd7000.c: Make stab at fixing race condition.
-
-Sat Mar 26 14:14:50 1994
-
-	* Linux 1.0, patchlevel5 released.
-
-	* aha152x.c, Makefile: Fix a few bugs (too much data message).
-	Add a few more bios signatures. (Patches from Juergen).
-
-	* aha1542.c: Fix race condition in aha1542_out.
-
-Mon Mar 21 16:36:20 1994
-
-	* Linux 1.0, patchlevel3 released.
-
-	* sd.c, st.c, sr.c, sg.c: Return -ENXIO, not -ENODEV if we attempt
-	to open a non-existent device.
-
-	* scsi.c: Add Chinon cdrom to blacklist.
-
-	* sr_ioctl.c: Check return status of verify_area.
-
-Sat Mar  6 16:06:19 1994
-
-	* Linux 1.0 released (technically a pre-release).
-
-	* scsi.c: Add IMS CDD521, Maxtor XT-8760S to blacklist.
-
-Tue Feb 15 10:58:20 1994
-
-        * pl15e released.
-
-        * aha1542.c: For 1542C, allow dynamic device scan with >1Gb turned
-	off.
-
-	* constants.c: Fix typo in definition of CONSTANTS.
-
-        * pl15d released.
-
-Fri Feb 11 10:10:16 1994
-
-        * pl15c released.
-
-	* scsi.c: Add Maxtor XT-3280 and Rodime RO3000S to blacklist.
-
-	* scsi.c: Allow tagged queueing for scsi 3 devices as well.
-	Some really old devices report a version number of 0.  Disallow
-	LUN != 0 for these.
-
-Thu Feb 10 09:48:57 1994
-
-        * pl15b released.
-
-Sun Feb  6 12:19:46 1994
-
-        * pl15a released.
-
-Fri Feb  4 09:02:17 1994
-
-        * scsi.c: Add Teac cdrom to blacklist.
-
-Thu Feb  3 14:16:43 1994
-
-	* pl15 released.
-
-Tue Feb  1 15:47:43 1994
-
-	* pl14w released.
-
-	* wd7000.c (wd_bases): Fix typo in last change.
-
-Mon Jan 24 17:37:23 1994
-
-	* pl14u released.
-
-	* aha1542.c: Support 1542CF/extended bios.  Different from 1542C
-
-	* wd7000.c: Allow bios at 0xd8000 as well.
-
-	* ultrastor.c: Do not truncate cylinders to 1024.
-
-	* fdomain.c: Update to version 5.9 (add new bios signature).
-
-	* NCR5380.c: Update from Drew - should work a lot better now.
-
-Sat Jan  8 15:13:10 1994
-
-	* pl14o released.
-
-	* sr_ioctl.c: Zero reserved field before trying to set audio volume.
-
-Wed Jan  5 13:21:10 1994
-
-	* pl14m released.
-
-	* fdomain.c: Update to version 5.8.  No functional difference???
-
-Tue Jan  4 14:26:13 1994
-
-	* pl14l released.
-
-	* ultrastor.c: Remove outl, inl functions (now provided elsewhere).
-
-Mon Jan  3 12:27:25 1994
-
-	* pl14k released.
-
-	* aha152x.c: Remove insw and outsw functions.
-
-	* fdomain.c: Ditto.
-
-Wed Dec 29 09:47:20 1993
-
-	* pl14i released.
-
-	* scsi.c: Support RECOVERED_ERROR for tape drives.
-
-	* st.c: Update of tape driver from Kai.
-
-Tue Dec 21 09:18:30 1993
-
-	* pl14g released.
-
-	* aha1542.[c,h]: Support extended BIOS stuff.
-
-	* scsi.c: Clean up messages about disks, so they are displayed as
-	sda, sdb, etc instead of sd0, sd1, etc.
-
-	* sr.c:  Force reread of capacity if disk was changed.
-	Clear buffer before asking for capacity/sectorsize (some drives
-	do not report this properly).  Set needs_sector_size flag if
-	drive did not return sensible sector size.
-
-Mon Dec 13 12:13:47 1993
-
-	* aha152x.c: Update to version .101 from Juergen.
-
-Mon Nov 29 03:03:00 1993
-
-        * linux 0.99.14 released.
-
-	* All scsi stuff moved from kernel/blk_drv/scsi to drivers/scsi.
-
-	* Throughout: Grammatical corrections to various comments.
-
-	* Makefile: fix so that we do not need to compile things we are
-	not going to use.
-
-	* NCR5380.c, NCR5380.h, g_NCR5380.c, g_NCR5380.h, pas16.c,
-	pas16.h, t128.c, t128.h:  New files from Drew.
-
-	* aha152x.c, aha152x.h: New files from Juergen Fischer.
-
-	* aha1542.c: Support for more than one 1542 in the machine
-	at the same time.  Make functions static that do not need
-	visibility.
-
-	* aha1740.c: Set NEEDS_JUMPSTART flag in reset function, so we
-	know to restart the command.  Change prototype of aha1740_reset
-	to take a command pointer.
-
-	* constants.c: Clean up a few things.
-
-	* fdomain.c: Update to version 5.6.  Move snarf_region.  Allow
-	board to be set at different SCSI ids.  Remove support for
-	reselection (did not work well).  Set JUMPSTART flag in reset
-	code.
-
-	* hosts.c: Support new low-level adapters.  Allow for more than
-	one adapter of a given type.
-
-	* hosts.h: Allow for more than one adapter of a given type.
-
-	* scsi.c:  Add scsi_device_types array, if NEEDS_JUMPSTART is set
-	after a low-level reset, start the command again.  Sort blacklist,
-	and add Maxtor MXT-1240S, XT-4170S, NEC CDROM 84, Seagate ST157N.
-
-	* scsi.h: Add constants for tagged queueing.
-
-	* Throughout: Use constants from major.h instead of hardcoded
-	numbers for major numbers.
-
-	* scsi_ioctl.c: Fix bug in buffer length in ioctl_command.  Use
-	verify_area in GET_IDLUN ioctl.  Add new ioctls for
-	TAGGED_QUEUE_ENABLE, DISABLE.  Only allow IOCTL_SEND_COMMAND by
-	superuser.
-
-	* sd.c: Only pay attention to UNIT_ATTENTION for removable disks.
-	Fix bug where sometimes portions of blocks would get lost
-	resulting in processes hanging.  Add messages when we spin up a
-	disk, and fix a bug in the timing.  Increase read-ahead for disks
-	that are on a scatter-gather capable host adapter.
-
-	* seagate.c: Fix so that some parameters can be set from the lilo
-	prompt.  Supply jumpstart flag if we are resetting and need the
-	command restarted.   Fix so that we return 1 if we detect a card
-	so that multiple card detection works correctly.  Add yet another
-	signature for FD cards (950).  Add another signature for ST0x.
-
-	* sg.c, sg.h: New files from Lawrence Foard for generic scsi
-	access.
-
-	* sr.c:  Add type casts for (void*) so that we can do pointer
-	arithmetic.  Works with GCC without this, but it is not strictly
-	correct.  Same bugfix as was in sd.c.  Increase read-ahead a la
-	disk driver.
-
-	* sr_ioctl.c: Use scsi_malloc buffer instead of buffer from stack
-	since we cannot guarantee that the stack is < 16Mb.
-
-	ultrastor.c: Update to support 24f properly (JFC's driver).
-
-	wd7000.c: Supply jumpstart flag for reset.  Do not round up
-	number of cylinders in biosparam function.
-
-Sat Sep  4 20:49:56 1993
-
-    * 0.99pl13 released.
-
-    * Throughout:  Use check_region/snarf_region for all low-level
-    drivers.
-
-    * aha1542.c: Do hard reset instead of soft (some ethercard probes
-    screw us up).
-
-    * scsi.c: Add new flag ASKED_FOR_SENSE so that we can tell if we are
-    in a loop whereby the device returns null sense data.
-
-    * sd.c: Add code to spin up a drive if it is not already spinning.
-    Do this one at a time to make it easier on power supplies.
-
-    * sd_ioctl.c: Use sync_dev instead of fsync_dev in BLKFLSBUF ioctl.
-
-    * seagate.c: Switch around DATA/CONTROL lines.
-
-    * st.c: Change sense to unsigned.
-
-Thu Aug  5 11:59:18 1993
-
-    * 0.99pl12 released.
-
-    * constants.c, constants.h: New files with ascii descriptions of
-    various conditions.
-
-    * Makefile: Do not try to count the number of low-level drivers,
-    just generate the list of .o files.
-
-    * aha1542.c: Replace 16 with sizeof(SCpnt->sense_buffer).  Add tests
-    for addresses > 16Mb, panic if we find one.
-
-    * aha1740.c: Ditto with sizeof().
-
-    * fdomain.c: Update to version 3.18.  Add new signature, register IRQ
-    with irqaction.  Use ID 7 for new board.  Be more intelligent about
-    obtaining the h/s/c numbers for biosparam.
-
-    * hosts.c: Do not depend upon Makefile generated count of the number
-    of low-level host adapters.
-
-    * scsi.c: Use array for scsi_command_size instead of a function.  Add
-    Texel cdrom and Maxtor XT-4380S to blacklist.  Allow compile time
-    option for no-multi lun scan.  Add semaphore for possible problems
-    with handshaking, assume device is faulty until we know it not to be
-    the case.  Add DEBUG_INIT symbol to dump info as we scan for devices.
-    Zero sense buffer so we can tell if we need to request it.  When
-    examining sense information, request sense if buffer is all zero.
-    If RESET, request sense information to see what to do next.
-
-    * scsi_debug.c: Change some constants to use symbols like INT_MAX.
-
-    * scsi_ioctl.c (kernel_scsi_ioctl): New function -for making ioctl
-    calls from kernel space.
-
-    * sd.c: Increase timeout to 300.  Use functions in constants.h to
-    display info.  Use scsi_malloc buffer for READ_CAPACITY, since
-    we cannot guarantee that a stack based buffer is < 16Mb.
-
-    * sd_ioctl.c: Add BLKFLSBUF ioctl.
-
-    * seagate.c: Add new compile time options for ARBITRATE,
-    SLOW_HANDSHAKE, and SLOW_RATE.  Update assembly loops for transferring
-    data.  Use kernel_scsi_ioctl to request mode page with geometry.
-
-    * sr.c: Use functions in constants.c to display messages.
-
-    * st.c: Support for variable block size.
-
-    * ultrastor.c: Do not use cache for tape drives.  Set
-    unchecked_isa_dma flag, even though this may not be needed (gets set
-    later).
-
-Sat Jul 17 18:32:44 1993
-
-    * 0.99pl11 released.  C++ compilable.
-
-    * Throughout: Add type casts all over the place, and use "ip" instead
-    of "info" in the various biosparam functions.
-
-    * Makefile: Compile seagate.c with C++ compiler.
-
-    * aha1542.c: Always set ccb pointer as this gets trashed somehow on
-    some systems.  Add a few type casts.  Update biosparam function a little.
-
-    * aha1740.c: Add a few type casts.
-
-    * fdomain.c: Update to version 3.17 from 3.6.  Now works with
-    TMC-18C50.
-
-    * scsi.c: Minor changes here and there with datatypes.  Save use_sg
-    when requesting sense information so that this can properly be
-    restored if we retry the command.  Set aside dma buffers assuming each
-    block is 1 page, not 1Kb minix block.
-
-    * scsi_ioctl.c: Add a few type casts.  Other minor changes.
-
-    * sd.c:  Correctly  free all scsi_malloc'd memory if we run out of
-    dma_pool. Store blocksize information for each partition.
-
-    * seagate.c: Minor cleanups here and there.
-
-    * sr.c: Set up blocksize array for all discs.  Fix bug in freeing
-    buffers if we run out of dma pool.
-
-Thu Jun  2 17:58:11 1993
-
-    * 0.99pl10 released.
-
-    * aha1542.c: Support for BT 445S (VL-bus board with no dma channel).
-
-    * fdomain.c: Upgrade to version 3.6. Preliminary support for TNC-18C50.
-
-    * scsi.c: First attempt to fix problem with old_use_sg.  Change
-    NOT_READY to a SUGGEST_ABORT.  Fix timeout race where time might
-    get decremented past zero.
-
-    * sd.c: Add block_fsync function to dispatch table.
-
-    * sr.c: Increase timeout to 500 from 250.  Add entry for sync in
-    dispatch table (supply NULL).  If we do not have a sectorsize,
-    try to get it in the sd_open function.  Add new function just to
-    obtain sectorsize.
-
-    * sr.h: Add needs_sector_size semaphore.
-
-    * st.c: Add NULL for fsync in dispatch table.
-
-    * wd7000.c: Allow another condition for power on that are normal
-    and do not require a panic.
-
-Thu Apr 22 23:10:11 1993
-
-    * 0.99pl9 released.
-
-    * aha1542.c: Use (void) instead of () in setup_mailboxes.
-
-    * scsi.c: Initialize transfersize and underflow fields in SCmd to 0.
-    Do not panic for unsupported message bytes.
-
-    * scsi.h: Allocate 12 bytes instead of 10 for commands.  Add
-    transfersize and underflow fields.
-
-    * scsi_ioctl.c: Further bugfix to ioctl_probe.
-
-    * sd.c: Use long instead of int for last parameter in sd_ioctl.
-    Initialize transfersize and underflow fields.
-
-    * sd_ioctl.c: Ditto for sd_ioctl(,,,,);
-
-    * seagate.c: New version from Drew.  Includes new signatures for FD
-    cards.  Support for 0ws jumper. Correctly initialize
-    scsi_hosts[hostnum].this_id.  Improved handing of
-    disconnect/reconnect, and support command linking.  Use
-    transfersize and underflow fields.  Support scatter-gather.
-
-    * sr.c, sr_ioctl.c: Use long instead of int for last parameter in sr_ioctl.
-    Use buffer and buflength in do_ioctl.  Patches from Chris Newbold for
-    scsi-2 audio commands.
-
-    * ultrastor.c: Comment out in_byte (compiler warning).
-
-    * wd7000.c: Change () to (void) in wd7000_enable_dma.
-
-Wed Mar 31 16:36:25 1993
-
-    * 0.99pl8 released.
-
-    * aha1542.c: Handle mailboxes better for 1542C.
-        Do not truncate number of cylinders at 1024 for biosparam call.
-
-    * aha1740.c: Fix a few minor bugs for multiple devices.
-        Same as above for biosparam.
-
-    * scsi.c: Add lockable semaphore for removable devices that can have
-    media removal prevented.  Add another signature for flopticals.
-    (allocate_device): Fix race condition.  Allow more space in dma pool
-    for blocksizes of up to 4Kb.
-
-    * scsi.h: Define COMMAND_SIZE.  Define a SCSI specific version of
-    INIT_REQUEST that can run with interrupts off.
-
-    * scsi_ioctl.c: Make ioctl_probe function more idiot-proof.  If
-    a removable device says ILLEGAL REQUEST to a door-locking command,
-    clear lockable flag.  Add SCSI_IOCTL_GET_IDLUN ioctl.  Do not attempt
-    to lock door for devices that do not have lockable semaphore set.
-
-    * sd.c: Fix race condition for multiple disks.  Use INIT_SCSI_REQUEST
-    instead of INIT_REQUEST.  Allow sector sizes of 1024 and 256.  For
-    removable disks that are not ready, mark them as having a media change
-    (some drives do not report this later).
-
-    * seagate.c: Use volatile keyword for memory-mapped register pointers.
-
-    * sr.c: Fix race condition, a la sd.c.  Increase the number of retries
-    to 1.  Use INIT_SCSI_REQUEST.  Allow 512 byte sector sizes.  Do a
-    read_capacity when we init the device so we know the size and
-    sectorsize.
-
-    * st.c: If ioctl not found in st.c, try scsi_ioctl for others.
-
-    * ultrastor.c: Do not truncate number of cylinders at 1024 for
-    biosparam call.
-
-    * wd7000.c: Ditto.
-    Throughout: Use COMMAND_SIZE macro to determine length of scsi
-    command.
-
-
-
-Sat Mar 13 17:31:29 1993
-
-    * 0.99pl7 released.
-
-    Throughout: Improve punctuation in some messages, and use new
-    verify_area syntax.
-
-    * aha1542.c: Handle unexpected interrupts better.
-
-    * scsi.c: Ditto.  Handle reset conditions a bit better, asking for
-    sense information and retrying if required.
-
-    * scsi_ioctl.c: Allow for 12 byte scsi commands.
-
-    * ultrastor.c: Update to use scatter-gather.
-
-Sat Feb 20 17:57:15 1993
-
-    * 0.99pl6 released.
-
-    * fdomain.c: Update to version 3.5.  Handle spurious interrupts
-    better.
-
-    * sd.c: Use register_blkdev function.
-
-    * sr.c: Ditto.
-
-    * st.c: Use register_chrdev function.
-
-    * wd7000.c: Undo previous change.
-
-Sat Feb  6 11:20:43 1993
-
-    * 0.99pl5 released.
-
-    * scsi.c: Fix bug in testing for UNIT_ATTENTION.
-
-    * wd7000.c: Check at more addresses for bios.  Fix bug in biosparam
-    (heads & sectors turned around).
-
-Wed Jan 20 18:13:59 1993
-
-    * 0.99pl4 released.
-
-    * scsi.c: Ignore leading spaces when looking for blacklisted devices.
-
-    * seagate.c: Add a few new signatures for FD cards.  Another patch
-    with SCint to fix race condition.  Use recursion_depth to keep track
-    of how many times we have been recursively called, and do not start
-    another command unless we are on the outer level.  Fixes bug
-    with Syquest cartridge drives (used to crash kernel), because
-    they do not disconnect with large data transfers.
-
-Tue Jan 12 14:33:36 1993
-
-    * 0.99pl3 released.
-
-    * fdomain.c: Update to version 3.3 (a few new signatures).
-
-    * scsi.c: Add CDU-541, Denon DRD-25X to blacklist.
-    (allocate_request, request_queueable): Init request.waiting to NULL if
-    non-buffer type of request.
-
-    * seagate.c:  Allow controller to be overridden with CONTROLLER symbol.
-    Set SCint=NULL when we are done, to remove race condition.
-
-    * st.c: Changes from Kai.
-
-Wed Dec 30 20:03:47 1992
-
-    * 0.99pl2 released.
-
-    * scsi.c: Blacklist back in.  Remove Newbury drive as other bugfix
-    eliminates need for it here.
-
-    * sd.c: Return ENODEV instead of EACCES if no such device available.
-    (sd_init) Init blkdev_fops earlier so that sd_open is available sooner.
-
-    * sr.c: Same as above for sd.c.
-
-    * st.c: Return ENODEV instead of ENXIO if no device.  Init chrdev_fops
-    sooner, so that it is always there even if no tapes.
-
-    * seagate.c (controller_type): New variable to keep track of ST0x or
-    FD.  Modify signatures list to indicate controller type, and init
-    controller_type once we find a match.
-
-    * wd7000.c (wd7000_set_sync): Remove redundant function.
-
-Sun Dec 20 16:26:24 1992
-
-    * 0.99pl1 released.
-
-    * scsi_ioctl.c: Bugfix - check dev->index, not dev->id against
-    NR_SCSI_DEVICES.
-
-    * sr_ioctl.c: Verify that device exists before allowing an ioctl.
-
-    * st.c: Patches from Kai - change timeout values, improve end of tape
-    handling.
-
-Sun Dec 13 18:15:23 1992
-
-    * 0.99 kernel released.  Baseline for this ChangeLog.
diff -Nru a/Documentation/scsi/ChangeLog.1992-1997 b/Documentation/scsi/ChangeLog.1992-1997
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/Documentation/scsi/ChangeLog.1992-1997	2005-01-10 20:11:17 -08:00
@@ -0,0 +1,2023 @@
+Sat Jan 18 15:51:45 1997  Richard Henderson  <rth@tamu.edu>
+
+	* Don't play with usage_count directly, instead hand around
+	the module header and use the module macros.
+
+Fri May 17 00:00:00 1996  Leonard N. Zubkoff <lnz@dandelion.com>
+
+	* BusLogic Driver Version 2.0.3 Released.
+
+Tue Apr 16 21:00:00 1996  Leonard N. Zubkoff <lnz@dandelion.com>
+
+	* BusLogic Driver Version 1.3.2 Released.
+
+Sun Dec 31 23:26:00 1995  Leonard N. Zubkoff <lnz@dandelion.com>
+
+	* BusLogic Driver Version 1.3.1 Released.
+
+Fri Nov 10 15:29:49 1995  Leonard N. Zubkoff <lnz@dandelion.com>
+
+	* Released new BusLogic driver.
+
+Wed Aug  9 22:37:04 1995  Andries Brouwer  <aeb@cwi.nl>
+
+	As a preparation for new device code, separated the various
+	functions the request->dev field had into the device proper,
+	request->rq_dev and a status field request->rq_status.
+
+	The 2nd argument of bios_param is now a kdev_t.
+
+Wed Jul 19 10:43:15 1995  Michael Neuffer  <neuffer@goofy.zdv.uni-mainz.de>
+
+        * scsi.c (scsi_proc_info): /proc/scsi/scsi now also lists all
+	attached devices.
+
+	* scsi_proc.c (proc_print_scsidevice): Added. Used by scsi.c and
+	eata_dma_proc.c to produce some device info for /proc/scsi.
+
+	* eata_dma.c (eata_queue)(eata_int_handler)(eata_scsi_done):
+	Changed handling of internal SCSI commands send to the HBA.
+
+
+Wed Jul 19 10:09:17 1995  Michael Neuffer  <neuffer@goofy.zdv.uni-mainz.de>
+
+	* Linux 1.3.11 released.
+
+	* eata_dma.c (eata_queue)(eata_int_handler): Added code to do
+	command latency measurements if requested by root through
+	/proc/scsi interface.
+	Throughout Use HZ constant for time references.
+
+	* eata_pio.c: Use HZ constant for time references.
+
+	* aic7xxx.c, aic7xxx.h, aic7xxx_asm.c: Changed copyright from BSD
+	to GNU style.
+
+	* scsi.h: Added READ_12 command opcode constant
+
+Wed Jul 19 09:25:30 1995  Michael Neuffer <neuffer@goofy.zdv.uni-mainz.de>
+
+	* Linux 1.3.10 released.
+
+	* scsi_proc.c (dispatch_scsi_info): Removed unused variable.
+
+Wed Jul 19 09:25:30 1995  Michael Neuffer  <neuffer@goofy.zdv.uni-mainz.de>
+
+	* Linux 1.3.9 released.
+
+	* scsi.c Blacklist concept expanded to 'support' more device
+	deficiencies. blacklist[] renamed to device_list[]
+	(scan_scsis): Code cleanup.
+
+	* scsi_debug.c (scsi_debug_proc_info): Added support to control
+	device lockup simulation via /proc/scsi interface.
+
+
+Wed Jul 19 09:22:34 1995  Michael Neuffer  <neuffer@goofy.zdv.uni-mainz.de>
+
+	* Linux 1.3.7 released.
+
+	* scsi_proc.c: Fixed a number of bugs in directory handling
+
+Wed Jul 19 09:18:28 1995  Michael Neuffer  <neuffer@goofy.zdv.uni-mainz.de>
+
+	* Linux 1.3.5 released.
+
+	* Native wide, multichannel and /proc/scsi support now in official
+	kernel distribution.
+
+        * scsi.c/h, hosts.c/h et al reindented to increase readability
+	(especially on 80 column wide terminals).
+
+	* scsi.c, scsi_proc.c, ../../fs/proc/inode.c: Added
+	/proc/scsi/scsi which allows root to scan for hotplugged devices.
+
+	* scsi.c (scsi_proc_info): Added, to support /proc/scsi/scsi.
+	(scan_scsis): Added some 'spaghetti' code to allow scanning for
+	single devices.
+	
+
+Thu Jun 20 15:20:27 1995  Michael Neuffer  <neuffer@goofy.zdv.uni-mainz.de>
+
+        * proc.c: Renamed to scsi_proc.c
+
+Mon Jun 12 20:32:45 1995  Michael Neuffer  <neuffer@goofy.zdv.uni-mainz.de>
+
+	* Linux 1.3.0 released.
+
+Mon May 15 19:33:14 1995  Michael Neuffer  <neuffer@goofy.zdv.uni-mainz.de>
+
+	* scsi.c: Added native multichannel and wide scsi support.
+
+	* proc.c (dispatch_scsi_info) (build_proc_dir_hba_entries):
+	Updated /proc/scsi interface.
+
+Thu May  4 17:58:48 1995  Michael Neuffer  <neuffer@goofy.zdv.uni-mainz.de>
+
+	* sd.c (requeue_sd_request): Zero out the scatterlist only if
+	scsi_malloc returned memory for it.
+
+	* eata_dma.c (register_HBA) (eata_queue): Add support for
+	large scatter/gather tables and set use_clustering accordingly
+
+	* hosts.c: Make use_clustering changeable in the Scsi_Host structure.
+
+Wed Apr 12 15:25:52 1995  Eric Youngdale  (eric@andante)
+
+	* Linux 1.2.5 released.
+
+	* buslogic.c: Update to version 1.15 (From Leonard N. Zubkoff).
+	Fixed interrupt routine to avoid races when handling multiple
+	complete commands per interrupt.  Seems to come up with faster
+	cards.
+
+	* eata_dma.c: Update to 2.3.5r. Modularize. Improved error handling
+        throughout and fixed bug interrupt routine which resulted in shifted
+        status bytes. Added blink LED state checks for ISA and EISA HBAs.
+        Memory management bug seems to have disappeared ==> increasing
+        C_P_L_CURRENT_MAX to 16 for now. Decreasing C_P_L_DIV to 3 for
+        performance reasons.
+
+	* scsi.c: If we get a FMK, EOM, or ILI when attempting to scan
+	the bus, assume that it was just noise on the bus, and ignore
+	the device.
+
+	* scsi.h: Update and add a bunch of missing commands which we
+	were never using.
+
+	* sd.c: Use restore_flags in do_sd_request - this may result in
+	latency conditions, but it gets rid of races and crashes.
+	Do not save flags again when searching for a second command to
+	queue.
+
+	* st.c: Use bytes, not STP->buffer->buffer_size when reading
+	from tape.
+
+
+Tue Apr  4 09:42:08 1995  Eric Youngdale  (eric@andante)
+
+	* Linux 1.2.4 released.
+
+	* st.c: Fix typo - restoring wrong flags.
+
+Wed Mar 29 06:55:12 1995  Eric Youngdale  (eric@andante)
+
+	* Linux 1.2.3 released.
+
+	* st.c: Perform some waiting operations with interrupts off.
+	Is this correct???
+
+Wed Mar 22 10:34:26 1995  Eric Youngdale  (eric@andante)
+
+	* Linux 1.2.2 released.
+
+	* aha152x.c: Modularize.  Add support for PCMCIA.
+
+	* eata.c: Update to version 2.0.  Fixed bug preventing media
+	detection.  If scsi_register_host returns NULL, fail gracefully.
+
+	* scsi.c: Detect as NEC (for photo-cd purposes) for the 84
+	and 25 models as "NEC_OLDCDR".
+
+	* scsi.h: Add define for NEC_OLDCDR
+
+	* sr.c: Add handling for NEC_OLDCDR.  Treat as unknown.
+
+	* u14-34f.c: Update to version 2.0.  Fixed same bug as in
+	eata.c.
+
+
+Mon Mar  6 11:11:20 1995  Eric Youngdale  (eric@andante)
+
+	* Linux 1.2.0 released.  Yeah!!!
+
+	* Minor spelling/punctuation changes throughout.  Nothing
+	substantive.
+
+Mon Feb 20 21:33:03 1995  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.95 released.
+
+	* qlogic.c: Update to version 0.41.
+
+	* seagate.c: Change some message to be more descriptive about what
+	we detected.
+
+	* sr.c: spelling/whitespace changes.
+
+Mon Feb 20 21:33:03 1995  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.94 released.
+
+Mon Feb 20 08:57:17 1995  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.93 released.
+
+	* hosts.h: Change io_port to long int from short.
+
+ 	* 53c7,8xx.c: crash on AEN fixed, SCSI reset is no longer a NOP,
+ 	  NULL pointer panic on odd UDCs fixed, two bugs in diagnostic output
+ 	  fixed, should initialize correctly if left running, now loadable,
+  	  new memory allocation, extraneous diagnostic output suppressed,
+ 	  splx() replaced with save/restore flags. [ Drew ]
+
+	* hosts.c, hosts.h, scsi_ioctl.c, sd.c, sd_ioctl.c, sg.c, sr.c,
+	sr_ioctl.c: Add special junk at end that Emacs will use for
+	formatting the file.
+
+	* qlogic.c: Update to v0.40a.  Improve parity handling.
+
+	* scsi.c: Add Hitachi DK312C to blacklist.  Change "};" to "}" in
+	many places.  Use scsi_init_malloc to get command block - may
+	need this to be dma compatible for some host adapters.
+	Restore interrupts after unregistering a host.
+
+	* sd.c: Use sti instead of restore flags - causes latency problems.
+
+	* seagate.c: Use controller_type to determine string used when
+	registering irq.
+
+	* sr.c: More photo-cd hacks to make sure we get the xa stuff right.
+	* sr.h, sr.c: Change is_xa to xa_flags field.
+
+	* st.c: Disable retries for write operations.
+
+Wed Feb 15 10:52:56 1995  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.92 released.
+
+	* eata.c: Update to 1.17.
+
+	* eata_dma.c: Update to 2.31a. Add more support for /proc/scsi.
+        Continuing modularization. Less crashes because of the bug in the
+        memory management ==> increase C_P_L_CURRENT_MAX to 10
+        and decrease C_P_L_DIV to 4.
+
+	* hosts.c: If we remove last host registered, reuse host number.
+	When freeing memory from host being deregistered, free extra_bytes
+	too.
+
+	* scsi.c (scan_scsis): memset(SDpnt, 0) and set SCmd.device to SDpnt.
+	Change memory allocation to work around bugs in __get_dma_pages.
+	Do not free host if usage count is not zero (for modules).
+
+	* sr_ioctl.c: Increase IOCTL_TIMEOUT to 3000.
+
+	* st.c: Allow for ST_EXTRA_DEVS in st data structures.
+
+	* u14-34f.c: Update to 1.17.
+
+Thu Feb  9 10:11:16 1995  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.91 released.
+
+	* eata.c: Update to 1.16.  Use wish_block instead of host->block.
+
+	* hosts.c: Initialize wish_block to 0.
+
+	* hosts.h: Add wish_block.
+
+	* scsi.c: Use wish_block as indicator that the host should be added
+	to block list.
+
+	* sg.c: Add SG_EXTRA_DEVS to number of slots.
+
+	* u14-34f.c: Use wish_block.
+
+Tue Feb  7 11:46:04 1995  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.90 released.
+
+	* eata.c: Change naming from eata_* to eata2x_*.  Now at vers 1.15.
+	Update interrupt handler to take pt_regs as arg.  Allow blocking
+	even if loaded as module.  Initialize target_time_out array.
+	Do not put sti(); in timing loop.
+
+	* hosts.c: Do not reuse host numbers.
+	Use scsi_make_blocked_list to generate blocking list.
+
+	* script_asm.pl:  Beats me.  Don't know perl.  Something to do with
+	phase index.
+
+	* scsi.c (scsi_make_blocked_list): New function - code copied from
+	hosts.c.
+
+	* scsi.c: Update code to disable photo CD for Toshiba cdroms.
+	Use just manufacturer name, not model number.
+
+	* sr.c: Fix setting density for Toshiba drives.
+
+	* u14-34f.c: Clear target_time_out array during reset.
+
+Wed Feb  1 09:20:45 1995  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.89 released.
+
+	* Makefile, u14-34f.c: Modularize.
+
+	* Makefile, eata.c: Modularize.  Now version 1.14
+
+	* NCR5380.c: Update interrupt handler with new arglist.  Minor
+	cleanups.
+
+	* eata_dma.c: Begin to modularize.  Add hooks for /proc/scsi.
+	New version 2.3.0a. Add code in interrupt handler to allow
+        certain CDROM drivers to be detected which return a
+        CHECK_CONDITION during SCSI bus scan. Add opcode check to get
+        all DATA IN and DATA OUT phases right. Utilize HBA_interpret flag.
+	Improvements in HBA identification. Various other minor stuff.
+
+	* hosts.c: Initialize ->dma_channel and ->io_port when registering
+	a new host.
+
+	* qlogic.c: Modularize and add PCMCIA support.
+
+	* scsi.c: Add Hitachi to blacklist.
+
+	* scsi.c: Change default to no lun scan (too many problem devices).
+
+	* scsi.h: Define QUEUE_FULL condition.
+
+	* sd.c: Do not check for non-existent partition until after
+	new media check.
+
+	* sg.c: Undo previous change which was wrong.
+
+	* sr_ioctl.c: Increase IOCTL_TIMEOUT to 2000.
+
+	* st.c: Patches from Kai - improve filemark handling.
+
+Tue Jan 31 17:32:12 1995  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.88 released.
+
+	* Throughout - spelling/grammar fixups.
+
+	* scsi.c: Make sure that all buffers are 16 byte aligned - some
+	drivers (buslogic) need this.
+
+	* scsi.c (scan_scsis): Remove message printed.
+
+	* scsi.c (scsi_init): Move message here.
+
+Mon Jan 30 06:40:25 1995  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.87 released.
+
+	* sr.c: Photo-cd related changes. (Gerd Knorr??).
+
+	* st.c: Changes from Kai related to EOM detection.
+
+Mon Jan 23 23:53:10 1995  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.86 released.
+
+	* 53c7,8xx.h: Change SG size to 127.
+
+	* eata_dma: Update to version 2.10i. Remove bug in the registration
+        of multiple HBAs and channels. Minor other improvements and stylistic
+        changes.
+
+	* scsi.c: Test for Toshiba XM-3401TA and exclude from detection
+	as toshiba drive - photo cd does not work with this drive.
+
+	* sr.c:  Update photocd code.
+
+Mon Jan 23 23:53:10 1995  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.85 released.
+
+	* st.c, st_ioctl.c, sg.c, sd_ioctl.c, scsi_ioctl.c, hosts.c:
+	include linux/mm.h
+
+	* qlogic.c, buslogic.c, aha1542.c: Include linux/module.h.
+
+Sun Jan 22 22:08:46 1995  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.84 released.
+
+	* Makefile: Support for loadable QLOGIC boards.
+
+	* aha152x.c: Update to version 1.8 from Juergen.
+
+	* eata_dma.c: Update from Michael Neuffer.
+        Remove hard limit of 2 commands per lun and make it better
+        configurable. Improvements in HBA identification.
+
+	* in2000.c: Fix biosparam to support large disks.
+
+	* qlogic.c: Minor changes (change sti -> restore_flags).
+
+Wed Jan 18 23:33:09 1995  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.83 released.
+
+	* aha1542.c(aha1542_intr_handle): Use arguments handed down to find
+	which irq.
+
+	* buslogic.c: Likewise.
+
+	* eata_dma.c: Use min of 2 cmd_per_lun for OCS_enabled boards.
+
+	* scsi.c: Make RECOVERED_ERROR a SUGGEST_IS_OK.
+
+	* sd.c: Fail if we are opening a non-existent partition.
+
+	* sr.c: Bump SR_TIMEOUT to 15000.
+	Do not probe for media size at boot time(hard on changers).
+	Flag device as needing sector size instead.
+
+	* sr_ioctl.c: Remove CDROMMULTISESSION_SYS ioctl.
+
+	* ultrastor.c: Fix bug in call to ultrastor_interrupt (wrong #args).
+
+Mon Jan 16 07:18:23 1995  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.82 released.
+
+	Throughout.
+	- Change all interrupt handlers to accept new calling convention.
+	In particular, we now receive the irq number as one of the arguments.
+
+	* More minor spelling corrections in some of the new files.
+
+	* aha1542.c, buslogic.c: Clean up interrupt handler a little now
+	that we receive the irq as an arg.
+
+	* aha274x.c: s/snarf_region/request_region/
+
+	* eata.c: Update to version 1.12.   Fix some comments and display a
+	message if we cannot reserve the port addresses.
+
+	* u14-34f.c: Update to version 1.13.   Fix some comments and display a
+	message if we cannot reserve the port addresses.
+
+	* eata_dma.c: Define get_board_data function (send INQUIRY command).
+	Use to improve detection of variants of different DPT boards.  Change
+	version subnumber to "0g".
+
+	* fdomain.c:  Update to version 5.26.  Improve detection of some boards
+	repackaged by IBM.
+
+	* scsi.c (scsi_register_host): Change "name" to const char *.
+
+	* sr.c: Fix problem in set mode command for Toshiba drives.
+
+	* sr.c: Fix typo from patch 81.
+
+Fri Jan 13 12:54:46 1995  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.81 released.  Codefreeze for 1.2 release announced.
+
+	Big changes here.
+
+	* eata_dma.*: New files from Michael Neuffer.
+	(neuffer@goofy.zdv.uni-mainz.de).  Should support
+	all eata/dpt cards.
+
+	* hosts.c, Makefile: Add eata_dma.
+
+	* README.st: Document MTEOM.
+
+	Patches from me (ERY) to finish support for low-level loadable scsi.
+	It now works, and is actually useful.
+
+	* Throughout - add new argument to scsi_init_malloc that takes an
+	additional parameter.  This is used as a priority to kmalloc,
+	and you can specify the GFP_DMA flag if you need DMA-able memory.
+
+	* Makefile: For source files that are loadable, always add name
+	to SCSI_SRCS.  Fill in modules: target.
+
+	* hosts.c:  Change next_host to next_scsi_host, and make global.
+	Print hosts after we have identified all of them.  Use info()
+	function if present, otherwise use name field.
+
+	* hosts.h: Change attach function to return int, not void.
+	Define number of device slots to allow for loadable devices.
+	Define tags to tell scsi module code what type of module we
+	are loading.
+
+	* scsi.c: Fix scan_scsis so that it can be run by a user process.
+	Do not use waiting loops - use up and down mechanism as long
+	as current != task[0].
+
+	* scsi.c(scan_scsis): Do not use stack variables for I/O - this
+	could be > 16Mb if we are loading a module at runtime (i.e. use
+	scsi_init_malloc to get some memory we know will be safe).
+
+	* scsi.c: Change dma freelist to be a set of pages.  This allows
+	us to dynamically adjust the size of the list by adding more pages
+	to the pagelist.  Fix scsi_malloc and scsi_free accordingly.
+
+	* scsi_module.c: Fix include.
+
+	* sd.c: Declare detach function.  Increment/decrement module usage
+	count as required.  Fix init functions to allow loaded devices.
+	Revalidate all new disks so we get the partition tables.  Define
+	detach function.
+
+	* sr.c: Likewise.
+
+	* sg.c: Declare detach function.  Allow attachment of devices on
+	loaded drivers.
+
+	* st.c: Declare detach function.  Increment/decrement module usage
+	count as required.
+
+Tue Jan 10 10:09:58 1995  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.79 released.
+
+	Patch from some undetermined individual who needs to get a life :-).
+
+	* sr.c: Attacked by spelling bee...
+
+	Patches from Gerd Knorr:
+
+	* sr.c: make printk messages for photoCD a little more informative.
+
+	* sr_ioctl.c: Fix CDROMMULTISESSION_SYS ioctl.
+
+Mon Jan  9 10:01:37 1995  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.78 released.
+
+	* Makefile: Add empty modules: target.
+
+	* Wheee.  Now change register_iomem to request_region.
+
+	* in2000.c: Bugfix - apparently this is the fix that we have
+	all been waiting for.  It fixes a problem whereby the driver
+	is not stable under heavy load.  Race condition and all that.
+	Patch from Peter Lu.
+
+Wed Jan  4 21:17:40 1995  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.77 released.
+
+	* 53c7,8xx.c: Fix from Linus - emulate splx.
+
+	Throughout:
+
+		Change "snarf_region" with "register_iomem".
+
+	* scsi_module.c: New file.  Contains support for low-level loadable
+	  scsi drivers. [ERY].
+
+	* sd.c: More s/int/long/ changes.
+
+	* seagate.c: Explicitly include linux/config.h
+
+	* sg.c: Increment/decrement module usage count on open/close.
+
+	* sg.c: Be a bit more careful about the user not supplying enough
+	  information for a valid command.  Pass correct size down to
+	  scsi_do_cmd.
+
+	* sr.c:  More changes for Photo-CD.  This apparently breaks NEC drives.
+
+	* sr_ioctl.c:  Support CDROMMULTISESSION ioctl.
+
+
+Sun Jan  1 19:55:21 1995  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.76 released.
+
+	* constants.c: Add type cast in switch statement.
+
+	* scsi.c (scsi_free): Change datatype of "offset" to long.
+	  (scsi_malloc): Change a few more variables to long.  Who
+	  did this and why was it important?  64 bit machines?
+
+
+	Lots of changes to use save_state/restore_state instead of cli/sti.
+	Files changed include:
+
+	* aha1542.c:
+	* aha1740.c:
+	* buslogic.c:
+	* in2000.c:
+	* scsi.c:
+	* scsi_debug.c:
+	* sd.c:
+	* sr.c:
+	* st.c:
+
+Wed Dec 28 16:38:29 1994  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.75 released.
+
+	* buslogic.c: Spelling fix.
+
+	* scsi.c: Add HP C1790A and C2500A scanjet to blacklist.
+
+	* scsi.c: Spelling fixup.
+
+	* sd.c: Add support for sd_hardsizes (hard sector sizes).
+
+	* ultrastor.c: Use save_flags/restore_flags instead of cli/sti.
+
+Fri Dec 23 13:36:25 1994  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.74 released.
+
+	* README.st: Update from Kai Makisara.
+
+	* eata.c: New version from Dario - version 1.11.
+	  use scsicam bios_param routine.  Add support for 2011
+	  and 2021 boards.
+
+	* hosts.c: Add support for blocking.  Linked list automatically
+	  generated when shpnt->block is set.
+
+	* scsi.c: Add sankyo & HP scanjet to blacklist.  Add support for
+	  kicking things loose when we deadlock.
+
+	* scsi.c: Recognize scanners and processors in scan_scsis.
+
+	* scsi_ioctl.h: Increase timeout to 9 seconds.
+
+	* st.c: New version from Kai - add better support for backspace.
+
+	* u14-34f.c: New version from Dario.  Supports blocking.
+
+Wed Dec 14 14:46:30 1994  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.73 released.
+
+	* buslogic.c: Update from Dave Gentzel.  Version 1.14.
+	  Add module related stuff.   More fault tolerant if out of
+	  DMA memory.
+
+	* fdomain.c: New version from Rik Faith - version 5.22.  Add support
+	  for ISA-200S SCSI adapter.
+
+	* hosts.c: Spelling.
+
+	* qlogic.c: Update to version 0.38a.  Add more support for PCMCIA.
+
+	* scsi.c: Mask device type with 0x1f during scan_scsis.
+	  Add support for deadlocking, err, make that getting out of
+	  deadlock situations that are created when we allow the user
+	  to limit requests to one host adapter at a time.
+
+	* scsi.c: Bugfix - pass pid, not SCpnt as second arg to
+	  scsi_times_out.
+
+	* scsi.c: Restore interrupt state to previous value instead of using
+	  cli/sti pairs.
+
+	* scsi.c: Add a bunch of module stuff (all commented out for now).
+
+	* scsi.c: Clean up scsi_dump_status.
+
+Tue Dec  6 12:34:20 1994  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.72 released.
+
+	* sg.c: Bugfix - always use sg_free, since we might have big buff.
+
+Fri Dec  2 11:24:53 1994  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.71 released.
+
+	* sg.c: Clear buff field when not in use.  Only call scsi_free if
+	non-null.
+
+	* scsi.h: Call wake_up(&wait_for_request) when done with a
+	command.
+
+	* scsi.c (scsi_times_out): Pass pid down so that we can protect
+	against race conditions.
+
+	* scsi.c (scsi_abort): Zero timeout field if we get the
+	NOT_RUNNING message back from low-level driver.
+
+
+	* scsi.c (scsi_done): Restore cmd_len, use_sg here.
+
+	* scsi.c (request_sense): Not here.
+
+	* hosts.h: Add new forbidden_addr, forbidden_size fields.  Who
+	added these and why????
+
+	* hosts.c (scsi_mem_init): Mark pages as reserved if they fall in
+	the forbidden regions.  I am not sure - I think this is so that
+	we can deal with boards that do incomplete decoding of their
+	address lines for the bios chips, but I am not entirely sure.
+
+	* buslogic.c: Set forbidden_addr stuff if using a buggy board.
+
+	* aha1740.c: Test for NULL pointer in SCtmp.  This should not
+	occur, but a nice message is better than a kernel segfault.
+
+	* 53c7,8xx.c: Add new PCI chip ID for 815.
+
+Fri Dec  2 11:24:53 1994  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.70 released.
+
+	* ChangeLog, st.c: Spelling.
+
+Tue Nov 29 18:48:42 1994  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.69 released.
+
+	* u14-34f.h: Non-functional change.  [Dario].
+
+	* u14-34f.c: Use block field in Scsi_Host to prevent commands from
+	being queued to more than one host at the same time (used when
+	motherboard does not deal with multiple bus-masters very well).
+	Only when SINGLE_HOST_OPERATIONS is defined.
+	Use new cmd_per_lun field.  [Dario]
+
+	* eata.c: Likewise.
+
+	* st.c: More changes from Kai.  Add ready flag to indicate drive
+	status.
+
+	* README.st: Document this.
+
+	* sr.c: Bugfix (do not subtract CD_BLOCK_OFFSET) for photo-cd
+	code.
+
+	* sg.c: Bugfix - fix problem where opcode is not correctly set up.
+
+	* seagate.[c,h]: Use #defines to set driver name.
+
+	* scsi_ioctl.c: Zero buffer before executing command.
+
+	* scsi.c: Use new cmd_per_lun field in Scsi_Hosts as appropriate.
+	Add Sony CDU55S to blacklist.
+
+	* hosts.h: Add new cmd_per_lun field to Scsi_Hosts.
+
+	* hosts.c: Initialize cmd_per_lun in Scsi_Hosts from template.
+
+	* buslogic.c: Use cmd_per_lun field - initialize to different
+	values depending upon bus type (i.e. use 1 if ISA, so we do not
+	hog memory).  Use other patches which got lost from 1.1.68.
+
+	* aha1542.c: Spelling.
+
+Tue Nov 29 15:43:50 1994  Eric Youngdale  (eric@andante.aib.com)
+
+	* Linux 1.1.68 released.
+
+	Add support for 12 byte vendor specific commands in scsi-generics,
+	more (i.e. the last mandatory) low-level changes to support
+	loadable modules, plus a few other changes people have requested
+	lately.  Changes by me (ERY) unless otherwise noted.  Spelling
+	changes appear from some unknown corner of the universe.
+
+	* Throughout: Change COMMAND_SIZE() to use SCpnt->cmd_len.
+
+	* Throughout: Change info() low level function to take a Scsi_Host
+	pointer.  This way the info function can return specific
+	information about the host in question, if desired.
+
+	* All low-level drivers: Add NULL in initializer for the
+	usage_count field added to Scsi_Host_Template.
+
+	* aha152x.[c,h]: Remove redundant info() function.
+
+	* aha1542.[c,h]: Likewise.
+
+	* aha1740.[c,h]: Likewise.
+
+	* aha274x.[c,h]: Likewise.
+
+	* eata.[c,h]: Likewise.
+
+	* pas16.[c,h]: Likewise.
+
+	* scsi_debug.[c,h]: Likewise.
+
+	* t128.[c,h]: Likewise.
+
+	* u14-34f.[c,h]: Likewise.
+
+	* ultrastor.[c,h]: Likewise.
+
+	* wd7000.[c,h]: Likewise.
+
+	* aha1542.c: Add support for command line options with lilo to set
+	DMA parameters, I/O port.  From Matt Aarnio.
+
+	* buslogic.[c,h]: New version (1.13) from Dave Gentzel.
+
+	* hosts.h: Add new field to Scsi_Hosts "block" to allow blocking
+	all I/O to certain other cards.  Helps prevent problems with some
+	ISA motherboards.
+
+	* hosts.h: Add usage_count to Scsi_Host_Template.
+
+	* hosts.h: Add n_io_port to Scsi_Host (used when releasing module).
+
+	* hosts.c: Initialize block field.
+
+	* in2000.c: Remove "static" declarations from exported functions.
+
+	* in2000.h: Likewise.
+
+	* scsi.c: Correctly set cmd_len field as required.  Save and
+	change setting when doing a request_sense, restore when done.
+	Move abort timeout message.  Fix panic in request_queueable to
+	print correct function name.
+
+	* scsi.c: When incrementing usage count, walk block linked list
+	for host, and or in SCSI_HOST_BLOCK bit.  When decrementing usage
+	count to 0, clear this bit to allow usage to continue, wake up
+	processes waiting.
+
+
+	* scsi_ioctl.c: If we have an info() function, call it, otherwise
+	if we have a "name" field, use it, else do nothing.
+
+	* sd.c, sr.c: Clear cmd_len field prior to each command we
+	generate.
+
+	* sd.h: Add "has_part_table" bit to rscsi_disks.
+
+	* sg.[c,h]: Add support for vendor specific 12 byte commands (i.e.
+	override command length in COMMAND_SIZE).
+
+	* sr.c: Bugfix from Gerd in photocd code.
+
+	* sr.c: Bugfix in get_sectorsize - always use scsi_malloc buffer -
+	we cannot guarantee that the stack is < 16Mb.
+
+Tue Nov 22 15:40:46 1994  Eric Youngdale  (eric@andante.aib.com)
+
+	* Linux 1.1.67 released.
+
+	* sr.c: Change spelling of manufactor to manufacturer.
+
+	* scsi.h: Likewise.
+
+	* scsi.c: Likewise.
+
+	* qlogic.c: Spelling corrections.
+
+	* in2000.h: Spelling corrections.
+
+	* in2000.c: Update from Bill Earnest, change from
+	jshiffle@netcom.com.  Support new bios versions.
+
+	* README.qlogic: Spelling correction.
+
+Tue Nov 22 15:40:46 1994  Eric Youngdale  (eric@andante.aib.com)
+
+	* Linux 1.1.66 released.
+
+	* u14-34f.c: Spelling corrections.
+
+	* sr.[h,c]: Add support for multi-session CDs from Gerd Knorr.
+
+	* scsi.h: Add manufactor field for keeping track of device
+	manufacturer.
+
+	* scsi.c: More spelling corrections.
+
+	* qlogic.h, qlogic.c, README.qlogic: New driver from Tom Zerucha.
+
+	* in2000.c, in2000.h: New driver from Brad McLean/Bill Earnest.
+
+	* fdomain.c: Spelling correction.
+
+	* eata.c: Spelling correction.
+
+Fri Nov 18 15:22:44 1994  Eric Youngdale  (eric@andante.aib.com)
+
+	* Linux 1.1.65 released.
+
+	* eata.h: Update version string to 1.08.00.
+
+	* eata.c: Set sg_tablesize correctly for DPT PM2012 boards.
+
+	* aha274x.seq: Spell checking.
+
+	* README.st: Likewise.
+
+	* README.aha274x: Likewise.
+
+	* ChangeLog: Likewise.
+
+Tue Nov 15 15:35:08 1994  Eric Youngdale  (eric@andante.aib.com)
+
+	* Linux 1.1.64 released.
+
+	* u14-34f.h: Update version number to 1.10.01.
+
+	* u14-34f.c: Use Scsi_Host can_queue variable instead of one from template.
+
+	* eata.[c,h]: New driver for DPT boards from Dario Ballabio.
+
+	* buslogic.c: Use can_queue field.
+
+Wed Nov 30 12:09:09 1994  Eric Youngdale  (eric@andante.aib.com)
+
+	* Linux 1.1.63 released.
+
+	* sd.c: Give I/O error if we attempt 512 byte I/O to a disk with
+	1024 byte sectors.
+
+	* scsicam.c: Make sure we do read from whole disk (mask off
+	partition).
+
+	* scsi.c: Use can_queue in Scsi_Host structure.
+	Fix panic message about invalid host.
+
+	* hosts.c: Initialize can_queue from template.
+
+	* hosts.h: Add can_queue to Scsi_Host structure.
+
+	* aha1740.c: Print out warning about NULL ecbptr.
+
+Fri Nov  4 12:40:30 1994  Eric Youngdale  (eric@andante.aib.com)
+
+	* Linux 1.1.62 released.
+
+	* fdomain.c: Update to version 5.20. (From Rik Faith).  Support
+	BIOS version 3.5.
+
+	* st.h: Add ST_EOD symbol.
+
+	* st.c: Patches from Kai Makisara - support additional densities,
+	add support for MTFSS, MTBSS, MTWSM commands.
+
+	* README.st: Update to document new commands.
+
+	* scsi.c: Add Mediavision CDR-H93MV to blacklist.
+
+Sat Oct 29 20:57:36 1994  Eric Youngdale  (eric@andante.aib.com)
+
+	* Linux 1.1.60 released.
+
+	* u14-34f.[c,h]: New driver from Dario Ballabio.
+
+	* aic7770.c, aha274x_seq.h, aha274x.seq, aha274x.h, aha274x.c,
+	README.aha274x: New files, new driver from John Aycock.
+
+
+Tue Oct 11 08:47:39 1994  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.54 released.
+
+	* Add third PCI chip id.  [Drew]
+
+	* buslogic.c: Set BUSLOGIC_CMDLUN back to 1 [Eric].
+
+	* ultrastor.c: Fix asm directives for new GCC.
+
+	* sr.c, sd.c: Use new end_scsi_request function.
+
+	* scsi.h(end_scsi_request): Return pointer to block if still
+	active, else return NULL if inactive.  Fixes race condition.
+
+Sun Oct  9 20:23:14 1994  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.53 released.
+
+	* scsi.c: Do not allocate dma bounce buffers if we have exactly
+	16Mb.
+
+Fri Sep  9 05:35:30 1994  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.51 released.
+
+	* aha152x.c: Add support for disabling the parity check.  Update
+	to version 1.4. [Juergen].
+
+	* seagate.c: Tweak debugging message.
+
+Wed Aug 31 10:15:55 1994  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.50 released.
+
+	* aha152x.c: Add eb800 for Vtech Platinum SMP boards. [Juergen].
+
+	* scsi.c: Add Quantum PD1225S to blacklist.
+
+Fri Aug 26 09:38:45 1994  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.49 released.
+
+	* sd.c: Fix bug when we were deleting the wrong entry if we
+	get an unsupported sector size device.
+
+	* sr.c: Another spelling patch.
+
+Thu Aug 25 09:15:27 1994  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.48 released.
+
+	* Throughout: Use new semantics for request_dma, as appropriate.
+
+	* sr.c: Print correct device number.
+
+Sun Aug 21 17:49:23 1994  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.47 released.
+
+	* NCR5380.c: Add support for LIMIT_TRANSFERSIZE.
+
+	* constants.h: Add prototype for print_Scsi_Cmnd.
+
+	* pas16.c: Some more minor tweaks.  Test for Mediavision board.
+	Allow for disks > 1Gb.  [Drew??]
+
+	* sr.c: Set SCpnt->transfersize.
+
+Tue Aug 16 17:29:35 1994  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.46 released.
+
+	* Throughout: More spelling fixups.
+
+	* buslogic.c: Add a few more fixups from Dave.  Disk translation
+	mainly.
+
+	* pas16.c: Add a few patches (Drew?).
+
+
+Thu Aug 11 20:45:15 1994  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.44 released.
+
+	* hosts.c: Add type casts for scsi_init_malloc.
+
+	* scsicam.c: Add type cast.
+
+Wed Aug 10 19:23:01 1994  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.43 released.
+
+	* Throughout: Spelling cleanups. [??]
+
+	* aha152x.c, NCR53*.c, fdomain.c, g_NCR5380.c, pas16.c, seagate.c,
+	 t128.c: Use request_irq, not irqaction. [??]
+
+	* aha1542.c: Move test for shost before we start to use shost.
+
+	* aha1542.c, aha1740.c, ultrastor.c, wd7000.c: Use new
+	calling sequence for request_irq.
+
+	* buslogic.c: Update from Dave Gentzel.
+
+Tue Aug  9 09:32:59 1994  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.42 released.
+
+	* NCR5380.c: Change NCR5380_print_status to static.
+
+	* seagate.c: A few more bugfixes.  Only Drew knows what they are
+	for.
+
+	* ultrastor.c: Tweak some __asm__ directives so that it works
+	with newer compilers. [??]
+
+Sat Aug  6 21:29:36 1994  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.40 released.
+
+	* NCR5380.c: Return SCSI_RESET_WAKEUP from reset function.
+
+	* aha1542.c: Reset mailbox status after a bus device reset.
+
+	* constants.c: Fix typo (;;).
+
+	* g_NCR5380.c:
+	* pas16.c:  Correct usage of NCR5380_init.
+
+	* scsi.c: Remove redundant (and unused variables).
+
+	* sd.c: Use memset to clear all of rscsi_disks before we use it.
+
+	* sg.c: Ditto, except for scsi_generics.
+
+	* sr.c: Ditto, except for scsi_CDs.
+
+	* st.c: Initialize STp->device.
+
+	* seagate.c: Fix bug. [Drew]
+
+Thu Aug  4 08:47:27 1994  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.39 released.
+
+	* Makefile: Fix typo in NCR53C7xx.
+
+	* st.c: Print correct number for device.
+
+Tue Aug  2 11:29:14 1994  Eric Youngdale  (eric@esp22)
+
+	* Linux 1.1.38 released.
+
+	Lots of changes in 1.1.38.  All from Drew unless otherwise noted.
+
+	* 53c7,8xx.c: New file from Drew.  PCI driver.
+
+	* 53c7,8xx.h: Likewise.
+
+	* 53c7,8xx.scr: Likewise.
+
+	* 53c8xx_d.h, 53c8xx_u.h, script_asm.pl: Likewise.
+
+	* scsicam.c: New file from Drew.  Read block 0 on the disk and
+	read the partition table.  Attempt to deduce the geometry from
+	the partition table if possible.  Only used by 53c[7,8]xx right
+	now, but could be used by any device for which we have no way
+	of identifying the geometry.
+
+	* sd.c: Use device letters instead of sd%d in a lot of messages.
+
+	* seagate.c: Fix bug that resulted in lockups with some devices.
+
+	* sr.c (sr_open): Return -EROFS, not -EACCES if we attempt to open
+	device for write.
+
+	* hosts.c, Makefile: Update for new driver.
+
+	* NCR5380.c, NCR5380.h, g_NCR5380.h: Update from Drew to support
+	53C400 chip.
+
+	* constants.c: Define CONST_CMND and CONST_MSG.  Other minor
+	cleanups along the way.  Improve handling of CONST_MSG.
+
+	* fdomain.c, fdomain.h: New version from Rik Faith.  Update to
+	5.18.  Should now support TMC-3260 PCI card with 18C30 chip.
+
+	* pas16.c: Update with new irq initialization.
+
+	* t128.c: Update with minor cleanups.
+
+	* scsi.c (scsi_pid): New variable - gives each command a unique
+	id. Add Quantum LPS5235S to blacklist.  Change in_scan to
+	in_scan_scsis and make global.
+
+	* scsi.h: Add some defines for extended message handling,
+	INITIATE/RELEASE_RECOVERY.  Add a few new fields to support sync
+	transfers.
+
+	* scsi_ioctl.h: Add ioctl to request synchronous transfers.
+
+
+Tue Jul 26 21:36:58 1994  Eric Youngdale  (eric@esp22)
+
+	* Linux 1.1.37 released.
+
+	* aha1542.c: Always call aha1542_mbenable, use new udelay
+	mechanism so we do not wait a long time if the board does not
+	implement this command.
+
+	* g_NCR5380.c: Remove #include <linux/config.h> and #if
+	defined(CONFIG_SCSI_*).
+
+	* seagate.c: Likewise.
+
+	Next round of changes to support loadable modules.  Getting closer
+	now, still not possible to do anything remotely usable.
+
+	hosts.c: Create a linked list of detected high level devices.
+	(scsi_register_device): New function to insert into this list.
+	(scsi_init): Call scsi_register_device for each of the known high
+	level drivers.
+
+	hosts.h: Add prototype for linked list header.  Add structure
+	definition for device template structure which defines the linked
+	list.
+
+	scsi.c: (scan_scsis): Use linked list instead of knowledge about
+	existing high level device drivers.
+	(scsi_dev_init): Use init functions for drivers on linked list
+	instead of explicit list to initialize and attach devices to high
+	level drivers.
+
+	scsi.h: Add new field "attached" to scsi_device - count of number
+	of high level devices attached.
+
+	sd.c, sr.c, sg.c, st.c: Adjust init/attach functions to use new
+	scheme.
+
+Sat Jul 23 13:03:17 1994  Eric Youngdale  (eric@esp22)
+
+	* Linux 1.1.35 released.
+
+	* ultrastor.c: Change constraint on asm() operand so that it works
+	with gcc 2.6.0.
+
+Thu Jul 21 10:37:39 1994  Eric Youngdale  (eric@esp22)
+
+	* Linux 1.1.33 released.
+
+	* sr.c(sr_open): Do not allow opens with write access.
+
+Mon Jul 18 09:51:22 1994 1994  Eric Youngdale  (eric@esp22)
+
+	* Linux 1.1.31 released.
+
+	* sd.c: Increase SD_TIMEOUT from 300 to 600.
+
+	* sr.c: Remove stray task_struct* variable that was no longer
+	used.
+
+	* sr_ioctl.c: Fix typo in up() call.
+
+Sun Jul 17 16:25:29 1994  Eric Youngdale  (eric@esp22)
+
+	* Linux 1.1.30 released.
+
+	* scsi.c (scan_scsis): Fix detection of some Toshiba CDROM drives
+	that report themselves as disk drives.
+
+	* (Throughout): Use request.sem instead of request.waiting.
+	Should fix swap problem with fdomain.
+
+Thu Jul 14 10:51:42 1994  Eric Youngdale  (eric@esp22)
+
+	* Linux 1.1.29 released.
+
+	* scsi.c (scan_scsis): Add new devices to end of linked list, not
+	to the beginning.
+
+	* scsi.h (SCSI_SLEEP): Remove brain dead hack to try to save
+	the task state before sleeping.
+
+Sat Jul  9 15:01:03 1994  Eric Youngdale  (eric@esp22)
+
+	More changes to eventually support loadable modules.  Mainly
+	we want to use linked lists instead of arrays because it is easier
+	to dynamically add and remove things this way.
+
+	Quite a bit more work is needed before loadable modules are
+	possible (and usable) with scsi, but this is most of the grunge
+	work.
+
+	* Linux 1.1.28 released.
+
+	* scsi.c, scsi.h (allocate_device, request_queueable): Change
+	argument from index into scsi_devices to a pointer to the
+	Scsi_Device struct.
+
+	* Throughout: Change all calls to allocate_device,
+	request_queueable to use new calling sequence.
+
+	* Throughout: Use SCpnt->device instead of
+	scsi_devices[SCpnt->index].  Ugh - the pointer was there all along
+	- much cleaner this way.
+
+	* scsi.c (scsi_init_malloc, scsi_free_malloc): New functions -
+	allow us to pretend that we have a working malloc when we
+	initialize.  Use this instead of passing memory_start, memory_end
+	around all over the place.
+
+	* scsi.h, st.c, sr.c, sd.c, sg.c: Change *_init1 functions to use
+	scsi_init_malloc, remove all arguments, no return value.
+
+	* scsi.h: Remove index field from Scsi_Device and Scsi_Cmnd
+	structs.
+
+	* scsi.c (scsi_dev_init): Set up for scsi_init_malloc.
+	(scan_scsis): Get SDpnt from scsi_init_malloc, and refresh
+	when we discover a device.  Free pointer before returning.
+	Change scsi_devices into a linked list.
+
+	* scsi.c (scan_scsis): Change to only scan one host.
+	(scsi_dev_init): Loop over all detected hosts, and scan them.
+
+	* hosts.c  (scsi_init_free): Change so that  number of extra bytes
+	is stored in struct, and we do not have to pass it each time.
+
+	* hosts.h: Change Scsi_Host_Template struct to include "next" and
+	"release" functions.  Initialize to NULL in all low level
+	adapters.
+
+	* hosts.c: Rename scsi_hosts to builtin_scsi_hosts, create linked
+	list scsi_hosts, linked together with the new "next" field.
+
+Wed Jul  6 05:45:02 1994  Eric Youngdale  (eric@esp22)
+
+	* Linux 1.1.25 released.
+
+	* aha152x.c: Changes from Juergen - cleanups and updates.
+
+	* sd.c, sr.c: Use new check_media_change and revalidate
+	file_operations fields.
+
+	* st.c, st.h: Add changes from Kai Makisara, dated Jun 22.
+
+	* hosts.h: Change SG_ALL back to 0xff.  Apparently soft error
+	in /dev/brain resulted in having this bumped up.
+	Change first parameter in bios_param function to be Disk * instead
+	of index into rscsi_disks.
+
+	* sd_ioctl.c: Pass pointer to rscsi_disks element instead of index
+	to array.
+
+	* sd.h: Add struct name "scsi_disk" to typedef for Scsi_Disk.
+
+	* scsi.c: Remove redundant Maxtor XT8760S from blacklist.
+	In scsi_reset, add printk when DEBUG defined.
+
+	* All low level drivers: Modify definitions of bios_param in
+	appropriate way.
+
+Thu Jun 16 10:31:59 1994  Eric Youngdale  (eric@esp22)
+
+	* Linux 1.1.20 released.
+
+	* scsi_ioctl.c: Only pass down the actual number of characters
+	required to scsi_do_cmd, not the one rounded up to a even number
+	of sectors.
+
+	* ultrastor.c: Changes from Caleb Epstein for 24f cards.  Support
+	larger SG lists.
+
+	* ultrastor.c: Changes from me - use scsi_register to register
+	host.  Add some consistency checking,
+
+Wed Jun  1 21:12:13 1994  Eric Youngdale  (eric@esp22)
+
+	* Linux 1.1.19 released.
+
+	* scsi.h: Add new return code for reset() function:
+	SCSI_RESET_PUNT.
+
+	* scsi.c: Make SCSI_RESET_PUNT the same as SCSI_RESET_WAKEUP for
+	now.
+
+	* aha1542.c: If the command responsible for the reset is not
+	pending, return SCSI_RESET_PUNT.
+
+	* aha1740.c, buslogic.c, wd7000.c, ultrastor.c: Return
+	SCSI_RESET_PUNT instead of SCSI_RESET_SNOOZE.
+
+Tue May 31 19:36:01 1994  Eric Youngdale  (eric@esp22)
+
+	* buslogic.c: Do not print out message about "must be Adaptec"
+	if we have detected a buslogic card.  Print out a warning message
+	if we are configuring for >16Mb, since the 445S at board level
+	D or earlier does not work right.  The "D" level board can be made
+	to work by flipping an undocumented switch, but this is too subtle.
+
+    Changes based upon patches in Yggdrasil distribution.
+
+	* sg.c, sg.h: Return sense data to user.
+
+	* aha1542.c, aha1740.c, buslogic.c: Do not panic if
+	sense buffer is wrong size.
+
+	* hosts.c: Test for ultrastor card before any of the others.
+
+	* scsi.c: Allow boot-time option for max_scsi_luns=? so that
+	buggy firmware has an easy work-around.
+
+Sun May 15 20:24:34 1994  Eric Youngdale  (eric@esp22)
+
+	* Linux 1.1.15 released.
+
+	Post-codefreeze thaw...
+
+	* buslogic.[c,h]: New driver from David Gentzel.
+
+	* hosts.h: Add use_clustering field to explicitly say whether
+	clustering should be used for devices attached to this host
+	adapter.  The buslogic board apparently supports large SG lists,
+	but it is apparently faster if sd.c condenses this into a smaller
+	list.
+
+	* sd.c: Use this field instead of heuristic.
+
+	* All host adapter include files: Add appropriate initializer for
+	use_clustering field.
+
+	* scsi.h: Add #defines for return codes for the abort and reset
+	functions.  There are now a specific set of return codes to fully
+	specify all of the possible things that the low-level adapter
+	could do.
+
+	* scsi.c: Act based upon return codes from abort/reset functions.
+
+	* All host adapter abort/reset functions: Return new return code.
+
+	* Add code in scsi.c to help debug timeouts.  Use #define
+	DEBUG_TIMEOUT to enable this.
+
+	* scsi.c: If the host->irq field is set, use
+	disable_irq/enable_irq before calling queuecommand if we
+	are not already in an interrupt.  Reduce races, and we
+	can be sloppier about cli/sti in the interrupt routines now
+	(reduce interrupt latency).
+
+	* constants.c: Fix some things to eliminate warnings.  Add some
+	sense descriptions that were omitted before.
+
+	* aha1542.c: Watch for SCRD from host adapter - if we see it, set
+	a flag.  Currently we only print out the number of pending
+	commands that might need to be restarted.
+
+	* aha1542.c (aha1542_abort): Look for lost interrupts, OGMB still
+	full, and attempt to recover.  Otherwise give up.
+
+	* aha1542.c (aha1542_reset): Try BUS DEVICE RESET, and then pass
+	DID_RESET back up to the upper level code for all commands running
+	on this target (even on different LUNs).
+
+Sat May  7 14:54:01 1994
+
+	* Linux 1.1.12 released.
+
+	* st.c, st.h: New version from Kai.  Supports boot time
+	specification of number of buffers.
+
+	* wd7000.[c,h]: Updated driver from John Boyd.  Now supports
+	more than one wd7000 board in machine at one time, among other things.
+
+Wed Apr 20 22:20:35 1994
+
+	* Linux 1.1.8 released.
+
+	* sd.c: Add a few type casts where scsi_malloc is called.
+
+Wed Apr 13 12:53:29 1994
+
+	* Linux 1.1.4 released.
+
+	* scsi.c: Clean up a few printks (use %p to print pointers).
+
+Wed Apr 13 11:33:02 1994
+
+	* Linux 1.1.3 released.
+
+	* fdomain.c: Update to version 5.16 (Handle different FIFO sizes
+	better).
+
+Fri Apr  8 08:57:19 1994
+
+	* Linux 1.1.2 released.
+
+	* Throughout: SCSI portion of cluster diffs added.
+
+Tue Apr  5 07:41:50 1994
+
+	* Linux 1.1 development tree initiated.
+
+	* The linux 1.0 development tree is now effectively frozen except
+	for obvious bugfixes.
+
+******************************************************************
+******************************************************************
+******************************************************************
+******************************************************************
+
+Sun Apr 17 00:17:39 1994
+
+	* Linux 1.0, patchlevel 9 released.
+
+	* fdomain.c: Update to version 5.16 (Handle different FIFO sizes
+	better).
+
+Thu Apr  7 08:36:20 1994
+
+	* Linux 1.0, patchlevel8 released.
+
+	* fdomain.c: Update to version 5.15 from 5.9.  Handles 3.4 bios.
+
+Sun Apr  3 14:43:03 1994
+
+	* Linux 1.0, patchlevel6 released.
+
+	* wd7000.c: Make stab at fixing race condition.
+
+Sat Mar 26 14:14:50 1994
+
+	* Linux 1.0, patchlevel5 released.
+
+	* aha152x.c, Makefile: Fix a few bugs (too much data message).
+	Add a few more bios signatures. (Patches from Juergen).
+
+	* aha1542.c: Fix race condition in aha1542_out.
+
+Mon Mar 21 16:36:20 1994
+
+	* Linux 1.0, patchlevel3 released.
+
+	* sd.c, st.c, sr.c, sg.c: Return -ENXIO, not -ENODEV if we attempt
+	to open a non-existent device.
+
+	* scsi.c: Add Chinon cdrom to blacklist.
+
+	* sr_ioctl.c: Check return status of verify_area.
+
+Sat Mar  6 16:06:19 1994
+
+	* Linux 1.0 released (technically a pre-release).
+
+	* scsi.c: Add IMS CDD521, Maxtor XT-8760S to blacklist.
+
+Tue Feb 15 10:58:20 1994
+
+        * pl15e released.
+
+        * aha1542.c: For 1542C, allow dynamic device scan with >1Gb turned
+	off.
+
+	* constants.c: Fix typo in definition of CONSTANTS.
+
+        * pl15d released.
+
+Fri Feb 11 10:10:16 1994
+
+        * pl15c released.
+
+	* scsi.c: Add Maxtor XT-3280 and Rodime RO3000S to blacklist.
+
+	* scsi.c: Allow tagged queueing for scsi 3 devices as well.
+	Some really old devices report a version number of 0.  Disallow
+	LUN != 0 for these.
+
+Thu Feb 10 09:48:57 1994
+
+        * pl15b released.
+
+Sun Feb  6 12:19:46 1994
+
+        * pl15a released.
+
+Fri Feb  4 09:02:17 1994
+
+        * scsi.c: Add Teac cdrom to blacklist.
+
+Thu Feb  3 14:16:43 1994
+
+	* pl15 released.
+
+Tue Feb  1 15:47:43 1994
+
+	* pl14w released.
+
+	* wd7000.c (wd_bases): Fix typo in last change.
+
+Mon Jan 24 17:37:23 1994
+
+	* pl14u released.
+
+	* aha1542.c: Support 1542CF/extended bios.  Different from 1542C
+
+	* wd7000.c: Allow bios at 0xd8000 as well.
+
+	* ultrastor.c: Do not truncate cylinders to 1024.
+
+	* fdomain.c: Update to version 5.9 (add new bios signature).
+
+	* NCR5380.c: Update from Drew - should work a lot better now.
+
+Sat Jan  8 15:13:10 1994
+
+	* pl14o released.
+
+	* sr_ioctl.c: Zero reserved field before trying to set audio volume.
+
+Wed Jan  5 13:21:10 1994
+
+	* pl14m released.
+
+	* fdomain.c: Update to version 5.8.  No functional difference???
+
+Tue Jan  4 14:26:13 1994
+
+	* pl14l released.
+
+	* ultrastor.c: Remove outl, inl functions (now provided elsewhere).
+
+Mon Jan  3 12:27:25 1994
+
+	* pl14k released.
+
+	* aha152x.c: Remove insw and outsw functions.
+
+	* fdomain.c: Ditto.
+
+Wed Dec 29 09:47:20 1993
+
+	* pl14i released.
+
+	* scsi.c: Support RECOVERED_ERROR for tape drives.
+
+	* st.c: Update of tape driver from Kai.
+
+Tue Dec 21 09:18:30 1993
+
+	* pl14g released.
+
+	* aha1542.[c,h]: Support extended BIOS stuff.
+
+	* scsi.c: Clean up messages about disks, so they are displayed as
+	sda, sdb, etc instead of sd0, sd1, etc.
+
+	* sr.c:  Force reread of capacity if disk was changed.
+	Clear buffer before asking for capacity/sectorsize (some drives
+	do not report this properly).  Set needs_sector_size flag if
+	drive did not return sensible sector size.
+
+Mon Dec 13 12:13:47 1993
+
+	* aha152x.c: Update to version .101 from Juergen.
+
+Mon Nov 29 03:03:00 1993
+
+        * linux 0.99.14 released.
+
+	* All scsi stuff moved from kernel/blk_drv/scsi to drivers/scsi.
+
+	* Throughout: Grammatical corrections to various comments.
+
+	* Makefile: fix so that we do not need to compile things we are
+	not going to use.
+
+	* NCR5380.c, NCR5380.h, g_NCR5380.c, g_NCR5380.h, pas16.c,
+	pas16.h, t128.c, t128.h:  New files from Drew.
+
+	* aha152x.c, aha152x.h: New files from Juergen Fischer.
+
+	* aha1542.c: Support for more than one 1542 in the machine
+	at the same time.  Make functions static that do not need
+	visibility.
+
+	* aha1740.c: Set NEEDS_JUMPSTART flag in reset function, so we
+	know to restart the command.  Change prototype of aha1740_reset
+	to take a command pointer.
+
+	* constants.c: Clean up a few things.
+
+	* fdomain.c: Update to version 5.6.  Move snarf_region.  Allow
+	board to be set at different SCSI ids.  Remove support for
+	reselection (did not work well).  Set JUMPSTART flag in reset
+	code.
+
+	* hosts.c: Support new low-level adapters.  Allow for more than
+	one adapter of a given type.
+
+	* hosts.h: Allow for more than one adapter of a given type.
+
+	* scsi.c:  Add scsi_device_types array, if NEEDS_JUMPSTART is set
+	after a low-level reset, start the command again.  Sort blacklist,
+	and add Maxtor MXT-1240S, XT-4170S, NEC CDROM 84, Seagate ST157N.
+
+	* scsi.h: Add constants for tagged queueing.
+
+	* Throughout: Use constants from major.h instead of hardcoded
+	numbers for major numbers.
+
+	* scsi_ioctl.c: Fix bug in buffer length in ioctl_command.  Use
+	verify_area in GET_IDLUN ioctl.  Add new ioctls for
+	TAGGED_QUEUE_ENABLE, DISABLE.  Only allow IOCTL_SEND_COMMAND by
+	superuser.
+
+	* sd.c: Only pay attention to UNIT_ATTENTION for removable disks.
+	Fix bug where sometimes portions of blocks would get lost
+	resulting in processes hanging.  Add messages when we spin up a
+	disk, and fix a bug in the timing.  Increase read-ahead for disks
+	that are on a scatter-gather capable host adapter.
+
+	* seagate.c: Fix so that some parameters can be set from the lilo
+	prompt.  Supply jumpstart flag if we are resetting and need the
+	command restarted.   Fix so that we return 1 if we detect a card
+	so that multiple card detection works correctly.  Add yet another
+	signature for FD cards (950).  Add another signature for ST0x.
+
+	* sg.c, sg.h: New files from Lawrence Foard for generic scsi
+	access.
+
+	* sr.c:  Add type casts for (void*) so that we can do pointer
+	arithmetic.  Works with GCC without this, but it is not strictly
+	correct.  Same bugfix as was in sd.c.  Increase read-ahead a la
+	disk driver.
+
+	* sr_ioctl.c: Use scsi_malloc buffer instead of buffer from stack
+	since we cannot guarantee that the stack is < 16Mb.
+
+	ultrastor.c: Update to support 24f properly (JFC's driver).
+
+	wd7000.c: Supply jumpstart flag for reset.  Do not round up
+	number of cylinders in biosparam function.
+
+Sat Sep  4 20:49:56 1993
+
+    * 0.99pl13 released.
+
+    * Throughout:  Use check_region/snarf_region for all low-level
+    drivers.
+
+    * aha1542.c: Do hard reset instead of soft (some ethercard probes
+    screw us up).
+
+    * scsi.c: Add new flag ASKED_FOR_SENSE so that we can tell if we are
+    in a loop whereby the device returns null sense data.
+
+    * sd.c: Add code to spin up a drive if it is not already spinning.
+    Do this one at a time to make it easier on power supplies.
+
+    * sd_ioctl.c: Use sync_dev instead of fsync_dev in BLKFLSBUF ioctl.
+
+    * seagate.c: Switch around DATA/CONTROL lines.
+
+    * st.c: Change sense to unsigned.
+
+Thu Aug  5 11:59:18 1993
+
+    * 0.99pl12 released.
+
+    * constants.c, constants.h: New files with ascii descriptions of
+    various conditions.
+
+    * Makefile: Do not try to count the number of low-level drivers,
+    just generate the list of .o files.
+
+    * aha1542.c: Replace 16 with sizeof(SCpnt->sense_buffer).  Add tests
+    for addresses > 16Mb, panic if we find one.
+
+    * aha1740.c: Ditto with sizeof().
+
+    * fdomain.c: Update to version 3.18.  Add new signature, register IRQ
+    with irqaction.  Use ID 7 for new board.  Be more intelligent about
+    obtaining the h/s/c numbers for biosparam.
+
+    * hosts.c: Do not depend upon Makefile generated count of the number
+    of low-level host adapters.
+
+    * scsi.c: Use array for scsi_command_size instead of a function.  Add
+    Texel cdrom and Maxtor XT-4380S to blacklist.  Allow compile time
+    option for no-multi lun scan.  Add semaphore for possible problems
+    with handshaking, assume device is faulty until we know it not to be
+    the case.  Add DEBUG_INIT symbol to dump info as we scan for devices.
+    Zero sense buffer so we can tell if we need to request it.  When
+    examining sense information, request sense if buffer is all zero.
+    If RESET, request sense information to see what to do next.
+
+    * scsi_debug.c: Change some constants to use symbols like INT_MAX.
+
+    * scsi_ioctl.c (kernel_scsi_ioctl): New function -for making ioctl
+    calls from kernel space.
+
+    * sd.c: Increase timeout to 300.  Use functions in constants.h to
+    display info.  Use scsi_malloc buffer for READ_CAPACITY, since
+    we cannot guarantee that a stack based buffer is < 16Mb.
+
+    * sd_ioctl.c: Add BLKFLSBUF ioctl.
+
+    * seagate.c: Add new compile time options for ARBITRATE,
+    SLOW_HANDSHAKE, and SLOW_RATE.  Update assembly loops for transferring
+    data.  Use kernel_scsi_ioctl to request mode page with geometry.
+
+    * sr.c: Use functions in constants.c to display messages.
+
+    * st.c: Support for variable block size.
+
+    * ultrastor.c: Do not use cache for tape drives.  Set
+    unchecked_isa_dma flag, even though this may not be needed (gets set
+    later).
+
+Sat Jul 17 18:32:44 1993
+
+    * 0.99pl11 released.  C++ compilable.
+
+    * Throughout: Add type casts all over the place, and use "ip" instead
+    of "info" in the various biosparam functions.
+
+    * Makefile: Compile seagate.c with C++ compiler.
+
+    * aha1542.c: Always set ccb pointer as this gets trashed somehow on
+    some systems.  Add a few type casts.  Update biosparam function a little.
+
+    * aha1740.c: Add a few type casts.
+
+    * fdomain.c: Update to version 3.17 from 3.6.  Now works with
+    TMC-18C50.
+
+    * scsi.c: Minor changes here and there with datatypes.  Save use_sg
+    when requesting sense information so that this can properly be
+    restored if we retry the command.  Set aside dma buffers assuming each
+    block is 1 page, not 1Kb minix block.
+
+    * scsi_ioctl.c: Add a few type casts.  Other minor changes.
+
+    * sd.c:  Correctly  free all scsi_malloc'd memory if we run out of
+    dma_pool. Store blocksize information for each partition.
+
+    * seagate.c: Minor cleanups here and there.
+
+    * sr.c: Set up blocksize array for all discs.  Fix bug in freeing
+    buffers if we run out of dma pool.
+
+Thu Jun  2 17:58:11 1993
+
+    * 0.99pl10 released.
+
+    * aha1542.c: Support for BT 445S (VL-bus board with no dma channel).
+
+    * fdomain.c: Upgrade to version 3.6. Preliminary support for TNC-18C50.
+
+    * scsi.c: First attempt to fix problem with old_use_sg.  Change
+    NOT_READY to a SUGGEST_ABORT.  Fix timeout race where time might
+    get decremented past zero.
+
+    * sd.c: Add block_fsync function to dispatch table.
+
+    * sr.c: Increase timeout to 500 from 250.  Add entry for sync in
+    dispatch table (supply NULL).  If we do not have a sectorsize,
+    try to get it in the sd_open function.  Add new function just to
+    obtain sectorsize.
+
+    * sr.h: Add needs_sector_size semaphore.
+
+    * st.c: Add NULL for fsync in dispatch table.
+
+    * wd7000.c: Allow another condition for power on that are normal
+    and do not require a panic.
+
+Thu Apr 22 23:10:11 1993
+
+    * 0.99pl9 released.
+
+    * aha1542.c: Use (void) instead of () in setup_mailboxes.
+
+    * scsi.c: Initialize transfersize and underflow fields in SCmd to 0.
+    Do not panic for unsupported message bytes.
+
+    * scsi.h: Allocate 12 bytes instead of 10 for commands.  Add
+    transfersize and underflow fields.
+
+    * scsi_ioctl.c: Further bugfix to ioctl_probe.
+
+    * sd.c: Use long instead of int for last parameter in sd_ioctl.
+    Initialize transfersize and underflow fields.
+
+    * sd_ioctl.c: Ditto for sd_ioctl(,,,,);
+
+    * seagate.c: New version from Drew.  Includes new signatures for FD
+    cards.  Support for 0ws jumper. Correctly initialize
+    scsi_hosts[hostnum].this_id.  Improved handing of
+    disconnect/reconnect, and support command linking.  Use
+    transfersize and underflow fields.  Support scatter-gather.
+
+    * sr.c, sr_ioctl.c: Use long instead of int for last parameter in sr_ioctl.
+    Use buffer and buflength in do_ioctl.  Patches from Chris Newbold for
+    scsi-2 audio commands.
+
+    * ultrastor.c: Comment out in_byte (compiler warning).
+
+    * wd7000.c: Change () to (void) in wd7000_enable_dma.
+
+Wed Mar 31 16:36:25 1993
+
+    * 0.99pl8 released.
+
+    * aha1542.c: Handle mailboxes better for 1542C.
+        Do not truncate number of cylinders at 1024 for biosparam call.
+
+    * aha1740.c: Fix a few minor bugs for multiple devices.
+        Same as above for biosparam.
+
+    * scsi.c: Add lockable semaphore for removable devices that can have
+    media removal prevented.  Add another signature for flopticals.
+    (allocate_device): Fix race condition.  Allow more space in dma pool
+    for blocksizes of up to 4Kb.
+
+    * scsi.h: Define COMMAND_SIZE.  Define a SCSI specific version of
+    INIT_REQUEST that can run with interrupts off.
+
+    * scsi_ioctl.c: Make ioctl_probe function more idiot-proof.  If
+    a removable device says ILLEGAL REQUEST to a door-locking command,
+    clear lockable flag.  Add SCSI_IOCTL_GET_IDLUN ioctl.  Do not attempt
+    to lock door for devices that do not have lockable semaphore set.
+
+    * sd.c: Fix race condition for multiple disks.  Use INIT_SCSI_REQUEST
+    instead of INIT_REQUEST.  Allow sector sizes of 1024 and 256.  For
+    removable disks that are not ready, mark them as having a media change
+    (some drives do not report this later).
+
+    * seagate.c: Use volatile keyword for memory-mapped register pointers.
+
+    * sr.c: Fix race condition, a la sd.c.  Increase the number of retries
+    to 1.  Use INIT_SCSI_REQUEST.  Allow 512 byte sector sizes.  Do a
+    read_capacity when we init the device so we know the size and
+    sectorsize.
+
+    * st.c: If ioctl not found in st.c, try scsi_ioctl for others.
+
+    * ultrastor.c: Do not truncate number of cylinders at 1024 for
+    biosparam call.
+
+    * wd7000.c: Ditto.
+    Throughout: Use COMMAND_SIZE macro to determine length of scsi
+    command.
+
+
+
+Sat Mar 13 17:31:29 1993
+
+    * 0.99pl7 released.
+
+    Throughout: Improve punctuation in some messages, and use new
+    verify_area syntax.
+
+    * aha1542.c: Handle unexpected interrupts better.
+
+    * scsi.c: Ditto.  Handle reset conditions a bit better, asking for
+    sense information and retrying if required.
+
+    * scsi_ioctl.c: Allow for 12 byte scsi commands.
+
+    * ultrastor.c: Update to use scatter-gather.
+
+Sat Feb 20 17:57:15 1993
+
+    * 0.99pl6 released.
+
+    * fdomain.c: Update to version 3.5.  Handle spurious interrupts
+    better.
+
+    * sd.c: Use register_blkdev function.
+
+    * sr.c: Ditto.
+
+    * st.c: Use register_chrdev function.
+
+    * wd7000.c: Undo previous change.
+
+Sat Feb  6 11:20:43 1993
+
+    * 0.99pl5 released.
+
+    * scsi.c: Fix bug in testing for UNIT_ATTENTION.
+
+    * wd7000.c: Check at more addresses for bios.  Fix bug in biosparam
+    (heads & sectors turned around).
+
+Wed Jan 20 18:13:59 1993
+
+    * 0.99pl4 released.
+
+    * scsi.c: Ignore leading spaces when looking for blacklisted devices.
+
+    * seagate.c: Add a few new signatures for FD cards.  Another patch
+    with SCint to fix race condition.  Use recursion_depth to keep track
+    of how many times we have been recursively called, and do not start
+    another command unless we are on the outer level.  Fixes bug
+    with Syquest cartridge drives (used to crash kernel), because
+    they do not disconnect with large data transfers.
+
+Tue Jan 12 14:33:36 1993
+
+    * 0.99pl3 released.
+
+    * fdomain.c: Update to version 3.3 (a few new signatures).
+
+    * scsi.c: Add CDU-541, Denon DRD-25X to blacklist.
+    (allocate_request, request_queueable): Init request.waiting to NULL if
+    non-buffer type of request.
+
+    * seagate.c:  Allow controller to be overridden with CONTROLLER symbol.
+    Set SCint=NULL when we are done, to remove race condition.
+
+    * st.c: Changes from Kai.
+
+Wed Dec 30 20:03:47 1992
+
+    * 0.99pl2 released.
+
+    * scsi.c: Blacklist back in.  Remove Newbury drive as other bugfix
+    eliminates need for it here.
+
+    * sd.c: Return ENODEV instead of EACCES if no such device available.
+    (sd_init) Init blkdev_fops earlier so that sd_open is available sooner.
+
+    * sr.c: Same as above for sd.c.
+
+    * st.c: Return ENODEV instead of ENXIO if no device.  Init chrdev_fops
+    sooner, so that it is always there even if no tapes.
+
+    * seagate.c (controller_type): New variable to keep track of ST0x or
+    FD.  Modify signatures list to indicate controller type, and init
+    controller_type once we find a match.
+
+    * wd7000.c (wd7000_set_sync): Remove redundant function.
+
+Sun Dec 20 16:26:24 1992
+
+    * 0.99pl1 released.
+
+    * scsi_ioctl.c: Bugfix - check dev->index, not dev->id against
+    NR_SCSI_DEVICES.
+
+    * sr_ioctl.c: Verify that device exists before allowing an ioctl.
+
+    * st.c: Patches from Kai - change timeout values, improve end of tape
+    handling.
+
+Sun Dec 13 18:15:23 1992
+
+    * 0.99 kernel released.  Baseline for this ChangeLog.
diff -Nru a/Documentation/scsi/scsi_mid_low_api.txt b/Documentation/scsi/scsi_mid_low_api.txt
--- a/Documentation/scsi/scsi_mid_low_api.txt	2005-01-10 20:11:21 -08:00
+++ b/Documentation/scsi/scsi_mid_low_api.txt	2005-01-10 20:11:21 -08:00
@@ -363,8 +363,8 @@
 Mid level supplied functions
 ============================
 These functions are supplied by the SCSI mid level for use by LLDs.
-The names (i.e. entry points) of these functions are exported (mainly in 
-scsi_syms.c) so an LLD that is a module can access them. The kernel will
+The names (i.e. entry points) of these functions are exported 
+so an LLD that is a module can access them. The kernel will
 arrange for the SCSI mid level to be loaded and initialized before any LLD
 is initialized. The functions below are listed alphabetically and their
 names all start with "scsi_".
diff -Nru a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt
--- a/Documentation/sound/alsa/ALSA-Configuration.txt	2005-01-10 20:11:16 -08:00
+++ b/Documentation/sound/alsa/ALSA-Configuration.txt	2005-01-10 20:11:16 -08:00
@@ -252,9 +252,18 @@
     Module for video cards based on Bt87x chips.
 
     digital_rate - Override the default digital rate (Hz)
+    load_all	- Load the driver even if the card model isn't known
 
     Module supports up to 8 cards.
 
+  Module snd-ca0106
+  -----------------
+
+    Module for Creative Audigy LS and SB Live 24bit
+
+    Module supports up to 8 cards.
+
+
   Module snd-cmi8330
   ------------------
 
@@ -426,6 +435,13 @@
 	* Creative Card 5.1 (c) 2003			[0x3fc3/0x7cff]
         * Creative Card all ins and outs		[0x3fff/0x7fff]
     
+  Module snd-emu10k1x
+  -------------------
+
+    Module for Creative Emu10k1X (SB Live Dell OEM version)
+
+    Module supports up to 8 cards.
+
   Module snd-ens1370
   ------------------
 
@@ -595,8 +611,11 @@
 
     Module supports up to 8 cards.
 
-    Note: you need to load the firmware via hdsploader utility included
-          in alsa-tools and alsa-firmware packages.
+    Note: The firmware data can be automatically loaded via hotplug
+          when CONFIG_FW_LOADER is set.  Otherwise, you need to load
+          the firmware via hdsploader utility included in alsa-tools
+          package.
+          The firmware data is found in alsa-firmware package.
 
     Note: snd-page-alloc module does the job which snd-hammerfall-mem
           module did formerly.  It will allocate the buffers in advance
@@ -774,6 +793,12 @@
     Note: One miXart8 board will be represented as 4 alsa cards.
           See MIXART.txt for details.
 
+    When the driver is compiled as a module and the hotplug firmware
+    is supported, the firmware data is loaded via hotplug automatically.
+    Install the necessary firmware files in alsa-firmware package.
+    When no hotplug fw loader is available, you need to load the
+    firmware via mixartloader utility in alsa-tools package.
+
   Module snd-mpu401
   -----------------
 
@@ -1182,6 +1207,15 @@
     Note: for the MPU401 on VIA823x, use snd-mpu401 driver
 	  additonally.  The mpu_port option is for VIA686 chips only.
 
+  Module snd-via82xx-modem
+  ------------------------
+
+    Module for VIA82xx AC97 modem
+
+    ac97_clock	- AC'97 codec clock base (default 48000Hz)
+
+    Module supports up to 8 cards.
+
   Module snd-virmidi
   ------------------
 
@@ -1203,9 +1237,12 @@
 
     Module supports up to 8 cards.
 
-    For loading the firmware, use vxloader utility in alsa-tools
-    and alsa-firmware packages.  You can load the firmware automatically
-    by adding the following to /etc/modprobe.conf
+    When the driver is compiled as a module and the hotplug firmware
+    is supported, the firmware data is loaded via hotplug automatically.
+    Install the necessary firmware files in alsa-firmware package.
+    When no hotplug fw loader is available, you need to load the
+    firmware via vxloader utility in alsa-tools package.  To invoke
+    vxloader automatically, add the following to /etc/modprobe.conf
 
 	install snd-vx222 /sbin/modprobe --first-time -i snd-vx222 && /usr/bin/vxloader
 
@@ -1234,8 +1271,11 @@
     To activate the driver via the card manager, you'll need to set
     up /etc/pcmcia/vxpocket.conf.  See the sound/pcmcia/vx/vxpocket.c.
 
-    For loading the firmware, use vxloader utility in alsa-tools
-    and alsa-firmware packages.
+    When the driver is compiled as a module and the hotplug firmware
+    is supported, the firmware data is loaded via hotplug automatically.
+    Install the necessary firmware files in alsa-firmware package.
+    When no hotplug fw loader is available, you need to load the
+    firmware via vxloader utility in alsa-tools package.
 
     The irq_mask and irq_list are provided to avoid allocation of
     specific IRQs.  Usually you don't need to specify them.
@@ -1260,8 +1300,11 @@
     To activate the driver via the card manager, you'll need to set
     up /etc/pcmcia/vxp440.conf.  See the sound/pcmcia/vx/vxp440.c.
 
-    For loading the firmware, use vxloader utility in alsa-tools
-    and alsa-firmware packages.
+    When the driver is compiled as a module and the hotplug firmware
+    is supported, the firmware data is loaded via hotplug automatically.
+    Install the necessary firmware files in alsa-firmware package.
+    When no hotplug fw loader is available, you need to load the
+    firmware via vxloader utility in alsa-tools package.
 
     The irq_mask and irq_list are provided to avoid allocation of
     specific IRQs.  Usually you don't need to specify them.
diff -Nru a/Documentation/sound/alsa/Bt87x.txt b/Documentation/sound/alsa/Bt87x.txt
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/Documentation/sound/alsa/Bt87x.txt	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,78 @@
+Intro
+=====
+
+You might have noticed that the bt878 grabber cards have actually
+_two_ PCI functions:
+
+$ lspci
+[ ... ]
+00:0a.0 Multimedia video controller: Brooktree Corporation Bt878 (rev 02)
+00:0a.1 Multimedia controller: Brooktree Corporation Bt878 (rev 02)
+[ ... ]
+
+The first does video, it is backward compatible to the bt848.  The second
+does audio.  snd-bt87x is a driver for the second function.  It's a sound
+driver which can be used for recording sound (and _only_ recording, no
+playback).  As most TV cards come with a short cable which can be plugged
+into your sound card's line-in you probably don't need this driver if all
+you want to do is just watching TV...
+
+Some cards do not bother to connect anything to the audio input pins of
+the chip, and some other cards use the audio function to transport MPEG
+video data, so it's quite possible that audio recording may not work
+with your card.
+
+
+Driver Status
+=============
+
+The driver is now stable.  However, it doesn't know about many TV cards,
+and it refuses to load for cards it doesn't know.
+
+If the driver complains ("Unknown TV card found, the audio driver will
+not load"), you can specify the load_all=1 option to force the driver to
+try to use the audio capture function of your card.  If the frequency of
+recorded data is not right, try to specify the digital_rate option with
+other values than the default 32000 (often it's 44100 or 64000).
+
+If you have an unknown card, please mail the ID and board name to
+<alsa-devel@lists.sf.net>, regardless of whether audio capture works or
+not, so that future versions of this driver know about your card.
+
+
+Audio modes
+===========
+
+The chip knows two different modes (digital/analog).  snd-bt87x
+registers two PCM devices, one for each mode.  They cannot be used at
+the same time.
+
+
+Digital audio mode
+==================
+
+The first device (hw:X,0) gives you 16 bit stereo sound.  The sample
+rate depends on the external source which feeds the Bt87x with digital
+sound via I2S interface.
+
+
+Analog audio mode (A/D)
+=======================
+
+The second device (hw:X,1) gives you 8 or 16 bit mono sound.  Supported
+sample rates are between 119466 and 448000 Hz (yes, these numbers are
+that high).  If you've set the CONFIG_SND_BT87X_OVERCLOCK option, the
+maximum sample rate is 1792000 Hz, but audio data becomes unusable
+beyond 896000 Hz on my card.
+
+The chip has three analog inputs.  Consequently you'll get a mixer
+device to control these.
+
+
+Have fun,
+
+  Clemens
+
+
+Written by Clemens Ladisch <clemens@ladisch.de>
+big parts copied from btaudio.txt by Gerd Knorr <kraxel@bytesex.org>
diff -Nru a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
--- a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl	2005-01-10 20:11:17 -08:00
+++ b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl	2005-01-10 20:11:17 -08:00
@@ -397,12 +397,12 @@
   #include <sound/core.h>
   #include <sound/initval.h>
 
-  // module parameters (see "Module Parameters")
+  /* module parameters (see "Module Parameters") */
   static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;
   static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;
   static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;
 
-  // definition of the chip-specific record
+  /* definition of the chip-specific record */
   typedef struct snd_mychip mychip_t;
   struct snd_mychip {
           snd_card_t *card;
@@ -410,23 +410,26 @@
           // "PCI Resource Managements"
   };
 
-  // chip-specific destructor
-  // (see "PCI Resource Managements")
+  /* chip-specific destructor
+   * (see "PCI Resource Managements")
+   */
   static int snd_mychip_free(mychip_t *chip)
   {
-          // will be implemented later...
+          .... // will be implemented later...
   }
 
-  // component-destructor
-  // (see "Management of Cards and Components")
+  /* component-destructor
+   * (see "Management of Cards and Components")
+   */
   static int snd_mychip_dev_free(snd_device_t *device)
   {
           mychip_t *chip = device->device_data;
           return snd_mychip_free(chip);
   }
 
-  // chip-specific constructor
-  // (see "Management of Cards and Components")
+  /* chip-specific constructor
+   * (see "Management of Cards and Components")
+   */
   static int __devinit snd_mychip_create(snd_card_t *card,
                                          struct pci_dev *pci,
                                          mychip_t **rchip)
@@ -441,8 +444,9 @@
 
           // check PCI availability here
           // (see "PCI Resource Managements")
+          ....
 
-          // allocate a chip-specific data with zero filled
+          /* allocate a chip-specific data with zero filled */
           chip = kcalloc(1, sizeof(*chip), GFP_KERNEL);
           if (chip == NULL)
                   return -ENOMEM;
@@ -451,17 +455,21 @@
 
           // rest of initialization here; will be implemented
           // later, see "PCI Resource Managements"
+          ....
 
           if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL,
                                     chip, &ops)) < 0) {
                   snd_mychip_free(chip);
                   return err;
           }
+
+          snd_card_set_dev(card, &pci->dev);
+
           *rchip = chip;
           return 0;
   }
 
-  // constructor -- see "Constructor" sub-section
+  /* constructor -- see "Constructor" sub-section */
   static int __devinit snd_mychip_probe(struct pci_dev *pci,
                                const struct pci_device_id *pci_id)
   {
@@ -470,7 +478,7 @@
           mychip_t *chip;
           int err;
 
-          // (1)
+          /* (1) */
           if (dev >= SNDRV_CARDS)
                   return -ENODEV;
           if (!enable[dev]) {
@@ -478,39 +486,39 @@
                   return -ENOENT;
           }
 
-          // (2)
+          /* (2) */
           card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
           if (card == NULL)
                   return -ENOMEM;
 
-          // (3)
+          /* (3) */
           if ((err = snd_mychip_create(card, pci, &chip)) < 0) {
                   snd_card_free(card);
                   return err;
           }
 
-          // (4)
+          /* (4) */
           strcpy(card->driver, "My Chip");
           strcpy(card->shortname, "My Own Chip 123");
           sprintf(card->longname, "%s at 0x%lx irq %i",
                   card->shortname, chip->ioport, chip->irq);
 
-          // (5)
-          // implemented later
+          /* (5) */
+          .... // implemented later
 
-          // (6)
+          /* (6) */
           if ((err = snd_card_register(card)) < 0) {
                   snd_card_free(card);
                   return err;
           }
 
-          // (7)
+          /* (7) */
           pci_set_drvdata(pci, card);
           dev++;
           return 0;
   }
 
-  // destructor -- see "Destructor" sub-section
+  /* destructor -- see "Destructor" sub-section */
   static void __devexit snd_mychip_remove(struct pci_dev *pci)
   {
           snd_card_free(pci_get_drvdata(pci));
@@ -743,7 +751,7 @@
           </programlisting>
         </informalexample>
 
-	where the last twos are necessary only when module options are
+	where the last one is necessary only when module options are
       defined in the source file.  If the codes are split to several
       files, the file without module options don't need them.
       </para>
@@ -1089,20 +1097,22 @@
 
   static int snd_mychip_free(mychip_t *chip)
   {
-          // disable hardware here if any
-          // (not implemented in this document)
+          /* disable hardware here if any */
+          .... // (not implemented in this document)
 
-          // release the irq
+          /* release the irq */
           if (chip->irq >= 0)
                   free_irq(chip->irq, (void *)chip);
-          // release the i/o ports
+          /* release the i/o ports */
           pci_release_regions(chip->pci);
-          // release the data
+          /* disable the PCI entry */
+          pci_disable_device(chip->pci);
+          /* release the data */
           kfree(chip);
           return 0;
   }
 
-  // chip-specific constructor
+  /* chip-specific constructor */
   static int __devinit snd_mychip_create(snd_card_t *card,
                                          struct pci_dev *pci,
                                          mychip_t **rchip)
@@ -1115,27 +1125,32 @@
 
           *rchip = NULL;
 
-          // check PCI availability (28bit DMA)
+          /* initialize the PCI entry */
           if ((err = pci_enable_device(pci)) < 0)
                   return err;
+          /* check PCI availability (28bit DMA) */
           if (pci_set_dma_mask(pci, 0x0fffffff) < 0 ||
               pci_set_consistent_dma_mask(pci, 0x0fffffff) < 0) {
                   printk(KERN_ERR "error to set 28bit mask DMA\n");
+                  pci_disable_device(pci);
                   return -ENXIO;
           }
 
           chip = kcalloc(1, sizeof(*chip), GFP_KERNEL);
-          if (chip == NULL)
+          if (chip == NULL) {
+                  pci_disable_device(pci);
                   return -ENOMEM;
+          }
 
-          // initialize the stuff
+          /* initialize the stuff */
           chip->card = card;
           chip->pci = pci;
           chip->irq = -1;
 
-          // (1) PCI resource allocation
+          /* (1) PCI resource allocation */
           if ((err = pci_request_regions(pci, "My Chip")) < 0) {
                   kfree(chip);
+                  pci_disable_device(pci);
                   return err;
           }
           chip->port = pci_resource_start(pci, 0);
@@ -1148,19 +1163,22 @@
           }
           chip->irq = pci->irq;
 
-          // (2) initialization of the chip hardware
-          //     (not implemented in this document)
+          /* (2) initialization of the chip hardware */
+          .... //   (not implemented in this document)
 
           if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL,
                                     chip, &ops)) < 0) {
                   snd_mychip_free(chip);
                   return err;
           }
+
+          snd_card_set_dev(card, &pci->dev);
+
           *rchip = chip;
           return 0;
   }        
 
-  // PCI IDs
+  /* PCI IDs */
   static struct pci_device_id snd_mychip_ids[] = {
           { PCI_VENDOR_ID_FOO, PCI_DEVICE_ID_BAR,
             PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },
@@ -1169,7 +1187,7 @@
   };
   MODULE_DEVICE_TABLE(pci, snd_mychip_ids);
 
-  // pci_driver definition
+  /* pci_driver definition */
   static struct pci_driver driver = {
           .name = "My Own Chip",
           .id_table = snd_mychip_ids,
@@ -1177,13 +1195,13 @@
           .remove = __devexit_p(snd_mychip_remove),
   };
 
-  // initialization of the module
+  /* initialization of the module */
   static int __init alsa_card_mychip_init(void)
   {
           return pci_module_init(&driver);
   }
 
-  // clean up the module
+  /* clean up the module */
   static void __exit alsa_card_mychip_exit(void)
   {
           pci_unregister_driver(&driver);
@@ -1228,6 +1246,7 @@
   if (pci_set_dma_mask(pci, 0x0fffffff) < 0 ||
       pci_set_consistent_dma_mask(pci, 0x0fffffff) < 0) {
           printk(KERN_ERR "error to set 28bit mask DMA\n");
+          pci_disable_device(pci);
           return -ENXIO;
   }
   
@@ -1285,6 +1304,7 @@
 <![CDATA[
   if ((err = pci_request_regions(pci, "My Chip")) < 0) { 
           kfree(chip);
+          pci_disable_device(pci);
           return err;
   }
   chip->port = pci_resource_start(pci, 0);
@@ -1434,6 +1454,11 @@
       </para>
 
       <para>
+      Don't forget to call <function>pci_disable_device()</function>
+      before all finished.
+      </para>
+
+      <para>
         And finally, release the chip-specific record.
 
         <informalexample>
@@ -1462,7 +1487,7 @@
       When the chip-data is assigned to the card using
       <function>snd_device_new()</function> with
       <constant>SNDRV_DEV_LOWLELVEL</constant> , its destructor is 
-      called at the last.  that is, it is assured that all other
+      called at the last.  That is, it is assured that all other
       components like PCMs and controls have been already released.
       You don't have to call stopping PCMs, etc. explicitly, but just
       stop the hardware in the low-level.
@@ -1485,7 +1510,7 @@
           </programlisting>
         </informalexample>
 
-        and the allocation would be (assuming its size is 512 bytes):
+        and the allocation would be like below:
 
         <informalexample>
           <programlisting>
@@ -1522,6 +1547,30 @@
 
     </section>
 
+    <section id="pci-resource-device-struct">
+      <title>Registration of Device Struct</title>
+      <para>
+	At some point, typically after calling <function>snd_device_new()</function>,
+	you need to register the <structname>struct device</structname> of the chip
+	you're handling for udev and co.  ALSA provides a macro for compatibility with
+	older kernels.  Simply call like the following:
+        <informalexample>
+          <programlisting>
+<![CDATA[
+  snd_card_set_dev(card, &pci->dev);
+]]>
+          </programlisting>
+        </informalexample>
+	so that it stores the PCI's device pointer to the card.  This will be
+	referred by ALSA core functions later when the devices are registered.
+      </para>
+      <para>
+	In the case of non-PCI, pass the proper device struct pointer of the BUS
+	instead.  (In the case of legacy ISA without PnP, you don't have to do
+	anything.)
+      </para>
+    </section>
+
     <section id="pci-resource-entries">
       <title>PCI Entries</title>
       <para>
@@ -1801,8 +1850,9 @@
           mychip_t *chip = snd_pcm_substream_chip(substream);
           snd_pcm_runtime_t *runtime = substream->runtime;
 
-          // set up the hardware with the current configuration
-          // for example...
+          /* set up the hardware with the current configuration
+           * for example...
+           */
           mychip_set_sample_format(chip, runtime->format);
           mychip_set_sample_rate(chip, runtime->rate);
           mychip_set_channels(chip, runtime->channels);
@@ -1835,7 +1885,7 @@
           mychip_t *chip = snd_pcm_substream_chip(substream);
           unsigned int current_ptr;
 
-          // get the current hardware pointer
+          /* get the current hardware pointer */
           current_ptr = mychip_get_hw_pointer(chip);
           return current_ptr;
   }
@@ -2068,18 +2118,19 @@
   static void mychip_pcm_free(snd_pcm_t *pcm)
   {
           mychip_t *chip = snd_pcm_chip(pcm);
-          // free your own data
+          /* free your own data */
           kfree(chip->my_private_pcm_data);
-          // do what you like else...
+          // do what you like else
+          ....
   }
 
   static int __devinit snd_mychip_new_pcm(mychip_t *chip)
   {
           snd_pcm_t *pcm;
           ....
-          // allocate your own data
+          /* allocate your own data */
           chip->my_private_pcm_data = kmalloc(...);
-          // set the destructor
+          /* set the destructor */
           pcm->private_data = chip;
           pcm->private_free = mychip_pcm_free;
           ....
@@ -2231,7 +2282,7 @@
 <![CDATA[
           snd_pcm_runtime_t *runtime = substream->runtime;
           ...
-          runtime->hw = snd_mychip_playback_hw; // common definition
+          runtime->hw = snd_mychip_playback_hw; /* common definition */
           if (chip->model == VERY_OLD_ONE)
                   runtime->hw.channels_max = 1;
 ]]>
@@ -3030,7 +3081,7 @@
           spin_lock(&chip->lock);
           ....
           if (pcm_irq_invoked(chip)) {
-                  // call updater, unlock before it
+                  /* call updater, unlock before it */
                   spin_unlock(&chip->lock);
                   snd_pcm_period_elapsed(chip->substream);
                   spin_lock(&chip->lock);
@@ -3075,24 +3126,25 @@
           ....
           if (pcm_irq_invoked(chip)) {
                   unsigned int last_ptr, size;
-                  // get the current hardware pointer (in frames)
+                  /* get the current hardware pointer (in frames) */
                   last_ptr = get_hw_ptr(chip);
-                  // calculate the processed frames since the
-                  // last update
+                  /* calculate the processed frames since the
+                   * last update
+                   */
                   if (last_ptr < chip->last_ptr)
                           size = runtime->buffer_size + last_ptr 
                                    - chip->last_ptr; 
                   else
                           size = last_ptr - chip->last_ptr;
-                  // remember the last updated point
+                  /* remember the last updated point */
                   chip->last_ptr = last_ptr;
-                  // accumulate the size
+                  /* accumulate the size */
                   chip->size += size;
-                  // over the period boundary?
+                  /* over the period boundary? */
                   if (chip->size >= runtime->period_size) {
-                          // reset the accumulator
+                          /* reset the accumulator */
                           chip->size %= runtime->period_size;
-                          // call updater
+                          /* call updater */
                           spin_unlock(&chip->lock);
                           snd_pcm_period_elapsed(substream);
                           spin_lock(&chip->lock);
@@ -3216,7 +3268,7 @@
           snd_mask_t *f = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);
           snd_mask_t fmt;
 
-          snd_mask_any(&fmt);    // Init the struct
+          snd_mask_any(&fmt);    /* Init the struct */
           if (c->min < 2) {
                   fmt.bits[0] &= SNDRV_PCM_FMTBIT_S16_LE;
                   return snd_mask_refine(f, &fmt);
@@ -5131,7 +5183,7 @@
         <listitem><para>Call <function>snd_pcm_suspend_all()</function> to suspend the running PCM streams.</para></listitem>
         <listitem><para>Save the register values if necessary.</para></listitem>
         <listitem><para>Stop the hardware if necessary.</para></listitem>
-        <listitem><para>Set the power-state as D3hot by calling <function>snd_power_change_state()</function>.</para></listitem>
+        <listitem><para>Disable the PCI device by calling <function>pci_disable_device()</function>.</para></listitem>
       </orderedlist>
     </para>
 
@@ -5143,16 +5195,16 @@
 <![CDATA[
   static int mychip_suspend(snd_card_t *card, unsigned int state)
   {
-          // (1)
+          /* (1) */
           mychip_t *chip = card->pm_private_data;
-          // (2)
+          /* (2) */
           snd_pcm_suspend_all(chip->pcm);
-          // (3)
+          /* (3) */
           snd_mychip_save_registers(chip);
-          // (4)
+          /* (4) */
           snd_mychip_stop_hardware(chip);
-          // (5)
-          snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
+          /* (5) */
+          pci_disable_device(chip->pci);
           return 0;
   }
 ]]>
@@ -5172,8 +5224,6 @@
     <listitem><para>Resume the mixer, e.g. calling
     <function>snd_ac97_resume()</function>.</para></listitem>
     <listitem><para>Restart the hardware (if any).</para></listitem>
-    <listitem><para>Set the power-state as D0 by calling
-    <function>snd_power_change_state()</function>.</para></listitem>
     </orderedlist>
     </para>
 
@@ -5185,20 +5235,18 @@
 <![CDATA[
   static void mychip_resume(mychip_t *chip)
   {
-          // (1)
+          /* (1) */
           mychip_t *chip = card->pm_private_data;
-          // (2)
+          /* (2) */
           pci_enable_device(chip->pci);
-          // (3)
+          /* (3) */
           snd_mychip_reinit_chip(chip);
-          // (4)
+          /* (4) */
           snd_mychip_restore_registers(chip);
-          // (5)
+          /* (5) */
           snd_ac97_resume(chip->ac97);
-          // (6)
+          /* (6) */
           snd_mychip_restart_chip(chip);
-          // (7)
-          snd_power_change_state(card, SNDRV_CTL_POWER_D0);
           return 0;
   }
 ]]>
@@ -5314,19 +5362,15 @@
 <![CDATA[
   #define CARD_NAME "My Chip"
 
-  static int boot_devs;
-  module_param_array(index, int, boot_devs, 0444);
+  module_param_array(index, int, NULL, 0444);
   MODULE_PARM_DESC(index, "Index value for " CARD_NAME " soundcard.");
-  module_param_array(id, charp, boot_devs, 0444);
+  module_param_array(id, charp, NULL, 0444);
   MODULE_PARM_DESC(id, "ID string for " CARD_NAME " soundcard.");
-  module_param_array(enable, bool, boot_devs, 0444);
+  module_param_array(enable, bool, NULL, 0444);
   MODULE_PARM_DESC(enable, "Enable " CARD_NAME " soundcard.");
 ]]>
         </programlisting>
       </informalexample>
-
-    Here boot_devs is passed but simply ignored since we don't care
-    the number of parsed parameters.
     </para>
 
     <para>
@@ -5423,7 +5467,10 @@
           depends on SND
           select SND_PCM
           help
-            Say 'Y' or 'M' to include support for Foobar XYZ soundcard.
+            Say Y here to include support for Foobar XYZ soundcard.
+
+            To compile this driver as a module, choose M here: the module
+            will be called snd-xyz.
 ]]>
         </programlisting>
       </informalexample>
diff -Nru a/Documentation/sound/alsa/MIXART.txt b/Documentation/sound/alsa/MIXART.txt
--- a/Documentation/sound/alsa/MIXART.txt	2005-01-10 20:11:20 -08:00
+++ b/Documentation/sound/alsa/MIXART.txt	2005-01-10 20:11:20 -08:00
@@ -72,6 +72,10 @@
 FIRMWARE
 ========
 
+[As of 2.6.11, the firmware can be loaded automatically with hotplug
+ when CONFIG_FW_LOADER is set.  The mixartloader is necessary only
+ for older versions or when you build the driver into kernel.]
+ 
 For loading the firmware automatically after the module is loaded, use
 the post-install command.  For example, add the following entry to
 /etc/modprobe.conf for miXart driver:
diff -Nru a/Documentation/sound/alsa/OSS-Emulation.txt b/Documentation/sound/alsa/OSS-Emulation.txt
--- a/Documentation/sound/alsa/OSS-Emulation.txt	2005-01-10 20:11:19 -08:00
+++ b/Documentation/sound/alsa/OSS-Emulation.txt	2005-01-10 20:11:19 -08:00
@@ -164,16 +164,15 @@
 
 The block and non-block options are used to change the behavior of
 opening the device file.
-As default, ALSA behaves as defined in POSIX, i.e. blocks the file
-when it's busy until the device becomes free (unless O_NONBLOCK is
-specified).  Some applications assume the non-block open behavior,
-which are actually implemented in some real OSS drivers.
+
+As default, ALSA behaves as original OSS drivers, i.e. does not block
+the file when it's busy. The -EBUSY error is returned in this case.
 
 This blocking behavior can be changed globally via nonblock_open
-module option of snd-pcm-oss.  For using the non-block mode as default
+module option of snd-pcm-oss.  For using the blocking mode as default
 for OSS devices, define like the following:
 
-	options snd-pcm-oss nonblock_open=1
+	options snd-pcm-oss nonblock_open=0
 
 The partial-frag and no-silence commands have been added recently.
 Both commands are for optimization use only.  The former command
diff -Nru a/Documentation/sparse.txt b/Documentation/sparse.txt
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/Documentation/sparse.txt	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,72 @@
+Copyright 2004 Linus Torvalds
+Copyright 2004 Pavel Machek <pavel@suse.cz>
+
+Using sparse for typechecking
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+"__bitwise" is a type attribute, so you have to do something like this:
+
+        typedef int __bitwise pm_request_t;
+
+        enum pm_request {
+                PM_SUSPEND = (__force pm_request_t) 1,
+                PM_RESUME = (__force pm_request_t) 2
+        };
+
+which makes PM_SUSPEND and PM_RESUME "bitwise" integers (the "__force" is
+there because sparse will complain about casting to/from a bitwise type,
+but in this case we really _do_ want to force the conversion). And because
+the enum values are all the same type, now "enum pm_request" will be that
+type too.
+
+And with gcc, all the __bitwise/__force stuff goes away, and it all ends
+up looking just like integers to gcc.
+
+Quite frankly, you don't need the enum there. The above all really just
+boils down to one special "int __bitwise" type.
+
+So the simpler way is to just do
+
+        typedef int __bitwise pm_request_t;
+
+        #define PM_SUSPEND ((__force pm_request_t) 1)
+        #define PM_RESUME ((__force pm_request_t) 2)
+
+and you now have all the infrastructure needed for strict typechecking.
+
+One small note: the constant integer "0" is special. You can use a
+constant zero as a bitwise integer type without sparse ever complaining.
+This is because "bitwise" (as the name implies) was designed for making
+sure that bitwise types don't get mixed up (little-endian vs big-endian
+vs cpu-endian vs whatever), and there the constant "0" really _is_
+special.
+
+Modify top-level Makefile to say
+
+CHECK           = sparse -Wbitwise
+
+or you don't get any checking at all.
+
+
+Where to get sparse
+~~~~~~~~~~~~~~~~~~~
+
+With BK, you can just get it from
+
+        bk://sparse.bkbits.net/sparse
+
+and DaveJ has tar-balls at
+
+	http://www.codemonkey.org.uk/projects/bitkeeper/sparse/
+
+
+Once you have it, just do
+
+        make
+        make install
+
+as your regular user, and it will install sparse in your ~/bin directory.
+After that, doing a kernel make with "make C=1" will run sparse on all the
+C files that get recompiled, or with "make C=2" will run sparse on the
+files whether they need to be recompiled or not (ie the latter is fast way
+to check the whole tree if you have already built it).
diff -Nru a/Documentation/stable_api_nonsense.txt b/Documentation/stable_api_nonsense.txt
--- a/Documentation/stable_api_nonsense.txt	2005-01-10 20:11:21 -08:00
+++ b/Documentation/stable_api_nonsense.txt	2005-01-10 20:11:21 -08:00
@@ -9,7 +9,7 @@
 kernel to userspace interfaces.  The kernel to userspace interface is
 the one that application programs use, the syscall interface.  That
 interface is _very_ stable over time, and will not break.  I have old
-programs that were built on a pre 0.9something kernel that still works
+programs that were built on a pre 0.9something kernel that still work
 just fine on the latest 2.6 kernel release.  This interface is the one
 that users and application programmers can count on being stable.
 
@@ -167,7 +167,7 @@
 ensures that your driver is always buildable, and works over time, with
 very little effort on your part.
 
-The very good side affects of having your driver in the main kernel tree
+The very good side effects of having your driver in the main kernel tree
 are:
   - The quality of the driver will rise as the maintenance costs (to the
     original developer) will decrease.
diff -Nru a/Documentation/stallion.txt b/Documentation/stallion.txt
--- a/Documentation/stallion.txt	2005-01-10 20:11:21 -08:00
+++ b/Documentation/stallion.txt	2005-01-10 20:11:21 -08:00
@@ -1,8 +1,13 @@
+* NOTE - This is an unmaintained driver.  Lantronix, which bought Stallion
+technologies, is not active in driver maintenance, and they have no information
+on when or if they will have a 2.6 driver.
+
+James Nelson <james4765@gmail.com> - 12-12-2004
 
 Stallion Multiport Serial Driver Readme
 ---------------------------------------
 
-Copyright (C) 1994-1999,  Stallion Technologies (support@stallion.com).
+Copyright (C) 1994-1999,  Stallion Technologies.
 
 Version:   5.5.1
 Date:      28MAR99
@@ -19,29 +24,20 @@
 
 If you are using any of the Stallion intelligent multiport boards (Brumby,
 ONboard, EasyConnection 8/64 (ISA, EISA, MCA), EasyConnection/RA-PCI) with
-Linux you will need to get the driver utility package. This package is
-available at most of the Linux archive sites (and on CD-ROMs that contain
-these archives). The file will be called stallion-X.X.X.tar.gz where X.X.X
-will be the version number. In particular this package contains the board
-embedded executable images that are required for these boards. It also
-contains the downloader program. These boards cannot be used without this.
+Linux you will need to get the driver utility package.  This contains a
+firmware loader and the firmware images necessary to make the devices operate.
 
 The Stallion Technologies ftp site, ftp.stallion.com, will always have
-the latest version of the driver utility package. Other sites that usually
-have the latest version are tsx-11.mit.edu, sunsite.unc.edu and their
-mirrors.
-
-ftp.stallion.com:/drivers/ata5/Linux/v550.tar.gz
-tsx-11.mit.edu:/pub/linux/packages/stallion/stallion-5.5.0.tar.gz
-sunsite.unc.edu:/pub/Linux/kernel/patches/serial/stallion-5.5.0.tar.gz
+the latest version of the driver utility package.
+
+ftp://ftp.stallion.com/drivers/ata5/Linux/ata-linux-550.tar.gz
 
 As of the printing of this document the latest version of the driver
 utility package is 5.5.0. If a later version is now available then you
 should use the latest version.
 
 If you are using the EasyIO, EasyConnection 8/32 or EasyConnection 8/64-PCI
-boards then you don't need this package. Although it does have a handy
-script to create the /dev device nodes for these boards, and a serial stats
+boards then you don't need this package, although it does have a serial stats
 display program.
 
 If you require DIP switch settings, EISA or MCA configuration files, or any
@@ -85,7 +81,7 @@
 
 Typically to load up the smart board driver use:
 
-    insmod stallion.o
+    modprobe stallion
 
 This will load the EasyIO and EasyConnection 8/32 driver. It will output a
 message to say that it loaded and print the driver version number. It will
@@ -96,12 +92,12 @@
 
 To load the intelligent board driver use:
 
-    insmod istallion.o
+    modprobe istallion
 
 It will output similar messages to the smart board driver.
 
 If not using an auto-detectable board type (that is a PCI board) then you
-will also need to supply command line arguments to the "insmod" command
+will also need to supply command line arguments to the modprobe command
 when loading the driver. The general form of the configuration argument is
 
     board?=<name>[,<ioaddr>[,<addr>][,<irq>]]
@@ -111,7 +107,7 @@
     board?  -- specifies the arbitrary board number of this board,
                can be in the range 0 to 3.
 
-    name    -- textual name of this board. The board name is the comman
+    name    -- textual name of this board. The board name is the common
                board name, or any "shortened" version of that. The board
                type number may also be used here.
 
@@ -127,24 +123,24 @@
 Up to 4 board configuration arguments can be specified on the load line.
 Here is some examples:
 
-    insmod stallion.o board0=easyio,0x2a0,5
+    modprobe stallion board0=easyio,0x2a0,5
 
 This configures an EasyIO board as board 0 at I/O address 0x2a0 and IRQ 5.
 
-    insmod istallion.o board3=ec8/64,0x2c0,0xcc000
+    modprobe istallion board3=ec8/64,0x2c0,0xcc000
 
 This configures an EasyConnection 8/64 ISA as board 3 at I/O address 0x2c0 at
 memory address 0xcc000.
 
-    insmod stallion.o board1=ec8/32-at,0x2a0,0x280,10
+    modprobe stallion board1=ec8/32-at,0x2a0,0x280,10
 
 This configures an EasyConnection 8/32 ISA board at primary I/O address 0x2a0,
 secondary address 0x280 and IRQ 10.
 
 You will probably want to enter this module load and configuration information
 into your system startup scripts so that the drivers are loaded and configured
-on each system boot. Typically the start up script would be something line
-/etc/rc.d/rc.modules.
+on each system boot. Typically the start up script would be something like
+/etc/modprobe.conf.
 
 
 2.2 STATIC DRIVER CONFIGURATION:
@@ -161,8 +157,8 @@
 To set up the driver(s) for the boards that you want to use you need to
 edit the appropriate driver file and add configuration entries.
 
-If using EasyIO or EasyConnection 8/32 ISA or MCA boards, do:
-   vi /usr/src/linux/drivers/char/stallion.c
+If using EasyIO or EasyConnection 8/32 ISA or MCA boards,
+   In drivers/char/stallion.c:
       - find the definition of the stl_brdconf array (of structures)
         near the top of the file
       - modify this to match the boards you are going to install
@@ -170,8 +166,8 @@
       - save and exit
 
 If using ONboard, Brumby, Stallion or EasyConnection 8/64 (ISA or EISA)
-boards then do:
-   vi /usr/src/linux/drivers/char/istallion.c
+boards,
+   In drivers/char/istallion.c:
       - find the definition of the stli_brdconf array (of structures)
         near the top of the file
       - modify this to match the boards you are going to install
@@ -291,20 +287,20 @@
 of course the ports will not be operational!
 
 If you are using the modularized version of the driver you might want to put
-the insmod calls in the startup script as well (before the download lines
+the modprobe calls in the startup script as well (before the download lines
 obviously).
 
 
 3.2 USING THE SERIAL PORTS
 
 Once the driver is installed you will need to setup some device nodes to
-access the serial ports. The simplest method is to use the stallion utility
-"mkdevnods" script. It will automatically create device entries for Stallion
-boards. This will create the normal serial port devices as /dev/ttyE# where
-# is the port number starting from 0. A bank of 64 minor device numbers is
-allocated to each board, so the first port on the second board is port 64,
-etc. A set of callout type devices is also created. They are created as the
-devices /dev/cue# where # is the same as for the ttyE devices.
+access the serial ports. The simplest method is to use the /dev/MAKEDEV program.
+It will automatically create device entries for Stallion boards. This will
+create the normal serial port devices as /dev/ttyE# where# is the port number
+starting from 0. A bank of 64 minor device numbers is allocated to each board,
+so the first port on the second board is port 64,etc. A set of callout type
+devices may also be created. They are created as the devices /dev/cue# where #
+is the same as for the ttyE devices.
 
 For the most part the Stallion driver tries to emulate the standard PC system
 COM ports and the standard Linux serial driver. The idea is that you should
diff -Nru a/Documentation/usb/sn9c102.txt b/Documentation/usb/sn9c102.txt
--- a/Documentation/usb/sn9c102.txt	2005-01-10 20:11:22 -08:00
+++ b/Documentation/usb/sn9c102.txt	2005-01-10 20:11:22 -08:00
@@ -11,16 +11,17 @@
 1.  Copyright
 2.  Disclaimer
 3.  License
-4.  Overview
-5.  Driver installation
+4.  Overview and features
+5.  Module dependencies
 6.  Module loading
 7.  Module parameters
 8.  Optional device control through "sysfs"
 9.  Supported devices
-10. How to add support for new image sensors
+10. How to add plug-in's for new image sensors
 11. Notes for V4L2 application developers
-12. Contact information
-13. Credits
+12. Video frame formats
+13. Contact information
+14. Credits
 
 
 1. Copyright
@@ -51,16 +52,18 @@
 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
 
-4. Overview
-===========
+4. Overview and features
+========================
 This driver attempts to support the video and audio streaming capabilities of
-the devices mounting the SONiX SN9C101, SN9C102 and SN9C103 (or SUI-102) PC
-Camera Controllers.
+the devices mounting the SONiX SN9C101, SN9C102 and SN9C103 PC Camera
+Controllers.
 
 It's worth to note that SONiX has never collaborated with the author during the
 development of this project, despite several requests for enough detailed
 specifications of the register tables, compression engine and video data format
-of the above chips.
+of the above chips. Nevertheless, these informations are no longer necessary,
+becouse all the aspects related to these chips are known and have been
+described in detail in this documentation.
 
 The driver relies on the Video4Linux2 and USB core modules. It has been
 designed to run properly on SMP systems as well.
@@ -79,15 +82,16 @@
   pixel area of image sensor;
 - image downscaling with arbitrary scaling factors from 1, 2 and 4 in both
   directions (see "Notes for V4L2 application developers" paragraph);
-- two different video formats for uncompressed or compressed data (see also
-  "Notes for V4L2 application developers" paragraph);
+- two different video formats for uncompressed or compressed data in low or
+  high compression quality (see also "Notes for V4L2 application developers"
+  and "Video frame formats" paragraphs);
 - full support for the capabilities of many of the possible image sensors that
   can be connected to the SN9C10x bridges, including, for istance, red, green,
   blue and global gain adjustments and exposure (see "Supported devices"
   paragraph for details);
 - use of default color settings for sunlight conditions;
-- dynamic I/O interface for both SN9C10x and image sensor control (see
-  "Optional device control through 'sysfs'" paragraph);
+- dynamic I/O interface for both SN9C10x and image sensor control and
+  monitoring (see "Optional device control through 'sysfs'" paragraph);
 - dynamic driver control thanks to various module parameters (see "Module
   parameters" paragraph);
 - up to 64 cameras can be handled at the same time; they can be connected and
@@ -177,7 +181,7 @@
 -------------------------------------------------------------------------------
 
 
-8. Optional device control through "sysfs"
+8. Optional device control through "sysfs" [1]
 ==========================================
 It is possible to read and write both the SN9C10x and the image sensor
 registers by using the "sysfs" filesystem interface.
@@ -195,9 +199,9 @@
 SN9C10x bridge, while the other two control the sensor chip. "reg" and
 "i2c_reg" hold the values of the current register index where the following
 reading/writing operations are addressed at through "val" and "i2c_val". Their
-use is not intended for end-users, unless you know what you are doing. Note
-that "i2c_reg" and "i2c_val" won't be created if the sensor does not actually
-support the standard I2C protocol. Also, remember that you must be logged in as
+use is not intended for end-users. Note that "i2c_reg" and "i2c_val" won't be
+created if the sensor does not actually support the standard I2C protocol or
+its registers are not 8-bit long. Also, remember that you must be logged in as
 root before writing to them.
 
 As an example, suppose we were to want to read the value contained in the
@@ -216,7 +220,48 @@
 	[root@localhost #] echo 2 > val
 
 Note that the SN9C10x always returns 0 when some of its registers are read.
-To avoid race conditions, all the I/O accesses to the files are serialized.
+To avoid race conditions, all the I/O accesses to the above files are
+serialized.
+
+The sysfs interface also provides the "frame_header" entry, which exports the
+frame header of the most recent requested and captured video frame. The header
+is 12-bytes long and is appended to every video frame by the SN9C10x
+controllers. As an example, this additional information can be used by the user
+application for implementing auto-exposure features via software. 
+
+The following table describes the frame header:
+
+Byte #  Value         Description
+------  -----         -----------
+0x00    0xFF          Frame synchronisation pattern.
+0x01    0xFF          Frame synchronisation pattern.
+0x02    0x00          Frame synchronisation pattern.
+0x03    0xC4          Frame synchronisation pattern.
+0x04    0xC4          Frame synchronisation pattern.
+0x05    0x96          Frame synchronisation pattern.
+0x06    0x00 or 0x01  Unknown meaning. The exact value depends on the chip.
+0x07    0xXX          Variable value, whose bits are ff00uzzc, where ff is a
+                      frame counter, u is unknown, zz is a size indicator
+                      (00 = VGA, 01 = SIF, 10 = QSIF) and c stands for
+                      "compression enabled" (1 = yes, 0 = no).
+0x08    0xXX          Brightness sum inside Auto-Exposure area (low-byte).
+0x09    0xXX          Brightness sum inside Auto-Exposure area (high-byte).
+                      For a pure white image, this number will be equal to 500
+                      times the area of the specified AE area. For images
+                      that are not pure white, the value scales down according
+                      to relative whiteness.
+0x0A    0xXX          Brightness sum outside Auto-Exposure area (low-byte).
+0x0B    0xXX          Brightness sum outside Auto-Exposure area (high-byte).
+                      For a pure white image, this number will be equal to 125
+                      times the area outside of the specified AE area. For
+                      images that are not pure white, the value scales down
+                      according to relative whiteness.
+
+The AE area (sx, sy, ex, ey) in the active window can be set by programming the
+registers 0x1c, 0x1d, 0x1e and 0x1f of the SN9C10x controllers, where one unit
+corresponds to 32 pixels.
+
+[1] The frame header has been documented by Bertrik Sikken.
 
 
 9. Supported devices
@@ -275,8 +320,10 @@
 
 Model       Manufacturer
 -----       ------------
-PAS106B     PixArt Imaging Inc.
-PAS202BCB   PixArt Imaging Inc.
+HV7131D     Hynix Semiconductor, Inc.
+MI-0343     Micron Technology, Inc.
+PAS106B     PixArt Imaging, Inc.
+PAS202BCB   PixArt Imaging, Inc.
 TAS5110C1B  Taiwan Advanced Sensor Corporation
 TAS5130D1B  Taiwan Advanced Sensor Corporation
 
@@ -295,15 +342,15 @@
 driver.
 
 
-10. How to add support for new image sensors
-============================================
-It should be easy to write code for new sensors by using the small API that I
-have created for this purpose, which is present in "sn9c102_sensor.h"
+10. How to add plug-in's for new image sensors
+==============================================
+It should be easy to write plug-in's for new sensors by using the small API
+that has been created for this purpose, which is present in "sn9c102_sensor.h"
 (documentation is included there). As an example, have a look at the code in
 "sn9c102_pas106b.c", which uses the mentioned interface.
 
-At the moment, possible unsupported image sensors are: HV7131x series (VGA),
-MI03x series (VGA), OV7620 (VGA), OV7630 (VGA), CIS-VF10 (VGA).
+At the moment, possible unsupported image sensors are: CIS-VF10 (VGA),
+OV7620 (VGA), OV7630 (VGA).
 
 
 11. Notes for V4L2 application developers
@@ -332,29 +379,98 @@
 This driver supports two different video formats: the first one is the "8-bit
 Sequential Bayer" format and can be used to obtain uncompressed video data
 from the device through the current I/O method, while the second one provides
-"raw" compressed video data (without the initial and final frame headers). The
-compression quality may vary from 0 to 1 and can be selected or queried thanks
-to the VIDIOC_S_JPEGCOMP and VIDIOC_G_JPEGCOMP V4L2 ioctl's. For maximum
-flexibility, the default active video format depends on how the image sensor
-being used is initialized (as described in the documentation of the API for the
-image sensors supplied by this driver).
+"raw" compressed video data (without frame headers not related to the
+compressed data). The compression quality may vary from 0 to 1 and can be
+selected or queried thanks to the VIDIOC_S_JPEGCOMP and VIDIOC_G_JPEGCOMP V4L2
+ioctl's. For maximum flexibility, both the default active video format and the
+default compression quality depend on how the image sensor being used is
+initialized (as described in the documentation of the API for the image sensors
+supplied by this driver).
 
 
-12. Contact information
+12. Video frame formats [1]
 =======================
-I may be contacted by e-mail at <luca.risolia@studio.unibo.it>.
+The SN9C10x PC Camera Controllers can send images in two possible video
+formats over the USB: either native "Sequential RGB Bayer" or Huffman
+compressed. The latter is used to achieve high frame rates. The current video
+format may be selected or queried from the user application by calling the
+VIDIOC_S_FMT or VIDIOC_G_FMT ioctl's, as described in the V4L2 API
+specifications.
+
+The name "Sequential Bayer" indicates the organization of the red, green and
+blue pixels in one video frame. Each pixel is associated with a 8-bit long
+value and is disposed in memory according to the pattern shown below:
+
+B[0]   G[1]    B[2]    G[3]    ...   B[m-2]         G[m-1]
+G[m]   R[m+1]  G[m+2]  R[m+2]  ...   G[2m-2]        R[2m-1] 
+...
+...                                  B[(n-1)(m-2)]  G[(n-1)(m-1)]
+...                                  G[n(m-2)]      R[n(m-1)]
+
+The above matrix also represents the sequential or progressive read-out mode of
+the (n, m) Bayer color filter array used in many CCD/CMOS image sensors.
+
+One compressed video frame consists of a bitstream that encodes for every R, G,
+or B pixel the difference between the value of the pixel itself and some
+reference pixel value. Pixels are organised in the Bayer pattern and the Bayer
+sub-pixels are tracked individually and alternatingly. For example, in the
+first line values for the B and G1 pixels are alternatingly encoded, while in
+the second line values for the G2 and R pixels are alternatingly encoded.
+
+The pixel reference value is calculated as follows:
+- the 4 top left pixels are encoded in raw uncompressed 8-bit format;
+- the value in the top two rows is the value of the pixel left of the current
+  pixel;
+- the value in the left column is the value of the pixel above the current
+  pixel;
+- for all other pixels, the reference value is the average of the value of the
+  pixel on the left and the value of the pixel above the current pixel;
+- there is one code in the bitstream that specifies the value of a pixel
+  directly (in 4-bit resolution);
+- pixel values need to be clamped inside the range [0..255] for proper
+  decoding.
+
+The algorithm purely describes the conversion from compressed Bayer code used
+in the SN9C10x chips to uncompressed Bayer. Additional steps are required to
+convert this to a color image (i.e. a color interpolation algorithm).
+ 
+The following Huffman codes have been found:
+0: +0 (relative to reference pixel value) 
+100: +4
+101: -4?
+1110xxxx: set absolute value to xxxx.0000 
+1101: +11
+1111: -11
+11001: +20
+110000: -20
+110001: ??? - these codes are apparently not used
 
-I can accept GPG/PGP encrypted e-mail. My GPG key ID is 'FCE635A4'.
-My public 1024-bit key should be available at any keyserver; the fingerprint
-is: '88E8 F32F 7244 68BA 3958  5D40 99DA 5D2A FCE6 35A4'.
+[1] The Huffman compression algorithm has been reverse-engineered and
+    documented by Bertrik Sikken.
+
+
+13. Contact information
+=======================
+The author may be contacted by e-mail at <luca.risolia@studio.unibo.it>.
 
+GPG/PGP encrypted e-mail's are accepted. The GPG key ID of the author is
+'FCE635A4'; the public 1024-bit key should be available at any keyserver;
+the fingerprint is: '88E8 F32F 7244 68BA 3958  5D40 99DA 5D2A FCE6 35A4'.
 
-13. Credits
+
+14. Credits
 ===========
-I would thank the following persons:
+Many thanks to following persons for their contribute (listed in alphabetical
+order):
 
-- Stefano Mozzi, who donated 45 EU;
 - Luca Capello for the donation of a webcam;
-- Mizuno Takafumi for the donation of a webcam;
+- Joao Rodrigo Fuzaro, Joao Limirio, Claudio Filho and Caio Begotti for the
+  donation of a webcam;
 - Carlos Eduardo Medaglia Dyonisio, who added the support for the PAS202BCB
-  image sensor.
+  image sensor;
+- Stefano Mozzi, who donated 45 EU;
+- Bertrik Sikken, who reverse-engineered and documented the Huffman compression
+  algorithm used in the SN9C10x controllers and implemented the first decoder;
+- Mizuno Takafumi for the donation of a webcam;
+- An "anonymous" donator (who didn't want his name to be revealed) for the
+  donation of a webcam.
diff -Nru a/Documentation/vm/hugetlbpage.txt b/Documentation/vm/hugetlbpage.txt
--- a/Documentation/vm/hugetlbpage.txt	2005-01-10 20:11:16 -08:00
+++ b/Documentation/vm/hugetlbpage.txt	2005-01-10 20:11:16 -08:00
@@ -1,14 +1,14 @@
 
 The intent of this file is to give a brief summary of hugetlbpage support in
 the Linux kernel.  This support is built on top of multiple page size support
-that is provided by most of modern architectures.  For example, IA-32
+that is provided by most modern architectures.  For example, IA-32
 architecture supports 4K and 4M (2M in PAE mode) page sizes, IA-64
 architecture supports multiple page sizes 4K, 8K, 64K, 256K, 1M, 4M, 16M,
-256M.  A TLB is a cache of virtual-to-physical translations.  Typically this
-is a very scarce resource on processor.  Operating systems try to make best
-use of limited number of TLB resources.  This optimization is more critical
-now as bigger and bigger physical memories (several GBs) are more readily
-available.
+256M and ppc64 supports 4K and 16M.  A TLB is a cache of virtual-to-physical
+translations.  Typically this is a very scarce resource on processor.
+Operating systems try to make best use of limited number of TLB resources.
+This optimization is more critical now as bigger and bigger physical memories
+(several GBs) are more readily available.
 
 Users can use the huge page support in Linux kernel by either using the mmap
 system call or standard SYSv shared memory system calls (shmget, shmat).
@@ -98,125 +98,187 @@
 applications to use any combination of mmaps and shm* calls.  Though the
 mount of filesystem will be required for using mmaps.
 
-/* Example of using hugepage in user application using Sys V shared memory
- * system calls.  In this example, app is requesting memory of size 256MB that
- * is backed by huge pages.  Application uses the flag SHM_HUGETLB in shmget
- * system call to informt the kernel that it is requesting hugepages.  For
- * IA-64 architecture, Linux kernel reserves Region number 4 for hugepages.
- * That means the addresses starting with 0x800000....will need to be
- * specified.
+*******************************************************************
+
+/*
+ * Example of using hugepage memory in a user application using Sys V shared
+ * memory system calls.  In this example the app is requesting 256MB of
+ * memory that is backed by huge pages.  The application uses the flag
+ * SHM_HUGETLB in the shmget system call to inform the kernel that it is
+ * requesting hugepages.
+ *
+ * For the IA-64 architecture, the Linux kernel reserves Region number 4 for
+ * hugepages.  That means the addresses starting with 0x800000... will need
+ * to be specified.  Specifying a fixed address is not required on ppc64,
+ * i386 or amd64.
+ *
+ * Note: The default shared memory limit is quite low on many kernels,
+ * you may need to increase it via:
+ *
+ * echo 268435456 > /proc/sys/kernel/shmmax
+ *
+ * This will increase the maximum size per shared memory segment to 256MB.
+ * The other limit that you will hit eventually is shmall which is the
+ * total amount of shared memory in pages. To set it to 16GB on a system
+ * with a 4kB pagesize do:
+ *
+ * echo 4194304 > /proc/sys/kernel/shmall
  */
+#include <stdlib.h>
+#include <stdio.h>
 #include <sys/types.h>
+#include <sys/ipc.h>
 #include <sys/shm.h>
-#include <sys/types.h>
 #include <sys/mman.h>
-#include <errno.h>
 
-extern int errno;
+#ifndef SHM_HUGETLB
 #define SHM_HUGETLB 04000
-#define LPAGE_SIZE      (256UL*1024UL*1024UL)
-#define         dprintf(x)  printf(x)
-#define ADDR (0x8000000000000000UL)
-main()
+#endif
+
+#define LENGTH (256UL*1024*1024)
+
+#define dprintf(x)  printf(x)
+
+/* Only IA64 requires this */
+#ifdef IA64
+#define ADDR (void *)(0x8000000000000000UL)
+#define SHMAT_FLAGS (SHM_RND)
+#else
+#define ADDR (void *)(0x0UL)
+#define SHMAT_FLAGS (0)
+#endif
+
+int main(void)
 {
-        int shmid;
-        int     i, j, k;
-        volatile        char    *shmaddr;
-
-        if ((shmid =shmget(2, LPAGE_SIZE, SHM_HUGETLB|IPC_CREAT|SHM_R|SHM_W ))
-< 0) {
-                perror("Failure:");
-                exit(1);
-        }
-        printf("shmid: 0x%x\n", shmid);
-        shmaddr = shmat(shmid, (void *)ADDR, SHM_RND) ;
-        if (errno != 0) {
-                perror("Shared Memory Attach Failure:");
-                exit(2);
-        }
-        printf("shmaddr: %p\n", shmaddr);
-
-        dprintf("Starting the writes:\n");
-        for (i=0;i<LPAGE_SIZE;i++) {
-                shmaddr[i] = (char) (i);
-                if (!(i%(1024*1024))) dprintf(".");
-        }
-        dprintf("\n");
-        dprintf("Starting the Check...");
-        for (i=0; i<LPAGE_SIZE;i++)
-                if (shmaddr[i] != (char)i)
-                        printf("\nIndex %d mismatched.");
-        dprintf("Done.\n");
-        if (shmdt((const void *)shmaddr) != 0) {
-                perror("Detached Failure:");
-                exit (3);
-        }
+	int shmid;
+	unsigned long i;
+	char *shmaddr;
+
+	if ((shmid = shmget(2, LENGTH,
+			    SHM_HUGETLB | IPC_CREAT | SHM_R | SHM_W)) < 0) {
+		perror("shmget");
+		exit(1);
+	}
+	printf("shmid: 0x%x\n", shmid);
+
+	shmaddr = shmat(shmid, ADDR, SHMAT_FLAGS);
+	if (shmaddr == (char *)-1) {
+		perror("Shared memory attach failure");
+		shmctl(shmid, IPC_RMID, NULL);
+		exit(2);
+	}
+	printf("shmaddr: %p\n", shmaddr);
+
+	dprintf("Starting the writes:\n");
+	for (i = 0; i < LENGTH; i++) {
+		shmaddr[i] = (char)(i);
+		if (!(i % (1024 * 1024)))
+			dprintf(".");
+	}
+	dprintf("\n");
+
+	dprintf("Starting the Check...");
+	for (i = 0; i < LENGTH; i++)
+		if (shmaddr[i] != (char)i)
+			printf("\nIndex %lu mismatched\n", i);
+	dprintf("Done.\n");
+
+	if (shmdt((const void *)shmaddr) != 0) {
+		perror("Detach failure");
+		shmctl(shmid, IPC_RMID, NULL);
+		exit(3);
+	}
+
+	shmctl(shmid, IPC_RMID, NULL);
+
+	return 0;
 }
-*******************************************************************
-*******************************************************************
 
+*******************************************************************
 
-/* Example of using hugepage in user application using mmap 
- * system call.  Before running this application, make sure that
- * administrator has mounted the hugetlbfs (on some directory like /mnt) using
- * the command mount -t hugetlbfs nodev /mnt
- * In this example, app is requesting memory of size 256MB that
- * is backed by huge pages.  Application uses the flag SHM_HUGETLB in shmget
- * system call to informt the kernel that it is requesting hugepages.  For
- * IA-64 architecture, Linux kernel reserves Region number 4 for hugepages.
- * That means the addresses starting with 0x800000....will need to be
- * specified.
+/*
+ * Example of using hugepage memory in a user application using the mmap
+ * system call.  Before running this application, make sure that the
+ * administrator has mounted the hugetlbfs filesystem (on some directory
+ * like /mnt) using the command mount -t hugetlbfs nodev /mnt. In this
+ * example, the app is requesting memory of size 256MB that is backed by
+ * huge pages.
+ *
+ * For IA-64 architecture, Linux kernel reserves Region number 4 for hugepages.
+ * That means the addresses starting with 0x800000... will need to be
+ * specified.  Specifying a fixed address is not required on ppc64, i386
+ * or amd64.
  */
-#include <unistd.h>
+#include <stdlib.h>
 #include <stdio.h>
+#include <unistd.h>
 #include <sys/mman.h>
 #include <fcntl.h>
-#include <errno.h>
 
 #define FILE_NAME "/mnt/hugepagefile"
-#define LENGTH (256*1024*1024)
+#define LENGTH (256UL*1024*1024)
 #define PROTECTION (PROT_READ | PROT_WRITE)
-#define FLAGS   MAP_SHARED |MAP_FIXED
-#define ADDRESS (char *)(0x60000000UL + 0x8000000000000000UL)
 
-extern errno;
+/* Only IA64 requires this */
+#ifdef IA64
+#define ADDR (void *)(0x8000000000000000UL)
+#define FLAGS (MAP_SHARED | MAP_FIXED)
+#else
+#define ADDR (void *)(0x0UL)
+#define FLAGS (MAP_SHARED)
+#endif
 
-check_bytes(char *addr)
+void check_bytes(char *addr)
 {
-        printf("First hex is %x\n", *((unsigned int *)addr));
+	printf("First hex is %x\n", *((unsigned int *)addr));
 }
 
-write_bytes(char *addr)
+void write_bytes(char *addr)
 {
-        int i;
-        for (i=0;i<LENGTH;i++)
-                *(addr+i)=(char)i;
+	unsigned long i;
+
+	for (i = 0; i < LENGTH; i++)
+		*(addr + i) = (char)i;
 }
-read_bytes(char *addr)
+
+void read_bytes(char *addr)
 {
-        int i;
-        check_bytes(addr);
-        for (i=0;i<LENGTH;i++)
-                if (*(addr+i)!=(char)i) {
-                        printf("Mismatch at %d\n", i);
-                        break;
-                }
+	unsigned long i;
+
+	check_bytes(addr);
+	for (i = 0; i < LENGTH; i++)
+		if (*(addr + i) != (char)i) {
+			printf("Mismatch at %lu\n", i);
+			break;
+		}
 }
-main()
+
+int main(void)
 {
-        unsigned long addr = 0;
-        int fd ;
+	void *addr;
+	int fd;
+
+	fd = open(FILE_NAME, O_CREAT | O_RDWR, 0755);
+	if (fd < 0) {
+		perror("Open failed");
+		exit(1);
+	}
+
+	addr = mmap(ADDR, LENGTH, PROTECTION, FLAGS, fd, 0);
+	if (addr == MAP_FAILED) {
+		perror("mmap");
+		unlink(FILE_NAME);
+		exit(1);
+	}
+
+	printf("Returned address is %p\n", addr);
+	check_bytes(addr);
+	write_bytes(addr);
+	read_bytes(addr);
+
+	munmap(addr, LENGTH);
+	close(fd);
+	unlink(FILE_NAME);
 
-        fd = open(FILE_NAME, O_CREAT|O_RDWR, 0755);
-        if (fd < 0) {
-                perror("Open failed");
-                exit(errno);
-        }
-        addr = (unsigned long)mmap(ADDRESS, LENGTH, PROTECTION, FLAGS, fd, 0);
-        if (errno != 0)
-                perror("mmap failed");
-        printf("Returned address is %p\n", addr);
-        check_bytes((char*)addr);
-        write_bytes((char*)addr);
-        read_bytes((char *)addr);
+	return 0;
 }
diff -Nru a/Documentation/vm/numa b/Documentation/vm/numa
--- a/Documentation/vm/numa	2005-01-10 20:11:20 -08:00
+++ b/Documentation/vm/numa	2005-01-10 20:11:20 -08:00
@@ -29,7 +29,7 @@
 into a pg_data_t. The bootmem_data_t is just one part of this. To 
 make the code look uniform between NUMA and regular UMA platforms, 
 UMA platforms have a statically allocated pg_data_t too (contig_page_data).
-For the sake of uniformity, the variable "numnodes" is also defined
+For the sake of uniformity, the function num_online_nodes() is also defined
 for all platforms. As we run benchmarks, we might decide to NUMAize 
 more variables like low_on_memory, nr_free_pages etc into the pg_data_t.
 
diff -Nru a/Documentation/w1/w1.generic b/Documentation/w1/w1.generic
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/Documentation/w1/w1.generic	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,19 @@
+Any w1 device must be connected to w1 bus master device - for example
+ds9490 usb device or w1-over-GPIO or RS232 converter.
+Driver for w1 bus master must provide several functions(you can find
+them in struct w1_bus_master definition in w1.h) which then will be
+called by w1 core to send various commands over w1 bus(by default it is
+reset and search commands). When some device is found on the bus, w1 core
+checks if driver for it's family is loaded.
+If driver is loaded w1 core creates new w1_slave object and registers it
+in the system(creates some generic sysfs files(struct w1_family_ops in
+w1_family.h), notifies any registered listener and so on...).
+It is device driver's business to provide any communication method
+upstream.
+For example w1_therm driver(ds18?20 thermal sensor family driver)
+provides temperature reading function which is bound to ->rbin() method
+of the above w1_family_ops structure.
+w1_smem - driver for simple 64bit memory cell provides ID reading
+method.
+
+You can call above methods by reading appropriate sysfs files.
diff -Nru a/Documentation/x86_64/mm.txt b/Documentation/x86_64/mm.txt
--- a/Documentation/x86_64/mm.txt	2005-01-10 20:11:22 -08:00
+++ b/Documentation/x86_64/mm.txt	2005-01-10 20:11:22 -08:00
@@ -1,148 +1,24 @@
-The paging design used on the x86-64 linux kernel port in 2.4.x provides:
 
-o	per process virtual address space limit of 512 Gigabytes
-o	top of userspace stack located at address 0x0000007fffffffff
-o	PAGE_OFFSET = 0xffff800000000000
-o	start of the kernel = 0xffffffff800000000
-o	global RAM per system 2^64-PAGE_OFFSET-sizeof(kernel) = 128 Terabytes - 2 Gigabytes
-o	no need of any common code change
-o	no need to use highmem to handle the 128 Terabytes of RAM
-
-Description:
-
-	Userspace is able to modify and it sees only the 3rd/2nd/1st level
-	pagetables (pgd_offset() implicitly walks the 1st slot of the 4th
-	level pagetable and it returns an entry into the 3rd level pagetable).
-	This is where the per-process 512 Gigabytes limit cames from.
-
-	The common code pgd is the PDPE, the pmd is the PDE, the
-	pte is the PTE. The PML4E remains invisible to the common
-	code.
-
-	The kernel uses all the first 47 bits of the negative half
-	of the virtual address space to build the direct mapping using
-	2 Mbytes page size. The kernel virtual	addresses have bit number
-	47 always set to 1 (and in turn also bits 48-63 are set to 1 too,
-	due the sign extension). This is where the 128 Terabytes - 2 Gigabytes global
-	limit of RAM cames from.
-
-	Since the per-process limit is 512 Gigabytes (due to kernel common
-	code 3 level pagetable limitation), the higher virtual address mapped
-	into userspace is 0x7fffffffff and it makes sense to use it
-	as the top of the userspace stack to allow the stack to grow as
-	much as possible.
-
-	Setting the PAGE_OFFSET to 2^39 (after the last userspace
-	virtual address) wouldn't make much difference compared to
-	setting PAGE_OFFSET to 0xffff800000000000 because we have an
-	hole into the virtual address space. The last byte mapped by the
-	255th slot in the 4th level pagetable is at virtual address
-	0x00007fffffffffff and the first byte mapped by the 256th slot in the
-	4th level pagetable is at address 0xffff800000000000. Due to this
-	hole we can't trivially build a direct mapping across all the
-	512 slots of the 4th level pagetable, so we simply use only the
-	second (negative) half of the 4th level pagetable for that purpose
-	(that provides us 128 Terabytes of contigous virtual addresses).
-	Strictly speaking we could build a direct mapping also across the hole
-	using some DISCONTIGMEM trick, but we don't need such a large
-	direct mapping right now.
-
-Future:
-
-	During 2.5.x we can break the 512 Gigabytes per-process limit
-	possibly by removing from the common code any knowledge about the
-	architectural dependent physical layout of the virtual to physical
-	mapping.
-
-	Once the 512 Gigabytes limit will be removed the kernel stack will
-	be moved (most probably to virtual address 0x00007fffffffffff).
-	Nothing	will break in userspace due that move, as nothing breaks
-	in IA32 compiling the kernel with CONFIG_2G.
-
-Linus agreed on not breaking common code and to live with the 512 Gigabytes
-per-process limitation for the 2.4.x timeframe and he has given me and Andi
-some very useful hints... (thanks! :)
-
-Thanks also to H. Peter Anvin for his interesting and useful suggestions on
-the x86-64-discuss lists!
-
-Other memory management related issues follows:
-
-PAGE_SIZE:
-
-	If somebody is wondering why these days we still have a so small
-	4k pagesize (16 or 32 kbytes would be much better for performance
-	of course), the PAGE_SIZE have to remain 4k for 32bit apps to
-	provide 100% backwards compatible IA32 API (we can't allow silent
-	fs corruption or as best a loss of coherency with the page cache
-	by allocating MAP_SHARED areas in MAP_ANONYMOUS memory with a
-	do_mmap_fake). I think it could be possible to have a dynamic page
-	size between 32bit and 64bit apps but it would need extremely
-	intrusive changes in the common code as first for page cache and
-	we sure don't want to depend on them right now even if the
-	hardware would support that.
-
-PAGETABLE SIZE:
-
-	In turn we can't afford to have pagetables larger than 4k because
-	we could not be able to allocate them due physical memory
-	fragmentation, and failing to allocate the kernel stack is a minor
-	issue compared to failing the allocation of a pagetable. If we
-	fail the allocation of a pagetable the only thing we can do is to
-	sched_yield polling the freelist (deadlock prone) or to segfault
-	the task (not even the sighandler would be sure to run).
-
-KERNEL STACK:
-
-	1st stage:
-
-	The kernel stack will be at first allocated with an order 2 allocation
-	(16k) (the utilization of the stack for a 64bit platform really
-	isn't exactly the double of a 32bit platform because the local
-	variables may not be all 64bit wide, but not much less). This will
-	make things even worse than they are right now on IA32 with
-	respect of failing fork/clone due memory fragmentation.
-
-	2nd stage:
-
-	We'll benchmark if reserving one register as task_struct
-	pointer will improve performance of the kernel (instead of
-	recalculating the task_struct pointer starting from the stack
-	pointer each time). My guess is that recalculating will be faster
-	but it worth a try.
-
-		If reserving one register for the task_struct pointer
-		will be faster we can as well split task_struct and kernel
-		stack. task_struct can be a slab allocation or a
-		PAGE_SIZEd allocation, and the kernel stack can then be
-		allocated in a order 1 allocation. Really this is risky,
-		since 8k on a 64bit platform is going to be less than 7k
-		on a 32bit platform but we could try it out. This would
-		reduce the fragmentation problem of an order of magnitude
-		making it equal to the current IA32.
-
-		We must also consider the x86-64 seems to provide in hardware a
-		per-irq stack that could allow us to remove the irq handler
-		footprint from the regular per-process-stack, so it could allow
-		us to live with a smaller kernel stack compared to the other
-		linux architectures.
-
-	3rd stage:
-
-	Before going into production if we still have the order 2
-	allocation we can add a sysctl that allows the kernel stack to be
-	allocated with vmalloc during memory fragmentation. This have to
-	remain turned off during benchmarks :) but it should be ok in real
-	life.
-
-Order of PAGE_CACHE_SIZE and other allocations:
-
-	On the long run we can increase the PAGE_CACHE_SIZE to be
-	an order 2 allocations and also the slab/buffercache etc.ec..
-	could be all done with order 2 allocations. To make the above
-	to work we should change lots of common code thus it can be done
-	only once the basic port will be in a production state. Having
-	a working PAGE_CACHE_SIZE would be a benefit also for
-	IA32 and other architectures of course.
+<previous description obsolete, deleted>
 
-Andrea <andrea@suse.de> SuSE
+Virtual memory map with 4 level page tables:
+
+0000000000000000 - 00007fffffffffff (=47bits) user space, different per mm
+hole caused by [48:63] sign extension
+ffff800000000000 - ffff80ffffffffff (=40bits) guard hole
+ffff810000000000 - ffffc0ffffffffff (=46bits) direct mapping of phys. memory
+ffffc10000000000 - ffffc1ffffffffff (=40bits) hole
+ffffc20000000000 - ffffe1ffffffffff (=45bits) vmalloc/ioremap space
+... unused hole ...
+ffffffff80000000 - ffffffff82800000 (=40MB)   kernel text mapping, from phys 0
+... unused hole ...
+ffffffff88000000 - fffffffffff00000 (=1919MB) module mapping space
+
+vmalloc space is lazily synchronized into the different PML4 pages of
+the processes using the page fault handler, with init_level4_pgt as
+reference.
+
+Current X86-64 implementations only support 40 bit of address space,
+but we support upto 46bits. This expands into MBZ space in the page tables.
+
+-Andi Kleen, Jul 2004
diff -Nru a/MAINTAINERS b/MAINTAINERS
--- a/MAINTAINERS	2005-01-10 20:11:20 -08:00
+++ b/MAINTAINERS	2005-01-10 20:11:20 -08:00
@@ -287,6 +287,11 @@
 M:	linux@treblig.org
 S:	Maintained
 
+ARM/CORGI MACHINE SUPPORT
+P:	Richard Purdie
+M:	rpurdie@rpsys.net
+S:	Maintained
+
 ARM/PLEB SUPPORT
 P:	Peter Chubb
 M:	pleb@gelato.unsw.edu.au
@@ -313,6 +318,20 @@
 W:	http://www.arm.linux.org.uk/
 S:	Maintained
 
+ARM/S3C2410 ARM ARCHITECTURE
+P:	Ben Dooks
+M:	ben-s3c2410@fluff.org
+L:	linux-arm-kernel@lists.arm.linux.org.uk
+W:	http://www.fluff.org/ben/linux/
+S:	Maintained
+
+ARM/S3C2440 ARM ARCHITECTURE
+P:	Ben Dooks
+M:	ben-s3c2440@fluff.org
+L:	linux-arm-kernel@lists.arm.linux.org.uk
+W:	http://www.fluff.org/ben/linux/
+S:	Maintained
+
 ARPD SUPPORT
 P:	Jonathan Layes
 L:	linux-net@vger.kernel.org
@@ -328,6 +347,12 @@
 W:	http://julien.lerouge.free.fr
 S:	Maintained
 
+ATA OVER ETHERNET DRIVER
+P:	Ed L. Cashin
+M:	ecashin@coraid.com
+W:	http://www.coraid.com/support/linux
+S:	Supported
+
 ATM
 P:	Chas Williams
 M:	chas@cmf.nrl.navy.mil
@@ -862,6 +887,11 @@
 W:	ftp://ftp.openlinux.org/pub/people/hch/vxfs
 S:	Maintained
 
+FUJITSU FR-V PORT
+P:	David Howells
+M:	dhowells@redhat.com
+S:	Maintained
+
 FTAPE/QIC-117
 L:	linux-tape@vger.kernel.org
 W:	http://sourceforge.net/projects/ftape
@@ -953,6 +983,11 @@
 M:	oliver@neukum.name
 S:	Maintained
 
+HUGETLB FILESYSTEM
+P:	William Irwin
+M:	wli@holomorphy.com
+S:	Maintained
+
 I2C AND SENSORS DRIVERS
 P:	Greg Kroah-Hartman
 M:	greg@kroah.com
@@ -988,8 +1023,8 @@
 S:	Maintained
 
 IA64 (Itanium) PLATFORM
-P:	David Mosberger-Tang
-M:	davidm@hpl.hp.com
+P:	Tony Luck
+M:	tony.luck@intel.com
 L:	linux-ia64@vger.kernel.org
 W:	http://www.ia64-linux.org/
 S:	Maintained
@@ -1081,6 +1116,17 @@
 L:	linux-fbdev-devel@lists.sourceforge.net
 S:	Maintained
 
+INFINIBAND SUBSYSTEM
+P:	Roland Dreier
+M:	roland@topspin.com
+P:	Sean Hefty
+M:	mshefty@ichips.intel.com
+P:	Hal Rosenstock
+M:	halr@voltaire.com
+L:	openib-general@openib.org
+W:	http://www.openib.org/
+S:	Supported
+
 INPUT (KEYBOARD, MOUSE, JOYSTICK) DRIVERS
 P:	Vojtech Pavlik
 M:	vojtech@suse.cz
@@ -1439,7 +1485,7 @@
 
 MEMORY TECHNOLOGY DEVICES
 P:	David Woodhouse
-M:	dwmw2@redhat.com
+M:	dwmw2@infradead.org
 W:	http://www.linux-mtd.infradead.org/
 L:	linux-mtd@lists.infradead.org
 S:	Maintained
@@ -1568,7 +1614,6 @@
 M:	wensong@linux-vs.org
 P:	Julian Anastasov
 M:	ja@ssi.bg
-L:	lvs-users@linuxvirtualserver.org
 S:	Maintained
 
 NFS CLIENT
@@ -1713,7 +1758,6 @@
 PCI HOTPLUG CORE
 P:	Greg Kroah-Hartman
 M:	greg@kroah.com
-M:	gregkh@us.ibm.com
 S:	Supported
 
 PCI HOTPLUG COMPAQ DRIVER
@@ -1842,9 +1886,7 @@
 S:	Maintained
 
 RISCOM8 DRIVER
-P:	Dmitry Gorodchanin
-L:	linux-kernel@vger.kernel.org
-S:	Maintained
+S:	Orphan
 
 RTLINUX  REALTIME  LINUX
 P:	Victor Yodaiken
@@ -2053,7 +2095,6 @@
 SPECIALIX IO8+ MULTIPORT SERIAL CARD DRIVER
 P:	Roger Wolff
 M:	R.E.Wolff@BitWizard.nl
-M:	io8-linux@specialix.co.uk
 L:	linux-kernel@vger.kernel.org ?
 S:	Supported
 
diff -Nru a/Makefile b/Makefile
--- a/Makefile	2005-01-10 20:11:20 -08:00
+++ b/Makefile	2005-01-10 20:11:20 -08:00
@@ -149,14 +149,13 @@
 # careful not to include files twice if building in the source
 # directory. LOCALVERSION from the command line override all of this
 
-ifeq ($(objtree),$(srctree))
-localversion-files := $(wildcard $(srctree)/localversion*)
-else
-localversion-files := $(wildcard $(objtree)/localversion* $(srctree)/localversion*)
-endif
+localver := $(objtree)/localversion* $(srctree)/localversion*
+localver := $(sort $(wildcard $(localver)))
+# skip backup files (containing '~')
+localver := $(foreach f, $(localver), $(if $(findstring ~, $(f)),,$(f)))
 
 LOCALVERSION = $(subst $(space),, \
-	       $(shell cat /dev/null $(localversion-files:%~=)) \
+	       $(shell cat /dev/null $(localver)) \
 	       $(patsubst "%",%,$(CONFIG_LOCALVERSION)))
 
 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)$(LOCALVERSION)
@@ -291,7 +290,7 @@
             $(call cc-option, $(1),$(2))
 
 # cc-option-yn
-# Usage: flag := $(call gcc-option-yn, -march=winchip-c6)
+# Usage: flag := $(call cc-option-yn, -march=winchip-c6)
 cc-option-yn = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \
                 > /dev/null 2>&1; then echo "y"; else echo "n"; fi;)
 
@@ -331,7 +330,10 @@
 KALLSYMS	= scripts/kallsyms
 PERL		= perl
 CHECK		= sparse
+
+NOSTDINC_FLAGS := -nostdinc -isystem $(shell $(CC) -print-file-name=include)
 CHECKFLAGS     := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__
+CHECKFLAGS     += $(NOSTDINC_FLAGS)
 MODFLAGS	= -DMODULE
 CFLAGS_MODULE   = $(MODFLAGS)
 AFLAGS_MODULE   = $(MODFLAGS)
@@ -339,7 +341,6 @@
 CFLAGS_KERNEL	=
 AFLAGS_KERNEL	=
 
-NOSTDINC_FLAGS  = -nostdinc -iwithprefix include
 
 # Use LINUXINCLUDE when you must reference the include/ directory.
 # Needed to be compatible with the O= option
@@ -349,7 +350,8 @@
 CPPFLAGS        := -D__KERNEL__ $(LINUXINCLUDE)
 
 CFLAGS 		:= -Wall -Wstrict-prototypes -Wno-trigraphs \
-	  	   -fno-strict-aliasing -fno-common
+	  	   -fno-strict-aliasing -fno-common \
+		   -ffreestanding
 AFLAGS		:= -D__ASSEMBLY__
 
 export	VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION LOCALVERSION KERNELRELEASE \
@@ -389,7 +391,7 @@
 # using a seperate output directory. This allows convinient use
 # of make in output directory
 outputmakefile:
-	$(Q)if /usr/bin/env test ! $(srctree) -ef $(objtree); then \
+	$(Q)if test ! $(srctree) -ef $(objtree); then \
 	$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile              \
 	    $(srctree) $(objtree) $(VERSION) $(PATCHLEVEL)         \
 	    > $(objtree)/Makefile;                                 \
@@ -1166,7 +1168,7 @@
 quiet_cmd_tags = MAKE   $@
 define cmd_tags
 	rm -f $@; \
-	CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_NOVERS"`; \
+	CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_GPL"`; \
 	$(all-sources) | xargs ctags $$CTAGSF -a
 endef
 
@@ -1209,6 +1211,9 @@
 checkstack:
 	$(OBJDUMP) -d vmlinux $$(find . -name '*.ko') | \
 	$(PERL) $(src)/scripts/checkstack.pl $(ARCH)
+
+kernelrelease:
+	@echo $(KERNELRELEASE)
 
 # FIXME Should go into a make.lib or something 
 # ===========================================================================
diff -Nru a/arch/alpha/Kconfig b/arch/alpha/Kconfig
--- a/arch/alpha/Kconfig	2005-01-10 20:11:24 -08:00
+++ b/arch/alpha/Kconfig	2005-01-10 20:11:24 -08:00
@@ -28,6 +28,10 @@
 	bool
 	default y
 
+config GENERIC_CALIBRATE_DELAY
+	bool
+	default y
+
 config GENERIC_ISA_DMA
 	bool
 	default y
@@ -485,7 +489,7 @@
 	  singleprocessor machines. On a singleprocessor machine, the kernel
 	  will run faster if you say N here.
 
-	  See also the <file:Documentation/smp.tex>, and the SMP-HOWTO
+	  See also the <file:Documentation/smp.txt>, and the SMP-HOWTO
 	  available at <http://www.tldp.org/docs.html#howto>.
 
 	  If you don't know what to do here, say N.
diff -Nru a/arch/alpha/defconfig b/arch/alpha/defconfig
--- a/arch/alpha/defconfig	2005-01-10 20:11:19 -08:00
+++ b/arch/alpha/defconfig	2005-01-10 20:11:19 -08:00
@@ -411,7 +411,6 @@
 # CONFIG_IP_NF_TARGET_REDIRECT is not set
 # CONFIG_IP_NF_TARGET_NETMAP is not set
 # CONFIG_IP_NF_TARGET_SAME is not set
-# CONFIG_IP_NF_NAT_LOCAL is not set
 # CONFIG_IP_NF_NAT_SNMP_BASIC is not set
 CONFIG_IP_NF_NAT_IRC=m
 CONFIG_IP_NF_NAT_FTP=m
diff -Nru a/arch/alpha/kernel/core_marvel.c b/arch/alpha/kernel/core_marvel.c
--- a/arch/alpha/kernel/core_marvel.c	2005-01-10 20:11:16 -08:00
+++ b/arch/alpha/kernel/core_marvel.c	2005-01-10 20:11:16 -08:00
@@ -118,7 +118,7 @@
 
 	io7 = alloc_bootmem(sizeof(*io7));
 	io7->pe = pe;
-	io7->irq_lock = SPIN_LOCK_UNLOCKED;
+	spin_lock_init(&io7->irq_lock);
 
 	for (h = 0; h < 4; h++) {
 		io7->ports[h].io7 = io7;
diff -Nru a/arch/alpha/kernel/proto.h b/arch/alpha/kernel/proto.h
--- a/arch/alpha/kernel/proto.h	2005-01-10 20:11:17 -08:00
+++ b/arch/alpha/kernel/proto.h	2005-01-10 20:11:17 -08:00
@@ -167,9 +167,6 @@
 extern void entUna(void);
 extern void entDbg(void);
 
-/* process.c */
-extern void cpu_idle(void) __attribute__((noreturn));
-
 /* ptrace.c */
 extern int ptrace_set_bpt (struct task_struct *child);
 extern int ptrace_cancel_bpt (struct task_struct *child);
diff -Nru a/arch/alpha/kernel/srmcons.c b/arch/alpha/kernel/srmcons.c
--- a/arch/alpha/kernel/srmcons.c	2005-01-10 20:11:22 -08:00
+++ b/arch/alpha/kernel/srmcons.c	2005-01-10 20:11:22 -08:00
@@ -179,7 +179,7 @@
 		}
 
 		srmconsp->tty = NULL;
-		srmconsp->lock = SPIN_LOCK_UNLOCKED;
+		spin_lock_init(&srmconsp->lock);
 		init_timer(&srmconsp->timer);
 
 		*ps = srmconsp;
diff -Nru a/arch/alpha/mm/init.c b/arch/alpha/mm/init.c
--- a/arch/alpha/mm/init.c	2005-01-10 20:11:22 -08:00
+++ b/arch/alpha/mm/init.c	2005-01-10 20:11:22 -08:00
@@ -42,10 +42,9 @@
 {
 	pgd_t *ret, *init;
 
-	ret = (pgd_t *)__get_free_page(GFP_KERNEL);
+	ret = (pgd_t *)__get_free_page(GFP_KERNEL | __GFP_ZERO);
 	init = pgd_offset(&init_mm, 0UL);
 	if (ret) {
-		clear_page(ret);
 #ifdef CONFIG_ALPHA_LARGE_VMALLOC
 		memcpy (ret + USER_PTRS_PER_PGD, init + USER_PTRS_PER_PGD,
 			(PTRS_PER_PGD - USER_PTRS_PER_PGD - 1)*sizeof(pgd_t));
@@ -63,9 +62,7 @@
 pte_t *
 pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address)
 {
-	pte_t *pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT);
-	if (pte)
-		clear_page(pte);
+	pte_t *pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO);
 	return pte;
 }
 
diff -Nru a/arch/alpha/mm/numa.c b/arch/alpha/mm/numa.c
--- a/arch/alpha/mm/numa.c	2005-01-10 20:11:15 -08:00
+++ b/arch/alpha/mm/numa.c	2005-01-10 20:11:15 -08:00
@@ -246,7 +246,7 @@
 	reserve_bootmem_node(NODE_DATA(nid), PFN_PHYS(bootmap_start), bootmap_size);
 	printk(" reserving pages %ld:%ld\n", bootmap_start, bootmap_start+PFN_UP(bootmap_size));
 
-	numnodes++;
+	node_set_online(nid);
 }
 
 void __init
@@ -256,7 +256,7 @@
 
 	show_mem_layout();
 
-	numnodes = 0;
+	nodes_clear(node_online_map);
 
 	min_low_pfn = ~0UL;
 	max_low_pfn = 0UL;
@@ -303,7 +303,7 @@
 	 */
 	dma_local_pfn = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT;
 
-	for (nid = 0; nid < numnodes; nid++) {
+	for_each_online_node(nid) {
 		unsigned long start_pfn = node_bdata[nid].node_boot_start >> PAGE_SHIFT;
 		unsigned long end_pfn = node_bdata[nid].node_low_pfn;
 
@@ -332,7 +332,7 @@
 	high_memory = (void *) __va(max_low_pfn << PAGE_SHIFT);
 
 	reservedpages = 0;
-	for (nid = 0; nid < numnodes; nid++) {
+	for_each_online_node(nid) {
 		/*
 		 * This will free up the bootmem, ie, slot 0 memory
 		 */
@@ -372,7 +372,7 @@
 	printk("\nMem-info:\n");
 	show_free_areas();
 	printk("Free swap:       %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10));
-	for (nid = 0; nid < numnodes; nid++) {
+	for_each_online_node(nid) {
 		struct page * lmem_map = node_mem_map(nid);
 		i = node_spanned_pages(nid);
 		while (i-- > 0) {
diff -Nru a/arch/alpha/oprofile/common.c b/arch/alpha/oprofile/common.c
--- a/arch/alpha/oprofile/common.c	2005-01-10 20:11:16 -08:00
+++ b/arch/alpha/oprofile/common.c	2005-01-10 20:11:16 -08:00
@@ -138,17 +138,8 @@
 	return 0;
 }
 
-static struct oprofile_operations oprof_axp_ops = {
-	.create_files	= op_axp_create_files,
-	.setup		= op_axp_setup,
-	.shutdown	= op_axp_shutdown,
-	.start		= op_axp_start,
-	.stop		= op_axp_stop,
-	.cpu_type	= NULL		/* To be filled in below.  */
-};
-
-int __init
-oprofile_arch_init(struct oprofile_operations **ops)
+void __init
+oprofile_arch_init(struct oprofile_operations *ops)
 {
 	struct op_axp_model *lmodel = NULL;
 
@@ -175,16 +166,18 @@
 	}
 
 	if (!lmodel)
-		return -ENODEV;
+		return;
 	model = lmodel;
 
-	oprof_axp_ops.cpu_type = lmodel->cpu_type;
-	*ops = &oprof_axp_ops;
+	ops->create_files = op_axp_create_files;
+	ops->setup = op_axp_setup;
+	ops->shutdown = op_axp_shutdown;
+	ops->start = op_axp_start;
+	ops->stop = op_axp_stop;
+	ops->cpu_type = lmodel->cpu_type;
 
 	printk(KERN_INFO "oprofile: using %s performance monitoring.\n",
 	       lmodel->cpu_type);
-
-	return 0;
 }
 
 
diff -Nru a/arch/alpha/oprofile/op_model_ev4.c b/arch/alpha/oprofile/op_model_ev4.c
--- a/arch/alpha/oprofile/op_model_ev4.c	2005-01-10 20:11:18 -08:00
+++ b/arch/alpha/oprofile/op_model_ev4.c	2005-01-10 20:11:18 -08:00
@@ -101,8 +101,7 @@
 		return;
 
 	/* Record the sample.  */
-	oprofile_add_sample(regs->pc, !user_mode(regs),
-			    which, smp_processor_id());
+	oprofile_add_sample(regs, which);
 }
 
 
diff -Nru a/arch/alpha/oprofile/op_model_ev5.c b/arch/alpha/oprofile/op_model_ev5.c
--- a/arch/alpha/oprofile/op_model_ev5.c	2005-01-10 20:11:18 -08:00
+++ b/arch/alpha/oprofile/op_model_ev5.c	2005-01-10 20:11:18 -08:00
@@ -186,8 +186,7 @@
 		     struct op_counter_config *ctr)
 {
 	/* Record the sample.  */
-	oprofile_add_sample(regs->pc, !user_mode(regs),
-			    which, smp_processor_id());
+	oprofile_add_sample(regs, which);
 }
 
 
diff -Nru a/arch/alpha/oprofile/op_model_ev6.c b/arch/alpha/oprofile/op_model_ev6.c
--- a/arch/alpha/oprofile/op_model_ev6.c	2005-01-10 20:11:19 -08:00
+++ b/arch/alpha/oprofile/op_model_ev6.c	2005-01-10 20:11:19 -08:00
@@ -88,8 +88,7 @@
 		     struct op_counter_config *ctr)
 {
 	/* Record the sample.  */
-	oprofile_add_sample(regs->pc, !user_mode(regs),
-			    which, smp_processor_id());
+	oprofile_add_sample(regs, which);
 }
 
 
diff -Nru a/arch/alpha/oprofile/op_model_ev67.c b/arch/alpha/oprofile/op_model_ev67.c
--- a/arch/alpha/oprofile/op_model_ev67.c	2005-01-10 20:11:23 -08:00
+++ b/arch/alpha/oprofile/op_model_ev67.c	2005-01-10 20:11:23 -08:00
@@ -138,8 +138,7 @@
 	if (counter == 1)
 		fake_counter += PM_NUM_COUNTERS;
 	if (ctr[fake_counter].enabled)
-		oprofile_add_sample(pc, kern, fake_counter,
-				    smp_processor_id());
+		oprofile_add_pc(pc, kern, fake_counter);
 }
 
 static void
@@ -197,8 +196,7 @@
 			   to PALcode. Recognize ITB miss by PALcode
 			   offset address, and get actual PC from
 			   EXC_ADDR.  */
-			oprofile_add_sample(regs->pc, kern, which,
-					    smp_processor_id());
+			oprofile_add_pc(regs->pc, kern, which);
 			if ((pmpc & ((1 << 15) - 1)) ==  581)
 				op_add_pm(regs->pc, kern, which,
 					  ctr, PM_ITB_MISS);
@@ -241,7 +239,7 @@
 		}
 	}
 
-	oprofile_add_sample(pmpc, kern, which, smp_processor_id());
+	oprofile_add_pc(pmpc, kern, which);
 
 	pctr_ctl = wrperfmon(5, 0);
 	if (pctr_ctl & (1UL << 27))
diff -Nru a/arch/arm/Kconfig b/arch/arm/Kconfig
--- a/arch/arm/Kconfig	2005-01-10 20:11:19 -08:00
+++ b/arch/arm/Kconfig	2005-01-10 20:11:19 -08:00
@@ -57,6 +57,10 @@
 config RWSEM_XCHGADD_ALGORITHM
 	bool
 
+config GENERIC_CALIBRATE_DELAY
+	bool
+	default y
+
 config GENERIC_BUST_SPINLOCK
 	bool
 
@@ -230,6 +234,11 @@
 	depends on SA1100_COLLIE
 	default y
 
+config SHARP_SCOOP
+	bool
+	depends on PXA_SHARPSL
+	default y
+
 config FORCE_MAX_ZONEORDER
 	int
 	depends on SA1111
@@ -253,6 +262,33 @@
 menu "General setup"
 
 # Select various configuration options depending on the machine type
+
+config SMP
+	bool "Symmetric Multi-Processing (EXPERIMENTAL)"
+	depends on EXPERIMENTAL && n
+	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, single
+	  processor machines. On a single processor machine, the kernel will
+	  run faster if you say N 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 "4"
+
 config DISCONTIGMEM
 	bool
 	depends on ARCH_EDB7211 || ARCH_SA1100 || (ARCH_LH7A40X && !LH7A40X_CONTIGMEM)
@@ -609,7 +645,7 @@
 	  system, but the driver will do nothing.
 
 config LEDS_TIMER
-	bool "Timer LED" if LEDS && (ARCH_NETWINDER || ARCH_EBSA285 || ARCH_SHARK || MACH_MAINSTONE || ARCH_CO285 || ARCH_SA1100 || ARCH_LUBBOCK || ARCH_PXA_IDP || ARCH_INTEGRATOR || ARCH_P720T || ARCH_VERSATILE || ARCH_IMX)
+	bool "Timer LED" if LEDS && (ARCH_NETWINDER || ARCH_EBSA285 || ARCH_SHARK || MACH_MAINSTONE || ARCH_CO285 || ARCH_SA1100 || ARCH_LUBBOCK || ARCH_PXA_IDP || ARCH_INTEGRATOR || ARCH_P720T || ARCH_VERSATILE || ARCH_IMX || MACH_OMAP_H2 || MACH_OMAP_PERSEUS2)
 	depends on ARCH_NETWINDER || ARCH_EBSA110 || ARCH_EBSA285 || ARCH_SHARK || ARCH_CO285 || ARCH_SA1100 || ARCH_LUBBOCK || MACH_MAINSTONE || ARCH_PXA_IDP || ARCH_INTEGRATOR || ARCH_CDB89712 || ARCH_P720T || ARCH_OMAP || ARCH_VERSATILE || ARCH_IMX
 	default y if ARCH_EBSA110
 	help
@@ -625,7 +661,7 @@
 
 config LEDS_CPU
 	bool "CPU usage LED"
-	depends on LEDS && (ARCH_NETWINDER || ARCH_EBSA285 || ARCH_SHARK || ARCH_CO285 || ARCH_SA1100 || ARCH_LUBBOCK || MACH_MAINSTONE || ARCH_PXA_IDP || ARCH_INTEGRATOR || ARCH_P720T || ARCH_VERSATILE || ARCH_IMX)
+	depends on LEDS && (ARCH_NETWINDER || ARCH_EBSA285 || ARCH_SHARK || ARCH_CO285 || ARCH_SA1100 || ARCH_LUBBOCK || MACH_MAINSTONE || ARCH_PXA_IDP || ARCH_INTEGRATOR || ARCH_P720T || ARCH_VERSATILE || ARCH_IMX || MACH_OMAP_H2 || MACH_OMAP_PERSEUS2)
 	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
diff -Nru a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
--- a/arch/arm/boot/compressed/Makefile	2005-01-10 20:11:16 -08:00
+++ b/arch/arm/boot/compressed/Makefile	2005-01-10 20:11:16 -08:00
@@ -46,6 +46,10 @@
 OBJS		+= head-xscale.o
 endif
 
+ifeq ($(CONFIG_PXA_SHARPSL),y)
+OBJS		+= head-sharpsl.o
+endif
+
 ifeq ($(CONFIG_DEBUG_ICEDCC),y)
 OBJS            += ice-dcc.o
 endif
diff -Nru a/arch/arm/boot/compressed/head-sharpsl.S b/arch/arm/boot/compressed/head-sharpsl.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/arm/boot/compressed/head-sharpsl.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,92 @@
+/*
+ * linux/arch/arm/boot/compressed/head-sharpsl.S
+ *
+ * Copyright (C) 2004-2005 Richard Purdie <rpurdie@rpsys.net>
+ *
+ * Sharp's bootloader doesn't pass any kind of machine ID
+ * so we have to figure out the machine for ourselves...
+ *
+ * Support for Poodle, Corgi (SL-C700), Shepherd (SL-C750)
+ * and Husky (SL-C760).
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/linkage.h>
+#include <asm/mach-types.h>
+
+#ifndef CONFIG_PXA_SHARPSL
+#error What am I doing here...
+#endif
+
+		.section        ".start", "ax"
+
+__SharpSL_start:
+
+	ldr	r1, .W100ADDR		@ Base address of w100 chip + regs offset
+
+	mov r6, #0x31			@ Load Magic Init value
+	str	r6, [r1, #0x280]	@ to SCRATCH_UMSK
+	mov r5, #0x3000
+.W100LOOP:
+	subs r5, r5, #1
+    bne .W100LOOP
+	mov r6, #0x30			@ Load 2nd Magic Init value
+	str	r6, [r1, #0x280]	@ to SCRATCH_UMSK
+
+	ldr	r6, [r1, #0]		@ Load Chip ID
+	ldr	r3, .W100ID
+	ldr	r7, .POODLEID
+	cmp	r6, r3
+	bne	.SHARPEND			@ We have no w100 - Poodle
+
+	mrc p15, 0, r6, c0, c0	@ Get Processor ID
+	and	r6, r6, #0xffffff00
+	ldr	r7, .CORGIID
+	ldr	r3, .PXA255ID
+	cmp	r6, r3
+	blo	.SHARPEND			@ We have a PXA250 - Corgi
+
+	mov	r1, #0x0c000000		@ Base address of NAND chip
+	ldrb	r3, [r1, #24]	@ Load FLASHCTL
+	bic	r3, r3, #0x11		@ SET NCE
+	orr	r3, r3, #0x0a		@ SET CLR + FLWP
+	strb	r3, [r1, #24]	@ Save to FLASHCTL
+	mov 	r2, #0x90		@ Command "readid"
+	strb	r2, [r1, #20]	@ Save to FLASHIO
+	bic	r3, r3, #2			@ CLR CLE
+	orr	r3, r3, #4			@ SET ALE
+	strb	r3, [r1, #24]	@ Save to FLASHCTL
+	mov		r2, #0			@ Address 0x00
+	strb	r2, [r1, #20]	@ Save to FLASHIO
+	bic	r3, r3, #4			@ CLR ALE
+	strb	r3, [r1, #24]	@ Save to FLASHCTL
+.SHARP1:
+	ldrb	r3, [r1, #24]	@ Load FLASHCTL
+	tst	r3, #32				@ Is chip ready?
+	beq	.SHARP1
+	ldrb	r2, [r1, #20]	@ NAND Manufacturer ID
+	ldrb	r3, [r1, #20]	@ NAND Chip ID
+	ldr	r7, .SHEPHERDID
+	cmp	r3, #0x76			@ 64MiB flash
+	beq	.SHARPEND			@ We have Shepherd
+	ldr	r7, .HUSKYID		@ Must be Husky
+	b .SHARPEND
+
+.PXA255ID:
+	.word	0x69052d00		@ PXA255 Processor ID
+.W100ID:
+	.word	0x57411002		@ w100 Chip ID
+.W100ADDR:
+	.word 	0x08010000		@ w100 Chip ID Reg Address
+.POODLEID:
+	.word	MACH_TYPE_POODLE
+.CORGIID:
+	.word	MACH_TYPE_CORGI
+.SHEPHERDID:
+	.word	MACH_TYPE_SHEPHERD
+.HUSKYID:
+	.word	MACH_TYPE_HUSKY
+.SHARPEND:
+
+
diff -Nru a/arch/arm/boot/compressed/head-xscale.S b/arch/arm/boot/compressed/head-xscale.S
--- a/arch/arm/boot/compressed/head-xscale.S	2005-01-10 20:11:17 -08:00
+++ b/arch/arm/boot/compressed/head-xscale.S	2005-01-10 20:11:17 -08:00
@@ -34,20 +34,6 @@
 		bic	r0, r0, #0x1000		@ clear Icache
 		mcr	p15, 0, r0, c1, c0, 0
 
-#ifdef	CONFIG_ARCH_IQ80321
-		mov	r7, #MACH_TYPE_IQ80321
-#endif
-
-#ifdef  CONFIG_ARCH_IQ31244
-		mov	r7, #(MACH_TYPE_IQ31244 & 0xff)
-		orr	r7, r7, #(MACH_TYPE_IQ31244 & 0xff00)
-#endif
-
-#ifdef  CONFIG_ARCH_IQ80331
-		mov	r7, #(MACH_TYPE_IQ80331 & 0xff)
-		orr	r7, r7, #(MACH_TYPE_IQ80331 & 0xff00)
-#endif
-
 #ifdef CONFIG_ARCH_LUBBOCK
 		mov	r7, #MACH_TYPE_LUBBOCK
 #endif
diff -Nru a/arch/arm/common/Makefile b/arch/arm/common/Makefile
--- a/arch/arm/common/Makefile	2005-01-10 20:11:18 -08:00
+++ b/arch/arm/common/Makefile	2005-01-10 20:11:18 -08:00
@@ -11,3 +11,4 @@
 obj-$(CONFIG_DMABOUNCE)		+= dmabounce.o
 obj-$(CONFIG_TIMER_ACORN)	+= time-acorn.o
 obj-$(CONFIG_SHARP_LOCOMO)	+= locomo.o
+obj-$(CONFIG_SHARP_SCOOP)	+= scoop.o
diff -Nru a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c
--- a/arch/arm/common/sa1111.c	2005-01-10 20:11:22 -08:00
+++ b/arch/arm/common/sa1111.c	2005-01-10 20:11:22 -08:00
@@ -797,7 +797,7 @@
 	unsigned int	wakeen1;
 };
 
-#ifdef	CONFIG_PM
+#ifdef CONFIG_PM
 
 static int sa1111_suspend(struct device *dev, u32 state, u32 level)
 {
@@ -922,11 +922,10 @@
 	return 0;
 }
 
-#else	/* !CONFIG_PM */
-#define sa1111_resume	NULL
-#define sa1111_suspend	NULL
-#endif	/* !CONFIG_PM */
-
+#else
+#define sa1111_suspend NULL
+#define sa1111_resume  NULL
+#endif
 
 static int sa1111_probe(struct device *dev)
 {
diff -Nru a/arch/arm/common/scoop.c b/arch/arm/common/scoop.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/arm/common/scoop.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,132 @@
+/*
+ * Support code for the SCOOP interface found on various Sharp PDAs
+ *
+ * Copyright (c) 2004 Richard Purdie
+ *
+ *	Based on code written by Sharp/Lineo for 2.4 kernels
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+
+#include <linux/device.h>
+#include <asm/io.h>
+#include <asm/hardware/scoop.h>
+
+static void __iomem *scoop_io_base;
+
+#define SCOOP_REG(adr) (*(volatile unsigned short*)(scoop_io_base+(adr)))
+
+void reset_scoop(void)
+{
+	SCOOP_REG(SCOOP_MCR) = 0x0100;	// 00
+	SCOOP_REG(SCOOP_CDR) = 0x0000;  // 04
+	SCOOP_REG(SCOOP_CPR) = 0x0000;  // 0C
+	SCOOP_REG(SCOOP_CCR) = 0x0000;  // 10
+	SCOOP_REG(SCOOP_IMR) = 0x0000;  // 18
+	SCOOP_REG(SCOOP_IRM) = 0x00FF;  // 14
+	SCOOP_REG(SCOOP_ISR) = 0x0000;  // 1C
+	SCOOP_REG(SCOOP_IRM) = 0x0000;
+}
+
+static spinlock_t scoop_lock = SPIN_LOCK_UNLOCKED;
+static u32 scoop_gpwr;
+
+unsigned short set_scoop_gpio(unsigned short bit)
+{
+	unsigned short gpio_bit;
+	unsigned long flag;
+
+	spin_lock_irqsave(&scoop_lock, flag);
+	gpio_bit = SCOOP_REG(SCOOP_GPWR) | bit;
+	SCOOP_REG(SCOOP_GPWR) = gpio_bit;
+	spin_unlock_irqrestore(&scoop_lock, flag);
+
+	return gpio_bit;
+}
+
+unsigned short reset_scoop_gpio(unsigned short bit)
+{
+	unsigned short gpio_bit;
+	unsigned long flag;
+
+	spin_lock_irqsave(&scoop_lock, flag);
+	gpio_bit = SCOOP_REG(SCOOP_GPWR) & ~bit;
+	SCOOP_REG(SCOOP_GPWR) = gpio_bit;
+	spin_unlock_irqrestore(&scoop_lock, flag);
+
+	return gpio_bit;
+}
+
+EXPORT_SYMBOL(set_scoop_gpio);
+EXPORT_SYMBOL(reset_scoop_gpio);
+
+unsigned short read_scoop_reg(unsigned short reg)
+{
+	return SCOOP_REG(reg);
+}
+
+void write_scoop_reg(unsigned short reg, unsigned short data)
+{
+	SCOOP_REG(reg)=data;
+}
+
+EXPORT_SYMBOL(reset_scoop);
+EXPORT_SYMBOL(read_scoop_reg);
+EXPORT_SYMBOL(write_scoop_reg);
+
+static int scoop_suspend(struct device *dev, uint32_t state, uint32_t level)
+{
+	if (level == SUSPEND_POWER_DOWN) {
+		scoop_gpwr = SCOOP_REG(SCOOP_GPWR);
+		SCOOP_REG(SCOOP_GPWR) = 0;
+	}
+	return 0;
+}
+
+static int scoop_resume(struct device *dev, uint32_t level)
+{
+	if (level == RESUME_POWER_ON) {
+		SCOOP_REG(SCOOP_GPWR) = scoop_gpwr;
+	}
+	return 0;
+}
+
+int __init scoop_probe(struct device *dev)
+{
+	struct scoop_config *inf;
+	struct platform_device *pdev = to_platform_device(dev);
+	struct resource *mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+
+	if (!mem) return -EINVAL;
+
+	inf = dev->platform_data;
+	scoop_io_base = ioremap(mem->start, 0x1000);
+	if (!scoop_io_base) return -ENOMEM;
+
+	SCOOP_REG(SCOOP_MCR) = 0x0140;
+
+	reset_scoop();
+
+	SCOOP_REG(SCOOP_GPCR) = inf->io_dir & 0xffff;
+	SCOOP_REG(SCOOP_GPWR) = inf->io_out & 0xffff;
+
+	return 0;
+}
+
+static struct device_driver scoop_driver = {
+	.name		= "sharp-scoop",
+	.bus		= &platform_bus_type,
+	.probe		= scoop_probe,
+	.suspend	= scoop_suspend,
+	.resume		= scoop_resume,
+};
+
+int __init scoop_init(void)
+{
+	return driver_register(&scoop_driver);
+}
+
+subsys_initcall(scoop_init);
diff -Nru a/arch/arm/configs/ebsa110_defconfig b/arch/arm/configs/ebsa110_defconfig
--- a/arch/arm/configs/ebsa110_defconfig	2005-01-10 20:11:15 -08:00
+++ b/arch/arm/configs/ebsa110_defconfig	2005-01-10 20:11:15 -08:00
@@ -239,7 +239,6 @@
 CONFIG_IP_NF_TARGET_REDIRECT=y
 CONFIG_IP_NF_TARGET_NETMAP=y
 CONFIG_IP_NF_TARGET_SAME=y
-# CONFIG_IP_NF_NAT_LOCAL is not set
 # CONFIG_IP_NF_NAT_SNMP_BASIC is not set
 CONFIG_IP_NF_NAT_IRC=y
 CONFIG_IP_NF_NAT_FTP=y
diff -Nru a/arch/arm/configs/ep80219_defconfig b/arch/arm/configs/ep80219_defconfig
--- a/arch/arm/configs/ep80219_defconfig	2005-01-10 20:11:18 -08:00
+++ b/arch/arm/configs/ep80219_defconfig	2005-01-10 20:11:18 -08:00
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.10-rc3
-# Wed Dec 15 17:03:41 2004
+# Linux kernel version: 2.6.10
+# Thu Jan  6 10:54:33 2005
 #
 CONFIG_ARM=y
 CONFIG_MMU=y
@@ -90,6 +90,7 @@
 # CONFIG_ARCH_IQ80321 is not set
 CONFIG_ARCH_IQ31244=y
 # CONFIG_ARCH_IQ80331 is not set
+# CONFIG_MACH_IQ80332 is not set
 CONFIG_ARCH_EP80219=y
 CONFIG_ARCH_IOP321=y
 # CONFIG_ARCH_IOP331 is not set
@@ -119,7 +120,6 @@
 # General setup
 #
 CONFIG_PCI=y
-# CONFIG_ZBOOT_ROM is not set
 CONFIG_ZBOOT_ROM_TEXT=0x0
 CONFIG_ZBOOT_ROM_BSS=0x0
 # CONFIG_XIP_KERNEL is not set
@@ -144,7 +144,7 @@
 # CONFIG_PM is not set
 # CONFIG_PREEMPT is not set
 # CONFIG_ARTHUR is not set
-CONFIG_CMDLINE="ip=boot root=nfs console=ttyS0,115200 mem=128M@0xa0000000"
+CONFIG_CMDLINE="ip=boot root=nfs console=ttyS0,115200"
 CONFIG_ALIGNMENT_TRAP=y
 
 #
@@ -398,7 +398,8 @@
 #
 # CONFIG_ACENIC is not set
 # CONFIG_DL2K is not set
-# CONFIG_E1000 is not set
+CONFIG_E1000=y
+CONFIG_E1000_NAPI=y
 # CONFIG_NS83820 is not set
 # CONFIG_HAMACHI is not set
 # CONFIG_YELLOWFIN is not set
@@ -537,7 +538,7 @@
 # Userland interfaces
 #
 CONFIG_INPUT_MOUSEDEV=y
-CONFIG_INPUT_MOUSEDEV_PSAUX=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
diff -Nru a/arch/arm/configs/iq31244_defconfig b/arch/arm/configs/iq31244_defconfig
--- a/arch/arm/configs/iq31244_defconfig	2005-01-10 20:11:23 -08:00
+++ b/arch/arm/configs/iq31244_defconfig	2005-01-10 20:11:23 -08:00
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.10-rc3
-# Wed Dec 15 16:58:36 2004
+# Linux kernel version: 2.6.10
+# Thu Jan  6 10:53:05 2005
 #
 CONFIG_ARM=y
 CONFIG_MMU=y
@@ -30,7 +30,8 @@
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_HOTPLUG is not set
 CONFIG_KOBJECT_UEVENT=y
-# CONFIG_IKCONFIG is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
 # CONFIG_EMBEDDED is not set
 CONFIG_KALLSYMS=y
 # CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -90,6 +91,7 @@
 # CONFIG_ARCH_IQ80321 is not set
 CONFIG_ARCH_IQ31244=y
 # CONFIG_ARCH_IQ80331 is not set
+# CONFIG_MACH_IQ80332 is not set
 # CONFIG_ARCH_EP80219 is not set
 CONFIG_ARCH_IOP321=y
 # CONFIG_ARCH_IOP331 is not set
@@ -119,7 +121,6 @@
 # General setup
 #
 CONFIG_PCI=y
-# CONFIG_ZBOOT_ROM is not set
 CONFIG_ZBOOT_ROM_TEXT=0x0
 CONFIG_ZBOOT_ROM_BSS=0x0
 # CONFIG_XIP_KERNEL is not set
@@ -144,7 +145,7 @@
 # CONFIG_PM is not set
 # CONFIG_PREEMPT is not set
 # CONFIG_ARTHUR is not set
-CONFIG_CMDLINE="ip=boot root=nfs console=ttyS0,115200 mem=256M@0xa0000000"
+CONFIG_CMDLINE="ip=boot root=nfs console=ttyS0,115200"
 CONFIG_ALIGNMENT_TRAP=y
 
 #
@@ -506,7 +507,7 @@
 # Userland interfaces
 #
 CONFIG_INPUT_MOUSEDEV=y
-CONFIG_INPUT_MOUSEDEV_PSAUX=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
diff -Nru a/arch/arm/configs/iq80321_defconfig b/arch/arm/configs/iq80321_defconfig
--- a/arch/arm/configs/iq80321_defconfig	2005-01-10 20:11:17 -08:00
+++ b/arch/arm/configs/iq80321_defconfig	2005-01-10 20:11:17 -08:00
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.10-rc3
-# Wed Dec 15 16:48:43 2004
+# Linux kernel version: 2.6.10
+# Thu Jan  6 10:52:05 2005
 #
 CONFIG_ARM=y
 CONFIG_MMU=y
@@ -90,6 +90,7 @@
 CONFIG_ARCH_IQ80321=y
 # CONFIG_ARCH_IQ31244 is not set
 # CONFIG_ARCH_IQ80331 is not set
+# CONFIG_MACH_IQ80332 is not set
 # CONFIG_ARCH_EP80219 is not set
 CONFIG_ARCH_IOP321=y
 # CONFIG_ARCH_IOP331 is not set
@@ -119,7 +120,6 @@
 # General setup
 #
 CONFIG_PCI=y
-# CONFIG_ZBOOT_ROM is not set
 CONFIG_ZBOOT_ROM_TEXT=0x0
 CONFIG_ZBOOT_ROM_BSS=0x0
 # CONFIG_XIP_KERNEL is not set
@@ -144,7 +144,7 @@
 # CONFIG_PM is not set
 # CONFIG_PREEMPT is not set
 # CONFIG_ARTHUR is not set
-CONFIG_CMDLINE="ip=boot root=nfs console=ttyS0,115200 mem=128M@0xa0000000"
+CONFIG_CMDLINE="ip=boot root=nfs console=ttyS0,115200"
 CONFIG_ALIGNMENT_TRAP=y
 
 #
@@ -427,7 +427,7 @@
 # Userland interfaces
 #
 CONFIG_INPUT_MOUSEDEV=y
-CONFIG_INPUT_MOUSEDEV_PSAUX=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
@@ -500,7 +500,84 @@
 #
 # I2C support
 #
-# CONFIG_I2C is not set
+CONFIG_I2C=y
+CONFIG_I2C_CHARDEV=y
+
+#
+# I2C Algorithms
+#
+# CONFIG_I2C_ALGOBIT is not set
+# CONFIG_I2C_ALGOPCF is not set
+# CONFIG_I2C_ALGOPCA is not set
+
+#
+# I2C Hardware Bus support
+#
+# CONFIG_I2C_ALI1535 is not set
+# CONFIG_I2C_ALI1563 is not set
+# CONFIG_I2C_ALI15X3 is not set
+# CONFIG_I2C_AMD756 is not set
+# CONFIG_I2C_AMD8111 is not set
+# CONFIG_I2C_I801 is not set
+# CONFIG_I2C_I810 is not set
+CONFIG_I2C_IOP3XX=y
+# CONFIG_I2C_ISA is not set
+# CONFIG_I2C_NFORCE2 is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_PIIX4 is not set
+# CONFIG_I2C_PROSAVAGE is not set
+# CONFIG_I2C_SAVAGE4 is not set
+# CONFIG_SCx200_ACB is not set
+# CONFIG_I2C_SIS5595 is not set
+# CONFIG_I2C_SIS630 is not set
+# CONFIG_I2C_SIS96X is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_VIA is not set
+# CONFIG_I2C_VIAPRO is not set
+# CONFIG_I2C_VOODOO3 is not set
+# CONFIG_I2C_PCA_ISA is not set
+
+#
+# Hardware Sensors Chip support
+#
+# CONFIG_I2C_SENSOR is not set
+# CONFIG_SENSORS_ADM1021 is not set
+# CONFIG_SENSORS_ADM1025 is not set
+# CONFIG_SENSORS_ADM1026 is not set
+# CONFIG_SENSORS_ADM1031 is not set
+# CONFIG_SENSORS_ASB100 is not set
+# CONFIG_SENSORS_DS1621 is not set
+# CONFIG_SENSORS_FSCHER is not set
+# CONFIG_SENSORS_GL518SM is not set
+# CONFIG_SENSORS_IT87 is not set
+# CONFIG_SENSORS_LM63 is not set
+# CONFIG_SENSORS_LM75 is not set
+# CONFIG_SENSORS_LM77 is not set
+# CONFIG_SENSORS_LM78 is not set
+# CONFIG_SENSORS_LM80 is not set
+# CONFIG_SENSORS_LM83 is not set
+# CONFIG_SENSORS_LM85 is not set
+# CONFIG_SENSORS_LM87 is not set
+# CONFIG_SENSORS_LM90 is not set
+# CONFIG_SENSORS_MAX1619 is not set
+# CONFIG_SENSORS_PC87360 is not set
+# CONFIG_SENSORS_SMSC47M1 is not set
+# CONFIG_SENSORS_VIA686A is not set
+# CONFIG_SENSORS_W83781D is not set
+# CONFIG_SENSORS_W83L785TS is not set
+# CONFIG_SENSORS_W83627HF is not set
+
+#
+# Other I2C Chip support
+#
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_RTC8564 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
 
 #
 # Multimedia devices
@@ -689,7 +766,7 @@
 # CONFIG_DEBUG_KERNEL is not set
 # CONFIG_DEBUG_INFO is not set
 CONFIG_FRAME_POINTER=y
-# CONFIG_DEBUG_USER is not set
+CONFIG_DEBUG_USER=y
 
 #
 # Security options
diff -Nru a/arch/arm/configs/iq80331_defconfig b/arch/arm/configs/iq80331_defconfig
--- a/arch/arm/configs/iq80331_defconfig	2005-01-10 20:11:15 -08:00
+++ b/arch/arm/configs/iq80331_defconfig	2005-01-10 20:11:15 -08:00
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.10-rc3
-# Wed Dec 15 16:43:39 2004
+# Linux kernel version: 2.6.10
+# Thu Jan  6 10:44:16 2005
 #
 CONFIG_ARM=y
 CONFIG_MMU=y
@@ -33,7 +33,6 @@
 # CONFIG_IKCONFIG is not set
 # CONFIG_EMBEDDED is not set
 CONFIG_KALLSYMS=y
-# CONFIG_KALLSYMS_ALL is not set
 # CONFIG_KALLSYMS_EXTRA_PASS is not set
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
@@ -91,12 +90,14 @@
 # CONFIG_ARCH_IQ80321 is not set
 # CONFIG_ARCH_IQ31244 is not set
 CONFIG_ARCH_IQ80331=y
+# CONFIG_MACH_IQ80332 is not set
 # CONFIG_ARCH_EP80219 is not set
 CONFIG_ARCH_IOP331=y
 
 #
 # IOP3xx Chipset Features
 #
+CONFIG_IOP331_STEPD=y
 
 #
 # Processor Type
@@ -119,7 +120,6 @@
 # General setup
 #
 CONFIG_PCI=y
-# CONFIG_ZBOOT_ROM is not set
 CONFIG_ZBOOT_ROM_TEXT=0x0
 CONFIG_ZBOOT_ROM_BSS=0x0
 # CONFIG_XIP_KERNEL is not set
@@ -141,11 +141,10 @@
 #
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
-# CONFIG_DEBUG_DRIVER is not set
 # CONFIG_PM is not set
 # CONFIG_PREEMPT is not set
 # CONFIG_ARTHUR is not set
-CONFIG_CMDLINE="ip=boot root=nfs console=ttyS0,115200 mem=128M@0x00000000"
+CONFIG_CMDLINE="ip=boot root=nfs console=ttyS0,115200"
 CONFIG_ALIGNMENT_TRAP=y
 
 #
@@ -511,7 +510,7 @@
 # Userland interfaces
 #
 CONFIG_INPUT_MOUSEDEV=y
-CONFIG_INPUT_MOUSEDEV_PSAUX=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
@@ -584,7 +583,84 @@
 #
 # I2C support
 #
-# CONFIG_I2C is not set
+CONFIG_I2C=y
+CONFIG_I2C_CHARDEV=y
+
+#
+# I2C Algorithms
+#
+# CONFIG_I2C_ALGOBIT is not set
+# CONFIG_I2C_ALGOPCF is not set
+# CONFIG_I2C_ALGOPCA is not set
+
+#
+# I2C Hardware Bus support
+#
+# CONFIG_I2C_ALI1535 is not set
+# CONFIG_I2C_ALI1563 is not set
+# CONFIG_I2C_ALI15X3 is not set
+# CONFIG_I2C_AMD756 is not set
+# CONFIG_I2C_AMD8111 is not set
+# CONFIG_I2C_I801 is not set
+# CONFIG_I2C_I810 is not set
+CONFIG_I2C_IOP3XX=y
+# CONFIG_I2C_ISA is not set
+# CONFIG_I2C_NFORCE2 is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_PIIX4 is not set
+# CONFIG_I2C_PROSAVAGE is not set
+# CONFIG_I2C_SAVAGE4 is not set
+# CONFIG_SCx200_ACB is not set
+# CONFIG_I2C_SIS5595 is not set
+# CONFIG_I2C_SIS630 is not set
+# CONFIG_I2C_SIS96X is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_VIA is not set
+# CONFIG_I2C_VIAPRO is not set
+# CONFIG_I2C_VOODOO3 is not set
+# CONFIG_I2C_PCA_ISA is not set
+
+#
+# Hardware Sensors Chip support
+#
+# CONFIG_I2C_SENSOR is not set
+# CONFIG_SENSORS_ADM1021 is not set
+# CONFIG_SENSORS_ADM1025 is not set
+# CONFIG_SENSORS_ADM1026 is not set
+# CONFIG_SENSORS_ADM1031 is not set
+# CONFIG_SENSORS_ASB100 is not set
+# CONFIG_SENSORS_DS1621 is not set
+# CONFIG_SENSORS_FSCHER is not set
+# CONFIG_SENSORS_GL518SM is not set
+# CONFIG_SENSORS_IT87 is not set
+# CONFIG_SENSORS_LM63 is not set
+# CONFIG_SENSORS_LM75 is not set
+# CONFIG_SENSORS_LM77 is not set
+# CONFIG_SENSORS_LM78 is not set
+# CONFIG_SENSORS_LM80 is not set
+# CONFIG_SENSORS_LM83 is not set
+# CONFIG_SENSORS_LM85 is not set
+# CONFIG_SENSORS_LM87 is not set
+# CONFIG_SENSORS_LM90 is not set
+# CONFIG_SENSORS_MAX1619 is not set
+# CONFIG_SENSORS_PC87360 is not set
+# CONFIG_SENSORS_SMSC47M1 is not set
+# CONFIG_SENSORS_VIA686A is not set
+# CONFIG_SENSORS_W83781D is not set
+# CONFIG_SENSORS_W83L785TS is not set
+# CONFIG_SENSORS_W83627HF is not set
+
+#
+# Other I2C Chip support
+#
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_RTC8564 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
 
 #
 # Multimedia devices
@@ -764,19 +840,10 @@
 #
 # Kernel hacking
 #
-CONFIG_DEBUG_KERNEL=y
-# CONFIG_MAGIC_SYSRQ is not set
-# CONFIG_SCHEDSTATS is not set
-# CONFIG_DEBUG_SLAB is not set
-# CONFIG_DEBUG_SPINLOCK is not set
-# CONFIG_DEBUG_KOBJECT is not set
-CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_KERNEL is not set
 # CONFIG_DEBUG_INFO is not set
 CONFIG_FRAME_POINTER=y
 CONFIG_DEBUG_USER=y
-# CONFIG_DEBUG_WAITQ is not set
-CONFIG_DEBUG_ERRORS=y
-# CONFIG_DEBUG_LL is not set
 
 #
 # Security options
@@ -793,5 +860,5 @@
 # Library routines
 #
 # CONFIG_CRC_CCITT is not set
-CONFIG_CRC32=y
+# CONFIG_CRC32 is not set
 # CONFIG_LIBCRC32C is not set
diff -Nru a/arch/arm/configs/iq80332_defconfig b/arch/arm/configs/iq80332_defconfig
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/arm/configs/iq80332_defconfig	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,864 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.10
+# Thu Jan  6 10:51:02 2005
+#
+CONFIG_ARM=y
+CONFIG_MMU=y
+CONFIG_UID16=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+CONFIG_GENERIC_IOMAP=y
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_CLEAN_COMPILE=y
+CONFIG_BROKEN_ON_SMP=y
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+# CONFIG_POSIX_MQUEUE is not set
+CONFIG_BSD_PROCESS_ACCT=y
+# CONFIG_BSD_PROCESS_ACCT_V3 is not set
+CONFIG_SYSCTL=y
+# CONFIG_AUDIT is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_HOTPLUG is not set
+CONFIG_KOBJECT_UEVENT=y
+# CONFIG_IKCONFIG is not set
+# CONFIG_EMBEDDED is not set
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SHMEM=y
+CONFIG_CC_ALIGN_FUNCTIONS=0
+CONFIG_CC_ALIGN_LABELS=0
+CONFIG_CC_ALIGN_LOOPS=0
+CONFIG_CC_ALIGN_JUMPS=0
+# CONFIG_TINY_SHMEM is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_OBSOLETE_MODPARM=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+
+#
+# System Type
+#
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_CAMELOT is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+CONFIG_ARCH_IOP3XX=y
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_H720X is not set
+
+#
+# IOP3xx Implementation Options
+#
+
+#
+# IOP3xx Platform Types
+#
+# CONFIG_ARCH_IQ80321 is not set
+# CONFIG_ARCH_IQ31244 is not set
+# CONFIG_ARCH_IQ80331 is not set
+CONFIG_MACH_IQ80332=y
+# CONFIG_ARCH_EP80219 is not set
+CONFIG_ARCH_IOP331=y
+
+#
+# IOP3xx Chipset Features
+#
+# CONFIG_IOP331_STEPD is not set
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_XSCALE=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_MINICACHE=y
+
+#
+# Processor Features
+#
+# CONFIG_ARM_THUMB is not set
+CONFIG_XSCALE_PMU=y
+
+#
+# General setup
+#
+CONFIG_PCI=y
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+# CONFIG_XIP_KERNEL is not set
+# CONFIG_PCI_LEGACY_PROC is not set
+CONFIG_PCI_NAMES=y
+
+#
+# At least one math emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+CONFIG_BINFMT_ELF=y
+CONFIG_BINFMT_AOUT=y
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+# CONFIG_PM is not set
+# CONFIG_PREEMPT is not set
+# CONFIG_ARTHUR is not set
+CONFIG_CMDLINE="ip=boot root=nfs console=ttyS0,115200"
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_CONCAT is not set
+CONFIG_MTD_REDBOOT_PARTS=y
+CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y
+CONFIG_MTD_REDBOOT_PARTS_READONLY=y
+# CONFIG_MTD_CMDLINE_PARTS is not set
+# CONFIG_MTD_AFS_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=y
+CONFIG_MTD_CFI_ADV_OPTIONS=y
+CONFIG_MTD_CFI_NOSWAP=y
+# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
+# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
+# CONFIG_MTD_CFI_GEOMETRY is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+CONFIG_MTD_CFI_INTELEXT=y
+# CONFIG_MTD_CFI_AMDSTD is not set
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=y
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+CONFIG_MTD_PHYSMAP=y
+CONFIG_MTD_PHYSMAP_START=0xc0000000
+CONFIG_MTD_PHYSMAP_LEN=0x00800000
+CONFIG_MTD_PHYSMAP_BANKWIDTH=1
+# CONFIG_MTD_ARM_INTEGRATOR is not set
+# CONFIG_MTD_EDB7312 is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_PMC551 is not set
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLKMTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+
+#
+# NAND Flash Device Drivers
+#
+# CONFIG_MTD_NAND is not set
+
+#
+# Plug and Play support
+#
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_CPQ_CISS_DA is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_UMEM is not set
+# CONFIG_BLK_DEV_LOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_SX8 is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=8192
+# CONFIG_BLK_DEV_INITRD is not set
+CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_CDROM_PKTCDVD is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=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_RAID10 is not set
+CONFIG_MD_RAID5=y
+# CONFIG_MD_RAID6 is not set
+# CONFIG_MD_MULTIPATH is not set
+# CONFIG_MD_FAULTY is not set
+CONFIG_BLK_DEV_DM=y
+# CONFIG_DM_CRYPT is not set
+# CONFIG_DM_SNAPSHOT is not set
+# CONFIG_DM_MIRROR is not set
+# CONFIG_DM_ZERO is not set
+
+#
+# Networking support
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+# CONFIG_NETLINK_DEV is not set
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_DHCP 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_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_IP_TCPDIAG=y
+# CONFIG_IP_TCPDIAG_IPV6 is not set
+# CONFIG_IPV6 is not set
+# CONFIG_NETFILTER is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_NET_DIVERT is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+# CONFIG_NET_CLS_ROUTE is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+
+#
+# ARCnet devices
+#
+# CONFIG_ARCNET is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+# CONFIG_NET_ETHERNET is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+# CONFIG_ACENIC is not set
+# CONFIG_DL2K is not set
+CONFIG_E1000=y
+CONFIG_E1000_NAPI=y
+# CONFIG_NS83820 is not set
+# CONFIG_HAMACHI is not set
+# CONFIG_YELLOWFIN is not set
+# CONFIG_R8169 is not set
+# CONFIG_SK98LIN is not set
+# CONFIG_TIGON3 is not set
+
+#
+# Ethernet (10000 Mbit)
+#
+# CONFIG_IXGB is not set
+# CONFIG_S2IO is not set
+
+#
+# Token Ring devices
+#
+# CONFIG_TR is not set
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_NET_FC is not set
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+CONFIG_SCSI=y
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=y
+# CONFIG_CHR_DEV_ST is not set
+# CONFIG_CHR_DEV_OSST is not set
+# CONFIG_BLK_DEV_SR is not set
+CONFIG_CHR_DEV_SG=y
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+# CONFIG_SCSI_MULTI_LUN is not set
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+
+#
+# SCSI Transport Attributes
+#
+# CONFIG_SCSI_SPI_ATTRS is not set
+# CONFIG_SCSI_FC_ATTRS is not set
+
+#
+# SCSI low-level drivers
+#
+# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
+# CONFIG_SCSI_3W_9XXX is not set
+# CONFIG_SCSI_ACARD is not set
+# CONFIG_SCSI_AACRAID is not set
+# CONFIG_SCSI_AIC7XXX is not set
+# CONFIG_SCSI_AIC7XXX_OLD is not set
+# CONFIG_SCSI_AIC79XX is not set
+# CONFIG_SCSI_DPT_I2O is not set
+# CONFIG_MEGARAID_NEWGEN is not set
+# CONFIG_MEGARAID_LEGACY is not set
+# CONFIG_SCSI_SATA is not set
+# CONFIG_SCSI_BUSLOGIC is not set
+# CONFIG_SCSI_DMX3191D is not set
+# CONFIG_SCSI_EATA 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_IPS is not set
+# CONFIG_SCSI_INITIO is not set
+# CONFIG_SCSI_INIA100 is not set
+# CONFIG_SCSI_SYM53C8XX_2 is not set
+# CONFIG_SCSI_IPR is not set
+# CONFIG_SCSI_QLOGIC_ISP is not set
+# CONFIG_SCSI_QLOGIC_FC is not set
+# CONFIG_SCSI_QLOGIC_1280 is not set
+CONFIG_SCSI_QLA2XXX=y
+# CONFIG_SCSI_QLA21XX is not set
+# CONFIG_SCSI_QLA22XX is not set
+# CONFIG_SCSI_QLA2300 is not set
+# CONFIG_SCSI_QLA2322 is not set
+# CONFIG_SCSI_QLA6312 is not set
+# CONFIG_SCSI_QLA6322 is not set
+# CONFIG_SCSI_DC395x is not set
+# CONFIG_SCSI_DC390T is not set
+# CONFIG_SCSI_NSP32 is not set
+# CONFIG_SCSI_DEBUG is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+# CONFIG_IEEE1394 is not set
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN 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 is not set
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+# CONFIG_SERIO is not set
+
+#
+# Input Device Drivers
+#
+# CONFIG_INPUT_KEYBOARD is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_NR_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_NVRAM is not set
+# CONFIG_RTC is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+# CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# I2C support
+#
+CONFIG_I2C=y
+CONFIG_I2C_CHARDEV=y
+
+#
+# I2C Algorithms
+#
+# CONFIG_I2C_ALGOBIT is not set
+# CONFIG_I2C_ALGOPCF is not set
+# CONFIG_I2C_ALGOPCA is not set
+
+#
+# I2C Hardware Bus support
+#
+# CONFIG_I2C_ALI1535 is not set
+# CONFIG_I2C_ALI1563 is not set
+# CONFIG_I2C_ALI15X3 is not set
+# CONFIG_I2C_AMD756 is not set
+# CONFIG_I2C_AMD8111 is not set
+# CONFIG_I2C_I801 is not set
+# CONFIG_I2C_I810 is not set
+CONFIG_I2C_IOP3XX=y
+# CONFIG_I2C_ISA is not set
+# CONFIG_I2C_NFORCE2 is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_PIIX4 is not set
+# CONFIG_I2C_PROSAVAGE is not set
+# CONFIG_I2C_SAVAGE4 is not set
+# CONFIG_SCx200_ACB is not set
+# CONFIG_I2C_SIS5595 is not set
+# CONFIG_I2C_SIS630 is not set
+# CONFIG_I2C_SIS96X is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_VIA is not set
+# CONFIG_I2C_VIAPRO is not set
+# CONFIG_I2C_VOODOO3 is not set
+# CONFIG_I2C_PCA_ISA is not set
+
+#
+# Hardware Sensors Chip support
+#
+# CONFIG_I2C_SENSOR is not set
+# CONFIG_SENSORS_ADM1021 is not set
+# CONFIG_SENSORS_ADM1025 is not set
+# CONFIG_SENSORS_ADM1026 is not set
+# CONFIG_SENSORS_ADM1031 is not set
+# CONFIG_SENSORS_ASB100 is not set
+# CONFIG_SENSORS_DS1621 is not set
+# CONFIG_SENSORS_FSCHER is not set
+# CONFIG_SENSORS_GL518SM is not set
+# CONFIG_SENSORS_IT87 is not set
+# CONFIG_SENSORS_LM63 is not set
+# CONFIG_SENSORS_LM75 is not set
+# CONFIG_SENSORS_LM77 is not set
+# CONFIG_SENSORS_LM78 is not set
+# CONFIG_SENSORS_LM80 is not set
+# CONFIG_SENSORS_LM83 is not set
+# CONFIG_SENSORS_LM85 is not set
+# CONFIG_SENSORS_LM87 is not set
+# CONFIG_SENSORS_LM90 is not set
+# CONFIG_SENSORS_MAX1619 is not set
+# CONFIG_SENSORS_PC87360 is not set
+# CONFIG_SENSORS_SMSC47M1 is not set
+# CONFIG_SENSORS_VIA686A is not set
+# CONFIG_SENSORS_W83781D is not set
+# CONFIG_SENSORS_W83L785TS is not set
+# CONFIG_SENSORS_W83627HF is not set
+
+#
+# Other I2C Chip support
+#
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_RTC8564 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+# CONFIG_EXT3_FS_SECURITY is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+CONFIG_XFS_FS=y
+# CONFIG_XFS_RT is not set
+# CONFIG_XFS_QUOTA is not set
+CONFIG_XFS_SECURITY=y
+CONFIG_XFS_POSIX_ACL=y
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+# CONFIG_MSDOS_FS is not set
+# CONFIG_VFAT_FS is not set
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_SYSFS=y
+# CONFIG_DEVFS_FS is not set
+# CONFIG_DEVPTS_FS_XATTR is not set
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_XATTR is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_JFFS_FS is not set
+# CONFIG_JFFS2_FS is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V4 is not set
+# CONFIG_NFS_DIRECTIO is not set
+CONFIG_NFSD=y
+CONFIG_NFSD_V3=y
+# CONFIG_NFSD_V4 is not set
+# CONFIG_NFSD_TCP is not set
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=y
+CONFIG_SUNRPC=y
+# CONFIG_RPCSEC_GSS_KRB5 is not set
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_BSD_DISKLABEL is not set
+# CONFIG_MINIX_SUBPARTITION is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_UNIXWARE_DISKLABEL is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
+
+#
+# Native Language Support
+#
+# CONFIG_NLS is not set
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Graphics support
+#
+# CONFIG_FB is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+
+#
+# Misc devices
+#
+
+#
+# USB support
+#
+# CONFIG_USB is not set
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information
+#
+
+#
+# USB Gadget Support
+#
+# CONFIG_USB_GADGET is not set
+
+#
+# MMC/SD Card support
+#
+# CONFIG_MMC is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_DEBUG_INFO is not set
+CONFIG_FRAME_POINTER=y
+CONFIG_DEBUG_USER=y
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+# CONFIG_CRYPTO is not set
+
+#
+# Library routines
+#
+# CONFIG_CRC_CCITT is not set
+# CONFIG_CRC32 is not set
+# CONFIG_LIBCRC32C is not set
diff -Nru a/arch/arm/configs/ixp4xx_defconfig b/arch/arm/configs/ixp4xx_defconfig
--- a/arch/arm/configs/ixp4xx_defconfig	2005-01-10 20:11:17 -08:00
+++ b/arch/arm/configs/ixp4xx_defconfig	2005-01-10 20:11:17 -08:00
@@ -399,7 +399,6 @@
 CONFIG_IP_NF_TARGET_REDIRECT=m
 # CONFIG_IP_NF_TARGET_NETMAP is not set
 # CONFIG_IP_NF_TARGET_SAME is not set
-CONFIG_IP_NF_NAT_LOCAL=y
 CONFIG_IP_NF_NAT_SNMP_BASIC=m
 CONFIG_IP_NF_NAT_IRC=m
 CONFIG_IP_NF_NAT_FTP=m
diff -Nru a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile
--- a/arch/arm/kernel/Makefile	2005-01-10 20:11:22 -08:00
+++ b/arch/arm/kernel/Makefile	2005-01-10 20:11:22 -08:00
@@ -18,6 +18,7 @@
 obj-$(CONFIG_ARTHUR)		+= arthur.o
 obj-$(CONFIG_ISA_DMA)		+= dma-isa.o
 obj-$(CONFIG_PCI)		+= bios32.o
+obj-$(CONFIG_SMP)		+= smp.o
 
 obj-$(CONFIG_IWMMXT)		+= iwmmxt.o
 AFLAGS_iwmmxt.o			:= -Wa,-mcpu=iwmmxt
diff -Nru a/arch/arm/kernel/asm-offsets.c b/arch/arm/kernel/asm-offsets.c
--- a/arch/arm/kernel/asm-offsets.c	2005-01-10 20:11:16 -08:00
+++ b/arch/arm/kernel/asm-offsets.c	2005-01-10 20:11:16 -08:00
@@ -73,7 +73,7 @@
   DEFINE(VM_EXEC,	       	VM_EXEC);
   BLANK();
   DEFINE(PAGE_SZ,	       	PAGE_SIZE);
-  DEFINE(VIRT_OFFSET,	       	PAGE_OFFSET);
+  DEFINE(VIRT_OFFSET,		PAGE_OFFSET);
   BLANK();
   DEFINE(SYS_ERROR0,		0x9f0000);
   BLANK();
diff -Nru a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
--- a/arch/arm/kernel/entry-armv.S	2005-01-10 20:11:17 -08:00
+++ b/arch/arm/kernel/entry-armv.S	2005-01-10 20:11:17 -08:00
@@ -23,1000 +23,6 @@
 
 #include "entry-header.S"
 
-#ifdef IOC_BASE
-/* IOC / IOMD based hardware */
-#include <asm/hardware/iomd.h>
-
-		.equ	ioc_base_high, IOC_BASE & 0xff000000
-		.equ	ioc_base_low, IOC_BASE & 0x00ff0000
-		.macro	disable_fiq
-		mov	r12, #ioc_base_high
-		.if	ioc_base_low
-		orr	r12, r12, #ioc_base_low
-		.endif
-		strb	r12, [r12, #0x38]	@ Disable FIQ register
-		.endm
-
-		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
-		mov	r4, #ioc_base_high		@ point at IOC
-		.if	ioc_base_low
-		orr	r4, r4, #ioc_base_low
-		.endif
-		ldrb	\irqstat, [r4, #IOMD_IRQREQB]	@ get high priority first
-		ldr	\base, =irq_prio_h
-		teq	\irqstat, #0
-#ifdef IOMD_BASE
-		ldreqb	\irqstat, [r4, #IOMD_DMAREQ]	@ get dma
-		addeq	\base, \base, #256		@ irq_prio_h table size
-		teqeq	\irqstat, #0
-		bne	2406f
-#endif
-		ldreqb	\irqstat, [r4, #IOMD_IRQREQA]	@ get low priority
-		addeq	\base, \base, #256		@ irq_prio_d table size
-		teqeq	\irqstat, #0
-#ifdef IOMD_IRQREQC
-		ldreqb	\irqstat, [r4, #IOMD_IRQREQC]
-		addeq	\base, \base, #256		@ irq_prio_l table size
-		teqeq	\irqstat, #0
-#endif
-#ifdef IOMD_IRQREQD
-		ldreqb	\irqstat, [r4, #IOMD_IRQREQD]
-		addeq	\base, \base, #256		@ irq_prio_lc table size
-		teqeq	\irqstat, #0
-#endif
-2406:		ldrneb	\irqnr, [\base, \irqstat]	@ get IRQ number
-		.endm
-
-/*
- * Interrupt table (incorporates priority).  Please note that we
- * rely on the order of these tables (see above code).
- */
-		.macro	irq_prio_table
-irq_prio_h:	.byte	 0, 8, 9, 8,10,10,10,10,11,11,11,11,10,10,10,10
-		.byte	12, 8, 9, 8,10,10,10,10,11,11,11,11,10,10,10,10
-		.byte	13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
-		.byte	13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
-		.byte	14,14,14,14,10,10,10,10,11,11,11,11,10,10,10,10
-		.byte	14,14,14,14,10,10,10,10,11,11,11,11,10,10,10,10
-		.byte	13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
-		.byte	13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
-		.byte	15,15,15,15,10,10,10,10,11,11,11,11,10,10,10,10
-		.byte	15,15,15,15,10,10,10,10,11,11,11,11,10,10,10,10
-		.byte	13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
-		.byte	13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
-		.byte	15,15,15,15,10,10,10,10,11,11,11,11,10,10,10,10
-		.byte	15,15,15,15,10,10,10,10,11,11,11,11,10,10,10,10
-		.byte	13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
-		.byte	13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
-#ifdef IOMD_BASE
-irq_prio_d:	.byte	 0,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
-		.byte	20,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
-		.byte	21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
-		.byte	21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
-		.byte	22,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
-		.byte	22,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
-		.byte	21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
-		.byte	21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
-		.byte	23,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
-		.byte	23,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
-		.byte	21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
-		.byte	21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
-		.byte	22,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
-		.byte	22,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
-		.byte	21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
-		.byte	21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
-#endif
-irq_prio_l:	.byte	 0, 0, 1, 0, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3
-		.byte	 4, 0, 1, 0, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3
-		.byte	 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
-		.byte	 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
-		.byte	 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3
-		.byte	 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3
-		.byte	 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
-		.byte	 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
-		.byte	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
-		.byte	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
-		.byte	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
-		.byte	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
-		.byte	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
-		.byte	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
-		.byte	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
-		.byte	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
-#ifdef IOMD_IRQREQC
-irq_prio_lc:	.byte	24,24,25,24,26,26,26,26,27,27,27,27,27,27,27,27
-		.byte	28,24,25,24,26,26,26,26,27,27,27,27,27,27,27,27
-		.byte	29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29
-		.byte	29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29
-		.byte	30,30,30,30,30,30,30,30,27,27,27,27,27,27,27,27
-		.byte	30,30,30,30,30,30,30,30,27,27,27,27,27,27,27,27
-		.byte	29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29
-		.byte	29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29
-		.byte	31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
-		.byte	31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
-		.byte	31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
-		.byte	31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
-		.byte	31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
-		.byte	31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
-		.byte	31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
-		.byte	31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
-#endif
-#ifdef IOMD_IRQREQD
-irq_prio_ld:	.byte	40,40,41,40,42,42,42,42,43,43,43,43,43,43,43,43
-		.byte	44,40,41,40,42,42,42,42,43,43,43,43,43,43,43,43
-		.byte	45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45
-		.byte	45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45
-		.byte	46,46,46,46,46,46,46,46,43,43,43,43,43,43,43,43
-		.byte	46,46,46,46,46,46,46,46,43,43,43,43,43,43,43,43
-		.byte	45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45
-		.byte	45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45
-		.byte	47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
-		.byte	47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
-		.byte	47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
-		.byte	47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
-		.byte	47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
-		.byte	47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
-		.byte	47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
-		.byte	47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
-#endif
-		.endm
-
-#elif defined(CONFIG_ARCH_EBSA110)
-
-#define IRQ_STAT		0xff000000	/* read */
-
-		.macro	disable_fiq
-		.endm
-
-		.macro	get_irqnr_and_base, irqnr, stat, base, tmp
-		mov	\base, #IRQ_STAT
-		ldrb	\stat, [\base]			@ get interrupts
-		mov	\irqnr, #0
-		tst	\stat, #15
-		addeq	\irqnr, \irqnr, #4
-		moveq	\stat, \stat, lsr #4
-		tst	\stat, #3
-		addeq	\irqnr, \irqnr, #2
-		moveq	\stat, \stat, lsr #2
-		tst	\stat, #1
-		addeq	\irqnr, \irqnr, #1
-		moveq	\stat, \stat, lsr #1
-		tst	\stat, #1			@ bit 0 should be set
-		.endm
-
-		.macro	irq_prio_table
-		.endm
-
-#elif defined(CONFIG_ARCH_SHARK)
-
-		.macro	disable_fiq
-		.endm
-
-		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
-		mov	r4, #0xe0000000
-
-		mov	\irqstat, #0x0C
-		strb	\irqstat, [r4, #0x20]		@outb(0x0C, 0x20) /* Poll command */
-		ldrb	\irqnr, [r4, #0x20]		@irq = inb(0x20) & 7
-		and	\irqstat, \irqnr, #0x80
-		teq	\irqstat, #0
-		beq	43f
-		and	\irqnr, \irqnr, #7
-		teq	\irqnr, #2
-		bne	44f
-43:		mov	\irqstat, #0x0C
-		strb	\irqstat, [r4, #0xa0]		@outb(0x0C, 0xA0) /* Poll command */
-		ldrb	\irqnr, [r4, #0xa0]		@irq = (inb(0xA0) & 7) + 8
-		and	\irqstat, \irqnr, #0x80
-		teq	\irqstat, #0
-		beq	44f
-		and	\irqnr, \irqnr, #7
-		add	\irqnr, \irqnr, #8
-44:		teq	\irqstat, #0
-		.endm
-
-		.macro	irq_prio_table
-		.endm
-
-#elif defined(CONFIG_FOOTBRIDGE)
-#include <asm/hardware/dec21285.h>
-
-		.macro	disable_fiq
-		.endm
-
-		.equ	dc21285_high, ARMCSR_BASE & 0xff000000
-		.equ	dc21285_low, ARMCSR_BASE & 0x00ffffff
-
-		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
-		mov	r4, #dc21285_high
-		.if	dc21285_low
-		orr	r4, r4, #dc21285_low
-		.endif
-		ldr	\irqstat, [r4, #0x180]		@ get interrupts
-
-		mov	\irqnr, #IRQ_SDRAMPARITY
-		tst	\irqstat, #IRQ_MASK_SDRAMPARITY
-		bne	1001f
-
-		tst	\irqstat, #IRQ_MASK_UART_RX
-		movne	\irqnr, #IRQ_CONRX
-		bne	1001f
-
-		tst	\irqstat, #IRQ_MASK_DMA1
-		movne	\irqnr, #IRQ_DMA1
-		bne	1001f
-
-		tst	\irqstat, #IRQ_MASK_DMA2
-		movne	\irqnr, #IRQ_DMA2
-		bne	1001f
-
-		tst	\irqstat, #IRQ_MASK_IN0
-		movne	\irqnr, #IRQ_IN0
-		bne	1001f
-
-		tst	\irqstat, #IRQ_MASK_IN1
-		movne	\irqnr, #IRQ_IN1
-		bne	1001f
-
-		tst	\irqstat, #IRQ_MASK_IN2
-		movne	\irqnr, #IRQ_IN2
-		bne	1001f
-
-		tst	\irqstat, #IRQ_MASK_IN3
-		movne	\irqnr, #IRQ_IN3
-		bne	1001f
-
-		tst	\irqstat, #IRQ_MASK_PCI
-		movne	\irqnr, #IRQ_PCI
-		bne	1001f
-
-		tst	\irqstat, #IRQ_MASK_DOORBELLHOST
-		movne	\irqnr, #IRQ_DOORBELLHOST
-		bne     1001f
-	
-		tst	\irqstat, #IRQ_MASK_I2OINPOST
-		movne	\irqnr, #IRQ_I2OINPOST
-		bne	1001f
-
-		tst	\irqstat, #IRQ_MASK_TIMER1
-		movne	\irqnr, #IRQ_TIMER1
-		bne	1001f
-
-		tst	\irqstat, #IRQ_MASK_TIMER2
-		movne	\irqnr, #IRQ_TIMER2
-		bne	1001f
-
-		tst	\irqstat, #IRQ_MASK_TIMER3
-		movne	\irqnr, #IRQ_TIMER3
-		bne	1001f
-
-		tst	\irqstat, #IRQ_MASK_UART_TX
-		movne	\irqnr, #IRQ_CONTX
-		bne	1001f
-
-		tst	\irqstat, #IRQ_MASK_PCI_ABORT
-		movne	\irqnr, #IRQ_PCI_ABORT
-		bne	1001f
-
-		tst	\irqstat, #IRQ_MASK_PCI_SERR
-		movne	\irqnr, #IRQ_PCI_SERR
-		bne	1001f
-
-		tst	\irqstat, #IRQ_MASK_DISCARD_TIMER
-		movne	\irqnr, #IRQ_DISCARD_TIMER
-		bne	1001f
-
-		tst	\irqstat, #IRQ_MASK_PCI_DPERR
-		movne	\irqnr, #IRQ_PCI_DPERR
-		bne	1001f
-
-		tst	\irqstat, #IRQ_MASK_PCI_PERR
-		movne	\irqnr, #IRQ_PCI_PERR
-1001:
-		.endm
-
-		.macro	irq_prio_table
-		.endm
-
-#elif defined(CONFIG_ARCH_NEXUSPCI)
-
-		.macro	disable_fiq
-		.endm
-
-		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
-		ldr	\irqstat, =INTCONT_BASE
-		ldr	\base, =soft_irq_mask
-		ldr	\irqstat, [\irqstat]		@ get interrupts
-		ldr	\base, [\base]
-		mov	\irqnr, #0
-		and	\irqstat, \irqstat, \base	@ mask out disabled ones
-1001:		tst	\irqstat, #1
-		addeq	\irqnr, \irqnr, #1
-		moveq	\irqstat, \irqstat, lsr #1
-		tsteq	\irqnr, #32
-		beq	1001b
-		teq	\irqnr, #32
-		.endm
-
-		.macro	irq_prio_table
-		.ltorg
-		.bss
-ENTRY(soft_irq_mask)
-		.word	0
-		.text
-		.endm
-
-#elif defined(CONFIG_ARCH_TBOX)
-
-		.macro	disable_fiq
-		.endm
-
-		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
-		ldr	\irqstat, =0xffff7000
-		ldr	\irqstat, [\irqstat]		@ get interrupts
-		ldr	\base, =soft_irq_mask
-		ldr	\base, [\base]
-		mov	\irqnr, #0
-		and	\irqstat, \irqstat, \base	@ mask out disabled ones
-1001:		tst	\irqstat, #1
-		addeq	\irqnr, \irqnr, #1
-		moveq	\irqstat, \irqstat, lsr #1
-		tsteq	\irqnr, #32
-		beq	1001b
-		teq	\irqnr, #32
-		.endm
-
-		.macro	irq_prio_table
-		.ltorg
-		.bss
-ENTRY(soft_irq_mask)
-		.word	0
-		.text
-		.endm
-
-#elif defined(CONFIG_ARCH_SA1100)
-
-		.macro	disable_fiq
-		.endm
-
-		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
-		mov	r4, #0xfa000000			@ ICIP = 0xfa050000
-		add	r4, r4, #0x00050000
-		ldr	\irqstat, [r4]			@ get irqs
-		ldr	\irqnr, [r4, #4]		@ ICMR = 0xfa050004
-		ands	\irqstat, \irqstat, \irqnr
-		mov	\irqnr, #0
-		beq	1001f
-		tst	\irqstat, #0xff
-		moveq	\irqstat, \irqstat, lsr #8
-		addeq	\irqnr, \irqnr, #8
-		tsteq	\irqstat, #0xff
-		moveq	\irqstat, \irqstat, lsr #8
-		addeq	\irqnr, \irqnr, #8
-		tsteq	\irqstat, #0xff
-		moveq	\irqstat, \irqstat, lsr #8
-		addeq	\irqnr, \irqnr, #8
-		tst	\irqstat, #0x0f
-		moveq	\irqstat, \irqstat, lsr #4
-		addeq	\irqnr, \irqnr, #4
-		tst	\irqstat, #0x03
-		moveq	\irqstat, \irqstat, lsr #2
-		addeq	\irqnr, \irqnr, #2
-		tst	\irqstat, #0x01
-		addeqs	\irqnr, \irqnr, #1
-1001:
-		.endm
-
-		.macro	irq_prio_table
-		.endm
-
-#elif defined(CONFIG_ARCH_L7200)
-#include <asm/hardware.h>
-	
-		.equ	irq_base_addr,	IO_BASE_2
-
-		.macro  disable_fiq
-		.endm
- 
-		.macro  get_irqnr_and_base, irqnr, irqstat, base, tmp
-		mov     \irqstat, #irq_base_addr		@ Virt addr IRQ regs
-		add	\irqstat, \irqstat, #0x00001000		@ Status reg
-		ldr     \irqstat, [\irqstat, #0]		@ get interrupts
-		mov     \irqnr, #0
-1001:		tst     \irqstat, #1
-		addeq   \irqnr, \irqnr, #1
-		moveq   \irqstat, \irqstat, lsr #1
-		tsteq   \irqnr, #32
-		beq     1001b
-		teq     \irqnr, #32
-		.endm
-
-		.macro  irq_prio_table
-		.endm
-
-#elif defined(CONFIG_ARCH_INTEGRATOR)
-
-		.macro	disable_fiq
-		.endm
-
-		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
-/* FIXME: should not be using soo many LDRs here */
-		ldr	\base, =IO_ADDRESS(INTEGRATOR_IC_BASE)
-		mov	\irqnr, #IRQ_PIC_START
-		ldr	\irqstat, [\base, #IRQ_STATUS]		@ get masked status
-		ldr	\base, =IO_ADDRESS(INTEGRATOR_HDR_BASE)
-		teq	\irqstat, #0
-		ldreq	\irqstat, [\base, #(INTEGRATOR_HDR_IC_OFFSET+IRQ_STATUS)]
-		moveq	\irqnr, #IRQ_CIC_START
-
-1001:		tst	\irqstat, #15
-		bne	1002f
-		add	\irqnr, \irqnr, #4
-		movs	\irqstat, \irqstat, lsr #4
-		bne	1001b
-1002:		tst	\irqstat, #1
-		bne	1003f
-		add	\irqnr, \irqnr, #1
-		movs	\irqstat, \irqstat, lsr #1
-		bne	1002b
-1003:		/* EQ will be set if no irqs pending */
-		.endm
-
-		.macro	irq_prio_table
-		.endm
-
-#elif defined(CONFIG_ARCH_VERSATILE)
-
-		.macro	disable_fiq
-		.endm
-
-		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
-		ldr	\base, =IO_ADDRESS(VERSATILE_VIC_BASE)
-		ldr	\irqstat, [\base, #VIC_IRQ_STATUS]	@ get masked status
-		mov	\irqnr, #0
-		teq	\irqstat, #0
-		beq	1003f
-
-1001:		tst	\irqstat, #15
-		bne	1002f
-		add	\irqnr, \irqnr, #4
-		movs	\irqstat, \irqstat, lsr #4
-		bne	1001b
-1002:		tst	\irqstat, #1
-		bne	1003f
-		add	\irqnr, \irqnr, #1
-		movs	\irqstat, \irqstat, lsr #1
-		bne	1002b
-1003:		/* EQ will be set if no irqs pending */
-
-@		clz	\irqnr, \irqstat
-@1003:		/* EQ will be set if we reach MAXIRQNUM */
-		.endm
-
-		.macro	irq_prio_table
-		.endm
-
-#elif defined(CONFIG_ARCH_CLPS711X)
-
-#include <asm/hardware/clps7111.h>
-
-		.macro	disable_fiq
-		.endm
-
-#if (INTSR2 - INTSR1) != (INTMR2 - INTMR1)
-#error INTSR stride != INTMR stride
-#endif
-
-		.macro	get_irqnr_and_base, irqnr, stat, base, mask
-		mov	\base, #CLPS7111_BASE
-		ldr	\stat, [\base, #INTSR1]
-		ldr	\mask, [\base, #INTMR1]
-		mov	\irqnr, #4
-		mov	\mask, \mask, lsl #16
-		and	\stat, \stat, \mask, lsr #16
-		movs	\stat, \stat, lsr #4
-		bne	1001f
-
-		add	\base, \base, #INTSR2 - INTSR1
-		ldr	\stat, [\base, #INTSR1]
-		ldr	\mask, [\base, #INTMR1]
-		mov	\irqnr, #16
-		mov	\mask, \mask, lsl #16
-		and	\stat, \stat, \mask, lsr #16
-
-1001:		tst	\stat, #255
-		addeq	\irqnr, \irqnr, #8
-		moveq	\stat, \stat, lsr #8
-		tst	\stat, #15
-		addeq	\irqnr, \irqnr, #4
-		moveq	\stat, \stat, lsr #4
-		tst	\stat, #3
-		addeq	\irqnr, \irqnr, #2
-		moveq	\stat, \stat, lsr #2
-		tst	\stat, #1
-		addeq	\irqnr, \irqnr, #1
-		moveq	\stat, \stat, lsr #1
-		tst	\stat, #1			@ bit 0 should be set
-		.endm
-
-		.macro	irq_prio_table
-		.endm
-	
-#elif defined (CONFIG_ARCH_CAMELOT)
-#include <asm/arch/platform.h>
-#undef IRQ_MODE /* same name defined in asm/proc/ptrace.h */
-#include <asm/arch/int_ctrl00.h>
-	
-		.macro	disable_fiq
-		.endm
-
-		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
-	
-		ldr	\irqstat, =INT_ID(IO_ADDRESS(EXC_INT_CTRL00_BASE))
-		ldr	\irqnr,[\irqstat]		
-		cmp	\irqnr,#0
-		subne	\irqnr,\irqnr,#1
-
-	
-		.endm
-
-		.macro	irq_prio_table
-		.endm
-
-#elif defined(CONFIG_ARCH_IOP321)
-		.macro  disable_fiq
-		.endm
-
-		/*
-		 * Note: only deal with normal interrupts, not FIQ
-		 */
-		.macro  get_irqnr_and_base, irqnr, irqstat, base, tmp
-		mov     \irqnr, #0
-		mrc     p6, 0, \irqstat, c8, c0, 0      @ Read IINTSRC
-		cmp     \irqstat, #0
-		beq     1001f
-		clz     \irqnr, \irqstat
-		mov     \base, #31
-		subs    \irqnr,\base,\irqnr
-		add     \irqnr,\irqnr,#IRQ_IOP321_DMA0_EOT
-1001:
-		.endm
-
-		.macro  irq_prio_table
-		.endm
-
-#elif defined(CONFIG_ARCH_IOP331)
-		.macro  disable_fiq
-		.endm
-
-		/*
-		 * Note: only deal with normal interrupts, not FIQ
-		 */
-		.macro  get_irqnr_and_base, irqnr, irqstat, base, tmp
-		mov     \irqnr, #0
-		mrc     p6, 0, \irqstat, c4, c0, 0      @ Read IINTSRC0
-		cmp     \irqstat, #0
-		bne     1002f
-		mrc     p6, 0, \irqstat, c5, c0, 0      @ Read IINTSRC1
-		cmp	\irqstat, #0
-		beq	1001f
-		clz	\irqnr, \irqstat
-/*
- *		mov	\base, #31
- *		subs	\irqnr,\base,\irqnr
- */
-        rsbs    \irqnr,\irqnr,#31   @ recommend by RMK
-		add	\irqnr,\irqnr,#IRQ_IOP331_XINT8
-		b	1001f
-1002:		clz     \irqnr, \irqstat
-		mov     \base, #31
-		subs    \irqnr,\base,\irqnr
-		add     \irqnr,\irqnr,#IRQ_IOP331_DMA0_EOT
-1001:
-		.endm
-
-		.macro  irq_prio_table
-		.endm
-
-#elif defined(CONFIG_ARCH_PXA)
-
-		.macro	disable_fiq
-		.endm
-
-		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
-#ifdef CONFIG_PXA27x
-		mrc	p6, 0, \irqstat, c0, c0, 0		@ ICIP
-		mrc	p6, 0, \irqnr, c1, c0, 0		@ ICMR
-#else
-		mov	\base, #io_p2v(0x40000000)	@ IIR Ctl = 0x40d00000
-		add	\base, \base, #0x00d00000
-		ldr	\irqstat, [\base, #0]		@ ICIP
-		ldr	\irqnr, [\base, #4]		@ ICMR
-#endif
-		ands	\irqnr, \irqstat, \irqnr
-		beq	1001f
-		rsb	\irqstat, \irqnr, #0
-		and	\irqstat, \irqstat, \irqnr
-		clz	\irqnr, \irqstat
-		rsb	\irqnr, \irqnr, #(31 - PXA_IRQ_SKIP)
-1001:
-		.endm
-
-		.macro	irq_prio_table
-		.endm
-
-#elif defined(CONFIG_ARCH_IXP2000)
-
-		.macro  disable_fiq
-		.endm
-
-		.macro  get_irqnr_and_base, irqnr, irqstat, base, tmp
-		
-		mov	\irqnr, #0x0              @clear out irqnr as default
-                mov	\base, #0xfe000000        
-		orr	\base, \base, #0x00ff0000
-		orr	\base, \base, #0x0000a000
-		orr	\base, \base, #0x08
-		ldr	\irqstat, [\base]         @ get interrupts 
-		mov	\tmp, #IXP2000_VALID_IRQ_MASK & 0xff000000
-		orr	\tmp, \tmp, #IXP2000_VALID_IRQ_MASK & 0x00ff0000
-		orr	\tmp, \tmp, #IXP2000_VALID_IRQ_MASK & 0x0000ff00
-		orr	\tmp, \tmp, #IXP2000_VALID_IRQ_MASK & 0x000000ff
-		and	\irqstat, \irqstat, \tmp
-
-		cmp	\irqstat, #0
-		beq	1001f	
-
-		clz     \irqnr, \irqstat
-		mov     \base, #31
-		subs    \irqnr, \base, \irqnr
-		
-		/*
-		 * We handle PCIA and PCIB here so we don't have an
-		 * extra layer of code just to check these two bits.
-		 */
-		cmp	\irqnr, #IRQ_IXP2000_PCI
-		bne	1001f
-
-		mov	\base, #0xfe000000
-		orr	\base, \base, #0x00fd0000
-		orr	\base, \base, #0x0000e100
-		orr	\base, \base, #0x00000058
-		ldr	\irqstat, [\base]
-
-		mov	\tmp, #(1<<26)
-		tst	\irqstat, \tmp
-		movne	\irqnr, #IRQ_IXP2000_PCIA
-		bne	1001f
-
-		mov	\tmp, #(1<<27)
-		tst	\irqstat, \tmp
-		movne	\irqnr, #IRQ_IXP2000_PCIB
-
-1001:
-		.endm 
-		
-		.macro  irq_prio_table
-		.endm
-
-#elif defined (CONFIG_ARCH_IXP4XX)
-
-		.macro	disable_fiq
-		.endm
-		
-		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
-		ldr	\irqstat, =(IXP4XX_INTC_BASE_VIRT+IXP4XX_ICIP_OFFSET)
-		ldr	\irqstat, [\irqstat]		@ get interrupts
-		cmp	\irqstat, #0
-		beq	1002f
-		clz     \irqnr, \irqstat
-		mov     \base, #31
-		subs    \irqnr, \base, \irqnr
-		
-/*
-1001:		tst	\irqstat, #1
-		addeq	\irqnr, \irqnr, #1
-		moveq	\irqstat, \irqstat, lsr #1
-		tsteq	\irqnr, #32
-		beq	1001b
-		teq	\irqnr, #32
-*/
-1002:
-		.endm
-
-                .macro  irq_prio_table
-                .endm
-
-#elif defined(CONFIG_ARCH_OMAP)
-
-		.macro	disable_fiq
-		.endm
-
-		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
-		ldr	\base, =IO_ADDRESS(OMAP_IH1_BASE)
-		ldr	\irqnr, [\base, #IRQ_ITR_REG_OFFSET]
-		ldr	\tmp, [\base, #IRQ_MIR_REG_OFFSET]
-		mov	\irqstat, #0xffffffff
-		bic	\tmp, \irqstat, \tmp
-		tst	\irqnr, \tmp
-		beq	1510f
-
-		ldr	\irqnr, [\base, #IRQ_SIR_FIQ_REG_OFFSET]
-		cmp	\irqnr, #0
-		ldreq	\irqnr, [\base, #IRQ_SIR_IRQ_REG_OFFSET]
-		cmpeq	\irqnr, #INT_IH2_IRQ
-		ldreq	\base, =IO_ADDRESS(OMAP_IH2_BASE)
-		ldreq	\irqnr, [\base, #IRQ_SIR_IRQ_REG_OFFSET]
-		addeqs	\irqnr, \irqnr, #32
-1510:
-		.endm
-
-		.macro	irq_prio_table
-		.endm
-
-#elif defined(CONFIG_ARCH_S3C2410)
-		/* S3C2410X IRQ Handler, <ben@simtec.co.uk> */
-
-		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
-
-30000:
-		mov	\tmp, #S3C2410_VA_IRQ
-		ldr	\irqnr, [ \tmp, #0x14 ]		@ get irq no
-		teq	\irqnr, #4
-		teqne	\irqnr, #5
-		beq	1002f				@ external irq reg
-		teq	\irqnr, #16
-		beq	1003f				@ lcd controller
-
-		@ debug check to see if interrupt reported is the same
-		@ as the offset....
-
-		teq	\irqnr, #0
-		beq	20002f
-		ldr	\irqstat, [ \tmp, #0x10 ]	@ INTPND
-		mov	\irqstat, \irqstat, lsr \irqnr
-		tst	\irqstat, #1
-		bne	20002f
-
-#if 1
-		stmfd	r13!, { r0 - r4 , r14 }
-		ldr	r1,	[ \tmp, #0x14 ]		@ intoffset
-		ldr	r2,	[ \tmp, #0x10 ]		@ INTPND
-		ldr	r3,	[ \tmp, #0x00 ]		@ SRCPND
-		adr	r0, 20003f
-		bl	printk
-		b	20004f
-#endif
-20003:
-		.ascii	"<7>irq: err - bad offset %d, intpnd=%08x, srcpnd=%08x\n"
-		.byte	0
-		.align	4
-20004:
-		mov	r1, #1
-		mov	\tmp, #S3C2410_VA_IRQ
-		ldmfd	r13!, { r0 - r4 , r14 }
-
-		@ try working out interript number for ourselves
-		mov	\irqnr, #0
-		ldr	\irqstat, [ \tmp, #0x10 ]	@ INTPND
-10021:
-		movs	\irqstat, \irqstat, lsr#1
-		bcs	30000b		@ try and re-start the proccess
-		add	\irqnr, \irqnr, #1
-		cmp	\irqnr, #32
-		ble	10021b
-
-		@ found no interrupt, set Z flag and leave
-		movs	\irqnr, #0
-		b	1001f
-
-20005:
-20002:		@ exit
-		@ we base the s3c2410x interrupts at 16 and above to allow
-		@ isa peripherals to have their standard interrupts, also
-		@ ensure that Z flag is un-set on exit
-
-		@ note, we cannot be sure if we get IRQ_EINT0 (0) that
-		@ there is simply no interrupt pending, so in all other
-		@ cases we jump to say we have found something, otherwise
-		@ we check to see if the interrupt really is assrted
-		adds	\irqnr, \irqnr, #IRQ_EINT0
-		teq	\irqnr, #IRQ_EINT0
-		bne	1001f				@ exit
-		ldr	\irqstat, [ \tmp, #0x10 ]	@ INTPND
-		teq	\irqstat, #0
-		moveq	\irqnr, #0
-		b	1001f
-
-		@ we get here from no main or external interrupts pending
-1002:
-		add	\tmp, \tmp, #S3C2410_VA_GPIO - S3C2410_VA_IRQ
-		ldr	\irqstat, [ \tmp, # 0xa8 ]	@ EXTINTPEND
-		ldr	\irqnr, [ \tmp, # 0xa4 ]	@ EXTINTMASK
-
-		bic	\irqstat, \irqstat, \irqnr	@ clear masked irqs
-
-		mov	\irqnr, #IRQ_EINT4		@ start extint nos
-		mov	\irqstat, \irqstat, lsr#4	@ ignore bottom 4 bits
-10021:
-		movs	\irqstat, \irqstat, lsr#1
-		bcs	1004f
-		add	\irqnr, \irqnr, #1
-		cmp	\irqnr, #IRQ_EINT23
-		ble	10021b
-
-		@ found no interrupt, set Z flag and leave
-		movs	\irqnr, #0
-		b	1001f
-
-1003:
-		@ lcd interrupt has been asserted...
-		add	\tmp, \tmp, #S3C2410_VA_LCD - S3C2410_VA_IRQ
-		ldr	\irqstat, [ \tmp, # 0x54 ]	@ lcd int pending
-
-		tst	\irqstat, #2
-		movne	\irqnr, #IRQ_LCD_FRAME
-		tst	\irqstat, #1
-		movne	\irqnr, #IRQ_LCD_FIFO
-
-		@ fall through to exit with flags updated
-
-1004:		@ ensure Z flag clear in case our MOVS shifted out the last bit
-		teq	\irqnr, #0
-1001:
-		@ exit irq routine
-		.endm
-
-
-		/* currently don't need an disable_fiq macro */
-
-		.macro	disable_fiq
-		.endm
-
-		/* we don't have an irq priority table */
-		.macro irq_prio_table
-		.endm
-
-#elif defined(CONFIG_ARCH_LH7A400)
-
-# if defined (CONFIG_ARCH_LH7A404)
-#  error "LH7A400 and LH7A404 are mutually exclusive"
-# endif
-		.macro	disable_fiq
-		.endm
-
-		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
-		mov	\irqnr, #0
-		mov	\base, #io_p2v(0x80000000)	@ APB registers
-		ldr	\irqstat, [\base, #0x500]	@ PIC INTSR
-
-1001:		movs	\irqstat, \irqstat, lsr #1	@ Shift into carry
-		bcs	1008f				@ Bit set; irq found
-		add	\irqnr, \irqnr, #1
-		bne	1001b				@ Until no bits
-		b	1009f				@ Nothing?  Hmm.
-1008:		movs	\irqstat, #1			@ Force !Z
-1009:
-               .endm
-
-               .macro  irq_prio_table
-               .endm
-
-#elif defined(CONFIG_ARCH_LH7A404)
-
-		.macro	disable_fiq
-		.endm
-
-		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
-		mov	\irqnr, #0			@ VIC1 irq base
-		mov	\base, #io_p2v(0x80000000)	@ APB registers
-		add	\base, \base, #0x8000
-		ldr	\tmp, [\base, #0x0030]		@ VIC1_VECTADDR
-		tst	\tmp, #VA_VECTORED		@ Direct vectored
-		bne	1002f
-		tst	\tmp, #VA_VIC1DEFAULT		@ Default vectored VIC1
-		ldrne	\irqstat, [\base, #0]		@ VIC1_IRQSTATUS
-		bne	1001f
-		add	\base, \base, #(0xa000 - 0x8000)
-		ldr	\tmp, [\base, #0x0030]		@ VIC2_VECTADDR
-		tst	\tmp, #VA_VECTORED		@ Direct vectored
-		bne	1002f
-		ldr	\irqstat, [\base, #0]		@ VIC2_IRQSTATUS
-		mov	\irqnr, #32			@ VIC2 irq base
-
-1001:		movs	\irqstat, \irqstat, lsr #1	@ Shift into carry
-		bcs	1008f				@ Bit set; irq found
-		add	\irqnr, \irqnr, #1
-		bne	1001b				@ Until no bits
-		b	1009f				@ Nothing?  Hmm.
-1002:		and	\irqnr, \tmp, #0x3f		@ Mask for valid bits
-1008:		movs	\irqstat, #1			@ Force !Z
-		str	\tmp, [\base, #0x0030]		@ Clear vector
-1009:
-               .endm
-
-               .macro  irq_prio_table
-               .endm
-
-#elif defined(CONFIG_ARCH_IMX)
-
-		.macro	disable_fiq
-		.endm
-#define AITC_NIVECSR   0x40
-		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
-		ldr	\irqstat, =IO_ADDRESS(IMX_AITC_BASE)
-		@ Load offset & priority of the highest priority
-		@ interrupt pending.
-		ldr	\irqnr, [\irqstat, #AITC_NIVECSR]
-		@ Shift off the priority leaving the offset or
-		@ "interrupt number"
-		mov	\irqnr, \irqnr, lsr #16
- 		ldr	\irqstat, =1	@ dummy compare
-		ldr	\base, =0xFFFF		// invalid interrupt
-		cmp	\irqnr, \base
-		bne	1001f
-		ldr	\irqstat, =0
-1001:
-		tst	\irqstat, #1	@ to make the condition code = TRUE
-		.endm
-
-		.macro	irq_prio_table
-		.endm
-
-#elif defined(CONFIG_ARCH_H720X)
-
-		.macro  disable_fiq
-		.endm
-
-		.macro  get_irqnr_and_base, irqnr, irqstat, base, tmp
-#if defined (CONFIG_CPU_H7201) || defined (CONFIG_CPU_H7202)
-		@ we could use the id register on H7202, but this is not
-		@ properly updated when we come back from asm_do_irq
-		@ without a previous return from interrupt
-		@ (see loops below in irq_svc, irq_usr)
-		@ We see unmasked pending ints only, as the masked pending ints
-		@ are not visible here
-
-		mov     \base, #0xf0000000	       @ base register
-		orr     \base, \base, #0x24000	       @ irqbase
-		ldr     \irqstat, [\base, #0x04]        @ get interrupt status
-#if defined (CONFIG_CPU_H7201)
-		ldr	\tmp, =0x001fffff
-#else
-		mvn     \tmp, #0xc0000000
-#endif
-		and     \irqstat, \irqstat, \tmp        @ mask out unused ints
-		mov     \irqnr, #0
-
-		mov     \tmp, #0xff00
-		orr     \tmp, \tmp, #0xff
-		tst     \irqstat, \tmp
-		addeq   \irqnr, \irqnr, #16
-		moveq   \irqstat, \irqstat, lsr #16
-		tst     \irqstat, #255
-		addeq   \irqnr, \irqnr, #8
-		moveq   \irqstat, \irqstat, lsr #8
-		tst     \irqstat, #15
-		addeq   \irqnr, \irqnr, #4
-		moveq   \irqstat, \irqstat, lsr #4
-		tst     \irqstat, #3
-		addeq   \irqnr, \irqnr, #2
-		moveq   \irqstat, \irqstat, lsr #2
-		tst     \irqstat, #1
-		addeq   \irqnr, \irqnr, #1
-		moveq   \irqstat, \irqstat, lsr #1
-		tst     \irqstat, #1		       @ bit 0 should be set
-		.endm
-
-		.macro  irq_prio_table
-		.endm
-
-#else
-#error hynix processor selection missmatch
-#endif
-#else
-#error Unknown architecture
-#endif
-
 /*
  * Invalid mode handlers
  */
@@ -1195,8 +201,6 @@
 #ifdef CONFIG_PREEMPT
 .LCirq_stat:	.word	irq_stat
 #endif
-
-		irq_prio_table
 
 /*
  * User mode handlers
diff -Nru a/arch/arm/kernel/entry-header.S b/arch/arm/kernel/entry-header.S
--- a/arch/arm/kernel/entry-header.S	2005-01-10 20:11:18 -08:00
+++ b/arch/arm/kernel/entry-header.S	2005-01-10 20:11:18 -08:00
@@ -6,6 +6,7 @@
 #include <asm/errno.h>
 #include <asm/hardware.h>
 #include <asm/arch/irqs.h>
+#include <asm/arch/entry-macro.S>
 
 #ifndef MODE_SVC
 #define MODE_SVC 0x13
diff -Nru a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
--- a/arch/arm/kernel/head.S	2005-01-10 20:11:15 -08:00
+++ b/arch/arm/kernel/head.S	2005-01-10 20:11:15 -08:00
@@ -14,10 +14,19 @@
 #include <linux/init.h>
 
 #include <asm/assembler.h>
+#include <asm/domain.h>
 #include <asm/mach-types.h>
 #include <asm/procinfo.h>
 #include <asm/ptrace.h>
 #include <asm/constants.h>
+#include <asm/system.h>
+
+#define PROCINFO_MMUFLAGS	8
+#define PROCINFO_INITFUNC	12
+
+#define MACHINFO_PHYSRAM	4
+#define MACHINFO_PHYSIO		8
+#define MACHINFO_PGOFFIO	12
 
 #ifndef CONFIG_XIP_KERNEL
 /*
@@ -86,17 +95,16 @@
  * circumstances, zImage) is for.
  */
 	__INIT
-	.type	stext, #function
+	.type	stext, %function
 ENTRY(stext)
-	mov	r12, r0
-	mov	r0, #PSR_F_BIT | PSR_I_BIT | MODE_SVC	@ make sure svc mode
-	msr	cpsr_c, r0			@ and all irqs disabled
-	bl	__lookup_processor_type
-	teq	r10, #0				@ invalid processor?
+	msr	cpsr_c, #PSR_F_BIT | PSR_I_BIT | MODE_SVC @ ensure svc mode
+						@ and irqs disabled
+	bl	__lookup_processor_type		@ r5=procinfo r9=cpuid
+	movs	r10, r5				@ invalid processor (r5=0)?
 	moveq	r0, #'p'			@ yes, error 'p'
 	beq	__error
-	bl	__lookup_architecture_type
-	teq	r7, #0				@ invalid architecture?
+	bl	__lookup_machine_type		@ r5=machinfo
+	movs	r8, r5				@ invalid machine (r5=0)?
 	moveq	r0, #'a'			@ yes, error 'a'
 	beq	__error
 	bl	__create_page_tables
@@ -104,89 +112,128 @@
 	/*
 	 * The following calls CPU specific code in a position independent
 	 * manner.  See arch/arm/mm/proc-*.S for details.  r10 = base of
-	 * xxx_proc_info structure selected by __lookup_architecture_type
+	 * xxx_proc_info structure selected by __lookup_machine_type
 	 * above.  On return, the CPU will be ready for the MMU to be
 	 * turned on, and r0 will hold the CPU control register value.
 	 */
-	adr	lr, __turn_mmu_on		@ return (PIC) address
-	add	pc, r10, #12
+	ldr	r13, __switch_data		@ address to jump to after
+						@ mmu has been enabled
+	adr	lr, __enable_mmu		@ return (PIC) address
+	add	pc, r10, #PROCINFO_INITFUNC
 
 	.type	__switch_data, %object
 __switch_data:
 	.long	__mmap_switched
-	.long	__data_loc			@ r2
-	.long	__data_start			@ r3
-	.long	__bss_start			@ r4
-	.long	_end				@ r5
-	.long	processor_id			@ r6
-	.long	__machine_arch_type		@ r7
-	.long	cr_alignment			@ r8
+	.long	__data_loc			@ r4
+	.long	__data_start			@ r5
+	.long	__bss_start			@ r6
+	.long	_end				@ r7
+	.long	processor_id			@ r4
+	.long	__machine_arch_type		@ r5
+	.long	cr_alignment			@ r6
 	.long	init_thread_union+8192		@ sp
 
 /*
- * Enable the MMU.  This completely changes the structure of the visible
- * memory space.  You will not be able to trace execution through this.
- * If you have an enquiry about this, *please* check the linux-arm-kernel
- * mailing list archives BEFORE sending another post to the list.
- */
-	.align	5
-	.type	__turn_mmu_on, %function
-__turn_mmu_on:
-	ldr	lr, __switch_data
-#ifdef CONFIG_ALIGNMENT_TRAP
-	orr	r0, r0, #2			@ ...........A.
-#endif
-	mcr	p15, 0, r0, c1, c0, 0		@ write control reg
-	mrc	p15, 0, r3, c0, c0, 0		@ read id reg
-	mov	r3, r3
-	mov	r3, r3
-	mov	pc, lr
-
-/*
  * The following fragment of code is executed with the MMU on, and uses
  * absolute addresses; this is not position independent.
  *
- *  r0  = processor control register
+ *  r0  = cp#15 control register
  *  r1  = machine ID
  *  r9  = processor ID
- *  r12 = value of r0 when kernel was called (currently always zero)
  */
-	.align	5
+	.type	__mmap_switched, %function
 __mmap_switched:
-	adr	r2, __switch_data + 4
-	ldmia	r2, {r2, r3, r4, r5, r6, r7, r8, sp}
+	adr	r3, __switch_data + 4
 
-	cmp	r2, r3				@ Copy data segment if needed
-1:	cmpne	r3, r4
-	ldrne	fp, [r2], #4
-	strne	fp, [r3], #4
+	ldmia	r3!, {r4, r5, r6, r7}
+	cmp	r4, r5				@ Copy data segment if needed
+1:	cmpne	r5, r6
+	ldrne	fp, [r4], #4
+	strne	fp, [r5], #4
 	bne	1b
 
 	mov	fp, #0				@ Clear BSS (and zero fp)
-1:	cmp	r4, r5
-	strcc	fp, [r4],#4
+1:	cmp	r6, r7
+	strcc	fp, [r6],#4
 	bcc	1b
 
-	str	r9, [r6]			@ Save processor ID
-	str	r1, [r7]			@ Save machine type
-	bic	r2, r0, #2			@ Clear 'A' bit
-	stmia	r8, {r0, r2}			@ Save control register values
+	ldmia	r3, {r4, r5, r6, sp}
+	str	r9, [r4]			@ Save processor ID
+	str	r1, [r5]			@ Save machine type
+	bic	r4, r0, #CR_A			@ Clear 'A' bit
+	stmia	r6, {r0, r4}			@ Save control register values
 	b	start_kernel
 
 
 
+/*
+ * Setup common bits before finally enabling the MMU.  Essentially
+ * this is just loading the page table pointer and domain access
+ * registers.
+ */
+	.type	__enable_mmu, %function
+__enable_mmu:
+#ifdef CONFIG_ALIGNMENT_TRAP
+	orr	r0, r0, #CR_A
+#else
+	bic	r0, r0, #CR_A
+#endif
+#ifdef CONFIG_CPU_DCACHE_DISABLE
+	bic	r0, r0, #CR_C
+#endif
+#ifdef CONFIG_CPU_BPREDICT_DISABLE
+	bic	r0, r0, #CR_Z
+#endif
+#ifdef CONFIG_CPU_ICACHE_DISABLE
+	bic	r0, r0, #CR_I
+#endif
+	mov	r5, #(domain_val(DOMAIN_USER, DOMAIN_MANAGER) | \
+		      domain_val(DOMAIN_KERNEL, DOMAIN_MANAGER) | \
+		      domain_val(DOMAIN_TABLE, DOMAIN_MANAGER) | \
+		      domain_val(DOMAIN_IO, DOMAIN_CLIENT))
+	mcr	p15, 0, r5, c3, c0, 0		@ load domain access register
+	mcr	p15, 0, r4, c2, c0, 0		@ load page table pointer
+	b	__turn_mmu_on
+
+/*
+ * Enable the MMU.  This completely changes the structure of the visible
+ * memory space.  You will not be able to trace execution through this.
+ * If you have an enquiry about this, *please* check the linux-arm-kernel
+ * mailing list archives BEFORE sending another post to the list.
+ *
+ *  r0  = cp#15 control register
+ *  r13 = *virtual* address to jump to upon completion
+ *
+ * other registers depend on the function called upon completion
+ */
+	.align	5
+	.type	__turn_mmu_on, %function
+__turn_mmu_on:
+	mov	r0, r0
+	mcr	p15, 0, r0, c1, c0, 0		@ write control reg
+	mrc	p15, 0, r3, c0, c0, 0		@ read id reg
+	mov	r3, r3
+	mov	r3, r3
+	mov	pc, r13
+
+
 
 /*
  * Setup the initial page tables.  We only setup the barest
  * amount which are required to get the kernel running, which
  * generally means mapping in the kernel code.
  *
- * r5 = physical address of start of RAM
- * r6 = physical IO address
- * r7 = byte offset into page tables for IO
- * r8 = page table flags
+ * r8  = machinfo
+ * r9  = cpuid
+ * r10 = procinfo
+ *
+ * Returns:
+ *  r0, r3, r5, r6, r7 corrupted
+ *  r4 = physical page table address
  */
+	.type	__create_page_tables, %function
 __create_page_tables:
+	ldr	r5, [r8, #MACHINFO_PHYSRAM]	@ physram
 	pgtbl	r4, r5				@ page table address
 
 	/*
@@ -194,23 +241,25 @@
 	 */
 	mov	r0, r4
 	mov	r3, #0
-	add	r2, r0, #0x4000
+	add	r6, r0, #0x4000
 1:	str	r3, [r0], #4
 	str	r3, [r0], #4
 	str	r3, [r0], #4
 	str	r3, [r0], #4
-	teq	r0, r2
+	teq	r0, r6
 	bne	1b
 
+	ldr	r7, [r10, #PROCINFO_MMUFLAGS]	@ mmuflags
+
 	/*
 	 * Create identity mapping for first MB of kernel to
 	 * cater for the MMU enable.  This identity mapping
 	 * will be removed by paging_init().  We use our current program
 	 * counter to determine corresponding section base address.
 	 */
-	mov	r2, pc, lsr #20			@ start of kernel section
-	add	r3, r8, r2, lsl #20		@ flags + kernel base
-	str	r3, [r4, r2, lsl #2]		@ identity mapping
+	mov	r6, pc, lsr #20			@ start of kernel section
+	orr	r3, r7, r6, lsl #20		@ flags + kernel base
+	str	r3, [r4, r6, lsl #2]		@ identity mapping
 
 	/*
 	 * Now setup the pagetables for our kernel direct
@@ -231,8 +280,8 @@
 	 * Then map first 1MB of ram in case it contains our boot params.
 	 */
 	add	r0, r4, #VIRT_OFFSET >> 18
-	add	r2, r5, r8
-	str	r2, [r0]
+	orr	r6, r5, r7
+	str	r6, [r0]
 
 #ifdef CONFIG_XIP_KERNEL
 	/*
@@ -242,15 +291,15 @@
 	sub	r3, r4, r5
 	mov	r3, r3, lsr #20
 	add	r0, r0, r3, lsl #2
-	add	r2, r2, r3, lsl #20
-	str	r2, [r0], #4
-	add	r2, r2, #(1 << 20)
-	str	r2, [r0], #4
-	add	r2, r2, #(1 << 20)
-	str	r2, [r0]
+	add	r6, r6, r3, lsl #20
+	str	r6, [r0], #4
+	add	r6, r6, #(1 << 20)
+	str	r6, [r0], #4
+	add	r6, r6, #(1 << 20)
+	str	r6, [r0]
 #endif
 
-	bic	r8, r8, #0x0c			@ turn off cacheable
+	bic	r7, r7, #0x0c			@ turn off cacheable
 						@ and bufferable bits
 #ifdef CONFIG_DEBUG_LL
 	/*
@@ -258,15 +307,17 @@
 	 * This allows debug messages to be output
 	 * via a serial console before paging_init.
 	 */
-	add	r0, r4, r7
-	rsb	r3, r7, #0x4000			@ PTRS_PER_PGD*sizeof(long)
-	cmp	r3, #0x0800
-	addge	r2, r0, #0x0800
-	addlt	r2, r0, r3
-	orr	r3, r6, r8
+	ldr	r3, [r8, #MACHINFO_PGOFFIO]
+	add	r0, r4, r3
+	rsb	r3, r3, #0x4000			@ PTRS_PER_PGD*sizeof(long)
+	cmp	r3, #0x0800			@ limit to 512MB
+	movhi	r3, #0x0800
+	add	r6, r0, r3
+	ldr	r3, [r8, #MACHINFO_PHYSIO]
+	orr	r3, r3, r7
 1:	str	r3, [r0], #4
 	add	r3, r3, #1 << 20
-	teq	r0, r2
+	teq	r0, r6
 	bne	1b
 #if defined(CONFIG_ARCH_NETWINDER) || defined(CONFIG_ARCH_CATS)
 	/*
@@ -278,7 +329,7 @@
 	bne	1f
 	add	r0, r4, #0x3fc0			@ ff000000
 	mov	r3, #0x7c000000
-	orr	r3, r3, r8
+	orr	r3, r3, r7
 	str	r3, [r0], #4
 	add	r3, r3, #1 << 20
 	str	r3, [r0], #4
@@ -293,7 +344,7 @@
 	 */
 	add	r0, r4, #0x80			@ 02000000
 	mov	r3, #0x02000000
-	orr	r3, r3, r8
+	orr	r3, r3, r7
 	str	r3, [r0]
 	add	r0, r4, #0x3600			@ d8000000
 	str	r3, [r0]
@@ -315,6 +366,7 @@
  *
  * Generally, only serious errors cause this.
  */
+	.type	__error, %function
 __error:
 #ifdef CONFIG_DEBUG_LL
 	mov	r8, r0				@ preserve r0
@@ -340,6 +392,7 @@
 	b	1b
 
 #ifdef CONFIG_DEBUG_LL
+	.type	err_str, %object
 err_str:
 	.asciz	"\nError: "
 	.align
@@ -353,35 +406,35 @@
  * calculate the offset.
  *
  * Returns:
- *	r5, r6, r7 corrupted
- *	r8  = page table flags
- *	r9  = processor ID
- *	r10 = pointer to processor structure
+ *	r3, r6 corrupted
+ *	r5 = proc_info pointer in physical address space
+ *	r9 = cpuid
  */
+	.type	__lookup_processor_type, %function
 __lookup_processor_type:
-	adr	r5, 2f
-	ldmia	r5, {r7, r9, r10}
-	sub	r5, r5, r10			@ convert addresses
-	add	r7, r7, r5			@ to our address space
-	add	r10, r9, r5
+	adr	r3, 3f
+	ldmda	r3, {r5, r6, r9}
+	sub	r3, r3, r9			@ get offset between virt&phys
+	add	r5, r5, r3			@ convert virt addresses to
+	add	r6, r6, r3			@ physical address space
 	mrc	p15, 0, r9, c0, c0		@ get processor id
-1:	ldmia	r10, {r5, r6, r8}		@ value, mask, mmuflags
-	and	r6, r6, r9			@ mask wanted bits
-	teq	r5, r6
-	moveq	pc, lr
-	add	r10, r10, #PROC_INFO_SZ		@ sizeof(proc_info_list)
-	cmp	r10, r7
+1:	ldmia	r5, {r3, r10}			@ value, mask
+	and	r10, r10, r9			@ mask wanted bits
+	teq	r3, r10
+	beq	2f
+	add	r5, r5, #PROC_INFO_SZ		@ sizeof(proc_info_list)
+	cmp	r5, r6
 	blt	1b
-	mov	r10, #0				@ unknown processor
-	mov	pc, lr
+	mov	r5, #0				@ unknown processor
+2:	mov	pc, lr
 
 /*
  * Look in include/asm-arm/procinfo.h and arch/arm/kernel/arch.[ch] for
  * more information about the __proc_info and __arch_info structures.
  */
-2:	.long	__proc_info_end
 	.long	__proc_info_begin
-	.long	2b
+	.long	__proc_info_end
+3:	.long	.
 	.long	__arch_info_begin
 	.long	__arch_info_end
 
@@ -393,24 +446,21 @@
  *
  *  r1 = machine architecture number
  * Returns:
- *  r2, r3, r4 corrupted
- *  r5 = physical start address of RAM
- *  r6 = physical address of IO
- *  r7 = byte offset into page tables for IO
- */
-__lookup_architecture_type:
-	adr	r4, 2b
-	ldmia	r4, {r2, r3, r5, r6, r7}	@ throw away r2, r3
-	sub	r5, r4, r5			@ convert addresses
-	add	r4, r6, r5			@ to our address space
-	add	r7, r7, r5
-1:	ldr	r5, [r4]			@ get machine type
-	teq	r5, r1				@ matches loader number?
+ *  r3, r4, r6 corrupted
+ *  r5 = mach_info pointer in physical address space
+ */
+	.type	__lookup_machine_type, %function
+__lookup_machine_type:
+	adr	r3, 3b
+	ldmia	r3, {r4, r5, r6}
+	sub	r3, r3, r4			@ get offset between virt&phys
+	add	r5, r5, r3			@ convert virt addresses to
+	add	r6, r6, r3			@ physical address space
+1:	ldr	r3, [r5]			@ get machine type
+	teq	r3, r1				@ matches loader number?
 	beq	2f				@ found
-	add	r4, r4, #SIZEOF_MACHINE_DESC	@ next machine_desc
-	cmp	r4, r7
+	add	r5, r5, #SIZEOF_MACHINE_DESC	@ next machine_desc
+	cmp	r5, r6
 	blt	1b
-	mov	r7, #0				@ unknown architecture
-	mov	pc, lr
-2:	ldmib	r4, {r5, r6, r7}		@ found, get results
-	mov	pc, lr
+	mov	r5, #0				@ unknown machine
+2:	mov	pc, lr
diff -Nru a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
--- a/arch/arm/kernel/setup.c	2005-01-10 20:11:19 -08:00
+++ b/arch/arm/kernel/setup.c	2005-01-10 20:11:19 -08:00
@@ -24,6 +24,7 @@
 #include <linux/cpu.h>
 #include <linux/interrupt.h>
 
+#include <asm/cpu.h>
 #include <asm/elf.h>
 #include <asm/hardware.h>
 #include <asm/io.h>
@@ -108,6 +109,8 @@
 static union { char c[4]; unsigned long l; } endian_test __initdata = { { 'l', '?', '?', 'b' } };
 #define ENDIANNESS ((char)endian_test.l)
 
+DEFINE_PER_CPU(struct cpuinfo_arm, cpu_data);
+
 /*
  * Standard memory resources
  */
@@ -739,11 +742,15 @@
 #endif
 }
 
-static struct cpu cpu[1];
 
 static int __init topology_init(void)
 {
-	return register_cpu(cpu, 0, NULL);
+	int cpu;
+
+	for_each_cpu(cpu)
+		register_cpu(&per_cpu(cpu_data, cpu).cpu, cpu, NULL);
+
+	return 0;
 }
 
 subsys_initcall(topology_init);
@@ -784,9 +791,18 @@
 	seq_printf(m, "Processor\t: %s rev %d (%s)\n",
 		   cpu_name, (int)processor_id & 15, elf_platform);
 
+#if defined(CONFIG_SMP)
+	for_each_online_cpu(i) {
+		seq_printf(m, "Processor\t: %d\n", i);
+		seq_printf(m, "BogoMIPS\t: %lu.%02lu\n\n",
+			   per_cpu(cpu_data, i).loops_per_jiffy / (500000UL/HZ),
+			   (per_cpu(cpu_data, i).loops_per_jiffy / (5000UL/HZ)) % 100);
+	}
+#else /* CONFIG_SMP */
 	seq_printf(m, "BogoMIPS\t: %lu.%02lu\n",
 		   loops_per_jiffy / (500000/HZ),
 		   (loops_per_jiffy / (5000/HZ)) % 100);
+#endif
 
 	/* dump out the processor features */
 	seq_puts(m, "Features\t: ");
diff -Nru a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/arm/kernel/smp.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,406 @@
+/*
+ *  linux/arch/arm/kernel/smp.c
+ *
+ *  Copyright (C) 2002 ARM Limited, 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 version 2 as
+ * published by the Free Software Foundation.
+ */
+#include <linux/config.h>
+#include <linux/delay.h>
+#include <linux/init.h>
+#include <linux/spinlock.h>
+#include <linux/sched.h>
+#include <linux/interrupt.h>
+#include <linux/cache.h>
+#include <linux/profile.h>
+#include <linux/errno.h>
+#include <linux/mm.h>
+#include <linux/seq_file.h>
+
+#include <asm/atomic.h>
+#include <asm/cpu.h>
+#include <asm/processor.h>
+#include <asm/smp.h>
+#include <asm/ptrace.h>
+
+#include <asm/cacheflush.h>
+#include <asm/tlbflush.h>
+
+/*
+ * bitmask of present and online CPUs.
+ * The present bitmask indicates that the CPU is physically present.
+ * The online bitmask indicates that the CPU is up and running.
+ */
+cpumask_t cpu_present_mask;
+cpumask_t cpu_online_map;
+
+/*
+ * structures for inter-processor calls
+ * - A collection of single bit ipi messages.
+ */
+struct ipi_data {
+	spinlock_t lock;
+	unsigned long bits;
+};
+
+static DEFINE_PER_CPU(struct ipi_data, ipi_data) = {
+	.lock	= SPIN_LOCK_UNLOCKED,
+};
+
+enum ipi_msg_type {
+	IPI_TIMER,
+	IPI_RESCHEDULE,
+	IPI_CALL_FUNC,
+	IPI_CPU_STOP,
+};
+
+struct smp_call_struct {
+	void (*func)(void *info);
+	void *info;
+	int wait;
+	cpumask_t pending;
+	cpumask_t unfinished;
+};
+
+static struct smp_call_struct * volatile smp_call_function_data;
+static spinlock_t smp_call_function_lock = SPIN_LOCK_UNLOCKED;
+
+int __init __cpu_up(unsigned int cpu)
+{
+	struct task_struct *idle;
+	int ret;
+
+	/*
+	 * Spawn a new process manually.  Grab a pointer to
+	 * its task struct so we can mess with it
+	 */
+	idle = fork_idle(cpu);
+	if (IS_ERR(idle)) {
+		printk(KERN_ERR "CPU%u: fork() failed\n", cpu);
+		return PTR_ERR(idle);
+	}
+
+	/*
+	 * Now bring the CPU into our world.
+	 */
+	ret = boot_secondary(cpu, idle);
+	if (ret) {
+		printk(KERN_CRIT "cpu_up: processor %d failed to boot\n", cpu);
+		/*
+		 * FIXME: We need to clean up the new idle thread. --rmk
+		 */
+	}
+
+	return ret;
+}
+
+/*
+ * Called by both boot and secondaries to move global data into
+ * per-processor storage.
+ */
+void __init smp_store_cpu_info(unsigned int cpuid)
+{
+	struct cpuinfo_arm *cpu_info = &per_cpu(cpu_data, cpuid);
+
+	cpu_info->loops_per_jiffy = loops_per_jiffy;
+}
+
+void __init smp_cpus_done(unsigned int max_cpus)
+{
+	int cpu;
+	unsigned long bogosum = 0;
+
+	for_each_online_cpu(cpu)
+		bogosum += per_cpu(cpu_data, cpu).loops_per_jiffy;
+
+	printk(KERN_INFO "SMP: Total of %d processors activated "
+	       "(%lu.%02lu BogoMIPS).\n",
+	       num_online_cpus(),
+	       bogosum / (500000/HZ),
+	       (bogosum / (5000/HZ)) % 100);
+}
+
+void __init smp_prepare_boot_cpu(void)
+{
+	unsigned int cpu = smp_processor_id();
+
+	cpu_set(cpu, cpu_present_mask);
+	cpu_set(cpu, cpu_online_map);
+}
+
+static void send_ipi_message(cpumask_t callmap, enum ipi_msg_type msg)
+{
+	unsigned long flags;
+	unsigned int cpu;
+
+	local_irq_save(flags);
+
+	for_each_cpu_mask(cpu, callmap) {
+		struct ipi_data *ipi = &per_cpu(ipi_data, cpu);
+
+		spin_lock(&ipi->lock);
+		ipi->bits |= 1 << msg;
+		spin_unlock(&ipi->lock);
+	}
+
+	/*
+	 * Call the platform specific cross-CPU call function.
+	 */
+	smp_cross_call(callmap);
+
+	local_irq_restore(flags);
+}
+
+/*
+ * You must not call this function with disabled interrupts, from a
+ * hardware interrupt handler, nor from a bottom half handler.
+ */
+int smp_call_function_on_cpu(void (*func)(void *info), void *info, int retry,
+                             int wait, cpumask_t callmap)
+{
+	struct smp_call_struct data;
+	unsigned long timeout;
+	int ret = 0;
+
+	data.func = func;
+	data.info = info;
+	data.wait = wait;
+
+	cpu_clear(smp_processor_id(), callmap);
+	if (cpus_empty(callmap))
+		goto out;
+
+	data.pending = callmap;
+	if (wait)
+		data.unfinished = callmap;
+
+	/*
+	 * try to get the mutex on smp_call_function_data
+	 */
+	spin_lock(&smp_call_function_lock);
+	smp_call_function_data = &data;
+
+	send_ipi_message(callmap, IPI_CALL_FUNC);
+
+	timeout = jiffies + HZ;
+	while (!cpus_empty(data.pending) && time_before(jiffies, timeout))
+		barrier();
+
+	/*
+	 * did we time out?
+	 */
+	if (!cpus_empty(data.pending)) {
+		/*
+		 * this may be causing our panic - report it
+		 */
+		printk(KERN_CRIT
+		       "CPU%u: smp_call_function timeout for %p(%p)\n"
+		       "      callmap %lx pending %lx, %swait\n",
+		       smp_processor_id(), func, info, callmap, data.pending,
+		       wait ? "" : "no ");
+
+		/*
+		 * TRACE
+		 */
+		timeout = jiffies + (5 * HZ);
+		while (!cpus_empty(data.pending) && time_before(jiffies, timeout))
+			barrier();
+
+		if (cpus_empty(data.pending))
+			printk(KERN_CRIT "     RESOLVED\n");
+		else
+			printk(KERN_CRIT "     STILL STUCK\n");
+	}
+
+	/*
+	 * whatever happened, we're done with the data, so release it
+	 */
+	smp_call_function_data = NULL;
+	spin_unlock(&smp_call_function_lock);
+
+	if (!cpus_empty(data.pending)) {
+		ret = -ETIMEDOUT;
+		goto out;
+	}
+
+	if (wait)
+		while (!cpus_empty(data.unfinished))
+			barrier();
+ out:
+
+	return 0;
+}
+
+int smp_call_function(void (*func)(void *info), void *info, int retry,
+                      int wait)
+{
+	return smp_call_function_on_cpu(func, info, retry, wait,
+					cpu_online_map);
+}
+
+void show_ipi_list(struct seq_file *p)
+{
+	int cpu;
+
+	seq_printf(p, "IPI: ");
+
+	for_each_online_cpu(cpu)
+		seq_printf(p, "%10lu ", per_cpu(cpu_data, cpu).ipi_count);
+
+	seq_putc(p, '\n');
+}
+
+static void ipi_timer(struct pt_regs *regs)
+{
+	int user = user_mode(regs);
+
+	irq_enter();
+	profile_tick(CPU_PROFILING, regs);
+	update_process_times(user);
+	irq_exit();
+}
+
+/*
+ * ipi_call_function - handle IPI from smp_call_function()
+ *
+ * Note that we copy data out of the cross-call structure and then
+ * let the caller know that we're here and have done with their data
+ */
+static void ipi_call_function(unsigned int cpu)
+{
+	struct smp_call_struct *data = smp_call_function_data;
+	void (*func)(void *info) = data->func;
+	void *info = data->info;
+	int wait = data->wait;
+
+	cpu_clear(cpu, data->pending);
+
+	func(info);
+
+	if (wait)
+		cpu_clear(cpu, data->unfinished);
+}
+
+static spinlock_t stop_lock = SPIN_LOCK_UNLOCKED;
+
+/*
+ * ipi_cpu_stop - handle IPI from smp_send_stop()
+ */
+static void ipi_cpu_stop(unsigned int cpu)
+{
+	spin_lock(&stop_lock);
+	printk(KERN_CRIT "CPU%u: stopping\n", cpu);
+	dump_stack();
+	spin_unlock(&stop_lock);
+
+	cpu_clear(cpu, cpu_online_map);
+
+	local_fiq_disable();
+	local_irq_disable();
+
+	while (1)
+		cpu_relax();
+}
+
+/*
+ * Main handler for inter-processor interrupts
+ *
+ * For ARM, the ipimask now only identifies a single
+ * category of IPI (Bit 1 IPIs have been replaced by a
+ * different mechanism):
+ *
+ *  Bit 0 - Inter-processor function call
+ */
+void do_IPI(unsigned int ipimask, struct pt_regs *regs)
+{
+	unsigned int cpu = smp_processor_id();
+
+	per_cpu(cpu_data, cpu).ipi_count++;
+
+	if (ipimask & (1 << 0)) {
+		struct ipi_data *ipi = &per_cpu(ipi_data, cpu);
+
+		for (;;) {
+			unsigned long msgs;
+
+			spin_lock(&ipi->lock);
+			msgs = ipi->bits;
+			ipi->bits = 0;
+			spin_unlock(&ipi->lock);
+
+			if (!msgs)
+				break;
+
+			do {
+				unsigned nextmsg;
+
+				nextmsg = msgs & -msgs;
+				msgs &= ~nextmsg;
+				nextmsg = ffz(~nextmsg);
+
+				switch (nextmsg) {
+				case IPI_TIMER:
+					ipi_timer(regs);
+					break;
+
+				case IPI_RESCHEDULE:
+					/*
+					 * nothing more to do - eveything is
+					 * done on the interrupt return path
+					 */
+					break;
+
+				case IPI_CALL_FUNC:
+					ipi_call_function(cpu);
+					break;
+
+				case IPI_CPU_STOP:
+					ipi_cpu_stop(cpu);
+					break;
+
+				default:
+					printk(KERN_CRIT "CPU%u: Unknown IPI message 0x%x\n",
+					       cpu, nextmsg);
+					break;
+				}
+			} while (msgs);
+		}
+
+		ipimask &= ~0x01;
+	}
+
+	if (ipimask) {
+		printk(KERN_CRIT "CPU %d: Unknown IPI signal %x!\n",
+		       cpu, ipimask);
+		BUG();
+	}
+}
+
+void smp_send_reschedule(int cpu)
+{
+	send_ipi_message(cpumask_of_cpu(cpu), IPI_RESCHEDULE);
+}
+
+void smp_send_timer(void)
+{
+	cpumask_t mask = cpu_online_map;
+	cpu_clear(smp_processor_id(), mask);
+	send_ipi_message(mask, IPI_TIMER);
+}
+
+void smp_send_stop(void)
+{
+	cpumask_t mask = cpu_online_map;
+	cpu_clear(smp_processor_id(), mask);
+	send_ipi_message(mask, IPI_CPU_STOP);
+}
+
+/*
+ * not supported here
+ */
+int __init setup_profiling_timer(unsigned int multiplier)
+{
+	return -EINVAL;
+}
diff -Nru a/arch/arm/mach-integrator/impd1.c b/arch/arm/mach-integrator/impd1.c
--- a/arch/arm/mach-integrator/impd1.c	2005-01-10 20:11:17 -08:00
+++ b/arch/arm/mach-integrator/impd1.c	2005-01-10 20:11:17 -08:00
@@ -17,6 +17,7 @@
 #include <linux/init.h>
 #include <linux/device.h>
 #include <linux/errno.h>
+#include <linux/mm.h>
 
 #include <asm/io.h>
 #include <asm/hardware/icst525.h>
@@ -259,6 +260,17 @@
 	return ret;
 }
 
+static int impd1fb_clcd_mmap(struct clcd_fb *fb, struct vm_area_struct *vma)
+{
+	unsigned long start, size;
+
+	start = vma->vm_pgoff + (fb->fb.fix.smem_start >> PAGE_SHIFT);
+	size = vma->vm_end - vma->vm_start;
+
+	return remap_pfn_range(vma, vma->vm_start, start, size,
+			       vma->vm_page_prot);
+}
+
 static void impd1fb_clcd_remove(struct clcd_fb *fb)
 {
 	iounmap(fb->fb.screen_base);
@@ -272,6 +284,7 @@
 	.disable	= impd1fb_clcd_disable,
 	.enable		= impd1fb_clcd_enable,
 	.setup		= impd1fb_clcd_setup,
+	.mmap		= impd1fb_clcd_mmap,
 	.remove		= impd1fb_clcd_remove,
 };
 
diff -Nru a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c
--- a/arch/arm/mach-integrator/integrator_ap.c	2005-01-10 20:11:22 -08:00
+++ b/arch/arm/mach-integrator/integrator_ap.c	2005-01-10 20:11:22 -08:00
@@ -68,7 +68,6 @@
  * f1200000	12000000	EBI registers
  * f1300000	13000000	Counter/Timer
  * f1400000	14000000	Interrupt controller
- * f1500000	15000000	RTC
  * f1600000	16000000	UART 0
  * f1700000	17000000	UART 1
  * f1a00000	1a000000	Debug LEDs
@@ -81,7 +80,6 @@
  { IO_ADDRESS(INTEGRATOR_EBI_BASE),   INTEGRATOR_EBI_BASE,   SZ_4K,  MT_DEVICE },
  { IO_ADDRESS(INTEGRATOR_CT_BASE),    INTEGRATOR_CT_BASE,    SZ_4K,  MT_DEVICE },
  { IO_ADDRESS(INTEGRATOR_IC_BASE),    INTEGRATOR_IC_BASE,    SZ_4K,  MT_DEVICE },
- { IO_ADDRESS(INTEGRATOR_RTC_BASE),   INTEGRATOR_RTC_BASE,   SZ_4K,  MT_DEVICE },
  { IO_ADDRESS(INTEGRATOR_UART0_BASE), INTEGRATOR_UART0_BASE, SZ_4K,  MT_DEVICE },
  { IO_ADDRESS(INTEGRATOR_UART1_BASE), INTEGRATOR_UART1_BASE, SZ_4K,  MT_DEVICE },
  { IO_ADDRESS(INTEGRATOR_DBG_BASE),   INTEGRATOR_DBG_BASE,   SZ_4K,  MT_DEVICE },
diff -Nru a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c
--- a/arch/arm/mach-integrator/integrator_cp.c	2005-01-10 20:11:22 -08:00
+++ b/arch/arm/mach-integrator/integrator_cp.c	2005-01-10 20:11:22 -08:00
@@ -444,6 +444,14 @@
 	return 0;
 }
 
+static int cp_clcd_mmap(struct clcd_fb *fb, struct vm_area_struct *vma)
+{
+	return dma_mmap_writecombine(&fb->dev->dev, vma,
+				     fb->fb.screen_base,
+				     fb->fb.fix.smem_start,
+				     fb->fb.fix.smem_len);
+}
+
 static void cp_clcd_remove(struct clcd_fb *fb)
 {
 	dma_free_writecombine(&fb->dev->dev, fb->fb.fix.smem_len,
@@ -456,6 +464,7 @@
 	.decode		= clcdfb_decode,
 	.enable		= cp_clcd_enable,
 	.setup		= cp_clcd_setup,
+	.mmap		= cp_clcd_mmap,
 	.remove		= cp_clcd_remove,
 };
 
diff -Nru a/arch/arm/mach-integrator/time.c b/arch/arm/mach-integrator/time.c
--- a/arch/arm/mach-integrator/time.c	2005-01-10 20:11:18 -08:00
+++ b/arch/arm/mach-integrator/time.c	2005-01-10 20:11:18 -08:00
@@ -1,46 +1,213 @@
 /*
  *  linux/arch/arm/mach-integrator/time.c
  *
- *  Copyright (C) 2000-2001 Deep Blue Solutions
+ *  Copyright (C) 2000-2001 Deep Blue Solutions Ltd.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
+#include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/time.h>
+#include <linux/mc146818rtc.h>
+#include <linux/interrupt.h>
 #include <linux/init.h>
+#include <linux/device.h>
 
+#include <asm/hardware/amba.h>
 #include <asm/hardware.h>
 #include <asm/io.h>
+#include <asm/uaccess.h>
+#include <asm/rtc.h>
 
-#define RTC_DR		(IO_ADDRESS(INTEGRATOR_RTC_BASE) + 0)
-#define RTC_MR		(IO_ADDRESS(INTEGRATOR_RTC_BASE) + 4)
-#define RTC_STAT	(IO_ADDRESS(INTEGRATOR_RTC_BASE) + 8)
-#define RTC_EOI		(IO_ADDRESS(INTEGRATOR_RTC_BASE) + 8)
-#define RTC_LR		(IO_ADDRESS(INTEGRATOR_RTC_BASE) + 12)
-#define RTC_CR		(IO_ADDRESS(INTEGRATOR_RTC_BASE) + 16)
+#include <asm/mach/time.h>
 
-#define RTC_CR_MIE	0x00000001
+#define RTC_DR		(0)
+#define RTC_MR		(4)
+#define RTC_STAT	(8)
+#define RTC_EOI		(8)
+#define RTC_LR		(12)
+#define RTC_CR		(16)
+#define RTC_CR_MIE	(1 << 0)
 
 extern int (*set_rtc)(void);
+static void *rtc_base;
 
 static int integrator_set_rtc(void)
 {
-	__raw_writel(xtime.tv_sec, RTC_LR);
+	__raw_writel(xtime.tv_sec, rtc_base + RTC_LR);
 	return 1;
 }
 
-static int integrator_rtc_init(void)
+static void rtc_read_alarm(struct rtc_wkalrm *alrm)
 {
-	__raw_writel(0, RTC_CR);
-	__raw_writel(0, RTC_EOI);
+	rtc_time_to_tm(readl(rtc_base + RTC_MR), &alrm->time);
+}
+
+static int rtc_set_alarm(struct rtc_wkalrm *alrm)
+{
+	unsigned long time;
+	int ret;
 
-	xtime.tv_sec = __raw_readl(RTC_DR);
+	ret = rtc_tm_to_time(&alrm->time, &time);
+	if (ret == 0)
+		writel(time, rtc_base + RTC_MR);
+	return ret;
+}
+
+static void rtc_read_time(struct rtc_time *tm)
+{
+	rtc_time_to_tm(readl(rtc_base + RTC_DR), tm);
+}
+
+/*
+ * Set the RTC time.  Unfortunately, we can't accurately set
+ * the point at which the counter updates.
+ *
+ * Also, since RTC_LR is transferred to RTC_CR on next rising
+ * edge of the 1Hz clock, we must write the time one second
+ * in advance.
+ */
+static int rtc_set_time(struct rtc_time *tm)
+{
+	unsigned long time;
+	int ret;
+
+	ret = rtc_tm_to_time(tm, &time);
+	if (ret == 0)
+		writel(time + 1, rtc_base + RTC_LR);
+
+	return ret;
+}
+
+static struct rtc_ops rtc_ops = {
+	.owner		= THIS_MODULE,
+	.read_time	= rtc_read_time,
+	.set_time	= rtc_set_time,
+	.read_alarm	= rtc_read_alarm,
+	.set_alarm	= rtc_set_alarm,
+};
+
+static irqreturn_t rtc_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+{
+	writel(0, rtc_base + RTC_EOI);
+	return IRQ_HANDLED;
+}
+
+static int rtc_probe(struct amba_device *dev, void *id)
+{
+	int ret;
+
+	if (rtc_base)
+		return -EBUSY;
+
+	ret = amba_request_regions(dev, NULL);
+	if (ret)
+		goto out;
+
+	rtc_base = ioremap(dev->res.start, SZ_4K);
+	if (!rtc_base) {
+		ret = -ENOMEM;
+		goto res_out;
+	}
+
+	__raw_writel(0, rtc_base + RTC_CR);
+	__raw_writel(0, rtc_base + RTC_EOI);
+
+	xtime.tv_sec = __raw_readl(rtc_base + RTC_DR);
+
+	ret = request_irq(dev->irq[0], rtc_interrupt, SA_INTERRUPT,
+			  "rtc-pl030", rtc_base);
+	if (ret)
+		goto map_out;
+
+	ret = register_rtc(&rtc_ops);
+	if (ret)
+		goto irq_out;
 
 	set_rtc = integrator_set_rtc;
+	return 0;
+
+ irq_out:
+	free_irq(dev->irq[0], rtc_base);
+ map_out:
+	iounmap(rtc_base);
+	rtc_base = NULL;
+ res_out:
+	amba_release_regions(dev);
+ out:
+	return ret;
+}
+
+static int rtc_remove(struct amba_device *dev)
+{
+	set_rtc = NULL;
+
+	writel(0, rtc_base + RTC_CR);
+
+	free_irq(dev->irq[0], rtc_base);
+	unregister_rtc(&rtc_ops);
+
+	iounmap(rtc_base);
+	rtc_base = NULL;
+	amba_release_regions(dev);
 
 	return 0;
 }
 
-__initcall(integrator_rtc_init);
+static struct timespec rtc_delta;
+
+static int rtc_suspend(struct amba_device *dev, u32 state)
+{
+	struct timespec rtc;
+
+	rtc.tv_sec = readl(rtc_base + RTC_DR);
+	rtc.tv_nsec = 0;
+	save_time_delta(&rtc_delta, &rtc);
+
+	return 0;
+}
+
+static int rtc_resume(struct amba_device *dev)
+{
+	struct timespec rtc;
+
+	rtc.tv_sec = readl(rtc_base + RTC_DR);
+	rtc.tv_nsec = 0;
+	restore_time_delta(&rtc_delta, &rtc);
+
+	return 0;
+}
+
+static struct amba_id rtc_ids[] = {
+	{
+		.id	= 0x00041030,
+		.mask	= 0x000fffff,
+	},
+	{ 0, 0 },
+};
+
+static struct amba_driver rtc_driver = {
+	.drv		= {
+		.name	= "rtc-pl030",
+	},
+	.probe		= rtc_probe,
+	.remove		= rtc_remove,
+	.suspend	= rtc_suspend,
+	.resume		= rtc_resume,
+	.id_table	= rtc_ids,
+};
+
+static int __init integrator_rtc_init(void)
+{
+	return amba_driver_register(&rtc_driver);
+}
+
+static void __exit integrator_rtc_exit(void)
+{
+	amba_driver_unregister(&rtc_driver);
+}
+
+module_init(integrator_rtc_init);
+module_exit(integrator_rtc_exit);
diff -Nru a/arch/arm/mach-iop3xx/Kconfig b/arch/arm/mach-iop3xx/Kconfig
--- a/arch/arm/mach-iop3xx/Kconfig	2005-01-10 20:11:23 -08:00
+++ b/arch/arm/mach-iop3xx/Kconfig	2005-01-10 20:11:23 -08:00
@@ -25,6 +25,13 @@
 	  Say Y here if you want to run your kernel on the Intel IQ80331
 	  evaluation kit for the IOP331 chipset.
 
+config MACH_IQ80332
+	bool "Enable support for IQ80332"
+	select ARCH_IOP331
+	help
+	  Say Y here if you want to run your kernel on the Intel IQ80332
+	  evaluation kit for the IOP332 chipset
+
 config ARCH_EP80219
     bool "Enable support for EP80219"
     select ARCH_IOP321
@@ -41,10 +48,16 @@
 	bool
 	default ARCH_IQ80331
 	help
-	  The IQ80331 uses the IOP331 variant.
+	  The IQ80331, IQ80332, and IQ80333 uses the IOP331 variant.
 
 comment "IOP3xx Chipset Features"
 
-endmenu
+config IOP331_STEPD
+	bool "Chip stepping D of the IOP80331 processor or IOP80333"
+	depends on (ARCH_IOP331)
+	help
+		  Say Y here if you have StepD of the IOP80331 or IOP8033
+		  based platforms.
 
+endmenu
 endif
diff -Nru a/arch/arm/mach-iop3xx/Makefile b/arch/arm/mach-iop3xx/Makefile
--- a/arch/arm/mach-iop3xx/Makefile	2005-01-10 20:11:22 -08:00
+++ b/arch/arm/mach-iop3xx/Makefile	2005-01-10 20:11:22 -08:00
@@ -19,3 +19,5 @@
 obj-$(CONFIG_ARCH_IQ31244) += iq31244-mm.o iq31244-pci.o
 
 obj-$(CONFIG_ARCH_IQ80331) += iq80331-mm.o iq80331-pci.o
+
+obj-$(CONFIG_MACH_IQ80332) += iq80332-mm.o iq80332-pci.o
diff -Nru a/arch/arm/mach-iop3xx/iop321-pci.c b/arch/arm/mach-iop3xx/iop321-pci.c
--- a/arch/arm/mach-iop3xx/iop321-pci.c	2005-01-10 20:11:21 -08:00
+++ b/arch/arm/mach-iop3xx/iop321-pci.c	2005-01-10 20:11:21 -08:00
@@ -197,14 +197,6 @@
 
 void iop321_init(void)
 {
-#if CONFIG_ARCH_EP80219
-    *IOP321_ATUCR = 0x2;
-    *IOP321_OIOWTVR = 0x90000000;
-    *IOP321_IABAR0  = 0x00000004;
-    *IOP321_IABAR2  = 0xa000000c;
-    *IOP321_IALR2   = 0xe0000000;
-#endif
-
 	DBG("PCI:  Intel 80321 PCI init code.\n");
 	DBG("\tATU: IOP321_ATUCMD=0x%04x\n", *IOP321_ATUCMD);
 	DBG("\tATU: IOP321_OMWTVR0=0x%04x, IOP321_OIOWTVR=0x%04x\n",
diff -Nru a/arch/arm/mach-iop3xx/iop321-setup.c b/arch/arm/mach-iop3xx/iop321-setup.c
--- a/arch/arm/mach-iop3xx/iop321-setup.c	2005-01-10 20:11:19 -08:00
+++ b/arch/arm/mach-iop3xx/iop321-setup.c	2005-01-10 20:11:19 -08:00
@@ -3,6 +3,7 @@
  *
  * Author: Nicolas Pitre <nico@cam.org>
  * Copyright (C) 2001 MontaVista Software, Inc.
+ * Copyright (C) 2004 Intel Corporation.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -40,10 +41,10 @@
  /* virtual     physical      length      type */
 
  /* mem mapped registers */
- { IOP321_VIRT_MEM_BASE,  IOP321_PHY_MEM_BASE,   0x00002000,  MT_DEVICE },
+ { IOP321_VIRT_MEM_BASE,  IOP321_PHYS_MEM_BASE,   0x00002000,  MT_DEVICE },
 
  /* PCI IO space */
- { 0xfe000000,  0x90000000,   0x00020000,  MT_DEVICE }
+ { IOP321_PCI_LOWER_IO_VA,  IOP321_PCI_LOWER_IO_PA,   IOP321_PCI_IO_WINDOW_SIZE,  MT_DEVICE }
 };
 
 #ifdef CONFIG_ARCH_IQ80321
@@ -71,6 +72,60 @@
 	}
 };
 
+static struct resource iop32x_i2c_0_resources[] = {
+	[0] = {
+		.start = 0xfffff680,
+		.end = 0xfffff698,
+		.flags = IORESOURCE_MEM,
+	},
+	[1] = {
+		.start = IRQ_IOP321_I2C_0,
+		.end = IRQ_IOP321_I2C_0,
+		.flags = IORESOURCE_IRQ
+	}
+};
+
+static struct resource iop32x_i2c_1_resources[] = {
+	[0] = {
+		.start = 0xfffff6a0,
+		.end = 0xfffff6b8,
+		.flags = IORESOURCE_MEM,
+	},
+	[1] = {
+		.start = IRQ_IOP321_I2C_1,
+		.end = IRQ_IOP321_I2C_1,
+		.flags = IORESOURCE_IRQ
+	}
+};
+
+static struct platform_device iop32x_i2c_0_controller = {
+	.name = "IOP3xx-I2C",
+	.id = 0,
+	.num_resources = 2,
+	.resource = iop32x_i2c_0_resources
+};
+
+static struct platform_device iop32x_i2c_1_controller = {
+	.name = "IOP3xx-I2C",
+	.id = 1,
+	.num_resources = 2,
+	.resource = iop32x_i2c_1_resources
+};
+
+static struct platform_device *iop32x_devices[] __initdata = {
+	&iop32x_i2c_0_controller,
+	&iop32x_i2c_1_controller
+};
+
+void __init iop32x_init(void)
+{
+	if(iop_is_321())
+	{
+		platform_add_devices(iop32x_devices,
+				ARRAY_SIZE(iop32x_devices));
+	}
+}
+
 void __init iop321_map_io(void)
 {
 	iotable_init(iop321_std_desc, ARRAY_SIZE(iop321_std_desc));
@@ -97,6 +152,7 @@
 	INITIRQ(iop321_init_irq)
 	.timer		= &iop321_timer,
     BOOT_PARAMS(0xa0000100)
+	INIT_MACHINE(iop32x_init)
 MACHINE_END
 #elif defined(CONFIG_ARCH_IQ31244)
 MACHINE_START(IQ31244, "Intel IQ31244")
@@ -106,6 +162,7 @@
     INITIRQ(iop321_init_irq)
 	.timer		= &iop321_timer,
     BOOT_PARAMS(0xa0000100)
+	INIT_MACHINE(iop32x_init)
 MACHINE_END
 #else
 #error No machine descriptor defined for this IOP3XX implementation
diff -Nru a/arch/arm/mach-iop3xx/iop331-pci.c b/arch/arm/mach-iop3xx/iop331-pci.c
--- a/arch/arm/mach-iop3xx/iop331-pci.c	2005-01-10 20:11:21 -08:00
+++ b/arch/arm/mach-iop3xx/iop331-pci.c	2005-01-10 20:11:21 -08:00
@@ -4,7 +4,7 @@
  * PCI support for the Intel IOP331 chipset
  *
  * Author: Dave Jiang (dave.jiang@intel.com)
- * Copyright (C) 2003 Intel Corp.
+ * Copyright (C) 2003, 2004 Intel Corp.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -26,7 +26,8 @@
 
 #include <asm/arch/iop331.h>
 
-//#define DEBUG
+#undef DEBUG
+#undef DEBUG1
 
 #ifdef DEBUG
 #define  DBG(x...) printk(x)
@@ -34,6 +35,12 @@
 #define  DBG(x...) do { } while (0)
 #endif
 
+#ifdef DEBUG1
+#define  DBG1(x...) printk(x)
+#else
+#define  DBG1(x...) do { } while (0)
+#endif
+
 /*
  * This routine builds either a type0 or type1 configuration command.  If the
  * bus is on the 80331 then a type0 made, else a type1 is created.
@@ -197,21 +204,19 @@
 
 void iop331_init(void)
 {
-	DBG("PCI:  Intel 80331 PCI init code.\n");
-	DBG("\tATU: IOP331_ATUCMD=0x%04x\n", *IOP331_ATUCMD);
-	DBG("\tATU: IOP331_OMWTVR0=0x%04x, IOP331_OIOWTVR=0x%04x\n",
+	DBG1("PCI:  Intel 80331 PCI init code.\n");
+	DBG1("\tATU: IOP331_ATUCMD=0x%04x\n", *IOP331_ATUCMD);
+	DBG1("\tATU: IOP331_OMWTVR0=0x%04x, IOP331_OIOWTVR=0x%04x\n",
 			*IOP331_OMWTVR0,
 			*IOP331_OIOWTVR);
-	DBG("\tATU: IOP331_ATUCR=0x%08x\n", *IOP331_ATUCR);
-	DBG("\tATU: IOP331_IABAR0=0x%08x IOP331_IALR0=0x%08x IOP331_IATVR0=%08x\n", *IOP331_IABAR0, *IOP331_IALR0, *IOP331_IATVR0);
-	DBG("\tATU: IOP331_ERBAR=0x%08x IOP331_ERLR=0x%08x IOP331_ERTVR=%08x\n", *IOP331_ERBAR, *IOP331_ERLR, *IOP331_ERTVR);
-	DBG("\tATU: IOP331_IABAR2=0x%08x IOP331_IALR2=0x%08x IOP331_IATVR2=%08x\n", *IOP331_IABAR2, *IOP331_IALR2, *IOP331_IATVR2);
-	DBG("\tATU: IOP331_IABAR3=0x%08x IOP331_IALR3=0x%08x IOP331_IATVR3=%08x\n", *IOP331_IABAR3, *IOP331_IALR3, *IOP331_IATVR3);
-
-	/* redboot changed, reset IABAR0 to something sane */
-	/* fixes master aborts in plugged in cards */
-	/* will clean up later and work nicely with redboot */
-	*IOP331_IABAR0 = 0x00000004;
+	DBG1("\tATU: IOP331_OMWTVR1=0x%04x\n", *IOP331_OMWTVR1);
+	DBG1("\tATU: IOP331_ATUCR=0x%08x\n", *IOP331_ATUCR);
+	DBG1("\tATU: IOP331_IABAR0=0x%08x IOP331_IALR0=0x%08x IOP331_IATVR0=%08x\n", *IOP331_IABAR0, *IOP331_IALR0, *IOP331_IATVR0);
+	DBG1("\tATU: IOP31_IABAR1=0x%08x IOP331_IALR1=0x%08x\n", *IOP331_IABAR1, *IOP331_IALR1);
+	DBG1("\tATU: IOP331_ERBAR=0x%08x IOP331_ERLR=0x%08x IOP331_ERTVR=%08x\n", *IOP331_ERBAR, *IOP331_ERLR, *IOP331_ERTVR);
+	DBG1("\tATU: IOP331_IABAR2=0x%08x IOP331_IALR2=0x%08x IOP331_IATVR2=%08x\n", *IOP331_IABAR2, *IOP331_IALR2, *IOP331_IATVR2);
+	DBG1("\tATU: IOP331_IABAR3=0x%08x IOP331_IALR3=0x%08x IOP331_IATVR3=%08x\n", *IOP331_IABAR3, *IOP331_IALR3, *IOP331_IATVR3);
+
 	hook_fault_code(16+6, iop331_pci_abort, SIGBUS, "imprecise external abort");
 }
 
diff -Nru a/arch/arm/mach-iop3xx/iop331-setup.c b/arch/arm/mach-iop3xx/iop331-setup.c
--- a/arch/arm/mach-iop3xx/iop331-setup.c	2005-01-10 20:11:22 -08:00
+++ b/arch/arm/mach-iop3xx/iop331-setup.c	2005-01-10 20:11:22 -08:00
@@ -12,6 +12,7 @@
 #include <linux/mm.h>
 #include <linux/init.h>
 #include <linux/config.h>
+#include <linux/init.h>
 #include <linux/major.h>
 #include <linux/fs.h>
 #include <linux/device.h>
@@ -42,13 +43,13 @@
  { IOP331_VIRT_MEM_BASE,  IOP331_PHYS_MEM_BASE,   0x00002000,  MT_DEVICE },
 
  /* PCI IO space */
- { 0xfe000000,  0x90000000,   0x00020000,  MT_DEVICE }
+ { IOP331_PCI_LOWER_IO_VA,  IOP331_PCI_LOWER_IO_PA,   IOP331_PCI_IO_WINDOW_SIZE,  MT_DEVICE }
 };
 
 static struct uart_port iop331_serial_ports[] = {
 	{
-		.membase	= (char*)(IQ80331_UART0_VIRT),
-		.mapbase	= (IQ80331_UART0_PHYS),
+		.membase	= (char*)(IOP331_UART0_VIRT),
+		.mapbase	= (IOP331_UART0_PHYS),
 		.irq		= IRQ_IOP331_UART0,
 		.flags		= UPF_SKIP_TEST,
 		.iotype		= UPIO_MEM,
@@ -58,8 +59,8 @@
 		.type		= PORT_XSCALE,
 		.fifosize	= 32
 	} , {
-		.membase	= (char*)(IQ80331_UART1_VIRT),
-		.mapbase	= (IQ80331_UART1_PHYS),
+		.membase	= (char*)(IOP331_UART1_VIRT),
+		.mapbase	= (IOP331_UART1_PHYS),
 		.irq		= IRQ_IOP331_UART1,
 		.flags		= UPF_SKIP_TEST,
 		.iotype		= UPIO_MEM,
@@ -71,6 +72,60 @@
 	}
 };
 
+static struct resource iop33x_i2c_0_resources[] = {
+	[0] = {
+		.start = 0xfffff680,
+		.end = 0xfffff698,
+		.flags = IORESOURCE_MEM,
+	},
+	[1] = {
+		.start = IRQ_IOP331_I2C_0,
+		.end = IRQ_IOP331_I2C_0,
+		.flags = IORESOURCE_IRQ
+	}
+};
+
+static struct resource iop33x_i2c_1_resources[] = {
+	[0] = {
+		.start = 0xfffff6a0,
+		.end = 0xfffff6b8,
+		.flags = IORESOURCE_MEM,
+	},
+	[1] = {
+		.start = IRQ_IOP331_I2C_1,
+		.end = IRQ_IOP331_I2C_1,
+		.flags = IORESOURCE_IRQ
+	}
+};
+
+static struct platform_device iop33x_i2c_0_controller = {
+	.name = "IOP3xx-I2C",
+	.id = 0,
+	.num_resources = 2,
+	.resource = iop33x_i2c_0_resources
+};
+
+static struct platform_device iop33x_i2c_1_controller = {
+	.name = "IOP3xx-I2C",
+	.id = 1,
+	.num_resources = 2,
+	.resource = iop33x_i2c_1_resources
+};
+
+static struct platform_device *iop33x_devices[] __initdata = {
+	&iop33x_i2c_0_controller,
+	&iop33x_i2c_1_controller
+};
+
+void __init iop33x_init(void)
+{
+	if(iop_is_331())
+	{
+		platform_add_devices(iop33x_devices,
+				ARRAY_SIZE(iop33x_devices));
+	}
+}
+
 void __init iop331_map_io(void)
 {
 	iotable_init(iop331_std_desc, ARRAY_SIZE(iop331_std_desc));
@@ -78,22 +133,43 @@
 	early_serial_setup(&iop331_serial_ports[1]);
 }
 
-#ifdef CONFIG_ARCH_IQ80331
+#ifdef CONFIG_ARCH_IOP331
 extern void iop331_init_irq(void);
 extern struct sys_timer iop331_timer;
+#endif
+
+#ifdef CONFIG_ARCH_IQ80331
 extern void iq80331_map_io(void);
 #endif
 
+#ifdef CONFIG_MACH_IQ80332
+extern void iq80332_map_io(void);
+#endif
+
 #if defined(CONFIG_ARCH_IQ80331)
 MACHINE_START(IQ80331, "Intel IQ80331")
     MAINTAINER("Intel Corp.")
     BOOT_MEM(PHYS_OFFSET, 0xfefff000, 0xfffff000) // virtual, physical
-    //BOOT_MEM(PHYS_OFFSET, IQ80331_UART0_VIRT, IQ80331_UART0_PHYS)
+    //BOOT_MEM(PHYS_OFFSET, IOP331_UART0_VIRT, IOP331_UART0_PHYS)
     MAPIO(iq80331_map_io)
     INITIRQ(iop331_init_irq)
-    .timer		= &iop331_timer,
+	.timer		= &iop331_timer,
     BOOT_PARAMS(0x0100)
+	INIT_MACHINE(iop33x_init)
 MACHINE_END
+
+#elif defined(CONFIG_MACH_IQ80332)
+MACHINE_START(IQ80332, "Intel IQ80332")
+    MAINTAINER("Intel Corp.")
+    BOOT_MEM(PHYS_OFFSET, 0xfefff000, 0xfffff000) // virtual, physical
+    //BOOT_MEM(PHYS_OFFSET, IOP331_UART0_VIRT, IOP331_UART0_PHYS)
+    MAPIO(iq80332_map_io)
+    INITIRQ(iop331_init_irq)
+	.timer		= &iop331_timer,
+    BOOT_PARAMS(0x0100)
+	INIT_MACHINE(iop33x_init)
+MACHINE_END
+
 #else
 #error No machine descriptor defined for this IOP3XX implementation
 #endif
diff -Nru a/arch/arm/mach-iop3xx/iq31244-pci.c b/arch/arm/mach-iop3xx/iq31244-pci.c
--- a/arch/arm/mach-iop3xx/iq31244-pci.c	2005-01-10 20:11:22 -08:00
+++ b/arch/arm/mach-iop3xx/iq31244-pci.c	2005-01-10 20:11:22 -08:00
@@ -5,6 +5,7 @@
  *
  * Author: Rory Bolt <rorybolt@pacbell.net>
  * Copyright (C) 2002 Rory Bolt
+ * Copyright (C) 2004 Intel Corp.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -77,28 +78,28 @@
 
 	memset(res, 0, sizeof(struct resource) * 2);
 
-	res[0].start = IQ31244_PCI_IO_BASE + 0x6e000000;
-	res[0].end   = IQ31244_PCI_IO_BASE + IQ31244_PCI_IO_SIZE - 1 + IQ31244_PCI_IO_OFFSET;
+	res[0].start = IOP321_PCI_LOWER_IO_BA + IOP321_PCI_IO_OFFSET;
+	res[0].end   = IOP321_PCI_UPPER_IO_BA + IOP321_PCI_IO_OFFSET;
 	res[0].name  = "IQ31244 PCI I/O Space";
 	res[0].flags = IORESOURCE_IO;
 
-	res[1].start = IQ31244_PCI_MEM_BASE;
-	res[1].end   = IQ31244_PCI_MEM_BASE + IQ31244_PCI_MEM_SIZE;
+	res[1].start = IOP321_PCI_LOWER_MEM_BA + IOP321_PCI_MEM_OFFSET;
+	res[1].end   = IOP321_PCI_UPPER_MEM_BA + IOP321_PCI_MEM_OFFSET;
 	res[1].name  = "IQ31244 PCI Memory Space";
 	res[1].flags = IORESOURCE_MEM;
 
 	request_resource(&ioport_resource, &res[0]);
 	request_resource(&iomem_resource, &res[1]);
 
+	sys->mem_offset = IOP321_PCI_MEM_OFFSET;
+	sys->io_offset  = IOP321_PCI_IO_OFFSET;
+
 	sys->resource[0] = &res[0];
 	sys->resource[1] = &res[1];
 	sys->resource[2] = NULL;
-	sys->io_offset   = IQ31244_PCI_IO_OFFSET;
-	sys->mem_offset = IQ80321_PCI_MEM_BASE -
-		(*IOP321_IABAR1 & PCI_BASE_ADDRESS_MEM_MASK);
 
-	iop3xx_pcibios_min_io = IQ31244_PCI_IO_BASE;
-	iop3xx_pcibios_min_mem = IQ31244_PCI_MEM_BASE;
+	iop3xx_pcibios_min_io = IOP321_PCI_LOWER_IO_VA;
+	iop3xx_pcibios_min_mem = IOP321_PCI_LOWER_MEM_VA;
 
 	return 1;
 }
@@ -106,9 +107,6 @@
 static void iq31244_preinit(void)
 {
 	iop321_init();
-	/* setting up the second translation window */
-	*IOP321_OMWTVR1 = IQ31244_PCI_MEM_BASE + 0x04000000;
-	*IOP321_OUMWTVR1 = 0x0;
 }
 
 static struct hw_pci iq31244_pci __initdata = {
diff -Nru a/arch/arm/mach-iop3xx/iq80321-pci.c b/arch/arm/mach-iop3xx/iq80321-pci.c
--- a/arch/arm/mach-iop3xx/iq80321-pci.c	2005-01-10 20:11:22 -08:00
+++ b/arch/arm/mach-iop3xx/iq80321-pci.c	2005-01-10 20:11:22 -08:00
@@ -5,6 +5,7 @@
  *
  * Author: Rory Bolt <rorybolt@pacbell.net>
  * Copyright (C) 2002 Rory Bolt
+ * Copyright (C) 2004 Intel Corp.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -71,44 +72,28 @@
 
 	memset(res, 0, sizeof(struct resource) * 2);
 
-	res[0].start = IQ80321_PCI_IO_BASE + IQ80321_PCI_IO_OFFSET;
-	res[0].end   = IQ80321_PCI_IO_BASE + IQ80321_PCI_IO_SIZE - 1 + IQ80321_PCI_IO_OFFSET;
+	res[0].start = IOP321_PCI_LOWER_IO_BA + IOP321_PCI_IO_OFFSET;
+	res[0].end   = IOP321_PCI_UPPER_IO_BA + IOP321_PCI_IO_OFFSET;
 	res[0].name  = "IQ80321 PCI I/O Space";
 	res[0].flags = IORESOURCE_IO;
 
-	res[1].start = IQ80321_PCI_MEM_BASE;
-	res[1].end   = IQ80321_PCI_MEM_BASE + IQ80321_PCI_MEM_SIZE;
+	res[1].start = IOP321_PCI_LOWER_MEM_BA + IOP321_PCI_MEM_OFFSET;
+	res[1].end   = IOP321_PCI_UPPER_MEM_BA + IOP321_PCI_MEM_OFFSET;
 	res[1].name  = "IQ80321 PCI Memory Space";
 	res[1].flags = IORESOURCE_MEM;
 
 	request_resource(&ioport_resource, &res[0]);
 	request_resource(&iomem_resource, &res[1]);
 
-	/*
-	 * Since the IQ80321 is a slave card on a PCI backplane,
-	 * it uses BAR1 to reserve a portion of PCI memory space for
-	 * use with the private devices on the secondary bus
-	 * (GigE and PCI-X slot). We read BAR1 and configure
-	 * our outbound translation windows to target that
-	 * address range and assign all devices in that
-	 * address range. W/O this, certain BIOSes will fail
-	 * to boot as the IQ80321 claims addresses that are
-	 * in use by other devices.
-	 *
-	 * Note that the same cannot be done  with I/O space,
-	 * so hopefully the host will stick to the lower 64K for
-	 * PCI I/O and leave us alone.
-	 */
-	sys->mem_offset = IQ80321_PCI_MEM_BASE -
-		(*IOP321_IABAR1 & PCI_BASE_ADDRESS_MEM_MASK);
+	sys->mem_offset = IOP321_PCI_MEM_OFFSET;
+	sys->io_offset  = IOP321_PCI_IO_OFFSET;
 
 	sys->resource[0] = &res[0];
 	sys->resource[1] = &res[1];
 	sys->resource[2] = NULL;
-	sys->io_offset   = IQ80321_PCI_IO_OFFSET;
 
-	iop3xx_pcibios_min_io = IQ80321_PCI_IO_BASE;
-	iop3xx_pcibios_min_mem = IQ80321_PCI_MEM_BASE;
+	iop3xx_pcibios_min_io = IOP321_PCI_LOWER_IO_VA;
+	iop3xx_pcibios_min_mem = IOP321_PCI_LOWER_MEM_VA;
 
 	return 1;
 }
diff -Nru a/arch/arm/mach-iop3xx/iq80331-pci.c b/arch/arm/mach-iop3xx/iq80331-pci.c
--- a/arch/arm/mach-iop3xx/iq80331-pci.c	2005-01-10 20:11:23 -08:00
+++ b/arch/arm/mach-iop3xx/iq80331-pci.c	2005-01-10 20:11:23 -08:00
@@ -4,7 +4,7 @@
  * PCI support for the Intel IQ80331 reference board
  *
  * Author: Dave Jiang <dave.jiang@intel.com>
- * Copyright (C) 2003 Intel Corp.
+ * Copyright (C) 2003, 2004 Intel Corp.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -68,44 +68,28 @@
 
 	memset(res, 0, sizeof(struct resource) * 2);
 
-	res[0].start = IQ80331_PCI_IO_BASE + 0x6e000000;
-	res[0].end   = IQ80331_PCI_IO_BASE + IQ80331_PCI_IO_SIZE - 1 + IQ80331_PCI_IO_OFFSET;
+	res[0].start = IOP331_PCI_LOWER_IO_BA + IOP331_PCI_IO_OFFSET;
+	res[0].end   = IOP331_PCI_UPPER_IO_BA + IOP331_PCI_IO_OFFSET;
 	res[0].name  = "IQ80331 PCI I/O Space";
 	res[0].flags = IORESOURCE_IO;
 
-	res[1].start = IQ80331_PCI_MEM_BASE;
-	res[1].end   = IQ80331_PCI_MEM_BASE + IQ80331_PCI_MEM_SIZE;
+	res[1].start = IOP331_PCI_LOWER_MEM_BA + IOP331_PCI_MEM_OFFSET;
+	res[1].end   = IOP331_PCI_UPPER_MEM_BA + IOP331_PCI_MEM_OFFSET;
 	res[1].name  = "IQ80331 PCI Memory Space";
 	res[1].flags = IORESOURCE_MEM;
 
 	request_resource(&ioport_resource, &res[0]);
 	request_resource(&iomem_resource, &res[1]);
 
-	/*
-	 * Since the IQ80331 is a slave card on a PCI backplane,
-	 * it uses BAR1 to reserve a portion of PCI memory space for
-	 * use with the private devices on the secondary bus
-	 * (GigE and PCI-X slot). We read BAR1 and configure
-	 * our outbound translation windows to target that
-	 * address range and assign all devices in that
-	 * address range. W/O this, certain BIOSes will fail
-	 * to boot as the IQ80331 claims addresses that are
-	 * in use by other devices.
-	 *
-	 * Note that the same cannot be done  with I/O space,
-	 * so hopefully the host will stick to the lower 64K for
-	 * PCI I/O and leave us alone.
-	 */
-	sys->mem_offset = IQ80331_PCI_MEM_BASE -
-		(*IOP331_IABAR1 & PCI_BASE_ADDRESS_MEM_MASK);
+	sys->mem_offset = IOP331_PCI_MEM_OFFSET;
+	sys->io_offset  = IOP331_PCI_IO_OFFSET;
 
 	sys->resource[0] = &res[0];
 	sys->resource[1] = &res[1];
 	sys->resource[2] = NULL;
-	sys->io_offset   = IQ80331_PCI_IO_OFFSET;
 
-	iop3xx_pcibios_min_io = IQ80331_PCI_IO_BASE;
-	iop3xx_pcibios_min_mem = IQ80331_PCI_MEM_BASE;
+	iop3xx_pcibios_min_io = IOP331_PCI_LOWER_IO_VA;
+	iop3xx_pcibios_min_mem = IOP331_PCI_LOWER_MEM_VA;
 
 	return 1;
 }
diff -Nru a/arch/arm/mach-iop3xx/iq80332-mm.c b/arch/arm/mach-iop3xx/iq80332-mm.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/arm/mach-iop3xx/iq80332-mm.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,36 @@
+/*
+ * linux/arch/arm/mach-iop3xx/mm.c
+ *
+ * Low level memory initialization for iq80332 platform
+ *
+ * Author: Dave Jiang <dave.jiang@intel.com>
+ * Copyright (C) 2004 Intel Corp.
+ *
+ * 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/mm.h>
+#include <linux/init.h>
+
+#include <asm/io.h>
+#include <asm/pgtable.h>
+#include <asm/page.h>
+
+#include <asm/mach/map.h>
+#include <asm/mach-types.h>
+
+
+/*
+ * IQ80332 specific IO mappings
+ *
+ * We use RedBoot's setup for the onboard devices.
+ */
+
+void __init iq80332_map_io(void)
+{
+	iop331_map_io();
+}
diff -Nru a/arch/arm/mach-iop3xx/iq80332-pci.c b/arch/arm/mach-iop3xx/iq80332-pci.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/arm/mach-iop3xx/iq80332-pci.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,128 @@
+/*
+ * arch/arm/mach-iop3xx/iq80332-pci.c
+ *
+ * PCI support for the Intel IQ80332 reference board
+ *
+ * Author: Dave Jiang <dave.jiang@intel.com>
+ * Copyright (C) 2004 Intel Corp.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#include <linux/kernel.h>
+#include <linux/pci.h>
+#include <linux/init.h>
+
+#include <asm/hardware.h>
+#include <asm/irq.h>
+#include <asm/mach/pci.h>
+#include <asm/mach-types.h>
+
+/*
+ * The following macro is used to lookup irqs in a standard table
+ * format for those systems that do not already have PCI
+ * interrupts properly routed.  We assume 1 <= pin <= 4
+ */
+#define PCI_IRQ_TABLE_LOOKUP(minid,maxid)	\
+({ int _ctl_ = -1;				\
+   unsigned int _idsel = idsel - minid;		\
+   if (_idsel <= maxid)				\
+      _ctl_ = pci_irq_table[_idsel][pin-1];	\
+   _ctl_; })
+
+#define INTA	IRQ_IQ80332_INTA
+#define INTB	IRQ_IQ80332_INTB
+#define INTC	IRQ_IQ80332_INTC
+#define INTD	IRQ_IQ80332_INTD
+
+//#define INTE	IRQ_IQ80332_I82544
+
+static inline int __init
+iq80332_map_irq(struct pci_dev *dev, u8 idsel, u8 pin)
+{
+	static int pci_irq_table[][8] = {
+		/*
+		 * PCI IDSEL/INTPIN->INTLINE
+		 * A       B       C       D
+		 */
+		{-1,   -1,   -1,   -1},
+		{-1,   -1,   -1,   -1},
+		{-1,   -1,   -1,   -1},
+		{INTA, INTB, INTC, INTD}, /* PCI-X Slot */
+		{-1,   -1,   -1,   -1},
+		{INTC, INTC, INTC, INTC}, /* GigE  */
+		{-1,   -1,   -1,   -1},
+		{-1,   -1,   -1,   -1},
+	};
+
+	BUG_ON(pin < 1 || pin > 4);
+
+	return PCI_IRQ_TABLE_LOOKUP(1, 7);
+}
+
+static int iq80332_setup(int nr, struct pci_sys_data *sys)
+{
+	struct resource *res;
+
+	if(nr != 0)
+		return 0;
+
+	res = kmalloc(sizeof(struct resource) * 2, GFP_KERNEL);
+	if (!res)
+		panic("PCI: unable to alloc resources");
+
+	memset(res, 0, sizeof(struct resource) * 2);
+
+	res[0].start = IOP331_PCI_LOWER_IO_BA + IOP331_PCI_IO_OFFSET;
+	res[0].end   = IOP331_PCI_UPPER_IO_BA + IOP331_PCI_IO_OFFSET;
+	res[0].name  = "IQ80332 PCI I/O Space";
+	res[0].flags = IORESOURCE_IO;
+
+	res[1].start = IOP331_PCI_LOWER_MEM_BA + IOP331_PCI_MEM_OFFSET;
+	res[1].end   = IOP331_PCI_UPPER_MEM_BA + IOP331_PCI_MEM_OFFSET;
+	res[1].name  = "IQ80332 PCI Memory Space";
+	res[1].flags = IORESOURCE_MEM;
+
+	request_resource(&ioport_resource, &res[0]);
+	request_resource(&iomem_resource, &res[1]);
+
+	sys->mem_offset = IOP331_PCI_MEM_OFFSET;
+	sys->io_offset  = IOP331_PCI_IO_OFFSET;
+
+	sys->resource[0] = &res[0];
+	sys->resource[1] = &res[1];
+	sys->resource[2] = NULL;
+
+	iop3xx_pcibios_min_io = IOP331_PCI_LOWER_IO_VA;
+	iop3xx_pcibios_min_mem = IOP331_PCI_LOWER_MEM_VA;
+
+	return 1;
+}
+
+static void iq80332_preinit(void)
+{
+	iop331_init();
+}
+
+static struct hw_pci iq80332_pci __initdata = {
+	.swizzle	= pci_std_swizzle,
+	.nr_controllers = 1,
+	.setup		= iq80332_setup,
+	.scan		= iop331_scan_bus,
+	.preinit	= iq80332_preinit,
+	.map_irq	= iq80332_map_irq
+};
+
+static int __init iq80332_pci_init(void)
+{
+	if (machine_is_iq80332())
+		pci_common_init(&iq80332_pci);
+	return 0;
+}
+
+subsys_initcall(iq80332_pci_init);
+
+
+
+
diff -Nru a/arch/arm/mach-ixp2000/core.c b/arch/arm/mach-ixp2000/core.c
--- a/arch/arm/mach-ixp2000/core.c	2005-01-10 20:11:23 -08:00
+++ b/arch/arm/mach-ixp2000/core.c	2005-01-10 20:11:23 -08:00
@@ -167,15 +167,28 @@
  *************************************************************************/
 static unsigned ticks_per_jiffy;
 static unsigned ticks_per_usec;
+static unsigned next_jiffy_time;
 
 unsigned long ixp2000_gettimeoffset (void)
 {
-	unsigned long elapsed;
+ 	unsigned long elapsed1, elapsed2, pending;
+ 	unsigned long offset;
 
-	/* Get ticks since last perfect jiffy */
-	elapsed = ticks_per_jiffy - *IXP2000_T1_CSR;
+	elapsed1 = *IXP2000_T1_CSR;
+ 	pending = (*IXP2000_IRQ_STATUS & IRQ_MASK_TIMER1);
+ 	elapsed2 = *IXP2000_T1_CSR;
+
+ 	offset = ticks_per_jiffy - elapsed2;
+
+ 	/*
+ 	 * We have two cases to cover, one where we were pending
+   	 * already, and another where it overflowed while we were
+   	 * checking the timers.
+   	 */
+ 	if ((elapsed2 > elapsed1) || pending)
+ 		offset += ticks_per_jiffy;
 
-	return elapsed / ticks_per_usec;
+	return offset / ticks_per_usec;
 }
 
 static int ixp2000_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
@@ -185,7 +198,10 @@
 	/* clear timer 1 */
 	ixp2000_reg_write(IXP2000_T1_CLR, 1);
 	
-	timer_tick(regs);
+	while ((next_jiffy_time - *IXP2000_T4_CSR) > ticks_per_jiffy) {
+		timer_tick(regs);
+		next_jiffy_time -= ticks_per_jiffy;
+	}
 
 	write_sequnlock(&xtime_lock);
 
@@ -201,13 +217,20 @@
 void __init ixp2000_init_time(unsigned long tick_rate)
 {
 	ixp2000_reg_write(IXP2000_T1_CLR, 0);
-	ixp2000_reg_write(IXP2000_T2_CLR, 0);
+	ixp2000_reg_write(IXP2000_T4_CLR, 0);
 
 	ticks_per_jiffy = (tick_rate + HZ/2) / HZ;
 	ticks_per_usec = tick_rate / 1000000;
 
 	ixp2000_reg_write(IXP2000_T1_CLD, ticks_per_jiffy);
 	ixp2000_reg_write(IXP2000_T1_CTL, (1 << 7));
+
+	/*
+	 * We use T4 as a monotonic counter to track missed jiffies
+	 */
+	ixp2000_reg_write(IXP2000_T4_CLD, -1);
+	ixp2000_reg_write(IXP2000_T4_CTL, (1 << 7));
+ 	next_jiffy_time = 0xffffffff - ticks_per_jiffy;
 
 	/* register for interrupt */
 	setup_irq(IRQ_IXP2000_TIMER1, &ixp2000_timer_irq);
diff -Nru a/arch/arm/mach-ixp2000/enp2611.c b/arch/arm/mach-ixp2000/enp2611.c
--- a/arch/arm/mach-ixp2000/enp2611.c	2005-01-10 20:11:18 -08:00
+++ b/arch/arm/mach-ixp2000/enp2611.c	2005-01-10 20:11:18 -08:00
@@ -57,7 +57,7 @@
 	ixp2000_init_time(50 * 1000 * 1000);
 }
 
-static struct enp2611_timer = {
+static struct sys_timer enp2611_timer = {
 	.init		= enp2611_timer_init,
 	.offset		= ixp2000_gettimeoffset,
 };
diff -Nru a/arch/arm/mach-ixp2000/ixdp2400.c b/arch/arm/mach-ixp2000/ixdp2400.c
--- a/arch/arm/mach-ixp2000/ixdp2400.c	2005-01-10 20:11:18 -08:00
+++ b/arch/arm/mach-ixp2000/ixdp2400.c	2005-01-10 20:11:18 -08:00
@@ -56,7 +56,7 @@
 	ixp2000_init_time(((3125000 * numerator) / (denominator)) / 2);
 }
 
-static struct timer ixdp2400_timer = {
+static struct sys_timer ixdp2400_timer = {
 	.init		= ixdp2400_timer_init,
 	.offset		= ixp2000_gettimeoffset,
 };
diff -Nru a/arch/arm/mach-ixp2000/ixdp2800.c b/arch/arm/mach-ixp2000/ixdp2800.c
--- a/arch/arm/mach-ixp2000/ixdp2800.c	2005-01-10 20:11:20 -08:00
+++ b/arch/arm/mach-ixp2000/ixdp2800.c	2005-01-10 20:11:20 -08:00
@@ -113,7 +113,7 @@
 		 * Device behind the first bridge
 		 */
 		if(dev->bus->self->devfn == IXDP2X00_P2P_DEVFN) {
-			switch(PCI_SLOT(dev->devfn)) {
+			switch(dev->devfn) {
 				case IXDP2X00_PMC_DEVFN:
 					return IRQ_IXDP2800_PMC;	
 			
diff -Nru a/arch/arm/mach-ixp4xx/Kconfig b/arch/arm/mach-ixp4xx/Kconfig
--- a/arch/arm/mach-ixp4xx/Kconfig	2005-01-10 20:11:17 -08:00
+++ b/arch/arm/mach-ixp4xx/Kconfig	2005-01-10 20:11:17 -08:00
@@ -36,6 +36,14 @@
 	  IXDPG425 Development Platform (Also known as Montajade).
 	  For more information on this platform, see Documentation/arm/IXP4xx.
 
+config MACH_IXDP465
+	bool "IXDP465"
+	help
+	  Say 'Y' here if you want your kernel to support Intel's
+	  IXDP465 Development Platform (Also known as BMP).
+	  For more information on this platform, see Documentation/arm/IXP4xx.
+
+
 #
 # IXCDP1100 is the exact same HW as IXDP425, but with a different machine 
 # number from the bootloader due to marketing monkeys, so we just enable it 
@@ -58,7 +66,15 @@
 #
 config	ARCH_IXDP4XX
 	bool
-	depends on ARCH_IXDP425 || ARCH_AVILA
+	depends on ARCH_IXDP425 || ARCH_AVILA || MACH_IXDP465
+	default y
+
+#
+# Certain registers and IRQs are only enabled if supporting IXP465 CPUs
+#
+config CPU_IXP46X
+	bool
+	depends on MACH_IXDP465
 	default y
 
 comment "IXP4xx Options"
diff -Nru a/arch/arm/mach-ixp4xx/common-pci.c b/arch/arm/mach-ixp4xx/common-pci.c
--- a/arch/arm/mach-ixp4xx/common-pci.c	2005-01-10 20:11:22 -08:00
+++ b/arch/arm/mach-ixp4xx/common-pci.c	2005-01-10 20:11:22 -08:00
@@ -348,10 +348,11 @@
 	asm("mrc p15, 0, %0, cr0, cr0, 0;" : "=r"(processor_id) :);
 
 	/*
-	 * Determine which PCI read method to use
+	 * Determine which PCI read method to use.
+	 * Rev 0 IXP425 requires workaround.
 	 */
-	if (!(processor_id & 0xf)) {
-		printk("PCI: IXP4xx A0 silicon detected - "
+	if (!(processor_id & 0xf) && !cpu_is_ixp46x()) {
+		printk("PCI: IXP42x A0 silicon detected - "
 			"PCI Non-Prefetch Workaround Enabled\n");
 		ixp4xx_pci_read = ixp4xx_pci_read_errata;
 	} else
diff -Nru a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c
--- a/arch/arm/mach-ixp4xx/common.c	2005-01-10 20:11:19 -08:00
+++ b/arch/arm/mach-ixp4xx/common.c	2005-01-10 20:11:19 -08:00
@@ -145,7 +145,10 @@
  **************************************************************************/
 static void ixp4xx_irq_mask(unsigned int irq)
 {
-	*IXP4XX_ICMR &= ~(1 << irq);
+	if (cpu_is_ixp46x() && irq >= 32)
+		*IXP4XX_ICMR2 &= ~(1 << (irq - 32));
+	else
+		*IXP4XX_ICMR &= ~(1 << irq);
 }
 
 static void ixp4xx_irq_mask_ack(unsigned int irq)
@@ -155,13 +158,13 @@
 
 static void ixp4xx_irq_unmask(unsigned int irq)
 {
-	static int irq2gpio[NR_IRQS] = {
+	static int irq2gpio[32] = {
 		-1, -1, -1, -1, -1, -1,  0,  1,
 		-1, -1, -1, -1, -1, -1, -1, -1,
 		-1, -1, -1,  2,  3,  4,  5,  6,
 		 7,  8,  9, 10, 11, 12, -1, -1,
 	};
-	int line = irq2gpio[irq];
+	int line = (irq < 32) ? irq2gpio[irq] : -1;
 
 	/*
 	 * This only works for LEVEL gpio IRQs as per the IXP4xx developer's
@@ -171,7 +174,10 @@
 	if (line >= 0)
 		gpio_line_isr_clear(line);
 
-	*IXP4XX_ICMR |= (1 << irq);
+	if (cpu_is_ixp46x() && irq >= 32)
+		*IXP4XX_ICMR2 |= (1 << (irq - 32));
+	else
+		*IXP4XX_ICMR |= (1 << irq);
 }
 
 static struct irqchip ixp4xx_irq_chip = {
@@ -190,6 +196,14 @@
 	/* Disable all interrupt */
 	*IXP4XX_ICMR = 0x0; 
 
+	if (cpu_is_ixp46x()) {
+		/* Route upper 32 sources to IRQ instead of FIQ */
+		*IXP4XX_ICLR2 = 0x00;
+
+		/* Disable upper 32 interrupts */
+		*IXP4XX_ICMR2 = 0x00;
+	}
+
 	for(i = 0; i < NR_IRQS; i++)
 	{
 		set_irq_chip(i, &ixp4xx_irq_chip);
@@ -265,3 +279,40 @@
 	.init		= ixp4xx_timer_init,
 	.offset		= ixp4xx_gettimeoffset,
 };
+
+static struct resource ixp46x_i2c_resources[] = {
+	[0] = {
+		.start 	= 0xc8011000,
+		.end	= 0xc801101c,
+		.flags	= IORESOURCE_MEM,
+	},
+	[1] = {
+		.start 	= IRQ_IXP4XX_I2C,
+		.end	= IRQ_IXP4XX_I2C,
+		.flags	= IORESOURCE_IRQ
+	}
+};
+
+/*
+ * I2C controller. The IXP46x uses the same block as the IOP3xx, so
+ * we just use the same device name.
+ */
+static struct platform_device ixp46x_i2c_controller = {
+	.name		= "IOP3xx-I2C",
+	.id		= 0,
+	.num_resources	= 2,
+	.resource	= &ixp46x_i2c_resources
+};
+
+static struct platform_device *ixp46x_devices[] __initdata = {
+	&ixp46x_i2c_controller
+};
+
+void __init ixp4xx_sys_init(void)
+{
+	if (cpu_is_ixp46x()) {
+		platform_add_devices(ixp46x_devices,
+				ARRAY_SIZE(ixp46x_devices));
+	}
+}
+
diff -Nru a/arch/arm/mach-ixp4xx/coyote-setup.c b/arch/arm/mach-ixp4xx/coyote-setup.c
--- a/arch/arm/mach-ixp4xx/coyote-setup.c	2005-01-10 20:11:17 -08:00
+++ b/arch/arm/mach-ixp4xx/coyote-setup.c	2005-01-10 20:11:17 -08:00
@@ -89,7 +89,8 @@
 	*IXP4XX_EXP_CS0 |= IXP4XX_FLASH_WRITABLE;
 	*IXP4XX_EXP_CS1 = *IXP4XX_EXP_CS0;
 
-	platform_add_devices(&coyote_devices, ARRAY_SIZE(coyote_devices));
+	ixp4xx_sys_init();
+	platform_add_devices(coyote_devices, ARRAY_SIZE(coyote_devices));
 }
 
 #ifdef CONFIG_ARCH_ADI_COYOTE
diff -Nru a/arch/arm/mach-ixp4xx/ixdp425-pci.c b/arch/arm/mach-ixp4xx/ixdp425-pci.c
--- a/arch/arm/mach-ixp4xx/ixdp425-pci.c	2005-01-10 20:11:19 -08:00
+++ b/arch/arm/mach-ixp4xx/ixdp425-pci.c	2005-01-10 20:11:19 -08:00
@@ -73,9 +73,8 @@
 
 int __init ixdp425_pci_init(void)
 {
-	if (machine_is_ixdp425() || 
-		machine_is_ixcdp1100() || 
-		machine_is_avila())
+	if (machine_is_ixdp425() || machine_is_ixcdp1100() ||
+			machine_is_avila() || machine_is_ixdp465())
 		pci_common_init(&ixdp425_pci);
 	return 0;
 }
diff -Nru a/arch/arm/mach-ixp4xx/ixdp425-setup.c b/arch/arm/mach-ixp4xx/ixdp425-setup.c
--- a/arch/arm/mach-ixp4xx/ixdp425-setup.c	2005-01-10 20:11:19 -08:00
+++ b/arch/arm/mach-ixp4xx/ixdp425-setup.c	2005-01-10 20:11:19 -08:00
@@ -108,10 +108,30 @@
 
 static void __init ixdp425_init(void)
 {
-	platform_add_devices(&ixdp425_devices, ARRAY_SIZE(ixdp425_devices));
+	ixp4xx_sys_init();
+
+	/*
+	 * IXP465 has 32MB window
+	 */
+	if (machine_is_ixdp465()) {
+		ixdp425_flash_resource.end += IXDP425_FLASH_SIZE;
+	}
+
+	platform_add_devices(ixdp425_devices, ARRAY_SIZE(ixdp425_devices));
 }
 
 MACHINE_START(IXDP425, "Intel IXDP425 Development Platform")
+	MAINTAINER("MontaVista Software, Inc.")
+	BOOT_MEM(PHYS_OFFSET, IXP4XX_PERIPHERAL_BASE_PHYS,
+		IXP4XX_PERIPHERAL_BASE_VIRT)
+	MAPIO(ixdp425_map_io)
+	INITIRQ(ixp4xx_init_irq)
+	.timer		= &ixp4xx_timer,
+	BOOT_PARAMS(0x0100)
+	INIT_MACHINE(ixdp425_init)
+MACHINE_END
+
+MACHINE_START(IXDP465, "Intel IXDP465 Development Platform")
 	MAINTAINER("MontaVista Software, Inc.")
 	BOOT_MEM(PHYS_OFFSET, IXP4XX_PERIPHERAL_BASE_PHYS,
 		IXP4XX_PERIPHERAL_BASE_VIRT)
diff -Nru a/arch/arm/mach-ixp4xx/prpmc1100-setup.c b/arch/arm/mach-ixp4xx/prpmc1100-setup.c
--- a/arch/arm/mach-ixp4xx/prpmc1100-setup.c	2005-01-10 20:11:17 -08:00
+++ b/arch/arm/mach-ixp4xx/prpmc1100-setup.c	2005-01-10 20:11:17 -08:00
@@ -79,7 +79,9 @@
 
 static void __init prpmc1100_init(void)
 {
-	platform_add_devices(&prpmc1100_devices, ARRAY_SIZE(prpmc1100_devices));
+	ixp4xx_sys_init();
+
+	platform_add_devices(prpmc1100_devices, ARRAY_SIZE(prpmc1100_devices));
 }
 
 MACHINE_START(PRPMC1100, "Motorola PrPMC1100")
diff -Nru a/arch/arm/mach-omap/board-h2.c b/arch/arm/mach-omap/board-h2.c
--- a/arch/arm/mach-omap/board-h2.c	2005-01-10 20:11:24 -08:00
+++ b/arch/arm/mach-omap/board-h2.c	2005-01-10 20:11:24 -08:00
@@ -32,10 +32,11 @@
 #include <asm/arch/clocks.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/usb.h>
-#include <asm/arch/serial.h>
 
 #include "common.h"
 
+extern int omap_gpio_init(void);
+
 static int __initdata h2_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 1};
 
 static struct resource h2_smc91x_resources[] = {
@@ -45,8 +46,8 @@
 		.flags	= IORESOURCE_MEM,
 	},
 	[1] = {
-		.start	= 0,				/* Really GPIO 0 */
-		.end	= 0,
+		.start	= OMAP_GPIO_IRQ(0),
+		.end	= OMAP_GPIO_IRQ(0),
 		.flags	= IORESOURCE_IRQ,
 	},
 };
@@ -62,9 +63,20 @@
 	&h2_smc91x_device,
 };
 
+static void __init h2_init_smc91x(void)
+{
+	if ((omap_request_gpio(0)) < 0) {
+		printk("Error requesting gpio 0 for smc91x irq\n");
+		return;
+	}
+	omap_set_gpio_edge_ctrl(0, OMAP_GPIO_FALLING_EDGE);
+}
+
 void h2_init_irq(void)
 {
 	omap_init_irq();
+	omap_gpio_init();
+	h2_init_smc91x();
 }
 
 static struct omap_usb_config h2_usb_config __initdata = {
diff -Nru a/arch/arm/mach-omap/board-h3.c b/arch/arm/mach-omap/board-h3.c
--- a/arch/arm/mach-omap/board-h3.c	2005-01-10 20:11:16 -08:00
+++ b/arch/arm/mach-omap/board-h3.c	2005-01-10 20:11:16 -08:00
@@ -28,16 +28,13 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <asm/arch/irqs.h>
+#include <asm/arch/mux.h>
 #include <asm/arch/gpio.h>
 #include <asm/mach-types.h>
-#include <asm/arch/serial.h>
 
 #include "common.h"
 
-void h3_init_irq(void)
-{
-	omap_init_irq();
-}
+extern int omap_gpio_init(void);
 
 static int __initdata h3_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 1};
 
@@ -48,8 +45,8 @@
 		.flags	= IORESOURCE_MEM,
 	},
 	[1] = {
-		.start	= 0,
-		.end	= 0,
+		.start	= OMAP_GPIO_IRQ(40),
+		.end	= OMAP_GPIO_IRQ(40),
 		.flags	= IORESOURCE_IRQ,
 	},
 };
@@ -68,6 +65,23 @@
 static void __init h3_init(void)
 {
 	(void) platform_add_devices(devices, ARRAY_SIZE(devices));
+}
+
+static void __init h3_init_smc91x(void)
+{
+	omap_cfg_reg(W15_1710_GPIO40);
+	if (omap_request_gpio(40) < 0) {
+		printk("Error requesting gpio 40 for smc91x irq\n");
+		return;
+	}
+	omap_set_gpio_edge_ctrl(40, OMAP_GPIO_FALLING_EDGE);
+}
+
+void h3_init_irq(void)
+{
+	omap_init_irq();
+	omap_gpio_init();
+	h3_init_smc91x();
 }
 
 static void __init h3_map_io(void)
diff -Nru a/arch/arm/mach-omap/board-innovator.c b/arch/arm/mach-omap/board-innovator.c
--- a/arch/arm/mach-omap/board-innovator.c	2005-01-10 20:11:15 -08:00
+++ b/arch/arm/mach-omap/board-innovator.c	2005-01-10 20:11:15 -08:00
@@ -30,13 +30,12 @@
 #include <asm/arch/gpio.h>
 #include <asm/arch/fpga.h>
 #include <asm/arch/usb.h>
-#include <asm/arch/serial.h>
 
 #include "common.h"
 
-#ifdef CONFIG_ARCH_OMAP1510
+static int __initdata innovator_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 1};
 
-extern int omap_gpio_init(void);
+#ifdef CONFIG_ARCH_OMAP1510
 
 /* Only FPGA needs to be mapped here. All others are done with ioremap */
 static struct map_desc innovator1510_io_desc[] __initdata = {
@@ -44,8 +43,6 @@
 	MT_DEVICE },
 };
 
-static int __initdata innovator_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 1};
-
 static struct resource innovator1510_smc91x_resources[] = {
 	[0] = {
 		.start	= OMAP1510_FPGA_ETHR_START,	/* Physical */
@@ -81,8 +78,8 @@
 		.flags	= IORESOURCE_MEM,
 	},
 	[1] = {
-		.start	= 0,				/* Really GPIO 0 */
-		.end	= 0,
+		.start	= OMAP_GPIO_IRQ(0),
+		.end	= OMAP_GPIO_IRQ(0),
 		.flags	= IORESOURCE_IRQ,
 	},
 };
@@ -100,15 +97,31 @@
 
 #endif /* CONFIG_ARCH_OMAP16XX */
 
+static void __init innovator_init_smc91x(void)
+{
+	if (cpu_is_omap1510()) {
+		fpga_write(fpga_read(OMAP1510_FPGA_RST) & ~1,
+			   OMAP1510_FPGA_RST);
+		udelay(750);
+	} else {
+		if ((omap_request_gpio(0)) < 0) {
+			printk("Error requesting gpio 0 for smc91x irq\n");
+			return;
+		}
+		omap_set_gpio_edge_ctrl(0, OMAP_GPIO_RISING_EDGE);
+	}
+}
+
 void innovator_init_irq(void)
 {
 	omap_init_irq();
+	omap_gpio_init();
 #ifdef CONFIG_ARCH_OMAP1510
 	if (cpu_is_omap1510()) {
-		omap_gpio_init();
 		omap1510_fpga_init_irq();
 	}
 #endif
+	innovator_init_smc91x();
 }
 
 #ifdef CONFIG_ARCH_OMAP1510
diff -Nru a/arch/arm/mach-omap/board-osk.c b/arch/arm/mach-omap/board-osk.c
--- a/arch/arm/mach-omap/board-osk.c	2005-01-10 20:11:21 -08:00
+++ b/arch/arm/mach-omap/board-osk.c	2005-01-10 20:11:21 -08:00
@@ -39,7 +39,6 @@
 #include <asm/arch/gpio.h>
 #include <asm/arch/fpga.h>
 #include <asm/arch/usb.h>
-#include <asm/arch/serial.h>
 
 #include "common.h"
 
@@ -57,8 +56,8 @@
 		.flags	= IORESOURCE_MEM,
 	},
 	[1] = {
-		.start	= 0,				/* Really GPIO 0 */
-		.end	= 0,
+		.start	= OMAP_GPIO_IRQ(0),
+		.end	= OMAP_GPIO_IRQ(0),
 		.flags	= IORESOURCE_IRQ,
 	},
 };
@@ -74,9 +73,20 @@
 	&osk5912_smc91x_device,
 };
 
+static void __init osk_init_smc91x(void)
+{
+	if ((omap_request_gpio(0)) < 0) {
+		printk("Error requesting gpio 0 for smc91x irq\n");
+		return;
+	}
+	omap_set_gpio_edge_ctrl(0, OMAP_GPIO_RISING_EDGE);
+}
+
 void osk_init_irq(void)
 {
 	omap_init_irq();
+	omap_gpio_init();
+	osk_init_smc91x();
 }
 
 static struct omap_usb_config osk_usb_config __initdata = {
diff -Nru a/arch/arm/mach-omap/board-perseus2.c b/arch/arm/mach-omap/board-perseus2.c
--- a/arch/arm/mach-omap/board-perseus2.c	2005-01-10 20:11:21 -08:00
+++ b/arch/arm/mach-omap/board-perseus2.c	2005-01-10 20:11:21 -08:00
@@ -14,6 +14,7 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/device.h>
+#include <linux/delay.h>
 
 #include <asm/hardware.h>
 #include <asm/mach-types.h>
@@ -28,11 +29,6 @@
 
 #include "common.h"
 
-void omap_perseus2_init_irq(void)
-{
-	omap_init_irq();
-}
-
 static struct resource smc91x_resources[] = {
 	[0] = {
 		.start	= H2P2_DBG_FPGA_ETHR_START,	/* Physical */
@@ -62,6 +58,22 @@
 static void __init omap_perseus2_init(void)
 {
 	(void) platform_add_devices(devices, ARRAY_SIZE(devices));
+}
+
+static void __init perseus2_init_smc91x(void)
+{
+	fpga_write(1, H2P2_DBG_FPGA_LAN_RESET);
+	mdelay(50);
+	fpga_write(fpga_read(H2P2_DBG_FPGA_LAN_RESET) & ~1,
+		   H2P2_DBG_FPGA_LAN_RESET);
+	mdelay(50);
+}
+
+void omap_perseus2_init_irq(void)
+{
+	omap_init_irq();
+	omap_gpio_init();
+	perseus2_init_smc91x();
 }
 
 /* Only FPGA needs to be mapped here. All others are done with ioremap */
diff -Nru a/arch/arm/mach-omap/common.c b/arch/arm/mach-omap/common.c
--- a/arch/arm/mach-omap/common.c	2005-01-10 20:11:22 -08:00
+++ b/arch/arm/mach-omap/common.c	2005-01-10 20:11:22 -08:00
@@ -30,8 +30,6 @@
 #include <asm/arch/board.h>
 #include <asm/arch/mux.h>
 #include <asm/arch/fpga.h>
-#include <asm/arch/serial.h>
-
 
 #include "clock.h"
 
@@ -307,14 +305,14 @@
 		_omap_map_io();
 }
 
-static inline unsigned int omap_serial_in(struct plat_serial8250_port *up, 
+static inline unsigned int omap_serial_in(struct plat_serial8250_port *up,
 					  int offset)
 {
 	offset <<= up->regshift;
 	return (unsigned int)__raw_readb(up->membase + offset);
 }
 
-static inline void omap_serial_outp(struct plat_serial8250_port *p, int offset, 
+static inline void omap_serial_outp(struct plat_serial8250_port *p, int offset,
 				    int value)
 {
 	offset <<= p->regshift;
@@ -323,12 +321,14 @@
 
 /*
  * Internal UARTs need to be initialized for the 8250 autoconfig to work
- * properly.
+ * properly. Note that the TX watermark initialization may not be needed
+ * once the 8250.c watermark handling code is merged.
  */
 static void __init omap_serial_reset(struct plat_serial8250_port *p)
 {
-	omap_serial_outp(p, UART_OMAP_MDR1, 0x07); /* disable UART */
-	omap_serial_outp(p, UART_OMAP_MDR1, 0x00); /* enable UART */
+	omap_serial_outp(p, UART_OMAP_MDR1, 0x07);	/* disable UART */
+	omap_serial_outp(p, UART_OMAP_SCR, 0x08);	/* TX watermark */
+	omap_serial_outp(p, UART_OMAP_MDR1, 0x00);	/* enable UART */
 
 	if (!cpu_is_omap1510()) {
 		omap_serial_outp(p, UART_OMAP_SYSC, 0x01);
diff -Nru a/arch/arm/mach-omap/dma.c b/arch/arm/mach-omap/dma.c
--- a/arch/arm/mach-omap/dma.c	2005-01-10 20:11:22 -08:00
+++ b/arch/arm/mach-omap/dma.c	2005-01-10 20:11:22 -08:00
@@ -6,6 +6,7 @@
  * DMA channel linking for 1610 by Samuel Ortiz <samuel.ortiz@nokia.com>
  * Graphics DMA and LCD DMA graphics tranformations
  * by Imre Deak <imre.deak@nokia.com>
+ * Some functions based on earlier dma-omap.c Copyright (C) 2001 RidgeRun, Inc.
  *
  * Support functions for the OMAP internal DMA channels.
  *
@@ -477,10 +478,6 @@
 			if (dev_id == 0)
 				break;
 		}
-		if (dev_id != 0 && dma_chan[ch].dev_id == dev_id) {
-			spin_unlock_irqrestore(&dma_chan_lock, flags);
-			return -EAGAIN;
-		}
 	}
 	if (free_ch == -1) {
 		spin_unlock_irqrestore(&dma_chan_lock, flags);
@@ -931,6 +928,50 @@
 			    OMAP1610_DMA_LCD_CCR);
 }
 
+/*
+ * Clears any DMA state so the DMA engine is ready to restart with new buffers
+ * through omap_start_dma(). Any buffers in flight are discarded.
+ */
+void omap_clear_dma(int lch)
+{
+	unsigned long flags;
+	int status;
+
+	local_irq_save(flags);
+	omap_writew(omap_readw(OMAP_DMA_CCR(lch)) & ~OMAP_DMA_CCR_EN,
+		    OMAP_DMA_CCR(lch));
+	status = OMAP_DMA_CSR(lch);	/* clear pending interrupts */
+	local_irq_restore(flags);
+}
+
+/*
+ * Returns current physical source address for the given DMA channel.
+ * If the channel is running the caller must disable interrupts prior calling
+ * this function and process the returned value before re-enabling interrupt to
+ * prevent races with the interrupt handler. Note that in continuous mode there
+ * is a chance for CSSA_L register overflow inbetween the two reads resulting
+ * in incorrect return value.
+ */
+dma_addr_t omap_get_dma_src_pos(int lch)
+{
+	return (dma_addr_t) (OMAP_DMA_CSSA_L(lch) |
+			     (OMAP_DMA_CSSA_U(lch) << 16));
+}
+
+/*
+ * Returns current physical destination address for the given DMA channel.
+ * If the channel is running the caller must disable interrupts prior calling
+ * this function and process the returned value before re-enabling interrupt to
+ * prevent races with the interrupt handler. Note that in continuous mode there
+ * is a chance for CDSA_L register overflow inbetween the two reads resulting
+ * in incorrect return value.
+ */
+dma_addr_t omap_get_dma_dst_pos(int lch)
+{
+	return (dma_addr_t) (OMAP_DMA_CDSA_L(lch) |
+			     (OMAP_DMA_CDSA_U(lch) << 16));
+}
+
 static int __init omap_init_dma(void)
 {
 	int ch, r;
@@ -999,9 +1040,13 @@
 	}
 	return 0;
 }
+
 arch_initcall(omap_init_dma);
 
 
+EXPORT_SYMBOL(omap_get_dma_src_pos);
+EXPORT_SYMBOL(omap_get_dma_dst_pos);
+EXPORT_SYMBOL(omap_clear_dma);
 EXPORT_SYMBOL(omap_set_dma_priority);
 EXPORT_SYMBOL(omap_request_dma);
 EXPORT_SYMBOL(omap_free_dma);
diff -Nru a/arch/arm/mach-omap/pm.c b/arch/arm/mach-omap/pm.c
--- a/arch/arm/mach-omap/pm.c	2005-01-10 20:11:17 -08:00
+++ b/arch/arm/mach-omap/pm.c	2005-01-10 20:11:17 -08:00
@@ -81,6 +81,12 @@
 	mask32 = omap_readl(ARM_SYSST);
 	local_fiq_enable();
 	local_irq_enable();
+
+#if defined(CONFIG_OMAP_32K_TIMER) && defined(CONFIG_NO_IDLE_HZ)
+	/* Override timer to use VST for the next cycle */
+	omap_32k_timer_next_vst_interrupt();
+#endif
+
 	if ((mask32 & DSP_IDLE) == 0) {
 		__asm__ volatile ("mcr	p15, 0, r0, c7, c0, 4");
 	} else {
@@ -508,7 +514,7 @@
  */
 //#include <asm/arch/hardware.h>
 
-static int omap_pm_prepare(u32 state)
+static int omap_pm_prepare(suspend_state_t state)
 {
 	int error = 0;
 
@@ -535,7 +541,7 @@
  *
  */
 
-static int omap_pm_enter(u32 state)
+static int omap_pm_enter(suspend_state_t state)
 {
 	switch (state)
 	{
@@ -563,7 +569,7 @@
  *	failed).
  */
 
-static int omap_pm_finish(u32 state)
+static int omap_pm_finish(suspend_state_t state)
 {
 	return 0;
 }
diff -Nru a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig
--- a/arch/arm/mach-pxa/Kconfig	2005-01-10 20:11:17 -08:00
+++ b/arch/arm/mach-pxa/Kconfig	2005-01-10 20:11:17 -08:00
@@ -18,9 +18,29 @@
 	bool "Accelent Xscale IDP"
 	select PXA25x
 
+config PXA_SHARPSL
+	bool "SHARP SL-C7xx Models (Corgi, Shepherd and Husky)"
+	select PXA25x
+	help
+	  Say Y here if you intend to run this kernel on a
+	  Sharp SL-C700 (Corgi), SL-C750 (Shepherd) or a
+	  Sharp SL-C760 (Husky) handheld computer.
+
 endchoice
 
 endmenu
+
+config MACH_CORGI
+	bool "Enable Sharp SL-C700 (Corgi) Support"
+	depends PXA_SHARPSL
+
+config MACH_SHEPHERD
+	bool "Enable Sharp SL-C750 (Shepherd) Support"
+	depends PXA_SHARPSL
+
+config MACH_HUSKY
+	bool "Enable Sharp SL-C760 (Husky) Support"
+	depends PXA_SHARPSL
 
 config PXA25x
 	bool
diff -Nru a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile
--- a/arch/arm/mach-pxa/Makefile	2005-01-10 20:11:19 -08:00
+++ b/arch/arm/mach-pxa/Makefile	2005-01-10 20:11:19 -08:00
@@ -11,6 +11,7 @@
 obj-$(CONFIG_ARCH_LUBBOCK) += lubbock.o
 obj-$(CONFIG_MACH_MAINSTONE) += mainstone.o
 obj-$(CONFIG_ARCH_PXA_IDP) += idp.o
+obj-$(CONFIG_PXA_SHARPSL)	+= corgi.o
 
 # Support for blinky lights
 led-y := leds.o
diff -Nru a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/arm/mach-pxa/corgi.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,159 @@
+/*
+ * Support for Sharp SL-C7xx PDAs
+ * Models: SL-C700 (Corgi), SL-C750 (Shepherd), SL-C760 (Husky)
+ *
+ * Copyright (c) 2004-2005 Richard Purdie
+ *
+ * Based on Sharp's 2.4 kernel patches/lubbock.c
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/device.h>
+#include <linux/major.h>
+#include <linux/fs.h>
+#include <linux/interrupt.h>
+
+#include <asm/setup.h>
+#include <asm/memory.h>
+#include <asm/mach-types.h>
+#include <asm/hardware.h>
+#include <asm/irq.h>
+#include <asm/io.h>
+
+#include <asm/mach/arch.h>
+#include <asm/mach/map.h>
+#include <asm/mach/irq.h>
+
+#include <asm/arch/pxa-regs.h>
+#include <asm/arch/irq.h>
+#include <asm/arch/corgi.h>
+
+#include <asm/hardware/scoop.h>
+
+#include "generic.h"
+
+extern void corgi_ssp_lcdtg_send (u8 adrs, u8 data);
+
+static void __init corgi_init_irq(void)
+{
+	pxa_init_irq();
+}
+
+static struct resource corgi_scoop_resources[] = {
+	[0] = {
+		.start		= 0x10800000,
+		.end		= 0x10800fff,
+		.flags		= IORESOURCE_MEM,
+	},
+};
+
+static struct scoop_config corgi_scoop_setup = {
+	.io_dir 	= CORGI_SCOOP_IO_DIR,
+	.io_out		= CORGI_SCOOP_IO_OUT,
+};
+
+static struct platform_device corgiscoop_device = {
+	.name		= "sharp-scoop",
+	.id		= -1,
+	.dev		= {
+ 		.platform_data	= &corgi_scoop_setup,
+	},
+	.num_resources	= ARRAY_SIZE(corgi_scoop_resources),
+	.resource	= corgi_scoop_resources,
+};
+
+static struct platform_device *devices[] __initdata = {
+	&corgiscoop_device,
+};
+
+static struct sharpsl_flash_param_info sharpsl_flash_param;
+
+void corgi_get_param(void)
+{
+	sharpsl_flash_param.comadj_keyword = readl(FLASH_MEM_BASE + FLASH_COMADJ_MAGIC_ADR);
+	sharpsl_flash_param.comadj = readl(FLASH_MEM_BASE + FLASH_COMADJ_DATA_ADR);
+
+	sharpsl_flash_param.phad_keyword = readl(FLASH_MEM_BASE + FLASH_PHAD_MAGIC_ADR);
+	sharpsl_flash_param.phadadj = readl(FLASH_MEM_BASE + FLASH_PHAD_DATA_ADR);
+}
+
+static void __init corgi_init(void)
+{
+	platform_add_devices(devices, ARRAY_SIZE(devices));
+}
+
+static void __init fixup_corgi(struct machine_desc *desc,
+		struct tag *tags, char **cmdline, struct meminfo *mi)
+{
+	corgi_get_param();
+	mi->nr_banks=1;
+	mi->bank[0].start = 0xa0000000;
+	mi->bank[0].node = 0;
+	if (machine_is_corgi())
+		mi->bank[0].size = (32*1024*1024);
+	else
+		mi->bank[0].size = (64*1024*1024);
+}
+
+static struct map_desc corgi_io_desc[] __initdata = {
+/*    virtual     physical    length      */
+/*	{ 0xf1000000, 0x08000000, 0x01000000, MT_DEVICE },*/ /* LCDC (readable for Qt driver) */
+/*	{ 0xef700000, 0x10800000, 0x00001000, MT_DEVICE },*/  /* SCOOP */
+	{ 0xef800000, 0x00000000, 0x00800000, MT_DEVICE }, /* Boot Flash */
+};
+
+static void __init corgi_map_io(void)
+{
+	pxa_map_io();
+	iotable_init(corgi_io_desc,ARRAY_SIZE(corgi_io_desc));
+
+	/* setup sleep mode values */
+	PWER  = 0x00000002;
+	PFER  = 0x00000000;
+	PRER  = 0x00000002;
+	PGSR0 = 0x0158C000;
+	PGSR1 = 0x00FF0080;
+	PGSR2 = 0x0001C004;
+	/* Stop 3.6MHz and drive HIGH to PCMCIA and CS */
+	PCFR |= PCFR_OPDE;
+}
+
+#ifdef CONFIG_MACH_CORGI
+MACHINE_START(CORGI, "SHARP Corgi")
+	BOOT_MEM(0xa0000000, 0x40000000, io_p2v(0x40000000))
+	FIXUP(fixup_corgi)
+	MAPIO(corgi_map_io)
+	INITIRQ(corgi_init_irq)
+	.init_machine = corgi_init,
+	.timer = &pxa_timer,
+MACHINE_END
+#endif
+
+#ifdef CONFIG_MACH_SHEPHERD
+MACHINE_START(SHEPHERD, "SHARP Shepherd")
+	BOOT_MEM(0xa0000000, 0x40000000, io_p2v(0x40000000))
+	FIXUP(fixup_corgi)
+	MAPIO(corgi_map_io)
+	INITIRQ(corgi_init_irq)
+	.init_machine = corgi_init,
+	.timer = &pxa_timer,
+MACHINE_END
+#endif
+
+#ifdef CONFIG_MACH_HUSKY
+MACHINE_START(HUSKY, "SHARP Husky")
+	BOOT_MEM(0xa0000000, 0x40000000, io_p2v(0x40000000))
+	FIXUP(fixup_corgi)
+	MAPIO(corgi_map_io)
+	INITIRQ(corgi_init_irq)
+	.init_machine = corgi_init,
+	.timer = &pxa_timer,
+MACHINE_END
+#endif
+
diff -Nru a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c
--- a/arch/arm/mach-pxa/generic.c	2005-01-10 20:11:17 -08:00
+++ b/arch/arm/mach-pxa/generic.c	2005-01-10 20:11:17 -08:00
@@ -92,7 +92,7 @@
  */
 static struct map_desc standard_io_desc[] __initdata = {
  /* virtual     physical    length      type */
-  { 0xf2000000, 0x40000000, 0x01800000, MT_DEVICE }, /* Devs */
+  { 0xf2000000, 0x40000000, 0x02000000, MT_DEVICE }, /* Devs */
   { 0xf4000000, 0x44000000, 0x00100000, MT_DEVICE }, /* LCD */
   { 0xf6000000, 0x48000000, 0x00100000, MT_DEVICE }, /* Mem Ctl */
   { 0xf8000000, 0x4c000000, 0x00100000, MT_DEVICE }, /* USB host */
diff -Nru a/arch/arm/mach-pxa/ssp.c b/arch/arm/mach-pxa/ssp.c
--- a/arch/arm/mach-pxa/ssp.c	2005-01-10 20:11:22 -08:00
+++ b/arch/arm/mach-pxa/ssp.c	2005-01-10 20:11:22 -08:00
@@ -17,7 +17,8 @@
  *
  *  Revision history:
  *   22nd Aug 2003 Initial version.
- *
+ *   20th Dec 2004 Added ssp_config for changing port config without
+ *                 closing the port.
  */
 
 #include <linux/module.h>
@@ -34,6 +35,11 @@
 #include <asm/arch/ssp.h>
 #include <asm/arch/pxa-regs.h>
 
+#define PXA_SSP_PORTS 	3
+
+static DECLARE_MUTEX(sem);
+static int use_count[PXA_SSP_PORTS] = {0, 0, 0};
+
 static irqreturn_t ssp_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
 	struct ssp_dev *dev = (struct ssp_dev*) dev_id;
@@ -171,6 +177,30 @@
 }
 
 /**
+ * ssp_config - configure SSP port settings
+ * @mode: port operating mode
+ * @flags: port config flags
+ * @psp_flags: port PSP config flags
+ * @speed: port speed
+ *
+ * Port MUST be disabled by ssp_disable before making any config changes.
+ */
+int ssp_config(struct ssp_dev *dev, u32 mode, u32 flags, u32 psp_flags, u32 speed)
+{
+	dev->mode = mode;
+	dev->flags = flags;
+	dev->psp_flags = psp_flags;
+	dev->speed = speed;
+
+	/* set up port type, speed, port settings */
+	SSCR0_P(dev->port) = (dev->speed | dev->mode);
+	SSCR1_P(dev->port) = dev->flags;
+	SSPSP_P(dev->port) = dev->psp_flags;
+
+	return 0;
+}
+
+/**
  * ssp_init - setup the SSP port
  *
  * initialise and claim resources for the SSP port.
@@ -180,12 +210,23 @@
  *   %-EBUSY	if the resources are already in use
  *   %0		on success
  */
-int ssp_init(struct ssp_dev *dev, u32 port, u32 mode, u32 flags, u32 psp_flags,
-						u32 speed)
+int ssp_init(struct ssp_dev *dev, u32 port)
 {
 	int ret, irq;
 
+	if (port > PXA_SSP_PORTS || port == 0)
+		return -ENODEV;
+
+	down(&sem);
+	if (use_count[port - 1]) {
+		up(&sem);
+		return -EBUSY;
+	}
+	use_count[port - 1]++;
+
 	if (!request_mem_region(__PREG(SSCR0_P(port)), 0x2c, "SSP")) {
+		use_count[port - 1]--;
+		up(&sem);
 		return -EBUSY;
 	}
 
@@ -213,15 +254,6 @@
 	}
 
 	dev->port = port;
-	dev->mode = mode;
-	dev->flags = flags;
-	dev->psp_flags = psp_flags;
-	dev->speed = speed;
-
-	/* set up port type, speed, port settings */
-	SSCR0_P(dev->port) = (dev->speed | dev->mode);
-	SSCR1_P(dev->port) = dev->flags;
-	SSPSP_P(dev->port) = dev->psp_flags;
 
 	ret = request_irq(irq, ssp_interrupt, 0, "SSP", dev);
 	if (ret)
@@ -252,10 +284,13 @@
 #endif
 	}
 
+	up(&sem);
 	return 0;
 
 out_region:
-	release_mem_region(__PREG(SSCR0_P(dev->port)), 0x2c);
+	release_mem_region(__PREG(SSCR0_P(port)), 0x2c);
+	use_count[port - 1]--;
+	up(&sem);
 	return ret;
 }
 
@@ -268,6 +303,7 @@
 {
 	int irq;
 
+	down(&sem);
 	SSCR0_P(dev->port) &= ~SSCR0_SSE;
 
 	/* find irq, save power and turn off SSP port clock */
@@ -306,6 +342,8 @@
 
 	free_irq(irq, dev);
 	release_mem_region(__PREG(SSCR0_P(dev->port)), 0x2c);
+	use_count[dev->port - 1]--;
+	up(&sem);
 }
 
 EXPORT_SYMBOL(ssp_write_word);
@@ -317,3 +355,9 @@
 EXPORT_SYMBOL(ssp_restore_state);
 EXPORT_SYMBOL(ssp_init);
 EXPORT_SYMBOL(ssp_exit);
+EXPORT_SYMBOL(ssp_config);
+
+MODULE_DESCRIPTION("PXA SSP driver");
+MODULE_AUTHOR("Liam Girdwood");
+MODULE_LICENSE("GPL");
+
diff -Nru a/arch/arm/mach-s3c2410/cpu.c b/arch/arm/mach-s3c2410/cpu.c
--- a/arch/arm/mach-s3c2410/cpu.c	2005-01-10 20:11:19 -08:00
+++ b/arch/arm/mach-s3c2410/cpu.c	2005-01-10 20:11:19 -08:00
@@ -46,6 +46,7 @@
 	unsigned long	idcode;
 	unsigned long	idmask;
 	void		(*map_io)(struct map_desc *mach_desc, int size);
+	void		(*init_uarts)(struct s3c2410_uartcfg *cfg, int no);
 	int		(*init)(void);
 	const char	*name;
 };
@@ -59,32 +60,36 @@
 
 static struct cpu_table cpu_ids[] __initdata = {
 	{
-		.idcode	= 0x32410000,
-		.idmask = 0xffffffff,
-		.map_io = s3c2410_map_io,
-		.init   = s3c2410_init,
-		.name   = name_s3c2410
+		.idcode		= 0x32410000,
+		.idmask		= 0xffffffff,
+		.map_io		= s3c2410_map_io,
+		.init_uarts	= s3c2410_init_uarts,
+		.init		= s3c2410_init,
+		.name		= name_s3c2410
 	},
 	{
-		.idcode	= 0x32410002,
-		.idmask = 0xffffffff,
-		.map_io = s3c2410_map_io,
-		.init   = s3c2410_init,
-		.name   = name_s3c2410a
+		.idcode		= 0x32410002,
+		.idmask		= 0xffffffff,
+		.map_io		= s3c2410_map_io,
+		.init_uarts	= s3c2410_init_uarts,
+		.init		= s3c2410_init,
+		.name		= name_s3c2410a
 	},
 	{
-		.idcode	= 0x32440000,
-		.idmask = 0xffffffff,
-		.map_io = s3c2440_map_io,
-		.init   = s3c2440_init,
-		.name   = name_s3c2440
+		.idcode		= 0x32440000,
+		.idmask		= 0xffffffff,
+		.map_io		= s3c2440_map_io,
+		.init_uarts	= s3c2440_init_uarts,
+		.init		= s3c2440_init,
+		.name		= name_s3c2440
 	},
 	{
-		.idcode	= 0x32440001,
-		.idmask = 0xffffffff,
-		.map_io = s3c2440_map_io,
-		.init   = s3c2440_init,
-		.name   = name_s3c2440a
+		.idcode		= 0x32440001,
+		.idmask		= 0xffffffff,
+		.map_io		= s3c2440_map_io,
+		.init_uarts	= s3c2440_init_uarts,
+		.init		= s3c2440_init,
+		.name		= name_s3c2440a
 	}
 };
 
@@ -160,6 +165,16 @@
 	(cpu->map_io)(mach_desc, size);
 }
 
+void __init s3c24xx_init_uarts(struct s3c2410_uartcfg *cfg, int no)
+{
+	if (cpu == NULL)
+		return;
+
+	if (cpu->init_uarts == NULL) {
+		printk(KERN_ERR "s3c24xx_init_uarts: cpu has no uart init\n");
+	} else
+		(cpu->init_uarts)(cfg, no);
+}
 static int __init s3c_arch_init(void)
 {
 	int ret;
diff -Nru a/arch/arm/mach-s3c2410/cpu.h b/arch/arm/mach-s3c2410/cpu.h
--- a/arch/arm/mach-s3c2410/cpu.h	2005-01-10 20:11:16 -08:00
+++ b/arch/arm/mach-s3c2410/cpu.h	2005-01-10 20:11:16 -08:00
@@ -1,7 +1,7 @@
 /* arch/arm/mach-s3c2410/cpu.h
  *
- * Copyright (c) 2004 Simtec Electronics
- * Ben Dooks <ben@simtec.co.uk>
+ * Copyright (c) 2004-2005 Simtec Electronics
+ *	Ben Dooks <ben@simtec.co.uk>
  *
  * Header file for S3C24XX CPU support
  *
@@ -12,6 +12,7 @@
  * Modifications:
  *     24-Aug-2004 BJD  Start of generic S3C24XX support
  *     18-Oct-2004 BJD  Moved board struct into this file
+ *     04-Jan-2005 BJD  New uart initialisation
 */
 
 #define IODESC_ENT(x) { S3C2410_VA_##x, S3C2410_PA_##x, S3C2410_SZ_##x, MT_DEVICE }
@@ -22,10 +23,15 @@
 
 #define print_mhz(m) ((m) / MHZ), ((m / 1000) % 1000)
 
+/* forward declaration */
+struct s3c2410_uartcfg;
+
 #ifdef CONFIG_CPU_S3C2410
 extern  int s3c2410_init(void);
 extern void s3c2410_map_io(struct map_desc *mach_desc, int size);
+extern void s3c2410_init_uarts(struct s3c2410_uartcfg *cfg, int no);
 #else
+#define s3c2410_init_uarts NULL
 #define s3c2410_map_io NULL
 #define s3c2410_init NULL
 #endif
@@ -33,13 +39,17 @@
 #ifdef CONFIG_CPU_S3C2440
 extern  int s3c2440_init(void);
 extern void s3c2440_map_io(struct map_desc *mach_desc, int size);
+extern void s3c2440_init_uarts(struct s3c2410_uartcfg *cfg, int no);
 #else
+#define s3c2440_init_uarts NULL
 #define s3c2440_map_io NULL
 #define s3c2440_init NULL
 #endif
 
 extern void s3c24xx_init_io(struct map_desc *mach_desc, int size);
 
+extern void s3c24xx_init_uarts(struct s3c2410_uartcfg *cfg, int no);
+
 /* the board structure is used at first initialsation time
  * to get info such as the devices to register for this
  * board. This is done because platfrom_add_devices() cannot
@@ -55,5 +65,3 @@
 };
 
 extern void s3c24xx_set_board(struct s3c24xx_board *board);
-
-
diff -Nru a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c
--- a/arch/arm/mach-s3c2410/mach-bast.c	2005-01-10 20:11:19 -08:00
+++ b/arch/arm/mach-s3c2410/mach-bast.c	2005-01-10 20:11:19 -08:00
@@ -1,6 +1,6 @@
 /* linux/arch/arm/mach-s3c2410/mach-bast.c
  *
- * Copyright (c) 2003,2004 Simtec Electronics
+ * Copyright (c) 2003-2005 Simtec Electronics
  *   Ben Dooks <ben@simtec.co.uk>
  *
  * http://www.simtec.co.uk/products/EB2410ITX/
@@ -20,6 +20,7 @@
  *     18-Jan-2003 BJD  Added serial port configuration
  *     05-Oct-2004 BJD  Power management code
  *     04-Nov-2004 BJD  Updated serial port clocks
+ *     04-Jan-2004 BJD  New uart init call
 */
 
 #include <linux/kernel.h>
@@ -262,7 +263,7 @@
 	s3c24xx_uclk.parent  = &s3c24xx_clkout1;
 
 	s3c24xx_init_io(bast_iodesc, ARRAY_SIZE(bast_iodesc));
-	s3c2410_init_uarts(bast_uartcfgs, ARRAY_SIZE(bast_uartcfgs));
+	s3c24xx_init_uarts(bast_uartcfgs, ARRAY_SIZE(bast_uartcfgs));
 	s3c24xx_set_board(&bast_board);
 	usb_simtec_init();
 }
diff -Nru a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.c
--- a/arch/arm/mach-s3c2410/mach-h1940.c	2005-01-10 20:11:21 -08:00
+++ b/arch/arm/mach-s3c2410/mach-h1940.c	2005-01-10 20:11:21 -08:00
@@ -1,6 +1,6 @@
 /* linux/arch/arm/mach-s3c2410/mach-h1940.c
  *
- * Copyright (c) 2003,2004 Simtec Electronics
+ * Copyright (c) 2003-2005 Simtec Electronics
  *   Ben Dooks <ben@simtec.co.uk>
  *
  * http://www.handhelds.org/projects/h1940.html
@@ -20,6 +20,7 @@
  *     04-Sep-2004 BJD  Changed uart init, renamed ipaq_ -> h1940_
  *     18-Oct-2004 BJD  Updated new board structure name
  *     04-Nov-2004 BJD  Change for new serial clock
+ *     04-Jan-2005 BJD  Updated uart init call
 */
 
 #include <linux/kernel.h>
@@ -102,7 +103,7 @@
 void __init h1940_map_io(void)
 {
 	s3c24xx_init_io(h1940_iodesc, ARRAY_SIZE(h1940_iodesc));
-	s3c2410_init_uarts(h1940_uartcfgs, ARRAY_SIZE(h1940_uartcfgs));
+	s3c24xx_init_uarts(h1940_uartcfgs, ARRAY_SIZE(h1940_uartcfgs));
 	s3c24xx_set_board(&h1940_board);
 }
 
diff -Nru a/arch/arm/mach-s3c2410/mach-rx3715.c b/arch/arm/mach-s3c2410/mach-rx3715.c
--- a/arch/arm/mach-s3c2410/mach-rx3715.c	2005-01-10 20:11:21 -08:00
+++ b/arch/arm/mach-s3c2410/mach-rx3715.c	2005-01-10 20:11:21 -08:00
@@ -95,7 +95,7 @@
 	s3c24xx_xtal = 16934000;
 
 	s3c24xx_init_io(rx3715_iodesc, ARRAY_SIZE(rx3715_iodesc));
-	s3c2440_init_uarts(rx3715_uartcfgs, ARRAY_SIZE(rx3715_uartcfgs));
+	s3c24xx_init_uarts(rx3715_uartcfgs, ARRAY_SIZE(rx3715_uartcfgs));
 	s3c24xx_set_board(&rx3715_board);
 }
 
diff -Nru a/arch/arm/mach-s3c2410/mach-smdk2410.c b/arch/arm/mach-s3c2410/mach-smdk2410.c
--- a/arch/arm/mach-s3c2410/mach-smdk2410.c	2005-01-10 20:11:24 -08:00
+++ b/arch/arm/mach-s3c2410/mach-smdk2410.c	2005-01-10 20:11:24 -08:00
@@ -98,7 +98,7 @@
 void __init smdk2410_map_io(void)
 {
 	s3c24xx_init_io(smdk2410_iodesc, ARRAY_SIZE(smdk2410_iodesc));
-	s3c2410_init_uarts(smdk2410_uartcfgs, ARRAY_SIZE(smdk2410_uartcfgs));
+	s3c24xx_init_uarts(smdk2410_uartcfgs, ARRAY_SIZE(smdk2410_uartcfgs));
 	s3c24xx_set_board(&smdk2410_board);
 }
 
diff -Nru a/arch/arm/mach-s3c2410/mach-vr1000.c b/arch/arm/mach-s3c2410/mach-vr1000.c
--- a/arch/arm/mach-s3c2410/mach-vr1000.c	2005-01-10 20:11:21 -08:00
+++ b/arch/arm/mach-s3c2410/mach-vr1000.c	2005-01-10 20:11:21 -08:00
@@ -18,6 +18,7 @@
  *     05-Apr-2004 BJD  Copied to make mach-vr1000.c
  *     18-Oct-2004 BJD  Updated board struct
  *     04-Nov-2004 BJD  Clock and serial configuration update
+ *     04-Jan-2004 BJD  Updated uart init call
 */
 
 #include <linux/kernel.h>
@@ -204,7 +205,7 @@
 	s3c24xx_uclk.parent  = &s3c24xx_clkout1;
 
 	s3c24xx_init_io(vr1000_iodesc, ARRAY_SIZE(vr1000_iodesc));
-	s3c2410_init_uarts(vr1000_uartcfgs, ARRAY_SIZE(vr1000_uartcfgs));
+	s3c24xx_init_uarts(vr1000_uartcfgs, ARRAY_SIZE(vr1000_uartcfgs));
 	s3c24xx_set_board(&vr1000_board);
 	usb_simtec_init();
 }
diff -Nru a/arch/arm/mach-s3c2410/s3c2410.c b/arch/arm/mach-s3c2410/s3c2410.c
--- a/arch/arm/mach-s3c2410/s3c2410.c	2005-01-10 20:11:19 -08:00
+++ b/arch/arm/mach-s3c2410/s3c2410.c	2005-01-10 20:11:19 -08:00
@@ -1,6 +1,6 @@
 /* linux/arch/arm/mach-s3c2410/s3c2410.c
  *
- * Copyright (c) 2003,2004 Simtec Electronics
+ * Copyright (c) 2003-2005 Simtec Electronics
  *	Ben Dooks <ben@simtec.co.uk>
  *
  * http://www.simtec.co.uk/products/EB2410ITX/
@@ -17,6 +17,7 @@
  *     21-Aug-2004 BJD  Added new struct s3c2410_board handler
  *     28-Sep-2004 BJD  Updates for new serial port bits
  *     04-Nov-2004 BJD  Updated UART configuration process
+ *     10-Jan-2004 BJD  Removed s3c2410_clock_tick_rate
 */
 
 #include <linux/kernel.h>
@@ -41,8 +42,6 @@
 #include "s3c2410.h"
 #include "cpu.h"
 #include "clock.h"
-
-int s3c2410_clock_tick_rate = 12*1000*1000;  /* current timers at 12MHz */
 
 /* Initial IO mappings */
 
diff -Nru a/arch/arm/mach-s3c2410/s3c2410.h b/arch/arm/mach-s3c2410/s3c2410.h
--- a/arch/arm/mach-s3c2410/s3c2410.h	2005-01-10 20:11:18 -08:00
+++ b/arch/arm/mach-s3c2410/s3c2410.h	2005-01-10 20:11:18 -08:00
@@ -14,17 +14,14 @@
  *     20-Aug-2004 BJD  Added s3c2410_board struct
  *     04-Sep-2004 BJD  Added s3c2410_init_uarts() call
  *     17-Oct-2004 BJD  Moved board out to cpu
+ *     04-Jan-2005 BJD  Changed uart init
 */
 
-struct s3c2410_uartcfg;
-
 extern void s3c2410_map_io(struct map_desc *, int count);
 
-extern void s3c2410_init_uarts(struct s3c2410_uartcfg *, int no);
-
 extern void s3c2410_init_irq(void);
 
 struct sys_timer;
 extern struct sys_timer s3c2410_timer;
 
-extern void s3c2410_init_uarts(struct s3c2410_uartcfg *cfg, int no);
+
diff -Nru a/arch/arm/mach-s3c2410/s3c2440.c b/arch/arm/mach-s3c2410/s3c2440.c
--- a/arch/arm/mach-s3c2410/s3c2440.c	2005-01-10 20:11:15 -08:00
+++ b/arch/arm/mach-s3c2410/s3c2440.c	2005-01-10 20:11:15 -08:00
@@ -59,6 +59,7 @@
 	IODESC_ENT(LCD),
 	IODESC_ENT(TIMER),
 	IODESC_ENT(ADC),
+	IODESC_ENT(WATCHDOG),
 };
 
 static struct resource s3c_uart0_resource[] = {
@@ -243,7 +244,7 @@
 	s3c24xx_hclk = s3c24xx_fclk / s3c2440_hdiv;
 	s3c24xx_pclk = s3c24xx_hclk / ((clkdiv & S3C2440_CLKDIVN_PDIVN)? 2:1);
 
-	/* print brieft summary of clocks, etc */
+	/* print brief summary of clocks, etc */
 
 	printk("S3C2440: core %ld.%03ld MHz, memory %ld.%03ld MHz, peripheral %ld.%03ld MHz\n",
 	       print_mhz(s3c24xx_fclk), print_mhz(s3c24xx_hclk),
diff -Nru a/arch/arm/mach-s3c2410/s3c2440.h b/arch/arm/mach-s3c2410/s3c2440.h
--- a/arch/arm/mach-s3c2410/s3c2440.h	2005-01-10 20:11:20 -08:00
+++ b/arch/arm/mach-s3c2410/s3c2440.h	2005-01-10 20:11:20 -08:00
@@ -12,12 +12,9 @@
  * Modifications:
  *	24-Aug-2004 BJD  Start of S3C2440 CPU support
  *	04-Nov-2004 BJD  Added s3c2440_init_uarts()
+ *	04-Jan-2004 BJD  Moved uart init to cpu code
 */
 
-struct s3c2410_uartcfg;
-
 extern void s3c2440_init_irq(void);
 
 extern void s3c2440_init_time(void);
-
-extern void s3c2440_init_uarts(struct s3c2410_uartcfg *cfg, int no);
diff -Nru a/arch/arm/mach-sa1100/neponset.c b/arch/arm/mach-sa1100/neponset.c
--- a/arch/arm/mach-sa1100/neponset.c	2005-01-10 20:11:19 -08:00
+++ b/arch/arm/mach-sa1100/neponset.c	2005-01-10 20:11:19 -08:00
@@ -211,8 +211,8 @@
 }
 
 #else
-#define	neponset_suspend	NULL
-#define	neponset_resume	NULL
+#define neponset_suspend NULL
+#define neponset_resume  NULL
 #endif
 
 static struct device_driver neponset_device_driver = {
diff -Nru a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c
--- a/arch/arm/mach-versatile/core.c	2005-01-10 20:11:18 -08:00
+++ b/arch/arm/mach-versatile/core.c	2005-01-10 20:11:18 -08:00
@@ -597,6 +597,14 @@
 	return 0;
 }
 
+static int versatile_clcd_mmap(struct clcd_fb *fb, struct vm_area_struct *vma)
+{
+	return dma_mmap_writecombine(&fb->dev->dev, vma,
+				     fb->fb.screen_base,
+				     fb->fb.fix.smem_start,
+				     fb->fb.fix.smem_len);
+}
+
 static void versatile_clcd_remove(struct clcd_fb *fb)
 {
 	dma_free_writecombine(&fb->dev->dev, fb->fb.fix.smem_len,
@@ -610,6 +618,7 @@
 	.disable	= versatile_clcd_disable,
 	.enable		= versatile_clcd_enable,
 	.setup		= versatile_clcd_setup,
+	.mmap		= versatile_clcd_mmap,
 	.remove		= versatile_clcd_remove,
 };
 
diff -Nru a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
--- a/arch/arm/mm/Kconfig	2005-01-10 20:11:24 -08:00
+++ b/arch/arm/mm/Kconfig	2005-01-10 20:11:24 -08:00
@@ -82,9 +82,9 @@
 
 # ARM922T
 config CPU_ARM922T
-	bool
-	depends on ARCH_CAMELOT || ARCH_LH7A40X
-	default y
+	bool "Support ARM922T processor" if ARCH_INTEGRATOR
+	depends on ARCH_CAMELOT || ARCH_LH7A40X || ARCH_INTEGRATOR
+	default y if ARCH_CAMELOT || ARCH_LH7A40X
 	select CPU_32v4
 	select CPU_ABRT_EV4T
 	select CPU_CACHE_V4WT
@@ -101,9 +101,9 @@
 
 # ARM925T
 config CPU_ARM925T
- 	bool
+ 	bool "Support ARM925T processor" if ARCH_OMAP
  	depends on ARCH_OMAP1510
- 	default y
+ 	default y if ARCH_OMAP1510
 	select CPU_32v4
 	select CPU_ABRT_EV4T
 	select CPU_CACHE_V4WT
@@ -121,8 +121,8 @@
 # ARM926T
 config CPU_ARM926T
 	bool "Support ARM926T processor" if ARCH_INTEGRATOR
-	depends on ARCH_INTEGRATOR || ARCH_VERSATILE_PB || MACH_VERSATILE_AB || ARCH_OMAP730 || ARCH_OMAP1610 || ARCH_OMAP5912
-	default y if ARCH_VERSATILE_PB || MACH_VERSATILE_AB
+	depends on ARCH_INTEGRATOR || ARCH_VERSATILE_PB || MACH_VERSATILE_AB || ARCH_OMAP730 || ARCH_OMAP16XX
+	default y if ARCH_VERSATILE_PB || MACH_VERSATILE_AB || ARCH_OMAP730 || ARCH_OMAP16XX
 	select CPU_32v5
 	select CPU_ABRT_EV5TJ
 	select CPU_CACHE_VIVT
@@ -392,6 +392,7 @@
 config CPU_DCACHE_WRITETHROUGH
 	bool "Force write through D-cache"
 	depends on (CPU_ARM920T || CPU_ARM922T || CPU_ARM925T || CPU_ARM926T || CPU_ARM1020) && !CPU_DISABLE_DCACHE
+	default y if CPU_ARM925T
 	help
 	  Say Y here to use the data cache in writethough mode. Unless you
 	  specifically require this or are unsure, say N.
diff -Nru a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c
--- a/arch/arm/mm/alignment.c	2005-01-10 20:11:16 -08:00
+++ b/arch/arm/mm/alignment.c	2005-01-10 20:11:16 -08:00
@@ -3,6 +3,9 @@
  *
  *  Copyright (C) 1995  Linus Torvalds
  *  Modifications for ARM processor (c) 1995-2001 Russell King
+ *  Thumb aligment fault fixups (c) 2004 MontaVista Software, Inc.
+ *  - Adapted from gdb/sim/arm/thumbemu.c -- Thumb instruction emulation.
+ *    Copyright (C) 1996, Cygnus Software Technologies Ltd.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -449,16 +452,146 @@
 	return TYPE_ERROR;
 }
 
+/*
+ * Convert Thumb ld/st instruction forms to equivalent ARM instructions so
+ * we can reuse ARM userland alignment fault fixups for Thumb.
+ *
+ * This implementation was initially based on the algorithm found in
+ * gdb/sim/arm/thumbemu.c. It is basically just a code reduction of same
+ * to convert only Thumb ld/st instruction forms to equivalent ARM forms.
+ *
+ * NOTES:
+ * 1. Comments below refer to ARM ARM DDI0100E Thumb Instruction sections.
+ * 2. If for some reason we're passed an non-ld/st Thumb instruction to
+ *    decode, we return 0xdeadc0de. This should never happen under normal
+ *    circumstances but if it does, we've got other problems to deal with
+ *    elsewhere and we obviously can't fix those problems here.
+ */
+
+static unsigned long
+thumb2arm(u16 tinstr)
+{
+	u32 L = (tinstr & (1<<11)) >> 11;
+
+	switch ((tinstr & 0xf800) >> 11) {
+	/* 6.5.1 Format 1: */
+	case 0x6000 >> 11:				/* 7.1.52 STR(1) */
+	case 0x6800 >> 11:				/* 7.1.26 LDR(1) */
+	case 0x7000 >> 11:				/* 7.1.55 STRB(1) */
+	case 0x7800 >> 11:				/* 7.1.30 LDRB(1) */
+		return 0xe5800000 |
+			((tinstr & (1<<12)) << (22-12)) |	/* fixup */
+			(L<<20) |				/* L==1? */
+			((tinstr & (7<<0)) << (12-0)) |		/* Rd */
+			((tinstr & (7<<3)) << (16-3)) |		/* Rn */
+			((tinstr & (31<<6)) >>			/* immed_5 */
+				(6 - ((tinstr & (1<<12)) ? 0 : 2)));
+	case 0x8000 >> 11:				/* 7.1.57 STRH(1) */
+	case 0x8800 >> 11:				/* 7.1.32 LDRH(1) */
+		return 0xe1c000b0 |
+			(L<<20) |				/* L==1? */
+			((tinstr & (7<<0)) << (12-0)) |		/* Rd */
+			((tinstr & (7<<3)) << (16-3)) |		/* Rn */
+			((tinstr & (7<<6)) >> (6-1)) |	 /* immed_5[2:0] */
+			((tinstr & (3<<9)) >> (9-8));	 /* immed_5[4:3] */
+
+	/* 6.5.1 Format 2: */
+	case 0x5000 >> 11:
+	case 0x5800 >> 11:
+		{
+			static const u32 subset[8] = {
+				0xe7800000,		/* 7.1.53 STR(2) */
+				0xe18000b0,		/* 7.1.58 STRH(2) */
+				0xe7c00000,		/* 7.1.56 STRB(2) */
+				0xe19000d0,		/* 7.1.34 LDRSB */
+				0xe7900000,		/* 7.1.27 LDR(2) */
+				0xe19000b0,		/* 7.1.33 LDRH(2) */
+				0xe7d00000,		/* 7.1.31 LDRB(2) */
+				0xe19000f0		/* 7.1.35 LDRSH */
+			};
+			return subset[(tinstr & (7<<9)) >> 9] |
+			    ((tinstr & (7<<0)) << (12-0)) |	/* Rd */
+			    ((tinstr & (7<<3)) << (16-3)) |	/* Rn */
+			    ((tinstr & (7<<6)) >> (6-0));	/* Rm */
+		}
+
+	/* 6.5.1 Format 3: */
+	case 0x4800 >> 11:				/* 7.1.28 LDR(3) */
+		/* NOTE: This case is not technically possible. We're
+		 * 	 loading 32-bit memory data via PC relative
+		 *	 addressing mode. So we can and should eliminate
+		 *	 this case. But I'll leave it here for now.
+		 */
+		return 0xe59f0000 |
+		    ((tinstr & (7<<8)) << (12-8)) |		/* Rd */
+		    ((tinstr & 255) << (2-0));			/* immed_8 */
+
+	/* 6.5.1 Format 4: */
+	case 0x9000 >> 11:				/* 7.1.54 STR(3) */
+	case 0x9800 >> 11:				/* 7.1.29 LDR(4) */
+		return 0xe58d0000 |
+			(L<<20) |				/* L==1? */
+			((tinstr & (7<<8)) << (12-8)) |		/* Rd */
+			((tinstr & 255) << 2);			/* immed_8 */
+
+	/* 6.6.1 Format 1: */
+	case 0xc000 >> 11:				/* 7.1.51 STMIA */
+	case 0xc800 >> 11:				/* 7.1.25 LDMIA */
+		{
+			u32 Rn = (tinstr & (7<<8)) >> 8;
+			u32 W = ((L<<Rn) & (tinstr&255)) ? 0 : 1<<21;
+
+			return 0xe8800000 | W | (L<<20) | (Rn<<16) |
+				(tinstr&255);
+		}
+
+	/* 6.6.1 Format 2: */
+	case 0xb000 >> 11:				/* 7.1.48 PUSH */
+	case 0xb800 >> 11:				/* 7.1.47 POP */
+		if ((tinstr & (3 << 9)) == 0x0400) {
+			static const u32 subset[4] = {
+				0xe92d0000,	/* STMDB sp!,{registers} */
+				0xe92d4000,	/* STMDB sp!,{registers,lr} */
+				0xe8bd0000,	/* LDMIA sp!,{registers} */
+				0xe8bd8000	/* LDMIA sp!,{registers,pc} */
+			};
+			return subset[(L<<1) | ((tinstr & (1<<8)) >> 8)] |
+			    (tinstr & 255);		/* register_list */
+		}
+		/* Else fall through for illegal instruction case */
+
+	default:
+		return 0xdeadc0de;
+	}
+}
+
 static int
 do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
 {
 	union offset_union offset;
-	unsigned long instr, instrptr;
+	unsigned long instr = 0, instrptr;
 	int (*handler)(unsigned long addr, unsigned long instr, struct pt_regs *regs);
 	unsigned int type;
+	mm_segment_t fs;
+	unsigned int fault;
+	u16 tinstr = 0;
 
 	instrptr = instruction_pointer(regs);
-	instr = *(unsigned long *)instrptr;
+
+	fs = get_fs();
+	set_fs(KERNEL_DS);
+	if thumb_mode(regs) {
+		fault = __get_user(tinstr, (u16 *)(instrptr & ~1));
+		if (!(fault))
+			instr = thumb2arm(tinstr);
+	} else
+		fault = __get_user(instr, (u32 *)instrptr);
+	set_fs(fs);
+
+	if (fault) {
+		type = TYPE_FAULT;
+ 		goto bad_or_fault;
+	}
 
 	if (user_mode(regs))
 		goto user;
@@ -467,7 +600,7 @@
 
  fixup:
 
-	regs->ARM_pc += 4;
+	regs->ARM_pc += thumb_mode(regs) ? 2 : 4;
 
 	switch (CODING_BITS(instr)) {
 	case 0x00000000:	/* ldrh or strh */
@@ -537,7 +670,7 @@
  bad_or_fault:
 	if (type == TYPE_ERROR)
 		goto bad;
-	regs->ARM_pc -= 4;
+	regs->ARM_pc -= thumb_mode(regs) ? 2 : 4;
 	/*
 	 * We got a fault - fix it up, or die.
 	 */
@@ -549,7 +682,9 @@
 	 * Oops, we didn't handle the instruction.
 	 */
 	printk(KERN_ERR "Alignment trap: not handling instruction "
-		"%08lx at [<%08lx>]\n", instr, instrptr);
+		"%0*lx at [<%08lx>]\n",
+		thumb_mode(regs) ? 4 : 8,
+		thumb_mode(regs) ? tinstr : instr, instrptr);
 	ai_skipped += 1;
 	return 1;
 
@@ -557,9 +692,12 @@
 	ai_user += 1;
 
 	if (ai_usermode & 1)
-		printk("Alignment trap: %s (%d) PC=0x%08lx Instr=0x%08lx "
+		printk("Alignment trap: %s (%d) PC=0x%08lx Instr=0x%0*lx "
 		       "Address=0x%08lx FSR 0x%03x\n", current->comm,
-			current->pid, instrptr, instr, addr, fsr);
+			current->pid, instrptr,
+		        thumb_mode(regs) ? 4 : 8,
+		        thumb_mode(regs) ? tinstr : instr,
+		        addr, fsr);
 
 	if (ai_usermode & 2)
 		goto fixup;
diff -Nru a/arch/arm/mm/consistent.c b/arch/arm/mm/consistent.c
--- a/arch/arm/mm/consistent.c	2005-01-10 20:11:21 -08:00
+++ b/arch/arm/mm/consistent.c	2005-01-10 20:11:21 -08:00
@@ -1,7 +1,7 @@
 /*
  *  linux/arch/arm/mm/consistent.c
  *
- *  Copyright (C) 2000-2002 Russell King
+ *  Copyright (C) 2000-2004 Russell King
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -65,6 +65,7 @@
 	struct list_head	vm_list;
 	unsigned long		vm_start;
 	unsigned long		vm_end;
+	struct page		*vm_pages;
 };
 
 static struct vm_region consistent_head = {
@@ -206,6 +207,8 @@
 		pte_t *pte = consistent_pte + CONSISTENT_OFFSET(c->vm_start);
 		struct page *end = page + (1 << order);
 
+		c->vm_pages = page;
+
 		/*
 		 * Set the "dma handle"
 		 */
@@ -215,6 +218,9 @@
 			BUG_ON(!pte_none(*pte));
 
 			set_page_count(page, 1);
+			/*
+			 * x86 does not mark the pages reserved...
+			 */
 			SetPageReserved(page);
 			set_pte(pte, mk_pte(page, prot));
 			page++;
@@ -264,6 +270,50 @@
 }
 EXPORT_SYMBOL(dma_alloc_writecombine);
 
+static int dma_mmap(struct device *dev, struct vm_area_struct *vma,
+		    void *cpu_addr, dma_addr_t dma_addr, size_t size)
+{
+	unsigned long flags, user_size, kern_size;
+	struct vm_region *c;
+	int ret = -ENXIO;
+
+	user_size = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT;
+
+	spin_lock_irqsave(&consistent_lock, flags);
+	c = vm_region_find(&consistent_head, (unsigned long)cpu_addr);
+	spin_unlock_irqrestore(&consistent_lock, flags);
+
+	if (c) {
+		kern_size = (c->vm_end - c->vm_start) >> PAGE_SHIFT;
+
+		if (vma->vm_pgoff < kern_size &&
+		    user_size <= (kern_size - vma->vm_pgoff)) {
+			vma->vm_flags |= VM_RESERVED;
+			ret = remap_pfn_range(vma, vma->vm_start,
+					      page_to_pfn(c->vm_pages),
+					      user_size, vma->vm_page_prot);
+		}
+	}
+
+	return ret;
+}
+
+int dma_mmap_coherent(struct device *dev, struct vm_area_struct *vma,
+		      void *cpu_addr, dma_addr_t dma_addr, size_t size)
+{
+	vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
+	return dma_mmap(dev, vma, cpu_addr, dma_addr, size);
+}
+EXPORT_SYMBOL(dma_mmap_coherent);
+
+int dma_mmap_writecombine(struct device *dev, struct vm_area_struct *vma,
+			  void *cpu_addr, dma_addr_t dma_addr, size_t size)
+{
+	vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
+	return dma_mmap(dev, vma, cpu_addr, dma_addr, size);
+}
+EXPORT_SYMBOL(dma_mmap_writecombine);
+
 /*
  * free a page as defined by the above mapping.
  */
@@ -300,6 +350,10 @@
 
 			if (pfn_valid(pfn)) {
 				struct page *page = pfn_to_page(pfn);
+
+				/*
+				 * x86 does not mark the pages reserved...
+				 */
 				ClearPageReserved(page);
 
 				__free_page(page);
diff -Nru a/arch/arm/mm/init.c b/arch/arm/mm/init.c
--- a/arch/arm/mm/init.c	2005-01-10 20:11:16 -08:00
+++ b/arch/arm/mm/init.c	2005-01-10 20:11:16 -08:00
@@ -15,6 +15,7 @@
 #include <linux/init.h>
 #include <linux/bootmem.h>
 #include <linux/mman.h>
+#include <linux/nodemask.h>
 #include <linux/initrd.h>
 
 #include <asm/mach-types.h>
@@ -55,7 +56,7 @@
 	show_free_areas();
 	printk("Free swap:       %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10));
 
-	for (node = 0; node < numnodes; node++) {
+	for_each_online_node(node) {
 		struct page *page, *end;
 
 		page = NODE_MEM_MAP(node);
@@ -178,18 +179,14 @@
 
 		node = mi->bank[i].node;
 
-		if (node >= numnodes) {
-			numnodes = node + 1;
-
-			/*
-			 * Make sure we haven't exceeded the maximum number
-			 * of nodes that we have in this configuration.  If
-			 * we have, we're in trouble.  (maybe we ought to
-			 * limit, instead of bugging?)
-			 */
-			if (numnodes > MAX_NUMNODES)
-				BUG();
-		}
+		/*
+		 * Make sure we haven't exceeded the maximum number of nodes
+		 * that we have in this configuration.  If we have, we're in
+		 * trouble.  (maybe we ought to limit, instead of bugging?)
+		 */
+		if (node >= MAX_NUMNODES)
+			BUG();
+		node_set_online(node);
 
 		/*
 		 * Get the start and end pfns for this bank
@@ -211,7 +208,7 @@
 	 * Calculate the number of pages we require to
 	 * store the bootmem bitmaps.
 	 */
-	for (i = 0; i < numnodes; i++) {
+	for_each_online_node(i) {
 		if (np[i].end == 0)
 			continue;
 
@@ -380,13 +377,13 @@
 	 * (we could also do with rolling bootmem_init and paging_init
 	 * into one generic "memory_init" type function).
 	 */
-	np += numnodes - 1;
-	for (node = numnodes - 1; node >= 0; node--, np--) {
+	np += num_online_nodes() - 1;
+	for (node = num_online_nodes() - 1; node >= 0; node--, np--) {
 		/*
 		 * If there are no pages in this node, ignore it.
 		 * Note that node 0 must always have some pages.
 		 */
-		if (np->end == 0) {
+		if (np->end == 0 || !node_online(node)) {
 			if (node == 0)
 				BUG();
 			continue;
@@ -449,7 +446,7 @@
 	/*
 	 * initialise the zones within each node
 	 */
-	for (node = 0; node < numnodes; node++) {
+	for_each_online_node(node) {
 		unsigned long zone_size[MAX_NR_ZONES];
 		unsigned long zhole_size[MAX_NR_ZONES];
 		struct bootmem_data *bdata;
@@ -558,7 +555,7 @@
 		create_memmap_holes(&meminfo);
 
 	/* this will put all unused low memory onto the freelists */
-	for (node = 0; node < numnodes; node++) {
+	for_each_online_node(node) {
 		pg_data_t *pgdat = NODE_DATA(node);
 
 		if (pgdat->node_spanned_pages != 0)
diff -Nru a/arch/arm/mm/mm-armv.c b/arch/arm/mm/mm-armv.c
--- a/arch/arm/mm/mm-armv.c	2005-01-10 20:11:20 -08:00
+++ b/arch/arm/mm/mm-armv.c	2005-01-10 20:11:20 -08:00
@@ -15,6 +15,7 @@
 #include <linux/init.h>
 #include <linux/bootmem.h>
 #include <linux/highmem.h>
+#include <linux/nodemask.h>
 
 #include <asm/pgalloc.h>
 #include <asm/page.h>
@@ -239,7 +240,8 @@
 
 /*
  * Create a SECTION PGD between VIRT and PHYS in domain
- * DOMAIN with protection PROT
+ * DOMAIN with protection PROT.  This operates on half-
+ * pgdir entry increments.
  */
 static inline void
 alloc_init_section(unsigned long virt, unsigned long phys, int prot)
@@ -481,6 +483,9 @@
 		length -= PAGE_SIZE;
 	}
 
+	/*
+	 * A section mapping covers half a "pgdir" entry.
+	 */
 	while (length >= (PGDIR_SIZE / 2)) {
 		alloc_init_section(virt, virt + off, prot_sect);
 
@@ -522,6 +527,7 @@
 			pmdval |= PMD_BIT4;
 		pmd = pmd_offset(pgd + i, i << PGDIR_SHIFT);
 		set_pmd(pmd, __pmd(pmdval));
+		set_pmd(pmd + 1, __pmd(pmdval + (1 << (PGDIR_SHIFT - 1))));
 	}
 }
 
@@ -696,6 +702,6 @@
 {
 	int node;
 
-	for (node = 0; node < numnodes; node++)
+	for_each_online_node(node)
 		free_unused_memmap_node(node, mi);
 }
diff -Nru a/arch/arm/mm/proc-arm1020.S b/arch/arm/mm/proc-arm1020.S
--- a/arch/arm/mm/proc-arm1020.S	2005-01-10 20:11:16 -08:00
+++ b/arch/arm/mm/proc-arm1020.S	2005-01-10 20:11:16 -08:00
@@ -431,36 +431,29 @@
 	mcr	p15, 0, r0, c7, c7		@ invalidate I,D caches on v4
 	mcr	p15, 0, r0, c7, c10, 4		@ drain write buffer on v4
 	mcr	p15, 0, r0, c8, c7		@ invalidate I,D TLBs on v4
-	mcr	p15, 0, r4, c2, c0		@ load page table pointer
-	mov	r0, #0x1f			@ Domains 0, 1 = client
-	mcr	p15, 0, r0, c3, c0		@ load domain access register
 	mrc	p15, 0, r0, c1, c0		@ get control register v4
-/*
- * Clear out 'unwanted' bits (then put them in if we need them)
- */
-	bic	r0, r0, #0x1e00 		@ i...??r.........
-	bic	r0, r0, #0x000e 		@ ............wca.
-/*
- * Turn on what we want
- */
-	orr	r0, r0, #0x0031 		@ ..........DP...M
-	orr	r0, r0, #0x0100 		@ .......S........
-
+	ldr	r5, arm1020_cr1_clear
+	bic	r0, r0, r5
+	ldr	r5, arm1020_cr1_set
+	orr	r0, r0, r5
 #ifdef CONFIG_CPU_CACHE_ROUND_ROBIN
-	orr	r0, r0, #0x4000 		@ .R..............
-#endif
-#ifndef CONFIG_CPU_BPREDICT_DISABLE
-	orr	r0, r0, #0x0800 		@ ....Z...........
-#endif
-#ifndef CONFIG_CPU_DCACHE_DISABLE
-	orr	r0, r0, #0x0004 		@ Enable D cache
-#endif
-#ifndef CONFIG_CPU_ICACHE_DISABLE
-	orr	r0, r0, #0x1000 		@ I Cache on
+	orr	r0, r0, #0x4000 		@ .R.. .... .... ....
 #endif
 	mov	pc, lr
 	.size	__arm1020_setup, . - __arm1020_setup
 
+	/*
+	 *  R
+	 * .RVI ZFRS BLDP WCAM
+	 * .0.1 1001 ..11 0101	/* FIXME: why no V bit? */
+	 */
+	.type	arm1020_cr1_clear, #object
+	.type	arm1020_cr1_set, #object
+arm1020_cr1_clear:
+	.word	0x593f
+arm1020_cr1_set:
+	.word	0x1935
+
 	__INITDATA
 
 /*
@@ -522,7 +515,9 @@
 __arm1020_proc_info:
 	.long	0x4104a200			@ ARM 1020T (Architecture v5T)
 	.long	0xff0ffff0
-	.long	0x00000c02			@ mmuflags
+	.long   PMD_TYPE_SECT | \
+		PMD_SECT_AP_WRITE | \
+		PMD_SECT_AP_READ
 	b	__arm1020_setup
 	.long	cpu_arch_name
 	.long	cpu_elf_name
diff -Nru a/arch/arm/mm/proc-arm1020e.S b/arch/arm/mm/proc-arm1020e.S
--- a/arch/arm/mm/proc-arm1020e.S	2005-01-10 20:11:20 -08:00
+++ b/arch/arm/mm/proc-arm1020e.S	2005-01-10 20:11:20 -08:00
@@ -413,36 +413,29 @@
 	mcr	p15, 0, r0, c7, c7		@ invalidate I,D caches on v4
 	mcr	p15, 0, r0, c7, c10, 4		@ drain write buffer on v4
 	mcr	p15, 0, r0, c8, c7		@ invalidate I,D TLBs on v4
-	mcr	p15, 0, r4, c2, c0		@ load page table pointer
-	mov	r0, #0x1f			@ Domains 0, 1 = client
-	mcr	p15, 0, r0, c3, c0		@ load domain access register
 	mrc	p15, 0, r0, c1, c0		@ get control register v4
-/*
- * Clear out 'unwanted' bits (then put them in if we need them)
- */
-	bic	r0, r0, #0x1e00 		@ i...??r.........
-	bic	r0, r0, #0x000e 		@ ............wca.
-/*
- * Turn on what we want
- */
-	orr	r0, r0, #0x0031 		@ ..........DP...M
-	orr	r0, r0, #0x0100 		@ .......S........
-
+	ldr	r5, arm1020e_cr1_clear
+	bic	r0, r0, r5
+	ldr	r5, arm1020e_cr1_set
+	orr	r0, r0, r5
 #ifdef CONFIG_CPU_CACHE_ROUND_ROBIN
-	orr	r0, r0, #0x4000 		@ .R..............
-#endif
-#ifndef CONFIG_CPU_BPREDICT_DISABLE
-	orr	r0, r0, #0x0800 		@ ....Z...........
-#endif
-#ifndef CONFIG_CPU_DCACHE_DISABLE
-	orr	r0, r0, #0x0004 		@ Enable D cache
-#endif
-#ifndef CONFIG_CPU_ICACHE_DISABLE
-	orr	r0, r0, #0x1000 		@ I Cache on
+	orr	r0, r0, #0x4000 		@ .R.. .... .... ....
 #endif
 	mov	pc, lr
 	.size	__arm1020e_setup, . - __arm1020e_setup
 
+	/*
+	 *  R
+	 * .RVI ZFRS BLDP WCAM
+	 * .0.1 1001 ..11 0101	/* FIXME: why no V bit? */
+	 */
+	.type	arm1020e_cr1_clear, #object
+	.type	arm1020e_cr1_set, #object
+arm1020e_cr1_clear:
+	.word	0x5f3f
+arm1020e_cr1_set:
+	.word	0x1935
+
 	__INITDATA
 
 /*
@@ -504,7 +497,10 @@
 __arm1020e_proc_info:
 	.long	0x4105a200			@ ARM 1020TE (Architecture v5TE)
 	.long	0xff0ffff0
-	.long	0x00000c12			@ mmuflags
+	.long   PMD_TYPE_SECT | \
+		PMD_BIT4 | \
+		PMD_SECT_AP_WRITE | \
+		PMD_SECT_AP_READ
 	b	__arm1020e_setup
 	.long	cpu_arch_name
 	.long	cpu_elf_name
diff -Nru a/arch/arm/mm/proc-arm1022.S b/arch/arm/mm/proc-arm1022.S
--- a/arch/arm/mm/proc-arm1022.S	2005-01-10 20:11:22 -08:00
+++ b/arch/arm/mm/proc-arm1022.S	2005-01-10 20:11:22 -08:00
@@ -394,36 +394,30 @@
 	mcr	p15, 0, r0, c7, c7		@ invalidate I,D caches on v4
 	mcr	p15, 0, r0, c7, c10, 4		@ drain write buffer on v4
 	mcr	p15, 0, r0, c8, c7		@ invalidate I,D TLBs on v4
-	mcr	p15, 0, r4, c2, c0		@ load page table pointer
-	mov	r0, #0x1f			@ Domains 0, 1 = client
-	mcr	p15, 0, r0, c3, c0		@ load domain access register
 	mrc	p15, 0, r0, c1, c0		@ get control register v4
-/*
- * Clear out 'unwanted' bits (then put them in if we need them)
- */
-	bic	r0, r0, #0x1e00 		@ ...i??r.........
-	bic	r0, r0, #0x000e 		@ ............wca.
-/*
- * Turn on what we want
- */
-	orr	r0, r0, #0x0031 		@ ..........DP...M
-	orr	r0, r0, #0x2100 		@ ..V....S........
-
+	ldr	r5, arm1022_cr1_clear
+	bic	r0, r0, r5
+	ldr	r5, arm1022_cr1_set
+	orr	r0, r0, r5
 #ifdef CONFIG_CPU_CACHE_ROUND_ROBIN
 	orr	r0, r0, #0x4000 		@ .R..............
 #endif
-#ifndef CONFIG_CPU_BPREDICT_DISABLE
-	orr	r0, r0, #0x0800 		@ ....Z...........
-#endif
-#ifndef CONFIG_CPU_DCACHE_DISABLE
-	orr	r0, r0, #0x0004 		@ .............C..
-#endif
-#ifndef CONFIG_CPU_ICACHE_DISABLE
-	orr	r0, r0, #0x1000 		@ ...I............
-#endif
 	mov	pc, lr
 	.size	__arm1022_setup, . - __arm1022_setup
 
+	/*
+	 *  R
+	 * .RVI ZFRS BLDP WCAM
+	 * .011 1001 ..11 0101
+	 * 
+	 */
+	.type	arm1022_cr1_clear, #object
+	.type	arm1022_cr1_set, #object
+arm1022_cr1_clear:
+	.word	0x7f3f
+arm1022_cr1_set:
+	.word	0x3935
+
 	__INITDATA
 
 /*
@@ -485,7 +479,10 @@
 __arm1022_proc_info:
 	.long	0x4105a220			@ ARM 1022E (v5TE)
 	.long	0xff0ffff0
-	.long	0x00000c12			@ mmuflags
+	.long   PMD_TYPE_SECT | \
+		PMD_BIT4 | \
+		PMD_SECT_AP_WRITE | \
+		PMD_SECT_AP_READ
 	b	__arm1022_setup
 	.long	cpu_arch_name
 	.long	cpu_elf_name
diff -Nru a/arch/arm/mm/proc-arm1026.S b/arch/arm/mm/proc-arm1026.S
--- a/arch/arm/mm/proc-arm1026.S	2005-01-10 20:11:19 -08:00
+++ b/arch/arm/mm/proc-arm1026.S	2005-01-10 20:11:19 -08:00
@@ -389,35 +389,30 @@
 	mov	r0, #4				@ explicitly disable writeback
 	mcr	p15, 7, r0, c15, c0, 0
 #endif
-	mov	r0, #0x1f			@ Domains 0, 1 = client
-	mcr	p15, 0, r0, c3, c0		@ load domain access register
 	mrc	p15, 0, r0, c1, c0		@ get control register v4
-/*
- * Clear out 'unwanted' bits (then put them in if we need them)
- */
-	bic	r0, r0, #0x1e00 		@ ...i??r.........
-	bic	r0, r0, #0x000e 		@ ............wca.
-/*
- * Turn on what we want
- */
-	orr	r0, r0, #0x0031 		@ ..........DP...M
-	orr	r0, r0, #0x2100 		@ ..V....S........
-
+	ldr	r5, arm1026_cr1_clear
+	bic	r0, r0, r5
+	ldr	r5, arm1026_cr1_set
+	orr	r0, r0, r5
 #ifdef CONFIG_CPU_CACHE_ROUND_ROBIN
-	orr	r0, r0, #0x4000 		@ .R..............
-#endif
-#ifndef CONFIG_CPU_BPREDICT_DISABLE
-	orr	r0, r0, #0x0800 		@ ....Z...........
-#endif
-#ifndef CONFIG_CPU_DCACHE_DISABLE
-	orr	r0, r0, #0x0004 		@ .............C..
-#endif
-#ifndef CONFIG_CPU_ICACHE_DISABLE
-	orr	r0, r0, #0x1000 		@ ...I............
+	orr	r0, r0, #0x4000 		@ .R.. .... .... ....
 #endif
 	mov	pc, lr
 	.size	__arm1026_setup, . - __arm1026_setup
 
+	/*
+	 *  R
+	 * .RVI ZFRS BLDP WCAM
+	 * .011 1001 ..11 0101
+	 * 
+	 */
+	.type	arm1026_cr1_clear, #object
+	.type	arm1026_cr1_set, #object
+arm1026_cr1_clear:
+	.word	0x7f3f
+arm1026_cr1_set:
+	.word	0x3935
+
 	__INITDATA
 
 /*
@@ -480,7 +475,10 @@
 __arm1026_proc_info:
 	.long	0x4106a260			@ ARM 1026EJ-S (v5TEJ)
 	.long	0xff0ffff0
-	.long	0x00000c12			@ mmuflags
+	.long   PMD_TYPE_SECT | \
+		PMD_BIT4 | \
+		PMD_SECT_AP_WRITE | \
+		PMD_SECT_AP_READ
 	b	__arm1026_setup
 	.long	cpu_arch_name
 	.long	cpu_elf_name
diff -Nru a/arch/arm/mm/proc-arm6_7.S b/arch/arm/mm/proc-arm6_7.S
--- a/arch/arm/mm/proc-arm6_7.S	2005-01-10 20:11:24 -08:00
+++ b/arch/arm/mm/proc-arm6_7.S	2005-01-10 20:11:24 -08:00
@@ -253,9 +253,6 @@
 __arm6_setup:	mov	r0, #0
 		mcr	p15, 0, r0, c7, c0		@ flush caches on v3
 		mcr	p15, 0, r0, c5, c0		@ flush TLBs on v3
-		mcr	p15, 0, r4, c2, c0		@ load page table pointer
-		mov	r0, #0x1f			@ Domains 0, 1 = client
-		mcr	p15, 0, r0, c3, c0		@ load domain access register
 		mov	r0, #0x3d			@ . ..RS BLDP WCAM
 		orr	r0, r0, #0x100			@ . ..01 0011 1101
 		mov	pc, lr
@@ -265,8 +262,6 @@
 __arm7_setup:	mov	r0, #0
 		mcr	p15, 0, r0, c7, c0		@ flush caches on v3
 		mcr	p15, 0, r0, c5, c0		@ flush TLBs on v3
-		mcr	p15, 0, r4, c2, c0		@ load page table pointer
-		mov	r0, #0x1f			@ Domains 0, 1 = client
 		mcr	p15, 0, r0, c3, c0		@ load domain access register
 		mov	r0, #0x7d			@ . ..RS BLDP WCAM
 		orr	r0, r0, #0x100			@ . ..01 0111 1101
@@ -391,7 +386,12 @@
 __arm710_proc_info:
 		.long	0x41007100
 		.long	0xfff8ff00
-		.long	0x00000c1e
+		.long   PMD_TYPE_SECT | \
+			PMD_SECT_BUFFERABLE | \
+			PMD_SECT_CACHEABLE | \
+			PMD_BIT4 | \
+			PMD_SECT_AP_WRITE | \
+			PMD_SECT_AP_READ
 		b	__arm7_setup
 		.long	cpu_arch_name
 		.long	cpu_elf_name
diff -Nru a/arch/arm/mm/proc-arm720.S b/arch/arm/mm/proc-arm720.S
--- a/arch/arm/mm/proc-arm720.S	2005-01-10 20:11:20 -08:00
+++ b/arch/arm/mm/proc-arm720.S	2005-01-10 20:11:20 -08:00
@@ -124,37 +124,59 @@
 		mcr	p15, 0, ip, c1, c0, 0		@ ctrl register
 		mov	pc, r0
 
-		__INIT
+	__INIT
 
-		.type	__arm710_setup, #function
-__arm710_setup:	mov	r0, #0
-		mcr	p15, 0, r0, c7, c7, 0		@ invalidate caches
-		mcr	p15, 0, r0, c8, c7, 0		@ flush TLB (v4)
-		mcr	p15, 0, r4, c2, c0		@ load page table pointer
-		mov	r0, #0x1f			@ Domains 0, 1 = client
-		mcr	p15, 0, r0, c3, c0		@ load domain access register
-
-		mrc	p15, 0, r0, c1, c0		@ get control register
-		bic	r0, r0, #0x0e00			@ ..V. ..RS BLDP WCAM
-		orr	r0, r0, #0x0100			@ .... .... .111 .... (old)
-		orr	r0, r0, #0x003d			@ .... ..01 ..11 1101 (new)
-		mov	pc, lr				@ __ret (head.S)
-		.size	__arm710_setup, . - __arm710_setup
-
-		.type	__arm720_setup, #function
-__arm720_setup:	mov	r0, #0
-		mcr	p15, 0, r0, c7, c7, 0		@ invalidate caches
-		mcr	p15, 0, r0, c8, c7, 0		@ flush TLB (v4)
-		mcr	p15, 0, r4, c2, c0		@ load page table pointer
-		mov	r0, #0x1f			@ Domains 0, 1 = client
-		mcr	p15, 0, r0, c3, c0		@ load domain access register
-
-		mrc	p15, 0, r0, c1, c0		@ get control register
-		bic	r0, r0, #0x0e00			@ ..V. ..RS BLDP WCAM
-		orr	r0, r0, #0x2100			@ .... .... .111 .... (old)
-		orr	r0, r0, #0x003d			@ ..1. ..01 ..11 1101 (new)
-		mov	pc, lr				@ __ret (head.S)
-		.size	__arm720_setup, . - __arm720_setup
+	.type	__arm710_setup, #function
+__arm710_setup:
+	mov	r0, #0
+	mcr	p15, 0, r0, c7, c7, 0		@ invalidate caches
+	mcr	p15, 0, r0, c8, c7, 0		@ flush TLB (v4)
+	mrc	p15, 0, r0, c1, c0		@ get control register
+	ldr	r5, arm710_cr1_clear
+	bic	r0, r0, r5
+	ldr	r5, arm710_cr1_set
+	orr	r0, r0, r5
+	mov	pc, lr				@ __ret (head.S)
+	.size	__arm710_setup, . - __arm710_setup
+
+	/*
+	 *  R
+	 * .RVI ZFRS BLDP WCAM
+	 * .... 0001 ..11 1101
+	 * 
+	 */
+	.type	arm710_cr1_clear, #object
+	.type	arm710_cr1_set, #object
+arm710_cr1_clear:
+	.word	0x0f3f
+arm710_cr1_set:
+	.word	0x013d
+
+	.type	__arm720_setup, #function
+__arm720_setup:
+	mov	r0, #0
+	mcr	p15, 0, r0, c7, c7, 0		@ invalidate caches
+	mcr	p15, 0, r0, c8, c7, 0		@ flush TLB (v4)
+	mrc	p15, 0, r0, c1, c0		@ get control register
+	ldr	r5, arm720_cr1_clear
+	bic	r0, r0, r5
+	ldr	r5, arm720_cr1_set
+	orr	r0, r0, r5
+	mov	pc, lr				@ __ret (head.S)
+	.size	__arm720_setup, . - __arm720_setup
+
+	/*
+	 *  R
+	 * .RVI ZFRS BLDP WCAM
+	 * ..1. 1001 ..11 1101
+	 * 
+	 */
+	.type	arm720_cr1_clear, #object
+	.type	arm720_cr1_set, #object
+arm720_cr1_clear:
+	.word	0x2f3f
+arm720_cr1_set:
+	.word	0x213d
 
 		__INITDATA
 
@@ -206,7 +228,12 @@
 __arm710_proc_info:
 		.long	0x41807100				@ cpu_val
 		.long	0xffffff00				@ cpu_mask
-		.long	0x00000c1e				@ section_mmu_flags
+		.long   PMD_TYPE_SECT | \
+			PMD_SECT_BUFFERABLE | \
+			PMD_SECT_CACHEABLE | \
+			PMD_BIT4 | \
+			PMD_SECT_AP_WRITE | \
+			PMD_SECT_AP_READ
 		b	__arm710_setup				@ cpu_flush
 		.long	cpu_arch_name				@ arch_name
 		.long	cpu_elf_name				@ elf_name
@@ -222,7 +249,12 @@
 __arm720_proc_info:
 		.long	0x41807200				@ cpu_val
 		.long	0xffffff00				@ cpu_mask
-		.long	0x00000c1e				@ section_mmu_flags
+		.long   PMD_TYPE_SECT | \
+			PMD_SECT_BUFFERABLE | \
+			PMD_SECT_CACHEABLE | \
+			PMD_BIT4 | \
+			PMD_SECT_AP_WRITE | \
+			PMD_SECT_AP_READ
 		b	__arm720_setup				@ cpu_flush
 		.long	cpu_arch_name				@ arch_name
 		.long	cpu_elf_name				@ elf_name
diff -Nru a/arch/arm/mm/proc-arm920.S b/arch/arm/mm/proc-arm920.S
--- a/arch/arm/mm/proc-arm920.S	2005-01-10 20:11:15 -08:00
+++ b/arch/arm/mm/proc-arm920.S	2005-01-10 20:11:15 -08:00
@@ -382,33 +382,27 @@
 	mcr	p15, 0, r0, c7, c7		@ invalidate I,D caches on v4
 	mcr	p15, 0, r0, c7, c10, 4		@ drain write buffer on v4
 	mcr	p15, 0, r0, c8, c7		@ invalidate I,D TLBs on v4
-	mcr	p15, 0, r4, c2, c0		@ load page table pointer
-	mov	r0, #0x1f			@ Domains 0, 1 = client
-	mcr	p15, 0, r0, c3, c0		@ load domain access register
 	mrc	p15, 0, r0, c1, c0		@ get control register v4
-/*
- * Clear out 'unwanted' bits (then put them in if we need them)
- */
-						@   VI ZFRS BLDP WCAM
-	bic	r0, r0, #0x0e00
-	bic	r0, r0, #0x0002
-	bic	r0, r0, #0x000c
-	bic	r0, r0, #0x1000			@ ...0 000. .... 000.
-/*
- * Turn on what we want
- */
-	orr	r0, r0, #0x0031
-	orr	r0, r0, #0x2100			@ ..1. ...1 ..11 ...1
-
-#ifndef CONFIG_CPU_DCACHE_DISABLE
-	orr	r0, r0, #0x0004			@ .... .... .... .1..
-#endif
-#ifndef CONFIG_CPU_ICACHE_DISABLE
-	orr	r0, r0, #0x1000			@ ...1 .... .... ....
-#endif
+	ldr	r5, arm920_cr1_clear
+	bic	r0, r0, r5
+	ldr	r5, arm920_cr1_set
+	orr	r0, r0, r5
 	mov	pc, lr
 	.size	__arm920_setup, . - __arm920_setup
 
+	/*
+	 *  R
+	 * .RVI ZFRS BLDP WCAM
+	 * ..11 0001 ..11 0101
+	 * 
+	 */
+	.type	arm920_cr1_clear, #object
+	.type	arm920_cr1_set, #object
+arm920_cr1_clear:
+	.word	0x3f3f
+arm920_cr1_set:
+	.word	0x3135
+
 	__INITDATA
 
 /*
@@ -464,7 +458,12 @@
 __arm920_proc_info:
 	.long	0x41009200
 	.long	0xff00fff0
-	.long	0x00000c1e			@ mmuflags
+	.long   PMD_TYPE_SECT | \
+		PMD_SECT_BUFFERABLE | \
+		PMD_SECT_CACHEABLE | \
+		PMD_BIT4 | \
+		PMD_SECT_AP_WRITE | \
+		PMD_SECT_AP_READ
 	b	__arm920_setup
 	.long	cpu_arch_name
 	.long	cpu_elf_name
diff -Nru a/arch/arm/mm/proc-arm922.S b/arch/arm/mm/proc-arm922.S
--- a/arch/arm/mm/proc-arm922.S	2005-01-10 20:11:22 -08:00
+++ b/arch/arm/mm/proc-arm922.S	2005-01-10 20:11:22 -08:00
@@ -386,33 +386,27 @@
 	mcr	p15, 0, r0, c7, c7		@ invalidate I,D caches on v4
 	mcr	p15, 0, r0, c7, c10, 4		@ drain write buffer on v4
 	mcr	p15, 0, r0, c8, c7		@ invalidate I,D TLBs on v4
-	mcr	p15, 0, r4, c2, c0		@ load page table pointer
-	mov	r0, #0x1f			@ Domains 0, 1 = client
-	mcr	p15, 0, r0, c3, c0		@ load domain access register
 	mrc	p15, 0, r0, c1, c0		@ get control register v4
-/*
- * Clear out 'unwanted' bits (then put them in if we need them)
- */
-						@   VI ZFRS BLDP WCAM
-	bic	r0, r0, #0x0e00
-	bic	r0, r0, #0x0002
-	bic	r0, r0, #0x000c
-	bic	r0, r0, #0x1000			@ ...0 000. .... 000.
-/*
- * Turn on what we want
- */
-	orr	r0, r0, #0x0031
-	orr	r0, r0, #0x2100			@ ..1. ...1 ..11 ...1
-
-#ifndef CONFIG_CPU_DCACHE_DISABLE
-	orr	r0, r0, #0x0004			@ .... .... .... .1..
-#endif
-#ifndef CONFIG_CPU_ICACHE_DISABLE
-	orr	r0, r0, #0x1000			@ ...1 .... .... ....
-#endif
+	ldr	r5, arm922_cr1_clear
+	bic	r0, r0, r5
+	ldr	r5, arm922_cr1_set
+	orr	r0, r0, r5
 	mov	pc, lr
 	.size	__arm922_setup, . - __arm922_setup
 
+	/*
+	 *  R
+	 * .RVI ZFRS BLDP WCAM
+	 * ..11 0001 ..11 0101
+	 * 
+	 */
+	.type	arm922_cr1_clear, #object
+	.type	arm922_cr1_set, #object
+arm922_cr1_clear:
+	.word	0x3f3f
+arm922_cr1_set:
+	.word	0x3135
+
 	__INITDATA
 
 /*
@@ -468,7 +462,12 @@
 __arm922_proc_info:
 	.long	0x41009220
 	.long	0xff00fff0
-	.long	0x00000c1e			@ mmuflags
+	.long   PMD_TYPE_SECT | \
+		PMD_SECT_BUFFERABLE | \
+		PMD_SECT_CACHEABLE | \
+		PMD_BIT4 | \
+		PMD_SECT_AP_WRITE | \
+		PMD_SECT_AP_READ
 	b	__arm922_setup
 	.long	cpu_arch_name
 	.long	cpu_elf_name
diff -Nru a/arch/arm/mm/proc-arm925.S b/arch/arm/mm/proc-arm925.S
--- a/arch/arm/mm/proc-arm925.S	2005-01-10 20:11:18 -08:00
+++ b/arch/arm/mm/proc-arm925.S	2005-01-10 20:11:18 -08:00
@@ -439,45 +439,36 @@
 	mcr	p15, 0, r0, c7, c7		@ invalidate I,D caches on v4
 	mcr	p15, 0, r0, c7, c10, 4		@ drain write buffer on v4
 	mcr	p15, 0, r0, c8, c7		@ invalidate I,D TLBs on v4
-	mcr	p15, 0, r4, c2, c0		@ load page table pointer
 
 #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
 	mov	r0, #4				@ disable write-back on caches explicitly
 	mcr	p15, 7, r0, c15, c0, 0
 #endif
 
-	mov	r0, #0x1f			@ Domains 0, 1 = client
-	mcr	p15, 0, r0, c3, c0		@ load domain access register
 	mrc	p15, 0, r0, c1, c0		@ get control register v4
-/*
- * Clear out 'unwanted' bits (then put them in if we need them)
- */
-						@   VI ZFRS BLDP WCAM
-	bic	r0, r0, #0x0e00
-	bic	r0, r0, #0x0002
-	bic	r0, r0, #0x000c
-	bic	r0, r0, #0x1000			@ ...0 000. .... 000.
-/*
- * Turn on what we want
- */
-	orr	r0, r0, #0x0031
-	orr	r0, r0, #0x2100			@ ..1. ...1 ..11 ...1
-
-	/* Writebuffer on */
-	orr	r0, r0, #0x0008			@ .... .... .... 1...
-
+	ldr	r5, arm925_cr1_clear
+	bic	r0, r0, r5
+	ldr	r5, arm925_cr1_set
+	orr	r0, r0, r5
 #ifdef CONFIG_CPU_CACHE_ROUND_ROBIN
 	orr	r0, r0, #0x4000			@ .1.. .... .... ....
 #endif
-#ifndef CONFIG_CPU_DCACHE_DISABLE
-	orr	r0, r0, #0x0004			@ .... .... .... .1..
-#endif
-#ifndef CONFIG_CPU_ICACHE_DISABLE
-	orr	r0, r0, #0x1000			@ ...1 .... .... ....
-#endif
 	mov	pc, lr
 	.size	__arm925_setup, . - __arm925_setup
 
+	/*
+	 *  R
+	 * .RVI ZFRS BLDP WCAM
+	 * .011 0001 ..11 1101
+	 * 
+	 */
+	.type	arm925_cr1_clear, #object
+	.type	arm925_cr1_set, #object
+arm925_cr1_clear:
+	.word	0x7f3f
+arm925_cr1_set:
+	.word	0x313d
+
 	__INITDATA
 
 /*
@@ -536,7 +527,10 @@
 __arm925_proc_info:
 	.long	0x54029250
 	.long	0xfffffff0
-	.long	0x00000c12			@ mmuflags
+	.long   PMD_TYPE_SECT | \
+		PMD_BIT4 | \
+		PMD_SECT_AP_WRITE | \
+		PMD_SECT_AP_READ
 	b	__arm925_setup
 	.long	cpu_arch_name
 	.long	cpu_elf_name
@@ -552,7 +546,10 @@
 __arm915_proc_info:
 	.long	0x54029150
 	.long	0xfffffff0
-	.long	0x00000c12			@ mmuflags
+	.long   PMD_TYPE_SECT | \
+		PMD_BIT4 | \
+		PMD_SECT_AP_WRITE | \
+		PMD_SECT_AP_READ
 	b	__arm925_setup
 	.long	cpu_arch_name
 	.long	cpu_elf_name
diff -Nru a/arch/arm/mm/proc-arm926.S b/arch/arm/mm/proc-arm926.S
--- a/arch/arm/mm/proc-arm926.S	2005-01-10 20:11:19 -08:00
+++ b/arch/arm/mm/proc-arm926.S	2005-01-10 20:11:19 -08:00
@@ -388,7 +388,6 @@
 	mcr	p15, 0, r0, c7, c7		@ invalidate I,D caches on v4
 	mcr	p15, 0, r0, c7, c10, 4		@ drain write buffer on v4
 	mcr	p15, 0, r0, c8, c7		@ invalidate I,D TLBs on v4
-	mcr	p15, 0, r4, c2, c0		@ load page table pointer
 
 
 #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
@@ -396,35 +395,30 @@
 	mcr	p15, 7, r0, c15, c0, 0
 #endif 
 
-	mov	r0, #0x1f			@ Domains 0, 1 = client
-	mcr	p15, 0, r0, c3, c0		@ load domain access register
 	mrc	p15, 0, r0, c1, c0		@ get control register v4
-/*
- * Clear out 'unwanted' bits (then put them in if we need them)
- */
-						@   VI ZFRS BLDP WCAM
-	bic	r0, r0, #0x0e00
-	bic	r0, r0, #0x0002
-	bic	r0, r0, #0x000c
-	bic	r0, r0, #0x1000			@ ...0 000. .... 000.
-/*
- * Turn on what we want
- */
-	orr	r0, r0, #0x0031
-	orr	r0, r0, #0x2100			@ ..1. ...1 ..11 ...1
-
+	ldr	r5, arm926_cr1_clear
+	bic	r0, r0, r5
+	ldr	r5, arm926_cr1_set
+	orr	r0, r0, r5
 #ifdef CONFIG_CPU_CACHE_ROUND_ROBIN
 	orr	r0, r0, #0x4000			@ .1.. .... .... ....
 #endif
-#ifndef CONFIG_CPU_DCACHE_DISABLE
-	orr	r0, r0, #0x0004			@ .... .... .... .1..
-#endif
-#ifndef CONFIG_CPU_ICACHE_DISABLE
-	orr	r0, r0, #0x1000			@ ...1 .... .... ....
-#endif
 	mov	pc, lr
 	.size	__arm926_setup, . - __arm926_setup
 
+	/*
+	 *  R
+	 * .RVI ZFRS BLDP WCAM
+	 * .011 0001 ..11 0101
+	 * 
+	 */
+	.type	arm926_cr1_clear, #object
+	.type	arm926_cr1_set, #object
+arm926_cr1_clear:
+	.word	0x7f3f
+arm926_cr1_set:
+	.word	0x3135
+
 	__INITDATA
 
 /*
@@ -483,7 +477,12 @@
 __arm926_proc_info:
 	.long	0x41069260			@ ARM926EJ-S (v5TEJ)
 	.long	0xff0ffff0
-	.long	0x00000c1e			@ mmuflags
+	.long   PMD_TYPE_SECT | \
+		PMD_SECT_BUFFERABLE | \
+		PMD_SECT_CACHEABLE | \
+		PMD_BIT4 | \
+		PMD_SECT_AP_WRITE | \
+		PMD_SECT_AP_READ
 	b	__arm926_setup
 	.long	cpu_arch_name
 	.long	cpu_elf_name
diff -Nru a/arch/arm/mm/proc-sa110.S b/arch/arm/mm/proc-sa110.S
--- a/arch/arm/mm/proc-sa110.S	2005-01-10 20:11:19 -08:00
+++ b/arch/arm/mm/proc-sa110.S	2005-01-10 20:11:19 -08:00
@@ -186,21 +186,31 @@
 
 	.type	__sa110_setup, #function
 __sa110_setup:
-	mrc	p15, 0, r0, c1, c0		@ get control register v4
-	bic	r0, r0, #0x2e00			@ ..VI ZFRS BLDP WCAM
-	bic	r0, r0, #0x0002			@ ..0. 000. .... ..0.
-	orr	r0, r0, #0x003d
-	orr	r0, r0, #0x1100			@ ...1 ...1 ..11 11.1
 	mov	r10, #0
 	mcr	p15, 0, r10, c7, c7		@ invalidate I,D caches on v4
 	mcr	p15, 0, r10, c7, c10, 4		@ drain write buffer on v4
 	mcr	p15, 0, r10, c8, c7		@ invalidate I,D TLBs on v4
-	mcr	p15, 0, r4, c2, c0		@ load page table pointer
-	mov	r10, #0x1f			@ Domains 0, 1 = client
-	mcr	p15, 0, r10, c3, c0		@ load domain access register
+	mrc	p15, 0, r0, c1, c0		@ get control register v4
+	ldr	r5, sa110_cr1_clear
+	bic	r0, r0, r5
+	ldr	r5, sa110_cr1_set
+	orr	r0, r0, r5
 	mov	pc, lr
 	.size	__sa110_setup, . - __sa110_setup
 
+	/*
+	 *  R
+	 * .RVI ZFRS BLDP WCAM
+	 * ..01 0001 ..11 1101
+	 * 
+	 */
+	.type	sa110_cr1_clear, #object
+	.type	sa110_cr1_set, #object
+sa110_cr1_clear:
+	.word	0x3f3f
+sa110_cr1_set:
+	.word	0x113d
+
 	__INITDATA
 
 /*
@@ -245,7 +255,11 @@
 __sa110_proc_info:
 	.long	0x4401a100
 	.long	0xfffffff0
-	.long	0x00000c0e
+	.long   PMD_TYPE_SECT | \
+		PMD_SECT_BUFFERABLE | \
+		PMD_SECT_CACHEABLE | \
+		PMD_SECT_AP_WRITE | \
+		PMD_SECT_AP_READ
 	b	__sa110_setup
 	.long	cpu_arch_name
 	.long	cpu_elf_name
diff -Nru a/arch/arm/mm/proc-sa1100.S b/arch/arm/mm/proc-sa1100.S
--- a/arch/arm/mm/proc-sa1100.S	2005-01-10 20:11:21 -08:00
+++ b/arch/arm/mm/proc-sa1100.S	2005-01-10 20:11:21 -08:00
@@ -209,21 +209,31 @@
 
 	.type	__sa1100_setup, #function
 __sa1100_setup:
-	mov	r10, #0
-	mcr	p15, 0, r10, c7, c7		@ invalidate I,D caches on v4
-	mcr	p15, 0, r10, c7, c10, 4		@ drain write buffer on v4
-	mcr	p15, 0, r10, c8, c7		@ invalidate I,D TLBs on v4
-	mov	r0, #0x1f			@ Domains 0, 1 = client
-	mcr	p15, 0, r0, c3, c0		@ load domain access register
-	mcr	p15, 0, r4, c2, c0		@ load page table pointer
+	mov	r0, #0
+	mcr	p15, 0, r0, c7, c7		@ invalidate I,D caches on v4
+	mcr	p15, 0, r0, c7, c10, 4		@ drain write buffer on v4
+	mcr	p15, 0, r0, c8, c7		@ invalidate I,D TLBs on v4
 	mrc	p15, 0, r0, c1, c0		@ get control register v4
-	bic	r0, r0, #0x0e00			@ ..VI ZFRS BLDP WCAM
-	bic	r0, r0, #0x0002			@ .... 000. .... ..0.
-	orr	r0, r0, #0x003d
-	orr	r0, r0, #0x3100			@ ..11 ...1 ..11 11.1
+	ldr	r5, sa1100_cr1_clear
+	bic	r0, r0, r5
+	ldr	r5, sa1100_cr1_set
+	orr	r0, r0, r5
 	mov	pc, lr
 	.size	__sa1100_setup, . - __sa1100_setup
 
+	/*
+	 *  R
+	 * .RVI ZFRS BLDP WCAM
+	 * ..11 0001 ..11 1101
+	 * 
+	 */
+	.type	sa1100_cr1_clear, #object
+	.type	sa1100_cr1_set, #object
+sa1100_cr1_clear:
+	.word	0x3f3f
+sa1100_cr1_set:
+	.word	0x313d
+
 	__INITDATA
 
 /*
@@ -276,7 +286,11 @@
 __sa1100_proc_info:
 	.long	0x4401a110
 	.long	0xfffffff0
-	.long	0x00000c0e
+	.long   PMD_TYPE_SECT | \
+		PMD_SECT_BUFFERABLE | \
+		PMD_SECT_CACHEABLE | \
+		PMD_SECT_AP_WRITE | \
+		PMD_SECT_AP_READ
 	b	__sa1100_setup
 	.long	cpu_arch_name
 	.long	cpu_elf_name
@@ -292,7 +306,11 @@
 __sa1110_proc_info:
 	.long	0x6901b110
 	.long	0xfffffff0
-	.long	0x00000c0e
+	.long   PMD_TYPE_SECT | \
+		PMD_SECT_BUFFERABLE | \
+		PMD_SECT_CACHEABLE | \
+		PMD_SECT_AP_WRITE | \
+		PMD_SECT_AP_READ
 	b	__sa1100_setup
 	.long	cpu_arch_name
 	.long	cpu_elf_name
diff -Nru a/arch/arm/mm/proc-v6.S b/arch/arm/mm/proc-v6.S
--- a/arch/arm/mm/proc-v6.S	2005-01-10 20:11:15 -08:00
+++ b/arch/arm/mm/proc-v6.S	2005-01-10 20:11:15 -08:00
@@ -189,27 +189,24 @@
  *	- cache type register is implemented
  */
 __v6_setup:
-	mov	r10, #0
-	mcr	p15, 0, r10, c7, c14, 0		@ clean+invalidate D cache
-	mcr	p15, 0, r10, c7, c5, 0		@ invalidate I cache
-	mcr	p15, 0, r10, c7, c15, 0		@ clean+invalidate cache
-	mcr	p15, 0, r10, c7, c10, 4		@ drain write buffer
-	mcr	p15, 0, r10, c8, c7, 0		@ invalidate I + D TLBs
-	mcr	p15, 0, r10, c2, c0, 2		@ TTB control register
-	mcr	p15, 0, r4, c2, c0, 0		@ load TTB0
+	mov	r0, #0
+	mcr	p15, 0, r0, c7, c14, 0		@ clean+invalidate D cache
+	mcr	p15, 0, r0, c7, c5, 0		@ invalidate I cache
+	mcr	p15, 0, r0, c7, c15, 0		@ clean+invalidate cache
+	mcr	p15, 0, r0, c7, c10, 4		@ drain write buffer
+	mcr	p15, 0, r0, c8, c7, 0		@ invalidate I + D TLBs
+	mcr	p15, 0, r0, c2, c0, 2		@ TTB control register
 	mcr	p15, 0, r4, c2, c0, 1		@ load TTB1
-	mov	r10, #0x1f			@ domains 0, 1 = manager
-	mcr	p15, 0, r10, c3, c0, 0		@ load domain access register
-	mrc	p15, 0, r0, c1, c0, 0		@ read control register
 #ifdef CONFIG_VFP
-	mrc	p15, 0, r10, c1, c0, 2
-	orr	r10, r10, #(3 << 20)
-	mcr	p15, 0, r10, c1, c0, 2		@ Enable full access to VFP
+	mrc	p15, 0, r0, c1, c0, 2
+	orr	r0, r0, #(3 << 20)
+	mcr	p15, 0, r0, c1, c0, 2		@ Enable full access to VFP
 #endif
-	ldr	r10, cr1_clear			@ get mask for bits to clear
-	bic	r0, r0, r10			@ clear bits them
-	ldr	r10, cr1_set			@ get mask for bits to set
-	orr	r0, r0, r10			@ set them
+	mrc	p15, 0, r0, c1, c0, 0		@ read control register
+	ldr	r5, v6_cr1_clear		@ get mask for bits to clear
+	bic	r0, r0, r5			@ clear bits them
+	ldr	r5, v6_cr1_set			@ get mask for bits to set
+	orr	r0, r0, r5			@ set them
 	mov	pc, lr				@ return to head.S:__ret
 
 	/*
@@ -218,11 +215,11 @@
 	 * rrrr rrrx xxx0 0101 xxxx xxxx x111 xxxx < forced
 	 *         0 110       0011 1.00 .111 1101 < we want
 	 */
-	.type	cr1_clear, #object
-	.type	cr1_set, #object
-cr1_clear:
-	.word	0x0120c302
-cr1_set:
+	.type	v6_cr1_clear, #object
+	.type	v6_cr1_set, #object
+v6_cr1_clear:
+	.word	0x01e0fb7f
+v6_cr1_set:
 	.word	0x00c0387d
 
 	.type	v6_processor_functions, #object
@@ -257,7 +254,11 @@
 __v6_proc_info:
 	.long	0x0007b000
 	.long	0x0007f000
-	.long	0x00000c0e
+	.long   PMD_TYPE_SECT | \
+		PMD_SECT_BUFFERABLE | \
+		PMD_SECT_CACHEABLE | \
+		PMD_SECT_AP_WRITE | \
+		PMD_SECT_AP_READ
 	b	__v6_setup
 	.long	cpu_arch_name
 	.long	cpu_elf_name
diff -Nru a/arch/arm/mm/proc-xscale.S b/arch/arm/mm/proc-xscale.S
--- a/arch/arm/mm/proc-xscale.S	2005-01-10 20:11:22 -08:00
+++ b/arch/arm/mm/proc-xscale.S	2005-01-10 20:11:22 -08:00
@@ -594,14 +594,9 @@
 
 	.type	__xscale_setup, #function
 __xscale_setup:
-	mov	r0, #PSR_F_BIT|PSR_I_BIT|SVC_MODE
-	msr	cpsr_c, r0
 	mcr	p15, 0, ip, c7, c7, 0		@ invalidate I, D caches & BTB
 	mcr	p15, 0, ip, c7, c10, 4		@ Drain Write (& Fill) Buffer
 	mcr	p15, 0, ip, c8, c7, 0		@ invalidate I, D TLBs
-	mcr	p15, 0, r4, c2, c0, 0		@ load page table pointer
-	mov	r0, #0x1f			@ Domains 0, 1 = client
-	mcr	p15, 0, r0, c3, c0, 0		@ load domain access register
 #ifdef CONFIG_IWMMXT
 	mov	r0, #0				@ initially disallow access to CP0/CP1
 #else
@@ -611,13 +606,26 @@
 	orr	r0, r0, #1 << 13		@ Its undefined whether this
 	mcr	p15, 0, r0, c15, c1, 0		@ affects USR or SVC modes
 	mrc	p15, 0, r0, c1, c0, 0		@ get control register
-	bic	r0, r0, #0x0200			@ .... ..R. .... ....
-	bic	r0, r0, #0x0002			@ .... .... .... ..A.
-	orr	r0, r0, #0x0005			@ .... .... .... .C.M
-	orr	r0, r0, #0x3900			@ ..VI Z..S .... ....
+	ldr	r5, xscale_cr1_clear
+	bic	r0, r0, r5
+	ldr	r5, xscale_cr1_set
+	orr	r0, r0, r5
 	mov	pc, lr
 	.size	__xscale_setup, . - __xscale_setup
 
+	/*
+	 *  R
+	 * .RVI ZFRS BLDP WCAM
+	 * ..11 1.01 .... .101
+	 * 
+	 */
+	.type	xscale_cr1_clear, #object
+	.type	xscale_cr1_set, #object
+xscale_cr1_clear:
+	.word	0x3b07
+xscale_cr1_set:
+	.word	0x3905
+
 	__INITDATA
 
 /*
@@ -712,7 +720,11 @@
 __80200_proc_info:
 	.long	0x69052000
 	.long	0xfffffff0
-	.long	0x00000c0e
+	.long   PMD_TYPE_SECT | \
+		PMD_SECT_BUFFERABLE | \
+		PMD_SECT_CACHEABLE | \
+		PMD_SECT_AP_WRITE | \
+		PMD_SECT_AP_READ
 	b	__xscale_setup
 	.long	cpu_arch_name
 	.long	cpu_elf_name
@@ -728,7 +740,11 @@
 __8032x_proc_info:
 	.long	0x69052420
 	.long	0xfffff5e0      @ mask should accomodate IOP80219 also
-	.long	0x00000c0e
+	.long   PMD_TYPE_SECT | \
+		PMD_SECT_BUFFERABLE | \
+		PMD_SECT_CACHEABLE | \
+		PMD_SECT_AP_WRITE | \
+		PMD_SECT_AP_READ
 	b	__xscale_setup
 	.long	cpu_arch_name
 	.long	cpu_elf_name
@@ -742,9 +758,13 @@
 
 	.type	__8033x_proc_info,#object
 __8033x_proc_info:
-	.long	0x69054090
-	.long	0xffffffb0
-	.long	0x00000c0e
+	.long	0x69054010
+	.long	0xffffff30
+	.long   PMD_TYPE_SECT | \
+		PMD_SECT_BUFFERABLE | \
+		PMD_SECT_CACHEABLE | \
+		PMD_SECT_AP_WRITE | \
+		PMD_SECT_AP_READ
 	b	__xscale_setup
 	.long	cpu_arch_name
 	.long	cpu_elf_name
@@ -760,7 +780,11 @@
 __pxa250_proc_info:
 	.long	0x69052100
 	.long	0xfffff7f0
-	.long	0x00000c0e
+	.long   PMD_TYPE_SECT | \
+		PMD_SECT_BUFFERABLE | \
+		PMD_SECT_CACHEABLE | \
+		PMD_SECT_AP_WRITE | \
+		PMD_SECT_AP_READ
 	b	__xscale_setup
 	.long	cpu_arch_name
 	.long	cpu_elf_name
@@ -776,7 +800,11 @@
 __pxa210_proc_info:
 	.long	0x69052120
 	.long	0xfffff3f0
-	.long	0x00000c0e
+	.long   PMD_TYPE_SECT | \
+		PMD_SECT_BUFFERABLE | \
+		PMD_SECT_CACHEABLE | \
+		PMD_SECT_AP_WRITE | \
+		PMD_SECT_AP_READ
 	b	__xscale_setup
 	.long	cpu_arch_name
 	.long	cpu_elf_name
@@ -792,7 +820,11 @@
 __ixp2400_proc_info:
 	.long   0x69054190
 	.long   0xfffffff0
-	.long   0x00000c0e
+	.long   PMD_TYPE_SECT | \
+		PMD_SECT_BUFFERABLE | \
+		PMD_SECT_CACHEABLE | \
+		PMD_SECT_AP_WRITE | \
+		PMD_SECT_AP_READ
 	b       __xscale_setup
 	.long   cpu_arch_name
 	.long   cpu_elf_name
@@ -808,7 +840,11 @@
 __ixp2800_proc_info:
 	.long   0x690541a0
 	.long   0xfffffff0
-	.long   0x00000c0e
+	.long   PMD_TYPE_SECT | \
+		PMD_SECT_BUFFERABLE | \
+		PMD_SECT_CACHEABLE | \
+		PMD_SECT_AP_WRITE | \
+		PMD_SECT_AP_READ
 	b       __xscale_setup
 	.long   cpu_arch_name
 	.long   cpu_elf_name
@@ -824,7 +860,11 @@
 __ixp42x_proc_info:
 	.long   0x690541c0
 	.long   0xffffffc0
-	.long   0x00000c0e
+	.long   PMD_TYPE_SECT | \
+		PMD_SECT_BUFFERABLE | \
+		PMD_SECT_CACHEABLE | \
+		PMD_SECT_AP_WRITE | \
+		PMD_SECT_AP_READ
 	b       __xscale_setup
 	.long   cpu_arch_name
 	.long   cpu_elf_name
@@ -856,7 +896,11 @@
 __pxa255_proc_info:
 	.long	0x69052d00
 	.long	0xfffffff0
-	.long	0x00000c0e
+	.long   PMD_TYPE_SECT | \
+		PMD_SECT_BUFFERABLE | \
+		PMD_SECT_CACHEABLE | \
+		PMD_SECT_AP_WRITE | \
+		PMD_SECT_AP_READ
 	b	__xscale_setup
 	.long	cpu_arch_name
 	.long	cpu_elf_name
@@ -872,7 +916,11 @@
 __pxa270_proc_info:
 	.long	0x69054110
 	.long	0xfffffff0
-	.long	0x00000c0e
+	.long   PMD_TYPE_SECT | \
+		PMD_SECT_BUFFERABLE | \
+		PMD_SECT_CACHEABLE | \
+		PMD_SECT_AP_WRITE | \
+		PMD_SECT_AP_READ
 	b	__xscale_setup
 	.long	cpu_arch_name
 	.long	cpu_elf_name
diff -Nru a/arch/arm/oprofile/common.c b/arch/arm/oprofile/common.c
--- a/arch/arm/oprofile/common.c	2005-01-10 20:11:22 -08:00
+++ b/arch/arm/oprofile/common.c	2005-01-10 20:11:22 -08:00
@@ -24,14 +24,6 @@
 static void pmu_stop(void);
 static int pmu_create_files(struct super_block *, struct dentry *);
 
-static struct oprofile_operations pmu_ops = {
-	.create_files	= pmu_create_files,
-	.setup		= pmu_setup,
-	.shutdown	= pmu_stop,
-	.start		= pmu_start,
-	.stop		= pmu_stop,
-};
-
 #ifdef CONFIG_PM
 static struct sys_device device_oprofile = {
 	.id		= 0,
@@ -113,19 +105,22 @@
 	up(&pmu_sem);
 }
 
-int __init pmu_init(struct oprofile_operations **ops, struct op_arm_model_spec *spec)
+void __init pmu_init(struct oprofile_operations *ops, struct op_arm_model_spec *spec)
 {
 	init_MUTEX(&pmu_sem);
 
 	if (spec->init() < 0)
-		return -ENODEV;
+		return;
 
 	pmu_model = spec;
 	init_driverfs();
-	*ops = &pmu_ops;
-	pmu_ops.cpu_type = pmu_model->name;
+	ops->create_files = pmu_create_files;
+	ops->setup = pmu_setup;
+	ops->shutdown = pmu_stop;
+	ops->start = pmu_start;
+	ops->stop = pmu_stop;
+	ops->cpu_type = pmu_model->name;
 	printk(KERN_INFO "oprofile: using %s PMU\n", spec->name);
-	return 0;
 }
 
 void pmu_exit(void)
diff -Nru a/arch/arm/oprofile/init.c b/arch/arm/oprofile/init.c
--- a/arch/arm/oprofile/init.c	2005-01-10 20:11:17 -08:00
+++ b/arch/arm/oprofile/init.c	2005-01-10 20:11:17 -08:00
@@ -12,14 +12,11 @@
 #include <linux/errno.h>
 #include "op_arm_model.h"
 
-int __init oprofile_arch_init(struct oprofile_operations **ops)
+void __init oprofile_arch_init(struct oprofile_operations *ops)
 {
-	int ret = -ENODEV;
-
 #ifdef CONFIG_CPU_XSCALE
-	ret = pmu_init(ops, &op_xscale_spec);
+	pmu_init(ops, &op_xscale_spec);
 #endif
-	return ret;
 }
 
 void oprofile_arch_exit(void)
diff -Nru a/arch/arm/oprofile/op_model_xscale.c b/arch/arm/oprofile/op_model_xscale.c
--- a/arch/arm/oprofile/op_model_xscale.c	2005-01-10 20:11:19 -08:00
+++ b/arch/arm/oprofile/op_model_xscale.c	2005-01-10 20:11:19 -08:00
@@ -343,8 +343,7 @@
 
 static irqreturn_t xscale_pmu_interrupt(int irq, void *arg, struct pt_regs *regs)
 {
-	unsigned long pc = profile_pc(regs);
-	int i, is_kernel = !user_mode(regs);
+	int i;
 	u32 pmnc;
 
 	if (pmu->id == PMU_XSC1)
@@ -357,7 +356,7 @@
 			continue;
 
 		write_counter(i, -(u32)results[i].reset_counter);
-		oprofile_add_sample(pc, is_kernel, i, smp_processor_id());
+		oprofile_add_sample(regs, i);
 		results[i].ovf--;
 	}
 
diff -Nru a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types
--- a/arch/arm/tools/mach-types	2005-01-10 20:11:19 -08:00
+++ b/arch/arm/tools/mach-types	2005-01-10 20:11:19 -08:00
@@ -6,7 +6,7 @@
 # To add an entry into this database, please see Documentation/arm/README,
 # or contact rmk@arm.linux.org.uk
 #
-# Last update: Sun Nov 7 13:20:41 2004
+# Last update: Thu Jan 6 00:10:23 2005
 #
 # machine_is_xxx	CONFIG_xxxx		MACH_TYPE_xxx		number
 #
@@ -226,7 +226,7 @@
 pnp1110			SA1100_PNP1110		PNP1110			215
 csb226			ARCH_CSB226		CSB226			216
 arnold			SA1100_ARNOLD		ARNOLD			217
-psiboard		SA1100_PSIBOARD		PSIBOARD		218
+voiceblue		SA1100_PSIBOARD		PSIBOARD		218
 jz8028			ARCH_JZ8028		JZ8028			219
 h5400			ARCH_H5400		H5400			220
 forte			SA1100_FORTE		FORTE			221
@@ -250,8 +250,8 @@
 pdb			ARCH_PDB		PDB			239
 blue_2g			SA1100_BLUE_2G		BLUE_2G			240
 bluearch		SA1100_BLUEARCH		BLUEARCH		241
-ixdp2400		ARCH_IXDB2400		IXDB2400		242
-ixdp2800		ARCH_IXDB2800		IXDB2800		243
+ixdp2400		ARCH_IXDP2400		IXDP2400		242
+ixdp2800		ARCH_IXDP2800		IXDP2800		243
 explorer		SA1100_EXPLORER		EXPLORER		244
 ixdp425			ARCH_IXDP425		IXDP425			245
 chimp			ARCH_CHIMP		CHIMP			246
@@ -634,3 +634,36 @@
 cm4008			MACH_CM4008		CM4008			624
 p2001			MACH_P2001		P2001			625
 twister			MACH_TWISTER		TWISTER			626
+mudshark		MACH_MUDSHARK		MUDSHARK		627
+hb2			MACH_HB2		HB2			628
+iq80332			MACH_IQ80332		IQ80332			629
+sendt			MACH_SENDT		SENDT			630
+mx2jazz			MACH_MX2JAZZ		MX2JAZZ			631
+multiio			MACH_MULTIIO		MULTIIO			632
+hrdisplay		MACH_HRDISPLAY		HRDISPLAY		633
+scma11bb		MACH_SCMA11BB		SCMA11BB		634
+trizeps3		MACH_TRIZEPS3		TRIZEPS3		635
+zefeerdza		MACH_ZEFEERDZA		ZEFEERDZA		636
+zefeerdzb		MACH_ZEFEERDZB		ZEFEERDZB		637
+zefeerdzg		MACH_ZEFEERDZG		ZEFEERDZG		638
+zefeerdzn		MACH_ZEFEERDZN		ZEFEERDZN		639
+zefeerdzq		MACH_ZEFEERDZQ		ZEFEERDZQ		640
+gtwx5715		MACH_GTWX5715		GTWX5715		641
+unknown			MACH_VL420		VL420			642
+astro_jack		MACH_ASTRO_JACK		ASTRO_JACK		643
+tip03			MACH_TIP03		TIP03			644
+a9200ec			MACH_A9200EC		A9200EC			645
+pnx0105			MACH_PNX0105		PNX0105			646
+adcpoecpu		MACH_ADCPOECPU		ADCPOECPU		647
+csb637			MACH_CSB637		CSB637			648
+ml69q6203		MACH_ML69Q6203		ML69Q6203		649
+mb9200			MACH_MB9200		MB9200			650
+kulun			MACH_KULUN		KULUN			651
+snapper			MACH_SNAPPER		SNAPPER			652
+optima			MACH_OPTIMA		OPTIMA			653
+dlhsbc			MACH_DLHSBC		DLHSBC			654
+x30			MACH_X30		X30			655
+n30			MACH_N30		N30			656
+manga_ks8695		MACH_MANGA_KS8695	MANGA_KS8695		657
+ajax			MACH_AJAX		AJAX			658
+nec_mp900		MACH_NEC_MP900		NEC_MP900		659
diff -Nru a/arch/arm26/ACKNOWLEDGEMENTS b/arch/arm26/ACKNOWLEDGEMENTS
--- a/arch/arm26/ACKNOWLEDGEMENTS	2005-01-10 20:11:23 -08:00
+++ b/arch/arm26/ACKNOWLEDGEMENTS	2005-01-10 20:11:23 -08:00
@@ -15,6 +15,8 @@
 Russell King
 Keith Owens
 
+also thanks to Nicholas Pitre for hints, and for the basis or our XIP support.
+
 Currently maintaing the code are
 
 Ian Molton (Maintainer / Archimedes)
diff -Nru a/arch/arm26/Kconfig b/arch/arm26/Kconfig
--- a/arch/arm26/Kconfig	2005-01-10 20:11:19 -08:00
+++ b/arch/arm26/Kconfig	2005-01-10 20:11:19 -08:00
@@ -45,6 +45,10 @@
 config RWSEM_XCHGADD_ALGORITHM
 	bool
 
+config GENERIC_CALIBRATE_DELAY
+	bool
+	default y
+
 config GENERIC_BUST_SPINLOCK
 	bool
 
diff -Nru a/arch/arm26/Makefile b/arch/arm26/Makefile
--- a/arch/arm26/Makefile	2005-01-10 20:11:18 -08:00
+++ b/arch/arm26/Makefile	2005-01-10 20:11:18 -08:00
@@ -6,6 +6,7 @@
 # for more details.
 #
 # Copyright (C) 1995-2001 by Russell King
+# Copyright (c) 2004 Ian Molton
 
 LDFLAGS_vmlinux	:=-p -X
 CPPFLAGS_vmlinux.lds = -DTEXTADDR=$(TEXTADDR) -DDATAADDR=$(DATAADDR)
@@ -20,13 +21,9 @@
 CFLAGS		+=-g
 endif
 
-# Force -mno-fpu to be passed to the assembler.  Some versions of gcc don't
-# do this with -msoft-float
-CFLAGS_BOOT	:=-mapcs-26 -mcpu=arm3 -mshort-load-bytes -msoft-float -Wa,-mno-fpu -Uarm
-CFLAGS		+=-mapcs-26 -mcpu=arm3 -mshort-load-bytes -msoft-float -Wa,-mno-fpu -Uarm
-AFLAGS		+=-mapcs-26 -mcpu=arm3 -mno-fpu -msoft-float -Wa,-mno-fpu
-
-head-y		:= arch/arm26/machine/head.o arch/arm26/kernel/init_task.o
+CFLAGS_BOOT	:=-mapcs-26 -mcpu=arm3 -msoft-float -Uarm
+CFLAGS		+=-mapcs-26 -mcpu=arm3 -msoft-float -Uarm
+AFLAGS		+=-mapcs-26 -mcpu=arm3 -msoft-float
 
 ifeq ($(CONFIG_XIP_KERNEL),y)
   TEXTADDR	 := 0x03880000
@@ -36,6 +33,8 @@
   DATAADDR       := .
 endif
 
+head-y          := arch/arm26/kernel/head.o arch/arm26/kernel/init_task.o
+
 ifeq ($(incdir-y),)
 incdir-y :=
 endif
@@ -109,6 +108,7 @@
   echo  '* zImage        - Compressed kernel image (arch/$(ARCH)/boot/zImage)'
   echo  '  Image         - Uncompressed kernel image (arch/$(ARCH)/boot/Image)'
   echo  '  bootpImage    - Combined zImage and initial RAM disk' 
+  echo  '  xipImage      - eXecute In Place capable image for ROM use (arch/$(ARCH)/boot/xipImage)'
   echo  '  initrd        - Create an initial image'
   echo  '  install       - Install uncompressed kernel'
   echo  '  zinstall      - Install compressed kernel'
diff -Nru a/arch/arm26/boot/Makefile b/arch/arm26/boot/Makefile
--- a/arch/arm26/boot/Makefile	2005-01-10 20:11:23 -08:00
+++ b/arch/arm26/boot/Makefile	2005-01-10 20:11:23 -08:00
@@ -1,5 +1,5 @@
 #
-# arch/arm/boot/Makefile
+# arch/arm26/boot/Makefile
 #
 # This file is subject to the terms and conditions of the GNU General Public
 # License.  See the file "COPYING" in the main directory of this archive
@@ -51,8 +51,10 @@
 
 ifeq ($(CONFIG_XIP_KERNEL),y)
 $(obj)/xipImage: vmlinux FORCE
-	$(OBJCOPY) -S -O binary -R .data -R .comment vmlinux vmlinux-text.bin
-	$(OBJCOPY) -S -O binary -R .init -R .text -R .comment -R __ex_table -R __ksymtab vmlinux vmlinux-data.bin
+#	$(OBJCOPY) -S -O binary -R .data -R .comment vmlinux vmlinux-text.bin
+# FIXME - where has .pci_fixup crept in from?
+	$(OBJCOPY) -S -O binary -R .data -R .pci_fixup -R .comment vmlinux vmlinux-text.bin
+	$(OBJCOPY) -S -O binary -R .init -R .text -R __ex_table -R .pci_fixup -R __ksymtab -R __ksymtab_gpl -R __kcrctab -R __kcrctab_gpl -R __param -R .comment vmlinux vmlinux-data.bin
 	cat vmlinux-text.bin vmlinux-data.bin > $@
 	$(RM) -f vmlinux-text.bin vmlinux-data.bin
 	@echo '  Kernel: $@ is ready'
diff -Nru a/arch/arm26/boot/compressed/head.S b/arch/arm26/boot/compressed/head.S
--- a/arch/arm26/boot/compressed/head.S	2005-01-10 20:11:21 -08:00
+++ b/arch/arm26/boot/compressed/head.S	2005-01-10 20:11:21 -08:00
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/boot/compressed/head.S
+ *  linux/arch/arm26/boot/compressed/head.S
  *
  *  Copyright (C) 1996-2002 Russell King
  *
diff -Nru a/arch/arm26/boot/compressed/ll_char_wr.S b/arch/arm26/boot/compressed/ll_char_wr.S
--- a/arch/arm26/boot/compressed/ll_char_wr.S	2005-01-10 20:11:15 -08:00
+++ b/arch/arm26/boot/compressed/ll_char_wr.S	2005-01-10 20:11:15 -08:00
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/ll_char_wr.S
+ *  linux/arch/arm26/lib/ll_char_wr.S
  *
  *  Copyright (C) 1995, 1996 Russell King.
  *
diff -Nru a/arch/arm26/boot/compressed/ofw-shark.c b/arch/arm26/boot/compressed/ofw-shark.c
--- a/arch/arm26/boot/compressed/ofw-shark.c	2005-01-10 20:11:24 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,258 +0,0 @@
-/*
- * linux/arch/arm/boot/compressed/ofw-shark.c
- *
- * by Alexander Schulz
- *
- * This file is used to get some basic information
- * about the memory layout of the shark we are running
- * on. Memory is usually divided in blocks a 8 MB.
- * And bootargs are copied from OpenFirmware.
- */
-
-
-#include <linux/kernel.h>
-#include <linux/types.h>
-#include <asm/setup.h>
-#include <asm/page.h>
-
-
-asmlinkage void
-create_params (unsigned long *buffer)
-{
-	/* Is there a better address? Also change in mach-shark/core.c */
-	struct tag *tag = (struct tag *) 0x08003000;
-	int j,i,m,k,nr_banks,size;
-	unsigned char *c;
-
-	/* Head of the taglist */
-	tag->hdr.tag  = ATAG_CORE;
-	tag->hdr.size = tag_size(tag_core);
-	tag->u.core.flags = FLAG_READONLY;
-	tag->u.core.pagesize = PAGE_SIZE;
-	tag->u.core.rootdev = 0;
-
-	/* Build up one tagged block for each memory region */
-	size=0;
-	nr_banks=(unsigned int) buffer[0];
-	for (j=0;j<nr_banks;j++){
-		/* search the lowest address and put it into the next entry   */
-		/* not a fast sort algorithm, but there are at most 8 entries */
-		/* and this is used only once anyway                          */
-		m=0xffffffff;
-		for (i=0;i<(unsigned int) buffer[0];i++){
-			if (buffer[2*i+1]<m) {
-				m=buffer[2*i+1];
-				k=i;
-			}
-		}
-	  
-		tag = tag_next(tag);
-		tag->hdr.tag = ATAG_MEM;
-		tag->hdr.size = tag_size(tag_mem32);
-		tag->u.mem.size = buffer[2*k+2];
-		tag->u.mem.start = buffer[2*k+1];
-
-		size += buffer[2*k+2];
-
-		buffer[2*k+1]=0xffffffff;                    /* mark as copied */
-	}
-	
-	/* The command line */
-	tag = tag_next(tag);
-	tag->hdr.tag = ATAG_CMDLINE;
-	
-	c=(unsigned char *)(&buffer[34]);
-	j=0;
-	while (*c) tag->u.cmdline.cmdline[j++]=*c++;
-
-	tag->u.cmdline.cmdline[j]=0;
-	tag->hdr.size = (j + 7 + sizeof(struct tag_header)) >> 2;
-
-	/* Hardware revision */
-	tag = tag_next(tag);
-	tag->hdr.tag = ATAG_REVISION;
-	tag->hdr.size = tag_size(tag_revision);
-	tag->u.revision.rev = ((unsigned char) buffer[33])-'0';
-
-	/* End of the taglist */
-	tag = tag_next(tag);
-	tag->hdr.tag = 0;
-	tag->hdr.size = 0;
-}
-
-
-typedef int (*ofw_handle_t)(void *);
-
-/* Everything below is called with a wrong MMU setting.
- * This means: no string constants, no initialization of
- * arrays, no global variables! This is ugly but I didn't
- * want to write this in assembler :-)
- */
-
-int
-of_decode_int(const unsigned char *p)
-{
-	unsigned int i = *p++ << 8;
-	i = (i + *p++) << 8;
-	i = (i + *p++) << 8;
-	return (i + *p);
-}
-  
-int
-OF_finddevice(ofw_handle_t openfirmware, char *name)
-{
-	unsigned int args[8];
-	char service[12];
-
-	service[0]='f';
-	service[1]='i';
-	service[2]='n';
-	service[3]='d';
-	service[4]='d';
-	service[5]='e';
-	service[6]='v';
-	service[7]='i';
-	service[8]='c';
-	service[9]='e';
-	service[10]='\0';
-
-	args[0]=(unsigned int)service;
-	args[1]=1;
-	args[2]=1;
-	args[3]=(unsigned int)name;
-
-	if (openfirmware(args) == -1)
-		return -1;
-	return args[4];
-}
-
-int
-OF_getproplen(ofw_handle_t openfirmware, int handle, char *prop)
-{
-	unsigned int args[8];
-	char service[12];
-
-	service[0]='g';
-	service[1]='e';
-	service[2]='t';
-	service[3]='p';
-	service[4]='r';
-	service[5]='o';
-	service[6]='p';
-	service[7]='l';
-	service[8]='e';
-	service[9]='n';
-	service[10]='\0';
-
-	args[0] = (unsigned int)service;
-	args[1] = 2;
-	args[2] = 1;
-	args[3] = (unsigned int)handle;
-	args[4] = (unsigned int)prop;
-
-	if (openfirmware(args) == -1)
-		return -1;
-	return args[5];
-}
-  
-int
-OF_getprop(ofw_handle_t openfirmware, int handle, char *prop, void *buf, unsigned int buflen)
-{
-	unsigned int args[8];
-	char service[8];
-
-	service[0]='g';
-	service[1]='e';
-	service[2]='t';
-	service[3]='p';
-	service[4]='r';
-	service[5]='o';
-	service[6]='p';
-	service[7]='\0';
-
-	args[0] = (unsigned int)service;
-	args[1] = 4;
-	args[2] = 1;
-	args[3] = (unsigned int)handle;
-	args[4] = (unsigned int)prop;
-	args[5] = (unsigned int)buf;
-	args[6] = buflen;
-
-	if (openfirmware(args) == -1)
-		return -1;
-	return args[7];
-}
-  
-asmlinkage void ofw_init(ofw_handle_t o, int *nomr, int *pointer)
-{
-	int phandle,i,mem_len,buffer[32];
-	char temp[15];
-  
-	temp[0]='/';
-	temp[1]='m';
-	temp[2]='e';
-	temp[3]='m';
-	temp[4]='o';
-	temp[5]='r';
-	temp[6]='y';
-	temp[7]='\0';
-
-	phandle=OF_finddevice(o,temp);
-
-	temp[0]='r';
-	temp[1]='e';
-	temp[2]='g';
-	temp[3]='\0';
-
-	mem_len = OF_getproplen(o,phandle, temp);
-	OF_getprop(o,phandle, temp, buffer, mem_len);
-	*nomr=mem_len >> 3;
-
-	for (i=0; i<=mem_len/4; i++) pointer[i]=of_decode_int((const unsigned char *)&buffer[i]);
-
-	temp[0]='/';
-	temp[1]='c';
-	temp[2]='h';
-	temp[3]='o';
-	temp[4]='s';
-	temp[5]='e';
-	temp[6]='n';
-	temp[7]='\0';
-
-	phandle=OF_finddevice(o,temp);
-
-	temp[0]='b';
-	temp[1]='o';
-	temp[2]='o';
-	temp[3]='t';
-	temp[4]='a';
-	temp[5]='r';
-	temp[6]='g';
-	temp[7]='s';
-	temp[8]='\0';
-
-	mem_len = OF_getproplen(o,phandle, temp);
-	OF_getprop(o,phandle, temp, buffer, mem_len);
-	if (mem_len > 128) mem_len=128;
-	for (i=0; i<=mem_len/4; i++) pointer[i+33]=buffer[i];
-	pointer[i+33]=0;
-
-	temp[0]='/';
-	temp[1]='\0';
-	phandle=OF_finddevice(o,temp);
-	temp[0]='b';
-	temp[1]='a';
-	temp[2]='n';
-	temp[3]='n';
-	temp[4]='e';
-	temp[5]='r';
-	temp[6]='-';
-	temp[7]='n';
-	temp[8]='a';
-	temp[9]='m';
-	temp[10]='e';
-	temp[11]='\0';
-	mem_len = OF_getproplen(o,phandle, temp);
-	OF_getprop(o,phandle, temp, buffer, mem_len);
-	(unsigned char) pointer[32] = ((unsigned char *) buffer)[mem_len-2];
-}
diff -Nru a/arch/arm26/boot/compressed/uncompress.h b/arch/arm26/boot/compressed/uncompress.h
--- a/arch/arm26/boot/compressed/uncompress.h	2005-01-10 20:11:19 -08:00
+++ b/arch/arm26/boot/compressed/uncompress.h	2005-01-10 20:11:19 -08:00
@@ -1,5 +1,4 @@
 /*
- *  linux/include/asm-arm/arch-arc/uncompress.h
  *
  *  Copyright (C) 1996 Russell King
  *
diff -Nru a/arch/arm26/boot/compressed/vmlinux.lds.in b/arch/arm26/boot/compressed/vmlinux.lds.in
--- a/arch/arm26/boot/compressed/vmlinux.lds.in	2005-01-10 20:11:16 -08:00
+++ b/arch/arm26/boot/compressed/vmlinux.lds.in	2005-01-10 20:11:16 -08:00
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/boot/compressed/vmlinux.lds.in
+ *  linux/arch/arm26/boot/compressed/vmlinux.lds.in
  *
  *  Copyright (C) 2000 Russell King
  *
diff -Nru a/arch/arm26/boot/install.sh b/arch/arm26/boot/install.sh
--- a/arch/arm26/boot/install.sh	2005-01-10 20:11:22 -08:00
+++ b/arch/arm26/boot/install.sh	2005-01-10 20:11:22 -08:00
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# arch/arm/boot/install.sh
+# arch/arm26/boot/install.sh
 #
 # This file is subject to the terms and conditions of the GNU General Public
 # License.  See the file "COPYING" in the main directory of this archive
@@ -10,7 +10,7 @@
 #
 # Adapted from code in arch/i386/boot/Makefile by H. Peter Anvin
 # Adapted from code in arch/i386/boot/install.sh by Russell King
-# Stolen from arch/arm/boot/install.sh by Ian Molton
+# Stolen from arm32 by Ian Molton
 #
 # "make install" script for arm architecture
 #
diff -Nru a/arch/arm26/kernel/Makefile b/arch/arm26/kernel/Makefile
--- a/arch/arm26/kernel/Makefile	2005-01-10 20:11:18 -08:00
+++ b/arch/arm26/kernel/Makefile	2005-01-10 20:11:18 -08:00
@@ -2,17 +2,16 @@
 # Makefile for the linux kernel.
 #
 
-ENTRY_OBJ = entry.o
-
 # Object file lists.
 
-obj-y		:= compat.o dma.o entry.o irq.o   \
-		   process.o ptrace.o semaphore.o setup.o signal.o sys_arm.o \
-		   time.o traps.o ecard.o time-acorn.o dma.o \
-		   ecard.o fiq.o time.o
+AFLAGS_head.o           := -DTEXTADDR=$(TEXTADDR)
+
+obj-y		:= compat.o dma.o entry.o irq.o process.o ptrace.o       \
+		   semaphore.o setup.o signal.o sys_arm.o time.o traps.o \
+		   ecard.o dma.o ecard.o fiq.o time.o
+
+extra-y		:= head.o init_task.o vmlinux.lds
 
 obj-$(CONFIG_FIQ)		+= fiq.o
 obj-$(CONFIG_MODULES)		+= armksyms.o
-
-extra-y := init_task.o vmlinux.lds
 
diff -Nru a/arch/arm26/kernel/armksyms.c b/arch/arm26/kernel/armksyms.c
--- a/arch/arm26/kernel/armksyms.c	2005-01-10 20:11:18 -08:00
+++ b/arch/arm26/kernel/armksyms.c	2005-01-10 20:11:18 -08:00
@@ -7,6 +7,7 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
+#include <linux/module.h>
 #include <linux/config.h>
 #include <linux/module.h>
 #include <linux/user.h>
@@ -27,8 +28,6 @@
 #include <asm/elf.h>
 #include <asm/io.h>
 #include <asm/irq.h>
-#include <asm/pgalloc.h>
-//#include <asm/proc-fns.h>
 #include <asm/processor.h>
 #include <asm/semaphore.h>
 #include <asm/system.h>
@@ -69,8 +68,9 @@
 /*
  * This has a special calling convention; it doesn't
  * modify any of the usual registers, except for LR.
+ * FIXME - we used to use our own local version - looks to be in kernel/softirq now
  */
-extern void __do_softirq(void);
+//extern void __do_softirq(void);
 
 #define EXPORT_SYMBOL_ALIAS(sym,orig)		\
  const char __kstrtab_##sym[]			\
@@ -95,7 +95,7 @@
 EXPORT_SYMBOL(kd_mksound);
 #endif
 
-EXPORT_SYMBOL(__do_softirq);
+//EXPORT_SYMBOL(__do_softirq);
 
 	/* platform dependent support */
 EXPORT_SYMBOL(dump_thread);
@@ -212,12 +212,6 @@
 EXPORT_SYMBOL(sys_open);
 EXPORT_SYMBOL(sys_exit);
 EXPORT_SYMBOL(sys_wait4);
-
-	/* semaphores */
-EXPORT_SYMBOL(__down_failed);
-EXPORT_SYMBOL(__down_interruptible_failed);
-EXPORT_SYMBOL(__down_trylock_failed);
-EXPORT_SYMBOL(__up_wakeup);
 
 EXPORT_SYMBOL(get_wchan);
 
diff -Nru a/arch/arm26/kernel/calls.S b/arch/arm26/kernel/calls.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/arm26/kernel/calls.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,265 @@
+/*
+ *  linux/arch/arm26/kernel/calls.S
+ *
+ *  Copyright (C) 2003 Ian Molton
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ *  FIXME
+ *  This file is included twice in entry.S which may not be necessary
+ */
+
+//FIXME - clearly NR_syscalls is never defined here
+
+#ifndef NR_syscalls
+#define NR_syscalls 256
+#else
+
+__syscall_start:
+/* 0 */		.long	sys_ni_syscall
+		.long	sys_exit
+		.long	sys_fork_wrapper
+		.long	sys_read
+		.long	sys_write
+/* 5 */		.long	sys_open
+		.long	sys_close
+		.long	sys_ni_syscall		/* was sys_waitpid */
+		.long	sys_creat
+		.long	sys_link
+/* 10 */	.long	sys_unlink
+		.long	sys_execve_wrapper
+		.long	sys_chdir
+		.long	sys_time		/* used by libc4 */
+		.long	sys_mknod
+/* 15 */	.long	sys_chmod
+		.long	sys_lchown16
+		.long	sys_ni_syscall		/* was sys_break */
+		.long	sys_ni_syscall		/* was sys_stat */
+		.long	sys_lseek
+/* 20 */	.long	sys_getpid
+		.long	sys_mount
+		.long	sys_oldumount		/* used by libc4 */
+		.long	sys_setuid16
+		.long	sys_getuid16
+/* 25 */	.long	sys_stime
+		.long	sys_ptrace
+		.long	sys_alarm		/* used by libc4 */
+		.long	sys_ni_syscall		/* was sys_fstat */
+		.long	sys_pause
+/* 30 */	.long	sys_utime		/* used by libc4 */
+		.long	sys_ni_syscall		/* was sys_stty */
+		.long	sys_ni_syscall		/* was sys_getty */
+		.long	sys_access
+		.long	sys_nice
+/* 35 */	.long	sys_ni_syscall		/* was sys_ftime */
+		.long	sys_sync
+		.long	sys_kill
+		.long	sys_rename
+		.long	sys_mkdir
+/* 40 */	.long	sys_rmdir
+		.long	sys_dup
+		.long	sys_pipe
+		.long	sys_times
+		.long	sys_ni_syscall		/* was sys_prof */
+/* 45 */	.long	sys_brk
+		.long	sys_setgid16
+		.long	sys_getgid16
+		.long	sys_ni_syscall		/* was sys_signal */
+		.long	sys_geteuid16
+/* 50 */	.long	sys_getegid16
+		.long	sys_acct
+		.long	sys_umount
+		.long	sys_ni_syscall		/* was sys_lock */
+		.long	sys_ioctl
+/* 55 */	.long	sys_fcntl
+		.long	sys_ni_syscall		/* was sys_mpx */
+		.long	sys_setpgid
+		.long	sys_ni_syscall		/* was sys_ulimit */
+		.long	sys_ni_syscall		/* was sys_olduname */
+/* 60 */	.long	sys_umask
+		.long	sys_chroot
+		.long	sys_ustat
+		.long	sys_dup2
+		.long	sys_getppid
+/* 65 */	.long	sys_getpgrp
+		.long	sys_setsid
+		.long	sys_sigaction
+		.long	sys_ni_syscall		/* was sys_sgetmask */
+		.long	sys_ni_syscall		/* was sys_ssetmask */
+/* 70 */	.long	sys_setreuid16
+		.long	sys_setregid16
+		.long	sys_sigsuspend_wrapper
+		.long	sys_sigpending
+		.long	sys_sethostname
+/* 75 */	.long	sys_setrlimit
+		.long	sys_old_getrlimit	/* used by libc4 */
+		.long	sys_getrusage
+		.long	sys_gettimeofday
+		.long	sys_settimeofday
+/* 80 */	.long	sys_getgroups16
+		.long	sys_setgroups16
+		.long	old_select		/* used by libc4 */
+		.long	sys_symlink
+		.long	sys_ni_syscall		/* was sys_lstat */
+/* 85 */	.long	sys_readlink
+		.long	sys_uselib
+		.long	sys_swapon
+		.long	sys_reboot
+		.long	old_readdir		/* used by libc4 */
+/* 90 */	.long	old_mmap		/* used by libc4 */
+		.long	sys_munmap
+		.long	sys_truncate
+		.long	sys_ftruncate
+		.long	sys_fchmod
+/* 95 */	.long	sys_fchown16
+		.long	sys_getpriority
+		.long	sys_setpriority
+		.long	sys_ni_syscall		/* was sys_profil */
+		.long	sys_statfs
+/* 100 */	.long	sys_fstatfs
+		.long	sys_ni_syscall
+		.long	sys_socketcall
+		.long	sys_syslog
+		.long	sys_setitimer
+/* 105 */	.long	sys_getitimer
+		.long	sys_newstat
+		.long	sys_newlstat
+		.long	sys_newfstat
+		.long	sys_ni_syscall		/* was sys_uname */
+/* 110 */	.long	sys_ni_syscall		/* was sys_iopl */
+		.long	sys_vhangup
+		.long	sys_ni_syscall
+		.long	sys_syscall		/* call a syscall */
+		.long	sys_wait4
+/* 115 */	.long	sys_swapoff
+		.long	sys_sysinfo
+		.long	sys_ipc
+		.long	sys_fsync
+		.long	sys_sigreturn_wrapper
+/* 120 */	.long	sys_clone_wapper
+		.long	sys_setdomainname
+		.long	sys_newuname
+		.long	sys_ni_syscall
+		.long	sys_adjtimex
+/* 125 */	.long	sys_mprotect
+		.long	sys_sigprocmask
+		.long	sys_ni_syscall  /* WAS: sys_create_module */
+		.long	sys_init_module
+		.long	sys_delete_module
+/* 130 */	.long	sys_ni_syscall  /* WAS: sys_get_kernel_syms */
+		.long	sys_quotactl
+		.long	sys_getpgid
+		.long	sys_fchdir
+		.long	sys_bdflush
+/* 135 */	.long	sys_sysfs
+		.long	sys_personality
+		.long	sys_ni_syscall		/* .long	_sys_afs_syscall */
+		.long	sys_setfsuid16
+		.long	sys_setfsgid16
+/* 140 */	.long	sys_llseek
+		.long	sys_getdents
+		.long	sys_select
+		.long	sys_flock
+		.long	sys_msync
+/* 145 */	.long	sys_readv
+		.long	sys_writev
+		.long	sys_getsid
+		.long	sys_fdatasync
+		.long	sys_sysctl
+/* 150 */	.long	sys_mlock
+		.long	sys_munlock
+		.long	sys_mlockall
+		.long	sys_munlockall
+		.long	sys_sched_setparam
+/* 155 */	.long	sys_sched_getparam
+		.long	sys_sched_setscheduler
+		.long	sys_sched_getscheduler
+		.long	sys_sched_yield
+		.long	sys_sched_get_priority_max
+/* 160 */	.long	sys_sched_get_priority_min
+		.long	sys_sched_rr_get_interval
+		.long	sys_nanosleep
+		.long	sys_arm_mremap
+		.long	sys_setresuid16
+/* 165 */	.long	sys_getresuid16
+		.long	sys_ni_syscall
+		.long	sys_ni_syscall /* WAS: sys_query_module */
+		.long	sys_poll
+		.long	sys_nfsservctl
+/* 170 */	.long	sys_setresgid16
+		.long	sys_getresgid16
+		.long	sys_prctl
+		.long	sys_rt_sigreturn_wrapper
+		.long	sys_rt_sigaction
+/* 175 */	.long	sys_rt_sigprocmask
+		.long	sys_rt_sigpending
+		.long	sys_rt_sigtimedwait
+		.long	sys_rt_sigqueueinfo
+		.long	sys_rt_sigsuspend_wrapper
+/* 180 */	.long	sys_pread64
+		.long	sys_pwrite64
+		.long	sys_chown16
+		.long	sys_getcwd
+		.long	sys_capget
+/* 185 */	.long	sys_capset
+		.long	sys_sigaltstack_wrapper
+		.long	sys_sendfile
+		.long	sys_ni_syscall
+		.long	sys_ni_syscall
+/* 190 */	.long	sys_vfork_wrapper
+		.long	sys_getrlimit
+		.long	sys_mmap2
+		.long	sys_truncate64
+		.long	sys_ftruncate64
+/* 195 */	.long	sys_stat64
+		.long	sys_lstat64
+		.long	sys_fstat64
+		.long	sys_lchown
+		.long	sys_getuid
+/* 200 */	.long	sys_getgid
+		.long	sys_geteuid
+		.long	sys_getegid
+		.long	sys_setreuid
+		.long	sys_setregid
+/* 205 */	.long	sys_getgroups
+		.long	sys_setgroups
+		.long	sys_fchown
+		.long	sys_setresuid
+		.long	sys_getresuid
+/* 210 */	.long	sys_setresgid
+		.long	sys_getresgid
+		.long	sys_chown
+		.long	sys_setuid
+		.long	sys_setgid
+/* 215 */	.long	sys_setfsuid
+		.long	sys_setfsgid
+		.long	sys_getdents64
+		.long	sys_pivot_root
+		.long	sys_mincore
+/* 220 */	.long	sys_madvise
+		.long	sys_fcntl64
+		.long	sys_ni_syscall /* TUX */
+		.long	sys_ni_syscall /* WAS: sys_security */
+		.long	sys_gettid
+/* 225 */	.long	sys_readahead
+		.long	sys_setxattr
+		.long	sys_lsetxattr
+		.long	sys_fsetxattr
+		.long	sys_getxattr
+/* 230 */	.long	sys_lgetxattr
+		.long	sys_fgetxattr
+		.long	sys_listxattr
+		.long	sys_llistxattr
+		.long	sys_flistxattr
+/* 235 */	.long	sys_removexattr
+		.long	sys_lremovexattr
+		.long	sys_fremovexattr
+		.long	sys_tkill
+__syscall_end:
+
+		.rept	NR_syscalls - (__syscall_end - __syscall_start) / 4
+			.long	sys_ni_syscall
+		.endr
+#endif
diff -Nru a/arch/arm26/kernel/compat.c b/arch/arm26/kernel/compat.c
--- a/arch/arm26/kernel/compat.c	2005-01-10 20:11:21 -08:00
+++ b/arch/arm26/kernel/compat.c	2005-01-10 20:11:21 -08:00
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/kernel/compat.c
+ *  linux/arch/arm26/kernel/compat.c
  *
  *  Copyright (C) 2001 Russell King
  *                2003 Ian Molton
diff -Nru a/arch/arm26/kernel/dma.c b/arch/arm26/kernel/dma.c
--- a/arch/arm26/kernel/dma.c	2005-01-10 20:11:24 -08:00
+++ b/arch/arm26/kernel/dma.c	2005-01-10 20:11:24 -08:00
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/kernel/dma.c
+ *  linux/arch/arm26/kernel/dma.c
  *
  *  Copyright (C) 1995-2000 Russell King
  *                2003      Ian Molton
@@ -24,8 +24,6 @@
 
 spinlock_t dma_spin_lock = SPIN_LOCK_UNLOCKED;
 
-#if MAX_DMA_CHANNELS > 0
-
 static dma_t dma_chan[MAX_DMA_CHANNELS];
 
 /*
@@ -259,33 +257,6 @@
 {
 	arch_dma_init(dma_chan);
 }
-
-#else
-
-int request_dma(dmach_t channel, const char *device_id)
-{
-	return -EINVAL;
-}
-
-int get_dma_residue(dmach_t channel)
-{
-	return 0;
-}
-
-#define GLOBAL_ALIAS(_a,_b) asm (".set " #_a "," #_b "; .globl " #_a)
-GLOBAL_ALIAS(disable_dma, get_dma_residue);
-GLOBAL_ALIAS(enable_dma, get_dma_residue);
-GLOBAL_ALIAS(free_dma, get_dma_residue);
-GLOBAL_ALIAS(get_dma_list, get_dma_residue);
-GLOBAL_ALIAS(set_dma_mode, get_dma_residue);
-GLOBAL_ALIAS(set_dma_page, get_dma_residue);
-GLOBAL_ALIAS(set_dma_count, get_dma_residue);
-GLOBAL_ALIAS(set_dma_addr, get_dma_residue);
-GLOBAL_ALIAS(set_dma_sg, get_dma_residue);
-GLOBAL_ALIAS(set_dma_speed, get_dma_residue);
-GLOBAL_ALIAS(init_dma, get_dma_residue);
-
-#endif
 
 EXPORT_SYMBOL(request_dma);
 EXPORT_SYMBOL(free_dma);
diff -Nru a/arch/arm26/kernel/ecard.c b/arch/arm26/kernel/ecard.c
--- a/arch/arm26/kernel/ecard.c	2005-01-10 20:11:23 -08:00
+++ b/arch/arm26/kernel/ecard.c	2005-01-10 20:11:23 -08:00
@@ -42,9 +42,7 @@
 #include <asm/hardware.h>
 #include <asm/io.h>
 #include <asm/irq.h>
-#include <asm/pgalloc.h>
 #include <asm/mmu_context.h>
-#include <asm/irq.h>
 #include <asm/irqchip.h>
 #include <asm/tlbflush.h>
 
@@ -137,65 +135,23 @@
 	unsigned int len = req->length;
 	unsigned int off = req->address;
 
-	if (req->ec->slot_no == 8) {
-		/*
-		 * The card maintains an index which increments the address
-		 * into a 4096-byte page on each access.  We need to keep
-		 * track of the counter.
-		 */
-		static unsigned int index;
-		unsigned int page;
-
-		page = (off >> 12) * 4;
-		if (page > 256 * 4)
-			return;
-
-		off &= 4095;
-
-		/*
-		 * If we are reading offset 0, or our current index is
-		 * greater than the offset, reset the hardware index counter.
-		 */
-		if (off == 0 || index > off) {
-			*base_addr = 0;
-			index = 0;
-		}
-
-		/*
-		 * Increment the hardware index counter until we get to the
-		 * required offset.  The read bytes are discarded.
-		 */
-		while (index < off) {
-			unsigned char byte;
-			byte = base_addr[page];
-			index += 1;
-		}
-
+	if (!req->use_loader || !req->ec->loader) {
+		off *= 4;
 		while (len--) {
-			*buf++ = base_addr[page];
-			index += 1;
+			*buf++ = base_addr[off];
+			off += 4;
 		}
 	} else {
-
-		if (!req->use_loader || !req->ec->loader) {
-			off *= 4;
-			while (len--) {
-				*buf++ = base_addr[off];
-				off += 4;
-			}
-		} else {
-			while(len--) {
-				/*
-				 * The following is required by some
-				 * expansion card loader programs.
-				 */
-				*(unsigned long *)0x108 = 0;
-				*buf++ = ecard_loader_read(off++, base_addr,
-							   req->ec->loader);
-			}
+		while(len--) {
+			/*
+			 * The following is required by some
+			 * expansion card loader programs.
+			 */
+			*(unsigned long *)0x108 = 0;
+			*buf++ = ecard_loader_read(off++, base_addr,
+						   req->ec->loader);
 		}
 	}
-
 }
 
 static void ecard_do_request(struct ecard_request *req)
@@ -466,7 +422,7 @@
 	for (ec = cards; ec; ec = ec->next) {
 		int pending;
 
-		if (!ec->claimed || ec->irq == NO_IRQ || ec->slot_no == 8)
+		if (!ec->claimed || ec->irq == NO_IRQ)
 			continue;
 
 		if (ec->ops && ec->ops->irqpending)
@@ -494,22 +450,15 @@
 	unsigned long address = 0;
 	int slot = ec->slot_no;
 
-	if (ec->slot_no == 8)
-		return 0;
-
 	ectcr &= ~(1 << slot);
 
 	switch (type) {
 	case ECARD_MEMC:
-		if (slot < 4)
-			address = IO_EC_MEMC_BASE + (slot << 12);
+		address = IO_EC_MEMC_BASE + (slot << 12);
 		break;
 
 	case ECARD_IOC:
-		if (slot < 4)
-			address = IO_EC_IOC_BASE + (slot << 12);
-		if (address)
-			address +=  speed << 17;
+		address = IO_EC_IOC_BASE + (slot << 12) + (speed << 17);
 		break;
 
 	default:
@@ -592,11 +541,9 @@
 	unsigned int slot = ec->slot_no;
 	int i;
 
-	if (slot < 4) {
-		ec_set_resource(ec, ECARD_RES_MEMC,
-				PODSLOT_MEMC_BASE + (slot << 14),
-				PODSLOT_MEMC_SIZE, IORESOURCE_MEM);
-	}
+	ec_set_resource(ec, ECARD_RES_MEMC,
+			PODSLOT_MEMC_BASE + (slot << 14),
+			PODSLOT_MEMC_SIZE, IORESOURCE_MEM);
 
 	for (i = 0; i < ECARD_RES_IOCSYNC - ECARD_RES_IOCSLOW; i++) {
 		ec_set_resource(ec, i + ECARD_RES_IOCSLOW,
@@ -739,12 +686,10 @@
 	/*
 	 * hook the interrupt handlers
 	 */
-	if (slot < 8) {
-		ec->irq = 32 + slot;
-		set_irq_chip(ec->irq, &ecard_chip);
-		set_irq_handler(ec->irq, do_level_IRQ);
-		set_irq_flags(ec->irq, IRQF_VALID);
-	}
+	ec->irq = 32 + slot;
+	set_irq_chip(ec->irq, &ecard_chip);
+	set_irq_handler(ec->irq, do_level_IRQ);
+	set_irq_flags(ec->irq, IRQF_VALID);
 
 	for (ecp = &cards; *ecp; ecp = &(*ecp)->next);
 
@@ -777,7 +722,7 @@
 
 	printk("Probing expansion cards\n");
 
-	for (slot = 0; slot < 4; slot ++) {
+	for (slot = 0; slot < MAX_ECARDS; slot ++) {
 		ecard_probe(slot, ECARD_IOC);
 	}
 
diff -Nru a/arch/arm26/kernel/entry.S b/arch/arm26/kernel/entry.S
--- a/arch/arm26/kernel/entry.S	2005-01-10 20:11:16 -08:00
+++ b/arch/arm26/kernel/entry.S	2005-01-10 20:11:16 -08:00
@@ -3,10 +3,10 @@
  * Assembled from chunks of code in arch/arm
  *
  * Copyright (C) 2003 Ian Molton
+ * Based on the work of RMK.
  *
  */
 
-#include <linux/config.h> /* for CONFIG_ARCH_xxxx */
 #include <linux/linkage.h>
 
 #include <asm/assembler.h>
@@ -35,8 +35,6 @@
 #define BAD_IRQ		3
 #define BAD_UNDEFINSTR	4
 
-#define PT_TRACESYS	0x00000002
-
 @ OS version number used in SWIs
 @  RISC OS is 0
 @  RISC iX is 8
@@ -46,10 +44,12 @@
 
 @
 @ Stack format (ensured by USER_* and SVC_*)
+@ PSR and PC are comined on arm26
 @
-#define S_FRAME_SIZE	72   @ FIXME: Really?
+
+#define S_OFF		8
+
 #define S_OLD_R0	64
-#define S_PSR		60
 #define S_PC		60
 #define S_LR		56
 #define S_SP		52
@@ -66,19 +66,18 @@
 #define S_R2		8
 #define S_R1		4
 #define S_R0		0
-#define S_OFF		8
 
 	.macro	save_user_regs
-	str	r0, [sp, #-4]!
-	str	lr, [sp, #-4]!
+	str	r0, [sp, #-4]!   @ Store SVC r0
+	str	lr, [sp, #-4]!   @ Store user mode PC
 	sub	sp, sp, #15*4
-	stmia	sp, {r0 - lr}^
+	stmia	sp, {r0 - lr}^   @ Store the other user-mode regs
 	mov	r0, r0
 	.endm
 
 	.macro	slow_restore_user_regs
-	ldmia	sp, {r0 - lr}^   @ restore the user regs
-	mov	r0, r0           @ no-op
+	ldmia	sp, {r0 - lr}^   @ restore the user regs not including PC
+	mov	r0, r0
 	ldr	lr, [sp, #15*4]  @ get user PC
 	add	sp, sp, #15*4+8  @ free stack
 	movs	pc, lr           @ return
@@ -93,6 +92,32 @@
 	movs	pc, lr
 	.endm
 
+	.macro	save_svc_regs
+	str     sp, [sp, #-16]!
+	str     lr, [sp, #8]
+	str     lr, [sp, #4]
+	stmfd   sp!, {r0 - r12}
+	mov     r0, #-1
+	str     r0, [sp, #S_OLD_R0]
+	zero_fp
+	.endm
+
+	.macro	save_svc_regs_irq
+	str     sp, [sp, #-16]!
+	str     lr, [sp, #4]
+	ldr     lr, .LCirq
+	ldr     lr, [lr]
+	str     lr, [sp, #8]
+	stmfd   sp!, {r0 - r12}
+	mov     r0, #-1
+	str     r0, [sp, #S_OLD_R0]
+	zero_fp
+	.endm
+
+	.macro	restore_svc_regs
+                ldmfd   sp, {r0 - pc}^
+	.endm
+
 	.macro	mask_pc, rd, rm
 	bic	\rd, \rm, #PCMASK
 	.endm
@@ -117,21 +142,10 @@
 	mov	\rd, \rd, lsl #13
 	.endm
 
-	/*
-	 * Like adr, but force SVC mode (if required)
-	 */
-	.macro	adrsvc, cond, reg, label
-	adr\cond	\reg, \label
-	orr\cond	\reg, \reg, #PSR_I_BIT | MODE_SVC26
-	.endm
-
-
 /*
  * These are the registers used in the syscall handler, and allow us to
  * have in theory up to 7 arguments to a function - r0 to r6.
  *
- * r7 is reserved for the system call number for thumb mode.
- *
  * Note that tbl == why is intentional.
  *
  * We must set at least "tsk" and "why" when calling ret_with_reschedule.
@@ -161,17 +175,6 @@
 #endif
 
 /*
- * Our do_softirq out of line code.  See include/asm-arm26/hardirq.h for
- * the calling assembly.
- */
-ENTRY(__do_softirq)
-	stmfd	sp!, {r0 - r3, ip, lr}
-	bl	do_softirq
-	ldmfd	sp!, {r0 - r3, ip, pc}
-
-	.align	5
-
-/*
  * This is the fast syscall return path.  We do as little as
  * possible here, and this includes saving r0 back into the SVC
  * stack.
@@ -228,7 +231,8 @@
 	bl	syscall_trace
 	b	ret_slow_syscall
 	
-#include <asm/calls.h>
+// FIXME - is this strictly necessary?
+#include "calls.S"
 
 /*=============================================================================
  * SWI handler
@@ -258,7 +262,8 @@
 	tst	ip, #_TIF_SYSCALL_TRACE		@ are we tracing syscalls?
 	bne	__sys_trace
 
-	adrsvc	al, lr, ret_fast_syscall	@ return address
+	adral	lr, ret_fast_syscall            @ set return address
+        orral	lr, lr, #PSR_I_BIT | MODE_SVC26 @ Force SVC mode on return
 	cmp	scno, #NR_syscalls		@ check upper syscall limit
 	ldrcc	pc, [tbl, scno, lsl #2]		@ call sys_* routine
 
@@ -278,7 +283,8 @@
 	mov	r0, #0				@ trace entry [IP = 0]
 	bl	syscall_trace
 
-	adrsvc	al, lr, __sys_trace_return	@ return address
+	adral   lr, __sys_trace_return          @ set return address
+        orral   lr, lr, #PSR_I_BIT | MODE_SVC26 @ Force SVC mode on return
 	add	r1, sp, #S_R0 + S_OFF		@ pointer to regs
 	cmp	scno, #NR_syscalls		@ check upper syscall limit
 	ldmccia	r1, {r0 - r3}			@ have to reload r0 - r3
@@ -301,7 +307,7 @@
 
 	.type	sys_call_table, #object
 ENTRY(sys_call_table)
-#include <asm/calls.h>
+#include "calls.S"
 
 /*============================================================================
  * Special system call wrappers
@@ -387,27 +393,22 @@
 
 		.text
 
-		.equ	ioc_base_high, IOC_BASE & 0xff000000
-		.equ	ioc_base_low, IOC_BASE & 0x00ff0000
-		.macro	disable_fiq
-		mov	r12, #ioc_base_high
-		.if	ioc_base_low
-		orr	r12, r12, #ioc_base_low
-		.endif
-		strb	r12, [r12, #0x38]	@ Disable FIQ register
+		.macro handle_irq
+1:		mov     r4, #IOC_BASE
+		ldrb    r6, [r4, #0x24]            @ get high priority first
+		adr     r5, irq_prio_h
+		teq     r6, #0
+		ldreqb  r6, [r4, #0x14]            @ get low priority
+		adreq   r5, irq_prio_l
+
+                teq     r6, #0                     @ If an IRQ happened...
+                ldrneb  r0, [r5, r6]               @ get IRQ number
+                movne   r1, sp                     @ get struct pt_regs
+                adrne   lr, 1b                     @ Set return address to 1b
+                orrne   lr, lr, #PSR_I_BIT | MODE_SVC26  @ (and force SVC mode)
+                bne     asm_do_IRQ                 @ process IRQ (if asserted)
 		.endm
 
-		.macro	get_irqnr_and_base, irqnr, base
-		mov	r4, #ioc_base_high		@ point at IOC
-		.if	ioc_base_low
-		orr	r4, r4, #ioc_base_low
-		.endif
-		ldrb	\irqnr, [r4, #0x24]		@ get high priority first
-		adr	\base, irq_prio_h
-		teq	\irqnr, #0
-		ldreqb	\irqnr, [r4, #0x14]		@ get low priority
-		adreq	\base, irq_prio_l
-		.endm
 
 /*
  * Interrupt table (incorporates priority)
@@ -448,9 +449,9 @@
 		.endm
 
 #if 1
-/* FIXME (well, ok, dont - but its easy to grep for :) */
 /*
  * Uncomment these if you wish to get more debugging into about data aborts.
+ * FIXME - I bet we can find a way to encode these and keep performance.
  */
 #define FAULT_CODE_LDRSTRPOST	0x80
 #define FAULT_CODE_LDRSTRPRE	0x40
@@ -462,29 +463,6 @@
 #define FAULT_CODE_WRITE	0x02
 #define FAULT_CODE_FORCECOW	0x01
 
-#define SVC_SAVE_ALL				\
-		str	sp, [sp, #-16]!		;\
-		str	lr, [sp, #8]		;\
-		str	lr, [sp, #4]		;\
-		stmfd	sp!, {r0 - r12}		;\
-		mov	r0, #-1			;\
-		str	r0, [sp, #S_OLD_R0]	;\
-		zero_fp
-
-#define SVC_IRQ_SAVE_ALL			\
-		str	sp, [sp, #-16]!		;\
-		str	lr, [sp, #4]		;\
-		ldr	lr, .LCirq		;\
-		ldr	lr, [lr]		;\
-		str	lr, [sp, #8]		;\
-		stmfd	sp!, {r0 - r12}		;\
-		mov	r0, #-1			;\
-		str	r0, [sp, #S_OLD_R0]	;\
-		zero_fp
-
-#define SVC_RESTORE_ALL				\
-		ldmfd	sp, {r0 - pc}^
-		
 /*=============================================================================
  * Undefined FIQs
  *-----------------------------------------------------------------------------
@@ -526,13 +504,13 @@
 /* FIXME - should we trap for a null pointer here? */
 
 /* The SVC mode case */
-__und_svc:      SVC_SAVE_ALL                            @ Non-user mode
+__und_svc:	save_svc_regs                           @ Non-user mode
                 mask_pc r0, lr
                 and     r2, lr, #3
                 sub     r0, r0, #4
                 mov     r1, sp
                 bl      do_undefinstr
-                SVC_RESTORE_ALL
+                restore_svc_regs
 
 /* We get here if the FP emulator doesnt handle the undef instr.
  * If the insn WAS handled, the emulator jumps to ret_from_exception by itself/
@@ -614,7 +592,7 @@
 		ldr	lr, [sp,#S_PC]		@ FIXME program to test this on.  I think its
 		b	.Lbug_undef		@ broken at the moment though!)
 
-__pabt_invalid:	SVC_SAVE_ALL
+__pabt_invalid:	save_svc_regs
 		mov	r0, sp			@ Prefetch aborts are definitely *not*
 		mov	r1, #BAD_PREFETCH	@ allowed in non-user modes.  We cant
 		and	r2, lr, #3		@ recover from this problem.
@@ -648,7 +626,7 @@
 		b	ret_from_exception
 
 Laddrexcptn_not_user:
-		SVC_SAVE_ALL
+		save_svc_regs
 		and	r2, lr, #3
 		teq	r2, #3
 		bne	Laddrexcptn_illegal_mode
@@ -686,56 +664,50 @@
 /*=============================================================================
  * Interrupt (IRQ) handler
  *-----------------------------------------------------------------------------
- * Note: if in user mode, then *no* kernel routine is running, so do not have
- *       to save svc lr
- * (r13 points to irq temp save area)
+ * Note: if the IRQ was taken whilst in user mode, then *no* kernel routine
+ * is running, so do not have to save svc lr.
+ *
+ * Entered in IRQ mode.
  */
 
-vector_IRQ:	ldr	r13, .LCirq			@ I will leave this one in just in case...
-		sub	lr, lr, #4
-		str	lr, [r13]
-		tst	lr, #3
-		bne	__irq_svc
-		teqp	pc, #PSR_I_BIT | MODE_SVC26
+vector_IRQ:	ldr     sp, .LCirq         @ Setup some temporary stack
+                sub     lr, lr, #4
+                str     lr, [sp]           @ push return address
+
+		tst     lr, #3
+		bne	__irq_non_usr
+
+__irq_usr:	teqp	pc, #PSR_I_BIT | MODE_SVC26     @ Enter SVC mode
 		mov	r0, r0
+
 		ldr	lr, .LCirq
-		ldr	lr, [lr]
+		ldr	lr, [lr]           @ Restore lr for jump back to USR
+
 		save_user_regs
 
-1:		get_irqnr_and_base r6, r5
-		teq	r6, #0
-		ldrneb	r0, [r5, r6]			@ get IRQ number
-		movne	r1, sp
-		@
-		@ routine called with r0 = irq number, r1 = struct pt_regs *
-		@
-		adr	lr, 1b
-		orr	lr, lr, #PSR_I_BIT | MODE_SVC26		@ Force SVC
-		bne	asm_do_IRQ
+		handle_irq
 
 		mov	why, #0
-		get_thread_info tsk        @ FIXME - was r5, but seemed wrong.
+		get_thread_info tsk
 		b	ret_to_user
 
+@ Place the IRQ priority table here so that the handle_irq macros above
+@ and below here can access it.
+
 		irq_prio_table
 
-__irq_svc:	teqp	pc, #PSR_I_BIT | MODE_SVC26
+__irq_non_usr:	teqp	pc, #PSR_I_BIT | MODE_SVC26     @ Enter SVC mode
 		mov	r0, r0
-		SVC_IRQ_SAVE_ALL
+
+		save_svc_regs_irq
+
                 and	r2, lr, #3
 		teq	r2, #3
-		bne	__irq_invalid
-1:		get_irqnr_and_base r6, r5
-		teq	r6, #0
-		ldrneb	r0, [r5, r6]			@ get IRQ number
-		movne	r1, sp
-		@
-		@ routine called with r0 = irq number, r1 = struct pt_regs *
-		@
-		adr	lr, 1b
-		orr	lr, lr, #PSR_I_BIT | MODE_SVC26		@ Force SVC
-		bne	asm_do_IRQ			@ Returns to 1b
-		SVC_RESTORE_ALL
+		bne	__irq_invalid                @ IRQ not from SVC mode
+
+		handle_irq
+
+		restore_svc_regs
 
 __irq_invalid:	mov	r0, sp
 		mov	r1, #BAD_IRQ
@@ -762,7 +734,7 @@
 		b	ret_from_exception
 
 Ldata_not_user:
-		SVC_SAVE_ALL
+		save_svc_regs
 		and	r2, lr, #3
 		teq	r2, #3
 		bne	Ldata_illegal_mode
@@ -770,7 +742,7 @@
 		teqeqp	pc, #MODE_SVC26
 		mask_pc	r0, lr
 		bl	Ldata_do
-		SVC_RESTORE_ALL
+		restore_svc_regs
 
 Ldata_illegal_mode:
 		mov	r0, sp
diff -Nru a/arch/arm26/kernel/head.S b/arch/arm26/kernel/head.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/arm26/kernel/head.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,113 @@
+/*
+ *  linux/arch/arm26/kernel/head.S
+ *
+ *  Copyright (C) 1994-2000 Russell King
+ *  Copyright (C) 2003 Ian Molton
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ *  26-bit kernel startup code
+ */
+#include <linux/config.h>
+#include <linux/linkage.h>
+#include <asm/mach-types.h>
+
+		.globl	swapper_pg_dir
+		.equ	swapper_pg_dir,	0x0207d000
+
+/*
+ * Entry point.
+ */
+		.section ".init.text",#alloc,#execinstr
+ENTRY(stext)
+
+__entry:
+		cmp	pc, #0x02000000
+		ldrlt	pc, LC0			@ if 0x01800000, call at 0x02080000
+		teq	r0, #0                  @ Check for old calling method
+		blne	oldparams		@ Move page if old
+
+		adr	r0, LC0
+		ldmib	r0, {r2-r5, sp}		@ Setup stack (and fetch other values)
+
+		mov	r0, #0			@ Clear BSS
+1:		cmp	r2, r3
+		strcc	r0, [r2], #4
+		bcc	1b
+
+		bl	detect_proc_type
+		str	r0, [r4]
+		bl	detect_arch_type
+		str	r0, [r5]
+
+#ifdef CONFIG_XIP_KERNEL
+               ldr     r3, ETEXT                       @ data section copy
+               ldr     r4, SDATA
+               ldr     r5, EDATA
+1:
+               ldr     r6, [r3], #4
+               str     r6, [r4], #4
+               cmp     r4, r5
+               blt     1b
+#endif
+		mov	fp, #0
+		b	start_kernel
+
+LC0:		.word	_stext
+		.word	__bss_start		@ r2
+		.word	_end			@ r3
+		.word	processor_id		@ r4
+		.word	__machine_arch_type	@ r5
+		.word	init_thread_union+8192	@ sp
+#ifdef CONFIG_XIP_KERNEL
+ETEXT:		.word   _endtext
+SDATA:		.word   _sdata
+EDATA:		.word   __bss_start
+#endif
+
+arm2_id:	.long	0x41560200  @ ARM2 and 250 dont have a CPUID
+arm250_id:	.long	0x41560250  @ So we create some after probing for them
+		.align
+
+oldparams:	mov     r4, #0x02000000
+		add	r3, r4, #0x00080000
+		add	r4, r4, #0x0007c000
+1:		ldmia	r0!, {r5 - r12}
+		stmia	r4!, {r5 - r12}
+		cmp	r4, r3
+		blt	1b
+		mov	pc, lr
+
+/*
+ * We need some way to automatically detect the difference between
+ * these two machines.  Unfortunately, it is not possible to detect
+ * the presence of the SuperIO chip, because that will hang the old
+ * Archimedes machines solid.
+ */
+/* DAG: Outdated, these have been combined !!!!!!! */
+detect_arch_type:
+#if defined(CONFIG_ARCH_ARC)
+		mov	r0, #MACH_TYPE_ARCHIMEDES
+#elif defined(CONFIG_ARCH_A5K)
+		mov	r0, #MACH_TYPE_A5K
+#endif
+		mov	pc, lr
+
+detect_proc_type:
+		mov	ip, lr
+		mov	r2, #0xea000000		@ Point undef instr to continuation
+		adr	r0, continue - 12
+		orr	r0, r2, r0, lsr #2
+		mov	r1, #0
+		str	r0, [r1, #4]
+		ldr	r0, arm2_id
+		swp	r2, r2, [r1]		@ check for swp (ARM2 cant)
+		ldr	r0, arm250_id
+		mrc	15, 0, r3, c0, c0	@ check for CP#15 (ARM250 cant)
+		mov	r0, r3
+continue:	mov	r2, #0xeb000000		@ Make undef vector loop
+		sub	r2, r2, #2
+		str	r2, [r1, #4]
+		mov	pc, ip
diff -Nru a/arch/arm26/kernel/init_task.c b/arch/arm26/kernel/init_task.c
--- a/arch/arm26/kernel/init_task.c	2005-01-10 20:11:17 -08:00
+++ b/arch/arm26/kernel/init_task.c	2005-01-10 20:11:17 -08:00
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/kernel/init_task.c
+ *  linux/arch/arm26/kernel/init_task.c
  *
  * Copyright (C) 2003 Ian Molton
  *
@@ -29,7 +29,9 @@
  * We need to make sure that this is 8192-byte aligned due to the
  * way process stacks are handled. This is done by making sure
  * the linker maps this in the .text segment right after head.S,
- * and making head.S ensure the proper alignment.
+ * and making the linker scripts ensure the proper alignment.
+ *
+ * FIXME - should this be 32K alignment on arm26?
  *
  * The things we do for performance...
  */
diff -Nru a/arch/arm26/kernel/process.c b/arch/arm26/kernel/process.c
--- a/arch/arm26/kernel/process.c	2005-01-10 20:11:22 -08:00
+++ b/arch/arm26/kernel/process.c	2005-01-10 20:11:22 -08:00
@@ -68,41 +68,21 @@
 __setup("hlt", hlt_setup);
 
 /*
- * The following aren't currently used.
- */
-void (*pm_idle)(void);
-void (*pm_power_off)(void);
-
-/*
  * This is our default idle handler.  We need to disable
  * interrupts here to ensure we don't miss a wakeup call.
  */
-void default_idle(void)
-{
-	local_irq_disable();
-	if (!need_resched() && !hlt_counter)
-	local_irq_enable();
-}
-
-/*
- * The idle thread.  We try to conserve power, while trying to keep
- * overall latency low.  The architecture specific idle is passed
- * a value to indicate the level of "idleness" of the system.
- */
 void cpu_idle(void)
 {
 	/* endless idle loop with no priority at all */
 	preempt_disable();
 	while (1) {
-		void (*idle)(void) = pm_idle;
-		if (!idle)
-			idle = default_idle;
-		leds_event(led_idle_start);
-		while (!need_resched())
-			idle();
-		leds_event(led_idle_end);
-		schedule();
+		while (!need_resched()) {
+			local_irq_disable();
+			if (!need_resched() && !hlt_counter)
+				local_irq_enable();
+		}
 	}
+	schedule();
 }
 
 static char reboot_mode = 'h';
@@ -115,20 +95,15 @@
 
 __setup("reboot=", reboot_setup);
 
+/* ARM26 cant do these but we still need to define them. */
 void machine_halt(void)
 {
-	leds_event(led_halted);
 }
-
-EXPORT_SYMBOL(machine_halt);
-
 void machine_power_off(void)
 {
-	leds_event(led_halted);
-	if (pm_power_off)
-		pm_power_off();
 }
 
+EXPORT_SYMBOL(machine_halt);
 EXPORT_SYMBOL(machine_power_off);
 
 void machine_restart(char * __unused)
@@ -306,7 +281,7 @@
 asmlinkage void ret_from_fork(void) __asm__("ret_from_fork");
 
 int
-copy_thread(int nr, unsigned long clone_flags, unsigned long esp,
+copy_thread(int nr, unsigned long clone_flags, unsigned long stack_start,
 	    unsigned long unused, struct task_struct *p, struct pt_regs *regs)
 {
 	struct thread_info *thread = p->thread_info;
@@ -315,7 +290,7 @@
 	childregs = __get_user_regs(thread);
 	*childregs = *regs;
 	childregs->ARM_r0 = 0;
-	childregs->ARM_sp = esp;
+	childregs->ARM_sp = stack_start;
 
 	memset(&thread->cpu_context, 0, sizeof(struct cpu_context_save));
 	thread->cpu_context.sp = (unsigned long)childregs;
@@ -367,35 +342,42 @@
 }
 
 /*
- * This is the mechanism for creating a new kernel thread.
- *
- * NOTE! Only a kernel-only process(ie the swapper or direct descendants
- * who haven't done an "execve()") should use this: it will work within
- * a system call from a "real" process, but the process memory space will
- * not be free'd until both the parent and the child have exited.
- * FIXME - taken from arm32
+ * Shuffle the argument into the correct register before calling the
+ * thread function.  r1 is the thread argument, r2 is the pointer to
+ * the thread function, and r3 points to the exit function.
+ * FIXME - make sure this is right - the older code used to zero fp
+ * and cause the parent to call sys_exit (do_exit in this version)
+ */
+extern void kernel_thread_helper(void);
+
+asm(    ".section .text\n"
+"       .align\n"
+"       .type   kernel_thread_helper, #function\n"
+"kernel_thread_helper:\n"
+"       mov     r0, r1\n"
+"       mov     lr, r3\n"
+"       mov     pc, r2\n"
+"       .size   kernel_thread_helper, . - kernel_thread_helper\n"
+"       .previous");
+
+/*
+ * Create a kernel thread.
  */
 pid_t kernel_thread(int (*fn)(void *), void *arg, unsigned long flags)
 {
-        register unsigned int r0 asm("r0") = flags | CLONE_VM | CLONE_UNTRACED;
-        register unsigned int r1 asm("r1") = 0;
-        register pid_t __ret asm("r0");
-
-        __asm__ __volatile__(
-        __syscall(clone)"       @ kernel_thread sys_clone       \n\
-        movs    %0, r0          @ if we are the child           \n\
-        bne     1f                                              \n\
-        mov     fp, #0          @ ensure that fp is zero        \n\
-        mov     r0, %4                                          \n\
-        mov     lr, pc                                          \n\
-        mov     pc, %3                                          \n\
-        b       sys_exit                                        \n\
-1:      "
-        : "=r" (__ret)
-        : "0" (r0), "r" (r1), "r" (fn), "r" (arg)
-        : "lr");
-        return __ret;
+        struct pt_regs regs;
+
+        memset(&regs, 0, sizeof(regs));
+
+        regs.ARM_r1 = (unsigned long)arg;
+        regs.ARM_r2 = (unsigned long)fn;
+        regs.ARM_r3 = (unsigned long)do_exit;
+        regs.ARM_pc = (unsigned long)kernel_thread_helper | MODE_SVC26;
+
+        return do_fork(flags|CLONE_VM|CLONE_UNTRACED, 0, &regs, 0, NULL, NULL);
 }
+EXPORT_SYMBOL(kernel_thread);
+
 
 unsigned long get_wchan(struct task_struct *p)
 {
diff -Nru a/arch/arm26/kernel/semaphore.c b/arch/arm26/kernel/semaphore.c
--- a/arch/arm26/kernel/semaphore.c	2005-01-10 20:11:17 -08:00
+++ b/arch/arm26/kernel/semaphore.c	2005-01-10 20:11:17 -08:00
@@ -12,6 +12,7 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
+#include <linux/module.h>
 #include <linux/config.h>
 #include <linux/sched.h>
 #include <linux/errno.h>
@@ -179,7 +180,7 @@
  * registers (r0 to r3 and lr), but not ip, as we use it as a return
  * value in some cases..
  */
-asm("	.section .sched.text			\n\
+asm("	.section .sched.text , #alloc, #execinstr	\n\
 	.align	5				\n\
 	.globl	__down_failed			\n\
 __down_failed:					\n\
@@ -214,4 +215,9 @@
 	bl	__up				\n\
 	ldmfd	sp!, {r0 - r3, pc}^		\n\
 	");
+
+EXPORT_SYMBOL(__down_failed);
+EXPORT_SYMBOL(__down_interruptible_failed);
+EXPORT_SYMBOL(__down_trylock_failed);
+EXPORT_SYMBOL(__up_wakeup);
 
diff -Nru a/arch/arm26/kernel/setup.c b/arch/arm26/kernel/setup.c
--- a/arch/arm26/kernel/setup.c	2005-01-10 20:11:17 -08:00
+++ b/arch/arm26/kernel/setup.c	2005-01-10 20:11:17 -08:00
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/kernel/setup.c
+ *  linux/arch/arm26/kernel/setup.c
  *
  *  Copyright (C) 1995-2001 Russell King
  *  Copyright (C) 2003 Ian Molton
@@ -119,7 +119,7 @@
 	/*
 	 * locate processor in the list of supported processor
 	 * types.  The linker builds this table for us from the
-	 * entries in arch/arm/mm/proc-*.S
+	 * entries in arch/arm26/mm/proc-*.S
 	 */
 	for (list = &__proc_info_begin; list < &__proc_info_end ; list++)
 		if ((processor_id & list->cpu_mask) == list->cpu_val)
diff -Nru a/arch/arm26/kernel/sys_arm.c b/arch/arm26/kernel/sys_arm.c
--- a/arch/arm26/kernel/sys_arm.c	2005-01-10 20:11:20 -08:00
+++ b/arch/arm26/kernel/sys_arm.c	2005-01-10 20:11:20 -08:00
@@ -13,6 +13,7 @@
  *  have a non-standard calling sequence on the Linux/arm
  *  platform.
  */
+#include <linux/module.h>
 #include <linux/errno.h>
 #include <linux/sched.h>
 #include <linux/slab.h>
@@ -281,3 +282,43 @@
 out:
 	return error;
 }
+
+/* FIXME - see if this is correct for arm26 */
+long execve(const char *filename, char **argv, char **envp)
+{
+	struct pt_regs regs;
+        int ret;
+         memset(&regs, 0, sizeof(struct pt_regs));
+        ret = do_execve((char *)filename, (char __user * __user *)argv,                         (char __user * __user *)envp, &regs);
+        if (ret < 0)
+                goto out;
+
+        /*
+         * Save argc to the register structure for userspace.
+         */
+        regs.ARM_r0 = ret;
+
+        /*
+         * We were successful.  We won't be returning to our caller, but
+         * instead to user space by manipulating the kernel stack.
+         */
+        asm(    "add    r0, %0, %1\n\t"
+                "mov    r1, %2\n\t"
+                "mov    r2, %3\n\t"
+                "bl     memmove\n\t"    /* copy regs to top of stack */
+                "mov    r8, #0\n\t"     /* not a syscall */
+                "mov    r9, %0\n\t"     /* thread structure */
+                "mov    sp, r0\n\t"     /* reposition stack pointer */
+                "b      ret_to_user"
+                :
+                : "r" (current_thread_info()),
+                  "Ir" (THREAD_SIZE - 8 - sizeof(regs)),
+                  "r" (&regs),
+                  "Ir" (sizeof(regs))
+                : "r0", "r1", "r2", "r3", "ip", "memory");
+
+ out:
+        return ret;
+}
+
+EXPORT_SYMBOL(execve);
diff -Nru a/arch/arm26/kernel/time-acorn.c b/arch/arm26/kernel/time-acorn.c
--- a/arch/arm26/kernel/time-acorn.c	2005-01-10 20:11:17 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,69 +0,0 @@
-/*
- *  linux/arch/arm/kernel/time-acorn.c
- *
- *  Copyright (c) 1996-2000 Russell King.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- *  Changelog:
- *   24-Sep-1996	RMK	Created
- *   10-Oct-1996	RMK	Brought up to date with arch-sa110eval
- *   04-Dec-1997	RMK	Updated for new arch/arm/time.c
- *   13-May-2003        IM      Brought over to ARM26
- */
-#include <linux/sched.h>
-#include <linux/interrupt.h>
-#include <linux/init.h>
-
-#include <asm/hardware.h>
-#include <asm/io.h>
-#include <asm/irq.h>
-#include <asm/ioc.h>
-
-extern unsigned long (*gettimeoffset)(void);
-
-static unsigned long ioctime_gettimeoffset(void)
-{
-	unsigned int count1, count2, status;
-        long offset;
-
-        ioc_writeb (0, IOC_T0LATCH);
-        barrier ();
-        count1 = ioc_readb(IOC_T0CNTL) | (ioc_readb(IOC_T0CNTH) << 8);
-        barrier ();
-        status = ioc_readb(IOC_IRQREQA);
-        barrier ();
-        ioc_writeb (0, IOC_T0LATCH);
-        barrier ();
-        count2 = ioc_readb(IOC_T0CNTL) | (ioc_readb(IOC_T0CNTH) << 8);
-
-        offset = count2;
-        if (count2 < count1) {
-                /*
-                 * We have not had an interrupt between reading count1
-                 * and count2.
-                 */
-                if (status & (1 << 5))
-                        offset -= LATCH;
-        } else if (count2 > count1) {
-                /*
-                 * We have just had another interrupt between reading
-                 * count1 and count2.
-                 */
-                offset -= LATCH;
-        }
-
-        offset = (LATCH - offset) * (tick_nsec / 1000);
-        return (offset + LATCH/2) / LATCH;
-}
-
-void __init ioctime_init(void)
-{
-	ioc_writeb(LATCH & 255, IOC_T0LTCHL);
-	ioc_writeb(LATCH >> 8, IOC_T0LTCHH);
-	ioc_writeb(0, IOC_T0GO);
-
-	gettimeoffset = ioctime_gettimeoffset;
-}
diff -Nru a/arch/arm26/kernel/time.c b/arch/arm26/kernel/time.c
--- a/arch/arm26/kernel/time.c	2005-01-10 20:11:20 -08:00
+++ b/arch/arm26/kernel/time.c	2005-01-10 20:11:20 -08:00
@@ -32,7 +32,7 @@
 #include <asm/hardware.h>
 #include <asm/io.h>
 #include <asm/irq.h>
-#include <asm/leds.h>
+#include <asm/ioc.h>
 
 u64 jiffies_64 = INITIAL_JIFFIES;
 
@@ -56,16 +56,53 @@
  */
 int (*set_rtc)(void) = dummy_set_rtc;
 
-static unsigned long dummy_gettimeoffset(void)
+/*
+ * Get time offset based on IOCs timer.
+ * FIXME - if this is called with interrutps off, why the shennanigans
+ * below ?
+ */
+static unsigned long gettimeoffset(void)
 {
-	return 0;
+        unsigned int count1, count2, status;
+        long offset;
+
+        ioc_writeb (0, IOC_T0LATCH);
+        barrier ();
+        count1 = ioc_readb(IOC_T0CNTL) | (ioc_readb(IOC_T0CNTH) << 8);
+        barrier ();
+        status = ioc_readb(IOC_IRQREQA);
+        barrier ();
+        ioc_writeb (0, IOC_T0LATCH);
+        barrier ();
+        count2 = ioc_readb(IOC_T0CNTL) | (ioc_readb(IOC_T0CNTH) << 8);
+
+        offset = count2;
+        if (count2 < count1) {
+                /*
+                 * We have not had an interrupt between reading count1
+                 * and count2.
+                 */
+                if (status & (1 << 5))
+                        offset -= LATCH;
+        } else if (count2 > count1) {
+                /*
+                 * We have just had another interrupt between reading
+                 * count1 and count2.
+                 */
+                offset -= LATCH;
+        }
+
+        offset = (LATCH - offset) * (tick_nsec / 1000);
+        return (offset + LATCH/2) / LATCH;
 }
 
 /*
- * hook for getting the time offset.  Note that it is
- * always called with interrupts disabled.
+ * Scheduler clock - returns current time in nanosec units.
  */
-unsigned long (*gettimeoffset)(void) = dummy_gettimeoffset;
+unsigned long long sched_clock(void)
+{
+	return (unsigned long long)jiffies * (1000000000 / HZ);
+}
 
 static unsigned long next_rtc_update;
 
@@ -187,7 +224,10 @@
  */
 void __init time_init(void)
 {
-        ioctime_init();
+	ioc_writeb(LATCH & 255, IOC_T0LTCHL);
+        ioc_writeb(LATCH >> 8, IOC_T0LTCHH);
+        ioc_writeb(0, IOC_T0GO);
+
 
         setup_irq(IRQ_TIMER, &timer_irq);
 }
diff -Nru a/arch/arm26/kernel/traps.c b/arch/arm26/kernel/traps.c
--- a/arch/arm26/kernel/traps.c	2005-01-10 20:11:20 -08:00
+++ b/arch/arm26/kernel/traps.c	2005-01-10 20:11:20 -08:00
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/kernel/traps.c
+ *  linux/arch/arm26/kernel/traps.c
  *
  *  Copyright (C) 1995-2002 Russell King
  *  Fragments that appear the same as linux/arch/i386/kernel/traps.c (C) Linus Torvalds
@@ -10,9 +10,11 @@
  * published by the Free Software Foundation.
  *
  *  'traps.c' handles hardware exceptions after we have saved some state in
- *  'linux/arch/arm/lib/traps.S'.  Mostly a debugging aid, but will probably
+ *  'linux/arch/arm26/lib/traps.S'.  Mostly a debugging aid, but will probably
  *  kill the offending process.
  */
+
+#include <linux/module.h>
 #include <linux/config.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
@@ -28,7 +30,6 @@
 
 #include <asm/atomic.h>
 #include <asm/io.h>
-#include <asm/pgalloc.h>
 #include <asm/pgtable.h>
 #include <asm/system.h>
 #include <asm/uaccess.h>
@@ -134,8 +135,6 @@
 	dump_mem("Stack: ", sp, 8192+(unsigned long)tsk->thread_info);
 }
 
-EXPORT_SYMBOL(dump_stack);
-
 void dump_stack(void)
 {
 #ifdef CONFIG_DEBUG_ERRORS
@@ -143,6 +142,8 @@
 #endif
 }
 
+EXPORT_SYMBOL(dump_stack);
+
 //FIXME - was a static fn
 void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk)
 {
@@ -425,7 +426,6 @@
 		return 0;
 
 	case NR(usr26):
-	case NR(usr32):
 		break;
 
 	default:
diff -Nru a/arch/arm26/kernel/vmlinux-arm26-xip.lds.in b/arch/arm26/kernel/vmlinux-arm26-xip.lds.in
--- a/arch/arm26/kernel/vmlinux-arm26-xip.lds.in	2005-01-10 20:11:21 -08:00
+++ b/arch/arm26/kernel/vmlinux-arm26-xip.lds.in	2005-01-10 20:11:21 -08:00
@@ -64,6 +64,7 @@
 		_text = .;		/* Text and read-only data	*/
 			*(.text)
 			SCHED_TEXT
+			LOCK_TEXT       /* FIXME - borrowed from arm32 - check*/
 			*(.fixup)
 			*(.gnu.warning)
 			*(.rodata)
@@ -91,9 +92,11 @@
 	_sdata = .;
 
 	.data : {
+		. = ALIGN(8192);
 		/*
 		 * first, the init thread union, aligned
-		 * to an 8192 byte boundary.
+		 * to an 8192 byte boundary. (see arm26/kernel/init_task.c)
+		 * FIXME - sould this be 32K aligned on arm26?
 		 */
 		*(.init.task)
 
diff -Nru a/arch/arm26/kernel/vmlinux-arm26.lds.in b/arch/arm26/kernel/vmlinux-arm26.lds.in
--- a/arch/arm26/kernel/vmlinux-arm26.lds.in	2005-01-10 20:11:16 -08:00
+++ b/arch/arm26/kernel/vmlinux-arm26.lds.in	2005-01-10 20:11:16 -08:00
@@ -65,6 +65,7 @@
 		_text = .;		/* Text and read-only data	*/
 			*(.text)
 			SCHED_TEXT
+			LOCK_TEXT
 			*(.fixup)
 			*(.gnu.warning)
 			*(.rodata)
@@ -90,7 +91,7 @@
 	.data : {
 		/*
 		 * first, the init task union, aligned
-		 * to an 8192 byte boundary.
+		 * to an 8192 byte boundary. (see arm26/kernel/init_task.c)
 		 */
 		*(.init.task)
 
diff -Nru a/arch/arm26/lib/Makefile b/arch/arm26/lib/Makefile
--- a/arch/arm26/lib/Makefile	2005-01-10 20:11:20 -08:00
+++ b/arch/arm26/lib/Makefile	2005-01-10 20:11:20 -08:00
@@ -1,5 +1,5 @@
 #
-# linux/arch/arm/lib/Makefile
+# linux/arch/arm26/lib/Makefile
 #
 # Copyright (C) 1995-2000 Russell King
 #
@@ -7,15 +7,15 @@
 lib-y		:= backtrace.o changebit.o csumipv6.o csumpartial.o   \
 		   csumpartialcopy.o csumpartialcopyuser.o clearbit.o \
 		   copy_page.o delay.o findbit.o memchr.o memcpy.o    \
-		   memset.o memzero.o setbit.o    \
-		   strchr.o strrchr.o testchangebit.o  \
+		   memset.o memzero.o setbit.o                        \
+		   strchr.o strrchr.o testchangebit.o                 \
 		   testclearbit.o testsetbit.o getuser.o              \
 		   putuser.o ashldi3.o ashrdi3.o lshrdi3.o muldi3.o   \
 		   ucmpdi2.o udivdi3.o lib1funcs.o ecard.o io-acorn.o \
 		   floppydma.o io-readsb.o io-writesb.o io-writesl.o  \
-		   uaccess-kernel.o uaccess-user.o io-readsw-armv3.o  \
-		   io-writesw-armv3.o io-readsl-armv3.o ecard.o       \
-		   io-acorn.o floppydma.o
+		   uaccess-kernel.o uaccess-user.o io-readsw.o        \
+		   io-writesw.o io-readsl.o ecard.o io-acorn.o        \
+		   floppydma.o
 
 lib-n		:=
 
diff -Nru a/arch/arm26/lib/backtrace.S b/arch/arm26/lib/backtrace.S
--- a/arch/arm26/lib/backtrace.S	2005-01-10 20:11:21 -08:00
+++ b/arch/arm26/lib/backtrace.S	2005-01-10 20:11:21 -08:00
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/backtrace.S
+ *  linux/arch/arm26/lib/backtrace.S
  *
  *  Copyright (C) 1995, 1996 Russell King
  *
diff -Nru a/arch/arm26/lib/changebit.S b/arch/arm26/lib/changebit.S
--- a/arch/arm26/lib/changebit.S	2005-01-10 20:11:21 -08:00
+++ b/arch/arm26/lib/changebit.S	2005-01-10 20:11:21 -08:00
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/changebit.S
+ *  linux/arch/arm26/lib/changebit.S
  *
  *  Copyright (C) 1995-1996 Russell King
  *
diff -Nru a/arch/arm26/lib/clearbit.S b/arch/arm26/lib/clearbit.S
--- a/arch/arm26/lib/clearbit.S	2005-01-10 20:11:16 -08:00
+++ b/arch/arm26/lib/clearbit.S	2005-01-10 20:11:16 -08:00
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/clearbit.S
+ *  linux/arch/arm26/lib/clearbit.S
  *
  *  Copyright (C) 1995-1996 Russell King
  *
diff -Nru a/arch/arm26/lib/copy_page.S b/arch/arm26/lib/copy_page.S
--- a/arch/arm26/lib/copy_page.S	2005-01-10 20:11:16 -08:00
+++ b/arch/arm26/lib/copy_page.S	2005-01-10 20:11:16 -08:00
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/copypage.S
+ *  linux/arch/arm26/lib/copypage.S
  *
  *  Copyright (C) 1995-1999 Russell King
  *
diff -Nru a/arch/arm26/lib/csumipv6.S b/arch/arm26/lib/csumipv6.S
--- a/arch/arm26/lib/csumipv6.S	2005-01-10 20:11:22 -08:00
+++ b/arch/arm26/lib/csumipv6.S	2005-01-10 20:11:22 -08:00
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/csumipv6.S
+ *  linux/arch/arm26/lib/csumipv6.S
  *
  *  Copyright (C) 1995-1998 Russell King
  *
diff -Nru a/arch/arm26/lib/csumpartial.S b/arch/arm26/lib/csumpartial.S
--- a/arch/arm26/lib/csumpartial.S	2005-01-10 20:11:16 -08:00
+++ b/arch/arm26/lib/csumpartial.S	2005-01-10 20:11:16 -08:00
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/csumpartial.S
+ *  linux/arch/arm26/lib/csumpartial.S
  *
  *  Copyright (C) 1995-1998 Russell King
  *
diff -Nru a/arch/arm26/lib/csumpartialcopy.S b/arch/arm26/lib/csumpartialcopy.S
--- a/arch/arm26/lib/csumpartialcopy.S	2005-01-10 20:11:19 -08:00
+++ b/arch/arm26/lib/csumpartialcopy.S	2005-01-10 20:11:19 -08:00
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/csumpartialcopy.S
+ *  linux/arch/arm26/lib/csumpartialcopy.S
  *
  *  Copyright (C) 1995-1998 Russell King
  *
diff -Nru a/arch/arm26/lib/csumpartialcopygeneric.S b/arch/arm26/lib/csumpartialcopygeneric.S
--- a/arch/arm26/lib/csumpartialcopygeneric.S	2005-01-10 20:11:19 -08:00
+++ b/arch/arm26/lib/csumpartialcopygeneric.S	2005-01-10 20:11:19 -08:00
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/csumpartialcopygeneric.S
+ *  linux/arch/arm26/lib/csumpartialcopygeneric.S
  *
  *  Copyright (C) 1995-2001 Russell King
  *
diff -Nru a/arch/arm26/lib/delay.S b/arch/arm26/lib/delay.S
--- a/arch/arm26/lib/delay.S	2005-01-10 20:11:22 -08:00
+++ b/arch/arm26/lib/delay.S	2005-01-10 20:11:22 -08:00
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/delay.S
+ *  linux/arch/arm26/lib/delay.S
  *
  *  Copyright (C) 1995, 1996 Russell King
  *
diff -Nru a/arch/arm26/lib/ecard.S b/arch/arm26/lib/ecard.S
--- a/arch/arm26/lib/ecard.S	2005-01-10 20:11:20 -08:00
+++ b/arch/arm26/lib/ecard.S	2005-01-10 20:11:20 -08:00
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/ecard.S
+ *  linux/arch/arm26/lib/ecard.S
  *
  *  Copyright (C) 1995, 1996 Russell King
  *
diff -Nru a/arch/arm26/lib/floppydma.S b/arch/arm26/lib/floppydma.S
--- a/arch/arm26/lib/floppydma.S	2005-01-10 20:11:16 -08:00
+++ b/arch/arm26/lib/floppydma.S	2005-01-10 20:11:16 -08:00
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/floppydma.S
+ *  linux/arch/arm26/lib/floppydma.S
  *
  *  Copyright (C) 1995, 1996 Russell King
  *
diff -Nru a/arch/arm26/lib/getuser.S b/arch/arm26/lib/getuser.S
--- a/arch/arm26/lib/getuser.S	2005-01-10 20:11:23 -08:00
+++ b/arch/arm26/lib/getuser.S	2005-01-10 20:11:23 -08:00
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/getuser.S
+ *  linux/arch/arm26/lib/getuser.S
  *
  *  Copyright (C) 2001 Russell King
  *
@@ -28,6 +28,7 @@
  */
 #include <asm/asm_offsets.h>
 #include <asm/thread_info.h>
+#include <asm/errno.h>
 
         .global __get_user_1
 __get_user_1:
@@ -98,7 +99,7 @@
         mov     r2, #0
 __get_user_bad:
         mov     r1, #0
-        mov     r0, #-14
+        mov     r0, #-EFAULT
         ldmfd   sp!, {pc}^
 
 .section __ex_table, "a"
diff -Nru a/arch/arm26/lib/io-acorn.S b/arch/arm26/lib/io-acorn.S
--- a/arch/arm26/lib/io-acorn.S	2005-01-10 20:11:22 -08:00
+++ b/arch/arm26/lib/io-acorn.S	2005-01-10 20:11:22 -08:00
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/io-acorn.S
+ *  linux/arch/arm26/lib/io-acorn.S
  *
  *  Copyright (C) 1995, 1996 Russell King
  *
diff -Nru a/arch/arm26/lib/io-readsb.S b/arch/arm26/lib/io-readsb.S
--- a/arch/arm26/lib/io-readsb.S	2005-01-10 20:11:21 -08:00
+++ b/arch/arm26/lib/io-readsb.S	2005-01-10 20:11:21 -08:00
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/io-readsb.S
+ *  linux/arch/arm26/lib/io-readsb.S
  *
  *  Copyright (C) 1995-2000 Russell King
  *
diff -Nru a/arch/arm26/lib/io-readsl-armv3.S b/arch/arm26/lib/io-readsl-armv3.S
--- a/arch/arm26/lib/io-readsl-armv3.S	2005-01-10 20:11:21 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,78 +0,0 @@
-/*
- *  linux/arch/arm/lib/io-readsl-armv3.S
- *
- *  Copyright (C) 1995-2000 Russell King
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-#include <linux/linkage.h>
-#include <asm/assembler.h>
-#include <asm/hardware.h>
-
-/*
- * Note that some reads can be aligned on half-word boundaries.
- */
-ENTRY(__raw_readsl)
-		teq	r2, #0		@ do we have to check for the zero len?
-		moveq	pc, lr
-		ands	ip, r1, #3
-		bne	2f
-
-1:		ldr	r3, [r0]
-		str	r3, [r1], #4
-		subs	r2, r2, #1
-		bne	1b
-		mov	pc, lr
-
-2:		cmp	ip, #2
-		ldr	ip, [r0]
-		blt	4f
-		bgt	6f
-
-		strb	ip, [r1], #1
-		mov	ip, ip, lsr #8
-		strb	ip, [r1], #1
-		mov	ip, ip, lsr #8
-3:		subs	r2, r2, #1
-		ldrne	r3, [r0]
-		orrne	ip, ip, r3, lsl #16
-		strne	ip, [r1], #4
-		movne	ip, r3, lsr #16
-		bne	3b
-		strb	ip, [r1], #1
-		mov	ip, ip, lsr #8
-		strb	ip, [r1], #1
-		mov	pc, lr
-
-4:		strb	ip, [r1], #1
-		mov	ip, ip, lsr #8
-		strb	ip, [r1], #1
-		mov	ip, ip, lsr #8
-		strb	ip, [r1], #1
-		mov	ip, ip, lsr #8
-5:		subs	r2, r2, #1
-		ldrne	r3, [r0]
-		orrne	ip, ip, r3, lsl #8
-		strne	ip, [r1], #4
-		movne	ip, r3, lsr #24
-		bne	5b
-		strb	ip, [r1], #1
-		mov	pc, lr
-
-6:		strb	ip, [r1], #1
-		mov	ip, ip, lsr #8
-7:		subs	r2, r2, #1
-		ldrne	r3, [r0]
-		orrne	ip, ip, r3, lsl #24
-		strne	ip, [r1], #4
-		movne	ip, r3, lsr #8
-		bne	7b
-		strb	ip, [r1], #1
-		mov	ip, ip, lsr #8
-		strb	ip, [r1], #1
-		mov	ip, ip, lsr #8
-		strb	ip, [r1], #1
-		mov	pc, lr
-
diff -Nru a/arch/arm26/lib/io-readsl.S b/arch/arm26/lib/io-readsl.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/arm26/lib/io-readsl.S	2005-01-10 20:11:21 -08:00
@@ -0,0 +1,78 @@
+/*
+ *  linux/arch/arm26/lib/io-readsl.S
+ *
+ *  Copyright (C) 1995-2000 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#include <linux/linkage.h>
+#include <asm/assembler.h>
+#include <asm/hardware.h>
+
+/*
+ * Note that some reads can be aligned on half-word boundaries.
+ */
+ENTRY(__raw_readsl)
+		teq	r2, #0		@ do we have to check for the zero len?
+		moveq	pc, lr
+		ands	ip, r1, #3
+		bne	2f
+
+1:		ldr	r3, [r0]
+		str	r3, [r1], #4
+		subs	r2, r2, #1
+		bne	1b
+		mov	pc, lr
+
+2:		cmp	ip, #2
+		ldr	ip, [r0]
+		blt	4f
+		bgt	6f
+
+		strb	ip, [r1], #1
+		mov	ip, ip, lsr #8
+		strb	ip, [r1], #1
+		mov	ip, ip, lsr #8
+3:		subs	r2, r2, #1
+		ldrne	r3, [r0]
+		orrne	ip, ip, r3, lsl #16
+		strne	ip, [r1], #4
+		movne	ip, r3, lsr #16
+		bne	3b
+		strb	ip, [r1], #1
+		mov	ip, ip, lsr #8
+		strb	ip, [r1], #1
+		mov	pc, lr
+
+4:		strb	ip, [r1], #1
+		mov	ip, ip, lsr #8
+		strb	ip, [r1], #1
+		mov	ip, ip, lsr #8
+		strb	ip, [r1], #1
+		mov	ip, ip, lsr #8
+5:		subs	r2, r2, #1
+		ldrne	r3, [r0]
+		orrne	ip, ip, r3, lsl #8
+		strne	ip, [r1], #4
+		movne	ip, r3, lsr #24
+		bne	5b
+		strb	ip, [r1], #1
+		mov	pc, lr
+
+6:		strb	ip, [r1], #1
+		mov	ip, ip, lsr #8
+7:		subs	r2, r2, #1
+		ldrne	r3, [r0]
+		orrne	ip, ip, r3, lsl #24
+		strne	ip, [r1], #4
+		movne	ip, r3, lsr #8
+		bne	7b
+		strb	ip, [r1], #1
+		mov	ip, ip, lsr #8
+		strb	ip, [r1], #1
+		mov	ip, ip, lsr #8
+		strb	ip, [r1], #1
+		mov	pc, lr
+
diff -Nru a/arch/arm26/lib/io-readsw-armv3.S b/arch/arm26/lib/io-readsw-armv3.S
--- a/arch/arm26/lib/io-readsw-armv3.S	2005-01-10 20:11:16 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,107 +0,0 @@
-/*
- *  linux/arch/arm/lib/io-readsw-armv3.S
- *
- *  Copyright (C) 1995-2000 Russell King
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-#include <linux/linkage.h>
-#include <asm/assembler.h>
-#include <asm/hardware.h>
-
-.insw_bad_alignment:
-		adr	r0, .insw_bad_align_msg
-		mov	r2, lr
-		b	panic
-.insw_bad_align_msg:
-		.asciz	"insw: bad buffer alignment (0x%p, lr=0x%08lX)\n"
-		.align
-
-.insw_align:	tst	r1, #1
-		bne	.insw_bad_alignment
-
-		ldr	r3, [r0]
-		strb	r3, [r1], #1
-		mov	r3, r3, lsr #8
-		strb	r3, [r1], #1
-
-		subs	r2, r2, #1
-		RETINSTR(moveq, pc, lr)
-
-ENTRY(__raw_readsw)
-		teq	r2, #0		@ do we have to check for the zero len?
-		moveq	pc, lr
-		tst	r1, #3
-		bne	.insw_align
-
-.insw_aligned:	mov	ip, #0xff
-		orr	ip, ip, ip, lsl #8
-		stmfd	sp!, {r4, r5, r6, lr}
-
-		subs	r2, r2, #8
-		bmi	.no_insw_8
-
-.insw_8_lp:	ldr	r3, [r0]
-		and	r3, r3, ip
-		ldr	r4, [r0]
-		orr	r3, r3, r4, lsl #16
-
-		ldr	r4, [r0]
-		and	r4, r4, ip
-		ldr	r5, [r0]
-		orr	r4, r4, r5, lsl #16
-
-		ldr	r5, [r0]
-		and	r5, r5, ip
-		ldr	r6, [r0]
-		orr	r5, r5, r6, lsl #16
-
-		ldr	r6, [r0]
-		and	r6, r6, ip
-		ldr	lr, [r0]
-		orr	r6, r6, lr, lsl #16
-
-		stmia	r1!, {r3 - r6}
-
-		subs	r2, r2, #8
-		bpl	.insw_8_lp
-
-		tst	r2, #7
-		LOADREGS(eqfd, sp!, {r4, r5, r6, pc})
-
-.no_insw_8:	tst	r2, #4
-		beq	.no_insw_4
-
-		ldr	r3, [r0]
-		and	r3, r3, ip
-		ldr	r4, [r0]
-		orr	r3, r3, r4, lsl #16
-
-		ldr	r4, [r0]
-		and	r4, r4, ip
-		ldr	r5, [r0]
-		orr	r4, r4, r5, lsl #16
-
-		stmia	r1!, {r3, r4}
-
-.no_insw_4:	tst	r2, #2
-		beq	.no_insw_2
-
-		ldr	r3, [r0]
-		and	r3, r3, ip
-		ldr	r4, [r0]
-		orr	r3, r3, r4, lsl #16
-
-		str	r3, [r1], #4
-
-.no_insw_2:	tst	r2, #1
-		ldrne	r3, [r0]
-		strneb	r3, [r1], #1
-		movne	r3, r3, lsr #8
-		strneb	r3, [r1]
-
-		LOADREGS(fd, sp!, {r4, r5, r6, pc})
-
-
diff -Nru a/arch/arm26/lib/io-readsw.S b/arch/arm26/lib/io-readsw.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/arm26/lib/io-readsw.S	2005-01-10 20:11:16 -08:00
@@ -0,0 +1,107 @@
+/*
+ *  linux/arch/arm26/lib/io-readsw.S
+ *
+ *  Copyright (C) 1995-2000 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#include <linux/linkage.h>
+#include <asm/assembler.h>
+#include <asm/hardware.h>
+
+.insw_bad_alignment:
+		adr	r0, .insw_bad_align_msg
+		mov	r2, lr
+		b	panic
+.insw_bad_align_msg:
+		.asciz	"insw: bad buffer alignment (0x%p, lr=0x%08lX)\n"
+		.align
+
+.insw_align:	tst	r1, #1
+		bne	.insw_bad_alignment
+
+		ldr	r3, [r0]
+		strb	r3, [r1], #1
+		mov	r3, r3, lsr #8
+		strb	r3, [r1], #1
+
+		subs	r2, r2, #1
+		RETINSTR(moveq, pc, lr)
+
+ENTRY(__raw_readsw)
+		teq	r2, #0		@ do we have to check for the zero len?
+		moveq	pc, lr
+		tst	r1, #3
+		bne	.insw_align
+
+.insw_aligned:	mov	ip, #0xff
+		orr	ip, ip, ip, lsl #8
+		stmfd	sp!, {r4, r5, r6, lr}
+
+		subs	r2, r2, #8
+		bmi	.no_insw_8
+
+.insw_8_lp:	ldr	r3, [r0]
+		and	r3, r3, ip
+		ldr	r4, [r0]
+		orr	r3, r3, r4, lsl #16
+
+		ldr	r4, [r0]
+		and	r4, r4, ip
+		ldr	r5, [r0]
+		orr	r4, r4, r5, lsl #16
+
+		ldr	r5, [r0]
+		and	r5, r5, ip
+		ldr	r6, [r0]
+		orr	r5, r5, r6, lsl #16
+
+		ldr	r6, [r0]
+		and	r6, r6, ip
+		ldr	lr, [r0]
+		orr	r6, r6, lr, lsl #16
+
+		stmia	r1!, {r3 - r6}
+
+		subs	r2, r2, #8
+		bpl	.insw_8_lp
+
+		tst	r2, #7
+		LOADREGS(eqfd, sp!, {r4, r5, r6, pc})
+
+.no_insw_8:	tst	r2, #4
+		beq	.no_insw_4
+
+		ldr	r3, [r0]
+		and	r3, r3, ip
+		ldr	r4, [r0]
+		orr	r3, r3, r4, lsl #16
+
+		ldr	r4, [r0]
+		and	r4, r4, ip
+		ldr	r5, [r0]
+		orr	r4, r4, r5, lsl #16
+
+		stmia	r1!, {r3, r4}
+
+.no_insw_4:	tst	r2, #2
+		beq	.no_insw_2
+
+		ldr	r3, [r0]
+		and	r3, r3, ip
+		ldr	r4, [r0]
+		orr	r3, r3, r4, lsl #16
+
+		str	r3, [r1], #4
+
+.no_insw_2:	tst	r2, #1
+		ldrne	r3, [r0]
+		strneb	r3, [r1], #1
+		movne	r3, r3, lsr #8
+		strneb	r3, [r1]
+
+		LOADREGS(fd, sp!, {r4, r5, r6, pc})
+
+
diff -Nru a/arch/arm26/lib/io-writesb.S b/arch/arm26/lib/io-writesb.S
--- a/arch/arm26/lib/io-writesb.S	2005-01-10 20:11:17 -08:00
+++ b/arch/arm26/lib/io-writesb.S	2005-01-10 20:11:17 -08:00
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/io-writesb.S
+ *  linux/arch/arm26/lib/io-writesb.S
  *
  *  Copyright (C) 1995-2000 Russell King
  *
diff -Nru a/arch/arm26/lib/io-writesl.S b/arch/arm26/lib/io-writesl.S
--- a/arch/arm26/lib/io-writesl.S	2005-01-10 20:11:22 -08:00
+++ b/arch/arm26/lib/io-writesl.S	2005-01-10 20:11:22 -08:00
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/io-writesl.S
+ *  linux/arch/arm26/lib/io-writesl.S
  *
  *  Copyright (C) 1995-2000 Russell King
  *
diff -Nru a/arch/arm26/lib/io-writesw-armv3.S b/arch/arm26/lib/io-writesw-armv3.S
--- a/arch/arm26/lib/io-writesw-armv3.S	2005-01-10 20:11:16 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,127 +0,0 @@
-/*
- *  linux/arch/arm/lib/io-writesw-armv3.S
- *
- *  Copyright (C) 1995-2000 Russell King
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-#include <linux/linkage.h>
-#include <asm/assembler.h>
-#include <asm/hardware.h>
-
-.outsw_bad_alignment:
-		adr	r0, .outsw_bad_align_msg
-		mov	r2, lr
-		b	panic
-.outsw_bad_align_msg:
-		.asciz	"outsw: bad buffer alignment (0x%p, lr=0x%08lX)\n"
-		.align
-
-.outsw_align:	tst	r1, #1
-		bne	.outsw_bad_alignment
-
-		add	r1, r1, #2
-
-		ldr	r3, [r1, #-4]
-		mov	r3, r3, lsr #16
-		orr	r3, r3, r3, lsl #16
-		str	r3, [r0]
-		subs	r2, r2, #1
-		RETINSTR(moveq, pc, lr)
-
-ENTRY(__raw_writesw)
-		teq	r2, #0		@ do we have to check for the zero len?
-		moveq	pc, lr
-		tst	r1, #3
-		bne	.outsw_align
-
-.outsw_aligned:	stmfd	sp!, {r4, r5, r6, lr}
-
-		subs	r2, r2, #8
-		bmi	.no_outsw_8
-
-.outsw_8_lp:	ldmia	r1!, {r3, r4, r5, r6}
-
-		mov	ip, r3, lsl #16
-		orr	ip, ip, ip, lsr #16
-		str	ip, [r0]
-
-		mov	ip, r3, lsr #16
-		orr	ip, ip, ip, lsl #16
-		str	ip, [r0]
-
-		mov	ip, r4, lsl #16
-		orr	ip, ip, ip, lsr #16
-		str	ip, [r0]
-
-		mov	ip, r4, lsr #16
-		orr	ip, ip, ip, lsl #16
-		str	ip, [r0]
-
-		mov	ip, r5, lsl #16
-		orr	ip, ip, ip, lsr #16
-		str	ip, [r0]
-
-		mov	ip, r5, lsr #16
-		orr	ip, ip, ip, lsl #16
-		str	ip, [r0]
-
-		mov	ip, r6, lsl #16
-		orr	ip, ip, ip, lsr #16
-		str	ip, [r0]
-
-		mov	ip, r6, lsr #16
-		orr	ip, ip, ip, lsl #16
-		str	ip, [r0]
-
-		subs	r2, r2, #8
-		bpl	.outsw_8_lp
-
-		tst	r2, #7
-		LOADREGS(eqfd, sp!, {r4, r5, r6, pc})
-
-.no_outsw_8:	tst	r2, #4
-		beq	.no_outsw_4
-
-		ldmia	r1!, {r3, r4}
-
-		mov	ip, r3, lsl #16
-		orr	ip, ip, ip, lsr #16
-		str	ip, [r0]
-
-		mov	ip, r3, lsr #16
-		orr	ip, ip, ip, lsl #16
-		str	ip, [r0]
-
-		mov	ip, r4, lsl #16
-		orr	ip, ip, ip, lsr #16
-		str	ip, [r0]
-
-		mov	ip, r4, lsr #16
-		orr	ip, ip, ip, lsl #16
-		str	ip, [r0]
-
-.no_outsw_4:	tst	r2, #2
-		beq	.no_outsw_2
-
-		ldr	r3, [r1], #4
-
-		mov	ip, r3, lsl #16
-		orr	ip, ip, ip, lsr #16
-		str	ip, [r0]
-
-		mov	ip, r3, lsr #16
-		orr	ip, ip, ip, lsl #16
-		str	ip, [r0]
-
-.no_outsw_2:	tst	r2, #1
-
-		ldrne	r3, [r1]
-
-		movne	ip, r3, lsl #16
-		orrne	ip, ip, ip, lsr #16
-		strne	ip, [r0]
-
-		LOADREGS(fd, sp!, {r4, r5, r6, pc})
diff -Nru a/arch/arm26/lib/io-writesw.S b/arch/arm26/lib/io-writesw.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/arm26/lib/io-writesw.S	2005-01-10 20:11:16 -08:00
@@ -0,0 +1,127 @@
+/*
+ *  linux/arch/arm26/lib/io-writesw.S
+ *
+ *  Copyright (C) 1995-2000 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#include <linux/linkage.h>
+#include <asm/assembler.h>
+#include <asm/hardware.h>
+
+.outsw_bad_alignment:
+		adr	r0, .outsw_bad_align_msg
+		mov	r2, lr
+		b	panic
+.outsw_bad_align_msg:
+		.asciz	"outsw: bad buffer alignment (0x%p, lr=0x%08lX)\n"
+		.align
+
+.outsw_align:	tst	r1, #1
+		bne	.outsw_bad_alignment
+
+		add	r1, r1, #2
+
+		ldr	r3, [r1, #-4]
+		mov	r3, r3, lsr #16
+		orr	r3, r3, r3, lsl #16
+		str	r3, [r0]
+		subs	r2, r2, #1
+		RETINSTR(moveq, pc, lr)
+
+ENTRY(__raw_writesw)
+		teq	r2, #0		@ do we have to check for the zero len?
+		moveq	pc, lr
+		tst	r1, #3
+		bne	.outsw_align
+
+.outsw_aligned:	stmfd	sp!, {r4, r5, r6, lr}
+
+		subs	r2, r2, #8
+		bmi	.no_outsw_8
+
+.outsw_8_lp:	ldmia	r1!, {r3, r4, r5, r6}
+
+		mov	ip, r3, lsl #16
+		orr	ip, ip, ip, lsr #16
+		str	ip, [r0]
+
+		mov	ip, r3, lsr #16
+		orr	ip, ip, ip, lsl #16
+		str	ip, [r0]
+
+		mov	ip, r4, lsl #16
+		orr	ip, ip, ip, lsr #16
+		str	ip, [r0]
+
+		mov	ip, r4, lsr #16
+		orr	ip, ip, ip, lsl #16
+		str	ip, [r0]
+
+		mov	ip, r5, lsl #16
+		orr	ip, ip, ip, lsr #16
+		str	ip, [r0]
+
+		mov	ip, r5, lsr #16
+		orr	ip, ip, ip, lsl #16
+		str	ip, [r0]
+
+		mov	ip, r6, lsl #16
+		orr	ip, ip, ip, lsr #16
+		str	ip, [r0]
+
+		mov	ip, r6, lsr #16
+		orr	ip, ip, ip, lsl #16
+		str	ip, [r0]
+
+		subs	r2, r2, #8
+		bpl	.outsw_8_lp
+
+		tst	r2, #7
+		LOADREGS(eqfd, sp!, {r4, r5, r6, pc})
+
+.no_outsw_8:	tst	r2, #4
+		beq	.no_outsw_4
+
+		ldmia	r1!, {r3, r4}
+
+		mov	ip, r3, lsl #16
+		orr	ip, ip, ip, lsr #16
+		str	ip, [r0]
+
+		mov	ip, r3, lsr #16
+		orr	ip, ip, ip, lsl #16
+		str	ip, [r0]
+
+		mov	ip, r4, lsl #16
+		orr	ip, ip, ip, lsr #16
+		str	ip, [r0]
+
+		mov	ip, r4, lsr #16
+		orr	ip, ip, ip, lsl #16
+		str	ip, [r0]
+
+.no_outsw_4:	tst	r2, #2
+		beq	.no_outsw_2
+
+		ldr	r3, [r1], #4
+
+		mov	ip, r3, lsl #16
+		orr	ip, ip, ip, lsr #16
+		str	ip, [r0]
+
+		mov	ip, r3, lsr #16
+		orr	ip, ip, ip, lsl #16
+		str	ip, [r0]
+
+.no_outsw_2:	tst	r2, #1
+
+		ldrne	r3, [r1]
+
+		movne	ip, r3, lsl #16
+		orrne	ip, ip, ip, lsr #16
+		strne	ip, [r0]
+
+		LOADREGS(fd, sp!, {r4, r5, r6, pc})
diff -Nru a/arch/arm26/lib/memchr.S b/arch/arm26/lib/memchr.S
--- a/arch/arm26/lib/memchr.S	2005-01-10 20:11:22 -08:00
+++ b/arch/arm26/lib/memchr.S	2005-01-10 20:11:22 -08:00
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/memchr.S
+ *  linux/arch/arm26/lib/memchr.S
  *
  *  Copyright (C) 1995-2000 Russell King
  *
diff -Nru a/arch/arm26/lib/memcpy.S b/arch/arm26/lib/memcpy.S
--- a/arch/arm26/lib/memcpy.S	2005-01-10 20:11:22 -08:00
+++ b/arch/arm26/lib/memcpy.S	2005-01-10 20:11:22 -08:00
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/memcpy.S
+ *  linux/arch/arm26/lib/memcpy.S
  *
  *  Copyright (C) 1995-1999 Russell King
  *
diff -Nru a/arch/arm26/lib/memset.S b/arch/arm26/lib/memset.S
--- a/arch/arm26/lib/memset.S	2005-01-10 20:11:20 -08:00
+++ b/arch/arm26/lib/memset.S	2005-01-10 20:11:20 -08:00
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/memset.S
+ *  linux/arch/arm26/lib/memset.S
  *
  *  Copyright (C) 1995-2000 Russell King
  *
diff -Nru a/arch/arm26/lib/memzero.S b/arch/arm26/lib/memzero.S
--- a/arch/arm26/lib/memzero.S	2005-01-10 20:11:18 -08:00
+++ b/arch/arm26/lib/memzero.S	2005-01-10 20:11:18 -08:00
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/memzero.S
+ *  linux/arch/arm26/lib/memzero.S
  *
  *  Copyright (C) 1995-2000 Russell King
  *
diff -Nru a/arch/arm26/lib/putuser.S b/arch/arm26/lib/putuser.S
--- a/arch/arm26/lib/putuser.S	2005-01-10 20:11:19 -08:00
+++ b/arch/arm26/lib/putuser.S	2005-01-10 20:11:19 -08:00
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/putuser.S
+ *  linux/arch/arm26/lib/putuser.S
  *
  *  Copyright (C) 2001 Russell King
  *
@@ -28,6 +28,7 @@
  */
 #include <asm/asm_offsets.h>
 #include <asm/thread_info.h>
+#include <asm/errno.h>
 
         .global __put_user_1
 __put_user_1:
@@ -95,7 +96,7 @@
         ldmfd   sp!, {pc}^
 
 __put_user_bad:
-	mov	r0, #-14
+	mov	r0, #-EFAULT
 	mov	pc, lr
 
 .section __ex_table, "a"
diff -Nru a/arch/arm26/lib/setbit.S b/arch/arm26/lib/setbit.S
--- a/arch/arm26/lib/setbit.S	2005-01-10 20:11:15 -08:00
+++ b/arch/arm26/lib/setbit.S	2005-01-10 20:11:15 -08:00
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/setbit.S
+ *  linux/arch/arm26/lib/setbit.S
  *
  *  Copyright (C) 1995-1996 Russell King
  *
diff -Nru a/arch/arm26/lib/strchr.S b/arch/arm26/lib/strchr.S
--- a/arch/arm26/lib/strchr.S	2005-01-10 20:11:15 -08:00
+++ b/arch/arm26/lib/strchr.S	2005-01-10 20:11:15 -08:00
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/strchr.S
+ *  linux/arch/arm26/lib/strchr.S
  *
  *  Copyright (C) 1995-2000 Russell King
  *
diff -Nru a/arch/arm26/lib/strrchr.S b/arch/arm26/lib/strrchr.S
--- a/arch/arm26/lib/strrchr.S	2005-01-10 20:11:21 -08:00
+++ b/arch/arm26/lib/strrchr.S	2005-01-10 20:11:21 -08:00
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/strrchr.S
+ *  linux/arch/arm26/lib/strrchr.S
  *
  *  Copyright (C) 1995-2000 Russell King
  *
diff -Nru a/arch/arm26/lib/testchangebit.S b/arch/arm26/lib/testchangebit.S
--- a/arch/arm26/lib/testchangebit.S	2005-01-10 20:11:17 -08:00
+++ b/arch/arm26/lib/testchangebit.S	2005-01-10 20:11:17 -08:00
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/testchangebit.S
+ *  linux/arch/arm26/lib/testchangebit.S
  *
  *  Copyright (C) 1995-1996 Russell King
  *
diff -Nru a/arch/arm26/lib/testclearbit.S b/arch/arm26/lib/testclearbit.S
--- a/arch/arm26/lib/testclearbit.S	2005-01-10 20:11:22 -08:00
+++ b/arch/arm26/lib/testclearbit.S	2005-01-10 20:11:22 -08:00
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/testclearbit.S
+ *  linux/arch/arm26/lib/testclearbit.S
  *
  *  Copyright (C) 1995-1996 Russell King
  *
diff -Nru a/arch/arm26/lib/testsetbit.S b/arch/arm26/lib/testsetbit.S
--- a/arch/arm26/lib/testsetbit.S	2005-01-10 20:11:19 -08:00
+++ b/arch/arm26/lib/testsetbit.S	2005-01-10 20:11:19 -08:00
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/testsetbit.S
+ *  linux/arch/arm26/lib/testsetbit.S
  *
  *  Copyright (C) 1995-1996 Russell King
  *
diff -Nru a/arch/arm26/machine/Makefile b/arch/arm26/machine/Makefile
--- a/arch/arm26/machine/Makefile	2005-01-10 20:11:18 -08:00
+++ b/arch/arm26/machine/Makefile	2005-01-10 20:11:18 -08:00
@@ -4,9 +4,5 @@
 
 # Object file lists.
 
-obj-y			:= dma.o irq.o oldlatches.o \
-			   small_page.o
+obj-y			:= dma.o irq.o latches.o
 
-extra-y 		:= head.o
-
-AFLAGS_head.o		:= -DTEXTADDR=$(TEXTADDR)
diff -Nru a/arch/arm26/machine/dma.c b/arch/arm26/machine/dma.c
--- a/arch/arm26/machine/dma.c	2005-01-10 20:11:21 -08:00
+++ b/arch/arm26/machine/dma.c	2005-01-10 20:11:21 -08:00
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/kernel/dma-arc.c
+ *  linux/arch/arm26/kernel/dma.c
  *
  *  Copyright (C) 1998-1999 Dave Gilbert / Russell King
  *  Copyright (C) 2003 Ian Molton
diff -Nru a/arch/arm26/machine/head.S b/arch/arm26/machine/head.S
--- a/arch/arm26/machine/head.S	2005-01-10 20:11:24 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,111 +0,0 @@
-/*
- *  linux/arch/arm/kernel/head-armo.S
- *
- *  Copyright (C) 1994-2000 Russell King
- *  Copyright (C) 2003 Ian Molton
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- *  26-bit kernel startup code
- */
-#include <linux/config.h>
-#include <linux/linkage.h>
-#include <asm/mach-types.h>
-
-		.globl	swapper_pg_dir
-		.equ	swapper_pg_dir,	0x0207d000
-
-/*
- * Entry point.
- */
-		.section ".init.text",#alloc,#execinstr
-ENTRY(stext)
-__entry:	cmp	pc, #0x02000000
-		ldrlt	pc, LC0			@ if 0x01800000, call at 0x02080000
-		teq	r0, #0                  @ Check for old calling method
-		blne	oldparams		@ Move page if old
-		adr	r0, LC0
-		ldmib	r0, {r2-r5, sp}		@ Setup stack (and fetch other values)
-
-		mov	r0, #0			@ Clear BSS
-1:		cmp	r2, r3
-		strcc	r0, [r2], #4
-		bcc	1b
-
-		bl	detect_proc_type
-		str	r0, [r4]
-		bl	detect_arch_type
-		str	r0, [r5]
-
-#ifdef CONFIG_XIP_KERNEL
-               ldr     r3, ETEXT                       @ data section copy
-               ldr     r4, SDATA
-               ldr     r5, EDATA
-1:
-               ldr     r6, [r3], #4
-               str     r6, [r4], #4
-               cmp     r4, r5
-               blt     1b
-#endif
-
-		mov	fp, #0
-		b	start_kernel
-
-LC0:		.word	_stext
-		.word	__bss_start		@ r2
-		.word	_end			@ r3
-		.word	processor_id		@ r4
-		.word	__machine_arch_type	@ r5
-		.word	init_thread_union+8192	@ sp
-#ifdef CONFIG_XIP_KERNEL
-ETEXT:		.word   _endtext
-SDATA:		.word   _sdata
-EDATA:		.word   __bss_start
-#endif
-
-arm2_id:	.long	0x41560200  @ ARM2 and 250 dont have a CPUID
-arm250_id:	.long	0x41560250  @ So we create some after probing for them
-		.align
-
-oldparams:	mov	r4, #0x02000000
-		add	r3, r4, #0x00080000
-		add	r4, r4, #0x0007c000
-1:		ldmia	r0!, {r5 - r12}
-		stmia	r4!, {r5 - r12}
-		cmp	r4, r3
-		blt	1b
-		mov	pc, lr
-
-/*
- * We need some way to automatically detect the difference between
- * these two machines.  Unfortunately, it is not possible to detect
- * the presence of the SuperIO chip, because that will hang the old
- * Archimedes machines solid.
- */
-/* DAG: Outdated, these have been combined !!!!!!! */
-detect_arch_type:
-#if defined(CONFIG_ARCH_ARC)
-		mov	r0, #MACH_TYPE_ARCHIMEDES
-#elif defined(CONFIG_ARCH_A5K)
-		mov	r0, #MACH_TYPE_A5K
-#endif
-		mov	pc, lr
-
-detect_proc_type:
-		mov	ip, lr
-		mov	r2, #0xea000000		@ Point undef instr to continuation
-		adr	r0, continue - 12
-		orr	r0, r2, r0, lsr #2
-		mov	r1, #0
-		str	r0, [r1, #4]
-		ldr	r0, arm2_id
-		swp	r2, r2, [r1]		@ check for swp (ARM2 cant)
-		ldr	r0, arm250_id
-		mrc	15, 0, r3, c0, c0	@ check for CP#15 (ARM250 cant)
-		mov	r0, r3
-continue:	mov	r2, #0xeb000000		@ Make undef vector loop
-		sub	r2, r2, #2
-		str	r2, [r1, #4]
-		mov	pc, ip
diff -Nru a/arch/arm26/machine/irq.c b/arch/arm26/machine/irq.c
--- a/arch/arm26/machine/irq.c	2005-01-10 20:11:17 -08:00
+++ b/arch/arm26/machine/irq.c	2005-01-10 20:11:17 -08:00
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/mach-arc/irq.c
+ *  linux/arch/arm26/mach-arc/irq.c
  *
  *  Copyright (C) 1996 Russell King
  *
diff -Nru a/arch/arm26/machine/latches.c b/arch/arm26/machine/latches.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/arm26/machine/latches.c	2005-01-10 20:11:17 -08:00
@@ -0,0 +1,72 @@
+/*
+ *  linux/arch/arm26/kernel/latches.c
+ *
+ *  Copyright (C) David Alan Gilbert 1995/1996,2000
+ *  Copyright (C) Ian Molton 2003
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ *  Support for the latches on the old Archimedes which control the floppy,
+ *  hard disc and printer
+ */
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/sched.h>
+
+#include <asm/io.h>
+#include <asm/hardware.h>
+#include <asm/mach-types.h>
+#include <asm/oldlatches.h>
+
+static unsigned char latch_a_copy;
+static unsigned char latch_b_copy;
+
+/* newval=(oldval & ~mask)|newdata */
+void oldlatch_aupdate(unsigned char mask,unsigned char newdata)
+{
+	unsigned long flags;
+
+	BUG_ON(!machine_is_archimedes());
+
+	local_irq_save(flags); //FIXME: was local_save_flags
+	latch_a_copy = (latch_a_copy & ~mask) | newdata;
+	__raw_writeb(latch_a_copy, LATCHA_BASE);
+	local_irq_restore(flags);
+
+	printk("Latch: A = 0x%02x\n", latch_a_copy);
+}
+
+
+/* newval=(oldval & ~mask)|newdata */
+void oldlatch_bupdate(unsigned char mask,unsigned char newdata)
+{
+	unsigned long flags;
+
+	BUG_ON(!machine_is_archimedes());
+
+
+	local_irq_save(flags);//FIXME: was local_save_flags
+	latch_b_copy = (latch_b_copy & ~mask) | newdata;
+	__raw_writeb(latch_b_copy, LATCHB_BASE);
+	local_irq_restore(flags);
+
+	printk("Latch: B = 0x%02x\n", latch_b_copy);
+}
+
+static int __init oldlatch_init(void)
+{
+	if (machine_is_archimedes()) {
+		oldlatch_aupdate(0xff, 0xff);
+		/* Thats no FDC reset...*/
+		oldlatch_bupdate(0xff, LATCHB_FDCRESET);
+	}
+	return 0;
+}
+
+arch_initcall(oldlatch_init);
+
+EXPORT_SYMBOL(oldlatch_aupdate);
+EXPORT_SYMBOL(oldlatch_bupdate);
diff -Nru a/arch/arm26/machine/oldlatches.c b/arch/arm26/machine/oldlatches.c
--- a/arch/arm26/machine/oldlatches.c	2005-01-10 20:11:17 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,72 +0,0 @@
-/*
- *  linux/arch/arm/kernel/oldlatches.c
- *
- *  Copyright (C) David Alan Gilbert 1995/1996,2000
- *  Copyright (C) Ian Molton 2003
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- *  Support for the latches on the old Archimedes which control the floppy,
- *  hard disc and printer
- */
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/sched.h>
-
-#include <asm/io.h>
-#include <asm/hardware.h>
-#include <asm/mach-types.h>
-#include <asm/oldlatches.h>
-
-static unsigned char latch_a_copy;
-static unsigned char latch_b_copy;
-
-/* newval=(oldval & ~mask)|newdata */
-void oldlatch_aupdate(unsigned char mask,unsigned char newdata)
-{
-	unsigned long flags;
-
-	BUG_ON(!machine_is_archimedes());
-
-	local_irq_save(flags); //FIXME: was local_save_flags
-	latch_a_copy = (latch_a_copy & ~mask) | newdata;
-	__raw_writeb(latch_a_copy, LATCHA_BASE);
-	local_irq_restore(flags);
-
-	printk("Latch: A = 0x%02x\n", latch_a_copy);
-}
-
-
-/* newval=(oldval & ~mask)|newdata */
-void oldlatch_bupdate(unsigned char mask,unsigned char newdata)
-{
-	unsigned long flags;
-
-	BUG_ON(!machine_is_archimedes());
-	
-
-	local_irq_save(flags);//FIXME: was local_save_flags
-	latch_b_copy = (latch_b_copy & ~mask) | newdata;
-	__raw_writeb(latch_b_copy, LATCHB_BASE);
-	local_irq_restore(flags);
-
-	printk("Latch: B = 0x%02x\n", latch_b_copy);
-}
-
-static int __init oldlatch_init(void)
-{
-	if (machine_is_archimedes()) {
-		oldlatch_aupdate(0xff, 0xff);
-		/* Thats no FDC reset...*/
-		oldlatch_bupdate(0xff, LATCHB_FDCRESET);
-	}
-	return 0;
-}
-
-arch_initcall(oldlatch_init);
-
-EXPORT_SYMBOL(oldlatch_aupdate);
-EXPORT_SYMBOL(oldlatch_bupdate);
diff -Nru a/arch/arm26/machine/small_page.c b/arch/arm26/machine/small_page.c
--- a/arch/arm26/machine/small_page.c	2005-01-10 20:11:24 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,191 +0,0 @@
-/*
- *  linux/arch/arm/mm/small_page.c
- *
- *  Copyright (C) 1996  Russell King
- *  Copyright (C) 2003  Ian Molton
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- *  Changelog:
- *   26/01/1996	RMK	Cleaned up various areas to make little more generic
- *   07/02/1999	RMK	Support added for 16K and 32K page sizes
- *			containing 8K blocks
- */
-#include <linux/signal.h>
-#include <linux/sched.h>
-#include <linux/kernel.h>
-#include <linux/errno.h>
-#include <linux/string.h>
-#include <linux/types.h>
-#include <linux/ptrace.h>
-#include <linux/mman.h>
-#include <linux/mm.h>
-#include <linux/swap.h>
-#include <linux/smp.h>
-#include <linux/bitops.h>
-
-#include <asm/pgtable.h>
-
-#define PEDANTIC
-
-/*
- * Requirement:
- *  We need to be able to allocate naturally aligned memory of finer
- *  granularity than the page size.  This is typically used for the
- *  second level page tables on 32-bit ARMs.
- *
- * Theory:
- *  We "misuse" the Linux memory management system.  We use alloc_page
- *  to allocate a page and then mark it as reserved.  The Linux memory
- *  management system will then ignore the "offset", "next_hash" and
- *  "pprev_hash" entries in the mem_map for this page.
- *
- *  We then use a bitstring in the "offset" field to mark which segments
- *  of the page are in use, and manipulate this as required during the
- *  allocation and freeing of these small pages.
- *
- *  We also maintain a queue of pages being used for this purpose using
- *  the "next_hash" and "pprev_hash" entries of mem_map;
- */
-
-struct order {
-	struct list_head queue;
-	unsigned int mask;		/* (1 << shift) - 1		*/
-	unsigned int shift;		/* (1 << shift) size of page	*/
-	unsigned int block_mask;	/* nr_blocks - 1		*/
-	unsigned int all_used;		/* (1 << nr_blocks) - 1		*/
-};
-
-
-static struct order orders[] = {
-#if PAGE_SIZE == 32768
-	{ LIST_HEAD_INIT(orders[0].queue), 2047, 11, 15, 0x0000ffff },
-	{ LIST_HEAD_INIT(orders[1].queue), 8191, 13,  3, 0x0000000f }
-#else
-#error unsupported page size (ARGH!)
-#endif
-};
-
-#define USED_MAP(pg)			((pg)->index)
-#define TEST_AND_CLEAR_USED(pg,off)	(test_and_clear_bit(off, &USED_MAP(pg)))
-#define SET_USED(pg,off)		(set_bit(off, &USED_MAP(pg)))
-
-static spinlock_t small_page_lock = SPIN_LOCK_UNLOCKED;
-
-static unsigned long __get_small_page(int priority, struct order *order)
-{
-	unsigned long flags;
-	struct page *page;
-	int offset;
-
-	do {
-		spin_lock_irqsave(&small_page_lock, flags);
-
-		if (list_empty(&order->queue))
-			goto need_new_page;
-
-		page = list_entry(order->queue.next, struct page, list);
-again:
-#ifdef PEDANTIC
-		if (USED_MAP(page) & ~order->all_used)
-			PAGE_BUG(page);
-#endif
-		offset = ffz(USED_MAP(page));
-		SET_USED(page, offset);
-		if (USED_MAP(page) == order->all_used)
-			list_del_init(&page->lru);
-		spin_unlock_irqrestore(&small_page_lock, flags);
-
-		return (unsigned long) page_address(page) + (offset << order->shift);
-
-need_new_page:
-		spin_unlock_irqrestore(&small_page_lock, flags);
-		page = alloc_page(priority);
-		spin_lock_irqsave(&small_page_lock, flags);
-
-		if (list_empty(&order->queue)) {
-			if (!page)
-				goto no_page;
-			SetPageReserved(page);
-			USED_MAP(page) = 0;
-			list_add(&page->lru, &order->queue);
-			goto again;
-		}
-
-		spin_unlock_irqrestore(&small_page_lock, flags);
-		__free_page(page);
-	} while (1);
-
-no_page:
-	spin_unlock_irqrestore(&small_page_lock, flags);
-	return 0;
-}
-
-static void __free_small_page(unsigned long spage, struct order *order)
-{
-	unsigned long flags;
-	struct page *page;
-
-	if (virt_addr_valid(spage)) {
-		page = virt_to_page(spage);
-
-		/*
-		 * The container-page must be marked Reserved
-		 */
-		if (!PageReserved(page) || spage & order->mask)
-			goto non_small;
-
-#ifdef PEDANTIC
-		if (USED_MAP(page) & ~order->all_used)
-			PAGE_BUG(page);
-#endif
-
-		spage = spage >> order->shift;
-		spage &= order->block_mask;
-
-		/*
-		 * the following must be atomic wrt get_page
-		 */
-		spin_lock_irqsave(&small_page_lock, flags);
-
-		if (USED_MAP(page) == order->all_used)
-			list_add(&page->lru, &order->queue);
-
-		if (!TEST_AND_CLEAR_USED(page, spage))
-			goto already_free;
-
-		if (USED_MAP(page) == 0)
-			goto free_page;
-
-		spin_unlock_irqrestore(&small_page_lock, flags);
-	}
-	return;
-
-free_page:
-	/*
-	 * unlink the page from the small page queue and free it
-	 */
-	list_del_init(&page->lru);
-	spin_unlock_irqrestore(&small_page_lock, flags);
-	ClearPageReserved(page);
-	__free_page(page);
-	return;
-
-non_small:
-	printk("Trying to free non-small page from %p\n", __builtin_return_address(0));
-	return;
-already_free:
-	printk("Trying to free free small page from %p\n", __builtin_return_address(0));
-}
-
-unsigned long get_page_8k(int priority)
-{
-	return __get_small_page(priority, orders+1);
-}
-
-void free_page_8k(unsigned long spage)
-{
-	__free_small_page(spage, orders+1);
-}
diff -Nru a/arch/arm26/mm/Makefile b/arch/arm26/mm/Makefile
--- a/arch/arm26/mm/Makefile	2005-01-10 20:11:17 -08:00
+++ b/arch/arm26/mm/Makefile	2005-01-10 20:11:17 -08:00
@@ -2,4 +2,5 @@
 # Makefile for the linux arm26-specific parts of the memory manager.
 #
 
-obj-y		:= init.o extable.o proc-funcs.o mm-memc.o fault.o
+obj-y		:= init.o extable.o proc-funcs.o memc.o fault.o \
+		   small_page.o
diff -Nru a/arch/arm26/mm/extable.c b/arch/arm26/mm/extable.c
--- a/arch/arm26/mm/extable.c	2005-01-10 20:11:18 -08:00
+++ b/arch/arm26/mm/extable.c	2005-01-10 20:11:18 -08:00
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/mm/extable.c
+ *  linux/arch/arm26/mm/extable.c
  */
 
 #include <linux/config.h>
@@ -11,6 +11,12 @@
         const struct exception_table_entry *fixup;
 
         fixup = search_exception_tables(instruction_pointer(regs));
+
+	/*
+	 * The kernel runs in SVC mode - make sure we keep running in SVC mode
+	 * by frobbing the PSR appropriately (PSR and PC are in the same reg.
+	 * on ARM26)
+	 */
         if (fixup)
                 regs->ARM_pc = fixup->fixup | PSR_I_BIT | MODE_SVC26;
 
diff -Nru a/arch/arm26/mm/fault.c b/arch/arm26/mm/fault.c
--- a/arch/arm26/mm/fault.c	2005-01-10 20:11:17 -08:00
+++ b/arch/arm26/mm/fault.c	2005-01-10 20:11:17 -08:00
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/mm/fault-common.c
+ *  linux/arch/arm26/mm/fault.c
  *
  *  Copyright (C) 1995  Linus Torvalds
  *  Modifications for ARM processor (c) 1995-2001 Russell King
@@ -212,7 +212,6 @@
 	tsk = current;
 	mm  = tsk->mm;
 
-	printk("do_page_fault: pid: %d      %08x\n", tsk->pid, addr);
 	/*
 	 * If we're in an interrupt or have no user
 	 * context, we must not take the fault..
diff -Nru a/arch/arm26/mm/init.c b/arch/arm26/mm/init.c
--- a/arch/arm26/mm/init.c	2005-01-10 20:11:22 -08:00
+++ b/arch/arm26/mm/init.c	2005-01-10 20:11:22 -08:00
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/mm/init.c
+ *  linux/arch/arm26/mm/init.c
  *
  *  Copyright (C) 1995-2002 Russell King
  *
@@ -26,7 +26,6 @@
 
 #include <asm/segment.h>
 #include <asm/mach-types.h>
-#include <asm/pgalloc.h>
 #include <asm/dma.h>
 #include <asm/hardware.h>
 #include <asm/setup.h>
@@ -84,7 +83,7 @@
 		else if (!page_count(page))
 			free++;
 		else
-			shared += atomic_read(&page->count) - 1;
+			shared += page_count(page) - 1;
 		page++;
 	} while (page < end);
 
@@ -156,7 +155,8 @@
 {
 	unsigned int memend_pfn = 0;
 
-	numnodes = 1;
+	nodes_clear(node_online_map);
+	node_set_online(0);
 
 	np->bootmap_pages = 0;
 
diff -Nru a/arch/arm26/mm/memc.c b/arch/arm26/mm/memc.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/arm26/mm/memc.c	2005-01-10 20:11:23 -08:00
@@ -0,0 +1,202 @@
+/*
+ *  linux/arch/arm26/mm/memc.c
+ *
+ *  Copyright (C) 1998-2000 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ *  Page table sludge for older ARM processor architectures.
+ */
+#include <linux/sched.h>
+#include <linux/mm.h>
+#include <linux/init.h>
+#include <linux/bootmem.h>
+
+#include <asm/pgtable.h>
+#include <asm/pgalloc.h>
+#include <asm/page.h>
+#include <asm/memory.h>
+#include <asm/hardware.h>
+
+#include <asm/map.h>
+
+#define MEMC_TABLE_SIZE (256*sizeof(unsigned long))
+
+kmem_cache_t *pte_cache, *pgd_cache;
+int page_nr;
+
+/*
+ * Allocate space for a page table and a MEMC table.
+ * Note that we place the MEMC
+ * table before the page directory.  This means we can
+ * easily get to both tightly-associated data structures
+ * with a single pointer.
+ */
+static inline pgd_t *alloc_pgd_table(void)
+{
+	void *pg2k = kmem_cache_alloc(pgd_cache, GFP_KERNEL);
+
+	if (pg2k)
+		pg2k += MEMC_TABLE_SIZE;
+
+	return (pgd_t *)pg2k;
+}
+
+/*
+ * Free a page table. this function is the counterpart to get_pgd_slow
+ * below, not alloc_pgd_table above.
+ */
+void free_pgd_slow(pgd_t *pgd)
+{
+	unsigned long tbl = (unsigned long)pgd;
+
+	tbl -= MEMC_TABLE_SIZE;
+
+	kmem_cache_free(pgd_cache, (void *)tbl);
+}
+
+/*
+ * Allocate a new pgd and fill it in ready for use
+ *
+ * A new tasks pgd is completely empty (all pages !present) except for:
+ *
+ * o The machine vectors at virtual address 0x0
+ * o The vmalloc region at the top of address space
+ *
+ */
+#define FIRST_KERNEL_PGD_NR     (FIRST_USER_PGD_NR + USER_PTRS_PER_PGD)
+
+pgd_t *get_pgd_slow(struct mm_struct *mm)
+{
+	pgd_t *new_pgd, *init_pgd;
+	pmd_t *new_pmd, *init_pmd;
+	pte_t *new_pte, *init_pte;
+
+	new_pgd = alloc_pgd_table();
+	if (!new_pgd)
+		goto no_pgd;
+
+	/*
+	 * This lock is here just to satisfy pmd_alloc and pte_lock
+         * FIXME: I bet we could avoid taking it pretty much altogether
+	 */
+	spin_lock(&mm->page_table_lock);
+
+	/*
+	 * On ARM, first page must always be allocated since it contains
+	 * the machine vectors.
+	 */
+	new_pmd = pmd_alloc(mm, new_pgd, 0);
+	if (!new_pmd)
+		goto no_pmd;
+
+	new_pte = pte_alloc_kernel(mm, new_pmd, 0);
+	if (!new_pte)
+		goto no_pte;
+
+	init_pgd = pgd_offset(&init_mm, 0);
+	init_pmd = pmd_offset(init_pgd, 0);
+	init_pte = pte_offset(init_pmd, 0);
+
+	set_pte(new_pte, *init_pte);
+
+	/*
+	 * the page table entries are zeroed
+	 * when the table is created. (see the cache_ctor functions below)
+	 * Now we need to plonk the kernel (vmalloc) area at the end of
+	 * the address space. We copy this from the init thread, just like
+	 * the init_pte we copied above...
+	 */
+	memcpy(new_pgd + FIRST_KERNEL_PGD_NR, init_pgd + FIRST_KERNEL_PGD_NR,
+		(PTRS_PER_PGD - FIRST_KERNEL_PGD_NR) * sizeof(pgd_t));
+
+	spin_unlock(&mm->page_table_lock);
+
+	/* update MEMC tables */
+	cpu_memc_update_all(new_pgd);
+	return new_pgd;
+
+no_pte:
+	spin_unlock(&mm->page_table_lock);
+	pmd_free(new_pmd);
+	free_pgd_slow(new_pgd);
+	return NULL;
+
+no_pmd:
+	spin_unlock(&mm->page_table_lock);
+	free_pgd_slow(new_pgd);
+	return NULL;
+
+no_pgd:
+	return NULL;
+}
+
+/*
+ * No special code is required here.
+ */
+void setup_mm_for_reboot(char mode)
+{
+}
+
+/*
+ * This contains the code to setup the memory map on an ARM2/ARM250/ARM3
+ *  o swapper_pg_dir = 0x0207d000
+ *  o kernel proper starts at 0x0208000
+ *  o create (allocate) a pte to contain the machine vectors
+ *  o populate the pte (points to 0x02078000) (FIXME - is it zeroed?)
+ *  o populate the init tasks page directory (pgd) with the new pte
+ *  o zero the rest of the init tasks pgdir (FIXME - what about vmalloc?!)
+ */
+void __init memtable_init(struct meminfo *mi)
+{
+	pte_t *pte;
+	int i;
+
+	page_nr = max_low_pfn;
+
+	pte = alloc_bootmem_low_pages(PTRS_PER_PTE * sizeof(pte_t));
+	pte[0] = mk_pte_phys(PAGE_OFFSET + SCREEN_SIZE, PAGE_READONLY);
+	pmd_populate(&init_mm, pmd_offset(swapper_pg_dir, 0), pte);
+
+	for (i = 1; i < PTRS_PER_PGD; i++)
+		pgd_val(swapper_pg_dir[i]) = 0;
+}
+
+void __init iotable_init(struct map_desc *io_desc)
+{
+	/* nothing to do */
+}
+
+/*
+ * We never have holes in the memmap
+ */
+void __init create_memmap_holes(struct meminfo *mi)
+{
+}
+
+static void pte_cache_ctor(void *pte, kmem_cache_t *cache, unsigned long flags)
+{
+	memzero(pte, sizeof(pte_t) * PTRS_PER_PTE);
+}
+
+static void pgd_cache_ctor(void *pgd, kmem_cache_t *cache, unsigned long flags)
+{
+	memzero(pgd + MEMC_TABLE_SIZE, USER_PTRS_PER_PGD * sizeof(pgd_t));
+}
+
+void __init pgtable_cache_init(void)
+{
+	pte_cache = kmem_cache_create("pte-cache",
+				sizeof(pte_t) * PTRS_PER_PTE,
+				0, 0, pte_cache_ctor, NULL);
+	if (!pte_cache)
+		BUG();
+
+	pgd_cache = kmem_cache_create("pgd-cache", MEMC_TABLE_SIZE +
+				sizeof(pgd_t) * PTRS_PER_PGD,
+				0, 0, pgd_cache_ctor, NULL);
+	if (!pgd_cache)
+		BUG();
+}
diff -Nru a/arch/arm26/mm/mm-memc.c b/arch/arm26/mm/mm-memc.c
--- a/arch/arm26/mm/mm-memc.c	2005-01-10 20:11:23 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,202 +0,0 @@
-/*
- *  linux/arch/arm/mm/mm-armo.c
- *
- *  Copyright (C) 1998-2000 Russell King
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- *  Page table sludge for older ARM processor architectures.
- */
-#include <linux/sched.h>
-#include <linux/mm.h>
-#include <linux/init.h>
-#include <linux/bootmem.h>
-
-#include <asm/pgtable.h>
-#include <asm/pgalloc.h>
-#include <asm/page.h>
-#include <asm/memory.h>
-#include <asm/hardware.h>
-
-#include <asm/map.h>
-
-#define MEMC_TABLE_SIZE (256*sizeof(unsigned long))
-
-kmem_cache_t *pte_cache, *pgd_cache;
-int page_nr;
-
-/*
- * Allocate space for a page table and a MEMC table.
- * Note that we place the MEMC
- * table before the page directory.  This means we can
- * easily get to both tightly-associated data structures
- * with a single pointer.
- */
-static inline pgd_t *alloc_pgd_table(void)
-{
-	void *pg2k = kmem_cache_alloc(pgd_cache, GFP_KERNEL);
-
-	if (pg2k)
-		pg2k += MEMC_TABLE_SIZE;
-
-	return (pgd_t *)pg2k;
-}
-
-/*
- * Free a page table. this function is the counterpart to get_pgd_slow
- * below, not alloc_pgd_table above.
- */
-void free_pgd_slow(pgd_t *pgd)
-{
-	unsigned long tbl = (unsigned long)pgd;
-
-	tbl -= MEMC_TABLE_SIZE;
-
-	kmem_cache_free(pgd_cache, (void *)tbl);
-}
-
-/*
- * Allocate a new pgd and fill it in ready for use
- *
- * A new tasks pgd is completely empty (all pages !present) except for:
- *
- * o The machine vectors at virtual address 0x0
- * o The vmalloc region at the top of address space
- *
- */
-#define FIRST_KERNEL_PGD_NR     (FIRST_USER_PGD_NR + USER_PTRS_PER_PGD)
-
-pgd_t *get_pgd_slow(struct mm_struct *mm)
-{
-	pgd_t *new_pgd, *init_pgd;
-	pmd_t *new_pmd, *init_pmd;
-	pte_t *new_pte, *init_pte;
-
-	new_pgd = alloc_pgd_table();
-	if (!new_pgd)
-		goto no_pgd;
-
-	/*
-	 * This lock is here just to satisfy pmd_alloc and pte_lock
-         * FIXME: I bet we could avoid taking it pretty much altogether
-	 */
-	spin_lock(&mm->page_table_lock);
-
-	/*
-	 * On ARM, first page must always be allocated since it contains
-	 * the machine vectors.
-	 */
-	new_pmd = pmd_alloc(mm, new_pgd, 0);
-	if (!new_pmd)
-		goto no_pmd;
-
-	new_pte = pte_alloc_kernel(mm, new_pmd, 0);
-	if (!new_pte)
-		goto no_pte;
-
-	init_pgd = pgd_offset(&init_mm, 0);
-	init_pmd = pmd_offset(init_pgd, 0);
-	init_pte = pte_offset(init_pmd, 0);
-
-	set_pte(new_pte, *init_pte);
-
-	/*
-	 * the page table entries are zeroed
-	 * when the table is created. (see the cache_ctor functions below)
-	 * Now we need to plonk the kernel (vmalloc) area at the end of
-	 * the address space. We copy this from the init thread, just like
-	 * the init_pte we copied above...
-	 */
-	memcpy(new_pgd + FIRST_KERNEL_PGD_NR, init_pgd + FIRST_KERNEL_PGD_NR,
-		(PTRS_PER_PGD - FIRST_KERNEL_PGD_NR) * sizeof(pgd_t));
-
-	spin_unlock(&mm->page_table_lock);
-
-	/* update MEMC tables */
-	cpu_memc_update_all(new_pgd);
-	return new_pgd;
-
-no_pte:
-	spin_unlock(&mm->page_table_lock);
-	pmd_free(new_pmd);
-	free_pgd_slow(new_pgd);
-	return NULL;
-
-no_pmd:
-	spin_unlock(&mm->page_table_lock);
-	free_pgd_slow(new_pgd);
-	return NULL;
-
-no_pgd:
-	return NULL;
-}
-
-/*
- * No special code is required here.
- */
-void setup_mm_for_reboot(char mode)
-{
-}
-
-/*
- * This contains the code to setup the memory map on an ARM2/ARM250/ARM3
- *  o swapper_pg_dir = 0x0207d000
- *  o kernel proper starts at 0x0208000
- *  o create (allocate) a pte to contain the machine vectors
- *  o populate the pte (points to 0x02078000) (FIXME - is it zeroed?)
- *  o populate the init tasks page directory (pgd) with the new pte
- *  o zero the rest of the init tasks pgdir (FIXME - what about vmalloc?!)
- */
-void __init memtable_init(struct meminfo *mi)
-{
-	pte_t *pte;
-	int i;
-
-	page_nr = max_low_pfn;
-
-	pte = alloc_bootmem_low_pages(PTRS_PER_PTE * sizeof(pte_t));
-	pte[0] = mk_pte_phys(PAGE_OFFSET + SCREEN_SIZE, PAGE_READONLY);
-	pmd_populate(&init_mm, pmd_offset(swapper_pg_dir, 0), pte);
-
-	for (i = 1; i < PTRS_PER_PGD; i++)
-		pgd_val(swapper_pg_dir[i]) = 0;
-}
-
-void __init iotable_init(struct map_desc *io_desc)
-{
-	/* nothing to do */
-}
-
-/*
- * We never have holes in the memmap
- */
-void __init create_memmap_holes(struct meminfo *mi)
-{
-}
-
-static void pte_cache_ctor(void *pte, kmem_cache_t *cache, unsigned long flags)
-{
-	memzero(pte, sizeof(pte_t) * PTRS_PER_PTE);
-}
-
-static void pgd_cache_ctor(void *pgd, kmem_cache_t *cache, unsigned long flags)
-{
-	memzero(pgd + MEMC_TABLE_SIZE, USER_PTRS_PER_PGD * sizeof(pgd_t));
-}
-
-void __init pgtable_cache_init(void)
-{
-	pte_cache = kmem_cache_create("pte-cache",
-				sizeof(pte_t) * PTRS_PER_PTE,
-				0, 0, pte_cache_ctor, NULL);
-	if (!pte_cache)
-		BUG();
-
-	pgd_cache = kmem_cache_create("pgd-cache", MEMC_TABLE_SIZE +
-				sizeof(pgd_t) * PTRS_PER_PGD,
-				0, 0, pgd_cache_ctor, NULL);
-	if (!pgd_cache)
-		BUG();
-}
diff -Nru a/arch/arm26/mm/proc-funcs.S b/arch/arm26/mm/proc-funcs.S
--- a/arch/arm26/mm/proc-funcs.S	2005-01-10 20:11:22 -08:00
+++ b/arch/arm26/mm/proc-funcs.S	2005-01-10 20:11:22 -08:00
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/mm/proc-arm2,3.S
+ *  linux/arch/arm26/mm/proc-arm2,3.S
  *
  *  Copyright (C) 1997-1999 Russell King
  *
diff -Nru a/arch/arm26/mm/small_page.c b/arch/arm26/mm/small_page.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/arm26/mm/small_page.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,194 @@
+/*
+ *  linux/arch/arm26/mm/small_page.c
+ *
+ *  Copyright (C) 1996  Russell King
+ *  Copyright (C) 2003  Ian Molton
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ *  Changelog:
+ *   26/01/1996	RMK	Cleaned up various areas to make little more generic
+ *   07/02/1999	RMK	Support added for 16K and 32K page sizes
+ *			containing 8K blocks
+ *   23/05/2004 IM	Fixed to use struct page->lru (thanks wli)
+ *
+ */
+#include <linux/signal.h>
+#include <linux/sched.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/string.h>
+#include <linux/types.h>
+#include <linux/ptrace.h>
+#include <linux/mman.h>
+#include <linux/mm.h>
+#include <linux/swap.h>
+#include <linux/smp.h>
+#include <linux/bitops.h>
+
+#include <asm/pgtable.h>
+
+#define PEDANTIC
+
+/*
+ * Requirement:
+ *  We need to be able to allocate naturally aligned memory of finer
+ *  granularity than the page size.  This is typically used for the
+ *  second level page tables on 32-bit ARMs.
+ *
+ * FIXME - this comment is *out of date*
+ * Theory:
+ *  We "misuse" the Linux memory management system.  We use alloc_page
+ *  to allocate a page and then mark it as reserved.  The Linux memory
+ *  management system will then ignore the "offset", "next_hash" and
+ *  "pprev_hash" entries in the mem_map for this page.
+ *
+ *  We then use a bitstring in the "offset" field to mark which segments
+ *  of the page are in use, and manipulate this as required during the
+ *  allocation and freeing of these small pages.
+ *
+ *  We also maintain a queue of pages being used for this purpose using
+ *  the "next_hash" and "pprev_hash" entries of mem_map;
+ */
+
+struct order {
+	struct list_head queue;
+	unsigned int mask;		/* (1 << shift) - 1		*/
+	unsigned int shift;		/* (1 << shift) size of page	*/
+	unsigned int block_mask;	/* nr_blocks - 1		*/
+	unsigned int all_used;		/* (1 << nr_blocks) - 1		*/
+};
+
+
+static struct order orders[] = {
+#if PAGE_SIZE == 32768
+	{ LIST_HEAD_INIT(orders[0].queue), 2047, 11, 15, 0x0000ffff },
+	{ LIST_HEAD_INIT(orders[1].queue), 8191, 13,  3, 0x0000000f }
+#else
+#error unsupported page size (ARGH!)
+#endif
+};
+
+#define USED_MAP(pg)			((pg)->index)
+#define TEST_AND_CLEAR_USED(pg,off)	(test_and_clear_bit(off, &USED_MAP(pg)))
+#define SET_USED(pg,off)		(set_bit(off, &USED_MAP(pg)))
+
+static spinlock_t small_page_lock = SPIN_LOCK_UNLOCKED;
+
+static unsigned long __get_small_page(int priority, struct order *order)
+{
+	unsigned long flags;
+	struct page *page;
+	int offset;
+
+	do {
+		spin_lock_irqsave(&small_page_lock, flags);
+
+		if (list_empty(&order->queue))
+			goto need_new_page;
+
+		page = list_entry(order->queue.next, struct page, lru);
+again:
+#ifdef PEDANTIC
+		if (USED_MAP(page) & ~order->all_used)
+			PAGE_BUG(page);
+#endif
+		offset = ffz(USED_MAP(page));
+		SET_USED(page, offset);
+		if (USED_MAP(page) == order->all_used)
+			list_del_init(&page->lru);
+		spin_unlock_irqrestore(&small_page_lock, flags);
+
+		return (unsigned long) page_address(page) + (offset << order->shift);
+
+need_new_page:
+		spin_unlock_irqrestore(&small_page_lock, flags);
+		page = alloc_page(priority);
+		spin_lock_irqsave(&small_page_lock, flags);
+
+		if (list_empty(&order->queue)) {
+			if (!page)
+				goto no_page;
+			SetPageReserved(page);
+			USED_MAP(page) = 0;
+			list_add(&page->lru, &order->queue);
+			goto again;
+		}
+
+		spin_unlock_irqrestore(&small_page_lock, flags);
+		__free_page(page);
+	} while (1);
+
+no_page:
+	spin_unlock_irqrestore(&small_page_lock, flags);
+	return 0;
+}
+
+static void __free_small_page(unsigned long spage, struct order *order)
+{
+	unsigned long flags;
+	struct page *page;
+
+	if (virt_addr_valid(spage)) {
+		page = virt_to_page(spage);
+
+		/*
+		 * The container-page must be marked Reserved
+		 */
+		if (!PageReserved(page) || spage & order->mask)
+			goto non_small;
+
+#ifdef PEDANTIC
+		if (USED_MAP(page) & ~order->all_used)
+			PAGE_BUG(page);
+#endif
+
+		spage = spage >> order->shift;
+		spage &= order->block_mask;
+
+		/*
+		 * the following must be atomic wrt get_page
+		 */
+		spin_lock_irqsave(&small_page_lock, flags);
+
+		if (USED_MAP(page) == order->all_used)
+			list_add(&page->lru, &order->queue);
+
+		if (!TEST_AND_CLEAR_USED(page, spage))
+			goto already_free;
+
+		if (USED_MAP(page) == 0)
+			goto free_page;
+
+		spin_unlock_irqrestore(&small_page_lock, flags);
+	}
+	return;
+
+free_page:
+	/*
+	 * unlink the page from the small page queue and free it
+	 */
+	list_del_init(&page->lru);
+	spin_unlock_irqrestore(&small_page_lock, flags);
+	ClearPageReserved(page);
+	__free_page(page);
+	return;
+
+non_small:
+	printk("Trying to free non-small page from %p\n", __builtin_return_address(0));
+	return;
+already_free:
+	printk("Trying to free free small page from %p\n", __builtin_return_address(0));
+}
+
+unsigned long get_page_8k(int priority)
+{
+	return __get_small_page(priority, orders+1);
+}
+
+void free_page_8k(unsigned long spage)
+{
+	__free_small_page(spage, orders+1);
+}
diff -Nru a/arch/cris/Kconfig b/arch/cris/Kconfig
--- a/arch/cris/Kconfig	2005-01-10 20:11:22 -08:00
+++ b/arch/cris/Kconfig	2005-01-10 20:11:22 -08:00
@@ -20,6 +20,10 @@
 config RWSEM_XCHGADD_ALGORITHM
 	bool
 
+config GENERIC_CALIBRATE_DELAY
+	bool
+	default y
+
 config CRIS
 	bool
 	default y
diff -Nru a/arch/cris/arch-v10/kernel/fasttimer.c b/arch/cris/arch-v10/kernel/fasttimer.c
--- a/arch/cris/arch-v10/kernel/fasttimer.c	2005-01-10 20:11:24 -08:00
+++ b/arch/cris/arch-v10/kernel/fasttimer.c	2005-01-10 20:11:24 -08:00
@@ -599,23 +599,8 @@
 
 #ifdef CONFIG_PROC_FS
 static int proc_fasttimer_read(char *buf, char **start, off_t offset, int len
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0)
-                       ,int *eof, void *data_unused
-#else
-                        ,int unused
-#endif
-                               );
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0)
+                       ,int *eof, void *data_unused);
 static struct proc_dir_entry *fasttimer_proc_entry;
-#else
-static struct proc_dir_entry fasttimer_proc_entry =
-{
-  0, 9, "fasttimer",
-  S_IFREG | S_IRUGO, 1, 0, 0,
-  0, NULL /* ops -- default to array */,
-  &proc_fasttimer_read /* get_info */,
-};
-#endif
 #endif /* CONFIG_PROC_FS */
 
 #ifdef CONFIG_PROC_FS
@@ -624,12 +609,7 @@
 #define BIG_BUF_SIZE (500 + NUM_TIMER_STATS * 300)
 
 static int proc_fasttimer_read(char *buf, char **start, off_t offset, int len
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0)
-                       ,int *eof, void *data_unused
-#else
-                        ,int unused
-#endif
-                               )
+                       ,int *eof, void *data_unused)
 {
   unsigned long flags;
   int i = 0;
@@ -805,9 +785,7 @@
 
   memcpy(buf, bigbuf + offset, len);
   *start = buf;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0)
   *eof = 1;
-#endif
 
   return len;
 }
@@ -982,12 +960,8 @@
     }
 #endif
 #ifdef CONFIG_PROC_FS
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0)
    if ((fasttimer_proc_entry = create_proc_entry( "fasttimer", 0, 0 )))
      fasttimer_proc_entry->read_proc = proc_fasttimer_read;
-#else
-    proc_register_dynamic(&proc_root, &fasttimer_proc_entry);
-#endif
 #endif /* PROC_FS */
     if(request_irq(TIMER1_IRQ_NBR, timer1_handler, SA_SHIRQ,
                    "fast timer int", NULL))
diff -Nru a/arch/frv/Kconfig b/arch/frv/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/Kconfig	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,501 @@
+#
+# For a description of the syntax of this configuration file,
+# see Documentation/kbuild/kconfig-language.txt.
+#
+config FRV
+	bool
+	default y
+
+config UID16
+	bool
+	default y
+
+config RWSEM_GENERIC_SPINLOCK
+	bool
+	default y
+
+config RWSEM_XCHGADD_ALGORITHM
+	bool
+
+config GENERIC_FIND_NEXT_BIT
+	bool
+	default y
+
+config GENERIC_CALIBRATE_DELAY
+	bool
+	default n
+
+config GENERIC_HARDIRQS
+	bool
+	default n
+
+mainmenu "Fujitsu FR-V Kernel Configuration"
+
+source "init/Kconfig"
+
+
+menu "Fujitsu FR-V system setup"
+
+config MMU
+	bool "MMU support"
+	help
+	  This options switches on and off support for the FR-V MMU
+	  (effectively switching between vmlinux and uClinux). Not all FR-V
+	  CPUs support this. Currently only the FR451 has a sufficiently
+	  featured MMU.
+
+config FRV_OUTOFLINE_ATOMIC_OPS
+	bool "Out-of-line the FRV atomic operations"
+	default n
+	help
+	  Setting this option causes the FR-V atomic operations to be mostly
+	  implemented out-of-line.
+
+	  See Documentation/fujitsu/frv/atomic-ops.txt for more information.
+
+config HIGHMEM
+	bool "High memory support"
+	depends on MMU
+	default y
+	help
+	  If you wish to use more than 256MB of memory with your MMU based
+	  system, you will need to select this option. The kernel can only see
+	  the memory between 0xC0000000 and 0xD0000000 directly... everything
+	  else must be kmapped.
+
+	  The arch is, however, capable of supporting up to 3GB of SDRAM.
+
+config HIGHPTE
+	bool "Allocate page tables in highmem"
+	depends on HIGHMEM
+	default y
+	help
+	  The VM uses one page of memory for each page table.  For systems
+	  with a lot of RAM, this can be wasteful of precious low memory.
+	  Setting this option will put user-space page tables in high memory.
+
+choice
+	prompt "uClinux kernel load address"
+	depends on !MMU
+	default UCPAGE_OFFSET_C0000000
+	help
+	  This option sets the base address for the uClinux kernel. The kernel
+	  will rearrange the SDRAM layout to start at this address, and move
+	  itself to start there. It must be greater than 0, and it must be
+	  sufficiently less than 0xE0000000 that the SDRAM does not intersect
+	  the I/O region.
+
+	  The base address must also be aligned such that the SDRAM controller
+	  can decode it. For instance, a 512MB SDRAM bank must be 512MB aligned.
+
+config UCPAGE_OFFSET_20000000
+       bool "0x20000000"
+
+config UCPAGE_OFFSET_40000000
+       bool "0x40000000"
+
+config UCPAGE_OFFSET_60000000
+       bool "0x60000000"
+
+config UCPAGE_OFFSET_80000000
+       bool "0x80000000"
+
+config UCPAGE_OFFSET_A0000000
+       bool "0xA0000000"
+
+config UCPAGE_OFFSET_C0000000
+       bool "0xC0000000 (Recommended)"
+
+endchoice
+
+config PROTECT_KERNEL
+	bool "Protect core kernel against userspace"
+	depends on !MMU
+	default y
+	help
+	  Selecting this option causes the uClinux kernel to change the
+	  permittivity of DAMPR register covering the core kernel image to
+	  prevent userspace accessing the underlying memory directly.
+
+choice
+	prompt "CPU Caching mode"
+	default FRV_DEFL_CACHE_WBACK
+	help
+	  This option determines the default caching mode for the kernel.
+
+	  Write-Back caching mode involves the all reads and writes causing
+	  the affected cacheline to be read into the cache first before being
+	  operated upon. Memory is not then updated by a write until the cache
+	  is filled and a cacheline needs to be displaced from the cache to
+	  make room. Only at that point is it written back.
+
+	  Write-Behind caching is similar to Write-Back caching, except that a
+	  write won't fetch a cacheline into the cache if there isn't already
+	  one there; it will write directly to memory instead.
+
+	  Write-Through caching only fetches cachelines from memory on a
+	  read. Writes always get written directly to memory. If the affected
+	  cacheline is also in cache, it will be updated too.
+
+	  The final option is to turn of caching entirely.
+
+	  Note that not all CPUs support Write-Behind caching. If the CPU on
+	  which the kernel is running doesn't, it'll fall back to Write-Back
+	  caching.
+
+config FRV_DEFL_CACHE_WBACK
+	bool "Write-Back"
+
+config FRV_DEFL_CACHE_WBEHIND
+	bool "Write-Behind"
+
+config FRV_DEFL_CACHE_WTHRU
+	bool "Write-Through"
+
+config FRV_DEFL_CACHE_DISABLED
+	bool "Disabled"
+
+endchoice
+
+menu "CPU core support"
+
+config CPU_FR401
+	bool "Include FR401 core support"
+	depends on !MMU
+	default y
+	help
+	  This enables support for the FR401, FR401A and FR403 CPUs
+
+config CPU_FR405
+	bool "Include FR405 core support"
+	depends on !MMU
+	default y
+	help
+	  This enables support for the FR405 CPU
+
+config CPU_FR451
+	bool "Include FR451 core support"
+	default y
+	help
+	  This enables support for the FR451 CPU
+
+config CPU_FR451_COMPILE
+	bool "Specifically compile for FR451 core"
+	depends on CPU_FR451 && !CPU_FR401 && !CPU_FR405 && !CPU_FR551
+	default y
+	help
+	  This causes appropriate flags to be passed to the compiler to
+	  optimise for the FR451 CPU
+
+config CPU_FR551
+	bool "Include FR551 core support"
+	depends on !MMU
+	default y
+	help
+	  This enables support for the FR555 CPU
+
+config CPU_FR551_COMPILE
+	bool "Specifically compile for FR551 core"
+	depends on CPU_FR551 && !CPU_FR401 && !CPU_FR405 && !CPU_FR451
+	default y
+	help
+	  This causes appropriate flags to be passed to the compiler to
+	  optimise for the FR555 CPU
+
+config FRV_L1_CACHE_SHIFT
+	int
+	default "5" if CPU_FR401 || CPU_FR405 || CPU_FR451
+	default "6" if CPU_FR551
+
+endmenu
+
+choice
+	prompt "System support"
+	default MB93091_VDK
+
+config MB93091_VDK
+	bool "MB93091 CPU board with or without motherboard"
+
+config MB93093_PDK
+	bool "MB93093 PDK unit"
+
+endchoice
+
+if MB93091_VDK
+choice
+	prompt "Motherboard support"
+	default MB93090_MB00
+
+config MB93090_MB00
+	bool "Use the MB93090-MB00 motherboard"
+	help
+	  Select this option if the MB93091 CPU board is going to be used with
+	  a MB93090-MB00 VDK motherboard
+
+config MB93091_NO_MB
+	bool "Use standalone"
+	help
+	  Select this option if the MB93091 CPU board is going to be used
+	  without a motherboard
+
+endchoice
+endif
+
+choice
+	prompt "GP-Relative data support"
+	default GPREL_DATA_8
+	help
+	  This option controls what data, if any, should be placed in the GP
+	  relative data sections. Using this means that the compiler can
+	  generate accesses to the data using GR16-relative addressing which
+	  is faster than absolute instructions and saves space (2 instructions
+	  per access).
+
+	  However, the GPREL region is limited in size because the immediate
+	  value used in the load and store instructions is limited to a 12-bit
+	  signed number.
+
+	  So if the linker starts complaining that accesses to GPREL data are
+	  out of range, try changing this option from the default.
+
+	  Note that modules will always be compiled with this feature disabled
+	  as the module data will not be in range of the GP base address.
+
+config GPREL_DATA_8
+	bool "Put data objects of up to 8 bytes into GP-REL"
+
+config GPREL_DATA_4
+	bool "Put data objects of up to 4 bytes into GP-REL"
+
+config GPREL_DATA_NONE
+	bool "Don't use GP-REL"
+
+endchoice
+
+config PCI
+	bool "Use PCI"
+	depends on MB93090_MB00
+	default y
+	help
+	  Some FR-V systems (such as the MB93090-MB00 VDK) have PCI
+	  onboard. If you have one of these boards and you wish to use the PCI
+	  facilities, say Y here.
+
+	  The PCI-HOWTO, available from
+	  <http://www.tldp.org/docs.html#howto>, contains valuable
+	  information about which PCI hardware does work under Linux and which
+	  doesn't.
+
+config RESERVE_DMA_COHERENT
+	bool "Reserve DMA coherent memory"
+	depends on PCI && !MMU
+	default y
+	help
+	  Many PCI drivers require access to uncached memory for DMA device
+	  communications (such as is done with some Ethernet buffer rings). If
+	  a fully featured MMU is available, this can be done through page
+	  table settings, but if not, a region has to be set aside and marked
+	  with a special DAMPR register.
+
+	  Setting this option causes uClinux to set aside a portion of the
+	  available memory for use in this manner. The memory will then be
+	  unavailable for normal kernel use.
+
+source "drivers/pci/Kconfig"
+
+config PCMCIA
+	tristate "Use PCMCIA"
+	help
+	  Say Y here if you want to attach PCMCIA- or PC-cards to your FR-V
+	  board.  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.tldp.org/docs.html#howto>.
+
+	  To compile this driver as modules, choose M here: the
+	  modules will be called pcmcia_core and ds.
+
+#config MATH_EMULATION
+#	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.
+
+menu "Power management options"
+source kernel/power/Kconfig
+endmenu
+
+endmenu
+
+
+menu "Executable formats"
+
+source "fs/Kconfig.binfmt"
+
+endmenu
+
+source "drivers/Kconfig"
+
+source "fs/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 EARLY_PRINTK
+	bool "Early printk"
+	depends on EMBEDDED && DEBUG_KERNEL
+	default n
+	help
+	  Write kernel log output directly into the VGA buffer or to a serial
+	  port.
+
+	  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 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 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_SPINLOCK_SLEEP
+	bool "Sleep-inside-spinlock checking"
+	depends on DEBUG_KERNEL
+	help
+	  If you say Y here, various routines which may sleep will become very
+	  noisy if they are called with a spinlock held.
+
+config DEBUG_PAGEALLOC
+	bool "Page alloc debugging"
+	depends on DEBUG_KERNEL
+	help
+	  Unmap pages from the kernel linear mapping after free_pages().
+	  This results in a large slowdown, but helps to find certain types
+	  of memory corruptions.
+
+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 DEBUG_INFO
+	bool "Compile the kernel with debug info"
+	depends on DEBUG_KERNEL
+	help
+          If you say Y here the resulting kernel image will include
+	  debugging info resulting in a larger kernel image.
+	  Say Y here only if you plan to use gdb to debug the kernel.
+	  If you don't debug the kernel, you can say N.
+
+config DEBUG_BUGVERBOSE
+	bool "Verbose BUG() reporting"
+	depends on DEBUG_KERNEL
+
+config FRAME_POINTER
+	bool "Compile the kernel with frame pointers"
+	depends on DEBUG_KERNEL
+	help
+	  If you say Y here the resulting kernel image will be slightly larger
+	  and slower, but it will give very useful debugging information.
+	  If you don't debug the kernel, you can say N, but we may not be able
+	  to solve problems without frame pointers.
+
+config GDBSTUB
+	bool "Remote GDB kernel debugging"
+	depends on DEBUG_KERNEL
+	select DEBUG_INFO
+	select FRAME_POINTER
+	help
+	  If you say Y here, it will be possible to remotely debug the kernel
+	  using gdb. This enlarges your kernel ELF 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.
+
+choice
+	prompt "GDB stub port"
+	default GDBSTUB_UART1
+	depends on GDBSTUB
+	help
+	  Select the on-CPU port used for GDB-stub
+
+config GDBSTUB_UART0
+	bool "/dev/ttyS0"
+
+config GDBSTUB_UART1
+	bool "/dev/ttyS1"
+
+endchoice
+
+config GDBSTUB_IMMEDIATE
+	bool "Break into GDB stub immediately"
+	depends on GDBSTUB
+	help
+	  If you say Y here, GDB stub will break into the program as soon as
+	  possible, leaving the program counter at the beginning of
+	  start_kernel() in init/main.c.
+
+config GDB_CONSOLE
+	bool "Console output to GDB"
+	depends on KGDB
+	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'.
+
+endmenu
+
+source "security/Kconfig"
+
+source "crypto/Kconfig"
+
+source "lib/Kconfig"
diff -Nru a/arch/frv/Makefile b/arch/frv/Makefile
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/Makefile	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,118 @@
+#
+# frv/Makefile
+#
+# This file is included by the global makefile so that you can add your own
+# architecture-specific flags and dependencies. Remember to do have actions
+# for "archclean" and "archdep" for cleaning up and making dependencies for
+# this architecture
+#
+# This file is subject to the terms and conditions of the GNU General Public
+# License.  See the file "COPYING" in the main directory of this archive
+# for more details.
+#
+# Copyright (c) 2003, 2004 Red Hat Inc.
+# - Written by David Howells <dhowells@redhat.com>
+# - Derived from arch/m68knommu/Makefile,
+#	Copyright (c) 1999,2001  D. Jeff Dionne <jeff@lineo.ca>,
+#	Rt-Control Inc. / Lineo, Inc.
+#
+# Copyright (C) 1998,1999  D. Jeff Dionne <jeff@uclinux.org>,
+#                          Kenneth Albanowski <kjahds@kjahds.com>,
+#
+# Based on arch/m68k/Makefile:
+# Copyright (C) 1994 by Hamish Macdonald
+#
+
+CCSPECS	:= $(shell $(CC) -v 2>&1 | grep "^Reading specs from " | head -1 | cut -c20-)
+CCDIR	:= $(strip $(patsubst %/specs,%,$(CCSPECS)))
+CPUCLASS := fr400
+
+# test for cross compiling
+COMPILE_ARCH = $(shell uname -m)
+
+ifdef CONFIG_MMU
+UTS_SYSNAME = -DUTS_SYSNAME=\"Linux\"
+else
+UTS_SYSNAME = -DUTS_SYSNAME=\"uClinux\"
+endif
+
+ARCHMODFLAGS	+= -G0 -mlong-calls
+
+ifdef CONFIG_GPREL_DATA_8
+CFLAGS		+= -G8
+else
+ifdef CONFIG_GPREL_DATA_4
+CFLAGS		+= -G4
+else
+ifdef CONFIG_GPREL_DATA_NONE
+CFLAGS		+= -G0
+endif
+endif
+endif
+
+#LDFLAGS_vmlinux	:= -Map linkmap.txt
+
+ifdef CONFIG_GC_SECTIONS
+CFLAGS		+= -ffunction-sections -fdata-sections
+LINKFLAGS	+= --gc-sections
+endif
+
+ifndef CONFIG_FRAME_POINTER
+CFLAGS		+= -mno-linked-fp
+endif
+
+ifdef CONFIG_CPU_FR451_COMPILE
+CFLAGS		+= -mcpu=fr450
+AFLAGS		+= -mcpu=fr450
+ASFLAGS		+= -mcpu=fr450
+else
+ifdef CONFIG_CPU_FR551_COMPILE
+CFLAGS		+= -mcpu=fr550
+AFLAGS		+= -mcpu=fr550
+ASFLAGS		+= -mcpu=fr550
+else
+CFLAGS		+= -mcpu=fr400
+AFLAGS		+= -mcpu=fr400
+ASFLAGS		+= -mcpu=fr400
+endif
+endif
+
+# pretend the kernel is going to run on an FR400 with no media-fp unit
+# - reserve CC3 for use with atomic ops
+# - all the extra registers are dealt with only at context switch time
+CFLAGS		+= -mno-fdpic -mgpr-32 -msoft-float -mno-media
+CFLAGS		+= -ffixed-fcc3 -ffixed-cc3 -ffixed-gr15
+AFLAGS		+= -mno-fdpic
+ASFLAGS		+= -mno-fdpic
+
+# make sure the .S files get compiled with debug info
+# and disable optimisations that are unhelpful whilst debugging
+ifdef CONFIG_DEBUG_INFO
+CFLAGS		+= -O1
+AFLAGS		+= -Wa,--gdwarf2
+ASFLAGS		+= -Wa,--gdwarf2
+endif
+
+head-y		:= arch/frv/kernel/head.o arch/frv/kernel/init_task.o
+
+core-y		+= arch/frv/kernel/ arch/frv/mm/
+libs-y		+= arch/frv/lib/
+
+core-$(CONFIG_MB93090_MB00)	+= arch/frv/mb93090-mb00/
+
+all: Image
+
+Image: vmlinux
+	$(Q)$(MAKE) $(build)=arch/frv/boot $@
+
+bootstrap:
+	$(Q)$(MAKEBOOT) bootstrap
+
+archmrproper:
+	$(Q)$(MAKE) -C arch/frv/boot mrproper
+
+archclean:
+	$(Q)$(MAKE) -C arch/frv/boot clean
+
+archdep: scripts/mkdep symlinks
+	$(Q)$(MAKE) -C arch/frv/boot dep
diff -Nru a/arch/frv/boot/Makefile b/arch/frv/boot/Makefile
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/boot/Makefile	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,73 @@
+#
+# arch/arm/boot/Makefile
+#
+# This file is subject to the terms and conditions of the GNU General Public
+# License.  See the file "COPYING" in the main directory of this archive
+# for more details.
+#
+# Copyright (C) 1995-2000 Russell King
+#
+
+SYSTEM	=$(TOPDIR)/$(LINUX)
+
+ZTEXTADDR	 = 0x02080000
+PARAMS_PHYS	 = 0x0207c000
+INITRD_PHYS	 = 0x02180000
+INITRD_VIRT	 = 0x02180000
+
+#
+# If you don't define ZRELADDR above,
+# then it defaults to ZTEXTADDR
+#
+ifeq ($(ZRELADDR),)
+ZRELADDR	= $(ZTEXTADDR)
+endif
+
+export	SYSTEM ZTEXTADDR ZBSSADDR ZRELADDR INITRD_PHYS INITRD_VIRT PARAMS_PHYS
+
+Image: $(obj)/Image
+
+targets: $(obj)/Image
+
+$(obj)/Image: vmlinux FORCE
+	$(OBJCOPY) -O binary -R .note -R .comment -S vmlinux $@
+
+#$(obj)/Image:	$(CONFIGURE) $(SYSTEM)
+#	$(OBJCOPY) -O binary -R .note -R .comment -g -S $(SYSTEM) $@
+
+bzImage: zImage
+
+zImage:	$(CONFIGURE) compressed/$(LINUX)
+	$(OBJCOPY) -O binary -R .note -R .comment -S compressed/$(LINUX) $@
+
+bootpImage: bootp/bootp
+	$(OBJCOPY) -O binary -R .note -R .comment -S bootp/bootp $@
+
+compressed/$(LINUX): $(TOPDIR)/$(LINUX) dep
+	@$(MAKE) -C compressed $(LINUX)
+
+bootp/bootp: zImage initrd
+	@$(MAKE) -C bootp bootp
+
+initrd:
+	@test "$(INITRD_VIRT)" != "" || (echo This architecture does not support INITRD; exit -1)
+	@test "$(INITRD)" != "" || (echo You must specify INITRD; exit -1)
+
+#
+# installation
+#
+install: $(CONFIGURE) Image
+	sh ./install.sh $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) Image $(TOPDIR)/System.map "$(INSTALL_PATH)"
+
+zinstall: $(CONFIGURE) zImage
+	sh ./install.sh $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) zImage $(TOPDIR)/System.map "$(INSTALL_PATH)"
+
+#
+# miscellany
+#
+mrproper clean:
+	$(RM) Image zImage bootpImage
+#	@$(MAKE) -C compressed clean
+#	@$(MAKE) -C bootp clean
+
+dep:
diff -Nru a/arch/frv/kernel/Makefile b/arch/frv/kernel/Makefile
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/kernel/Makefile	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,22 @@
+#
+# Makefile for the linux kernel.
+#
+
+heads-y				:= head-uc-fr401.o head-uc-fr451.o head-uc-fr555.o
+heads-$(CONFIG_MMU)		:= head-mmu-fr451.o
+
+extra-y:= head.o init_task.o vmlinux.lds
+
+obj-y := $(heads-y) entry.o entry-table.o break.o switch_to.o kernel_thread.o \
+	 process.o traps.o ptrace.o signal.o dma.o \
+	 sys_frv.o time.o semaphore.o setup.o frv_ksyms.o \
+	 debug-stub.o irq.o irq-routing.o sleep.o uaccess.o
+
+obj-$(CONFIG_GDBSTUB)		+= gdb-stub.o gdb-io.o
+
+obj-$(CONFIG_MB93091_VDK)	+= irq-mb93091.o
+obj-$(CONFIG_MB93093_PDK)	+= irq-mb93093.o
+obj-$(CONFIG_FUJITSU_MB93493)	+= irq-mb93493.o
+obj-$(CONFIG_PM)		+= pm.o cmode.o
+obj-$(CONFIG_MB93093_PDK)	+= pm-mb93093.o
+obj-$(CONFIG_SYSCTL)		+= sysctl.o
diff -Nru a/arch/frv/kernel/break.S b/arch/frv/kernel/break.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/kernel/break.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,720 @@
+/* break.S: Break interrupt handling (kept separate from entry.S)
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/sys.h>
+#include <linux/config.h>
+#include <linux/linkage.h>
+#include <asm/setup.h>
+#include <asm/segment.h>
+#include <asm/ptrace.h>
+#include <asm/spr-regs.h>
+
+#include <asm/errno.h>
+
+#
+# the break handler has its own stack
+#
+	.section	.bss.stack
+	.globl		__break_user_context
+	.balign		8192
+__break_stack:
+	.space		(8192 - (USER_CONTEXT_SIZE + REG__DEBUG_XTRA)) & ~7
+__break_stack_tos:
+	.space		REG__DEBUG_XTRA
+__break_user_context:
+	.space		USER_CONTEXT_SIZE
+
+#
+# miscellaneous variables
+#
+	.section	.bss
+#ifdef CONFIG_MMU
+	.globl		__break_tlb_miss_real_return_info
+__break_tlb_miss_real_return_info:
+	.balign		8
+	.space		2*4			/* saved PCSR, PSR for TLB-miss handler fixup */
+#endif
+
+__break_trace_through_exceptions:
+	.space		4
+
+#define CS2_ECS1	0xe1200000
+#define CS2_USERLED	0x4
+
+.macro LEDS val,reg
+#	sethi.p		%hi(CS2_ECS1+CS2_USERLED),gr30
+#	setlo		%lo(CS2_ECS1+CS2_USERLED),gr30
+#	setlos		#~\val,\reg
+#	st		\reg,@(gr30,gr0)
+#	setlos		#0x5555,\reg
+#	sethi.p		%hi(0xffc00100),gr30
+#	setlo		%lo(0xffc00100),gr30
+#	sth		\reg,@(gr30,gr0)
+#	membar
+.endm
+
+###############################################################################
+#
+# entry point for Break Exceptions/Interrupts
+#
+###############################################################################
+	.text
+	.balign		4
+	.globl		__entry_break
+__entry_break:
+#ifdef CONFIG_MMU
+	movgs		gr31,scr3
+#endif
+	LEDS		0x1001,gr31
+
+	sethi.p		%hi(__break_user_context),gr31
+	setlo		%lo(__break_user_context),gr31
+
+	stdi		gr2,@(gr31,#REG_GR(2))
+	movsg		ccr,gr3
+	sti		gr3,@(gr31,#REG_CCR)
+
+	# catch the return from a TLB-miss handler that had single-step disabled
+	# traps will be enabled, so we have to do this now
+#ifdef CONFIG_MMU
+	movsg		bpcsr,gr3
+	sethi.p		%hi(__break_tlb_miss_return_breaks_here),gr2
+	setlo		%lo(__break_tlb_miss_return_breaks_here),gr2
+	subcc		gr2,gr3,gr0,icc0
+	beq		icc0,#2,__break_return_singlestep_tlbmiss
+#endif
+
+	# determine whether we have stepped through into an exception
+	# - we need to take special action to suspend h/w single stepping if we've done
+	#   that, so that the gdbstub doesn't get bogged down endlessly stepping through
+	#   external interrupt handling
+	movsg		bpsr,gr3
+	andicc		gr3,#BPSR_BET,gr0,icc0
+	bne		icc0,#2,__break_maybe_userspace	/* jump if PSR.ET was 1 */
+
+	LEDS		0x1003,gr2
+
+	movsg		brr,gr3
+	andicc		gr3,#BRR_ST,gr0,icc0
+	andicc.p	gr3,#BRR_SB,gr0,icc1
+	bne		icc0,#2,__break_step		/* jump if single-step caused break */
+	beq		icc1,#2,__break_continue	/* jump if BREAK didn't cause break */
+
+	LEDS		0x1007,gr2
+
+	# handle special breaks
+	movsg		bpcsr,gr3
+
+	sethi.p		%hi(__entry_return_singlestep_breaks_here),gr2
+	setlo		%lo(__entry_return_singlestep_breaks_here),gr2
+	subcc		gr2,gr3,gr0,icc0
+	beq		icc0,#2,__break_return_singlestep
+
+	bra		__break_continue
+
+
+###############################################################################
+#
+# handle BREAK instruction in kernel-mode exception epilogue
+#
+###############################################################################
+__break_return_singlestep:
+	LEDS		0x100f,gr2
+
+	# special break insn requests single-stepping to be turned back on
+	#		HERE		RETT
+	# PSR.ET	0		0
+	# PSR.PS	old PSR.S	?
+	# PSR.S		1		1
+	# BPSR.ET	0		1 (can't have caused orig excep otherwise)
+	# BPSR.BS	1		old PSR.S
+	movsg		dcr,gr2
+	sethi.p		%hi(DCR_SE),gr3
+	setlo		%lo(DCR_SE),gr3
+	or		gr2,gr3,gr2
+	movgs		gr2,dcr
+
+	movsg		psr,gr2
+	andi		gr2,#PSR_PS,gr2
+	slli		gr2,#11,gr2			/* PSR.PS -> BPSR.BS */
+	ori		gr2,#BPSR_BET,gr2		/* 1 -> BPSR.BET */
+	movgs		gr2,bpsr
+
+	# return to the invoker of the original kernel exception
+	movsg		pcsr,gr2
+	movgs		gr2,bpcsr
+
+	LEDS		0x101f,gr2
+
+	ldi		@(gr31,#REG_CCR),gr3
+	movgs		gr3,ccr
+	lddi.p		@(gr31,#REG_GR(2)),gr2
+	xor		gr31,gr31,gr31
+	movgs		gr0,brr
+#ifdef CONFIG_MMU
+	movsg		scr3,gr31
+#endif
+	rett		#1
+
+###############################################################################
+#
+# handle BREAK instruction in TLB-miss handler return path
+#
+###############################################################################
+#ifdef CONFIG_MMU
+__break_return_singlestep_tlbmiss:
+	LEDS		0x1100,gr2
+
+	sethi.p		%hi(__break_tlb_miss_real_return_info),gr3
+	setlo		%lo(__break_tlb_miss_real_return_info),gr3
+	lddi		@(gr3,#0),gr2
+	movgs		gr2,pcsr
+	movgs		gr3,psr
+
+	bra		__break_return_singlestep
+#endif
+
+
+###############################################################################
+#
+# handle single stepping into an exception prologue from kernel mode
+# - we try and catch it whilst it is still in the main vector table
+# - if we catch it there, we have to jump to the fixup handler
+#   - there is a fixup table that has a pointer for every 16b slot in the trap
+#     table
+#
+###############################################################################
+__break_step:
+	LEDS		0x2003,gr2
+
+	# external interrupts seem to escape from the trap table before single
+	# step catches up with them
+	movsg		bpcsr,gr2
+	sethi.p		%hi(__entry_kernel_external_interrupt),gr3
+	setlo		%lo(__entry_kernel_external_interrupt),gr3
+	subcc		gr2,gr3,gr0,icc0
+	beq		icc0,#2,__break_step_kernel_external_interrupt
+	sethi.p		%hi(__entry_uspace_external_interrupt),gr3
+	setlo		%lo(__entry_uspace_external_interrupt),gr3
+	subcc		gr2,gr3,gr0,icc0
+	beq		icc0,#2,__break_step_uspace_external_interrupt
+
+	LEDS		0x2007,gr2
+
+	# the two main vector tables are adjacent on one 8Kb slab
+	movsg		bpcsr,gr2
+	setlos		#0xffffe000,gr3
+	and		gr2,gr3,gr2
+	sethi.p		%hi(__trap_tables),gr3
+	setlo		%lo(__trap_tables),gr3
+	subcc		gr2,gr3,gr0,icc0
+	bne		icc0,#2,__break_continue
+
+	LEDS		0x200f,gr2
+
+	# skip workaround if so requested by GDB
+	sethi.p		%hi(__break_trace_through_exceptions),gr3
+	setlo		%lo(__break_trace_through_exceptions),gr3
+	ld		@(gr3,gr0),gr3
+	subcc		gr3,gr0,gr0,icc0
+	bne		icc0,#0,__break_continue
+
+	LEDS		0x201f,gr2
+
+	# access the fixup table - there's a 1:1 mapping between the slots in the trap tables and
+	# the slots in the trap fixup tables allowing us to simply divide the offset into the
+	# former by 4 to access the latter
+	sethi.p		%hi(__trap_tables),gr3
+	setlo		%lo(__trap_tables),gr3
+	movsg		bpcsr,gr2
+	sub		gr2,gr3,gr2
+	srli.p		gr2,#2,gr2
+
+	sethi		%hi(__trap_fixup_tables),gr3
+	setlo.p		%lo(__trap_fixup_tables),gr3
+	andi		gr2,#~3,gr2
+	ld		@(gr2,gr3),gr2
+	jmpil		@(gr2,#0)
+
+# step through an internal exception from kernel mode
+	.globl		__break_step_kernel_softprog_interrupt
+__break_step_kernel_softprog_interrupt:
+	sethi.p		%hi(__entry_kernel_softprog_interrupt_reentry),gr3
+	setlo		%lo(__entry_kernel_softprog_interrupt_reentry),gr3
+	bra		__break_return_as_kernel_prologue
+
+# step through an external interrupt from kernel mode
+	.globl		__break_step_kernel_external_interrupt
+__break_step_kernel_external_interrupt:
+	sethi.p		%hi(__entry_kernel_external_interrupt_reentry),gr3
+	setlo		%lo(__entry_kernel_external_interrupt_reentry),gr3
+
+__break_return_as_kernel_prologue:
+	LEDS		0x203f,gr2
+
+	movgs		gr3,bpcsr
+
+	# do the bit we had to skip
+#ifdef CONFIG_MMU
+	movsg		ear0,gr2		/* EAR0 can get clobbered by gdb-stub (ICI/ICEI) */
+	movgs		gr2,scr2
+#endif
+
+	or.p		sp,gr0,gr2		/* set up the stack pointer */
+	subi		sp,#REG__END,sp
+	sti.p		gr2,@(sp,#REG_SP)
+
+	setlos		#REG__STATUS_STEP,gr2
+	sti		gr2,@(sp,#REG__STATUS)		/* record single step status */
+
+	# cancel single-stepping mode
+	movsg		dcr,gr2
+	sethi.p		%hi(~DCR_SE),gr3
+	setlo		%lo(~DCR_SE),gr3
+	and		gr2,gr3,gr2
+	movgs		gr2,dcr
+
+	LEDS		0x207f,gr2
+
+	ldi		@(gr31,#REG_CCR),gr3
+	movgs		gr3,ccr
+	lddi.p		@(gr31,#REG_GR(2)),gr2
+	xor		gr31,gr31,gr31
+	movgs		gr0,brr
+#ifdef CONFIG_MMU
+	movsg		scr3,gr31
+#endif
+	rett		#1
+
+# step through an internal exception from uspace mode
+	.globl		__break_step_uspace_softprog_interrupt
+__break_step_uspace_softprog_interrupt:
+	sethi.p		%hi(__entry_uspace_softprog_interrupt_reentry),gr3
+	setlo		%lo(__entry_uspace_softprog_interrupt_reentry),gr3
+	bra		__break_return_as_uspace_prologue
+
+# step through an external interrupt from kernel mode
+	.globl		__break_step_uspace_external_interrupt
+__break_step_uspace_external_interrupt:
+	sethi.p		%hi(__entry_uspace_external_interrupt_reentry),gr3
+	setlo		%lo(__entry_uspace_external_interrupt_reentry),gr3
+
+__break_return_as_uspace_prologue:
+	LEDS		0x20ff,gr2
+
+	movgs		gr3,bpcsr
+
+	# do the bit we had to skip
+	sethi.p		%hi(__kernel_frame0_ptr),gr28
+	setlo		%lo(__kernel_frame0_ptr),gr28
+	ldi.p		@(gr28,#0),gr28
+
+	setlos		#REG__STATUS_STEP,gr2
+	sti		gr2,@(gr28,#REG__STATUS)	/* record single step status */
+
+	# cancel single-stepping mode
+	movsg		dcr,gr2
+	sethi.p		%hi(~DCR_SE),gr3
+	setlo		%lo(~DCR_SE),gr3
+	and		gr2,gr3,gr2
+	movgs		gr2,dcr
+
+	LEDS		0x20fe,gr2
+
+	ldi		@(gr31,#REG_CCR),gr3
+	movgs		gr3,ccr
+	lddi.p		@(gr31,#REG_GR(2)),gr2
+	xor		gr31,gr31,gr31
+	movgs		gr0,brr
+#ifdef CONFIG_MMU
+	movsg		scr3,gr31
+#endif
+	rett		#1
+
+#ifdef CONFIG_MMU
+# step through an ITLB-miss handler from user mode
+	.globl		__break_user_insn_tlb_miss
+__break_user_insn_tlb_miss:
+	# we'll want to try the trap stub again
+	sethi.p		%hi(__trap_user_insn_tlb_miss),gr2
+	setlo		%lo(__trap_user_insn_tlb_miss),gr2
+	movgs		gr2,bpcsr
+
+__break_tlb_miss_common:
+	LEDS		0x2101,gr2
+
+	# cancel single-stepping mode
+	movsg		dcr,gr2
+	sethi.p		%hi(~DCR_SE),gr3
+	setlo		%lo(~DCR_SE),gr3
+	and		gr2,gr3,gr2
+	movgs		gr2,dcr
+
+	# we'll swap the real return address for one with a BREAK insn so that we can re-enable
+	# single stepping on return
+	movsg		pcsr,gr2
+	sethi.p		%hi(__break_tlb_miss_real_return_info),gr3
+	setlo		%lo(__break_tlb_miss_real_return_info),gr3
+	sti		gr2,@(gr3,#0)
+
+	sethi.p		%hi(__break_tlb_miss_return_break),gr2
+	setlo		%lo(__break_tlb_miss_return_break),gr2
+	movgs		gr2,pcsr
+
+	# we also have to fudge PSR because the return BREAK is in kernel space and we want
+	# to get a BREAK fault not an access violation should the return be to userspace
+	movsg		psr,gr2
+	sti.p		gr2,@(gr3,#4)
+	ori		gr2,#PSR_PS,gr2
+	movgs		gr2,psr
+
+	LEDS		0x2102,gr2
+
+	ldi		@(gr31,#REG_CCR),gr3
+	movgs		gr3,ccr
+	lddi		@(gr31,#REG_GR(2)),gr2
+	movsg		scr3,gr31
+	movgs		gr0,brr
+	rett		#1
+
+# step through a DTLB-miss handler from user mode
+	.globl		__break_user_data_tlb_miss
+__break_user_data_tlb_miss:
+	# we'll want to try the trap stub again
+	sethi.p		%hi(__trap_user_data_tlb_miss),gr2
+	setlo		%lo(__trap_user_data_tlb_miss),gr2
+	movgs		gr2,bpcsr
+	bra		__break_tlb_miss_common
+
+# step through an ITLB-miss handler from kernel mode
+	.globl		__break_kernel_insn_tlb_miss
+__break_kernel_insn_tlb_miss:
+	# we'll want to try the trap stub again
+	sethi.p		%hi(__trap_kernel_insn_tlb_miss),gr2
+	setlo		%lo(__trap_kernel_insn_tlb_miss),gr2
+	movgs		gr2,bpcsr
+	bra		__break_tlb_miss_common
+
+# step through a DTLB-miss handler from kernel mode
+	.globl		__break_kernel_data_tlb_miss
+__break_kernel_data_tlb_miss:
+	# we'll want to try the trap stub again
+	sethi.p		%hi(__trap_kernel_data_tlb_miss),gr2
+	setlo		%lo(__trap_kernel_data_tlb_miss),gr2
+	movgs		gr2,bpcsr
+	bra		__break_tlb_miss_common
+#endif
+
+###############################################################################
+#
+# handle debug events originating with userspace
+#
+###############################################################################
+__break_maybe_userspace:
+	LEDS		0x3003,gr2
+
+	setlos		#BPSR_BS,gr2
+	andcc		gr3,gr2,gr0,icc0
+	bne		icc0,#0,__break_continue	/* skip if PSR.S was 1 */
+
+	movsg		brr,gr2
+	andicc		gr2,#BRR_ST|BRR_SB,gr0,icc0
+	beq		icc0,#0,__break_continue	/* jump if not BREAK or single-step */
+
+	LEDS		0x3007,gr2
+
+	# do the first part of the exception prologue here
+	sethi.p		%hi(__kernel_frame0_ptr),gr28
+	setlo		%lo(__kernel_frame0_ptr),gr28
+	ldi		@(gr28,#0),gr28
+	andi		gr28,#~7,gr28
+
+	# set up the kernel stack pointer
+	sti		sp  ,@(gr28,#REG_SP)
+	ori		gr28,0,sp
+	sti		gr0 ,@(gr28,#REG_GR(28))
+
+	stdi		gr20,@(gr28,#REG_GR(20))
+	stdi		gr22,@(gr28,#REG_GR(22))
+
+	movsg		tbr,gr20
+	movsg		bpcsr,gr21
+	movsg		psr,gr22
+
+	# determine the exception type and cancel single-stepping mode
+	or		gr0,gr0,gr23
+
+	movsg		dcr,gr2
+	sethi.p		%hi(DCR_SE),gr3
+	setlo		%lo(DCR_SE),gr3
+	andcc		gr2,gr3,gr0,icc0
+	beq		icc0,#0,__break_no_user_sstep	/* must have been a BREAK insn */
+
+	not		gr3,gr3
+	and		gr2,gr3,gr2
+	movgs		gr2,dcr
+	ori		gr23,#REG__STATUS_STEP,gr23
+
+__break_no_user_sstep:
+	LEDS		0x300f,gr2
+
+	movsg		brr,gr2
+	andi		gr2,#BRR_ST|BRR_SB,gr2
+	slli		gr2,#1,gr2
+	or		gr23,gr2,gr23
+	sti.p		gr23,@(gr28,#REG__STATUS)	/* record single step status */
+
+	# adjust the value acquired from TBR - this indicates the exception
+	setlos		#~TBR_TT,gr2
+	and.p		gr20,gr2,gr20
+	setlos		#TBR_TT_BREAK,gr2
+	or.p		gr20,gr2,gr20
+
+	# fudge PSR.PS and BPSR.BS to return to kernel mode through the trap
+	# table as trap 126
+	andi		gr22,#~PSR_PS,gr22		/* PSR.PS should be 0 */
+	movgs		gr22,psr
+
+	setlos		#BPSR_BS,gr2			/* BPSR.BS should be 1 and BPSR.BET 0 */
+	movgs		gr2,bpsr
+
+	# return through remainder of the exception prologue
+	# - need to load gr23 with return handler address
+	sethi.p		%hi(__entry_return_from_user_exception),gr23
+	setlo		%lo(__entry_return_from_user_exception),gr23
+	sethi.p		%hi(__entry_common),gr3
+	setlo		%lo(__entry_common),gr3
+	movgs		gr3,bpcsr
+
+	LEDS		0x301f,gr2
+
+	ldi		@(gr31,#REG_CCR),gr3
+	movgs		gr3,ccr
+	lddi.p		@(gr31,#REG_GR(2)),gr2
+	xor		gr31,gr31,gr31
+	movgs		gr0,brr
+#ifdef CONFIG_MMU
+	movsg		scr3,gr31
+#endif
+	rett		#1
+
+###############################################################################
+#
+# resume normal debug-mode entry
+#
+###############################################################################
+__break_continue:
+	LEDS		0x4003,gr2
+
+	# set up the kernel stack pointer
+	sti		sp,@(gr31,#REG_SP)
+
+	sethi.p		%hi(__break_stack_tos),sp
+	setlo		%lo(__break_stack_tos),sp
+
+	# finish building the exception frame
+	stdi		gr4 ,@(gr31,#REG_GR(4))
+	stdi		gr6 ,@(gr31,#REG_GR(6))
+	stdi		gr8 ,@(gr31,#REG_GR(8))
+	stdi		gr10,@(gr31,#REG_GR(10))
+	stdi		gr12,@(gr31,#REG_GR(12))
+	stdi		gr14,@(gr31,#REG_GR(14))
+	stdi		gr16,@(gr31,#REG_GR(16))
+	stdi		gr18,@(gr31,#REG_GR(18))
+	stdi		gr20,@(gr31,#REG_GR(20))
+	stdi		gr22,@(gr31,#REG_GR(22))
+	stdi		gr24,@(gr31,#REG_GR(24))
+	stdi		gr26,@(gr31,#REG_GR(26))
+	sti		gr0 ,@(gr31,#REG_GR(28))	/* NULL frame pointer */
+	sti		gr29,@(gr31,#REG_GR(29))
+	sti		gr30,@(gr31,#REG_GR(30))
+	sti		gr8 ,@(gr31,#REG_ORIG_GR8)
+
+#ifdef CONFIG_MMU
+	movsg		scr3,gr19
+	sti		gr19,@(gr31,#REG_GR(31))
+#endif
+
+	movsg		bpsr ,gr19
+	movsg		tbr  ,gr20
+	movsg		bpcsr,gr21
+	movsg		psr  ,gr22
+	movsg		isr  ,gr23
+	movsg		cccr ,gr25
+	movsg		lr   ,gr26
+	movsg		lcr  ,gr27
+
+	andi.p		gr22,#~(PSR_S|PSR_ET),gr5	/* rebuild PSR */
+	andi		gr19,#PSR_ET,gr4
+	or.p		gr4,gr5,gr5
+	srli		gr19,#10,gr4
+	andi		gr4,#PSR_S,gr4
+	or.p		gr4,gr5,gr5
+
+	setlos		#-1,gr6
+	sti		gr20,@(gr31,#REG_TBR)
+	sti		gr21,@(gr31,#REG_PC)
+	sti		gr5 ,@(gr31,#REG_PSR)
+	sti		gr23,@(gr31,#REG_ISR)
+	sti		gr25,@(gr31,#REG_CCCR)
+	stdi		gr26,@(gr31,#REG_LR)
+	sti		gr6 ,@(gr31,#REG_SYSCALLNO)
+
+	# store CPU-specific regs
+	movsg		iacc0h,gr4
+	movsg		iacc0l,gr5
+	stdi		gr4,@(gr31,#REG_IACC0)
+
+	movsg		gner0,gr4
+	movsg		gner1,gr5
+	stdi		gr4,@(gr31,#REG_GNER0)
+
+	# build the debug register frame
+	movsg		brr,gr4
+	movgs		gr0,brr
+	movsg		nmar,gr5
+	movsg		dcr,gr6
+
+	stdi		gr4 ,@(gr31,#REG_BRR)
+	sti		gr19,@(gr31,#REG_BPSR)
+	sti.p		gr6 ,@(gr31,#REG_DCR)
+
+	# trap exceptions during break handling and disable h/w breakpoints/watchpoints
+	sethi		%hi(DCR_EBE),gr5
+	setlo.p		%lo(DCR_EBE),gr5
+	sethi		%hi(__entry_breaktrap_table),gr4
+	setlo		%lo(__entry_breaktrap_table),gr4
+	movgs		gr5,dcr
+	movgs		gr4,tbr
+
+	# set up kernel global registers
+	sethi.p		%hi(__kernel_current_task),gr5
+	setlo		%lo(__kernel_current_task),gr5
+	ld		@(gr5,gr0),gr29
+	ldi.p		@(gr29,#4),gr15		; __current_thread_info = current->thread_info
+
+	sethi		%hi(_gp),gr16
+	setlo.p		%lo(_gp),gr16
+
+	# make sure we (the kernel) get div-zero and misalignment exceptions
+	setlos		#ISR_EDE|ISR_DTT_DIVBYZERO|ISR_EMAM_EXCEPTION,gr5
+	movgs		gr5,isr
+
+	# enter the GDB stub
+	LEDS		0x4007,gr2
+
+	or.p		gr0,gr0,fp
+	call		debug_stub
+
+	LEDS		0x403f,gr2
+
+	# return from break
+	lddi		@(gr31,#REG_IACC0),gr4
+	movgs		gr4,iacc0h
+	movgs		gr5,iacc0l
+
+	lddi		@(gr31,#REG_GNER0),gr4
+	movgs		gr4,gner0
+	movgs		gr5,gner1
+
+	lddi		@(gr31,#REG_LR)  ,gr26
+	lddi		@(gr31,#REG_CCR) ,gr24
+	lddi		@(gr31,#REG_PSR) ,gr22
+	ldi		@(gr31,#REG_PC)  ,gr21
+	ldi		@(gr31,#REG_TBR) ,gr20
+	ldi.p		@(gr31,#REG_DCR) ,gr6
+
+	andi		gr22,#PSR_S,gr19		/* rebuild BPSR */
+	andi.p		gr22,#PSR_ET,gr5
+	slli		gr19,#10,gr19
+	or		gr5,gr19,gr19
+
+	movgs		gr6 ,dcr
+	movgs		gr19,bpsr
+	movgs		gr20,tbr
+	movgs		gr21,bpcsr
+	movgs		gr23,isr
+	movgs		gr24,ccr
+	movgs		gr25,cccr
+	movgs		gr26,lr
+	movgs		gr27,lcr
+
+	LEDS		0x407f,gr2
+
+#ifdef CONFIG_MMU
+	ldi		@(gr31,#REG_GR(31)),gr2
+	movgs		gr2,scr3
+#endif
+
+	ldi		@(gr31,#REG_GR(30)),gr30
+	ldi		@(gr31,#REG_GR(29)),gr29
+	lddi		@(gr31,#REG_GR(26)),gr26
+	lddi		@(gr31,#REG_GR(24)),gr24
+	lddi		@(gr31,#REG_GR(22)),gr22
+	lddi		@(gr31,#REG_GR(20)),gr20
+	lddi		@(gr31,#REG_GR(18)),gr18
+	lddi		@(gr31,#REG_GR(16)),gr16
+	lddi		@(gr31,#REG_GR(14)),gr14
+	lddi		@(gr31,#REG_GR(12)),gr12
+	lddi		@(gr31,#REG_GR(10)),gr10
+	lddi		@(gr31,#REG_GR(8)) ,gr8
+	lddi		@(gr31,#REG_GR(6)) ,gr6
+	lddi		@(gr31,#REG_GR(4)) ,gr4
+	lddi		@(gr31,#REG_GR(2)) ,gr2
+	ldi.p		@(gr31,#REG_SP)    ,sp
+
+	xor		gr31,gr31,gr31
+	movgs		gr0,brr
+#ifdef CONFIG_MMU
+	movsg		scr3,gr31
+#endif
+	rett		#1
+
+###################################################################################################
+#
+# GDB stub "system calls"
+#
+###################################################################################################
+
+#ifdef CONFIG_GDBSTUB
+	# void gdbstub_console_write(struct console *con, const char *p, unsigned n)
+	.globl		gdbstub_console_write
+gdbstub_console_write:
+	break
+	bralr
+#endif
+
+	# GDB stub BUG() trap
+	# GR8 is the proposed signal number
+	.globl		__debug_bug_trap
+__debug_bug_trap:
+	break
+	bralr
+
+	# transfer kernel exeception to GDB for handling
+	.globl		__break_hijack_kernel_event
+__break_hijack_kernel_event:
+	break
+	.globl		__break_hijack_kernel_event_breaks_here
+__break_hijack_kernel_event_breaks_here:
+	nop
+
+#ifdef CONFIG_MMU
+	# handle a return from TLB-miss that requires single-step reactivation
+	.globl		__break_tlb_miss_return_break
+__break_tlb_miss_return_break:
+	break
+__break_tlb_miss_return_breaks_here:
+	nop
+#endif
+
+	# guard the first .text label in the next file from confusion
+	nop
diff -Nru a/arch/frv/kernel/cmode.S b/arch/frv/kernel/cmode.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/kernel/cmode.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,190 @@
+/* cmode.S: clock mode management
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Woodhouse (dwmw2@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ *
+ */
+
+#include <linux/sys.h>
+#include <linux/config.h>
+#include <linux/linkage.h>
+#include <asm/setup.h>
+#include <asm/segment.h>
+#include <asm/ptrace.h>
+#include <asm/errno.h>
+#include <asm/cache.h>
+#include <asm/spr-regs.h>
+
+#define __addr_MASK	0xfeff9820	/* interrupt controller mask */
+
+#define __addr_SDRAMC	0xfe000400	/* SDRAM controller regs */
+#define SDRAMC_DSTS	0x28		/* SDRAM status */
+#define SDRAMC_DSTS_SSI	0x00000001	/* indicates that the SDRAM is in self-refresh mode */
+#define SDRAMC_DRCN	0x30		/* SDRAM refresh control */
+#define SDRAMC_DRCN_SR	0x00000001	/* transition SDRAM into self-refresh mode */
+#define __addr_CLKC	0xfeff9a00
+#define CLKC_SWCMODE	0x00000008
+#define __addr_LEDS	0xe1200004
+
+.macro li v r
+	sethi.p		%hi(\v),\r
+	setlo		%lo(\v),\r
+.endm
+
+	.text
+	.balign		4
+
+
+###############################################################################
+#
+# Change CMODE
+# - void frv_change_cmode(int cmode)
+#
+###############################################################################
+	.globl		frv_change_cmode
+        .type		frv_change_cmode,@function
+
+.macro	LEDS v
+#ifdef DEBUG_CMODE
+	setlos	#~\v,gr10
+	sti	gr10,@(gr11,#0)
+	membar
+#endif
+.endm
+
+frv_change_cmode:
+	movsg		lr,gr9
+#ifdef DEBUG_CMODE
+	li		__addr_LEDS,gr11
+#endif
+	dcef		@(gr0,gr0),#1
+
+	# Shift argument left by 24 bits to fit in SWCMODE register later.
+	slli		gr8,#24,gr8
+
+	# (1) Set '0' in the PSR.ET bit, and prohibit interrupts.
+	movsg		psr,gr14
+	andi		gr14,#~PSR_ET,gr3
+	movgs		gr3,psr
+
+#if 0 // Fujitsu recommend to skip this and will update docs.
+	# (2) Set '0' to all bits of the MASK register of the interrupt
+	#     controller, and mask interrupts.
+	li		__addr_MASK,gr12
+	ldi		@(gr12,#0),gr13
+	li		0xffff0000,gr4
+	sti		gr4,@(gr12,#0)
+#endif
+
+	# (3) Stop the transfer function of DMAC. Stop all the bus masters
+	#     to access SDRAM and the internal resources.
+
+	# (already done by caller)
+
+	# (4) Preload a series of following instructions to the instruction
+	#     cache.
+	li		#__cmode_icache_lock_start,gr3
+	li		#__cmode_icache_lock_end,gr4
+
+1:	icpl		gr3,gr0,#1
+	addi		gr3,#L1_CACHE_BYTES,gr3
+	cmp		gr4,gr3,icc0
+	bhi		icc0,#0,1b
+
+	# Set up addresses in regs for later steps.
+	setlos		SDRAMC_DRCN_SR,gr3
+	li		__addr_SDRAMC,gr4
+	li		__addr_CLKC,gr5
+	ldi		@(gr5,#0),gr6
+	li		#0x80000000,gr7
+	or		gr6,gr7,gr6
+
+	bra		__cmode_icache_lock_start
+
+	.balign	L1_CACHE_BYTES
+__cmode_icache_lock_start:
+
+	# (5) Flush the content of all caches by the DCEF instruction.
+	dcef		@(gr0,gr0),#1
+
+	# (6) Execute loading the dummy for SDRAM.
+	ldi		@(gr9,#0),gr0
+
+	# (7) Set '1' to the DRCN.SR bit, and change SDRAM to the
+	#     self-refresh mode. Execute the dummy load to all memory
+	#     devices set to cacheable on the external bus side in parallel
+	#     with this.
+	sti		gr3,@(gr4,#SDRAMC_DRCN)
+
+	# (8) Execute memory barrier instruction (MEMBAR).
+	membar
+
+	# (9) Read the DSTS register repeatedly until '1' stands in the
+	#     DSTS.SSI field.
+1:	ldi		@(gr4,#SDRAMC_DSTS),gr3
+	andicc		gr3,#SDRAMC_DSTS_SSI,gr3,icc0
+	beq		icc0,#0,1b
+
+	# (10) Execute memory barrier instruction (MEMBAR).
+	membar
+
+#if 1
+	# (11) Set the value of CMODE that you want to change to
+	#      SWCMODE.SWCM[3:0].
+	sti		gr8,@(gr5,#CLKC_SWCMODE)
+
+	# (12) Set '1' to the CLKC.SWEN bit. In that case, do not change
+	#      fields other than SWEN of the CLKC register.
+	sti		gr6,@(gr5,#0)
+#endif
+	# (13) Execute the instruction just after the memory barrier
+	# instruction that executes the self-loop 256 times. (Meanwhile,
+	# the CMODE switch is done.)
+	membar
+	setlos		#256,gr7
+2:	subicc		gr7,#1,gr7,icc0
+	bne		icc0,#2,2b
+
+	LEDS	0x36
+
+	# (14) Release the self-refresh of SDRAM.
+	sti		gr0,@(gr4,#SDRAMC_DRCN)
+
+	# Wait for it...
+3:	ldi		@(gr4,#SDRAMC_DSTS),gr3
+	andicc		gr3,#SDRAMC_DSTS_SSI,gr3,icc0
+	bne		icc0,#2,3b
+
+#if 0
+	li		0x0100000,gr10
+4:	subicc		gr10,#1,gr10,icc0
+
+	bne		icc0,#0,4b
+#endif
+
+__cmode_icache_lock_end:
+
+	li		#__cmode_icache_lock_start,gr3
+	li		#__cmode_icache_lock_end,gr4
+
+4:	icul		gr3
+	addi		gr3,#L1_CACHE_BYTES,gr3
+	cmp		gr4,gr3,icc0
+	bhi		icc0,#0,4b
+
+#if 0 // Fujitsu recommend to skip this and will update docs.
+	# (15) Release the interrupt mask setting of the MASK register of
+	# the interrupt controller if necessary.
+	sti		gr13,@(gr12,#0)
+#endif
+	# (16) Set  1' in the PSR.ET bit, and permit interrupt.
+	movgs		gr14,psr
+
+	bralr
+
+	.size		frv_change_cmode, .-frv_change_cmode
diff -Nru a/arch/frv/kernel/debug-stub.c b/arch/frv/kernel/debug-stub.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/kernel/debug-stub.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,259 @@
+/* debug-stub.c: debug-mode stub
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/string.h>
+#include <linux/kernel.h>
+#include <linux/signal.h>
+#include <linux/sched.h>
+#include <linux/init.h>
+#include <linux/serial_reg.h>
+
+#include <asm/system.h>
+#include <asm/serial-regs.h>
+#include <asm/timer-regs.h>
+#include <asm/irc-regs.h>
+#include <asm/gdb-stub.h>
+#include "gdb-io.h"
+
+/* CPU board CON5 */
+#define __UART0(X) (*(volatile uint8_t *)(UART0_BASE + (UART_##X)))
+
+#define LSR_WAIT_FOR0(STATE)			\
+do {						\
+} while (!(__UART0(LSR) & UART_LSR_##STATE))
+
+#define FLOWCTL_QUERY0(LINE)	({ __UART0(MSR) & UART_MSR_##LINE; })
+#define FLOWCTL_CLEAR0(LINE)	do { __UART0(MCR) &= ~UART_MCR_##LINE; } while (0)
+#define FLOWCTL_SET0(LINE)	do { __UART0(MCR) |= UART_MCR_##LINE; } while (0)
+
+#define FLOWCTL_WAIT_FOR0(LINE)			\
+do {						\
+	gdbstub_do_rx();			\
+} while(!FLOWCTL_QUERY(LINE))
+
+static void __init debug_stub_init(void);
+
+extern asmlinkage void __break_hijack_kernel_event(void);
+extern asmlinkage void __break_hijack_kernel_event_breaks_here(void);
+
+/*****************************************************************************/
+/*
+ * debug mode handler stub
+ * - we come here with the CPU in debug mode and with exceptions disabled
+ * - handle debugging services for userspace
+ */
+asmlinkage void debug_stub(void)
+{
+	unsigned long hsr0;
+	int type = 0;
+
+	static u8 inited = 0;
+	if (!inited) {
+		debug_stub_init();
+		type = -1;
+		inited = 1;
+	}
+
+	hsr0 = __get_HSR(0);
+	if (hsr0 & HSR0_ETMD)
+		__set_HSR(0, hsr0 & ~HSR0_ETMD);
+
+	/* disable single stepping */
+	__debug_regs->dcr &= ~DCR_SE;
+
+	/* kernel mode can propose an exception be handled in debug mode by jumping to a special
+	 * location */
+	if (__debug_frame->pc == (unsigned long) __break_hijack_kernel_event_breaks_here) {
+		/* replace the debug frame with the kernel frame and discard
+		 * the top kernel context */
+		*__debug_frame = *__frame;
+		__frame = __debug_frame->next_frame;
+		__debug_regs->brr = (__debug_frame->tbr & TBR_TT) << 12;
+		__debug_regs->brr |= BRR_EB;
+	}
+
+	if (__debug_frame->pc == (unsigned long) __debug_bug_trap + 4) {
+		__debug_frame->pc = __debug_frame->lr;
+		type = __debug_frame->gr8;
+	}
+
+#ifdef CONFIG_GDBSTUB
+	gdbstub(type);
+#endif
+
+	if (hsr0 & HSR0_ETMD)
+		__set_HSR(0, __get_HSR(0) | HSR0_ETMD);
+
+} /* end debug_stub() */
+
+/*****************************************************************************/
+/*
+ * debug stub initialisation
+ */
+static void __init debug_stub_init(void)
+{
+	__set_IRR(6, 0xff000000);	/* map ERRs to NMI */
+	__set_IITMR(1, 0x20000000);	/* ERR0/1, UART0/1 IRQ detect levels */
+
+	asm volatile("	movgs	gr0,ibar0	\n"
+		     "	movgs	gr0,ibar1	\n"
+		     "	movgs	gr0,ibar2	\n"
+		     "	movgs	gr0,ibar3	\n"
+		     "	movgs	gr0,dbar0	\n"
+		     "	movgs	gr0,dbmr00	\n"
+		     "	movgs	gr0,dbmr01	\n"
+		     "	movgs	gr0,dbdr00	\n"
+		     "	movgs	gr0,dbdr01	\n"
+		     "	movgs	gr0,dbar1	\n"
+		     "	movgs	gr0,dbmr10	\n"
+		     "	movgs	gr0,dbmr11	\n"
+		     "	movgs	gr0,dbdr10	\n"
+		     "	movgs	gr0,dbdr11	\n"
+		     );
+
+	/* deal with debugging stub initialisation and initial pause */
+	if (__debug_frame->pc == (unsigned long) __debug_stub_init_break)
+		__debug_frame->pc = (unsigned long) start_kernel;
+
+	/* enable the debug events we want to trap */
+	__debug_regs->dcr = DCR_EBE;
+
+#ifdef CONFIG_GDBSTUB
+	gdbstub_init();
+#endif
+
+	__clr_MASK_all();
+	__clr_MASK(15);
+	__clr_RC(15);
+
+} /* end debug_stub_init() */
+
+/*****************************************************************************/
+/*
+ * kernel "exit" trap for gdb stub
+ */
+void debug_stub_exit(int status)
+{
+
+#ifdef CONFIG_GDBSTUB
+	gdbstub_exit(status);
+#endif
+
+} /* end debug_stub_exit() */
+
+/*****************************************************************************/
+/*
+ * send string to serial port
+ */
+void debug_to_serial(const char *p, int n)
+{
+	char ch;
+
+	for (; n > 0; n--) {
+		ch = *p++;
+		FLOWCTL_SET0(DTR);
+		LSR_WAIT_FOR0(THRE);
+		// FLOWCTL_WAIT_FOR(CTS);
+
+		if (ch == 0x0a) {
+			__UART0(TX) = 0x0d;
+			mb();
+			LSR_WAIT_FOR0(THRE);
+			// FLOWCTL_WAIT_FOR(CTS);
+		}
+		__UART0(TX) = ch;
+		mb();
+
+		FLOWCTL_CLEAR0(DTR);
+	}
+
+} /* end debug_to_serial() */
+
+/*****************************************************************************/
+/*
+ * send string to serial port
+ */
+void debug_to_serial2(const char *fmt, ...)
+{
+	va_list va;
+	char buf[64];
+	int n;
+
+	va_start(va, fmt);
+	n = vsprintf(buf, fmt, va);
+	va_end(va);
+
+	debug_to_serial(buf, n);
+
+} /* end debug_to_serial2() */
+
+/*****************************************************************************/
+/*
+ * set up the ttyS0 serial port baud rate timers
+ */
+void __init console_set_baud(unsigned baud)
+{
+	unsigned value, high, low;
+	u8 lcr;
+
+	/* work out the divisor to give us the nearest higher baud rate */
+	value = __serial_clock_speed_HZ / 16 / baud;
+
+	/* determine the baud rate range */
+	high = __serial_clock_speed_HZ / 16 / value;
+	low = __serial_clock_speed_HZ / 16 / (value + 1);
+
+	/* pick the nearest bound */
+	if (low + (high - low) / 2 > baud)
+		value++;
+
+	lcr = __UART0(LCR);
+	__UART0(LCR) |= UART_LCR_DLAB;
+	mb();
+	__UART0(DLL) = value & 0xff;
+	__UART0(DLM) = (value >> 8) & 0xff;
+	mb();
+	__UART0(LCR) = lcr;
+	mb();
+
+} /* end console_set_baud() */
+
+/*****************************************************************************/
+/*
+ *
+ */
+int __init console_get_baud(void)
+{
+	unsigned value;
+	u8 lcr;
+
+	lcr = __UART0(LCR);
+	__UART0(LCR) |= UART_LCR_DLAB;
+	mb();
+	value =  __UART0(DLM) << 8;
+	value |= __UART0(DLL);
+	__UART0(LCR) = lcr;
+	mb();
+
+	return value;
+} /* end console_get_baud() */
+
+/*****************************************************************************/
+/*
+ * display BUG() info
+ */
+#ifndef CONFIG_NO_KERNEL_MSG
+void __debug_bug_printk(const char *file, unsigned line)
+{
+	printk("kernel BUG at %s:%d!\n", file, line);
+
+} /* end __debug_bug_printk() */
+#endif
diff -Nru a/arch/frv/kernel/dma.c b/arch/frv/kernel/dma.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/kernel/dma.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,464 @@
+/* dma.c: DMA controller management on FR401 and the like
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/module.h>
+#include <linux/sched.h>
+#include <linux/spinlock.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <asm/dma.h>
+#include <asm/gpio-regs.h>
+#include <asm/irc-regs.h>
+#include <asm/cpu-irqs.h>
+
+struct frv_dma_channel {
+	uint8_t			flags;
+#define FRV_DMA_FLAGS_RESERVED	0x01
+#define FRV_DMA_FLAGS_INUSE	0x02
+#define FRV_DMA_FLAGS_PAUSED	0x04
+	uint8_t			cap;		/* capabilities available */
+	int			irq;		/* completion IRQ */
+	uint32_t		dreqbit;
+	uint32_t		dackbit;
+	uint32_t		donebit;
+	const unsigned long	ioaddr;		/* DMA controller regs addr */
+	const char		*devname;
+	dma_irq_handler_t	handler;
+	void			*data;
+};
+
+
+#define __get_DMAC(IO,X)	({ *(volatile unsigned long *)((IO) + DMAC_##X##x); })
+
+#define __set_DMAC(IO,X,V)					\
+do {								\
+	*(volatile unsigned long *)((IO) + DMAC_##X##x) = (V);	\
+	mb();							\
+} while(0)
+
+#define ___set_DMAC(IO,X,V)					\
+do {								\
+	*(volatile unsigned long *)((IO) + DMAC_##X##x) = (V);	\
+} while(0)
+
+
+static struct frv_dma_channel frv_dma_channels[FRV_DMA_NCHANS] = {
+	[0] = {
+		.cap		= FRV_DMA_CAP_DREQ | FRV_DMA_CAP_DACK | FRV_DMA_CAP_DONE,
+		.irq		= IRQ_CPU_DMA0,
+		.dreqbit	= SIR_DREQ0_INPUT,
+		.dackbit	= SOR_DACK0_OUTPUT,
+		.donebit	= SOR_DONE0_OUTPUT,
+		.ioaddr		= 0xfe000900,
+	},
+	[1] = {
+		.cap		= FRV_DMA_CAP_DREQ | FRV_DMA_CAP_DACK | FRV_DMA_CAP_DONE,
+		.irq		= IRQ_CPU_DMA1,
+		.dreqbit	= SIR_DREQ1_INPUT,
+		.dackbit	= SOR_DACK1_OUTPUT,
+		.donebit	= SOR_DONE1_OUTPUT,
+		.ioaddr		= 0xfe000980,
+	},
+	[2] = {
+		.cap		= FRV_DMA_CAP_DREQ | FRV_DMA_CAP_DACK,
+		.irq		= IRQ_CPU_DMA2,
+		.dreqbit	= SIR_DREQ2_INPUT,
+		.dackbit	= SOR_DACK2_OUTPUT,
+		.ioaddr		= 0xfe000a00,
+	},
+	[3] = {
+		.cap		= FRV_DMA_CAP_DREQ | FRV_DMA_CAP_DACK,
+		.irq		= IRQ_CPU_DMA3,
+		.dreqbit	= SIR_DREQ3_INPUT,
+		.dackbit	= SOR_DACK3_OUTPUT,
+		.ioaddr		= 0xfe000a80,
+	},
+	[4] = {
+		.cap		= FRV_DMA_CAP_DREQ,
+		.irq		= IRQ_CPU_DMA4,
+		.dreqbit	= SIR_DREQ4_INPUT,
+		.ioaddr		= 0xfe001000,
+	},
+	[5] = {
+		.cap		= FRV_DMA_CAP_DREQ,
+		.irq		= IRQ_CPU_DMA5,
+		.dreqbit	= SIR_DREQ5_INPUT,
+		.ioaddr		= 0xfe001080,
+	},
+	[6] = {
+		.cap		= FRV_DMA_CAP_DREQ,
+		.irq		= IRQ_CPU_DMA6,
+		.dreqbit	= SIR_DREQ6_INPUT,
+		.ioaddr		= 0xfe001100,
+	},
+	[7] = {
+		.cap		= FRV_DMA_CAP_DREQ,
+		.irq		= IRQ_CPU_DMA7,
+		.dreqbit	= SIR_DREQ7_INPUT,
+		.ioaddr		= 0xfe001180,
+	},
+};
+
+static rwlock_t frv_dma_channels_lock = RW_LOCK_UNLOCKED;
+
+unsigned long frv_dma_inprogress;
+
+#define frv_clear_dma_inprogress(channel) \
+	atomic_clear_mask(1 << (channel), &frv_dma_inprogress);
+
+#define frv_set_dma_inprogress(channel) \
+	atomic_set_mask(1 << (channel), &frv_dma_inprogress);
+
+/*****************************************************************************/
+/*
+ * DMA irq handler - determine channel involved, grab status and call real handler
+ */
+static irqreturn_t dma_irq_handler(int irq, void *_channel, struct pt_regs *regs)
+{
+	struct frv_dma_channel *channel = _channel;
+
+	frv_clear_dma_inprogress(channel - frv_dma_channels);
+	return channel->handler(channel - frv_dma_channels,
+				__get_DMAC(channel->ioaddr, CSTR),
+				channel->data,
+				regs);
+
+} /* end dma_irq_handler() */
+
+/*****************************************************************************/
+/*
+ * Determine which DMA controllers are present on this CPU
+ */
+void __init frv_dma_init(void)
+{
+	unsigned long psr = __get_PSR();
+	int num_dma, i;
+
+	/* First, determine how many DMA channels are available */
+	switch (PSR_IMPLE(psr)) {
+	case PSR_IMPLE_FR405:
+	case PSR_IMPLE_FR451:
+	case PSR_IMPLE_FR501:
+	case PSR_IMPLE_FR551:
+		num_dma = FRV_DMA_8CHANS;
+		break;
+
+	case PSR_IMPLE_FR401:
+	default:
+		num_dma = FRV_DMA_4CHANS;
+		break;
+	}
+
+	/* Now mark all of the non-existent channels as reserved */
+	for(i = num_dma; i < FRV_DMA_NCHANS; i++)
+		frv_dma_channels[i].flags = FRV_DMA_FLAGS_RESERVED;
+
+} /* end frv_dma_init() */
+
+/*****************************************************************************/
+/*
+ * allocate a DMA controller channel and the IRQ associated with it
+ */
+int frv_dma_open(const char *devname,
+		 unsigned long dmamask,
+		 int dmacap,
+		 dma_irq_handler_t handler,
+		 unsigned long irq_flags,
+		 void *data)
+{
+	struct frv_dma_channel *channel;
+	int dma, ret;
+	uint32_t val;
+
+	write_lock(&frv_dma_channels_lock);
+
+	ret = -ENOSPC;
+
+	for (dma = FRV_DMA_NCHANS - 1; dma >= 0; dma--) {
+		channel = &frv_dma_channels[dma];
+
+		if (!test_bit(dma, &dmamask))
+			continue;
+
+		if ((channel->cap & dmacap) != dmacap)
+			continue;
+
+		if (!frv_dma_channels[dma].flags)
+			goto found;
+	}
+
+	goto out;
+
+ found:
+	ret = request_irq(channel->irq, dma_irq_handler, irq_flags, devname, channel);
+	if (ret < 0)
+		goto out;
+
+	/* okay, we've allocated all the resources */
+	channel = &frv_dma_channels[dma];
+
+	channel->flags		|= FRV_DMA_FLAGS_INUSE;
+	channel->devname	= devname;
+	channel->handler	= handler;
+	channel->data		= data;
+
+	/* Now make sure we are set up for DMA and not GPIO */
+	/* SIR bit must be set for DMA to work */
+	__set_SIR(channel->dreqbit | __get_SIR());
+	/* SOR bits depend on what the caller requests */
+	val = __get_SOR();
+	if(dmacap & FRV_DMA_CAP_DACK)
+		val |= channel->dackbit;
+	else
+		val &= ~channel->dackbit;
+	if(dmacap & FRV_DMA_CAP_DONE)
+		val |= channel->donebit;
+	else
+		val &= ~channel->donebit;
+	__set_SOR(val);
+
+	ret = dma;
+ out:
+	write_unlock(&frv_dma_channels_lock);
+	return ret;
+} /* end frv_dma_open() */
+
+EXPORT_SYMBOL(frv_dma_open);
+
+/*****************************************************************************/
+/*
+ * close a DMA channel and its associated interrupt
+ */
+void frv_dma_close(int dma)
+{
+	struct frv_dma_channel *channel = &frv_dma_channels[dma];
+	unsigned long flags;
+
+	write_lock_irqsave(&frv_dma_channels_lock, flags);
+
+	free_irq(channel->irq, channel);
+	frv_dma_stop(dma);
+
+	channel->flags &= ~FRV_DMA_FLAGS_INUSE;
+
+	write_unlock_irqrestore(&frv_dma_channels_lock, flags);
+} /* end frv_dma_close() */
+
+EXPORT_SYMBOL(frv_dma_close);
+
+/*****************************************************************************/
+/*
+ * set static configuration on a DMA channel
+ */
+void frv_dma_config(int dma, unsigned long ccfr, unsigned long cctr, unsigned long apr)
+{
+	unsigned long ioaddr = frv_dma_channels[dma].ioaddr;
+
+	___set_DMAC(ioaddr, CCFR, ccfr);
+	___set_DMAC(ioaddr, CCTR, cctr);
+	___set_DMAC(ioaddr, APR,  apr);
+	mb();
+
+} /* end frv_dma_config() */
+
+EXPORT_SYMBOL(frv_dma_config);
+
+/*****************************************************************************/
+/*
+ * start a DMA channel
+ */
+void frv_dma_start(int dma,
+		   unsigned long sba, unsigned long dba,
+		   unsigned long pix, unsigned long six, unsigned long bcl)
+{
+	unsigned long ioaddr = frv_dma_channels[dma].ioaddr;
+
+	___set_DMAC(ioaddr, SBA,  sba);
+	___set_DMAC(ioaddr, DBA,  dba);
+	___set_DMAC(ioaddr, PIX,  pix);
+	___set_DMAC(ioaddr, SIX,  six);
+	___set_DMAC(ioaddr, BCL,  bcl);
+	___set_DMAC(ioaddr, CSTR, 0);
+	mb();
+
+	__set_DMAC(ioaddr, CCTR, __get_DMAC(ioaddr, CCTR) | DMAC_CCTRx_ACT);
+	frv_set_dma_inprogress(dma);
+
+} /* end frv_dma_start() */
+
+EXPORT_SYMBOL(frv_dma_start);
+
+/*****************************************************************************/
+/*
+ * restart a DMA channel that's been stopped in circular addressing mode by comparison-end
+ */
+void frv_dma_restart_circular(int dma, unsigned long six)
+{
+	unsigned long ioaddr = frv_dma_channels[dma].ioaddr;
+
+	___set_DMAC(ioaddr, SIX,  six);
+	___set_DMAC(ioaddr, CSTR, __get_DMAC(ioaddr, CSTR) & ~DMAC_CSTRx_CE);
+	mb();
+
+	__set_DMAC(ioaddr, CCTR, __get_DMAC(ioaddr, CCTR) | DMAC_CCTRx_ACT);
+	frv_set_dma_inprogress(dma);
+
+} /* end frv_dma_restart_circular() */
+
+EXPORT_SYMBOL(frv_dma_restart_circular);
+
+/*****************************************************************************/
+/*
+ * stop a DMA channel
+ */
+void frv_dma_stop(int dma)
+{
+	unsigned long ioaddr = frv_dma_channels[dma].ioaddr;
+	uint32_t cctr;
+
+	___set_DMAC(ioaddr, CSTR, 0);
+	cctr = __get_DMAC(ioaddr, CCTR);
+	cctr &= ~(DMAC_CCTRx_IE | DMAC_CCTRx_ACT);
+	cctr |= DMAC_CCTRx_FC; 	/* fifo clear */
+	__set_DMAC(ioaddr, CCTR, cctr);
+	__set_DMAC(ioaddr, BCL,  0);
+	frv_clear_dma_inprogress(dma);
+} /* end frv_dma_stop() */
+
+EXPORT_SYMBOL(frv_dma_stop);
+
+/*****************************************************************************/
+/*
+ * test interrupt status of DMA channel
+ */
+int is_frv_dma_interrupting(int dma)
+{
+	unsigned long ioaddr = frv_dma_channels[dma].ioaddr;
+
+	return __get_DMAC(ioaddr, CSTR) & (1 << 23);
+
+} /* end is_frv_dma_interrupting() */
+
+EXPORT_SYMBOL(is_frv_dma_interrupting);
+
+/*****************************************************************************/
+/*
+ * dump data about a DMA channel
+ */
+void frv_dma_dump(int dma)
+{
+	unsigned long ioaddr = frv_dma_channels[dma].ioaddr;
+	unsigned long cstr, pix, six, bcl;
+
+	cstr = __get_DMAC(ioaddr, CSTR);
+	pix  = __get_DMAC(ioaddr, PIX);
+	six  = __get_DMAC(ioaddr, SIX);
+	bcl  = __get_DMAC(ioaddr, BCL);
+
+	printk("DMA[%d] cstr=%lx pix=%lx six=%lx bcl=%lx\n", dma, cstr, pix, six, bcl);
+
+} /* end frv_dma_dump() */
+
+EXPORT_SYMBOL(frv_dma_dump);
+
+/*****************************************************************************/
+/*
+ * pause all DMA controllers
+ * - called by clock mangling routines
+ * - caller must be holding interrupts disabled
+ */
+void frv_dma_pause_all(void)
+{
+	struct frv_dma_channel *channel;
+	unsigned long ioaddr;
+	unsigned long cstr, cctr;
+	int dma;
+
+	write_lock(&frv_dma_channels_lock);
+
+	for (dma = FRV_DMA_NCHANS - 1; dma >= 0; dma--) {
+		channel = &frv_dma_channels[dma];
+
+		if (!(channel->flags & FRV_DMA_FLAGS_INUSE))
+			continue;
+
+		ioaddr = channel->ioaddr;
+		cctr = __get_DMAC(ioaddr, CCTR);
+		if (cctr & DMAC_CCTRx_ACT) {
+			cctr &= ~DMAC_CCTRx_ACT;
+			__set_DMAC(ioaddr, CCTR, cctr);
+
+			do {
+				cstr = __get_DMAC(ioaddr, CSTR);
+			} while (cstr & DMAC_CSTRx_BUSY);
+
+			if (cstr & DMAC_CSTRx_FED)
+				channel->flags |= FRV_DMA_FLAGS_PAUSED;
+			frv_clear_dma_inprogress(dma);
+		}
+	}
+
+} /* end frv_dma_pause_all() */
+
+EXPORT_SYMBOL(frv_dma_pause_all);
+
+/*****************************************************************************/
+/*
+ * resume paused DMA controllers
+ * - called by clock mangling routines
+ * - caller must be holding interrupts disabled
+ */
+void frv_dma_resume_all(void)
+{
+	struct frv_dma_channel *channel;
+	unsigned long ioaddr;
+	unsigned long cstr, cctr;
+	int dma;
+
+	for (dma = FRV_DMA_NCHANS - 1; dma >= 0; dma--) {
+		channel = &frv_dma_channels[dma];
+
+		if (!(channel->flags & FRV_DMA_FLAGS_PAUSED))
+			continue;
+
+		ioaddr = channel->ioaddr;
+		cstr = __get_DMAC(ioaddr, CSTR);
+		cstr &= ~(DMAC_CSTRx_FED | DMAC_CSTRx_INT);
+		__set_DMAC(ioaddr, CSTR, cstr);
+
+		cctr = __get_DMAC(ioaddr, CCTR);
+		cctr |= DMAC_CCTRx_ACT;
+		__set_DMAC(ioaddr, CCTR, cctr);
+
+		channel->flags &= ~FRV_DMA_FLAGS_PAUSED;
+		frv_set_dma_inprogress(dma);
+	}
+
+	write_unlock(&frv_dma_channels_lock);
+
+} /* end frv_dma_resume_all() */
+
+EXPORT_SYMBOL(frv_dma_resume_all);
+
+/*****************************************************************************/
+/*
+ * dma status clear
+ */
+void frv_dma_status_clear(int dma)
+{
+	unsigned long ioaddr = frv_dma_channels[dma].ioaddr;
+	uint32_t cctr;
+	___set_DMAC(ioaddr, CSTR, 0);
+
+	cctr = __get_DMAC(ioaddr, CCTR);
+} /* end frv_dma_status_clear() */
+
+EXPORT_SYMBOL(frv_dma_status_clear);
diff -Nru a/arch/frv/kernel/entry-table.S b/arch/frv/kernel/entry-table.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/kernel/entry-table.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,295 @@
+/* entry-table.S: main trap vector tables and exception jump table
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ *
+ */
+
+#include <linux/sys.h>
+#include <linux/config.h>
+#include <linux/linkage.h>
+#include <asm/spr-regs.h>
+
+###############################################################################
+#
+# Declare the main trap and vector tables
+#
+# There are six tables:
+#
+# (1) The trap table for debug mode
+# (2) The trap table for kernel mode
+# (3) The trap table for user mode
+#
+#     The CPU jumps to an appropriate slot in the appropriate table to perform
+#     exception processing. We have three different tables for the three
+#     different CPU modes because there is no hardware differentiation between
+#     stack pointers for these three modes, and so we have to invent one when
+#     crossing mode boundaries.
+#
+# (4) The exception handler vector table
+#
+#     The user and kernel trap tables use the same prologue for normal
+#     exception processing. The prologue then jumps to the handler in this
+#     table, as indexed by the exception ID from the TBR.
+#
+# (5) The fixup table for kernel-trap single-step
+# (6) The fixup table for user-trap single-step
+#
+#     Due to the way single-stepping works on this CPU (single-step is not
+#     disabled when crossing exception boundaries, only when in debug mode),
+#     we have to catch the single-step event in break.S and jump to the fixup
+#     routine pointed to by this table.
+#
+# The linker script places the user mode and kernel mode trap tables on to
+# the same 8Kb page, so that break.S can be more efficient when performing
+# single-step bypass management
+#
+###############################################################################
+
+	# trap table for entry from debug mode
+	.section	.trap.break,"ax"
+	.balign		256*16
+	.globl		__entry_breaktrap_table
+__entry_breaktrap_table:
+
+	# trap table for entry from user mode
+	.section	.trap.user,"ax"
+	.balign		256*16
+	.globl		__entry_usertrap_table
+__entry_usertrap_table:
+
+	# trap table for entry from kernel mode
+	.section	.trap.kernel,"ax"
+	.balign		256*16
+	.globl		__entry_kerneltrap_table
+__entry_kerneltrap_table:
+
+	# exception handler jump table
+	.section	.trap.vector,"ax"
+	.balign		256*4
+	.globl		__entry_vector_table
+__entry_vector_table:
+
+	# trap fixup table for single-stepping in user mode
+	.section	.trap.fixup.user,"a"
+	.balign		256*4
+	.globl		__break_usertrap_fixup_table
+__break_usertrap_fixup_table:
+
+	# trap fixup table for single-stepping in user mode
+	.section	.trap.fixup.kernel,"a"
+	.balign		256*4
+	.globl		__break_kerneltrap_fixup_table
+__break_kerneltrap_fixup_table:
+
+	# handler declaration for a sofware or program interrupt
+.macro VECTOR_SOFTPROG tbr_tt, vec
+	.section .trap.user
+	.org		\tbr_tt
+	bra		__entry_uspace_softprog_interrupt
+	.section .trap.fixup.user
+	.org		\tbr_tt >> 2
+	.long		__break_step_uspace_softprog_interrupt
+	.section .trap.kernel
+	.org		\tbr_tt
+	bra		__entry_kernel_softprog_interrupt
+	.section .trap.fixup.kernel
+	.org		\tbr_tt >> 2
+	.long		__break_step_kernel_softprog_interrupt
+	.section .trap.vector
+	.org		\tbr_tt >> 2
+	.long		\vec
+.endm
+
+	# handler declaration for a maskable external interrupt
+.macro VECTOR_IRQ tbr_tt, vec
+	.section .trap.user
+	.org		\tbr_tt
+	bra		__entry_uspace_external_interrupt
+	.section .trap.fixup.user
+	.org		\tbr_tt >> 2
+	.long		__break_step_uspace_external_interrupt
+	.section .trap.kernel
+	.org		\tbr_tt
+	bra		__entry_kernel_external_interrupt
+	.section .trap.fixup.kernel
+	.org		\tbr_tt >> 2
+	.long		__break_step_kernel_external_interrupt
+	.section .trap.vector
+	.org		\tbr_tt >> 2
+	.long		\vec
+.endm
+
+	# handler declaration for an NMI external interrupt
+.macro VECTOR_NMI tbr_tt, vec
+	.section .trap.user
+	.org		\tbr_tt
+	break
+	break
+	break
+	break
+	.section .trap.kernel
+	.org		\tbr_tt
+	break
+	break
+	break
+	break
+	.section .trap.vector
+	.org		\tbr_tt >> 2
+	.long		\vec
+.endm
+
+	# handler declaration for an MMU only sofware or program interrupt
+.macro VECTOR_SP_MMU tbr_tt, vec
+#ifdef CONFIG_MMU
+ 	VECTOR_SOFTPROG	\tbr_tt, \vec
+#else
+	VECTOR_NMI	\tbr_tt, 0
+#endif
+.endm
+
+
+###############################################################################
+#
+# specification of the vectors
+# - note: each macro inserts code into multiple sections
+#
+###############################################################################
+	VECTOR_SP_MMU	TBR_TT_INSTR_MMU_MISS,	__entry_insn_mmu_miss
+	VECTOR_SOFTPROG	TBR_TT_INSTR_ACC_ERROR,	__entry_insn_access_error
+	VECTOR_SOFTPROG	TBR_TT_INSTR_ACC_EXCEP,	__entry_insn_access_exception
+	VECTOR_SOFTPROG	TBR_TT_PRIV_INSTR,	__entry_privileged_instruction
+	VECTOR_SOFTPROG	TBR_TT_ILLEGAL_INSTR,	__entry_illegal_instruction
+	VECTOR_SOFTPROG	TBR_TT_FP_EXCEPTION,	__entry_media_exception
+	VECTOR_SOFTPROG	TBR_TT_MP_EXCEPTION,	__entry_media_exception
+	VECTOR_SOFTPROG	TBR_TT_DATA_ACC_ERROR,	__entry_data_access_error
+	VECTOR_SP_MMU	TBR_TT_DATA_MMU_MISS,	__entry_data_mmu_miss
+	VECTOR_SOFTPROG	TBR_TT_DATA_ACC_EXCEP,	__entry_data_access_exception
+	VECTOR_SOFTPROG	TBR_TT_DATA_STR_ERROR,	__entry_data_store_error
+	VECTOR_SOFTPROG	TBR_TT_DIVISION_EXCEP,	__entry_division_exception
+
+#ifdef CONFIG_MMU
+	.section .trap.user
+	.org		TBR_TT_INSTR_TLB_MISS
+	.globl		__trap_user_insn_tlb_miss
+__trap_user_insn_tlb_miss:
+	movsg		ear0,gr28			/* faulting address */
+	movsg		scr0,gr31			/* get mapped PTD coverage start address */
+	xor.p		gr28,gr31,gr31			/* compare addresses */
+	bra		__entry_user_insn_tlb_miss
+
+	.org		TBR_TT_DATA_TLB_MISS
+	.globl		__trap_user_data_tlb_miss
+__trap_user_data_tlb_miss:
+	movsg		ear0,gr28			/* faulting address */
+	movsg		scr1,gr31			/* get mapped PTD coverage start address */
+	xor.p		gr28,gr31,gr31			/* compare addresses */
+	bra		__entry_user_data_tlb_miss
+
+	.section .trap.kernel
+	.org		TBR_TT_INSTR_TLB_MISS
+	.globl		__trap_kernel_insn_tlb_miss
+__trap_kernel_insn_tlb_miss:
+	movsg		ear0,gr29			/* faulting address */
+	movsg		scr0,gr31			/* get mapped PTD coverage start address */
+	xor.p		gr29,gr31,gr31			/* compare addresses */
+	bra		__entry_kernel_insn_tlb_miss
+
+	.org		TBR_TT_DATA_TLB_MISS
+	.globl		__trap_kernel_data_tlb_miss
+__trap_kernel_data_tlb_miss:
+	movsg		ear0,gr29			/* faulting address */
+	movsg		scr1,gr31			/* get mapped PTD coverage start address */
+	xor.p		gr29,gr31,gr31			/* compare addresses */
+	bra		__entry_kernel_data_tlb_miss
+
+	.section .trap.fixup.user
+	.org		TBR_TT_INSTR_TLB_MISS >> 2
+	.globl		__trap_fixup_user_insn_tlb_miss
+__trap_fixup_user_insn_tlb_miss:
+	.long		__break_user_insn_tlb_miss
+	.org		TBR_TT_DATA_TLB_MISS >> 2
+	.globl		__trap_fixup_user_data_tlb_miss
+__trap_fixup_user_data_tlb_miss:
+	.long		__break_user_data_tlb_miss
+
+	.section .trap.fixup.kernel
+	.org		TBR_TT_INSTR_TLB_MISS >> 2
+	.globl		__trap_fixup_kernel_insn_tlb_miss
+__trap_fixup_kernel_insn_tlb_miss:
+	.long		__break_kernel_insn_tlb_miss
+	.org		TBR_TT_DATA_TLB_MISS >> 2
+	.globl		__trap_fixup_kernel_data_tlb_miss
+__trap_fixup_kernel_data_tlb_miss:
+	.long		__break_kernel_data_tlb_miss
+
+	.section .trap.vector
+	.org		TBR_TT_INSTR_TLB_MISS >> 2
+	.long		__entry_insn_mmu_fault
+	.org		TBR_TT_DATA_TLB_MISS >> 2
+	.long		__entry_data_mmu_fault
+#endif
+
+	VECTOR_SP_MMU	TBR_TT_DATA_DAT_EXCEP,	__entry_data_dat_fault
+	VECTOR_NMI	TBR_TT_DECREMENT_TIMER,	__entry_do_NMI
+	VECTOR_SOFTPROG	TBR_TT_COMPOUND_EXCEP,	__entry_compound_exception
+	VECTOR_IRQ	TBR_TT_INTERRUPT_1,	__entry_do_IRQ
+	VECTOR_IRQ	TBR_TT_INTERRUPT_2,	__entry_do_IRQ
+	VECTOR_IRQ	TBR_TT_INTERRUPT_3,	__entry_do_IRQ
+	VECTOR_IRQ	TBR_TT_INTERRUPT_4,	__entry_do_IRQ
+	VECTOR_IRQ	TBR_TT_INTERRUPT_5,	__entry_do_IRQ
+	VECTOR_IRQ	TBR_TT_INTERRUPT_6,	__entry_do_IRQ
+	VECTOR_IRQ	TBR_TT_INTERRUPT_7,	__entry_do_IRQ
+	VECTOR_IRQ	TBR_TT_INTERRUPT_8,	__entry_do_IRQ
+	VECTOR_IRQ	TBR_TT_INTERRUPT_9,	__entry_do_IRQ
+	VECTOR_IRQ	TBR_TT_INTERRUPT_10,	__entry_do_IRQ
+	VECTOR_IRQ	TBR_TT_INTERRUPT_11,	__entry_do_IRQ
+	VECTOR_IRQ	TBR_TT_INTERRUPT_12,	__entry_do_IRQ
+	VECTOR_IRQ	TBR_TT_INTERRUPT_13,	__entry_do_IRQ
+	VECTOR_IRQ	TBR_TT_INTERRUPT_14,	__entry_do_IRQ
+	VECTOR_NMI	TBR_TT_INTERRUPT_15,	__entry_do_NMI
+
+	# miscellaneous user mode entry points
+	.section	.trap.user
+	.org		TBR_TT_TRAP0
+	.rept		127
+	bra		__entry_uspace_softprog_interrupt
+	bra		__break_step_uspace_softprog_interrupt
+	.long		0,0
+	.endr
+	.org		TBR_TT_BREAK
+	bra		__entry_break
+	.long		0,0,0
+
+	# miscellaneous kernel mode entry points
+	.section	.trap.kernel
+	.org		TBR_TT_TRAP0
+	.rept		127
+	bra		__entry_kernel_softprog_interrupt
+	bra		__break_step_kernel_softprog_interrupt
+	.long		0,0
+	.endr
+	.org		TBR_TT_BREAK
+	bra		__entry_break
+	.long		0,0,0
+
+	# miscellaneous debug mode entry points
+	.section	.trap.break
+	.org		TBR_TT_BREAK
+	movsg		bpcsr,gr30
+	jmpl		@(gr30,gr0)
+
+	# miscellaneous vectors
+	.section	.trap.vector
+	.org		TBR_TT_TRAP0 >> 2
+	.long		system_call
+	.rept		126
+	.long		__entry_unsupported_trap
+	.endr
+	.org		TBR_TT_BREAK >> 2
+	.long		__entry_debug_exception
diff -Nru a/arch/frv/kernel/entry.S b/arch/frv/kernel/entry.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/kernel/entry.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,1431 @@
+/* entry.S: FR-V entry
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ *
+ *
+ * Entry to the kernel is "interesting":
+ *  (1) There are no stack pointers, not even for the kernel
+ *  (2) General Registers should not be clobbered
+ *  (3) There are no kernel-only data registers
+ *  (4) Since all addressing modes are wrt to a General Register, no global
+ *      variables can be reached
+ *
+ * We deal with this by declaring that we shall kill GR28 on entering the
+ * kernel from userspace
+ *
+ * However, since break interrupts can interrupt the CPU even when PSR.ET==0,
+ * they can't rely on GR28 to be anything useful, and so need to clobber a
+ * separate register (GR31). Break interrupts are managed in break.S
+ *
+ * GR29 _is_ saved, and holds the current task pointer globally
+ *
+ */
+
+#include <linux/sys.h>
+#include <linux/config.h>
+#include <linux/linkage.h>
+#include <asm/thread_info.h>
+#include <asm/setup.h>
+#include <asm/segment.h>
+#include <asm/ptrace.h>
+#include <asm/errno.h>
+#include <asm/cache.h>
+#include <asm/spr-regs.h>
+
+#define nr_syscalls ((syscall_table_size)/4)
+
+	.text
+	.balign		4
+
+.macro LEDS val
+#	sethi.p		%hi(0xe1200004),gr30
+#	setlo		%lo(0xe1200004),gr30
+#	setlos		#~\val,gr31
+#	st		gr31,@(gr30,gr0)
+#	sethi.p		%hi(0xffc00100),gr30
+#	setlo		%lo(0xffc00100),gr30
+#	sth		gr0,@(gr30,gr0)
+#	membar
+.endm
+
+.macro LEDS32
+#	not		gr31,gr31
+#	sethi.p		%hi(0xe1200004),gr30
+#	setlo		%lo(0xe1200004),gr30
+#	st.p		gr31,@(gr30,gr0)
+#	srli		gr31,#16,gr31
+#	sethi.p		%hi(0xffc00100),gr30
+#	setlo		%lo(0xffc00100),gr30
+#	sth		gr31,@(gr30,gr0)
+#	membar
+.endm
+
+###############################################################################
+#
+# entry point for External interrupts received whilst executing userspace code
+#
+###############################################################################
+	.globl		__entry_uspace_external_interrupt
+        .type		__entry_uspace_external_interrupt,@function
+__entry_uspace_external_interrupt:
+	LEDS		0x6200
+	sethi.p		%hi(__kernel_frame0_ptr),gr28
+	setlo		%lo(__kernel_frame0_ptr),gr28
+	ldi		@(gr28,#0),gr28
+
+	# handle h/w single-step through exceptions
+	sti		gr0,@(gr28,#REG__STATUS)
+
+	.globl		__entry_uspace_external_interrupt_reentry
+__entry_uspace_external_interrupt_reentry:
+	LEDS		0x6201
+
+	setlos		#REG__END,gr30
+	dcpl		gr28,gr30,#0
+
+	# finish building the exception frame
+	sti		sp,  @(gr28,#REG_SP)
+	stdi		gr2, @(gr28,#REG_GR(2))
+	stdi		gr4, @(gr28,#REG_GR(4))
+	stdi		gr6, @(gr28,#REG_GR(6))
+	stdi		gr8, @(gr28,#REG_GR(8))
+	stdi		gr10,@(gr28,#REG_GR(10))
+	stdi		gr12,@(gr28,#REG_GR(12))
+	stdi		gr14,@(gr28,#REG_GR(14))
+	stdi		gr16,@(gr28,#REG_GR(16))
+	stdi		gr18,@(gr28,#REG_GR(18))
+	stdi		gr20,@(gr28,#REG_GR(20))
+	stdi		gr22,@(gr28,#REG_GR(22))
+	stdi		gr24,@(gr28,#REG_GR(24))
+	stdi		gr26,@(gr28,#REG_GR(26))
+	sti		gr0, @(gr28,#REG_GR(28))
+	sti		gr29,@(gr28,#REG_GR(29))
+	stdi.p		gr30,@(gr28,#REG_GR(30))
+
+	# set up the kernel stack pointer
+	ori		gr28,0,sp
+
+	movsg		tbr ,gr20
+	movsg		psr ,gr22
+	movsg		pcsr,gr21
+	movsg		isr ,gr23
+	movsg		ccr ,gr24
+	movsg		cccr,gr25
+	movsg		lr  ,gr26
+	movsg		lcr ,gr27
+
+	setlos.p	#-1,gr4
+	andi		gr22,#PSR_PS,gr5		/* try to rebuild original PSR value */
+	andi.p		gr22,#~(PSR_PS|PSR_S),gr6
+	slli		gr5,#1,gr5
+	or		gr6,gr5,gr5
+	andi		gr5,#~PSR_ET,gr5
+
+	sti		gr20,@(gr28,#REG_TBR)
+	sti		gr21,@(gr28,#REG_PC)
+	sti		gr5 ,@(gr28,#REG_PSR)
+	sti		gr23,@(gr28,#REG_ISR)
+	stdi		gr24,@(gr28,#REG_CCR)
+	stdi		gr26,@(gr28,#REG_LR)
+	sti		gr4 ,@(gr28,#REG_SYSCALLNO)
+
+	movsg		iacc0h,gr4
+	movsg		iacc0l,gr5
+	stdi		gr4,@(gr28,#REG_IACC0)
+
+	movsg		gner0,gr4
+	movsg		gner1,gr5
+	stdi		gr4,@(gr28,#REG_GNER0)
+
+	# set up kernel global registers
+	sethi.p		%hi(__kernel_current_task),gr5
+	setlo		%lo(__kernel_current_task),gr5
+	sethi.p		%hi(_gp),gr16
+	setlo		%lo(_gp),gr16
+	ldi		@(gr5,#0),gr29
+	ldi.p		@(gr29,#4),gr15		; __current_thread_info = current->thread_info
+
+	# make sure we (the kernel) get div-zero and misalignment exceptions
+	setlos		#ISR_EDE|ISR_DTT_DIVBYZERO|ISR_EMAM_EXCEPTION,gr5
+	movgs		gr5,isr
+
+	# switch to the kernel trap table
+	sethi.p		%hi(__entry_kerneltrap_table),gr6
+	setlo		%lo(__entry_kerneltrap_table),gr6
+	movgs		gr6,tbr
+
+	# set the return address
+	sethi.p		%hi(__entry_return_from_user_interrupt),gr4
+	setlo		%lo(__entry_return_from_user_interrupt),gr4
+	movgs		gr4,lr
+
+	# raise the minimum interrupt priority to 15 (NMI only) and enable exceptions
+	movsg		psr,gr4
+
+	ori		gr4,#PSR_PIL_14,gr4
+	movgs		gr4,psr
+	ori		gr4,#PSR_PIL_14|PSR_ET,gr4
+	movgs		gr4,psr
+
+	LEDS		0x6202
+	bra		do_IRQ
+
+	.size		__entry_uspace_external_interrupt,.-__entry_uspace_external_interrupt
+
+###############################################################################
+#
+# entry point for External interrupts received whilst executing kernel code
+# - on arriving here, the following registers should already be set up:
+#	GR15	- current thread_info struct pointer
+#	GR16	- kernel GP-REL pointer
+#	GR29	- current task struct pointer
+#	TBR	- kernel trap vector table
+#	ISR	- kernel's preferred integer controls
+#
+###############################################################################
+	.globl		__entry_kernel_external_interrupt
+        .type		__entry_kernel_external_interrupt,@function
+__entry_kernel_external_interrupt:
+	LEDS		0x6210
+
+	sub		sp,gr15,gr31
+	LEDS32
+
+	# set up the stack pointer
+	or.p		sp,gr0,gr30
+	subi		sp,#REG__END,sp
+	sti		gr30,@(sp,#REG_SP)
+
+	# handle h/w single-step through exceptions
+	sti		gr0,@(sp,#REG__STATUS)
+
+	.globl		__entry_kernel_external_interrupt_reentry
+__entry_kernel_external_interrupt_reentry:
+	LEDS		0x6211
+
+	# set up the exception frame
+	setlos		#REG__END,gr30
+	dcpl		sp,gr30,#0
+
+	sti.p		gr28,@(sp,#REG_GR(28))
+	ori		sp,0,gr28
+
+	# finish building the exception frame
+	stdi		gr2,@(gr28,#REG_GR(2))
+	stdi		gr4,@(gr28,#REG_GR(4))
+	stdi		gr6,@(gr28,#REG_GR(6))
+	stdi		gr8,@(gr28,#REG_GR(8))
+	stdi		gr10,@(gr28,#REG_GR(10))
+	stdi		gr12,@(gr28,#REG_GR(12))
+	stdi		gr14,@(gr28,#REG_GR(14))
+	stdi		gr16,@(gr28,#REG_GR(16))
+	stdi		gr18,@(gr28,#REG_GR(18))
+	stdi		gr20,@(gr28,#REG_GR(20))
+	stdi		gr22,@(gr28,#REG_GR(22))
+	stdi		gr24,@(gr28,#REG_GR(24))
+	stdi		gr26,@(gr28,#REG_GR(26))
+	sti		gr29,@(gr28,#REG_GR(29))
+	stdi		gr30,@(gr28,#REG_GR(30))
+
+	movsg		tbr ,gr20
+	movsg		psr ,gr22
+	movsg		pcsr,gr21
+	movsg		isr ,gr23
+	movsg		ccr ,gr24
+	movsg		cccr,gr25
+	movsg		lr  ,gr26
+	movsg		lcr ,gr27
+
+	setlos.p	#-1,gr4
+	andi		gr22,#PSR_PS,gr5		/* try to rebuild original PSR value */
+	andi.p		gr22,#~(PSR_PS|PSR_S),gr6
+	slli		gr5,#1,gr5
+	or		gr6,gr5,gr5
+	andi.p		gr5,#~PSR_ET,gr5
+
+	# set CCCR.CC3 to Undefined to abort atomic-modify completion inside the kernel
+	# - for an explanation of how it works, see: Documentation/fujitsu/frv/atomic-ops.txt
+	andi		gr25,#~0xc0,gr25
+
+	sti		gr20,@(gr28,#REG_TBR)
+	sti		gr21,@(gr28,#REG_PC)
+	sti		gr5 ,@(gr28,#REG_PSR)
+	sti		gr23,@(gr28,#REG_ISR)
+	stdi		gr24,@(gr28,#REG_CCR)
+	stdi		gr26,@(gr28,#REG_LR)
+	sti		gr4 ,@(gr28,#REG_SYSCALLNO)
+
+	movsg		iacc0h,gr4
+	movsg		iacc0l,gr5
+	stdi		gr4,@(gr28,#REG_IACC0)
+
+	movsg		gner0,gr4
+	movsg		gner1,gr5
+	stdi		gr4,@(gr28,#REG_GNER0)
+
+	# set the return address
+	sethi.p		%hi(__entry_return_from_kernel_interrupt),gr4
+	setlo		%lo(__entry_return_from_kernel_interrupt),gr4
+	movgs		gr4,lr
+
+	# clear power-saving mode flags
+	movsg		hsr0,gr4
+	andi		gr4,#~HSR0_PDM,gr4
+	movgs		gr4,hsr0
+
+	# raise the minimum interrupt priority to 15 (NMI only) and enable exceptions
+	movsg		psr,gr4
+	ori		gr4,#PSR_PIL_14,gr4
+	movgs		gr4,psr
+	ori		gr4,#PSR_ET,gr4
+	movgs		gr4,psr
+
+	LEDS		0x6212
+	bra		do_IRQ
+
+	.size		__entry_kernel_external_interrupt,.-__entry_kernel_external_interrupt
+
+
+###############################################################################
+#
+# entry point for Software and Progam interrupts generated whilst executing userspace code
+#
+###############################################################################
+	.globl		__entry_uspace_softprog_interrupt
+        .type		__entry_uspace_softprog_interrupt,@function
+	.globl		__entry_uspace_handle_mmu_fault
+__entry_uspace_softprog_interrupt:
+	LEDS		0x6000
+#ifdef CONFIG_MMU
+	movsg		ear0,gr28
+__entry_uspace_handle_mmu_fault:
+	movgs		gr28,scr2
+#endif
+	sethi.p		%hi(__kernel_frame0_ptr),gr28
+	setlo		%lo(__kernel_frame0_ptr),gr28
+	ldi		@(gr28,#0),gr28
+
+	# handle h/w single-step through exceptions
+	sti		gr0,@(gr28,#REG__STATUS)
+
+	.globl		__entry_uspace_softprog_interrupt_reentry
+__entry_uspace_softprog_interrupt_reentry:
+	LEDS		0x6001
+
+	setlos		#REG__END,gr30
+	dcpl		gr28,gr30,#0
+
+	# set up the kernel stack pointer
+	sti.p		sp,@(gr28,#REG_SP)
+	ori		gr28,0,sp
+	sti		gr0,@(gr28,#REG_GR(28))
+
+	stdi		gr20,@(gr28,#REG_GR(20))
+	stdi		gr22,@(gr28,#REG_GR(22))
+
+	movsg		tbr,gr20
+	movsg		pcsr,gr21
+	movsg		psr,gr22
+
+	sethi.p		%hi(__entry_return_from_user_exception),gr23
+	setlo		%lo(__entry_return_from_user_exception),gr23
+	bra		__entry_common
+
+	.size		__entry_uspace_softprog_interrupt,.-__entry_uspace_softprog_interrupt
+
+	# single-stepping was disabled on entry to a TLB handler that then faulted
+#ifdef CONFIG_MMU
+	.globl		__entry_uspace_handle_mmu_fault_sstep
+__entry_uspace_handle_mmu_fault_sstep:
+	movgs		gr28,scr2
+	sethi.p		%hi(__kernel_frame0_ptr),gr28
+	setlo		%lo(__kernel_frame0_ptr),gr28
+	ldi		@(gr28,#0),gr28
+
+	# flag single-step re-enablement
+	sti		gr0,@(gr28,#REG__STATUS)
+	bra		__entry_uspace_softprog_interrupt_reentry
+#endif
+
+
+###############################################################################
+#
+# entry point for Software and Progam interrupts generated whilst executing kernel code
+#
+###############################################################################
+	.globl		__entry_kernel_softprog_interrupt
+        .type		__entry_kernel_softprog_interrupt,@function
+__entry_kernel_softprog_interrupt:
+	LEDS		0x6004
+
+#ifdef CONFIG_MMU
+	movsg		ear0,gr30
+	movgs		gr30,scr2
+#endif
+
+	.globl		__entry_kernel_handle_mmu_fault
+__entry_kernel_handle_mmu_fault:
+	# set up the stack pointer
+	subi		sp,#REG__END,sp
+	sti		sp,@(sp,#REG_SP)
+	sti		sp,@(sp,#REG_SP-4)
+	andi		sp,#~7,sp
+
+	# handle h/w single-step through exceptions
+	sti		gr0,@(sp,#REG__STATUS)
+
+	.globl		__entry_kernel_softprog_interrupt_reentry
+__entry_kernel_softprog_interrupt_reentry:
+	LEDS		0x6005
+
+	setlos		#REG__END,gr30
+	dcpl		sp,gr30,#0
+
+	# set up the exception frame
+	sti.p		gr28,@(sp,#REG_GR(28))
+	ori		sp,0,gr28
+
+	stdi		gr20,@(gr28,#REG_GR(20))
+	stdi		gr22,@(gr28,#REG_GR(22))
+
+	ldi		@(sp,#REG_SP),gr22		/* reconstruct the old SP */
+	addi		gr22,#REG__END,gr22
+	sti		gr22,@(sp,#REG_SP)
+
+	# set CCCR.CC3 to Undefined to abort atomic-modify completion inside the kernel
+	# - for an explanation of how it works, see: Documentation/fujitsu/frv/atomic-ops.txt
+	movsg		cccr,gr20
+	andi		gr20,#~0xc0,gr20
+	movgs		gr20,cccr
+
+	movsg		tbr,gr20
+	movsg		pcsr,gr21
+	movsg		psr,gr22
+
+	sethi.p		%hi(__entry_return_from_kernel_exception),gr23
+	setlo		%lo(__entry_return_from_kernel_exception),gr23
+	bra		__entry_common
+
+	.size		__entry_kernel_softprog_interrupt,.-__entry_kernel_softprog_interrupt
+
+	# single-stepping was disabled on entry to a TLB handler that then faulted
+#ifdef CONFIG_MMU
+	.globl		__entry_kernel_handle_mmu_fault_sstep
+__entry_kernel_handle_mmu_fault_sstep:
+	# set up the stack pointer
+	subi		sp,#REG__END,sp
+	sti		sp,@(sp,#REG_SP)
+	sti		sp,@(sp,#REG_SP-4)
+	andi		sp,#~7,sp
+
+	# flag single-step re-enablement
+	sethi		#REG__STATUS_STEP,gr30
+	sti		gr30,@(sp,#REG__STATUS)
+	bra		__entry_kernel_softprog_interrupt_reentry
+#endif
+
+
+###############################################################################
+#
+# the rest of the kernel entry point code
+# - on arriving here, the following registers should be set up:
+#	GR1	- kernel stack pointer
+#	GR7	- syscall number (trap 0 only)
+#	GR8-13	- syscall args (trap 0 only)
+#	GR20	- saved TBR
+#	GR21	- saved PC
+#	GR22	- saved PSR
+#	GR23	- return handler address
+#	GR28	- exception frame on stack
+#	SCR2	- saved EAR0 where applicable (clobbered by ICI & ICEF insns on FR451)
+#	PSR	- PSR.S 1, PSR.ET 0
+#
+###############################################################################
+	.globl		__entry_common
+        .type		__entry_common,@function
+__entry_common:
+	LEDS		0x6008
+
+	# finish building the exception frame
+	stdi		gr2,@(gr28,#REG_GR(2))
+	stdi		gr4,@(gr28,#REG_GR(4))
+	stdi		gr6,@(gr28,#REG_GR(6))
+	stdi		gr8,@(gr28,#REG_GR(8))
+	stdi		gr10,@(gr28,#REG_GR(10))
+	stdi		gr12,@(gr28,#REG_GR(12))
+	stdi		gr14,@(gr28,#REG_GR(14))
+	stdi		gr16,@(gr28,#REG_GR(16))
+	stdi		gr18,@(gr28,#REG_GR(18))
+	stdi		gr24,@(gr28,#REG_GR(24))
+	stdi		gr26,@(gr28,#REG_GR(26))
+	sti		gr29,@(gr28,#REG_GR(29))
+	stdi		gr30,@(gr28,#REG_GR(30))
+
+	movsg		lcr ,gr27
+	movsg		lr  ,gr26
+	movgs		gr23,lr
+	movsg		cccr,gr25
+	movsg		ccr ,gr24
+	movsg		isr ,gr23
+
+	setlos.p	#-1,gr4
+	andi		gr22,#PSR_PS,gr5		/* try to rebuild original PSR value */
+	andi.p		gr22,#~(PSR_PS|PSR_S),gr6
+	slli		gr5,#1,gr5
+	or		gr6,gr5,gr5
+	andi		gr5,#~PSR_ET,gr5
+
+	sti		gr20,@(gr28,#REG_TBR)
+	sti		gr21,@(gr28,#REG_PC)
+	sti		gr5 ,@(gr28,#REG_PSR)
+	sti		gr23,@(gr28,#REG_ISR)
+	stdi		gr24,@(gr28,#REG_CCR)
+	stdi		gr26,@(gr28,#REG_LR)
+	sti		gr4 ,@(gr28,#REG_SYSCALLNO)
+
+	movsg		iacc0h,gr4
+	movsg		iacc0l,gr5
+	stdi		gr4,@(gr28,#REG_IACC0)
+
+	movsg		gner0,gr4
+	movsg		gner1,gr5
+	stdi		gr4,@(gr28,#REG_GNER0)
+
+	# set up kernel global registers
+	sethi.p		%hi(__kernel_current_task),gr5
+	setlo		%lo(__kernel_current_task),gr5
+	sethi.p		%hi(_gp),gr16
+	setlo		%lo(_gp),gr16
+	ldi		@(gr5,#0),gr29
+	ldi		@(gr29,#4),gr15		; __current_thread_info = current->thread_info
+
+	# switch to the kernel trap table
+	sethi.p		%hi(__entry_kerneltrap_table),gr6
+	setlo		%lo(__entry_kerneltrap_table),gr6
+	movgs		gr6,tbr
+
+	# make sure we (the kernel) get div-zero and misalignment exceptions
+	setlos		#ISR_EDE|ISR_DTT_DIVBYZERO|ISR_EMAM_EXCEPTION,gr5
+	movgs		gr5,isr
+
+	# clear power-saving mode flags
+	movsg		hsr0,gr4
+	andi		gr4,#~HSR0_PDM,gr4
+	movgs		gr4,hsr0
+
+	# multiplex again using old TBR as a guide
+	setlos.p	#TBR_TT,gr3
+	sethi		%hi(__entry_vector_table),gr6
+	and.p		gr20,gr3,gr5
+	setlo		%lo(__entry_vector_table),gr6
+	srli		gr5,#2,gr5
+	ld		@(gr5,gr6),gr5
+
+	LEDS		0x6009
+	jmpl		@(gr5,gr0)
+
+
+	.size		__entry_common,.-__entry_common
+
+###############################################################################
+#
+# handle instruction MMU fault
+#
+###############################################################################
+#ifdef CONFIG_MMU
+	.globl		__entry_insn_mmu_fault
+__entry_insn_mmu_fault:
+	LEDS		0x6010
+	setlos		#0,gr8
+	movsg		esr0,gr9
+	movsg		scr2,gr10
+
+	# now that we've accessed the exception regs, we can enable exceptions
+	movsg		psr,gr4
+	ori		gr4,#PSR_ET,gr4
+	movgs		gr4,psr
+
+	sethi.p		%hi(do_page_fault),gr5
+	setlo		%lo(do_page_fault),gr5
+	jmpl		@(gr5,gr0)	; call do_page_fault(0,esr0,ear0)
+#endif
+
+
+###############################################################################
+#
+# handle instruction access error
+#
+###############################################################################
+	.globl		__entry_insn_access_error
+__entry_insn_access_error:
+	LEDS		0x6011
+	sethi.p		%hi(insn_access_error),gr5
+	setlo		%lo(insn_access_error),gr5
+	movsg		esfr1,gr8
+	movsg		epcr0,gr9
+	movsg		esr0,gr10
+
+	# now that we've accessed the exception regs, we can enable exceptions
+	movsg		psr,gr4
+	ori		gr4,#PSR_ET,gr4
+	movgs		gr4,psr
+	jmpl		@(gr5,gr0)	; call insn_access_error(esfr1,epcr0,esr0)
+
+###############################################################################
+#
+# handle various instructions of dubious legality
+#
+###############################################################################
+	.globl		__entry_unsupported_trap
+	.globl		__entry_illegal_instruction
+	.globl		__entry_privileged_instruction
+	.globl		__entry_debug_exception
+__entry_unsupported_trap:
+	subi		gr21,#4,gr21
+	sti		gr21,@(gr28,#REG_PC)
+__entry_illegal_instruction:
+__entry_privileged_instruction:
+__entry_debug_exception:
+	LEDS		0x6012
+	sethi.p		%hi(illegal_instruction),gr5
+	setlo		%lo(illegal_instruction),gr5
+	movsg		esfr1,gr8
+	movsg		epcr0,gr9
+	movsg		esr0,gr10
+
+	# now that we've accessed the exception regs, we can enable exceptions
+	movsg		psr,gr4
+	ori		gr4,#PSR_ET,gr4
+	movgs		gr4,psr
+	jmpl		@(gr5,gr0)	; call ill_insn(esfr1,epcr0,esr0)
+
+###############################################################################
+#
+# handle media exception
+#
+###############################################################################
+	.globl		__entry_media_exception
+__entry_media_exception:
+	LEDS		0x6013
+	sethi.p		%hi(media_exception),gr5
+	setlo		%lo(media_exception),gr5
+	movsg		msr0,gr8
+	movsg		msr1,gr9
+
+	# now that we've accessed the exception regs, we can enable exceptions
+	movsg		psr,gr4
+	ori		gr4,#PSR_ET,gr4
+	movgs		gr4,psr
+	jmpl		@(gr5,gr0)	; call media_excep(msr0,msr1)
+
+###############################################################################
+#
+# handle data MMU fault
+# handle data DAT fault (write-protect exception)
+#
+###############################################################################
+#ifdef CONFIG_MMU
+	.globl		__entry_data_mmu_fault
+__entry_data_mmu_fault:
+	.globl		__entry_data_dat_fault
+__entry_data_dat_fault:
+	LEDS		0x6014
+	setlos		#1,gr8
+	movsg		esr0,gr9
+	movsg		scr2,gr10	; saved EAR0
+
+	# now that we've accessed the exception regs, we can enable exceptions
+	movsg		psr,gr4
+	ori		gr4,#PSR_ET,gr4
+	movgs		gr4,psr
+
+	sethi.p		%hi(do_page_fault),gr5
+	setlo		%lo(do_page_fault),gr5
+	jmpl		@(gr5,gr0)	; call do_page_fault(1,esr0,ear0)
+#endif
+
+###############################################################################
+#
+# handle data and instruction access exceptions
+#
+###############################################################################
+	.globl		__entry_insn_access_exception
+	.globl		__entry_data_access_exception
+__entry_insn_access_exception:
+__entry_data_access_exception:
+	LEDS		0x6016
+	sethi.p		%hi(memory_access_exception),gr5
+	setlo		%lo(memory_access_exception),gr5
+	movsg		esr0,gr8
+	movsg		scr2,gr9	; saved EAR0
+	movsg		epcr0,gr10
+
+	# now that we've accessed the exception regs, we can enable exceptions
+	movsg		psr,gr4
+	ori		gr4,#PSR_ET,gr4
+	movgs		gr4,psr
+	jmpl		@(gr5,gr0)	; call memory_access_error(esr0,ear0,epcr0)
+
+###############################################################################
+#
+# handle data access error
+#
+###############################################################################
+	.globl		__entry_data_access_error
+__entry_data_access_error:
+	LEDS		0x6016
+	sethi.p		%hi(data_access_error),gr5
+	setlo		%lo(data_access_error),gr5
+	movsg		esfr1,gr8
+	movsg		esr15,gr9
+	movsg		ear15,gr10
+
+	# now that we've accessed the exception regs, we can enable exceptions
+	movsg		psr,gr4
+	ori		gr4,#PSR_ET,gr4
+	movgs		gr4,psr
+	jmpl		@(gr5,gr0)	; call data_access_error(esfr1,esr15,ear15)
+
+###############################################################################
+#
+# handle data store error
+#
+###############################################################################
+	.globl		__entry_data_store_error
+__entry_data_store_error:
+	LEDS		0x6017
+	sethi.p		%hi(data_store_error),gr5
+	setlo		%lo(data_store_error),gr5
+	movsg		esfr1,gr8
+	movsg		esr14,gr9
+
+	# now that we've accessed the exception regs, we can enable exceptions
+	movsg		psr,gr4
+	ori		gr4,#PSR_ET,gr4
+	movgs		gr4,psr
+	jmpl		@(gr5,gr0)	; call data_store_error(esfr1,esr14)
+
+###############################################################################
+#
+# handle division exception
+#
+###############################################################################
+	.globl		__entry_division_exception
+__entry_division_exception:
+	LEDS		0x6018
+	sethi.p		%hi(division_exception),gr5
+	setlo		%lo(division_exception),gr5
+	movsg		esfr1,gr8
+	movsg		esr0,gr9
+	movsg		isr,gr10
+
+	# now that we've accessed the exception regs, we can enable exceptions
+	movsg		psr,gr4
+	ori		gr4,#PSR_ET,gr4
+	movgs		gr4,psr
+	jmpl		@(gr5,gr0)	; call div_excep(esfr1,esr0,isr)
+
+###############################################################################
+#
+# handle compound exception
+#
+###############################################################################
+	.globl		__entry_compound_exception
+__entry_compound_exception:
+	LEDS		0x6019
+	sethi.p		%hi(compound_exception),gr5
+	setlo		%lo(compound_exception),gr5
+	movsg		esfr1,gr8
+	movsg		esr0,gr9
+	movsg		esr14,gr10
+	movsg		esr15,gr11
+	movsg		msr0,gr12
+	movsg		msr1,gr13
+
+	# now that we've accessed the exception regs, we can enable exceptions
+	movsg		psr,gr4
+	ori		gr4,#PSR_ET,gr4
+	movgs		gr4,psr
+	jmpl		@(gr5,gr0)	; call comp_excep(esfr1,esr0,esr14,esr15,msr0,msr1)
+
+###############################################################################
+#
+# handle interrupts and NMIs
+#
+###############################################################################
+	.globl		__entry_do_IRQ
+__entry_do_IRQ:
+	LEDS		0x6020
+
+	# we can enable exceptions
+	movsg		psr,gr4
+	ori		gr4,#PSR_ET,gr4
+	movgs		gr4,psr
+	bra		do_IRQ
+
+	.globl		__entry_do_NMI
+__entry_do_NMI:
+	LEDS		0x6021
+
+	# we can enable exceptions
+	movsg		psr,gr4
+	ori		gr4,#PSR_ET,gr4
+	movgs		gr4,psr
+	bra		do_NMI
+
+###############################################################################
+#
+# the return path for a newly forked child process
+# - __switch_to() saved the old current pointer in GR27 for us
+#
+###############################################################################
+	.globl		ret_from_fork
+ret_from_fork:
+	LEDS		0x6100
+	ori.p		gr27,0,gr8
+	call		schedule_tail
+
+	# fork & co. return 0 to child
+	setlos.p	#0,gr8
+	bra		__syscall_exit
+
+###################################################################################################
+#
+# Return to user mode is not as complex as all this looks,
+# but we want the default path for a system call return to
+# go as quickly as possible which is why some of this is
+# less clear than it otherwise should be.
+#
+###################################################################################################
+	.balign		L1_CACHE_BYTES
+	.globl		system_call
+system_call:
+	LEDS		0x6101
+	movsg		psr,gr4			; enable exceptions
+	ori		gr4,#PSR_ET,gr4
+	movgs		gr4,psr
+
+	sti		gr7,@(gr28,#REG_SYSCALLNO)
+	sti.p		gr8,@(gr28,#REG_ORIG_GR8)
+
+	subicc		gr7,#nr_syscalls,gr0,icc0
+	bnc		icc0,#0,__syscall_badsys
+
+	ldi		@(gr15,#TI_FLAGS),gr4
+	ori		gr4,#_TIF_SYSCALL_TRACE,gr4
+	andicc		gr4,#_TIF_SYSCALL_TRACE,gr0,icc0
+	bne		icc0,#0,__syscall_trace_entry
+	bra		__syscall_trace_entry
+
+__syscall_call:
+	slli.p		gr7,#2,gr7
+	sethi		%hi(sys_call_table),gr5
+	setlo		%lo(sys_call_table),gr5
+	ld		@(gr5,gr7),gr4
+	calll		@(gr4,gr0)
+
+
+###############################################################################
+#
+# return to interrupted process
+#
+###############################################################################
+__syscall_exit:
+	LEDS		0x6300
+
+	sti		gr8,@(gr28,#REG_GR(8))	; save return value
+
+	# rebuild saved psr - execve will change it for init/main.c
+	ldi		@(gr28,#REG_PSR),gr22
+	srli		gr22,#1,gr5
+	andi.p		gr22,#~PSR_PS,gr22
+	andi		gr5,#PSR_PS,gr5
+	or		gr5,gr22,gr22
+	ori		gr22,#PSR_S,gr22
+
+	# keep current PSR in GR23
+	movsg		psr,gr23
+
+	# make sure we don't miss an interrupt setting need_resched or sigpending between
+	# sampling and the RETT
+	ori		gr23,#PSR_PIL_14,gr23
+	movgs		gr23,psr
+
+	ldi		@(gr15,#TI_FLAGS),gr4
+//	ori		gr4,#_TIF_SYSCALL_TRACE,gr4		/////////////////////////////////
+	sethi.p		%hi(_TIF_ALLWORK_MASK),gr5
+	setlo		%lo(_TIF_ALLWORK_MASK),gr5
+	andcc		gr4,gr5,gr0,icc0
+	bne		icc0,#0,__syscall_exit_work
+
+	# restore all registers and return
+__entry_return_direct:
+	LEDS		0x6301
+
+	andi		gr22,#~PSR_ET,gr22
+	movgs		gr22,psr
+
+	ldi		@(gr28,#REG_ISR),gr23
+	lddi		@(gr28,#REG_CCR),gr24
+	lddi		@(gr28,#REG_LR) ,gr26
+	ldi		@(gr28,#REG_PC) ,gr21
+	ldi		@(gr28,#REG_TBR),gr20
+
+	movgs		gr20,tbr
+	movgs		gr21,pcsr
+	movgs		gr23,isr
+	movgs		gr24,ccr
+	movgs		gr25,cccr
+	movgs		gr26,lr
+	movgs		gr27,lcr
+
+	lddi		@(gr28,#REG_GNER0),gr4
+	movgs		gr4,gner0
+	movgs		gr5,gner1
+
+	lddi		@(gr28,#REG_IACC0),gr4
+	movgs		gr4,iacc0h
+	movgs		gr5,iacc0l
+
+	lddi		@(gr28,#REG_GR(4)) ,gr4
+	lddi		@(gr28,#REG_GR(6)) ,gr6
+	lddi		@(gr28,#REG_GR(8)) ,gr8
+	lddi		@(gr28,#REG_GR(10)),gr10
+	lddi		@(gr28,#REG_GR(12)),gr12
+	lddi		@(gr28,#REG_GR(14)),gr14
+	lddi		@(gr28,#REG_GR(16)),gr16
+	lddi		@(gr28,#REG_GR(18)),gr18
+	lddi		@(gr28,#REG_GR(20)),gr20
+	lddi		@(gr28,#REG_GR(22)),gr22
+	lddi		@(gr28,#REG_GR(24)),gr24
+	lddi		@(gr28,#REG_GR(26)),gr26
+	ldi		@(gr28,#REG_GR(29)),gr29
+	lddi		@(gr28,#REG_GR(30)),gr30
+
+	# check to see if a debugging return is required
+	LEDS		0x67f0
+	movsg		ccr,gr2
+	ldi		@(gr28,#REG__STATUS),gr3
+	andicc		gr3,#REG__STATUS_STEP,gr0,icc0
+	bne		icc0,#0,__entry_return_singlestep
+	movgs		gr2,ccr
+
+	ldi		@(gr28,#REG_SP)    ,sp
+	lddi		@(gr28,#REG_GR(2)) ,gr2
+	ldi		@(gr28,#REG_GR(28)),gr28
+
+	LEDS		0x67fe
+//	movsg		pcsr,gr31
+//	LEDS32
+
+#if 0
+	# store the current frame in the workram on the FR451
+	movgs		gr28,scr2
+	sethi.p		%hi(0xfe800000),gr28
+	setlo		%lo(0xfe800000),gr28
+
+	stdi		gr2,@(gr28,#REG_GR(2))
+	stdi		gr4,@(gr28,#REG_GR(4))
+	stdi		gr6,@(gr28,#REG_GR(6))
+	stdi		gr8,@(gr28,#REG_GR(8))
+	stdi		gr10,@(gr28,#REG_GR(10))
+	stdi		gr12,@(gr28,#REG_GR(12))
+	stdi		gr14,@(gr28,#REG_GR(14))
+	stdi		gr16,@(gr28,#REG_GR(16))
+	stdi		gr18,@(gr28,#REG_GR(18))
+	stdi		gr24,@(gr28,#REG_GR(24))
+	stdi		gr26,@(gr28,#REG_GR(26))
+	sti		gr29,@(gr28,#REG_GR(29))
+	stdi		gr30,@(gr28,#REG_GR(30))
+
+	movsg		tbr ,gr30
+	sti		gr30,@(gr28,#REG_TBR)
+	movsg		pcsr,gr30
+	sti		gr30,@(gr28,#REG_PC)
+	movsg		psr ,gr30
+	sti		gr30,@(gr28,#REG_PSR)
+	movsg		isr ,gr30
+	sti		gr30,@(gr28,#REG_ISR)
+	movsg		ccr ,gr30
+	movsg		cccr,gr31
+	stdi		gr30,@(gr28,#REG_CCR)
+	movsg		lr  ,gr30
+	movsg		lcr ,gr31
+	stdi		gr30,@(gr28,#REG_LR)
+	sti		gr0 ,@(gr28,#REG_SYSCALLNO)
+	movsg		scr2,gr28
+#endif
+
+	rett		#0
+
+	# return via break.S
+__entry_return_singlestep:
+	movgs		gr2,ccr
+	lddi		@(gr28,#REG_GR(2)) ,gr2
+	ldi		@(gr28,#REG_SP)    ,sp
+	ldi		@(gr28,#REG_GR(28)),gr28
+	LEDS		0x67ff
+	break
+	.globl		__entry_return_singlestep_breaks_here
+__entry_return_singlestep_breaks_here:
+	nop
+
+
+###############################################################################
+#
+# return to a process interrupted in kernel space
+# - we need to consider preemption if that is enabled
+#
+###############################################################################
+	.balign		L1_CACHE_BYTES
+__entry_return_from_kernel_exception:
+	LEDS		0x6302
+	movsg		psr,gr23
+	ori		gr23,#PSR_PIL_14,gr23
+	movgs		gr23,psr
+	bra		__entry_return_direct
+
+	.balign		L1_CACHE_BYTES
+__entry_return_from_kernel_interrupt:
+	LEDS		0x6303
+	movsg		psr,gr23
+	ori		gr23,#PSR_PIL_14,gr23
+	movgs		gr23,psr
+
+#ifdef CONFIG_PREEMPT
+	ldi		@(gr15,#TI_PRE_COUNT),gr5
+	subicc		gr5,#0,gr0,icc0
+	beq		icc0,#0,__entry_return_direct
+
+__entry_preempt_need_resched:
+	ldi		@(gr15,#TI_FLAGS),gr4
+	andicc		gr4,#_TIF_NEED_RESCHED,gr0,icc0
+	beq		icc0,#1,__entry_return_direct
+
+	setlos		#PREEMPT_ACTIVE,gr5
+	sti		gr5,@(gr15,#TI_FLAGS)
+
+	andi		gr23,#~PSR_PIL,gr23
+	movgs		gr23,psr
+
+	call		schedule
+	sti		gr0,@(gr15,#TI_PRE_COUNT)
+
+	movsg		psr,gr23
+	ori		gr23,#PSR_PIL_14,gr23
+	movgs		gr23,psr
+	bra		__entry_preempt_need_resched
+#else
+	bra		__entry_return_direct
+#endif
+
+
+###############################################################################
+#
+# perform work that needs to be done immediately before resumption
+#
+###############################################################################
+	.globl		__entry_return_from_user_exception
+	.balign		L1_CACHE_BYTES
+__entry_return_from_user_exception:
+	LEDS		0x6501
+
+__entry_resume_userspace:
+	# make sure we don't miss an interrupt setting need_resched or sigpending between
+	# sampling and the RETT
+	movsg		psr,gr23
+	ori		gr23,#PSR_PIL_14,gr23
+	movgs		gr23,psr
+
+__entry_return_from_user_interrupt:
+	LEDS		0x6402
+	ldi		@(gr15,#TI_FLAGS),gr4
+	sethi.p		%hi(_TIF_WORK_MASK),gr5
+	setlo		%lo(_TIF_WORK_MASK),gr5
+	andcc		gr4,gr5,gr0,icc0
+	beq		icc0,#1,__entry_return_direct
+
+__entry_work_pending:
+	LEDS		0x6404
+	andicc		gr4,#_TIF_NEED_RESCHED,gr0,icc0
+	beq		icc0,#1,__entry_work_notifysig
+
+__entry_work_resched:
+	LEDS		0x6408
+	movsg		psr,gr23
+	andi		gr23,#~PSR_PIL,gr23
+	movgs		gr23,psr
+	call		schedule
+	movsg		psr,gr23
+	ori		gr23,#PSR_PIL_14,gr23
+	movgs		gr23,psr
+
+	LEDS		0x6401
+	ldi		@(gr15,#TI_FLAGS),gr4
+	sethi.p		%hi(_TIF_WORK_MASK),gr5
+	setlo		%lo(_TIF_WORK_MASK),gr5
+	andcc		gr4,gr5,gr0,icc0
+	beq		icc0,#1,__entry_return_direct
+	andicc		gr4,#_TIF_NEED_RESCHED,gr0,icc0
+	bne		icc0,#1,__entry_work_resched
+
+ __entry_work_notifysig:
+	LEDS		0x6410
+	ori.p		gr4,#0,gr8
+	call		do_notify_resume
+	bra		__entry_return_direct
+
+	# perform syscall entry tracing
+__syscall_trace_entry:
+	LEDS		0x6320
+	setlos.p	#0,gr8
+	call		do_syscall_trace
+
+	ldi		@(gr28,#REG_SYSCALLNO),gr7
+	lddi		@(gr28,#REG_GR(8)) ,gr8
+	lddi		@(gr28,#REG_GR(10)),gr10
+	lddi.p		@(gr28,#REG_GR(12)),gr12
+
+	subicc		gr7,#nr_syscalls,gr0,icc0
+	bnc		icc0,#0,__syscall_badsys
+	bra		__syscall_call
+
+	# perform syscall exit tracing
+__syscall_exit_work:
+	LEDS		0x6340
+	andicc		gr4,#_TIF_SYSCALL_TRACE,gr0,icc0
+	beq		icc0,#1,__entry_work_pending
+
+	movsg		psr,gr23
+	andi		gr23,#~PSR_PIL,gr23	; could let do_syscall_trace() call schedule()
+	movgs		gr23,psr
+
+	setlos.p	#1,gr8
+	call		do_syscall_trace
+	bra		__entry_resume_userspace
+
+__syscall_badsys:
+	LEDS		0x6380
+	setlos		#-ENOSYS,gr8
+	sti		gr8,@(gr28,#REG_GR(8))	; save return value
+	bra		__entry_resume_userspace
+
+
+###############################################################################
+#
+# syscall vector table
+#
+###############################################################################
+#ifdef CONFIG_MMU
+#define __MMU(X) X
+#else
+#define __MMU(X) sys_ni_syscall
+#endif
+
+	.section .rodata
+ALIGN
+	.globl		sys_call_table
+sys_call_table:
+	.long sys_restart_syscall	/* 0 - old "setup()" system call, used for restarting */
+	.long sys_exit
+	.long sys_fork
+	.long sys_read
+	.long sys_write
+	.long sys_open		/* 5 */
+	.long sys_close
+	.long sys_waitpid
+	.long sys_creat
+	.long sys_link
+	.long sys_unlink		/* 10 */
+	.long sys_execve
+	.long sys_chdir
+	.long sys_time
+	.long sys_mknod
+	.long sys_chmod		/* 15 */
+	.long sys_lchown16
+	.long sys_ni_syscall			/* old break syscall holder */
+	.long sys_stat
+	.long sys_lseek
+	.long sys_getpid		/* 20 */
+	.long sys_mount
+	.long sys_oldumount
+	.long sys_setuid16
+	.long sys_getuid16
+	.long sys_ni_syscall // sys_stime		/* 25 */
+	.long sys_ptrace
+	.long sys_alarm
+	.long sys_fstat
+	.long sys_pause
+	.long sys_utime		/* 30 */
+	.long sys_ni_syscall			/* old stty syscall holder */
+	.long sys_ni_syscall			/* old gtty syscall holder */
+	.long sys_access
+	.long sys_nice
+	.long sys_ni_syscall	/* 35 */	/* old ftime syscall holder */
+	.long sys_sync
+	.long sys_kill
+	.long sys_rename
+	.long sys_mkdir
+	.long sys_rmdir		/* 40 */
+	.long sys_dup
+	.long sys_pipe
+	.long sys_times
+	.long sys_ni_syscall			/* old prof syscall holder */
+	.long sys_brk		/* 45 */
+	.long sys_setgid16
+	.long sys_getgid16
+	.long sys_ni_syscall // sys_signal
+	.long sys_geteuid16
+	.long sys_getegid16	/* 50 */
+	.long sys_acct
+	.long sys_umount				/* recycled never used phys( */
+	.long sys_ni_syscall			/* old lock syscall holder */
+	.long sys_ioctl
+	.long sys_fcntl		/* 55 */
+	.long sys_ni_syscall			/* old mpx syscall holder */
+	.long sys_setpgid
+	.long sys_ni_syscall			/* old ulimit syscall holder */
+	.long sys_ni_syscall			/* old old uname syscall */
+	.long sys_umask		/* 60 */
+	.long sys_chroot
+	.long sys_ustat
+	.long sys_dup2
+	.long sys_getppid
+	.long sys_getpgrp	/* 65 */
+	.long sys_setsid
+	.long sys_sigaction
+	.long sys_ni_syscall // sys_sgetmask
+	.long sys_ni_syscall // sys_ssetmask
+	.long sys_setreuid16	/* 70 */
+	.long sys_setregid16
+	.long sys_sigsuspend
+	.long sys_ni_syscall // sys_sigpending
+	.long sys_sethostname
+	.long sys_setrlimit	/* 75 */
+	.long sys_ni_syscall // sys_old_getrlimit
+	.long sys_getrusage
+	.long sys_gettimeofday
+	.long sys_settimeofday
+	.long sys_getgroups16	/* 80 */
+	.long sys_setgroups16
+	.long sys_ni_syscall			/* old_select slot */
+	.long sys_symlink
+	.long sys_lstat
+	.long sys_readlink		/* 85 */
+	.long sys_uselib
+	.long sys_swapon
+	.long sys_reboot
+	.long sys_ni_syscall // old_readdir
+	.long sys_ni_syscall	/* 90 */	/* old_mmap slot */
+	.long sys_munmap
+	.long sys_truncate
+	.long sys_ftruncate
+	.long sys_fchmod
+	.long sys_fchown16		/* 95 */
+	.long sys_getpriority
+	.long sys_setpriority
+	.long sys_ni_syscall			/* old profil syscall holder */
+	.long sys_statfs
+	.long sys_fstatfs		/* 100 */
+	.long sys_ni_syscall			/* ioperm for i386 */
+	.long sys_socketcall
+	.long sys_syslog
+	.long sys_setitimer
+	.long sys_getitimer	/* 105 */
+	.long sys_newstat
+	.long sys_newlstat
+	.long sys_newfstat
+	.long sys_ni_syscall	/* obsolete olduname( syscall */
+	.long sys_ni_syscall	/* iopl for i386 */ /* 110 */
+	.long sys_vhangup
+	.long sys_ni_syscall	/* obsolete idle( syscall */
+	.long sys_ni_syscall	/* vm86old for i386 */
+	.long sys_wait4
+	.long sys_swapoff		/* 115 */
+	.long sys_sysinfo
+	.long sys_ipc
+	.long sys_fsync
+	.long sys_sigreturn
+	.long sys_clone		/* 120 */
+	.long sys_setdomainname
+	.long sys_newuname
+	.long sys_ni_syscall	/* old "cacheflush" */
+	.long sys_adjtimex
+	.long __MMU(sys_mprotect) /* 125 */
+	.long sys_sigprocmask
+	.long sys_ni_syscall	/* old "create_module" */
+	.long sys_init_module
+	.long sys_delete_module
+	.long sys_ni_syscall	/* old "get_kernel_syms" */
+	.long sys_quotactl
+	.long sys_getpgid
+	.long sys_fchdir
+	.long sys_bdflush
+	.long sys_sysfs		/* 135 */
+	.long sys_personality
+	.long sys_ni_syscall	/* for afs_syscall */
+	.long sys_setfsuid16
+	.long sys_setfsgid16
+	.long sys_llseek		/* 140 */
+	.long sys_getdents
+	.long sys_select
+	.long sys_flock
+	.long __MMU(sys_msync)
+	.long sys_readv		/* 145 */
+	.long sys_writev
+	.long sys_getsid
+	.long sys_fdatasync
+	.long sys_sysctl
+	.long __MMU(sys_mlock)		/* 150 */
+	.long __MMU(sys_munlock)
+	.long __MMU(sys_mlockall)
+	.long __MMU(sys_munlockall)
+	.long sys_sched_setparam
+	.long sys_sched_getparam   /* 155 */
+	.long sys_sched_setscheduler
+	.long sys_sched_getscheduler
+	.long sys_sched_yield
+	.long sys_sched_get_priority_max
+	.long sys_sched_get_priority_min  /* 160 */
+	.long sys_sched_rr_get_interval
+	.long sys_nanosleep
+	.long __MMU(sys_mremap)
+	.long sys_setresuid16
+	.long sys_getresuid16	/* 165 */
+	.long sys_ni_syscall	/* for vm86 */
+	.long sys_ni_syscall	/* Old sys_query_module */
+	.long sys_poll
+	.long sys_nfsservctl
+	.long sys_setresgid16	/* 170 */
+	.long sys_getresgid16
+	.long sys_prctl
+	.long sys_rt_sigreturn
+	.long sys_rt_sigaction
+	.long sys_rt_sigprocmask	/* 175 */
+	.long sys_rt_sigpending
+	.long sys_rt_sigtimedwait
+	.long sys_rt_sigqueueinfo
+	.long sys_rt_sigsuspend
+	.long sys_pread64		/* 180 */
+	.long sys_pwrite64
+	.long sys_chown16
+	.long sys_getcwd
+	.long sys_capget
+	.long sys_capset           /* 185 */
+	.long sys_sigaltstack
+	.long sys_sendfile
+	.long sys_ni_syscall		/* streams1 */
+	.long sys_ni_syscall		/* streams2 */
+	.long sys_vfork            /* 190 */
+	.long sys_getrlimit
+	.long sys_mmap2
+	.long sys_truncate64
+	.long sys_ftruncate64
+	.long sys_stat64		/* 195 */
+	.long sys_lstat64
+	.long sys_fstat64
+	.long sys_lchown
+	.long sys_getuid
+	.long sys_getgid		/* 200 */
+	.long sys_geteuid
+	.long sys_getegid
+	.long sys_setreuid
+	.long sys_setregid
+	.long sys_getgroups	/* 205 */
+	.long sys_setgroups
+	.long sys_fchown
+	.long sys_setresuid
+	.long sys_getresuid
+	.long sys_setresgid	/* 210 */
+	.long sys_getresgid
+	.long sys_chown
+	.long sys_setuid
+	.long sys_setgid
+	.long sys_setfsuid		/* 215 */
+	.long sys_setfsgid
+	.long sys_pivot_root
+	.long __MMU(sys_mincore)
+	.long __MMU(sys_madvise)
+	.long sys_getdents64	/* 220 */
+	.long sys_fcntl64
+	.long sys_ni_syscall	/* reserved for TUX */
+	.long sys_ni_syscall	/* Reserved for Security */
+	.long sys_gettid
+	.long sys_readahead	/* 225 */
+	.long sys_setxattr
+	.long sys_lsetxattr
+	.long sys_fsetxattr
+	.long sys_getxattr
+	.long sys_lgetxattr	/* 230 */
+	.long sys_fgetxattr
+	.long sys_listxattr
+	.long sys_llistxattr
+	.long sys_flistxattr
+	.long sys_removexattr	/* 235 */
+	.long sys_lremovexattr
+	.long sys_fremovexattr
+ 	.long sys_tkill
+	.long sys_sendfile64
+	.long sys_futex		/* 240 */
+	.long sys_sched_setaffinity
+	.long sys_sched_getaffinity
+	.long sys_ni_syscall	//sys_set_thread_area
+	.long sys_ni_syscall	//sys_get_thread_area
+	.long sys_io_setup	/* 245 */
+	.long sys_io_destroy
+	.long sys_io_getevents
+	.long sys_io_submit
+	.long sys_io_cancel
+	.long sys_fadvise64	/* 250 */
+	.long sys_ni_syscall
+	.long sys_exit_group
+	.long sys_lookup_dcookie
+	.long sys_epoll_create
+	.long sys_epoll_ctl	/* 255 */
+	.long sys_epoll_wait
+ 	.long __MMU(sys_remap_file_pages)
+ 	.long sys_set_tid_address
+ 	.long sys_timer_create
+ 	.long sys_timer_settime		/* 260 */
+ 	.long sys_timer_gettime
+ 	.long sys_timer_getoverrun
+ 	.long sys_timer_delete
+ 	.long sys_clock_settime
+ 	.long sys_clock_gettime		/* 265 */
+ 	.long sys_clock_getres
+ 	.long sys_clock_nanosleep
+	.long sys_statfs64
+	.long sys_fstatfs64
+	.long sys_tgkill	/* 270 */
+	.long sys_utimes
+ 	.long sys_fadvise64_64
+	.long sys_ni_syscall	/* sys_vserver */
+	.long sys_mbind
+	.long sys_get_mempolicy
+	.long sys_set_mempolicy
+	.long sys_mq_open
+	.long sys_mq_unlink
+	.long sys_mq_timedsend
+	.long sys_mq_timedreceive	/* 280 */
+	.long sys_mq_notify
+	.long sys_mq_getsetattr
+	.long sys_ni_syscall		/* reserved for kexec */
+	.long sys_waitid
+	.long sys_ni_syscall		/* 285 */ /* available */
+	.long sys_add_key
+	.long sys_request_key
+	.long sys_keyctl
+	.long sys_ni_syscall // sys_vperfctr_open
+	.long sys_ni_syscall // sys_vperfctr_control	/* 290 */
+	.long sys_ni_syscall // sys_vperfctr_unlink
+	.long sys_ni_syscall // sys_vperfctr_iresume
+	.long sys_ni_syscall // sys_vperfctr_read
+
+
+syscall_table_size = (. - sys_call_table)
diff -Nru a/arch/frv/kernel/frv_ksyms.c b/arch/frv/kernel/frv_ksyms.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/kernel/frv_ksyms.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,124 @@
+#include <linux/module.h>
+#include <linux/linkage.h>
+#include <linux/sched.h>
+#include <linux/string.h>
+#include <linux/mm.h>
+#include <linux/user.h>
+#include <linux/elfcore.h>
+#include <linux/in6.h>
+#include <linux/interrupt.h>
+#include <linux/config.h>
+
+#include <asm/setup.h>
+#include <asm/pgalloc.h>
+#include <asm/irq.h>
+#include <asm/io.h>
+#include <asm/semaphore.h>
+#include <asm/checksum.h>
+#include <asm/hardirq.h>
+#include <asm/current.h>
+
+extern void dump_thread(struct pt_regs *, struct user *);
+extern long __memcpy_user(void *dst, const void *src, size_t count);
+
+/* platform dependent support */
+
+EXPORT_SYMBOL(__ioremap);
+EXPORT_SYMBOL(iounmap);
+
+EXPORT_SYMBOL(dump_thread);
+EXPORT_SYMBOL(strnlen);
+EXPORT_SYMBOL(strrchr);
+EXPORT_SYMBOL(strstr);
+EXPORT_SYMBOL(strchr);
+EXPORT_SYMBOL(strcat);
+EXPORT_SYMBOL(strlen);
+EXPORT_SYMBOL(strcmp);
+EXPORT_SYMBOL(strncmp);
+EXPORT_SYMBOL(strncpy);
+
+EXPORT_SYMBOL(ip_fast_csum);
+
+#if 0
+EXPORT_SYMBOL(local_irq_count);
+EXPORT_SYMBOL(local_bh_count);
+#endif
+EXPORT_SYMBOL(kernel_thread);
+
+EXPORT_SYMBOL(enable_irq);
+EXPORT_SYMBOL(disable_irq);
+EXPORT_SYMBOL(__res_bus_clock_speed_HZ);
+EXPORT_SYMBOL(__page_offset);
+EXPORT_SYMBOL(__memcpy_user);
+EXPORT_SYMBOL(flush_dcache_page);
+
+#ifndef CONFIG_MMU
+EXPORT_SYMBOL(memory_start);
+EXPORT_SYMBOL(memory_end);
+#endif
+
+EXPORT_SYMBOL(__debug_bug_trap);
+
+/* Networking helper routines. */
+EXPORT_SYMBOL(csum_partial_copy);
+
+/* The following are special because they're not called
+   explicitly (the C compiler generates them).  Fortunately,
+   their interface isn't gonna change any time soon now, so
+   it's OK to leave it out of version control.  */
+EXPORT_SYMBOL(memcpy);
+EXPORT_SYMBOL(memset);
+EXPORT_SYMBOL(memcmp);
+EXPORT_SYMBOL(memscan);
+EXPORT_SYMBOL(memmove);
+EXPORT_SYMBOL(strtok);
+
+EXPORT_SYMBOL(get_wchan);
+
+#ifdef CONFIG_FRV_OUTOFLINE_ATOMIC_OPS
+EXPORT_SYMBOL(atomic_test_and_ANDNOT_mask);
+EXPORT_SYMBOL(atomic_test_and_OR_mask);
+EXPORT_SYMBOL(atomic_test_and_XOR_mask);
+EXPORT_SYMBOL(atomic_add_return);
+EXPORT_SYMBOL(atomic_sub_return);
+EXPORT_SYMBOL(__xchg_8);
+EXPORT_SYMBOL(__xchg_16);
+EXPORT_SYMBOL(__xchg_32);
+EXPORT_SYMBOL(__cmpxchg_8);
+EXPORT_SYMBOL(__cmpxchg_16);
+EXPORT_SYMBOL(__cmpxchg_32);
+#endif
+
+/*
+ * libgcc functions - functions that are used internally by the
+ * compiler...  (prototypes are not correct though, but that
+ * doesn't really matter since they're not versioned).
+ */
+extern void __gcc_bcmp(void);
+extern void __ashldi3(void);
+extern void __ashrdi3(void);
+extern void __cmpdi2(void);
+extern void __divdi3(void);
+extern void __lshrdi3(void);
+extern void __moddi3(void);
+extern void __muldi3(void);
+extern void __negdi2(void);
+extern void __ucmpdi2(void);
+extern void __udivdi3(void);
+extern void __udivmoddi4(void);
+extern void __umoddi3(void);
+
+        /* gcc lib functions */
+//EXPORT_SYMBOL(__gcc_bcmp);
+EXPORT_SYMBOL(__ashldi3);
+EXPORT_SYMBOL(__ashrdi3);
+//EXPORT_SYMBOL(__cmpdi2);
+//EXPORT_SYMBOL(__divdi3);
+EXPORT_SYMBOL(__lshrdi3);
+//EXPORT_SYMBOL(__moddi3);
+EXPORT_SYMBOL(__muldi3);
+EXPORT_SYMBOL(__negdi2);
+//EXPORT_SYMBOL(__ucmpdi2);
+//EXPORT_SYMBOL(__udivdi3);
+//EXPORT_SYMBOL(__udivmoddi4);
+//EXPORT_SYMBOL(__umoddi3);
diff -Nru a/arch/frv/kernel/gdb-io.c b/arch/frv/kernel/gdb-io.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/kernel/gdb-io.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,216 @@
+/* gdb-io.c: FR403 GDB stub I/O
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/string.h>
+#include <linux/kernel.h>
+#include <linux/signal.h>
+#include <linux/sched.h>
+#include <linux/mm.h>
+#include <linux/console.h>
+#include <linux/init.h>
+#include <linux/serial_reg.h>
+
+#include <asm/pgtable.h>
+#include <asm/system.h>
+#include <asm/irc-regs.h>
+#include <asm/timer-regs.h>
+#include <asm/gdb-stub.h>
+#include "gdb-io.h"
+
+#ifdef CONFIG_GDBSTUB_UART0
+#define __UART(X) (*(volatile uint8_t *)(UART0_BASE + (UART_##X)))
+#define __UART_IRR_NMI 0xff0f0000
+#else /* CONFIG_GDBSTUB_UART1 */
+#define __UART(X) (*(volatile uint8_t *)(UART1_BASE + (UART_##X)))
+#define __UART_IRR_NMI 0xfff00000
+#endif
+
+#define LSR_WAIT_FOR(STATE)			\
+do {						\
+	gdbstub_do_rx();			\
+} while (!(__UART(LSR) & UART_LSR_##STATE))
+
+#define FLOWCTL_QUERY(LINE)	({ __UART(MSR) & UART_MSR_##LINE; })
+#define FLOWCTL_CLEAR(LINE)	do { __UART(MCR) &= ~UART_MCR_##LINE; mb(); } while (0)
+#define FLOWCTL_SET(LINE)	do { __UART(MCR) |= UART_MCR_##LINE;  mb(); } while (0)
+
+#define FLOWCTL_WAIT_FOR(LINE)			\
+do {						\
+	gdbstub_do_rx();			\
+} while(!FLOWCTL_QUERY(LINE))
+
+/*****************************************************************************/
+/*
+ * initialise the GDB stub
+ * - called with PSR.ET==0, so can't incur external interrupts
+ */
+void gdbstub_io_init(void)
+{
+	/* set up the serial port */
+	__UART(LCR) = UART_LCR_WLEN8; /* 1N8 */
+	__UART(FCR) =
+		UART_FCR_ENABLE_FIFO |
+		UART_FCR_CLEAR_RCVR |
+		UART_FCR_CLEAR_XMIT |
+		UART_FCR_TRIGGER_1;
+
+	FLOWCTL_CLEAR(DTR);
+	FLOWCTL_SET(RTS);
+
+//	gdbstub_set_baud(115200);
+
+	/* we want to get serial receive interrupts */
+	__UART(IER) = UART_IER_RDI | UART_IER_RLSI;
+	mb();
+
+	__set_IRR(6, __UART_IRR_NMI);	/* map ERRs and UARTx to NMI */
+
+} /* end gdbstub_io_init() */
+
+/*****************************************************************************/
+/*
+ * set up the GDB stub serial port baud rate timers
+ */
+void gdbstub_set_baud(unsigned baud)
+{
+	unsigned value, high, low;
+	u8 lcr;
+
+	/* work out the divisor to give us the nearest higher baud rate */
+	value = __serial_clock_speed_HZ / 16 / baud;
+
+	/* determine the baud rate range */
+	high = __serial_clock_speed_HZ / 16 / value;
+	low = __serial_clock_speed_HZ / 16 / (value + 1);
+
+	/* pick the nearest bound */
+	if (low + (high - low) / 2 > baud)
+		value++;
+
+	lcr = __UART(LCR);
+	__UART(LCR) |= UART_LCR_DLAB;
+	mb();
+	__UART(DLL) = value & 0xff;
+	__UART(DLM) = (value >> 8) & 0xff;
+	mb();
+	__UART(LCR) = lcr;
+	mb();
+
+} /* end gdbstub_set_baud() */
+
+/*****************************************************************************/
+/*
+ * receive characters into the receive FIFO
+ */
+void gdbstub_do_rx(void)
+{
+	unsigned ix, nix;
+
+	ix = gdbstub_rx_inp;
+
+	while (__UART(LSR) & UART_LSR_DR) {
+		nix = (ix + 2) & 0xfff;
+		if (nix == gdbstub_rx_outp)
+			break;
+
+		gdbstub_rx_buffer[ix++] = __UART(LSR);
+		gdbstub_rx_buffer[ix++] = __UART(RX);
+		ix = nix;
+	}
+
+	gdbstub_rx_inp = ix;
+
+	__clr_RC(15);
+	__clr_IRL();
+
+} /* end gdbstub_do_rx() */
+
+/*****************************************************************************/
+/*
+ * wait for a character to come from the debugger
+ */
+int gdbstub_rx_char(unsigned char *_ch, int nonblock)
+{
+	unsigned ix;
+	u8 ch, st;
+
+	*_ch = 0xff;
+
+	if (gdbstub_rx_unget) {
+		*_ch = gdbstub_rx_unget;
+		gdbstub_rx_unget = 0;
+		return 0;
+	}
+
+ try_again:
+	gdbstub_do_rx();
+
+	/* pull chars out of the buffer */
+	ix = gdbstub_rx_outp;
+	if (ix == gdbstub_rx_inp) {
+		if (nonblock)
+			return -EAGAIN;
+		//watchdog_alert_counter = 0;
+		goto try_again;
+	}
+
+	st = gdbstub_rx_buffer[ix++];
+	ch = gdbstub_rx_buffer[ix++];
+	gdbstub_rx_outp = ix & 0x00000fff;
+
+	if (st & UART_LSR_BI) {
+		gdbstub_proto("### GDB Rx Break Detected ###\n");
+		return -EINTR;
+	}
+	else if (st & (UART_LSR_FE|UART_LSR_OE|UART_LSR_PE)) {
+		gdbstub_proto("### GDB Rx Error (st=%02x) ###\n",st);
+		return -EIO;
+	}
+	else {
+		gdbstub_proto("### GDB Rx %02x (st=%02x) ###\n",ch,st);
+		*_ch = ch & 0x7f;
+		return 0;
+	}
+
+} /* end gdbstub_rx_char() */
+
+/*****************************************************************************/
+/*
+ * send a character to the debugger
+ */
+void gdbstub_tx_char(unsigned char ch)
+{
+	FLOWCTL_SET(DTR);
+	LSR_WAIT_FOR(THRE);
+//	FLOWCTL_WAIT_FOR(CTS);
+
+	if (ch == 0x0a) {
+		__UART(TX) = 0x0d;
+		mb();
+		LSR_WAIT_FOR(THRE);
+//		FLOWCTL_WAIT_FOR(CTS);
+	}
+	__UART(TX) = ch;
+	mb();
+
+	FLOWCTL_CLEAR(DTR);
+} /* end gdbstub_tx_char() */
+
+/*****************************************************************************/
+/*
+ * send a character to the debugger
+ */
+void gdbstub_tx_flush(void)
+{
+	LSR_WAIT_FOR(TEMT);
+	LSR_WAIT_FOR(THRE);
+	FLOWCTL_CLEAR(DTR);
+} /* end gdbstub_tx_flush() */
diff -Nru a/arch/frv/kernel/gdb-io.h b/arch/frv/kernel/gdb-io.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/kernel/gdb-io.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,55 @@
+/* gdb-io.h: FR403 GDB I/O port defs
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+#ifndef _GDB_IO_H
+#define _GDB_IO_H
+
+#include <asm/serial-regs.h>
+
+#undef UART_RX
+#undef UART_TX
+#undef UART_DLL
+#undef UART_DLM
+#undef UART_IER
+#undef UART_IIR
+#undef UART_FCR
+#undef UART_LCR
+#undef UART_MCR
+#undef UART_LSR
+#undef UART_MSR
+#undef UART_SCR
+
+#define UART_RX		0*8	/* In:  Receive buffer (DLAB=0) */
+#define UART_TX		0*8	/* Out: Transmit buffer (DLAB=0) */
+#define UART_DLL	0*8	/* Out: Divisor Latch Low (DLAB=1) */
+#define UART_DLM	1*8	/* Out: Divisor Latch High (DLAB=1) */
+#define UART_IER	1*8	/* Out: Interrupt Enable Register */
+#define UART_IIR	2*8	/* In:  Interrupt ID Register */
+#define UART_FCR	2*8	/* Out: FIFO Control Register */
+#define UART_LCR	3*8	/* Out: Line Control Register */
+#define UART_MCR	4*8	/* Out: Modem Control Register */
+#define UART_LSR	5*8	/* In:  Line Status Register */
+#define UART_MSR	6*8	/* In:  Modem Status Register */
+#define UART_SCR	7*8	/* I/O: Scratch Register */
+
+#define UART_LCR_DLAB	0x80	/* Divisor latch access bit */
+#define UART_LCR_SBC	0x40	/* Set break control */
+#define UART_LCR_SPAR	0x20	/* Stick parity (?) */
+#define UART_LCR_EPAR	0x10	/* Even parity select */
+#define UART_LCR_PARITY	0x08	/* Parity Enable */
+#define UART_LCR_STOP	0x04	/* Stop bits: 0=1 stop bit, 1= 2 stop bits */
+#define UART_LCR_WLEN5  0x00	/* Wordlength: 5 bits */
+#define UART_LCR_WLEN6  0x01	/* Wordlength: 6 bits */
+#define UART_LCR_WLEN7  0x02	/* Wordlength: 7 bits */
+#define UART_LCR_WLEN8  0x03	/* Wordlength: 8 bits */
+
+
+#endif /* _GDB_IO_H */
diff -Nru a/arch/frv/kernel/gdb-stub.c b/arch/frv/kernel/gdb-stub.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/kernel/gdb-stub.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,2084 @@
+/* gdb-stub.c: FRV GDB stub
+ *
+ * Copyright (C) 2003,4 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ * - Derived from Linux/MIPS version, Copyright (C) 1995 Andreas Busse
+ *
+ * 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.
+ */
+
+/*
+ *  To enable debugger support, two things need to happen.  One, a
+ *  call to set_debug_traps() is necessary in order to allow any breakpoints
+ *  or error conditions to be properly intercepted and reported to gdb.
+ *  Two, a breakpoint needs to be generated to begin communication.  This
+ *  is most easily accomplished by a call to breakpoint().  Breakpoint()
+ *  simulates a breakpoint by executing a BREAK instruction.
+ *
+ *
+ *    The following gdb commands are supported:
+ *
+ * command          function                               Return value
+ *
+ *    g             return the value of the CPU registers  hex data or ENN
+ *    G             set the value of the CPU registers     OK or ENN
+ *
+ *    mAA..AA,LLLL  Read LLLL bytes at address AA..AA      hex data or ENN
+ *    MAA..AA,LLLL: Write LLLL bytes at address AA.AA      OK or ENN
+ *
+ *    c             Resume at current address              SNN   ( signal NN)
+ *    cAA..AA       Continue at address AA..AA             SNN
+ *
+ *    s             Step one instruction                   SNN
+ *    sAA..AA       Step one instruction from AA..AA       SNN
+ *
+ *    k             kill
+ *
+ *    ?             What was the last sigval ?             SNN   (signal NN)
+ *
+ *    bBB..BB	    Set baud rate to BB..BB		   OK or BNN, then sets
+ *							   baud rate
+ *
+ * All commands and responses are sent with a packet which includes a
+ * checksum.  A packet consists of
+ *
+ * $<packet info>#<checksum>.
+ *
+ * where
+ * <packet info> :: <characters representing the command or response>
+ * <checksum>    :: < two hex digits computed as modulo 256 sum of <packetinfo>>
+ *
+ * When a packet is received, it is first acknowledged with either '+' or '-'.
+ * '+' indicates a successful transfer.  '-' indicates a failed transfer.
+ *
+ * Example:
+ *
+ * Host:                  Reply:
+ * $m0,10#2a               +$00010203040506070809101112131415#42
+ *
+ *
+ *  ==============
+ *  MORE EXAMPLES:
+ *  ==============
+ *
+ *  For reference -- the following are the steps that one
+ *  company took (RidgeRun Inc) to get remote gdb debugging
+ *  going. In this scenario the host machine was a PC and the
+ *  target platform was a Galileo EVB64120A MIPS evaluation
+ *  board.
+ *
+ *  Step 1:
+ *  First download gdb-5.0.tar.gz from the internet.
+ *  and then build/install the package.
+ *
+ *  Example:
+ *    $ tar zxf gdb-5.0.tar.gz
+ *    $ cd gdb-5.0
+ *    $ ./configure --target=frv-elf-gdb
+ *    $ make
+ *    $ frv-elf-gdb
+ *
+ *  Step 2:
+ *  Configure linux for remote debugging and build it.
+ *
+ *  Example:
+ *    $ cd ~/linux
+ *    $ make menuconfig <go to "Kernel Hacking" and turn on remote debugging>
+ *    $ make dep; make vmlinux
+ *
+ *  Step 3:
+ *  Download the kernel to the remote target and start
+ *  the kernel running. It will promptly halt and wait
+ *  for the host gdb session to connect. It does this
+ *  since the "Kernel Hacking" option has defined
+ *  CONFIG_REMOTE_DEBUG which in turn enables your calls
+ *  to:
+ *     set_debug_traps();
+ *     breakpoint();
+ *
+ *  Step 4:
+ *  Start the gdb session on the host.
+ *
+ *  Example:
+ *    $ frv-elf-gdb vmlinux
+ *    (gdb) set remotebaud 115200
+ *    (gdb) target remote /dev/ttyS1
+ *    ...at this point you are connected to
+ *       the remote target and can use gdb
+ *       in the normal fasion. Setting
+ *       breakpoints, single stepping,
+ *       printing variables, etc.
+ *
+ */
+
+#include <linux/string.h>
+#include <linux/kernel.h>
+#include <linux/signal.h>
+#include <linux/sched.h>
+#include <linux/mm.h>
+#include <linux/console.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/nmi.h>
+
+#include <asm/pgtable.h>
+#include <asm/system.h>
+#include <asm/gdb-stub.h>
+
+#define LEDS(x) do { /* *(u32*)0xe1200004 = ~(x); mb(); */ } while(0)
+
+#undef GDBSTUB_DEBUG_PROTOCOL
+
+extern void debug_to_serial(const char *p, int n);
+extern void gdbstub_console_write(struct console *co, const char *p, unsigned n);
+
+extern volatile uint32_t __break_error_detect[3]; /* ESFR1, ESR15, EAR15 */
+extern struct user_context __break_user_context;
+
+struct __debug_amr {
+	unsigned long L, P;
+} __attribute__((aligned(8)));
+
+struct __debug_mmu {
+	struct {
+		unsigned long	hsr0, pcsr, esr0, ear0, epcr0;
+#ifdef CONFIG_MMU
+		unsigned long	tplr, tppr, tpxr, cxnr;
+#endif
+	} regs;
+
+	struct __debug_amr	iamr[16];
+	struct __debug_amr	damr[16];
+
+#ifdef CONFIG_MMU
+	struct __debug_amr	tlb[64*2];
+#endif
+};
+
+static struct __debug_mmu __debug_mmu;
+
+/*
+ * BUFMAX defines the maximum number of characters in inbound/outbound buffers
+ * at least NUMREGBYTES*2 are needed for register packets
+ */
+#define BUFMAX 2048
+
+#define BREAK_INSN	0x801000c0	/* use "break" as bkpt */
+
+static const char gdbstub_banner[] = "Linux/FR-V GDB Stub (c) RedHat 2003\n";
+
+volatile u8	gdbstub_rx_buffer[PAGE_SIZE] __attribute__((aligned(PAGE_SIZE)));
+volatile u32	gdbstub_rx_inp = 0;
+volatile u32	gdbstub_rx_outp = 0;
+volatile u8	gdbstub_rx_overflow = 0;
+u8		gdbstub_rx_unget = 0;
+
+/* set with GDB whilst running to permit step through exceptions */
+extern volatile u32 __attribute__((section(".bss"))) gdbstub_trace_through_exceptions;
+
+static char	input_buffer[BUFMAX];
+static char	output_buffer[BUFMAX];
+
+static const char hexchars[] = "0123456789abcdef";
+
+static const char *regnames[] = {
+	"PSR ", "ISR ", "CCR ", "CCCR",
+	"LR  ", "LCR ", "PC  ", "_stt",
+	"sys ", "GR8*", "GNE0", "GNE1",
+	"IACH", "IACL",
+	"TBR ", "SP  ", "FP  ", "GR3 ",
+	"GR4 ", "GR5 ", "GR6 ", "GR7 ",
+	"GR8 ", "GR9 ", "GR10", "GR11",
+	"GR12", "GR13", "GR14", "GR15",
+	"GR16", "GR17", "GR18", "GR19",
+	"GR20", "GR21", "GR22", "GR23",
+	"GR24", "GR25", "GR26", "GR27",
+	"EFRM", "CURR", "GR30", "BFRM"
+};
+
+struct gdbstub_bkpt {
+	unsigned long	addr;		/* address of breakpoint */
+	unsigned	len;		/* size of breakpoint */
+	uint32_t	originsns[7];	/* original instructions */
+};
+
+static struct gdbstub_bkpt gdbstub_bkpts[256];
+
+/*
+ * local prototypes
+ */
+
+static void gdbstub_recv_packet(char *buffer);
+static int gdbstub_send_packet(char *buffer);
+static int gdbstub_compute_signal(unsigned long tbr);
+static int hex(unsigned char ch);
+static int hexToInt(char **ptr, unsigned long *intValue);
+static unsigned char *mem2hex(const void *mem, char *buf, int count, int may_fault);
+static char *hex2mem(const char *buf, void *_mem, int count);
+
+/*
+ * Convert ch from a hex digit to an int
+ */
+static int hex(unsigned char ch)
+{
+	if (ch >= 'a' && ch <= 'f')
+		return ch-'a'+10;
+	if (ch >= '0' && ch <= '9')
+		return ch-'0';
+	if (ch >= 'A' && ch <= 'F')
+		return ch-'A'+10;
+	return -1;
+}
+
+void gdbstub_printk(const char *fmt, ...)
+{
+	static char buf[1024];
+	va_list args;
+	int len;
+
+	/* Emit the output into the temporary buffer */
+	va_start(args, fmt);
+	len = vsnprintf(buf, sizeof(buf), fmt, args);
+	va_end(args);
+	debug_to_serial(buf, len);
+}
+
+static inline char *gdbstub_strcpy(char *dst, const char *src)
+{
+	int loop = 0;
+	while ((dst[loop] = src[loop]))
+	       loop++;
+	return dst;
+}
+
+static void gdbstub_purge_cache(void)
+{
+	asm volatile("	dcef	@(gr0,gr0),#1	\n"
+		     "	icei	@(gr0,gr0),#1	\n"
+		     "	membar			\n"
+		     "	bar			\n"
+		     );
+}
+
+/*****************************************************************************/
+/*
+ * scan for the sequence $<data>#<checksum>
+ */
+static void gdbstub_recv_packet(char *buffer)
+{
+	unsigned char checksum;
+	unsigned char xmitcsum;
+	unsigned char ch;
+	int count, i, ret, error;
+
+	for (;;) {
+		/* wait around for the start character, ignore all other characters */
+		do {
+			gdbstub_rx_char(&ch, 0);
+		} while (ch != '$');
+
+		checksum = 0;
+		xmitcsum = -1;
+		count = 0;
+		error = 0;
+
+		/* now, read until a # or end of buffer is found */
+		while (count < BUFMAX) {
+			ret = gdbstub_rx_char(&ch, 0);
+			if (ret < 0)
+				error = ret;
+
+			if (ch == '#')
+				break;
+			checksum += ch;
+			buffer[count] = ch;
+			count++;
+		}
+
+		if (error == -EIO) {
+			gdbstub_proto("### GDB Rx Error - Skipping packet ###\n");
+			gdbstub_proto("### GDB Tx NAK\n");
+			gdbstub_tx_char('-');
+			continue;
+		}
+
+		if (count >= BUFMAX || error)
+			continue;
+
+		buffer[count] = 0;
+
+		/* read the checksum */
+		ret = gdbstub_rx_char(&ch, 0);
+		if (ret < 0)
+			error = ret;
+		xmitcsum = hex(ch) << 4;
+
+		ret = gdbstub_rx_char(&ch, 0);
+		if (ret < 0)
+			error = ret;
+		xmitcsum |= hex(ch);
+
+		if (error) {
+			if (error == -EIO)
+				gdbstub_proto("### GDB Rx Error - Skipping packet\n");
+			gdbstub_proto("### GDB Tx NAK\n");
+			gdbstub_tx_char('-');
+			continue;
+		}
+
+		/* check the checksum */
+		if (checksum != xmitcsum) {
+			gdbstub_proto("### GDB Tx NAK\n");
+			gdbstub_tx_char('-');	/* failed checksum */
+			continue;
+		}
+
+		gdbstub_proto("### GDB Rx '$%s#%02x' ###\n", buffer, checksum);
+		gdbstub_proto("### GDB Tx ACK\n");
+		gdbstub_tx_char('+'); /* successful transfer */
+
+		/* if a sequence char is present, reply the sequence ID */
+		if (buffer[2] == ':') {
+			gdbstub_tx_char(buffer[0]);
+			gdbstub_tx_char(buffer[1]);
+
+			/* remove sequence chars from buffer */
+			count = 0;
+			while (buffer[count]) count++;
+			for (i=3; i <= count; i++)
+				buffer[i - 3] = buffer[i];
+		}
+
+		break;
+	}
+} /* end gdbstub_recv_packet() */
+
+/*****************************************************************************/
+/*
+ * send the packet in buffer.
+ * - return 0 if successfully ACK'd
+ * - return 1 if abandoned due to new incoming packet
+ */
+static int gdbstub_send_packet(char *buffer)
+{
+	unsigned char checksum;
+	int count;
+	unsigned char ch;
+
+	/* $<packet info>#<checksum> */
+	gdbstub_proto("### GDB Tx '%s' ###\n", buffer);
+
+	do {
+		gdbstub_tx_char('$');
+		checksum = 0;
+		count = 0;
+
+		while ((ch = buffer[count]) != 0) {
+			gdbstub_tx_char(ch);
+			checksum += ch;
+			count += 1;
+		}
+
+		gdbstub_tx_char('#');
+		gdbstub_tx_char(hexchars[checksum >> 4]);
+		gdbstub_tx_char(hexchars[checksum & 0xf]);
+
+	} while (gdbstub_rx_char(&ch,0),
+#ifdef GDBSTUB_DEBUG_PROTOCOL
+		 ch=='-' && (gdbstub_proto("### GDB Rx NAK\n"),0),
+		 ch!='-' && ch!='+' && (gdbstub_proto("### GDB Rx ??? %02x\n",ch),0),
+#endif
+		 ch!='+' && ch!='$');
+
+	if (ch=='+') {
+		gdbstub_proto("### GDB Rx ACK\n");
+		return 0;
+	}
+
+	gdbstub_proto("### GDB Tx Abandoned\n");
+	gdbstub_rx_unget = ch;
+	return 1;
+} /* end gdbstub_send_packet() */
+
+/*
+ * While we find nice hex chars, build an int.
+ * Return number of chars processed.
+ */
+static int hexToInt(char **ptr, unsigned long *_value)
+{
+	int count = 0, ch;
+
+	*_value = 0;
+	while (**ptr) {
+		ch = hex(**ptr);
+		if (ch < 0)
+			break;
+
+		*_value = (*_value << 4) | ((uint8_t) ch & 0xf);
+		count++;
+
+		(*ptr)++;
+	}
+
+	return count;
+}
+
+/*****************************************************************************/
+/*
+ * probe an address to see whether it maps to anything
+ */
+static inline int gdbstub_addr_probe(const void *vaddr)
+{
+#ifdef CONFIG_MMU
+	unsigned long paddr;
+
+	asm("lrad %1,%0,#1,#0,#0" : "=r"(paddr) : "r"(vaddr));
+	if (!(paddr & xAMPRx_V))
+		return 0;
+#endif
+
+	return 1;
+} /* end gdbstub_addr_probe() */
+
+#ifdef CONFIG_MMU
+static unsigned long __saved_dampr, __saved_damlr;
+
+static inline unsigned long gdbstub_virt_to_pte(unsigned long vaddr)
+{
+	pgd_t *pgd;
+	pud_t *pud;
+	pmd_t *pmd;
+	pte_t *pte;
+	unsigned long val, dampr5;
+
+	pgd = (pgd_t *) __get_DAMLR(3) + pgd_index(vaddr);
+	pud = pud_offset(pgd, vaddr);
+	pmd = pmd_offset(pud, vaddr);
+
+	if (pmd_bad(*pmd) || !pmd_present(*pmd))
+		return 0;
+
+	/* make sure dampr5 maps to the correct pmd */
+	dampr5 = __get_DAMPR(5);
+	val = pmd_val(*pmd);
+	__set_DAMPR(5, val | xAMPRx_L | xAMPRx_SS_16Kb | xAMPRx_S | xAMPRx_C | xAMPRx_V);
+
+	/* now its safe to access pmd */
+	pte = (pte_t *)__get_DAMLR(5) + __pte_index(vaddr);
+	if (pte_present(*pte))
+		val = pte_val(*pte);
+	else
+		val = 0;
+
+	/* restore original dampr5 */
+	__set_DAMPR(5, dampr5);
+
+	return val;
+}
+#endif
+
+static inline int gdbstub_addr_map(const void *vaddr)
+{
+#ifdef CONFIG_MMU
+	unsigned long pte;
+
+	__saved_dampr = __get_DAMPR(2);
+	__saved_damlr = __get_DAMLR(2);
+#endif
+	if (gdbstub_addr_probe(vaddr))
+		return 1;
+#ifdef CONFIG_MMU
+	pte = gdbstub_virt_to_pte((unsigned long) vaddr);
+	if (pte) {
+		__set_DAMPR(2, pte);
+		__set_DAMLR(2, (unsigned long) vaddr & PAGE_MASK);
+		return 1;
+	}
+#endif
+	return 0;
+}
+
+static inline void gdbstub_addr_unmap(void)
+{
+#ifdef CONFIG_MMU
+	__set_DAMPR(2, __saved_dampr);
+	__set_DAMLR(2, __saved_damlr);
+#endif
+}
+
+/*
+ * access potentially dodgy memory through a potentially dodgy pointer
+ */
+static inline int gdbstub_read_dword(const void *addr, uint32_t *_res)
+{
+	unsigned long brr;
+	uint32_t res;
+
+	if (!gdbstub_addr_map(addr))
+		return 0;
+
+	asm volatile("	movgs	gr0,brr	\n"
+		     "	ld%I2	%M2,%0	\n"
+		     "	movsg	brr,%1	\n"
+		     : "=r"(res), "=r"(brr)
+		     : "m"(*(uint32_t *) addr));
+	*_res = res;
+	gdbstub_addr_unmap();
+	return likely(!brr);
+}
+
+static inline int gdbstub_write_dword(void *addr, uint32_t val)
+{
+	unsigned long brr;
+
+	if (!gdbstub_addr_map(addr))
+		return 0;
+
+	asm volatile("	movgs	gr0,brr	\n"
+		     "	st%I2	%1,%M2	\n"
+		     "	movsg	brr,%0	\n"
+		     : "=r"(brr)
+		     : "r"(val), "m"(*(uint32_t *) addr));
+	gdbstub_addr_unmap();
+	return likely(!brr);
+}
+
+static inline int gdbstub_read_word(const void *addr, uint16_t *_res)
+{
+	unsigned long brr;
+	uint16_t res;
+
+	if (!gdbstub_addr_map(addr))
+		return 0;
+
+	asm volatile("	movgs	gr0,brr	\n"
+		     "	lduh%I2	%M2,%0	\n"
+		     "	movsg	brr,%1	\n"
+		     : "=r"(res), "=r"(brr)
+		     : "m"(*(uint16_t *) addr));
+	*_res = res;
+	gdbstub_addr_unmap();
+	return likely(!brr);
+}
+
+static inline int gdbstub_write_word(void *addr, uint16_t val)
+{
+	unsigned long brr;
+
+	if (!gdbstub_addr_map(addr))
+		return 0;
+
+	asm volatile("	movgs	gr0,brr	\n"
+		     "	sth%I2	%1,%M2	\n"
+		     "	movsg	brr,%0	\n"
+		     : "=r"(brr)
+		     : "r"(val), "m"(*(uint16_t *) addr));
+	gdbstub_addr_unmap();
+	return likely(!brr);
+}
+
+static inline int gdbstub_read_byte(const void *addr, uint8_t *_res)
+{
+	unsigned long brr;
+	uint8_t res;
+
+	if (!gdbstub_addr_map(addr))
+		return 0;
+
+	asm volatile("	movgs	gr0,brr	\n"
+		     "	ldub%I2	%M2,%0	\n"
+		     "	movsg	brr,%1	\n"
+		     : "=r"(res), "=r"(brr)
+		     : "m"(*(uint8_t *) addr));
+	*_res = res;
+	gdbstub_addr_unmap();
+	return likely(!brr);
+}
+
+static inline int gdbstub_write_byte(void *addr, uint8_t val)
+{
+	unsigned long brr;
+
+	if (!gdbstub_addr_map(addr))
+		return 0;
+
+	asm volatile("	movgs	gr0,brr	\n"
+		     "	stb%I2	%1,%M2	\n"
+		     "	movsg	brr,%0	\n"
+		     : "=r"(brr)
+		     : "r"(val), "m"(*(uint8_t *) addr));
+	gdbstub_addr_unmap();
+	return likely(!brr);
+}
+
+static void __gdbstub_console_write(struct console *co, const char *p, unsigned n)
+{
+	char outbuf[26];
+	int qty;
+
+	outbuf[0] = 'O';
+
+	while (n > 0) {
+		qty = 1;
+
+		while (n > 0 && qty < 20) {
+			mem2hex(p, outbuf + qty, 2, 0);
+			qty += 2;
+			if (*p == 0x0a) {
+				outbuf[qty++] = '0';
+				outbuf[qty++] = 'd';
+			}
+			p++;
+			n--;
+		}
+
+		outbuf[qty] = 0;
+		gdbstub_send_packet(outbuf);
+	}
+}
+
+#if 0
+void debug_to_serial(const char *p, int n)
+{
+	gdbstub_console_write(NULL,p,n);
+}
+#endif
+
+#ifdef CONFIG_GDBSTUB_CONSOLE
+
+static kdev_t gdbstub_console_dev(struct console *con)
+{
+	return MKDEV(1,3); /* /dev/null */
+}
+
+static struct console gdbstub_console = {
+	.name	= "gdb",
+	.write	= gdbstub_console_write,	/* in break.S */
+	.device	= gdbstub_console_dev,
+	.flags	= CON_PRINTBUFFER,
+	.index	= -1,
+};
+
+#endif
+
+/*****************************************************************************/
+/*
+ * Convert the memory pointed to by mem into hex, placing result in buf.
+ * - if successful, return a pointer to the last char put in buf (NUL)
+ * - in case of mem fault, return NULL
+ * may_fault is non-zero if we are reading from arbitrary memory, but is currently
+ * not used.
+ */
+static unsigned char *mem2hex(const void *_mem, char *buf, int count, int may_fault)
+{
+	const uint8_t *mem = _mem;
+	uint8_t ch[4] __attribute__((aligned(4)));
+
+	if ((uint32_t)mem&1 && count>=1) {
+		if (!gdbstub_read_byte(mem,ch))
+			return NULL;
+		*buf++ = hexchars[ch[0] >> 4];
+		*buf++ = hexchars[ch[0] & 0xf];
+		mem++;
+		count--;
+	}
+
+	if ((uint32_t)mem&3 && count>=2) {
+		if (!gdbstub_read_word(mem,(uint16_t *)ch))
+			return NULL;
+		*buf++ = hexchars[ch[0] >> 4];
+		*buf++ = hexchars[ch[0] & 0xf];
+		*buf++ = hexchars[ch[1] >> 4];
+		*buf++ = hexchars[ch[1] & 0xf];
+		mem += 2;
+		count -= 2;
+	}
+
+	while (count>=4) {
+		if (!gdbstub_read_dword(mem,(uint32_t *)ch))
+			return NULL;
+		*buf++ = hexchars[ch[0] >> 4];
+		*buf++ = hexchars[ch[0] & 0xf];
+		*buf++ = hexchars[ch[1] >> 4];
+		*buf++ = hexchars[ch[1] & 0xf];
+		*buf++ = hexchars[ch[2] >> 4];
+		*buf++ = hexchars[ch[2] & 0xf];
+		*buf++ = hexchars[ch[3] >> 4];
+		*buf++ = hexchars[ch[3] & 0xf];
+		mem += 4;
+		count -= 4;
+	}
+
+	if (count>=2) {
+		if (!gdbstub_read_word(mem,(uint16_t *)ch))
+			return NULL;
+		*buf++ = hexchars[ch[0] >> 4];
+		*buf++ = hexchars[ch[0] & 0xf];
+		*buf++ = hexchars[ch[1] >> 4];
+		*buf++ = hexchars[ch[1] & 0xf];
+		mem += 2;
+		count -= 2;
+	}
+
+	if (count>=1) {
+		if (!gdbstub_read_byte(mem,ch))
+			return NULL;
+		*buf++ = hexchars[ch[0] >> 4];
+		*buf++ = hexchars[ch[0] & 0xf];
+	}
+
+	*buf = 0;
+
+	return buf;
+} /* end mem2hex() */
+
+/*****************************************************************************/
+/*
+ * convert the hex array pointed to by buf into binary to be placed in mem
+ * return a pointer to the character AFTER the last byte of buffer consumed
+ */
+static char *hex2mem(const char *buf, void *_mem, int count)
+{
+	uint8_t *mem = _mem;
+	union {
+		uint32_t l;
+		uint16_t w;
+		uint8_t  b[4];
+	} ch;
+
+	if ((u32)mem&1 && count>=1) {
+		ch.b[0]  = hex(*buf++) << 4;
+		ch.b[0] |= hex(*buf++);
+		if (!gdbstub_write_byte(mem,ch.b[0]))
+			return NULL;
+		mem++;
+		count--;
+	}
+
+	if ((u32)mem&3 && count>=2) {
+		ch.b[0]  = hex(*buf++) << 4;
+		ch.b[0] |= hex(*buf++);
+		ch.b[1]  = hex(*buf++) << 4;
+		ch.b[1] |= hex(*buf++);
+		if (!gdbstub_write_word(mem,ch.w))
+			return NULL;
+		mem += 2;
+		count -= 2;
+	}
+
+	while (count>=4) {
+		ch.b[0]  = hex(*buf++) << 4;
+		ch.b[0] |= hex(*buf++);
+		ch.b[1]  = hex(*buf++) << 4;
+		ch.b[1] |= hex(*buf++);
+		ch.b[2]  = hex(*buf++) << 4;
+		ch.b[2] |= hex(*buf++);
+		ch.b[3]  = hex(*buf++) << 4;
+		ch.b[3] |= hex(*buf++);
+		if (!gdbstub_write_dword(mem,ch.l))
+			return NULL;
+		mem += 4;
+		count -= 4;
+	}
+
+	if (count>=2) {
+		ch.b[0]  = hex(*buf++) << 4;
+		ch.b[0] |= hex(*buf++);
+		ch.b[1]  = hex(*buf++) << 4;
+		ch.b[1] |= hex(*buf++);
+		if (!gdbstub_write_word(mem,ch.w))
+			return NULL;
+		mem += 2;
+		count -= 2;
+	}
+
+	if (count>=1) {
+		ch.b[0]  = hex(*buf++) << 4;
+		ch.b[0] |= hex(*buf++);
+		if (!gdbstub_write_byte(mem,ch.b[0]))
+			return NULL;
+	}
+
+	return (char *) buf;
+} /* end hex2mem() */
+
+/*****************************************************************************/
+/*
+ * This table contains the mapping between FRV TBR.TT exception codes,
+ * and signals, which are primarily what GDB understands.  It also
+ * indicates which hardware traps we need to commandeer when
+ * initializing the stub.
+ */
+static const struct brr_to_sig_map {
+	unsigned long	brr_mask;	/* BRR bitmask */
+	unsigned long	tbr_tt;		/* TBR.TT code (in BRR.EBTT) */
+	unsigned int	signo;		/* Signal that we map this into */
+} brr_to_sig_map[] = {
+	{ BRR_EB,	TBR_TT_INSTR_ACC_ERROR,	SIGSEGV		},
+	{ BRR_EB,	TBR_TT_ILLEGAL_INSTR,	SIGILL		},
+	{ BRR_EB,	TBR_TT_PRIV_INSTR,	SIGILL		},
+	{ BRR_EB,	TBR_TT_MP_EXCEPTION,	SIGFPE		},
+	{ BRR_EB,	TBR_TT_DATA_ACC_ERROR,	SIGSEGV		},
+	{ BRR_EB,	TBR_TT_DATA_STR_ERROR,	SIGSEGV		},
+	{ BRR_EB,	TBR_TT_DIVISION_EXCEP,	SIGFPE		},
+	{ BRR_EB,	TBR_TT_COMPOUND_EXCEP,	SIGSEGV		},
+	{ BRR_EB,	TBR_TT_INTERRUPT_13,	SIGALRM		},	/* watchdog */
+	{ BRR_EB,	TBR_TT_INTERRUPT_14,	SIGINT		},	/* GDB serial */
+	{ BRR_EB,	TBR_TT_INTERRUPT_15,	SIGQUIT		},	/* NMI */
+	{ BRR_CB,	0,			SIGUSR1		},
+	{ BRR_TB,	0,			SIGUSR2		},
+	{ BRR_DBNEx,	0,			SIGTRAP		},
+	{ BRR_DBx,	0,			SIGTRAP		},	/* h/w watchpoint */
+	{ BRR_IBx,	0,			SIGTRAP		},	/* h/w breakpoint */
+	{ BRR_CBB,	0,			SIGTRAP		},
+	{ BRR_SB,	0,			SIGTRAP		},
+	{ BRR_ST,	0,			SIGTRAP		},	/* single step */
+	{ 0,		0,			SIGHUP		}	/* default */
+};
+
+/*****************************************************************************/
+/*
+ * convert the FRV BRR register contents into a UNIX signal number
+ */
+static inline int gdbstub_compute_signal(unsigned long brr)
+{
+	const struct brr_to_sig_map *map;
+	unsigned long tbr = (brr & BRR_EBTT) >> 12;
+
+	for (map = brr_to_sig_map; map->brr_mask; map++)
+		if (map->brr_mask & brr)
+			if (!map->tbr_tt || map->tbr_tt == tbr)
+				break;
+
+	return map->signo;
+} /* end gdbstub_compute_signal() */
+
+/*****************************************************************************/
+/*
+ * set a software breakpoint or a hardware breakpoint or watchpoint
+ */
+static int gdbstub_set_breakpoint(unsigned long type, unsigned long addr, unsigned long len)
+{
+	unsigned long tmp;
+	int bkpt, loop, xloop;
+
+	union {
+		struct {
+			unsigned long mask0, mask1;
+		};
+		uint8_t bytes[8];
+	} dbmr;
+
+	//gdbstub_printk("setbkpt(%ld,%08lx,%ld)\n", type, addr, len);
+
+	switch (type) {
+		/* set software breakpoint */
+	case 0:
+		if (addr & 3 || len > 7*4)
+			return -EINVAL;
+
+		for (bkpt = 255; bkpt >= 0; bkpt--)
+			if (!gdbstub_bkpts[bkpt].addr)
+				break;
+		if (bkpt < 0)
+			return -ENOSPC;
+
+		for (loop = 0; loop < len/4; loop++)
+			if (!gdbstub_read_dword(&((uint32_t *) addr)[loop],
+						&gdbstub_bkpts[bkpt].originsns[loop]))
+				return -EFAULT;
+
+		for (loop = 0; loop < len/4; loop++)
+			if (!gdbstub_write_dword(&((uint32_t *) addr)[loop],
+						 BREAK_INSN)
+			    ) {
+				/* need to undo the changes if possible */
+				for (xloop = 0; xloop < loop; xloop++)
+					gdbstub_write_dword(&((uint32_t *) addr)[xloop],
+							    gdbstub_bkpts[bkpt].originsns[xloop]);
+				return -EFAULT;
+			}
+
+		gdbstub_bkpts[bkpt].addr = addr;
+		gdbstub_bkpts[bkpt].len = len;
+
+#if 0
+		gdbstub_printk("Set BKPT[%02x]: %08lx #%d {%04x, %04x} -> { %04x, %04x }\n",
+			       bkpt,
+			       gdbstub_bkpts[bkpt].addr,
+			       gdbstub_bkpts[bkpt].len,
+			       gdbstub_bkpts[bkpt].originsns[0],
+			       gdbstub_bkpts[bkpt].originsns[1],
+			       ((uint32_t *) addr)[0],
+			       ((uint32_t *) addr)[1]
+			       );
+#endif
+		return 0;
+
+		/* set hardware breakpoint */
+	case 1:
+		if (addr & 3 || len != 4)
+			return -EINVAL;
+
+		if (!(__debug_regs->dcr & DCR_IBE0)) {
+			//gdbstub_printk("set h/w break 0: %08lx\n", addr);
+			__debug_regs->dcr |= DCR_IBE0;
+			asm volatile("movgs %0,ibar0" : : "r"(addr));
+			return 0;
+		}
+
+		if (!(__debug_regs->dcr & DCR_IBE1)) {
+			//gdbstub_printk("set h/w break 1: %08lx\n", addr);
+			__debug_regs->dcr |= DCR_IBE1;
+			asm volatile("movgs %0,ibar1" : : "r"(addr));
+			return 0;
+		}
+
+		if (!(__debug_regs->dcr & DCR_IBE2)) {
+			//gdbstub_printk("set h/w break 2: %08lx\n", addr);
+			__debug_regs->dcr |= DCR_IBE2;
+			asm volatile("movgs %0,ibar2" : : "r"(addr));
+			return 0;
+		}
+
+		if (!(__debug_regs->dcr & DCR_IBE3)) {
+			//gdbstub_printk("set h/w break 3: %08lx\n", addr);
+			__debug_regs->dcr |= DCR_IBE3;
+			asm volatile("movgs %0,ibar3" : : "r"(addr));
+			return 0;
+		}
+
+		return -ENOSPC;
+
+		/* set data read/write/access watchpoint */
+	case 2:
+	case 3:
+	case 4:
+		if ((addr & ~7) != ((addr + len - 1) & ~7))
+			return -EINVAL;
+
+		tmp = addr & 7;
+
+		memset(dbmr.bytes, 0xff, sizeof(dbmr.bytes));
+		for (loop = 0; loop < len; loop++)
+			dbmr.bytes[tmp + loop] = 0;
+
+		addr &= ~7;
+
+		if (!(__debug_regs->dcr & (DCR_DRBE0|DCR_DWBE0))) {
+			//gdbstub_printk("set h/w watchpoint 0 type %ld: %08lx\n", type, addr);
+			tmp = type==2 ? DCR_DWBE0 : type==3 ? DCR_DRBE0 : DCR_DRBE0|DCR_DWBE0;
+			__debug_regs->dcr |= tmp;
+			asm volatile("	movgs	%0,dbar0	\n"
+				     "	movgs	%1,dbmr00	\n"
+				     "	movgs	%2,dbmr01	\n"
+				     "	movgs	gr0,dbdr00	\n"
+				     "	movgs	gr0,dbdr01	\n"
+				     : : "r"(addr), "r"(dbmr.mask0), "r"(dbmr.mask1));
+			return 0;
+		}
+
+		if (!(__debug_regs->dcr & (DCR_DRBE1|DCR_DWBE1))) {
+			//gdbstub_printk("set h/w watchpoint 1 type %ld: %08lx\n", type, addr);
+			tmp = type==2 ? DCR_DWBE1 : type==3 ? DCR_DRBE1 : DCR_DRBE1|DCR_DWBE1;
+			__debug_regs->dcr |= tmp;
+			asm volatile("	movgs	%0,dbar1	\n"
+				     "	movgs	%1,dbmr10	\n"
+				     "	movgs	%2,dbmr11	\n"
+				     "	movgs	gr0,dbdr10	\n"
+				     "	movgs	gr0,dbdr11	\n"
+				     : : "r"(addr), "r"(dbmr.mask0), "r"(dbmr.mask1));
+			return 0;
+		}
+
+		return -ENOSPC;
+
+	default:
+		return -EINVAL;
+	}
+
+} /* end gdbstub_set_breakpoint() */
+
+/*****************************************************************************/
+/*
+ * clear a breakpoint or watchpoint
+ */
+int gdbstub_clear_breakpoint(unsigned long type, unsigned long addr, unsigned long len)
+{
+	unsigned long tmp;
+	int bkpt, loop;
+
+	union {
+		struct {
+			unsigned long mask0, mask1;
+		};
+		uint8_t bytes[8];
+	} dbmr;
+
+	//gdbstub_printk("clearbkpt(%ld,%08lx,%ld)\n", type, addr, len);
+
+	switch (type) {
+		/* clear software breakpoint */
+	case 0:
+		for (bkpt = 255; bkpt >= 0; bkpt--)
+			if (gdbstub_bkpts[bkpt].addr == addr && gdbstub_bkpts[bkpt].len == len)
+				break;
+		if (bkpt < 0)
+			return -ENOENT;
+
+		gdbstub_bkpts[bkpt].addr = 0;
+
+		for (loop = 0; loop < len/4; loop++)
+			if (!gdbstub_write_dword(&((uint32_t *) addr)[loop],
+						 gdbstub_bkpts[bkpt].originsns[loop]))
+				return -EFAULT;
+		return 0;
+
+		/* clear hardware breakpoint */
+	case 1:
+		if (addr & 3 || len != 4)
+			return -EINVAL;
+
+#define __get_ibar(X) ({ unsigned long x; asm volatile("movsg ibar"#X",%0" : "=r"(x)); x; })
+
+		if (__debug_regs->dcr & DCR_IBE0 && __get_ibar(0) == addr) {
+			//gdbstub_printk("clear h/w break 0: %08lx\n", addr);
+			__debug_regs->dcr &= ~DCR_IBE0;
+			asm volatile("movgs gr0,ibar0");
+			return 0;
+		}
+
+		if (__debug_regs->dcr & DCR_IBE1 && __get_ibar(1) == addr) {
+			//gdbstub_printk("clear h/w break 1: %08lx\n", addr);
+			__debug_regs->dcr &= ~DCR_IBE1;
+			asm volatile("movgs gr0,ibar1");
+			return 0;
+		}
+
+		if (__debug_regs->dcr & DCR_IBE2 && __get_ibar(2) == addr) {
+			//gdbstub_printk("clear h/w break 2: %08lx\n", addr);
+			__debug_regs->dcr &= ~DCR_IBE2;
+			asm volatile("movgs gr0,ibar2");
+			return 0;
+		}
+
+		if (__debug_regs->dcr & DCR_IBE3 && __get_ibar(3) == addr) {
+			//gdbstub_printk("clear h/w break 3: %08lx\n", addr);
+			__debug_regs->dcr &= ~DCR_IBE3;
+			asm volatile("movgs gr0,ibar3");
+			return 0;
+		}
+
+		return -EINVAL;
+
+		/* clear data read/write/access watchpoint */
+	case 2:
+	case 3:
+	case 4:
+		if ((addr & ~7) != ((addr + len - 1) & ~7))
+			return -EINVAL;
+
+		tmp = addr & 7;
+
+		memset(dbmr.bytes, 0xff, sizeof(dbmr.bytes));
+		for (loop = 0; loop < len; loop++)
+			dbmr.bytes[tmp + loop] = 0;
+
+		addr &= ~7;
+
+#define __get_dbar(X) ({ unsigned long x; asm volatile("movsg dbar"#X",%0" : "=r"(x)); x; })
+#define __get_dbmr0(X) ({ unsigned long x; asm volatile("movsg dbmr"#X"0,%0" : "=r"(x)); x; })
+#define __get_dbmr1(X) ({ unsigned long x; asm volatile("movsg dbmr"#X"1,%0" : "=r"(x)); x; })
+
+		/* consider DBAR 0 */
+		tmp = type==2 ? DCR_DWBE0 : type==3 ? DCR_DRBE0 : DCR_DRBE0|DCR_DWBE0;
+
+		if ((__debug_regs->dcr & (DCR_DRBE0|DCR_DWBE0)) != tmp ||
+		    __get_dbar(0) != addr ||
+		    __get_dbmr0(0) != dbmr.mask0 ||
+		    __get_dbmr1(0) != dbmr.mask1)
+			goto skip_dbar0;
+
+		//gdbstub_printk("clear h/w watchpoint 0 type %ld: %08lx\n", type, addr);
+		__debug_regs->dcr &= ~(DCR_DRBE0|DCR_DWBE0);
+		asm volatile("	movgs	gr0,dbar0	\n"
+			     "	movgs	gr0,dbmr00	\n"
+			     "	movgs	gr0,dbmr01	\n"
+			     "	movgs	gr0,dbdr00	\n"
+			     "	movgs	gr0,dbdr01	\n");
+		return 0;
+
+	skip_dbar0:
+		/* consider DBAR 0 */
+		tmp = type==2 ? DCR_DWBE1 : type==3 ? DCR_DRBE1 : DCR_DRBE1|DCR_DWBE1;
+
+		if ((__debug_regs->dcr & (DCR_DRBE1|DCR_DWBE1)) != tmp ||
+		    __get_dbar(1) != addr ||
+		    __get_dbmr0(1) != dbmr.mask0 ||
+		    __get_dbmr1(1) != dbmr.mask1)
+			goto skip_dbar1;
+
+		//gdbstub_printk("clear h/w watchpoint 1 type %ld: %08lx\n", type, addr);
+		__debug_regs->dcr &= ~(DCR_DRBE1|DCR_DWBE1);
+		asm volatile("	movgs	gr0,dbar1	\n"
+			     "	movgs	gr0,dbmr10	\n"
+			     "	movgs	gr0,dbmr11	\n"
+			     "	movgs	gr0,dbdr10	\n"
+			     "	movgs	gr0,dbdr11	\n");
+		return 0;
+
+	skip_dbar1:
+		return -ENOSPC;
+
+	default:
+		return -EINVAL;
+	}
+} /* end gdbstub_clear_breakpoint() */
+
+/*****************************************************************************/
+/*
+ * check a for an internal software breakpoint, and wind the PC back if necessary
+ */
+static void gdbstub_check_breakpoint(void)
+{
+	unsigned long addr = __debug_frame->pc - 4;
+	int bkpt;
+
+	for (bkpt = 255; bkpt >= 0; bkpt--)
+		if (gdbstub_bkpts[bkpt].addr == addr)
+			break;
+	if (bkpt >= 0)
+		__debug_frame->pc = addr;
+
+	//gdbstub_printk("alter pc [%d] %08lx\n", bkpt, __debug_frame->pc);
+
+} /* end gdbstub_check_breakpoint() */
+
+/*****************************************************************************/
+/*
+ *
+ */
+static void __attribute__((unused)) gdbstub_show_regs(void)
+{
+	uint32_t *reg;
+	int loop;
+
+	gdbstub_printk("\n");
+
+	gdbstub_printk("Frame: @%p [%s]\n",
+		       __debug_frame,
+		       __debug_frame->psr & PSR_S ? "kernel" : "user");
+
+	reg = (uint32_t *) __debug_frame;
+	for (loop = 0; loop < REG__END; loop++) {
+		printk("%s %08x", regnames[loop + 0], reg[loop + 0]);
+
+		if (loop == REG__END - 1 || loop % 5 == 4)
+			printk("\n");
+		else
+			printk(" | ");
+	}
+
+	gdbstub_printk("Process %s (pid: %d)\n", current->comm, current->pid);
+} /* end gdbstub_show_regs() */
+
+/*****************************************************************************/
+/*
+ * dump debugging regs
+ */
+static void __attribute__((unused)) gdbstub_dump_debugregs(void)
+{
+	unsigned long x;
+
+	x = __debug_regs->dcr;
+	gdbstub_printk("DCR    %08lx  ", x);
+
+	x = __debug_regs->brr;
+	gdbstub_printk("BRR %08lx\n", x);
+
+	gdbstub_printk("IBAR0  %08lx  ", __get_ibar(0));
+	gdbstub_printk("IBAR1  %08lx  ", __get_ibar(1));
+	gdbstub_printk("IBAR2  %08lx  ", __get_ibar(2));
+	gdbstub_printk("IBAR3  %08lx\n", __get_ibar(3));
+
+	gdbstub_printk("DBAR0  %08lx  ", __get_dbar(0));
+	gdbstub_printk("DBMR00 %08lx  ", __get_dbmr0(0));
+	gdbstub_printk("DBMR01 %08lx\n", __get_dbmr1(0));
+
+	gdbstub_printk("DBAR1  %08lx  ", __get_dbar(1));
+	gdbstub_printk("DBMR10 %08lx  ", __get_dbmr0(1));
+	gdbstub_printk("DBMR11 %08lx\n", __get_dbmr1(1));
+
+	gdbstub_printk("\n");
+} /* end gdbstub_dump_debugregs() */
+
+/*****************************************************************************/
+/*
+ * dump the MMU state into a structure so that it can be accessed with GDB
+ */
+void gdbstub_get_mmu_state(void)
+{
+	asm volatile("movsg hsr0,%0" : "=r"(__debug_mmu.regs.hsr0));
+	asm volatile("movsg pcsr,%0" : "=r"(__debug_mmu.regs.pcsr));
+	asm volatile("movsg esr0,%0" : "=r"(__debug_mmu.regs.esr0));
+	asm volatile("movsg ear0,%0" : "=r"(__debug_mmu.regs.ear0));
+	asm volatile("movsg epcr0,%0" : "=r"(__debug_mmu.regs.epcr0));
+
+	/* read the protection / SAT registers */
+	__debug_mmu.iamr[0].L  = __get_IAMLR(0);
+	__debug_mmu.iamr[0].P  = __get_IAMPR(0);
+	__debug_mmu.iamr[1].L  = __get_IAMLR(1);
+	__debug_mmu.iamr[1].P  = __get_IAMPR(1);
+	__debug_mmu.iamr[2].L  = __get_IAMLR(2);
+	__debug_mmu.iamr[2].P  = __get_IAMPR(2);
+	__debug_mmu.iamr[3].L  = __get_IAMLR(3);
+	__debug_mmu.iamr[3].P  = __get_IAMPR(3);
+	__debug_mmu.iamr[4].L  = __get_IAMLR(4);
+	__debug_mmu.iamr[4].P  = __get_IAMPR(4);
+	__debug_mmu.iamr[5].L  = __get_IAMLR(5);
+	__debug_mmu.iamr[5].P  = __get_IAMPR(5);
+	__debug_mmu.iamr[6].L  = __get_IAMLR(6);
+	__debug_mmu.iamr[6].P  = __get_IAMPR(6);
+	__debug_mmu.iamr[7].L  = __get_IAMLR(7);
+	__debug_mmu.iamr[7].P  = __get_IAMPR(7);
+	__debug_mmu.iamr[8].L  = __get_IAMLR(8);
+	__debug_mmu.iamr[8].P  = __get_IAMPR(8);
+	__debug_mmu.iamr[9].L  = __get_IAMLR(9);
+	__debug_mmu.iamr[9].P  = __get_IAMPR(9);
+	__debug_mmu.iamr[10].L = __get_IAMLR(10);
+	__debug_mmu.iamr[10].P = __get_IAMPR(10);
+	__debug_mmu.iamr[11].L = __get_IAMLR(11);
+	__debug_mmu.iamr[11].P = __get_IAMPR(11);
+	__debug_mmu.iamr[12].L = __get_IAMLR(12);
+	__debug_mmu.iamr[12].P = __get_IAMPR(12);
+	__debug_mmu.iamr[13].L = __get_IAMLR(13);
+	__debug_mmu.iamr[13].P = __get_IAMPR(13);
+	__debug_mmu.iamr[14].L = __get_IAMLR(14);
+	__debug_mmu.iamr[14].P = __get_IAMPR(14);
+	__debug_mmu.iamr[15].L = __get_IAMLR(15);
+	__debug_mmu.iamr[15].P = __get_IAMPR(15);
+
+	__debug_mmu.damr[0].L  = __get_DAMLR(0);
+	__debug_mmu.damr[0].P  = __get_DAMPR(0);
+	__debug_mmu.damr[1].L  = __get_DAMLR(1);
+	__debug_mmu.damr[1].P  = __get_DAMPR(1);
+	__debug_mmu.damr[2].L  = __get_DAMLR(2);
+	__debug_mmu.damr[2].P  = __get_DAMPR(2);
+	__debug_mmu.damr[3].L  = __get_DAMLR(3);
+	__debug_mmu.damr[3].P  = __get_DAMPR(3);
+	__debug_mmu.damr[4].L  = __get_DAMLR(4);
+	__debug_mmu.damr[4].P  = __get_DAMPR(4);
+	__debug_mmu.damr[5].L  = __get_DAMLR(5);
+	__debug_mmu.damr[5].P  = __get_DAMPR(5);
+	__debug_mmu.damr[6].L  = __get_DAMLR(6);
+	__debug_mmu.damr[6].P  = __get_DAMPR(6);
+	__debug_mmu.damr[7].L  = __get_DAMLR(7);
+	__debug_mmu.damr[7].P  = __get_DAMPR(7);
+	__debug_mmu.damr[8].L  = __get_DAMLR(8);
+	__debug_mmu.damr[8].P  = __get_DAMPR(8);
+	__debug_mmu.damr[9].L  = __get_DAMLR(9);
+	__debug_mmu.damr[9].P  = __get_DAMPR(9);
+	__debug_mmu.damr[10].L = __get_DAMLR(10);
+	__debug_mmu.damr[10].P = __get_DAMPR(10);
+	__debug_mmu.damr[11].L = __get_DAMLR(11);
+	__debug_mmu.damr[11].P = __get_DAMPR(11);
+	__debug_mmu.damr[12].L = __get_DAMLR(12);
+	__debug_mmu.damr[12].P = __get_DAMPR(12);
+	__debug_mmu.damr[13].L = __get_DAMLR(13);
+	__debug_mmu.damr[13].P = __get_DAMPR(13);
+	__debug_mmu.damr[14].L = __get_DAMLR(14);
+	__debug_mmu.damr[14].P = __get_DAMPR(14);
+	__debug_mmu.damr[15].L = __get_DAMLR(15);
+	__debug_mmu.damr[15].P = __get_DAMPR(15);
+
+#ifdef CONFIG_MMU
+	do {
+		/* read the DAT entries from the TLB */
+		struct __debug_amr *p;
+		int loop;
+
+		asm volatile("movsg tplr,%0" : "=r"(__debug_mmu.regs.tplr));
+		asm volatile("movsg tppr,%0" : "=r"(__debug_mmu.regs.tppr));
+		asm volatile("movsg tpxr,%0" : "=r"(__debug_mmu.regs.tpxr));
+		asm volatile("movsg cxnr,%0" : "=r"(__debug_mmu.regs.cxnr));
+
+		p = __debug_mmu.tlb;
+
+		/* way 0 */
+		asm volatile("movgs %0,tpxr" :: "r"(0 << TPXR_WAY_SHIFT));
+		for (loop = 0; loop < 64; loop++) {
+			asm volatile("tlbpr %0,gr0,#1,#0" :: "r"(loop << PAGE_SHIFT));
+			asm volatile("movsg tplr,%0" : "=r"(p->L));
+			asm volatile("movsg tppr,%0" : "=r"(p->P));
+			p++;
+		}
+
+		/* way 1 */
+		asm volatile("movgs %0,tpxr" :: "r"(1 << TPXR_WAY_SHIFT));
+		for (loop = 0; loop < 64; loop++) {
+			asm volatile("tlbpr %0,gr0,#1,#0" :: "r"(loop << PAGE_SHIFT));
+			asm volatile("movsg tplr,%0" : "=r"(p->L));
+			asm volatile("movsg tppr,%0" : "=r"(p->P));
+			p++;
+		}
+
+		asm volatile("movgs %0,tplr" :: "r"(__debug_mmu.regs.tplr));
+		asm volatile("movgs %0,tppr" :: "r"(__debug_mmu.regs.tppr));
+		asm volatile("movgs %0,tpxr" :: "r"(__debug_mmu.regs.tpxr));
+	} while(0);
+#endif
+
+} /* end gdbstub_get_mmu_state() */
+
+/*****************************************************************************/
+/*
+ * handle event interception and GDB remote protocol processing
+ * - on entry:
+ *	PSR.ET==0, PSR.S==1 and the CPU is in debug mode
+ *	__debug_frame points to the saved registers
+ *	__frame points to the kernel mode exception frame, if it was in kernel
+ *      mode when the break happened
+ */
+void gdbstub(int sigval)
+{
+	unsigned long addr, length, loop, dbar, temp, temp2, temp3;
+	uint32_t zero;
+	char *ptr;
+	int flush_cache = 0;
+
+	LEDS(0x5000);
+
+	if (sigval < 0) {
+#ifndef CONFIG_GDBSTUB_IMMEDIATE
+		/* return immediately if GDB immediate activation option not set */
+		return;
+#else
+		sigval = SIGINT;
+#endif
+	}
+
+	save_user_regs(&__break_user_context);
+
+#if 0
+	gdbstub_printk("--> gdbstub() %08x %p %08x %08x\n",
+		       __debug_frame->pc,
+		       __debug_frame,
+		       __debug_regs->brr,
+		       __debug_regs->bpsr);
+//	gdbstub_show_regs();
+#endif
+
+	LEDS(0x5001);
+
+	/* if we were interrupted by input on the serial gdbstub serial port,
+	 * restore the context prior to the interrupt so that we return to that
+	 * directly
+	 */
+	temp = (unsigned long) __entry_kerneltrap_table;
+	temp2 = (unsigned long) __entry_usertrap_table;
+	temp3 = __debug_frame->pc & ~15;
+
+	if (temp3 == temp + TBR_TT_INTERRUPT_15 ||
+	    temp3 == temp2 + TBR_TT_INTERRUPT_15
+	    ) {
+		asm volatile("movsg pcsr,%0" : "=r"(__debug_frame->pc));
+		__debug_frame->psr |= PSR_ET;
+		__debug_frame->psr &= ~PSR_S;
+		if (__debug_frame->psr & PSR_PS)
+			__debug_frame->psr |= PSR_S;
+		__debug_regs->brr = (__debug_frame->tbr & TBR_TT) << 12;
+		__debug_regs->brr |= BRR_EB;
+		sigval = SIGINT;
+	}
+
+	/* handle the decrement timer going off (FR451 only) */
+	if (temp3 == temp + TBR_TT_DECREMENT_TIMER ||
+	    temp3 == temp2 + TBR_TT_DECREMENT_TIMER
+	    ) {
+		asm volatile("movgs %0,timerd" :: "r"(10000000));
+		asm volatile("movsg pcsr,%0" : "=r"(__debug_frame->pc));
+		__debug_frame->psr |= PSR_ET;
+		__debug_frame->psr &= ~PSR_S;
+		if (__debug_frame->psr & PSR_PS)
+			__debug_frame->psr |= PSR_S;
+		__debug_regs->brr = (__debug_frame->tbr & TBR_TT) << 12;
+		__debug_regs->brr |= BRR_EB;
+		sigval = SIGXCPU;;
+	}
+
+	LEDS(0x5002);
+
+	/* after a BREAK insn, the PC lands on the far side of it */
+	if (__debug_regs->brr & BRR_SB)
+		gdbstub_check_breakpoint();
+
+	LEDS(0x5003);
+
+	/* handle attempts to write console data via GDB "O" commands */
+	if (__debug_frame->pc == (unsigned long) gdbstub_console_write + 4) {
+		__gdbstub_console_write((struct console *) __debug_frame->gr8,
+					(const char *) __debug_frame->gr9,
+					(unsigned) __debug_frame->gr10);
+		goto done;
+	}
+
+	if (gdbstub_rx_unget) {
+		sigval = SIGINT;
+		goto packet_waiting;
+	}
+
+	if (!sigval)
+		sigval = gdbstub_compute_signal(__debug_regs->brr);
+
+	LEDS(0x5004);
+
+	/* send a message to the debugger's user saying what happened if it may
+	 * not be clear cut (we can't map exceptions onto signals properly)
+	 */
+	if (sigval != SIGINT && sigval != SIGTRAP && sigval != SIGILL) {
+		static const char title[] = "Break ";
+		static const char crlf[] = "\r\n";
+		unsigned long brr = __debug_regs->brr;
+		char hx;
+
+		ptr = output_buffer;
+		*ptr++ = 'O';
+		ptr = mem2hex(title, ptr, sizeof(title) - 1,0);
+
+		hx = hexchars[(brr & 0xf0000000) >> 28];
+		*ptr++ = hexchars[hx >> 4];	*ptr++ = hexchars[hx & 0xf];
+		hx = hexchars[(brr & 0x0f000000) >> 24];
+		*ptr++ = hexchars[hx >> 4];	*ptr++ = hexchars[hx & 0xf];
+		hx = hexchars[(brr & 0x00f00000) >> 20];
+		*ptr++ = hexchars[hx >> 4];	*ptr++ = hexchars[hx & 0xf];
+		hx = hexchars[(brr & 0x000f0000) >> 16];
+		*ptr++ = hexchars[hx >> 4];	*ptr++ = hexchars[hx & 0xf];
+		hx = hexchars[(brr & 0x0000f000) >> 12];
+		*ptr++ = hexchars[hx >> 4];	*ptr++ = hexchars[hx & 0xf];
+		hx = hexchars[(brr & 0x00000f00) >> 8];
+		*ptr++ = hexchars[hx >> 4];	*ptr++ = hexchars[hx & 0xf];
+		hx = hexchars[(brr & 0x000000f0) >> 4];
+		*ptr++ = hexchars[hx >> 4];	*ptr++ = hexchars[hx & 0xf];
+		hx = hexchars[(brr & 0x0000000f)];
+		*ptr++ = hexchars[hx >> 4];	*ptr++ = hexchars[hx & 0xf];
+
+		ptr = mem2hex(crlf, ptr, sizeof(crlf) - 1, 0);
+		*ptr = 0;
+		gdbstub_send_packet(output_buffer);	/* send it off... */
+	}
+
+	LEDS(0x5005);
+
+	/* tell the debugger that an exception has occurred */
+	ptr = output_buffer;
+
+	/* Send trap type (converted to signal) */
+	*ptr++ = 'T';
+	*ptr++ = hexchars[sigval >> 4];
+	*ptr++ = hexchars[sigval & 0xf];
+
+	/* Send Error PC */
+	*ptr++ = hexchars[GDB_REG_PC >> 4];
+	*ptr++ = hexchars[GDB_REG_PC & 0xf];
+	*ptr++ = ':';
+	ptr = mem2hex(&__debug_frame->pc, ptr, 4, 0);
+	*ptr++ = ';';
+
+	/*
+	 * Send frame pointer
+	 */
+	*ptr++ = hexchars[GDB_REG_FP >> 4];
+	*ptr++ = hexchars[GDB_REG_FP & 0xf];
+	*ptr++ = ':';
+	ptr = mem2hex(&__debug_frame->fp, ptr, 4, 0);
+	*ptr++ = ';';
+
+	/*
+	 * Send stack pointer
+	 */
+	*ptr++ = hexchars[GDB_REG_SP >> 4];
+	*ptr++ = hexchars[GDB_REG_SP & 0xf];
+	*ptr++ = ':';
+	ptr = mem2hex(&__debug_frame->sp, ptr, 4, 0);
+	*ptr++ = ';';
+
+	*ptr++ = 0;
+	gdbstub_send_packet(output_buffer);	/* send it off... */
+
+	LEDS(0x5006);
+
+ packet_waiting:
+	gdbstub_get_mmu_state();
+
+	/* wait for input from remote GDB */
+	while (1) {
+		output_buffer[0] = 0;
+
+		LEDS(0x5007);
+		gdbstub_recv_packet(input_buffer);
+		LEDS(0x5600 | input_buffer[0]);
+
+		switch (input_buffer[0]) {
+			/* request repeat of last signal number */
+		case '?':
+			output_buffer[0] = 'S';
+			output_buffer[1] = hexchars[sigval >> 4];
+			output_buffer[2] = hexchars[sigval & 0xf];
+			output_buffer[3] = 0;
+			break;
+
+		case 'd':
+			/* toggle debug flag */
+			break;
+
+			/* return the value of the CPU registers
+			 * - GR0,  GR1,  GR2,  GR3,  GR4,  GR5,  GR6,  GR7,
+			 * - GR8,  GR9,  GR10, GR11, GR12, GR13, GR14, GR15,
+			 * - GR16, GR17, GR18, GR19, GR20, GR21, GR22, GR23,
+			 * - GR24, GR25, GR26, GR27, GR28, GR29, GR30, GR31,
+			 * - GR32, GR33, GR34, GR35, GR36, GR37, GR38, GR39,
+			 * - GR40, GR41, GR42, GR43, GR44, GR45, GR46, GR47,
+			 * - GR48, GR49, GR50, GR51, GR52, GR53, GR54, GR55,
+			 * - GR56, GR57, GR58, GR59, GR60, GR61, GR62, GR63,
+			 * - FP0,  FP1,  FP2,  FP3,  FP4,  FP5,  FP6,  FP7,
+			 * - FP8,  FP9,  FP10, FP11, FP12, FP13, FP14, FP15,
+			 * - FP16, FP17, FP18, FP19, FP20, FP21, FP22, FP23,
+			 * - FP24, FP25, FP26, FP27, FP28, FP29, FP30, FP31,
+			 * - FP32, FP33, FP34, FP35, FP36, FP37, FP38, FP39,
+			 * - FP40, FP41, FP42, FP43, FP44, FP45, FP46, FP47,
+			 * - FP48, FP49, FP50, FP51, FP52, FP53, FP54, FP55,
+			 * - FP56, FP57, FP58, FP59, FP60, FP61, FP62, FP63,
+			 * - PC, PSR, CCR, CCCR,
+			 * - _X132, _X133, _X134
+			 * - TBR, BRR, DBAR0, DBAR1, DBAR2, DBAR3,
+			 * - _X141, _X142, _X143, _X144,
+			 * - LR, LCR
+			 */
+		case 'g':
+			zero = 0;
+			ptr = output_buffer;
+
+			/* deal with GR0, GR1-GR27, GR28-GR31, GR32-GR63 */
+			ptr = mem2hex(&zero, ptr, 4, 0);
+
+			for (loop = 1; loop <= 27; loop++)
+				ptr = mem2hex((unsigned long *)__debug_frame + REG_GR(loop),
+					      ptr, 4, 0);
+			temp = (unsigned long) __frame;
+			ptr = mem2hex(&temp, ptr, 4, 0);
+			ptr = mem2hex((unsigned long *)__debug_frame + REG_GR(29), ptr, 4, 0);
+			ptr = mem2hex((unsigned long *)__debug_frame + REG_GR(30), ptr, 4, 0);
+#ifdef CONFIG_MMU
+			ptr = mem2hex((unsigned long *)__debug_frame + REG_GR(31), ptr, 4, 0);
+#else
+			temp = (unsigned long) __debug_frame;
+			ptr = mem2hex(&temp, ptr, 4, 0);
+#endif
+
+			for (loop = 32; loop <= 63; loop++)
+				ptr = mem2hex((unsigned long *)__debug_frame + REG_GR(loop),
+					      ptr, 4, 0);
+
+			/* deal with FR0-FR63 */
+			for (loop = 0; loop <= 63; loop++)
+				ptr = mem2hex((unsigned long *)&__break_user_context +
+					      __FPMEDIA_FR(loop),
+					      ptr, 4, 0);
+
+			/* deal with special registers */
+			ptr = mem2hex(&__debug_frame->pc,    ptr, 4, 0);
+			ptr = mem2hex(&__debug_frame->psr,   ptr, 4, 0);
+			ptr = mem2hex(&__debug_frame->ccr,   ptr, 4, 0);
+			ptr = mem2hex(&__debug_frame->cccr,  ptr, 4, 0);
+			ptr = mem2hex(&zero, ptr, 4, 0);
+			ptr = mem2hex(&zero, ptr, 4, 0);
+			ptr = mem2hex(&zero, ptr, 4, 0);
+			ptr = mem2hex(&__debug_frame->tbr,   ptr, 4, 0);
+			ptr = mem2hex(&__debug_regs->brr ,   ptr, 4, 0);
+
+			asm volatile("movsg dbar0,%0" : "=r"(dbar));
+			ptr = mem2hex(&dbar, ptr, 4, 0);
+			asm volatile("movsg dbar1,%0" : "=r"(dbar));
+			ptr = mem2hex(&dbar, ptr, 4, 0);
+			asm volatile("movsg dbar2,%0" : "=r"(dbar));
+			ptr = mem2hex(&dbar, ptr, 4, 0);
+			asm volatile("movsg dbar3,%0" : "=r"(dbar));
+			ptr = mem2hex(&dbar, ptr, 4, 0);
+
+			asm volatile("movsg scr0,%0" : "=r"(dbar));
+			ptr = mem2hex(&dbar, ptr, 4, 0);
+			asm volatile("movsg scr1,%0" : "=r"(dbar));
+			ptr = mem2hex(&dbar, ptr, 4, 0);
+			asm volatile("movsg scr2,%0" : "=r"(dbar));
+			ptr = mem2hex(&dbar, ptr, 4, 0);
+			asm volatile("movsg scr3,%0" : "=r"(dbar));
+			ptr = mem2hex(&dbar, ptr, 4, 0);
+
+			ptr = mem2hex(&__debug_frame->lr, ptr, 4, 0);
+			ptr = mem2hex(&__debug_frame->lcr, ptr, 4, 0);
+
+			ptr = mem2hex(&__debug_frame->iacc0, ptr, 8, 0);
+
+			ptr = mem2hex(&__break_user_context.f.fsr[0], ptr, 4, 0);
+
+			for (loop = 0; loop <= 7; loop++)
+				ptr = mem2hex(&__break_user_context.f.acc[loop], ptr, 4, 0);
+
+			ptr = mem2hex(&__break_user_context.f.accg, ptr, 8, 0);
+
+			for (loop = 0; loop <= 1; loop++)
+				ptr = mem2hex(&__break_user_context.f.msr[loop], ptr, 4, 0);
+
+			ptr = mem2hex(&__debug_frame->gner0, ptr, 4, 0);
+			ptr = mem2hex(&__debug_frame->gner1, ptr, 4, 0);
+
+			ptr = mem2hex(&__break_user_context.f.fner[0], ptr, 4, 0);
+			ptr = mem2hex(&__break_user_context.f.fner[1], ptr, 4, 0);
+
+			break;
+
+			/* set the values of the CPU registers */
+		case 'G':
+			ptr = &input_buffer[1];
+
+			/* deal with GR0, GR1-GR27, GR28-GR31, GR32-GR63 */
+			ptr = hex2mem(ptr, &temp, 4);
+
+			for (loop = 1; loop <= 27; loop++)
+				ptr = hex2mem(ptr, (unsigned long *)__debug_frame + REG_GR(loop),
+					      4);
+
+			ptr = hex2mem(ptr, &temp, 4);
+			__frame = (struct pt_regs *) temp;
+			ptr = hex2mem(ptr, &__debug_frame->gr29, 4);
+			ptr = hex2mem(ptr, &__debug_frame->gr30, 4);
+#ifdef CONFIG_MMU
+			ptr = hex2mem(ptr, &__debug_frame->gr31, 4);
+#else
+			ptr = hex2mem(ptr, &temp, 4);
+#endif
+
+			for (loop = 32; loop <= 63; loop++)
+				ptr = hex2mem(ptr, (unsigned long *)__debug_frame + REG_GR(loop),
+					      4);
+
+			/* deal with FR0-FR63 */
+			for (loop = 0; loop <= 63; loop++)
+				ptr = mem2hex((unsigned long *)&__break_user_context +
+					      __FPMEDIA_FR(loop),
+					      ptr, 4, 0);
+
+			/* deal with special registers */
+			ptr = hex2mem(ptr, &__debug_frame->pc,  4);
+			ptr = hex2mem(ptr, &__debug_frame->psr, 4);
+			ptr = hex2mem(ptr, &__debug_frame->ccr, 4);
+			ptr = hex2mem(ptr, &__debug_frame->cccr,4);
+
+			for (loop = 132; loop <= 140; loop++)
+				ptr = hex2mem(ptr, &temp, 4);
+
+			ptr = hex2mem(ptr, &temp, 4);
+			asm volatile("movgs %0,scr0" :: "r"(temp));
+			ptr = hex2mem(ptr, &temp, 4);
+			asm volatile("movgs %0,scr1" :: "r"(temp));
+			ptr = hex2mem(ptr, &temp, 4);
+			asm volatile("movgs %0,scr2" :: "r"(temp));
+			ptr = hex2mem(ptr, &temp, 4);
+			asm volatile("movgs %0,scr3" :: "r"(temp));
+
+			ptr = hex2mem(ptr, &__debug_frame->lr,  4);
+			ptr = hex2mem(ptr, &__debug_frame->lcr, 4);
+
+			ptr = hex2mem(ptr, &__debug_frame->iacc0, 8);
+
+			ptr = hex2mem(ptr, &__break_user_context.f.fsr[0], 4);
+
+			for (loop = 0; loop <= 7; loop++)
+				ptr = hex2mem(ptr, &__break_user_context.f.acc[loop], 4);
+
+			ptr = hex2mem(ptr, &__break_user_context.f.accg, 8);
+
+			for (loop = 0; loop <= 1; loop++)
+				ptr = hex2mem(ptr, &__break_user_context.f.msr[loop], 4);
+
+			ptr = hex2mem(ptr, &__debug_frame->gner0, 4);
+			ptr = hex2mem(ptr, &__debug_frame->gner1, 4);
+
+			ptr = hex2mem(ptr, &__break_user_context.f.fner[0], 4);
+			ptr = hex2mem(ptr, &__break_user_context.f.fner[1], 4);
+
+			gdbstub_strcpy(output_buffer,"OK");
+			break;
+
+			/* mAA..AA,LLLL  Read LLLL bytes at address AA..AA */
+		case 'm':
+			ptr = &input_buffer[1];
+
+			if (hexToInt(&ptr, &addr) &&
+			    *ptr++ == ',' &&
+			    hexToInt(&ptr, &length)
+			    ) {
+				if (mem2hex((char *)addr, output_buffer, length, 1))
+					break;
+				gdbstub_strcpy (output_buffer, "E03");
+			}
+			else {
+				gdbstub_strcpy(output_buffer,"E01");
+			}
+			break;
+
+			/* MAA..AA,LLLL: Write LLLL bytes at address AA.AA return OK */
+		case 'M':
+			ptr = &input_buffer[1];
+
+			if (hexToInt(&ptr, &addr) &&
+			    *ptr++ == ',' &&
+			    hexToInt(&ptr, &length) &&
+			    *ptr++ == ':'
+			    ) {
+				if (hex2mem(ptr, (char *)addr, length)) {
+					gdbstub_strcpy(output_buffer, "OK");
+				}
+				else {
+					gdbstub_strcpy(output_buffer, "E03");
+				}
+			}
+			else
+				gdbstub_strcpy(output_buffer, "E02");
+
+			flush_cache = 1;
+			break;
+
+			/* PNN,=RRRRRRRR: Write value R to reg N return OK */
+		case 'P':
+			ptr = &input_buffer[1];
+
+			if (!hexToInt(&ptr, &addr) ||
+			    *ptr++ != '=' ||
+			    !hexToInt(&ptr, &temp)
+			    ) {
+				gdbstub_strcpy(output_buffer, "E01");
+				break;
+			}
+
+			temp2 = 1;
+			switch (addr) {
+			case GDB_REG_GR(0):
+				break;
+			case GDB_REG_GR(1) ... GDB_REG_GR(63):
+				__break_user_context.i.gr[addr - GDB_REG_GR(0)] = temp;
+				break;
+			case GDB_REG_FR(0) ... GDB_REG_FR(63):
+				__break_user_context.f.fr[addr - GDB_REG_FR(0)] = temp;
+				break;
+			case GDB_REG_PC:
+				__break_user_context.i.pc = temp;
+				break;
+			case GDB_REG_PSR:
+				__break_user_context.i.psr = temp;
+				break;
+			case GDB_REG_CCR:
+				__break_user_context.i.ccr = temp;
+				break;
+			case GDB_REG_CCCR:
+				__break_user_context.i.cccr = temp;
+				break;
+			case GDB_REG_BRR:
+				__debug_regs->brr = temp;
+				break;
+			case GDB_REG_LR:
+				__break_user_context.i.lr = temp;
+				break;
+			case GDB_REG_LCR:
+				__break_user_context.i.lcr = temp;
+				break;
+			case GDB_REG_FSR0:
+				__break_user_context.f.fsr[0] = temp;
+				break;
+			case GDB_REG_ACC(0) ... GDB_REG_ACC(7):
+				__break_user_context.f.acc[addr - GDB_REG_ACC(0)] = temp;
+				break;
+			case GDB_REG_ACCG(0):
+				*(uint32_t *) &__break_user_context.f.accg[0] = temp;
+				break;
+			case GDB_REG_ACCG(4):
+				*(uint32_t *) &__break_user_context.f.accg[4] = temp;
+				break;
+			case GDB_REG_MSR(0) ... GDB_REG_MSR(1):
+				__break_user_context.f.msr[addr - GDB_REG_MSR(0)] = temp;
+				break;
+			case GDB_REG_GNER(0) ... GDB_REG_GNER(1):
+				__break_user_context.i.gner[addr - GDB_REG_GNER(0)] = temp;
+				break;
+			case GDB_REG_FNER(0) ... GDB_REG_FNER(1):
+				__break_user_context.f.fner[addr - GDB_REG_FNER(0)] = temp;
+				break;
+			default:
+				temp2 = 0;
+				break;
+			}
+
+			if (temp2) {
+				gdbstub_strcpy(output_buffer, "OK");
+			}
+			else {
+				gdbstub_strcpy(output_buffer, "E02");
+			}
+			break;
+
+			/* cAA..AA    Continue at address AA..AA(optional) */
+		case 'c':
+			/* try to read optional parameter, pc unchanged if no parm */
+			ptr = &input_buffer[1];
+			if (hexToInt(&ptr, &addr))
+				__debug_frame->pc = addr;
+			goto done;
+
+			/* kill the program */
+		case 'k' :
+			goto done;	/* just continue */
+
+
+			/* reset the whole machine (FIXME: system dependent) */
+		case 'r':
+			break;
+
+
+			/* step to next instruction */
+		case 's':
+			__debug_regs->dcr |= DCR_SE;
+			goto done;
+
+			/* set baud rate (bBB) */
+		case 'b':
+			ptr = &input_buffer[1];
+			if (!hexToInt(&ptr, &temp)) {
+				gdbstub_strcpy(output_buffer,"B01");
+				break;
+			}
+
+			if (temp) {
+				/* ack before changing speed */
+				gdbstub_send_packet("OK");
+				gdbstub_set_baud(temp);
+			}
+			break;
+
+			/* set breakpoint */
+		case 'Z':
+			ptr = &input_buffer[1];
+
+			if (!hexToInt(&ptr,&temp) || *ptr++ != ',' ||
+			    !hexToInt(&ptr,&addr) || *ptr++ != ',' ||
+			    !hexToInt(&ptr,&length)
+			    ) {
+				gdbstub_strcpy(output_buffer,"E01");
+				break;
+			}
+
+			if (temp >= 5) {
+				gdbstub_strcpy(output_buffer,"E03");
+				break;
+			}
+
+			if (gdbstub_set_breakpoint(temp, addr, length) < 0) {
+				gdbstub_strcpy(output_buffer,"E03");
+				break;
+			}
+
+			if (temp == 0)
+				flush_cache = 1; /* soft bkpt by modified memory */
+
+			gdbstub_strcpy(output_buffer,"OK");
+			break;
+
+			/* clear breakpoint */
+		case 'z':
+			ptr = &input_buffer[1];
+
+			if (!hexToInt(&ptr,&temp) || *ptr++ != ',' ||
+			    !hexToInt(&ptr,&addr) || *ptr++ != ',' ||
+			    !hexToInt(&ptr,&length)
+			    ) {
+				gdbstub_strcpy(output_buffer,"E01");
+				break;
+			}
+
+			if (temp >= 5) {
+				gdbstub_strcpy(output_buffer,"E03");
+				break;
+			}
+
+			if (gdbstub_clear_breakpoint(temp, addr, length) < 0) {
+				gdbstub_strcpy(output_buffer,"E03");
+				break;
+			}
+
+			if (temp == 0)
+				flush_cache = 1; /* soft bkpt by modified memory */
+
+			gdbstub_strcpy(output_buffer,"OK");
+			break;
+
+		default:
+			gdbstub_proto("### GDB Unsupported Cmd '%s'\n",input_buffer);
+			break;
+		}
+
+		/* reply to the request */
+		LEDS(0x5009);
+		gdbstub_send_packet(output_buffer);
+	}
+
+ done:
+	restore_user_regs(&__break_user_context);
+
+	//gdbstub_dump_debugregs();
+	//gdbstub_printk("<-- gdbstub() %08x\n", __debug_frame->pc);
+
+	/* need to flush the instruction cache before resuming, as we may have
+	 * deposited a breakpoint, and the icache probably has no way of
+	 * knowing that a data ref to some location may have changed something
+	 * that is in the instruction cache.  NB: We flush both caches, just to
+	 * be sure...
+	 */
+
+	/* note: flushing the icache will clobber EAR0 on the FR451 */
+	if (flush_cache)
+		gdbstub_purge_cache();
+
+	LEDS(0x5666);
+
+} /* end gdbstub() */
+
+/*****************************************************************************/
+/*
+ * initialise the GDB stub
+ */
+void __init gdbstub_init(void)
+{
+#ifdef CONFIG_GDBSTUB_IMMEDIATE
+	unsigned char ch;
+	int ret;
+#endif
+
+	gdbstub_printk("%s", gdbstub_banner);
+	gdbstub_printk("DCR: %x\n", __debug_regs->dcr);
+
+	gdbstub_io_init();
+
+	/* try to talk to GDB (or anyone insane enough to want to type GDB protocol by hand) */
+	gdbstub_proto("### GDB Tx ACK\n");
+	gdbstub_tx_char('+'); /* 'hello world' */
+
+#ifdef CONFIG_GDBSTUB_IMMEDIATE
+	gdbstub_printk("GDB Stub waiting for packet\n");
+
+	/*
+	 * In case GDB is started before us, ack any packets
+	 * (presumably "$?#xx") sitting there.
+	 */
+	do { gdbstub_rx_char(&ch, 0); } while (ch != '$');
+	do { gdbstub_rx_char(&ch, 0); } while (ch != '#');
+	do { ret = gdbstub_rx_char(&ch, 0); } while (ret != 0); /* eat first csum byte */
+	do { ret = gdbstub_rx_char(&ch, 0); } while (ret != 0); /* eat second csum byte */
+
+	gdbstub_proto("### GDB Tx NAK\n");
+	gdbstub_tx_char('-'); /* nak it */
+
+#else
+	gdbstub_printk("GDB Stub set\n");
+#endif
+
+#if 0
+	/* send banner */
+	ptr = output_buffer;
+	*ptr++ = 'O';
+	ptr = mem2hex(gdbstub_banner, ptr, sizeof(gdbstub_banner) - 1, 0);
+	gdbstub_send_packet(output_buffer);
+#endif
+#if defined(CONFIG_GDBSTUB_CONSOLE) && defined(CONFIG_GDBSTUB_IMMEDIATE)
+	register_console(&gdbstub_console);
+#endif
+
+} /* end gdbstub_init() */
+
+/*****************************************************************************/
+/*
+ * register the console at a more appropriate time
+ */
+#if defined (CONFIG_GDBSTUB_CONSOLE) && !defined(CONFIG_GDBSTUB_IMMEDIATE)
+static int __init gdbstub_postinit(void)
+{
+	printk("registering console\n");
+	register_console(&gdbstub_console);
+	return 0;
+} /* end gdbstub_postinit() */
+
+__initcall(gdbstub_postinit);
+#endif
+
+/*****************************************************************************/
+/*
+ * send an exit message to GDB
+ */
+void gdbstub_exit(int status)
+{
+	unsigned char checksum;
+	int count;
+	unsigned char ch;
+
+	sprintf(output_buffer,"W%02x",status&0xff);
+
+	gdbstub_tx_char('$');
+	checksum = 0;
+	count = 0;
+
+	while ((ch = output_buffer[count]) != 0) {
+		gdbstub_tx_char(ch);
+		checksum += ch;
+		count += 1;
+	}
+
+	gdbstub_tx_char('#');
+	gdbstub_tx_char(hexchars[checksum >> 4]);
+	gdbstub_tx_char(hexchars[checksum & 0xf]);
+
+	/* make sure the output is flushed, or else RedBoot might clobber it */
+	gdbstub_tx_char('-');
+	gdbstub_tx_flush();
+
+} /* end gdbstub_exit() */
+
+/*****************************************************************************/
+/*
+ * GDB wants to call malloc() and free() to allocate memory for calling kernel
+ * functions directly from its command line
+ */
+static void *malloc(size_t size) __attribute__((unused));
+static void *malloc(size_t size)
+{
+	return kmalloc(size, GFP_ATOMIC);
+}
+
+static void free(void *p) __attribute__((unused));
+static void free(void *p)
+{
+	kfree(p);
+}
+
+static uint32_t ___get_HSR0(void) __attribute__((unused));
+static uint32_t ___get_HSR0(void)
+{
+	return __get_HSR(0);
+}
+
+static uint32_t ___set_HSR0(uint32_t x) __attribute__((unused));
+static uint32_t ___set_HSR0(uint32_t x)
+{
+	__set_HSR(0, x);
+	return __get_HSR(0);
+}
diff -Nru a/arch/frv/kernel/head-mmu-fr451.S b/arch/frv/kernel/head-mmu-fr451.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/kernel/head-mmu-fr451.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,374 @@
+/* head-mmu-fr451.S: FR451 mmu-linux specific bits of initialisation
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/config.h>
+#include <linux/threads.h>
+#include <linux/linkage.h>
+#include <asm/ptrace.h>
+#include <asm/page.h>
+#include <asm/mem-layout.h>
+#include <asm/spr-regs.h>
+#include <asm/mb86943a.h>
+#include "head.inc"
+
+
+#define __400_DBR0	0xfe000e00
+#define __400_DBR1	0xfe000e08
+#define __400_DBR2	0xfe000e10
+#define __400_DBR3	0xfe000e18
+#define __400_DAM0	0xfe000f00
+#define __400_DAM1	0xfe000f08
+#define __400_DAM2	0xfe000f10
+#define __400_DAM3	0xfe000f18
+#define __400_LGCR	0xfe000010
+#define __400_LCR	0xfe000100
+#define __400_LSBR	0xfe000c00
+
+	.section	.text.init,"ax"
+	.balign		4
+
+###############################################################################
+#
+# describe the position and layout of the SDRAM controller registers
+#
+#	ENTRY:			EXIT:
+# GR5	-			cacheline size
+# GR11	-			displacement of 2nd SDRAM addr reg from GR14
+# GR12	-			displacement of 3rd SDRAM addr reg from GR14
+# GR13	-			displacement of 4th SDRAM addr reg from GR14
+# GR14	-			address of 1st SDRAM addr reg
+# GR15	-			amount to shift address by to match SDRAM addr reg
+# GR26	&__head_reference	[saved]
+# GR30	LED address		[saved]
+# CC0	-			T if DBR0 is present
+# CC1	-			T if DBR1 is present
+# CC2	-			T if DBR2 is present
+# CC3	-			T if DBR3 is present
+#
+###############################################################################
+	.globl		__head_fr451_describe_sdram
+__head_fr451_describe_sdram:
+	sethi.p		%hi(__400_DBR0),gr14
+	setlo		%lo(__400_DBR0),gr14
+	setlos.p	#__400_DBR1-__400_DBR0,gr11
+	setlos		#__400_DBR2-__400_DBR0,gr12
+	setlos.p	#__400_DBR3-__400_DBR0,gr13
+	setlos		#32,gr5			; cacheline size
+	setlos.p	#0,gr15			; amount to shift addr reg by
+	setlos		#0x00ff,gr4
+	movgs		gr4,cccr		; extant DARS/DAMK regs
+	bralr
+
+###############################################################################
+#
+# rearrange the bus controller registers
+#
+#	ENTRY:			EXIT:
+# GR26	&__head_reference	[saved]
+# GR30	LED address		revised LED address
+#
+###############################################################################
+	.globl		__head_fr451_set_busctl
+__head_fr451_set_busctl:
+	sethi.p		%hi(__400_LGCR),gr4
+	setlo		%lo(__400_LGCR),gr4
+	sethi.p		%hi(__400_LSBR),gr10
+	setlo		%lo(__400_LSBR),gr10
+	sethi.p		%hi(__400_LCR),gr11
+	setlo		%lo(__400_LCR),gr11
+
+	# set the bus controller
+	ldi		@(gr4,#0),gr5
+	ori		gr5,#0xff,gr5		; make sure all chip-selects are enabled
+	sti		gr5,@(gr4,#0)
+
+	sethi.p		%hi(__region_CS1),gr4
+	setlo		%lo(__region_CS1),gr4
+	sethi.p		%hi(__region_CS1_M),gr5
+	setlo		%lo(__region_CS1_M),gr5
+	sethi.p		%hi(__region_CS1_C),gr6
+	setlo		%lo(__region_CS1_C),gr6
+	sti		gr4,@(gr10,#1*0x08)
+	sti		gr5,@(gr10,#1*0x08+0x100)
+	sti		gr6,@(gr11,#1*0x08)
+	sethi.p		%hi(__region_CS2),gr4
+	setlo		%lo(__region_CS2),gr4
+	sethi.p		%hi(__region_CS2_M),gr5
+	setlo		%lo(__region_CS2_M),gr5
+	sethi.p		%hi(__region_CS2_C),gr6
+	setlo		%lo(__region_CS2_C),gr6
+	sti		gr4,@(gr10,#2*0x08)
+	sti		gr5,@(gr10,#2*0x08+0x100)
+	sti		gr6,@(gr11,#2*0x08)
+	sethi.p		%hi(__region_CS3),gr4
+	setlo		%lo(__region_CS3),gr4
+	sethi.p		%hi(__region_CS3_M),gr5
+	setlo		%lo(__region_CS3_M),gr5
+	sethi.p		%hi(__region_CS3_C),gr6
+	setlo		%lo(__region_CS3_C),gr6
+	sti		gr4,@(gr10,#3*0x08)
+	sti		gr5,@(gr10,#3*0x08+0x100)
+	sti		gr6,@(gr11,#3*0x08)
+	sethi.p		%hi(__region_CS4),gr4
+	setlo		%lo(__region_CS4),gr4
+	sethi.p		%hi(__region_CS4_M),gr5
+	setlo		%lo(__region_CS4_M),gr5
+	sethi.p		%hi(__region_CS4_C),gr6
+	setlo		%lo(__region_CS4_C),gr6
+	sti		gr4,@(gr10,#4*0x08)
+	sti		gr5,@(gr10,#4*0x08+0x100)
+	sti		gr6,@(gr11,#4*0x08)
+	sethi.p		%hi(__region_CS5),gr4
+	setlo		%lo(__region_CS5),gr4
+	sethi.p		%hi(__region_CS5_M),gr5
+	setlo		%lo(__region_CS5_M),gr5
+	sethi.p		%hi(__region_CS5_C),gr6
+	setlo		%lo(__region_CS5_C),gr6
+	sti		gr4,@(gr10,#5*0x08)
+	sti		gr5,@(gr10,#5*0x08+0x100)
+	sti		gr6,@(gr11,#5*0x08)
+	sethi.p		%hi(__region_CS6),gr4
+	setlo		%lo(__region_CS6),gr4
+	sethi.p		%hi(__region_CS6_M),gr5
+	setlo		%lo(__region_CS6_M),gr5
+	sethi.p		%hi(__region_CS6_C),gr6
+	setlo		%lo(__region_CS6_C),gr6
+	sti		gr4,@(gr10,#6*0x08)
+	sti		gr5,@(gr10,#6*0x08+0x100)
+	sti		gr6,@(gr11,#6*0x08)
+	sethi.p		%hi(__region_CS7),gr4
+	setlo		%lo(__region_CS7),gr4
+	sethi.p		%hi(__region_CS7_M),gr5
+	setlo		%lo(__region_CS7_M),gr5
+	sethi.p		%hi(__region_CS7_C),gr6
+	setlo		%lo(__region_CS7_C),gr6
+	sti		gr4,@(gr10,#7*0x08)
+	sti		gr5,@(gr10,#7*0x08+0x100)
+	sti		gr6,@(gr11,#7*0x08)
+	membar
+	bar
+
+	# adjust LED bank address
+#ifdef CONFIG_MB93091_VDK
+	sethi.p		%hi(__region_CS2 + 0x01200004),gr30
+	setlo		%lo(__region_CS2 + 0x01200004),gr30
+#endif
+	bralr
+
+###############################################################################
+#
+# determine the total SDRAM size
+#
+#	ENTRY:			EXIT:
+# GR25	-			SDRAM size
+# GR26	&__head_reference	[saved]
+# GR30	LED address		[saved]
+#
+###############################################################################
+	.globl		__head_fr451_survey_sdram
+__head_fr451_survey_sdram:
+	sethi.p		%hi(__400_DAM0),gr11
+	setlo		%lo(__400_DAM0),gr11
+	sethi.p		%hi(__400_DBR0),gr12
+	setlo		%lo(__400_DBR0),gr12
+
+	sethi.p		%hi(0xfe000000),gr17		; unused SDRAM DBR value
+	setlo		%lo(0xfe000000),gr17
+	setlos		#0,gr25
+
+	ldi		@(gr12,#0x00),gr4		; DAR0
+	subcc		gr4,gr17,gr0,icc0
+	beq		icc0,#0,__head_no_DCS0
+	ldi		@(gr11,#0x00),gr6		; DAM0: bits 31:20 match addr 31:20
+	add		gr25,gr6,gr25
+	addi		gr25,#1,gr25
+__head_no_DCS0:
+
+	ldi		@(gr12,#0x08),gr4		; DAR1
+	subcc		gr4,gr17,gr0,icc0
+	beq		icc0,#0,__head_no_DCS1
+	ldi		@(gr11,#0x08),gr6		; DAM1: bits 31:20 match addr 31:20
+	add		gr25,gr6,gr25
+	addi		gr25,#1,gr25
+__head_no_DCS1:
+
+	ldi		@(gr12,#0x10),gr4		; DAR2
+	subcc		gr4,gr17,gr0,icc0
+	beq		icc0,#0,__head_no_DCS2
+	ldi		@(gr11,#0x10),gr6		; DAM2: bits 31:20 match addr 31:20
+	add		gr25,gr6,gr25
+	addi		gr25,#1,gr25
+__head_no_DCS2:
+
+	ldi		@(gr12,#0x18),gr4		; DAR3
+	subcc		gr4,gr17,gr0,icc0
+	beq		icc0,#0,__head_no_DCS3
+	ldi		@(gr11,#0x18),gr6		; DAM3: bits 31:20 match addr 31:20
+	add		gr25,gr6,gr25
+	addi		gr25,#1,gr25
+__head_no_DCS3:
+	bralr
+
+###############################################################################
+#
+# set the protection map with the I/DAMPR registers
+#
+#	ENTRY:			EXIT:
+# GR25	SDRAM size		[saved]
+# GR26	&__head_reference	[saved]
+# GR30	LED address		[saved]
+#
+#
+# Using this map:
+#	REGISTERS	ADDRESS RANGE		VIEW
+#	===============	======================	===============================
+#	IAMPR0/DAMPR0	0xC0000000-0xCFFFFFFF	Cached kernel RAM Window
+#	DAMPR11		0xE0000000-0xFFFFFFFF	Uncached I/O
+#
+###############################################################################
+	.globl		__head_fr451_set_protection
+__head_fr451_set_protection:
+	movsg		lr,gr27
+
+	# set the I/O region protection registers for FR451 in MMU mode
+#define PGPROT_IO	xAMPRx_L|xAMPRx_M|xAMPRx_S_KERNEL|xAMPRx_C|xAMPRx_V
+
+	sethi.p		%hi(__region_IO),gr5
+	setlo		%lo(__region_IO),gr5
+	setlos		#PGPROT_IO|xAMPRx_SS_512Mb,gr4
+	or		gr4,gr5,gr4
+	movgs		gr5,damlr11			; General I/O tile
+	movgs		gr4,dampr11
+
+	# need to open a window onto at least part of the RAM for the kernel's use
+	sethi.p		%hi(__sdram_base),gr8
+	setlo		%lo(__sdram_base),gr8		; physical address
+	sethi.p		%hi(__page_offset),gr9
+	setlo		%lo(__page_offset),gr9		; virtual address
+
+	setlos		#xAMPRx_L|xAMPRx_M|xAMPRx_SS_256Mb|xAMPRx_S_KERNEL|xAMPRx_V,gr11
+	or		gr8,gr11,gr8
+
+	movgs		gr9,iamlr0			; mapped from real address 0
+	movgs		gr8,iampr0			; cached kernel memory at 0xC0000000
+	movgs		gr9,damlr0
+	movgs		gr8,dampr0
+
+	# set a temporary mapping for the kernel running at address 0 until we've turned on the MMU
+	sethi.p		%hi(__sdram_base),gr9
+	setlo		%lo(__sdram_base),gr9		; virtual address
+
+	and.p		gr4,gr11,gr4
+	and		gr5,gr11,gr5
+	or.p		gr4,gr11,gr4
+	or		gr5,gr11,gr5
+
+	movgs		gr9,iamlr1			; mapped from real address 0
+	movgs		gr8,iampr1			; cached kernel memory at 0x00000000
+	movgs		gr9,damlr1
+	movgs		gr8,dampr1
+
+	# we use DAMR2-10 for kmap_atomic(), cache flush and TLB management
+	# since the DAMLR regs are not going to change, we can set them now
+	# also set up IAMLR2 to the same as DAMLR5
+	sethi.p		%hi(KMAP_ATOMIC_PRIMARY_FRAME),gr4
+	setlo		%lo(KMAP_ATOMIC_PRIMARY_FRAME),gr4
+	sethi.p		%hi(PAGE_SIZE),gr5
+	setlo		%lo(PAGE_SIZE),gr5
+
+	movgs		gr4,damlr2
+	movgs		gr4,iamlr2
+	add		gr4,gr5,gr4
+	movgs		gr4,damlr3
+	add		gr4,gr5,gr4
+	movgs		gr4,damlr4
+	add		gr4,gr5,gr4
+	movgs		gr4,damlr5
+	add		gr4,gr5,gr4
+	movgs		gr4,damlr6
+	add		gr4,gr5,gr4
+	movgs		gr4,damlr7
+	add		gr4,gr5,gr4
+	movgs		gr4,damlr8
+	add		gr4,gr5,gr4
+	movgs		gr4,damlr9
+	add		gr4,gr5,gr4
+	movgs		gr4,damlr10
+
+	movgs		gr0,dampr2
+	movgs		gr0,dampr4
+	movgs		gr0,dampr5
+	movgs		gr0,dampr6
+	movgs		gr0,dampr7
+	movgs		gr0,dampr8
+	movgs		gr0,dampr9
+	movgs		gr0,dampr10
+
+	movgs		gr0,iamlr3
+	movgs		gr0,iamlr4
+	movgs		gr0,iamlr5
+	movgs		gr0,iamlr6
+	movgs		gr0,iamlr7
+
+	movgs		gr0,iampr2
+	movgs		gr0,iampr3
+	movgs		gr0,iampr4
+	movgs		gr0,iampr5
+	movgs		gr0,iampr6
+	movgs		gr0,iampr7
+
+	# start in TLB context 0 with the swapper's page tables
+	movgs		gr0,cxnr
+
+	sethi.p		%hi(swapper_pg_dir),gr4
+	setlo		%lo(swapper_pg_dir),gr4
+	sethi.p		%hi(__page_offset),gr5
+	setlo		%lo(__page_offset),gr5
+	sub		gr4,gr5,gr4
+	movgs		gr4,ttbr
+	setlos		#xAMPRx_L|xAMPRx_M|xAMPRx_SS_16Kb|xAMPRx_S|xAMPRx_C|xAMPRx_V,gr5
+	or		gr4,gr5,gr4
+	movgs		gr4,dampr3
+
+	# the FR451 also has an extra trap base register
+	movsg		tbr,gr4
+	movgs		gr4,btbr
+
+	LEDS		0x3300
+	jmpl		@(gr27,gr0)
+
+###############################################################################
+#
+# finish setting up the protection registers
+#
+###############################################################################
+	.globl		__head_fr451_finalise_protection
+__head_fr451_finalise_protection:
+	# turn on the timers as appropriate
+	movgs		gr0,timerh
+	movgs		gr0,timerl
+	movgs		gr0,timerd
+	movsg		hsr0,gr4
+	sethi.p		%hi(HSR0_ETMI),gr5
+	setlo		%lo(HSR0_ETMI),gr5
+	or		gr4,gr5,gr4
+	movgs		gr4,hsr0
+
+	# clear the TLB entry cache
+	movgs		gr0,iamlr1
+	movgs		gr0,iampr1
+	movgs		gr0,damlr1
+	movgs		gr0,dampr1
+
+	# clear the PGE cache
+	sethi.p		%hi(__flush_tlb_all),gr4
+	setlo		%lo(__flush_tlb_all),gr4
+	jmpl		@(gr4,gr0)
diff -Nru a/arch/frv/kernel/head-uc-fr401.S b/arch/frv/kernel/head-uc-fr401.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/kernel/head-uc-fr401.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,311 @@
+/* head-uc-fr401.S: FR401/3/5 uc-linux specific bits of initialisation
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/config.h>
+#include <linux/threads.h>
+#include <linux/linkage.h>
+#include <asm/ptrace.h>
+#include <asm/page.h>
+#include <asm/spr-regs.h>
+#include <asm/mb86943a.h>
+#include "head.inc"
+
+
+#define __400_DBR0	0xfe000e00
+#define __400_DBR1	0xfe000e08
+#define __400_DBR2	0xfe000e10	/* not on FR401 */
+#define __400_DBR3	0xfe000e18	/* not on FR401 */
+#define __400_DAM0	0xfe000f00
+#define __400_DAM1	0xfe000f08
+#define __400_DAM2	0xfe000f10	/* not on FR401 */
+#define __400_DAM3	0xfe000f18	/* not on FR401 */
+#define __400_LGCR	0xfe000010
+#define __400_LCR	0xfe000100
+#define __400_LSBR	0xfe000c00
+
+	.section	.text.init,"ax"
+	.balign		4
+
+###############################################################################
+#
+# describe the position and layout of the SDRAM controller registers
+#
+#	ENTRY:			EXIT:
+# GR5	-			cacheline size
+# GR11	-			displacement of 2nd SDRAM addr reg from GR14
+# GR12	-			displacement of 3rd SDRAM addr reg from GR14
+# GR13	-			displacement of 4th SDRAM addr reg from GR14
+# GR14	-			address of 1st SDRAM addr reg
+# GR15	-			amount to shift address by to match SDRAM addr reg
+# GR26	&__head_reference	[saved]
+# GR30	LED address		[saved]
+# CC0	-			T if DBR0 is present
+# CC1	-			T if DBR1 is present
+# CC2	-			T if DBR2 is present (not FR401/FR401A)
+# CC3	-			T if DBR3 is present (not FR401/FR401A)
+#
+###############################################################################
+	.globl		__head_fr401_describe_sdram
+__head_fr401_describe_sdram:
+	sethi.p		%hi(__400_DBR0),gr14
+	setlo		%lo(__400_DBR0),gr14
+	setlos.p	#__400_DBR1-__400_DBR0,gr11
+	setlos		#__400_DBR2-__400_DBR0,gr12
+	setlos.p	#__400_DBR3-__400_DBR0,gr13
+	setlos		#32,gr5			; cacheline size
+	setlos.p	#0,gr15			; amount to shift addr reg by
+
+	# specify which DBR regs are present
+	setlos		#0x00ff,gr4
+	movgs		gr4,cccr
+	movsg		psr,gr3			; check for FR401/FR401A
+	srli		gr3,#25,gr3
+	subicc		gr3,#0x20>>1,gr0,icc0
+	bnelr		icc0,#1
+	setlos		#0x000f,gr4
+	movgs		gr4,cccr
+	bralr
+
+###############################################################################
+#
+# rearrange the bus controller registers
+#
+#	ENTRY:			EXIT:
+# GR26	&__head_reference	[saved]
+# GR30	LED address		revised LED address
+#
+###############################################################################
+	.globl		__head_fr401_set_busctl
+__head_fr401_set_busctl:
+	sethi.p		%hi(__400_LGCR),gr4
+	setlo		%lo(__400_LGCR),gr4
+	sethi.p		%hi(__400_LSBR),gr10
+	setlo		%lo(__400_LSBR),gr10
+	sethi.p		%hi(__400_LCR),gr11
+	setlo		%lo(__400_LCR),gr11
+
+	# set the bus controller
+	ldi		@(gr4,#0),gr5
+	ori		gr5,#0xff,gr5		; make sure all chip-selects are enabled
+	sti		gr5,@(gr4,#0)
+
+	sethi.p		%hi(__region_CS1),gr4
+	setlo		%lo(__region_CS1),gr4
+	sethi.p		%hi(__region_CS1_M),gr5
+	setlo		%lo(__region_CS1_M),gr5
+	sethi.p		%hi(__region_CS1_C),gr6
+	setlo		%lo(__region_CS1_C),gr6
+	sti		gr4,@(gr10,#1*0x08)
+	sti		gr5,@(gr10,#1*0x08+0x100)
+	sti		gr6,@(gr11,#1*0x08)
+	sethi.p		%hi(__region_CS2),gr4
+	setlo		%lo(__region_CS2),gr4
+	sethi.p		%hi(__region_CS2_M),gr5
+	setlo		%lo(__region_CS2_M),gr5
+	sethi.p		%hi(__region_CS2_C),gr6
+	setlo		%lo(__region_CS2_C),gr6
+	sti		gr4,@(gr10,#2*0x08)
+	sti		gr5,@(gr10,#2*0x08+0x100)
+	sti		gr6,@(gr11,#2*0x08)
+	sethi.p		%hi(__region_CS3),gr4
+	setlo		%lo(__region_CS3),gr4
+	sethi.p		%hi(__region_CS3_M),gr5
+	setlo		%lo(__region_CS3_M),gr5
+	sethi.p		%hi(__region_CS3_C),gr6
+	setlo		%lo(__region_CS3_C),gr6
+	sti		gr4,@(gr10,#3*0x08)
+	sti		gr5,@(gr10,#3*0x08+0x100)
+	sti		gr6,@(gr11,#3*0x08)
+	sethi.p		%hi(__region_CS4),gr4
+	setlo		%lo(__region_CS4),gr4
+	sethi.p		%hi(__region_CS4_M),gr5
+	setlo		%lo(__region_CS4_M),gr5
+	sethi.p		%hi(__region_CS4_C),gr6
+	setlo		%lo(__region_CS4_C),gr6
+	sti		gr4,@(gr10,#4*0x08)
+	sti		gr5,@(gr10,#4*0x08+0x100)
+	sti		gr6,@(gr11,#4*0x08)
+	sethi.p		%hi(__region_CS5),gr4
+	setlo		%lo(__region_CS5),gr4
+	sethi.p		%hi(__region_CS5_M),gr5
+	setlo		%lo(__region_CS5_M),gr5
+	sethi.p		%hi(__region_CS5_C),gr6
+	setlo		%lo(__region_CS5_C),gr6
+	sti		gr4,@(gr10,#5*0x08)
+	sti		gr5,@(gr10,#5*0x08+0x100)
+	sti		gr6,@(gr11,#5*0x08)
+	sethi.p		%hi(__region_CS6),gr4
+	setlo		%lo(__region_CS6),gr4
+	sethi.p		%hi(__region_CS6_M),gr5
+	setlo		%lo(__region_CS6_M),gr5
+	sethi.p		%hi(__region_CS6_C),gr6
+	setlo		%lo(__region_CS6_C),gr6
+	sti		gr4,@(gr10,#6*0x08)
+	sti		gr5,@(gr10,#6*0x08+0x100)
+	sti		gr6,@(gr11,#6*0x08)
+	sethi.p		%hi(__region_CS7),gr4
+	setlo		%lo(__region_CS7),gr4
+	sethi.p		%hi(__region_CS7_M),gr5
+	setlo		%lo(__region_CS7_M),gr5
+	sethi.p		%hi(__region_CS7_C),gr6
+	setlo		%lo(__region_CS7_C),gr6
+	sti		gr4,@(gr10,#7*0x08)
+	sti		gr5,@(gr10,#7*0x08+0x100)
+	sti		gr6,@(gr11,#7*0x08)
+	membar
+	bar
+
+	# adjust LED bank address
+	sethi.p		%hi(LED_ADDR - 0x20000000 +__region_CS2),gr30
+	setlo		%lo(LED_ADDR - 0x20000000 +__region_CS2),gr30
+	bralr
+
+###############################################################################
+#
+# determine the total SDRAM size
+#
+#	ENTRY:			EXIT:
+# GR25	-			SDRAM size
+# GR26	&__head_reference	[saved]
+# GR30	LED address		[saved]
+#
+###############################################################################
+	.globl		__head_fr401_survey_sdram
+__head_fr401_survey_sdram:
+	sethi.p		%hi(__400_DAM0),gr11
+	setlo		%lo(__400_DAM0),gr11
+	sethi.p		%hi(__400_DBR0),gr12
+	setlo		%lo(__400_DBR0),gr12
+
+	sethi.p		%hi(0xfe000000),gr17		; unused SDRAM DBR value
+	setlo		%lo(0xfe000000),gr17
+	setlos		#0,gr25
+
+	ldi		@(gr12,#0x00),gr4		; DAR0
+	subcc		gr4,gr17,gr0,icc0
+	beq		icc0,#0,__head_no_DCS0
+	ldi		@(gr11,#0x00),gr6		; DAM0: bits 31:20 match addr 31:20
+	add		gr25,gr6,gr25
+	addi		gr25,#1,gr25
+__head_no_DCS0:
+
+	ldi		@(gr12,#0x08),gr4		; DAR1
+	subcc		gr4,gr17,gr0,icc0
+	beq		icc0,#0,__head_no_DCS1
+	ldi		@(gr11,#0x08),gr6		; DAM1: bits 31:20 match addr 31:20
+	add		gr25,gr6,gr25
+	addi		gr25,#1,gr25
+__head_no_DCS1:
+
+	# FR401/FR401A does not have DCS2/3
+	movsg		psr,gr3
+	srli		gr3,#25,gr3
+	subicc		gr3,#0x20>>1,gr0,icc0
+	beq		icc0,#0,__head_no_DCS3
+
+	ldi		@(gr12,#0x10),gr4		; DAR2
+	subcc		gr4,gr17,gr0,icc0
+	beq		icc0,#0,__head_no_DCS2
+	ldi		@(gr11,#0x10),gr6		; DAM2: bits 31:20 match addr 31:20
+	add		gr25,gr6,gr25
+	addi		gr25,#1,gr25
+__head_no_DCS2:
+
+	ldi		@(gr12,#0x18),gr4		; DAR3
+	subcc		gr4,gr17,gr0,icc0
+	beq		icc0,#0,__head_no_DCS3
+	ldi		@(gr11,#0x18),gr6		; DAM3: bits 31:20 match addr 31:20
+	add		gr25,gr6,gr25
+	addi		gr25,#1,gr25
+__head_no_DCS3:
+	bralr
+
+###############################################################################
+#
+# set the protection map with the I/DAMPR registers
+#
+#	ENTRY:			EXIT:
+# GR25	SDRAM size		[saved]
+# GR26	&__head_reference	[saved]
+# GR30	LED address		[saved]
+#
+###############################################################################
+	.globl		__head_fr401_set_protection
+__head_fr401_set_protection:
+	movsg		lr,gr27
+
+	# set the I/O region protection registers for FR401/3/5
+	sethi.p		%hi(__region_IO),gr5
+	setlo		%lo(__region_IO),gr5
+	ori		gr5,#xAMPRx_SS_512Mb|xAMPRx_S_KERNEL|xAMPRx_C|xAMPRx_V,gr5
+	movgs		gr0,iampr7
+	movgs		gr5,dampr7			; General I/O tile
+
+	# need to tile the remaining IAMPR/DAMPR registers to cover as much of the RAM as possible
+	# - start with the highest numbered registers
+	sethi.p		%hi(__kernel_image_end),gr8
+	setlo		%lo(__kernel_image_end),gr8
+	sethi.p		%hi(32768),gr4			; allow for a maximal allocator bitmap
+	setlo		%lo(32768),gr4
+	add		gr8,gr4,gr8
+	sethi.p		%hi(1024*2048-1),gr4		; round up to nearest 2MiB
+	setlo		%lo(1024*2048-1),gr4
+	add.p		gr8,gr4,gr8
+	not		gr4,gr4
+	and		gr8,gr4,gr8
+
+	sethi.p		%hi(__page_offset),gr9
+	setlo		%lo(__page_offset),gr9
+	add		gr9,gr25,gr9
+
+	# GR8 = base of uncovered RAM
+	# GR9 = top of uncovered RAM
+
+#ifdef CONFIG_MB93093_PDK
+	sethi.p		%hi(__region_CS2),gr4
+	setlo		%lo(__region_CS2),gr4
+	ori		gr4,#xAMPRx_SS_1Mb|xAMPRx_S_KERNEL|xAMPRx_C|xAMPRx_V,gr4
+	movgs		gr4,dampr6
+	movgs		gr0,iampr6
+#else
+	call		__head_split_region
+	movgs		gr4,iampr6
+	movgs		gr5,dampr6
+#endif
+	call		__head_split_region
+	movgs		gr4,iampr5
+	movgs		gr5,dampr5
+	call		__head_split_region
+	movgs		gr4,iampr4
+	movgs		gr5,dampr4
+	call		__head_split_region
+	movgs		gr4,iampr3
+	movgs		gr5,dampr3
+	call		__head_split_region
+	movgs		gr4,iampr2
+	movgs		gr5,dampr2
+	call		__head_split_region
+	movgs		gr4,iampr1
+	movgs		gr5,dampr1
+
+	# cover kernel core image with kernel-only segment
+	sethi.p		%hi(__page_offset),gr8
+	setlo		%lo(__page_offset),gr8
+	call		__head_split_region
+
+#ifdef CONFIG_PROTECT_KERNEL
+	ori.p		gr4,#xAMPRx_S_KERNEL,gr4
+	ori		gr5,#xAMPRx_S_KERNEL,gr5
+#endif
+
+	movgs		gr4,iampr0
+	movgs		gr5,dampr0
+	jmpl		@(gr27,gr0)
diff -Nru a/arch/frv/kernel/head-uc-fr451.S b/arch/frv/kernel/head-uc-fr451.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/kernel/head-uc-fr451.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,174 @@
+/* head-uc-fr451.S: FR451 uc-linux specific bits of initialisation
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/config.h>
+#include <linux/threads.h>
+#include <linux/linkage.h>
+#include <asm/ptrace.h>
+#include <asm/page.h>
+#include <asm/spr-regs.h>
+#include <asm/mb86943a.h>
+#include "head.inc"
+
+
+#define __400_DBR0	0xfe000e00
+#define __400_DBR1	0xfe000e08
+#define __400_DBR2	0xfe000e10
+#define __400_DBR3	0xfe000e18
+#define __400_DAM0	0xfe000f00
+#define __400_DAM1	0xfe000f08
+#define __400_DAM2	0xfe000f10
+#define __400_DAM3	0xfe000f18
+#define __400_LGCR	0xfe000010
+#define __400_LCR	0xfe000100
+#define __400_LSBR	0xfe000c00
+
+	.section	.text.init,"ax"
+	.balign		4
+
+###############################################################################
+#
+# set the protection map with the I/DAMPR registers
+#
+#	ENTRY:			EXIT:
+# GR25	SDRAM size		[saved]
+# GR26	&__head_reference	[saved]
+# GR30	LED address		[saved]
+#
+###############################################################################
+	.globl		__head_fr451_set_protection
+__head_fr451_set_protection:
+	movsg		lr,gr27
+
+	movgs		gr0,dampr10
+	movgs		gr0,damlr10
+	movgs		gr0,dampr9
+	movgs		gr0,damlr9
+	movgs		gr0,dampr8
+	movgs		gr0,damlr8
+
+	# set the I/O region protection registers for FR401/3/5
+	sethi.p		%hi(__region_IO),gr5
+	setlo		%lo(__region_IO),gr5
+	sethi.p		%hi(0x1fffffff),gr7
+	setlo		%lo(0x1fffffff),gr7
+	ori		gr5,#xAMPRx_SS_512Mb|xAMPRx_S_KERNEL|xAMPRx_C|xAMPRx_V,gr5
+	movgs		gr5,dampr11			; General I/O tile
+	movgs		gr7,damlr11
+
+	# need to tile the remaining IAMPR/DAMPR registers to cover as much of the RAM as possible
+	# - start with the highest numbered registers
+	sethi.p		%hi(__kernel_image_end),gr8
+	setlo		%lo(__kernel_image_end),gr8
+	sethi.p		%hi(32768),gr4			; allow for a maximal allocator bitmap
+	setlo		%lo(32768),gr4
+	add		gr8,gr4,gr8
+	sethi.p		%hi(1024*2048-1),gr4		; round up to nearest 2MiB
+	setlo		%lo(1024*2048-1),gr4
+	add.p		gr8,gr4,gr8
+	not		gr4,gr4
+	and		gr8,gr4,gr8
+
+	sethi.p		%hi(__page_offset),gr9
+	setlo		%lo(__page_offset),gr9
+	add		gr9,gr25,gr9
+
+	sethi.p		%hi(0xffffc000),gr11
+	setlo		%lo(0xffffc000),gr11
+
+	# GR8 = base of uncovered RAM
+	# GR9 = top of uncovered RAM
+	# GR11 = xAMLR mask
+	LEDS		0x3317
+	call		__head_split_region
+	movgs		gr4,iampr7
+	movgs		gr6,iamlr7
+	movgs		gr5,dampr7
+	movgs		gr7,damlr7
+
+	LEDS		0x3316
+	call		__head_split_region
+	movgs		gr4,iampr6
+	movgs		gr6,iamlr6
+	movgs		gr5,dampr6
+	movgs		gr7,damlr6
+
+	LEDS		0x3315
+	call		__head_split_region
+	movgs		gr4,iampr5
+	movgs		gr6,iamlr5
+	movgs		gr5,dampr5
+	movgs		gr7,damlr5
+
+	LEDS		0x3314
+	call		__head_split_region
+	movgs		gr4,iampr4
+	movgs		gr6,iamlr4
+	movgs		gr5,dampr4
+	movgs		gr7,damlr4
+
+	LEDS		0x3313
+	call		__head_split_region
+	movgs		gr4,iampr3
+	movgs		gr6,iamlr3
+	movgs		gr5,dampr3
+	movgs		gr7,damlr3
+
+	LEDS		0x3312
+	call		__head_split_region
+	movgs		gr4,iampr2
+	movgs		gr6,iamlr2
+	movgs		gr5,dampr2
+	movgs		gr7,damlr2
+
+	LEDS		0x3311
+	call		__head_split_region
+	movgs		gr4,iampr1
+	movgs		gr6,iamlr1
+	movgs		gr5,dampr1
+	movgs		gr7,damlr1
+
+	# cover kernel core image with kernel-only segment
+	LEDS		0x3310
+	sethi.p		%hi(__page_offset),gr8
+	setlo		%lo(__page_offset),gr8
+	call		__head_split_region
+
+#ifdef CONFIG_PROTECT_KERNEL
+	ori.p		gr4,#xAMPRx_S_KERNEL,gr4
+	ori		gr5,#xAMPRx_S_KERNEL,gr5
+#endif
+
+	movgs		gr4,iampr0
+	movgs		gr6,iamlr0
+	movgs		gr5,dampr0
+	movgs		gr7,damlr0
+
+	# start in TLB context 0 with no page tables
+	movgs		gr0,cxnr
+	movgs		gr0,ttbr
+
+	# the FR451 also has an extra trap base register
+	movsg		tbr,gr4
+	movgs		gr4,btbr
+
+	# turn on the timers as appropriate
+	movgs		gr0,timerh
+	movgs		gr0,timerl
+	movgs		gr0,timerd
+	movsg		hsr0,gr4
+	sethi.p		%hi(HSR0_ETMI),gr5
+	setlo		%lo(HSR0_ETMI),gr5
+	or		gr4,gr5,gr4
+	movgs		gr4,hsr0
+
+	LEDS		0x3300
+	jmpl		@(gr27,gr0)
diff -Nru a/arch/frv/kernel/head-uc-fr555.S b/arch/frv/kernel/head-uc-fr555.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/kernel/head-uc-fr555.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,347 @@
+/* head-uc-fr555.S: FR555 uc-linux specific bits of initialisation
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/config.h>
+#include <linux/threads.h>
+#include <linux/linkage.h>
+#include <asm/ptrace.h>
+#include <asm/page.h>
+#include <asm/spr-regs.h>
+#include <asm/mb86943a.h>
+#include "head.inc"
+
+
+#define __551_DARS0	0xfeff0100
+#define __551_DARS1	0xfeff0104
+#define __551_DARS2	0xfeff0108
+#define __551_DARS3	0xfeff010c
+#define __551_DAMK0	0xfeff0110
+#define __551_DAMK1	0xfeff0114
+#define __551_DAMK2	0xfeff0118
+#define __551_DAMK3	0xfeff011c
+#define __551_LCR	0xfeff1100
+#define __551_LSBR	0xfeff1c00
+
+	.section	.text.init,"ax"
+	.balign		4
+
+###############################################################################
+#
+# describe the position and layout of the SDRAM controller registers
+#
+#	ENTRY:			EXIT:
+# GR5	-			cacheline size
+# GR11	-			displacement of 2nd SDRAM addr reg from GR14
+# GR12	-			displacement of 3rd SDRAM addr reg from GR14
+# GR13	-			displacement of 4th SDRAM addr reg from GR14
+# GR14	-			address of 1st SDRAM addr reg
+# GR15	-			amount to shift address by to match SDRAM addr reg
+# GR26	&__head_reference	[saved]
+# GR30	LED address		[saved]
+# CC0	-			T if DARS0 is present
+# CC1	-			T if DARS1 is present
+# CC2	-			T if DARS2 is present
+# CC3	-			T if DARS3 is present
+#
+###############################################################################
+	.globl		__head_fr555_describe_sdram
+__head_fr555_describe_sdram:
+	sethi.p		%hi(__551_DARS0),gr14
+	setlo		%lo(__551_DARS0),gr14
+	setlos.p	#__551_DARS1-__551_DARS0,gr11
+	setlos		#__551_DARS2-__551_DARS0,gr12
+	setlos.p	#__551_DARS3-__551_DARS0,gr13
+	setlos		#64,gr5			; cacheline size
+	setlos		#20,gr15		; amount to shift addr by
+	setlos		#0x00ff,gr4
+	movgs		gr4,cccr		; extant DARS/DAMK regs
+	bralr
+
+###############################################################################
+#
+# rearrange the bus controller registers
+#
+#	ENTRY:			EXIT:
+# GR26	&__head_reference	[saved]
+# GR30	LED address		revised LED address
+#
+###############################################################################
+	.globl		__head_fr555_set_busctl
+__head_fr555_set_busctl:
+	LEDS		0x100f
+	sethi.p		%hi(__551_LSBR),gr10
+	setlo		%lo(__551_LSBR),gr10
+	sethi.p		%hi(__551_LCR),gr11
+	setlo		%lo(__551_LCR),gr11
+
+	# set the bus controller
+	sethi.p		%hi(__region_CS1),gr4
+	setlo		%lo(__region_CS1),gr4
+	sethi.p		%hi(__region_CS1_M),gr5
+	setlo		%lo(__region_CS1_M),gr5
+	sethi.p		%hi(__region_CS1_C),gr6
+	setlo		%lo(__region_CS1_C),gr6
+	sti		gr4,@(gr10,#1*0x08)
+	sti		gr5,@(gr10,#1*0x08+0x100)
+	sti		gr6,@(gr11,#1*0x08)
+	sethi.p		%hi(__region_CS2),gr4
+	setlo		%lo(__region_CS2),gr4
+	sethi.p		%hi(__region_CS2_M),gr5
+	setlo		%lo(__region_CS2_M),gr5
+	sethi.p		%hi(__region_CS2_C),gr6
+	setlo		%lo(__region_CS2_C),gr6
+	sti		gr4,@(gr10,#2*0x08)
+	sti		gr5,@(gr10,#2*0x08+0x100)
+	sti		gr6,@(gr11,#2*0x08)
+	sethi.p		%hi(__region_CS3),gr4
+	setlo		%lo(__region_CS3),gr4
+	sethi.p		%hi(__region_CS3_M),gr5
+	setlo		%lo(__region_CS3_M),gr5
+	sethi.p		%hi(__region_CS3_C),gr6
+	setlo		%lo(__region_CS3_C),gr6
+	sti		gr4,@(gr10,#3*0x08)
+	sti		gr5,@(gr10,#3*0x08+0x100)
+	sti		gr6,@(gr11,#3*0x08)
+	sethi.p		%hi(__region_CS4),gr4
+	setlo		%lo(__region_CS4),gr4
+	sethi.p		%hi(__region_CS4_M),gr5
+	setlo		%lo(__region_CS4_M),gr5
+	sethi.p		%hi(__region_CS4_C),gr6
+	setlo		%lo(__region_CS4_C),gr6
+	sti		gr4,@(gr10,#4*0x08)
+	sti		gr5,@(gr10,#4*0x08+0x100)
+	sti		gr6,@(gr11,#4*0x08)
+	sethi.p		%hi(__region_CS5),gr4
+	setlo		%lo(__region_CS5),gr4
+	sethi.p		%hi(__region_CS5_M),gr5
+	setlo		%lo(__region_CS5_M),gr5
+	sethi.p		%hi(__region_CS5_C),gr6
+	setlo		%lo(__region_CS5_C),gr6
+	sti		gr4,@(gr10,#5*0x08)
+	sti		gr5,@(gr10,#5*0x08+0x100)
+	sti		gr6,@(gr11,#5*0x08)
+	sethi.p		%hi(__region_CS6),gr4
+	setlo		%lo(__region_CS6),gr4
+	sethi.p		%hi(__region_CS6_M),gr5
+	setlo		%lo(__region_CS6_M),gr5
+	sethi.p		%hi(__region_CS6_C),gr6
+	setlo		%lo(__region_CS6_C),gr6
+	sti		gr4,@(gr10,#6*0x08)
+	sti		gr5,@(gr10,#6*0x08+0x100)
+	sti		gr6,@(gr11,#6*0x08)
+	sethi.p		%hi(__region_CS7),gr4
+	setlo		%lo(__region_CS7),gr4
+	sethi.p		%hi(__region_CS7_M),gr5
+	setlo		%lo(__region_CS7_M),gr5
+	sethi.p		%hi(__region_CS7_C),gr6
+	setlo		%lo(__region_CS7_C),gr6
+	sti		gr4,@(gr10,#7*0x08)
+	sti		gr5,@(gr10,#7*0x08+0x100)
+	sti		gr6,@(gr11,#7*0x08)
+	membar
+	bar
+
+	# adjust LED bank address
+#ifdef CONFIG_MB93091_VDK
+	sethi.p		%hi(LED_ADDR - 0x20000000 +__region_CS2),gr30
+	setlo		%lo(LED_ADDR - 0x20000000 +__region_CS2),gr30
+#endif
+	bralr
+
+###############################################################################
+#
+# determine the total SDRAM size
+#
+#	ENTRY:			EXIT:
+# GR25	-			SDRAM size
+# GR26	&__head_reference	[saved]
+# GR30	LED address		[saved]
+#
+###############################################################################
+	.globl		__head_fr555_survey_sdram
+__head_fr555_survey_sdram:
+	sethi.p		%hi(__551_DAMK0),gr11
+	setlo		%lo(__551_DAMK0),gr11
+	sethi.p		%hi(__551_DARS0),gr12
+	setlo		%lo(__551_DARS0),gr12
+
+	sethi.p		%hi(0xfff),gr17			; unused SDRAM AMK value
+	setlo		%lo(0xfff),gr17
+	setlos		#0,gr25
+
+	ldi		@(gr11,#0x00),gr6		; DAMK0: bits 11:0 match addr 11:0
+	subcc		gr6,gr17,gr0,icc0
+	beq		icc0,#0,__head_no_DCS0
+	ldi		@(gr12,#0x00),gr4		; DARS0
+	add		gr25,gr6,gr25
+	addi		gr25,#1,gr25
+__head_no_DCS0:
+
+	ldi		@(gr11,#0x04),gr6		; DAMK1: bits 11:0 match addr 11:0
+	subcc		gr6,gr17,gr0,icc0
+	beq		icc0,#0,__head_no_DCS1
+	ldi		@(gr12,#0x04),gr4		; DARS1
+	add		gr25,gr6,gr25
+	addi		gr25,#1,gr25
+__head_no_DCS1:
+
+	ldi		@(gr11,#0x8),gr6		; DAMK2: bits 11:0 match addr 11:0
+	subcc		gr6,gr17,gr0,icc0
+	beq		icc0,#0,__head_no_DCS2
+	ldi		@(gr12,#0x8),gr4		; DARS2
+	add		gr25,gr6,gr25
+	addi		gr25,#1,gr25
+__head_no_DCS2:
+
+	ldi		@(gr11,#0xc),gr6		; DAMK3: bits 11:0 match addr 11:0
+	subcc		gr6,gr17,gr0,icc0
+	beq		icc0,#0,__head_no_DCS3
+	ldi		@(gr12,#0xc),gr4		; DARS3
+	add		gr25,gr6,gr25
+	addi		gr25,#1,gr25
+__head_no_DCS3:
+
+	slli		gr25,#20,gr25			; shift [11:0] -> [31:20]
+	bralr
+
+###############################################################################
+#
+# set the protection map with the I/DAMPR registers
+#
+#	ENTRY:			EXIT:
+# GR25	SDRAM size		saved
+# GR30	LED address		saved
+#
+###############################################################################
+	.globl		__head_fr555_set_protection
+__head_fr555_set_protection:
+	movsg		lr,gr27
+
+	sethi.p		%hi(0xfff00000),gr11
+	setlo		%lo(0xfff00000),gr11
+
+	# set the I/O region protection registers for FR555
+	sethi.p		%hi(__region_IO),gr7
+	setlo		%lo(__region_IO),gr7
+	ori		gr7,#xAMPRx_SS_512Mb|xAMPRx_S_KERNEL|xAMPRx_C|xAMPRx_V,gr5
+	movgs		gr0,iampr15
+	movgs		gr0,iamlr15
+	movgs		gr5,dampr15
+	movgs		gr7,damlr15
+
+	# need to tile the remaining IAMPR/DAMPR registers to cover as much of the RAM as possible
+	# - start with the highest numbered registers
+	sethi.p		%hi(__kernel_image_end),gr8
+	setlo		%lo(__kernel_image_end),gr8
+	sethi.p		%hi(32768),gr4			; allow for a maximal allocator bitmap
+	setlo		%lo(32768),gr4
+	add		gr8,gr4,gr8
+	sethi.p		%hi(1024*2048-1),gr4		; round up to nearest 2MiB
+	setlo		%lo(1024*2048-1),gr4
+	add.p		gr8,gr4,gr8
+	not		gr4,gr4
+	and		gr8,gr4,gr8
+
+	sethi.p		%hi(__page_offset),gr9
+	setlo		%lo(__page_offset),gr9
+	add		gr9,gr25,gr9
+
+	# GR8 = base of uncovered RAM
+	# GR9 = top of uncovered RAM
+	# GR11 - mask for DAMLR/IAMLR regs
+	#
+	call		__head_split_region
+	movgs		gr4,iampr14
+	movgs		gr6,iamlr14
+	movgs		gr5,dampr14
+	movgs		gr7,damlr14
+	call		__head_split_region
+	movgs		gr4,iampr13
+	movgs		gr6,iamlr13
+	movgs		gr5,dampr13
+	movgs		gr7,damlr13
+	call		__head_split_region
+	movgs		gr4,iampr12
+	movgs		gr6,iamlr12
+	movgs		gr5,dampr12
+	movgs		gr7,damlr12
+	call		__head_split_region
+	movgs		gr4,iampr11
+	movgs		gr6,iamlr11
+	movgs		gr5,dampr11
+	movgs		gr7,damlr11
+	call		__head_split_region
+	movgs		gr4,iampr10
+	movgs		gr6,iamlr10
+	movgs		gr5,dampr10
+	movgs		gr7,damlr10
+	call		__head_split_region
+	movgs		gr4,iampr9
+	movgs		gr6,iamlr9
+	movgs		gr5,dampr9
+	movgs		gr7,damlr9
+	call		__head_split_region
+	movgs		gr4,iampr8
+	movgs		gr6,iamlr8
+	movgs		gr5,dampr8
+	movgs		gr7,damlr8
+
+	call		__head_split_region
+	movgs		gr4,iampr7
+	movgs		gr6,iamlr7
+	movgs		gr5,dampr7
+	movgs		gr7,damlr7
+	call		__head_split_region
+	movgs		gr4,iampr6
+	movgs		gr6,iamlr6
+	movgs		gr5,dampr6
+	movgs		gr7,damlr6
+	call		__head_split_region
+	movgs		gr4,iampr5
+	movgs		gr6,iamlr5
+	movgs		gr5,dampr5
+	movgs		gr7,damlr5
+	call		__head_split_region
+	movgs		gr4,iampr4
+	movgs		gr6,iamlr4
+	movgs		gr5,dampr4
+	movgs		gr7,damlr4
+	call		__head_split_region
+	movgs		gr4,iampr3
+	movgs		gr6,iamlr3
+	movgs		gr5,dampr3
+	movgs		gr7,damlr3
+	call		__head_split_region
+	movgs		gr4,iampr2
+	movgs		gr6,iamlr2
+	movgs		gr5,dampr2
+	movgs		gr7,damlr2
+	call		__head_split_region
+	movgs		gr4,iampr1
+	movgs		gr6,iamlr1
+	movgs		gr5,dampr1
+	movgs		gr7,damlr1
+
+	# cover kernel core image with kernel-only segment
+	sethi.p		%hi(__page_offset),gr8
+	setlo		%lo(__page_offset),gr8
+	call		__head_split_region
+
+#ifdef CONFIG_PROTECT_KERNEL
+	ori.p		gr4,#xAMPRx_S_KERNEL,gr4
+	ori		gr5,#xAMPRx_S_KERNEL,gr5
+#endif
+
+	movgs		gr4,iampr0
+	movgs		gr6,iamlr0
+	movgs		gr5,dampr0
+	movgs		gr7,damlr0
+	jmpl		@(gr27,gr0)
diff -Nru a/arch/frv/kernel/head.S b/arch/frv/kernel/head.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/kernel/head.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,639 @@
+/* head.S: kernel entry point for FR-V kernel
+ *
+ * Copyright (C) 2003, 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/config.h>
+#include <linux/threads.h>
+#include <linux/linkage.h>
+#include <asm/ptrace.h>
+#include <asm/page.h>
+#include <asm/spr-regs.h>
+#include <asm/mb86943a.h>
+#include <asm/cache.h>
+#include "head.inc"
+
+###############################################################################
+#
+# void _boot(unsigned long magic, char *command_line) __attribute__((noreturn))
+#
+# - if magic is 0xdead1eaf, then command_line is assumed to point to the kernel
+#   command line string
+#
+###############################################################################
+	.section	.text.head,"ax"
+	.balign		4
+
+	.globl		_boot, __head_reference
+        .type		_boot,@function
+_boot:
+__head_reference:
+	sethi.p		%hi(LED_ADDR),gr30
+	setlo		%lo(LED_ADDR),gr30
+
+	LEDS		0x0000
+
+	# calculate reference address for PC-relative stuff
+	call		0f
+0:	movsg		lr,gr26
+	addi		gr26,#__head_reference-0b,gr26
+
+	# invalidate and disable both of the caches and turn off the memory access checking
+	dcef		@(gr0,gr0),1
+	bar
+
+	sethi.p		%hi(~(HSR0_ICE|HSR0_DCE|HSR0_CBM|HSR0_EIMMU|HSR0_EDMMU)),gr4
+	setlo		%lo(~(HSR0_ICE|HSR0_DCE|HSR0_CBM|HSR0_EIMMU|HSR0_EDMMU)),gr4
+	movsg		hsr0,gr5
+	and		gr4,gr5,gr5
+	movgs		gr5,hsr0
+	movsg		hsr0,gr5
+
+	LEDS		0x0001
+
+	icei		@(gr0,gr0),1
+	dcei		@(gr0,gr0),1
+	bar
+
+	# turn the instruction cache back on
+	sethi.p		%hi(HSR0_ICE),gr4
+	setlo		%lo(HSR0_ICE),gr4
+	movsg		hsr0,gr5
+	or		gr4,gr5,gr5
+	movgs		gr5,hsr0
+	movsg		hsr0,gr5
+
+	bar
+
+	LEDS		0x0002
+
+	# retrieve the parameters (including command line) before we overwrite them
+	sethi.p		%hi(0xdead1eaf),gr7
+	setlo		%lo(0xdead1eaf),gr7
+	subcc		gr7,gr8,gr0,icc0
+	bne		icc0,#0,__head_no_parameters
+
+	sethi.p		%hi(redboot_command_line-1),gr6
+	setlo		%lo(redboot_command_line-1),gr6
+	sethi.p		%hi(__head_reference),gr4
+	setlo		%lo(__head_reference),gr4
+	sub		gr6,gr4,gr6
+	add.p		gr6,gr26,gr6
+	subi		gr9,#1,gr9
+	setlos.p	#511,gr4
+	setlos		#1,gr5
+
+__head_copy_cmdline:
+	ldubu.p		@(gr9,gr5),gr16
+	subicc		gr4,#1,gr4,icc0
+	stbu.p		gr16,@(gr6,gr5)
+	subicc		gr16,#0,gr0,icc1
+	bls		icc0,#0,__head_end_cmdline
+	bne		icc1,#1,__head_copy_cmdline
+__head_end_cmdline:
+	stbu		gr0,@(gr6,gr5)
+__head_no_parameters:
+
+###############################################################################
+#
+# we need to relocate the SDRAM to 0x00000000 (linux) or 0xC0000000 (uClinux)
+# - note that we're going to have to run entirely out of the icache whilst
+#   fiddling with the SDRAM controller registers
+#
+###############################################################################
+#ifdef CONFIG_MMU
+	call		__head_fr451_describe_sdram
+
+#else
+	movsg		psr,gr5
+	srli		gr5,#28,gr5
+	subicc		gr5,#3,gr0,icc0
+	beq		icc0,#0,__head_fr551_sdram
+
+	call		__head_fr401_describe_sdram
+	bra		__head_do_sdram
+
+__head_fr551_sdram:
+	call		__head_fr555_describe_sdram
+	LEDS		0x000d
+
+__head_do_sdram:
+#endif
+
+	# preload the registers with invalid values in case any DBR/DARS are marked not present
+	sethi.p		%hi(0xfe000000),gr17		; unused SDRAM DBR value
+	setlo		%lo(0xfe000000),gr17
+	or.p		gr17,gr0,gr20
+	or		gr17,gr0,gr21
+	or.p		gr17,gr0,gr22
+	or		gr17,gr0,gr23
+
+	# consult the SDRAM controller CS address registers
+	cld		@(gr14,gr0 ),gr20,	cc0,#1	; DBR0 / DARS0
+	cld		@(gr14,gr11),gr21,	cc1,#1	; DBR1 / DARS1
+	cld		@(gr14,gr12),gr22,	cc2,#1	; DBR2 / DARS2
+	cld.p		@(gr14,gr13),gr23,	cc3,#1	; DBR3 / DARS3
+
+	sll		gr20,gr15,gr20			; shift values up for FR551
+	sll		gr21,gr15,gr21
+	sll		gr22,gr15,gr22
+	sll		gr23,gr15,gr23
+
+	LEDS		0x0003
+
+	# assume the lowest valid CS line to be the SDRAM base and get its address
+	subcc		gr20,gr17,gr0,icc0
+	subcc.p		gr21,gr17,gr0,icc1
+	subcc		gr22,gr17,gr0,icc2
+	subcc.p		gr23,gr17,gr0,icc3
+	ckne		icc0,cc4			; T if DBR0 != 0xfe000000
+	ckne		icc1,cc5
+	ckne		icc2,cc6
+	ckne		icc3,cc7
+	cor		gr23,gr0,gr24,		cc7,#1	; GR24 = SDRAM base
+	cor		gr22,gr0,gr24,		cc6,#1
+	cor		gr21,gr0,gr24,		cc5,#1
+	cor		gr20,gr0,gr24,		cc4,#1
+
+	# calculate the displacement required to get the SDRAM into the right place in memory
+	sethi.p		%hi(__sdram_base),gr16
+	setlo		%lo(__sdram_base),gr16
+	sub		gr16,gr24,gr16			; delta = __sdram_base - DBRx
+
+	# calculate the new values to go in the controller regs
+	cadd.p		gr20,gr16,gr20,		cc4,#1	; DCS#0 (new) = DCS#0 (old) + delta
+	cadd		gr21,gr16,gr21,		cc5,#1
+	cadd.p		gr22,gr16,gr22,		cc6,#1
+	cadd		gr23,gr16,gr23,		cc7,#1
+
+	srl		gr20,gr15,gr20			; shift values down for FR551
+	srl		gr21,gr15,gr21
+	srl		gr22,gr15,gr22
+	srl		gr23,gr15,gr23
+
+	# work out the address at which the reg updater resides and lock it into icache
+	# also work out the address the updater will jump to when finished
+	sethi.p		%hi(__head_move_sdram-__head_reference),gr18
+	setlo		%lo(__head_move_sdram-__head_reference),gr18
+	sethi.p		%hi(__head_sdram_moved-__head_reference),gr19
+	setlo		%lo(__head_sdram_moved-__head_reference),gr19
+	add.p		gr18,gr26,gr18
+	add		gr19,gr26,gr19
+	add.p		gr19,gr16,gr19			; moved = addr + (__sdram_base - DBRx)
+	add		gr18,gr5,gr4			; two cachelines probably required
+
+	icpl		gr18,gr0,#1			; load and lock the cachelines
+	icpl		gr4,gr0,#1
+	LEDS		0x0004
+	membar
+	bar
+	jmpl		@(gr18,gr0)
+
+	.balign		L1_CACHE_BYTES
+__head_move_sdram:
+	cst		gr20,@(gr14,gr0 ),	cc4,#1
+	cst		gr21,@(gr14,gr11),	cc5,#1
+	cst		gr22,@(gr14,gr12),	cc6,#1
+	cst		gr23,@(gr14,gr13),	cc7,#1
+	cld		@(gr14,gr0 ),gr20,	cc4,#1
+	cld		@(gr14,gr11),gr21,	cc5,#1
+	cld		@(gr14,gr12),gr22,	cc4,#1
+	cld		@(gr14,gr13),gr23,	cc7,#1
+	bar
+	membar
+	jmpl		@(gr19,gr0)
+
+	.balign		L1_CACHE_BYTES
+__head_sdram_moved:
+	icul		gr18
+	add		gr18,gr5,gr4
+	icul		gr4
+	icei		@(gr0,gr0),1
+	dcei		@(gr0,gr0),1
+
+	LEDS		0x0005
+
+	# recalculate reference address
+	call		0f
+0:	movsg		lr,gr26
+	addi		gr26,#__head_reference-0b,gr26
+
+
+###############################################################################
+#
+# move the kernel image down to the bottom of the SDRAM
+#
+###############################################################################
+	sethi.p		%hi(__kernel_image_size_no_bss+15),gr4
+	setlo		%lo(__kernel_image_size_no_bss+15),gr4
+	srli.p		gr4,#4,gr4			; count
+	or		gr26,gr26,gr16			; source
+
+	sethi.p		%hi(__sdram_base),gr17		; destination
+	setlo		%lo(__sdram_base),gr17
+
+	setlos		#8,gr5
+	sub.p		gr16,gr5,gr16			; adjust src for LDDU
+	sub		gr17,gr5,gr17			; adjust dst for LDDU
+
+	sethi.p		%hi(__head_move_kernel-__head_reference),gr18
+	setlo		%lo(__head_move_kernel-__head_reference),gr18
+	sethi.p		%hi(__head_kernel_moved-__head_reference+__sdram_base),gr19
+	setlo		%lo(__head_kernel_moved-__head_reference+__sdram_base),gr19
+	add		gr18,gr26,gr18
+	icpl		gr18,gr0,#1
+	jmpl		@(gr18,gr0)
+
+	.balign		32
+__head_move_kernel:
+	lddu		@(gr16,gr5),gr10
+	lddu		@(gr16,gr5),gr12
+	stdu.p		gr10,@(gr17,gr5)
+	subicc		gr4,#1,gr4,icc0
+	stdu.p		gr12,@(gr17,gr5)
+	bhi		icc0,#0,__head_move_kernel
+	jmpl		@(gr19,gr0)
+
+	.balign		32
+__head_kernel_moved:
+	icul		gr18
+	icei		@(gr0,gr0),1
+	dcei		@(gr0,gr0),1
+
+	LEDS		0x0006
+
+	# recalculate reference address
+	call		0f
+0:	movsg		lr,gr26
+	addi		gr26,#__head_reference-0b,gr26
+
+
+###############################################################################
+#
+# rearrange the iomem map and set the protection registers
+#
+###############################################################################
+
+#ifdef CONFIG_MMU
+	LEDS		0x3301
+	call		__head_fr451_set_busctl
+	LEDS		0x3303
+	call		__head_fr451_survey_sdram
+	LEDS		0x3305
+	call		__head_fr451_set_protection
+
+#else
+	movsg		psr,gr5
+	srli		gr5,#PSR_IMPLE_SHIFT,gr5
+	subicc		gr5,#PSR_IMPLE_FR551,gr0,icc0
+	beq		icc0,#0,__head_fr555_memmap
+	subicc		gr5,#PSR_IMPLE_FR451,gr0,icc0
+	beq		icc0,#0,__head_fr451_memmap
+
+	LEDS		0x3101
+	call		__head_fr401_set_busctl
+	LEDS		0x3103
+	call		__head_fr401_survey_sdram
+	LEDS		0x3105
+	call		__head_fr401_set_protection
+	bra		__head_done_memmap
+
+__head_fr451_memmap:
+	LEDS		0x3301
+	call		__head_fr401_set_busctl
+	LEDS		0x3303
+	call		__head_fr401_survey_sdram
+	LEDS		0x3305
+	call		__head_fr451_set_protection
+	bra		__head_done_memmap
+
+__head_fr555_memmap:
+	LEDS		0x3501
+	call		__head_fr555_set_busctl
+	LEDS		0x3503
+	call		__head_fr555_survey_sdram
+	LEDS		0x3505
+	call		__head_fr555_set_protection
+
+__head_done_memmap:
+#endif
+	LEDS		0x0007
+
+###############################################################################
+#
+# turn the data cache and MMU on
+# - for the FR451 this'll mean that the window through which the kernel is
+#   viewed will change
+#
+###############################################################################
+
+#ifdef CONFIG_MMU
+#define MMUMODE		HSR0_EIMMU|HSR0_EDMMU|HSR0_EXMMU|HSR0_EDAT|HSR0_XEDAT
+#else
+#define MMUMODE		HSR0_EIMMU|HSR0_EDMMU
+#endif
+
+	movsg		hsr0,gr5
+
+	sethi.p		%hi(MMUMODE),gr4
+	setlo		%lo(MMUMODE),gr4
+	or		gr4,gr5,gr5
+
+#if defined(CONFIG_FRV_DEFL_CACHE_WTHRU)
+	sethi.p		%hi(HSR0_DCE|HSR0_CBM_WRITE_THRU),gr4
+	setlo		%lo(HSR0_DCE|HSR0_CBM_WRITE_THRU),gr4
+#elif defined(CONFIG_FRV_DEFL_CACHE_WBACK)
+	sethi.p		%hi(HSR0_DCE|HSR0_CBM_COPY_BACK),gr4
+	setlo		%lo(HSR0_DCE|HSR0_CBM_COPY_BACK),gr4
+#elif defined(CONFIG_FRV_DEFL_CACHE_WBEHIND)
+	sethi.p		%hi(HSR0_DCE|HSR0_CBM_COPY_BACK),gr4
+	setlo		%lo(HSR0_DCE|HSR0_CBM_COPY_BACK),gr4
+
+	movsg		psr,gr6
+	srli		gr6,#24,gr6
+	cmpi		gr6,#0x50,icc0		// FR451
+	beq		icc0,#0,0f
+	cmpi		gr6,#0x40,icc0		// FR405
+	bne		icc0,#0,1f
+0:
+	# turn off write-allocate
+	sethi.p		%hi(HSR0_NWA),gr6
+	setlo		%lo(HSR0_NWA),gr6
+	or		gr4,gr6,gr4
+1:
+
+#else
+#error No default cache configuration set
+#endif
+
+	or		gr4,gr5,gr5
+	movgs		gr5,hsr0
+	bar
+
+	LEDS		0x0008
+
+	sethi.p		%hi(__head_mmu_enabled),gr19
+	setlo		%lo(__head_mmu_enabled),gr19
+	jmpl		@(gr19,gr0)
+
+__head_mmu_enabled:
+	icei		@(gr0,gr0),#1
+	dcei		@(gr0,gr0),#1
+
+	LEDS		0x0009
+
+#ifdef CONFIG_MMU
+	call		__head_fr451_finalise_protection
+#endif
+
+	LEDS		0x000a
+
+###############################################################################
+#
+# set up the runtime environment
+#
+###############################################################################
+
+	# clear the BSS area
+	sethi.p		%hi(__bss_start),gr4
+	setlo		%lo(__bss_start),gr4
+	sethi.p		%hi(_end),gr5
+	setlo		%lo(_end),gr5
+	or.p		gr0,gr0,gr18
+	or		gr0,gr0,gr19
+
+0:
+	stdi		gr18,@(gr4,#0)
+	stdi		gr18,@(gr4,#8)
+	stdi		gr18,@(gr4,#16)
+	stdi.p		gr18,@(gr4,#24)
+	addi		gr4,#24,gr4
+	subcc		gr5,gr4,gr0,icc0
+	bhi		icc0,#2,0b
+
+	LEDS		0x000b
+
+	# save the SDRAM details
+	sethi.p		%hi(__sdram_old_base),gr4
+	setlo		%lo(__sdram_old_base),gr4
+	st		gr24,@(gr4,gr0)
+
+	sethi.p		%hi(__sdram_base),gr5
+	setlo		%lo(__sdram_base),gr5
+	sethi.p		%hi(memory_start),gr4
+	setlo		%lo(memory_start),gr4
+	st		gr5,@(gr4,gr0)
+
+	add		gr25,gr5,gr25
+	sethi.p		%hi(memory_end),gr4
+	setlo		%lo(memory_end),gr4
+	st		gr25,@(gr4,gr0)
+
+	# point the TBR at the kernel trap table
+	sethi.p		%hi(__entry_kerneltrap_table),gr4
+	setlo		%lo(__entry_kerneltrap_table),gr4
+	movgs		gr4,tbr
+
+	# set up the exception frame for init
+	sethi.p		%hi(__kernel_frame0_ptr),gr28
+	setlo		%lo(__kernel_frame0_ptr),gr28
+	sethi.p		%hi(_gp),gr16
+	setlo		%lo(_gp),gr16
+	sethi.p		%hi(__entry_usertrap_table),gr4
+	setlo		%lo(__entry_usertrap_table),gr4
+
+	lddi		@(gr28,#0),gr28		; load __frame & current
+	ldi.p		@(gr29,#4),gr15		; set current_thread
+
+	or		gr0,gr0,fp
+	or		gr28,gr0,sp
+
+	sti.p		gr4,@(gr28,REG_TBR)
+	setlos		#ISR_EDE|ISR_DTT_DIVBYZERO|ISR_EMAM_EXCEPTION,gr5
+	movgs		gr5,isr
+
+	# turn on and off various CPU services
+	movsg		psr,gr22
+	sethi.p		%hi(#PSR_EM|PSR_EF|PSR_CM|PSR_NEM),gr4
+	setlo		%lo(#PSR_EM|PSR_EF|PSR_CM|PSR_NEM),gr4
+	or		gr22,gr4,gr22
+	movgs		gr22,psr
+
+	andi		gr22,#~(PSR_PIL|PSR_PS|PSR_S),gr22
+	ori		gr22,#PSR_ET,gr22
+	sti		gr22,@(gr28,REG_PSR)
+
+
+###############################################################################
+#
+# set up the registers and jump into the kernel
+#
+###############################################################################
+
+	LEDS		0x000c
+
+	# initialise the processor and the peripherals
+	#call		SYMBOL_NAME(processor_init)
+	#call		SYMBOL_NAME(unit_init)
+	#LEDS		0x0aff
+
+	sethi.p		#0xe5e5,gr3
+	setlo		#0xe5e5,gr3
+	or.p		gr3,gr0,gr4
+	or		gr3,gr0,gr5
+	or.p		gr3,gr0,gr6
+	or		gr3,gr0,gr7
+	or.p		gr3,gr0,gr8
+	or		gr3,gr0,gr9
+	or.p		gr3,gr0,gr10
+	or		gr3,gr0,gr11
+	or.p		gr3,gr0,gr12
+	or		gr3,gr0,gr13
+	or.p		gr3,gr0,gr14
+	or		gr3,gr0,gr17
+	or.p		gr3,gr0,gr18
+	or		gr3,gr0,gr19
+	or.p		gr3,gr0,gr20
+	or		gr3,gr0,gr21
+	or.p		gr3,gr0,gr23
+	or		gr3,gr0,gr24
+	or.p		gr3,gr0,gr25
+	or		gr3,gr0,gr26
+	or.p		gr3,gr0,gr27
+#	or		gr3,gr0,gr30
+	or		gr3,gr0,gr31
+	movgs		gr0,lr
+	movgs		gr0,lcr
+	movgs		gr0,ccr
+	movgs		gr0,cccr
+
+#ifdef CONFIG_MMU
+	movgs		gr3,scr2
+	movgs		gr3,scr3
+#endif
+
+	LEDS		0x0fff
+
+	# invoke the debugging stub if present
+	# - arch/frv/kernel/debug-stub.c will shift control directly to init/main.c
+	#   (it will not return here)
+	break
+	.globl		__debug_stub_init_break
+__debug_stub_init_break:
+
+	# however, if you need to use an ICE, and don't care about using any userspace
+	# debugging tools (such as the ptrace syscall), you can just step over the break
+	# above and get to the kernel this way
+	# look at arch/frv/kernel/debug-stub.c: debug_stub_init() to see what you've missed
+	call		start_kernel
+
+	.globl		__head_end
+__head_end:
+	.size		_boot, .-_boot
+
+	# provide a point for GDB to place a break
+	.section	.text.start,"ax"
+	.globl		_start
+	.balign		4
+_start:
+	call		_boot
+
+	.previous
+###############################################################################
+#
+# split a tile off of the region defined by GR8-GR9
+#
+#	ENTRY:			EXIT:
+# GR4	-			IAMPR value representing tile
+# GR5	-			DAMPR value representing tile
+# GR6	-			IAMLR value representing tile
+# GR7	-			DAMLR value representing tile
+# GR8	region base pointer	[saved]
+# GR9	region top pointer	updated to exclude new tile
+# GR11	xAMLR mask		[saved]
+# GR25	SDRAM size		[saved]
+# GR30	LED address		[saved]
+#
+# - GR8 and GR9 should be rounded up/down to the nearest megabyte before calling
+#
+###############################################################################
+	.globl		__head_split_region
+	.type		__head_split_region,@function
+__head_split_region:
+	subcc.p		gr9,gr8,gr4,icc0
+	setlos		#31,gr5
+	scan.p		gr4,gr0,gr6
+	beq		icc0,#0,__head_region_empty
+	sub.p		gr5,gr6,gr6			; bit number of highest set bit (1MB=>20)
+	setlos		#1,gr4
+	sll.p		gr4,gr6,gr4			; size of region (1 << bitno)
+	subi		gr6,#17,gr6			; 1MB => 0x03
+	slli.p		gr6,#4,gr6			; 1MB => 0x30
+	sub		gr9,gr4,gr9			; move uncovered top down
+
+	or		gr9,gr6,gr4
+	ori		gr4,#xAMPRx_S_USER|xAMPRx_C_CACHED|xAMPRx_V,gr4
+	or.p		gr4,gr0,gr5
+
+	and		gr4,gr11,gr6
+	and.p		gr5,gr11,gr7
+	bralr
+
+__head_region_empty:
+	or.p		gr0,gr0,gr4
+	or		gr0,gr0,gr5
+	or.p		gr0,gr0,gr6
+	or		gr0,gr0,gr7
+	bralr
+	.size		__head_split_region, .-__head_split_region
+
+###############################################################################
+#
+# write the 32-bit hex number in GR8 to ttyS0
+#
+###############################################################################
+#if 0
+	.globl		__head_write_to_ttyS0
+	.type		__head_write_to_ttyS0,@function
+__head_write_to_ttyS0:
+	sethi.p		%hi(0xfeff9c00),gr31
+	setlo		%lo(0xfeff9c00),gr31
+	setlos		#8,gr20
+
+0:	ldubi		@(gr31,#5*8),gr21
+	andi		gr21,#0x60,gr21
+	subicc		gr21,#0x60,gr21,icc0
+	bne		icc0,#0,0b
+
+1:	srli		gr8,#28,gr21
+	slli		gr8,#4,gr8
+
+	addi		gr21,#'0',gr21
+	subicc		gr21,#'9',gr0,icc0
+	bls		icc0,#2,2f
+	addi		gr21,#'A'-'0'-10,gr21
+2:
+	stbi		gr21,@(gr31,#0*8)
+	subicc		gr20,#1,gr20,icc0
+	bhi		icc0,#2,1b
+
+	setlos		#'\r',gr21
+	stbi		gr21,@(gr31,#0*8)
+
+	setlos		#'\n',gr21
+	stbi		gr21,@(gr31,#0*8)
+
+3:	ldubi		@(gr31,#5*8),gr21
+	andi		gr21,#0x60,gr21
+	subicc		gr21,#0x60,gr21,icc0
+	bne		icc0,#0,3b
+	bralr
+
+	.size		__head_write_to_ttyS0, .-__head_write_to_ttyS0
+#endif
diff -Nru a/arch/frv/kernel/head.inc b/arch/frv/kernel/head.inc
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/kernel/head.inc	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,50 @@
+/* head.inc: head common definitions -*- asm -*-
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+
+#if defined(CONFIG_MB93090_MB00)
+#define LED_ADDR (0x21200000+4)
+
+.macro LEDS val
+	sethi.p		%hi(0xFFC00030),gr3
+	setlo		%lo(0xFFC00030),gr3
+	lduh		@(gr3,gr0),gr3
+	andicc		gr3,#0x100,gr0,icc0
+	bne		icc0,0,999f
+
+	setlos		#~\val,gr3
+	st		gr3,@(gr30,gr0)
+	membar
+	dcf		@(gr30,gr0)
+    999:
+.endm
+
+#elif defined(CONFIG_MB93093_PDK)
+#define LED_ADDR (0x20000023)
+
+.macro LEDS val
+	setlos		#\val,gr3
+	stb		gr3,@(gr30,gr0)
+	membar
+.endm
+
+#else
+#define LED_ADDR 0
+
+.macro LEDS val
+.endm
+#endif
+
+#ifdef CONFIG_MMU
+__sdram_base = 0x00000000		/* base address to which SDRAM relocated */
+#else
+__sdram_base = 0xc0000000		/* base address to which SDRAM relocated */
+#endif
diff -Nru a/arch/frv/kernel/init_task.c b/arch/frv/kernel/init_task.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/kernel/init_task.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,39 @@
+#include <linux/mm.h>
+#include <linux/module.h>
+#include <linux/sched.h>
+#include <linux/init.h>
+#include <linux/init_task.h>
+#include <linux/fs.h>
+#include <linux/mqueue.h>
+
+#include <asm/uaccess.h>
+#include <asm/pgtable.h>
+
+
+static struct fs_struct init_fs = INIT_FS;
+static struct files_struct init_files = INIT_FILES;
+static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
+static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
+struct mm_struct init_mm = INIT_MM(init_mm);
+
+EXPORT_SYMBOL(init_mm);
+
+/*
+ * Initial thread structure.
+ *
+ * We need to make sure that this is THREAD_SIZE aligned due to the
+ * way process stacks are handled. This is done by having a special
+ * "init_task" linker map entry..
+ */
+union thread_union init_thread_union
+	__attribute__((__section__(".data.init_task"))) =
+		{ INIT_THREAD_INFO(init_task) };
+
+/*
+ * Initial task structure.
+ *
+ * All other task structs will be allocated on slabs in fork.c
+ */
+struct task_struct init_task = INIT_TASK(init_task);
+
+EXPORT_SYMBOL(init_task);
diff -Nru a/arch/frv/kernel/irq-mb93091.c b/arch/frv/kernel/irq-mb93091.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/kernel/irq-mb93091.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,116 @@
+/* irq-mb93091.c: MB93091 FPGA interrupt handling
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/config.h>
+#include <linux/ptrace.h>
+#include <linux/errno.h>
+#include <linux/signal.h>
+#include <linux/sched.h>
+#include <linux/ioport.h>
+#include <linux/interrupt.h>
+#include <linux/init.h>
+#include <linux/irq.h>
+
+#include <asm/io.h>
+#include <asm/system.h>
+#include <asm/bitops.h>
+#include <asm/delay.h>
+#include <asm/irq.h>
+#include <asm/irc-regs.h>
+#include <asm/irq-routing.h>
+
+#define __reg16(ADDR) (*(volatile unsigned short *)(ADDR))
+
+#define __get_IMR()	({ __reg16(0xffc00004); })
+#define __set_IMR(M)	do { __reg16(0xffc00004) = (M); wmb(); } while(0)
+#define __get_IFR()	({ __reg16(0xffc0000c); })
+#define __clr_IFR(M)	do { __reg16(0xffc0000c) = ~(M); wmb(); } while(0)
+
+static void frv_fpga_doirq(struct irq_source *source);
+static void frv_fpga_control(struct irq_group *group, int irq, int on);
+
+/*****************************************************************************/
+/*
+ * FPGA IRQ multiplexor
+ */
+static struct irq_source frv_fpga[4] = {
+#define __FPGA(X, M)					\
+	[X] = {						\
+		.muxname	= "fpga."#X,		\
+		.irqmask	= M,			\
+		.doirq		= frv_fpga_doirq,	\
+	}
+
+	__FPGA(0, 0x0028),
+	__FPGA(1, 0x0050),
+	__FPGA(2, 0x1c00),
+	__FPGA(3, 0x6386),
+};
+
+static struct irq_group frv_fpga_irqs = {
+	.first_irq	= IRQ_BASE_FPGA,
+	.control	= frv_fpga_control,
+	.sources = {
+		[ 1] = &frv_fpga[3],
+		[ 2] = &frv_fpga[3],
+		[ 3] = &frv_fpga[0],
+		[ 4] = &frv_fpga[1],
+		[ 5] = &frv_fpga[0],
+		[ 6] = &frv_fpga[1],
+		[ 7] = &frv_fpga[3],
+		[ 8] = &frv_fpga[3],
+		[ 9] = &frv_fpga[3],
+		[10] = &frv_fpga[2],
+		[11] = &frv_fpga[2],
+		[12] = &frv_fpga[2],
+		[13] = &frv_fpga[3],
+		[14] = &frv_fpga[3],
+	},
+};
+
+
+static void frv_fpga_control(struct irq_group *group, int index, int on)
+{
+	uint16_t imr = __get_IMR();
+
+	if (on)
+		imr &= ~(1 << index);
+	else
+		imr |= 1 << index;
+
+	__set_IMR(imr);
+}
+
+static void frv_fpga_doirq(struct irq_source *source)
+{
+	uint16_t mask, imr;
+
+	imr = __get_IMR();
+	mask = source->irqmask & ~imr & __get_IFR();
+	if (mask) {
+		__set_IMR(imr | mask);
+		__clr_IFR(mask);
+		distribute_irqs(&frv_fpga_irqs, mask);
+		__set_IMR(imr);
+	}
+}
+
+void __init fpga_init(void)
+{
+	__set_IMR(0x7ffe);
+	__clr_IFR(0x0000);
+
+	frv_irq_route_external(&frv_fpga[0], IRQ_CPU_EXTERNAL0);
+	frv_irq_route_external(&frv_fpga[1], IRQ_CPU_EXTERNAL1);
+	frv_irq_route_external(&frv_fpga[2], IRQ_CPU_EXTERNAL2);
+	frv_irq_route_external(&frv_fpga[3], IRQ_CPU_EXTERNAL3);
+	frv_irq_set_group(&frv_fpga_irqs);
+}
diff -Nru a/arch/frv/kernel/irq-mb93093.c b/arch/frv/kernel/irq-mb93093.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/kernel/irq-mb93093.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,99 @@
+/* irq-mb93093.c: MB93093 FPGA interrupt handling
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/config.h>
+#include <linux/ptrace.h>
+#include <linux/errno.h>
+#include <linux/signal.h>
+#include <linux/sched.h>
+#include <linux/ioport.h>
+#include <linux/interrupt.h>
+#include <linux/init.h>
+#include <linux/irq.h>
+
+#include <asm/io.h>
+#include <asm/system.h>
+#include <asm/bitops.h>
+#include <asm/delay.h>
+#include <asm/irq.h>
+#include <asm/irc-regs.h>
+#include <asm/irq-routing.h>
+
+#define __reg16(ADDR) (*(volatile unsigned short *)(__region_CS2 + (ADDR)))
+
+#define __get_IMR()	({ __reg16(0x0a); })
+#define __set_IMR(M)	do { __reg16(0x0a) = (M);  wmb(); } while(0)
+#define __get_IFR()	({ __reg16(0x02); })
+#define __clr_IFR(M)	do { __reg16(0x02) = ~(M); wmb(); } while(0)
+
+static void frv_fpga_doirq(struct irq_source *source);
+static void frv_fpga_control(struct irq_group *group, int irq, int on);
+
+/*****************************************************************************/
+/*
+ * FPGA IRQ multiplexor
+ */
+static struct irq_source frv_fpga[4] = {
+#define __FPGA(X, M)					\
+	[X] = {						\
+		.muxname	= "fpga."#X,		\
+		.irqmask	= M,			\
+		.doirq		= frv_fpga_doirq,	\
+	}
+
+	__FPGA(0, 0x0700),
+};
+
+static struct irq_group frv_fpga_irqs = {
+	.first_irq	= IRQ_BASE_FPGA,
+	.control	= frv_fpga_control,
+	.sources = {
+		[ 8] = &frv_fpga[0],
+		[ 9] = &frv_fpga[0],
+		[10] = &frv_fpga[0],
+	},
+};
+
+
+static void frv_fpga_control(struct irq_group *group, int index, int on)
+{
+	uint16_t imr = __get_IMR();
+
+	if (on)
+		imr &= ~(1 << index);
+	else
+		imr |= 1 << index;
+
+	__set_IMR(imr);
+}
+
+static void frv_fpga_doirq(struct irq_source *source)
+{
+	uint16_t mask, imr;
+
+	imr = __get_IMR();
+	mask = source->irqmask & ~imr & __get_IFR();
+	if (mask) {
+		__set_IMR(imr | mask);
+		__clr_IFR(mask);
+		distribute_irqs(&frv_fpga_irqs, mask);
+		__set_IMR(imr);
+	}
+}
+
+void __init fpga_init(void)
+{
+	__set_IMR(0x0700);
+	__clr_IFR(0x0000);
+
+	frv_irq_route_external(&frv_fpga[0], IRQ_CPU_EXTERNAL2);
+	frv_irq_set_group(&frv_fpga_irqs);
+}
diff -Nru a/arch/frv/kernel/irq-mb93493.c b/arch/frv/kernel/irq-mb93493.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/kernel/irq-mb93493.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,108 @@
+/* irq-mb93493.c: MB93493 companion chip interrupt handler
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/config.h>
+#include <linux/ptrace.h>
+#include <linux/errno.h>
+#include <linux/signal.h>
+#include <linux/sched.h>
+#include <linux/ioport.h>
+#include <linux/interrupt.h>
+#include <linux/init.h>
+#include <linux/irq.h>
+
+#include <asm/io.h>
+#include <asm/system.h>
+#include <asm/bitops.h>
+#include <asm/delay.h>
+#include <asm/irq.h>
+#include <asm/irc-regs.h>
+#include <asm/irq-routing.h>
+#include <asm/mb93493-irqs.h>
+
+static void frv_mb93493_doirq(struct irq_source *source);
+
+/*****************************************************************************/
+/*
+ * MB93493 companion chip IRQ multiplexor
+ */
+static struct irq_source frv_mb93493[2] = {
+	[0] = {
+		.muxname		= "mb93493.0",
+		.muxdata		= __region_CS3 + 0x3d0,
+		.doirq			= frv_mb93493_doirq,
+		.irqmask		= 0x0000,
+	},
+	[1] = {
+		.muxname		= "mb93493.1",
+		.muxdata		= __region_CS3 + 0x3d4,
+		.doirq			= frv_mb93493_doirq,
+		.irqmask		= 0x0000,
+	},
+};
+
+static void frv_mb93493_control(struct irq_group *group, int index, int on)
+{
+	struct irq_source *source;
+	uint32_t iqsr;
+
+	if ((frv_mb93493[0].irqmask & (1 << index)))
+		source = &frv_mb93493[0];
+	else
+		source = &frv_mb93493[1];
+
+	iqsr = readl(source->muxdata);
+	if (on)
+		iqsr |= 1 << (index + 16);
+	else
+		iqsr &= ~(1 << (index + 16));
+
+	writel(iqsr, source->muxdata);
+}
+
+static struct irq_group frv_mb93493_irqs = {
+	.first_irq	= IRQ_BASE_MB93493,
+	.control	= frv_mb93493_control,
+};
+
+static void frv_mb93493_doirq(struct irq_source *source)
+{
+	uint32_t mask = readl(source->muxdata);
+	mask = mask & (mask >> 16) & 0xffff;
+
+	if (mask)
+		distribute_irqs(&frv_mb93493_irqs, mask);
+}
+
+static void __init mb93493_irq_route(int irq, int source)
+{
+	frv_mb93493[source].irqmask |= 1 << (irq - IRQ_BASE_MB93493);
+	frv_mb93493_irqs.sources[irq - IRQ_BASE_MB93493] = &frv_mb93493[source];
+}
+
+void __init route_mb93493_irqs(void)
+{
+	frv_irq_route_external(&frv_mb93493[0], IRQ_CPU_MB93493_0);
+	frv_irq_route_external(&frv_mb93493[1], IRQ_CPU_MB93493_1);
+
+	frv_irq_set_group(&frv_mb93493_irqs);
+
+	mb93493_irq_route(IRQ_MB93493_VDC,		IRQ_MB93493_VDC_ROUTE);
+	mb93493_irq_route(IRQ_MB93493_VCC,		IRQ_MB93493_VCC_ROUTE);
+	mb93493_irq_route(IRQ_MB93493_AUDIO_IN,		IRQ_MB93493_AUDIO_IN_ROUTE);
+	mb93493_irq_route(IRQ_MB93493_I2C_0,		IRQ_MB93493_I2C_0_ROUTE);
+	mb93493_irq_route(IRQ_MB93493_I2C_1,		IRQ_MB93493_I2C_1_ROUTE);
+	mb93493_irq_route(IRQ_MB93493_USB,		IRQ_MB93493_USB_ROUTE);
+	mb93493_irq_route(IRQ_MB93493_LOCAL_BUS,	IRQ_MB93493_LOCAL_BUS_ROUTE);
+	mb93493_irq_route(IRQ_MB93493_PCMCIA,		IRQ_MB93493_PCMCIA_ROUTE);
+	mb93493_irq_route(IRQ_MB93493_GPIO,		IRQ_MB93493_GPIO_ROUTE);
+	mb93493_irq_route(IRQ_MB93493_AUDIO_OUT,	IRQ_MB93493_AUDIO_OUT_ROUTE);
+}
diff -Nru a/arch/frv/kernel/irq-routing.c b/arch/frv/kernel/irq-routing.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/kernel/irq-routing.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,291 @@
+/* irq-routing.c: IRQ routing
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/sched.h>
+#include <linux/random.h>
+#include <linux/init.h>
+#include <linux/serial_reg.h>
+#include <asm/io.h>
+#include <asm/irq-routing.h>
+#include <asm/irc-regs.h>
+#include <asm/serial-regs.h>
+#include <asm/dma.h>
+
+struct irq_level frv_irq_levels[16] = {
+	[0 ... 15] = {
+		.lock	= SPIN_LOCK_UNLOCKED,
+	}
+};
+
+struct irq_group *irq_groups[NR_IRQ_GROUPS];
+
+extern struct irq_group frv_cpu_irqs;
+
+void __init frv_irq_route(struct irq_source *source, int irqlevel)
+{
+	source->level = &frv_irq_levels[irqlevel];
+	source->next = frv_irq_levels[irqlevel].sources;
+	frv_irq_levels[irqlevel].sources = source;
+}
+
+void __init frv_irq_route_external(struct irq_source *source, int irq)
+{
+	int irqlevel = 0;
+
+	switch (irq) {
+	case IRQ_CPU_EXTERNAL0:	irqlevel = IRQ_XIRQ0_LEVEL; break;
+	case IRQ_CPU_EXTERNAL1:	irqlevel = IRQ_XIRQ1_LEVEL; break;
+	case IRQ_CPU_EXTERNAL2:	irqlevel = IRQ_XIRQ2_LEVEL; break;
+	case IRQ_CPU_EXTERNAL3:	irqlevel = IRQ_XIRQ3_LEVEL; break;
+	case IRQ_CPU_EXTERNAL4:	irqlevel = IRQ_XIRQ4_LEVEL; break;
+	case IRQ_CPU_EXTERNAL5:	irqlevel = IRQ_XIRQ5_LEVEL; break;
+	case IRQ_CPU_EXTERNAL6:	irqlevel = IRQ_XIRQ6_LEVEL; break;
+	case IRQ_CPU_EXTERNAL7:	irqlevel = IRQ_XIRQ7_LEVEL; break;
+	default: BUG();
+	}
+
+	source->level = &frv_irq_levels[irqlevel];
+	source->next = frv_irq_levels[irqlevel].sources;
+	frv_irq_levels[irqlevel].sources = source;
+}
+
+void __init frv_irq_set_group(struct irq_group *group)
+{
+	irq_groups[group->first_irq >> NR_IRQ_LOG2_ACTIONS_PER_GROUP] = group;
+}
+
+void distribute_irqs(struct irq_group *group, unsigned long irqmask)
+{
+	struct irqaction *action;
+	int irq;
+
+	while (irqmask) {
+		asm("scan %1,gr0,%0" : "=r"(irq) : "r"(irqmask));
+		if (irq < 0 || irq > 31)
+			asm volatile("break");
+		irq = 31 - irq;
+
+		irqmask &= ~(1 << irq);
+		action = group->actions[irq];
+
+		irq += group->first_irq;
+
+		if (action) {
+			int status = 0;
+
+//			if (!(action->flags & SA_INTERRUPT))
+//				sti();
+
+			do {
+				status |= action->flags;
+				action->handler(irq, action->dev_id, __frame);
+				action = action->next;
+			} while (action);
+
+			if (status & SA_SAMPLE_RANDOM)
+				add_interrupt_randomness(irq);
+			cli();
+		}
+	}
+}
+
+/*****************************************************************************/
+/*
+ * CPU UART interrupts
+ */
+static void frv_cpuuart_doirq(struct irq_source *source)
+{
+//	uint8_t iir = readb(source->muxdata + UART_IIR * 8);
+//	if ((iir & 0x0f) != UART_IIR_NO_INT)
+		distribute_irqs(&frv_cpu_irqs, source->irqmask);
+}
+
+struct irq_source frv_cpuuart[2] = {
+#define __CPUUART(X, A)						\
+	[X] = {							\
+		.muxname	= "uart",			\
+		.muxdata	= (volatile void __iomem *) A,	\
+		.irqmask	= 1 << IRQ_CPU_UART##X,		\
+		.doirq		= frv_cpuuart_doirq,		\
+	}
+
+	__CPUUART(0, UART0_BASE),
+	__CPUUART(1, UART1_BASE),
+};
+
+/*****************************************************************************/
+/*
+ * CPU DMA interrupts
+ */
+static void frv_cpudma_doirq(struct irq_source *source)
+{
+	uint32_t cstr = readl(source->muxdata + DMAC_CSTRx);
+	if (cstr & DMAC_CSTRx_INT)
+		distribute_irqs(&frv_cpu_irqs, source->irqmask);
+}
+
+struct irq_source frv_cpudma[8] = {
+#define __CPUDMA(X, A)						\
+	[X] = {							\
+		.muxname	= "dma",			\
+		.muxdata	= (volatile void __iomem *) A,	\
+		.irqmask	= 1 << IRQ_CPU_DMA##X,		\
+		.doirq		= frv_cpudma_doirq,		\
+	}
+
+	__CPUDMA(0, 0xfe000900),
+	__CPUDMA(1, 0xfe000980),
+	__CPUDMA(2, 0xfe000a00),
+	__CPUDMA(3, 0xfe000a80),
+	__CPUDMA(4, 0xfe001000),
+	__CPUDMA(5, 0xfe001080),
+	__CPUDMA(6, 0xfe001100),
+	__CPUDMA(7, 0xfe001180),
+};
+
+/*****************************************************************************/
+/*
+ * CPU timer interrupts - can't tell whether they've generated an interrupt or not
+ */
+static void frv_cputimer_doirq(struct irq_source *source)
+{
+	distribute_irqs(&frv_cpu_irqs, source->irqmask);
+}
+
+struct irq_source frv_cputimer[3] = {
+#define __CPUTIMER(X)						\
+	[X] = {							\
+		.muxname	= "timer",			\
+		.muxdata	= 0,				\
+		.irqmask	= 1 << IRQ_CPU_TIMER##X,	\
+		.doirq		= frv_cputimer_doirq,		\
+	}
+
+	__CPUTIMER(0),
+	__CPUTIMER(1),
+	__CPUTIMER(2),
+};
+
+/*****************************************************************************/
+/*
+ * external CPU interrupts - can't tell directly whether they've generated an interrupt or not
+ */
+static void frv_cpuexternal_doirq(struct irq_source *source)
+{
+	distribute_irqs(&frv_cpu_irqs, source->irqmask);
+}
+
+struct irq_source frv_cpuexternal[8] = {
+#define __CPUEXTERNAL(X)					\
+	[X] = {							\
+		.muxname	= "ext",			\
+		.muxdata	= 0,				\
+		.irqmask	= 1 << IRQ_CPU_EXTERNAL##X,	\
+		.doirq		= frv_cpuexternal_doirq,	\
+	}
+
+	__CPUEXTERNAL(0),
+	__CPUEXTERNAL(1),
+	__CPUEXTERNAL(2),
+	__CPUEXTERNAL(3),
+	__CPUEXTERNAL(4),
+	__CPUEXTERNAL(5),
+	__CPUEXTERNAL(6),
+	__CPUEXTERNAL(7),
+};
+
+#define set_IRR(N,A,B,C,D) __set_IRR(N, (A << 28) | (B << 24) | (C << 20) | (D << 16))
+
+struct irq_group frv_cpu_irqs = {
+	.sources = {
+		[IRQ_CPU_UART0]		= &frv_cpuuart[0],
+		[IRQ_CPU_UART1]		= &frv_cpuuart[1],
+		[IRQ_CPU_TIMER0]	= &frv_cputimer[0],
+		[IRQ_CPU_TIMER1]	= &frv_cputimer[1],
+		[IRQ_CPU_TIMER2]	= &frv_cputimer[2],
+		[IRQ_CPU_DMA0]		= &frv_cpudma[0],
+		[IRQ_CPU_DMA1]		= &frv_cpudma[1],
+		[IRQ_CPU_DMA2]		= &frv_cpudma[2],
+		[IRQ_CPU_DMA3]		= &frv_cpudma[3],
+		[IRQ_CPU_DMA4]		= &frv_cpudma[4],
+		[IRQ_CPU_DMA5]		= &frv_cpudma[5],
+		[IRQ_CPU_DMA6]		= &frv_cpudma[6],
+		[IRQ_CPU_DMA7]		= &frv_cpudma[7],
+		[IRQ_CPU_EXTERNAL0]	= &frv_cpuexternal[0],
+		[IRQ_CPU_EXTERNAL1]	= &frv_cpuexternal[1],
+		[IRQ_CPU_EXTERNAL2]	= &frv_cpuexternal[2],
+		[IRQ_CPU_EXTERNAL3]	= &frv_cpuexternal[3],
+		[IRQ_CPU_EXTERNAL4]	= &frv_cpuexternal[4],
+		[IRQ_CPU_EXTERNAL5]	= &frv_cpuexternal[5],
+		[IRQ_CPU_EXTERNAL6]	= &frv_cpuexternal[6],
+		[IRQ_CPU_EXTERNAL7]	= &frv_cpuexternal[7],
+	},
+};
+
+/*****************************************************************************/
+/*
+ * route the CPU's interrupt sources
+ */
+void __init route_cpu_irqs(void)
+{
+	frv_irq_set_group(&frv_cpu_irqs);
+
+	__set_IITMR(0, 0x003f0000);	/* DMA0-3, TIMER0-2 IRQ detect levels */
+	__set_IITMR(1, 0x20000000);	/* ERR0-1, UART0-1, DMA4-7 IRQ detect levels */
+
+	/* route UART and error interrupts */
+	frv_irq_route(&frv_cpuuart[0],	IRQ_UART0_LEVEL);
+	frv_irq_route(&frv_cpuuart[1],	IRQ_UART1_LEVEL);
+
+	set_IRR(6, IRQ_GDBSTUB_LEVEL, IRQ_GDBSTUB_LEVEL, IRQ_UART1_LEVEL, IRQ_UART0_LEVEL);
+
+	/* route DMA channel interrupts */
+	frv_irq_route(&frv_cpudma[0],	IRQ_DMA0_LEVEL);
+	frv_irq_route(&frv_cpudma[1],	IRQ_DMA1_LEVEL);
+	frv_irq_route(&frv_cpudma[2],	IRQ_DMA2_LEVEL);
+	frv_irq_route(&frv_cpudma[3],	IRQ_DMA3_LEVEL);
+	frv_irq_route(&frv_cpudma[4],	IRQ_DMA4_LEVEL);
+	frv_irq_route(&frv_cpudma[5],	IRQ_DMA5_LEVEL);
+	frv_irq_route(&frv_cpudma[6],	IRQ_DMA6_LEVEL);
+	frv_irq_route(&frv_cpudma[7],	IRQ_DMA7_LEVEL);
+
+	set_IRR(4, IRQ_DMA3_LEVEL, IRQ_DMA2_LEVEL, IRQ_DMA1_LEVEL, IRQ_DMA0_LEVEL);
+	set_IRR(7, IRQ_DMA7_LEVEL, IRQ_DMA6_LEVEL, IRQ_DMA5_LEVEL, IRQ_DMA4_LEVEL);
+
+	/* route timer interrupts */
+	frv_irq_route(&frv_cputimer[0],	IRQ_TIMER0_LEVEL);
+	frv_irq_route(&frv_cputimer[1],	IRQ_TIMER1_LEVEL);
+	frv_irq_route(&frv_cputimer[2],	IRQ_TIMER2_LEVEL);
+
+	set_IRR(5, 0, IRQ_TIMER2_LEVEL, IRQ_TIMER1_LEVEL, IRQ_TIMER0_LEVEL);
+
+	/* route external interrupts */
+	frv_irq_route(&frv_cpuexternal[0], IRQ_XIRQ0_LEVEL);
+	frv_irq_route(&frv_cpuexternal[1], IRQ_XIRQ1_LEVEL);
+	frv_irq_route(&frv_cpuexternal[2], IRQ_XIRQ2_LEVEL);
+	frv_irq_route(&frv_cpuexternal[3], IRQ_XIRQ3_LEVEL);
+	frv_irq_route(&frv_cpuexternal[4], IRQ_XIRQ4_LEVEL);
+	frv_irq_route(&frv_cpuexternal[5], IRQ_XIRQ5_LEVEL);
+	frv_irq_route(&frv_cpuexternal[6], IRQ_XIRQ6_LEVEL);
+	frv_irq_route(&frv_cpuexternal[7], IRQ_XIRQ7_LEVEL);
+
+	set_IRR(2, IRQ_XIRQ7_LEVEL, IRQ_XIRQ6_LEVEL, IRQ_XIRQ5_LEVEL, IRQ_XIRQ4_LEVEL);
+	set_IRR(3, IRQ_XIRQ3_LEVEL, IRQ_XIRQ2_LEVEL, IRQ_XIRQ1_LEVEL, IRQ_XIRQ0_LEVEL);
+
+#if defined(CONFIG_MB93091_VDK)
+	__set_TM1(0x55550000);		/* XIRQ7-0 all active low */
+#elif defined(CONFIG_MB93093_PDK)
+	__set_TM1(0x15550000);		/* XIRQ7 active high, 6-0 all active low */
+#else
+#error dont know external IRQ trigger levels for this setup
+#endif
+
+} /* end route_cpu_irqs() */
diff -Nru a/arch/frv/kernel/irq.c b/arch/frv/kernel/irq.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/kernel/irq.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,764 @@
+/* irq.c: FRV IRQ handling
+ *
+ * Copyright (C) 2003, 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+/*
+ * (mostly architecture independent, will move to kernel/irq.c in 2.5.)
+ *
+ * IRQs are in fact implemented a bit like signal handlers for the kernel.
+ * Naturally it's not a 1:1 relation, but there are similarities.
+ */
+
+#include <linux/config.h>
+#include <linux/ptrace.h>
+#include <linux/errno.h>
+#include <linux/signal.h>
+#include <linux/sched.h>
+#include <linux/ioport.h>
+#include <linux/interrupt.h>
+#include <linux/timex.h>
+#include <linux/slab.h>
+#include <linux/random.h>
+#include <linux/smp_lock.h>
+#include <linux/init.h>
+#include <linux/kernel_stat.h>
+#include <linux/irq.h>
+#include <linux/proc_fs.h>
+#include <linux/seq_file.h>
+
+#include <asm/atomic.h>
+#include <asm/io.h>
+#include <asm/smp.h>
+#include <asm/system.h>
+#include <asm/bitops.h>
+#include <asm/uaccess.h>
+#include <asm/pgalloc.h>
+#include <asm/delay.h>
+#include <asm/irq.h>
+#include <asm/irc-regs.h>
+#include <asm/irq-routing.h>
+#include <asm/gdb-stub.h>
+
+extern void __init fpga_init(void);
+extern void __init route_mb93493_irqs(void);
+
+static void register_irq_proc (unsigned int irq);
+
+/*
+ * Special irq handlers.
+ */
+
+irqreturn_t no_action(int cpl, void *dev_id, struct pt_regs *regs) { return IRQ_HANDLED; }
+
+atomic_t irq_err_count;
+
+/*
+ * Generic, controller-independent functions:
+ */
+int show_interrupts(struct seq_file *p, void *v)
+{
+	struct irqaction *action;
+	struct irq_group *group;
+	unsigned long flags;
+	int level, grp, ix, i, j;
+
+	i = *(loff_t *) v;
+
+	switch (i) {
+	case 0:
+		seq_printf(p, "           ");
+		for (j = 0; j < NR_CPUS; j++)
+			if (cpu_online(j))
+				seq_printf(p, "CPU%d       ",j);
+
+		seq_putc(p, '\n');
+		break;
+
+	case 1 ... NR_IRQ_GROUPS * NR_IRQ_ACTIONS_PER_GROUP:
+		local_irq_save(flags);
+
+		grp = (i - 1) / NR_IRQ_ACTIONS_PER_GROUP;
+		group = irq_groups[grp];
+		if (!group)
+			goto skip;
+
+		ix = (i - 1) % NR_IRQ_ACTIONS_PER_GROUP;
+		action = group->actions[ix];
+		if (!action)
+			goto skip;
+
+		seq_printf(p, "%3d: ", i - 1);
+
+#ifndef CONFIG_SMP
+		seq_printf(p, "%10u ", kstat_irqs(i));
+#else
+		for (j = 0; j < NR_CPUS; j++)
+			if (cpu_online(j))
+				seq_printf(p, "%10u ", kstat_cpu(j).irqs[i - 1]);
+#endif
+
+		level = group->sources[ix]->level - frv_irq_levels;
+
+		seq_printf(p, " %12s@%x", group->sources[ix]->muxname, level);
+		seq_printf(p, "  %s", action->name);
+
+		for (action = action->next; action; action = action->next)
+			seq_printf(p, ", %s", action->name);
+
+		seq_putc(p, '\n');
+skip:
+		local_irq_restore(flags);
+		break;
+
+	case NR_IRQ_GROUPS * NR_IRQ_ACTIONS_PER_GROUP + 1:
+		seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count));
+		break;
+
+	default:
+		break;
+	}
+
+	return 0;
+}
+
+
+/*
+ * Generic enable/disable code: this just calls
+ * down into the PIC-specific version for the actual
+ * hardware disable after having gotten the irq
+ * controller lock.
+ */
+
+/**
+ *	disable_irq_nosync - disable an irq without waiting
+ *	@irq: Interrupt to disable
+ *
+ *	Disable the selected interrupt line.  Disables and Enables are
+ *	nested.
+ *	Unlike disable_irq(), this function does not ensure existing
+ *	instances of the IRQ handler have completed before returning.
+ *
+ *	This function may be called from IRQ context.
+ */
+
+void disable_irq_nosync(unsigned int irq)
+{
+	struct irq_source *source;
+	struct irq_group *group;
+	struct irq_level *level;
+	unsigned long flags;
+	int idx = irq & (NR_IRQ_ACTIONS_PER_GROUP - 1);
+
+	group = irq_groups[irq >> NR_IRQ_LOG2_ACTIONS_PER_GROUP];
+	if (!group)
+		BUG();
+
+	source = group->sources[idx];
+	if (!source)
+		BUG();
+
+	level = source->level;
+
+	spin_lock_irqsave(&level->lock, flags);
+
+	if (group->control) {
+		if (!group->disable_cnt[idx]++)
+			group->control(group, idx, 0);
+	} else if (!level->disable_count++) {
+		__set_MASK(level - frv_irq_levels);
+	}
+
+	spin_unlock_irqrestore(&level->lock, flags);
+}
+
+/**
+ *	disable_irq - disable an irq and wait for completion
+ *	@irq: Interrupt to disable
+ *
+ *	Disable the selected interrupt line.  Enables and Disables are
+ *	nested.
+ *	This function waits for any pending IRQ handlers for this interrupt
+ *	to complete before returning. If you use this function while
+ *	holding a resource the IRQ handler may need you will deadlock.
+ *
+ *	This function may be called - with care - from IRQ context.
+ */
+
+void disable_irq(unsigned int irq)
+{
+	disable_irq_nosync(irq);
+
+#ifdef CONFIG_SMP
+	if (!local_irq_count(smp_processor_id())) {
+		do {
+			barrier();
+		} while (irq_desc[irq].status & IRQ_INPROGRESS);
+	}
+#endif
+}
+
+/**
+ *	enable_irq - enable handling of an irq
+ *	@irq: Interrupt to enable
+ *
+ *	Undoes the effect of one call to disable_irq().  If this
+ *	matches the last disable, processing of interrupts on this
+ *	IRQ line is re-enabled.
+ *
+ *	This function may be called from IRQ context.
+ */
+
+void enable_irq(unsigned int irq)
+{
+	struct irq_source *source;
+	struct irq_group *group;
+	struct irq_level *level;
+	unsigned long flags;
+	int idx = irq & (NR_IRQ_ACTIONS_PER_GROUP - 1);
+	int count;
+
+	group = irq_groups[irq >> NR_IRQ_LOG2_ACTIONS_PER_GROUP];
+	if (!group)
+		BUG();
+
+	source = group->sources[idx];
+	if (!source)
+		BUG();
+
+	level = source->level;
+
+	spin_lock_irqsave(&level->lock, flags);
+
+	if (group->control)
+		count = group->disable_cnt[idx];
+	else
+		count = level->disable_count;
+
+	switch (count) {
+	case 1:
+		if (group->control) {
+			if (group->actions[idx])
+				group->control(group, idx, 1);
+		} else {
+			if (level->usage)
+				__clr_MASK(level - frv_irq_levels);
+		}
+		/* fall-through */
+
+	default:
+		count--;
+		break;
+
+	case 0:
+		printk("enable_irq(%u) unbalanced from %p\n", irq, __builtin_return_address(0));
+	}
+
+	if (group->control)
+		group->disable_cnt[idx] = count;
+	else
+		level->disable_count = count;
+
+	spin_unlock_irqrestore(&level->lock, flags);
+}
+
+/*****************************************************************************/
+/*
+ * handles all normal device IRQ's
+ * - registers are referred to by the __frame variable (GR28)
+ * - IRQ distribution is complicated in this arch because of the many PICs, the
+ *   way they work and the way they cascade
+ */
+asmlinkage void do_IRQ(void)
+{
+	struct irq_source *source;
+	int level, cpu;
+
+	level = (__frame->tbr >> 4) & 0xf;
+	cpu = smp_processor_id();
+
+#if 0
+	{
+		static u32 irqcount;
+		*(volatile u32 *) 0xe1200004 = ~((irqcount++ << 8) | level);
+		*(volatile u16 *) 0xffc00100 = (u16) ~0x9999;
+		mb();
+	}
+#endif
+
+	if ((unsigned long) __frame - (unsigned long) (current + 1) < 512)
+		BUG();
+
+	__set_MASK(level);
+	__clr_RC(level);
+	__clr_IRL();
+
+	kstat_this_cpu.irqs[level]++;
+
+	irq_enter();
+
+	for (source = frv_irq_levels[level].sources; source; source = source->next)
+		source->doirq(source);
+
+	irq_exit();
+
+	__clr_MASK(level);
+
+	/* only process softirqs if we didn't interrupt another interrupt handler */
+	if ((__frame->psr & PSR_PIL) == PSR_PIL_0)
+		if (softirq_pending(cpu))
+			do_softirq();
+
+#ifdef CONFIG_PREEMPT
+	cli();
+	while (--current->preempt_count == 0) {
+		if (!(__frame->psr & PSR_S)
+		    || (current->need_resched == 0)
+		    || in_interrupt())
+			break;
+		current->preempt_count++;
+		sti();
+		preempt_schedule();
+		cli();
+	}
+#endif
+
+#if 0
+	{
+		*(volatile u16 *) 0xffc00100 = (u16) ~0x6666;
+		mb();
+	}
+#endif
+
+} /* end do_IRQ() */
+
+/*****************************************************************************/
+/*
+ * handles all NMIs when not co-opted by the debugger
+ * - registers are referred to by the __frame variable (GR28)
+ */
+asmlinkage void do_NMI(void)
+{
+} /* end do_NMI() */
+
+/*****************************************************************************/
+/**
+ *	request_irq - allocate an interrupt line
+ *	@irq: Interrupt line to allocate
+ *	@handler: Function to be called when the IRQ occurs
+ *	@irqflags: Interrupt type flags
+ *	@devname: An ascii name for the claiming device
+ *	@dev_id: A cookie passed back to the handler function
+ *
+ *	This call allocates interrupt resources and enables the
+ *	interrupt line and IRQ handling. From the point this
+ *	call is made your handler function may be invoked. Since
+ *	your handler function must clear any interrupt the board
+ *	raises, you must take care both to initialise your hardware
+ *	and to set up the interrupt handler in the right order.
+ *
+ *	Dev_id must be globally unique. Normally the address of the
+ *	device data structure is used as the cookie. Since the handler
+ *	receives this value it makes sense to use it.
+ *
+ *	If your interrupt is shared you must pass a non NULL dev_id
+ *	as this is required when freeing the interrupt.
+ *
+ *	Flags:
+ *
+ *	SA_SHIRQ		Interrupt is shared
+ *
+ *	SA_INTERRUPT		Disable local interrupts while processing
+ *
+ *	SA_SAMPLE_RANDOM	The interrupt can be used for entropy
+ *
+ */
+
+int request_irq(unsigned int irq,
+		irqreturn_t (*handler)(int, void *, struct pt_regs *),
+		unsigned long irqflags,
+		const char * devname,
+		void *dev_id)
+{
+	int retval;
+	struct irqaction *action;
+
+#if 1
+	/*
+	 * Sanity-check: shared interrupts should REALLY pass in
+	 * a real dev-ID, otherwise we'll have trouble later trying
+	 * to figure out which interrupt is which (messes up the
+	 * interrupt freeing logic etc).
+	 */
+	if (irqflags & SA_SHIRQ) {
+		if (!dev_id)
+			printk("Bad boy: %s (at 0x%x) called us without a dev_id!\n",
+			       devname, (&irq)[-1]);
+	}
+#endif
+
+	if ((irq >> NR_IRQ_LOG2_ACTIONS_PER_GROUP) >= NR_IRQ_GROUPS)
+		return -EINVAL;
+	if (!handler)
+		return -EINVAL;
+
+	action = (struct irqaction *) kmalloc(sizeof(struct irqaction), GFP_KERNEL);
+	if (!action)
+		return -ENOMEM;
+
+	action->handler = handler;
+	action->flags = irqflags;
+	action->mask = CPU_MASK_NONE;
+	action->name = devname;
+	action->next = NULL;
+	action->dev_id = dev_id;
+
+	retval = setup_irq(irq, action);
+	if (retval)
+		kfree(action);
+	return retval;
+}
+
+/**
+ *	free_irq - free an interrupt
+ *	@irq: Interrupt line to free
+ *	@dev_id: Device identity to free
+ *
+ *	Remove an interrupt handler. The handler is removed and if the
+ *	interrupt line is no longer in use by any driver it is disabled.
+ *	On a shared IRQ the caller must ensure the interrupt is disabled
+ *	on the card it drives before calling this function. The function
+ *	does not return until any executing interrupts for this IRQ
+ *	have completed.
+ *
+ *	This function may be called from interrupt context.
+ *
+ *	Bugs: Attempting to free an irq in a handler for the same irq hangs
+ *	      the machine.
+ */
+
+void free_irq(unsigned int irq, void *dev_id)
+{
+	struct irq_source *source;
+	struct irq_group *group;
+	struct irq_level *level;
+	struct irqaction **p, **pp;
+	unsigned long flags;
+
+	if ((irq >> NR_IRQ_LOG2_ACTIONS_PER_GROUP) >= NR_IRQ_GROUPS)
+		return;
+
+	group = irq_groups[irq >> NR_IRQ_LOG2_ACTIONS_PER_GROUP];
+	if (!group)
+		BUG();
+
+	source = group->sources[irq & (NR_IRQ_ACTIONS_PER_GROUP - 1)];
+	if (!source)
+		BUG();
+
+	level = source->level;
+	p = &group->actions[irq & (NR_IRQ_ACTIONS_PER_GROUP - 1)];
+
+	spin_lock_irqsave(&level->lock, flags);
+
+	for (pp = p; *pp; pp = &(*pp)->next) {
+		struct irqaction *action = *pp;
+
+		if (action->dev_id != dev_id)
+			continue;
+
+		/* found it - remove from the list of entries */
+		*pp = action->next;
+
+		level->usage--;
+
+		if (p == pp && group->control)
+			group->control(group, irq & (NR_IRQ_ACTIONS_PER_GROUP - 1), 0);
+
+		if (level->usage == 0)
+			__set_MASK(level - frv_irq_levels);
+
+		spin_unlock_irqrestore(&level->lock,flags);
+
+#ifdef CONFIG_SMP
+		/* Wait to make sure it's not being used on another CPU */
+		while (desc->status & IRQ_INPROGRESS)
+			barrier();
+#endif
+		kfree(action);
+		return;
+	}
+}
+
+/*
+ * IRQ autodetection code..
+ *
+ * This depends on the fact that any interrupt that comes in on to an
+ * unassigned IRQ will cause GxICR_DETECT to be set
+ */
+
+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.
+ *
+ */
+
+unsigned long probe_irq_on(void)
+{
+	down(&probe_sem);
+	return 0;
+}
+
+/*
+ * Return a mask of triggered interrupts (this
+ * can handle only legacy ISA interrupts).
+ */
+
+/**
+ *	probe_irq_mask - scan a bitmap of interrupt lines
+ *	@val:	mask of interrupts to consider
+ *
+ *	Scan the ISA bus interrupt lines and return a bitmap of
+ *	active interrupts. The interrupt probe logic state is then
+ *	returned to its previous value.
+ *
+ *	Note: we need to scan all the irq's even though we will
+ *	only return ISA irq numbers - just so that we reset them
+ *	all to a known state.
+ */
+unsigned int probe_irq_mask(unsigned long xmask)
+{
+	up(&probe_sem);
+	return 0;
+}
+
+/*
+ * Return the one interrupt that triggered (this can
+ * handle any interrupt source).
+ */
+
+/**
+ *	probe_irq_off	- end an interrupt autodetect
+ *	@xmask: 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 xmask)
+{
+	up(&probe_sem);
+	return -1;
+}
+
+/* this was setup_x86_irq but it seems pretty generic */
+int setup_irq(unsigned int irq, struct irqaction *new)
+{
+	struct irq_source *source;
+	struct irq_group *group;
+	struct irq_level *level;
+	struct irqaction **p, **pp;
+	unsigned long flags;
+
+	group = irq_groups[irq >> NR_IRQ_LOG2_ACTIONS_PER_GROUP];
+	if (!group)
+		BUG();
+
+	source = group->sources[irq & (NR_IRQ_ACTIONS_PER_GROUP - 1)];
+	if (!source)
+		BUG();
+
+	level = source->level;
+
+	p = &group->actions[irq & (NR_IRQ_ACTIONS_PER_GROUP - 1)];
+
+	/*
+	 * Some drivers like serial.c use request_irq() heavily,
+	 * so we have to be careful not to interfere with a
+	 * running system.
+	 */
+	if (new->flags & SA_SAMPLE_RANDOM) {
+		/*
+		 * This function might sleep, we want to call it first,
+		 * outside of the atomic block.
+		 * Yes, this might clear the entropy pool if the wrong
+		 * driver is attempted to be loaded, without actually
+		 * installing a new handler, but is this really a problem,
+		 * only the sysadmin is able to do this.
+		 */
+		rand_initialize_irq(irq);
+	}
+
+	/* must juggle the interrupt processing stuff with interrupts disabled */
+	spin_lock_irqsave(&level->lock, flags);
+
+	/* can't share interrupts unless all parties agree to */
+	if (level->usage != 0 && !(level->flags & new->flags & SA_SHIRQ)) {
+		spin_unlock_irqrestore(&level->lock,flags);
+		return -EBUSY;
+	}
+
+	/* add new interrupt at end of irq queue */
+	pp = p;
+	while (*pp)
+		pp = &(*pp)->next;
+
+	*pp = new;
+
+	level->usage++;
+	level->flags = new->flags;
+
+	/* turn the interrupts on */
+	if (level->usage == 1)
+		__clr_MASK(level - frv_irq_levels);
+
+	if (p == pp && group->control)
+		group->control(group, irq & (NR_IRQ_ACTIONS_PER_GROUP - 1), 1);
+
+	spin_unlock_irqrestore(&level->lock, flags);
+	register_irq_proc(irq);
+	return 0;
+}
+
+static struct proc_dir_entry * root_irq_dir;
+static struct proc_dir_entry * irq_dir [NR_IRQS];
+
+#define HEX_DIGITS 8
+
+static unsigned int parse_hex_value (const char *buffer,
+				     unsigned long count, unsigned long *ret)
+{
+	unsigned char hexnum [HEX_DIGITS];
+	unsigned long value;
+	int i;
+
+	if (!count)
+		return -EINVAL;
+	if (count > HEX_DIGITS)
+		count = HEX_DIGITS;
+	if (copy_from_user(hexnum, buffer, count))
+		return -EFAULT;
+
+	/*
+	 * Parse the first 8 characters as a hex string, any non-hex char
+	 * is end-of-string. '00e1', 'e1', '00E1', 'E1' are all the same.
+	 */
+	value = 0;
+
+	for (i = 0; i < count; i++) {
+		unsigned int c = hexnum[i];
+
+		switch (c) {
+			case '0' ... '9': c -= '0'; break;
+			case 'a' ... 'f': c -= 'a'-10; break;
+			case 'A' ... 'F': c -= 'A'-10; break;
+		default:
+			goto out;
+		}
+		value = (value << 4) | c;
+	}
+out:
+	*ret = value;
+	return 0;
+}
+
+
+static int prof_cpu_mask_read_proc (char *page, char **start, off_t off,
+			int count, int *eof, void *data)
+{
+	unsigned long *mask = (unsigned long *) data;
+	if (count < HEX_DIGITS+1)
+		return -EINVAL;
+	return sprintf (page, "%08lx\n", *mask);
+}
+
+static int prof_cpu_mask_write_proc (struct file *file, const char *buffer,
+					unsigned long count, void *data)
+{
+	unsigned long *mask = (unsigned long *) data, full_count = count, err;
+	unsigned long new_value;
+
+	show_state();
+	err = parse_hex_value(buffer, count, &new_value);
+	if (err)
+		return err;
+
+	*mask = new_value;
+	return full_count;
+}
+
+#define MAX_NAMELEN 10
+
+static void register_irq_proc (unsigned int irq)
+{
+	char name [MAX_NAMELEN];
+
+	if (!root_irq_dir || irq_dir[irq])
+		return;
+
+	memset(name, 0, MAX_NAMELEN);
+	sprintf(name, "%d", irq);
+
+	/* create /proc/irq/1234 */
+	irq_dir[irq] = proc_mkdir(name, root_irq_dir);
+}
+
+unsigned long prof_cpu_mask = -1;
+
+void init_irq_proc (void)
+{
+	struct proc_dir_entry *entry;
+	int i;
+
+	/* create /proc/irq */
+	root_irq_dir = proc_mkdir("irq", 0);
+
+	/* create /proc/irq/prof_cpu_mask */
+	entry = create_proc_entry("prof_cpu_mask", 0600, root_irq_dir);
+	if (!entry)
+	    return;
+
+	entry->nlink = 1;
+	entry->data = (void *)&prof_cpu_mask;
+	entry->read_proc = prof_cpu_mask_read_proc;
+	entry->write_proc = prof_cpu_mask_write_proc;
+
+	/*
+	 * Create entries for all existing IRQs.
+	 */
+	for (i = 0; i < NR_IRQS; i++)
+		register_irq_proc(i);
+}
+
+/*****************************************************************************/
+/*
+ * initialise the interrupt system
+ */
+void __init init_IRQ(void)
+{
+	route_cpu_irqs();
+	fpga_init();
+#ifdef CONFIG_FUJITSU_MB93493
+	route_mb93493_irqs();
+#endif
+} /* end init_IRQ() */
diff -Nru a/arch/frv/kernel/kernel_thread.S b/arch/frv/kernel/kernel_thread.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/kernel/kernel_thread.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,77 @@
+/* kernel_thread.S: kernel thread creation
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/linkage.h>
+#include <asm/unistd.h>
+
+#define CLONE_VM	0x00000100	/* set if VM shared between processes */
+#define	KERN_ERR	"<3>"
+
+	.section .rodata
+kernel_thread_emsg:
+	.asciz	KERN_ERR "failed to create kernel thread: error=%d\n"
+
+	.text
+	.balign		4
+
+###############################################################################
+#
+# Create a kernel thread
+#
+# int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
+#
+###############################################################################
+	.globl		kernel_thread
+	.type		kernel_thread,@function
+kernel_thread:
+	or.p		gr8,gr0,gr4
+	or		gr9,gr0,gr5
+
+	# start by forking the current process, but with shared VM
+	setlos.p	#__NR_clone,gr7		; syscall number
+	ori		gr10,#CLONE_VM,gr8	; first syscall arg	[clone_flags]
+	sethi.p		#0xe4e4,gr9		; second syscall arg	[newsp]
+	setlo		#0xe4e4,gr9
+	setlos.p	#0,gr10			; third syscall arg	[parent_tidptr]
+	setlos		#0,gr11			; fourth syscall arg	[child_tidptr]
+	tira		gr0,#0
+	setlos.p	#4095,gr7
+	andcc		gr8,gr8,gr0,icc0
+	addcc.p		gr8,gr7,gr0,icc1
+	bnelr		icc0,#2
+	bc		icc1,#0,kernel_thread_error
+
+	# now invoke the work function
+	or		gr5,gr0,gr8
+	calll		@(gr4,gr0)
+
+	# and finally exit the thread
+	setlos		#__NR_exit,gr7		; syscall number
+	tira		gr0,#0
+
+kernel_thread_error:
+	subi		sp,#8,sp
+	movsg		lr,gr4
+	sti		gr8,@(sp,#0)
+	sti.p		gr4,@(sp,#4)
+
+	or		gr8,gr0,gr9
+	sethi.p		%hi(kernel_thread_emsg),gr8
+	setlo		%lo(kernel_thread_emsg),gr8
+
+	call		printk
+
+	ldi		@(sp,#4),gr4
+	ldi		@(sp,#0),gr8
+	subi		sp,#8,sp
+	jmpl		@(gr4,gr0)
+
+	.size		kernel_thread,.-kernel_thread
diff -Nru a/arch/frv/kernel/local.h b/arch/frv/kernel/local.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/kernel/local.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,56 @@
+/* local.h: local definitions
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+#ifndef _FRV_LOCAL_H
+#define _FRV_LOCAL_H
+
+#include <asm/sections.h>
+
+#ifndef __ASSEMBLY__
+
+/* dma.c */
+extern unsigned long frv_dma_inprogress;
+
+extern void frv_dma_pause_all(void);
+extern void frv_dma_resume_all(void);
+
+/* sleep.S */
+extern asmlinkage void frv_cpu_suspend(unsigned long);
+extern asmlinkage void frv_cpu_core_sleep(void);
+
+/* setup.c */
+extern unsigned long __nongprelbss pdm_suspend_mode;
+extern void determine_clocks(int verbose);
+extern int __nongprelbss clock_p0_current;
+extern int __nongprelbss clock_cm_current;
+extern int __nongprelbss clock_cmode_current;
+
+#ifdef CONFIG_PM
+extern int __nongprelbss clock_cmodes_permitted;
+extern unsigned long __nongprelbss clock_bits_settable;
+#define CLOCK_BIT_CM		0x0000000f
+#define CLOCK_BIT_CM_H		0x00000001	/* CLKC.CM can be set to 0 */
+#define CLOCK_BIT_CM_M		0x00000002	/* CLKC.CM can be set to 1 */
+#define CLOCK_BIT_CM_L		0x00000004	/* CLKC.CM can be set to 2 */
+#define CLOCK_BIT_P0		0x00000010	/* CLKC.P0 can be changed */
+#define CLOCK_BIT_CMODE		0x00000020	/* CLKC.CMODE can be changed */
+
+extern void (*__power_switch_wake_setup)(void);
+extern int  (*__power_switch_wake_check)(void);
+extern void (*__power_switch_wake_cleanup)(void);
+#endif
+
+/* time.c */
+extern void time_divisor_init(void);
+
+
+#endif /* __ASSEMBLY__ */
+#endif /* _FRV_LOCAL_H */
diff -Nru a/arch/frv/kernel/pm-mb93093.c b/arch/frv/kernel/pm-mb93093.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/kernel/pm-mb93093.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,66 @@
+/*
+ * FR-V MB93093 Power Management Routines
+ *
+ * Copyright (c) 2004 Red Hat, Inc.
+ *
+ * Written by: msalter@redhat.com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License.
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/init.h>
+#include <linux/pm.h>
+#include <linux/sched.h>
+#include <linux/interrupt.h>
+#include <linux/sysctl.h>
+#include <linux/errno.h>
+#include <linux/delay.h>
+#include <asm/uaccess.h>
+
+#include <asm/mb86943a.h>
+
+#include "local.h"
+
+static unsigned long imask;
+/*
+ * Setup interrupt masks, etc to enable wakeup by power switch
+ */
+static void mb93093_power_switch_setup(void)
+{
+	/* mask all but FPGA interrupt sources. */
+	imask = *(volatile unsigned long *)0xfeff9820;
+	*(volatile unsigned long *)0xfeff9820 = ~(1 << (IRQ_XIRQ2_LEVEL + 16)) & 0xfffe0000;
+}
+
+/*
+ * Cleanup interrupt masks, etc after wakeup by power switch
+ */
+static void mb93093_power_switch_cleanup(void)
+{
+	*(volatile unsigned long *)0xfeff9820 = imask;
+}
+
+/*
+ * Return non-zero if wakeup irq was caused by power switch
+ */
+static int mb93093_power_switch_check(void)
+{
+	return 1;
+}
+
+/*
+ * Initialize power interface
+ */
+static int __init mb93093_pm_init(void)
+{
+	__power_switch_wake_setup = mb93093_power_switch_setup;
+	__power_switch_wake_check = mb93093_power_switch_check;
+	__power_switch_wake_cleanup = mb93093_power_switch_cleanup;
+	return 0;
+}
+
+__initcall(mb93093_pm_init);
+
diff -Nru a/arch/frv/kernel/pm.c b/arch/frv/kernel/pm.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/kernel/pm.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,432 @@
+/*
+ * FR-V Power Management Routines
+ *
+ * Copyright (c) 2004 Red Hat, Inc.
+ *
+ * Based on SA1100 version:
+ * Copyright (c) 2001 Cliff Brake <cbrake@accelent.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License.
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/init.h>
+#include <linux/pm.h>
+#include <linux/sched.h>
+#include <linux/interrupt.h>
+#include <linux/sysctl.h>
+#include <linux/errno.h>
+#include <linux/delay.h>
+#include <asm/uaccess.h>
+
+#include <asm/mb86943a.h>
+
+#include "local.h"
+
+void (*pm_power_off)(void);
+
+extern void frv_change_cmode(int);
+
+/*
+ * Debug macros
+ */
+#define DEBUG
+
+int pm_do_suspend(void)
+{
+	cli();
+
+	__set_LEDS(0xb1);
+
+	/* go zzz */
+	frv_cpu_suspend(pdm_suspend_mode);
+
+	__set_LEDS(0xb2);
+
+	sti();
+
+	return 0;
+}
+
+static unsigned long __irq_mask;
+
+/*
+ * Setup interrupt masks, etc to enable wakeup by power switch
+ */
+static void __default_power_switch_setup(void)
+{
+	/* default is to mask all interrupt sources. */
+	__irq_mask = *(unsigned long *)0xfeff9820;
+	*(unsigned long *)0xfeff9820 = 0xfffe0000;
+}
+
+/*
+ * Cleanup interrupt masks, etc after wakeup by power switch
+ */
+static void __default_power_switch_cleanup(void)
+{
+	*(unsigned long *)0xfeff9820 = __irq_mask;
+}
+
+/*
+ * Return non-zero if wakeup irq was caused by power switch
+ */
+static int __default_power_switch_check(void)
+{
+	return 1;
+}
+
+void (*__power_switch_wake_setup)(void) = __default_power_switch_setup;
+int  (*__power_switch_wake_check)(void) = __default_power_switch_check;
+void (*__power_switch_wake_cleanup)(void) = __default_power_switch_cleanup;
+
+int pm_do_bus_sleep(void)
+{
+	cli();
+
+	/*
+         * Here is where we need some platform-dependent setup
+	 * of the interrupt state so that appropriate wakeup
+	 * sources are allowed and all others are masked.
+	 */
+	__power_switch_wake_setup();
+
+	__set_LEDS(0xa1);
+
+	/* go zzz
+	 *
+	 * This is in a loop in case power switch shares an irq with other
+	 * devices. The wake_check() tells us if we need to finish waking
+	 * or go back to sleep.
+	 */
+	do {
+		frv_cpu_suspend(HSR0_PDM_BUS_SLEEP);
+	} while (__power_switch_wake_check && !__power_switch_wake_check());
+
+	__set_LEDS(0xa2);
+
+	/*
+         * Here is where we need some platform-dependent restore
+	 * of the interrupt state prior to being called.
+	 */
+	__power_switch_wake_cleanup();
+
+	sti();
+
+	return 0;
+}
+
+unsigned long sleep_phys_sp(void *sp)
+{
+	return virt_to_phys(sp);
+}
+
+#ifdef CONFIG_SYSCTL
+/*
+ * Use a temporary sysctl number. Horrid, but will be cleaned up in 2.6
+ * when all the PM interfaces exist nicely.
+ */
+#define CTL_PM 9899
+#define CTL_PM_SUSPEND 1
+#define CTL_PM_CMODE 2
+#define CTL_PM_P0 4
+#define CTL_PM_CM 5
+
+static int user_atoi(char *ubuf, int len)
+{
+	char buf[16];
+	unsigned long ret;
+
+	if (len > 15)
+		return -EINVAL;
+
+	if (copy_from_user(buf, ubuf, len))
+		return -EFAULT;
+
+	buf[len] = 0;
+	ret = simple_strtoul(buf, NULL, 0);
+	if (ret > INT_MAX)
+		return -ERANGE;
+	return ret;
+}
+
+/*
+ * Send us to sleep.
+ */
+static int sysctl_pm_do_suspend(ctl_table *ctl, int write, struct file *filp,
+				void *buffer, size_t *lenp, loff_t *fpos)
+{
+	int retval, mode;
+
+	if (*lenp <= 0)
+		return -EIO;
+
+	mode = user_atoi(buffer, *lenp);
+	if ((mode != 1) && (mode != 5))
+		return -EINVAL;
+
+	retval = pm_send_all(PM_SUSPEND, (void *)3);
+
+	if (retval == 0) {
+		if (mode == 5)
+		    retval = pm_do_bus_sleep();
+		else
+		    retval = pm_do_suspend();
+		pm_send_all(PM_RESUME, (void *)0);
+	}
+
+	return retval;
+}
+
+static int try_set_cmode(int new_cmode)
+{
+	if (new_cmode > 15)
+		return -EINVAL;
+	if (!(clock_cmodes_permitted & (1<<new_cmode)))
+		return -EINVAL;
+
+	/* tell all the drivers we're suspending */
+	pm_send_all(PM_SUSPEND, (void *)3);
+
+	/* now change cmode */
+	cli();
+	frv_dma_pause_all();
+
+	frv_change_cmode(new_cmode);
+
+	determine_clocks(0);
+	time_divisor_init();
+
+#ifdef DEBUG
+	determine_clocks(1);
+#endif
+	frv_dma_resume_all();
+	sti();
+
+	/* tell all the drivers we're resuming */
+	pm_send_all(PM_RESUME, (void *)0);
+	return 0;
+}
+
+
+static int cmode_procctl(ctl_table *ctl, int write, struct file *filp,
+			 void *buffer, size_t *lenp, loff_t *fpos)
+{
+	int new_cmode;
+
+	if (!write)
+		return proc_dointvec(ctl, write, filp, buffer, lenp, fpos);
+
+	new_cmode = user_atoi(buffer, *lenp);
+
+	return try_set_cmode(new_cmode)?:*lenp;
+}
+
+static int cmode_sysctl(ctl_table *table, int *name, int nlen,
+			void *oldval, size_t *oldlenp,
+			void *newval, size_t newlen, void **context)
+{
+	if (oldval && oldlenp) {
+		size_t oldlen;
+
+		if (get_user(oldlen, oldlenp))
+			return -EFAULT;
+
+		if (oldlen != sizeof(int))
+			return -EINVAL;
+
+		if (put_user(clock_cmode_current, (unsigned int *)oldval) ||
+		    put_user(sizeof(int), oldlenp))
+			return -EFAULT;
+	}
+	if (newval && newlen) {
+		int new_cmode;
+
+		if (newlen != sizeof(int))
+			return -EINVAL;
+
+		if (get_user(new_cmode, (int *)newval))
+			return -EFAULT;
+
+		return try_set_cmode(new_cmode)?:1;
+	}
+	return 1;
+}
+
+static int try_set_p0(int new_p0)
+{
+	unsigned long flags, clkc;
+
+	if (new_p0 < 0 || new_p0 > 1)
+		return -EINVAL;
+
+	local_irq_save(flags);
+	__set_PSR(flags & ~PSR_ET);
+
+	frv_dma_pause_all();
+
+	clkc = __get_CLKC();
+	if (new_p0)
+		clkc |= CLKC_P0;
+	else
+		clkc &= ~CLKC_P0;
+	__set_CLKC(clkc);
+
+	determine_clocks(0);
+	time_divisor_init();
+
+#ifdef DEBUG
+	determine_clocks(1);
+#endif
+	frv_dma_resume_all();
+	local_irq_restore(flags);
+	return 0;
+}
+
+static int try_set_cm(int new_cm)
+{
+	unsigned long flags, clkc;
+
+	if (new_cm < 0 || new_cm > 1)
+		return -EINVAL;
+
+	local_irq_save(flags);
+	__set_PSR(flags & ~PSR_ET);
+
+	frv_dma_pause_all();
+
+	clkc = __get_CLKC();
+	clkc &= ~CLKC_CM;
+	clkc |= new_cm;
+	__set_CLKC(clkc);
+
+	determine_clocks(0);
+	time_divisor_init();
+
+#if 1 //def DEBUG
+	determine_clocks(1);
+#endif
+
+	frv_dma_resume_all();
+	local_irq_restore(flags);
+	return 0;
+}
+
+static int p0_procctl(ctl_table *ctl, int write, struct file *filp,
+		      void *buffer, size_t *lenp, loff_t *fpos)
+{
+	int new_p0;
+
+	if (!write)
+		return proc_dointvec(ctl, write, filp, buffer, lenp, fpos);
+
+	new_p0 = user_atoi(buffer, *lenp);
+
+	return try_set_p0(new_p0)?:*lenp;
+}
+
+static int p0_sysctl(ctl_table *table, int *name, int nlen,
+		     void *oldval, size_t *oldlenp,
+		     void *newval, size_t newlen, void **context)
+{
+	if (oldval && oldlenp) {
+		size_t oldlen;
+
+		if (get_user(oldlen, oldlenp))
+			return -EFAULT;
+
+		if (oldlen != sizeof(int))
+			return -EINVAL;
+
+		if (put_user(clock_p0_current, (unsigned int *)oldval) ||
+		    put_user(sizeof(int), oldlenp))
+			return -EFAULT;
+	}
+	if (newval && newlen) {
+		int new_p0;
+
+		if (newlen != sizeof(int))
+			return -EINVAL;
+
+		if (get_user(new_p0, (int *)newval))
+			return -EFAULT;
+
+		return try_set_p0(new_p0)?:1;
+	}
+	return 1;
+}
+
+static int cm_procctl(ctl_table *ctl, int write, struct file *filp,
+		      void *buffer, size_t *lenp, loff_t *fpos)
+{
+	int new_cm;
+
+	if (!write)
+		return proc_dointvec(ctl, write, filp, buffer, lenp, fpos);
+
+	new_cm = user_atoi(buffer, *lenp);
+
+	return try_set_cm(new_cm)?:*lenp;
+}
+
+static int cm_sysctl(ctl_table *table, int *name, int nlen,
+		     void *oldval, size_t *oldlenp,
+		     void *newval, size_t newlen, void **context)
+{
+	if (oldval && oldlenp) {
+		size_t oldlen;
+
+		if (get_user(oldlen, oldlenp))
+			return -EFAULT;
+
+		if (oldlen != sizeof(int))
+			return -EINVAL;
+
+		if (put_user(clock_cm_current, (unsigned int *)oldval) ||
+		    put_user(sizeof(int), oldlenp))
+			return -EFAULT;
+	}
+	if (newval && newlen) {
+		int new_cm;
+
+		if (newlen != sizeof(int))
+			return -EINVAL;
+
+		if (get_user(new_cm, (int *)newval))
+			return -EFAULT;
+
+		return try_set_cm(new_cm)?:1;
+	}
+	return 1;
+}
+
+
+static struct ctl_table pm_table[] =
+{
+	{CTL_PM_SUSPEND, "suspend", NULL, 0, 0200, NULL, &sysctl_pm_do_suspend},
+	{CTL_PM_CMODE, "cmode", &clock_cmode_current, sizeof(int), 0644, NULL, &cmode_procctl, &cmode_sysctl, NULL},
+	{CTL_PM_P0, "p0", &clock_p0_current, sizeof(int), 0644, NULL, &p0_procctl, &p0_sysctl, NULL},
+	{CTL_PM_CM, "cm", &clock_cm_current, sizeof(int), 0644, NULL, &cm_procctl, &cm_sysctl, NULL},
+	{0}
+};
+
+static struct ctl_table pm_dir_table[] =
+{
+	{CTL_PM, "pm", NULL, 0, 0555, pm_table},
+	{0}
+};
+
+/*
+ * Initialize power interface
+ */
+static int __init pm_init(void)
+{
+	register_sysctl_table(pm_dir_table, 1);
+	return 0;
+}
+
+__initcall(pm_init);
+
+#endif
diff -Nru a/arch/frv/kernel/process.c b/arch/frv/kernel/process.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/kernel/process.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,388 @@
+/* process.c: FRV specific parts of process handling
+ *
+ * Copyright (C) 2003-5 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ * - Derived from arch/m68k/kernel/process.c
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/config.h>
+#include <linux/errno.h>
+#include <linux/sched.h>
+#include <linux/kernel.h>
+#include <linux/mm.h>
+#include <linux/smp.h>
+#include <linux/smp_lock.h>
+#include <linux/stddef.h>
+#include <linux/unistd.h>
+#include <linux/ptrace.h>
+#include <linux/slab.h>
+#include <linux/user.h>
+#include <linux/elf.h>
+#include <linux/reboot.h>
+#include <linux/interrupt.h>
+
+#include <asm/uaccess.h>
+#include <asm/system.h>
+#include <asm/setup.h>
+#include <asm/pgtable.h>
+#include <asm/gdb-stub.h>
+#include <asm/mb-regs.h>
+
+#include "local.h"
+
+asmlinkage void ret_from_fork(void);
+
+#include <asm/pgalloc.h>
+
+struct task_struct *alloc_task_struct(void)
+{
+	struct task_struct *p = kmalloc(THREAD_SIZE, GFP_KERNEL);
+	if (p)
+		atomic_set((atomic_t *)(p+1), 1);
+	return p;
+}
+
+void free_task_struct(struct task_struct *p)
+{
+	if (atomic_dec_and_test((atomic_t *)(p+1)))
+		kfree(p);
+}
+
+static void core_sleep_idle(void)
+{
+#ifdef LED_DEBUG_SLEEP
+	/* Show that we're sleeping... */
+	__set_LEDS(0x55aa);
+#endif
+	frv_cpu_core_sleep();
+#ifdef LED_DEBUG_SLEEP
+	/* ... and that we woke up */
+	__set_LEDS(0);
+#endif
+	mb();
+}
+
+void (*idle)(void) = core_sleep_idle;
+
+/*
+ * The idle thread. There's no useful work to be
+ * done, so just try to conserve power and have a
+ * low exit latency (ie sit in a loop waiting for
+ * somebody to say that they'd like to reschedule)
+ */
+void cpu_idle(void)
+{
+	/* endless idle loop with no priority at all */
+	while (1) {
+		while (!need_resched()) {
+			irq_stat[smp_processor_id()].idle_timestamp = jiffies;
+
+			if (!frv_dma_inprogress && idle)
+				idle();
+		}
+
+		schedule();
+	}
+}
+
+void machine_restart(char * __unused)
+{
+	unsigned long reset_addr;
+#ifdef CONFIG_GDBSTUB
+	gdbstub_exit(0);
+#endif
+
+	if (PSR_IMPLE(__get_PSR()) == PSR_IMPLE_FR551)
+		reset_addr = 0xfefff500;
+	else
+		reset_addr = 0xfeff0500;
+
+	/* Software reset. */
+	asm volatile("      dcef @(gr0,gr0),1 ! membar !"
+		     "      sti     %1,@(%0,0) !"
+		     "      nop ! nop ! nop ! nop ! nop ! "
+		     "      nop ! nop ! nop ! nop ! nop ! "
+		     "      nop ! nop ! nop ! nop ! nop ! "
+		     "      nop ! nop ! nop ! nop ! nop ! "
+		     : : "r" (reset_addr), "r" (1) );
+
+	for (;;)
+		;
+}
+
+void machine_halt(void)
+{
+#ifdef CONFIG_GDBSTUB
+	gdbstub_exit(0);
+#endif
+
+	for (;;);
+}
+
+void machine_power_off(void)
+{
+#ifdef CONFIG_GDBSTUB
+	gdbstub_exit(0);
+#endif
+
+	for (;;);
+}
+
+void flush_thread(void)
+{
+#if 0 //ndef NO_FPU
+	unsigned long zero = 0;
+#endif
+	set_fs(USER_DS);
+}
+
+inline unsigned long user_stack(const struct pt_regs *regs)
+{
+	while (regs->next_frame)
+		regs = regs->next_frame;
+	return user_mode(regs) ? regs->sp : 0;
+}
+
+asmlinkage int sys_fork(void)
+{
+#ifndef CONFIG_MMU
+	/* fork almost works, enough to trick you into looking elsewhere:-( */
+	return -EINVAL;
+#else
+	return do_fork(SIGCHLD, user_stack(__frame), __frame, 0, NULL, NULL);
+#endif
+}
+
+asmlinkage int sys_vfork(void)
+{
+	return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, user_stack(__frame), __frame, 0,
+		       NULL, NULL);
+}
+
+/*****************************************************************************/
+/*
+ * clone a process
+ * - tlsptr is retrieved by copy_thread()
+ */
+asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp,
+			 int __user *parent_tidptr, int __user *child_tidptr,
+			 int __user *tlsptr)
+{
+	if (!newsp)
+		newsp = user_stack(__frame);
+	return do_fork(clone_flags, newsp, __frame, 0, parent_tidptr, child_tidptr);
+} /* end sys_clone() */
+
+/*****************************************************************************/
+/*
+ * This gets called before we allocate a new thread and copy
+ * the current task into it.
+ */
+void prepare_to_copy(struct task_struct *tsk)
+{
+	//unlazy_fpu(tsk);
+} /* end prepare_to_copy() */
+
+/*****************************************************************************/
+/*
+ * set up the kernel stack and exception frames for a new process
+ */
+int copy_thread(int nr, unsigned long clone_flags,
+		unsigned long usp, unsigned long topstk,
+		struct task_struct *p, struct pt_regs *regs)
+{
+	struct pt_regs *childregs0, *childregs, *regs0;
+
+	regs0 = __kernel_frame0_ptr;
+	childregs0 = (struct pt_regs *)
+		((unsigned long) p->thread_info + THREAD_SIZE - USER_CONTEXT_SIZE);
+	childregs = childregs0;
+
+	/* set up the userspace frame (the only place that the USP is stored) */
+	*childregs0 = *regs0;
+
+	childregs0->gr8		= 0;
+	childregs0->sp		= usp;
+	childregs0->next_frame	= NULL;
+
+	/* set up the return kernel frame if called from kernel_thread() */
+	if (regs != regs0) {
+		childregs--;
+		*childregs = *regs;
+		childregs->sp = (unsigned long) childregs0;
+		childregs->next_frame = childregs0;
+		childregs->gr15 = (unsigned long) p->thread_info;
+		childregs->gr29 = (unsigned long) p;
+	}
+
+	p->set_child_tid = p->clear_child_tid = NULL;
+
+	p->thread.frame	 = childregs;
+	p->thread.curr	 = p;
+	p->thread.sp	 = (unsigned long) childregs;
+	p->thread.fp	 = 0;
+	p->thread.lr	 = 0;
+	p->thread.pc	 = (unsigned long) ret_from_fork;
+	p->thread.frame0 = childregs0;
+
+	/* the new TLS pointer is passed in as arg #5 to sys_clone() */
+	if (clone_flags & CLONE_SETTLS)
+		childregs->gr29 = childregs->gr12;
+
+	save_user_regs(p->thread.user);
+
+	return 0;
+} /* end copy_thread() */
+
+/*
+ * fill in the user structure for a core dump..
+ */
+void dump_thread(struct pt_regs *regs, struct user *dump)
+{
+#if 0
+	/* changed the size calculations - should hopefully work better. lbt */
+	dump->magic = CMAGIC;
+	dump->start_code = 0;
+	dump->start_stack = user_stack(regs) & ~(PAGE_SIZE - 1);
+	dump->u_tsize = ((unsigned long) current->mm->end_code) >> PAGE_SHIFT;
+	dump->u_dsize = ((unsigned long) (current->mm->brk + (PAGE_SIZE-1))) >> PAGE_SHIFT;
+	dump->u_dsize -= dump->u_tsize;
+	dump->u_ssize = 0;
+
+	if (dump->start_stack < TASK_SIZE)
+		dump->u_ssize = ((unsigned long) (TASK_SIZE - dump->start_stack)) >> PAGE_SHIFT;
+
+	dump->regs = *(struct user_context *) regs;
+#endif
+}
+
+/*
+ * sys_execve() executes a new program.
+ */
+asmlinkage int sys_execve(char *name, char **argv, char **envp)
+{
+	int error;
+	char * filename;
+
+	lock_kernel();
+	filename = getname(name);
+	error = PTR_ERR(filename);
+	if (IS_ERR(filename))
+		goto out;
+	error = do_execve(filename, argv, envp, __frame);
+	putname(filename);
+ out:
+	unlock_kernel();
+	return error;
+}
+
+unsigned long get_wchan(struct task_struct *p)
+{
+	struct pt_regs *regs0;
+	unsigned long fp, pc;
+	unsigned long stack_limit;
+	int count = 0;
+	if (!p || p == current || p->state == TASK_RUNNING)
+		return 0;
+
+	stack_limit = (unsigned long) (p + 1);
+	fp = p->thread.fp;
+	regs0 = p->thread.frame0;
+
+	do {
+		if (fp < stack_limit || fp >= (unsigned long) regs0 || fp & 3)
+			return 0;
+
+		pc = ((unsigned long *) fp)[2];
+
+		/* FIXME: This depends on the order of these functions. */
+		if (!in_sched_functions(pc))
+			return pc;
+
+		fp = *(unsigned long *) fp;
+	} while (count++ < 16);
+
+	return 0;
+}
+
+unsigned long thread_saved_pc(struct task_struct *tsk)
+{
+	/* Check whether the thread is blocked in resume() */
+	if (in_sched_functions(tsk->thread.pc))
+		return ((unsigned long *)tsk->thread.fp)[2];
+	else
+		return tsk->thread.pc;
+}
+
+int elf_check_arch(const struct elf32_hdr *hdr)
+{
+	unsigned long hsr0 = __get_HSR(0);
+	unsigned long psr = __get_PSR();
+
+	if (hdr->e_machine != EM_FRV)
+		return 0;
+
+	switch (hdr->e_flags & EF_FRV_GPR_MASK) {
+	case EF_FRV_GPR64:
+		if ((hsr0 & HSR0_GRN) == HSR0_GRN_32)
+			return 0;
+	case EF_FRV_GPR32:
+	case 0:
+		break;
+	default:
+		return 0;
+	}
+
+	switch (hdr->e_flags & EF_FRV_FPR_MASK) {
+	case EF_FRV_FPR64:
+		if ((hsr0 & HSR0_FRN) == HSR0_FRN_32)
+			return 0;
+	case EF_FRV_FPR32:
+	case EF_FRV_FPR_NONE:
+	case 0:
+		break;
+	default:
+		return 0;
+	}
+
+	if ((hdr->e_flags & EF_FRV_MULADD) == EF_FRV_MULADD)
+		if (PSR_IMPLE(psr) != PSR_IMPLE_FR405 &&
+		    PSR_IMPLE(psr) != PSR_IMPLE_FR451)
+			return 0;
+
+	switch (hdr->e_flags & EF_FRV_CPU_MASK) {
+	case EF_FRV_CPU_GENERIC:
+		break;
+	case EF_FRV_CPU_FR300:
+	case EF_FRV_CPU_SIMPLE:
+	case EF_FRV_CPU_TOMCAT:
+	default:
+		return 0;
+	case EF_FRV_CPU_FR400:
+		if (PSR_IMPLE(psr) != PSR_IMPLE_FR401 &&
+		    PSR_IMPLE(psr) != PSR_IMPLE_FR405 &&
+		    PSR_IMPLE(psr) != PSR_IMPLE_FR451 &&
+		    PSR_IMPLE(psr) != PSR_IMPLE_FR551)
+			return 0;
+		break;
+	case EF_FRV_CPU_FR450:
+		if (PSR_IMPLE(psr) != PSR_IMPLE_FR451)
+			return 0;
+		break;
+	case EF_FRV_CPU_FR500:
+		if (PSR_IMPLE(psr) != PSR_IMPLE_FR501)
+			return 0;
+		break;
+	case EF_FRV_CPU_FR550:
+		if (PSR_IMPLE(psr) != PSR_IMPLE_FR551)
+			return 0;
+		break;
+	}
+
+	return 1;
+}
diff -Nru a/arch/frv/kernel/ptrace.c b/arch/frv/kernel/ptrace.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/kernel/ptrace.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,764 @@
+/* ptrace.c: FRV specific parts of process tracing
+ *
+ * Copyright (C) 2003-5 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ * - Derived from arch/m68k/kernel/ptrace.c
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/mm.h>
+#include <linux/smp.h>
+#include <linux/smp_lock.h>
+#include <linux/errno.h>
+#include <linux/ptrace.h>
+#include <linux/user.h>
+#include <linux/config.h>
+#include <linux/security.h>
+
+#include <asm/uaccess.h>
+#include <asm/page.h>
+#include <asm/pgtable.h>
+#include <asm/system.h>
+#include <asm/processor.h>
+#include <asm/unistd.h>
+
+/*
+ * does not yet catch signals sent when the child dies.
+ * in exit.c or in signal.c.
+ */
+
+/*
+ * Get contents of register REGNO in task TASK.
+ */
+static inline long get_reg(struct task_struct *task, int regno)
+{
+	struct user_context *user = task->thread.user;
+
+	if (regno < 0 || regno >= PT__END)
+		return 0;
+
+	return ((unsigned long *) user)[regno];
+}
+
+/*
+ * Write contents of register REGNO in task TASK.
+ */
+static inline int put_reg(struct task_struct *task, int regno,
+			  unsigned long data)
+{
+	struct user_context *user = task->thread.user;
+
+	if (regno < 0 || regno >= PT__END)
+		return -EIO;
+
+	switch (regno) {
+	case PT_GR(0):
+		return 0;
+	case PT_PSR:
+	case PT__STATUS:
+		return -EIO;
+	default:
+		((unsigned long *) user)[regno] = data;
+		return 0;
+	}
+}
+
+/*
+ * check that an address falls within the bounds of the target process's memory mappings
+ */
+static inline int is_user_addr_valid(struct task_struct *child,
+				     unsigned long start, unsigned long len)
+{
+#ifdef CONFIG_MMU
+	if (start >= PAGE_OFFSET || len > PAGE_OFFSET - start)
+		return -EIO;
+	return 0;
+#else
+	struct vm_list_struct *vml;
+
+	for (vml = child->mm->context.vmlist; vml; vml = vml->next)
+		if (start >= vml->vma->vm_start && start + len <= vml->vma->vm_end)
+			return 0;
+
+	return -EIO;
+#endif
+}
+
+/*
+ * Called by kernel/ptrace.c when detaching..
+ *
+ * Control h/w single stepping
+ */
+void ptrace_disable(struct task_struct *child)
+{
+	child->thread.frame0->__status &= ~REG__STATUS_STEP;
+}
+
+void ptrace_enable(struct task_struct *child)
+{
+	child->thread.frame0->__status |= REG__STATUS_STEP;
+}
+
+asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
+{
+	struct task_struct *child;
+	unsigned long tmp;
+	int ret;
+
+	lock_kernel();
+	ret = -EPERM;
+	if (request == PTRACE_TRACEME) {
+		/* are we already being traced? */
+		if (current->ptrace & PT_PTRACED)
+			goto out;
+		ret = security_ptrace(current->parent, current);
+		if (ret)
+			goto out;
+		/* set the ptrace bit in the process flags. */
+		current->ptrace |= PT_PTRACED;
+		ret = 0;
+		goto out;
+	}
+	ret = -ESRCH;
+	read_lock(&tasklist_lock);
+	child = find_task_by_pid(pid);
+	if (child)
+		get_task_struct(child);
+	read_unlock(&tasklist_lock);
+	if (!child)
+		goto out;
+
+	ret = -EPERM;
+	if (pid == 1)		/* you may not mess with init */
+		goto out_tsk;
+
+	if (request == PTRACE_ATTACH) {
+		ret = ptrace_attach(child);
+		goto out_tsk;
+	}
+
+	ret = ptrace_check_attach(child, request == PTRACE_KILL);
+	if (ret < 0)
+		goto out_tsk;
+
+	switch (request) {
+		/* when I and D space are separate, these will need to be fixed. */
+	case PTRACE_PEEKTEXT: /* read word at location addr. */
+	case PTRACE_PEEKDATA: {
+		int copied;
+
+		ret = -EIO;
+		if (is_user_addr_valid(child, addr, sizeof(tmp)) < 0)
+			break;
+
+		copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
+		if (copied != sizeof(tmp))
+			break;
+
+		ret = put_user(tmp,(unsigned long *) data);
+		break;
+	}
+
+		/* read the word at location addr in the USER area. */
+	case PTRACE_PEEKUSR: {
+		tmp = 0;
+		ret = -EIO;
+		if ((addr & 3) || addr < 0)
+			break;
+
+		ret = 0;
+		switch (addr >> 2) {
+		case 0 ... PT__END - 1:
+			tmp = get_reg(child, addr >> 2);
+			break;
+
+		case PT__END + 0:
+			tmp = child->mm->end_code - child->mm->start_code;
+			break;
+
+		case PT__END + 1:
+			tmp = child->mm->end_data - child->mm->start_data;
+			break;
+
+		case PT__END + 2:
+			tmp = child->mm->start_stack - child->mm->start_brk;
+			break;
+
+		case PT__END + 3:
+			tmp = child->mm->start_code;
+			break;
+
+		case PT__END + 4:
+			tmp = child->mm->start_stack;
+			break;
+
+		default:
+			ret = -EIO;
+			break;
+		}
+
+		if (ret == 0)
+			ret = put_user(tmp, (unsigned long *) data);
+		break;
+	}
+
+		/* when I and D space are separate, this will have to be fixed. */
+	case PTRACE_POKETEXT: /* write the word at location addr. */
+	case PTRACE_POKEDATA:
+		ret = -EIO;
+		if (is_user_addr_valid(child, addr, sizeof(tmp)) < 0)
+			break;
+		if (access_process_vm(child, addr, &data, sizeof(data), 1) != sizeof(data))
+			break;
+		ret = 0;
+		break;
+
+	case PTRACE_POKEUSR: /* write the word at location addr in the USER area */
+		ret = -EIO;
+		if ((addr & 3) || addr < 0)
+			break;
+
+		ret = 0;
+		switch (addr >> 2) {
+		case 0 ... PT__END-1:
+			ret = put_reg(child, addr >> 2, data);
+			break;
+
+		default:
+			ret = -EIO;
+			break;
+		}
+		break;
+
+	case PTRACE_SYSCALL: /* continue and stop at next (return from) syscall */
+	case PTRACE_CONT: /* restart after signal. */
+		ret = -EIO;
+		if ((unsigned long) data > _NSIG)
+			break;
+		if (request == PTRACE_SYSCALL)
+			set_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
+		else
+			clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
+		child->exit_code = data;
+		ptrace_disable(child);
+		wake_up_process(child);
+		ret = 0;
+		break;
+
+		/* make the child exit.  Best I can do is send it a sigkill.
+		 * perhaps it should be put in the status that it wants to
+		 * exit.
+		 */
+	case PTRACE_KILL:
+		ret = 0;
+		if (child->exit_state == EXIT_ZOMBIE)	/* already dead */
+			break;
+		child->exit_code = SIGKILL;
+		clear_tsk_thread_flag(child, TIF_SINGLESTEP);
+		ptrace_disable(child);
+		wake_up_process(child);
+		break;
+
+	case PTRACE_SINGLESTEP:  /* set the trap flag. */
+		ret = -EIO;
+		if ((unsigned long) data > _NSIG)
+			break;
+		clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
+		ptrace_enable(child);
+		child->exit_code = data;
+		wake_up_process(child);
+		ret = 0;
+		break;
+
+	case PTRACE_DETACH:	/* detach a process that was attached. */
+		ret = ptrace_detach(child, data);
+		break;
+
+	case PTRACE_GETREGS: { /* Get all integer regs from the child. */
+		int i;
+		for (i = 0; i < PT__GPEND; i++) {
+			tmp = get_reg(child, i);
+			if (put_user(tmp, (unsigned long *) data)) {
+				ret = -EFAULT;
+				break;
+			}
+			data += sizeof(long);
+		}
+		ret = 0;
+		break;
+	}
+
+	case PTRACE_SETREGS: { /* Set all integer regs in the child. */
+		int i;
+		for (i = 0; i < PT__GPEND; i++) {
+			if (get_user(tmp, (unsigned long *) data)) {
+				ret = -EFAULT;
+				break;
+			}
+			put_reg(child, i, tmp);
+			data += sizeof(long);
+		}
+		ret = 0;
+		break;
+	}
+
+	case PTRACE_GETFPREGS: { /* Get the child FP/Media state. */
+		ret = 0;
+		if (copy_to_user((void *) data,
+				 &child->thread.user->f,
+				 sizeof(child->thread.user->f)))
+			ret = -EFAULT;
+		break;
+	}
+
+	case PTRACE_SETFPREGS: { /* Set the child FP/Media state. */
+		ret = 0;
+		if (copy_from_user(&child->thread.user->f,
+				   (void *) data,
+				   sizeof(child->thread.user->f)))
+			ret = -EFAULT;
+		break;
+	}
+
+	case PTRACE_GETFDPIC:
+		tmp = 0;
+		switch (addr) {
+		case PTRACE_GETFDPIC_EXEC:
+			tmp = child->mm->context.exec_fdpic_loadmap;
+			break;
+		case PTRACE_GETFDPIC_INTERP:
+			tmp = child->mm->context.interp_fdpic_loadmap;
+			break;
+		default:
+			break;
+		}
+
+		ret = 0;
+		if (put_user(tmp, (unsigned long *) data)) {
+			ret = -EFAULT;
+			break;
+		}
+		break;
+
+	default:
+		ret = -EIO;
+		break;
+	}
+out_tsk:
+	put_task_struct(child);
+out:
+	unlock_kernel();
+	return ret;
+}
+
+int __nongprelbss kstrace;
+
+static const struct {
+	const char	*name;
+	unsigned	argmask;
+} __syscall_name_table[NR_syscalls] = {
+	[0]	= { "restart_syscall"			},
+	[1]	= { "exit",		0x000001	},
+	[2]	= { "fork",		0xffffff	},
+	[3]	= { "read",		0x000141	},
+	[4]	= { "write",		0x000141	},
+	[5]	= { "open",		0x000235	},
+	[6]	= { "close",		0x000001	},
+	[7]	= { "waitpid",		0x000141	},
+	[8]	= { "creat",		0x000025	},
+	[9]	= { "link",		0x000055	},
+	[10]	= { "unlink",		0x000005	},
+	[11]	= { "execve",		0x000445	},
+	[12]	= { "chdir",		0x000005	},
+	[13]	= { "time",		0x000004	},
+	[14]	= { "mknod",		0x000325	},
+	[15]	= { "chmod",		0x000025	},
+	[16]	= { "lchown",		0x000025	},
+	[17]	= { "break" },
+	[18]	= { "oldstat",		0x000045	},
+	[19]	= { "lseek",		0x000131	},
+	[20]	= { "getpid",		0xffffff	},
+	[21]	= { "mount",		0x043555	},
+	[22]	= { "umount",		0x000005	},
+	[23]	= { "setuid",		0x000001	},
+	[24]	= { "getuid",		0xffffff	},
+	[25]	= { "stime",		0x000004	},
+	[26]	= { "ptrace",		0x004413	},
+	[27]	= { "alarm",		0x000001	},
+	[28]	= { "oldfstat",		0x000041	},
+	[29]	= { "pause",		0xffffff	},
+	[30]	= { "utime",		0x000045	},
+	[31]	= { "stty" },
+	[32]	= { "gtty" },
+	[33]	= { "access",		0x000025	},
+	[34]	= { "nice",		0x000001	},
+	[35]	= { "ftime" },
+	[36]	= { "sync",		0xffffff	},
+	[37]	= { "kill",		0x000011	},
+	[38]	= { "rename",		0x000055	},
+	[39]	= { "mkdir",		0x000025	},
+	[40]	= { "rmdir",		0x000005	},
+	[41]	= { "dup",		0x000001	},
+	[42]	= { "pipe",		0x000004	},
+	[43]	= { "times",		0x000004	},
+	[44]	= { "prof" },
+	[45]	= { "brk",		0x000004	},
+	[46]	= { "setgid",		0x000001	},
+	[47]	= { "getgid",		0xffffff	},
+	[48]	= { "signal",		0x000041	},
+	[49]	= { "geteuid",		0xffffff	},
+	[50]	= { "getegid",		0xffffff	},
+	[51]	= { "acct",		0x000005	},
+	[52]	= { "umount2",		0x000035	},
+	[53]	= { "lock" },
+	[54]	= { "ioctl",		0x000331	},
+	[55]	= { "fcntl",		0x000331	},
+	[56]	= { "mpx" },
+	[57]	= { "setpgid",		0x000011	},
+	[58]	= { "ulimit" },
+	[60]	= { "umask",		0x000002	},
+	[61]	= { "chroot",		0x000005	},
+	[62]	= { "ustat",		0x000043	},
+	[63]	= { "dup2",		0x000011	},
+	[64]	= { "getppid",		0xffffff	},
+	[65]	= { "getpgrp",		0xffffff	},
+	[66]	= { "setsid",		0xffffff	},
+	[67]	= { "sigaction" },
+	[68]	= { "sgetmask" },
+	[69]	= { "ssetmask" },
+	[70]	= { "setreuid" },
+	[71]	= { "setregid" },
+	[72]	= { "sigsuspend" },
+	[73]	= { "sigpending" },
+	[74]	= { "sethostname" },
+	[75]	= { "setrlimit" },
+	[76]	= { "getrlimit" },
+	[77]	= { "getrusage" },
+	[78]	= { "gettimeofday" },
+	[79]	= { "settimeofday" },
+	[80]	= { "getgroups" },
+	[81]	= { "setgroups" },
+	[82]	= { "select" },
+	[83]	= { "symlink" },
+	[84]	= { "oldlstat" },
+	[85]	= { "readlink" },
+	[86]	= { "uselib" },
+	[87]	= { "swapon" },
+	[88]	= { "reboot" },
+	[89]	= { "readdir" },
+	[91]	= { "munmap",		0x000034	},
+	[92]	= { "truncate" },
+	[93]	= { "ftruncate" },
+	[94]	= { "fchmod" },
+	[95]	= { "fchown" },
+	[96]	= { "getpriority" },
+	[97]	= { "setpriority" },
+	[99]	= { "statfs" },
+	[100]	= { "fstatfs" },
+	[102]	= { "socketcall" },
+	[103]	= { "syslog" },
+	[104]	= { "setitimer" },
+	[105]	= { "getitimer" },
+	[106]	= { "stat" },
+	[107]	= { "lstat" },
+	[108]	= { "fstat" },
+	[111]	= { "vhangup" },
+	[114]	= { "wait4" },
+	[115]	= { "swapoff" },
+	[116]	= { "sysinfo" },
+	[117]	= { "ipc" },
+	[118]	= { "fsync" },
+	[119]	= { "sigreturn" },
+	[120]	= { "clone" },
+	[121]	= { "setdomainname" },
+	[122]	= { "uname" },
+	[123]	= { "modify_ldt" },
+	[123]	= { "cacheflush" },
+	[124]	= { "adjtimex" },
+	[125]	= { "mprotect" },
+	[126]	= { "sigprocmask" },
+	[127]	= { "create_module" },
+	[128]	= { "init_module" },
+	[129]	= { "delete_module" },
+	[130]	= { "get_kernel_syms" },
+	[131]	= { "quotactl" },
+	[132]	= { "getpgid" },
+	[133]	= { "fchdir" },
+	[134]	= { "bdflush" },
+	[135]	= { "sysfs" },
+	[136]	= { "personality" },
+	[137]	= { "afs_syscall" },
+	[138]	= { "setfsuid" },
+	[139]	= { "setfsgid" },
+	[140]	= { "_llseek",			0x014331	},
+	[141]	= { "getdents" },
+	[142]	= { "_newselect",		0x000141	},
+	[143]	= { "flock" },
+	[144]	= { "msync" },
+	[145]	= { "readv" },
+	[146]	= { "writev" },
+	[147]	= { "getsid",			0x000001	},
+	[148]	= { "fdatasync",		0x000001	},
+	[149]	= { "_sysctl",			0x000004	},
+	[150]	= { "mlock" },
+	[151]	= { "munlock" },
+	[152]	= { "mlockall" },
+	[153]	= { "munlockall" },
+	[154]	= { "sched_setparam" },
+	[155]	= { "sched_getparam" },
+	[156]	= { "sched_setscheduler" },
+	[157]	= { "sched_getscheduler" },
+	[158]	= { "sched_yield" },
+	[159]	= { "sched_get_priority_max" },
+	[160]	= { "sched_get_priority_min" },
+	[161]	= { "sched_rr_get_interval" },
+	[162]	= { "nanosleep",		0x000044	},
+	[163]	= { "mremap" },
+	[164]	= { "setresuid" },
+	[165]	= { "getresuid" },
+	[166]	= { "vm86" },
+	[167]	= { "query_module" },
+	[168]	= { "poll" },
+	[169]	= { "nfsservctl" },
+	[170]	= { "setresgid" },
+	[171]	= { "getresgid" },
+	[172]	= { "prctl",			0x333331	},
+	[173]	= { "rt_sigreturn",		0xffffff	},
+	[174]	= { "rt_sigaction",		0x001441	},
+	[175]	= { "rt_sigprocmask",		0x001441	},
+	[176]	= { "rt_sigpending",		0x000014	},
+	[177]	= { "rt_sigtimedwait",		0x001444	},
+	[178]	= { "rt_sigqueueinfo",		0x000411	},
+	[179]	= { "rt_sigsuspend",		0x000014	},
+	[180]	= { "pread",			0x003341	},
+	[181]	= { "pwrite",			0x003341	},
+	[182]	= { "chown",			0x000115	},
+	[183]	= { "getcwd" },
+	[184]	= { "capget" },
+	[185]	= { "capset" },
+	[186]	= { "sigaltstack" },
+	[187]	= { "sendfile" },
+	[188]	= { "getpmsg" },
+	[189]	= { "putpmsg" },
+	[190]	= { "vfork",			0xffffff	},
+	[191]	= { "ugetrlimit" },
+	[192]	= { "mmap2",			0x313314	},
+	[193]	= { "truncate64" },
+	[194]	= { "ftruncate64" },
+	[195]	= { "stat64",			0x000045	},
+	[196]	= { "lstat64",			0x000045	},
+	[197]	= { "fstat64",			0x000041	},
+	[198]	= { "lchown32" },
+	[199]	= { "getuid32",			0xffffff	},
+	[200]	= { "getgid32",			0xffffff	},
+	[201]	= { "geteuid32",		0xffffff	},
+	[202]	= { "getegid32",		0xffffff	},
+	[203]	= { "setreuid32" },
+	[204]	= { "setregid32" },
+	[205]	= { "getgroups32" },
+	[206]	= { "setgroups32" },
+	[207]	= { "fchown32" },
+	[208]	= { "setresuid32" },
+	[209]	= { "getresuid32" },
+	[210]	= { "setresgid32" },
+	[211]	= { "getresgid32" },
+	[212]	= { "chown32" },
+	[213]	= { "setuid32" },
+	[214]	= { "setgid32" },
+	[215]	= { "setfsuid32" },
+	[216]	= { "setfsgid32" },
+	[217]	= { "pivot_root" },
+	[218]	= { "mincore" },
+	[219]	= { "madvise" },
+	[220]	= { "getdents64" },
+	[221]	= { "fcntl64" },
+	[223]	= { "security" },
+	[224]	= { "gettid" },
+	[225]	= { "readahead" },
+	[226]	= { "setxattr" },
+	[227]	= { "lsetxattr" },
+	[228]	= { "fsetxattr" },
+	[229]	= { "getxattr" },
+	[230]	= { "lgetxattr" },
+	[231]	= { "fgetxattr" },
+	[232]	= { "listxattr" },
+	[233]	= { "llistxattr" },
+	[234]	= { "flistxattr" },
+	[235]	= { "removexattr" },
+	[236]	= { "lremovexattr" },
+	[237]	= { "fremovexattr" },
+	[238]	= { "tkill" },
+	[239]	= { "sendfile64" },
+	[240]	= { "futex" },
+	[241]	= { "sched_setaffinity" },
+	[242]	= { "sched_getaffinity" },
+	[243]	= { "set_thread_area" },
+	[244]	= { "get_thread_area" },
+	[245]	= { "io_setup" },
+	[246]	= { "io_destroy" },
+	[247]	= { "io_getevents" },
+	[248]	= { "io_submit" },
+	[249]	= { "io_cancel" },
+	[250]	= { "fadvise64" },
+	[252]	= { "exit_group",		0x000001	},
+	[253]	= { "lookup_dcookie" },
+	[254]	= { "epoll_create" },
+	[255]	= { "epoll_ctl" },
+	[256]	= { "epoll_wait" },
+	[257]	= { "remap_file_pages" },
+	[258]	= { "set_tid_address" },
+	[259]	= { "timer_create" },
+	[260]	= { "timer_settime" },
+	[261]	= { "timer_gettime" },
+	[262]	= { "timer_getoverrun" },
+	[263]	= { "timer_delete" },
+	[264]	= { "clock_settime" },
+	[265]	= { "clock_gettime" },
+	[266]	= { "clock_getres" },
+	[267]	= { "clock_nanosleep" },
+	[268]	= { "statfs64" },
+	[269]	= { "fstatfs64" },
+	[270]	= { "tgkill" },
+	[271]	= { "utimes" },
+	[272]	= { "fadvise64_64" },
+	[273]	= { "vserver" },
+	[274]	= { "mbind" },
+	[275]	= { "get_mempolicy" },
+	[276]	= { "set_mempolicy" },
+	[277]	= { "mq_open" },
+	[278]	= { "mq_unlink" },
+	[279]	= { "mq_timedsend" },
+	[280]	= { "mq_timedreceive" },
+	[281]	= { "mq_notify" },
+	[282]	= { "mq_getsetattr" },
+	[283]	= { "sys_kexec_load" },
+};
+
+asmlinkage void do_syscall_trace(int leaving)
+{
+#if 0
+	unsigned long *argp;
+	const char *name;
+	unsigned argmask;
+	char buffer[16];
+
+	if (!kstrace)
+		return;
+
+	if (!current->mm)
+		return;
+
+	if (__frame->gr7 == __NR_close)
+		return;
+
+#if 0
+	if (__frame->gr7 != __NR_mmap2 &&
+	    __frame->gr7 != __NR_vfork &&
+	    __frame->gr7 != __NR_execve &&
+	    __frame->gr7 != __NR_exit)
+		return;
+#endif
+
+	argmask = 0;
+	name = NULL;
+	if (__frame->gr7 < NR_syscalls) {
+		name = __syscall_name_table[__frame->gr7].name;
+		argmask = __syscall_name_table[__frame->gr7].argmask;
+	}
+	if (!name) {
+		sprintf(buffer, "sys_%lx", __frame->gr7);
+		name = buffer;
+	}
+
+	if (!leaving) {
+		if (!argmask) {
+			printk(KERN_CRIT "[%d] %s(%lx,%lx,%lx,%lx,%lx,%lx)\n",
+			       current->pid,
+			       name,
+			       __frame->gr8,
+			       __frame->gr9,
+			       __frame->gr10,
+			       __frame->gr11,
+			       __frame->gr12,
+			       __frame->gr13);
+		}
+		else if (argmask == 0xffffff) {
+			printk(KERN_CRIT "[%d] %s()\n",
+			       current->pid,
+			       name);
+		}
+		else {
+			printk(KERN_CRIT "[%d] %s(",
+			       current->pid,
+			       name);
+
+			argp = &__frame->gr8;
+
+			do {
+				switch (argmask & 0xf) {
+				case 1:
+					printk("%ld", (long) *argp);
+					break;
+				case 2:
+					printk("%lo", *argp);
+					break;
+				case 3:
+					printk("%lx", *argp);
+					break;
+				case 4:
+					printk("%p", (void *) *argp);
+					break;
+				case 5:
+					printk("\"%s\"", (char *) *argp);
+					break;
+				}
+
+				argp++;
+				argmask >>= 4;
+				if (argmask)
+					printk(",");
+
+			} while (argmask);
+
+			printk(")\n");
+		}
+	}
+	else {
+		if ((int)__frame->gr8 > -4096 && (int)__frame->gr8 < 4096)
+			printk(KERN_CRIT "[%d] %s() = %ld\n", current->pid, name, __frame->gr8);
+		else
+			printk(KERN_CRIT "[%d] %s() = %lx\n", current->pid, name, __frame->gr8);
+	}
+	return;
+#endif
+
+	if (!test_thread_flag(TIF_SYSCALL_TRACE))
+		return;
+
+	if (!(current->ptrace & PT_PTRACED))
+		return;
+
+	/* we need to indicate entry or exit to strace */
+	if (leaving)
+		__frame->__status |= REG__STATUS_SYSC_EXIT;
+	else
+		__frame->__status |= REG__STATUS_SYSC_ENTRY;
+
+	ptrace_notify(SIGTRAP);
+
+	/*
+	 * this isn't the same as continuing with a signal, but it will do
+	 * for normal use.  strace only continues with a signal if the
+	 * stopping signal is not SIGTRAP.  -brl
+	 */
+	if (current->exit_code) {
+		send_sig(current->exit_code, current, 1);
+		current->exit_code = 0;
+	}
+}
diff -Nru a/arch/frv/kernel/semaphore.c b/arch/frv/kernel/semaphore.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/kernel/semaphore.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,142 @@
+/* semaphore.c: FR-V semaphores
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ * - Derived from lib/rwsem-spinlock.c
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/config.h>
+#include <linux/sched.h>
+#include <linux/module.h>
+#include <asm/semaphore.h>
+
+struct sem_waiter {
+	struct list_head	list;
+	struct task_struct	*task;
+};
+
+#if SEM_DEBUG
+void semtrace(struct semaphore *sem, const char *str)
+{
+	if (sem->debug)
+		printk("[%d] %s({%d,%d})\n",
+		       current->pid,
+		       str,
+		       sem->counter,
+		       list_empty(&sem->wait_list) ? 0 : 1);
+}
+#else
+#define semtrace(SEM,STR) do { } while(0)
+#endif
+
+/*
+ * wait for a token to be granted from a semaphore
+ * - entered with lock held and interrupts disabled
+ */
+void __down(struct semaphore *sem, unsigned long flags)
+{
+	struct task_struct *tsk = current;
+	struct sem_waiter waiter;
+
+	semtrace(sem,"Entering __down");
+
+	/* set up my own style of waitqueue */
+	waiter.task	= tsk;
+
+	list_add_tail(&waiter.list, &sem->wait_list);
+
+	/* we don't need to touch the semaphore struct anymore */
+	spin_unlock_irqrestore(&sem->wait_lock, flags);
+
+	/* wait to be given the lock */
+	set_task_state(tsk, TASK_UNINTERRUPTIBLE);
+
+	for (;;) {
+		if (list_empty(&waiter.list))
+			break;
+		schedule();
+		set_task_state(tsk, TASK_UNINTERRUPTIBLE);
+	}
+
+	tsk->state = TASK_RUNNING;
+	semtrace(sem,"Leaving __down");
+}
+
+EXPORT_SYMBOL(__down);
+
+/*
+ * interruptibly wait for a token to be granted from a semaphore
+ * - entered with lock held and interrupts disabled
+ */
+int __down_interruptible(struct semaphore *sem, unsigned long flags)
+{
+	struct task_struct *tsk = current;
+	struct sem_waiter waiter;
+	int ret;
+
+	semtrace(sem,"Entering __down_interruptible");
+
+	/* set up my own style of waitqueue */
+	waiter.task = tsk;
+
+	list_add_tail(&waiter.list, &sem->wait_list);
+
+	/* we don't need to touch the semaphore struct anymore */
+	set_task_state(tsk, TASK_INTERRUPTIBLE);
+
+	spin_unlock_irqrestore(&sem->wait_lock, flags);
+
+	/* wait to be given the lock */
+	ret = 0;
+	for (;;) {
+		if (list_empty(&waiter.list))
+			break;
+		if (unlikely(signal_pending(current)))
+			goto interrupted;
+		schedule();
+		set_task_state(tsk, TASK_INTERRUPTIBLE);
+	}
+
+ out:
+	tsk->state = TASK_RUNNING;
+	semtrace(sem, "Leaving __down_interruptible");
+	return ret;
+
+ interrupted:
+	spin_lock_irqsave(&sem->wait_lock, flags);
+
+	if (!list_empty(&waiter.list)) {
+		list_del(&waiter.list);
+		ret = -EINTR;
+	}
+
+	spin_unlock_irqrestore(&sem->wait_lock, flags);
+	goto out;
+}
+
+EXPORT_SYMBOL(__down_interruptible);
+
+/*
+ * release a single token back to a semaphore
+ * - entered with lock held and interrupts disabled
+ */
+void __up(struct semaphore *sem)
+{
+	struct sem_waiter *waiter;
+
+	semtrace(sem,"Entering __up");
+
+	/* grant the token to the process at the front of the queue */
+	waiter = list_entry(sem->wait_list.next, struct sem_waiter, list);
+	list_del_init(&waiter->list);
+	wake_up_process(waiter->task);
+
+	semtrace(sem,"Leaving __up");
+}
+
+EXPORT_SYMBOL(__up);
diff -Nru a/arch/frv/kernel/setup.c b/arch/frv/kernel/setup.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/kernel/setup.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,1197 @@
+/* setup.c: FRV specific setup
+ *
+ * Copyright (C) 2003-5 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ * - Derived from arch/m68k/kernel/setup.c
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/config.h>
+#include <linux/version.h>
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/delay.h>
+#include <linux/interrupt.h>
+#include <linux/fs.h>
+#include <linux/mm.h>
+#include <linux/fb.h>
+#include <linux/console.h>
+#include <linux/genhd.h>
+#include <linux/errno.h>
+#include <linux/string.h>
+#include <linux/major.h>
+#include <linux/bootmem.h>
+#include <linux/highmem.h>
+#include <linux/seq_file.h>
+#include <linux/serial.h>
+#include <linux/serial_core.h>
+#include <linux/serial_reg.h>
+
+#include <asm/setup.h>
+#include <asm/serial.h>
+#include <asm/irq.h>
+#include <asm/sections.h>
+#include <asm/pgalloc.h>
+#include <asm/busctl-regs.h>
+#include <asm/serial-regs.h>
+#include <asm/timer-regs.h>
+#include <asm/irc-regs.h>
+#include <asm/spr-regs.h>
+#include <asm/mb-regs.h>
+#include <asm/mb93493-regs.h>
+#include <asm/gdb-stub.h>
+#include <asm/irq-routing.h>
+#include <asm/io.h>
+
+#ifdef CONFIG_BLK_DEV_INITRD
+#include <linux/blk.h>
+#include <asm/pgtable.h>
+#endif
+
+#include "local.h"
+
+#ifdef CONFIG_MB93090_MB00
+static void __init mb93090_display(void);
+#endif
+#ifdef CONFIG_MMU
+static void __init setup_linux_memory(void);
+#else
+static void __init setup_uclinux_memory(void);
+#endif
+
+#ifdef CONFIG_CONSOLE
+extern struct consw *conswitchp;
+#ifdef CONFIG_FRAMEBUFFER
+extern struct consw fb_con;
+#endif
+#endif
+
+#ifdef CONFIG_MB93090_MB00
+static char __initdata mb93090_banner[] = "FJ/RH FR-V Linux";
+static char __initdata mb93090_version[] = UTS_RELEASE;
+
+int __nongprelbss mb93090_mb00_detected;
+#endif
+
+const char __frv_unknown_system[] = "unknown";
+const char __frv_mb93091_cb10[] = "mb93091-cb10";
+const char __frv_mb93091_cb11[] = "mb93091-cb11";
+const char __frv_mb93091_cb30[] = "mb93091-cb30";
+const char __frv_mb93091_cb41[] = "mb93091-cb41";
+const char __frv_mb93091_cb60[] = "mb93091-cb60";
+const char __frv_mb93091_cb70[] = "mb93091-cb70";
+const char __frv_mb93091_cb451[] = "mb93091-cb451";
+const char __frv_mb93090_mb00[] = "mb93090-mb00";
+
+const char __frv_mb93493[] = "mb93493";
+
+const char __frv_mb93093[] = "mb93093";
+
+static const char *__nongprelbss cpu_series;
+static const char *__nongprelbss cpu_core;
+static const char *__nongprelbss cpu_silicon;
+static const char *__nongprelbss cpu_mmu;
+static const char *__nongprelbss cpu_system;
+static const char *__nongprelbss cpu_board1;
+static const char *__nongprelbss cpu_board2;
+
+static unsigned long __nongprelbss cpu_psr_all;
+static unsigned long __nongprelbss cpu_hsr0_all;
+
+unsigned long __nongprelbss pdm_suspend_mode;
+
+unsigned long __nongprelbss rom_length;
+unsigned long __nongprelbss memory_start;
+unsigned long __nongprelbss memory_end;
+
+unsigned long __nongprelbss dma_coherent_mem_start;
+unsigned long __nongprelbss dma_coherent_mem_end;
+
+unsigned long __initdata __sdram_old_base;
+unsigned long __initdata num_mappedpages;
+
+struct cpuinfo_frv __nongprelbss boot_cpu_data;
+
+char command_line[COMMAND_LINE_SIZE];
+char __initdata redboot_command_line[COMMAND_LINE_SIZE];
+
+#ifdef CONFIG_PM
+#define __pminit
+#define __pminitdata
+#else
+#define __pminit __init
+#define __pminitdata __initdata
+#endif
+
+struct clock_cmode {
+	uint8_t	xbus, sdram, corebus, core, dsu;
+};
+
+#define _frac(N,D) ((N)<<4 | (D))
+#define _x0_16	_frac(1,6)
+#define _x0_25	_frac(1,4)
+#define _x0_33	_frac(1,3)
+#define _x0_375	_frac(3,8)
+#define _x0_5	_frac(1,2)
+#define _x0_66	_frac(2,3)
+#define _x0_75	_frac(3,4)
+#define _x1	_frac(1,1)
+#define _x1_5	_frac(3,2)
+#define _x2	_frac(2,1)
+#define _x3	_frac(3,1)
+#define _x4	_frac(4,1)
+#define _x4_5	_frac(9,2)
+#define _x6	_frac(6,1)
+#define _x8	_frac(8,1)
+#define _x9	_frac(9,1)
+
+int __nongprelbss clock_p0_current;
+int __nongprelbss clock_cm_current;
+int __nongprelbss clock_cmode_current;
+#ifdef CONFIG_PM
+int __nongprelbss clock_cmodes_permitted;
+unsigned long __nongprelbss clock_bits_settable;
+#endif
+
+static struct clock_cmode __pminitdata undef_clock_cmode = { _x1, _x1, _x1, _x1, _x1 };
+
+static struct clock_cmode __pminitdata clock_cmodes_fr401_fr403[16] = {
+	[4]	= {	_x1,	_x1,	_x2,	_x2,	_x0_25	},
+	[5]	= { 	_x1,	_x2,	_x4,	_x4,	_x0_5	},
+	[8]	= { 	_x1,	_x1,	_x1,	_x2,	_x0_25	},
+	[9]	= { 	_x1,	_x2,	_x2,	_x4,	_x0_5	},
+	[11]	= { 	_x1,	_x4,	_x4,	_x8,	_x1	},
+	[12]	= { 	_x1,	_x1,	_x2,	_x4,	_x0_5	},
+	[13]	= { 	_x1,	_x2,	_x4,	_x8,	_x1	},
+};
+
+static struct clock_cmode __pminitdata clock_cmodes_fr405[16] = {
+	[0]	= {	_x1,	_x1,	_x1,	_x1,	_x0_5	},
+	[1]	= {	_x1,	_x1,	_x1,	_x3,	_x0_25	},
+	[2]	= {	_x1,	_x1,	_x2,	_x6,	_x0_5	},
+	[3]	= {	_x1,	_x2,	_x2,	_x6,	_x0_5	},
+	[4]	= {	_x1,	_x1,	_x2,	_x2,	_x0_16	},
+	[8]	= { 	_x1,	_x1,	_x1,	_x2,	_x0_16	},
+	[9]	= { 	_x1,	_x2,	_x2,	_x4,	_x0_33	},
+	[12]	= { 	_x1,	_x1,	_x2,	_x4,	_x0_33	},
+	[14]	= { 	_x1,	_x3,	_x3,	_x9,	_x0_75	},
+	[15]	= { 	_x1,	_x1_5,	_x1_5,	_x4_5,	_x0_375	},
+
+#define CLOCK_CMODES_PERMITTED_FR405 0xd31f
+};
+
+static struct clock_cmode __pminitdata clock_cmodes_fr555[16] = {
+	[0]	= {	_x1,	_x2,	_x2,	_x4,	_x0_33	},
+	[1]	= {	_x1,	_x3,	_x3,	_x6,	_x0_5	},
+	[2]	= {	_x1,	_x2,	_x4,	_x8,	_x0_66	},
+	[3]	= {	_x1,	_x1_5,	_x3,	_x6,	_x0_5	},
+	[4]	= {	_x1,	_x3,	_x3,	_x9,	_x0_75	},
+	[5]	= {	_x1,	_x2,	_x2,	_x6,	_x0_5	},
+	[6]	= {	_x1,	_x1_5,	_x1_5,	_x4_5,	_x0_375	},
+};
+
+static const struct clock_cmode __pminitdata *clock_cmodes;
+static int __pminitdata clock_doubled;
+
+static struct uart_port __initdata __frv_uart0 = {
+	.uartclk		= 0,
+	.membase		= (char *) UART0_BASE,
+	.irq			= IRQ_CPU_UART0,
+	.regshift		= 3,
+	.iotype			= UPIO_MEM,
+	.flags			= UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
+};
+
+static struct uart_port __initdata __frv_uart1 = {
+	.uartclk		= 0,
+	.membase		= (char *) UART1_BASE,
+	.irq			= IRQ_CPU_UART1,
+	.regshift		= 3,
+	.iotype			= UPIO_MEM,
+	.flags			= UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
+};
+
+#if 0
+static void __init printk_xampr(unsigned long ampr, unsigned long amlr, char i_d, int n)
+{
+	unsigned long phys, virt, cxn, size;
+
+#ifdef CONFIG_MMU
+	virt = amlr & 0xffffc000;
+	cxn = amlr & 0x3fff;
+#else
+	virt = ampr & 0xffffc000;
+	cxn = 0;
+#endif
+	phys = ampr & xAMPRx_PPFN;
+	size = 1 << (((ampr & xAMPRx_SS) >> 4) + 17);
+
+	printk("%cAMPR%d: va %08lx-%08lx [pa %08lx] %c%c%c%c [cxn:%04lx]\n",
+	       i_d, n,
+	       virt, virt + size - 1,
+	       phys,
+	       ampr & xAMPRx_S  ? 'S' : '-',
+	       ampr & xAMPRx_C  ? 'C' : '-',
+	       ampr & DAMPRx_WP ? 'W' : '-',
+	       ampr & xAMPRx_V  ? 'V' : '-',
+	       cxn
+	       );
+}
+#endif
+
+/*****************************************************************************/
+/*
+ * dump the memory map
+ */
+static void __init dump_memory_map(void)
+{
+
+#if 0
+	/* dump the protection map */
+	printk_xampr(__get_IAMPR(0),  __get_IAMLR(0),  'I', 0);
+	printk_xampr(__get_IAMPR(1),  __get_IAMLR(1),  'I', 1);
+	printk_xampr(__get_IAMPR(2),  __get_IAMLR(2),  'I', 2);
+	printk_xampr(__get_IAMPR(3),  __get_IAMLR(3),  'I', 3);
+	printk_xampr(__get_IAMPR(4),  __get_IAMLR(4),  'I', 4);
+	printk_xampr(__get_IAMPR(5),  __get_IAMLR(5),  'I', 5);
+	printk_xampr(__get_IAMPR(6),  __get_IAMLR(6),  'I', 6);
+	printk_xampr(__get_IAMPR(7),  __get_IAMLR(7),  'I', 7);
+	printk_xampr(__get_IAMPR(8),  __get_IAMLR(8),  'I', 8);
+	printk_xampr(__get_IAMPR(9),  __get_IAMLR(9),  'i', 9);
+	printk_xampr(__get_IAMPR(10), __get_IAMLR(10), 'I', 10);
+	printk_xampr(__get_IAMPR(11), __get_IAMLR(11), 'I', 11);
+	printk_xampr(__get_IAMPR(12), __get_IAMLR(12), 'I', 12);
+	printk_xampr(__get_IAMPR(13), __get_IAMLR(13), 'I', 13);
+	printk_xampr(__get_IAMPR(14), __get_IAMLR(14), 'I', 14);
+	printk_xampr(__get_IAMPR(15), __get_IAMLR(15), 'I', 15);
+
+	printk_xampr(__get_DAMPR(0),  __get_DAMLR(0),  'D', 0);
+	printk_xampr(__get_DAMPR(1),  __get_DAMLR(1),  'D', 1);
+	printk_xampr(__get_DAMPR(2),  __get_DAMLR(2),  'D', 2);
+	printk_xampr(__get_DAMPR(3),  __get_DAMLR(3),  'D', 3);
+	printk_xampr(__get_DAMPR(4),  __get_DAMLR(4),  'D', 4);
+	printk_xampr(__get_DAMPR(5),  __get_DAMLR(5),  'D', 5);
+	printk_xampr(__get_DAMPR(6),  __get_DAMLR(6),  'D', 6);
+	printk_xampr(__get_DAMPR(7),  __get_DAMLR(7),  'D', 7);
+	printk_xampr(__get_DAMPR(8),  __get_DAMLR(8),  'D', 8);
+	printk_xampr(__get_DAMPR(9),  __get_DAMLR(9),  'D', 9);
+	printk_xampr(__get_DAMPR(10), __get_DAMLR(10), 'D', 10);
+	printk_xampr(__get_DAMPR(11), __get_DAMLR(11), 'D', 11);
+	printk_xampr(__get_DAMPR(12), __get_DAMLR(12), 'D', 12);
+	printk_xampr(__get_DAMPR(13), __get_DAMLR(13), 'D', 13);
+	printk_xampr(__get_DAMPR(14), __get_DAMLR(14), 'D', 14);
+	printk_xampr(__get_DAMPR(15), __get_DAMLR(15), 'D', 15);
+#endif
+
+#if 0
+	/* dump the bus controller registers */
+	printk("LGCR: %08lx\n", __get_LGCR());
+	printk("Master: %08lx-%08lx CR=%08lx\n",
+	       __get_LEMBR(), __get_LEMBR() + __get_LEMAM(),
+	       __get_LMAICR());
+
+	int loop;
+	for (loop = 1; loop <= 7; loop++) {
+		unsigned long lcr = __get_LCR(loop), lsbr = __get_LSBR(loop);
+		printk("CS#%d: %08lx-%08lx %c%c%c%c%c%c%c%c%c\n",
+		       loop,
+		       lsbr, lsbr + __get_LSAM(loop),
+		       lcr & 0x80000000 ? 'r' : '-',
+		       lcr & 0x40000000 ? 'w' : '-',
+		       lcr & 0x08000000 ? 'b' : '-',
+		       lcr & 0x04000000 ? 'B' : '-',
+		       lcr & 0x02000000 ? 'C' : '-',
+		       lcr & 0x01000000 ? 'D' : '-',
+		       lcr & 0x00800000 ? 'W' : '-',
+		       lcr & 0x00400000 ? 'R' : '-',
+		       (lcr & 0x00030000) == 0x00000000 ? '4' :
+		       (lcr & 0x00030000) == 0x00010000 ? '2' :
+		       (lcr & 0x00030000) == 0x00020000 ? '1' :
+		       '-'
+		       );
+	}
+#endif
+
+#if 0
+	printk("\n");
+#endif
+} /* end dump_memory_map() */
+
+/*****************************************************************************/
+/*
+ * attempt to detect a VDK motherboard and DAV daughter board on an MB93091 system
+ */
+#ifdef CONFIG_MB93091_VDK
+static void __init detect_mb93091(void)
+{
+#ifdef CONFIG_MB93090_MB00
+	/* Detect CB70 without motherboard */
+	if (!(cpu_system == __frv_mb93091_cb70 && ((*(unsigned short *)0xffc00030) & 0x100))) {
+		cpu_board1 = __frv_mb93090_mb00;
+		mb93090_mb00_detected = 1;
+	}
+#endif
+
+#ifdef CONFIG_FUJITSU_MB93493
+	cpu_board2 = __frv_mb93493;
+#endif
+
+} /* end detect_mb93091() */
+#endif
+
+/*****************************************************************************/
+/*
+ * determine the CPU type and set appropriate parameters
+ *
+ * Family     Series      CPU Core    Silicon    Imple  Vers
+ * ----------------------------------------------------------
+ * FR-V --+-> FR400 --+-> FR401 --+-> MB93401     02     00 [1]
+ *        |           |           |
+ *        |           |           +-> MB93401/A   02     01
+ *        |           |           |
+ *        |           |           +-> MB93403     02     02
+ *        |           |
+ *        |           +-> FR405 ----> MB93405     04     00
+ *        |
+ *        +-> FR450 ----> FR451 ----> MB93451     05     00
+ *        |
+ *        +-> FR500 ----> FR501 --+-> MB93501     01     01 [2]
+ *        |                       |
+ *        |                       +-> MB93501/A   01     02
+ *        |
+ *        +-> FR550 --+-> FR551 ----> MB93555     03     01
+ *
+ *  [1] The MB93401 is an obsolete CPU replaced by the MB93401A
+ *  [2] The MB93501 is an obsolete CPU replaced by the MB93501A
+ *
+ * Imple is PSR(Processor Status Register)[31:28].
+ * Vers is PSR(Processor Status Register)[27:24].
+ *
+ * A "Silicon" consists of CPU core and some on-chip peripherals.
+ */
+static void __init determine_cpu(void)
+{
+	unsigned long hsr0 = __get_HSR(0);
+	unsigned long psr = __get_PSR();
+
+	/* work out what selectable services the CPU supports */
+	__set_PSR(psr | PSR_EM | PSR_EF | PSR_CM | PSR_NEM);
+	cpu_psr_all = __get_PSR();
+	__set_PSR(psr);
+
+	__set_HSR(0, hsr0 | HSR0_GRLE | HSR0_GRHE | HSR0_FRLE | HSR0_FRHE);
+	cpu_hsr0_all = __get_HSR(0);
+	__set_HSR(0, hsr0);
+
+	/* derive other service specs from the CPU type */
+	cpu_series		= "unknown";
+	cpu_core		= "unknown";
+	cpu_silicon		= "unknown";
+	cpu_mmu			= "Prot";
+	cpu_system		= __frv_unknown_system;
+	clock_cmodes		= NULL;
+	clock_doubled		= 0;
+#ifdef CONFIG_PM
+	clock_bits_settable	= CLOCK_BIT_CM_H | CLOCK_BIT_CM_M | CLOCK_BIT_P0;
+#endif
+
+	switch (PSR_IMPLE(psr)) {
+	case PSR_IMPLE_FR401:
+		cpu_series	= "fr400";
+		cpu_core	= "fr401";
+		pdm_suspend_mode = HSR0_PDM_PLL_RUN;
+
+		switch (PSR_VERSION(psr)) {
+		case PSR_VERSION_FR401_MB93401:
+			cpu_silicon	= "mb93401";
+			cpu_system	= __frv_mb93091_cb10;
+			clock_cmodes	= clock_cmodes_fr401_fr403;
+			clock_doubled	= 1;
+			break;
+		case PSR_VERSION_FR401_MB93401A:
+			cpu_silicon	= "mb93401/A";
+			cpu_system	= __frv_mb93091_cb11;
+			clock_cmodes	= clock_cmodes_fr401_fr403;
+			break;
+		case PSR_VERSION_FR401_MB93403:
+			cpu_silicon	= "mb93403";
+#ifndef CONFIG_MB93093_PDK
+			cpu_system	= __frv_mb93091_cb30;
+#else
+			cpu_system	= __frv_mb93093;
+#endif
+			clock_cmodes	= clock_cmodes_fr401_fr403;
+			break;
+		default:
+			break;
+		}
+		break;
+
+	case PSR_IMPLE_FR405:
+		cpu_series	= "fr400";
+		cpu_core	= "fr405";
+		pdm_suspend_mode = HSR0_PDM_PLL_STOP;
+
+		switch (PSR_VERSION(psr)) {
+		case PSR_VERSION_FR405_MB93405:
+			cpu_silicon	= "mb93405";
+			cpu_system	= __frv_mb93091_cb60;
+			clock_cmodes	= clock_cmodes_fr405;
+#ifdef CONFIG_PM
+			clock_bits_settable |= CLOCK_BIT_CMODE;
+			clock_cmodes_permitted = CLOCK_CMODES_PERMITTED_FR405;
+#endif
+
+			/* the FPGA on the CB70 has extra registers
+			 * - it has 0x0046 in the VDK_ID FPGA register at 0x1a0, which is
+			 *   how we tell the difference between it and a CB60
+			 */
+			if (*(volatile unsigned short *) 0xffc001a0 == 0x0046)
+				cpu_system = __frv_mb93091_cb70;
+			break;
+		default:
+			break;
+		}
+		break;
+
+	case PSR_IMPLE_FR451:
+		cpu_series	= "fr450";
+		cpu_core	= "fr451";
+		pdm_suspend_mode = HSR0_PDM_PLL_STOP;
+#ifdef CONFIG_PM
+		clock_bits_settable |= CLOCK_BIT_CMODE;
+		clock_cmodes_permitted = CLOCK_CMODES_PERMITTED_FR405;
+#endif
+		switch (PSR_VERSION(psr)) {
+		case PSR_VERSION_FR451_MB93451:
+			cpu_silicon	= "mb93451";
+			cpu_mmu		= "Prot, SAT, xSAT, DAT";
+			cpu_system	= __frv_mb93091_cb451;
+			clock_cmodes	= clock_cmodes_fr405;
+			break;
+		default:
+			break;
+		}
+		break;
+
+	case PSR_IMPLE_FR501:
+		cpu_series	= "fr500";
+		cpu_core	= "fr501";
+		pdm_suspend_mode = HSR0_PDM_PLL_STOP;
+
+		switch (PSR_VERSION(psr)) {
+		case PSR_VERSION_FR501_MB93501:  cpu_silicon = "mb93501";   break;
+		case PSR_VERSION_FR501_MB93501A: cpu_silicon = "mb93501/A"; break;
+		default:
+			break;
+		}
+		break;
+
+	case PSR_IMPLE_FR551:
+		cpu_series	= "fr550";
+		cpu_core	= "fr551";
+		pdm_suspend_mode = HSR0_PDM_PLL_RUN;
+
+		switch (PSR_VERSION(psr)) {
+		case PSR_VERSION_FR551_MB93555:
+			cpu_silicon	= "mb93555";
+			cpu_mmu		= "Prot, SAT";
+			cpu_system	= __frv_mb93091_cb41;
+			clock_cmodes	= clock_cmodes_fr555;
+			clock_doubled	= 1;
+			break;
+		default:
+			break;
+		}
+		break;
+
+	default:
+		break;
+	}
+
+	printk("- Series:%s CPU:%s Silicon:%s\n",
+	       cpu_series, cpu_core, cpu_silicon);
+
+#ifdef CONFIG_MB93091_VDK
+	detect_mb93091();
+#endif
+
+#if defined(CONFIG_MB93093_PDK) && defined(CONFIG_FUJITSU_MB93493)
+	cpu_board2 = __frv_mb93493;
+#endif
+
+} /* end determine_cpu() */
+
+/*****************************************************************************/
+/*
+ * calculate the bus clock speed
+ */
+void __pminit determine_clocks(int verbose)
+{
+	const struct clock_cmode *mode, *tmode;
+	unsigned long clkc, psr, quot;
+
+	clkc = __get_CLKC();
+	psr = __get_PSR();
+
+	clock_p0_current = !!(clkc & CLKC_P0);
+	clock_cm_current = clkc & CLKC_CM;
+	clock_cmode_current = (clkc & CLKC_CMODE) >> CLKC_CMODE_s;
+
+	if (verbose)
+		printk("psr=%08lx hsr0=%08lx clkc=%08lx\n", psr, __get_HSR(0), clkc);
+
+	/* the CB70 has some alternative ways of setting the clock speed through switches accessed
+	 * through the FPGA.  */
+	if (cpu_system == __frv_mb93091_cb70) {
+		unsigned short clkswr = *(volatile unsigned short *) 0xffc00104UL & 0x1fffUL;
+
+		if (clkswr & 0x1000)
+			__clkin_clock_speed_HZ = 60000000UL;
+		else
+			__clkin_clock_speed_HZ =
+				((clkswr >> 8) & 0xf) * 10000000 +
+				((clkswr >> 4) & 0xf) * 1000000 +
+				((clkswr     ) & 0xf) * 100000;
+	}
+	/* the FR451 is currently fixed at 24MHz */
+	else if (cpu_system == __frv_mb93091_cb451) {
+		//__clkin_clock_speed_HZ = 24000000UL; // CB451-FPGA
+		unsigned short clkswr = *(volatile unsigned short *) 0xffc00104UL & 0x1fffUL;
+
+		if (clkswr & 0x1000)
+			__clkin_clock_speed_HZ = 60000000UL;
+		else
+			__clkin_clock_speed_HZ =
+				((clkswr >> 8) & 0xf) * 10000000 +
+				((clkswr >> 4) & 0xf) * 1000000 +
+				((clkswr     ) & 0xf) * 100000;
+	}
+	/* otherwise determine the clockspeed from VDK or other registers */
+	else {
+		__clkin_clock_speed_HZ = __get_CLKIN();
+	}
+
+	/* look up the appropriate clock relationships table entry */
+	mode = &undef_clock_cmode;
+	if (clock_cmodes) {
+		tmode = &clock_cmodes[(clkc & CLKC_CMODE) >> CLKC_CMODE_s];
+		if (tmode->xbus)
+			mode = tmode;
+	}
+
+#define CLOCK(SRC,RATIO) ((SRC) * (((RATIO) >> 4) & 0x0f) / ((RATIO) & 0x0f))
+
+	if (clock_doubled)
+		__clkin_clock_speed_HZ <<= 1;
+
+	__ext_bus_clock_speed_HZ	= CLOCK(__clkin_clock_speed_HZ, mode->xbus);
+	__sdram_clock_speed_HZ		= CLOCK(__clkin_clock_speed_HZ, mode->sdram);
+	__dsu_clock_speed_HZ		= CLOCK(__clkin_clock_speed_HZ, mode->dsu);
+
+	switch (clkc & CLKC_CM) {
+	case 0: /* High */
+		__core_bus_clock_speed_HZ	= CLOCK(__clkin_clock_speed_HZ, mode->corebus);
+		__core_clock_speed_HZ		= CLOCK(__clkin_clock_speed_HZ, mode->core);
+		break;
+	case 1: /* Medium */
+		__core_bus_clock_speed_HZ	= CLOCK(__clkin_clock_speed_HZ, mode->sdram);
+		__core_clock_speed_HZ		= CLOCK(__clkin_clock_speed_HZ, mode->sdram);
+		break;
+	case 2: /* Low; not supported */
+	case 3: /* UNDEF */
+		printk("Unsupported CLKC CM %ld\n", clkc & CLKC_CM);
+		panic("Bye");
+	}
+
+	__res_bus_clock_speed_HZ = __ext_bus_clock_speed_HZ;
+	if (clkc & CLKC_P0)
+		__res_bus_clock_speed_HZ >>= 1;
+
+	if (verbose) {
+		printk("CLKIN: %lu.%3.3luMHz\n",
+		       __clkin_clock_speed_HZ / 1000000,
+		       (__clkin_clock_speed_HZ / 1000) % 1000);
+
+		printk("CLKS:"
+		       " ext=%luMHz res=%luMHz sdram=%luMHz cbus=%luMHz core=%luMHz dsu=%luMHz\n",
+		       __ext_bus_clock_speed_HZ / 1000000,
+		       __res_bus_clock_speed_HZ / 1000000,
+		       __sdram_clock_speed_HZ / 1000000,
+		       __core_bus_clock_speed_HZ / 1000000,
+		       __core_clock_speed_HZ / 1000000,
+		       __dsu_clock_speed_HZ / 1000000
+		       );
+	}
+
+	/* calculate the number of __delay() loop iterations per sec (2 insn loop) */
+	__delay_loops_MHz = __core_clock_speed_HZ / (1000000 * 2);
+
+	/* set the serial prescaler */
+	__serial_clock_speed_HZ = __res_bus_clock_speed_HZ;
+	quot = 1;
+	while (__serial_clock_speed_HZ / quot / 16 / 65536 > 3000)
+		quot += 1;
+
+	/* double the divisor if P0 is clear, so that if/when P0 is set, it's still achievable
+	 * - we have to be careful - dividing too much can mean we can't get 115200 baud
+	 */
+	if (__serial_clock_speed_HZ > 32000000 && !(clkc & CLKC_P0))
+		quot <<= 1;
+
+	__serial_clock_speed_HZ /= quot;
+	__frv_uart0.uartclk = __serial_clock_speed_HZ;
+	__frv_uart1.uartclk = __serial_clock_speed_HZ;
+
+	if (verbose)
+		printk("      uart=%luMHz\n", __serial_clock_speed_HZ / 1000000 * quot);
+
+	while (!(__get_UART0_LSR() & UART_LSR_TEMT))
+		continue;
+
+	while (!(__get_UART1_LSR() & UART_LSR_TEMT))
+		continue;
+
+	__set_UCPVR(quot);
+	__set_UCPSR(0);
+} /* end determine_clocks() */
+
+/*****************************************************************************/
+/*
+ * reserve some DMA consistent memory
+ */
+#ifdef CONFIG_RESERVE_DMA_COHERENT
+static void __init reserve_dma_coherent(void)
+{
+	unsigned long ampr;
+
+	/* find the first non-kernel memory tile and steal it */
+#define __steal_AMPR(r)						\
+	if (__get_DAMPR(r) & xAMPRx_V) {			\
+		ampr = __get_DAMPR(r);				\
+		__set_DAMPR(r, ampr | xAMPRx_S | xAMPRx_C);	\
+		__set_IAMPR(r, 0);				\
+		goto found;					\
+	}
+
+	__steal_AMPR(1);
+	__steal_AMPR(2);
+	__steal_AMPR(3);
+	__steal_AMPR(4);
+	__steal_AMPR(5);
+	__steal_AMPR(6);
+
+	if (PSR_IMPLE(__get_PSR()) == PSR_IMPLE_FR551) {
+		__steal_AMPR(7);
+		__steal_AMPR(8);
+		__steal_AMPR(9);
+		__steal_AMPR(10);
+		__steal_AMPR(11);
+		__steal_AMPR(12);
+		__steal_AMPR(13);
+		__steal_AMPR(14);
+	}
+
+	/* unable to grant any DMA consistent memory */
+	printk("No DMA consistent memory reserved\n");
+	return;
+
+ found:
+	dma_coherent_mem_start = ampr & xAMPRx_PPFN;
+	ampr &= xAMPRx_SS;
+	ampr >>= 4;
+	ampr = 1 << (ampr - 3 + 20);
+	dma_coherent_mem_end = dma_coherent_mem_start + ampr;
+
+	printk("DMA consistent memory reserved %lx-%lx\n",
+	       dma_coherent_mem_start, dma_coherent_mem_end);
+
+} /* end reserve_dma_coherent() */
+#endif
+
+/*****************************************************************************/
+/*
+ * calibrate the delay loop
+ */
+void __init calibrate_delay(void)
+{
+	loops_per_jiffy = __delay_loops_MHz * (1000000 / HZ);
+
+	printk("Calibrating delay loop... %lu.%02lu BogoMIPS\n",
+	       loops_per_jiffy / (500000 / HZ),
+	       (loops_per_jiffy / (5000 / HZ)) % 100);
+
+} /* end calibrate_delay() */
+
+/*****************************************************************************/
+/*
+ * look through the command line for some things we need to know immediately
+ */
+static void __init parse_cmdline_early(char *cmdline)
+{
+	if (!cmdline)
+		return;
+
+	while (*cmdline) {
+		if (*cmdline == ' ')
+			cmdline++;
+
+		/* "mem=XXX[kKmM]" sets SDRAM size to <mem>, overriding the value we worked
+		 * out from the SDRAM controller mask register
+		 */
+		if (!memcmp(cmdline, "mem=", 4)) {
+			unsigned long long mem_size;
+
+			mem_size = memparse(cmdline + 4, &cmdline);
+			memory_end = memory_start + mem_size;
+		}
+
+		while (*cmdline && *cmdline != ' ')
+			cmdline++;
+	}
+
+} /* end parse_cmdline_early() */
+
+/*****************************************************************************/
+/*
+ *
+ */
+void __init setup_arch(char **cmdline_p)
+{
+#ifdef CONFIG_MMU
+	printk("Linux FR-V port done by Red Hat Inc <dhowells@redhat.com>\n");
+#else
+	printk("uClinux FR-V port done by Red Hat Inc <dhowells@redhat.com>\n");
+#endif
+
+	memcpy(saved_command_line, redboot_command_line, COMMAND_LINE_SIZE);
+
+	determine_cpu();
+	determine_clocks(1);
+
+	/* For printk-directly-beats-on-serial-hardware hack */
+	console_set_baud(115200);
+#ifdef CONFIG_GDBSTUB
+	gdbstub_set_baud(115200);
+#endif
+
+#ifdef CONFIG_RESERVE_DMA_COHERENT
+	reserve_dma_coherent();
+#endif
+	dump_memory_map();
+
+#ifdef CONFIG_MB93090_MB00
+	if (mb93090_mb00_detected)
+		mb93090_display();
+#endif
+
+	/* register those serial ports that are available */
+#ifndef CONFIG_GDBSTUB_UART0
+	__reg(UART0_BASE + UART_IER * 8) = 0;
+	early_serial_setup(&__frv_uart0);
+//	register_serial(&__frv_uart0);
+#endif
+#ifndef CONFIG_GDBSTUB_UART1
+	__reg(UART1_BASE + UART_IER * 8) = 0;
+	early_serial_setup(&__frv_uart1);
+//	register_serial(&__frv_uart1);
+#endif
+
+#if defined(CONFIG_CHR_DEV_FLASH) || defined(CONFIG_BLK_DEV_FLASH)
+	/* we need to initialize the Flashrom device here since we might
+	 * do things with flash early on in the boot
+	 */
+	flash_probe();
+#endif
+
+	/* deal with the command line - RedBoot may have passed one to the kernel */
+	memcpy(command_line, saved_command_line, sizeof(command_line));
+	*cmdline_p = &command_line[0];
+	parse_cmdline_early(command_line);
+
+	/* set up the memory description
+	 * - by now the stack is part of the init task */
+	printk("Memory %08lx-%08lx\n", memory_start, memory_end);
+
+	if (memory_start == memory_end) BUG();
+
+	init_mm.start_code = (unsigned long) &_stext;
+	init_mm.end_code = (unsigned long) &_etext;
+	init_mm.end_data = (unsigned long) &_edata;
+#if 0 /* DAVIDM - don't set brk just incase someone decides to use it */
+	init_mm.brk = (unsigned long) &_end;
+#else
+	init_mm.brk = (unsigned long) 0;
+#endif
+
+#ifdef DEBUG
+	printk("KERNEL -> TEXT=0x%06x-0x%06x DATA=0x%06x-0x%06x BSS=0x%06x-0x%06x\n",
+	       (int) &_stext, (int) &_etext,
+	       (int) &_sdata, (int) &_edata,
+	       (int) &_sbss, (int) &_ebss);
+#endif
+
+#ifdef CONFIG_VT
+#if defined(CONFIG_VGA_CONSOLE)
+        conswitchp = &vga_con;
+#elif defined(CONFIG_DUMMY_CONSOLE)
+        conswitchp = &dummy_con;
+#endif
+#endif
+
+#ifdef CONFIG_BLK_DEV_BLKMEM
+	ROOT_DEV = MKDEV(BLKMEM_MAJOR,0);
+#endif
+	/*rom_length = (unsigned long)&_flashend - (unsigned long)&_romvec;*/
+
+#ifdef CONFIG_MMU
+	setup_linux_memory();
+#else
+	setup_uclinux_memory();
+#endif
+
+	/* get kmalloc into gear */
+	paging_init();
+
+	/* init DMA */
+	frv_dma_init();
+#ifdef DEBUG
+	printk("Done setup_arch\n");
+#endif
+
+	/* start the decrement timer running */
+//	asm volatile("movgs %0,timerd" :: "r"(10000000));
+//	__set_HSR(0, __get_HSR(0) | HSR0_ETMD);
+
+} /* end setup_arch() */
+
+#if 0
+/*****************************************************************************/
+/*
+ *
+ */
+static int __devinit setup_arch_serial(void)
+{
+	/* register those serial ports that are available */
+#ifndef CONFIG_GDBSTUB_UART0
+	early_serial_setup(&__frv_uart0);
+#endif
+#ifndef CONFIG_GDBSTUB_UART1
+	early_serial_setup(&__frv_uart1);
+#endif
+
+	return 0;
+} /* end setup_arch_serial() */
+
+late_initcall(setup_arch_serial);
+#endif
+
+/*****************************************************************************/
+/*
+ * set up the memory map for normal MMU linux
+ */
+#ifdef CONFIG_MMU
+static void __init setup_linux_memory(void)
+{
+	unsigned long bootmap_size, low_top_pfn, kstart, kend, high_mem;
+
+	kstart	= (unsigned long) &__kernel_image_start - PAGE_OFFSET;
+	kend	= (unsigned long) &__kernel_image_end - PAGE_OFFSET;
+
+	kstart = kstart & PAGE_MASK;
+	kend = (kend + PAGE_SIZE - 1) & PAGE_MASK;
+
+	/* give all the memory to the bootmap allocator,  tell it to put the
+	 * boot mem_map immediately following the kernel image
+	 */
+	bootmap_size = init_bootmem_node(NODE_DATA(0),
+					 kend >> PAGE_SHIFT,		/* map addr */
+					 memory_start >> PAGE_SHIFT,	/* start of RAM */
+					 memory_end >> PAGE_SHIFT	/* end of RAM */
+					 );
+
+	/* pass the memory that the kernel can immediately use over to the bootmem allocator */
+	max_mapnr = num_physpages = (memory_end - memory_start) >> PAGE_SHIFT;
+	low_top_pfn = (KERNEL_LOWMEM_END - KERNEL_LOWMEM_START) >> PAGE_SHIFT;
+	high_mem = 0;
+
+	if (num_physpages > low_top_pfn) {
+#ifdef CONFIG_HIGHMEM
+		high_mem = num_physpages - low_top_pfn;
+#else
+		max_mapnr = num_physpages = low_top_pfn;
+#endif
+	}
+	else {
+		low_top_pfn = num_physpages;
+	}
+
+	min_low_pfn = memory_start >> PAGE_SHIFT;
+	max_low_pfn = low_top_pfn;
+	max_pfn = memory_end >> PAGE_SHIFT;
+
+	num_mappedpages = low_top_pfn;
+
+	printk(KERN_NOTICE "%ldMB LOWMEM available.\n", low_top_pfn >> (20 - PAGE_SHIFT));
+
+	free_bootmem(memory_start, low_top_pfn << PAGE_SHIFT);
+
+#ifdef CONFIG_HIGHMEM
+	if (high_mem)
+		printk(KERN_NOTICE "%ldMB HIGHMEM available.\n", high_mem >> (20 - PAGE_SHIFT));
+#endif
+
+	/* take back the memory occupied by the kernel image and the bootmem alloc map */
+	reserve_bootmem(kstart, kend - kstart + bootmap_size);
+
+	/* reserve the memory occupied by the initial ramdisk */
+#ifdef CONFIG_BLK_DEV_INITRD
+	if (LOADER_TYPE && INITRD_START) {
+		if (INITRD_START + INITRD_SIZE <= (low_top_pfn << PAGE_SHIFT)) {
+			reserve_bootmem(INITRD_START, INITRD_SIZE);
+			initrd_start = INITRD_START ? INITRD_START + PAGE_OFFSET : 0;
+			initrd_end = initrd_start + INITRD_SIZE;
+		}
+		else {
+			printk(KERN_ERR
+			       "initrd extends beyond end of memory (0x%08lx > 0x%08lx)\n"
+			       "disabling initrd\n",
+			       INITRD_START + INITRD_SIZE,
+			       low_top_pfn << PAGE_SHIFT);
+			initrd_start = 0;
+		}
+	}
+#endif
+
+} /* end setup_linux_memory() */
+#endif
+
+/*****************************************************************************/
+/*
+ * set up the memory map for uClinux
+ */
+#ifndef CONFIG_MMU
+static void __init setup_uclinux_memory(void)
+{
+#ifdef CONFIG_PROTECT_KERNEL
+	unsigned long dampr;
+#endif
+	unsigned long kend;
+	int bootmap_size;
+
+	kend = (unsigned long) &__kernel_image_end;
+	kend = (kend + PAGE_SIZE - 1) & PAGE_MASK;
+
+	/* give all the memory to the bootmap allocator,  tell it to put the
+	 * boot mem_map immediately following the kernel image
+	 */
+	bootmap_size = init_bootmem_node(NODE_DATA(0),
+					 kend >> PAGE_SHIFT,		/* map addr */
+					 memory_start >> PAGE_SHIFT,	/* start of RAM */
+					 memory_end >> PAGE_SHIFT	/* end of RAM */
+					 );
+
+	/* free all the usable memory */
+	free_bootmem(memory_start, memory_end - memory_start);
+
+	high_memory = (void *) (memory_end & PAGE_MASK);
+	max_mapnr = num_physpages = ((unsigned long) high_memory - PAGE_OFFSET) >> PAGE_SHIFT;
+
+	min_low_pfn = memory_start >> PAGE_SHIFT;
+	max_low_pfn = memory_end >> PAGE_SHIFT;
+	max_pfn = max_low_pfn;
+
+	/* now take back the bits the core kernel is occupying */
+#ifndef CONFIG_PROTECT_KERNEL
+	reserve_bootmem(kend, bootmap_size);
+	reserve_bootmem((unsigned long) &__kernel_image_start,
+			kend - (unsigned long) &__kernel_image_start);
+
+#else
+	dampr = __get_DAMPR(0);
+	dampr &= xAMPRx_SS;
+	dampr = (dampr >> 4) + 17;
+	dampr = 1 << dampr;
+
+	reserve_bootmem(__get_DAMPR(0) & xAMPRx_PPFN, dampr);
+#endif
+
+	/* reserve some memory to do uncached DMA through if requested */
+#ifdef CONFIG_RESERVE_DMA_COHERENT
+	if (dma_coherent_mem_start)
+		reserve_bootmem(dma_coherent_mem_start,
+				dma_coherent_mem_end - dma_coherent_mem_start);
+#endif
+
+} /* end setup_uclinux_memory() */
+#endif
+
+/*****************************************************************************/
+/*
+ * get CPU information for use by procfs
+ */
+static int show_cpuinfo(struct seq_file *m, void *v)
+{
+	const char *gr, *fr, *fm, *fp, *cm, *nem, *ble;
+#ifdef CONFIG_PM
+	const char *sep;
+#endif
+
+	gr  = cpu_hsr0_all & HSR0_GRHE	? "gr0-63"	: "gr0-31";
+	fr  = cpu_hsr0_all & HSR0_FRHE	? "fr0-63"	: "fr0-31";
+	fm  = cpu_psr_all  & PSR_EM	? ", Media"	: "";
+	fp  = cpu_psr_all  & PSR_EF	? ", FPU"	: "";
+	cm  = cpu_psr_all  & PSR_CM	? ", CCCR"	: "";
+	nem = cpu_psr_all  & PSR_NEM	? ", NE"	: "";
+	ble = cpu_psr_all  & PSR_BE	? "BE"		: "LE";
+
+	seq_printf(m,
+		   "CPU-Series:\t%s\n"
+		   "CPU-Core:\t%s, %s, %s%s%s\n"
+		   "CPU:\t\t%s\n"
+		   "MMU:\t\t%s\n"
+		   "FP-Media:\t%s%s%s\n"
+		   "System:\t\t%s",
+		   cpu_series,
+		   cpu_core, gr, ble, cm, nem,
+		   cpu_silicon,
+		   cpu_mmu,
+		   fr, fm, fp,
+		   cpu_system);
+
+	if (cpu_board1)
+		seq_printf(m, ", %s", cpu_board1);
+
+	if (cpu_board2)
+		seq_printf(m, ", %s", cpu_board2);
+
+	seq_printf(m, "\n");
+
+#ifdef CONFIG_PM
+	seq_printf(m, "PM-Controls:");
+	sep = "\t";
+
+	if (clock_bits_settable & CLOCK_BIT_CMODE) {
+		seq_printf(m, "%scmode=0x%04hx", sep, clock_cmodes_permitted);
+		sep = ", ";
+	}
+
+	if (clock_bits_settable & CLOCK_BIT_CM) {
+		seq_printf(m, "%scm=0x%lx", sep, clock_bits_settable & CLOCK_BIT_CM);
+		sep = ", ";
+	}
+
+	if (clock_bits_settable & CLOCK_BIT_P0) {
+		seq_printf(m, "%sp0=0x3", sep);
+		sep = ", ";
+	}
+
+	seq_printf(m, "%ssuspend=0x22\n", sep);
+#endif
+
+	seq_printf(m,
+		   "PM-Status:\tcmode=%d, cm=%d, p0=%d\n",
+		   clock_cmode_current, clock_cm_current, clock_p0_current);
+
+#define print_clk(TAG, VAR) \
+	seq_printf(m, "Clock-" TAG ":\t%lu.%2.2lu MHz\n", VAR / 1000000, (VAR / 10000) % 100)
+
+	print_clk("In",    __clkin_clock_speed_HZ);
+	print_clk("Core",  __core_clock_speed_HZ);
+	print_clk("SDRAM", __sdram_clock_speed_HZ);
+	print_clk("CBus",  __core_bus_clock_speed_HZ);
+	print_clk("Res",   __res_bus_clock_speed_HZ);
+	print_clk("Ext",   __ext_bus_clock_speed_HZ);
+	print_clk("DSU",   __dsu_clock_speed_HZ);
+
+	seq_printf(m,
+		   "BogoMips:\t%lu.%02lu\n",
+		   (loops_per_jiffy * HZ) / 500000, ((loops_per_jiffy * HZ) / 5000) % 100);
+
+	return 0;
+} /* end show_cpuinfo() */
+
+static void *c_start(struct seq_file *m, loff_t *pos)
+{
+	return *pos < NR_CPUS ? (void *) 0x12345678 : NULL;
+}
+
+static void *c_next(struct seq_file *m, void *v, loff_t *pos)
+{
+	++*pos;
+	return c_start(m, pos);
+}
+
+static void c_stop(struct seq_file *m, void *v)
+{
+}
+
+struct seq_operations cpuinfo_op = {
+	.start	= c_start,
+	.next	= c_next,
+	.stop	= c_stop,
+	.show	= show_cpuinfo,
+};
+
+void arch_gettod(int *year, int *mon, int *day, int *hour,
+		 int *min, int *sec)
+{
+	*year = *mon = *day = *hour = *min = *sec = 0;
+}
+
+/*****************************************************************************/
+/*
+ *
+ */
+#ifdef CONFIG_MB93090_MB00
+static void __init mb93090_sendlcdcmd(uint32_t cmd)
+{
+	unsigned long base = __addr_LCD();
+	int loop;
+
+	/* request reading of the busy flag */
+	__set_LCD(base, LCD_CMD_READ_BUSY);
+	__set_LCD(base, LCD_CMD_READ_BUSY & ~LCD_E);
+
+	/* wait for the busy flag to become clear */
+	for (loop = 10000; loop > 0; loop--)
+		if (!(__get_LCD(base) & 0x80))
+			break;
+
+	/* send the command */
+	__set_LCD(base, cmd);
+	__set_LCD(base, cmd & ~LCD_E);
+
+} /* end mb93090_sendlcdcmd() */
+
+/*****************************************************************************/
+/*
+ * write to the MB93090 LEDs and LCD
+ */
+static void __init mb93090_display(void)
+{
+	const char *p;
+
+	__set_LEDS(0);
+
+	/* set up the LCD */
+	mb93090_sendlcdcmd(LCD_CMD_CLEAR);
+	mb93090_sendlcdcmd(LCD_CMD_FUNCSET(1,1,0));
+	mb93090_sendlcdcmd(LCD_CMD_ON(0,0));
+	mb93090_sendlcdcmd(LCD_CMD_HOME);
+
+	mb93090_sendlcdcmd(LCD_CMD_SET_DD_ADDR(0));
+	for (p = mb93090_banner; *p; p++)
+		mb93090_sendlcdcmd(LCD_DATA_WRITE(*p));
+
+	mb93090_sendlcdcmd(LCD_CMD_SET_DD_ADDR(64));
+	for (p = mb93090_version; *p; p++)
+		mb93090_sendlcdcmd(LCD_DATA_WRITE(*p));
+
+} /* end mb93090_display() */
+
+#endif // CONFIG_MB93090_MB00
diff -Nru a/arch/frv/kernel/signal.c b/arch/frv/kernel/signal.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/kernel/signal.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,598 @@
+/* signal.c: FRV specific bits of signal handling
+ *
+ * Copyright (C) 2003-5 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ * - Derived from arch/m68k/kernel/signal.c
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/sched.h>
+#include <linux/mm.h>
+#include <linux/smp.h>
+#include <linux/smp_lock.h>
+#include <linux/kernel.h>
+#include <linux/signal.h>
+#include <linux/errno.h>
+#include <linux/wait.h>
+#include <linux/ptrace.h>
+#include <linux/unistd.h>
+#include <linux/personality.h>
+#include <linux/suspend.h>
+#include <asm/ucontext.h>
+#include <asm/uaccess.h>
+#include <asm/cacheflush.h>
+
+#define DEBUG_SIG 0
+
+#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
+
+struct fdpic_func_descriptor {
+	unsigned long	text;
+	unsigned long	GOT;
+};
+
+asmlinkage int do_signal(struct pt_regs *regs, sigset_t *oldset);
+
+/*
+ * Atomically swap in the new signal mask, and wait for a signal.
+ */
+asmlinkage int sys_sigsuspend(int history0, int history1, old_sigset_t mask)
+{
+	sigset_t saveset;
+
+	mask &= _BLOCKABLE;
+	spin_lock_irq(&current->sighand->siglock);
+	saveset = current->blocked;
+	siginitset(&current->blocked, mask);
+	recalc_sigpending();
+	spin_unlock_irq(&current->sighand->siglock);
+
+	__frame->gr8 = -EINTR;
+	while (1) {
+		current->state = TASK_INTERRUPTIBLE;
+		schedule();
+		if (do_signal(__frame, &saveset))
+			/* return the signal number as the return value of this function
+			 * - this is an utterly evil hack. syscalls should not invoke do_signal()
+			 *   as entry.S sets regs->gr8 to the return value of the system call
+			 * - we can't just use sigpending() as we'd have to discard SIG_IGN signals
+			 *   and call waitpid() if SIGCHLD needed discarding
+			 * - this only works on the i386 because it passes arguments to the signal
+			 *   handler on the stack, and the return value in EAX is effectively
+			 *   discarded
+			 */
+			return __frame->gr8;
+	}
+}
+
+asmlinkage int sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize)
+{
+	sigset_t saveset, newset;
+
+	/* XXX: Don't preclude handling different sized sigset_t's.  */
+	if (sigsetsize != sizeof(sigset_t))
+		return -EINVAL;
+
+	if (copy_from_user(&newset, unewset, sizeof(newset)))
+		return -EFAULT;
+	sigdelsetmask(&newset, ~_BLOCKABLE);
+
+	spin_lock_irq(&current->sighand->siglock);
+	saveset = current->blocked;
+	current->blocked = newset;
+	recalc_sigpending();
+	spin_unlock_irq(&current->sighand->siglock);
+
+	__frame->gr8 = -EINTR;
+	while (1) {
+		current->state = TASK_INTERRUPTIBLE;
+		schedule();
+		if (do_signal(__frame, &saveset))
+			/* return the signal number as the return value of this function
+			 * - this is an utterly evil hack. syscalls should not invoke do_signal()
+			 *   as entry.S sets regs->gr8 to the return value of the system call
+			 * - we can't just use sigpending() as we'd have to discard SIG_IGN signals
+			 *   and call waitpid() if SIGCHLD needed discarding
+			 * - this only works on the i386 because it passes arguments to the signal
+			 *   handler on the stack, and the return value in EAX is effectively
+			 *   discarded
+			 */
+			return __frame->gr8;
+	}
+}
+
+asmlinkage int sys_sigaction(int sig,
+			     const struct old_sigaction __user *act,
+			     struct old_sigaction __user *oact)
+{
+	struct k_sigaction new_ka, old_ka;
+	int ret;
+
+	if (act) {
+		old_sigset_t mask;
+		if (verify_area(VERIFY_READ, act, sizeof(*act)) ||
+		    __get_user(new_ka.sa.sa_handler, &act->sa_handler) ||
+		    __get_user(new_ka.sa.sa_restorer, &act->sa_restorer))
+			return -EFAULT;
+		__get_user(new_ka.sa.sa_flags, &act->sa_flags);
+		__get_user(mask, &act->sa_mask);
+		siginitset(&new_ka.sa.sa_mask, mask);
+	}
+
+	ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL);
+
+	if (!ret && oact) {
+		if (verify_area(VERIFY_WRITE, oact, sizeof(*oact)) ||
+		    __put_user(old_ka.sa.sa_handler, &oact->sa_handler) ||
+		    __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer))
+			return -EFAULT;
+		__put_user(old_ka.sa.sa_flags, &oact->sa_flags);
+		__put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask);
+	}
+
+	return ret;
+}
+
+asmlinkage
+int sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss)
+{
+	return do_sigaltstack(uss, uoss, __frame->sp);
+}
+
+
+/*
+ * Do a signal return; undo the signal stack.
+ */
+
+struct sigframe
+{
+	void (*pretcode)(void);
+	int sig;
+	struct sigcontext sc;
+	unsigned long extramask[_NSIG_WORDS-1];
+	uint32_t retcode[2];
+};
+
+struct rt_sigframe
+{
+	void (*pretcode)(void);
+	int sig;
+	struct siginfo *pinfo;
+	void *puc;
+	struct siginfo info;
+	struct ucontext uc;
+	uint32_t retcode[2];
+};
+
+static int restore_sigcontext(struct sigcontext __user *sc, int *_gr8)
+{
+	struct user_context *user = current->thread.user;
+	unsigned long tbr, psr;
+
+	tbr = user->i.tbr;
+	psr = user->i.psr;
+	if (copy_from_user(user, &sc->sc_context, sizeof(sc->sc_context)))
+		goto badframe;
+	user->i.tbr = tbr;
+	user->i.psr = psr;
+
+	restore_user_regs(user);
+
+	user->i.syscallno = -1;		/* disable syscall checks */
+
+	*_gr8 = user->i.gr[8];
+	return 0;
+
+ badframe:
+	return 1;
+}
+
+asmlinkage int sys_sigreturn(void)
+{
+	struct sigframe __user *frame = (struct sigframe __user *) __frame->sp;
+	sigset_t set;
+	int gr8;
+
+	if (verify_area(VERIFY_READ, frame, sizeof(*frame)))
+		goto badframe;
+	if (__get_user(set.sig[0], &frame->sc.sc_oldmask))
+		goto badframe;
+
+	if (_NSIG_WORDS > 1 &&
+	    __copy_from_user(&set.sig[1], &frame->extramask, sizeof(frame->extramask)))
+		goto badframe;
+
+	sigdelsetmask(&set, ~_BLOCKABLE);
+	spin_lock_irq(&current->sighand->siglock);
+	current->blocked = set;
+	recalc_sigpending();
+	spin_unlock_irq(&current->sighand->siglock);
+
+	if (restore_sigcontext(&frame->sc, &gr8))
+		goto badframe;
+	return gr8;
+
+ badframe:
+	force_sig(SIGSEGV, current);
+	return 0;
+}
+
+asmlinkage int sys_rt_sigreturn(void)
+{
+	struct rt_sigframe __user *frame = (struct rt_sigframe __user *) __frame->sp;
+	sigset_t set;
+	stack_t st;
+	int gr8;
+
+	if (verify_area(VERIFY_READ, frame, sizeof(*frame)))
+		goto badframe;
+	if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set)))
+		goto badframe;
+
+	sigdelsetmask(&set, ~_BLOCKABLE);
+	spin_lock_irq(&current->sighand->siglock);
+	current->blocked = set;
+	recalc_sigpending();
+	spin_unlock_irq(&current->sighand->siglock);
+
+	if (restore_sigcontext(&frame->uc.uc_mcontext, &gr8))
+		goto badframe;
+
+	if (__copy_from_user(&st, &frame->uc.uc_stack, sizeof(st)))
+		goto badframe;
+
+	/* It is more difficult to avoid calling this function than to
+	 * call it and ignore errors.  */
+	/*
+	 * THIS CANNOT WORK! "&st" is a kernel address, and "do_sigaltstack()"
+	 * takes a user address (and verifies that it is a user address). End
+	 * result: it does exactly _nothing_.
+	 */
+	do_sigaltstack(&st, NULL, __frame->sp);
+
+	return gr8;
+
+badframe:
+	force_sig(SIGSEGV, current);
+	return 0;
+}
+
+/*
+ * Set up a signal frame
+ */
+static int setup_sigcontext(struct sigcontext __user *sc, unsigned long mask)
+{
+	save_user_regs(current->thread.user);
+
+	if (copy_to_user(&sc->sc_context, current->thread.user, sizeof(sc->sc_context)) != 0)
+		goto badframe;
+
+	/* non-iBCS2 extensions.. */
+	if (__put_user(mask, &sc->sc_oldmask) < 0)
+		goto badframe;
+
+	return 0;
+
+ badframe:
+	return 1;
+}
+
+/*****************************************************************************/
+/*
+ * Determine which stack to use..
+ */
+static inline void __user *get_sigframe(struct k_sigaction *ka,
+					struct pt_regs *regs,
+					size_t frame_size)
+{
+	unsigned long sp;
+
+	/* Default to using normal stack */
+	sp = regs->sp;
+
+	/* This is the X/Open sanctioned signal stack switching.  */
+	if (ka->sa.sa_flags & SA_ONSTACK) {
+		if (! on_sig_stack(sp))
+			sp = current->sas_ss_sp + current->sas_ss_size;
+	}
+
+	return (void __user *) ((sp - frame_size) & ~7UL);
+} /* end get_sigframe() */
+
+/*****************************************************************************/
+/*
+ *
+ */
+static void setup_frame(int sig, struct k_sigaction *ka, sigset_t *set, struct pt_regs * regs)
+{
+	struct sigframe __user *frame;
+	int rsig;
+
+	frame = get_sigframe(ka, regs, sizeof(*frame));
+
+	if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
+		goto give_sigsegv;
+
+	rsig = sig;
+	if (sig < 32 &&
+	    __current_thread_info->exec_domain &&
+	    __current_thread_info->exec_domain->signal_invmap)
+		rsig = __current_thread_info->exec_domain->signal_invmap[sig];
+
+	if (__put_user(rsig, &frame->sig) < 0)
+		goto give_sigsegv;
+
+	if (setup_sigcontext(&frame->sc, set->sig[0]))
+		goto give_sigsegv;
+
+	if (_NSIG_WORDS > 1) {
+		if (__copy_to_user(frame->extramask, &set->sig[1],
+				   sizeof(frame->extramask)))
+			goto give_sigsegv;
+	}
+
+	/* Set up to return from userspace.  If provided, use a stub
+	 * already in userspace.  */
+	if (ka->sa.sa_flags & SA_RESTORER) {
+		if (__put_user(ka->sa.sa_restorer, &frame->pretcode) < 0)
+			goto give_sigsegv;
+	}
+	else {
+		/* Set up the following code on the stack:
+		 *	setlos	#__NR_sigreturn,gr7
+		 *	tira	gr0,0
+		 */
+		if (__put_user((void (*)(void))frame->retcode, &frame->pretcode) ||
+		    __put_user(0x8efc0000|__NR_sigreturn, &frame->retcode[0]) ||
+		    __put_user(0xc0700000, &frame->retcode[1]))
+			goto give_sigsegv;
+
+		flush_icache_range((unsigned long) frame->retcode,
+				   (unsigned long) (frame->retcode + 2));
+	}
+
+	/* set up registers for signal handler */
+	regs->sp   = (unsigned long) frame;
+	regs->lr   = (unsigned long) &frame->retcode;
+	regs->gr8  = sig;
+
+	if (get_personality & FDPIC_FUNCPTRS) {
+		struct fdpic_func_descriptor __user *funcptr =
+			(struct fdpic_func_descriptor *) ka->sa.sa_handler;
+		__get_user(regs->pc, &funcptr->text);
+		__get_user(regs->gr15, &funcptr->GOT);
+	} else {
+		regs->pc   = (unsigned long) ka->sa.sa_handler;
+		regs->gr15 = 0;
+	}
+
+	set_fs(USER_DS);
+
+#if DEBUG_SIG
+	printk("SIG deliver %d (%s:%d): sp=%p pc=%lx ra=%p\n",
+		sig, current->comm, current->pid, frame, regs->pc, frame->pretcode);
+#endif
+
+	return;
+
+give_sigsegv:
+	if (sig == SIGSEGV)
+		ka->sa.sa_handler = SIG_DFL;
+
+	force_sig(SIGSEGV, current);
+} /* end setup_frame() */
+
+/*****************************************************************************/
+/*
+ *
+ */
+static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
+			   sigset_t *set, struct pt_regs * regs)
+{
+	struct rt_sigframe __user *frame;
+	int rsig;
+
+	frame = get_sigframe(ka, regs, sizeof(*frame));
+
+	if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
+		goto give_sigsegv;
+
+	rsig = sig;
+	if (sig < 32 &&
+	    __current_thread_info->exec_domain &&
+	    __current_thread_info->exec_domain->signal_invmap)
+		rsig = __current_thread_info->exec_domain->signal_invmap[sig];
+
+	if (__put_user(rsig,		&frame->sig) ||
+	    __put_user(&frame->info,	&frame->pinfo) ||
+	    __put_user(&frame->uc,	&frame->puc))
+		goto give_sigsegv;
+
+	if (copy_siginfo_to_user(&frame->info, info))
+		goto give_sigsegv;
+
+	/* Create the ucontext.  */
+	if (__put_user(0, &frame->uc.uc_flags) ||
+	    __put_user(0, &frame->uc.uc_link) ||
+	    __put_user((void*)current->sas_ss_sp, &frame->uc.uc_stack.ss_sp) ||
+	    __put_user(sas_ss_flags(regs->sp), &frame->uc.uc_stack.ss_flags) ||
+	    __put_user(current->sas_ss_size, &frame->uc.uc_stack.ss_size))
+		goto give_sigsegv;
+
+	if (setup_sigcontext(&frame->uc.uc_mcontext, set->sig[0]))
+		goto give_sigsegv;
+
+	if (__copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set)))
+		goto give_sigsegv;
+
+	/* Set up to return from userspace.  If provided, use a stub
+	 * already in userspace.  */
+	if (ka->sa.sa_flags & SA_RESTORER) {
+		if (__put_user(ka->sa.sa_restorer, &frame->pretcode))
+			goto give_sigsegv;
+	}
+	else {
+		/* Set up the following code on the stack:
+		 *	setlos	#__NR_sigreturn,gr7
+		 *	tira	gr0,0
+		 */
+		if (__put_user((void (*)(void))frame->retcode, &frame->pretcode) ||
+		    __put_user(0x8efc0000|__NR_rt_sigreturn, &frame->retcode[0]) ||
+		    __put_user(0xc0700000, &frame->retcode[1]))
+			goto give_sigsegv;
+
+		flush_icache_range((unsigned long) frame->retcode,
+				   (unsigned long) (frame->retcode + 2));
+	}
+
+	/* Set up registers for signal handler */
+	regs->sp  = (unsigned long) frame;
+	regs->lr   = (unsigned long) &frame->retcode;
+	regs->gr8 = sig;
+	regs->gr9 = (unsigned long) &frame->info;
+
+	if (get_personality & FDPIC_FUNCPTRS) {
+		struct fdpic_func_descriptor *funcptr =
+			(struct fdpic_func_descriptor __user *) ka->sa.sa_handler;
+		__get_user(regs->pc, &funcptr->text);
+		__get_user(regs->gr15, &funcptr->GOT);
+	} else {
+		regs->pc   = (unsigned long) ka->sa.sa_handler;
+		regs->gr15 = 0;
+	}
+
+	set_fs(USER_DS);
+
+#if DEBUG_SIG
+	printk("SIG deliver %d (%s:%d): sp=%p pc=%lx ra=%p\n",
+		sig, current->comm, current->pid, frame, regs->pc, frame->pretcode);
+#endif
+
+	return;
+
+give_sigsegv:
+	if (sig == SIGSEGV)
+		ka->sa.sa_handler = SIG_DFL;
+	force_sig(SIGSEGV, current);
+
+} /* end setup_rt_frame() */
+
+/*****************************************************************************/
+/*
+ * OK, we're invoking a handler
+ */
+static void handle_signal(unsigned long sig, siginfo_t *info,
+			  struct k_sigaction *ka, sigset_t *oldset,
+			  struct pt_regs *regs)
+{
+	/* Are we from a system call? */
+	if (in_syscall(regs)) {
+		/* If so, check system call restarting.. */
+		switch (regs->gr8) {
+		case -ERESTART_RESTARTBLOCK:
+		case -ERESTARTNOHAND:
+			regs->gr8 = -EINTR;
+			break;
+
+		case -ERESTARTSYS:
+			if (!(ka->sa.sa_flags & SA_RESTART)) {
+				regs->gr8 = -EINTR;
+				break;
+			}
+			/* fallthrough */
+		case -ERESTARTNOINTR:
+			regs->gr8 = regs->orig_gr8;
+			regs->pc -= 4;
+		}
+	}
+
+	/* Set up the stack frame */
+	if (ka->sa.sa_flags & SA_SIGINFO)
+		setup_rt_frame(sig, ka, info, oldset, regs);
+	else
+		setup_frame(sig, ka, oldset, regs);
+
+	if (!(ka->sa.sa_flags & SA_NODEFER)) {
+		spin_lock_irq(&current->sighand->siglock);
+		sigorsets(&current->blocked, &current->blocked, &ka->sa.sa_mask);
+		sigaddset(&current->blocked, sig);
+		recalc_sigpending();
+		spin_unlock_irq(&current->sighand->siglock);
+	}
+} /* end handle_signal() */
+
+/*****************************************************************************/
+/*
+ * Note that 'init' is a special process: it doesn't get signals it doesn't
+ * want to handle. Thus you cannot kill init even with a SIGKILL even by
+ * mistake.
+ */
+int do_signal(struct pt_regs *regs, sigset_t *oldset)
+{
+	struct k_sigaction ka;
+	siginfo_t info;
+	int signr;
+
+	/*
+	 * We want the common case to go fast, which
+	 * is why we may in certain cases get here from
+	 * kernel mode. Just return without doing anything
+	 * if so.
+	 */
+	if (!user_mode(regs))
+		return 1;
+
+	if (current->flags & PF_FREEZE) {
+		refrigerator(0);
+		goto no_signal;
+	}
+
+	if (!oldset)
+		oldset = &current->blocked;
+
+	signr = get_signal_to_deliver(&info, &ka, regs, NULL);
+	if (signr > 0) {
+		handle_signal(signr, &info, &ka, oldset, regs);
+		return 1;
+	}
+
+ no_signal:
+	/* Did we come from a system call? */
+	if (regs->syscallno >= 0) {
+		/* Restart the system call - no handlers present */
+		if (regs->gr8 == -ERESTARTNOHAND ||
+		    regs->gr8 == -ERESTARTSYS ||
+		    regs->gr8 == -ERESTARTNOINTR) {
+			regs->gr8 = regs->orig_gr8;
+			regs->pc -= 4;
+		}
+
+		if (regs->gr8 == -ERESTART_RESTARTBLOCK){
+			regs->gr8 = __NR_restart_syscall;
+			regs->pc -= 4;
+		}
+	}
+
+	return 0;
+} /* end do_signal() */
+
+/*****************************************************************************/
+/*
+ * notification of userspace execution resumption
+ * - triggered by current->work.notify_resume
+ */
+asmlinkage void do_notify_resume(__u32 thread_info_flags)
+{
+	/* pending single-step? */
+	if (thread_info_flags & _TIF_SINGLESTEP)
+		clear_thread_flag(TIF_SINGLESTEP);
+
+	/* deal with pending signal delivery */
+	if (thread_info_flags & _TIF_SIGPENDING)
+		do_signal(__frame, NULL);
+
+} /* end do_notify_resume() */
diff -Nru a/arch/frv/kernel/sleep.S b/arch/frv/kernel/sleep.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/kernel/sleep.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,374 @@
+/* sleep.S: power saving mode entry
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Woodhouse (dwmw2@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ *
+ */
+
+#include <linux/sys.h>
+#include <linux/config.h>
+#include <linux/linkage.h>
+#include <asm/setup.h>
+#include <asm/segment.h>
+#include <asm/page.h>
+#include <asm/ptrace.h>
+#include <asm/errno.h>
+#include <asm/cache.h>
+#include <asm/spr-regs.h>
+
+#define __addr_MASK	0xfeff9820	/* interrupt controller mask */
+
+#define __addr_FR55X_DRCN	0xfeff0218      /* Address of DRCN register */
+#define FR55X_DSTS_OFFSET	-4		/* Offset from DRCN to DSTS */
+#define FR55X_SDRAMC_DSTS_SSI	0x00000002	/* indicates that the SDRAM is in self-refresh mode */
+
+#define __addr_FR4XX_DRCN	0xfe000430      /* Address of DRCN register */
+#define FR4XX_DSTS_OFFSET	-8		/* Offset from DRCN to DSTS */
+#define FR4XX_SDRAMC_DSTS_SSI	0x00000001	/* indicates that the SDRAM is in self-refresh mode */
+
+#define SDRAMC_DRCN_SR	0x00000001	/* transition SDRAM into self-refresh mode */
+
+	.section	.bss
+	.balign		8
+	.globl		__sleep_save_area
+__sleep_save_area:
+	.space		16
+
+
+	.text
+	.balign		4
+
+.macro li v r
+	sethi.p		%hi(\v),\r
+	setlo		%lo(\v),\r
+.endm
+
+#ifdef CONFIG_PM
+###############################################################################
+#
+# CPU suspension routine
+# - void frv_cpu_suspend(unsigned long pdm_mode)
+#
+###############################################################################
+	.globl		frv_cpu_suspend
+        .type		frv_cpu_suspend,@function
+frv_cpu_suspend:
+
+	#----------------------------------------------------
+	# save hsr0, psr, isr, and lr for resume code
+	#----------------------------------------------------
+	li		__sleep_save_area,gr11
+
+	movsg		hsr0,gr4
+	movsg		psr,gr5
+	movsg		isr,gr6
+	movsg		lr,gr7
+	stdi		gr4,@(gr11,#0)
+	stdi		gr6,@(gr11,#8)
+
+	# store the return address from sleep in GR14, and its complement in GR13 as a check
+	li		__ramboot_resume,gr14
+#ifdef CONFIG_MMU
+	# Resume via RAMBOOT# will turn MMU off, so bootloader needs a physical address.
+	sethi.p		%hi(__page_offset),gr13
+	setlo		%lo(__page_offset),gr13
+	sub		gr14,gr13,gr14
+#endif
+	not		gr14,gr13
+
+	#----------------------------------------------------
+	# preload and lock into icache that code which may have to run
+	# when dram is in self-refresh state.
+	#----------------------------------------------------
+	movsg		hsr0, gr3
+	li		HSR0_ICE,gr4
+	or		gr3,gr4,gr3
+	movgs		gr3,hsr0
+	or		gr3,gr8,gr7	// add the sleep bits for later
+
+	li		#__icache_lock_start,gr3
+	li		#__icache_lock_end,gr4
+1:	icpl		gr3,gr0,#1
+	addi		gr3,#L1_CACHE_BYTES,gr3
+	cmp		gr4,gr3,icc0
+	bhi		icc0,#0,1b
+
+	# disable exceptions
+	movsg		psr,gr8
+	andi.p		gr8,#~PSR_PIL,gr8
+	andi		gr8,~PSR_ET,gr8
+	movgs		gr8,psr
+	ori		gr8,#PSR_ET,gr8
+
+	srli		gr8,#28,gr4
+	subicc		gr4,#3,gr0,icc0
+	beq		icc0,#0,1f
+	# FR4xx
+	li		__addr_FR4XX_DRCN,gr4
+	li		FR4XX_SDRAMC_DSTS_SSI,gr5
+	li		FR4XX_DSTS_OFFSET,gr6
+	bra		__icache_lock_start
+1:
+	# FR5xx
+	li		__addr_FR55X_DRCN,gr4
+	li		FR55X_SDRAMC_DSTS_SSI,gr5
+	li		FR55X_DSTS_OFFSET,gr6
+	bra		__icache_lock_start
+
+	.size		frv_cpu_suspend, .-frv_cpu_suspend
+
+#
+# the final part of the sleep sequence...
+# - we want it to be be cacheline aligned so we can lock it into the icache easily
+#  On entry:	gr7 holds desired hsr0 sleep value
+#               gr8 holds desired psr sleep value
+#
+	.balign		L1_CACHE_BYTES
+        .type		__icache_lock_start,@function
+__icache_lock_start:
+
+	#----------------------------------------------------
+	# put SDRAM in self-refresh mode
+	#----------------------------------------------------
+
+	# Flush all data in the cache using the DCEF instruction.
+	dcef		@(gr0,gr0),#1
+
+	# Stop DMAC transfer
+
+	# Execute dummy load from SDRAM
+	ldi		@(gr11,#0),gr11
+
+	# put the SDRAM into self-refresh mode
+	ld              @(gr4,gr0),gr11
+	ori		gr11,#SDRAMC_DRCN_SR,gr11
+	st		gr11,@(gr4,gr0)
+	membar
+
+	# wait for SDRAM to reach self-refresh mode
+1:	ld		@(gr4,gr6),gr11
+	andcc		gr11,gr5,gr11,icc0
+	beq		icc0,#0,1b
+
+	#  Set the GPIO register so that the IRQ[3:0] pins become valid, as required.
+	#  Set the clock mode (CLKC register) as required.
+	#     - At this time, also set the CLKC register P0 bit.
+
+	# Set the HSR0 register PDM field.
+	movgs		gr7,hsr0
+
+	# Execute NOP 32 times.
+	.rept		32
+	nop
+	.endr
+
+#if 0 // Fujitsu recommend to skip this and will update docs.
+	#      Release the interrupt mask setting of the MASK register of the
+	#      interrupt controller if necessary.
+	sti		gr10,@(gr9,#0)
+	membar
+#endif
+
+	# Set the PSR register ET bit to 1 to enable interrupts.
+	movgs		gr8,psr
+
+	###################################################
+	# this is only reached if waking up via interrupt
+	###################################################
+
+	# Execute NOP 32 times.
+	.rept		32
+	nop
+	.endr
+
+	#----------------------------------------------------
+	# wake SDRAM from self-refresh mode
+	#----------------------------------------------------
+	ld              @(gr4,gr0),gr11
+	andi		gr11,#~SDRAMC_DRCN_SR,gr11
+	st		gr11,@(gr4,gr0)
+	membar
+2:
+	ld		@(gr4,gr6),gr11	// Wait for it to come back...
+	andcc		gr11,gr5,gr0,icc0
+	bne		icc0,0,2b
+
+	# wait for the SDRAM to stabilise
+	li		0x0100000,gr3
+3:	subicc		gr3,#1,gr3,icc0
+	bne		icc0,#0,3b
+
+	# now that DRAM is back, this is the end of the code which gets
+	# locked in icache.
+__icache_lock_end:
+	.size		__icache_lock_start, .-__icache_lock_start
+
+	# Fall-through to the RAMBOOT# wakeup path
+
+###############################################################################
+#
+#  resume from suspend re-entry point reached via RAMBOOT# and bootloader
+#
+###############################################################################
+__ramboot_resume:
+
+	#----------------------------------------------------
+	# restore hsr0, psr, isr, and leave saved lr in gr7
+	#----------------------------------------------------
+	li		__sleep_save_area,gr11
+#ifdef CONFIG_MMU
+	movsg		hsr0,gr4
+	sethi.p		%hi(HSR0_EXMMU),gr3
+	setlo		%lo(HSR0_EXMMU),gr3
+	andcc		gr3,gr4,gr0,icc0
+	bne		icc0,#0,2f
+
+	# need to use physical address
+	sethi.p		%hi(__page_offset),gr3
+	setlo		%lo(__page_offset),gr3
+	sub		gr11,gr3,gr11
+
+	# flush all tlb entries
+	setlos		#64,gr4
+	setlos.p	#PAGE_SIZE,gr5
+	setlos		#0,gr6
+1:
+	tlbpr		gr6,gr0,#6,#0
+	subicc.p	gr4,#1,gr4,icc0
+	add		gr6,gr5,gr6
+	bne		icc0,#2,1b
+
+	# need a temporary mapping for the current physical address we are
+	# using between time MMU is enabled and jump to virtual address is
+	# made.
+	sethi.p		%hi(0x00000000),gr4
+	setlo		%lo(0x00000000),gr4		; physical address
+	setlos		#xAMPRx_L|xAMPRx_M|xAMPRx_SS_256Mb|xAMPRx_S_KERNEL|xAMPRx_V,gr5
+	or		gr4,gr5,gr5
+
+	movsg		cxnr,gr13
+	or		gr4,gr13,gr4
+
+	movgs		gr4,iamlr1			; mapped from real address 0
+	movgs		gr5,iampr1			; cached kernel memory at 0x00000000
+2:
+#endif
+
+	lddi		@(gr11,#0),gr4 ; hsr0, psr
+	lddi		@(gr11,#8),gr6 ; isr, lr
+	movgs		gr4,hsr0
+	bar
+
+#ifdef CONFIG_MMU
+	sethi.p		%hi(1f),gr11
+	setlo		%lo(1f),gr11
+	jmpl		@(gr11,gr0)
+1:
+	movgs		gr0,iampr1 	; get rid of temporary mapping
+#endif
+	movgs		gr5,psr
+	movgs		gr6,isr
+
+	#----------------------------------------------------
+	# unlock the icache which was locked before going to sleep
+	#----------------------------------------------------
+	li		__icache_lock_start,gr3
+	li		__icache_lock_end,gr4
+1:	icul		gr3
+	addi		gr3,#L1_CACHE_BYTES,gr3
+	cmp		gr4,gr3,icc0
+	bhi		icc0,#0,1b
+
+	#----------------------------------------------------
+	# back to business as usual
+	#----------------------------------------------------
+	jmpl		@(gr7,gr0)		;
+
+#endif /* CONFIG_PM */
+
+###############################################################################
+#
+# CPU core sleep mode routine
+#
+###############################################################################
+	.globl		frv_cpu_core_sleep
+        .type		frv_cpu_core_sleep,@function
+frv_cpu_core_sleep:
+
+	# Preload into icache.
+	li		#__core_sleep_icache_lock_start,gr3
+	li		#__core_sleep_icache_lock_end,gr4
+
+1:	icpl		gr3,gr0,#1
+	addi		gr3,#L1_CACHE_BYTES,gr3
+	cmp		gr4,gr3,icc0
+	bhi		icc0,#0,1b
+
+	bra	__core_sleep_icache_lock_start
+
+	.balign L1_CACHE_BYTES
+__core_sleep_icache_lock_start:
+
+	# (1) Set the PSR register ET bit to 0 to disable interrupts.
+	movsg		psr,gr8
+	andi.p		gr8,#~(PSR_PIL),gr8
+	andi		gr8,#~(PSR_ET),gr4
+	movgs		gr4,psr
+
+#if 0 // Fujitsu recommend to skip this and will update docs.
+	# (2) Set '1' to all bits in the MASK register of the interrupt
+	#     controller and mask interrupts.
+	sethi.p		%hi(__addr_MASK),gr9
+	setlo		%lo(__addr_MASK),gr9
+	sethi.p		%hi(0xffff0000),gr4
+	setlo		%lo(0xffff0000),gr4
+	ldi		@(gr9,#0),gr10
+	sti		gr4,@(gr9,#0)
+#endif
+	# (3) Flush all data in the cache using the DCEF instruction.
+	dcef		@(gr0,gr0),#1
+
+	# (4) Execute the memory barrier instruction
+	membar
+
+	# (5) Set the GPIO register so that the IRQ[3:0] pins become valid, as required.
+	# (6) Set the clock mode (CLKC register) as required.
+	#     - At this time, also set the CLKC register P0 bit.
+	# (7) Set the HSR0 register PDM field to  001 .
+	movsg		hsr0,gr4
+	ori		gr4,HSR0_PDM_CORE_SLEEP,gr4
+	movgs		gr4,hsr0
+
+	# (8) Execute NOP 32 times.
+	.rept		32
+	nop
+	.endr
+
+#if 0 // Fujitsu recommend to skip this and will update docs.
+	# (9) Release the interrupt mask setting of the MASK register of the
+	#     interrupt controller if necessary.
+	sti		gr10,@(gr9,#0)
+	membar
+#endif
+
+	# (10) Set the PSR register ET bit to 1 to enable interrupts.
+	movgs		gr8,psr
+
+__core_sleep_icache_lock_end:
+
+	# Unlock from icache
+	li	__core_sleep_icache_lock_start,gr3
+	li	__core_sleep_icache_lock_end,gr4
+1:	icul		gr3
+	addi		gr3,#L1_CACHE_BYTES,gr3
+	cmp		gr4,gr3,icc0
+	bhi		icc0,#0,1b
+
+	bralr
+
+	.size		frv_cpu_core_sleep, .-frv_cpu_core_sleep
diff -Nru a/arch/frv/kernel/switch_to.S b/arch/frv/kernel/switch_to.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/kernel/switch_to.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,486 @@
+###############################################################################
+#
+# switch_to.S: context switch operation
+#
+# Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+# Written by David Howells (dhowells@redhat.com)
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version
+# 2 of the License, or (at your option) any later version.
+#
+###############################################################################
+#include <linux/config.h>
+#include <linux/linkage.h>
+#include <asm/thread_info.h>
+#include <asm/processor.h>
+#include <asm/registers.h>
+#include <asm/spr-regs.h>
+
+.macro LEDS val
+	setlos		#~\val,gr27
+	st		gr27,@(gr30,gr0)
+	membar
+	dcf		@(gr30,gr0)
+.endm
+
+	.section	.sdata
+	.balign		8
+
+	# address of frame 0 (userspace) on current kernel stack
+	.globl		__kernel_frame0_ptr
+__kernel_frame0_ptr:
+	.long		init_thread_union + THREAD_SIZE - USER_CONTEXT_SIZE
+
+	# address of current task
+	.globl		__kernel_current_task
+__kernel_current_task:
+	.long		init_task
+
+	.section	.text
+	.balign		4
+
+###############################################################################
+#
+# struct task_struct *__switch_to(struct thread_struct *prev, struct thread_struct *next)
+#
+###############################################################################
+	.globl		__switch_to
+__switch_to:
+	# save outgoing process's context
+	sethi.p		%hi(__switch_back),gr11
+	setlo		%lo(__switch_back),gr11
+	movsg		lr,gr10
+
+	stdi		gr28,@(gr8,#__THREAD_FRAME)
+	sti		sp  ,@(gr8,#__THREAD_SP)
+	sti		fp  ,@(gr8,#__THREAD_FP)
+	stdi		gr10,@(gr8,#__THREAD_LR)
+	stdi		gr16,@(gr8,#__THREAD_GR(16))
+	stdi		gr18,@(gr8,#__THREAD_GR(18))
+	stdi		gr20,@(gr8,#__THREAD_GR(20))
+	stdi		gr22,@(gr8,#__THREAD_GR(22))
+	stdi		gr24,@(gr8,#__THREAD_GR(24))
+	stdi.p		gr26,@(gr8,#__THREAD_GR(26))
+
+	or		gr8,gr8,gr22
+	ldi.p		@(gr8,#__THREAD_USER),gr8
+	call		save_user_regs
+	or		gr22,gr22,gr8
+
+	# retrieve the new context
+	sethi.p		%hi(__kernel_frame0_ptr),gr6
+	setlo		%lo(__kernel_frame0_ptr),gr6
+	movsg		psr,gr4
+
+	lddi.p		@(gr9,#__THREAD_FRAME),gr10
+	or		gr29,gr29,gr27		; ret_from_fork needs to know old current
+
+	ldi		@(gr11,#4),gr19		; get new_current->thread_info
+
+	lddi		@(gr9,#__THREAD_SP),gr12
+	ldi		@(gr9,#__THREAD_LR),gr14
+	ldi		@(gr9,#__THREAD_PC),gr18
+	ldi.p		@(gr9,#__THREAD_FRAME0),gr7
+
+	# actually switch kernel contexts with ordinary exceptions disabled
+	andi		gr4,#~PSR_ET,gr5
+	movgs		gr5,psr
+
+	or.p		gr10,gr0,gr28
+	or		gr11,gr0,gr29
+	or.p		gr12,gr0,sp
+	or		gr13,gr0,fp
+	or		gr19,gr0,gr15		; set __current_thread_info
+
+	sti		gr7,@(gr6,#0)		; set __kernel_frame0_ptr
+	sti		gr29,@(gr6,#4)		; set __kernel_current_task
+
+	movgs		gr14,lr
+	bar
+
+	srli		gr15,#28,gr5
+	subicc		gr5,#0xc,gr0,icc0
+	beq		icc0,#0,111f
+	break
+	nop
+111:
+
+	# jump to __switch_back or ret_from_fork as appropriate
+	movgs		gr4,psr
+	jmpl		@(gr18,gr0)
+
+###############################################################################
+#
+# restore incoming process's context
+# - on entry:
+#   - SP, FP, LR, GR15, GR28 and GR29 will have been set up appropriately
+#   - GR9 will point to the incoming thread_struct
+#
+###############################################################################
+__switch_back:
+	lddi		@(gr9,#__THREAD_GR(16)),gr16
+	lddi		@(gr9,#__THREAD_GR(18)),gr18
+	lddi		@(gr9,#__THREAD_GR(20)),gr20
+	lddi		@(gr9,#__THREAD_GR(22)),gr22
+	lddi		@(gr9,#__THREAD_GR(24)),gr24
+	lddi		@(gr9,#__THREAD_GR(26)),gr26
+
+	# fall through into restore_user_regs()
+	ldi		@(gr9,#__THREAD_USER),gr8
+
+###############################################################################
+#
+# restore extra general regs and FP/Media regs
+# - void restore_user_regs(const struct user_context *target)
+#
+###############################################################################
+	.globl		restore_user_regs
+restore_user_regs:
+	movsg		hsr0,gr6
+	ori		gr6,#HSR0_GRHE|HSR0_FRLE|HSR0_FRHE,gr6
+	movgs		gr6,hsr0
+	movsg		hsr0,gr6
+
+	movsg		psr,gr7
+	ori		gr7,#PSR_EF|PSR_EM,gr7
+	movgs		gr7,psr
+	movsg		psr,gr7
+	srli		gr7,#24,gr7
+	bar
+
+	lddi		@(gr8,#__FPMEDIA_MSR(0)),gr4
+
+	movgs		gr4,msr0
+	movgs		gr5,msr1
+
+	lddfi		@(gr8,#__FPMEDIA_ACC(0)),fr16
+	lddfi		@(gr8,#__FPMEDIA_ACC(2)),fr18
+	ldbfi		@(gr8,#__FPMEDIA_ACCG(0)),fr20
+	ldbfi		@(gr8,#__FPMEDIA_ACCG(1)),fr21
+	ldbfi		@(gr8,#__FPMEDIA_ACCG(2)),fr22
+	ldbfi		@(gr8,#__FPMEDIA_ACCG(3)),fr23
+
+	mwtacc		fr16,acc0
+	mwtacc		fr17,acc1
+	mwtacc		fr18,acc2
+	mwtacc		fr19,acc3
+	mwtaccg		fr20,accg0
+	mwtaccg		fr21,accg1
+	mwtaccg		fr22,accg2
+	mwtaccg		fr23,accg3
+
+	# some CPUs have extra ACCx and ACCGx regs and maybe FSRx regs
+	subicc.p	gr7,#0x50,gr0,icc0
+	subicc		gr7,#0x31,gr0,icc1
+	beq		icc0,#0,__restore_acc_fr451
+	beq		icc1,#0,__restore_acc_fr555
+__restore_acc_cont:
+
+	# some CPU's have GR32-GR63
+	setlos		#HSR0_FRHE,gr4
+	andcc		gr6,gr4,gr0,icc0
+	beq		icc0,#1,__restore_skip_gr32_gr63
+
+	lddi		@(gr8,#__INT_GR(32)),gr32
+	lddi		@(gr8,#__INT_GR(34)),gr34
+	lddi		@(gr8,#__INT_GR(36)),gr36
+	lddi		@(gr8,#__INT_GR(38)),gr38
+	lddi		@(gr8,#__INT_GR(40)),gr40
+	lddi		@(gr8,#__INT_GR(42)),gr42
+	lddi		@(gr8,#__INT_GR(44)),gr44
+	lddi		@(gr8,#__INT_GR(46)),gr46
+	lddi		@(gr8,#__INT_GR(48)),gr48
+	lddi		@(gr8,#__INT_GR(50)),gr50
+	lddi		@(gr8,#__INT_GR(52)),gr52
+	lddi		@(gr8,#__INT_GR(54)),gr54
+	lddi		@(gr8,#__INT_GR(56)),gr56
+	lddi		@(gr8,#__INT_GR(58)),gr58
+	lddi		@(gr8,#__INT_GR(60)),gr60
+	lddi		@(gr8,#__INT_GR(62)),gr62
+__restore_skip_gr32_gr63:
+
+	# all CPU's have FR0-FR31
+	lddfi		@(gr8,#__FPMEDIA_FR( 0)),fr0
+	lddfi		@(gr8,#__FPMEDIA_FR( 2)),fr2
+	lddfi		@(gr8,#__FPMEDIA_FR( 4)),fr4
+	lddfi		@(gr8,#__FPMEDIA_FR( 6)),fr6
+	lddfi		@(gr8,#__FPMEDIA_FR( 8)),fr8
+	lddfi		@(gr8,#__FPMEDIA_FR(10)),fr10
+	lddfi		@(gr8,#__FPMEDIA_FR(12)),fr12
+	lddfi		@(gr8,#__FPMEDIA_FR(14)),fr14
+	lddfi		@(gr8,#__FPMEDIA_FR(16)),fr16
+	lddfi		@(gr8,#__FPMEDIA_FR(18)),fr18
+	lddfi		@(gr8,#__FPMEDIA_FR(20)),fr20
+	lddfi		@(gr8,#__FPMEDIA_FR(22)),fr22
+	lddfi		@(gr8,#__FPMEDIA_FR(24)),fr24
+	lddfi		@(gr8,#__FPMEDIA_FR(26)),fr26
+	lddfi		@(gr8,#__FPMEDIA_FR(28)),fr28
+	lddfi.p		@(gr8,#__FPMEDIA_FR(30)),fr30
+
+	# some CPU's have FR32-FR63
+	setlos		#HSR0_FRHE,gr4
+	andcc		gr6,gr4,gr0,icc0
+	beq		icc0,#1,__restore_skip_fr32_fr63
+
+	lddfi		@(gr8,#__FPMEDIA_FR(32)),fr32
+	lddfi		@(gr8,#__FPMEDIA_FR(34)),fr34
+	lddfi		@(gr8,#__FPMEDIA_FR(36)),fr36
+	lddfi		@(gr8,#__FPMEDIA_FR(38)),fr38
+	lddfi		@(gr8,#__FPMEDIA_FR(40)),fr40
+	lddfi		@(gr8,#__FPMEDIA_FR(42)),fr42
+	lddfi		@(gr8,#__FPMEDIA_FR(44)),fr44
+	lddfi		@(gr8,#__FPMEDIA_FR(46)),fr46
+	lddfi		@(gr8,#__FPMEDIA_FR(48)),fr48
+	lddfi		@(gr8,#__FPMEDIA_FR(50)),fr50
+	lddfi		@(gr8,#__FPMEDIA_FR(52)),fr52
+	lddfi		@(gr8,#__FPMEDIA_FR(54)),fr54
+	lddfi		@(gr8,#__FPMEDIA_FR(56)),fr56
+	lddfi		@(gr8,#__FPMEDIA_FR(58)),fr58
+	lddfi		@(gr8,#__FPMEDIA_FR(60)),fr60
+	lddfi		@(gr8,#__FPMEDIA_FR(62)),fr62
+__restore_skip_fr32_fr63:
+
+	lddi		@(gr8,#__FPMEDIA_FNER(0)),gr4
+	movsg		fner0,gr4
+	movsg		fner1,gr5
+	bralr
+
+	# the FR451 also has ACC8-11/ACCG8-11 regs (but not 4-7...)
+__restore_acc_fr451:
+	lddfi		@(gr8,#__FPMEDIA_ACC(4)),fr16
+	lddfi		@(gr8,#__FPMEDIA_ACC(6)),fr18
+	ldbfi		@(gr8,#__FPMEDIA_ACCG(4)),fr20
+	ldbfi		@(gr8,#__FPMEDIA_ACCG(5)),fr21
+	ldbfi		@(gr8,#__FPMEDIA_ACCG(6)),fr22
+	ldbfi		@(gr8,#__FPMEDIA_ACCG(7)),fr23
+
+	mwtacc		fr16,acc8
+	mwtacc		fr17,acc9
+	mwtacc		fr18,acc10
+	mwtacc		fr19,acc11
+	mwtaccg		fr20,accg8
+	mwtaccg		fr21,accg9
+	mwtaccg		fr22,accg10
+	mwtaccg		fr23,accg11
+	bra		__restore_acc_cont
+
+	# the FR555 also has ACC4-7/ACCG4-7 regs and an FSR0 reg
+__restore_acc_fr555:
+	lddfi		@(gr8,#__FPMEDIA_ACC(4)),fr16
+	lddfi		@(gr8,#__FPMEDIA_ACC(6)),fr18
+	ldbfi		@(gr8,#__FPMEDIA_ACCG(4)),fr20
+	ldbfi		@(gr8,#__FPMEDIA_ACCG(5)),fr21
+	ldbfi		@(gr8,#__FPMEDIA_ACCG(6)),fr22
+	ldbfi		@(gr8,#__FPMEDIA_ACCG(7)),fr23
+
+	mnop.p
+	mwtacc		fr16,acc4
+	mnop.p
+	mwtacc		fr17,acc5
+	mnop.p
+	mwtacc		fr18,acc6
+	mnop.p
+	mwtacc		fr19,acc7
+	mnop.p
+	mwtaccg		fr20,accg4
+	mnop.p
+	mwtaccg		fr21,accg5
+	mnop.p
+	mwtaccg		fr22,accg6
+	mnop.p
+	mwtaccg		fr23,accg7
+
+	ldi		@(gr8,#__FPMEDIA_FSR(0)),gr4
+	movgs		gr4,fsr0
+
+	bra		__restore_acc_cont
+
+
+###############################################################################
+#
+# save extra general regs and FP/Media regs
+# - void save_user_regs(struct user_context *target)
+#
+###############################################################################
+	.globl		save_user_regs
+save_user_regs:
+	movsg		hsr0,gr6
+	ori		gr6,#HSR0_GRHE|HSR0_FRLE|HSR0_FRHE,gr6
+	movgs		gr6,hsr0
+	movsg		hsr0,gr6
+
+	movsg		psr,gr7
+	ori		gr7,#PSR_EF|PSR_EM,gr7
+	movgs		gr7,psr
+	movsg		psr,gr7
+	srli		gr7,#24,gr7
+	bar
+
+	movsg		fner0,gr4
+	movsg		fner1,gr5
+	stdi.p		gr4,@(gr8,#__FPMEDIA_FNER(0))
+
+	# some CPU's have GR32-GR63
+	setlos		#HSR0_GRHE,gr4
+	andcc		gr6,gr4,gr0,icc0
+	beq		icc0,#1,__save_skip_gr32_gr63
+
+	stdi		gr32,@(gr8,#__INT_GR(32))
+	stdi		gr34,@(gr8,#__INT_GR(34))
+	stdi		gr36,@(gr8,#__INT_GR(36))
+	stdi		gr38,@(gr8,#__INT_GR(38))
+	stdi		gr40,@(gr8,#__INT_GR(40))
+	stdi		gr42,@(gr8,#__INT_GR(42))
+	stdi		gr44,@(gr8,#__INT_GR(44))
+	stdi		gr46,@(gr8,#__INT_GR(46))
+	stdi		gr48,@(gr8,#__INT_GR(48))
+	stdi		gr50,@(gr8,#__INT_GR(50))
+	stdi		gr52,@(gr8,#__INT_GR(52))
+	stdi		gr54,@(gr8,#__INT_GR(54))
+	stdi		gr56,@(gr8,#__INT_GR(56))
+	stdi		gr58,@(gr8,#__INT_GR(58))
+	stdi		gr60,@(gr8,#__INT_GR(60))
+	stdi		gr62,@(gr8,#__INT_GR(62))
+__save_skip_gr32_gr63:
+
+	# all CPU's have FR0-FR31
+	stdfi		fr0 ,@(gr8,#__FPMEDIA_FR( 0))
+	stdfi		fr2 ,@(gr8,#__FPMEDIA_FR( 2))
+	stdfi		fr4 ,@(gr8,#__FPMEDIA_FR( 4))
+	stdfi		fr6 ,@(gr8,#__FPMEDIA_FR( 6))
+	stdfi		fr8 ,@(gr8,#__FPMEDIA_FR( 8))
+	stdfi		fr10,@(gr8,#__FPMEDIA_FR(10))
+	stdfi		fr12,@(gr8,#__FPMEDIA_FR(12))
+	stdfi		fr14,@(gr8,#__FPMEDIA_FR(14))
+	stdfi		fr16,@(gr8,#__FPMEDIA_FR(16))
+	stdfi		fr18,@(gr8,#__FPMEDIA_FR(18))
+	stdfi		fr20,@(gr8,#__FPMEDIA_FR(20))
+	stdfi		fr22,@(gr8,#__FPMEDIA_FR(22))
+	stdfi		fr24,@(gr8,#__FPMEDIA_FR(24))
+	stdfi		fr26,@(gr8,#__FPMEDIA_FR(26))
+	stdfi		fr28,@(gr8,#__FPMEDIA_FR(28))
+	stdfi.p		fr30,@(gr8,#__FPMEDIA_FR(30))
+
+	# some CPU's have FR32-FR63
+	setlos		#HSR0_FRHE,gr4
+	andcc		gr6,gr4,gr0,icc0
+	beq		icc0,#1,__save_skip_fr32_fr63
+
+	stdfi		fr32,@(gr8,#__FPMEDIA_FR(32))
+	stdfi		fr34,@(gr8,#__FPMEDIA_FR(34))
+	stdfi		fr36,@(gr8,#__FPMEDIA_FR(36))
+	stdfi		fr38,@(gr8,#__FPMEDIA_FR(38))
+	stdfi		fr40,@(gr8,#__FPMEDIA_FR(40))
+	stdfi		fr42,@(gr8,#__FPMEDIA_FR(42))
+	stdfi		fr44,@(gr8,#__FPMEDIA_FR(44))
+	stdfi		fr46,@(gr8,#__FPMEDIA_FR(46))
+	stdfi		fr48,@(gr8,#__FPMEDIA_FR(48))
+	stdfi		fr50,@(gr8,#__FPMEDIA_FR(50))
+	stdfi		fr52,@(gr8,#__FPMEDIA_FR(52))
+	stdfi		fr54,@(gr8,#__FPMEDIA_FR(54))
+	stdfi		fr56,@(gr8,#__FPMEDIA_FR(56))
+	stdfi		fr58,@(gr8,#__FPMEDIA_FR(58))
+	stdfi		fr60,@(gr8,#__FPMEDIA_FR(60))
+	stdfi		fr62,@(gr8,#__FPMEDIA_FR(62))
+__save_skip_fr32_fr63:
+
+	mrdacc		acc0 ,fr4
+	mrdacc		acc1 ,fr5
+
+	stdfi.p		fr4 ,@(gr8,#__FPMEDIA_ACC(0))
+
+	mrdacc		acc2 ,fr6
+	mrdacc		acc3 ,fr7
+
+	stdfi.p		fr6 ,@(gr8,#__FPMEDIA_ACC(2))
+
+	mrdaccg		accg0,fr4
+	stbfi.p		fr4 ,@(gr8,#__FPMEDIA_ACCG(0))
+
+	mrdaccg		accg1,fr5
+	stbfi.p		fr5 ,@(gr8,#__FPMEDIA_ACCG(1))
+
+	mrdaccg		accg2,fr6
+	stbfi.p		fr6 ,@(gr8,#__FPMEDIA_ACCG(2))
+
+	mrdaccg		accg3,fr7
+	stbfi		fr7 ,@(gr8,#__FPMEDIA_ACCG(3))
+
+	movsg		msr0 ,gr4
+	movsg		msr1 ,gr5
+
+	stdi		gr4 ,@(gr8,#__FPMEDIA_MSR(0))
+
+	# some CPUs have extra ACCx and ACCGx regs and maybe FSRx regs
+	subicc.p	gr7,#0x50,gr0,icc0
+	subicc		gr7,#0x31,gr0,icc1
+	beq		icc0,#0,__save_acc_fr451
+	beq		icc1,#0,__save_acc_fr555
+__save_acc_cont:
+
+	lddfi		@(gr8,#__FPMEDIA_FR(4)),fr4
+	lddfi.p		@(gr8,#__FPMEDIA_FR(6)),fr6
+	bralr
+
+	# the FR451 also has ACC8-11/ACCG8-11 regs (but not 4-7...)
+__save_acc_fr451:
+	mrdacc		acc8 ,fr4
+	mrdacc		acc9 ,fr5
+
+	stdfi.p		fr4 ,@(gr8,#__FPMEDIA_ACC(4))
+
+	mrdacc		acc10,fr6
+	mrdacc		acc11,fr7
+
+	stdfi.p		fr6 ,@(gr8,#__FPMEDIA_ACC(6))
+
+	mrdaccg		accg8,fr4
+	stbfi.p		fr4 ,@(gr8,#__FPMEDIA_ACCG(4))
+
+	mrdaccg		accg9,fr5
+	stbfi.p		fr5 ,@(gr8,#__FPMEDIA_ACCG(5))
+
+	mrdaccg		accg10,fr6
+	stbfi.p		fr6 ,@(gr8,#__FPMEDIA_ACCG(6))
+
+	mrdaccg		accg11,fr7
+	stbfi		fr7 ,@(gr8,#__FPMEDIA_ACCG(7))
+	bra		__save_acc_cont
+
+	# the FR555 also has ACC4-7/ACCG4-7 regs and an FSR0 reg
+__save_acc_fr555:
+	mnop.p
+	mrdacc		acc4 ,fr4
+	mnop.p
+	mrdacc		acc5 ,fr5
+
+	stdfi		fr4 ,@(gr8,#__FPMEDIA_ACC(4))
+
+	mnop.p
+	mrdacc		acc6 ,fr6
+	mnop.p
+	mrdacc		acc7 ,fr7
+
+	stdfi		fr6 ,@(gr8,#__FPMEDIA_ACC(6))
+
+	mnop.p
+	mrdaccg		accg4,fr4
+	stbfi		fr4 ,@(gr8,#__FPMEDIA_ACCG(4))
+
+	mnop.p
+	mrdaccg		accg5,fr5
+	stbfi		fr5 ,@(gr8,#__FPMEDIA_ACCG(5))
+
+	mnop.p
+	mrdaccg		accg6,fr6
+	stbfi		fr6 ,@(gr8,#__FPMEDIA_ACCG(6))
+
+	mnop.p
+	mrdaccg		accg7,fr7
+	stbfi		fr7 ,@(gr8,#__FPMEDIA_ACCG(7))
+
+	movsg		fsr0 ,gr4
+	sti		gr4 ,@(gr8,#__FPMEDIA_FSR(0))
+	bra		__save_acc_cont
diff -Nru a/arch/frv/kernel/sys_frv.c b/arch/frv/kernel/sys_frv.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/kernel/sys_frv.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,214 @@
+/* sys_frv.c: FRV arch-specific syscall wrappers
+ *
+ * Copyright (C) 2003-5 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ * - Derived from arch/m68k/kernel/sys_m68k.c
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/errno.h>
+#include <linux/sched.h>
+#include <linux/mm.h>
+#include <linux/smp.h>
+#include <linux/smp_lock.h>
+#include <linux/sem.h>
+#include <linux/msg.h>
+#include <linux/shm.h>
+#include <linux/stat.h>
+#include <linux/mman.h>
+#include <linux/file.h>
+#include <linux/utsname.h>
+#include <linux/syscalls.h>
+
+#include <asm/setup.h>
+#include <asm/uaccess.h>
+#include <asm/ipc.h>
+
+/*
+ * sys_pipe() is the normal C calling standard for creating
+ * a pipe. It's not the way unix traditionally does this, though.
+ */
+asmlinkage long sys_pipe(unsigned long * fildes)
+{
+	int fd[2];
+	int error;
+
+	error = do_pipe(fd);
+	if (!error) {
+		if (copy_to_user(fildes, fd, 2*sizeof(int)))
+			error = -EFAULT;
+	}
+	return error;
+}
+
+asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
+			  unsigned long prot, unsigned long flags,
+			  unsigned long fd, unsigned long pgoff)
+{
+	int error = -EBADF;
+	struct file * file = NULL;
+
+	flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
+	if (!(flags & MAP_ANONYMOUS)) {
+		file = fget(fd);
+		if (!file)
+			goto out;
+	}
+
+	/* As with sparc32, make sure the shift for mmap2 is constant
+	   (12), no matter what PAGE_SIZE we have.... */
+
+	/* But unlike sparc32, don't just silently break if we're
+	   trying to map something we can't */
+	if (pgoff & ((1<<(PAGE_SHIFT-12))-1))
+		return -EINVAL;
+
+	pgoff >>= (PAGE_SHIFT - 12);
+
+	down_write(&current->mm->mmap_sem);
+	error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
+	up_write(&current->mm->mmap_sem);
+
+	if (file)
+		fput(file);
+out:
+	return error;
+}
+
+#if 0 /* DAVIDM - do we want this */
+struct mmap_arg_struct64 {
+	__u32 addr;
+	__u32 len;
+	__u32 prot;
+	__u32 flags;
+	__u64 offset; /* 64 bits */
+	__u32 fd;
+};
+
+asmlinkage long sys_mmap64(struct mmap_arg_struct64 *arg)
+{
+	int error = -EFAULT;
+	struct file * file = NULL;
+	struct mmap_arg_struct64 a;
+	unsigned long pgoff;
+
+	if (copy_from_user(&a, arg, sizeof(a)))
+		return -EFAULT;
+
+	if ((long)a.offset & ~PAGE_MASK)
+		return -EINVAL;
+
+	pgoff = a.offset >> PAGE_SHIFT;
+	if ((a.offset >> PAGE_SHIFT) != pgoff)
+		return -EINVAL;
+
+	if (!(a.flags & MAP_ANONYMOUS)) {
+		error = -EBADF;
+		file = fget(a.fd);
+		if (!file)
+			goto out;
+	}
+	a.flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
+
+	down_write(&current->mm->mmap_sem);
+	error = do_mmap_pgoff(file, a.addr, a.len, a.prot, a.flags, pgoff);
+	up_write(&current->mm->mmap_sem);
+	if (file)
+		fput(file);
+out:
+	return error;
+}
+#endif
+
+/*
+ * sys_ipc() is the de-multiplexer for the SysV IPC calls..
+ *
+ * This is really horribly ugly.
+ */
+asmlinkage long sys_ipc(unsigned long call,
+			unsigned long first,
+			unsigned long second,
+			unsigned long third,
+			void __user *ptr,
+			unsigned long fifth)
+{
+	int version, ret;
+
+	version = call >> 16; /* hack for backward compatibility */
+	call &= 0xffff;
+
+	switch (call) {
+	case SEMOP:
+		return sys_semtimedop(first, (struct sembuf __user *)ptr, second, NULL);
+	case SEMTIMEDOP:
+		return sys_semtimedop(first, (struct sembuf __user *)ptr, second,
+				      (const struct timespec __user *)fifth);
+
+	case SEMGET:
+		return sys_semget (first, second, third);
+	case SEMCTL: {
+		union semun fourth;
+		if (!ptr)
+			return -EINVAL;
+		if (get_user(fourth.__pad, (void * __user *) ptr))
+			return -EFAULT;
+		return sys_semctl (first, second, third, fourth);
+	}
+
+	case MSGSND:
+		return sys_msgsnd (first, (struct msgbuf __user *) ptr,
+				   second, third);
+	case MSGRCV:
+		switch (version) {
+		case 0: {
+			struct ipc_kludge tmp;
+			if (!ptr)
+				return -EINVAL;
+
+			if (copy_from_user(&tmp,
+					   (struct ipc_kludge __user *) ptr,
+					   sizeof (tmp)))
+				return -EFAULT;
+			return sys_msgrcv (first, tmp.msgp, second,
+					   tmp.msgtyp, third);
+		}
+		default:
+			return sys_msgrcv (first,
+					   (struct msgbuf __user *) ptr,
+					   second, fifth, third);
+		}
+	case MSGGET:
+		return sys_msgget ((key_t) first, second);
+	case MSGCTL:
+		return sys_msgctl (first, second, (struct msqid_ds __user *) ptr);
+
+	case SHMAT:
+		switch (version) {
+		default: {
+			ulong raddr;
+			ret = do_shmat (first, (char __user *) ptr, second, &raddr);
+			if (ret)
+				return ret;
+			return put_user (raddr, (ulong __user *) third);
+		}
+		case 1:	/* iBCS2 emulator entry point */
+			if (!segment_eq(get_fs(), get_ds()))
+				return -EINVAL;
+			/* The "(ulong *) third" is valid _only_ because of the kernel segment thing */
+			return do_shmat (first, (char __user *) ptr, second, (ulong *) third);
+		}
+	case SHMDT:
+		return sys_shmdt ((char __user *)ptr);
+	case SHMGET:
+		return sys_shmget (first, second, third);
+	case SHMCTL:
+		return sys_shmctl (first, second,
+				   (struct shmid_ds __user *) ptr);
+	default:
+		return -ENOSYS;
+	}
+}
diff -Nru a/arch/frv/kernel/sysctl.c b/arch/frv/kernel/sysctl.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/kernel/sysctl.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,206 @@
+/* sysctl.c: implementation of /proc/sys files relating to FRV specifically
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/config.h>
+#include <linux/slab.h>
+#include <linux/sysctl.h>
+#include <linux/proc_fs.h>
+#include <linux/init.h>
+#include <asm/uaccess.h>
+
+static const char frv_cache_wback[] = "wback";
+static const char frv_cache_wthru[] = "wthru";
+
+static void frv_change_dcache_mode(unsigned long newmode)
+{
+	unsigned long flags, hsr0;
+
+	local_irq_save(flags);
+
+	hsr0 = __get_HSR(0);
+	hsr0 &= ~HSR0_DCE;
+	__set_HSR(0, hsr0);
+
+	asm volatile("	dcef	@(gr0,gr0),#1	\n"
+		     "	membar			\n"
+		     : : : "memory"
+		     );
+
+	hsr0 = (hsr0 & ~HSR0_CBM) | newmode;
+	__set_HSR(0, hsr0);
+	hsr0 |= HSR0_DCE;
+	__set_HSR(0, hsr0);
+
+	local_irq_restore(flags);
+
+	//printk("HSR0 now %08lx\n", hsr0);
+}
+
+/*****************************************************************************/
+/*
+ * handle requests to dynamically switch the write caching mode delivered by /proc
+ */
+static int procctl_frv_cachemode(ctl_table *table, int write, struct file *filp,
+				 void *buffer, size_t *lenp, loff_t *ppos)
+{
+	unsigned long hsr0;
+	char buff[8];
+	int len;
+
+	len = *lenp;
+
+	if (write) {
+		/* potential state change */
+		if (len <= 1 || len > sizeof(buff) - 1)
+			return -EINVAL;
+
+		if (copy_from_user(buff, buffer, len) != 0)
+			return -EFAULT;
+
+		if (buff[len - 1] == '\n')
+			buff[len - 1] = '\0';
+		else
+			buff[len] = '\0';
+
+		if (strcmp(buff, frv_cache_wback) == 0) {
+			/* switch dcache into write-back mode */
+			frv_change_dcache_mode(HSR0_CBM_COPY_BACK);
+			return 0;
+		}
+
+		if (strcmp(buff, frv_cache_wthru) == 0) {
+			/* switch dcache into write-through mode */
+			frv_change_dcache_mode(HSR0_CBM_WRITE_THRU);
+			return 0;
+		}
+
+		return -EINVAL;
+	}
+
+	/* read the state */
+	if (filp->f_pos > 0) {
+		*lenp = 0;
+		return 0;
+	}
+
+	hsr0 = __get_HSR(0);
+	switch (hsr0 & HSR0_CBM) {
+	case HSR0_CBM_WRITE_THRU:
+		memcpy(buff, frv_cache_wthru, sizeof(frv_cache_wthru) - 1);
+		buff[sizeof(frv_cache_wthru) - 1] = '\n';
+		len = sizeof(frv_cache_wthru);
+		break;
+	default:
+		memcpy(buff, frv_cache_wback, sizeof(frv_cache_wback) - 1);
+		buff[sizeof(frv_cache_wback) - 1] = '\n';
+		len = sizeof(frv_cache_wback);
+		break;
+	}
+
+	if (len > *lenp)
+		len = *lenp;
+
+	if (copy_to_user(buffer, buff, len) != 0)
+		return -EFAULT;
+
+	*lenp = len;
+	filp->f_pos = len;
+	return 0;
+
+} /* end procctl_frv_cachemode() */
+
+/*****************************************************************************/
+/*
+ * permit the mm_struct the nominated process is using have its MMU context ID pinned
+ */
+#ifdef CONFIG_MMU
+static int procctl_frv_pin_cxnr(ctl_table *table, int write, struct file *filp,
+				void *buffer, size_t *lenp, loff_t *ppos)
+{
+	pid_t pid;
+	char buff[16], *p;
+	int len;
+
+	len = *lenp;
+
+	if (write) {
+		/* potential state change */
+		if (len <= 1 || len > sizeof(buff) - 1)
+			return -EINVAL;
+
+		if (copy_from_user(buff, buffer, len) != 0)
+			return -EFAULT;
+
+		if (buff[len - 1] == '\n')
+			buff[len - 1] = '\0';
+		else
+			buff[len] = '\0';
+
+		pid = simple_strtoul(buff, &p, 10);
+		if (*p)
+			return -EINVAL;
+
+		return cxn_pin_by_pid(pid);
+	}
+
+	/* read the currently pinned CXN */
+	if (filp->f_pos > 0) {
+		*lenp = 0;
+		return 0;
+	}
+
+	len = snprintf(buff, sizeof(buff), "%d\n", cxn_pinned);
+	if (len > *lenp)
+		len = *lenp;
+
+	if (copy_to_user(buffer, buff, len) != 0)
+		return -EFAULT;
+
+	*lenp = len;
+	filp->f_pos = len;
+	return 0;
+
+} /* end procctl_frv_pin_cxnr() */
+#endif
+
+/*
+ * FR-V specific sysctls
+ */
+static struct ctl_table frv_table[] =
+{
+	{ 1, "cache-mode",	NULL, 0, 0644, NULL, &procctl_frv_cachemode },
+#ifdef CONFIG_MMU
+	{ 2, "pin-cxnr",	NULL, 0, 0644, NULL, &procctl_frv_pin_cxnr },
+#endif
+	{ 0 }
+};
+
+/*
+ * Use a temporary sysctl number. Horrid, but will be cleaned up in 2.6
+ * when all the PM interfaces exist nicely.
+ */
+#define CTL_FRV 9898
+static struct ctl_table frv_dir_table[] =
+{
+	{CTL_FRV, "frv", NULL, 0, 0555, frv_table},
+	{0}
+};
+
+/*
+ * Initialize power interface
+ */
+static int __init frv_sysctl_init(void)
+{
+	register_sysctl_table(frv_dir_table, 1);
+	return 0;
+}
+
+__initcall(frv_sysctl_init);
diff -Nru a/arch/frv/kernel/time.c b/arch/frv/kernel/time.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/kernel/time.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,234 @@
+/* time.c: FRV arch-specific time handling
+ *
+ * Copyright (C) 2003-5 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ * - Derived from arch/m68k/kernel/time.c
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/config.h> /* CONFIG_HEARTBEAT */
+#include <linux/module.h>
+#include <linux/errno.h>
+#include <linux/sched.h>
+#include <linux/kernel.h>
+#include <linux/param.h>
+#include <linux/string.h>
+#include <linux/interrupt.h>
+#include <linux/profile.h>
+#include <linux/irq.h>
+#include <linux/mm.h>
+
+#include <asm/io.h>
+#include <asm/timer-regs.h>
+#include <asm/mb-regs.h>
+#include <asm/mb86943a.h>
+#include <asm/irq-routing.h>
+
+#include <linux/timex.h>
+
+#define TICK_SIZE (tick_nsec / 1000)
+
+extern unsigned long wall_jiffies;
+
+u64 jiffies_64 = INITIAL_JIFFIES;
+EXPORT_SYMBOL(jiffies_64);
+
+unsigned long __nongprelbss __clkin_clock_speed_HZ;
+unsigned long __nongprelbss __ext_bus_clock_speed_HZ;
+unsigned long __nongprelbss __res_bus_clock_speed_HZ;
+unsigned long __nongprelbss __sdram_clock_speed_HZ;
+unsigned long __nongprelbss __core_bus_clock_speed_HZ;
+unsigned long __nongprelbss __core_clock_speed_HZ;
+unsigned long __nongprelbss __dsu_clock_speed_HZ;
+unsigned long __nongprelbss __serial_clock_speed_HZ;
+unsigned long __delay_loops_MHz;
+
+static irqreturn_t timer_interrupt(int irq, void *dummy, struct pt_regs *regs);
+
+static struct irqaction timer_irq  = {
+	timer_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "timer", NULL, NULL
+};
+
+static inline int set_rtc_mmss(unsigned long nowtime)
+{
+	return -1;
+}
+
+/*
+ * timer_interrupt() needs to keep up the real-time clock,
+ * as well as call the "do_timer()" routine every clocktick
+ */
+static irqreturn_t timer_interrupt(int irq, void *dummy, struct pt_regs * regs)
+{
+	/* last time the cmos clock got updated */
+	static long last_rtc_update = 0;
+
+	/*
+	 * Here we are in the timer irq handler. We just have irqs locally
+	 * disabled but we don't know if the timer_bh is running on the other
+	 * CPU. We need to avoid to SMP race with it. NOTE: we don' t need
+	 * the irq version of write_lock because as just said we have irq
+	 * locally disabled. -arca
+	 */
+	write_seqlock(&xtime_lock);
+
+	do_timer(regs);
+	update_process_times(user_mode(regs));
+	profile_tick(CPU_PROFILING, regs);
+
+	/*
+	 * If we have an externally synchronized Linux clock, then update
+	 * CMOS clock accordingly every ~11 minutes. Set_rtc_mmss() has to be
+	 * called as close as possible to 500 ms before the new second starts.
+	 */
+	if ((time_status & STA_UNSYNC) == 0 &&
+	    xtime.tv_sec > last_rtc_update + 660 &&
+	    (xtime.tv_nsec / 1000) >= 500000 - ((unsigned) TICK_SIZE) / 2 &&
+	    (xtime.tv_nsec / 1000) <= 500000 + ((unsigned) TICK_SIZE) / 2
+	    ) {
+		if (set_rtc_mmss(xtime.tv_sec) == 0)
+			last_rtc_update = xtime.tv_sec;
+		else
+			last_rtc_update = xtime.tv_sec - 600; /* do it again in 60 s */
+	}
+
+#ifdef CONFIG_HEARTBEAT
+	static unsigned short n;
+	n++;
+	__set_LEDS(n);
+#endif /* CONFIG_HEARTBEAT */
+
+	write_sequnlock(&xtime_lock);
+	return IRQ_HANDLED;
+}
+
+void time_divisor_init(void)
+{
+	unsigned short base, pre, prediv;
+
+	/* set the scheduling timer going */
+	pre = 1;
+	prediv = 4;
+	base = __res_bus_clock_speed_HZ / pre / HZ / (1 << prediv);
+
+	__set_TPRV(pre);
+	__set_TxCKSL_DATA(0, prediv);
+	__set_TCTR(TCTR_SC_CTR0 | TCTR_RL_RW_LH8 | TCTR_MODE_2);
+	__set_TCSR_DATA(0, base & 0xff);
+	__set_TCSR_DATA(0, base >> 8);
+}
+
+void time_init(void)
+{
+	unsigned int year, mon, day, hour, min, sec;
+
+	extern void arch_gettod(int *year, int *mon, int *day, int *hour, int *min, int *sec);
+
+	/* FIX by dqg : Set to zero for platforms that don't have tod */
+	/* without this time is undefined and can overflow time_t, causing  */
+	/* very stange errors */
+	year = 1980;
+	mon = day = 1;
+	hour = min = sec = 0;
+	arch_gettod (&year, &mon, &day, &hour, &min, &sec);
+
+	if ((year += 1900) < 1970)
+		year += 100;
+	xtime.tv_sec = mktime(year, mon, day, hour, min, sec);
+	xtime.tv_nsec = 0;
+
+	/* install scheduling interrupt handler */
+	setup_irq(IRQ_CPU_TIMER0, &timer_irq);
+
+	time_divisor_init();
+}
+
+/*
+ * This version of gettimeofday has near microsecond resolution.
+ */
+void do_gettimeofday(struct timeval *tv)
+{
+	unsigned long seq;
+	unsigned long usec, sec;
+	unsigned long max_ntp_tick;
+
+	do {
+		unsigned long lost;
+
+		seq = read_seqbegin(&xtime_lock);
+
+		usec = 0;
+		lost = jiffies - wall_jiffies;
+
+		/*
+		 * If time_adjust is negative then NTP is slowing the clock
+		 * so make sure not to go into next possible interval.
+		 * Better to lose some accuracy than have time go backwards..
+		 */
+		if (unlikely(time_adjust < 0)) {
+			max_ntp_tick = (USEC_PER_SEC / HZ) - tickadj;
+			usec = min(usec, max_ntp_tick);
+
+			if (lost)
+				usec += lost * max_ntp_tick;
+		}
+		else if (unlikely(lost))
+			usec += lost * (USEC_PER_SEC / HZ);
+
+		sec = xtime.tv_sec;
+		usec += (xtime.tv_nsec / 1000);
+	} while (read_seqretry(&xtime_lock, seq));
+
+	while (usec >= 1000000) {
+		usec -= 1000000;
+		sec++;
+	}
+
+	tv->tv_sec = sec;
+	tv->tv_usec = usec;
+}
+
+int do_settimeofday(struct timespec *tv)
+{
+	time_t wtm_sec, sec = tv->tv_sec;
+	long wtm_nsec, nsec = tv->tv_nsec;
+
+	if ((unsigned long)tv->tv_nsec >= NSEC_PER_SEC)
+		return -EINVAL;
+
+	write_seqlock_irq(&xtime_lock);
+	/*
+	 * This is revolting. We need to set "xtime" correctly. However, the
+	 * value in this location is the value at the most recent update of
+	 * wall time.  Discover what correction gettimeofday() would have
+	 * made, and then undo it!
+	 */
+	nsec -= 0 * NSEC_PER_USEC;
+	nsec -= (jiffies - wall_jiffies) * TICK_NSEC;
+
+	wtm_sec  = wall_to_monotonic.tv_sec + (xtime.tv_sec - sec);
+	wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - nsec);
+
+	set_normalized_timespec(&xtime, sec, nsec);
+	set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec);
+
+	time_adjust = 0;		/* stop active adjtime() */
+	time_status |= STA_UNSYNC;
+	time_maxerror = NTP_PHASE_LIMIT;
+	time_esterror = NTP_PHASE_LIMIT;
+	write_sequnlock_irq(&xtime_lock);
+	clock_was_set();
+	return 0;
+}
+
+/*
+ * Scheduler clock - returns current time in nanosec units.
+ */
+unsigned long long sched_clock(void)
+{
+	return jiffies_64 * (1000000000 / HZ);
+}
diff -Nru a/arch/frv/kernel/traps.c b/arch/frv/kernel/traps.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/kernel/traps.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,431 @@
+/* traps.c: high-level exception handler for FR-V
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/config.h>
+#include <linux/sched.h>
+#include <linux/signal.h>
+#include <linux/kernel.h>
+#include <linux/mm.h>
+#include <linux/types.h>
+#include <linux/user.h>
+#include <linux/string.h>
+#include <linux/linkage.h>
+#include <linux/init.h>
+
+#include <asm/setup.h>
+#include <asm/fpu.h>
+#include <asm/system.h>
+#include <asm/uaccess.h>
+#include <asm/pgtable.h>
+#include <asm/siginfo.h>
+#include <asm/unaligned.h>
+
+void show_backtrace(struct pt_regs *, unsigned long);
+
+extern asmlinkage void __break_hijack_kernel_event(void);
+
+/*****************************************************************************/
+/*
+ * instruction access error
+ */
+asmlinkage void insn_access_error(unsigned long esfr1, unsigned long epcr0, unsigned long esr0)
+{
+	siginfo_t info;
+
+	die_if_kernel("-- Insn Access Error --\n"
+		      "EPCR0 : %08lx\n"
+		      "ESR0  : %08lx\n",
+		      epcr0, esr0);
+
+	info.si_signo	= SIGSEGV;
+	info.si_code	= SEGV_ACCERR;
+	info.si_errno	= 0;
+	info.si_addr	= (void *) ((epcr0 & EPCR0_V) ? (epcr0 & EPCR0_PC) : __frame->pc);
+
+	force_sig_info(info.si_signo, &info, current);
+} /* end insn_access_error() */
+
+/*****************************************************************************/
+/*
+ * handler for:
+ * - illegal instruction
+ * - privileged instruction
+ * - unsupported trap
+ * - debug exceptions
+ */
+asmlinkage void illegal_instruction(unsigned long esfr1, unsigned long epcr0, unsigned long esr0)
+{
+	siginfo_t info;
+
+	die_if_kernel("-- Illegal Instruction --\n"
+		      "EPCR0 : %08lx\n"
+		      "ESR0  : %08lx\n"
+		      "ESFR1 : %08lx\n",
+		      epcr0, esr0, esfr1);
+
+	info.si_errno	= 0;
+	info.si_addr	= (void *) ((epcr0 & EPCR0_PC) ? (epcr0 & EPCR0_PC) : __frame->pc);
+
+	switch (__frame->tbr & TBR_TT) {
+	case TBR_TT_ILLEGAL_INSTR:
+		info.si_signo	= SIGILL;
+		info.si_code	= ILL_ILLOPC;
+		break;
+	case TBR_TT_PRIV_INSTR:
+		info.si_signo	= SIGILL;
+		info.si_code	= ILL_PRVOPC;
+		break;
+	case TBR_TT_TRAP2 ... TBR_TT_TRAP126:
+		info.si_signo	= SIGILL;
+		info.si_code	= ILL_ILLTRP;
+		break;
+	/* GDB uses "tira gr0, #1" as a breakpoint instruction.  */
+	case TBR_TT_TRAP1:
+	case TBR_TT_BREAK:
+		info.si_signo	= SIGTRAP;
+		info.si_code	=
+			(__frame->__status & REG__STATUS_STEPPED) ? TRAP_TRACE : TRAP_BRKPT;
+		break;
+	}
+
+	force_sig_info(info.si_signo, &info, current);
+} /* end illegal_instruction() */
+
+/*****************************************************************************/
+/*
+ *
+ */
+asmlinkage void media_exception(unsigned long msr0, unsigned long msr1)
+{
+	siginfo_t info;
+
+	die_if_kernel("-- Media Exception --\n"
+		      "MSR0 : %08lx\n"
+		      "MSR1 : %08lx\n",
+		      msr0, msr1);
+
+	info.si_signo	= SIGFPE;
+	info.si_code	= FPE_MDAOVF;
+	info.si_errno	= 0;
+	info.si_addr	= (void *) __frame->pc;
+
+	force_sig_info(info.si_signo, &info, current);
+} /* end media_exception() */
+
+/*****************************************************************************/
+/*
+ * instruction or data access exception
+ */
+asmlinkage void memory_access_exception(unsigned long esr0,
+					unsigned long ear0,
+					unsigned long epcr0)
+{
+	siginfo_t info;
+
+#ifdef CONFIG_MMU
+	unsigned long fixup;
+
+	if ((esr0 & ESRx_EC) == ESRx_EC_DATA_ACCESS)
+		if (handle_misalignment(esr0, ear0, epcr0) == 0)
+			return;
+
+	if ((fixup = search_exception_table(__frame->pc)) != 0) {
+		__frame->pc = fixup;
+		return;
+	}
+#endif
+
+	die_if_kernel("-- Memory Access Exception --\n"
+		      "ESR0  : %08lx\n"
+		      "EAR0  : %08lx\n"
+		      "EPCR0 : %08lx\n",
+		      esr0, ear0, epcr0);
+
+	info.si_signo	= SIGSEGV;
+	info.si_code	= SEGV_ACCERR;
+	info.si_errno	= 0;
+	info.si_addr	= NULL;
+
+	if ((esr0 & (ESRx_VALID | ESR0_EAV)) == (ESRx_VALID | ESR0_EAV))
+		info.si_addr = (void *) ear0;
+
+	force_sig_info(info.si_signo, &info, current);
+
+} /* end memory_access_exception() */
+
+/*****************************************************************************/
+/*
+ * data access error
+ * - double-word data load from CPU control area (0xFExxxxxx)
+ * - read performed on inactive or self-refreshing SDRAM
+ * - error notification from slave device
+ * - misaligned address
+ * - access to out of bounds memory region
+ * - user mode accessing privileged memory region
+ * - write to R/O memory region
+ */
+asmlinkage void data_access_error(unsigned long esfr1, unsigned long esr15, unsigned long ear15)
+{
+	siginfo_t info;
+
+	die_if_kernel("-- Data Access Error --\n"
+		      "ESR15 : %08lx\n"
+		      "EAR15 : %08lx\n",
+		      esr15, ear15);
+
+	info.si_signo	= SIGSEGV;
+	info.si_code	= SEGV_ACCERR;
+	info.si_errno	= 0;
+	info.si_addr	= (void *)
+		(((esr15 & (ESRx_VALID|ESR15_EAV)) == (ESRx_VALID|ESR15_EAV)) ? ear15 : 0);
+
+	force_sig_info(info.si_signo, &info, current);
+} /* end data_access_error() */
+
+/*****************************************************************************/
+/*
+ * data store error - should only happen if accessing inactive or self-refreshing SDRAM
+ */
+asmlinkage void data_store_error(unsigned long esfr1, unsigned long esr15)
+{
+	die_if_kernel("-- Data Store Error --\n"
+		      "ESR15 : %08lx\n",
+		      esr15);
+	BUG();
+} /* end data_store_error() */
+
+/*****************************************************************************/
+/*
+ *
+ */
+asmlinkage void division_exception(unsigned long esfr1, unsigned long esr0, unsigned long isr)
+{
+	siginfo_t info;
+
+	die_if_kernel("-- Division Exception --\n"
+		      "ESR0 : %08lx\n"
+		      "ISR  : %08lx\n",
+		      esr0, isr);
+
+	info.si_signo	= SIGFPE;
+	info.si_code	= FPE_INTDIV;
+	info.si_errno	= 0;
+	info.si_addr	= (void *) __frame->pc;
+
+	force_sig_info(info.si_signo, &info, current);
+} /* end division_exception() */
+
+/*****************************************************************************/
+/*
+ *
+ */
+asmlinkage void compound_exception(unsigned long esfr1,
+				   unsigned long esr0, unsigned long esr14, unsigned long esr15,
+				   unsigned long msr0, unsigned long msr1)
+{
+	die_if_kernel("-- Compound Exception --\n"
+		      "ESR0  : %08lx\n"
+		      "ESR15 : %08lx\n"
+		      "ESR15 : %08lx\n"
+		      "MSR0  : %08lx\n"
+		      "MSR1  : %08lx\n",
+		      esr0, esr14, esr15, msr0, msr1);
+	BUG();
+} /* end compound_exception() */
+
+/*****************************************************************************/
+/*
+ * The architecture-independent backtrace generator
+ */
+void dump_stack(void)
+{
+	show_stack(NULL, NULL);
+}
+
+void show_stack(struct task_struct *task, unsigned long *sp)
+{
+}
+
+void show_trace_task(struct task_struct *tsk)
+{
+	printk("CONTEXT: stack=0x%lx frame=0x%p LR=0x%lx RET=0x%lx\n",
+	       tsk->thread.sp, tsk->thread.frame, tsk->thread.lr, tsk->thread.sched_lr);
+}
+
+static const char *regnames[] = {
+	"PSR ", "ISR ", "CCR ", "CCCR",
+	"LR  ", "LCR ", "PC  ", "_stt",
+	"sys ", "GR8*", "GNE0", "GNE1",
+	"IACH", "IACL",
+	"TBR ", "SP  ", "FP  ", "GR3 ",
+	"GR4 ", "GR5 ", "GR6 ", "GR7 ",
+	"GR8 ", "GR9 ", "GR10", "GR11",
+	"GR12", "GR13", "GR14", "GR15",
+	"GR16", "GR17", "GR18", "GR19",
+	"GR20", "GR21", "GR22", "GR23",
+	"GR24", "GR25", "GR26", "GR27",
+	"EFRM", "CURR", "GR30", "BFRM"
+};
+
+void show_regs(struct pt_regs *regs)
+{
+	uint32_t *reg;
+	int loop;
+
+	printk("\n");
+
+	printk("Frame: @%08x [%s]\n",
+	       (uint32_t) regs,
+	       regs->psr & PSR_S ? "kernel" : "user");
+
+	reg = (uint32_t *) regs;
+	for (loop = 0; loop < REG__END; loop++) {
+		printk("%s %08x", regnames[loop + 0], reg[loop + 0]);
+
+		if (loop == REG__END - 1 || loop % 5 == 4)
+			printk("\n");
+		else
+			printk(" | ");
+	}
+
+	printk("Process %s (pid: %d)\n", current->comm, current->pid);
+}
+
+void die_if_kernel(const char *str, ...)
+{
+	char buffer[256];
+	va_list va;
+
+	if (user_mode(__frame))
+		return;
+
+	va_start(va, str);
+	vsprintf(buffer, str, va);
+	va_end(va);
+
+	console_verbose();
+	printk("\n===================================\n");
+	printk("%s\n", buffer);
+	show_backtrace(__frame, 0);
+
+	__break_hijack_kernel_event();
+	do_exit(SIGSEGV);
+}
+
+/*****************************************************************************/
+/*
+ * dump the contents of an exception frame
+ */
+static void show_backtrace_regs(struct pt_regs *frame)
+{
+	uint32_t *reg;
+	int loop;
+
+	/* print the registers for this frame */
+	printk("<-- %s Frame: @%p -->\n",
+	       frame->psr & PSR_S ? "Kernel Mode" : "User Mode",
+	       frame);
+
+	reg = (uint32_t *) frame;
+	for (loop = 0; loop < REG__END; loop++) {
+		printk("%s %08x", regnames[loop + 0], reg[loop + 0]);
+
+		if (loop == REG__END - 1 || loop % 5 == 4)
+			printk("\n");
+		else
+			printk(" | ");
+	}
+
+	printk("--------\n");
+} /* end show_backtrace_regs() */
+
+/*****************************************************************************/
+/*
+ * generate a backtrace of the kernel stack
+ */
+void show_backtrace(struct pt_regs *frame, unsigned long sp)
+{
+	struct pt_regs *frame0;
+	unsigned long tos = 0, stop = 0, base;
+	int format;
+
+	base = ((((unsigned long) frame) + 8191) & ~8191) - sizeof(struct user_context);
+	frame0 = (struct pt_regs *) base;
+
+	if (sp) {
+		tos = sp;
+		stop = (unsigned long) frame;
+	}
+
+	printk("\nProcess %s (pid: %d)\n\n", current->comm, current->pid);
+
+	for (;;) {
+		/* dump stack segment between frames */
+		//printk("%08lx -> %08lx\n", tos, stop);
+		format = 0;
+		while (tos < stop) {
+			if (format == 0)
+				printk(" %04lx :", tos & 0xffff);
+
+			printk(" %08lx", *(unsigned long *) tos);
+
+			tos += 4;
+			format++;
+			if (format == 8) {
+				printk("\n");
+				format = 0;
+			}
+		}
+
+		if (format > 0)
+			printk("\n");
+
+		/* dump frame 0 outside of the loop */
+		if (frame == frame0)
+			break;
+
+		tos = frame->sp;
+		if (((unsigned long) frame) + sizeof(*frame) != tos) {
+			printk("-- TOS %08lx does not follow frame %p --\n",
+			       tos, frame);
+			break;
+		}
+
+		show_backtrace_regs(frame);
+
+		/* dump the stack between this frame and the next */
+		stop = (unsigned long) frame->next_frame;
+		if (stop != base &&
+		    (stop < tos ||
+		     stop > base ||
+		     (stop < base && stop + sizeof(*frame) > base) ||
+		     stop & 3)) {
+			printk("-- next_frame %08lx is invalid (range %08lx-%08lx) --\n",
+			       stop, tos, base);
+			break;
+		}
+
+		/* move to next frame */
+		frame = frame->next_frame;
+	}
+
+	/* we can always dump frame 0, even if the rest of the stack is corrupt */
+	show_backtrace_regs(frame0);
+
+} /* end show_backtrace() */
+
+/*****************************************************************************/
+/*
+ * initialise traps
+ */
+void __init trap_init (void)
+{
+} /* end trap_init() */
diff -Nru a/arch/frv/kernel/uaccess.c b/arch/frv/kernel/uaccess.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/kernel/uaccess.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,95 @@
+/* uaccess.c: userspace access functions
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/mm.h>
+#include <asm/uaccess.h>
+
+/*****************************************************************************/
+/*
+ * copy a null terminated string from userspace
+ */
+long strncpy_from_user(char *dst, const char *src, long count)
+{
+	unsigned long max;
+	char *p, ch;
+	long err = -EFAULT;
+
+	if (count < 0)
+		BUG();
+
+	p = dst;
+
+#ifndef CONFIG_MMU
+	if ((unsigned long) src < memory_start)
+		goto error;
+#endif
+
+	if ((unsigned long) src >= get_addr_limit())
+		goto error;
+
+	max = get_addr_limit() - (unsigned long) src;
+	if ((unsigned long) count > max) {
+		memset(dst + max, 0, count - max);
+		count = max;
+	}
+
+	err = 0;
+	for (; count > 0; count--, p++, src++) {
+		__get_user_asm(err, ch, src, "ub", "=r");
+		if (err < 0)
+			goto error;
+		if (!ch)
+			break;
+		*p = ch;
+	}
+
+	err = p - dst; /* return length excluding NUL */
+
+ error:
+	if (count > 0)
+		memset(p, 0, count); /* clear remainder of buffer [security] */
+
+	return err;
+} /* end strncpy_from_user() */
+
+/*****************************************************************************/
+/*
+ * Return the size of a string (including the ending 0)
+ *
+ * Return 0 on exception, a value greater than N if too long
+ */
+long strnlen_user(const char *src, long count)
+{
+	const char *p;
+	long err = 0;
+	char ch;
+
+	if (count < 0)
+		BUG();
+
+#ifndef CONFIG_MMU
+	if ((unsigned long) src < memory_start)
+		return 0;
+#endif
+
+	if ((unsigned long) src >= get_addr_limit())
+		return 0;
+
+	for (p = src; count > 0; count--, p++) {
+		__get_user_asm(err, ch, p, "ub", "=r");
+		if (err < 0)
+			return 0;
+		if (!ch)
+			break;
+	}
+
+	return p - src + 1; /* return length including NUL */
+} /* end strnlen_user() */
diff -Nru a/arch/frv/kernel/vmlinux.lds.S b/arch/frv/kernel/vmlinux.lds.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/kernel/vmlinux.lds.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,187 @@
+/* ld script to make FRV Linux kernel -*- c -*-
+ * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>;
+ */
+OUTPUT_FORMAT("elf32-frv", "elf32-frv", "elf32-frv")
+OUTPUT_ARCH(frv)
+ENTRY(_start)
+
+#include <asm-generic/vmlinux.lds.h>
+#include <asm/processor.h>
+#include <asm/page.h>
+#include <asm/cache.h>
+#include <asm/thread_info.h>
+
+jiffies = jiffies_64 + 4;
+
+__page_offset = 0xc0000000;		/* start of area covered by struct pages */
+__kernel_image_start = __page_offset;	/* address at which kernel image resides */
+
+SECTIONS
+{
+  . = __kernel_image_start;
+
+  /* discardable initialisation code and data */
+  . = ALIGN(PAGE_SIZE);			/* Init code and data */
+  __init_begin = .;
+
+  _sinittext = .;
+  .init.text : {
+	*(.text.head)
+#ifndef CONFIG_DEBUG_INFO
+	*(.init.text)
+	*(.exit.text)
+	*(.exit.data)
+	*(.exitcall.exit)
+#endif
+  }
+  _einittext = .;
+  .init.data : { *(.init.data) }
+
+  . = ALIGN(8);
+  __setup_start = .;
+  .setup.init : { KEEP(*(.init.setup)) }
+  __setup_end = .;
+
+  __initcall_start = .;
+  .initcall.init : {
+	*(.initcall1.init)
+	*(.initcall2.init)
+	*(.initcall3.init)
+	*(.initcall4.init)
+	*(.initcall5.init)
+	*(.initcall6.init)
+	*(.initcall7.init)
+  }
+  __initcall_end = .;
+  __con_initcall_start = .;
+  .con_initcall.init : { *(.con_initcall.init) }
+  __con_initcall_end = .;
+  SECURITY_INIT
+  . = ALIGN(4);
+  __alt_instructions = .;
+  .altinstructions : { *(.altinstructions) }
+  __alt_instructions_end = .;
+ .altinstr_replacement : { *(.altinstr_replacement) }
+
+  __per_cpu_start = .;
+  .data.percpu  : { *(.data.percpu) }
+  __per_cpu_end = .;
+
+  . = ALIGN(4096);
+  __initramfs_start = .;
+  .init.ramfs : { *(.init.ramfs) }
+  __initramfs_end = .;
+
+  . = ALIGN(THREAD_SIZE);
+  __init_end = .;
+
+  /* put sections together that have massive alignment issues */
+  . = ALIGN(THREAD_SIZE);
+  .data.init_task : {
+	  /* init task record & stack */
+	  *(.data.init_task)
+  }
+
+  .trap : {
+	/* trap table management - read entry-table.S before modifying */
+	. = ALIGN(8192);
+	__trap_tables = .;
+	*(.trap.user)
+	*(.trap.kernel)
+	. = ALIGN(4096);
+	*(.trap.break)
+  }
+
+  . = ALIGN(4096);
+  .data.page_aligned : { *(.data.idt) }
+
+  . = ALIGN(L1_CACHE_BYTES);
+  .data.cacheline_aligned : { *(.data.cacheline_aligned) }
+
+  /* Text and read-only data */
+  . = ALIGN(4);
+  _text = .;
+  _stext = .;
+  .text : {
+	*(
+		.text.start .text .text.*
+#ifdef CONFIG_DEBUG_INFO
+	.init.text
+	.exit.text
+	.exitcall.exit
+#endif
+	)
+	SCHED_TEXT
+	*(.fixup)
+	*(.gnu.warning)
+	*(.exitcall.exit)
+	} = 0x9090
+
+  _etext = .;			/* End of text section */
+
+  RODATA
+
+  .rodata : {
+	*(.trap.vector)
+
+	/* this clause must not be modified - the ordering and adjacency are imperative */
+	__trap_fixup_tables = .;
+	*(.trap.fixup.user .trap.fixup.kernel)
+
+	}
+
+  . = ALIGN(8);		/* Exception table */
+  __start___ex_table = .;
+  __ex_table : { KEEP(*(__ex_table)) }
+  __stop___ex_table = .;
+
+  _sdata = .;
+  .data : {			/* Data */
+	*(.data .data.*)
+	*(.exit.data)
+	CONSTRUCTORS
+	}
+
+  _edata = .;			/* End of data section */
+
+  /* GP section */
+  . = ALIGN(L1_CACHE_BYTES);
+  _gp = . + 2048;
+  PROVIDE (gp = _gp);
+
+  .sdata : { *(.sdata .sdata.*) }
+
+  /* BSS */
+  . = ALIGN(L1_CACHE_BYTES);
+  __bss_start = .;
+
+  .sbss		: { *(.sbss .sbss.*) }
+  .bss		: { *(.bss .bss.*) }
+  .bss.stack	: { *(.bss) }
+
+  __bss_stop = .;
+  _end = . ;
+  . = ALIGN(PAGE_SIZE);
+  __kernel_image_end = .;
+
+  /* Stabs debugging sections.  */
+  .stab 0 : { *(.stab) }
+  .stabstr 0 : { *(.stabstr) }
+  .stab.excl 0 : { *(.stab.excl) }
+  .stab.exclstr 0 : { *(.stab.exclstr) }
+  .stab.index 0 : { *(.stab.index) }
+  .stab.indexstr 0 : { *(.stab.indexstr) }
+
+  .debug_line		0 : { *(.debug_line) }
+  .debug_info		0 : { *(.debug_info) }
+  .debug_abbrev		0 : { *(.debug_abbrev) }
+  .debug_aranges	0 : { *(.debug_aranges) }
+  .debug_frame		0 : { *(.debug_frame) }
+  .debug_pubnames	0 : { *(.debug_pubnames) }
+  .debug_str		0 : { *(.debug_str) }
+  .debug_ranges		0 : { *(.debug_ranges) }
+
+  .comment 0 : { *(.comment) }
+}
+
+__kernel_image_size_no_bss = __bss_start - __kernel_image_start;
diff -Nru a/arch/frv/lib/Makefile b/arch/frv/lib/Makefile
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/lib/Makefile	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,8 @@
+#
+# Makefile for FRV-specific library files..
+#
+
+lib-y := \
+	__ashldi3.o __lshrdi3.o __muldi3.o __ashrdi3.o __negdi2.o \
+	checksum.o memcpy.o memset.o atomic-ops.o \
+	outsl_ns.o outsl_sw.o insl_ns.o insl_sw.o cache.o
diff -Nru a/arch/frv/lib/__ashldi3.S b/arch/frv/lib/__ashldi3.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/lib/__ashldi3.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,40 @@
+/* __ashldi3.S:	64-bit arithmetic shift left
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+        .text
+        .p2align	4
+
+###############################################################################
+#
+# unsigned long long __ashldi3(unsigned long long value [GR8:GR9], unsigned by [GR10])
+#
+###############################################################################
+        .globl		__ashldi3
+        .type		__ashldi3,@function
+__ashldi3:
+	andicc.p	gr10,#63,gr10,icc0
+	setlos		#32,gr5
+	andicc.p	gr10,#32,gr0,icc1
+	beqlr		icc0,#0
+	ckeq		icc1,cc4			; cc4 is true if 0<N<32
+
+	# deal with a shift in the range 1<=N<=31
+	csll.p		gr8,gr10,gr8	,cc4,#1		; MSW <<= N
+	csub		gr5,gr10,gr5	,cc4,#1		; M = 32 - N
+	csrl.p		gr9,gr5,gr4	,cc4,#1
+	csll		gr9,gr10,gr9	,cc4,#1		; LSW <<= N
+	cor.p		gr4,gr8,gr8	,cc4,#1		; MSW |= LSW >> M
+
+	# deal with a shift in the range 32<=N<=63
+	csll		gr9,gr10,gr8	,cc4,#0		; MSW = LSW << (N & 31 [implicit AND])
+	cor.p		gr0,gr0,gr9	,cc4,#0		; LSW = 0
+	bralr
+	.size		__ashldi3, .-__ashldi3
diff -Nru a/arch/frv/lib/__ashrdi3.S b/arch/frv/lib/__ashrdi3.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/lib/__ashrdi3.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,41 @@
+/* __ashrdi3.S:	64-bit arithmetic shift right
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+        .text
+        .p2align	4
+
+###############################################################################
+#
+# signed long long __ashrdi3(signed long long value [GR8:GR9], unsigned by [GR10])
+#
+###############################################################################
+        .globl		__ashrdi3
+        .type		__ashrdi3,@function
+__ashrdi3:
+	andicc.p	gr10,#63,gr10,icc0
+	setlos		#32,gr5
+	andicc.p	gr10,#32,gr0,icc1
+	beqlr		icc0,#0
+	setlos.p	#31,gr6
+	ckeq		icc1,cc4			; cc4 is true if 0<N<32
+
+	# deal with a shift in the range 1<=N<=31
+	csrl.p		gr9,gr10,gr9	,cc4,#1		; LSW >>= N
+	csub		gr5,gr10,gr5	,cc4,#1		; M = 32 - N
+	csll.p		gr8,gr5,gr4	,cc4,#1
+	csra		gr8,gr10,gr8	,cc4,#1		; MSW >>= N
+	cor.p		gr4,gr9,gr9	,cc4,#1		; LSW |= MSW << M
+
+	# deal with a shift in the range 32<=N<=63
+	csra		gr8,gr10,gr9	,cc4,#0		; LSW = MSW >> (N & 31 [implicit AND])
+	csra.p		gr8,gr6,gr8	,cc4,#0		; MSW >>= 31
+	bralr
+	.size		__ashrdi3, .-__ashrdi3
diff -Nru a/arch/frv/lib/__lshrdi3.S b/arch/frv/lib/__lshrdi3.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/lib/__lshrdi3.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,40 @@
+/* __lshrdi3.S:	64-bit logical shift right
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+        .text
+        .p2align	4
+
+###############################################################################
+#
+# unsigned long long __lshrdi3(unsigned long long value [GR8:GR9], unsigned by [GR10])
+#
+###############################################################################
+        .globl		__lshrdi3
+        .type		__lshrdi3,@function
+__lshrdi3:
+	andicc.p	gr10,#63,gr10,icc0
+	setlos		#32,gr5
+	andicc.p	gr10,#32,gr0,icc1
+	beqlr		icc0,#0
+	ckeq		icc1,cc4			; cc4 is true if 0<N<32
+
+	# deal with a shift in the range 1<=N<=31
+	csrl.p		gr9,gr10,gr9	,cc4,#1		; LSW >>= N
+	csub		gr5,gr10,gr5	,cc4,#1		; M = 32 - N
+	csll.p		gr8,gr5,gr4	,cc4,#1
+	csrl		gr8,gr10,gr8	,cc4,#1		; MSW >>= N
+	cor.p		gr4,gr9,gr9	,cc4,#1		; LSW |= MSW << M
+
+	# deal with a shift in the range 32<=N<=63
+	csrl		gr8,gr10,gr9	,cc4,#0		; LSW = MSW >> (N & 31 [implicit AND])
+	cor.p		gr0,gr0,gr8	,cc4,#0		; MSW = 0
+	bralr
+	.size		__lshrdi3, .-__lshrdi3
diff -Nru a/arch/frv/lib/__muldi3.S b/arch/frv/lib/__muldi3.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/lib/__muldi3.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,32 @@
+/* __muldi3.S:	64-bit multiply
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+        .text
+        .p2align	4
+
+###############################################################################
+#
+# unsigned long long __muldi3(unsigned long long x [GR8:GR9],
+#                             unsigned long long y [GR10:GR11])
+#
+###############################################################################
+        .globl		__muldi3, __mulll, __umulll
+        .type		__muldi3,@function
+__muldi3:
+__mulll:
+__umulll:
+	umul		gr8,gr11,gr4		; GR4:GR5 = x.MSW * y.LSW
+	umul		gr9,gr10,gr6		; GR6:GR7 = x.LSW * y.MSW
+	umul.p		gr9,gr11,gr8		; GR8:GR9 = x.LSW * y.LSW
+	add		gr5,gr7,gr5
+	add.p		gr8,gr5,gr8		; GR8 += GR5 + GR7
+	bralr
+	.size		__muldi3, .-__muldi3
diff -Nru a/arch/frv/lib/__negdi2.S b/arch/frv/lib/__negdi2.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/lib/__negdi2.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,28 @@
+/* __negdi2.S: 64-bit negate
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+
+        .text
+        .p2align	4
+
+###############################################################################
+#
+# unsigned long long __negdi2(unsigned long long value [GR8:GR9])
+#
+###############################################################################
+        .globl		__negdi2
+        .type		__negdi2,@function
+__negdi2:
+	subcc		gr0,gr9,gr9,icc0
+	subx		gr0,gr8,gr8,icc0
+	bralr
+	.size		__negdi2, .-__negdi2
+
diff -Nru a/arch/frv/lib/atomic-ops.S b/arch/frv/lib/atomic-ops.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/lib/atomic-ops.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,265 @@
+/* atomic-ops.S: kernel atomic operations
+ *
+ * For an explanation of how atomic ops work in this arch, see:
+ *   Documentation/fujitsu/frv/atomic-ops.txt
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <asm/spr-regs.h>
+
+	.text
+	.balign 4
+
+###############################################################################
+#
+# unsigned long atomic_test_and_ANDNOT_mask(unsigned long mask, volatile unsigned long *v);
+#
+###############################################################################
+	.globl		atomic_test_and_ANDNOT_mask
+        .type		atomic_test_and_ANDNOT_mask,@function
+atomic_test_and_ANDNOT_mask:
+	not.p		gr8,gr10
+0:
+	orcc		gr0,gr0,gr0,icc3		/* set ICC3.Z */
+	ckeq		icc3,cc7
+	ld.p		@(gr9,gr0),gr8			/* LD.P/ORCR must be atomic */
+	orcr		cc7,cc7,cc3			/* set CC3 to true */
+	and		gr8,gr10,gr11
+	cst.p		gr11,@(gr9,gr0)		,cc3,#1
+	corcc		gr29,gr29,gr0		,cc3,#1	/* clear ICC3.Z if store happens */
+	beq		icc3,#0,0b
+	bralr
+
+	.size		atomic_test_and_ANDNOT_mask, .-atomic_test_and_ANDNOT_mask
+
+###############################################################################
+#
+# unsigned long atomic_test_and_OR_mask(unsigned long mask, volatile unsigned long *v);
+#
+###############################################################################
+	.globl		atomic_test_and_OR_mask
+        .type		atomic_test_and_OR_mask,@function
+atomic_test_and_OR_mask:
+	or.p		gr8,gr8,gr10
+0:
+	orcc		gr0,gr0,gr0,icc3		/* set ICC3.Z */
+	ckeq		icc3,cc7
+	ld.p		@(gr9,gr0),gr8			/* LD.P/ORCR must be atomic */
+	orcr		cc7,cc7,cc3			/* set CC3 to true */
+	or		gr8,gr10,gr11
+	cst.p		gr11,@(gr9,gr0)		,cc3,#1
+	corcc		gr29,gr29,gr0		,cc3,#1	/* clear ICC3.Z if store happens */
+	beq		icc3,#0,0b
+	bralr
+
+	.size		atomic_test_and_OR_mask, .-atomic_test_and_OR_mask
+
+###############################################################################
+#
+# unsigned long atomic_test_and_XOR_mask(unsigned long mask, volatile unsigned long *v);
+#
+###############################################################################
+	.globl		atomic_test_and_XOR_mask
+        .type		atomic_test_and_XOR_mask,@function
+atomic_test_and_XOR_mask:
+	or.p		gr8,gr8,gr10
+0:
+	orcc		gr0,gr0,gr0,icc3		/* set ICC3.Z */
+	ckeq		icc3,cc7
+	ld.p		@(gr9,gr0),gr8			/* LD.P/ORCR must be atomic */
+	orcr		cc7,cc7,cc3			/* set CC3 to true */
+	xor		gr8,gr10,gr11
+	cst.p		gr11,@(gr9,gr0)		,cc3,#1
+	corcc		gr29,gr29,gr0		,cc3,#1	/* clear ICC3.Z if store happens */
+	beq		icc3,#0,0b
+	bralr
+
+	.size		atomic_test_and_XOR_mask, .-atomic_test_and_XOR_mask
+
+###############################################################################
+#
+# int atomic_add_return(int i, atomic_t *v)
+#
+###############################################################################
+	.globl		atomic_add_return
+        .type		atomic_add_return,@function
+atomic_add_return:
+	or.p		gr8,gr8,gr10
+0:
+	orcc		gr0,gr0,gr0,icc3		/* set ICC3.Z */
+	ckeq		icc3,cc7
+	ld.p		@(gr9,gr0),gr8			/* LD.P/ORCR must be atomic */
+	orcr		cc7,cc7,cc3			/* set CC3 to true */
+	add		gr8,gr10,gr8
+	cst.p		gr8,@(gr9,gr0)		,cc3,#1
+	corcc		gr29,gr29,gr0		,cc3,#1	/* clear ICC3.Z if store happens */
+	beq		icc3,#0,0b
+	bralr
+
+	.size		atomic_add_return, .-atomic_add_return
+
+###############################################################################
+#
+# int atomic_sub_return(int i, atomic_t *v)
+#
+###############################################################################
+	.globl		atomic_sub_return
+        .type		atomic_sub_return,@function
+atomic_sub_return:
+	or.p		gr8,gr8,gr10
+0:
+	orcc		gr0,gr0,gr0,icc3		/* set ICC3.Z */
+	ckeq		icc3,cc7
+	ld.p		@(gr9,gr0),gr8			/* LD.P/ORCR must be atomic */
+	orcr		cc7,cc7,cc3			/* set CC3 to true */
+	sub		gr8,gr10,gr8
+	cst.p		gr8,@(gr9,gr0)		,cc3,#1
+	corcc		gr29,gr29,gr0		,cc3,#1	/* clear ICC3.Z if store happens */
+	beq		icc3,#0,0b
+	bralr
+
+	.size		atomic_sub_return, .-atomic_sub_return
+
+###############################################################################
+#
+# uint8_t __xchg_8(uint8_t i, uint8_t *v)
+#
+###############################################################################
+	.globl		__xchg_8
+        .type		__xchg_8,@function
+__xchg_8:
+	or.p		gr8,gr8,gr10
+0:
+	orcc		gr0,gr0,gr0,icc3		/* set ICC3.Z */
+	ckeq		icc3,cc7
+	ldub.p		@(gr9,gr0),gr8			/* LD.P/ORCR must be atomic */
+	orcr		cc7,cc7,cc3			/* set CC3 to true */
+	cstb.p		gr10,@(gr9,gr0)		,cc3,#1
+	corcc		gr29,gr29,gr0		,cc3,#1	/* clear ICC3.Z if store happens */
+	beq		icc3,#0,0b
+	bralr
+
+	.size		__xchg_8, .-__xchg_8
+
+###############################################################################
+#
+# uint16_t __xchg_16(uint16_t i, uint16_t *v)
+#
+###############################################################################
+	.globl		__xchg_16
+        .type		__xchg_16,@function
+__xchg_16:
+	or.p		gr8,gr8,gr10
+0:
+	orcc		gr0,gr0,gr0,icc3		/* set ICC3.Z */
+	ckeq		icc3,cc7
+	lduh.p		@(gr9,gr0),gr8			/* LD.P/ORCR must be atomic */
+	orcr		cc7,cc7,cc3			/* set CC3 to true */
+	csth.p		gr10,@(gr9,gr0)		,cc3,#1
+	corcc		gr29,gr29,gr0		,cc3,#1	/* clear ICC3.Z if store happens */
+	beq		icc3,#0,0b
+	bralr
+
+	.size		__xchg_16, .-__xchg_16
+
+###############################################################################
+#
+# uint32_t __xchg_32(uint32_t i, uint32_t *v)
+#
+###############################################################################
+	.globl		__xchg_32
+        .type		__xchg_32,@function
+__xchg_32:
+	or.p		gr8,gr8,gr10
+0:
+	orcc		gr0,gr0,gr0,icc3		/* set ICC3.Z */
+	ckeq		icc3,cc7
+	ld.p		@(gr9,gr0),gr8			/* LD.P/ORCR must be atomic */
+	orcr		cc7,cc7,cc3			/* set CC3 to true */
+	cst.p		gr10,@(gr9,gr0)		,cc3,#1
+	corcc		gr29,gr29,gr0		,cc3,#1	/* clear ICC3.Z if store happens */
+	beq		icc3,#0,0b
+	bralr
+
+	.size		__xchg_32, .-__xchg_32
+
+###############################################################################
+#
+# uint8_t __cmpxchg_8(uint8_t *v, uint8_t test, uint8_t new)
+#
+###############################################################################
+	.globl		__cmpxchg_8
+        .type		__cmpxchg_8,@function
+__cmpxchg_8:
+	or.p		gr8,gr8,gr11
+0:
+	orcc		gr0,gr0,gr0,icc3
+	ckeq		icc3,cc7
+	ldub.p		@(gr11,gr0),gr8
+	orcr		cc7,cc7,cc3
+	sub		gr8,gr9,gr7
+	sllicc		gr7,#24,gr0,icc0
+	bne		icc0,#0,1f
+	cstb.p		gr10,@(gr11,gr0)	,cc3,#1
+	corcc		gr29,gr29,gr0		,cc3,#1
+	beq		icc3,#0,0b
+1:
+	bralr
+
+	.size		__cmpxchg_8, .-__cmpxchg_8
+
+###############################################################################
+#
+# uint16_t __cmpxchg_16(uint16_t *v, uint16_t test, uint16_t new)
+#
+###############################################################################
+	.globl		__cmpxchg_16
+        .type		__cmpxchg_16,@function
+__cmpxchg_16:
+	or.p		gr8,gr8,gr11
+0:
+	orcc		gr0,gr0,gr0,icc3
+	ckeq		icc3,cc7
+	lduh.p		@(gr11,gr0),gr8
+	orcr		cc7,cc7,cc3
+	sub		gr8,gr9,gr7
+	sllicc		gr7,#16,gr0,icc0
+	bne		icc0,#0,1f
+	csth.p		gr10,@(gr11,gr0)	,cc3,#1
+	corcc		gr29,gr29,gr0		,cc3,#1
+	beq		icc3,#0,0b
+1:
+	bralr
+
+	.size		__cmpxchg_16, .-__cmpxchg_16
+
+###############################################################################
+#
+# uint32_t __cmpxchg_32(uint32_t *v, uint32_t test, uint32_t new)
+#
+###############################################################################
+	.globl		__cmpxchg_32
+        .type		__cmpxchg_32,@function
+__cmpxchg_32:
+	or.p		gr8,gr8,gr11
+0:
+	orcc		gr0,gr0,gr0,icc3
+	ckeq		icc3,cc7
+	ld.p		@(gr11,gr0),gr8
+	orcr		cc7,cc7,cc3
+	subcc		gr8,gr9,gr7,icc0
+	bne		icc0,#0,1f
+	cst.p		gr10,@(gr11,gr0)	,cc3,#1
+	corcc		gr29,gr29,gr0		,cc3,#1
+	beq		icc3,#0,0b
+1:
+	bralr
+
+	.size		__cmpxchg_32, .-__cmpxchg_32
diff -Nru a/arch/frv/lib/cache.S b/arch/frv/lib/cache.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/lib/cache.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,98 @@
+/* cache.S: cache managment routines
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <asm/spr-regs.h>
+#include <asm/cache.h>
+
+        .text
+        .p2align	4
+
+###############################################################################
+#
+# Write back a range of dcache
+# - void frv_dcache_writeback(unsigned long start [GR8], unsigned long size [GR9])
+#
+###############################################################################
+        .globl		frv_dcache_writeback
+        .type		frv_dcache_writeback,@function
+frv_dcache_writeback:
+	andi		gr8,~(L1_CACHE_BYTES-1),gr8
+
+2:	dcf		@(gr8,gr0)
+	addi		gr8,#L1_CACHE_BYTES,gr8
+	cmp		gr9,gr8,icc0
+	bhi		icc0,#2,2b
+
+	membar
+	bralr
+	.size		frv_dcache_writeback, .-frv_dcache_writeback
+
+##############################################################################
+#
+# Invalidate a range of dcache and icache
+# - void frv_cache_invalidate(unsigned long start [GR8], unsigned long end [GR9]);
+#
+###############################################################################
+        .globl		frv_cache_invalidate
+        .type		frv_cache_invalidate,@function
+frv_cache_invalidate:
+	andi		gr8,~(L1_CACHE_BYTES-1),gr8
+
+2:	dci		@(gr8,gr0)
+	ici		@(gr8,gr0)
+	addi		gr8,#L1_CACHE_BYTES,gr8
+	cmp		gr9,gr8,icc0
+	bhi		icc0,#2,2b
+
+	membar
+	bralr
+	.size		frv_cache_invalidate, .-frv_cache_invalidate
+
+##############################################################################
+#
+# Invalidate a range of icache
+# - void frv_icache_invalidate(unsigned long start [GR8], unsigned long end [GR9]);
+#
+###############################################################################
+        .globl		frv_icache_invalidate
+        .type		frv_icache_invalidate,@function
+frv_icache_invalidate:
+	andi		gr8,~(L1_CACHE_BYTES-1),gr8
+
+2:	ici		@(gr8,gr0)
+	addi		gr8,#L1_CACHE_BYTES,gr8
+	cmp		gr9,gr8,icc0
+	bhi		icc0,#2,2b
+
+	membar
+	bralr
+	.size		frv_icache_invalidate, .-frv_icache_invalidate
+
+###############################################################################
+#
+# Write back and invalidate a range of dcache and icache
+# - void frv_cache_wback_inv(unsigned long start [GR8], unsigned long end [GR9])
+#
+###############################################################################
+        .globl		frv_cache_wback_inv
+        .type		frv_cache_wback_inv,@function
+frv_cache_wback_inv:
+	andi		gr8,~(L1_CACHE_BYTES-1),gr8
+
+2:	dcf		@(gr8,gr0)
+	ici		@(gr8,gr0)
+	addi		gr8,#L1_CACHE_BYTES,gr8
+	cmp		gr9,gr8,icc0
+	bhi		icc0,#2,2b
+
+	membar
+	bralr
+	.size		frv_cache_wback_inv, .-frv_cache_wback_inv
diff -Nru a/arch/frv/lib/checksum.c b/arch/frv/lib/checksum.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/lib/checksum.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,148 @@
+/*
+ * 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.
+ *
+ *		IP/TCP/UDP checksumming routines
+ *
+ * Authors:	Jorge Cwik, <jorge@laser.satlink.net>
+ *		Arnt Gulbrandsen, <agulbra@nvg.unit.no>
+ *		Tom May, <ftom@netcom.com>
+ *		Andreas Schwab, <schwab@issan.informatik.uni-dortmund.de>
+ *		Lots of code moved from tcp.c and ip.c; see those files
+ *		for more names.
+ *
+ * 03/02/96	Jes Sorensen, Andreas Schwab, Roman Hodek:
+ *		Fixed some nasty bugs, causing some horrible crashes.
+ *		A: At some points, the sum (%0) was used as
+ *		length-counter instead of the length counter
+ *		(%1). Thanks to Roman Hodek for pointing this out.
+ *		B: GCC seems to mess up if one uses too many
+ *		data-registers to hold input values and one tries to
+ *		specify d0 and d1 as scratch registers. Letting gcc choose these
+ *      registers itself solves the problem.
+ *
+ *		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.
+ */
+
+/* Revised by Kenneth Albanowski for m68knommu. Basic problem: unaligned access kills, so most
+   of the assembly has to go. */
+
+#include <net/checksum.h>
+#include <asm/checksum.h>
+
+static inline unsigned short from32to16(unsigned long x)
+{
+	/* add up 16-bit and 16-bit for 16+c bit */
+	x = (x & 0xffff) + (x >> 16);
+	/* add up carry.. */
+	x = (x & 0xffff) + (x >> 16);
+	return x;
+}
+
+static unsigned long do_csum(const unsigned char * buff, int len)
+{
+	int odd, count;
+	unsigned long result = 0;
+
+	if (len <= 0)
+		goto out;
+	odd = 1 & (unsigned long) buff;
+	if (odd) {
+		result = *buff;
+		len--;
+		buff++;
+	}
+	count = len >> 1;		/* nr of 16-bit words.. */
+	if (count) {
+		if (2 & (unsigned long) buff) {
+			result += *(unsigned short *) buff;
+			count--;
+			len -= 2;
+			buff += 2;
+		}
+		count >>= 1;		/* nr of 32-bit words.. */
+		if (count) {
+		        unsigned long carry = 0;
+			do {
+				unsigned long w = *(unsigned long *) buff;
+				count--;
+				buff += 4;
+				result += carry;
+				result += w;
+				carry = (w > result);
+			} while (count);
+			result += carry;
+			result = (result & 0xffff) + (result >> 16);
+		}
+		if (len & 2) {
+			result += *(unsigned short *) buff;
+			buff += 2;
+		}
+	}
+	if (len & 1)
+		result += (*buff << 8);
+	result = from32to16(result);
+	if (odd)
+		result = ((result >> 8) & 0xff) | ((result & 0xff) << 8);
+out:
+	return result;
+}
+
+/*
+ * computes the checksum of a memory block at buff, length len,
+ * and adds in "sum" (32-bit)
+ *
+ * returns a 32-bit number suitable for feeding into itself
+ * or csum_tcpudp_magic
+ *
+ * this function must be called with even lengths, except
+ * for the last fragment, which may be odd
+ *
+ * it's best to have buff aligned on a 32-bit boundary
+ */
+unsigned int csum_partial(const unsigned char * buff, int len, unsigned int sum)
+{
+	unsigned int result = do_csum(buff, len);
+
+	/* add in old sum, and carry.. */
+	result += sum;
+	if (sum > result)
+		result += 1;
+	return result;
+}
+
+/*
+ * this routine is used for miscellaneous IP-like checksums, mainly
+ * in icmp.c
+ */
+unsigned short ip_compute_csum(const unsigned char * buff, int len)
+{
+	return ~do_csum(buff,len);
+}
+
+/*
+ * copy from fs while checksumming, otherwise like csum_partial
+ */
+
+unsigned int
+csum_partial_copy_from_user(const char *src, char *dst, int len, int sum, int *csum_err)
+{
+	if (csum_err) *csum_err = 0;
+	memcpy(dst, src, len);
+	return csum_partial(dst, len, sum);
+}
+
+/*
+ * copy from ds while checksumming, otherwise like csum_partial
+ */
+
+unsigned int
+csum_partial_copy(const char *src, char *dst, int len, int sum)
+{
+	memcpy(dst, src, len);
+	return csum_partial(dst, len, sum);
+}
diff -Nru a/arch/frv/lib/insl_ns.S b/arch/frv/lib/insl_ns.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/lib/insl_ns.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,52 @@
+/* insl_ns.S: input array of 4b words from device port without byte swapping
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+
+        .text
+        .p2align	4
+
+###############################################################################
+#
+# void __insl_ns(unsigned int port, void *buf, int n)
+#
+###############################################################################
+        .globl		__insl_ns
+        .type		__insl_ns,@function
+__insl_ns:
+	andicc.p	gr9,#3,gr0,icc0
+	setlos		#4,gr4
+	bne		icc0,#0,__insl_ns_misaligned
+	subi		gr9,#4,gr9
+0:
+	ldi.p		@(gr8,#0),gr5
+	subicc		gr10,#1,gr10,icc0
+	stu.p		gr5,@(gr9,gr4)
+	bhi		icc0,#2,0b
+	bralr
+
+__insl_ns_misaligned:
+	subi.p		gr9,#1,gr9
+	setlos		#1,gr4
+0:
+	ldi		@(gr8,#0),gr5
+
+	srli		gr5,#24,gr6
+	stbu.p		gr6,@(gr9,gr4)
+	srli		gr5,#16,gr6
+	stbu.p		gr6,@(gr9,gr4)
+	srli		gr5,#8,gr6
+	stbu.p		gr6,@(gr9,gr4)
+	subicc		gr10,#1,gr10,icc0
+	stbu.p		gr5,@(gr9,gr4)
+	bhi		icc0,#2,0b
+	bralr
+
+	.size		__insl_ns, .-__insl_ns
diff -Nru a/arch/frv/lib/insl_sw.S b/arch/frv/lib/insl_sw.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/lib/insl_sw.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,40 @@
+/* insl_sw.S: input array of 4b words from device port with byte swapping
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+
+        .text
+        .p2align	4
+
+###############################################################################
+#
+# void __insl_sw(unsigned int port, void *buf, int n)
+#
+###############################################################################
+        .globl		__insl_sw
+        .type		__insl_sw,@function
+__insl_sw:
+	subi.p		gr9,#1,gr9
+	setlos		#1,gr4
+0:
+	ldi.p		@(gr8,#0),gr5		; get 0xAABBCCDD
+	subicc		gr10,#1,gr10,icc0
+
+	stbu.p		gr5,@(gr9,gr4)		; write 0xDD
+	srli		gr5,#8,gr5
+	stbu.p		gr5,@(gr9,gr4)		; write 0xCC
+	srli		gr5,#8,gr5
+	stbu.p		gr5,@(gr9,gr4)		; write 0xBB
+	srli		gr5,#8,gr5
+	stbu.p		gr5,@(gr9,gr4)		; write 0xAA
+	bhi		icc0,#2,0b
+	bralr
+
+	.size		__insl_sw, .-__insl_sw
diff -Nru a/arch/frv/lib/memcpy.S b/arch/frv/lib/memcpy.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/lib/memcpy.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,135 @@
+/* memcpy.S: optimised assembly memcpy
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+
+        .text
+        .p2align	4
+
+###############################################################################
+#
+# void *memcpy(void *to, const char *from, size_t count)
+#
+# - NOTE: must not use any stack. exception detection performs function return
+#         to caller's fixup routine, aborting the remainder of the copy
+#
+###############################################################################
+        .globl		memcpy,__memcpy_end
+        .type		memcpy,@function
+memcpy:
+	or.p		gr8,gr9,gr4
+	orcc		gr10,gr0,gr0,icc3
+	or.p		gr10,gr4,gr4
+	beqlr		icc3,#0
+
+	# optimise based on best common alignment for to, from & count
+	andicc.p	gr4,#0x0f,gr0,icc0
+	setlos		#8,gr11
+	andicc.p	gr4,#0x07,gr0,icc1
+	beq		icc0,#0,memcpy_16
+	andicc.p	gr4,#0x03,gr0,icc0
+	beq		icc1,#0,memcpy_8
+	andicc.p	gr4,#0x01,gr0,icc1
+	beq		icc0,#0,memcpy_4
+	setlos.p	#1,gr11
+	beq		icc1,#0,memcpy_2
+
+	# do byte by byte copy
+	sub.p		gr8,gr11,gr3
+	sub		gr9,gr11,gr9
+0:	ldubu.p		@(gr9,gr11),gr4
+	subicc		gr10,#1,gr10,icc0
+	stbu.p		gr4,@(gr3,gr11)
+	bne		icc0,#2,0b
+	bralr
+
+	# do halfword by halfword copy
+memcpy_2:
+	setlos		#2,gr11
+	sub.p		gr8,gr11,gr3
+	sub		gr9,gr11,gr9
+0:	lduhu.p		@(gr9,gr11),gr4
+	subicc		gr10,#2,gr10,icc0
+	sthu.p		gr4,@(gr3,gr11)
+	bne		icc0,#2,0b
+	bralr
+
+	# do word by word copy
+memcpy_4:
+	setlos		#4,gr11
+	sub.p		gr8,gr11,gr3
+	sub		gr9,gr11,gr9
+0:	ldu.p		@(gr9,gr11),gr4
+	subicc		gr10,#4,gr10,icc0
+	stu.p		gr4,@(gr3,gr11)
+	bne		icc0,#2,0b
+	bralr
+
+	# do double-word by double-word copy
+memcpy_8:
+	sub.p		gr8,gr11,gr3
+	sub		gr9,gr11,gr9
+0:	lddu.p		@(gr9,gr11),gr4
+	subicc		gr10,#8,gr10,icc0
+	stdu.p		gr4,@(gr3,gr11)
+	bne		icc0,#2,0b
+	bralr
+
+	# do quad-word by quad-word copy
+memcpy_16:
+	sub.p		gr8,gr11,gr3
+	sub		gr9,gr11,gr9
+0:	lddu		@(gr9,gr11),gr4
+	lddu.p		@(gr9,gr11),gr6
+	subicc		gr10,#16,gr10,icc0
+	stdu		gr4,@(gr3,gr11)
+	stdu.p		gr6,@(gr3,gr11)
+	bne		icc0,#2,0b
+	bralr
+__memcpy_end:
+
+	.size		memcpy, __memcpy_end-memcpy
+
+###############################################################################
+#
+# copy to/from userspace
+# - return the number of bytes that could not be copied (0 on complete success)
+#
+# long __memcpy_user(void *dst, const void *src, size_t count)
+#
+###############################################################################
+        .globl		__memcpy_user, __memcpy_user_error_lr, __memcpy_user_error_handler
+        .type		__memcpy_user,@function
+__memcpy_user:
+	movsg		lr,gr7
+	subi.p		sp,#8,sp
+	add		gr8,gr10,gr6		; calculate expected end address
+	stdi		gr6,@(sp,#0)
+
+	# abuse memcpy to do the dirty work
+	call		memcpy
+__memcpy_user_error_lr:
+	ldi.p		@(sp,#4),gr7
+	setlos		#0,gr8
+	jmpl.p		@(gr7,gr0)
+	addi		sp,#8,sp
+
+	# deal any exception generated by memcpy
+	# GR8 - memcpy's current dest address
+	# GR11 - memset's step value (index register for store insns)
+__memcpy_user_error_handler:
+	lddi.p		@(sp,#0),gr4		; load GR4 with dst+count, GR5 with ret addr
+	add		gr11,gr3,gr7
+	sub.p		gr4,gr7,gr8
+
+	addi		sp,#8,sp
+	jmpl		@(gr5,gr0)
+
+	.size		__memcpy_user, .-__memcpy_user
diff -Nru a/arch/frv/lib/memset.S b/arch/frv/lib/memset.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/lib/memset.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,182 @@
+/* memset.S: optimised assembly memset
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+
+        .text
+        .p2align	4
+
+###############################################################################
+#
+# void *memset(void *p, char ch, size_t count)
+#
+# - NOTE: must not use any stack. exception detection performs function return
+#         to caller's fixup routine, aborting the remainder of the set
+#         GR4, GR7, GR8, and GR11 must be managed
+#
+###############################################################################
+        .globl		memset,__memset_end
+        .type		memset,@function
+memset:
+	orcc.p		gr10,gr0,gr5,icc3		; GR5 = count
+	andi		gr9,#0xff,gr9
+	or.p		gr8,gr0,gr4			; GR4 = address
+	beqlr		icc3,#0
+
+	# conditionally write a byte to 2b-align the address
+	setlos.p	#1,gr6
+	andicc		gr4,#1,gr0,icc0
+	ckne		icc0,cc7
+	cstb.p		gr9,@(gr4,gr0)		,cc7,#1
+	csubcc		gr5,gr6,gr5		,cc7,#1	; also set ICC3
+	cadd.p		gr4,gr6,gr4		,cc7,#1
+	beqlr		icc3,#0
+
+	# conditionally write a word to 4b-align the address
+	andicc.p	gr4,#2,gr0,icc0
+	subicc		gr5,#2,gr0,icc1
+	setlos.p	#2,gr6
+	ckne		icc0,cc7
+	slli.p		gr9,#8,gr12			; need to double up the pattern
+	cknc		icc1,cc5
+	or.p		gr9,gr12,gr12
+	andcr		cc7,cc5,cc7
+
+	csth.p		gr12,@(gr4,gr0)		,cc7,#1
+	csubcc		gr5,gr6,gr5		,cc7,#1	; also set ICC3
+	cadd.p		gr4,gr6,gr4		,cc7,#1
+	beqlr		icc3,#0
+
+	# conditionally write a dword to 8b-align the address
+	andicc.p	gr4,#4,gr0,icc0
+	subicc		gr5,#4,gr0,icc1
+	setlos.p	#4,gr6
+	ckne		icc0,cc7
+	slli.p		gr12,#16,gr13			; need to quadruple-up the pattern
+	cknc		icc1,cc5
+	or.p		gr13,gr12,gr12
+	andcr		cc7,cc5,cc7
+
+	cst.p		gr12,@(gr4,gr0)		,cc7,#1
+	csubcc		gr5,gr6,gr5		,cc7,#1	; also set ICC3
+	cadd.p		gr4,gr6,gr4		,cc7,#1
+	beqlr		icc3,#0
+
+	or.p		gr12,gr12,gr13			; need to octuple-up the pattern
+
+	# the address is now 8b-aligned - loop around writing 64b chunks
+	setlos		#8,gr7
+	subi.p		gr4,#8,gr4			; store with update index does weird stuff
+	setlos		#64,gr6
+
+	subicc		gr5,#64,gr0,icc0
+0:	cknc		icc0,cc7
+	cstdu		gr12,@(gr4,gr7)		,cc7,#1
+	cstdu		gr12,@(gr4,gr7)		,cc7,#1
+	cstdu		gr12,@(gr4,gr7)		,cc7,#1
+	cstdu		gr12,@(gr4,gr7)		,cc7,#1
+	cstdu		gr12,@(gr4,gr7)		,cc7,#1
+	cstdu.p		gr12,@(gr4,gr7)		,cc7,#1
+	csubcc		gr5,gr6,gr5		,cc7,#1	; also set ICC3
+	cstdu.p		gr12,@(gr4,gr7)		,cc7,#1
+	subicc		gr5,#64,gr0,icc0
+	cstdu.p		gr12,@(gr4,gr7)		,cc7,#1
+	beqlr		icc3,#0
+	bnc		icc0,#2,0b
+
+	# now do 32-byte remnant
+	subicc.p	gr5,#32,gr0,icc0
+	setlos		#32,gr6
+	cknc		icc0,cc7
+	cstdu.p		gr12,@(gr4,gr7)		,cc7,#1
+	csubcc		gr5,gr6,gr5		,cc7,#1	; also set ICC3
+	cstdu.p		gr12,@(gr4,gr7)		,cc7,#1
+	setlos		#16,gr6
+	cstdu.p		gr12,@(gr4,gr7)		,cc7,#1
+	subicc		gr5,#16,gr0,icc0
+	cstdu.p		gr12,@(gr4,gr7)		,cc7,#1
+	beqlr		icc3,#0
+
+	# now do 16-byte remnant
+	cknc		icc0,cc7
+	cstdu.p		gr12,@(gr4,gr7)		,cc7,#1
+	csubcc		gr5,gr6,gr5		,cc7,#1	; also set ICC3
+	cstdu.p		gr12,@(gr4,gr7)		,cc7,#1
+	beqlr		icc3,#0
+
+	# now do 8-byte remnant
+	subicc		gr5,#8,gr0,icc1
+	cknc		icc1,cc7
+	cstdu.p		gr12,@(gr4,gr7)		,cc7,#1
+	csubcc		gr5,gr7,gr5		,cc7,#1	; also set ICC3
+	setlos.p	#4,gr7
+	beqlr		icc3,#0
+
+	# now do 4-byte remnant
+	subicc		gr5,#4,gr0,icc0
+	addi.p		gr4,#4,gr4
+	cknc		icc0,cc7
+	cstu.p		gr12,@(gr4,gr7)		,cc7,#1
+	csubcc		gr5,gr7,gr5		,cc7,#1	; also set ICC3
+	subicc.p	gr5,#2,gr0,icc1
+	beqlr		icc3,#0
+
+	# now do 2-byte remnant
+	setlos		#2,gr7
+	addi.p		gr4,#2,gr4
+	cknc		icc1,cc7
+	csthu.p		gr12,@(gr4,gr7)		,cc7,#1
+	csubcc		gr5,gr7,gr5		,cc7,#1	; also set ICC3
+	subicc.p	gr5,#1,gr0,icc0
+	beqlr		icc3,#0
+
+	# now do 1-byte remnant
+	setlos		#0,gr7
+	addi.p		gr4,#2,gr4
+	cknc		icc0,cc7
+	cstb.p		gr12,@(gr4,gr0)		,cc7,#1
+	bralr
+__memset_end:
+
+	.size		memset, __memset_end-memset
+
+###############################################################################
+#
+# clear memory in userspace
+# - return the number of bytes that could not be cleared (0 on complete success)
+#
+# long __memset_user(void *p, size_t count)
+#
+###############################################################################
+        .globl		__memset_user, __memset_user_error_lr, __memset_user_error_handler
+        .type		__memset_user,@function
+__memset_user:
+	movsg		lr,gr11
+
+	# abuse memset to do the dirty work
+	or.p		gr9,gr9,gr10
+	setlos		#0,gr9
+	call		memset
+__memset_user_error_lr:
+	jmpl.p		@(gr11,gr0)
+	setlos		#0,gr8
+
+	# deal any exception generated by memset
+	# GR4  - memset's address tracking pointer
+	# GR7  - memset's step value (index register for store insns)
+	# GR8  - memset's original start address
+	# GR10 - memset's original count
+__memset_user_error_handler:
+	add.p		gr4,gr7,gr4
+	add		gr8,gr10,gr8
+	jmpl.p		@(gr11,gr0)
+	sub		gr8,gr4,gr8		; we return the amount left uncleared
+
+	.size		__memset_user, .-__memset_user
diff -Nru a/arch/frv/lib/outsl_ns.S b/arch/frv/lib/outsl_ns.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/lib/outsl_ns.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,59 @@
+/* outsl_ns.S: output array of 4b words to device without byte swapping
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+
+        .text
+        .p2align	4
+
+###############################################################################
+#
+# void __outsl_ns(unsigned int port, const void *buf, int n)
+#
+###############################################################################
+        .globl		__outsl_ns
+        .type		__outsl_ns,@function
+__outsl_ns:
+	andicc.p	gr9,#3,gr0,icc0
+	setlos		#4,gr4
+	bne		icc0,#0,__outsl_ns_misaligned
+	subi		gr9,#4,gr9
+0:
+	ldu.p		@(gr9,gr4),gr5
+	subicc		gr10,#1,gr10,icc0
+	sti.p		gr5,@(gr8,#0)
+	bhi		icc0,#2,0b
+
+	membar
+	bralr
+
+__outsl_ns_misaligned:
+	subi.p		gr9,#1,gr9
+	setlos		#1,gr4
+0:
+	ldubu		@(gr9,gr4),gr5
+	ldubu.p		@(gr9,gr4),gr6
+	slli		gr5,#8,gr5
+	ldubu.p		@(gr9,gr4),gr7
+	or		gr5,gr6,gr5
+	ldubu.p		@(gr9,gr4),gr6
+	slli		gr5,#16,gr5
+	slli.p		gr7,#8,gr7
+	or		gr5,gr6,gr5
+	subicc.p	gr10,#1,gr10,icc0
+	or		gr5,gr7,gr5
+
+	sti.p		gr5,@(gr8,#0)
+	bhi		icc0,#2,0b
+
+	membar
+	bralr
+
+	.size		__outsl_ns, .-__outsl_ns
diff -Nru a/arch/frv/lib/outsl_sw.S b/arch/frv/lib/outsl_sw.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/lib/outsl_sw.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,45 @@
+/* outsl_ns.S: output array of 4b words to device with byte swapping
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+
+        .text
+        .p2align	4
+
+###############################################################################
+#
+# void __outsl_sw(unsigned int port, const void *buf, int n)
+#
+###############################################################################
+        .globl		__outsl_sw
+        .type		__outsl_sw,@function
+__outsl_sw:
+	subi.p		gr9,#1,gr9
+	setlos		#1,gr4
+0:
+	ldubu		@(gr9,gr4),gr5
+	ldubu		@(gr9,gr4),gr6
+	slli		gr6,#8,gr6
+	ldubu.p		@(gr9,gr4),gr7
+	or		gr5,gr6,gr5
+	ldubu.p		@(gr9,gr4),gr6
+	slli		gr7,#16,gr7
+	slli.p		gr6,#24,gr6
+	or		gr5,gr7,gr5
+	subicc.p	gr10,#1,gr10,icc0
+	or		gr5,gr6,gr5
+
+	sti.p		gr5,@(gr8,#0)
+	bhi		icc0,#2,0b
+
+	membar
+	bralr
+
+	.size		__outsl_sw, .-__outsl_sw
diff -Nru a/arch/frv/mb93090-mb00/Makefile b/arch/frv/mb93090-mb00/Makefile
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/mb93090-mb00/Makefile	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,13 @@
+#
+# Makefile for the MB93090-MB00 motherboard stuff
+#
+
+ifeq "$(CONFIG_PCI)" "y"
+obj-y := pci-frv.o pci-irq.o pci-vdk.o
+
+ifeq "$(CONFIG_MMU)" "y"
+obj-y += pci-dma.o
+else
+obj-y += pci-dma-nommu.o
+endif
+endif
diff -Nru a/arch/frv/mb93090-mb00/pci-dma-nommu.c b/arch/frv/mb93090-mb00/pci-dma-nommu.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/mb93090-mb00/pci-dma-nommu.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,152 @@
+/* pci-dma-nommu.c: Dynamic DMA mapping support for the FRV
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Woodhouse (dwmw2@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/types.h>
+#include <linux/slab.h>
+#include <linux/dma-mapping.h>
+#include <linux/list.h>
+#include <linux/pci.h>
+#include <asm/io.h>
+
+#if 1
+#define DMA_SRAM_START	dma_coherent_mem_start
+#define DMA_SRAM_END	dma_coherent_mem_end
+#else // Use video RAM on Matrox
+#define DMA_SRAM_START	0xe8900000
+#define DMA_SRAM_END	0xe8a00000
+#endif
+
+struct dma_alloc_record {
+	struct list_head	list;
+	unsigned long		ofs;
+	unsigned long		len;
+};
+
+static spinlock_t dma_alloc_lock = SPIN_LOCK_UNLOCKED;
+static LIST_HEAD(dma_alloc_list);
+
+void *dma_alloc_coherent(struct device *hwdev, size_t size, dma_addr_t *dma_handle, int gfp)
+{
+	struct dma_alloc_record *new;
+	struct list_head *this = &dma_alloc_list;
+	unsigned long flags;
+	unsigned long start = DMA_SRAM_START;
+	unsigned long end;
+
+	if (!DMA_SRAM_START) {
+		printk("%s called without any DMA area reserved!\n", __func__);
+		return NULL;
+	}
+
+	new = kmalloc(sizeof (*new), GFP_ATOMIC);
+	if (!new)
+		return NULL;
+
+	/* Round up to a reasonable alignment */
+	new->len = (size + 31) & ~31;
+
+	spin_lock_irqsave(&dma_alloc_lock, flags);
+
+	list_for_each (this, &dma_alloc_list) {
+		struct dma_alloc_record *this_r = list_entry(this, struct dma_alloc_record, list);
+		end = this_r->ofs;
+
+		if (end - start >= size)
+			goto gotone;
+
+		start = this_r->ofs + this_r->len;
+	}
+	/* Reached end of list. */
+	end = DMA_SRAM_END;
+	this = &dma_alloc_list;
+
+	if (end - start >= size) {
+	gotone:
+		new->ofs = start;
+		list_add_tail(&new->list, this);
+		spin_unlock_irqrestore(&dma_alloc_lock, flags);
+
+		*dma_handle = start;
+		return (void *)start;
+	}
+
+	kfree(new);
+	spin_unlock_irqrestore(&dma_alloc_lock, flags);
+	return NULL;
+}
+
+void dma_free_coherent(struct device *hwdev, size_t size, void *vaddr, dma_addr_t dma_handle)
+{
+	struct dma_alloc_record *rec;
+	unsigned long flags;
+
+	spin_lock_irqsave(&dma_alloc_lock, flags);
+
+	list_for_each_entry(rec, &dma_alloc_list, list) {
+		if (rec->ofs == dma_handle) {
+			list_del(&rec->list);
+			kfree(rec);
+			spin_unlock_irqrestore(&dma_alloc_lock, flags);
+			return;
+		}
+	}
+	spin_unlock_irqrestore(&dma_alloc_lock, flags);
+	BUG();
+}
+
+/*
+ * Map a single buffer of the indicated size for DMA in streaming mode.
+ * The 32-bit bus address to use is returned.
+ *
+ * Once the device is given the dma address, the device owns this memory
+ * until either pci_unmap_single or pci_dma_sync_single is performed.
+ */
+dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size,
+			  enum dma_data_direction direction)
+{
+	if (direction == DMA_NONE)
+                BUG();
+
+	frv_cache_wback_inv((unsigned long) ptr, (unsigned long) ptr + size);
+
+	return virt_to_bus(ptr);
+}
+
+/*
+ * Map a set of buffers described by scatterlist in streaming
+ * mode for DMA.  This is the scather-gather version of the
+ * above pci_map_single interface.  Here the scatter gather list
+ * elements are each tagged with the appropriate dma address
+ * and length.  They are obtained via sg_dma_{address,length}(SG).
+ *
+ * NOTE: An implementation may be able to use a smaller number of
+ *       DMA address/length pairs than there are SG table elements.
+ *       (for example via virtual mapping capabilities)
+ *       The routine returns the number of addr/length pairs actually
+ *       used, at most nents.
+ *
+ * Device ownership issues as mentioned above for pci_map_single are
+ * the same here.
+ */
+int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
+	       enum dma_data_direction direction)
+{
+	int i;
+
+	for (i=0; i<nents; i++)
+		frv_cache_wback_inv(sg_dma_address(&sg[i]),
+				    sg_dma_address(&sg[i]) + sg_dma_len(&sg[i]));
+
+	if (direction == DMA_NONE)
+                BUG();
+
+	return nents;
+}
diff -Nru a/arch/frv/mb93090-mb00/pci-dma.c b/arch/frv/mb93090-mb00/pci-dma.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/mb93090-mb00/pci-dma.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,105 @@
+/* pci-dma.c: Dynamic DMA mapping support for the FRV CPUs that have MMUs
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/types.h>
+#include <linux/slab.h>
+#include <linux/dma-mapping.h>
+#include <linux/list.h>
+#include <linux/pci.h>
+#include <linux/highmem.h>
+#include <asm/io.h>
+
+void *dma_alloc_coherent(struct device *hwdev, size_t size, dma_addr_t *dma_handle, int gfp)
+{
+	void *ret;
+
+	ret = consistent_alloc(gfp, size, dma_handle);
+	if (ret)
+		memset(ret, 0, size);
+
+	return ret;
+}
+
+void dma_free_coherent(struct device *hwdev, size_t size, void *vaddr, dma_addr_t dma_handle)
+{
+	consistent_free(vaddr);
+}
+
+/*
+ * Map a single buffer of the indicated size for DMA in streaming mode.
+ * The 32-bit bus address to use is returned.
+ *
+ * Once the device is given the dma address, the device owns this memory
+ * until either pci_unmap_single or pci_dma_sync_single is performed.
+ */
+dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size,
+			  enum dma_data_direction direction)
+{
+	if (direction == DMA_NONE)
+                BUG();
+
+	frv_cache_wback_inv((unsigned long) ptr, (unsigned long) ptr + size);
+
+	return virt_to_bus(ptr);
+}
+
+/*
+ * Map a set of buffers described by scatterlist in streaming
+ * mode for DMA.  This is the scather-gather version of the
+ * above pci_map_single interface.  Here the scatter gather list
+ * elements are each tagged with the appropriate dma address
+ * and length.  They are obtained via sg_dma_{address,length}(SG).
+ *
+ * NOTE: An implementation may be able to use a smaller number of
+ *       DMA address/length pairs than there are SG table elements.
+ *       (for example via virtual mapping capabilities)
+ *       The routine returns the number of addr/length pairs actually
+ *       used, at most nents.
+ *
+ * Device ownership issues as mentioned above for pci_map_single are
+ * the same here.
+ */
+int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
+	       enum dma_data_direction direction)
+{
+	unsigned long dampr2;
+	void *vaddr;
+	int i;
+
+	if (direction == DMA_NONE)
+                BUG();
+
+	dampr2 = __get_DAMPR(2);
+
+	for (i = 0; i < nents; i++) {
+		vaddr = kmap_atomic(sg[i].page, __KM_CACHE);
+
+		frv_dcache_writeback((unsigned long) vaddr,
+				     (unsigned long) vaddr + PAGE_SIZE);
+
+	}
+
+	kunmap_atomic(vaddr, __KM_CACHE);
+	if (dampr2) {
+		__set_DAMPR(2, dampr2);
+		__set_IAMPR(2, dampr2);
+	}
+
+	return nents;
+}
+
+dma_addr_t dma_map_page(struct device *dev, struct page *page, unsigned long offset,
+			size_t size, enum dma_data_direction direction)
+{
+	BUG_ON(direction == DMA_NONE);
+	flush_dcache_page(page);
+	return (dma_addr_t) page_to_phys(page) + offset;
+}
diff -Nru a/arch/frv/mb93090-mb00/pci-frv.c b/arch/frv/mb93090-mb00/pci-frv.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/mb93090-mb00/pci-frv.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,288 @@
+/* pci-frv.c: low-level PCI access routines
+ *
+ * Copyright (C) 2003-5 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ * - Derived from the i386 equivalent stuff
+ *
+ * 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/kernel.h>
+#include <linux/pci.h>
+#include <linux/init.h>
+#include <linux/ioport.h>
+#include <linux/errno.h>
+
+#include "pci-frv.h"
+
+#if 0
+void
+pcibios_update_resource(struct pci_dev *dev, struct resource *root,
+			struct resource *res, int resource)
+{
+	u32 new, check;
+	int reg;
+
+	new = res->start | (res->flags & PCI_REGION_FLAG_MASK);
+	if (resource < 6) {
+		reg = PCI_BASE_ADDRESS_0 + 4*resource;
+	} else if (resource == PCI_ROM_RESOURCE) {
+		res->flags |= PCI_ROM_ADDRESS_ENABLE;
+		new |= PCI_ROM_ADDRESS_ENABLE;
+		reg = dev->rom_base_reg;
+	} else {
+		/* Somebody might have asked allocation of a non-standard resource */
+		return;
+	}
+
+	pci_write_config_dword(dev, reg, new);
+	pci_read_config_dword(dev, reg, &check);
+	if ((new ^ check) & ((new & PCI_BASE_ADDRESS_SPACE_IO) ? PCI_BASE_ADDRESS_IO_MASK : PCI_BASE_ADDRESS_MEM_MASK)) {
+		printk(KERN_ERR "PCI: Error while updating region "
+		       "%s/%d (%08x != %08x)\n", dev->slot_name, resource,
+		       new, check);
+	}
+}
+#endif
+
+/*
+ * We need to avoid collisions with `mirrored' VGA ports
+ * and other strange ISA hardware, so we always want the
+ * addresses to be allocated in the 0x000-0x0ff region
+ * modulo 0x400.
+ *
+ * Why? Because some silly external IO cards only decode
+ * the low 10 bits of the IO address. The 0x00-0xff region
+ * is reserved for motherboard devices that decode all 16
+ * bits, so it's ok to allocate at, say, 0x2800-0x28ff,
+ * but we want to try to avoid allocating at 0x2900-0x2bff
+ * which might have be mirrored at 0x0100-0x03ff..
+ */
+void
+pcibios_align_resource(void *data, struct resource *res,
+		       unsigned long size, unsigned long align)
+{
+	if (res->flags & IORESOURCE_IO) {
+		unsigned long start = res->start;
+
+		if (start & 0x300) {
+			start = (start + 0x3ff) & ~0x3ff;
+			res->start = start;
+		}
+	}
+}
+
+
+/*
+ *  Handle resources of PCI devices.  If the world were perfect, we could
+ *  just allocate all the resource regions and do nothing more.  It isn't.
+ *  On the other hand, we cannot just re-allocate all devices, as it would
+ *  require us to know lots of host bridge internals.  So we attempt to
+ *  keep as much of the original configuration as possible, but tweak it
+ *  when it's found to be wrong.
+ *
+ *  Known BIOS problems we have to work around:
+ *	- I/O or memory regions not configured
+ *	- regions configured, but not enabled in the command register
+ *	- bogus I/O addresses above 64K used
+ *	- expansion ROMs left enabled (this may sound harmless, but given
+ *	  the fact the PCI specs explicitly allow address decoders to be
+ *	  shared between expansion ROMs and other resource regions, it's
+ *	  at least dangerous)
+ *
+ *  Our solution:
+ *	(1) Allocate resources for all buses behind PCI-to-PCI bridges.
+ *	    This gives us fixed barriers on where we can allocate.
+ *	(2) Allocate resources for all enabled devices.  If there is
+ *	    a collision, just mark the resource as unallocated. Also
+ *	    disable expansion ROMs during this step.
+ *	(3) Try to allocate resources for disabled devices.  If the
+ *	    resources were assigned correctly, everything goes well,
+ *	    if they weren't, they won't disturb allocation of other
+ *	    resources.
+ *	(4) Assign new addresses to resources which were either
+ *	    not configured at all or misconfigured.  If explicitly
+ *	    requested by the user, configure expansion ROM address
+ *	    as well.
+ */
+
+static void __init pcibios_allocate_bus_resources(struct list_head *bus_list)
+{
+	struct list_head *ln;
+	struct pci_bus *bus;
+	struct pci_dev *dev;
+	int idx;
+	struct resource *r, *pr;
+
+	/* Depth-First Search on bus tree */
+	for (ln=bus_list->next; ln != bus_list; ln=ln->next) {
+		bus = pci_bus_b(ln);
+		if ((dev = bus->self)) {
+			for (idx = PCI_BRIDGE_RESOURCES; idx < PCI_NUM_RESOURCES; idx++) {
+				r = &dev->resource[idx];
+				if (!r->start)
+					continue;
+				pr = pci_find_parent_resource(dev, r);
+				if (!pr || request_resource(pr, r) < 0)
+					printk(KERN_ERR "PCI: Cannot allocate resource region %d of bridge %s\n", idx, dev->slot_name);
+			}
+		}
+		pcibios_allocate_bus_resources(&bus->children);
+	}
+}
+
+static void __init pcibios_allocate_resources(int pass)
+{
+	struct pci_dev *dev = NULL;
+	int idx, disabled;
+	u16 command;
+	struct resource *r, *pr;
+
+	while (dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev),
+	       dev != NULL
+	       ) {
+		pci_read_config_word(dev, PCI_COMMAND, &command);
+		for(idx = 0; idx < 6; idx++) {
+			r = &dev->resource[idx];
+			if (r->parent)		/* Already allocated */
+				continue;
+			if (!r->start)		/* Address not assigned at all */
+				continue;
+			if (r->flags & IORESOURCE_IO)
+				disabled = !(command & PCI_COMMAND_IO);
+			else
+				disabled = !(command & PCI_COMMAND_MEMORY);
+			if (pass == disabled) {
+				DBG("PCI: Resource %08lx-%08lx (f=%lx, d=%d, p=%d)\n",
+				    r->start, r->end, r->flags, disabled, pass);
+				pr = pci_find_parent_resource(dev, r);
+				if (!pr || request_resource(pr, r) < 0) {
+					printk(KERN_ERR "PCI: Cannot allocate resource region %d of device %s\n", idx, pci_name(dev));
+					/* We'll assign a new address later */
+					r->end -= r->start;
+					r->start = 0;
+				}
+			}
+		}
+		if (!pass) {
+			r = &dev->resource[PCI_ROM_RESOURCE];
+			if (r->flags & PCI_ROM_ADDRESS_ENABLE) {
+				/* Turn the ROM off, leave the resource region, but keep it unregistered. */
+				u32 reg;
+				DBG("PCI: Switching off ROM of %s\n", pci_name(dev));
+				r->flags &= ~PCI_ROM_ADDRESS_ENABLE;
+				pci_read_config_dword(dev, dev->rom_base_reg, &reg);
+				pci_write_config_dword(dev, dev->rom_base_reg, reg & ~PCI_ROM_ADDRESS_ENABLE);
+			}
+		}
+	}
+}
+
+static void __init pcibios_assign_resources(void)
+{
+	struct pci_dev *dev = NULL;
+	int idx;
+	struct resource *r;
+
+	while (dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev),
+	       dev != NULL
+	       ) {
+		int class = dev->class >> 8;
+
+		/* Don't touch classless devices and host bridges */
+		if (!class || class == PCI_CLASS_BRIDGE_HOST)
+			continue;
+
+		for(idx=0; idx<6; idx++) {
+			r = &dev->resource[idx];
+
+			/*
+			 *  Don't touch IDE controllers and I/O ports of video cards!
+			 */
+			if ((class == PCI_CLASS_STORAGE_IDE && idx < 4) ||
+			    (class == PCI_CLASS_DISPLAY_VGA && (r->flags & IORESOURCE_IO)))
+				continue;
+
+			/*
+			 *  We shall assign a new address to this resource, either because
+			 *  the BIOS forgot to do so or because we have decided the old
+			 *  address was unusable for some reason.
+			 */
+			if (!r->start && r->end)
+				pci_assign_resource(dev, idx);
+		}
+
+		if (pci_probe & PCI_ASSIGN_ROMS) {
+			r = &dev->resource[PCI_ROM_RESOURCE];
+			r->end -= r->start;
+			r->start = 0;
+			if (r->end)
+				pci_assign_resource(dev, PCI_ROM_RESOURCE);
+		}
+	}
+}
+
+void __init pcibios_resource_survey(void)
+{
+	DBG("PCI: Allocating resources\n");
+	pcibios_allocate_bus_resources(&pci_root_buses);
+	pcibios_allocate_resources(0);
+	pcibios_allocate_resources(1);
+	pcibios_assign_resources();
+}
+
+int pcibios_enable_resources(struct pci_dev *dev, int mask)
+{
+	u16 cmd, old_cmd;
+	int idx;
+	struct resource *r;
+
+	pci_read_config_word(dev, PCI_COMMAND, &cmd);
+	old_cmd = cmd;
+	for(idx=0; idx<6; idx++) {
+		/* Only set up the requested stuff */
+		if (!(mask & (1<<idx)))
+			continue;
+
+		r = &dev->resource[idx];
+		if (!r->start && r->end) {
+			printk(KERN_ERR "PCI: Device %s not available because of resource collisions\n", pci_name(dev));
+			return -EINVAL;
+		}
+		if (r->flags & IORESOURCE_IO)
+			cmd |= PCI_COMMAND_IO;
+		if (r->flags & IORESOURCE_MEM)
+			cmd |= PCI_COMMAND_MEMORY;
+	}
+	if (dev->resource[PCI_ROM_RESOURCE].start)
+		cmd |= PCI_COMMAND_MEMORY;
+	if (cmd != old_cmd) {
+		printk("PCI: Enabling device %s (%04x -> %04x)\n", pci_name(dev), old_cmd, cmd);
+		pci_write_config_word(dev, PCI_COMMAND, cmd);
+	}
+	return 0;
+}
+
+/*
+ *  If we set up a device for bus mastering, we need to check the latency
+ *  timer as certain crappy BIOSes forget to set it properly.
+ */
+unsigned int pcibios_max_latency = 255;
+
+void pcibios_set_master(struct pci_dev *dev)
+{
+	u8 lat;
+	pci_read_config_byte(dev, PCI_LATENCY_TIMER, &lat);
+	if (lat < 16)
+		lat = (64 <= pcibios_max_latency) ? 64 : pcibios_max_latency;
+	else if (lat > pcibios_max_latency)
+		lat = pcibios_max_latency;
+	else
+		return;
+	printk(KERN_DEBUG "PCI: Setting latency timer of device %s to %d\n", pci_name(dev), lat);
+	pci_write_config_byte(dev, PCI_LATENCY_TIMER, lat);
+}
diff -Nru a/arch/frv/mb93090-mb00/pci-frv.h b/arch/frv/mb93090-mb00/pci-frv.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/mb93090-mb00/pci-frv.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,47 @@
+/*
+ *	Low-Level PCI Access for FRV machines.
+ *
+ *	(c) 1999 Martin Mares <mj@ucw.cz>
+ */
+
+#include <asm/sections.h>
+
+#undef DEBUG
+
+#ifdef DEBUG
+#define DBG(x...) printk(x)
+#else
+#define DBG(x...)
+#endif
+
+#define PCI_PROBE_BIOS		0x0001
+#define PCI_PROBE_CONF1		0x0002
+#define PCI_PROBE_CONF2		0x0004
+#define PCI_NO_SORT		0x0100
+#define PCI_BIOS_SORT		0x0200
+#define PCI_NO_CHECKS		0x0400
+#define PCI_ASSIGN_ROMS		0x1000
+#define PCI_BIOS_IRQ_SCAN	0x2000
+#define PCI_ASSIGN_ALL_BUSSES	0x4000
+
+extern unsigned int __nongpreldata pci_probe;
+
+/* pci-frv.c */
+
+extern unsigned int pcibios_max_latency;
+
+void pcibios_resource_survey(void);
+int pcibios_enable_resources(struct pci_dev *, int);
+
+/* pci-vdk.c */
+
+extern int __nongpreldata pcibios_last_bus;
+extern struct pci_bus *__nongpreldata pci_root_bus;
+extern struct pci_ops *__nongpreldata pci_root_ops;
+
+/* pci-irq.c */
+extern unsigned int pcibios_irq_mask;
+
+void pcibios_irq_init(void);
+void pcibios_fixup_irqs(void);
+void pcibios_enable_irq(struct pci_dev *dev);
diff -Nru a/arch/frv/mb93090-mb00/pci-irq.c b/arch/frv/mb93090-mb00/pci-irq.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/mb93090-mb00/pci-irq.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,70 @@
+/* pci-irq.c: PCI IRQ routing on the FRV motherboard
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ * derived from: arch/i386/kernel/pci-irq.c: (c) 1999--2000 Martin Mares <mj@suse.cz>
+ */
+
+#include <linux/config.h>
+#include <linux/types.h>
+#include <linux/kernel.h>
+#include <linux/pci.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/interrupt.h>
+#include <linux/irq.h>
+
+#include <asm/io.h>
+#include <asm/smp.h>
+#include <asm/irq-routing.h>
+
+#include "pci-frv.h"
+
+/*
+ *	DEVICE	DEVNO	INT#A	INT#B	INT#C	INT#D
+ *	=======	=======	=======	=======	=======	=======
+ *	MB86943	0	fpga.10	-	-	-
+ *	RTL8029	16	fpga.12	-	-	-
+ *	SLOT 1	19	fpga.6	fpga.5	fpga.4	fpga.3
+ *	SLOT 2	18	fpga.5	fpga.4	fpga.3	fpga.6
+ *	SLOT 3	17	fpga.4	fpga.3	fpga.6	fpga.5
+ *
+ */
+
+static const uint8_t __initdata pci_bus0_irq_routing[32][4] = {
+	[0 ] {	IRQ_FPGA_MB86943_PCI_INTA },
+	[16] {	IRQ_FPGA_RTL8029_INTA },
+	[17] {	IRQ_FPGA_PCI_INTC, IRQ_FPGA_PCI_INTD, IRQ_FPGA_PCI_INTA, IRQ_FPGA_PCI_INTB },
+	[18] {	IRQ_FPGA_PCI_INTB, IRQ_FPGA_PCI_INTC, IRQ_FPGA_PCI_INTD, IRQ_FPGA_PCI_INTA },
+	[19] {	IRQ_FPGA_PCI_INTA, IRQ_FPGA_PCI_INTB, IRQ_FPGA_PCI_INTC, IRQ_FPGA_PCI_INTD },
+};
+
+void __init pcibios_irq_init(void)
+{
+}
+
+void __init pcibios_fixup_irqs(void)
+{
+	struct pci_dev *dev = NULL;
+	uint8_t line, pin;
+
+	while (dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev),
+	       dev != NULL
+	       ) {
+		pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin);
+		if (pin) {
+			dev->irq = pci_bus0_irq_routing[PCI_SLOT(dev->devfn)][pin - 1];
+			pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq);
+		}
+		pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &line);
+	}
+}
+
+void __init pcibios_penalize_isa_irq(int irq)
+{
+}
+
+void pcibios_enable_irq(struct pci_dev *dev)
+{
+	pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq);
+}
diff -Nru a/arch/frv/mb93090-mb00/pci-vdk.c b/arch/frv/mb93090-mb00/pci-vdk.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/mb93090-mb00/pci-vdk.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,467 @@
+/* pci-vdk.c: MB93090-MB00 (VDK) PCI support
+ *
+ * Copyright (C) 2003, 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/config.h>
+#include <linux/types.h>
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/pci.h>
+#include <linux/init.h>
+#include <linux/ioport.h>
+#include <linux/delay.h>
+#include <linux/slab.h>
+
+#include <asm/segment.h>
+#include <asm/io.h>
+#include <asm/mb-regs.h>
+#include <asm/mb86943a.h>
+#include "pci-frv.h"
+
+unsigned int __nongpreldata pci_probe = 1;
+
+int  __nongpreldata pcibios_last_bus = -1;
+struct pci_bus *__nongpreldata pci_root_bus;
+struct pci_ops *__nongpreldata pci_root_ops;
+
+/*
+ * Functions for accessing PCI configuration space
+ */
+
+#define CONFIG_CMD(bus, dev, where) \
+	(0x80000000 | (bus->number << 16) | (devfn << 8) | (where & ~3))
+
+#define __set_PciCfgAddr(A) writel((A), (volatile void __iomem *) __region_CS1 + 0x80)
+
+#define __get_PciCfgDataB(A) readb((volatile void __iomem *) __region_CS1 + 0x88 + ((A) & 3))
+#define __get_PciCfgDataW(A) readw((volatile void __iomem *) __region_CS1 + 0x88 + ((A) & 2))
+#define __get_PciCfgDataL(A) readl((volatile void __iomem *) __region_CS1 + 0x88)
+
+#define __set_PciCfgDataB(A,V) \
+	writeb((V), (volatile void __iomem *) __region_CS1 + 0x88 + (3 - ((A) & 3)))
+
+#define __set_PciCfgDataW(A,V) \
+	writew((V), (volatile void __iomem *) __region_CS1 + 0x88 + (2 - ((A) & 2)))
+
+#define __set_PciCfgDataL(A,V) \
+	writel((V), (volatile void __iomem *) __region_CS1 + 0x88)
+
+#define __get_PciBridgeDataB(A) readb((volatile void __iomem *) __region_CS1 + 0x800 + (A))
+#define __get_PciBridgeDataW(A) readw((volatile void __iomem *) __region_CS1 + 0x800 + (A))
+#define __get_PciBridgeDataL(A) readl((volatile void __iomem *) __region_CS1 + 0x800 + (A))
+
+#define __set_PciBridgeDataB(A,V) writeb((V), (volatile void __iomem *) __region_CS1 + 0x800 + (A))
+#define __set_PciBridgeDataW(A,V) writew((V), (volatile void __iomem *) __region_CS1 + 0x800 + (A))
+#define __set_PciBridgeDataL(A,V) writel((V), (volatile void __iomem *) __region_CS1 + 0x800 + (A))
+
+static inline int __query(const struct pci_dev *dev)
+{
+//	return dev->bus->number==0 && (dev->devfn==PCI_DEVFN(0,0));
+//	return dev->bus->number==1;
+//	return dev->bus->number==0 &&
+//		(dev->devfn==PCI_DEVFN(2,0) || dev->devfn==PCI_DEVFN(3,0));
+	return 0;
+}
+
+/*****************************************************************************/
+/*
+ *
+ */
+static int pci_frv_read_config(struct pci_bus *bus, unsigned int devfn, int where, int size,
+			       u32 *val)
+{
+	u32 _value;
+
+	if (bus->number == 0 && devfn == PCI_DEVFN(0, 0)) {
+		_value = __get_PciBridgeDataL(where & ~3);
+	}
+	else {
+		__set_PciCfgAddr(CONFIG_CMD(bus, devfn, where));
+		_value = __get_PciCfgDataL(where & ~3);
+	}
+
+	switch (size) {
+	case 1:
+		_value = _value >> ((where & 3) * 8);
+		break;
+
+	case 2:
+		_value = _value >> ((where & 2) * 8);
+		break;
+
+	case 4:
+		break;
+
+	default:
+		BUG();
+	}
+
+	*val = _value;
+	return PCIBIOS_SUCCESSFUL;
+}
+
+static int pci_frv_write_config(struct pci_bus *bus, unsigned int devfn, int where, int size,
+				u32 value)
+{
+	switch (size) {
+	case 1:
+		if (bus->number == 0 && devfn == PCI_DEVFN(0, 0)) {
+			__set_PciBridgeDataB(where, value);
+		}
+		else {
+			__set_PciCfgAddr(CONFIG_CMD(bus, devfn, where));
+			__set_PciCfgDataB(where, value);
+		}
+		break;
+
+	case 2:
+		if (bus->number == 0 && devfn == PCI_DEVFN(0, 0)) {
+			__set_PciBridgeDataW(where, value);
+		}
+		else {
+			__set_PciCfgAddr(CONFIG_CMD(bus, devfn, where));
+			__set_PciCfgDataW(where, value);
+		}
+		break;
+
+	case 4:
+		if (bus->number == 0 && devfn == PCI_DEVFN(0, 0)) {
+			__set_PciBridgeDataL(where, value);
+		}
+		else {
+			__set_PciCfgAddr(CONFIG_CMD(bus, devfn, where));
+			__set_PciCfgDataL(where, value);
+		}
+		break;
+
+	default:
+		BUG();
+	}
+
+	return PCIBIOS_SUCCESSFUL;
+}
+
+static struct pci_ops pci_direct_frv = {
+	pci_frv_read_config,
+	pci_frv_write_config,
+};
+
+/*
+ * Before we decide to use direct hardware access mechanisms, we try to do some
+ * trivial checks to ensure it at least _seems_ to be working -- we just test
+ * whether bus 00 contains a host bridge (this is similar to checking
+ * techniques used in XFree86, but ours should be more reliable since we
+ * attempt to make use of direct access hints provided by the PCI BIOS).
+ *
+ * This should be close to trivial, but it isn't, because there are buggy
+ * chipsets (yes, you guessed it, by Intel and Compaq) that have no class ID.
+ */
+static int __init pci_sanity_check(struct pci_ops *o)
+{
+	struct pci_bus bus;		/* Fake bus and device */
+	u32 id;
+
+	bus.number	= 0;
+
+	if (o->read(&bus, 0, PCI_VENDOR_ID, 4, &id) == PCIBIOS_SUCCESSFUL) {
+		printk("PCI: VDK Bridge device:vendor: %08x\n", id);
+		if (id == 0x200e10cf)
+			return 1;
+	}
+
+	printk("PCI: VDK Bridge: Sanity check failed\n");
+	return 0;
+}
+
+static struct pci_ops * __init pci_check_direct(void)
+{
+	unsigned long flags;
+
+	local_irq_save(flags);
+
+	/* check if access works */
+	if (pci_sanity_check(&pci_direct_frv)) {
+		local_irq_restore(flags);
+		printk("PCI: Using configuration frv\n");
+//		request_mem_region(0xBE040000, 256, "FRV bridge");
+//		request_mem_region(0xBFFFFFF4, 12, "PCI frv");
+		return &pci_direct_frv;
+	}
+
+	local_irq_restore(flags);
+	return NULL;
+}
+
+/*
+ * Several buggy motherboards address only 16 devices and mirror
+ * them to next 16 IDs. We try to detect this `feature' on all
+ * primary buses (those containing host bridges as they are
+ * expected to be unique) and remove the ghost devices.
+ */
+
+static void __init pcibios_fixup_ghosts(struct pci_bus *b)
+{
+	struct list_head *ln, *mn;
+	struct pci_dev *d, *e;
+	int mirror = PCI_DEVFN(16,0);
+	int seen_host_bridge = 0;
+	int i;
+
+	for (ln=b->devices.next; ln != &b->devices; ln=ln->next) {
+		d = pci_dev_b(ln);
+		if ((d->class >> 8) == PCI_CLASS_BRIDGE_HOST)
+			seen_host_bridge++;
+		for (mn=ln->next; mn != &b->devices; mn=mn->next) {
+			e = pci_dev_b(mn);
+			if (e->devfn != d->devfn + mirror ||
+			    e->vendor != d->vendor ||
+			    e->device != d->device ||
+			    e->class != d->class)
+				continue;
+			for(i=0; i<PCI_NUM_RESOURCES; i++)
+				if (e->resource[i].start != d->resource[i].start ||
+				    e->resource[i].end != d->resource[i].end ||
+				    e->resource[i].flags != d->resource[i].flags)
+					continue;
+			break;
+		}
+		if (mn == &b->devices)
+			return;
+	}
+	if (!seen_host_bridge)
+		return;
+	printk("PCI: Ignoring ghost devices on bus %02x\n", b->number);
+
+	ln = &b->devices;
+	while (ln->next != &b->devices) {
+		d = pci_dev_b(ln->next);
+		if (d->devfn >= mirror) {
+			list_del(&d->global_list);
+			list_del(&d->bus_list);
+			kfree(d);
+		} else
+			ln = ln->next;
+	}
+}
+
+/*
+ * 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 __init pcibios_fixup_peer_bridges(void)
+{
+	struct pci_bus bus;
+	struct pci_dev dev;
+	int n;
+	u16 l;
+
+	if (pcibios_last_bus <= 0 || pcibios_last_bus >= 0xff)
+		return;
+	printk("PCI: Peer bridge fixup\n");
+	for (n=0; n <= pcibios_last_bus; n++) {
+		if (pci_find_bus(0, n))
+			continue;
+		bus.number = n;
+		bus.ops = pci_root_ops;
+		dev.bus = &bus;
+		for(dev.devfn=0; dev.devfn<256; dev.devfn += 8)
+			if (!pci_read_config_word(&dev, PCI_VENDOR_ID, &l) &&
+			    l != 0x0000 && l != 0xffff) {
+				printk("Found device at %02x:%02x [%04x]\n", n, dev.devfn, l);
+				printk("PCI: Discovered peer bus %02x\n", n);
+				pci_scan_bus(n, pci_root_ops, NULL);
+				break;
+			}
+	}
+}
+
+/*
+ * Exceptions for specific devices. Usually work-arounds for fatal design flaws.
+ */
+
+static void __init pci_fixup_umc_ide(struct pci_dev *d)
+{
+	/*
+	 * UM8886BF IDE controller sets region type bits incorrectly,
+	 * therefore they look like memory despite of them being I/O.
+	 */
+	int i;
+
+	printk("PCI: Fixing base address flags for device %s\n", d->slot_name);
+	for(i=0; i<4; i++)
+		d->resource[i].flags |= PCI_BASE_ADDRESS_SPACE_IO;
+}
+
+static void __init pci_fixup_ide_bases(struct pci_dev *d)
+{
+	int i;
+
+	/*
+	 * PCI IDE controllers use non-standard I/O port decoding, respect it.
+	 */
+	if ((d->class >> 8) != PCI_CLASS_STORAGE_IDE)
+		return;
+	printk("PCI: IDE base address fixup for %s\n", d->slot_name);
+	for(i=0; i<4; i++) {
+		struct resource *r = &d->resource[i];
+		if ((r->start & ~0x80) == 0x374) {
+			r->start |= 2;
+			r->end = r->start;
+		}
+	}
+}
+
+static void __init pci_fixup_ide_trash(struct pci_dev *d)
+{
+	int i;
+
+	/*
+	 * There exist PCI IDE controllers which have utter garbage
+	 * in first four base registers. Ignore that.
+	 */
+	printk("PCI: IDE base address trash cleared for %s\n", d->slot_name);
+	for(i=0; i<4; i++)
+		d->resource[i].start = d->resource[i].end = d->resource[i].flags = 0;
+}
+
+static void __devinit  pci_fixup_latency(struct pci_dev *d)
+{
+	/*
+	 *  SiS 5597 and 5598 chipsets require latency timer set to
+	 *  at most 32 to avoid lockups.
+	 */
+	DBG("PCI: Setting max latency to 32\n");
+	pcibios_max_latency = 32;
+}
+
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_UMC, PCI_DEVICE_ID_UMC_UM8886BF, pci_fixup_umc_ide);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5513, pci_fixup_ide_trash);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5597, pci_fixup_latency);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5598, pci_fixup_latency);
+DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pci_fixup_ide_bases);
+
+/*
+ *  Called after each bus is probed, but before its children
+ *  are examined.
+ */
+
+void __init pcibios_fixup_bus(struct pci_bus *bus)
+{
+#if 0
+	printk("### PCIBIOS_FIXUP_BUS(%d)\n",bus->number);
+#endif
+	pcibios_fixup_ghosts(bus);
+	pci_read_bridge_bases(bus);
+
+	if (bus->number == 0) {
+		struct list_head *ln;
+		struct pci_dev *dev;
+		for (ln=bus->devices.next; ln != &bus->devices; ln=ln->next) {
+			dev = pci_dev_b(ln);
+			if (dev->devfn == 0) {
+				dev->resource[0].start = 0;
+				dev->resource[0].end = 0;
+			}
+		}
+	}
+}
+
+/*
+ * Initialization. Try all known PCI access methods. Note that we support
+ * using both PCI BIOS and direct access: in such cases, we use I/O ports
+ * to access config space, but we still keep BIOS order of cards to be
+ * compatible with 2.0.X. This should go away some day.
+ */
+
+int __init pcibios_init(void)
+{
+	struct pci_ops *dir = NULL;
+
+	if (!mb93090_mb00_detected)
+		return -ENXIO;
+
+	__reg_MB86943_sl_ctl |= MB86943_SL_CTL_DRCT_MASTER_SWAP | MB86943_SL_CTL_DRCT_SLAVE_SWAP;
+
+	__reg_MB86943_ecs_base(1)	= ((__region_CS2 + 0x01000000) >> 9) | 0x08000000;
+	__reg_MB86943_ecs_base(2)	= ((__region_CS2 + 0x00000000) >> 9) | 0x08000000;
+
+	*(volatile uint32_t *) (__region_CS1 + 0x848) = 0xe0000000;
+	*(volatile uint32_t *) (__region_CS1 + 0x8b8) = 0x00000000;
+
+	__reg_MB86943_sl_pci_io_base	= (__region_CS2 + 0x04000000) >> 9;
+	__reg_MB86943_sl_pci_mem_base	= (__region_CS2 + 0x08000000) >> 9;
+	__reg_MB86943_pci_sl_io_base	= __region_CS2 + 0x04000000;
+	__reg_MB86943_pci_sl_mem_base	= __region_CS2 + 0x08000000;
+	mb();
+
+	*(volatile unsigned long *)(__region_CS2+0x01300014) == 1;
+
+	ioport_resource.start	= (__reg_MB86943_sl_pci_io_base << 9) & 0xfffffc00;
+	ioport_resource.end	= (__reg_MB86943_sl_pci_io_range << 9) | 0x3ff;
+	ioport_resource.end	+= ioport_resource.start;
+
+	printk("PCI IO window:  %08lx-%08lx\n", ioport_resource.start, ioport_resource.end);
+
+	iomem_resource.start	= (__reg_MB86943_sl_pci_mem_base << 9) & 0xfffffc00;
+
+	/* Reserve somewhere to write to flush posted writes. */
+	iomem_resource.start += 0x400;
+
+	iomem_resource.end	= (__reg_MB86943_sl_pci_mem_range << 9) | 0x3ff;
+	iomem_resource.end	+= iomem_resource.start;
+
+	printk("PCI MEM window: %08lx-%08lx\n", iomem_resource.start, iomem_resource.end);
+	printk("PCI DMA memory: %08lx-%08lx\n", dma_coherent_mem_start, dma_coherent_mem_end);
+
+	if (!pci_probe)
+		return -ENXIO;
+
+	dir = pci_check_direct();
+	if (dir)
+		pci_root_ops = dir;
+	else {
+		printk("PCI: No PCI bus detected\n");
+		return -ENXIO;
+	}
+
+	printk("PCI: Probing PCI hardware\n");
+	pci_root_bus = pci_scan_bus(0, pci_root_ops, NULL);
+
+	pcibios_irq_init();
+	pcibios_fixup_peer_bridges();
+	pcibios_fixup_irqs();
+	pcibios_resource_survey();
+
+	return 0;
+}
+
+arch_initcall(pcibios_init);
+
+char * __init pcibios_setup(char *str)
+{
+	if (!strcmp(str, "off")) {
+		pci_probe = 0;
+		return NULL;
+	} else if (!strncmp(str, "lastbus=", 8)) {
+		pcibios_last_bus = simple_strtol(str+8, NULL, 0);
+		return NULL;
+	}
+	return str;
+}
+
+int pcibios_enable_device(struct pci_dev *dev, int mask)
+{
+	int err;
+
+	if ((err = pcibios_enable_resources(dev, mask)) < 0)
+		return err;
+	pcibios_enable_irq(dev);
+	return 0;
+}
diff -Nru a/arch/frv/mm/Makefile b/arch/frv/mm/Makefile
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/mm/Makefile	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,9 @@
+#
+# Makefile for the arch-specific parts of the memory manager.
+#
+
+obj-y := init.o kmap.o
+
+obj-$(CONFIG_MMU) += \
+	pgalloc.o highmem.o fault.o extable.o cache-page.o tlb-flush.o tlb-miss.o \
+	mmu-context.o dma-alloc.o unaligned.o elf-fdpic.o
diff -Nru a/arch/frv/mm/cache-page.c b/arch/frv/mm/cache-page.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/mm/cache-page.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,66 @@
+/* cache-page.c: whole-page cache wrangling functions for MMU linux
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+#include <linux/sched.h>
+#include <linux/mm.h>
+#include <linux/highmem.h>
+#include <asm/pgalloc.h>
+
+/*****************************************************************************/
+/*
+ * DCF takes a virtual address and the page may not currently have one
+ * - temporarily hijack a kmap_atomic() slot and attach the page to it
+ */
+void flush_dcache_page(struct page *page)
+{
+	unsigned long dampr2;
+	void *vaddr;
+
+	dampr2 = __get_DAMPR(2);
+
+	vaddr = kmap_atomic(page, __KM_CACHE);
+
+	frv_dcache_writeback((unsigned long) vaddr, (unsigned long) vaddr + PAGE_SIZE);
+
+	kunmap_atomic(vaddr, __KM_CACHE);
+
+	if (dampr2) {
+		__set_DAMPR(2, dampr2);
+		__set_IAMPR(2, dampr2);
+	}
+
+} /* end flush_dcache_page() */
+
+/*****************************************************************************/
+/*
+ * ICI takes a virtual address and the page may not currently have one
+ * - so we temporarily attach the page to a bit of virtual space so that is can be flushed
+ */
+void flush_icache_user_range(struct vm_area_struct *vma, struct page *page,
+			     unsigned long start, unsigned long len)
+{
+	unsigned long dampr2;
+	void *vaddr;
+
+	dampr2 = __get_DAMPR(2);
+
+	vaddr = kmap_atomic(page, __KM_CACHE);
+
+	start = (start & ~PAGE_MASK) | (unsigned long) vaddr;
+	frv_cache_wback_inv(start, start + len);
+
+	kunmap_atomic(vaddr, __KM_CACHE);
+
+	if (dampr2) {
+		__set_DAMPR(2, dampr2);
+		__set_IAMPR(2, dampr2);
+	}
+
+} /* end flush_icache_user_range() */
diff -Nru a/arch/frv/mm/dma-alloc.c b/arch/frv/mm/dma-alloc.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/mm/dma-alloc.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,188 @@
+/* dma-alloc.c: consistent DMA memory allocation
+ *
+ * Derived from arch/ppc/mm/cachemap.c
+ *
+ *  PowerPC version derived from arch/arm/mm/consistent.c
+ *    Copyright (C) 2001 Dan Malek (dmalek@jlc.net)
+ *
+ *  linux/arch/arm/mm/consistent.c
+ *
+ *  Copyright (C) 2000 Russell King
+ *
+ * Consistent memory allocators.  Used for DMA devices that want to
+ * share uncached memory with the processor core.  The function return
+ * is the virtual address and 'dma_handle' is the physical address.
+ * Mostly stolen from the ARM port, with some changes for PowerPC.
+ *						-- Dan
+ * Modified for 36-bit support.  -Matt
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/signal.h>
+#include <linux/sched.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/string.h>
+#include <linux/types.h>
+#include <linux/ptrace.h>
+#include <linux/mman.h>
+#include <linux/mm.h>
+#include <linux/swap.h>
+#include <linux/stddef.h>
+#include <linux/vmalloc.h>
+#include <linux/init.h>
+#include <linux/pci.h>
+
+#include <asm/pgalloc.h>
+#include <asm/io.h>
+#include <asm/hardirq.h>
+#include <asm/mmu_context.h>
+#include <asm/pgtable.h>
+#include <asm/mmu.h>
+#include <asm/uaccess.h>
+#include <asm/smp.h>
+
+static int map_page(unsigned long va, unsigned long pa, pgprot_t prot)
+{
+	pgd_t *pge;
+	pud_t *pue;
+	pmd_t *pme;
+	pte_t *pte;
+	int err = -ENOMEM;
+
+	spin_lock(&init_mm.page_table_lock);
+
+	/* Use upper 10 bits of VA to index the first level map */
+	pge = pgd_offset_k(va);
+	pue = pud_offset(pge, va);
+	pme = pmd_offset(pue, va);
+
+	/* Use middle 10 bits of VA to index the second-level map */
+	pte = pte_alloc_kernel(&init_mm, pme, va);
+	if (pte != 0) {
+		err = 0;
+		set_pte(pte, mk_pte_phys(pa & PAGE_MASK, prot));
+	}
+
+	spin_unlock(&init_mm.page_table_lock);
+	return err;
+}
+
+/*
+ * This function will allocate the requested contiguous pages and
+ * map them into the kernel's vmalloc() space.  This is done so we
+ * get unique mapping for these pages, outside of the kernel's 1:1
+ * virtual:physical mapping.  This is necessary so we can cover large
+ * portions of the kernel with single large page TLB entries, and
+ * still get unique uncached pages for consistent DMA.
+ */
+void *consistent_alloc(int gfp, size_t size, dma_addr_t *dma_handle)
+{
+	struct vm_struct *area;
+	unsigned long page, va, pa;
+	void *ret;
+	int order, err, i;
+
+	if (in_interrupt())
+		BUG();
+
+	/* only allocate page size areas */
+	size = PAGE_ALIGN(size);
+	order = get_order(size);
+
+	page = __get_free_pages(gfp, order);
+	if (!page) {
+		BUG();
+		return NULL;
+	}
+
+	/* allocate some common virtual space to map the new pages */
+	area = get_vm_area(size, VM_ALLOC);
+	if (area == 0) {
+		free_pages(page, order);
+		return NULL;
+	}
+	va = VMALLOC_VMADDR(area->addr);
+	ret = (void *) va;
+
+	/* this gives us the real physical address of the first page */
+	*dma_handle = pa = virt_to_bus((void *) page);
+
+	/* set refcount=1 on all pages in an order>0 allocation so that vfree() will actually free
+	 * all pages that were allocated.
+	 */
+	if (order > 0) {
+		struct page *rpage = virt_to_page(page);
+
+		for (i = 1; i < (1 << order); i++)
+			set_page_count(rpage + i, 1);
+	}
+
+	err = 0;
+	for (i = 0; i < size && err == 0; i += PAGE_SIZE)
+		err = map_page(va + i, pa + i, PAGE_KERNEL_NOCACHE);
+
+	if (err) {
+		vfree((void *) va);
+		return NULL;
+	}
+
+	/* we need to ensure that there are no cachelines in use, or worse dirty in this area
+	 * - can't do until after virtual address mappings are created
+	 */
+	frv_cache_invalidate(va, va + size);
+
+	return ret;
+}
+
+/*
+ * free page(s) as defined by the above mapping.
+ */
+void consistent_free(void *vaddr)
+{
+	if (in_interrupt())
+		BUG();
+	vfree(vaddr);
+}
+
+/*
+ * make an area consistent.
+ */
+void consistent_sync(void *vaddr, size_t size, int direction)
+{
+	unsigned long start = (unsigned long) vaddr;
+	unsigned long end   = start + size;
+
+	switch (direction) {
+	case PCI_DMA_NONE:
+		BUG();
+	case PCI_DMA_FROMDEVICE:	/* invalidate only */
+		frv_cache_invalidate(start, end);
+		break;
+	case PCI_DMA_TODEVICE:		/* writeback only */
+		frv_dcache_writeback(start, end);
+		break;
+	case PCI_DMA_BIDIRECTIONAL:	/* writeback and invalidate */
+		frv_dcache_writeback(start, end);
+		break;
+	}
+}
+
+/*
+ * consistent_sync_page make a page are consistent. identical
+ * to consistent_sync, but takes a struct page instead of a virtual address
+ */
+
+void consistent_sync_page(struct page *page, unsigned long offset,
+			  size_t size, int direction)
+{
+	void *start;
+
+	start = page_address(page) + offset;
+	consistent_sync(start, size, direction);
+}
diff -Nru a/arch/frv/mm/elf-fdpic.c b/arch/frv/mm/elf-fdpic.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/mm/elf-fdpic.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,123 @@
+/* elf-fdpic.c: ELF FDPIC memory layout management
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/sched.h>
+#include <linux/mm.h>
+#include <linux/fs.h>
+#include <linux/elf-fdpic.h>
+
+/*****************************************************************************/
+/*
+ * lay out the userspace VM according to our grand design
+ */
+#ifdef CONFIG_MMU
+void elf_fdpic_arch_lay_out_mm(struct elf_fdpic_params *exec_params,
+			       struct elf_fdpic_params *interp_params,
+			       unsigned long *start_stack,
+			       unsigned long *start_brk)
+{
+	*start_stack = 0x02200000UL;
+
+	/* if the only executable is a shared object, assume that it is an interpreter rather than
+	 * a true executable, and map it such that "ld.so --list" comes out right
+	 */
+	if (!(interp_params->flags & ELF_FDPIC_FLAG_PRESENT) &&
+	    exec_params->hdr.e_type != ET_EXEC
+	    ) {
+		exec_params->load_addr = PAGE_SIZE;
+
+		*start_brk = 0x80000000UL;
+	}
+	else {
+		exec_params->load_addr = 0x02200000UL;
+
+		if ((exec_params->flags & ELF_FDPIC_FLAG_ARRANGEMENT) ==
+		    ELF_FDPIC_FLAG_INDEPENDENT
+		    ) {
+			exec_params->flags &= ~ELF_FDPIC_FLAG_ARRANGEMENT;
+			exec_params->flags |= ELF_FDPIC_FLAG_CONSTDISP;
+		}
+	}
+
+} /* end elf_fdpic_arch_lay_out_mm() */
+#endif
+
+/*****************************************************************************/
+/*
+ * place non-fixed mmaps firstly in the bottom part of memory, working up, and then in the top part
+ * of memory, working down
+ */
+unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsigned long len,
+				     unsigned long pgoff, unsigned long flags)
+{
+	struct vm_area_struct *vma;
+	unsigned long limit;
+
+	if (len > TASK_SIZE)
+		return -ENOMEM;
+
+	/* only honour a hint if we're not going to clobber something doing so */
+	if (addr) {
+		addr = PAGE_ALIGN(addr);
+		vma = find_vma(current->mm, addr);
+		if (TASK_SIZE - len >= addr &&
+		    (!vma || addr + len <= vma->vm_start))
+			goto success;
+	}
+
+	/* search between the bottom of user VM and the stack grow area */
+	addr = PAGE_SIZE;
+	limit = (current->mm->start_stack - 0x00200000);
+	if (addr + len <= limit) {
+		limit -= len;
+
+		if (addr <= limit) {
+			vma = find_vma(current->mm, PAGE_SIZE);
+			for (; vma; vma = vma->vm_next) {
+				if (addr > limit)
+					break;
+				if (addr + len <= vma->vm_start)
+					goto success;
+				addr = vma->vm_end;
+			}
+		}
+	}
+
+	/* search from just above the WorkRAM area to the top of memory */
+	addr = PAGE_ALIGN(0x80000000);
+	limit = TASK_SIZE - len;
+	if (addr <= limit) {
+		vma = find_vma(current->mm, addr);
+		for (; vma; vma = vma->vm_next) {
+			if (addr > limit)
+				break;
+			if (addr + len <= vma->vm_start)
+				goto success;
+			addr = vma->vm_end;
+		}
+
+		if (!vma && addr <= limit)
+			goto success;
+	}
+
+#if 0
+	printk("[area] l=%lx (ENOMEM) f='%s'\n",
+	       len, filp ? filp->f_dentry->d_name.name : "");
+#endif
+	return -ENOMEM;
+
+ success:
+#if 0
+	printk("[area] l=%lx ad=%lx f='%s'\n",
+	       len, addr, filp ? filp->f_dentry->d_name.name : "");
+#endif
+	return addr;
+} /* end arch_get_unmapped_area() */
diff -Nru a/arch/frv/mm/extable.c b/arch/frv/mm/extable.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/mm/extable.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,91 @@
+/*
+ * linux/arch/frv/mm/extable.c
+ */
+
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/spinlock.h>
+#include <asm/uaccess.h>
+
+extern const struct exception_table_entry __attribute__((aligned(8))) __start___ex_table[];
+extern const struct exception_table_entry __attribute__((aligned(8))) __stop___ex_table[];
+extern const void __memset_end, __memset_user_error_lr, __memset_user_error_handler;
+extern const void __memcpy_end, __memcpy_user_error_lr, __memcpy_user_error_handler;
+extern spinlock_t modlist_lock;
+
+/*****************************************************************************/
+/*
+ *
+ */
+static inline unsigned long search_one_table(const struct exception_table_entry *first,
+					     const struct exception_table_entry *last,
+					     unsigned long value)
+{
+        while (first <= last) {
+		const struct exception_table_entry __attribute__((aligned(8))) *mid;
+		long diff;
+
+		mid = (last - first) / 2 + first;
+		diff = mid->insn - value;
+                if (diff == 0)
+                        return mid->fixup;
+                else if (diff < 0)
+                        first = mid + 1;
+                else
+                        last = mid - 1;
+        }
+        return 0;
+} /* end search_one_table() */
+
+/*****************************************************************************/
+/*
+ * see if there's a fixup handler available to deal with a kernel fault
+ */
+unsigned long search_exception_table(unsigned long pc)
+{
+	unsigned long ret = 0;
+
+	/* determine if the fault lay during a memcpy_user or a memset_user */
+	if (__frame->lr == (unsigned long) &__memset_user_error_lr &&
+	    (unsigned long) &memset <= pc && pc < (unsigned long) &__memset_end
+	    ) {
+		/* the fault occurred in a protected memset
+		 * - we search for the return address (in LR) instead of the program counter
+		 * - it was probably during a clear_user()
+		 */
+		return (unsigned long) &__memset_user_error_handler;
+	}
+	else if (__frame->lr == (unsigned long) &__memcpy_user_error_lr &&
+		 (unsigned long) &memcpy <= pc && pc < (unsigned long) &__memcpy_end
+		 ) {
+		/* the fault occurred in a protected memset
+		 * - we search for the return address (in LR) instead of the program counter
+		 * - it was probably during a copy_to/from_user()
+		 */
+		return (unsigned long) &__memcpy_user_error_handler;
+	}
+
+#ifndef CONFIG_MODULES
+	/* there is only the kernel to search.  */
+	ret = search_one_table(__start___ex_table, __stop___ex_table - 1, pc);
+	return ret;
+
+#else
+	/* the kernel is the last "module" -- no need to treat it special */
+	unsigned long flags;
+	struct module *mp;
+
+	spin_lock_irqsave(&modlist_lock, flags);
+
+	for (mp = module_list; mp != NULL; mp = mp->next) {
+		if (mp->ex_table_start == NULL || !(mp->flags & (MOD_RUNNING | MOD_INITIALIZING)))
+			continue;
+		ret = search_one_table(mp->ex_table_start, mp->ex_table_end - 1, pc);
+		if (ret)
+			break;
+	}
+
+	spin_unlock_irqrestore(&modlist_lock, flags);
+	return ret;
+#endif
+} /* end search_exception_table() */
diff -Nru a/arch/frv/mm/fault.c b/arch/frv/mm/fault.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/mm/fault.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,325 @@
+/*
+ *  linux/arch/frv/mm/fault.c
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * - Written by David Howells (dhowells@redhat.com)
+ * - Derived from arch/m68knommu/mm/fault.c
+ *   - Copyright (C) 1998  D. Jeff Dionne <jeff@lineo.ca>,
+ *   - Copyright (C) 2000  Lineo, Inc.  (www.lineo.com)
+ *
+ *  Based on:
+ *
+ *  linux/arch/m68k/mm/fault.c
+ *
+ *  Copyright (C) 1995  Hamish Macdonald
+ */
+
+#include <linux/mman.h>
+#include <linux/mm.h>
+#include <linux/kernel.h>
+#include <linux/ptrace.h>
+#include <linux/hardirq.h>
+
+#include <asm/system.h>
+#include <asm/pgtable.h>
+#include <asm/uaccess.h>
+#include <asm/gdb-stub.h>
+
+/*****************************************************************************/
+/*
+ * This routine handles page faults.  It determines the problem, and
+ * then passes it off to one of the appropriate routines.
+ */
+asmlinkage void do_page_fault(int datammu, unsigned long esr0, unsigned long ear0)
+{
+	struct vm_area_struct *vma;
+	struct mm_struct *mm;
+	unsigned long _pme, lrai, lrad, fixup;
+	siginfo_t info;
+	pgd_t *pge;
+	pud_t *pue;
+	pte_t *pte;
+	int write;
+
+#if 0
+	const char *atxc[16] = {
+		[0x0] = "mmu-miss", [0x8] = "multi-dat", [0x9] = "multi-sat",
+		[0xa] = "tlb-miss", [0xc] = "privilege", [0xd] = "write-prot",
+	};
+
+	printk("do_page_fault(%d,%lx [%s],%lx)\n",
+	       datammu, esr0, atxc[esr0 >> 20 & 0xf], ear0);
+#endif
+
+	mm = current->mm;
+
+	/*
+	 * We fault-in kernel-space virtual memory on-demand. The
+	 * 'reference' page table is init_mm.pgd.
+	 *
+	 * NOTE! We MUST NOT take any locks for this case. We may
+	 * be in an interrupt or a critical region, and should
+	 * only copy the information from the master page table,
+	 * nothing more.
+	 *
+	 * This verifies that the fault happens in kernel space
+	 * and that the fault was a page not present (invalid) error
+	 */
+	if (!user_mode(__frame) && (esr0 & ESR0_ATXC) == ESR0_ATXC_AMRTLB_MISS) {
+		if (ear0 >= VMALLOC_START && ear0 < VMALLOC_END)
+			goto kernel_pte_fault;
+		if (ear0 >= PKMAP_BASE && ear0 < PKMAP_END)
+			goto kernel_pte_fault;
+	}
+
+	info.si_code = SEGV_MAPERR;
+
+	/*
+	 * If we're in an interrupt or have no user
+	 * context, we must not take the fault..
+	 */
+	if (in_interrupt() || !mm)
+		goto no_context;
+
+	down_read(&mm->mmap_sem);
+
+	vma = find_vma(mm, ear0);
+	if (!vma)
+		goto bad_area;
+	if (vma->vm_start <= ear0)
+		goto good_area;
+	if (!(vma->vm_flags & VM_GROWSDOWN))
+		goto bad_area;
+
+	if (user_mode(__frame)) {
+		/*
+		 * accessing the stack below %esp is always a bug.
+		 * The "+ 32" is there due to some instructions (like
+		 * pusha) doing post-decrement on the stack and that
+		 * doesn't show up until later..
+		 */
+		if ((ear0 & PAGE_MASK) + 2 * PAGE_SIZE < __frame->sp) {
+#if 0
+			printk("[%d] ### Access below stack @%lx (sp=%lx)\n",
+			       current->pid, ear0, __frame->sp);
+			show_registers(__frame);
+			printk("[%d] ### Code: [%08lx] %02x %02x %02x %02x %02x %02x %02x %02x\n",
+			       current->pid,
+			       __frame->pc,
+			       ((u8*)__frame->pc)[0],
+			       ((u8*)__frame->pc)[1],
+			       ((u8*)__frame->pc)[2],
+			       ((u8*)__frame->pc)[3],
+			       ((u8*)__frame->pc)[4],
+			       ((u8*)__frame->pc)[5],
+			       ((u8*)__frame->pc)[6],
+			       ((u8*)__frame->pc)[7]
+			       );
+#endif
+			goto bad_area;
+		}
+	}
+
+	if (expand_stack(vma, ear0))
+		goto bad_area;
+
+/*
+ * Ok, we have a good vm_area for this memory access, so
+ * we can handle it..
+ */
+ good_area:
+	info.si_code = SEGV_ACCERR;
+	write = 0;
+	switch (esr0 & ESR0_ATXC) {
+	default:
+		/* handle write to write protected page */
+	case ESR0_ATXC_WP_EXCEP:
+#ifdef TEST_VERIFY_AREA
+		if (!(user_mode(__frame)))
+			printk("WP fault at %08lx\n", __frame->pc);
+#endif
+		if (!(vma->vm_flags & VM_WRITE))
+			goto bad_area;
+		write = 1;
+		break;
+
+		 /* handle read from protected page */
+	case ESR0_ATXC_PRIV_EXCEP:
+		goto bad_area;
+
+		 /* handle read, write or exec on absent page
+		  * - can't support write without permitting read
+		  * - don't support execute without permitting read and vice-versa
+		  */
+	case ESR0_ATXC_AMRTLB_MISS:
+		if (!(vma->vm_flags & (VM_READ | VM_WRITE | VM_EXEC)))
+			goto bad_area;
+		break;
+	}
+
+	/*
+	 * If for any reason at all we couldn't handle the fault,
+	 * make sure we exit gracefully rather than endlessly redo
+	 * the fault.
+	 */
+	switch (handle_mm_fault(mm, vma, ear0, write)) {
+	case 1:
+		current->min_flt++;
+		break;
+	case 2:
+		current->maj_flt++;
+		break;
+	case 0:
+		goto do_sigbus;
+	default:
+		goto out_of_memory;
+	}
+
+	up_read(&mm->mmap_sem);
+	return;
+
+/*
+ * Something tried to access memory that isn't in our memory map..
+ * Fix it, but check if it's kernel or user first..
+ */
+ bad_area:
+	up_read(&mm->mmap_sem);
+
+	/* User mode accesses just cause a SIGSEGV */
+	if (user_mode(__frame)) {
+		info.si_signo = SIGSEGV;
+		info.si_errno = 0;
+		/* info.si_code has been set above */
+		info.si_addr = (void *) ear0;
+		force_sig_info(SIGSEGV, &info, current);
+		return;
+	}
+
+ no_context:
+	/* are we prepared to handle this kernel fault? */
+	if ((fixup = search_exception_table(__frame->pc)) != 0) {
+		__frame->pc = fixup;
+		return;
+	}
+
+/*
+ * Oops. The kernel tried to access some bad page. We'll have to
+ * terminate things with extreme prejudice.
+ */
+
+	bust_spinlocks(1);
+
+	if (ear0 < PAGE_SIZE)
+		printk(KERN_ALERT "Unable to handle kernel NULL pointer dereference");
+	else
+		printk(KERN_ALERT "Unable to handle kernel paging request");
+	printk(" at virtual addr %08lx\n", ear0);
+	printk("  PC  : %08lx\n", __frame->pc);
+	printk("  EXC : esr0=%08lx ear0=%08lx\n", esr0, ear0);
+
+	asm("lrai %1,%0,#1,#0,#0" : "=&r"(lrai) : "r"(ear0));
+	asm("lrad %1,%0,#1,#0,#0" : "=&r"(lrad) : "r"(ear0));
+
+	printk(KERN_ALERT "  LRAI: %08lx\n", lrai);
+	printk(KERN_ALERT "  LRAD: %08lx\n", lrad);
+
+	__break_hijack_kernel_event();
+
+	pge = pgd_offset(current->mm, ear0);
+	pue = pud_offset(pge, ear0);
+	_pme = pue->pue[0].ste[0];
+
+	printk(KERN_ALERT "  PGE : %8p { PME %08lx }\n", pge, _pme);
+
+	if (_pme & xAMPRx_V) {
+		unsigned long dampr, damlr, val;
+
+		asm volatile("movsg dampr2,%0 ! movgs %2,dampr2 ! movsg damlr2,%1"
+			     : "=&r"(dampr), "=r"(damlr)
+			     : "r" (_pme | xAMPRx_L|xAMPRx_SS_16Kb|xAMPRx_S|xAMPRx_C|xAMPRx_V)
+			     );
+
+		pte = (pte_t *) damlr + __pte_index(ear0);
+		val = pte_val(*pte);
+
+		asm volatile("movgs %0,dampr2" :: "r" (dampr));
+
+		printk(KERN_ALERT "  PTE : %8p { %08lx }\n", pte, val);
+	}
+
+	die_if_kernel("Oops\n");
+	do_exit(SIGKILL);
+
+/*
+ * We ran out of memory, or some other thing happened to us that made
+ * us unable to handle the page fault gracefully.
+ */
+ out_of_memory:
+	up_read(&mm->mmap_sem);
+	printk("VM: killing process %s\n", current->comm);
+	if (user_mode(__frame))
+		do_exit(SIGKILL);
+	goto no_context;
+
+ do_sigbus:
+	up_read(&mm->mmap_sem);
+
+	/*
+	 * Send a sigbus, regardless of whether we were in kernel
+	 * or user mode.
+	 */
+	info.si_signo = SIGBUS;
+	info.si_errno = 0;
+	info.si_code = BUS_ADRERR;
+	info.si_addr = (void *) ear0;
+	force_sig_info(SIGBUS, &info, current);
+
+	/* Kernel mode? Handle exceptions or die */
+	if (!user_mode(__frame))
+		goto no_context;
+	return;
+
+/*
+ * The fault was caused by a kernel PTE (such as installed by vmalloc or kmap)
+ */
+ kernel_pte_fault:
+	{
+		/*
+		 * Synchronize this task's top level page-table
+		 * with the 'reference' page table.
+		 *
+		 * Do _not_ use "tsk" here. We might be inside
+		 * an interrupt in the middle of a task switch..
+		 */
+		int index = pgd_index(ear0);
+		pgd_t *pgd, *pgd_k;
+		pud_t *pud, *pud_k;
+		pmd_t *pmd, *pmd_k;
+		pte_t *pte_k;
+
+		pgd = (pgd_t *) __get_TTBR();
+		pgd = (pgd_t *)__va(pgd) + index;
+		pgd_k = ((pgd_t *)(init_mm.pgd)) + index;
+
+		if (!pgd_present(*pgd_k))
+			goto no_context;
+		//set_pgd(pgd, *pgd_k); /////// gcc ICE's on this line
+
+		pud_k = pud_offset(pgd_k, ear0);
+		if (!pud_present(*pud_k))
+			goto no_context;
+
+		pmd_k = pmd_offset(pud_k, ear0);
+		if (!pmd_present(*pmd_k))
+			goto no_context;
+
+		pud = pud_offset(pgd, ear0);
+		pmd = pmd_offset(pud, ear0);
+		set_pmd(pmd, *pmd_k);
+
+		pte_k = pte_offset_kernel(pmd_k, ear0);
+		if (!pte_present(*pte_k))
+			goto no_context;
+		return;
+	}
+} /* end do_page_fault() */
diff -Nru a/arch/frv/mm/highmem.c b/arch/frv/mm/highmem.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/mm/highmem.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,33 @@
+/* highmem.c: arch-specific highmem stuff
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+#include <linux/highmem.h>
+
+void *kmap(struct page *page)
+{
+	might_sleep();
+	if (!PageHighMem(page))
+		return page_address(page);
+	return kmap_high(page);
+}
+
+void kunmap(struct page *page)
+{
+	if (in_interrupt())
+		BUG();
+	if (!PageHighMem(page))
+		return;
+	kunmap_high(page);
+}
+
+struct page *kmap_atomic_to_page(void *ptr)
+{
+	return virt_to_page(ptr);
+}
diff -Nru a/arch/frv/mm/init.c b/arch/frv/mm/init.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/mm/init.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,241 @@
+/* init.c: memory initialisation for FRV
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ *
+ * Derived from:
+ *  - linux/arch/m68knommu/mm/init.c
+ *    - Copyright (C) 1998  D. Jeff Dionne <jeff@lineo.ca>, Kenneth Albanowski <kjahds@kjahds.com>,
+ *    - Copyright (C) 2000  Lineo, Inc.  (www.lineo.com)
+ *  - linux/arch/m68k/mm/init.c
+ *    - Copyright (C) 1995  Hamish Macdonald
+ */
+
+#include <linux/config.h>
+#include <linux/signal.h>
+#include <linux/sched.h>
+#include <linux/pagemap.h>
+#include <linux/swap.h>
+#include <linux/mm.h>
+#include <linux/kernel.h>
+#include <linux/string.h>
+#include <linux/types.h>
+#include <linux/bootmem.h>
+#include <linux/highmem.h>
+
+#include <asm/setup.h>
+#include <asm/segment.h>
+#include <asm/page.h>
+#include <asm/pgtable.h>
+#include <asm/system.h>
+#include <asm/mmu_context.h>
+#include <asm/virtconvert.h>
+#include <asm/sections.h>
+#include <asm/tlb.h>
+
+#undef DEBUG
+
+DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
+
+/*
+ * 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 a 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.
+ */
+static unsigned long empty_bad_page_table;
+static unsigned long empty_bad_page;
+unsigned long empty_zero_page;
+
+/*****************************************************************************/
+/*
+ *
+ */
+void show_mem(void)
+{
+	unsigned long i;
+	int free = 0, total = 0, reserved = 0, shared = 0;
+
+	printk("\nMem-info:\n");
+	show_free_areas();
+	i = max_mapnr;
+	while (i-- > 0) {
+		struct page *page = &mem_map[i];
+
+		total++;
+		if (PageReserved(page))
+			reserved++;
+		else if (!page_count(page))
+			free++;
+		else
+			shared += page_count(page) - 1;
+	}
+
+	printk("%d pages of RAM\n",total);
+	printk("%d free pages\n",free);
+	printk("%d reserved pages\n",reserved);
+	printk("%d pages shared\n",shared);
+
+} /* end show_mem() */
+
+/*****************************************************************************/
+/*
+ * paging_init() continues the virtual memory environment setup which
+ * was begun by the code in arch/head.S.
+ * The parameters are pointers to where to stick the starting and ending
+ * addresses  of available kernel virtual memory.
+ */
+void __init paging_init(void)
+{
+	unsigned long zones_size[MAX_NR_ZONES] = {0, 0, 0};
+
+	/* allocate some pages for kernel housekeeping tasks */
+	empty_bad_page_table	= (unsigned long) alloc_bootmem_pages(PAGE_SIZE);
+	empty_bad_page		= (unsigned long) alloc_bootmem_pages(PAGE_SIZE);
+	empty_zero_page		= (unsigned long) alloc_bootmem_pages(PAGE_SIZE);
+
+	memset((void *) empty_zero_page, 0, PAGE_SIZE);
+
+#if CONFIG_HIGHMEM
+	if (num_physpages - num_mappedpages) {
+		pgd_t *pge;
+		pud_t *pue;
+		pmd_t *pme;
+
+		pkmap_page_table = alloc_bootmem_pages(PAGE_SIZE);
+
+		memset(pkmap_page_table, 0, PAGE_SIZE);
+
+		pge = swapper_pg_dir + pgd_index_k(PKMAP_BASE);
+		pue = pud_offset(pge, PKMAP_BASE);
+		pme = pmd_offset(pue, PKMAP_BASE);
+		__set_pmd(pme, virt_to_phys(pkmap_page_table) | _PAGE_TABLE);
+	}
+#endif
+
+	/* distribute the allocatable pages across the various zones and pass them to the allocator
+	 */
+	zones_size[ZONE_DMA]     = max_low_pfn - min_low_pfn;
+	zones_size[ZONE_NORMAL]  = 0;
+#ifdef CONFIG_HIGHMEM
+	zones_size[ZONE_HIGHMEM] = num_physpages - num_mappedpages;
+#endif
+
+	free_area_init(zones_size);
+
+#ifdef CONFIG_MMU
+	/* initialise init's MMU context */
+	init_new_context(&init_task, &init_mm);
+#endif
+
+} /* end paging_init() */
+
+/*****************************************************************************/
+/*
+ *
+ */
+void __init mem_init(void)
+{
+	unsigned long npages = (memory_end - memory_start) >> PAGE_SHIFT;
+	unsigned long tmp;
+#ifdef CONFIG_MMU
+	unsigned long loop, pfn;
+	int datapages = 0;
+#endif
+	int codek = 0, datak = 0;
+
+	/* this will put all memory onto the freelists */
+	totalram_pages = free_all_bootmem();
+
+#ifdef CONFIG_MMU
+	for (loop = 0 ; loop < npages ; loop++)
+		if (PageReserved(&mem_map[loop]))
+			datapages++;
+
+#ifdef CONFIG_HIGHMEM
+	for (pfn = num_physpages - 1; pfn >= num_mappedpages; pfn--) {
+		struct page *page = &mem_map[pfn];
+
+		ClearPageReserved(page);
+		set_bit(PG_highmem, &page->flags);
+		set_page_count(page, 1);
+		__free_page(page);
+		totalram_pages++;
+	}
+#endif
+
+	codek = ((unsigned long) &_etext - (unsigned long) &_stext) >> 10;
+	datak = datapages << (PAGE_SHIFT - 10);
+
+#else
+	codek = (_etext - _stext) >> 10;
+	datak = 0; //(_ebss - _sdata) >> 10;
+#endif
+
+	tmp = nr_free_pages() << PAGE_SHIFT;
+	printk("Memory available: %luKiB/%luKiB RAM, %luKiB/%luKiB ROM (%dKiB kernel code, %dKiB data)\n",
+	       tmp >> 10,
+	       npages << (PAGE_SHIFT - 10),
+	       (rom_length > 0) ? ((rom_length >> 10) - codek) : 0,
+	       rom_length >> 10,
+	       codek,
+	       datak
+	       );
+
+} /* end mem_init() */
+
+/*****************************************************************************/
+/*
+ * free the memory that was only required for initialisation
+ */
+void __init free_initmem(void)
+{
+#if defined(CONFIG_RAMKERNEL) && !defined(CONFIG_PROTECT_KERNEL)
+	unsigned long start, end, addr;
+
+	start = PAGE_ALIGN((unsigned long) &__init_begin);	/* round up */
+	end   = ((unsigned long) &__init_end) & PAGE_MASK;	/* round down */
+
+	/* next to check that the page we free is not a partial page */
+	for (addr = start; addr < end; addr += PAGE_SIZE) {
+		ClearPageReserved(virt_to_page(addr));
+		set_page_count(virt_to_page(addr), 1);
+		free_page(addr);
+		totalram_pages++;
+	}
+
+	printk("Freeing unused kernel memory: %ldKiB freed (0x%lx - 0x%lx)\n",
+	       (end - start) >> 10, start, end);
+#endif
+} /* end free_initmem() */
+
+/*****************************************************************************/
+/*
+ * free the initial ramdisk memory
+ */
+#ifdef CONFIG_BLK_DEV_INITRD
+void __init free_initrd_mem(unsigned long start, unsigned long end)
+{
+	int pages = 0;
+	for (; start < end; start += PAGE_SIZE) {
+		ClearPageReserved(virt_to_page(start));
+		set_page_count(virt_to_page(start), 1);
+		free_page(start);
+		totalram_pages++;
+		pages++;
+	}
+	printk("Freeing initrd memory: %dKiB freed\n", (pages * PAGE_SIZE) >> 10);
+} /* end free_initrd_mem() */
+#endif
diff -Nru a/arch/frv/mm/kmap.c b/arch/frv/mm/kmap.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/mm/kmap.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,62 @@
+/* kmap.c: ioremapping handlers
+ *
+ * Copyright (C) 2003-5 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ * - Derived from arch/m68k/mm/kmap.c
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/config.h>
+#include <linux/mm.h>
+#include <linux/kernel.h>
+#include <linux/string.h>
+#include <linux/types.h>
+#include <linux/vmalloc.h>
+
+#include <asm/setup.h>
+#include <asm/segment.h>
+#include <asm/page.h>
+#include <asm/pgalloc.h>
+#include <asm/io.h>
+#include <asm/system.h>
+
+#undef DEBUG
+
+/*****************************************************************************/
+/*
+ * Map some physical address range into the kernel address space.
+ */
+
+void *__ioremap(unsigned long physaddr, unsigned long size, int cacheflag)
+{
+	return (void *)physaddr;
+}
+
+/*
+ * Unmap a ioremap()ed region again
+ */
+void iounmap(void *addr)
+{
+}
+
+/*
+ * __iounmap unmaps nearly everything, so be careful
+ * it doesn't free currently pointer/page tables anymore but it
+ * wans't used anyway and might be added later.
+ */
+void __iounmap(void *addr, unsigned long size)
+{
+}
+
+/*
+ * Set new cache mode for some kernel address space.
+ * The caller must push data for that range itself, if such data may already
+ * be in the cache.
+ */
+void kernel_set_cachemode(void *addr, unsigned long size, int cmode)
+{
+}
diff -Nru a/arch/frv/mm/mmu-context.c b/arch/frv/mm/mmu-context.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/mm/mmu-context.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,208 @@
+/* mmu-context.c: MMU context allocation and management
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/sched.h>
+#include <linux/mm.h>
+#include <asm/tlbflush.h>
+
+#define NR_CXN	4096
+
+static unsigned long cxn_bitmap[NR_CXN / (sizeof(unsigned long) * 8)];
+static LIST_HEAD(cxn_owners_lru);
+static spinlock_t cxn_owners_lock = SPIN_LOCK_UNLOCKED;
+
+int __nongpreldata cxn_pinned = -1;
+
+
+/*****************************************************************************/
+/*
+ * initialise a new context
+ */
+int init_new_context(struct task_struct *tsk, struct mm_struct *mm)
+{
+	memset(&mm->context, 0, sizeof(mm->context));
+	INIT_LIST_HEAD(&mm->context.id_link);
+	mm->context.itlb_cached_pge = 0xffffffffUL;
+	mm->context.dtlb_cached_pge = 0xffffffffUL;
+
+	return 0;
+} /* end init_new_context() */
+
+/*****************************************************************************/
+/*
+ * make sure a kernel MMU context has a CPU context number
+ * - call with cxn_owners_lock held
+ */
+static unsigned get_cxn(mm_context_t *ctx)
+{
+	struct list_head *_p;
+	mm_context_t *p;
+	unsigned cxn;
+
+	if (!list_empty(&ctx->id_link)) {
+		list_move_tail(&ctx->id_link, &cxn_owners_lru);
+	}
+	else {
+		/* find the first unallocated context number
+		 * - 0 is reserved for the kernel
+		 */
+		cxn = find_next_zero_bit(&cxn_bitmap, NR_CXN, 1);
+		if (cxn < NR_CXN) {
+			set_bit(cxn, &cxn_bitmap);
+		}
+		else {
+			/* none remaining - need to steal someone else's cxn */
+			p = NULL;
+			list_for_each(_p, &cxn_owners_lru) {
+				p = list_entry(_p, mm_context_t, id_link);
+				if (!p->id_busy && p->id != cxn_pinned)
+					break;
+			}
+
+			BUG_ON(_p == &cxn_owners_lru);
+
+			cxn = p->id;
+			p->id = 0;
+			list_del_init(&p->id_link);
+			__flush_tlb_mm(cxn);
+		}
+
+		ctx->id = cxn;
+		list_add_tail(&ctx->id_link, &cxn_owners_lru);
+	}
+
+	return ctx->id;
+} /* end get_cxn() */
+
+/*****************************************************************************/
+/*
+ * restore the current TLB miss handler mapped page tables into the MMU context and set up a
+ * mapping for the page directory
+ */
+void change_mm_context(mm_context_t *old, mm_context_t *ctx, pgd_t *pgd)
+{
+	unsigned long _pgd;
+
+	_pgd = virt_to_phys(pgd);
+
+	/* save the state of the outgoing MMU context */
+	old->id_busy = 0;
+
+	asm volatile("movsg scr0,%0"   : "=r"(old->itlb_cached_pge));
+	asm volatile("movsg dampr4,%0" : "=r"(old->itlb_ptd_mapping));
+	asm volatile("movsg scr1,%0"   : "=r"(old->dtlb_cached_pge));
+	asm volatile("movsg dampr5,%0" : "=r"(old->dtlb_ptd_mapping));
+
+	/* select an MMU context number */
+	spin_lock(&cxn_owners_lock);
+	get_cxn(ctx);
+	ctx->id_busy = 1;
+	spin_unlock(&cxn_owners_lock);
+
+	asm volatile("movgs %0,cxnr"   : : "r"(ctx->id));
+
+	/* restore the state of the incoming MMU context */
+	asm volatile("movgs %0,scr0"   : : "r"(ctx->itlb_cached_pge));
+	asm volatile("movgs %0,dampr4" : : "r"(ctx->itlb_ptd_mapping));
+	asm volatile("movgs %0,scr1"   : : "r"(ctx->dtlb_cached_pge));
+	asm volatile("movgs %0,dampr5" : : "r"(ctx->dtlb_ptd_mapping));
+
+	/* map the PGD into uncached virtual memory */
+	asm volatile("movgs %0,ttbr"   : : "r"(_pgd));
+	asm volatile("movgs %0,dampr3"
+		     :: "r"(_pgd | xAMPRx_L | xAMPRx_M | xAMPRx_SS_16Kb |
+			    xAMPRx_S | xAMPRx_C | xAMPRx_V));
+
+} /* end change_mm_context() */
+
+/*****************************************************************************/
+/*
+ * finished with an MMU context number
+ */
+void destroy_context(struct mm_struct *mm)
+{
+	mm_context_t *ctx = &mm->context;
+
+	spin_lock(&cxn_owners_lock);
+
+	if (!list_empty(&ctx->id_link)) {
+		if (ctx->id == cxn_pinned)
+			cxn_pinned = -1;
+
+		list_del_init(&ctx->id_link);
+		clear_bit(ctx->id, &cxn_bitmap);
+		__flush_tlb_mm(ctx->id);
+		ctx->id = 0;
+	}
+
+	spin_unlock(&cxn_owners_lock);
+} /* end destroy_context() */
+
+/*****************************************************************************/
+/*
+ * display the MMU context currently a process is currently using
+ */
+#ifdef CONFIG_PROC_FS
+char *proc_pid_status_frv_cxnr(struct mm_struct *mm, char *buffer)
+{
+	spin_lock(&cxn_owners_lock);
+	buffer += sprintf(buffer, "CXNR: %u\n", mm->context.id);
+	spin_unlock(&cxn_owners_lock);
+
+	return buffer;
+} /* end proc_pid_status_frv_cxnr() */
+#endif
+
+/*****************************************************************************/
+/*
+ * (un)pin a process's mm_struct's MMU context ID
+ */
+int cxn_pin_by_pid(pid_t pid)
+{
+	struct task_struct *tsk;
+	struct mm_struct *mm = NULL;
+	int ret;
+
+	/* unpin if pid is zero */
+	if (pid == 0) {
+		cxn_pinned = -1;
+		return 0;
+	}
+
+	ret = -ESRCH;
+
+	/* get a handle on the mm_struct */
+	read_lock(&tasklist_lock);
+	tsk = find_task_by_pid(pid);
+	if (tsk) {
+		ret = -EINVAL;
+
+		task_lock(tsk);
+		if (tsk->mm) {
+			mm = tsk->mm;
+			atomic_inc(&mm->mm_users);
+			ret = 0;
+		}
+		task_unlock(tsk);
+	}
+	read_unlock(&tasklist_lock);
+
+	if (ret < 0)
+		return ret;
+
+	/* make sure it has a CXN and pin it */
+	spin_lock(&cxn_owners_lock);
+	cxn_pinned = get_cxn(&mm->context);
+	spin_unlock(&cxn_owners_lock);
+
+	mmput(mm);
+	return 0;
+} /* end cxn_pin_by_pid() */
diff -Nru a/arch/frv/mm/pgalloc.c b/arch/frv/mm/pgalloc.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/mm/pgalloc.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,159 @@
+/* pgalloc.c: page directory & page table allocation
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/sched.h>
+#include <linux/slab.h>
+#include <linux/mm.h>
+#include <linux/highmem.h>
+#include <asm/pgalloc.h>
+#include <asm/page.h>
+#include <asm/cacheflush.h>
+
+pgd_t swapper_pg_dir[PTRS_PER_PGD] __attribute__((aligned(PAGE_SIZE)));
+kmem_cache_t *pgd_cache;
+
+pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address)
+{
+	pte_t *pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT);
+	if (pte)
+		clear_page(pte);
+	return pte;
+}
+
+struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address)
+{
+	struct page *page;
+
+#ifdef CONFIG_HIGHPTE
+	page = alloc_pages(GFP_KERNEL|__GFP_HIGHMEM|__GFP_REPEAT, 0);
+#else
+	page = alloc_pages(GFP_KERNEL|__GFP_REPEAT, 0);
+#endif
+	if (page)
+		clear_highpage(page);
+	flush_dcache_page(page);
+	return page;
+}
+
+void __set_pmd(pmd_t *pmdptr, unsigned long pmd)
+{
+	unsigned long *__ste_p = pmdptr->ste;
+	int loop;
+
+	if (!pmd) {
+		memset(__ste_p, 0, PME_SIZE);
+	}
+	else {
+		BUG_ON(pmd & (0x3f00 | xAMPRx_SS | 0xe));
+
+		for (loop = PME_SIZE; loop > 0; loop -= 4) {
+			*__ste_p++ = pmd;
+			pmd += __frv_PT_SIZE;
+		}
+	}
+
+	frv_dcache_writeback((unsigned long) pmdptr, (unsigned long) (pmdptr + 1));
+}
+
+/*
+ * List of all pgd's needed for non-PAE so it can invalidate entries
+ * in both cached and uncached pgd's; not needed for PAE since the
+ * kernel pmd is shared. If PAE were not to share the pmd a similar
+ * tactic would be needed. This is essentially codepath-based locking
+ * against pageattr.c; it is the unique case in which a valid change
+ * of kernel pagetables can't be lazily synchronized by vmalloc faults.
+ * vmalloc faults work because attached pagetables are never freed.
+ * If the locking proves to be non-performant, a ticketing scheme with
+ * checks at dup_mmap(), exec(), and other mmlist addition points
+ * could be used. The locking scheme was chosen on the basis of
+ * manfred's recommendations and having no core impact whatsoever.
+ * -- wli
+ */
+spinlock_t pgd_lock = SPIN_LOCK_UNLOCKED;
+struct page *pgd_list;
+
+static inline void pgd_list_add(pgd_t *pgd)
+{
+	struct page *page = virt_to_page(pgd);
+	page->index = (unsigned long) pgd_list;
+	if (pgd_list)
+		pgd_list->private = (unsigned long) &page->index;
+	pgd_list = page;
+	page->private = (unsigned long) &pgd_list;
+}
+
+static inline void pgd_list_del(pgd_t *pgd)
+{
+	struct page *next, **pprev, *page = virt_to_page(pgd);
+	next = (struct page *) page->index;
+	pprev = (struct page **) page->private;
+	*pprev = next;
+	if (next)
+		next->private = (unsigned long) pprev;
+}
+
+void pgd_ctor(void *pgd, kmem_cache_t *cache, unsigned long unused)
+{
+	unsigned long flags;
+
+	if (PTRS_PER_PMD == 1)
+		spin_lock_irqsave(&pgd_lock, flags);
+
+	memcpy((pgd_t *) pgd + USER_PGDS_IN_LAST_PML4,
+	       swapper_pg_dir + USER_PGDS_IN_LAST_PML4,
+	       (PTRS_PER_PGD - USER_PGDS_IN_LAST_PML4) * sizeof(pgd_t));
+
+	if (PTRS_PER_PMD > 1)
+		return;
+
+	pgd_list_add(pgd);
+	spin_unlock_irqrestore(&pgd_lock, flags);
+	memset(pgd, 0, USER_PGDS_IN_LAST_PML4 * sizeof(pgd_t));
+}
+
+/* never called when PTRS_PER_PMD > 1 */
+void pgd_dtor(void *pgd, kmem_cache_t *cache, unsigned long unused)
+{
+	unsigned long flags; /* can be called from interrupt context */
+
+	spin_lock_irqsave(&pgd_lock, flags);
+	pgd_list_del(pgd);
+	spin_unlock_irqrestore(&pgd_lock, flags);
+}
+
+pgd_t *pgd_alloc(struct mm_struct *mm)
+{
+	pgd_t *pgd;
+
+	pgd = kmem_cache_alloc(pgd_cache, GFP_KERNEL);
+	if (!pgd)
+		return pgd;
+
+	return pgd;
+}
+
+void pgd_free(pgd_t *pgd)
+{
+	/* in the non-PAE case, clear_page_tables() clears user pgd entries */
+	kmem_cache_free(pgd_cache, pgd);
+}
+
+void __init pgtable_cache_init(void)
+{
+	pgd_cache = kmem_cache_create("pgd",
+				      PTRS_PER_PGD * sizeof(pgd_t),
+				      PTRS_PER_PGD * sizeof(pgd_t),
+				      0,
+				      pgd_ctor,
+				      pgd_dtor);
+	if (!pgd_cache)
+		panic("pgtable_cache_init(): Cannot create pgd cache");
+}
diff -Nru a/arch/frv/mm/tlb-flush.S b/arch/frv/mm/tlb-flush.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/mm/tlb-flush.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,185 @@
+/* tlb-flush.S: TLB flushing routines
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/sys.h>
+#include <linux/config.h>
+#include <linux/linkage.h>
+#include <asm/page.h>
+#include <asm/ptrace.h>
+#include <asm/spr-regs.h>
+
+.macro DEBUG ch
+#	sethi.p		%hi(0xfeff9c00),gr4
+#	setlo		%lo(0xfeff9c00),gr4
+#	setlos		#\ch,gr5
+#	stbi		gr5,@(gr4,#0)
+#	membar
+.endm
+
+	.section	.rodata
+
+	# sizes corresponding to TPXR.LMAX
+	.balign		1
+__tlb_lmax_sizes:
+	.byte		0, 64, 0, 0
+	.byte		0, 0, 0, 0
+	.byte		0, 0, 0, 0
+	.byte		0, 0, 0, 0
+
+	.section	.text
+	.balign		4
+
+###############################################################################
+#
+# flush everything
+# - void __flush_tlb_all(void)
+#
+###############################################################################
+	.globl		__flush_tlb_all
+	.type		__flush_tlb_all,@function
+__flush_tlb_all:
+	DEBUG		'A'
+
+	# kill cached PGE value
+	setlos		#0xffffffff,gr4
+	movgs		gr4,scr0
+	movgs		gr4,scr1
+
+	# kill AMPR-cached TLB values
+	movgs		gr0,iamlr1
+	movgs		gr0,iampr1
+	movgs		gr0,damlr1
+	movgs		gr0,dampr1
+
+	# find out how many lines there are
+	movsg		tpxr,gr5
+	sethi.p		%hi(__tlb_lmax_sizes),gr4
+	srli		gr5,#TPXR_LMAX_SHIFT,gr5
+	setlo.p		%lo(__tlb_lmax_sizes),gr4
+	andi		gr5,#TPXR_LMAX_SMASK,gr5
+	ldub		@(gr4,gr5),gr4
+
+	# now, we assume that the TLB line step is page size in size
+	setlos.p	#PAGE_SIZE,gr5
+	setlos		#0,gr6
+1:
+	tlbpr		gr6,gr0,#6,#0
+	subicc.p	gr4,#1,gr4,icc0
+	add		gr6,gr5,gr6
+	bne		icc0,#2,1b
+
+	DEBUG		'B'
+	bralr
+
+	.size		__flush_tlb_all, .-__flush_tlb_all
+
+###############################################################################
+#
+# flush everything to do with one context
+# - void __flush_tlb_mm(unsigned long contextid [GR8])
+#
+###############################################################################
+	.globl		__flush_tlb_mm
+	.type		__flush_tlb_mm,@function
+__flush_tlb_mm:
+	DEBUG		'M'
+
+	# kill cached PGE value
+	setlos		#0xffffffff,gr4
+	movgs		gr4,scr0
+	movgs		gr4,scr1
+
+	# specify the context we want to flush
+	movgs		gr8,tplr
+
+	# find out how many lines there are
+	movsg		tpxr,gr5
+	sethi.p		%hi(__tlb_lmax_sizes),gr4
+	srli		gr5,#TPXR_LMAX_SHIFT,gr5
+	setlo.p		%lo(__tlb_lmax_sizes),gr4
+	andi		gr5,#TPXR_LMAX_SMASK,gr5
+	ldub		@(gr4,gr5),gr4
+
+	# now, we assume that the TLB line step is page size in size
+	setlos.p	#PAGE_SIZE,gr5
+	setlos		#0,gr6
+0:
+	tlbpr		gr6,gr0,#5,#0
+	subicc.p	gr4,#1,gr4,icc0
+	add		gr6,gr5,gr6
+	bne		icc0,#2,0b
+
+	DEBUG		'N'
+	bralr
+
+	.size		__flush_tlb_mm, .-__flush_tlb_mm
+
+###############################################################################
+#
+# flush a range of addresses from the TLB
+# - void __flush_tlb_page(unsigned long contextid [GR8],
+#			  unsigned long start [GR9])
+#
+###############################################################################
+	.globl		__flush_tlb_page
+	.type		__flush_tlb_page,@function
+__flush_tlb_page:
+	# kill cached PGE value
+	setlos		#0xffffffff,gr4
+	movgs		gr4,scr0
+	movgs		gr4,scr1
+
+	# specify the context we want to flush
+	movgs		gr8,tplr
+
+	# zap the matching TLB line and AMR values
+	setlos		#~(PAGE_SIZE-1),gr5
+	and		gr9,gr5,gr9
+	tlbpr		gr9,gr0,#5,#0
+
+	bralr
+
+	.size		__flush_tlb_page, .-__flush_tlb_page
+
+###############################################################################
+#
+# flush a range of addresses from the TLB
+# - void __flush_tlb_range(unsigned long contextid [GR8],
+#			   unsigned long start [GR9],
+#			   unsigned long end [GR10])
+#
+###############################################################################
+	.globl		__flush_tlb_range
+	.type		__flush_tlb_range,@function
+__flush_tlb_range:
+	# kill cached PGE value
+	setlos		#0xffffffff,gr4
+	movgs		gr4,scr0
+	movgs		gr4,scr1
+
+	# specify the context we want to flush
+	movgs		gr8,tplr
+
+	# round the start down to beginning of TLB line and end up to beginning of next TLB line
+	setlos.p	#~(PAGE_SIZE-1),gr5
+	setlos		#PAGE_SIZE,gr6
+	subi.p		gr10,#1,gr10
+	and		gr9,gr5,gr9
+	and		gr10,gr5,gr10
+2:
+	tlbpr		gr9,gr0,#5,#0
+	subcc.p		gr9,gr10,gr0,icc0
+	add		gr9,gr6,gr9
+	bne		icc0,#0,2b		; most likely a 1-page flush
+
+	bralr
+
+	.size		__flush_tlb_range, .-__flush_tlb_range
diff -Nru a/arch/frv/mm/tlb-miss.S b/arch/frv/mm/tlb-miss.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/mm/tlb-miss.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,631 @@
+/* tlb-miss.S: TLB miss handlers
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/sys.h>
+#include <linux/config.h>
+#include <linux/linkage.h>
+#include <asm/page.h>
+#include <asm/pgtable.h>
+#include <asm/highmem.h>
+#include <asm/spr-regs.h>
+
+	.section	.text
+	.balign		4
+
+	.globl		__entry_insn_mmu_miss
+__entry_insn_mmu_miss:
+	break
+	nop
+
+	.globl		__entry_insn_mmu_exception
+__entry_insn_mmu_exception:
+	break
+	nop
+
+	.globl		__entry_data_mmu_miss
+__entry_data_mmu_miss:
+	break
+	nop
+
+	.globl		__entry_data_mmu_exception
+__entry_data_mmu_exception:
+	break
+	nop
+
+###############################################################################
+#
+# handle a lookup failure of one sort or another in a kernel TLB handler
+# On entry:
+#   GR29 - faulting address
+#   SCR2 - saved CCR
+#
+###############################################################################
+	.type		__tlb_kernel_fault,@function
+__tlb_kernel_fault:
+	# see if we're supposed to re-enable single-step mode upon return
+	sethi.p		%hi(__break_tlb_miss_return_break),gr30
+	setlo		%lo(__break_tlb_miss_return_break),gr30
+	movsg		pcsr,gr31
+
+	subcc		gr31,gr30,gr0,icc0
+	beq		icc0,#0,__tlb_kernel_fault_sstep
+
+	movsg		scr2,gr30
+	movgs		gr30,ccr
+	movgs		gr29,scr2			/* save EAR0 value */
+	sethi.p		%hi(__kernel_current_task),gr29
+	setlo		%lo(__kernel_current_task),gr29
+	ldi.p		@(gr29,#0),gr29			/* restore GR29 */
+
+	bra		__entry_kernel_handle_mmu_fault
+
+	# we've got to re-enable single-stepping
+__tlb_kernel_fault_sstep:
+	sethi.p		%hi(__break_tlb_miss_real_return_info),gr30
+	setlo		%lo(__break_tlb_miss_real_return_info),gr30
+	lddi		@(gr30,0),gr30
+	movgs		gr30,pcsr
+	movgs		gr31,psr
+
+	movsg		scr2,gr30
+	movgs		gr30,ccr
+	movgs		gr29,scr2			/* save EAR0 value */
+	sethi.p		%hi(__kernel_current_task),gr29
+	setlo		%lo(__kernel_current_task),gr29
+	ldi.p		@(gr29,#0),gr29			/* restore GR29 */
+	bra		__entry_kernel_handle_mmu_fault_sstep
+
+	.size		__tlb_kernel_fault, .-__tlb_kernel_fault
+
+###############################################################################
+#
+# handle a lookup failure of one sort or another in a user TLB handler
+# On entry:
+#   GR28 - faulting address
+#   SCR2 - saved CCR
+#
+###############################################################################
+	.type		__tlb_user_fault,@function
+__tlb_user_fault:
+	# see if we're supposed to re-enable single-step mode upon return
+	sethi.p		%hi(__break_tlb_miss_return_break),gr30
+	setlo		%lo(__break_tlb_miss_return_break),gr30
+	movsg		pcsr,gr31
+	subcc		gr31,gr30,gr0,icc0
+	beq		icc0,#0,__tlb_user_fault_sstep
+
+	movsg		scr2,gr30
+	movgs		gr30,ccr
+	bra		__entry_uspace_handle_mmu_fault
+
+	# we've got to re-enable single-stepping
+__tlb_user_fault_sstep:
+	sethi.p		%hi(__break_tlb_miss_real_return_info),gr30
+	setlo		%lo(__break_tlb_miss_real_return_info),gr30
+	lddi		@(gr30,0),gr30
+	movgs		gr30,pcsr
+	movgs		gr31,psr
+	movsg		scr2,gr30
+	movgs		gr30,ccr
+	bra		__entry_uspace_handle_mmu_fault_sstep
+
+	.size		__tlb_user_fault, .-__tlb_user_fault
+
+###############################################################################
+#
+# Kernel instruction TLB miss handler
+# On entry:
+#   GR1   - kernel stack pointer
+#   GR28  - saved exception frame pointer
+#   GR29  - faulting address
+#   GR31  - EAR0 ^ SCR0
+#   SCR0  - base of virtual range covered by cached PGE from last ITLB miss (or 0xffffffff)
+#   DAMR3 - mapped page directory
+#   DAMR4 - mapped page table as matched by SCR0
+#
+###############################################################################
+	.globl		__entry_kernel_insn_tlb_miss
+	.type		__entry_kernel_insn_tlb_miss,@function
+__entry_kernel_insn_tlb_miss:
+#if 0
+	sethi.p		%hi(0xe1200004),gr30
+	setlo		%lo(0xe1200004),gr30
+	st		gr0,@(gr30,gr0)
+	sethi.p		%hi(0xffc00100),gr30
+	setlo		%lo(0xffc00100),gr30
+	sth		gr30,@(gr30,gr0)
+	membar
+#endif
+
+	movsg		ccr,gr30			/* save CCR */
+	movgs		gr30,scr2
+
+	# see if the cached page table mapping is appropriate
+	srlicc.p	gr31,#26,gr0,icc0
+	setlos		0x3ffc,gr30
+	srli.p		gr29,#12,gr31			/* use EAR0[25:14] as PTE index */
+	bne		icc0,#0,__itlb_k_PTD_miss
+
+__itlb_k_PTD_mapped:
+	# access the PTD with EAR0[25:14]
+	# - DAMLR4 points to the virtual address of the appropriate page table
+	# - the PTD holds 4096 PTEs
+	# - the PTD must be accessed uncached
+	# - the PTE must be marked accessed if it was valid
+	#
+	and		gr31,gr30,gr31
+	movsg		damlr4,gr30
+	add		gr30,gr31,gr31
+	ldi		@(gr31,#0),gr30			/* fetch the PTE */
+	andicc		gr30,#_PAGE_PRESENT,gr0,icc0
+	ori.p		gr30,#_PAGE_ACCESSED,gr30
+	beq		icc0,#0,__tlb_kernel_fault	/* jump if PTE invalid */
+	sti.p		gr30,@(gr31,#0)			/* update the PTE */
+	andi		gr30,#~_PAGE_ACCESSED,gr30
+
+	# we're using IAMR1 as an extra TLB entry
+	# - punt the entry here (if valid) to the real TLB and then replace with the new PTE
+	# - need to check DAMR1 lest we cause an multiple-DAT-hit exception
+	# - IAMPR1 has no WP bit, and we mustn't lose WP information
+	movsg		iampr1,gr31
+	andicc		gr31,#xAMPRx_V,gr0,icc0
+	setlos.p	0xfffff000,gr31
+	beq		icc0,#0,__itlb_k_nopunt		/* punt not required */
+
+	movsg		iamlr1,gr31
+	movgs		gr31,tplr			/* set TPLR.CXN */
+	tlbpr		gr31,gr0,#4,#0			/* delete matches from TLB, IAMR1, DAMR1 */
+
+	movsg		dampr1,gr31
+	ori		gr31,#xAMPRx_V,gr31		/* entry was invalidated by tlbpr #4 */
+	movgs		gr31,tppr
+	movsg		iamlr1,gr31			/* set TPLR.CXN */
+	movgs		gr31,tplr
+	tlbpr		gr31,gr0,#2,#0			/* save to the TLB */
+	movsg		tpxr,gr31			/* check the TLB write error flag */
+	andicc.p	gr31,#TPXR_E,gr0,icc0
+	setlos		#0xfffff000,gr31
+	bne		icc0,#0,__tlb_kernel_fault
+
+__itlb_k_nopunt:
+
+	# assemble the new TLB entry
+	and		gr29,gr31,gr29
+	movsg		cxnr,gr31
+	or		gr29,gr31,gr29
+	movgs		gr29,iamlr1			/* xAMLR = address | context number */
+	movgs		gr30,iampr1
+	movgs		gr29,damlr1
+	movgs		gr30,dampr1
+
+	# return, restoring registers
+	movsg		scr2,gr30
+	movgs		gr30,ccr
+	sethi.p		%hi(__kernel_current_task),gr29
+	setlo		%lo(__kernel_current_task),gr29
+	ldi		@(gr29,#0),gr29
+	rett		#0
+	beq		icc0,#3,0			/* prevent icache prefetch */
+
+	# the PTE we want wasn't in the PTD we have mapped, so we need to go looking for a more
+	# appropriate page table and map that instead
+	#   - access the PGD with EAR0[31:26]
+	#   - DAMLR3 points to the virtual address of the page directory
+	#   - the PGD holds 64 PGEs and each PGE/PME points to a set of page tables
+__itlb_k_PTD_miss:
+	srli		gr29,#26,gr31			/* calculate PGE offset */
+	slli		gr31,#8,gr31			/* and clear bottom bits */
+
+	movsg		damlr3,gr30
+	ld		@(gr31,gr30),gr30		/* access the PGE */
+
+	andicc.p	gr30,#_PAGE_PRESENT,gr0,icc0
+	andicc		gr30,#xAMPRx_SS,gr0,icc1
+
+	# map this PTD instead and record coverage address
+	ori.p		gr30,#xAMPRx_L|xAMPRx_SS_16Kb|xAMPRx_S|xAMPRx_C|xAMPRx_V,gr30
+	beq		icc0,#0,__tlb_kernel_fault	/* jump if PGE not present */
+	slli.p		gr31,#18,gr31
+	bne		icc1,#0,__itlb_k_bigpage
+	movgs		gr30,dampr4
+	movgs		gr31,scr0
+
+	# we can now resume normal service
+	setlos		0x3ffc,gr30
+	srli.p		gr29,#12,gr31			/* use EAR0[25:14] as PTE index */
+	bra		__itlb_k_PTD_mapped
+
+__itlb_k_bigpage:
+	break
+	nop
+
+	.size		__entry_kernel_insn_tlb_miss, .-__entry_kernel_insn_tlb_miss
+
+###############################################################################
+#
+# Kernel data TLB miss handler
+# On entry:
+#   GR1   - kernel stack pointer
+#   GR28  - saved exception frame pointer
+#   GR29  - faulting address
+#   GR31  - EAR0 ^ SCR1
+#   SCR1  - base of virtual range covered by cached PGE from last DTLB miss (or 0xffffffff)
+#   DAMR3 - mapped page directory
+#   DAMR5 - mapped page table as matched by SCR1
+#
+###############################################################################
+	.globl		__entry_kernel_data_tlb_miss
+	.type		__entry_kernel_data_tlb_miss,@function
+__entry_kernel_data_tlb_miss:
+#if 0
+	sethi.p		%hi(0xe1200004),gr30
+	setlo		%lo(0xe1200004),gr30
+	st		gr0,@(gr30,gr0)
+	sethi.p		%hi(0xffc00100),gr30
+	setlo		%lo(0xffc00100),gr30
+	sth		gr30,@(gr30,gr0)
+	membar
+#endif
+
+	movsg		ccr,gr30			/* save CCR */
+	movgs		gr30,scr2
+
+	# see if the cached page table mapping is appropriate
+	srlicc.p	gr31,#26,gr0,icc0
+	setlos		0x3ffc,gr30
+	srli.p		gr29,#12,gr31			/* use EAR0[25:14] as PTE index */
+	bne		icc0,#0,__dtlb_k_PTD_miss
+
+__dtlb_k_PTD_mapped:
+	# access the PTD with EAR0[25:14]
+	# - DAMLR5 points to the virtual address of the appropriate page table
+	# - the PTD holds 4096 PTEs
+	# - the PTD must be accessed uncached
+	# - the PTE must be marked accessed if it was valid
+	#
+	and		gr31,gr30,gr31
+	movsg		damlr5,gr30
+	add		gr30,gr31,gr31
+	ldi		@(gr31,#0),gr30			/* fetch the PTE */
+	andicc		gr30,#_PAGE_PRESENT,gr0,icc0
+	ori.p		gr30,#_PAGE_ACCESSED,gr30
+	beq		icc0,#0,__tlb_kernel_fault	/* jump if PTE invalid */
+	sti.p		gr30,@(gr31,#0)			/* update the PTE */
+	andi		gr30,#~_PAGE_ACCESSED,gr30
+
+	# we're using DAMR1 as an extra TLB entry
+	# - punt the entry here (if valid) to the real TLB and then replace with the new PTE
+	# - need to check IAMR1 lest we cause an multiple-DAT-hit exception
+	movsg		dampr1,gr31
+	andicc		gr31,#xAMPRx_V,gr0,icc0
+	setlos.p	0xfffff000,gr31
+	beq		icc0,#0,__dtlb_k_nopunt		/* punt not required */
+
+	movsg		damlr1,gr31
+	movgs		gr31,tplr			/* set TPLR.CXN */
+	tlbpr		gr31,gr0,#4,#0			/* delete matches from TLB, IAMR1, DAMR1 */
+
+	movsg		dampr1,gr31
+	ori		gr31,#xAMPRx_V,gr31		/* entry was invalidated by tlbpr #4 */
+	movgs		gr31,tppr
+	movsg		damlr1,gr31			/* set TPLR.CXN */
+	movgs		gr31,tplr
+	tlbpr		gr31,gr0,#2,#0			/* save to the TLB */
+	movsg		tpxr,gr31			/* check the TLB write error flag */
+	andicc.p	gr31,#TPXR_E,gr0,icc0
+	setlos		#0xfffff000,gr31
+	bne		icc0,#0,__tlb_kernel_fault
+
+__dtlb_k_nopunt:
+
+	# assemble the new TLB entry
+	and		gr29,gr31,gr29
+	movsg		cxnr,gr31
+	or		gr29,gr31,gr29
+	movgs		gr29,iamlr1			/* xAMLR = address | context number */
+	movgs		gr30,iampr1
+	movgs		gr29,damlr1
+	movgs		gr30,dampr1
+
+	# return, restoring registers
+	movsg		scr2,gr30
+	movgs		gr30,ccr
+	sethi.p		%hi(__kernel_current_task),gr29
+	setlo		%lo(__kernel_current_task),gr29
+	ldi		@(gr29,#0),gr29
+	rett		#0
+	beq		icc0,#3,0			/* prevent icache prefetch */
+
+	# the PTE we want wasn't in the PTD we have mapped, so we need to go looking for a more
+	# appropriate page table and map that instead
+	#   - access the PGD with EAR0[31:26]
+	#   - DAMLR3 points to the virtual address of the page directory
+	#   - the PGD holds 64 PGEs and each PGE/PME points to a set of page tables
+__dtlb_k_PTD_miss:
+	srli		gr29,#26,gr31			/* calculate PGE offset */
+	slli		gr31,#8,gr31			/* and clear bottom bits */
+
+	movsg		damlr3,gr30
+	ld		@(gr31,gr30),gr30		/* access the PGE */
+
+	andicc.p	gr30,#_PAGE_PRESENT,gr0,icc0
+	andicc		gr30,#xAMPRx_SS,gr0,icc1
+
+	# map this PTD instead and record coverage address
+	ori.p		gr30,#xAMPRx_L|xAMPRx_SS_16Kb|xAMPRx_S|xAMPRx_C|xAMPRx_V,gr30
+	beq		icc0,#0,__tlb_kernel_fault	/* jump if PGE not present */
+	slli.p		gr31,#18,gr31
+	bne		icc1,#0,__dtlb_k_bigpage
+	movgs		gr30,dampr5
+	movgs		gr31,scr1
+
+	# we can now resume normal service
+	setlos		0x3ffc,gr30
+	srli.p		gr29,#12,gr31			/* use EAR0[25:14] as PTE index */
+	bra		__dtlb_k_PTD_mapped
+
+__dtlb_k_bigpage:
+	break
+	nop
+
+	.size		__entry_kernel_data_tlb_miss, .-__entry_kernel_data_tlb_miss
+
+###############################################################################
+#
+# Userspace instruction TLB miss handler (with PGE prediction)
+# On entry:
+#   GR28  - faulting address
+#   GR31  - EAR0 ^ SCR0
+#   SCR0  - base of virtual range covered by cached PGE from last ITLB miss (or 0xffffffff)
+#   DAMR3 - mapped page directory
+#   DAMR4 - mapped page table as matched by SCR0
+#
+###############################################################################
+	.globl		__entry_user_insn_tlb_miss
+	.type		__entry_user_insn_tlb_miss,@function
+__entry_user_insn_tlb_miss:
+#if 0
+	sethi.p		%hi(0xe1200004),gr30
+	setlo		%lo(0xe1200004),gr30
+	st		gr0,@(gr30,gr0)
+	sethi.p		%hi(0xffc00100),gr30
+	setlo		%lo(0xffc00100),gr30
+	sth		gr30,@(gr30,gr0)
+	membar
+#endif
+
+	movsg		ccr,gr30			/* save CCR */
+	movgs		gr30,scr2
+
+	# see if the cached page table mapping is appropriate
+	srlicc.p	gr31,#26,gr0,icc0
+	setlos		0x3ffc,gr30
+	srli.p		gr28,#12,gr31			/* use EAR0[25:14] as PTE index */
+	bne		icc0,#0,__itlb_u_PTD_miss
+
+__itlb_u_PTD_mapped:
+	# access the PTD with EAR0[25:14]
+	# - DAMLR4 points to the virtual address of the appropriate page table
+	# - the PTD holds 4096 PTEs
+	# - the PTD must be accessed uncached
+	# - the PTE must be marked accessed if it was valid
+	#
+	and		gr31,gr30,gr31
+	movsg		damlr4,gr30
+	add		gr30,gr31,gr31
+	ldi		@(gr31,#0),gr30			/* fetch the PTE */
+	andicc		gr30,#_PAGE_PRESENT,gr0,icc0
+	ori.p		gr30,#_PAGE_ACCESSED,gr30
+	beq		icc0,#0,__tlb_user_fault	/* jump if PTE invalid */
+	sti.p		gr30,@(gr31,#0)			/* update the PTE */
+	andi		gr30,#~_PAGE_ACCESSED,gr30
+
+	# we're using IAMR1/DAMR1 as an extra TLB entry
+	# - punt the entry here (if valid) to the real TLB and then replace with the new PTE
+	movsg		dampr1,gr31
+	andicc		gr31,#xAMPRx_V,gr0,icc0
+	setlos.p	0xfffff000,gr31
+	beq		icc0,#0,__itlb_u_nopunt		/* punt not required */
+
+	movsg		dampr1,gr31
+	movgs		gr31,tppr
+	movsg		damlr1,gr31			/* set TPLR.CXN */
+	movgs		gr31,tplr
+	tlbpr		gr31,gr0,#2,#0			/* save to the TLB */
+	movsg		tpxr,gr31			/* check the TLB write error flag */
+	andicc.p	gr31,#TPXR_E,gr0,icc0
+	setlos		#0xfffff000,gr31
+	bne		icc0,#0,__tlb_user_fault
+
+__itlb_u_nopunt:
+
+	# assemble the new TLB entry
+	and		gr28,gr31,gr28
+	movsg		cxnr,gr31
+	or		gr28,gr31,gr28
+	movgs		gr28,iamlr1			/* xAMLR = address | context number */
+	movgs		gr30,iampr1
+	movgs		gr28,damlr1
+	movgs		gr30,dampr1
+
+	# return, restoring registers
+	movsg		scr2,gr30
+	movgs		gr30,ccr
+	rett		#0
+	beq		icc0,#3,0			/* prevent icache prefetch */
+
+	# the PTE we want wasn't in the PTD we have mapped, so we need to go looking for a more
+	# appropriate page table and map that instead
+	#   - access the PGD with EAR0[31:26]
+	#   - DAMLR3 points to the virtual address of the page directory
+	#   - the PGD holds 64 PGEs and each PGE/PME points to a set of page tables
+__itlb_u_PTD_miss:
+	srli		gr28,#26,gr31			/* calculate PGE offset */
+	slli		gr31,#8,gr31			/* and clear bottom bits */
+
+	movsg		damlr3,gr30
+	ld		@(gr31,gr30),gr30		/* access the PGE */
+
+	andicc.p	gr30,#_PAGE_PRESENT,gr0,icc0
+	andicc		gr30,#xAMPRx_SS,gr0,icc1
+
+	# map this PTD instead and record coverage address
+	ori.p		gr30,#xAMPRx_L|xAMPRx_SS_16Kb|xAMPRx_S|xAMPRx_C|xAMPRx_V,gr30
+	beq		icc0,#0,__tlb_user_fault	/* jump if PGE not present */
+	slli.p		gr31,#18,gr31
+	bne		icc1,#0,__itlb_u_bigpage
+	movgs		gr30,dampr4
+	movgs		gr31,scr0
+
+	# we can now resume normal service
+	setlos		0x3ffc,gr30
+	srli.p		gr28,#12,gr31			/* use EAR0[25:14] as PTE index */
+	bra		__itlb_u_PTD_mapped
+
+__itlb_u_bigpage:
+	break
+	nop
+
+	.size		__entry_user_insn_tlb_miss, .-__entry_user_insn_tlb_miss
+
+###############################################################################
+#
+# Userspace data TLB miss handler
+# On entry:
+#   GR28  - faulting address
+#   GR31  - EAR0 ^ SCR1
+#   SCR1  - base of virtual range covered by cached PGE from last DTLB miss (or 0xffffffff)
+#   DAMR3 - mapped page directory
+#   DAMR5 - mapped page table as matched by SCR1
+#
+###############################################################################
+	.globl		__entry_user_data_tlb_miss
+	.type		__entry_user_data_tlb_miss,@function
+__entry_user_data_tlb_miss:
+#if 0
+	sethi.p		%hi(0xe1200004),gr30
+	setlo		%lo(0xe1200004),gr30
+	st		gr0,@(gr30,gr0)
+	sethi.p		%hi(0xffc00100),gr30
+	setlo		%lo(0xffc00100),gr30
+	sth		gr30,@(gr30,gr0)
+	membar
+#endif
+
+	movsg		ccr,gr30			/* save CCR */
+	movgs		gr30,scr2
+
+	# see if the cached page table mapping is appropriate
+	srlicc.p	gr31,#26,gr0,icc0
+	setlos		0x3ffc,gr30
+	srli.p		gr28,#12,gr31			/* use EAR0[25:14] as PTE index */
+	bne		icc0,#0,__dtlb_u_PTD_miss
+
+__dtlb_u_PTD_mapped:
+	# access the PTD with EAR0[25:14]
+	# - DAMLR5 points to the virtual address of the appropriate page table
+	# - the PTD holds 4096 PTEs
+	# - the PTD must be accessed uncached
+	# - the PTE must be marked accessed if it was valid
+	#
+	and		gr31,gr30,gr31
+	movsg		damlr5,gr30
+
+__dtlb_u_using_iPTD:
+	add		gr30,gr31,gr31
+	ldi		@(gr31,#0),gr30			/* fetch the PTE */
+	andicc		gr30,#_PAGE_PRESENT,gr0,icc0
+	ori.p		gr30,#_PAGE_ACCESSED,gr30
+	beq		icc0,#0,__tlb_user_fault	/* jump if PTE invalid */
+	sti.p		gr30,@(gr31,#0)			/* update the PTE */
+	andi		gr30,#~_PAGE_ACCESSED,gr30
+
+	# we're using DAMR1 as an extra TLB entry
+	# - punt the entry here (if valid) to the real TLB and then replace with the new PTE
+	movsg		dampr1,gr31
+	andicc		gr31,#xAMPRx_V,gr0,icc0
+	setlos.p	0xfffff000,gr31
+	beq		icc0,#0,__dtlb_u_nopunt		/* punt not required */
+
+	movsg		dampr1,gr31
+	movgs		gr31,tppr
+	movsg		damlr1,gr31			/* set TPLR.CXN */
+	movgs		gr31,tplr
+	tlbpr		gr31,gr0,#2,#0			/* save to the TLB */
+	movsg		tpxr,gr31			/* check the TLB write error flag */
+	andicc.p	gr31,#TPXR_E,gr0,icc0
+	setlos		#0xfffff000,gr31
+	bne		icc0,#0,__tlb_user_fault
+
+__dtlb_u_nopunt:
+
+	# assemble the new TLB entry
+	and		gr28,gr31,gr28
+	movsg		cxnr,gr31
+	or		gr28,gr31,gr28
+	movgs		gr28,iamlr1			/* xAMLR = address | context number */
+	movgs		gr30,iampr1
+	movgs		gr28,damlr1
+	movgs		gr30,dampr1
+
+	# return, restoring registers
+	movsg		scr2,gr30
+	movgs		gr30,ccr
+	rett		#0
+	beq		icc0,#3,0			/* prevent icache prefetch */
+
+	# the PTE we want wasn't in the PTD we have mapped, so we need to go looking for a more
+	# appropriate page table and map that instead
+	#   - first of all, check the insn PGE cache - we may well get a hit there
+	#   - access the PGD with EAR0[31:26]
+	#   - DAMLR3 points to the virtual address of the page directory
+	#   - the PGD holds 64 PGEs and each PGE/PME points to a set of page tables
+__dtlb_u_PTD_miss:
+	movsg		scr0,gr31			/* consult the insn-PGE-cache key */
+	xor		gr28,gr31,gr31
+	srlicc		gr31,#26,gr0,icc0
+	srli		gr28,#12,gr31			/* use EAR0[25:14] as PTE index */
+	bne		icc0,#0,__dtlb_u_iPGE_miss
+
+	# what we're looking for is covered by the insn-PGE-cache
+	setlos		0x3ffc,gr30
+	and		gr31,gr30,gr31
+	movsg		damlr4,gr30
+	bra		__dtlb_u_using_iPTD
+
+__dtlb_u_iPGE_miss:
+	srli		gr28,#26,gr31			/* calculate PGE offset */
+	slli		gr31,#8,gr31			/* and clear bottom bits */
+
+	movsg		damlr3,gr30
+	ld		@(gr31,gr30),gr30		/* access the PGE */
+
+	andicc.p	gr30,#_PAGE_PRESENT,gr0,icc0
+	andicc		gr30,#xAMPRx_SS,gr0,icc1
+
+	# map this PTD instead and record coverage address
+	ori.p		gr30,#xAMPRx_L|xAMPRx_SS_16Kb|xAMPRx_S|xAMPRx_C|xAMPRx_V,gr30
+	beq		icc0,#0,__tlb_user_fault	/* jump if PGE not present */
+	slli.p		gr31,#18,gr31
+	bne		icc1,#0,__dtlb_u_bigpage
+	movgs		gr30,dampr5
+	movgs		gr31,scr1
+
+	# we can now resume normal service
+	setlos		0x3ffc,gr30
+	srli.p		gr28,#12,gr31			/* use EAR0[25:14] as PTE index */
+	bra		__dtlb_u_PTD_mapped
+
+__dtlb_u_bigpage:
+	break
+	nop
+
+	.size		__entry_user_data_tlb_miss, .-__entry_user_data_tlb_miss
diff -Nru a/arch/frv/mm/unaligned.c b/arch/frv/mm/unaligned.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/frv/mm/unaligned.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,218 @@
+/* unaligned.c: unalignment fixup handler for CPUs on which it is supported (FR451 only)
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/config.h>
+#include <linux/sched.h>
+#include <linux/signal.h>
+#include <linux/kernel.h>
+#include <linux/mm.h>
+#include <linux/types.h>
+#include <linux/user.h>
+#include <linux/string.h>
+#include <linux/linkage.h>
+#include <linux/init.h>
+
+#include <asm/setup.h>
+#include <asm/system.h>
+#include <asm/uaccess.h>
+
+#if 0
+#define kdebug(fmt, ...) printk("FDPIC "fmt"\n" ,##__VA_ARGS__ )
+#else
+#define kdebug(fmt, ...) do {} while(0)
+#endif
+
+#define _MA_SIGNED	0x01
+#define _MA_HALF	0x02
+#define _MA_WORD	0x04
+#define _MA_DWORD	0x08
+#define _MA_SZ_MASK	0x0e
+#define _MA_LOAD	0x10
+#define _MA_STORE	0x20
+#define _MA_UPDATE	0x40
+#define _MA_IMM		0x80
+
+#define _MA_LDxU	_MA_LOAD | _MA_UPDATE
+#define _MA_LDxI	_MA_LOAD | _MA_IMM
+#define _MA_STxU	_MA_STORE | _MA_UPDATE
+#define _MA_STxI	_MA_STORE | _MA_IMM
+
+static const uint8_t tbl_LDGRk_reg[0x40] = {
+	[0x02] = _MA_LOAD | _MA_HALF | _MA_SIGNED,	/* LDSH  @(GRi,GRj),GRk */
+	[0x03] = _MA_LOAD | _MA_HALF,			/* LDUH  @(GRi,GRj),GRk */
+	[0x04] = _MA_LOAD | _MA_WORD,			/* LD	 @(GRi,GRj),GRk */
+	[0x05] = _MA_LOAD | _MA_DWORD,			/* LDD	 @(GRi,GRj),GRk */
+	[0x12] = _MA_LDxU | _MA_HALF | _MA_SIGNED,	/* LDSHU @(GRi,GRj),GRk */
+	[0x13] = _MA_LDxU | _MA_HALF,			/* LDUHU @(GRi,GRj),GRk */
+	[0x14] = _MA_LDxU | _MA_WORD,			/* LDU	 @(GRi,GRj),GRk */
+	[0x15] = _MA_LDxU | _MA_DWORD,			/* LDDU	 @(GRi,GRj),GRk */
+};
+
+static const uint8_t tbl_STGRk_reg[0x40] = {
+	[0x01] = _MA_STORE | _MA_HALF,			/* STH   @(GRi,GRj),GRk */
+	[0x02] = _MA_STORE | _MA_WORD,			/* ST	 @(GRi,GRj),GRk */
+	[0x03] = _MA_STORE | _MA_DWORD,			/* STD	 @(GRi,GRj),GRk */
+	[0x11] = _MA_STxU  | _MA_HALF,			/* STHU  @(GRi,GRj),GRk */
+	[0x12] = _MA_STxU  | _MA_WORD,			/* STU	 @(GRi,GRj),GRk */
+	[0x13] = _MA_STxU  | _MA_DWORD,			/* STDU	 @(GRi,GRj),GRk */
+};
+
+static const uint8_t tbl_LDSTGRk_imm[0x80] = {
+	[0x31] = _MA_LDxI | _MA_HALF | _MA_SIGNED,	/* LDSHI @(GRi,d12),GRk */
+	[0x32] = _MA_LDxI | _MA_WORD,			/* LDI   @(GRi,d12),GRk */
+	[0x33] = _MA_LDxI | _MA_DWORD,			/* LDDI  @(GRi,d12),GRk */
+	[0x36] = _MA_LDxI | _MA_HALF,			/* LDUHI @(GRi,d12),GRk */
+	[0x51] = _MA_STxI | _MA_HALF,			/* STHI  @(GRi,d12),GRk */
+	[0x52] = _MA_STxI | _MA_WORD,			/* STI   @(GRi,d12),GRk */
+	[0x53] = _MA_STxI | _MA_DWORD,			/* STDI  @(GRi,d12),GRk */
+};
+
+
+/*****************************************************************************/
+/*
+ * see if we can handle the exception by fixing up a misaligned memory access
+ */
+int handle_misalignment(unsigned long esr0, unsigned long ear0, unsigned long epcr0)
+{
+	unsigned long insn, addr, *greg;
+	int GRi, GRj, GRk, D12, op;
+
+	union {
+		uint64_t _64;
+		uint32_t _32[2];
+		uint16_t _16;
+		uint8_t _8[8];
+	} x;
+
+	if (!(esr0 & ESR0_EAV) || !(epcr0 & EPCR0_V) || !(ear0 & 7))
+		return -EAGAIN;
+
+	epcr0 &= EPCR0_PC;
+
+	if (__frame->pc != epcr0) {
+		kdebug("MISALIGN: Execution not halted on excepting instruction\n");
+		BUG();
+	}
+
+	if (__get_user(insn, (unsigned long *) epcr0) < 0)
+		return -EFAULT;
+
+	/* determine the instruction type first */
+	switch ((insn >> 18) & 0x7f) {
+	case 0x2:
+		/* LDx @(GRi,GRj),GRk */
+		op = tbl_LDGRk_reg[(insn >> 6) & 0x3f];
+		break;
+
+	case 0x3:
+		/* STx GRk,@(GRi,GRj) */
+		op = tbl_STGRk_reg[(insn >> 6) & 0x3f];
+		break;
+
+	default:
+		op = tbl_LDSTGRk_imm[(insn >> 18) & 0x7f];
+		break;
+	}
+
+	if (!op)
+		return -EAGAIN;
+
+	kdebug("MISALIGN: pc=%08lx insn=%08lx ad=%08lx op=%02x\n", epcr0, insn, ear0, op);
+
+	memset(&x, 0xba, 8);
+
+	/* validate the instruction parameters */
+	greg = (unsigned long *) &__frame->tbr;
+
+	GRi = (insn >> 12) & 0x3f;
+	GRk = (insn >> 25) & 0x3f;
+
+	if (GRi > 31 || GRk > 31)
+		return -ENOENT;
+
+	if (op & _MA_DWORD && GRk & 1)
+		return -EINVAL;
+
+	if (op & _MA_IMM) {
+		D12 = insn & 0xfff;
+		asm ("slli %0,#20,%0 ! srai %0,#20,%0" : "=r"(D12) : "0"(D12)); /* sign extend */
+		addr = (GRi ? greg[GRi] : 0) + D12;
+	}
+	else {
+		GRj = (insn >>  0) & 0x3f;
+		if (GRj > 31)
+			return -ENOENT;
+		addr = (GRi ? greg[GRi] : 0) + (GRj ? greg[GRj] : 0);
+	}
+
+	if (addr != ear0) {
+		kdebug("MISALIGN: Calculated addr (%08lx) does not match EAR0 (%08lx)\n",
+		       addr, ear0);
+		return -EFAULT;
+	}
+
+	/* check the address is okay */
+	if (user_mode(__frame) && ___range_ok(ear0, 8) < 0)
+		return -EFAULT;
+
+	/* perform the memory op */
+	if (op & _MA_STORE) {
+		/* perform a store */
+		x._32[0] = 0;
+		if (GRk != 0) {
+			if (op & _MA_HALF) {
+				x._16 = greg[GRk];
+			}
+			else {
+				x._32[0] = greg[GRk];
+			}
+		}
+		if (op & _MA_DWORD)
+			x._32[1] = greg[GRk + 1];
+
+		kdebug("MISALIGN: Store GR%d { %08x:%08x } -> %08lx (%dB)\n",
+		       GRk, x._32[1], x._32[0], addr, op & _MA_SZ_MASK);
+
+		if (__memcpy_user((void *) addr, &x, op & _MA_SZ_MASK) != 0)
+			return -EFAULT;
+	}
+	else {
+		/* perform a load */
+		if (__memcpy_user(&x, (void *) addr, op & _MA_SZ_MASK) != 0)
+			return -EFAULT;
+
+		if (op & _MA_HALF) {
+			if (op & _MA_SIGNED)
+				asm ("slli %0,#16,%0 ! srai %0,#16,%0"
+				     : "=r"(x._32[0]) : "0"(x._16));
+			else
+				asm ("sethi #0,%0"
+				     : "=r"(x._32[0]) : "0"(x._16));
+		}
+
+		kdebug("MISALIGN: Load %08lx (%dB) -> GR%d, { %08x:%08x }\n",
+		       addr, op & _MA_SZ_MASK, GRk, x._32[1], x._32[0]);
+
+		if (GRk != 0)
+			greg[GRk] = x._32[0];
+		if (op & _MA_DWORD)
+			greg[GRk + 1] = x._32[1];
+	}
+
+	/* update the base pointer if required */
+	if (op & _MA_UPDATE)
+		greg[GRi] = addr;
+
+	/* well... we've done that insn */
+	__frame->pc = __frame->pc + 4;
+
+	return 0;
+} /* end handle_misalignment() */
diff -Nru a/arch/h8300/Kconfig b/arch/h8300/Kconfig
--- a/arch/h8300/Kconfig	2005-01-10 20:11:21 -08:00
+++ b/arch/h8300/Kconfig	2005-01-10 20:11:21 -08:00
@@ -33,6 +33,10 @@
 	bool
 	default n
 
+config GENERIC_CALIBRATE_DELAY
+	bool
+	default y
+
 config ISA
 	bool
 	default y
diff -Nru a/arch/h8300/kernel/syscalls.S b/arch/h8300/kernel/syscalls.S
--- a/arch/h8300/kernel/syscalls.S	2005-01-10 20:11:17 -08:00
+++ b/arch/h8300/kernel/syscalls.S	2005-01-10 20:11:17 -08:00
@@ -289,6 +289,21 @@
 	.long SYMBOL_NAME(sys_utimes)
  	.long SYMBOL_NAME(sys_fadvise64_64)
 	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_vserver */
+	.long SYMBOL_NAME(sys_mbind)
+	.long SYMBOL_NAME(sys_get_mempolicy)
+	.long SYMBOL_NAME(sys_set_mempolicy)
+	.long SYMBOL_NAME(sys_mq_open)
+	.long SYMBOL_NAME(sys_mq_unlink)
+	.long SYMBOL_NAME(sys_mq_timedsend)
+	.long SYMBOL_NAME(sys_mq_timedreceive)	/* 280 */
+	.long SYMBOL_NAME(sys_mq_notify)
+	.long SYMBOL_NAME(sys_mq_getsetattr)
+	.long SYMBOL_NAME(sys_ni_syscall)	/* reserved for kexec */
+	.long SYMBOL_NAME(sys_waitid)
+	.long SYMBOL_NAME(sys_ni_syscall)	/* 285 */ /* available */
+	.long SYMBOL_NAME(sys_add_key)
+	.long SYMBOL_NAME(sys_request_key)
+	.long SYMBOL_NAME(sys_keyctl)
 
 	.rept NR_syscalls-(.-SYMBOL_NAME(sys_call_table))/4
 		.long SYMBOL_NAME(sys_ni_syscall)
diff -Nru a/arch/i386/Kconfig b/arch/i386/Kconfig
--- a/arch/i386/Kconfig	2005-01-10 20:11:16 -08:00
+++ b/arch/i386/Kconfig	2005-01-10 20:11:16 -08:00
@@ -373,6 +373,10 @@
 	depends on !M386
 	default y
 
+config GENERIC_CALIBRATE_DELAY
+	bool
+	default y
+
 config X86_PPRO_FENCE
 	bool
 	depends on M686 || M586MMX || M586TSC || M586 || M486 || M386
@@ -512,6 +516,17 @@
 
 	  Say Y here if you are building a kernel for a desktop, embedded
 	  or real-time system.  Say N if you are unsure.
+
+config PREEMPT_BKL
+	bool "Preempt The Big Kernel Lock"
+	depends on PREEMPT || SMP
+	default y
+	help
+	  This option reduces the latency of the kernel by making the
+	  big kernel lock preemptible.
+
+	  Say Y here if you are building a kernel for a desktop system.
+	  Say N if you are unsure.
 
 config X86_UP_APIC
 	bool "Local APIC support on uniprocessors" if !SMP
diff -Nru a/arch/i386/boot/edd.S b/arch/i386/boot/edd.S
--- a/arch/i386/boot/edd.S	2005-01-10 20:11:16 -08:00
+++ b/arch/i386/boot/edd.S	2005-01-10 20:11:16 -08:00
@@ -1,5 +1,6 @@
 /*
  * BIOS Enhanced Disk Drive support
+ * Copyright (C) 2002, 2003, 2004 Dell, Inc.
  * by Matt Domsch <Matt_Domsch@dell.com> October 2002
  * conformant to T13 Committee www.t13.org
  *   projects 1572D, 1484D, 1386D, 1226DT
@@ -7,14 +8,52 @@
  *	and Andrew Wilks <Andrew_Wilks@dell.com> September 2003, June 2004
  * legacy CHS retreival by Patrick J. LoPresti <patl@users.sourceforge.net>
  *      March 2004
+ * Command line option parsing, Matt Domsch, November 2004
  */
 
 #include <linux/edd.h>
+#include <asm/setup.h>
 
 #if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE)
+	movb	$0, (EDD_MBR_SIG_NR_BUF)
+	movb	$0, (EDDNR)
+
+# Check the command line for two options:
+# edd=of  disables EDD completely  (edd=off)
+# edd=sk  skips the MBR test    (edd=skipmbr)
+	pushl	%esi
+    	cmpl	$0, %cs:cmd_line_ptr
+	jz	done_cl
+	movl	%cs:(cmd_line_ptr), %esi
+# ds:esi has the pointer to the command line now
+	movl	$(COMMAND_LINE_SIZE-7), %ecx
+# loop through kernel command line one byte at a time
+cl_loop:
+	cmpl	$EDD_CL_EQUALS, (%si)
+	jz	found_edd_equals
+	incl	%esi
+	loop	cl_loop
+	jmp	done_cl
+found_edd_equals:
+# only looking at first two characters after equals
+    	addl	$4, %esi
+	cmpw	$EDD_CL_OFF, (%si)	# edd=of
+	jz	do_edd_off
+	cmpw	$EDD_CL_SKIP, (%si)	# edd=sk
+	jz	do_edd_skipmbr
+	jmp	done_cl
+do_edd_skipmbr:
+    	popl	%esi
+	jmp	edd_start
+do_edd_off:
+	popl	%esi
+	jmp	edd_done
+done_cl:
+	popl	%esi
+
+
 # Read the first sector of each BIOS disk device and store the 4-byte signature
 edd_mbr_sig_start:
-	movb	$0, (EDD_MBR_SIG_NR_BUF)	# zero value at EDD_MBR_SIG_NR_BUF
 	movb	$0x80, %dl			# from device 80
 	movw	$EDD_MBR_SIG_BUF, %bx		# store buffer ptr in bx
 edd_mbr_sig_read:
@@ -76,7 +115,6 @@
        						# result buffer for fn48
 	movw	$EDDBUF+EDDEXTSIZE, %si		# in ds:si, fn41 results
 						# kept just before that
-	movb	$0, (EDDNR)			# zero value at EDDNR
 	movb	$0x80, %dl			# BIOS device 0x80
 
 edd_check_ext:
diff -Nru a/arch/i386/boot/setup.S b/arch/i386/boot/setup.S
--- a/arch/i386/boot/setup.S	2005-01-10 20:11:19 -08:00
+++ b/arch/i386/boot/setup.S	2005-01-10 20:11:19 -08:00
@@ -162,7 +162,9 @@
 					# the contents of an initrd
 
 trampoline:	call	start_of_setup
-		.space	1024
+		.align 16
+					# The offset at this point is 0x240
+		.space	(0x7ff-0x240+1) # E820 & EDD space (ending at 0x7ff)
 # End of setup header #####################################################
 
 start_of_setup:
diff -Nru a/arch/i386/defconfig b/arch/i386/defconfig
--- a/arch/i386/defconfig	2005-01-10 20:11:20 -08:00
+++ b/arch/i386/defconfig	2005-01-10 20:11:20 -08:00
@@ -534,7 +534,6 @@
 CONFIG_IP_NF_TARGET_REDIRECT=y
 CONFIG_IP_NF_TARGET_NETMAP=y
 CONFIG_IP_NF_TARGET_SAME=y
-# CONFIG_IP_NF_NAT_LOCAL is not set
 # CONFIG_IP_NF_NAT_SNMP_BASIC is not set
 CONFIG_IP_NF_MANGLE=y
 CONFIG_IP_NF_TARGET_TOS=y
diff -Nru a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c
--- a/arch/i386/kernel/acpi/boot.c	2005-01-10 20:11:22 -08:00
+++ b/arch/i386/kernel/acpi/boot.c	2005-01-10 20:11:22 -08:00
@@ -484,6 +484,28 @@
 }
 EXPORT_SYMBOL(acpi_register_gsi);
 
+/*
+ *  ACPI based hotplug support for CPU
+ */
+#ifdef CONFIG_ACPI_HOTPLUG_CPU
+int
+acpi_map_lsapic(acpi_handle handle, int *pcpu)
+{
+	/* TBD */
+	return -EINVAL;
+}
+EXPORT_SYMBOL(acpi_map_lsapic);
+
+
+int
+acpi_unmap_lsapic(int cpu)
+{
+	/* TBD */
+	return -EINVAL;
+}
+EXPORT_SYMBOL(acpi_unmap_lsapic);
+#endif /* CONFIG_ACPI_HOTPLUG_CPU */
+
 static unsigned long __init
 acpi_scan_rsdp (
 	unsigned long		start,
@@ -788,13 +810,16 @@
 }
 
 /*
- * acpi_boot_init()
+ * acpi_boot_table_init() and acpi_boot_init()
  *  called from setup_arch(), always.
  *	1. checksums all tables
  *	2. enumerates lapics
  *	3. enumerates io-apics
  *
- * side effects:
+ * acpi_table_init() is separate to allow reading SRAT without
+ * other side effects.
+ *
+ * side effects of acpi_boot_init:
  *	acpi_lapic = 1 if LAPIC found
  *	acpi_ioapic = 1 if IOAPIC found
  *	if (acpi_lapic && acpi_ioapic) smp_found_config = 1;
@@ -808,7 +833,7 @@
  */
 
 int __init
-acpi_boot_init (void)
+acpi_boot_table_init(void)
 {
 	int error;
 
@@ -849,6 +874,21 @@
 			return error;
 		}
 	}
+
+	return 0;
+}
+
+
+int __init acpi_boot_init(void)
+{
+	/*
+	 * If acpi_disabled, bail out
+	 * One exception: acpi=ht continues far enough to enumerate LAPICs
+	 */
+	if (acpi_disabled && !acpi_ht)
+		 return 1;
+
+	acpi_table_parse(ACPI_BOOT, acpi_parse_sbf);
 
 	/*
 	 * set sci_int and PM timer address
diff -Nru a/arch/i386/kernel/apm.c b/arch/i386/kernel/apm.c
--- a/arch/i386/kernel/apm.c	2005-01-10 20:11:16 -08:00
+++ b/arch/i386/kernel/apm.c	2005-01-10 20:11:16 -08:00
@@ -2369,7 +2369,7 @@
 		 * (pm_idle), Wait for all processors to update cached/local
 		 * copies of pm_idle before proceeding.
 		 */
-		synchronize_kernel();
+		cpu_idle_wait();
 	}
 	if (((apm_info.bios.flags & APM_BIOS_DISENGAGED) == 0)
 	    && (apm_info.connection_version > 0x0100)) {
diff -Nru a/arch/i386/kernel/cpu/common.c b/arch/i386/kernel/cpu/common.c
--- a/arch/i386/kernel/cpu/common.c	2005-01-10 20:11:16 -08:00
+++ b/arch/i386/kernel/cpu/common.c	2005-01-10 20:11:16 -08:00
@@ -334,21 +334,19 @@
 
 	generic_identify(c);
 
-	printk(KERN_DEBUG "CPU: After generic identify, caps: %08lx %08lx %08lx %08lx\n",
-		c->x86_capability[0],
-		c->x86_capability[1],
-		c->x86_capability[2],
-		c->x86_capability[3]);
+	printk(KERN_DEBUG "CPU: After generic identify, caps:");
+	for (i = 0; i < NCAPINTS; i++)
+		printk(" %08lx", c->x86_capability[i]);
+	printk("\n");
 
 	if (this_cpu->c_identify) {
 		this_cpu->c_identify(c);
 
-	printk(KERN_DEBUG "CPU: After vendor identify, caps:  %08lx %08lx %08lx %08lx\n",
-		c->x86_capability[0],
-		c->x86_capability[1],
-		c->x86_capability[2],
-		c->x86_capability[3]);
-}
+		printk(KERN_DEBUG "CPU: After vendor identify, caps:");
+		for (i = 0; i < NCAPINTS; i++)
+			printk(" %08lx", c->x86_capability[i]);
+		printk("\n");
+	}
 
 	/*
 	 * Vendor-specific initialization.  In this section we
@@ -398,11 +396,10 @@
 
 	/* Now the feature flags better reflect actual CPU features! */
 
-	printk(KERN_DEBUG "CPU: After all inits, caps:        %08lx %08lx %08lx %08lx\n",
-	       c->x86_capability[0],
-	       c->x86_capability[1],
-	       c->x86_capability[2],
-	       c->x86_capability[3]);
+	printk(KERN_DEBUG "CPU: After all inits, caps:");
+	for (i = 0; i < NCAPINTS; i++)
+		printk(" %08lx", c->x86_capability[i]);
+	printk("\n");
 
 	/*
 	 * On SMP, boot_cpu_data holds the common feature set between
diff -Nru a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c
--- a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c	2005-01-10 20:11:18 -08:00
+++ b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c	2005-01-10 20:11:18 -08:00
@@ -249,7 +249,7 @@
 		/* Matched a non-match */
 		printk(KERN_INFO PFX "no table support for CPU model \"%s\": \n",
 		       cpu->x86_model_id);
-#ifdef CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI
+#ifndef CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI
 		printk(KERN_INFO PFX "try compiling with CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI enabled\n");
 #endif
 		return -ENOENT;
diff -Nru a/arch/i386/kernel/cpu/mtrr/generic.c b/arch/i386/kernel/cpu/mtrr/generic.c
--- a/arch/i386/kernel/cpu/mtrr/generic.c	2005-01-10 20:11:19 -08:00
+++ b/arch/i386/kernel/cpu/mtrr/generic.c	2005-01-10 20:11:19 -08:00
@@ -233,6 +233,13 @@
 static u32 deftype_lo, deftype_hi;
 static spinlock_t set_atomicity_lock = SPIN_LOCK_UNLOCKED;
 
+/*
+ * Since we are disabling the cache don't allow any interrupts - they
+ * would run extremely slow and would only increase the pain.  The caller must
+ * ensure that local interrupts are disabled and are reenabled after post_set()
+ * has been called.
+ */
+
 static void prepare_set(void)
 {
 	unsigned long cr0;
@@ -240,11 +247,11 @@
 	/*  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  */
+
 	spin_lock(&set_atomicity_lock);
 
 	/*  Enter the no-fill (CD=1, NW=0) cache mode and flush caches. */
 	cr0 = read_cr0() | 0x40000000;	/* set CD flag */
-	wbinvd();
 	write_cr0(cr0);
 	wbinvd();
 
@@ -266,8 +273,7 @@
 
 static void post_set(void)
 {
-	/*  Flush caches and TLBs  */
-	wbinvd();
+	/*  Flush TLBs (no need to flush caches - they are disabled)  */
 	__flush_tlb();
 
 	/* Intel (P6) standard MTRRs */
@@ -285,13 +291,16 @@
 static void generic_set_all(void)
 {
 	unsigned long mask, count;
+	unsigned long flags;
 
+	local_irq_save(flags);
 	prepare_set();
 
 	/* Actually set the state */
 	mask = set_mtrr_state(deftype_lo,deftype_hi);
 
 	post_set();
+	local_irq_restore(flags);
 
 	/*  Use the atomic bitops to update the global mask  */
 	for (count = 0; count < sizeof mask * 8; ++count) {
@@ -314,6 +323,9 @@
     [RETURNS] Nothing.
 */
 {
+	unsigned long flags;
+
+	local_irq_save(flags);
 	prepare_set();
 
 	if (size == 0) {
@@ -328,6 +340,7 @@
 	}
 
 	post_set();
+	local_irq_restore(flags);
 }
 
 int generic_validate_add_page(unsigned long base, unsigned long size, unsigned int type)
diff -Nru a/arch/i386/kernel/dmi_scan.c b/arch/i386/kernel/dmi_scan.c
--- a/arch/i386/kernel/dmi_scan.c	2005-01-10 20:11:24 -08:00
+++ b/arch/i386/kernel/dmi_scan.c	2005-01-10 20:11:24 -08:00
@@ -102,11 +102,10 @@
 static int __init dmi_iterate(void (*decode)(struct dmi_header *))
 {
 	u8 buf[15];
-	u32 fp=0xF0000;
+	char __iomem *p, *q;
 
-	while (fp < 0xFFFFF)
-	{
-		isa_memcpy_fromio(buf, fp, 15);
+	for (p = q = ioremap(0xF0000, 0x10000); q < p + 0x10000; q += 16) {
+		memcpy_fromio(buf, q, 15);
 		if(memcmp(buf, "_DMI_", 5)==0 && dmi_checksum(buf))
 		{
 			u16 num=buf[13]<<8|buf[12];
@@ -126,11 +125,13 @@
 				num, len));
 			dmi_printk((KERN_INFO "DMI table at 0x%08X.\n",
 				base));
-			if(dmi_table(base,len, num, decode)==0)
+			if(dmi_table(base,len, num, decode)==0) {
+				iounmap(p);
 				return 0;
+			}
 		}
-		fp+=16;
 	}
+	iounmap(p);
 	return -1;
 }
 
diff -Nru a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S
--- a/arch/i386/kernel/entry.S	2005-01-10 20:11:17 -08:00
+++ b/arch/i386/kernel/entry.S	2005-01-10 20:11:17 -08:00
@@ -184,9 +184,8 @@
 	jz restore_all
 	testl $IF_MASK,EFLAGS(%esp)     # interrupts off (exception path) ?
 	jz restore_all
-	movl $PREEMPT_ACTIVE,TI_preempt_count(%ebp)
 	sti
-	call schedule
+	call preempt_schedule
 	cli
 	movl $0,TI_preempt_count(%ebp)
 	jmp need_resched
diff -Nru a/arch/i386/kernel/head.S b/arch/i386/kernel/head.S
--- a/arch/i386/kernel/head.S	2005-01-10 20:11:16 -08:00
+++ b/arch/i386/kernel/head.S	2005-01-10 20:11:16 -08:00
@@ -128,9 +128,6 @@
 	movl %eax,%fs
 	movl %eax,%gs
 
-	xorl %ebx,%ebx
-	incl %ebx				/* This is a secondary processor (AP) */
-
 /*
  *	New page tables may be in 4Mbyte page mode and may
  *	be using the global pages. 
@@ -148,7 +145,7 @@
 #define cr4_bits mmu_cr4_features-__PAGE_OFFSET
 	movl cr4_bits,%edx
 	andl %edx,%edx
-	jz 3f
+	jz 6f
 	movl %cr4,%eax		# Turn on paging options (PSE,PAE,..)
 	orl %edx,%eax
 	movl %eax,%cr4
@@ -176,9 +173,10 @@
 	wrmsr
 
 6:
-	/* cpuid clobbered ebx, set it up again: */
+	/* This is a secondary processor (AP) */
 	xorl %ebx,%ebx
 	incl %ebx
+
 3:
 #endif /* CONFIG_SMP */
 
diff -Nru a/arch/i386/kernel/i386_ksyms.c b/arch/i386/kernel/i386_ksyms.c
--- a/arch/i386/kernel/i386_ksyms.c	2005-01-10 20:11:23 -08:00
+++ b/arch/i386/kernel/i386_ksyms.c	2005-01-10 20:11:23 -08:00
@@ -61,7 +61,6 @@
 
 /* platform dependent support */
 EXPORT_SYMBOL(boot_cpu_data);
-EXPORT_SYMBOL(MCA_bus);
 #ifdef CONFIG_DISCONTIGMEM
 EXPORT_SYMBOL(node_data);
 EXPORT_SYMBOL(physnode_map);
diff -Nru a/arch/i386/kernel/mca.c b/arch/i386/kernel/mca.c
--- a/arch/i386/kernel/mca.c	2005-01-10 20:11:21 -08:00
+++ b/arch/i386/kernel/mca.c	2005-01-10 20:11:21 -08:00
@@ -56,13 +56,16 @@
 
 static unsigned char which_scsi = 0;
 
+int MCA_bus = 0;
+EXPORT_SYMBOL(MCA_bus);
+
 /*
  * Motherboard register spinlock. Untested on SMP at the moment, but
  * are there any MCA SMP boxes?
  *
  * Yes - Alan
  */
-spinlock_t mca_lock = SPIN_LOCK_UNLOCKED;
+static spinlock_t mca_lock = SPIN_LOCK_UNLOCKED;
 
 /* Build the status info for the adapter */
 
@@ -119,7 +122,7 @@
 
 /*--------------------------------------------------------------------*/
 
-struct resource mca_standard_resources[] = {
+static struct resource mca_standard_resources[] = {
 	{ "system control port B (MCA)", 0x60, 0x60 },
 	{ "arbitration (MCA)", 0x90, 0x90 },
 	{ "card Select Feedback (MCA)", 0x91, 0x91 },
diff -Nru a/arch/i386/kernel/microcode.c b/arch/i386/kernel/microcode.c
--- a/arch/i386/kernel/microcode.c	2005-01-10 20:11:17 -08:00
+++ b/arch/i386/kernel/microcode.c	2005-01-10 20:11:17 -08:00
@@ -364,7 +364,7 @@
 	struct ucode_cpu_info *uci = ucode_cpu_info + cpu_num;
 
 	if (uci->mc == NULL) {
-		printk(KERN_INFO "microcode: No suitable data for CPU%d\n", cpu_num);
+		printk(KERN_INFO "microcode: No new microcode data for CPU%d\n", cpu_num);
 		return;
 	}
 
diff -Nru a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c
--- a/arch/i386/kernel/mpparse.c	2005-01-10 20:11:17 -08:00
+++ b/arch/i386/kernel/mpparse.c	2005-01-10 20:11:17 -08:00
@@ -309,8 +309,8 @@
 		printk(KERN_ERR "MAX_MPC_ENTRY exceeded!\n");
 	else
 		translation_table[mpc_record] = m; /* stash this for later */
-	if (m->trans_quad+1 > numnodes)
-		numnodes = m->trans_quad+1;
+	if (m->trans_quad < MAX_NUMNODES && !node_online(m->trans_quad))
+		node_set_online(m->trans_quad);
 }
 
 /*
diff -Nru a/arch/i386/kernel/numaq.c b/arch/i386/kernel/numaq.c
--- a/arch/i386/kernel/numaq.c	2005-01-10 20:11:21 -08:00
+++ b/arch/i386/kernel/numaq.c	2005-01-10 20:11:21 -08:00
@@ -40,8 +40,7 @@
  * Function: smp_dump_qct()
  *
  * Description: gets memory layout from the quad config table.  This
- * function also increments numnodes with the number of nodes (quads)
- * present.
+ * function also updates node_online_map with the nodes (quads) present.
  */
 static void __init smp_dump_qct(void)
 {
@@ -50,11 +49,10 @@
 	struct sys_cfg_data *scd =
 		(struct sys_cfg_data *)__va(SYS_CFG_DATA_PRIV_ADDR);
 
-	numnodes = 0;
-	for(node = 0; node < MAX_NUMNODES; node++) {
-		if(scd->quads_present31_0 & (1 << node)) {
+	nodes_clear(node_online_map);
+	for_each_node(node) {
+		if (scd->quads_present31_0 & (1 << node)) {
 			node_set_online(node);
-			numnodes++;
 			eq = &scd->eq[node];
 			/* Convert to pages */
 			node_start_pfn[node] = MB_TO_PAGES(
diff -Nru a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c
--- a/arch/i386/kernel/process.c	2005-01-10 20:11:15 -08:00
+++ b/arch/i386/kernel/process.c	2005-01-10 20:11:15 -08:00
@@ -72,6 +72,7 @@
  * Powermanagement idle function, if any..
  */
 void (*pm_idle)(void);
+static cpumask_t cpu_idle_map;
 
 void disable_hlt(void)
 {
@@ -93,7 +94,7 @@
  */
 void default_idle(void)
 {
-	if (!hlt_counter && current_cpu_data.hlt_works_ok) {
+	if (!hlt_counter && boot_cpu_data.hlt_works_ok) {
 		local_irq_disable();
 		if (!need_resched())
 			safe_halt();
@@ -144,28 +145,43 @@
  */
 void cpu_idle (void)
 {
+	int cpu = _smp_processor_id();
+
 	/* endless idle loop with no priority at all */
 	while (1) {
 		while (!need_resched()) {
 			void (*idle)(void);
-			/*
-			 * Mark this as an RCU critical section so that
-			 * synchronize_kernel() in the unload path waits
-			 * for our completion.
-			 */
-			rcu_read_lock();
+
+			if (cpu_isset(cpu, cpu_idle_map))
+				cpu_clear(cpu, cpu_idle_map);
+			rmb();
 			idle = pm_idle;
 
 			if (!idle)
 				idle = default_idle;
 
-			irq_stat[smp_processor_id()].idle_timestamp = jiffies;
+			irq_stat[cpu].idle_timestamp = jiffies;
 			idle();
-			rcu_read_unlock();
 		}
 		schedule();
 	}
 }
+
+void cpu_idle_wait(void)
+{
+	int cpu;
+	cpumask_t map;
+
+	for_each_online_cpu(cpu)
+		cpu_set(cpu, cpu_idle_map);
+
+	wmb();
+	do {
+		ssleep(1);
+		cpus_and(map, cpu_idle_map, cpu_online_map);
+	} while (!cpus_empty(map));
+}
+EXPORT_SYMBOL_GPL(cpu_idle_wait);
 
 /*
  * This uses new MONITOR/MWAIT instructions on P4 processors with PNI,
diff -Nru a/arch/i386/kernel/ptrace.c b/arch/i386/kernel/ptrace.c
--- a/arch/i386/kernel/ptrace.c	2005-01-10 20:11:17 -08:00
+++ b/arch/i386/kernel/ptrace.c	2005-01-10 20:11:17 -08:00
@@ -42,6 +42,12 @@
  */
 #define EFL_OFFSET ((EFL-2)*4-sizeof(struct pt_regs))
 
+static inline struct pt_regs *get_child_regs(struct task_struct *task)
+{
+	void *stack_top = (void *)task->thread.esp0;
+	return stack_top - sizeof(struct pt_regs);
+}
+
 /*
  * this routine will get a word off of the processes privileged stack. 
  * the offset is how far from the base addr as stored in the TSS.  
@@ -138,24 +144,119 @@
 	return retval;
 }
 
+#define LDT_SEGMENT 4
+
+static unsigned long convert_eip_to_linear(struct task_struct *child, struct pt_regs *regs)
+{
+	unsigned long addr, seg;
+
+	addr = regs->eip;
+	seg = regs->xcs & 0xffff;
+	if (regs->eflags & VM_MASK) {
+		addr = (addr & 0xffff) + (seg << 4);
+		return addr;
+	}
+
+	/*
+	 * We'll assume that the code segments in the GDT
+	 * are all zero-based. That is largely true: the
+	 * TLS segments are used for data, and the PNPBIOS
+	 * and APM bios ones we just ignore here.
+	 */
+	if (seg & LDT_SEGMENT) {
+		u32 *desc;
+		unsigned long base;
+
+		down(&child->mm->context.sem);
+		desc = child->mm->context.ldt + (seg & ~7);
+		base = (desc[0] >> 16) | ((desc[1] & 0xff) << 16) | (desc[1] & 0xff000000);
+
+		/* 16-bit code segment? */
+		if (!((desc[1] >> 22) & 1))
+			addr &= 0xffff;
+		addr += base;
+		up(&child->mm->context.sem);
+	}
+	return addr;
+}
+
+static inline int is_at_popf(struct task_struct *child, struct pt_regs *regs)
+{
+	int i, copied;
+	unsigned char opcode[16];
+	unsigned long addr = convert_eip_to_linear(child, regs);
+
+	copied = access_process_vm(child, addr, opcode, sizeof(opcode), 0);
+	for (i = 0; i < copied; i++) {
+		switch (opcode[i]) {
+		/* popf */
+		case 0x9d:
+			return 1;
+		/* opcode and address size prefixes */
+		case 0x66: case 0x67:
+			continue;
+		/* irrelevant prefixes (segment overrides and repeats) */
+		case 0x26: case 0x2e:
+		case 0x36: case 0x3e:
+		case 0x64: case 0x65:
+		case 0xf0: case 0xf2: case 0xf3:
+			continue;
+
+		/*
+		 * pushf: NOTE! We should probably not let
+		 * the user see the TF bit being set. But
+		 * it's more pain than it's worth to avoid
+		 * it, and a debugger could emulate this
+		 * all in user space if it _really_ cares.
+		 */
+		case 0x9c:
+		default:
+			return 0;
+		}
+	}
+	return 0;
+}
+
 static void set_singlestep(struct task_struct *child)
 {
-	long eflags;
+	struct pt_regs *regs = get_child_regs(child);
 
+	/*
+	 * Always set TIF_SINGLESTEP - this guarantees that 
+	 * we single-step system calls etc..  This will also
+	 * cause us to set TF when returning to user mode.
+	 */
 	set_tsk_thread_flag(child, TIF_SINGLESTEP);
-	eflags = get_stack_long(child, EFL_OFFSET);
-	put_stack_long(child, EFL_OFFSET, eflags | TRAP_FLAG);
+
+	/*
+	 * If TF was already set, don't do anything else
+	 */
+	if (regs->eflags & TRAP_FLAG)
+		return;
+
+	/* Set TF on the kernel stack.. */
+	regs->eflags |= TRAP_FLAG;
+
+	/*
+	 * ..but if TF is changed by the instruction we will trace,
+	 * don't mark it as being "us" that set it, so that we
+	 * won't clear it by hand later.
+	 */
+	if (is_at_popf(child, regs))
+		return;
+	
 	child->ptrace |= PT_DTRACE;
 }
 
 static void clear_singlestep(struct task_struct *child)
 {
-	if (child->ptrace & PT_DTRACE) {
-		long eflags;
+	/* Always clear TIF_SINGLESTEP... */
+	clear_tsk_thread_flag(child, TIF_SINGLESTEP);
 
-		clear_tsk_thread_flag(child, TIF_SINGLESTEP);
-		eflags = get_stack_long(child, EFL_OFFSET);
-		put_stack_long(child, EFL_OFFSET, eflags & ~TRAP_FLAG);
+	/* But touch TF only if it was set by us.. */
+	if (child->ptrace & PT_DTRACE) {
+		struct pt_regs *regs = get_child_regs(child);
+		regs->eflags &= ~TRAP_FLAG;
 		child->ptrace &= ~PT_DTRACE;
 	}
 }
@@ -553,6 +654,24 @@
 	return ret;
 }
 
+void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, int error_code)
+{
+	struct siginfo info;
+
+	tsk->thread.trap_no = 1;
+	tsk->thread.error_code = error_code;
+
+	memset(&info, 0, sizeof(info));
+	info.si_signo = SIGTRAP;
+	info.si_code = TRAP_BRKPT;
+
+	/* User-mode eip? */
+	info.si_addr = user_mode(regs) ? (void __user *) regs->eip : NULL;
+
+	/* Send us the fakey SIGTRAP */
+	force_sig_info(SIGTRAP, &info, tsk);
+}
+
 /* notification of system call entry/exit
  * - triggered by current->work.syscall_trace
  */
@@ -568,15 +687,19 @@
 			audit_syscall_exit(current, regs->eax);
 	}
 
-	if (!test_thread_flag(TIF_SYSCALL_TRACE) &&
-	    !test_thread_flag(TIF_SINGLESTEP))
-		return;
 	if (!(current->ptrace & PT_PTRACED))
 		return;
+
+	/* Fake a debug trap */
+	if (test_thread_flag(TIF_SINGLESTEP))
+		send_sigtrap(current, regs, 0);
+
+	if (!test_thread_flag(TIF_SYSCALL_TRACE))
+		return;
+
 	/* the 0x80 provides a way for the tracing parent to distinguish
 	   between a syscall stop and SIGTRAP delivery */
-	ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) &&
-				 !test_thread_flag(TIF_SINGLESTEP) ? 0x80 : 0));
+	ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) ? 0x80 : 0));
 
 	/*
 	 * this isn't the same as continuing with a signal, but it will do
diff -Nru a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c
--- a/arch/i386/kernel/setup.c	2005-01-10 20:11:19 -08:00
+++ b/arch/i386/kernel/setup.c	2005-01-10 20:11:19 -08:00
@@ -33,6 +33,7 @@
 #include <linux/bootmem.h>
 #include <linux/seq_file.h>
 #include <linux/console.h>
+#include <linux/mca.h>
 #include <linux/root_dev.h>
 #include <linux/highmem.h>
 #include <linux/module.h>
@@ -87,7 +88,6 @@
 extern acpi_interrupt_flags	acpi_sci_flags;
 #endif
 
-int MCA_bus;
 /* for MCA, but anyone else can use it if they want */
 unsigned int machine_id;
 unsigned int machine_submodel_id;
@@ -97,6 +97,9 @@
 /* For PCI or other memory-mapped resources */
 unsigned long pci_mem_start = 0x10000000;
 
+/* Boot loader ID as an integer, for the benefit of proc_dointvec */
+int bootloader_type;
+
 /* user-defined highmem size */
 static unsigned int highmem_pages = -1;
 
@@ -737,6 +740,10 @@
 			}
 		}
 
+		else if (!memcmp(from, "noexec=", 7))
+			noexec_setup(from + 7);
+
+
 #ifdef  CONFIG_X86_SMP
 		/*
 		 * If the BIOS enumerates physical processors before logical,
@@ -1288,6 +1295,15 @@
 
 static char * __init machine_specific_memory_setup(void);
 
+#ifdef CONFIG_MCA
+static void set_mca_bus(int x)
+{
+	MCA_bus = x;
+}
+#else
+static void set_mca_bus(int x) { }
+#endif
+
 /*
  * Determine if we were loaded by an EFI loader.  If so, then we have also been
  * passed the efi memmap, systab, etc., so we should use these data structures
@@ -1323,12 +1339,13 @@
 	ist_info = IST_INFO;
 	saved_videomode = VIDEO_MODE;
 	if( SYS_DESC_TABLE.length != 0 ) {
-		MCA_bus = SYS_DESC_TABLE.table[3] &0x2;
+		set_mca_bus(SYS_DESC_TABLE.table[3] & 0x2);
 		machine_id = SYS_DESC_TABLE.table[0];
 		machine_submodel_id = SYS_DESC_TABLE.table[1];
 		BIOS_revision = SYS_DESC_TABLE.table[2];
 	}
 	aux_device_present = AUX_DEVICE_INFO;
+	bootloader_type = LOADER_TYPE;
 
 #ifdef CONFIG_BLK_DEV_RAM
 	rd_image_start = RAMDISK_FLAGS & RAMDISK_IMAGE_START_MASK;
@@ -1404,6 +1421,7 @@
 	/*
 	 * Parse the ACPI tables for possible boot-time SMP configuration.
 	 */
+	acpi_boot_table_init();
 	acpi_boot_init();
 
 #ifdef CONFIG_X86_LOCAL_APIC
diff -Nru a/arch/i386/kernel/signal.c b/arch/i386/kernel/signal.c
--- a/arch/i386/kernel/signal.c	2005-01-10 20:11:18 -08:00
+++ b/arch/i386/kernel/signal.c	2005-01-10 20:11:18 -08:00
@@ -270,7 +270,6 @@
 		 struct pt_regs *regs, unsigned long mask)
 {
 	int tmp, err = 0;
-	unsigned long eflags;
 
 	tmp = 0;
 	__asm__("movl %%gs,%0" : "=r"(tmp): "0"(tmp));
@@ -292,16 +291,7 @@
 	err |= __put_user(current->thread.error_code, &sc->err);
 	err |= __put_user(regs->eip, &sc->eip);
 	err |= __put_user(regs->xcs, (unsigned int __user *)&sc->cs);
-
-	/*
-	 * Iff TF was set because the program is being single-stepped by a
-	 * debugger, don't save that information on the signal stack.. We
-	 * don't want debugging to change state.
-	 */
-	eflags = regs->eflags;
-	if (current->ptrace & PT_DTRACE)
-		eflags &= ~TF_MASK;
-	err |= __put_user(eflags, &sc->eflags);
+	err |= __put_user(regs->eflags, &sc->eflags);
 	err |= __put_user(regs->esp, &sc->esp_at_signal);
 	err |= __put_user(regs->xss, (unsigned int __user *)&sc->ss);
 
@@ -424,11 +414,9 @@
 	 * The tracer may want to single-step inside the
 	 * handler too.
 	 */
-	if (regs->eflags & TF_MASK) {
-		regs->eflags &= ~TF_MASK;
-		if (current->ptrace & PT_DTRACE)
-			ptrace_notify(SIGTRAP);
-	}
+	regs->eflags &= ~TF_MASK;
+	if (test_thread_flag(TIF_SINGLESTEP))
+		ptrace_notify(SIGTRAP);
 
 #if DEBUG_SIG
 	printk("SIG deliver (%s:%d): sp=%p pc=%p ra=%p\n",
@@ -519,11 +507,9 @@
 	 * The tracer may want to single-step inside the
 	 * handler too.
 	 */
-	if (regs->eflags & TF_MASK) {
-		regs->eflags &= ~TF_MASK;
-		if (current->ptrace & PT_DTRACE)
-			ptrace_notify(SIGTRAP);
-	}
+	regs->eflags &= ~TF_MASK;
+	if (test_thread_flag(TIF_SINGLESTEP))
+		ptrace_notify(SIGTRAP);
 
 #if DEBUG_SIG
 	printk("SIG deliver (%s:%d): sp=%p pc=%p ra=%p\n",
diff -Nru a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c
--- a/arch/i386/kernel/smpboot.c	2005-01-10 20:11:19 -08:00
+++ b/arch/i386/kernel/smpboot.c	2005-01-10 20:11:19 -08:00
@@ -411,12 +411,10 @@
 
 int cpucount;
 
-extern int cpu_idle(void);
-
 /*
  * Activate a secondary processor.
  */
-int __init start_secondary(void *unused)
+static void __init start_secondary(void *unused)
 {
 	/*
 	 * Dont put anything before smp_callin(), SMP
@@ -441,7 +439,7 @@
 	local_flush_tlb();
 	cpu_set(smp_processor_id(), cpu_online_map);
 	wmb();
-	return cpu_idle();
+	cpu_idle();
 }
 
 /*
diff -Nru a/arch/i386/kernel/srat.c b/arch/i386/kernel/srat.c
--- a/arch/i386/kernel/srat.c	2005-01-10 20:11:17 -08:00
+++ b/arch/i386/kernel/srat.c	2005-01-10 20:11:17 -08:00
@@ -232,18 +232,22 @@
 	 * a set of sequential node IDs starting at zero.  (ACPI doesn't seem
 	 * to specify the range of _PXM values.)
 	 */
-	numnodes = 0;		/* init total nodes in system */
+	/*
+	 * MCD - we no longer HAVE to number nodes sequentially.  PXM domain
+	 * numbers could go as high as 256, and MAX_NUMNODES for i386 is typically
+	 * 32, so we will continue numbering them in this manner until MAX_NUMNODES
+	 * approaches MAX_PXM_DOMAINS for i386.
+	 */
+	nodes_clear(node_online_map);
 	for (i = 0; i < MAX_PXM_DOMAINS; i++) {
 		if (BMAP_TEST(pxm_bitmap, i)) {
-			pxm_to_nid_map[i] = numnodes;
-			nid_to_pxm_map[numnodes] = i;
-			node_set_online(numnodes);
-			++numnodes;
+			nid = num_online_nodes();
+			pxm_to_nid_map[i] = nid;
+			nid_to_pxm_map[nid] = i;
+			node_set_online(nid);
 		}
 	}
-
-	if (numnodes == 0)
-		BUG();
+	BUG_ON(num_online_nodes() == 0);
 
 	/* set cnode id in memory chunk structure */
 	for (i = 0; i < num_memory_chunks; i++)
@@ -254,7 +258,7 @@
 		printk("%02X ", pxm_bitmap[i]);
 	}
 	printk("\n");
-	printk("Number of logical nodes in system = %d\n", numnodes);
+	printk("Number of logical nodes in system = %d\n", num_online_nodes());
 	printk("Number of memory chunks in system = %d\n", num_memory_chunks);
 
 	for (j = 0; j < num_memory_chunks; j++){
@@ -265,7 +269,7 @@
 	}
  
 	/*calculate node_start_pfn/node_end_pfn arrays*/
-	for (nid = 0; nid < numnodes; nid++) {
+	for_each_online_node(nid) {
 		int been_here_before = 0;
 
 		for (j = 0; j < num_memory_chunks; j++){
@@ -397,7 +401,7 @@
 	int first;
 	unsigned long end = 0;
 
-	for (nid = 0; nid < numnodes; nid++) {
+	for_each_online_node(nid) {
 		first = 1;
 		for (c = 0; c < num_memory_chunks; c++){
 			if (node_memory_chunk[c].nid == nid) {
@@ -425,8 +429,8 @@
 		zholes_size_init++;
 		get_zholes_init();
 	}
-	if((nid >= numnodes) | (nid >= MAX_NUMNODES))
-		printk("%s: nid = %d is invalid. numnodes = %d",
-		       __FUNCTION__, nid, numnodes);
+	if (nid >= MAX_NUMNODES || !node_online(nid))
+		printk("%s: nid = %d is invalid/offline. num_online_nodes = %d",
+		       __FUNCTION__, nid, num_online_nodes());
 	return &zholes_size[nid * MAX_NR_ZONES];
 }
diff -Nru a/arch/i386/kernel/time.c b/arch/i386/kernel/time.c
--- a/arch/i386/kernel/time.c	2005-01-10 20:11:19 -08:00
+++ b/arch/i386/kernel/time.c	2005-01-10 20:11:19 -08:00
@@ -45,6 +45,7 @@
 #include <linux/sysdev.h>
 #include <linux/bcd.h>
 #include <linux/efi.h>
+#include <linux/mca.h>
 
 #include <asm/io.h>
 #include <asm/smp.h>
@@ -261,8 +262,7 @@
 			last_rtc_update = xtime.tv_sec - 600; /* do it again in 60 s */
 	}
 
-#ifdef CONFIG_MCA
-	if( MCA_bus ) {
+	if (MCA_bus) {
 		/* The PS/2 uses level-triggered interrupts.  You can't
 		turn them off, nor would you want to (any attempt to
 		enable edge-triggered interrupts usually gets intercepted by a
@@ -275,7 +275,6 @@
 		irq = inb_p( 0x61 );	/* read the current state */
 		outb_p( irq|0x80, 0x61 );	/* reset the IRQ */
 	}
-#endif
 }
 
 /*
@@ -343,12 +342,13 @@
 		hpet_reenable();
 #endif
 	sec = get_cmos_time() + clock_cmos_diff;
-	sleep_length = get_cmos_time() - sleep_start;
+	sleep_length = (get_cmos_time() - sleep_start) * HZ;
 	write_seqlock_irqsave(&xtime_lock, flags);
 	xtime.tv_sec = sec;
 	xtime.tv_nsec = 0;
 	write_sequnlock_irqrestore(&xtime_lock, flags);
-	jiffies += sleep_length * HZ;
+	jiffies += sleep_length;
+	wall_jiffies += sleep_length;
 	return 0;
 }
 
diff -Nru a/arch/i386/kernel/trampoline.S b/arch/i386/kernel/trampoline.S
--- a/arch/i386/kernel/trampoline.S	2005-01-10 20:11:18 -08:00
+++ b/arch/i386/kernel/trampoline.S	2005-01-10 20:11:18 -08:00
@@ -51,8 +51,14 @@
 	movl	$0xA5A5A5A5, trampoline_data - r_base
 				# write marker for master knows we're running
 
-	lidt	boot_idt - r_base	# load idt with 0, 0
-	lgdt	boot_gdt - r_base	# load gdt with whatever is appropriate
+	/* GDT tables in non default location kernel can be beyond 16MB and
+	 * lgdt will not be able to load the address as in real mode default
+	 * operand size is 16bit. Use lgdtl instead to force operand size
+	 * to 32 bit.
+	 */
+
+	lidtl	boot_idt - r_base	# load idt with 0, 0
+	lgdtl	boot_gdt - r_base	# load gdt with whatever is appropriate
 
 	xor	%ax, %ax
 	inc	%ax		# protected mode (PE) bit
diff -Nru a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c
--- a/arch/i386/kernel/traps.c	2005-01-10 20:11:16 -08:00
+++ b/arch/i386/kernel/traps.c	2005-01-10 20:11:16 -08:00
@@ -306,7 +306,7 @@
 	};
 	static int die_counter;
 
-	if (die.lock_owner != smp_processor_id()) {
+	if (die.lock_owner != _smp_processor_id()) {
 		console_verbose();
 		spin_lock_irq(&die.lock);
 		die.lock_owner = smp_processor_id();
@@ -682,7 +682,6 @@
 {
 	unsigned int condition;
 	struct task_struct *tsk = current;
-	siginfo_t info;
 
 	__asm__ __volatile__("movl %%db6,%0" : "=r" (condition));
 
@@ -705,36 +704,29 @@
 	/* Save debug status register where ptrace can see it */
 	tsk->thread.debugreg[6] = condition;
 
-	/* Mask out spurious TF errors due to lazy TF clearing */
+	/*
+	 * Single-stepping through TF: make sure we ignore any events in
+	 * kernel space (but re-enable TF when returning to user mode).
+	 * And if the event was due to a debugger (PT_DTRACE), clear the
+	 * TF flag so that register information is correct.
+	 */
 	if (condition & DR_STEP) {
 		/*
-		 * The TF error should be masked out only if the current
-		 * process is not traced and if the TRAP flag has been set
-		 * previously by a tracing process (condition detected by
-		 * the PT_DTRACE flag); remember that the i386 TRAP flag
-		 * can be modified by the process itself in user mode,
-		 * allowing programs to debug themselves without the ptrace()
-		 * interface.
+		 * We already checked v86 mode above, so we can
+		 * check for kernel mode by just checking the CPL
+		 * of CS.
 		 */
 		if ((regs->xcs & 3) == 0)
 			goto clear_TF_reenable;
-		if ((tsk->ptrace & (PT_DTRACE|PT_PTRACED)) == PT_DTRACE)
-			goto clear_TF;
+
+		if (likely(tsk->ptrace & PT_DTRACE)) {
+			tsk->ptrace &= ~PT_DTRACE;
+			regs->eflags &= ~TF_MASK;
+		}
 	}
 
 	/* Ok, finally something we can handle */
-	tsk->thread.trap_no = 1;
-	tsk->thread.error_code = error_code;
-	info.si_signo = SIGTRAP;
-	info.si_errno = 0;
-	info.si_code = TRAP_BRKPT;
-	
-	/* If this is a kernel mode trap, save the user PC on entry to 
-	 * the kernel, that's what the debugger can make sense of.
-	 */
-	info.si_addr = ((regs->xcs & 3) == 0) ? (void __user *)tsk->thread.eip
-	                                      : (void __user *)regs->eip;
-	force_sig_info(SIGTRAP, &info, tsk);
+	send_sigtrap(tsk, regs, error_code);
 
 	/* Disable additional traps. They'll be re-enabled when
 	 * the signal is delivered.
@@ -751,7 +743,6 @@
 
 clear_TF_reenable:
 	set_tsk_thread_flag(tsk, TIF_SINGLESTEP);
-clear_TF:
 	regs->eflags &= ~TF_MASK;
 	return;
 }
@@ -1004,9 +995,11 @@
 void __init trap_init(void)
 {
 #ifdef CONFIG_EISA
-	if (isa_readl(0x0FFFD9) == 'E'+('I'<<8)+('S'<<16)+('A'<<24)) {
+	void __iomem *p = ioremap(0x0FFFD9, 4);
+	if (readl(p) == 'E'+('I'<<8)+('S'<<16)+('A'<<24)) {
 		EISA_bus = 1;
 	}
+	iounmap(p);
 #endif
 
 #ifdef CONFIG_X86_LOCAL_APIC
diff -Nru a/arch/i386/kernel/vm86.c b/arch/i386/kernel/vm86.c
--- a/arch/i386/kernel/vm86.c	2005-01-10 20:11:16 -08:00
+++ b/arch/i386/kernel/vm86.c	2005-01-10 20:11:16 -08:00
@@ -137,6 +137,7 @@
 static void mark_screen_rdonly(struct task_struct * tsk)
 {
 	pgd_t *pgd;
+	pud_t *pud;
 	pmd_t *pmd;
 	pte_t *pte, *mapped;
 	int i;
@@ -151,7 +152,15 @@
 		pgd_clear(pgd);
 		goto out;
 	}
-	pmd = pmd_offset(pgd, 0xA0000);
+	pud = pud_offset(pgd, 0xA0000);
+	if (pud_none(*pud))
+		goto out;
+	if (pud_bad(*pud)) {
+		pud_ERROR(*pud);
+		pud_clear(pud);
+		goto out;
+	}
+	pmd = pmd_offset(pud, 0xA0000);
 	if (pmd_none(*pmd))
 		goto out;
 	if (pmd_bad(*pmd)) {
diff -Nru a/arch/i386/lib/delay.c b/arch/i386/lib/delay.c
--- a/arch/i386/lib/delay.c	2005-01-10 20:11:22 -08:00
+++ b/arch/i386/lib/delay.c	2005-01-10 20:11:22 -08:00
@@ -34,7 +34,7 @@
 	xloops *= 4;
 	__asm__("mull %0"
 		:"=d" (xloops), "=&a" (d0)
-		:"1" (xloops),"0" (current_cpu_data.loops_per_jiffy * (HZ/4)));
+		:"1" (xloops),"0" (cpu_data[_smp_processor_id()].loops_per_jiffy * (HZ/4)));
         __delay(++xloops);
 }
 
diff -Nru a/arch/i386/mach-default/topology.c b/arch/i386/mach-default/topology.c
--- a/arch/i386/mach-default/topology.c	2005-01-10 20:11:22 -08:00
+++ b/arch/i386/mach-default/topology.c	2005-01-10 20:11:22 -08:00
@@ -32,6 +32,37 @@
 
 struct i386_cpu cpu_devices[NR_CPUS];
 
+int arch_register_cpu(int num){
+	struct node *parent = NULL;
+	
+#ifdef CONFIG_NUMA
+	int node = cpu_to_node(num);
+	if (node_online(node))
+		parent = &node_devices[node].node;
+#endif /* CONFIG_NUMA */
+
+	return register_cpu(&cpu_devices[num].cpu, num, parent);
+}
+
+#ifdef CONFIG_HOTPLUG_CPU
+
+void arch_unregister_cpu(int num) {
+	struct node *parent = NULL;
+
+#ifdef CONFIG_NUMA
+	int node = cpu_to_node(num);
+	if (node_online(node))
+		parent = &node_devices[node].node;
+#endif /* CONFIG_NUMA */
+
+	return unregister_cpu(&cpu_devices[num].cpu, parent);
+}
+EXPORT_SYMBOL(arch_register_cpu);
+EXPORT_SYMBOL(arch_unregister_cpu);
+#endif /*CONFIG_HOTPLUG_CPU*/
+
+
+
 #ifdef CONFIG_NUMA
 #include <linux/mmzone.h>
 #include <asm/node.h>
diff -Nru a/arch/i386/mach-voyager/voyager_smp.c b/arch/i386/mach-voyager/voyager_smp.c
--- a/arch/i386/mach-voyager/voyager_smp.c	2005-01-10 20:11:18 -08:00
+++ b/arch/i386/mach-voyager/voyager_smp.c	2005-01-10 20:11:18 -08:00
@@ -457,13 +457,12 @@
 }
 
 /* Routine initially called when a non-boot CPU is brought online */
-int __init
+static void __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();
 
@@ -520,7 +519,7 @@
 
 	cpu_set(cpuid, cpu_online_map);
 	wmb();
-	return cpu_idle();
+	cpu_idle();
 }
 
 
diff -Nru a/arch/i386/mm/discontig.c b/arch/i386/mm/discontig.c
--- a/arch/i386/mm/discontig.c	2005-01-10 20:11:19 -08:00
+++ b/arch/i386/mm/discontig.c	2005-01-10 20:11:19 -08:00
@@ -41,7 +41,7 @@
  * numa interface - we expect the numa architecture specfic code to have
  *                  populated the following initialisation.
  *
- * 1) numnodes         - the total number of nodes configured in the system
+ * 1) node_online_map  - the map of all nodes configured (online) in the system
  * 2) physnode_map     - the mapping between a pfn and owning node
  * 3) node_start_pfn   - the starting page frame number for a node
  * 3) node_end_pfn     - the ending page fram number for a node
@@ -93,12 +93,12 @@
 
 	/* Run the memory configuration and find the top of memory. */
 	find_max_pfn();
-	node_start_pfn[0]  = 0;
-	node_end_pfn[0]	  = max_pfn;
+	node_start_pfn[0] = 0;
+	node_end_pfn[0] = max_pfn;
 
         /* Indicate there is one node available. */
+	nodes_clear(node_online_map);
 	node_set_online(0);
-	numnodes = 1;
 	return 1;
 }
 
@@ -183,7 +183,9 @@
 	unsigned long pfn;
 	int node;
 
-	for (node = 1; node < numnodes; ++node) {
+	for_each_online_node(node) {
+		if (node == 0)
+			continue;
 		for (pfn=0; pfn < node_remap_size[node]; pfn += PTRS_PER_PTE) {
 			vaddr = node_remap_start_vaddr[node]+(pfn<<PAGE_SHIFT);
 			set_pmd_pfn((ulong) vaddr, 
@@ -198,7 +200,9 @@
 	int nid;
 	unsigned long size, reserve_pages = 0;
 
-	for (nid = 1; nid < numnodes; nid++) {
+	for_each_online_node(nid) {
+		if (nid == 0)
+			continue;
 		/* calculate the size of the mem_map needed in bytes */
 		size = (node_end_pfn[nid] - node_start_pfn[nid] + 1) 
 			* sizeof(struct page) + sizeof(pg_data_t);
@@ -248,7 +252,7 @@
 	get_memcfg_numa();
 
 	/* Fill in the physnode_map */
-	for (nid = 0; nid < numnodes; nid++) {
+	for_each_online_node(nid) {
 		printk("Node: %d, start_pfn: %ld, end_pfn: %ld\n",
 				nid, node_start_pfn[nid], node_end_pfn[nid]);
 		printk("  Setting physnode_map array to node %d for pfns:\n  ",
@@ -285,7 +289,7 @@
 
 	printk("Low memory ends at vaddr %08lx\n",
 			(ulong) pfn_to_kaddr(max_low_pfn));
-	for (nid = 0; nid < numnodes; nid++) {
+	for_each_online_node(nid) {
 		node_remap_start_vaddr[nid] = pfn_to_kaddr(
 			(highstart_pfn + reserve_pages) - node_remap_offset[nid]);
 		allocate_pgdat(nid);
@@ -297,7 +301,7 @@
 	printk("High memory starts at vaddr %08lx\n",
 			(ulong) pfn_to_kaddr(highstart_pfn));
 	vmalloc_earlyreserve = reserve_pages * PAGE_SIZE;
-	for (nid = 0; nid < numnodes; nid++)
+	for_each_online_node(nid)
 		find_max_pfn_node(nid);
 
 	NODE_DATA(0)->bdata = &node0_bdata;
@@ -375,14 +379,16 @@
 	 * Clobber node 0's links and NULL out pgdat_list before starting.
 	 */
 	pgdat_list = NULL;
-	for (nid = numnodes - 1; nid >= 0; nid--) {       
+	for (nid = MAX_NUMNODES - 1; nid >= 0; nid--) {
+		if (!node_online(nid))
+			continue;
 		if (nid)
 			memset(NODE_DATA(nid), 0, sizeof(pg_data_t));
 		NODE_DATA(nid)->pgdat_next = pgdat_list;
 		pgdat_list = NODE_DATA(nid);
 	}
 
-	for (nid = 0; nid < numnodes; nid++) {
+	for_each_online_node(nid) {
 		unsigned long zones_size[MAX_NR_ZONES] = {0, 0, 0};
 		unsigned long *zholes_size;
 		unsigned int max_dma;
@@ -464,11 +470,6 @@
 void __init set_max_mapnr_init(void)
 {
 #ifdef CONFIG_HIGHMEM
-	struct zone *high0 = &NODE_DATA(0)->node_zones[ZONE_HIGHMEM];
-	if (high0->spanned_pages > 0)
-	      	highmem_start_page = high0->zone_mem_map;
-	else
-		highmem_start_page = pfn_to_page(max_low_pfn - 1) + 1;
 	num_physpages = highend_pfn;
 #else
 	num_physpages = max_low_pfn;
diff -Nru a/arch/i386/mm/fault.c b/arch/i386/mm/fault.c
--- a/arch/i386/mm/fault.c	2005-01-10 20:11:15 -08:00
+++ b/arch/i386/mm/fault.c	2005-01-10 20:11:15 -08:00
@@ -518,6 +518,7 @@
 		int index = pgd_index(address);
 		unsigned long pgd_paddr;
 		pgd_t *pgd, *pgd_k;
+		pud_t *pud, *pud_k;
 		pmd_t *pmd, *pmd_k;
 		pte_t *pte_k;
 
@@ -530,11 +531,17 @@
 
 		/*
 		 * set_pgd(pgd, *pgd_k); here would be useless on PAE
-		 * and redundant with the set_pmd() on non-PAE.
+		 * and redundant with the set_pmd() on non-PAE. As would
+		 * set_pud.
 		 */
 
-		pmd = pmd_offset(pgd, address);
-		pmd_k = pmd_offset(pgd_k, address);
+		pud = pud_offset(pgd, address);
+		pud_k = pud_offset(pgd_k, address);
+		if (!pud_present(*pud_k))
+			goto no_context;
+		
+		pmd = pmd_offset(pud, address);
+		pmd_k = pmd_offset(pud_k, address);
 		if (!pmd_present(*pmd_k))
 			goto no_context;
 		set_pmd(pmd, *pmd_k);
diff -Nru a/arch/i386/mm/highmem.c b/arch/i386/mm/highmem.c
--- a/arch/i386/mm/highmem.c	2005-01-10 20:11:19 -08:00
+++ b/arch/i386/mm/highmem.c	2005-01-10 20:11:19 -08:00
@@ -3,7 +3,7 @@
 void *kmap(struct page *page)
 {
 	might_sleep();
-	if (page < highmem_start_page)
+	if (!PageHighMem(page))
 		return page_address(page);
 	return kmap_high(page);
 }
@@ -12,7 +12,7 @@
 {
 	if (in_interrupt())
 		BUG();
-	if (page < highmem_start_page)
+	if (!PageHighMem(page))
 		return;
 	kunmap_high(page);
 }
@@ -32,7 +32,7 @@
 
 	/* even !CONFIG_PREEMPT needs this, for in_atomic in do_page_fault */
 	inc_preempt_count();
-	if (page < highmem_start_page)
+	if (!PageHighMem(page))
 		return page_address(page);
 
 	idx = type + KM_TYPE_NR*smp_processor_id();
diff -Nru a/arch/i386/mm/hugetlbpage.c b/arch/i386/mm/hugetlbpage.c
--- a/arch/i386/mm/hugetlbpage.c	2005-01-10 20:11:22 -08:00
+++ b/arch/i386/mm/hugetlbpage.c	2005-01-10 20:11:22 -08:00
@@ -21,20 +21,24 @@
 static pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr)
 {
 	pgd_t *pgd;
+	pud_t *pud;
 	pmd_t *pmd = NULL;
 
 	pgd = pgd_offset(mm, addr);
-	pmd = pmd_alloc(mm, pgd, addr);
+	pud = pud_alloc(mm, pgd, addr);
+	pmd = pmd_alloc(mm, pud, addr);
 	return (pte_t *) pmd;
 }
 
 static pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr)
 {
 	pgd_t *pgd;
+	pud_t *pud;
 	pmd_t *pmd = NULL;
 
 	pgd = pgd_offset(mm, addr);
-	pmd = pmd_offset(pgd, addr);
+	pud = pud_offset(pgd, addr);
+	pmd = pmd_offset(pud, addr);
 	return (pte_t *) pmd;
 }
 
diff -Nru a/arch/i386/mm/init.c b/arch/i386/mm/init.c
--- a/arch/i386/mm/init.c	2005-01-10 20:11:21 -08:00
+++ b/arch/i386/mm/init.c	2005-01-10 20:11:21 -08:00
@@ -54,15 +54,18 @@
  */
 static pmd_t * __init one_md_table_init(pgd_t *pgd)
 {
+	pud_t *pud;
 	pmd_t *pmd_table;
 		
 #ifdef CONFIG_X86_PAE
 	pmd_table = (pmd_t *) alloc_bootmem_low_pages(PAGE_SIZE);
 	set_pgd(pgd, __pgd(__pa(pmd_table) | _PAGE_PRESENT));
-	if (pmd_table != pmd_offset(pgd, 0)) 
+	pud = pud_offset(pgd, 0);
+	if (pmd_table != pmd_offset(pud, 0)) 
 		BUG();
 #else
-	pmd_table = pmd_offset(pgd, 0);
+	pud = pud_offset(pgd, 0);
+	pmd_table = pmd_offset(pud, 0);
 #endif
 
 	return pmd_table;
@@ -100,6 +103,7 @@
 static void __init page_table_range_init (unsigned long start, unsigned long end, pgd_t *pgd_base)
 {
 	pgd_t *pgd;
+	pud_t *pud;
 	pmd_t *pmd;
 	int pgd_idx, pmd_idx;
 	unsigned long vaddr;
@@ -112,8 +116,8 @@
 	for ( ; (pgd_idx < PTRS_PER_PGD) && (vaddr != end); pgd++, pgd_idx++) {
 		if (pgd_none(*pgd)) 
 			one_md_table_init(pgd);
-
-		pmd = pmd_offset(pgd, vaddr);
+		pud = pud_offset(pgd, vaddr);
+		pmd = pmd_offset(pud, vaddr);
 		for (; (pmd_idx < PTRS_PER_PMD) && (vaddr != end); pmd++, pmd_idx++) {
 			if (pmd_none(*pmd)) 
 				one_page_table_init(pmd);
@@ -126,7 +130,7 @@
 
 static inline int is_kernel_text(unsigned long addr)
 {
-	if (addr >= (unsigned long)_stext && addr <= (unsigned long)__init_end)
+	if (addr >= PAGE_OFFSET && addr <= (unsigned long)__init_end)
 		return 1;
 	return 0;
 }
@@ -233,7 +237,7 @@
 EXPORT_SYMBOL(kmap_pte);
 
 #define kmap_get_fixmap_pte(vaddr)					\
-	pte_offset_kernel(pmd_offset(pgd_offset_k(vaddr), (vaddr)), (vaddr))
+	pte_offset_kernel(pmd_offset(pud_offset(pgd_offset_k(vaddr), vaddr), (vaddr)), (vaddr))
 
 void __init kmap_init(void)
 {
@@ -249,6 +253,7 @@
 void __init permanent_kmaps_init(pgd_t *pgd_base)
 {
 	pgd_t *pgd;
+	pud_t *pud;
 	pmd_t *pmd;
 	pte_t *pte;
 	unsigned long vaddr;
@@ -257,7 +262,8 @@
 	page_table_range_init(vaddr, vaddr + PAGE_SIZE*LAST_PKMAP, pgd_base);
 
 	pgd = swapper_pg_dir + pgd_index(vaddr);
-	pmd = pmd_offset(pgd, vaddr);
+	pud = pud_offset(pgd, vaddr);
+	pmd = pmd_offset(pud, vaddr);
 	pte = pte_offset_kernel(pmd, vaddr);
 	pkmap_page_table = pte;	
 }
@@ -424,7 +430,7 @@
  * on      Enable
  * off     Disable
  */
-static int __init noexec_setup(char *str)
+void __init noexec_setup(const char *str)
 {
 	if (!strncmp(str, "on",2) && cpu_has_nx) {
 		__supported_pte_mask |= _PAGE_NX;
@@ -433,11 +439,8 @@
 		disable_nx = 1;
 		__supported_pte_mask &= ~_PAGE_NX;
 	}
-	return 1;
 }
 
-__setup("noexec=", noexec_setup);
-
 int nx_enabled = 0;
 #ifdef CONFIG_X86_PAE
 
@@ -549,7 +552,6 @@
 static void __init set_max_mapnr_init(void)
 {
 #ifdef CONFIG_HIGHMEM
-	highmem_start_page = pfn_to_page(highstart_pfn);
 	max_mapnr = num_physpages = highend_pfn;
 #else
 	max_mapnr = num_physpages = max_low_pfn;
diff -Nru a/arch/i386/mm/ioremap.c b/arch/i386/mm/ioremap.c
--- a/arch/i386/mm/ioremap.c	2005-01-10 20:11:17 -08:00
+++ b/arch/i386/mm/ioremap.c	2005-01-10 20:11:17 -08:00
@@ -80,9 +80,14 @@
 		BUG();
 	spin_lock(&init_mm.page_table_lock);
 	do {
+		pud_t *pud;
 		pmd_t *pmd;
-		pmd = pmd_alloc(&init_mm, dir, address);
+		
 		error = -ENOMEM;
+		pud = pud_alloc(&init_mm, dir, address);
+		if (!pud)
+			break;
+		pmd = pmd_alloc(&init_mm, pud, address);
 		if (!pmd)
 			break;
 		if (remap_area_pmd(pmd, address, end - address,
@@ -130,7 +135,7 @@
 	/*
 	 * Don't allow anybody to remap normal RAM that we're using..
 	 */
-	if (phys_addr < virt_to_phys(high_memory)) {
+	if (phys_addr <= virt_to_phys(high_memory - 1)) {
 		char *t_addr, *t_end;
 		struct page *page;
 
@@ -197,7 +202,7 @@
 	/* Guaranteed to be > phys_addr, as per __ioremap() */
 	last_addr = phys_addr + size - 1;
 
-	if (last_addr < virt_to_phys(high_memory)) { 
+	if (last_addr < virt_to_phys(high_memory) - 1) {
 		struct page *ppage = virt_to_page(__va(phys_addr));		
 		unsigned long npages;
 
@@ -232,7 +237,7 @@
 		return;
 	} 
 
-	if (p->flags && p->phys_addr < virt_to_phys(high_memory)) { 
+	if (p->flags && p->phys_addr < virt_to_phys(high_memory) - 1) {
 		change_page_attr(virt_to_page(__va(p->phys_addr)),
 				 p->size >> PAGE_SHIFT,
 				 PAGE_KERNEL); 				 
diff -Nru a/arch/i386/mm/pageattr.c b/arch/i386/mm/pageattr.c
--- a/arch/i386/mm/pageattr.c	2005-01-10 20:11:18 -08:00
+++ b/arch/i386/mm/pageattr.c	2005-01-10 20:11:18 -08:00
@@ -19,11 +19,15 @@
 
 pte_t *lookup_address(unsigned long address) 
 { 
-	pgd_t *pgd = pgd_offset_k(address); 
+	pgd_t *pgd = pgd_offset_k(address);
+	pud_t *pud;
 	pmd_t *pmd;
 	if (pgd_none(*pgd))
 		return NULL;
-	pmd = pmd_offset(pgd, address); 	       
+	pud = pud_offset(pgd, address);
+	if (pud_none(*pud))
+		return NULL;
+	pmd = pmd_offset(pud, address);
 	if (pmd_none(*pmd))
 		return NULL;
 	if (pmd_large(*pmd))
@@ -77,9 +81,11 @@
 	spin_lock_irqsave(&pgd_lock, flags);
 	for (page = pgd_list; page; page = (struct page *)page->index) {
 		pgd_t *pgd;
+		pud_t *pud;
 		pmd_t *pmd;
 		pgd = (pgd_t *)page_address(page) + pgd_index(address);
-		pmd = pmd_offset(pgd, address);
+		pud = pud_offset(pgd, address);
+		pmd = pmd_offset(pud, address);
 		set_pte_atomic((pte_t *)pmd, pte);
 	}
 	spin_unlock_irqrestore(&pgd_lock, flags);
@@ -92,7 +98,7 @@
 static inline void revert_page(struct page *kpte_page, unsigned long address)
 {
 	pte_t *linear = (pte_t *) 
-		pmd_offset(pgd_offset(&init_mm, address), address);
+		pmd_offset(pud_offset(pgd_offset_k(address), address), address);
 	set_pmd_pte(linear,  address,
 		    pfn_pte((__pa(address) & LARGE_PAGE_MASK) >> PAGE_SHIFT,
 			    PAGE_KERNEL_LARGE));
@@ -105,10 +111,7 @@
 	unsigned long address;
 	struct page *kpte_page;
 
-#ifdef CONFIG_HIGHMEM
-	if (page >= highmem_start_page) 
-		BUG(); 
-#endif
+	BUG_ON(PageHighMem(page));
 	address = (unsigned long)page_address(page);
 
 	kpte = lookup_address(address);
diff -Nru a/arch/i386/mm/pgtable.c b/arch/i386/mm/pgtable.c
--- a/arch/i386/mm/pgtable.c	2005-01-10 20:11:23 -08:00
+++ b/arch/i386/mm/pgtable.c	2005-01-10 20:11:23 -08:00
@@ -62,6 +62,7 @@
 static void set_pte_pfn(unsigned long vaddr, unsigned long pfn, pgprot_t flags)
 {
 	pgd_t *pgd;
+	pud_t *pud;
 	pmd_t *pmd;
 	pte_t *pte;
 
@@ -70,7 +71,12 @@
 		BUG();
 		return;
 	}
-	pmd = pmd_offset(pgd, vaddr);
+	pud = pud_offset(pgd, vaddr);
+	if (pud_none(*pud)) {
+		BUG();
+		return;
+	}
+	pmd = pmd_offset(pud, vaddr);
 	if (pmd_none(*pmd)) {
 		BUG();
 		return;
@@ -95,6 +101,7 @@
 void set_pmd_pfn(unsigned long vaddr, unsigned long pfn, pgprot_t flags)
 {
 	pgd_t *pgd;
+	pud_t *pud;
 	pmd_t *pmd;
 
 	if (vaddr & (PMD_SIZE-1)) {		/* vaddr is misaligned */
@@ -110,7 +117,8 @@
 		printk ("set_pmd_pfn: pgd_none\n");
 		return; /* BUG(); */
 	}
-	pmd = pmd_offset(pgd, vaddr);
+	pud = pud_offset(pgd, vaddr);
+	pmd = pmd_offset(pud, vaddr);
 	set_pmd(pmd, pfn_pmd(pfn, flags));
 	/*
 	 * It's enough to flush this one mapping.
@@ -132,10 +140,7 @@
 
 pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address)
 {
-	pte_t *pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT);
-	if (pte)
-		clear_page(pte);
-	return pte;
+	return (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO);
 }
 
 struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address)
@@ -143,12 +148,10 @@
 	struct page *pte;
 
 #ifdef CONFIG_HIGHPTE
-	pte = alloc_pages(GFP_KERNEL|__GFP_HIGHMEM|__GFP_REPEAT, 0);
+	pte = alloc_pages(GFP_KERNEL|__GFP_HIGHMEM|__GFP_REPEAT|__GFP_ZERO, 0);
 #else
-	pte = alloc_pages(GFP_KERNEL|__GFP_REPEAT, 0);
+	pte = alloc_pages(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO, 0);
 #endif
-	if (pte)
-		clear_highpage(pte);
 	return pte;
 }
 
@@ -252,6 +255,6 @@
 	if (PTRS_PER_PMD > 1)
 		for (i = 0; i < USER_PTRS_PER_PGD; ++i)
 			kmem_cache_free(pmd_cache, (void *)__va(pgd_val(pgd[i])-1));
-	/* in the non-PAE case, clear_page_tables() clears user pgd entries */
+	/* in the non-PAE case, clear_page_range() clears user pgd entries */
 	kmem_cache_free(pgd_cache, pgd);
 }
diff -Nru a/arch/i386/oprofile/Makefile b/arch/i386/oprofile/Makefile
--- a/arch/i386/oprofile/Makefile	2005-01-10 20:11:22 -08:00
+++ b/arch/i386/oprofile/Makefile	2005-01-10 20:11:22 -08:00
@@ -6,7 +6,7 @@
 		oprofilefs.o oprofile_stats.o  \
 		timer_int.o )
 
-oprofile-y				:= $(DRIVER_OBJS) init.o
+oprofile-y				:= $(DRIVER_OBJS) init.o backtrace.o
 oprofile-$(CONFIG_X86_LOCAL_APIC) 	+= nmi_int.o op_model_athlon.o \
 					   op_model_ppro.o op_model_p4.o
 oprofile-$(CONFIG_X86_IO_APIC)		+= nmi_timer_int.o
diff -Nru a/arch/i386/oprofile/backtrace.c b/arch/i386/oprofile/backtrace.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/i386/oprofile/backtrace.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,124 @@
+/**
+ * @file backtrace.c
+ *
+ * @remark Copyright 2002 OProfile authors
+ * @remark Read the file COPYING
+ *
+ * @author John Levon
+ * @author David Smith
+ */
+
+#include <linux/oprofile.h>
+#include <linux/sched.h>
+#include <linux/mm.h>
+#include <asm/ptrace.h>
+
+struct frame_head {
+	struct frame_head * ebp;
+	unsigned long ret;
+} __attribute__((packed));
+
+
+static struct frame_head *
+dump_backtrace(struct frame_head * head)
+{
+	oprofile_add_trace(head->ret);
+
+	/* frame pointers should strictly progress back up the stack
+	 * (towards higher addresses) */
+	if (head >= head->ebp)
+		return 0;
+
+	return head->ebp;
+}
+
+
+#ifdef CONFIG_X86_4G
+/* With a 4G kernel/user split, user pages are not directly
+ * accessible from the kernel, so don't try
+ */
+static int pages_present(struct frame_head * head)
+{
+	return 0;
+}
+#else
+/* check that the page(s) containing the frame head are present */
+static int pages_present(struct frame_head * head)
+{
+	struct mm_struct * mm = current->mm;
+
+	/* FIXME: only necessary once per page */
+	if (!check_user_page_readable(mm, (unsigned long)head))
+		return 0;
+
+	return check_user_page_readable(mm, (unsigned long)(head + 1));
+}
+#endif /* CONFIG_X86_4G */
+
+
+/*
+ * |             | /\ Higher addresses
+ * |             |
+ * --------------- stack base (address of current_thread_info)
+ * | thread info |
+ * .             .
+ * |    stack    |
+ * --------------- saved regs->ebp value if valid (frame_head address)
+ * .             .
+ * --------------- struct pt_regs stored on stack (struct pt_regs *)
+ * |             |
+ * .             .
+ * |             |
+ * --------------- %esp
+ * |             |
+ * |             | \/ Lower addresses
+ *
+ * Thus, &pt_regs <-> stack base restricts the valid(ish) ebp values
+ */
+#ifdef CONFIG_FRAME_POINTER
+static int valid_kernel_stack(struct frame_head * head, struct pt_regs * regs)
+{
+	unsigned long headaddr = (unsigned long)head;
+	unsigned long stack = (unsigned long)regs;
+	unsigned long stack_base = (stack & ~(THREAD_SIZE - 1)) + THREAD_SIZE;
+
+	return headaddr > stack && headaddr < stack_base;
+}
+#else
+/* without fp, it's just junk */
+static int valid_kernel_stack(struct frame_head * head, struct pt_regs * regs)
+{
+	return 0;
+}
+#endif
+
+
+void
+x86_backtrace(struct pt_regs * const regs, unsigned int depth)
+{
+	struct frame_head *head;
+
+#ifdef CONFIG_X86_64
+	head = (struct frame_head *)regs->rbp;
+#else
+	head = (struct frame_head *)regs->ebp;
+#endif
+
+	if (!user_mode(regs)) {
+		while (depth-- && valid_kernel_stack(head, regs))
+			head = dump_backtrace(head);
+		return;
+	}
+
+#ifdef CONFIG_SMP
+	if (!spin_trylock(&current->mm->page_table_lock))
+		return;
+#endif
+
+	while (depth-- && head && pages_present(head))
+		head = dump_backtrace(head);
+
+#ifdef CONFIG_SMP
+	spin_unlock(&current->mm->page_table_lock);
+#endif
+}
diff -Nru a/arch/i386/oprofile/init.c b/arch/i386/oprofile/init.c
--- a/arch/i386/oprofile/init.c	2005-01-10 20:11:19 -08:00
+++ b/arch/i386/oprofile/init.c	2005-01-10 20:11:19 -08:00
@@ -15,22 +15,26 @@
  * with the NMI mode driver.
  */
  
-extern int nmi_init(struct oprofile_operations ** ops);
-extern int nmi_timer_init(struct oprofile_operations **ops);
+extern int nmi_init(struct oprofile_operations * ops);
+extern int nmi_timer_init(struct oprofile_operations * ops);
 extern void nmi_exit(void);
+extern void x86_backtrace(struct pt_regs * const regs, unsigned int depth);
 
-int __init oprofile_arch_init(struct oprofile_operations ** ops)
+
+void __init oprofile_arch_init(struct oprofile_operations * ops)
 {
-	int ret = -ENODEV;
+	int ret;
+
+	ret = -ENODEV;
+
 #ifdef CONFIG_X86_LOCAL_APIC
 	ret = nmi_init(ops);
 #endif
-
 #ifdef CONFIG_X86_IO_APIC
 	if (ret < 0)
 		ret = nmi_timer_init(ops);
 #endif
-	return ret;
+	ops->backtrace = x86_backtrace;
 }
 
 
diff -Nru a/arch/i386/oprofile/nmi_int.c b/arch/i386/oprofile/nmi_int.c
--- a/arch/i386/oprofile/nmi_int.c	2005-01-10 20:11:22 -08:00
+++ b/arch/i386/oprofile/nmi_int.c	2005-01-10 20:11:22 -08:00
@@ -84,7 +84,7 @@
 
 static int nmi_callback(struct pt_regs * regs, int cpu)
 {
-	return model->check_ctrs(cpu, &cpu_msrs[cpu], regs);
+	return model->check_ctrs(regs, &cpu_msrs[cpu]);
 }
  
  
@@ -300,35 +300,26 @@
 }
  
  
-struct oprofile_operations nmi_ops = {
-	.create_files 	= nmi_create_files,
-	.setup 		= nmi_setup,
-	.shutdown	= nmi_shutdown,
-	.start		= nmi_start,
-	.stop		= nmi_stop
-};
- 
-
-static int __init p4_init(void)
+static int __init p4_init(char ** cpu_type)
 {
-	__u8 cpu_model = current_cpu_data.x86_model;
+	__u8 cpu_model = boot_cpu_data.x86_model;
 
 	if (cpu_model > 3)
 		return 0;
 
 #ifndef CONFIG_SMP
-	nmi_ops.cpu_type = "i386/p4";
+	*cpu_type = "i386/p4";
 	model = &op_p4_spec;
 	return 1;
 #else
 	switch (smp_num_siblings) {
 		case 1:
-			nmi_ops.cpu_type = "i386/p4";
+			*cpu_type = "i386/p4";
 			model = &op_p4_spec;
 			return 1;
 
 		case 2:
-			nmi_ops.cpu_type = "i386/p4-ht";
+			*cpu_type = "i386/p4-ht";
 			model = &op_p4_ht2_spec;
 			return 1;
 	}
@@ -340,21 +331,21 @@
 }
 
 
-static int __init ppro_init(void)
+static int __init ppro_init(char ** cpu_type)
 {
-	__u8 cpu_model = current_cpu_data.x86_model;
+	__u8 cpu_model = boot_cpu_data.x86_model;
 
 	if (cpu_model > 0xd)
 		return 0;
 
 	if (cpu_model == 9) {
-		nmi_ops.cpu_type = "i386/p6_mobile";
+		*cpu_type = "i386/p6_mobile";
 	} else if (cpu_model > 5) {
-		nmi_ops.cpu_type = "i386/piii";
+		*cpu_type = "i386/piii";
 	} else if (cpu_model > 2) {
-		nmi_ops.cpu_type = "i386/pii";
+		*cpu_type = "i386/pii";
 	} else {
-		nmi_ops.cpu_type = "i386/ppro";
+		*cpu_type = "i386/ppro";
 	}
 
 	model = &op_ppro_spec;
@@ -364,11 +355,12 @@
 /* in order to get driverfs right */
 static int using_nmi;
 
-int __init nmi_init(struct oprofile_operations ** ops)
+int __init nmi_init(struct oprofile_operations *ops)
 {
-	__u8 vendor = current_cpu_data.x86_vendor;
-	__u8 family = current_cpu_data.x86;
- 
+	__u8 vendor = boot_cpu_data.x86_vendor;
+	__u8 family = boot_cpu_data.x86;
+	char *cpu_type;
+
 	if (!cpu_has_apic)
 		return -ENODEV;
  
@@ -381,13 +373,13 @@
 				return -ENODEV;
 			case 6:
 				model = &op_athlon_spec;
-				nmi_ops.cpu_type = "i386/athlon";
+				cpu_type = "i386/athlon";
 				break;
 			case 0xf:
 				model = &op_athlon_spec;
 				/* Actually it could be i386/hammer too, but give
 				   user space an consistent name. */
-				nmi_ops.cpu_type = "x86-64/hammer";
+				cpu_type = "x86-64/hammer";
 				break;
 			}
 			break;
@@ -396,13 +388,13 @@
 			switch (family) {
 				/* Pentium IV */
 				case 0xf:
-					if (!p4_init())
+					if (!p4_init(&cpu_type))
 						return -ENODEV;
 					break;
 
 				/* A P6-class processor */
 				case 6:
-					if (!ppro_init())
+					if (!ppro_init(&cpu_type))
 						return -ENODEV;
 					break;
 
@@ -417,7 +409,12 @@
 
 	init_driverfs();
 	using_nmi = 1;
-	*ops = &nmi_ops;
+	ops->create_files = nmi_create_files;
+	ops->setup = nmi_setup;
+	ops->shutdown = nmi_shutdown;
+	ops->start = nmi_start;
+	ops->stop = nmi_stop;
+	ops->cpu_type = cpu_type;
 	printk(KERN_INFO "oprofile: using NMI interrupt.\n");
 	return 0;
 }
diff -Nru a/arch/i386/oprofile/nmi_timer_int.c b/arch/i386/oprofile/nmi_timer_int.c
--- a/arch/i386/oprofile/nmi_timer_int.c	2005-01-10 20:11:17 -08:00
+++ b/arch/i386/oprofile/nmi_timer_int.c	2005-01-10 20:11:17 -08:00
@@ -20,9 +20,7 @@
  
 static int nmi_timer_callback(struct pt_regs * regs, int cpu)
 {
-	unsigned long eip = instruction_pointer(regs);
- 
-	oprofile_add_sample(eip, !user_mode(regs), 0, cpu);
+	oprofile_add_sample(regs, 0);
 	return 1;
 }
 
@@ -42,20 +40,16 @@
 }
 
 
-static struct oprofile_operations nmi_timer_ops = {
-	.start	= timer_start,
-	.stop	= timer_stop,
-	.cpu_type = "timer"
-};
-
-int __init nmi_timer_init(struct oprofile_operations ** ops)
+int __init nmi_timer_init(struct oprofile_operations * ops)
 {
 	extern int nmi_active;
 
 	if (nmi_active <= 0)
 		return -ENODEV;
 
-	*ops = &nmi_timer_ops;
+	ops->start = timer_start;
+	ops->stop = timer_stop;
+	ops->cpu_type = "timer";
 	printk(KERN_INFO "oprofile: using NMI timer interrupt.\n");
 	return 0;
 }
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	2005-01-10 20:11:24 -08:00
+++ b/arch/i386/oprofile/op_model_athlon.c	2005-01-10 20:11:24 -08:00
@@ -90,19 +90,16 @@
 }
 
  
-static int athlon_check_ctrs(unsigned int const cpu, 
-			      struct op_msrs const * const msrs, 
-			      struct pt_regs * const regs)
+static int athlon_check_ctrs(struct pt_regs * const regs,
+			     struct op_msrs const * const msrs)
 {
 	unsigned int low, high;
 	int i;
-	unsigned long eip = profile_pc(regs);
-	int is_kernel = !user_mode(regs);
 
 	for (i = 0 ; i < NUM_COUNTERS; ++i) {
 		CTR_READ(low, high, msrs, i);
 		if (CTR_OVERFLOWED(low)) {
-			oprofile_add_sample(eip, is_kernel, i, cpu);
+			oprofile_add_sample(regs, i);
 			CTR_WRITE(reset_value[i], msrs, i);
 		}
 	}
diff -Nru a/arch/i386/oprofile/op_model_p4.c b/arch/i386/oprofile/op_model_p4.c
--- a/arch/i386/oprofile/op_model_p4.c	2005-01-10 20:11:16 -08:00
+++ b/arch/i386/oprofile/op_model_p4.c	2005-01-10 20:11:16 -08:00
@@ -619,14 +619,11 @@
 }
 
 
-static int p4_check_ctrs(unsigned int const cpu, 
-			  struct op_msrs const * const msrs,
-			  struct pt_regs * const regs)
+static int p4_check_ctrs(struct pt_regs * const regs,
+			 struct op_msrs const * const msrs)
 {
 	unsigned long ctr, low, high, stag, real;
 	int i;
-	unsigned long eip = profile_pc(regs);
-	int is_kernel = !user_mode(regs);
 
 	stag = get_stagger();
 
@@ -657,7 +654,7 @@
 		CCCR_READ(low, high, real);
  		CTR_READ(ctr, high, real);
 		if (CCCR_OVF_P(low) || CTR_OVERFLOW_P(ctr)) {
-			oprofile_add_sample(eip, is_kernel, i, cpu);
+			oprofile_add_sample(regs, i);
  			CTR_WRITE(reset_value[i], real);
 			CCCR_CLEAR_OVF(low);
 			CCCR_WRITE(low, high, real);
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	2005-01-10 20:11:20 -08:00
+++ b/arch/i386/oprofile/op_model_ppro.c	2005-01-10 20:11:20 -08:00
@@ -85,19 +85,16 @@
 }
 
  
-static int ppro_check_ctrs(unsigned int const cpu, 
-			    struct op_msrs const * const msrs,
-			    struct pt_regs * const regs)
+static int ppro_check_ctrs(struct pt_regs * const regs,
+			   struct op_msrs const * const msrs)
 {
 	unsigned int low, high;
 	int i;
-	unsigned long eip = profile_pc(regs);
-	int is_kernel = !user_mode(regs);
  
 	for (i = 0 ; i < NUM_COUNTERS; ++i) {
 		CTR_READ(low, high, msrs, i);
 		if (CTR_OVERFLOWED(low)) {
-			oprofile_add_sample(eip, is_kernel, i, cpu);
+			oprofile_add_sample(regs, i);
 			CTR_WRITE(reset_value[i], msrs, i);
 		}
 	}
diff -Nru a/arch/i386/oprofile/op_x86_model.h b/arch/i386/oprofile/op_x86_model.h
--- a/arch/i386/oprofile/op_x86_model.h	2005-01-10 20:11:17 -08:00
+++ b/arch/i386/oprofile/op_x86_model.h	2005-01-10 20:11:17 -08:00
@@ -36,9 +36,8 @@
 	unsigned int const num_controls;
 	void (*fill_in_addresses)(struct op_msrs * const msrs);
 	void (*setup_ctrs)(struct op_msrs const * const msrs);
-	int (*check_ctrs)(unsigned int const cpu, 
-		struct op_msrs const * const msrs,
-		struct pt_regs * const regs);
+	int (*check_ctrs)(struct pt_regs * const regs,
+		struct op_msrs const * const msrs);
 	void (*start)(struct op_msrs const * const msrs);
 	void (*stop)(struct op_msrs const * const msrs);
 };
diff -Nru a/arch/i386/pci/fixup.c b/arch/i386/pci/fixup.c
--- a/arch/i386/pci/fixup.c	2005-01-10 20:11:21 -08:00
+++ b/arch/i386/pci/fixup.c	2005-01-10 20:11:21 -08:00
@@ -282,7 +282,7 @@
 	return raw_pci_ops->write(0, bus->number, devfn, where, size, value);
 }
 
-struct pci_ops quirk_pcie_aspm_ops = {
+static struct pci_ops quirk_pcie_aspm_ops = {
 	.read = quirk_pcie_aspm_read,
 	.write = quirk_pcie_aspm_write,
 };
@@ -295,7 +295,7 @@
  * the root port in an array for fast indexing. Replace the bus ops
  * with the modified one.
  */
-void pcie_rootport_aspm_quirk(struct pci_dev *pdev)
+static void pcie_rootport_aspm_quirk(struct pci_dev *pdev)
 {
 	int cap_base, i;
 	struct pci_bus  *pbus;
diff -Nru a/arch/i386/pci/irq.c b/arch/i386/pci/irq.c
--- a/arch/i386/pci/irq.c	2005-01-10 20:11:23 -08:00
+++ b/arch/i386/pci/irq.c	2005-01-10 20:11:23 -08:00
@@ -29,6 +29,8 @@
 
 static struct irq_routing_table *pirq_table;
 
+static int pirq_enable_irq(struct pci_dev *dev);
+
 /*
  * Never use: 0, 1, 2 (timer, keyboard, and cascade)
  * Avoid using: 13, 14 and 15 (FP error and IDE).
@@ -491,6 +493,8 @@
 		case PCI_DEVICE_ID_INTEL_ESB_1:
 		case PCI_DEVICE_ID_INTEL_ICH6_0:
 		case PCI_DEVICE_ID_INTEL_ICH6_1:
+		case PCI_DEVICE_ID_INTEL_ICH7_0:
+		case PCI_DEVICE_ID_INTEL_ICH7_1:
 			r->name = "PIIX/ICH";
 			r->get = pirq_piix_get;
 			r->set = pirq_piix_set;
@@ -1019,10 +1023,10 @@
 		pirq_penalize_isa_irq(irq);
 }
 
-int pirq_enable_irq(struct pci_dev *dev)
+static int pirq_enable_irq(struct pci_dev *dev)
 {
 	u8 pin;
-	extern int interrupt_line_quirk;
+	extern int via_interrupt_line_quirk;
 	struct pci_dev *temp_dev;
 
 	pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin);
@@ -1080,7 +1084,7 @@
 	}
 	/* VIA bridges use interrupt line for apic/pci steering across
 	   the V-Link */
-	else if (interrupt_line_quirk)
+	else if (via_interrupt_line_quirk)
 		pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq & 15);
 	return 0;
 }
diff -Nru a/arch/i386/pci/numa.c b/arch/i386/pci/numa.c
--- a/arch/i386/pci/numa.c	2005-01-10 20:11:17 -08:00
+++ b/arch/i386/pci/numa.c	2005-01-10 20:11:17 -08:00
@@ -112,14 +112,15 @@
 		return 0;
 
 	pci_root_bus = pcibios_scan_root(0);
-	if (numnodes > 1) {
-		for (quad = 1; quad < numnodes; ++quad) {
+	if (num_online_nodes() > 1)
+		for_each_online_node(quad) {
+			if (quad == 0)
+				continue;
 			printk("Scanning PCI bus %d for quad %d\n", 
 				QUADLOCAL2BUS(quad,0), quad);
 			pci_scan_bus(QUADLOCAL2BUS(quad,0), 
 				&pci_root_ops, NULL);
 		}
-	}
 	return 0;
 }
 
diff -Nru a/arch/i386/pci/pci.h b/arch/i386/pci/pci.h
--- a/arch/i386/pci/pci.h	2005-01-10 20:11:19 -08:00
+++ b/arch/i386/pci/pci.h	2005-01-10 20:11:19 -08:00
@@ -71,6 +71,4 @@
 extern int pcibios_scanned;
 extern spinlock_t pci_config_lock;
 
-int pirq_enable_irq(struct pci_dev *dev);
-
 extern int (*pcibios_enable_irq)(struct pci_dev *dev);
diff -Nru a/arch/ia64/Kconfig b/arch/ia64/Kconfig
--- a/arch/ia64/Kconfig	2005-01-10 20:11:22 -08:00
+++ b/arch/ia64/Kconfig	2005-01-10 20:11:22 -08:00
@@ -30,6 +30,10 @@
 	bool
 	default y
 
+config GENERIC_CALIBRATE_DELAY
+	bool
+	default y
+
 config TIME_INTERPOLATION
 	bool
 	default y
@@ -178,6 +182,10 @@
 	  require the DISCONTIGMEM option for your machine. If you are
 	  unsure, say Y.
 
+config HOLES_IN_ZONE
+	bool
+	default y if VIRTUAL_MEM_MAP
+
 config DISCONTIGMEM
 	bool "Discontiguous memory support"
 	depends on (IA64_DIG || IA64_SGI_SN2 || IA64_GENERIC || IA64_HP_ZX1) && NUMA && VIRTUAL_MEM_MAP
@@ -241,13 +249,14 @@
 	  performance hit.
 
 config HOTPLUG_CPU
-    bool "Support for hot-pluggable CPUs (EXPERIMENTAL)"
-    depends on SMP && HOTPLUG && EXPERIMENTAL
+	bool "Support for hot-pluggable CPUs (EXPERIMENTAL)"
+	depends on SMP && EXPERIMENTAL
+	select HOTPLUG
 	default n
-    ---help---
-      Say Y here to experiment with turning CPUs off and on.  CPUs
-      can be controlled through /sys/devices/system/cpu/cpu#.
-      Say N if you want to disable CPU hotplug.
+	---help---
+	  Say Y here to experiment with turning CPUs off and on.  CPUs
+	  can be controlled through /sys/devices/system/cpu/cpu#.
+	  Say N if you want to disable CPU hotplug.
 
 config PREEMPT
 	bool "Preemptible Kernel"
@@ -301,6 +310,11 @@
 
 	  To use this option, you have to ensure that the "/proc file system
 	  support" (CONFIG_PROC_FS) is enabled, too.
+
+config ACPI_DEALLOCATE_IRQ
+	bool
+	depends on IOSAPIC && EXPERIMENTAL
+	default y
 
 source "drivers/firmware/Kconfig"
 
diff -Nru a/arch/ia64/configs/zx1_defconfig b/arch/ia64/configs/zx1_defconfig
--- a/arch/ia64/configs/zx1_defconfig	2005-01-10 20:11:20 -08:00
+++ b/arch/ia64/configs/zx1_defconfig	2005-01-10 20:11:20 -08:00
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.9-rc2-aegl
-# Mon Sep 27 19:03:13 2004
+# Linux kernel version: 2.6.10
+# Wed Dec 29 09:05:48 2004
 #
 
 #
@@ -11,6 +11,7 @@
 # CONFIG_CLEAN_COMPILE is not set
 CONFIG_BROKEN=y
 CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
 
 #
 # General setup
@@ -25,6 +26,7 @@
 # CONFIG_AUDIT is not set
 CONFIG_LOG_BUF_SHIFT=17
 CONFIG_HOTPLUG=y
+CONFIG_KOBJECT_UEVENT=y
 # CONFIG_IKCONFIG is not set
 # CONFIG_EMBEDDED is not set
 CONFIG_KALLSYMS=y
@@ -32,12 +34,12 @@
 # CONFIG_KALLSYMS_EXTRA_PASS is not set
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 CONFIG_SHMEM=y
+CONFIG_CC_ALIGN_FUNCTIONS=0
+CONFIG_CC_ALIGN_LABELS=0
+CONFIG_CC_ALIGN_LOOPS=0
+CONFIG_CC_ALIGN_JUMPS=0
 # CONFIG_TINY_SHMEM is not set
 
 #
@@ -47,6 +49,7 @@
 # CONFIG_MODULE_UNLOAD is not set
 CONFIG_OBSOLETE_MODPARM=y
 # CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
 # CONFIG_KMOD is not set
 
 #
@@ -83,6 +86,7 @@
 CONFIG_HAVE_DEC_LOCK=y
 CONFIG_IA32_SUPPORT=y
 CONFIG_COMPAT=y
+CONFIG_IA64_MCA_RECOVERY=y
 CONFIG_PERFMON=y
 CONFIG_IA64_PALINFO=y
 
@@ -106,9 +110,11 @@
 CONFIG_ACPI_BOOT=y
 CONFIG_ACPI_INTERPRETER=y
 CONFIG_ACPI_BUTTON=y
+CONFIG_ACPI_VIDEO=m
 CONFIG_ACPI_FAN=y
 CONFIG_ACPI_PROCESSOR=y
 CONFIG_ACPI_THERMAL=y
+CONFIG_ACPI_BLACKLIST_YEAR=0
 # CONFIG_ACPI_DEBUG is not set
 CONFIG_ACPI_BUS=y
 CONFIG_ACPI_POWER=y
@@ -136,9 +142,13 @@
 # CONFIG_HOTPLUG_PCI_SHPC is not set
 
 #
-# PCMCIA/CardBus support
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# PC-card bridges
 #
-# CONFIG_PCMCIA is not set
 
 #
 # Device Drivers
@@ -165,6 +175,7 @@
 #
 # Plug and Play support
 #
+# CONFIG_PNP is not set
 
 #
 # Block devices
@@ -179,8 +190,19 @@
 # CONFIG_BLK_DEV_SX8 is not set
 # CONFIG_BLK_DEV_UB is not set
 CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=4096
 CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_CDROM_PKTCDVD is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
 
 #
 # ATA/ATAPI/MFM/RLL support
@@ -199,7 +221,6 @@
 # CONFIG_BLK_DEV_IDEFLOPPY is not set
 # CONFIG_BLK_DEV_IDESCSI is not set
 # CONFIG_IDE_TASK_IOCTL is not set
-# CONFIG_IDE_TASKFILE_IO is not set
 
 #
 # IDE chipset support/bugfixes
@@ -303,6 +324,7 @@
 # CONFIG_SCSI_QLOGIC_ISP is not set
 # CONFIG_SCSI_QLOGIC_FC is not set
 CONFIG_SCSI_QLOGIC_1280=y
+# CONFIG_SCSI_QLOGIC_1280_1040 is not set
 CONFIG_SCSI_QLA2XXX=y
 # CONFIG_SCSI_QLA21XX is not set
 # CONFIG_SCSI_QLA22XX is not set
@@ -362,6 +384,8 @@
 # CONFIG_INET_ESP is not set
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_TUNNEL is not set
+# CONFIG_IP_TCPDIAG is not set
+# CONFIG_IP_TCPDIAG_IPV6 is not set
 
 #
 # IP: Virtual Server Configuration
@@ -375,6 +399,7 @@
 # IP: Netfilter Configuration
 #
 # CONFIG_IP_NF_CONNTRACK is not set
+# CONFIG_IP_NF_CONNTRACK_MARK is not set
 # CONFIG_IP_NF_QUEUE is not set
 # CONFIG_IP_NF_IPTABLES is not set
 CONFIG_IP_NF_ARPTABLES=y
@@ -399,7 +424,6 @@
 # CONFIG_NET_DIVERT is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
-# CONFIG_NET_HW_FLOWCONTROL is not set
 
 #
 # QoS and/or fair queueing
@@ -469,7 +493,6 @@
 # CONFIG_EPIC100 is not set
 # CONFIG_SUNDANCE is not set
 # CONFIG_VIA_RHINE is not set
-# CONFIG_VIA_VELOCITY is not set
 
 #
 # Ethernet (1000 Mbit)
@@ -483,6 +506,7 @@
 # CONFIG_YELLOWFIN is not set
 # CONFIG_R8169 is not set
 # CONFIG_SK98LIN is not set
+# CONFIG_VIA_VELOCITY is not set
 CONFIG_TIGON3=y
 
 #
@@ -653,6 +677,7 @@
 # CONFIG_I2C_SIS5595 is not set
 # CONFIG_I2C_SIS630 is not set
 # CONFIG_I2C_SIS96X is not set
+# CONFIG_I2C_STUB is not set
 # CONFIG_I2C_VIA is not set
 # CONFIG_I2C_VIAPRO is not set
 # CONFIG_I2C_VOODOO3 is not set
@@ -664,20 +689,24 @@
 # CONFIG_I2C_SENSOR is not set
 # CONFIG_SENSORS_ADM1021 is not set
 # CONFIG_SENSORS_ADM1025 is not set
+# CONFIG_SENSORS_ADM1026 is not set
 # CONFIG_SENSORS_ADM1031 is not set
 # CONFIG_SENSORS_ASB100 is not set
 # CONFIG_SENSORS_DS1621 is not set
 # CONFIG_SENSORS_FSCHER is not set
 # CONFIG_SENSORS_GL518SM is not set
 # CONFIG_SENSORS_IT87 is not set
+# CONFIG_SENSORS_LM63 is not set
 # CONFIG_SENSORS_LM75 is not set
 # CONFIG_SENSORS_LM77 is not set
 # CONFIG_SENSORS_LM78 is not set
 # CONFIG_SENSORS_LM80 is not set
 # CONFIG_SENSORS_LM83 is not set
 # CONFIG_SENSORS_LM85 is not set
+# CONFIG_SENSORS_LM87 is not set
 # CONFIG_SENSORS_LM90 is not set
 # CONFIG_SENSORS_MAX1619 is not set
+# CONFIG_SENSORS_PC87360 is not set
 # CONFIG_SENSORS_SMSC47M1 is not set
 # CONFIG_SENSORS_VIA686A is not set
 # CONFIG_SENSORS_W83781D is not set
@@ -708,7 +737,37 @@
 #
 # Multimedia devices
 #
-# CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_DEV=y
+
+#
+# Video For Linux
+#
+
+#
+# Video Adapters
+#
+# CONFIG_VIDEO_BT848 is not set
+# CONFIG_VIDEO_CPIA is not set
+# CONFIG_VIDEO_SAA5246A 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_ZR36120 is not set
+# CONFIG_VIDEO_SAA7134 is not set
+# CONFIG_VIDEO_MXB is not set
+# CONFIG_VIDEO_DPC is not set
+# CONFIG_VIDEO_HEXIUM_ORION is not set
+# CONFIG_VIDEO_HEXIUM_GEMINI is not set
+# CONFIG_VIDEO_CX88 is not set
+# CONFIG_VIDEO_OVCAMCHIP is not set
+
+#
+# Radio Adapters
+#
+# CONFIG_RADIO_GEMTEK_PCI is not set
+# CONFIG_RADIO_MAXIRADIO is not set
+# CONFIG_RADIO_MAESTRO is not set
 
 #
 # Digital Video Broadcasting Devices
@@ -720,6 +779,7 @@
 #
 CONFIG_FB=y
 CONFIG_FB_MODE_HELPERS=y
+# CONFIG_FB_TILEBLITTING is not set
 # CONFIG_FB_CIRRUS is not set
 # CONFIG_FB_PM2 is not set
 # CONFIG_FB_CYBER2000 is not set
@@ -733,6 +793,7 @@
 CONFIG_FB_RADEON_DEBUG=y
 # CONFIG_FB_ATY128 is not set
 # CONFIG_FB_ATY is not set
+# CONFIG_FB_SAVAGE is not set
 # CONFIG_FB_SIS is not set
 # CONFIG_FB_NEOMAGIC is not set
 # CONFIG_FB_KYRO is not set
@@ -763,7 +824,87 @@
 #
 # Sound
 #
-# CONFIG_SOUND is not set
+CONFIG_SOUND=y
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=y
+CONFIG_SND_TIMER=y
+CONFIG_SND_PCM=y
+CONFIG_SND_HWDEP=y
+CONFIG_SND_RAWMIDI=y
+CONFIG_SND_SEQUENCER=y
+# CONFIG_SND_SEQ_DUMMY is not set
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=y
+CONFIG_SND_PCM_OSS=y
+CONFIG_SND_SEQUENCER_OSS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+CONFIG_SND_MPU401_UART=y
+CONFIG_SND_OPL3_LIB=y
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_VIRMIDI is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+
+#
+# PCI devices
+#
+CONFIG_SND_AC97_CODEC=y
+# CONFIG_SND_ALI5451 is not set
+# CONFIG_SND_ATIIXP is not set
+# CONFIG_SND_ATIIXP_MODEM is not set
+# CONFIG_SND_AU8810 is not set
+# CONFIG_SND_AU8820 is not set
+# CONFIG_SND_AU8830 is not set
+# CONFIG_SND_AZT3328 is not set
+# CONFIG_SND_BT87X is not set
+# CONFIG_SND_CS46XX is not set
+# CONFIG_SND_CS4281 is not set
+# CONFIG_SND_EMU10K1 is not set
+# CONFIG_SND_KORG1212 is not set
+# CONFIG_SND_MIXART is not set
+# CONFIG_SND_NM256 is not set
+# CONFIG_SND_RME32 is not set
+# CONFIG_SND_RME96 is not set
+# CONFIG_SND_RME9652 is not set
+# CONFIG_SND_HDSP is not set
+# CONFIG_SND_TRIDENT is not set
+# CONFIG_SND_YMFPCI is not set
+# CONFIG_SND_ALS4000 is not set
+# CONFIG_SND_CMIPCI is not set
+# CONFIG_SND_ENS1370 is not set
+# CONFIG_SND_ENS1371 is not set
+# CONFIG_SND_ES1938 is not set
+# CONFIG_SND_ES1968 is not set
+# CONFIG_SND_MAESTRO3 is not set
+CONFIG_SND_FM801=y
+CONFIG_SND_FM801_TEA575X=y
+# CONFIG_SND_ICE1712 is not set
+# CONFIG_SND_ICE1724 is not set
+# CONFIG_SND_INTEL8X0 is not set
+# CONFIG_SND_INTEL8X0M is not set
+# CONFIG_SND_SONICVIBES is not set
+# CONFIG_SND_VIA82XX is not set
+# CONFIG_SND_VX222 is not set
+
+#
+# USB devices
+#
+# CONFIG_SND_USB_AUDIO is not set
+# CONFIG_SND_USB_USX2Y is not set
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
 
 #
 # USB support
@@ -779,6 +920,8 @@
 # CONFIG_USB_DYNAMIC_MINORS is not set
 # CONFIG_USB_SUSPEND is not set
 # CONFIG_USB_OTG is not set
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
 
 #
 # USB Host Controller Drivers
@@ -788,13 +931,20 @@
 # CONFIG_USB_EHCI_ROOT_HUB_TT is not set
 CONFIG_USB_OHCI_HCD=y
 CONFIG_USB_UHCI_HCD=y
+# CONFIG_USB_SL811_HCD is not set
 
 #
 # 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
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information
+#
 CONFIG_USB_STORAGE=y
 # CONFIG_USB_STORAGE_DEBUG is not set
 # CONFIG_USB_STORAGE_RW_DETECT is not set
@@ -808,7 +958,7 @@
 # CONFIG_USB_STORAGE_JUMPSHOT is not set
 
 #
-# USB Human Interface Devices (HID)
+# USB Input Devices
 #
 CONFIG_USB_HID=y
 CONFIG_USB_HIDINPUT=y
@@ -834,13 +984,17 @@
 # USB Multimedia devices
 #
 # CONFIG_USB_DABUSB is not set
+# CONFIG_USB_VICAM is not set
+# CONFIG_USB_DSBR is not set
+# CONFIG_USB_IBMCAM is not set
+# CONFIG_USB_KONICAWC is not set
+# CONFIG_USB_OV511 is not set
+# CONFIG_USB_SE401 is not set
+# CONFIG_USB_SN9C102 is not set
+# CONFIG_USB_STV680 is not set
 
 #
-# Video4Linux support is needed for USB Multimedia device support
-#
-
-#
-# USB Network adaptors
+# USB Network Adapters
 #
 # CONFIG_USB_CATC is not set
 # CONFIG_USB_KAWETH is not set
@@ -869,14 +1023,24 @@
 # CONFIG_USB_LCD is not set
 # CONFIG_USB_LED is not set
 # CONFIG_USB_CYTHERM is not set
+# CONFIG_USB_PHIDGETKIT is not set
 # CONFIG_USB_PHIDGETSERVO is not set
 
 #
+# USB ATM/DSL drivers
+#
+
+#
 # USB Gadget Support
 #
 # CONFIG_USB_GADGET is not set
 
 #
+# MMC/SD Card support
+#
+# CONFIG_MMC is not set
+
+#
 # File systems
 #
 CONFIG_EXT2_FS=y
@@ -896,6 +1060,7 @@
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 # CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
 CONFIG_AUTOFS_FS=y
 # CONFIG_AUTOFS4_FS is not set
 
@@ -927,6 +1092,8 @@
 # CONFIG_DEVFS_FS is not set
 # CONFIG_DEVPTS_FS_XATTR is not set
 CONFIG_TMPFS=y
+CONFIG_TMPFS_XATTR=y
+CONFIG_TMPFS_SECURITY=y
 CONFIG_HUGETLBFS=y
 CONFIG_HUGETLB_PAGE=y
 CONFIG_RAMFS=y
@@ -1053,9 +1220,11 @@
 #
 CONFIG_DEBUG_KERNEL=y
 CONFIG_MAGIC_SYSRQ=y
+# CONFIG_SCHEDSTATS is not set
 # CONFIG_DEBUG_SLAB is not set
 # CONFIG_DEBUG_SPINLOCK is not set
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_KOBJECT is not set
 # CONFIG_DEBUG_INFO is not set
 CONFIG_IA64_GRANULE_16MB=y
 # CONFIG_IA64_GRANULE_64MB is not set
@@ -1068,6 +1237,7 @@
 #
 # Security options
 #
+# CONFIG_KEYS is not set
 # CONFIG_SECURITY is not set
 
 #
@@ -1081,7 +1251,7 @@
 # CONFIG_CRYPTO_SHA1 is not set
 # CONFIG_CRYPTO_SHA256 is not set
 # CONFIG_CRYPTO_SHA512 is not set
-# CONFIG_CRYPTO_WHIRLPOOL is not set
+# CONFIG_CRYPTO_WP512 is not set
 CONFIG_CRYPTO_DES=y
 # CONFIG_CRYPTO_BLOWFISH is not set
 # CONFIG_CRYPTO_TWOFISH is not set
@@ -1092,7 +1262,12 @@
 # CONFIG_CRYPTO_TEA is not set
 # CONFIG_CRYPTO_ARC4 is not set
 # CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
 # CONFIG_CRYPTO_DEFLATE is not set
 # CONFIG_CRYPTO_MICHAEL_MIC is not set
 # CONFIG_CRYPTO_CRC32C is not set
 # CONFIG_CRYPTO_TEST is not set
+
+#
+# Hardware crypto devices
+#
diff -Nru a/arch/ia64/dig/Makefile b/arch/ia64/dig/Makefile
--- a/arch/ia64/dig/Makefile	2005-01-10 20:11:21 -08:00
+++ b/arch/ia64/dig/Makefile	2005-01-10 20:11:21 -08:00
@@ -6,9 +6,4 @@
 #
 
 obj-y := setup.o
-
-ifndef CONFIG_NUMA
-obj-$(CONFIG_IA64_DIG) += topology.o
-endif
-
 obj-$(CONFIG_IA64_GENERIC) += machvec.o
diff -Nru a/arch/ia64/dig/topology.c b/arch/ia64/dig/topology.c
--- a/arch/ia64/dig/topology.c	2005-01-10 20:11:24 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,43 +0,0 @@
-/*
- * arch/ia64/dig/topology.c
- *	Popuate driverfs with topology information.
- *	Derived entirely from i386/mach-default.c
- *  Intel Corporation - Ashok Raj
- */
-#include <linux/init.h>
-#include <linux/smp.h>
-#include <linux/cpumask.h>
-#include <linux/percpu.h>
-#include <linux/notifier.h>
-#include <linux/cpu.h>
-#include <asm/cpu.h>
-
-static DEFINE_PER_CPU(struct ia64_cpu, cpu_devices);
-
-/*
- * First Pass: simply borrowed code for now. Later should hook into
- * hotplug notification for node/cpu/memory as applicable
- */
-
-static int arch_register_cpu(int num)
-{
-	struct node *parent = NULL;
-
-#ifdef CONFIG_NUMA
-	//parent = &node_devices[cpu_to_node(num)].node;
-#endif
-
-	return register_cpu(&per_cpu(cpu_devices,num).cpu, num, parent);
-}
-
-static int __init topology_init(void)
-{
-    int i;
-
-    for_each_cpu(i) {
-        arch_register_cpu(i);
-	}
-    return 0;
-}
-
-subsys_initcall(topology_init);
diff -Nru a/arch/ia64/ia32/binfmt_elf32.c b/arch/ia64/ia32/binfmt_elf32.c
--- a/arch/ia64/ia32/binfmt_elf32.c	2005-01-10 20:11:22 -08:00
+++ b/arch/ia64/ia32/binfmt_elf32.c	2005-01-10 20:11:22 -08:00
@@ -35,7 +35,7 @@
 
 static void elf32_set_personality (void);
 
-#define setup_arg_pages(bprm,exec)		ia32_setup_arg_pages(bprm,exec)
+#define setup_arg_pages(bprm,tos,exec)		ia32_setup_arg_pages(bprm,exec)
 #define elf_map				elf32_map
 
 #undef SET_PERSONALITY
diff -Nru a/arch/ia64/ia32/ia32_entry.S b/arch/ia64/ia32/ia32_entry.S
--- a/arch/ia64/ia32/ia32_entry.S	2005-01-10 20:11:19 -08:00
+++ b/arch/ia64/ia32/ia32_entry.S	2005-01-10 20:11:19 -08:00
@@ -223,7 +223,7 @@
 	data8 sys_unlink	  /* 10 */
 	data8 ia32_execve
 	data8 sys_chdir
-	data8 sys32_time
+	data8 compat_sys_time
 	data8 sys_mknod
 	data8 sys_chmod		  /* 15 */
 	data8 sys_lchown	/* 16-bit version */
@@ -235,7 +235,7 @@
 	data8 sys_oldumount
 	data8 sys_setuid	/* 16-bit version */
 	data8 sys_getuid	/* 16-bit version */
-	data8 sys_ni_syscall	/* sys_stime is not supported on IA64 */  /* 25 */
+	data8 compat_sys_stime    /* 25 */
 	data8 sys32_ptrace
 	data8 sys32_alarm
 	data8 sys_ni_syscall
@@ -387,7 +387,7 @@
 	data8 sys32_rt_sigaction
 	data8 sys32_rt_sigprocmask /* 175 */
 	data8 sys_rt_sigpending
-	data8 sys32_rt_sigtimedwait
+	data8 compat_rt_sigtimedwait
 	data8 sys32_rt_sigqueueinfo
 	data8 sys32_rt_sigsuspend
 	data8 sys32_pread	  /* 180 */
diff -Nru a/arch/ia64/ia32/ia32_signal.c b/arch/ia64/ia32/ia32_signal.c
--- a/arch/ia64/ia32/ia32_signal.c	2005-01-10 20:11:15 -08:00
+++ b/arch/ia64/ia32/ia32_signal.c	2005-01-10 20:11:15 -08:00
@@ -59,19 +59,19 @@
        int sig;
        int pinfo;
        int puc;
-       siginfo_t32 info;
+       compat_siginfo_t info;
        struct ucontext_ia32 uc;
        struct _fpstate_ia32 fpstate;
        char retcode[8];
 };
 
 int
-copy_siginfo_from_user32 (siginfo_t *to, siginfo_t32 __user *from)
+copy_siginfo_from_user32 (siginfo_t *to, compat_siginfo_t __user *from)
 {
 	unsigned long tmp;
 	int err;
 
-	if (!access_ok(VERIFY_READ, from, sizeof(siginfo_t32)))
+	if (!access_ok(VERIFY_READ, from, sizeof(compat_siginfo_t)))
 		return -EFAULT;
 
 	err = __get_user(to->si_signo, &from->si_signo);
@@ -110,12 +110,12 @@
 }
 
 int
-copy_siginfo_to_user32 (siginfo_t32 __user *to, siginfo_t *from)
+copy_siginfo_to_user32 (compat_siginfo_t __user *to, siginfo_t *from)
 {
 	unsigned int addr;
 	int err;
 
-	if (!access_ok(VERIFY_WRITE, to, sizeof(siginfo_t32)))
+	if (!access_ok(VERIFY_WRITE, to, sizeof(compat_siginfo_t)))
 		return -EFAULT;
 
 	/* If you change siginfo_t structure, please be sure
@@ -589,34 +589,7 @@
 }
 
 asmlinkage long
-sys32_rt_sigtimedwait (compat_sigset_t __user *uthese, siginfo_t32 __user *uinfo,
-		       struct compat_timespec __user *uts, unsigned int sigsetsize)
-{
-	mm_segment_t old_fs = get_fs();
-	struct timespec t;
-	siginfo_t info;
-	sigset_t s;
-	int ret;
-
-	if (copy_from_user(&s.sig, uthese, sizeof(compat_sigset_t)))
-		return -EFAULT;
-	if (uts && get_compat_timespec(&t, uts))
-		return -EFAULT;
-	set_fs(KERNEL_DS);
-	ret = sys_rt_sigtimedwait((sigset_t __user *) &s,
-				  uinfo ? (siginfo_t __user *) &info : NULL,
-				  uts ? (struct timespec __user *) &t : NULL,
-				  sigsetsize);
-	set_fs(old_fs);
-	if (ret >= 0 && uinfo) {
-		if (copy_siginfo_to_user32(uinfo, &info))
-			return -EFAULT;
-	}
-	return ret;
-}
-
-asmlinkage long
-sys32_rt_sigqueueinfo (int pid, int sig, siginfo_t32 __user *uinfo)
+sys32_rt_sigqueueinfo (int pid, int sig, compat_siginfo_t __user *uinfo)
 {
 	mm_segment_t old_fs = get_fs();
 	siginfo_t info;
diff -Nru a/arch/ia64/ia32/ia32priv.h b/arch/ia64/ia32/ia32priv.h
--- a/arch/ia64/ia32/ia32priv.h	2005-01-10 20:11:23 -08:00
+++ b/arch/ia64/ia32/ia32priv.h	2005-01-10 20:11:23 -08:00
@@ -232,7 +232,7 @@
 
 #define SIGEV_PAD_SIZE32 ((SIGEV_MAX_SIZE/sizeof(int)) - 3)
 
-typedef struct siginfo32 {
+typedef struct compat_siginfo {
 	int si_signo;
 	int si_errno;
 	int si_code;
@@ -282,7 +282,7 @@
 			int _fd;
 		} _sigpoll;
 	} _sifields;
-} siginfo_t32;
+} compat_siginfo_t;
 
 typedef struct sigevent32 {
 	sigval_t32 sigev_value;
@@ -558,10 +558,6 @@
 /* Prototypes for use in elfcore32.h */
 extern int save_ia32_fpstate (struct task_struct *, struct ia32_user_i387_struct __user *);
 extern int save_ia32_fpxstate (struct task_struct *, struct ia32_user_fxsr_struct __user *);
-
-/* Prototypes for use in sys_ia32.c */
-int copy_siginfo_to_user32 (siginfo_t32 __user *to, siginfo_t *from);
-int copy_siginfo_from_user32 (siginfo_t *to, siginfo_t32 __user *from);
 
 #endif /* !CONFIG_IA32_SUPPORT */
 
diff -Nru a/arch/ia64/ia32/sys_ia32.c b/arch/ia64/ia32/sys_ia32.c
--- a/arch/ia64/ia32/sys_ia32.c	2005-01-10 20:11:20 -08:00
+++ b/arch/ia64/ia32/sys_ia32.c	2005-01-10 20:11:20 -08:00
@@ -1425,27 +1425,6 @@
 	return -EINVAL;
 }
 
-/*
- * sys_time() can be implemented in user-level using
- * sys_gettimeofday().  IA64 did this but i386 Linux did not
- * so we have to implement this system call here.
- */
-asmlinkage long
-sys32_time (int __user *tloc)
-{
-	int i;
-	struct timeval tv;
-
-	do_gettimeofday(&tv);
-	i = tv.tv_sec;
-
-	if (tloc) {
-		if (put_user(i, tloc))
-			i = -EFAULT;
-	}
-	return i;
-}
-
 asmlinkage long
 compat_sys_wait4 (compat_pid_t pid, compat_uint_t * stat_addr, int options,
 		 struct compat_rusage *ru);
@@ -2662,7 +2641,7 @@
 } 
 
 asmlinkage long sys32_waitid(int which, compat_pid_t pid,
-			     siginfo_t32 __user *uinfo, int options,
+			     compat_siginfo_t __user *uinfo, int options,
 			     struct compat_rusage __user *uru)
 {
 	siginfo_t info;
diff -Nru a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile
--- a/arch/ia64/kernel/Makefile	2005-01-10 20:11:23 -08:00
+++ b/arch/ia64/kernel/Makefile	2005-01-10 20:11:23 -08:00
@@ -6,7 +6,8 @@
 
 obj-y := acpi.o entry.o efi.o efi_stub.o gate-data.o fsys.o ia64_ksyms.o irq.o irq_ia64.o	\
 	 irq_lsapic.o ivt.o machvec.o pal.o patch.o process.o perfmon.o ptrace.o sal.o		\
-	 salinfo.o semaphore.o setup.o signal.o sys_ia64.o time.o traps.o unaligned.o unwind.o mca.o mca_asm.o
+	 salinfo.o semaphore.o setup.o signal.o sys_ia64.o time.o traps.o unaligned.o \
+	 unwind.o mca.o mca_asm.o topology.o
 
 obj-$(CONFIG_IA64_BRL_EMU)	+= brl_emu.o
 obj-$(CONFIG_IA64_GENERIC)	+= acpi-ext.o
diff -Nru a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c
--- a/arch/ia64/kernel/acpi.c	2005-01-10 20:11:19 -08:00
+++ b/arch/ia64/kernel/acpi.c	2005-01-10 20:11:19 -08:00
@@ -355,11 +355,11 @@
 #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];
+static u32 __devinitdata 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 __devinitdata pxm_to_nid_map[MAX_PXM_DOMAINS];
 int __initdata nid_to_pxm_map[MAX_NUMNODES];
 static struct acpi_table_slit __initdata *slit_table;
 
@@ -445,16 +445,20 @@
 		return;
 	}
 
+	/*
+	 * MCD - This can probably be dropped now.  No need for pxm ID to node ID
+	 * mapping with sparse node numbering iff MAX_PXM_DOMAINS <= MAX_NUMNODES.
+	 */
 	/* 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));
+	nodes_clear(node_online_map);
 	for (i = 0; i < MAX_PXM_DOMAINS; i++) {
 		if (pxm_bit_test(i)) {
-			pxm_to_nid_map[i] = numnodes;
-			node_set_online(numnodes);
-			nid_to_pxm_map[numnodes++] = i;
+			int nid = num_online_nodes();
+			pxm_to_nid_map[i] = nid;
+			nid_to_pxm_map[nid] = i;
+			node_set_online(nid);
 		}
 	}
 
@@ -463,7 +467,7 @@
 		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++) {
+	for_each_online_node(i) {
 		int bank;
 
 		bank = 0;
@@ -476,7 +480,7 @@
 	for (i = 0; i < srat_num_cpus; i++)
 		node_cpuid[i].nid = pxm_to_nid_map[node_cpuid[i].nid];
 
-	printk(KERN_INFO "Number of logical nodes in system = %d\n", numnodes);
+	printk(KERN_INFO "Number of logical nodes in system = %d\n", num_online_nodes());
 	printk(KERN_INFO "Number of memory chunks in system = %d\n", num_node_memblks);
 
 	if (!slit_table) return;
@@ -496,8 +500,8 @@
 
 #ifdef SLIT_DEBUG
 	printk("ACPI 2.0 SLIT locality table:\n");
-	for (i = 0; i < numnodes; i++) {
-		for (j = 0; j < numnodes; j++)
+	for_each_online_node(i) {
+		for_each_online_node(j)
 			printk("%03d ", node_distance(i,j));
 		printk("\n");
 	}
@@ -517,6 +521,15 @@
 }
 EXPORT_SYMBOL(acpi_register_gsi);
 
+#ifdef CONFIG_ACPI_DEALLOCATE_IRQ
+void
+acpi_unregister_gsi (u32 gsi)
+{
+	iosapic_unregister_intr(gsi);
+}
+EXPORT_SYMBOL(acpi_unregister_gsi);
+#endif /* CONFIG_ACPI_DEALLOCATE_IRQ */
+
 static int __init
 acpi_parse_fadt (unsigned long phys_addr, unsigned long size)
 {
@@ -651,6 +664,110 @@
 	}
 	return 0;
 }
+
+/*
+ *  ACPI based hotplug CPU support
+ */
+#ifdef CONFIG_ACPI_HOTPLUG_CPU
+static
+int
+acpi_map_cpu2node(acpi_handle handle, int cpu, long physid)
+{
+#ifdef CONFIG_ACPI_NUMA
+	int 			pxm_id;
+
+	pxm_id = acpi_get_pxm(handle);
+
+	/*
+	 * Assuming that the container driver would have set the proximity
+	 * domain and would have initialized pxm_to_nid_map[pxm_id] && pxm_flag
+	 */
+	node_cpuid[cpu].nid = (pxm_id < 0) ? 0:
+			pxm_to_nid_map[pxm_id];
+
+	node_cpuid[cpu].phys_id =  physid;
+#endif
+	return(0);
+}
+
+
+int
+acpi_map_lsapic(acpi_handle handle, int *pcpu)
+{
+	struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
+	union acpi_object *obj;
+	struct acpi_table_lsapic *lsapic;
+	cpumask_t tmp_map;
+	long physid;
+	int cpu;
+ 
+	if (ACPI_FAILURE(acpi_evaluate_object(handle, "_MAT", NULL, &buffer)))
+		return -EINVAL;
+
+	if (!buffer.length ||  !buffer.pointer)
+		return -EINVAL;
+ 
+	obj = buffer.pointer;
+	if (obj->type != ACPI_TYPE_BUFFER ||
+	    obj->buffer.length < sizeof(*lsapic)) {
+		acpi_os_free(buffer.pointer);
+		return -EINVAL;
+	}
+
+	lsapic = (struct acpi_table_lsapic *)obj->buffer.pointer;
+
+	if ((lsapic->header.type != ACPI_MADT_LSAPIC) ||
+	    (!lsapic->flags.enabled)) {
+		acpi_os_free(buffer.pointer);
+		return -EINVAL;
+	}
+
+	physid = ((lsapic->id <<8) | (lsapic->eid));
+
+	acpi_os_free(buffer.pointer);
+	buffer.length = ACPI_ALLOCATE_BUFFER;
+	buffer.pointer = NULL;
+
+	cpus_complement(tmp_map, cpu_present_map);
+	cpu = first_cpu(tmp_map);
+	if(cpu >= NR_CPUS)
+		return -EINVAL;
+
+	acpi_map_cpu2node(handle, cpu, physid);
+
+ 	cpu_set(cpu, cpu_present_map);
+	ia64_cpu_to_sapicid[cpu] = physid;
+	ia64_acpiid_to_sapicid[lsapic->acpi_id] = ia64_cpu_to_sapicid[cpu];
+
+	*pcpu = cpu;
+	return(0);
+}
+EXPORT_SYMBOL(acpi_map_lsapic);
+
+
+int
+acpi_unmap_lsapic(int cpu)
+{
+	int i;
+
+	for (i=0; i<MAX_SAPICS; i++) {
+ 		if (ia64_acpiid_to_sapicid[i] == ia64_cpu_to_sapicid[cpu]) {
+ 			ia64_acpiid_to_sapicid[i] = -1;
+ 			break;
+ 		}
+ 	}
+	ia64_cpu_to_sapicid[cpu] = -1;
+	cpu_clear(cpu,cpu_present_map);
+
+#ifdef CONFIG_ACPI_NUMA
+	/* NUMA specific cleanup's */
+#endif
+
+	return(0);
+}
+EXPORT_SYMBOL(acpi_unmap_lsapic);
+#endif /* CONFIG_ACPI_HOTPLUG_CPU */
+ 
 
 #ifdef CONFIG_NUMA
 acpi_status __init
diff -Nru a/arch/ia64/kernel/head.S b/arch/ia64/kernel/head.S
--- a/arch/ia64/kernel/head.S	2005-01-10 20:11:20 -08:00
+++ b/arch/ia64/kernel/head.S	2005-01-10 20:11:20 -08:00
@@ -949,6 +949,8 @@
 (p14)	br.cond.sptk.few .wait
 (p15)	rsm psr.i		// disable interrupts if we reenabled them
 	br.cond.sptk.few b6	// lock is now free, try to acquire
+	.global ia64_spinlock_contention_pre3_4_end	// for kernprof
+ia64_spinlock_contention_pre3_4_end:
 END(ia64_spinlock_contention_pre3_4)
 
 #else
diff -Nru a/arch/ia64/kernel/ia64_ksyms.c b/arch/ia64/kernel/ia64_ksyms.c
--- a/arch/ia64/kernel/ia64_ksyms.c	2005-01-10 20:11:18 -08:00
+++ b/arch/ia64/kernel/ia64_ksyms.c	2005-01-10 20:11:18 -08:00
@@ -122,3 +122,6 @@
 #  endif
 # endif
 #endif
+
+extern char ia64_ivt[];
+EXPORT_SYMBOL(ia64_ivt);
diff -Nru a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c
--- a/arch/ia64/kernel/iosapic.c	2005-01-10 20:11:19 -08:00
+++ b/arch/ia64/kernel/iosapic.c	2005-01-10 20:11:19 -08:00
@@ -111,6 +111,7 @@
 	unsigned char	dmode	: 3;	/* delivery mode (see iosapic.h) */
 	unsigned char 	polarity: 1;	/* interrupt polarity (see iosapic.h) */
 	unsigned char	trigger	: 1;	/* trigger mode (see iosapic.h) */
+	int		refcnt;		/* reference counter */
 } iosapic_intr_info[IA64_NUM_VECTORS];
 
 static struct iosapic {
@@ -177,7 +178,7 @@
 static void
 set_rte (unsigned int vector, unsigned int dest, int mask)
 {
-	unsigned long pol, trigger, dmode, flags;
+	unsigned long pol, trigger, dmode;
 	u32 low32, high32;
 	char __iomem *addr;
 	int rte_index;
@@ -218,13 +219,9 @@
 	/* dest contains both id and eid */
 	high32 = (dest << IOSAPIC_DEST_SHIFT);
 
-	spin_lock_irqsave(&iosapic_lock, flags);
-	{
-		iosapic_write(addr, IOSAPIC_RTE_HIGH(rte_index), high32);
-		iosapic_write(addr, IOSAPIC_RTE_LOW(rte_index), low32);
-		iosapic_intr_info[vector].low32 = low32;
-	}
-	spin_unlock_irqrestore(&iosapic_lock, flags);
+	iosapic_write(addr, IOSAPIC_RTE_HIGH(rte_index), high32);
+	iosapic_write(addr, IOSAPIC_RTE_LOW(rte_index), low32);
+	iosapic_intr_info[vector].low32 = low32;
 }
 
 static void
@@ -475,6 +472,7 @@
 	iosapic_intr_info[vector].addr     = iosapic_address;
 	iosapic_intr_info[vector].gsi_base = gsi_base;
 	iosapic_intr_info[vector].trigger  = trigger;
+	iosapic_intr_info[vector].refcnt++;
 
 	if (trigger == IOSAPIC_EDGE)
 		irq_type = &irq_type_iosapic_edge;
@@ -581,6 +579,7 @@
 	{
 		vector = gsi_to_vector(gsi);
 		if (vector > 0) {
+			iosapic_intr_info[vector].refcnt++;
 			spin_unlock_irqrestore(&iosapic_lock, flags);
 			return vector;
 		}
@@ -589,6 +588,8 @@
 		dest = get_target_cpu(gsi, vector);
 		register_intr(gsi, vector, IOSAPIC_LOWEST_PRIORITY,
 			polarity, trigger);
+
+		set_rte(vector, dest, 1);
 	}
 	spin_unlock_irqrestore(&iosapic_lock, flags);
 
@@ -597,9 +598,86 @@
 	       (polarity == IOSAPIC_POL_HIGH ? "high" : "low"),
 	       cpu_logical_id(dest), dest, vector);
 
-	set_rte(vector, dest, 1);
 	return vector;
 }
+
+#ifdef CONFIG_ACPI_DEALLOCATE_IRQ
+void
+iosapic_unregister_intr (unsigned int gsi)
+{
+	unsigned long flags;
+	int irq, vector;
+	irq_desc_t *idesc;
+	int rte_index;
+	unsigned long trigger, polarity;
+
+	/*
+	 * If the irq associated with the gsi is not found,
+	 * iosapic_unregister_intr() is unbalanced. We need to check
+	 * this again after getting locks.
+	 */
+	irq = gsi_to_irq(gsi);
+	if (irq < 0) {
+		printk(KERN_ERR "iosapic_unregister_intr(%u) unbalanced\n", gsi);
+		WARN_ON(1);
+		return;
+	}
+	vector = irq_to_vector(irq);
+
+	idesc = irq_descp(irq);
+	spin_lock_irqsave(&idesc->lock, flags);
+	spin_lock(&iosapic_lock);
+	{
+		rte_index = iosapic_intr_info[vector].rte_index;
+		if (rte_index < 0) {
+			spin_unlock(&iosapic_lock);
+			spin_unlock_irqrestore(&idesc->lock, flags);
+			printk(KERN_ERR "iosapic_unregister_intr(%u) unbalanced\n", gsi);
+			WARN_ON(1);
+			return;
+		}
+
+		if (--iosapic_intr_info[vector].refcnt > 0) {
+			spin_unlock(&iosapic_lock);
+			spin_unlock_irqrestore(&idesc->lock, flags);
+			return;
+		}
+
+		/*
+		 * If interrupt handlers still exist on the irq
+		 * associated with the gsi, don't unregister the
+		 * interrupt.
+		 */
+		if (idesc->action) {
+			iosapic_intr_info[vector].refcnt++;
+			spin_unlock(&iosapic_lock);
+			spin_unlock_irqrestore(&idesc->lock, flags);
+			printk(KERN_WARNING "Cannot unregister GSI. IRQ %u is still in use.\n", irq);
+			return;
+		}
+
+		/* Clear the interrupt controller descriptor. */
+		idesc->handler = &no_irq_type;
+
+		trigger  = iosapic_intr_info[vector].trigger;
+		polarity = iosapic_intr_info[vector].polarity;
+
+		/* Clear the interrupt information. */
+		memset(&iosapic_intr_info[vector], 0, sizeof(struct iosapic_intr_info));
+		iosapic_intr_info[vector].rte_index = -1;	/* mark as unused */
+	}
+	spin_unlock(&iosapic_lock);
+	spin_unlock_irqrestore(&idesc->lock, flags);
+
+	/* Free the interrupt vector */
+	free_irq_vector(vector);
+
+	printk(KERN_INFO "GSI %u (%s, %s) -> vector %d unregisterd.\n",
+	       gsi, (trigger == IOSAPIC_EDGE ? "edge" : "level"),
+	       (polarity == IOSAPIC_POL_HIGH ? "high" : "low"),
+	       vector);
+}
+#endif /* CONFIG_ACPI_DEALLOCATE_IRQ */
 
 /*
  * ACPI calls this when it finds an entry for a platform interrupt.
diff -Nru a/arch/ia64/kernel/irq.c b/arch/ia64/kernel/irq.c
--- a/arch/ia64/kernel/irq.c	2005-01-10 20:11:22 -08:00
+++ b/arch/ia64/kernel/irq.c	2005-01-10 20:11:22 -08:00
@@ -1030,6 +1030,9 @@
 	irq_desc_t *desc = irq_descp(irq);
 	int redir = test_bit(irq, pending_irq_redir);
 
+	if (unlikely(!desc->handler->set_affinity))
+		return;
+
 	if (!cpus_empty(pending_irq_cpumask[irq])) {
 		cpus_and(tmp, pending_irq_cpumask[irq], cpu_online_map);
 		if (unlikely(!cpus_empty(tmp))) {
diff -Nru a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c
--- a/arch/ia64/kernel/irq_ia64.c	2005-01-10 20:11:18 -08:00
+++ b/arch/ia64/kernel/irq_ia64.c	2005-01-10 20:11:18 -08:00
@@ -60,30 +60,34 @@
 };
 EXPORT_SYMBOL(isa_irq_to_vector_map);
 
-static inline void
-irq_enter (void)
-{
-	preempt_count() += HARDIRQ_OFFSET;
-}
-
-static inline void
-irq_exit (void)
-{
-	preempt_count() -= IRQ_EXIT_OFFSET;
-	if (!in_interrupt() && local_softirq_pending())
-		do_softirq();
-	preempt_enable_no_resched();
-}
+static unsigned long ia64_vector_mask[BITS_TO_LONGS(IA64_NUM_DEVICE_VECTORS)];
 
 int
 assign_irq_vector (int irq)
 {
-	static int next_vector = IA64_FIRST_DEVICE_VECTOR;
-
-	if (next_vector > IA64_LAST_DEVICE_VECTOR)
+	int pos, vector;
+ again:
+	pos = find_first_zero_bit(ia64_vector_mask, IA64_NUM_DEVICE_VECTORS);
+	vector = IA64_FIRST_DEVICE_VECTOR + pos;
+	if (vector > IA64_LAST_DEVICE_VECTOR)
 		/* XXX could look for sharable vectors instead of panic'ing... */
 		panic("assign_irq_vector: out of interrupt vectors!");
-	return next_vector++;
+	if (test_and_set_bit(pos, ia64_vector_mask))
+		goto again;
+	return vector;
+}
+
+void
+free_irq_vector (int vector)
+{
+	int pos;
+
+	if (vector < IA64_FIRST_DEVICE_VECTOR || vector > IA64_LAST_DEVICE_VECTOR)
+		return;
+
+	pos = vector - IA64_FIRST_DEVICE_VECTOR;
+	if (!test_and_clear_bit(pos, ia64_vector_mask))
+		printk(KERN_WARNING "%s: double free!\n", __FUNCTION__);
 }
 
 extern unsigned int do_IRQ(unsigned long irq, struct pt_regs *regs);
@@ -115,7 +119,7 @@
 		 * switched atomically.
 		 */
 		bsp = ia64_getreg(_IA64_REG_AR_BSP);
-		sp = ia64_getreg(_IA64_REG_AR_SP);
+		sp = ia64_getreg(_IA64_REG_SP);
 
 		if ((sp - bsp) < 1024) {
 			static unsigned char count;
diff -Nru a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c
--- a/arch/ia64/kernel/perfmon.c	2005-01-10 20:11:22 -08:00
+++ b/arch/ia64/kernel/perfmon.c	2005-01-10 20:11:22 -08:00
@@ -2160,9 +2160,7 @@
 
 	DPRINT(("new inode ino=%ld @%p\n", inode->i_ino, inode));
 
-	inode->i_sb   = pfmfs_mnt->mnt_sb;
 	inode->i_mode = S_IFCHR|S_IRUGO;
-	inode->i_sock = 0;
 	inode->i_uid  = current->fsuid;
 	inode->i_gid  = current->fsgid;
 
diff -Nru a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c
--- a/arch/ia64/kernel/process.c	2005-01-10 20:11:19 -08:00
+++ b/arch/ia64/kernel/process.c	2005-01-10 20:11:19 -08:00
@@ -25,6 +25,7 @@
 #include <linux/unistd.h>
 #include <linux/efi.h>
 #include <linux/interrupt.h>
+#include <linux/delay.h>
 
 #include <asm/cpu.h>
 #include <asm/delay.h>
@@ -46,6 +47,7 @@
 #include "sigframe.h"
 
 void (*ia64_mark_idle)(int);
+static cpumask_t cpu_idle_map;
 
 unsigned long boot_option_idle_override = 0;
 EXPORT_SYMBOL(boot_option_idle_override);
@@ -225,10 +227,28 @@
 }
 #endif /* CONFIG_HOTPLUG_CPU */
 
+
+void cpu_idle_wait(void)
+{
+        int cpu;
+        cpumask_t map;
+
+        for_each_online_cpu(cpu)
+                cpu_set(cpu, cpu_idle_map);
+
+        wmb();
+        do {
+                ssleep(1);
+                cpus_and(map, cpu_idle_map, cpu_online_map);
+        } while (!cpus_empty(map));
+}
+EXPORT_SYMBOL_GPL(cpu_idle_wait);
+
 void __attribute__((noreturn))
-cpu_idle (void *unused)
+cpu_idle (void)
 {
 	void (*mark_idle)(int) = ia64_mark_idle;
+	int cpu = smp_processor_id();
 
 	/* endless idle loop with no priority at all */
 	while (1) {
@@ -241,17 +261,14 @@
 
 			if (mark_idle)
 				(*mark_idle)(1);
-			/*
-			 * Mark this as an RCU critical section so that
-			 * synchronize_kernel() in the unload path waits
-			 * for our completion.
-			 */
-			rcu_read_lock();
+
+			if (cpu_isset(cpu, cpu_idle_map))
+				cpu_clear(cpu, cpu_idle_map);
+			rmb();
 			idle = pm_idle;
 			if (!idle)
 				idle = default_idle;
 			(*idle)();
-			rcu_read_unlock();
 		}
 
 		if (mark_idle)
diff -Nru a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c
--- a/arch/ia64/kernel/smpboot.c	2005-01-10 20:11:17 -08:00
+++ b/arch/ia64/kernel/smpboot.c	2005-01-10 20:11:17 -08:00
@@ -343,8 +343,6 @@
 int __devinit
 start_secondary (void *unused)
 {
-	extern int cpu_idle (void);
-
 	/* Early console may use I/O ports */
 	ia64_set_kr(IA64_KR_IO_BASE, __pa(ia64_iobase));
 
@@ -353,7 +351,8 @@
 	cpu_init();
 	smp_callin();
 
-	return cpu_idle();
+	cpu_idle();
+	return 0;
 }
 
 struct pt_regs * __devinit idle_regs(struct pt_regs *regs)
diff -Nru a/arch/ia64/kernel/topology.c b/arch/ia64/kernel/topology.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/ia64/kernel/topology.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,91 @@
+/*
+ * 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>
+ * Populate cpu entries in sysfs for non-numa systems as well
+ *  	Intel Corporation - Ashok Raj
+ */
+
+#include <linux/config.h>
+#include <linux/cpu.h>
+#include <linux/kernel.h>
+#include <linux/mm.h>
+#include <linux/node.h>
+#include <linux/init.h>
+#include <linux/bootmem.h>
+#include <asm/mmzone.h>
+#include <asm/numa.h>
+#include <asm/cpu.h>
+
+#ifdef CONFIG_NUMA
+static struct node *sysfs_nodes;
+#endif
+static struct ia64_cpu *sysfs_cpus;
+
+int arch_register_cpu(int num)
+{
+	struct node *parent = NULL;
+	
+#ifdef CONFIG_NUMA
+	parent = &sysfs_nodes[cpu_to_node(num)];
+#endif /* CONFIG_NUMA */
+
+	return register_cpu(&sysfs_cpus[num].cpu, num, parent);
+}
+
+#ifdef CONFIG_HOTPLUG_CPU
+
+void arch_unregister_cpu(int num)
+{
+	struct node *parent = NULL;
+
+#ifdef CONFIG_NUMA
+	int node = cpu_to_node(num);
+	parent = &sysfs_nodes[node];
+#endif /* CONFIG_NUMA */
+
+	return unregister_cpu(&sysfs_cpus[num].cpu, parent);
+}
+EXPORT_SYMBOL(arch_register_cpu);
+EXPORT_SYMBOL(arch_unregister_cpu);
+#endif /*CONFIG_HOTPLUG_CPU*/
+
+
+static int __init topology_init(void)
+{
+	int i, err = 0;
+
+#ifdef CONFIG_NUMA
+	sysfs_nodes = kmalloc(sizeof(struct node) * MAX_NUMNODES, GFP_KERNEL);
+	if (!sysfs_nodes) {
+		err = -ENOMEM;
+		goto out;
+	}
+	memset(sysfs_nodes, 0, sizeof(struct node) * MAX_NUMNODES);
+
+	/* MCD - Do we want to register all ONLINE nodes, or all POSSIBLE nodes? */
+	for_each_online_node(i)
+		if ((err = register_node(&sysfs_nodes[i], i, 0)))
+			goto out;
+#endif
+
+	sysfs_cpus = kmalloc(sizeof(struct ia64_cpu) * NR_CPUS, GFP_KERNEL);
+	if (!sysfs_cpus) {
+		err = -ENOMEM;
+		goto out;
+	}
+	memset(sysfs_cpus, 0, sizeof(struct ia64_cpu) * NR_CPUS);
+
+	for_each_present_cpu(i)
+		if((err = arch_register_cpu(i)))
+			goto out;
+out:
+	return err;
+}
+
+__initcall(topology_init);
diff -Nru a/arch/ia64/kernel/unwind.c b/arch/ia64/kernel/unwind.c
--- a/arch/ia64/kernel/unwind.c	2005-01-10 20:11:23 -08:00
+++ b/arch/ia64/kernel/unwind.c	2005-01-10 20:11:23 -08:00
@@ -2051,6 +2051,8 @@
 	find_save_locs(info);
 }
 
+EXPORT_SYMBOL(unw_init_frame_info);
+
 void
 unw_init_from_blocked_task (struct unw_frame_info *info, struct task_struct *t)
 {
@@ -2254,7 +2256,7 @@
 		if (i > 0)
 			unw.cache[i].lru_chain = (i - 1);
 		unw.cache[i].coll_chain = -1;
-		unw.cache[i].lock = RW_LOCK_UNLOCKED;
+		rwlock_init(&unw.cache[i].lock);
 	}
 	unw.lru_head = UNW_CACHE_SIZE - 1;
 	unw.lru_tail = 0;
diff -Nru a/arch/ia64/lib/io.c b/arch/ia64/lib/io.c
--- a/arch/ia64/lib/io.c	2005-01-10 20:11:15 -08:00
+++ b/arch/ia64/lib/io.c	2005-01-10 20:11:15 -08:00
@@ -8,8 +8,7 @@
  * Copy data from IO memory space to "real" memory space.
  * This needs to be optimized.
  */
-void
-__ia64_memcpy_fromio (void *to, volatile void __iomem *from, long count)
+void memcpy_fromio(void *to, const volatile void __iomem *from, long count)
 {
 	char *dst = to;
 
@@ -18,30 +17,28 @@
 		*dst++ = readb(from++);
 	}
 }
-EXPORT_SYMBOL(__ia64_memcpy_fromio);
+EXPORT_SYMBOL(memcpy_fromio);
 
 /*
  * Copy data from "real" memory space to IO memory space.
  * This needs to be optimized.
  */
-void
-__ia64_memcpy_toio (volatile void __iomem *to, void *from, long count)
+void memcpy_toio(volatile void __iomem *to, const void *from, long count)
 {
-	char *src = from;
+	const char *src = from;
 
 	while (count) {
 		count--;
 		writeb(*src++, to++);
 	}
 }
-EXPORT_SYMBOL(__ia64_memcpy_toio);
+EXPORT_SYMBOL(memcpy_toio);
 
 /*
  * "memset" on IO memory space.
  * This needs to be optimized.
  */
-void
-__ia64_memset_c_io (volatile void __iomem *dst, unsigned long c, long count)
+void memset_io(volatile void __iomem *dst, int c, long count)
 {
 	unsigned char ch = (char)(c & 0xff);
 
@@ -51,7 +48,7 @@
 		dst++;
 	}
 }
-EXPORT_SYMBOL(__ia64_memset_c_io);
+EXPORT_SYMBOL(memset_io);
 
 #ifdef CONFIG_IA64_GENERIC
 
diff -Nru a/arch/ia64/lib/swiotlb.c b/arch/ia64/lib/swiotlb.c
--- a/arch/ia64/lib/swiotlb.c	2005-01-10 20:11:21 -08:00
+++ b/arch/ia64/lib/swiotlb.c	2005-01-10 20:11:21 -08:00
@@ -44,41 +44,44 @@
 #define IO_TLB_SEGSIZE	128
 
 /*
- * log of the size of each IO TLB slab.  The number of slabs is command line controllable.
+ * log of the size of each IO TLB slab.  The number of slabs is command line
+ * controllable.
  */
 #define IO_TLB_SHIFT 11
 
 int swiotlb_force;
 
 /*
- * Used to do a quick range check in swiotlb_unmap_single and swiotlb_sync_single_*, to see
- * if the memory was in fact allocated by this API.
+ * Used to do a quick range check in swiotlb_unmap_single and
+ * swiotlb_sync_single_*, to see if the memory was in fact allocated by this
+ * API.
  */
 static char *io_tlb_start, *io_tlb_end;
 
 /*
- * The number of IO TLB blocks (in groups of 64) betweeen io_tlb_start and io_tlb_end.
- * This is command line adjustable via setup_io_tlb_npages.
+ * The number of IO TLB blocks (in groups of 64) betweeen io_tlb_start and
+ * io_tlb_end.  This is command line adjustable via setup_io_tlb_npages.
  * Default to 64MB.
  */
 static unsigned long io_tlb_nslabs = 32768;
 
-/* 
+/*
  * When the IOMMU overflows we return a fallback buffer. This sets the size.
  */
 static unsigned long io_tlb_overflow = 32*1024;
 
-void *io_tlb_overflow_buffer; 
+void *io_tlb_overflow_buffer;
 
 /*
- * This is a free list describing the number of free entries available from each index
+ * This is a free list describing the number of free entries available from
+ * each index
  */
 static unsigned int *io_tlb_list;
 static unsigned int io_tlb_index;
 
 /*
- * We need to save away the original address corresponding to a mapped entry for the sync
- * operations.
+ * We need to save away the original address corresponding to a mapped entry
+ * for the sync operations.
  */
 static unsigned char **io_tlb_orig_addr;
 
@@ -88,10 +91,11 @@
 static spinlock_t io_tlb_lock = SPIN_LOCK_UNLOCKED;
 
 static int __init
-setup_io_tlb_npages (char *str)
+setup_io_tlb_npages(char *str)
 {
-	if (isdigit(*str)) { 
-		io_tlb_nslabs = simple_strtoul(str, &str, 0) << (PAGE_SHIFT - IO_TLB_SHIFT);
+	if (isdigit(*str)) {
+		io_tlb_nslabs = simple_strtoul(str, &str, 0) <<
+			(PAGE_SHIFT - IO_TLB_SHIFT);
 		/* avoid tail segment of size < IO_TLB_SEGSIZE */
 		io_tlb_nslabs = ALIGN(io_tlb_nslabs, IO_TLB_SEGSIZE);
 	}
@@ -105,18 +109,19 @@
 /* make io_tlb_overflow tunable too? */
 
 /*
- * Statically reserve bounce buffer space and initialize bounce buffer data structures for
- * the software IO TLB used to implement the PCI DMA API.
+ * Statically reserve bounce buffer space and initialize bounce buffer data
+ * structures for the software IO TLB used to implement the PCI DMA API.
  */
 void
-swiotlb_init (void)
+swiotlb_init(void)
 {
 	unsigned long i;
 
 	/*
 	 * Get IO TLB memory from the low pages
 	 */
-	io_tlb_start = alloc_bootmem_low_pages(io_tlb_nslabs * (1 << IO_TLB_SHIFT));
+	io_tlb_start = alloc_bootmem_low_pages(io_tlb_nslabs *
+					       (1 << IO_TLB_SHIFT));
 	if (!io_tlb_start)
 		panic("Cannot allocate SWIOTLB buffer");
 	io_tlb_end = io_tlb_start + io_tlb_nslabs * (1 << IO_TLB_SHIFT);
@@ -131,28 +136,30 @@
  		io_tlb_list[i] = IO_TLB_SEGSIZE - OFFSET(i, IO_TLB_SEGSIZE);
 	io_tlb_index = 0;
 	io_tlb_orig_addr = alloc_bootmem(io_tlb_nslabs * sizeof(char *));
-	
-	/* 
-	 * Get the overflow emergency buffer 
+
+	/*
+	 * Get the overflow emergency buffer
 	 */
-	io_tlb_overflow_buffer = alloc_bootmem_low(io_tlb_overflow); 
+	io_tlb_overflow_buffer = alloc_bootmem_low(io_tlb_overflow);
 	printk(KERN_INFO "Placing software IO TLB between 0x%lx - 0x%lx\n",
 	       virt_to_phys(io_tlb_start), virt_to_phys(io_tlb_end));
 }
 
-static inline int address_needs_mapping(struct device *hwdev, dma_addr_t addr)
-{ 
-	dma_addr_t mask = 0xffffffff; 
-	if (hwdev && hwdev->dma_mask) 
-		mask = *hwdev->dma_mask; 
-	return (addr & ~mask) != 0; 		
-} 
+static inline int
+address_needs_mapping(struct device *hwdev, dma_addr_t addr)
+{
+	dma_addr_t mask = 0xffffffff;
+	/* If the device has a mask, use it, otherwise default to 32 bits */
+	if (hwdev && hwdev->dma_mask)
+		mask = *hwdev->dma_mask;
+	return (addr & ~mask) != 0;
+}
 
 /*
  * Allocates bounce buffer and returns its kernel virtual address.
  */
 static void *
-map_single (struct device *hwdev, char *buffer, size_t size, int dir)
+map_single(struct device *hwdev, char *buffer, size_t size, int dir)
 {
 	unsigned long flags;
 	char *dma_addr;
@@ -160,11 +167,11 @@
 	int i;
 
 	/*
-	 * For mappings greater than a page size, we limit the stride (and hence alignment)
-	 * to a page size.
+	 * For mappings greater than a page, we limit the stride (and
+	 * hence alignment) to a page size.
 	 */
 	nslots = ALIGN(size, 1 << IO_TLB_SHIFT) >> IO_TLB_SHIFT;
-	if (size > (1 << PAGE_SHIFT))
+	if (size > PAGE_SIZE)
 		stride = (1 << (PAGE_SHIFT - IO_TLB_SHIFT));
 	else
 		stride = 1;
@@ -173,8 +180,8 @@
 		BUG();
 
 	/*
-	 * Find suitable number of IO TLB entries size that will fit this request and
-	 * allocate a buffer from that IO TLB pool.
+	 * Find suitable number of IO TLB entries size that will fit this
+	 * request and allocate a buffer from that IO TLB pool.
 	 */
 	spin_lock_irqsave(&io_tlb_lock, flags);
 	{
@@ -185,22 +192,23 @@
 
 		do {
 			/*
-			 * If we find a slot that indicates we have 'nslots' number of
-			 * contiguous buffers, we allocate the buffers from that slot and
-			 * mark the entries as '0' indicating unavailable.
+			 * If we find a slot that indicates we have 'nslots'
+			 * number of contiguous buffers, we allocate the
+			 * buffers from that slot and mark the entries as '0'
+			 * indicating unavailable.
 			 */
 			if (io_tlb_list[index] >= nslots) {
 				int count = 0;
 
 				for (i = index; i < (int) (index + nslots); i++)
 					io_tlb_list[i] = 0;
-				for (i = index - 1; (OFFSET(i, IO_TLB_SEGSIZE) != IO_TLB_SEGSIZE -1)
-				       && io_tlb_list[i]; i--)
+				for (i = index - 1; (OFFSET(i, IO_TLB_SEGSIZE) != IO_TLB_SEGSIZE -1) && io_tlb_list[i]; i--)
 					io_tlb_list[i] = ++count;
 				dma_addr = io_tlb_start + (index << IO_TLB_SHIFT);
 
 				/*
-				 * Update the indices to avoid searching in the next round.
+				 * Update the indices to avoid searching in
+				 * the next round.
 				 */
 				io_tlb_index = ((index + nslots) < io_tlb_nslabs
 						? (index + nslots) : 0);
@@ -219,8 +227,9 @@
 	spin_unlock_irqrestore(&io_tlb_lock, flags);
 
 	/*
-	 * Save away the mapping from the original address to the DMA address.  This is
-	 * needed when we sync the memory.  Then we sync the buffer if needed.
+	 * Save away the mapping from the original address to the DMA address.
+	 * This is needed when we sync the memory.  Then we sync the buffer if
+	 * needed.
 	 */
 	io_tlb_orig_addr[index] = buffer;
 	if (dir == DMA_TO_DEVICE || dir == DMA_BIDIRECTIONAL)
@@ -233,52 +242,51 @@
  * dma_addr is the kernel virtual address of the bounce buffer to unmap.
  */
 static void
-unmap_single (struct device *hwdev, char *dma_addr, size_t size, int dir)
+unmap_single(struct device *hwdev, char *dma_addr, size_t size, int dir)
 {
 	unsigned long flags;
-	int i, nslots = ALIGN(size, 1 << IO_TLB_SHIFT) >> IO_TLB_SHIFT;
+	int i, count, nslots = ALIGN(size, 1 << IO_TLB_SHIFT) >> IO_TLB_SHIFT;
 	int index = (dma_addr - io_tlb_start) >> IO_TLB_SHIFT;
 	char *buffer = io_tlb_orig_addr[index];
 
 	/*
 	 * First, sync the memory before unmapping the entry
 	 */
-	if ((dir == DMA_FROM_DEVICE) || (dir == DMA_BIDIRECTIONAL))
+	if (buffer && ((dir == DMA_FROM_DEVICE) || (dir == DMA_BIDIRECTIONAL)))
 		/*
-		 * bounce... copy the data back into the original buffer * and delete the
-		 * bounce buffer.
+		 * bounce... copy the data back into the original buffer * and
+		 * delete the bounce buffer.
 		 */
 		memcpy(buffer, dma_addr, size);
 
 	/*
-	 * Return the buffer to the free list by setting the corresponding entries to
-	 * indicate the number of contigous entries available.  While returning the
-	 * entries to the free list, we merge the entries with slots below and above the
-	 * pool being returned.
+	 * Return the buffer to the free list by setting the corresponding
+	 * entries to indicate the number of contigous entries available.
+	 * While returning the entries to the free list, we merge the entries
+	 * with slots below and above the pool being returned.
 	 */
 	spin_lock_irqsave(&io_tlb_lock, flags);
 	{
-		int count = ((index + nslots) < ALIGN(index + 1, IO_TLB_SEGSIZE) ?
-			     io_tlb_list[index + nslots] : 0);
+		count = ((index + nslots) < ALIGN(index + 1, IO_TLB_SEGSIZE) ?
+			 io_tlb_list[index + nslots] : 0);
 		/*
-		 * Step 1: return the slots to the free list, merging the slots with
-		 * superceeding slots
+		 * Step 1: return the slots to the free list, merging the
+		 * slots with superceeding slots
 		 */
 		for (i = index + nslots - 1; i >= index; i--)
 			io_tlb_list[i] = ++count;
 		/*
-		 * Step 2: merge the returned slots with the preceding slots, if
-		 * available (non zero)
+		 * Step 2: merge the returned slots with the preceding slots,
+		 * if available (non zero)
 		 */
-		for (i = index - 1;  (OFFSET(i, IO_TLB_SEGSIZE) != IO_TLB_SEGSIZE -1) &&
-		       io_tlb_list[i]; i--)
+		for (i = index - 1; (OFFSET(i, IO_TLB_SEGSIZE) != IO_TLB_SEGSIZE -1) && io_tlb_list[i]; i--)
 			io_tlb_list[i] = ++count;
 	}
 	spin_unlock_irqrestore(&io_tlb_lock, flags);
 }
 
 static void
-sync_single (struct device *hwdev, char *dma_addr, size_t size, int dir)
+sync_single(struct device *hwdev, char *dma_addr, size_t size, int dir)
 {
 	int index = (dma_addr - io_tlb_start) >> IO_TLB_SHIFT;
 	char *buffer = io_tlb_orig_addr[index];
@@ -296,17 +304,36 @@
 }
 
 void *
-swiotlb_alloc_coherent (struct device *hwdev, size_t size, dma_addr_t *dma_handle, int flags)
+swiotlb_alloc_coherent(struct device *hwdev, size_t size,
+		       dma_addr_t *dma_handle, int flags)
 {
 	unsigned long dev_addr;
 	void *ret;
+	int order = get_order(size);
 
-	/* XXX fix me: the DMA API should pass us an explicit DMA mask instead: */
+	/*
+	 * XXX fix me: the DMA API should pass us an explicit DMA mask
+	 * instead, or use ZONE_DMA32 (ia64 overloads ZONE_DMA to be a ~32
+	 * bit range instead of a 16MB one).
+	 */
 	flags |= GFP_DMA;
 
-	ret = (void *)__get_free_pages(flags, get_order(size));
+	ret = (void *)__get_free_pages(flags, order);
+	if (ret && address_needs_mapping(hwdev, virt_to_phys(ret))) {
+		/*
+		 * The allocated memory isn't reachable by the device.
+		 * Fall back on swiotlb_map_single().
+		 */
+		free_pages((unsigned long) ret, order);
+		ret = NULL;
+	}
 	if (!ret) {
-		 /* DMA_FROM_DEVICE is to avoid the memcpy in map_single */
+		/*
+		 * We are either out of memory or the device can't DMA
+		 * to GFP_DMA memory; fall back on
+		 * swiotlb_map_single(), which will grab memory from
+		 * the lowest available address range.
+		 */
 		dma_addr_t handle;
 		handle = swiotlb_map_single(NULL, NULL, size, DMA_FROM_DEVICE);
 		if (dma_mapping_error(handle))
@@ -317,14 +344,21 @@
 
 	memset(ret, 0, size);
 	dev_addr = virt_to_phys(ret);
-	if (address_needs_mapping(hwdev,dev_addr))
-		panic("swiotlb_alloc_consistent: allocated memory is out of range for device");
+
+	/* Confirm address can be DMA'd by device */
+	if (address_needs_mapping(hwdev, dev_addr)) {
+		printk("hwdev DMA mask = 0x%016lx, dev_addr = 0x%016lx\n",
+		       *hwdev->dma_mask, dev_addr);
+		panic("swiotlb_alloc_coherent: allocated memory is out of "
+		      "range for device");
+	}
 	*dma_handle = dev_addr;
 	return ret;
 }
 
 void
-swiotlb_free_coherent (struct device *hwdev, size_t size, void *vaddr, dma_addr_t dma_handle)
+swiotlb_free_coherent(struct device *hwdev, size_t size, void *vaddr,
+		      dma_addr_t dma_handle)
 {
 	if (!(vaddr >= (void *)io_tlb_start
                     && vaddr < (void *)io_tlb_end))
@@ -334,66 +368,63 @@
 		swiotlb_unmap_single (hwdev, dma_handle, size, DMA_TO_DEVICE);
 }
 
-static void swiotlb_full(struct device *dev, size_t size, int dir, int do_panic)
+static void
+swiotlb_full(struct device *dev, size_t size, int dir, int do_panic)
 {
-	/* 
+	/*
 	 * Ran out of IOMMU space for this operation. This is very bad.
 	 * Unfortunately the drivers cannot handle this operation properly.
 	 * unless they check for pci_dma_mapping_error (most don't)
 	 * When the mapping is small enough return a static buffer to limit
-	 * the damage, or panic when the transfer is too big. 
-	 */ 
-	
-	printk(KERN_ERR 
-  "PCI-DMA: Out of SW-IOMMU space for %lu bytes at device %s\n",
-	       size, dev ? dev->bus_id : "?");
+	 * the damage, or panic when the transfer is too big.
+	 */
+	printk(KERN_ERR "PCI-DMA: Out of SW-IOMMU space for %lu bytes at "
+	       "device %s\n", size, dev ? dev->bus_id : "?");
 
 	if (size > io_tlb_overflow && do_panic) {
 		if (dir == PCI_DMA_FROMDEVICE || dir == PCI_DMA_BIDIRECTIONAL)
 			panic("PCI-DMA: Memory would be corrupted\n");
-		if (dir == PCI_DMA_TODEVICE || dir == PCI_DMA_BIDIRECTIONAL) 
-			panic("PCI-DMA: Random memory would be DMAed\n"); 
-	} 
-} 
+		if (dir == PCI_DMA_TODEVICE || dir == PCI_DMA_BIDIRECTIONAL)
+			panic("PCI-DMA: Random memory would be DMAed\n");
+	}
+}
 
 /*
- * Map a single buffer of the indicated size for DMA in streaming mode.  The PCI address
- * to use is returned.
+ * Map a single buffer of the indicated size for DMA in streaming mode.  The
+ * PCI address to use is returned.
  *
- * Once the device is given the dma address, the device owns this memory until either
- * swiotlb_unmap_single or swiotlb_dma_sync_single is performed.
+ * Once the device is given the dma address, the device owns this memory until
+ * either swiotlb_unmap_single or swiotlb_dma_sync_single is performed.
  */
 dma_addr_t
-swiotlb_map_single (struct device *hwdev, void *ptr, size_t size, int dir)
+swiotlb_map_single(struct device *hwdev, void *ptr, size_t size, int dir)
 {
 	unsigned long dev_addr = virt_to_phys(ptr);
-	void *map; 
+	void *map;
 
 	if (dir == DMA_NONE)
 		BUG();
 	/*
-	 * Check if the PCI device can DMA to ptr... if so, just return ptr
+	 * If the pointer passed in happens to be in the device's DMA window,
+	 * we can safely return the device addr and not worry about bounce
+	 * buffering it.
 	 */
-	if (!address_needs_mapping(hwdev, dev_addr) && !swiotlb_force) 
-		/*
-		 * Device is bit capable of DMA'ing to the buffer... just return the PCI
-		 * address of ptr
-		 */
+	if (!address_needs_mapping(hwdev, dev_addr) && !swiotlb_force)
 		return dev_addr;
 
 	/*
-	 * get a bounce buffer:
+	 * Oh well, have to allocate and map a bounce buffer.
 	 */
 	map = map_single(hwdev, ptr, size, dir);
-	if (!map) { 
-		swiotlb_full(hwdev, size, dir, 1);		
-		map = io_tlb_overflow_buffer; 
+	if (!map) {
+		swiotlb_full(hwdev, size, dir, 1);
+		map = io_tlb_overflow_buffer;
 	}
 
 	dev_addr = virt_to_phys(map);
 
 	/*
-	 * Ensure that the address returned is DMA'ble:
+	 * Ensure that the address returned is DMA'ble
 	 */
 	if (address_needs_mapping(hwdev, dev_addr))
 		panic("map_single: bounce buffer is not DMA'ble");
@@ -407,7 +438,7 @@
  * flush them when they get mapped into an executable vm-area.
  */
 static void
-mark_clean (void *addr, size_t size)
+mark_clean(void *addr, size_t size)
 {
 	unsigned long pg_addr, end;
 
@@ -421,15 +452,16 @@
 }
 
 /*
- * Unmap a single streaming mode DMA translation.  The dma_addr and size must match what
- * was provided for in a previous swiotlb_map_single call.  All other usages are
- * undefined.
+ * Unmap a single streaming mode DMA translation.  The dma_addr and size must
+ * match what was provided for in a previous swiotlb_map_single call.  All
+ * other usages are undefined.
  *
- * After this call, reads by the cpu to the buffer are guaranteed to see whatever the
- * device wrote there.
+ * After this call, reads by the cpu to the buffer are guaranteed to see
+ * whatever the device wrote there.
  */
 void
-swiotlb_unmap_single (struct device *hwdev, dma_addr_t dev_addr, size_t size, int dir)
+swiotlb_unmap_single(struct device *hwdev, dma_addr_t dev_addr, size_t size,
+		     int dir)
 {
 	char *dma_addr = phys_to_virt(dev_addr);
 
@@ -442,16 +474,18 @@
 }
 
 /*
- * Make physical memory consistent for a single streaming mode DMA translation after a
- * transfer.
+ * Make physical memory consistent for a single streaming mode DMA translation
+ * after a transfer.
  *
- * If you perform a swiotlb_map_single() but wish to interrogate the buffer using the cpu,
- * yet do not wish to teardown the PCI dma mapping, you must call this function before
- * doing so.  At the next point you give the PCI dma address back to the card, you must
- * first perform a swiotlb_dma_sync_for_device, and then the device again owns the buffer
+ * If you perform a swiotlb_map_single() but wish to interrogate the buffer
+ * using the cpu, yet do not wish to teardown the PCI dma mapping, you must
+ * call this function before doing so.  At the next point you give the PCI dma
+ * address back to the card, you must first perform a
+ * swiotlb_dma_sync_for_device, and then the device again owns the buffer
  */
 void
-swiotlb_sync_single_for_cpu (struct device *hwdev, dma_addr_t dev_addr, size_t size, int dir)
+swiotlb_sync_single_for_cpu(struct device *hwdev, dma_addr_t dev_addr,
+			    size_t size, int dir)
 {
 	char *dma_addr = phys_to_virt(dev_addr);
 
@@ -464,7 +498,8 @@
 }
 
 void
-swiotlb_sync_single_for_device (struct device *hwdev, dma_addr_t dev_addr, size_t size, int dir)
+swiotlb_sync_single_for_device(struct device *hwdev, dma_addr_t dev_addr,
+			       size_t size, int dir)
 {
 	char *dma_addr = phys_to_virt(dev_addr);
 
@@ -477,10 +512,11 @@
 }
 
 /*
- * Map a set of buffers described by scatterlist in streaming mode for DMA.  This is the
- * scatter-gather version of the above swiotlb_map_single interface.  Here the scatter
- * gather list elements are each tagged with the appropriate dma address and length.  They
- * are obtained via sg_dma_{address,length}(SG).
+ * Map a set of buffers described by scatterlist in streaming mode for DMA.
+ * This is the scatter-gather version of the above swiotlb_map_single
+ * interface.  Here the scatter gather list elements are each tagged with the
+ * appropriate dma address and length.  They are obtained via
+ * sg_dma_{address,length}(SG).
  *
  * NOTE: An implementation may be able to use a smaller number of
  *       DMA address/length pairs than there are SG table elements.
@@ -488,10 +524,12 @@
  *       The routine returns the number of addr/length pairs actually
  *       used, at most nents.
  *
- * Device ownership issues as mentioned above for swiotlb_map_single are the same here.
+ * Device ownership issues as mentioned above for swiotlb_map_single are the
+ * same here.
  */
 int
-swiotlb_map_sg (struct device *hwdev, struct scatterlist *sg, int nelems, int dir)
+swiotlb_map_sg(struct device *hwdev, struct scatterlist *sg, int nelems,
+	       int dir)
 {
 	void *addr;
 	unsigned long dev_addr;
@@ -506,9 +544,9 @@
 		if (swiotlb_force || address_needs_mapping(hwdev, dev_addr)) {
 			sg->dma_address = (dma_addr_t) virt_to_phys(map_single(hwdev, addr, sg->length, dir));
 			if (!sg->dma_address) {
-				/* Don't panic here, we expect pci_map_sg users
+				/* Don't panic here, we expect map_sg users
 				   to do proper error handling. */
-				swiotlb_full(hwdev, sg->length, dir, 0); 
+				swiotlb_full(hwdev, sg->length, dir, 0);
 				swiotlb_unmap_sg(hwdev, sg - i, i, dir);
 				sg[0].dma_length = 0;
 				return 0;
@@ -521,11 +559,12 @@
 }
 
 /*
- * Unmap a set of streaming mode DMA translations.  Again, cpu read rules concerning calls
- * here are the same as for swiotlb_unmap_single() above.
+ * Unmap a set of streaming mode DMA translations.  Again, cpu read rules
+ * concerning calls here are the same as for swiotlb_unmap_single() above.
  */
 void
-swiotlb_unmap_sg (struct device *hwdev, struct scatterlist *sg, int nelems, int dir)
+swiotlb_unmap_sg(struct device *hwdev, struct scatterlist *sg, int nelems,
+		 int dir)
 {
 	int i;
 
@@ -540,14 +579,15 @@
 }
 
 /*
- * Make physical memory consistent for a set of streaming mode DMA translations after a
- * transfer.
+ * Make physical memory consistent for a set of streaming mode DMA translations
+ * after a transfer.
  *
- * The same as swiotlb_sync_single_* but for a scatter-gather list, same rules and
- * usage.
+ * The same as swiotlb_sync_single_* but for a scatter-gather list, same rules
+ * and usage.
  */
 void
-swiotlb_sync_sg_for_cpu (struct device *hwdev, struct scatterlist *sg, int nelems, int dir)
+swiotlb_sync_sg_for_cpu(struct device *hwdev, struct scatterlist *sg,
+			int nelems, int dir)
 {
 	int i;
 
@@ -556,11 +596,13 @@
 
 	for (i = 0; i < nelems; i++, sg++)
 		if (sg->dma_address != SG_ENT_PHYS_ADDRESS(sg))
-			sync_single(hwdev, (void *) sg->dma_address, sg->dma_length, dir);
+			sync_single(hwdev, (void *) sg->dma_address,
+				    sg->dma_length, dir);
 }
 
 void
-swiotlb_sync_sg_for_device (struct device *hwdev, struct scatterlist *sg, int nelems, int dir)
+swiotlb_sync_sg_for_device(struct device *hwdev, struct scatterlist *sg,
+			   int nelems, int dir)
 {
 	int i;
 
@@ -569,24 +611,26 @@
 
 	for (i = 0; i < nelems; i++, sg++)
 		if (sg->dma_address != SG_ENT_PHYS_ADDRESS(sg))
-			sync_single(hwdev, (void *) sg->dma_address, sg->dma_length, dir);
+			sync_single(hwdev, (void *) sg->dma_address,
+				    sg->dma_length, dir);
 }
 
 int
-swiotlb_dma_mapping_error (dma_addr_t dma_addr)
+swiotlb_dma_mapping_error(dma_addr_t dma_addr)
 {
 	return (dma_addr == virt_to_phys(io_tlb_overflow_buffer));
 }
 
 /*
- * Return whether the given PCI device DMA address mask can be supported properly.  For
- * example, if your device can only drive the low 24-bits during PCI bus mastering, then
- * you would pass 0x00ffffff as the mask to this function.
+ * Return whether the given PCI device DMA address mask can be supported
+ * properly.  For example, if your device can only drive the low 24-bits
+ * during PCI bus mastering, then you would pass 0x00ffffff as the mask to
+ * this function.
  */
 int
 swiotlb_dma_supported (struct device *hwdev, u64 mask)
 {
-	return 1;
+	return (virt_to_phys (io_tlb_end) - 1) <= mask;
 }
 
 EXPORT_SYMBOL(swiotlb_init);
diff -Nru a/arch/ia64/mm/contig.c b/arch/ia64/mm/contig.c
--- a/arch/ia64/mm/contig.c	2005-01-10 20:11:18 -08:00
+++ b/arch/ia64/mm/contig.c	2005-01-10 20:11:18 -08:00
@@ -214,8 +214,8 @@
 {
 	unsigned long *count = arg;
 
-	if (end <= MAX_DMA_ADDRESS)
-		*count += (end - start) >> PAGE_SHIFT;
+	if (start < MAX_DMA_ADDRESS)
+		*count += (min(end, MAX_DMA_ADDRESS) - start) >> PAGE_SHIFT;
 	return 0;
 }
 #endif
diff -Nru a/arch/ia64/mm/discontig.c b/arch/ia64/mm/discontig.c
--- a/arch/ia64/mm/discontig.c	2005-01-10 20:11:22 -08:00
+++ b/arch/ia64/mm/discontig.c	2005-01-10 20:11:22 -08:00
@@ -39,7 +39,7 @@
 	unsigned long max_pfn;
 };
 
-static struct early_node_data mem_data[NR_NODES] __initdata;
+static struct early_node_data mem_data[MAX_NUMNODES] __initdata;
 
 /**
  * reassign_cpu_only_nodes - called from find_memory to move CPU-only nodes to a memory node
@@ -56,9 +56,9 @@
 	struct node_memblk_s *p;
 	int i, j, k, nnode, nid, cpu, cpunid, pxm;
 	u8 cslit, slit;
-	static DECLARE_BITMAP(nodes_with_mem, NR_NODES) __initdata;
+	static DECLARE_BITMAP(nodes_with_mem, MAX_NUMNODES) __initdata;
 	static u8 numa_slit_fix[MAX_NUMNODES * MAX_NUMNODES] __initdata;
-	static int node_flip[NR_NODES] __initdata;
+	static int node_flip[MAX_NUMNODES] __initdata;
 	static int old_nid_map[NR_CPUS] __initdata;
 
 	for (nnode = 0, p = &node_memblk[0]; p < &node_memblk[num_node_memblks]; p++)
@@ -70,7 +70,7 @@
 	/*
 	 * All nids with memory.
 	 */
-	if (nnode == numnodes)
+	if (nnode == num_online_nodes())
 		return;
 
 	/*
@@ -79,10 +79,17 @@
 	 * For reassigned CPU nodes a nid can't be arrived at
 	 * until after this loop because the target nid's new
 	 * identity might not have been established yet. So
-	 * new nid values are fabricated above numnodes and
+	 * new nid values are fabricated above num_online_nodes() and
 	 * mapped back later to their true value.
 	 */
-	for (nid = 0, i = 0; i < numnodes; i++)  {
+	/* MCD - This code is a bit complicated, but may be unnecessary now.
+	 * We can now handle much more interesting node-numbering.
+	 * The old requirement that 0 <= nid <= numnodes <= MAX_NUMNODES
+	 * and that there be no holes in the numbering 0..numnodes
+	 * has become simply 0 <= nid <= MAX_NUMNODES.
+	 */
+	nid = 0;
+	for_each_online_node(i)  {
 		if (test_bit(i, (void *) nodes_with_mem)) {
 			/*
 			 * Save original nid value for numa_slit
@@ -102,7 +109,7 @@
 			cpunid = nid;
 			nid++;
 		} else
-			cpunid = numnodes;
+			cpunid = MAX_NUMNODES;
 
 		for (cpu = 0; cpu < NR_CPUS; cpu++)
 			if (node_cpuid[cpu].nid == i) {
@@ -110,7 +117,7 @@
 				 * For nodes not being reassigned just
 				 * fix the cpu's nid and reverse pxm map
 				 */
-				if (cpunid < numnodes) {
+				if (cpunid < MAX_NUMNODES) {
 					pxm = nid_to_pxm_map[i];
 					pxm_to_nid_map[pxm] =
 					          node_cpuid[cpu].nid = cpunid;
@@ -120,18 +127,21 @@
 				/*
 				 * For nodes being reassigned, find best node by
 				 * numa_slit information and then make a temporary
-				 * nid value based on current nid and numnodes.
+				 * nid value based on current nid and num_online_nodes().
 				 */
-				for (slit = 0xff, k = numnodes + numnodes, j = 0; j < numnodes; j++)
+				slit = 0xff;
+				k = 2*num_online_nodes();
+				for_each_online_node(j) {
 					if (i == j)
 						continue;
 					else if (test_bit(j, (void *) nodes_with_mem)) {
-						cslit = numa_slit[i * numnodes + j];
+						cslit = numa_slit[i * num_online_nodes() + j];
 						if (cslit < slit) {
-							k = numnodes + j;
+							k = num_online_nodes() + j;
 							slit = cslit;
 						}
 					}
+				}
 
 				/* save old nid map so we can update the pxm */
 				old_nid_map[cpu] = node_cpuid[cpu].nid;
@@ -143,12 +153,12 @@
 	 * Fixup temporary nid values for CPU-only nodes.
 	 */
 	for (cpu = 0; cpu < NR_CPUS; cpu++)
-		if (node_cpuid[cpu].nid == (numnodes + numnodes)) {
+		if (node_cpuid[cpu].nid == (2*num_online_nodes())) {
 			pxm = nid_to_pxm_map[old_nid_map[cpu]];
 			pxm_to_nid_map[pxm] = node_cpuid[cpu].nid = nnode - 1;
 		} else {
 			for (i = 0; i < nnode; i++) {
-				if (node_flip[i] != (node_cpuid[cpu].nid - numnodes))
+				if (node_flip[i] != (node_cpuid[cpu].nid - num_online_nodes()))
 					continue;
 
 				pxm = nid_to_pxm_map[old_nid_map[cpu]];
@@ -164,14 +174,13 @@
 	for (i = 0; i < nnode; i++)
 		for (j = 0; j < nnode; j++)
 			numa_slit_fix[i * nnode + j] =
-				numa_slit[node_flip[i] * numnodes + node_flip[j]];
+				numa_slit[node_flip[i] * num_online_nodes() + node_flip[j]];
 
 	memcpy(numa_slit, numa_slit_fix, sizeof (numa_slit));
 
-	for (i = nnode; i < numnodes; i++)
-		node_set_offline(i);
-
-	numnodes = nnode;
+	nodes_clear(node_online_map);
+	for (i = 0; i < nnode; i++)
+		node_set_online(i);
 
 	return;
 }
@@ -370,7 +379,7 @@
 	struct bootmem_data *bdp;
 	int node;
 
-	for (node = 0; node < numnodes; node++) {
+	for_each_online_node(node) {
 		pg_data_t *pdp = mem_data[node].pgdat;
 
 		bdp = pdp->bdata;
@@ -399,13 +408,13 @@
 static void __init initialize_pernode_data(void)
 {
 	int cpu, node;
-	pg_data_t *pgdat_list[NR_NODES];
+	pg_data_t *pgdat_list[MAX_NUMNODES];
 
-	for (node = 0; node < numnodes; node++)
+	for_each_online_node(node)
 		pgdat_list[node] = mem_data[node].pgdat;
 
 	/* Copy the pg_data_t list to each node and init the node field */
-	for (node = 0; node < numnodes; node++) {
+	for_each_online_node(node) {
 		memcpy(mem_data[node].node_data->pg_data_ptrs, pgdat_list,
 		       sizeof(pgdat_list));
 	}
@@ -429,15 +438,15 @@
 
 	reserve_memory();
 
-	if (numnodes == 0) {
+	if (num_online_nodes() == 0) {
 		printk(KERN_ERR "node info missing!\n");
-		numnodes = 1;
+		node_set_online(0);
 	}
 
 	min_low_pfn = -1;
 	max_low_pfn = 0;
 
-	if (numnodes > 1)
+	if (num_online_nodes() > 1)
 		reassign_cpu_only_nodes();
 
 	/* These actually end up getting called by call_pernode_memory() */
@@ -448,10 +457,13 @@
 	 * Initialize the boot memory maps in reverse order since that's
 	 * what the bootmem allocator expects
 	 */
-	for (node = numnodes - 1; node >= 0; node--) {
+	for (node = MAX_NUMNODES - 1; node >= 0; node--) {
 		unsigned long pernode, pernodesize, map;
 		struct bootmem_data *bdp;
 
+		if (!node_online(node))
+			continue;
+
 		bdp = &mem_data[node].bootmem_data;
 		pernode = mem_data[node].pernode_addr;
 		pernodesize = mem_data[node].pernode_size;
@@ -638,12 +650,12 @@
 	max_dma = virt_to_phys((void *) MAX_DMA_ADDRESS) >> PAGE_SHIFT;
 
 	/* so min() will work in count_node_pages */
-	for (node = 0; node < numnodes; node++)
+	for_each_online_node(node)
 		mem_data[node].min_pfn = ~0UL;
 
 	efi_memmap_walk(filter_rsvd_memory, count_node_pages);
 
-	for (node = 0; node < numnodes; node++) {
+	for_each_online_node(node) {
 		memset(zones_size, 0, sizeof(zones_size));
 		memset(zholes_size, 0, sizeof(zholes_size));
 
diff -Nru a/arch/ia64/mm/fault.c b/arch/ia64/mm/fault.c
--- a/arch/ia64/mm/fault.c	2005-01-10 20:11:22 -08:00
+++ b/arch/ia64/mm/fault.c	2005-01-10 20:11:22 -08:00
@@ -51,6 +51,7 @@
 mapped_kernel_page_is_present (unsigned long address)
 {
 	pgd_t *pgd;
+	pud_t *pud;
 	pmd_t *pmd;
 	pte_t *ptep, pte;
 
@@ -58,7 +59,11 @@
 	if (pgd_none(*pgd) || pgd_bad(*pgd))
 		return 0;
 
-	pmd = pmd_offset(pgd, address);
+	pud = pud_offset(pgd, address);
+	if (pud_none(*pud) || pud_bad(*pud))
+		return 0;
+
+	pmd = pmd_offset(pud, address);
 	if (pmd_none(*pmd) || pmd_bad(*pmd))
 		return 0;
 
diff -Nru a/arch/ia64/mm/hugetlbpage.c b/arch/ia64/mm/hugetlbpage.c
--- a/arch/ia64/mm/hugetlbpage.c	2005-01-10 20:11:19 -08:00
+++ b/arch/ia64/mm/hugetlbpage.c	2005-01-10 20:11:19 -08:00
@@ -29,13 +29,17 @@
 {
 	unsigned long taddr = htlbpage_to_page(addr);
 	pgd_t *pgd;
+	pud_t *pud;
 	pmd_t *pmd;
 	pte_t *pte = NULL;
 
 	pgd = pgd_offset(mm, taddr);
-	pmd = pmd_alloc(mm, pgd, taddr);
-	if (pmd)
-		pte = pte_alloc_map(mm, pmd, taddr);
+	pud = pud_alloc(mm, pgd, taddr);
+	if (pud) {
+		pmd = pmd_alloc(mm, pud, taddr);
+		if (pmd)
+			pte = pte_alloc_map(mm, pmd, taddr);
+	}
 	return pte;
 }
 
@@ -44,14 +48,18 @@
 {
 	unsigned long taddr = htlbpage_to_page(addr);
 	pgd_t *pgd;
+	pud_t *pud;
 	pmd_t *pmd;
 	pte_t *pte = NULL;
 
 	pgd = pgd_offset(mm, taddr);
 	if (pgd_present(*pgd)) {
-		pmd = pmd_offset(pgd, taddr);
-		if (pmd_present(*pmd))
-			pte = pte_offset_map(pmd, taddr);
+		pud = pud_offset(pgd, taddr);
+		if (pud_present(*pud)) {
+			pmd = pmd_offset(pud, taddr);
+			if (pmd_present(*pmd))
+				pte = pte_offset_map(pmd, taddr);
+		}
 	}
 
 	return pte;
@@ -187,7 +195,6 @@
 {
 	unsigned long first = start & HUGETLB_PGDIR_MASK;
 	unsigned long last = end + HUGETLB_PGDIR_SIZE - 1;
-	unsigned long start_index, end_index;
 	struct mm_struct *mm = tlb->mm;
 
 	if (!prev) {
@@ -212,23 +219,13 @@
 				last = next->vm_start;
 		}
 		if (prev->vm_end > first)
-			first = prev->vm_end + HUGETLB_PGDIR_SIZE - 1;
+			first = prev->vm_end;
 		break;
 	}
 no_mmaps:
 	if (last < first)	/* for arches with discontiguous pgd indices */
 		return;
-	/*
-	 * If the PGD bits are not consecutive in the virtual address, the
-	 * old method of shifting the VA >> by PGDIR_SHIFT doesn't work.
-	 */
-
-	start_index = pgd_index(htlbpage_to_page(first));
-	end_index = pgd_index(htlbpage_to_page(last));
-
-	if (end_index > start_index) {
-		clear_page_tables(tlb, start_index, end_index - start_index);
-	}
+	clear_page_range(tlb, first, last);
 }
 
 void unmap_hugepage_range(struct vm_area_struct *vma, unsigned long start, unsigned long end)
diff -Nru a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c
--- a/arch/ia64/mm/init.c	2005-01-10 20:11:18 -08:00
+++ b/arch/ia64/mm/init.c	2005-01-10 20:11:18 -08:00
@@ -237,6 +237,7 @@
 put_kernel_page (struct page *page, unsigned long address, pgprot_t pgprot)
 {
 	pgd_t *pgd;
+	pud_t *pud;
 	pmd_t *pmd;
 	pte_t *pte;
 
@@ -248,7 +249,11 @@
 
 	spin_lock(&init_mm.page_table_lock);
 	{
-		pmd = pmd_alloc(&init_mm, pgd, address);
+		pud = pud_alloc(&init_mm, pgd, address);
+		if (!pud)
+			goto out;
+
+		pmd = pmd_alloc(&init_mm, pud, address);
 		if (!pmd)
 			goto out;
 		pte = pte_alloc_map(&init_mm, pmd, address);
@@ -381,6 +386,7 @@
 	struct page *map_start, *map_end;
 	int node;
 	pgd_t *pgd;
+	pud_t *pud;
 	pmd_t *pmd;
 	pte_t *pte;
 
@@ -395,7 +401,11 @@
 		pgd = pgd_offset_k(address);
 		if (pgd_none(*pgd))
 			pgd_populate(&init_mm, pgd, alloc_bootmem_pages_node(NODE_DATA(node), PAGE_SIZE));
-		pmd = pmd_offset(pgd, address);
+		pud = pud_offset(pgd, address);
+
+		if (pud_none(*pud))
+			pud_populate(&init_mm, pud, alloc_bootmem_pages_node(NODE_DATA(node), PAGE_SIZE));
+		pmd = pmd_offset(pud, address);
 
 		if (pmd_none(*pmd))
 			pmd_populate_kernel(&init_mm, pmd, alloc_bootmem_pages_node(NODE_DATA(node), PAGE_SIZE));
@@ -422,7 +432,6 @@
 	struct page *map_start, *map_end;
 
 	args = (struct memmap_init_callback_data *) arg;
-
 	map_start = vmem_map + (__pa(start) >> PAGE_SHIFT);
 	map_end   = vmem_map + (__pa(end) >> PAGE_SHIFT);
 
diff -Nru a/arch/ia64/mm/numa.c b/arch/ia64/mm/numa.c
--- a/arch/ia64/mm/numa.c	2005-01-10 20:11:17 -08:00
+++ b/arch/ia64/mm/numa.c	2005-01-10 20:11:17 -08:00
@@ -20,8 +20,6 @@
 #include <asm/mmzone.h>
 #include <asm/numa.h>
 
-static struct node *sysfs_nodes;
-static struct cpu *sysfs_cpus;
 
 /*
  * The following structures are usually initialized by ACPI or
@@ -49,37 +47,3 @@
 
 	return (i < num_node_memblks) ? node_memblk[i].nid : (num_node_memblks ? -1 : 0);
 }
-
-static int __init topology_init(void)
-{
-	int i, err = 0;
-
-	sysfs_nodes = kmalloc(sizeof(struct node) * numnodes, GFP_KERNEL);
-	if (!sysfs_nodes) {
-		err = -ENOMEM;
-		goto out;
-	}
-	memset(sysfs_nodes, 0, sizeof(struct node) * numnodes);
-
-	sysfs_cpus = kmalloc(sizeof(struct cpu) * NR_CPUS, GFP_KERNEL);
-	if (!sysfs_cpus) {
-		kfree(sysfs_nodes);
-		err = -ENOMEM;
-		goto out;
-	}
-	memset(sysfs_cpus, 0, sizeof(struct cpu) * NR_CPUS);
-
-	for (i = 0; i < numnodes; i++)
-		if ((err = register_node(&sysfs_nodes[i], i, NULL)))
-			goto out;
-
-	for (i = 0; i < NR_CPUS; i++)
-		if (cpu_online(i))
-			if((err = register_cpu(&sysfs_cpus[i], i,
-					       &sysfs_nodes[cpu_to_node(i)])))
-				goto out;
- out:
-	return err;
-}
-
-__initcall(topology_init);
diff -Nru a/arch/ia64/oprofile/Makefile b/arch/ia64/oprofile/Makefile
--- a/arch/ia64/oprofile/Makefile	2005-01-10 20:11:17 -08:00
+++ b/arch/ia64/oprofile/Makefile	2005-01-10 20:11:17 -08:00
@@ -6,5 +6,5 @@
 		oprofilefs.o oprofile_stats.o \
 		timer_int.o )
 
-oprofile-y := $(DRIVER_OBJS) init.o
+oprofile-y := $(DRIVER_OBJS) init.o backtrace.o
 oprofile-$(CONFIG_PERFMON) += perfmon.o
diff -Nru a/arch/ia64/oprofile/backtrace.c b/arch/ia64/oprofile/backtrace.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/ia64/oprofile/backtrace.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,150 @@
+/**
+ * @file backtrace.c
+ *
+ * @remark Copyright 2004 Silicon Graphics Inc.  All Rights Reserved.
+ * @remark Read the file COPYING
+ *
+ * @author Greg Banks <gnb@melbourne.sgi.com>
+ * @author Keith Owens <kaos@melbourne.sgi.com>
+ * Based on work done for the ia64 port of the SGI kernprof patch, which is
+ *    Copyright (c) 2003-2004 Silicon Graphics Inc.  All Rights Reserved.
+ */
+
+#include <linux/oprofile.h>
+#include <linux/sched.h>
+#include <linux/mm.h>
+#include <asm/ptrace.h>
+#include <asm/system.h>
+
+/*
+ * For IA64 we need to perform a complex little dance to get both
+ * the struct pt_regs and a synthetic struct switch_stack in place
+ * to allow the unwind code to work.  This dance requires our unwind
+ * using code to be called from a function called from unw_init_running().
+ * There we only get a single void* data pointer, so use this struct
+ * to hold all the data we need during the unwind.
+ */
+typedef struct
+{
+	unsigned int depth;
+	struct pt_regs *regs;
+	struct unw_frame_info frame;
+	u64 *prev_pfs_loc;	/* state for WAR for old spinlock ool code */
+} ia64_backtrace_t;
+
+#if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 3)
+/*
+ * Returns non-zero if the PC is in the spinlock contention out-of-line code
+ * with non-standard calling sequence (on older compilers).
+ */
+static __inline__ int in_old_ool_spinlock_code(unsigned long pc)
+{
+	extern const char ia64_spinlock_contention_pre3_4[] __attribute__ ((weak));
+	extern const char ia64_spinlock_contention_pre3_4_end[] __attribute__ ((weak));
+	unsigned long sc_start = (unsigned long)ia64_spinlock_contention_pre3_4;
+	unsigned long sc_end = (unsigned long)ia64_spinlock_contention_pre3_4_end;
+	return (sc_start && sc_end && pc >= sc_start && pc < sc_end);
+}
+#else
+/* Newer spinlock code does a proper br.call and works fine with the unwinder */
+#define in_old_ool_spinlock_code(pc)	0
+#endif
+
+/* Returns non-zero if the PC is in the Interrupt Vector Table */
+static __inline__ int in_ivt_code(unsigned long pc)
+{
+	extern char ia64_ivt[];
+	return (pc >= (u_long)ia64_ivt && pc < (u_long)ia64_ivt+32768);
+}
+
+/*
+ * Unwind to next stack frame.
+ */
+static __inline__ int next_frame(ia64_backtrace_t *bt)
+{
+	/*
+	 * Avoid unsightly console message from unw_unwind() when attempting
+	 * to unwind through the Interrupt Vector Table which has no unwind
+	 * information.
+	 */
+	if (in_ivt_code(bt->frame.ip))
+		return 0;
+
+	/*
+	 * WAR for spinlock contention from leaf functions.  ia64_spinlock_contention_pre3_4
+	 * has ar.pfs == r0.  Leaf functions do not modify ar.pfs so ar.pfs remains
+	 * as 0, stopping the backtrace.  Record the previous ar.pfs when the current
+	 * IP is in ia64_spinlock_contention_pre3_4 then unwind, if pfs_loc has not changed
+	 * after unwind then use pt_regs.ar_pfs which is where the real ar.pfs is for
+	 * leaf functions.
+	 */
+	if (bt->prev_pfs_loc && bt->regs && bt->frame.pfs_loc == bt->prev_pfs_loc)
+		bt->frame.pfs_loc = &bt->regs->ar_pfs;
+	bt->prev_pfs_loc = (in_old_ool_spinlock_code(bt->frame.ip) ? bt->frame.pfs_loc : NULL);
+
+	return unw_unwind(&bt->frame) == 0;
+}
+
+
+static void do_ia64_backtrace(struct unw_frame_info *info, void *vdata)
+{
+	ia64_backtrace_t *bt = vdata;
+	struct switch_stack *sw;
+	int count = 0;
+	u_long pc, sp;
+
+	sw = (struct switch_stack *)(info+1);
+	/* padding from unw_init_running */
+	sw = (struct switch_stack *)(((unsigned long)sw + 15) & ~15);
+
+	unw_init_frame_info(&bt->frame, current, sw);
+
+	/* skip over interrupt frame and oprofile calls */
+	do {
+		unw_get_sp(&bt->frame, &sp);
+		if (sp >= (u_long)bt->regs)
+			break;
+		if (!next_frame(bt))
+			return;
+	} while (count++ < 200);
+
+	/* finally, grab the actual sample */
+	while (bt->depth-- && next_frame(bt)) {
+		unw_get_ip(&bt->frame, &pc);
+		oprofile_add_trace(pc);
+		if (unw_is_intr_frame(&bt->frame)) {
+			/*
+			 * Interrupt received on kernel stack; this can
+			 * happen when timer interrupt fires while processing
+			 * a softirq from the tail end of a hardware interrupt
+			 * which interrupted a system call.  Don't laugh, it
+			 * happens!  Splice the backtrace into two parts to
+			 * avoid spurious cycles in the gprof output.
+			 */
+			/* TODO: split rather than drop the 2nd half */
+			break;
+		}
+	}
+}
+
+void
+ia64_backtrace(struct pt_regs * const regs, unsigned int depth)
+{
+	ia64_backtrace_t bt;
+	unsigned long flags;
+
+	/*
+	 * On IA64 there is little hope of getting backtraces from
+	 * user space programs -- the problems of getting the unwind
+	 * information from arbitrary user programs are extreme.
+	 */
+	if (user_mode(regs))
+		return;
+
+	bt.depth = depth;
+	bt.regs = regs;
+	bt.prev_pfs_loc = NULL;
+	local_irq_save(flags);
+	unw_init_running(do_ia64_backtrace, &bt);
+	local_irq_restore(flags);
+}
diff -Nru a/arch/ia64/oprofile/init.c b/arch/ia64/oprofile/init.c
--- a/arch/ia64/oprofile/init.c	2005-01-10 20:11:16 -08:00
+++ b/arch/ia64/oprofile/init.c	2005-01-10 20:11:16 -08:00
@@ -12,15 +12,17 @@
 #include <linux/init.h>
 #include <linux/errno.h>
  
-extern int perfmon_init(struct oprofile_operations ** ops);
+extern int perfmon_init(struct oprofile_operations * ops);
 extern void perfmon_exit(void);
+extern void ia64_backtrace(struct pt_regs * const regs, unsigned int depth);
 
-int __init oprofile_arch_init(struct oprofile_operations ** ops)
+void __init oprofile_arch_init(struct oprofile_operations * ops)
 {
 #ifdef CONFIG_PERFMON
-	return perfmon_init(ops);
+	/* perfmon_init() can fail, but we have no way to report it */
+	perfmon_init(ops);
 #endif
-	return -ENODEV;
+	ops->backtrace = ia64_backtrace;
 }
 
 
diff -Nru a/arch/ia64/oprofile/perfmon.c b/arch/ia64/oprofile/perfmon.c
--- a/arch/ia64/oprofile/perfmon.c	2005-01-10 20:11:18 -08:00
+++ b/arch/ia64/oprofile/perfmon.c	2005-01-10 20:11:18 -08:00
@@ -21,8 +21,6 @@
 perfmon_handler(struct task_struct *task, void *buf, pfm_ovfl_arg_t *arg,
                 struct pt_regs *regs, unsigned long stamp)
 {
-	int cpu = smp_processor_id();
-	unsigned long eip = instruction_pointer(regs);
 	int event = arg->pmd_eventid;
  
 	arg->ovfl_ctrl.bits.reset_ovfl_pmds = 1;
@@ -31,7 +29,7 @@
 	 * without perfmon being shutdown (e.g. SIGSEGV)
 	 */
 	if (allow_ints)
-		oprofile_add_sample(eip, !user_mode(regs), event, cpu);
+		oprofile_add_sample(regs, event);
 	return 0;
 }
 
@@ -75,21 +73,18 @@
 
 
 /* all the ops are handled via userspace for IA64 perfmon */
-static struct oprofile_operations perfmon_ops = {
-	.start = perfmon_start,
-	.stop = perfmon_stop,
-};
 
 static int using_perfmon;
 
-int perfmon_init(struct oprofile_operations ** ops)
+int perfmon_init(struct oprofile_operations * ops)
 {
 	int ret = pfm_register_buffer_fmt(&oprofile_fmt);
 	if (ret)
 		return -ENODEV;
 
-	perfmon_ops.cpu_type = get_cpu_type();
-	*ops = &perfmon_ops;
+	ops->cpu_type = get_cpu_type();
+	ops->start = perfmon_start;
+	ops->stop = perfmon_stop;
 	using_perfmon = 1;
 	printk(KERN_INFO "oprofile: using perfmon.\n");
 	return 0;
diff -Nru a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c
--- a/arch/ia64/pci/pci.c	2005-01-10 20:11:18 -08:00
+++ b/arch/ia64/pci/pci.c	2005-01-10 20:11:18 -08:00
@@ -480,6 +480,14 @@
 	return acpi_pci_irq_enable(dev);
 }
 
+#ifdef CONFIG_ACPI_DEALLOCATE_IRQ
+void
+pcibios_disable_device (struct pci_dev *dev)
+{
+	acpi_pci_irq_disable(dev);
+}
+#endif /* CONFIG_ACPI_DEALLOCATE_IRQ */
+
 void
 pcibios_align_resource (void *data, struct resource *res,
 		        unsigned long size, unsigned long align)
diff -Nru a/arch/ia64/sn/kernel/io_init.c b/arch/ia64/sn/kernel/io_init.c
--- a/arch/ia64/sn/kernel/io_init.c	2005-01-10 20:11:21 -08:00
+++ b/arch/ia64/sn/kernel/io_init.c	2005-01-10 20:11:21 -08:00
@@ -382,7 +382,7 @@
 
 	struct hubdev_info *hubdev_info;
 
-	if (node >= numnodes)	/* Headless/memless IO nodes */
+	if (node >= num_online_nodes())	/* Headless/memless IO nodes */
 		hubdev_info =
 		    (struct hubdev_info *)alloc_bootmem_node(NODE_DATA(0),
 							     sizeof(struct
diff -Nru a/arch/ia64/sn/kernel/setup.c b/arch/ia64/sn/kernel/setup.c
--- a/arch/ia64/sn/kernel/setup.c	2005-01-10 20:11:17 -08:00
+++ b/arch/ia64/sn/kernel/setup.c	2005-01-10 20:11:17 -08:00
@@ -224,9 +224,10 @@
 {
 	int cnode;
 
-	for (cnode = 0; cnode < numnodes; cnode++)
+	for_each_online_node(cnode) {
 		if (is_shub_1_1(cnodeid_to_nasid(cnode)))
 			shub_1_1_found = 1;
+	}
 }
 
 /**
@@ -346,17 +347,17 @@
 
 	memset(pda->cnodeid_to_nasid_table, -1,
 	       sizeof(pda->cnodeid_to_nasid_table));
-	for (cnode = 0; cnode < numnodes; cnode++)
+	for_each_online_node(cnode)
 		pda->cnodeid_to_nasid_table[cnode] =
 		    pxm_to_nasid(nid_to_pxm_map[cnode]);
 
-	numionodes = numnodes;
+	numionodes = num_online_nodes();
 	scan_for_ionodes();
 
 	/*
 	 * Allocate & initalize the nodepda for each node.
 	 */
-	for (cnode = 0; cnode < numnodes; cnode++) {
+	for_each_online_node(cnode) {
 		nodepdaindr[cnode] =
 		    alloc_bootmem_node(NODE_DATA(cnode), sizeof(nodepda_t));
 		memset(nodepdaindr[cnode], 0, sizeof(nodepda_t));
@@ -367,7 +368,7 @@
 	/*
 	 * Allocate & initialize nodepda for TIOs.  For now, put them on node 0.
 	 */
-	for (cnode = numnodes; cnode < numionodes; cnode++) {
+	for (cnode = num_online_nodes(); cnode < numionodes; cnode++) {
 		nodepdaindr[cnode] =
 		    alloc_bootmem_node(NODE_DATA(0), sizeof(nodepda_t));
 		memset(nodepdaindr[cnode], 0, sizeof(nodepda_t));
@@ -385,7 +386,7 @@
 	 * The following routine actually sets up the hubinfo struct
 	 * in nodepda.
 	 */
-	for (cnode = 0; cnode < numnodes; cnode++) {
+	for_each_online_node(cnode) {
 		bte_init_node(nodepdaindr[cnode], cnode);
 	}
 
@@ -431,7 +432,7 @@
 	if (ia64_sn_get_sapic_info(cpuphyid, &nasid, &subnode, &slice))
 		BUG();
 
-	for (i=0; i < NR_NODES; i++) {
+	for (i=0; i < MAX_NUMNODES; i++) {
 		if (nodepdaindr[i]) {
 			nodepdaindr[i]->phys_cpuid[cpuid].nasid = nasid;
 			nodepdaindr[i]->phys_cpuid[cpuid].slice = slice;
@@ -484,7 +485,7 @@
 		int buddy_nasid;
 		buddy_nasid =
 		    cnodeid_to_nasid(numa_node_id() ==
-				     numnodes - 1 ? 0 : numa_node_id() + 1);
+				     num_online_nodes() - 1 ? 0 : numa_node_id() + 1);
 		pda->pio_shub_war_cam_addr =
 		    (volatile unsigned long *)GLOBAL_MMR_ADDR(nasid,
 							      SH_PI_CAM_CONTROL);
diff -Nru a/arch/ia64/sn/kernel/sn2/prominfo_proc.c b/arch/ia64/sn/kernel/sn2/prominfo_proc.c
--- a/arch/ia64/sn/kernel/sn2/prominfo_proc.c	2005-01-10 20:11:17 -08:00
+++ b/arch/ia64/sn/kernel/sn2/prominfo_proc.c	2005-01-10 20:11:17 -08:00
@@ -233,14 +233,13 @@
 	if (!ia64_platform_is("sn2"))
 		return 0;
 
-	proc_entries = kmalloc(numnodes * sizeof(struct proc_dir_entry *),
+	proc_entries = kmalloc(num_online_nodes() * sizeof(struct proc_dir_entry *),
 			       GFP_KERNEL);
 
 	sgi_prominfo_entry = proc_mkdir("sgi_prominfo", NULL);
 
-	for (cnodeid = 0, entp = proc_entries;
-	     cnodeid < numnodes;
-	     cnodeid++, entp++) {
+	entp = proc_entries;
+	for_each_online_node(cnodeid) {
 		sprintf(name, "node%d", cnodeid);
 		*entp = proc_mkdir(name, sgi_prominfo_entry);
 		nasid = cnodeid_to_nasid(cnodeid);
@@ -254,6 +253,7 @@
 			(void *)nasid);
 		if (p)
 			p->owner = THIS_MODULE;
+		entp++;
 	}
 
 	return 0;
@@ -265,12 +265,13 @@
 	unsigned cnodeid;
 	char name[NODE_NAME_LEN];
 
-	for (cnodeid = 0, entp = proc_entries;
-	     cnodeid < numnodes; cnodeid++, entp++) {
+	entp = proc_entries;
+	for_each_online_node(cnodeid) {
 		remove_proc_entry("fit", *entp);
 		remove_proc_entry("version", *entp);
 		sprintf(name, "node%d", cnodeid);
 		remove_proc_entry(name, sgi_prominfo_entry);
+		entp++;
 	}
 	remove_proc_entry("sgi_prominfo", NULL);
 	kfree(proc_entries);
diff -Nru a/arch/ia64/sn/kernel/sn2/sn2_smp.c b/arch/ia64/sn/kernel/sn2/sn2_smp.c
--- a/arch/ia64/sn/kernel/sn2/sn2_smp.c	2005-01-10 20:11:22 -08:00
+++ b/arch/ia64/sn/kernel/sn2/sn2_smp.c	2005-01-10 20:11:22 -08:00
@@ -92,16 +92,15 @@
 	volatile unsigned long *ptc0, *ptc1;
 	unsigned long flags = 0, data0, data1;
 	struct mm_struct *mm = current->active_mm;
-	short nasids[NR_NODES], nix;
-	DECLARE_BITMAP(nodes_flushed, NR_NODES);
-
-	bitmap_zero(nodes_flushed, NR_NODES);
+	short nasids[MAX_NUMNODES], nix;
+	nodemask_t nodes_flushed;
 
+	nodes_clear(nodes_flushed);
 	i = 0;
 
 	for_each_cpu_mask(cpu, mm->cpu_vm_mask) {
 		cnode = cpu_to_node(cpu);
-		__set_bit(cnode, nodes_flushed);
+		node_set(cnode, nodes_flushed);
 		lcpu = cpu;
 		i++;
 	}
@@ -125,8 +124,7 @@
 	}
 
 	nix = 0;
-	for (cnode = find_first_bit(&nodes_flushed, NR_NODES); cnode < NR_NODES;
-	     cnode = find_next_bit(&nodes_flushed, NR_NODES, ++cnode))
+	for_each_node_mask(cnode, nodes_flushed)
 		nasids[nix++] = cnodeid_to_nasid(cnode);
 
 	data0 = (1UL << SH_PTC_0_A_SHFT) |
@@ -194,7 +192,7 @@
 
 	mycnode = numa_node_id();
 
-	for (cnode = 0; cnode < numnodes; cnode++) {
+	for_each_online_node(cnode) {
 		if (is_headless_node(cnode) || cnode == mycnode)
 			continue;
 		nasid = cnodeid_to_nasid(cnode);
diff -Nru a/arch/m32r/Kconfig b/arch/m32r/Kconfig
--- a/arch/m32r/Kconfig	2005-01-10 20:11:15 -08:00
+++ b/arch/m32r/Kconfig	2005-01-10 20:11:15 -08:00
@@ -20,9 +20,13 @@
 	bool
 	default y
 
-#config GENERIC_HARDIRQS
-#	bool
-#	default y
+config GENERIC_HARDIRQS
+	bool
+	default y
+
+config GENERIC_IRQ_PROBE
+	bool
+	default y
 
 source "init/Kconfig"
 
diff -Nru a/arch/m32r/kernel/irq.c b/arch/m32r/kernel/irq.c
--- a/arch/m32r/kernel/irq.c	2005-01-10 20:11:19 -08:00
+++ b/arch/m32r/kernel/irq.c	2005-01-10 20:11:19 -08:00
@@ -1,9 +1,8 @@
 /*
  * linux/arch/m32r/kernel/irq.c
  *
- *  Copyright (c) 2003, 2004 Hitoshi Yamamoto
- *
- *  Taken from i386 2.6.4 version.
+ *  Copyright (c) 2003, 2004  Hitoshi Yamamoto
+ *  Copyright (c) 2004  Hirokazu Takata <takata at linux-m32r.org>
  */
 
 /*
@@ -11,112 +10,17 @@
  *
  *	Copyright (C) 1992, 1998 Linus Torvalds, Ingo Molnar
  *
- * This file contains the code used by various IRQ handling routines:
- * asking for different IRQ's should be done through these routines
- * instead of just grabbing them. Thus setups with different IRQ numbers
- * shouldn't result in any weird surprises, and installing new handlers
- * should be easier.
- */
-
-/*
- * (mostly architecture independent, will move to kernel/irq.c in 2.5.)
- *
- * IRQs are in fact implemented a bit like signal handlers for the kernel.
- * Naturally it's not a 1:1 relation, but there are similarities.
+ * This file contains the lowest level m32r-specific interrupt
+ * entry and irq statistics code. All the remaining irq logic is
+ * done by the generic kernel/irq/ code and in the
+ * m32r-specific irq controller code.
  */
 
-#include <linux/config.h>
-#include <linux/errno.h>
-#include <linux/module.h>
-#include <linux/signal.h>
-#include <linux/sched.h>
-#include <linux/ioport.h>
-#include <linux/interrupt.h>
-#include <linux/timex.h>
-#include <linux/slab.h>
-#include <linux/random.h>
-#include <linux/smp_lock.h>
-#include <linux/init.h>
 #include <linux/kernel_stat.h>
-#include <linux/irq.h>
-#include <linux/proc_fs.h>
+#include <linux/interrupt.h>
 #include <linux/seq_file.h>
-#include <linux/kallsyms.h>
-#include <linux/bitops.h>
-
-#include <asm/atomic.h>
-#include <asm/io.h>
-#include <asm/smp.h>
-#include <asm/system.h>
+#include <linux/module.h>
 #include <asm/uaccess.h>
-#include <asm/delay.h>
-#include <asm/irq.h>
-
-/*
- * Linux has a controller-independent x86 interrupt architecture.
- * every controller has a 'controller-template', that is used
- * by the main code to do the right thing. Each driver-visible
- * interrupt source is transparently wired to the apropriate
- * controller. Thus drivers need not be aware of the
- * interrupt-controller.
- *
- * Various interrupt controllers we handle: 8259 PIC, SMP IO-APIC,
- * PIIX4's internal 8259 PIC and SGI's Visual Workstation Cobalt (IO-)APIC.
- * (IO-APICs assumed to be messaging to Pentium local-APICs)
- *
- * the code is designed to be easily extended with new/different
- * interrupt controllers, without having to do assembly magic.
- */
-
-/*
- * Controller mappings for all interrupt sources:
- */
-irq_desc_t irq_desc[NR_IRQS] __cacheline_aligned = {
-	[0 ... NR_IRQS-1] = {
-		.handler = &no_irq_type,
-		.lock = SPIN_LOCK_UNLOCKED
-	}
-};
-
-static void register_irq_proc (unsigned int irq);
-
-/*
- * Special irq handlers.
- */
-
-irqreturn_t no_action(int cpl, void *dev_id, struct pt_regs *regs)
-{ return IRQ_NONE; }
-
-/*
- * Generic no controller code
- */
-
-static void enable_none(unsigned int irq) { }
-static unsigned int startup_none(unsigned int irq) { return 0; }
-static void disable_none(unsigned int irq) { }
-static void ack_none(unsigned int irq)
-{
-/*
- * 'what should we do if we get a hw irq event on an illegal vector'.
- * each architecture has to answer this themselves, it doesn't deserve
- * a generic callback i think.
- */
-	printk("unexpected IRQ trap at vector %02x\n", irq);
-}
-
-/* startup is the same as "enable", shutdown is same as "disable" */
-#define shutdown_none	disable_none
-#define end_none	enable_none
-
-struct hw_interrupt_type no_irq_type = {
-	"none",
-	startup_none,
-	shutdown_none,
-	enable_none,
-	disable_none,
-	ack_none,
-	end_none
-};
 
 atomic_t irq_err_count;
 atomic_t irq_mis_count;
@@ -168,215 +72,6 @@
 	return 0;
 }
 
-#ifdef CONFIG_SMP
-inline void synchronize_irq(unsigned int irq)
-{
-	while (irq_desc[irq].status & IRQ_INPROGRESS)
-		cpu_relax();
-}
-#endif
-
-/*
- * This should really return information about whether
- * we should do bottom half handling etc. Right now we
- * end up _always_ checking the bottom half, which is a
- * waste of time and is not what some drivers would
- * prefer.
- */
-int handle_IRQ_event(unsigned int irq,
-		struct pt_regs *regs, struct irqaction *action)
-{
-	int status = 1;	/* Force the "do bottom halves" bit */
-	int ret, retval = 0;
-
-	if (!(action->flags & SA_INTERRUPT))
-		local_irq_enable();
-
-	do {
-		ret = action->handler(irq, action->dev_id, regs);
-		if (ret == IRQ_HANDLED)
-			status |= action->flags;
-		action = action->next;
-		retval |= ret;
-	} while (action);
-	if (status & SA_SAMPLE_RANDOM)
-		add_interrupt_randomness(irq);
-	local_irq_disable();
-	return retval;
-}
-
-static void __report_bad_irq(int irq, irq_desc_t *desc, irqreturn_t action_ret)
-{
-	struct irqaction *action;
-
-	if (action_ret != IRQ_HANDLED && action_ret != IRQ_NONE) {
-		printk(KERN_ERR "irq event %d: bogus return value %x\n",
-				irq, action_ret);
-	} else {
-		printk(KERN_ERR "irq %d: nobody cared!\n", irq);
-	}
-	dump_stack();
-	printk(KERN_ERR "handlers:\n");
-	action = desc->action;
-	do {
-		printk(KERN_ERR "[<%p>]", action->handler);
-		print_symbol(" (%s)",
-			(unsigned long)action->handler);
-		printk("\n");
-		action = action->next;
-	} while (action);
-}
-
-static void report_bad_irq(int irq, irq_desc_t *desc, irqreturn_t action_ret)
-{
-	static int count = 100;
-
-	if (count) {
-		count--;
-		__report_bad_irq(irq, desc, action_ret);
-	}
-}
-
-static int noirqdebug;
-
-static int __init noirqdebug_setup(char *str)
-{
-	noirqdebug = 1;
-	printk("IRQ lockup detection disabled\n");
-	return 1;
-}
-
-__setup("noirqdebug", noirqdebug_setup);
-
-/*
- * If 99,900 of the previous 100,000 interrupts have not been handled then
- * assume that the IRQ is stuck in some manner.  Drop a diagnostic and try to
- * turn the IRQ off.
- *
- * (The other 100-of-100,000 interrupts may have been a correctly-functioning
- *  device sharing an IRQ with the failing one)
- *
- * Called under desc->lock
- */
-static void note_interrupt(int irq, irq_desc_t *desc, irqreturn_t action_ret)
-{
-	if (action_ret != IRQ_HANDLED) {
-		desc->irqs_unhandled++;
-		if (action_ret != IRQ_NONE)
-			report_bad_irq(irq, desc, action_ret);
-	}
-
-	desc->irq_count++;
-	if (desc->irq_count < 100000)
-		return;
-
-	desc->irq_count = 0;
-	if (desc->irqs_unhandled > 99900) {
-		/*
-		 * The interrupt is stuck
-		 */
-		__report_bad_irq(irq, desc, action_ret);
-		/*
-		 * Now kill the IRQ
-		 */
-		printk(KERN_EMERG "Disabling IRQ #%d\n", irq);
-		desc->status |= IRQ_DISABLED;
-		desc->handler->disable(irq);
-	}
-	desc->irqs_unhandled = 0;
-}
-
-/*
- * Generic enable/disable code: this just calls
- * down into the PIC-specific version for the actual
- * hardware disable after having gotten the irq
- * controller lock.
- */
-
-/**
- *	disable_irq_nosync - disable an irq without waiting
- *	@irq: Interrupt to disable
- *
- *	Disable the selected interrupt line.  Disables and Enables are
- *	nested.
- *	Unlike disable_irq(), this function does not ensure existing
- *	instances of the IRQ handler have completed before returning.
- *
- *	This function may be called from IRQ context.
- */
-
-inline void disable_irq_nosync(unsigned int irq)
-{
-	irq_desc_t *desc = irq_desc + irq;
-	unsigned long flags;
-
-	spin_lock_irqsave(&desc->lock, flags);
-	if (!desc->depth++) {
-		desc->status |= IRQ_DISABLED;
-		desc->handler->disable(irq);
-	}
-	spin_unlock_irqrestore(&desc->lock, flags);
-}
-
-/**
- *	disable_irq - disable an irq and wait for completion
- *	@irq: Interrupt to disable
- *
- *	Disable the selected interrupt line.  Enables and Disables are
- *	nested.
- *	This function waits for any pending IRQ handlers for this interrupt
- *	to complete before returning. If you use this function while
- *	holding a resource the IRQ handler may need you will deadlock.
- *
- *	This function may be called - with care - from IRQ context.
- */
-
-void disable_irq(unsigned int irq)
-{
-	irq_desc_t *desc = irq_desc + irq;
-	disable_irq_nosync(irq);
-	if (desc->action)
-		synchronize_irq(irq);
-}
-
-/**
- *	enable_irq - enable handling of an irq
- *	@irq: Interrupt to enable
- *
- *	Undoes the effect of one call to disable_irq().  If this
- *	matches the last disable, processing of interrupts on this
- *	IRQ line is re-enabled.
- *
- *	This function may be called from IRQ context.
- */
-
-void enable_irq(unsigned int irq)
-{
-	irq_desc_t *desc = irq_desc + irq;
-	unsigned long flags;
-
-	spin_lock_irqsave(&desc->lock, flags);
-	switch (desc->depth) {
-	case 1: {
-		unsigned int status = desc->status & ~IRQ_DISABLED;
-		desc->status = status;
-		if ((status & (IRQ_PENDING | IRQ_REPLAY)) == IRQ_PENDING) {
-			desc->status = status | IRQ_REPLAY;
-			hw_resend_irq(desc->handler,irq);
-		}
-		desc->handler->enable(irq);
-		/* fall-through */
-	}
-	default:
-		desc->depth--;
-		break;
-	case 0:
-		printk("enable_irq(%u) unbalanced from %p\n", irq,
-		       __builtin_return_address(0));
-	}
-	spin_unlock_irqrestore(&desc->lock, flags);
-}
-
 /*
  * do_IRQ handles all normal device IRQ's (the special
  * SMP cross-CPU interrupts have their own specific
@@ -384,637 +79,13 @@
  */
 asmlinkage unsigned int do_IRQ(int irq, struct pt_regs *regs)
 {
-	/*
-	 * We ack quickly, we don't want the irq controller
-	 * thinking we're snobs just because some other CPU has
-	 * disabled global interrupts (we have already done the
-	 * INT_ACK cycles, it's too late to try to pretend to the
-	 * controller that we aren't taking the interrupt).
-	 *
-	 * 0 return value means that this irq is already being
-	 * handled by some other CPU. (or is disabled)
-	 */
-	irq_desc_t *desc = irq_desc + irq;
-	struct irqaction * action;
-	unsigned int status;
-
 	irq_enter();
 
 #ifdef CONFIG_DEBUG_STACKOVERFLOW
 	/* FIXME M32R */
 #endif
-	kstat_this_cpu.irqs[irq]++;
-	spin_lock(&desc->lock);
-	desc->handler->ack(irq);
-	/*
-	   REPLAY is when Linux resends an IRQ that was dropped earlier
-	   WAITING is used by probe to mark irqs that are being tested
-	   */
-	status = desc->status & ~(IRQ_REPLAY | IRQ_WAITING);
-	status |= IRQ_PENDING; /* we _want_ to handle it */
-
-	/*
-	 * If the IRQ is disabled for whatever reason, we cannot
-	 * use the action we have.
-	 */
-	action = NULL;
-	if (likely(!(status & (IRQ_DISABLED | IRQ_INPROGRESS)))) {
-		action = desc->action;
-		status &= ~IRQ_PENDING; /* we commit to handling */
-		status |= IRQ_INPROGRESS; /* we are handling it */
-	}
-	desc->status = status;
-
-	/*
-	 * If there is no IRQ handler or it was disabled, exit early.
-	   Since we set PENDING, if another processor is handling
-	   a different instance of this same irq, the other processor
-	   will take care of it.
-	 */
-	if (unlikely(!action))
-		goto out;
-
-	/*
-	 * Edge triggered interrupts need to remember
-	 * pending events.
-	 * This applies to any hw interrupts that allow a second
-	 * instance of the same irq to arrive while we are in do_IRQ
-	 * or in the handler. But the code here only handles the _second_
-	 * instance of the irq, not the third or fourth. So it is mostly
-	 * useful for irq hardware that does not mask cleanly in an
-	 * SMP environment.
-	 */
-	for (;;) {
-		irqreturn_t action_ret;
-
-		spin_unlock(&desc->lock);
-		action_ret = handle_IRQ_event(irq, regs, action);
-		spin_lock(&desc->lock);
-		if (!noirqdebug)
-			note_interrupt(irq, desc, action_ret);
-		if (likely(!(desc->status & IRQ_PENDING)))
-			break;
-		desc->status &= ~IRQ_PENDING;
-	}
-	desc->status &= ~IRQ_INPROGRESS;
-
-out:
-	/*
-	 * The ->end() handler has to deal with interrupts which got
-	 * disabled while the handler was running.
-	 */
-	desc->handler->end(irq);
-	spin_unlock(&desc->lock);
-
+	__do_IRQ(irq, regs);
 	irq_exit();
 
-#if defined(CONFIG_SMP)
-	if (irq == M32R_IRQ_MFT2)
-		smp_send_timer();
-#endif	/* CONFIG_SMP */
-
 	return 1;
 }
-
-int can_request_irq(unsigned int irq, unsigned long irqflags)
-{
-	struct irqaction *action;
-
-	if (irq >= NR_IRQS)
-		return 0;
-	action = irq_desc[irq].action;
-	if (action) {
-		if (irqflags & action->flags & SA_SHIRQ)
-			action = NULL;
-	}
-	return !action;
-}
-
-/**
- *	request_irq - allocate an interrupt line
- *	@irq: Interrupt line to allocate
- *	@handler: Function to be called when the IRQ occurs
- *	@irqflags: Interrupt type flags
- *	@devname: An ascii name for the claiming device
- *	@dev_id: A cookie passed back to the handler function
- *
- *	This call allocates interrupt resources and enables the
- *	interrupt line and IRQ handling. From the point this
- *	call is made your handler function may be invoked. Since
- *	your handler function must clear any interrupt the board
- *	raises, you must take care both to initialise your hardware
- *	and to set up the interrupt handler in the right order.
- *
- *	Dev_id must be globally unique. Normally the address of the
- *	device data structure is used as the cookie. Since the handler
- *	receives this value it makes sense to use it.
- *
- *	If your interrupt is shared you must pass a non NULL dev_id
- *	as this is required when freeing the interrupt.
- *
- *	Flags:
- *
- *	SA_SHIRQ		Interrupt is shared
- *
- *	SA_INTERRUPT		Disable local interrupts while processing
- *
- *	SA_SAMPLE_RANDOM	The interrupt can be used for entropy
- *
- */
-
-int request_irq(unsigned int irq,
-		irqreturn_t (*handler)(int, void *, struct pt_regs *),
-		unsigned long irqflags,
-		const char * devname,
-		void *dev_id)
-{
-	int retval;
-	struct irqaction * action;
-
-#if 1
-	/*
-	 * Sanity-check: shared interrupts should REALLY pass in
-	 * a real dev-ID, otherwise we'll have trouble later trying
-	 * to figure out which interrupt is which (messes up the
-	 * interrupt freeing logic etc).
-	 */
-	if (irqflags & SA_SHIRQ) {
-		if (!dev_id)
-			printk("Bad boy: %s (at 0x%x) called us without a dev_id!\n", devname, (&irq)[-1]);
-	}
-#endif
-
-	if (irq >= NR_IRQS)
-		return -EINVAL;
-	if (!handler)
-		return -EINVAL;
-
-	action = (struct irqaction *)
-			kmalloc(sizeof(struct irqaction), GFP_ATOMIC);
-	if (!action)
-		return -ENOMEM;
-
-	action->handler = handler;
-	action->flags = irqflags;
-	cpus_clear(action->mask);
-	action->name = devname;
-	action->next = NULL;
-	action->dev_id = dev_id;
-
-	retval = setup_irq(irq, action);
-	if (retval)
-		kfree(action);
-	return retval;
-}
-
-EXPORT_SYMBOL(request_irq);
-
-/**
- *	free_irq - free an interrupt
- *	@irq: Interrupt line to free
- *	@dev_id: Device identity to free
- *
- *	Remove an interrupt handler. The handler is removed and if the
- *	interrupt line is no longer in use by any driver it is disabled.
- *	On a shared IRQ the caller must ensure the interrupt is disabled
- *	on the card it drives before calling this function. The function
- *	does not return until any executing interrupts for this IRQ
- *	have completed.
- *
- *	This function must not be called from interrupt context.
- */
-
-void free_irq(unsigned int irq, void *dev_id)
-{
-	irq_desc_t *desc;
-	struct irqaction **p;
-	unsigned long flags;
-
-	if (irq >= NR_IRQS)
-		return;
-
-	desc = irq_desc + irq;
-	spin_lock_irqsave(&desc->lock,flags);
-	p = &desc->action;
-	for (;;) {
-		struct irqaction * action = *p;
-		if (action) {
-			struct irqaction **pp = p;
-			p = &action->next;
-			if (action->dev_id != dev_id)
-				continue;
-
-			/* Found it - now remove it from the list of entries */
-			*pp = action->next;
-			if (!desc->action) {
-				desc->status |= IRQ_DISABLED;
-				desc->handler->shutdown(irq);
-			}
-			spin_unlock_irqrestore(&desc->lock,flags);
-
-			/* Wait to make sure it's not being used on another CPU */
-			synchronize_irq(irq);
-			kfree(action);
-			return;
-		}
-		printk("Trying to free free IRQ%d\n",irq);
-		spin_unlock_irqrestore(&desc->lock,flags);
-		return;
-	}
-}
-
-EXPORT_SYMBOL(free_irq);
-
-/*
- * 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.
- *
- */
-
-unsigned long probe_irq_on(void)
-{
-	unsigned int i;
-	irq_desc_t *desc;
-	unsigned long val;
-	unsigned long delay;
-
-	down(&probe_sem);
-	/*
-	 * something may have generated an irq long ago and we want to
-	 * flush such a longstanding irq before considering it as spurious.
-	 */
-	for (i = NR_IRQS-1; i > 0; i--)  {
-		desc = irq_desc + i;
-
-		spin_lock_irq(&desc->lock);
-		if (!irq_desc[i].action)
-			irq_desc[i].handler->startup(i);
-		spin_unlock_irq(&desc->lock);
-	}
-
-	/* Wait for longstanding interrupts to trigger. */
-	for (delay = jiffies + HZ/50; time_after(delay, jiffies); )
-		/* about 20ms delay */ barrier();
-
-	/*
-	 * enable any unassigned irqs
-	 * (we must startup again here because if a longstanding irq
-	 * happened in the previous stage, it may have masked itself)
-	 */
-	for (i = NR_IRQS-1; i > 0; i--) {
-		desc = irq_desc + i;
-
-		spin_lock_irq(&desc->lock);
-		if (!desc->action) {
-			desc->status |= IRQ_AUTODETECT | IRQ_WAITING;
-			if (desc->handler->startup(i))
-				desc->status |= IRQ_PENDING;
-		}
-		spin_unlock_irq(&desc->lock);
-	}
-
-	/*
-	 * Wait for spurious interrupts to trigger
-	 */
-	for (delay = jiffies + HZ/10; time_after(delay, jiffies); )
-		/* about 100ms delay */ barrier();
-
-	/*
-	 * Now filter out any obviously spurious interrupts
-	 */
-	val = 0;
-	for (i = 0; i < NR_IRQS; i++) {
-		irq_desc_t *desc = irq_desc + i;
-		unsigned int status;
-
-		spin_lock_irq(&desc->lock);
-		status = desc->status;
-
-		if (status & IRQ_AUTODETECT) {
-			/* It triggered already - consider it spurious. */
-			if (!(status & IRQ_WAITING)) {
-				desc->status = status & ~IRQ_AUTODETECT;
-				desc->handler->shutdown(i);
-			} else
-				if (i < 32)
-					val |= 1 << i;
-		}
-		spin_unlock_irq(&desc->lock);
-	}
-
-	return val;
-}
-
-EXPORT_SYMBOL(probe_irq_on);
-
-/*
- * Return a mask of triggered interrupts (this
- * can handle only legacy ISA interrupts).
- */
-
-/**
- *	probe_irq_mask - scan a bitmap of interrupt lines
- *	@val:	mask of interrupts to consider
- *
- *	Scan the ISA bus interrupt lines and return a bitmap of
- *	active interrupts. The interrupt probe logic state is then
- *	returned to its previous value.
- *
- *	Note: we need to scan all the irq's even though we will
- *	only return ISA irq numbers - just so that we reset them
- *	all to a known state.
- */
-unsigned int probe_irq_mask(unsigned long val)
-{
-	int i;
-	unsigned int mask;
-
-	mask = 0;
-	for (i = 0; i < NR_IRQS; i++) {
-		irq_desc_t *desc = irq_desc + i;
-		unsigned int status;
-
-		spin_lock_irq(&desc->lock);
-		status = desc->status;
-
-		if (status & IRQ_AUTODETECT) {
-			if (i < 16 && !(status & IRQ_WAITING))
-				mask |= 1 << i;
-
-			desc->status = status & ~IRQ_AUTODETECT;
-			desc->handler->shutdown(i);
-		}
-		spin_unlock_irq(&desc->lock);
-	}
-	up(&probe_sem);
-
-	return mask & val;
-}
-
-/*
- * Return the one interrupt that triggered (this can
- * handle any interrupt source).
- */
-
-/**
- *	probe_irq_off	- end an interrupt autodetect
- *	@val: mask of potential interrupts (unused)
- *
- *	Scans the unused interrupt lines and returns the line which
- *	appears to have triggered the interrupt. If no interrupt was
- *	found then zero is returned. If more than one interrupt is
- *	found then minus the first candidate is returned to indicate
- *	their is doubt.
- *
- *	The interrupt probe logic state is returned to its previous
- *	value.
- *
- *	BUGS: When used in a module (which arguably shouldnt happen)
- *	nothing prevents two IRQ probe callers from overlapping. The
- *	results of this are non-optimal.
- */
-
-int probe_irq_off(unsigned long val)
-{
-	int i, irq_found, nr_irqs;
-
-	nr_irqs = 0;
-	irq_found = 0;
-	for (i = 0; i < NR_IRQS; i++) {
-		irq_desc_t *desc = irq_desc + i;
-		unsigned int status;
-
-		spin_lock_irq(&desc->lock);
-		status = desc->status;
-
-		if (status & IRQ_AUTODETECT) {
-			if (!(status & IRQ_WAITING)) {
-				if (!nr_irqs)
-					irq_found = i;
-				nr_irqs++;
-			}
-			desc->status = status & ~IRQ_AUTODETECT;
-			desc->handler->shutdown(i);
-		}
-		spin_unlock_irq(&desc->lock);
-	}
-	up(&probe_sem);
-
-	if (nr_irqs > 1)
-		irq_found = -irq_found;
-	return irq_found;
-}
-
-EXPORT_SYMBOL(probe_irq_off);
-
-/* this was setup_x86_irq but it seems pretty generic */
-int setup_irq(unsigned int irq, struct irqaction * new)
-{
-	int shared = 0;
-	unsigned long flags;
-	struct irqaction *old, **p;
-	irq_desc_t *desc = irq_desc + irq;
-
-	if (desc->handler == &no_irq_type)
-		return -ENOSYS;
-	/*
-	 * Some drivers like serial.c use request_irq() heavily,
-	 * so we have to be careful not to interfere with a
-	 * running system.
-	 */
-	if (new->flags & SA_SAMPLE_RANDOM) {
-		/*
-		 * This function might sleep, we want to call it first,
-		 * outside of the atomic block.
-		 * Yes, this might clear the entropy pool if the wrong
-		 * driver is attempted to be loaded, without actually
-		 * installing a new handler, but is this really a problem,
-		 * only the sysadmin is able to do this.
-		 */
-		rand_initialize_irq(irq);
-	}
-
-	/*
-	 * The following block of code has to be executed atomically
-	 */
-	spin_lock_irqsave(&desc->lock,flags);
-	p = &desc->action;
-	if ((old = *p) != NULL) {
-		/* Can't share interrupts unless both agree to */
-		if (!(old->flags & new->flags & SA_SHIRQ)) {
-			spin_unlock_irqrestore(&desc->lock,flags);
-			return -EBUSY;
-		}
-
-		/* add new interrupt at end of irq queue */
-		do {
-			p = &old->next;
-			old = *p;
-		} while (old);
-		shared = 1;
-	}
-
-	*p = new;
-
-	if (!shared) {
-		desc->depth = 0;
-		desc->status &= ~(IRQ_DISABLED | IRQ_AUTODETECT | IRQ_WAITING | IRQ_INPROGRESS);
-		desc->handler->startup(irq);
-	}
-	spin_unlock_irqrestore(&desc->lock,flags);
-
-	register_irq_proc(irq);
-	return 0;
-}
-
-static struct proc_dir_entry * root_irq_dir;
-static struct proc_dir_entry * irq_dir [NR_IRQS];
-
-#ifdef CONFIG_SMP
-
-static struct proc_dir_entry *smp_affinity_entry[NR_IRQS];
-
-cpumask_t irq_affinity[NR_IRQS] = { [0 ... NR_IRQS-1] = CPU_MASK_ALL };
-
-static int irq_affinity_read_proc(char *page, char **start, off_t off,
-			int count, int *eof, void *data)
-{
-	int len = cpumask_scnprintf(page, count, irq_affinity[(long)data]);
-	if (count - len < 2)
-		return -EINVAL;
-	len += sprintf(page + len, "\n");
-	return len;
-}
-
-static int irq_affinity_write_proc(struct file *file, const char __user *buffer,
-					unsigned long count, void *data)
-{
-	int irq = (long)data, full_count = count, err;
-	cpumask_t new_value, tmp;
-
-	if (!irq_desc[irq].handler->set_affinity)
-		return -EIO;
-
-	err = cpumask_parse(buffer, count, new_value);
-	if (err)
-		return err;
-
-	/*
-	 * Do not allow disabling IRQs completely - it's a too easy
-	 * way to make the system unusable accidentally :-) At least
-	 * one online CPU still has to be targeted.
-	 */
-	cpus_and(tmp, new_value, cpu_online_map);
-	if (cpus_empty(tmp))
-		return -EINVAL;
-
-	irq_affinity[irq] = new_value;
-	irq_desc[irq].handler->set_affinity(irq,
-					cpumask_of_cpu(first_cpu(new_value)));
-
-	return full_count;
-}
-
-#endif
-
-static int prof_cpu_mask_read_proc (char *page, char **start, off_t off,
-			int count, int *eof, void *data)
-{
-	int len = cpumask_scnprintf(page, count, *(cpumask_t *)data);
-	if (count - len < 2)
-		return -EINVAL;
-	len += sprintf(page + len, "\n");
-	return len;
-}
-
-static int prof_cpu_mask_write_proc (struct file *file, const char __user *buffer,
-					unsigned long count, void *data)
-{
-	cpumask_t *mask = (cpumask_t *)data;
-	unsigned long full_count = count, err;
-	cpumask_t new_value;
-
-	err = cpumask_parse(buffer, count, new_value);
-	if (err)
-		return err;
-
-	*mask = new_value;
-	return full_count;
-}
-
-#define MAX_NAMELEN 10
-
-static void register_irq_proc (unsigned int irq)
-{
-	char name [MAX_NAMELEN];
-
-	if (!root_irq_dir || (irq_desc[irq].handler == &no_irq_type) ||
-			irq_dir[irq])
-		return;
-
-	memset(name, 0, MAX_NAMELEN);
-	sprintf(name, "%d", irq);
-
-	/* create /proc/irq/1234 */
-	irq_dir[irq] = proc_mkdir(name, root_irq_dir);
-
-#ifdef CONFIG_SMP
-	{
-		struct proc_dir_entry *entry;
-
-		/* create /proc/irq/1234/smp_affinity */
-		entry = create_proc_entry("smp_affinity", 0600, irq_dir[irq]);
-
-		if (entry) {
-			entry->nlink = 1;
-			entry->data = (void *)(long)irq;
-			entry->read_proc = irq_affinity_read_proc;
-			entry->write_proc = irq_affinity_write_proc;
-		}
-
-		smp_affinity_entry[irq] = entry;
-	}
-#endif
-}
-
-unsigned long prof_cpu_mask = -1;
-
-void init_irq_proc (void)
-{
-	struct proc_dir_entry *entry;
-	int i;
-
-	/* create /proc/irq */
-	root_irq_dir = proc_mkdir("irq", NULL);
-
-	/* create /proc/irq/prof_cpu_mask */
-	entry = create_proc_entry("prof_cpu_mask", 0600, root_irq_dir);
-
-	if (!entry)
-	    return;
-
-	entry->nlink = 1;
-	entry->data = (void *)&prof_cpu_mask;
-	entry->read_proc = prof_cpu_mask_read_proc;
-	entry->write_proc = prof_cpu_mask_write_proc;
-
-	/*
-	 * Create entries for all existing IRQs.
-	 */
-	for (i = 0; i < NR_IRQS; i++)
-		register_irq_proc(i);
-}
-
diff -Nru a/arch/m32r/kernel/ptrace.c b/arch/m32r/kernel/ptrace.c
--- a/arch/m32r/kernel/ptrace.c	2005-01-10 20:11:22 -08:00
+++ b/arch/m32r/kernel/ptrace.c	2005-01-10 20:11:22 -08:00
@@ -2,7 +2,7 @@
  * linux/arch/m32r/kernel/ptrace.c
  *
  * Copyright (C) 2002  Hirokazu Takata, Takeo Takahashi
- * Copyright (C) 2004  Hirokazu Takata <takata at linux-m32r.org>
+ * Copyright (C) 2004  Hirokazu Takata, Kei Sakamoto
  *
  * Original x86 implementation:
  *	By Ross Biro 1/23/92
@@ -450,13 +450,13 @@
 	struct debug_trap *p = &child->thread.debug_trap;
 	unsigned long addr = next_pc & ~3;
 
-	if (p->nr_trap != 0) {
+	if (p->nr_trap == MAX_TRAPS) {
 		printk("kernel BUG at %s %d: p->nr_trap = %d\n",
 					__FILE__, __LINE__, p->nr_trap);
 		return -1;
 	}
-	p->addr = addr;
-	p->insn = next_insn;
+	p->addr[p->nr_trap] = addr;
+	p->insn[p->nr_trap] = next_insn;
 	p->nr_trap++;
 	if (next_pc & 3) {
 		*code = (next_insn & 0xffff0000) | 0x10f1;
@@ -473,35 +473,34 @@
 	return 0;
 }
 
-int withdraw_debug_trap_for_signal(struct task_struct *child)
-{
-	struct debug_trap *p = &child->thread.debug_trap;
-	int nr_trap = p->nr_trap;
-
-	if (nr_trap) {
-		access_process_vm(child, p->addr, &p->insn, sizeof(p->insn), 1);
-		p->nr_trap = 0;
-		p->addr = 0;
-		p->insn = 0;
-	}
-	return nr_trap;
-}
-
 static int
 unregister_debug_trap(struct task_struct *child, unsigned long addr,
 		      unsigned long *code)
 {
 	struct debug_trap *p = &child->thread.debug_trap;
+        int i;
 
-	if (p->nr_trap != 1 || p->addr != addr) {
+	/* Search debug trap entry. */
+	for (i = 0; i < p->nr_trap; i++) {
+		if (p->addr[i] == addr)
+			break;
+	}
+	if (i >= p->nr_trap) {
 		/* The trap may be requested from debugger.
 		 * ptrace should do nothing in this case.
 		 */
 		return 0;
 	}
-	*code = p->insn;
-	p->insn = 0;
-	p->addr = 0;
+
+	/* Recover orignal instruction code. */
+	*code = p->insn[i];
+
+	/* Shift debug trap entries. */
+	while (i < p->nr_trap - 1) {
+		p->insn[i] = p->insn[i + 1];
+		p->addr[i] = p->addr[i + 1];
+		i++;
+	}
 	p->nr_trap--;
 	return 1;
 }
@@ -510,13 +509,11 @@
 unregister_all_debug_traps(struct task_struct *child)
 {
 	struct debug_trap *p = &child->thread.debug_trap;
+	int i;
 
-	if (p->nr_trap) {
-		access_process_vm(child, p->addr, &p->insn, sizeof(p->insn), 1);
-		p->addr = 0;
-		p->insn = 0;
-		p->nr_trap = 0;
-	}
+	for (i = 0; i < p->nr_trap; i++)
+		access_process_vm(child, p->addr[i], &p->insn[i], sizeof(p->insn[i]), 1);
+	p->nr_trap = 0;
 }
 
 static inline void
@@ -576,34 +573,6 @@
 }
 
 void
-embed_debug_trap_for_signal(struct task_struct *child)
-{
-	unsigned long next_pc;
-	unsigned long pc, insn;
-	int ret;
-
-	pc = get_stack_long(child, PT_BPC);
-	ret = access_process_vm(child, pc&~3, &insn, sizeof(insn), 0);
-	if (ret != sizeof(insn)) {
-		printk("kernel BUG at %s %d: access_process_vm returns %d\n",
-		       __FILE__, __LINE__, ret);
-		return;
-	}
-	compute_next_pc(insn, pc, &next_pc, child);
-	if (next_pc & 0x80000000) {
-		printk("kernel BUG at %s %d: next_pc = 0x%08x\n",
-		       __FILE__, __LINE__, (int)next_pc);
-		return;
-	}
-	if (embed_debug_trap(child, next_pc)) {
-		printk("kernel BUG at %s %d: embed_debug_trap error\n",
-		       __FILE__, __LINE__);
-		return;
-	}
-	invalidate_cache();
-}
-
-void
 withdraw_debug_trap(struct pt_regs *regs)
 {
 	unsigned long addr;
@@ -621,9 +590,12 @@
 init_debug_traps(struct task_struct *child)
 {
 	struct debug_trap *p = &child->thread.debug_trap;
+	int i;
 	p->nr_trap = 0;
-	p->addr = 0;
-	p->insn = 0;
+	for (i = 0; i < MAX_TRAPS; i++) {
+		p->addr[i] = 0;
+		p->insn[i] = 0;
+	}
 }
 
 
@@ -855,4 +827,3 @@
 		current->exit_code = 0;
 	}
 }
-
diff -Nru a/arch/m32r/kernel/setup.c b/arch/m32r/kernel/setup.c
--- a/arch/m32r/kernel/setup.c	2005-01-10 20:11:19 -08:00
+++ b/arch/m32r/kernel/setup.c	2005-01-10 20:11:19 -08:00
@@ -251,7 +251,9 @@
 #endif
 
 #ifdef CONFIG_DISCONTIGMEM
-	numnodes = 2;
+	nodes_clear(node_online_map);
+	node_set_online(0);
+	node_set_online(1);
 #endif	/* CONFIG_DISCONTIGMEM */
 
 	init_mm.start_code = (unsigned long) _text;
diff -Nru a/arch/m32r/kernel/smpboot.c b/arch/m32r/kernel/smpboot.c
--- a/arch/m32r/kernel/smpboot.c	2005-01-10 20:11:24 -08:00
+++ b/arch/m32r/kernel/smpboot.c	2005-01-10 20:11:24 -08:00
@@ -58,7 +58,6 @@
 #define Dprintk(x...)
 #endif
 
-extern int cpu_idle(void);
 extern cpumask_t cpu_initialized;
 
 /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
@@ -248,7 +247,7 @@
 	int ipi;
 
 	for (ipi = 0 ; ipi < NR_IPIS ; ipi++)
-		ipi_lock[ipi] = SPIN_LOCK_UNLOCKED;
+		spin_lock_init(&ipi_lock[ipi]);
 }
 
 /*==========================================================================*
@@ -443,7 +442,8 @@
 	 */
 	local_flush_tlb_all();
 
-	return cpu_idle();
+	cpu_idle();
+	return 0;
 }
 
 /*==========================================================================*
diff -Nru a/arch/m32r/mm/discontig.c b/arch/m32r/mm/discontig.c
--- a/arch/m32r/mm/discontig.c	2005-01-10 20:11:16 -08:00
+++ b/arch/m32r/mm/discontig.c	2005-01-10 20:11:16 -08:00
@@ -75,7 +75,7 @@
 
 	mem_prof_init();
 
-	for (nid = 0 ; nid < numnodes ; nid++) {
+	for_each_online_node(nid) {
 		mp = &mem_prof[nid];
 		NODE_DATA(nid)=(pg_data_t *)&m32r_node_data[nid];
 		NODE_DATA(nid)->bdata = &node_bdata[nid];
@@ -135,12 +135,12 @@
 	mem_prof_t *mp;
 
 	pgdat_list = NULL;
-	for (nid = numnodes - 1 ; nid >= 0 ; nid--) {
+	for (nid = num_online_nodes() - 1 ; nid >= 0 ; nid--) {
 		NODE_DATA(nid)->pgdat_next = pgdat_list;
 		pgdat_list = NODE_DATA(nid);
 	}
 
-	for (nid = 0 ; nid < numnodes ; nid++) {
+	for_each_online_node(nid) {
 		mp = &mem_prof[nid];
 		for (i = 0 ; i < MAX_NR_ZONES ; i++) {
 			zones_size[i] = 0;
diff -Nru a/arch/m32r/mm/fault.c b/arch/m32r/mm/fault.c
--- a/arch/m32r/mm/fault.c	2005-01-10 20:11:17 -08:00
+++ b/arch/m32r/mm/fault.c	2005-01-10 20:11:17 -08:00
@@ -2,13 +2,12 @@
  *  linux/arch/m32r/mm/fault.c
  *
  *  Copyright (c) 2001, 2002  Hitoshi Yamamoto, and H. Kondo
+ *  Copyright (c) 2004  Naoto Sugai, NIIBE Yutaka
  *
  *  Some code taken from i386 version.
  *    Copyright (C) 1995  Linus Torvalds
  */
 
-/* $Id$ */
-
 #include <linux/config.h>
 #include <linux/signal.h>
 #include <linux/sched.h>
@@ -96,6 +95,11 @@
  *  bit 2 == 0 means kernel, 1 means user-mode
  *  bit 3 == 0 means data, 1 means instruction
  *======================================================================*/
+#define ACE_PROTECTION		1
+#define ACE_WRITE		2
+#define ACE_USERMODE		4
+#define ACE_INSTRUCTION		8
+
 asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code,
   unsigned long address)
 {
@@ -126,10 +130,10 @@
 	 * nothing more.
 	 *
 	 * This verifies that the fault happens in kernel space
-	 * (error_code & 4) == 0, and that the fault was not a
-	 * protection error (error_code & 1) == 0.
+	 * (error_code & ACE_USERMODE) == 0, and that the fault was not a
+	 * protection error (error_code & ACE_PROTECTION) == 0.
 	 */
-	if (address >= TASK_SIZE && !(error_code & 4))
+	if (address >= TASK_SIZE && !(error_code & ACE_USERMODE))
 		goto vmalloc_fault;
 
 	mm = tsk->mm;
@@ -157,7 +161,7 @@
 	 * thus avoiding the deadlock.
 	 */
 	if (!down_read_trylock(&mm->mmap_sem)) {
-		if ((error_code & 4) == 0 &&
+		if ((error_code & ACE_USERMODE) == 0 &&
 		    !search_exception_tables(regs->psw))
 			goto bad_area_nosemaphore;
 		down_read(&mm->mmap_sem);
@@ -171,7 +175,7 @@
 	if (!(vma->vm_flags & VM_GROWSDOWN))
 		goto bad_area;
 #if 0
-	if (error_code & 4) {
+	if (error_code & ACE_USERMODE) {
 		/*
 		 * accessing the stack below "spu" is always a bug.
 		 * The "+ 4" is there due to the push instruction
@@ -191,27 +195,34 @@
 good_area:
 	info.si_code = SEGV_ACCERR;
 	write = 0;
-	switch (error_code & 3) {
+	switch (error_code & (ACE_WRITE|ACE_PROTECTION)) {
 		default:	/* 3: write, present */
 			/* fall through */
-		case 2:		/* write, not present */
+		case ACE_WRITE:	/* write, not present */
 			if (!(vma->vm_flags & VM_WRITE))
 				goto bad_area;
 			write++;
 			break;
-		case 1:		/* read, present */
+		case ACE_PROTECTION:	/* read, present */
 		case 0:		/* read, not present */
 			if (!(vma->vm_flags & (VM_READ | VM_EXEC)))
 				goto bad_area;
 	}
 
+	/*
+	 * For instruction access exception, check if the area is executable
+	 */
+	if ((error_code & ACE_INSTRUCTION) && !(vma->vm_flags & VM_EXEC))
+	  goto bad_area;
+
 survive:
 	/*
 	 * If for any reason at all we couldn't handle the fault,
 	 * make sure we exit gracefully rather than endlessly redo
 	 * the fault.
 	 */
-	addr = (address & PAGE_MASK) | (error_code & 8);
+	addr = (address & PAGE_MASK);
+	set_thread_fault_code(error_code);
 	switch (handle_mm_fault(mm, vma, addr, write)) {
 		case VM_FAULT_MINOR:
 			tsk->min_flt++;
@@ -226,7 +237,7 @@
 		default:
 			BUG();
 	}
-
+	set_thread_fault_code(0);
 	up_read(&mm->mmap_sem);
 	return;
 
@@ -239,7 +250,7 @@
 
 bad_area_nosemaphore:
 	/* User mode accesses just cause a SIGSEGV */
-	if (error_code & 4) {
+	if (error_code & ACE_USERMODE) {
 		tsk->thread.address = address;
 		tsk->thread.error_code = error_code | (address >= TASK_SIZE);
 		tsk->thread.trap_no = 14;
@@ -295,7 +306,7 @@
 		goto survive;
 	}
 	printk("VM: killing process %s\n", tsk->comm);
-	if (error_code & 4)
+	if (error_code & ACE_USERMODE)
 		do_exit(SIGKILL);
 	goto no_context;
 
@@ -303,7 +314,7 @@
 	up_read(&mm->mmap_sem);
 
 	/* Kernel mode? Handle exception or die */
-	if (!(error_code & 4))
+	if (!(error_code & ACE_USERMODE))
 		goto no_context;
 
 	tsk->thread.address = address;
@@ -352,7 +363,7 @@
 		if (!pte_present(*pte_k))
 			goto no_context;
 
-		addr = (address & PAGE_MASK) | (error_code & 8);
+		addr = (address & PAGE_MASK) | (error_code & ACE_INSTRUCTION);
 		update_mmu_cache(NULL, addr, *pte_k);
 		return;
 	}
@@ -370,7 +381,7 @@
 	unsigned long *entry1, *entry2;
 	unsigned long pte_data, flags;
 	unsigned int *entry_dat;
-	int inst = vaddr & 8;
+	int inst = get_thread_fault_code() & ACE_INSTRUCTION;
 	int i;
 
 	/* Ptrace may call this routine. */
diff -Nru a/arch/m32r/mm/init.c b/arch/m32r/mm/init.c
--- a/arch/m32r/mm/init.c	2005-01-10 20:11:21 -08:00
+++ b/arch/m32r/mm/init.c	2005-01-10 20:11:21 -08:00
@@ -153,7 +153,7 @@
 	int reservedpages, nid, i;
 
 	reservedpages = 0;
-	for (nid = 0 ; nid < numnodes ; nid++)
+	for_each_online_node(nid)
 		for (i = 0 ; i < MAX_LOW_PFN(nid) - START_PFN(nid) ; i++)
 			if (PageReserved(NODE_DATA(nid)->node_mem_map + i))
 				reservedpages++;
@@ -174,7 +174,7 @@
 #endif
 
 	num_physpages = 0;
-	for (nid = 0 ; nid < numnodes ; nid++)
+	for_each_online_node(nid)
 		num_physpages += MAX_LOW_PFN(nid) - START_PFN(nid) + 1;
 
 	num_physpages -= hole_pages;
@@ -193,7 +193,7 @@
 	memset(empty_zero_page, 0, PAGE_SIZE);
 
 	/* this will put all low memory onto the freelists */
-	for (nid = 0 ; nid < numnodes ; nid++)
+	for_each_online_node(nid)
 		totalram_pages += free_all_bootmem_node(NODE_DATA(nid));
 
 	reservedpages = reservedpages_count() - hole_pages;
diff -Nru a/arch/m32r/oprofile/init.c b/arch/m32r/oprofile/init.c
--- a/arch/m32r/oprofile/init.c	2005-01-10 20:11:16 -08:00
+++ b/arch/m32r/oprofile/init.c	2005-01-10 20:11:16 -08:00
@@ -12,13 +12,9 @@
 #include <linux/errno.h>
 #include <linux/init.h>
 
-extern void timer_init(struct oprofile_operations ** ops);
-
-int __init oprofile_arch_init(struct oprofile_operations ** ops)
+void __init oprofile_arch_init(struct oprofile_operations * ops)
 {
-	return -ENODEV;
 }
-
 
 void oprofile_arch_exit(void)
 {
diff -Nru a/arch/m68k/Kconfig b/arch/m68k/Kconfig
--- a/arch/m68k/Kconfig	2005-01-10 20:11:20 -08:00
+++ b/arch/m68k/Kconfig	2005-01-10 20:11:20 -08:00
@@ -21,6 +21,10 @@
 config RWSEM_XCHGADD_ALGORITHM
 	bool
 
+config GENERIC_CALIBRATE_DELAY
+	bool
+	default y
+
 mainmenu "Linux/68k Kernel Configuration"
 
 source "init/Kconfig"
diff -Nru a/arch/m68k/configs/amiga_defconfig b/arch/m68k/configs/amiga_defconfig
--- a/arch/m68k/configs/amiga_defconfig	2005-01-10 20:11:18 -08:00
+++ b/arch/m68k/configs/amiga_defconfig	2005-01-10 20:11:18 -08:00
@@ -376,7 +376,6 @@
 CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_IP_NF_TARGET_NETMAP=m
 CONFIG_IP_NF_TARGET_SAME=m
-CONFIG_IP_NF_NAT_LOCAL=y
 CONFIG_IP_NF_NAT_SNMP_BASIC=m
 CONFIG_IP_NF_NAT_IRC=m
 CONFIG_IP_NF_NAT_FTP=m
diff -Nru a/arch/m68k/configs/apollo_defconfig b/arch/m68k/configs/apollo_defconfig
--- a/arch/m68k/configs/apollo_defconfig	2005-01-10 20:11:22 -08:00
+++ b/arch/m68k/configs/apollo_defconfig	2005-01-10 20:11:22 -08:00
@@ -302,7 +302,6 @@
 CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_IP_NF_TARGET_NETMAP=m
 CONFIG_IP_NF_TARGET_SAME=m
-CONFIG_IP_NF_NAT_LOCAL=y
 CONFIG_IP_NF_NAT_SNMP_BASIC=m
 CONFIG_IP_NF_NAT_IRC=m
 CONFIG_IP_NF_NAT_FTP=m
diff -Nru a/arch/m68k/configs/atari_defconfig b/arch/m68k/configs/atari_defconfig
--- a/arch/m68k/configs/atari_defconfig	2005-01-10 20:11:17 -08:00
+++ b/arch/m68k/configs/atari_defconfig	2005-01-10 20:11:17 -08:00
@@ -331,7 +331,6 @@
 CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_IP_NF_TARGET_NETMAP=m
 CONFIG_IP_NF_TARGET_SAME=m
-CONFIG_IP_NF_NAT_LOCAL=y
 CONFIG_IP_NF_NAT_SNMP_BASIC=m
 CONFIG_IP_NF_NAT_IRC=m
 CONFIG_IP_NF_NAT_FTP=m
diff -Nru a/arch/m68k/configs/bvme6000_defconfig b/arch/m68k/configs/bvme6000_defconfig
--- a/arch/m68k/configs/bvme6000_defconfig	2005-01-10 20:11:20 -08:00
+++ b/arch/m68k/configs/bvme6000_defconfig	2005-01-10 20:11:20 -08:00
@@ -302,7 +302,6 @@
 CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_IP_NF_TARGET_NETMAP=m
 CONFIG_IP_NF_TARGET_SAME=m
-CONFIG_IP_NF_NAT_LOCAL=y
 CONFIG_IP_NF_NAT_SNMP_BASIC=m
 CONFIG_IP_NF_NAT_IRC=m
 CONFIG_IP_NF_NAT_FTP=m
diff -Nru a/arch/m68k/configs/hp300_defconfig b/arch/m68k/configs/hp300_defconfig
--- a/arch/m68k/configs/hp300_defconfig	2005-01-10 20:11:21 -08:00
+++ b/arch/m68k/configs/hp300_defconfig	2005-01-10 20:11:21 -08:00
@@ -303,7 +303,6 @@
 CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_IP_NF_TARGET_NETMAP=m
 CONFIG_IP_NF_TARGET_SAME=m
-CONFIG_IP_NF_NAT_LOCAL=y
 CONFIG_IP_NF_NAT_SNMP_BASIC=m
 CONFIG_IP_NF_NAT_IRC=m
 CONFIG_IP_NF_NAT_FTP=m
diff -Nru a/arch/m68k/configs/mac_defconfig b/arch/m68k/configs/mac_defconfig
--- a/arch/m68k/configs/mac_defconfig	2005-01-10 20:11:21 -08:00
+++ b/arch/m68k/configs/mac_defconfig	2005-01-10 20:11:21 -08:00
@@ -338,7 +338,6 @@
 CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_IP_NF_TARGET_NETMAP=m
 CONFIG_IP_NF_TARGET_SAME=m
-CONFIG_IP_NF_NAT_LOCAL=y
 CONFIG_IP_NF_NAT_SNMP_BASIC=m
 CONFIG_IP_NF_NAT_IRC=m
 CONFIG_IP_NF_NAT_FTP=m
diff -Nru a/arch/m68k/configs/mvme147_defconfig b/arch/m68k/configs/mvme147_defconfig
--- a/arch/m68k/configs/mvme147_defconfig	2005-01-10 20:11:20 -08:00
+++ b/arch/m68k/configs/mvme147_defconfig	2005-01-10 20:11:20 -08:00
@@ -303,7 +303,6 @@
 CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_IP_NF_TARGET_NETMAP=m
 CONFIG_IP_NF_TARGET_SAME=m
-CONFIG_IP_NF_NAT_LOCAL=y
 CONFIG_IP_NF_NAT_SNMP_BASIC=m
 CONFIG_IP_NF_NAT_IRC=m
 CONFIG_IP_NF_NAT_FTP=m
diff -Nru a/arch/m68k/configs/mvme16x_defconfig b/arch/m68k/configs/mvme16x_defconfig
--- a/arch/m68k/configs/mvme16x_defconfig	2005-01-10 20:11:24 -08:00
+++ b/arch/m68k/configs/mvme16x_defconfig	2005-01-10 20:11:24 -08:00
@@ -302,7 +302,6 @@
 CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_IP_NF_TARGET_NETMAP=m
 CONFIG_IP_NF_TARGET_SAME=m
-CONFIG_IP_NF_NAT_LOCAL=y
 CONFIG_IP_NF_NAT_SNMP_BASIC=m
 CONFIG_IP_NF_NAT_IRC=m
 CONFIG_IP_NF_NAT_FTP=m
diff -Nru a/arch/m68k/configs/q40_defconfig b/arch/m68k/configs/q40_defconfig
--- a/arch/m68k/configs/q40_defconfig	2005-01-10 20:11:18 -08:00
+++ b/arch/m68k/configs/q40_defconfig	2005-01-10 20:11:18 -08:00
@@ -356,7 +356,6 @@
 CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_IP_NF_TARGET_NETMAP=m
 CONFIG_IP_NF_TARGET_SAME=m
-CONFIG_IP_NF_NAT_LOCAL=y
 CONFIG_IP_NF_NAT_SNMP_BASIC=m
 CONFIG_IP_NF_NAT_IRC=m
 CONFIG_IP_NF_NAT_FTP=m
diff -Nru a/arch/m68k/configs/sun3_defconfig b/arch/m68k/configs/sun3_defconfig
--- a/arch/m68k/configs/sun3_defconfig	2005-01-10 20:11:20 -08:00
+++ b/arch/m68k/configs/sun3_defconfig	2005-01-10 20:11:20 -08:00
@@ -291,7 +291,6 @@
 CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_IP_NF_TARGET_NETMAP=m
 CONFIG_IP_NF_TARGET_SAME=m
-CONFIG_IP_NF_NAT_LOCAL=y
 CONFIG_IP_NF_NAT_SNMP_BASIC=m
 CONFIG_IP_NF_NAT_IRC=m
 CONFIG_IP_NF_NAT_FTP=m
diff -Nru a/arch/m68k/configs/sun3x_defconfig b/arch/m68k/configs/sun3x_defconfig
--- a/arch/m68k/configs/sun3x_defconfig	2005-01-10 20:11:16 -08:00
+++ b/arch/m68k/configs/sun3x_defconfig	2005-01-10 20:11:16 -08:00
@@ -302,7 +302,6 @@
 CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_IP_NF_TARGET_NETMAP=m
 CONFIG_IP_NF_TARGET_SAME=m
-CONFIG_IP_NF_NAT_LOCAL=y
 CONFIG_IP_NF_NAT_SNMP_BASIC=m
 CONFIG_IP_NF_NAT_IRC=m
 CONFIG_IP_NF_NAT_FTP=m
diff -Nru a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig
--- a/arch/m68knommu/Kconfig	2005-01-10 20:11:21 -08:00
+++ b/arch/m68knommu/Kconfig	2005-01-10 20:11:21 -08:00
@@ -29,6 +29,10 @@
 	bool
 	default n
 
+config GENERIC_CALIBRATE_DELAY
+	bool
+	default y
+
 source "init/Kconfig"
 
 menu "Processor type and features"
@@ -328,12 +332,6 @@
 	help
 	  Support for the senTec COBRA5272 board.
 
-config M5275EVB
-	bool "Freescale (Motorola) M5275EVB board support"
-	depends on M527x
-	help
-	  Support for the Freescale (Motorola) M5275EVB board.
-
 config M5282EVB
 	bool "Motorola M5282EVB board support"
 	depends on M528x
@@ -448,7 +446,7 @@
         bool
 	default y
 	depends on CPU16B
-	
+
 config LARGE_ALLOCS
 	bool "Allow allocating large blocks (> 1MB) of memory"
 	help
@@ -531,11 +529,6 @@
 	bool "ROM"
 	help
 	  The kernel will be resident in FLASH/ROM when running.
-
-config HIMEMKERNEL
-	bool "HIMEM"
-	help
-	  The kernel will be resident in high memory when running.
 
 endchoice
 
diff -Nru a/arch/m68knommu/kernel/process.c b/arch/m68knommu/kernel/process.c
--- a/arch/m68knommu/kernel/process.c	2005-01-10 20:11:17 -08:00
+++ b/arch/m68knommu/kernel/process.c	2005-01-10 20:11:17 -08:00
@@ -199,7 +199,7 @@
 	struct switch_stack * childstack, *stack;
 	unsigned long stack_offset, *retp;
 
-	stack_offset = KTHREAD_SIZE - sizeof(struct pt_regs);
+	stack_offset = THREAD_SIZE - sizeof(struct pt_regs);
 	childregs = (struct pt_regs *) ((unsigned long) p->thread_info + stack_offset);
 
 	*childregs = *regs;
@@ -342,7 +342,7 @@
 			(int) current->mm->brk);
 		printk(KERN_EMERG "USER-STACK=%08x  KERNEL-STACK=%08x\n\n",
 			(int) current->mm->start_stack,
-			(int)(((unsigned long) current) + KTHREAD_SIZE));
+			(int)(((unsigned long) current) + THREAD_SIZE));
 	}
 
 	printk(KERN_EMERG "PC: %08lx\n", fp->pc);
diff -Nru a/arch/m68knommu/kernel/vmlinux.lds.S b/arch/m68knommu/kernel/vmlinux.lds.S
--- a/arch/m68knommu/kernel/vmlinux.lds.S	2005-01-10 20:11:18 -08:00
+++ b/arch/m68knommu/kernel/vmlinux.lds.S	2005-01-10 20:11:18 -08:00
@@ -124,9 +124,8 @@
 #endif
 
 /*
- *   The senTec COBRA5272 board has nearly the same
- *   memory layout as the M5272C3.
- *   We assume 16MB ram.
+ *	The senTec COBRA5272 board has nearly the same memory layout as 
+ *	the M5272C3. We assume 16MiB ram.
  */
 #if defined(CONFIG_COBRA5272)
 #define RAM_START   0x20000
@@ -139,8 +138,7 @@
 #endif
 
 /*
- *   The senTec COBRA5282 board has the same
- *   memory layout as the M5282EVB.
+ *	The senTec COBRA5282 board has the same memory layout as the M5282EVB.
  */
 #if defined(CONFIG_COBRA5282)
 #define  RAM_START   0x10000
diff -Nru a/arch/m68knommu/lib/checksum.c b/arch/m68knommu/lib/checksum.c
--- a/arch/m68knommu/lib/checksum.c	2005-01-10 20:11:24 -08:00
+++ b/arch/m68knommu/lib/checksum.c	2005-01-10 20:11:24 -08:00
@@ -31,6 +31,7 @@
 /* Revised by Kenneth Albanowski for m68knommu. Basic problem: unaligned access kills, so most
    of the assembly has to go. */
 
+#include <linux/module.h>
 #include <net/checksum.h>
 
 static inline unsigned short from32to16(unsigned long x)
diff -Nru a/arch/m68knommu/lib/delay.c b/arch/m68knommu/lib/delay.c
--- a/arch/m68knommu/lib/delay.c	2005-01-10 20:11:17 -08:00
+++ b/arch/m68knommu/lib/delay.c	2005-01-10 20:11:17 -08:00
@@ -8,8 +8,11 @@
  * published by the Free Software Foundation.
  */
 
+#include <linux/module.h>
 #include <asm/param.h>
 #include <asm/delay.h>
+
+EXPORT_SYMBOL(udelay);
 
 void udelay(unsigned long usecs)
 {
diff -Nru a/arch/m68knommu/mm/init.c b/arch/m68knommu/mm/init.c
--- a/arch/m68knommu/mm/init.c	2005-01-10 20:11:20 -08:00
+++ b/arch/m68knommu/mm/init.c	2005-01-10 20:11:20 -08:00
@@ -168,7 +168,7 @@
 	high_memory = (void *) end_mem;
 
 	start_mem = PAGE_ALIGN(start_mem);
-	max_mapnr = num_physpages = MAP_NR(high_memory);
+	max_mapnr = num_physpages = (((unsigned long) high_memory) - PAGE_OFFSET) >> PAGE_SHIFT;
 
 	/* this will put all memory onto the freelists */
 	totalram_pages = free_all_bootmem();
diff -Nru a/arch/m68knommu/platform/5307/head.S b/arch/m68knommu/platform/5307/head.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/m68knommu/platform/5307/head.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,253 @@
+/*****************************************************************************/
+
+/*
+ *	head.S -- common startup code for ColdFire CPUs.
+ *
+ *	(C) Copyright 1999-2004, Greg Ungerer (gerg@snapgear.com).
+ */
+
+/*****************************************************************************/
+
+#include <linux/config.h>
+#include <linux/sys.h>
+#include <linux/linkage.h>
+#include <asm/thread_info.h>
+#include <asm/coldfire.h>
+#include <asm/mcfcache.h>
+#include <asm/mcfsim.h>
+
+/*****************************************************************************/
+
+/*
+ *	Define fixed memory sizes. Configuration of a fixed memory size
+ *	overrides everything else. If the user defined a size we just
+ *	blindly use it (they know what they are doing right :-)
+ */
+#if defined(CONFIG_RAM32MB)
+#define MEM_SIZE	0x02000000	/* memory size 32Mb */
+#elif defined(CONFIG_RAM16MB)
+#define MEM_SIZE	0x01000000	/* memory size 16Mb */
+#elif defined(CONFIG_RAM8MB)
+#define MEM_SIZE	0x00800000	/* memory size 8Mb */
+#elif defined(CONFIG_RAM4MB)
+#define MEM_SIZE	0x00400000	/* memory size 4Mb */
+#elif defined(CONFIG_RAM1MB)
+#define MEM_SIZE	0x00100000	/* memory size 1Mb */
+#endif
+
+/*
+ *	Memory size exceptions for special cases. Some boards may be set
+ *	for auto memory sizing, but we can't do it that way for some reason.
+ *	For example the 5206eLITE board has static RAM, and auto-detecting
+ *	the SDRAM will do you no good at all.
+ */
+#ifdef CONFIG_RAMAUTO
+#if defined(CONFIG_M5206eLITE)
+#define	MEM_SIZE	0x00100000		/* 1MiB default memory */
+#endif
+#endif /* CONFIG_RAMAUTO */
+
+/*
+ *	If we don't have a fixed memory size now, then lets build in code
+ *	to auto detect the DRAM size. Obviously this is the prefered
+ *	method, and should work for most boards (it won't work for those
+ *	that do not have their RAM starting at address 0).
+ */
+#if defined(MEM_SIZE)
+.macro GET_MEM_SIZE
+	movel	#MEM_SIZE,%d0		/* hard coded memory size */
+.endm
+
+#elif defined(CONFIG_M5206) || defined(CONFIG_M5206e) || \
+      defined(CONFIG_M5249) || defined(CONFIG_M527x) || \
+      defined(CONFIG_M528x) || defined(CONFIG_M5307) || \
+      defined(CONFIG_M5407)
+/*
+ *	Not all these devices have exactly the same DRAM controller,
+ *	but the DCMR register is virtually identical - give or take
+ *	a couple of bits. The only exception is the 5272 devices, their
+ *	DRAM controller is quite different.
+ */
+.macro GET_MEM_SIZE
+	movel	MCF_MBAR+MCFSIM_DMR0,%d0 /* get mask for 1st bank */
+	btst	#0,%d0			/* check if region enabled */
+	beq	1f
+	andl	#0xfffc0000,%d0
+	beq	1f
+	addl	#0x00040000,%d0		/* convert mask to size */
+1:
+	movel	MCF_MBAR+MCFSIM_DMR1,%d1 /* get mask for 2nd bank */
+	btst	#0,%d1			/* check if region enabled */
+	beq	2f
+	andl	#0xfffc0000, %d1
+	beq	2f
+	addl	#0x00040000,%d1
+	addl	%d1,%d0			/* total mem size in d0 */
+2:
+.endm
+
+#elif defined(CONFIG_M5272)
+.macro GET_MEMORY_SIZE
+	movel	MCF_MBAR+MCFSIM_CSOR7,%d0 /* get SDRAM address mask */
+	andil	#0xfffff000,%d0		/* mask out chip select options */
+	negl	%d0			/* negate bits */
+.endm
+
+#else
+#error "ERROR: I don't know how to determine your boards memory size?"
+#endif
+
+
+/*
+ *	Most ColdFire boards have their DRAM starting at address 0.
+ *	Notable exception is the 5206eLITE board.
+ */
+#if defined(CONFIG_M5206eLITE)
+#define	MEM_BASE	0x30000000
+#endif
+
+#ifndef MEM_BASE
+#define	MEM_BASE	0x00000000	/* memory base at address 0 */
+#endif
+
+/*
+ *	The default location for the vectors is at the base of RAM.
+ *	Some boards might like to use internal SRAM or something like
+ *	that. If no board specific header defines an alternative then
+ *	use the base of RAM.
+ */
+#ifndef	VBR_BASE
+#define	VBR_BASE	MEM_BASE	/* vector address */
+#endif
+
+/*****************************************************************************/
+
+/*
+ *	Boards and platforms can do specific early hardware setup if
+ *	they need to. Most don't need this, define away if not required.
+ */
+#ifndef PLATFORM_SETUP
+#define	PLATFORM_SETUP
+#endif
+
+/*****************************************************************************/
+
+.global	_start
+.global _rambase
+.global _ramvec
+.global	_ramstart
+.global	_ramend
+
+/*****************************************************************************/
+
+.data
+
+/*
+ *	During startup we store away the RAM setup. These are not in the
+ *	bss, since their values are determined and written before the bss
+ *	has been cleared.
+ */
+_rambase:
+.long	0
+_ramvec:
+.long	0
+_ramstart:
+.long	0
+_ramend:
+.long	0
+
+/*****************************************************************************/
+
+.text
+
+/*
+ *	This is the codes first entry point. This is where it all
+ *	begins...
+ */
+
+_start:
+	nop					/* filler */
+	movew	#0x2700, %sr			/* no interrupts */
+
+	/*
+	 *	Do any platform or board specific setup now. Most boards
+	 *	don't need anything. Those exceptions are define this in
+	 *	their board specific includes.
+	 */
+	PLATFORM_SETUP
+
+	/*
+	 *	Create basic memory configuration. Set VBR accordingly,
+	 *	and size memory.
+	 */
+	movel	#VBR_BASE,%a7
+	movec   %a7,%VBR			/* set vectors addr */
+	movel	%a7,_ramvec
+
+	movel	#MEM_BASE,%a7			/* mark the base of RAM */
+	movel	%a7,_rambase
+
+	GET_MEM_SIZE				/* macro code determines size */
+	movel	%d0,_ramend			/* set end ram addr */
+
+	/*
+	 *	Now that we know what the memory is, lets enable cache
+	 *	and get things moving. This is Coldfire CPU specific.
+	 */
+	CACHE_ENABLE				/* enable CPU cache */
+
+
+#ifdef CONFIG_ROMFS_FS
+	/*
+	 *	Move ROM filesystem above bss :-)
+	 */
+	lea	_sbss,%a0			/* get start of bss */
+	lea	_ebss,%a1			/* set up destination  */
+	movel	%a0,%a2				/* copy of bss start */
+
+	movel	8(%a0),%d0			/* get size of ROMFS */
+	addql	#8,%d0				/* allow for rounding */
+	andl	#0xfffffffc, %d0		/* whole words */
+
+	addl	%d0,%a0				/* copy from end */
+	addl	%d0,%a1				/* copy from end */
+	movel	%a1,_ramstart			/* set start of ram */
+
+_copy_romfs:
+	movel	-(%a0),%d0			/* copy dword */
+	movel	%d0,-(%a1)
+	cmpl	%a0,%a2				/* check if at end */
+	bne	_copy_romfs
+
+#else /* CONFIG_ROMFS_FS */
+	lea	_ebss,%a1
+	movel	%a1,_ramstart
+#endif /* CONFIG_ROMFS_FS */
+
+
+	/*
+	 *	Zero out the bss region.
+	 */
+	lea	_sbss,%a0			/* get start of bss */
+	lea	_ebss,%a1			/* get end of bss */
+	clrl	%d0				/* set value */
+_clear_bss:
+	movel	%d0,(%a0)+			/* clear each word */
+	cmpl	%a0,%a1				/* check if at end */
+	bne	_clear_bss
+
+	/*
+	 *	Load the current task pointer and stack.
+	 */
+	lea	init_thread_union,%a0
+	lea	THREAD_SIZE(%a0),%sp
+
+	/*
+	 *	Assember start up done, start code proper.
+	 */
+	jsr	start_kernel			/* start Linux kernel */
+
+_exit:
+	jmp	_exit				/* should never get here */
+
+/*****************************************************************************/
diff -Nru a/arch/mips/Kconfig b/arch/mips/Kconfig
--- a/arch/mips/Kconfig	2005-01-10 20:11:19 -08:00
+++ b/arch/mips/Kconfig	2005-01-10 20:11:19 -08:00
@@ -852,6 +852,10 @@
 config RWSEM_XCHGADD_ALGORITHM
 	bool
 
+config GENERIC_CALIBRATE_DELAY
+	bool
+	default y
+
 config HAVE_DEC_LOCK
 	bool
 	default y
@@ -986,7 +990,7 @@
 
 endchoice
 
-config AU1000_USB_DEVICE
+config AU1X00_USB_DEVICE
 	bool
 	depends on MIPS_PB1500 || MIPS_PB1100 || MIPS_PB1000
 	default n
diff -Nru a/arch/mips/au1000/common/usbdev.c b/arch/mips/au1000/common/usbdev.c
--- a/arch/mips/au1000/common/usbdev.c	2005-01-10 20:11:24 -08:00
+++ b/arch/mips/au1000/common/usbdev.c	2005-01-10 20:11:24 -08:00
@@ -766,7 +766,7 @@
 							 dev->conf_desc),
 					    0);
 				} else {
-				int len = dev->conf_desc->wTotalLength;
+				int len = le16_to_cpu(dev->conf_desc->wTotalLength);
 				dbg("sending whole config desc,"
 				    " size=%d, our size=%d", desc_len, len);
 				desc_len = desc_len > len ? len : desc_len;
@@ -1398,7 +1398,7 @@
 		epd->bEndpointAddress |= (u8)ep->address;
 		ep->direction = epd->bEndpointAddress & 0x80;
 		ep->type = epd->bmAttributes & 0x03;
-		ep->max_pkt_size = epd->wMaxPacketSize;
+		ep->max_pkt_size = le16_to_cpu(epd->wMaxPacketSize);
 		spin_lock_init(&ep->lock);
 		ep->desc = epd;
 		ep->reg = &ep_reg[ep->address];
@@ -1407,7 +1407,7 @@
 	/*
 	 * initialize the full config descriptor
 	 */
-	usbdev.full_conf_desc = fcd = kmalloc(config_desc->wTotalLength,
+	usbdev.full_conf_desc = fcd = kmalloc(le16_to_cpu(config_desc->wTotalLength),
 					      ALLOC_FLAGS);
 	if (!fcd) {
 		err("failed to alloc full config descriptor");
diff -Nru a/arch/mips/au1000/mtx-1/board_setup.c b/arch/mips/au1000/mtx-1/board_setup.c
--- a/arch/mips/au1000/mtx-1/board_setup.c	2005-01-10 20:11:16 -08:00
+++ b/arch/mips/au1000/mtx-1/board_setup.c	2005-01-10 20:11:16 -08:00
@@ -60,7 +60,7 @@
 	// enable USB power switch
 	au_writel( au_readl(GPIO2_DIR) | 0x10, GPIO2_DIR );
 	au_writel( 0x100000, GPIO2_OUTPUT );
-#endif // defined (CONFIG_USB_OHCI) || defined (CONFIG_AU1000_USB_DEVICE)
+#endif // defined (CONFIG_USB_OHCI) || defined (CONFIG_AU1X00_USB_DEVICE)
 
 #ifdef CONFIG_PCI
 #if defined(__MIPSEB__)
diff -Nru a/arch/mips/configs/ip22_defconfig b/arch/mips/configs/ip22_defconfig
--- a/arch/mips/configs/ip22_defconfig	2005-01-10 20:11:18 -08:00
+++ b/arch/mips/configs/ip22_defconfig	2005-01-10 20:11:18 -08:00
@@ -372,7 +372,6 @@
 CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_IP_NF_TARGET_NETMAP=m
 CONFIG_IP_NF_TARGET_SAME=m
-CONFIG_IP_NF_NAT_LOCAL=y
 CONFIG_IP_NF_NAT_SNMP_BASIC=m
 CONFIG_IP_NF_NAT_IRC=m
 CONFIG_IP_NF_NAT_FTP=m
diff -Nru a/arch/mips/configs/pb1500_defconfig b/arch/mips/configs/pb1500_defconfig
--- a/arch/mips/configs/pb1500_defconfig	2005-01-10 20:11:17 -08:00
+++ b/arch/mips/configs/pb1500_defconfig	2005-01-10 20:11:17 -08:00
@@ -104,7 +104,7 @@
 CONFIG_HAVE_DEC_LOCK=y
 CONFIG_DMA_COHERENT=y
 CONFIG_CPU_LITTLE_ENDIAN=y
-# CONFIG_AU1000_USB_DEVICE is not set
+# CONFIG_AU1X00_USB_DEVICE is not set
 CONFIG_MIPS_L1_CACHE_SHIFT=5
 # CONFIG_FB is not set
 
diff -Nru a/arch/mips/configs/rm200_defconfig b/arch/mips/configs/rm200_defconfig
--- a/arch/mips/configs/rm200_defconfig	2005-01-10 20:11:17 -08:00
+++ b/arch/mips/configs/rm200_defconfig	2005-01-10 20:11:17 -08:00
@@ -477,7 +477,6 @@
 CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_IP_NF_TARGET_NETMAP=m
 CONFIG_IP_NF_TARGET_SAME=m
-CONFIG_IP_NF_NAT_LOCAL=y
 CONFIG_IP_NF_NAT_SNMP_BASIC=m
 CONFIG_IP_NF_NAT_IRC=m
 CONFIG_IP_NF_NAT_FTP=m
diff -Nru a/arch/mips/ddb5xxx/ddb5074/setup.c b/arch/mips/ddb5xxx/ddb5074/setup.c
--- a/arch/mips/ddb5xxx/ddb5074/setup.c	2005-01-10 20:11:21 -08:00
+++ b/arch/mips/ddb5xxx/ddb5074/setup.c	2005-01-10 20:11:21 -08:00
@@ -88,8 +88,6 @@
 
 static void __init ddb5074_setup(void)
 {
-	extern int panic_timeout;
-
 	set_io_port_base(NILE4_PCI_IO_BASE);
 	isa_slot_offset = NILE4_PCI_MEM_BASE;
 	board_timer_setup = ddb_timer_init;
diff -Nru a/arch/mips/ddb5xxx/ddb5476/setup.c b/arch/mips/ddb5xxx/ddb5476/setup.c
--- a/arch/mips/ddb5xxx/ddb5476/setup.c	2005-01-10 20:11:20 -08:00
+++ b/arch/mips/ddb5xxx/ddb5476/setup.c	2005-01-10 20:11:20 -08:00
@@ -127,8 +127,6 @@
 
 static void __init ddb5476_setup(void)
 {
-	extern int panic_timeout;
-
 	set_io_port_base(KSEG1ADDR(DDB_PCI_IO_BASE));
 
 	board_time_init = ddb_time_init;
diff -Nru a/arch/mips/ddb5xxx/ddb5477/setup.c b/arch/mips/ddb5xxx/ddb5477/setup.c
--- a/arch/mips/ddb5xxx/ddb5477/setup.c	2005-01-10 20:11:22 -08:00
+++ b/arch/mips/ddb5xxx/ddb5477/setup.c	2005-01-10 20:11:22 -08:00
@@ -172,8 +172,6 @@
 
 static int  ddb5477_setup(void)
 {
-	extern int panic_timeout;
-
 	/* initialize board - we don't trust the loader */
         ddb5477_board_init();
 
diff -Nru a/arch/mips/defconfig b/arch/mips/defconfig
--- a/arch/mips/defconfig	2005-01-10 20:11:16 -08:00
+++ b/arch/mips/defconfig	2005-01-10 20:11:16 -08:00
@@ -372,7 +372,6 @@
 CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_IP_NF_TARGET_NETMAP=m
 CONFIG_IP_NF_TARGET_SAME=m
-CONFIG_IP_NF_NAT_LOCAL=y
 CONFIG_IP_NF_NAT_SNMP_BASIC=m
 CONFIG_IP_NF_NAT_IRC=m
 CONFIG_IP_NF_NAT_FTP=m
diff -Nru a/arch/mips/gt64120/ev64120/irq.c b/arch/mips/gt64120/ev64120/irq.c
--- a/arch/mips/gt64120/ev64120/irq.c	2005-01-10 20:11:21 -08:00
+++ b/arch/mips/gt64120/ev64120/irq.c	2005-01-10 20:11:21 -08:00
@@ -138,7 +138,7 @@
 		irq_desc[i].handler = &no_irq_type;
 		irq_desc[i].action = NULL;
 		irq_desc[i].depth = 0;
-		irq_desc[i].lock = SPIN_LOCK_UNLOCKED;
+		spin_lock_init(&irq_desc[i].lock);
 	}
 
 	gt64120_irq_setup();
diff -Nru a/arch/mips/jmr3927/rbhma3100/setup.c b/arch/mips/jmr3927/rbhma3100/setup.c
--- a/arch/mips/jmr3927/rbhma3100/setup.c	2005-01-10 20:11:22 -08:00
+++ b/arch/mips/jmr3927/rbhma3100/setup.c	2005-01-10 20:11:22 -08:00
@@ -195,7 +195,6 @@
 
 static void __init jmr3927_setup(void)
 {
-	extern int panic_timeout;
 	char *argptr;
 
 	set_io_port_base(JMR3927_PORT_BASE + JMR3927_PCIIO);
diff -Nru a/arch/mips/kernel/irixelf.c b/arch/mips/kernel/irixelf.c
--- a/arch/mips/kernel/irixelf.c	2005-01-10 20:11:23 -08:00
+++ b/arch/mips/kernel/irixelf.c	2005-01-10 20:11:23 -08:00
@@ -685,7 +685,7 @@
 	 * change some of these later.
 	 */
 	current->mm->rss = 0;
-	setup_arg_pages(bprm, EXSTACK_DEFAULT);
+	setup_arg_pages(bprm, STACK_TOP, EXSTACK_DEFAULT);
 	current->mm->start_stack = bprm->p;
 
 	/* At this point, we assume that the image should be loaded at
diff -Nru a/arch/mips/kernel/irixsig.c b/arch/mips/kernel/irixsig.c
--- a/arch/mips/kernel/irixsig.c	2005-01-10 20:11:22 -08:00
+++ b/arch/mips/kernel/irixsig.c	2005-01-10 20:11:22 -08:00
@@ -583,7 +583,7 @@
 		retval = -EINVAL;
 		goto out;
 	}
-	add_wait_queue(&current->wait_chldexit, &wait);
+	add_wait_queue(&current->signal->wait_chldexit, &wait);
 repeat:
 	flag = 0;
 	current->state = TASK_INTERRUPTIBLE;
@@ -672,7 +672,7 @@
 	retval = -ECHILD;
 end_waitsys:
 	current->state = TASK_RUNNING;
-	remove_wait_queue(&current->wait_chldexit, &wait);
+	remove_wait_queue(&current->signal->wait_chldexit, &wait);
 
 out:
 	return retval;
diff -Nru a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S
--- a/arch/mips/kernel/scall64-n32.S	2005-01-10 20:11:22 -08:00
+++ b/arch/mips/kernel/scall64-n32.S	2005-01-10 20:11:22 -08:00
@@ -243,7 +243,7 @@
 	PTR	sys_capget
 	PTR	sys_capset
 	PTR	sys32_rt_sigpending		/* 6125 */
-	PTR	sys32_rt_sigtimedwait
+	PTR	compat_rt_sigtimedwait
 	PTR	sys32_rt_sigqueueinfo
 	PTR	sys32_rt_sigsuspend
 	PTR	sys32_sigaltstack
diff -Nru a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S
--- a/arch/mips/kernel/scall64-o32.S	2005-01-10 20:11:15 -08:00
+++ b/arch/mips/kernel/scall64-o32.S	2005-01-10 20:11:15 -08:00
@@ -236,7 +236,7 @@
 	PTR	sys_unlink			/* 4010 */
 	PTR	sys32_execve
 	PTR	sys_chdir
-	PTR	sys_time
+	PTR	compat_sys_time
 	PTR	sys_mknod
 	PTR	sys_chmod			/* 4015 */
 	PTR	sys_lchown
@@ -248,7 +248,7 @@
 	PTR	sys_oldumount
 	PTR	sys_setuid
 	PTR	sys_getuid
-	PTR	sys_stime			/* 4025 */
+	PTR	compat_sys_stime		/* 4025 */
 	PTR	sys32_ptrace
 	PTR	sys_alarm
 	PTR	sys_ni_syscall			/* was sys_fstat */
@@ -420,7 +420,7 @@
 	PTR	sys32_rt_sigaction
 	PTR	sys32_rt_sigprocmask 		/* 4195 */
 	PTR	sys32_rt_sigpending
-	PTR	sys32_rt_sigtimedwait
+	PTR	compat_rt_sigtimedwait
 	PTR	sys32_rt_sigqueueinfo
 	PTR	sys32_rt_sigsuspend
 	PTR	sys32_pread			/* 4200 */
diff -Nru a/arch/mips/kernel/signal32.c b/arch/mips/kernel/signal32.c
--- a/arch/mips/kernel/signal32.c	2005-01-10 20:11:19 -08:00
+++ b/arch/mips/kernel/signal32.c	2005-01-10 20:11:19 -08:00
@@ -37,7 +37,7 @@
 	s32 sival_ptr;
 } sigval_t32;
 
-typedef struct siginfo32 {
+typedef struct compat_siginfo{
 	int si_signo;
 	int si_code;
 	int si_errno;
@@ -93,7 +93,7 @@
 		} _rt;
 
 	} _sifields;
-} siginfo_t32;
+} compat_siginfo_t;
 
 /*
  * Including <asm/unistd.h> would give use the 64-bit syscall numbers ...
@@ -389,15 +389,15 @@
 struct rt_sigframe32 {
 	u32 rs_ass[4];			/* argument save space for o32 */
 	u32 rs_code[2];			/* signal trampoline */
-	struct siginfo32 rs_info;
+	struct compat_siginfo_t rs_info;
 	struct ucontext32 rs_uc;
 };
 
-static int copy_siginfo_to_user32(siginfo_t32 *to, siginfo_t *from)
+int copy_siginfo_to_user32(compat_siginfo_t *to, siginfo_t *from)
 {
 	int err;
 
-	if (!access_ok (VERIFY_WRITE, to, sizeof(siginfo_t32)))
+	if (!access_ok (VERIFY_WRITE, to, sizeof(compat_siginfo_t)))
 		return -EFAULT;
 
 	/* If you change siginfo_t structure, please be sure
@@ -677,7 +677,7 @@
 	err |= __put_user(0x0000000c                      , frame->rs_code + 1);
 	flush_cache_sigtramp((unsigned long) frame->rs_code);
 
-	/* Convert (siginfo_t -> siginfo_t32) and copy to user. */
+	/* Convert (siginfo_t -> compat_siginfo_t) and copy to user. */
 	err |= copy_siginfo_to_user32(&frame->rs_info, info);
 
 	/* Create the ucontext.  */
@@ -890,98 +890,7 @@
 	return ret;
 }
 
-asmlinkage int sys32_rt_sigtimedwait(compat_sigset_t *uthese,
-	siginfo_t32 *uinfo, struct compat_timespec *uts,
-	compat_time_t sigsetsize)
-{
-	int ret, sig;
-	sigset_t these;
-	compat_sigset_t these32;
-	struct timespec ts;
-	siginfo_t info;
-	long timeout = 0;
-
-	/*
-	 * As the result of a brainfarting competition a few years ago the
-	 * size of sigset_t for the 32-bit kernel was choosen to be 128 bits
-	 * but nothing so far is actually using that many, 64 are enough.  So
-	 * for now we just drop the high bits.
-	 */
-	if (copy_from_user (&these32, uthese, sizeof(compat_old_sigset_t)))
-		return -EFAULT;
-
-	switch (_NSIG_WORDS) {
-#ifdef __MIPSEB__
-	case 4: these.sig[3] = these32.sig[6] | (((long)these32.sig[7]) << 32);
-	case 3: these.sig[2] = these32.sig[4] | (((long)these32.sig[5]) << 32);
-	case 2: these.sig[1] = these32.sig[2] | (((long)these32.sig[3]) << 32);
-	case 1: these.sig[0] = these32.sig[0] | (((long)these32.sig[1]) << 32);
-#endif
-#ifdef __MIPSEL__
-	case 4: these.sig[3] = these32.sig[7] | (((long)these32.sig[6]) << 32);
-	case 3: these.sig[2] = these32.sig[5] | (((long)these32.sig[4]) << 32);
-	case 2: these.sig[1] = these32.sig[3] | (((long)these32.sig[2]) << 32);
-	case 1: these.sig[0] = these32.sig[1] | (((long)these32.sig[0]) << 32);
-#endif
-	}
-
-	/*
-	 * Invert the set of allowed signals to get those we
-	 * want to block.
-	 */
-	sigdelsetmask(&these, sigmask(SIGKILL)|sigmask(SIGSTOP));
-	signotset(&these);
-
-	if (uts) {
-		if (get_user (ts.tv_sec, &uts->tv_sec) ||
-		    get_user (ts.tv_nsec, &uts->tv_nsec))
-			return -EINVAL;
-		if (ts.tv_nsec >= 1000000000L || ts.tv_nsec < 0
-		    || ts.tv_sec < 0)
-			return -EINVAL;
-	}
-
-	spin_lock_irq(&current->sighand->siglock);
-	sig = dequeue_signal(current, &these, &info);
-	if (!sig) {
-		/* None ready -- temporarily unblock those we're interested
-		   in so that we'll be awakened when they arrive.  */
-		sigset_t oldblocked = current->blocked;
-		sigandsets(&current->blocked, &current->blocked, &these);
-		recalc_sigpending();
-		spin_unlock_irq(&current->sighand->siglock);
-
-		timeout = MAX_SCHEDULE_TIMEOUT;
-		if (uts)
-			timeout = (timespec_to_jiffies(&ts)
-				   + (ts.tv_sec || ts.tv_nsec));
-
-		current->state = TASK_INTERRUPTIBLE;
-		timeout = schedule_timeout(timeout);
-
-		spin_lock_irq(&current->sighand->siglock);
-		sig = dequeue_signal(current, &these, &info);
-		current->blocked = oldblocked;
-		recalc_sigpending();
-	}
-	spin_unlock_irq(&current->sighand->siglock);
-
-	if (sig) {
-		ret = sig;
-		if (uinfo) {
-			if (copy_siginfo_to_user32(uinfo, &info))
-				ret = -EFAULT;
-		}
-	} else {
-		ret = -EAGAIN;
-		if (timeout)
-			ret = -EINTR;
-	}
-
-	return ret;
-}
-
-asmlinkage int sys32_rt_sigqueueinfo(int pid, int sig, siginfo_t32 *uinfo)
+asmlinkage int sys32_rt_sigqueueinfo(int pid, int sig, compat_siginfo_t *uinfo)
 {
 	siginfo_t info;
 	int ret;
diff -Nru a/arch/mips/mm/highmem.c b/arch/mips/mm/highmem.c
--- a/arch/mips/mm/highmem.c	2005-01-10 20:11:17 -08:00
+++ b/arch/mips/mm/highmem.c	2005-01-10 20:11:17 -08:00
@@ -8,7 +8,7 @@
 	void *addr;
 
 	might_sleep();
-	if (page < highmem_start_page)
+	if (!PageHighMem(page))
 		return page_address(page);
 	addr = kmap_high(page);
 	flush_tlb_one((unsigned long)addr);
@@ -20,7 +20,7 @@
 {
 	if (in_interrupt())
 		BUG();
-	if (page < highmem_start_page)
+	if (!PageHighMem(page))
 		return;
 	kunmap_high(page);
 }
@@ -41,7 +41,7 @@
 
 	/* even !CONFIG_PREEMPT needs this, for in_atomic in do_page_fault */
 	inc_preempt_count();
-	if (page < highmem_start_page)
+	if (!PageHighMem(page))
 		return page_address(page);
 
 	idx = type + KM_TYPE_NR*smp_processor_id();
diff -Nru a/arch/mips/mm/init.c b/arch/mips/mm/init.c
--- a/arch/mips/mm/init.c	2005-01-10 20:11:21 -08:00
+++ b/arch/mips/mm/init.c	2005-01-10 20:11:21 -08:00
@@ -204,7 +204,6 @@
 	unsigned long tmp, ram;
 
 #ifdef CONFIG_HIGHMEM
-	highmem_start_page = mem_map + highstart_pfn;
 #ifdef CONFIG_DISCONTIGMEM
 #error "CONFIG_HIGHMEM and CONFIG_DISCONTIGMEM dont work together yet"
 #endif
diff -Nru a/arch/mips/sgi-ip27/ip27-init.c b/arch/mips/sgi-ip27/ip27-init.c
--- a/arch/mips/sgi-ip27/ip27-init.c	2005-01-10 20:11:22 -08:00
+++ b/arch/mips/sgi-ip27/ip27-init.c	2005-01-10 20:11:22 -08:00
@@ -10,7 +10,6 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/sched.h>
-#include <linux/mmzone.h>	/* for numnodes */
 #include <linux/mm.h>
 #include <linux/module.h>
 #include <linux/cpumask.h>
diff -Nru a/arch/mips/sgi-ip27/ip27-klnuma.c b/arch/mips/sgi-ip27/ip27-klnuma.c
--- a/arch/mips/sgi-ip27/ip27-klnuma.c	2005-01-10 20:11:18 -08:00
+++ b/arch/mips/sgi-ip27/ip27-klnuma.c	2005-01-10 20:11:18 -08:00
@@ -27,33 +27,25 @@
  * kernel.  For example, we should never put a copy on a headless node,
  * and we should respect the topology of the machine.
  */
-void __init setup_replication_mask(int maxnodes)
+void __init setup_replication_mask()
 {
-	static int 	numa_kernel_replication_ratio;
 	cnodeid_t	cnode;
 
 	/* Set only the master cnode's bit.  The master cnode is always 0. */
 	cpus_clear(ktext_repmask);
 	cpu_set(0, ktext_repmask);
 
-	numa_kernel_replication_ratio = 0;
 #ifdef CONFIG_REPLICATE_KTEXT
 #ifndef CONFIG_MAPPED_KERNEL
 #error Kernel replication works with mapped kernel support. No calias support.
 #endif
-	numa_kernel_replication_ratio = 1;
-#endif
-
-	for (cnode = 1; cnode < numnodes; cnode++) {
-		/* See if this node should get a copy of the kernel */
-		if (numa_kernel_replication_ratio &&
-		    !(cnode % numa_kernel_replication_ratio)) {
-
-			/* Advertise that we have a copy of the kernel */
-			cpu_set(cnode, ktext_repmask);
-		}
+	for_each_online_node(cnode) {
+		if (cnode == 0)
+			continue;
+		/* Advertise that we have a copy of the kernel */
+		cpu_set(cnode, ktext_repmask);
 	}
-
+#endif
 	/* Set up a GDA pointer to the replication mask. */
 	GDA->g_ktext_repmask = &ktext_repmask;
 }
@@ -92,7 +84,7 @@
 	memcpy((void *)dest_kern_start, (void *)source_start, kern_size);
 }
 
-void __init replicate_kernel_text(int maxnodes)
+void __init replicate_kernel_text()
 {
 	cnodeid_t cnode;
 	nasid_t client_nasid;
@@ -103,7 +95,9 @@
 	/* Record where the master node should get its kernel text */
 	set_ktext_source(master_nasid, master_nasid);
 
-	for (cnode = 1; cnode < maxnodes; cnode++) {
+	for_each_online_node(cnode) {
+		if (cnode == 0)
+			continue;
 		client_nasid = COMPACT_TO_NASID_NODEID(cnode);
 
 		/* Check if this node should get a copy of the kernel */
diff -Nru a/arch/mips/sgi-ip27/ip27-memory.c b/arch/mips/sgi-ip27/ip27-memory.c
--- a/arch/mips/sgi-ip27/ip27-memory.c	2005-01-10 20:11:17 -08:00
+++ b/arch/mips/sgi-ip27/ip27-memory.c	2005-01-10 20:11:17 -08:00
@@ -59,12 +59,12 @@
 
 static hubreg_t region_mask;
 
-static void gen_region_mask(hubreg_t *region_mask, int maxnodes)
+static void gen_region_mask(hubreg_t *region_mask)
 {
 	cnodeid_t cnode;
 
 	(*region_mask) = 0;
-	for (cnode = 0; cnode < maxnodes; cnode++) {
+	for_each_online_node(cnode) {
 		(*region_mask) |= 1ULL << get_region(cnode);
 	}
 }
@@ -120,7 +120,7 @@
 	int port;
 
 	/* Figure out which routers nodes in question are connected to */
-	for (cnode = 0; cnode < numnodes; cnode++) {
+	for_each_online_node(cnode) {
 		nasid = COMPACT_TO_NASID_NODEID(cnode);
 
 		if (nasid == -1) continue;
@@ -187,9 +187,9 @@
 		for (col = 0; col < MAX_COMPACT_NODES; col++)
 			__node_distances[row][col] = -1;
 
-	for (row = 0; row < numnodes; row++) {
+	for_each_online_node(row) {
 		nasid = COMPACT_TO_NASID_NODEID(row);
-		for (col = 0; col < numnodes; col++) {
+		for_each_online_node(col) {
 			nasid2 = COMPACT_TO_NASID_NODEID(col);
 			__node_distances[row][col] =
 				compute_node_distance(nasid, nasid2);
@@ -210,17 +210,17 @@
 	printk("************** Topology ********************\n");
 
 	printk("    ");
-	for (col = 0; col < numnodes; col++)
+	for_each_online_node(col)
 		printk("%02d ", col);
 	printk("\n");
-	for (row = 0; row < numnodes; row++) {
+	for_each_online_node(row) {
 		printk("%02d  ", row);
-		for (col = 0; col < numnodes; col++)
+		for_each_online_node(col)
 			printk("%2d ", node_distance(row, col));
 		printk("\n");
 	}
 
-	for (cnode = 0; cnode < numnodes; cnode++) {
+	for_each_online_node(cnode) {
 		nasid = COMPACT_TO_NASID_NODEID(cnode);
 
 		if (nasid == -1) continue;
@@ -363,14 +363,14 @@
 	init_topology_matrix();
 	dump_topology();
 
-	gen_region_mask(&region_mask, numnodes);
+	gen_region_mask(&region_mask);
 
-	setup_replication_mask(numnodes);
+	setup_replication_mask();
 
 	/*
 	 * Set all nodes' calias sizes to 8k
 	 */
-	for (i = 0; i < numnodes; i++) {
+	for_each_online_node(i) {
 		nasid_t nasid;
 
 		nasid = COMPACT_TO_NASID_NODEID(i);
@@ -407,7 +407,7 @@
 
 	num_physpages = 0;
 
-	for (node = 0; node < numnodes; node++) {
+	for_each_online_node(node) {
 		ignore = nodebytes = 0;
 		for (slot = 0; slot < MAX_MEM_SLOTS; slot++) {
 			slot_psize = slot_psize_compute(node, slot);
@@ -489,7 +489,7 @@
 	szmem();
 
 	for (node = 0; node < MAX_COMPACT_NODES; node++) {
-		if (node < numnodes) {
+		if (node_online(node)) {
 			node_mem_init(node);
 			continue;
 		}
@@ -513,7 +513,7 @@
 
 	pagetable_init();
 
-	for (node = 0; node < numnodes; node++) {
+	for_each_online_node(node) {
 		pfn_t start_pfn = slot_getbasepfn(node, 0);
 		pfn_t end_pfn = node_getmaxclick(node) + 1;
 
@@ -533,7 +533,7 @@
 
 	high_memory = (void *) __va(num_physpages << PAGE_SHIFT);
 
-	for (node = 0; node < numnodes; node++) {
+	for_each_online_node(node) {
 		unsigned slot, numslots;
 		struct page *end, *p;
 	
diff -Nru a/arch/mips/sgi-ip27/ip27-nmi.c b/arch/mips/sgi-ip27/ip27-nmi.c
--- a/arch/mips/sgi-ip27/ip27-nmi.c	2005-01-10 20:11:15 -08:00
+++ b/arch/mips/sgi-ip27/ip27-nmi.c	2005-01-10 20:11:15 -08:00
@@ -183,7 +183,7 @@
 {
 	cnodeid_t	cnode;
 
-	for(cnode = 0 ; cnode < numnodes; cnode++)
+	for_each_online_node(cnode)
 		nmi_node_eframe_save(cnode);
 }
 
@@ -214,13 +214,13 @@
 	 * send NMIs to all cpus on a 256p system.
 	 */
 	for (i=0; i < 1500; i++) {
-		for (node=0; node < numnodes; node++)
+		for_each_online_node(node)
 			if (NODEPDA(node)->dump_count == 0)
 				break;
-		if (node == numnodes)
+		if (node == MAX_NUMNODES)
 			break;
 		if (i == 1000) {
-			for (node=0; node < numnodes; node++)
+			for_each_online_node(node)
 				if (NODEPDA(node)->dump_count == 0) {
 					cpu = node_to_first_cpu(node);
 					for (n=0; n < CNODE_NUM_CPUS(node); cpu++, n++) {
diff -Nru a/arch/mips/sgi-ip27/ip27-reset.c b/arch/mips/sgi-ip27/ip27-reset.c
--- a/arch/mips/sgi-ip27/ip27-reset.c	2005-01-10 20:11:19 -08:00
+++ b/arch/mips/sgi-ip27/ip27-reset.c	2005-01-10 20:11:19 -08:00
@@ -43,7 +43,7 @@
 	smp_send_stop();
 #endif
 #if 0
-	for (i = 0; i < numnodes; i++)
+	for_each_online_node(i)
 		REMOTE_HUB_S(COMPACT_TO_NASID_NODEID(i), PROMOP_REG,
 							PROMOP_REBOOT);
 #else
@@ -59,7 +59,7 @@
 #ifdef CONFIG_SMP
 	smp_send_stop();
 #endif
-	for (i = 0; i < numnodes; i++)
+	for_each_online_node(i)
 		REMOTE_HUB_S(COMPACT_TO_NASID_NODEID(i), PROMOP_REG,
 							PROMOP_RESTART);
 	LOCAL_HUB_S(NI_PORT_RESET, NPR_PORTRESET | NPR_LOCALRESET);
diff -Nru a/arch/mips/sgi-ip27/ip27-smp.c b/arch/mips/sgi-ip27/ip27-smp.c
--- a/arch/mips/sgi-ip27/ip27-smp.c	2005-01-10 20:11:20 -08:00
+++ b/arch/mips/sgi-ip27/ip27-smp.c	2005-01-10 20:11:20 -08:00
@@ -108,18 +108,22 @@
 	for (i = 0; i < MAXCPUS; i++)
 		cpuid_to_compact_node[i] = INVALID_CNODEID;
 
-	numnodes = 0;
+	/*
+	 * MCD - this whole "compact node" stuff can probably be dropped,
+	 * as we can handle sparse numbering now
+	 */
+	nodes_clear(node_online_map);
 	for (i = 0; i < MAX_COMPACT_NODES; i++) {
 		nasid_t nasid = gdap->g_nasidtable[i];
 		if (nasid == INVALID_NASID)
 			break;
 		compact_to_nasid_node[i] = nasid;
 		nasid_to_compact_node[nasid] = i;
-		numnodes++;
+		node_set_online(num_online_nodes());
 		highest = do_cpumask(i, nasid, highest);
 	}
 
-	printk("Discovered %d cpus on %d nodes\n", highest + 1, numnodes);
+	printk("Discovered %d cpus on %d nodes\n", highest + 1, num_online_nodes());
 }
 
 static void intr_clear_bits(nasid_t nasid, volatile hubreg_t *pend,
@@ -151,10 +155,10 @@
 {
 	cnodeid_t	cnode;
 
-	for (cnode = 0; cnode < numnodes; cnode++)
+	for_each_online_node(cnode)
 		intr_clear_all(COMPACT_TO_NASID_NODEID(cnode));
 
-	replicate_kernel_text(numnodes);
+	replicate_kernel_text();
 
 	/*
 	 * Assumption to be fixed: we're always booted on logical / physical
diff -Nru a/arch/mips/sibyte/swarm/setup.c b/arch/mips/sibyte/swarm/setup.c
--- a/arch/mips/sibyte/swarm/setup.c	2005-01-10 20:11:19 -08:00
+++ b/arch/mips/sibyte/swarm/setup.c	2005-01-10 20:11:19 -08:00
@@ -27,6 +27,7 @@
 #include <linux/bootmem.h>
 #include <linux/blkdev.h>
 #include <linux/init.h>
+#include <linux/kernel.h>
 #include <linux/tty.h>
 #include <linux/initrd.h>
 
@@ -85,8 +86,6 @@
 
 static int __init swarm_setup(void)
 {
-	extern int panic_timeout;
-
 	sb1250_setup();
 
 	panic_timeout = 5;  /* For debug.  */
diff -Nru a/arch/parisc/Kconfig b/arch/parisc/Kconfig
--- a/arch/parisc/Kconfig	2005-01-10 20:11:20 -08:00
+++ b/arch/parisc/Kconfig	2005-01-10 20:11:20 -08:00
@@ -32,6 +32,10 @@
 config RWSEM_XCHGADD_ALGORITHM
 	bool
 
+config GENERIC_CALIBRATE_DELAY
+	bool
+	default y
+
 config GENERIC_ISA_DMA
 	bool
 
diff -Nru a/arch/parisc/configs/a500_defconfig b/arch/parisc/configs/a500_defconfig
--- a/arch/parisc/configs/a500_defconfig	2005-01-10 20:11:17 -08:00
+++ b/arch/parisc/configs/a500_defconfig	2005-01-10 20:11:17 -08:00
@@ -338,7 +338,6 @@
 CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_IP_NF_TARGET_NETMAP=m
 CONFIG_IP_NF_TARGET_SAME=m
-# CONFIG_IP_NF_NAT_LOCAL is not set
 CONFIG_IP_NF_NAT_SNMP_BASIC=m
 CONFIG_IP_NF_NAT_IRC=m
 CONFIG_IP_NF_NAT_FTP=m
diff -Nru a/arch/parisc/configs/c3000_defconfig b/arch/parisc/configs/c3000_defconfig
--- a/arch/parisc/configs/c3000_defconfig	2005-01-10 20:11:19 -08:00
+++ b/arch/parisc/configs/c3000_defconfig	2005-01-10 20:11:19 -08:00
@@ -396,7 +396,6 @@
 CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_IP_NF_TARGET_NETMAP=m
 CONFIG_IP_NF_TARGET_SAME=m
-# CONFIG_IP_NF_NAT_LOCAL is not set
 CONFIG_IP_NF_NAT_SNMP_BASIC=m
 CONFIG_IP_NF_NAT_IRC=m
 CONFIG_IP_NF_NAT_FTP=m
diff -Nru a/arch/parisc/configs/n4000_defconfig b/arch/parisc/configs/n4000_defconfig
--- a/arch/parisc/configs/n4000_defconfig	2005-01-10 20:11:17 -08:00
+++ b/arch/parisc/configs/n4000_defconfig	2005-01-10 20:11:17 -08:00
@@ -331,7 +331,6 @@
 CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_IP_NF_TARGET_NETMAP=m
 CONFIG_IP_NF_TARGET_SAME=m
-# CONFIG_IP_NF_NAT_LOCAL is not set
 CONFIG_IP_NF_NAT_SNMP_BASIC=m
 CONFIG_IP_NF_NAT_IRC=m
 CONFIG_IP_NF_NAT_FTP=m
diff -Nru a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c
--- a/arch/parisc/kernel/smp.c	2005-01-10 20:11:23 -08:00
+++ b/arch/parisc/kernel/smp.c	2005-01-10 20:11:23 -08:00
@@ -459,7 +459,6 @@
  */
 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;
diff -Nru a/arch/parisc/kernel/sys_parisc32.c b/arch/parisc/kernel/sys_parisc32.c
--- a/arch/parisc/kernel/sys_parisc32.c	2005-01-10 20:11:18 -08:00
+++ b/arch/parisc/kernel/sys_parisc32.c	2005-01-10 20:11:18 -08:00
@@ -206,21 +206,6 @@
 	return 0;
 }
 
-asmlinkage long sys32_time(compat_time_t *tloc)
-{
-	struct timeval tv;
-	compat_time_t now32;
-
-	do_gettimeofday(&tv);
-	now32 = tv.tv_sec;
-
-	if (tloc)
-		if (put_user(now32, tloc))
-			now32 = -EFAULT;
-
-	return now32;
-}
-
 asmlinkage int
 sys32_gettimeofday(struct compat_timeval *tv, struct timezone *tz)
 {
diff -Nru a/arch/parisc/kernel/syscall_table.S b/arch/parisc/kernel/syscall_table.S
--- a/arch/parisc/kernel/syscall_table.S	2005-01-10 20:11:16 -08:00
+++ b/arch/parisc/kernel/syscall_table.S	2005-01-10 20:11:16 -08:00
@@ -74,7 +74,7 @@
 	ENTRY_DIFF(execve_wrapper)
 	ENTRY_SAME(chdir)
 	/* See comments in kernel/time.c!!! Maybe we don't need this? */
-	ENTRY_DIFF(time)
+	ENTRY_COMP(time)
 	ENTRY_SAME(mknod)
 	ENTRY_SAME(chmod)		/* 15 */
 	ENTRY_SAME(lchown)
@@ -91,7 +91,7 @@
 	ENTRY_SAME(bind)
 	ENTRY_SAME(setuid)
 	ENTRY_SAME(getuid)
-	ENTRY_SAME(stime)		/* 25 */
+	ENTRY_COMP(stime)		/* 25 */
 	ENTRY_SAME(ptrace)
 	ENTRY_SAME(alarm)
 	/* see stat comment */
diff -Nru a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c
--- a/arch/parisc/mm/init.c	2005-01-10 20:11:19 -08:00
+++ b/arch/parisc/mm/init.c	2005-01-10 20:11:19 -08:00
@@ -269,8 +269,6 @@
 	}
 	memset(pfnnid_map, 0xff, sizeof(pfnnid_map));
 
-	numnodes = npmem_ranges;
-
 	for (i = 0; i < npmem_ranges; i++)
 		node_set_online(i);
 #endif
diff -Nru a/arch/parisc/oprofile/init.c b/arch/parisc/oprofile/init.c
--- a/arch/parisc/oprofile/init.c	2005-01-10 20:11:19 -08:00
+++ b/arch/parisc/oprofile/init.c	2005-01-10 20:11:19 -08:00
@@ -12,11 +12,8 @@
 #include <linux/kernel.h>
 #include <linux/oprofile.h>
 
-extern void timer_init(struct oprofile_operations ** ops);
-
-int __init oprofile_arch_init(struct oprofile_operations ** ops)
+void __init oprofile_arch_init(struct oprofile_operations * ops)
 {
-	return -ENODEV;
 }
 
 
diff -Nru a/arch/ppc/Kconfig b/arch/ppc/Kconfig
--- a/arch/ppc/Kconfig	2005-01-10 20:11:23 -08:00
+++ b/arch/ppc/Kconfig	2005-01-10 20:11:23 -08:00
@@ -22,6 +22,10 @@
 	bool
 	default y
 
+config GENERIC_CALIBRATE_DELAY
+	bool
+	default y
+
 config HAVE_DEC_LOCK
 	bool
 	default y
@@ -97,6 +101,11 @@
 	depends on 44x
 	default y
 
+config PHYS_64BIT
+	bool
+	depends on 44x
+	default y
+
 config ALTIVEC
 	bool "AltiVec Support"
 	depends on 6xx || POWER4
@@ -500,21 +509,41 @@
 	  More information is available at:
 	  <http://linux-apus.sourceforge.net/>.
 
+config KATANA
+	bool "Artesyn-Katana"
+	help
+	  Select KATANA if configuring an Artesyn KATANA 750i or 3750
+	  cPCI board.
+
 config WILLOW
 	bool "Cogent-Willow"
 
+config CPCI690
+	bool "Force-CPCI690"
+	help
+	  Select CPCI690 if configuring a Force CPCI690 cPCI board.
+
 config PCORE
 	bool "Force-PowerCore"
 
 config POWERPMC250
 	bool "Force-PowerPMC250"
 
-config EV64260
-	bool "Galileo-EV-64260-BP"
+config CHESTNUT
+	bool "IBM 750FX Eval board or 750GX Eval board"
+	help
+	  Select CHESTNUT if configuring an IBM 750FX Eval Board or a
+	  IBM 750GX Eval board.
 
 config SPRUCE
 	bool "IBM-Spruce"
 
+config EV64260
+	bool "Marvell-EV64260BP"
+	help
+	  Select EV64260 if configuring a Marvell (formerly Galileo)
+	  EV64260BP Evaluation platform.
+
 config LOPEC
 	bool "Motorola-LoPEC"
 
@@ -679,7 +708,8 @@
 config PPC_GEN550
 	bool
 	depends on SANDPOINT || MCPN765 || SPRUCE || PPLUS || PCORE || \
-		PRPMC750 || K2 || PRPMC800 || LOPEC
+		PRPMC750 || K2 || PRPMC800 || LOPEC || \
+		(EV64260 && !SERIAL_MPSC) || CHESTNUT
 	default y
 
 config FORCE
@@ -689,8 +719,52 @@
 
 config GT64260
 	bool
-	depends on EV64260
+	depends on EV64260 || CPCI690
 	default y
+
+config MV64360
+	bool
+	depends on KATANA
+	default y
+
+config MV64360
+	bool
+	depends on CHESTNUT
+  	default y
+
+config MV64X60
+	bool
+	depends on (GT64260 || MV64360)
+	default y
+
+menu "Set bridge options"
+	depends on MV64X60
+
+config NOT_COHERENT_CACHE
+	bool "Turn off Cache Coherency"
+	default n
+	help
+	  Some 64x60 bridges lock up when trying to enforce cache coherency.
+	  When this option is selected, cache coherency will be turned off.
+	  Note that this can cause other problems (e.g., stale data being
+	  speculatively loaded via a cached mapping).  Use at your own risk.
+
+config MV64X60_BASE
+	hex "Set bridge base used by firmware"
+	default "0xf1000000"
+	help
+	  A firmware can leave the base address of the bridge's registers at
+	  a non-standard location.  If so, set this value to reflect the
+	  address of that non-standard location.
+
+config MV64X60_NEW_BASE
+	hex "Set bridge base used by kernel"
+	default "0xf1000000"
+	help
+	  If the current base address of the bridge's registers is not where
+	  you want it, set this value to the address that you want it moved to.
+
+endmenu
 
 config NONMONARCH_SUPPORT
 	bool "Enable Non-Monarch Support"
diff -Nru a/arch/ppc/Makefile b/arch/ppc/Makefile
--- a/arch/ppc/Makefile	2005-01-10 20:11:16 -08:00
+++ b/arch/ppc/Makefile	2005-01-10 20:11:16 -08:00
@@ -42,6 +42,9 @@
 AFLAGS += $(cpu-as-y)
 CFLAGS += $(cpu-as-y)
 
+# Default to the common case.
+KBUILD_DEFCONFIG := common_defconfig
+
 head-y				:= arch/ppc/kernel/head.o
 head-$(CONFIG_8xx)		:= arch/ppc/kernel/head_8xx.o
 head-$(CONFIG_4xx)		:= arch/ppc/kernel/head_4xx.o
@@ -68,7 +71,7 @@
 
 .PHONY: $(BOOT_TARGETS)
 
-all: zImage
+all: uImage zImage
 
 CPPFLAGS_vmlinux.lds	:= -Upowerpc
 
diff -Nru a/arch/ppc/boot/include/mpsc_defs.h b/arch/ppc/boot/include/mpsc_defs.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/ppc/boot/include/mpsc_defs.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,146 @@
+/*
+ * drivers/serial/mpsc/mpsc_defs.h
+ *
+ * Register definitions for the Marvell Multi-Protocol Serial Controller (MPSC),
+ * Serial DMA Controller (SDMA), and Baud Rate Generator (BRG).
+ *
+ * Author: Mark A. Greer <mgreer@mvista.com>
+ *
+ * 2004 (c) MontaVista, Software, Inc.  This file is licensed under
+ * the terms of the GNU General Public License version 2.  This program
+ * is licensed "as is" without any warranty of any kind, whether express
+ * or implied.
+ */
+#ifndef	_PPC_BOOT_MPSC_DEFS_H__
+#define	_PPC_BOOT_MPSC_DEFS_H__
+
+#define	MPSC_NUM_CTLRS		2
+
+/*
+ *****************************************************************************
+ *
+ *	Multi-Protocol Serial Controller Interface Registers
+ *
+ *****************************************************************************
+ */
+
+/* Main Configuratino Register Offsets */
+#define	MPSC_MMCRL			0x0000
+#define	MPSC_MMCRH			0x0004
+#define	MPSC_MPCR			0x0008
+#define	MPSC_CHR_1			0x000c
+#define	MPSC_CHR_2			0x0010
+#define	MPSC_CHR_3			0x0014
+#define	MPSC_CHR_4			0x0018
+#define	MPSC_CHR_5			0x001c
+#define	MPSC_CHR_6			0x0020
+#define	MPSC_CHR_7			0x0024
+#define	MPSC_CHR_8			0x0028
+#define	MPSC_CHR_9			0x002c
+#define	MPSC_CHR_10			0x0030
+#define	MPSC_CHR_11			0x0034
+
+#define	MPSC_MPCR_CL_5			0
+#define	MPSC_MPCR_CL_6			1
+#define	MPSC_MPCR_CL_7			2
+#define	MPSC_MPCR_CL_8			3
+#define	MPSC_MPCR_SBL_1			0
+#define	MPSC_MPCR_SBL_2			3
+
+#define	MPSC_CHR_2_TEV			(1<<1)
+#define	MPSC_CHR_2_TA			(1<<7)
+#define	MPSC_CHR_2_TTCS			(1<<9)
+#define	MPSC_CHR_2_REV			(1<<17)
+#define	MPSC_CHR_2_RA			(1<<23)
+#define	MPSC_CHR_2_CRD			(1<<25)
+#define	MPSC_CHR_2_EH			(1<<31)
+#define	MPSC_CHR_2_PAR_ODD		0
+#define	MPSC_CHR_2_PAR_SPACE		1
+#define	MPSC_CHR_2_PAR_EVEN		2
+#define	MPSC_CHR_2_PAR_MARK		3
+
+/* MPSC Signal Routing */
+#define	MPSC_MRR			0x0000
+#define	MPSC_RCRR			0x0004
+#define	MPSC_TCRR			0x0008
+
+/*
+ *****************************************************************************
+ *
+ *	Serial DMA Controller Interface Registers
+ *
+ *****************************************************************************
+ */
+
+#define	SDMA_SDC			0x0000
+#define	SDMA_SDCM			0x0008
+#define	SDMA_RX_DESC			0x0800
+#define	SDMA_RX_BUF_PTR			0x0808
+#define	SDMA_SCRDP			0x0810
+#define	SDMA_TX_DESC			0x0c00
+#define	SDMA_SCTDP			0x0c10
+#define	SDMA_SFTDP			0x0c14
+
+#define	SDMA_DESC_CMDSTAT_PE		(1<<0)
+#define	SDMA_DESC_CMDSTAT_CDL		(1<<1)
+#define	SDMA_DESC_CMDSTAT_FR		(1<<3)
+#define	SDMA_DESC_CMDSTAT_OR		(1<<6)
+#define	SDMA_DESC_CMDSTAT_BR		(1<<9)
+#define	SDMA_DESC_CMDSTAT_MI		(1<<10)
+#define	SDMA_DESC_CMDSTAT_A		(1<<11)
+#define	SDMA_DESC_CMDSTAT_AM		(1<<12)
+#define	SDMA_DESC_CMDSTAT_CT		(1<<13)
+#define	SDMA_DESC_CMDSTAT_C		(1<<14)
+#define	SDMA_DESC_CMDSTAT_ES		(1<<15)
+#define	SDMA_DESC_CMDSTAT_L		(1<<16)
+#define	SDMA_DESC_CMDSTAT_F		(1<<17)
+#define	SDMA_DESC_CMDSTAT_P		(1<<18)
+#define	SDMA_DESC_CMDSTAT_EI		(1<<23)
+#define	SDMA_DESC_CMDSTAT_O		(1<<31)
+
+#define SDMA_DESC_DFLT			(SDMA_DESC_CMDSTAT_O |	\
+					SDMA_DESC_CMDSTAT_EI)
+
+#define	SDMA_SDC_RFT			(1<<0)
+#define	SDMA_SDC_SFM			(1<<1)
+#define	SDMA_SDC_BLMR			(1<<6)
+#define	SDMA_SDC_BLMT			(1<<7)
+#define	SDMA_SDC_POVR			(1<<8)
+#define	SDMA_SDC_RIFB			(1<<9)
+
+#define	SDMA_SDCM_ERD			(1<<7)
+#define	SDMA_SDCM_AR			(1<<15)
+#define	SDMA_SDCM_STD			(1<<16)
+#define	SDMA_SDCM_TXD			(1<<23)
+#define	SDMA_SDCM_AT			(1<<31)
+
+#define	SDMA_0_CAUSE_RXBUF		(1<<0)
+#define	SDMA_0_CAUSE_RXERR		(1<<1)
+#define	SDMA_0_CAUSE_TXBUF		(1<<2)
+#define	SDMA_0_CAUSE_TXEND		(1<<3)
+#define	SDMA_1_CAUSE_RXBUF		(1<<8)
+#define	SDMA_1_CAUSE_RXERR		(1<<9)
+#define	SDMA_1_CAUSE_TXBUF		(1<<10)
+#define	SDMA_1_CAUSE_TXEND		(1<<11)
+
+#define	SDMA_CAUSE_RX_MASK	(SDMA_0_CAUSE_RXBUF | SDMA_0_CAUSE_RXERR | \
+	SDMA_1_CAUSE_RXBUF | SDMA_1_CAUSE_RXERR)
+#define	SDMA_CAUSE_TX_MASK	(SDMA_0_CAUSE_TXBUF | SDMA_0_CAUSE_TXEND | \
+	SDMA_1_CAUSE_TXBUF | SDMA_1_CAUSE_TXEND)
+
+/* SDMA Interrupt registers */
+#define	SDMA_INTR_CAUSE			0x0000
+#define	SDMA_INTR_MASK			0x0080
+
+/*
+ *****************************************************************************
+ *
+ *	Baud Rate Generator Interface Registers
+ *
+ *****************************************************************************
+ */
+
+#define	BRG_BCR				0x0000
+#define	BRG_BTR				0x0004
+
+#endif /*_PPC_BOOT_MPSC_DEFS_H__ */
diff -Nru a/arch/ppc/boot/simple/Makefile b/arch/ppc/boot/simple/Makefile
--- a/arch/ppc/boot/simple/Makefile	2005-01-10 20:11:15 -08:00
+++ b/arch/ppc/boot/simple/Makefile	2005-01-10 20:11:15 -08:00
@@ -47,6 +47,12 @@
 # See arch/ppc/kconfig and arch/ppc/platforms/Kconfig
 # for definition of what platform each config option refer to.
 #----------------------------------------------------------------------------
+      zimage-$(CONFIG_CPCI690)		:= zImage-STRIPELF
+zimageinitrd-$(CONFIG_CPCI690)		:= zImage.initrd-STRIPELF
+     extra.o-$(CONFIG_CPCI690)		:= misc-cpci690.o mv64x60_stub.o
+         end-$(CONFIG_CPCI690)		:= cpci690
+   cacheflag-$(CONFIG_CPCI690)		:= -include $(clear_L2_L3)
+
       zimage-$(CONFIG_IBM_OPENBIOS)	:= zImage-TREE
 zimageinitrd-$(CONFIG_IBM_OPENBIOS)	:= zImage.initrd-TREE
          end-$(CONFIG_IBM_OPENBIOS)	:= treeboot
@@ -66,10 +72,13 @@
   entrypoint-$(CONFIG_OCOTEA)		:= 0x01000000
      extra.o-$(CONFIG_OCOTEA)		:= pibs.o
 
-     extra.o-$(CONFIG_EV64260)		:= direct.o misc-ev64260.o
+     extra.o-$(CONFIG_EV64260)		:= misc-ev64260.o
          end-$(CONFIG_EV64260)		:= ev64260
    cacheflag-$(CONFIG_EV64260)		:= -include $(clear_L2_L3)
 
+     extra.o-$(CONFIG_CHESTNUT)		:= misc-chestnut.o
+         end-$(CONFIG_CHESTNUT)		:= chestnut
+
       zimage-$(CONFIG_GEMINI)		:= zImage-STRIPELF
 zimageinitrd-$(CONFIG_GEMINI)		:= zImage.initrd-STRIPELF
          end-$(CONFIG_GEMINI)		:= gemini
@@ -78,6 +87,10 @@
          end-$(CONFIG_K2)		:= k2
    cacheflag-$(CONFIG_K2)		:= -include $(clear_L2_L3)
 
+     extra.o-$(CONFIG_KATANA)		:= misc-katana.o mv64x60_stub.o
+         end-$(CONFIG_KATANA)		:= katana
+   cacheflag-$(CONFIG_KATANA)		:= -include $(clear_L2_L3)
+
 # kconfig 'feature', only one of these will ever be 'y' at a time.
 # The rest will be unset.
 motorola := $(CONFIG_MCPN765)$(CONFIG_MVME5100)$(CONFIG_PRPMC750) \
@@ -143,6 +156,7 @@
 boot-$(CONFIG_8260)		+= embed_config.o
 boot-$(CONFIG_BSEIP)		+= iic.o
 boot-$(CONFIG_MBX)		+= iic.o pci.o qspan_pci.o
+boot-$(CONFIG_MV64X60)		+= misc-mv64x60.o
 boot-$(CONFIG_RPXCLASSIC)	+= iic.o pci.o qspan_pci.o
 boot-$(CONFIG_RPXLITE)		+= iic.o
 # Different boards need different serial implementations.
@@ -150,8 +164,8 @@
 boot-$(CONFIG_8xx)		+= m8xx_tty.o
 boot-$(CONFIG_8260)		+= m8260_tty.o
 endif
-boot-$(CONFIG_SERIAL_MPC52xx_CONSOLE) += mpc52xx_tty.o
-boot-$(CONFIG_GT64260_CONSOLE)	+= gt64260_tty.o
+boot-$(CONFIG_SERIAL_MPC52xx_CONSOLE)	+= mpc52xx_tty.o
+boot-$(CONFIG_SERIAL_MPSC_CONSOLE)	+= mv64x60_tty.o
 
 LIBS				:= $(common)/lib.a $(bootlib)/lib.a
 ifeq ($(CONFIG_PPC_PREP),y)
diff -Nru a/arch/ppc/boot/simple/gt64260_tty.c b/arch/ppc/boot/simple/gt64260_tty.c
--- a/arch/ppc/boot/simple/gt64260_tty.c	2005-01-10 20:11:18 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,322 +0,0 @@
-/*
- * arch/ppc/boot/simple/gt64260_tty.c
- *
- * Bootloader version of the embedded MPSC/UART driver for the GT64260[A].
- * Note: Due to 64260A errata, DMA will be used for UART input (via SDMA).
- *
- * Author: Mark A. Greer <mgreer@mvista.com>
- *
- * 2001 (c) MontaVista, Software, Inc.  This file is licensed under
- * the terms of the GNU General Public License version 2.  This program
- * is licensed "as is" without any warranty of any kind, whether express
- * or implied.
- */
-
-/* This code assumes that the data cache has been disabled (L1, L2, L3). */
-
-#include <linux/config.h>
-#include <linux/serialP.h>
-#include <linux/serial_reg.h>
-#include <asm/serial.h>
-#include <asm/gt64260_defs.h>
-
-extern void udelay(long);
-static void stop_dma(int chan);
-
-static u32	gt64260_base = EV64260_BRIDGE_REG_BASE; /* base addr of 64260 */
-
-inline unsigned
-gt64260_in_le32(volatile unsigned *addr)
-{
-	unsigned ret;
-
-	__asm__ __volatile__("lwbrx %0,0,%1; eieio" : "=r" (ret) :
-				     "r" (addr), "m" (*addr));
-	return ret;
-}
-
-inline void
-gt64260_out_le32(volatile unsigned *addr, int val)
-{
-	__asm__ __volatile__("stwbrx %1,0,%2; eieio" : "=m" (*addr) :
-				     "r" (val), "r" (addr));
-}
-
-#define GT64260_REG_READ(offs)						\
-	(gt64260_in_le32((volatile uint *)(gt64260_base + (offs))))
-#define GT64260_REG_WRITE(offs, d)					\
-        (gt64260_out_le32((volatile uint *)(gt64260_base + (offs)), (int)(d)))
-
-
-static struct {
-	u32	sdc;
-	u32	sdcm;
-	u32	rx_desc;
-	u32	rx_buf_ptr;
-	u32	scrdp;
-	u32	tx_desc;
-	u32	sctdp;
-	u32	sftdp;
-} sdma_regs;
-
-#define	SDMA_REGS_INIT(chan) {						\
-	sdma_regs.sdc        = GT64260_SDMA_##chan##_SDC;		\
-	sdma_regs.sdcm       = GT64260_SDMA_##chan##_SDCM;		\
-	sdma_regs.rx_desc    = GT64260_SDMA_##chan##_RX_DESC;		\
-	sdma_regs.rx_buf_ptr = GT64260_SDMA_##chan##_RX_BUF_PTR;	\
-	sdma_regs.scrdp      = GT64260_SDMA_##chan##_SCRDP;		\
-	sdma_regs.tx_desc    = GT64260_SDMA_##chan##_TX_DESC;		\
-	sdma_regs.sctdp      = GT64260_SDMA_##chan##_SCTDP;		\
-	sdma_regs.sftdp      = GT64260_SDMA_##chan##_SFTDP;		\
-}
-
-typedef struct {
-	volatile u16 bufsize;
-	volatile u16 bytecnt;
-	volatile u32 cmd_stat;
-	volatile u32 next_desc_ptr;
-	volatile u32 buffer;
-} gt64260_rx_desc_t;
-
-typedef struct {
-	volatile u16 bytecnt;
-	volatile u16 shadow;
-	volatile u32 cmd_stat;
-	volatile u32 next_desc_ptr;
-	volatile u32 buffer;
-} gt64260_tx_desc_t;
-
-#define	MAX_RESET_WAIT	10000
-#define	MAX_TX_WAIT	10000
-
-#define	RX_NUM_DESC	2
-#define	TX_NUM_DESC	2
-
-#define	RX_BUF_SIZE	16
-#define	TX_BUF_SIZE	16
-
-static gt64260_rx_desc_t rd[RX_NUM_DESC] __attribute__ ((aligned(32)));
-static gt64260_tx_desc_t td[TX_NUM_DESC] __attribute__ ((aligned(32)));
-
-static char rx_buf[RX_NUM_DESC * RX_BUF_SIZE] __attribute__ ((aligned(32)));
-static char tx_buf[TX_NUM_DESC * TX_BUF_SIZE] __attribute__ ((aligned(32)));
-
-static int cur_rd = 0;
-static int cur_td = 0;
-
-
-#define	RX_INIT_RDP(rdp) {						\
-	(rdp)->bufsize = 2;						\
-	(rdp)->bytecnt = 0;						\
-	(rdp)->cmd_stat = GT64260_SDMA_DESC_CMDSTAT_L |			\
-			  GT64260_SDMA_DESC_CMDSTAT_F |			\
-			  GT64260_SDMA_DESC_CMDSTAT_O;			\
-}
-
-unsigned long
-serial_init(int chan, void *ignored)
-{
-	u32	mpsc_adjust, sdma_adjust, brg_bcr;
-	int	i;
-
-	stop_dma(0);
-	stop_dma(1);
-
-	if (chan != 1) {
-		chan = 0;  /* default to chan 0 if anything but 1 */
-		mpsc_adjust = 0;
-		sdma_adjust = 0;
-		brg_bcr = GT64260_BRG_0_BCR;
-		SDMA_REGS_INIT(0);
-	}
-	else {
-		mpsc_adjust = 0x1000;
-		sdma_adjust = 0x2000;
-		brg_bcr = GT64260_BRG_1_BCR;
-		SDMA_REGS_INIT(1);
-	}
-
-	/* Set up ring buffers */
-	for (i=0; i<RX_NUM_DESC; i++) {
-		RX_INIT_RDP(&rd[i]);
-		rd[i].buffer = (u32)&rx_buf[i * RX_BUF_SIZE];
-		rd[i].next_desc_ptr = (u32)&rd[i+1];
-	}
-	rd[RX_NUM_DESC - 1].next_desc_ptr = (u32)&rd[0];
-
-	for (i=0; i<TX_NUM_DESC; i++) {
-		td[i].bytecnt = 0;
-		td[i].shadow = 0;
-		td[i].buffer = (u32)&tx_buf[i * TX_BUF_SIZE];
-		td[i].cmd_stat = GT64260_SDMA_DESC_CMDSTAT_F |
-				 GT64260_SDMA_DESC_CMDSTAT_L;
-		td[i].next_desc_ptr = (u32)&td[i+1];
-	}
-	td[TX_NUM_DESC - 1].next_desc_ptr = (u32)&td[0];
-
-	/* Set MPSC Routing */
-        GT64260_REG_WRITE(GT64260_MPSC_MRR, 0x3ffffe38);
-        GT64260_REG_WRITE(GT64260_MPP_SERIAL_PORTS_MULTIPLEX, 0x00001102);
-
-	/* MPSC 0/1 Rx & Tx get clocks BRG0/1 */
-        GT64260_REG_WRITE(GT64260_MPSC_RCRR, 0x00000100);
-        GT64260_REG_WRITE(GT64260_MPSC_TCRR, 0x00000100);
-
-	/* clear pending interrupts */
-        GT64260_REG_WRITE(GT64260_SDMA_INTR_MASK, 0);
-
-	GT64260_REG_WRITE(GT64260_SDMA_0_SCRDP + sdma_adjust, &rd[0]);
-	GT64260_REG_WRITE(GT64260_SDMA_0_SCTDP + sdma_adjust,
-		&td[TX_NUM_DESC - 1]);
-	GT64260_REG_WRITE(GT64260_SDMA_0_SFTDP + sdma_adjust,
-		&td[TX_NUM_DESC - 1]);
-
-	GT64260_REG_WRITE(GT64260_SDMA_0_SDC + sdma_adjust,
-			  GT64260_SDMA_SDC_RFT | GT64260_SDMA_SDC_SFM |
-			  GT64260_SDMA_SDC_BLMR | GT64260_SDMA_SDC_BLMT |
-			  (3 << 12));
-
-	/* Set BRG to generate proper baud rate */
-	GT64260_REG_WRITE(brg_bcr, ((8 << 18) | (1 << 16) | 36));
-
-	/* Put MPSC into UART mode, no null modem, 16x clock mode */
-	GT64260_REG_WRITE(GT64260_MPSC_0_MMCRL + mpsc_adjust, 0x000004c4);
-	GT64260_REG_WRITE(GT64260_MPSC_0_MMCRH + mpsc_adjust, 0x04400400);
-
-        GT64260_REG_WRITE(GT64260_MPSC_0_CHR_1 + mpsc_adjust, 0);
-        GT64260_REG_WRITE(GT64260_MPSC_0_CHR_9 + mpsc_adjust, 0);
-        GT64260_REG_WRITE(GT64260_MPSC_0_CHR_10 + mpsc_adjust, 0);
-        GT64260_REG_WRITE(GT64260_MPSC_0_CHR_3 + mpsc_adjust, 4);
-        GT64260_REG_WRITE(GT64260_MPSC_0_CHR_4 + mpsc_adjust, 0);
-        GT64260_REG_WRITE(GT64260_MPSC_0_CHR_5 + mpsc_adjust, 0);
-        GT64260_REG_WRITE(GT64260_MPSC_0_CHR_6 + mpsc_adjust, 0);
-        GT64260_REG_WRITE(GT64260_MPSC_0_CHR_7 + mpsc_adjust, 0);
-        GT64260_REG_WRITE(GT64260_MPSC_0_CHR_8 + mpsc_adjust, 0);
-
-	/* 8 data bits, 1 stop bit */
-	GT64260_REG_WRITE(GT64260_MPSC_0_MPCR + mpsc_adjust, (3 << 12));
-
-	GT64260_REG_WRITE(GT64260_SDMA_0_SDCM + sdma_adjust,
-		GT64260_SDMA_SDCM_ERD);
-
-	GT64260_REG_WRITE(GT64260_MPSC_0_CHR_2 + sdma_adjust,
-		GT64260_MPSC_UART_CR_EH);
-
-	udelay(100);
-
-	return (ulong)chan;
-}
-
-static void
-stop_dma(int chan)
-{
-	u32	sdma_sdcm = GT64260_SDMA_0_SDCM;
-	int	i;
-
-	if (chan == 1) {
-		sdma_sdcm = GT64260_SDMA_1_SDCM;
-	}
-
-	/* Abort SDMA Rx, Tx */
-	GT64260_REG_WRITE(sdma_sdcm,
-		GT64260_SDMA_SDCM_AR | GT64260_SDMA_SDCM_STD);
-
-	for (i=0; i<MAX_RESET_WAIT; i++) {
-		if ((GT64260_REG_READ(sdma_sdcm) & (GT64260_SDMA_SDCM_AR |
-					GT64260_SDMA_SDCM_AT)) == 0) break;
-		udelay(100);
-	}
-
-	return;
-}
-
-static int
-wait_for_ownership(void)
-{
-	int	i;
-
-	for (i=0; i<MAX_TX_WAIT; i++) {
-		if ((GT64260_REG_READ(sdma_regs.sdcm) &
-					GT64260_SDMA_SDCM_TXD) == 0) break;
-		udelay(1000);
-	}
-
-	return (i < MAX_TX_WAIT);
-}
-
-void
-serial_putc(unsigned long com_port, unsigned char c)
-{
-	gt64260_tx_desc_t	*tdp;
-
-	if (wait_for_ownership() == 0) return;
-
-	tdp = &td[cur_td];
-	if (++cur_td >= TX_NUM_DESC) cur_td = 0;
-
-	*(unchar *)(tdp->buffer ^ 7) = c;
-	tdp->bytecnt = 1;
-	tdp->shadow = 1;
-	tdp->cmd_stat = GT64260_SDMA_DESC_CMDSTAT_L |
-		GT64260_SDMA_DESC_CMDSTAT_F | GT64260_SDMA_DESC_CMDSTAT_O;
-
-	GT64260_REG_WRITE(sdma_regs.sctdp, tdp);
-	GT64260_REG_WRITE(sdma_regs.sftdp, tdp);
-	GT64260_REG_WRITE(sdma_regs.sdcm,
-		GT64260_REG_READ(sdma_regs.sdcm) | GT64260_SDMA_SDCM_TXD);
-
-	return;
-}
-
-unsigned char
-serial_getc(unsigned long com_port)
-{
-	gt64260_rx_desc_t	*rdp;
-	unchar			c = '\0';
-
-	rdp = &rd[cur_rd];
-
-	if ((rdp->cmd_stat & (GT64260_SDMA_DESC_CMDSTAT_O |
-			      GT64260_SDMA_DESC_CMDSTAT_ES)) == 0) {
-		c = *(unchar *)(rdp->buffer ^ 7);
-		RX_INIT_RDP(rdp);
-		if (++cur_rd >= RX_NUM_DESC) cur_rd = 0;
-	}
-
-	return c;
-}
-
-int
-serial_tstc(unsigned long com_port)
-{
-	gt64260_rx_desc_t	*rdp;
-	int			loop_count = 0;
-	int			rc = 0;
-
-	rdp = &rd[cur_rd];
-
-	/* Go thru rcv desc's until empty looking for one with data (no error)*/
-	while (((rdp->cmd_stat & GT64260_SDMA_DESC_CMDSTAT_O) == 0) &&
-	       (loop_count++ < RX_NUM_DESC)) {
-
-		/* If there was an error, reinit the desc & continue */
-		if ((rdp->cmd_stat & GT64260_SDMA_DESC_CMDSTAT_ES) != 0) {
-			RX_INIT_RDP(rdp);
-			if (++cur_rd >= RX_NUM_DESC) cur_rd = 0;
-			rdp = (gt64260_rx_desc_t *)rdp->next_desc_ptr;
-		}
-		else {
-			rc = 1;
-			break;
-		}
-	}
-
-	return rc;
-}
-
-void
-serial_close(unsigned long com_port)
-{
-	stop_dma(com_port);
-	return;
-}
diff -Nru a/arch/ppc/boot/simple/head.S b/arch/ppc/boot/simple/head.S
--- a/arch/ppc/boot/simple/head.S	2005-01-10 20:11:20 -08:00
+++ b/arch/ppc/boot/simple/head.S	2005-01-10 20:11:20 -08:00
@@ -135,9 +135,9 @@
 			 */
 #endif
 
-#ifdef	CONFIG_EV64260
-	/* Move 64260's base regs & CS window for external UART */
-	bl	ev64260_init
+#ifdef	CONFIG_MV64X60
+	/* mv64x60 specific hook to do things like moving register base, etc. */
+	bl	mv64x60_init
 #endif
 
 	/* Get the load address.
diff -Nru a/arch/ppc/boot/simple/misc-chestnut.S b/arch/ppc/boot/simple/misc-chestnut.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/ppc/boot/simple/misc-chestnut.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,41 @@
+/*
+ * arch/ppc/boot/simple/misc-chestnut.S
+ *
+ * Setup for the IBM Chestnut (ibm-750fxgx_eval)
+ *
+ * Author: <source@mvista.com>
+ *
+ * <2004> (c) MontaVista Software, Inc. This file is licensed under
+ * the terms of the GNU General Public License version 2. This program
+ * is licensed "as is" without any warranty of any kind, whether express
+ * or implied.
+ */
+
+
+#include <asm/ppc_asm.h>
+#include <asm/mv64x60_defs.h>
+#include <platforms/chestnut.h>
+
+	.globl	mv64x60_board_init
+mv64x60_board_init:
+	/*
+	 * move UART to 0xffc00000
+	 */
+
+	li      r23,16
+
+	addis	r25,0,CONFIG_MV64X60_BASE@h
+	ori     r25,r25,MV64x60_CPU2DEV_2_BASE
+	addis   r26,0,CHESTNUT_UART_BASE@h
+	srw     r26,r26,r23
+	stwbrx  r26,0,(r25)
+	sync
+
+	addis	r25,0,CONFIG_MV64X60_BASE@h
+	ori     r25,r25,MV64x60_CPU2DEV_2_SIZE
+	addis   r26,0,0x00100000@h
+	srw     r26,r26,r23
+	stwbrx  r26,0,(r25)
+	sync
+
+	blr
diff -Nru a/arch/ppc/boot/simple/misc-cpci690.c b/arch/ppc/boot/simple/misc-cpci690.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/ppc/boot/simple/misc-cpci690.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,15 @@
+/*
+ * arch/ppc/boot/simple/misc-cpci690.c
+ *
+ * Add birec data for Force CPCI690 board.
+ *
+ * Author: Mark A. Greer <source@mvista.com>
+ *
+ * 2003 (c) MontaVista Software, Inc.  This file is licensed under
+ * the terms of the GNU General Public License version 2.  This program
+ * is licensed "as is" without any warranty of any kind, whether express
+ * or implied.
+ */
+
+#include <linux/types.h>
+long	mv64x60_mpsc_clk_freq = 133000000;
diff -Nru a/arch/ppc/boot/simple/misc-ev64260.S b/arch/ppc/boot/simple/misc-ev64260.S
--- a/arch/ppc/boot/simple/misc-ev64260.S	2005-01-10 20:11:23 -08:00
+++ b/arch/ppc/boot/simple/misc-ev64260.S	2005-01-10 20:11:23 -08:00
@@ -6,55 +6,65 @@
  *
  * Author: Mark Greer <mgreer@mvista.com>
  *
- * 2001 (c) MontaVista, Software, Inc.  This file is licensed under
- * the terms of the GNU General Public License version 2.  This program
- * is licensed "as is" without any warranty of any kind, whether express
- * or implied.
+ * Copyright 2001 MontaVista Software Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
  */
 
 #include <asm/ppc_asm.h>
+#include <asm/processor.h>
 #include <asm/cache.h>
-#include <asm/gt64260_defs.h>
-
+#include <asm/mv64x60_defs.h>
 #include <platforms/ev64260.h>
 
-	.globl	ev64260_init
-ev64260_init:
-	li	r20,0
+	.globl	mv64x60_board_init
+mv64x60_board_init:
+	/* DINK doesn't enable 745x timebase, so enable here (Adrian Cox) */
+	mfspr	r25,PVR
+	srwi	r25,r25,16
+	cmplwi	r25,(PVR_7450 >> 16)
+	bne	1f
+	mfspr	r25,HID0
+	oris	r25,r25,(HID0_TBEN >> 16)
+	mtspr	HID0,r25
+1:
+#if (CONFIG_MV64X60_NEW_BASE != CONFIG_MV64X60_BASE)
 	li	r23,20
 
-	/* Relocate galileo's regs */
-        addis	r25,0,GT64260_INTERNAL_SPACE_DEFAULT_ADDR@h
-        ori	r25,r25,GT64260_INTERNAL_SPACE_DECODE
-        lwbrx	r26,0,(r25)
-	lis	r24,0xffff
-	and	r26,r26,r24
-	addis	r24,0,EV64260_BRIDGE_REG_BASE@h
-	srw	r24,r24,r23
-	or	r26,r26,r24
-        stwbrx  r26,0,(r25)
-	sync
-
-	/* Wait for write to take effect */
-        addis	r25,0,EV64260_BRIDGE_REG_BASE@h
-	ori	r25,r25,GT64260_INTERNAL_SPACE_DECODE
-1:	lwbrx	r24,0,(r25)
-	cmpw	r24,r26
-	bne	1b
-
-        /* Change CS2 (UARTS on device module) window */
-        addis	r25,0,EV64260_BRIDGE_REG_BASE@h
-        ori	r25,r25,GT64260_CPU_CS_DECODE_2_BOT
+	/*
+	 * Change the CS2 window for the UART so that the bootloader
+	 * can do I/O thru the UARTs.
+	 */
+	addis	r25,0,CONFIG_MV64X60_NEW_BASE@h
+	ori	r25,r25,MV64x60_CPU2DEV_2_BASE
 	addis	r26,0,EV64260_UART_BASE@h
 	srw	r26,r26,r23
-        stwbrx  r26,0,(r25)
+	stwbrx	r26,0,(r25)
 	sync
 
-        addis	r25,0,EV64260_BRIDGE_REG_BASE@h
-        ori	r25,r25,GT64260_CPU_CS_DECODE_2_TOP
+	addis	r25,0,CONFIG_MV64X60_NEW_BASE@h
+	ori	r25,r25,MV64x60_CPU2DEV_2_SIZE
 	addis	r26,0,EV64260_UART_END@h
 	srw	r26,r26,r23
-        stwbrx  r26,0,(r25)
+	stwbrx	r26,0,(r25)
 	sync
+#endif
+	blr
 
-        blr
+#if defined(CONFIG_SERIAL_MPSC_CONSOLE)
+.data
+	.globl	mv64x60_console_baud
+mv64x60_console_baud:
+.long	EV64260_DEFAULT_BAUD
+
+	.globl	mv64x60_mpsc_clk_src
+mv64x60_mpsc_clk_src:
+.long	EV64260_MPSC_CLK_SRC
+
+	.globl	mv64x60_mpsc_clk_freq
+mv64x60_mpsc_clk_freq:
+.long	EV64260_MPSC_CLK_FREQ
+#endif
diff -Nru a/arch/ppc/boot/simple/misc-katana.c b/arch/ppc/boot/simple/misc-katana.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/ppc/boot/simple/misc-katana.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,15 @@
+/*
+ * arch/ppc/boot/simple/misc-katana.c
+ *
+ * Add birec data for Artesyn KATANA board.
+ *
+ * Author: Mark A. Greer <source@mvista.com>
+ *
+ * 2004 (c) MontaVista Software, Inc. This file is licensed under
+ * the terms of the GNU General Public License version 2. This program
+ * is licensed "as is" without any warranty of any kind, whether express
+ * or implied.
+ */
+
+#include <linux/types.h>
+long	mv64x60_mpsc_clk_freq = 133333333;
diff -Nru a/arch/ppc/boot/simple/misc-mv64x60.S b/arch/ppc/boot/simple/misc-mv64x60.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/ppc/boot/simple/misc-mv64x60.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,57 @@
+/*
+ * arch/ppc/boot/simple/misc-mv64x60.S
+ *
+ * Code to change the base address of the host bridges and call board specific
+ * init routine.
+ *
+ * Author: Mark Greer <mgreer@mvista.com>
+ *
+ * 2002 (c) MontaVista, Software, Inc.  This file is licensed under the terms
+ * of the GNU General Public License version 2.  This program is licensed
+ * "as is" without any warranty of any kind, whether express or implied.
+ */
+
+#include <linux/config.h>
+#include <asm/ppc_asm.h>
+#include <asm/processor.h>
+#include <asm/cache.h>
+#include <asm/mv64x60_defs.h>
+
+	.globl	mv64x60_init
+mv64x60_init:
+	mflr	r27
+
+#if (CONFIG_MV64X60_NEW_BASE != CONFIG_MV64X60_BASE)
+	bl	move_base
+#endif
+	bl	mv64x60_board_init
+
+	mtlr	r27
+	blr
+
+#if (CONFIG_MV64X60_NEW_BASE != CONFIG_MV64X60_BASE)
+move_base:
+	li	r20,0
+	li	r23,20
+
+	/* Relocate bridge's regs */
+	addis	r25,0,CONFIG_MV64X60_BASE@h
+	ori	r25,r25,MV64x60_INTERNAL_SPACE_DECODE
+	lwbrx	r26,0,(r25)
+	lis	r24,0xffff
+	and	r26,r26,r24
+	addis	r24,0,CONFIG_MV64X60_NEW_BASE@h
+	srw	r24,r24,r23
+	or	r26,r26,r24
+	stwbrx	r26,0,(r25)
+	sync
+
+	/* Wait for write to take effect */
+	addis	r25,0,CONFIG_MV64X60_NEW_BASE@h
+	ori	r25,r25,MV64x60_INTERNAL_SPACE_DECODE
+1:	lwbrx	r24,0,(r25)
+	cmpw	r24,r26
+	bne	1b
+
+	blr
+#endif
diff -Nru a/arch/ppc/boot/simple/misc.c b/arch/ppc/boot/simple/misc.c
--- a/arch/ppc/boot/simple/misc.c	2005-01-10 20:11:21 -08:00
+++ b/arch/ppc/boot/simple/misc.c	2005-01-10 20:11:21 -08:00
@@ -102,7 +102,7 @@
 	com_port = serial_init(0, NULL);
 #endif
 
-#ifdef CONFIG_44x
+#if defined(CONFIG_44x) && defined(PPC44x_EMAC0_MR0)
 	/* Reset MAL */
 	mtdcr(DCRN_MALCR(DCRN_MAL_BASE), MALCR_MMSR);
 	/* Wait for reset */
diff -Nru a/arch/ppc/boot/simple/mv64x60_stub.c b/arch/ppc/boot/simple/mv64x60_stub.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/ppc/boot/simple/mv64x60_stub.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,24 @@
+/*
+ * arch/ppc/boot/simple/mv64x60_stub.c
+ *
+ * Stub for board_init() routine called from mv64x60_init().
+ *
+ * Author: Mark A. Greer <mgreer@mvista.com>
+ *
+ * 2002 (c) MontaVista, Software, Inc.  This file is licensed under the terms
+ * of the GNU General Public License version 2.  This program is licensed
+ * "as is" without any warranty of any kind, whether express or implied.
+ */
+
+#include <linux/config.h>
+
+#if defined(CONFIG_SERIAL_MPSC_CONSOLE)
+long __attribute__ ((weak))	mv64x60_console_baud = 9600;
+long __attribute__ ((weak))	mv64x60_mpsc_clk_src = 8; /* TCLK */
+long __attribute__ ((weak))	mv64x60_mpsc_clk_freq = 100000000;
+#endif
+
+void __attribute__ ((weak))
+mv64x60_board_init(void)
+{
+}
diff -Nru a/arch/ppc/boot/simple/mv64x60_tty.c b/arch/ppc/boot/simple/mv64x60_tty.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/ppc/boot/simple/mv64x60_tty.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,386 @@
+/*
+ * arch/ppc/boot/simple/mv64x60_tty.c
+ *
+ * Bootloader version of the embedded MPSC/UART driver for the Marvell 64x60.
+ * Note: Due to a GT64260A erratum, DMA will be used for UART input (via SDMA).
+ *
+ * Author: Mark A. Greer <mgreer@mvista.com>
+ *
+ * Copyright 2001 MontaVista Software Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ */
+
+/* This code assumes that the data cache has been disabled (L1, L2, L3). */
+
+#include <linux/config.h>
+#include <linux/types.h>
+#include <linux/serial_reg.h>
+#include <asm/serial.h>
+#include <asm/mv64x60_defs.h>
+#include <mpsc_defs.h>
+
+extern void udelay(long);
+static void stop_dma(int chan);
+
+static u32	mv64x60_base = CONFIG_MV64X60_NEW_BASE;
+
+inline unsigned
+mv64x60_in_le32(volatile unsigned *addr)
+{
+	unsigned ret;
+
+	__asm__ __volatile__("lwbrx %0,0,%1; eieio" : "=r" (ret) :
+				"r" (addr), "m" (*addr));
+	return ret;
+}
+
+inline void
+mv64x60_out_le32(volatile unsigned *addr, int val)
+{
+	__asm__ __volatile__("stwbrx %1,0,%2; eieio" : "=m" (*addr) :
+				"r" (val), "r" (addr));
+}
+
+#define MV64x60_REG_READ(offs)						\
+	(mv64x60_in_le32((volatile uint *)(mv64x60_base + (offs))))
+#define MV64x60_REG_WRITE(offs, d)					\
+	(mv64x60_out_le32((volatile uint *)(mv64x60_base + (offs)), (int)(d)))
+
+
+struct sdma_regs {
+	u32	sdc;
+	u32	sdcm;
+	u32	rx_desc;
+	u32	rx_buf_ptr;
+	u32	scrdp;
+	u32	tx_desc;
+	u32	sctdp;
+	u32	sftdp;
+};
+
+static struct sdma_regs	sdma_regs[2];
+
+#define	SDMA_REGS_INIT(s, reg_base) {			\
+	(s)->sdc	= (reg_base) + SDMA_SDC;	\
+	(s)->sdcm	= (reg_base) + SDMA_SDCM;	\
+	(s)->rx_desc	= (reg_base) + SDMA_RX_DESC;	\
+	(s)->rx_buf_ptr = (reg_base) + SDMA_RX_BUF_PTR;	\
+	(s)->scrdp	= (reg_base) + SDMA_SCRDP;	\
+	(s)->tx_desc	= (reg_base) + SDMA_TX_DESC;	\
+	(s)->sctdp	= (reg_base) + SDMA_SCTDP;	\
+	(s)->sftdp	= (reg_base) + SDMA_SFTDP;	\
+}
+
+static u32	mpsc_base[2] = { MV64x60_MPSC_0_OFFSET, MV64x60_MPSC_1_OFFSET };
+
+struct mv64x60_rx_desc {
+	u16	bufsize;
+	u16	bytecnt;
+	u32	cmd_stat;
+	u32	next_desc_ptr;
+	u32	buffer;
+};
+
+struct mv64x60_tx_desc {
+	u16	bytecnt;
+	u16	shadow;
+	u32	cmd_stat;
+	u32	next_desc_ptr;
+	u32	buffer;
+};
+
+#define	MAX_RESET_WAIT	10000
+#define	MAX_TX_WAIT	10000
+
+#define	RX_NUM_DESC	2
+#define	TX_NUM_DESC	2
+
+#define	RX_BUF_SIZE	32
+#define	TX_BUF_SIZE	32
+
+static struct mv64x60_rx_desc rd[2][RX_NUM_DESC] __attribute__ ((aligned(32)));
+static struct mv64x60_tx_desc td[2][TX_NUM_DESC] __attribute__ ((aligned(32)));
+
+static char rx_buf[2][RX_NUM_DESC * RX_BUF_SIZE] __attribute__ ((aligned(32)));
+static char tx_buf[2][TX_NUM_DESC * TX_BUF_SIZE] __attribute__ ((aligned(32)));
+
+static int cur_rd[2] = { 0, 0 };
+static int cur_td[2] = { 0, 0 };
+
+static char chan_initialized[2] = { 0, 0 };
+
+
+#define	RX_INIT_RDP(rdp) {			\
+	(rdp)->bufsize = 2;			\
+	(rdp)->bytecnt = 0;			\
+	(rdp)->cmd_stat = SDMA_DESC_CMDSTAT_L | SDMA_DESC_CMDSTAT_F |	\
+		SDMA_DESC_CMDSTAT_O;	\
+}
+
+#ifdef CONFIG_MV64360
+static u32 cpu2mem_tab[MV64x60_CPU2MEM_WINDOWS][2] = {
+		{ MV64x60_CPU2MEM_0_BASE, MV64x60_CPU2MEM_0_SIZE },
+		{ MV64x60_CPU2MEM_1_BASE, MV64x60_CPU2MEM_1_SIZE },
+		{ MV64x60_CPU2MEM_2_BASE, MV64x60_CPU2MEM_2_SIZE },
+		{ MV64x60_CPU2MEM_3_BASE, MV64x60_CPU2MEM_3_SIZE }
+};
+
+static u32 com2mem_tab[MV64x60_CPU2MEM_WINDOWS][2] = {
+		{ MV64360_MPSC2MEM_0_BASE, MV64360_MPSC2MEM_0_SIZE },
+		{ MV64360_MPSC2MEM_1_BASE, MV64360_MPSC2MEM_1_SIZE },
+		{ MV64360_MPSC2MEM_2_BASE, MV64360_MPSC2MEM_2_SIZE },
+		{ MV64360_MPSC2MEM_3_BASE, MV64360_MPSC2MEM_3_SIZE }
+};
+
+static u32 dram_selects[MV64x60_CPU2MEM_WINDOWS] = { 0xe, 0xd, 0xb, 0x7 };
+#endif
+
+unsigned long
+serial_init(int chan, void *ignored)
+{
+	u32		mpsc_routing_base, sdma_base, brg_bcr, cdv;
+	int		i;
+	extern long	mv64x60_console_baud;
+	extern long	mv64x60_mpsc_clk_src;
+	extern long	mv64x60_mpsc_clk_freq;
+
+	chan = (chan == 1); /* default to chan 0 if anything but 1 */
+
+	if (chan_initialized[chan])
+		return chan;
+
+	chan_initialized[chan] = 1;
+
+	if (chan == 0) {
+		sdma_base = MV64x60_SDMA_0_OFFSET;
+		brg_bcr = MV64x60_BRG_0_OFFSET + BRG_BCR;
+		SDMA_REGS_INIT(&sdma_regs[0], MV64x60_SDMA_0_OFFSET);
+	}
+	else {
+		sdma_base = MV64x60_SDMA_1_OFFSET;
+		brg_bcr = MV64x60_BRG_1_OFFSET + BRG_BCR;
+		SDMA_REGS_INIT(&sdma_regs[0], MV64x60_SDMA_1_OFFSET);
+	}
+
+	mpsc_routing_base = MV64x60_MPSC_ROUTING_OFFSET;
+
+	stop_dma(chan);
+
+	/* Set up ring buffers */
+	for (i=0; i<RX_NUM_DESC; i++) {
+		RX_INIT_RDP(&rd[chan][i]);
+		rd[chan][i].buffer = (u32)&rx_buf[chan][i * RX_BUF_SIZE];
+		rd[chan][i].next_desc_ptr = (u32)&rd[chan][i+1];
+	}
+	rd[chan][RX_NUM_DESC - 1].next_desc_ptr = (u32)&rd[chan][0];
+
+	for (i=0; i<TX_NUM_DESC; i++) {
+		td[chan][i].bytecnt = 0;
+		td[chan][i].shadow = 0;
+		td[chan][i].buffer = (u32)&tx_buf[chan][i * TX_BUF_SIZE];
+		td[chan][i].cmd_stat = SDMA_DESC_CMDSTAT_F|SDMA_DESC_CMDSTAT_L;
+		td[chan][i].next_desc_ptr = (u32)&td[chan][i+1];
+	}
+	td[chan][TX_NUM_DESC - 1].next_desc_ptr = (u32)&td[chan][0];
+
+	/* Set MPSC Routing */
+	MV64x60_REG_WRITE(mpsc_routing_base + MPSC_MRR, 0x3ffffe38);
+
+#ifdef CONFIG_GT64260
+	MV64x60_REG_WRITE(GT64260_MPP_SERIAL_PORTS_MULTIPLEX, 0x00001102);
+#else /* Must be MV64360 or MV64460 */
+	{
+	u32	enables, prot_bits, v;
+
+	/* Set up comm unit to memory mapping windows */
+	/* Note: Assumes MV64x60_CPU2MEM_WINDOWS == 4 */
+
+	enables = MV64x60_REG_READ(MV64360_CPU_BAR_ENABLE) & 0xf;
+	prot_bits = 0;
+
+	for (i=0; i<MV64x60_CPU2MEM_WINDOWS; i++) {
+		if (!(enables & (1 << i))) {
+			v = MV64x60_REG_READ(cpu2mem_tab[i][0]);
+			v = ((v & 0xffff) << 16) | (dram_selects[i] << 8);
+			MV64x60_REG_WRITE(com2mem_tab[i][0], v);
+
+			v = MV64x60_REG_READ(cpu2mem_tab[i][1]);
+			v = (v & 0xffff) << 16;
+			MV64x60_REG_WRITE(com2mem_tab[i][1], v);
+
+			prot_bits |= (0x3 << (i << 1)); /* r/w access */
+		}
+	}
+
+	MV64x60_REG_WRITE(MV64360_MPSC_0_REMAP, 0);
+	MV64x60_REG_WRITE(MV64360_MPSC_1_REMAP, 0);
+	MV64x60_REG_WRITE(MV64360_MPSC2MEM_ACC_PROT_0, prot_bits);
+	MV64x60_REG_WRITE(MV64360_MPSC2MEM_ACC_PROT_1, prot_bits);
+	MV64x60_REG_WRITE(MV64360_MPSC2MEM_BAR_ENABLE, enables);
+	}
+#endif
+
+	/* MPSC 0/1 Rx & Tx get clocks BRG0/1 */
+	MV64x60_REG_WRITE(mpsc_routing_base + MPSC_RCRR, 0x00000100);
+	MV64x60_REG_WRITE(mpsc_routing_base + MPSC_TCRR, 0x00000100);
+
+	/* clear pending interrupts */
+	MV64x60_REG_WRITE(MV64x60_SDMA_INTR_OFFSET + SDMA_INTR_MASK, 0);
+
+	MV64x60_REG_WRITE(SDMA_SCRDP + sdma_base, &rd[chan][0]);
+	MV64x60_REG_WRITE(SDMA_SCTDP + sdma_base, &td[chan][TX_NUM_DESC - 1]);
+	MV64x60_REG_WRITE(SDMA_SFTDP + sdma_base, &td[chan][TX_NUM_DESC - 1]);
+
+	MV64x60_REG_WRITE(SDMA_SDC + sdma_base,
+		SDMA_SDC_RFT | SDMA_SDC_SFM | SDMA_SDC_BLMR | SDMA_SDC_BLMT |
+		(3 << 12));
+
+	cdv = ((mv64x60_mpsc_clk_freq/(32*mv64x60_console_baud))-1);
+	MV64x60_REG_WRITE(brg_bcr,
+		((mv64x60_mpsc_clk_src << 18) | (1 << 16) | cdv));
+
+	/* Put MPSC into UART mode, no null modem, 16x clock mode */
+	MV64x60_REG_WRITE(MPSC_MMCRL + mpsc_base[chan], 0x000004c4);
+	MV64x60_REG_WRITE(MPSC_MMCRH + mpsc_base[chan], 0x04400400);
+
+	MV64x60_REG_WRITE(MPSC_CHR_1 + mpsc_base[chan], 0);
+	MV64x60_REG_WRITE(MPSC_CHR_9 + mpsc_base[chan], 0);
+	MV64x60_REG_WRITE(MPSC_CHR_10 + mpsc_base[chan], 0);
+	MV64x60_REG_WRITE(MPSC_CHR_3 + mpsc_base[chan], 4);
+	MV64x60_REG_WRITE(MPSC_CHR_4 + mpsc_base[chan], 0);
+	MV64x60_REG_WRITE(MPSC_CHR_5 + mpsc_base[chan], 0);
+	MV64x60_REG_WRITE(MPSC_CHR_6 + mpsc_base[chan], 0);
+	MV64x60_REG_WRITE(MPSC_CHR_7 + mpsc_base[chan], 0);
+	MV64x60_REG_WRITE(MPSC_CHR_8 + mpsc_base[chan], 0);
+
+	/* 8 data bits, 1 stop bit */
+	MV64x60_REG_WRITE(MPSC_MPCR + mpsc_base[chan], (3 << 12));
+	MV64x60_REG_WRITE(SDMA_SDCM + sdma_base, SDMA_SDCM_ERD);
+	MV64x60_REG_WRITE(MPSC_CHR_2 + mpsc_base[chan], MPSC_CHR_2_EH);
+
+	udelay(100);
+
+	return chan;
+}
+
+static void
+stop_dma(int chan)
+{
+	int	i;
+
+	/* Abort MPSC Rx (aborting Tx messes things up) */
+	MV64x60_REG_WRITE(MPSC_CHR_2 + mpsc_base[chan], MPSC_CHR_2_RA);
+
+	/* Abort SDMA Rx, Tx */
+	MV64x60_REG_WRITE(sdma_regs[chan].sdcm, SDMA_SDCM_AR | SDMA_SDCM_STD);
+
+	for (i=0; i<MAX_RESET_WAIT; i++) {
+		if ((MV64x60_REG_READ(sdma_regs[chan].sdcm) &
+				(SDMA_SDCM_AR | SDMA_SDCM_AT)) == 0)
+			break;
+
+		udelay(100);
+	}
+
+	return;
+}
+
+static int
+wait_for_ownership(int chan)
+{
+	int	i;
+
+	for (i=0; i<MAX_TX_WAIT; i++) {
+		if ((MV64x60_REG_READ(sdma_regs[chan].sdcm) &
+				SDMA_SDCM_TXD) == 0)
+			break;
+
+		udelay(1000);
+	}
+
+	return (i < MAX_TX_WAIT);
+}
+
+void
+serial_putc(unsigned long com_port, unsigned char c)
+{
+	struct mv64x60_tx_desc	*tdp;
+
+	if (wait_for_ownership(com_port) == 0)
+		return;
+
+	tdp = &td[com_port][cur_td[com_port]];
+	if (++cur_td[com_port] >= TX_NUM_DESC)
+		cur_td[com_port] = 0;
+
+	*(unchar *)(tdp->buffer ^ 7) = c;
+	tdp->bytecnt = 1;
+	tdp->shadow = 1;
+	tdp->cmd_stat = SDMA_DESC_CMDSTAT_L | SDMA_DESC_CMDSTAT_F |
+		SDMA_DESC_CMDSTAT_O;
+
+	MV64x60_REG_WRITE(sdma_regs[com_port].sctdp, tdp);
+	MV64x60_REG_WRITE(sdma_regs[com_port].sftdp, tdp);
+	MV64x60_REG_WRITE(sdma_regs[com_port].sdcm,
+		MV64x60_REG_READ(sdma_regs[com_port].sdcm) | SDMA_SDCM_TXD);
+
+	return;
+}
+
+unsigned char
+serial_getc(unsigned long com_port)
+{
+	struct mv64x60_rx_desc	*rdp;
+	unchar			c = '\0';
+
+	rdp = &rd[com_port][cur_rd[com_port]];
+
+	if ((rdp->cmd_stat & (SDMA_DESC_CMDSTAT_O|SDMA_DESC_CMDSTAT_ES)) == 0) {
+		c = *(unchar *)(rdp->buffer ^ 7);
+		RX_INIT_RDP(rdp);
+		if (++cur_rd[com_port] >= RX_NUM_DESC)
+			cur_rd[com_port] = 0;
+	}
+
+	return c;
+}
+
+int
+serial_tstc(unsigned long com_port)
+{
+	struct mv64x60_rx_desc	*rdp;
+	int			loop_count = 0;
+	int			rc = 0;
+
+	rdp = &rd[com_port][cur_rd[com_port]];
+
+	/* Go thru rcv desc's until empty looking for one with data (no error)*/
+	while (((rdp->cmd_stat & SDMA_DESC_CMDSTAT_O) == 0) &&
+		(loop_count++ < RX_NUM_DESC)) {
+
+		/* If there was an error, reinit the desc & continue */
+		if ((rdp->cmd_stat & SDMA_DESC_CMDSTAT_ES) != 0) {
+			RX_INIT_RDP(rdp);
+			if (++cur_rd[com_port] >= RX_NUM_DESC)
+				cur_rd[com_port] = 0;
+			rdp = (struct mv64x60_rx_desc *)rdp->next_desc_ptr;
+		}
+		else {
+			rc = 1;
+			break;
+		}
+	}
+
+	return rc;
+}
+
+void
+serial_close(unsigned long com_port)
+{
+	stop_dma(com_port);
+	return;
+}
diff -Nru a/arch/ppc/configs/adir_defconfig b/arch/ppc/configs/adir_defconfig
--- a/arch/ppc/configs/adir_defconfig	2005-01-10 20:11:21 -08:00
+++ b/arch/ppc/configs/adir_defconfig	2005-01-10 20:11:21 -08:00
@@ -302,7 +302,6 @@
 CONFIG_IP_NF_NAT_NEEDED=y
 CONFIG_IP_NF_TARGET_MASQUERADE=m
 CONFIG_IP_NF_TARGET_REDIRECT=m
-# CONFIG_IP_NF_NAT_LOCAL is not set
 CONFIG_IP_NF_NAT_SNMP_BASIC=m
 CONFIG_IP_NF_NAT_IRC=m
 CONFIG_IP_NF_NAT_FTP=m
diff -Nru a/arch/ppc/configs/apus_defconfig b/arch/ppc/configs/apus_defconfig
--- a/arch/ppc/configs/apus_defconfig	2005-01-10 20:11:21 -08:00
+++ b/arch/ppc/configs/apus_defconfig	2005-01-10 20:11:21 -08:00
@@ -354,7 +354,6 @@
 CONFIG_IP_NF_NAT_NEEDED=y
 CONFIG_IP_NF_TARGET_MASQUERADE=m
 CONFIG_IP_NF_TARGET_REDIRECT=m
-# CONFIG_IP_NF_NAT_LOCAL is not set
 CONFIG_IP_NF_NAT_SNMP_BASIC=m
 CONFIG_IP_NF_NAT_IRC=m
 CONFIG_IP_NF_NAT_FTP=m
diff -Nru a/arch/ppc/configs/chestnut_defconfig b/arch/ppc/configs/chestnut_defconfig
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/ppc/configs/chestnut_defconfig	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,739 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.10-rc2
+# Tue Dec  7 16:02:09 2004
+#
+CONFIG_MMU=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_HAVE_DEC_LOCK=y
+CONFIG_PPC=y
+CONFIG_PPC32=y
+CONFIG_GENERIC_NVRAM=y
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_CLEAN_COMPILE=y
+CONFIG_BROKEN_ON_SMP=y
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_AUDIT is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_HOTPLUG is not set
+CONFIG_KOBJECT_UEVENT=y
+# CONFIG_IKCONFIG is not set
+# CONFIG_EMBEDDED is not set
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SHMEM=y
+CONFIG_CC_ALIGN_FUNCTIONS=0
+CONFIG_CC_ALIGN_LABELS=0
+CONFIG_CC_ALIGN_LOOPS=0
+CONFIG_CC_ALIGN_JUMPS=0
+# CONFIG_TINY_SHMEM is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_OBSOLETE_MODPARM=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+
+#
+# Processor
+#
+CONFIG_6xx=y
+# CONFIG_40x is not set
+# CONFIG_44x is not set
+# CONFIG_POWER3 is not set
+# CONFIG_POWER4 is not set
+# CONFIG_8xx is not set
+# CONFIG_E500 is not set
+CONFIG_ALTIVEC=y
+# CONFIG_TAU is not set
+# CONFIG_CPU_FREQ is not set
+CONFIG_PPC_GEN550=y
+CONFIG_PPC_STD_MMU=y
+CONFIG_NOT_COHERENT_CACHE=y
+
+#
+# Platform options
+#
+# CONFIG_PPC_MULTIPLATFORM is not set
+# CONFIG_APUS is not set
+# CONFIG_WILLOW is not set
+# CONFIG_PCORE is not set
+# CONFIG_POWERPMC250 is not set
+CONFIG_CHESTNUT=y
+# CONFIG_SPRUCE is not set
+# CONFIG_EV64260 is not set
+# CONFIG_LOPEC is not set
+# CONFIG_MCPN765 is not set
+# CONFIG_MVME5100 is not set
+# CONFIG_PPLUS is not set
+# CONFIG_PRPMC750 is not set
+# CONFIG_PRPMC800 is not set
+# CONFIG_SANDPOINT is not set
+# CONFIG_ADIR is not set
+# CONFIG_K2 is not set
+# CONFIG_PAL4 is not set
+# CONFIG_GEMINI is not set
+# CONFIG_EST8260 is not set
+# CONFIG_SBC82xx is not set
+# CONFIG_SBS8260 is not set
+# CONFIG_RPX8260 is not set
+# CONFIG_TQM8260 is not set
+# CONFIG_ADS8272 is not set
+# CONFIG_LITE5200 is not set
+CONFIG_MV64360=y
+CONFIG_MV64X60=y
+
+#
+# Set bridge options
+#
+CONFIG_MV64X60_BASE=0xf1000000
+CONFIG_MV64X60_NEW_BASE=0xf1000000
+# CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
+# CONFIG_HIGHMEM is not set
+CONFIG_BINFMT_ELF=y
+CONFIG_BINFMT_MISC=y
+CONFIG_CMDLINE_BOOL=y
+CONFIG_CMDLINE="console=ttyS0,115200 ip=on"
+
+#
+# Bus options
+#
+CONFIG_GENERIC_ISA_DMA=y
+CONFIG_PCI=y
+CONFIG_PCI_DOMAINS=y
+CONFIG_PCI_LEGACY_PROC=y
+CONFIG_PCI_NAMES=y
+
+#
+# Advanced setup
+#
+CONFIG_ADVANCED_OPTIONS=y
+CONFIG_HIGHMEM_START=0xfe000000
+# CONFIG_LOWMEM_SIZE_BOOL is not set
+CONFIG_LOWMEM_SIZE=0x30000000
+# CONFIG_KERNEL_START_BOOL is not set
+CONFIG_KERNEL_START=0xc0000000
+# CONFIG_TASK_SIZE_BOOL is not set
+CONFIG_TASK_SIZE=0x80000000
+# CONFIG_CONSISTENT_START_BOOL is not set
+CONFIG_CONSISTENT_START=0xff100000
+# CONFIG_CONSISTENT_SIZE_BOOL is not set
+CONFIG_CONSISTENT_SIZE=0x00200000
+# CONFIG_BOOT_LOAD_BOOL is not set
+CONFIG_BOOT_LOAD=0x00800000
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_CONCAT is not set
+# CONFIG_MTD_REDBOOT_PARTS is not set
+# CONFIG_MTD_CMDLINE_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=y
+# CONFIG_MTD_CFI_ADV_OPTIONS is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+CONFIG_MTD_CFI_INTELEXT=y
+# CONFIG_MTD_CFI_AMDSTD is not set
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=y
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PHYSMAP is not set
+CONFIG_MTD_CHESTNUT=y
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_PMC551 is not set
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLKMTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+
+#
+# NAND Flash Device Drivers
+#
+# CONFIG_MTD_NAND is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_CPQ_CISS_DA is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_UMEM is not set
+CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_SX8 is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_SIZE=4096
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_LBD is not set
+# CONFIG_CDROM_PKTCDVD is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_SCSI is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+
+#
+# IEEE 1394 (FireWire) support
+#
+# CONFIG_IEEE1394 is not set
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Macintosh device drivers
+#
+
+#
+# Networking support
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+# CONFIG_NETLINK_DEV is not set
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_IP_TCPDIAG=y
+# CONFIG_IP_TCPDIAG_IPV6 is not set
+# CONFIG_IPV6 is not set
+# CONFIG_NETFILTER is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_NET_DIVERT is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+# CONFIG_NET_CLS_ROUTE is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+
+#
+# ARCnet devices
+#
+# CONFIG_ARCNET is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_HAPPYMEAL is not set
+# CONFIG_SUNGEM is not set
+# CONFIG_NET_VENDOR_3COM is not set
+
+#
+# Tulip family network device support
+#
+CONFIG_NET_TULIP=y
+# CONFIG_DE2104X is not set
+CONFIG_TULIP=y
+# CONFIG_TULIP_MWI is not set
+CONFIG_TULIP_MMIO=y
+# CONFIG_TULIP_NAPI is not set
+# CONFIG_DE4X5 is not set
+# CONFIG_WINBOND_840 is not set
+# CONFIG_DM9102 is not set
+# CONFIG_HP100 is not set
+CONFIG_NET_PCI=y
+# CONFIG_PCNET32 is not set
+# CONFIG_AMD8111_ETH is not set
+# CONFIG_ADAPTEC_STARFIRE is not set
+# CONFIG_B44 is not set
+# CONFIG_FORCEDETH is not set
+# CONFIG_DGRS is not set
+# CONFIG_EEPRO100 is not set
+CONFIG_E100=y
+# CONFIG_E100_NAPI is not set
+# CONFIG_FEALNX is not set
+# CONFIG_NATSEMI is not set
+# CONFIG_NE2K_PCI is not set
+# CONFIG_8139CP is not set
+# CONFIG_8139TOO is not set
+# CONFIG_SIS900 is not set
+# CONFIG_EPIC100 is not set
+# CONFIG_SUNDANCE is not set
+# CONFIG_TLAN is not set
+# CONFIG_VIA_RHINE is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+# CONFIG_ACENIC is not set
+# CONFIG_DL2K is not set
+# CONFIG_E1000 is not set
+# CONFIG_NS83820 is not set
+# CONFIG_HAMACHI is not set
+# CONFIG_YELLOWFIN is not set
+# CONFIG_R8169 is not set
+# CONFIG_SK98LIN is not set
+# CONFIG_VIA_VELOCITY is not set
+# CONFIG_TIGON3 is not set
+
+#
+# Ethernet (10000 Mbit)
+#
+# CONFIG_IXGB is not set
+# CONFIG_S2IO is not set
+
+#
+# Token Ring devices
+#
+# CONFIG_TR is not set
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Telephony Support
+#
+# CONFIG_PHONE is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+# CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+# CONFIG_SERIO is not set
+# CONFIG_SERIO_I8042 is not set
+
+#
+# Input Device Drivers
+#
+# CONFIG_INPUT_KEYBOARD is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_NR_UARTS=2
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_NVRAM is not set
+CONFIG_GEN_RTC=y
+# CONFIG_GEN_RTC_X is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+# CONFIG_AGP is not set
+# CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# I2C support
+#
+# CONFIG_I2C is not set
+
+#
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+
+#
+# Misc devices
+#
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# Graphics support
+#
+# CONFIG_FB is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+
+#
+# USB support
+#
+# CONFIG_USB is not set
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information
+#
+
+#
+# USB Gadget Support
+#
+# CONFIG_USB_GADGET is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT3_FS is not set
+# CONFIG_JBD is not set
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+# CONFIG_MSDOS_FS is not set
+# CONFIG_VFAT_FS is not set
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_KCORE=y
+CONFIG_SYSFS=y
+CONFIG_DEVFS_FS=y
+CONFIG_DEVFS_MOUNT=y
+# CONFIG_DEVFS_DEBUG is not set
+# CONFIG_DEVPTS_FS_XATTR is not set
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_XATTR is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_JFFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+# CONFIG_JFFS2_FS_NAND is not set
+# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JFFS2_RTIME=y
+# CONFIG_JFFS2_RUBIN is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V4 is not set
+# CONFIG_NFS_DIRECTIO is not set
+# CONFIG_NFSD is not set
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+# CONFIG_EXPORTFS is not set
+CONFIG_SUNRPC=y
+# CONFIG_RPCSEC_GSS_KRB5 is not set
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+# CONFIG_NLS is not set
+
+#
+# Library routines
+#
+# CONFIG_CRC_CCITT is not set
+CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_SERIAL_TEXT_DEBUG is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+# CONFIG_CRYPTO is not set
diff -Nru a/arch/ppc/configs/common_defconfig b/arch/ppc/configs/common_defconfig
--- a/arch/ppc/configs/common_defconfig	2005-01-10 20:11:17 -08:00
+++ b/arch/ppc/configs/common_defconfig	2005-01-10 20:11:17 -08:00
@@ -1,7 +1,10 @@
 #
 # Automatically generated make config: don't edit
+# Linux kernel version: 2.6.10-rc2
+# Thu Nov 18 08:22:35 2004
 #
 CONFIG_MMU=y
+CONFIG_GENERIC_HARDIRQS=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
 CONFIG_HAVE_DEC_LOCK=y
 CONFIG_PPC=y
@@ -13,12 +16,12 @@
 #
 CONFIG_EXPERIMENTAL=y
 CONFIG_CLEAN_COMPILE=y
-# CONFIG_STANDALONE is not set
 CONFIG_BROKEN_ON_SMP=y
 
 #
 # General setup
 #
+CONFIG_LOCALVERSION=""
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
 CONFIG_POSIX_MQUEUE=y
@@ -27,17 +30,21 @@
 # CONFIG_AUDIT is not set
 CONFIG_LOG_BUF_SHIFT=14
 CONFIG_HOTPLUG=y
+CONFIG_KOBJECT_UEVENT=y
 CONFIG_IKCONFIG=y
 CONFIG_IKCONFIG_PROC=y
 # CONFIG_EMBEDDED is not set
 CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SHMEM=y
+CONFIG_CC_ALIGN_FUNCTIONS=0
+CONFIG_CC_ALIGN_LABELS=0
+CONFIG_CC_ALIGN_LOOPS=0
+CONFIG_CC_ALIGN_JUMPS=0
+# CONFIG_TINY_SHMEM is not set
 
 #
 # Loadable module support
@@ -46,7 +53,8 @@
 CONFIG_MODULE_UNLOAD=y
 CONFIG_MODULE_FORCE_UNLOAD=y
 CONFIG_OBSOLETE_MODPARM=y
-# CONFIG_MODVERSIONS is not set
+CONFIG_MODVERSIONS=y
+# CONFIG_MODULE_SRCVERSION_ALL is not set
 CONFIG_KMOD=y
 
 #
@@ -58,11 +66,22 @@
 # CONFIG_POWER3 is not set
 # CONFIG_POWER4 is not set
 # CONFIG_8xx is not set
+# CONFIG_E500 is not set
 CONFIG_ALTIVEC=y
 CONFIG_TAU=y
 # CONFIG_TAU_INT is not set
 # CONFIG_TAU_AVERAGE is not set
-# CONFIG_CPU_FREQ is not set
+CONFIG_CPU_FREQ=y
+# CONFIG_CPU_FREQ_DEBUG is not set
+CONFIG_CPU_FREQ_PROC_INTF=y
+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
+# CONFIG_CPU_FREQ_GOV_USERSPACE is not set
+# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set
+CONFIG_CPU_FREQ_PMAC=y
+CONFIG_CPU_FREQ_TABLE=y
 CONFIG_PPC601_SYNC_FIX=y
 CONFIG_PM=y
 CONFIG_PPC_STD_MMU=y
@@ -89,9 +108,12 @@
 # CONFIG_PAL4 is not set
 # CONFIG_GEMINI is not set
 # CONFIG_EST8260 is not set
+# CONFIG_SBC82xx is not set
 # CONFIG_SBS8260 is not set
-# CONFIG_RPX6 is not set
+# CONFIG_RPX8260 is not set
 # CONFIG_TQM8260 is not set
+# CONFIG_ADS8272 is not set
+# CONFIG_LITE5200 is not set
 CONFIG_PPC_CHRP=y
 CONFIG_PPC_PMAC=y
 CONFIG_PPC_PREP=y
@@ -100,11 +122,9 @@
 # CONFIG_SMP is not set
 # CONFIG_PREEMPT is not set
 # CONFIG_HIGHMEM is not set
-CONFIG_KERNEL_ELF=y
 CONFIG_BINFMT_ELF=y
 CONFIG_BINFMT_MISC=m
 CONFIG_PROC_DEVICETREE=y
-CONFIG_PPC_RTAS=y
 CONFIG_PREP_RESIDUAL=y
 CONFIG_PROC_PREPRESIDUAL=y
 CONFIG_CMDLINE_BOOL=y
@@ -121,9 +141,13 @@
 CONFIG_PCI_NAMES=y
 
 #
-# PCMCIA/CardBus support
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# PC-card bridges
 #
-# CONFIG_PCMCIA is not set
 CONFIG_PCMCIA_PROBE=y
 
 #
@@ -147,6 +171,8 @@
 #
 # Generic Driver Options
 #
+# CONFIG_STANDALONE is not set
+CONFIG_PREVENT_FIRMWARE_BUILD=y
 # CONFIG_FW_LOADER is not set
 
 #
@@ -168,6 +194,7 @@
 # Block devices
 #
 CONFIG_BLK_DEV_FD=m
+# CONFIG_MAC_FLOPPY is not set
 # CONFIG_BLK_DEV_XD is not set
 # CONFIG_BLK_CPQ_DA is not set
 # CONFIG_BLK_CPQ_CISS_DA is not set
@@ -176,11 +203,22 @@
 CONFIG_BLK_DEV_LOOP=y
 # CONFIG_BLK_DEV_CRYPTOLOOP is not set
 # CONFIG_BLK_DEV_NBD is not set
-# CONFIG_BLK_DEV_CARMEL is not set
+# CONFIG_BLK_DEV_SX8 is not set
+# CONFIG_BLK_DEV_UB is not set
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_SIZE=4096
 CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
 CONFIG_LBD=y
+# CONFIG_CDROM_PKTCDVD is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
 
 #
 # ATA/ATAPI/MFM/RLL support
@@ -191,15 +229,14 @@
 #
 # Please see Documentation/ide.txt for help/info on IDE drives
 #
+# CONFIG_BLK_DEV_IDE_SATA is not set
 CONFIG_BLK_DEV_IDEDISK=y
 # CONFIG_IDEDISK_MULTI_MODE is not set
-# CONFIG_IDEDISK_STROKE 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
-# CONFIG_IDE_TASKFILE_IO is not set
 
 #
 # IDE chipset support/bugfixes
@@ -215,7 +252,6 @@
 # CONFIG_BLK_DEV_IDEDMA_FORCED is not set
 CONFIG_IDEDMA_PCI_AUTO=y
 # CONFIG_IDEDMA_ONLYDISK is not set
-CONFIG_BLK_DEV_ADMA=y
 # CONFIG_BLK_DEV_AEC62XX is not set
 # CONFIG_BLK_DEV_ALI15X3 is not set
 # CONFIG_BLK_DEV_AMD74XX is not set
@@ -241,7 +277,7 @@
 CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y
 CONFIG_BLK_DEV_IDEDMA_PMAC=y
 CONFIG_BLK_DEV_IDE_PMAC_BLINK=y
-CONFIG_BLK_DEV_IDEDMA_PMAC_AUTO=y
+# CONFIG_IDE_ARM is not set
 # CONFIG_IDE_CHIPSETS is not set
 CONFIG_BLK_DEV_IDEDMA=y
 # CONFIG_IDEDMA_IVB is not set
@@ -268,7 +304,6 @@
 # Some SCSI devices (e.g. CD jukebox) support multiple LUNs
 #
 # CONFIG_SCSI_MULTI_LUN is not set
-# CONFIG_SCSI_REPORT_LUNS is not set
 CONFIG_SCSI_CONSTANTS=y
 # CONFIG_SCSI_LOGGING is not set
 
@@ -282,6 +317,7 @@
 # SCSI low-level drivers
 #
 # CONFIG_BLK_DEV_3W_XXXX_RAID is not set
+# CONFIG_SCSI_3W_9XXX is not set
 # CONFIG_SCSI_7000FASST is not set
 # CONFIG_SCSI_ACARD is not set
 # CONFIG_SCSI_AHA152X is not set
@@ -290,18 +326,17 @@
 CONFIG_SCSI_AIC7XXX=m
 CONFIG_AIC7XXX_CMDS_PER_DEVICE=253
 CONFIG_AIC7XXX_RESET_DELAY_MS=15000
-# CONFIG_AIC7XXX_BUILD_FIRMWARE is not set
 CONFIG_AIC7XXX_DEBUG_ENABLE=y
 CONFIG_AIC7XXX_DEBUG_MASK=0
 CONFIG_AIC7XXX_REG_PRETTY_PRINT=y
 CONFIG_SCSI_AIC7XXX_OLD=m
 # CONFIG_SCSI_AIC79XX is not set
-CONFIG_SCSI_ADVANSYS=m
+# CONFIG_SCSI_DPT_I2O is not set
 # CONFIG_SCSI_IN2000 is not set
-# CONFIG_SCSI_MEGARAID is not set
+# CONFIG_MEGARAID_NEWGEN is not set
+# CONFIG_MEGARAID_LEGACY is not set
 # CONFIG_SCSI_SATA is not set
 # CONFIG_SCSI_BUSLOGIC is not set
-# CONFIG_SCSI_CPQFCTS is not set
 # CONFIG_SCSI_DMX3191D is not set
 # CONFIG_SCSI_DTC3280 is not set
 # CONFIG_SCSI_EATA is not set
@@ -311,6 +346,7 @@
 # CONFIG_SCSI_GENERIC_NCR5380 is not set
 # CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
 # CONFIG_SCSI_IPS is not set
+# CONFIG_SCSI_INITIO is not set
 # CONFIG_SCSI_INIA100 is not set
 # CONFIG_SCSI_NCR53C406A is not set
 CONFIG_SCSI_SYM53C8XX_2=y
@@ -325,6 +361,7 @@
 # CONFIG_SCSI_QLOGIC_ISP is not set
 # CONFIG_SCSI_QLOGIC_FC is not set
 # CONFIG_SCSI_QLOGIC_1280 is not set
+# CONFIG_SCSI_QLOGIC_1280_1040 is not set
 CONFIG_SCSI_QLA2XXX=y
 # CONFIG_SCSI_QLA21XX is not set
 # CONFIG_SCSI_QLA22XX is not set
@@ -378,8 +415,6 @@
 CONFIG_PMAC_PBOOK=y
 CONFIG_PMAC_APM_EMU=y
 CONFIG_PMAC_BACKLIGHT=y
-# CONFIG_MAC_FLOPPY is not set
-CONFIG_MAC_SERIAL=m
 CONFIG_ADB_MACIO=y
 CONFIG_INPUT_ADBHID=y
 CONFIG_MAC_EMUMOUSEBTN=y
@@ -412,6 +447,9 @@
 # CONFIG_INET_AH is not set
 # CONFIG_INET_ESP is not set
 # CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_IP_TCPDIAG=y
+# CONFIG_IP_TCPDIAG_IPV6 is not set
 
 #
 # IP: Virtual Server Configuration
@@ -425,6 +463,9 @@
 # IP: Netfilter Configuration
 #
 CONFIG_IP_NF_CONNTRACK=m
+# CONFIG_IP_NF_CT_ACCT is not set
+# CONFIG_IP_NF_CONNTRACK_MARK is not set
+# CONFIG_IP_NF_CT_PROTO_SCTP is not set
 CONFIG_IP_NF_FTP=m
 CONFIG_IP_NF_IRC=m
 CONFIG_IP_NF_TFTP=m
@@ -449,29 +490,33 @@
 CONFIG_IP_NF_MATCH_STATE=m
 CONFIG_IP_NF_MATCH_CONNTRACK=m
 CONFIG_IP_NF_MATCH_OWNER=m
+# CONFIG_IP_NF_MATCH_ADDRTYPE is not set
+# CONFIG_IP_NF_MATCH_REALM is not set
+# CONFIG_IP_NF_MATCH_SCTP is not set
+# CONFIG_IP_NF_MATCH_COMMENT is not set
+# CONFIG_IP_NF_MATCH_HASHLIMIT is not set
 CONFIG_IP_NF_FILTER=m
 CONFIG_IP_NF_TARGET_REJECT=m
+# CONFIG_IP_NF_TARGET_LOG is not set
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_TARGET_TCPMSS=m
 CONFIG_IP_NF_NAT=m
 CONFIG_IP_NF_NAT_NEEDED=y
 CONFIG_IP_NF_TARGET_MASQUERADE=m
 CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_IP_NF_TARGET_NETMAP=m
 CONFIG_IP_NF_TARGET_SAME=m
-# CONFIG_IP_NF_NAT_LOCAL is not set
 CONFIG_IP_NF_NAT_SNMP_BASIC=m
 CONFIG_IP_NF_NAT_IRC=m
 CONFIG_IP_NF_NAT_FTP=m
 CONFIG_IP_NF_NAT_TFTP=m
 CONFIG_IP_NF_NAT_AMANDA=m
 # CONFIG_IP_NF_MANGLE is not set
-# CONFIG_IP_NF_TARGET_LOG is not set
-CONFIG_IP_NF_TARGET_ULOG=m
-CONFIG_IP_NF_TARGET_TCPMSS=m
+CONFIG_IP_NF_RAW=m
+CONFIG_IP_NF_TARGET_NOTRACK=m
 # CONFIG_IP_NF_ARPTABLES is not set
 CONFIG_IP_NF_COMPAT_IPCHAINS=m
 # CONFIG_IP_NF_COMPAT_IPFWADM is not set
-CONFIG_IP_NF_TARGET_NOTRACK=m
-CONFIG_IP_NF_RAW=m
 
 #
 # SCTP Configuration (EXPERIMENTAL)
@@ -489,12 +534,12 @@
 # CONFIG_NET_DIVERT is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
-# CONFIG_NET_HW_FLOWCONTROL is not set
 
 #
 # QoS and/or fair queueing
 #
 # CONFIG_NET_SCHED is not set
+# CONFIG_NET_CLS_ROUTE is not set
 
 #
 # Network testing
@@ -524,7 +569,6 @@
 CONFIG_MACE=y
 # CONFIG_MACE_AAUI_PORT is not set
 CONFIG_BMAC=y
-# CONFIG_OAKNET is not set
 # CONFIG_HAPPYMEAL is not set
 CONFIG_SUNGEM=y
 # CONFIG_NET_VENDOR_3COM is not set
@@ -583,6 +627,7 @@
 # CONFIG_YELLOWFIN is not set
 # CONFIG_R8169 is not set
 # CONFIG_SK98LIN is not set
+# CONFIG_VIA_VELOCITY is not set
 # CONFIG_TIGON3 is not set
 
 #
@@ -641,7 +686,6 @@
 # CONFIG_PPPOE is not set
 # CONFIG_SLIP is not set
 # CONFIG_NET_FC is not set
-# CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
 
@@ -682,6 +726,7 @@
 # CONFIG_SERIO_SERPORT is not set
 # CONFIG_SERIO_CT82C710 is not set
 # CONFIG_SERIO_PCIPS2 is not set
+# CONFIG_SERIO_RAW is not set
 
 #
 # Input Device Drivers
@@ -702,6 +747,7 @@
 # CONFIG_INPUT_JOYSTICK is not set
 # CONFIG_INPUT_TOUCHSCREEN is not set
 CONFIG_INPUT_MISC=y
+# CONFIG_INPUT_PCSPKR is not set
 CONFIG_INPUT_UINPUT=m
 
 #
@@ -728,7 +774,6 @@
 CONFIG_UNIX98_PTYS=y
 CONFIG_LEGACY_PTYS=y
 CONFIG_LEGACY_PTY_COUNT=256
-# CONFIG_QIC02_TAPE is not set
 
 #
 # IPMI
@@ -749,7 +794,6 @@
 #
 # Ftape, the floppy tape device driver
 #
-# CONFIG_FTAPE is not set
 # CONFIG_AGP is not set
 # CONFIG_DRM is not set
 # CONFIG_RAW_DRIVER is not set
@@ -765,6 +809,7 @@
 #
 CONFIG_I2C_ALGOBIT=y
 # CONFIG_I2C_ALGOPCF is not set
+# CONFIG_I2C_ALGOPCA is not set
 
 #
 # I2C Hardware Bus support
@@ -789,26 +834,36 @@
 # CONFIG_I2C_SIS5595 is not set
 # CONFIG_I2C_SIS630 is not set
 # CONFIG_I2C_SIS96X is not set
+# CONFIG_I2C_STUB is not set
 # CONFIG_I2C_VIA is not set
 # CONFIG_I2C_VIAPRO is not set
 # CONFIG_I2C_VOODOO3 is not set
+# CONFIG_I2C_PCA_ISA is not set
 
 #
 # Hardware Sensors Chip support
 #
 # CONFIG_I2C_SENSOR is not set
 # CONFIG_SENSORS_ADM1021 is not set
+# CONFIG_SENSORS_ADM1025 is not set
+# CONFIG_SENSORS_ADM1031 is not set
 # CONFIG_SENSORS_ASB100 is not set
 # CONFIG_SENSORS_DS1621 is not set
 # CONFIG_SENSORS_FSCHER is not set
 # CONFIG_SENSORS_GL518SM is not set
 # CONFIG_SENSORS_IT87 is not set
+# CONFIG_SENSORS_LM63 is not set
 # CONFIG_SENSORS_LM75 is not set
+# CONFIG_SENSORS_LM77 is not set
 # CONFIG_SENSORS_LM78 is not set
 # CONFIG_SENSORS_LM80 is not set
 # CONFIG_SENSORS_LM83 is not set
 # CONFIG_SENSORS_LM85 is not set
+# CONFIG_SENSORS_LM87 is not set
 # CONFIG_SENSORS_LM90 is not set
+# CONFIG_SENSORS_MAX1619 is not set
+# CONFIG_SENSORS_PC87360 is not set
+# CONFIG_SENSORS_SMSC47M1 is not set
 # CONFIG_SENSORS_VIA686A is not set
 # CONFIG_SENSORS_W83781D is not set
 # CONFIG_SENSORS_W83L785TS is not set
@@ -820,12 +875,18 @@
 # CONFIG_SENSORS_EEPROM is not set
 # CONFIG_SENSORS_PCF8574 is not set
 # CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_RTC8564 is not set
 # CONFIG_I2C_DEBUG_CORE is not set
 # CONFIG_I2C_DEBUG_ALGO is not set
 # CONFIG_I2C_DEBUG_BUS is not set
 # CONFIG_I2C_DEBUG_CHIP is not set
 
 #
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+
+#
 # Misc devices
 #
 
@@ -843,6 +904,9 @@
 # Graphics support
 #
 CONFIG_FB=y
+CONFIG_FB_MODE_HELPERS=y
+# CONFIG_FB_TILEBLITTING is not set
+# CONFIG_FB_CIRRUS is not set
 # CONFIG_FB_PM2 is not set
 # CONFIG_FB_CYBER2000 is not set
 CONFIG_FB_OF=y
@@ -850,8 +914,8 @@
 CONFIG_FB_PLATINUM=y
 CONFIG_FB_VALKYRIE=y
 CONFIG_FB_CT65550=y
+# CONFIG_FB_ASILIANT is not set
 CONFIG_FB_IMSTT=y
-# CONFIG_FB_S3TRIO is not set
 # CONFIG_FB_VGA16 is not set
 # CONFIG_FB_RIVA is not set
 CONFIG_FB_MATROX=y
@@ -868,12 +932,15 @@
 CONFIG_FB_ATY128=y
 CONFIG_FB_ATY=y
 CONFIG_FB_ATY_CT=y
-CONFIG_FB_ATY_GX=y
+# CONFIG_FB_ATY_GENERIC_LCD is not set
 # CONFIG_FB_ATY_XL_INIT is not set
+CONFIG_FB_ATY_GX=y
+# CONFIG_FB_SAVAGE is not set
 # CONFIG_FB_SIS is not set
 # CONFIG_FB_NEOMAGIC is not set
 # CONFIG_FB_KYRO is not set
 CONFIG_FB_3DFX=y
+# CONFIG_FB_3DFX_ACCEL is not set
 # CONFIG_FB_VOODOO1 is not set
 # CONFIG_FB_TRIDENT is not set
 # CONFIG_FB_VIRTUAL is not set
@@ -885,7 +952,6 @@
 # CONFIG_MDA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
 CONFIG_FRAMEBUFFER_CONSOLE=y
-CONFIG_PCI_CONSOLE=y
 # CONFIG_FONTS is not set
 CONFIG_FONT_8x8=y
 CONFIG_FONT_8x16=y
@@ -964,6 +1030,7 @@
 #
 # CONFIG_SND_ALI5451 is not set
 # CONFIG_SND_ATIIXP is not set
+# CONFIG_SND_ATIIXP_MODEM is not set
 # CONFIG_SND_AU8810 is not set
 # CONFIG_SND_AU8820 is not set
 # CONFIG_SND_AU8830 is not set
@@ -1003,9 +1070,10 @@
 CONFIG_SND_POWERMAC=m
 
 #
-# ALSA USB devices
+# USB devices
 #
 CONFIG_SND_USB_AUDIO=m
+# CONFIG_SND_USB_USX2Y is not set
 
 #
 # Open Sound System
@@ -1024,6 +1092,10 @@
 CONFIG_USB_DEVICEFS=y
 # CONFIG_USB_BANDWIDTH is not set
 # CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_SUSPEND is not set
+# CONFIG_USB_OTG is not set
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
 
 #
 # USB Host Controller Drivers
@@ -1042,6 +1114,7 @@
 CONFIG_USB_PRINTER=m
 CONFIG_USB_STORAGE=m
 # CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_RW_DETECT is not set
 # CONFIG_USB_STORAGE_DATAFAB is not set
 CONFIG_USB_STORAGE_FREECOM=y
 # CONFIG_USB_STORAGE_ISD200 is not set
@@ -1052,7 +1125,7 @@
 # CONFIG_USB_STORAGE_JUMPSHOT is not set
 
 #
-# USB Human Interface Devices (HID)
+# USB Input Devices
 #
 CONFIG_USB_HID=y
 CONFIG_USB_HIDINPUT=y
@@ -1063,6 +1136,7 @@
 # CONFIG_USB_KBTAB is not set
 # CONFIG_USB_POWERMATE is not set
 # CONFIG_USB_MTOUCH is not set
+# CONFIG_USB_EGALAX is not set
 # CONFIG_USB_XPAD is not set
 # CONFIG_USB_ATI_REMOTE is not set
 
@@ -1083,7 +1157,7 @@
 #
 
 #
-# USB Network adaptors
+# USB Network Adapters
 #
 # CONFIG_USB_CATC is not set
 # CONFIG_USB_KAWETH is not set
@@ -1103,6 +1177,7 @@
 # CONFIG_USB_SERIAL_BELKIN is not set
 # CONFIG_USB_SERIAL_WHITEHEAT is not set
 # CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
+# CONFIG_USB_SERIAL_CYPRESS_M8 is not set
 # CONFIG_USB_SERIAL_EMPEG is not set
 # CONFIG_USB_SERIAL_FTDI_SIO is not set
 CONFIG_USB_SERIAL_VISOR=m
@@ -1110,6 +1185,7 @@
 # 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_IPW is not set
 # CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
 CONFIG_USB_SERIAL_KEYSPAN=m
 # CONFIG_USB_SERIAL_KEYSPAN_MPR is not set
@@ -1146,9 +1222,15 @@
 # CONFIG_USB_LCD is not set
 # CONFIG_USB_LED is not set
 # CONFIG_USB_CYTHERM is not set
+# CONFIG_USB_PHIDGETKIT is not set
+# CONFIG_USB_PHIDGETSERVO is not set
 # CONFIG_USB_TEST is not set
 
 #
+# USB ATM/DSL drivers
+#
+
+#
 # USB Gadget Support
 #
 # CONFIG_USB_GADGET is not set
@@ -1166,6 +1248,7 @@
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 # CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
 
@@ -1183,6 +1266,8 @@
 CONFIG_FAT_FS=m
 CONFIG_MSDOS_FS=m
 CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 # CONFIG_NTFS_FS is not set
 
 #
@@ -1196,6 +1281,7 @@
 # CONFIG_DEVFS_DEBUG is not set
 # CONFIG_DEVPTS_FS_XATTR is not set
 CONFIG_TMPFS=y
+# CONFIG_TMPFS_XATTR is not set
 # CONFIG_HUGETLB_PAGE is not set
 CONFIG_RAMFS=y
 
@@ -1226,12 +1312,13 @@
 CONFIG_NFSD=y
 CONFIG_NFSD_V3=y
 # CONFIG_NFSD_V4 is not set
-# CONFIG_NFSD_TCP is not set
+CONFIG_NFSD_TCP=y
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
 CONFIG_EXPORTFS=y
 CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_KRB5 is not set
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
@@ -1253,7 +1340,6 @@
 # CONFIG_SOLARIS_X86_PARTITION is not set
 # CONFIG_UNIXWARE_DISKLABEL is not set
 # CONFIG_LDM_PARTITION is not set
-# CONFIG_NEC98_PARTITION is not set
 # CONFIG_SGI_PARTITION is not set
 # CONFIG_ULTRIX_PARTITION is not set
 # CONFIG_SUN_PARTITION is not set
@@ -1287,6 +1373,7 @@
 # CONFIG_NLS_ISO8859_8 is not set
 # CONFIG_NLS_CODEPAGE_1250 is not set
 # CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ASCII is not set
 CONFIG_NLS_ISO8859_1=m
 # CONFIG_NLS_ISO8859_2 is not set
 # CONFIG_NLS_ISO8859_3 is not set
@@ -1305,12 +1392,18 @@
 #
 # Library routines
 #
+CONFIG_CRC_CCITT=y
 CONFIG_CRC32=y
 # CONFIG_LIBCRC32C is not set
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=y
 
 #
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
 # Kernel hacking
 #
 # CONFIG_DEBUG_KERNEL is not set
@@ -1319,6 +1412,7 @@
 #
 # Security options
 #
+# CONFIG_KEYS is not set
 # CONFIG_SECURITY is not set
 
 #
diff -Nru a/arch/ppc/configs/cpci690_defconfig b/arch/ppc/configs/cpci690_defconfig
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/ppc/configs/cpci690_defconfig	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,686 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.10-rc2
+# Fri Dec  3 15:56:10 2004
+#
+CONFIG_MMU=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_HAVE_DEC_LOCK=y
+CONFIG_PPC=y
+CONFIG_PPC32=y
+CONFIG_GENERIC_NVRAM=y
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_CLEAN_COMPILE=y
+CONFIG_BROKEN_ON_SMP=y
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+# CONFIG_SWAP is not set
+CONFIG_SYSVIPC=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_AUDIT is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_HOTPLUG is not set
+CONFIG_KOBJECT_UEVENT=y
+# CONFIG_IKCONFIG is not set
+# CONFIG_EMBEDDED is not set
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SHMEM=y
+CONFIG_CC_ALIGN_FUNCTIONS=0
+CONFIG_CC_ALIGN_LABELS=0
+CONFIG_CC_ALIGN_LOOPS=0
+CONFIG_CC_ALIGN_JUMPS=0
+# CONFIG_TINY_SHMEM is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_OBSOLETE_MODPARM=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+
+#
+# Processor
+#
+CONFIG_6xx=y
+# CONFIG_40x is not set
+# CONFIG_44x is not set
+# CONFIG_POWER3 is not set
+# CONFIG_POWER4 is not set
+# CONFIG_8xx is not set
+# CONFIG_E500 is not set
+CONFIG_ALTIVEC=y
+# CONFIG_TAU is not set
+# CONFIG_CPU_FREQ is not set
+CONFIG_PPC_STD_MMU=y
+# CONFIG_NOT_COHERENT_CACHE is not set
+
+#
+# Platform options
+#
+# CONFIG_PPC_MULTIPLATFORM is not set
+# CONFIG_APUS is not set
+# CONFIG_KATANA is not set
+# CONFIG_DMV182 is not set
+# CONFIG_WILLOW is not set
+CONFIG_CPCI690=y
+# CONFIG_PCORE is not set
+# CONFIG_POWERPMC250 is not set
+# CONFIG_EV64260 is not set
+# CONFIG_DB64360 is not set
+# CONFIG_CHESTNUT is not set
+# CONFIG_SPRUCE is not set
+# CONFIG_LOPEC is not set
+# CONFIG_MCPN765 is not set
+# CONFIG_MVME5100 is not set
+# CONFIG_PPLUS is not set
+# CONFIG_PRPMC750 is not set
+# CONFIG_PRPMC800 is not set
+# CONFIG_PRPMC880 is not set
+# CONFIG_SANDPOINT is not set
+# CONFIG_ADIR is not set
+# CONFIG_K2 is not set
+# CONFIG_PAL4 is not set
+# CONFIG_GEMINI is not set
+# CONFIG_EST8260 is not set
+# CONFIG_SBC82xx is not set
+# CONFIG_SBS8260 is not set
+# CONFIG_RPX8260 is not set
+# CONFIG_TQM8260 is not set
+# CONFIG_ADS8272 is not set
+# CONFIG_LITE5200 is not set
+
+#
+# Set bridge options
+#
+CONFIG_MV64X60_BASE=0xf1000000
+CONFIG_MV64X60_NEW_BASE=0xf1000000
+CONFIG_GT64260=y
+CONFIG_MV64X60=y
+# CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
+# CONFIG_HIGHMEM is not set
+CONFIG_BINFMT_ELF=y
+CONFIG_BINFMT_MISC=y
+CONFIG_CMDLINE_BOOL=y
+CONFIG_CMDLINE="console=ttyMM0,9600 ip=on"
+
+#
+# Bus options
+#
+CONFIG_GENERIC_ISA_DMA=y
+CONFIG_PCI=y
+CONFIG_PCI_DOMAINS=y
+CONFIG_PCI_LEGACY_PROC=y
+CONFIG_PCI_NAMES=y
+
+#
+# Advanced setup
+#
+# CONFIG_ADVANCED_OPTIONS is not set
+
+#
+# Default settings for advanced configuration options are used
+#
+CONFIG_HIGHMEM_START=0xfe000000
+CONFIG_LOWMEM_SIZE=0x30000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_BOOT_LOAD=0x00800000
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+
+#
+# Memory Technology Devices (MTD)
+#
+# CONFIG_MTD is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_CPQ_CISS_DA is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_UMEM is not set
+CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_SX8 is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=4096
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_LBD is not set
+# CONFIG_CDROM_PKTCDVD is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_SCSI is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+
+#
+# IEEE 1394 (FireWire) support
+#
+# CONFIG_IEEE1394 is not set
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Macintosh device drivers
+#
+
+#
+# Networking support
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+# CONFIG_NETLINK_DEV is not set
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_IP_TCPDIAG=y
+# CONFIG_IP_TCPDIAG_IPV6 is not set
+# CONFIG_IPV6 is not set
+# CONFIG_NETFILTER is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_NET_DIVERT is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+# CONFIG_NET_CLS_ROUTE is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+
+#
+# ARCnet devices
+#
+# CONFIG_ARCNET is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_HAPPYMEAL is not set
+# CONFIG_SUNGEM is not set
+# CONFIG_NET_VENDOR_3COM is not set
+
+#
+# Tulip family network device support
+#
+CONFIG_NET_TULIP=y
+# CONFIG_DE2104X is not set
+CONFIG_TULIP=y
+# CONFIG_TULIP_MWI is not set
+# CONFIG_TULIP_MMIO is not set
+# CONFIG_TULIP_NAPI is not set
+# CONFIG_DE4X5 is not set
+# CONFIG_WINBOND_840 is not set
+# CONFIG_DM9102 is not set
+# CONFIG_HP100 is not set
+CONFIG_NET_PCI=y
+# CONFIG_PCNET32 is not set
+# CONFIG_AMD8111_ETH is not set
+# CONFIG_ADAPTEC_STARFIRE is not set
+# CONFIG_B44 is not set
+# CONFIG_FORCEDETH is not set
+# CONFIG_DGRS is not set
+CONFIG_EEPRO100=y
+# CONFIG_EEPRO100_PIO is not set
+# CONFIG_E100 is not set
+# CONFIG_FEALNX is not set
+# CONFIG_NATSEMI is not set
+# CONFIG_NE2K_PCI is not set
+# CONFIG_8139CP is not set
+# CONFIG_8139TOO is not set
+# CONFIG_SIS900 is not set
+# CONFIG_EPIC100 is not set
+# CONFIG_SUNDANCE is not set
+# CONFIG_TLAN is not set
+# CONFIG_VIA_RHINE is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+# CONFIG_ACENIC is not set
+# CONFIG_DL2K is not set
+# CONFIG_E1000 is not set
+# CONFIG_NS83820 is not set
+# CONFIG_HAMACHI is not set
+# CONFIG_YELLOWFIN is not set
+# CONFIG_R8169 is not set
+# CONFIG_SK98LIN is not set
+# CONFIG_VIA_VELOCITY is not set
+# CONFIG_TIGON3 is not set
+
+#
+# Ethernet (10000 Mbit)
+#
+# CONFIG_IXGB is not set
+# CONFIG_S2IO is not set
+
+#
+# Token Ring devices
+#
+# CONFIG_TR is not set
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Telephony Support
+#
+# CONFIG_PHONE is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+# CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+# CONFIG_SERIO is not set
+# CONFIG_SERIO_I8042 is not set
+
+#
+# Input Device Drivers
+#
+# CONFIG_INPUT_KEYBOARD is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_MPSC=y
+CONFIG_SERIAL_MPSC_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_NVRAM is not set
+CONFIG_GEN_RTC=y
+# CONFIG_GEN_RTC_X is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+# CONFIG_AGP is not set
+# CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# I2C support
+#
+# CONFIG_I2C is not set
+
+#
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+
+#
+# Misc devices
+#
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# Graphics support
+#
+# CONFIG_FB is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+
+#
+# USB support
+#
+# CONFIG_USB is not set
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information
+#
+
+#
+# USB Gadget Support
+#
+# CONFIG_USB_GADGET is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT3_FS is not set
+# CONFIG_JBD is not set
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+# CONFIG_MSDOS_FS is not set
+# CONFIG_VFAT_FS is not set
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_KCORE=y
+CONFIG_SYSFS=y
+CONFIG_DEVFS_FS=y
+# CONFIG_DEVFS_MOUNT is not set
+# CONFIG_DEVFS_DEBUG is not set
+# CONFIG_DEVPTS_FS_XATTR is not set
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_XATTR is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+CONFIG_NFS_V4=y
+# CONFIG_NFS_DIRECTIO is not set
+# CONFIG_NFSD is not set
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+# CONFIG_EXPORTFS is not set
+CONFIG_SUNRPC=y
+CONFIG_SUNRPC_GSS=y
+CONFIG_RPCSEC_GSS_KRB5=y
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+# CONFIG_NLS is not set
+
+#
+# Library routines
+#
+# CONFIG_CRC_CCITT is not set
+CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_SERIAL_TEXT_DEBUG is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+CONFIG_CRYPTO_MD5=y
+# CONFIG_CRYPTO_SHA1 is not set
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+CONFIG_CRYPTO_DES=y
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_ARC4 is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_TEST is not set
diff -Nru a/arch/ppc/configs/ev64260_defconfig b/arch/ppc/configs/ev64260_defconfig
--- a/arch/ppc/configs/ev64260_defconfig	2005-01-10 20:11:22 -08:00
+++ b/arch/ppc/configs/ev64260_defconfig	2005-01-10 20:11:22 -08:00
@@ -1,26 +1,49 @@
 #
 # Automatically generated make config: don't edit
+# Linux kernel version: 2.6.10-rc2
+# Fri Nov 19 11:17:02 2004
 #
 CONFIG_MMU=y
+CONFIG_GENERIC_HARDIRQS=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
 CONFIG_HAVE_DEC_LOCK=y
+CONFIG_PPC=y
+CONFIG_PPC32=y
+CONFIG_GENERIC_NVRAM=y
 
 #
 # Code maturity level options
 #
 CONFIG_EXPERIMENTAL=y
+CONFIG_CLEAN_COMPILE=y
+CONFIG_BROKEN_ON_SMP=y
 
 #
 # General setup
 #
+CONFIG_LOCALVERSION=""
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
+# CONFIG_POSIX_MQUEUE is not set
 # CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_SYSCTL=y
+# CONFIG_AUDIT is not set
 CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_HOTPLUG is not set
+CONFIG_KOBJECT_UEVENT=y
+# CONFIG_IKCONFIG is not set
 # CONFIG_EMBEDDED is not set
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SHMEM=y
+CONFIG_CC_ALIGN_FUNCTIONS=0
+CONFIG_CC_ALIGN_LABELS=0
+CONFIG_CC_ALIGN_LOOPS=0
+CONFIG_CC_ALIGN_JUMPS=0
+# CONFIG_TINY_SHMEM is not set
 
 #
 # Loadable module support
@@ -30,31 +53,38 @@
 # CONFIG_MODULE_FORCE_UNLOAD is not set
 CONFIG_OBSOLETE_MODPARM=y
 # CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
 CONFIG_KMOD=y
 
 #
-# Platform support
+# Processor
 #
-CONFIG_PPC=y
-CONFIG_PPC32=y
 CONFIG_6xx=y
 # CONFIG_40x is not set
+# CONFIG_44x is not set
 # CONFIG_POWER3 is not set
+# CONFIG_POWER4 is not set
 # CONFIG_8xx is not set
+# CONFIG_E500 is not set
+CONFIG_ALTIVEC=y
+CONFIG_TAU=y
+# CONFIG_TAU_INT is not set
+# CONFIG_TAU_AVERAGE is not set
+# CONFIG_CPU_FREQ is not set
+CONFIG_PPC_GEN550=y
+CONFIG_PPC_STD_MMU=y
+# CONFIG_NOT_COHERENT_CACHE is not set
 
 #
-# IBM 4xx options
+# Platform options
 #
-# CONFIG_8260 is not set
-CONFIG_GENERIC_ISA_DMA=y
-CONFIG_PPC_STD_MMU=y
 # CONFIG_PPC_MULTIPLATFORM is not set
 # CONFIG_APUS is not set
-# CONFIG_WILLOW_2 is not set
+# CONFIG_WILLOW is not set
 # CONFIG_PCORE is not set
 # CONFIG_POWERPMC250 is not set
-CONFIG_EV64260=y
 # CONFIG_SPRUCE is not set
+CONFIG_EV64260=y
 # CONFIG_LOPEC is not set
 # CONFIG_MCPN765 is not set
 # CONFIG_MVME5100 is not set
@@ -66,37 +96,37 @@
 # CONFIG_K2 is not set
 # CONFIG_PAL4 is not set
 # CONFIG_GEMINI is not set
+# CONFIG_EST8260 is not set
+# CONFIG_SBC82xx is not set
+# CONFIG_SBS8260 is not set
+# CONFIG_RPX8260 is not set
+# CONFIG_TQM8260 is not set
+# CONFIG_ADS8272 is not set
+# CONFIG_LITE5200 is not set
 CONFIG_GT64260=y
-CONFIG_SERIAL_CONSOLE_BAUD=115200
-# CONFIG_SMP is not set
-# CONFIG_PREEMPT is not set
-CONFIG_ALTIVEC=y
-CONFIG_TAU=y
-# CONFIG_TAU_INT is not set
-# CONFIG_TAU_AVERAGE is not set
-# CONFIG_CPU_FREQ is not set
+CONFIG_MV64X60=y
 
 #
-# General setup
+# Set bridge options
 #
+CONFIG_MV64X60_BASE=0xf1000000
+CONFIG_MV64X60_NEW_BASE=0xfbe00000
+# CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
 # CONFIG_HIGHMEM is not set
-CONFIG_PCI=y
-CONFIG_PCI_DOMAINS=y
-CONFIG_KCORE_ELF=y
 CONFIG_BINFMT_ELF=y
-CONFIG_KERNEL_ELF=y
 CONFIG_BINFMT_MISC=y
-CONFIG_PCI_LEGACY_PROC=y
-CONFIG_PCI_NAMES=y
-# CONFIG_HOTPLUG is not set
+CONFIG_CMDLINE_BOOL=y
+CONFIG_CMDLINE="console=ttyS0,115200 ip=on"
 
 #
-# Parallel port support
+# Bus options
 #
-# CONFIG_PARPORT is not set
-# CONFIG_PPC601_SYNC_FIX is not set
-CONFIG_CMDLINE_BOOL=y
-CONFIG_CMDLINE="console=ttyS0,115200 ip=on"
+CONFIG_GENERIC_ISA_DMA=y
+CONFIG_PCI=y
+CONFIG_PCI_DOMAINS=y
+CONFIG_PCI_LEGACY_PROC=y
+CONFIG_PCI_NAMES=y
 
 #
 # Advanced setup
@@ -113,14 +143,28 @@
 CONFIG_BOOT_LOAD=0x00800000
 
 #
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+
+#
 # Memory Technology Devices (MTD)
 #
 # CONFIG_MTD is not set
 
 #
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
 # Plug and Play support
 #
-# CONFIG_PNP is not set
 
 #
 # Block devices
@@ -131,32 +175,45 @@
 # CONFIG_BLK_DEV_DAC960 is not set
 # CONFIG_BLK_DEV_UMEM is not set
 CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
 # CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_SX8 is not set
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_SIZE=4096
 CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_LBD is not set
+# CONFIG_CDROM_PKTCDVD is not set
 
 #
-# Multi-device support (RAID and LVM)
+# IO Schedulers
 #
-# CONFIG_MD is not set
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
 
 #
-# ATA/IDE/MFM/RLL support
+# ATA/ATAPI/MFM/RLL support
 #
 # CONFIG_IDE is not set
 
 #
-# SCSI support
+# SCSI device support
 #
 # CONFIG_SCSI is not set
 
 #
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
 # Fusion MPT device support
 #
 
 #
-# IEEE 1394 (FireWire) support (EXPERIMENTAL)
+# IEEE 1394 (FireWire) support
 #
 # CONFIG_IEEE1394 is not set
 
@@ -166,6 +223,10 @@
 # CONFIG_I2O is not set
 
 #
+# Macintosh device drivers
+#
+
+#
 # Networking support
 #
 CONFIG_NET=y
@@ -176,8 +237,6 @@
 CONFIG_PACKET=y
 # CONFIG_PACKET_MMAP is not set
 # CONFIG_NETLINK_DEV is not set
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
 CONFIG_UNIX=y
 # CONFIG_NET_KEY is not set
 CONFIG_INET=y
@@ -191,68 +250,81 @@
 # 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=y
 # CONFIG_INET_AH is not set
 # CONFIG_INET_ESP is not set
 # CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_IP_TCPDIAG=y
+# CONFIG_IP_TCPDIAG_IPV6 is not set
+
+#
+# IP: Virtual Server Configuration
+#
+# CONFIG_IP_VS is not set
+# CONFIG_IPV6 is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
 
 #
 # IP: Netfilter Configuration
 #
 # CONFIG_IP_NF_CONNTRACK is not set
+# CONFIG_IP_NF_CONNTRACK_MARK is not set
 # CONFIG_IP_NF_QUEUE is not set
 # CONFIG_IP_NF_IPTABLES is not set
 # CONFIG_IP_NF_ARPTABLES is not set
 # CONFIG_IP_NF_COMPAT_IPCHAINS is not set
 # CONFIG_IP_NF_COMPAT_IPFWADM is not set
-# CONFIG_IPV6 is not set
-# CONFIG_XFRM_USER is not set
 
 #
 # SCTP Configuration (EXPERIMENTAL)
 #
-CONFIG_IPV6_SCTP__=y
 # CONFIG_IP_SCTP is not set
 # CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
 # CONFIG_VLAN_8021Q is not set
-# CONFIG_LLC is not set
 # CONFIG_DECNET is not set
-# CONFIG_BRIDGE is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
 # CONFIG_X25 is not set
 # CONFIG_LAPB is not set
 # CONFIG_NET_DIVERT is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
-# CONFIG_NET_HW_FLOWCONTROL is not set
 
 #
 # QoS and/or fair queueing
 #
 # CONFIG_NET_SCHED is not set
+# CONFIG_NET_CLS_ROUTE is not set
 
 #
 # Network testing
 #
 # CONFIG_NET_PKTGEN is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
 CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
 
 #
 # ARCnet devices
 #
 # CONFIG_ARCNET is not set
-# CONFIG_DUMMY is not set
-# CONFIG_BONDING is not set
-# CONFIG_EQUALIZER is not set
-# CONFIG_TUN is not set
-# CONFIG_ETHERTAP is not set
 
 #
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
-# CONFIG_MII is not set
-# CONFIG_OAKNET is not set
+CONFIG_MII=y
 # CONFIG_HAPPYMEAL is not set
 # CONFIG_SUNGEM is not set
 # CONFIG_NET_VENDOR_3COM is not set
@@ -260,17 +332,26 @@
 #
 # Tulip family network device support
 #
-# CONFIG_NET_TULIP is not set
+CONFIG_NET_TULIP=y
+# CONFIG_DE2104X is not set
+CONFIG_TULIP=y
+# CONFIG_TULIP_MWI is not set
+# CONFIG_TULIP_MMIO is not set
+# CONFIG_TULIP_NAPI is not set
+# CONFIG_DE4X5 is not set
+# CONFIG_WINBOND_840 is not set
+# CONFIG_DM9102 is not set
 # CONFIG_HP100 is not set
 CONFIG_NET_PCI=y
 # CONFIG_PCNET32 is not set
 # CONFIG_AMD8111_ETH is not set
 # CONFIG_ADAPTEC_STARFIRE is not set
 # CONFIG_B44 is not set
+# CONFIG_FORCEDETH is not set
 # CONFIG_DGRS is not set
-CONFIG_EEPRO100=y
-# CONFIG_EEPRO100_PIO is not set
-# CONFIG_E100 is not set
+# CONFIG_EEPRO100 is not set
+CONFIG_E100=y
+# CONFIG_E100_NAPI is not set
 # CONFIG_FEALNX is not set
 # CONFIG_NATSEMI is not set
 # CONFIG_NE2K_PCI is not set
@@ -293,85 +374,98 @@
 # CONFIG_YELLOWFIN is not set
 # CONFIG_R8169 is not set
 # CONFIG_SK98LIN is not set
+# CONFIG_VIA_VELOCITY is not set
 # CONFIG_TIGON3 is not set
 
 #
 # Ethernet (10000 Mbit)
 #
 # CONFIG_IXGB is not set
-# CONFIG_FDDI is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PPP is not set
-# CONFIG_SLIP is not set
+# CONFIG_S2IO is not set
 
 #
-# Wireless LAN (non-hamradio)
+# Token Ring devices
 #
-# CONFIG_NET_RADIO is not set
+# CONFIG_TR is not set
 
 #
-# Token Ring devices (depends on LLC=y)
+# Wireless LAN (non-hamradio)
 #
-# CONFIG_RCPCI is not set
-# CONFIG_SHAPER is not set
+# CONFIG_NET_RADIO is not set
 
 #
 # Wan interfaces
 #
 # CONFIG_WAN is not set
-
-#
-# Amateur Radio support
-#
-# CONFIG_HAMRADIO is not set
-
-#
-# IrDA (infrared) support
-#
-# CONFIG_IRDA is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
 
 #
 # ISDN subsystem
 #
-# CONFIG_ISDN_BOOL is not set
+# CONFIG_ISDN is not set
 
 #
-# Graphics support
+# Telephony Support
 #
-# CONFIG_FB is not set
-
-#
-# Old CD-ROM drivers (not SCSI, not IDE)
-#
-# CONFIG_CD_NO_IDESCSI is not set
+# CONFIG_PHONE is not set
 
 #
 # Input device support
 #
-# CONFIG_INPUT is not set
+CONFIG_INPUT=y
 
 #
 # Userland interfaces
 #
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+# CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_EVBUG is not set
 
 #
 # Input I/O drivers
 #
 # CONFIG_GAMEPORT is not set
 CONFIG_SOUND_GAMEPORT=y
-# CONFIG_SERIO is not set
+CONFIG_SERIO=y
+CONFIG_SERIO_I8042=y
+CONFIG_SERIO_SERPORT=y
+# CONFIG_SERIO_CT82C710 is not set
+# CONFIG_SERIO_PCIPS2 is not set
+# CONFIG_SERIO_RAW is not set
 
 #
 # Input Device Drivers
 #
-
-#
-# Macintosh device drivers
-#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=y
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+CONFIG_INPUT_MOUSE=y
+CONFIG_MOUSE_PS2=y
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# CONFIG_INPUT_MISC is not set
 
 #
 # Character devices
 #
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
 # CONFIG_SERIAL_NONSTANDARD is not set
 
 #
@@ -379,6 +473,7 @@
 #
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_NR_UARTS=4
 # CONFIG_SERIAL_8250_EXTENDED is not set
 
 #
@@ -387,68 +482,120 @@
 CONFIG_SERIAL_CORE=y
 CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
-CONFIG_UNIX98_PTY_COUNT=256
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_NVRAM is not set
+CONFIG_GEN_RTC=y
+# CONFIG_GEN_RTC_X is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+# CONFIG_AGP is not set
+# CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
 
 #
 # I2C support
 #
 CONFIG_I2C=m
+CONFIG_I2C_CHARDEV=m
+
+#
+# I2C Algorithms
+#
 # CONFIG_I2C_ALGOBIT is not set
 # CONFIG_I2C_ALGOPCF is not set
-CONFIG_I2C_CHARDEV=m
+# CONFIG_I2C_ALGOPCA is not set
 
 #
-# I2C Hardware Sensors Mainboard support
+# I2C Hardware Bus support
 #
+# CONFIG_I2C_ALI1535 is not set
+# CONFIG_I2C_ALI1563 is not set
 # CONFIG_I2C_ALI15X3 is not set
 # CONFIG_I2C_AMD756 is not set
 # CONFIG_I2C_AMD8111 is not set
 # CONFIG_I2C_I801 is not set
+# CONFIG_I2C_I810 is not set
+# CONFIG_I2C_ISA is not set
+# CONFIG_I2C_NFORCE2 is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
 # CONFIG_I2C_PIIX4 is not set
+# CONFIG_I2C_PROSAVAGE is not set
+# CONFIG_I2C_SAVAGE4 is not set
+# CONFIG_SCx200_ACB is not set
+# CONFIG_I2C_SIS5595 is not set
+# CONFIG_I2C_SIS630 is not set
 # CONFIG_I2C_SIS96X is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_VIA is not set
 # CONFIG_I2C_VIAPRO is not set
+# CONFIG_I2C_VOODOO3 is not set
+# CONFIG_I2C_PCA_ISA is not set
 
 #
-# I2C Hardware Sensors Chip support
+# Hardware Sensors Chip support
 #
+# CONFIG_I2C_SENSOR is not set
 # CONFIG_SENSORS_ADM1021 is not set
+# CONFIG_SENSORS_ADM1025 is not set
+# CONFIG_SENSORS_ADM1031 is not set
+# CONFIG_SENSORS_ASB100 is not set
+# CONFIG_SENSORS_DS1621 is not set
+# CONFIG_SENSORS_FSCHER is not set
+# CONFIG_SENSORS_GL518SM is not set
 # CONFIG_SENSORS_IT87 is not set
+# CONFIG_SENSORS_LM63 is not set
 # CONFIG_SENSORS_LM75 is not set
+# CONFIG_SENSORS_LM77 is not set
+# CONFIG_SENSORS_LM78 is not set
+# CONFIG_SENSORS_LM80 is not set
+# CONFIG_SENSORS_LM83 is not set
 # CONFIG_SENSORS_LM85 is not set
+# CONFIG_SENSORS_LM87 is not set
+# CONFIG_SENSORS_LM90 is not set
+# CONFIG_SENSORS_MAX1619 is not set
+# CONFIG_SENSORS_PC87360 is not set
+# CONFIG_SENSORS_SMSC47M1 is not set
 # CONFIG_SENSORS_VIA686A is not set
 # CONFIG_SENSORS_W83781D is not set
-# CONFIG_I2C_SENSOR is not set
-
-#
-# Mice
-#
-# CONFIG_BUSMOUSE is not set
-# CONFIG_QIC02_TAPE is not set
+# CONFIG_SENSORS_W83L785TS is not set
+# CONFIG_SENSORS_W83627HF is not set
 
 #
-# IPMI
+# Other I2C Chip support
 #
-# CONFIG_IPMI_HANDLER is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_RTC8564 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
 
 #
-# Watchdog Cards
+# Dallas's 1-wire bus
 #
-# CONFIG_WATCHDOG is not set
-# CONFIG_NVRAM is not set
-CONFIG_GEN_RTC=y
-# CONFIG_GEN_RTC_X is not set
-# CONFIG_DTLK is not set
-# CONFIG_R3964 is not set
-# CONFIG_APPLICOM is not set
+# CONFIG_W1 is not set
 
 #
-# Ftape, the floppy tape device driver
+# Misc devices
 #
-# CONFIG_FTAPE is not set
-# CONFIG_AGP is not set
-# CONFIG_DRM is not set
-# CONFIG_RAW_DRIVER is not set
-# CONFIG_HANGCHECK_TIMER is not set
 
 #
 # Multimedia devices
@@ -461,6 +608,34 @@
 # CONFIG_DVB is not set
 
 #
+# Graphics support
+#
+# CONFIG_FB is not set
+
+#
+# Console display driver support
+#
+CONFIG_VGA_CONSOLE=y
+CONFIG_DUMMY_CONSOLE=y
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+
+#
+# USB support
+#
+# CONFIG_USB is not set
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+
+#
+# USB Gadget Support
+#
+# CONFIG_USB_GADGET is not set
+
+#
 # File systems
 #
 CONFIG_EXT2_FS=y
@@ -473,6 +648,7 @@
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 # CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
 
@@ -485,19 +661,23 @@
 #
 # DOS/FAT/NT Filesystems
 #
-# CONFIG_FAT_FS is not set
+# CONFIG_MSDOS_FS is not set
+# CONFIG_VFAT_FS is not set
 # CONFIG_NTFS_FS is not set
 
 #
 # Pseudo filesystems
 #
 CONFIG_PROC_FS=y
+# CONFIG_PROC_KCORE is not set
+CONFIG_SYSFS=y
 CONFIG_DEVFS_FS=y
 # CONFIG_DEVFS_MOUNT is not set
 # CONFIG_DEVFS_DEBUG is not set
-CONFIG_DEVPTS_FS=y
 # CONFIG_DEVPTS_FS_XATTR is not set
 CONFIG_TMPFS=y
+# CONFIG_TMPFS_XATTR is not set
+# CONFIG_HUGETLB_PAGE is not set
 CONFIG_RAMFS=y
 
 #
@@ -506,6 +686,7 @@
 # CONFIG_ADFS_FS is not set
 # CONFIG_AFFS_FS is not set
 # CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
 # CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
 # CONFIG_EFS_FS is not set
@@ -522,18 +703,19 @@
 CONFIG_NFS_FS=y
 CONFIG_NFS_V3=y
 # CONFIG_NFS_V4 is not set
+# CONFIG_NFS_DIRECTIO is not set
 # CONFIG_NFSD is not set
 CONFIG_ROOT_NFS=y
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
 # CONFIG_EXPORTFS is not set
 CONFIG_SUNRPC=y
-# CONFIG_SUNRPC_GSS is not set
+# CONFIG_RPCSEC_GSS_KRB5 is not set
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
 # CONFIG_AFS_FS is not set
 
 #
@@ -543,36 +725,32 @@
 CONFIG_MSDOS_PARTITION=y
 
 #
-# Sound
-#
-# CONFIG_SOUND is not set
-
-#
-# USB support
+# Native Language Support
 #
-# CONFIG_USB is not set
-# CONFIG_USB_GADGET is not set
+# CONFIG_NLS is not set
 
 #
-# Bluetooth support
+# Library routines
 #
-# CONFIG_BT is not set
+# CONFIG_CRC_CCITT is not set
+CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
 
 #
-# Library routines
+# Profiling support
 #
-# CONFIG_CRC32 is not set
+# CONFIG_PROFILING is not set
 
 #
 # Kernel hacking
 #
 # CONFIG_DEBUG_KERNEL is not set
-# CONFIG_KALLSYMS is not set
 # CONFIG_SERIAL_TEXT_DEBUG is not set
 
 #
 # Security options
 #
+# CONFIG_KEYS is not set
 # CONFIG_SECURITY is not set
 
 #
diff -Nru a/arch/ppc/configs/ibmchrp_defconfig b/arch/ppc/configs/ibmchrp_defconfig
--- a/arch/ppc/configs/ibmchrp_defconfig	2005-01-10 20:11:19 -08:00
+++ b/arch/ppc/configs/ibmchrp_defconfig	2005-01-10 20:11:19 -08:00
@@ -367,7 +367,6 @@
 CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_IP_NF_TARGET_NETMAP=m
 CONFIG_IP_NF_TARGET_SAME=m
-# CONFIG_IP_NF_NAT_LOCAL is not set
 CONFIG_IP_NF_NAT_SNMP_BASIC=m
 CONFIG_IP_NF_NAT_IRC=m
 CONFIG_IP_NF_NAT_FTP=m
diff -Nru a/arch/ppc/configs/k2_defconfig b/arch/ppc/configs/k2_defconfig
--- a/arch/ppc/configs/k2_defconfig	2005-01-10 20:11:15 -08:00
+++ b/arch/ppc/configs/k2_defconfig	2005-01-10 20:11:15 -08:00
@@ -319,7 +319,6 @@
 CONFIG_IP_NF_TARGET_REDIRECT=m
 # CONFIG_IP_NF_TARGET_NETMAP is not set
 # CONFIG_IP_NF_TARGET_SAME is not set
-# CONFIG_IP_NF_NAT_LOCAL is not set
 # CONFIG_IP_NF_NAT_SNMP_BASIC is not set
 CONFIG_IP_NF_NAT_FTP=m
 # CONFIG_IP_NF_MANGLE is not set
diff -Nru a/arch/ppc/configs/katana_defconfig b/arch/ppc/configs/katana_defconfig
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/ppc/configs/katana_defconfig	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,651 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.10-rc2
+# Fri Nov 19 15:17:10 2004
+#
+CONFIG_MMU=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_HAVE_DEC_LOCK=y
+CONFIG_PPC=y
+CONFIG_PPC32=y
+CONFIG_GENERIC_NVRAM=y
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_CLEAN_COMPILE=y
+CONFIG_BROKEN_ON_SMP=y
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_AUDIT is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_HOTPLUG is not set
+CONFIG_KOBJECT_UEVENT=y
+# CONFIG_IKCONFIG is not set
+# CONFIG_EMBEDDED is not set
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SHMEM=y
+CONFIG_CC_ALIGN_FUNCTIONS=0
+CONFIG_CC_ALIGN_LABELS=0
+CONFIG_CC_ALIGN_LOOPS=0
+CONFIG_CC_ALIGN_JUMPS=0
+# CONFIG_TINY_SHMEM is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_OBSOLETE_MODPARM=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+
+#
+# Processor
+#
+CONFIG_6xx=y
+# CONFIG_40x is not set
+# CONFIG_44x is not set
+# CONFIG_POWER3 is not set
+# CONFIG_POWER4 is not set
+# CONFIG_8xx is not set
+# CONFIG_E500 is not set
+CONFIG_ALTIVEC=y
+# CONFIG_TAU is not set
+# CONFIG_CPU_FREQ is not set
+CONFIG_PPC_STD_MMU=y
+CONFIG_NOT_COHERENT_CACHE=y
+
+#
+# Platform options
+#
+# CONFIG_PPC_MULTIPLATFORM is not set
+# CONFIG_APUS is not set
+CONFIG_KATANA=y
+# CONFIG_WILLOW is not set
+# CONFIG_PCORE is not set
+# CONFIG_POWERPMC250 is not set
+# CONFIG_SPRUCE is not set
+# CONFIG_EV64260 is not set
+# CONFIG_LOPEC is not set
+# CONFIG_MCPN765 is not set
+# CONFIG_MVME5100 is not set
+# CONFIG_PPLUS is not set
+# CONFIG_PRPMC750 is not set
+# CONFIG_PRPMC800 is not set
+# CONFIG_SANDPOINT is not set
+# CONFIG_ADIR is not set
+# CONFIG_K2 is not set
+# CONFIG_PAL4 is not set
+# CONFIG_GEMINI is not set
+# CONFIG_EST8260 is not set
+# CONFIG_SBC82xx is not set
+# CONFIG_SBS8260 is not set
+# CONFIG_RPX8260 is not set
+# CONFIG_TQM8260 is not set
+# CONFIG_ADS8272 is not set
+# CONFIG_LITE5200 is not set
+CONFIG_MV64360=y
+CONFIG_MV64X60=y
+
+#
+# Set bridge options
+#
+CONFIG_MV64X60_BASE=0xf8100000
+CONFIG_MV64X60_NEW_BASE=0xf8100000
+# CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
+# CONFIG_HIGHMEM is not set
+CONFIG_BINFMT_ELF=y
+CONFIG_BINFMT_MISC=y
+CONFIG_CMDLINE_BOOL=y
+CONFIG_CMDLINE="console=ttyMM0,9600 ip=on"
+
+#
+# Bus options
+#
+CONFIG_GENERIC_ISA_DMA=y
+CONFIG_PCI=y
+CONFIG_PCI_DOMAINS=y
+CONFIG_PCI_LEGACY_PROC=y
+CONFIG_PCI_NAMES=y
+
+#
+# Advanced setup
+#
+CONFIG_ADVANCED_OPTIONS=y
+CONFIG_HIGHMEM_START=0xfe000000
+# CONFIG_LOWMEM_SIZE_BOOL is not set
+CONFIG_LOWMEM_SIZE=0x30000000
+# CONFIG_KERNEL_START_BOOL is not set
+CONFIG_KERNEL_START=0xc0000000
+# CONFIG_TASK_SIZE_BOOL is not set
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_CONSISTENT_START_BOOL=y
+CONFIG_CONSISTENT_START=0xf0000000
+# CONFIG_CONSISTENT_SIZE_BOOL is not set
+CONFIG_CONSISTENT_SIZE=0x00200000
+# CONFIG_BOOT_LOAD_BOOL is not set
+CONFIG_BOOT_LOAD=0x00800000
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+
+#
+# Memory Technology Devices (MTD)
+#
+# CONFIG_MTD is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_CPQ_CISS_DA is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_UMEM is not set
+CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_SX8 is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_SIZE=4096
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_LBD is not set
+# CONFIG_CDROM_PKTCDVD is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_SCSI is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+
+#
+# IEEE 1394 (FireWire) support
+#
+# CONFIG_IEEE1394 is not set
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Macintosh device drivers
+#
+
+#
+# Networking support
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+# CONFIG_NETLINK_DEV is not set
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_IP_TCPDIAG=y
+# CONFIG_IP_TCPDIAG_IPV6 is not set
+# CONFIG_IPV6 is not set
+# CONFIG_NETFILTER is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_NET_DIVERT is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+# CONFIG_NET_CLS_ROUTE is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+
+#
+# ARCnet devices
+#
+# CONFIG_ARCNET is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_HAPPYMEAL is not set
+# CONFIG_SUNGEM is not set
+# CONFIG_NET_VENDOR_3COM is not set
+
+#
+# Tulip family network device support
+#
+CONFIG_NET_TULIP=y
+# CONFIG_DE2104X is not set
+CONFIG_TULIP=y
+# CONFIG_TULIP_MWI is not set
+# CONFIG_TULIP_MMIO is not set
+# CONFIG_TULIP_NAPI is not set
+# CONFIG_DE4X5 is not set
+# CONFIG_WINBOND_840 is not set
+# CONFIG_DM9102 is not set
+# CONFIG_HP100 is not set
+CONFIG_NET_PCI=y
+# CONFIG_PCNET32 is not set
+# CONFIG_AMD8111_ETH is not set
+# CONFIG_ADAPTEC_STARFIRE is not set
+# CONFIG_B44 is not set
+# CONFIG_FORCEDETH is not set
+# CONFIG_DGRS is not set
+# CONFIG_EEPRO100 is not set
+CONFIG_E100=y
+# CONFIG_E100_NAPI is not set
+# CONFIG_FEALNX is not set
+# CONFIG_NATSEMI is not set
+# CONFIG_NE2K_PCI is not set
+# CONFIG_8139CP is not set
+# CONFIG_8139TOO is not set
+# CONFIG_SIS900 is not set
+# CONFIG_EPIC100 is not set
+# CONFIG_SUNDANCE is not set
+# CONFIG_TLAN is not set
+# CONFIG_VIA_RHINE is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+# CONFIG_ACENIC is not set
+# CONFIG_DL2K is not set
+# CONFIG_E1000 is not set
+# CONFIG_NS83820 is not set
+# CONFIG_HAMACHI is not set
+# CONFIG_YELLOWFIN is not set
+# CONFIG_R8169 is not set
+# CONFIG_SK98LIN is not set
+# CONFIG_VIA_VELOCITY is not set
+# CONFIG_TIGON3 is not set
+
+#
+# Ethernet (10000 Mbit)
+#
+# CONFIG_IXGB is not set
+# CONFIG_S2IO is not set
+
+#
+# Token Ring devices
+#
+# CONFIG_TR is not set
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Telephony Support
+#
+# CONFIG_PHONE is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+# CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+# CONFIG_SERIO is not set
+# CONFIG_SERIO_I8042 is not set
+
+#
+# Input Device Drivers
+#
+# CONFIG_INPUT_KEYBOARD is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_NVRAM is not set
+CONFIG_GEN_RTC=y
+# CONFIG_GEN_RTC_X is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+# CONFIG_AGP is not set
+# CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# I2C support
+#
+# CONFIG_I2C is not set
+
+#
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+
+#
+# Misc devices
+#
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# Graphics support
+#
+# CONFIG_FB is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+
+#
+# USB support
+#
+# CONFIG_USB is not set
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+
+#
+# USB Gadget Support
+#
+# CONFIG_USB_GADGET is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT3_FS is not set
+# CONFIG_JBD is not set
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+# CONFIG_MSDOS_FS is not set
+# CONFIG_VFAT_FS is not set
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_KCORE=y
+CONFIG_SYSFS=y
+CONFIG_DEVFS_FS=y
+# CONFIG_DEVFS_MOUNT is not set
+# CONFIG_DEVFS_DEBUG is not set
+# CONFIG_DEVPTS_FS_XATTR is not set
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_XATTR is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V4 is not set
+# CONFIG_NFS_DIRECTIO is not set
+# CONFIG_NFSD is not set
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+# CONFIG_EXPORTFS is not set
+CONFIG_SUNRPC=y
+# CONFIG_RPCSEC_GSS_KRB5 is not set
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+# CONFIG_NLS is not set
+
+#
+# Library routines
+#
+# CONFIG_CRC_CCITT is not set
+CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_DEBUG_KERNEL is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+# CONFIG_CRYPTO is not set
diff -Nru a/arch/ppc/configs/menf1_defconfig b/arch/ppc/configs/menf1_defconfig
--- a/arch/ppc/configs/menf1_defconfig	2005-01-10 20:11:23 -08:00
+++ b/arch/ppc/configs/menf1_defconfig	2005-01-10 20:11:23 -08:00
@@ -249,7 +249,6 @@
 CONFIG_IP_NF_NAT_NEEDED=y
 CONFIG_IP_NF_TARGET_MASQUERADE=m
 CONFIG_IP_NF_TARGET_REDIRECT=m
-# CONFIG_IP_NF_NAT_LOCAL is not set
 # CONFIG_IP_NF_NAT_SNMP_BASIC is not set
 CONFIG_IP_NF_NAT_IRC=m
 CONFIG_IP_NF_NAT_FTP=m
diff -Nru a/arch/ppc/configs/pcore_defconfig b/arch/ppc/configs/pcore_defconfig
--- a/arch/ppc/configs/pcore_defconfig	2005-01-10 20:11:19 -08:00
+++ b/arch/ppc/configs/pcore_defconfig	2005-01-10 20:11:19 -08:00
@@ -332,7 +332,6 @@
 CONFIG_IP_NF_TARGET_REDIRECT=m
 # CONFIG_IP_NF_TARGET_NETMAP is not set
 # CONFIG_IP_NF_TARGET_SAME is not set
-# CONFIG_IP_NF_NAT_LOCAL is not set
 # CONFIG_IP_NF_NAT_SNMP_BASIC is not set
 CONFIG_IP_NF_NAT_IRC=m
 CONFIG_IP_NF_NAT_FTP=m
diff -Nru a/arch/ppc/configs/pmac_defconfig b/arch/ppc/configs/pmac_defconfig
--- a/arch/ppc/configs/pmac_defconfig	2005-01-10 20:11:22 -08:00
+++ b/arch/ppc/configs/pmac_defconfig	2005-01-10 20:11:22 -08:00
@@ -479,7 +479,6 @@
 CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_IP_NF_TARGET_NETMAP=m
 CONFIG_IP_NF_TARGET_SAME=m
-# CONFIG_IP_NF_NAT_LOCAL is not set
 CONFIG_IP_NF_NAT_SNMP_BASIC=m
 CONFIG_IP_NF_NAT_IRC=m
 CONFIG_IP_NF_NAT_FTP=m
diff -Nru a/arch/ppc/configs/pplus_defconfig b/arch/ppc/configs/pplus_defconfig
--- a/arch/ppc/configs/pplus_defconfig	2005-01-10 20:11:20 -08:00
+++ b/arch/ppc/configs/pplus_defconfig	2005-01-10 20:11:20 -08:00
@@ -343,7 +343,6 @@
 CONFIG_IP_NF_TARGET_REDIRECT=m
 # CONFIG_IP_NF_TARGET_NETMAP is not set
 # CONFIG_IP_NF_TARGET_SAME is not set
-# CONFIG_IP_NF_NAT_LOCAL is not set
 # CONFIG_IP_NF_NAT_SNMP_BASIC is not set
 CONFIG_IP_NF_NAT_FTP=m
 # CONFIG_IP_NF_MANGLE is not set
diff -Nru a/arch/ppc/defconfig b/arch/ppc/defconfig
--- a/arch/ppc/defconfig	2005-01-10 20:11:21 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,1330 +0,0 @@
-#
-# Automatically generated make config: don't edit
-#
-CONFIG_MMU=y
-CONFIG_RWSEM_XCHGADD_ALGORITHM=y
-CONFIG_HAVE_DEC_LOCK=y
-CONFIG_PPC=y
-CONFIG_PPC32=y
-CONFIG_GENERIC_NVRAM=y
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_CLEAN_COMPILE=y
-# CONFIG_STANDALONE is not set
-CONFIG_BROKEN_ON_SMP=y
-
-#
-# General setup
-#
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-CONFIG_POSIX_MQUEUE=y
-# CONFIG_BSD_PROCESS_ACCT is not set
-CONFIG_SYSCTL=y
-# CONFIG_AUDIT is not set
-CONFIG_LOG_BUF_SHIFT=14
-CONFIG_HOTPLUG=y
-CONFIG_IKCONFIG=y
-CONFIG_IKCONFIG_PROC=y
-# CONFIG_EMBEDDED is not set
-CONFIG_KALLSYMS=y
-CONFIG_FUTEX=y
-CONFIG_EPOLL=y
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
-
-#
-# Loadable module support
-#
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-# CONFIG_MODULE_FORCE_UNLOAD is not set
-CONFIG_OBSOLETE_MODPARM=y
-CONFIG_MODVERSIONS=y
-CONFIG_KMOD=y
-
-#
-# Processor
-#
-CONFIG_6xx=y
-# CONFIG_40x is not set
-# CONFIG_44x is not set
-# CONFIG_POWER3 is not set
-# CONFIG_POWER4 is not set
-# CONFIG_8xx is not set
-CONFIG_ALTIVEC=y
-CONFIG_TAU=y
-# CONFIG_TAU_INT is not set
-# CONFIG_TAU_AVERAGE is not set
-CONFIG_CPU_FREQ=y
-CONFIG_CPU_FREQ_PROC_INTF=y
-CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
-# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
-CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
-CONFIG_CPU_FREQ_GOV_POWERSAVE=y
-CONFIG_CPU_FREQ_GOV_USERSPACE=y
-# CONFIG_CPU_FREQ_24_API is not set
-CONFIG_CPU_FREQ_PMAC=y
-CONFIG_CPU_FREQ_TABLE=y
-CONFIG_PPC601_SYNC_FIX=y
-CONFIG_PM=y
-CONFIG_PPC_STD_MMU=y
-
-#
-# Platform options
-#
-CONFIG_PPC_MULTIPLATFORM=y
-# CONFIG_APUS is not set
-# CONFIG_WILLOW is not set
-# CONFIG_PCORE is not set
-# CONFIG_POWERPMC250 is not set
-# CONFIG_EV64260 is not set
-# CONFIG_SPRUCE is not set
-# CONFIG_LOPEC is not set
-# CONFIG_MCPN765 is not set
-# CONFIG_MVME5100 is not set
-# CONFIG_PPLUS is not set
-# CONFIG_PRPMC750 is not set
-# CONFIG_PRPMC800 is not set
-# CONFIG_SANDPOINT is not set
-# CONFIG_ADIR is not set
-# CONFIG_K2 is not set
-# CONFIG_PAL4 is not set
-# CONFIG_GEMINI is not set
-# CONFIG_EST8260 is not set
-# CONFIG_SBS8260 is not set
-# CONFIG_RPX6 is not set
-# CONFIG_TQM8260 is not set
-CONFIG_PPC_CHRP=y
-CONFIG_PPC_PMAC=y
-CONFIG_PPC_PREP=y
-CONFIG_PPC_OF=y
-CONFIG_PPCBUG_NVRAM=y
-# CONFIG_SMP is not set
-# CONFIG_PREEMPT is not set
-# CONFIG_HIGHMEM is not set
-CONFIG_KERNEL_ELF=y
-CONFIG_BINFMT_ELF=y
-CONFIG_BINFMT_MISC=m
-CONFIG_PROC_DEVICETREE=y
-CONFIG_PPC_RTAS=y
-CONFIG_PREP_RESIDUAL=y
-CONFIG_PROC_PREPRESIDUAL=y
-CONFIG_CMDLINE_BOOL=y
-CONFIG_CMDLINE="console=ttyS0,9600 console=tty0 root=/dev/sda2"
-
-#
-# Bus options
-#
-CONFIG_ISA=y
-CONFIG_GENERIC_ISA_DMA=y
-CONFIG_PCI=y
-CONFIG_PCI_DOMAINS=y
-CONFIG_PCI_LEGACY_PROC=y
-CONFIG_PCI_NAMES=y
-
-#
-# PCMCIA/CardBus support
-#
-# CONFIG_PCMCIA is not set
-CONFIG_PCMCIA_PROBE=y
-
-#
-# Advanced setup
-#
-CONFIG_ADVANCED_OPTIONS=y
-CONFIG_HIGHMEM_START=0xfe000000
-# CONFIG_LOWMEM_SIZE_BOOL is not set
-CONFIG_LOWMEM_SIZE=0x30000000
-# CONFIG_KERNEL_START_BOOL is not set
-CONFIG_KERNEL_START=0xc0000000
-# CONFIG_TASK_SIZE_BOOL is not set
-CONFIG_TASK_SIZE=0x80000000
-CONFIG_BOOT_LOAD=0x00800000
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-# CONFIG_FW_LOADER is not set
-
-#
-# Memory Technology Devices (MTD)
-#
-# CONFIG_MTD is not set
-
-#
-# Parallel port support
-#
-# CONFIG_PARPORT is not set
-
-#
-# Plug and Play support
-#
-# CONFIG_PNP is not set
-
-#
-# Block devices
-#
-CONFIG_BLK_DEV_FD=m
-# CONFIG_BLK_DEV_XD is not set
-# CONFIG_BLK_CPQ_DA is not set
-# CONFIG_BLK_CPQ_CISS_DA is not set
-# CONFIG_BLK_DEV_DAC960 is not set
-# CONFIG_BLK_DEV_UMEM is not set
-CONFIG_BLK_DEV_LOOP=y
-# CONFIG_BLK_DEV_CRYPTOLOOP is not set
-# CONFIG_BLK_DEV_NBD is not set
-# CONFIG_BLK_DEV_CARMEL is not set
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_SIZE=4096
-CONFIG_BLK_DEV_INITRD=y
-CONFIG_LBD=y
-
-#
-# ATA/ATAPI/MFM/RLL support
-#
-CONFIG_IDE=y
-CONFIG_BLK_DEV_IDE=y
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-CONFIG_BLK_DEV_IDEDISK=y
-# CONFIG_IDEDISK_MULTI_MODE is not set
-# CONFIG_IDEDISK_STROKE is not set
-CONFIG_BLK_DEV_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
-# CONFIG_IDE_TASKFILE_IO is not set
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_IDE_GENERIC=y
-CONFIG_BLK_DEV_IDEPCI=y
-CONFIG_IDEPCI_SHARE_IRQ=y
-# CONFIG_BLK_DEV_OFFBOARD is not set
-CONFIG_BLK_DEV_GENERIC=y
-# CONFIG_BLK_DEV_OPTI621 is not set
-CONFIG_BLK_DEV_SL82C105=y
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-CONFIG_IDEDMA_PCI_AUTO=y
-# CONFIG_IDEDMA_ONLYDISK is not set
-CONFIG_BLK_DEV_ADMA=y
-# CONFIG_BLK_DEV_AEC62XX is not set
-# CONFIG_BLK_DEV_ALI15X3 is not set
-# CONFIG_BLK_DEV_AMD74XX is not set
-CONFIG_BLK_DEV_CMD64X=y
-# CONFIG_BLK_DEV_TRIFLEX is not set
-# CONFIG_BLK_DEV_CY82C693 is not set
-# CONFIG_BLK_DEV_CS5520 is not set
-# CONFIG_BLK_DEV_CS5530 is not set
-# CONFIG_BLK_DEV_HPT34X is not set
-# CONFIG_BLK_DEV_HPT366 is not set
-# CONFIG_BLK_DEV_SC1200 is not set
-# CONFIG_BLK_DEV_PIIX is not set
-# CONFIG_BLK_DEV_NS87415 is not set
-# CONFIG_BLK_DEV_PDC202XX_OLD is not set
-# CONFIG_BLK_DEV_PDC202XX_NEW is not set
-# CONFIG_BLK_DEV_SVWKS is not set
-# CONFIG_BLK_DEV_SIIMAGE 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_BLK_DEV_IDE_PMAC=y
-CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y
-CONFIG_BLK_DEV_IDEDMA_PMAC=y
-CONFIG_BLK_DEV_IDE_PMAC_BLINK=y
-CONFIG_BLK_DEV_IDEDMA_PMAC_AUTO=y
-# CONFIG_IDE_CHIPSETS is not set
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
-CONFIG_IDEDMA_AUTO=y
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI device support
-#
-CONFIG_SCSI=y
-CONFIG_SCSI_PROC_FS=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=y
-CONFIG_CHR_DEV_ST=y
-# CONFIG_CHR_DEV_OSST is not set
-CONFIG_BLK_DEV_SR=y
-CONFIG_BLK_DEV_SR_VENDOR=y
-CONFIG_CHR_DEV_SG=y
-
-#
-# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
-#
-# CONFIG_SCSI_MULTI_LUN is not set
-CONFIG_SCSI_REPORT_LUNS=y
-CONFIG_SCSI_CONSTANTS=y
-# CONFIG_SCSI_LOGGING is not set
-
-#
-# SCSI Transport Attributes
-#
-CONFIG_SCSI_SPI_ATTRS=y
-# CONFIG_SCSI_FC_ATTRS 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_AACRAID is not set
-CONFIG_SCSI_AIC7XXX=m
-CONFIG_AIC7XXX_CMDS_PER_DEVICE=253
-CONFIG_AIC7XXX_RESET_DELAY_MS=15000
-# CONFIG_AIC7XXX_BUILD_FIRMWARE is not set
-CONFIG_AIC7XXX_DEBUG_ENABLE=y
-CONFIG_AIC7XXX_DEBUG_MASK=0
-CONFIG_AIC7XXX_REG_PRETTY_PRINT=y
-CONFIG_SCSI_AIC7XXX_OLD=m
-# CONFIG_SCSI_AIC79XX is not set
-CONFIG_SCSI_ADVANSYS=m
-# CONFIG_SCSI_IN2000 is not set
-# CONFIG_SCSI_MEGARAID is not set
-# CONFIG_SCSI_SATA is not set
-# CONFIG_SCSI_BUSLOGIC is not set
-# CONFIG_SCSI_CPQFCTS is not set
-# CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_DTC3280 is not set
-# CONFIG_SCSI_EATA is not set
-# 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_GENERIC_NCR5380_MMIO is not set
-# CONFIG_SCSI_IPS is not set
-# CONFIG_SCSI_INIA100 is not set
-# CONFIG_SCSI_NCR53C406A is not set
-CONFIG_SCSI_SYM53C8XX_2=y
-CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=0
-CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
-CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
-# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
-# CONFIG_SCSI_IPR is not set
-# CONFIG_SCSI_PAS16 is not set
-# CONFIG_SCSI_PSI240I is not set
-# CONFIG_SCSI_QLOGIC_FAS is not set
-# CONFIG_SCSI_QLOGIC_ISP is not set
-# CONFIG_SCSI_QLOGIC_FC is not set
-# CONFIG_SCSI_QLOGIC_1280 is not set
-CONFIG_SCSI_QLA2XXX=y
-# CONFIG_SCSI_QLA21XX is not set
-# CONFIG_SCSI_QLA22XX is not set
-# CONFIG_SCSI_QLA2300 is not set
-# CONFIG_SCSI_QLA2322 is not set
-# CONFIG_SCSI_QLA6312 is not set
-# CONFIG_SCSI_QLA6322 is not set
-# CONFIG_SCSI_SYM53C416 is not set
-# CONFIG_SCSI_DC395x 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
-CONFIG_SCSI_MESH=y
-CONFIG_SCSI_MESH_SYNC_RATE=5
-CONFIG_SCSI_MESH_RESET_DELAY_MS=4000
-CONFIG_SCSI_MAC53C94=y
-
-#
-# Old CD-ROM drivers (not SCSI, not IDE)
-#
-# CONFIG_CD_NO_IDESCSI is not set
-
-#
-# Multi-device support (RAID and LVM)
-#
-# CONFIG_MD is not set
-
-#
-# Fusion MPT device support
-#
-# CONFIG_FUSION is not set
-
-#
-# IEEE 1394 (FireWire) support
-#
-# CONFIG_IEEE1394 is not set
-
-#
-# I2O device support
-#
-# CONFIG_I2O is not set
-
-#
-# Macintosh device drivers
-#
-CONFIG_ADB=y
-CONFIG_ADB_CUDA=y
-CONFIG_ADB_PMU=y
-CONFIG_PMAC_PBOOK=y
-CONFIG_PMAC_APM_EMU=y
-CONFIG_PMAC_BACKLIGHT=y
-# CONFIG_MAC_FLOPPY is not set
-CONFIG_MAC_SERIAL=m
-CONFIG_ADB_MACIO=y
-CONFIG_INPUT_ADBHID=y
-CONFIG_MAC_EMUMOUSEBTN=y
-CONFIG_THERM_WINDTUNNEL=m
-CONFIG_THERM_ADT746X=m
-# CONFIG_ANSLCD is not set
-
-#
-# Networking support
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-CONFIG_PACKET=y
-# CONFIG_PACKET_MMAP is not set
-# CONFIG_NETLINK_DEV is not set
-CONFIG_UNIX=y
-# CONFIG_NET_KEY is not set
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-# 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_IP_MROUTE is not set
-# CONFIG_ARPD is not set
-CONFIG_SYN_COOKIES=y
-# CONFIG_INET_AH is not set
-# CONFIG_INET_ESP is not set
-# CONFIG_INET_IPCOMP is not set
-
-#
-# IP: Virtual Server Configuration
-#
-# CONFIG_IP_VS is not set
-# CONFIG_IPV6 is not set
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-
-#
-# IP: Netfilter Configuration
-#
-CONFIG_IP_NF_CONNTRACK=m
-CONFIG_IP_NF_FTP=m
-CONFIG_IP_NF_IRC=m
-CONFIG_IP_NF_TFTP=m
-CONFIG_IP_NF_AMANDA=m
-# CONFIG_IP_NF_QUEUE is not set
-CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_LIMIT=m
-CONFIG_IP_NF_MATCH_IPRANGE=m
-CONFIG_IP_NF_MATCH_MAC=m
-CONFIG_IP_NF_MATCH_PKTTYPE=m
-CONFIG_IP_NF_MATCH_MARK=m
-CONFIG_IP_NF_MATCH_MULTIPORT=m
-CONFIG_IP_NF_MATCH_TOS=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
-CONFIG_IP_NF_MATCH_DSCP=m
-CONFIG_IP_NF_MATCH_AH_ESP=m
-CONFIG_IP_NF_MATCH_LENGTH=m
-CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_TCPMSS=m
-CONFIG_IP_NF_MATCH_HELPER=m
-CONFIG_IP_NF_MATCH_STATE=m
-CONFIG_IP_NF_MATCH_CONNTRACK=m
-CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-CONFIG_IP_NF_NAT=m
-CONFIG_IP_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
-CONFIG_IP_NF_TARGET_NETMAP=m
-CONFIG_IP_NF_TARGET_SAME=m
-# CONFIG_IP_NF_NAT_LOCAL is not set
-CONFIG_IP_NF_NAT_SNMP_BASIC=m
-CONFIG_IP_NF_NAT_IRC=m
-CONFIG_IP_NF_NAT_FTP=m
-CONFIG_IP_NF_NAT_TFTP=m
-CONFIG_IP_NF_NAT_AMANDA=m
-# CONFIG_IP_NF_MANGLE is not set
-# CONFIG_IP_NF_TARGET_LOG is not set
-# CONFIG_IP_NF_TARGET_ULOG is not set
-CONFIG_IP_NF_TARGET_TCPMSS=m
-CONFIG_IP_NF_ARPTABLES=m
-CONFIG_IP_NF_ARPFILTER=m
-CONFIG_IP_NF_ARP_MANGLE=m
-CONFIG_IP_NF_COMPAT_IPCHAINS=m
-# CONFIG_IP_NF_COMPAT_IPFWADM is not set
-CONFIG_IP_NF_TARGET_NOTRACK=m
-CONFIG_IP_NF_RAW=m
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-# CONFIG_IP_SCTP is not set
-# CONFIG_ATM is not set
-# CONFIG_BRIDGE is not set
-# CONFIG_VLAN_8021Q is not set
-# CONFIG_DECNET is not set
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_NET_DIVERT is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-# CONFIG_NET_HW_FLOWCONTROL is not set
-
-#
-# QoS and/or fair queueing
-#
-# CONFIG_NET_SCHED is not set
-
-#
-# Network testing
-#
-# CONFIG_NET_PKTGEN is not set
-# CONFIG_NETPOLL is not set
-# CONFIG_NET_POLL_CONTROLLER is not set
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-# CONFIG_BT is not set
-CONFIG_NETDEVICES=y
-# CONFIG_DUMMY is not set
-# CONFIG_BONDING is not set
-# CONFIG_EQUALIZER is not set
-# CONFIG_TUN is not set
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
-
-#
-# Ethernet (10 or 100Mbit)
-#
-CONFIG_NET_ETHERNET=y
-CONFIG_MII=y
-CONFIG_MACE=y
-# CONFIG_MACE_AAUI_PORT is not set
-CONFIG_BMAC=y
-# CONFIG_OAKNET is not set
-# CONFIG_HAPPYMEAL is not set
-# CONFIG_SUNGEM is not set
-# CONFIG_NET_VENDOR_3COM is not set
-# CONFIG_LANCE is not set
-# CONFIG_NET_VENDOR_SMC is not set
-# CONFIG_NET_VENDOR_RACAL is not set
-
-#
-# Tulip family network device support
-#
-# CONFIG_NET_TULIP is not set
-# CONFIG_AT1700 is not set
-# CONFIG_DEPCA is not set
-# CONFIG_HP100 is not set
-# CONFIG_NET_ISA is not set
-CONFIG_NET_PCI=y
-CONFIG_PCNET32=y
-# CONFIG_AMD8111_ETH is not set
-# CONFIG_ADAPTEC_STARFIRE is not set
-# CONFIG_AC3200 is not set
-# CONFIG_APRICOT is not set
-# CONFIG_B44 is not set
-# CONFIG_FORCEDETH is not set
-# CONFIG_CS89x0 is not set
-# CONFIG_DGRS is not set
-# CONFIG_EEPRO100 is not set
-# CONFIG_E100 is not set
-# CONFIG_FEALNX is not set
-# CONFIG_NATSEMI is not set
-# CONFIG_NE2K_PCI is not set
-# CONFIG_8139CP is not set
-# CONFIG_8139TOO is not set
-# CONFIG_SIS900 is not set
-# CONFIG_EPIC100 is not set
-# CONFIG_SUNDANCE is not set
-# CONFIG_TLAN is not set
-# CONFIG_VIA_RHINE is not set
-# CONFIG_NET_POCKET is not set
-
-#
-# Ethernet (1000 Mbit)
-#
-# CONFIG_ACENIC is not set
-# CONFIG_DL2K is not set
-# CONFIG_E1000 is not set
-# CONFIG_NS83820 is not set
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-# CONFIG_R8169 is not set
-# CONFIG_SK98LIN is not set
-# CONFIG_TIGON3 is not set
-
-#
-# Ethernet (10000 Mbit)
-#
-# CONFIG_IXGB is not set
-# CONFIG_S2IO is not set
-
-#
-# Token Ring devices
-#
-# CONFIG_TR is not set
-
-#
-# Wireless LAN (non-hamradio)
-#
-CONFIG_NET_RADIO=y
-
-#
-# Obsolete Wireless cards support (pre-802.11)
-#
-# CONFIG_STRIP is not set
-# CONFIG_ARLAN is not set
-# CONFIG_WAVELAN is not set
-
-#
-# Wireless 802.11b ISA/PCI cards support
-#
-# CONFIG_AIRO is not set
-CONFIG_HERMES=m
-CONFIG_APPLE_AIRPORT=m
-# CONFIG_PLX_HERMES is not set
-# CONFIG_TMD_HERMES is not set
-# CONFIG_PCI_HERMES is not set
-# CONFIG_ATMEL is not set
-
-#
-# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
-#
-# CONFIG_PRISM54 is not set
-CONFIG_NET_WIRELESS=y
-
-#
-# Wan interfaces
-#
-# CONFIG_WAN is not set
-# CONFIG_FDDI is not set
-# CONFIG_HIPPI is not set
-CONFIG_PPP=y
-CONFIG_PPP_MULTILINK=y
-# CONFIG_PPP_FILTER is not set
-CONFIG_PPP_ASYNC=y
-# CONFIG_PPP_SYNC_TTY is not set
-CONFIG_PPP_DEFLATE=y
-# CONFIG_PPP_BSDCOMP is not set
-# CONFIG_PPPOE is not set
-# CONFIG_SLIP is not set
-# CONFIG_NET_FC is not set
-# CONFIG_RCPCI is not set
-# CONFIG_SHAPER is not set
-# CONFIG_NETCONSOLE is not set
-
-#
-# ISDN subsystem
-#
-# CONFIG_ISDN is not set
-
-#
-# Telephony Support
-#
-# CONFIG_PHONE is not set
-
-#
-# Input device support
-#
-CONFIG_INPUT=y
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_MOUSEDEV=y
-CONFIG_INPUT_MOUSEDEV_PSAUX=y
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-# CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_TSDEV is not set
-CONFIG_INPUT_EVDEV=y
-CONFIG_INPUT_EVBUG=y
-
-#
-# Input I/O drivers
-#
-# CONFIG_GAMEPORT is not set
-CONFIG_SOUND_GAMEPORT=y
-CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-CONFIG_SERIO_SERPORT=y
-# CONFIG_SERIO_CT82C710 is not set
-# CONFIG_SERIO_PCIPS2 is not set
-
-#
-# Input Device Drivers
-#
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_KEYBOARD_ATKBD=y
-# CONFIG_KEYBOARD_SUNKBD is not set
-# CONFIG_KEYBOARD_LKKBD is not set
-# CONFIG_KEYBOARD_XTKBD is not set
-# CONFIG_KEYBOARD_NEWTON is not set
-CONFIG_INPUT_MOUSE=y
-CONFIG_MOUSE_PS2=y
-# CONFIG_MOUSE_SERIAL is not set
-# CONFIG_MOUSE_INPORT is not set
-# CONFIG_MOUSE_LOGIBM is not set
-# CONFIG_MOUSE_PC110PAD is not set
-# CONFIG_MOUSE_VSXXXAA is not set
-# CONFIG_INPUT_JOYSTICK is not set
-# CONFIG_INPUT_TOUCHSCREEN is not set
-# CONFIG_INPUT_MISC is not set
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_HW_CONSOLE=y
-# CONFIG_SERIAL_NONSTANDARD is not set
-
-#
-# Serial drivers
-#
-CONFIG_SERIAL_8250=y
-# CONFIG_SERIAL_8250_CONSOLE is not set
-CONFIG_SERIAL_8250_NR_UARTS=4
-# CONFIG_SERIAL_8250_EXTENDED is not set
-
-#
-# Non-8250 serial port support
-#
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_PMACZILOG=y
-# CONFIG_SERIAL_PMACZILOG_CONSOLE is not set
-CONFIG_UNIX98_PTYS=y
-CONFIG_LEGACY_PTYS=y
-CONFIG_LEGACY_PTY_COUNT=256
-# CONFIG_QIC02_TAPE is not set
-
-#
-# IPMI
-#
-# CONFIG_IPMI_HANDLER is not set
-
-#
-# Watchdog Cards
-#
-# CONFIG_WATCHDOG is not set
-CONFIG_NVRAM=y
-CONFIG_GEN_RTC=y
-# CONFIG_GEN_RTC_X is not set
-# CONFIG_DTLK is not set
-# CONFIG_R3964 is not set
-# CONFIG_APPLICOM is not set
-
-#
-# Ftape, the floppy tape device driver
-#
-# CONFIG_FTAPE is not set
-# CONFIG_AGP is not set
-# CONFIG_DRM is not set
-# CONFIG_RAW_DRIVER is not set
-
-#
-# I2C support
-#
-CONFIG_I2C=y
-CONFIG_I2C_CHARDEV=m
-
-#
-# I2C Algorithms
-#
-CONFIG_I2C_ALGOBIT=y
-# CONFIG_I2C_ALGOPCF is not set
-
-#
-# I2C Hardware Bus support
-#
-# CONFIG_I2C_ALI1535 is not set
-# CONFIG_I2C_ALI1563 is not set
-# CONFIG_I2C_ALI15X3 is not set
-# CONFIG_I2C_AMD756 is not set
-# CONFIG_I2C_AMD8111 is not set
-# CONFIG_I2C_ELEKTOR is not set
-CONFIG_I2C_HYDRA=y
-# CONFIG_I2C_I801 is not set
-# CONFIG_I2C_I810 is not set
-# CONFIG_I2C_ISA is not set
-CONFIG_I2C_KEYWEST=m
-# CONFIG_I2C_NFORCE2 is not set
-# CONFIG_I2C_PARPORT_LIGHT is not set
-# CONFIG_I2C_PIIX4 is not set
-# CONFIG_I2C_PROSAVAGE is not set
-# CONFIG_I2C_SAVAGE4 is not set
-# CONFIG_SCx200_ACB is not set
-# CONFIG_I2C_SIS5595 is not set
-# CONFIG_I2C_SIS630 is not set
-# CONFIG_I2C_SIS96X is not set
-# CONFIG_I2C_VIA is not set
-# CONFIG_I2C_VIAPRO is not set
-# CONFIG_I2C_VOODOO3 is not set
-
-#
-# Hardware Sensors Chip support
-#
-# CONFIG_I2C_SENSOR is not set
-# CONFIG_SENSORS_ADM1021 is not set
-# CONFIG_SENSORS_ASB100 is not set
-# CONFIG_SENSORS_DS1621 is not set
-# CONFIG_SENSORS_FSCHER is not set
-# CONFIG_SENSORS_GL518SM is not set
-# CONFIG_SENSORS_IT87 is not set
-# CONFIG_SENSORS_LM75 is not set
-# CONFIG_SENSORS_LM78 is not set
-# CONFIG_SENSORS_LM80 is not set
-# CONFIG_SENSORS_LM83 is not set
-# CONFIG_SENSORS_LM85 is not set
-# CONFIG_SENSORS_LM90 is not set
-# CONFIG_SENSORS_VIA686A is not set
-# CONFIG_SENSORS_W83781D is not set
-# CONFIG_SENSORS_W83L785TS is not set
-# CONFIG_SENSORS_W83627HF is not set
-
-#
-# Other I2C Chip support
-#
-# CONFIG_SENSORS_EEPROM is not set
-# CONFIG_SENSORS_PCF8574 is not set
-# CONFIG_SENSORS_PCF8591 is not set
-# CONFIG_I2C_DEBUG_CORE is not set
-# CONFIG_I2C_DEBUG_ALGO is not set
-# CONFIG_I2C_DEBUG_BUS is not set
-# CONFIG_I2C_DEBUG_CHIP is not set
-
-#
-# Misc devices
-#
-
-#
-# Multimedia devices
-#
-# CONFIG_VIDEO_DEV is not set
-
-#
-# Digital Video Broadcasting Devices
-#
-# CONFIG_DVB is not set
-
-#
-# Graphics support
-#
-CONFIG_FB=y
-# CONFIG_FB_PM2 is not set
-# CONFIG_FB_CYBER2000 is not set
-CONFIG_FB_OF=y
-CONFIG_FB_CONTROL=y
-CONFIG_FB_PLATINUM=y
-CONFIG_FB_VALKYRIE=y
-CONFIG_FB_CT65550=y
-CONFIG_FB_IMSTT=y
-# CONFIG_FB_S3TRIO is not set
-# CONFIG_FB_VGA16 is not set
-# CONFIG_FB_RIVA is not set
-CONFIG_FB_MATROX=y
-CONFIG_FB_MATROX_MILLENIUM=y
-CONFIG_FB_MATROX_MYSTIQUE=y
-# CONFIG_FB_MATROX_G450 is not set
-CONFIG_FB_MATROX_G100A=y
-CONFIG_FB_MATROX_G100=y
-CONFIG_FB_MATROX_I2C=y
-# CONFIG_FB_MATROX_MAVEN is not set
-# CONFIG_FB_MATROX_MULTIHEAD is not set
-# CONFIG_FB_RADEON_OLD is not set
-CONFIG_FB_RADEON=y
-CONFIG_FB_RADEON_I2C=y
-# CONFIG_FB_RADEON_DEBUG is not set
-CONFIG_FB_ATY128=y
-CONFIG_FB_ATY=y
-CONFIG_FB_ATY_CT=y
-CONFIG_FB_ATY_GX=y
-# CONFIG_FB_ATY_XL_INIT is not set
-# CONFIG_FB_SIS is not set
-# CONFIG_FB_NEOMAGIC is not set
-# CONFIG_FB_KYRO is not set
-CONFIG_FB_3DFX=y
-# CONFIG_FB_VOODOO1 is not set
-# CONFIG_FB_TRIDENT is not set
-# CONFIG_FB_VIRTUAL is not set
-
-#
-# Console display driver support
-#
-CONFIG_VGA_CONSOLE=y
-# CONFIG_MDA_CONSOLE is not set
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-CONFIG_PCI_CONSOLE=y
-# CONFIG_FONTS is not set
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-
-#
-# Logo configuration
-#
-CONFIG_LOGO=y
-CONFIG_LOGO_LINUX_MONO=y
-CONFIG_LOGO_LINUX_VGA16=y
-CONFIG_LOGO_LINUX_CLUT224=y
-
-#
-# Sound
-#
-CONFIG_SOUND=m
-CONFIG_DMASOUND_PMAC=m
-CONFIG_DMASOUND=m
-
-#
-# Advanced Linux Sound Architecture
-#
-CONFIG_SND=m
-CONFIG_SND_TIMER=m
-CONFIG_SND_PCM=m
-CONFIG_SND_HWDEP=m
-CONFIG_SND_RAWMIDI=m
-CONFIG_SND_SEQUENCER=m
-CONFIG_SND_SEQ_DUMMY=m
-CONFIG_SND_OSSEMUL=y
-CONFIG_SND_MIXER_OSS=m
-CONFIG_SND_PCM_OSS=m
-CONFIG_SND_SEQUENCER_OSS=y
-# CONFIG_SND_VERBOSE_PRINTK is not set
-# CONFIG_SND_DEBUG is not set
-
-#
-# Generic devices
-#
-CONFIG_SND_MPU401_UART=m
-CONFIG_SND_OPL3_LIB=m
-# CONFIG_SND_DUMMY is not set
-# CONFIG_SND_VIRMIDI is not set
-# CONFIG_SND_MTPAV is not set
-# CONFIG_SND_SERIAL_U16550 is not set
-# CONFIG_SND_MPU401 is not set
-
-#
-# ISA devices
-#
-# CONFIG_SND_AD1848 is not set
-# CONFIG_SND_CS4231 is not set
-CONFIG_SND_CS4232=m
-# CONFIG_SND_CS4236 is not set
-# CONFIG_SND_ES1688 is not set
-# CONFIG_SND_ES18XX is not set
-# CONFIG_SND_GUSCLASSIC is not set
-# CONFIG_SND_GUSEXTREME is not set
-# CONFIG_SND_GUSMAX is not set
-# CONFIG_SND_INTERWAVE is not set
-# CONFIG_SND_INTERWAVE_STB is not set
-# CONFIG_SND_OPTI92X_AD1848 is not set
-# CONFIG_SND_OPTI92X_CS4231 is not set
-# CONFIG_SND_OPTI93X is not set
-# CONFIG_SND_SB8 is not set
-# CONFIG_SND_SB16 is not set
-# CONFIG_SND_SBAWE is not set
-# CONFIG_SND_WAVEFRONT is not set
-# CONFIG_SND_CMI8330 is not set
-# CONFIG_SND_OPL3SA2 is not set
-# CONFIG_SND_SGALAXY is not set
-# CONFIG_SND_SSCAPE is not set
-
-#
-# PCI devices
-#
-# CONFIG_SND_ALI5451 is not set
-# CONFIG_SND_ATIIXP is not set
-# CONFIG_SND_AU8810 is not set
-# CONFIG_SND_AU8820 is not set
-# CONFIG_SND_AU8830 is not set
-# CONFIG_SND_AZT3328 is not set
-# CONFIG_SND_BT87X is not set
-# CONFIG_SND_CS46XX is not set
-# CONFIG_SND_CS4281 is not set
-# CONFIG_SND_EMU10K1 is not set
-# CONFIG_SND_KORG1212 is not set
-# CONFIG_SND_MIXART is not set
-# CONFIG_SND_NM256 is not set
-# CONFIG_SND_RME32 is not set
-# CONFIG_SND_RME96 is not set
-# CONFIG_SND_RME9652 is not set
-# CONFIG_SND_HDSP is not set
-# CONFIG_SND_TRIDENT is not set
-# CONFIG_SND_YMFPCI is not set
-# CONFIG_SND_ALS4000 is not set
-# CONFIG_SND_CMIPCI is not set
-# CONFIG_SND_ENS1370 is not set
-# CONFIG_SND_ENS1371 is not set
-# CONFIG_SND_ES1938 is not set
-# CONFIG_SND_ES1968 is not set
-# CONFIG_SND_MAESTRO3 is not set
-# CONFIG_SND_FM801 is not set
-# CONFIG_SND_ICE1712 is not set
-# CONFIG_SND_ICE1724 is not set
-# CONFIG_SND_INTEL8X0 is not set
-# CONFIG_SND_INTEL8X0M is not set
-# CONFIG_SND_SONICVIBES is not set
-# CONFIG_SND_VIA82XX is not set
-# CONFIG_SND_VX222 is not set
-
-#
-# ALSA PowerMac devices
-#
-CONFIG_SND_POWERMAC=m
-
-#
-# ALSA USB devices
-#
-CONFIG_SND_USB_AUDIO=m
-
-#
-# Open Sound System
-#
-# CONFIG_SOUND_PRIME is not set
-
-#
-# USB support
-#
-CONFIG_USB=y
-# CONFIG_USB_DEBUG is not set
-
-#
-# Miscellaneous USB options
-#
-CONFIG_USB_DEVICEFS=y
-# 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=y
-# CONFIG_USB_UHCI_HCD is not set
-
-#
-# 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=m
-CONFIG_USB_PRINTER=m
-CONFIG_USB_STORAGE=m
-# CONFIG_USB_STORAGE_DEBUG is not set
-# CONFIG_USB_STORAGE_DATAFAB is not set
-CONFIG_USB_STORAGE_FREECOM=y
-# CONFIG_USB_STORAGE_ISD200 is not set
-CONFIG_USB_STORAGE_DPCM=y
-# 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=y
-CONFIG_USB_HIDINPUT=y
-# CONFIG_HID_FF is not set
-# CONFIG_USB_HIDDEV is not set
-# CONFIG_USB_AIPTEK is not set
-# CONFIG_USB_WACOM is not set
-# CONFIG_USB_KBTAB is not set
-# CONFIG_USB_POWERMATE is not set
-# CONFIG_USB_MTOUCH is not set
-# CONFIG_USB_XPAD is not set
-# CONFIG_USB_ATI_REMOTE is not set
-
-#
-# USB Imaging devices
-#
-# CONFIG_USB_MDC800 is not set
-# CONFIG_USB_MICROTEK is not set
-# CONFIG_USB_HPUSBSCSI is not set
-
-#
-# USB Multimedia devices
-#
-# CONFIG_USB_DABUSB is not set
-
-#
-# Video4Linux support is needed for USB Multimedia device support
-#
-
-#
-# USB Network adaptors
-#
-# CONFIG_USB_CATC is not set
-# CONFIG_USB_KAWETH is not set
-# CONFIG_USB_PEGASUS is not set
-# CONFIG_USB_RTL8150 is not set
-# CONFIG_USB_USBNET is not set
-
-#
-# USB port drivers
-#
-
-#
-# USB Serial Converter support
-#
-CONFIG_USB_SERIAL=m
-# CONFIG_USB_SERIAL_GENERIC is not set
-# CONFIG_USB_SERIAL_BELKIN is not set
-# CONFIG_USB_SERIAL_WHITEHEAT is not set
-# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
-# CONFIG_USB_SERIAL_EMPEG is not set
-# CONFIG_USB_SERIAL_FTDI_SIO is not set
-CONFIG_USB_SERIAL_VISOR=m
-# 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=m
-# CONFIG_USB_SERIAL_KEYSPAN_MPR is not set
-CONFIG_USB_SERIAL_KEYSPAN_USA28=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
-CONFIG_USB_SERIAL_KEYSPAN_USA19=y
-CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
-# CONFIG_USB_SERIAL_KEYSPAN_USA19QW is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19QI is not set
-CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
-# CONFIG_USB_SERIAL_KEYSPAN_USA49WLC is not set
-# CONFIG_USB_SERIAL_KLSI is not set
-# CONFIG_USB_SERIAL_KOBIL_SCT is not set
-# CONFIG_USB_SERIAL_MCT_U232 is not set
-# CONFIG_USB_SERIAL_PL2303 is not set
-# CONFIG_USB_SERIAL_SAFE is not set
-# CONFIG_USB_SERIAL_CYBERJACK is not set
-# CONFIG_USB_SERIAL_XIRCOM is not set
-# CONFIG_USB_SERIAL_OMNINET is not set
-CONFIG_USB_EZUSB=y
-
-#
-# USB Miscellaneous drivers
-#
-# CONFIG_USB_EMI62 is not set
-# CONFIG_USB_EMI26 is not set
-# CONFIG_USB_TIGL is not set
-# CONFIG_USB_AUERSWALD is not set
-# CONFIG_USB_RIO500 is not set
-# CONFIG_USB_LEGOTOWER is not set
-# CONFIG_USB_LCD is not set
-# CONFIG_USB_LED is not set
-# CONFIG_USB_CYTHERM is not set
-# CONFIG_USB_TEST is not set
-
-#
-# USB Gadget Support
-#
-# CONFIG_USB_GADGET is not set
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=y
-# CONFIG_EXT2_FS_XATTR is not set
-# CONFIG_EXT3_FS is not set
-# CONFIG_JBD is not set
-# CONFIG_REISERFS_FS is not set
-# CONFIG_JFS_FS is not set
-# CONFIG_XFS_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_ROMFS_FS is not set
-# CONFIG_QUOTA is not set
-# CONFIG_AUTOFS_FS is not set
-# CONFIG_AUTOFS4_FS is not set
-
-#
-# CD-ROM/DVD Filesystems
-#
-CONFIG_ISO9660_FS=y
-# CONFIG_JOLIET is not set
-# CONFIG_ZISOFS is not set
-# CONFIG_UDF_FS is not set
-
-#
-# DOS/FAT/NT Filesystems
-#
-CONFIG_FAT_FS=m
-CONFIG_MSDOS_FS=m
-CONFIG_VFAT_FS=m
-# CONFIG_NTFS_FS is not set
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-CONFIG_SYSFS=y
-CONFIG_DEVFS_FS=y
-# CONFIG_DEVFS_MOUNT is not set
-# CONFIG_DEVFS_DEBUG is not set
-# CONFIG_DEVPTS_FS_XATTR is not set
-CONFIG_TMPFS=y
-# CONFIG_HUGETLB_PAGE is not set
-CONFIG_RAMFS=y
-
-#
-# Miscellaneous filesystems
-#
-# CONFIG_ADFS_FS is not set
-# CONFIG_AFFS_FS is not set
-CONFIG_HFS_FS=m
-CONFIG_HFSPLUS_FS=m
-# CONFIG_BEFS_FS is not set
-# CONFIG_BFS_FS is not set
-# CONFIG_EFS_FS is not set
-# CONFIG_CRAMFS is not set
-# CONFIG_VXFS_FS is not set
-# CONFIG_HPFS_FS is not set
-# CONFIG_QNX4FS_FS is not set
-# CONFIG_SYSV_FS is not set
-# CONFIG_UFS_FS is not set
-
-#
-# Network File Systems
-#
-CONFIG_NFS_FS=y
-CONFIG_NFS_V3=y
-# CONFIG_NFS_V4 is not set
-# CONFIG_NFS_DIRECTIO is not set
-CONFIG_NFSD=y
-CONFIG_NFSD_V3=y
-# CONFIG_NFSD_V4 is not set
-CONFIG_NFSD_TCP=y
-CONFIG_LOCKD=y
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=y
-CONFIG_SUNRPC=y
-# CONFIG_RPCSEC_GSS_KRB5 is not set
-# CONFIG_SMB_FS is not set
-# CONFIG_CIFS is not set
-# CONFIG_NCP_FS is not set
-# CONFIG_CODA_FS is not set
-# CONFIG_AFS_FS is not set
-
-#
-# Partition Types
-#
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-# CONFIG_OSF_PARTITION is not set
-# CONFIG_AMIGA_PARTITION is not set
-# CONFIG_ATARI_PARTITION is not set
-CONFIG_MAC_PARTITION=y
-CONFIG_MSDOS_PARTITION=y
-# CONFIG_BSD_DISKLABEL is not set
-# CONFIG_MINIX_SUBPARTITION is not set
-# CONFIG_SOLARIS_X86_PARTITION is not set
-# CONFIG_UNIXWARE_DISKLABEL is not set
-# CONFIG_LDM_PARTITION is not set
-# CONFIG_NEC98_PARTITION is not set
-# CONFIG_SGI_PARTITION is not set
-# CONFIG_ULTRIX_PARTITION is not set
-# CONFIG_SUN_PARTITION is not set
-# CONFIG_EFI_PARTITION is not set
-
-#
-# Native Language Support
-#
-CONFIG_NLS=y
-CONFIG_NLS_DEFAULT="iso8859-1"
-# CONFIG_NLS_CODEPAGE_437 is not set
-# CONFIG_NLS_CODEPAGE_737 is not set
-# CONFIG_NLS_CODEPAGE_775 is not set
-# CONFIG_NLS_CODEPAGE_850 is not set
-# CONFIG_NLS_CODEPAGE_852 is not set
-# CONFIG_NLS_CODEPAGE_855 is not set
-# CONFIG_NLS_CODEPAGE_857 is not set
-# CONFIG_NLS_CODEPAGE_860 is not set
-# CONFIG_NLS_CODEPAGE_861 is not set
-# CONFIG_NLS_CODEPAGE_862 is not set
-# CONFIG_NLS_CODEPAGE_863 is not set
-# CONFIG_NLS_CODEPAGE_864 is not set
-# CONFIG_NLS_CODEPAGE_865 is not set
-# CONFIG_NLS_CODEPAGE_866 is not set
-# CONFIG_NLS_CODEPAGE_869 is not set
-# CONFIG_NLS_CODEPAGE_936 is not set
-# CONFIG_NLS_CODEPAGE_950 is not set
-# CONFIG_NLS_CODEPAGE_932 is not set
-# CONFIG_NLS_CODEPAGE_949 is not set
-# CONFIG_NLS_CODEPAGE_874 is not set
-# CONFIG_NLS_ISO8859_8 is not set
-# CONFIG_NLS_CODEPAGE_1250 is not set
-# CONFIG_NLS_CODEPAGE_1251 is not set
-CONFIG_NLS_ISO8859_1=m
-# 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
-
-#
-# Library routines
-#
-CONFIG_CRC32=y
-# CONFIG_LIBCRC32C is not set
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=y
-
-#
-# Kernel hacking
-#
-# CONFIG_DEBUG_KERNEL is not set
-CONFIG_BOOTX_TEXT=y
-
-#
-# Security options
-#
-# CONFIG_SECURITY is not set
-
-#
-# Cryptographic options
-#
-# CONFIG_CRYPTO is not set
diff -Nru a/arch/ppc/kernel/Makefile b/arch/ppc/kernel/Makefile
--- a/arch/ppc/kernel/Makefile	2005-01-10 20:11:22 -08:00
+++ b/arch/ppc/kernel/Makefile	2005-01-10 20:11:22 -08:00
@@ -14,7 +14,7 @@
 obj-y				:= entry.o traps.o irq.o idle.o time.o misc.o \
 					process.o signal.o ptrace.o align.o \
 					semaphore.o syscalls.o setup.o \
-					cputable.o ppc_htab.o
+					cputable.o ppc_htab.o perfmon.o
 obj-$(CONFIG_6xx)		+= l2cr.o cpu_setup_6xx.o
 obj-$(CONFIG_POWER4)		+= cpu_setup_power4.o
 obj-$(CONFIG_MODULES)		+= module.o ppc_ksyms.o
@@ -24,6 +24,7 @@
 obj-$(CONFIG_SMP)		+= smp.o smp-tbsync.o
 obj-$(CONFIG_TAU)		+= temp.o
 obj-$(CONFIG_ALTIVEC)		+= vecemu.o vector.o
+obj-$(CONFIG_FSL_BOOKE)		+= perfmon_fsl_booke.o
 
 ifndef CONFIG_MATH_EMULATION
 obj-$(CONFIG_8xx)		+= softemu8xx.o
diff -Nru a/arch/ppc/kernel/entry.S b/arch/ppc/kernel/entry.S
--- a/arch/ppc/kernel/entry.S	2005-01-10 20:11:22 -08:00
+++ b/arch/ppc/kernel/entry.S	2005-01-10 20:11:22 -08:00
@@ -111,8 +111,10 @@
 	addi	r11,r1,STACK_FRAME_OVERHEAD
 	stw	r11,PT_REGS(r12)
 #if defined(CONFIG_40x) || defined(CONFIG_BOOKE)
-	lwz	r12,PTRACE-THREAD(r12)
-	andi.	r12,r12,PT_PTRACED
+	/* Check to see if the dbcr0 register is set up to debug.  Use the
+	   single-step bit to do this. */
+	lwz	r12,THREAD_DBCR0(r12)
+	andis.	r12,r12,DBCR0_IC@h
 	beq+	3f
 	/* From user and task is ptraced - load up global dbcr0 */
 	li	r12,-1			/* clear all pending debug events */
@@ -242,9 +244,10 @@
 	bne-	syscall_exit_work
 syscall_exit_cont:
 #if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
-	/* If the process has its own DBCR0 value, load it up */
-	lwz	r0,PTRACE(r2)
-	andi.	r0,r0,PT_PTRACED
+	/* If the process has its own DBCR0 value, load it up.  The single
+	   step bit tells us that dbcr0 should be loaded. */
+	lwz	r0,THREAD+THREAD_DBCR0(r2)
+	andis.	r10,r0,DBCR0_IC@h
 	bnel-	load_dbcr0
 #endif
 	stwcx.	r0,0,r1			/* to clear the reservation */
@@ -599,9 +602,10 @@
 
 restore_user:
 #if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
-	/* Check whether this process has its own DBCR0 value */
-	lwz	r0,PTRACE(r2)
-	andi.	r0,r0,PT_PTRACED
+	/* Check whether this process has its own DBCR0 value.  The single
+	   step bit tells us that dbcr0 should be loaded. */
+	lwz	r0,THREAD+THREAD_DBCR0(r2)
+	andis.	r10,r0,DBCR0_IC@h
 	bnel-	load_dbcr0
 #endif
 
@@ -876,17 +880,17 @@
 
 /*
  * Load the DBCR0 value for a task that is being ptraced,
- * having first saved away the global DBCR0.
+ * having first saved away the global DBCR0.  Note that r0
+ * has the dbcr0 value to set upon entry to this.
  */
 load_dbcr0:
-	mfmsr	r0		/* first disable debug exceptions */
-	rlwinm	r0,r0,0,~MSR_DE
-	mtmsr	r0
+	mfmsr	r10		/* first disable debug exceptions */
+	rlwinm	r10,r10,0,~MSR_DE
+	mtmsr	r10
 	isync
 	mfspr	r10,SPRN_DBCR0
 	lis	r11,global_dbcr0@ha
 	addi	r11,r11,global_dbcr0@l
-	lwz	r0,THREAD+THREAD_DBCR0(r2)
 	stw	r10,0(r11)
 	mtspr	SPRN_DBCR0,r0
 	lwz	r10,4(r11)
diff -Nru a/arch/ppc/kernel/head_44x.S b/arch/ppc/kernel/head_44x.S
--- a/arch/ppc/kernel/head_44x.S	2005-01-10 20:11:17 -08:00
+++ b/arch/ppc/kernel/head_44x.S	2005-01-10 20:11:17 -08:00
@@ -414,30 +414,16 @@
 	b	data_access
 
 	/* Instruction Storage Interrupt */
-	START_EXCEPTION(InstructionStorage)
-	NORMAL_EXCEPTION_PROLOG
-	mr      r4,r12                  /* Pass SRR0 as arg2 */
-	li      r5,0                    /* Pass zero as arg3 */
-	EXC_XFER_EE_LITE(0x0400, handle_page_fault)
+	INSTRUCTION_STORAGE_EXCEPTION
 
 	/* External Input Interrupt */
 	EXCEPTION(0x0500, ExternalInput, do_IRQ, EXC_XFER_LITE)
 
 	/* Alignment Interrupt */
-	START_EXCEPTION(Alignment)
-	NORMAL_EXCEPTION_PROLOG
-	mfspr   r4,SPRN_DEAR            /* Grab the DEAR and save it */
-	stw     r4,_DEAR(r11)
-	addi    r3,r1,STACK_FRAME_OVERHEAD
-	EXC_XFER_EE(0x0600, AlignmentException)
+	ALIGNMENT_EXCEPTION
 
 	/* Program Interrupt */
-	START_EXCEPTION(Program)
-	NORMAL_EXCEPTION_PROLOG
-	mfspr	r4,SPRN_ESR		/* Grab the ESR and save it */
-	stw	r4,_ESR(r11)
-	addi	r3,r1,STACK_FRAME_OVERHEAD
-	EXC_XFER_STD(0x700, ProgramCheckException)
+	PROGRAM_EXCEPTION
 
 	/* Floating Point Unavailable Interrupt */
 	EXCEPTION(0x2010, FloatingPointUnavailable, UnknownException, EXC_XFER_EE)
@@ -451,12 +437,7 @@
 	EXCEPTION(0x2020, AuxillaryProcessorUnavailable, UnknownException, EXC_XFER_EE)
 
 	/* Decrementer Interrupt */
-	START_EXCEPTION(Decrementer)
-	NORMAL_EXCEPTION_PROLOG
-	lis     r0,TSR_DIS@h            /* Setup the DEC interrupt mask */
-	mtspr   SPRN_TSR,r0		/* Clear the DEC interrupt */
-	addi    r3,r1,STACK_FRAME_OVERHEAD
-	EXC_XFER_LITE(0x1000, timer_interrupt)
+	DECREMENTER_EXCEPTION
 
 	/* Fixed Internal Timer Interrupt */
 	/* TODO: Add FIT support */
diff -Nru a/arch/ppc/kernel/head_booke.h b/arch/ppc/kernel/head_booke.h
--- a/arch/ppc/kernel/head_booke.h	2005-01-10 20:11:16 -08:00
+++ b/arch/ppc/kernel/head_booke.h	2005-01-10 20:11:16 -08:00
@@ -303,4 +303,37 @@
 	addi	r3,r1,STACK_FRAME_OVERHEAD;				      \
 	EXC_XFER_TEMPLATE(DebugException, 0x2002, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), NOCOPY, crit_transfer_to_handler, ret_from_crit_exc)
 
+#define INSTRUCTION_STORAGE_EXCEPTION					      \
+	START_EXCEPTION(InstructionStorage)				      \
+	NORMAL_EXCEPTION_PROLOG;					      \
+	mfspr	r5,SPRN_ESR;		/* Grab the ESR and save it */	      \
+	stw	r5,_ESR(r11);						      \
+	mr      r4,r12;                 /* Pass SRR0 as arg2 */		      \
+	li      r5,0;                   /* Pass zero as arg3 */		      \
+	EXC_XFER_EE_LITE(0x0400, handle_page_fault)
+
+#define ALIGNMENT_EXCEPTION						      \
+	START_EXCEPTION(Alignment)					      \
+	NORMAL_EXCEPTION_PROLOG;					      \
+	mfspr   r4,SPRN_DEAR;           /* Grab the DEAR and save it */	      \
+	stw     r4,_DEAR(r11);						      \
+	addi    r3,r1,STACK_FRAME_OVERHEAD;				      \
+	EXC_XFER_EE(0x0600, AlignmentException)
+
+#define PROGRAM_EXCEPTION						      \
+	START_EXCEPTION(Program)					      \
+	NORMAL_EXCEPTION_PROLOG;					      \
+	mfspr	r4,SPRN_ESR;		/* Grab the ESR and save it */	      \
+	stw	r4,_ESR(r11);						      \
+	addi	r3,r1,STACK_FRAME_OVERHEAD;				      \
+	EXC_XFER_STD(0x0700, ProgramCheckException)
+
+#define DECREMENTER_EXCEPTION						      \
+	START_EXCEPTION(Decrementer)					      \
+	NORMAL_EXCEPTION_PROLOG;					      \
+	lis     r0,TSR_DIS@h;           /* Setup the DEC interrupt mask */    \
+	mtspr   SPRN_TSR,r0;		/* Clear the DEC interrupt */	      \
+	addi    r3,r1,STACK_FRAME_OVERHEAD;				      \
+	EXC_XFER_LITE(0x0900, timer_interrupt)
+
 #endif /* __HEAD_BOOKE_H__ */
diff -Nru a/arch/ppc/kernel/head_e500.S b/arch/ppc/kernel/head_e500.S
--- a/arch/ppc/kernel/head_e500.S	2005-01-10 20:11:21 -08:00
+++ b/arch/ppc/kernel/head_e500.S	2005-01-10 20:11:21 -08:00
@@ -119,7 +119,7 @@
 	tlbsx	0,r6				/* Fall through, we had to match */
 match_TLB:
 	mfspr	r7,SPRN_MAS0
-	rlwinm	r3,r7,16,28,31			/* Extract MAS0(Entry) */
+	rlwinm	r3,r7,16,20,31			/* Extract MAS0(Entry) */
 
 	mfspr	r7,SPRN_MAS1			/* Insure IPROT set */
 	oris	r7,r7,MAS1_IPROT@h
@@ -131,7 +131,7 @@
 	andi.	r9,r9,0xfff
 	li	r6,0				/* Set Entry counter to 0 */
 1:	lis	r7,0x1000			/* Set MAS0(TLBSEL) = 1 */
-	rlwimi	r7,r6,16,12,15			/* Setup MAS0 = TLBSEL | ESEL(r6) */
+	rlwimi	r7,r6,16,4,15			/* Setup MAS0 = TLBSEL | ESEL(r6) */
 	mtspr	SPRN_MAS0,r7
 	tlbre
 	mfspr	r7,SPRN_MAS1
@@ -163,13 +163,13 @@
 	andi.	r5, r3, 0x1	/* Find an entry not used and is non-zero */
 	addi	r5, r5, 0x1
 	lis	r7,0x1000	/* Set MAS0(TLBSEL) = 1 */
-	rlwimi	r7,r3,16,12,15	/* Setup MAS0 = TLBSEL | ESEL(r3) */
+	rlwimi	r7,r3,16,4,15	/* Setup MAS0 = TLBSEL | ESEL(r3) */
 	mtspr	SPRN_MAS0,r7
 	tlbre
 
 	/* Just modify the entry ID and EPN for the temp mapping */
 	lis	r7,0x1000	/* Set MAS0(TLBSEL) = 1 */
-	rlwimi	r7,r5,16,12,15	/* Setup MAS0 = TLBSEL | ESEL(r5) */
+	rlwimi	r7,r5,16,4,15	/* Setup MAS0 = TLBSEL | ESEL(r5) */
 	mtspr	SPRN_MAS0,r7
 	xori	r6,r4,1		/* Setup TMP mapping in the other Address space */
 	slwi	r6,r6,12
@@ -201,7 +201,7 @@
 
 /* 5. Invalidate mapping we started in */
 	lis	r7,0x1000	/* Set MAS0(TLBSEL) = 1 */
-	rlwimi	r7,r3,16,12,15	/* Setup MAS0 = TLBSEL | ESEL(r3) */
+	rlwimi	r7,r3,16,4,15	/* Setup MAS0 = TLBSEL | ESEL(r3) */
 	mtspr	SPRN_MAS0,r7
 	tlbre
 	li	r6,0
@@ -242,7 +242,7 @@
 
 /* 8. Clear out the temp mapping */
 	lis	r7,0x1000	/* Set MAS0(TLBSEL) = 1 */
-	rlwimi	r7,r5,16,12,15	/* Setup MAS0 = TLBSEL | ESEL(r5) */
+	rlwimi	r7,r5,16,4,15	/* Setup MAS0 = TLBSEL | ESEL(r5) */
 	mtspr	SPRN_MAS0,r7
 	tlbre
 	mtspr	SPRN_MAS1,r8
@@ -282,7 +282,7 @@
 	mtspr	SPRN_IVPR,r4
 
 	/* Setup the defaults for TLB entries */
-	li	r2,MAS4_TSIZED(BOOKE_PAGESZ_4K)
+	li	r2,(MAS4_TSIZED(BOOKE_PAGESZ_4K))@l
    	mtspr	SPRN_MAS4, r2
 
 #if 0
@@ -464,32 +464,16 @@
 	b	data_access
 
 	/* Instruction Storage Interrupt */
-	START_EXCEPTION(InstructionStorage)
-	NORMAL_EXCEPTION_PROLOG
-	mfspr	r5,SPRN_ESR		/* Grab the ESR and save it */
-	stw	r5,_ESR(r11)
-	mr      r4,r12                  /* Pass SRR0 as arg2 */
-	li      r5,0                    /* Pass zero as arg3 */
-	EXC_XFER_EE_LITE(0x0400, handle_page_fault)
+	INSTRUCTION_STORAGE_EXCEPTION
 
 	/* External Input Interrupt */
 	EXCEPTION(0x0500, ExternalInput, do_IRQ, EXC_XFER_LITE)
 
 	/* Alignment Interrupt */
-	START_EXCEPTION(Alignment)
-	NORMAL_EXCEPTION_PROLOG
-	mfspr   r4,SPRN_DEAR            /* Grab the DEAR and save it */
-	stw     r4,_DEAR(r11)
-	addi    r3,r1,STACK_FRAME_OVERHEAD
-	EXC_XFER_EE(0x0600, AlignmentException)
+	ALIGNMENT_EXCEPTION
 
 	/* Program Interrupt */
-	START_EXCEPTION(Program)
-	NORMAL_EXCEPTION_PROLOG
-	mfspr	r4,SPRN_ESR		/* Grab the ESR and save it */
-	stw	r4,_ESR(r11)
-	addi	r3,r1,STACK_FRAME_OVERHEAD
-	EXC_XFER_STD(0x0700, ProgramCheckException)
+	PROGRAM_EXCEPTION
 
 	/* Floating Point Unavailable Interrupt */
 	EXCEPTION(0x0800, FloatingPointUnavailable, UnknownException, EXC_XFER_EE)
@@ -503,12 +487,7 @@
 	EXCEPTION(0x2900, AuxillaryProcessorUnavailable, UnknownException, EXC_XFER_EE)
 
 	/* Decrementer Interrupt */
-	START_EXCEPTION(Decrementer)
-	NORMAL_EXCEPTION_PROLOG
-	lis     r0,TSR_DIS@h            /* Setup the DEC interrupt mask */
-	mtspr   SPRN_TSR,r0		/* Clear the DEC interrupt */
-	addi    r3,r1,STACK_FRAME_OVERHEAD
-	EXC_XFER_LITE(0x0900, timer_interrupt)
+	DECREMENTER_EXCEPTION
 
 	/* Fixed Internal Timer Interrupt */
 	/* TODO: Add FIT support */
@@ -539,8 +518,7 @@
 	ori	r11, r11, swapper_pg_dir@l
 
 	mfspr	r12,SPRN_MAS1		/* Set TID to 0 */
-	li	r13,MAS1_TID@l
-	andc	r12,r12,r13
+	rlwinm	r12,r12,0,16,1
 	mtspr	SPRN_MAS1,r12
 
 	b	4f
@@ -604,8 +582,7 @@
 	ori	r11, r11, swapper_pg_dir@l
 
 	mfspr	r12,SPRN_MAS1		/* Set TID to 0 */
-	li	r13,MAS1_TID@l
-	andc	r12,r12,r13
+	rlwinm	r12,r12,0,16,1
 	mtspr	SPRN_MAS1,r12
 
 	b	4f
@@ -666,7 +643,8 @@
 	EXCEPTION(0x2050, SPEFloatingPointRound, UnknownException, EXC_XFER_EE)
 
 	/* Performance Monitor */
-	EXCEPTION(0x2060, PerformanceMonitor, UnknownException, EXC_XFER_EE)
+	EXCEPTION(0x2060, PerformanceMonitor, PerformanceMonitorException, EXC_XFER_STD)
+
 
 	/* Debug Interrupt */
 	DEBUG_EXCEPTION
diff -Nru a/arch/ppc/kernel/idle.c b/arch/ppc/kernel/idle.c
--- a/arch/ppc/kernel/idle.c	2005-01-10 20:11:15 -08:00
+++ b/arch/ppc/kernel/idle.c	2005-01-10 20:11:15 -08:00
@@ -57,14 +57,13 @@
 /*
  * The body of the idle task.
  */
-int cpu_idle(void)
+void cpu_idle(void)
 {
 	for (;;)
 		if (ppc_md.idle != NULL)
 			ppc_md.idle();
 		else
 			default_idle();
-	return 0;
 }
 
 #if defined(CONFIG_SYSCTL) && defined(CONFIG_6xx)
diff -Nru a/arch/ppc/kernel/misc.S b/arch/ppc/kernel/misc.S
--- a/arch/ppc/kernel/misc.S	2005-01-10 20:11:22 -08:00
+++ b/arch/ppc/kernel/misc.S	2005-01-10 20:11:22 -08:00
@@ -1434,7 +1434,7 @@
 	.long sys_fstatfs64
 	.long ppc_fadvise64_64
 	.long sys_ni_syscall		/* 255 - rtas (used on ppc64) */
-	.long sys_ni_syscall		/* 256 reserved for sys_debug_setcontext */
+	.long sys_debug_setcontext
 	.long sys_ni_syscall		/* 257 reserved for vserver */
 	.long sys_ni_syscall		/* 258 reserved for new sys_remap_file_pages */
 	.long sys_ni_syscall		/* 259 reserved for new sys_mbind */
diff -Nru a/arch/ppc/kernel/perfmon.c b/arch/ppc/kernel/perfmon.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/ppc/kernel/perfmon.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,94 @@
+/* kernel/perfmon.c
+ * PPC 32 Performance Monitor Infrastructure
+ *
+ * Author: Andy Fleming
+ * Copyright (c) 2004 Freescale Semiconductor, Inc
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU General Public License
+ *  as published by the Free Software Foundation; either version
+ *  2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/errno.h>
+#include <linux/sched.h>
+#include <linux/kernel.h>
+#include <linux/mm.h>
+#include <linux/stddef.h>
+#include <linux/unistd.h>
+#include <linux/ptrace.h>
+#include <linux/slab.h>
+#include <linux/user.h>
+#include <linux/a.out.h>
+#include <linux/interrupt.h>
+#include <linux/config.h>
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/prctl.h>
+
+#include <asm/pgtable.h>
+#include <asm/uaccess.h>
+#include <asm/system.h>
+#include <asm/io.h>
+#include <asm/reg.h>
+#include <asm/xmon.h>
+
+/* A lock to regulate grabbing the interrupt */
+spinlock_t perfmon_lock = SPIN_LOCK_UNLOCKED;
+
+#ifdef CONFIG_FSL_BOOKE
+static void dummy_perf(struct pt_regs *regs)
+{
+	unsigned int pmgc0 = mfpmr(PMRN_PMGC0);
+
+	pmgc0 &= ~PMGC0_PMIE;
+	mtpmr(PMRN_PMGC0, pmgc0);
+}
+
+#else
+/* Ensure exceptions are disabled */
+#define MMCR0_PMXE      (1UL << (31 - 5))
+
+static void dummy_perf(struct pt_regs *regs)
+{
+	unsigned int mmcr0 = mfspr(SPRN_MMCR0);
+
+	mmcr0 &= ~MMCR0_PMXE;
+	mtspr(SPRN_MMCR0, mmcr0);
+}
+#endif
+
+void (*perf_irq)(struct pt_regs *) = dummy_perf;
+
+/* Grab the interrupt, if it's free.
+ * Returns 0 on success, -1 if the interrupt is taken already */
+int request_perfmon_irq(void (*handler)(struct pt_regs *))
+{
+	int err = 0;
+
+	spin_lock(&perfmon_lock);
+
+	if (perf_irq == dummy_perf)
+		perf_irq = handler;
+	else {
+		pr_info("perfmon irq already handled by %p\n", perf_irq);
+		err = -1;
+	}
+
+	spin_unlock(&perfmon_lock);
+
+	return err;
+}
+
+void free_perfmon_irq(void)
+{
+	spin_lock(&perfmon_lock);
+
+	perf_irq = dummy_perf;
+
+	spin_unlock(&perfmon_lock);
+}
+
+EXPORT_SYMBOL(perf_irq);
+EXPORT_SYMBOL(request_perfmon_irq);
+EXPORT_SYMBOL(free_perfmon_irq);
diff -Nru a/arch/ppc/kernel/perfmon_fsl_booke.c b/arch/ppc/kernel/perfmon_fsl_booke.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/ppc/kernel/perfmon_fsl_booke.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,222 @@
+/* kernel/perfmon_fsl_booke.c
+ * Freescale Book-E Performance Monitor code
+ *
+ * Author: Andy Fleming
+ * Copyright (c) 2004 Freescale Semiconductor, Inc
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU General Public License
+ *  as published by the Free Software Foundation; either version
+ *  2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/errno.h>
+#include <linux/sched.h>
+#include <linux/kernel.h>
+#include <linux/mm.h>
+#include <linux/stddef.h>
+#include <linux/unistd.h>
+#include <linux/ptrace.h>
+#include <linux/slab.h>
+#include <linux/user.h>
+#include <linux/a.out.h>
+#include <linux/interrupt.h>
+#include <linux/config.h>
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/prctl.h>
+
+#include <asm/pgtable.h>
+#include <asm/uaccess.h>
+#include <asm/system.h>
+#include <asm/io.h>
+#include <asm/reg.h>
+#include <asm/xmon.h>
+#include <asm/perfmon.h>
+
+static inline u32 get_pmlca(int ctr);
+static inline void set_pmlca(int ctr, u32 pmlca);
+
+static inline u32 get_pmlca(int ctr)
+{
+	u32 pmlca;
+
+	switch (ctr) {
+		case 0:
+			pmlca = mfpmr(PMRN_PMLCA0);
+			break;
+		case 1:
+			pmlca = mfpmr(PMRN_PMLCA1);
+			break;
+		case 2:
+			pmlca = mfpmr(PMRN_PMLCA2);
+			break;
+		case 3:
+			pmlca = mfpmr(PMRN_PMLCA3);
+			break;
+		default:
+			panic("Bad ctr number\n");
+	}
+
+	return pmlca;
+}
+
+static inline void set_pmlca(int ctr, u32 pmlca)
+{
+	switch (ctr) {
+		case 0:
+			mtpmr(PMRN_PMLCA0, pmlca);
+			break;
+		case 1:
+			mtpmr(PMRN_PMLCA1, pmlca);
+			break;
+		case 2:
+			mtpmr(PMRN_PMLCA2, pmlca);
+			break;
+		case 3:
+			mtpmr(PMRN_PMLCA3, pmlca);
+			break;
+		default:
+			panic("Bad ctr number\n");
+	}
+}
+
+void init_pmc_stop(int ctr)
+{
+	u32 pmlca = (PMLCA_FC | PMLCA_FCS | PMLCA_FCU |
+			PMLCA_FCM1 | PMLCA_FCM0);
+	u32 pmlcb = 0;
+
+	switch (ctr) {
+		case 0:
+			mtpmr(PMRN_PMLCA0, pmlca);
+			mtpmr(PMRN_PMLCB0, pmlcb);
+			break;
+		case 1:
+			mtpmr(PMRN_PMLCA1, pmlca);
+			mtpmr(PMRN_PMLCB1, pmlcb);
+			break;
+		case 2:
+			mtpmr(PMRN_PMLCA2, pmlca);
+			mtpmr(PMRN_PMLCB2, pmlcb);
+			break;
+		case 3:
+			mtpmr(PMRN_PMLCA3, pmlca);
+			mtpmr(PMRN_PMLCB3, pmlcb);
+			break;
+		default:
+			panic("Bad ctr number!\n");
+	}
+}
+
+void set_pmc_event(int ctr, int event)
+{
+	u32 pmlca;
+
+	pmlca = get_pmlca(ctr);
+
+	pmlca = (pmlca & ~PMLCA_EVENT_MASK) |
+		((event << PMLCA_EVENT_SHIFT) &
+		 PMLCA_EVENT_MASK);
+
+	set_pmlca(ctr, pmlca);
+}
+
+void set_pmc_user_kernel(int ctr, int user, int kernel)
+{
+	u32 pmlca;
+
+	pmlca = get_pmlca(ctr);
+
+	if(user)
+		pmlca &= ~PMLCA_FCU;
+	else
+		pmlca |= PMLCA_FCU;
+
+	if(kernel)
+		pmlca &= ~PMLCA_FCS;
+	else
+		pmlca |= PMLCA_FCS;
+
+	set_pmlca(ctr, pmlca);
+}
+
+void set_pmc_marked(int ctr, int mark0, int mark1)
+{
+	u32 pmlca = get_pmlca(ctr);
+
+	if(mark0)
+		pmlca &= ~PMLCA_FCM0;
+	else
+		pmlca |= PMLCA_FCM0;
+
+	if(mark1)
+		pmlca &= ~PMLCA_FCM1;
+	else
+		pmlca |= PMLCA_FCM1;
+
+	set_pmlca(ctr, pmlca);
+}
+
+void pmc_start_ctr(int ctr, int enable)
+{
+	u32 pmlca = get_pmlca(ctr);
+
+	pmlca &= ~PMLCA_FC;
+
+	if (enable)
+		pmlca |= PMLCA_CE;
+	else
+		pmlca &= ~PMLCA_CE;
+
+	set_pmlca(ctr, pmlca);
+}
+
+void pmc_start_ctrs(int enable)
+{
+	u32 pmgc0 = mfpmr(PMRN_PMGC0);
+
+	pmgc0 &= ~PMGC0_FAC;
+	pmgc0 |= PMGC0_FCECE;
+
+	if (enable)
+		pmgc0 |= PMGC0_PMIE;
+	else
+		pmgc0 &= ~PMGC0_PMIE;
+
+	mtpmr(PMRN_PMGC0, pmgc0);
+}
+
+void pmc_stop_ctrs(void)
+{
+	u32 pmgc0 = mfpmr(PMRN_PMGC0);
+
+	pmgc0 |= PMGC0_FAC;
+
+	pmgc0 &= ~(PMGC0_PMIE | PMGC0_FCECE);
+
+	mtpmr(PMRN_PMGC0, pmgc0);
+}
+
+void dump_pmcs(void)
+{
+	printk("pmgc0: %x\n", mfpmr(PMRN_PMGC0));
+	printk("pmc\t\tpmlca\t\tpmlcb\n");
+	printk("%8x\t%8x\t%8x\n", mfpmr(PMRN_PMC0),
+			mfpmr(PMRN_PMLCA0), mfpmr(PMRN_PMLCB0));
+	printk("%8x\t%8x\t%8x\n", mfpmr(PMRN_PMC1),
+			mfpmr(PMRN_PMLCA1), mfpmr(PMRN_PMLCB1));
+	printk("%8x\t%8x\t%8x\n", mfpmr(PMRN_PMC2),
+			mfpmr(PMRN_PMLCA2), mfpmr(PMRN_PMLCB2));
+	printk("%8x\t%8x\t%8x\n", mfpmr(PMRN_PMC3),
+			mfpmr(PMRN_PMLCA3), mfpmr(PMRN_PMLCB3));
+}
+
+EXPORT_SYMBOL(init_pmc_stop);
+EXPORT_SYMBOL(set_pmc_event);
+EXPORT_SYMBOL(set_pmc_user_kernel);
+EXPORT_SYMBOL(set_pmc_marked);
+EXPORT_SYMBOL(pmc_start_ctr);
+EXPORT_SYMBOL(pmc_start_ctrs);
+EXPORT_SYMBOL(pmc_stop_ctrs);
+EXPORT_SYMBOL(dump_pmcs);
diff -Nru a/arch/ppc/kernel/setup.c b/arch/ppc/kernel/setup.c
--- a/arch/ppc/kernel/setup.c	2005-01-10 20:11:22 -08:00
+++ b/arch/ppc/kernel/setup.c	2005-01-10 20:11:22 -08:00
@@ -7,6 +7,7 @@
 #include <linux/string.h>
 #include <linux/sched.h>
 #include <linux/init.h>
+#include <linux/kernel.h>
 #include <linux/reboot.h>
 #include <linux/delay.h>
 #include <linux/initrd.h>
@@ -681,7 +682,6 @@
 /* Warning, IO base is not yet inited */
 void __init setup_arch(char **cmdline_p)
 {
-	extern int panic_timeout;
 	extern char *klimit;
 	extern void do_init_bootmem(void);
 
diff -Nru a/arch/ppc/kernel/signal.c b/arch/ppc/kernel/signal.c
--- a/arch/ppc/kernel/signal.c	2005-01-10 20:11:23 -08:00
+++ b/arch/ppc/kernel/signal.c	2005-01-10 20:11:23 -08:00
@@ -509,6 +509,96 @@
 	return 0;
 }
 
+int sys_debug_setcontext(struct ucontext __user *ctx,
+			 int ndbg, struct sig_dbg_op *dbg,
+			 int r6, int r7, int r8,
+			 struct pt_regs *regs)
+{
+	struct sig_dbg_op op;
+	int i;
+	unsigned long new_msr = regs->msr;
+#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
+	unsigned long new_dbcr0 = current->thread.dbcr0;
+#endif
+
+	for (i=0; i<ndbg; i++) {
+		if (__copy_from_user(&op, dbg, sizeof(op)))
+			return -EFAULT;
+		switch (op.dbg_type) {
+		case SIG_DBG_SINGLE_STEPPING:
+#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
+			if (op.dbg_value) {
+				new_msr |= MSR_DE;
+				new_dbcr0 |= (DBCR0_IDM | DBCR0_IC);
+			} else {
+				new_msr &= ~MSR_DE;
+				new_dbcr0 &= ~(DBCR0_IDM | DBCR0_IC);
+			}
+#else
+			if (op.dbg_value)
+				new_msr |= MSR_SE;
+			else
+				new_msr &= ~MSR_SE;
+#endif
+			break;
+		case SIG_DBG_BRANCH_TRACING:
+#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
+			return -EINVAL;
+#else
+			if (op.dbg_value)
+				new_msr |= MSR_BE;
+			else
+				new_msr &= ~MSR_BE;
+#endif
+			break;
+
+		default:
+			return -EINVAL;
+		}
+	}
+
+	/* We wait until here to actually install the values in the
+	   registers so if we fail in the above loop, it will not
+	   affect the contents of these registers.  After this point,
+	   failure is a problem, anyway, and it's very unlikely unless
+	   the user is really doing something wrong. */
+	regs->msr = new_msr;
+#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
+	current->thread.dbcr0 = new_dbcr0;
+#endif
+
+	/*
+	 * If we get a fault copying the context into the kernel's
+	 * image of the user's registers, we can't just return -EFAULT
+	 * because the user's registers will be corrupted.  For instance
+	 * the NIP value may have been updated but not some of the
+	 * other registers.  Given that we have done the verify_area
+	 * and successfully read the first and last bytes of the region
+	 * above, this should only happen in an out-of-memory situation
+	 * or if another thread unmaps the region containing the context.
+	 * We kill the task with a SIGSEGV in this situation.
+	 */
+	if (do_setcontext(ctx, regs, 1)) {
+		force_sig(SIGSEGV, current);
+		goto out;
+	}
+
+	/*
+	 * It's not clear whether or why it is desirable to save the
+	 * sigaltstack setting on signal delivery and restore it on
+	 * signal return.  But other architectures do this and we have
+	 * always done it up until now so it is probably better not to
+	 * change it.  -- paulus
+	 */
+	do_sigaltstack(&ctx->uc_stack, NULL, regs->gpr[1]);
+
+	sigreturn_exit(regs);
+	/* doesn't actually return back to here */
+
+ out:
+	return 0;
+}
+
 /*
  * OK, we're invoking a handler
  */
diff -Nru a/arch/ppc/kernel/smp.c b/arch/ppc/kernel/smp.c
--- a/arch/ppc/kernel/smp.c	2005-01-10 20:11:22 -08:00
+++ b/arch/ppc/kernel/smp.c	2005-01-10 20:11:22 -08:00
@@ -60,7 +60,6 @@
 volatile unsigned long cpu_callin_map[NR_CPUS];
 
 int start_secondary(void *);
-extern int cpu_idle(void *unused);
 void smp_call_function_interrupt(void);
 static int __smp_call_function(void (*func) (void *info), void *info,
 			       int wait, int target);
@@ -358,7 +357,8 @@
 	smp_ops->take_timebase();
 	printk("CPU %i done timebase take...\n", cpu);
 
-	return cpu_idle(NULL);
+	cpu_idle();
+	return 0;
 }
 
 int __cpu_up(unsigned int cpu)
diff -Nru a/arch/ppc/kernel/traps.c b/arch/ppc/kernel/traps.c
--- a/arch/ppc/kernel/traps.c	2005-01-10 20:11:17 -08:00
+++ b/arch/ppc/kernel/traps.c	2005-01-10 20:11:17 -08:00
@@ -41,6 +41,7 @@
 #ifdef CONFIG_PMAC_BACKLIGHT
 #include <asm/backlight.h>
 #endif
+#include <asm/perfmon.h>
 
 #ifdef CONFIG_XMON
 void (*debugger)(struct pt_regs *regs) = xmon;
@@ -71,7 +72,6 @@
  * Trap & Exception support
  */
 
-
 spinlock_t die_lock = SPIN_LOCK_UNLOCKED;
 
 void die(const char * str, struct pt_regs * fp, long err)
@@ -566,7 +566,7 @@
 
 void SingleStepException(struct pt_regs *regs)
 {
-	regs->msr &= ~MSR_SE;  /* Turn off 'trace' bit */
+	regs->msr &= ~(MSR_SE | MSR_BE);  /* Turn off 'trace' bits */
 	if (debugger_sstep(regs))
 		return;
 	_exception(SIGTRAP, regs, TRAP_TRACE, 0);
@@ -725,6 +725,11 @@
 	}
 }
 #endif /* CONFIG_ALTIVEC */
+
+void PerformanceMonitorException(struct pt_regs *regs)
+{
+	perf_irq(regs);
+}
 
 #ifdef CONFIG_FSL_BOOKE
 void CacheLockingException(struct pt_regs *regs, unsigned long address,
diff -Nru a/arch/ppc/mm/fsl_booke_mmu.c b/arch/ppc/mm/fsl_booke_mmu.c
--- a/arch/ppc/mm/fsl_booke_mmu.c	2005-01-10 20:11:24 -08:00
+++ b/arch/ppc/mm/fsl_booke_mmu.c	2005-01-10 20:11:24 -08:00
@@ -124,8 +124,8 @@
 		flags |= _PAGE_COHERENT;
 #endif
 
-	TLBCAM[index].MAS0 = MAS0_TLBSEL | (index << 16);
-	TLBCAM[index].MAS1 = MAS1_VALID | MAS1_IPROT | MAS1_TSIZE(tsize) | ((pid << 16) & MAS1_TID);
+	TLBCAM[index].MAS0 = MAS0_TLBSEL(1) | MAS0_ESEL(index);
+	TLBCAM[index].MAS1 = MAS1_VALID | MAS1_IPROT | MAS1_TSIZE(tsize) | MAS1_TID(pid);
 	TLBCAM[index].MAS2 = virt & PAGE_MASK;
 
 	TLBCAM[index].MAS2 |= (flags & _PAGE_WRITETHRU) ? MAS2_W : 0;
@@ -156,7 +156,7 @@
 
 void invalidate_tlbcam_entry(int index)
 {
-	TLBCAM[index].MAS0 = MAS0_TLBSEL | (index << 16);
+	TLBCAM[index].MAS0 = MAS0_TLBSEL(1) | MAS0_ESEL(index);
 	TLBCAM[index].MAS1 = ~MAS1_VALID;
 
 	loadcam_entry(index);
diff -Nru a/arch/ppc/mm/init.c b/arch/ppc/mm/init.c
--- a/arch/ppc/mm/init.c	2005-01-10 20:11:17 -08:00
+++ b/arch/ppc/mm/init.c	2005-01-10 20:11:17 -08:00
@@ -411,7 +411,6 @@
 	unsigned long highmem_mapnr;
 
 	highmem_mapnr = total_lowmem >> PAGE_SHIFT;
-	highmem_start_page = mem_map + highmem_mapnr;
 #endif /* CONFIG_HIGHMEM */
 	max_mapnr = total_memory >> PAGE_SHIFT;
 
diff -Nru a/arch/ppc/mm/pgtable.c b/arch/ppc/mm/pgtable.c
--- a/arch/ppc/mm/pgtable.c	2005-01-10 20:11:17 -08:00
+++ b/arch/ppc/mm/pgtable.c	2005-01-10 20:11:17 -08:00
@@ -85,8 +85,7 @@
 {
 	pgd_t *ret;
 
-	if ((ret = (pgd_t *)__get_free_pages(GFP_KERNEL, PGDIR_ORDER)) != NULL)
-		clear_pages(ret, PGDIR_ORDER);
+	ret = (pgd_t *)__get_free_pages(GFP_KERNEL|__GFP_ZERO, PGDIR_ORDER);
 	return ret;
 }
 
@@ -102,7 +101,7 @@
 	extern void *early_get_page(void);
 
 	if (mem_init_done) {
-		pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT);
+		pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO);
 		if (pte) {
 			struct page *ptepage = virt_to_page(pte);
 			ptepage->mapping = (void *) mm;
@@ -110,8 +109,6 @@
 		}
 	} else
 		pte = (pte_t *)early_get_page();
-	if (pte)
-		clear_page(pte);
 	return pte;
 }
 
diff -Nru a/arch/ppc/oprofile/Makefile b/arch/ppc/oprofile/Makefile
--- a/arch/ppc/oprofile/Makefile	2005-01-10 20:11:22 -08:00
+++ b/arch/ppc/oprofile/Makefile	2005-01-10 20:11:22 -08:00
@@ -6,4 +6,4 @@
 		oprofilefs.o oprofile_stats.o \
 		timer_int.o )
 
-oprofile-y := $(DRIVER_OBJS) init.o
+oprofile-y := $(DRIVER_OBJS) common.o op_model_fsl_booke.o
diff -Nru a/arch/ppc/oprofile/common.c b/arch/ppc/oprofile/common.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/ppc/oprofile/common.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,162 @@
+/*
+ * PPC 32 oprofile support
+ * Based on PPC64 oprofile support
+ * Copyright (C) 2004 Anton Blanchard <anton@au.ibm.com>, IBM
+ *
+ * Copyright (C) Freescale Semiconductor, Inc 2004
+ *
+ * Author: Andy Fleming
+ *
+ * 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/oprofile.h>
+#include <linux/slab.h>
+#include <linux/init.h>
+#include <linux/smp.h>
+#include <linux/errno.h>
+#include <asm/ptrace.h>
+#include <asm/system.h>
+#include <asm/perfmon.h>
+#include <asm/cputable.h>
+
+#include "op_impl.h"
+
+static struct op_ppc32_model *model;
+
+static struct op_counter_config ctr[OP_MAX_COUNTER];
+static struct op_system_config sys;
+
+static void op_handle_interrupt(struct pt_regs *regs)
+{
+	model->handle_interrupt(regs, ctr);
+}
+
+static int op_ppc32_setup(void)
+{
+	/* Install our interrupt handler into the existing hook.  */
+	if(request_perfmon_irq(&op_handle_interrupt))
+		return -EBUSY;
+
+	mb();
+
+	/* Pre-compute the values to stuff in the hardware registers.  */
+	model->reg_setup(ctr, &sys, model->num_counters);
+
+#if 0
+	/* FIXME: Make multi-cpu work */
+	/* Configure the registers on all cpus.  */
+	on_each_cpu(model->reg_setup, NULL, 0, 1);
+#endif
+
+	return 0;
+}
+
+static void op_ppc32_shutdown(void)
+{
+	mb();
+
+	/* Remove our interrupt handler. We may be removing this module. */
+	free_perfmon_irq();
+}
+
+static void op_ppc32_cpu_start(void *dummy)
+{
+	model->start(ctr);
+}
+
+static int op_ppc32_start(void)
+{
+	on_each_cpu(op_ppc32_cpu_start, NULL, 0, 1);
+	return 0;
+}
+
+static inline void op_ppc32_cpu_stop(void *dummy)
+{
+	model->stop();
+}
+
+static void op_ppc32_stop(void)
+{
+	on_each_cpu(op_ppc32_cpu_stop, NULL, 0, 1);
+}
+
+static int op_ppc32_create_files(struct super_block *sb, struct dentry *root)
+{
+	int i;
+
+	for (i = 0; i < model->num_counters; ++i) {
+		struct dentry *dir;
+		char buf[3];
+
+		snprintf(buf, sizeof buf, "%d", i);
+		dir = oprofilefs_mkdir(sb, root, buf);
+
+		oprofilefs_create_ulong(sb, dir, "enabled", &ctr[i].enabled);
+		oprofilefs_create_ulong(sb, dir, "event", &ctr[i].event);
+		oprofilefs_create_ulong(sb, dir, "count", &ctr[i].count);
+		oprofilefs_create_ulong(sb, dir, "kernel", &ctr[i].kernel);
+		oprofilefs_create_ulong(sb, dir, "user", &ctr[i].user);
+
+		/* FIXME: Not sure if this is used */
+		oprofilefs_create_ulong(sb, dir, "unit_mask", &ctr[i].unit_mask);
+	}
+
+	oprofilefs_create_ulong(sb, root, "enable_kernel", &sys.enable_kernel);
+	oprofilefs_create_ulong(sb, root, "enable_user", &sys.enable_user);
+
+	/* Default to tracing both kernel and user */
+	sys.enable_kernel = 1;
+	sys.enable_user = 1;
+
+	return 0;
+}
+
+static struct oprofile_operations oprof_ppc32_ops = {
+	.create_files	= op_ppc32_create_files,
+	.setup		= op_ppc32_setup,
+	.shutdown	= op_ppc32_shutdown,
+	.start		= op_ppc32_start,
+	.stop		= op_ppc32_stop,
+	.cpu_type	= NULL		/* To be filled in below. */
+};
+
+int __init oprofile_arch_init(struct oprofile_operations **ops)
+{
+	char *name;
+	int cpu_id = smp_processor_id();
+
+#ifdef CONFIG_FSL_BOOKE
+	model = &op_model_fsl_booke;
+#else
+	printk(KERN_ERR "oprofile enabled on unsupported processor!\n");
+	return -ENODEV;
+#endif
+
+	name = kmalloc(32, GFP_KERNEL);
+
+	if (NULL == name)
+		return -ENOMEM;
+
+	sprintf(name, "ppc/%s", cur_cpu_spec[cpu_id]->cpu_name);
+
+	oprof_ppc32_ops.cpu_type = name;
+
+	model->num_counters = cur_cpu_spec[cpu_id]->num_pmcs;
+
+	*ops = &oprof_ppc32_ops;
+
+	printk(KERN_INFO "oprofile: using %s performance monitoring.\n",
+	       oprof_ppc32_ops.cpu_type);
+
+	return 0;
+}
+
+void oprofile_arch_exit(void)
+{
+	kfree(oprof_ppc32_ops.cpu_type);
+	oprof_ppc32_ops.cpu_type = NULL;
+}
diff -Nru a/arch/ppc/oprofile/init.c b/arch/ppc/oprofile/init.c
--- a/arch/ppc/oprofile/init.c	2005-01-10 20:11:15 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,23 +0,0 @@
-/**
- * @file init.c
- *
- * @remark Copyright 2002 OProfile authors
- * @remark Read the file COPYING
- *
- * @author John Levon <levon@movementarian.org>
- */
-
-#include <linux/kernel.h>
-#include <linux/oprofile.h>
-#include <linux/init.h>
-#include <linux/errno.h>
-
-int __init oprofile_arch_init(struct oprofile_operations ** ops)
-{
-	return -ENODEV;
-}
-
-
-void oprofile_arch_exit(void)
-{
-}
diff -Nru a/arch/ppc/oprofile/op_impl.h b/arch/ppc/oprofile/op_impl.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/ppc/oprofile/op_impl.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2004 Anton Blanchard <anton@au.ibm.com>, IBM
+ *
+ * Based on alpha version.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#ifndef OP_IMPL_H
+#define OP_IMPL_H 1
+
+#define OP_MAX_COUNTER 8
+
+/* Per-counter configuration as set via oprofilefs.  */
+struct op_counter_config {
+	unsigned long enabled;
+	unsigned long event;
+	unsigned long count;
+	unsigned long kernel;
+	unsigned long user;
+	unsigned long unit_mask;
+};
+
+/* System-wide configuration as set via oprofilefs.  */
+struct op_system_config {
+	unsigned long enable_kernel;
+	unsigned long enable_user;
+};
+
+/* Per-arch configuration */
+struct op_ppc32_model {
+	void (*reg_setup) (struct op_counter_config *,
+			   struct op_system_config *,
+			   int num_counters);
+	void (*start) (struct op_counter_config *);
+	void (*stop) (void);
+	void (*handle_interrupt) (struct pt_regs *,
+				  struct op_counter_config *);
+	int num_counters;
+};
+
+#endif /* OP_IMPL_H */
diff -Nru a/arch/ppc/oprofile/op_model_fsl_booke.c b/arch/ppc/oprofile/op_model_fsl_booke.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/ppc/oprofile/op_model_fsl_booke.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,185 @@
+/*
+ * oprofile/op_model_e500.c
+ *
+ * Freescale Book-E oprofile support, based on ppc64 oprofile support
+ * Copyright (C) 2004 Anton Blanchard <anton@au.ibm.com>, IBM
+ *
+ * Copyright (c) 2004 Freescale Semiconductor, Inc
+ *
+ * Author: Andy Fleming
+ * Maintainer: Kumar Gala <Kumar.Gala@freescale.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/oprofile.h>
+#include <linux/init.h>
+#include <linux/smp.h>
+#include <asm/ptrace.h>
+#include <asm/system.h>
+#include <asm/processor.h>
+#include <asm/cputable.h>
+#include <asm/reg_booke.h>
+#include <asm/page.h>
+#include <asm/perfmon.h>
+
+#include "op_impl.h"
+
+static unsigned long reset_value[OP_MAX_COUNTER];
+
+static int num_counters;
+static int oprofile_running;
+
+static inline unsigned int ctr_read(unsigned int i)
+{
+	switch(i) {
+		case 0:
+			return mfpmr(PMRN_PMC0);
+		case 1:
+			return mfpmr(PMRN_PMC1);
+		case 2:
+			return mfpmr(PMRN_PMC2);
+		case 3:
+			return mfpmr(PMRN_PMC3);
+		default:
+			return 0;
+	}
+}
+
+static inline void ctr_write(unsigned int i, unsigned int val)
+{
+	switch(i) {
+		case 0:
+			mtpmr(PMRN_PMC0, val);
+			break;
+		case 1:
+			mtpmr(PMRN_PMC1, val);
+			break;
+		case 2:
+			mtpmr(PMRN_PMC2, val);
+			break;
+		case 3:
+			mtpmr(PMRN_PMC3, val);
+			break;
+		default:
+			break;
+	}
+}
+
+
+static void fsl_booke_reg_setup(struct op_counter_config *ctr,
+			     struct op_system_config *sys,
+			     int num_ctrs)
+{
+	int i;
+
+	num_counters = num_ctrs;
+
+	/* freeze all counters */
+	pmc_stop_ctrs();
+
+	/* Our counters count up, and "count" refers to
+	 * how much before the next interrupt, and we interrupt
+	 * on overflow.  So we calculate the starting value
+	 * which will give us "count" until overflow.
+	 * Then we set the events on the enabled counters */
+	for (i = 0; i < num_counters; ++i) {
+		reset_value[i] = 0x80000000UL - ctr[i].count;
+
+		init_pmc_stop(i);
+
+		set_pmc_event(i, ctr[i].event);
+
+		set_pmc_user_kernel(i, ctr[i].user, ctr[i].kernel);
+	}
+}
+
+static void fsl_booke_start(struct op_counter_config *ctr)
+{
+	int i;
+
+	mtmsr(mfmsr() | MSR_PMM);
+
+	for (i = 0; i < num_counters; ++i) {
+		if (ctr[i].enabled) {
+			ctr_write(i, reset_value[i]);
+			/* Set Each enabled counterd to only
+			 * count when the Mark bit is not set */
+			set_pmc_marked(i, 1, 0);
+			pmc_start_ctr(i, 1);
+		} else {
+			ctr_write(i, 0);
+
+			/* Set the ctr to be stopped */
+			pmc_start_ctr(i, 0);
+		}
+	}
+
+	/* Clear the freeze bit, and enable the interrupt.
+	 * The counters won't actually start until the rfi clears
+	 * the PMM bit */
+	pmc_start_ctrs(1);
+
+	oprofile_running = 1;
+
+	pr_debug("start on cpu %d, pmgc0 %x\n", smp_processor_id(),
+			mfpmr(PMRN_PMGC0));
+}
+
+static void fsl_booke_stop(void)
+{
+	/* freeze counters */
+	pmc_stop_ctrs();
+
+	oprofile_running = 0;
+
+	pr_debug("stop on cpu %d, pmgc0 %x\n", smp_processor_id(),
+			mfpmr(PMRN_PMGC0));
+
+	mb();
+}
+
+
+static void fsl_booke_handle_interrupt(struct pt_regs *regs,
+				    struct op_counter_config *ctr)
+{
+	unsigned long pc;
+	int is_kernel;
+	int val;
+	int i;
+	unsigned int cpu = smp_processor_id();
+
+	/* set the PMM bit (see comment below) */
+	mtmsr(mfmsr() | MSR_PMM);
+
+	pc = regs->nip;
+	is_kernel = (pc >= KERNELBASE);
+
+	for (i = 0; i < num_counters; ++i) {
+		val = ctr_read(i);
+		if (val < 0) {
+			if (oprofile_running && ctr[i].enabled) {
+				oprofile_add_sample(pc, is_kernel, i, cpu);
+				ctr_write(i, reset_value[i]);
+			} else {
+				ctr_write(i, 0);
+			}
+		}
+	}
+
+	/* The freeze bit was set by the interrupt. */
+	/* Clear the freeze bit, and reenable the interrupt.
+	 * The counters won't actually start until the rfi clears
+	 * the PMM bit */
+	pmc_start_ctrs(1);
+}
+
+struct op_ppc32_model op_model_fsl_booke = {
+	.reg_setup		= fsl_booke_reg_setup,
+	.start			= fsl_booke_start,
+	.stop			= fsl_booke_stop,
+	.handle_interrupt	= fsl_booke_handle_interrupt,
+};
diff -Nru a/arch/ppc/platforms/4xx/ebony.c b/arch/ppc/platforms/4xx/ebony.c
--- a/arch/ppc/platforms/4xx/ebony.c	2005-01-10 20:11:23 -08:00
+++ b/arch/ppc/platforms/4xx/ebony.c	2005-01-10 20:11:23 -08:00
@@ -55,73 +55,22 @@
 static struct ibm44x_clocks clocks __initdata;
 
 /*
- * Ebony IRQ triggering/polarity settings
+ * Ebony external IRQ triggering/polarity settings
  */
-static u_char ebony_IRQ_initsenses[] __initdata = {
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 0: UART 0 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 1: UART 1 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 2: IIC 0 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 3: IIC 1 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 4: PCI Inb Mess */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 5: PCI Cmd Wrt */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 6: PCI PM */
-	(IRQ_SENSE_EDGE  | IRQ_POLARITY_POSITIVE),	/* 7: PCI MSI 0 */
-	(IRQ_SENSE_EDGE  | IRQ_POLARITY_POSITIVE),	/* 8: PCI MSI 1 */
-	(IRQ_SENSE_EDGE  | IRQ_POLARITY_POSITIVE),	/* 9: PCI MSI 2 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 10: MAL TX EOB */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 11: MAL RX EOB */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 12: DMA Chan 0 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 13: DMA Chan 1 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 14: DMA Chan 2 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 15: DMA Chan 3 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 16: Reserved */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 17: Reserved */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 18: GPT Timer 0 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 19: GPT Timer 1 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 20: GPT Timer 2 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 21: GPT Timer 3 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 22: GPT Timer 4 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 23: Ext Int 0 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 24: Ext Int 1 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 25: Ext Int 2 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 26: Ext Int 3 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 27: Ext Int 4 */
-	(IRQ_SENSE_EDGE  | IRQ_POLARITY_NEGATIVE),	/* 28: Ext Int 5 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 29: Ext Int 6 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 30: UIC1 NC Int */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 31: UIC1 Crit Int */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 32: MAL SERR */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 33: MAL TXDE */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 34: MAL RXDE */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 35: ECC Unc Err */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 36: ECC Corr Err */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 37: Ext Bus Ctrl */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 38: Ext Bus Mstr */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 39: OPB->PLB */
-	(IRQ_SENSE_EDGE  | IRQ_POLARITY_POSITIVE),	/* 40: PCI MSI 3 */
-	(IRQ_SENSE_EDGE  | IRQ_POLARITY_POSITIVE),	/* 41: PCI MSI 4 */
-	(IRQ_SENSE_EDGE  | IRQ_POLARITY_POSITIVE),	/* 42: PCI MSI 5 */
-	(IRQ_SENSE_EDGE  | IRQ_POLARITY_POSITIVE),	/* 43: PCI MSI 6 */
-	(IRQ_SENSE_EDGE  | IRQ_POLARITY_POSITIVE),	/* 44: PCI MSI 7 */
-	(IRQ_SENSE_EDGE  | IRQ_POLARITY_POSITIVE),	/* 45: PCI MSI 8 */
-	(IRQ_SENSE_EDGE  | IRQ_POLARITY_POSITIVE),	/* 46: PCI MSI 9 */
-	(IRQ_SENSE_EDGE  | IRQ_POLARITY_POSITIVE),	/* 47: PCI MSI 10 */
-	(IRQ_SENSE_EDGE  | IRQ_POLARITY_POSITIVE),	/* 48: PCI MSI 11 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 49: PLB Perf Mon */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 50: Ext Int 7 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 51: Ext Int 8 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 52: Ext Int 9 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 53: Ext Int 10 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 54: Ext Int 11 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 55: Ext Int 12 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 56: Ser ROM Err */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 57: Reserved */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 58: Reserved */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 59: PCI Async Err */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 60: EMAC 0 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 61: EMAC 0 WOL */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 62: EMAC 1 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 63: EMAC 1 WOL */
+unsigned char ppc4xx_uic_ext_irq_cfg[] __initdata = {
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* IRQ0: PCI slot 0 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* IRQ1: PCI slot 1 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* IRQ2: PCI slot 2 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* IRQ3: PCI slot 3 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* IRQ4: IRDA */
+	(IRQ_SENSE_EDGE  | IRQ_POLARITY_NEGATIVE),	/* IRQ5: SMI pushbutton */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* IRQ6: PHYs */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* IRQ7: AUX */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* IRQ8: EXT */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* IRQ9: EXT */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* IRQ10: EXT */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* IRQ11: EXT */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* IRQ12: EXT */
 };
 
 static void __init
@@ -179,7 +128,7 @@
 }
 
 #define PCIX_WRITEL(value, offset) \
-	(writel(value, (u32)pcix_reg_base+offset))
+	(writel(value, pcix_reg_base + offset))
 
 /*
  * FIXME: This is only here to "make it work".  This will move
@@ -357,9 +306,6 @@
 #endif
 
 	ebony_early_serial_map();
-
-	ibm4xxPIC_InitSenses = ebony_IRQ_initsenses;
-	ibm4xxPIC_NumInitSenses = sizeof(ebony_IRQ_initsenses);
 
 	/* Identify the system */
 	printk("IBM Ebony port (MontaVista Software, Inc. (source@mvista.com))\n");
diff -Nru a/arch/ppc/platforms/4xx/ibm405ep.c b/arch/ppc/platforms/4xx/ibm405ep.c
--- a/arch/ppc/platforms/4xx/ibm405ep.c	2005-01-10 20:11:18 -08:00
+++ b/arch/ppc/platforms/4xx/ibm405ep.c	2005-01-10 20:11:18 -08:00
@@ -21,6 +21,7 @@
 
 #include <asm/ibm4xx.h>
 #include <asm/ocp.h>
+#include <asm/ppc4xx_pic.h>
 
 #include <platforms/4xx/ibm405ep.h>
 
@@ -130,5 +131,13 @@
 	  .show		= &ocp_show_emac_data
 	},
 	{ .vendor	= OCP_VENDOR_INVALID
+	}
+};
+
+/* Polarity and triggering settings for internal interrupt sources */
+struct ppc4xx_uic_settings ppc4xx_core_uic_cfg[] __initdata = {
+	{ .polarity 	= 0xffff7f80,
+	  .triggering	= 0x00000000,
+	  .ext_irq_mask	= 0x0000007f,	/* IRQ0 - IRQ6 */
 	}
 };
diff -Nru a/arch/ppc/platforms/4xx/ibm405gp.c b/arch/ppc/platforms/4xx/ibm405gp.c
--- a/arch/ppc/platforms/4xx/ibm405gp.c	2005-01-10 20:11:20 -08:00
+++ b/arch/ppc/platforms/4xx/ibm405gp.c	2005-01-10 20:11:20 -08:00
@@ -22,6 +22,7 @@
 #include <platforms/4xx/ibm405gp.h>
 #include <asm/ibm4xx.h>
 #include <asm/ocp.h>
+#include <asm/ppc4xx_pic.h>
 
 static struct ocp_func_emac_data ibm405gp_emac0_def = {
 	.rgmii_idx	= -1,		/* No RGMII */
@@ -107,5 +108,13 @@
 	  .show		= &ocp_show_emac_data,
 	},
 	{ .vendor	= OCP_VENDOR_INVALID
+	}
+};
+
+/* Polarity and triggering settings for internal interrupt sources */
+struct ppc4xx_uic_settings ppc4xx_core_uic_cfg[] __initdata = {
+	{ .polarity 	= 0xffffff80,
+	  .triggering	= 0x10000000,
+	  .ext_irq_mask	= 0x0000007f,	/* IRQ0 - IRQ6 */
 	}
 };
diff -Nru a/arch/ppc/platforms/4xx/ibm405gpr.c b/arch/ppc/platforms/4xx/ibm405gpr.c
--- a/arch/ppc/platforms/4xx/ibm405gpr.c	2005-01-10 20:11:20 -08:00
+++ b/arch/ppc/platforms/4xx/ibm405gpr.c	2005-01-10 20:11:20 -08:00
@@ -18,6 +18,7 @@
 #include <platforms/4xx/ibm405gpr.h>
 #include <asm/ibm4xx.h>
 #include <asm/ocp.h>
+#include <asm/ppc4xx_pic.h>
 
 static struct ocp_func_emac_data ibm405gpr_emac0_def = {
 	.rgmii_idx	= -1,		/* No RGMII */
@@ -104,5 +105,13 @@
 	  .show		= &ocp_show_emac_data,
 	},
 	{ .vendor	= OCP_VENDOR_INVALID
+	}
+};
+
+/* Polarity and triggering settings for internal interrupt sources */
+struct ppc4xx_uic_settings ppc4xx_core_uic_cfg[] __initdata = {
+	{ .polarity 	= 0xffffe000,
+	  .triggering	= 0x10000000,
+	  .ext_irq_mask	= 0x00001fff,	/* IRQ7 - IRQ12, IRQ0 - IRQ6 */
 	}
 };
diff -Nru a/arch/ppc/platforms/4xx/ibm440gp.c b/arch/ppc/platforms/4xx/ibm440gp.c
--- a/arch/ppc/platforms/4xx/ibm440gp.c	2005-01-10 20:11:20 -08:00
+++ b/arch/ppc/platforms/4xx/ibm440gp.c	2005-01-10 20:11:20 -08:00
@@ -19,6 +19,7 @@
 #include <linux/module.h>
 #include <platforms/4xx/ibm440gp.h>
 #include <asm/ocp.h>
+#include <asm/ppc4xx_pic.h>
 
 static struct ocp_func_emac_data ibm440gp_emac0_def = {
 	.rgmii_idx	= -1,           /* No RGMII */
@@ -148,4 +149,16 @@
 	},
 	{ .vendor	= OCP_VENDOR_INVALID
 	}
+};
+
+/* Polarity and triggering settings for internal interrupt sources */
+struct ppc4xx_uic_settings ppc4xx_core_uic_cfg[] __initdata = {
+	{ .polarity 	= 0xfffffe03,
+	  .triggering	= 0x01c00000,
+	  .ext_irq_mask	= 0x000001fc,	/* IRQ0 - IRQ6 */
+	},
+	{ .polarity 	= 0xffffc0ff,
+	  .triggering	= 0x00ff8000,
+	  .ext_irq_mask	= 0x00003f00,	/* IRQ7 - IRQ12 */
+	},
 };
diff -Nru a/arch/ppc/platforms/4xx/ibm440gx.c b/arch/ppc/platforms/4xx/ibm440gx.c
--- a/arch/ppc/platforms/4xx/ibm440gx.c	2005-01-10 20:11:20 -08:00
+++ b/arch/ppc/platforms/4xx/ibm440gx.c	2005-01-10 20:11:20 -08:00
@@ -19,6 +19,7 @@
 #include <linux/module.h>
 #include <platforms/4xx/ibm440gx.h>
 #include <asm/ocp.h>
+#include <asm/ppc4xx_pic.h>
 
 static struct ocp_func_emac_data ibm440gx_emac0_def = {
 	.rgmii_idx	= -1,		/* No RGMII */
@@ -214,4 +215,20 @@
 	},
 	{ .vendor	= OCP_VENDOR_INVALID
 	}
+};
+
+/* Polarity and triggering settings for internal interrupt sources */
+struct ppc4xx_uic_settings ppc4xx_core_uic_cfg[] __initdata = {
+	{ .polarity 	= 0xfffffe03,
+	  .triggering	= 0x01c00000,
+	  .ext_irq_mask	= 0x000001fc,	/* IRQ0 - IRQ6 */
+	},
+	{ .polarity 	= 0xffffc0ff,
+	  .triggering	= 0x00ff8000,
+	  .ext_irq_mask	= 0x00003f00,	/* IRQ7 - IRQ12 */
+	},
+	{ .polarity 	= 0xffff83ff,
+	  .triggering	= 0x000f83c0,
+	  .ext_irq_mask	= 0x00007c00,	/* IRQ13 - IRQ17 */
+	},
 };
diff -Nru a/arch/ppc/platforms/4xx/ibmnp405h.h b/arch/ppc/platforms/4xx/ibmnp405h.h
--- a/arch/ppc/platforms/4xx/ibmnp405h.h	2005-01-10 20:11:19 -08:00
+++ b/arch/ppc/platforms/4xx/ibmnp405h.h	2005-01-10 20:11:19 -08:00
@@ -132,8 +132,7 @@
 #define DCRN_UIC1_BASE	0x0D0
 #define DCRN_CPC0_EPRCSR 0x0F3
 
-#define UIC0_UIC1NC      30	/* UIC1 non-critical interrupt */
-#define UIC0_UIC1CR      31	/* UIC1 critical interrupt */
+#define UIC0_UIC1NC	0x00000002
 
 #define CHR1_CETE	0x00000004	/* CPU external timer enable */
 #define UIC0	DCRN_UIC0_BASE
@@ -141,7 +140,6 @@
 
 #undef NR_UICS
 #define NR_UICS	2
-#define UIC_CASCADE_MASK 0x0003	/* bits 30 & 31 */
 
 /* EMAC DCRN's FIXME: armin */
 #define DCRN_MALRXCTP2R(base)	((base) + 0x42)	/* Channel Rx 2 Channel Table Pointer */
diff -Nru a/arch/ppc/platforms/4xx/ibmstbx25.c b/arch/ppc/platforms/4xx/ibmstbx25.c
--- a/arch/ppc/platforms/4xx/ibmstbx25.c	2005-01-10 20:11:16 -08:00
+++ b/arch/ppc/platforms/4xx/ibmstbx25.c	2005-01-10 20:11:16 -08:00
@@ -12,6 +12,7 @@
 #include <linux/init.h>
 #include <asm/ocp.h>
 #include <platforms/4xx/ibmstbx25.h>
+#include <asm/ppc4xx_pic.h>
 
 static struct ocp_func_iic_data ibmstbx25_iic0_def = {
 	.fast_mode	= 0,		/* Use standad mode (100Khz) */
@@ -55,5 +56,13 @@
 	  .pm		= IBM_CPM_GPIO0,
 	},
 	{ .vendor	= OCP_VENDOR_INVALID
+	}
+};
+
+/* Polarity and triggering settings for internal interrupt sources */
+struct ppc4xx_uic_settings ppc4xx_core_uic_cfg[] __initdata = {
+	{ .polarity 	= 0xffff8f80,
+	  .triggering	= 0x00000000,
+	  .ext_irq_mask	= 0x0000707f,	/* IRQ7 - IRQ9, IRQ0 - IRQ6 */
 	}
 };
diff -Nru a/arch/ppc/platforms/4xx/oak.c b/arch/ppc/platforms/4xx/oak.c
--- a/arch/ppc/platforms/4xx/oak.c	2005-01-10 20:11:21 -08:00
+++ b/arch/ppc/platforms/4xx/oak.c	2005-01-10 20:11:21 -08:00
@@ -101,8 +101,8 @@
 	ppc_md.setup_arch	 	= oak_setup_arch;
 	ppc_md.show_percpuinfo	 	= oak_show_percpuinfo;
 	ppc_md.irq_canonicalize 	= NULL;
-	ppc_md.init_IRQ		 	= oak_init_IRQ;
-	ppc_md.get_irq		 	= oak_get_irq;
+	ppc_md.init_IRQ		 	= ppc4xx_pic_init;
+	ppc_md.get_irq		 	= NULL;  /* Set in ppc4xx_pic_init() */
 	ppc_md.init		 	= NULL;
 
 	ppc_md.restart		 	= oak_restart;
@@ -153,32 +153,6 @@
 		   bp->bi_busfreq / 1000000);
 
 	return 0;
-}
-
-/*
- * Document me.
- */
-void __init
-oak_init_IRQ(void)
-{
-	int i;
-
-	ppc4xx_pic_init();
-
-	for (i = 0; i < NR_IRQS; i++) {
-		irq_desc[i].handler = ppc4xx_pic;
-	}
-
-	return;
-}
-
-/*
- * Document me.
- */
-int
-oak_get_irq(struct pt_regs *regs)
-{
-	return (ppc4xx_pic_get_irq(regs));
 }
 
 /*
diff -Nru a/arch/ppc/platforms/4xx/ocotea.c b/arch/ppc/platforms/4xx/ocotea.c
--- a/arch/ppc/platforms/4xx/ocotea.c	2005-01-10 20:11:21 -08:00
+++ b/arch/ppc/platforms/4xx/ocotea.c	2005-01-10 20:11:21 -08:00
@@ -347,12 +347,6 @@
 	ibm440gx_get_clocks(&clocks, 33333333, 6 * 1843200);
 	ocp_sys_info.opb_bus_freq = clocks.opb;
 
-	/* XXX Fix L2C IRQ triggerring setting (edge-sensitive).
-	 * Firmware (at least PIBS v1.72 OCT/28/2003) sets it incorrectly
-	 * --ebs
-	 */
-	mtdcr(DCRN_UIC_TR(UIC2), mfdcr(DCRN_UIC_TR(UIC2)) | 0x00000100);
-
 	ibm44x_platform_init();
 
 	ppc_md.setup_arch = ocotea_setup_arch;
diff -Nru a/arch/ppc/platforms/4xx/redwood6.c b/arch/ppc/platforms/4xx/redwood6.c
--- a/arch/ppc/platforms/4xx/redwood6.c	2005-01-10 20:11:24 -08:00
+++ b/arch/ppc/platforms/4xx/redwood6.c	2005-01-10 20:11:24 -08:00
@@ -19,44 +19,20 @@
 #include <linux/delay.h>
 #include <asm/machdep.h>
 
-
 /*
- * Define all of the IRQ senses and polarities.
+ * Define external IRQ senses and polarities.
  */
-
-static u_char redwood6_IRQ_initsenses[] __initdata = {
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 0: RTC/FPC */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 1: Transport */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 2: Audio Dec */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 3: Video Dec */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 4: DMA Chan 0 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 5: DMA Chan 1 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 6: DMA Chan 2 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 7: DMA Chan 3 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 8: SmartCard 0 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 9: IIC0 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 10: IRR */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 11: Cap Timers */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 12: Cmp Timers */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 13: Serial Port */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 14: Soft Modem */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 15: Down Ctrs */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 16: SmartCard 1 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 17: Ext Int 7 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 18: Ext Int 8 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 19: Ext Int 9 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 20: Serial 0 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 21: Serial 1 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 22: Serial 2 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 23: XPT_DMA */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 24: DCR timeout */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 25: Ext Int 0 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 26: Ext Int 1 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 27: Ext Int 2 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 28: Ext Int 3 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 29: Ext Int 4 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 30: Ext Int 5 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 31: Ext Int 6 */
+unsigned char ppc4xx_uic_ext_irq_cfg[] __initdata = {
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* Ext Int 7 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* Ext Int 8 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* Ext Int 9 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* Ext Int 0 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* Ext Int 1 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* Ext Int 2 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* Ext Int 3 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* Ext Int 4 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* Ext Int 5 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* Ext Int 6 */
 };
 
 static struct resource smc91x_resources[] = {
@@ -144,8 +120,6 @@
 
 	printk("\n");
 #endif
-	ibm4xxPIC_InitSenses = redwood6_IRQ_initsenses;
-	ibm4xxPIC_NumInitSenses = sizeof(redwood6_IRQ_initsenses);
 
 	/* Identify the system */
 	printk(KERN_INFO "IBM Redwood6 (STBx25XX) Platform\n");
diff -Nru a/arch/ppc/platforms/4xx/sycamore.c b/arch/ppc/platforms/4xx/sycamore.c
--- a/arch/ppc/platforms/4xx/sycamore.c	2005-01-10 20:11:20 -08:00
+++ b/arch/ppc/platforms/4xx/sycamore.c	2005-01-10 20:11:20 -08:00
@@ -44,42 +44,22 @@
 void *sycamore_rtc_base;
 
 /*
- * Define all of the IRQ senses and polarities.
+ * Define external IRQ senses and polarities.
  */
-
-static u_char Sycamore_IRQ_initsenses[] __initdata = {
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 0: Uart 0*/
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 1: Uart 1*/
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 2: IIC */
-	(IRQ_SENSE_EDGE  | IRQ_POLARITY_POSITIVE),	/* 3: External Master */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 4: PCI ext cmd write*/
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 5: DMA Chan 0 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 6: DMA Chan 1 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 7: DMA Chan 2 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 8: DMA Chan 3 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 9: Ethernet wakeup (WOL)*/
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 10: Mal (SEER) */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 11: Mal TXEOB */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 12: Mal RXEOB */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 13: Mal TXDE*/
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 14: Mal RXDE*/
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 15: Ethernet */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 16: Ext PCI SERR */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 17: ECC */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 18: PCI PM*/
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 19: Ext Int 7 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 20: Ext Int 8 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 21: Ext Int 9 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 22: Ext Int 10 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 23: Ext Int 11 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 24: Ext Int 12 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 25: Ext Int 0 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 26: Ext Int 1 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 27: Ext Int 2 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 28: Ext Int 3 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 29: Ext Int 4 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 30: Ext Int 5 */
-	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* 31: Ext Int 6 */
+unsigned char ppc4xx_uic_ext_irq_cfg[] __initdata = {
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* Ext Int 7 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* Ext Int 8 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* Ext Int 9 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* Ext Int 10 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* Ext Int 11 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* Ext Int 12 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* Ext Int 0 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* Ext Int 1 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* Ext Int 2 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* Ext Int 3 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* Ext Int 4 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* Ext Int 5 */
+	(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),	/* Ext Int 6 */
 };
 
 
@@ -158,8 +138,6 @@
 	sycamore_rtc_base = (void *) SYCAMORE_RTC_VADDR;
 	TODC_INIT(TODC_TYPE_DS1743, sycamore_rtc_base, sycamore_rtc_base,
 		  sycamore_rtc_base, 8);
-	ibm4xxPIC_InitSenses = Sycamore_IRQ_initsenses;
-	ibm4xxPIC_NumInitSenses = sizeof(Sycamore_IRQ_initsenses);
 
 	/* Identify the system */
 	printk(KERN_INFO "IBM Sycamore (IBM405GPr) Platform\n");
diff -Nru a/arch/ppc/platforms/Makefile b/arch/ppc/platforms/Makefile
--- a/arch/ppc/platforms/Makefile	2005-01-10 20:11:23 -08:00
+++ b/arch/ppc/platforms/Makefile	2005-01-10 20:11:23 -08:00
@@ -23,10 +23,13 @@
 obj-$(CONFIG_ADIR)		+= adir_setup.o adir_pic.o adir_pci.o
 obj-$(CONFIG_PQ2ADS)		+= pq2ads.o
 obj-$(CONFIG_TQM8260)		+= tqm8260_setup.o
-obj-$(CONFIG_EV64260)		+= ev64260_setup.o
+obj-$(CONFIG_CPCI690)		+= cpci690.o
+obj-$(CONFIG_EV64260)		+= ev64260.o
+obj-$(CONFIG_CHESTNUT)		+= chestnut.o
 obj-$(CONFIG_GEMINI)		+= gemini_pci.o gemini_setup.o gemini_prom.o
 obj-$(CONFIG_K2)		+= k2.o
 obj-$(CONFIG_LOPEC)		+= lopec.o
+obj-$(CONFIG_KATANA)		+= katana.o
 obj-$(CONFIG_MCPN765)		+= mcpn765.o
 obj-$(CONFIG_MENF1)		+= menf1_setup.o menf1_pci.o
 obj-$(CONFIG_MVME5100)		+= mvme5100.o
diff -Nru a/arch/ppc/platforms/chestnut.c b/arch/ppc/platforms/chestnut.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/ppc/platforms/chestnut.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,623 @@
+/*
+ * arch/ppc/platforms/chestnut.c
+ *
+ * Board setup routines for IBM Chestnut
+ *
+ * Author: <source@mvista.com>
+ *
+ * <2004> (c) MontaVista Software, Inc. This file is licensed under
+ * the terms of the GNU General Public License version 2. This program
+ * is licensed "as is" without any warranty of any kind, whether express
+ * or implied.
+ */
+
+#include <linux/config.h>
+#include <linux/stddef.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/errno.h>
+#include <linux/reboot.h>
+#include <linux/kdev_t.h>
+#include <linux/major.h>
+#include <linux/blkdev.h>
+#include <linux/console.h>
+#include <linux/root_dev.h>
+#include <linux/initrd.h>
+#include <linux/delay.h>
+#include <linux/seq_file.h>
+#include <linux/ide.h>
+#include <linux/serial.h>
+#include <linux/serial_core.h>
+#include <asm/system.h>
+#include <asm/pgtable.h>
+#include <asm/page.h>
+#include <asm/time.h>
+#include <asm/dma.h>
+#include <asm/io.h>
+#include <linux/irq.h>
+#include <asm/hw_irq.h>
+#include <asm/machdep.h>
+#include <asm/kgdb.h>
+#include <asm/bootinfo.h>
+#include <asm/mv64x60.h>
+#include <platforms/chestnut.h>
+
+static u32 boot_base; /* Virtual addr of 8bit boot */
+static u32 cpld_base; /* Virtual addr of CPLD Regs */
+
+static mv64x60_handle_t	bh;
+
+extern void gen550_progress(char *, unsigned short);
+extern void gen550_init(int, struct uart_port *);
+extern void mv64360_pcibios_fixup(mv64x60_handle_t *bh);
+
+#define BIT(x) (1<<x)
+#define CHESTNUT_PRESERVE_MASK (BIT(MV64x60_CPU2DEV_0_WIN) | \
+				BIT(MV64x60_CPU2DEV_1_WIN) | \
+				BIT(MV64x60_CPU2DEV_2_WIN) | \
+				BIT(MV64x60_CPU2DEV_3_WIN) | \
+				BIT(MV64x60_CPU2BOOT_WIN))
+/**************************************************************************
+ * FUNCTION: chestnut_calibrate_decr
+ *
+ * DESCRIPTION: initialize decrementer interrupt frequency (used as system
+ *              timer)
+ *
+ ****/
+static void __init
+chestnut_calibrate_decr(void){
+	ulong freq;
+
+	freq = CHESTNUT_BUS_SPEED / 4;
+
+	printk("time_init: decrementer frequency = %lu.%.6lu MHz\n",
+		freq/1000000, freq%1000000);
+
+	tb_ticks_per_jiffy = freq / HZ;
+	tb_to_us = mulhwu_scale_factor(freq, 1000000);
+
+	return;
+}
+
+static int
+chestnut_show_cpuinfo(struct seq_file *m)
+{
+	seq_printf(m, "vendor\t\t: IBM\n");
+	seq_printf(m, "machine\t\t: 750FX/GX Eval Board (Chestnut/Buckeye)\n");
+
+	return 0;
+}
+
+/**************************************************************************
+ * FUNCTION: chestnut_find_end_of_memory
+ *
+ * DESCRIPTION: ppc_md memory size callback
+ *
+ ****/
+unsigned long __init
+chestnut_find_end_of_memory(void)
+{
+   	static int  mem_size = 0;
+
+   	if (mem_size == 0) {
+      		mem_size = mv64x60_get_mem_size(CONFIG_MV64X60_NEW_BASE,
+				MV64x60_TYPE_MV64460);
+   	}
+   	return(mem_size);
+}
+
+#if defined(CONFIG_SERIAL_8250)
+static void __init
+chestnut_early_serial_map(void)
+{
+	struct uart_port port;
+
+	/* Setup serial port access */
+	memset(&port, 0, sizeof(port));
+	port.uartclk = BASE_BAUD * 16;
+	port.irq = UART0_INT;
+	port.flags = STD_COM_FLAGS | UPF_IOREMAP;
+	port.iotype = SERIAL_IO_MEM;
+	port.mapbase = CHESTNUT_UART0_IO_BASE;
+	port.regshift = 0;
+
+	if (early_serial_setup(&port) != 0)
+		printk("Early serial init of port 0 failed\n");
+
+	/* Assume early_serial_setup() doesn't modify serial_req */
+	port.line = 1;
+	port.irq = UART1_INT;
+	port.mapbase = CHESTNUT_UART1_IO_BASE;
+
+	if (early_serial_setup(&port) != 0)
+		printk("Early serial init of port 1 failed\n");
+}
+#endif
+
+/**************************************************************************
+ * FUNCTION: chestnut_map_irq
+ *
+ * DESCRIPTION: 0 return since PCI IRQs not needed
+ *
+ ****/
+static int __init
+chestnut_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin)
+{
+	static char pci_irq_table[][4] = {
+		{CHESTNUT_PCI_SLOT0_IRQ, CHESTNUT_PCI_SLOT0_IRQ,
+		 CHESTNUT_PCI_SLOT0_IRQ, CHESTNUT_PCI_SLOT0_IRQ},
+		{CHESTNUT_PCI_SLOT1_IRQ, CHESTNUT_PCI_SLOT1_IRQ,
+		 CHESTNUT_PCI_SLOT1_IRQ, CHESTNUT_PCI_SLOT1_IRQ},
+		{CHESTNUT_PCI_SLOT2_IRQ, CHESTNUT_PCI_SLOT2_IRQ,
+		 CHESTNUT_PCI_SLOT2_IRQ, CHESTNUT_PCI_SLOT2_IRQ},
+		{CHESTNUT_PCI_SLOT3_IRQ, CHESTNUT_PCI_SLOT3_IRQ,
+		 CHESTNUT_PCI_SLOT3_IRQ, CHESTNUT_PCI_SLOT3_IRQ},
+	};
+	const long min_idsel = 1, max_idsel = 4, irqs_per_slot = 4;
+
+	return (PCI_IRQ_TABLE_LOOKUP);
+}
+
+
+/**************************************************************************
+ * FUNCTION: chestnut_setup_bridge
+ *
+ * DESCRIPTION: initalize board-specific settings on the MV64360
+ *
+ ****/
+static void __init
+chestnut_setup_bridge(void)
+{
+	struct mv64x60_setup_info	si;
+	int i;
+
+   	if ( ppc_md.progress )
+		ppc_md.progress("chestnut_setup_bridge: enter", 0);
+
+	memset(&si, 0, sizeof(si));
+
+	si.phys_reg_base = CONFIG_MV64X60_NEW_BASE;
+
+	/* setup only PCI bus 0 (bus 1 not used) */
+	si.pci_0.enable_bus = 1;
+	si.pci_0.pci_io.cpu_base = CHESTNUT_PCI0_IO_PROC_ADDR;
+	si.pci_0.pci_io.pci_base_hi = 0;
+	si.pci_0.pci_io.pci_base_lo = CHESTNUT_PCI0_IO_PCI_ADDR;
+	si.pci_0.pci_io.size = CHESTNUT_PCI0_IO_SIZE;
+	si.pci_0.pci_io.swap = MV64x60_CPU2PCI_SWAP_NONE; /* no swapping */
+	si.pci_0.pci_mem[0].cpu_base = CHESTNUT_PCI0_MEM_PROC_ADDR;
+	si.pci_0.pci_mem[0].pci_base_hi = CHESTNUT_PCI0_MEM_PCI_HI_ADDR;
+	si.pci_0.pci_mem[0].pci_base_lo = CHESTNUT_PCI0_MEM_PCI_LO_ADDR;
+	si.pci_0.pci_mem[0].size = CHESTNUT_PCI0_MEM_SIZE;
+	si.pci_0.pci_mem[0].swap = MV64x60_CPU2PCI_SWAP_NONE; /* no swapping */
+	si.pci_0.pci_cmd_bits = 0;
+	si.pci_0.latency_timer = 0x80;
+
+	si.window_preserve_mask_32_lo = CHESTNUT_PRESERVE_MASK;
+
+	for (i=0; i<MV64x60_CPU2MEM_WINDOWS; i++) {
+		si.cpu_prot_options[i] = 0;
+#ifdef CONFIG_NOT_CACHE_COHERENT
+		si.cpu_snoop_options[i] = MV64360_CPU_SNOOP_NONE;
+#else
+		si.cpu_snoop_options[i] = MV64360_CPU_SNOOP_WB; /* risky */
+#endif
+		si.pci_0.acc_cntl_options[i] =
+#ifdef CONFIG_NOT_CACHE_COHERENT
+			MV64360_PCI_ACC_CNTL_SNOOP_NONE |
+#else
+			MV64360_PCI_ACC_CNTL_SNOOP_WB | /* risky */
+#endif
+			MV64360_PCI_ACC_CNTL_SWAP_NONE |
+			MV64360_PCI_ACC_CNTL_MBURST_32_BYTES |
+			MV64360_PCI_ACC_CNTL_RDSIZE_32_BYTES;
+	}
+
+   	/* Lookup host bridge - on CPU 0 - no SMP support */
+   	if (mv64x60_init(&bh, &si)) {
+        	printk("\n\nPCI Bridge initialization failed!\n");
+   	}
+
+	pci_dram_offset = 0;
+	ppc_md.pci_swizzle = common_swizzle;
+	ppc_md.pci_map_irq = chestnut_map_irq;
+	ppc_md.pci_exclude_device = mv64x60_pci_exclude_device;
+
+	mv64x60_set_bus(&bh, 0, 0);
+	bh.hose_a->first_busno = 0;
+	bh.hose_a->last_busno = 0xff;
+	bh.hose_a->last_busno = pciauto_bus_scan(bh.hose_a, 0);
+
+}
+
+void __init
+chestnut_setup_peripherals(void)
+{
+
+   	mv64x60_set_32bit_window(&bh, MV64x60_CPU2BOOT_WIN,
+			CHESTNUT_BOOT_8BIT_BASE, CHESTNUT_BOOT_8BIT_SIZE, 0);
+
+	mv64x60_set_32bit_window(&bh, MV64x60_CPU2DEV_0_WIN,
+			CHESTNUT_32BIT_BASE, CHESTNUT_32BIT_SIZE, 0);
+	mv64x60_set_32bit_window(&bh, MV64x60_CPU2DEV_1_WIN,
+			CHESTNUT_CPLD_BASE, CHESTNUT_CPLD_SIZE, 0);
+
+	mv64x60_set_32bit_window(&bh, MV64x60_CPU2DEV_2_WIN,
+			CHESTNUT_UART_BASE, CHESTNUT_UART_SIZE, 0);
+	mv64x60_set_32bit_window(&bh, MV64x60_CPU2DEV_3_WIN,
+			CHESTNUT_FRAM_BASE, CHESTNUT_FRAM_SIZE, 0);
+   	/* Set up window for internal sram (256KByte insize) */
+   	mv64x60_set_32bit_window(&bh, MV64x60_CPU2SRAM_WIN,
+			CHESTNUT_INTERNAL_SRAM_BASE,
+			CHESTNUT_INTERNAL_SRAM_SIZE, 0);
+
+	boot_base = (u32)ioremap(CHESTNUT_BOOT_8BIT_BASE,
+				CHESTNUT_BOOT_8BIT_SIZE);
+	cpld_base = (u32)ioremap(CHESTNUT_CPLD_BASE, CHESTNUT_CPLD_SIZE);
+
+   	/*
+    	 * Configure internal SRAM -
+    	 * Cache coherent write back, incase
+	 *      CONFIG_MV64360_SRAM_CACHE_COHERENT set
+    	 * Parity enabled.
+    	 * Parity error propagation
+    	 * Arbitration not parked for CPU only
+    	 * Other bits are reserved.
+    	 */
+#ifdef CONFIG_MV64360_SRAM_CACHE_COHERENT
+   	mv64x60_write(&bh, MV64360_SRAM_CONFIG, 0x001600b2);
+#else
+   	mv64x60_write(&bh, MV64360_SRAM_CONFIG, 0x001600b0);
+#endif
+
+   	/*
+    	 * Setting the SRAM to 0. Note that this generates parity errors on
+	 * internal data path in SRAM since it's first time accessing it
+	 * while after reset it's not configured
+    	*/
+   	memset((void *)CHESTNUT_INTERNAL_SRAM_BASE, 0, CHESTNUT_INTERNAL_SRAM_SIZE);
+	/*
+	 * Configure MPP pins for PCI DMA
+	 *
+	 * PCI Slot	GNT pin		REQ pin
+	 *	0	MPP16		MPP17
+	 *	1	MPP18		MPP19
+	 *	2	MPP20		MPP21
+	 *	3	MPP22		MPP23
+	 */
+	mv64x60_write(&bh, MV64x60_MPP_CNTL_2,
+			(0x1 << 0)  |	/* MPPSel16 PCI0_GNT[0] */
+			(0x1 << 4)  |	/* MPPSel17 PCI0_REQ[0] */
+			(0x1 << 8)  |	/* MPPSel18 PCI0_GNT[1] */
+			(0x1 << 12) |	/* MPPSel19 PCI0_REQ[1] */
+			(0x1 << 16) |	/* MPPSel20 PCI0_GNT[2] */
+			(0x1 << 20) |	/* MPPSel21 PCI0_REQ[2] */
+			(0x1 << 24) |	/* MPPSel22 PCI0_GNT[3] */
+			(0x1 << 28));	/* MPPSel23 PCI0_REQ[3] */
+	/*
+	 * Set unused MPP pins for output, as per schematic note
+	 *
+	 * Unused Pins: MPP01, MPP02, MPP04, MPP05, MPP06
+	 *		MPP09, MPP10, MPP13, MPP14, MPP15
+	 */
+	mv64x60_clr_bits(&bh, MV64x60_MPP_CNTL_0,
+			(0xf << 4)  |	/* MPPSel01 GPIO[1] */
+			(0xf << 8)  |	/* MPPSel02 GPIO[2] */
+			(0xf << 16) |	/* MPPSel04 GPIO[4] */
+			(0xf << 20) |	/* MPPSel05 GPIO[5] */
+			(0xf << 24));	/* MPPSel06 GPIO[6] */
+	mv64x60_clr_bits(&bh, MV64x60_MPP_CNTL_1,
+			(0xf << 4)  |	/* MPPSel09 GPIO[9] */
+			(0xf << 8)  |	/* MPPSel10 GPIO[10] */
+			(0xf << 20) |	/* MPPSel13 GPIO[13] */
+			(0xf << 24) |	/* MPPSel14 GPIO[14] */
+			(0xf << 28));	/* MPPSel15 GPIO[15] */
+	mv64x60_set_bits(&bh, MV64x60_GPP_IO_CNTL,
+			BIT(1)  | BIT(2)  | BIT(4)  | BIT(5)  | BIT(6)  |
+			BIT(9)  | BIT(10) | BIT(13) | BIT(14) | BIT(15)); /* Output */
+
+   	/*
+    	 * Configure the following MPP pins to indicate a level
+    	 * triggered interrupt
+    	 *
+       	 * MPP24 - Board Reset (just map the MPP & GPP for chestnut_reset)
+       	 * MPP25 - UART A  (high)
+       	 * MPP26 - UART B  (high)
+	 * MPP28 - PCI Slot 3 (low)
+	 * MPP29 - PCI Slot 2 (low)
+	 * MPP30 - PCI Slot 1 (low)
+	 * MPP31 - PCI Slot 0 (low)
+    	 */
+        mv64x60_clr_bits(&bh, MV64x60_MPP_CNTL_3,
+                        BIT(3) | BIT(2) | BIT(1) | BIT(0)	 | /* MPP 24 */
+                        BIT(7) | BIT(6) | BIT(5) | BIT(4)	 | /* MPP 25 */
+                        BIT(11) | BIT(10) | BIT(9) | BIT(8)	 | /* MPP 26 */
+			BIT(19) | BIT(18) | BIT(17) | BIT(16)	 | /* MPP 28 */
+			BIT(23) | BIT(22) | BIT(21) | BIT(20)	 | /* MPP 29 */
+			BIT(27) | BIT(26) | BIT(25) | BIT(24)	 | /* MPP 30 */
+			BIT(31) | BIT(30) | BIT(29) | BIT(28));    /* MPP 31 */
+
+   	/*
+	 * Define GPP 25 (high), 26 (high), 28 (low), 29 (low), 30 (low),
+	 * 31 (low) interrupt polarity input signal and level triggered
+    	 */
+   	mv64x60_clr_bits(&bh, MV64x60_GPP_LEVEL_CNTL, BIT(25) | BIT(26));
+   	mv64x60_set_bits(&bh, MV64x60_GPP_LEVEL_CNTL,
+			BIT(28) | BIT(29) | BIT(30) | BIT(31));
+   	mv64x60_clr_bits(&bh, MV64x60_GPP_IO_CNTL,
+			BIT(25) | BIT(26) | BIT(28) | BIT(29) | BIT(30) |
+			BIT(31));
+
+   	/* Config GPP interrupt controller to respond to level trigger */
+   	mv64x60_set_bits(&bh, MV64360_COMM_ARBITER_CNTL, BIT(10));
+
+   	/*
+    	 * Dismiss and then enable interrupt on GPP interrupt cause for CPU #0
+    	 */
+   	mv64x60_write(&bh, MV64x60_GPP_INTR_CAUSE,
+			~(BIT(25) | BIT(26) | BIT(28) | BIT(29) | BIT(30) |
+			  BIT(31)));
+   	mv64x60_set_bits(&bh, MV64x60_GPP_INTR_MASK,
+			BIT(25) | BIT(26) | BIT(28) | BIT(29) | BIT(30) |
+			BIT(31));
+
+   	/*
+    	 * Dismiss and then enable interrupt on CPU #0 high cause register
+    	 * BIT27 summarizes GPP interrupts 24-31
+    	*/
+   	mv64x60_set_bits(&bh, MV64360_IC_CPU0_INTR_MASK_HI, BIT(27));
+
+   	if (ppc_md.progress)
+		ppc_md.progress("chestnut_setup_bridge: exit", 0);
+}
+
+/**************************************************************************
+ * FUNCTION: chestnut_setup_arch
+ *
+ * DESCRIPTION: ppc_md machine configuration callback
+ *
+ ****/
+static void __init
+chestnut_setup_arch(void)
+{
+	if (ppc_md.progress)
+      		ppc_md.progress("chestnut_setup_arch: enter", 0);
+
+	/* init to some ~sane value until calibrate_delay() runs */
+	loops_per_jiffy = 50000000 / HZ;
+
+   	/* if the time base value is greater than bus freq/4 (the TB and
+    	* decrementer tick rate) + signed integer rollover value, we
+    	* can spend a fair amount of time waiting for the rollover to
+    	* happen.  To get around this, initialize the time base register
+    	* to a "safe" value.
+    	*/
+   	set_tb(0, 0);
+
+#ifdef CONFIG_BLK_DEV_INITRD
+	if (initrd_start)
+		ROOT_DEV = Root_RAM0;
+	else
+#endif
+#ifdef CONFIG_ROOT_NFS
+		ROOT_DEV = Root_NFS;
+#else
+		ROOT_DEV = Root_SDA2;
+#endif
+
+   	/*
+    	* Set up the L2CR register.
+    	*/
+ 	_set_L2CR(_get_L2CR() | L2CR_L2E);
+
+	chestnut_setup_bridge();
+	chestnut_setup_peripherals();
+
+#ifdef CONFIG_DUMMY_CONSOLE
+	conswitchp = &dummy_con;
+#endif
+
+#if defined(CONFIG_SERIAL_8250)
+	chestnut_early_serial_map();
+#endif
+
+	/* Identify the system */
+	printk(KERN_INFO "System Identification: IBM 750FX/GX Eval Board\n");
+	printk(KERN_INFO "IBM 750FX/GX port (C) 2004 MontaVista Software, Inc. (source@mvista.com)\n");
+
+	if (ppc_md.progress)
+      		ppc_md.progress("chestnut_setup_arch: exit", 0);
+
+	return;
+}
+
+/**************************************************************************
+ * FUNCTION: chestnut_restart
+ *
+ * DESCRIPTION: ppc_md machine reset callback
+ *              reset the board via the CPLD command register
+ *
+ ****/
+static void
+chestnut_restart(char *cmd)
+{
+	volatile ulong i = 10000000;
+
+	local_irq_disable();
+
+        /*
+         * Set CPLD Reg 3 bit 0 to 1 to allow MPP signals on reset to work
+         *
+         * MPP24 - board reset
+         */
+   	writeb(0x1, (void __iomem *)(cpld_base+3));
+
+	/* GPP pin tied to MPP earlier */
+        mv64x60_set_bits(&bh, MV64x60_GPP_VALUE_SET, BIT(24));
+
+   	while (i-- > 0);
+   	panic("restart failed\n");
+}
+
+static void
+chestnut_halt(void)
+{
+	local_irq_disable();
+	for (;;);
+	/* NOTREACHED */
+}
+
+static void
+chestnut_power_off(void)
+{
+	chestnut_halt();
+	/* NOTREACHED */
+}
+
+#define SET_PCI_COMMAND_INVALIDATE
+#ifdef SET_PCI_COMMAND_INVALIDATE
+/*
+ * Dave Wilhardt found that PCI_COMMAND_INVALIDATE must
+ * be set for each device if you are using cache coherency.
+ */
+static void __init
+set_pci_command_invalidate(void)
+{
+	struct pci_dev *dev = NULL;
+	u16 val;
+
+	while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
+		pci_read_config_word(dev, PCI_COMMAND, &val);
+		val |= PCI_COMMAND_INVALIDATE;
+		pci_write_config_word(dev, PCI_COMMAND, val);
+
+		pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE,
+				      L1_CACHE_LINE_SIZE >> 2);
+	}
+}
+#endif
+
+static void __init
+chestnut_pci_fixups(void)
+{
+#ifdef SET_PCI_COMMAND_INVALIDATE
+	set_pci_command_invalidate();
+#endif
+}
+
+/**************************************************************************
+ * FUNCTION: chestnut_map_io
+ *
+ * DESCRIPTION: configure fixed memory-mapped IO
+ *
+ ****/
+static void __init
+chestnut_map_io(void)
+{
+#ifdef CONFIG_MV64360_SRAM_CACHEABLE
+   	io_block_mapping(CHESTNUT_INTERNAL_SRAM_BASE,
+       			CHESTNUT_INTERNAL_SRAM_BASE,
+       			CHESTNUT_INTERNAL_SRAM_SIZE,
+       			_PAGE_KERNEL | _PAGE_GUARDED);
+#else
+#ifdef CONFIG_MV64360_SRAM_CACHE_COHERENT
+   	io_block_mapping(CHESTNUT_INTERNAL_SRAM_BASE,
+       			CHESTNUT_INTERNAL_SRAM_BASE,
+       			CHESTNUT_INTERNAL_SRAM_SIZE,
+       			_PAGE_KERNEL | _PAGE_GUARDED | _PAGE_COHERENT);
+#else
+   	io_block_mapping(CHESTNUT_INTERNAL_SRAM_BASE,
+       			CHESTNUT_INTERNAL_SRAM_BASE,
+       			CHESTNUT_INTERNAL_SRAM_SIZE,
+       			_PAGE_IO);
+#endif /* !CONFIG_MV64360_SRAM_CACHE_COHERENT */
+#endif /* !CONFIG_MV64360_SRAM_CACHEABLE */
+
+#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)
+	io_block_mapping(CHESTNUT_UART_BASE, CHESTNUT_UART_BASE, 0x100000, _PAGE_IO);
+#endif
+}
+
+/**************************************************************************
+ * FUNCTION: chestnut_set_bat
+ *
+ * DESCRIPTION: configures a (temporary) bat mapping for early access to
+ *              device I/O
+ *
+ ****/
+static __inline__ void
+chestnut_set_bat(void)
+{
+        mb();
+        mtspr(DBAT3U, 0xf0001ffe);
+        mtspr(DBAT3L, 0xf000002a);
+        mb();
+
+	return;
+}
+
+/**************************************************************************
+ * FUNCTION: platform_init
+ *
+ * DESCRIPTION: main entry point for configuring board-specific machine
+ *              callbacks
+ *
+ ****/
+void __init
+platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
+	      unsigned long r6, unsigned long r7)
+{
+	parse_bootinfo(find_bootinfo());
+
+        /* Copy the kernel command line arguments to a safe place. */
+
+        if (r6) {
+                *(char *) (r7 + KERNELBASE) = 0;
+                strcpy(cmd_line, (char *) (r6 + KERNELBASE));
+        }
+
+	isa_mem_base = 0;
+
+	ppc_md.setup_arch = chestnut_setup_arch;
+	ppc_md.show_cpuinfo = chestnut_show_cpuinfo;
+	ppc_md.irq_canonicalize = NULL;
+	ppc_md.init_IRQ = mv64360_init_irq;
+	ppc_md.get_irq = mv64360_get_irq;
+	ppc_md.init = NULL;
+
+	ppc_md.find_end_of_memory = chestnut_find_end_of_memory;
+	ppc_md.setup_io_mappings  = chestnut_map_io;
+	ppc_md.pcibios_fixup = chestnut_pci_fixups;
+
+	ppc_md.restart = chestnut_restart;
+   	ppc_md.power_off = chestnut_power_off;
+   	ppc_md.halt = chestnut_halt;
+
+	ppc_md.time_init = NULL;
+	ppc_md.set_rtc_time = NULL;
+	ppc_md.get_rtc_time = NULL;
+	ppc_md.calibrate_decr = chestnut_calibrate_decr;
+
+	ppc_md.nvram_read_val = NULL;
+	ppc_md.nvram_write_val = NULL;
+
+	ppc_md.heartbeat = NULL;
+
+	ppc_md.pcibios_fixup = chestnut_pci_fixups;
+
+	bh.p_base = CONFIG_MV64X60_NEW_BASE;
+
+	chestnut_set_bat();
+
+#if defined(CONFIG_SERIAL_TEXT_DEBUG)
+	ppc_md.progress = gen550_progress;
+#endif
+#if defined(CONFIG_KGDB)
+	ppc_md.kgdb_map_scc = gen550_kgdb_map_scc;
+#endif
+
+	if (ppc_md.progress)
+                ppc_md.progress("chestnut_init(): exit", 0);
+
+        return;
+}
diff -Nru a/arch/ppc/platforms/chestnut.h b/arch/ppc/platforms/chestnut.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/ppc/platforms/chestnut.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,128 @@
+/*
+ * arch/ppc/platforms/chestnut.h
+ *
+ * Definitions for IBM 750FXGX Eval (Chestnut)
+ *
+ * Author: <source@mvista.com>
+ *
+ * Based on Artesyn Katana code done by Tim Montgomery <timm@artesyncp.com>
+ * Based on code done by Rabeeh Khoury - rabeeh@galileo.co.il
+ * Based on code done by Mark A. Greer <mgreer@mvista.com>
+ *
+ * <2004> (c) MontaVista Software, Inc. This file is licensed under
+ * the terms of the GNU General Public License version 2. This program
+ * is licensed "as is" without any warranty of any kind, whether express
+ * or implied.
+ */
+
+/*
+ * This is the CPU physical memory map (windows must be at least 1MB and start
+ * on a boundary that is a multiple of the window size):
+ *
+ * Seems on the IBM 750FXGX Eval board, the MV64460 Registers can be in
+ * only 2 places per switch U17 0x14000000 or 0xf1000000 easily - chose to
+ * implement at 0xf1000000 only at this time
+ *
+ *    0xfff00000-0xffffffff      - 8 Flash
+ *    0xffd00000-0xffd00004      - CPLD
+ *    0xffc00000-0xffc0000f      - UART
+ *    0xffb00000-0xffb07fff      - FRAM
+ *    0xffa00000-0xffafffff      - *** HOLE ***
+ *    0xff900000-0xff9fffff      - MV64460 Integrated SRAM
+ *    0xfe000000-0xff8fffff      - *** HOLE ***
+ *    0xfc000000-0xfdffffff      - 32bit Flash
+ *    0xf1010000-0xfbffffff      - *** HOLE ***
+ *    0xf1000000-0xf100ffff      - MV64460 Registers
+ */
+
+#ifndef __PPC_PLATFORMS_CHESTNUT_H__
+#define __PPC_PLATFORMS_CHESTNUT_H__
+
+#define CHESTNUT_BOOT_8BIT_BASE			0xfff00000
+#define CHESTNUT_BOOT_8BIT_SIZE_ACTUAL		(1024*1024)
+#define CHESTNUT_BOOT_SRAM_BASE			0xffe00000
+#define CHESTNUT_BOOT_SRAM_SIZE_ACTUAL		(1024*1024)
+#define CHESTNUT_CPLD_BASE			0xffd00000
+#define CHESTNUT_CPLD_SIZE_ACTUAL		5
+#define CHESTNUT_CPLD_REG3			(CHESTNUT_CPLD_BASE+3)
+#define CHESTNUT_UART_BASE			0xffc00000
+#define CHESTNUT_UART_SIZE_ACTUAL		16
+#define CHESTNUT_FRAM_BASE			0xffb00000
+#define CHESTNUT_FRAM_SIZE_ACTUAL		(32*1024)
+#define CHESTNUT_BRIDGE_REG_BASE		0xf1000000
+#define CHESTNUT_INTERNAL_SRAM_BASE		0xff900000
+#define CHESTNUT_INTERNAL_SRAM_SIZE_ACTUAL	(256*1024)
+#define CHESTNUT_32BIT_BASE			0xfc000000
+#define CHESTNUT_32BIT_SIZE			(32*1024*1024)
+
+#define CHESTNUT_BOOT_8BIT_SIZE		max(MV64360_WINDOW_SIZE_MIN, \
+					CHESTNUT_BOOT_8BIT_SIZE_ACTUAL)
+#define CHESTNUT_BOOT_SRAM_SIZE		max(MV64360_WINDOW_SIZE_MIN, \
+					CHESTNUT_BOOT_SRAM_SIZE_ACTUAL)
+#define CHESTNUT_CPLD_SIZE		max(MV64360_WINDOW_SIZE_MIN, \
+					CHESTNUT_CPLD_SIZE_ACTUAL)
+#define CHESTNUT_UART_SIZE		max(MV64360_WINDOW_SIZE_MIN, \
+					CHESTNUT_UART_SIZE_ACTUAL)
+#define CHESTNUT_FRAM_SIZE		max(MV64360_WINDOW_SIZE_MIN, \
+					CHESTNUT_FRAM_SIZE_ACTUAL)
+#define CHESTNUT_INTERNAL_SRAM_SIZE	max(MV64360_WINDOW_SIZE_MIN, \
+					CHESTNUT_INTERNAL_SRAM_SIZE_ACTUAL)
+
+#define CHESTNUT_BUS_SPEED		200000000
+#define CHESTNUT_PIBS_DATABASE		0xf0000 /* from PIBS src code */
+
+#define MV64360_ETH_PORT_SERIAL_CONTROL_REG_PORT0 	0x243c
+#define MV64360_ETH_PORT_SERIAL_CONTROL_REG_PORT1 	0x283c
+
+/*
+ * PCI windows
+ */
+
+#define CHESTNUT_PCI0_MEM_PROC_ADDR	0x80000000
+#define CHESTNUT_PCI0_MEM_PCI_HI_ADDR	0x00000000
+#define CHESTNUT_PCI0_MEM_PCI_LO_ADDR	0x80000000
+#define CHESTNUT_PCI0_MEM_SIZE		0x10000000
+#define CHESTNUT_PCI0_IO_PROC_ADDR	0xa0000000
+#define CHESTNUT_PCI0_IO_PCI_ADDR	0x00000000
+#define CHESTNUT_PCI0_IO_SIZE		0x01000000
+
+/*
+ * Board-specific IRQ info
+ */
+#define CHESTNUT_PCI_SLOT0_IRQ	64+31
+#define CHESTNUT_PCI_SLOT1_IRQ	64+30
+#define CHESTNUT_PCI_SLOT2_IRQ	64+29
+#define CHESTNUT_PCI_SLOT3_IRQ	64+28
+
+/* serial port definitions */
+#define CHESTNUT_UART0_IO_BASE  CHESTNUT_UART_BASE+8
+#define CHESTNUT_UART1_IO_BASE  CHESTNUT_UART_BASE
+
+#define UART0_INT           	64+25
+#define UART1_INT        	64+26
+
+#ifdef CONFIG_SERIAL_MANY_PORTS
+#define RS_TABLE_SIZE  64
+#else
+#define RS_TABLE_SIZE  2
+#endif
+
+/* Rate for the 3.6864 Mhz clock for the onboard serial chip */
+#define BASE_BAUD 		( 3686400 / 16 )
+
+#ifdef CONFIG_SERIAL_DETECT_IRQ
+#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST|ASYNC_AUTO_IRQ)
+#else
+#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST)
+#endif
+
+#define STD_UART_OP(num)						\
+        { 0, BASE_BAUD, 0, UART##num##_INT, STD_COM_FLAGS,		\
+                iomem_base: (u8 *)CHESTNUT_UART##num##_IO_BASE,	\
+		io_type: SERIAL_IO_MEM},
+
+#define SERIAL_PORT_DFNS        \
+        STD_UART_OP(0)          \
+        STD_UART_OP(1)
+
+#endif /* __PPC_PLATFORMS_CHESTNUT_H__ */
diff -Nru a/arch/ppc/platforms/chrp_pci.c b/arch/ppc/platforms/chrp_pci.c
--- a/arch/ppc/platforms/chrp_pci.c	2005-01-10 20:11:23 -08:00
+++ b/arch/ppc/platforms/chrp_pci.c	2005-01-10 20:11:23 -08:00
@@ -23,7 +23,7 @@
 #include <asm/open_pic.h>
 
 /* LongTrail */
-unsigned long gg2_pci_config_base;
+void __iomem *gg2_pci_config_base;
 
 /*
  * The VLSI Golden Gate II has only 512K of PCI configuration space, so we
@@ -33,7 +33,7 @@
 int __chrp gg2_read_config(struct pci_bus *bus, unsigned int devfn, int off,
 			   int len, u32 *val)
 {
-	volatile unsigned char *cfg_data;
+	volatile void __iomem *cfg_data;
 	struct pci_controller *hose = bus->sysdata;
 
 	if (bus->number > 7)
@@ -45,13 +45,13 @@
 	cfg_data = hose->cfg_data + ((bus->number<<16) | (devfn<<8) | off);
 	switch (len) {
 	case 1:
-		*val =  in_8((u8 *)cfg_data);
+		*val =  in_8(cfg_data);
 		break;
 	case 2:
-		*val = in_le16((u16 *)cfg_data);
+		*val = in_le16(cfg_data);
 		break;
 	default:
-		*val = in_le32((u32 *)cfg_data);
+		*val = in_le32(cfg_data);
 		break;
 	}
 	return PCIBIOS_SUCCESSFUL;
@@ -60,7 +60,7 @@
 int __chrp gg2_write_config(struct pci_bus *bus, unsigned int devfn, int off,
 			    int len, u32 val)
 {
-	volatile unsigned char *cfg_data;
+	volatile void __iomem *cfg_data;
 	struct pci_controller *hose = bus->sysdata;
 
 	if (bus->number > 7)
@@ -72,13 +72,13 @@
 	cfg_data = hose->cfg_data + ((bus->number<<16) | (devfn<<8) | off);
 	switch (len) {
 	case 1:
-		out_8((u8 *)cfg_data, val);
+		out_8(cfg_data, val);
 		break;
 	case 2:
-		out_le16((u16 *)cfg_data, val);
+		out_le16(cfg_data, val);
 		break;
 	default:
-		out_le32((u32 *)cfg_data, val);
+		out_le32(cfg_data, val);
 		break;
 	}
 	return PCIBIOS_SUCCESSFUL;
@@ -253,10 +253,10 @@
 			   || strncmp(model, "Motorola, Grackle", 17) == 0) {
 			setup_grackle(hose);
 		} else if (is_longtrail) {
+			void __iomem *p = ioremap(GG2_PCI_CONFIG_BASE, 0x80000);
 			hose->ops = &gg2_pci_ops;
-			hose->cfg_data = (unsigned char *)
-				ioremap(GG2_PCI_CONFIG_BASE, 0x80000);
-			gg2_pci_config_base = (unsigned long) hose->cfg_data;
+			hose->cfg_data = p;
+			gg2_pci_config_base = p;
 		} else {
 			printk("No methods for %s (model %s), using RTAS\n",
 			       dev->full_name, model);
diff -Nru a/arch/ppc/platforms/chrp_setup.c b/arch/ppc/platforms/chrp_setup.c
--- a/arch/ppc/platforms/chrp_setup.c	2005-01-10 20:11:21 -08:00
+++ b/arch/ppc/platforms/chrp_setup.c	2005-01-10 20:11:21 -08:00
@@ -118,13 +118,12 @@
 	if (!strncmp(model, "IBM,LongTrail", 13)) {
 		/* VLSI VAS96011/12 `Golden Gate 2' */
 		/* Memory banks */
-		sdramen = (in_le32((unsigned *)(gg2_pci_config_base+
-						GG2_PCI_DRAM_CTRL))
+		sdramen = (in_le32(gg2_pci_config_base + GG2_PCI_DRAM_CTRL)
 			   >>31) & 1;
 		for (i = 0; i < (sdramen ? 4 : 6); i++) {
-			t = in_le32((unsigned *)(gg2_pci_config_base+
+			t = in_le32(gg2_pci_config_base+
 						 GG2_PCI_DRAM_BANK0+
-						 i*4));
+						 i*4);
 			if (!(t & 1))
 				continue;
 			switch ((t>>8) & 0x1f) {
@@ -154,7 +153,7 @@
 				   gg2_memtypes[sdramen ? 1 : ((t>>1) & 3)]);
 		}
 		/* L2 cache */
-		t = in_le32((unsigned *)(gg2_pci_config_base+GG2_PCI_CC_CTRL));
+		t = in_le32(gg2_pci_config_base+GG2_PCI_CC_CTRL);
 		seq_printf(m, "board l2\t: %s %s (%s)\n",
 			   gg2_cachesizes[(t>>7) & 3],
 			   gg2_cachetypes[(t>>2) & 3],
diff -Nru a/arch/ppc/platforms/cpci690.c b/arch/ppc/platforms/cpci690.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/ppc/platforms/cpci690.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,493 @@
+/*
+ * arch/ppc/platforms/cpci690.c
+ *
+ * Board setup routines for the Force CPCI690 board.
+ *
+ * Author: Mark A. Greer <mgreer@mvista.com>
+ *
+ * 2003 (c) MontaVista Software, Inc.  This file is licensed under
+ * the terms of the GNU General Public License version 2.  This programr
+ * is licensed "as is" without any warranty of any kind, whether express
+ * or implied.
+ */
+#include <linux/config.h>
+#include <linux/delay.h>
+#include <linux/pci.h>
+#include <linux/ide.h>
+#include <linux/irq.h>
+#include <linux/fs.h>
+#include <linux/seq_file.h>
+#include <linux/console.h>
+#include <linux/initrd.h>
+#include <linux/root_dev.h>
+#include <linux/mv643xx.h>
+#include <asm/bootinfo.h>
+#include <asm/machdep.h>
+#include <asm/todc.h>
+#include <asm/time.h>
+#include <asm/mv64x60.h>
+#include <platforms/cpci690.h>
+
+#define BOARD_VENDOR	"Force"
+#define BOARD_MACHINE	"CPCI690"
+
+/* Set IDE controllers into Native mode? */
+#define SET_PCI_IDE_NATIVE
+
+static struct mv64x60_handle	bh;
+static u32 cpci690_br_base;
+
+static const unsigned int cpu_7xx[16] = { /* 7xx & 74xx (but not 745x) */
+	18, 15, 14, 2, 4, 13, 5, 9, 6, 11, 8, 10, 16, 12, 7, 0
+};
+
+TODC_ALLOC();
+
+static int __init
+cpci690_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin)
+{
+	struct pci_controller	*hose = pci_bus_to_hose(dev->bus->number);
+
+	if (hose->index == 0) {
+		static char pci_irq_table[][4] =
+		/*
+		 *	PCI IDSEL/INTPIN->INTLINE
+		 * 	   A   B   C   D
+		 */
+		{
+			{ 90, 91, 88, 89}, /* IDSEL 30/20 - Sentinel */
+		};
+
+		const long min_idsel = 20, max_idsel = 20, irqs_per_slot = 4;
+		return PCI_IRQ_TABLE_LOOKUP;
+	}
+	else {
+		static char pci_irq_table[][4] =
+		/*
+		 *	PCI IDSEL/INTPIN->INTLINE
+		 * 	   A   B   C   D
+		 */
+		{
+			{ 93, 94, 95, 92}, /* IDSEL 28/18 - PMC slot 2 */
+			{  0,  0,  0,  0}, /* IDSEL 29/19 - Not used */
+			{ 94, 95, 92, 93}, /* IDSEL 30/20 - PMC slot 1 */
+		};
+
+		const long min_idsel = 18, max_idsel = 20, irqs_per_slot = 4;
+		return PCI_IRQ_TABLE_LOOKUP;
+	}
+}
+
+static int
+cpci690_get_bus_speed(void)
+{
+	return 133333333;
+}
+
+static int
+cpci690_get_cpu_speed(void)
+{
+	unsigned long	hid1;
+
+	hid1 = mfspr(HID1) >> 28;
+	return cpci690_get_bus_speed() * cpu_7xx[hid1]/2;
+}
+
+#define	KB	(1024UL)
+#define	MB	(1024UL * KB)
+#define	GB	(1024UL * MB)
+
+unsigned long __init
+cpci690_find_end_of_memory(void)
+{
+	u32		mem_ctlr_size;
+	static u32	board_size;
+	static u8	first_time = 1;
+
+	if (first_time) {
+		/* Using cpci690_set_bat() mapping ==> virt addr == phys addr */
+		switch (in_8((u8 *) (cpci690_br_base +
+			CPCI690_BR_MEM_CTLR)) & 0x07) {
+		case 0x01:
+			board_size = 256*MB;
+			break;
+		case 0x02:
+			board_size = 512*MB;
+			break;
+		case 0x03:
+			board_size = 768*MB;
+			break;
+		case 0x04:
+			board_size = 1*GB;
+			break;
+		case 0x05:
+			board_size = 1*GB + 512*MB;
+			break;
+		case 0x06:
+			board_size = 2*GB;
+			break;
+		default:
+			board_size = 0xffffffff; /* use mem ctlr size */
+		} /* switch */
+
+		mem_ctlr_size =  mv64x60_get_mem_size(CONFIG_MV64X60_NEW_BASE,
+			MV64x60_TYPE_GT64260A);
+
+		/* Check that mem ctlr & board reg agree.  If not, pick MIN. */
+		if (board_size != mem_ctlr_size) {
+			printk(KERN_WARNING "Board register & memory controller"
+				"mem size disagree (board reg: 0x%lx, "
+				"mem ctlr: 0x%lx)\n",
+				(ulong)board_size, (ulong)mem_ctlr_size);
+			board_size = min(board_size, mem_ctlr_size);
+		}
+
+		first_time = 0;
+	} /* if */
+
+	return board_size;
+}
+
+static void __init
+cpci690_setup_bridge(void)
+{
+	struct mv64x60_setup_info	si;
+	int				i;
+
+	memset(&si, 0, sizeof(si));
+
+	si.phys_reg_base = CONFIG_MV64X60_NEW_BASE;
+
+	si.pci_0.enable_bus = 1;
+	si.pci_0.pci_io.cpu_base = CPCI690_PCI0_IO_START_PROC_ADDR;
+	si.pci_0.pci_io.pci_base_hi = 0;
+	si.pci_0.pci_io.pci_base_lo = CPCI690_PCI0_IO_START_PCI_ADDR;
+	si.pci_0.pci_io.size = CPCI690_PCI0_IO_SIZE;
+	si.pci_0.pci_io.swap = MV64x60_CPU2PCI_SWAP_NONE;
+	si.pci_0.pci_mem[0].cpu_base = CPCI690_PCI0_MEM_START_PROC_ADDR;
+	si.pci_0.pci_mem[0].pci_base_hi = CPCI690_PCI0_MEM_START_PCI_HI_ADDR;
+	si.pci_0.pci_mem[0].pci_base_lo = CPCI690_PCI0_MEM_START_PCI_LO_ADDR;
+	si.pci_0.pci_mem[0].size = CPCI690_PCI0_MEM_SIZE;
+	si.pci_0.pci_mem[0].swap = MV64x60_CPU2PCI_SWAP_NONE;
+	si.pci_0.pci_cmd_bits = 0;
+	si.pci_0.latency_timer = 0x80;
+
+	si.pci_1.enable_bus = 1;
+	si.pci_1.pci_io.cpu_base = CPCI690_PCI1_IO_START_PROC_ADDR;
+	si.pci_1.pci_io.pci_base_hi = 0;
+	si.pci_1.pci_io.pci_base_lo = CPCI690_PCI1_IO_START_PCI_ADDR;
+	si.pci_1.pci_io.size = CPCI690_PCI1_IO_SIZE;
+	si.pci_1.pci_io.swap = MV64x60_CPU2PCI_SWAP_NONE;
+	si.pci_1.pci_mem[0].cpu_base = CPCI690_PCI1_MEM_START_PROC_ADDR;
+	si.pci_1.pci_mem[0].pci_base_hi = CPCI690_PCI1_MEM_START_PCI_HI_ADDR;
+	si.pci_1.pci_mem[0].pci_base_lo = CPCI690_PCI1_MEM_START_PCI_LO_ADDR;
+	si.pci_1.pci_mem[0].size = CPCI690_PCI1_MEM_SIZE;
+	si.pci_1.pci_mem[0].swap = MV64x60_CPU2PCI_SWAP_NONE;
+	si.pci_1.pci_cmd_bits = 0;
+	si.pci_1.latency_timer = 0x80;
+
+	for (i=0; i<MV64x60_CPU2MEM_WINDOWS; i++) {
+		si.cpu_prot_options[i] = 0;
+		si.cpu_snoop_options[i] = GT64260_CPU_SNOOP_WB;
+		si.pci_0.acc_cntl_options[i] =
+			GT64260_PCI_ACC_CNTL_DREADEN |
+			GT64260_PCI_ACC_CNTL_RDPREFETCH |
+			GT64260_PCI_ACC_CNTL_RDLINEPREFETCH |
+			GT64260_PCI_ACC_CNTL_RDMULPREFETCH |
+			GT64260_PCI_ACC_CNTL_SWAP_NONE |
+			GT64260_PCI_ACC_CNTL_MBURST_32_BTYES;
+		si.pci_0.snoop_options[i] = GT64260_PCI_SNOOP_WB;
+		si.pci_1.acc_cntl_options[i] =
+			GT64260_PCI_ACC_CNTL_DREADEN |
+			GT64260_PCI_ACC_CNTL_RDPREFETCH |
+			GT64260_PCI_ACC_CNTL_RDLINEPREFETCH |
+			GT64260_PCI_ACC_CNTL_RDMULPREFETCH |
+			GT64260_PCI_ACC_CNTL_SWAP_NONE |
+			GT64260_PCI_ACC_CNTL_MBURST_32_BTYES;
+		si.pci_1.snoop_options[i] = GT64260_PCI_SNOOP_WB;
+	}
+
+        /* Lookup PCI host bridges */
+        if (mv64x60_init(&bh, &si))
+                printk(KERN_ERR "Bridge initialization failed.\n");
+
+	pci_dram_offset = 0; /* System mem at same addr on PCI & cpu bus */
+	ppc_md.pci_swizzle = common_swizzle;
+	ppc_md.pci_map_irq = cpci690_map_irq;
+	ppc_md.pci_exclude_device = mv64x60_pci_exclude_device;
+
+	mv64x60_set_bus(&bh, 0, 0);
+	bh.hose_a->first_busno = 0;
+	bh.hose_a->last_busno = 0xff;
+	bh.hose_a->last_busno = pciauto_bus_scan(bh.hose_a, 0);
+
+	bh.hose_b->first_busno = bh.hose_a->last_busno + 1;
+	mv64x60_set_bus(&bh, 1, bh.hose_b->first_busno);
+	bh.hose_b->last_busno = 0xff;
+	bh.hose_b->last_busno = pciauto_bus_scan(bh.hose_b,
+		bh.hose_b->first_busno);
+
+	return;
+}
+
+static void __init
+cpci690_setup_peripherals(void)
+{
+	/* Set up windows to CPLD, RTC/TODC, IPMI. */
+	mv64x60_set_32bit_window(&bh, MV64x60_CPU2DEV_0_WIN, CPCI690_BR_BASE,
+		CPCI690_BR_SIZE, 0);
+	bh.ci->enable_window_32bit(&bh, MV64x60_CPU2DEV_0_WIN);
+	cpci690_br_base = (u32)ioremap(CPCI690_BR_BASE, CPCI690_BR_SIZE);
+
+	mv64x60_set_32bit_window(&bh, MV64x60_CPU2DEV_1_WIN, CPCI690_TODC_BASE,
+		CPCI690_TODC_SIZE, 0);
+	bh.ci->enable_window_32bit(&bh, MV64x60_CPU2DEV_1_WIN);
+	TODC_INIT(TODC_TYPE_MK48T35, 0, 0,
+			ioremap(CPCI690_TODC_BASE, CPCI690_TODC_SIZE), 8);
+
+	mv64x60_set_32bit_window(&bh, MV64x60_CPU2DEV_2_WIN, CPCI690_IPMI_BASE,
+		CPCI690_IPMI_SIZE, 0);
+	bh.ci->enable_window_32bit(&bh, MV64x60_CPU2DEV_2_WIN);
+
+	mv64x60_set_bits(&bh, MV64x60_PCI0_ARBITER_CNTL, (1<<31));
+	mv64x60_set_bits(&bh, MV64x60_PCI1_ARBITER_CNTL, (1<<31));
+
+        mv64x60_set_bits(&bh, MV64x60_CPU_MASTER_CNTL, (1<<9)); /* Only 1 cpu */
+
+	/*
+	 * Turn off timer/counters.  Not turning off watchdog timer because
+	 * can't read its reg on the 64260A so don't know if we'll be enabling
+	 * or disabling.
+	 */
+	mv64x60_clr_bits(&bh, MV64x60_TIMR_CNTR_0_3_CNTL,
+			((1<<0) | (1<<8) | (1<<16) | (1<<24)));
+	mv64x60_clr_bits(&bh, GT64260_TIMR_CNTR_4_7_CNTL,
+			((1<<0) | (1<<8) | (1<<16) | (1<<24)));
+
+	/*
+	 * Set MPSC Multiplex RMII
+	 * NOTE: ethernet driver modifies bit 0 and 1
+	 */
+	mv64x60_write(&bh, GT64260_MPP_SERIAL_PORTS_MULTIPLEX, 0x00001102);
+
+#define GPP_EXTERNAL_INTERRUPTS \
+		((1<<24) | (1<<25) | (1<<26) | (1<<27) | \
+		 (1<<28) | (1<<29) | (1<<30) | (1<<31))
+	/* PCI interrupts are inputs */
+	mv64x60_clr_bits(&bh, MV64x60_GPP_IO_CNTL, GPP_EXTERNAL_INTERRUPTS);
+	/* PCI interrupts are active low */
+	mv64x60_set_bits(&bh, MV64x60_GPP_LEVEL_CNTL, GPP_EXTERNAL_INTERRUPTS);
+
+	/* Clear any pending interrupts for these inputs and enable them. */
+	mv64x60_write(&bh, MV64x60_GPP_INTR_CAUSE, ~GPP_EXTERNAL_INTERRUPTS);
+	mv64x60_set_bits(&bh, MV64x60_GPP_INTR_MASK, GPP_EXTERNAL_INTERRUPTS);
+
+	/* Route MPP interrupt inputs to GPP */
+	mv64x60_write(&bh, MV64x60_MPP_CNTL_2, 0x00000000);
+	mv64x60_write(&bh, MV64x60_MPP_CNTL_3, 0x00000000);
+
+	return;
+}
+
+static int __init
+cpci690_fixup_pd(void)
+{
+#if defined(CONFIG_SERIAL_MPSC)
+	struct list_head	*entry;
+	struct platform_device	*pd;
+	struct device		*dev;
+	struct mpsc_pd_dd	*dd;
+
+	list_for_each(entry, &platform_bus_type.devices.list) {
+		dev = container_of(entry, struct device, bus_list);
+		pd = container_of(dev, struct platform_device, dev);
+
+		if (!strncmp(pd->name, MPSC_CTLR_NAME, BUS_ID_SIZE)) {
+			dd = (struct mpsc_pd_dd *) dev_get_drvdata(&pd->dev);
+
+			dd->max_idle = 40;
+			dd->default_baud = 9600;
+			dd->brg_clk_src = 8;
+			dd->brg_clk_freq = 133000000;
+		}
+	}
+#endif
+
+	return 0;
+}
+
+subsys_initcall(cpci690_fixup_pd);
+
+static void __init
+cpci690_setup_arch(void)
+{
+	if (ppc_md.progress)
+		ppc_md.progress("cpci690_setup_arch: enter", 0);
+#ifdef CONFIG_BLK_DEV_INITRD
+	if (initrd_start)
+		ROOT_DEV = Root_RAM0;
+	else
+#endif
+#ifdef   CONFIG_ROOT_NFS
+		ROOT_DEV = Root_NFS;
+#else
+		ROOT_DEV = Root_SDA2;
+#endif
+
+	if (ppc_md.progress)
+		ppc_md.progress("cpci690_setup_arch: Enabling L2 cache", 0);
+
+	/* Enable L2 and L3 caches (if 745x) */
+	_set_L2CR(_get_L2CR() | L2CR_L2E);
+	_set_L3CR(_get_L3CR() | L3CR_L3E);
+
+	if (ppc_md.progress)
+		ppc_md.progress("cpci690_setup_arch: Initializing bridge", 0);
+
+	cpci690_setup_bridge();		/* set up PCI bridge(s) */
+	cpci690_setup_peripherals();	/* set up chip selects/GPP/MPP etc */
+
+	if (ppc_md.progress)
+		ppc_md.progress("cpci690_setup_arch: bridge init complete", 0);
+
+	printk(KERN_INFO "%s %s port (C) 2003 MontaVista Software, Inc. "
+		"(source@mvista.com)\n", BOARD_VENDOR, BOARD_MACHINE);
+
+	if (ppc_md.progress)
+		ppc_md.progress("cpci690_setup_arch: exit", 0);
+
+	return;
+}
+
+static void
+cpci690_reset_board(void)
+{
+	u32	i = 10000;
+
+	local_irq_disable();
+	out_8((u8 *)(cpci690_br_base + CPCI690_BR_SW_RESET), 0x11);
+
+	while (i != 0) i++;
+	panic("restart failed\n");
+}
+
+static void
+cpci690_restart(char *cmd)
+{
+	cpci690_reset_board();
+}
+
+static void
+cpci690_halt(void)
+{
+	while (1);
+	/* NOTREACHED */
+}
+
+static void
+cpci690_power_off(void)
+{
+	cpci690_halt();
+	/* NOTREACHED */
+}
+
+static int
+cpci690_show_cpuinfo(struct seq_file *m)
+{
+	seq_printf(m, "vendor\t\t: " BOARD_VENDOR "\n");
+	seq_printf(m, "machine\t\t: " BOARD_MACHINE "\n");
+	seq_printf(m, "cpu MHz\t\t: %d\n", cpci690_get_cpu_speed()/1000/1000);
+	seq_printf(m, "bus MHz\t\t: %d\n", cpci690_get_bus_speed()/1000/1000);
+
+	return 0;
+}
+
+static void __init
+cpci690_calibrate_decr(void)
+{
+	ulong freq;
+
+	freq = cpci690_get_bus_speed()/4;
+
+	printk(KERN_INFO "time_init: decrementer frequency = %lu.%.6lu MHz\n",
+	       freq/1000000, freq%1000000);
+
+	tb_ticks_per_jiffy = freq / HZ;
+	tb_to_us = mulhwu_scale_factor(freq, 1000000);
+
+	return;
+}
+
+static __inline__ void
+cpci690_set_bat(u32 addr, u32 size)
+{
+	addr &= 0xfffe0000;
+	size &= 0x1ffe0000;
+	size = ((size >> 17) - 1) << 2;
+
+	mb();
+	mtspr(DBAT1U, addr | size | 0x2); /* Vs == 1; Vp == 0 */
+	mtspr(DBAT1L, addr | 0x2a); /* WIMG bits == 0101; PP == r/w access */
+	mb();
+
+	return;
+}
+
+#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)
+static void __init
+cpci690_map_io(void)
+{
+	io_block_mapping(CONFIG_MV64X60_NEW_BASE, CONFIG_MV64X60_NEW_BASE,
+		128 * KB, _PAGE_IO);
+}
+#endif
+
+void __init
+platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
+	      unsigned long r6, unsigned long r7)
+{
+#ifdef CONFIG_BLK_DEV_INITRD
+	initrd_start=initrd_end=0;
+	initrd_below_start_ok=0;
+#endif /* CONFIG_BLK_DEV_INITRD */
+
+	parse_bootinfo(find_bootinfo());
+
+	loops_per_jiffy = cpci690_get_cpu_speed() / HZ;
+
+	isa_mem_base = 0;
+
+	ppc_md.setup_arch = cpci690_setup_arch;
+	ppc_md.show_cpuinfo = cpci690_show_cpuinfo;
+	ppc_md.init_IRQ = gt64260_init_irq;
+	ppc_md.get_irq = gt64260_get_irq;
+	ppc_md.restart = cpci690_restart;
+	ppc_md.power_off = cpci690_power_off;
+	ppc_md.halt = cpci690_halt;
+	ppc_md.find_end_of_memory = cpci690_find_end_of_memory;
+	ppc_md.time_init = todc_time_init;
+	ppc_md.set_rtc_time = todc_set_rtc_time;
+	ppc_md.get_rtc_time = todc_get_rtc_time;
+	ppc_md.nvram_read_val = todc_direct_read_val;
+	ppc_md.nvram_write_val = todc_direct_write_val;
+	ppc_md.calibrate_decr = cpci690_calibrate_decr;
+
+	/*
+	 * Need to map in board regs (used by cpci690_find_end_of_memory())
+	 * and the bridge's regs (used by progress);
+	 */
+	cpci690_set_bat(CPCI690_BR_BASE, 32 * MB);
+	cpci690_br_base = CPCI690_BR_BASE;
+
+#ifdef	CONFIG_SERIAL_TEXT_DEBUG
+	ppc_md.setup_io_mappings = cpci690_map_io;
+	ppc_md.progress = mv64x60_mpsc_progress;
+	mv64x60_progress_init(CONFIG_MV64X60_NEW_BASE);
+#endif	/* CONFIG_SERIAL_TEXT_DEBUG */
+#ifdef	CONFIG_KGDB
+	ppc_md.setup_io_mappings = cpci690_map_io;
+	ppc_md.early_serial_map = cpci690_early_serial_map;
+#endif	/* CONFIG_KGDB */
+
+	return;
+}
diff -Nru a/arch/ppc/platforms/cpci690.h b/arch/ppc/platforms/cpci690.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/ppc/platforms/cpci690.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,73 @@
+/*
+ * arch/ppc/platforms/cpci690.h
+ *
+ * Definitions for Force CPCI690
+ *
+ * Author: Mark A. Greer <mgreer@mvista.com>
+ *
+ * 2003 (c) MontaVista, Software, Inc.  This file is licensed under
+ * the terms of the GNU General Public License version 2.  This program
+ * is licensed "as is" without any warranty of any kind, whether express
+ * or implied.
+ */
+
+/*
+ * The GT64260 has 2 PCI buses each with 1 window from the CPU bus to
+ * PCI I/O space and 4 windows from the CPU bus to PCI MEM space.
+ */
+
+#ifndef __PPC_PLATFORMS_CPCI690_H
+#define __PPC_PLATFORMS_CPCI690_H
+
+/*
+ * Define bd_t to pass in the MAC addresses used by the GT64260's enet ctlrs.
+ */
+#define	CPCI690_BI_MAGIC		0xFE8765DC
+
+typedef struct board_info {
+	u32	bi_magic;
+	u8	bi_enetaddr[3][6];
+} bd_t;
+
+/* PCI bus Resource setup */
+#define CPCI690_PCI0_MEM_START_PROC_ADDR	0x80000000
+#define CPCI690_PCI0_MEM_START_PCI_HI_ADDR	0x00000000
+#define CPCI690_PCI0_MEM_START_PCI_LO_ADDR	0x80000000
+#define CPCI690_PCI0_MEM_SIZE			0x10000000
+#define CPCI690_PCI0_IO_START_PROC_ADDR		0xa0000000
+#define CPCI690_PCI0_IO_START_PCI_ADDR		0x00000000
+#define CPCI690_PCI0_IO_SIZE			0x01000000
+
+#define CPCI690_PCI1_MEM_START_PROC_ADDR	0x90000000
+#define CPCI690_PCI1_MEM_START_PCI_HI_ADDR	0x00000000
+#define CPCI690_PCI1_MEM_START_PCI_LO_ADDR	0x90000000
+#define CPCI690_PCI1_MEM_SIZE			0x10000000
+#define CPCI690_PCI1_IO_START_PROC_ADDR		0xa1000000
+#define CPCI690_PCI1_IO_START_PCI_ADDR		0x01000000
+#define CPCI690_PCI1_IO_SIZE			0x01000000
+
+/* Board Registers */
+#define	CPCI690_BR_BASE				0xf0000000
+#define	CPCI690_BR_SIZE_ACTUAL			0x8
+#define	CPCI690_BR_SIZE			max(GT64260_WINDOW_SIZE_MIN,	\
+						CPCI690_BR_SIZE_ACTUAL)
+#define	CPCI690_BR_LED_CNTL			0x00
+#define	CPCI690_BR_SW_RESET			0x01
+#define	CPCI690_BR_MISC_STATUS			0x02
+#define	CPCI690_BR_SWITCH_STATUS		0x03
+#define	CPCI690_BR_MEM_CTLR			0x04
+#define	CPCI690_BR_LAST_RESET_1			0x05
+#define	CPCI690_BR_LAST_RESET_2			0x06
+
+#define	CPCI690_TODC_BASE			0xf0100000
+#define	CPCI690_TODC_SIZE_ACTUAL		0x8000 /* Size or NVRAM + RTC */
+#define	CPCI690_TODC_SIZE		max(GT64260_WINDOW_SIZE_MIN,	\
+						CPCI690_TODC_SIZE_ACTUAL)
+#define	CPCI690_MAC_OFFSET			0x7c10 /* MAC in RTC NVRAM */
+
+#define	CPCI690_IPMI_BASE			0xf0200000
+#define	CPCI690_IPMI_SIZE_ACTUAL		0x10 /* 16 bytes of IPMI */
+#define	CPCI690_IPMI_SIZE		max(GT64260_WINDOW_SIZE_MIN,	\
+						CPCI690_IPMI_SIZE_ACTUAL)
+
+#endif /* __PPC_PLATFORMS_CPCI690_H */
diff -Nru a/arch/ppc/platforms/ev64260.c b/arch/ppc/platforms/ev64260.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/ppc/platforms/ev64260.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,631 @@
+/*
+ * arch/ppc/platforms/ev64260.c
+ *
+ * Board setup routines for the Marvell/Galileo EV-64260-BP Evaluation Board.
+ *
+ * Author: Mark A. Greer <mgreer@mvista.com>
+ *
+ * 2001-2003 (c) MontaVista, Software, Inc.  This file is licensed under
+ * the terms of the GNU General Public License version 2.  This program
+ * is licensed "as is" without any warranty of any kind, whether express
+ * or implied.
+ */
+
+/*
+ * The EV-64260-BP port is the result of hard work from many people from
+ * many companies.  In particular, employees of Marvell/Galileo, Mission
+ * Critical Linux, Xyterra, and MontaVista Software were heavily involved.
+ *
+ * Note: I have not been able to get *all* PCI slots to work reliably
+ *	at 66 MHz.  I recommend setting jumpers J15 & J16 to short pins 1&2
+ *	so that 33 MHz is used. --MAG
+ * Note: The 750CXe and 7450 are not stable with a 125MHz or 133MHz TCLK/SYSCLK.
+ * 	At 100MHz, they are solid.
+ */
+#include <linux/config.h>
+
+#include <linux/delay.h>
+#include <linux/pci.h>
+#include <linux/ide.h>
+#include <linux/irq.h>
+#include <linux/fs.h>
+#include <linux/seq_file.h>
+#include <linux/console.h>
+#include <linux/initrd.h>
+#include <linux/root_dev.h>
+#if !defined(CONFIG_SERIAL_MPSC_CONSOLE)
+#include <linux/serial.h>
+#include <linux/tty.h>
+#include <linux/serial_core.h>
+#else
+#include <linux/mv643xx.h>
+#endif
+#include <asm/bootinfo.h>
+#include <asm/machdep.h>
+#include <asm/mv64x60.h>
+#include <asm/todc.h>
+#include <asm/time.h>
+
+#include <platforms/ev64260.h>
+
+#define BOARD_VENDOR	"Marvell/Galileo"
+#define BOARD_MACHINE	"EV-64260-BP"
+
+static struct mv64x60_handle	bh;
+
+#if !defined(CONFIG_SERIAL_MPSC_CONSOLE)
+extern void gen550_progress(char *, unsigned short);
+extern void gen550_init(int, struct uart_port *);
+#endif
+
+static const unsigned int cpu_7xx[16] = { /* 7xx & 74xx (but not 745x) */
+	18, 15, 14, 2, 4, 13, 5, 9, 6, 11, 8, 10, 16, 12, 7, 0
+};
+static const unsigned int cpu_745x[2][16] = { /* PLL_EXT 0 & 1 */
+	{ 1, 15, 14,  2,  4, 13,  5,  9,  6, 11,  8, 10, 16, 12,  7,  0 },
+	{ 0, 30,  0,  2,  0, 26,  0, 18,  0, 22, 20, 24, 28, 32,  0,  0 }
+};
+
+
+TODC_ALLOC();
+
+static int
+ev64260_get_bus_speed(void)
+{
+	return 100000000;
+}
+
+static int
+ev64260_get_cpu_speed(void)
+{
+	unsigned long	pvr, hid1, pll_ext;
+
+	pvr = PVR_VER(mfspr(PVR));
+
+	if (pvr != PVR_VER(PVR_7450)) {
+		hid1 = mfspr(HID1) >> 28;
+		return ev64260_get_bus_speed() * cpu_7xx[hid1]/2;
+	}
+	else {
+		hid1 = (mfspr(HID1) & 0x0001e000) >> 13;
+		pll_ext = 0; /* No way to read; must get from schematic */
+		return ev64260_get_bus_speed() * cpu_745x[pll_ext][hid1]/2;
+	}
+}
+
+unsigned long __init
+ev64260_find_end_of_memory(void)
+{
+	return mv64x60_get_mem_size(CONFIG_MV64X60_NEW_BASE,
+		MV64x60_TYPE_GT64260A);
+}
+
+/*
+ * Marvell/Galileo EV-64260-BP Evaluation Board PCI interrupt routing.
+ * Note: By playing with J8 and JP1-4, you can get 2 IRQ's from the first
+ *	PCI bus (in which cast, INTPIN B would be EV64260_PCI_1_IRQ).
+ *	This is the most IRQs you can get from one bus with this board, though.
+ */
+static int __init
+ev64260_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin)
+{
+	struct pci_controller	*hose = pci_bus_to_hose(dev->bus->number);
+
+	if (hose->index == 0) {
+		static char pci_irq_table[][4] =
+		/*
+		 *	PCI IDSEL/INTPIN->INTLINE
+		 * 	   A   B   C   D
+		 */
+		{
+			{EV64260_PCI_0_IRQ,0,0,0}, /* IDSEL 7 - PCI bus 0 */
+			{EV64260_PCI_0_IRQ,0,0,0}, /* IDSEL 8 - PCI bus 0 */
+		};
+
+		const long min_idsel = 7, max_idsel = 8, irqs_per_slot = 4;
+		return PCI_IRQ_TABLE_LOOKUP;
+	}
+	else {
+		static char pci_irq_table[][4] =
+		/*
+		 *	PCI IDSEL/INTPIN->INTLINE
+		 * 	   A   B   C   D
+		 */
+		{
+			{ EV64260_PCI_1_IRQ,0,0,0}, /* IDSEL 7 - PCI bus 1 */
+			{ EV64260_PCI_1_IRQ,0,0,0}, /* IDSEL 8 - PCI bus 1 */
+		};
+
+		const long min_idsel = 7, max_idsel = 8, irqs_per_slot = 4;
+		return PCI_IRQ_TABLE_LOOKUP;
+	}
+}
+
+static void __init
+ev64260_setup_peripherals(void)
+{
+	mv64x60_set_32bit_window(&bh, MV64x60_CPU2BOOT_WIN,
+		EV64260_EMB_FLASH_BASE, EV64260_EMB_FLASH_SIZE, 0);
+	bh.ci->enable_window_32bit(&bh, MV64x60_CPU2BOOT_WIN);
+	mv64x60_set_32bit_window(&bh, MV64x60_CPU2DEV_0_WIN,
+		EV64260_EXT_SRAM_BASE, EV64260_EXT_SRAM_SIZE, 0);
+	bh.ci->enable_window_32bit(&bh, MV64x60_CPU2DEV_0_WIN);
+	mv64x60_set_32bit_window(&bh, MV64x60_CPU2DEV_1_WIN,
+		EV64260_TODC_BASE, EV64260_TODC_SIZE, 0);
+	bh.ci->enable_window_32bit(&bh, MV64x60_CPU2DEV_1_WIN);
+	mv64x60_set_32bit_window(&bh, MV64x60_CPU2DEV_2_WIN,
+		EV64260_UART_BASE, EV64260_UART_SIZE, 0);
+	bh.ci->enable_window_32bit(&bh, MV64x60_CPU2DEV_2_WIN);
+	mv64x60_set_32bit_window(&bh, MV64x60_CPU2DEV_3_WIN,
+		EV64260_EXT_FLASH_BASE, EV64260_EXT_FLASH_SIZE, 0);
+	bh.ci->enable_window_32bit(&bh, MV64x60_CPU2DEV_3_WIN);
+
+	TODC_INIT(TODC_TYPE_DS1501, 0, 0,
+			ioremap(EV64260_TODC_BASE, EV64260_TODC_SIZE), 8);
+
+	mv64x60_clr_bits(&bh, MV64x60_CPU_CONFIG,((1<<12) | (1<<28) | (1<<29)));
+	mv64x60_set_bits(&bh, MV64x60_CPU_CONFIG, (1<<27));
+
+	if (ev64260_get_bus_speed() > 100000000)
+		mv64x60_set_bits(&bh, MV64x60_CPU_CONFIG, (1<<23));
+
+	mv64x60_set_bits(&bh, MV64x60_PCI0_PCI_DECODE_CNTL, ((1<<0) | (1<<3)));
+	mv64x60_set_bits(&bh, MV64x60_PCI1_PCI_DECODE_CNTL, ((1<<0) | (1<<3)));
+
+        /*
+         * Enabling of PCI internal-vs-external arbitration
+         * is a platform- and errata-dependent decision.
+         */
+        if (bh.type == MV64x60_TYPE_GT64260A )  {
+                mv64x60_set_bits(&bh, MV64x60_PCI0_ARBITER_CNTL, (1<<31));
+                mv64x60_set_bits(&bh, MV64x60_PCI1_ARBITER_CNTL, (1<<31));
+        }
+
+        mv64x60_set_bits(&bh, MV64x60_CPU_MASTER_CNTL, (1<<9)); /* Only 1 cpu */
+
+	/*
+	 * Turn off timer/counters.  Not turning off watchdog timer because
+	 * can't read its reg on the 64260A so don't know if we'll be enabling
+	 * or disabling.
+	 */
+	mv64x60_clr_bits(&bh, MV64x60_TIMR_CNTR_0_3_CNTL,
+			((1<<0) | (1<<8) | (1<<16) | (1<<24)));
+	mv64x60_clr_bits(&bh, GT64260_TIMR_CNTR_4_7_CNTL,
+			((1<<0) | (1<<8) | (1<<16) | (1<<24)));
+
+	/*
+	 * Set MPSC Multiplex RMII
+	 * NOTE: ethernet driver modifies bit 0 and 1
+	 */
+	mv64x60_write(&bh, GT64260_MPP_SERIAL_PORTS_MULTIPLEX, 0x00001102);
+
+	/*
+	 * The EV-64260-BP uses several Multi-Purpose Pins (MPP) on the 64260
+	 * bridge as interrupt inputs (via the General Purpose Ports (GPP)
+	 * register).  Need to route the MPP inputs to the GPP and set the
+	 * polarity correctly.
+	 *
+	 * In MPP Control 2 Register
+	 *   MPP 21 -> GPP 21 (DUART channel A intr) bits 20-23 -> 0
+	 *   MPP 22 -> GPP 22 (DUART channel B intr) bits 24-27 -> 0
+	 */
+	mv64x60_clr_bits(&bh, MV64x60_MPP_CNTL_2, (0xf<<20) | (0xf<<24) );
+
+	/*
+	 * In MPP Control 3 Register
+	 *   MPP 26 -> GPP 26 (RTC INT)		bits  8-11 -> 0
+	 *   MPP 27 -> GPP 27 (PCI 0 INTA)	bits 12-15 -> 0
+	 *   MPP 29 -> GPP 29 (PCI 1 INTA)	bits 20-23 -> 0
+	 */
+	mv64x60_clr_bits(&bh, MV64x60_MPP_CNTL_3, (0xf<<8)|(0xf<<12)|(0xf<<20));
+
+#define GPP_EXTERNAL_INTERRUPTS \
+		((1<<21) | (1<<22) | (1<<26) | (1<<27) | (1<<29))
+	/* DUART & PCI interrupts are inputs */
+	mv64x60_clr_bits(&bh, MV64x60_GPP_IO_CNTL, GPP_EXTERNAL_INTERRUPTS);
+	/* DUART & PCI interrupts are active low */
+	mv64x60_set_bits(&bh, MV64x60_GPP_LEVEL_CNTL, GPP_EXTERNAL_INTERRUPTS);
+
+	/* Clear any pending interrupts for these inputs and enable them. */
+	mv64x60_write(&bh, MV64x60_GPP_INTR_CAUSE, ~GPP_EXTERNAL_INTERRUPTS);
+	mv64x60_set_bits(&bh, MV64x60_GPP_INTR_MASK, GPP_EXTERNAL_INTERRUPTS);
+
+	return;
+}
+
+static void __init
+ev64260_setup_bridge(void)
+{
+	struct mv64x60_setup_info	si;
+	int				i;
+
+	memset(&si, 0, sizeof(si));
+
+	si.phys_reg_base = CONFIG_MV64X60_NEW_BASE;
+
+	si.pci_0.enable_bus = 1;
+	si.pci_0.pci_io.cpu_base = EV64260_PCI0_IO_CPU_BASE;
+	si.pci_0.pci_io.pci_base_hi = 0;
+	si.pci_0.pci_io.pci_base_lo = EV64260_PCI0_IO_PCI_BASE;
+	si.pci_0.pci_io.size = EV64260_PCI0_IO_SIZE;
+	si.pci_0.pci_io.swap = MV64x60_CPU2PCI_SWAP_NONE;
+	si.pci_0.pci_mem[0].cpu_base = EV64260_PCI0_MEM_CPU_BASE;
+	si.pci_0.pci_mem[0].pci_base_hi = 0;
+	si.pci_0.pci_mem[0].pci_base_lo = EV64260_PCI0_MEM_PCI_BASE;
+	si.pci_0.pci_mem[0].size = EV64260_PCI0_MEM_SIZE;
+	si.pci_0.pci_mem[0].swap = MV64x60_CPU2PCI_SWAP_NONE;
+	si.pci_0.pci_cmd_bits = 0;
+	si.pci_0.latency_timer = 0x8;
+
+	si.pci_1.enable_bus = 1;
+	si.pci_1.pci_io.cpu_base = EV64260_PCI1_IO_CPU_BASE;
+	si.pci_1.pci_io.pci_base_hi = 0;
+	si.pci_1.pci_io.pci_base_lo = EV64260_PCI1_IO_PCI_BASE;
+	si.pci_1.pci_io.size = EV64260_PCI1_IO_SIZE;
+	si.pci_1.pci_io.swap = MV64x60_CPU2PCI_SWAP_NONE;
+	si.pci_1.pci_mem[0].cpu_base = EV64260_PCI1_MEM_CPU_BASE;
+	si.pci_1.pci_mem[0].pci_base_hi = 0;
+	si.pci_1.pci_mem[0].pci_base_lo = EV64260_PCI1_MEM_PCI_BASE;
+	si.pci_1.pci_mem[0].size = EV64260_PCI1_MEM_SIZE;
+	si.pci_1.pci_mem[0].swap = MV64x60_CPU2PCI_SWAP_NONE;
+	si.pci_1.pci_cmd_bits = 0;
+	si.pci_1.latency_timer = 0x8;
+
+	for (i=0; i<MV64x60_CPU2MEM_WINDOWS; i++) {
+		si.cpu_prot_options[i] = 0;
+		si.cpu_snoop_options[i] = GT64260_CPU_SNOOP_WB;
+		si.pci_0.acc_cntl_options[i] =
+			GT64260_PCI_ACC_CNTL_DREADEN |
+			GT64260_PCI_ACC_CNTL_RDPREFETCH |
+			GT64260_PCI_ACC_CNTL_RDLINEPREFETCH |
+			GT64260_PCI_ACC_CNTL_RDMULPREFETCH |
+			GT64260_PCI_ACC_CNTL_SWAP_NONE |
+			GT64260_PCI_ACC_CNTL_MBURST_32_BTYES;
+		si.pci_0.snoop_options[i] = GT64260_PCI_SNOOP_WB;
+		si.pci_1.acc_cntl_options[i] =
+			GT64260_PCI_ACC_CNTL_DREADEN |
+			GT64260_PCI_ACC_CNTL_RDPREFETCH |
+			GT64260_PCI_ACC_CNTL_RDLINEPREFETCH |
+			GT64260_PCI_ACC_CNTL_RDMULPREFETCH |
+			GT64260_PCI_ACC_CNTL_SWAP_NONE |
+			GT64260_PCI_ACC_CNTL_MBURST_32_BTYES;
+		si.pci_1.snoop_options[i] = GT64260_PCI_SNOOP_WB;
+	}
+
+        /* Lookup PCI host bridges */
+        if (mv64x60_init(&bh, &si))
+                printk("Bridge initialization failed.\n");
+
+	pci_dram_offset = 0; /* System mem at same addr on PCI & cpu bus */
+	ppc_md.pci_swizzle = common_swizzle;
+	ppc_md.pci_map_irq = ev64260_map_irq;
+	ppc_md.pci_exclude_device = mv64x60_pci_exclude_device;
+
+	mv64x60_set_bus(&bh, 0, 0);
+	bh.hose_a->first_busno = 0;
+	bh.hose_a->last_busno = 0xff;
+	bh.hose_a->last_busno = pciauto_bus_scan(bh.hose_a, 0);
+
+	bh.hose_b->first_busno = bh.hose_a->last_busno + 1;
+	mv64x60_set_bus(&bh, 1, bh.hose_b->first_busno);
+	bh.hose_b->last_busno = 0xff;
+	bh.hose_b->last_busno = pciauto_bus_scan(bh.hose_b,
+		bh.hose_b->first_busno);
+
+	return;
+}
+
+#if defined(CONFIG_SERIAL_8250) && !defined(CONFIG_SERIAL_MPSC_CONSOLE)
+static void __init
+ev64260_early_serial_map(void)
+{
+	struct uart_port	port;
+	static char		first_time = 1;
+
+	if (first_time) {
+		memset(&port, 0, sizeof(port));
+
+		port.membase = ioremap(EV64260_SERIAL_0, EV64260_UART_SIZE);
+		port.irq = EV64260_UART_0_IRQ;
+		port.uartclk = BASE_BAUD * 16;
+		port.regshift = 2;
+		port.iotype = SERIAL_IO_MEM;
+		port.flags = STD_COM_FLAGS;
+
+#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)
+		gen550_init(0, &port);
+#endif
+
+		if (early_serial_setup(&port) != 0)
+			printk("Early serial init of port 0 failed\n");
+
+		first_time = 0;
+	}
+
+	return;
+}
+#elif defined(CONFIG_SERIAL_MPSC_CONSOLE)
+static void __init
+ev64260_early_serial_map(void)
+{
+}
+#endif
+
+static int __init
+ev64260_fixup_pd(void)
+{
+#if defined(CONFIG_SERIAL_MPSC)
+	struct list_head	*entry;
+	struct platform_device	*pd;
+	struct device		*dev;
+	struct mpsc_pd_dd	*dd;
+
+	list_for_each(entry, &platform_bus_type.devices.list) {
+		dev = container_of(entry, struct device, bus_list);
+		pd = container_of(dev, struct platform_device, dev);
+
+		if (!strncmp(pd->name, MPSC_CTLR_NAME, BUS_ID_SIZE)) {
+			dd = (struct mpsc_pd_dd *) dev_get_drvdata(&pd->dev);
+
+			dd->max_idle = 40;
+			dd->default_baud = EV64260_DEFAULT_BAUD;
+			dd->brg_clk_src = EV64260_MPSC_CLK_SRC;
+			dd->brg_clk_freq = EV64260_MPSC_CLK_FREQ;
+		}
+	}
+#endif
+
+	return 0;
+}
+
+subsys_initcall(ev64260_fixup_pd);
+
+static void __init
+ev64260_setup_arch(void)
+{
+	if (ppc_md.progress)
+		ppc_md.progress("ev64260_setup_arch: enter", 0);
+
+#ifdef CONFIG_BLK_DEV_INITRD
+	if (initrd_start)
+		ROOT_DEV = Root_RAM0;
+	else
+#endif
+#ifdef	CONFIG_ROOT_NFS
+		ROOT_DEV = Root_NFS;
+#else
+		ROOT_DEV = Root_SDA2;
+#endif
+
+	if (ppc_md.progress)
+		ppc_md.progress("ev64260_setup_arch: Enabling L2 cache", 0);
+
+	/* Enable L2 and L3 caches (if 745x) */
+	_set_L2CR(_get_L2CR() | L2CR_L2E);
+	_set_L3CR(_get_L3CR() | L3CR_L3E);
+
+	if (ppc_md.progress)
+		ppc_md.progress("ev64260_setup_arch: Initializing bridge", 0);
+
+	ev64260_setup_bridge();		/* set up PCI bridge(s) */
+	ev64260_setup_peripherals();	/* set up chip selects/GPP/MPP etc */
+
+	if (ppc_md.progress)
+		ppc_md.progress("ev64260_setup_arch: bridge init complete", 0);
+
+#if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_MPSC_CONSOLE)
+	ev64260_early_serial_map();
+#endif
+
+	printk(BOARD_VENDOR " " BOARD_MACHINE "\n");
+	printk("EV-64260-BP port (C) 2001 MontaVista Software, Inc. (source@mvista.com)\n");
+
+	if (ppc_md.progress)
+		ppc_md.progress("ev64260_setup_arch: exit", 0);
+
+	return;
+}
+
+static void
+ev64260_reset_board(void *addr)
+{
+	local_irq_disable();
+
+	/* disable and invalidate the L2 cache */
+	_set_L2CR(0);
+	_set_L2CR(0x200000);
+
+	/* flush and disable L1 I/D cache */
+	__asm__ __volatile__
+	("mfspr   3,1008\n\t"
+	 "ori	5,5,0xcc00\n\t"
+	 "ori	4,3,0xc00\n\t"
+	 "andc	5,3,5\n\t"
+	 "sync\n\t"
+	 "mtspr	1008,4\n\t"
+	 "isync\n\t"
+	 "sync\n\t"
+	 "mtspr	1008,5\n\t"
+	 "isync\n\t"
+	 "sync\n\t");
+
+	/* unmap any other random cs's that might overlap with bootcs */
+	mv64x60_set_32bit_window(&bh, MV64x60_CPU2DEV_0_WIN, 0, 0, 0);
+	bh.ci->disable_window_32bit(&bh, MV64x60_CPU2DEV_0_WIN);
+	mv64x60_set_32bit_window(&bh, MV64x60_CPU2DEV_1_WIN, 0, 0, 0);
+	bh.ci->disable_window_32bit(&bh, MV64x60_CPU2DEV_1_WIN);
+	mv64x60_set_32bit_window(&bh, MV64x60_CPU2DEV_2_WIN, 0, 0, 0);
+	bh.ci->disable_window_32bit(&bh, MV64x60_CPU2DEV_2_WIN);
+	mv64x60_set_32bit_window(&bh, MV64x60_CPU2DEV_3_WIN, 0, 0, 0);
+	bh.ci->disable_window_32bit(&bh, MV64x60_CPU2DEV_3_WIN);
+
+	/* map bootrom back in to gt @ reset defaults */
+	mv64x60_set_32bit_window(&bh, MV64x60_CPU2BOOT_WIN,
+						0xff800000, 8*1024*1024, 0);
+	bh.ci->disable_window_32bit(&bh, MV64x60_CPU2BOOT_WIN);
+
+	/* move reg base back to default, setup default pci0 */
+	mv64x60_write(&bh, MV64x60_INTERNAL_SPACE_DECODE,
+		(1<<24) | CONFIG_MV64X60_BASE >> 20);
+
+	/* NOTE: FROM NOW ON no more GT_REGS accesses.. 0x1 is not mapped
+	 * via BAT or MMU, and MSR IR/DR is ON */
+	/* SRR0 has system reset vector, SRR1 has default MSR value */
+	/* rfi restores MSR from SRR1 and sets the PC to the SRR0 value */
+	/* NOTE: assumes reset vector is at 0xfff00100 */
+	__asm__ __volatile__
+	("mtspr   26, %0\n\t"
+	 "li      4,(1<<6)\n\t"
+	 "mtspr   27,4\n\t"
+	 "rfi\n\t"
+	 :: "r" (addr):"r4");
+
+	return;
+}
+
+static void
+ev64260_restart(char *cmd)
+{
+	volatile ulong	i = 10000000;
+
+	ev64260_reset_board((void *)0xfff00100);
+
+	while (i-- > 0);
+	panic("restart failed\n");
+}
+
+static void
+ev64260_halt(void)
+{
+	local_irq_disable();
+	while (1);
+	/* NOTREACHED */
+}
+
+static void
+ev64260_power_off(void)
+{
+	ev64260_halt();
+	/* NOTREACHED */
+}
+
+static int
+ev64260_show_cpuinfo(struct seq_file *m)
+{
+	uint pvid;
+
+	pvid = mfspr(PVR);
+	seq_printf(m, "vendor\t\t: " BOARD_VENDOR "\n");
+	seq_printf(m, "machine\t\t: " BOARD_MACHINE "\n");
+	seq_printf(m, "cpu MHz\t\t: %d\n", ev64260_get_cpu_speed()/1000/1000);
+	seq_printf(m, "bus MHz\t\t: %d\n", ev64260_get_bus_speed()/1000/1000);
+
+	return 0;
+}
+
+/* DS1501 RTC has too much variation to use RTC for calibration */
+static void __init
+ev64260_calibrate_decr(void)
+{
+	ulong freq;
+
+	freq = ev64260_get_bus_speed()/4;
+
+	printk("time_init: decrementer frequency = %lu.%.6lu MHz\n",
+	       freq/1000000, freq%1000000);
+
+	tb_ticks_per_jiffy = freq / HZ;
+	tb_to_us = mulhwu_scale_factor(freq, 1000000);
+
+	return;
+}
+
+/*
+ * Set BAT 3 to map 0xfb000000 to 0xfc000000 of physical memory space.
+ */
+static __inline__ void
+ev64260_set_bat(void)
+{
+	mb();
+	mtspr(DBAT1U, 0xfb0001fe);
+	mtspr(DBAT1L, 0xfb00002a);
+	mb();
+
+	return;
+}
+
+#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)
+static void __init
+ev64260_map_io(void)
+{
+	io_block_mapping(0xfb000000, 0xfb000000, 0x01000000, _PAGE_IO);
+}
+#endif
+
+void __init
+platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
+	      unsigned long r6, unsigned long r7)
+{
+#ifdef CONFIG_BLK_DEV_INITRD
+	extern int	initrd_below_start_ok;
+
+	initrd_start=initrd_end=0;
+	initrd_below_start_ok=0;
+#endif /* CONFIG_BLK_DEV_INITRD */
+
+	parse_bootinfo(find_bootinfo());
+
+	isa_mem_base = 0;
+	isa_io_base = EV64260_PCI0_IO_CPU_BASE;
+	pci_dram_offset = EV64260_PCI0_MEM_CPU_BASE;
+
+	loops_per_jiffy = ev64260_get_cpu_speed() / HZ;
+
+	ppc_md.setup_arch = ev64260_setup_arch;
+	ppc_md.show_cpuinfo = ev64260_show_cpuinfo;
+	ppc_md.init_IRQ = gt64260_init_irq;
+	ppc_md.get_irq = gt64260_get_irq;
+
+	ppc_md.restart = ev64260_restart;
+	ppc_md.power_off = ev64260_power_off;
+	ppc_md.halt = ev64260_halt;
+
+	ppc_md.find_end_of_memory = ev64260_find_end_of_memory;
+
+	ppc_md.init = NULL;
+
+	ppc_md.time_init = todc_time_init;
+	ppc_md.set_rtc_time = todc_set_rtc_time;
+	ppc_md.get_rtc_time = todc_get_rtc_time;
+	ppc_md.nvram_read_val = todc_direct_read_val;
+	ppc_md.nvram_write_val = todc_direct_write_val;
+	ppc_md.calibrate_decr = ev64260_calibrate_decr;
+
+	bh.p_base = CONFIG_MV64X60_NEW_BASE;
+
+	ev64260_set_bat();
+
+#ifdef	CONFIG_SERIAL_8250
+#if defined(CONFIG_SERIAL_TEXT_DEBUG)
+	ppc_md.setup_io_mappings = ev64260_map_io;
+	ppc_md.progress = gen550_progress;
+#endif
+#if defined(CONFIG_KGDB)
+	ppc_md.setup_io_mappings = ev64260_map_io;
+	ppc_md.early_serial_map = ev64260_early_serial_map;
+#endif
+#elif defined(CONFIG_SERIAL_MPSC_CONSOLE)
+#ifdef	CONFIG_SERIAL_TEXT_DEBUG
+	ppc_md.setup_io_mappings = ev64260_map_io;
+	ppc_md.progress = mv64x60_mpsc_progress;
+	mv64x60_progress_init(CONFIG_MV64X60_NEW_BASE);
+#endif	/* CONFIG_SERIAL_TEXT_DEBUG */
+#ifdef	CONFIG_KGDB
+	ppc_md.setup_io_mappings = ev64260_map_io;
+	ppc_md.early_serial_map = ev64260_early_serial_map;
+#endif	/* CONFIG_KGDB */
+
+#endif
+
+	return;
+}
diff -Nru a/arch/ppc/platforms/ev64260.h b/arch/ppc/platforms/ev64260.h
--- a/arch/ppc/platforms/ev64260.h	2005-01-10 20:11:15 -08:00
+++ b/arch/ppc/platforms/ev64260.h	2005-01-10 20:11:15 -08:00
@@ -5,38 +5,103 @@
  *
  * Author: Mark A. Greer <mgreer@mvista.com>
  *
- * 2001 (c) MontaVista, Software, Inc.  This file is licensed under
+ * 2001-2002 (c) MontaVista, Software, Inc.  This file is licensed under
  * the terms of the GNU General Public License version 2.  This program
  * is licensed "as is" without any warranty of any kind, whether express
  * or implied.
  */
 
 /*
- * The GT64260 has 2 PCI buses each with 1 window from the CPU bus to
+ * The MV64x60 has 2 PCI buses each with 1 window from the CPU bus to
  * PCI I/O space and 4 windows from the CPU bus to PCI MEM space.
  * We'll only use one PCI MEM window on each PCI bus.
+ *
+ * This is the CPU physical memory map (windows must be at least 1MB and start
+ * on a boundary that is a multiple of the window size):
+ *
+ * 	0xfc000000-0xffffffff		- External FLASH on device module
+ * 	0xfbf00000-0xfbffffff		- Embedded (on board) FLASH
+ * 	0xfbe00000-0xfbefffff		- GT64260 Registers (preferably)
+ * 					  but really a config option
+ * 	0xfbd00000-0xfbdfffff		- External SRAM on device module
+ * 	0xfbc00000-0xfbcfffff		- TODC chip on device module
+ * 	0xfbb00000-0xfbbfffff		- External UART on device module
+ * 	0xa2000000-0xfbafffff		- <hole>
+ * 	0xa1000000-0xa1ffffff		- PCI 1 I/O (defined in gt64260.h)
+ * 	0xa0000000-0xa0ffffff		- PCI 0 I/O (defined in gt64260.h)
+ * 	0x90000000-0x9fffffff		- PCI 1 MEM (defined in gt64260.h)
+ * 	0x80000000-0x8fffffff		- PCI 0 MEM (defined in gt64260.h)
  */
 
 #ifndef __PPC_PLATFORMS_EV64260_H
 #define __PPC_PLATFORMS_EV64260_H
 
-#define	EV64260_BRIDGE_REG_BASE		0xf8000000
-#define	EV64260_BRIDGE_REG_BASE_TO_TOP	0x08000000U
+/* PCI mappings */
+#define	EV64260_PCI0_IO_CPU_BASE	0xa0000000
+#define	EV64260_PCI0_IO_PCI_BASE	0x00000000
+#define	EV64260_PCI0_IO_SIZE		0x01000000
+
+#define	EV64260_PCI0_MEM_CPU_BASE	0x80000000
+#define	EV64260_PCI0_MEM_PCI_BASE	0x80000000
+#define	EV64260_PCI0_MEM_SIZE		0x10000000
+
+#define	EV64260_PCI1_IO_CPU_BASE	(EV64260_PCI0_IO_CPU_BASE + \
+						EV64260_PCI0_IO_SIZE)
+#define	EV64260_PCI1_IO_PCI_BASE	(EV64260_PCI0_IO_PCI_BASE + \
+						EV64260_PCI0_IO_SIZE)
+#define	EV64260_PCI1_IO_SIZE		0x01000000
+
+#define	EV64260_PCI1_MEM_CPU_BASE	(EV64260_PCI0_MEM_CPU_BASE + \
+						EV64260_PCI0_MEM_SIZE)
+#define	EV64260_PCI1_MEM_PCI_BASE	(EV64260_PCI0_MEM_PCI_BASE + \
+						EV64260_PCI0_MEM_SIZE)
+#define	EV64260_PCI1_MEM_SIZE		0x10000000
+
+/* CPU Physical Memory Map setup (other than PCI) */
+#define	EV64260_EXT_FLASH_BASE		0xfc000000
+#define	EV64260_EMB_FLASH_BASE		0xfbf00000
+#define	EV64260_EXT_SRAM_BASE		0xfbd00000
+#define	EV64260_TODC_BASE		0xfbc00000
+#define	EV64260_UART_BASE		0xfbb00000
+
+#define	EV64260_EXT_FLASH_SIZE_ACTUAL	0x04000000  /* <= 64MB Extern FLASH */
+#define	EV64260_EMB_FLASH_SIZE_ACTUAL	0x00080000  /* 512KB of Embed FLASH */
+#define	EV64260_EXT_SRAM_SIZE_ACTUAL	0x00100000  /* 1MB SDRAM */
+#define	EV64260_TODC_SIZE_ACTUAL	0x00000020  /* 32 bytes for TODC */
+#define	EV64260_UART_SIZE_ACTUAL	0x00000040  /* 64 bytes for DUART */
+
+#define	EV64260_EXT_FLASH_SIZE		max(GT64260_WINDOW_SIZE_MIN,	\
+						EV64260_EXT_FLASH_SIZE_ACTUAL)
+#define	EV64260_EMB_FLASH_SIZE		max(GT64260_WINDOW_SIZE_MIN,	\
+						EV64260_EMB_FLASH_SIZE_ACTUAL)
+#define	EV64260_EXT_SRAM_SIZE		max(GT64260_WINDOW_SIZE_MIN,	\
+						EV64260_EXT_SRAM_SIZE_ACTUAL)
+#define	EV64260_TODC_SIZE		max(GT64260_WINDOW_SIZE_MIN,	\
+						EV64260_TODC_SIZE_ACTUAL)
+/* Assembler in bootwrapper blows up if 'max' is used */
+#define	EV64260_UART_SIZE		GT64260_WINDOW_SIZE_MIN
+#define	EV64260_UART_END		((EV64260_UART_BASE +		\
+					EV64260_UART_SIZE - 1) & 0xfff00000)
+
+/* Board-specific IRQ info */
+#define	EV64260_UART_0_IRQ		85
+#define	EV64260_UART_1_IRQ		86
+#define	EV64260_PCI_0_IRQ		91
+#define	EV64260_PCI_1_IRQ		93
 
-#define	EV64260_TODC_BASE		0xfc800000
-#define	EV64260_TODC_LEN		0x00800000
-#define	EV64260_TODC_END		(EV64260_TODC_BASE + \
-					 EV64260_TODC_LEN - 1)
-
-#define	EV64260_UART_BASE		0xfd000000
-#define	EV64260_UART_LEN		0x00800000
-#define	EV64260_UART_END		(EV64260_UART_BASE + \
-					 EV64260_UART_LEN - 1)
-/* Serial driver setup.  */
+/* Serial port setup */
+#define	EV64260_DEFAULT_BAUD		115200
+
+#if defined(CONFIG_SERIAL_MPSC_CONSOLE)
+#define SERIAL_PORT_DFNS
+
+#define	EV64260_MPSC_CLK_SRC		8		/* TCLK */
+#define	EV64260_MPSC_CLK_FREQ		100000000	/* 100MHz clk */
+#else
 #define EV64260_SERIAL_0		(EV64260_UART_BASE + 0x20)
 #define EV64260_SERIAL_1		EV64260_UART_BASE
 
-#define BASE_BAUD ( 3686400 / 16 )
+#define BASE_BAUD	(EV64260_DEFAULT_BAUD * 2)
 
 #ifdef CONFIG_SERIAL_MANY_PORTS
 #define RS_TABLE_SIZE	64
@@ -50,18 +115,14 @@
 #define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST)
 #endif
 
-#if	!defined(CONFIG_GT64260_CONSOLE)
 /* Required for bootloader's ns16550.c code */
 #define STD_SERIAL_PORT_DFNS 						\
-        { 0, BASE_BAUD, EV64260_SERIAL_0, 85, STD_COM_FLAGS, /* ttyS0 */\
-	iomem_base: (u8 *)EV64260_SERIAL_0,				\
+        { 0, BASE_BAUD, EV64260_SERIAL_0, EV64260_UART_0_IRQ, STD_COM_FLAGS, \
+	iomem_base: (u8 *)EV64260_SERIAL_0,	/* ttyS0 */		\
 	iomem_reg_shift: 2,						\
 	io_type: SERIAL_IO_MEM },
 
 #define SERIAL_PORT_DFNS \
         STD_SERIAL_PORT_DFNS
-#else
-#define SERIAL_PORT_DFNS
 #endif
-
 #endif /* __PPC_PLATFORMS_EV64260_H */
diff -Nru a/arch/ppc/platforms/ev64260_setup.c b/arch/ppc/platforms/ev64260_setup.c
--- a/arch/ppc/platforms/ev64260_setup.c	2005-01-10 20:11:17 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,476 +0,0 @@
-/*
- * arch/ppc/platforms/ev64260_setup.c
- *
- * Board setup routines for the Marvell/Galileo EV-64260-BP Evaluation Board.
- *
- * Author: Mark A. Greer <mgreer@mvista.com>
- *
- * 2001 (c) MontaVista, Software, Inc.  This file is licensed under
- * the terms of the GNU General Public License version 2.  This program
- * is licensed "as is" without any warranty of any kind, whether express
- * or implied.
- */
-
-/*
- * The EV-64260-BP port is the result of hard work from many people from
- * many companies.  In particular, employees of Marvell/Galileo, Mission
- * Critical Linux, Xyterra, and MontaVista Software were heavily involved.
- */
-#include <linux/config.h>
-#include <linux/stddef.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/errno.h>
-#include <linux/reboot.h>
-#include <linux/pci.h>
-#include <linux/kdev_t.h>
-#include <linux/major.h>
-#include <linux/initrd.h>
-#include <linux/console.h>
-#include <linux/delay.h>
-#include <linux/irq.h>
-#include <linux/ide.h>
-#include <linux/seq_file.h>
-#include <linux/root_dev.h>
-#if	!defined(CONFIG_GT64260_CONSOLE)
-#include <linux/serial.h>
-#endif
-
-#include <asm/system.h>
-#include <asm/pgtable.h>
-#include <asm/page.h>
-#include <asm/time.h>
-#include <asm/dma.h>
-#include <asm/io.h>
-#include <asm/machdep.h>
-#include <asm/prom.h>
-#include <asm/smp.h>
-#include <asm/todc.h>
-#include <asm/bootinfo.h>
-#include <asm/gt64260.h>
-#include <platforms/ev64260.h>
-
-
-extern char cmd_line[];
-unsigned long ev64260_find_end_of_memory(void);
-
-TODC_ALLOC();
-
-/*
- * Marvell/Galileo EV-64260-BP Evaluation Board PCI interrupt routing.
- */
-static int __init
-ev64260_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin)
-{
-	struct pci_controller	*hose = pci_bus_to_hose(dev->bus->number);
-
-	if (hose->index == 0) {
-		static char pci_irq_table[][4] =
-		/*
-		 *	PCI IDSEL/INTPIN->INTLINE
-		 * 	   A   B   C   D
-		 */
-		{
-			{ 91, 0, 0, 0 },	/* IDSEL 7 - PCI bus 0 */
-			{ 91, 0, 0, 0 },	/* IDSEL 8 - PCI bus 0 */
-		};
-
-		const long min_idsel = 7, max_idsel = 8, irqs_per_slot = 4;
-		return PCI_IRQ_TABLE_LOOKUP;
-	}
-	else {
-		static char pci_irq_table[][4] =
-		/*
-		 *	PCI IDSEL/INTPIN->INTLINE
-		 * 	   A   B   C   D
-		 */
-		{
-			{ 93, 0, 0, 0 },	/* IDSEL 7 - PCI bus 1 */
-			{ 93, 0, 0, 0 },	/* IDSEL 8 - PCI bus 1 */
-		};
-
-		const long min_idsel = 7, max_idsel = 8, irqs_per_slot = 4;
-		return PCI_IRQ_TABLE_LOOKUP;
-	}
-}
-
-static void __init
-ev64260_setup_bridge(void)
-{
-	gt64260_bridge_info_t		info;
-	int				window;
-
-	GT64260_BRIDGE_INFO_DEFAULT(&info, ev64260_find_end_of_memory());
-
-	/* Lookup PCI host bridges */
-	if (gt64260_find_bridges(EV64260_BRIDGE_REG_BASE,
-				 &info,
-				 ev64260_map_irq)) {
-		printk("Bridge initialization failed.\n");
-	}
-
-	/*
-	 * Enabling of PCI internal-vs-external arbitration
-	 * is a platform- and errata-dependent decision.
-	 */
-	if(gt64260_revision == GT64260)  {
-		/* FEr#35 */
-		gt_clr_bits(GT64260_PCI_0_ARBITER_CNTL, (1<<31));
-		gt_clr_bits(GT64260_PCI_1_ARBITER_CNTL, (1<<31));
-	} else if( gt64260_revision == GT64260A )  {
-		gt_set_bits(GT64260_PCI_0_ARBITER_CNTL, (1<<31));
-		gt_set_bits(GT64260_PCI_1_ARBITER_CNTL, (1<<31));
-		/* Make external GPP interrupts level sensitive */
-		gt_set_bits(GT64260_COMM_ARBITER_CNTL, (1<<10));
-		/* Doc Change 9: > 100 MHz so must be set */
-		gt_set_bits(GT64260_CPU_CONFIG, (1<<23));
-	}
-
-	gt_set_bits(GT64260_CPU_MASTER_CNTL, (1<<9)); /* Only 1 cpu */
-
-	/* SCS windows not disabled above, disable all but SCS 0 */
-	for (window=1; window<GT64260_CPU_SCS_DECODE_WINDOWS; window++) {
-		gt64260_cpu_scs_set_window(window, 0, 0);
-	}
-
-	/* Set up windows to RTC/TODC and DUART on device module (CS 1 & 2) */
-	gt64260_cpu_cs_set_window(1, EV64260_TODC_BASE, EV64260_TODC_LEN);
-	gt64260_cpu_cs_set_window(2, EV64260_UART_BASE, EV64260_UART_LEN);
-
-	/*
-	 * The EV-64260-BP uses several Multi-Purpose Pins (MPP) on the 64260
-	 * bridge as interrupt inputs (via the General Purpose Ports (GPP)
-	 * register).  Need to route the MPP inputs to the GPP and set the
-	 * polarity correctly.
-	 *
-	 * In MPP Control 2 Register
-	 *   MPP 21 -> GPP 21 (DUART channel A intr)
-	 *   MPP 22 -> GPP 22 (DUART channel B intr)
-	 *
-	 * In MPP Control 3 Register
-	 *   MPP 27 -> GPP 27 (PCI 0 INTA)
-	 *   MPP 29 -> GPP 29 (PCI 1 INTA)
-	 */
-	gt_clr_bits(GT64260_MPP_CNTL_2,
-			       ((1<<20) | (1<<21) | (1<<22) | (1<<23) |
-			        (1<<24) | (1<<25) | (1<<26) | (1<<27)));
-
-	gt_clr_bits(GT64260_MPP_CNTL_3,
-			       ((1<<12) | (1<<13) | (1<<14) | (1<<15) |
-			        (1<<20) | (1<<21) | (1<<22) | (1<<23)));
-
-	gt_write(GT64260_GPP_LEVEL_CNTL, 0x000002c6);
-
-	/* DUART & PCI interrupts are active low */
-	gt_set_bits(GT64260_GPP_LEVEL_CNTL,
-			     ((1<<21) | (1<<22) | (1<<27) | (1<<29)));
-
-	/* Clear any pending interrupts for these inputs and enable them. */
-	gt_write(GT64260_GPP_INTR_CAUSE,
-			  ~((1<<21) | (1<<22) | (1<<27) | (1<<29)));
-	gt_set_bits(GT64260_GPP_INTR_MASK,
-			     ((1<<21) | (1<<22)| (1<<27) | (1<<29)));
-	gt_set_bits(GT64260_IC_CPU_INTR_MASK_HI, ((1<<26) | (1<<27)));
-
-	/* Set MPSC Multiplex RMII */
-	/* NOTE: ethernet driver modifies bit 0 and 1 */
-	gt_write(GT64260_MPP_SERIAL_PORTS_MULTIPLEX, 0x00001102);
-
-	return;
-}
-
-
-static void __init
-ev64260_setup_arch(void)
-{
-#if	!defined(CONFIG_GT64260_CONSOLE)
-	struct serial_struct	serial_req;
-#endif
-
-	if ( ppc_md.progress )
-		ppc_md.progress("ev64260_setup_arch: enter", 0);
-
-	loops_per_jiffy = 50000000 / HZ;
-
-#ifdef CONFIG_BLK_DEV_INITRD
-	if (initrd_start)
-		ROOT_DEV = Root_RAM0;
-	else
-#endif
-#ifdef	CONFIG_ROOT_NFS
-		ROOT_DEV = Root_NFS;
-#else
-		ROOT_DEV = Root_SDA2;
-#endif
-
-	if ( ppc_md.progress )
-		ppc_md.progress("ev64260_setup_arch: find_bridges", 0);
-
-	/*
-	 * Set up the L2CR register.
-	 * L2 cache was invalidated by bootloader.
-	 */
-	switch (PVR_VER(mfspr(PVR))) {
-		case PVR_VER(PVR_750):
-			_set_L2CR(0xfd100000);
-			break;
-		case PVR_VER(PVR_7400):
-		case PVR_VER(PVR_7410):
-			_set_L2CR(0xcd100000);
-			break;
-		/* case PVR_VER(PVR_7450): */
-			/* XXXX WHAT VALUE?? FIXME */
-			break;
-	}
-
-	ev64260_setup_bridge();
-
-	TODC_INIT(TODC_TYPE_DS1501, 0, 0, ioremap(EV64260_TODC_BASE,0x20), 8);
-
-#if	!defined(CONFIG_GT64260_CONSOLE)
-	memset(&serial_req, 0, sizeof(serial_req));
-	serial_req.line = 0;
-	serial_req.baud_base = BASE_BAUD;
-	serial_req.port = 0;
-	serial_req.irq = 85;
-	serial_req.flags = STD_COM_FLAGS;
-	serial_req.io_type = SERIAL_IO_MEM;
-	serial_req.iomem_base = ioremap(EV64260_SERIAL_0, 0x20);
-	serial_req.iomem_reg_shift = 2;
-
-	if (early_serial_setup(&serial_req) != 0) {
-		printk("Early serial init of port 0 failed\n");
-	}
-
-	/* Assume early_serial_setup() doesn't modify serial_req */
-	serial_req.line = 1;
-	serial_req.port = 1;
-	serial_req.irq = 86;
-	serial_req.iomem_base = ioremap(EV64260_SERIAL_1, 0x20);
-
-	if (early_serial_setup(&serial_req) != 0) {
-		printk("Early serial init of port 1 failed\n");
-	}
-#endif
-
-	printk("Marvell/Galileo EV-64260-BP Evaluation Board\n");
-	printk("EV-64260-BP port (C) 2001 MontaVista Software, Inc. (source@mvista.com)\n");
-
-	if ( ppc_md.progress )
-		ppc_md.progress("ev64260_setup_arch: exit", 0);
-
-	return;
-}
-
-static void __init
-ev64260_init_irq(void)
-{
-	gt64260_init_irq();
-
-	if(gt64260_revision != GT64260)  {
-		/* XXXX Kludge--need to fix gt64260_init_irq() interface */
-		/* Mark PCI intrs level sensitive */
-		irq_desc[91].status |= IRQ_LEVEL;
-		irq_desc[93].status |= IRQ_LEVEL;
-	}
-}
-
-unsigned long __init
-ev64260_find_end_of_memory(void)
-{
-	return 32*1024*1024;	/* XXXX FIXME */
-}
-
-static void
-ev64260_reset_board(void)
-{
-	local_irq_disable();
-
-	/* Set exception prefix high - to the firmware */
-	_nmask_and_or_msr(0, MSR_IP);
-
-	/* XXX FIXME */
-	printk("XXXX **** trying to reset board ****\n");
-	return;
-}
-
-static void
-ev64260_restart(char *cmd)
-{
-	volatile ulong	i = 10000000;
-
-	ev64260_reset_board();
-
-	while (i-- > 0);
-	panic("restart failed\n");
-}
-
-static void
-ev64260_halt(void)
-{
-	local_irq_disable();
-	while (1);
-	/* NOTREACHED */
-}
-
-static void
-ev64260_power_off(void)
-{
-	ev64260_halt();
-	/* NOTREACHED */
-}
-
-static int
-ev64260_show_cpuinfo(struct seq_file *m)
-{
-	uint pvid;
-
-	pvid = mfspr(PVR);
-	seq_printf(m, "vendor\t\t: Marvell/Galileo\n");
-	seq_printf(m, "machine\t\t: EV-64260-BP\n");
-	seq_printf(m, "PVID\t\t: 0x%x, vendor: %s\n",
-			pvid, (pvid & (1<<15) ? "IBM" : "Motorola"));
-
-	return 0;
-}
-
-/* DS1501 RTC has too much variation to use RTC for calibration */
-static void __init
-ev64260_calibrate_decr(void)
-{
-	ulong freq;
-
-	freq = 100000000 / 4;
-
-	printk("time_init: decrementer frequency = %lu.%.6lu MHz\n",
-	       freq/1000000, freq%1000000);
-
-	tb_ticks_per_jiffy = freq / HZ;
-	tb_to_us = mulhwu_scale_factor(freq, 1000000);
-
-	return;
-}
-
-#if defined(CONFIG_SERIAL_TEXT_DEBUG)
-/*
- * Set BAT 3 to map 0xf0000000 to end of physical memory space.
- */
-static __inline__ void
-ev64260_set_bat(void)
-{
-	unsigned long   bat3u, bat3l;
-	static int	mapping_set = 0;
-
-	if (!mapping_set) {
-
-		__asm__ __volatile__(
-		" lis %0,0xf000\n \
-		  ori %1,%0,0x002a\n \
-		  ori %0,%0,0x1ffe\n \
-		  mtspr 0x21e,%0\n \
-		  mtspr 0x21f,%1\n \
-		  isync\n \
-		  sync "
-		: "=r" (bat3u), "=r" (bat3l));
-
-		mapping_set = 1;
-	}
-
-	return;
-}
-
-#if !defined(CONFIG_GT64260_CONSOLE)
-#include <linux/serialP.h>
-#include <linux/serial_reg.h>
-#include <asm/serial.h>
-
-static struct serial_state rs_table[RS_TABLE_SIZE] = {
-	SERIAL_PORT_DFNS	/* Defined in <asm/serial.h> */
-};
-
-static void
-ev64260_16550_progress(char *s, unsigned short hex)
-{
-	volatile char c;
-	volatile unsigned long com_port;
-	u16 shift;
-
-	com_port = rs_table[0].port;
-	shift = rs_table[0].iomem_reg_shift;
-
-	while ((c = *s++) != 0) {
-		while ((*((volatile unsigned char *)com_port +
-				(UART_LSR << shift)) & UART_LSR_THRE) == 0)
-		                ;
-	        *(volatile unsigned char *)com_port = c;
-
-		if (c == '\n') {
-			while ((*((volatile unsigned char *)com_port +
-				(UART_LSR << shift)) & UART_LSR_THRE) == 0)
-					;
-	        	*(volatile unsigned char *)com_port = '\r';
-		}
-	}
-
-	/* Move to next line on */
-	while ((*((volatile unsigned char *)com_port +
-		(UART_LSR << shift)) & UART_LSR_THRE) == 0)
-			;
-	*(volatile unsigned char *)com_port = '\n';
-	while ((*((volatile unsigned char *)com_port +
-		(UART_LSR << shift)) & UART_LSR_THRE) == 0)
-			;
-	*(volatile unsigned char *)com_port = '\r';
-
-	return;
-}
-#endif	/* !CONFIG_GT64260_CONSOLE */
-#endif	/* CONFIG_SERIAL_TEXT_DEBUG */
-
-void __init
-platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
-	      unsigned long r6, unsigned long r7)
-{
-	parse_bootinfo(find_bootinfo());
-
-	isa_mem_base = 0;
-
-	ppc_md.setup_arch = ev64260_setup_arch;
-	ppc_md.show_cpuinfo = ev64260_show_cpuinfo;
-	ppc_md.irq_canonicalize = NULL;
-	ppc_md.init_IRQ = ev64260_init_irq;
-	ppc_md.get_irq = gt64260_get_irq;
-	ppc_md.init = NULL;
-
-	ppc_md.restart = ev64260_restart;
-	ppc_md.power_off = ev64260_power_off;
-	ppc_md.halt = ev64260_halt;
-
-	ppc_md.find_end_of_memory = ev64260_find_end_of_memory;
-
-	ppc_md.time_init = todc_time_init;
-	ppc_md.set_rtc_time = todc_set_rtc_time;
-	ppc_md.get_rtc_time = todc_get_rtc_time;
-	ppc_md.calibrate_decr = ev64260_calibrate_decr;
-
-	ppc_md.nvram_read_val = todc_direct_read_val;
-	ppc_md.nvram_write_val = todc_direct_write_val;
-
-	ppc_md.heartbeat = NULL;
-	ppc_md.heartbeat_reset = 0;
-	ppc_md.heartbeat_count = 0;
-
-#ifdef	CONFIG_SERIAL_TEXT_DEBUG
-	ev64260_set_bat();
-#ifdef	CONFIG_GT64260_CONSOLE
-	gt64260_base = EV64260_BRIDGE_REG_BASE;
-	ppc_md.progress = gt64260_mpsc_progress; /* embedded UART */
-#else
-	ppc_md.progress = ev64260_16550_progress; /* Dev module DUART */
-#endif
-#else	/* !CONFIG_SERIAL_TEXT_DEBUG */
-	ppc_md.progress = NULL;
-#endif	/* CONFIG_SERIAL_TEXT_DEBUG */
-
-	return;
-}
diff -Nru a/arch/ppc/platforms/katana.c b/arch/ppc/platforms/katana.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/ppc/platforms/katana.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,660 @@
+/*
+ * arch/ppc/platforms/katana.c
+ *
+ * Board setup routines for the Artesyn Katana 750 based boards.
+ *
+ * Tim Montgomery <timm@artesyncp.com>
+ *
+ * Based on code done by Rabeeh Khoury - rabeeh@galileo.co.il
+ * Based on code done by - Mark A. Greer <mgreer@mvista.com>
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+/*
+ * Supports the Artesyn 750i, 752i, and 3750.  The 752i is virtually identical
+ * to the 750i except that it has an mv64460 bridge.
+ */
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/pci.h>
+#include <linux/kdev_t.h>
+#include <linux/console.h>
+#include <linux/initrd.h>
+#include <linux/root_dev.h>
+#include <linux/delay.h>
+#include <linux/seq_file.h>
+#include <linux/smp.h>
+#include <linux/mv643xx.h>
+#ifdef CONFIG_BOOTIMG
+#include <linux/bootimg.h>
+#endif
+#include <asm/page.h>
+#include <asm/time.h>
+#include <asm/smp.h>
+#include <asm/todc.h>
+#include <asm/bootinfo.h>
+#include <asm/mv64x60.h>
+#include <platforms/katana.h>
+
+static struct		mv64x60_handle bh;
+static katana_id_t	katana_id;
+static u32		cpld_base;
+static u32		sram_base;
+
+/* PCI Interrupt routing */
+static int __init
+katana_irq_lookup_750i(unsigned char idsel, unsigned char pin)
+{
+	static char pci_irq_table[][4] = {
+		/*
+		 * PCI IDSEL/INTPIN->INTLINE
+		 *       A   B   C   D
+		 */
+		/* IDSEL 4  (PMC 1) */
+		{ KATANA_PCI_INTB_IRQ_750i, KATANA_PCI_INTC_IRQ_750i,
+			KATANA_PCI_INTD_IRQ_750i, KATANA_PCI_INTA_IRQ_750i },
+		/* IDSEL 5  (PMC 2) */
+		{ KATANA_PCI_INTC_IRQ_750i, KATANA_PCI_INTD_IRQ_750i,
+			KATANA_PCI_INTA_IRQ_750i, KATANA_PCI_INTB_IRQ_750i },
+		/* IDSEL 6 (T8110) */
+		{KATANA_PCI_INTD_IRQ_750i, 0, 0, 0 },
+	};
+	const long min_idsel = 4, max_idsel = 6, irqs_per_slot = 4;
+
+	return PCI_IRQ_TABLE_LOOKUP;
+}
+
+static int __init
+katana_irq_lookup_3750(unsigned char idsel, unsigned char pin)
+{
+	static char pci_irq_table[][4] = {
+		/*
+		 * PCI IDSEL/INTPIN->INTLINE
+		 *       A   B   C   D
+		 */
+		{ KATANA_PCI_INTA_IRQ_3750, 0, 0, 0 }, /* IDSEL 3 (BCM5691) */
+		{ KATANA_PCI_INTB_IRQ_3750, 0, 0, 0 }, /* IDSEL 4 (MV64360 #2)*/
+		{ KATANA_PCI_INTC_IRQ_3750, 0, 0, 0 }, /* IDSEL 5 (MV64360 #3)*/
+	};
+	const long min_idsel = 3, max_idsel = 5, irqs_per_slot = 4;
+
+	return PCI_IRQ_TABLE_LOOKUP;
+}
+
+static int __init
+katana_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin)
+{
+	switch (katana_id) {
+	case KATANA_ID_750I:
+	case KATANA_ID_752I:
+		return katana_irq_lookup_750i(idsel, pin);
+
+	case KATANA_ID_3750:
+		return katana_irq_lookup_3750(idsel, pin);
+
+	default:
+		printk(KERN_ERR "Bogus board ID\n");
+		return 0;
+	}
+}
+
+/* Board info retrieval routines */
+void __init
+katana_get_board_id(void)
+{
+	switch (in_8((volatile char *)(cpld_base + KATANA_CPLD_PRODUCT_ID))) {
+	case KATANA_PRODUCT_ID_3750:
+		katana_id = KATANA_ID_3750;
+		break;
+
+	case KATANA_PRODUCT_ID_750i:
+		katana_id = KATANA_ID_750I;
+		break;
+
+	case KATANA_PRODUCT_ID_752i:
+		katana_id = KATANA_ID_752I;
+		break;
+
+	default:
+		printk(KERN_ERR "Unsupported board\n");
+	}
+}
+
+int __init
+katana_get_proc_num(void)
+{
+	u16		val;
+	u8		save_exclude;
+	static int	proc = -1;
+	static u8	first_time = 1;
+
+	if (first_time) {
+		if (katana_id != KATANA_ID_3750)
+			proc = 0;
+		else {
+			save_exclude = mv64x60_pci_exclude_bridge;
+			mv64x60_pci_exclude_bridge = 0;
+
+			early_read_config_word(bh.hose_a, 0,
+				PCI_DEVFN(0,0), PCI_DEVICE_ID, &val);
+
+			mv64x60_pci_exclude_bridge = save_exclude;
+
+			switch(val) {
+			case PCI_DEVICE_ID_KATANA_3750_PROC0:
+				proc = 0;
+				break;
+
+			case PCI_DEVICE_ID_KATANA_3750_PROC1:
+				proc = 1;
+				break;
+
+			case PCI_DEVICE_ID_KATANA_3750_PROC2:
+				proc = 2;
+				break;
+
+			default:
+				printk(KERN_ERR "Bogus Device ID\n");
+			}
+		}
+
+		first_time = 0;
+	}
+
+	return proc;
+}
+
+static inline int
+katana_is_monarch(void)
+{
+	return in_8((volatile char *)(cpld_base + KATANA_CPLD_BD_CFG_3)) &
+		KATANA_CPLD_BD_CFG_3_MONARCH;
+}
+
+static void __init
+katana_enable_ipmi(void)
+{
+	u8 reset_out;
+
+	/* Enable access to IPMI ctlr by clearing IPMI PORTSEL bit in CPLD */
+	reset_out = in_8((volatile char *)(cpld_base + KATANA_CPLD_RESET_OUT));
+	reset_out &= ~KATANA_CPLD_RESET_OUT_PORTSEL;
+	out_8((volatile void *)(cpld_base + KATANA_CPLD_RESET_OUT), reset_out);
+	return;
+}
+
+static unsigned long
+katana_bus_freq(void)
+{
+	u8 bd_cfg_0;
+
+	bd_cfg_0 = in_8((volatile char *)(cpld_base + KATANA_CPLD_BD_CFG_0));
+
+	switch (bd_cfg_0 & KATANA_CPLD_BD_CFG_0_SYSCLK_MASK) {
+	case KATANA_CPLD_BD_CFG_0_SYSCLK_133:
+		return 133333333;
+		break;
+
+	case KATANA_CPLD_BD_CFG_0_SYSCLK_100:
+		return 100000000;
+		break;
+
+	default:
+		return 133333333;
+		break;
+	}
+}
+
+/* Bridge & platform setup routines */
+void __init
+katana_intr_setup(void)
+{
+	/* MPP 8, 9, and 10 */
+	mv64x60_clr_bits(&bh, MV64x60_MPP_CNTL_1, 0xfff);
+
+	/* MPP 14 */
+	if ((katana_id == KATANA_ID_750I) || (katana_id == KATANA_ID_752I))
+		mv64x60_clr_bits(&bh, MV64x60_MPP_CNTL_1, 0x0f000000);
+
+	/*
+	 * Define GPP 8,9,and 10 interrupt polarity as active low
+	 * input signal and level triggered
+	 */
+	mv64x60_set_bits(&bh, MV64x60_GPP_LEVEL_CNTL, 0x700);
+	mv64x60_clr_bits(&bh, MV64x60_GPP_IO_CNTL, 0x700);
+
+	if ((katana_id == KATANA_ID_750I) || (katana_id == KATANA_ID_752I)) {
+		mv64x60_set_bits(&bh, MV64x60_GPP_LEVEL_CNTL, (1<<14));
+		mv64x60_clr_bits(&bh, MV64x60_GPP_IO_CNTL, (1<<14));
+	}
+
+	/* Config GPP intr ctlr to respond to level trigger */
+	mv64x60_set_bits(&bh, MV64x60_COMM_ARBITER_CNTL, (1<<10));
+
+	/* XXXX Erranum FEr PCI-#8 */
+	mv64x60_clr_bits(&bh, MV64x60_PCI0_CMD, (1<<5) | (1<<9));
+	mv64x60_clr_bits(&bh, MV64x60_PCI1_CMD, (1<<5) | (1<<9));
+
+	/*
+	 * Dismiss and then enable interrupt on GPP interrupt cause
+	 * for CPU #0
+	 */
+	mv64x60_write(&bh, MV64x60_GPP_INTR_CAUSE, ~0x700);
+	mv64x60_set_bits(&bh, MV64x60_GPP_INTR_MASK, 0x700);
+
+	if ((katana_id == KATANA_ID_750I) || (katana_id == KATANA_ID_752I)) {
+		mv64x60_write(&bh, MV64x60_GPP_INTR_CAUSE, ~(1<<14));
+		mv64x60_set_bits(&bh, MV64x60_GPP_INTR_MASK, (1<<14));
+	}
+
+	/*
+	 * Dismiss and then enable interrupt on CPU #0 high cause reg
+	 * BIT25 summarizes GPP interrupts 8-15
+	 */
+	mv64x60_set_bits(&bh, MV64360_IC_CPU0_INTR_MASK_HI, (1<<25));
+	return;
+}
+
+void __init
+katana_setup_peripherals(void)
+{
+	u32 base, size_0, size_1;
+
+	/* Set up windows for boot CS, soldered & socketed flash, and CPLD */
+	mv64x60_set_32bit_window(&bh, MV64x60_CPU2BOOT_WIN,
+		 KATANA_BOOT_WINDOW_BASE, KATANA_BOOT_WINDOW_SIZE, 0);
+	bh.ci->enable_window_32bit(&bh, MV64x60_CPU2BOOT_WIN);
+
+	/* Assume firmware set up window sizes correctly for dev 0 & 1 */
+	mv64x60_get_32bit_window(&bh, MV64x60_CPU2DEV_0_WIN, &base, &size_0);
+
+	if (size_0 > 0) {
+		mv64x60_set_32bit_window(&bh, MV64x60_CPU2DEV_0_WIN,
+			 KATANA_SOLDERED_FLASH_BASE, size_0, 0);
+		bh.ci->enable_window_32bit(&bh, MV64x60_CPU2DEV_0_WIN);
+	}
+
+	mv64x60_get_32bit_window(&bh, MV64x60_CPU2DEV_1_WIN, &base, &size_1);
+
+	if (size_1 > 0) {
+		mv64x60_set_32bit_window(&bh, MV64x60_CPU2DEV_1_WIN,
+			 (KATANA_SOLDERED_FLASH_BASE + size_0), size_1, 0);
+		bh.ci->enable_window_32bit(&bh, MV64x60_CPU2DEV_1_WIN);
+	}
+
+	mv64x60_set_32bit_window(&bh, MV64x60_CPU2DEV_2_WIN,
+		 KATANA_SOCKET_BASE, KATANA_SOCKETED_FLASH_SIZE, 0);
+	bh.ci->enable_window_32bit(&bh, MV64x60_CPU2DEV_2_WIN);
+
+	mv64x60_set_32bit_window(&bh, MV64x60_CPU2DEV_3_WIN,
+		 KATANA_CPLD_BASE, KATANA_CPLD_SIZE, 0);
+	bh.ci->enable_window_32bit(&bh, MV64x60_CPU2DEV_3_WIN);
+	cpld_base = (u32)ioremap(KATANA_CPLD_BASE, KATANA_CPLD_SIZE);
+
+	mv64x60_set_32bit_window(&bh, MV64x60_CPU2SRAM_WIN,
+		 KATANA_INTERNAL_SRAM_BASE, MV64360_SRAM_SIZE, 0);
+	bh.ci->enable_window_32bit(&bh, MV64x60_CPU2SRAM_WIN);
+	sram_base = (u32)ioremap(KATANA_INTERNAL_SRAM_BASE, MV64360_SRAM_SIZE);
+
+	/* Set up Enet->SRAM window */
+	mv64x60_set_32bit_window(&bh, MV64x60_ENET2MEM_4_WIN,
+		KATANA_INTERNAL_SRAM_BASE, MV64360_SRAM_SIZE, 0x2);
+	bh.ci->enable_window_32bit(&bh, MV64x60_ENET2MEM_4_WIN);
+
+	/* Give enet r/w access to memory region */
+	mv64x60_set_bits(&bh, MV64360_ENET2MEM_ACC_PROT_0, (0x3 << (4 << 1)));
+	mv64x60_set_bits(&bh, MV64360_ENET2MEM_ACC_PROT_1, (0x3 << (4 << 1)));
+	mv64x60_set_bits(&bh, MV64360_ENET2MEM_ACC_PROT_2, (0x3 << (4 << 1)));
+
+	mv64x60_clr_bits(&bh, MV64x60_PCI1_PCI_DECODE_CNTL, (1 << 3));
+	mv64x60_clr_bits(&bh, MV64x60_TIMR_CNTR_0_3_CNTL,
+			 ((1 << 0) | (1 << 8) | (1 << 16) | (1 << 24)));
+
+	/* Must wait until window set up before retrieving board id */
+	katana_get_board_id();
+
+	/* Enumerate pci bus (must know board id before getting proc number) */
+	if (katana_get_proc_num() == 0)
+		bh.hose_b->last_busno = pciauto_bus_scan(bh.hose_b, 0);
+
+#if defined(CONFIG_NOT_COHERENT_CACHE)
+	mv64x60_write(&bh, MV64360_SRAM_CONFIG, 0x00160000);
+#else
+	mv64x60_write(&bh, MV64360_SRAM_CONFIG, 0x001600b2);
+#endif
+
+	/*
+	 * Setting the SRAM to 0. Note that this generates parity errors on
+	 * internal data path in SRAM since it's first time accessing it
+	 * while after reset it's not configured.
+	 */
+	memset((void *)sram_base, 0, MV64360_SRAM_SIZE);
+
+	/* Only processor zero [on 3750] is an PCI interrupt controller */
+	if (katana_get_proc_num() == 0)
+		katana_intr_setup();
+
+	return;
+}
+
+static void __init
+katana_setup_bridge(void)
+{
+	struct mv64x60_setup_info si;
+	int i;
+
+	memset(&si, 0, sizeof(si));
+
+	si.phys_reg_base = KATANA_BRIDGE_REG_BASE;
+
+	si.pci_1.enable_bus = 1;
+	si.pci_1.pci_io.cpu_base = KATANA_PCI1_IO_START_PROC_ADDR;
+	si.pci_1.pci_io.pci_base_hi = 0;
+	si.pci_1.pci_io.pci_base_lo = KATANA_PCI1_IO_START_PCI_ADDR;
+	si.pci_1.pci_io.size = KATANA_PCI1_IO_SIZE;
+	si.pci_1.pci_io.swap = MV64x60_CPU2PCI_SWAP_NONE;
+	si.pci_1.pci_mem[0].cpu_base = KATANA_PCI1_MEM_START_PROC_ADDR;
+	si.pci_1.pci_mem[0].pci_base_hi = KATANA_PCI1_MEM_START_PCI_HI_ADDR;
+	si.pci_1.pci_mem[0].pci_base_lo = KATANA_PCI1_MEM_START_PCI_LO_ADDR;
+	si.pci_1.pci_mem[0].size = KATANA_PCI1_MEM_SIZE;
+	si.pci_1.pci_mem[0].swap = MV64x60_CPU2PCI_SWAP_NONE;
+	si.pci_1.pci_cmd_bits = 0;
+	si.pci_1.latency_timer = 0x80;
+
+	for (i = 0; i < MV64x60_CPU2MEM_WINDOWS; i++) {
+#if defined(CONFIG_NOT_COHERENT_CACHE)
+		si.cpu_prot_options[i] = 0;
+		si.enet_options[i] = MV64360_ENET2MEM_SNOOP_NONE;
+		si.mpsc_options[i] = MV64360_MPSC2MEM_SNOOP_NONE;
+		si.idma_options[i] = MV64360_IDMA2MEM_SNOOP_NONE;
+
+		si.pci_1.acc_cntl_options[i] =
+		    MV64360_PCI_ACC_CNTL_SNOOP_NONE |
+		    MV64360_PCI_ACC_CNTL_SWAP_NONE |
+		    MV64360_PCI_ACC_CNTL_MBURST_128_BYTES |
+		    MV64360_PCI_ACC_CNTL_RDSIZE_256_BYTES;
+#else
+		si.cpu_prot_options[i] = 0;
+		si.enet_options[i] = MV64360_ENET2MEM_SNOOP_NONE; /* errata */
+		si.mpsc_options[i] = MV64360_MPSC2MEM_SNOOP_NONE; /* errata */
+		si.idma_options[i] = MV64360_IDMA2MEM_SNOOP_NONE; /* errata */
+
+		si.pci_1.acc_cntl_options[i] =
+		    MV64360_PCI_ACC_CNTL_SNOOP_WB |
+		    MV64360_PCI_ACC_CNTL_SWAP_NONE |
+		    MV64360_PCI_ACC_CNTL_MBURST_32_BYTES |
+		    MV64360_PCI_ACC_CNTL_RDSIZE_32_BYTES;
+#endif
+	}
+
+	/* Lookup PCI host bridges */
+	if (mv64x60_init(&bh, &si))
+		printk("Bridge initialization failed.\n");
+
+	pci_dram_offset = 0; /* sys mem at same addr on PCI & cpu bus */
+	ppc_md.pci_swizzle = common_swizzle;
+	ppc_md.pci_map_irq = katana_map_irq;
+	ppc_md.pci_exclude_device = mv64x60_pci_exclude_device;
+
+	mv64x60_set_bus(&bh, 1, 0);
+	bh.hose_b->first_busno = 0;
+	bh.hose_b->last_busno = 0xff;
+
+	return;
+}
+
+static void __init
+katana_setup_arch(void)
+{
+	if (ppc_md.progress)
+		ppc_md.progress("katana_setup_arch: enter", 0);
+
+	set_tb(0, 0);
+
+#ifdef CONFIG_BLK_DEV_INITRD
+	if (initrd_start)
+		ROOT_DEV = Root_RAM0;
+	else
+#endif
+#ifdef   CONFIG_ROOT_NFS
+		ROOT_DEV = Root_NFS;
+#else
+		ROOT_DEV = Root_SDA2;
+#endif
+
+	/*
+	 * Set up the L2CR register.
+	 *
+	 * 750FX has only L2E, L2PE (bits 2-8 are reserved)
+	 * DD2.0 has bug that requires the L2 to be in WRT mode
+	 * avoid dirty data in cache
+	 */
+	if (PVR_REV(mfspr(PVR)) == 0x0200) {
+		printk("DD2.0 detected. Setting L2 cache"
+			"to Writethrough mode\n");
+		_set_L2CR(L2CR_L2E | L2CR_L2PE | L2CR_L2WT);
+	}
+	else
+		_set_L2CR(L2CR_L2E | L2CR_L2PE);
+
+	if (ppc_md.progress)
+		ppc_md.progress("katana_setup_arch: calling setup_bridge", 0);
+
+	katana_setup_bridge();
+	katana_setup_peripherals();
+	katana_enable_ipmi();
+
+	printk("Artesyn Communication Products, LLC - Katana(TM)\n");
+	if (ppc_md.progress)
+		ppc_md.progress("katana_setup_arch: exit", 0);
+	return;
+}
+
+/* Platform device data fixup routine. */
+static int __init
+katana_fixup_pd(void)
+{
+	struct list_head	*entry;
+	struct platform_device	*pd;
+	struct device		*dev;
+#if defined(CONFIG_SERIAL_MPSC)
+	struct mpsc_pd_dd	*dd;
+#endif
+#if defined(CONFIG_MV643XX_ETH)
+	struct mv64xxx_eth_pd_dd *eth_dd;
+	static u16 phy_addr[] = {
+		KATANA_ETH0_PHY_ADDR,
+		KATANA_ETH1_PHY_ADDR,
+		KATANA_ETH2_PHY_ADDR,
+	};
+	struct resource	*rx_r;
+	struct resource	*tx_r;
+	int		rx_size = KATANA_ETH_RX_QUEUE_SIZE * ETH_DESC_SIZE;
+	int		tx_size = KATANA_ETH_TX_QUEUE_SIZE * ETH_DESC_SIZE;
+#endif
+
+	list_for_each(entry, &platform_bus_type.devices.list) {
+		dev = container_of(entry, struct device, bus_list);
+		pd = container_of(dev, struct platform_device, dev);
+
+#if defined(CONFIG_SERIAL_MPSC)
+		if (!strncmp(pd->name, MPSC_CTLR_NAME, BUS_ID_SIZE)) {
+			dd = (struct mpsc_pd_dd *)dev_get_drvdata(&pd->dev);
+
+			dd->max_idle = 40;	/* XXXX what should be? */
+			dd->default_baud = KATANA_DEFAULT_BAUD;
+			dd->brg_clk_src = KATANA_MPSC_CLK_SRC;
+			dd->brg_clk_freq = KATANA_MPSC_CLK_FREQ;
+		}
+#endif
+#if defined(CONFIG_MV643XX_ETH)
+		if (!strncmp(pd->name, MV64XXX_ETH_NAME, BUS_ID_SIZE)) {
+			eth_dd = (struct mv64xxx_eth_pd_dd *)
+						dev_get_drvdata(&pd->dev);
+			eth_dd->phy_addr = phy_addr[pd->id];
+			eth_dd->port_config = KATANA_ETH_PORT_CONFIG_VALUE;
+			eth_dd->port_config_extend =
+					KATANA_ETH_PORT_CONFIG_EXTEND_VALUE;
+			eth_dd->port_sdma_config =
+					KATANA_ETH_PORT_SDMA_CONFIG_VALUE;
+			eth_dd->port_serial_control =
+					KATANA_ETH_PORT_SERIAL_CONTROL_VALUE;
+			eth_dd->tx_queue_size = KATANA_ETH_TX_QUEUE_SIZE;
+			eth_dd->rx_queue_size = KATANA_ETH_RX_QUEUE_SIZE;
+
+			rx_r = &pd->resource[5];
+			rx_r->start = KATANA_INTERNAL_SRAM_BASE +
+						(rx_size + tx_size) * pd->id;
+			rx_r->end = rx_r->start + rx_size - 1;
+			rx_r->flags = IORESOURCE_MEM;
+
+			tx_r = &pd->resource[6];
+			tx_r->start = rx_r->start + rx_size;
+			tx_r->end = tx_r->start + tx_size - 1;
+			tx_r->flags = IORESOURCE_MEM;
+		}
+#endif
+	}
+
+	return 0;
+}
+
+subsys_initcall(katana_fixup_pd);
+
+static void
+katana_restart(char *cmd)
+{
+	volatile ulong i = 10000000;
+
+	/* issue hard reset to the reset command register */
+	out_8((volatile char *)(cpld_base + KATANA_CPLD_RST_CMD),
+		KATANA_CPLD_RST_CMD_HR);
+
+	while (i-- > 0) ;
+	panic("restart failed\n");
+}
+
+static void
+katana_halt(void)
+{
+	while (1) ;
+	/* NOTREACHED */
+}
+
+static void
+katana_power_off(void)
+{
+	katana_halt();
+	/* NOTREACHED */
+}
+
+static int
+katana_show_cpuinfo(struct seq_file *m)
+{
+	seq_printf(m, "vendor\t\t: Artesyn Communication Products, LLC\n");
+
+	seq_printf(m, "board\t\t: ");
+
+	switch (katana_id) {
+	case KATANA_ID_3750:
+		seq_printf(m, "Katana 3750\n");
+		break;
+
+	case KATANA_ID_750I:
+		seq_printf(m, "Katana 750i\n");
+		break;
+
+	case KATANA_ID_752I:
+		seq_printf(m, "Katana 752i\n");
+		break;
+
+	default:
+		seq_printf(m, "Unknown\n");
+		break;
+	}
+
+	seq_printf(m, "product ID\t: 0x%x\n",
+		   in_8((volatile char *)(cpld_base + KATANA_CPLD_PRODUCT_ID)));
+	seq_printf(m, "hardware rev\t: 0x%x\n",
+		   in_8((volatile char *)(cpld_base+KATANA_CPLD_HARDWARE_VER)));
+	seq_printf(m, "PLD rev\t\t: 0x%x\n",
+		   in_8((volatile char *)(cpld_base + KATANA_CPLD_PLD_VER)));
+	seq_printf(m, "PLB freq\t: %ldMhz\n", katana_bus_freq() / 1000000);
+	seq_printf(m, "PCI\t\t: %sMonarch\n", katana_is_monarch()? "" : "Non-");
+
+	return 0;
+}
+
+static void __init
+katana_calibrate_decr(void)
+{
+	ulong freq;
+
+	freq = katana_bus_freq() / 4;
+
+	printk("time_init: decrementer frequency = %lu.%.6lu MHz\n",
+	       freq / 1000000, freq % 1000000);
+
+	tb_ticks_per_jiffy = freq / HZ;
+	tb_to_us = mulhwu_scale_factor(freq, 1000000);
+
+	return;
+}
+
+unsigned long __init
+katana_find_end_of_memory(void)
+{
+	return mv64x60_get_mem_size(KATANA_BRIDGE_REG_BASE,
+		MV64x60_TYPE_MV64360);
+}
+
+static inline void
+katana_set_bat(void)
+{
+	mb();
+	mtspr(DBAT2U, 0xf0001ffe);
+	mtspr(DBAT2L, 0xf000002a);
+	mb();
+
+	return;
+}
+
+#if defined(CONFIG_SERIAL_TEXT_DEBUG) && defined(CONFIG_SERIAL_MPSC_CONSOLE)
+static void __init
+katana_map_io(void)
+{
+	io_block_mapping(0xf8100000, 0xf8100000, 0x00020000, _PAGE_IO);
+}
+#endif
+
+void __init
+platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
+	      unsigned long r6, unsigned long r7)
+{
+	parse_bootinfo(find_bootinfo());
+
+	isa_mem_base = 0;
+
+	ppc_md.setup_arch = katana_setup_arch;
+	ppc_md.show_cpuinfo = katana_show_cpuinfo;
+	ppc_md.init_IRQ = mv64360_init_irq;
+	ppc_md.get_irq = mv64360_get_irq;
+	ppc_md.restart = katana_restart;
+	ppc_md.power_off = katana_power_off;
+	ppc_md.halt = katana_halt;
+	ppc_md.find_end_of_memory = katana_find_end_of_memory;
+	ppc_md.calibrate_decr = katana_calibrate_decr;
+
+#if defined(CONFIG_SERIAL_TEXT_DEBUG) && defined(CONFIG_SERIAL_MPSC_CONSOLE)
+	ppc_md.setup_io_mappings = katana_map_io;
+	ppc_md.progress = mv64x60_mpsc_progress;
+	mv64x60_progress_init(KATANA_BRIDGE_REG_BASE);
+#endif
+
+	katana_set_bat(); /* Need for katana_find_end_of_memory and progress */
+
+	return;
+}
diff -Nru a/arch/ppc/platforms/katana.h b/arch/ppc/platforms/katana.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/ppc/platforms/katana.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,231 @@
+/*
+ * arch/ppc/platforms/katana.h
+ *
+ * Definitions for Artesyn Katana750i/3750 board.
+ *
+ * Tim Montgomery <timm@artesyncp.com>
+ *
+ * Based on code done by Rabeeh Khoury - rabeeh@galileo.co.il
+ * Based on code done by Mark A. Greer <mgreer@mvista.com>
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+/*
+ * The MV64360 has 2 PCI buses each with 1 window from the CPU bus to
+ * PCI I/O space and 4 windows from the CPU bus to PCI MEM space.
+ * We'll only use one PCI MEM window on each PCI bus.
+ *
+ * This is the CPU physical memory map (windows must be at least 1MB and start
+ * on a boundary that is a multiple of the window size):
+ *
+ *    0xff800000-0xffffffff      - Boot window
+ *    0xf8400000-0xf85fffff      - Internal SRAM
+ *    0xf8200000-0xf823ffff      - CPLD
+ *    0xf8100000-0xf810ffff      - MV64360 Registers
+ *    0xf8000000-0xf80fffff      - PLCC socket
+ *    0xf0000000-0xf01fffff	 - Consistent memory pool
+ *    0xe8000000-0xefffffff      - soldered flash
+ *    0xc0000000-0xc0ffffff      - PCI I/O
+ *    0x80000000-0xbfffffff      - PCI MEM
+ */
+
+#ifndef __PPC_PLATFORMS_KATANA_H
+#define __PPC_PLATFORMS_KATANA_H
+
+/* CPU Physical Memory Map setup. */
+#define KATANA_BOOT_WINDOW_BASE			0xff800000
+#define KATANA_INTERNAL_SRAM_BASE		0xf8400000
+#define KATANA_CPLD_BASE			0xf8200000
+#define KATANA_BRIDGE_REG_BASE			0xf8100000
+#define KATANA_SOCKET_BASE			0xf8000000
+#define KATANA_SOLDERED_FLASH_BASE		0xe8000000
+
+#define KATANA_BOOT_WINDOW_SIZE_ACTUAL		0x00800000 /* 8MB */
+#define KATANA_CPLD_SIZE_ACTUAL			0x00020000 /* 128KB */
+#define KATANA_SOCKETED_FLASH_SIZE_ACTUAL	0x00080000 /* 512KB */
+#define KATANA_SOLDERED_FLASH_SIZE_ACTUAL	0x02000000 /* 32MB */
+
+#define KATANA_BOOT_WINDOW_SIZE		max(MV64360_WINDOW_SIZE_MIN,	\
+		KATANA_BOOT_WINDOW_SIZE_ACTUAL)
+#define KATANA_CPLD_SIZE		max(MV64360_WINDOW_SIZE_MIN,	\
+		KATANA_CPLD_SIZE_ACTUAL)
+#define KATANA_SOCKETED_FLASH_SIZE	max(MV64360_WINDOW_SIZE_MIN,	\
+		KATANA_SOCKETED_FLASH_SIZE_ACTUAL)
+#define KATANA_SOLDERED_FLASH_SIZE	max(MV64360_WINDOW_SIZE_MIN,	\
+		KATANA_SOLDERED_FLASH_SIZE_ACTUAL)
+
+#define KATANA_PCI1_MEM_START_PROC_ADDR         0x80000000
+#define KATANA_PCI1_MEM_START_PCI_HI_ADDR       0x00000000
+#define KATANA_PCI1_MEM_START_PCI_LO_ADDR       0x80000000
+#define KATANA_PCI1_MEM_SIZE                    0x40000000
+#define KATANA_PCI1_IO_START_PROC_ADDR          0xc0000000
+#define KATANA_PCI1_IO_START_PCI_ADDR           0x00000000
+#define KATANA_PCI1_IO_SIZE                     0x01000000
+
+/* Board-specific IRQ info */
+#define  KATANA_PCI_INTA_IRQ_3750		64+8
+#define  KATANA_PCI_INTB_IRQ_3750		64+9
+#define  KATANA_PCI_INTC_IRQ_3750		64+10
+
+#define  KATANA_PCI_INTA_IRQ_750i		64+8
+#define  KATANA_PCI_INTB_IRQ_750i		64+9
+#define  KATANA_PCI_INTC_IRQ_750i		64+10
+#define  KATANA_PCI_INTD_IRQ_750i		64+14
+
+#define KATANA_CPLD_RST_EVENT			0x00000000
+#define KATANA_CPLD_RST_CMD			0x00001000
+#define KATANA_CPLD_PCI_ERR_INT_EN		0x00002000
+#define KATANA_CPLD_PCI_ERR_INT_PEND		0x00003000
+#define KATANA_CPLD_PRODUCT_ID			0x00004000
+#define KATANA_CPLD_EREADY			0x00005000
+
+#define KATANA_CPLD_HARDWARE_VER		0x00007000
+#define KATANA_CPLD_PLD_VER			0x00008000
+#define KATANA_CPLD_BD_CFG_0			0x00009000
+#define KATANA_CPLD_BD_CFG_1			0x0000a000
+#define KATANA_CPLD_BD_CFG_3			0x0000c000
+#define KATANA_CPLD_LED				0x0000d000
+#define KATANA_CPLD_RESET_OUT			0x0000e000
+
+#define KATANA_CPLD_RST_EVENT_INITACT		0x80
+#define KATANA_CPLD_RST_EVENT_SW		0x40
+#define KATANA_CPLD_RST_EVENT_WD		0x20
+#define KATANA_CPLD_RST_EVENT_COPS		0x10
+#define KATANA_CPLD_RST_EVENT_COPH		0x08
+#define KATANA_CPLD_RST_EVENT_CPCI		0x02
+#define KATANA_CPLD_RST_EVENT_FP		0x01
+
+#define KATANA_CPLD_RST_CMD_SCL			0x80
+#define KATANA_CPLD_RST_CMD_SDA			0x40
+#define KATANA_CPLD_RST_CMD_I2C			0x10
+#define KATANA_CPLD_RST_CMD_FR			0x08
+#define KATANA_CPLD_RST_CMD_SR			0x04
+#define KATANA_CPLD_RST_CMD_HR			0x01
+
+#define KATANA_CPLD_BD_CFG_0_SYSCLK_MASK	0xc0
+#define KATANA_CPLD_BD_CFG_0_SYSCLK_133		0xc0
+#define KATANA_CPLD_BD_CFG_0_SYSCLK_100		0x40
+
+#define KATANA_CPLD_BD_CFG_1_FL_BANK_MASK	0x03
+#define KATANA_CPLD_BD_CFG_1_FL_BANK_16MB	0x00
+#define KATANA_CPLD_BD_CFG_1_FL_BANK_32MB	0x01
+#define KATANA_CPLD_BD_CFG_1_FL_BANK_64MB	0x02
+#define KATANA_CPLD_BD_CFG_1_FL_BANK_128MB	0x03
+
+#define KATANA_CPLD_BD_CFG_1_FL_NUM_BANKS_MASK	0x04
+#define KATANA_CPLD_BD_CFG_1_FL_NUM_BANKS_ONE	0x00
+#define KATANA_CPLD_BD_CFG_1_FL_NUM_BANKS_TWO	0x04
+
+#define KATANA_CPLD_BD_CFG_3_MONARCH		0x04
+
+#define KATANA_CPLD_RESET_OUT_PORTSEL		0x80
+#define KATANA_CPLD_RESET_OUT_WD		0x20
+#define KATANA_CPLD_RESET_OUT_COPH		0x08
+#define KATANA_CPLD_RESET_OUT_PCI_RST_PCI	0x02
+#define KATANA_CPLD_RESET_OUT_PCI_RST_FP	0x01
+
+#define KATANA_MBOX_RESET_REQUEST		0xC83A
+#define KATANA_MBOX_RESET_ACK			0xE430
+#define KATANA_MBOX_RESET_DONE			0x32E5
+
+#define HSL_PLD_BASE				0x00010000
+#define HSL_PLD_J4SGA_REG_OFF			0
+#define HSL_PLD_J4GA_REG_OFF			1
+#define HSL_PLD_J2GA_REG_OFF			2
+#define GA_MASK					0x1f
+#define HSL_PLD_SIZE				0x1000
+#define K3750_GPP_GEO_ADDR_PINS			0xf8000000
+#define K3750_GPP_GEO_ADDR_SHIFT		27
+
+#define K3750_GPP_EVENT_PROC_0			(1 << 21)
+#define K3750_GPP_EVENT_PROC_1_2		(1 << 2)
+
+#define PCI_VENDOR_ID_ARTESYN			0x1223
+#define PCI_DEVICE_ID_KATANA_3750_PROC0		0x0041
+#define PCI_DEVICE_ID_KATANA_3750_PROC1		0x0042
+#define PCI_DEVICE_ID_KATANA_3750_PROC2		0x0043
+
+#define COPROC_MEM_FUNCTION			0
+#define COPROC_MEM_BAR				0
+#define COPROC_REGS_FUNCTION			0
+#define COPROC_REGS_BAR				4
+#define COPROC_FLASH_FUNCTION			2
+#define COPROC_FLASH_BAR			4
+
+#define KATANA_IPMB_LOCAL_I2C_ADDR		0x08
+
+#define	KATANA_DEFAULT_BAUD			9600
+#define	KATANA_MPSC_CLK_SRC			8	  /* TCLK */
+#define	KATANA_MPSC_CLK_FREQ			133333333 /* 133.3333... MHz */
+
+#define	KATANA_ETH0_PHY_ADDR			12
+#define	KATANA_ETH1_PHY_ADDR			11
+#define	KATANA_ETH2_PHY_ADDR			4
+
+#define KATANA_PRODUCT_ID_3750			0x01
+#define KATANA_PRODUCT_ID_750i			0x02
+#define KATANA_PRODUCT_ID_752i			0x04
+
+#define KATANA_ETH_TX_QUEUE_SIZE		1050
+#define KATANA_ETH_RX_QUEUE_SIZE		450
+
+#define	KATANA_ETH_PORT_CONFIG_VALUE			\
+	ETH_UNICAST_NORMAL_MODE			|	\
+	ETH_DEFAULT_RX_QUEUE_0			|	\
+	ETH_DEFAULT_RX_ARP_QUEUE_0		|	\
+	ETH_RECEIVE_BC_IF_NOT_IP_OR_ARP		|	\
+	ETH_RECEIVE_BC_IF_IP			|	\
+	ETH_RECEIVE_BC_IF_ARP			|	\
+	ETH_CAPTURE_TCP_FRAMES_DIS		|	\
+	ETH_CAPTURE_UDP_FRAMES_DIS		|	\
+	ETH_DEFAULT_RX_TCP_QUEUE_0		|	\
+	ETH_DEFAULT_RX_UDP_QUEUE_0		|	\
+	ETH_DEFAULT_RX_BPDU_QUEUE_0
+
+#define	KATANA_ETH_PORT_CONFIG_EXTEND_VALUE		\
+	ETH_SPAN_BPDU_PACKETS_AS_NORMAL		|	\
+	ETH_PARTITION_DISABLE
+
+#define	GT_ETH_IPG_INT_RX(value)			\
+	((value & 0x3fff) << 8)
+
+#define	KATANA_ETH_PORT_SDMA_CONFIG_VALUE		\
+	ETH_RX_BURST_SIZE_4_64BIT		|	\
+	GT_ETH_IPG_INT_RX(0)			|	\
+	ETH_TX_BURST_SIZE_4_64BIT
+
+#define	KATANA_ETH_PORT_SERIAL_CONTROL_VALUE		\
+	ETH_FORCE_LINK_PASS			|	\
+	ETH_ENABLE_AUTO_NEG_FOR_DUPLX		|	\
+	ETH_DISABLE_AUTO_NEG_FOR_FLOW_CTRL	|	\
+	ETH_ADV_SYMMETRIC_FLOW_CTRL		|	\
+	ETH_FORCE_FC_MODE_NO_PAUSE_DIS_TX	|	\
+	ETH_FORCE_BP_MODE_NO_JAM		|	\
+	BIT9					|	\
+	ETH_DO_NOT_FORCE_LINK_FAIL		|	\
+	ETH_RETRANSMIT_16_ATTEMPTS		|	\
+	ETH_ENABLE_AUTO_NEG_SPEED_GMII		|	\
+	ETH_DTE_ADV_0				|	\
+	ETH_DISABLE_AUTO_NEG_BYPASS		|	\
+	ETH_AUTO_NEG_NO_CHANGE			|	\
+	ETH_MAX_RX_PACKET_9700BYTE		|	\
+	ETH_CLR_EXT_LOOPBACK			|	\
+	ETH_SET_FULL_DUPLEX_MODE		|	\
+	ETH_ENABLE_FLOW_CTRL_TX_RX_IN_FULL_DUPLEX
+
+#ifndef __ASSEMBLY__
+
+typedef enum {
+	KATANA_ID_3750,
+	KATANA_ID_750I,
+	KATANA_ID_752I,
+	KATANA_ID_MAX
+} katana_id_t;
+
+#endif
+
+#endif				/* __PPC_PLATFORMS_KATANA_H */
diff -Nru a/arch/ppc/platforms/pmac_pci.c b/arch/ppc/platforms/pmac_pci.c
--- a/arch/ppc/platforms/pmac_pci.c	2005-01-10 20:11:19 -08:00
+++ b/arch/ppc/platforms/pmac_pci.c	2005-01-10 20:11:19 -08:00
@@ -142,14 +142,14 @@
 	|(((unsigned long)(off)) & 0xFCUL) \
 	|1UL)
 
-static unsigned int __pmac
+static void volatile __iomem * __pmac
 macrisc_cfg_access(struct pci_controller* hose, u8 bus, u8 dev_fn, u8 offset)
 {
 	unsigned int caddr;
 
 	if (bus == hose->first_busno) {
 		if (dev_fn < (11 << 3))
-			return 0;
+			return NULL;
 		caddr = MACRISC_CFA0(dev_fn, offset);
 	} else
 		caddr = MACRISC_CFA1(bus, dev_fn, offset);
@@ -160,7 +160,7 @@
 	} while (in_le32(hose->cfg_addr) != caddr);
 
 	offset &= has_uninorth ? 0x07 : 0x03;
-	return (unsigned int)(hose->cfg_data) + (unsigned int)offset;
+	return hose->cfg_data + offset;
 }
 
 static int __pmac
@@ -168,7 +168,7 @@
 		    int len, u32 *val)
 {
 	struct pci_controller *hose = bus->sysdata;
-	unsigned int addr;
+	void volatile __iomem *addr;
 
 	addr = macrisc_cfg_access(hose, bus->number, devfn, offset);
 	if (!addr)
@@ -179,13 +179,13 @@
 	 */
 	switch (len) {
 	case 1:
-		*val = in_8((u8 *)addr);
+		*val = in_8(addr);
 		break;
 	case 2:
-		*val = in_le16((u16 *)addr);
+		*val = in_le16(addr);
 		break;
 	default:
-		*val = in_le32((u32 *)addr);
+		*val = in_le32(addr);
 		break;
 	}
 	return PCIBIOS_SUCCESSFUL;
@@ -196,7 +196,7 @@
 		     int len, u32 val)
 {
 	struct pci_controller *hose = bus->sysdata;
-	unsigned int addr;
+	void volatile __iomem *addr;
 
 	addr = macrisc_cfg_access(hose, bus->number, devfn, offset);
 	if (!addr)
@@ -207,16 +207,16 @@
 	 */
 	switch (len) {
 	case 1:
-		out_8((u8 *)addr, val);
-		(void) in_8((u8 *)addr);
+		out_8(addr, val);
+		(void) in_8(addr);
 		break;
 	case 2:
-		out_le16((u16 *)addr, val);
-		(void) in_le16((u16 *)addr);
+		out_le16(addr, val);
+		(void) in_le16(addr);
 		break;
 	default:
-		out_le32((u32 *)addr, val);
-		(void) in_le32((u32 *)addr);
+		out_le32(addr, val);
+		(void) in_le32(addr);
 		break;
 	}
 	return PCIBIOS_SUCCESSFUL;
@@ -295,7 +295,7 @@
 		+ (((unsigned long)bus) << 16) \
 		+ 0x01000000UL)
 
-static unsigned long __pmac
+static void volatile __iomem * __pmac
 u3_ht_cfg_access(struct pci_controller* hose, u8 bus, u8 devfn, u8 offset)
 {
 	if (bus == hose->first_busno) {
@@ -303,9 +303,9 @@
 		if (PCI_FUNC(devfn) != 0 || PCI_SLOT(devfn) > 7 ||
 		    PCI_SLOT(devfn) < 1)
 			return 0;
-		return ((unsigned long)hose->cfg_data) + U3_HT_CFA0(devfn, offset);
+		return hose->cfg_data + U3_HT_CFA0(devfn, offset);
 	} else
-		return ((unsigned long)hose->cfg_data) + U3_HT_CFA1(bus, devfn, offset);
+		return hose->cfg_data + U3_HT_CFA1(bus, devfn, offset);
 }
 
 static int __pmac
@@ -313,7 +313,7 @@
 		    int len, u32 *val)
 {
 	struct pci_controller *hose = bus->sysdata;
-	unsigned int addr;
+	void volatile __iomem *addr;
 	int i;
 
 	struct device_node *np = pci_busdev_to_OF_node(bus, devfn);
@@ -347,13 +347,13 @@
 	 */
 	switch (len) {
 	case 1:
-		*val = in_8((u8 *)addr);
+		*val = in_8(addr);
 		break;
 	case 2:
-		*val = in_le16((u16 *)addr);
+		*val = in_le16(addr);
 		break;
 	default:
-		*val = in_le32((u32 *)addr);
+		*val = in_le32(addr);
 		break;
 	}
 	return PCIBIOS_SUCCESSFUL;
@@ -364,7 +364,7 @@
 		     int len, u32 val)
 {
 	struct pci_controller *hose = bus->sysdata;
-	unsigned int addr;
+	void volatile __iomem *addr;
 	int i;
 
 	struct device_node *np = pci_busdev_to_OF_node(bus, devfn);
@@ -388,16 +388,16 @@
 	 */
 	switch (len) {
 	case 1:
-		out_8((u8 *)addr, val);
-		(void) in_8((u8 *)addr);
+		out_8(addr, val);
+		(void) in_8(addr);
 		break;
 	case 2:
-		out_le16((u16 *)addr, val);
-		(void) in_le16((u16 *)addr);
+		out_le16(addr, val);
+		(void) in_le16(addr);
 		break;
 	default:
-		out_le32((u32 *)addr, val);
-		(void) in_le32((u32 *)addr);
+		out_le32(addr, val);
+		(void) in_le32(addr);
 		break;
 	}
 	return PCIBIOS_SUCCESSFUL;
@@ -424,7 +424,7 @@
 	/* read the word at offset 0 in config space for device 11 */
 	out_le32(bp->cfg_addr, (1UL << BANDIT_DEVNUM) + PCI_VENDOR_ID);
 	udelay(2);
-	vendev = in_le32((volatile unsigned int *)bp->cfg_data);
+	vendev = in_le32(bp->cfg_data);
 	if (vendev == (PCI_DEVICE_ID_APPLE_BANDIT << 16) +
 			PCI_VENDOR_ID_APPLE) {
 		/* read the revision id */
@@ -443,12 +443,12 @@
 	/* read the word at offset 0x50 */
 	out_le32(bp->cfg_addr, (1UL << BANDIT_DEVNUM) + BANDIT_MAGIC);
 	udelay(2);
-	magic = in_le32((volatile unsigned int *)bp->cfg_data);
+	magic = in_le32(bp->cfg_data);
 	if ((magic & BANDIT_COHERENT) != 0)
 		return;
 	magic |= BANDIT_COHERENT;
 	udelay(2);
-	out_le32((volatile unsigned int *)bp->cfg_data, magic);
+	out_le32(bp->cfg_data, magic);
 	printk(KERN_INFO "Cache coherency enabled for bandit/PSX\n");
 }
 
@@ -622,12 +622,12 @@
 	unsigned int val;
 
 	out_be32(bp->cfg_addr, GRACKLE_CFA(0, 0, 0xa8));
-	val = in_le32((volatile unsigned int *)bp->cfg_data);
+	val = in_le32(bp->cfg_data);
 	val = enable? (val | GRACKLE_PICR1_STG) :
 		(val & ~GRACKLE_PICR1_STG);
 	out_be32(bp->cfg_addr, GRACKLE_CFA(0, 0, 0xa8));
-	out_le32((volatile unsigned int *)bp->cfg_data, val);
-	(void)in_le32((volatile unsigned int *)bp->cfg_data);
+	out_le32(bp->cfg_data, val);
+	(void)in_le32(bp->cfg_data);
 }
 
 static inline void grackle_set_loop_snoop(struct pci_controller *bp, int enable)
@@ -635,12 +635,12 @@
 	unsigned int val;
 
 	out_be32(bp->cfg_addr, GRACKLE_CFA(0, 0, 0xa8));
-	val = in_le32((volatile unsigned int *)bp->cfg_data);
+	val = in_le32(bp->cfg_data);
 	val = enable? (val | GRACKLE_PICR1_LOOPSNOOP) :
 		(val & ~GRACKLE_PICR1_LOOPSNOOP);
 	out_be32(bp->cfg_addr, GRACKLE_CFA(0, 0, 0xa8));
-	out_le32((volatile unsigned int *)bp->cfg_data, val);
-	(void)in_le32((volatile unsigned int *)bp->cfg_data);
+	out_le32(bp->cfg_data, val);
+	(void)in_le32(bp->cfg_data);
 }
 
 static int __init
@@ -659,10 +659,8 @@
 setup_bandit(struct pci_controller* hose, struct reg_property* addr)
 {
 	hose->ops = &macrisc_pci_ops;
-	hose->cfg_addr = (volatile unsigned int *)
-		ioremap(addr->address + 0x800000, 0x1000);
-	hose->cfg_data = (volatile unsigned char *)
-		ioremap(addr->address + 0xc00000, 0x1000);
+	hose->cfg_addr = ioremap(addr->address + 0x800000, 0x1000);
+	hose->cfg_data = ioremap(addr->address + 0xc00000, 0x1000);
 	init_bandit(hose);
 }
 
@@ -671,10 +669,8 @@
 {
 	/* assume a `chaos' bridge */
 	hose->ops = &chaos_pci_ops;
-	hose->cfg_addr = (volatile unsigned int *)
-		ioremap(addr->address + 0x800000, 0x1000);
-	hose->cfg_data = (volatile unsigned char *)
-		ioremap(addr->address + 0xc00000, 0x1000);
+	hose->cfg_addr = ioremap(addr->address + 0x800000, 0x1000);
+	hose->cfg_data = ioremap(addr->address + 0xc00000, 0x1000);
 }
 
 #ifdef CONFIG_POWER4
@@ -713,7 +709,7 @@
 	 * the reg address cell, we shall fix that by killing struct
 	 * reg_property and using some accessor functions instead
 	 */
-	hose->cfg_data = (volatile unsigned char *)ioremap(0xf2000000, 0x02000000);
+	hose->cfg_data = ioremap(0xf2000000, 0x02000000);
 
 	/*
 	 * /ht node doesn't expose a "ranges" property, so we "remove" regions that
diff -Nru a/arch/ppc/platforms/prep_pci.c b/arch/ppc/platforms/prep_pci.c
--- a/arch/ppc/platforms/prep_pci.c	2005-01-10 20:11:22 -08:00
+++ b/arch/ppc/platforms/prep_pci.c	2005-01-10 20:11:22 -08:00
@@ -627,7 +627,7 @@
 		 int len, u32 *val)
 {
 	struct pci_controller *hose = bus->sysdata;
-	volatile unsigned char *cfg_data;
+	volatile void __iomem *cfg_data;
 
 	if (bus->number != 0 || DEVNO(devfn) < MIN_DEVNR
 	    || DEVNO(devfn) > MAX_DEVNR)
@@ -640,13 +640,13 @@
 	cfg_data = hose->cfg_data + CFGADDR(devfn) + offset;
 	switch (len) {
 	case 1:
-		*val = in_8((u8 *)cfg_data);
+		*val = in_8(cfg_data);
 		break;
 	case 2:
-		*val = in_le16((u16 *)cfg_data);
+		*val = in_le16(cfg_data);
 		break;
 	default:
-		*val = in_le32((u32 *)cfg_data);
+		*val = in_le32(cfg_data);
 		break;
 	}
 	return PCIBIOS_SUCCESSFUL;
@@ -657,7 +657,7 @@
 		  int len, u32 val)
 {
 	struct pci_controller *hose = bus->sysdata;
-	volatile unsigned char *cfg_data;
+	volatile void __iomem *cfg_data;
 
 	if (bus->number != 0 || DEVNO(devfn) < MIN_DEVNR
 	    || DEVNO(devfn) > MAX_DEVNR)
@@ -670,13 +670,13 @@
 	cfg_data = hose->cfg_data + CFGADDR(devfn) + offset;
 	switch (len) {
 	case 1:
-		out_8((u8 *)cfg_data, val);
+		out_8(cfg_data, val);
 		break;
 	case 2:
-		out_le16((u16 *)cfg_data, val);
+		out_le16(cfg_data, val);
 		break;
 	default:
-		out_le32((u32 *)cfg_data, val);
+		out_le32(cfg_data, val);
 		break;
 	}
 	return PCIBIOS_SUCCESSFUL;
diff -Nru a/arch/ppc/platforms/prep_setup.c b/arch/ppc/platforms/prep_setup.c
--- a/arch/ppc/platforms/prep_setup.c	2005-01-10 20:11:22 -08:00
+++ b/arch/ppc/platforms/prep_setup.c	2005-01-10 20:11:22 -08:00
@@ -645,7 +645,7 @@
 static void __init
 prep_init_vesa(void)
 {
-#if     (defined(CONFIG_FB_VGA16) || defined(CONFIG_FB_VGA_16_MODULE) || \
+#if     (defined(CONFIG_FB_VGA16) || defined(CONFIG_FB_VGA16_MODULE) || \
 	 defined(CONFIG_FB_VESA))
 	PPC_DEVICE *vgadev = NULL;
 
@@ -1126,7 +1126,7 @@
 		_prep_type = _PREP_Motorola;
 	}
 
-#ifdef CONFIG_PREP_PRESIDUAL
+#ifdef CONFIG_PREP_RESIDUAL
 	/* Switch off all residual data processing if the user requests it */
 	if (strstr(cmd_line, "noresidual") != NULL)
 			res = NULL;
diff -Nru a/arch/ppc/syslib/Makefile b/arch/ppc/syslib/Makefile
--- a/arch/ppc/syslib/Makefile	2005-01-10 20:11:16 -08:00
+++ b/arch/ppc/syslib/Makefile	2005-01-10 20:11:16 -08:00
@@ -17,8 +17,12 @@
 ifeq ($(CONFIG_VIRTEX_II_PRO),y)
 obj-$(CONFIG_40x)		+= xilinx_pic.o
 else
+ifeq ($(CONFIG_403),y)
+obj-$(CONFIG_40x)		+= ppc403_pic.o
+else
 obj-$(CONFIG_40x)		+= ppc4xx_pic.o
 endif
+endif
 obj-$(CONFIG_44x)		+= ppc4xx_pic.o
 obj-$(CONFIG_40x)		+= ppc4xx_setup.o
 obj-$(CONFIG_GEN_RTC)		+= todc_time.o
@@ -39,17 +43,22 @@
 obj-$(CONFIG_PPC_PREP)		+= open_pic.o indirect_pci.o i8259.o todc_time.o
 obj-$(CONFIG_ADIR)		+= i8259.o indirect_pci.o pci_auto.o \
 					todc_time.o
+obj-$(CONFIG_CPCI690)		+= todc_time.o pci_auto.o
 obj-$(CONFIG_EBONY)		+= indirect_pci.o pci_auto.o todc_time.o
-obj-$(CONFIG_EV64260)		+= gt64260_common.o gt64260_pic.o \
-					indirect_pci.o todc_time.o pci_auto.o
+obj-$(CONFIG_EV64260)		+= todc_time.o pci_auto.o
+obj-$(CONFIG_CHESTNUT)		+= mv64360_pic.o pci_auto.o
 obj-$(CONFIG_GEMINI)		+= open_pic.o indirect_pci.o
+obj-$(CONFIG_GT64260)		+= gt64260_pic.o
 obj-$(CONFIG_K2)		+= i8259.o indirect_pci.o todc_time.o \
 					pci_auto.o
 obj-$(CONFIG_LOPEC)		+= i8259.o pci_auto.o todc_time.o
+obj-$(CONFIG_KATANA)		+= pci_auto.o
 obj-$(CONFIG_MCPN765)		+= todc_time.o indirect_pci.o pci_auto.o \
 					open_pic.o i8259.o hawk_common.o
 obj-$(CONFIG_MENF1)		+= todc_time.o i8259.o mpc10x_common.o \
 					pci_auto.o indirect_pci.o
+obj-$(CONFIG_MV64360)		+= mv64360_pic.o
+obj-$(CONFIG_MV64X60)		+= mv64x60.o mv64x60_win.o indirect_pci.o
 obj-$(CONFIG_MVME5100)		+= open_pic.o todc_time.o indirect_pci.o \
 					pci_auto.o hawk_common.o
 obj-$(CONFIG_MVME5100_IPMC761_PRESENT)	+= i8259.o
@@ -74,6 +83,9 @@
 ifeq ($(CONFIG_PPC_GEN550),y)
 obj-$(CONFIG_KGDB)		+= gen550_kgdb.o gen550_dbg.o
 obj-$(CONFIG_SERIAL_TEXT_DEBUG)	+= gen550_dbg.o
+endif
+ifeq ($(CONFIG_SERIAL_MPSC_CONSOLE),y)
+obj-$(CONFIG_SERIAL_TEXT_DEBUG)	+= mv64x60_dbg.o
 endif
 obj-$(CONFIG_BOOTX_TEXT)	+= btext.o
 obj-$(CONFIG_MPC10X_BRIDGE)     += mpc10x_common.o indirect_pci.o
diff -Nru a/arch/ppc/syslib/gt64260_common.c b/arch/ppc/syslib/gt64260_common.c
--- a/arch/ppc/syslib/gt64260_common.c	2005-01-10 20:11:24 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,1664 +0,0 @@
-/*
- * arch/ppc/syslib/gt64260_common.c
- *
- * Common routines for the Marvell/Galileo GT64260 (Discovery) host bridge,
- * interrupt controller, memory controller, serial controller, enet controller,
- * etc.
- *
- * Author: Mark A. Greer <mgreer@mvista.com>
- *
- * 2001 (c) MontaVista, Software, Inc.  This file is licensed under
- * the terms of the GNU General Public License version 2.  This program
- * is licensed "as is" without any warranty of any kind, whether express
- * or implied.
- */
-
-/*
- * The GT64260 port is the result of hard work from many people from
- * many companies.  In particular, employees of Marvell/Galileo, Mission
- * Critical Linux, Xyterra, and MontaVista Software were heavily involved.
- */
-
-/*
- * At last count, the 64260-B-0 has 65 errata and 24 restrictions.  The odds of
- * you getting it to work well, under stress, for a long period of time are
- * low.  If nothing else, you will likely run into an interrupt controller
- * bug.
- *
- * The newer 64260A-B-0 is much improved but has its own problems.
- * Dave Wilhardt <dwilhardt@zyterra.com> has discovered that you must set
- * up your PCI snoop regions to be prefetchable with 4-word bursts AND set the
- * "Memory Write and Invalidate bit" (bit 4) in the cmd reg of each PCI device
- * before coherency works between PCI and other devices.  Many thanks to Dave.
- *
- * So far this code has been tested on Marvell/Galileo EV-64260-BP and
- * an EV-64260A-BP uni-processor boards with 750 and 7400 processors.
- * It has not yet been tested with a 7410 or 7450, or on an smp system.
- *
- * Note: I have not had any luck moving the base register address of the bridge
- * 	 with the gt64260_set_base() routine.  I move it in the bootloader
- * 	 before starting the kernel.  I haven't really looked into it so it
- * 	 may be an easy fix. -- MAG
- */
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/pci.h>
-#include <linux/slab.h>
-
-#include <asm/byteorder.h>
-#include <asm/io.h>
-#include <asm/irq.h>
-#include <asm/uaccess.h>
-#include <asm/machdep.h>
-#include <asm/pci-bridge.h>
-#include <asm/gt64260.h>
-#include <asm/delay.h>
-
-
-u32	gt64260_base; /* Virtual base address of 64260's regs */
-u32	gt64260_revision; /* Revision of the chip */
-u8	gt64260_pci_exclude_bridge = TRUE;
-
-
-/*
- *****************************************************************************
- *
- *	Bridge Initialization Routines
- *
- *****************************************************************************
- */
-static void gt64260_check_errata(struct pci_controller *hose_a,
-				 struct pci_controller *hose_b);
-
-/*
- * Typical '_find_bridges()' routine for boards with a GT64260 bridge.
- */
-int __init
-gt64260_find_bridges(u32 phys_base_addr, gt64260_bridge_info_t *info,
-	int ((*map_irq)(struct pci_dev *, unsigned char, unsigned char)))
-{
-	struct pci_controller		*hose_a, *hose_b;
-	u32				io_base_a, io_base_b;
-	int				rc;
-
-
-	gt64260_base = (u32)ioremap(phys_base_addr,GT64260_INTERNAL_SPACE_SIZE);
-
-	hose_a = pcibios_alloc_controller();
-	if (!hose_a)
-		return -1;
-
-	hose_b = pcibios_alloc_controller();
-	if (!hose_b)
-		return -1;
-
-	info->hose_a = hose_a;
-	info->hose_b = hose_b;
-
-	/* Ends up mapping PCI Config addr/data pairs twice */
-	setup_indirect_pci(hose_a,
-			   phys_base_addr + GT64260_PCI_0_CONFIG_ADDR,
-			   phys_base_addr + GT64260_PCI_0_CONFIG_DATA);
-
-	setup_indirect_pci(hose_b,
-			   phys_base_addr + GT64260_PCI_1_CONFIG_ADDR,
-			   phys_base_addr + GT64260_PCI_1_CONFIG_DATA);
-
-	if ((rc = gt64260_bridge_init(info)) != 0) {
-		iounmap((void *)hose_a->cfg_addr);
-		iounmap((void *)hose_a->cfg_data);
-		iounmap((void *)hose_b->cfg_addr);
-		iounmap((void *)hose_b->cfg_data);
-		iounmap((void *)gt64260_base);
-		return rc;
-	}
-
-	/* ioremap PCI I/O regions */
-	io_base_b = (u32)ioremap(info->pci_1_io_start_proc,info->pci_1_io_size);
-	io_base_a = (u32)ioremap(info->pci_0_io_start_proc,info->pci_0_io_size);
-	isa_io_base = io_base_a;
-
-	hose_a->first_busno = 0;
-	hose_a->last_busno  = 0xff;
-
-	pci_init_resource(&hose_a->io_resource,
-			  0,	/* really: io_base_a - isa_io_base */
-			  info->pci_0_io_size - 1,
-			  IORESOURCE_IO,
-			  "host bridge PCI bus 0");
-	hose_a->io_space.start = info->pci_0_io_start_pci;
-	hose_a->io_space.end   = info->pci_0_io_start_pci +
-					info->pci_0_io_size - 1;
-	hose_a->io_base_virt = (void *)isa_io_base;
-
-	pci_init_resource(&hose_a->mem_resources[0],
-			  info->pci_0_mem_start_proc,
-			  info->pci_0_mem_start_proc + info->pci_0_mem_size - 1,
-			  IORESOURCE_MEM,
-			  "host bridge PCI bus 0");
-	hose_a->mem_space.start = info->pci_0_mem_start_pci_lo;
-	hose_a->mem_space.end   = info->pci_0_mem_start_pci_lo +
-					info->pci_0_mem_size - 1;
-	hose_a->pci_mem_offset = (info->pci_0_mem_start_proc -
-					info->pci_0_mem_start_pci_lo);
-
-	hose_a->last_busno = pciauto_bus_scan(hose_a, hose_a->first_busno);
-
-
-	hose_b->first_busno = hose_a->last_busno + 1;
-	hose_b->bus_offset  = hose_b->first_busno;
-	hose_b->last_busno  = 0xff;
-
-	pci_init_resource(&hose_b->io_resource,
-			  io_base_b - isa_io_base,
-			  io_base_b - isa_io_base + info->pci_1_io_size - 1,
-			  IORESOURCE_IO,
-			  "host bridge PCI bus 1");
-	hose_b->io_space.start = info->pci_1_io_start_pci;
-	hose_b->io_space.end   = info->pci_1_io_start_pci +
-					info->pci_1_io_size - 1;
-	hose_b->io_base_virt = (void *)isa_io_base;
-
-	pci_init_resource(&hose_b->mem_resources[0],
-			  info->pci_1_mem_start_proc,
-			  info->pci_1_mem_start_proc + info->pci_1_mem_size - 1,
-			  IORESOURCE_MEM,
-			  "host bridge PCI bus 1");
-	hose_b->mem_space.start = info->pci_1_mem_start_pci_lo;
-	hose_b->mem_space.end   = info->pci_1_mem_start_pci_lo +
-					info->pci_1_mem_size - 1;
-	hose_b->pci_mem_offset = (info->pci_1_mem_start_proc -
-					info->pci_1_mem_start_pci_lo);
-
-	hose_b->last_busno = pciauto_bus_scan(hose_b, hose_b->first_busno);
-
-
-	ppc_md.pci_exclude_device = gt64260_pci_exclude_device;
-	ppc_md.pci_swizzle        = common_swizzle;
-	ppc_md.pci_map_irq        = map_irq;
-
-	return 0;
-} /* gt64260_find_bridges() */
-
-/*
- * gt64260_bridge_init()
- *
- * Perform bridge initialization for a "typical" setup for a PPC system.
- */
-int __init
-gt64260_bridge_init(gt64260_bridge_info_t *info)
-{
-	int	window;
-	u16	u16_val;
-	u32	u32_val;
-	int	rc = 0;
-	u8	save_exclude;
-
-	/*
-	 * Count on firmware to set/clear other bits in this register.
-	 *
-	 * Set CPU CONFIG Reg bit:
-	 *	bit 13 - Pipeline
-	 *	bit 16 - RdOOO
-	 *
-	 * Clear CPU Config Reg bit:
-	 * 	bit 12 - endianess
-	 *	bit 27 - RemapWrDis
-	 */
-	u32_val = gt_read(GT64260_CPU_CONFIG);
-	u32_val |= ((1<<13) | (1<<16));
-	u32_val &= ~((1<<8) | (1<<12) | (1<<27));
-	gt_write(GT64260_CPU_CONFIG, u32_val);
-
-	/* PCI 0/1 Timeout and Retry limits */
-	u32_val = gt_read(GT64260_PCI_0_TO_RETRY);
-	u32_val |= 0x0000ffff;
-	gt_write(GT64260_PCI_0_TO_RETRY, u32_val);
-
-	u32_val = gt_read(GT64260_PCI_1_TO_RETRY);
-	u32_val |= 0x0000ffff;
-	gt_write(GT64260_PCI_1_TO_RETRY, u32_val);
-
-	save_exclude = gt64260_pci_exclude_bridge;
-	gt64260_pci_exclude_bridge = FALSE;
-
-	/* Set class code to indicate host bridge */
-	early_read_config_dword(info->hose_a,
-			        info->hose_a->first_busno,
-			        PCI_DEVFN(0,0),
-			        PCI_CLASS_REVISION,
-			        &u32_val);
-	u32_val &= 0x000000ff;
-	gt64260_revision = u32_val;	/* a 64260 or 64260A? */
-	u32_val |= (PCI_CLASS_BRIDGE_HOST << 16);
-	early_write_config_dword(info->hose_a,
-				 info->hose_a->first_busno,
-				 PCI_DEVFN(0,0),
-				 PCI_CLASS_REVISION,
-				 u32_val);
-
-	early_read_config_dword(info->hose_b,
-			        info->hose_b->first_busno,
-			        PCI_DEVFN(0,0),
-			        PCI_CLASS_REVISION,
-			        &u32_val);
-	u32_val &= 0x000000ff;
-	u32_val |= (PCI_CLASS_BRIDGE_HOST << 16);
-	early_write_config_dword(info->hose_b,
-				 info->hose_b->first_busno,
-				 PCI_DEVFN(0,0),
-				 PCI_CLASS_REVISION,
-				 u32_val);
-
-	/* Enable 64260 to be PCI master & respond to PCI MEM cycles */
-	early_read_config_word(info->hose_a,
-			       info->hose_a->first_busno,
-			       PCI_DEVFN(0,0),
-			       PCI_COMMAND,
-			       &u16_val);
-	u16_val |= (PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY);
-	early_write_config_word(info->hose_a,
-				info->hose_a->first_busno,
-				PCI_DEVFN(0,0),
-				PCI_COMMAND,
-				u16_val);
-
-	early_read_config_word(info->hose_b,
-			       info->hose_b->first_busno,
-			       PCI_DEVFN(0,0),
-			       PCI_COMMAND,
-			       &u16_val);
-	u16_val |= (PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY);
-	early_write_config_word(info->hose_b,
-				info->hose_b->first_busno,
-				PCI_DEVFN(0,0),
-				PCI_COMMAND,
-				u16_val);
-
-	gt64260_pci_exclude_bridge = save_exclude;
-
-	/*
-	 * Disable all CPU windows on the bridge except for SCS 0 which
-	 * is covering all of system memory.:
-	 */
-	gt64260_cpu_disable_all_windows();
-
-	/*
-	 * Set CPU snoop window to indicate all of system memory
-	 * is covered with wirte-back cache.
-	 */
-	gt64260_cpu_snoop_set_window(0,
-				     0x00000000,
-				     info->mem_size,
-				     GT64260_CPU_SNOOP_WB);
-
-	/*
-	 * Set up CPU->PCI mappings (so CPU can get at PCI dev regs/mem).
-	 * Will only use one of the four CPU->PCI MEM windows on each bus.
-	 */
-	gt64260_cpu_set_pci_io_window(0,
-				      info->pci_0_io_start_proc,
-				      info->pci_0_io_start_pci,
-				      info->pci_0_io_size,
-				      info->pci_0_io_swap);
-
-	gt64260_cpu_set_pci_mem_window(0,
-				       0,
-				       info->pci_0_mem_start_proc,
-				       info->pci_0_mem_start_pci_hi,
-				       info->pci_0_mem_start_pci_lo,
-				       info->pci_0_mem_size,
-				       info->pci_0_mem_swap);
-
-	gt64260_cpu_set_pci_io_window(1,
-				      info->pci_1_io_start_proc,
-				      info->pci_1_io_start_pci,
-				      info->pci_1_io_size,
-				      info->pci_1_io_swap);
-
-	gt64260_cpu_set_pci_mem_window(1,
-				       0,
-				       info->pci_1_mem_start_proc,
-				       info->pci_1_mem_start_pci_hi,
-				       info->pci_1_mem_start_pci_lo,
-				       info->pci_1_mem_size,
-				       info->pci_1_mem_swap);
-
-	/*
-	 * Set up PCI MEM->system memory mapping (bridge slave PCI window).
-	 *
-	 * Set BAR enables to allow only the SCS0 slave window to respond
-	 * to PCI read/write cycles.
-	 */
-	gt64260_pci_bar_enable(0, GT64260_PCI_SLAVE_BAR_REG_ENABLES_SCS_0);
-	gt64260_pci_bar_enable(1, GT64260_PCI_SLAVE_BAR_REG_ENABLES_SCS_0);
-
-	/*
-	 * For virt_to_bus & bus_to_virt to work correctly, this mapping
-	 * must be the same on both PCI buses.
-	 */
-	gt64260_pci_slave_scs_set_window(info->hose_a,
-					 0,
-					 0x00000000,
-					 0x00000000,
-					 info->mem_size);
-
-	gt64260_pci_slave_scs_set_window(info->hose_b,
-					 0,
-					 0x00000000,
-					 0x00000000,
-					 info->mem_size);
-	pci_dram_offset = 0; /* System mem at same addr on PCI & cpu bus */
-
-	/* Disable all the access control windows */
-	for (window=0; window<GT64260_PCI_ACC_CNTL_WINDOWS; window++) {
-		gt64260_pci_acc_cntl_set_window(0, window, 0, 0, 0, 0);
-		gt64260_pci_acc_cntl_set_window(1, window, 0, 0, 0, 0);
-	}
-
-	/* Disable all the PCI snoop regions */
-	for (window=0; window<GT64260_PCI_SNOOP_WINDOWS; window++) {
-		gt64260_pci_snoop_set_window(0, window, 0, 0, 0, 0);
-		gt64260_pci_snoop_set_window(1, window, 0, 0, 0, 0);
-	}
-
-	gt64260_pci_acc_cntl_set_window(0,
-					0,
-					0x00000000,
-					0x00000000,
-					info->mem_size,
-					(GT64260_PCI_ACC_CNTL_PREFETCHEN |
-					 GT64260_PCI_ACC_CNTL_MBURST_4_WORDS |
-					 GT64260_PCI_ACC_CNTL_SWAP_BYTE));
-
-	gt64260_pci_acc_cntl_set_window(1,
-					0,
-					0x00000000,
-					0x00000000,
-					info->mem_size,
-					(GT64260_PCI_ACC_CNTL_PREFETCHEN |
-					 GT64260_PCI_ACC_CNTL_MBURST_4_WORDS |
-					 GT64260_PCI_ACC_CNTL_SWAP_BYTE));
-
-	gt64260_pci_snoop_set_window(0,
-				     0,
-				     0x00000000,
-				     0x00000000,
-				     info->mem_size,
-				     GT64260_PCI_SNOOP_WB);
-				
-	gt64260_pci_snoop_set_window(1,
-				     0,
-				     0x00000000,
-				     0x00000000,
-				     info->mem_size,
-				     GT64260_PCI_SNOOP_WB);
-
-	gt64260_check_errata(info->hose_a, info->hose_b);
-
-
-	/* Set latency timer (to 64) & cacheline size; clear BIST */
-	gt64260_pci_exclude_bridge = FALSE;
-	u32_val = ((0x04 << 8) | (L1_CACHE_LINE_SIZE / 4));
-
-	early_write_config_dword(info->hose_a,
-				 info->hose_a->first_busno,
-				 PCI_DEVFN(0,0),
-				 PCI_CACHE_LINE_SIZE,
-				 u32_val);
-	early_write_config_dword(info->hose_b,
-				 info->hose_b->first_busno,
-				 PCI_DEVFN(0,0),
-				 PCI_CACHE_LINE_SIZE,
-				 u32_val);
-	gt64260_pci_exclude_bridge = TRUE;
-
-	return rc;
-} /* gt64260_bridge_init() */
-
-/*
- * gt64260_check_errata()
- *
- * Apply applicable errata and restrictions from 0.5 of the
- * Errata and Restrictions document from Marvell/Galileo.
- */
-static void __init
-gt64260_check_errata(struct pci_controller *hose_a,
-		     struct pci_controller *hose_b)
-{
-	u32	val;
-	u8	save_exclude;
-
-	/* Currently 2 versions, 64260 and 64260A */
-	if (gt64260_revision == GT64260) {
-		save_exclude = gt64260_pci_exclude_bridge;
-		gt64260_pci_exclude_bridge = FALSE;
-
-		/* FEr#5, FEr#12 */
-		early_read_config_dword(hose_a,
-					hose_a->first_busno,
-					PCI_DEVFN(0,0),
-					PCI_COMMAND,
-					&val);
-		val &= ~(PCI_COMMAND_INVALIDATE | PCI_COMMAND_PARITY);
-		early_write_config_dword(hose_a,
-					 hose_a->first_busno,
-					 PCI_DEVFN(0,0),
-					 PCI_COMMAND,
-					 val);
-
-		early_read_config_dword(hose_b,
-					hose_b->first_busno,
-					PCI_DEVFN(0,0),
-					PCI_COMMAND,
-					&val);
-		val &= ~(PCI_COMMAND_INVALIDATE | PCI_COMMAND_PARITY);
-		early_write_config_dword(hose_b,
-					 hose_b->first_busno,
-					 PCI_DEVFN(0,0),
-					 PCI_COMMAND,
-					 val);
-		gt64260_pci_exclude_bridge = save_exclude;
-
-		/* FEr#12, FEr#13 */
-		gt_clr_bits(GT64260_PCI_0_CMD, ((1<<4) | (1<<5) | (1<<9)));
-		gt_clr_bits(GT64260_PCI_1_CMD, ((1<<4) | (1<<5) | (1<<9)));
-
-		/* FEr#54 */
-		gt_clr_bits(GT64260_CPU_SNOOP_BASE_0, 0xfffcf000);
-		gt_clr_bits(GT64260_CPU_SNOOP_BASE_1, 0xfffcf000);
-		gt_clr_bits(GT64260_CPU_SNOOP_BASE_2, 0xfffcf000);
-		gt_clr_bits(GT64260_CPU_SNOOP_BASE_3, 0xfffcf000);
-
-		/* R#18 */
-		gt_set_bits(GT64260_SDRAM_CONFIG, (1<<26));
-
-	} else if (gt64260_revision == GT64260A) {
-		/* R#18 */
-		gt_set_bits(GT64260_SDRAM_CONFIG, (1<<26));
-
-		/* No longer errata so turn on */
-		gt_set_bits(GT64260_PCI_0_CMD, ((1<<4) | (1<<5) | (1<<9)));
-		gt_set_bits(GT64260_PCI_1_CMD, ((1<<4) | (1<<5) | (1<<9)));
-	}
-} /* gt64260_check_errata() */
-
-
-/*
- *****************************************************************************
- *
- *	General Window Setting Routines
- *
- *****************************************************************************
- */
-
-static int
-gt64260_set_32bit_window(u32 base_addr,
-			 u32 size,
-			 u32 other_bits,
-			 u32 bot_reg,
-			 u32 top_reg)
-{
-	u32	val;
-
-	if (size > 0) {
-		/* Set up the window on the CPU side */
-		gt_write(bot_reg, (base_addr >> 20) | other_bits);
-		gt_write(top_reg, (base_addr + size - 1) >> 20);
-	} else { /* Disable window */
-		gt_write(top_reg, 0x00000000);
-		gt_write(bot_reg, 0x00000fff | other_bits);
-	}
-
-	val = gt_read(bot_reg); /* Flush FIFO */
-	return 0;
-} /* gt64260_set_32bit_window() */
-
-static int
-gt64260_set_64bit_window(u32 base_addr_hi,
-			 u32 base_addr_lo,
-			 u32 size,
-			 u32 other_bits,
-			 u32 bot_reg_hi,
-			 u32 bot_reg_lo,
-			 u32 top_reg)
-{
-	int	rc;
-
-	if ((rc = gt64260_set_32bit_window(base_addr_lo,
-					   size,
-					   other_bits,
-					   bot_reg_lo,
-					   top_reg)) == 0) {
-
-		gt_write(bot_reg_hi, base_addr_hi);
-		base_addr_hi = gt_read(bot_reg_hi); /* Flush FIFO */
-	}
-
-	return rc;
-} /* gt64260_set_64bit_window() */
-
-
-/*
- *****************************************************************************
- *
- *	CPU Configuration Routines
- *
- *****************************************************************************
- */
-
-int
-gt64260_cpu_scs_set_window(u32 window,
-			   u32 base_addr,
-			   u32 size)
-{
-	static u32
-	cpu_scs_windows[GT64260_CPU_SCS_DECODE_WINDOWS][2] = {
-		{ GT64260_CPU_SCS_DECODE_0_BOT, GT64260_CPU_SCS_DECODE_0_TOP },
-		{ GT64260_CPU_SCS_DECODE_1_BOT, GT64260_CPU_SCS_DECODE_1_TOP },
-		{ GT64260_CPU_SCS_DECODE_2_BOT, GT64260_CPU_SCS_DECODE_2_TOP },
-		{ GT64260_CPU_SCS_DECODE_3_BOT, GT64260_CPU_SCS_DECODE_3_TOP },
-	}; /* cpu_scs_windows[][] */
-	int	rc = -1;
-
-	if (window < GT64260_CPU_SCS_DECODE_WINDOWS) {
-		rc = gt64260_set_32bit_window(base_addr,
-					      size,
-					      0,
-					      cpu_scs_windows[window][0],
-					      cpu_scs_windows[window][1]);
-	}
-
-	return rc;
-} /* gt64260_cpu_scs_set_window() */
-
-int
-gt64260_cpu_cs_set_window(u32 window,
-			  u32 base_addr,
-			  u32 size)
-{
-	static u32
-	cpu_cs_windows[GT64260_CPU_CS_DECODE_WINDOWS][2] = {
-		{ GT64260_CPU_CS_DECODE_0_BOT, GT64260_CPU_CS_DECODE_0_TOP },
-		{ GT64260_CPU_CS_DECODE_1_BOT, GT64260_CPU_CS_DECODE_1_TOP },
-		{ GT64260_CPU_CS_DECODE_2_BOT, GT64260_CPU_CS_DECODE_2_TOP },
-		{ GT64260_CPU_CS_DECODE_3_BOT, GT64260_CPU_CS_DECODE_3_TOP },
-	}; /* cpu_cs_windows[][] */
-	int	rc = -1;
-
-	if (window < GT64260_CPU_CS_DECODE_WINDOWS) {
-		rc = gt64260_set_32bit_window(base_addr,
-					      size,
-					      0,
-					      cpu_cs_windows[window][0],
-					      cpu_cs_windows[window][1]);
-	}
-
-	return rc;
-} /* gt64260_cpu_cs_set_window() */
-
-int
-gt64260_cpu_boot_set_window(u32 base_addr,
-			    u32 size)
-{
-	int	rc;
-
-	rc = gt64260_set_32bit_window(base_addr,
-				      size,
-				      0,
-				      GT64260_CPU_BOOT_CS_DECODE_0_BOT,
-				      GT64260_CPU_BOOT_CS_DECODE_0_TOP);
-
-	return rc;
-} /* gt64260_cpu_boot_set_window() */
-
-/*
- * gt64260_cpu_set_pci_io_window()
- *
- * Set up a CPU window into PCI I/O or MEM space.
- * Always do Read/Modify/Write to window regs.
- */
-static int
-gt64260_cpu_pci_set_window(u32 cpu_base_addr,
-			   u32 pci_base_addr,
-			   u32 size,
-			   u32 other_bits,
-			   u32 bot_reg,
-			   u32 top_reg,
-			   u32 remap_reg)
-{
-	u32	val;
-	int	rc;
-
-	if ((rc = gt64260_set_32bit_window(cpu_base_addr,
-					   size,
-					   other_bits,
-					   bot_reg,
-					   top_reg)) == 0) {
-
-		/* Set up CPU->PCI remapping (on lower 32 bits) */
-		gt_write(remap_reg, pci_base_addr >> 20);
-		val = gt_read(bot_reg); /* Flush FIFO */
-	}
-
-	return rc;
-} /* gt64260_cpu_pci_set_window() */
-
-
-/*
- * gt64260_cpu_set_pci_io_window()
- *
- * Set up a CPU window into PCI I/O space.
- * Always do Read/Modify/Write to window regs.
- */
-int
-gt64260_cpu_set_pci_io_window(u32 pci_bus,
-			      u32 cpu_base_addr,
-			      u32 pci_base_addr,
-			      u32 size,
-			      u32 swap)
-{
-	/* 2 PCI buses with 1 I/O window each (from CPU point of view) */
-	static u32
-	cpu_pci_io_windows[GT64260_PCI_BUSES][3] = {
-		{ GT64260_CPU_PCI_0_IO_DECODE_BOT,
-		  GT64260_CPU_PCI_0_IO_DECODE_TOP,
-		  GT64260_CPU_PCI_0_IO_REMAP },
-
-		{ GT64260_CPU_PCI_1_IO_DECODE_BOT,
-		  GT64260_CPU_PCI_1_IO_DECODE_TOP,
-		  GT64260_CPU_PCI_1_IO_REMAP },
-	}; /* cpu_pci_io_windows[][] */
-	int	rc = -1;
-
-	if (pci_bus < GT64260_PCI_BUSES) {
-		rc =  gt64260_cpu_pci_set_window(cpu_base_addr,
-					  pci_base_addr,
-					  size,
-					  swap,
-					  cpu_pci_io_windows[pci_bus][0],
-					  cpu_pci_io_windows[pci_bus][1],
-					  cpu_pci_io_windows[pci_bus][2]);
-	}
-
-	return rc;
-} /* gt64260_cpu_set_pci_io_window() */
-
-/*
- * gt64260_cpu_set_pci_mem_window()
- *
- * Set up a CPU window into PCI MEM space (4 PCI MEM windows per PCI bus).
- * Always do Read/Modify/Write to window regs.
- */
-int
-gt64260_cpu_set_pci_mem_window(u32 pci_bus,
-			       u32 window,
-			       u32 cpu_base_addr,
-			       u32 pci_base_addr_hi,
-			       u32 pci_base_addr_lo,
-			       u32 size,
-			       u32 swap_64bit)
-{
-	/* 2 PCI buses with 4 memory windows each (from CPU point of view) */
-	static u32
-	cpu_pci_mem_windows[GT64260_PCI_BUSES][GT64260_PCI_MEM_WINDOWS_PER_BUS][4] = {
-		{ /* PCI 0 */
-			{ GT64260_CPU_PCI_0_MEM_0_DECODE_BOT,
-			  GT64260_CPU_PCI_0_MEM_0_DECODE_TOP,
-			  GT64260_CPU_PCI_0_MEM_0_REMAP_HI,
-			  GT64260_CPU_PCI_0_MEM_0_REMAP_LO },
-
-			{ GT64260_CPU_PCI_0_MEM_1_DECODE_BOT,
-			  GT64260_CPU_PCI_0_MEM_1_DECODE_TOP,
-			  GT64260_CPU_PCI_0_MEM_1_REMAP_HI,
-			  GT64260_CPU_PCI_0_MEM_1_REMAP_LO },
-
-			{ GT64260_CPU_PCI_0_MEM_2_DECODE_BOT,
-			  GT64260_CPU_PCI_0_MEM_2_DECODE_TOP,
-			  GT64260_CPU_PCI_0_MEM_2_REMAP_HI,
-			  GT64260_CPU_PCI_0_MEM_2_REMAP_LO },
-
-			{ GT64260_CPU_PCI_0_MEM_3_DECODE_BOT,
-			  GT64260_CPU_PCI_0_MEM_3_DECODE_TOP,
-			  GT64260_CPU_PCI_0_MEM_3_REMAP_HI,
-			  GT64260_CPU_PCI_0_MEM_3_REMAP_LO }
-		},
-
-		{ /* PCI 1 */
-			{ GT64260_CPU_PCI_1_MEM_0_DECODE_BOT,
-			  GT64260_CPU_PCI_1_MEM_0_DECODE_TOP,
-			  GT64260_CPU_PCI_1_MEM_0_REMAP_HI,
-			  GT64260_CPU_PCI_1_MEM_0_REMAP_LO },
-
-			{ GT64260_CPU_PCI_1_MEM_1_DECODE_BOT,
-			  GT64260_CPU_PCI_1_MEM_1_DECODE_TOP,
-			  GT64260_CPU_PCI_1_MEM_1_REMAP_HI,
-			  GT64260_CPU_PCI_1_MEM_1_REMAP_LO },
-
-			{ GT64260_CPU_PCI_1_MEM_2_DECODE_BOT,
-			  GT64260_CPU_PCI_1_MEM_2_DECODE_TOP,
-			  GT64260_CPU_PCI_1_MEM_2_REMAP_HI,
-			  GT64260_CPU_PCI_1_MEM_2_REMAP_LO },
-
-			{ GT64260_CPU_PCI_1_MEM_3_DECODE_BOT,
-			  GT64260_CPU_PCI_1_MEM_3_DECODE_TOP,
-			  GT64260_CPU_PCI_1_MEM_3_REMAP_HI,
-			  GT64260_CPU_PCI_1_MEM_3_REMAP_LO },
-		}
-	}; /* cpu_pci_mem_windows[][][] */
-	u32		remap_reg, remap;
-	int		rc = -1;
-
-	if ((pci_bus < GT64260_PCI_BUSES) &&
-	    (window < GT64260_PCI_MEM_WINDOWS_PER_BUS)) {
-
-		if (gt64260_cpu_pci_set_window(
-			cpu_base_addr,
-			pci_base_addr_lo,
-			size,
-			swap_64bit,
-			cpu_pci_mem_windows[pci_bus][window][0],
-			cpu_pci_mem_windows[pci_bus][window][1],
-			cpu_pci_mem_windows[pci_bus][window][3]) == 0) {
-
-			remap_reg = cpu_pci_mem_windows[pci_bus][window][2];
-			gt_write(remap_reg, pci_base_addr_hi);
-
-			remap = gt_read(remap_reg); /* Flush FIFO */
-
-			rc = 0;
-		}
-	}
-
-	return rc;
-} /* gt64260_cpu_set_pci_mem_window() */
-
-int
-gt64260_cpu_prot_set_window(u32 window,
-			    u32 base_addr,
-			    u32 size,
-			    u32 access_bits)
-{
-	static u32
-	cpu_prot_windows[GT64260_CPU_PROT_WINDOWS][2] = {
-		{ GT64260_CPU_PROT_BASE_0, GT64260_CPU_PROT_TOP_0 },
-		{ GT64260_CPU_PROT_BASE_1, GT64260_CPU_PROT_TOP_1 },
-		{ GT64260_CPU_PROT_BASE_2, GT64260_CPU_PROT_TOP_2 },
-		{ GT64260_CPU_PROT_BASE_3, GT64260_CPU_PROT_TOP_3 },
-		{ GT64260_CPU_PROT_BASE_4, GT64260_CPU_PROT_TOP_4 },
-		{ GT64260_CPU_PROT_BASE_5, GT64260_CPU_PROT_TOP_5 },
-		{ GT64260_CPU_PROT_BASE_6, GT64260_CPU_PROT_TOP_6 },
-		{ GT64260_CPU_PROT_BASE_7, GT64260_CPU_PROT_TOP_7 },
-	}; /* cpu_prot_windows[][] */
-	int	rc = -1;
-
-	if (window < GT64260_CPU_PROT_WINDOWS) {
-		rc = gt64260_set_32bit_window(base_addr,
-					      size,
-					      access_bits,
-					      cpu_prot_windows[window][0],
-					      cpu_prot_windows[window][1]);
-	}
-
-	return rc;
-} /* gt64260_cpu_prot_set_window() */
-
-int
-gt64260_cpu_snoop_set_window(u32 window,
-			     u32 base_addr,
-			     u32 size,
-			     u32  snoop_type)
-{
-	static u32
-	cpu_snoop_windows[GT64260_CPU_SNOOP_WINDOWS][2] = {
-		{ GT64260_CPU_SNOOP_BASE_0, GT64260_CPU_SNOOP_TOP_0 },
-		{ GT64260_CPU_SNOOP_BASE_1, GT64260_CPU_SNOOP_TOP_1 },
-		{ GT64260_CPU_SNOOP_BASE_2, GT64260_CPU_SNOOP_TOP_2 },
-		{ GT64260_CPU_SNOOP_BASE_3, GT64260_CPU_SNOOP_TOP_3 },
-	}; /* cpu_snoop_windows[][] */
-	int	rc = -1;
-
-	if ((window < GT64260_CPU_SNOOP_WINDOWS) &&
-	    (snoop_type <= GT64260_CPU_SNOOP_WB)) {
-
-		rc = gt64260_set_32bit_window(base_addr,
-					      size,
-					      snoop_type,
-					      cpu_snoop_windows[window][0],
-					      cpu_snoop_windows[window][1]);
-	}
-
-	return rc;
-} /* gt64260_cpu_snoop_set_window() */
-
-void
-gt64260_cpu_disable_all_windows(void)
-{
-	int	pci_bus, window;
-
-	/* Don't disable SCS windows b/c we need to access system memory */
-
-	for (window=0; window<GT64260_CPU_CS_DECODE_WINDOWS; window++) {
-		gt64260_cpu_cs_set_window(window, 0, 0);
-	}
-
-	gt64260_cpu_boot_set_window(0, 0);
-
-	for (pci_bus=0; pci_bus<GT64260_PCI_BUSES; pci_bus++) {
-		gt64260_cpu_set_pci_io_window(pci_bus, 0, 0, 0, 0);
-
-		for (window=0;window<GT64260_PCI_MEM_WINDOWS_PER_BUS;window++) {
-			gt64260_cpu_set_pci_mem_window(pci_bus,
-						       window,
-						       0, 0, 0, 0, 0);
-		}
-	}
-
-	for (window=0; window<GT64260_CPU_PROT_WINDOWS; window++) {
-		gt64260_cpu_prot_set_window(window, 0, 0, 0);
-	}
-
-	for (window=0; window<GT64260_CPU_SNOOP_WINDOWS; window++) {
-		gt64260_cpu_snoop_set_window(window, 0, 0, 0);
-	}
-
-	return;
-} /* gt64260_cpu_disable_all_windows() */
-
-
-/*
- *****************************************************************************
- *
- *	PCI Slave Window Configuration Routines
- *
- *****************************************************************************
- */
-
-int
-gt64260_pci_bar_enable(u32 pci_bus,
-		       u32 enable_bits)
-{
-	u32	reg, val;
-	int	rc = -1;
-
-	if (pci_bus < GT64260_PCI_BUSES) {
-		reg = (pci_bus == 0) ? GT64260_PCI_0_SLAVE_BAR_REG_ENABLES :
-				       GT64260_PCI_1_SLAVE_BAR_REG_ENABLES;
-
-
-		/* Note: '0' enables, '1' disables */
-		val = gt_read(reg);
-		val |= 0xffffffff;	/* Disable everything by default */
-		val &= ~enable_bits;
-		gt_write(reg, val);
-
-		gt_read(reg); /* Flush FIFO */
-
-		rc = 0;
-	}
-
-	return rc;
-} /* gt64260_pci_bar_enable() */
-
-static int
-gt64260_pci_slave_set_window(struct pci_controller *hose,
-			     u32 pci_base_addr,
-			     u32 cpu_base_addr,
-			     u32 bar_size,
-			     u32 pci_cfg_fcn,
-			     u32 pci_cfg_hdr_offset,
-			     u32 bar_size_reg,
-			     u32 remap_reg)
-{
-	u32	val;
-	int	devfn;
-	u8	save_exclude;
-
-	pci_base_addr &= 0xfffff000;
-	cpu_base_addr &= 0xfffff000;
-	bar_size &= 0xfffff000;
-	devfn = PCI_DEVFN(0, pci_cfg_fcn);
-
-	gt_write(bar_size_reg, (bar_size - 1) & 0xfffff000);
-	gt_write(remap_reg, cpu_base_addr);
-	gt_read(remap_reg); /* Flush FIFO */
-
-	save_exclude = gt64260_pci_exclude_bridge;
-	gt64260_pci_exclude_bridge = FALSE;
-	early_read_config_dword(hose,
-				hose->first_busno,
-				devfn,
-				pci_cfg_hdr_offset,
-				&val);
-	val &= 0x0000000f;
-	early_write_config_dword(hose,
-				 hose->first_busno,
-				 devfn,
-				 pci_cfg_hdr_offset,
-				 pci_base_addr | val);
-	gt64260_pci_exclude_bridge = save_exclude;
-
-	return 0;
-} /* gt64260_pci_slave_set_window() */
-
-int
-gt64260_pci_slave_scs_set_window(struct pci_controller *hose,
-				 u32 window,
-				 u32 pci_base_addr,
-				 u32 cpu_base_addr,
-				 u32 size)
-{
-	static u32
-	pci_scs_windows[GT64260_PCI_BUSES][GT64260_PCI_SCS_WINDOWS][4] = {
-		{ /* PCI 0 */
-			{ 0, 0x10,
-			  GT64260_PCI_0_SLAVE_SCS_0_SIZE,
-			  GT64260_PCI_0_SLAVE_SCS_0_REMAP },
-			{ 0, 0x14,
-			  GT64260_PCI_0_SLAVE_SCS_1_SIZE,
-			  GT64260_PCI_0_SLAVE_SCS_1_REMAP },
-			{ 0, 0x18,
-			  GT64260_PCI_0_SLAVE_SCS_2_SIZE,
-			  GT64260_PCI_0_SLAVE_SCS_2_REMAP },
-			{ 0, 0x1c,
-			  GT64260_PCI_0_SLAVE_SCS_3_SIZE,
-			  GT64260_PCI_0_SLAVE_SCS_3_REMAP },
-		},
-		{ /* PCI 1 */
-			{ 0, 0x10,
-			  GT64260_PCI_1_SLAVE_SCS_0_SIZE,
-			  GT64260_PCI_1_SLAVE_SCS_0_REMAP },
-			{ 0, 0x14,
-			  GT64260_PCI_1_SLAVE_SCS_1_SIZE,
-			  GT64260_PCI_1_SLAVE_SCS_1_REMAP },
-			{ 0, 0x18,
-			  GT64260_PCI_1_SLAVE_SCS_2_SIZE,
-			  GT64260_PCI_1_SLAVE_SCS_2_REMAP },
-			{ 0, 0x1c,
-			  GT64260_PCI_1_SLAVE_SCS_3_SIZE,
-			  GT64260_PCI_1_SLAVE_SCS_3_REMAP },
-		}
-	}; /* pci_scs_windows[][][] */
-	int	pci_bus;
-	int	rc = -1;
-
-	if (window < GT64260_PCI_SCS_WINDOWS) {
-		pci_bus = (hose->first_busno == 0) ? 0 : 1;
-
-		rc = gt64260_pci_slave_set_window(
-				hose,
-				pci_base_addr,
-				cpu_base_addr,
-				size,
-				pci_scs_windows[pci_bus][window][0],
-				pci_scs_windows[pci_bus][window][1],
-				pci_scs_windows[pci_bus][window][2],
-				pci_scs_windows[pci_bus][window][3]);
-	}
-
-	return rc;
-} /* gt64260_pci_slave_scs_set_window() */
-
-int
-gt64260_pci_slave_cs_set_window(struct pci_controller *hose,
-				u32 window,
-				u32 pci_base_addr,
-				u32 cpu_base_addr,
-				u32 size)
-{
-	static u32
-	pci_cs_windows[GT64260_PCI_BUSES][GT64260_PCI_CS_WINDOWS][4] = {
-		{ /* PCI 0 */
-			{ 1, 0x10,
-			  GT64260_PCI_0_SLAVE_CS_0_SIZE,
-			  GT64260_PCI_0_SLAVE_CS_0_REMAP },
-			{ 1, 0x14,
-			  GT64260_PCI_0_SLAVE_CS_1_SIZE,
-			  GT64260_PCI_0_SLAVE_CS_1_REMAP },
-			{ 1, 0x18,
-			  GT64260_PCI_0_SLAVE_CS_2_SIZE,
-			  GT64260_PCI_0_SLAVE_CS_2_REMAP },
-			{ 1, 0x1c,
-			  GT64260_PCI_0_SLAVE_CS_3_SIZE,
-			  GT64260_PCI_0_SLAVE_CS_3_REMAP },
-		},
-		{ /* PCI 1 */
-			{ 1, 0x10,
-			  GT64260_PCI_1_SLAVE_CS_0_SIZE,
-			  GT64260_PCI_1_SLAVE_CS_0_REMAP },
-			{ 1, 0x14,
-			  GT64260_PCI_1_SLAVE_CS_1_SIZE,
-			  GT64260_PCI_1_SLAVE_CS_1_REMAP },
-			{ 1, 0x18,
-			  GT64260_PCI_1_SLAVE_CS_2_SIZE,
-			  GT64260_PCI_1_SLAVE_CS_2_REMAP },
-			{ 1, 0x1c,
-			  GT64260_PCI_1_SLAVE_CS_3_SIZE,
-			  GT64260_PCI_1_SLAVE_CS_3_REMAP },
-		}
-	}; /* pci_cs_windows[][][] */
-	int	pci_bus;
-	int	rc = -1;
-
-	if (window < GT64260_PCI_CS_WINDOWS) {
-		pci_bus = (hose->first_busno == 0) ? 0 : 1;
-
-		rc = gt64260_pci_slave_set_window(
-				hose,
-				pci_base_addr,
-				cpu_base_addr,
-				size,
-				pci_cs_windows[pci_bus][window][0],
-				pci_cs_windows[pci_bus][window][1],
-				pci_cs_windows[pci_bus][window][2],
-				pci_cs_windows[pci_bus][window][3]);
-	}
-
-	return rc;
-} /* gt64260_pci_slave_cs_set_window() */
-
-int
-gt64260_pci_slave_boot_set_window(struct pci_controller *hose,
-				  u32 pci_base_addr,
-				  u32 cpu_base_addr,
-				  u32 size)
-{
-	int	rc;
-
-	rc = gt64260_pci_slave_set_window(hose,
-					  pci_base_addr,
-					  cpu_base_addr,
-					  size,
-					  1,
-					  0x20,
-					  GT64260_PCI_1_SLAVE_BOOT_SIZE,
-					  GT64260_PCI_1_SLAVE_BOOT_REMAP);
-
-	return rc;
-} /* gt64260_pci_slave_boot_set_window() */
-
-int
-gt64260_pci_slave_p2p_mem_set_window(struct pci_controller *hose,
-				     u32 window,
-				     u32 pci_base_addr,
-				     u32 other_bus_base_addr,
-				     u32 size)
-{
-	static u32
-	pci_p2p_mem_windows[GT64260_PCI_BUSES][GT64260_PCI_P2P_MEM_WINDOWS][4]={
-		{ /* PCI 0 */
-			{ 2, 0x10,
-			  GT64260_PCI_0_SLAVE_P2P_MEM_0_SIZE,
-			  GT64260_PCI_0_SLAVE_P2P_MEM_0_REMAP_LO },
-			{ 2, 0x14,
-			  GT64260_PCI_0_SLAVE_P2P_MEM_1_SIZE,
-			  GT64260_PCI_0_SLAVE_P2P_MEM_1_REMAP_LO },
-		},
-		{ /* PCI 1 */
-			{ 2, 0x10,
-			  GT64260_PCI_1_SLAVE_P2P_MEM_0_SIZE,
-			  GT64260_PCI_1_SLAVE_P2P_MEM_0_REMAP_LO },
-			{ 2, 0x14,
-			  GT64260_PCI_1_SLAVE_P2P_MEM_1_SIZE,
-			  GT64260_PCI_1_SLAVE_P2P_MEM_1_REMAP_LO },
-		}
-	}; /* pci_p2p_mem_windows[][][] */
-	int	pci_bus;
-	int	rc = -1;
-
-	if (window < GT64260_PCI_P2P_MEM_WINDOWS) {
-		pci_bus = (hose->first_busno == 0) ? 0 : 1;
-
-		rc = gt64260_pci_slave_set_window(
-				hose,
-				pci_base_addr,
-				other_bus_base_addr,
-				size,
-				pci_p2p_mem_windows[pci_bus][window][0],
-				pci_p2p_mem_windows[pci_bus][window][1],
-				pci_p2p_mem_windows[pci_bus][window][2],
-				pci_p2p_mem_windows[pci_bus][window][3]);
-	}
-
-	return rc;
-} /* gt64260_pci_slave_p2p_mem_set_window() */
-
-int
-gt64260_pci_slave_p2p_io_set_window(struct pci_controller *hose,
-				    u32 pci_base_addr,
-				    u32 other_bus_base_addr,
-				    u32 size)
-{
-	int	rc;
-
-	rc = gt64260_pci_slave_set_window(hose,
-					  pci_base_addr,
-					  other_bus_base_addr,
-					  size,
-					  2,
-					  0x18,
-					  GT64260_PCI_1_SLAVE_P2P_IO_SIZE,
-					  GT64260_PCI_1_SLAVE_P2P_IO_REMAP);
-
-	return rc;
-} /* gt64260_pci_slave_p2p_io_set_window() */
-
-int
-gt64260_pci_slave_dac_scs_set_window(struct pci_controller *hose,
-				     u32 window,
-				     u32 pci_base_addr_hi,
-				     u32 pci_base_addr_lo,
-				     u32 cpu_base_addr,
-				     u32 size)
-{
-	static u32
-	pci_dac_scs_windows[GT64260_PCI_BUSES][GT64260_PCI_DAC_SCS_WINDOWS][5]={
-		{ /* PCI 0 */
-			{ 4, 0x10, 0x14,
-			  GT64260_PCI_0_SLAVE_DAC_SCS_0_SIZE,
-			  GT64260_PCI_0_SLAVE_DAC_SCS_0_REMAP },
-			{ 4, 0x18, 0x1c,
-			  GT64260_PCI_0_SLAVE_DAC_SCS_1_SIZE,
-			  GT64260_PCI_0_SLAVE_DAC_SCS_1_REMAP },
-			{ 5, 0x10, 0x14,
-			  GT64260_PCI_0_SLAVE_DAC_SCS_2_SIZE,
-			  GT64260_PCI_0_SLAVE_DAC_SCS_2_REMAP },
-			{ 5, 0x18, 0x1c,
-			  GT64260_PCI_0_SLAVE_DAC_SCS_3_SIZE,
-			  GT64260_PCI_0_SLAVE_DAC_SCS_3_REMAP },
-		},
-		{ /* PCI 1 */
-			{ 4, 0x10, 0x14,
-			  GT64260_PCI_1_SLAVE_DAC_SCS_0_SIZE,
-			  GT64260_PCI_1_SLAVE_DAC_SCS_0_REMAP },
-			{ 4, 0x18, 0x1c,
-			  GT64260_PCI_1_SLAVE_DAC_SCS_1_SIZE,
-			  GT64260_PCI_1_SLAVE_DAC_SCS_1_REMAP },
-			{ 5, 0x10, 0x14,
-			  GT64260_PCI_1_SLAVE_DAC_SCS_2_SIZE,
-			  GT64260_PCI_1_SLAVE_DAC_SCS_2_REMAP },
-			{ 5, 0x18, 0x1c,
-			  GT64260_PCI_1_SLAVE_DAC_SCS_3_SIZE,
-			  GT64260_PCI_1_SLAVE_DAC_SCS_3_REMAP },
-		}
-	}; /* pci_dac_scs_windows[][][] */
-	int	pci_bus;
-	int	rc = -1;
-
-	if (window < GT64260_PCI_DAC_SCS_WINDOWS) {
-		pci_bus = (hose->first_busno == 0) ? 0 : 1;
-
-		rc = gt64260_pci_slave_set_window(
-				hose,
-				pci_base_addr_lo,
-				cpu_base_addr,
-				size,
-				pci_dac_scs_windows[pci_bus][window][0],
-				pci_dac_scs_windows[pci_bus][window][1],
-				pci_dac_scs_windows[pci_bus][window][3],
-				pci_dac_scs_windows[pci_bus][window][4]);
-
-		early_write_config_dword(
-			hose,
-			hose->first_busno,
-			PCI_DEVFN(0, pci_dac_scs_windows[pci_bus][window][0]),
-			pci_dac_scs_windows[pci_bus][window][2],
-			pci_base_addr_hi);
-	}
-
-	return rc;
-} /* gt64260_pci_slave_dac_scs_set_window() */
-
-int
-gt64260_pci_slave_dac_cs_set_window(struct pci_controller *hose,
-				    u32 window,
-				    u32 pci_base_addr_hi,
-				    u32 pci_base_addr_lo,
-				    u32 cpu_base_addr,
-				    u32 size)
-{
-	static u32
-	pci_dac_cs_windows[GT64260_PCI_BUSES][GT64260_PCI_DAC_CS_WINDOWS][5] = {
-		{ /* PCI 0 */
-			{ 6, 0x10, 0x14,
-			  GT64260_PCI_0_SLAVE_DAC_CS_0_SIZE,
-			  GT64260_PCI_0_SLAVE_DAC_CS_0_REMAP },
-			{ 6, 0x18, 0x1c,
-			  GT64260_PCI_0_SLAVE_DAC_CS_1_SIZE,
-			  GT64260_PCI_0_SLAVE_DAC_CS_1_REMAP },
-			{ 6, 0x20, 0x24,
-			  GT64260_PCI_0_SLAVE_DAC_CS_2_SIZE,
-			  GT64260_PCI_0_SLAVE_DAC_CS_2_REMAP },
-			{ 7, 0x10, 0x14,
-			  GT64260_PCI_0_SLAVE_DAC_CS_3_SIZE,
-			  GT64260_PCI_0_SLAVE_DAC_CS_3_REMAP },
-		},
-		{ /* PCI 1 */
-			{ 6, 0x10, 0x14,
-			  GT64260_PCI_1_SLAVE_DAC_CS_0_SIZE,
-			  GT64260_PCI_1_SLAVE_DAC_CS_0_REMAP },
-			{ 6, 0x18, 0x1c,
-			  GT64260_PCI_1_SLAVE_DAC_CS_1_SIZE,
-			  GT64260_PCI_1_SLAVE_DAC_CS_1_REMAP },
-			{ 6, 0x20, 0x24,
-			  GT64260_PCI_1_SLAVE_DAC_CS_2_SIZE,
-			  GT64260_PCI_1_SLAVE_DAC_CS_2_REMAP },
-			{ 7, 0x10, 0x14,
-			  GT64260_PCI_1_SLAVE_DAC_CS_3_SIZE,
-			  GT64260_PCI_1_SLAVE_DAC_CS_3_REMAP },
-		}
-	}; /* pci_dac_cs_windows[][][] */
-	int	pci_bus;
-	int	rc = -1;
-
-	if (window < GT64260_PCI_CS_WINDOWS) {
-		pci_bus = (hose->first_busno == 0) ? 0 : 1;
-
-		rc = gt64260_pci_slave_set_window(
-				hose,
-				pci_base_addr_lo,
-				cpu_base_addr,
-				size,
-				pci_dac_cs_windows[pci_bus][window][0],
-				pci_dac_cs_windows[pci_bus][window][1],
-				pci_dac_cs_windows[pci_bus][window][3],
-				pci_dac_cs_windows[pci_bus][window][4]);
-
-		early_write_config_dword(
-			hose,
-			hose->first_busno,
-			PCI_DEVFN(0, pci_dac_cs_windows[pci_bus][window][0]),
-			pci_dac_cs_windows[pci_bus][window][2],
-			pci_base_addr_hi);
-	}
-
-	return rc;
-} /* gt64260_pci_slave_dac_cs_set_window() */
-
-int
-gt64260_pci_slave_dac_boot_set_window(struct pci_controller *hose,
-				      u32 pci_base_addr_hi,
-				      u32 pci_base_addr_lo,
-				      u32 cpu_base_addr,
-				      u32 size)
-{
-	int	rc;
-
-	rc = gt64260_pci_slave_set_window(hose,
-					  pci_base_addr_lo,
-					  cpu_base_addr,
-					  size,
-					  7,
-					  0x18,
-					  GT64260_PCI_1_SLAVE_BOOT_SIZE,
-					  GT64260_PCI_1_SLAVE_BOOT_REMAP);
-
-	early_write_config_dword(hose,
-				 hose->first_busno,
-				 PCI_DEVFN(0, 7),
-				 0x1c,
-				 pci_base_addr_hi);
-
-	return rc;
-} /* gt64260_pci_slave_dac_boot_set_window() */
-
-int
-gt64260_pci_slave_dac_p2p_mem_set_window(struct pci_controller *hose,
-				         u32 window,
-				         u32 pci_base_addr_hi,
-				         u32 pci_base_addr_lo,
-				         u32 other_bus_base_addr,
-				         u32 size)
-{
-	static u32
-	pci_dac_p2p_mem_windows[GT64260_PCI_BUSES][GT64260_PCI_DAC_P2P_MEM_WINDOWS][5] = {
-		{ /* PCI 0 */
-			{ 4, 0x20, 0x24,
-			  GT64260_PCI_0_SLAVE_DAC_P2P_MEM_0_SIZE,
-			  GT64260_PCI_0_SLAVE_DAC_P2P_MEM_0_REMAP_LO },
-			{ 5, 0x20, 0x24,
-			  GT64260_PCI_0_SLAVE_DAC_P2P_MEM_1_SIZE,
-			  GT64260_PCI_0_SLAVE_DAC_P2P_MEM_1_REMAP_LO },
-		},
-		{ /* PCI 1 */
-			{ 4, 0xa0, 0xa4,
-			  GT64260_PCI_0_SLAVE_DAC_P2P_MEM_0_SIZE,
-			  GT64260_PCI_0_SLAVE_DAC_P2P_MEM_0_REMAP_LO },
-			{ 5, 0xa0, 0xa4,
-			  GT64260_PCI_0_SLAVE_DAC_P2P_MEM_1_SIZE,
-			  GT64260_PCI_0_SLAVE_DAC_P2P_MEM_1_REMAP_LO },
-		}
-	}; /* pci_dac_p2p_windows[][][] */
-	int	pci_bus;
-	int	rc = -1;
-
-	if (window < GT64260_PCI_P2P_MEM_WINDOWS) {
-		pci_bus = (hose->first_busno == 0) ? 0 : 1;
-
-		rc = gt64260_pci_slave_set_window(
-				hose,
-				pci_base_addr_lo,
-				other_bus_base_addr,
-				size,
-				pci_dac_p2p_mem_windows[pci_bus][window][0],
-				pci_dac_p2p_mem_windows[pci_bus][window][1],
-				pci_dac_p2p_mem_windows[pci_bus][window][3],
-				pci_dac_p2p_mem_windows[pci_bus][window][4]);
-
-		early_write_config_dword(
-		    hose,
-		    hose->first_busno,
-		    PCI_DEVFN(0, pci_dac_p2p_mem_windows[pci_bus][window][0]),
-		    pci_dac_p2p_mem_windows[pci_bus][window][2],
-		    pci_base_addr_hi);
-	}
-
-	return rc;
-} /* gt64260_pci_slave_dac_p2p_mem_set_window() */
-
-
-/*
- *****************************************************************************
- *
- *	PCI Control Configuration Routines
- *
- *****************************************************************************
- */
-
-
-int
-gt64260_pci_acc_cntl_set_window(u32 pci_bus,
-			        u32 window,
-			        u32 base_addr_hi,
-			        u32 base_addr_lo,
-			        u32 size,
-			        u32 features)
-{
-	static u32
-	pci_acc_cntl_windows[GT64260_PCI_BUSES][GT64260_PCI_ACC_CNTL_WINDOWS][3] = {
-		{ /* PCI 0 */
-			{ GT64260_PCI_0_ACC_CNTL_0_BASE_HI,
-			  GT64260_PCI_0_ACC_CNTL_0_BASE_LO,
-			  GT64260_PCI_0_ACC_CNTL_0_TOP },
-
-			{ GT64260_PCI_0_ACC_CNTL_1_BASE_HI,
-			  GT64260_PCI_0_ACC_CNTL_1_BASE_LO,
-			  GT64260_PCI_0_ACC_CNTL_1_TOP },
-
-			{ GT64260_PCI_0_ACC_CNTL_2_BASE_HI,
-			  GT64260_PCI_0_ACC_CNTL_2_BASE_LO,
-			  GT64260_PCI_0_ACC_CNTL_2_TOP },
-
-			{ GT64260_PCI_0_ACC_CNTL_3_BASE_HI,
-			  GT64260_PCI_0_ACC_CNTL_3_BASE_LO,
-			  GT64260_PCI_0_ACC_CNTL_3_TOP },
-
-			{ GT64260_PCI_0_ACC_CNTL_4_BASE_HI,
-			  GT64260_PCI_0_ACC_CNTL_4_BASE_LO,
-			  GT64260_PCI_0_ACC_CNTL_4_TOP },
-
-			{ GT64260_PCI_0_ACC_CNTL_5_BASE_HI,
-			  GT64260_PCI_0_ACC_CNTL_5_BASE_LO,
-			  GT64260_PCI_0_ACC_CNTL_5_TOP },
-
-			{ GT64260_PCI_0_ACC_CNTL_6_BASE_HI,
-			  GT64260_PCI_0_ACC_CNTL_6_BASE_LO,
-			  GT64260_PCI_0_ACC_CNTL_6_TOP },
-
-			{ GT64260_PCI_0_ACC_CNTL_7_BASE_HI,
-			  GT64260_PCI_0_ACC_CNTL_7_BASE_LO,
-			  GT64260_PCI_0_ACC_CNTL_7_TOP },
-		},
-		{ /* PCI 1 */
-			{ GT64260_PCI_1_ACC_CNTL_0_BASE_HI,
-			  GT64260_PCI_1_ACC_CNTL_0_BASE_LO,
-			  GT64260_PCI_1_ACC_CNTL_0_TOP },
-
-			{ GT64260_PCI_1_ACC_CNTL_1_BASE_HI,
-			  GT64260_PCI_1_ACC_CNTL_1_BASE_LO,
-			  GT64260_PCI_1_ACC_CNTL_1_TOP },
-
-			{ GT64260_PCI_1_ACC_CNTL_2_BASE_HI,
-			  GT64260_PCI_1_ACC_CNTL_2_BASE_LO,
-			  GT64260_PCI_1_ACC_CNTL_2_TOP },
-
-			{ GT64260_PCI_1_ACC_CNTL_3_BASE_HI,
-			  GT64260_PCI_1_ACC_CNTL_3_BASE_LO,
-			  GT64260_PCI_1_ACC_CNTL_3_TOP },
-
-			{ GT64260_PCI_1_ACC_CNTL_4_BASE_HI,
-			  GT64260_PCI_1_ACC_CNTL_4_BASE_LO,
-			  GT64260_PCI_1_ACC_CNTL_4_TOP },
-
-			{ GT64260_PCI_1_ACC_CNTL_5_BASE_HI,
-			  GT64260_PCI_1_ACC_CNTL_5_BASE_LO,
-			  GT64260_PCI_1_ACC_CNTL_5_TOP },
-
-			{ GT64260_PCI_1_ACC_CNTL_6_BASE_HI,
-			  GT64260_PCI_1_ACC_CNTL_6_BASE_LO,
-			  GT64260_PCI_1_ACC_CNTL_6_TOP },
-
-			{ GT64260_PCI_1_ACC_CNTL_7_BASE_HI,
-			  GT64260_PCI_1_ACC_CNTL_7_BASE_LO,
-			  GT64260_PCI_1_ACC_CNTL_7_TOP },
-		}
-	}; /* pci_acc_cntl_windows[][][] */
-	int	rc = -1;
-
-	if ((pci_bus < GT64260_PCI_BUSES) &&
-	    (window < GT64260_PCI_ACC_CNTL_WINDOWS)) {
-
-		rc = gt64260_set_64bit_window(
-			      base_addr_hi,
-			      base_addr_lo,
-			      size,
-			      features,
-			      pci_acc_cntl_windows[pci_bus][window][0],
-			      pci_acc_cntl_windows[pci_bus][window][1],
-			      pci_acc_cntl_windows[pci_bus][window][2]);
-	}
-
-	return rc;
-} /* gt64260_pci_acc_cntl_set_window() */
-
-int
-gt64260_pci_snoop_set_window(u32 pci_bus,
-			     u32 window,
-			     u32 base_addr_hi,
-			     u32 base_addr_lo,
-			     u32 size,
-			     u32 snoop_type)
-{
-	static u32
-	pci_snoop_windows[GT64260_PCI_BUSES][GT64260_PCI_SNOOP_WINDOWS][3] = {
-		{ /* PCI 0 */
-			{ GT64260_PCI_0_SNOOP_0_BASE_HI,
-			  GT64260_PCI_0_SNOOP_0_BASE_LO,
-			  GT64260_PCI_0_SNOOP_0_TOP },
-
-			{ GT64260_PCI_0_SNOOP_1_BASE_HI,
-			  GT64260_PCI_0_SNOOP_1_BASE_LO,
-			  GT64260_PCI_0_SNOOP_1_TOP },
-
-			{ GT64260_PCI_0_SNOOP_2_BASE_HI,
-			  GT64260_PCI_0_SNOOP_2_BASE_LO,
-			  GT64260_PCI_0_SNOOP_2_TOP },
-
-			{ GT64260_PCI_0_SNOOP_3_BASE_HI,
-			  GT64260_PCI_0_SNOOP_3_BASE_LO,
-			  GT64260_PCI_0_SNOOP_3_TOP },
-		},
-		{ /* PCI 1 */
-			{ GT64260_PCI_1_SNOOP_0_BASE_HI,
-			  GT64260_PCI_1_SNOOP_0_BASE_LO,
-			  GT64260_PCI_1_SNOOP_0_TOP },
-
-			{ GT64260_PCI_1_SNOOP_1_BASE_HI,
-			  GT64260_PCI_1_SNOOP_1_BASE_LO,
-			  GT64260_PCI_1_SNOOP_1_TOP },
-
-			{ GT64260_PCI_1_SNOOP_2_BASE_HI,
-			  GT64260_PCI_1_SNOOP_2_BASE_LO,
-			  GT64260_PCI_1_SNOOP_2_TOP },
-
-			{ GT64260_PCI_1_SNOOP_3_BASE_HI,
-			  GT64260_PCI_1_SNOOP_3_BASE_LO,
-			  GT64260_PCI_1_SNOOP_3_TOP },
-		},
-	}; /* pci_snoop_windows[][][] */
-	int	rc = -1;
-
-	if ((pci_bus < GT64260_PCI_BUSES) &&
-	    (window < GT64260_PCI_SNOOP_WINDOWS)) {
-
-		rc = gt64260_set_64bit_window(
-			      base_addr_hi,
-			      base_addr_lo,
-			      size,
-			      snoop_type,
-			      pci_snoop_windows[pci_bus][window][0],
-			      pci_snoop_windows[pci_bus][window][1],
-			      pci_snoop_windows[pci_bus][window][2]);
-	}
-
-	return rc;
-} /* gt64260_pci_snoop_set_window() */
-
-/*
- *****************************************************************************
- *
- *	64260's Register Base Address Routines
- *
- *****************************************************************************
- */
-
-/*
- * gt64260_remap_bridge_regs()
- *
- * Move the bridge's register to the specified base address.
- * Assume that there are no other windows overlapping this area and that
- * all but the highest 3 nibbles are 0.
- */
-int
-gt64260_set_base(u32 new_base)
-{
-	u32	val;
-	int	limit = 100000;
-	int	rc = 0;
-
-	val = gt_read(GT64260_INTERNAL_SPACE_DECODE);
-	val = (new_base >> 20) | (val & 0xffff0000);
-	gt_write(GT64260_INTERNAL_SPACE_DECODE, val);
-
-	iounmap((void *)gt64260_base);
-	gt64260_base = (u32)ioremap((new_base & 0xfff00000),
-				    GT64260_INTERNAL_SPACE_SIZE);
-
-	do { /* Wait for bridge to move its regs */
-		val = gt_read(GT64260_INTERNAL_SPACE_DECODE);
-	} while ((val != 0xffffffff) && (limit-- > 0));
-
-	if (limit <= 0) {
-		rc = -1;
-	}
-
-	return rc;
-} /* gt64260_remap_bridge_regs() */
-
-/*
- * gt64260_get_base()
- *
- * Return the current virtual base address of the 64260's registers.
- */
-int
-gt64260_get_base(u32 *base)
-{
-	*base = gt64260_base;
-	return 0;
-} /* gt64260_remap_bridge_regs() */
-
-/*
- *****************************************************************************
- *
- *	Exclude PCI config space access to bridge itself
- *
- *****************************************************************************
- */
-
-/*
- * gt64260_exclude_pci_device()
- *
- * This routine causes the PCI subsystem to skip the PCI device in slot 0
- * (which is the 64260 itself) unless explicitly allowed.
- */
-int
-gt64260_pci_exclude_device(u8 bus, u8 devfn)
-{
-	struct pci_controller	*hose;
-
-	hose = pci_bus_to_hose(bus);
-
-	/* Skip slot 0 and 1 on both hoses */
-	if ((gt64260_pci_exclude_bridge == TRUE) &&
-	    (PCI_SLOT(devfn) == 0) &&
-	    (hose->first_busno == bus)) {
-
-		return PCIBIOS_DEVICE_NOT_FOUND;
-	}
-	else {
-		return PCIBIOS_SUCCESSFUL;
-	}
-} /* gt64260_pci_exclude_device() */
-
-#if defined(CONFIG_SERIAL_TEXT_DEBUG)
-
-/*
- * gt64260_putc()
- *
- * Dump a character out the MPSC port for gt64260_mpsc_progress
- * this assumes the baud rate has already been set up and the
- * MPSC initialized by the bootloader or firmware.
- */
-
-static inline void
-gt_putc(char c){
-	mb();
-	gt_write(GT64260_MPSC_0_CHR_1, c);
-	mb();
-	gt_write(GT64260_MPSC_0_CHR_2, 0x200);
-	mb();
-
-	udelay(10000);
-}
-
-void
-puthex(unsigned long val){
-
-        int i;
-
-        for (i = 7;  i >= 0;  i--) {
-		gt_putc("0123456789ABCDEF"[(val>>28) & 0x0f]);
-		val <<= 4;
-	}
-	gt_putc('\r');
-	gt_putc('\n');
-
-}
-
-
-void
-gt64260_mpsc_progress(char *s, unsigned short hex){
-	/* spit stuff out the 64260 mpsc */
-
-	volatile char	c;
-	while ((c = *s++) != 0){
-		gt_putc(c);
-		if ( c == '\n' ) gt_putc('\r');
-	}
-	gt_putc('\n');
-	gt_putc('\r');
-
-	return;
-}
-
-#endif /* CONFIG_DEBUG_TEXT */
diff -Nru a/arch/ppc/syslib/gt64260_pic.c b/arch/ppc/syslib/gt64260_pic.c
--- a/arch/ppc/syslib/gt64260_pic.c	2005-01-10 20:11:20 -08:00
+++ b/arch/ppc/syslib/gt64260_pic.c	2005-01-10 20:11:20 -08:00
@@ -3,7 +3,7 @@
  *
  * Interrupt controller support for Galileo's GT64260.
  *
- * Author: Chris Zankel <chris@mvista.com>
+ * Author: Chris Zankel <source@mvista.com>
  * Modified by: Mark A. Greer <mgreer@mvista.com>
  *
  * Based on sources from Rabeeh Khoury / Galileo Technology
@@ -34,6 +34,7 @@
 
 #include <linux/stddef.h>
 #include <linux/init.h>
+#include <linux/interrupt.h>
 #include <linux/sched.h>
 #include <linux/signal.h>
 #include <linux/stddef.h>
@@ -43,8 +44,11 @@
 #include <asm/io.h>
 #include <asm/system.h>
 #include <asm/irq.h>
-#include <asm/gt64260.h>
+#include <asm/mv64x60.h>
 
+#define CPU_INTR_STR	"gt64260 cpu interface error"
+#define PCI0_INTR_STR	"gt64260 pci 0 error"
+#define PCI1_INTR_STR	"gt64260 pci 1 error"
 
 /* ========================== forward declaration ========================== */
 
@@ -54,63 +58,55 @@
 /* ========================== local declarations =========================== */
 
 struct hw_interrupt_type gt64260_pic = {
-	" GT64260_PIC ",		/* typename */
-	NULL,				/* startup */
-	NULL,				/* shutdown */
-	gt64260_unmask_irq,		/* enable */
-	gt64260_mask_irq,		/* disable */
-	gt64260_mask_irq,		/* ack */
-	NULL,				/* end */
-	NULL				/* set_affinity */
+	.typename = " gt64260_pic ",
+	.enable   = gt64260_unmask_irq,
+	.disable  = gt64260_mask_irq,
+	.ack      = gt64260_mask_irq,
+	.end      = gt64260_unmask_irq,
 };
 
-u32 gt64260_irq_base = 0;      /* GT64260 handles the next 96 IRQs from here */
+u32 gt64260_irq_base = 0;	/* GT64260 handles the next 96 IRQs from here */
+
+static struct mv64x60_handle bh;
 
 /* gt64260_init_irq()
  *
  *  This function initializes the interrupt controller. It assigns
  *  all interrupts from IRQ0 to IRQ95 to the gt64260 interrupt controller.
  *
- * Input Variable(s):
- *  None.
- *
- * Outpu. Variable(s):
- *  None.
- *
- * Returns:
- *  void
- *
  * Note:
  *  We register all GPP inputs as interrupt source, but disable them.
  */
-
-__init void
+void __init
 gt64260_init_irq(void)
 {
 	int i;
 
-	if ( ppc_md.progress ) ppc_md.progress("gt64260_init_irq: enter", 0x0);
+	if (ppc_md.progress)
+		ppc_md.progress("gt64260_init_irq: enter", 0x0);
+
+	bh.v_base = mv64x60_get_bridge_vbase();
 
 	ppc_cached_irq_mask[0] = 0;
-	ppc_cached_irq_mask[1] = 0x0f000000; /* Enable GPP intrs */
+	ppc_cached_irq_mask[1] = 0x0f000000;	/* Enable GPP intrs */
 	ppc_cached_irq_mask[2] = 0;
 
 	/* disable all interrupts and clear current interrupts */
-	gt_write(GT64260_GPP_INTR_MASK, ppc_cached_irq_mask[2]);
-	gt_write(GT64260_GPP_INTR_CAUSE,0);
-	gt_write(GT64260_IC_CPU_INTR_MASK_LO, ppc_cached_irq_mask[0]);
-	gt_write(GT64260_IC_CPU_INTR_MASK_HI, ppc_cached_irq_mask[1]);
+	mv64x60_write(&bh, MV64x60_GPP_INTR_MASK, ppc_cached_irq_mask[2]);
+	mv64x60_write(&bh, MV64x60_GPP_INTR_CAUSE, 0);
+	mv64x60_write(&bh, GT64260_IC_CPU_INTR_MASK_LO, ppc_cached_irq_mask[0]);
+	mv64x60_write(&bh, GT64260_IC_CPU_INTR_MASK_HI, ppc_cached_irq_mask[1]);
 
 	/* use the gt64260 for all (possible) interrupt sources */
-	for( i = gt64260_irq_base;  i < (gt64260_irq_base + 96);  i++ )  {
+	for (i = gt64260_irq_base; i < (gt64260_irq_base + 96); i++)
 		irq_desc[i].handler = &gt64260_pic;
-	}
 
-	if ( ppc_md.progress ) ppc_md.progress("gt64260_init_irq: exit", 0x0);
+	if (ppc_md.progress)
+		ppc_md.progress("gt64260_init_irq: exit", 0x0);
 }
 
-
-/* gt64260_get_irq()
+/*
+ * gt64260_get_irq()
  *
  *  This function returns the lowest interrupt number of all interrupts that
  *  are currently asserted.
@@ -123,7 +119,6 @@
  *
  * Returns:
  *  int	<interrupt number> or -2 (bogus interrupt)
- *
  */
 int
 gt64260_get_irq(struct pt_regs *regs)
@@ -131,38 +126,41 @@
 	int irq;
 	int irq_gpp;
 
-	irq = gt_read(GT64260_IC_MAIN_CAUSE_LO);
+	irq = mv64x60_read(&bh, GT64260_IC_MAIN_CAUSE_LO);
 	irq = __ilog2((irq & 0x3dfffffe) & ppc_cached_irq_mask[0]);
 
 	if (irq == -1) {
-		irq = gt_read(GT64260_IC_MAIN_CAUSE_HI);
+		irq = mv64x60_read(&bh, GT64260_IC_MAIN_CAUSE_HI);
 		irq = __ilog2((irq & 0x0f000db7) & ppc_cached_irq_mask[1]);
 
-		if (irq == -1) {
-			irq = -2;   /* bogus interrupt, should never happen */
-		} else {
+		if (irq == -1)
+			irq = -2; /* bogus interrupt, should never happen */
+		else {
 			if (irq >= 24) {
-				irq_gpp = gt_read(GT64260_GPP_INTR_CAUSE);
+				irq_gpp = mv64x60_read(&bh,
+					MV64x60_GPP_INTR_CAUSE);
 				irq_gpp = __ilog2(irq_gpp &
-						  ppc_cached_irq_mask[2]);
+					ppc_cached_irq_mask[2]);
 
-				if (irq_gpp == -1) {
+				if (irq_gpp == -1)
 					irq = -2;
-				} else {
+				else {
 					irq = irq_gpp + 64;
-					gt_write(GT64260_GPP_INTR_CAUSE, ~(1<<(irq-64)));
+					mv64x60_write(&bh,
+						MV64x60_GPP_INTR_CAUSE,
+						~(1 << (irq - 64)));
 				}
-			} else {
+			} else
 				irq += 32;
-			}
 		}
 	}
 
-	if( irq < 0 )  {
-		return( irq );
-	} else  {
-		return( gt64260_irq_base + irq );
-	}
+	(void)mv64x60_read(&bh, MV64x60_GPP_INTR_CAUSE);
+
+	if (irq < 0)
+		return (irq);
+	else
+		return (gt64260_irq_base + irq);
 }
 
 /* gt64260_unmask_irq()
@@ -178,32 +176,29 @@
  * Returns:
  *  void
  */
-
 static void
 gt64260_unmask_irq(unsigned int irq)
 {
 	irq -= gt64260_irq_base;
-	if (irq > 31) {
-		if (irq > 63) {
-			/* unmask GPP irq */
-			gt_write(GT64260_GPP_INTR_MASK,
-				     ppc_cached_irq_mask[2] |= (1<<(irq-64)));
-		} else {
-			/* mask high interrupt register */
-			gt_write(GT64260_IC_CPU_INTR_MASK_HI,
-				     ppc_cached_irq_mask[1] |= (1<<(irq-32)));
-		}
-	} else {
-		/* mask low interrupt register */
-		gt_write(GT64260_IC_CPU_INTR_MASK_LO,
-			     ppc_cached_irq_mask[0] |= (1<<irq));
-	}
-}
 
+	if (irq > 31)
+		if (irq > 63) /* unmask GPP irq */
+			mv64x60_write(&bh, MV64x60_GPP_INTR_MASK,
+				ppc_cached_irq_mask[2] |= (1 << (irq - 64)));
+		else /* mask high interrupt register */
+			mv64x60_write(&bh, GT64260_IC_CPU_INTR_MASK_HI,
+				ppc_cached_irq_mask[1] |= (1 << (irq - 32)));
+	else /* mask low interrupt register */
+		mv64x60_write(&bh, GT64260_IC_CPU_INTR_MASK_LO,
+			ppc_cached_irq_mask[0] |= (1 << irq));
+
+	(void)mv64x60_read(&bh, MV64x60_GPP_INTR_MASK);
+	return;
+}
 
 /* gt64260_mask_irq()
  *
- *  This funktion disables the requested interrupt.
+ *  This function disables the requested interrupt.
  *
  * Input Variable(s):
  *  unsigned int	interrupt number (IRQ0...IRQ95).
@@ -214,28 +209,120 @@
  * Returns:
  *  void
  */
-
 static void
 gt64260_mask_irq(unsigned int irq)
 {
 	irq -= gt64260_irq_base;
-	if (irq > 31) {
-		if (irq > 63) {
-			/* mask GPP irq */
-			gt_write(GT64260_GPP_INTR_MASK,
-				     ppc_cached_irq_mask[2] &= ~(1<<(irq-64)));
-		} else {
-			/* mask high interrupt register */
-			gt_write(GT64260_IC_CPU_INTR_MASK_HI,
-				     ppc_cached_irq_mask[1] &= ~(1<<(irq-32)));
-		}
-	} else {
-		/* mask low interrupt register */
-		gt_write(GT64260_IC_CPU_INTR_MASK_LO,
-			     ppc_cached_irq_mask[0] &= ~(1<<irq));
-	}
 
-	if (irq == 36) { /* Seems necessary for SDMA interrupts */
-		udelay(1);
+	if (irq > 31)
+		if (irq > 63) /* mask GPP irq */
+			mv64x60_write(&bh, MV64x60_GPP_INTR_MASK,
+				ppc_cached_irq_mask[2] &= ~(1 << (irq - 64)));
+		else /* mask high interrupt register */
+			mv64x60_write(&bh, GT64260_IC_CPU_INTR_MASK_HI,
+				ppc_cached_irq_mask[1] &= ~(1 << (irq - 32)));
+	else /* mask low interrupt register */
+		mv64x60_write(&bh, GT64260_IC_CPU_INTR_MASK_LO,
+			ppc_cached_irq_mask[0] &= ~(1 << irq));
+
+	(void)mv64x60_read(&bh, MV64x60_GPP_INTR_MASK);
+	return;
+}
+
+static irqreturn_t
+gt64260_cpu_error_int_handler(int irq, void *dev_id, struct pt_regs *regs)
+{
+	printk(KERN_ERR "gt64260_cpu_error_int_handler: %s 0x%08x\n",
+		"Error on CPU interface - Cause regiser",
+		mv64x60_read(&bh, MV64x60_CPU_ERR_CAUSE));
+	printk(KERN_ERR "\tCPU error register dump:\n");
+	printk(KERN_ERR "\tAddress low  0x%08x\n",
+	       mv64x60_read(&bh, MV64x60_CPU_ERR_ADDR_LO));
+	printk(KERN_ERR "\tAddress high 0x%08x\n",
+	       mv64x60_read(&bh, MV64x60_CPU_ERR_ADDR_HI));
+	printk(KERN_ERR "\tData low     0x%08x\n",
+	       mv64x60_read(&bh, MV64x60_CPU_ERR_DATA_LO));
+	printk(KERN_ERR "\tData high    0x%08x\n",
+	       mv64x60_read(&bh, MV64x60_CPU_ERR_DATA_HI));
+	printk(KERN_ERR "\tParity       0x%08x\n",
+	       mv64x60_read(&bh, MV64x60_CPU_ERR_PARITY));
+	mv64x60_write(&bh, MV64x60_CPU_ERR_CAUSE, 0);
+	return IRQ_HANDLED;
+}
+
+static irqreturn_t
+gt64260_pci_error_int_handler(int irq, void *dev_id, struct pt_regs *regs)
+{
+	u32 val;
+	unsigned int pci_bus = (unsigned int)dev_id;
+
+	if (pci_bus == 0) {	/* Error on PCI 0 */
+		val = mv64x60_read(&bh, MV64x60_PCI0_ERR_CAUSE);
+		printk(KERN_ERR "%s: Error in PCI %d Interface\n",
+			"gt64260_pci_error_int_handler", pci_bus);
+		printk(KERN_ERR "\tPCI %d error register dump:\n", pci_bus);
+		printk(KERN_ERR "\tCause register 0x%08x\n", val);
+		printk(KERN_ERR "\tAddress Low    0x%08x\n",
+		       mv64x60_read(&bh, MV64x60_PCI0_ERR_ADDR_LO));
+		printk(KERN_ERR "\tAddress High   0x%08x\n",
+		       mv64x60_read(&bh, MV64x60_PCI0_ERR_ADDR_HI));
+		printk(KERN_ERR "\tAttribute      0x%08x\n",
+		       mv64x60_read(&bh, MV64x60_PCI0_ERR_DATA_LO));
+		printk(KERN_ERR "\tCommand        0x%08x\n",
+		       mv64x60_read(&bh, MV64x60_PCI0_ERR_CMD));
+		mv64x60_write(&bh, MV64x60_PCI0_ERR_CAUSE, ~val);
+	}
+	if (pci_bus == 1) {	/* Error on PCI 1 */
+		val = mv64x60_read(&bh, MV64x60_PCI1_ERR_CAUSE);
+		printk(KERN_ERR "%s: Error in PCI %d Interface\n",
+			"gt64260_pci_error_int_handler", pci_bus);
+		printk(KERN_ERR "\tPCI %d error register dump:\n", pci_bus);
+		printk(KERN_ERR "\tCause register 0x%08x\n", val);
+		printk(KERN_ERR "\tAddress Low    0x%08x\n",
+		       mv64x60_read(&bh, MV64x60_PCI1_ERR_ADDR_LO));
+		printk(KERN_ERR "\tAddress High   0x%08x\n",
+		       mv64x60_read(&bh, MV64x60_PCI1_ERR_ADDR_HI));
+		printk(KERN_ERR "\tAttribute      0x%08x\n",
+		       mv64x60_read(&bh, MV64x60_PCI1_ERR_DATA_LO));
+		printk(KERN_ERR "\tCommand        0x%08x\n",
+		       mv64x60_read(&bh, MV64x60_PCI1_ERR_CMD));
+		mv64x60_write(&bh, MV64x60_PCI1_ERR_CAUSE, ~val);
 	}
+	return IRQ_HANDLED;
+}
+
+static int __init
+gt64260_register_hdlrs(void)
+{
+	int rc;
+
+	/* Register CPU interface error interrupt handler */
+	if ((rc = request_irq(MV64x60_IRQ_CPU_ERR,
+		gt64260_cpu_error_int_handler, SA_INTERRUPT, CPU_INTR_STR, 0)))
+		printk(KERN_WARNING "Can't register cpu error handler: %d", rc);
+
+	mv64x60_write(&bh, MV64x60_CPU_ERR_MASK, 0);
+	mv64x60_write(&bh, MV64x60_CPU_ERR_MASK, 0x000000fe);
+
+	/* Register PCI 0 error interrupt handler */
+	if ((rc = request_irq(MV64360_IRQ_PCI0, gt64260_pci_error_int_handler,
+		    SA_INTERRUPT, PCI0_INTR_STR, (void *)0)))
+		printk(KERN_WARNING "Can't register pci 0 error handler: %d",
+			rc);
+
+	mv64x60_write(&bh, MV64x60_PCI0_ERR_MASK, 0);
+	mv64x60_write(&bh, MV64x60_PCI0_ERR_MASK, 0x003c0c24);
+
+	/* Register PCI 1 error interrupt handler */
+	if ((rc = request_irq(MV64360_IRQ_PCI1, gt64260_pci_error_int_handler,
+		    SA_INTERRUPT, PCI1_INTR_STR, (void *)1)))
+		printk(KERN_WARNING "Can't register pci 1 error handler: %d",
+			rc);
+
+	mv64x60_write(&bh, MV64x60_PCI1_ERR_MASK, 0);
+	mv64x60_write(&bh, MV64x60_PCI1_ERR_MASK, 0x003c0c24);
+
+	return 0;
 }
+
+arch_initcall(gt64260_register_hdlrs);
diff -Nru a/arch/ppc/syslib/ibm44x_common.c b/arch/ppc/syslib/ibm44x_common.c
--- a/arch/ppc/syslib/ibm44x_common.c	2005-01-10 20:11:18 -08:00
+++ b/arch/ppc/syslib/ibm44x_common.c	2005-01-10 20:11:18 -08:00
@@ -19,6 +19,7 @@
 #include <linux/time.h>
 #include <linux/types.h>
 #include <linux/serial.h>
+#include <linux/module.h>
 
 #include <asm/ibm44x.h>
 #include <asm/mmu.h>
@@ -47,6 +48,7 @@
 
 	return (page_4gb | addr);
 };
+EXPORT_SYMBOL(fixup_bigphys_addr);
 
 void __init ibm44x_calibrate_decr(unsigned int freq)
 {
@@ -142,19 +144,9 @@
 	return mem_size;
 }
 
-static void __init ibm44x_init_irq(void)
-{
-	int i;
-
-	ppc4xx_pic_init();
-
-	for (i = 0; i < NR_IRQS; i++)
-		irq_desc[i].handler = ppc4xx_pic;
-}
-
 void __init ibm44x_platform_init(void)
 {
-	ppc_md.init_IRQ = ibm44x_init_irq;
+	ppc_md.init_IRQ = ppc4xx_pic_init;
 	ppc_md.find_end_of_memory = ibm44x_find_end_of_memory;
 	ppc_md.restart = ibm44x_restart;
 	ppc_md.power_off = ibm44x_power_off;
diff -Nru a/arch/ppc/syslib/indirect_pci.c b/arch/ppc/syslib/indirect_pci.c
--- a/arch/ppc/syslib/indirect_pci.c	2005-01-10 20:11:16 -08:00
+++ b/arch/ppc/syslib/indirect_pci.c	2005-01-10 20:11:16 -08:00
@@ -32,7 +32,7 @@
 		     int len, u32 *val)
 {
 	struct pci_controller *hose = bus->sysdata;
-	volatile unsigned char *cfg_data;
+	volatile void __iomem *cfg_data;
 	u8 cfg_type = 0;
 
 	if (ppc_md.pci_exclude_device)
@@ -54,13 +54,13 @@
 	cfg_data = hose->cfg_data + (offset & 3);
 	switch (len) {
 	case 1:
-		*val = in_8((u8 *)cfg_data);
+		*val = in_8(cfg_data);
 		break;
 	case 2:
-		*val = in_le16((u16 *)cfg_data);
+		*val = in_le16(cfg_data);
 		break;
 	default:
-		*val = in_le32((u32 *)cfg_data);
+		*val = in_le32(cfg_data);
 		break;
 	}
 	return PCIBIOS_SUCCESSFUL;
@@ -71,7 +71,7 @@
 		      int len, u32 val)
 {
 	struct pci_controller *hose = bus->sysdata;
-	volatile unsigned char *cfg_data;
+	volatile void __iomem *cfg_data;
 	u8 cfg_type = 0;
 
 	if (ppc_md.pci_exclude_device)
@@ -93,13 +93,13 @@
 	cfg_data = hose->cfg_data + (offset & 3);
 	switch (len) {
 	case 1:
-		out_8((u8 *)cfg_data, val);
+		out_8(cfg_data, val);
 		break;
 	case 2:
-		out_le16((u16 *)cfg_data, val);
+		out_le16(cfg_data, val);
 		break;
 	default:
-		out_le32((u32 *)cfg_data, val);
+		out_le32(cfg_data, val);
 		break;
 	}
 	return PCIBIOS_SUCCESSFUL;
@@ -112,11 +112,11 @@
 };
 
 void __init
-setup_indirect_pci_nomap(struct pci_controller* hose, u32 cfg_addr,
-	u32 cfg_data)
+setup_indirect_pci_nomap(struct pci_controller* hose, void __iomem * cfg_addr,
+	void __iomem * cfg_data)
 {
-	hose->cfg_addr = (unsigned int *)cfg_addr;
-	hose->cfg_data = (unsigned char *)cfg_data;
+	hose->cfg_addr = cfg_addr;
+	hose->cfg_data = cfg_data;
 	hose->ops = &indirect_pci_ops;
 }
 
@@ -124,12 +124,12 @@
 setup_indirect_pci(struct pci_controller* hose, u32 cfg_addr, u32 cfg_data)
 {
 	unsigned long base = cfg_addr & PAGE_MASK;
-	char *mbase;
+	void __iomem *mbase, *addr, *data;
 
 	mbase = ioremap(base, PAGE_SIZE);
-	cfg_addr = (u32)(mbase + (cfg_addr & ~PAGE_MASK));
+	addr = mbase + (cfg_addr & ~PAGE_MASK);
 	if ((cfg_data & PAGE_MASK) != base)
 		mbase = ioremap(cfg_data & PAGE_MASK, PAGE_SIZE);
-	cfg_data = (u32)(mbase + (cfg_data & ~PAGE_MASK));
-	setup_indirect_pci_nomap(hose, cfg_addr, cfg_data);
+	data = mbase + (cfg_data & ~PAGE_MASK);
+	setup_indirect_pci_nomap(hose, addr, data);
 }
diff -Nru a/arch/ppc/syslib/mv64360_pic.c b/arch/ppc/syslib/mv64360_pic.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/ppc/syslib/mv64360_pic.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,417 @@
+/*
+ * arch/ppc/kernel/mv64360_pic.c
+ *
+ * Interrupt controller support for Marvell's MV64360.
+ *
+ * Author: Rabeeh Khoury <rabeeh@galileo.co.il>
+ * Based on MV64360 PIC written by
+ * Chris Zankel <chris@mvista.com>
+ * Mark A. Greer <mgreer@mvista.com>
+ *
+ * Copyright 2004 MontaVista Software, Inc.
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+/*
+ * This file contains the specific functions to support the MV64360
+ * interrupt controller.
+ *
+ * The MV64360 has two main interrupt registers (high and low) that
+ * summarizes the interrupts generated by the units of the MV64360.
+ * Each bit is assigned to an interrupt number, where the low register
+ * are assigned from IRQ0 to IRQ31 and the high cause register
+ * from IRQ32 to IRQ63
+ * The GPP (General Purpose Pins) interrupts are assigned from IRQ64 (GPP0)
+ * to IRQ95 (GPP31).
+ * get_irq() returns the lowest interrupt number that is currently asserted.
+ *
+ * Note:
+ *  - This driver does not initialize the GPP when used as an interrupt
+ *    input.
+ */
+
+#include <linux/stddef.h>
+#include <linux/init.h>
+#include <linux/sched.h>
+#include <linux/signal.h>
+#include <linux/stddef.h>
+#include <linux/delay.h>
+#include <linux/irq.h>
+#include <linux/interrupt.h>
+
+#include <asm/io.h>
+#include <asm/processor.h>
+#include <asm/system.h>
+#include <asm/irq.h>
+#include <asm/mv64x60.h>
+
+#ifdef CONFIG_IRQ_ALL_CPUS
+#error "The mv64360 does not support distribution of IRQs on all CPUs"
+#endif
+/* ========================== forward declaration ========================== */
+
+static void mv64360_unmask_irq(unsigned int);
+static void mv64360_mask_irq(unsigned int);
+static irqreturn_t mv64360_cpu_error_int_handler(int, void *, struct pt_regs *);
+static irqreturn_t mv64360_sram_error_int_handler(int, void *,
+						  struct pt_regs *);
+static irqreturn_t mv64360_pci_error_int_handler(int, void *, struct pt_regs *);
+
+/* ========================== local declarations =========================== */
+
+struct hw_interrupt_type mv64360_pic = {
+	.typename = " mv64360_pic ",
+	.enable   = mv64360_unmask_irq,
+	.disable  = mv64360_mask_irq,
+	.ack      = mv64360_mask_irq,
+	.end      = mv64360_unmask_irq,
+};
+
+#define CPU_INTR_STR	"mv64360 cpu interface error"
+#define SRAM_INTR_STR	"mv64360 internal sram error"
+#define PCI0_INTR_STR	"mv64360 pci 0 error"
+#define PCI1_INTR_STR	"mv64360 pci 1 error"
+
+static struct mv64x60_handle bh;
+
+u32 mv64360_irq_base = 0;	/* MV64360 handles the next 96 IRQs from here */
+
+/* mv64360_init_irq()
+ *
+ * This function initializes the interrupt controller. It assigns
+ * all interrupts from IRQ0 to IRQ95 to the mv64360 interrupt controller.
+ *
+ * Input Variable(s):
+ *  None.
+ *
+ * Outpu. Variable(s):
+ *  None.
+ *
+ * Returns:
+ *  void
+ *
+ * Note:
+ *  We register all GPP inputs as interrupt source, but disable them.
+ */
+void __init
+mv64360_init_irq(void)
+{
+	int i;
+
+	if (ppc_md.progress)
+		ppc_md.progress("mv64360_init_irq: enter", 0x0);
+
+	bh.v_base = mv64x60_get_bridge_vbase();
+
+	ppc_cached_irq_mask[0] = 0;
+	ppc_cached_irq_mask[1] = 0x0f000000;	/* Enable GPP intrs */
+	ppc_cached_irq_mask[2] = 0;
+
+	/* disable all interrupts and clear current interrupts */
+	mv64x60_write(&bh, MV64x60_GPP_INTR_CAUSE, 0);
+	mv64x60_write(&bh, MV64x60_GPP_INTR_MASK, ppc_cached_irq_mask[2]);
+	mv64x60_write(&bh, MV64360_IC_CPU0_INTR_MASK_LO,ppc_cached_irq_mask[0]);
+	mv64x60_write(&bh, MV64360_IC_CPU0_INTR_MASK_HI,ppc_cached_irq_mask[1]);
+
+	/* All interrupts are level interrupts */
+	for (i = mv64360_irq_base; i < (mv64360_irq_base + 96); i++) {
+		irq_desc[i].status |= IRQ_LEVEL;
+		irq_desc[i].handler = &mv64360_pic;
+	}
+
+	if (ppc_md.progress)
+		ppc_md.progress("mv64360_init_irq: exit", 0x0);
+}
+
+/* mv64360_get_irq()
+ *
+ * This function returns the lowest interrupt number of all interrupts that
+ * are currently asserted.
+ *
+ * Input Variable(s):
+ *  struct pt_regs*	not used
+ *
+ * Output Variable(s):
+ *  None.
+ *
+ * Returns:
+ *  int	<interrupt number> or -2 (bogus interrupt)
+ *
+ */
+int
+mv64360_get_irq(struct pt_regs *regs)
+{
+	int irq;
+	int irq_gpp;
+
+#ifdef CONFIG_SMP
+	/*
+	 * Second CPU gets only doorbell (message) interrupts.
+	 * The doorbell interrupt is BIT28 in the main interrupt low cause reg.
+	 */
+	int cpu_nr = smp_processor_id();
+	if (cpu_nr == 1) {
+		if (!(mv64x60_read(&bh, MV64360_IC_MAIN_CAUSE_LO) & (1 << 28)))
+			return -1;
+		return 28;
+	}
+#endif
+
+	irq = mv64x60_read(&bh, MV64360_IC_MAIN_CAUSE_LO);
+	irq = __ilog2((irq & 0x3dfffffe) & ppc_cached_irq_mask[0]);
+
+	if (irq == -1) {
+		irq = mv64x60_read(&bh, MV64360_IC_MAIN_CAUSE_HI);
+		irq = __ilog2((irq & 0x1f0003f7) & ppc_cached_irq_mask[1]);
+
+		if (irq == -1)
+			irq = -2; /* bogus interrupt, should never happen */
+		else {
+			if ((irq >= 24) && (irq < 28)) {
+				irq_gpp = mv64x60_read(&bh,
+					MV64x60_GPP_INTR_CAUSE);
+				irq_gpp = __ilog2(irq_gpp &
+					ppc_cached_irq_mask[2]);
+
+				if (irq_gpp == -1)
+					irq = -2;
+				else {
+					irq = irq_gpp + 64;
+					mv64x60_write(&bh,
+						MV64x60_GPP_INTR_CAUSE,
+						~(1 << (irq - 64)));
+				}
+			}
+			else
+				irq += 32;
+		}
+	}
+
+	(void)mv64x60_read(&bh, MV64x60_GPP_INTR_CAUSE);
+
+	if (irq < 0)
+		return (irq);
+	else
+		return (mv64360_irq_base + irq);
+}
+
+/* mv64360_unmask_irq()
+ *
+ * This function enables an interrupt.
+ *
+ * Input Variable(s):
+ *  unsigned int	interrupt number (IRQ0...IRQ95).
+ *
+ * Output Variable(s):
+ *  None.
+ *
+ * Returns:
+ *  void
+ */
+static void
+mv64360_unmask_irq(unsigned int irq)
+{
+#ifdef CONFIG_SMP
+	/* second CPU gets only doorbell interrupts */
+	if ((irq - mv64360_irq_base) == 28) {
+		mv64x60_set_bits(&bh, MV64360_IC_CPU1_INTR_MASK_LO, (1 << 28));
+		return;
+	}
+#endif
+	irq -= mv64360_irq_base;
+
+	if (irq > 31) {
+		if (irq > 63) /* unmask GPP irq */
+			mv64x60_write(&bh, MV64x60_GPP_INTR_MASK,
+				ppc_cached_irq_mask[2] |= (1 << (irq - 64)));
+		else /* mask high interrupt register */
+			mv64x60_write(&bh, MV64360_IC_CPU0_INTR_MASK_HI,
+				ppc_cached_irq_mask[1] |= (1 << (irq - 32)));
+	}
+	else /* mask low interrupt register */
+		mv64x60_write(&bh, MV64360_IC_CPU0_INTR_MASK_LO,
+			ppc_cached_irq_mask[0] |= (1 << irq));
+
+	(void)mv64x60_read(&bh, MV64x60_GPP_INTR_MASK);
+	return;
+}
+
+/* mv64360_mask_irq()
+ *
+ * This function disables the requested interrupt.
+ *
+ * Input Variable(s):
+ *  unsigned int	interrupt number (IRQ0...IRQ95).
+ *
+ * Output Variable(s):
+ *  None.
+ *
+ * Returns:
+ *  void
+ */
+static void
+mv64360_mask_irq(unsigned int irq)
+{
+#ifdef CONFIG_SMP
+	if ((irq - mv64360_irq_base) == 28) {
+		mv64x60_clr_bits(&bh, MV64360_IC_CPU1_INTR_MASK_LO, (1 << 28));
+		return;
+	}
+#endif
+	irq -= mv64360_irq_base;
+
+	if (irq > 31) {
+		if (irq > 63) /* mask GPP irq */
+			mv64x60_write(&bh, MV64x60_GPP_INTR_MASK,
+				ppc_cached_irq_mask[2] &= ~(1 << (irq - 64)));
+		else /* mask high interrupt register */
+			mv64x60_write(&bh, MV64360_IC_CPU0_INTR_MASK_HI,
+				ppc_cached_irq_mask[1] &= ~(1 << (irq - 32)));
+	}
+	else /* mask low interrupt register */
+		mv64x60_write(&bh, MV64360_IC_CPU0_INTR_MASK_LO,
+			ppc_cached_irq_mask[0] &= ~(1 << irq));
+
+	(void)mv64x60_read(&bh, MV64x60_GPP_INTR_MASK);
+	return;
+}
+
+static irqreturn_t
+mv64360_cpu_error_int_handler(int irq, void *dev_id, struct pt_regs *regs)
+{
+	printk(KERN_ERR "mv64360_cpu_error_int_handler: %s 0x%08x\n",
+		"Error on CPU interface - Cause regiser",
+		mv64x60_read(&bh, MV64x60_CPU_ERR_CAUSE));
+	printk(KERN_ERR "\tCPU error register dump:\n");
+	printk(KERN_ERR "\tAddress low  0x%08x\n",
+	       mv64x60_read(&bh, MV64x60_CPU_ERR_ADDR_LO));
+	printk(KERN_ERR "\tAddress high 0x%08x\n",
+	       mv64x60_read(&bh, MV64x60_CPU_ERR_ADDR_HI));
+	printk(KERN_ERR "\tData low     0x%08x\n",
+	       mv64x60_read(&bh, MV64x60_CPU_ERR_DATA_LO));
+	printk(KERN_ERR "\tData high    0x%08x\n",
+	       mv64x60_read(&bh, MV64x60_CPU_ERR_DATA_HI));
+	printk(KERN_ERR "\tParity       0x%08x\n",
+	       mv64x60_read(&bh, MV64x60_CPU_ERR_PARITY));
+	mv64x60_write(&bh, MV64x60_CPU_ERR_CAUSE, 0);
+	return IRQ_HANDLED;
+}
+
+static irqreturn_t
+mv64360_sram_error_int_handler(int irq, void *dev_id, struct pt_regs *regs)
+{
+	printk(KERN_ERR "mv64360_sram_error_int_handler: %s 0x%08x\n",
+		"Error in internal SRAM - Cause register",
+		mv64x60_read(&bh, MV64360_SRAM_ERR_CAUSE));
+	printk(KERN_ERR "\tSRAM error register dump:\n");
+	printk(KERN_ERR "\tAddress Low  0x%08x\n",
+	       mv64x60_read(&bh, MV64360_SRAM_ERR_ADDR_LO));
+	printk(KERN_ERR "\tAddress High 0x%08x\n",
+	       mv64x60_read(&bh, MV64360_SRAM_ERR_ADDR_HI));
+	printk(KERN_ERR "\tData Low     0x%08x\n",
+	       mv64x60_read(&bh, MV64360_SRAM_ERR_DATA_LO));
+	printk(KERN_ERR "\tData High    0x%08x\n",
+	       mv64x60_read(&bh, MV64360_SRAM_ERR_DATA_HI));
+	printk(KERN_ERR "\tParity       0x%08x\n",
+		mv64x60_read(&bh, MV64360_SRAM_ERR_PARITY));
+	mv64x60_write(&bh, MV64360_SRAM_ERR_CAUSE, 0);
+	return IRQ_HANDLED;
+}
+
+static irqreturn_t
+mv64360_pci_error_int_handler(int irq, void *dev_id, struct pt_regs *regs)
+{
+	u32 val;
+	unsigned int pci_bus = (unsigned int)dev_id;
+
+	if (pci_bus == 0) {	/* Error on PCI 0 */
+		val = mv64x60_read(&bh, MV64x60_PCI0_ERR_CAUSE);
+		printk(KERN_ERR "%s: Error in PCI %d Interface\n",
+			"mv64360_pci_error_int_handler", pci_bus);
+		printk(KERN_ERR "\tPCI %d error register dump:\n", pci_bus);
+		printk(KERN_ERR "\tCause register 0x%08x\n", val);
+		printk(KERN_ERR "\tAddress Low    0x%08x\n",
+		       mv64x60_read(&bh, MV64x60_PCI0_ERR_ADDR_LO));
+		printk(KERN_ERR "\tAddress High   0x%08x\n",
+		       mv64x60_read(&bh, MV64x60_PCI0_ERR_ADDR_HI));
+		printk(KERN_ERR "\tAttribute      0x%08x\n",
+		       mv64x60_read(&bh, MV64x60_PCI0_ERR_DATA_LO));
+		printk(KERN_ERR "\tCommand        0x%08x\n",
+		       mv64x60_read(&bh, MV64x60_PCI0_ERR_CMD));
+		mv64x60_write(&bh, MV64x60_PCI0_ERR_CAUSE, ~val);
+	}
+	if (pci_bus == 1) {	/* Error on PCI 1 */
+		val = mv64x60_read(&bh, MV64x60_PCI1_ERR_CAUSE);
+		printk(KERN_ERR "%s: Error in PCI %d Interface\n",
+			"mv64360_pci_error_int_handler", pci_bus);
+		printk(KERN_ERR "\tPCI %d error register dump:\n", pci_bus);
+		printk(KERN_ERR "\tCause register 0x%08x\n", val);
+		printk(KERN_ERR "\tAddress Low    0x%08x\n",
+		       mv64x60_read(&bh, MV64x60_PCI1_ERR_ADDR_LO));
+		printk(KERN_ERR "\tAddress High   0x%08x\n",
+		       mv64x60_read(&bh, MV64x60_PCI1_ERR_ADDR_HI));
+		printk(KERN_ERR "\tAttribute      0x%08x\n",
+		       mv64x60_read(&bh, MV64x60_PCI1_ERR_DATA_LO));
+		printk(KERN_ERR "\tCommand        0x%08x\n",
+		       mv64x60_read(&bh, MV64x60_PCI1_ERR_CMD));
+		mv64x60_write(&bh, MV64x60_PCI1_ERR_CAUSE, ~val);
+	}
+	return IRQ_HANDLED;
+}
+
+static int __init
+mv64360_register_hdlrs(void)
+{
+	u32	mask;
+	int	rc;
+
+	/* Register CPU interface error interrupt handler */
+	if ((rc = request_irq(MV64x60_IRQ_CPU_ERR,
+		mv64360_cpu_error_int_handler, SA_INTERRUPT, CPU_INTR_STR, 0)))
+		printk(KERN_WARNING "Can't register cpu error handler: %d", rc);
+
+	mv64x60_write(&bh, MV64x60_CPU_ERR_MASK, 0);
+	mv64x60_write(&bh, MV64x60_CPU_ERR_MASK, 0x000000ff);
+
+	/* Register internal SRAM error interrupt handler */
+	if ((rc = request_irq(MV64360_IRQ_SRAM_PAR_ERR,
+		mv64360_sram_error_int_handler,SA_INTERRUPT,SRAM_INTR_STR, 0)))
+		printk(KERN_WARNING "Can't register SRAM error handler: %d",rc);
+
+	/*
+	 * Bit 0 reserved on 64360 and erratum FEr PCI-#11 (PCI internal
+	 * data parity error set incorrectly) on rev 0 & 1 of 64460 requires
+	 * bit 0 to be cleared.
+	 */
+	mask = 0x00a50c24;
+
+	if ((mv64x60_get_bridge_type() == MV64x60_TYPE_MV64460) &&
+		(mv64x60_get_bridge_rev() > 1))
+		mask |= 0x1;	/* enable DPErr on 64460 */
+
+	/* Register PCI 0 error interrupt handler */
+	if ((rc = request_irq(MV64360_IRQ_PCI0, mv64360_pci_error_int_handler,
+		    SA_INTERRUPT, PCI0_INTR_STR, (void *)0)))
+		printk(KERN_WARNING "Can't register pci 0 error handler: %d",
+			rc);
+
+	mv64x60_write(&bh, MV64x60_PCI0_ERR_MASK, 0);
+	mv64x60_write(&bh, MV64x60_PCI0_ERR_MASK, mask);
+
+	/* Register PCI 1 error interrupt handler */
+	if ((rc = request_irq(MV64360_IRQ_PCI1, mv64360_pci_error_int_handler,
+		    SA_INTERRUPT, PCI1_INTR_STR, (void *)1)))
+		printk(KERN_WARNING "Can't register pci 1 error handler: %d",
+			rc);
+
+	mv64x60_write(&bh, MV64x60_PCI1_ERR_MASK, 0);
+	mv64x60_write(&bh, MV64x60_PCI1_ERR_MASK, mask);
+
+	return 0;
+}
+
+arch_initcall(mv64360_register_hdlrs);
diff -Nru a/arch/ppc/syslib/mv64x60.c b/arch/ppc/syslib/mv64x60.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/ppc/syslib/mv64x60.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,2254 @@
+/*
+ * arch/ppc/syslib/mv64x60.c
+ *
+ * Common routines for the Marvell/Galileo Discovery line of host bridges
+ * (gt64260, mv64360, mv64460, ...).
+ *
+ * Author: Mark A. Greer <mgreer@mvista.com>
+ *
+ * 2004 (c) MontaVista, Software, Inc.  This file is licensed under
+ * the terms of the GNU General Public License version 2.  This program
+ * is licensed "as is" without any warranty of any kind, whether express
+ * or implied.
+ */
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/pci.h>
+#include <linux/slab.h>
+#include <linux/module.h>
+#include <linux/string.h>
+#include <linux/bootmem.h>
+#include <linux/spinlock.h>
+#include <linux/mv643xx.h>
+
+#include <asm/byteorder.h>
+#include <asm/io.h>
+#include <asm/irq.h>
+#include <asm/uaccess.h>
+#include <asm/machdep.h>
+#include <asm/pci-bridge.h>
+#include <asm/delay.h>
+#include <asm/mv64x60.h>
+
+
+u8		mv64x60_pci_exclude_bridge = 1;
+spinlock_t	mv64x60_lock; /* Only really used by PIC code once init done */
+
+static u32	mv64x60_bridge_pbase = 0;
+static u32	mv64x60_bridge_vbase = 0;
+static u32	mv64x60_bridge_type = MV64x60_TYPE_INVALID;
+static u32	mv64x60_bridge_rev = 0;
+
+static u32 gt64260_translate_size(u32 base, u32 size, u32 num_bits);
+static u32 gt64260_untranslate_size(u32 base, u32 size, u32 num_bits);
+static void gt64260_set_pci2mem_window(struct pci_controller *hose, u32 bus,
+	u32 window, u32 base);
+static void gt64260_set_pci2regs_window(struct mv64x60_handle *bh,
+	struct pci_controller *hose, u32 bus, u32 base);
+static u32 gt64260_is_enabled_32bit(struct mv64x60_handle *bh, u32 window);
+static void gt64260_enable_window_32bit(struct mv64x60_handle *bh, u32 window);
+static void gt64260_disable_window_32bit(struct mv64x60_handle *bh, u32 window);
+static void gt64260_enable_window_64bit(struct mv64x60_handle *bh, u32 window);
+static void gt64260_disable_window_64bit(struct mv64x60_handle *bh, u32 window);
+static void gt64260_disable_all_windows(struct mv64x60_handle *bh,
+	struct mv64x60_setup_info *si);
+static void gt64260a_chip_specific_init(struct mv64x60_handle *bh,
+	struct mv64x60_setup_info *si);
+static void gt64260b_chip_specific_init(struct mv64x60_handle *bh,
+	struct mv64x60_setup_info *si);
+
+static u32 mv64360_translate_size(u32 base, u32 size, u32 num_bits);
+static u32 mv64360_untranslate_size(u32 base, u32 size, u32 num_bits);
+static void mv64360_set_pci2mem_window(struct pci_controller *hose, u32 bus,
+	u32 window, u32 base);
+static void mv64360_set_pci2regs_window(struct mv64x60_handle *bh,
+	struct pci_controller *hose, u32 bus, u32 base);
+static u32 mv64360_is_enabled_32bit(struct mv64x60_handle *bh, u32 window);
+static void mv64360_enable_window_32bit(struct mv64x60_handle *bh, u32 window);
+static void mv64360_disable_window_32bit(struct mv64x60_handle *bh, u32 window);
+static void mv64360_enable_window_64bit(struct mv64x60_handle *bh, u32 window);
+static void mv64360_disable_window_64bit(struct mv64x60_handle *bh, u32 window);
+static void mv64360_disable_all_windows(struct mv64x60_handle *bh,
+	struct mv64x60_setup_info *si);
+static void mv64360_config_io2mem_windows(struct mv64x60_handle *bh,
+	struct mv64x60_setup_info *si,
+	u32 mem_windows[MV64x60_CPU2MEM_WINDOWS][2]);
+static void mv64360_set_mpsc2regs_window(struct mv64x60_handle *bh, u32 base);
+static void mv64360_chip_specific_init(struct mv64x60_handle *bh,
+	struct mv64x60_setup_info *si);
+static void mv64460_chip_specific_init(struct mv64x60_handle *bh,
+	struct mv64x60_setup_info *si);
+
+
+/*
+ * Define tables that have the chip-specific info for each type of
+ * Marvell bridge chip.
+ */
+static struct mv64x60_chip_info gt64260a_ci __initdata = { /* GT64260A */
+	.translate_size		= gt64260_translate_size,
+	.untranslate_size	= gt64260_untranslate_size,
+	.set_pci2mem_window	= gt64260_set_pci2mem_window,
+	.set_pci2regs_window    = gt64260_set_pci2regs_window,
+	.is_enabled_32bit	= gt64260_is_enabled_32bit,
+	.enable_window_32bit	= gt64260_enable_window_32bit,
+	.disable_window_32bit	= gt64260_disable_window_32bit,
+	.enable_window_64bit	= gt64260_enable_window_64bit,
+	.disable_window_64bit	= gt64260_disable_window_64bit,
+	.disable_all_windows	= gt64260_disable_all_windows,
+	.chip_specific_init	= gt64260a_chip_specific_init,
+	.window_tab_32bit	= gt64260_32bit_windows,
+	.window_tab_64bit	= gt64260_64bit_windows,
+};
+
+static struct mv64x60_chip_info gt64260b_ci __initdata = { /* GT64260B */
+	.translate_size		= gt64260_translate_size,
+	.untranslate_size	= gt64260_untranslate_size,
+	.set_pci2mem_window	= gt64260_set_pci2mem_window,
+	.set_pci2regs_window    = gt64260_set_pci2regs_window,
+	.is_enabled_32bit	= gt64260_is_enabled_32bit,
+	.enable_window_32bit	= gt64260_enable_window_32bit,
+	.disable_window_32bit	= gt64260_disable_window_32bit,
+	.enable_window_64bit	= gt64260_enable_window_64bit,
+	.disable_window_64bit	= gt64260_disable_window_64bit,
+	.disable_all_windows	= gt64260_disable_all_windows,
+	.chip_specific_init	= gt64260b_chip_specific_init,
+	.window_tab_32bit	= gt64260_32bit_windows,
+	.window_tab_64bit	= gt64260_64bit_windows,
+};
+
+static struct mv64x60_chip_info mv64360_ci __initdata = { /* MV64360 */
+	.translate_size		= mv64360_translate_size,
+	.untranslate_size	= mv64360_untranslate_size,
+	.set_pci2mem_window	= mv64360_set_pci2mem_window,
+	.set_pci2regs_window    = mv64360_set_pci2regs_window,
+	.is_enabled_32bit	= mv64360_is_enabled_32bit,
+	.enable_window_32bit	= mv64360_enable_window_32bit,
+	.disable_window_32bit	= mv64360_disable_window_32bit,
+	.enable_window_64bit	= mv64360_enable_window_64bit,
+	.disable_window_64bit	= mv64360_disable_window_64bit,
+	.disable_all_windows	= mv64360_disable_all_windows,
+	.config_io2mem_windows	= mv64360_config_io2mem_windows,
+	.set_mpsc2regs_window	= mv64360_set_mpsc2regs_window,
+	.chip_specific_init	= mv64360_chip_specific_init,
+	.window_tab_32bit	= mv64360_32bit_windows,
+	.window_tab_64bit	= mv64360_64bit_windows,
+};
+
+static struct mv64x60_chip_info mv64460_ci __initdata = { /* MV64460 */
+	.translate_size		= mv64360_translate_size,
+	.untranslate_size	= mv64360_untranslate_size,
+	.set_pci2mem_window	= mv64360_set_pci2mem_window,
+	.set_pci2regs_window    = mv64360_set_pci2regs_window,
+	.is_enabled_32bit	= mv64360_is_enabled_32bit,
+	.enable_window_32bit	= mv64360_enable_window_32bit,
+	.disable_window_32bit	= mv64360_disable_window_32bit,
+	.enable_window_64bit	= mv64360_enable_window_64bit,
+	.disable_window_64bit	= mv64360_disable_window_64bit,
+	.disable_all_windows	= mv64360_disable_all_windows,
+	.config_io2mem_windows	= mv64360_config_io2mem_windows,
+	.set_mpsc2regs_window	= mv64360_set_mpsc2regs_window,
+	.chip_specific_init	= mv64460_chip_specific_init,
+	.window_tab_32bit	= mv64360_32bit_windows,
+	.window_tab_64bit	= mv64360_64bit_windows,
+};
+
+/*
+ *****************************************************************************
+ *
+ *	Platform Device Definitions
+ *
+ *****************************************************************************
+ */
+#ifdef CONFIG_SERIAL_MPSC
+static struct mpsc_shared_pd_dd mv64x60_mpsc_shared_pd_dd = {
+	.mrr_val		= 0x3ffffe38,
+	.rcrr_val		= 0,
+	.tcrr_val		= 0,
+	.intr_cause_val		= 0,
+	.intr_mask_val		= 0,
+};
+
+static struct resource mv64x60_mpsc_shared_resources[] = {
+	/* Do not change the order of the IORESOURCE_MEM resources */
+	[0] = {
+		.name	= "mpsc routing base",
+		.start	= MV64x60_MPSC_ROUTING_OFFSET,
+		.end	= MV64x60_MPSC_ROUTING_OFFSET +
+			MPSC_ROUTING_REG_BLOCK_SIZE - 1,
+		.flags	= IORESOURCE_MEM,
+	},
+	[1] = {
+		.name	= "sdma intr base",
+		.start	= MV64x60_SDMA_INTR_OFFSET,
+		.end	= MV64x60_SDMA_INTR_OFFSET +
+			MPSC_SDMA_INTR_REG_BLOCK_SIZE - 1,
+		.flags	= IORESOURCE_MEM,
+	},
+};
+
+static struct platform_device mpsc_shared_device = { /* Shared device */
+	.name		= MPSC_SHARED_NAME,
+	.id		= 0,
+	.num_resources	= ARRAY_SIZE(mv64x60_mpsc_shared_resources),
+	.resource	= mv64x60_mpsc_shared_resources,
+	.dev = {
+		.driver_data = &mv64x60_mpsc_shared_pd_dd,
+	},
+};
+
+static struct mpsc_pd_dd mv64x60_mpsc0_pd_dd = {
+	.mirror_regs		= 0,
+	.cache_mgmt		= 0,
+	.max_idle		= 0,
+	.default_baud		= 9600,
+	.default_bits		= 8,
+	.default_parity		= 'n',
+	.default_flow		= 'n',
+	.chr_1_val		= 0x00000000,
+	.chr_2_val		= 0x00000000,
+	.chr_10_val		= 0x00000003,
+	.mpcr_val		= 0,
+	.bcr_val		= 0,
+	.brg_can_tune		= 0,
+	.brg_clk_src		= 8,		/* Default to TCLK */
+	.brg_clk_freq		= 100000000,	/* Default to 100 MHz */
+};
+
+static struct resource mv64x60_mpsc0_resources[] = {
+	/* Do not change the order of the IORESOURCE_MEM resources */
+	[0] = {
+		.name	= "mpsc 0 base",
+		.start	= MV64x60_MPSC_0_OFFSET,
+		.end	= MV64x60_MPSC_0_OFFSET + MPSC_REG_BLOCK_SIZE - 1,
+		.flags	= IORESOURCE_MEM,
+	},
+	[1] = {
+		.name	= "sdma 0 base",
+		.start	= MV64x60_SDMA_0_OFFSET,
+		.end	= MV64x60_SDMA_0_OFFSET + MPSC_SDMA_REG_BLOCK_SIZE - 1,
+		.flags	= IORESOURCE_MEM,
+	},
+	[2] = {
+		.name	= "brg 0 base",
+		.start	= MV64x60_BRG_0_OFFSET,
+		.end	= MV64x60_BRG_0_OFFSET + MPSC_BRG_REG_BLOCK_SIZE - 1,
+		.flags	= IORESOURCE_MEM,
+	},
+	[3] = {
+		.name	= "sdma 0 irq",
+		.start	= MV64x60_IRQ_SDMA_0,
+		.end	= MV64x60_IRQ_SDMA_0,
+		.flags	= IORESOURCE_IRQ,
+	},
+};
+
+static struct platform_device mpsc0_device = {
+	.name		= MPSC_CTLR_NAME,
+	.id		= 0,
+	.num_resources	= ARRAY_SIZE(mv64x60_mpsc0_resources),
+	.resource	= mv64x60_mpsc0_resources,
+	.dev = {
+		.driver_data = &mv64x60_mpsc0_pd_dd,
+	},
+};
+
+static struct mpsc_pd_dd mv64x60_mpsc1_pd_dd = {
+	.mirror_regs		= 0,
+	.cache_mgmt		= 0,
+	.max_idle		= 0,
+	.default_baud		= 9600,
+	.default_bits		= 8,
+	.default_parity		= 'n',
+	.default_flow		= 'n',
+	.chr_1_val		= 0x00000000,
+	.chr_1_val		= 0x00000000,
+	.chr_2_val		= 0x00000000,
+	.chr_10_val		= 0x00000003,
+	.mpcr_val		= 0,
+	.bcr_val		= 0,
+	.brg_can_tune		= 0,
+	.brg_clk_src		= 8,		/* Default to TCLK */
+	.brg_clk_freq		= 100000000,	/* Default to 100 MHz */
+};
+
+static struct resource mv64x60_mpsc1_resources[] = {
+	/* Do not change the order of the IORESOURCE_MEM resources */
+	[0] = {
+		.name	= "mpsc 1 base",
+		.start	= MV64x60_MPSC_1_OFFSET,
+		.end	= MV64x60_MPSC_1_OFFSET + MPSC_REG_BLOCK_SIZE - 1,
+		.flags	= IORESOURCE_MEM,
+	},
+	[1] = {
+		.name	= "sdma 1 base",
+		.start	= MV64x60_SDMA_1_OFFSET,
+		.end	= MV64x60_SDMA_1_OFFSET + MPSC_SDMA_REG_BLOCK_SIZE - 1,
+		.flags	= IORESOURCE_MEM,
+	},
+	[2] = {
+		.name	= "brg 1 base",
+		.start	= MV64x60_BRG_1_OFFSET,
+		.end	= MV64x60_BRG_1_OFFSET + MPSC_BRG_REG_BLOCK_SIZE - 1,
+		.flags	= IORESOURCE_MEM,
+	},
+	[3] = {
+		.name	= "sdma 1 irq",
+		.start	= MV64360_IRQ_SDMA_1,
+		.end	= MV64360_IRQ_SDMA_1,
+		.flags	= IORESOURCE_IRQ,
+	},
+};
+
+static struct platform_device mpsc1_device = {
+	.name		= MPSC_CTLR_NAME,
+	.id		= 1,
+	.num_resources	= ARRAY_SIZE(mv64x60_mpsc1_resources),
+	.resource	= mv64x60_mpsc1_resources,
+	.dev = {
+		.driver_data = &mv64x60_mpsc1_pd_dd,
+	},
+};
+#endif
+
+static struct platform_device *mv64x60_pd_devs[] __initdata = {
+#ifdef CONFIG_SERIAL_MPSC
+	&mpsc_shared_device,
+	&mpsc0_device,
+	&mpsc1_device,
+#endif
+};
+
+/*
+ *****************************************************************************
+ *
+ *	Bridge Initialization Routines
+ *
+ *****************************************************************************
+ */
+/*
+ * mv64x60_init()
+ *
+ * Initialze the bridge based on setting passed in via 'si'.  The bridge
+ * handle, 'bh', will be set so that it can be used to make subsequent
+ * calls to routines in this file.
+ */
+int __init
+mv64x60_init(struct mv64x60_handle *bh, struct mv64x60_setup_info *si)
+{
+	u32	mem_windows[MV64x60_CPU2MEM_WINDOWS][2];
+
+	if (ppc_md.progress)
+		ppc_md.progress("mv64x60 initialization", 0x0);
+
+	spin_lock_init(&mv64x60_lock);
+	mv64x60_early_init(bh, si);
+
+	if (mv64x60_get_type(bh) || mv64x60_setup_for_chip(bh)) {
+		iounmap((void *)bh->v_base);
+		bh->v_base = 0;
+		if (ppc_md.progress)
+			ppc_md.progress("mv64x60_init: Can't determine chip",0);
+		return -1;
+	}
+
+	bh->ci->disable_all_windows(bh, si);
+	mv64x60_get_mem_windows(bh, mem_windows);
+	mv64x60_config_cpu2mem_windows(bh, si, mem_windows);
+
+	if (bh->ci->config_io2mem_windows)
+		bh->ci->config_io2mem_windows(bh, si, mem_windows);
+	if (bh->ci->set_mpsc2regs_window)
+		bh->ci->set_mpsc2regs_window(bh, si->phys_reg_base);
+
+	if (si->pci_1.enable_bus) {
+		bh->io_base_b = (u32)ioremap(si->pci_1.pci_io.cpu_base,
+			si->pci_1.pci_io.size);
+		isa_io_base = bh->io_base_b;
+	}
+
+	if (si->pci_0.enable_bus) {
+		bh->io_base_a = (u32)ioremap(si->pci_0.pci_io.cpu_base,
+			si->pci_0.pci_io.size);
+		isa_io_base = bh->io_base_a;
+
+		mv64x60_alloc_hose(bh, MV64x60_PCI0_CONFIG_ADDR,
+			MV64x60_PCI0_CONFIG_DATA, &bh->hose_a);
+		mv64x60_config_resources(bh->hose_a, &si->pci_0, bh->io_base_a);
+		mv64x60_config_pci_params(bh->hose_a, &si->pci_0);
+
+		mv64x60_config_cpu2pci_windows(bh, &si->pci_0, 0);
+		mv64x60_config_pci2mem_windows(bh, bh->hose_a, &si->pci_0, 0,
+			mem_windows);
+		bh->ci->set_pci2regs_window(bh, bh->hose_a, 0,
+			si->phys_reg_base);
+	}
+
+	if (si->pci_1.enable_bus) {
+		mv64x60_alloc_hose(bh, MV64x60_PCI1_CONFIG_ADDR,
+			MV64x60_PCI1_CONFIG_DATA, &bh->hose_b);
+		mv64x60_config_resources(bh->hose_b, &si->pci_1, bh->io_base_b);
+		mv64x60_config_pci_params(bh->hose_b, &si->pci_1);
+
+		mv64x60_config_cpu2pci_windows(bh, &si->pci_1, 1);
+		mv64x60_config_pci2mem_windows(bh, bh->hose_b, &si->pci_1, 1,
+			mem_windows);
+		bh->ci->set_pci2regs_window(bh, bh->hose_b, 1,
+			si->phys_reg_base);
+	}
+
+	bh->ci->chip_specific_init(bh, si);
+	mv64x60_pd_fixup(bh, mv64x60_pd_devs, ARRAY_SIZE(mv64x60_pd_devs));
+
+	return 0;
+}
+
+/*
+ * mv64x60_early_init()
+ *
+ * Do some bridge work that must take place before we start messing with
+ * the bridge for real.
+ */
+void __init
+mv64x60_early_init(struct mv64x60_handle *bh, struct mv64x60_setup_info *si)
+{
+	struct pci_controller	hose_a, hose_b;
+
+	memset(bh, 0, sizeof(*bh));
+
+	bh->p_base = si->phys_reg_base;
+	bh->v_base = (u32)ioremap(bh->p_base, MV64x60_INTERNAL_SPACE_SIZE);
+
+	mv64x60_bridge_pbase = bh->p_base;
+	mv64x60_bridge_vbase = bh->v_base;
+
+	/* Assuming pci mode [reserved] bits 4:5 on 64260 are 0 */
+	bh->pci_mode_a = mv64x60_read(bh, MV64x60_PCI0_MODE) &
+		MV64x60_PCIMODE_MASK;
+	bh->pci_mode_b = mv64x60_read(bh, MV64x60_PCI1_MODE) &
+		MV64x60_PCIMODE_MASK;
+
+	/* Need temporary hose structs to call mv64x60_set_bus() */
+	memset(&hose_a, 0, sizeof(hose_a));
+	memset(&hose_b, 0, sizeof(hose_b));
+	setup_indirect_pci_nomap(&hose_a, bh->v_base + MV64x60_PCI0_CONFIG_ADDR,
+		bh->v_base + MV64x60_PCI0_CONFIG_DATA);
+	setup_indirect_pci_nomap(&hose_b, bh->v_base + MV64x60_PCI1_CONFIG_ADDR,
+		bh->v_base + MV64x60_PCI1_CONFIG_DATA);
+	bh->hose_a = &hose_a;
+	bh->hose_b = &hose_b;
+
+	mv64x60_set_bus(bh, 0, 0);
+	mv64x60_set_bus(bh, 1, 0);
+
+	bh->hose_a = NULL;
+	bh->hose_b = NULL;
+
+	/* Clear bit 0 of PCI addr decode control so PCI->CPU remap 1:1 */
+	mv64x60_clr_bits(bh, MV64x60_PCI0_PCI_DECODE_CNTL, 0x00000001);
+	mv64x60_clr_bits(bh, MV64x60_PCI1_PCI_DECODE_CNTL, 0x00000001);
+
+	/* Bit 12 MUST be 0; set bit 27--don't auto-update cpu remap regs */
+	mv64x60_clr_bits(bh, MV64x60_CPU_CONFIG, (1<<12));
+	mv64x60_set_bits(bh, MV64x60_CPU_CONFIG, (1<<27));
+
+	mv64x60_set_bits(bh, MV64x60_PCI0_TO_RETRY, 0xffff);
+	mv64x60_set_bits(bh, MV64x60_PCI1_TO_RETRY, 0xffff);
+
+	return;
+}
+
+/*
+ *****************************************************************************
+ *
+ *	Window Config Routines
+ *
+ *****************************************************************************
+ */
+/*
+ * mv64x60_get_32bit_window()
+ *
+ * Determine the base address and size of a 32-bit window on the bridge.
+ */
+void __init
+mv64x60_get_32bit_window(struct mv64x60_handle *bh, u32 window,
+	u32 *base, u32 *size)
+{
+	u32	val, base_reg, size_reg, base_bits, size_bits;
+	u32	(*get_from_field)(u32 val, u32 num_bits);
+
+	base_reg = bh->ci->window_tab_32bit[window].base_reg;
+
+	if (base_reg != 0) {
+		size_reg  = bh->ci->window_tab_32bit[window].size_reg;
+		base_bits = bh->ci->window_tab_32bit[window].base_bits;
+		size_bits = bh->ci->window_tab_32bit[window].size_bits;
+		get_from_field= bh->ci->window_tab_32bit[window].get_from_field;
+
+		val = mv64x60_read(bh, base_reg);
+		*base = get_from_field(val, base_bits);
+
+		if (size_reg != 0) {
+			val = mv64x60_read(bh, size_reg);
+			val = get_from_field(val, size_bits);
+			*size = bh->ci->untranslate_size(*base, val, size_bits);
+		}
+		else
+			*size = 0;
+	}
+	else {
+		*base = 0;
+		*size = 0;
+	}
+
+	pr_debug("get 32bit window: %d, base: 0x%x, size: 0x%x\n",
+		window, *base, *size);
+
+	return;
+}
+
+/*
+ * mv64x60_set_32bit_window()
+ *
+ * Set the base address and size of a 32-bit window on the bridge.
+ */
+void __init
+mv64x60_set_32bit_window(struct mv64x60_handle *bh, u32 window,
+	u32 base, u32 size, u32 other_bits)
+{
+	u32	val, base_reg, size_reg, base_bits, size_bits;
+	u32	(*map_to_field)(u32 val, u32 num_bits);
+
+	pr_debug("set 32bit window: %d, base: 0x%x, size: 0x%x, other: 0x%x\n",
+		window, base, size, other_bits);
+
+	base_reg = bh->ci->window_tab_32bit[window].base_reg;
+
+	if (base_reg != 0) {
+		size_reg  = bh->ci->window_tab_32bit[window].size_reg;
+		base_bits = bh->ci->window_tab_32bit[window].base_bits;
+		size_bits = bh->ci->window_tab_32bit[window].size_bits;
+		map_to_field = bh->ci->window_tab_32bit[window].map_to_field;
+
+		val = map_to_field(base, base_bits) | other_bits;
+		mv64x60_write(bh, base_reg, val);
+
+		if (size_reg != 0) {
+			val = bh->ci->translate_size(base, size, size_bits);
+			val = map_to_field(val, size_bits);
+			mv64x60_write(bh, size_reg, val);
+		}
+
+		(void)mv64x60_read(bh, base_reg); /* Flush FIFO */
+	}
+
+	return;
+}
+
+/*
+ * mv64x60_get_64bit_window()
+ *
+ * Determine the base address and size of a 64-bit window on the bridge.
+ */
+void __init
+mv64x60_get_64bit_window(struct mv64x60_handle *bh, u32 window,
+	u32 *base_hi, u32 *base_lo, u32 *size)
+{
+	u32	val, base_lo_reg, size_reg, base_lo_bits, size_bits;
+	u32	(*get_from_field)(u32 val, u32 num_bits);
+
+	base_lo_reg = bh->ci->window_tab_64bit[window].base_lo_reg;
+
+	if (base_lo_reg != 0) {
+		size_reg = bh->ci->window_tab_64bit[window].size_reg;
+		base_lo_bits = bh->ci->window_tab_64bit[window].base_lo_bits;
+		size_bits = bh->ci->window_tab_64bit[window].size_bits;
+		get_from_field= bh->ci->window_tab_64bit[window].get_from_field;
+
+		*base_hi = mv64x60_read(bh,
+			bh->ci->window_tab_64bit[window].base_hi_reg);
+
+		val = mv64x60_read(bh, base_lo_reg);
+		*base_lo = get_from_field(val, base_lo_bits);
+
+		if (size_reg != 0) {
+			val = mv64x60_read(bh, size_reg);
+			val = get_from_field(val, size_bits);
+			*size = bh->ci->untranslate_size(*base_lo, val,
+								size_bits);
+		}
+		else
+			*size = 0;
+	}
+	else {
+		*base_hi = 0;
+		*base_lo = 0;
+		*size = 0;
+	}
+
+	pr_debug("get 64bit window: %d, base hi: 0x%x, base lo: 0x%x, "
+		"size: 0x%x\n", window, *base_hi, *base_lo, *size);
+
+	return;
+}
+
+/*
+ * mv64x60_set_64bit_window()
+ *
+ * Set the base address and size of a 64-bit window on the bridge.
+ */
+void __init
+mv64x60_set_64bit_window(struct mv64x60_handle *bh, u32 window,
+			u32 base_hi, u32 base_lo, u32 size, u32 other_bits)
+{
+	u32	val, base_lo_reg, size_reg, base_lo_bits, size_bits;
+	u32	(*map_to_field)(u32 val, u32 num_bits);
+
+	pr_debug("set 64bit window: %d, base hi: 0x%x, base lo: 0x%x, "
+		"size: 0x%x, other: 0x%x\n",
+		window, base_hi, base_lo, size, other_bits);
+
+	base_lo_reg = bh->ci->window_tab_64bit[window].base_lo_reg;
+
+	if (base_lo_reg != 0) {
+		size_reg = bh->ci->window_tab_64bit[window].size_reg;
+		base_lo_bits = bh->ci->window_tab_64bit[window].base_lo_bits;
+		size_bits = bh->ci->window_tab_64bit[window].size_bits;
+		map_to_field = bh->ci->window_tab_64bit[window].map_to_field;
+
+		mv64x60_write(bh, bh->ci->window_tab_64bit[window].base_hi_reg,
+			base_hi);
+
+		val = map_to_field(base_lo, base_lo_bits) | other_bits;
+		mv64x60_write(bh, base_lo_reg, val);
+
+		if (size_reg != 0) {
+			val = bh->ci->translate_size(base_lo, size, size_bits);
+			val = map_to_field(val, size_bits);
+			mv64x60_write(bh, size_reg, val);
+		}
+
+		(void)mv64x60_read(bh, base_lo_reg); /* Flush FIFO */
+	}
+
+	return;
+}
+
+/*
+ * mv64x60_mask()
+ *
+ * Take the high-order 'num_bits' of 'val' & mask off low bits.
+ */
+u32 __init
+mv64x60_mask(u32 val, u32 num_bits)
+{
+	return val & (0xffffffff << (32 - num_bits));
+}
+
+/*
+ * mv64x60_mask_shift_left()
+ *
+ * Take the low-order 'num_bits' of 'val', shift left to align at bit 31 (MSB).
+ */
+u32 __init
+mv64x60_shift_left(u32 val, u32 num_bits)
+{
+	return val << (32 - num_bits);
+}
+
+/*
+ * mv64x60_shift_right()
+ *
+ * Take the high-order 'num_bits' of 'val', shift right to align at bit 0 (LSB).
+ */
+u32 __init
+mv64x60_shift_right(u32 val, u32 num_bits)
+{
+	return val >> (32 - num_bits);
+}
+
+/*
+ *****************************************************************************
+ *
+ *	Chip Identification Routines
+ *
+ *****************************************************************************
+ */
+/*
+ * mv64x60_get_type()
+ *
+ * Determine the type of bridge chip we have.
+ */
+int __init
+mv64x60_get_type(struct mv64x60_handle *bh)
+{
+	struct pci_controller hose;
+	u16	val;
+	u8	save_exclude;
+
+	memset(&hose, 0, sizeof(hose));
+	setup_indirect_pci_nomap(&hose, bh->v_base + MV64x60_PCI0_CONFIG_ADDR,
+		bh->v_base + MV64x60_PCI0_CONFIG_DATA);
+
+	save_exclude = mv64x60_pci_exclude_bridge;
+	mv64x60_pci_exclude_bridge = 0;
+	/* Sanity check of bridge's Vendor ID */
+	early_read_config_word(&hose, 0, PCI_DEVFN(0, 0), PCI_VENDOR_ID, &val);
+
+	if (val != PCI_VENDOR_ID_MARVELL) {
+		mv64x60_pci_exclude_bridge = save_exclude;
+		return -1;
+	}
+
+	/* Get the revision of the chip */
+	early_read_config_word(&hose, 0, PCI_DEVFN(0, 0), PCI_CLASS_REVISION,
+		&val);
+	bh->rev = (u32) (val & 0xff);
+
+	/* Figure out the type of Marvell bridge it is */
+	early_read_config_word(&hose, 0, PCI_DEVFN(0, 0), PCI_DEVICE_ID, &val);
+	mv64x60_pci_exclude_bridge = save_exclude;
+
+	switch (val) {
+	case PCI_DEVICE_ID_MARVELL_GT64260:
+		switch (bh->rev) {
+		case GT64260_REV_A:
+			bh->type = MV64x60_TYPE_GT64260A;
+			break;
+
+		default:
+			printk(KERN_WARNING "Unsupported GT64260 rev %04x\n",
+				bh->rev);
+			/* Assume its similar to a 'B' rev and fallthru */
+		case GT64260_REV_B:
+			bh->type = MV64x60_TYPE_GT64260B;
+			break;
+		}
+		break;
+
+	case PCI_DEVICE_ID_MARVELL_MV64360:
+		/* Marvell won't tell me how to distinguish a 64361 & 64362 */
+		bh->type = MV64x60_TYPE_MV64360;
+		break;
+
+	case PCI_DEVICE_ID_MARVELL_MV64460:
+		bh->type = MV64x60_TYPE_MV64460;
+		break;
+
+	default:
+		printk(KERN_ERR "Unknown Marvell bridge type %04x\n", val);
+		return -1;
+	}
+
+	/* Hang onto bridge type & rev for PIC code */
+	mv64x60_bridge_type = bh->type;
+	mv64x60_bridge_rev = bh->rev;
+
+	return 0;
+}
+
+/*
+ * mv64x60_setup_for_chip()
+ *
+ * Set 'bh' to use the proper set of routine for the bridge chip that we have.
+ */
+int __init
+mv64x60_setup_for_chip(struct mv64x60_handle *bh)
+{
+	int	rc = 0;
+
+	/* Set up chip-specific info based on the chip/bridge type */
+	switch(bh->type) {
+	case MV64x60_TYPE_GT64260A:
+		bh->ci = &gt64260a_ci;
+		break;
+
+	case MV64x60_TYPE_GT64260B:
+		bh->ci = &gt64260b_ci;
+		break;
+
+	case MV64x60_TYPE_MV64360:
+		bh->ci = &mv64360_ci;
+		break;
+
+	case MV64x60_TYPE_MV64460:
+		bh->ci = &mv64460_ci;
+		break;
+
+	case MV64x60_TYPE_INVALID:
+	default:
+		if (ppc_md.progress)
+			ppc_md.progress("mv64x60: Unsupported bridge", 0x0);
+		printk(KERN_ERR "mv64x60: Unsupported bridge\n");
+		rc = -1;
+	}
+
+	return rc;
+}
+
+/*
+ * mv64x60_get_bridge_vbase()
+ *
+ * Return the virtual address of the bridge's registers.
+ */
+u32
+mv64x60_get_bridge_vbase(void)
+{
+	return mv64x60_bridge_vbase;
+}
+
+/*
+ * mv64x60_get_bridge_type()
+ *
+ * Return the type of bridge on the platform.
+ */
+u32
+mv64x60_get_bridge_type(void)
+{
+	return mv64x60_bridge_type;
+}
+
+/*
+ * mv64x60_get_bridge_rev()
+ *
+ * Return the revision of the bridge on the platform.
+ */
+u32
+mv64x60_get_bridge_rev(void)
+{
+	return mv64x60_bridge_rev;
+}
+
+/*
+ *****************************************************************************
+ *
+ *	System Memory Window Related Routines
+ *
+ *****************************************************************************
+ */
+/*
+ * mv64x60_get_mem_size()
+ *
+ * Calculate the amount of memory that the memory controller is set up for.
+ * This should only be used by board-specific code if there is no other
+ * way to determine the amount of memory in the system.
+ */
+u32 __init
+mv64x60_get_mem_size(u32 bridge_base, u32 chip_type)
+{
+	struct mv64x60_handle	bh;
+	u32			mem_windows[MV64x60_CPU2MEM_WINDOWS][2];
+	u32			rc = 0;
+
+	memset(&bh, 0, sizeof(bh));
+
+	bh.type = chip_type;
+	bh.v_base = bridge_base;
+
+	if (!mv64x60_setup_for_chip(&bh)) {
+		mv64x60_get_mem_windows(&bh, mem_windows);
+		rc = mv64x60_calc_mem_size(&bh, mem_windows);
+	}
+
+	return rc;
+}
+
+/*
+ * mv64x60_get_mem_windows()
+ *
+ * Get the values in the memory controller & return in the 'mem_windows' array.
+ */
+void __init
+mv64x60_get_mem_windows(struct mv64x60_handle *bh,
+	u32 mem_windows[MV64x60_CPU2MEM_WINDOWS][2])
+{
+	u32	i, win;
+
+	for (win=MV64x60_CPU2MEM_0_WIN,i=0;win<=MV64x60_CPU2MEM_3_WIN;win++,i++)
+		if (bh->ci->is_enabled_32bit(bh, win))
+			mv64x60_get_32bit_window(bh, win,
+				&mem_windows[i][0], &mem_windows[i][1]);
+		else {
+			mem_windows[i][0] = 0;
+			mem_windows[i][1] = 0;
+		}
+
+	return;
+}
+
+/*
+ * mv64x60_calc_mem_size()
+ *
+ * Using the memory controller register values in 'mem_windows', determine
+ * how much memory it is set up for.
+ */
+u32 __init
+mv64x60_calc_mem_size(struct mv64x60_handle *bh,
+	u32 mem_windows[MV64x60_CPU2MEM_WINDOWS][2])
+{
+	u32	i, total = 0;
+
+	for (i=0; i<MV64x60_CPU2MEM_WINDOWS; i++)
+		total += mem_windows[i][1];
+
+	return total;
+}
+
+/*
+ *****************************************************************************
+ *
+ *	CPU->System MEM, PCI Config Routines
+ *
+ *****************************************************************************
+ */
+/*
+ * mv64x60_config_cpu2mem_windows()
+ *
+ * Configure CPU->Memory windows on the bridge.
+ */
+static u32 prot_tab[] __initdata = {
+	MV64x60_CPU_PROT_0_WIN, MV64x60_CPU_PROT_1_WIN,
+	MV64x60_CPU_PROT_2_WIN, MV64x60_CPU_PROT_3_WIN
+};
+
+static u32 cpu_snoop_tab[] __initdata = {
+	MV64x60_CPU_SNOOP_0_WIN, MV64x60_CPU_SNOOP_1_WIN,
+	MV64x60_CPU_SNOOP_2_WIN, MV64x60_CPU_SNOOP_3_WIN
+};
+
+void __init
+mv64x60_config_cpu2mem_windows(struct mv64x60_handle *bh,
+	struct mv64x60_setup_info *si,
+	u32 mem_windows[MV64x60_CPU2MEM_WINDOWS][2])
+{
+	u32	i, win;
+
+	/* Set CPU protection & snoop windows */
+	for (win=MV64x60_CPU2MEM_0_WIN,i=0;win<=MV64x60_CPU2MEM_3_WIN;win++,i++)
+		if (bh->ci->is_enabled_32bit(bh, win)) {
+			mv64x60_set_32bit_window(bh, prot_tab[i],
+				mem_windows[i][0], mem_windows[i][1],
+				si->cpu_prot_options[i]);
+			bh->ci->enable_window_32bit(bh, prot_tab[i]);
+
+			if (bh->ci->window_tab_32bit[cpu_snoop_tab[i]].
+								base_reg != 0) {
+				mv64x60_set_32bit_window(bh, cpu_snoop_tab[i],
+					mem_windows[i][0], mem_windows[i][1],
+					si->cpu_snoop_options[i]);
+				bh->ci->enable_window_32bit(bh,
+					cpu_snoop_tab[i]);
+			}
+
+		}
+
+	return;
+}
+
+/*
+ * mv64x60_config_cpu2pci_windows()
+ *
+ * Configure the CPU->PCI windows for one of the PCI buses.
+ */
+static u32 win_tab[2][4] __initdata = {
+	{ MV64x60_CPU2PCI0_IO_WIN, MV64x60_CPU2PCI0_MEM_0_WIN,
+	  MV64x60_CPU2PCI0_MEM_1_WIN, MV64x60_CPU2PCI0_MEM_2_WIN },
+	{ MV64x60_CPU2PCI1_IO_WIN, MV64x60_CPU2PCI1_MEM_0_WIN,
+	  MV64x60_CPU2PCI1_MEM_1_WIN, MV64x60_CPU2PCI1_MEM_2_WIN },
+};
+
+static u32 remap_tab[2][4] __initdata = {
+	{ MV64x60_CPU2PCI0_IO_REMAP_WIN, MV64x60_CPU2PCI0_MEM_0_REMAP_WIN,
+	  MV64x60_CPU2PCI0_MEM_1_REMAP_WIN, MV64x60_CPU2PCI0_MEM_2_REMAP_WIN },
+	{ MV64x60_CPU2PCI1_IO_REMAP_WIN, MV64x60_CPU2PCI1_MEM_0_REMAP_WIN,
+	  MV64x60_CPU2PCI1_MEM_1_REMAP_WIN, MV64x60_CPU2PCI1_MEM_2_REMAP_WIN }
+};
+
+void __init
+mv64x60_config_cpu2pci_windows(struct mv64x60_handle *bh,
+	struct mv64x60_pci_info *pi, u32 bus)
+{
+	int	i;
+
+	if (pi->pci_io.size > 0) {
+		mv64x60_set_32bit_window(bh, win_tab[bus][0],
+			pi->pci_io.cpu_base, pi->pci_io.size, pi->pci_io.swap);
+		mv64x60_set_32bit_window(bh, remap_tab[bus][0],
+			pi->pci_io.pci_base_lo, 0, 0);
+		bh->ci->enable_window_32bit(bh, win_tab[bus][0]);
+	}
+	else /* Actually, the window should already be disabled */
+		bh->ci->disable_window_32bit(bh, win_tab[bus][0]);
+
+	for (i=0; i<3; i++)
+		if (pi->pci_mem[i].size > 0) {
+			mv64x60_set_32bit_window(bh, win_tab[bus][i+1],
+				pi->pci_mem[i].cpu_base, pi->pci_mem[i].size,
+				pi->pci_mem[i].swap);
+			mv64x60_set_64bit_window(bh, remap_tab[bus][i+1],
+				pi->pci_mem[i].pci_base_hi,
+				pi->pci_mem[i].pci_base_lo, 0, 0);
+			bh->ci->enable_window_32bit(bh, win_tab[bus][i+1]);
+		}
+		else /* Actually, the window should already be disabled */
+			bh->ci->disable_window_32bit(bh, win_tab[bus][i+1]);
+
+	return;
+}
+
+/*
+ *****************************************************************************
+ *
+ *	PCI->System MEM Config Routines
+ *
+ *****************************************************************************
+ */
+/*
+ * mv64x60_config_pci2mem_windows()
+ *
+ * Configure the PCI->Memory windows on the bridge.
+ */
+static u32 pci_acc_tab[2][4] __initdata = {
+	{ MV64x60_PCI02MEM_ACC_CNTL_0_WIN, MV64x60_PCI02MEM_ACC_CNTL_1_WIN,
+	  MV64x60_PCI02MEM_ACC_CNTL_2_WIN, MV64x60_PCI02MEM_ACC_CNTL_3_WIN },
+	{ MV64x60_PCI12MEM_ACC_CNTL_0_WIN, MV64x60_PCI12MEM_ACC_CNTL_1_WIN,
+	  MV64x60_PCI12MEM_ACC_CNTL_2_WIN, MV64x60_PCI12MEM_ACC_CNTL_3_WIN }
+};
+
+static u32 pci_snoop_tab[2][4] __initdata = {
+	{ MV64x60_PCI02MEM_SNOOP_0_WIN, MV64x60_PCI02MEM_SNOOP_1_WIN,
+	  MV64x60_PCI02MEM_SNOOP_2_WIN, MV64x60_PCI02MEM_SNOOP_3_WIN },
+	{ MV64x60_PCI12MEM_SNOOP_0_WIN, MV64x60_PCI12MEM_SNOOP_1_WIN,
+	  MV64x60_PCI12MEM_SNOOP_2_WIN, MV64x60_PCI12MEM_SNOOP_3_WIN }
+};
+
+static u32 pci_size_tab[2][4] __initdata = {
+	{ MV64x60_PCI0_MEM_0_SIZE, MV64x60_PCI0_MEM_1_SIZE,
+	  MV64x60_PCI0_MEM_2_SIZE, MV64x60_PCI0_MEM_3_SIZE },
+	{ MV64x60_PCI1_MEM_0_SIZE, MV64x60_PCI1_MEM_1_SIZE,
+	  MV64x60_PCI1_MEM_2_SIZE, MV64x60_PCI1_MEM_3_SIZE }
+};
+
+void __init
+mv64x60_config_pci2mem_windows(struct mv64x60_handle *bh,
+	struct pci_controller *hose, struct mv64x60_pci_info *pi,
+	u32 bus, u32 mem_windows[MV64x60_CPU2MEM_WINDOWS][2])
+{
+	u32	i, win;
+
+	/*
+	 * Set the access control, snoop, BAR size, and window base addresses.
+	 * PCI->MEM windows base addresses will match exactly what the
+	 * CPU->MEM windows are.
+	 */
+	for (win=MV64x60_CPU2MEM_0_WIN,i=0;win<=MV64x60_CPU2MEM_3_WIN;win++,i++)
+		if (bh->ci->is_enabled_32bit(bh, win)) {
+			mv64x60_set_64bit_window(bh,
+				pci_acc_tab[bus][i], 0,
+				mem_windows[i][0], mem_windows[i][1],
+				pi->acc_cntl_options[i]);
+			bh->ci->enable_window_64bit(bh, pci_acc_tab[bus][i]);
+
+			if (bh->ci->window_tab_64bit[
+				pci_snoop_tab[bus][i]].base_lo_reg != 0) {
+
+				mv64x60_set_64bit_window(bh,
+					pci_snoop_tab[bus][i], 0,
+					mem_windows[i][0], mem_windows[i][1],
+					pi->snoop_options[i]);
+				bh->ci->enable_window_64bit(bh,
+					pci_snoop_tab[bus][i]);
+			}
+
+			bh->ci->set_pci2mem_window(hose, bus, i,
+				mem_windows[i][0]);
+			mv64x60_write(bh, pci_size_tab[bus][i],
+				mv64x60_mask(mem_windows[i][1] - 1, 20));
+
+			/* Enable the window */
+			mv64x60_clr_bits(bh, ((bus == 0) ?
+				MV64x60_PCI0_BAR_ENABLE :
+				MV64x60_PCI1_BAR_ENABLE), (1 << i));
+		}
+
+	return;
+}
+
+/*
+ *****************************************************************************
+ *
+ *	Hose & Resource Alloc/Init Routines
+ *
+ *****************************************************************************
+ */
+/*
+ * mv64x60_alloc_hoses()
+ *
+ * Allocate the PCI hose structures for the bridge's PCI buses.
+ */
+void __init
+mv64x60_alloc_hose(struct mv64x60_handle *bh, u32 cfg_addr, u32 cfg_data,
+	struct pci_controller **hose)
+{
+	*hose = pcibios_alloc_controller();
+	setup_indirect_pci_nomap(*hose, bh->v_base + cfg_addr,
+		bh->v_base + cfg_data);
+	return;
+}
+
+/*
+ * mv64x60_config_resources()
+ *
+ * Calculate the offsets, etc. for the hose structures to reflect all of
+ * the address remapping that happens as you go from CPU->PCI and PCI->MEM.
+ */
+void __init
+mv64x60_config_resources(struct pci_controller *hose,
+	struct mv64x60_pci_info *pi, u32 io_base)
+{
+	int		i;
+	/* 2 hoses; 4 resources/hose; string <= 64 bytes */
+	static char	s[2][4][64];
+
+	if (pi->pci_io.size != 0) {
+		sprintf(s[hose->index][0], "PCI hose %d I/O Space",
+			hose->index);
+		pci_init_resource(&hose->io_resource, io_base - isa_io_base,
+			io_base - isa_io_base + pi->pci_io.size - 1,
+			IORESOURCE_IO, s[hose->index][0]);
+		hose->io_space.start = pi->pci_io.pci_base_lo;
+		hose->io_space.end = pi->pci_io.pci_base_lo + pi->pci_io.size-1;
+		hose->io_base_phys = (ulong)pi->pci_io.cpu_base;
+		hose->io_base_virt = (void *)isa_io_base;
+	}
+
+	for (i=0; i<3; i++)
+		if (pi->pci_mem[i].size != 0) {
+			sprintf(s[hose->index][i+1], "PCI hose %d MEM Space %d",
+				hose->index, i);
+			pci_init_resource(&hose->mem_resources[i],
+				pi->pci_mem[i].cpu_base,
+				pi->pci_mem[i].cpu_base + pi->pci_mem[i].size-1,
+				IORESOURCE_MEM, s[hose->index][i+1]);
+		}
+
+	hose->mem_space.end = pi->pci_mem[0].pci_base_lo +
+						pi->pci_mem[0].size - 1;
+	hose->pci_mem_offset = pi->pci_mem[0].cpu_base -
+						pi->pci_mem[0].pci_base_lo;
+	return;
+}
+
+/*
+ * mv64x60_config_pci_params()
+ *
+ * Configure a hose's PCI config space parameters.
+ */
+void __init
+mv64x60_config_pci_params(struct pci_controller *hose,
+	struct mv64x60_pci_info *pi)
+{
+	u32	devfn;
+	u16	u16_val;
+	u8	save_exclude;
+
+	devfn = PCI_DEVFN(0,0);
+
+	save_exclude = mv64x60_pci_exclude_bridge;
+	mv64x60_pci_exclude_bridge = 0;
+
+	/* Set class code to indicate host bridge */
+	u16_val = PCI_CLASS_BRIDGE_HOST; /* 0x0600 (host bridge) */
+	early_write_config_word(hose, 0, devfn, PCI_CLASS_DEVICE, u16_val);
+
+	/* Enable bridge to be PCI master & respond to PCI MEM cycles */
+	early_read_config_word(hose, 0, devfn, PCI_COMMAND, &u16_val);
+	u16_val &= ~(PCI_COMMAND_IO | PCI_COMMAND_INVALIDATE |
+		PCI_COMMAND_PARITY | PCI_COMMAND_SERR | PCI_COMMAND_FAST_BACK);
+	u16_val |= pi->pci_cmd_bits | PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY;
+	early_write_config_word(hose, 0, devfn, PCI_COMMAND, u16_val);
+
+	/* Set latency timer, cache line size, clear BIST */
+	u16_val = (pi->latency_timer << 8) | (L1_CACHE_LINE_SIZE >> 2);
+	early_write_config_word(hose, 0, devfn, PCI_CACHE_LINE_SIZE, u16_val);
+
+	mv64x60_pci_exclude_bridge = save_exclude;
+	return;
+}
+
+/*
+ *****************************************************************************
+ *
+ *	PCI Related Routine
+ *
+ *****************************************************************************
+ */
+/*
+ * mv64x60_set_bus()
+ *
+ * Set the bus number for the hose directly under the bridge.
+ */
+void __init
+mv64x60_set_bus(struct mv64x60_handle *bh, u32 bus, u32 child_bus)
+{
+	struct pci_controller	*hose;
+	u32	pci_mode, p2p_cfg, pci_cfg_offset, val;
+	u8	save_exclude;
+
+	if (bus == 0) {
+		pci_mode = bh->pci_mode_a;
+		p2p_cfg = MV64x60_PCI0_P2P_CONFIG;
+		pci_cfg_offset = 0x64;
+		hose = bh->hose_a;
+	}
+	else {
+		pci_mode = bh->pci_mode_b;
+		p2p_cfg = MV64x60_PCI1_P2P_CONFIG;
+		pci_cfg_offset = 0xe4;
+		hose = bh->hose_b;
+	}
+
+	child_bus &= 0xff;
+	val = mv64x60_read(bh, p2p_cfg);
+
+	if (pci_mode == MV64x60_PCIMODE_CONVENTIONAL) {
+		val &= 0xe0000000; /* Force dev num to 0, turn off P2P bridge */
+		val |= (child_bus << 16) | 0xff;
+		mv64x60_write(bh, p2p_cfg, val);
+		(void)mv64x60_read(bh, p2p_cfg); /* Flush FIFO */
+	}
+	else { /* PCI-X */
+		/*
+		 * Need to use the current bus/dev number (that's in the
+		 * P2P CONFIG reg) to access the bridge's pci config space.
+		 */
+		save_exclude = mv64x60_pci_exclude_bridge;
+		mv64x60_pci_exclude_bridge = 0;
+		early_write_config_dword(hose, (val & 0x00ff0000) >> 16,
+			PCI_DEVFN(((val & 0x1f000000) >> 24), 0),
+			pci_cfg_offset, child_bus << 8);
+		mv64x60_pci_exclude_bridge = save_exclude;
+	}
+
+	return;
+}
+
+/*
+ * mv64x60_pci_exclude_device()
+ *
+ * This routine is used to make the bridge not appear when the
+ * PCI subsystem is accessing PCI devices (in PCI config space).
+ */
+int
+mv64x60_pci_exclude_device(u8 bus, u8 devfn)
+{
+	struct pci_controller	*hose;
+
+	hose = pci_bus_to_hose(bus);
+
+	/* Skip slot 0 on both hoses */
+	if ((mv64x60_pci_exclude_bridge == 1) && (PCI_SLOT(devfn) == 0) &&
+		(hose->first_busno == bus))
+
+		return PCIBIOS_DEVICE_NOT_FOUND;
+	else
+		return PCIBIOS_SUCCESSFUL;
+} /* mv64x60_pci_exclude_device() */
+
+/*
+ *****************************************************************************
+ *
+ *	Platform Device Routines
+ *
+ *****************************************************************************
+ */
+
+/*
+ * mv64x60_pd_fixup()
+ *
+ * Need to add the base addr of where the bridge's regs are mapped in the
+ * physical addr space so drivers can ioremap() them.
+ */
+void __init
+mv64x60_pd_fixup(struct mv64x60_handle *bh, struct platform_device *pd_devs[],
+	u32 entries)
+{
+	struct resource	*r;
+	u32		i, j;
+
+	for (i=0; i<entries; i++) {
+		j = 0;
+
+		while ((r = platform_get_resource(pd_devs[i],IORESOURCE_MEM,j))
+			!= NULL) {
+
+			r->start += bh->p_base;
+			r->end += bh->p_base;
+			j++;
+		}
+	}
+
+	return;
+}
+
+/*
+ * mv64x60_add_pds()
+ *
+ * Add the mv64x60 platform devices to the list of platform devices.
+ */
+static int __init
+mv64x60_add_pds(void)
+{
+	return platform_add_devices(mv64x60_pd_devs,
+		ARRAY_SIZE(mv64x60_pd_devs));
+}
+arch_initcall(mv64x60_add_pds);
+
+/*
+ *****************************************************************************
+ *
+ *	GT64260-Specific Routines
+ *
+ *****************************************************************************
+ */
+/*
+ * gt64260_translate_size()
+ *
+ * On the GT64260, the size register is really the "top" address of the window.
+ */
+static u32 __init
+gt64260_translate_size(u32 base, u32 size, u32 num_bits)
+{
+	return base + mv64x60_mask(size - 1, num_bits);
+}
+
+/*
+ * gt64260_untranslate_size()
+ *
+ * Translate the top address of a window into a window size.
+ */
+static u32 __init
+gt64260_untranslate_size(u32 base, u32 size, u32 num_bits)
+{
+	if (size >= base)
+		size = size - base + (1 << (32 - num_bits));
+	else
+		size = 0;
+
+	return size;
+}
+
+/*
+ * gt64260_set_pci2mem_window()
+ *
+ * The PCI->MEM window registers are actually in PCI config space so need
+ * to set them by setting the correct config space BARs.
+ */
+static u32 gt64260_reg_addrs[2][4] __initdata = {
+	{ 0x10, 0x14, 0x18, 0x1c }, { 0x90, 0x94, 0x98, 0x9c }
+};
+
+static void __init
+gt64260_set_pci2mem_window(struct pci_controller *hose, u32 bus, u32 window,
+	u32 base)
+{
+	u8	save_exclude;
+
+	pr_debug("set pci->mem window: %d, hose: %d, base: 0x%x\n", window,
+		hose->index, base);
+
+	save_exclude = mv64x60_pci_exclude_bridge;
+	mv64x60_pci_exclude_bridge = 0;
+	early_write_config_dword(hose, 0, PCI_DEVFN(0, 0),
+		gt64260_reg_addrs[bus][window], mv64x60_mask(base, 20) | 0x8);
+	mv64x60_pci_exclude_bridge = save_exclude;
+
+	return;
+}
+
+/*
+ * gt64260_set_pci2regs_window()
+ *
+ * Set where the bridge's registers appear in PCI MEM space.
+ */
+static u32 gt64260_offset[2] __initdata = {0x20, 0xa0};
+
+static void __init
+gt64260_set_pci2regs_window(struct mv64x60_handle *bh,
+	struct pci_controller *hose, u32 bus, u32 base)
+{
+	u8	save_exclude;
+
+	pr_debug("set pci->internal regs hose: %d, base: 0x%x\n", hose->index,
+		base);
+
+	save_exclude = mv64x60_pci_exclude_bridge;
+	mv64x60_pci_exclude_bridge = 0;
+	early_write_config_dword(hose, 0, PCI_DEVFN(0,0), gt64260_offset[bus],
+		(base << 16));
+	mv64x60_pci_exclude_bridge = save_exclude;
+
+	return;
+}
+
+/*
+ * gt64260_is_enabled_32bit()
+ *
+ * On a GT64260, a window is enabled iff its top address is >= to its base
+ * address.
+ */
+static u32 __init
+gt64260_is_enabled_32bit(struct mv64x60_handle *bh, u32 window)
+{
+	u32	rc = 0;
+
+	if ((gt64260_32bit_windows[window].base_reg != 0) &&
+		(gt64260_32bit_windows[window].size_reg != 0) &&
+		((mv64x60_read(bh, gt64260_32bit_windows[window].size_reg) &
+			((1 << gt64260_32bit_windows[window].size_bits) - 1)) >=
+		 (mv64x60_read(bh, gt64260_32bit_windows[window].base_reg) &
+			((1 << gt64260_32bit_windows[window].base_bits) - 1))))
+
+		rc = 1;
+
+	return rc;
+}
+
+/*
+ * gt64260_enable_window_32bit()
+ *
+ * On the GT64260, a window is enabled iff the top address is >= to the base
+ * address of the window.  Since the window has already been configured by
+ * the time this routine is called, we have nothing to do here.
+ */
+static void __init
+gt64260_enable_window_32bit(struct mv64x60_handle *bh, u32 window)
+{
+	pr_debug("enable 32bit window: %d\n", window);
+	return;
+}
+
+/*
+ * gt64260_disable_window_32bit()
+ *
+ * On a GT64260, you disable a window by setting its top address to be less
+ * than its base address.
+ */
+static void __init
+gt64260_disable_window_32bit(struct mv64x60_handle *bh, u32 window)
+{
+	pr_debug("disable 32bit window: %d, base_reg: 0x%x, size_reg: 0x%x\n",
+		window, gt64260_32bit_windows[window].base_reg,
+		gt64260_32bit_windows[window].size_reg);
+
+	if ((gt64260_32bit_windows[window].base_reg != 0) &&
+		(gt64260_32bit_windows[window].size_reg != 0)) {
+
+		/* To disable, make bottom reg higher than top reg */
+		mv64x60_write(bh, gt64260_32bit_windows[window].base_reg,0xfff);
+		mv64x60_write(bh, gt64260_32bit_windows[window].size_reg, 0);
+	}
+
+	return;
+}
+
+/*
+ * gt64260_enable_window_64bit()
+ *
+ * On the GT64260, a window is enabled iff the top address is >= to the base
+ * address of the window.  Since the window has already been configured by
+ * the time this routine is called, we have nothing to do here.
+ */
+static void __init
+gt64260_enable_window_64bit(struct mv64x60_handle *bh, u32 window)
+{
+	pr_debug("enable 64bit window: %d\n", window);
+	return;	/* Enabled when window configured (i.e., when top >= base) */
+}
+
+/*
+ * gt64260_disable_window_64bit()
+ *
+ * On a GT64260, you disable a window by setting its top address to be less
+ * than its base address.
+ */
+static void __init
+gt64260_disable_window_64bit(struct mv64x60_handle *bh, u32 window)
+{
+	pr_debug("disable 64bit window: %d, base_reg: 0x%x, size_reg: 0x%x\n",
+		window, gt64260_64bit_windows[window].base_lo_reg,
+		gt64260_64bit_windows[window].size_reg);
+
+	if ((gt64260_64bit_windows[window].base_lo_reg != 0) &&
+		(gt64260_64bit_windows[window].size_reg != 0)) {
+
+		/* To disable, make bottom reg higher than top reg */
+		mv64x60_write(bh, gt64260_64bit_windows[window].base_lo_reg,
+									0xfff);
+		mv64x60_write(bh, gt64260_64bit_windows[window].base_hi_reg, 0);
+		mv64x60_write(bh, gt64260_64bit_windows[window].size_reg, 0);
+	}
+
+	return;
+}
+
+/*
+ * gt64260_disable_all_windows()
+ *
+ * The GT64260 has several windows that aren't represented in the table of
+ * windows at the top of this file.  This routine turns all of them off
+ * except for the memory controller windows, of course.
+ */
+static void __init
+gt64260_disable_all_windows(struct mv64x60_handle *bh,
+	struct mv64x60_setup_info *si)
+{
+	u32	i, preserve;
+
+	/* Disable 32bit windows (don't disable cpu->mem windows) */
+	for (i=MV64x60_CPU2DEV_0_WIN; i<MV64x60_32BIT_WIN_COUNT; i++) {
+		if (i < 32)
+			preserve = si->window_preserve_mask_32_lo & (1 << i);
+		else
+			preserve = si->window_preserve_mask_32_hi & (1<<(i-32));
+
+		if (!preserve)
+			gt64260_disable_window_32bit(bh, i);
+	}
+
+	/* Disable 64bit windows */
+	for (i=0; i<MV64x60_64BIT_WIN_COUNT; i++)
+		if (!(si->window_preserve_mask_64 & (1<<i)))
+			gt64260_disable_window_64bit(bh, i);
+
+	/* Turn off cpu protection windows not in gt64260_32bit_windows[] */
+	mv64x60_write(bh, GT64260_CPU_PROT_BASE_4, 0xfff);
+	mv64x60_write(bh, GT64260_CPU_PROT_SIZE_4, 0);
+	mv64x60_write(bh, GT64260_CPU_PROT_BASE_5, 0xfff);
+	mv64x60_write(bh, GT64260_CPU_PROT_SIZE_5, 0);
+	mv64x60_write(bh, GT64260_CPU_PROT_BASE_6, 0xfff);
+	mv64x60_write(bh, GT64260_CPU_PROT_SIZE_6, 0);
+	mv64x60_write(bh, GT64260_CPU_PROT_BASE_7, 0xfff);
+	mv64x60_write(bh, GT64260_CPU_PROT_SIZE_7, 0);
+
+	/* Turn off PCI->MEM access cntl wins not in gt64260_64bit_windows[] */
+	mv64x60_write(bh, MV64x60_PCI0_ACC_CNTL_4_BASE_LO, 0xfff);
+	mv64x60_write(bh, MV64x60_PCI0_ACC_CNTL_4_BASE_HI, 0);
+	mv64x60_write(bh, MV64x60_PCI0_ACC_CNTL_4_SIZE, 0);
+	mv64x60_write(bh, MV64x60_PCI0_ACC_CNTL_5_BASE_LO, 0xfff);
+	mv64x60_write(bh, MV64x60_PCI0_ACC_CNTL_5_BASE_HI, 0);
+	mv64x60_write(bh, MV64x60_PCI0_ACC_CNTL_5_SIZE, 0);
+	mv64x60_write(bh, GT64260_PCI0_ACC_CNTL_6_BASE_LO, 0xfff);
+	mv64x60_write(bh, GT64260_PCI0_ACC_CNTL_6_BASE_HI, 0);
+	mv64x60_write(bh, GT64260_PCI0_ACC_CNTL_6_SIZE, 0);
+	mv64x60_write(bh, GT64260_PCI0_ACC_CNTL_7_BASE_LO, 0xfff);
+	mv64x60_write(bh, GT64260_PCI0_ACC_CNTL_7_BASE_HI, 0);
+	mv64x60_write(bh, GT64260_PCI0_ACC_CNTL_7_SIZE, 0);
+
+	mv64x60_write(bh, MV64x60_PCI1_ACC_CNTL_4_BASE_LO, 0xfff);
+	mv64x60_write(bh, MV64x60_PCI1_ACC_CNTL_4_BASE_HI, 0);
+	mv64x60_write(bh, MV64x60_PCI1_ACC_CNTL_4_SIZE, 0);
+	mv64x60_write(bh, MV64x60_PCI1_ACC_CNTL_5_BASE_LO, 0xfff);
+	mv64x60_write(bh, MV64x60_PCI1_ACC_CNTL_5_BASE_HI, 0);
+	mv64x60_write(bh, MV64x60_PCI1_ACC_CNTL_5_SIZE, 0);
+	mv64x60_write(bh, GT64260_PCI1_ACC_CNTL_6_BASE_LO, 0xfff);
+	mv64x60_write(bh, GT64260_PCI1_ACC_CNTL_6_BASE_HI, 0);
+	mv64x60_write(bh, GT64260_PCI1_ACC_CNTL_6_SIZE, 0);
+	mv64x60_write(bh, GT64260_PCI1_ACC_CNTL_7_BASE_LO, 0xfff);
+	mv64x60_write(bh, GT64260_PCI1_ACC_CNTL_7_BASE_HI, 0);
+	mv64x60_write(bh, GT64260_PCI1_ACC_CNTL_7_SIZE, 0);
+
+	/* Disable all PCI-><whatever> windows */
+	mv64x60_set_bits(bh, MV64x60_PCI0_BAR_ENABLE, 0x07fffdff);
+	mv64x60_set_bits(bh, MV64x60_PCI1_BAR_ENABLE, 0x07fffdff);
+
+	/*
+	 * Some firmwares enable a bunch of intr sources
+	 * for the PCI INT output pins.
+	 */
+	mv64x60_write(bh, GT64260_IC_CPU_INTR_MASK_LO, 0);
+	mv64x60_write(bh, GT64260_IC_CPU_INTR_MASK_HI, 0);
+	mv64x60_write(bh, GT64260_IC_PCI0_INTR_MASK_LO, 0);
+	mv64x60_write(bh, GT64260_IC_PCI0_INTR_MASK_HI, 0);
+	mv64x60_write(bh, GT64260_IC_PCI1_INTR_MASK_LO, 0);
+	mv64x60_write(bh, GT64260_IC_PCI1_INTR_MASK_HI, 0);
+	mv64x60_write(bh, GT64260_IC_CPU_INT_0_MASK, 0);
+	mv64x60_write(bh, GT64260_IC_CPU_INT_1_MASK, 0);
+	mv64x60_write(bh, GT64260_IC_CPU_INT_2_MASK, 0);
+	mv64x60_write(bh, GT64260_IC_CPU_INT_3_MASK, 0);
+
+	return;
+}
+
+/*
+ * gt64260a_chip_specific_init()
+ *
+ * Implement errata work arounds for the GT64260A.
+ */
+static void __init
+gt64260a_chip_specific_init(struct mv64x60_handle *bh,
+	struct mv64x60_setup_info *si)
+{
+#ifdef CONFIG_SERIAL_MPSC
+	struct resource	*r;
+#endif
+#if !defined(CONFIG_NOT_COHERENT_CACHE)
+	u32		val;
+	u8		save_exclude;
+#endif
+
+	if (si->pci_0.enable_bus)
+		mv64x60_set_bits(bh, MV64x60_PCI0_CMD,
+			((1<<4) | (1<<5) | (1<<9) | (1<<13)));
+
+	if (si->pci_1.enable_bus)
+		mv64x60_set_bits(bh, MV64x60_PCI1_CMD,
+			((1<<4) | (1<<5) | (1<<9) | (1<<13)));
+
+	/*
+	 * Dave Wilhardt found that bit 4 in the PCI Command registers must
+	 * be set if you are using cache coherency.
+	 */
+#if !defined(CONFIG_NOT_COHERENT_CACHE)
+	/* Res #MEM-4 -- cpu read buffer to buffer 1 */
+	if ((mv64x60_read(bh, MV64x60_CPU_MODE) & 0xf0) == 0x40)
+		mv64x60_set_bits(bh, GT64260_SDRAM_CONFIG, (1<<26));
+
+	save_exclude = mv64x60_pci_exclude_bridge;
+	mv64x60_pci_exclude_bridge = 0;
+	if (si->pci_0.enable_bus) {
+		early_read_config_dword(bh->hose_a, 0, PCI_DEVFN(0,0),
+			PCI_COMMAND, &val);
+		val |= PCI_COMMAND_INVALIDATE;
+		early_write_config_dword(bh->hose_a, 0, PCI_DEVFN(0,0),
+			PCI_COMMAND, val);
+	}
+
+	if (si->pci_1.enable_bus) {
+		early_read_config_dword(bh->hose_b, 0, PCI_DEVFN(0,0),
+			PCI_COMMAND, &val);
+		val |= PCI_COMMAND_INVALIDATE;
+		early_write_config_dword(bh->hose_b, 0, PCI_DEVFN(0,0),
+			PCI_COMMAND, val);
+	}
+	mv64x60_pci_exclude_bridge = save_exclude;
+#endif
+
+	/* Disable buffer/descriptor snooping */
+	mv64x60_clr_bits(bh, 0xf280, (1<< 6) | (1<<14) | (1<<22) | (1<<30));
+	mv64x60_clr_bits(bh, 0xf2c0, (1<< 6) | (1<<14) | (1<<22) | (1<<30));
+
+#ifdef CONFIG_SERIAL_MPSC
+	mv64x60_mpsc0_pd_dd.mirror_regs = 1;
+	mv64x60_mpsc0_pd_dd.cache_mgmt = 1;
+	mv64x60_mpsc1_pd_dd.mirror_regs = 1;
+	mv64x60_mpsc1_pd_dd.cache_mgmt = 1;
+
+	if ((r = platform_get_resource(&mpsc1_device, IORESOURCE_IRQ, 0))
+		!= NULL) {
+
+		r->start = MV64x60_IRQ_SDMA_0;
+		r->end = MV64x60_IRQ_SDMA_0;
+	}
+#endif
+
+	return;
+}
+
+/*
+ * gt64260b_chip_specific_init()
+ *
+ * Implement errata work arounds for the GT64260B.
+ */
+static void __init
+gt64260b_chip_specific_init(struct mv64x60_handle *bh,
+	struct mv64x60_setup_info *si)
+{
+#ifdef CONFIG_SERIAL_MPSC
+	struct resource	*r;
+#endif
+#if !defined(CONFIG_NOT_COHERENT_CACHE)
+	u32		val;
+	u8		save_exclude;
+#endif
+
+	if (si->pci_0.enable_bus)
+		mv64x60_set_bits(bh, MV64x60_PCI0_CMD,
+			((1<<4) | (1<<5) | (1<<9) | (1<<13)));
+
+	if (si->pci_1.enable_bus)
+		mv64x60_set_bits(bh, MV64x60_PCI1_CMD,
+			((1<<4) | (1<<5) | (1<<9) | (1<<13)));
+
+	/*
+	 * Dave Wilhardt found that bit 4 in the PCI Command registers must
+	 * be set if you are using cache coherency.
+	 */
+#if !defined(CONFIG_NOT_COHERENT_CACHE)
+	mv64x60_set_bits(bh, GT64260_CPU_WB_PRIORITY_BUFFER_DEPTH, 0xf);
+
+	/* Res #MEM-4 -- cpu read buffer to buffer 1 */
+	if ((mv64x60_read(bh, MV64x60_CPU_MODE) & 0xf0) == 0x40)
+		mv64x60_set_bits(bh, GT64260_SDRAM_CONFIG, (1<<26));
+
+	save_exclude = mv64x60_pci_exclude_bridge;
+	mv64x60_pci_exclude_bridge = 0;
+	if (si->pci_0.enable_bus) {
+		early_read_config_dword(bh->hose_a, 0, PCI_DEVFN(0,0),
+			PCI_COMMAND, &val);
+		val |= PCI_COMMAND_INVALIDATE;
+		early_write_config_dword(bh->hose_a, 0, PCI_DEVFN(0,0),
+			PCI_COMMAND, val);
+	}
+
+	if (si->pci_1.enable_bus) {
+		early_read_config_dword(bh->hose_b, 0, PCI_DEVFN(0,0),
+			PCI_COMMAND, &val);
+		val |= PCI_COMMAND_INVALIDATE;
+		early_write_config_dword(bh->hose_b, 0, PCI_DEVFN(0,0),
+			PCI_COMMAND, val);
+	}
+	mv64x60_pci_exclude_bridge = save_exclude;
+#endif
+
+	/* Disable buffer/descriptor snooping */
+	mv64x60_clr_bits(bh, 0xf280, (1<< 6) | (1<<14) | (1<<22) | (1<<30));
+	mv64x60_clr_bits(bh, 0xf2c0, (1<< 6) | (1<<14) | (1<<22) | (1<<30));
+
+#ifdef CONFIG_SERIAL_MPSC
+	/*
+	 * The 64260B is not supposed to have the bug where the MPSC & ENET
+	 * can't access cache coherent regions.  However, testing has shown
+	 * that the MPSC, at least, still has this bug.
+	 */
+	mv64x60_mpsc0_pd_dd.cache_mgmt = 1;
+	mv64x60_mpsc1_pd_dd.cache_mgmt = 1;
+
+	if ((r = platform_get_resource(&mpsc1_device, IORESOURCE_IRQ, 0))
+		!= NULL) {
+
+		r->start = MV64x60_IRQ_SDMA_0;
+		r->end = MV64x60_IRQ_SDMA_0;
+	}
+#endif
+
+	return;
+}
+
+/*
+ *****************************************************************************
+ *
+ *	MV64360-Specific Routines
+ *
+ *****************************************************************************
+ */
+/*
+ * mv64360_translate_size()
+ *
+ * On the MV64360, the size register is set similar to the size you get
+ * from a pci config space BAR register.  That is, programmed from LSB to MSB
+ * as a sequence of 1's followed by a sequence of 0's. IOW, "size -1" with the
+ * assumption that the size is a power of 2.
+ */
+static u32 __init
+mv64360_translate_size(u32 base_addr, u32 size, u32 num_bits)
+{
+	return mv64x60_mask(size - 1, num_bits);
+}
+
+/*
+ * mv64360_untranslate_size()
+ *
+ * Translate the size register value of a window into a window size.
+ */
+static u32 __init
+mv64360_untranslate_size(u32 base_addr, u32 size, u32 num_bits)
+{
+	if (size > 0) {
+		size >>= (32 - num_bits);
+		size++;
+		size <<= (32 - num_bits);
+	}
+
+	return size;
+}
+
+/*
+ * mv64360_set_pci2mem_window()
+ *
+ * The PCI->MEM window registers are actually in PCI config space so need
+ * to set them by setting the correct config space BARs.
+ */
+struct {
+	u32	fcn;
+	u32	base_hi_bar;
+	u32	base_lo_bar;
+} static mv64360_reg_addrs[2][4] __initdata = {
+	{{ 0, 0x14, 0x10 }, { 0, 0x1c, 0x18 },
+	 { 1, 0x14, 0x10 }, { 1, 0x1c, 0x18 }},
+	{{ 0, 0x94, 0x90 }, { 0, 0x9c, 0x98 },
+	 { 1, 0x94, 0x90 }, { 1, 0x9c, 0x98 }}
+};
+
+static void __init
+mv64360_set_pci2mem_window(struct pci_controller *hose, u32 bus, u32 window,
+	u32 base)
+{
+	u8 save_exclude;
+
+	pr_debug("set pci->mem window: %d, hose: %d, base: 0x%x\n", window,
+		hose->index, base);
+
+	save_exclude = mv64x60_pci_exclude_bridge;
+	mv64x60_pci_exclude_bridge = 0;
+	early_write_config_dword(hose, 0,
+		PCI_DEVFN(0, mv64360_reg_addrs[bus][window].fcn),
+		mv64360_reg_addrs[bus][window].base_hi_bar, 0);
+	early_write_config_dword(hose, 0,
+		PCI_DEVFN(0, mv64360_reg_addrs[bus][window].fcn),
+		mv64360_reg_addrs[bus][window].base_lo_bar,
+		mv64x60_mask(base,20) | 0xc);
+	mv64x60_pci_exclude_bridge = save_exclude;
+
+	return;
+}
+
+/*
+ * mv64360_set_pci2regs_window()
+ *
+ * Set where the bridge's registers appear in PCI MEM space.
+ */
+static u32 mv64360_offset[2][2] __initdata = {{0x20, 0x24}, {0xa0, 0xa4}};
+
+static void __init
+mv64360_set_pci2regs_window(struct mv64x60_handle *bh,
+	struct pci_controller *hose, u32 bus, u32 base)
+{
+	u8	save_exclude;
+
+	pr_debug("set pci->internal regs hose: %d, base: 0x%x\n", hose->index,
+		base);
+
+	save_exclude = mv64x60_pci_exclude_bridge;
+	mv64x60_pci_exclude_bridge = 0;
+	early_write_config_dword(hose, 0, PCI_DEVFN(0,0),
+		mv64360_offset[bus][0], (base << 16));
+	early_write_config_dword(hose, 0, PCI_DEVFN(0,0),
+		mv64360_offset[bus][1], 0);
+	mv64x60_pci_exclude_bridge = save_exclude;
+
+	return;
+}
+
+/*
+ * mv64360_is_enabled_32bit()
+ *
+ * On a MV64360, a window is enabled by either clearing a bit in the
+ * CPU BAR Enable reg or setting a bit in the window's base reg.
+ * Note that this doesn't work for windows on the PCI slave side but we don't
+ * check those so its okay.
+ */
+static u32 __init
+mv64360_is_enabled_32bit(struct mv64x60_handle *bh, u32 window)
+{
+	u32	extra, rc = 0;
+
+	if (((mv64360_32bit_windows[window].base_reg != 0) &&
+		(mv64360_32bit_windows[window].size_reg != 0)) ||
+		(window == MV64x60_CPU2SRAM_WIN)) {
+
+		extra = mv64360_32bit_windows[window].extra;
+
+		switch (extra & MV64x60_EXTRA_MASK) {
+		case MV64x60_EXTRA_CPUWIN_ENAB:
+			rc = (mv64x60_read(bh, MV64360_CPU_BAR_ENABLE) &
+				(1 << (extra & 0x1f))) == 0;
+			break;
+
+		case MV64x60_EXTRA_CPUPROT_ENAB:
+			rc = (mv64x60_read(bh,
+				mv64360_32bit_windows[window].base_reg) &
+					(1 << (extra & 0x1f))) != 0;
+			break;
+
+		case MV64x60_EXTRA_ENET_ENAB:
+			rc = (mv64x60_read(bh, MV64360_ENET2MEM_BAR_ENABLE) &
+				(1 << (extra & 0x7))) == 0;
+			break;
+
+		case MV64x60_EXTRA_MPSC_ENAB:
+			rc = (mv64x60_read(bh, MV64360_MPSC2MEM_BAR_ENABLE) &
+				(1 << (extra & 0x3))) == 0;
+			break;
+
+		case MV64x60_EXTRA_IDMA_ENAB:
+			rc = (mv64x60_read(bh, MV64360_IDMA2MEM_BAR_ENABLE) &
+				(1 << (extra & 0x7))) == 0;
+			break;
+
+		default:
+			printk(KERN_ERR "mv64360_is_enabled: %s\n",
+				"32bit table corrupted");
+		}
+	}
+
+	return rc;
+}
+
+/*
+ * mv64360_enable_window_32bit()
+ *
+ * On a MV64360, a window is enabled by either clearing a bit in the
+ * CPU BAR Enable reg or setting a bit in the window's base reg.
+ */
+static void __init
+mv64360_enable_window_32bit(struct mv64x60_handle *bh, u32 window)
+{
+	u32	extra;
+
+	pr_debug("enable 32bit window: %d\n", window);
+
+	if (((mv64360_32bit_windows[window].base_reg != 0) &&
+		(mv64360_32bit_windows[window].size_reg != 0)) ||
+		(window == MV64x60_CPU2SRAM_WIN)) {
+
+		extra = mv64360_32bit_windows[window].extra;
+
+		switch (extra & MV64x60_EXTRA_MASK) {
+		case MV64x60_EXTRA_CPUWIN_ENAB:
+			mv64x60_clr_bits(bh, MV64360_CPU_BAR_ENABLE,
+				(1 << (extra & 0x1f)));
+			break;
+
+		case MV64x60_EXTRA_CPUPROT_ENAB:
+			mv64x60_set_bits(bh,
+				mv64360_32bit_windows[window].base_reg,
+				(1 << (extra & 0x1f)));
+			break;
+
+		case MV64x60_EXTRA_ENET_ENAB:
+			mv64x60_clr_bits(bh, MV64360_ENET2MEM_BAR_ENABLE,
+				(1 << (extra & 0x7)));
+			break;
+
+		case MV64x60_EXTRA_MPSC_ENAB:
+			mv64x60_clr_bits(bh, MV64360_MPSC2MEM_BAR_ENABLE,
+				(1 << (extra & 0x3)));
+			break;
+
+		case MV64x60_EXTRA_IDMA_ENAB:
+			mv64x60_clr_bits(bh, MV64360_IDMA2MEM_BAR_ENABLE,
+				(1 << (extra & 0x7)));
+			break;
+
+		default:
+			printk(KERN_ERR "mv64360_enable: %s\n",
+				"32bit table corrupted");
+		}
+	}
+
+	return;
+}
+
+/*
+ * mv64360_disable_window_32bit()
+ *
+ * On a MV64360, a window is disabled by either setting a bit in the
+ * CPU BAR Enable reg or clearing a bit in the window's base reg.
+ */
+static void __init
+mv64360_disable_window_32bit(struct mv64x60_handle *bh, u32 window)
+{
+	u32	extra;
+
+	pr_debug("disable 32bit window: %d, base_reg: 0x%x, size_reg: 0x%x\n",
+		window, mv64360_32bit_windows[window].base_reg,
+		mv64360_32bit_windows[window].size_reg);
+
+	if (((mv64360_32bit_windows[window].base_reg != 0) &&
+		(mv64360_32bit_windows[window].size_reg != 0)) ||
+		(window == MV64x60_CPU2SRAM_WIN)) {
+
+		extra = mv64360_32bit_windows[window].extra;
+
+		switch (extra & MV64x60_EXTRA_MASK) {
+		case MV64x60_EXTRA_CPUWIN_ENAB:
+			mv64x60_set_bits(bh, MV64360_CPU_BAR_ENABLE,
+				(1 << (extra & 0x1f)));
+			break;
+
+		case MV64x60_EXTRA_CPUPROT_ENAB:
+			mv64x60_clr_bits(bh,
+				mv64360_32bit_windows[window].base_reg,
+				(1 << (extra & 0x1f)));
+			break;
+
+		case MV64x60_EXTRA_ENET_ENAB:
+			mv64x60_set_bits(bh, MV64360_ENET2MEM_BAR_ENABLE,
+				(1 << (extra & 0x7)));
+			break;
+
+		case MV64x60_EXTRA_MPSC_ENAB:
+			mv64x60_set_bits(bh, MV64360_MPSC2MEM_BAR_ENABLE,
+				(1 << (extra & 0x3)));
+			break;
+
+		case MV64x60_EXTRA_IDMA_ENAB:
+			mv64x60_set_bits(bh, MV64360_IDMA2MEM_BAR_ENABLE,
+				(1 << (extra & 0x7)));
+			break;
+
+		default:
+			printk(KERN_ERR "mv64360_disable: %s\n",
+				"32bit table corrupted");
+		}
+	}
+
+	return;
+}
+
+/*
+ * mv64360_enable_window_64bit()
+ *
+ * On the MV64360, a 64-bit window is enabled by setting a bit in the window's
+ * base reg.
+ */
+static void __init
+mv64360_enable_window_64bit(struct mv64x60_handle *bh, u32 window)
+{
+	pr_debug("enable 64bit window: %d\n", window);
+
+	if ((mv64360_64bit_windows[window].base_lo_reg!= 0) &&
+		(mv64360_64bit_windows[window].size_reg != 0)) {
+
+		if ((mv64360_64bit_windows[window].extra & MV64x60_EXTRA_MASK)
+			== MV64x60_EXTRA_PCIACC_ENAB)
+
+			mv64x60_set_bits(bh,
+				mv64360_64bit_windows[window].base_lo_reg,
+				(1 << (mv64360_64bit_windows[window].extra &
+									0x1f)));
+		else
+			printk(KERN_ERR "mv64360_enable: %s\n",
+				"64bit table corrupted");
+	}
+
+	return;
+}
+
+/*
+ * mv64360_disable_window_64bit()
+ *
+ * On a MV64360, a 64-bit window is disabled by clearing a bit in the window's
+ * base reg.
+ */
+static void __init
+mv64360_disable_window_64bit(struct mv64x60_handle *bh, u32 window)
+{
+	pr_debug("disable 64bit window: %d, base_reg: 0x%x, size_reg: 0x%x\n",
+		window, mv64360_64bit_windows[window].base_lo_reg,
+		mv64360_64bit_windows[window].size_reg);
+
+	if ((mv64360_64bit_windows[window].base_lo_reg != 0) &&
+		(mv64360_64bit_windows[window].size_reg != 0)) {
+
+		if ((mv64360_64bit_windows[window].extra & MV64x60_EXTRA_MASK)
+			== MV64x60_EXTRA_PCIACC_ENAB)
+
+			mv64x60_clr_bits(bh,
+				mv64360_64bit_windows[window].base_lo_reg,
+				(1 << (mv64360_64bit_windows[window].extra &
+									0x1f)));
+		else
+			printk(KERN_ERR "mv64360_disable: %s\n",
+				"64bit table corrupted");
+	}
+
+	return;
+}
+
+/*
+ * mv64360_disable_all_windows()
+ *
+ * The MV64360 has a few windows that aren't represented in the table of
+ * windows at the top of this file.  This routine turns all of them off
+ * except for the memory controller windows, of course.
+ */
+static void __init
+mv64360_disable_all_windows(struct mv64x60_handle *bh,
+	struct mv64x60_setup_info *si)
+{
+	u32	preserve, i;
+
+	/* Disable 32bit windows (don't disable cpu->mem windows) */
+	for (i=MV64x60_CPU2DEV_0_WIN; i<MV64x60_32BIT_WIN_COUNT; i++) {
+		if (i < 32)
+			preserve = si->window_preserve_mask_32_lo & (1 << i);
+		else
+			preserve = si->window_preserve_mask_32_hi & (1<<(i-32));
+
+		if (!preserve)
+			mv64360_disable_window_32bit(bh, i);
+	}
+
+	/* Disable 64bit windows */
+	for (i=0; i<MV64x60_64BIT_WIN_COUNT; i++)
+		if (!(si->window_preserve_mask_64 & (1<<i)))
+			mv64360_disable_window_64bit(bh, i);
+
+	/* Turn off PCI->MEM access cntl wins not in mv64360_64bit_windows[] */
+	mv64x60_clr_bits(bh, MV64x60_PCI0_ACC_CNTL_4_BASE_LO, 0);
+	mv64x60_clr_bits(bh, MV64x60_PCI0_ACC_CNTL_5_BASE_LO, 0);
+	mv64x60_clr_bits(bh, MV64x60_PCI1_ACC_CNTL_4_BASE_LO, 0);
+	mv64x60_clr_bits(bh, MV64x60_PCI1_ACC_CNTL_5_BASE_LO, 0);
+
+	/* Disable all PCI-><whatever> windows */
+	mv64x60_set_bits(bh, MV64x60_PCI0_BAR_ENABLE, 0x0000f9ff);
+	mv64x60_set_bits(bh, MV64x60_PCI1_BAR_ENABLE, 0x0000f9ff);
+
+	return;
+}
+
+/*
+ * mv64360_config_io2mem_windows()
+ *
+ * ENET, MPSC, and IDMA ctlrs on the MV64[34]60 have separate windows that
+ * must be set up so that the respective ctlr can access system memory.
+ */
+static u32 enet_tab[MV64x60_CPU2MEM_WINDOWS] __initdata = {
+	MV64x60_ENET2MEM_0_WIN, MV64x60_ENET2MEM_1_WIN,
+	MV64x60_ENET2MEM_2_WIN, MV64x60_ENET2MEM_3_WIN,
+};
+
+static u32 mpsc_tab[MV64x60_CPU2MEM_WINDOWS] __initdata = {
+	MV64x60_MPSC2MEM_0_WIN, MV64x60_MPSC2MEM_1_WIN,
+	MV64x60_MPSC2MEM_2_WIN, MV64x60_MPSC2MEM_3_WIN,
+};
+
+static u32 idma_tab[MV64x60_CPU2MEM_WINDOWS] __initdata = {
+	MV64x60_IDMA2MEM_0_WIN, MV64x60_IDMA2MEM_1_WIN,
+	MV64x60_IDMA2MEM_2_WIN, MV64x60_IDMA2MEM_3_WIN,
+};
+
+static u32 dram_selects[MV64x60_CPU2MEM_WINDOWS] __initdata =
+	{ 0xe, 0xd, 0xb, 0x7 };
+
+static void __init
+mv64360_config_io2mem_windows(struct mv64x60_handle *bh,
+	struct mv64x60_setup_info *si,
+	u32 mem_windows[MV64x60_CPU2MEM_WINDOWS][2])
+{
+	u32	i, win;
+
+	pr_debug("config_io2regs_windows: enet, mpsc, idma -> bridge regs\n");
+
+	mv64x60_write(bh, MV64360_ENET2MEM_ACC_PROT_0, 0);
+	mv64x60_write(bh, MV64360_ENET2MEM_ACC_PROT_1, 0);
+	mv64x60_write(bh, MV64360_ENET2MEM_ACC_PROT_2, 0);
+
+	mv64x60_write(bh, MV64360_MPSC2MEM_ACC_PROT_0, 0);
+	mv64x60_write(bh, MV64360_MPSC2MEM_ACC_PROT_1, 0);
+
+	mv64x60_write(bh, MV64360_IDMA2MEM_ACC_PROT_0, 0);
+	mv64x60_write(bh, MV64360_IDMA2MEM_ACC_PROT_1, 0);
+	mv64x60_write(bh, MV64360_IDMA2MEM_ACC_PROT_2, 0);
+	mv64x60_write(bh, MV64360_IDMA2MEM_ACC_PROT_3, 0);
+
+	/* Assume that mem ctlr has no more windows than embedded I/O ctlr */
+	for (win=MV64x60_CPU2MEM_0_WIN,i=0;win<=MV64x60_CPU2MEM_3_WIN;win++,i++)
+		if (bh->ci->is_enabled_32bit(bh, win)) {
+			mv64x60_set_32bit_window(bh, enet_tab[i],
+				mem_windows[i][0], mem_windows[i][1],
+				(dram_selects[i] << 8) |
+				(si->enet_options[i] & 0x3000));
+			bh->ci->enable_window_32bit(bh, enet_tab[i]);
+
+			/* Give enet r/w access to memory region */
+			mv64x60_set_bits(bh, MV64360_ENET2MEM_ACC_PROT_0,
+				(0x3 << (i << 1)));
+			mv64x60_set_bits(bh, MV64360_ENET2MEM_ACC_PROT_1,
+				(0x3 << (i << 1)));
+			mv64x60_set_bits(bh, MV64360_ENET2MEM_ACC_PROT_2,
+				(0x3 << (i << 1)));
+
+			mv64x60_set_32bit_window(bh, mpsc_tab[i],
+				mem_windows[i][0], mem_windows[i][1],
+				(dram_selects[i] << 8) |
+				(si->mpsc_options[i] & 0x3000));
+			bh->ci->enable_window_32bit(bh, mpsc_tab[i]);
+
+			/* Give mpsc r/w access to memory region */
+			mv64x60_set_bits(bh, MV64360_MPSC2MEM_ACC_PROT_0,
+				(0x3 << (i << 1)));
+			mv64x60_set_bits(bh, MV64360_MPSC2MEM_ACC_PROT_1,
+				(0x3 << (i << 1)));
+
+			mv64x60_set_32bit_window(bh, idma_tab[i],
+				mem_windows[i][0], mem_windows[i][1],
+				(dram_selects[i] << 8) |
+				(si->idma_options[i] & 0x3000));
+			bh->ci->enable_window_32bit(bh, idma_tab[i]);
+
+			/* Give idma r/w access to memory region */
+			mv64x60_set_bits(bh, MV64360_IDMA2MEM_ACC_PROT_0,
+				(0x3 << (i << 1)));
+			mv64x60_set_bits(bh, MV64360_IDMA2MEM_ACC_PROT_1,
+				(0x3 << (i << 1)));
+			mv64x60_set_bits(bh, MV64360_IDMA2MEM_ACC_PROT_2,
+				(0x3 << (i << 1)));
+			mv64x60_set_bits(bh, MV64360_IDMA2MEM_ACC_PROT_3,
+				(0x3 << (i << 1)));
+		}
+
+	return;
+}
+
+/*
+ * mv64360_set_mpsc2regs_window()
+ *
+ * MPSC has a window to the bridge's internal registers.  Call this routine
+ * to change that window so it doesn't conflict with the windows mapping the
+ * mpsc to system memory.
+ */
+static void __init
+mv64360_set_mpsc2regs_window(struct mv64x60_handle *bh, u32 base)
+{
+	pr_debug("set mpsc->internal regs, base: 0x%x\n", base);
+
+	mv64x60_write(bh, MV64360_MPSC2REGS_BASE, base & 0xffff0000);
+	return;
+}
+
+/*
+ * mv64360_chip_specific_init()
+ *
+ * No errata work arounds for the MV64360 implemented at this point.
+ */
+static void __init
+mv64360_chip_specific_init(struct mv64x60_handle *bh,
+	struct mv64x60_setup_info *si)
+{
+#ifdef CONFIG_SERIAL_MPSC
+	mv64x60_mpsc0_pd_dd.brg_can_tune = 1;
+	mv64x60_mpsc0_pd_dd.cache_mgmt = 1;
+	mv64x60_mpsc1_pd_dd.brg_can_tune = 1;
+	mv64x60_mpsc1_pd_dd.cache_mgmt = 1;
+#endif
+
+	return;
+}
+
+/*
+ * mv64460_chip_specific_init()
+ *
+ * No errata work arounds for the MV64460 implemented at this point.
+ */
+static void __init
+mv64460_chip_specific_init(struct mv64x60_handle *bh,
+	struct mv64x60_setup_info *si)
+{
+#ifdef CONFIG_SERIAL_MPSC
+	mv64x60_mpsc0_pd_dd.brg_can_tune = 1;
+	mv64x60_mpsc1_pd_dd.brg_can_tune = 1;
+#endif
+	return;
+}
diff -Nru a/arch/ppc/syslib/mv64x60_dbg.c b/arch/ppc/syslib/mv64x60_dbg.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/ppc/syslib/mv64x60_dbg.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,123 @@
+/*
+ * arch/ppc/syslib/mv64x60_dbg.c
+ *
+ * KGDB and progress routines for the Marvell/Galileo MV64x60 (Discovery).
+ *
+ * Author: Mark A. Greer <mgreer@mvista.com>
+ *
+ * 2003 (c) MontaVista Software, Inc.  This file is licensed under
+ * the terms of the GNU General Public License version 2.  This program
+ * is licensed "as is" without any warranty of any kind, whether express
+ * or implied.
+ */
+
+/*
+ *****************************************************************************
+ *
+ *	Low-level MPSC/UART I/O routines
+ *
+ *****************************************************************************
+ */
+
+
+#include <linux/config.h>
+#include <linux/irq.h>
+#include <asm/delay.h>
+#include <asm/mv64x60.h>
+
+
+#if defined(CONFIG_SERIAL_TEXT_DEBUG)
+
+#define	MPSC_CHR_1	0x000c
+#define	MPSC_CHR_2	0x0010
+
+static struct mv64x60_handle	mv64x60_dbg_bh;
+
+void
+mv64x60_progress_init(u32 base)
+{
+	mv64x60_dbg_bh.v_base = base;
+	return;
+}
+
+static void
+mv64x60_polled_putc(int chan, char c)
+{
+	u32	offset;
+
+	if (chan == 0)
+		offset = 0x8000;
+	else
+		offset = 0x9000;
+
+	mv64x60_write(&mv64x60_dbg_bh, offset + MPSC_CHR_1, (u32)c);
+	mv64x60_write(&mv64x60_dbg_bh, offset + MPSC_CHR_2, 0x200);
+	udelay(2000);
+}
+
+void
+mv64x60_mpsc_progress(char *s, unsigned short hex)
+{
+	volatile char	c;
+
+	mv64x60_polled_putc(0, '\r');
+
+	while ((c = *s++) != 0)
+		mv64x60_polled_putc(0, c);
+
+	mv64x60_polled_putc(0, '\n');
+	mv64x60_polled_putc(0, '\r');
+
+	return;
+}
+#endif	/* CONFIG_SERIAL_TEXT_DEBUG */
+
+
+#if defined(CONFIG_KGDB)
+
+#if defined(CONFIG_KGDB_TTYS0)
+#define KGDB_PORT 0
+#elif defined(CONFIG_KGDB_TTYS1)
+#define KGDB_PORT 1
+#else
+#error "Invalid kgdb_tty port"
+#endif
+
+void
+putDebugChar(unsigned char c)
+{
+	mv64x60_polled_putc(KGDB_PORT, (char)c);
+}
+
+int
+getDebugChar(void)
+{
+	unsigned char	c;
+
+	while (!mv64x60_polled_getc(KGDB_PORT, &c));
+	return (int)c;
+}
+
+void
+putDebugString(char* str)
+{
+	while (*str != '\0') {
+		putDebugChar(*str);
+		str++;
+	}
+	putDebugChar('\r');
+	return;
+}
+
+void
+kgdb_interruptible(int enable)
+{
+}
+
+void
+kgdb_map_scc(void)
+{
+	if (ppc_md.early_serial_map)
+		ppc_md.early_serial_map();
+}
+#endif	/* CONFIG_KGDB */
diff -Nru a/arch/ppc/syslib/mv64x60_win.c b/arch/ppc/syslib/mv64x60_win.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/ppc/syslib/mv64x60_win.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,1168 @@
+/*
+ * arch/ppc/syslib/mv64x60_win.c
+ *
+ * Tables with info on how to manipulate the 32 & 64 bit windows on the
+ * various types of Marvell bridge chips.
+ *
+ * Author: Mark A. Greer <mgreer@mvista.com>
+ *
+ * 2004 (c) MontaVista, Software, Inc.  This file is licensed under
+ * the terms of the GNU General Public License version 2.  This program
+ * is licensed "as is" without any warranty of any kind, whether express
+ * or implied.
+ */
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/pci.h>
+#include <linux/slab.h>
+#include <linux/module.h>
+#include <linux/string.h>
+#include <linux/bootmem.h>
+#include <linux/mv643xx.h>
+
+#include <asm/byteorder.h>
+#include <asm/io.h>
+#include <asm/irq.h>
+#include <asm/uaccess.h>
+#include <asm/machdep.h>
+#include <asm/pci-bridge.h>
+#include <asm/delay.h>
+#include <asm/mv64x60.h>
+
+
+/*
+ *****************************************************************************
+ *
+ *	Tables describing how to set up windows on each type of bridge
+ *
+ *****************************************************************************
+ */
+struct mv64x60_32bit_window
+	gt64260_32bit_windows[MV64x60_32BIT_WIN_COUNT] __initdata = {
+	/* CPU->MEM Windows */
+	[MV64x60_CPU2MEM_0_WIN] = {
+		.base_reg		= MV64x60_CPU2MEM_0_BASE,
+		.size_reg		= MV64x60_CPU2MEM_0_SIZE,
+		.base_bits		= 12,
+		.size_bits		= 12,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	[MV64x60_CPU2MEM_1_WIN] = {
+		.base_reg		= MV64x60_CPU2MEM_1_BASE,
+		.size_reg		= MV64x60_CPU2MEM_1_SIZE,
+		.base_bits		= 12,
+		.size_bits		= 12,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	[MV64x60_CPU2MEM_2_WIN] = {
+		.base_reg		= MV64x60_CPU2MEM_2_BASE,
+		.size_reg		= MV64x60_CPU2MEM_2_SIZE,
+		.base_bits		= 12,
+		.size_bits		= 12,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	[MV64x60_CPU2MEM_3_WIN] = {
+		.base_reg		= MV64x60_CPU2MEM_3_BASE,
+		.size_reg		= MV64x60_CPU2MEM_3_SIZE,
+		.base_bits		= 12,
+		.size_bits		= 12,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	/* CPU->Device Windows */
+	[MV64x60_CPU2DEV_0_WIN] = {
+		.base_reg		= MV64x60_CPU2DEV_0_BASE,
+		.size_reg		= MV64x60_CPU2DEV_0_SIZE,
+		.base_bits		= 12,
+		.size_bits		= 12,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	[MV64x60_CPU2DEV_1_WIN] = {
+		.base_reg		= MV64x60_CPU2DEV_1_BASE,
+		.size_reg		= MV64x60_CPU2DEV_1_SIZE,
+		.base_bits		= 12,
+		.size_bits		= 12,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	[MV64x60_CPU2DEV_2_WIN] = {
+		.base_reg		= MV64x60_CPU2DEV_2_BASE,
+		.size_reg		= MV64x60_CPU2DEV_2_SIZE,
+		.base_bits		= 12,
+		.size_bits		= 12,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	[MV64x60_CPU2DEV_3_WIN] = {
+		.base_reg		= MV64x60_CPU2DEV_3_BASE,
+		.size_reg		= MV64x60_CPU2DEV_3_SIZE,
+		.base_bits		= 12,
+		.size_bits		= 12,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	/* CPU->Boot Window */
+	[MV64x60_CPU2BOOT_WIN] = {
+		.base_reg		= MV64x60_CPU2BOOT_0_BASE,
+		.size_reg		= MV64x60_CPU2BOOT_0_SIZE,
+		.base_bits		= 12,
+		.size_bits		= 12,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	/* CPU->PCI 0 Windows */
+	[MV64x60_CPU2PCI0_IO_WIN] = {
+		.base_reg		= MV64x60_CPU2PCI0_IO_BASE,
+		.size_reg		= MV64x60_CPU2PCI0_IO_SIZE,
+		.base_bits		= 12,
+		.size_bits		= 12,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	[MV64x60_CPU2PCI0_MEM_0_WIN] = {
+		.base_reg		= MV64x60_CPU2PCI0_MEM_0_BASE,
+		.size_reg		= MV64x60_CPU2PCI0_MEM_0_SIZE,
+		.base_bits		= 12,
+		.size_bits		= 12,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	[MV64x60_CPU2PCI0_MEM_1_WIN] = {
+		.base_reg		= MV64x60_CPU2PCI0_MEM_1_BASE,
+		.size_reg		= MV64x60_CPU2PCI0_MEM_1_SIZE,
+		.base_bits		= 12,
+		.size_bits		= 12,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	[MV64x60_CPU2PCI0_MEM_2_WIN] = {
+		.base_reg		= MV64x60_CPU2PCI0_MEM_2_BASE,
+		.size_reg		= MV64x60_CPU2PCI0_MEM_2_SIZE,
+		.base_bits		= 12,
+		.size_bits		= 12,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	[MV64x60_CPU2PCI0_MEM_3_WIN] = {
+		.base_reg		= MV64x60_CPU2PCI0_MEM_3_BASE,
+		.size_reg		= MV64x60_CPU2PCI0_MEM_3_SIZE,
+		.base_bits		= 12,
+		.size_bits		= 12,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	/* CPU->PCI 1 Windows */
+	[MV64x60_CPU2PCI1_IO_WIN] = {
+		.base_reg		= MV64x60_CPU2PCI1_IO_BASE,
+		.size_reg		= MV64x60_CPU2PCI1_IO_SIZE,
+		.base_bits		= 12,
+		.size_bits		= 12,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	[MV64x60_CPU2PCI1_MEM_0_WIN] = {
+		.base_reg		= MV64x60_CPU2PCI1_MEM_0_BASE,
+		.size_reg		= MV64x60_CPU2PCI1_MEM_0_SIZE,
+		.base_bits		= 12,
+		.size_bits		= 12,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	[MV64x60_CPU2PCI1_MEM_1_WIN] = {
+		.base_reg		= MV64x60_CPU2PCI1_MEM_1_BASE,
+		.size_reg		= MV64x60_CPU2PCI1_MEM_1_SIZE,
+		.base_bits		= 12,
+		.size_bits		= 12,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	[MV64x60_CPU2PCI1_MEM_2_WIN] = {
+		.base_reg		= MV64x60_CPU2PCI1_MEM_2_BASE,
+		.size_reg		= MV64x60_CPU2PCI1_MEM_2_SIZE,
+		.base_bits		= 12,
+		.size_bits		= 12,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	[MV64x60_CPU2PCI1_MEM_3_WIN] = {
+		.base_reg		= MV64x60_CPU2PCI1_MEM_3_BASE,
+		.size_reg		= MV64x60_CPU2PCI1_MEM_3_SIZE,
+		.base_bits		= 12,
+		.size_bits		= 12,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	/* CPU->SRAM Window (64260 has no integrated SRAM) */
+	/* CPU->PCI 0 Remap I/O Window */
+	[MV64x60_CPU2PCI0_IO_REMAP_WIN] = {
+		.base_reg		= MV64x60_CPU2PCI0_IO_REMAP,
+		.size_reg		= 0,
+		.base_bits		= 12,
+		.size_bits		= 0,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	/* CPU->PCI 1 Remap I/O Window */
+	[MV64x60_CPU2PCI1_IO_REMAP_WIN] = {
+		.base_reg		= MV64x60_CPU2PCI1_IO_REMAP,
+		.size_reg		= 0,
+		.base_bits		= 12,
+		.size_bits		= 0,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	/* CPU Memory Protection Windows */
+	[MV64x60_CPU_PROT_0_WIN] = {
+		.base_reg		= MV64x60_CPU_PROT_BASE_0,
+		.size_reg		= MV64x60_CPU_PROT_SIZE_0,
+		.base_bits		= 12,
+		.size_bits		= 12,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	[MV64x60_CPU_PROT_1_WIN] = {
+		.base_reg		= MV64x60_CPU_PROT_BASE_1,
+		.size_reg		= MV64x60_CPU_PROT_SIZE_1,
+		.base_bits		= 12,
+		.size_bits		= 12,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	[MV64x60_CPU_PROT_2_WIN] = {
+		.base_reg		= MV64x60_CPU_PROT_BASE_2,
+		.size_reg		= MV64x60_CPU_PROT_SIZE_2,
+		.base_bits		= 12,
+		.size_bits		= 12,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	[MV64x60_CPU_PROT_3_WIN] = {
+		.base_reg		= MV64x60_CPU_PROT_BASE_3,
+		.size_reg		= MV64x60_CPU_PROT_SIZE_3,
+		.base_bits		= 12,
+		.size_bits		= 12,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	/* CPU Snoop Windows */
+	[MV64x60_CPU_SNOOP_0_WIN] = {
+		.base_reg		= GT64260_CPU_SNOOP_BASE_0,
+		.size_reg		= GT64260_CPU_SNOOP_SIZE_0,
+		.base_bits		= 12,
+		.size_bits		= 12,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	[MV64x60_CPU_SNOOP_1_WIN] = {
+		.base_reg		= GT64260_CPU_SNOOP_BASE_1,
+		.size_reg		= GT64260_CPU_SNOOP_SIZE_1,
+		.base_bits		= 12,
+		.size_bits		= 12,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	[MV64x60_CPU_SNOOP_2_WIN] = {
+		.base_reg		= GT64260_CPU_SNOOP_BASE_2,
+		.size_reg		= GT64260_CPU_SNOOP_SIZE_2,
+		.base_bits		= 12,
+		.size_bits		= 12,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	[MV64x60_CPU_SNOOP_3_WIN] = {
+		.base_reg		= GT64260_CPU_SNOOP_BASE_3,
+		.size_reg		= GT64260_CPU_SNOOP_SIZE_3,
+		.base_bits		= 12,
+		.size_bits		= 12,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	/* PCI 0->System Memory Remap Windows */
+	[MV64x60_PCI02MEM_REMAP_0_WIN] = {
+		.base_reg		= MV64x60_PCI0_SLAVE_MEM_0_REMAP,
+		.size_reg		= 0,
+		.base_bits		= 20,
+		.size_bits		= 0,
+		.get_from_field		= mv64x60_mask,
+		.map_to_field		= mv64x60_mask,
+		.extra			= 0 },
+	[MV64x60_PCI02MEM_REMAP_1_WIN] = {
+		.base_reg		= MV64x60_PCI0_SLAVE_MEM_1_REMAP,
+		.size_reg		= 0,
+		.base_bits		= 20,
+		.size_bits		= 0,
+		.get_from_field		= mv64x60_mask,
+		.map_to_field		= mv64x60_mask,
+		.extra			= 0 },
+	[MV64x60_PCI02MEM_REMAP_2_WIN] = {
+		.base_reg		= MV64x60_PCI0_SLAVE_MEM_1_REMAP,
+		.size_reg		= 0,
+		.base_bits		= 20,
+		.size_bits		= 0,
+		.get_from_field		= mv64x60_mask,
+		.map_to_field		= mv64x60_mask,
+		.extra			= 0 },
+	[MV64x60_PCI02MEM_REMAP_3_WIN] = {
+		.base_reg		= MV64x60_PCI0_SLAVE_MEM_1_REMAP,
+		.size_reg		= 0,
+		.base_bits		= 20,
+		.size_bits		= 0,
+		.get_from_field		= mv64x60_mask,
+		.map_to_field		= mv64x60_mask,
+		.extra			= 0 },
+	/* PCI 1->System Memory Remap Windows */
+	[MV64x60_PCI12MEM_REMAP_0_WIN] = {
+		.base_reg		= MV64x60_PCI1_SLAVE_MEM_0_REMAP,
+		.size_reg		= 0,
+		.base_bits		= 20,
+		.size_bits		= 0,
+		.get_from_field		= mv64x60_mask,
+		.map_to_field		= mv64x60_mask,
+		.extra			= 0 },
+	[MV64x60_PCI12MEM_REMAP_1_WIN] = {
+		.base_reg		= MV64x60_PCI1_SLAVE_MEM_1_REMAP,
+		.size_reg		= 0,
+		.base_bits		= 20,
+		.size_bits		= 0,
+		.get_from_field		= mv64x60_mask,
+		.map_to_field		= mv64x60_mask,
+		.extra			= 0 },
+	[MV64x60_PCI12MEM_REMAP_2_WIN] = {
+		.base_reg		= MV64x60_PCI1_SLAVE_MEM_1_REMAP,
+		.size_reg		= 0,
+		.base_bits		= 20,
+		.size_bits		= 0,
+		.get_from_field		= mv64x60_mask,
+		.map_to_field		= mv64x60_mask,
+		.extra			= 0 },
+	[MV64x60_PCI12MEM_REMAP_3_WIN] = {
+		.base_reg		= MV64x60_PCI1_SLAVE_MEM_1_REMAP,
+		.size_reg		= 0,
+		.base_bits		= 20,
+		.size_bits		= 0,
+		.get_from_field		= mv64x60_mask,
+		.map_to_field		= mv64x60_mask,
+		.extra			= 0 },
+	/* ENET->SRAM Window (64260 doesn't have separate windows) */
+	/* MPSC->SRAM Window (64260 doesn't have separate windows) */
+	/* IDMA->SRAM Window (64260 doesn't have separate windows) */
+};
+
+struct mv64x60_64bit_window
+	gt64260_64bit_windows[MV64x60_64BIT_WIN_COUNT] __initdata = {
+	/* CPU->PCI 0 MEM Remap Windows */
+	[MV64x60_CPU2PCI0_MEM_0_REMAP_WIN] = {
+		.base_hi_reg		= MV64x60_CPU2PCI0_MEM_0_REMAP_HI,
+		.base_lo_reg		= MV64x60_CPU2PCI0_MEM_0_REMAP_LO,
+		.size_reg		= 0,
+		.base_lo_bits		= 12,
+		.size_bits		= 0,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	[MV64x60_CPU2PCI0_MEM_1_REMAP_WIN] = {
+		.base_hi_reg		= MV64x60_CPU2PCI0_MEM_1_REMAP_HI,
+		.base_lo_reg		= MV64x60_CPU2PCI0_MEM_1_REMAP_LO,
+		.size_reg		= 0,
+		.base_lo_bits		= 12,
+		.size_bits		= 0,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	[MV64x60_CPU2PCI0_MEM_2_REMAP_WIN] = {
+		.base_hi_reg		= MV64x60_CPU2PCI0_MEM_2_REMAP_HI,
+		.base_lo_reg		= MV64x60_CPU2PCI0_MEM_2_REMAP_LO,
+		.size_reg		= 0,
+		.base_lo_bits		= 12,
+		.size_bits		= 0,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	[MV64x60_CPU2PCI0_MEM_3_REMAP_WIN] = {
+		.base_hi_reg		= MV64x60_CPU2PCI0_MEM_3_REMAP_HI,
+		.base_lo_reg		= MV64x60_CPU2PCI0_MEM_3_REMAP_LO,
+		.size_reg		= 0,
+		.base_lo_bits		= 12,
+		.size_bits		= 0,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	/* CPU->PCI 1 MEM Remap Windows */
+	[MV64x60_CPU2PCI1_MEM_0_REMAP_WIN] = {
+		.base_hi_reg		= MV64x60_CPU2PCI1_MEM_0_REMAP_HI,
+		.base_lo_reg		= MV64x60_CPU2PCI1_MEM_0_REMAP_LO,
+		.size_reg		= 0,
+		.base_lo_bits		= 12,
+		.size_bits		= 0,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	[MV64x60_CPU2PCI1_MEM_1_REMAP_WIN] = {
+		.base_hi_reg		= MV64x60_CPU2PCI1_MEM_1_REMAP_HI,
+		.base_lo_reg		= MV64x60_CPU2PCI1_MEM_1_REMAP_LO,
+		.size_reg		= 0,
+		.base_lo_bits		= 12,
+		.size_bits		= 0,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	[MV64x60_CPU2PCI1_MEM_2_REMAP_WIN] = {
+		.base_hi_reg		= MV64x60_CPU2PCI1_MEM_2_REMAP_HI,
+		.base_lo_reg		= MV64x60_CPU2PCI1_MEM_2_REMAP_LO,
+		.size_reg		= 0,
+		.base_lo_bits		= 12,
+		.size_bits		= 0,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	[MV64x60_CPU2PCI1_MEM_3_REMAP_WIN] = {
+		.base_hi_reg		= MV64x60_CPU2PCI1_MEM_3_REMAP_HI,
+		.base_lo_reg		= MV64x60_CPU2PCI1_MEM_3_REMAP_LO,
+		.size_reg		= 0,
+		.base_lo_bits		= 12,
+		.size_bits		= 0,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	/* PCI 0->MEM Access Control Windows */
+	[MV64x60_PCI02MEM_ACC_CNTL_0_WIN] = {
+		.base_hi_reg		= MV64x60_PCI0_ACC_CNTL_0_BASE_HI,
+		.base_lo_reg		= MV64x60_PCI0_ACC_CNTL_0_BASE_LO,
+		.size_reg		= MV64x60_PCI0_ACC_CNTL_0_SIZE,
+		.base_lo_bits		= 12,
+		.size_bits		= 12,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	[MV64x60_PCI02MEM_ACC_CNTL_1_WIN] = {
+		.base_hi_reg		= MV64x60_PCI0_ACC_CNTL_1_BASE_HI,
+		.base_lo_reg		= MV64x60_PCI0_ACC_CNTL_1_BASE_LO,
+		.size_reg		= MV64x60_PCI0_ACC_CNTL_1_SIZE,
+		.base_lo_bits		= 12,
+		.size_bits		= 12,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	[MV64x60_PCI02MEM_ACC_CNTL_2_WIN] = {
+		.base_hi_reg		= MV64x60_PCI0_ACC_CNTL_2_BASE_HI,
+		.base_lo_reg		= MV64x60_PCI0_ACC_CNTL_2_BASE_LO,
+		.size_reg		= MV64x60_PCI0_ACC_CNTL_2_SIZE,
+		.base_lo_bits		= 12,
+		.size_bits		= 12,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	[MV64x60_PCI02MEM_ACC_CNTL_3_WIN] = {
+		.base_hi_reg		= MV64x60_PCI0_ACC_CNTL_3_BASE_HI,
+		.base_lo_reg		= MV64x60_PCI0_ACC_CNTL_3_BASE_LO,
+		.size_reg		= MV64x60_PCI0_ACC_CNTL_3_SIZE,
+		.base_lo_bits		= 12,
+		.size_bits		= 12,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	/* PCI 1->MEM Access Control Windows */
+	[MV64x60_PCI12MEM_ACC_CNTL_0_WIN] = {
+		.base_hi_reg		= MV64x60_PCI1_ACC_CNTL_0_BASE_HI,
+		.base_lo_reg		= MV64x60_PCI1_ACC_CNTL_0_BASE_LO,
+		.size_reg		= MV64x60_PCI1_ACC_CNTL_0_SIZE,
+		.base_lo_bits		= 12,
+		.size_bits		= 12,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	[MV64x60_PCI12MEM_ACC_CNTL_1_WIN] = {
+		.base_hi_reg		= MV64x60_PCI1_ACC_CNTL_1_BASE_HI,
+		.base_lo_reg		= MV64x60_PCI1_ACC_CNTL_1_BASE_LO,
+		.size_reg		= MV64x60_PCI1_ACC_CNTL_1_SIZE,
+		.base_lo_bits		= 12,
+		.size_bits		= 12,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	[MV64x60_PCI12MEM_ACC_CNTL_2_WIN] = {
+		.base_hi_reg		= MV64x60_PCI1_ACC_CNTL_2_BASE_HI,
+		.base_lo_reg		= MV64x60_PCI1_ACC_CNTL_2_BASE_LO,
+		.size_reg		= MV64x60_PCI1_ACC_CNTL_2_SIZE,
+		.base_lo_bits		= 12,
+		.size_bits		= 12,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	[MV64x60_PCI12MEM_ACC_CNTL_3_WIN] = {
+		.base_hi_reg		= MV64x60_PCI1_ACC_CNTL_3_BASE_HI,
+		.base_lo_reg		= MV64x60_PCI1_ACC_CNTL_3_BASE_LO,
+		.size_reg		= MV64x60_PCI1_ACC_CNTL_3_SIZE,
+		.base_lo_bits		= 12,
+		.size_bits		= 12,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	/* PCI 0->MEM Snoop Windows */
+	[MV64x60_PCI02MEM_SNOOP_0_WIN] = {
+		.base_hi_reg		= GT64260_PCI0_SNOOP_0_BASE_HI,
+		.base_lo_reg		= GT64260_PCI0_SNOOP_0_BASE_LO,
+		.size_reg		= GT64260_PCI0_SNOOP_0_SIZE,
+		.base_lo_bits		= 12,
+		.size_bits		= 12,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	[MV64x60_PCI02MEM_SNOOP_1_WIN] = {
+		.base_hi_reg		= GT64260_PCI0_SNOOP_1_BASE_HI,
+		.base_lo_reg		= GT64260_PCI0_SNOOP_1_BASE_LO,
+		.size_reg		= GT64260_PCI0_SNOOP_1_SIZE,
+		.base_lo_bits		= 12,
+		.size_bits		= 12,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	[MV64x60_PCI02MEM_SNOOP_2_WIN] = {
+		.base_hi_reg		= GT64260_PCI0_SNOOP_2_BASE_HI,
+		.base_lo_reg		= GT64260_PCI0_SNOOP_2_BASE_LO,
+		.size_reg		= GT64260_PCI0_SNOOP_2_SIZE,
+		.base_lo_bits		= 12,
+		.size_bits		= 12,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	[MV64x60_PCI02MEM_SNOOP_3_WIN] = {
+		.base_hi_reg		= GT64260_PCI0_SNOOP_3_BASE_HI,
+		.base_lo_reg		= GT64260_PCI0_SNOOP_3_BASE_LO,
+		.size_reg		= GT64260_PCI0_SNOOP_3_SIZE,
+		.base_lo_bits		= 12,
+		.size_bits		= 12,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	/* PCI 1->MEM Snoop Windows */
+	[MV64x60_PCI12MEM_SNOOP_0_WIN] = {
+		.base_hi_reg		= GT64260_PCI1_SNOOP_0_BASE_HI,
+		.base_lo_reg		= GT64260_PCI1_SNOOP_0_BASE_LO,
+		.size_reg		= GT64260_PCI1_SNOOP_0_SIZE,
+		.base_lo_bits		= 12,
+		.size_bits		= 12,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	[MV64x60_PCI12MEM_SNOOP_1_WIN] = {
+		.base_hi_reg		= GT64260_PCI1_SNOOP_1_BASE_HI,
+		.base_lo_reg		= GT64260_PCI1_SNOOP_1_BASE_LO,
+		.size_reg		= GT64260_PCI1_SNOOP_1_SIZE,
+		.base_lo_bits		= 12,
+		.size_bits		= 12,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	[MV64x60_PCI12MEM_SNOOP_2_WIN] = {
+		.base_hi_reg		= GT64260_PCI1_SNOOP_2_BASE_HI,
+		.base_lo_reg		= GT64260_PCI1_SNOOP_2_BASE_LO,
+		.size_reg		= GT64260_PCI1_SNOOP_2_SIZE,
+		.base_lo_bits		= 12,
+		.size_bits		= 12,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	[MV64x60_PCI12MEM_SNOOP_3_WIN] = {
+		.base_hi_reg		= GT64260_PCI1_SNOOP_3_BASE_HI,
+		.base_lo_reg		= GT64260_PCI1_SNOOP_3_BASE_LO,
+		.size_reg		= GT64260_PCI1_SNOOP_3_SIZE,
+		.base_lo_bits		= 12,
+		.size_bits		= 12,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+};
+
+struct mv64x60_32bit_window
+	mv64360_32bit_windows[MV64x60_32BIT_WIN_COUNT] __initdata = {
+	/* CPU->MEM Windows */
+	[MV64x60_CPU2MEM_0_WIN] = {
+		.base_reg		= MV64x60_CPU2MEM_0_BASE,
+		.size_reg		= MV64x60_CPU2MEM_0_SIZE,
+		.base_bits		= 16,
+		.size_bits		= 16,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= MV64x60_EXTRA_CPUWIN_ENAB | 0 },
+	[MV64x60_CPU2MEM_1_WIN] = {
+		.base_reg		= MV64x60_CPU2MEM_1_BASE,
+		.size_reg		= MV64x60_CPU2MEM_1_SIZE,
+		.base_bits		= 16,
+		.size_bits		= 16,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= MV64x60_EXTRA_CPUWIN_ENAB | 1 },
+	[MV64x60_CPU2MEM_2_WIN] = {
+		.base_reg		= MV64x60_CPU2MEM_2_BASE,
+		.size_reg		= MV64x60_CPU2MEM_2_SIZE,
+		.base_bits		= 16,
+		.size_bits		= 16,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= MV64x60_EXTRA_CPUWIN_ENAB | 2 },
+	[MV64x60_CPU2MEM_3_WIN] = {
+		.base_reg		= MV64x60_CPU2MEM_3_BASE,
+		.size_reg		= MV64x60_CPU2MEM_3_SIZE,
+		.base_bits		= 16,
+		.size_bits		= 16,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= MV64x60_EXTRA_CPUWIN_ENAB | 3 },
+	/* CPU->Device Windows */
+	[MV64x60_CPU2DEV_0_WIN] = {
+		.base_reg		= MV64x60_CPU2DEV_0_BASE,
+		.size_reg		= MV64x60_CPU2DEV_0_SIZE,
+		.base_bits		= 16,
+		.size_bits		= 16,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= MV64x60_EXTRA_CPUWIN_ENAB | 4 },
+	[MV64x60_CPU2DEV_1_WIN] = {
+		.base_reg		= MV64x60_CPU2DEV_1_BASE,
+		.size_reg		= MV64x60_CPU2DEV_1_SIZE,
+		.base_bits		= 16,
+		.size_bits		= 16,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= MV64x60_EXTRA_CPUWIN_ENAB | 5 },
+	[MV64x60_CPU2DEV_2_WIN] = {
+		.base_reg		= MV64x60_CPU2DEV_2_BASE,
+		.size_reg		= MV64x60_CPU2DEV_2_SIZE,
+		.base_bits		= 16,
+		.size_bits		= 16,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= MV64x60_EXTRA_CPUWIN_ENAB | 6 },
+	[MV64x60_CPU2DEV_3_WIN] = {
+		.base_reg		= MV64x60_CPU2DEV_3_BASE,
+		.size_reg		= MV64x60_CPU2DEV_3_SIZE,
+		.base_bits		= 16,
+		.size_bits		= 16,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= MV64x60_EXTRA_CPUWIN_ENAB | 7 },
+	/* CPU->Boot Window */
+	[MV64x60_CPU2BOOT_WIN] = {
+		.base_reg		= MV64x60_CPU2BOOT_0_BASE,
+		.size_reg		= MV64x60_CPU2BOOT_0_SIZE,
+		.base_bits		= 16,
+		.size_bits		= 16,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= MV64x60_EXTRA_CPUWIN_ENAB | 8 },
+	/* CPU->PCI 0 Windows */
+	[MV64x60_CPU2PCI0_IO_WIN] = {
+		.base_reg		= MV64x60_CPU2PCI0_IO_BASE,
+		.size_reg		= MV64x60_CPU2PCI0_IO_SIZE,
+		.base_bits		= 16,
+		.size_bits		= 16,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= MV64x60_EXTRA_CPUWIN_ENAB | 9 },
+	[MV64x60_CPU2PCI0_MEM_0_WIN] = {
+		.base_reg		= MV64x60_CPU2PCI0_MEM_0_BASE,
+		.size_reg		= MV64x60_CPU2PCI0_MEM_0_SIZE,
+		.base_bits		= 16,
+		.size_bits		= 16,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= MV64x60_EXTRA_CPUWIN_ENAB | 10 },
+	[MV64x60_CPU2PCI0_MEM_1_WIN] = {
+		.base_reg		= MV64x60_CPU2PCI0_MEM_1_BASE,
+		.size_reg		= MV64x60_CPU2PCI0_MEM_1_SIZE,
+		.base_bits		= 16,
+		.size_bits		= 16,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= MV64x60_EXTRA_CPUWIN_ENAB | 11 },
+	[MV64x60_CPU2PCI0_MEM_2_WIN] = {
+		.base_reg		= MV64x60_CPU2PCI0_MEM_2_BASE,
+		.size_reg		= MV64x60_CPU2PCI0_MEM_2_SIZE,
+		.base_bits		= 16,
+		.size_bits		= 16,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= MV64x60_EXTRA_CPUWIN_ENAB | 12 },
+	[MV64x60_CPU2PCI0_MEM_3_WIN] = {
+		.base_reg		= MV64x60_CPU2PCI0_MEM_3_BASE,
+		.size_reg		= MV64x60_CPU2PCI0_MEM_3_SIZE,
+		.base_bits		= 16,
+		.size_bits		= 16,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= MV64x60_EXTRA_CPUWIN_ENAB | 13 },
+	/* CPU->PCI 1 Windows */
+	[MV64x60_CPU2PCI1_IO_WIN] = {
+		.base_reg		= MV64x60_CPU2PCI1_IO_BASE,
+		.size_reg		= MV64x60_CPU2PCI1_IO_SIZE,
+		.base_bits		= 16,
+		.size_bits		= 16,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= MV64x60_EXTRA_CPUWIN_ENAB | 14 },
+	[MV64x60_CPU2PCI1_MEM_0_WIN] = {
+		.base_reg		= MV64x60_CPU2PCI1_MEM_0_BASE,
+		.size_reg		= MV64x60_CPU2PCI1_MEM_0_SIZE,
+		.base_bits		= 16,
+		.size_bits		= 16,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= MV64x60_EXTRA_CPUWIN_ENAB | 15 },
+	[MV64x60_CPU2PCI1_MEM_1_WIN] = {
+		.base_reg		= MV64x60_CPU2PCI1_MEM_1_BASE,
+		.size_reg		= MV64x60_CPU2PCI1_MEM_1_SIZE,
+		.base_bits		= 16,
+		.size_bits		= 16,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= MV64x60_EXTRA_CPUWIN_ENAB | 16 },
+	[MV64x60_CPU2PCI1_MEM_2_WIN] = {
+		.base_reg		= MV64x60_CPU2PCI1_MEM_2_BASE,
+		.size_reg		= MV64x60_CPU2PCI1_MEM_2_SIZE,
+		.base_bits		= 16,
+		.size_bits		= 16,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= MV64x60_EXTRA_CPUWIN_ENAB | 17 },
+	[MV64x60_CPU2PCI1_MEM_3_WIN] = {
+		.base_reg		= MV64x60_CPU2PCI1_MEM_3_BASE,
+		.size_reg		= MV64x60_CPU2PCI1_MEM_3_SIZE,
+		.base_bits		= 16,
+		.size_bits		= 16,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= MV64x60_EXTRA_CPUWIN_ENAB | 18 },
+	/* CPU->SRAM Window */
+	[MV64x60_CPU2SRAM_WIN] = {
+		.base_reg		= MV64360_CPU2SRAM_BASE,
+		.size_reg		= 0,
+		.base_bits		= 16,
+		.size_bits		= 0,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= MV64x60_EXTRA_CPUWIN_ENAB | 19 },
+	/* CPU->PCI 0 Remap I/O Window */
+	[MV64x60_CPU2PCI0_IO_REMAP_WIN] = {
+		.base_reg		= MV64x60_CPU2PCI0_IO_REMAP,
+		.size_reg		= 0,
+		.base_bits		= 16,
+		.size_bits		= 0,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	/* CPU->PCI 1 Remap I/O Window */
+	[MV64x60_CPU2PCI1_IO_REMAP_WIN] = {
+		.base_reg		= MV64x60_CPU2PCI1_IO_REMAP,
+		.size_reg		= 0,
+		.base_bits		= 16,
+		.size_bits		= 0,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	/* CPU Memory Protection Windows */
+	[MV64x60_CPU_PROT_0_WIN] = {
+		.base_reg		= MV64x60_CPU_PROT_BASE_0,
+		.size_reg		= MV64x60_CPU_PROT_SIZE_0,
+		.base_bits		= 16,
+		.size_bits		= 16,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= MV64x60_EXTRA_CPUPROT_ENAB | 31 },
+	[MV64x60_CPU_PROT_1_WIN] = {
+		.base_reg		= MV64x60_CPU_PROT_BASE_1,
+		.size_reg		= MV64x60_CPU_PROT_SIZE_1,
+		.base_bits		= 16,
+		.size_bits		= 16,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= MV64x60_EXTRA_CPUPROT_ENAB | 31 },
+	[MV64x60_CPU_PROT_2_WIN] = {
+		.base_reg		= MV64x60_CPU_PROT_BASE_2,
+		.size_reg		= MV64x60_CPU_PROT_SIZE_2,
+		.base_bits		= 16,
+		.size_bits		= 16,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= MV64x60_EXTRA_CPUPROT_ENAB | 31 },
+	[MV64x60_CPU_PROT_3_WIN] = {
+		.base_reg		= MV64x60_CPU_PROT_BASE_3,
+		.size_reg		= MV64x60_CPU_PROT_SIZE_3,
+		.base_bits		= 16,
+		.size_bits		= 16,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= MV64x60_EXTRA_CPUPROT_ENAB | 31 },
+	/* CPU Snoop Windows -- don't exist on 64360 */
+	/* PCI 0->System Memory Remap Windows */
+	[MV64x60_PCI02MEM_REMAP_0_WIN] = {
+		.base_reg		= MV64x60_PCI0_SLAVE_MEM_0_REMAP,
+		.size_reg		= 0,
+		.base_bits		= 20,
+		.size_bits		= 0,
+		.get_from_field		= mv64x60_mask,
+		.map_to_field		= mv64x60_mask,
+		.extra			= 0 },
+	[MV64x60_PCI02MEM_REMAP_1_WIN] = {
+		.base_reg		= MV64x60_PCI0_SLAVE_MEM_1_REMAP,
+		.size_reg		= 0,
+		.base_bits		= 20,
+		.size_bits		= 0,
+		.get_from_field		= mv64x60_mask,
+		.map_to_field		= mv64x60_mask,
+		.extra			= 0 },
+	[MV64x60_PCI02MEM_REMAP_2_WIN] = {
+		.base_reg		= MV64x60_PCI0_SLAVE_MEM_1_REMAP,
+		.size_reg		= 0,
+		.base_bits		= 20,
+		.size_bits		= 0,
+		.get_from_field		= mv64x60_mask,
+		.map_to_field		= mv64x60_mask,
+		.extra			= 0 },
+	[MV64x60_PCI02MEM_REMAP_3_WIN] = {
+		.base_reg		= MV64x60_PCI0_SLAVE_MEM_1_REMAP,
+		.size_reg		= 0,
+		.base_bits		= 20,
+		.size_bits		= 0,
+		.get_from_field		= mv64x60_mask,
+		.map_to_field		= mv64x60_mask,
+		.extra			= 0 },
+	/* PCI 1->System Memory Remap Windows */
+	[MV64x60_PCI12MEM_REMAP_0_WIN] = {
+		.base_reg		= MV64x60_PCI1_SLAVE_MEM_0_REMAP,
+		.size_reg		= 0,
+		.base_bits		= 20,
+		.size_bits		= 0,
+		.get_from_field		= mv64x60_mask,
+		.map_to_field		= mv64x60_mask,
+		.extra			= 0 },
+	[MV64x60_PCI12MEM_REMAP_1_WIN] = {
+		.base_reg		= MV64x60_PCI1_SLAVE_MEM_1_REMAP,
+		.size_reg		= 0,
+		.base_bits		= 20,
+		.size_bits		= 0,
+		.get_from_field		= mv64x60_mask,
+		.map_to_field		= mv64x60_mask,
+		.extra			= 0 },
+	[MV64x60_PCI12MEM_REMAP_2_WIN] = {
+		.base_reg		= MV64x60_PCI1_SLAVE_MEM_1_REMAP,
+		.size_reg		= 0,
+		.base_bits		= 20,
+		.size_bits		= 0,
+		.get_from_field		= mv64x60_mask,
+		.map_to_field		= mv64x60_mask,
+		.extra			= 0 },
+	[MV64x60_PCI12MEM_REMAP_3_WIN] = {
+		.base_reg		= MV64x60_PCI1_SLAVE_MEM_1_REMAP,
+		.size_reg		= 0,
+		.base_bits		= 20,
+		.size_bits		= 0,
+		.get_from_field		= mv64x60_mask,
+		.map_to_field		= mv64x60_mask,
+		.extra			= 0 },
+	/* ENET->System Memory Windows */
+	[MV64x60_ENET2MEM_0_WIN] = {
+		.base_reg		= MV64360_ENET2MEM_0_BASE,
+		.size_reg		= MV64360_ENET2MEM_0_SIZE,
+		.base_bits		= 16,
+		.size_bits		= 16,
+		.get_from_field		= mv64x60_mask,
+		.map_to_field		= mv64x60_mask,
+		.extra			= MV64x60_EXTRA_ENET_ENAB | 0 },
+	[MV64x60_ENET2MEM_1_WIN] = {
+		.base_reg		= MV64360_ENET2MEM_1_BASE,
+		.size_reg		= MV64360_ENET2MEM_1_SIZE,
+		.base_bits		= 16,
+		.size_bits		= 16,
+		.get_from_field		= mv64x60_mask,
+		.map_to_field		= mv64x60_mask,
+		.extra			= MV64x60_EXTRA_ENET_ENAB | 1 },
+	[MV64x60_ENET2MEM_2_WIN] = {
+		.base_reg		= MV64360_ENET2MEM_2_BASE,
+		.size_reg		= MV64360_ENET2MEM_2_SIZE,
+		.base_bits		= 16,
+		.size_bits		= 16,
+		.get_from_field		= mv64x60_mask,
+		.map_to_field		= mv64x60_mask,
+		.extra			= MV64x60_EXTRA_ENET_ENAB | 2 },
+	[MV64x60_ENET2MEM_3_WIN] = {
+		.base_reg		= MV64360_ENET2MEM_3_BASE,
+		.size_reg		= MV64360_ENET2MEM_3_SIZE,
+		.base_bits		= 16,
+		.size_bits		= 16,
+		.get_from_field		= mv64x60_mask,
+		.map_to_field		= mv64x60_mask,
+		.extra			= MV64x60_EXTRA_ENET_ENAB | 3 },
+	[MV64x60_ENET2MEM_4_WIN] = {
+		.base_reg		= MV64360_ENET2MEM_4_BASE,
+		.size_reg		= MV64360_ENET2MEM_4_SIZE,
+		.base_bits		= 16,
+		.size_bits		= 16,
+		.get_from_field		= mv64x60_mask,
+		.map_to_field		= mv64x60_mask,
+		.extra			= MV64x60_EXTRA_ENET_ENAB | 4 },
+	[MV64x60_ENET2MEM_5_WIN] = {
+		.base_reg		= MV64360_ENET2MEM_5_BASE,
+		.size_reg		= MV64360_ENET2MEM_5_SIZE,
+		.base_bits		= 16,
+		.size_bits		= 16,
+		.get_from_field		= mv64x60_mask,
+		.map_to_field		= mv64x60_mask,
+		.extra			= MV64x60_EXTRA_ENET_ENAB | 5 },
+	/* MPSC->System Memory Windows */
+	[MV64x60_MPSC2MEM_0_WIN] = {
+		.base_reg		= MV64360_MPSC2MEM_0_BASE,
+		.size_reg		= MV64360_MPSC2MEM_0_SIZE,
+		.base_bits		= 16,
+		.size_bits		= 16,
+		.get_from_field		= mv64x60_mask,
+		.map_to_field		= mv64x60_mask,
+		.extra			= MV64x60_EXTRA_MPSC_ENAB | 0 },
+	[MV64x60_MPSC2MEM_1_WIN] = {
+		.base_reg		= MV64360_MPSC2MEM_1_BASE,
+		.size_reg		= MV64360_MPSC2MEM_1_SIZE,
+		.base_bits		= 16,
+		.size_bits		= 16,
+		.get_from_field		= mv64x60_mask,
+		.map_to_field		= mv64x60_mask,
+		.extra			= MV64x60_EXTRA_MPSC_ENAB | 1 },
+	[MV64x60_MPSC2MEM_2_WIN] = {
+		.base_reg		= MV64360_MPSC2MEM_2_BASE,
+		.size_reg		= MV64360_MPSC2MEM_2_SIZE,
+		.base_bits		= 16,
+		.size_bits		= 16,
+		.get_from_field		= mv64x60_mask,
+		.map_to_field		= mv64x60_mask,
+		.extra			= MV64x60_EXTRA_MPSC_ENAB | 2 },
+	[MV64x60_MPSC2MEM_3_WIN] = {
+		.base_reg		= MV64360_MPSC2MEM_3_BASE,
+		.size_reg		= MV64360_MPSC2MEM_3_SIZE,
+		.base_bits		= 16,
+		.size_bits		= 16,
+		.get_from_field		= mv64x60_mask,
+		.map_to_field		= mv64x60_mask,
+		.extra			= MV64x60_EXTRA_MPSC_ENAB | 3 },
+	/* IDMA->System Memory Windows */
+	[MV64x60_IDMA2MEM_0_WIN] = {
+		.base_reg		= MV64360_IDMA2MEM_0_BASE,
+		.size_reg		= MV64360_IDMA2MEM_0_SIZE,
+		.base_bits		= 16,
+		.size_bits		= 16,
+		.get_from_field		= mv64x60_mask,
+		.map_to_field		= mv64x60_mask,
+		.extra			= MV64x60_EXTRA_IDMA_ENAB | 0 },
+	[MV64x60_IDMA2MEM_1_WIN] = {
+		.base_reg		= MV64360_IDMA2MEM_1_BASE,
+		.size_reg		= MV64360_IDMA2MEM_1_SIZE,
+		.base_bits		= 16,
+		.size_bits		= 16,
+		.get_from_field		= mv64x60_mask,
+		.map_to_field		= mv64x60_mask,
+		.extra			= MV64x60_EXTRA_IDMA_ENAB | 1 },
+	[MV64x60_IDMA2MEM_2_WIN] = {
+		.base_reg		= MV64360_IDMA2MEM_2_BASE,
+		.size_reg		= MV64360_IDMA2MEM_2_SIZE,
+		.base_bits		= 16,
+		.size_bits		= 16,
+		.get_from_field		= mv64x60_mask,
+		.map_to_field		= mv64x60_mask,
+		.extra			= MV64x60_EXTRA_IDMA_ENAB | 2 },
+	[MV64x60_IDMA2MEM_3_WIN] = {
+		.base_reg		= MV64360_IDMA2MEM_3_BASE,
+		.size_reg		= MV64360_IDMA2MEM_3_SIZE,
+		.base_bits		= 16,
+		.size_bits		= 16,
+		.get_from_field		= mv64x60_mask,
+		.map_to_field		= mv64x60_mask,
+		.extra			= MV64x60_EXTRA_IDMA_ENAB | 3 },
+	[MV64x60_IDMA2MEM_4_WIN] = {
+		.base_reg		= MV64360_IDMA2MEM_4_BASE,
+		.size_reg		= MV64360_IDMA2MEM_4_SIZE,
+		.base_bits		= 16,
+		.size_bits		= 16,
+		.get_from_field		= mv64x60_mask,
+		.map_to_field		= mv64x60_mask,
+		.extra			= MV64x60_EXTRA_IDMA_ENAB | 4 },
+	[MV64x60_IDMA2MEM_5_WIN] = {
+		.base_reg		= MV64360_IDMA2MEM_5_BASE,
+		.size_reg		= MV64360_IDMA2MEM_5_SIZE,
+		.base_bits		= 16,
+		.size_bits		= 16,
+		.get_from_field		= mv64x60_mask,
+		.map_to_field		= mv64x60_mask,
+		.extra			= MV64x60_EXTRA_IDMA_ENAB | 5 },
+	[MV64x60_IDMA2MEM_6_WIN] = {
+		.base_reg		= MV64360_IDMA2MEM_6_BASE,
+		.size_reg		= MV64360_IDMA2MEM_6_SIZE,
+		.base_bits		= 16,
+		.size_bits		= 16,
+		.get_from_field		= mv64x60_mask,
+		.map_to_field		= mv64x60_mask,
+		.extra			= MV64x60_EXTRA_IDMA_ENAB | 6 },
+	[MV64x60_IDMA2MEM_7_WIN] = {
+		.base_reg		= MV64360_IDMA2MEM_7_BASE,
+		.size_reg		= MV64360_IDMA2MEM_7_SIZE,
+		.base_bits		= 16,
+		.size_bits		= 16,
+		.get_from_field		= mv64x60_mask,
+		.map_to_field		= mv64x60_mask,
+		.extra			= MV64x60_EXTRA_IDMA_ENAB | 7 },
+};
+
+struct mv64x60_64bit_window
+	mv64360_64bit_windows[MV64x60_64BIT_WIN_COUNT] __initdata = {
+	/* CPU->PCI 0 MEM Remap Windows */
+	[MV64x60_CPU2PCI0_MEM_0_REMAP_WIN] = {
+		.base_hi_reg		= MV64x60_CPU2PCI0_MEM_0_REMAP_HI,
+		.base_lo_reg		= MV64x60_CPU2PCI0_MEM_0_REMAP_LO,
+		.size_reg		= 0,
+		.base_lo_bits		= 16,
+		.size_bits		= 0,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	[MV64x60_CPU2PCI0_MEM_1_REMAP_WIN] = {
+		.base_hi_reg		= MV64x60_CPU2PCI0_MEM_1_REMAP_HI,
+		.base_lo_reg		= MV64x60_CPU2PCI0_MEM_1_REMAP_LO,
+		.size_reg		= 0,
+		.base_lo_bits		= 16,
+		.size_bits		= 0,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	[MV64x60_CPU2PCI0_MEM_2_REMAP_WIN] = {
+		.base_hi_reg		= MV64x60_CPU2PCI0_MEM_2_REMAP_HI,
+		.base_lo_reg		= MV64x60_CPU2PCI0_MEM_2_REMAP_LO,
+		.size_reg		= 0,
+		.base_lo_bits		= 16,
+		.size_bits		= 0,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	[MV64x60_CPU2PCI0_MEM_3_REMAP_WIN] = {
+		.base_hi_reg		= MV64x60_CPU2PCI0_MEM_3_REMAP_HI,
+		.base_lo_reg		= MV64x60_CPU2PCI0_MEM_3_REMAP_LO,
+		.size_reg		= 0,
+		.base_lo_bits		= 16,
+		.size_bits		= 0,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	/* CPU->PCI 1 MEM Remap Windows */
+	[MV64x60_CPU2PCI1_MEM_0_REMAP_WIN] = {
+		.base_hi_reg		= MV64x60_CPU2PCI1_MEM_0_REMAP_HI,
+		.base_lo_reg		= MV64x60_CPU2PCI1_MEM_0_REMAP_LO,
+		.size_reg		= 0,
+		.base_lo_bits		= 16,
+		.size_bits		= 0,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	[MV64x60_CPU2PCI1_MEM_1_REMAP_WIN] = {
+		.base_hi_reg		= MV64x60_CPU2PCI1_MEM_1_REMAP_HI,
+		.base_lo_reg		= MV64x60_CPU2PCI1_MEM_1_REMAP_LO,
+		.size_reg		= 0,
+		.base_lo_bits		= 16,
+		.size_bits		= 0,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	[MV64x60_CPU2PCI1_MEM_2_REMAP_WIN] = {
+		.base_hi_reg		= MV64x60_CPU2PCI1_MEM_2_REMAP_HI,
+		.base_lo_reg		= MV64x60_CPU2PCI1_MEM_2_REMAP_LO,
+		.size_reg		= 0,
+		.base_lo_bits		= 16,
+		.size_bits		= 0,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	[MV64x60_CPU2PCI1_MEM_3_REMAP_WIN] = {
+		.base_hi_reg		= MV64x60_CPU2PCI1_MEM_3_REMAP_HI,
+		.base_lo_reg		= MV64x60_CPU2PCI1_MEM_3_REMAP_LO,
+		.size_reg		= 0,
+		.base_lo_bits		= 16,
+		.size_bits		= 0,
+		.get_from_field		= mv64x60_shift_left,
+		.map_to_field		= mv64x60_shift_right,
+		.extra			= 0 },
+	/* PCI 0->MEM Access Control Windows */
+	[MV64x60_PCI02MEM_ACC_CNTL_0_WIN] = {
+		.base_hi_reg		= MV64x60_PCI0_ACC_CNTL_0_BASE_HI,
+		.base_lo_reg		= MV64x60_PCI0_ACC_CNTL_0_BASE_LO,
+		.size_reg		= MV64x60_PCI0_ACC_CNTL_0_SIZE,
+		.base_lo_bits		= 20,
+		.size_bits		= 20,
+		.get_from_field		= mv64x60_mask,
+		.map_to_field		= mv64x60_mask,
+		.extra			= MV64x60_EXTRA_PCIACC_ENAB | 0 },
+	[MV64x60_PCI02MEM_ACC_CNTL_1_WIN] = {
+		.base_hi_reg		= MV64x60_PCI0_ACC_CNTL_1_BASE_HI,
+		.base_lo_reg		= MV64x60_PCI0_ACC_CNTL_1_BASE_LO,
+		.size_reg		= MV64x60_PCI0_ACC_CNTL_1_SIZE,
+		.base_lo_bits		= 20,
+		.size_bits		= 20,
+		.get_from_field		= mv64x60_mask,
+		.map_to_field		= mv64x60_mask,
+		.extra			= MV64x60_EXTRA_PCIACC_ENAB | 0 },
+	[MV64x60_PCI02MEM_ACC_CNTL_2_WIN] = {
+		.base_hi_reg		= MV64x60_PCI0_ACC_CNTL_2_BASE_HI,
+		.base_lo_reg		= MV64x60_PCI0_ACC_CNTL_2_BASE_LO,
+		.size_reg		= MV64x60_PCI0_ACC_CNTL_2_SIZE,
+		.base_lo_bits		= 20,
+		.size_bits		= 20,
+		.get_from_field		= mv64x60_mask,
+		.map_to_field		= mv64x60_mask,
+		.extra			= MV64x60_EXTRA_PCIACC_ENAB | 0 },
+	[MV64x60_PCI02MEM_ACC_CNTL_3_WIN] = {
+		.base_hi_reg		= MV64x60_PCI0_ACC_CNTL_3_BASE_HI,
+		.base_lo_reg		= MV64x60_PCI0_ACC_CNTL_3_BASE_LO,
+		.size_reg		= MV64x60_PCI0_ACC_CNTL_3_SIZE,
+		.base_lo_bits		= 20,
+		.size_bits		= 20,
+		.get_from_field		= mv64x60_mask,
+		.map_to_field		= mv64x60_mask,
+		.extra			= MV64x60_EXTRA_PCIACC_ENAB | 0 },
+	/* PCI 1->MEM Access Control Windows */
+	[MV64x60_PCI12MEM_ACC_CNTL_0_WIN] = {
+		.base_hi_reg		= MV64x60_PCI1_ACC_CNTL_0_BASE_HI,
+		.base_lo_reg		= MV64x60_PCI1_ACC_CNTL_0_BASE_LO,
+		.size_reg		= MV64x60_PCI1_ACC_CNTL_0_SIZE,
+		.base_lo_bits		= 20,
+		.size_bits		= 20,
+		.get_from_field		= mv64x60_mask,
+		.map_to_field		= mv64x60_mask,
+		.extra			= MV64x60_EXTRA_PCIACC_ENAB | 0 },
+	[MV64x60_PCI12MEM_ACC_CNTL_1_WIN] = {
+		.base_hi_reg		= MV64x60_PCI1_ACC_CNTL_1_BASE_HI,
+		.base_lo_reg		= MV64x60_PCI1_ACC_CNTL_1_BASE_LO,
+		.size_reg		= MV64x60_PCI1_ACC_CNTL_1_SIZE,
+		.base_lo_bits		= 20,
+		.size_bits		= 20,
+		.get_from_field		= mv64x60_mask,
+		.map_to_field		= mv64x60_mask,
+		.extra			= MV64x60_EXTRA_PCIACC_ENAB | 0 },
+	[MV64x60_PCI12MEM_ACC_CNTL_2_WIN] = {
+		.base_hi_reg		= MV64x60_PCI1_ACC_CNTL_2_BASE_HI,
+		.base_lo_reg		= MV64x60_PCI1_ACC_CNTL_2_BASE_LO,
+		.size_reg		= MV64x60_PCI1_ACC_CNTL_2_SIZE,
+		.base_lo_bits		= 20,
+		.size_bits		= 20,
+		.get_from_field		= mv64x60_mask,
+		.map_to_field		= mv64x60_mask,
+		.extra			= MV64x60_EXTRA_PCIACC_ENAB | 0 },
+	[MV64x60_PCI12MEM_ACC_CNTL_3_WIN] = {
+		.base_hi_reg		= MV64x60_PCI1_ACC_CNTL_3_BASE_HI,
+		.base_lo_reg		= MV64x60_PCI1_ACC_CNTL_3_BASE_LO,
+		.size_reg		= MV64x60_PCI1_ACC_CNTL_3_SIZE,
+		.base_lo_bits		= 20,
+		.size_bits		= 20,
+		.get_from_field		= mv64x60_mask,
+		.map_to_field		= mv64x60_mask,
+		.extra			= MV64x60_EXTRA_PCIACC_ENAB | 0 },
+	/* PCI 0->MEM Snoop Windows -- don't exist on 64360 */
+	/* PCI 1->MEM Snoop Windows -- don't exist on 64360 */
+};
diff -Nru a/arch/ppc/syslib/open_pic.c b/arch/ppc/syslib/open_pic.c
--- a/arch/ppc/syslib/open_pic.c	2005-01-10 20:11:19 -08:00
+++ b/arch/ppc/syslib/open_pic.c	2005-01-10 20:11:19 -08:00
@@ -32,8 +32,8 @@
 #define OPENPIC_BIG_ENDIAN
 #endif
 
-void* OpenPIC_Addr;
-static volatile struct OpenPIC *OpenPIC = NULL;
+void __iomem *OpenPIC_Addr;
+static volatile struct OpenPIC __iomem *OpenPIC = NULL;
 
 /*
  * We define OpenPIC_InitSenses table thusly:
@@ -47,7 +47,7 @@
 static u_int NumProcessors;
 static u_int NumSources;
 static int open_pic_irq_offset;
-static volatile OpenPIC_Source *ISR[NR_IRQS];
+static volatile OpenPIC_Source __iomem *ISR[NR_IRQS];
 static int openpic_cascade_irq = -1;
 static int (*openpic_cascade_fn)(struct pt_regs *);
 
@@ -163,7 +163,7 @@
 #define check_arg_cpu(cpu)	do {} while (0)
 #endif
 
-u_int openpic_read(volatile u_int *addr)
+u_int openpic_read(volatile u_int __iomem *addr)
 {
 	u_int val;
 
@@ -175,7 +175,7 @@
 	return val;
 }
 
-static inline void openpic_write(volatile u_int *addr, u_int val)
+static inline void openpic_write(volatile u_int __iomem *addr, u_int val)
 {
 #ifdef OPENPIC_BIG_ENDIAN
 	out_be32(addr, val);
@@ -184,30 +184,30 @@
 #endif
 }
 
-static inline u_int openpic_readfield(volatile u_int *addr, u_int mask)
+static inline u_int openpic_readfield(volatile u_int __iomem *addr, u_int mask)
 {
 	u_int val = openpic_read(addr);
 	return val & mask;
 }
 
-inline void openpic_writefield(volatile u_int *addr, u_int mask,
+inline void openpic_writefield(volatile u_int __iomem *addr, u_int mask,
 			       u_int field)
 {
 	u_int val = openpic_read(addr);
 	openpic_write(addr, (val & ~mask) | (field & mask));
 }
 
-static inline void openpic_clearfield(volatile u_int *addr, u_int mask)
+static inline void openpic_clearfield(volatile u_int __iomem *addr, u_int mask)
 {
 	openpic_writefield(addr, mask, 0);
 }
 
-static inline void openpic_setfield(volatile u_int *addr, u_int mask)
+static inline void openpic_setfield(volatile u_int __iomem *addr, u_int mask)
 {
 	openpic_writefield(addr, mask, mask);
 }
 
-static void openpic_safe_writefield(volatile u_int *addr, u_int mask,
+static void openpic_safe_writefield(volatile u_int __iomem *addr, u_int mask,
 				    u_int field)
 {
 	openpic_setfield(addr, OPENPIC_MASK);
@@ -217,7 +217,7 @@
 
 #ifdef CONFIG_SMP
 /* yes this is right ... bug, feature, you decide! -- tgall */
-u_int openpic_read_IPI(volatile u_int* addr)
+u_int openpic_read_IPI(volatile u_int __iomem * addr)
 {
          u_int val = 0;
 #if defined(OPENPIC_BIG_ENDIAN) || defined(CONFIG_POWER3)
@@ -229,23 +229,23 @@
 }
 
 /* because of the power3 be / le above, this is needed */
-inline void openpic_writefield_IPI(volatile u_int* addr, u_int mask, u_int field)
+inline void openpic_writefield_IPI(volatile u_int __iomem * addr, u_int mask, u_int field)
 {
         u_int  val = openpic_read_IPI(addr);
         openpic_write(addr, (val & ~mask) | (field & mask));
 }
 
-static inline void openpic_clearfield_IPI(volatile u_int *addr, u_int mask)
+static inline void openpic_clearfield_IPI(volatile u_int __iomem *addr, u_int mask)
 {
         openpic_writefield_IPI(addr, mask, 0);
 }
 
-static inline void openpic_setfield_IPI(volatile u_int *addr, u_int mask)
+static inline void openpic_setfield_IPI(volatile u_int __iomem *addr, u_int mask)
 {
         openpic_writefield_IPI(addr, mask, mask);
 }
 
-static void openpic_safe_writefield_IPI(volatile u_int *addr, u_int mask, u_int field)
+static void openpic_safe_writefield_IPI(volatile u_int __iomem *addr, u_int mask, u_int field)
 {
         openpic_setfield_IPI(addr, OPENPIC_MASK);
 
@@ -287,16 +287,16 @@
 }
 #endif
 
-void __init openpic_set_sources(int first_irq, int num_irqs, void *first_ISR)
+void __init openpic_set_sources(int first_irq, int num_irqs, void __iomem *first_ISR)
 {
-	volatile OpenPIC_Source *src = first_ISR;
+	volatile OpenPIC_Source __iomem *src = first_ISR;
 	int i, last_irq;
 
 	last_irq = first_irq + num_irqs;
 	if (last_irq > NumSources)
 		NumSources = last_irq;
 	if (src == 0)
-		src = &((struct OpenPIC *)OpenPIC_Addr)->Source[first_irq];
+		src = &((struct OpenPIC __iomem *)OpenPIC_Addr)->Source[first_irq];
 	for (i = first_irq; i < last_irq; ++i, ++src)
 		ISR[i] = src;
 }
@@ -318,7 +318,7 @@
 		printk("No OpenPIC found !\n");
 		return;
 	}
-	OpenPIC = (volatile struct OpenPIC *)OpenPIC_Addr;
+	OpenPIC = (volatile struct OpenPIC __iomem *)OpenPIC_Addr;
 
 #ifdef CONFIG_EPIC_SERIAL_MODE
 	/* Have to start from ground zero.
@@ -711,7 +711,7 @@
  */
 static void openpic_enable_irq(u_int irq)
 {
-	volatile u_int *vpp;
+	volatile u_int __iomem *vpp;
 
 	check_arg_irq(irq);
 	vpp = &ISR[irq - open_pic_irq_offset]->Vector_Priority;
@@ -724,7 +724,7 @@
 
 static void openpic_disable_irq(u_int irq)
 {
-	volatile u_int *vpp;
+	volatile u_int __iomem *vpp;
 	u32 vp;
 
 	check_arg_irq(irq);
diff -Nru a/arch/ppc/syslib/open_pic_defs.h b/arch/ppc/syslib/open_pic_defs.h
--- a/arch/ppc/syslib/open_pic_defs.h	2005-01-10 20:11:21 -08:00
+++ b/arch/ppc/syslib/open_pic_defs.h	2005-01-10 20:11:21 -08:00
@@ -172,7 +172,7 @@
     OpenPIC_Processor Processor[OPENPIC_MAX_PROCESSORS];
 };
 
-extern volatile struct OpenPIC *OpenPIC;
+extern volatile struct OpenPIC __iomem *OpenPIC;
 
 
     /*
diff -Nru a/arch/ppc/syslib/ppc403_pic.c b/arch/ppc/syslib/ppc403_pic.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/ppc/syslib/ppc403_pic.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,127 @@
+/*
+ *
+ *    Copyright (c) 1999 Grant Erickson <grant@lcse.umn.edu>
+ *
+ *    Module name: ppc403_pic.c
+ *
+ *    Description:
+ *      Interrupt controller driver for PowerPC 403-based processors.
+ */
+
+/*
+ * The PowerPC 403 cores' Asynchronous Interrupt Controller (AIC) has
+ * 32 possible interrupts, a majority of which are not implemented on
+ * all cores. There are six configurable, external interrupt pins and
+ * there are eight internal interrupts for the on-chip serial port
+ * (SPU), DMA controller, and JTAG controller.
+ *
+ */
+
+#include <linux/init.h>
+#include <linux/sched.h>
+#include <linux/signal.h>
+#include <linux/stddef.h>
+
+#include <asm/processor.h>
+#include <asm/system.h>
+#include <asm/irq.h>
+#include <asm/ppc4xx_pic.h>
+
+/* Function Prototypes */
+
+static void ppc403_aic_enable(unsigned int irq);
+static void ppc403_aic_disable(unsigned int irq);
+static void ppc403_aic_disable_and_ack(unsigned int irq);
+
+static struct hw_interrupt_type ppc403_aic = {
+	"403GC AIC",
+	NULL,
+	NULL,
+	ppc403_aic_enable,
+	ppc403_aic_disable,
+	ppc403_aic_disable_and_ack,
+	0
+};
+
+int
+ppc403_pic_get_irq(struct pt_regs *regs)
+{
+	int irq;
+	unsigned long bits;
+
+	/*
+	 * Only report the status of those interrupts that are actually
+	 * enabled.
+	 */
+
+	bits = mfdcr(DCRN_EXISR) & mfdcr(DCRN_EXIER);
+
+	/*
+	 * Walk through the interrupts from highest priority to lowest, and
+	 * report the first pending interrupt found.
+	 * We want PPC, not C bit numbering, so just subtract the ffs()
+	 * result from 32.
+	 */
+	irq = 32 - ffs(bits);
+
+	if (irq == NR_AIC_IRQS)
+		irq = -1;
+
+	return (irq);
+}
+
+static void
+ppc403_aic_enable(unsigned int irq)
+{
+	int bit, word;
+
+	bit = irq & 0x1f;
+	word = irq >> 5;
+
+	ppc_cached_irq_mask[word] |= (1 << (31 - bit));
+	mtdcr(DCRN_EXIER, ppc_cached_irq_mask[word]);
+}
+
+static void
+ppc403_aic_disable(unsigned int irq)
+{
+	int bit, word;
+
+	bit = irq & 0x1f;
+	word = irq >> 5;
+
+	ppc_cached_irq_mask[word] &= ~(1 << (31 - bit));
+	mtdcr(DCRN_EXIER, ppc_cached_irq_mask[word]);
+}
+
+static void
+ppc403_aic_disable_and_ack(unsigned int irq)
+{
+	int bit, word;
+
+	bit = irq & 0x1f;
+	word = irq >> 5;
+
+	ppc_cached_irq_mask[word] &= ~(1 << (31 - bit));
+	mtdcr(DCRN_EXIER, ppc_cached_irq_mask[word]);
+	mtdcr(DCRN_EXISR, (1 << (31 - bit)));
+}
+
+void __init
+ppc4xx_pic_init(void)
+{
+	int i;
+
+	/*
+	 * Disable all external interrupts until they are
+	 * explicity requested.
+	 */
+	ppc_cached_irq_mask[0] = 0;
+
+	mtdcr(DCRN_EXIER, ppc_cached_irq_mask[0]);
+
+	ppc_md.get_irq = ppc403_pic_get_irq;
+
+	for (i = 0; i < NR_IRQS; i++)
+		irq_desc[i].handler = &ppc403_aic;
+}
diff -Nru a/arch/ppc/syslib/ppc4xx_dma.c b/arch/ppc/syslib/ppc4xx_dma.c
--- a/arch/ppc/syslib/ppc4xx_dma.c	2005-01-10 20:11:23 -08:00
+++ b/arch/ppc/syslib/ppc4xx_dma.c	2005-01-10 20:11:23 -08:00
@@ -48,7 +48,7 @@
 		return;
 	}
 
-#ifdef PPC4xx_DMA64BIT
+#ifdef PPC4xx_DMA_64BIT
 	mtdcr(DCRN_DMASAH0 + dmanr*2, (u32)(src_addr >> 32));
 #else
 	mtdcr(DCRN_DMASA0 + dmanr*2, (u32)src_addr);
@@ -63,7 +63,7 @@
 		return;
 	}
 
-#ifdef PPC4xx_DMA64BIT
+#ifdef PPC4xx_DMA_64BIT
 	mtdcr(DCRN_DMADAH0 + dmanr*2, (u32)(dst_addr >> 32));
 #else
 	mtdcr(DCRN_DMADA0 + dmanr*2, (u32)dst_addr);
diff -Nru a/arch/ppc/syslib/ppc4xx_pic.c b/arch/ppc/syslib/ppc4xx_pic.c
--- a/arch/ppc/syslib/ppc4xx_pic.c	2005-01-10 20:11:15 -08:00
+++ b/arch/ppc/syslib/ppc4xx_pic.c	2005-01-10 20:11:15 -08:00
@@ -1,31 +1,21 @@
 /*
+ * arch/ppc/syslib/ppc4xx_pic.c
  *
- *    Copyright (c) 1999 Grant Erickson <grant@lcse.umn.edu>
- *
- *    Module name: ppc4xx_pic.c
- *
- *    Description:
- *      Interrupt controller driver for PowerPC 4xx-based processors.
- */
-
-/*
- * The PowerPC 403 cores' Asynchronous Interrupt Controller (AIC) has
- * 32 possible interrupts, a majority of which are not implemented on
- * all cores. There are six configurable, external interrupt pins and
- * there are eight internal interrupts for the on-chip serial port
- * (SPU), DMA controller, and JTAG controller.
+ * Interrupt controller driver for PowerPC 4xx-based processors.
  *
- * The PowerPC 405/440 cores' Universal Interrupt Controller (UIC) has
- * 32 possible interrupts as well.  Depending on the core and SoC
- * implementation, a portion of the interrrupts are used for on-chip
- * peripherals and a portion of the interrupts are available to be
- * configured for external devices generating interrupts.
+ * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net>
+ * Copyright (c) 2004 Zultys Technologies
  *
- * The PowerNP and 440GP (and most likely future implementations) have
- * cascaded UICs.
+ * Based on original code by
+ *    Copyright (c) 1999 Grant Erickson <grant@lcse.umn.edu>
+ *    Armin Custer <akuster@mvista.com>
  *
- */
-
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+*/
+#include <linux/config.h>
 #include <linux/init.h>
 #include <linux/sched.h>
 #include <linux/signal.h>
@@ -36,493 +26,212 @@
 #include <asm/irq.h>
 #include <asm/ppc4xx_pic.h>
 
-/* Global Variables */
-struct hw_interrupt_type *ppc4xx_pic;
-/*
- * We define 4xxIRQ_InitSenses table thusly:
- * bit 0x1: sense, 1 for edge and 0 for level.
- * bit 0x2: polarity, 0 for negative, 1 for positive.
+/* See comment in include/arch-ppc/ppc4xx_pic.h
+ * for more info about these two variables
  */
-unsigned int ibm4xxPIC_NumInitSenses __initdata = 0;
-unsigned char *ibm4xxPIC_InitSenses __initdata = NULL;
-
-/* Six of one, half dozen of the other....#ifdefs, separate files,
- * other tricks.....
- *
- * There are basically two types of interrupt controllers, the 403 AIC
- * and the "others" with UIC.  I just kept them both here separated
- * with #ifdefs, but it seems to change depending upon how supporting
- * files (like ppc4xx.h) change.		-- Dan.
- */
-
-#ifdef CONFIG_403
-
-/* Function Prototypes */
-
-static void ppc403_aic_enable(unsigned int irq);
-static void ppc403_aic_disable(unsigned int irq);
-static void ppc403_aic_disable_and_ack(unsigned int irq);
-
-static struct hw_interrupt_type ppc403_aic = {
-	"403GC AIC",
-	NULL,
-	NULL,
-	ppc403_aic_enable,
-	ppc403_aic_disable,
-	ppc403_aic_disable_and_ack,
-	0
-};
+extern struct ppc4xx_uic_settings ppc4xx_core_uic_cfg[NR_UICS] __attribute__((weak));
+extern unsigned char ppc4xx_uic_ext_irq_cfg[] __attribute__((weak));
 
-int
-ppc403_pic_get_irq(struct pt_regs *regs)
-{
-	int irq;
-	unsigned long bits;
-
-	/*
-	 * Only report the status of those interrupts that are actually
-	 * enabled.
-	 */
-
-	bits = mfdcr(DCRN_EXISR) & mfdcr(DCRN_EXIER);
-
-	/*
-	 * Walk through the interrupts from highest priority to lowest, and
-	 * report the first pending interrupt found.
-	 * We want PPC, not C bit numbering, so just subtract the ffs()
-	 * result from 32.
-	 */
-	irq = 32 - ffs(bits);
-
-	if (irq == NR_AIC_IRQS)
-		irq = -1;
-
-	return (irq);
+#define IRQ_MASK_UIC0(irq)		(1 << (31 - (irq)))
+#define IRQ_MASK_UICx(irq)		(1 << (31 - ((irq) & 0x1f)))
+#define IRQ_MASK_UIC1(irq)		IRQ_MASK_UICx(irq)
+#define IRQ_MASK_UIC2(irq)		IRQ_MASK_UICx(irq)
+
+#define UIC_HANDLERS(n)							\
+static void ppc4xx_uic##n##_enable(unsigned int irq)			\
+{									\
+	ppc_cached_irq_mask[n] |= IRQ_MASK_UIC##n(irq);			\
+	mtdcr(DCRN_UIC_ER(UIC##n), ppc_cached_irq_mask[n]);		\
+}									\
+									\
+static void ppc4xx_uic##n##_disable(unsigned int irq)			\
+{									\
+	ppc_cached_irq_mask[n] &= ~IRQ_MASK_UIC##n(irq);		\
+	mtdcr(DCRN_UIC_ER(UIC##n), ppc_cached_irq_mask[n]);		\
+}									\
+									\
+static void ppc4xx_uic##n##_ack(unsigned int irq)			\
+{									\
+	u32 mask = IRQ_MASK_UIC##n(irq);				\
+	ppc_cached_irq_mask[n] &= ~mask;				\
+	mtdcr(DCRN_UIC_ER(UIC##n), ppc_cached_irq_mask[n]);		\
+	mtdcr(DCRN_UIC_SR(UIC##n), mask);				\
+	ACK_UIC##n##_PARENT						\
+}									\
+									\
+static void ppc4xx_uic##n##_end(unsigned int irq)			\
+{									\
+	unsigned int status = irq_desc[irq].status;			\
+	u32 mask = IRQ_MASK_UIC##n(irq);				\
+	if (status & IRQ_LEVEL){					\
+		mtdcr(DCRN_UIC_SR(UIC##n), mask);			\
+		ACK_UIC##n##_PARENT					\
+	}								\
+	if (!(status & (IRQ_DISABLED | IRQ_INPROGRESS))){		\
+		ppc_cached_irq_mask[n] |= mask;				\
+		mtdcr(DCRN_UIC_ER(UIC##n), ppc_cached_irq_mask[n]);	\
+	}								\
+}
+
+#define DECLARE_UIC(n)							\
+{									\
+	.typename 	= "UIC"#n,					\
+	.enable 	= ppc4xx_uic##n##_enable,			\
+	.disable 	= ppc4xx_uic##n##_disable,			\
+	.ack 		= ppc4xx_uic##n##_ack,				\
+	.end 		= ppc4xx_uic##n##_end,				\
+}									\
+
+#if NR_UICS == 3
+#define ACK_UIC0_PARENT	mtdcr(DCRN_UIC_SR(UICB), UICB_UIC0NC);
+#define ACK_UIC1_PARENT	mtdcr(DCRN_UIC_SR(UICB), UICB_UIC1NC);
+#define ACK_UIC2_PARENT	mtdcr(DCRN_UIC_SR(UICB), UICB_UIC2NC);
+UIC_HANDLERS(0); UIC_HANDLERS(1); UIC_HANDLERS(2);
+
+static int ppc4xx_pic_get_irq(struct pt_regs *regs)
+{
+	u32 uicb = mfdcr(DCRN_UIC_MSR(UICB));
+	if (uicb & UICB_UIC0NC)
+		return 32 - ffs(mfdcr(DCRN_UIC_MSR(UIC0)));
+	else if (uicb & UICB_UIC1NC)
+		return 64 - ffs(mfdcr(DCRN_UIC_MSR(UIC1)));
+	else if (uicb & UICB_UIC2NC)
+		return 96 - ffs(mfdcr(DCRN_UIC_MSR(UIC2)));
+	else
+		return -1;
 }
 
-static void
-ppc403_aic_enable(unsigned int irq)
+static void __init ppc4xx_pic_impl_init(void)
 {
-	int bit, word;
-
-	bit = irq & 0x1f;
-	word = irq >> 5;
-
-	ppc_cached_irq_mask[word] |= (1 << (31 - bit));
-	mtdcr(DCRN_EXIER, ppc_cached_irq_mask[word]);
+	/* Configure Base UIC */
+	mtdcr(DCRN_UIC_CR(UICB), 0);
+	mtdcr(DCRN_UIC_TR(UICB), 0);
+	mtdcr(DCRN_UIC_PR(UICB), 0xffffffff);
+	mtdcr(DCRN_UIC_SR(UICB), 0xffffffff);
+	mtdcr(DCRN_UIC_ER(UICB), UICB_UIC0NC | UICB_UIC1NC | UICB_UIC2NC);
 }
 
-static void
-ppc403_aic_disable(unsigned int irq)
-{
-	int bit, word;
-
-	bit = irq & 0x1f;
-	word = irq >> 5;
-
-	ppc_cached_irq_mask[word] &= ~(1 << (31 - bit));
-	mtdcr(DCRN_EXIER, ppc_cached_irq_mask[word]);
-}
+#elif NR_UICS == 2
+#define ACK_UIC0_PARENT
+#define ACK_UIC1_PARENT	mtdcr(DCRN_UIC_SR(UIC0), UIC0_UIC1NC);
+UIC_HANDLERS(0); UIC_HANDLERS(1);
 
-static void
-ppc403_aic_disable_and_ack(unsigned int irq)
+static int ppc4xx_pic_get_irq(struct pt_regs *regs)
 {
-	int bit, word;
-
-	bit = irq & 0x1f;
-	word = irq >> 5;
-
-	ppc_cached_irq_mask[word] &= ~(1 << (31 - bit));
-	mtdcr(DCRN_EXIER, ppc_cached_irq_mask[word]);
-	mtdcr(DCRN_EXISR, (1 << (31 - bit)));
+	u32 uic0 = mfdcr(DCRN_UIC_MSR(UIC0));
+	if (uic0 & UIC0_UIC1NC)
+		return 64 - ffs(mfdcr(DCRN_UIC_MSR(UIC1)));
+	else
+		return uic0 ? 32 - ffs(uic0) : -1;
 }
 
-#else
-
-#ifndef UIC1
-#define UIC1 UIC0
-#endif
-#ifndef UIC2
-#define UIC2 UIC1
-#endif
-
-static void
-ppc4xx_uic_enable(unsigned int irq)
+static void __init ppc4xx_pic_impl_init(void)
 {
-	int bit, word;
-	irq_desc_t *desc = irq_desc + irq;
-
-	bit = irq & 0x1f;
-	word = irq >> 5;
-
-#ifdef UIC_DEBUG
-	printk("ppc4xx_uic_enable - irq %d word %d bit 0x%x\n", irq, word, bit);
-#endif
-	ppc_cached_irq_mask[word] |= 1 << (31 - bit);
-	switch (word) {
-	case 0:
-		mtdcr(DCRN_UIC_ER(UIC0), ppc_cached_irq_mask[word]);
-		if ((mfdcr(DCRN_UIC_TR(UIC0)) & (1 << (31 - bit))) == 0)
-			desc->status |= IRQ_LEVEL;
-		else
-			desc->status = desc->status & ~IRQ_LEVEL;
-		break;
-	case 1:
-		mtdcr(DCRN_UIC_ER(UIC1), ppc_cached_irq_mask[word]);
-		if ((mfdcr(DCRN_UIC_TR(UIC1)) & (1 << (31 - bit))) == 0)
-			desc->status |= IRQ_LEVEL;
-		else
-			desc->status = desc->status & ~IRQ_LEVEL;
-		break;
-	case 2:
-		mtdcr(DCRN_UIC_ER(UIC2), ppc_cached_irq_mask[word]);
-		if ((mfdcr(DCRN_UIC_TR(UIC2)) & (1 << (31 - bit))) == 0)
-			desc->status |= IRQ_LEVEL;
-		else
-			desc->status = desc->status & ~IRQ_LEVEL;
-		break;
-	}
-
+	/* Enable cascade interrupt in UIC0 */
+	ppc_cached_irq_mask[0] |= UIC0_UIC1NC;
+	mtdcr(DCRN_UIC_SR(UIC0), UIC0_UIC1NC);
+	mtdcr(DCRN_UIC_ER(UIC0), ppc_cached_irq_mask[0]);
 }
 
-static void
-ppc4xx_uic_disable(unsigned int irq)
-{
-	int bit, word;
+#elif NR_UICS == 1
+#define ACK_UIC0_PARENT
+UIC_HANDLERS(0);
 
-	bit = irq & 0x1f;
-	word = irq >> 5;
-#ifdef UIC_DEBUG
-	printk("ppc4xx_uic_disable - irq %d word %d bit 0x%x\n", irq, word,
-	       bit);
-#endif
-	ppc_cached_irq_mask[word] &= ~(1 << (31 - bit));
-	switch (word) {
-	case 0:
-		mtdcr(DCRN_UIC_ER(UIC0), ppc_cached_irq_mask[word]);
-		break;
-	case 1:
-		mtdcr(DCRN_UIC_ER(UIC1), ppc_cached_irq_mask[word]);
-		break;
-	case 2:
-		mtdcr(DCRN_UIC_ER(UIC2), ppc_cached_irq_mask[word]);
-		break;
-	}
-}
-
-static void
-ppc4xx_uic_disable_and_ack(unsigned int irq)
+static int ppc4xx_pic_get_irq(struct pt_regs *regs)
 {
-	int bit, word;
-
-	bit = irq & 0x1f;
-	word = irq >> 5;
-
-#ifdef UIC_DEBUG
-	printk("ppc4xx_uic_disable_and_ack - irq %d word %d bit 0x%x\n", irq,
-	       word, bit);
-#endif
-	ppc_cached_irq_mask[word] &= ~(1 << (31 - bit));
-	switch (word) {
-	case 0:
-		mtdcr(DCRN_UIC_ER(UIC0), ppc_cached_irq_mask[word]);
-		mtdcr(DCRN_UIC_SR(UIC0), (1 << (31 - bit)));
-#if (NR_UICS > 2)
-		mtdcr(DCRN_UIC_SR(UICB), UICB_UIC0NC);
-#endif
-		break;
-	case 1:
-		mtdcr(DCRN_UIC_ER(UIC1), ppc_cached_irq_mask[word]);
-		mtdcr(DCRN_UIC_SR(UIC1), (1 << (31 - bit)));
-#if (NR_UICS == 2)
-		mtdcr(DCRN_UIC_SR(UIC0), (1 << (31 - UIC0_UIC1NC)));
-#endif
-#if (NR_UICS > 2)
-		mtdcr(DCRN_UIC_SR(UICB), UICB_UIC1NC);
-#endif
-		break;
-	case 2:
-		mtdcr(DCRN_UIC_ER(UIC2), ppc_cached_irq_mask[word]);
-		mtdcr(DCRN_UIC_SR(UIC2), (1 << (31 - bit)));
-#if (NR_UICS > 2)
-		mtdcr(DCRN_UIC_SR(UICB), UICB_UIC2NC);
-#endif
-		break;
-	}
-
+	u32 uic0 = mfdcr(DCRN_UIC_MSR(UIC0));
+	return uic0 ? 32 - ffs(uic0) : -1;
 }
 
-static void
-ppc4xx_uic_end(unsigned int irq)
-{
-	int bit, word;
-	unsigned int tr_bits = 0;
-
-	bit = irq & 0x1f;
-	word = irq >> 5;
-
-#ifdef UIC_DEBUG
-	printk("ppc4xx_uic_end - irq %d word %d bit 0x%x\n", irq, word, bit);
+static inline void ppc4xx_pic_impl_init(void){}
 #endif
 
-	switch (word) {
-	case 0:
-		tr_bits = mfdcr(DCRN_UIC_TR(UIC0));
-		break;
-	case 1:
-		tr_bits = mfdcr(DCRN_UIC_TR(UIC1));
-		break;
-	case 2:
-		tr_bits = mfdcr(DCRN_UIC_TR(UIC2));
-		break;
-	}
-
-	if ((tr_bits & (1 << (31 - bit))) == 0) {
-		/* level trigger */
-		switch (word) {
-		case 0:
-			mtdcr(DCRN_UIC_SR(UIC0), 1 << (31 - bit));
-#if (NR_UICS > 2)
-			mtdcr(DCRN_UIC_SR(UICB),  UICB_UIC0NC);
-#endif
-			break;
-		case 1:
-			mtdcr(DCRN_UIC_SR(UIC1), 1 << (31 - bit));
-#if (NR_UICS == 2)
-			mtdcr(DCRN_UIC_SR(UIC0), (1 << (31 - UIC0_UIC1NC)));
-#endif
-#if (NR_UICS > 2)
-			mtdcr(DCRN_UIC_SR(UICB),  UICB_UIC1NC);
-#endif
-			break;
-		case 2:
-			mtdcr(DCRN_UIC_SR(UIC2), 1 << (31 - bit));
-#if (NR_UICS > 2)
-			mtdcr(DCRN_UIC_SR(UICB),  UICB_UIC2NC);
+static struct ppc4xx_uic_impl {
+	struct hw_interrupt_type decl;
+	int			 base;		/* Base DCR number */
+} __uic[] = {
+    { .decl = DECLARE_UIC(0), .base = UIC0 },
+#if NR_UICS > 1
+    { .decl = DECLARE_UIC(1), .base = UIC1 },
+#if NR_UICS > 2
+    { .decl = DECLARE_UIC(2), .base = UIC2 },
 #endif
-			break;
-		}
-	}
-
-	if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) {
-		ppc_cached_irq_mask[word] |= 1 << (31 - bit);
-		switch (word) {
-		case 0:
-			mtdcr(DCRN_UIC_ER(UIC0), ppc_cached_irq_mask[word]);
-			break;
-		case 1:
-			mtdcr(DCRN_UIC_ER(UIC1), ppc_cached_irq_mask[word]);
-			break;
-		case 2:
-			mtdcr(DCRN_UIC_ER(UIC2), ppc_cached_irq_mask[word]);
-			break;
-		}
-	}
-}
-
-static struct hw_interrupt_type ppc4xx_uic = {
-#if (NR_UICS == 1)
-	"IBM UIC",
-#else
-	"IBM UIC Cascade",
 #endif
-	NULL,
-	NULL,
-	ppc4xx_uic_enable,
-	ppc4xx_uic_disable,
-	ppc4xx_uic_disable_and_ack,
-	ppc4xx_uic_end,
-	0
 };
 
-int
-ppc4xx_pic_get_irq(struct pt_regs *regs)
+static inline int is_level_sensitive(int irq)
 {
-	int irq, cas_irq;
-	unsigned long bits;
-	cas_irq = 0;
-	/*
-	 * Only report the status of those interrupts that are actually
-	 * enabled.
-	 */
-
-#if (NR_UICS > 2)
-	bits = mfdcr(DCRN_UIC_MSR(UICB));
-#else
-	bits = mfdcr(DCRN_UIC_MSR(UIC0));
-#endif
-#if (NR_UICS > 2)
-	if (bits & UICB_UIC0NC) {
-		bits = mfdcr(DCRN_UIC_MSR(UIC0));
-		irq = 32 - ffs(bits);
-	} else if (bits & UICB_UIC1NC) {
-		bits = mfdcr(DCRN_UIC_MSR(UIC1));
-		irq = 64 - ffs(bits);
-	} else if (bits & UICB_UIC2NC) {
-		bits = mfdcr(DCRN_UIC_MSR(UIC2));
-		irq = 96 - ffs(bits);
-	} else {
-		irq = -1;
-	}
-#elif (NR_UICS > 1)
-	if (bits & UIC_CASCADE_MASK) {
-		bits = mfdcr(DCRN_UIC_MSR(UIC1));
-		cas_irq = 32 - ffs(bits);
-		irq = 32 + cas_irq;
-	} else {
-		irq = 32 - ffs(bits);
-		if (irq == 32)
-			irq = -1;
-	}
-#else
-	/*
-	 * Walk through the interrupts from highest priority to lowest, and
-	 * report the first pending interrupt found.
-	 * We want PPC, not C bit numbering, so just subtract the ffs()
-	 * result from 32.
-	 */
-	irq = 32 - ffs(bits);
-#endif
-	if (irq == (NR_UIC_IRQS * NR_UICS))
-		irq = -1;
-
-#ifdef UIC_DEBUG
-	printk("ppc4xx_pic_get_irq - irq %d bit 0x%x\n", irq, bits);
-#endif
-
-	return (irq);
+	u32 tr = mfdcr(DCRN_UIC_TR(__uic[irq >> 5].base));
+	return (tr & IRQ_MASK_UICx(irq)) == 0;
 }
-#endif
 
-void __init
-ppc4xx_extpic_init(void)
+void __init ppc4xx_pic_init(void)
 {
-	/* set polarity
-	 * 1 = default/pos/rising  , 0= neg/falling internal
-	 * 1 = neg/falling , 0= pos/rising external
-	 * Sense
-	 * 0 = default level internal
-	 * 0 = level, 1 = edge external
-	 */
-
-	unsigned int sense, irq;
-	int bit, word;
-	unsigned long ppc_cached_sense_mask[NR_MASK_WORDS];
-	unsigned long ppc_cached_pol_mask[NR_MASK_WORDS];
-	ppc_cached_sense_mask[0] = 0;
-	ppc_cached_sense_mask[1] = 0;
-	ppc_cached_sense_mask[2] = 0;
-	ppc_cached_pol_mask[0] = 0;
-	ppc_cached_pol_mask[1] = 0;
-	ppc_cached_pol_mask[2] = 0;
-
-	for (irq = 0; irq < NR_IRQS; irq++) {
-
-		bit = irq & 0x1f;
-		word = irq >> 5;
-
-		sense =
-		    (irq <
-		     ibm4xxPIC_NumInitSenses) ? ibm4xxPIC_InitSenses[irq] : 3;
-#ifdef PPC4xx_PIC_DEBUG
-		printk("PPC4xx_picext %d word:%x bit:%x sense:%x", irq, word,
-		       bit, sense);
-#endif
-		ppc_cached_sense_mask[word] |=
-		    (~sense & IRQ_SENSE_MASK) << (31 - bit);
-		ppc_cached_pol_mask[word] |=
-		    ((sense & IRQ_POLARITY_MASK) >> 1) << (31 - bit);
-		switch (word) {
-		case 0:
-#ifdef PPC4xx_PIC_DEBUG
-			printk("Pol %x ", mfdcr(DCRN_UIC_PR(UIC0)));
-			printk("Level %x\n", mfdcr(DCRN_UIC_TR(UIC0)));
-#endif
-			/* polarity  setting */
-			mtdcr(DCRN_UIC_PR(UIC0), ppc_cached_pol_mask[word]);
-
-			/* Level setting */
-			mtdcr(DCRN_UIC_TR(UIC0), ppc_cached_sense_mask[word]);
-
-			break;
-		case 1:
-#ifdef PPC4xx_PIC_DEBUG
-			printk("Pol %x ", mfdcr(DCRN_UIC_PR(UIC1)));
-			printk("Level %x\n", mfdcr(DCRN_UIC_TR(UIC1)));
-#endif
-			/* polarity  setting */
-			mtdcr(DCRN_UIC_PR(UIC1), ppc_cached_pol_mask[word]);
-
-			/* Level setting */
-			mtdcr(DCRN_UIC_TR(UIC1), ppc_cached_sense_mask[word]);
-
-			break;
-		case 2:
-#ifdef PPC4xx_PIC_DEBUG
-			printk("Pol %x ", mfdcr(DCRN_UIC_PR(UIC2)));
-			printk("Level %x\n", mfdcr(DCRN_UIC_TR(UIC2)));
-#endif
-			/* polarity  setting */
-			mtdcr(DCRN_UIC_PR(UIC2), ppc_cached_pol_mask[word]);
-
-			/* Level setting */
-			mtdcr(DCRN_UIC_TR(UIC2), ppc_cached_sense_mask[word]);
-
-			break;
+	int i;
+	unsigned char* eirqs = ppc4xx_uic_ext_irq_cfg;
+
+	for (i = 0; i < NR_UICS; ++i){
+		int base = __uic[i].base;
+
+		/* Disable everything by default */
+		ppc_cached_irq_mask[i] = 0;
+		mtdcr(DCRN_UIC_ER(base), 0);
+
+		/* We don't use critical interrupts */
+		mtdcr(DCRN_UIC_CR(base), 0);
+
+		/* Configure polarity and triggering */
+		if (ppc4xx_core_uic_cfg){
+			struct ppc4xx_uic_settings* p = ppc4xx_core_uic_cfg + i;
+			u32 mask = p->ext_irq_mask;
+			u32 pr = mfdcr(DCRN_UIC_PR(base)) & mask;
+			u32 tr = mfdcr(DCRN_UIC_TR(base)) & mask;
+
+			/* "Fixed" interrupts (on-chip devices) */
+			pr |= p->polarity   & ~mask;
+			tr |= p->triggering & ~mask;
+
+			/* Merge external IRQs settings if board port
+			 * provided them
+			 */
+			if (eirqs && mask){
+				pr &= ~mask;
+				tr &= ~mask;
+				while (mask){
+					/* Extract current external IRQ mask */
+					u32 eirq_mask = 1 << __ilog2(mask);
+
+					if (!(*eirqs & IRQ_SENSE_LEVEL))
+						tr |= eirq_mask;
+
+					if (*eirqs & IRQ_POLARITY_POSITIVE)
+						pr |= eirq_mask;
+
+					mask &= ~eirq_mask;
+					++eirqs;
+				}
+			}
+			mtdcr(DCRN_UIC_PR(base), pr);
+			mtdcr(DCRN_UIC_TR(base), tr);
 		}
-	}
-
-}
-void __init
-ppc4xx_pic_init(void)
-{
-	/*
-	 * Disable all external interrupts until they are
-	 * explicity requested.
-	 */
-	ppc_cached_irq_mask[0] = 0;
-	ppc_cached_irq_mask[1] = 0;
-	ppc_cached_irq_mask[2] = 0;
-
-#if defined CONFIG_403
-	mtdcr(DCRN_EXIER, ppc_cached_irq_mask[0]);
-
-	ppc4xx_pic = &ppc403_aic;
-	ppc_md.get_irq = ppc403_pic_get_irq;
-#else
-#if  (NR_UICS > 2)
-	mtdcr(DCRN_UIC_ER(UICB), UICB_UIC0NC | UICB_UIC1NC | UICB_UIC2NC);
-	mtdcr(DCRN_UIC_CR(UICB), 0);
-
-	mtdcr(DCRN_UIC_ER(UIC2), ppc_cached_irq_mask[2]);
-	mtdcr(DCRN_UIC_CR(UIC2), 0);
-
-#endif
-#if  (NR_UICS > 1)
-#if  (NR_UICS == 2)
-	/* enable cascading interrupt */
-	ppc_cached_irq_mask[0] |= 1 << (31 - UIC0_UIC1NC);
-#endif
-	mtdcr(DCRN_UIC_ER(UIC1), ppc_cached_irq_mask[1]);
-	mtdcr(DCRN_UIC_CR(UIC1), 0);
-#endif
-	mtdcr(DCRN_UIC_ER(UIC0), ppc_cached_irq_mask[0]);
-	mtdcr(DCRN_UIC_CR(UIC0), 0);
-
-	if (ibm4xxPIC_InitSenses != NULL)
-		ppc4xx_extpic_init();
 
-	/* Clear any pending interrupts */
-#if (NR_UICS > 2)
-	mtdcr(DCRN_UIC_SR(UICB), 0xffffffff);
-	mtdcr(DCRN_UIC_SR(UIC2), 0xffffffff);
-#endif
-#if (NR_UICS > 1)
-	mtdcr(DCRN_UIC_SR(UIC1), 0xffffffff);
-#endif
-	mtdcr(DCRN_UIC_SR(UIC0), 0xffffffff);
+		/* ACK any pending interrupts to prevent false
+		 * triggering after first enable
+		 */
+		mtdcr(DCRN_UIC_SR(base), 0xffffffff);
+	}
+
+	/* Perform optional implementation specific setup
+	 * (e.g. enable cascade interrupts for multi-UIC configurations)
+	 */
+	ppc4xx_pic_impl_init();
+
+	/* Attach low-level handlers */
+	for (i = 0; i < (NR_UICS << 5); ++i){
+    		irq_desc[i].handler = &__uic[i >> 5].decl;
+		if (is_level_sensitive(i))
+			irq_desc[i].status |= IRQ_LEVEL;
+	}
 
-	ppc4xx_pic = &ppc4xx_uic;
 	ppc_md.get_irq = ppc4xx_pic_get_irq;
-#endif
 }
diff -Nru a/arch/ppc/syslib/ppc4xx_setup.c b/arch/ppc/syslib/ppc4xx_setup.c
--- a/arch/ppc/syslib/ppc4xx_setup.c	2005-01-10 20:11:15 -08:00
+++ b/arch/ppc/syslib/ppc4xx_setup.c	2005-01-10 20:11:15 -08:00
@@ -133,12 +133,7 @@
 void __init
 ppc4xx_init_IRQ(void)
 {
-	int i;
-
 	ppc4xx_pic_init();
-
-	for (i = 0; i < NR_IRQS; i++)
-		irq_desc[i].handler = ppc4xx_pic;
 }
 
 static void
diff -Nru a/arch/ppc/syslib/xilinx_pic.c b/arch/ppc/syslib/xilinx_pic.c
--- a/arch/ppc/syslib/xilinx_pic.c	2005-01-10 20:11:22 -08:00
+++ b/arch/ppc/syslib/xilinx_pic.c	2005-01-10 20:11:22 -08:00
@@ -38,9 +38,6 @@
 #define intc_in_be32(addr)            mfdcr((addr))
 #endif
 
-/* Global Variables */
-struct hw_interrupt_type *ppc4xx_pic;
-
 static void
 xilinx_intc_enable(unsigned int irq)
 {
@@ -115,6 +112,8 @@
 void __init
 ppc4xx_pic_init(void)
 {
+	int i;
+
 #if XPAR_XINTC_USE_DCR == 0
 	intc = ioremap(XPAR_INTC_0_BASEADDR, 32);
 
@@ -137,6 +136,8 @@
 	/* Turn on the Master Enable. */
 	intc_out_be32(intc + MER, 0x3UL);
 
-	ppc4xx_pic = &xilinx_intc;
 	ppc_md.get_irq = xilinx_pic_get_irq;
+
+	for (i = 0; i < NR_IRQS; ++i)
+		irq_desc[i].handler = &xilinx_intc;
 }
diff -Nru a/arch/ppc64/Kconfig b/arch/ppc64/Kconfig
--- a/arch/ppc64/Kconfig	2005-01-10 20:11:19 -08:00
+++ b/arch/ppc64/Kconfig	2005-01-10 20:11:19 -08:00
@@ -20,6 +20,10 @@
 	bool
 	default y
 
+config GENERIC_CALIBRATE_DELAY
+	bool
+	default y
+
 config GENERIC_ISA_DMA
 	bool
 	default y
@@ -301,7 +305,8 @@
 
 config HOTPLUG_CPU
 	bool "Support for hot-pluggable CPUs"
-	depends on SMP && HOTPLUG && EXPERIMENTAL && PPC_PSERIES
+	depends on SMP && EXPERIMENTAL && PPC_PSERIES
+	select HOTPLUG
 	---help---
 	  Say Y here to be able to turn CPUs off and on.
 
diff -Nru a/arch/ppc64/Kconfig.debug b/arch/ppc64/Kconfig.debug
--- a/arch/ppc64/Kconfig.debug	2005-01-10 20:11:22 -08:00
+++ b/arch/ppc64/Kconfig.debug	2005-01-10 20:11:22 -08:00
@@ -6,6 +6,16 @@
 	bool "Check for stack overflows"
 	depends on DEBUG_KERNEL
 
+config KPROBES
+	bool "Kprobes"
+	depends on DEBUG_KERNEL
+	help
+	  Kprobes allows you to trap at almost any kernel address and
+	  execute a callback function.  register_kprobe() establishes
+	  a probepoint and specifies the callback.  Kprobes is useful
+	  for kernel debugging, non-intrusive instrumentation and testing.
+	  If in doubt, say "N".
+
 config DEBUG_STACK_USAGE
 	bool "Stack utilization instrumentation"
 	depends on DEBUG_KERNEL
diff -Nru a/arch/ppc64/Makefile b/arch/ppc64/Makefile
--- a/arch/ppc64/Makefile	2005-01-10 20:11:16 -08:00
+++ b/arch/ppc64/Makefile	2005-01-10 20:11:16 -08:00
@@ -36,7 +36,11 @@
 		   -mcall-aixdesc
 
 ifeq ($(CONFIG_POWER4_ONLY),y)
+ifeq ($(CONFIG_ALTIVEC),y)
+	CFLAGS += $(call cc-option,-mcpu=970)
+else
 	CFLAGS += $(call cc-option,-mcpu=power4)
+endif
 else
 	CFLAGS += $(call cc-option,-mtune=power4)
 endif
diff -Nru a/arch/ppc64/configs/g5_defconfig b/arch/ppc64/configs/g5_defconfig
--- a/arch/ppc64/configs/g5_defconfig	2005-01-10 20:11:16 -08:00
+++ b/arch/ppc64/configs/g5_defconfig	2005-01-10 20:11:16 -08:00
@@ -440,7 +440,6 @@
 CONFIG_IP_NF_TARGET_REDIRECT=y
 CONFIG_IP_NF_TARGET_NETMAP=y
 CONFIG_IP_NF_TARGET_SAME=y
-# CONFIG_IP_NF_NAT_LOCAL is not set
 # CONFIG_IP_NF_NAT_SNMP_BASIC is not set
 CONFIG_IP_NF_MANGLE=y
 CONFIG_IP_NF_TARGET_TOS=y
diff -Nru a/arch/ppc64/configs/iSeries_defconfig b/arch/ppc64/configs/iSeries_defconfig
--- a/arch/ppc64/configs/iSeries_defconfig	2005-01-10 20:11:23 -08:00
+++ b/arch/ppc64/configs/iSeries_defconfig	2005-01-10 20:11:23 -08:00
@@ -316,7 +316,6 @@
 CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_IP_NF_TARGET_NETMAP=m
 CONFIG_IP_NF_TARGET_SAME=m
-# CONFIG_IP_NF_NAT_LOCAL is not set
 CONFIG_IP_NF_NAT_SNMP_BASIC=m
 CONFIG_IP_NF_NAT_IRC=m
 CONFIG_IP_NF_NAT_FTP=m
diff -Nru a/arch/ppc64/configs/pSeries_defconfig b/arch/ppc64/configs/pSeries_defconfig
--- a/arch/ppc64/configs/pSeries_defconfig	2005-01-10 20:11:22 -08:00
+++ b/arch/ppc64/configs/pSeries_defconfig	2005-01-10 20:11:22 -08:00
@@ -408,7 +408,6 @@
 CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_IP_NF_TARGET_NETMAP=m
 CONFIG_IP_NF_TARGET_SAME=m
-# CONFIG_IP_NF_NAT_LOCAL is not set
 CONFIG_IP_NF_NAT_SNMP_BASIC=m
 CONFIG_IP_NF_NAT_IRC=m
 CONFIG_IP_NF_NAT_FTP=m
diff -Nru a/arch/ppc64/defconfig b/arch/ppc64/defconfig
--- a/arch/ppc64/defconfig	2005-01-10 20:11:17 -08:00
+++ b/arch/ppc64/defconfig	2005-01-10 20:11:17 -08:00
@@ -374,7 +374,6 @@
 CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_IP_NF_TARGET_NETMAP=m
 CONFIG_IP_NF_TARGET_SAME=m
-# CONFIG_IP_NF_NAT_LOCAL is not set
 CONFIG_IP_NF_NAT_SNMP_BASIC=m
 CONFIG_IP_NF_NAT_IRC=m
 CONFIG_IP_NF_NAT_FTP=m
diff -Nru a/arch/ppc64/kernel/LparData.c b/arch/ppc64/kernel/LparData.c
--- a/arch/ppc64/kernel/LparData.c	2005-01-10 20:11:17 -08:00
+++ b/arch/ppc64/kernel/LparData.c	2005-01-10 20:11:17 -08:00
@@ -16,7 +16,7 @@
 #include <asm/naca.h>
 #include <asm/abs_addr.h>
 #include <asm/iSeries/ItLpNaca.h>
-#include <asm/iSeries/ItLpPaca.h>
+#include <asm/lppaca.h>
 #include <asm/iSeries/ItLpRegSave.h>
 #include <asm/paca.h>
 #include <asm/iSeries/HvReleaseData.h>
@@ -41,86 +41,91 @@
  */
 
 struct HvReleaseData hvReleaseData = {
-	0xc8a5d9c4,	/* desc = "HvRD" ebcdic */
-	sizeof(struct HvReleaseData),
-	offsetof(struct naca_struct, xItVpdAreas),
-	(struct naca_struct *)(NACA_VIRT_ADDR), /* 64-bit Naca address */
-	0x6000,		/* offset of LparMap within loadarea (see head.S) */
-	0,
-	1,		/* tags inactive       */
-	0,		/* 64 bit              */
-	0,		/* shared processors   */
-	0,		/* HMT allowed         */
-	6,		/* TEMP: This allows non-GA driver */
-	4,		/* We are v5r2m0               */
-	3,		/* Min supported PLIC = v5r1m0 */
-	3,		/* Min usable PLIC   = v5r1m0 */
-	{ 0xd3, 0x89, 0x95, 0xa4, /* "Linux 2.4   "*/
-	  0xa7, 0x40, 0xf2, 0x4b,
-	  0xf4, 0x4b, 0xf6, 0xf4 },
-	{0}  
+	.xDesc = 0xc8a5d9c4,	/* "HvRD" ebcdic */
+	.xSize = sizeof(struct HvReleaseData),
+	.xVpdAreasPtrOffset = offsetof(struct naca_struct, xItVpdAreas),
+	.xSlicNacaAddr = &naca,		/* 64-bit Naca address */
+	.xMsNucDataOffset = 0x6000,	/* offset of LparMap within loadarea (see head.S) */
+	.xTagsMode = 1,			/* tags inactive       */
+	.xAddressSize = 0,		/* 64 bit              */
+	.xNoSharedProcs = 0,		/* shared processors   */
+	.xNoHMT = 0,			/* HMT allowed         */
+	.xRsvd2 = 6,			/* TEMP: This allows non-GA driver */
+	.xVrmIndex = 4,			/* We are v5r2m0               */
+	.xMinSupportedPlicVrmIndex = 3,		/* v5r1m0 */
+	.xMinCompatablePlicVrmIndex = 3,	/* v5r1m0 */
+	.xVrmName = { 0xd3, 0x89, 0x95, 0xa4,	/* "Linux 2.4.64" ebcdic */
+		0xa7, 0x40, 0xf2, 0x4b,
+		0xf4, 0x4b, 0xf6, 0xf4 },
 };
 
-extern void SystemReset_Iseries(void);
-extern void MachineCheck_Iseries(void);
-extern void DataAccess_Iseries(void);
-extern void InstructionAccess_Iseries(void);
-extern void HardwareInterrupt_Iseries(void);
-extern void Alignment_Iseries(void);
-extern void ProgramCheck_Iseries(void);
-extern void FPUnavailable_Iseries(void);
-extern void Decrementer_Iseries(void);
-extern void Trap_0a_Iseries(void);
-extern void Trap_0b_Iseries(void);
-extern void SystemCall_Iseries(void);
-extern void SingleStep_Iseries(void);
-extern void Trap_0e_Iseries(void);
-extern void PerformanceMonitor_Iseries(void);
-extern void DataAccessSLB_Iseries(void);
-extern void InstructionAccessSLB_Iseries(void);
+extern void system_reset_iSeries(void);
+extern void machine_check_iSeries(void);
+extern void data_access_iSeries(void);
+extern void instruction_access_iSeries(void);
+extern void hardware_interrupt_iSeries(void);
+extern void alignment_iSeries(void);
+extern void program_check_iSeries(void);
+extern void fp_unavailable_iSeries(void);
+extern void decrementer_iSeries(void);
+extern void trap_0a_iSeries(void);
+extern void trap_0b_iSeries(void);
+extern void system_call_iSeries(void);
+extern void single_step_iSeries(void);
+extern void trap_0e_iSeries(void);
+extern void performance_monitor_iSeries(void);
+extern void data_access_slb_iSeries(void);
+extern void instruction_access_slb_iSeries(void);
 	
 struct ItLpNaca itLpNaca = {
-	0xd397d581,	/* desc = "LpNa" ebcdic */
-	0x0400,		/* size of ItLpNaca     */
-	0x0300, 19,	/* offset to int array, # ents */
-	0, 0, 0,	/* Part # of primary, serv, me */
-	0, 0x100,	/* # of LP queues, offset */
-	0, 0, 0,	/* Piranha stuff */
-	{ 0,0,0,0,0 },	/* reserved */
-	0,0,0,0,0,0,0,	/* stuff    */
-	{ 0,0,0,0,0 },	/* reserved */
-	0,		/* reserved */
-	0,		/* VRM index of PLIC */
-	0, 0,		/* min supported, compat SLIC */
-	0,		/* 64-bit addr of load area   */
-	0,		/* chunks for load area  */
-	0, 0,		/* PASE mask, seg table  */
-	{ 0 },		/* 64 reserved bytes  */
-	{ 0 }, 		/* 128 reserved bytes */
-	{ 0 }, 		/* Old LP Queue       */
-	{ 0 }, 		/* 384 reserved bytes */
-	{
-		(u64)SystemReset_Iseries,	/* 0x100 System Reset */
-		(u64)MachineCheck_Iseries,	/* 0x200 Machine Check */
-		(u64)DataAccess_Iseries,	/* 0x300 Data Access */
-		(u64)InstructionAccess_Iseries,	/* 0x400 Instruction Access */
-		(u64)HardwareInterrupt_Iseries,	/* 0x500 External */
-		(u64)Alignment_Iseries,		/* 0x600 Alignment */
-		(u64)ProgramCheck_Iseries,	/* 0x700 Program Check */
-		(u64)FPUnavailable_Iseries,	/* 0x800 FP Unavailable */
-		(u64)Decrementer_Iseries,	/* 0x900 Decrementer */
-		(u64)Trap_0a_Iseries,		/* 0xa00 Trap 0A */
-		(u64)Trap_0b_Iseries,		/* 0xb00 Trap 0B */
-		(u64)SystemCall_Iseries,	/* 0xc00 System Call */
-		(u64)SingleStep_Iseries,	/* 0xd00 Single Step */
-		(u64)Trap_0e_Iseries,		/* 0xe00 Trap 0E */
-		(u64)PerformanceMonitor_Iseries,/* 0xf00 Performance Monitor */
+	.xDesc = 0xd397d581,		/* "LpNa" ebcdic */
+	.xSize = 0x0400,		/* size of ItLpNaca */
+	.xIntHdlrOffset = 0x0300,	/* offset to int array */
+	.xMaxIntHdlrEntries = 19,	/* # ents */
+	.xPrimaryLpIndex = 0,		/* Part # of primary */
+	.xServiceLpIndex = 0,		/* Part # of serv */
+	.xLpIndex = 0,			/* Part # of me */
+	.xMaxLpQueues = 0,		/* # of LP queues */
+	.xLpQueueOffset = 0x100,	/* offset of start of LP queues */
+	.xPirEnvironMode = 0,		/* Piranha stuff */
+	.xPirConsoleMode = 0,
+	.xPirDasdMode = 0,
+	.xLparInstalled = 0,
+	.xSysPartitioned = 0,
+	.xHwSyncedTBs = 0,
+	.xIntProcUtilHmt = 0,
+	.xSpVpdFormat = 0,
+	.xIntProcRatio = 0,
+	.xPlicVrmIndex = 0,		/* VRM index of PLIC */
+	.xMinSupportedSlicVrmInd = 0,	/* min supported SLIC */
+	.xMinCompatableSlicVrmInd = 0,	/* min compat SLIC */
+	.xLoadAreaAddr = 0,		/* 64-bit addr of load area */
+	.xLoadAreaChunks = 0,		/* chunks for load area */
+	.xPaseSysCallCRMask = 0,	/* PASE mask */
+	.xSlicSegmentTablePtr = 0,	/* seg table */
+	.xOldLpQueue = { 0 }, 		/* Old LP Queue */
+	.xInterruptHdlr = {
+		(u64)system_reset_iSeries,	/* 0x100 System Reset */
+		(u64)machine_check_iSeries,	/* 0x200 Machine Check */
+		(u64)data_access_iSeries,	/* 0x300 Data Access */
+		(u64)instruction_access_iSeries, /* 0x400 Instruction Access */
+		(u64)hardware_interrupt_iSeries, /* 0x500 External */
+		(u64)alignment_iSeries,		/* 0x600 Alignment */
+		(u64)program_check_iSeries,	/* 0x700 Program Check */
+		(u64)fp_unavailable_iSeries,	/* 0x800 FP Unavailable */
+		(u64)decrementer_iSeries,	/* 0x900 Decrementer */
+		(u64)trap_0a_iSeries,		/* 0xa00 Trap 0A */
+		(u64)trap_0b_iSeries,		/* 0xb00 Trap 0B */
+		(u64)system_call_iSeries,	/* 0xc00 System Call */
+		(u64)single_step_iSeries,	/* 0xd00 Single Step */
+		(u64)trap_0e_iSeries,		/* 0xe00 Trap 0E */
+		(u64)performance_monitor_iSeries,/* 0xf00 Performance Monitor */
 		0,				/* int 0x1000 */
 		0,				/* int 0x1010 */
 		0,				/* int 0x1020 CPU ctls */
-		(u64)HardwareInterrupt_Iseries, /* SC Ret Hdlr */
-		(u64)DataAccessSLB_Iseries,	/* 0x380 D-SLB */
-		(u64)InstructionAccessSLB_Iseries /* 0x480 I-SLB */
+		(u64)hardware_interrupt_iSeries, /* SC Ret Hdlr */
+		(u64)data_access_slb_iSeries,	/* 0x380 D-SLB */
+		(u64)instruction_access_slb_iSeries /* 0x480 I-SLB */
 	}
 };
 EXPORT_SYMBOL(itLpNaca);
@@ -153,10 +158,8 @@
 u64    xRecoveryLogBuffer[32] __attribute__((__section__(".data")));
 
 struct SpCommArea xSpCommArea = {
-	0xE2D7C3C2,
-	1,
-	{0},
-	0, 0, 0, 0, {0}
+	.xDesc = 0xE2D7C3C2,
+	.xFormat = 1,
 };
 
 /* The LparMap data is now located at offset 0x6000 in head.S
@@ -168,22 +171,21 @@
  * offset into the Naca of the pointer to the ItVpdAreas.
  */
 struct ItVpdAreas itVpdAreas = {
-	0xc9a3e5c1,	/* "ItVA" */
-	sizeof( struct ItVpdAreas ),
-	0, 0,
-	26,		/* # VPD array entries */
-	10,		/* # DMA array entries */
-	NR_CPUS*2, maxPhysicalProcessors,	/* Max logical, physical procs */
-	offsetof(struct ItVpdAreas,xPlicDmaToks),/* offset to DMA toks */
-	offsetof(struct ItVpdAreas,xSlicVpdAdrs),/* offset to VPD addrs */
-	offsetof(struct ItVpdAreas,xPlicDmaLens),/* offset to DMA lens */
-	offsetof(struct ItVpdAreas,xSlicVpdLens),/* offset to VPD lens */
-	0,		/* max slot labels */
-	1,		/* max LP queues */
-	{0}, {0},	/* reserved */
-	{0},		/* DMA lengths */
-	{0},		/* DMA tokens */
-	{		/* VPD lengths */
+	.xSlicDesc = 0xc9a3e5c1,		/* "ItVA" */
+	.xSlicSize = sizeof(struct ItVpdAreas),
+	.xSlicVpdEntries = ItVpdMaxEntries,	/* # VPD array entries */
+	.xSlicDmaEntries = ItDmaMaxEntries,	/* # DMA array entries */
+	.xSlicMaxLogicalProcs = NR_CPUS * 2,	/* Max logical procs */
+	.xSlicMaxPhysicalProcs = maxPhysicalProcessors,	/* Max physical procs */
+	.xSlicDmaToksOffset = offsetof(struct ItVpdAreas, xPlicDmaToks),
+	.xSlicVpdAdrsOffset = offsetof(struct ItVpdAreas, xSlicVpdAdrs),
+	.xSlicDmaLensOffset = offsetof(struct ItVpdAreas, xPlicDmaLens),
+	.xSlicVpdLensOffset = offsetof(struct ItVpdAreas, xSlicVpdLens),
+	.xSlicMaxSlotLabels = 0,		/* max slot labels */
+	.xSlicMaxLpQueues = 1,			/* max LP queues */
+	.xPlicDmaLens = { 0 },			/* DMA lengths */
+	.xPlicDmaToks = { 0 },			/* DMA tokens */
+	.xSlicVpdLens = {			/* VPD lengths */
 	        0,0,0,		        /*  0 - 2 */
 		sizeof(xItExtVpdPanel), /*       3 Extended VPD   */
 		sizeof(struct paca_struct),	/*       4 length of Paca  */
@@ -201,7 +203,7 @@
 		sizeof(struct ItLpQueue),/*     23 length of Lp Queue */
 		0,0			/* 24 - 25 */
 		},
-	{			/* VPD addresses */
+	.xSlicVpdAdrs = {			/* VPD addresses */
 		0,0,0,  		/*	 0 -  2 */
 		&xItExtVpdPanel,        /*       3 Extended VPD */
 		&paca[0],		/*       4 first Paca */
diff -Nru a/arch/ppc64/kernel/Makefile b/arch/ppc64/kernel/Makefile
--- a/arch/ppc64/kernel/Makefile	2005-01-10 20:11:23 -08:00
+++ b/arch/ppc64/kernel/Makefile	2005-01-10 20:11:23 -08:00
@@ -16,7 +16,7 @@
 obj-$(CONFIG_PPC_OF) +=	of_device.o
 
 pci-obj-$(CONFIG_PPC_ISERIES)	+= iSeries_pci.o iSeries_pci_reset.o
-pci-obj-$(CONFIG_PPC_MULTIPLATFORM)	+= pci_dn.o pci_dma_direct.o
+pci-obj-$(CONFIG_PPC_MULTIPLATFORM)	+= pci_dn.o pci_direct_iommu.o
 
 obj-$(CONFIG_PCI)	+= pci.o pci_iommu.o iomap.o $(pci-obj-y)
 
@@ -61,5 +61,6 @@
 endif
 
 obj-$(CONFIG_ALTIVEC)		+= vecemu.o vector.o
+obj-$(CONFIG_KPROBES)		+= kprobes.o
 
 CFLAGS_ioctl32.o += -Ifs/
diff -Nru a/arch/ppc64/kernel/asm-offsets.c b/arch/ppc64/kernel/asm-offsets.c
--- a/arch/ppc64/kernel/asm-offsets.c	2005-01-10 20:11:20 -08:00
+++ b/arch/ppc64/kernel/asm-offsets.c	2005-01-10 20:11:20 -08:00
@@ -28,13 +28,13 @@
 #include <asm/pgtable.h>
 #include <asm/processor.h>
 
-#include <asm/naca.h>
 #include <asm/paca.h>
-#include <asm/iSeries/ItLpPaca.h>
+#include <asm/lppaca.h>
 #include <asm/iSeries/ItLpQueue.h>
 #include <asm/iSeries/HvLpEvent.h>
 #include <asm/rtas.h>
 #include <asm/cputable.h>
+#include <asm/cache.h>
 
 #define DEFINE(sym, val) \
 	asm volatile("\n->" #sym " %0 " #val : : "i" (val))
@@ -67,14 +67,12 @@
 #endif /* CONFIG_ALTIVEC */
 	DEFINE(MM, offsetof(struct task_struct, mm));
 
-	/* naca */
-        DEFINE(PACA, offsetof(struct naca_struct, paca));
-	DEFINE(DCACHEL1LINESIZE, offsetof(struct systemcfg, dCacheL1LineSize));
-        DEFINE(DCACHEL1LOGLINESIZE, offsetof(struct naca_struct, dCacheL1LogLineSize));
-        DEFINE(DCACHEL1LINESPERPAGE, offsetof(struct naca_struct, dCacheL1LinesPerPage));
-        DEFINE(ICACHEL1LINESIZE, offsetof(struct systemcfg, iCacheL1LineSize));
-        DEFINE(ICACHEL1LOGLINESIZE, offsetof(struct naca_struct, iCacheL1LogLineSize));
-        DEFINE(ICACHEL1LINESPERPAGE, offsetof(struct naca_struct, iCacheL1LinesPerPage));
+	DEFINE(DCACHEL1LINESIZE, offsetof(struct ppc64_caches, dline_size));
+	DEFINE(DCACHEL1LOGLINESIZE, offsetof(struct ppc64_caches, log_dline_size));
+	DEFINE(DCACHEL1LINESPERPAGE, offsetof(struct ppc64_caches, dlines_per_page));
+	DEFINE(ICACHEL1LINESIZE, offsetof(struct ppc64_caches, iline_size));
+	DEFINE(ICACHEL1LOGLINESIZE, offsetof(struct ppc64_caches, log_iline_size));
+	DEFINE(ICACHEL1LINESPERPAGE, offsetof(struct ppc64_caches, ilines_per_page));
 	DEFINE(PLATFORM, offsetof(struct systemcfg, platform));
 
 	/* paca */
@@ -104,10 +102,10 @@
         DEFINE(PACAEMERGSP, offsetof(struct paca_struct, emergency_sp));
 	DEFINE(PACALPPACA, offsetof(struct paca_struct, lppaca));
 	DEFINE(PACAHWCPUID, offsetof(struct paca_struct, hw_cpu_id));
-        DEFINE(LPPACASRR0, offsetof(struct ItLpPaca, xSavedSrr0));
-        DEFINE(LPPACASRR1, offsetof(struct ItLpPaca, xSavedSrr1));
-	DEFINE(LPPACAANYINT, offsetof(struct ItLpPaca, xIntDword.xAnyInt));
-	DEFINE(LPPACADECRINT, offsetof(struct ItLpPaca, xIntDword.xFields.xDecrInt));
+	DEFINE(LPPACASRR0, offsetof(struct lppaca, saved_srr0));
+	DEFINE(LPPACASRR1, offsetof(struct lppaca, saved_srr1));
+	DEFINE(LPPACAANYINT, offsetof(struct lppaca, int_dword.any_int));
+	DEFINE(LPPACADECRINT, offsetof(struct lppaca, int_dword.fields.decr_int));
 
 	/* RTAS */
 	DEFINE(RTASBASE, offsetof(struct rtas_t, base));
diff -Nru a/arch/ppc64/kernel/eeh.c b/arch/ppc64/kernel/eeh.c
--- a/arch/ppc64/kernel/eeh.c	2005-01-10 20:11:20 -08:00
+++ b/arch/ppc64/kernel/eeh.c	2005-01-10 20:11:20 -08:00
@@ -32,6 +32,7 @@
 #include <asm/machdep.h>
 #include <asm/rtas.h>
 #include <asm/atomic.h>
+#include <asm/systemcfg.h>
 #include "pci.h"
 
 #undef DEBUG
@@ -95,6 +96,7 @@
 static int ibm_set_eeh_option;
 static int ibm_set_slot_reset;
 static int ibm_read_slot_reset_state;
+static int ibm_read_slot_reset_state2;
 static int ibm_slot_error_detail;
 
 static int eeh_subsystem_enabled;
@@ -407,6 +409,27 @@
 }
 
 /**
+ * read_slot_reset_state - Read the reset state of a device node's slot
+ * @dn: device node to read
+ * @rets: array to return results in
+ */
+static int read_slot_reset_state(struct device_node *dn, int rets[])
+{
+	int token, outputs;
+
+	if (ibm_read_slot_reset_state2 != RTAS_UNKNOWN_SERVICE) {
+		token = ibm_read_slot_reset_state2;
+		outputs = 4;
+	} else {
+		token = ibm_read_slot_reset_state;
+		outputs = 3;
+	}
+
+	return rtas_call(token, 3, outputs, rets, dn->eeh_config_addr,
+			 BUID_HI(dn->phb->buid), BUID_LO(dn->phb->buid));
+}
+
+/**
  * eeh_panic - call panic() for an eeh event that cannot be handled.
  * The philosophy of this routine is that it is better to panic and
  * halt the OS than it is to risk possible data corruption by
@@ -508,7 +531,7 @@
 int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev)
 {
 	int ret;
-	int rets[2];
+	int rets[3];
 	unsigned long flags;
 	int rc, reset_state;
 	struct eeh_event  *event;
@@ -539,11 +562,8 @@
 		atomic_inc(&eeh_fail_count);
 		if (atomic_read(&eeh_fail_count) >= EEH_MAX_FAILS) {
 			/* re-read the slot reset state */
-			rets[0] = -1;
-			rtas_call(ibm_read_slot_reset_state, 3, 3, rets,
-				  dn->eeh_config_addr,
-				  BUID_HI(dn->phb->buid),
-				  BUID_LO(dn->phb->buid));
+			if (read_slot_reset_state(dn, rets) != 0)
+				rets[0] = -1;	/* reset state unknown */
 			eeh_panic(dev, rets[0]);
 		}
 		return 0;
@@ -556,10 +576,7 @@
 	 * function zero of a multi-function device.
 	 * In any case they must share a common PHB.
 	 */
-	ret = rtas_call(ibm_read_slot_reset_state, 3, 3, rets,
-			dn->eeh_config_addr, BUID_HI(dn->phb->buid),
-			BUID_LO(dn->phb->buid));
-
+	ret = read_slot_reset_state(dn, rets);
 	if (!(ret == 0 && rets[1] == 1 && (rets[0] == 2 || rets[0] == 4))) {
 		__get_cpu_var(false_positives)++;
 		return 0;
@@ -755,6 +772,7 @@
 
 	ibm_set_eeh_option = rtas_token("ibm,set-eeh-option");
 	ibm_set_slot_reset = rtas_token("ibm,set-slot-reset");
+	ibm_read_slot_reset_state2 = rtas_token("ibm,read-slot-reset-state2");
 	ibm_read_slot_reset_state = rtas_token("ibm,read-slot-reset-state");
 	ibm_slot_error_detail = rtas_token("ibm,slot-error-detail");
 
diff -Nru a/arch/ppc64/kernel/entry.S b/arch/ppc64/kernel/entry.S
--- a/arch/ppc64/kernel/entry.S	2005-01-10 20:11:15 -08:00
+++ b/arch/ppc64/kernel/entry.S	2005-01-10 20:11:15 -08:00
@@ -54,8 +54,8 @@
 
 #undef SHOW_SYSCALLS
 
-	.globl SystemCall_common
-SystemCall_common:
+	.globl system_call_common
+system_call_common:
 	andi.	r10,r12,MSR_PR
 	mr	r10,r1
 	addi	r1,r1,-INT_FRAME_SIZE
@@ -100,7 +100,7 @@
 	cmpdi	cr1,r0,0x5555		/* syscall 0x5555 */
 	andi.	r10,r12,MSR_PR		/* from kernel */
 	crand	4*cr0+eq,4*cr1+eq,4*cr0+eq
-	beq	HardwareInterrupt_entry
+	beq	hardware_interrupt_entry
 	lbz	r10,PACAPROCENABLED(r13)
 	std	r10,SOFTE(r1)
 #endif
diff -Nru a/arch/ppc64/kernel/head.S b/arch/ppc64/kernel/head.S
--- a/arch/ppc64/kernel/head.S	2005-01-10 20:11:19 -08:00
+++ b/arch/ppc64/kernel/head.S	2005-01-10 20:11:19 -08:00
@@ -78,7 +78,7 @@
  *
  *  For iSeries:
  *   1. The MMU is on (as it always is for iSeries)
- *   2. The kernel is entered at SystemReset_Iseries
+ *   2. The kernel is entered at system_reset_iSeries
  */
 
 	.text
@@ -165,7 +165,7 @@
 #else
 #ifdef CONFIG_SMP
 	mr	r3,r24
-	b	.pseries_secondary_smp_init
+	b	.pSeries_secondary_smp_init
 #else
 	BUG_OPCODE
 #endif
@@ -305,15 +305,15 @@
  */
 #define STD_EXCEPTION_PSERIES(n, label)			\
 	. = n;						\
-	.globl label##_Pseries;				\
-label##_Pseries:					\
+	.globl label##_pSeries;				\
+label##_pSeries:					\
 	HMT_MEDIUM;					\
 	mtspr	SPRG1,r13;		/* save r13 */	\
 	EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, label##_common)
 
 #define STD_EXCEPTION_ISERIES(n, label, area)		\
-	.globl label##_Iseries;				\
-label##_Iseries:					\
+	.globl label##_iSeries;				\
+label##_iSeries:					\
 	HMT_MEDIUM;					\
 	mtspr	SPRG1,r13;		/* save r13 */	\
 	EXCEPTION_PROLOG_ISERIES_1(area);		\
@@ -321,14 +321,14 @@
 	b	label##_common
 
 #define MASKABLE_EXCEPTION_ISERIES(n, label)				\
-	.globl label##_Iseries;						\
-label##_Iseries:							\
+	.globl label##_iSeries;						\
+label##_iSeries:							\
 	HMT_MEDIUM;							\
 	mtspr	SPRG1,r13;		/* save r13 */			\
 	EXCEPTION_PROLOG_ISERIES_1(PACA_EXGEN);				\
 	lbz	r10,PACAPROCENABLED(r13);				\
 	cmpwi	0,r10,0;						\
-	beq-	label##_Iseries_masked;					\
+	beq-	label##_iSeries_masked;					\
 	EXCEPTION_PROLOG_ISERIES_2;					\
 	b	label##_common;						\
 
@@ -388,17 +388,17 @@
 	.globl __start_interrupts
 __start_interrupts:
 
-	STD_EXCEPTION_PSERIES(0x100, SystemReset)
+	STD_EXCEPTION_PSERIES(0x100, system_reset)
 
 	. = 0x200
-_MachineCheckPseries:
+_machine_check_pSeries:
 	HMT_MEDIUM
 	mtspr	SPRG1,r13		/* save r13 */
-	EXCEPTION_PROLOG_PSERIES(PACA_EXMC, MachineCheck_common)
+	EXCEPTION_PROLOG_PSERIES(PACA_EXMC, machine_check_common)
 
 	. = 0x300
-	.globl DataAccess_Pseries
-DataAccess_Pseries:
+	.globl data_access_pSeries
+data_access_pSeries:
 	HMT_MEDIUM
 	mtspr	SPRG1,r13
 BEGIN_FTR_SECTION
@@ -409,15 +409,15 @@
 	rlwimi	r13,r12,16,0x20
 	mfcr	r12
 	cmpwi	r13,0x2c
-	beq	.do_stab_bolted_Pseries
+	beq	.do_stab_bolted_pSeries
 	mtcrf	0x80,r12
 	mfspr	r12,SPRG2
 END_FTR_SECTION_IFCLR(CPU_FTR_SLB)
-	EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, DataAccess_common)
+	EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, data_access_common)
 
 	. = 0x380
-	.globl DataAccessSLB_Pseries
-DataAccessSLB_Pseries:
+	.globl data_access_slb_pSeries
+data_access_slb_pSeries:
 	HMT_MEDIUM
 	mtspr	SPRG1,r13
 	mfspr	r13,SPRG3		/* get paca address into r13 */
@@ -433,11 +433,11 @@
 	mfspr	r3,DAR
 	b	.do_slb_miss		/* Rel. branch works in real mode */
 
-	STD_EXCEPTION_PSERIES(0x400, InstructionAccess)
+	STD_EXCEPTION_PSERIES(0x400, instruction_access)
 
 	. = 0x480
-	.globl InstructionAccessSLB_Pseries
-InstructionAccessSLB_Pseries:
+	.globl instruction_access_slb_pSeries
+instruction_access_slb_pSeries:
 	HMT_MEDIUM
 	mtspr	SPRG1,r13
 	mfspr	r13,SPRG3		/* get paca address into r13 */
@@ -453,25 +453,25 @@
 	mfspr	r3,SRR0			/* SRR0 is faulting address */
 	b	.do_slb_miss		/* Rel. branch works in real mode */
 
-	STD_EXCEPTION_PSERIES(0x500, HardwareInterrupt)
-	STD_EXCEPTION_PSERIES(0x600, Alignment)
-	STD_EXCEPTION_PSERIES(0x700, ProgramCheck)
-	STD_EXCEPTION_PSERIES(0x800, FPUnavailable)
-	STD_EXCEPTION_PSERIES(0x900, Decrementer)
-	STD_EXCEPTION_PSERIES(0xa00, Trap_0a)
-	STD_EXCEPTION_PSERIES(0xb00, Trap_0b)
+	STD_EXCEPTION_PSERIES(0x500, hardware_interrupt)
+	STD_EXCEPTION_PSERIES(0x600, alignment)
+	STD_EXCEPTION_PSERIES(0x700, program_check)
+	STD_EXCEPTION_PSERIES(0x800, fp_unavailable)
+	STD_EXCEPTION_PSERIES(0x900, decrementer)
+	STD_EXCEPTION_PSERIES(0xa00, trap_0a)
+	STD_EXCEPTION_PSERIES(0xb00, trap_0b)
 
 	. = 0xc00
-	.globl	SystemCall_Pseries
-SystemCall_Pseries:
+	.globl	system_call_pSeries
+system_call_pSeries:
 	HMT_MEDIUM
 	mr	r9,r13
 	mfmsr	r10
 	mfspr	r13,SPRG3
 	mfspr	r11,SRR0
 	clrrdi	r12,r13,32
-	oris	r12,r12,SystemCall_common@h
-	ori	r12,r12,SystemCall_common@l
+	oris	r12,r12,system_call_common@h
+	ori	r12,r12,system_call_common@l
 	mtspr	SRR0,r12
 	ori	r10,r10,MSR_IR|MSR_DR|MSR_RI
 	mfspr	r12,SRR1
@@ -479,8 +479,8 @@
 	rfid
 	b	.	/* prevent speculative execution */
 
-	STD_EXCEPTION_PSERIES(0xd00, SingleStep)
-	STD_EXCEPTION_PSERIES(0xe00, Trap_0e)
+	STD_EXCEPTION_PSERIES(0xd00, single_step)
+	STD_EXCEPTION_PSERIES(0xe00, trap_0e)
 
 	/* We need to deal with the Altivec unavailable exception
 	 * here which is at 0xf20, thus in the middle of the
@@ -488,18 +488,18 @@
 	 * trickery is thus necessary
 	 */
 	. = 0xf00
-	b	PerformanceMonitor_Pseries
+	b	performance_monitor_pSeries
 
-	STD_EXCEPTION_PSERIES(0xf20, AltivecUnavailable)
+	STD_EXCEPTION_PSERIES(0xf20, altivec_unavailable)
 
-	STD_EXCEPTION_PSERIES(0x1300, InstructionBreakpoint)
-	STD_EXCEPTION_PSERIES(0x1700, AltivecAssist)
+	STD_EXCEPTION_PSERIES(0x1300, instruction_breakpoint)
+	STD_EXCEPTION_PSERIES(0x1700, altivec_assist)
 
 	/* moved from 0xf00 */
-	STD_EXCEPTION_PSERIES(0x3000, PerformanceMonitor)
+	STD_EXCEPTION_PSERIES(0x3000, performance_monitor)
 
 	. = 0x3100
-_GLOBAL(do_stab_bolted_Pseries)
+_GLOBAL(do_stab_bolted_pSeries)
 	mtcrf	0x80,r12
 	mfspr	r12,SPRG2
 	EXCEPTION_PROLOG_PSERIES(PACA_EXSLB, .do_stab_bolted)
@@ -512,22 +512,15 @@
 	 */
 	. = NACA_PHYS_ADDR
 	.globl __end_interrupts
-	.globl __start_naca
 __end_interrupts:
-__start_naca:
 #ifdef CONFIG_PPC_ISERIES
+	.globl naca
+naca:
 	.llong itVpdAreas
-#else
-	.llong 0x0
 #endif
-	.llong 0x0
-	.llong 0x0
-	.llong paca
 
 	. = SYSTEMCFG_PHYS_ADDR
-	.globl __end_naca
 	.globl __start_systemcfg
-__end_naca:
 __start_systemcfg:
 	. = (SYSTEMCFG_PHYS_ADDR + PAGE_SIZE)
 	.globl __end_systemcfg
@@ -565,10 +558,10 @@
 
 /***  ISeries-LPAR interrupt handlers ***/
 
-	STD_EXCEPTION_ISERIES(0x200, MachineCheck, PACA_EXMC)
+	STD_EXCEPTION_ISERIES(0x200, machine_check, PACA_EXMC)
 
-	.globl DataAccess_Iseries
-DataAccess_Iseries:
+	.globl data_access_iSeries
+data_access_iSeries:
 	mtspr	SPRG1,r13
 BEGIN_FTR_SECTION
 	mtspr	SPRG2,r12
@@ -578,23 +571,23 @@
 	rlwimi	r13,r12,16,0x20
 	mfcr	r12
 	cmpwi	r13,0x2c
-	beq	.do_stab_bolted_Iseries
+	beq	.do_stab_bolted_iSeries
 	mtcrf	0x80,r12
 	mfspr	r12,SPRG2
 END_FTR_SECTION_IFCLR(CPU_FTR_SLB)
 	EXCEPTION_PROLOG_ISERIES_1(PACA_EXGEN)
 	EXCEPTION_PROLOG_ISERIES_2
-	b	DataAccess_common
+	b	data_access_common
 
-.do_stab_bolted_Iseries:
+.do_stab_bolted_iSeries:
 	mtcrf	0x80,r12
 	mfspr	r12,SPRG2
 	EXCEPTION_PROLOG_ISERIES_1(PACA_EXSLB)
 	EXCEPTION_PROLOG_ISERIES_2
 	b	.do_stab_bolted
 
-	.globl	DataAccessSLB_Iseries
-DataAccessSLB_Iseries:
+	.globl	data_access_slb_iSeries
+data_access_slb_iSeries:
 	mtspr	SPRG1,r13		/* save r13 */
 	EXCEPTION_PROLOG_ISERIES_1(PACA_EXSLB)
 	std	r3,PACA_EXSLB+EX_R3(r13)
@@ -602,10 +595,10 @@
 	mfspr	r3,DAR
 	b	.do_slb_miss
 
-	STD_EXCEPTION_ISERIES(0x400, InstructionAccess, PACA_EXGEN)
+	STD_EXCEPTION_ISERIES(0x400, instruction_access, PACA_EXGEN)
 
-	.globl	InstructionAccessSLB_Iseries
-InstructionAccessSLB_Iseries:
+	.globl	instruction_access_slb_iSeries
+instruction_access_slb_iSeries:
 	mtspr	SPRG1,r13		/* save r13 */
 	EXCEPTION_PROLOG_ISERIES_1(PACA_EXSLB)
 	std	r3,PACA_EXSLB+EX_R3(r13)
@@ -613,27 +606,27 @@
 	ld	r3,PACALPPACA+LPPACASRR0(r13)
 	b	.do_slb_miss
 
-	MASKABLE_EXCEPTION_ISERIES(0x500, HardwareInterrupt)
-	STD_EXCEPTION_ISERIES(0x600, Alignment, PACA_EXGEN)
-	STD_EXCEPTION_ISERIES(0x700, ProgramCheck, PACA_EXGEN)
-	STD_EXCEPTION_ISERIES(0x800, FPUnavailable, PACA_EXGEN)
-	MASKABLE_EXCEPTION_ISERIES(0x900, Decrementer)
-	STD_EXCEPTION_ISERIES(0xa00, Trap_0a, PACA_EXGEN)
-	STD_EXCEPTION_ISERIES(0xb00, Trap_0b, PACA_EXGEN)
+	MASKABLE_EXCEPTION_ISERIES(0x500, hardware_interrupt)
+	STD_EXCEPTION_ISERIES(0x600, alignment, PACA_EXGEN)
+	STD_EXCEPTION_ISERIES(0x700, program_check, PACA_EXGEN)
+	STD_EXCEPTION_ISERIES(0x800, fp_unavailable, PACA_EXGEN)
+	MASKABLE_EXCEPTION_ISERIES(0x900, decrementer)
+	STD_EXCEPTION_ISERIES(0xa00, trap_0a, PACA_EXGEN)
+	STD_EXCEPTION_ISERIES(0xb00, trap_0b, PACA_EXGEN)
 
-	.globl	SystemCall_Iseries
-SystemCall_Iseries:
+	.globl	system_call_iSeries
+system_call_iSeries:
 	mr	r9,r13
 	mfspr	r13,SPRG3
 	EXCEPTION_PROLOG_ISERIES_2
-	b	SystemCall_common
+	b	system_call_common
 
-	STD_EXCEPTION_ISERIES( 0xd00, SingleStep, PACA_EXGEN)
-	STD_EXCEPTION_ISERIES( 0xe00, Trap_0e, PACA_EXGEN)
-	STD_EXCEPTION_ISERIES( 0xf00, PerformanceMonitor, PACA_EXGEN)
+	STD_EXCEPTION_ISERIES( 0xd00, single_step, PACA_EXGEN)
+	STD_EXCEPTION_ISERIES( 0xe00, trap_0e, PACA_EXGEN)
+	STD_EXCEPTION_ISERIES( 0xf00, performance_monitor, PACA_EXGEN)
 
-	.globl SystemReset_Iseries
-SystemReset_Iseries:
+	.globl system_reset_iSeries
+system_reset_iSeries:
 	mfspr	r13,SPRG3		/* Get paca address */
 	mfmsr	r24
 	ori	r24,r24,MSR_RI
@@ -659,11 +652,11 @@
 	subi	r1,r1,STACK_FRAME_OVERHEAD
 
 	cmpwi	0,r23,0
-	beq	iseries_secondary_smp_loop	/* Loop until told to go */
+	beq	iSeries_secondary_smp_loop	/* Loop until told to go */
 #ifdef SECONDARY_PROCESSORS
 	bne	.__secondary_start		/* Loop until told to go */
 #endif
-iseries_secondary_smp_loop:
+iSeries_secondary_smp_loop:
 	/* Let the Hypervisor know we are alive */
 	/* 8002 is a call to HvCallCfg::getLps, a harmless Hypervisor function */
 	lis	r3,0x8002
@@ -683,16 +676,16 @@
 	b	1b			/* If SMP not configured, secondaries
 					 * loop forever */
 
-	.globl Decrementer_Iseries_masked
-Decrementer_Iseries_masked:
+	.globl decrementer_iSeries_masked
+decrementer_iSeries_masked:
 	li	r11,1
 	stb	r11,PACALPPACA+LPPACADECRINT(r13)
 	lwz	r12,PACADEFAULTDECR(r13)
 	mtspr	SPRN_DEC,r12
 	/* fall through */
 
-	.globl HardwareInterrupt_Iseries_masked
-HardwareInterrupt_Iseries_masked:
+	.globl hardware_interrupt_iSeries_masked
+hardware_interrupt_iSeries_masked:
 	mtcrf	0x80,r9		/* Restore regs */
 	ld	r11,PACALPPACA+LPPACASRR0(r13)
 	ld	r12,PACALPPACA+LPPACASRR1(r13)
@@ -718,16 +711,16 @@
  * Vectors for the FWNMI option.  Share common code.
  */
 	. = 0x8000
-	.globl SystemReset_FWNMI
-SystemReset_FWNMI:
+	.globl system_reset_fwnmi
+system_reset_fwnmi:
 	HMT_MEDIUM
 	mtspr	SPRG1,r13		/* save r13 */
-	EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, SystemReset_common)
-	.globl MachineCheck_FWNMI
-MachineCheck_FWNMI:
+	EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, system_reset_common)
+	.globl machine_check_fwnmi
+machine_check_fwnmi:
 	HMT_MEDIUM
 	mtspr	SPRG1,r13		/* save r13 */
-	EXCEPTION_PROLOG_PSERIES(PACA_EXMC, MachineCheck_common)
+	EXCEPTION_PROLOG_PSERIES(PACA_EXMC, machine_check_common)
 
 	/*
 	 * Space for the initial segment table
@@ -745,33 +738,33 @@
 
 /*** Common interrupt handlers ***/
 
-	STD_EXCEPTION_COMMON(0x100, SystemReset, .SystemResetException)
+	STD_EXCEPTION_COMMON(0x100, system_reset, .system_reset_exception)
 
 	/*
 	 * Machine check is different because we use a different
 	 * save area: PACA_EXMC instead of PACA_EXGEN.
 	 */
 	.align	7
-	.globl MachineCheck_common
-MachineCheck_common:
+	.globl machine_check_common
+machine_check_common:
 	EXCEPTION_PROLOG_COMMON(0x200, PACA_EXMC)
 	DISABLE_INTS
 	bl	.save_nvgprs
 	addi	r3,r1,STACK_FRAME_OVERHEAD
-	bl	.MachineCheckException
+	bl	.machine_check_exception
 	b	.ret_from_except
 
-	STD_EXCEPTION_COMMON_LITE(0x900, Decrementer, .timer_interrupt)
-	STD_EXCEPTION_COMMON(0xa00, Trap_0a, .UnknownException)
-	STD_EXCEPTION_COMMON(0xb00, Trap_0b, .UnknownException)
-	STD_EXCEPTION_COMMON(0xd00, SingleStep, .SingleStepException)
-	STD_EXCEPTION_COMMON(0xe00, Trap_0e, .UnknownException)
-	STD_EXCEPTION_COMMON(0xf00, PerformanceMonitor, .PerformanceMonitorException)
-	STD_EXCEPTION_COMMON(0x1300, InstructionBreakpoint, .InstructionBreakpointException)
+	STD_EXCEPTION_COMMON_LITE(0x900, decrementer, .timer_interrupt)
+	STD_EXCEPTION_COMMON(0xa00, trap_0a, .unknown_exception)
+	STD_EXCEPTION_COMMON(0xb00, trap_0b, .unknown_exception)
+	STD_EXCEPTION_COMMON(0xd00, single_step, .single_step_exception)
+	STD_EXCEPTION_COMMON(0xe00, trap_0e, .unknown_exception)
+	STD_EXCEPTION_COMMON(0xf00, performance_monitor, .performance_monitor_exception)
+	STD_EXCEPTION_COMMON(0x1300, instruction_breakpoint, .instruction_breakpoint_exception)
 #ifdef CONFIG_ALTIVEC
-	STD_EXCEPTION_COMMON(0x1700, AltivecAssist, .AltivecAssistException)
+	STD_EXCEPTION_COMMON(0x1700, altivec_assist, .altivec_assist_exception)
 #else
-	STD_EXCEPTION_COMMON(0x1700, AltivecAssist, .UnknownException)
+	STD_EXCEPTION_COMMON(0x1700, altivec_assist, .unknown_exception)
 #endif
 
 /*
@@ -861,8 +854,8 @@
  * r9 - r13 are saved in paca->exgen.
  */
 	.align	7
-	.globl DataAccess_common
-DataAccess_common:
+	.globl data_access_common
+data_access_common:
 	mfspr	r10,DAR
 	std	r10,PACA_EXGEN+EX_DAR(r13)
 	mfspr	r10,DSISR
@@ -874,8 +867,8 @@
 	b	.do_hash_page	 	/* Try to handle as hpte fault */
 
 	.align	7
-	.globl InstructionAccess_common
-InstructionAccess_common:
+	.globl instruction_access_common
+instruction_access_common:
 	EXCEPTION_PROLOG_COMMON(0x400, PACA_EXGEN)
 	ld	r3,_NIP(r1)
 	andis.	r4,r12,0x5820
@@ -883,19 +876,19 @@
 	b	.do_hash_page		/* Try to handle as hpte fault */
 
 	.align	7
-	.globl HardwareInterrupt_common
-	.globl HardwareInterrupt_entry
-HardwareInterrupt_common:
+	.globl hardware_interrupt_common
+	.globl hardware_interrupt_entry
+hardware_interrupt_common:
 	EXCEPTION_PROLOG_COMMON(0x500, PACA_EXGEN)
-HardwareInterrupt_entry:
+hardware_interrupt_entry:
 	DISABLE_INTS
 	addi	r3,r1,STACK_FRAME_OVERHEAD
 	bl	.do_IRQ
 	b	.ret_from_except_lite
 
 	.align	7
-	.globl Alignment_common
-Alignment_common:
+	.globl alignment_common
+alignment_common:
 	mfspr	r10,DAR
 	std	r10,PACA_EXGEN+EX_DAR(r13)
 	mfspr	r10,DSISR
@@ -908,33 +901,33 @@
 	bl	.save_nvgprs
 	addi	r3,r1,STACK_FRAME_OVERHEAD
 	ENABLE_INTS
-	bl	.AlignmentException
+	bl	.alignment_exception
 	b	.ret_from_except
 
 	.align	7
-	.globl ProgramCheck_common
-ProgramCheck_common:
+	.globl program_check_common
+program_check_common:
 	EXCEPTION_PROLOG_COMMON(0x700, PACA_EXGEN)
 	bl	.save_nvgprs
 	addi	r3,r1,STACK_FRAME_OVERHEAD
 	ENABLE_INTS
-	bl	.ProgramCheckException
+	bl	.program_check_exception
 	b	.ret_from_except
 
 	.align	7
-	.globl FPUnavailable_common
-FPUnavailable_common:
+	.globl fp_unavailable_common
+fp_unavailable_common:
 	EXCEPTION_PROLOG_COMMON(0x800, PACA_EXGEN)
 	bne	.load_up_fpu		/* if from user, just load it up */
 	bl	.save_nvgprs
 	addi	r3,r1,STACK_FRAME_OVERHEAD
 	ENABLE_INTS
-	bl	.KernelFPUnavailableException
+	bl	.kernel_fp_unavailable_exception
 	BUG_OPCODE
 
 	.align	7
-	.globl AltivecUnavailable_common
-AltivecUnavailable_common:
+	.globl altivec_unavailable_common
+altivec_unavailable_common:
 	EXCEPTION_PROLOG_COMMON(0xf20, PACA_EXGEN)
 #ifdef CONFIG_ALTIVEC
 	bne	.load_up_altivec	/* if from user, just load it up */
@@ -942,7 +935,7 @@
 	bl	.save_nvgprs
 	addi	r3,r1,STACK_FRAME_OVERHEAD
 	ENABLE_INTS
-	bl	.AltivecUnavailableException
+	bl	.altivec_unavailable_exception
 	b	.ret_from_except
 
 /*
@@ -1195,7 +1188,7 @@
  * On pSeries, secondary processors spin in the following code.
  * At entry, r3 = this processor's number (physical cpu id)
  */
-_GLOBAL(pseries_secondary_smp_init)
+_GLOBAL(pSeries_secondary_smp_init)
 	mr	r24,r3
 	
 	/* turn on 64-bit mode */
@@ -1241,6 +1234,7 @@
 #endif
 #endif
 	b 	3b			/* Loop until told to go	 */
+
 #ifdef CONFIG_PPC_ISERIES
 _STATIC(__start_initialization_iSeries)
 	/* Clear out the BSS */
@@ -1274,14 +1268,6 @@
 	SET_REG_TO_CONST(r4, SYSTEMCFG_VIRT_ADDR)
 	std	r4,0(r9)		/* set the systemcfg pointer */
 
-	LOADADDR(r9,naca)
-	SET_REG_TO_CONST(r4, NACA_VIRT_ADDR)
-	std	r4,0(r9)		/* set the naca pointer */
-
-	/* Get the pointer to the segment table */
-	ld	r6,PACA(r4)		/* Get the base paca pointer	*/
-	ld	r4,PACASTABVIRT(r6)
-
 	bl	.iSeries_early_setup
 
 	/* relocation is on at this point */
@@ -1881,12 +1867,6 @@
 	li	r27,SYSTEMCFG_PHYS_ADDR
 	std	r27,0(r6)	 	/* set the value of systemcfg	*/
 
-	/* setup the naca pointer which is needed by *tab_initialize	*/
-	LOADADDR(r6,naca)
-	sub	r6,r6,r26		/* addr of the variable naca	*/
-	li	r27,NACA_PHYS_ADDR
-	std	r27,0(r6)	 	/* set the value of naca	*/
-
 #ifdef CONFIG_HMT
 	/* Start up the second thread on cpu 0 */
 	mfspr	r3,PVR
@@ -2023,11 +2003,6 @@
 	SET_REG_TO_CONST(r8, SYSTEMCFG_VIRT_ADDR)
 	std	r8,0(r9)
 
-	/* setup the naca pointer */
-	LOADADDR(r9,naca)
-	SET_REG_TO_CONST(r8, NACA_VIRT_ADDR)
-	std	r8,0(r9)		/* set the value of the naca ptr */
-
 	LOADADDR(r26, boot_cpuid)
 	lwz	r26,0(r26)
 
@@ -2108,7 +2083,7 @@
 101:
 #endif
 	mr	r3,r24
-	b	.pseries_secondary_smp_init
+	b	.pSeries_secondary_smp_init
 
 #ifdef CONFIG_HMT
 _GLOBAL(hmt_start_secondary)
diff -Nru a/arch/ppc64/kernel/iSeries_iommu.c b/arch/ppc64/kernel/iSeries_iommu.c
--- a/arch/ppc64/kernel/iSeries_iommu.c	2005-01-10 20:11:15 -08:00
+++ b/arch/ppc64/kernel/iSeries_iommu.c	2005-01-10 20:11:15 -08:00
@@ -132,11 +132,11 @@
 	if (parms->itc_size == 0)
 		panic("PCI_DMA: parms->size is zero, parms is 0x%p", parms);
 
-	tbl->it_size = parms->itc_size;
+	/* itc_size is in pages worth of table, it_size is in # of entries */
+	tbl->it_size = (parms->itc_size * PAGE_SIZE) / sizeof(union tce_entry);
 	tbl->it_busno = parms->itc_busno;
 	tbl->it_offset = parms->itc_offset;
 	tbl->it_index = parms->itc_index;
-	tbl->it_entrysize = sizeof(union tce_entry);
 	tbl->it_blocksize = 1;
 	tbl->it_type = TCE_PCI;
 
@@ -160,11 +160,16 @@
 		kfree(tbl);
 }
 
+static void iommu_dev_setup_iSeries(struct pci_dev *dev) { }
+static void iommu_bus_setup_iSeries(struct pci_bus *bus) { }
 
-void tce_init_iSeries(void)
+void iommu_init_early_iSeries(void)
 {
 	ppc_md.tce_build = tce_build_iSeries;
 	ppc_md.tce_free  = tce_free_iSeries;
+
+	ppc_md.iommu_dev_setup = iommu_dev_setup_iSeries;
+	ppc_md.iommu_bus_setup = iommu_bus_setup_iSeries;
 
 	pci_iommu_init();
 }
diff -Nru a/arch/ppc64/kernel/iSeries_pci.c b/arch/ppc64/kernel/iSeries_pci.c
--- a/arch/ppc64/kernel/iSeries_pci.c	2005-01-10 20:11:23 -08:00
+++ b/arch/ppc64/kernel/iSeries_pci.c	2005-01-10 20:11:23 -08:00
@@ -35,7 +35,6 @@
 #include <asm/machdep.h>
 #include <asm/pci-bridge.h>
 #include <asm/ppcdebug.h>
-#include <asm/naca.h>
 #include <asm/iommu.h>
 
 #include <asm/iSeries/HvCallPci.h>
@@ -47,8 +46,6 @@
 #include <asm/iSeries/mf.h>
 
 #include "pci.h"
-
-extern int panic_timeout;
 
 extern unsigned long io_page_mask;
 
diff -Nru a/arch/ppc64/kernel/iSeries_proc.c b/arch/ppc64/kernel/iSeries_proc.c
--- a/arch/ppc64/kernel/iSeries_proc.c	2005-01-10 20:11:17 -08:00
+++ b/arch/ppc64/kernel/iSeries_proc.c	2005-01-10 20:11:17 -08:00
@@ -24,8 +24,7 @@
 #include <asm/paca.h>
 #include <asm/processor.h>
 #include <asm/time.h>
-#include <asm/naca.h>
-#include <asm/iSeries/ItLpPaca.h>
+#include <asm/lppaca.h>
 #include <asm/iSeries/ItLpQueue.h>
 #include <asm/iSeries/HvCallXm.h>
 #include <asm/iSeries/IoHriMainStore.h>
diff -Nru a/arch/ppc64/kernel/iSeries_setup.c b/arch/ppc64/kernel/iSeries_setup.c
--- a/arch/ppc64/kernel/iSeries_setup.c	2005-01-10 20:11:21 -08:00
+++ b/arch/ppc64/kernel/iSeries_setup.c	2005-01-10 20:11:21 -08:00
@@ -44,6 +44,7 @@
 #include "iSeries_setup.h"
 #include <asm/naca.h>
 #include <asm/paca.h>
+#include <asm/cache.h>
 #include <asm/sections.h>
 #include <asm/iSeries/LparData.h>
 #include <asm/iSeries/HvCallHpt.h>
@@ -67,7 +68,6 @@
 
 /* Function Prototypes */
 extern void ppcdbg_initialize(void);
-extern void tce_init_iSeries(void);
 
 static void build_iSeries_Memory_Map(void);
 static void setup_iSeries_cache_sizes(void);
@@ -313,13 +313,13 @@
 	 * If the init RAM disk has been configured and there is
 	 * a non-zero starting address for it, set it up
 	 */
-	if (naca->xRamDisk) {
-		initrd_start = (unsigned long)__va(naca->xRamDisk);
-		initrd_end = initrd_start + naca->xRamDiskSize * PAGE_SIZE;
+	if (naca.xRamDisk) {
+		initrd_start = (unsigned long)__va(naca.xRamDisk);
+		initrd_end = initrd_start + naca.xRamDiskSize * PAGE_SIZE;
 		initrd_below_start_ok = 1;	// ramdisk in kernel space
 		ROOT_DEV = Root_RAM0;
-		if (((rd_size * 1024) / PAGE_SIZE) < naca->xRamDiskSize)
-			rd_size = (naca->xRamDiskSize * PAGE_SIZE) / 1024;
+		if (((rd_size * 1024) / PAGE_SIZE) < naca.xRamDiskSize)
+			rd_size = (naca.xRamDiskSize * PAGE_SIZE) / 1024;
 	} else
 #endif /* CONFIG_BLK_DEV_INITRD */
 	{
@@ -343,7 +343,7 @@
 	/*
 	 * Initialize the DMA/TCE management
 	 */
-	tce_init_iSeries();
+	iommu_init_early_iSeries();
 
 	/*
 	 * Initialize the table which translate Linux physical addresses to
@@ -471,18 +471,16 @@
 	printk("HPT absolute addr = %016lx, size = %dK\n",
 			chunk_to_addr(hptFirstChunk), hptSizeChunks * 256);
 
-	/* Fill in the htab_data structure */
-	/* Fill in size of hashed page table */
+	/* Fill in the hashed page table hash mask */
 	num_ptegs = hptSizePages *
 		(PAGE_SIZE / (sizeof(HPTE) * HPTES_PER_GROUP));
-	htab_data.htab_num_ptegs = num_ptegs;
-	htab_data.htab_hash_mask = num_ptegs - 1;
+	htab_hash_mask = num_ptegs - 1;
 	
 	/*
 	 * The actual hashed page table is in the hypervisor,
 	 * we have no direct access
 	 */
-	htab_data.htab = NULL;
+	htab_address = NULL;
 
 	/*
 	 * Determine if absolute memory has any
@@ -558,35 +556,38 @@
 static void __init setup_iSeries_cache_sizes(void)
 {
 	unsigned int i, n;
-	unsigned int procIx = get_paca()->lppaca.xDynHvPhysicalProcIndex;
+	unsigned int procIx = get_paca()->lppaca.dyn_hv_phys_proc_index;
 
-	systemcfg->iCacheL1Size =
-		xIoHriProcessorVpd[procIx].xInstCacheSize * 1024;
-	systemcfg->iCacheL1LineSize =
+	systemcfg->icache_size =
+	ppc64_caches.isize = xIoHriProcessorVpd[procIx].xInstCacheSize * 1024;
+	systemcfg->icache_line_size =
+	ppc64_caches.iline_size =
 		xIoHriProcessorVpd[procIx].xInstCacheOperandSize;
-	systemcfg->dCacheL1Size =
+	systemcfg->dcache_size =
+	ppc64_caches.dsize =
 		xIoHriProcessorVpd[procIx].xDataL1CacheSizeKB * 1024;
-	systemcfg->dCacheL1LineSize =
+	systemcfg->dcache_line_size =
+	ppc64_caches.dline_size =
 		xIoHriProcessorVpd[procIx].xDataCacheOperandSize;
-	naca->iCacheL1LinesPerPage = PAGE_SIZE / systemcfg->iCacheL1LineSize;
-	naca->dCacheL1LinesPerPage = PAGE_SIZE / systemcfg->dCacheL1LineSize;
+	ppc64_caches.ilines_per_page = PAGE_SIZE / ppc64_caches.iline_size;
+	ppc64_caches.dlines_per_page = PAGE_SIZE / ppc64_caches.dline_size;
 
-	i = systemcfg->iCacheL1LineSize;
+	i = ppc64_caches.iline_size;
 	n = 0;
 	while ((i = (i / 2)))
 		++n;
-	naca->iCacheL1LogLineSize = n;
+	ppc64_caches.log_iline_size = n;
 
-	i = systemcfg->dCacheL1LineSize;
+	i = ppc64_caches.dline_size;
 	n = 0;
 	while ((i = (i / 2)))
 		++n;
-	naca->dCacheL1LogLineSize = n;
+	ppc64_caches.log_dline_size = n;
 
 	printk("D-cache line size = %d\n",
-			(unsigned int)systemcfg->dCacheL1LineSize);
+			(unsigned int)ppc64_caches.dline_size);
 	printk("I-cache line size = %d\n",
-			(unsigned int)systemcfg->iCacheL1LineSize);
+			(unsigned int)ppc64_caches.iline_size);
 }
 
 /*
@@ -652,7 +653,7 @@
 void __init iSeries_setup_arch(void)
 {
 	void *eventStack;
-	unsigned procIx = get_paca()->lppaca.xDynHvPhysicalProcIndex;
+	unsigned procIx = get_paca()->lppaca.dyn_hv_phys_proc_index;
 
 	/* Add an eye catcher and the systemcfg layout version number */
 	strcpy(systemcfg->eye_catcher, "SYSTEMCFG:PPC64");
@@ -809,9 +810,9 @@
 	 * Change klimit to take into account any ram disk
 	 * that may be included
 	 */
-	if (naca->xRamDisk)
-		klimit = KERNELBASE + (u64)naca->xRamDisk +
-			(naca->xRamDiskSize * PAGE_SIZE);
+	if (naca.xRamDisk)
+		klimit = KERNELBASE + (u64)naca.xRamDisk +
+			(naca.xRamDiskSize * PAGE_SIZE);
 	else {
 		/*
 		 * No ram disk was included - check and see if there
diff -Nru a/arch/ppc64/kernel/iSeries_smp.c b/arch/ppc64/kernel/iSeries_smp.c
--- a/arch/ppc64/kernel/iSeries_smp.c	2005-01-10 20:11:21 -08:00
+++ b/arch/ppc64/kernel/iSeries_smp.c	2005-01-10 20:11:21 -08:00
@@ -37,7 +37,6 @@
 #include <asm/pgtable.h>
 #include <asm/io.h>
 #include <asm/smp.h>
-#include <asm/naca.h>
 #include <asm/paca.h>
 #include <asm/iSeries/LparData.h>
 #include <asm/iSeries/HvCall.h>
@@ -91,7 +90,7 @@
 
 	np = 0;
         for (i=0; i < NR_CPUS; ++i) {
-                if (paca[i].lppaca.xDynProcStatus < 2) {
+                if (paca[i].lppaca.dyn_proc_status < 2) {
 			cpu_set(i, cpu_possible_map);
 			cpu_set(i, cpu_present_map);
 			cpu_set(i, cpu_sibling_map[i]);
@@ -107,7 +106,7 @@
 	unsigned np = 0;
 
 	for (i=0; i < NR_CPUS; ++i) {
-		if (paca[i].lppaca.xDynProcStatus < 2) {
+		if (paca[i].lppaca.dyn_proc_status < 2) {
 			/*paca[i].active = 1;*/
 			++np;
 		}
@@ -121,7 +120,7 @@
 	BUG_ON(nr < 0 || nr >= NR_CPUS);
 
 	/* Verify that our partition has a processor nr */
-	if (paca[nr].lppaca.xDynProcStatus >= 2)
+	if (paca[nr].lppaca.dyn_proc_status >= 2)
 		return;
 
 	/* The processor is currently spinning, waiting
diff -Nru a/arch/ppc64/kernel/idle.c b/arch/ppc64/kernel/idle.c
--- a/arch/ppc64/kernel/idle.c	2005-01-10 20:11:21 -08:00
+++ b/arch/ppc64/kernel/idle.c	2005-01-10 20:11:21 -08:00
@@ -32,6 +32,7 @@
 #include <asm/iSeries/HvCall.h>
 #include <asm/iSeries/ItLpQueue.h>
 #include <asm/plpar_wrappers.h>
+#include <asm/systemcfg.h>
 
 extern void power4_idle(void);
 
@@ -66,7 +67,7 @@
 	 * The decrementer stops during the yield.  Force a fake decrementer
 	 * here and let the timer_interrupt code sort out the actual time.
 	 */
-	get_paca()->lppaca.xIntDword.xFields.xDecrInt = 1;
+	get_paca()->lppaca.int_dword.fields.decr_int = 1;
 	process_iSeries_events();
 }
 
@@ -85,7 +86,7 @@
 	lpaca = get_paca();
 
 	while (1) {
-		if (lpaca->lppaca.xSharedProc) {
+		if (lpaca->lppaca.shared_proc) {
 			if (ItLpQueue_isLpIntPending(lpaca->lpqueue_ptr))
 				process_iSeries_events();
 			if (!need_resched())
@@ -172,7 +173,7 @@
 		 * Indicate to the HV that we are idle. Now would be
 		 * a good time to find other work to dispatch.
 		 */
-		lpaca->lppaca.xIdle = 1;
+		lpaca->lppaca.idle = 1;
 
 		oldval = test_and_clear_thread_flag(TIF_NEED_RESCHED);
 		if (!oldval) {
@@ -193,7 +194,7 @@
 
 				HMT_medium();
 
-				if (!(ppaca->lppaca.xIdle)) {
+				if (!(ppaca->lppaca.idle)) {
 					local_irq_disable();
 
 					/*
@@ -232,7 +233,7 @@
 		}
 
 		HMT_medium();
-		lpaca->lppaca.xIdle = 0;
+		lpaca->lppaca.idle = 0;
 		schedule();
 		if (cpu_is_offline(cpu) && system_state == SYSTEM_RUNNING)
 			cpu_die();
@@ -250,7 +251,7 @@
 		 * Indicate to the HV that we are idle. Now would be
 		 * a good time to find other work to dispatch.
 		 */
-		lpaca->lppaca.xIdle = 1;
+		lpaca->lppaca.idle = 1;
 
 		while (!need_resched() && !cpu_is_offline(cpu)) {
 			local_irq_disable();
@@ -272,7 +273,7 @@
 		}
 
 		HMT_medium();
-		lpaca->lppaca.xIdle = 0;
+		lpaca->lppaca.idle = 0;
 		schedule();
 		if (cpu_is_offline(smp_processor_id()) &&
 		    system_state == SYSTEM_RUNNING)
@@ -298,10 +299,9 @@
 
 #endif /* CONFIG_PPC_ISERIES */
 
-int cpu_idle(void)
+void cpu_idle(void)
 {
 	idle_loop();
-	return 0;
 }
 
 int powersave_nap;
@@ -351,7 +351,7 @@
 #ifdef CONFIG_PPC_PSERIES
 	if (systemcfg->platform & PLATFORM_PSERIES) {
 		if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) {
-			if (get_paca()->lppaca.xSharedProc) {
+			if (get_paca()->lppaca.shared_proc) {
 				printk(KERN_INFO "Using shared processor idle loop\n");
 				idle_loop = shared_idle;
 			} else {
diff -Nru a/arch/ppc64/kernel/iommu.c b/arch/ppc64/kernel/iommu.c
--- a/arch/ppc64/kernel/iommu.c	2005-01-10 20:11:15 -08:00
+++ b/arch/ppc64/kernel/iommu.c	2005-01-10 20:11:15 -08:00
@@ -87,7 +87,7 @@
 		start = largealloc ? tbl->it_largehint : tbl->it_hint;
 
 	/* Use only half of the table for small allocs (15 pages or less) */
-	limit = largealloc ? tbl->it_mapsize : tbl->it_halfpoint;
+	limit = largealloc ? tbl->it_size : tbl->it_halfpoint;
 
 	if (largealloc && start < tbl->it_halfpoint)
 		start = tbl->it_halfpoint;
@@ -114,7 +114,7 @@
 			 * Second failure, rescan the other half of the table.
 			 */
 			start = (largealloc ^ pass) ? tbl->it_halfpoint : 0;
-			limit = pass ? tbl->it_mapsize : limit;
+			limit = pass ? tbl->it_size : limit;
 			pass++;
 			goto again;
 		} else {
@@ -194,7 +194,7 @@
 	entry = dma_addr >> PAGE_SHIFT;
 	free_entry = entry - tbl->it_offset;
 
-	if (((free_entry + npages) > tbl->it_mapsize) ||
+	if (((free_entry + npages) > tbl->it_size) ||
 	    (entry < tbl->it_offset)) {
 		if (printk_ratelimit()) {
 			printk(KERN_INFO "iommu_free: invalid entry\n");
@@ -202,7 +202,7 @@
 			printk(KERN_INFO "\tdma_addr  = 0x%lx\n", (u64)dma_addr);
 			printk(KERN_INFO "\tTable     = 0x%lx\n", (u64)tbl);
 			printk(KERN_INFO "\tbus#      = 0x%lx\n", (u64)tbl->it_busno);
-			printk(KERN_INFO "\tmapsize   = 0x%lx\n", (u64)tbl->it_mapsize);
+			printk(KERN_INFO "\tsize      = 0x%lx\n", (u64)tbl->it_size);
 			printk(KERN_INFO "\tstartOff  = 0x%lx\n", (u64)tbl->it_offset);
 			printk(KERN_INFO "\tindex     = 0x%lx\n", (u64)tbl->it_index);
 			WARN_ON(1);
@@ -407,14 +407,11 @@
 	unsigned long sz;
 	static int welcomed = 0;
 
-	/* it_size is in pages, it_mapsize in number of entries */
-	tbl->it_mapsize = (tbl->it_size << PAGE_SHIFT) / tbl->it_entrysize;
-
 	/* Set aside 1/4 of the table for large allocations. */
-	tbl->it_halfpoint = tbl->it_mapsize * 3 / 4;
+	tbl->it_halfpoint = tbl->it_size * 3 / 4;
 
 	/* number of bytes needed for the bitmap */
-	sz = (tbl->it_mapsize + 7) >> 3;
+	sz = (tbl->it_size + 7) >> 3;
 
 	tbl->it_map = (unsigned long *)__get_free_pages(GFP_ATOMIC, get_order(sz));
 	if (!tbl->it_map)
@@ -448,8 +445,8 @@
 	}
 
 	/* verify that table contains no entries */
-	/* it_mapsize is in entries, and we're examining 64 at a time */
-	for (i = 0; i < (tbl->it_mapsize/64); i++) {
+	/* it_size is in entries, and we're examining 64 at a time */
+	for (i = 0; i < (tbl->it_size/64); i++) {
 		if (tbl->it_map[i] != 0) {
 			printk(KERN_WARNING "%s: Unexpected TCEs for %s\n",
 				__FUNCTION__, dn->full_name);
@@ -458,7 +455,7 @@
 	}
 
 	/* calculate bitmap size in bytes */
-	bitmap_sz = (tbl->it_mapsize + 7) / 8;
+	bitmap_sz = (tbl->it_size + 7) / 8;
 
 	/* free bitmap */
 	order = get_order(bitmap_sz);
diff -Nru a/arch/ppc64/kernel/irq.c b/arch/ppc64/kernel/irq.c
--- a/arch/ppc64/kernel/irq.c	2005-01-10 20:11:18 -08:00
+++ b/arch/ppc64/kernel/irq.c	2005-01-10 20:11:18 -08:00
@@ -65,6 +65,7 @@
 int __irq_offset_value;
 int ppc_spurious_interrupts;
 unsigned long lpevent_count;
+u64 ppc64_interrupt_controller;
 
 int show_interrupts(struct seq_file *p, void *v)
 {
@@ -258,8 +259,8 @@
 
 	lpaca = get_paca();
 #ifdef CONFIG_SMP
-	if (lpaca->lppaca.xIntDword.xFields.xIpiCnt) {
-		lpaca->lppaca.xIntDword.xFields.xIpiCnt = 0;
+	if (lpaca->lppaca.int_dword.fields.ipi_cnt) {
+		lpaca->lppaca.int_dword.fields.ipi_cnt = 0;
 		iSeries_smp_message_recv(regs);
 	}
 #endif /* CONFIG_SMP */
@@ -269,8 +270,8 @@
 
 	irq_exit();
 
-	if (lpaca->lppaca.xIntDword.xFields.xDecrInt) {
-		lpaca->lppaca.xIntDword.xFields.xDecrInt = 0;
+	if (lpaca->lppaca.int_dword.fields.decr_int) {
+		lpaca->lppaca.int_dword.fields.decr_int = 0;
 		/* Signal a fake decrementer interrupt */
 		timer_interrupt(regs);
 	}
@@ -360,7 +361,7 @@
 	unsigned int virq, first_virq;
 	static int warned;
 
-	if (naca->interrupt_controller == IC_OPEN_PIC)
+	if (ppc64_interrupt_controller == IC_OPEN_PIC)
 		return real_irq;	/* no mapping for openpic (for now) */
 
 	/* don't map interrupts < MIN_VIRT_IRQ */
diff -Nru a/arch/ppc64/kernel/kprobes.c b/arch/ppc64/kernel/kprobes.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/ppc64/kernel/kprobes.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,258 @@
+/*
+ *  Kernel Probes (KProbes)
+ *  arch/ppc64/kernel/kprobes.c
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * Copyright (C) IBM Corporation, 2002, 2004
+ *
+ * 2002-Oct	Created by Vamsi Krishna S <vamsi_krishna@in.ibm.com> Kernel
+ *		Probes initial implementation ( includes contributions from
+ *		Rusty Russell).
+ * 2004-July	Suparna Bhattacharya <suparna@in.ibm.com> added jumper probes
+ *		interface to access function arguments.
+ * 2004-Nov	Ananth N Mavinakayanahalli <ananth@in.ibm.com> kprobes port
+ *		for PPC64
+ */
+
+#include <linux/config.h>
+#include <linux/kprobes.h>
+#include <linux/ptrace.h>
+#include <linux/spinlock.h>
+#include <linux/preempt.h>
+#include <asm/kdebug.h>
+#include <asm/sstep.h>
+
+/* kprobe_status settings */
+#define KPROBE_HIT_ACTIVE	0x00000001
+#define KPROBE_HIT_SS		0x00000002
+
+static struct kprobe *current_kprobe;
+static unsigned long kprobe_status, kprobe_saved_msr;
+static struct pt_regs jprobe_saved_regs;
+
+int arch_prepare_kprobe(struct kprobe *p)
+{
+	memcpy(p->ainsn.insn, p->addr, MAX_INSN_SIZE * sizeof(kprobe_opcode_t));
+	if (IS_MTMSRD(p->ainsn.insn[0]) || IS_RFID(p->ainsn.insn[0]))
+		/* cannot put bp on RFID/MTMSRD */
+		return 1;
+	return 0;
+}
+
+void arch_remove_kprobe(struct kprobe *p)
+{
+}
+
+static inline void disarm_kprobe(struct kprobe *p, struct pt_regs *regs)
+{
+	*p->addr = p->opcode;
+	regs->nip = (unsigned long)p->addr;
+}
+
+static inline void prepare_singlestep(struct kprobe *p, struct pt_regs *regs)
+{
+	regs->msr |= MSR_SE;
+	regs->nip = (unsigned long)&p->ainsn.insn;
+}
+
+static inline int kprobe_handler(struct pt_regs *regs)
+{
+	struct kprobe *p;
+	int ret = 0;
+	unsigned int *addr = (unsigned int *)regs->nip;
+
+	/* We're in an interrupt, but this is clear and BUG()-safe. */
+	preempt_disable();
+
+	/* Check we're not actually recursing */
+	if (kprobe_running()) {
+		/* We *are* holding lock here, so this is safe.
+		   Disarm the probe we just hit, and ignore it. */
+		p = get_kprobe(addr);
+		if (p) {
+			disarm_kprobe(p, regs);
+			ret = 1;
+		} else {
+			p = current_kprobe;
+			if (p->break_handler && p->break_handler(p, regs)) {
+				goto ss_probe;
+			}
+		}
+		/* If it's not ours, can't be delete race, (we hold lock). */
+		goto no_kprobe;
+	}
+
+	lock_kprobes();
+	p = get_kprobe(addr);
+	if (!p) {
+		unlock_kprobes();
+		if (*addr != BREAKPOINT_INSTRUCTION) {
+			/*
+			 * The breakpoint instruction was removed right
+			 * after we hit it.  Another cpu has removed
+			 * either a probepoint or a debugger breakpoint
+			 * at this address.  In either case, no further
+			 * handling of this interrupt is appropriate.
+			 */
+			ret = 1;
+		}
+		/* Not one of ours: let kernel handle it */
+		goto no_kprobe;
+	}
+
+	kprobe_status = KPROBE_HIT_ACTIVE;
+	current_kprobe = p;
+	kprobe_saved_msr = regs->msr;
+	if (p->pre_handler(p, regs)) {
+		/* handler has already set things up, so skip ss setup */
+		return 1;
+	}
+
+ss_probe:
+	prepare_singlestep(p, regs);
+	kprobe_status = KPROBE_HIT_SS;
+	return 1;
+
+no_kprobe:
+	preempt_enable_no_resched();
+	return ret;
+}
+
+/*
+ * Called after single-stepping.  p->addr is the address of the
+ * instruction whose first byte has been replaced by the "breakpoint"
+ * instruction.  To avoid the SMP problems that can occur when we
+ * temporarily put back the original opcode to single-step, we
+ * single-stepped a copy of the instruction.  The address of this
+ * copy is p->ainsn.insn.
+ */
+static void resume_execution(struct kprobe *p, struct pt_regs *regs)
+{
+	int ret;
+
+	regs->nip = (unsigned long)p->addr;
+	ret = emulate_step(regs, p->ainsn.insn[0]);
+	if (ret == 0)
+		regs->nip = (unsigned long)p->addr + 4;
+
+	regs->msr &= ~MSR_SE;
+}
+
+static inline int post_kprobe_handler(struct pt_regs *regs)
+{
+	if (!kprobe_running())
+		return 0;
+
+	if (current_kprobe->post_handler)
+		current_kprobe->post_handler(current_kprobe, regs, 0);
+
+	resume_execution(current_kprobe, regs);
+	regs->msr |= kprobe_saved_msr;
+
+	unlock_kprobes();
+	preempt_enable_no_resched();
+
+	/*
+	 * if somebody else is singlestepping across a probe point, msr
+	 * will have SE set, in which case, continue the remaining processing
+	 * of do_debug, as if this is not a probe hit.
+	 */
+	if (regs->msr & MSR_SE)
+		return 0;
+
+	return 1;
+}
+
+/* Interrupts disabled, kprobe_lock held. */
+static inline int kprobe_fault_handler(struct pt_regs *regs, int trapnr)
+{
+	if (current_kprobe->fault_handler
+	    && current_kprobe->fault_handler(current_kprobe, regs, trapnr))
+		return 1;
+
+	if (kprobe_status & KPROBE_HIT_SS) {
+		resume_execution(current_kprobe, regs);
+		regs->msr |= kprobe_saved_msr;
+
+		unlock_kprobes();
+		preempt_enable_no_resched();
+	}
+	return 0;
+}
+
+/*
+ * Wrapper routine to for handling exceptions.
+ */
+int kprobe_exceptions_notify(struct notifier_block *self, unsigned long val,
+			     void *data)
+{
+	struct die_args *args = (struct die_args *)data;
+	switch (val) {
+	case DIE_IABR_MATCH:
+	case DIE_DABR_MATCH:
+	case DIE_BPT:
+		if (kprobe_handler(args->regs))
+			return NOTIFY_STOP;
+		break;
+	case DIE_SSTEP:
+		if (post_kprobe_handler(args->regs))
+			return NOTIFY_STOP;
+		break;
+	case DIE_GPF:
+	case DIE_PAGE_FAULT:
+		if (kprobe_running() &&
+		    kprobe_fault_handler(args->regs, args->trapnr))
+			return NOTIFY_STOP;
+		break;
+	default:
+		break;
+	}
+	return NOTIFY_DONE;
+}
+
+int setjmp_pre_handler(struct kprobe *p, struct pt_regs *regs)
+{
+	struct jprobe *jp = container_of(p, struct jprobe, kp);
+
+	memcpy(&jprobe_saved_regs, regs, sizeof(struct pt_regs));
+
+	/* setup return addr to the jprobe handler routine */
+	regs->nip = (unsigned long)(((func_descr_t *)jp->entry)->entry);
+	regs->gpr[2] = (unsigned long)(((func_descr_t *)jp->entry)->toc);
+
+	return 1;
+}
+
+void jprobe_return(void)
+{
+	preempt_enable_no_resched();
+	asm volatile("trap" ::: "memory");
+}
+
+void jprobe_return_end(void)
+{
+};
+
+int longjmp_break_handler(struct kprobe *p, struct pt_regs *regs)
+{
+	/*
+	 * FIXME - we should ideally be validating that we got here 'cos
+	 * of the "trap" in jprobe_return() above, before restoring the
+	 * saved regs...
+	 */
+	memcpy(regs, &jprobe_saved_regs, sizeof(struct pt_regs));
+	return 1;
+}
diff -Nru a/arch/ppc64/kernel/lparcfg.c b/arch/ppc64/kernel/lparcfg.c
--- a/arch/ppc64/kernel/lparcfg.c	2005-01-10 20:11:16 -08:00
+++ b/arch/ppc64/kernel/lparcfg.c	2005-01-10 20:11:16 -08:00
@@ -27,7 +27,7 @@
 #include <linux/seq_file.h>
 #include <asm/uaccess.h>
 #include <asm/iSeries/HvLpConfig.h>
-#include <asm/iSeries/ItLpPaca.h>
+#include <asm/lppaca.h>
 #include <asm/iSeries/LparData.h>
 #include <asm/hvcall.h>
 #include <asm/cputable.h>
@@ -72,7 +72,7 @@
 
 /*
  * For iSeries legacy systems, the PPA purr function is available from the
- * xEmulatedTimeBase field in the paca.
+ * emulated_time_base field in the paca.
  */
 static unsigned long get_purr(void)
 {
@@ -82,11 +82,11 @@
 
 	for_each_cpu(cpu) {
 		lpaca = paca + cpu;
-		sum_purr += lpaca->lppaca.xEmulatedTimeBase;
+		sum_purr += lpaca->lppaca.emulated_time_base;
 
 #ifdef PURR_DEBUG
 		printk(KERN_INFO "get_purr for cpu (%d) has value (%ld) \n",
-			cpu, lpaca->lppaca.xEmulatedTimeBase);
+			cpu, lpaca->lppaca.emulated_time_base);
 #endif
 	}
 	return sum_purr;
@@ -107,7 +107,7 @@
 
 	seq_printf(m, "%s %s \n", MODULE_NAME, MODULE_VERS);
 
-	shared = (int)(lpaca->lppaca_ptr->xSharedProc);
+	shared = (int)(lpaca->lppaca_ptr->shared_proc);
 	seq_printf(m, "serial_number=%c%c%c%c%c%c%c\n",
 		   e2a(xItExtVpdPanel.mfgID[2]),
 		   e2a(xItExtVpdPanel.mfgID[3]),
@@ -395,7 +395,7 @@
 			   (h_resource >> 0 * 8) & 0xffff);
 
 		/* pool related entries are apropriate for shared configs */
-		if (paca[0].lppaca.xSharedProc) {
+		if (paca[0].lppaca.shared_proc) {
 
 			h_pic(&pool_idle_time, &pool_procs);
 
@@ -444,7 +444,7 @@
 	seq_printf(m, "partition_potential_processors=%d\n",
 		   partition_potential_processors);
 
-	seq_printf(m, "shared_processor_mode=%d\n", paca[0].lppaca.xSharedProc);
+	seq_printf(m, "shared_processor_mode=%d\n", paca[0].lppaca.shared_proc);
 
 	return 0;
 }
diff -Nru a/arch/ppc64/kernel/maple_pci.c b/arch/ppc64/kernel/maple_pci.c
--- a/arch/ppc64/kernel/maple_pci.c	2005-01-10 20:11:22 -08:00
+++ b/arch/ppc64/kernel/maple_pci.c	2005-01-10 20:11:22 -08:00
@@ -385,9 +385,6 @@
 	/* Fixup the pci_bus sysdata pointers */
 	pci_fix_bus_sysdata();
 
-	/* Setup the iommu */
-	iommu_setup_u3();
-
 	DBG(" <- maple_pcibios_fixup\n");
 }
 
diff -Nru a/arch/ppc64/kernel/maple_setup.c b/arch/ppc64/kernel/maple_setup.c
--- a/arch/ppc64/kernel/maple_setup.c	2005-01-10 20:11:16 -08:00
+++ b/arch/ppc64/kernel/maple_setup.c	2005-01-10 20:11:16 -08:00
@@ -75,7 +75,8 @@
 extern void maple_pci_init(void);
 extern void maple_pcibios_fixup(void);
 extern int maple_pci_get_legacy_ide_irq(struct pci_dev *dev, int channel);
-extern void generic_find_legacy_serial_ports(unsigned int *default_speed);
+extern void generic_find_legacy_serial_ports(u64 *physport,
+		unsigned int *default_speed);
 
 
 static void maple_restart(char *cmd)
@@ -110,11 +111,6 @@
 #ifdef CONFIG_SMP
 	smp_ops = &maple_smp_ops;
 #endif
-	/* Setup the PCI DMA to "direct" by default. May be overriden
-	 * by iommu later on
-	 */
-	pci_dma_init_direct();
-
 	/* Lookup PCI hosts */
        	maple_pci_init();
 
@@ -129,6 +125,7 @@
 static void __init maple_init_early(void)
 {
 	unsigned int default_speed;
+	u64 physport;
 
 	DBG(" -> maple_init_early\n");
 
@@ -138,14 +135,14 @@
 	hpte_init_native();
 
 	/* Find the serial port */
-       	generic_find_legacy_serial_ports(&default_speed);
+	generic_find_legacy_serial_ports(&physport, &default_speed);
 
-	DBG("naca->serialPortAddr: %lx\n", (long)naca->serialPortAddr);
+	DBG("phys port addr: %lx\n", (long)physport);
 
-	if (naca->serialPortAddr) {
+	if (physport) {
 		void *comport;
 		/* Map the uart for udbg. */
-		comport = (void *)__ioremap(naca->serialPortAddr, 16, _PAGE_NO_CACHE);
+		comport = (void *)__ioremap(physport, 16, _PAGE_NO_CACHE);
 		udbg_init_uart(comport, default_speed);
 
 		ppc_md.udbg_putc = udbg_putc;
@@ -155,7 +152,9 @@
 	}
 
 	/* Setup interrupt mapping options */
-	naca->interrupt_controller = IC_OPEN_PIC;
+	ppc64_interrupt_controller = IC_OPEN_PIC;
+
+	iommu_init_early_u3();
 
 	DBG(" <- maple_init_early\n");
 }
diff -Nru a/arch/ppc64/kernel/misc.S b/arch/ppc64/kernel/misc.S
--- a/arch/ppc64/kernel/misc.S	2005-01-10 20:11:22 -08:00
+++ b/arch/ppc64/kernel/misc.S	2005-01-10 20:11:22 -08:00
@@ -189,6 +189,11 @@
 	isync
 	blr
 
+	.section	".toc","aw"
+PPC64_CACHES:
+	.tc		ppc64_caches[TC],ppc64_caches
+	.section	".text"
+
 /*
  * Write any modified data cache blocks out to memory
  * and invalidate the corresponding instruction cache blocks.
@@ -207,11 +212,8 @@
  * and in some cases i-cache and d-cache line sizes differ from
  * each other.
  */
-	LOADADDR(r10,naca)		/* Get Naca address */
-	ld	r10,0(r10)
-	LOADADDR(r11,systemcfg)		/* Get systemcfg address */
-	ld	r11,0(r11)
-	lwz	r7,DCACHEL1LINESIZE(r11)/* Get cache line size */
+ 	ld	r10,PPC64_CACHES@toc(r2)
+	lwz	r7,DCACHEL1LINESIZE(r10)/* Get cache line size */
 	addi	r5,r7,-1
 	andc	r6,r3,r5		/* round low to line bdy */
 	subf	r8,r6,r4		/* compute length */
@@ -227,7 +229,7 @@
 
 /* Now invalidate the instruction cache */
 	
-	lwz	r7,ICACHEL1LINESIZE(r11)	/* Get Icache line size */
+	lwz	r7,ICACHEL1LINESIZE(r10)	/* Get Icache line size */
 	addi	r5,r7,-1
 	andc	r6,r3,r5		/* round low to line bdy */
 	subf	r8,r6,r4		/* compute length */
@@ -256,11 +258,8 @@
  * 
  * Different systems have different cache line sizes
  */
-	LOADADDR(r10,naca)		/* Get Naca address */
-	ld	r10,0(r10)
-	LOADADDR(r11,systemcfg)		/* Get systemcfg address */
-	ld	r11,0(r11)
-	lwz	r7,DCACHEL1LINESIZE(r11)	/* Get dcache line size */
+ 	ld	r10,PPC64_CACHES@toc(r2)
+	lwz	r7,DCACHEL1LINESIZE(r10)	/* Get dcache line size */
 	addi	r5,r7,-1
 	andc	r6,r3,r5		/* round low to line bdy */
 	subf	r8,r6,r4		/* compute length */
@@ -286,11 +285,8 @@
  *    flush all bytes from start to stop-1 inclusive
  */
 _GLOBAL(flush_dcache_phys_range)
-	LOADADDR(r10,naca)		/* Get Naca address */
-	ld	r10,0(r10)
-	LOADADDR(r11,systemcfg)		/* Get systemcfg address */
-	ld	r11,0(r11)
-	lwz	r7,DCACHEL1LINESIZE(r11)	/* Get dcache line size */
+ 	ld	r10,PPC64_CACHES@toc(r2)
+	lwz	r7,DCACHEL1LINESIZE(r10)	/* Get dcache line size */
 	addi	r5,r7,-1
 	andc	r6,r3,r5		/* round low to line bdy */
 	subf	r8,r6,r4		/* compute length */
@@ -332,13 +328,10 @@
  */
 
 /* Flush the dcache */
-	LOADADDR(r7,naca)
-	ld	r7,0(r7)
-	LOADADDR(r8,systemcfg)			/* Get systemcfg address */
-	ld	r8,0(r8)
+ 	ld	r7,PPC64_CACHES@toc(r2)
 	clrrdi	r3,r3,12           	    /* Page align */
 	lwz	r4,DCACHEL1LINESPERPAGE(r7)	/* Get # dcache lines per page */
-	lwz	r5,DCACHEL1LINESIZE(r8)		/* Get dcache line size */
+	lwz	r5,DCACHEL1LINESIZE(r7)		/* Get dcache line size */
 	mr	r6,r3
 	mtctr	r4
 0:	dcbst	0,r6
@@ -349,7 +342,7 @@
 /* Now invalidate the icache */	
 
 	lwz	r4,ICACHEL1LINESPERPAGE(r7)	/* Get # icache lines per page */
-	lwz	r5,ICACHEL1LINESIZE(r8)		/* Get icache line size */
+	lwz	r5,ICACHEL1LINESIZE(r7)		/* Get icache line size */
 	mtctr	r4
 1:	icbi	0,r3
 	add	r3,r3,r5
@@ -707,7 +700,7 @@
 	.llong .sys_unlink      	/* 10 */
 	.llong .sys32_execve
 	.llong .sys_chdir
-	.llong .sys32_time
+	.llong .compat_sys_time
 	.llong .sys_mknod
 	.llong .sys_chmod		/* 15 */
 	.llong .sys_lchown
@@ -719,7 +712,7 @@
 	.llong .sys_oldumount
 	.llong .sys_setuid
 	.llong .sys_getuid
-	.llong .ppc64_sys32_stime       /* 25 */
+	.llong .compat_sys_stime	/* 25 */
 	.llong .sys32_ptrace
 	.llong .sys_alarm
 	.llong .sys_ni_syscall		/* old fstat syscall */
@@ -870,7 +863,7 @@
 	.llong .sys32_rt_sigaction
 	.llong .sys32_rt_sigprocmask
 	.llong .sys32_rt_sigpending     /* 175 */
-	.llong .sys32_rt_sigtimedwait
+	.llong .compat_rt_sigtimedwait
 	.llong .sys32_rt_sigqueueinfo
 	.llong .ppc32_rt_sigsuspend
 	.llong .sys32_pread64
@@ -994,7 +987,7 @@
 	.llong .sys_ni_syscall		/* old umount syscall */
 	.llong .sys_setuid
 	.llong .sys_getuid
-	.llong .ppc64_sys_stime		/* 25 */
+	.llong .sys_stime		/* 25 */
 	.llong .sys_ptrace
 	.llong .sys_alarm
 	.llong .sys_ni_syscall		/* old fstat syscall */
diff -Nru a/arch/ppc64/kernel/nvram.c b/arch/ppc64/kernel/nvram.c
--- a/arch/ppc64/kernel/nvram.c	2005-01-10 20:11:15 -08:00
+++ b/arch/ppc64/kernel/nvram.c	2005-01-10 20:11:15 -08:00
@@ -31,6 +31,7 @@
 #include <asm/rtas.h>
 #include <asm/prom.h>
 #include <asm/machdep.h>
+#include <asm/systemcfg.h>
 
 #undef DEBUG_NVRAM
 
diff -Nru a/arch/ppc64/kernel/pSeries_iommu.c b/arch/ppc64/kernel/pSeries_iommu.c
--- a/arch/ppc64/kernel/pSeries_iommu.c	2005-01-10 20:11:17 -08:00
+++ b/arch/ppc64/kernel/pSeries_iommu.c	2005-01-10 20:11:17 -08:00
@@ -43,8 +43,12 @@
 #include <asm/machdep.h>
 #include <asm/abs_addr.h>
 #include <asm/plpar_wrappers.h>
+#include <asm/systemcfg.h>
 #include "pci.h"
 
+#define DBG(fmt...)
+
+extern int is_python(struct device_node *);
 
 static void tce_build_pSeries(struct iommu_table *tbl, long index, 
 			      long npages, unsigned long uaddr, 
@@ -120,7 +124,7 @@
 	}
 }
 
-DEFINE_PER_CPU(void *, tce_page) = NULL;
+static DEFINE_PER_CPU(void *, tce_page) = NULL;
 
 static void tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum,
 				     long npages, unsigned long uaddr,
@@ -232,85 +236,6 @@
 	}
 }
 
-
-static void iommu_buses_init(void)
-{
-	struct pci_controller *phb, *tmp;
-	struct device_node *dn, *first_dn;
-	int num_slots, num_slots_ilog2;
-	int first_phb = 1;
-	unsigned long tcetable_ilog2;
-
-	/*
-	 * We default to a TCE table that maps 2GB (4MB table, 22 bits),
-	 * however some machines have a 3GB IO hole and for these we
-	 * create a table that maps 1GB (2MB table, 21 bits)
-	 */
-	if (io_hole_start < 0x80000000UL)
-		tcetable_ilog2 = 21;
-	else
-		tcetable_ilog2 = 22;
-
-	/* XXX Should we be using pci_root_buses instead?  -ojn
-	 */
-
-	list_for_each_entry_safe(phb, tmp, &hose_list, list_node) {
-		first_dn = ((struct device_node *)phb->arch_data)->child;
-
-		/* Carve 2GB into the largest dma_window_size possible */
-		for (dn = first_dn, num_slots = 0; dn != NULL; dn = dn->sibling)
-			num_slots++;
-		num_slots_ilog2 = __ilog2(num_slots);
-
-		if ((1<<num_slots_ilog2) != num_slots)
-			num_slots_ilog2++;
-
-		phb->dma_window_size = 1 << (tcetable_ilog2 - num_slots_ilog2);
-
-		/* Reserve 16MB of DMA space on the first PHB.
-		 * We should probably be more careful and use firmware props.
-		 * In reality this space is remapped, not lost.  But we don't
-		 * want to get that smart to handle it -- too much work.
-		 */
-		phb->dma_window_base_cur = first_phb ? (1 << 12) : 0;
-		first_phb = 0;
-
-		for (dn = first_dn; dn != NULL; dn = dn->sibling)
-			iommu_devnode_init_pSeries(dn);
-	}
-}
-
-
-static void iommu_buses_init_lpar(struct list_head *bus_list)
-{
-	struct list_head *ln;
-	struct pci_bus *bus;
-	struct device_node *busdn;
-	unsigned int *dma_window;
-
-	for (ln=bus_list->next; ln != bus_list; ln=ln->next) {
-		bus = pci_bus_b(ln);
-
-		if (bus->self)
-			busdn = pci_device_to_OF_node(bus->self);
-		else
-			busdn = bus->sysdata;   /* must be a phb */
-
-		dma_window = (unsigned int *)get_property(busdn, "ibm,dma-window", NULL);
-		if (dma_window) {
-			/* Bussubno hasn't been copied yet.
-			 * Do it now because iommu_table_setparms_lpar needs it.
-			 */
-			busdn->bussubno = bus->number;
-			iommu_devnode_init_pSeries(busdn);
-		}
-
-		/* look for a window on a bridge even if the PHB had one */
-		iommu_buses_init_lpar(&bus->children);
-	}
-}
-
-
 static void iommu_table_setparms(struct pci_controller *phb,
 				 struct device_node *dn,
 				 struct iommu_table *tbl) 
@@ -335,27 +260,18 @@
 	tbl->it_busno = phb->bus->number;
 	
 	/* Units of tce entries */
-	tbl->it_offset = phb->dma_window_base_cur;
-	
-	/* Adjust the current table offset to the next
-	 * region.  Measured in TCE entries. Force an
-	 * alignment to the size allotted per IOA. This
-	 * makes it easier to remove the 1st 16MB.
-      	 */
-	phb->dma_window_base_cur += (phb->dma_window_size>>3);
-	phb->dma_window_base_cur &= 
-		~((phb->dma_window_size>>3)-1);
-	
-	/* Set the tce table size - measured in pages */
-	tbl->it_size = ((phb->dma_window_base_cur -
-			 tbl->it_offset) << 3) >> PAGE_SHIFT;
+	tbl->it_offset = phb->dma_window_base_cur >> PAGE_SHIFT;
 	
 	/* Test if we are going over 2GB of DMA space */
-	if (phb->dma_window_base_cur > (1 << 19))
+	if (phb->dma_window_base_cur + phb->dma_window_size > (1L << 31))
 		panic("PCI_DMA: Unexpected number of IOAs under this PHB.\n"); 
 	
+	phb->dma_window_base_cur += phb->dma_window_size;
+
+	/* Set the tce table size - measured in entries */
+	tbl->it_size = phb->dma_window_size >> PAGE_SHIFT;
+
 	tbl->it_index = 0;
-	tbl->it_entrysize = sizeof(union tce_entry);
 	tbl->it_blocksize = 16;
 	tbl->it_type = TCE_PCI;
 }
@@ -374,81 +290,173 @@
  */
 static void iommu_table_setparms_lpar(struct pci_controller *phb,
 				      struct device_node *dn,
-				      struct iommu_table *tbl)
+				      struct iommu_table *tbl,
+				      unsigned int *dma_window)
 {
-	unsigned int *dma_window;
-
-	dma_window = (unsigned int *)get_property(dn, "ibm,dma-window", NULL);
-
 	if (!dma_window)
 		panic("iommu_table_setparms_lpar: device %s has no"
 		      " ibm,dma-window property!\n", dn->full_name);
 
 	tbl->it_busno  = dn->bussubno;
-	tbl->it_size   = (((((unsigned long)dma_window[4] << 32) | 
-			   (unsigned long)dma_window[5]) >> PAGE_SHIFT) << 3) >> PAGE_SHIFT;
-	tbl->it_offset = ((((unsigned long)dma_window[2] << 32) | 
-			   (unsigned long)dma_window[3]) >> 12);
+
+	/* TODO: Parse field size properties properly. */
+	tbl->it_size   = (((unsigned long)dma_window[4] << 32) |
+			   (unsigned long)dma_window[5]) >> PAGE_SHIFT;
+	tbl->it_offset = (((unsigned long)dma_window[2] << 32) |
+			   (unsigned long)dma_window[3]) >> PAGE_SHIFT;
 	tbl->it_base   = 0;
 	tbl->it_index  = dma_window[0];
-	tbl->it_entrysize = sizeof(union tce_entry);
 	tbl->it_blocksize  = 16;
 	tbl->it_type = TCE_PCI;
 }
 
+static void iommu_bus_setup_pSeries(struct pci_bus *bus)
+{
+	struct device_node *dn, *pdn;
+
+	DBG("iommu_bus_setup_pSeries, bus %p, bus->self %p\n", bus, bus->self);
+
+	/* For each (root) bus, we carve up the available DMA space in 256MB
+	 * pieces. Since each piece is used by one (sub) bus/device, that would
+	 * give a maximum of 7 devices per PHB. In most cases, this is plenty.
+	 *
+	 * The exception is on Python PHBs (pre-POWER4). Here we don't have EADS
+	 * bridges below the PHB to allocate the sectioned tables to, so instead
+	 * we allocate a 1GB table at the PHB level.
+	 */
+
+	dn = pci_bus_to_OF_node(bus);
+
+	if (!bus->self) {
+		/* Root bus */
+		if (is_python(dn)) {
+			struct iommu_table *tbl;
+
+			DBG("Python root bus %s\n", bus->name);
+
+			/* 1GB window by default */
+			dn->phb->dma_window_size = 1 << 30;
+			dn->phb->dma_window_base_cur = 0;
+
+			tbl = kmalloc(sizeof(struct iommu_table), GFP_KERNEL);
+
+			iommu_table_setparms(dn->phb, dn, tbl);
+			dn->iommu_table = iommu_init_table(tbl);
+		} else {
+			/* 256 MB window by default */
+			dn->phb->dma_window_size = 1 << 28;
+			/* always skip the first 256MB */
+			dn->phb->dma_window_base_cur = 1 << 28;
+
+			/* No table at PHB level for non-python PHBs */
+		}
+	} else {
+		pdn = pci_bus_to_OF_node(bus->parent);
+
+		if (!pdn->iommu_table) {
+			struct iommu_table *tbl;
+			/* First child, allocate new table (256MB window) */
+
+			tbl = kmalloc(sizeof(struct iommu_table), GFP_KERNEL);
+
+			iommu_table_setparms(dn->phb, dn, tbl);
+
+			dn->iommu_table = iommu_init_table(tbl);
+		} else {
+			/* Lower than first child or under python, copy parent table */
+			dn->iommu_table = pdn->iommu_table;
+		}
+	}
+}
+
 
-void iommu_devnode_init_pSeries(struct device_node *dn)
+static void iommu_bus_setup_pSeriesLP(struct pci_bus *bus)
 {
 	struct iommu_table *tbl;
+	struct device_node *dn, *pdn;
+	unsigned int *dma_window = NULL;
 
-	tbl = (struct iommu_table *)kmalloc(sizeof(struct iommu_table), 
-					    GFP_KERNEL);
-	
-	if (systemcfg->platform == PLATFORM_PSERIES_LPAR)
-		iommu_table_setparms_lpar(dn->phb, dn, tbl);
-	else
-		iommu_table_setparms(dn->phb, dn, tbl);
+	dn = pci_bus_to_OF_node(bus);
+
+	/* Find nearest ibm,dma-window, walking up the device tree */
+	for (pdn = dn; pdn != NULL; pdn = pdn->parent) {
+		dma_window = (unsigned int *)get_property(pdn, "ibm,dma-window", NULL);
+		if (dma_window != NULL)
+			break;
+	}
+
+	WARN_ON(dma_window == NULL);
+
+	if (!pdn->iommu_table) {
+		/* Bussubno hasn't been copied yet.
+		 * Do it now because iommu_table_setparms_lpar needs it.
+		 */
+		pdn->bussubno = bus->number;
+
+		tbl = (struct iommu_table *)kmalloc(sizeof(struct iommu_table),
+						    GFP_KERNEL);
 	
-	dn->iommu_table = iommu_init_table(tbl);
+		iommu_table_setparms_lpar(pdn->phb, pdn, tbl, dma_window);
+
+		pdn->iommu_table = iommu_init_table(tbl);
+	}
+
+	if (pdn != dn)
+		dn->iommu_table = pdn->iommu_table;
 }
 
-void iommu_setup_pSeries(void)
+
+static void iommu_dev_setup_pSeries(struct pci_dev *dev)
 {
-	struct pci_dev *dev = NULL;
 	struct device_node *dn, *mydn;
 
-	if (systemcfg->platform == PLATFORM_PSERIES_LPAR)
-		iommu_buses_init_lpar(&pci_root_buses);
-	else
-		iommu_buses_init();
-
-	/* Now copy the iommu_table ptr from the bus devices down to every
+	DBG("iommu_dev_setup_pSeries, dev %p (%s)\n", dev, dev->pretty_name);
+	/* Now copy the iommu_table ptr from the bus device down to the
 	 * pci device_node.  This means get_iommu_table() won't need to search
 	 * up the device tree to find it.
 	 */
-	for_each_pci_dev(dev) {
-		mydn = dn = pci_device_to_OF_node(dev);
+	mydn = dn = pci_device_to_OF_node(dev);
 
-		while (dn && dn->iommu_table == NULL)
-			dn = dn->parent;
-		if (dn)
-			mydn->iommu_table = dn->iommu_table;
-	}
+	while (dn && dn->iommu_table == NULL)
+		dn = dn->parent;
+
+	WARN_ON(!dn);
+
+	if (dn)
+		mydn->iommu_table = dn->iommu_table;
 }
 
+static void iommu_bus_setup_null(struct pci_bus *b) { }
+static void iommu_dev_setup_null(struct pci_dev *d) { }
+
 /* These are called very early. */
-void tce_init_pSeries(void)
+void iommu_init_early_pSeries(void)
 {
-	if (!(systemcfg->platform & PLATFORM_LPAR)) {
+	if (of_chosen && get_property(of_chosen, "linux,iommu-off", NULL)) {
+		/* Direct I/O, IOMMU off */
+		ppc_md.iommu_dev_setup = iommu_dev_setup_null;
+		ppc_md.iommu_bus_setup = iommu_bus_setup_null;
+		pci_direct_iommu_init();
+
+		return;
+	}
+
+	if (systemcfg->platform & PLATFORM_LPAR) {
+		if (cur_cpu_spec->firmware_features & FW_FEATURE_MULTITCE) {
+			ppc_md.tce_build = tce_buildmulti_pSeriesLP;
+			ppc_md.tce_free	 = tce_freemulti_pSeriesLP;
+		} else {
+			ppc_md.tce_build = tce_build_pSeriesLP;
+			ppc_md.tce_free	 = tce_free_pSeriesLP;
+		}
+		ppc_md.iommu_bus_setup = iommu_bus_setup_pSeriesLP;
+	} else {
 		ppc_md.tce_build = tce_build_pSeries;
 		ppc_md.tce_free  = tce_free_pSeries;
-	} else if (cur_cpu_spec->firmware_features & FW_FEATURE_MULTITCE) {
-		ppc_md.tce_build = tce_buildmulti_pSeriesLP;
-		ppc_md.tce_free	 = tce_freemulti_pSeriesLP;
-	} else {
-		ppc_md.tce_build = tce_build_pSeriesLP;
-		ppc_md.tce_free	 = tce_free_pSeriesLP;
+		ppc_md.iommu_bus_setup = iommu_bus_setup_pSeries;
 	}
+
+	ppc_md.iommu_dev_setup = iommu_dev_setup_pSeries;
 
 	pci_iommu_init();
 }
diff -Nru a/arch/ppc64/kernel/pSeries_lpar.c b/arch/ppc64/kernel/pSeries_lpar.c
--- a/arch/ppc64/kernel/pSeries_lpar.c	2005-01-10 20:11:23 -08:00
+++ b/arch/ppc64/kernel/pSeries_lpar.c	2005-01-10 20:11:23 -08:00
@@ -33,7 +33,6 @@
 #include <asm/mmu_context.h>
 #include <asm/ppcdebug.h>
 #include <asm/iommu.h>
-#include <asm/naca.h>
 #include <asm/tlbflush.h>
 #include <asm/tlb.h>
 #include <asm/prom.h>
@@ -368,7 +367,7 @@
 
 static void pSeries_lpar_hptab_clear(void)
 {
-	unsigned long size_bytes = 1UL << naca->pftSize;
+	unsigned long size_bytes = 1UL << ppc64_pft_size;
 	unsigned long hpte_count = size_bytes >> 4;
 	unsigned long dummy1, dummy2;
 	int i;
@@ -437,7 +436,7 @@
 	hash = hpt_hash(vpn, 0);
 
 	for (j = 0; j < 2; j++) {
-		slot = (hash & htab_data.htab_hash_mask) * HPTES_PER_GROUP;
+		slot = (hash & htab_hash_mask) * HPTES_PER_GROUP;
 		for (i = 0; i < HPTES_PER_GROUP; i++) {
 			hpte_dw0.dword0 = pSeries_lpar_hpte_getword0(slot);
 			dw0 = hpte_dw0.dw0;
@@ -504,7 +503,7 @@
 				   int local)
 {
 	int i;
-	unsigned long flags;
+	unsigned long flags = 0;
 	struct ppc64_tlb_batch *batch = &__get_cpu_var(ppc64_tlb_batch);
 	int lock_tlbie = !(cur_cpu_spec->cpu_features & CPU_FTR_LOCKLESS_TLBIE);
 
diff -Nru a/arch/ppc64/kernel/pSeries_pci.c b/arch/ppc64/kernel/pSeries_pci.c
--- a/arch/ppc64/kernel/pSeries_pci.c	2005-01-10 20:11:23 -08:00
+++ b/arch/ppc64/kernel/pSeries_pci.c	2005-01-10 20:11:23 -08:00
@@ -36,7 +36,6 @@
 #include <asm/prom.h>
 #include <asm/machdep.h>
 #include <asm/pci-bridge.h>
-#include <asm/naca.h>
 #include <asm/iommu.h>
 #include <asm/rtas.h>
 
@@ -149,7 +148,7 @@
 	rtas_pci_write_config
 };
 
-static int is_python(struct device_node *dev)
+int is_python(struct device_node *dev)
 {
 	char *model = (char *)get_property(dev, "model", NULL);
 
@@ -353,7 +352,7 @@
 	unsigned int *opprop = NULL;
 	struct device_node *root = of_find_node_by_path("/");
 
-	if (naca->interrupt_controller == IC_OPEN_PIC) {
+	if (ppc64_interrupt_controller == IC_OPEN_PIC) {
 		opprop = (unsigned int *)get_property(root,
 				"platform-open-pic", NULL);
 	}
@@ -375,7 +374,7 @@
 		pci_process_bridge_OF_ranges(phb, node);
 		pci_setup_phb_io(phb, index == 0);
 
-		if (naca->interrupt_controller == IC_OPEN_PIC && pSeries_mpic) {
+		if (ppc64_interrupt_controller == IC_OPEN_PIC && pSeries_mpic) {
 			int addr = root_size_cells * (index + 2) - 1;
 			mpic_assign_isu(pSeries_mpic, index, opprop[addr]);
 		}
@@ -554,9 +553,6 @@
 	phbs_remap_io();
 	pSeries_request_regions();
 	pci_fix_bus_sysdata();
-
-	if (!of_chosen || !get_property(of_chosen, "linux,iommu-off", NULL))
-		iommu_setup_pSeries();
 
 	pci_addr_cache_build();
 }
diff -Nru a/arch/ppc64/kernel/pSeries_setup.c b/arch/ppc64/kernel/pSeries_setup.c
--- a/arch/ppc64/kernel/pSeries_setup.c	2005-01-10 20:11:16 -08:00
+++ b/arch/ppc64/kernel/pSeries_setup.c	2005-01-10 20:11:16 -08:00
@@ -56,9 +56,9 @@
 #include <asm/dma.h>
 #include <asm/machdep.h>
 #include <asm/irq.h>
-#include <asm/naca.h>
 #include <asm/time.h>
 #include <asm/nvram.h>
+#include <asm/plpar_wrappers.h>
 
 #include "i8259.h"
 #include <asm/xics.h>
@@ -80,8 +80,10 @@
 extern void pSeries_get_rtc_time(struct rtc_time *rtc_time);
 extern int  pSeries_set_rtc_time(struct rtc_time *rtc_time);
 extern void find_udbg_vterm(void);
-extern void SystemReset_FWNMI(void), MachineCheck_FWNMI(void);	/* from head.S */
-extern void generic_find_legacy_serial_ports(unsigned int *default_speed);
+extern void system_reset_fwnmi(void);	/* from head.S */
+extern void machine_check_fwnmi(void);	/* from head.S */
+extern void generic_find_legacy_serial_ports(u64 *physport,
+		unsigned int *default_speed);
 
 int fwnmi_active;  /* TRUE if an FWNMI handler is present */
 
@@ -92,6 +94,9 @@
 extern unsigned long ppc_proc_freq;
 extern unsigned long ppc_tb_freq;
 
+extern void pSeries_system_reset_exception(struct pt_regs *regs);
+extern int pSeries_machine_check_exception(struct pt_regs *regs);
+
 static volatile void __iomem * chrp_int_ack_special;
 struct mpic *pSeries_mpic;
 
@@ -118,8 +123,8 @@
 	if (ibm_nmi_register == RTAS_UNKNOWN_SERVICE)
 		return;
 	ret = rtas_call(ibm_nmi_register, 2, 1, NULL,
-			__pa((unsigned long)SystemReset_FWNMI),
-			__pa((unsigned long)MachineCheck_FWNMI));
+			__pa((unsigned long)system_reset_fwnmi),
+			__pa((unsigned long)machine_check_fwnmi));
 	if (ret == 0)
 		fwnmi_active = 1;
 }
@@ -196,7 +201,7 @@
 static void __init pSeries_setup_arch(void)
 {
 	/* Fixup ppc_md depending on the type of interrupt controller */
-	if (naca->interrupt_controller == IC_OPEN_PIC) {
+	if (ppc64_interrupt_controller == IC_OPEN_PIC) {
 		ppc_md.init_IRQ       = pSeries_init_mpic; 
 		ppc_md.get_irq        = mpic_get_irq;
 		/* Allocate the mpic now, so that find_and_init_phbs() can
@@ -308,15 +313,15 @@
 	 * to properly parse the OF interrupt tree & do the virtual irq mapping
 	 */
 	__irq_offset_value = NUM_ISA_INTERRUPTS;
-	naca->interrupt_controller = IC_INVALID;
+	ppc64_interrupt_controller = IC_INVALID;
 	for (np = NULL; (np = of_find_node_by_name(np, "interrupt-controller"));) {
 		typep = (char *)get_property(np, "compatible", NULL);
 		if (strstr(typep, "open-pic"))
-			naca->interrupt_controller = IC_OPEN_PIC;
+			ppc64_interrupt_controller = IC_OPEN_PIC;
 		else if (strstr(typep, "ppc-xicp"))
-			naca->interrupt_controller = IC_PPC_XIC;
+			ppc64_interrupt_controller = IC_PPC_XIC;
 		else
-			printk("initialize_naca: failed to recognize"
+			printk("pSeries_discover_pic: failed to recognize"
 			       " interrupt-controller\n");
 		break;
 	}
@@ -344,6 +349,7 @@
 	void *comport;
 	int iommu_off = 0;
 	unsigned int default_speed;
+	u64 physport;
 
 	DBG(" -> pSeries_init_early()\n");
 
@@ -357,13 +363,13 @@
 			     get_property(of_chosen, "linux,iommu-off", NULL));
 	}
 
-	generic_find_legacy_serial_ports(&default_speed);
+	generic_find_legacy_serial_ports(&physport, &default_speed);
 
 	if (systemcfg->platform & PLATFORM_LPAR)
 		find_udbg_vterm();
-	else if (naca->serialPortAddr) {
+	else if (physport) {
 		/* Map the uart for udbg. */
-		comport = (void *)__ioremap(naca->serialPortAddr, 16, _PAGE_NO_CACHE);
+		comport = (void *)__ioremap(physport, 16, _PAGE_NO_CACHE);
 		udbg_init_uart(comport, default_speed);
 
 		ppc_md.udbg_putc = udbg_putc;
@@ -373,10 +379,7 @@
 	}
 
 
-	if (iommu_off)
-		pci_dma_init_direct();
-	else
-		tce_init_pSeries();
+	iommu_init_early_pSeries();
 
 	pSeries_discover_pic();
 
@@ -610,4 +613,6 @@
 	.calibrate_decr		= pSeries_calibrate_decr,
 	.progress		= pSeries_progress,
 	.check_legacy_ioport	= pSeries_check_legacy_ioport,
+	.system_reset_exception = pSeries_system_reset_exception,
+	.machine_check_exception = pSeries_machine_check_exception,
 };
diff -Nru a/arch/ppc64/kernel/pSeries_smp.c b/arch/ppc64/kernel/pSeries_smp.c
--- a/arch/ppc64/kernel/pSeries_smp.c	2005-01-10 20:11:19 -08:00
+++ b/arch/ppc64/kernel/pSeries_smp.c	2005-01-10 20:11:19 -08:00
@@ -38,7 +38,6 @@
 #include <asm/io.h>
 #include <asm/prom.h>
 #include <asm/smp.h>
-#include <asm/naca.h>
 #include <asm/paca.h>
 #include <asm/time.h>
 #include <asm/ppcdebug.h>
@@ -57,7 +56,7 @@
 #define DBG(fmt...)
 #endif
 
-extern void pseries_secondary_smp_init(unsigned long); 
+extern void pSeries_secondary_smp_init(unsigned long);
 
 /* Get state of physical CPU.
  * Return codes:
@@ -193,7 +192,7 @@
 {
 	int status;
 	unsigned long start_here = __pa((u32)*((unsigned long *)
-					       pseries_secondary_smp_init));
+					       pSeries_secondary_smp_init));
 	unsigned int pcpu;
 
 	/* At boot time the cpus are already spinning in hold
@@ -348,7 +347,7 @@
 
 	DBG(" -> smp_init_pSeries()\n");
 
-	if (naca->interrupt_controller == IC_OPEN_PIC)
+	if (ppc64_interrupt_controller == IC_OPEN_PIC)
 		smp_ops = &pSeries_mpic_smp_ops;
 	else
 		smp_ops = &pSeries_xics_smp_ops;
@@ -363,7 +362,7 @@
 			rtas_call(rtas_token("start-cpu"), 3, 1, &ret,
 				  get_hard_smp_processor_id(i),
 				  __pa((u32)*((unsigned long *)
-					      pseries_secondary_smp_init)),
+					      pSeries_secondary_smp_init)),
 				  i);
 		}
 	}
diff -Nru a/arch/ppc64/kernel/pacaData.c b/arch/ppc64/kernel/pacaData.c
--- a/arch/ppc64/kernel/pacaData.c	2005-01-10 20:11:21 -08:00
+++ b/arch/ppc64/kernel/pacaData.c	2005-01-10 20:11:21 -08:00
@@ -10,24 +10,25 @@
 #include <linux/config.h>
 #include <linux/types.h>
 #include <linux/threads.h>
+#include <linux/module.h>
+
 #include <asm/processor.h>
 #include <asm/ptrace.h>
 #include <asm/page.h>
 
-#include <asm/iSeries/ItLpPaca.h>
+#include <asm/lppaca.h>
 #include <asm/iSeries/ItLpQueue.h>
-#include <asm/naca.h>
 #include <asm/paca.h>
 
-struct naca_struct *naca;
 struct systemcfg *systemcfg;
+EXPORT_SYMBOL(systemcfg);
 
 /* This symbol is provided by the linker - let it fill in the paca
  * field correctly */
 extern unsigned long __toc_start;
 
 /* The Paca is an array with one entry per processor.  Each contains an 
- * ItLpPaca, which contains the information shared between the 
+ * lppaca, which contains the information shared between the
  * hypervisor and Linux.  Each also contains an ItLpRegSave area which
  * is used by the hypervisor to save registers.
  * On systems with hardware multi-threading, there are two threads
@@ -60,13 +61,13 @@
 	.cpu_start = (start),		/* Processor start */		    \
 	.hw_cpu_id = 0xffff,						    \
 	.lppaca = {							    \
-		.xDesc = 0xd397d781,	/* "LpPa" */			    \
-		.xSize = sizeof(struct ItLpPaca),			    \
-		.xFPRegsInUse = 1,					    \
-		.xDynProcStatus = 2,					    \
-		.xDecrVal = 0x00ff0000,					    \
-		.xEndOfQuantum = 0xfffffffffffffffful,			    \
-		.xSLBCount = 64,					    \
+		.desc = 0xd397d781,	/* "LpPa" */			    \
+		.size = sizeof(struct lppaca),				    \
+		.dyn_proc_status = 2,					    \
+		.decr_val = 0x00ff0000,					    \
+		.fpregs_in_use = 1,					    \
+		.end_of_quantum = 0xfffffffffffffffful,			    \
+		.slb_count = 64,					    \
 	},								    \
 	EXTRA_INITS((number), (lpq))					    \
 }
diff -Nru a/arch/ppc64/kernel/pci.c b/arch/ppc64/kernel/pci.c
--- a/arch/ppc64/kernel/pci.c	2005-01-10 20:11:22 -08:00
+++ b/arch/ppc64/kernel/pci.c	2005-01-10 20:11:22 -08:00
@@ -845,6 +845,11 @@
 		pcibios_fixup_device_resources(dev, bus);
 	}
 
+	ppc_md.iommu_bus_setup(bus);
+
+	list_for_each_entry(dev, &bus->devices, bus_list)
+		ppc_md.iommu_dev_setup(dev);
+
 	if (!pci_probe_only)
 		return;
 
diff -Nru a/arch/ppc64/kernel/pci_direct_iommu.c b/arch/ppc64/kernel/pci_direct_iommu.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/ppc64/kernel/pci_direct_iommu.c	2005-01-10 20:11:15 -08:00
@@ -0,0 +1,89 @@
+/*
+ * Support for DMA from PCI devices to main memory on
+ * machines without an iommu or with directly addressable
+ * RAM (typically a pmac with 2Gb of RAM or less)
+ *
+ * Copyright (C) 2003 Benjamin Herrenschmidt (benh@kernel.crashing.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/kernel.h>
+#include <linux/pci.h>
+#include <linux/delay.h>
+#include <linux/string.h>
+#include <linux/init.h>
+#include <linux/bootmem.h>
+#include <linux/mm.h>
+#include <linux/dma-mapping.h>
+
+#include <asm/sections.h>
+#include <asm/io.h>
+#include <asm/prom.h>
+#include <asm/pci-bridge.h>
+#include <asm/machdep.h>
+#include <asm/pmac_feature.h>
+#include <asm/abs_addr.h>
+
+#include "pci.h"
+
+static void *pci_direct_alloc_consistent(struct pci_dev *hwdev, size_t size,
+				   dma_addr_t *dma_handle)
+{
+	void *ret;
+
+	ret = (void *)__get_free_pages(GFP_ATOMIC, get_order(size));
+	if (ret != NULL) {
+		memset(ret, 0, size);
+		*dma_handle = virt_to_abs(ret);
+	}
+	return ret;
+}
+
+static void pci_direct_free_consistent(struct pci_dev *hwdev, size_t size,
+				 void *vaddr, dma_addr_t dma_handle)
+{
+	free_pages((unsigned long)vaddr, get_order(size));
+}
+
+static dma_addr_t pci_direct_map_single(struct pci_dev *hwdev, void *ptr,
+		size_t size, enum dma_data_direction direction)
+{
+	return virt_to_abs(ptr);
+}
+
+static void pci_direct_unmap_single(struct pci_dev *hwdev, dma_addr_t dma_addr,
+		size_t size, enum dma_data_direction direction)
+{
+}
+
+static int pci_direct_map_sg(struct pci_dev *hwdev, struct scatterlist *sg,
+		int nents, enum dma_data_direction direction)
+{
+	int i;
+
+	for (i = 0; i < nents; i++, sg++) {
+		sg->dma_address = page_to_phys(sg->page) + sg->offset;
+		sg->dma_length = sg->length;
+	}
+
+	return nents;
+}
+
+static void pci_direct_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sg,
+		int nents, enum dma_data_direction direction)
+{
+}
+
+void __init pci_direct_iommu_init(void)
+{
+	pci_dma_ops.pci_alloc_consistent = pci_direct_alloc_consistent;
+	pci_dma_ops.pci_free_consistent = pci_direct_free_consistent;
+	pci_dma_ops.pci_map_single = pci_direct_map_single;
+	pci_dma_ops.pci_unmap_single = pci_direct_unmap_single;
+	pci_dma_ops.pci_map_sg = pci_direct_map_sg;
+	pci_dma_ops.pci_unmap_sg = pci_direct_unmap_sg;
+}
diff -Nru a/arch/ppc64/kernel/pci_dma_direct.c b/arch/ppc64/kernel/pci_dma_direct.c
--- a/arch/ppc64/kernel/pci_dma_direct.c	2005-01-10 20:11:15 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,89 +0,0 @@
-/*
- * Support for DMA from PCI devices to main memory on
- * machines without an iommu or with directly addressable
- * RAM (typically a pmac with 2Gb of RAM or less)
- *
- * Copyright (C) 2003 Benjamin Herrenschmidt (benh@kernel.crashing.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/kernel.h>
-#include <linux/pci.h>
-#include <linux/delay.h>
-#include <linux/string.h>
-#include <linux/init.h>
-#include <linux/bootmem.h>
-#include <linux/mm.h>
-#include <linux/dma-mapping.h>
-
-#include <asm/sections.h>
-#include <asm/io.h>
-#include <asm/prom.h>
-#include <asm/pci-bridge.h>
-#include <asm/machdep.h>
-#include <asm/pmac_feature.h>
-#include <asm/abs_addr.h>
-
-#include "pci.h"
-
-static void *pci_direct_alloc_consistent(struct pci_dev *hwdev, size_t size,
-				   dma_addr_t *dma_handle)
-{
-	void *ret;
-
-	ret = (void *)__get_free_pages(GFP_ATOMIC, get_order(size));
-	if (ret != NULL) {
-		memset(ret, 0, size);
-		*dma_handle = virt_to_abs(ret);
-	}
-	return ret;
-}
-
-static void pci_direct_free_consistent(struct pci_dev *hwdev, size_t size,
-				 void *vaddr, dma_addr_t dma_handle)
-{
-	free_pages((unsigned long)vaddr, get_order(size));
-}
-
-static dma_addr_t pci_direct_map_single(struct pci_dev *hwdev, void *ptr,
-		size_t size, enum dma_data_direction direction)
-{
-	return virt_to_abs(ptr);
-}
-
-static void pci_direct_unmap_single(struct pci_dev *hwdev, dma_addr_t dma_addr,
-		size_t size, enum dma_data_direction direction)
-{
-}
-
-static int pci_direct_map_sg(struct pci_dev *hwdev, struct scatterlist *sg,
-		int nents, enum dma_data_direction direction)
-{
-	int i;
-
-	for (i = 0; i < nents; i++, sg++) {
-		sg->dma_address = page_to_phys(sg->page) + sg->offset;
-		sg->dma_length = sg->length;
-	}
-
-	return nents;
-}
-
-static void pci_direct_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sg,
-		int nents, enum dma_data_direction direction)
-{
-}
-
-void __init pci_dma_init_direct(void)
-{
-	pci_dma_ops.pci_alloc_consistent = pci_direct_alloc_consistent;
-	pci_dma_ops.pci_free_consistent = pci_direct_free_consistent;
-	pci_dma_ops.pci_map_single = pci_direct_map_single;
-	pci_dma_ops.pci_unmap_single = pci_direct_unmap_single;
-	pci_dma_ops.pci_map_sg = pci_direct_map_sg;
-	pci_dma_ops.pci_unmap_sg = pci_direct_unmap_sg;
-}
diff -Nru a/arch/ppc64/kernel/pci_dn.c b/arch/ppc64/kernel/pci_dn.c
--- a/arch/ppc64/kernel/pci_dn.c	2005-01-10 20:11:23 -08:00
+++ b/arch/ppc64/kernel/pci_dn.c	2005-01-10 20:11:23 -08:00
@@ -33,7 +33,6 @@
 #include <asm/machdep.h>
 #include <asm/pci-bridge.h>
 #include <asm/ppcdebug.h>
-#include <asm/naca.h>
 #include <asm/iommu.h>
 
 #include "pci.h"
diff -Nru a/arch/ppc64/kernel/pmac_pci.c b/arch/ppc64/kernel/pmac_pci.c
--- a/arch/ppc64/kernel/pmac_pci.c	2005-01-10 20:11:20 -08:00
+++ b/arch/ppc64/kernel/pmac_pci.c	2005-01-10 20:11:20 -08:00
@@ -666,8 +666,6 @@
 		pci_read_irq_line(dev);
 
 	pci_fix_bus_sysdata();
-
-	iommu_setup_u3();
 }
 
 static void __init pmac_fixup_phb_resources(void)
diff -Nru a/arch/ppc64/kernel/pmac_setup.c b/arch/ppc64/kernel/pmac_setup.c
--- a/arch/ppc64/kernel/pmac_setup.c	2005-01-10 20:11:16 -08:00
+++ b/arch/ppc64/kernel/pmac_setup.c	2005-01-10 20:11:16 -08:00
@@ -166,11 +166,6 @@
 	pmac_setup_smp();
 #endif
 
-	/* Setup the PCI DMA to "direct" by default. May be overriden
-	 * by iommu later on
-	 */
-	pci_dma_init_direct();
-
 	/* Lookup PCI hosts */
        	pmac_pci_init();
 
@@ -315,7 +310,9 @@
 	}
 
 	/* Setup interrupt mapping options */
-	naca->interrupt_controller = IC_OPEN_PIC;
+	ppc64_interrupt_controller = IC_OPEN_PIC;
+
+	iommu_init_early_u3();
 
 	DBG(" <- pmac_init_early\n");
 }
diff -Nru a/arch/ppc64/kernel/ppc_ksyms.c b/arch/ppc64/kernel/ppc_ksyms.c
--- a/arch/ppc64/kernel/ppc_ksyms.c	2005-01-10 20:11:17 -08:00
+++ b/arch/ppc64/kernel/ppc_ksyms.c	2005-01-10 20:11:17 -08:00
@@ -67,11 +67,7 @@
 
 EXPORT_SYMBOL(__down_interruptible);
 EXPORT_SYMBOL(__up);
-EXPORT_SYMBOL(naca);
 EXPORT_SYMBOL(__down);
-#ifdef CONFIG_PPC_ISERIES
-EXPORT_SYMBOL(itLpNaca);
-#endif
 
 EXPORT_SYMBOL(csum_partial);
 EXPORT_SYMBOL(csum_partial_copy_generic);
@@ -162,4 +158,3 @@
 EXPORT_SYMBOL(tb_ticks_per_usec);
 EXPORT_SYMBOL(paca);
 EXPORT_SYMBOL(cur_cpu_spec);
-EXPORT_SYMBOL(systemcfg);
diff -Nru a/arch/ppc64/kernel/proc_ppc64.c b/arch/ppc64/kernel/proc_ppc64.c
--- a/arch/ppc64/kernel/proc_ppc64.c	2005-01-10 20:11:21 -08:00
+++ b/arch/ppc64/kernel/proc_ppc64.c	2005-01-10 20:11:21 -08:00
@@ -25,8 +25,6 @@
 #include <linux/slab.h>
 #include <linux/kernel.h>
 
-#include <asm/naca.h>
-#include <asm/paca.h>
 #include <asm/systemcfg.h>
 #include <asm/rtas.h>
 #include <asm/uaccess.h>
@@ -58,26 +56,6 @@
 #endif
 
 /*
- * NOTE: since paca data is always in flux the values will never be a
- * consistant set.
- */
-static void __init proc_create_paca(struct proc_dir_entry *dir, int num)
-{
-	struct proc_dir_entry *ent;
-	struct paca_struct *lpaca = paca + num;
-	char buf[16];
-
-	sprintf(buf, "%02x", num);
-	ent = create_proc_entry(buf, S_IRUSR, dir);
-	if (ent) {
-		ent->nlink = 1;
-		ent->data = lpaca;
-		ent->size = 4096;
-		ent->proc_fops = &page_map_fops;
-	}
-}
-
-/*
  * Create the ppc64 and ppc64/rtas directories early. This allows us to
  * assume that they have been previously created in drivers.
  */
@@ -104,17 +82,8 @@
 
 static int __init proc_ppc64_init(void)
 {
-	unsigned long i;
 	struct proc_dir_entry *pde;
 
-	pde = create_proc_entry("ppc64/naca", S_IRUSR, NULL);
-	if (!pde)
-		return 1;
-	pde->nlink = 1;
-	pde->data = naca;
-	pde->size = 4096;
-	pde->proc_fops = &page_map_fops;
-
 	pde = create_proc_entry("ppc64/systemcfg", S_IFREG|S_IRUGO, NULL);
 	if (!pde)
 		return 1;
@@ -122,13 +91,6 @@
 	pde->data = systemcfg;
 	pde->size = 4096;
 	pde->proc_fops = &page_map_fops;
-
-	/* /proc/ppc64/paca/XX -- raw paca contents.  Only readable to root */
-	pde = proc_mkdir("ppc64/paca", NULL);
-	if (!pde)
-		return 1;
-	for_each_cpu(i)
-		proc_create_paca(pde, i);
 
 #ifdef CONFIG_PPC_PSERIES
 	if ((systemcfg->platform & PLATFORM_PSERIES))
diff -Nru a/arch/ppc64/kernel/prom.c b/arch/ppc64/kernel/prom.c
--- a/arch/ppc64/kernel/prom.c	2005-01-10 20:11:21 -08:00
+++ b/arch/ppc64/kernel/prom.c	2005-01-10 20:11:21 -08:00
@@ -44,7 +44,6 @@
 #include <asm/system.h>
 #include <asm/mmu.h>
 #include <asm/pgtable.h>
-#include <asm/naca.h>
 #include <asm/pci.h>
 #include <asm/iommu.h>
 #include <asm/bootinfo.h>
@@ -557,7 +556,7 @@
 
 	DBG(" -> finish_device_tree\n");
 
-	if (naca->interrupt_controller == IC_INVALID) {
+	if (ppc64_interrupt_controller == IC_INVALID) {
 		DBG("failed to configure interrupt controller type\n");
 		panic("failed to configure interrupt controller type\n");
 	}
@@ -844,12 +843,12 @@
 
 	/* On LPAR, look for the first ibm,pft-size property for the  hash table size
 	 */
-	if (systemcfg->platform == PLATFORM_PSERIES_LPAR && naca->pftSize == 0) {
+	if (systemcfg->platform == PLATFORM_PSERIES_LPAR && ppc64_pft_size == 0) {
 		u32 *pft_size;
 		pft_size = (u32 *)get_flat_dt_prop(node, "ibm,pft-size", NULL);
 		if (pft_size != NULL) {
 			/* pft_size[0] is the NUMA CEC cookie */
-			naca->pftSize = pft_size[1];
+			ppc64_pft_size = pft_size[1];
 		}
 	}
 
@@ -1018,7 +1017,7 @@
 	initial_boot_params = params;
 
 	/* By default, hash size is not set */
-	naca->pftSize = 0;
+	ppc64_pft_size = 0;
 
 	/* Retreive various informations from the /chosen node of the
 	 * device-tree, including the platform type, initrd location and
@@ -1047,7 +1046,7 @@
 	/* If hash size wasn't obtained above, we calculate it now based on
 	 * the total RAM size
 	 */
-	if (naca->pftSize == 0) {
+	if (ppc64_pft_size == 0) {
 		unsigned long rnd_mem_size, pteg_count;
 
 		/* round mem_size up to next power of 2 */
@@ -1058,10 +1057,10 @@
 		/* # pages / 2 */
 		pteg_count = (rnd_mem_size >> (12 + 1));
 
-		naca->pftSize = __ilog2(pteg_count << 7);
+		ppc64_pft_size = __ilog2(pteg_count << 7);
 	}
 
-	DBG("Hash pftSize: %x\n", (int)naca->pftSize);
+	DBG("Hash pftSize: %x\n", (int)ppc64_pft_size);
 	DBG(" <- early_init_devtree()\n");
 }
 
@@ -1743,17 +1742,6 @@
 		node->busno = (regs[0] >> 16) & 0xff;
 		node->devfn = (regs[0] >> 8) & 0xff;
 	}
-
-	/* fixing up iommu_table */
-
-#ifdef CONFIG_PPC_PSERIES
-	if (strcmp(node->name, "pci") == 0 &&
-	    get_property(node, "ibm,dma-window", NULL)) {
-		node->bussubno = node->busno;
-		iommu_devnode_init_pSeries(node);
-	} else
-		node->iommu_table = parent->iommu_table;
-#endif /* CONFIG_PPC_PSERIES */
 
 out:
 	of_node_put(parent);
diff -Nru a/arch/ppc64/kernel/prom_init.c b/arch/ppc64/kernel/prom_init.c
--- a/arch/ppc64/kernel/prom_init.c	2005-01-10 20:11:22 -08:00
+++ b/arch/ppc64/kernel/prom_init.c	2005-01-10 20:11:22 -08:00
@@ -43,7 +43,6 @@
 #include <asm/system.h>
 #include <asm/mmu.h>
 #include <asm/pgtable.h>
-#include <asm/naca.h>
 #include <asm/pci.h>
 #include <asm/iommu.h>
 #include <asm/bootinfo.h>
diff -Nru a/arch/ppc64/kernel/ras.c b/arch/ppc64/kernel/ras.c
--- a/arch/ppc64/kernel/ras.c	2005-01-10 20:11:17 -08:00
+++ b/arch/ppc64/kernel/ras.c	2005-01-10 20:11:17 -08:00
@@ -55,6 +55,13 @@
 static unsigned char ras_log_buf[RTAS_ERROR_LOG_MAX];
 static spinlock_t ras_log_buf_lock = SPIN_LOCK_UNLOCKED;
 
+char mce_data_buf[RTAS_ERROR_LOG_MAX]
+;
+/* This is true if we are using the firmware NMI handler (typically LPAR) */
+extern int fwnmi_active;
+
+extern void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr);
+
 static int ras_get_sensor_state_token;
 static int ras_check_exception_token;
 
@@ -233,4 +240,117 @@
 
 	spin_unlock(&ras_log_buf_lock);
 	return IRQ_HANDLED;
+}
+
+/* Get the error information for errors coming through the
+ * FWNMI vectors.  The pt_regs' r3 will be updated to reflect
+ * the actual r3 if possible, and a ptr to the error log entry
+ * will be returned if found.
+ *
+ * The mce_data_buf does not have any locks or protection around it,
+ * if a second machine check comes in, or a system reset is done
+ * before we have logged the error, then we will get corruption in the
+ * error log.  This is preferable over holding off on calling
+ * ibm,nmi-interlock which would result in us checkstopping if a
+ * second machine check did come in.
+ */
+static struct rtas_error_log *fwnmi_get_errinfo(struct pt_regs *regs)
+{
+	unsigned long errdata = regs->gpr[3];
+	struct rtas_error_log *errhdr = NULL;
+	unsigned long *savep;
+
+	if ((errdata >= 0x7000 && errdata < 0x7fff0) ||
+	    (errdata >= rtas.base && errdata < rtas.base + rtas.size - 16)) {
+		savep = __va(errdata);
+		regs->gpr[3] = savep[0];	/* restore original r3 */
+		memset(mce_data_buf, 0, RTAS_ERROR_LOG_MAX);
+		memcpy(mce_data_buf, (char *)(savep + 1), RTAS_ERROR_LOG_MAX);
+		errhdr = (struct rtas_error_log *)mce_data_buf;
+	} else {
+		printk("FWNMI: corrupt r3\n");
+	}
+	return errhdr;
+}
+
+/* Call this when done with the data returned by FWNMI_get_errinfo.
+ * It will release the saved data area for other CPUs in the
+ * partition to receive FWNMI errors.
+ */
+static void fwnmi_release_errinfo(void)
+{
+	int ret = rtas_call(rtas_token("ibm,nmi-interlock"), 0, 1, NULL);
+	if (ret != 0)
+		printk("FWNMI: nmi-interlock failed: %d\n", ret);
+}
+
+void pSeries_system_reset_exception(struct pt_regs *regs)
+{
+	if (fwnmi_active) {
+		struct rtas_error_log *errhdr = fwnmi_get_errinfo(regs);
+		if (errhdr) {
+			/* XXX Should look at FWNMI information */
+		}
+		fwnmi_release_errinfo();
+	}
+}
+
+/*
+ * See if we can recover from a machine check exception.
+ * This is only called on power4 (or above) and only via
+ * the Firmware Non-Maskable Interrupts (fwnmi) handler
+ * which provides the error analysis for us.
+ *
+ * Return 1 if corrected (or delivered a signal).
+ * Return 0 if there is nothing we can do.
+ */
+static int recover_mce(struct pt_regs *regs, struct rtas_error_log * err)
+{
+	int nonfatal = 0;
+
+	if (err->disposition == RTAS_DISP_FULLY_RECOVERED) {
+		/* Platform corrected itself */
+		nonfatal = 1;
+	} else if ((regs->msr & MSR_RI) &&
+		   user_mode(regs) &&
+		   err->severity == RTAS_SEVERITY_ERROR_SYNC &&
+		   err->disposition == RTAS_DISP_NOT_RECOVERED &&
+		   err->target == RTAS_TARGET_MEMORY &&
+		   err->type == RTAS_TYPE_ECC_UNCORR &&
+		   !(current->pid == 0 || current->pid == 1)) {
+		/* Kill off a user process with an ECC error */
+		printk(KERN_ERR "MCE: uncorrectable ecc error for pid %d\n",
+		       current->pid);
+		/* XXX something better for ECC error? */
+		_exception(SIGBUS, regs, BUS_ADRERR, regs->nip);
+		nonfatal = 1;
+	}
+
+ 	log_error((char *)err, ERR_TYPE_RTAS_LOG, !nonfatal);
+
+	return nonfatal;
+}
+
+/*
+ * Handle a machine check.
+ *
+ * Note that on Power 4 and beyond Firmware Non-Maskable Interrupts (fwnmi)
+ * should be present.  If so the handler which called us tells us if the
+ * error was recovered (never true if RI=0).
+ *
+ * On hardware prior to Power 4 these exceptions were asynchronous which
+ * means we can't tell exactly where it occurred and so we can't recover.
+ */
+int pSeries_machine_check_exception(struct pt_regs *regs)
+{
+	struct rtas_error_log *errp;
+
+	if (fwnmi_active) {
+		errp = fwnmi_get_errinfo(regs);
+		fwnmi_release_errinfo();
+		if (errp && recover_mce(regs, errp))
+			return 1;
+	}
+
+	return 0;
 }
diff -Nru a/arch/ppc64/kernel/rtas-proc.c b/arch/ppc64/kernel/rtas-proc.c
--- a/arch/ppc64/kernel/rtas-proc.c	2005-01-10 20:11:18 -08:00
+++ b/arch/ppc64/kernel/rtas-proc.c	2005-01-10 20:11:18 -08:00
@@ -31,6 +31,7 @@
 #include <asm/rtas.h>
 #include <asm/machdep.h> /* for ppc_md */
 #include <asm/time.h>
+#include <asm/systemcfg.h>
 
 /* Token for Sensors */
 #define KEY_SWITCH		0x0001
diff -Nru a/arch/ppc64/kernel/rtas.c b/arch/ppc64/kernel/rtas.c
--- a/arch/ppc64/kernel/rtas.c	2005-01-10 20:11:16 -08:00
+++ b/arch/ppc64/kernel/rtas.c	2005-01-10 20:11:16 -08:00
@@ -29,6 +29,7 @@
 #include <asm/udbg.h>
 #include <asm/delay.h>
 #include <asm/uaccess.h>
+#include <asm/systemcfg.h>
 
 struct flash_block_list_header rtas_firmware_flash_list = {0, NULL};
 
diff -Nru a/arch/ppc64/kernel/rtasd.c b/arch/ppc64/kernel/rtasd.c
--- a/arch/ppc64/kernel/rtasd.c	2005-01-10 20:11:17 -08:00
+++ b/arch/ppc64/kernel/rtasd.c	2005-01-10 20:11:17 -08:00
@@ -26,6 +26,7 @@
 #include <asm/prom.h>
 #include <asm/nvram.h>
 #include <asm/atomic.h>
+#include <asm/systemcfg.h>
 
 #if 0
 #define DEBUG(A...)	printk(KERN_ERR A)
@@ -486,7 +487,7 @@
 	/* No RTAS, only warn if we are on a pSeries box  */
 	if (rtas_token("event-scan") == RTAS_UNKNOWN_SERVICE) {
 		if (systemcfg->platform & PLATFORM_PSERIES);
-			printk(KERN_ERR "rtasd: no RTAS on system\n");
+			printk(KERN_ERR "rtasd: no event-scan on system\n");
 		return 1;
 	}
 
diff -Nru a/arch/ppc64/kernel/setup.c b/arch/ppc64/kernel/setup.c
--- a/arch/ppc64/kernel/setup.c	2005-01-10 20:11:19 -08:00
+++ b/arch/ppc64/kernel/setup.c	2005-01-10 20:11:19 -08:00
@@ -17,6 +17,7 @@
 #include <linux/string.h>
 #include <linux/sched.h>
 #include <linux/init.h>
+#include <linux/kernel.h>
 #include <linux/reboot.h>
 #include <linux/delay.h>
 #include <linux/initrd.h>
@@ -41,7 +42,6 @@
 #include <asm/elf.h>
 #include <asm/machdep.h>
 #include <asm/iSeries/LparData.h>
-#include <asm/naca.h>
 #include <asm/paca.h>
 #include <asm/ppcdebug.h>
 #include <asm/time.h>
@@ -54,6 +54,9 @@
 #include <asm/rtas.h>
 #include <asm/iommu.h>
 #include <asm/serial.h>
+#include <asm/cache.h>
+#include <asm/page.h>
+#include <asm/mmu.h>
 
 #ifdef DEBUG
 #define DBG(fmt...) udbg_printf(fmt)
@@ -89,7 +92,6 @@
 #endif
 
 /* extern void *stab; */
-extern HTAB htab_data;
 extern unsigned long klimit;
 
 extern void mm_init_ppc64(void);
@@ -110,6 +112,11 @@
 int boot_cpuid = 0;
 int boot_cpuid_phys = 0;
 dev_t boot_dev;
+u64 ppc64_pft_size;
+u64 ppc64_debug_switch;
+
+struct ppc64_caches ppc64_caches;
+EXPORT_SYMBOL_GPL(ppc64_caches);
 
 /*
  * These are used in binfmt_elf.c to put aux entries on the stack
@@ -156,7 +163,7 @@
  */
 void __init ppcdbg_initialize(void)
 {
-	naca->debug_switch = PPC_DEBUG_DEFAULT; /* | PPCDBG_BUSWALK | */
+	ppc64_debug_switch = PPC_DEBUG_DEFAULT; /* | PPCDBG_BUSWALK | */
 	/* PPCDBG_PHBINIT | PPCDBG_MM | PPCDBG_MMINIT | PPCDBG_TCEINIT | PPCDBG_TCE */;
 }
 
@@ -394,7 +401,7 @@
 	DBG(" -> early_setup()\n");
 
 	/*
-	 * Fill the default DBG level in naca (do we want to keep
+	 * Fill the default DBG level (do we want to keep
 	 * that old mecanism around forever ?)
 	 */
 	ppcdbg_initialize();
@@ -448,17 +455,17 @@
 
 
 /*
- * Initialize some remaining members of the naca and systemcfg structures
+ * Initialize some remaining members of the ppc64_caches and systemcfg structures
  * (at least until we get rid of them completely). This is mostly some
  * cache informations about the CPU that will be used by cache flush
  * routines and/or provided to userland
  */
-static void __init initialize_naca(void)
+static void __init initialize_cache_info(void)
 {
 	struct device_node *np;
 	unsigned long num_cpus = 0;
 
-	DBG(" -> initialize_naca()\n");
+	DBG(" -> initialize_cache_info()\n");
 
 	for (np = NULL; (np = of_find_node_by_type(np, "cpu"));) {
 		num_cpus += 1;
@@ -489,15 +496,15 @@
 			lsizep = (u32 *) get_property(np, dc, NULL);
 			if (lsizep != NULL)
 				lsize = *lsizep;
-
 			if (sizep == 0 || lsizep == 0)
 				DBG("Argh, can't find dcache properties ! "
 				    "sizep: %p, lsizep: %p\n", sizep, lsizep);
 
-			systemcfg->dCacheL1Size = size;
-			systemcfg->dCacheL1LineSize = lsize;
-			naca->dCacheL1LogLineSize = __ilog2(lsize);
-			naca->dCacheL1LinesPerPage = PAGE_SIZE/(lsize);
+			systemcfg->dcache_size = ppc64_caches.dsize = size;
+			systemcfg->dcache_line_size =
+				ppc64_caches.dline_size = lsize;
+			ppc64_caches.log_dline_size = __ilog2(lsize);
+			ppc64_caches.dlines_per_page = PAGE_SIZE / lsize;
 
 			size = 0;
 			lsize = cur_cpu_spec->icache_bsize;
@@ -511,11 +518,11 @@
 				DBG("Argh, can't find icache properties ! "
 				    "sizep: %p, lsizep: %p\n", sizep, lsizep);
 
-			systemcfg->iCacheL1Size = size;
-			systemcfg->iCacheL1LineSize = lsize;
-			naca->iCacheL1LogLineSize = __ilog2(lsize);
-			naca->iCacheL1LinesPerPage = PAGE_SIZE/(lsize);
-
+			systemcfg->icache_size = ppc64_caches.isize = size;
+			systemcfg->icache_line_size =
+				ppc64_caches.iline_size = lsize;
+			ppc64_caches.log_iline_size = __ilog2(lsize);
+			ppc64_caches.ilines_per_page = PAGE_SIZE / lsize;
 		}
 	}
 
@@ -525,7 +532,7 @@
 	systemcfg->version.minor = SYSTEMCFG_MINOR;
 	systemcfg->processor = mfspr(SPRN_PVR);
 
-	DBG(" <- initialize_naca()\n");
+	DBG(" <- initialize_cache_info()\n");
 }
 
 static void __init check_for_initrd(void)
@@ -586,7 +593,7 @@
 	unflatten_device_tree();
 
 	/*
-	 * Fill the naca & systemcfg structures with informations
+	 * Fill the ppc64_caches & systemcfg structures with informations
 	 * retreived from the device-tree. Need to be called before
 	 * finish_device_tree() since the later requires some of the
 	 * informations filled up here to properly parse the interrupt
@@ -595,7 +602,7 @@
 	 * routines like flush_icache_range (used by the hash init
 	 * later on).
 	 */
-	initialize_naca();
+	initialize_cache_info();
 
 #ifdef CONFIG_PPC_PSERIES
 	/*
@@ -656,18 +663,19 @@
 	printk("Starting Linux PPC64 %s\n", UTS_RELEASE);
 
 	printk("-----------------------------------------------------\n");
-	printk("naca                          = 0x%p\n", naca);
-	printk("naca->pftSize                 = 0x%lx\n", naca->pftSize);
-	printk("naca->debug_switch            = 0x%lx\n", naca->debug_switch);
-	printk("naca->interrupt_controller    = 0x%ld\n", naca->interrupt_controller);
+	printk("ppc64_pft_size                = 0x%lx\n", ppc64_pft_size);
+	printk("ppc64_debug_switch            = 0x%lx\n", ppc64_debug_switch);
+	printk("ppc64_interrupt_controller    = 0x%ld\n", ppc64_interrupt_controller);
 	printk("systemcfg                     = 0x%p\n", systemcfg);
 	printk("systemcfg->platform           = 0x%x\n", systemcfg->platform);
 	printk("systemcfg->processorCount     = 0x%lx\n", systemcfg->processorCount);
 	printk("systemcfg->physicalMemorySize = 0x%lx\n", systemcfg->physicalMemorySize);
-	printk("systemcfg->dCacheL1LineSize   = 0x%x\n", systemcfg->dCacheL1LineSize);
-	printk("systemcfg->iCacheL1LineSize   = 0x%x\n", systemcfg->iCacheL1LineSize);
-	printk("htab_data.htab                = 0x%p\n", htab_data.htab);
-	printk("htab_data.num_ptegs           = 0x%lx\n", htab_data.htab_num_ptegs);
+	printk("ppc64_caches.dcache_line_size = 0x%x\n",
+			ppc64_caches.dline_size);
+	printk("ppc64_caches.icache_line_size = 0x%x\n",
+			ppc64_caches.iline_size);
+	printk("htab_address                  = 0x%p\n", htab_address);
+	printk("htab_hash_mask                = 0x%lx\n", htab_hash_mask);
 	printk("-----------------------------------------------------\n");
 
 	mm_init_ppc64();
@@ -988,7 +996,6 @@
  */
 void __init setup_arch(char **cmdline_p)
 {
-	extern int panic_timeout;
 	extern void do_init_bootmem(void);
 
 	ppc64_boot_msg(0x12, "Setup Arch");
@@ -1000,8 +1007,8 @@
 	 * Systems with OF can look in the properties on the cpu node(s)
 	 * for a possibly more accurate value.
 	 */
-	dcache_bsize = systemcfg->dCacheL1LineSize; 
-	icache_bsize = systemcfg->iCacheL1LineSize; 
+	dcache_bsize = ppc64_caches.dline_size;
+	icache_bsize = ppc64_caches.iline_size;
 
 	/* reboot on panic */
 	panic_timeout = 180;
@@ -1147,7 +1154,8 @@
 static struct plat_serial8250_port serial_ports[MAX_LEGACY_SERIAL_PORTS+1];
 static unsigned int old_serial_count;
 
-void __init generic_find_legacy_serial_ports(unsigned int *default_speed)
+void __init generic_find_legacy_serial_ports(u64 *physport,
+		unsigned int *default_speed)
 {
 	struct device_node *np;
 	u32 *sizeprop;
@@ -1165,7 +1173,7 @@
 
 	DBG(" -> generic_find_legacy_serial_port()\n");
 
-	naca->serialPortAddr = 0;
+	*physport = 0;
 	if (default_speed)
 		*default_speed = 0;
 
@@ -1287,7 +1295,7 @@
 				io_base = (io_base << 32) | rangesp[4];
 		}
 		if (io_base != 0) {
-			naca->serialPortAddr = io_base + reg->address;
+			*physport = io_base + reg->address;
 			if (default_speed && spd)
 				*default_speed = *spd;
 		}
@@ -1337,6 +1345,7 @@
 
 void cpu_die(void)
 {
+	idle_task_exit();
 	if (ppc_md.cpu_die)
 		ppc_md.cpu_die();
 	local_irq_disable();
diff -Nru a/arch/ppc64/kernel/signal32.c b/arch/ppc64/kernel/signal32.c
--- a/arch/ppc64/kernel/signal32.c	2005-01-10 20:11:22 -08:00
+++ b/arch/ppc64/kernel/signal32.c	2005-01-10 20:11:22 -08:00
@@ -72,7 +72,7 @@
  *
  */
 struct rt_sigframe32 {
-	struct compat_siginfo	info;
+	compat_siginfo_t	info;
 	struct ucontext32	uc;
 	/*
 	 * Programs using the rs6000/xcoff abi can save up to 19 gp
@@ -341,7 +341,6 @@
  *       sigpending               sys32_rt_sigpending
  *       sigprocmask              sys32_rt_sigprocmask
  *       sigreturn                sys32_rt_sigreturn
- *       sigtimedwait             sys32_rt_sigtimedwait
  *       sigqueueinfo             sys32_rt_sigqueueinfo
  *       sigsuspend               sys32_rt_sigsuspend
  *
@@ -445,9 +444,9 @@
 }
 
 
-static long copy_siginfo_to_user32(compat_siginfo_t __user *d, siginfo_t *s)
+int copy_siginfo_to_user32(struct compat_siginfo __user *d, siginfo_t *s)
 {
-	long err;
+	int err;
 
 	if (!access_ok (VERIFY_WRITE, d, sizeof(*d)))
 		return -EFAULT;
@@ -498,35 +497,6 @@
 		break;
 	}
 	return err;
-}
-
-long sys32_rt_sigtimedwait(compat_sigset_t __user *uthese, compat_siginfo_t __user *uinfo,
-		struct compat_timespec __user *uts, compat_size_t sigsetsize)
-{
-	sigset_t s;
-	compat_sigset_t s32;
-	struct timespec t;
-	int ret;
-	mm_segment_t old_fs = get_fs();
-	siginfo_t info;
-
-	if (copy_from_user(&s32, uthese, sizeof(compat_sigset_t)))
-		return -EFAULT;
-	sigset_from_compat(&s, &s32);
-	if (uts && get_compat_timespec(&t, uts))
-		return -EFAULT;
-	set_fs(KERNEL_DS);
-	/* The __user pointer casts are valid because of the set_fs() */
-	ret = sys_rt_sigtimedwait((sigset_t __user *) &s,
-			uinfo ? (siginfo_t __user *) &info : NULL,
-			uts ? (struct timespec __user *) &t : NULL,
-			sigsetsize);
-	set_fs(old_fs);
-	if (ret >= 0 && uinfo) {
-		if (copy_siginfo_to_user32(uinfo, &info))
-			return -EFAULT;
-	}
-	return ret;
 }
 
 /*
diff -Nru a/arch/ppc64/kernel/smp.c b/arch/ppc64/kernel/smp.c
--- a/arch/ppc64/kernel/smp.c	2005-01-10 20:11:21 -08:00
+++ b/arch/ppc64/kernel/smp.c	2005-01-10 20:11:21 -08:00
@@ -41,7 +41,6 @@
 #include <asm/io.h>
 #include <asm/prom.h>
 #include <asm/smp.h>
-#include <asm/naca.h>
 #include <asm/paca.h>
 #include <asm/time.h>
 #include <asm/ppcdebug.h>
@@ -74,7 +73,6 @@
 
 extern unsigned char stab_array[];
 
-extern int cpu_idle(void *unused);
 void smp_call_function_interrupt(void);
 
 int smt_enabled_at_boot = 1;
@@ -157,11 +155,6 @@
 	}
 }
 
-void smp_local_timer_interrupt(struct pt_regs * regs)
-{
-	update_process_times(user_mode(regs));
-}
-
 void smp_message_recv(int msg, struct pt_regs *regs)
 {
 	switch(msg) {
@@ -523,7 +516,8 @@
 
 	local_irq_enable();
 
-	return cpu_idle(NULL);
+	cpu_idle();
+	return 0;
 }
 
 int setup_profiling_timer(unsigned int multiplier)
diff -Nru a/arch/ppc64/kernel/sys_ppc32.c b/arch/ppc64/kernel/sys_ppc32.c
--- a/arch/ppc64/kernel/sys_ppc32.c	2005-01-10 20:11:21 -08:00
+++ b/arch/ppc64/kernel/sys_ppc32.c	2005-01-10 20:11:21 -08:00
@@ -73,6 +73,7 @@
 #include <asm/ppcdebug.h>
 #include <asm/time.h>
 #include <asm/mmu_context.h>
+#include <asm/systemcfg.h>
 
 #include "pci.h"
 
@@ -1151,23 +1152,6 @@
 		copy_to_user(args->__unused, tmp.__unused, sizeof(tmp.__unused));
 	}
 	return error;
-}
-
-asmlinkage long sys32_time(compat_time_t __user * tloc)
-{
-	compat_time_t secs;
-
-	struct timeval tv;
-
-	do_gettimeofday( &tv );
-	secs = tv.tv_sec;
-
-	if (tloc) {
-		if (put_user(secs,tloc))
-			secs = -EFAULT;
-	}
-
-	return secs;
 }
 
 asmlinkage int sys32_olduname(struct oldold_utsname __user * name)
diff -Nru a/arch/ppc64/kernel/sysfs.c b/arch/ppc64/kernel/sysfs.c
--- a/arch/ppc64/kernel/sysfs.c	2005-01-10 20:11:16 -08:00
+++ b/arch/ppc64/kernel/sysfs.c	2005-01-10 20:11:16 -08:00
@@ -7,14 +7,21 @@
 #include <linux/sched.h>
 #include <linux/module.h>
 #include <linux/nodemask.h>
+#include <linux/cpumask.h>
+#include <linux/notifier.h>
 
 #include <asm/current.h>
 #include <asm/processor.h>
 #include <asm/cputable.h>
 #include <asm/hvcall.h>
 #include <asm/prom.h>
+#include <asm/systemcfg.h>
+#include <asm/paca.h>
+#include <asm/lppaca.h>
 
 
+static DEFINE_PER_CPU(struct cpu, cpu_devices);
+
 /* SMT stuff */
 
 #ifdef CONFIG_PPC_MULTIPLATFORM
@@ -153,10 +160,8 @@
 
 #ifdef CONFIG_PPC_PSERIES
 	/* instruct hypervisor to maintain PMCs */
-	if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) {
-		char *ptr = (char *)&paca[smp_processor_id()].lppaca;
-		ptr[0xBB] = 1;
-	}
+	if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR)
+		get_paca()->lppaca.pmcregs_in_use = 1;
 
 	/*
 	 * On SMT machines we have to set the run latch in the ctrl register
@@ -255,8 +260,18 @@
 static SYSDEV_ATTR(pmc8, 0600, show_pmc8, store_pmc8);
 static SYSDEV_ATTR(purr, 0600, show_purr, NULL);
 
-static void __init register_cpu_pmc(struct sys_device *s)
+static void register_cpu_online(unsigned int cpu)
 {
+	struct cpu *c = &per_cpu(cpu_devices, cpu);
+	struct sys_device *s = &c->sysdev;
+
+#ifndef CONFIG_PPC_ISERIES
+	if (cur_cpu_spec->cpu_features & CPU_FTR_SMT)
+		sysdev_create_file(s, &attr_smt_snooze_delay);
+#endif
+
+	/* PMC stuff */
+
 	sysdev_create_file(s, &attr_mmcr0);
 	sysdev_create_file(s, &attr_mmcr1);
 
@@ -279,6 +294,65 @@
 		sysdev_create_file(s, &attr_purr);
 }
 
+#ifdef CONFIG_HOTPLUG_CPU
+static void unregister_cpu_online(unsigned int cpu)
+{
+	struct cpu *c = &per_cpu(cpu_devices, cpu);
+	struct sys_device *s = &c->sysdev;
+
+	BUG_ON(c->no_control);
+
+#ifndef CONFIG_PPC_ISERIES
+	if (cur_cpu_spec->cpu_features & CPU_FTR_SMT)
+		sysdev_remove_file(s, &attr_smt_snooze_delay);
+#endif
+
+	/* PMC stuff */
+
+	sysdev_remove_file(s, &attr_mmcr0);
+	sysdev_remove_file(s, &attr_mmcr1);
+
+	if (cur_cpu_spec->cpu_features & CPU_FTR_MMCRA)
+		sysdev_remove_file(s, &attr_mmcra);
+
+	sysdev_remove_file(s, &attr_pmc1);
+	sysdev_remove_file(s, &attr_pmc2);
+	sysdev_remove_file(s, &attr_pmc3);
+	sysdev_remove_file(s, &attr_pmc4);
+	sysdev_remove_file(s, &attr_pmc5);
+	sysdev_remove_file(s, &attr_pmc6);
+
+	if (cur_cpu_spec->cpu_features & CPU_FTR_PMC8) {
+		sysdev_remove_file(s, &attr_pmc7);
+		sysdev_remove_file(s, &attr_pmc8);
+	}
+
+	if (cur_cpu_spec->cpu_features & CPU_FTR_SMT)
+		sysdev_remove_file(s, &attr_purr);
+}
+#endif /* CONFIG_HOTPLUG_CPU */
+
+static int __devinit sysfs_cpu_notify(struct notifier_block *self,
+				      unsigned long action, void *hcpu)
+{
+	unsigned int cpu = (unsigned int)(long)hcpu;
+
+	switch (action) {
+	case CPU_ONLINE:
+		register_cpu_online(cpu);
+		break;
+#ifdef CONFIG_HOTPLUG_CPU
+	case CPU_DEAD:
+		unregister_cpu_online(cpu);
+		break;
+#endif
+	}
+	return NOTIFY_OK;
+}
+
+static struct notifier_block __devinitdata sysfs_cpu_nb = {
+	.notifier_call	= sysfs_cpu_notify,
+};
 
 /* NUMA stuff */
 
@@ -308,8 +382,7 @@
 }
 #endif
 
-
-/* Only valid if CPU is online. */
+/* Only valid if CPU is present. */
 static ssize_t show_physical_id(struct sys_device *dev, char *buf)
 {
 	struct cpu *cpu = container_of(dev, struct cpu, sysdev);
@@ -318,9 +391,6 @@
 }
 static SYSDEV_ATTR(physical_id, 0444, show_physical_id, NULL);
 
-
-static DEFINE_PER_CPU(struct cpu, cpu_devices);
-
 static int __init topology_init(void)
 {
 	int cpu;
@@ -328,6 +398,8 @@
 
 	register_nodes();
 
+	register_cpu_notifier(&sysfs_cpu_nb);
+
 	for_each_cpu(cpu) {
 		struct cpu *c = &per_cpu(cpu_devices, cpu);
 
@@ -341,19 +413,19 @@
 		 * CPU.  For instance, the boot cpu might never be valid
 		 * for hotplugging.
 		 */
+#ifdef CONFIG_HOTPLUG_CPU
 		if (systemcfg->platform != PLATFORM_PSERIES_LPAR)
+#endif
 			c->no_control = 1;
 
-		register_cpu(c, cpu, parent);
-
-		register_cpu_pmc(&c->sysdev);
+		if (cpu_online(cpu) || (c->no_control == 0)) {
+			register_cpu(c, cpu, parent);
 
-		sysdev_create_file(&c->sysdev, &attr_physical_id);
+			sysdev_create_file(&c->sysdev, &attr_physical_id);
+		}
 
-#ifndef CONFIG_PPC_ISERIES
-		if (cur_cpu_spec->cpu_features & CPU_FTR_SMT)
-			sysdev_create_file(&c->sysdev, &attr_smt_snooze_delay);
-#endif
+		if (cpu_online(cpu))
+			register_cpu_online(cpu);
 	}
 
 	return 0;
diff -Nru a/arch/ppc64/kernel/time.c b/arch/ppc64/kernel/time.c
--- a/arch/ppc64/kernel/time.c	2005-01-10 20:11:22 -08:00
+++ b/arch/ppc64/kernel/time.c	2005-01-10 20:11:22 -08:00
@@ -66,8 +66,7 @@
 #include <asm/ppcdebug.h>
 #include <asm/prom.h>
 #include <asm/sections.h>
-
-void smp_local_timer_interrupt(struct pt_regs *);
+#include <asm/systemcfg.h>
 
 u64 jiffies_64 __cacheline_aligned_in_smp = INITIAL_JIFFIES;
 
@@ -229,7 +228,7 @@
 /*
  * For iSeries shared processors, we have to let the hypervisor
  * set the hardware decrementer.  We set a virtual decrementer
- * in the ItLpPaca and call the hypervisor if the virtual
+ * in the lppaca and call the hypervisor if the virtual
  * decrementer is less than the current value in the hardware
  * decrementer. (almost always the new decrementer value will
  * be greater than the current hardware decementer so the hypervisor
@@ -255,11 +254,9 @@
 	profile_tick(CPU_PROFILING, regs);
 #endif
 
-	lpaca->lppaca.xIntDword.xFields.xDecrInt = 0;
+	lpaca->lppaca.int_dword.fields.decr_int = 0;
 
 	while (lpaca->next_jiffy_update_tb <= (cur_tb = get_tb())) {
-
-#ifdef CONFIG_SMP
 		/*
 		 * We cannot disable the decrementer, so in the period
 		 * between this cpu's being marked offline in cpu_online_map
@@ -268,8 +265,7 @@
 		 * is the case.
 		 */
 		if (!cpu_is_offline(cpu))
-			smp_local_timer_interrupt(regs);
-#endif
+			update_process_times(user_mode(regs));
 		/*
 		 * No need to check whether cpu is offline here; boot_cpuid
 		 * should have been fixed up by now.
@@ -278,9 +274,6 @@
 			write_seqlock(&xtime_lock);
 			tb_last_stamp = lpaca->next_jiffy_update_tb;
 			do_timer(regs);
-#ifndef CONFIG_SMP
-			update_process_times(user_mode(regs));
-#endif
 			timer_sync_xtime( cur_tb );
 			timer_check_rtc();
 			write_sequnlock(&xtime_lock);
@@ -424,60 +417,6 @@
 }
 
 EXPORT_SYMBOL(do_settimeofday);
-
-/*
- * This function is a copy of the architecture independent function
- * but which calls do_settimeofday rather than setting the xtime
- * fields itself.  This way, the fields which are used for 
- * do_settimeofday get updated too.
- */
-long ppc64_sys32_stime(int __user * tptr)
-{
-	int value;
-	struct timespec myTimeval;
-	int err;
-
-	if (get_user(value, tptr))
-		return -EFAULT;
-
-	myTimeval.tv_sec = value;
-	myTimeval.tv_nsec = 0;
-
-	err = security_settime(&myTimeval, NULL);
-	if (err)
-		return err;
-
-	do_settimeofday(&myTimeval);
-
-	return 0;
-}
-
-/*
- * This function is a copy of the architecture independent function
- * but which calls do_settimeofday rather than setting the xtime
- * fields itself.  This way, the fields which are used for 
- * do_settimeofday get updated too.
- */
-long ppc64_sys_stime(long __user * tptr)
-{
-	long value;
-	struct timespec myTimeval;
-	int err;
-
-	if (get_user(value, tptr))
-		return -EFAULT;
-
-	myTimeval.tv_sec = value;
-	myTimeval.tv_nsec = 0;
-
-	err = security_settime(&myTimeval, NULL);
-	if (err)
-		return err;
-
-	do_settimeofday(&myTimeval);
-
-	return 0;
-}
 
 void __init time_init(void)
 {
diff -Nru a/arch/ppc64/kernel/traps.c b/arch/ppc64/kernel/traps.c
--- a/arch/ppc64/kernel/traps.c	2005-01-10 20:11:19 -08:00
+++ b/arch/ppc64/kernel/traps.c	2005-01-10 20:11:19 -08:00
@@ -29,6 +29,7 @@
 #include <linux/interrupt.h>
 #include <linux/init.h>
 #include <linux/module.h>
+#include <asm/kdebug.h>
 
 #include <asm/pgtable.h>
 #include <asm/uaccess.h>
@@ -37,11 +38,8 @@
 #include <asm/processor.h>
 #include <asm/ppcdebug.h>
 #include <asm/rtas.h>
-
-#ifdef CONFIG_PPC_PSERIES
-/* This is true if we are using the firmware NMI handler (typically LPAR) */
-extern int fwnmi_active;
-#endif
+#include <asm/systemcfg.h>
+#include <asm/machdep.h>
 
 #ifdef CONFIG_DEBUGGER
 int (*__debugger)(struct pt_regs *regs);
@@ -61,6 +59,20 @@
 EXPORT_SYMBOL(__debugger_fault_handler);
 #endif
 
+struct notifier_block *ppc64_die_chain;
+static spinlock_t die_notifier_lock = SPIN_LOCK_UNLOCKED;
+
+int register_die_notifier(struct notifier_block *nb)
+{
+	int err = 0;
+	unsigned long flags;
+
+	spin_lock_irqsave(&die_notifier_lock, flags);
+	err = notifier_chain_register(&ppc64_die_chain, nb);
+	spin_unlock_irqrestore(&die_notifier_lock, flags);
+	return err;
+}
+
 /*
  * Trap & Exception support
  */
@@ -133,8 +145,7 @@
 	return 0;
 }
 
-static void
-_exception(int signr, struct pt_regs *regs, int code, unsigned long addr)
+void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr)
 {
 	siginfo_t info;
 
@@ -150,53 +161,11 @@
 	force_sig_info(signr, &info, current);
 }
 
-#ifdef CONFIG_PPC_PSERIES
-/* Get the error information for errors coming through the
- * FWNMI vectors.  The pt_regs' r3 will be updated to reflect
- * the actual r3 if possible, and a ptr to the error log entry
- * will be returned if found.
- */
-static struct rtas_error_log *FWNMI_get_errinfo(struct pt_regs *regs)
+void system_reset_exception(struct pt_regs *regs)
 {
-	unsigned long errdata = regs->gpr[3];
-	struct rtas_error_log *errhdr = NULL;
-	unsigned long *savep;
-
-	if ((errdata >= 0x7000 && errdata < 0x7fff0) ||
-	    (errdata >= rtas.base && errdata < rtas.base + rtas.size - 16)) {
-		savep = __va(errdata);
-		regs->gpr[3] = savep[0];	/* restore original r3 */
-		errhdr = (struct rtas_error_log *)(savep + 1);
-	} else {
-		printk("FWNMI: corrupt r3\n");
-	}
-	return errhdr;
-}
-
-/* Call this when done with the data returned by FWNMI_get_errinfo.
- * It will release the saved data area for other CPUs in the
- * partition to receive FWNMI errors.
- */
-static void FWNMI_release_errinfo(void)
-{
-	int ret = rtas_call(rtas_token("ibm,nmi-interlock"), 0, 1, NULL);
-	if (ret != 0)
-		printk("FWNMI: nmi-interlock failed: %d\n", ret);
-}
-#endif
-
-void
-SystemResetException(struct pt_regs *regs)
-{
-#ifdef CONFIG_PPC_PSERIES
-	if (fwnmi_active) {
-		struct rtas_error_log *errhdr = FWNMI_get_errinfo(regs);
-		if (errhdr) {
-			/* XXX Should look at FWNMI information */
-		}
-		FWNMI_release_errinfo();
-	}
-#endif
+	/* See if any machine dependent calls */
+	if (ppc_md.system_reset_exception)
+		ppc_md.system_reset_exception(regs);
 
 	die("System Reset", regs, 0);
 
@@ -207,64 +176,16 @@
 	/* What should we do here? We could issue a shutdown or hard reset. */
 }
 
-#ifdef CONFIG_PPC_PSERIES
-/* 
- * See if we can recover from a machine check exception.
- * This is only called on power4 (or above) and only via
- * the Firmware Non-Maskable Interrupts (fwnmi) handler
- * which provides the error analysis for us.
- *
- * Return 1 if corrected (or delivered a signal).
- * Return 0 if there is nothing we can do.
- */
-static int recover_mce(struct pt_regs *regs, struct rtas_error_log err)
+void machine_check_exception(struct pt_regs *regs)
 {
-	if (err.disposition == RTAS_DISP_FULLY_RECOVERED) {
-		/* Platform corrected itself */
-		return 1;
-	} else if ((regs->msr & MSR_RI) &&
-		   user_mode(regs) &&
-		   err.severity == RTAS_SEVERITY_ERROR_SYNC &&
-		   err.disposition == RTAS_DISP_NOT_RECOVERED &&
-		   err.target == RTAS_TARGET_MEMORY &&
-		   err.type == RTAS_TYPE_ECC_UNCORR &&
-		   !(current->pid == 0 || current->pid == 1)) {
-		/* Kill off a user process with an ECC error */
-		printk(KERN_ERR "MCE: uncorrectable ecc error for pid %d\n",
-		       current->pid);
-		/* XXX something better for ECC error? */
-		_exception(SIGBUS, regs, BUS_ADRERR, regs->nip);
-		return 1;
-	}
-	return 0;
-}
-#endif
+	int recover = 0;
 
-/*
- * Handle a machine check.
- *
- * Note that on Power 4 and beyond Firmware Non-Maskable Interrupts (fwnmi)
- * should be present.  If so the handler which called us tells us if the
- * error was recovered (never true if RI=0).
- *
- * On hardware prior to Power 4 these exceptions were asynchronous which
- * means we can't tell exactly where it occurred and so we can't recover.
- */
-void
-MachineCheckException(struct pt_regs *regs)
-{
-#ifdef CONFIG_PPC_PSERIES
-	struct rtas_error_log err, *errp;
+	/* See if any machine dependent calls */
+	if (ppc_md.machine_check_exception)
+		recover = ppc_md.machine_check_exception(regs);
 
-	if (fwnmi_active) {
-		errp = FWNMI_get_errinfo(regs);
-		if (errp)
-			err = *errp;
-		FWNMI_release_errinfo();	/* frees errp */
-		if (errp && recover_mce(regs, err))
-			return;
-	}
-#endif
+	if (recover)
+		return;
 
 	if (debugger_fault_handler(regs))
 		return;
@@ -275,8 +196,7 @@
 		panic("Unrecoverable Machine check");
 }
 
-void
-UnknownException(struct pt_regs *regs)
+void unknown_exception(struct pt_regs *regs)
 {
 	printk("Bad trap at PC: %lx, SR: %lx, vector=%lx\n",
 	       regs->nip, regs->msr, regs->trap);
@@ -284,19 +204,23 @@
 	_exception(SIGTRAP, regs, 0, 0);
 }
 
-void
-InstructionBreakpointException(struct pt_regs *regs)
+void instruction_breakpoint_exception(struct pt_regs *regs)
 {
+	if (notify_die(DIE_IABR_MATCH, "iabr_match", regs, 5,
+					5, SIGTRAP) == NOTIFY_STOP)
+		return;
 	if (debugger_iabr_match(regs))
 		return;
 	_exception(SIGTRAP, regs, TRAP_BRKPT, regs->nip);
 }
 
-void
-SingleStepException(struct pt_regs *regs)
+void single_step_exception(struct pt_regs *regs)
 {
 	regs->msr &= ~MSR_SE;  /* Turn off 'trace' bit */
 
+	if (notify_die(DIE_SSTEP, "single_step", regs, 5,
+					5, SIGTRAP) == NOTIFY_STOP)
+		return;
 	if (debugger_sstep(regs))
 		return;
 
@@ -312,7 +236,7 @@
 static inline void emulate_single_step(struct pt_regs *regs)
 {
 	if (regs->msr & MSR_SE)
-		SingleStepException(regs);
+		single_step_exception(regs);
 }
 
 static void parse_fpe(struct pt_regs *regs)
@@ -456,9 +380,11 @@
 	return 0;
 }
 
-void
-ProgramCheckException(struct pt_regs *regs)
+void program_check_exception(struct pt_regs *regs)
 {
+	if (debugger_fault_handler(regs))
+		return;
+
 	if (regs->msr & 0x100000) {
 		/* IEEE FP exception */
 		parse_fpe(regs);
@@ -470,6 +396,9 @@
 	} else if (regs->msr & 0x20000) {
 		/* trap exception */
 
+		if (notify_die(DIE_BPT, "breakpoint", regs, 5,
+					5, SIGTRAP) == NOTIFY_STOP)
+			return;
 		if (debugger_bpt(regs))
 			return;
 
@@ -498,14 +427,14 @@
 	}
 }
 
-void KernelFPUnavailableException(struct pt_regs *regs)
+void kernel_fp_unavailable_exception(struct pt_regs *regs)
 {
 	printk(KERN_EMERG "Unrecoverable FP Unavailable Exception "
 			  "%lx at %lx\n", regs->trap, regs->nip);
 	die("Unrecoverable FP Unavailable Exception", regs, SIGABRT);
 }
 
-void AltivecUnavailableException(struct pt_regs *regs)
+void altivec_unavailable_exception(struct pt_regs *regs)
 {
 #ifndef CONFIG_ALTIVEC
 	if (user_mode(regs)) {
@@ -521,9 +450,6 @@
 }
 
 /* Ensure exceptions are disabled */
-#define MMCR0_PMXE      (1UL << (31 - 5))
-#define MMCR0_PMAO      (1UL << (31 - 24))
-
 static void dummy_perf(struct pt_regs *regs)
 {
 	unsigned int mmcr0 = mfspr(SPRN_MMCR0);
@@ -536,14 +462,12 @@
 
 EXPORT_SYMBOL(perf_irq);
 
-void
-PerformanceMonitorException(struct pt_regs *regs)
+void performance_monitor_exception(struct pt_regs *regs)
 {
 	perf_irq(regs);
 }
 
-void
-AlignmentException(struct pt_regs *regs)
+void alignment_exception(struct pt_regs *regs)
 {
 	int fixed;
 
@@ -571,8 +495,7 @@
 }
 
 #ifdef CONFIG_ALTIVEC
-void
-AltivecAssistException(struct pt_regs *regs)
+void altivec_assist_exception(struct pt_regs *regs)
 {
 	int err;
 	siginfo_t info;
diff -Nru a/arch/ppc64/kernel/u3_iommu.c b/arch/ppc64/kernel/u3_iommu.c
--- a/arch/ppc64/kernel/u3_iommu.c	2005-01-10 20:11:22 -08:00
+++ b/arch/ppc64/kernel/u3_iommu.c	2005-01-10 20:11:22 -08:00
@@ -91,6 +91,7 @@
 static unsigned int dart_emptyval;
 
 static struct iommu_table iommu_table_u3;
+static int iommu_table_u3_inited;
 static int dart_dirty;
 
 #define DBG(...)
@@ -192,7 +193,6 @@
 	unsigned int regword;
 	unsigned int i;
 	unsigned long tmp;
-	struct page *p;
 
 	if (dart_tablebase == 0 || dart_tablesize == 0) {
 		printk(KERN_INFO "U3-DART: table not allocated, using direct DMA\n");
@@ -209,16 +209,15 @@
 	 * that to work around what looks like a problem with the HT bridge
 	 * prefetching into invalid pages and corrupting data
 	 */
-	tmp = __get_free_pages(GFP_ATOMIC, 1);
-	if (tmp == 0)
-		panic("U3-DART: Cannot allocate spare page !");
-	dart_emptyval = DARTMAP_VALID |
-		((virt_to_abs(tmp) >> PAGE_SHIFT) & DARTMAP_RPNMASK);
+	tmp = lmb_alloc(PAGE_SIZE, PAGE_SIZE);
+	if (!tmp)
+		panic("U3-DART: Cannot allocate spare page!");
+	dart_emptyval = DARTMAP_VALID | ((tmp >> PAGE_SHIFT) & DARTMAP_RPNMASK);
 
 	/* Map in DART registers. FIXME: Use device node to get base address */
 	dart = ioremap(DART_BASE, 0x7000);
 	if (dart == NULL)
-		panic("U3-DART: Cannot map registers !");
+		panic("U3-DART: Cannot map registers!");
 
 	/* Set initial control register contents: table base, 
 	 * table size and enable bit
@@ -227,7 +226,6 @@
 		((dart_tablebase >> PAGE_SHIFT) << DARTCNTL_BASE_SHIFT) |
 		(((dart_tablesize >> PAGE_SHIFT) & DARTCNTL_SIZE_MASK)
 				 << DARTCNTL_SIZE_SHIFT);
-	p = virt_to_page(dart_tablebase);
 	dart_vbase = ioremap(virt_to_abs(dart_tablebase), dart_tablesize);
 
 	/* Fill initial table */
@@ -240,35 +238,67 @@
 	/* Invalidate DART to get rid of possible stale TLBs */
 	dart_tlb_invalidate_all();
 
+	printk(KERN_INFO "U3/CPC925 DART IOMMU initialized\n");
+
+	return 0;
+}
+
+static void iommu_table_u3_setup(void)
+{
 	iommu_table_u3.it_busno = 0;
-	
-	/* Units of tce entries */
 	iommu_table_u3.it_offset = 0;
-	
-	/* Set the tce table size - measured in pages */
-	iommu_table_u3.it_size = dart_tablesize >> PAGE_SHIFT;
+	/* it_size is in number of entries */
+	iommu_table_u3.it_size = dart_tablesize / sizeof(u32);
 
 	/* Initialize the common IOMMU code */
 	iommu_table_u3.it_base = (unsigned long)dart_vbase;
 	iommu_table_u3.it_index = 0;
 	iommu_table_u3.it_blocksize = 1;
-	iommu_table_u3.it_entrysize = sizeof(u32);
 	iommu_init_table(&iommu_table_u3);
 
 	/* Reserve the last page of the DART to avoid possible prefetch
 	 * past the DART mapped area
 	 */
-	set_bit(iommu_table_u3.it_mapsize - 1, iommu_table_u3.it_map);
+	set_bit(iommu_table_u3.it_size - 1, iommu_table_u3.it_map);
+}
 
-	printk(KERN_INFO "U3/CPC925 DART IOMMU initialized\n");
+static void iommu_dev_setup_u3(struct pci_dev *dev)
+{
+	struct device_node *dn;
 
-	return 0;
+	/* We only have one iommu table on the mac for now, which makes
+	 * things simple. Setup all PCI devices to point to this table
+	 *
+	 * We must use pci_device_to_OF_node() to make sure that
+	 * we get the real "final" pointer to the device in the
+	 * pci_dev sysdata and not the temporary PHB one
+	 */
+	dn = pci_device_to_OF_node(dev);
+
+	if (dn)
+		dn->iommu_table = &iommu_table_u3;
+}
+
+static void iommu_bus_setup_u3(struct pci_bus *bus)
+{
+	struct device_node *dn;
+
+	if (!iommu_table_u3_inited) {
+		iommu_table_u3_inited = 1;
+		iommu_table_u3_setup();
+	}
+
+	dn = pci_bus_to_OF_node(bus);
+
+	if (dn)
+		dn->iommu_table = &iommu_table_u3;
 }
 
-void iommu_setup_u3(void)
+static void iommu_dev_setup_null(struct pci_dev *dev) { }
+static void iommu_bus_setup_null(struct pci_bus *bus) { }
+
+void iommu_init_early_u3(void)
 {
-	struct pci_controller *phb, *tmp;
-	struct pci_dev *dev = NULL;
 	struct device_node *dn;
 
 	/* Find the DART in the device-tree */
@@ -282,30 +312,22 @@
 	ppc_md.tce_flush = dart_flush;
 
 	/* Initialize the DART HW */
-	if (dart_init(dn))
-		return;
+	if (dart_init(dn)) {
+		/* If init failed, use direct iommu and null setup functions */
+		ppc_md.iommu_dev_setup = iommu_dev_setup_null;
+		ppc_md.iommu_bus_setup = iommu_bus_setup_null;
+
+		/* Setup pci_dma ops */
+		pci_direct_iommu_init();
+	} else {
+		ppc_md.iommu_dev_setup = iommu_dev_setup_u3;
+		ppc_md.iommu_bus_setup = iommu_bus_setup_u3;
 
-	/* Setup pci_dma ops */
-	pci_iommu_init();
-
-	/* We only have one iommu table on the mac for now, which makes
-	 * things simple. Setup all PCI devices to point to this table
-	 */
-	for_each_pci_dev(dev) {
-		/* We must use pci_device_to_OF_node() to make sure that
-		 * we get the real "final" pointer to the device in the
-		 * pci_dev sysdata and not the temporary PHB one
-		 */
-		struct device_node *dn = pci_device_to_OF_node(dev);
-		if (dn)
-			dn->iommu_table = &iommu_table_u3;
-	}
-	/* We also make sure we set all PHBs ... */
-	list_for_each_entry_safe(phb, tmp, &hose_list, list_node) {
-		dn = (struct device_node *)phb->arch_data;
-		dn->iommu_table = &iommu_table_u3;
+		/* Setup pci_dma ops */
+		pci_iommu_init();
 	}
 }
+
 
 void __init alloc_u3_dart_table(void)
 {
diff -Nru a/arch/ppc64/kernel/udbg.c b/arch/ppc64/kernel/udbg.c
--- a/arch/ppc64/kernel/udbg.c	2005-01-10 20:11:16 -08:00
+++ b/arch/ppc64/kernel/udbg.c	2005-01-10 20:11:16 -08:00
@@ -15,7 +15,6 @@
 #include <linux/types.h>
 #include <asm/ppcdebug.h>
 #include <asm/processor.h>
-#include <asm/naca.h>
 #include <asm/uaccess.h>
 #include <asm/machdep.h>
 #include <asm/io.h>
@@ -323,7 +322,7 @@
 /* Special print used by PPCDBG() macro */
 void udbg_ppcdbg(unsigned long debug_flags, const char *fmt, ...)
 {
-	unsigned long active_debugs = debug_flags & naca->debug_switch;
+	unsigned long active_debugs = debug_flags & ppc64_debug_switch;
 
 	if (active_debugs) {
 		va_list ap;
@@ -357,5 +356,5 @@
 
 unsigned long udbg_ifdebug(unsigned long flags)
 {
-	return (flags & naca->debug_switch);
+	return (flags & ppc64_debug_switch);
 }
diff -Nru a/arch/ppc64/kernel/vio.c b/arch/ppc64/kernel/vio.c
--- a/arch/ppc64/kernel/vio.c	2005-01-10 20:11:17 -08:00
+++ b/arch/ppc64/kernel/vio.c	2005-01-10 20:11:17 -08:00
@@ -158,6 +158,7 @@
 	struct iommu_table *t;
 	struct iommu_table_cb cb;
 	unsigned long cbp;
+	unsigned long itc_entries;
 
 	cb.itc_busno = 255;    /* Bus 255 is the virtual bus */
 	cb.itc_virtbus = 0xff; /* Ask for virtual bus */
@@ -165,12 +166,12 @@
 	cbp = virt_to_abs(&cb);
 	HvCallXm_getTceTableParms(cbp);
 
-	veth_iommu_table.it_size        = cb.itc_size / 2;
+	itc_entries = cb.itc_size * PAGE_SIZE / sizeof(union tce_entry);
+	veth_iommu_table.it_size        = itc_entries / 2;
 	veth_iommu_table.it_busno       = cb.itc_busno;
 	veth_iommu_table.it_offset      = cb.itc_offset;
 	veth_iommu_table.it_index       = cb.itc_index;
 	veth_iommu_table.it_type        = TCE_VB;
-	veth_iommu_table.it_entrysize	= sizeof(union tce_entry);
 	veth_iommu_table.it_blocksize	= 1;
 
 	t = iommu_init_table(&veth_iommu_table);
@@ -178,13 +179,12 @@
 	if (!t)
 		printk("Virtual Bus VETH TCE table failed.\n");
 
-	vio_iommu_table.it_size         = cb.itc_size - veth_iommu_table.it_size;
+	vio_iommu_table.it_size         = itc_entries - veth_iommu_table.it_size;
 	vio_iommu_table.it_busno        = cb.itc_busno;
 	vio_iommu_table.it_offset       = cb.itc_offset +
-		veth_iommu_table.it_size * (PAGE_SIZE/sizeof(union tce_entry));
+					  veth_iommu_table.it_size;
 	vio_iommu_table.it_index        = cb.itc_index;
 	vio_iommu_table.it_type         = TCE_VB;
-	vio_iommu_table.it_entrysize	= sizeof(union tce_entry);
 	vio_iommu_table.it_blocksize	= 1;
 
 	t = iommu_init_table(&vio_iommu_table);
@@ -511,7 +511,6 @@
 	unsigned int *dma_window;
 	struct iommu_table *newTceTable;
 	unsigned long offset;
-	unsigned long size;
 	int dma_window_property_size;
 
 	dma_window = (unsigned int *) get_property(dev->dev.platform_data, "ibm,my-dma-window", &dma_window_property_size);
@@ -521,21 +520,18 @@
 
 	newTceTable = (struct iommu_table *) kmalloc(sizeof(struct iommu_table), GFP_KERNEL);
 
-	size = ((dma_window[4] >> PAGE_SHIFT) << 3) >> PAGE_SHIFT;
-
 	/*  There should be some code to extract the phys-encoded offset
 		using prom_n_addr_cells(). However, according to a comment
 		on earlier versions, it's always zero, so we don't bother */
 	offset = dma_window[1] >>  PAGE_SHIFT;
 
-	/* TCE table size - measured in units of pages of tce table */
-	newTceTable->it_size		= size;
+	/* TCE table size - measured in tce entries */
+	newTceTable->it_size		= dma_window[4] >> PAGE_SHIFT;
 	/* offset for VIO should always be 0 */
 	newTceTable->it_offset		= offset;
 	newTceTable->it_busno		= 0;
 	newTceTable->it_index		= (unsigned long)dma_window[0];
 	newTceTable->it_type		= TCE_VB;
-	newTceTable->it_entrysize	= sizeof(union tce_entry);
 
 	return iommu_init_table(newTceTable);
 }
diff -Nru a/arch/ppc64/kernel/xics.c b/arch/ppc64/kernel/xics.c
--- a/arch/ppc64/kernel/xics.c	2005-01-10 20:11:19 -08:00
+++ b/arch/ppc64/kernel/xics.c	2005-01-10 20:11:19 -08:00
@@ -24,7 +24,6 @@
 #include <asm/io.h>
 #include <asm/pgtable.h>
 #include <asm/smp.h>
-#include <asm/naca.h>
 #include <asm/rtas.h>
 #include <asm/xics.h>
 #include <asm/hvcall.h>
@@ -575,7 +574,7 @@
  */
 static int __init xics_setup_i8259(void)
 {
-	if (naca->interrupt_controller == IC_PPC_XIC &&
+	if (ppc64_interrupt_controller == IC_PPC_XIC &&
 	    xics_irq_8259_cascade != -1) {
 		if (request_irq(irq_offset_up(xics_irq_8259_cascade),
 				no_action, 0, "8259 cascade", NULL))
diff -Nru a/arch/ppc64/lib/Makefile b/arch/ppc64/lib/Makefile
--- a/arch/ppc64/lib/Makefile	2005-01-10 20:11:23 -08:00
+++ b/arch/ppc64/lib/Makefile	2005-01-10 20:11:23 -08:00
@@ -15,4 +15,4 @@
 obj-$(CONFIG_PCI)	+= e2a.o
 endif
 
-lib-$(CONFIG_XMON) += sstep.o
+lib-$(CONFIG_DEBUG_KERNEL) += sstep.o
diff -Nru a/arch/ppc64/lib/locks.c b/arch/ppc64/lib/locks.c
--- a/arch/ppc64/lib/locks.c	2005-01-10 20:11:20 -08:00
+++ b/arch/ppc64/lib/locks.c	2005-01-10 20:11:20 -08:00
@@ -34,7 +34,7 @@
 	holder_cpu = lock_value & 0xffff;
 	BUG_ON(holder_cpu >= NR_CPUS);
 	holder_paca = &paca[holder_cpu];
-	yield_count = holder_paca->lppaca.xYieldCount;
+	yield_count = holder_paca->lppaca.yield_count;
 	if ((yield_count & 1) == 0)
 		return;		/* virtual cpu is currently running */
 	rmb();
@@ -66,7 +66,7 @@
 	holder_cpu = lock_value & 0xffff;
 	BUG_ON(holder_cpu >= NR_CPUS);
 	holder_paca = &paca[holder_cpu];
-	yield_count = holder_paca->lppaca.xYieldCount;
+	yield_count = holder_paca->lppaca.yield_count;
 	if ((yield_count & 1) == 0)
 		return;		/* virtual cpu is currently running */
 	rmb();
diff -Nru a/arch/ppc64/lib/sstep.c b/arch/ppc64/lib/sstep.c
--- a/arch/ppc64/lib/sstep.c	2005-01-10 20:11:22 -08:00
+++ b/arch/ppc64/lib/sstep.c	2005-01-10 20:11:22 -08:00
@@ -13,7 +13,7 @@
 #include <asm/sstep.h>
 #include <asm/processor.h>
 
-extern char SystemCall_common[];
+extern char system_call_common[];
 
 /* Bits in SRR1 that are copied from MSR */
 #define MSR_MASK	0xffffffff87c0ffff
@@ -76,7 +76,7 @@
 		regs->gpr[11] = regs->nip + 4;
 		regs->gpr[12] = regs->msr & MSR_MASK;
 		regs->gpr[13] = (unsigned long) get_paca();
-		regs->nip = (unsigned long) &SystemCall_common;
+		regs->nip = (unsigned long) &system_call_common;
 		regs->msr = MSR_KERNEL;
 		return 1;
 	case 18:	/* b */
diff -Nru a/arch/ppc64/mm/fault.c b/arch/ppc64/mm/fault.c
--- a/arch/ppc64/mm/fault.c	2005-01-10 20:11:21 -08:00
+++ b/arch/ppc64/mm/fault.c	2005-01-10 20:11:21 -08:00
@@ -36,6 +36,7 @@
 #include <asm/mmu_context.h>
 #include <asm/system.h>
 #include <asm/uaccess.h>
+#include <asm/kdebug.h>
 
 /*
  * Check whether the instruction at regs->nip is a store using
@@ -95,6 +96,10 @@
 
 	BUG_ON((trap == 0x380) || (trap == 0x480));
 
+	if (notify_die(DIE_PAGE_FAULT, "page_fault", regs, error_code,
+				11, SIGSEGV) == NOTIFY_STOP)
+		return 0;
+
 	if (trap == 0x300) {
 		if (debugger_fault_handler(regs))
 			return 0;
@@ -105,6 +110,9 @@
 		return SIGSEGV;
 
 	if (error_code & 0x00400000) {
+		if (notify_die(DIE_DABR_MATCH, "dabr_match", regs, error_code,
+					11, SIGSEGV) == NOTIFY_STOP)
+			return 0;
 		if (debugger_dabr_match(regs))
 			return 0;
 	}
diff -Nru a/arch/ppc64/mm/hash_low.S b/arch/ppc64/mm/hash_low.S
--- a/arch/ppc64/mm/hash_low.S	2005-01-10 20:11:22 -08:00
+++ b/arch/ppc64/mm/hash_low.S	2005-01-10 20:11:22 -08:00
@@ -139,8 +139,8 @@
 	std	r3,STK_PARM(r4)(r1)
 
 	/* Get htab_hash_mask */
-	ld	r4,htab_data@got(2)
-	ld	r27,16(r4)	/* htab_data.htab_hash_mask -> r27 */
+	ld	r4,htab_hash_mask@got(2)
+	ld	r27,0(r4)	/* htab_hash_mask -> r27 */
 
 	/* Check if we may already be in the hashtable, in this case, we
 	 * go to out-of-line code to try to modify the HPTE
diff -Nru a/arch/ppc64/mm/hash_native.c b/arch/ppc64/mm/hash_native.c
--- a/arch/ppc64/mm/hash_native.c	2005-01-10 20:11:18 -08:00
+++ b/arch/ppc64/mm/hash_native.c	2005-01-10 20:11:18 -08:00
@@ -52,7 +52,7 @@
 			unsigned long hpteflags, int bolted, int large)
 {
 	unsigned long arpn = physRpn_to_absRpn(prpn);
-	HPTE *hptep = htab_data.htab + hpte_group;
+	HPTE *hptep = htab_address + hpte_group;
 	Hpte_dword0 dw0;
 	HPTE lhpte;
 	int i;
@@ -117,7 +117,7 @@
 	slot_offset = mftb() & 0x7;
 
 	for (i = 0; i < HPTES_PER_GROUP; i++) {
-		hptep = htab_data.htab + hpte_group + slot_offset;
+		hptep = htab_address + hpte_group + slot_offset;
 		dw0 = hptep->dw0.dw0;
 
 		if (dw0.v && !dw0.bolted) {
@@ -172,9 +172,9 @@
 	hash = hpt_hash(vpn, 0);
 
 	for (j = 0; j < 2; j++) {
-		slot = (hash & htab_data.htab_hash_mask) * HPTES_PER_GROUP;
+		slot = (hash & htab_hash_mask) * HPTES_PER_GROUP;
 		for (i = 0; i < HPTES_PER_GROUP; i++) {
-			hptep = htab_data.htab + slot;
+			hptep = htab_address + slot;
 			dw0 = hptep->dw0.dw0;
 
 			if ((dw0.avpn == (vpn >> 11)) && dw0.v &&
@@ -195,7 +195,7 @@
 static long native_hpte_updatepp(unsigned long slot, unsigned long newpp,
 				 unsigned long va, int large, int local)
 {
-	HPTE *hptep = htab_data.htab + slot;
+	HPTE *hptep = htab_address + slot;
 	Hpte_dword0 dw0;
 	unsigned long avpn = va >> 23;
 	int ret = 0;
@@ -242,7 +242,7 @@
  */
 static void native_hpte_updateboltedpp(unsigned long newpp, unsigned long ea)
 {
-	unsigned long vsid, va, vpn, flags;
+	unsigned long vsid, va, vpn, flags = 0;
 	long slot;
 	HPTE *hptep;
 	int lock_tlbie = !(cur_cpu_spec->cpu_features & CPU_FTR_LOCKLESS_TLBIE);
@@ -254,7 +254,7 @@
 	slot = native_hpte_find(vpn);
 	if (slot == -1)
 		panic("could not find page to bolt\n");
-	hptep = htab_data.htab + slot;
+	hptep = htab_address + slot;
 
 	set_pp_bit(newpp, hptep);
 
@@ -269,7 +269,7 @@
 static void native_hpte_invalidate(unsigned long slot, unsigned long va,
 				    int large, int local)
 {
-	HPTE *hptep = htab_data.htab + slot;
+	HPTE *hptep = htab_address + slot;
 	Hpte_dword0 dw0;
 	unsigned long avpn = va >> 23;
 	unsigned long flags;
@@ -336,10 +336,10 @@
 		secondary = (pte_val(batch->pte[i]) & _PAGE_SECONDARY) >> 15;
 		if (secondary)
 			hash = ~hash;
-		slot = (hash & htab_data.htab_hash_mask) * HPTES_PER_GROUP;
+		slot = (hash & htab_hash_mask) * HPTES_PER_GROUP;
 		slot += (pte_val(batch->pte[i]) & _PAGE_GROUP_IX) >> 12;
 
-		hptep = htab_data.htab + slot;
+		hptep = htab_address + slot;
 
 		avpn = va >> 23;
 		if (large)
diff -Nru a/arch/ppc64/mm/hash_utils.c b/arch/ppc64/mm/hash_utils.c
--- a/arch/ppc64/mm/hash_utils.c	2005-01-10 20:11:19 -08:00
+++ b/arch/ppc64/mm/hash_utils.c	2005-01-10 20:11:19 -08:00
@@ -41,7 +41,6 @@
 #include <asm/types.h>
 #include <asm/system.h>
 #include <asm/uaccess.h>
-#include <asm/naca.h>
 #include <asm/machdep.h>
 #include <asm/lmb.h>
 #include <asm/abs_addr.h>
@@ -75,7 +74,8 @@
 extern unsigned long dart_tablebase;
 #endif /* CONFIG_U3_DART */
 
-HTAB htab_data = {NULL, 0, 0, 0, 0};
+HPTE		*htab_address;
+unsigned long	htab_hash_mask;
 
 extern unsigned long _SDR1;
 
@@ -114,7 +114,7 @@
 
 		hash = hpt_hash(vpn, large);
 
-		hpteg = ((hash & htab_data.htab_hash_mask)*HPTES_PER_GROUP);
+		hpteg = ((hash & htab_hash_mask) * HPTES_PER_GROUP);
 
 #ifdef CONFIG_PPC_PSERIES
 		if (systemcfg->platform & PLATFORM_LPAR)
@@ -147,7 +147,7 @@
 	 * Calculate the required size of the htab.  We want the number of
 	 * PTEGs to equal one half the number of real pages.
 	 */ 
-	htab_size_bytes = 1UL << naca->pftSize;
+	htab_size_bytes = 1UL << ppc64_pft_size;
 	pteg_count = htab_size_bytes >> 7;
 
 	/* For debug, make the HTAB 1/8 as big as it normally would be. */
@@ -156,12 +156,11 @@
 		htab_size_bytes = pteg_count << 7;
 	}
 
-	htab_data.htab_num_ptegs = pteg_count;
-	htab_data.htab_hash_mask = pteg_count - 1;
+	htab_hash_mask = pteg_count - 1;
 
 	if (systemcfg->platform & PLATFORM_LPAR) {
 		/* Using a hypervisor which owns the htab */
-		htab_data.htab = NULL;
+		htab_address = NULL;
 		_SDR1 = 0; 
 	} else {
 		/* Find storage for the HPT.  Must be contiguous in
@@ -176,7 +175,7 @@
 			ppc64_terminate_msg(0x20, "hpt space");
 			loop_forever();
 		}
-		htab_data.htab = abs_to_virt(table);
+		htab_address = abs_to_virt(table);
 
 		/* htab absolute addr + encoded htabsize */
 		_SDR1 = table + __ilog2(pteg_count) - 11;
@@ -357,7 +356,7 @@
 	secondary = (pte_val(pte) & _PAGE_SECONDARY) >> 15;
 	if (secondary)
 		hash = ~hash;
-	slot = (hash & htab_data.htab_hash_mask) * HPTES_PER_GROUP;
+	slot = (hash & htab_hash_mask) * HPTES_PER_GROUP;
 	slot += (pte_val(pte) & _PAGE_GROUP_IX) >> 12;
 
 	ppc_md.hpte_invalidate(slot, va, huge, local);
diff -Nru a/arch/ppc64/mm/hugetlbpage.c b/arch/ppc64/mm/hugetlbpage.c
--- a/arch/ppc64/mm/hugetlbpage.c	2005-01-10 20:11:19 -08:00
+++ b/arch/ppc64/mm/hugetlbpage.c	2005-01-10 20:11:19 -08:00
@@ -745,7 +745,7 @@
 
 	pgdir = mm->context.huge_pgdir;
 	if (! pgdir)
-		return;
+		goto out;
 
 	mm->context.huge_pgdir = NULL;
 
@@ -768,6 +768,7 @@
 	BUG_ON(memcmp(pgdir, empty_zero_page, PAGE_SIZE));
 	kmem_cache_free(zero_cache, pgdir);
 
+ out:
 	spin_unlock(&mm->page_table_lock);
 }
 
@@ -832,7 +833,7 @@
 		hash = hpt_hash(vpn, 1);
 		if (pte_val(old_pte) & _PAGE_SECONDARY)
 			hash = ~hash;
-		slot = (hash & htab_data.htab_hash_mask) * HPTES_PER_GROUP;
+		slot = (hash & htab_hash_mask) * HPTES_PER_GROUP;
 		slot += (pte_val(old_pte) & _PAGE_GROUP_IX) >> 12;
 
 		if (ppc_md.hpte_updatepp(slot, hpteflags, va, 1, local) == -1)
@@ -846,7 +847,7 @@
 		prpn = pte_pfn(old_pte);
 
 repeat:
-		hpte_group = ((hash & htab_data.htab_hash_mask) *
+		hpte_group = ((hash & htab_hash_mask) *
 			      HPTES_PER_GROUP) & ~0x7UL;
 
 		/* Update the linux pte with the HPTE slot */
@@ -863,13 +864,13 @@
 		/* Primary is full, try the secondary */
 		if (unlikely(slot == -1)) {
 			pte_val(new_pte) |= _PAGE_SECONDARY;
-			hpte_group = ((~hash & htab_data.htab_hash_mask) *
+			hpte_group = ((~hash & htab_hash_mask) *
 				      HPTES_PER_GROUP) & ~0x7UL; 
 			slot = ppc_md.hpte_insert(hpte_group, va, prpn,
 						  1, hpteflags, 0, 1);
 			if (slot == -1) {
 				if (mftb() & 0x1)
-					hpte_group = ((hash & htab_data.htab_hash_mask) * HPTES_PER_GROUP) & ~0x7UL;
+					hpte_group = ((hash & htab_hash_mask) * HPTES_PER_GROUP) & ~0x7UL;
 
 				ppc_md.hpte_remove(hpte_group);
 				goto repeat;
diff -Nru a/arch/ppc64/mm/init.c b/arch/ppc64/mm/init.c
--- a/arch/ppc64/mm/init.c	2005-01-10 20:11:19 -08:00
+++ b/arch/ppc64/mm/init.c	2005-01-10 20:11:19 -08:00
@@ -52,7 +52,6 @@
 #include <asm/smp.h>
 #include <asm/machdep.h>
 #include <asm/tlb.h>
-#include <asm/naca.h>
 #include <asm/eeh.h>
 #include <asm/processor.h>
 #include <asm/mmzone.h>
@@ -169,7 +168,7 @@
 
 		hash = hpt_hash(vpn, 0);
 
-		hpteg = ((hash & htab_data.htab_hash_mask)*HPTES_PER_GROUP);
+		hpteg = ((hash & htab_hash_mask) * HPTES_PER_GROUP);
 
 		/* Panic if a pte grpup is full */
 		if (ppc_md.hpte_insert(hpteg, va, pa >> PAGE_SHIFT, 0,
@@ -703,7 +702,7 @@
 	high_memory = (void *) __va(max_low_pfn * PAGE_SIZE);
 
 #ifdef CONFIG_DISCONTIGMEM
-        for (nid = 0; nid < numnodes; nid++) {
+        for_each_online_node(nid) {
 		if (NODE_DATA(nid)->node_spanned_pages != 0) {
 			printk("freeing bootmem node %x\n", nid);
 			totalram_pages +=
diff -Nru a/arch/ppc64/mm/numa.c b/arch/ppc64/mm/numa.c
--- a/arch/ppc64/mm/numa.c	2005-01-10 20:11:20 -08:00
+++ b/arch/ppc64/mm/numa.c	2005-01-10 20:11:20 -08:00
@@ -216,7 +216,7 @@
 
 	numa_domain = of_node_numa_domain(cpu);
 
-	if (numa_domain >= numnodes) {
+	if (numa_domain >= num_online_nodes()) {
 		/*
 		 * POWER4 LPAR uses 0xffff as invalid node,
 		 * dont warn in this case.
@@ -384,7 +384,8 @@
 			goto new_range;
 	}
 
-	numnodes = max_domain + 1;
+	for (i = 0; i <= max_domain; i++)
+		node_set_online(i);
 
 	return 0;
 }
@@ -430,12 +431,9 @@
 	if (min_common_depth == -1 || !numa_enabled)
 		return;
 
-	for (node = 0; node < MAX_NUMNODES; node++) {
+	for_each_online_node(node) {
 		unsigned long i;
 
-		if (!node_online(node))
-			continue;
-
 		printk(KERN_INFO "Node %d Memory:", node);
 
 		count = 0;
@@ -519,7 +517,7 @@
 
 	register_cpu_notifier(&ppc64_numa_nb);
 
-	for (nid = 0; nid < numnodes; nid++) {
+	for_each_online_node(nid) {
 		unsigned long start_paddr, end_paddr;
 		int i;
 		unsigned long bootmem_paddr;
@@ -619,7 +617,7 @@
 	memset(zones_size, 0, sizeof(zones_size));
 	memset(zholes_size, 0, sizeof(zholes_size));
 
-	for (nid = 0; nid < numnodes; nid++) {
+	for_each_online_node(nid) {
 		unsigned long start_pfn;
 		unsigned long end_pfn;
 
diff -Nru a/arch/ppc64/mm/slb.c b/arch/ppc64/mm/slb.c
--- a/arch/ppc64/mm/slb.c	2005-01-10 20:11:19 -08:00
+++ b/arch/ppc64/mm/slb.c	2005-01-10 20:11:19 -08:00
@@ -19,7 +19,6 @@
 #include <asm/mmu.h>
 #include <asm/mmu_context.h>
 #include <asm/paca.h>
-#include <asm/naca.h>
 #include <asm/cputable.h>
 
 extern void slb_allocate(unsigned long ea);
diff -Nru a/arch/ppc64/mm/stab.c b/arch/ppc64/mm/stab.c
--- a/arch/ppc64/mm/stab.c	2005-01-10 20:11:24 -08:00
+++ b/arch/ppc64/mm/stab.c	2005-01-10 20:11:24 -08:00
@@ -17,7 +17,6 @@
 #include <asm/mmu.h>
 #include <asm/mmu_context.h>
 #include <asm/paca.h>
-#include <asm/naca.h>
 #include <asm/cputable.h>
 
 /* Both the segment table and SLB code uses the following cache */
diff -Nru a/arch/ppc64/oprofile/common.c b/arch/ppc64/oprofile/common.c
--- a/arch/ppc64/oprofile/common.c	2005-01-10 20:11:23 -08:00
+++ b/arch/ppc64/oprofile/common.c	2005-01-10 20:11:23 -08:00
@@ -125,16 +125,7 @@
 	return 0;
 }
 
-static struct oprofile_operations oprof_ppc64_ops = {
-	.create_files	= op_ppc64_create_files,
-	.setup		= op_ppc64_setup,
-	.shutdown	= op_ppc64_shutdown,
-	.start		= op_ppc64_start,
-	.stop		= op_ppc64_stop,
-	.cpu_type	= NULL		/* To be filled in below. */
-};
-
-int __init oprofile_arch_init(struct oprofile_operations **ops)
+void __init oprofile_arch_init(struct oprofile_operations *ops)
 {
 	unsigned int pvr;
 
@@ -145,7 +136,7 @@
 		case PV_630p:
 			model = &op_model_rs64;
 			model->num_counters = 8;
-			oprof_ppc64_ops.cpu_type = "ppc64/power3";
+			ops->cpu_type = "ppc64/power3";
 			break;
 
 		case PV_NORTHSTAR:
@@ -154,40 +145,42 @@
 		case PV_SSTAR:
 			model = &op_model_rs64;
 			model->num_counters = 8;
-			oprof_ppc64_ops.cpu_type = "ppc64/rs64";
+			ops->cpu_type = "ppc64/rs64";
 			break;
 
 		case PV_POWER4:
 		case PV_POWER4p:
 			model = &op_model_power4;
 			model->num_counters = 8;
-			oprof_ppc64_ops.cpu_type = "ppc64/power4";
+			ops->cpu_type = "ppc64/power4";
 			break;
 
 		case PV_970:
 		case PV_970FX:
 			model = &op_model_power4;
 			model->num_counters = 8;
-			oprof_ppc64_ops.cpu_type = "ppc64/970";
+			ops->cpu_type = "ppc64/970";
 			break;
 
 		case PV_POWER5:
 		case PV_POWER5p:
 			model = &op_model_power4;
 			model->num_counters = 6;
-			oprof_ppc64_ops.cpu_type = "ppc64/power5";
+			ops->cpu_type = "ppc64/power5";
 			break;
 
 		default:
-			return -ENODEV;
+			return;
 	}
 
-	*ops = &oprof_ppc64_ops;
+	ops->create_files = op_ppc64_create_files;
+	ops->setup = op_ppc64_setup;
+	ops->shutdown = op_ppc64_shutdown;
+	ops->start = op_ppc64_start;
+	ops->stop = op_ppc64_stop;
 
 	printk(KERN_INFO "oprofile: using %s performance monitoring.\n",
-	       oprof_ppc64_ops.cpu_type);
-
-	return 0;
+	       ops->cpu_type);
 }
 
 void oprofile_arch_exit(void)
diff -Nru a/arch/ppc64/oprofile/op_impl.h b/arch/ppc64/oprofile/op_impl.h
--- a/arch/ppc64/oprofile/op_impl.h	2005-01-10 20:11:19 -08:00
+++ b/arch/ppc64/oprofile/op_impl.h	2005-01-10 20:11:19 -08:00
@@ -14,44 +14,6 @@
 
 #define OP_MAX_COUNTER 8
 
-#define MSR_PMM		(1UL << (63 - 61))
-
-/* freeze counters. set to 1 on a perfmon exception */
-#define MMCR0_FC	(1UL << (31 - 0))
-
-/* freeze in supervisor state */
-#define MMCR0_KERNEL_DISABLE (1UL << (31 - 1))
-
-/* freeze in problem state */
-#define MMCR0_PROBLEM_DISABLE (1UL << (31 - 2))
-
-/* freeze counters while MSR mark = 1 */
-#define MMCR0_FCM1	(1UL << (31 - 3))
-
-/* performance monitor exception enable */
-#define MMCR0_PMXE	(1UL << (31 - 5))
-
-/* freeze counters on enabled condition or event */
-#define MMCR0_FCECE	(1UL << (31 - 6))
-
-/* PMC1 count enable*/
-#define MMCR0_PMC1INTCONTROL	(1UL << (31 - 16))
-
-/* PMCn count enable*/
-#define MMCR0_PMCNINTCONTROL	(1UL << (31 - 17))
-
-/* performance monitor alert has occurred, set to 0 after handling exception */
-#define MMCR0_PMAO	(1UL << (31 - 24))
-
-/* state of MSR HV when SIAR set */
-#define MMCRA_SIHV	(1UL << (63 - 35))
-
-/* state of MSR PR when SIAR set */
-#define MMCRA_SIPR	(1UL << (63 - 36))
-
-/* enable sampling */
-#define MMCRA_SAMPLE_ENABLE	(1UL << (63 - 63))
-
 /* Per-counter configuration as set via oprofilefs.  */
 struct op_counter_config {
 	unsigned long valid;
diff -Nru a/arch/ppc64/oprofile/op_model_power4.c b/arch/ppc64/oprofile/op_model_power4.c
--- a/arch/ppc64/oprofile/op_model_power4.c	2005-01-10 20:11:21 -08:00
+++ b/arch/ppc64/oprofile/op_model_power4.c	2005-01-10 20:11:21 -08:00
@@ -264,7 +264,6 @@
 	int is_kernel;
 	int val;
 	int i;
-	unsigned int cpu = smp_processor_id();
 	unsigned int mmcr0;
 
 	pc = get_pc(regs);
@@ -277,7 +276,7 @@
 		val = ctr_read(i);
 		if (val < 0) {
 			if (oprofile_running && ctr[i].enabled) {
-				oprofile_add_sample(pc, is_kernel, i, cpu);
+				oprofile_add_pc(pc, is_kernel, i);
 				ctr_write(i, reset_value[i]);
 			} else {
 				ctr_write(i, 0);
diff -Nru a/arch/ppc64/oprofile/op_model_rs64.c b/arch/ppc64/oprofile/op_model_rs64.c
--- a/arch/ppc64/oprofile/op_model_rs64.c	2005-01-10 20:11:22 -08:00
+++ b/arch/ppc64/oprofile/op_model_rs64.c	2005-01-10 20:11:22 -08:00
@@ -180,7 +180,6 @@
 	int i;
 	unsigned long pc = mfspr(SPRN_SIAR);
 	int is_kernel = (pc >= KERNELBASE);
-	unsigned int cpu = smp_processor_id();
 
 	/* set the PMM bit (see comment below) */
 	mtmsrd(mfmsr() | MSR_PMM);
@@ -189,7 +188,7 @@
 		val = ctr_read(i);
 		if (val < 0) {
 			if (ctr[i].enabled) {
-				oprofile_add_sample(pc, is_kernel, i, cpu);
+				oprofile_add_pc(pc, is_kernel, i);
 				ctr_write(i, reset_value[i]);
 			} else {
 				ctr_write(i, 0);
diff -Nru a/arch/ppc64/xmon/start.c b/arch/ppc64/xmon/start.c
--- a/arch/ppc64/xmon/start.c	2005-01-10 20:11:23 -08:00
+++ b/arch/ppc64/xmon/start.c	2005-01-10 20:11:23 -08:00
@@ -40,7 +40,7 @@
 
 static int __init setup_xmon_sysrq(void)
 {
-	__sysrq_put_key_op('x', &sysrq_xmon_op);
+	register_sysrq_key('x', &sysrq_xmon_op);
 	return 0;
 }
 __initcall(setup_xmon_sysrq);
diff -Nru a/arch/ppc64/xmon/xmon.c b/arch/ppc64/xmon/xmon.c
--- a/arch/ppc64/xmon/xmon.c	2005-01-10 20:11:22 -08:00
+++ b/arch/ppc64/xmon/xmon.c	2005-01-10 20:11:22 -08:00
@@ -26,7 +26,6 @@
 #include <asm/pgtable.h>
 #include <asm/mmu.h>
 #include <asm/mmu_context.h>
-#include <asm/naca.h>
 #include <asm/paca.h>
 #include <asm/ppcdebug.h>
 #include <asm/cputable.h>
@@ -50,6 +49,7 @@
 
 static unsigned long adrs;
 static int size = 1;
+#define MAX_DUMP (128 * 1024)
 static unsigned long ndump = 64;
 static unsigned long nidump = 16;
 static unsigned long ncsum = 4096;
@@ -146,8 +146,6 @@
 extern void longjmp(long *, int);
 extern unsigned long _ASR;
 
-pte_t *find_linux_pte(pgd_t *pgdir, unsigned long va);	/* from htab.c */
-
 #define GETWORD(v)	(((v)[0] << 24) + ((v)[1] << 16) + ((v)[2] << 8) + (v)[3])
 
 #define isxdigit(c)	(('0' <= (c) && (c) <= '9') \
@@ -229,17 +227,6 @@
  */
 
 /*
- * We don't allow single-stepping an mtmsrd that would clear
- * MSR_RI, since that would make the exception unrecoverable.
- * Since we need to single-step to proceed from a breakpoint,
- * we don't allow putting a breakpoint on an mtmsrd instruction.
- * Similarly we don't allow breakpoints on rfid instructions.
- * These macros tell us if an instruction is a mtmsrd or rfid.
- */
-#define IS_MTMSRD(instr)	(((instr) & 0xfc0007fe) == 0x7c000164)
-#define IS_RFID(instr)		(((instr) & 0xfc0007fe) == 0x4c000024)
-
-/*
  * Disable surveillance (the service processor watchdog function)
  * while we are in xmon.
  * XXX we should re-enable it when we leave. :)
@@ -1455,7 +1442,17 @@
 	store_inst(instrs+1);
 	code = (unsigned long (*)(void)) opd;
 
-	ret = code();
+	if (setjmp(bus_error_jmp) == 0) {
+		catch_memory_errors = 1;
+		sync();
+
+		ret = code();
+
+		sync();
+		/* wait a little while to see if we get a machine check */
+		__delay(200);
+		n = size;
+	}
 
 	return ret;
 }
@@ -1476,7 +1473,17 @@
 	store_inst(instrs+1);
 	code = (unsigned long (*)(unsigned long)) opd;
 
-	code(val);
+	if (setjmp(bus_error_jmp) == 0) {
+		catch_memory_errors = 1;
+		sync();
+
+		code(val);
+
+		sync();
+		/* wait a little while to see if we get a machine check */
+		__delay(200);
+		n = size;
+	}
 }
 
 static unsigned long regno;
@@ -1490,7 +1497,7 @@
 	unsigned long val;
 #ifdef CONFIG_PPC_ISERIES
 	struct paca_struct *ptrPaca = NULL;
-	struct ItLpPaca *ptrLpPaca = NULL;
+	struct lppaca *ptrLpPaca = NULL;
 	struct ItLpRegSave *ptrLpRegSave = NULL;
 #endif
 
@@ -1514,10 +1521,10 @@
 		printf("  Local Processor Control Area (LpPaca): \n");
 		ptrLpPaca = ptrPaca->lppaca_ptr;
 		printf("    Saved Srr0=%.16lx  Saved Srr1=%.16lx \n",
-		       ptrLpPaca->xSavedSrr0, ptrLpPaca->xSavedSrr1);
+		       ptrLpPaca->saved_srr0, ptrLpPaca->saved_srr1);
 		printf("    Saved Gpr3=%.16lx  Saved Gpr4=%.16lx \n",
-		       ptrLpPaca->xSavedGpr3, ptrLpPaca->xSavedGpr4);
-		printf("    Saved Gpr5=%.16lx \n", ptrLpPaca->xSavedGpr5);
+		       ptrLpPaca->saved_gpr3, ptrLpPaca->saved_gpr4);
+		printf("    Saved Gpr5=%.16lx \n", ptrLpPaca->saved_gpr5);
     
 		printf("  Local Processor Register Save Area (LpRegSave): \n");
 		ptrLpRegSave = ptrPaca->reg_save_ptr;
@@ -1895,18 +1902,22 @@
 	if ((isxdigit(c) && c != 'f' && c != 'd') || c == '\n')
 		termch = c;
 	scanhex((void *)&adrs);
-	if( termch != '\n')
+	if (termch != '\n')
 		termch = 0;
-	if( c == 'i' ){
+	if (c == 'i') {
 		scanhex(&nidump);
-		if( nidump == 0 )
+		if (nidump == 0)
 			nidump = 16;
+		else if (nidump > MAX_DUMP)
+			nidump = MAX_DUMP;
 		adrs += ppc_inst_dump(adrs, nidump, 1);
 		last_cmd = "di\n";
 	} else {
 		scanhex(&ndump);
-		if( ndump == 0 )
+		if (ndump == 0)
 			ndump = 64;
+		else if (ndump > MAX_DUMP)
+			ndump = MAX_DUMP;
 		prdump(adrs, ndump);
 		adrs += ndump;
 		last_cmd = "d\n";
@@ -2360,9 +2371,9 @@
 	if (cmd == '\n') {
 		/* show current state */
 		unsigned long i;
-		printf("naca->debug_switch = 0x%lx\n", naca->debug_switch);
+		printf("ppc64_debug_switch = 0x%lx\n", ppc64_debug_switch);
 		for (i = 0; i < PPCDBG_NUM_FLAGS ;i++) {
-			on = PPCDBG_BITVAL(i) & naca->debug_switch;
+			on = PPCDBG_BITVAL(i) & ppc64_debug_switch;
 			printf("%02x %s %12s   ", i, on ? "on " : "off",  trace_names[i] ? trace_names[i] : "");
 			if (((i+1) % 3) == 0)
 				printf("\n");
@@ -2376,7 +2387,7 @@
 			on = (cmd == '+');
 			cmd = inchar();
 			if (cmd == ' ' || cmd == '\n') {  /* Turn on or off based on + or - */
-				naca->debug_switch = on ? PPCDBG_ALL:PPCDBG_NONE;
+				ppc64_debug_switch = on ? PPCDBG_ALL:PPCDBG_NONE;
 				printf("Setting all values to %s...\n", on ? "on" : "off");
 				if (cmd == '\n') return;
 				else cmd = skipbl(); 
@@ -2391,10 +2402,10 @@
 			return;
 		}
 		if (on) {
-			naca->debug_switch |= PPCDBG_BITVAL(val);
+			ppc64_debug_switch |= PPCDBG_BITVAL(val);
 			printf("enable debug %x %s\n", val, trace_names[val] ? trace_names[val] : "");
 		} else {
-			naca->debug_switch &= ~PPCDBG_BITVAL(val);
+			ppc64_debug_switch &= ~PPCDBG_BITVAL(val);
 			printf("disable debug %x %s\n", val, trace_names[val] ? trace_names[val] : "");
 		}
 		cmd = skipbl();
diff -Nru a/arch/s390/Kconfig b/arch/s390/Kconfig
--- a/arch/s390/Kconfig	2005-01-10 20:11:18 -08:00
+++ b/arch/s390/Kconfig	2005-01-10 20:11:18 -08:00
@@ -14,6 +14,10 @@
 	bool
 	default y
 
+config GENERIC_CALIBRATE_DELAY
+	bool
+	default y
+
 config GENERIC_BUST_SPINLOCK
 	bool
 
@@ -81,7 +85,8 @@
 
 config HOTPLUG_CPU
 	bool "Support for hot-pluggable CPUs (EXPERIMENTAL)"
-	depends on SMP && HOTPLUG && EXPERIMENTAL
+	depends on SMP && EXPERIMENTAL
+	select HOTPLUG
 	default n
 	help
 	  Say Y here to experiment with turning CPUs off and on.  CPUs
diff -Nru a/arch/s390/defconfig b/arch/s390/defconfig
--- a/arch/s390/defconfig	2005-01-10 20:11:22 -08:00
+++ b/arch/s390/defconfig	2005-01-10 20:11:22 -08:00
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.10-rc2
-# Tue Nov 30 14:00:30 2004
+# Linux kernel version: 2.6.10
+# Mon Dec 27 11:03:23 2004
 #
 CONFIG_MMU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
@@ -158,6 +158,7 @@
 # CONFIG_BLK_DEV_CRYPTOLOOP is not set
 CONFIG_BLK_DEV_NBD=m
 CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=4096
 CONFIG_BLK_DEV_INITRD=y
 CONFIG_INITRAMFS_SOURCE=""
@@ -565,6 +566,10 @@
 # CONFIG_CRYPTO_MICHAEL_MIC is not set
 # CONFIG_CRYPTO_CRC32C is not set
 # CONFIG_CRYPTO_TEST is not set
+
+#
+# Hardware crypto devices
+#
 
 #
 # Library routines
diff -Nru a/arch/s390/kernel/Makefile b/arch/s390/kernel/Makefile
--- a/arch/s390/kernel/Makefile	2005-01-10 20:11:22 -08:00
+++ b/arch/s390/kernel/Makefile	2005-01-10 20:11:22 -08:00
@@ -17,7 +17,7 @@
 
 obj-$(CONFIG_S390_SUPPORT)	+= compat_linux.o compat_signal.o \
 					compat_ioctl.o compat_wrapper.o \
-					compat_exec.o compat_exec_domain.o
+					compat_exec_domain.o
 obj-$(CONFIG_BINFMT_ELF32)	+= binfmt_elf32.o
 
 obj-$(CONFIG_ARCH_S390_31)	+= entry.o reipl.o
diff -Nru a/arch/s390/kernel/binfmt_elf32.c b/arch/s390/kernel/binfmt_elf32.c
--- a/arch/s390/kernel/binfmt_elf32.c	2005-01-10 20:11:22 -08:00
+++ b/arch/s390/kernel/binfmt_elf32.c	2005-01-10 20:11:22 -08:00
@@ -140,8 +140,6 @@
 #include <linux/binfmts.h>
 #include <linux/compat.h>
 
-int setup_arg_pages32(struct linux_binprm *bprm, int executable_stack);
-
 #define elf_prstatus elf_prstatus32
 struct elf_prstatus32
 {
@@ -191,7 +189,6 @@
 
 #undef start_thread
 #define start_thread                    start_thread31 
-#define setup_arg_pages(bprm, exec)     setup_arg_pages32(bprm, exec)
 
 MODULE_DESCRIPTION("Binary format loader for compatibility with 32bit Linux for S390 binaries,"
                    " Copyright 2000 IBM Corporation"); 
diff -Nru a/arch/s390/kernel/compat_exec.c b/arch/s390/kernel/compat_exec.c
--- a/arch/s390/kernel/compat_exec.c	2005-01-10 20:11:22 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,92 +0,0 @@
-/*
- * Support for 32-bit Linux for S390 ELF binaries.
- *
- * Copyright (C) 2000 IBM Deutschland Entwicklung GmbH, IBM Corporation
- * Author(s): Gerhard Tonn (ton@de.ibm.com)
- *
- * Separated from binfmt_elf32.c to reduce exports for module enablement.
- *
- */
-
-#include <linux/config.h>
-#include <linux/slab.h>
-#include <linux/file.h>
-#include <linux/mman.h>
-#include <linux/a.out.h>
-#include <linux/stat.h>
-#include <linux/fcntl.h>
-#include <linux/smp_lock.h>
-#include <linux/init.h>
-#include <linux/pagemap.h>
-#include <linux/mm.h>
-#include <linux/highmem.h>
-#include <linux/spinlock.h>
-#include <linux/binfmts.h>
-#include <linux/module.h>
-#include <linux/security.h>
-
-#include <asm/uaccess.h>
-#include <asm/pgalloc.h>
-#include <asm/mmu_context.h>
-
-#ifdef CONFIG_KMOD
-#include <linux/kmod.h>
-#endif
-
-
-int setup_arg_pages32(struct linux_binprm *bprm, int executable_stack)
-{
-	unsigned long stack_base;
-	struct vm_area_struct *mpnt;
-	struct mm_struct *mm = current->mm;
-	int i, ret;
-
-	stack_base = STACK_TOP - MAX_ARG_PAGES*PAGE_SIZE;
-	mm->arg_start = bprm->p + stack_base;
-
-	bprm->p += stack_base;
-	if (bprm->loader)
-		bprm->loader += stack_base;
-	bprm->exec += stack_base;
-
-	mpnt = kmem_cache_alloc(vm_area_cachep, SLAB_KERNEL);
-	if (!mpnt) 
-		return -ENOMEM; 
-	
-	if (security_vm_enough_memory((STACK_TOP - (PAGE_MASK & (unsigned long) bprm->p))>>PAGE_SHIFT)) {
-		kmem_cache_free(vm_area_cachep, mpnt);
-		return -ENOMEM;
-	}
-
-	memset(mpnt, 0, sizeof(*mpnt));
-
-	down_write(&mm->mmap_sem);
-	{
-		mpnt->vm_mm = mm;
-		mpnt->vm_start = PAGE_MASK & (unsigned long) bprm->p;
-		mpnt->vm_end = STACK_TOP;
-		/* executable stack setting would be applied here */
-		mpnt->vm_page_prot = PAGE_COPY;
-		mpnt->vm_flags = VM_STACK_FLAGS;
-		if ((ret = insert_vm_struct(mm, mpnt))) {
-			up_write(&mm->mmap_sem);
-			kmem_cache_free(vm_area_cachep, mpnt);
-			return ret;
-		}
-		mm->stack_vm = mm->total_vm = vma_pages(mpnt);
-	} 
-
-	for (i = 0 ; i < MAX_ARG_PAGES ; i++) {
-		struct page *page = bprm->page[i];
-		if (page) {
-			bprm->page[i] = NULL;
-			install_arg_page(mpnt, page, stack_base);
-		}
-		stack_base += PAGE_SIZE;
-	}
-	up_write(&mm->mmap_sem);
-	
-	return 0;
-}
-
-EXPORT_SYMBOL(setup_arg_pages32);
diff -Nru a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c
--- a/arch/s390/kernel/compat_linux.c	2005-01-10 20:11:21 -08:00
+++ b/arch/s390/kernel/compat_linux.c	2005-01-10 20:11:21 -08:00
@@ -634,92 +634,8 @@
 	return ret;
 }
 
-extern int
-copy_siginfo_to_user32(siginfo_t32 *to, siginfo_t *from);
-
 asmlinkage long
-sys32_rt_sigtimedwait(compat_sigset_t *uthese, siginfo_t32 *uinfo,
-		      struct compat_timespec *uts, size_t sigsetsize)
-{
-	int ret, sig;
-	sigset_t these;
-	compat_sigset_t these32;
-	struct timespec ts;
-	siginfo_t info;
-	long timeout = 0;
-
-	/* XXX: Don't preclude handling different sized sigset_t's.  */
-	if (sigsetsize != sizeof(sigset_t))
-		return -EINVAL;
-
-	if (copy_from_user (&these32, uthese, sizeof(compat_sigset_t)))
-		return -EFAULT;
-
-	switch (_NSIG_WORDS) {
-	case 4: these.sig[3] = these32.sig[6] | (((long)these32.sig[7]) << 32);
-	case 3: these.sig[2] = these32.sig[4] | (((long)these32.sig[5]) << 32);
-	case 2: these.sig[1] = these32.sig[2] | (((long)these32.sig[3]) << 32);
-	case 1: these.sig[0] = these32.sig[0] | (((long)these32.sig[1]) << 32);
-	}
-		
-	/*
-	 * Invert the set of allowed signals to get those we
-	 * want to block.
-	 */
-	sigdelsetmask(&these, sigmask(SIGKILL)|sigmask(SIGSTOP));
-	signotset(&these);
-
-	if (uts) {
-		if (get_compat_timespec(&ts, uts))
-			return -EINVAL;
-		if (ts.tv_nsec >= 1000000000L || ts.tv_nsec < 0
-		    || ts.tv_sec < 0)
-			return -EINVAL;
-	}
-
-	spin_lock_irq(&current->sighand->siglock);
-	sig = dequeue_signal(current, &these, &info);
-	if (!sig) {
-		/* None ready -- temporarily unblock those we're interested
-		   in so that we'll be awakened when they arrive.  */
-		current->real_blocked = current->blocked;
-		sigandsets(&current->blocked, &current->blocked, &these);
-		recalc_sigpending();
-		spin_unlock_irq(&current->sighand->siglock);
-
-		timeout = MAX_SCHEDULE_TIMEOUT;
-		if (uts)
-			timeout = (timespec_to_jiffies(&ts)
-				   + (ts.tv_sec || ts.tv_nsec));
-
-		current->state = TASK_INTERRUPTIBLE;
-		timeout = schedule_timeout(timeout);
-
-		spin_lock_irq(&current->sighand->siglock);
-		sig = dequeue_signal(current, &these, &info);
-		current->blocked = current->real_blocked;
-		siginitset(&current->real_blocked, 0);
-		recalc_sigpending();
-	}
-	spin_unlock_irq(&current->sighand->siglock);
-
-	if (sig) {
-		ret = sig;
-		if (uinfo) {
-			if (copy_siginfo_to_user32(uinfo, &info))
-				ret = -EFAULT;
-		}
-	} else {
-		ret = -EAGAIN;
-		if (timeout)
-			ret = -EINTR;
-	}
-
-	return ret;
-}
-
-asmlinkage long
-sys32_rt_sigqueueinfo(int pid, int sig, siginfo_t32 __user *uinfo)
+sys32_rt_sigqueueinfo(int pid, int sig, compat_siginfo_t __user *uinfo)
 {
 	siginfo_t info;
 	int ret;
diff -Nru a/arch/s390/kernel/compat_linux.h b/arch/s390/kernel/compat_linux.h
--- a/arch/s390/kernel/compat_linux.h	2005-01-10 20:11:20 -08:00
+++ b/arch/s390/kernel/compat_linux.h	2005-01-10 20:11:20 -08:00
@@ -34,7 +34,7 @@
         __u32   sival_ptr;
 } sigval_t32;
                  
-typedef struct siginfo32 {
+typedef struct compat_siginfo {
 	int	si_signo;
 	int	si_errno;
 	int	si_code;
@@ -82,7 +82,7 @@
 			int	_fd;
 		} _sigpoll;
 	} _sifields;
-} siginfo_t32;  
+} compat_siginfo_t;
 
 /*
  * How these fields are to be accessed.
@@ -213,8 +213,5 @@
 		} _sigev_thread;
 	} _sigev_un;
 };
-
-extern int copy_siginfo_to_user32(siginfo_t32 __user *to, siginfo_t *from);
-extern int copy_siginfo_from_user32(siginfo_t *to, siginfo_t32 __user *from);
 
 #endif /* _ASM_S390X_S390_H */
diff -Nru a/arch/s390/kernel/compat_signal.c b/arch/s390/kernel/compat_signal.c
--- a/arch/s390/kernel/compat_signal.c	2005-01-10 20:11:22 -08:00
+++ b/arch/s390/kernel/compat_signal.c	2005-01-10 20:11:22 -08:00
@@ -48,17 +48,17 @@
 {
 	__u8 callee_used_stack[__SIGNAL_FRAMESIZE32];
 	__u8 retcode[S390_SYSCALL_SIZE];
-	struct siginfo32 info;
+	compat_siginfo_t info;
 	struct ucontext32 uc;
 } rt_sigframe32;
 
 asmlinkage int FASTCALL(do_signal(struct pt_regs *regs, sigset_t *oldset));
 
-int copy_siginfo_to_user32(siginfo_t32 __user *to, siginfo_t *from)
+int copy_siginfo_to_user32(compat_siginfo_t __user *to, siginfo_t *from)
 {
 	int err;
 
-	if (!access_ok (VERIFY_WRITE, to, sizeof(siginfo_t32)))
+	if (!access_ok (VERIFY_WRITE, to, sizeof(compat_siginfo_t)))
 		return -EFAULT;
 
 	/* If you change siginfo_t structure, please be sure
@@ -106,12 +106,12 @@
 	return err;
 }
 
-int copy_siginfo_from_user32(siginfo_t *to, siginfo_t32 __user *from)
+int copy_siginfo_from_user32(siginfo_t *to, compat_siginfo_t __user *from)
 {
 	int err;
 	u32 tmp;
 
-	if (!access_ok (VERIFY_READ, from, sizeof(siginfo_t32)))
+	if (!access_ok (VERIFY_READ, from, sizeof(compat_siginfo_t)))
 		return -EFAULT;
 
 	err = __get_user(to->si_signo, &from->si_signo);
diff -Nru a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S
--- a/arch/s390/kernel/compat_wrapper.S	2005-01-10 20:11:23 -08:00
+++ b/arch/s390/kernel/compat_wrapper.S	2005-01-10 20:11:23 -08:00
@@ -64,7 +64,7 @@
 	.globl  sys32_time_wrapper 
 sys32_time_wrapper:
 	llgtr	%r2,%r2			# int *
-	jg	sys_time		# branch to system call
+	jg	compat_sys_time		# branch to system call
 
 	.globl  sys32_mknod_wrapper 
 sys32_mknod_wrapper:
@@ -840,13 +840,13 @@
 	llgfr	%r3,%r3			# size_t
 	jg	sys32_rt_sigpending	# branch to system call
 
-	.globl  sys32_rt_sigtimedwait_wrapper 
-sys32_rt_sigtimedwait_wrapper:
+	.globl  compat_rt_sigtimedwait_wrapper
+compat_rt_sigtimedwait_wrapper:
 	llgtr	%r2,%r2			# const sigset_emu31_t *
 	llgtr	%r3,%r3			# siginfo_emu31_t *
 	llgtr	%r4,%r4			# const struct compat_timespec *
 	llgfr	%r5,%r5			# size_t
-	jg	sys32_rt_sigtimedwait	# branch to system call
+	jg	compat_rt_sigtimedwait	# branch to system call
 
 	.globl  sys32_rt_sigqueueinfo_wrapper 
 sys32_rt_sigqueueinfo_wrapper:
@@ -1076,8 +1076,8 @@
 
 	.globl	sys32_stime_wrapper
 sys32_stime_wrapper:
-	llgtr	%r2,%r2			# int *
-	jg	sys_stime		# branch to system call
+	llgtr	%r2,%r2			# long *
+	jg	compat_sys_stime	# branch to system call
 
 	.globl  sys32_sysctl_wrapper
 sys32_sysctl_wrapper:
diff -Nru a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c
--- a/arch/s390/kernel/process.c	2005-01-10 20:11:21 -08:00
+++ b/arch/s390/kernel/process.c	2005-01-10 20:11:21 -08:00
@@ -159,11 +159,10 @@
 #endif /* CONFIG_ARCH_S390X */
 }
 
-int cpu_idle(void)
+void cpu_idle(void)
 {
 	for (;;)
 		default_idle();
-	return 0;
 }
 
 void show_regs(struct pt_regs *regs)
diff -Nru a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c
--- a/arch/s390/kernel/ptrace.c	2005-01-10 20:11:22 -08:00
+++ b/arch/s390/kernel/ptrace.c	2005-01-10 20:11:22 -08:00
@@ -559,13 +559,13 @@
 	case PTRACE_GETSIGINFO:
 		if (child->last_siginfo == NULL)
 			return -EINVAL;
-		return copy_siginfo_to_user32((siginfo_t32 __user *) data,
+		return copy_siginfo_to_user32((compat_siginfo_t __user *) data,
 					      child->last_siginfo);
 	case PTRACE_SETSIGINFO:
 		if (child->last_siginfo == NULL)
 			return -EINVAL;
 		return copy_siginfo_from_user32(child->last_siginfo,
-						(siginfo_t32 __user *) data);
+						(compat_siginfo_t __user *) data);
 	}
 	return ptrace_request(child, request, addr, data);
 }
diff -Nru a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
--- a/arch/s390/kernel/setup.c	2005-01-10 20:11:16 -08:00
+++ b/arch/s390/kernel/setup.c	2005-01-10 20:11:16 -08:00
@@ -98,9 +98,6 @@
         clear_thread_flag(TIF_USEDFPU);
         current->used_math = 0;
 
-        /* Setup active_mm for idle_task  */
-        atomic_inc(&init_mm.mm_count);
-        current->active_mm = &init_mm;
         if (current->mm)
                 BUG();
         enter_lazy_tlb(&init_mm, current);
diff -Nru a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
--- a/arch/s390/kernel/smp.c	2005-01-10 20:11:24 -08:00
+++ b/arch/s390/kernel/smp.c	2005-01-10 20:11:24 -08:00
@@ -42,7 +42,6 @@
 #include <asm/tlbflush.h>
 
 /* prototypes */
-extern int cpu_idle(void * unused);
 
 extern volatile int __cpu_logical_map[];
 
@@ -535,7 +534,7 @@
 extern void init_cpu_timer(void);
 extern void init_cpu_vtimer(void);
 extern int pfault_init(void);
-extern int pfault_token(void);
+extern void pfault_fini(void);
 
 int __devinit start_secondary(void *cpuvoid)
 {
@@ -557,7 +556,8 @@
         /* Print info about this processor */
         print_cpu_info(&S390_lowcore.cpu_data);
         /* cpu_idle will call schedule for us */
-        return cpu_idle(NULL);
+        cpu_idle();
+        return 0;
 }
 
 static void __init smp_create_idle(unsigned int cpu)
@@ -571,6 +571,8 @@
 	p = fork_idle(cpu);
 	if (IS_ERR(p))
 		panic("failed fork for CPU %u: %li", cpu, PTR_ERR(p));
+	atomic_inc(&init_mm.mm_count);
+	p->active_mm = &init_mm;
 	current_set[cpu] = p;
 }
 
@@ -694,6 +696,11 @@
 		spin_unlock_irqrestore(&smp_reserve_lock, flags);
 		return -EBUSY;
 	}
+
+#ifdef CONFIG_PFAULT
+	/* Disable pfault pseudo page faults on this cpu. */
+	pfault_fini();
+#endif
 
 	/* disable all external interrupts */
 
diff -Nru a/arch/s390/kernel/syscalls.S b/arch/s390/kernel/syscalls.S
--- a/arch/s390/kernel/syscalls.S	2005-01-10 20:11:16 -08:00
+++ b/arch/s390/kernel/syscalls.S	2005-01-10 20:11:16 -08:00
@@ -185,7 +185,7 @@
 SYSCALL(sys_rt_sigaction,sys_rt_sigaction,sys32_rt_sigaction_wrapper)
 SYSCALL(sys_rt_sigprocmask,sys_rt_sigprocmask,sys32_rt_sigprocmask_wrapper)	/* 175 */
 SYSCALL(sys_rt_sigpending,sys_rt_sigpending,sys32_rt_sigpending_wrapper)
-SYSCALL(sys_rt_sigtimedwait,sys_rt_sigtimedwait,sys32_rt_sigtimedwait_wrapper)
+SYSCALL(sys_rt_sigtimedwait,sys_rt_sigtimedwait,compat_rt_sigtimedwait_wrapper)
 SYSCALL(sys_rt_sigqueueinfo,sys_rt_sigqueueinfo,sys32_rt_sigqueueinfo_wrapper)
 SYSCALL(sys_rt_sigsuspend_glue,sys_rt_sigsuspend_glue,sys32_rt_sigsuspend_glue)
 SYSCALL(sys_pread64,sys_pread64,sys32_pread64_wrapper)		/* 180 */
diff -Nru a/arch/s390/mm/extmem.c b/arch/s390/mm/extmem.c
--- a/arch/s390/mm/extmem.c	2005-01-10 20:11:21 -08:00
+++ b/arch/s390/mm/extmem.c	2005-01-10 20:11:21 -08:00
@@ -545,7 +545,8 @@
 /*
  * save segment content permanently
  */
-void segment_save(char *name)
+void
+segment_save(char *name)
 {
 	struct dcss_segment *seg;
 	int startpfn = 0;
diff -Nru a/arch/s390/mm/init.c b/arch/s390/mm/init.c
--- a/arch/s390/mm/init.c	2005-01-10 20:11:21 -08:00
+++ b/arch/s390/mm/init.c	2005-01-10 20:11:21 -08:00
@@ -45,11 +45,24 @@
         if (addr >= 0x7ff00000)
                 return;
 #ifdef __s390x__
-        asm volatile ("sam31\n\t"
-                      "diag %0,%0,0x10\n\t"
-                      "sam64" : : "a" (addr) );
+        asm volatile (
+		"   sam31\n"
+		"   diag %0,%0,0x10\n"
+		"0: sam64\n"
+		".section __ex_table,\"a\"\n"
+		"   .align 8\n"
+		"   .quad 0b, 0b\n"
+		".previous\n"
+		: : "a" (addr));
 #else
-        asm volatile ("diag %0,%0,0x10" : : "a" (addr) );
+        asm volatile (
+		"   diag %0,%0,0x10\n"
+		"0:\n"
+		".section __ex_table,\"a\"\n"
+		"   .align 4\n"
+		"   .long 0b, 0b\n"
+		".previous\n"
+		: : "a" (addr));
 #endif
 }
 
diff -Nru a/arch/s390/oprofile/init.c b/arch/s390/oprofile/init.c
--- a/arch/s390/oprofile/init.c	2005-01-10 20:11:20 -08:00
+++ b/arch/s390/oprofile/init.c	2005-01-10 20:11:20 -08:00
@@ -12,13 +12,8 @@
 #include <linux/init.h>
 #include <linux/errno.h>
 
-//extern int irq_init(struct oprofile_operations** ops);
-extern void timer_init(struct oprofile_operations** ops);
-
-int __init oprofile_arch_init(struct oprofile_operations** ops)
+void __init oprofile_arch_init(struct oprofile_operations* ops)
 {
-	timer_init(ops);
-	return 0;
 }
 
 void oprofile_arch_exit(void)
diff -Nru a/arch/sh/Kconfig b/arch/sh/Kconfig
--- a/arch/sh/Kconfig	2005-01-10 20:11:23 -08:00
+++ b/arch/sh/Kconfig	2005-01-10 20:11:23 -08:00
@@ -25,6 +25,10 @@
 config RWSEM_XCHGADD_ALGORITHM
 	bool
 
+config GENERIC_CALIBRATE_DELAY
+	bool
+	default y
+
 source "init/Kconfig"
 
 menu "System type"
diff -Nru a/arch/sh/boards/renesas/hs7751rvoip/io.c b/arch/sh/boards/renesas/hs7751rvoip/io.c
--- a/arch/sh/boards/renesas/hs7751rvoip/io.c	2005-01-10 20:11:17 -08:00
+++ b/arch/sh/boards/renesas/hs7751rvoip/io.c	2005-01-10 20:11:17 -08:00
@@ -166,7 +166,7 @@
 
         if (PXSEG(port))
                 *(volatile unsigned char *)port = value;
-#if defined(CONFIG_HS7751RVOIP_CIDEC)
+#if defined(CONFIG_HS7751RVOIP_CODEC)
 	else if (codec_port(port))
 		*(volatile unsigned cjar *)((unsigned long)area6_io8_base+(port-CODEC_IO_BASE)) = value;
 #endif
@@ -180,7 +180,7 @@
 {
         if (PXSEG(port))
                 *(volatile unsigned char *)port = value;
-#if defined(CONFIG_HS7751RVOIP_CIDEC)
+#if defined(CONFIG_HS7751RVOIP_CODEC)
 	else if (codec_port(port))
 		*(volatile unsigned cjar *)((unsigned long)area6_io8_base+(port-CODEC_IO_BASE)) = value;
 #endif
diff -Nru a/arch/sh/drivers/pci/Kconfig b/arch/sh/drivers/pci/Kconfig
--- a/arch/sh/drivers/pci/Kconfig	2005-01-10 20:11:15 -08:00
+++ b/arch/sh/drivers/pci/Kconfig	2005-01-10 20:11:15 -08:00
@@ -3,8 +3,7 @@
 	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.
+	  your box. If you have PCI, say Y, otherwise N.
 
 	  The PCI-HOWTO, available from
 	  <http://www.tldp.org/docs.html#howto>, contains valuable
diff -Nru a/arch/sh/kernel/process.c b/arch/sh/kernel/process.c
--- a/arch/sh/kernel/process.c	2005-01-10 20:11:21 -08:00
+++ b/arch/sh/kernel/process.c	2005-01-10 20:11:21 -08:00
@@ -68,7 +68,7 @@
 	}
 }
 
-void cpu_idle(void *unused)
+void cpu_idle(void)
 {
 	default_idle();
 }
diff -Nru a/arch/sh/kernel/sh_ksyms.c b/arch/sh/kernel/sh_ksyms.c
--- a/arch/sh/kernel/sh_ksyms.c	2005-01-10 20:11:17 -08:00
+++ b/arch/sh/kernel/sh_ksyms.c	2005-01-10 20:11:17 -08:00
@@ -89,7 +89,7 @@
 
 EXPORT_SYMBOL(__div64_32);
 
-#define DECLARE_EXPORT(name) extern void name(void);EXPORT_SYMBOL_NOVERS(name)
+#define DECLARE_EXPORT(name) extern void name(void);EXPORT_SYMBOL(name)
 
 /* These symbols are generated by the compiler itself */
 DECLARE_EXPORT(__udivsi3);
@@ -100,7 +100,7 @@
 DECLARE_EXPORT(__lshrdi3);
 DECLARE_EXPORT(__movstr);
 
-EXPORT_SYMBOL_NOVERS(strcpy);
+EXPORT_SYMBOL(strcpy);
 
 #ifdef CONFIG_CPU_SH4
 DECLARE_EXPORT(__movstr_i4_even);
diff -Nru a/arch/sh/kernel/smp.c b/arch/sh/kernel/smp.c
--- a/arch/sh/kernel/smp.c	2005-01-10 20:11:19 -08:00
+++ b/arch/sh/kernel/smp.c	2005-01-10 20:11:19 -08:00
@@ -37,7 +37,6 @@
 int smp_threads_ready = 0;
 struct sh_cpuinfo cpu_data[NR_CPUS];
 
-extern int cpu_idle(void *unused);
 extern void per_cpu_trap_init(void);
 
 cpumask_t cpu_possible_map;
@@ -124,7 +123,8 @@
 	
 	atomic_inc(&cpus_booted);
 
-	return cpu_idle(0);
+	cpu_idle();
+	return 0;
 }
 
 void __init smp_cpus_done(unsigned int max_cpus)
diff -Nru a/arch/sh/lib/delay.c b/arch/sh/lib/delay.c
--- a/arch/sh/lib/delay.c	2005-01-10 20:11:19 -08:00
+++ b/arch/sh/lib/delay.c	2005-01-10 20:11:19 -08:00
@@ -24,7 +24,7 @@
 	__asm__("dmulu.l	%0, %2\n\t"
 		"sts	mach, %0"
 		: "=r" (xloops)
-		: "0" (xloops), "r" (current_cpu_data.loops_per_jiffy)
+		: "0" (xloops), "r" (cpu_data[_smp_processor_id()].loops_per_jiffy)
 		: "macl", "mach");
 	__delay(xloops * HZ);
 }
diff -Nru a/arch/sh/oprofile/op_model_null.c b/arch/sh/oprofile/op_model_null.c
--- a/arch/sh/oprofile/op_model_null.c	2005-01-10 20:11:17 -08:00
+++ b/arch/sh/oprofile/op_model_null.c	2005-01-10 20:11:17 -08:00
@@ -12,9 +12,8 @@
 #include <linux/init.h>
 #include <linux/errno.h>
 
-int __init oprofile_arch_init(struct oprofile_operations **ops)
+void __init oprofile_arch_init(struct oprofile_operations *ops)
 {
-	return -ENODEV;
 }
 
 void oprofile_arch_exit(void)
diff -Nru a/arch/sh64/Kconfig b/arch/sh64/Kconfig
--- a/arch/sh64/Kconfig	2005-01-10 20:11:21 -08:00
+++ b/arch/sh64/Kconfig	2005-01-10 20:11:21 -08:00
@@ -25,6 +25,10 @@
 	bool
 	default y
 
+config GENERIC_CALIBRATE_DELAY
+	bool
+	default y
+
 config LOG_BUF_SHIFT
 	int
 	default 14
diff -Nru a/arch/sh64/kernel/process.c b/arch/sh64/kernel/process.c
--- a/arch/sh64/kernel/process.c	2005-01-10 20:11:23 -08:00
+++ b/arch/sh64/kernel/process.c	2005-01-10 20:11:23 -08:00
@@ -338,7 +338,7 @@
 	}
 }
 
-void cpu_idle(void *unused)
+void cpu_idle(void)
 {
 	default_idle();
 }
diff -Nru a/arch/sparc/Kconfig b/arch/sparc/Kconfig
--- a/arch/sparc/Kconfig	2005-01-10 20:11:15 -08:00
+++ b/arch/sparc/Kconfig	2005-01-10 20:11:15 -08:00
@@ -207,6 +207,10 @@
 config RWSEM_XCHGADD_ALGORITHM
 	bool
 
+config GENERIC_CALIBRATE_DELAY
+	bool
+	default y
+
 config SUN_PM
 	bool
 	default y
diff -Nru a/arch/sparc/kernel/pcic.c b/arch/sparc/kernel/pcic.c
--- a/arch/sparc/kernel/pcic.c	2005-01-10 20:11:19 -08:00
+++ b/arch/sparc/kernel/pcic.c	2005-01-10 20:11:19 -08:00
@@ -161,7 +161,7 @@
 static int pcic0_up;
 static struct linux_pcic pcic0;
 
-unsigned int pcic_regs;
+void * __iomem pcic_regs;
 volatile int pcic_speculative;
 volatile int pcic_trapped;
 
@@ -313,8 +313,7 @@
 	pcic0_up = 1;
 
 	pcic->pcic_res_regs.name = "pcic_registers";
-	pcic->pcic_regs = (unsigned long)
-	    ioremap(regs[0].phys_addr, regs[0].reg_size);
+	pcic->pcic_regs = ioremap(regs[0].phys_addr, regs[0].reg_size);
 	if (!pcic->pcic_regs) {
 		prom_printf("PCIC: Error, cannot map PCIC registers.\n");
 		prom_halt();
@@ -328,7 +327,7 @@
 	}
 
 	pcic->pcic_res_cfg_addr.name = "pcic_cfg_addr";
-	if ((pcic->pcic_config_space_addr = (unsigned long)
+	if ((pcic->pcic_config_space_addr =
 	    ioremap(regs[2].phys_addr, regs[2].reg_size * 2)) == 0) {
 		prom_printf("PCIC: Error, cannot map" 
 			    "PCI Configuration Space Address.\n");
@@ -340,7 +339,7 @@
 	 * must be the same. Thus, we need adjust size of data.
 	 */
 	pcic->pcic_res_cfg_data.name = "pcic_cfg_data";
-	if ((pcic->pcic_config_space_data = (unsigned long)
+	if ((pcic->pcic_config_space_data =
 	    ioremap(regs[3].phys_addr, regs[3].reg_size * 2)) == 0) {
 		prom_printf("PCIC: Error, cannot map" 
 			    "PCI Configuration Space Data.\n");
@@ -976,7 +975,7 @@
  * We do not use horroble macroses here because we want to
  * advance pointer by sizeof(size).
  */
-void outsb(unsigned long addr, const void *src, unsigned long count) {
+void outsb(void * __iomem addr, const void *src, unsigned long count) {
 	while (count) {
 		count -= 1;
 		writeb(*(const char *)src, addr);
@@ -985,7 +984,7 @@
 	}
 }
 
-void outsw(unsigned long addr, const void *src, unsigned long count) {
+void outsw(void * __iomem addr, const void *src, unsigned long count) {
 	while (count) {
 		count -= 2;
 		writew(*(const short *)src, addr);
@@ -994,7 +993,7 @@
 	}
 }
 
-void outsl(unsigned long addr, const void *src, unsigned long count) {
+void outsl(void * __iomem addr, const void *src, unsigned long count) {
 	while (count) {
 		count -= 4;
 		writel(*(const long *)src, addr);
@@ -1003,7 +1002,7 @@
 	}
 }
 
-void insb(unsigned long addr, void *dst, unsigned long count) {
+void insb(void * __iomem addr, void *dst, unsigned long count) {
 	while (count) {
 		count -= 1;
 		*(unsigned char *)dst = readb(addr);
@@ -1012,7 +1011,7 @@
 	}
 }
 
-void insw(unsigned long addr, void *dst, unsigned long count) {
+void insw(void * __iomem addr, void *dst, unsigned long count) {
 	while (count) {
 		count -= 2;
 		*(unsigned short *)dst = readw(addr);
@@ -1021,7 +1020,7 @@
 	}
 }
 
-void insl(unsigned long addr, void *dst, unsigned long count) {
+void insl(void * __iomem addr, void *dst, unsigned long count) {
 	while (count) {
 		count -= 4;
 		/*
diff -Nru a/arch/sparc/kernel/process.c b/arch/sparc/kernel/process.c
--- a/arch/sparc/kernel/process.c	2005-01-10 20:11:16 -08:00
+++ b/arch/sparc/kernel/process.c	2005-01-10 20:11:16 -08:00
@@ -81,10 +81,8 @@
 /*
  * the idle loop on a Sparc... ;)
  */
-int cpu_idle(void)
+void cpu_idle(void)
 {
-	int ret = -EPERM;
-
 	if (current->pid != 0)
 		goto out;
 
@@ -128,15 +126,14 @@
 		schedule();
 		check_pgt_cache();
 	}
-	ret = 0;
 out:
-	return ret;
+	return;
 }
 
 #else
 
 /* This is being executed in task 0 'user space'. */
-int cpu_idle(void)
+void cpu_idle(void)
 {
 	/* endless idle loop with no priority at all */
 	while(1) {
diff -Nru a/arch/sparc/kernel/signal.c b/arch/sparc/kernel/signal.c
--- a/arch/sparc/kernel/signal.c	2005-01-10 20:11:21 -08:00
+++ b/arch/sparc/kernel/signal.c	2005-01-10 20:11:21 -08:00
@@ -1016,6 +1016,7 @@
 
 sigsegv_and_return:
 	force_sig(SIGSEGV, current);
+	return -EFAULT;
 }
 
 static inline void
diff -Nru a/arch/sparc/kernel/sun4d_smp.c b/arch/sparc/kernel/sun4d_smp.c
--- a/arch/sparc/kernel/sun4d_smp.c	2005-01-10 20:11:16 -08:00
+++ b/arch/sparc/kernel/sun4d_smp.c	2005-01-10 20:11:16 -08:00
@@ -122,8 +122,7 @@
 		
 	/* Fix idle thread fields. */
 	__asm__ __volatile__("ld [%0], %%g6\n\t"
-			     "sta %%g6, [%%g0] %1\n\t"
-			     : : "r" (&current_set[cpuid]), "i" (ASI_M_VIKING_TMP2)
+			     : : "r" (&current_set[cpuid])
 			     : "memory" /* paranoid */);
 
 	cpu_leds[cpuid] = 0x9;
@@ -146,7 +145,6 @@
 	spin_unlock_irqrestore(&sun4d_imsk_lock, flags);
 }
 
-extern int cpu_idle(void *unused);
 extern void init_IRQ(void);
 extern void cpu_panic(void);
 
@@ -460,25 +458,18 @@
 
 void __init smp4d_blackbox_current(unsigned *addr)
 {
-	/* We have a nice Linux current register :) */
-	int rd = addr[1] & 0x3e000000;
+	int rd = *addr & 0x3e000000;
 	
-	addr[0] = 0x10800006;			/* b .+24 */
-	addr[1] = 0xc0800820 | rd;		/* lda [%g0] ASI_M_VIKING_TMP2, reg */
+	addr[0] = 0xc0800800 | rd;		/* lda [%g0] ASI_M_VIKING_TMP1, reg */
+	addr[2] = 0x81282002 | rd | (rd >> 11);	/* sll reg, 2, reg */
+	addr[4] = 0x01000000;			/* nop */
 }
 
 void __init sun4d_init_smp(void)
 {
 	int i;
-	extern unsigned int patchme_store_new_current[];
 	extern unsigned int t_nmi[], linux_trap_ipi15_sun4d[], linux_trap_ipi15_sun4m[];
 
-	/* Store current into Linux current register :) */
-	__asm__ __volatile__("sta %%g6, [%%g0] %0" : : "i"(ASI_M_VIKING_TMP2));
-	
-	/* Patch switch_to */
-	patchme_store_new_current[0] = (patchme_store_new_current[0] & 0x3e000000) | 0xc0a00820;
-	
 	/* Patch ipi15 trap table */
 	t_nmi[1] = t_nmi[1] + (linux_trap_ipi15_sun4d - linux_trap_ipi15_sun4m);
 	
diff -Nru a/arch/sparc/kernel/sun4m_smp.c b/arch/sparc/kernel/sun4m_smp.c
--- a/arch/sparc/kernel/sun4m_smp.c	2005-01-10 20:11:22 -08:00
+++ b/arch/sparc/kernel/sun4m_smp.c	2005-01-10 20:11:22 -08:00
@@ -121,7 +121,6 @@
 	local_irq_enable();
 }
 
-extern int cpu_idle(void *unused);
 extern void init_IRQ(void);
 extern void cpu_panic(void);
 
diff -Nru a/arch/sparc/lib/bitext.c b/arch/sparc/lib/bitext.c
--- a/arch/sparc/lib/bitext.c	2005-01-10 20:11:18 -08:00
+++ b/arch/sparc/lib/bitext.c	2005-01-10 20:11:18 -08:00
@@ -29,10 +29,17 @@
 	int offset, count;	/* siamese twins */
 	int off_new;
 	int align1;
-	int i;
+	int i, color;
 
-	if (align == 0)
-		align = 1;
+	if (t->num_colors) {
+		/* align is overloaded to be the page color */
+		color = align;
+		align = t->num_colors;
+	} else {
+		color = 0;
+		if (align == 0)
+			align = 1;
+	}
 	align1 = align - 1;
 	if ((align & align1) != 0)
 		BUG();
@@ -40,6 +47,7 @@
 		BUG();
 	if (len <= 0 || len > t->size)
 		BUG();
+	color &= align1;
 
 	spin_lock(&t->lock);
 	if (len < t->last_size)
@@ -49,7 +57,7 @@
 	count = 0;
 	for (;;) {
 		off_new = find_next_zero_bit(t->map, t->size, offset);
-		off_new = (off_new + align1) & ~align1;
+		off_new = ((off_new + align1) & ~align1) + color;
 		count += off_new - offset;
 		offset = off_new;
 		if (offset >= t->size)
@@ -121,6 +129,4 @@
 	spin_lock_init(&t->lock);
 	t->map = map;
 	t->size = size;
-	t->last_size = 0;
-	t->first_free = 0;
 }
diff -Nru a/arch/sparc/mm/fault.c b/arch/sparc/mm/fault.c
--- a/arch/sparc/mm/fault.c	2005-01-10 20:11:24 -08:00
+++ b/arch/sparc/mm/fault.c	2005-01-10 20:11:24 -08:00
@@ -294,16 +294,17 @@
 	 * the fault.
 	 */
 	switch (handle_mm_fault(mm, vma, address, write)) {
-	case 1:
-		current->min_flt++;
-		break;
-	case 2:
+	case VM_FAULT_SIGBUS:
+		goto do_sigbus;
+	case VM_FAULT_OOM:
+		goto out_of_memory;
+	case VM_FAULT_MAJOR:
 		current->maj_flt++;
 		break;
-	case 0:
-		goto do_sigbus;
+	case VM_FAULT_MINOR:
 	default:
-		goto out_of_memory;
+		current->min_flt++;
+		break;
 	}
 	up_read(&mm->mmap_sem);
 	return;
@@ -535,8 +536,11 @@
 		if(!(vma->vm_flags & (VM_READ | VM_EXEC)))
 			goto bad_area;
 	}
-	if (!handle_mm_fault(mm, vma, address, write))
+	switch (handle_mm_fault(mm, vma, address, write)) {
+	case VM_FAULT_SIGBUS:
+	case VM_FAULT_OOM:
 		goto do_sigbus;
+	}
 	up_read(&mm->mmap_sem);
 	return;
 bad_area:
diff -Nru a/arch/sparc/mm/highmem.c b/arch/sparc/mm/highmem.c
--- a/arch/sparc/mm/highmem.c	2005-01-10 20:11:17 -08:00
+++ b/arch/sparc/mm/highmem.c	2005-01-10 20:11:17 -08:00
@@ -36,7 +36,7 @@
 
 	/* even !CONFIG_PREEMPT needs this, for in_atomic in do_page_fault */
 	inc_preempt_count();
-	if (page < highmem_start_page)
+	if (!PageHighMem(page))
 		return page_address(page);
 
 	idx = type + KM_TYPE_NR*smp_processor_id();
diff -Nru a/arch/sparc/mm/init.c b/arch/sparc/mm/init.c
--- a/arch/sparc/mm/init.c	2005-01-10 20:11:18 -08:00
+++ b/arch/sparc/mm/init.c	2005-01-10 20:11:18 -08:00
@@ -402,8 +402,6 @@
 	int reservedpages = 0;
 	int i;
 
-	highmem_start_page = pfn_to_page(highstart_pfn);
-
 	if (PKMAP_BASE+LAST_PKMAP*PAGE_SIZE >= FIXADDR_START) {
 		prom_printf("BUG: fixmap and pkmap areas overlap\n");
 		prom_printf("pkbase: 0x%lx pkend: 0x%lx fixstart 0x%lx\n",
diff -Nru a/arch/sparc/mm/io-unit.c b/arch/sparc/mm/io-unit.c
--- a/arch/sparc/mm/io-unit.c	2005-01-10 20:11:18 -08:00
+++ b/arch/sparc/mm/io-unit.c	2005-01-10 20:11:18 -08:00
@@ -196,7 +196,7 @@
 			pte_t *ptep;
 			long i;
 
-			pgdp = pgd_offset(init_task.mm, addr);
+			pgdp = pgd_offset(&init_mm, addr);
 			pmdp = pmd_offset(pgdp, addr);
 			ptep = pte_offset_map(pmdp, addr);
 
diff -Nru a/arch/sparc/mm/iommu.c b/arch/sparc/mm/iommu.c
--- a/arch/sparc/mm/iommu.c	2005-01-10 20:11:23 -08:00
+++ b/arch/sparc/mm/iommu.c	2005-01-10 20:11:23 -08:00
@@ -119,6 +119,13 @@
 		prom_halt();
 	}
 	bit_map_init(&iommu->usemap, bitmap, IOMMU_NPTES);
+	/* To be coherent on HyperSparc, the page color of DVMA
+	 * and physical addresses must match.
+	 */
+	if (srmmu_modtype == HyperSparc)
+		iommu->usemap.num_colors = vac_cache_size >> PAGE_SHIFT;
+	else
+		iommu->usemap.num_colors = 1;
 
 	printk("IOMMU: impl %d vers %d table 0x%p[%d B] map [%d b]\n",
 	    impl, vers, iommu->page_table,
@@ -128,7 +135,9 @@
 }
 
 /* This begs to be btfixup-ed by srmmu. */
-static void iommu_viking_flush_iotlb(iopte_t *iopte, unsigned int niopte)
+/* Flush the iotlb entries to ram. */
+/* This could be better if we didn't have to flush whole pages. */
+static void iommu_flush_iotlb(iopte_t *iopte, unsigned int niopte)
 {
 	unsigned long start;
 	unsigned long end;
@@ -145,6 +154,11 @@
 			viking_flush_page(start);
 			start += PAGE_SIZE;
 		}
+	} else {
+		while(start < end) {
+			__flush_page_to_ram(start);
+			start += PAGE_SIZE;
+		}
 	}
 }
 
@@ -156,7 +170,8 @@
 	unsigned int busa, busa0;
 	int i;
 
-	ioptex = bit_map_string_get(&iommu->usemap, npages, 1);
+	/* page color = pfn of page */
+	ioptex = bit_map_string_get(&iommu->usemap, npages, page_to_pfn(page));
 	if (ioptex < 0)
 		panic("iommu out");
 	busa0 = iommu->start + (ioptex << PAGE_SHIFT);
@@ -172,8 +187,7 @@
 		page++;
 	}
 
-	iommu_viking_flush_iotlb(iopte0, npages);
-	flush_cache_all(); // hack to fix dma errors with hypersparc
+	iommu_flush_iotlb(iopte0, npages);
 
 	return busa0;
 }
@@ -328,7 +342,9 @@
 	if ((addr & ~PAGE_MASK) != 0) BUG();
 	if ((len & ~PAGE_MASK) != 0) BUG();
 
-	ioptex = bit_map_string_get(&iommu->usemap, len >> PAGE_SHIFT, 1);
+	/* page color = physical address */
+	ioptex = bit_map_string_get(&iommu->usemap, len >> PAGE_SHIFT,
+		addr >> PAGE_SHIFT);
 	if (ioptex < 0)
 		panic("iommu out");
 
@@ -372,7 +388,7 @@
 	 *        to handle the latter case as well.
 	 */
 	flush_cache_all();
-	iommu_viking_flush_iotlb(first, len >> PAGE_SHIFT);
+	iommu_flush_iotlb(first, len >> PAGE_SHIFT);
 	flush_tlb_all();
 	iommu_invalidate(iommu->regs);
 
diff -Nru a/arch/sparc/prom/ranges.c b/arch/sparc/prom/ranges.c
--- a/arch/sparc/prom/ranges.c	2005-01-10 20:11:18 -08:00
+++ b/arch/sparc/prom/ranges.c	2005-01-10 20:11:18 -08:00
@@ -34,7 +34,7 @@
 	}
 }
 
-static void
+void
 prom_adjust_ranges(struct linux_prom_ranges *ranges1, int nranges1,
 		   struct linux_prom_ranges *ranges2, int nranges2)
 {
diff -Nru a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig
--- a/arch/sparc64/Kconfig	2005-01-10 20:11:22 -08:00
+++ b/arch/sparc64/Kconfig	2005-01-10 20:11:22 -08:00
@@ -186,6 +186,10 @@
 	bool
 	default y
 
+config GENERIC_CALIBRATE_DELAY
+	bool
+	default y
+
 choice
 	prompt "SPARC64 Huge TLB Page Size"
 	depends on HUGETLB_PAGE
@@ -556,7 +560,7 @@
 
 config DRM_FFB
 	tristate "Creator/Creator3D"
-	depends on DRM
+	depends on DRM && BROKEN
 	help
 	  Choose this option if you have one of Sun's Creator3D-based graphics
 	  and frame buffer cards.  Product page at
@@ -590,6 +594,8 @@
 source "sound/Kconfig"
 
 source "drivers/usb/Kconfig"
+
+source "drivers/infiniband/Kconfig"
 
 source "drivers/char/watchdog/Kconfig"
 
diff -Nru a/arch/sparc64/defconfig b/arch/sparc64/defconfig
--- a/arch/sparc64/defconfig	2005-01-10 20:11:18 -08:00
+++ b/arch/sparc64/defconfig	2005-01-10 20:11:18 -08:00
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.10-rc3
-# Wed Dec  8 21:14:26 2004
+# Linux kernel version: 2.6.10
+# Mon Dec 27 22:36:56 2004
 #
 CONFIG_64BIT=y
 CONFIG_MMU=y
@@ -601,7 +601,6 @@
 CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_IP_NF_TARGET_NETMAP=m
 CONFIG_IP_NF_TARGET_SAME=m
-CONFIG_IP_NF_NAT_LOCAL=y
 CONFIG_IP_NF_NAT_SNMP_BASIC=m
 CONFIG_IP_NF_NAT_IRC=m
 CONFIG_IP_NF_NAT_FTP=m
@@ -675,6 +674,7 @@
 CONFIG_BRIDGE_EBT_REDIRECT=m
 CONFIG_BRIDGE_EBT_SNAT=m
 CONFIG_BRIDGE_EBT_LOG=m
+CONFIG_BRIDGE_EBT_ULOG=m
 CONFIG_XFRM=y
 CONFIG_XFRM_USER=m
 
@@ -741,6 +741,7 @@
 CONFIG_NET_CLS_U32=m
 CONFIG_CLS_U32_PERF=y
 CONFIG_NET_CLS_IND=y
+CONFIG_CLS_U32_MARK=y
 CONFIG_NET_CLS_RSVP=m
 CONFIG_NET_CLS_RSVP6=m
 CONFIG_NET_CLS_ACT=y
@@ -926,6 +927,7 @@
 CONFIG_YELLOWFIN=m
 CONFIG_R8169=m
 CONFIG_R8169_NAPI=y
+CONFIG_R8169_VLAN=y
 CONFIG_SK98LIN=m
 CONFIG_VIA_VELOCITY=m
 CONFIG_TIGON3=m
@@ -937,6 +939,7 @@
 CONFIG_IXGB_NAPI=y
 CONFIG_S2IO=m
 CONFIG_S2IO_NAPI=y
+CONFIG_2BUFF_MODE=y
 
 #
 # Token Ring devices
@@ -1333,7 +1336,7 @@
 CONFIG_CIFS=m
 # CONFIG_CIFS_STATS is not set
 # CONFIG_CIFS_XATTR is not set
-CONFIG_CIFS_POSIX=y
+# CONFIG_CIFS_EXPERIMENTAL is not set
 CONFIG_NCP_FS=m
 # CONFIG_NCPFS_PACKET_SIGNING is not set
 # CONFIG_NCPFS_IOCTL_LOCKING is not set
@@ -1460,7 +1463,7 @@
 # CONFIG_DVB_TTUSB_BUDGET is not set
 CONFIG_DVB_TTUSB_DEC=m
 CONFIG_DVB_DIBUSB=m
-CONFIG_DVB_DIBUSB_MISDESIGNED_AN2235=y
+# CONFIG_DVB_DIBUSB_MISDESIGNED_DEVICES is not set
 CONFIG_DVB_DIBCOM_DEBUG=y
 CONFIG_DVB_CINERGYT2=m
 # CONFIG_DVB_CINERGYT2_TUNING is not set
@@ -1469,6 +1472,7 @@
 # Supported FlexCopII (B2C2) Adapters
 #
 CONFIG_DVB_B2C2_SKYSTAR=m
+CONFIG_DVB_B2C2_USB=m
 
 #
 # Supported BT878 Adapters
@@ -1505,6 +1509,7 @@
 CONFIG_DVB_NXT6000=m
 CONFIG_DVB_MT352=m
 CONFIG_DVB_DIB3000MB=m
+CONFIG_DVB_DIB3000MC=m
 
 #
 # DVB-C (cable) frontends
@@ -1636,6 +1641,7 @@
 # CONFIG_USB_EHCI_ROOT_HUB_TT is not set
 CONFIG_USB_OHCI_HCD=y
 CONFIG_USB_UHCI_HCD=m
+CONFIG_USB_SL811_HCD=m
 
 #
 # USB Device Class drivers
@@ -1807,6 +1813,15 @@
 # CONFIG_USB_GADGET is not set
 
 #
+# InfiniBand support
+#
+CONFIG_INFINIBAND=m
+CONFIG_INFINIBAND_MTHCA=m
+# CONFIG_INFINIBAND_MTHCA_DEBUG is not set
+CONFIG_INFINIBAND_IPOIB=m
+# CONFIG_INFINIBAND_IPOIB_DEBUG is not set
+
+#
 # Watchdog Cards
 #
 CONFIG_WATCHDOG=y
@@ -1890,6 +1905,10 @@
 CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_CRC32C=m
 CONFIG_CRYPTO_TEST=m
+
+#
+# Hardware crypto devices
+#
 
 #
 # Library routines
diff -Nru a/arch/sparc64/kernel/binfmt_aout32.c b/arch/sparc64/kernel/binfmt_aout32.c
--- a/arch/sparc64/kernel/binfmt_aout32.c	2005-01-10 20:11:19 -08:00
+++ b/arch/sparc64/kernel/binfmt_aout32.c	2005-01-10 20:11:19 -08:00
@@ -311,7 +311,7 @@
 	orig_thr_flags = current_thread_info()->flags;
 	current_thread_info()->flags |= _TIF_32BIT;
 
-	retval = setup_arg_pages(bprm, EXSTACK_DEFAULT);
+	retval = setup_arg_pages(bprm, STACK_TOP, EXSTACK_DEFAULT);
 	if (retval < 0) { 
 		current_thread_info()->flags = orig_thr_flags;
 
diff -Nru a/arch/sparc64/kernel/process.c b/arch/sparc64/kernel/process.c
--- a/arch/sparc64/kernel/process.c	2005-01-10 20:11:18 -08:00
+++ b/arch/sparc64/kernel/process.c	2005-01-10 20:11:18 -08:00
@@ -60,10 +60,10 @@
 /*
  * the idle loop on a Sparc... ;)
  */
-int cpu_idle(void)
+void cpu_idle(void)
 {
 	if (current->pid != 0)
-		return -EPERM;
+		return;
 
 	/* endless idle loop with no priority at all */
 	for (;;) {
@@ -80,7 +80,7 @@
 		schedule();
 		check_pgt_cache();
 	}
-	return 0;
+	return;
 }
 
 #else
@@ -90,7 +90,7 @@
  */
 #define idle_me_harder()	(cpu_data(smp_processor_id()).idle_volume += 1)
 #define unidle_me()		(cpu_data(smp_processor_id()).idle_volume = 0)
-int cpu_idle(void)
+void cpu_idle(void)
 {
 	set_thread_flag(TIF_POLLING_NRFLAG);
 	while(1) {
diff -Nru a/arch/sparc64/kernel/signal32.c b/arch/sparc64/kernel/signal32.c
--- a/arch/sparc64/kernel/signal32.c	2005-01-10 20:11:15 -08:00
+++ b/arch/sparc64/kernel/signal32.c	2005-01-10 20:11:15 -08:00
@@ -86,7 +86,7 @@
 	__siginfo_fpu_t		fpu_state;
 };
 
-struct siginfo32 {
+typedef struct compat_siginfo{
 	int si_signo;
 	int si_errno;
 	int si_code;
@@ -136,11 +136,11 @@
 			int _fd;
 		} _sigpoll;
 	} _sifields;
-};
+}compat_siginfo_t;
 
 struct rt_signal_frame32 {
 	struct sparc_stackf32	ss;
-	struct siginfo32	info;
+	compat_siginfo_t	info;
 	struct pt_regs32	regs;
 	compat_sigset_t		mask;
 	/* __siginfo_fpu32_t * */ u32 fpu_save;
@@ -157,11 +157,11 @@
 #define NF_ALIGNEDSZ  (((sizeof(struct new_signal_frame32) + 7) & (~7)))
 #define RT_ALIGNEDSZ  (((sizeof(struct rt_signal_frame32) + 7) & (~7)))
 
-int copy_siginfo_to_user32(struct siginfo32 __user *to, siginfo_t *from)
+int copy_siginfo_to_user32(compat_siginfo_t __user *to, siginfo_t *from)
 {
 	int err;
 
-	if (!access_ok(VERIFY_WRITE, to, sizeof(struct siginfo32)))
+	if (!access_ok(VERIFY_WRITE, to, sizeof(compat_siginfo_t)))
 		return -EFAULT;
 
 	/* If you change siginfo_t structure, please be sure
@@ -210,9 +210,9 @@
 /* CAUTION: This is just a very minimalist implementation for the
  *          sake of compat_sys_rt_sigqueueinfo()
  */
-int copy_siginfo_to_kernel32(siginfo_t *to, struct siginfo32 __user *from)
+int copy_siginfo_from_user32(siginfo_t *to, compat_siginfo_t __user *from)
 {
-	if (!access_ok(VERIFY_WRITE, from, sizeof(struct siginfo32)))
+	if (!access_ok(VERIFY_WRITE, from, sizeof(compat_siginfo_t)))
 		return -EFAULT;
 
 	if (copy_from_user(to, from, 3*sizeof(int)) ||
diff -Nru a/arch/sparc64/kernel/sys_sparc32.c b/arch/sparc64/kernel/sys_sparc32.c
--- a/arch/sparc64/kernel/sys_sparc32.c	2005-01-10 20:11:20 -08:00
+++ b/arch/sparc64/kernel/sys_sparc32.c	2005-01-10 20:11:20 -08:00
@@ -1044,99 +1044,14 @@
 	return ret;
 }
 
-asmlinkage long sys32_rt_sigtimedwait(compat_sigset_t __user *uthese,
-				      struct siginfo32 __user *uinfo,
-				      struct compat_timespec __user *uts,
-				      compat_size_t sigsetsize)
-{
-	int ret, sig;
-	sigset_t these;
-	compat_sigset_t these32;
-	struct timespec ts;
-	siginfo_t info;
-	long timeout = 0;
-
-	/* XXX: Don't preclude handling different sized sigset_t's.  */
-	if (sigsetsize != sizeof(sigset_t))
-		return -EINVAL;
-
-	if (copy_from_user (&these32, uthese, sizeof(compat_sigset_t)))
-		return -EFAULT;
-
-	switch (_NSIG_WORDS) {
-	case 4: these.sig[3] = these32.sig[6] | (((long)these32.sig[7]) << 32);
-	case 3: these.sig[2] = these32.sig[4] | (((long)these32.sig[5]) << 32);
-	case 2: these.sig[1] = these32.sig[2] | (((long)these32.sig[3]) << 32);
-	case 1: these.sig[0] = these32.sig[0] | (((long)these32.sig[1]) << 32);
-	}
-		
-	/*
-	 * Invert the set of allowed signals to get those we
-	 * want to block.
-	 */
-	sigdelsetmask(&these, sigmask(SIGKILL)|sigmask(SIGSTOP));
-	signotset(&these);
-
-	if (uts) {
-		if (get_compat_timespec(&ts, uts))
-			return -EINVAL;
-		if (ts.tv_nsec >= 1000000000L || ts.tv_nsec < 0
-		    || ts.tv_sec < 0)
-			return -EINVAL;
-	}
-
-	spin_lock_irq(&current->sighand->siglock);
-	sig = dequeue_signal(current, &these, &info);
-	if (!sig) {
-		timeout = MAX_SCHEDULE_TIMEOUT;
-		if (uts)
-			timeout = (timespec_to_jiffies(&ts)
-				   + (ts.tv_sec || ts.tv_nsec));
-
-		if (timeout) {
-			/* None ready -- temporarily unblock those we're
-			 * interested while we are sleeping in so that we'll
-			 * be awakened when they arrive.  */
-			current->real_blocked = current->blocked;
-			sigandsets(&current->blocked, &current->blocked, &these);
-			recalc_sigpending();
-			spin_unlock_irq(&current->sighand->siglock);
-
-			current->state = TASK_INTERRUPTIBLE;
-			timeout = schedule_timeout(timeout);
-
-			spin_lock_irq(&current->sighand->siglock);
-			sig = dequeue_signal(current, &these, &info);
-			current->blocked = current->real_blocked;
-			siginitset(&current->real_blocked, 0);
-			recalc_sigpending();
-		}
-	}
-	spin_unlock_irq(&current->sighand->siglock);
-
-	if (sig) {
-		ret = sig;
-		if (uinfo) {
-			if (copy_siginfo_to_user32(uinfo, &info))
-				ret = -EFAULT;
-		}
-	} else {
-		ret = -EAGAIN;
-		if (timeout)
-			ret = -EINTR;
-	}
-
-	return ret;
-}
-
 asmlinkage long compat_sys_rt_sigqueueinfo(int pid, int sig,
-					   struct siginfo32 __user *uinfo)
+					   struct compat_siginfo __user *uinfo)
 {
 	siginfo_t info;
 	int ret;
 	mm_segment_t old_fs = get_fs();
 	
-	if (copy_siginfo_to_kernel32(&info, uinfo))
+	if (copy_siginfo_from_user32(&info, uinfo))
 		return -EFAULT;
 
 	set_fs (KERNEL_DS);
@@ -1739,8 +1654,8 @@
 }
 
 asmlinkage long compat_sys_waitid(u32 which, u32 pid,
-				  struct siginfo32 __user *uinfo, u32 options,
-				  struct compat_rusage __user *uru)
+				  struct compat_siginfo __user *uinfo,
+				  u32 options, struct compat_rusage __user *uru)
 {
 	siginfo_t info;
 	struct rusage ru;
diff -Nru a/arch/sparc64/kernel/systbls.S b/arch/sparc64/kernel/systbls.S
--- a/arch/sparc64/kernel/systbls.S	2005-01-10 20:11:18 -08:00
+++ b/arch/sparc64/kernel/systbls.S	2005-01-10 20:11:18 -08:00
@@ -25,7 +25,7 @@
 /*10*/  .word sys_unlink, sunos_execv, sys_chdir, sys32_chown16, sys32_mknod
 /*15*/	.word sys_chmod, sys32_lchown16, sparc_brk, sys32_perfctr, sys32_lseek
 /*20*/	.word sys_getpid, sys_capget, sys_capset, sys32_setuid16, sys32_getuid16
-/*25*/	.word sys_time, sys_ptrace, sys_alarm, sys32_sigaltstack, sys32_pause
+/*25*/	.word compat_sys_time, sys_ptrace, sys_alarm, sys32_sigaltstack, sys32_pause
 /*30*/	.word compat_sys_utime, sys_lchown, sys_fchown, sys32_access, sys32_nice
 	.word sys_chown, sys_sync, sys32_kill, compat_sys_newstat, sys32_sendfile
 /*40*/	.word compat_sys_newlstat, sys_dup, sys_pipe, compat_sys_times, sys_getuid
@@ -41,7 +41,7 @@
 /*90*/	.word sys_dup2, sys_setfsuid, compat_sys_fcntl, sys32_select, sys_setfsgid
 	.word sys_fsync, sys32_setpriority, sys_nis_syscall, sys_nis_syscall, sys_nis_syscall
 /*100*/ .word sys32_getpriority, sys32_rt_sigreturn, sys32_rt_sigaction, sys32_rt_sigprocmask, sys32_rt_sigpending
-	.word sys32_rt_sigtimedwait, sys32_rt_sigqueueinfo, sys32_rt_sigsuspend, sys_setresuid, sys_getresuid
+	.word compat_rt_sigtimedwait, sys32_rt_sigqueueinfo, sys32_rt_sigsuspend, sys_setresuid, sys_getresuid
 /*110*/	.word sys_setresgid, sys_getresgid, sys_setregid, sys_nis_syscall, sys_nis_syscall
 	.word sys32_getgroups, sys32_gettimeofday, sys32_getrusage, sys_nis_syscall, sys_getcwd
 /*120*/	.word compat_sys_readv, compat_sys_writev, sys32_settimeofday, sys32_fchown16, sys_fchmod
@@ -66,7 +66,7 @@
 	.word sys32_ipc, sys32_sigreturn, sys_clone, sys_nis_syscall, sys32_adjtimex
 /*220*/	.word sys32_sigprocmask, sys_ni_syscall, sys32_delete_module, sys_ni_syscall, sys32_getpgid
 	.word sys32_bdflush, sys32_sysfs, sys_nis_syscall, sys32_setfsuid16, sys32_setfsgid16
-/*230*/	.word sys32_select, sys_time, sys_nis_syscall, sys_stime, compat_sys_statfs64
+/*230*/	.word sys32_select, compat_sys_time, sys_nis_syscall, compat_sys_stime, compat_sys_statfs64
 	.word compat_sys_fstatfs64, sys_llseek, sys_mlock, sys_munlock, sys32_mlockall
 /*240*/	.word sys_munlockall, sys32_sched_setparam, sys32_sched_getparam, sys32_sched_setscheduler, sys32_sched_getscheduler
 	.word sys_sched_yield, sys32_sched_get_priority_max, sys32_sched_get_priority_min, sys32_sched_rr_get_interval, compat_sys_nanosleep
diff -Nru a/arch/sparc64/lib/delay.c b/arch/sparc64/lib/delay.c
--- a/arch/sparc64/lib/delay.c	2005-01-10 20:11:16 -08:00
+++ b/arch/sparc64/lib/delay.c	2005-01-10 20:11:16 -08:00
@@ -31,7 +31,7 @@
 {
 	n *= 4;
 
-	n *= (cpu_data(smp_processor_id()).udelay_val * (HZ/4));
+	n *= (cpu_data(_smp_processor_id()).udelay_val * (HZ/4));
 	n >>= 32;
 
 	__delay(n + 1);
diff -Nru a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c
--- a/arch/sparc64/mm/init.c	2005-01-10 20:11:18 -08:00
+++ b/arch/sparc64/mm/init.c	2005-01-10 20:11:18 -08:00
@@ -1687,13 +1687,12 @@
 	 * Set up the zero page, mark it reserved, so that page count
 	 * is not manipulated when freeing the page from user ptes.
 	 */
-	mem_map_zero = alloc_pages(GFP_KERNEL, 0);
+	mem_map_zero = alloc_pages(GFP_KERNEL|__GFP_ZERO, 0);
 	if (mem_map_zero == NULL) {
 		prom_printf("paging_init: Cannot alloc zero page.\n");
 		prom_halt();
 	}
 	SetPageReserved(mem_map_zero);
-	clear_page(page_address(mem_map_zero));
 
 	codepages = (((unsigned long) _etext) - ((unsigned long) _start));
 	codepages = PAGE_ALIGN(codepages) >> PAGE_SHIFT;
diff -Nru a/arch/sparc64/mm/tlb.c b/arch/sparc64/mm/tlb.c
--- a/arch/sparc64/mm/tlb.c	2005-01-10 20:11:19 -08:00
+++ b/arch/sparc64/mm/tlb.c	2005-01-10 20:11:19 -08:00
@@ -118,11 +118,9 @@
 	 */
 	BUG_ON(s > e);
 
-#if 0
-	/* Currently free_pgtables guarantees this.  */
 	s &= PMD_MASK;
 	e = (e + PMD_SIZE - 1) & PMD_MASK;
-#endif
+
 	vpte_base = (tlb_type == spitfire ?
 		     VPTE_BASE_SPITFIRE :
 		     VPTE_BASE_CHEETAH);
diff -Nru a/arch/sparc64/oprofile/init.c b/arch/sparc64/oprofile/init.c
--- a/arch/sparc64/oprofile/init.c	2005-01-10 20:11:20 -08:00
+++ b/arch/sparc64/oprofile/init.c	2005-01-10 20:11:20 -08:00
@@ -12,11 +12,8 @@
 #include <linux/errno.h>
 #include <linux/init.h>
  
-extern void timer_init(struct oprofile_operations ** ops);
-
-int __init oprofile_arch_init(struct oprofile_operations ** ops)
+void __init oprofile_arch_init(struct oprofile_operations * ops)
 {
-	return -ENODEV;
 }
 
 
diff -Nru a/arch/sparc64/solaris/ioctl.c b/arch/sparc64/solaris/ioctl.c
--- a/arch/sparc64/solaris/ioctl.c	2005-01-10 20:11:19 -08:00
+++ b/arch/sparc64/solaris/ioctl.c	2005-01-10 20:11:19 -08:00
@@ -298,7 +298,7 @@
 	if (! current->files->fd[fd] ||
 	    ! current->files->fd[fd]->f_dentry ||
 	    ! (ino = current->files->fd[fd]->f_dentry->d_inode) ||
-	    ! ino->i_sock) {
+	    ! S_ISSOCK(ino->i_mode)) {
 		spin_unlock(&current->files->file_lock);
 		return TBADF;
 	}
@@ -478,7 +478,7 @@
         struct module_info *mi;
 
         ino = filp->f_dentry->d_inode;
-        if (! ino->i_sock)
+        if (!S_ISSOCK(ino->i_mode))
 		return -EBADF;
         sock = filp->private_data;
         if (! sock) {
diff -Nru a/arch/sparc64/solaris/socksys.c b/arch/sparc64/solaris/socksys.c
--- a/arch/sparc64/solaris/socksys.c	2005-01-10 20:11:18 -08:00
+++ b/arch/sparc64/solaris/socksys.c	2005-01-10 20:11:18 -08:00
@@ -150,7 +150,7 @@
 	unsigned int mask = 0;
 
 	ino=filp->f_dentry->d_inode;
-	if (ino && ino->i_sock) {
+	if (ino && S_ISSOCK(ino->i_mode)) {
 		struct sol_socket_struct *sock;
 		sock = (struct sol_socket_struct*)filp->private_data;
 		if (sock && sock->pfirst) {
diff -Nru a/arch/sparc64/solaris/timod.c b/arch/sparc64/solaris/timod.c
--- a/arch/sparc64/solaris/timod.c	2005-01-10 20:11:18 -08:00
+++ b/arch/sparc64/solaris/timod.c	2005-01-10 20:11:18 -08:00
@@ -853,9 +853,7 @@
 	if(!filp) goto out;
 
 	ino = filp->f_dentry->d_inode;
-	if (!ino) goto out;
-
-	if (!ino->i_sock)
+	if (!ino || !S_ISSOCK(ino->i_mode))
 		goto out;
 
 	ctlptr = (struct strbuf __user *)A(arg1);
@@ -923,7 +921,7 @@
 	ino = filp->f_dentry->d_inode;
 	if (!ino) goto out;
 
-	if (!ino->i_sock &&
+	if (!S_ISSOCK(ino->i_mode) &&
 		(imajor(ino) != 30 || iminor(ino) != 1))
 		goto out;
 
diff -Nru a/arch/um/Kconfig b/arch/um/Kconfig
--- a/arch/um/Kconfig	2005-01-10 20:11:19 -08:00
+++ b/arch/um/Kconfig	2005-01-10 20:11:19 -08:00
@@ -31,6 +31,10 @@
 	bool
 	default y
 
+config GENERIC_CALIBRATE_DELAY
+	bool
+	default y
+
 menu "UML-specific options"
 
 config MODE_TT
diff -Nru a/arch/um/Kconfig_char b/arch/um/Kconfig_char
--- a/arch/um/Kconfig_char	2005-01-10 20:11:18 -08:00
+++ b/arch/um/Kconfig_char	2005-01-10 20:11:18 -08:00
@@ -1,6 +1,12 @@
 
 menu "Character Devices"
 
+config STDERR_CONSOLE
+	bool "stderr console"
+	default y
+	help
+	console driver which dumps all printk messages to stderr.
+
 config STDIO_CONSOLE
 	bool
 	default y
diff -Nru a/arch/um/defconfig b/arch/um/defconfig
--- a/arch/um/defconfig	2005-01-10 20:11:20 -08:00
+++ b/arch/um/defconfig	2005-01-10 20:11:20 -08:00
@@ -1,11 +1,13 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.10-rc1-mm5
-# Sun Nov 14 15:27:58 2004
+# Linux kernel version: 2.6.10-rc2-mm4
+# Wed Dec  1 13:45:40 2004
 #
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_USERMODE=y
 CONFIG_MMU=y
+# CONFIG_64_BIT is not set
+CONFIG_TOP_ADDR=0xc0000000
 CONFIG_UID16=y
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
@@ -24,6 +26,7 @@
 # CONFIG_SMP is not set
 CONFIG_NEST_LEVEL=0
 CONFIG_KERNEL_HALF_GIGS=1
+# CONFIG_HIGHMEM is not set
 CONFIG_KERNEL_STACK_ORDER=2
 CONFIG_UML_REAL_TIME_CLOCK=y
 
@@ -85,6 +88,7 @@
 #
 # Character Devices
 #
+CONFIG_STDERR_CONSOLE=y
 CONFIG_STDIO_CONSOLE=y
 CONFIG_SSL=y
 CONFIG_FD_CHAN=y
@@ -113,9 +117,7 @@
 CONFIG_BLK_DEV_COW_COMMON=y
 CONFIG_BLK_DEV_LOOP=m
 CONFIG_BLK_DEV_NBD=m
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_SIZE=4096
-CONFIG_BLK_DEV_INITRD=y
+# CONFIG_BLK_DEV_RAM is not set
 CONFIG_INITRAMFS_SOURCE=""
 
 #
diff -Nru a/arch/um/drivers/Makefile b/arch/um/drivers/Makefile
--- a/arch/um/drivers/Makefile	2005-01-10 20:11:24 -08:00
+++ b/arch/um/drivers/Makefile	2005-01-10 20:11:24 -08:00
@@ -20,8 +20,10 @@
 port-objs := port_kern.o port_user.o
 harddog-objs := harddog_kern.o harddog_user.o
 
-obj-y = 
-obj-$(CONFIG_SSL) += ssl.o 
+obj-y := stdio_console.o $(CHAN_OBJS)
+obj-$(CONFIG_SSL) += ssl.o
+obj-$(CONFIG_STDERR_CONSOLE) += stderr_console.o
+
 obj-$(CONFIG_UML_NET_SLIP) += slip.o
 obj-$(CONFIG_UML_NET_SLIRP) += slirp.o
 obj-$(CONFIG_UML_NET_DAEMON) += daemon.o 
@@ -41,7 +43,6 @@
 obj-$(CONFIG_UML_WATCHDOG) += harddog.o
 obj-$(CONFIG_BLK_DEV_COW_COMMON) += cow_user.o
 
-obj-y += stdio_console.o $(CHAN_OBJS)
 
 USER_SINGLE_OBJS = $(foreach f,$(patsubst %.o,%,$(obj-y) $(obj-m)),$($(f)-objs))
 
diff -Nru a/arch/um/drivers/chan_kern.c b/arch/um/drivers/chan_kern.c
--- a/arch/um/drivers/chan_kern.c	2005-01-10 20:11:23 -08:00
+++ b/arch/um/drivers/chan_kern.c	2005-01-10 20:11:23 -08:00
@@ -189,7 +189,7 @@
 	return(err);
 }
 
-void chan_enable_winch(struct list_head *chans, void *line)
+void chan_enable_winch(struct list_head *chans, struct tty_struct *tty)
 {
 	struct list_head *ele;
 	struct chan *chan;
@@ -197,13 +197,13 @@
 	list_for_each(ele, chans){
 		chan = list_entry(ele, struct chan, list);
 		if(chan->primary && chan->output && chan->ops->winch){
-			register_winch(chan->fd, line);
+			register_winch(chan->fd, tty);
 			return;
 		}
 	}
 }
 
-void enable_chan(struct list_head *chans, void *data)
+void enable_chan(struct list_head *chans, struct tty_struct *tty)
 {
 	struct list_head *ele;
 	struct chan *chan;
@@ -212,7 +212,7 @@
 		chan = list_entry(ele, struct chan, list);
 		if(!chan->opened) continue;
 
-		line_setup_irq(chan->fd, chan->input, chan->output, data);
+		line_setup_irq(chan->fd, chan->input, chan->output, tty);
 	}
 }
 
@@ -240,18 +240,20 @@
 	       int write_irq)
 {
 	struct list_head *ele;
-	struct chan *chan;
+	struct chan *chan = NULL;
 	int n, ret = 0;
 
-	list_for_each(ele, chans){
+	list_for_each(ele, chans) {
 		chan = list_entry(ele, struct chan, list);
-		if(!chan->output || (chan->ops->write == NULL)) continue;
+		if (!chan->output || (chan->ops->write == NULL))
+			continue;
 		n = chan->ops->write(chan->fd, buf, len, chan->data);
-		if(chan->primary){
+		if (chan->primary) {
 			ret = n;
-			if((ret == -EAGAIN) || ((ret >= 0) && (ret < len))){
+			if ((ret == -EAGAIN) || ((ret >= 0) && (ret < len))){
 				reactivate_fd(chan->fd, write_irq);
-				if(ret == -EAGAIN) ret = 0;
+				if (ret == -EAGAIN)
+					ret = 0;
 			}
 		}
 	}
@@ -274,6 +276,20 @@
 	return(ret);
 }
 
+int console_open_chan(struct line *line, struct console *co, struct chan_opts *opts)
+{
+	if (!list_empty(&line->chan_list))
+		return 0;
+
+	if (0 != parse_chan_pair(line->init_str, &line->chan_list,
+				 line->init_pri, co->index, opts))
+		return -1;
+	if (0 != open_chan(&line->chan_list))
+		return -1;
+	printk("Console initialized on /dev/%s%d\n",co->name,co->index);
+	return 0;
+}
+
 int chan_window_size(struct list_head *chans, unsigned short *rows_out,
 		      unsigned short *cols_out)
 {
@@ -516,7 +532,7 @@
 }
 
 void chan_interrupt(struct list_head *chans, struct work_struct *task,
-		    struct tty_struct *tty, int irq, void *dev)
+		    struct tty_struct *tty, int irq)
 {
 	struct list_head *ele, *next;
 	struct chan *chan;
@@ -542,7 +558,7 @@
 			if(chan->primary){
 				if(tty != NULL)
 					tty_hangup(tty);
-				line_disable(dev, irq);
+				line_disable(tty, irq);
 				close_chan(chans);
 				free_chan(chans);
 				return;
diff -Nru a/arch/um/drivers/chan_user.c b/arch/um/drivers/chan_user.c
--- a/arch/um/drivers/chan_user.c	2005-01-10 20:11:15 -08:00
+++ b/arch/um/drivers/chan_user.c	2005-01-10 20:11:15 -08:00
@@ -110,7 +110,7 @@
 	}
 }
 
-static int winch_tramp(int fd, void *device_data, int *fd_out)
+static int winch_tramp(int fd, struct tty_struct *tty, int *fd_out)
 {
 	struct winch_data data;
 	unsigned long stack;
@@ -144,7 +144,7 @@
 	return(pid);
 }
 
-void register_winch(int fd, void *device_data)
+void register_winch(int fd, struct tty_struct *tty)
 {
 	int pid, thread, thread_fd;
 	int count;
@@ -155,10 +155,10 @@
 
 	pid = tcgetpgrp(fd);
 	if(!CHOOSE_MODE_PROC(is_tracer_winch, is_skas_winch, pid, fd,
-			     device_data) && (pid == -1)){
-		thread = winch_tramp(fd, device_data, &thread_fd);
+			     tty) && (pid == -1)){
+		thread = winch_tramp(fd, tty, &thread_fd);
 		if(fd != -1){
-			register_winch_irq(thread_fd, fd, thread, device_data);
+			register_winch_irq(thread_fd, fd, thread, tty);
 
 			count = os_write_file(thread_fd, &c, sizeof(c));
 			if(count != sizeof(c))
diff -Nru a/arch/um/drivers/line.c b/arch/um/drivers/line.c
--- a/arch/um/drivers/line.c	2005-01-10 20:11:22 -08:00
+++ b/arch/um/drivers/line.c	2005-01-10 20:11:22 -08:00
@@ -6,6 +6,7 @@
 #include "linux/sched.h"
 #include "linux/slab.h"
 #include "linux/list.h"
+#include "linux/kd.h"
 #include "linux/interrupt.h"
 #include "linux/devfs_fs_kernel.h"
 #include "asm/uaccess.h"
@@ -22,30 +23,33 @@
 
 static irqreturn_t line_interrupt(int irq, void *data, struct pt_regs *unused)
 {
-	struct line *dev = data;
+	struct tty_struct *tty = data;
+	struct line *line = tty->driver_data;
 
-	if(dev->count > 0) 
-		chan_interrupt(&dev->chan_list, &dev->task, dev->tty, irq, 
-			       dev);
+	if (line)
+		chan_interrupt(&line->chan_list, &line->task, tty, irq);
 	return IRQ_HANDLED;
 }
 
 static void line_timer_cb(void *arg)
 {
-	struct line *dev = arg;
+	struct tty_struct *tty = arg;
+	struct line *line = tty->driver_data;
 
-	line_interrupt(dev->driver->read_irq, dev, NULL);
+	line_interrupt(line->driver->read_irq, arg, NULL);
 }
 
 static int write_room(struct line *dev)
 {
 	int n;
 
-	if(dev->buffer == NULL) return(LINE_BUFSIZE - 1);
+	if (dev->buffer == NULL)
+		return (LINE_BUFSIZE - 1);
 
 	n = dev->head - dev->tail;
-	if(n <= 0) n = LINE_BUFSIZE + n;
-	return(n - 1);
+	if (n <= 0)
+		n = LINE_BUFSIZE + n;
+	return (n - 1);
 }
 
 static int buffer_data(struct line *line, const char *buf, int len)
@@ -54,7 +58,7 @@
 
 	if(line->buffer == NULL){
 		line->buffer = kmalloc(LINE_BUFSIZE, GFP_ATOMIC);
-		if(line->buffer == NULL){
+		if (line->buffer == NULL) {
 			printk("buffer_data - atomic allocation failed\n");
 			return(0);
 		}
@@ -84,14 +88,17 @@
 {
 	int n, count;
 
-	if((line->buffer == NULL) || (line->head == line->tail)) return(1);
+	if ((line->buffer == NULL) || (line->head == line->tail))
+		return(1);
 
-	if(line->tail < line->head){
+	if (line->tail < line->head) {
 		count = line->buffer + LINE_BUFSIZE - line->head;
 		n = write_chan(&line->chan_list, line->head, count,
 			       line->driver->write_irq);
-		if(n < 0) return(n);
-		if(n == count) line->head = line->buffer;
+		if (n < 0)
+			return(n);
+		if (n == count)
+			line->head = line->buffer;
 		else {
 			line->head += n;
 			return(0);
@@ -107,25 +114,22 @@
 	return(line->head == line->tail);
 }
 
-int line_write(struct line *lines, struct tty_struct *tty, const char *buf, int len)
+int line_write(struct tty_struct *tty, const unsigned char *buf, int len)
 {
-	struct line *line;
+	struct line *line = tty->driver_data;
 	unsigned long flags;
-	int n, err, i, ret = 0;
+	int n, err, ret = 0;
 
 	if(tty->stopped) return 0;
 
-	i = tty->index;
-	line = &lines[i];
-
 	down(&line->sem);
 	if(line->head != line->tail){
 		local_irq_save(flags);
-		ret += buffer_data(line, buf, len);
+		ret = buffer_data(line, buf, len);
 		err = flush_buffer(line);
 		local_irq_restore(flags);
 		if(err <= 0)
-			goto out_up;
+			ret = err;
 	}
 	else {
 		n = write_chan(&line->chan_list, buf, len, 
@@ -145,19 +149,92 @@
 	return(ret);
 }
 
+void line_put_char(struct tty_struct *tty, unsigned char ch)
+{
+	line_write(tty, &ch, sizeof(ch));
+}
+
+void line_set_termios(struct tty_struct *tty, struct termios * old)
+{
+	/* nothing */
+}
+
+int line_chars_in_buffer(struct tty_struct *tty)
+{
+	return 0;
+}
+
+static struct {
+	int  cmd;
+	char *level;
+	char *name;
+} tty_ioctls[] = {
+	/* don't print these, they flood the log ... */
+	{ TCGETS,      NULL,       "TCGETS"      },
+        { TCSETS,      NULL,       "TCSETS"      },
+        { TCSETSW,     NULL,       "TCSETSW"     },
+        { TCFLSH,      NULL,       "TCFLSH"      },
+        { TCSBRK,      NULL,       "TCSBRK"      },
+
+	/* general tty stuff */
+        { TCSETSF,     KERN_DEBUG, "TCSETSF"     },
+        { TCGETA,      KERN_DEBUG, "TCGETA"      },
+        { TIOCMGET,    KERN_DEBUG, "TIOCMGET"    },
+        { TCSBRKP,     KERN_DEBUG, "TCSBRKP"     },
+        { TIOCMSET,    KERN_DEBUG, "TIOCMSET"    },
+
+	/* linux-specific ones */
+	{ TIOCLINUX,   KERN_INFO,  "TIOCLINUX"   },
+	{ KDGKBMODE,   KERN_INFO,  "KDGKBMODE"   },
+	{ KDGKBTYPE,   KERN_INFO,  "KDGKBTYPE"   },
+	{ KDSIGACCEPT, KERN_INFO,  "KDSIGACCEPT" },
+};
+
+int line_ioctl(struct tty_struct *tty, struct file * file,
+	       unsigned int cmd, unsigned long arg)
+{
+	int ret;
+	int i;
+
+	ret = 0;
+	switch(cmd) {
+#if 0
+	case TCwhatever:
+		/* do something */
+		break;
+#endif
+	default:
+		for (i = 0; i < ARRAY_SIZE(tty_ioctls); i++)
+			if (cmd == tty_ioctls[i].cmd)
+				break;
+		if (i < ARRAY_SIZE(tty_ioctls)) {
+			if (NULL != tty_ioctls[i].level)
+				printk("%s%s: %s: ioctl %s called\n",
+				       tty_ioctls[i].level, __FUNCTION__,
+				       tty->name, tty_ioctls[i].name);
+		} else {
+			printk(KERN_ERR "%s: %s: unknown ioctl: 0x%x\n",
+			       __FUNCTION__, tty->name, cmd);
+		}
+		ret = -ENOIOCTLCMD;
+		break;
+	}
+	return(ret);
+}
+
 static irqreturn_t line_write_interrupt(int irq, void *data,
 					struct pt_regs *unused)
 {
-	struct line *dev = data;
-	struct tty_struct *tty = dev->tty;
+	struct tty_struct *tty = data;
+	struct line *line = tty->driver_data;
 	int err;
 
-	err = flush_buffer(dev);
+	err = flush_buffer(line);
 	if(err == 0)
 		return(IRQ_NONE);
 	else if(err < 0){
-		dev->head = dev->buffer;
-		dev->tail = dev->buffer;
+		line->head = line->buffer;
+		line->tail = line->buffer;
 	}
 
 	if(tty == NULL)
@@ -178,39 +255,42 @@
 	return(IRQ_HANDLED);
 }
 
-int line_setup_irq(int fd, int input, int output, void *data)
+int line_setup_irq(int fd, int input, int output, struct tty_struct *tty)
 {
-	struct line *line = data;
+	struct line *line = tty->driver_data;
 	struct line_driver *driver = line->driver;
 	int err = 0, flags = SA_INTERRUPT | SA_SHIRQ | SA_SAMPLE_RANDOM;
 
 	if(input) err = um_request_irq(driver->read_irq, fd, IRQ_READ, 
 				       line_interrupt, flags, 
-				       driver->read_irq_name, line);
+				       driver->read_irq_name, tty);
 	if(err) return(err);
 	if(output) err = um_request_irq(driver->write_irq, fd, IRQ_WRITE, 
 					line_write_interrupt, flags, 
-					driver->write_irq_name, line);
+					driver->write_irq_name, tty);
 	line->have_irq = 1;
 	return(err);
 }
 
-void line_disable(struct line *line, int current_irq)
+void line_disable(struct tty_struct *tty, int current_irq)
 {
-	if(!line->have_irq) return;
+	struct line *line = tty->driver_data;
+
+	if(!line->have_irq)
+		return;
 
 	if(line->driver->read_irq == current_irq)
-		free_irq_later(line->driver->read_irq, line);
+		free_irq_later(line->driver->read_irq, tty);
 	else {
-		free_irq_by_irq_and_dev(line->driver->read_irq, line);
-		free_irq(line->driver->read_irq, line);
+		free_irq_by_irq_and_dev(line->driver->read_irq, tty);
+		free_irq(line->driver->read_irq, tty);
 	}
 
 	if(line->driver->write_irq == current_irq)
-		free_irq_later(line->driver->write_irq, line);
+		free_irq_later(line->driver->write_irq, tty);
 	else {
-		free_irq_by_irq_and_dev(line->driver->write_irq, line);
-		free_irq(line->driver->write_irq, line);
+		free_irq_by_irq_and_dev(line->driver->write_irq, tty);
+		free_irq(line->driver->write_irq, tty);
 	}
 
 	line->have_irq = 0;
@@ -220,73 +300,51 @@
 	      struct chan_opts *opts)
 {
 	struct line *line;
-	int n, err = 0;
+	int err = 0;
 
-	if(tty == NULL) n = 0;
-	else n = tty->index;
-	line = &lines[n];
+	line = &lines[tty->index];
+	tty->driver_data = line;
 
 	down(&line->sem);
-	if(line->count == 0){
-		if(!line->valid){
+	if (tty->count == 1) {
+		if (!line->valid) {
 			err = -ENODEV;
 			goto out;
 		}
-		if(list_empty(&line->chan_list)){
+		if (list_empty(&line->chan_list)) {
 			err = parse_chan_pair(line->init_str, &line->chan_list,
-					      line->init_pri, n, opts);
+					      line->init_pri, tty->index, opts);
 			if(err) goto out;
 			err = open_chan(&line->chan_list);
 			if(err) goto out;
 		}
-		enable_chan(&line->chan_list, line);
-		INIT_WORK(&line->task, line_timer_cb, line);
+		enable_chan(&line->chan_list, tty);
+		INIT_WORK(&line->task, line_timer_cb, tty);
 	}
 
 	if(!line->sigio){
-		chan_enable_winch(&line->chan_list, line);
+		chan_enable_winch(&line->chan_list, tty);
 		line->sigio = 1;
 	}
-
-	/* This is outside the if because the initial console is opened
-	 * with tty == NULL
-	 */
-	line->tty = tty;
-
-	if(tty != NULL){
-		tty->driver_data = line;
-		chan_window_size(&line->chan_list, &tty->winsize.ws_row, 
-				 &tty->winsize.ws_col);
-	}
-
+	chan_window_size(&line->chan_list, &tty->winsize.ws_row,
+			 &tty->winsize.ws_col);
 	line->count++;
- out:
+
+out:
 	up(&line->sem);
 	return(err);
 }
 
-void line_close(struct line *lines, struct tty_struct *tty)
+void line_close(struct tty_struct *tty, struct file * filp)
 {
-	struct line *line;
-	int n;
-
-	if(tty == NULL) n = 0;
-	else n = tty->index;
-	line = &lines[n];
+	struct line *line = tty->driver_data;
 
 	down(&line->sem);
 	line->count--;
-
-	/* I don't like this, but I can't think of anything better.  What's
-	 * going on is that the tty is in the process of being closed for
-	 * the last time.  Its count hasn't been dropped yet, so it's still
-	 * at 1.  This may happen when line->count != 0 because of the initial
-	 * console open (without a tty) bumping it up to 1.
-	 */
-	if((line->tty != NULL) && (line->tty->count == 1))
-		line->tty = NULL;
-	if(line->count == 0)
-		line_disable(line, -1);
+	if (tty->count == 1) {
+		line_disable(tty, -1);
+		tty->driver_data = NULL;
+	}
 	up(&line->sem);
 }
 
@@ -319,14 +377,15 @@
 		       n, num - 1);
 		return(0);
 	}
-	else if(n >= 0){
-		if(lines[n].count > 0){
+	else if (n >= 0){
+		if (lines[n].count > 0) {
 			printk("line_setup - device %d is open\n", n);
 			return(0);
 		}
-		if(lines[n].init_pri <= INIT_ONE){
+		if (lines[n].init_pri <= INIT_ONE){
 			lines[n].init_pri = INIT_ONE;
-			if(!strcmp(init, "none")) lines[n].valid = 0;
+			if (!strcmp(init, "none"))
+				lines[n].valid = 0;
 			else {
 				lines[n].init_str = init;
 				lines[n].valid = 1;
@@ -406,8 +465,15 @@
 int line_write_room(struct tty_struct *tty)
 {
 	struct line *dev = tty->driver_data;
+	int room;
 
-	return(write_room(dev));
+	if (tty->stopped)
+		return 0;
+	room = write_room(dev);
+	if (0 == room)
+		printk(KERN_DEBUG "%s: %s: no room left in buffer\n",
+		       __FUNCTION__,tty->name);
+	return room;
 }
 
 struct tty_driver *line_register_devfs(struct lines *set,
@@ -415,8 +481,7 @@
 			 struct tty_operations *ops, struct line *lines,
 			 int nlines)
 {
-	int err, i;
-	char *from, *to;
+	int i;
 	struct tty_driver *driver = alloc_tty_driver(nlines);
 
 	if (!driver)
@@ -433,14 +498,12 @@
 	driver->init_termios = tty_std_termios;
 	tty_set_operations(driver, ops);
 
-	if (tty_register_driver(driver))
-		panic("line_register_devfs : Couldn't register driver\n");
-
-	from = line_driver->symlink_from;
-	to = line_driver->symlink_to;
-	err = devfs_mk_symlink(from, to);
-	if(err) printk("Symlink creation from /dev/%s to /dev/%s "
-		       "returned %d\n", from, to, err);
+	if (tty_register_driver(driver)) {
+		printk("%s: can't register %s driver\n",
+		       __FUNCTION__,line_driver->name);
+		put_tty_driver(driver);
+		return NULL;
+	}
 
 	for(i = 0; i < nlines; i++){
 		if(!lines[i].valid) 
@@ -474,13 +537,14 @@
 	int fd;
 	int tty_fd;
 	int pid;
-	struct line *line;
+	struct tty_struct *tty;
 };
 
 irqreturn_t winch_interrupt(int irq, void *data, struct pt_regs *unused)
 {
 	struct winch *winch = data;
 	struct tty_struct *tty;
+	struct line *line;
 	int err;
 	char c;
 
@@ -497,9 +561,10 @@
 			goto out;
 		}
 	}
-	tty = winch->line->tty;
-	if(tty != NULL){
-		chan_window_size(&winch->line->chan_list, 
+	tty  = winch->tty;
+	line = tty->driver_data;
+	if (tty != NULL) {
+		chan_window_size(&line->chan_list,
 				 &tty->winsize.ws_row, 
 				 &tty->winsize.ws_col);
 		kill_pg(tty->pgrp, SIGWINCH, 1);
@@ -513,13 +578,13 @@
 DECLARE_MUTEX(winch_handler_sem);
 LIST_HEAD(winch_handlers);
 
-void register_winch_irq(int fd, int tty_fd, int pid, void *line)
+void register_winch_irq(int fd, int tty_fd, int pid, struct tty_struct *tty)
 {
 	struct winch *winch;
 
 	down(&winch_handler_sem);
 	winch = kmalloc(sizeof(*winch), GFP_KERNEL);
-	if(winch == NULL){
+	if (winch == NULL) {
 		printk("register_winch_irq - kmalloc failed\n");
 		goto out;
 	}
@@ -527,7 +592,7 @@
 				   .fd  	= fd,
 				   .tty_fd 	= tty_fd,
 				   .pid  	= pid,
-				   .line 	= line });
+				   .tty 	= tty });
 	list_add(&winch->list, &winch_handlers);
 	if(um_request_irq(WINCH_IRQ, fd, IRQ_READ, winch_interrupt, 
 			  SA_INTERRUPT | SA_SHIRQ | SA_SAMPLE_RANDOM, 
@@ -552,7 +617,6 @@
 			os_kill_process(winch->pid, 1);
 	}
 }
-
 __uml_exitcall(winch_cleanup);
 
 char *add_xterm_umid(char *base)
diff -Nru a/arch/um/drivers/mmapper_kern.c b/arch/um/drivers/mmapper_kern.c
--- a/arch/um/drivers/mmapper_kern.c	2005-01-10 20:11:16 -08:00
+++ b/arch/um/drivers/mmapper_kern.c	2005-01-10 20:11:16 -08:00
@@ -128,7 +128,6 @@
 	p_buf = __pa(v_buf);
 
 	devfs_mk_cdev(MKDEV(30, 0), S_IFCHR|S_IRUGO|S_IWUGO, "mmapper");
-	devfs_mk_symlink("mmapper0", "mmapper");
 	return(0);
 }
 
diff -Nru a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c
--- a/arch/um/drivers/net_kern.c	2005-01-10 20:11:19 -08:00
+++ b/arch/um/drivers/net_kern.c	2005-01-10 20:11:19 -08:00
@@ -30,6 +30,8 @@
 #include "irq_user.h"
 #include "irq_kern.h"
 
+#define DRIVER_NAME "uml-netdev"
+
 static spinlock_t opened_lock = SPIN_LOCK_UNLOCKED;
 LIST_HEAD(opened);
 
@@ -126,10 +128,6 @@
 	lp->tl.data = (unsigned long) &lp->user;
 	netif_start_queue(dev);
 
-	spin_lock(&opened_lock);
-	list_add(&lp->list, &opened);
-	spin_unlock(&opened_lock);
-
 	/* clear buffer - it can happen that the host side of the interface
 	 * is full when we get here.  In this case, new data is never queued,
 	 * SIGIOs never arrive, and the net never works.
@@ -150,11 +148,9 @@
 
 	free_irq_by_irq_and_dev(dev->irq, dev);
 	free_irq(dev->irq, dev);
-	if(lp->close != NULL) (*lp->close)(lp->fd, &lp->user);
+	if(lp->close != NULL)
+		(*lp->close)(lp->fd, &lp->user);
 	lp->fd = -1;
-	spin_lock(&opened_lock);
-	list_del(&lp->list);
-	spin_unlock(&opened_lock);
 
 	spin_unlock(&lp->lock);
 	return 0;
@@ -252,7 +248,7 @@
 {
 	static const struct ethtool_drvinfo info = {
 		.cmd     = ETHTOOL_GDRVINFO,
-		.driver  = "uml virtual ethernet",
+		.driver  = DRIVER_NAME,
 		.version = "42",
 	};
 	void *useraddr;
@@ -289,6 +285,12 @@
 static spinlock_t devices_lock = SPIN_LOCK_UNLOCKED;
 static struct list_head devices = LIST_HEAD_INIT(devices);
 
+static struct device_driver uml_net_driver = {
+	.name  = DRIVER_NAME,
+	.bus   = &platform_bus_type,
+};
+static int driver_registered;
+
 static int eth_configure(int n, void *init, char *mac,
 			 struct transport *transport)
 {
@@ -330,6 +332,16 @@
 		return 1;
 	}
 
+	/* sysfs register */
+	if (!driver_registered) {
+		driver_register(&uml_net_driver);
+		driver_registered = 1;
+	}
+	device->pdev.id = n;
+	device->pdev.name = DRIVER_NAME;
+	platform_device_register(&device->pdev);
+	SET_NETDEV_DEV(dev,&device->pdev.dev);
+
 	/* If this name ends up conflicting with an existing registered
 	 * netdevice, that is OK, register_netdev{,ice}() will notice this
 	 * and fail.
@@ -397,6 +409,11 @@
 
 	if (device->have_mac)
 		set_ether_mac(dev, device->mac);
+
+	spin_lock(&opened_lock);
+	list_add(&lp->list, &opened);
+	spin_unlock(&opened_lock);
+
 	return(0);
 }
 
@@ -560,6 +577,7 @@
 "    Configure a network device.\n\n"
 );
 
+#if 0
 static int eth_init(void)
 {
 	struct list_head *ele, *next;
@@ -574,8 +592,8 @@
 	
 	return(1);
 }
-
 __initcall(eth_init);
+#endif
 
 static int net_config(char *str)
 {
@@ -616,6 +634,7 @@
 	if(lp->fd > 0) return(-1);
 	if(lp->remove != NULL) (*lp->remove)(&lp->user);
 	unregister_netdev(dev);
+	platform_device_unregister(&device->pdev);
 
 	list_del(&device->list);
 	kfree(device);
@@ -705,7 +724,7 @@
 static void close_devices(void)
 {
 	struct list_head *ele;
-	struct uml_net_private *lp;	
+	struct uml_net_private *lp;
 
 	list_for_each(ele, &opened){
 		lp = list_entry(ele, struct uml_net_private, list);
diff -Nru a/arch/um/drivers/net_user.c b/arch/um/drivers/net_user.c
--- a/arch/um/drivers/net_user.c	2005-01-10 20:11:17 -08:00
+++ b/arch/um/drivers/net_user.c	2005-01-10 20:11:17 -08:00
@@ -173,10 +173,12 @@
 	pe_data.stdout = fds[1];
 	pid = run_helper(change_pre_exec, &pe_data, argv, NULL);
 
-	os_close_file(fds[1]);
 	read_output(fds[0], output, output_len);
+	os_close_file(fds[0]);
+	os_close_file(fds[1]);
 
-	CATCH_EINTR(err = waitpid(pid, NULL, 0));
+	if (pid > 0)
+		CATCH_EINTR(err = waitpid(pid, NULL, 0));
 	return(pid);
 }
 
diff -Nru a/arch/um/drivers/pty.c b/arch/um/drivers/pty.c
--- a/arch/um/drivers/pty.c	2005-01-10 20:11:22 -08:00
+++ b/arch/um/drivers/pty.c	2005-01-10 20:11:22 -08:00
@@ -58,7 +58,8 @@
 	dev = ptsname(fd);
 	sprintf(data->dev_name, "%s", dev);
 	*dev_out = data->dev_name;
-	if(data->announce) (*data->announce)(dev, data->dev);
+	if (data->announce)
+		(*data->announce)(dev, data->dev);
 	return(fd);
 }
 
diff -Nru a/arch/um/drivers/ssl.c b/arch/um/drivers/ssl.c
--- a/arch/um/drivers/ssl.c	2005-01-10 20:11:19 -08:00
+++ b/arch/um/drivers/ssl.c	2005-01-10 20:11:19 -08:00
@@ -54,7 +54,7 @@
 
 static struct line_driver driver = {
 	.name 			= "UML serial line",
-	.device_name 		= "ttS",
+	.device_name 		= "ttyS",
 	.devfs_name 		= "tts/",
 	.major 			= TTY_MAJOR,
 	.minor_start 		= 64,
@@ -103,30 +103,10 @@
 
 int ssl_open(struct tty_struct *tty, struct file *filp)
 {
-	return(line_open(serial_lines, tty, &opts));
-}
-
-static void ssl_close(struct tty_struct *tty, struct file * filp)
-{
-	line_close(serial_lines, tty);
-}
-
-static int ssl_write(struct tty_struct * tty,
-		     const unsigned char *buf, int count)
-{
-	return(line_write(serial_lines, tty, buf, count));
-}
-
-static void ssl_put_char(struct tty_struct *tty, unsigned char ch)
-{
-	line_write(serial_lines, tty, &ch, sizeof(ch));
-}
-
-static void ssl_flush_chars(struct tty_struct *tty)
-{
-	return;
+	return line_open(serial_lines, tty, &opts);
 }
 
+#if 0
 static int ssl_chars_in_buffer(struct tty_struct *tty)
 {
 	return(0);
@@ -137,34 +117,6 @@
 	return;
 }
 
-static int ssl_ioctl(struct tty_struct *tty, struct file * file,
-		     unsigned int cmd, unsigned long arg)
-{
-	int ret;
-
-	ret = 0;
-	switch(cmd){
-	case TCGETS:
-	case TCSETS:
-	case TCFLSH:
-	case TCSETSF:
-	case TCSETSW:
-	case TCGETA:
-	case TIOCMGET:
-	case TCSBRK:
-	case TCSBRKP:
-	case TIOCMSET:
-		ret = -ENOIOCTLCMD;
-		break;
-	default:
-		printk(KERN_ERR 
-		       "Unimplemented ioctl in ssl_ioctl : 0x%x\n", cmd);
-		ret = -ENOIOCTLCMD;
-		break;
-	}
-	return(ret);
-}
-
 static void ssl_throttle(struct tty_struct * tty)
 {
 	printk(KERN_ERR "Someone should implement ssl_throttle\n");
@@ -175,11 +127,6 @@
 	printk(KERN_ERR "Someone should implement ssl_unthrottle\n");
 }
 
-static void ssl_set_termios(struct tty_struct *tty, 
-			    struct termios *old_termios)
-{
-}
-
 static void ssl_stop(struct tty_struct *tty)
 {
 	printk(KERN_ERR "Someone should implement ssl_stop\n");
@@ -193,23 +140,26 @@
 void ssl_hangup(struct tty_struct *tty)
 {
 }
+#endif
 
 static struct tty_operations ssl_ops = {
 	.open 	 		= ssl_open,
-	.close 	 		= ssl_close,
-	.write 	 		= ssl_write,
-	.put_char 		= ssl_put_char,
+	.close 	 		= line_close,
+	.write 	 		= line_write,
+	.put_char 		= line_put_char,
+	.write_room		= line_write_room,
+	.chars_in_buffer 	= line_chars_in_buffer,
+	.set_termios 		= line_set_termios,
+	.ioctl 	 		= line_ioctl,
+#if 0
 	.flush_chars 		= ssl_flush_chars,
-	.chars_in_buffer 	= ssl_chars_in_buffer,
 	.flush_buffer 		= ssl_flush_buffer,
-	.ioctl 	 		= ssl_ioctl,
 	.throttle 		= ssl_throttle,
 	.unthrottle 		= ssl_unthrottle,
-	.set_termios 		= ssl_set_termios,
 	.stop 	 		= ssl_stop,
 	.start 	 		= ssl_start,
 	.hangup 	 	= ssl_hangup,
-	.write_room		= line_write_room,
+#endif
 };
 
 /* Changed by ssl_init and referenced by ssl_exit, which are both serialized
@@ -221,11 +171,10 @@
 			      unsigned len)
 {
 	struct line *line = &serial_lines[c->index];
-	if(ssl_init_done)
-		down(&line->sem);
+
+	down(&line->sem);
 	console_write_chan(&line->chan_list, string, len);
-	if(ssl_init_done)
-		up(&line->sem);
+	up(&line->sem);
 }
 
 static struct tty_driver *ssl_console_device(struct console *c, int *index)
@@ -236,16 +185,18 @@
 
 static int ssl_console_setup(struct console *co, char *options)
 {
-	return(0);
+	struct line *line = &serial_lines[co->index];
+
+	return console_open_chan(line,co,&opts);
 }
 
 static struct console ssl_cons = {
-	name:		"ttyS",
-	write:		ssl_console_write,
-	device:		ssl_console_device,
-	setup:		ssl_console_setup,
-	flags:		CON_PRINTBUFFER,
-	index:		-1,
+	.name		= "ttyS",
+	.write		= ssl_console_write,
+	.device		= ssl_console_device,
+	.setup		= ssl_console_setup,
+	.flags		= CON_PRINTBUFFER,
+	.index		= -1,
 };
 
 int ssl_init(void)
@@ -254,22 +205,30 @@
 
 	printk(KERN_INFO "Initializing software serial port version %d\n", 
 	       ssl_version);
-
 	ssl_driver = line_register_devfs(&lines, &driver, &ssl_ops,
-		serial_lines, sizeof(serial_lines)/sizeof(serial_lines[0]));
+					 serial_lines, ARRAY_SIZE(serial_lines));
 
 	lines_init(serial_lines, sizeof(serial_lines)/sizeof(serial_lines[0]));
 
 	new_title = add_xterm_umid(opts.xterm_title);
-	if(new_title != NULL) opts.xterm_title = new_title;
+	if (new_title != NULL)
+		opts.xterm_title = new_title;
 
-	register_console(&ssl_cons);
 	ssl_init_done = 1;
+	register_console(&ssl_cons);
 	return(0);
 }
-
 late_initcall(ssl_init);
 
+static void ssl_exit(void)
+{
+	if (!ssl_init_done)
+		return;
+	close_lines(serial_lines,
+		    sizeof(serial_lines)/sizeof(serial_lines[0]));
+}
+__uml_exitcall(ssl_exit);
+
 static int ssl_chan_setup(char *str)
 {
 	return(line_setup(serial_lines,
@@ -279,15 +238,6 @@
 
 __setup("ssl", ssl_chan_setup);
 __channel_help(ssl_chan_setup, "ssl");
-
-static void ssl_exit(void)
-{
-	if(!ssl_init_done) return;
-	close_lines(serial_lines, 
-		    sizeof(serial_lines)/sizeof(serial_lines[0]));
-}
-
-__uml_exitcall(ssl_exit);
 
 /*
  * Overrides for Emacs so that we follow Linus's tabbing style.
diff -Nru a/arch/um/drivers/stderr_console.c b/arch/um/drivers/stderr_console.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/um/drivers/stderr_console.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,45 @@
+#include <linux/init.h>
+#include <linux/console.h>
+
+#include "chan_user.h"
+
+/* ----------------------------------------------------------------------------- */
+/* trivial console driver -- simply dump everything to stderr                    */
+
+/*
+ * Don't register by default -- as this registeres very early in the
+ * boot process it becomes the default console.  And as this isn't a
+ * real tty driver init isn't able to open /dev/console then.
+ *
+ * In most cases this isn't what you want ...
+ */
+static int use_stderr_console = 0;
+
+static void stderr_console_write(struct console *console, const char *string,
+				 unsigned len)
+{
+	generic_write(2 /* stderr */, string, len, NULL);
+}
+
+static struct console stderr_console = {
+	.name		"stderr",
+	.write		stderr_console_write,
+	.flags		CON_PRINTBUFFER,
+};
+
+static int __init stderr_console_init(void)
+{
+	if (use_stderr_console)
+		register_console(&stderr_console);
+	return 0;
+}
+console_initcall(stderr_console_init);
+
+static int stderr_setup(char *str)
+{
+	if (!str)
+		return 0;
+	use_stderr_console = simple_strtoul(str,&str,0);
+	return 1;
+}
+__setup("stderr=", stderr_setup);
diff -Nru a/arch/um/drivers/stdio_console.c b/arch/um/drivers/stdio_console.c
--- a/arch/um/drivers/stdio_console.c	2005-01-10 20:11:17 -08:00
+++ b/arch/um/drivers/stdio_console.c	2005-01-10 20:11:17 -08:00
@@ -30,7 +30,9 @@
 #include "init.h"
 #include "2_5compat.h"
 
-#define MAX_TTYS (8)
+#define MAX_TTYS (16)
+
+/* ----------------------------------------------------------------------------- */
 
 /* Referenced only by tty_driver below - presumably it's locked correctly
  * by the tty driver.
@@ -38,31 +40,6 @@
 
 static struct tty_driver *console_driver;
 
-static struct chan_ops init_console_ops = {
-	.type		= "you shouldn't see this",
-	.init  		= NULL,
-	.open  		= NULL,
-	.close 		= NULL,
-	.read  		= NULL,
-	.write 		= NULL,
-	.console_write 	= generic_write,
-	.window_size 	= NULL,
-	.free  		= NULL,
-	.winch		= 0,
-};
-
-static struct chan init_console_chan = {
-	.list  		= { },
-	.primary 	= 1,
-	.input 		= 0,
-	.output 	= 1,
-	.opened 	= 1,
-	.fd 		= 1,
-	.pri 		= INIT_STATIC,
-	.ops 		= &init_console_ops,
-	.data 		= NULL
-};
-
 void stdio_announce(char *dev_name, int dev)
 {
 	printk(KERN_INFO "Virtual console %d assigned device '%s'\n", dev,
@@ -128,79 +105,31 @@
 	return(line_remove(vts, sizeof(vts)/sizeof(vts[0]), str));
 }
 
-static int open_console(struct tty_struct *tty)
-{
-	return(line_open(vts, tty, &opts));
-}
-
 static int con_open(struct tty_struct *tty, struct file *filp)
 {
-	return(open_console(tty));
-}
-
-static void con_close(struct tty_struct *tty, struct file *filp)
-{
-	line_close(vts, tty);
-}
-
-static int con_write(struct tty_struct *tty, 
-		     const unsigned char *buf, int count)
-{
-	 return(line_write(vts, tty, buf, count));
-}
-
-static void set_termios(struct tty_struct *tty, struct termios * old)
-{
-}
-
-static int chars_in_buffer(struct tty_struct *tty)
-{
-	return(0);
+	return line_open(vts, tty, &opts);
 }
 
 static int con_init_done = 0;
 
 static struct tty_operations console_ops = {
 	.open 	 		= con_open,
-	.close 	 		= con_close,
-	.write 	 		= con_write,
-	.chars_in_buffer 	= chars_in_buffer,
-	.set_termios 		= set_termios,
-	.write_room		= line_write_room,
+	.close 	 		= line_close,
+	.write 	 		= line_write,
+ 	.write_room		= line_write_room,
+	.chars_in_buffer 	= line_chars_in_buffer,
+	.set_termios 		= line_set_termios,
+	.ioctl 	 		= line_ioctl,
 };
 
-int stdio_init(void)
-{
-	char *new_title;
-
-	printk(KERN_INFO "Initializing stdio console driver\n");
-
-	console_driver = line_register_devfs(&console_lines, &driver,
-					     &console_ops, vts,
-					     sizeof(vts)/sizeof(vts[0]));
-
-	lines_init(vts, sizeof(vts)/sizeof(vts[0]));
-
-	new_title = add_xterm_umid(opts.xterm_title);
-	if(new_title != NULL) opts.xterm_title = new_title;
-
-	open_console(NULL);
-	con_init_done = 1;
-	return(0);
-}
-
-late_initcall(stdio_init);
-
 static void uml_console_write(struct console *console, const char *string,
 			  unsigned len)
 {
 	struct line *line = &vts[console->index];
 
-	if(con_init_done)
-		down(&line->sem);
+	down(&line->sem);
 	console_write_chan(&line->chan_list, string, len);
-	if(con_init_done)
-		up(&line->sem);
+	up(&line->sem);
 }
 
 static struct tty_driver *uml_console_device(struct console *c, int *index)
@@ -211,43 +140,58 @@
 
 static int uml_console_setup(struct console *co, char *options)
 {
-	return(0);
+	struct line *line = &vts[co->index];
+
+	return console_open_chan(line,co,&opts);
 }
 
 static struct console stdiocons = {
-	name:		"tty",
-	write:		uml_console_write,
-	device:		uml_console_device,
-	setup:		uml_console_setup,
-	flags:		CON_PRINTBUFFER,
-	index:		-1,
+	.name		= "tty",
+	.write		= uml_console_write,
+	.device		= uml_console_device,
+	.setup		= uml_console_setup,
+	.flags		= CON_PRINTBUFFER,
+	.index		= -1,
+	.data           = &vts,
 };
 
-static int __init stdio_console_init(void)
+int stdio_init(void)
 {
-	INIT_LIST_HEAD(&vts[0].chan_list);
-	list_add(&init_console_chan.list, &vts[0].chan_list);
+	char *new_title;
+
+	console_driver = line_register_devfs(&console_lines, &driver,
+					     &console_ops, vts,
+					     ARRAY_SIZE(vts));
+	if (NULL == console_driver)
+		return -1;
+	printk(KERN_INFO "Initialized stdio console driver\n");
+
+	lines_init(vts, sizeof(vts)/sizeof(vts[0]));
+
+	new_title = add_xterm_umid(opts.xterm_title);
+	if(new_title != NULL)
+		opts.xterm_title = new_title;
+
+	con_init_done = 1;
 	register_console(&stdiocons);
 	return(0);
 }
+late_initcall(stdio_init);
 
-console_initcall(stdio_console_init);
+static void console_exit(void)
+{
+	if (!con_init_done)
+		return;
+	close_lines(vts, sizeof(vts)/sizeof(vts[0]));
+}
+__uml_exitcall(console_exit);
 
 static int console_chan_setup(char *str)
 {
 	return(line_setup(vts, sizeof(vts)/sizeof(vts[0]), str, 1));
 }
-
 __setup("con", console_chan_setup);
 __channel_help(console_chan_setup, "con");
-
-static void console_exit(void)
-{
-	if(!con_init_done) return;
-	close_lines(vts, sizeof(vts)/sizeof(vts[0]));
-}
-
-__uml_exitcall(console_exit);
 
 /*
  * Overrides for Emacs so that we follow Linus's tabbing style.
diff -Nru a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
--- a/arch/um/drivers/ubd_kern.c	2005-01-10 20:11:19 -08:00
+++ b/arch/um/drivers/ubd_kern.c	2005-01-10 20:11:19 -08:00
@@ -54,6 +54,8 @@
 #include "mem.h"
 #include "mem_kern.h"
 
+#define DRIVER_NAME "uml-blkdev"
+
 static spinlock_t ubd_io_lock = SPIN_LOCK_UNLOCKED;
 static spinlock_t ubd_lock = SPIN_LOCK_UNLOCKED;
 
@@ -117,6 +119,7 @@
 	struct openflags openflags;
 	int no_cow;
 	struct cow cow;
+	struct platform_device pdev;
 
 	int map_writes;
 	int map_reads;
@@ -585,6 +588,14 @@
 		sprintf(disk->devfs_name, "ubd_fake/disc%d", unit);
 	}
 
+	/* sysfs register (not for ide fake devices) */
+	if (major == MAJOR_NR) {
+		ubd_dev[unit].pdev.id   = unit;
+		ubd_dev[unit].pdev.name = DRIVER_NAME;
+		platform_device_register(&ubd_dev[unit].pdev);
+		disk->driverfs_dev = &ubd_dev[unit].pdev.dev;
+	}
+
 	disk->private_data = &ubd_dev[unit];
 	disk->queue = ubd_queue;
 	add_disk(disk);
@@ -718,6 +729,7 @@
 		fake_gendisk[n] = NULL;
 	}
 
+	platform_device_unregister(&dev->pdev);
 	*dev = ((struct ubd) DEFAULT_UBD);
 	err = 0;
  out:
@@ -740,6 +752,11 @@
 
 __initcall(ubd_mc_init);
 
+static struct device_driver ubd_driver = {
+	.name  = DRIVER_NAME,
+	.bus   = &platform_bus_type,
+};
+
 int ubd_init(void)
 {
         int i;
@@ -762,6 +779,7 @@
 		if (register_blkdev(fake_major, "ubd"))
 			return -1;
 	}
+	driver_register(&ubd_driver);
 	for (i = 0; i < MAX_DEV; i++) 
 		ubd_add(i);
 	return 0;
diff -Nru a/arch/um/drivers/xterm.c b/arch/um/drivers/xterm.c
--- a/arch/um/drivers/xterm.c	2005-01-10 20:11:16 -08:00
+++ b/arch/um/drivers/xterm.c	2005-01-10 20:11:16 -08:00
@@ -126,9 +126,9 @@
 
 	if(data->stack == 0) free_stack(stack, 0);
 
-	if(data->direct_rcv)
+	if (data->direct_rcv) {
 		new = os_rcv_fd(fd, &data->helper_pid);
-	else {
+	} else {
 		err = os_set_fd_block(fd, 0);
 		if(err < 0){
 			printk("xterm_open : failed to set descriptor "
diff -Nru a/arch/um/include/chan_kern.h b/arch/um/include/chan_kern.h
--- a/arch/um/include/chan_kern.h	2005-01-10 20:11:19 -08:00
+++ b/arch/um/include/chan_kern.h	2005-01-10 20:11:19 -08:00
@@ -8,7 +8,9 @@
 
 #include "linux/tty.h"
 #include "linux/list.h"
+#include "linux/console.h"
 #include "chan_user.h"
+#include "line.h"
 
 struct chan {
 	struct list_head list;
@@ -24,7 +26,7 @@
 };
 
 extern void chan_interrupt(struct list_head *chans, struct work_struct *task,
-			   struct tty_struct *tty, int irq, void *dev);
+			   struct tty_struct *tty, int irq);
 extern int parse_chan_pair(char *str, struct list_head *chans, int pri, 
 			   int device, struct chan_opts *opts);
 extern int open_chan(struct list_head *chans);
@@ -32,9 +34,11 @@
 			     int write_irq);
 extern int console_write_chan(struct list_head *chans, const char *buf, 
 			      int len);
+extern int console_open_chan(struct line *line, struct console *co,
+			     struct chan_opts *opts);
 extern void close_chan(struct list_head *chans);
-extern void chan_enable_winch(struct list_head *chans, void *line);
-extern void enable_chan(struct list_head *chans, void *data);
+extern void chan_enable_winch(struct list_head *chans, struct tty_struct *tty);
+extern void enable_chan(struct list_head *chans, struct tty_struct *tty);
 extern int chan_window_size(struct list_head *chans, 
 			     unsigned short *rows_out, 
 			     unsigned short *cols_out);
diff -Nru a/arch/um/include/chan_user.h b/arch/um/include/chan_user.h
--- a/arch/um/include/chan_user.h	2005-01-10 20:11:19 -08:00
+++ b/arch/um/include/chan_user.h	2005-01-10 20:11:19 -08:00
@@ -42,8 +42,9 @@
 			       unsigned short *cols_out);
 extern void generic_free(void *data);
 
-extern void register_winch(int fd, void *device_data);
-extern void register_winch_irq(int fd, int tty_fd, int pid, void *line);
+struct tty_struct;
+extern void register_winch(int fd,  struct tty_struct *tty);
+extern void register_winch_irq(int fd, int tty_fd, int pid, struct tty_struct *tty);
 
 #define __channel_help(fn, prefix) \
 __uml_help(fn, prefix "[0-9]*=<channel description>\n" \
diff -Nru a/arch/um/include/elf_user.h b/arch/um/include/elf_user.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/um/include/elf_user.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,19 @@
+/*
+ * Copyright (C) 2004 Fujitsu Siemens Computers GmbH
+ * Author: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
+ * Licensed under the GPL
+ */
+
+#ifndef __ELF_USER_H__
+#define __ELF_USER_H__
+
+/* For compilation on a host that doesn't support AT_SYSINFO (Linux 2.4)  */
+
+#ifndef AT_SYSINFO
+#define AT_SYSINFO 32
+#endif
+#ifndef AT_SYSINFO_EHDR
+#define AT_SYSINFO_EHDR 33
+#endif
+
+#endif
diff -Nru a/arch/um/include/frame.h b/arch/um/include/frame.h
--- a/arch/um/include/frame.h	2005-01-10 20:11:18 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,53 +0,0 @@
-/* 
- * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
- * Licensed under the GPL
- */
-
-#ifndef __FRAME_H_
-#define __FRAME_H_
-
-#include "sysdep/frame.h"
-
-struct frame_common {
-	void *data;
-	int len;
-	int sig_index;
-	int sr_index;
-	int sr_relative;
-	int sp_index;
-	struct arch_frame_data arch;
-};
-
-struct sc_frame {
-	struct frame_common common;
-	int sc_index;
-};
-
-extern struct sc_frame signal_frame_sc;
-
-extern struct sc_frame signal_frame_sc_sr;
-
-struct si_frame {
-	struct frame_common common;
-	int sip_index;
-	int si_index;
-	int ucp_index;
-	int uc_index;
-};
-
-extern struct si_frame signal_frame_si;
-
-extern void capture_signal_stack(void);
-
-#endif
-
-/*
- * 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-file-style: "linux"
- * End:
- */
diff -Nru a/arch/um/include/frame_kern.h b/arch/um/include/frame_kern.h
--- a/arch/um/include/frame_kern.h	2005-01-10 20:11:19 -08:00
+++ b/arch/um/include/frame_kern.h	2005-01-10 20:11:19 -08:00
@@ -6,8 +6,8 @@
 #ifndef __FRAME_KERN_H_
 #define __FRAME_KERN_H_
 
-#include "frame.h"
-#include "sysdep/frame_kern.h"
+#define _S(nr) (1<<((nr)-1))
+#define _BLOCKABLE (~(_S(SIGKILL) | _S(SIGSTOP)))
 
 extern int setup_signal_stack_sc(unsigned long stack_top, int sig, 
 				 struct k_sigaction *ka,
diff -Nru a/arch/um/include/frame_user.h b/arch/um/include/frame_user.h
--- a/arch/um/include/frame_user.h	2005-01-10 20:11:15 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,23 +0,0 @@
-/* 
- * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
- * Licensed under the GPL
- */
-
-#ifndef __FRAME_USER_H_
-#define __FRAME_USER_H_
-
-#include "sysdep/frame_user.h"
-#include "frame.h"
-
-#endif
-
-/*
- * 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-file-style: "linux"
- * End:
- */
diff -Nru a/arch/um/include/line.h b/arch/um/include/line.h
--- a/arch/um/include/line.h	2005-01-10 20:11:21 -08:00
+++ b/arch/um/include/line.h	2005-01-10 20:11:21 -08:00
@@ -37,7 +37,6 @@
 	struct list_head chan_list;
 	int valid;
 	int count;
-	struct tty_struct *tty;
 	struct semaphore sem;
 	char *buffer;
 	char *head;
@@ -53,8 +52,6 @@
 	  init_pri :	INIT_STATIC, \
 	  chan_list : 	{ }, \
 	  valid :	1, \
-	  count :	0, \
-	  tty :		NULL, \
 	  sem : 	{ }, \
 	  buffer :	NULL, \
 	  head :	NULL, \
@@ -69,17 +66,22 @@
 
 #define LINES_INIT(n) {  num :		n }
 
-extern void line_close(struct line *lines, struct tty_struct *tty);
+extern void line_close(struct tty_struct *tty, struct file * filp);
 extern int line_open(struct line *lines, struct tty_struct *tty, 
 		     struct chan_opts *opts);
 extern int line_setup(struct line *lines, int num, char *init, 
 		      int all_allowed);
-extern int line_write(struct line *line, struct tty_struct *tty, const char *buf, int len);
+extern int line_write(struct tty_struct *tty, const unsigned char *buf, int len);
+extern void line_put_char(struct tty_struct *tty, unsigned char ch);
+extern void line_set_termios(struct tty_struct *tty, struct termios * old);
+extern int line_chars_in_buffer(struct tty_struct *tty);
 extern int line_write_room(struct tty_struct *tty);
+extern int line_ioctl(struct tty_struct *tty, struct file * file,
+		      unsigned int cmd, unsigned long arg);
 extern char *add_xterm_umid(char *base);
-extern int line_setup_irq(int fd, int input, int output, void *data);
+extern int line_setup_irq(int fd, int input, int output, struct tty_struct *tty);
 extern void line_close_chan(struct line *line);
-extern void line_disable(struct line *line, int current_irq);
+extern void line_disable(struct tty_struct *tty, int current_irq);
 extern struct tty_driver * line_register_devfs(struct lines *set, 
 				struct line_driver *line_driver, 
 				struct tty_operations *driver,
diff -Nru a/arch/um/include/net_kern.h b/arch/um/include/net_kern.h
--- a/arch/um/include/net_kern.h	2005-01-10 20:11:21 -08:00
+++ b/arch/um/include/net_kern.h	2005-01-10 20:11:21 -08:00
@@ -14,6 +14,7 @@
 struct uml_net {
 	struct list_head list;
 	struct net_device *dev;
+	struct platform_device pdev;
 	int index;
 	unsigned char mac[ETH_ALEN];
 	int have_mac;
diff -Nru a/arch/um/include/ptrace_user.h b/arch/um/include/ptrace_user.h
--- a/arch/um/include/ptrace_user.h	2005-01-10 20:11:16 -08:00
+++ b/arch/um/include/ptrace_user.h	2005-01-10 20:11:16 -08:00
@@ -11,6 +11,7 @@
 extern int ptrace_getregs(long pid, unsigned long *regs_out);
 extern int ptrace_setregs(long pid, unsigned long *regs_in);
 extern int ptrace_getfpregs(long pid, unsigned long *regs_out);
+extern int ptrace_setfpregs(long pid, unsigned long *regs);
 extern void arch_enter_kernel(void *task, int pid);
 extern void arch_leave_kernel(void *task, int pid);
 extern void ptrace_pokeuser(unsigned long addr, unsigned long data);
@@ -21,9 +22,19 @@
 #ifndef PTRACE_SYSEMU
 #define PTRACE_SYSEMU 31
 #endif
+#ifndef PTRACE_SYSEMU_SINGLESTEP
+#define PTRACE_SYSEMU_SINGLESTEP 32
+#endif
 
 void set_using_sysemu(int value);
 int get_using_sysemu(void);
 extern int sysemu_supported;
+
+#define SELECT_PTRACE_OPERATION(sysemu_mode, singlestep_mode) \
+	(((int[3][3] ) { \
+		{ PTRACE_SYSCALL, PTRACE_SYSCALL, PTRACE_SINGLESTEP }, \
+		{ PTRACE_SYSEMU, PTRACE_SYSEMU, PTRACE_SINGLESTEP }, \
+		{ PTRACE_SYSEMU, PTRACE_SYSEMU_SINGLESTEP, PTRACE_SYSEMU_SINGLESTEP }}) \
+		[sysemu_mode][singlestep_mode])
 
 #endif
diff -Nru a/arch/um/include/sysdep-i386/frame.h b/arch/um/include/sysdep-i386/frame.h
--- a/arch/um/include/sysdep-i386/frame.h	2005-01-10 20:11:20 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,29 +0,0 @@
-/* 
- * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
- * Licensed under the GPL
- */
-
-#ifndef __FRAME_I386_H
-#define __FRAME_I386_H
-
-struct arch_frame_data_raw {
-	unsigned long fp_start;
-	unsigned long sr;
-};
-
-struct arch_frame_data {
-	int fpstate_size;
-};
-
-#endif
-
-/*
- * 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-file-style: "linux"
- * End:
- */
diff -Nru a/arch/um/include/sysdep-i386/frame_kern.h b/arch/um/include/sysdep-i386/frame_kern.h
--- a/arch/um/include/sysdep-i386/frame_kern.h	2005-01-10 20:11:17 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,69 +0,0 @@
-/* 
- * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
- * Licensed under the GPL
- */
-
-#ifndef __FRAME_KERN_I386_H
-#define __FRAME_KERN_I386_H
-
-/* This is called from sys_sigreturn.  It takes the sp at the point of the
- * sigreturn system call and returns the address of the sigcontext struct
- * on the stack.
- */
-
-static inline void *sp_to_sc(unsigned long sp)
-{
-	return((void *) sp);
-}
-
-static inline void *sp_to_uc(unsigned long sp)
-{
-	unsigned long uc;
-
-	uc = sp + signal_frame_si.uc_index - 
-		signal_frame_si.common.sp_index - 4;
-	return((void *) uc);
-}
-
-static inline void *sp_to_rt_sc(unsigned long sp)
-{
-	unsigned long sc;
-
-	sc = sp - signal_frame_si.common.sp_index + 
-		signal_frame_si.common.len - 4;
-	return((void *) sc);
-}
-
-static inline void *sp_to_mask(unsigned long sp)
-{
-	unsigned long mask;
-
-	mask = sp - signal_frame_sc.common.sp_index + 
-		signal_frame_sc.common.len - 8;
-	return((void *) mask);
-}
-
-extern int sc_size(void *data);
-
-static inline void *sp_to_rt_mask(unsigned long sp)
-{
-	unsigned long mask;
-
-	mask = sp - signal_frame_si.common.sp_index + 
-		signal_frame_si.common.len + 
-		sc_size(&signal_frame_si.common.arch) - 4;
-	return((void *) mask);
-}
-
-#endif
-
-/*
- * 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-file-style: "linux"
- * End:
- */
diff -Nru a/arch/um/include/sysdep-i386/frame_user.h b/arch/um/include/sysdep-i386/frame_user.h
--- a/arch/um/include/sysdep-i386/frame_user.h	2005-01-10 20:11:22 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,91 +0,0 @@
-/* 
- * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
- * Licensed under the GPL
- */
-
-#ifndef __FRAME_USER_I386_H
-#define __FRAME_USER_I386_H
-
-#include <asm/page.h>
-#include "sysdep/frame.h"
-
-/* This stuff is to calculate the size of the fp state struct at runtime
- * because it has changed between 2.2 and 2.4 and it would be good for a
- * UML compiled on one to work on the other.
- * So, setup_arch_frame_raw fills in the arch struct with the raw data, which
- * just contains the address of the end of the sigcontext.  This is invoked
- * from the signal handler.
- * setup_arch_frame uses that data to figure out what 
- * arch_frame_data.fpstate_size should be.  It really has no idea, since it's
- * not allowed to do sizeof(struct fpstate) but it's safe to consider that it's
- * everything from the end of the sigcontext up to the top of the stack.  So,
- * it masks off the page number to get the offset within the page and subtracts
- * that from the page size, and that's how big the fpstate struct will be
- * considered to be.
- */
-
-static inline void setup_arch_frame_raw(struct arch_frame_data_raw *data,
-					void *end, unsigned long srp)
-{
-	unsigned long sr = *((unsigned long *) srp);
-
-	data->fp_start = (unsigned long) end;
-	if((sr & PAGE_MASK) == ((unsigned long) end & PAGE_MASK))
-		data->sr = sr;
-	else data->sr = 0;
-}
-
-static inline void setup_arch_frame(struct arch_frame_data_raw *in, 
-				    struct arch_frame_data *out)
-{
-	unsigned long fpstate_start = in->fp_start;
-
-	if(in->sr == 0){
-		fpstate_start &= ~PAGE_MASK;
-		out->fpstate_size = PAGE_SIZE - fpstate_start;
-	}
-	else {
-		out->fpstate_size = in->sr - fpstate_start;
-	}
-}
-
-/* This figures out where on the stack the SA_RESTORER function address
- * is stored.  For i386, it's the signal handler return address, so it's
- * located next to the frame pointer.
- * This is inlined, so __builtin_frame_address(0) is correct.  Otherwise,
- * it would have to be __builtin_frame_address(1).
- */
-
-#define frame_restorer() \
-({ \
-	unsigned long *fp; \
-\
-	fp = __builtin_frame_address(0); \
-	((unsigned long) (fp + 1)); \
-})
-
-/* Similarly, this returns the value of sp when the handler was first
- * entered.  This is used to calculate the proper sp when delivering
- * signals.
- */
-
-#define frame_sp() \
-({ \
-	unsigned long *fp; \
-\
-	fp = __builtin_frame_address(0); \
-	((unsigned long) (fp + 1)); \
-})
-
-#endif
-
-/*
- * 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-file-style: "linux"
- * End:
- */
diff -Nru a/arch/um/include/sysdep-i386/ptrace.h b/arch/um/include/sysdep-i386/ptrace.h
--- a/arch/um/include/sysdep-i386/ptrace.h	2005-01-10 20:11:16 -08:00
+++ b/arch/um/include/sysdep-i386/ptrace.h	2005-01-10 20:11:16 -08:00
@@ -15,6 +15,9 @@
 #ifdef UML_CONFIG_MODE_SKAS
 #include "ptrace-skas.h"
 #endif
+#ifndef PTRACE_SYSEMU_SINGLESTEP
+#define PTRACE_SYSEMU_SINGLESTEP 32
+#endif
 
 #include "choose-mode.h"
 
diff -Nru a/arch/um/kernel/Makefile b/arch/um/kernel/Makefile
--- a/arch/um/kernel/Makefile	2005-01-10 20:11:20 -08:00
+++ b/arch/um/kernel/Makefile	2005-01-10 20:11:20 -08:00
@@ -6,7 +6,7 @@
 extra-y := vmlinux.lds
 clean-files := vmlinux.lds.S
 
-obj-y = checksum.o config.o exec_kern.o exitcode.o frame_kern.o frame.o \
+obj-y = checksum.o config.o exec_kern.o exitcode.o \
 	helper.o init_task.o irq.o irq_user.o ksyms.o main.o mem.o mem_user.o \
 	physmem.o process.o process_kern.o ptrace.o reboot.o resource.o \
 	sigio_user.o sigio_kern.o signal_kern.o signal_user.o smp.o \
diff -Nru a/arch/um/kernel/frame.c b/arch/um/kernel/frame.c
--- a/arch/um/kernel/frame.c	2005-01-10 20:11:18 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,343 +0,0 @@
-/* 
- * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
- * Licensed under the GPL
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <signal.h>
-#include <wait.h>
-#include <sched.h>
-#include <errno.h>
-#include <sys/ptrace.h>
-#include <sys/syscall.h>
-#include <sys/mman.h>
-#include <asm/page.h>
-#include <asm/ptrace.h>
-#include <asm/sigcontext.h>
-#include "sysdep/ptrace.h"
-#include "sysdep/sigcontext.h"
-#include "frame_user.h"
-#include "kern_util.h"
-#include "user_util.h"
-#include "ptrace_user.h"
-#include "os.h"
-
-static int capture_stack(int (*child)(void *arg), void *arg, void *sp,
-			 unsigned long top, void **data_out)
-{
-	unsigned long regs[FRAME_SIZE];
-	int pid, status, n, len;
-
-	/* Start the child as a thread */
-	pid = clone(child, sp, CLONE_VM | SIGCHLD, arg);
-	if(pid < 0){
-		printf("capture_stack : clone failed - errno = %d\n", errno);
-		exit(1);
-	}
-
-	/* Wait for it to stop itself and continue it with a SIGUSR1 to force 
-	 * it into the signal handler.
-	 */
-	CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED));
-	if(n < 0){
-		printf("capture_stack : waitpid failed - errno = %d\n", errno);
-		exit(1);
-	}
-	if(!WIFSTOPPED(status) || (WSTOPSIG(status) != SIGSTOP)){
-		fprintf(stderr, "capture_stack : Expected SIGSTOP, "
-			"got status = 0x%x\n", status);
-		exit(1);
-	}
-	if(ptrace(PTRACE_CONT, pid, 0, SIGUSR1) < 0){
-		printf("capture_stack : PTRACE_CONT failed - errno = %d\n", 
-		       errno);
-		exit(1);
-	}
-
-	/* Wait for it to stop itself again and grab its registers again.  
-	 * At this point, the handler has stuffed the addresses of
-	 * sig, sc, and SA_RESTORER in raw.
-	 */
-	CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED));
-	if(n < 0){
-		printf("capture_stack : waitpid failed - errno = %d\n", errno);
-		exit(1);
-	}
-	if(!WIFSTOPPED(status) || (WSTOPSIG(status) != SIGSTOP)){
-		fprintf(stderr, "capture_stack : Expected SIGSTOP, "
-			"got status = 0x%x\n", status);
-		exit(1);
-	}
-	if(ptrace(PTRACE_GETREGS, pid, 0, regs) < 0){
-		printf("capture_stack : PTRACE_GETREGS failed - errno = %d\n", 
-		       errno);
-		exit(1);
-	}
-
-	/* It has outlived its usefulness, so continue it so it can exit */
-	if(ptrace(PTRACE_CONT, pid, 0, 0) < 0){
-		printf("capture_stack : PTRACE_CONT failed - errno = %d\n", 
-		       errno);
-		exit(1);
-	}
-	CATCH_EINTR(n = waitpid(pid, &status, 0));
-	if(n < 0){
-		printf("capture_stack : waitpid failed - errno = %d\n", errno);
-		exit(1);
-	}
-	if(!WIFSIGNALED(status) || (WTERMSIG(status) != 9)){
-		printf("capture_stack : Expected exit signal 9, "
-		       "got status = 0x%x\n", status);
-		exit(1);
-	}
-
-	/* The frame that we want is the top of the signal stack */
-
-	len = top - PT_SP(regs);
-	*data_out = malloc(len);
-	if(*data_out == NULL){
-		printf("capture_stack : malloc failed - errno = %d\n", errno);
-		exit(1);
-	}
-	memcpy(*data_out, (void *) PT_SP(regs), len);
-
-	return(len);
-}
-
-struct common_raw {
-	void *stack;
-	int size;
-	unsigned long sig;
-	unsigned long sr;
-	unsigned long sp;	
-	struct arch_frame_data_raw arch;
-};
-
-#define SA_RESTORER (0x04000000)
-
-typedef unsigned long old_sigset_t;
-
-struct old_sigaction {
-	__sighandler_t handler;
-	old_sigset_t sa_mask;
-	unsigned long sa_flags;
-	void (*sa_restorer)(void);
-};
-
-static void child_common(struct common_raw *common, sighandler_t handler,
-			 int restorer, int flags)
-{
-	stack_t ss = ((stack_t) { .ss_sp	= common->stack,
-				  .ss_flags	= 0,
-				  .ss_size	= common->size });
-	int err;
-
-	if(ptrace(PTRACE_TRACEME, 0, 0, 0) < 0){
-		printf("PTRACE_TRACEME failed, errno = %d\n", errno);
-	}
-	if(sigaltstack(&ss, NULL) < 0){
-		printf("sigaltstack failed - errno = %d\n", errno);
-		kill(os_getpid(), SIGKILL);
-	}
-
-	if(restorer){
-		struct sigaction sa;
-
-		sa.sa_handler = handler;
-		sigemptyset(&sa.sa_mask);
-		sa.sa_flags = SA_ONSTACK | flags;
-		err = sigaction(SIGUSR1, &sa, NULL);
-	}
-	else {
-		struct old_sigaction sa;
-
-		sa.handler = handler;
-		sa.sa_mask = 0;
-		sa.sa_flags = (SA_ONSTACK | flags) & ~SA_RESTORER;
-		err = syscall(__NR_sigaction, SIGUSR1, &sa, NULL);
-	}
-	
-	if(err < 0){
-		printf("sigaction failed - errno = %d\n", errno);
-		kill(os_getpid(), SIGKILL);
-	}
-
-	os_stop_process(os_getpid());
-}
-
-/* Changed only during early boot */
-struct sc_frame signal_frame_sc;
-
-struct sc_frame signal_frame_sc_sr;
-
-struct sc_frame_raw {
-	struct common_raw common;
-	unsigned long sc;
-	int restorer;
-};
-
-/* Changed only during early boot */
-static struct sc_frame_raw *raw_sc = NULL;
-
-static void sc_handler(int sig, struct sigcontext sc)
-{
-	raw_sc->common.sig = (unsigned long) &sig;
-	raw_sc->common.sr = frame_restorer();
-	raw_sc->common.sp = frame_sp();
-	raw_sc->sc = (unsigned long) &sc;
-	setup_arch_frame_raw(&raw_sc->common.arch, &sc + 1, raw_sc->common.sr);
-
-	os_stop_process(os_getpid());
-	kill(os_getpid(), SIGKILL);
-}
-
-static int sc_child(void *arg)
-{
-	raw_sc = arg;
-	child_common(&raw_sc->common, (sighandler_t) sc_handler, 
-		     raw_sc->restorer, 0);
-	return(-1);
-}
-
-/* Changed only during early boot */
-struct si_frame signal_frame_si;
-
-struct si_frame_raw {
-	struct common_raw common;
-	unsigned long sip;
-	unsigned long si;
-	unsigned long ucp;
-	unsigned long uc;
-};
-
-/* Changed only during early boot */
-static struct si_frame_raw *raw_si = NULL;
-
-static void si_handler(int sig, siginfo_t *si, struct ucontext *ucontext)
-{
-	raw_si->common.sig = (unsigned long) &sig;
-	raw_si->common.sr = frame_restorer();
-	raw_si->common.sp = frame_sp();
-	raw_si->sip = (unsigned long) &si;
-	raw_si->si = (unsigned long) si;
-	raw_si->ucp = (unsigned long) &ucontext;
-	raw_si->uc = (unsigned long) ucontext;
-	setup_arch_frame_raw(&raw_si->common.arch, 
-			     ucontext->uc_mcontext.fpregs, raw_si->common.sr);
-	
-	os_stop_process(os_getpid());
-	kill(os_getpid(), SIGKILL);
-}
-
-static int si_child(void *arg)
-{
-	raw_si = arg;
-	child_common(&raw_si->common, (sighandler_t) si_handler, 1, 
- 		     SA_SIGINFO);
-	return(-1);
-}
-
-static int relative_sr(unsigned long sr, int sr_index, void *stack, 
-		       void *framep)
-{
-	unsigned long *srp = (unsigned long *) sr;
-	unsigned long frame = (unsigned long) framep;
-
-	if((*srp & PAGE_MASK) == (unsigned long) stack){
-		*srp -= sr;
-		*((unsigned long *) (frame + sr_index)) = *srp;
-		return(1);
-	}
-	else return(0);
-}
-
-static unsigned long capture_stack_common(int (*proc)(void *), void *arg, 
-					  struct common_raw *common_in, 
-					  void *top, void *sigstack, 
-					  int stack_len, 
-					  struct frame_common *common_out)
-{
-	unsigned long sig_top = (unsigned long) sigstack + stack_len, base;
-
-	common_in->stack = (void *) sigstack;
-	common_in->size = stack_len;
-	common_out->len = capture_stack(proc, arg, top, sig_top, 
-					&common_out->data);
-	base = sig_top - common_out->len;
-	common_out->sig_index = common_in->sig - base;
-	common_out->sp_index = common_in->sp - base;
-	common_out->sr_index = common_in->sr - base;
-	common_out->sr_relative = relative_sr(common_in->sr, 
-					      common_out->sr_index, sigstack, 
-					      common_out->data);
-	return(base);
-}
-
-void capture_signal_stack(void)
-{
-	struct sc_frame_raw raw_sc;
-	struct si_frame_raw raw_si;
-	void *stack, *sigstack;
-	unsigned long top, base;
-
-	stack = mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE | PROT_EXEC,
-		     MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
-	sigstack = mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE | PROT_EXEC,
-			MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
-	if((stack == MAP_FAILED) || (sigstack == MAP_FAILED)){
-		printf("capture_signal_stack : mmap failed - errno = %d\n", 
-		       errno);
-		exit(1);
-	}
-
-	top = (unsigned long) stack + PAGE_SIZE - sizeof(void *);
-
-	/* Get the sigcontext, no sigrestorer layout */
-	raw_sc.restorer = 0;
-	base = capture_stack_common(sc_child, &raw_sc, &raw_sc.common, 
-				    (void *) top, sigstack, PAGE_SIZE, 
-				    &signal_frame_sc.common);
-
-	signal_frame_sc.sc_index = raw_sc.sc - base;
-	setup_arch_frame(&raw_sc.common.arch, &signal_frame_sc.common.arch);
-
-	/* Ditto for the sigcontext, sigrestorer layout */
-	raw_sc.restorer = 1;
-	base = capture_stack_common(sc_child, &raw_sc, &raw_sc.common, 
-				    (void *) top, sigstack, PAGE_SIZE, 
-				    &signal_frame_sc_sr.common);
-	signal_frame_sc_sr.sc_index = raw_sc.sc - base;
-	setup_arch_frame(&raw_sc.common.arch, &signal_frame_sc_sr.common.arch);
-
-	/* And the siginfo layout */
-
-	base = capture_stack_common(si_child, &raw_si, &raw_si.common, 
-				    (void *) top, sigstack, PAGE_SIZE, 
-				    &signal_frame_si.common);
-	signal_frame_si.sip_index = raw_si.sip - base;
-	signal_frame_si.si_index = raw_si.si - base;
-	signal_frame_si.ucp_index = raw_si.ucp - base;
-	signal_frame_si.uc_index = raw_si.uc - base;
-	setup_arch_frame(&raw_si.common.arch, &signal_frame_si.common.arch);
-
-	if((munmap(stack, PAGE_SIZE) < 0) || 
-	   (munmap(sigstack, PAGE_SIZE) < 0)){
-		printf("capture_signal_stack : munmap failed - errno = %d\n", 
-		       errno);
-		exit(1);
-	}
-}
-
-/*
- * 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-file-style: "linux"
- * End:
- */
diff -Nru a/arch/um/kernel/frame_kern.c b/arch/um/kernel/frame_kern.c
--- a/arch/um/kernel/frame_kern.c	2005-01-10 20:11:23 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,148 +0,0 @@
-/* 
- * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
- * Licensed under the GPL
- */
-
-#include "asm/ptrace.h"
-#include "asm/uaccess.h"
-#include "asm/signal.h"
-#include "asm/ucontext.h"
-#include "frame_kern.h"
-#include "sigcontext.h"
-#include "sysdep/ptrace.h"
-#include "choose-mode.h"
-#include "mode.h"
-
-static int copy_restorer(void (*restorer)(void), unsigned long start, 
-			 unsigned long sr_index, int sr_relative)
-{
-	unsigned long sr;
-
-	if(sr_relative){
-		sr = (unsigned long) restorer;
-		sr += start + sr_index;
-		restorer = (void (*)(void)) sr;
-	}
-
-	return(copy_to_user((void *) (start + sr_index), &restorer, 
-			    sizeof(restorer)));
-}
-
-extern int userspace_pid[];
-
-static int copy_sc_to_user(void *to, void *fp, struct pt_regs *from, 
-			   struct arch_frame_data *arch)
-{
-	return(CHOOSE_MODE(copy_sc_to_user_tt(to, fp, UPT_SC(&from->regs), 
-					      arch),
-			   copy_sc_to_user_skas(userspace_pid[0], to, fp,
-						&from->regs,
-						current->thread.cr2,
-						current->thread.err)));
-}
-
-static int copy_ucontext_to_user(struct ucontext *uc, void *fp, sigset_t *set,
-				 unsigned long sp)
-{
-	int err = 0;
-
-	err |= put_user(current->sas_ss_sp, &uc->uc_stack.ss_sp);
-	err |= put_user(sas_ss_flags(sp), &uc->uc_stack.ss_flags);
-	err |= put_user(current->sas_ss_size, &uc->uc_stack.ss_size);
-	err |= copy_sc_to_user(&uc->uc_mcontext, fp, &current->thread.regs,
-			       &signal_frame_si.common.arch);
-	err |= copy_to_user(&uc->uc_sigmask, set, sizeof(*set));
-	return(err);
-}
-
-int setup_signal_stack_si(unsigned long stack_top, int sig, 
-			  struct k_sigaction *ka, struct pt_regs *regs,
-			  siginfo_t *info, sigset_t *mask)
-{
-	unsigned long start;
-	void *restorer;
-	void *sip, *ucp, *fp;
-
-	start = stack_top - signal_frame_si.common.len;
-	sip = (void *) (start + signal_frame_si.si_index);
-	ucp = (void *) (start + signal_frame_si.uc_index);
-	fp = (void *) (((unsigned long) ucp) + sizeof(struct ucontext));
-
-	restorer = NULL;
-	if(ka->sa.sa_flags & SA_RESTORER)
-		restorer = ka->sa.sa_restorer;
-
-	if(restorer == NULL)
-		panic("setup_signal_stack_si - no restorer");
-
-	if(copy_to_user((void *) start, signal_frame_si.common.data,
-			signal_frame_si.common.len) ||
-	   copy_to_user((void *) (start + signal_frame_si.common.sig_index), 
-			&sig, sizeof(sig)) ||
-	   copy_siginfo_to_user(sip, info) ||
-	   copy_to_user((void *) (start + signal_frame_si.sip_index), &sip,
-			sizeof(sip)) ||
-	   copy_ucontext_to_user(ucp, fp, mask, PT_REGS_SP(regs)) ||
-	   copy_to_user((void *) (start + signal_frame_si.ucp_index), &ucp,
-			sizeof(ucp)) ||
-	   copy_restorer(restorer, start, signal_frame_si.common.sr_index,
-			 signal_frame_si.common.sr_relative))
-		return(1);
-	
-	PT_REGS_IP(regs) = (unsigned long) ka->sa.sa_handler;
-	PT_REGS_SP(regs) = start + signal_frame_si.common.sp_index;
-	return(0);
-}
-
-int setup_signal_stack_sc(unsigned long stack_top, int sig, 
-			  struct k_sigaction *ka, struct pt_regs *regs,
-			  sigset_t *mask)
-{
-	struct frame_common *frame = &signal_frame_sc_sr.common;
-	void *restorer;
-	void *user_sc;
-	int sig_size = (_NSIG_WORDS - 1) * sizeof(unsigned long);
-	unsigned long sigs, sr;
-	unsigned long start = stack_top - frame->len - sig_size;
-
-	restorer = NULL;
-	if(ka->sa.sa_flags & SA_RESTORER)
-		restorer = ka->sa.sa_restorer;
-
-	user_sc = (void *) (start + signal_frame_sc_sr.sc_index);
-	if(restorer == NULL){
-		frame = &signal_frame_sc.common;
-		user_sc = (void *) (start + signal_frame_sc.sc_index);
-		sr = (unsigned long) frame->data;
-		sr += frame->sr_index;
-		sr = *((unsigned long *) sr);
-		restorer = ((void (*)(void)) sr);
-	}
-
-	sigs = start + frame->len;
-	if(copy_to_user((void *) start, frame->data, frame->len) ||
-	   copy_to_user((void *) (start + frame->sig_index), &sig, 
-			sizeof(sig)) ||
-	   copy_sc_to_user(user_sc, NULL, regs, 
-			   &signal_frame_sc.common.arch) ||
-	   copy_to_user(sc_sigmask(user_sc), mask, sizeof(mask->sig[0])) ||
-	   copy_to_user((void *) sigs, &mask->sig[1], sig_size) ||
-	   copy_restorer(restorer, start, frame->sr_index, frame->sr_relative))
-		return(1);
-
-	PT_REGS_IP(regs) = (unsigned long) ka->sa.sa_handler;
-	PT_REGS_SP(regs) = start + frame->sp_index;
-
-	return(0);
-}
-
-/*
- * 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-file-style: "linux"
- * End:
- */
diff -Nru a/arch/um/kernel/helper.c b/arch/um/kernel/helper.c
--- a/arch/um/kernel/helper.c	2005-01-10 20:11:19 -08:00
+++ b/arch/um/kernel/helper.c	2005-01-10 20:11:19 -08:00
@@ -49,14 +49,14 @@
 	return(0);
 }
 
-/* XXX The alloc_stack here breaks if this is called in the tracing thread */
-
+/* Returns either the pid of the child process we run or -E* on failure.
+ * XXX The alloc_stack here breaks if this is called in the tracing thread */
 int run_helper(void (*pre_exec)(void *), void *pre_data, char **argv,
 	       unsigned long *stack_out)
 {
 	struct helper_data data;
 	unsigned long stack, sp;
-	int pid, fds[2], err, n;
+	int pid, fds[2], ret, n;
 
 	if((stack_out != NULL) && (*stack_out != 0))
 		stack = *stack_out;
@@ -64,16 +64,16 @@
 	if(stack == 0)
 		return(-ENOMEM);
 
-	err = os_pipe(fds, 1, 0);
-	if(err < 0){
-		printk("run_helper : pipe failed, err = %d\n", -err);
+	ret = os_pipe(fds, 1, 0);
+	if(ret < 0){
+		printk("run_helper : pipe failed, ret = %d\n", -ret);
 		goto out_free;
 	}
 
-	err = os_set_exec_close(fds[1], 1);
-	if(err < 0){
-		printk("run_helper : setting FD_CLOEXEC failed, err = %d\n",
-		       -err);
+	ret = os_set_exec_close(fds[1], 1);
+	if(ret < 0){
+		printk("run_helper : setting FD_CLOEXEC failed, ret = %d\n",
+		       -ret);
 		goto out_close;
 	}
 
@@ -85,34 +85,36 @@
 	pid = clone(helper_child, (void *) sp, CLONE_VM | SIGCHLD, &data);
 	if(pid < 0){
 		printk("run_helper : clone failed, errno = %d\n", errno);
-		err = -errno;
+		ret = -errno;
 		goto out_close;
 	}
 
 	os_close_file(fds[1]);
-	n = os_read_file(fds[0], &err, sizeof(err));
+	fds[1] = -1;
+
+	/*Read the errno value from the child.*/
+	n = os_read_file(fds[0], &ret, sizeof(ret));
 	if(n < 0){
-		printk("run_helper : read on pipe failed, err = %d\n", -n);
-		err = n;
-		goto out_kill;
+		printk("run_helper : read on pipe failed, ret = %d\n", -n);
+		ret = n;
+		os_kill_process(pid, 1);
 	}
 	else if(n != 0){
 		CATCH_EINTR(n = waitpid(pid, NULL, 0));
-		pid = -errno;
+		ret = -errno;
+	} else {
+		ret = pid;
 	}
 
-	if(stack_out == NULL) free_stack(stack, 0);
-        else *stack_out = stack;
-	return(pid);
-
- out_kill:
-	os_kill_process(pid, 1);
- out_close:
+out_close:
+	if (fds[1] != -1)
+		os_close_file(fds[1]);
 	os_close_file(fds[0]);
-	os_close_file(fds[1]);
- out_free:
-	free_stack(stack, 0);
-	return(err);
+out_free:
+	if(stack_out == NULL)
+		free_stack(stack, 0);
+	else *stack_out = stack;
+	return(ret);
 }
 
 int run_helper_thread(int (*proc)(void *), void *arg, unsigned int flags, 
@@ -143,7 +145,7 @@
 			       "0x%x\n", status);
 		free_stack(stack, stack_order);
 	}
-        else *stack_out = stack;
+	else *stack_out = stack;
 	return(pid);
 }
 
diff -Nru a/arch/um/kernel/initrd_user.c b/arch/um/kernel/initrd_user.c
--- a/arch/um/kernel/initrd_user.c	2005-01-10 20:11:17 -08:00
+++ b/arch/um/kernel/initrd_user.c	2005-01-10 20:11:17 -08:00
@@ -29,6 +29,8 @@
 		       filename, -n);
 		return(-1);
 	}
+
+	os_close_file(fd);
 	return(0);
 }
 
diff -Nru a/arch/um/kernel/irq_user.c b/arch/um/kernel/irq_user.c
--- a/arch/um/kernel/irq_user.c	2005-01-10 20:11:18 -08:00
+++ b/arch/um/kernel/irq_user.c	2005-01-10 20:11:18 -08:00
@@ -83,8 +83,11 @@
 				 * can be freed here.
 				 */
 				next = irq_fd->next;
-				if(irq_fd->freed)
+				if(irq_fd->freed){
 					free_irq(irq_fd->irq, irq_fd->id);
+					free_irq_by_irq_and_dev(irq_fd->irq,
+								irq_fd->id);
+				}
 			}
 		}
 	}
@@ -374,6 +377,8 @@
 		if(err)
 			return(err);
 	}
+	/* If there is a signal already queued, after unblocking ignore it */
+	set_handler(SIGIO, SIG_IGN, 0, -1);
 
 	return(0);
 }
diff -Nru a/arch/um/kernel/ksyms.c b/arch/um/kernel/ksyms.c
--- a/arch/um/kernel/ksyms.c	2005-01-10 20:11:16 -08:00
+++ b/arch/um/kernel/ksyms.c	2005-01-10 20:11:16 -08:00
@@ -48,6 +48,7 @@
 EXPORT_SYMBOL(mode_tt);
 EXPORT_SYMBOL(handle_page_fault);
 EXPORT_SYMBOL(find_iomem);
+EXPORT_SYMBOL(end_iomem);
 
 #ifdef CONFIG_MODE_TT
 EXPORT_SYMBOL(strncpy_from_user_tt);
diff -Nru a/arch/um/kernel/main.c b/arch/um/kernel/main.c
--- a/arch/um/kernel/main.c	2005-01-10 20:11:21 -08:00
+++ b/arch/um/kernel/main.c	2005-01-10 20:11:21 -08:00
@@ -81,6 +81,8 @@
 
 extern int uml_exitcode;
 
+extern void scan_elf_aux( char **envp);
+
 int main(int argc, char **argv, char **envp)
 {
 	char **new_argv;
@@ -147,6 +149,8 @@
 	set_handler(SIGTERM, last_ditch_exit, SA_ONESHOT | SA_NODEFER, -1);
 	set_handler(SIGHUP, last_ditch_exit, SA_ONESHOT | SA_NODEFER, -1);
 
+	scan_elf_aux( envp);
+
 	do_uml_initcalls();
 	ret = linux_main(argc, argv);
 
@@ -155,18 +159,20 @@
 		int err;
 
 		printf("\n");
-
-		/* Let any pending signals fire, then disable them.  This
-		 * ensures that they won't be delivered after the exec, when
-		 * they are definitely not expected.
-		 */
-		unblock_signals();
+		/* stop timers and set SIG*ALRM to be ignored */
 		disable_timer();
+		/* disable SIGIO for the fds and set SIGIO to be ignored */
 		err = deactivate_all_fds();
 		if(err)
 			printf("deactivate_all_fds failed, errno = %d\n",
 			       -err);
 
+		/* Let any pending signals fire now.  This ensures
+		 * that they won't be delivered after the exec, when
+		 * they are definitely not expected.
+		 */
+		unblock_signals();
+
 		execvp(new_argv[0], new_argv);
 		perror("Failed to exec kernel");
 		ret = 1;
@@ -222,13 +228,16 @@
 	 * 	physical memory - kmalloc/kfree
 	 *	kernel virtual memory - vmalloc/vfree
 	 * 	anywhere else - malloc/free
-	 * If kmalloc is not yet possible, then the kernel memory regions
-	 * may not be set up yet, and the variables not initialized.  So,
-	 * free is called.
+	 * If kmalloc is not yet possible, then either high_physmem and/or
+	 * end_vm are still 0 (as at startup), in which case we call free, or
+	 * we have set them, but anyway addr has not been allocated from those
+	 * areas. So, in both cases __real_free is called.
 	 *
 	 * CAN_KMALLOC is checked because it would be bad to free a buffer
 	 * with kmalloc/vmalloc after they have been turned off during
 	 * shutdown.
+	 * XXX: However, we sometimes shutdown CAN_KMALLOC temporarily, so
+	 * there is a possibility for memory leaks.
 	 */
 
 	if((addr >= uml_physmem) && (addr < high_physmem)){
diff -Nru a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c
--- a/arch/um/kernel/mem.c	2005-01-10 20:11:18 -08:00
+++ b/arch/um/kernel/mem.c	2005-01-10 20:11:18 -08:00
@@ -49,8 +49,6 @@
 	unsigned long highmem_pfn;
 	int i;
 
-	highmem_start_page = virt_to_page(highmem_start);
-
 	highmem_pfn = __pa(highmem_start) >> PAGE_SHIFT;
 	for(i = 0; i < highmem_len >> PAGE_SHIFT; i++){
 		page = &mem_map[highmem_pfn + i];
@@ -67,9 +65,6 @@
 	unsigned long start;
 
 	max_low_pfn = (high_physmem - uml_physmem) >> PAGE_SHIFT;
-#ifdef CONFIG_HIGHMEM
-	highmem_start_page = phys_page(__pa(high_physmem));
-#endif
 
         /* clear the zero-page */
         memset((void *) empty_zero_page, 0, PAGE_SIZE);
@@ -175,6 +170,29 @@
 }
 #endif /* CONFIG_HIGHMEM */
 
+static void __init fixaddr_user_init( void)
+{
+	long size = FIXADDR_USER_END - FIXADDR_USER_START;
+	pgd_t *pgd;
+	pmd_t *pmd;
+	pte_t *pte;
+	unsigned long paddr, vaddr = FIXADDR_USER_START;
+
+	if (  ! size )
+		return;
+
+	fixrange_init( FIXADDR_USER_START, FIXADDR_USER_END, swapper_pg_dir);
+	paddr = (unsigned long)alloc_bootmem_low_pages( size);
+	memcpy( (void *)paddr, (void *)FIXADDR_USER_START, size);
+	paddr = __pa(paddr);
+	for ( ; size > 0; size-=PAGE_SIZE, vaddr+=PAGE_SIZE, paddr+=PAGE_SIZE) {
+		pgd = swapper_pg_dir + pgd_index(vaddr);
+		pmd = pmd_offset(pgd, vaddr);
+		pte = pte_offset_kernel(pmd, vaddr);
+		pte_set_val( (*pte), paddr, PAGE_READONLY);
+	}
+}
+
 void paging_init(void)
 {
 	unsigned long zones_size[MAX_NR_ZONES], vaddr;
@@ -195,6 +213,8 @@
 	vaddr = __fix_to_virt(__end_of_fixed_addresses - 1) & PMD_MASK;
 	fixrange_init(vaddr, FIXADDR_TOP, swapper_pg_dir);
 
+	fixaddr_user_init();
+
 #ifdef CONFIG_HIGHMEM
 	init_highmem();
 #endif
@@ -307,9 +327,7 @@
 {
 	pte_t *pte;
 
-	pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT);
-	if (pte)
-		clear_page(pte);
+	pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO);
 	return pte;
 }
 
@@ -317,9 +335,7 @@
 {
 	struct page *pte;
    
-	pte = alloc_pages(GFP_KERNEL|__GFP_REPEAT, 0);
-	if (pte)
-		clear_highpage(pte);
+	pte = alloc_pages(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO, 0);
 	return pte;
 }
 
diff -Nru a/arch/um/kernel/mem_user.c b/arch/um/kernel/mem_user.c
--- a/arch/um/kernel/mem_user.c	2005-01-10 20:11:19 -08:00
+++ b/arch/um/kernel/mem_user.c	2005-01-10 20:11:19 -08:00
@@ -101,6 +101,8 @@
 	}
 	printf("OK\n");
 	munmap(addr, UM_KERN_PAGE_SIZE);
+
+	os_close_file(fd);
 }
 
 static int have_devanon = 0;
diff -Nru a/arch/um/kernel/process.c b/arch/um/kernel/process.c
--- a/arch/um/kernel/process.c	2005-01-10 20:11:22 -08:00
+++ b/arch/um/kernel/process.c	2005-01-10 20:11:22 -08:00
@@ -13,6 +13,7 @@
 #include <setjmp.h>
 #include <sys/time.h>
 #include <sys/ptrace.h>
+#include <linux/ptrace.h>
 #include <sys/wait.h>
 #include <sys/mman.h>
 #include <asm/ptrace.h>
@@ -240,7 +241,7 @@
 static void __init check_sysemu(void)
 {
 	void *stack;
-	int pid, n, status;
+	int pid, syscall, n, status, count=0;
 
 	printk("Checking syscall emulation patch for ptrace...");
 	sysemu_supported = 0;
@@ -268,12 +269,46 @@
 	sysemu_supported = 1;
 	printk("OK\n");
 	set_using_sysemu(!force_sysemu_disabled);
+
+	printk("Checking advanced syscall emulation patch for ptrace...");
+	pid = start_ptraced_child(&stack);
+	while(1){
+		count++;
+		if(ptrace(PTRACE_SYSEMU_SINGLESTEP, pid, 0, 0) < 0)
+			goto fail;
+		CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED));
+		if(n < 0)
+			panic("check_ptrace : wait failed, errno = %d", errno);
+		if(!WIFSTOPPED(status) || (WSTOPSIG(status) != SIGTRAP))
+			panic("check_ptrace : expected (SIGTRAP|SYSCALL_TRAP), "
+			      "got status = %d", status);
+
+		syscall = ptrace(PTRACE_PEEKUSER, pid, PT_SYSCALL_NR_OFFSET,
+				 0);
+		if(syscall == __NR_getpid){
+			if (!count)
+				panic("check_ptrace : SYSEMU_SINGLESTEP doesn't singlestep");
+			n = ptrace(PTRACE_POKEUSER, pid, PT_SYSCALL_RET_OFFSET,
+				   os_getpid());
+			if(n < 0)
+				panic("check_sysemu : failed to modify system "
+				      "call return, errno = %d", errno);
+			break;
+		}
+	}
+	if (stop_ptraced_child(pid, stack, 0, 0) < 0)
+		goto fail_stopped;
+
+	sysemu_supported = 2;
+	printk("OK\n");
+
+	if ( !force_sysemu_disabled )
+		set_using_sysemu(sysemu_supported);
 	return;
 
 fail:
 	stop_ptraced_child(pid, stack, 1, 0);
 fail_stopped:
-	sysemu_supported = 0;
 	printk("missing\n");
 }
 
@@ -285,6 +320,9 @@
 	printk("Checking that ptrace can change system call numbers...");
 	pid = start_ptraced_child(&stack);
 
+	if(ptrace(PTRACE_SETOPTIONS, pid, 0, (void *)PTRACE_O_TRACESYSGOOD) < 0)
+		panic("check_ptrace: PTRACE_SETOPTIONS failed, errno = %d", errno);
+
 	while(1){
 		if(ptrace(PTRACE_SYSCALL, pid, 0, 0) < 0)
 			panic("check_ptrace : ptrace failed, errno = %d", 
@@ -292,8 +330,8 @@
 		CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED));
 		if(n < 0)
 			panic("check_ptrace : wait failed, errno = %d", errno);
-		if(!WIFSTOPPED(status) || (WSTOPSIG(status) != SIGTRAP))
-			panic("check_ptrace : expected SIGTRAP, "
+		if(!WIFSTOPPED(status) || (WSTOPSIG(status) != (SIGTRAP + 0x80)))
+			panic("check_ptrace : expected SIGTRAP + 0x80, "
 			      "got status = %d", status);
 		
 		syscall = ptrace(PTRACE_PEEKUSER, pid, PT_SYSCALL_NR_OFFSET,
diff -Nru a/arch/um/kernel/process_kern.c b/arch/um/kernel/process_kern.c
--- a/arch/um/kernel/process_kern.c	2005-01-10 20:11:19 -08:00
+++ b/arch/um/kernel/process_kern.c	2005-01-10 20:11:19 -08:00
@@ -291,8 +291,6 @@
 
 EXPORT_SYMBOL(disable_hlt);
 
-extern int signal_frame_size;
-
 void *um_kmalloc(int size)
 {
 	return(kmalloc(size, GFP_KERNEL));
@@ -406,7 +404,9 @@
 
 void set_using_sysemu(int value)
 {
-	atomic_set(&using_sysemu, sysemu_supported && value);
+	if (value > sysemu_supported)
+		return;
+	atomic_set(&using_sysemu, value);
 }
 
 int get_using_sysemu(void)
@@ -429,7 +429,7 @@
 	if (copy_from_user(tmp, buf, 1))
 		return -EFAULT;
 
-	if (tmp[0] == '0' || tmp[0] == '1')
+	if (tmp[0] >= '0' && tmp[0] <= '2')
 		set_using_sysemu(tmp[0] - '0');
 	return count; /*We use the first char, but pretend to write everything*/
 }
@@ -464,9 +464,9 @@
 		return(0);
 
 	if (task->thread.singlestep_syscall)
-		return(0);
+		return(1);
 
-	return 1;
+	return 2;
 }
 
 /*
diff -Nru a/arch/um/kernel/ptrace.c b/arch/um/kernel/ptrace.c
--- a/arch/um/kernel/ptrace.c	2005-01-10 20:11:24 -08:00
+++ b/arch/um/kernel/ptrace.c	2005-01-10 20:11:24 -08:00
@@ -330,8 +330,8 @@
 	tracesysgood = (current->ptrace & PT_TRACESYSGOOD) && !is_singlestep;
 	ptrace_notify(SIGTRAP | (tracesysgood ? 0x80 : 0));
 
-	/* force do_signal() --> is_syscall() */
-	set_thread_flag(TIF_SIGPENDING);
+	if (entryexit) /* force do_signal() --> is_syscall() */
+		set_thread_flag(TIF_SIGPENDING);
 
 	/* this isn't the same as continuing with a signal, but it will do
 	 * for normal use.  strace only continues with a signal if the
diff -Nru a/arch/um/kernel/signal_kern.c b/arch/um/kernel/signal_kern.c
--- a/arch/um/kernel/signal_kern.c	2005-01-10 20:11:19 -08:00
+++ b/arch/um/kernel/signal_kern.c	2005-01-10 20:11:19 -08:00
@@ -230,53 +230,6 @@
 	return(do_sigaltstack(uss, uoss, PT_REGS_SP(&current->thread.regs)));
 }
 
-extern int userspace_pid[];
-
-static int copy_sc_from_user(struct pt_regs *to, void *from, 
-			     struct arch_frame_data *arch)
-{
-	int ret;
-
-	ret = CHOOSE_MODE(copy_sc_from_user_tt(UPT_SC(&to->regs), from, arch),
-			  copy_sc_from_user_skas(userspace_pid[0],
-						 &to->regs, from));
-	return(ret);
-}
-
-long sys_sigreturn(struct pt_regs regs)
-{
-	void __user *sc = sp_to_sc(PT_REGS_SP(&current->thread.regs));
-	void __user *mask = sp_to_mask(PT_REGS_SP(&current->thread.regs));
-	int sig_size = (_NSIG_WORDS - 1) * sizeof(unsigned long);
-
-	spin_lock_irq(&current->sighand->siglock);
-	copy_from_user(&current->blocked.sig[0], sc_sigmask(sc), 
-		       sizeof(current->blocked.sig[0]));
-	copy_from_user(&current->blocked.sig[1], mask, sig_size);
-	sigdelsetmask(&current->blocked, ~_BLOCKABLE);
-	recalc_sigpending();
-	spin_unlock_irq(&current->sighand->siglock);
-	copy_sc_from_user(&current->thread.regs, sc, 
-			  &signal_frame_sc.common.arch);
-	return(PT_REGS_SYSCALL_RET(&current->thread.regs));
-}
-
-long sys_rt_sigreturn(struct pt_regs regs)
-{
-	unsigned long sp = PT_REGS_SP(&current->thread.regs);
-	struct ucontext __user *uc = sp_to_uc(sp);
-	int sig_size = _NSIG_WORDS * sizeof(unsigned long);
-
-	spin_lock_irq(&current->sighand->siglock);
-	copy_from_user(&current->blocked, &uc->uc_sigmask, sig_size);
-	sigdelsetmask(&current->blocked, ~_BLOCKABLE);
-	recalc_sigpending();
-	spin_unlock_irq(&current->sighand->siglock);
-	copy_sc_from_user(&current->thread.regs, &uc->uc_mcontext,
-			  &signal_frame_si.common.arch);
-	return(PT_REGS_SYSCALL_RET(&current->thread.regs));
-}
-
 /*
  * Overrides for Emacs so that we follow Linus's tabbing style.
  * Emacs will notice this stuff at the end of the file and automatically
diff -Nru a/arch/um/kernel/skas/Makefile b/arch/um/kernel/skas/Makefile
--- a/arch/um/kernel/skas/Makefile	2005-01-10 20:11:17 -08:00
+++ b/arch/um/kernel/skas/Makefile	2005-01-10 20:11:17 -08:00
@@ -5,7 +5,6 @@
 
 obj-y := exec_kern.o mem.o mem_user.o mmu.o process.o process_kern.o \
 	syscall_kern.o syscall_user.o time.o tlb.o trap_user.o uaccess.o \
-	sys-$(SUBARCH)/
 
 subdir-y := util
 
diff -Nru a/arch/um/kernel/skas/include/mode-skas.h b/arch/um/kernel/skas/include/mode-skas.h
--- a/arch/um/kernel/skas/include/mode-skas.h	2005-01-10 20:11:19 -08:00
+++ b/arch/um/kernel/skas/include/mode-skas.h	2005-01-10 20:11:19 -08:00
@@ -14,11 +14,6 @@
 extern int have_fpx_regs;
 
 extern void user_time_init_skas(void);
-extern int copy_sc_from_user_skas(int pid, union uml_pt_regs *regs,
-				  void *from_ptr);
-extern int copy_sc_to_user_skas(int pid, void *to_ptr, void *fp,
-				union uml_pt_regs *regs,
-				unsigned long fault_addr, int fault_type);
 extern void sig_handler_common_skas(int sig, void *sc_ptr);
 extern void halt_skas(void);
 extern void reboot_skas(void);
diff -Nru a/arch/um/kernel/skas/include/uaccess-skas.h b/arch/um/kernel/skas/include/uaccess-skas.h
--- a/arch/um/kernel/skas/include/uaccess-skas.h	2005-01-10 20:11:18 -08:00
+++ b/arch/um/kernel/skas/include/uaccess-skas.h	2005-01-10 20:11:18 -08:00
@@ -7,11 +7,16 @@
 #define __SKAS_UACCESS_H
 
 #include "asm/errno.h"
+#include "asm/fixmap.h"
 
 #define access_ok_skas(type, addr, size) \
 	((segment_eq(get_fs(), KERNEL_DS)) || \
 	 (((unsigned long) (addr) < TASK_SIZE) && \
-	  ((unsigned long) (addr) + (size) <= TASK_SIZE)))
+	  ((unsigned long) (addr) + (size) <= TASK_SIZE)) || \
+	 ((type == VERIFY_READ ) && \
+	  ((unsigned long) (addr) >= FIXADDR_USER_START) && \
+	  ((unsigned long) (addr) + (size) <= FIXADDR_USER_END) && \
+	  ((unsigned long) (addr) + (size) >= (unsigned long)(addr))))
 
 static inline int verify_area_skas(int type, const void * addr,
 				   unsigned long size)
diff -Nru a/arch/um/kernel/skas/process.c b/arch/um/kernel/skas/process.c
--- a/arch/um/kernel/skas/process.c	2005-01-10 20:11:22 -08:00
+++ b/arch/um/kernel/skas/process.c	2005-01-10 20:11:22 -08:00
@@ -11,6 +11,7 @@
 #include <sched.h>
 #include <sys/wait.h>
 #include <sys/ptrace.h>
+#include <linux/ptrace.h>
 #include <sys/mman.h>
 #include <sys/user.h>
 #include <asm/unistd.h>
@@ -60,14 +61,10 @@
 /*To use the same value of using_sysemu as the caller, ask it that value (in local_using_sysemu)*/
 static void handle_trap(int pid, union uml_pt_regs *regs, int local_using_sysemu)
 {
-	int err, syscall_nr, status;
+	int err, status;
 
-	syscall_nr = PT_SYSCALL_NR(regs->skas.regs);
-	UPT_SYSCALL_NR(regs) = syscall_nr;
-	if(syscall_nr < 0){
-		relay_signal(SIGTRAP, regs);
-		return;
-	}
+	/* Mark this as a syscall */
+	UPT_SYSCALL_NR(regs) = PT_SYSCALL_NR(regs->skas.regs);
 
 	if (!local_using_sysemu)
 	{
@@ -82,7 +79,7 @@
 			      "errno = %d\n", errno);
 
 		CATCH_EINTR(err = waitpid(pid, &status, WUNTRACED));
-		if((err < 0) || !WIFSTOPPED(status) || (WSTOPSIG(status) != SIGTRAP))
+		if((err < 0) || !WIFSTOPPED(status) || (WSTOPSIG(status) != (SIGTRAP + 0x80)))
 			panic("handle_trap - failed to wait at end of syscall, "
 			      "errno = %d, status = %d\n", errno, status);
 	}
@@ -131,6 +128,10 @@
 		panic("start_userspace : expected SIGSTOP, got status = %d",
 		      status);
 
+	if (ptrace(PTRACE_SETOPTIONS, pid, NULL, (void *)PTRACE_O_TRACESYSGOOD) < 0)
+		panic("start_userspace : PTRACE_SETOPTIONS failed, errno=%d\n",
+		      errno);
+
 	if(munmap(stack, PAGE_SIZE) < 0)
 		panic("start_userspace : munmap failed, errno = %d\n", errno);
 
@@ -139,15 +140,15 @@
 
 void userspace(union uml_pt_regs *regs)
 {
-	int err, status, op, pt_syscall_parm, pid = userspace_pid[0];
+	int err, status, op, pid = userspace_pid[0];
 	int local_using_sysemu; /*To prevent races if using_sysemu changes under us.*/
 
 	restore_registers(regs);
 		
 	local_using_sysemu = get_using_sysemu();
 
-	pt_syscall_parm = local_using_sysemu ? PTRACE_SYSEMU : PTRACE_SYSCALL;
-	err = ptrace(pt_syscall_parm, pid, 0, 0);
+	op = local_using_sysemu ? PTRACE_SYSEMU : PTRACE_SYSCALL;
+	err = ptrace(op, pid, 0, 0);
 
 	if(err)
 		panic("userspace - PTRACE_%s failed, errno = %d\n",
@@ -160,15 +161,19 @@
 
 		regs->skas.is_user = 1;
 		save_registers(regs);
+		UPT_SYSCALL_NR(regs) = -1; /* Assume: It's not a syscall */
 
 		if(WIFSTOPPED(status)){
 		  	switch(WSTOPSIG(status)){
 			case SIGSEGV:
 				handle_segv(pid);
 				break;
-			case SIGTRAP:
+			case SIGTRAP + 0x80:
 			        handle_trap(pid, regs, local_using_sysemu);
 				break;
+			case SIGTRAP:
+				relay_signal(SIGTRAP, regs);
+				break;
 			case SIGIO:
 			case SIGVTALRM:
 			case SIGILL:
@@ -182,16 +187,17 @@
 				       "%d\n", WSTOPSIG(status));
 			}
 			interrupt_end();
+
+			/* Avoid -ERESTARTSYS handling in host */
+			PT_SYSCALL_NR(regs->skas.regs) = -1;
 		}
 
 		restore_registers(regs);
 
 		/*Now we ended the syscall, so re-read local_using_sysemu.*/
 		local_using_sysemu = get_using_sysemu();
-		pt_syscall_parm = local_using_sysemu ? PTRACE_SYSEMU : PTRACE_SYSCALL;
 
-		op = singlestepping(NULL) ? PTRACE_SINGLESTEP :
-			pt_syscall_parm;
+		op = SELECT_PTRACE_OPERATION(local_using_sysemu, singlestepping(NULL));
 
 		err = ptrace(op, pid, 0, 0);
 		if(err)
diff -Nru a/arch/um/kernel/skas/process_kern.c b/arch/um/kernel/skas/process_kern.c
--- a/arch/um/kernel/skas/process_kern.c	2005-01-10 20:11:24 -08:00
+++ b/arch/um/kernel/skas/process_kern.c	2005-01-10 20:11:24 -08:00
@@ -19,7 +19,6 @@
 #include "os.h"
 #include "user_util.h"
 #include "tlb.h"
-#include "frame.h"
 #include "kern.h"
 #include "mode.h"
 #include "proc_mm.h"
@@ -183,7 +182,6 @@
 int start_uml_skas(void)
 {
 	start_userspace(0);
-	capture_signal_stack();
 
 	init_new_thread_signals(1);
 	uml_idle_timer();
diff -Nru a/arch/um/kernel/skas/sys-i386/Makefile b/arch/um/kernel/skas/sys-i386/Makefile
--- a/arch/um/kernel/skas/sys-i386/Makefile	2005-01-10 20:11:22 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,12 +0,0 @@
-# 
-# Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
-# Licensed under the GPL
-#
-
-obj-y = sigcontext.o
-
-USER_OBJS = sigcontext.o
-USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file))
-
-$(USER_OBJS) : %.o: %.c
-	$(CC) $(CFLAGS_$(notdir $@)) $(USER_CFLAGS) -c -o $@ $<
diff -Nru a/arch/um/kernel/skas/sys-i386/sigcontext.c b/arch/um/kernel/skas/sys-i386/sigcontext.c
--- a/arch/um/kernel/skas/sys-i386/sigcontext.c	2005-01-10 20:11:16 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,114 +0,0 @@
-/* 
- * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
- * Licensed under the GPL
- */
-
-#include <errno.h>
-#include <asm/sigcontext.h>
-#include <sys/ptrace.h>
-#include <linux/ptrace.h>
-#include "sysdep/ptrace.h"
-#include "sysdep/ptrace_user.h"
-#include "kern_util.h"
-#include "user.h"
-#include "sigcontext.h"
-#include "mode.h"
-
-int copy_sc_from_user_skas(int pid, union uml_pt_regs *regs, void *from_ptr)
-{
-  	struct sigcontext sc, *from = from_ptr;
-	unsigned long fpregs[FP_FRAME_SIZE];
-	int err;
-
-	err = copy_from_user_proc(&sc, from, sizeof(sc));
-	err |= copy_from_user_proc(fpregs, sc.fpstate, sizeof(fpregs));
-	if(err)
-		return(err);
-
-	regs->skas.regs[GS] = sc.gs;
-	regs->skas.regs[FS] = sc.fs;
-	regs->skas.regs[ES] = sc.es;
-	regs->skas.regs[DS] = sc.ds;
-	regs->skas.regs[EDI] = sc.edi;
-	regs->skas.regs[ESI] = sc.esi;
-	regs->skas.regs[EBP] = sc.ebp;
-	regs->skas.regs[UESP] = sc.esp;
-	regs->skas.regs[EBX] = sc.ebx;
-	regs->skas.regs[EDX] = sc.edx;
-	regs->skas.regs[ECX] = sc.ecx;
-	regs->skas.regs[EAX] = sc.eax;
-	regs->skas.regs[EIP] = sc.eip;
-	regs->skas.regs[CS] = sc.cs;
-	regs->skas.regs[EFL] = sc.eflags;
-	regs->skas.regs[SS] = sc.ss;
-	regs->skas.fault_addr = sc.cr2;
-	regs->skas.fault_type = FAULT_WRITE(sc.err);
-	regs->skas.trap_type = sc.trapno;
-
-	err = ptrace(PTRACE_SETFPREGS, pid, 0, fpregs);
-	if(err < 0){
-	  	printk("copy_sc_to_user - PTRACE_SETFPREGS failed, "
-		       "errno = %d\n", errno);
-		return(1);
-	}
-
-	return(0);
-}
-
-int copy_sc_to_user_skas(int pid, void *to_ptr, void *fp,
-			 union uml_pt_regs *regs, unsigned long fault_addr,
-			 int fault_type)
-{
-  	struct sigcontext sc, *to = to_ptr;
-	struct _fpstate *to_fp;
-	unsigned long fpregs[FP_FRAME_SIZE];
-	int err;
-
-	sc.gs = regs->skas.regs[GS];
-	sc.fs = regs->skas.regs[FS];
-	sc.es = regs->skas.regs[ES];
-	sc.ds = regs->skas.regs[DS];
-	sc.edi = regs->skas.regs[EDI];
-	sc.esi = regs->skas.regs[ESI];
-	sc.ebp = regs->skas.regs[EBP];
-	sc.esp = regs->skas.regs[UESP];
-	sc.ebx = regs->skas.regs[EBX];
-	sc.edx = regs->skas.regs[EDX];
-	sc.ecx = regs->skas.regs[ECX];
-	sc.eax = regs->skas.regs[EAX];
-	sc.eip = regs->skas.regs[EIP];
-	sc.cs = regs->skas.regs[CS];
-	sc.eflags = regs->skas.regs[EFL];
-	sc.esp_at_signal = regs->skas.regs[UESP];
-	sc.ss = regs->skas.regs[SS];
-	sc.cr2 = fault_addr;
-	sc.err = TO_SC_ERR(fault_type);
-	sc.trapno = regs->skas.trap_type;
-
-	err = ptrace(PTRACE_GETFPREGS, pid, 0, fpregs);
-	if(err < 0){
-	  	printk("copy_sc_to_user - PTRACE_GETFPREGS failed, "
-		       "errno = %d\n", errno);
-		return(1);
-	}
-	to_fp = (struct _fpstate *) 
-		(fp ? (unsigned long) fp : ((unsigned long) to + sizeof(*to)));
-	sc.fpstate = to_fp;
-
-	if(err)
-	  	return(err);
-
-	return(copy_to_user_proc(to, &sc, sizeof(sc)) ||
-	       copy_to_user_proc(to_fp, fpregs, sizeof(fpregs)));
-}
-
-/*
- * 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-file-style: "linux"
- * End:
- */
diff -Nru a/arch/um/kernel/time.c b/arch/um/kernel/time.c
--- a/arch/um/kernel/time.c	2005-01-10 20:11:17 -08:00
+++ b/arch/um/kernel/time.c	2005-01-10 20:11:17 -08:00
@@ -60,6 +60,9 @@
 	   (setitimer(ITIMER_REAL, &disable, NULL) < 0))
 		printk("disnable_timer - setitimer failed, errno = %d\n",
 		       errno);
+	/* If there are signals already queued, after unblocking ignore them */
+	set_handler(SIGALRM, SIG_IGN, 0, -1);
+	set_handler(SIGVTALRM, SIG_IGN, 0, -1);
 }
 
 void switch_timers(int to_real)
diff -Nru a/arch/um/kernel/time_kern.c b/arch/um/kernel/time_kern.c
--- a/arch/um/kernel/time_kern.c	2005-01-10 20:11:20 -08:00
+++ b/arch/um/kernel/time_kern.c	2005-01-10 20:11:20 -08:00
@@ -170,7 +170,7 @@
 void timer_handler(int sig, union uml_pt_regs *regs)
 {
 	local_irq_disable();
-	update_process_times(user_context(UPT_SP(regs)));
+	update_process_times(CHOOSE_MODE(user_context(UPT_SP(regs)), (regs)->skas.is_user));
 	local_irq_enable();
 	if(current_thread->cpu == 0)
 		timer_irq(regs);
diff -Nru a/arch/um/kernel/trap_user.c b/arch/um/kernel/trap_user.c
--- a/arch/um/kernel/trap_user.c	2005-01-10 20:11:18 -08:00
+++ b/arch/um/kernel/trap_user.c	2005-01-10 20:11:18 -08:00
@@ -18,7 +18,6 @@
 #include "sigcontext.h"
 #include "sysdep/sigcontext.h"
 #include "irq_user.h"
-#include "frame_user.h"
 #include "signal_user.h"
 #include "time_user.h"
 #include "task.h"
diff -Nru a/arch/um/kernel/tt/Makefile b/arch/um/kernel/tt/Makefile
--- a/arch/um/kernel/tt/Makefile	2005-01-10 20:11:19 -08:00
+++ b/arch/um/kernel/tt/Makefile	2005-01-10 20:11:19 -08:00
@@ -8,7 +8,7 @@
 
 obj-y = exec_kern.o exec_user.o gdb.o ksyms.o mem.o mem_user.o process_kern.o \
 	syscall_kern.o syscall_user.o time.o tlb.o tracer.o trap_user.o \
-	uaccess.o uaccess_user.o sys-$(SUBARCH)/
+	uaccess.o uaccess_user.o
 
 obj-$(CONFIG_PT_PROXY) += gdb_kern.o ptproxy/
 
diff -Nru a/arch/um/kernel/tt/exec_user.c b/arch/um/kernel/tt/exec_user.c
--- a/arch/um/kernel/tt/exec_user.c	2005-01-10 20:11:21 -08:00
+++ b/arch/um/kernel/tt/exec_user.c	2005-01-10 20:11:21 -08:00
@@ -10,11 +10,13 @@
 #include <errno.h>
 #include <sys/wait.h>
 #include <sys/ptrace.h>
+#include <linux/ptrace.h>
 #include <signal.h>
 #include "user_util.h"
 #include "kern_util.h"
 #include "user.h"
 #include "ptrace_user.h"
+#include "os.h"
 
 void do_exec(int old_pid, int new_pid)
 {
@@ -35,7 +37,10 @@
 		tracer_panic("do_exec failed to get registers - errno = %d",
 			     errno);
 
-	kill(old_pid, SIGKILL);
+	os_kill_ptraced_process(old_pid, 0);
+
+	if (ptrace(PTRACE_SETOPTIONS, new_pid, 0, (void *)PTRACE_O_TRACESYSGOOD) < 0)
+		tracer_panic("do_exec: PTRACE_SETOPTIONS failed, errno = %d", errno);
 
 	if(ptrace_setregs(new_pid, regs) < 0)
 		tracer_panic("do_exec failed to start new proc - errno = %d",
diff -Nru a/arch/um/kernel/tt/include/mode-tt.h b/arch/um/kernel/tt/include/mode-tt.h
--- a/arch/um/kernel/tt/include/mode-tt.h	2005-01-10 20:11:20 -08:00
+++ b/arch/um/kernel/tt/include/mode-tt.h	2005-01-10 20:11:20 -08:00
@@ -14,9 +14,6 @@
 
 extern int tracer(int (*init_proc)(void *), void *sp);
 extern void user_time_init_tt(void);
-extern int copy_sc_from_user_tt(void *to_ptr, void *from_ptr, void *data);
-extern int copy_sc_to_user_tt(void *to_ptr, void *fp, void *from_ptr,
-			      void *data);
 extern void sig_handler_common_tt(int sig, void *sc);
 extern void syscall_handler_tt(int sig, union uml_pt_regs *regs);
 extern void reboot_tt(void);
diff -Nru a/arch/um/kernel/tt/include/tt.h b/arch/um/kernel/tt/include/tt.h
--- a/arch/um/kernel/tt/include/tt.h	2005-01-10 20:11:19 -08:00
+++ b/arch/um/kernel/tt/include/tt.h	2005-01-10 20:11:19 -08:00
@@ -26,7 +26,8 @@
 extern int is_tracing(void *task);
 extern void syscall_handler(int sig, union uml_pt_regs *regs);
 extern void exit_kernel(int pid, void *task);
-extern int do_syscall(void *task, int pid, int local_using_sysemu);
+extern void do_syscall(void *task, int pid, int local_using_sysemu);
+extern void do_sigtrap(void *task);
 extern int is_valid_pid(int pid);
 extern void remap_data(void *segment_start, void *segment_end, int w);
 
diff -Nru a/arch/um/kernel/tt/process_kern.c b/arch/um/kernel/tt/process_kern.c
--- a/arch/um/kernel/tt/process_kern.c	2005-01-10 20:11:21 -08:00
+++ b/arch/um/kernel/tt/process_kern.c	2005-01-10 20:11:21 -08:00
@@ -65,7 +65,8 @@
 		panic("write of switch_pipe failed, err = %d", -err);
 
 	reading = 1;
-	if((from->exit_state == EXIT_ZOMBIE) || (from->exit_state == EXIT_DEAD))
+	if((from->exit_state == EXIT_ZOMBIE) ||
+	   (from->exit_state == EXIT_DEAD))
 		os_kill_process(os_getpid(), 0);
 
 	err = os_read_file(from->thread.mode.tt.switch_pipe[0], &c, sizeof(c));
@@ -82,7 +83,7 @@
 	prev_sched = current->thread.prev_sched;
 	if((prev_sched->exit_state == EXIT_ZOMBIE) ||
 	   (prev_sched->exit_state == EXIT_DEAD))
-		os_kill_ptraced_process(prev_sched->thread.mode.tt.extern_pid, 1);
+		os_kill_process(prev_sched->thread.mode.tt.extern_pid, 1);
 
 	/* This works around a nasty race with 'jail'.  If we are switching
 	 * between two threads of a threaded app and the incoming process 
diff -Nru a/arch/um/kernel/tt/sys-i386/Makefile b/arch/um/kernel/tt/sys-i386/Makefile
--- a/arch/um/kernel/tt/sys-i386/Makefile	2005-01-10 20:11:18 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,12 +0,0 @@
-# 
-# Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
-# Licensed under the GPL
-#
-
-obj-y = sigcontext.o
-
-USER_OBJS = sigcontext.o
-USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file))
-
-$(USER_OBJS) : %.o: %.c
-	$(CC) $(CFLAGS_$(notdir $@)) $(USER_CFLAGS) -c -o $@ $<
diff -Nru a/arch/um/kernel/tt/sys-i386/sigcontext.c b/arch/um/kernel/tt/sys-i386/sigcontext.c
--- a/arch/um/kernel/tt/sys-i386/sigcontext.c	2005-01-10 20:11:23 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,60 +0,0 @@
-/* 
- * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
- * Licensed under the GPL
- */
-
-#include <stdlib.h>
-#include <asm/sigcontext.h>
-#include "kern_util.h"
-#include "sysdep/frame.h"
-
-int copy_sc_from_user_tt(void *to_ptr, void *from_ptr, void *data)
-{
-	struct arch_frame_data *arch = data;
-	struct sigcontext *to = to_ptr, *from = from_ptr;
-	struct _fpstate *to_fp, *from_fp;
-	unsigned long sigs;
-	int err;
-
-	to_fp = to->fpstate;
-	from_fp = from->fpstate;
-	sigs = to->oldmask;
-	err = copy_from_user_proc(to, from, sizeof(*to));
-	to->oldmask = sigs;
-	if(to_fp != NULL){
-		err |= copy_from_user_proc(&to->fpstate, &to_fp,
-					   sizeof(to->fpstate));
-		err |= copy_from_user_proc(to_fp, from_fp, arch->fpstate_size);
-	}
-	return(err);
-}
-
-int copy_sc_to_user_tt(void *to_ptr, void *fp, void *from_ptr, void *data)
-{
-	struct arch_frame_data *arch = data;
-	struct sigcontext *to = to_ptr, *from = from_ptr;
-	struct _fpstate *to_fp, *from_fp;
-	int err;
-
-	to_fp = (struct _fpstate *) 
-		(fp ? (unsigned long) fp : ((unsigned long) to + sizeof(*to)));
-	from_fp = from->fpstate;
-	err = copy_to_user_proc(to, from, sizeof(*to));
-	if(from_fp != NULL){
-		err |= copy_to_user_proc(&to->fpstate, &to_fp,
-					 sizeof(to->fpstate));
-		err |= copy_to_user_proc(to_fp, from_fp, arch->fpstate_size);
-	}
-	return(err);
-}
-
-/*
- * 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-file-style: "linux"
- * End:
- */
diff -Nru a/arch/um/kernel/tt/syscall_user.c b/arch/um/kernel/tt/syscall_user.c
--- a/arch/um/kernel/tt/syscall_user.c	2005-01-10 20:11:20 -08:00
+++ b/arch/um/kernel/tt/syscall_user.c	2005-01-10 20:11:20 -08:00
@@ -43,35 +43,33 @@
 	record_syscall_end(index, result);
 }
 
-int do_syscall(void *task, int pid, int local_using_sysemu)
+void do_sigtrap(void *task)
+{
+	UPT_SYSCALL_NR(TASK_REGS(task)) = -1;
+}
+
+void do_syscall(void *task, int pid, int local_using_sysemu)
 {
 	unsigned long proc_regs[FRAME_SIZE];
-	union uml_pt_regs *regs;
-	int syscall;
 
 	if(ptrace_getregs(pid, proc_regs) < 0)
 		tracer_panic("Couldn't read registers");
-	syscall = PT_SYSCALL_NR(proc_regs);
-
-	regs = TASK_REGS(task);
-	UPT_SYSCALL_NR(regs) = syscall;
 
-	if(syscall < 0)
-		return(0);
+	UPT_SYSCALL_NR(TASK_REGS(task)) = PT_SYSCALL_NR(proc_regs);
 
-	if((syscall != __NR_sigreturn) &&
-	   ((unsigned long *) PT_IP(proc_regs) >= &_stext) && 
+	if(((unsigned long *) PT_IP(proc_regs) >= &_stext) &&
 	   ((unsigned long *) PT_IP(proc_regs) <= &_etext))
 		tracer_panic("I'm tracing myself and I can't get out");
 
-	if(local_using_sysemu)
-		return(1);
+	/* advanced sysemu mode set syscall number to -1 automatically */
+	if (local_using_sysemu==2)
+		return;
 
+	/* syscall number -1 in sysemu skips syscall restarting in host */
 	if(ptrace(PTRACE_POKEUSER, pid, PT_SYSCALL_NR_OFFSET, 
-		  __NR_getpid) < 0)
+		  local_using_sysemu ? -1 : __NR_getpid) < 0)
 		tracer_panic("do_syscall : Nullifying syscall failed, "
 			     "errno = %d", errno);
-	return(1);
 }
 
 /*
diff -Nru a/arch/um/kernel/tt/tracer.c b/arch/um/kernel/tt/tracer.c
--- a/arch/um/kernel/tt/tracer.c	2005-01-10 20:11:15 -08:00
+++ b/arch/um/kernel/tt/tracer.c	2005-01-10 20:11:15 -08:00
@@ -13,6 +13,7 @@
 #include <string.h>
 #include <sys/mman.h>
 #include <sys/ptrace.h>
+#include <linux/ptrace.h>
 #include <sys/time.h>
 #include <sys/wait.h>
 #include "user.h"
@@ -25,7 +26,6 @@
 #include "mem_user.h"
 #include "process.h"
 #include "kern_util.h"
-#include "frame.h"
 #include "chan_user.h"
 #include "ptrace_user.h"
 #include "mode.h"
@@ -72,6 +72,8 @@
 	   (ptrace(PTRACE_CONT, pid, 0, 0) < 0))
 		tracer_panic("OP_FORK failed to attach pid");
 	wait_for_stop(pid, SIGSTOP, PTRACE_CONT, NULL);
+	if (ptrace(PTRACE_SETOPTIONS, pid, 0, (void *)PTRACE_O_TRACESYSGOOD) < 0)
+		tracer_panic("OP_FORK: PTRACE_SETOPTIONS failed, errno = %d", errno);
 	if(ptrace(PTRACE_CONT, pid, 0, 0) < 0)
 		tracer_panic("OP_FORK failed to continue process");
 }
@@ -141,7 +143,7 @@
 	 * any more, the trace of those will land here.  So, we need to just 
 	 * PTRACE_SYSCALL it.
 	 */
-	case SIGTRAP:
+	case (SIGTRAP + 0x80):
 		if(ptrace(PTRACE_SYSCALL, pid, 0, 0) < 0)
 			tracer_panic("sleeping_process_signal : Failed to "
 				     "PTRACE_SYSCALL pid %d, errno = %d\n",
@@ -184,9 +186,8 @@
 	unsigned long eip = 0;
 	int status, pid = 0, sig = 0, cont_type, tracing = 0, op = 0;
 	int last_index, proc_id = 0, n, err, old_tracing = 0, strace = 0;
-	int pt_syscall_parm, local_using_sysemu;
+	int local_using_sysemu = 0;
 
-	capture_signal_stack();
 	signal(SIGPIPE, SIG_IGN);
 	setup_tracer_winch();
 	tracing_pid = os_getpid();
@@ -198,6 +199,10 @@
 		printf("waitpid on idle thread failed, errno = %d\n", errno);
 		exit(1);
 	}
+	if (ptrace(PTRACE_SETOPTIONS, pid, 0, (void *)PTRACE_O_TRACESYSGOOD) < 0) {
+		printf("Failed to PTRACE_SETOPTIONS for idle thread, errno = %d\n", errno);
+		exit(1);
+	}
 	if((ptrace(PTRACE_CONT, pid, 0, 0) < 0)){
 		printf("Failed to continue idle thread, errno = %d\n", errno);
 		exit(1);
@@ -298,8 +303,9 @@
 			tracing = is_tracing(task);
 			old_tracing = tracing;
 
-			local_using_sysemu = get_using_sysemu();
-			pt_syscall_parm = local_using_sysemu ? PTRACE_SYSEMU : PTRACE_SYSCALL;
+			/* Assume: no syscall, when coming from user */
+			if ( tracing )
+				do_sigtrap(task);
 
 			switch(sig){
 			case SIGUSR1:
@@ -314,7 +320,13 @@
 				case OP_HALT:
 					unmap_physmem();
 					kmalloc_ok = 0;
-					ptrace(PTRACE_KILL, pid, 0, 0);
+					os_kill_ptraced_process(pid, 0);
+					/* Now let's reap remaining zombies */
+					errno = 0;
+					do {
+						waitpid(-1, &status,
+							WUNTRACED);
+					} while (errno != ECHILD);
 					return(op == OP_REBOOT);
 				case OP_NONE:
 					printf("Detaching pid %d\n", pid);
@@ -328,14 +340,21 @@
 				 */
 				pid = cpu_tasks[proc_id].pid;
 				break;
+			case (SIGTRAP + 0x80):
+				if(!tracing && (debugger_pid != -1)){
+					child_signal(pid, status & 0x7fff);
+					continue;
+				}
+				tracing = 0;
+				do_syscall(task, pid, local_using_sysemu);
+				sig = SIGUSR2;
+				break;
 			case SIGTRAP:
 				if(!tracing && (debugger_pid != -1)){
 					child_signal(pid, status);
 					continue;
 				}
 				tracing = 0;
-				if(do_syscall(task, pid, local_using_sysemu))
-					sig = SIGUSR2;
 				break;
 			case SIGPROF:
 				if(tracing) sig = 0;
@@ -371,16 +390,15 @@
 				continue;
 			}
 
-			if(tracing){
-				if(singlestepping(task))
-					cont_type = PTRACE_SINGLESTEP;
-				else cont_type = pt_syscall_parm;
-			}
-			else cont_type = PTRACE_CONT;
+			local_using_sysemu = get_using_sysemu();
 
-			if((cont_type == PTRACE_CONT) && 
-			   (debugger_pid != -1) && strace)
+			if(tracing)
+				cont_type = SELECT_PTRACE_OPERATION(local_using_sysemu,
+				                                    singlestepping(task));
+			else if((debugger_pid != -1) && strace)
 				cont_type = PTRACE_SYSCALL;
+			else
+				cont_type = PTRACE_CONT;
 
 			if(ptrace(cont_type, pid, 0, sig) != 0){
 				tracer_panic("ptrace failed to continue "
diff -Nru a/arch/um/kernel/tt/trap_user.c b/arch/um/kernel/tt/trap_user.c
--- a/arch/um/kernel/tt/trap_user.c	2005-01-10 20:11:19 -08:00
+++ b/arch/um/kernel/tt/trap_user.c	2005-01-10 20:11:19 -08:00
@@ -30,13 +30,6 @@
 	if(sig == SIGSEGV)
 		change_sig(SIGSEGV, 1);
 
-	/* This is done because to allow SIGSEGV to be delivered inside a SEGV
-	 * handler.  This can happen in copy_user, and if SEGV is disabled,
-	 * the process will die.
-	 */
-	if(sig == SIGSEGV)
-		change_sig(SIGSEGV, 1);
-
 	r = &TASK_REGS(get_current())->tt;
 	save_regs = *r;
 	is_user = user_context(SC_SP(sc));
diff -Nru a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c
--- a/arch/um/kernel/um_arch.c	2005-01-10 20:11:21 -08:00
+++ b/arch/um/kernel/um_arch.c	2005-01-10 20:11:21 -08:00
@@ -44,11 +44,6 @@
 	.ipi_pipe		= { -1, -1 }
 };
 
-/* Placeholder to make UML link until the vsyscall stuff is actually
- * implemented
- */
-void *__kernel_vsyscall;
-
 unsigned long thread_saved_pc(struct task_struct *task)
 {
 	return(os_process_pc(CHOOSE_MODE_PROC(thread_pid_tt, thread_pid_skas,
@@ -300,6 +295,7 @@
 /* Set during early boot */
 unsigned long brk_start;
 unsigned long end_iomem;
+EXPORT_SYMBOL(end_iomem);
 
 #define MIN_VMALLOC (32 * 1024 * 1024)
 
diff -Nru a/arch/um/kernel/umid.c b/arch/um/kernel/umid.c
--- a/arch/um/kernel/umid.c	2005-01-10 20:11:22 -08:00
+++ b/arch/um/kernel/umid.c	2005-01-10 20:11:22 -08:00
@@ -93,8 +93,8 @@
 	fd = os_open_file(file, of_create(of_excl(of_rdwr(OPENFLAGS()))), 
 			  0644);
 	if(fd < 0){
-		printf("Open of machine pid file \"%s\" failed - "
-		       "err = %d\n", file, -fd);
+		printf("Open of machine pid file \"%s\" failed: %s\n",
+		       file, strerror(-fd));
 		return 0;
 	}
 
@@ -248,7 +248,7 @@
 	strcpy(uml_dir, dir);
 	
 	if((mkdir(uml_dir, 0777) < 0) && (errno != EEXIST)){
-	        printf("Failed to mkdir %s - errno = %i\n", uml_dir, errno);
+	        printf("Failed to mkdir %s: %s\n", uml_dir, strerror(errno));
 		return(-1);
 	}
 	return 0;
@@ -265,8 +265,8 @@
 		strcat(tmp, "XXXXXX");
 		fd = mkstemp(tmp);
 		if(fd < 0){
-			(*printer)("make_umid - mkstemp failed, errno = %d\n",
-				   errno);
+			(*printer)("make_umid - mkstemp(%s) failed: %s\n",
+				   tmp,strerror(errno));
 			return(1);
 		}
 
@@ -304,15 +304,14 @@
 "    The location to place the pid and umid files.\n\n"
 );
 
-__uml_postsetup(make_uml_dir);
-
 static int __init make_umid_setup(void)
 {
-	return(make_umid(printf));
+	/* one function with the ordering we need ... */
+	make_uml_dir();
+	make_umid(printf);
+	return create_pid_file();
 }
-
 __uml_postsetup(make_umid_setup);
-__uml_postsetup(create_pid_file);
 
 /*
  * Overrides for Emacs so that we follow Linus's tabbing style.
diff -Nru a/arch/um/os-Linux/Makefile b/arch/um/os-Linux/Makefile
--- a/arch/um/os-Linux/Makefile	2005-01-10 20:11:20 -08:00
+++ b/arch/um/os-Linux/Makefile	2005-01-10 20:11:20 -08:00
@@ -3,9 +3,10 @@
 # Licensed under the GPL
 #
 
-obj-y = file.o process.o time.o tty.o user_syms.o drivers/
+obj-y = elf_aux.o file.o process.o time.o tty.o user_syms.o drivers/
 
-USER_OBJS := $(foreach file,file.o process.o time.o tty.o,$(obj)/$(file))
+USER_OBJS := elf_aux.o file.o process.o time.o tty.o
+USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file))
 
 $(USER_OBJS) : %.o: %.c
 	$(CC) $(CFLAGS_$(notdir $@)) $(USER_CFLAGS) -c -o $@ $<
diff -Nru a/arch/um/os-Linux/elf_aux.c b/arch/um/os-Linux/elf_aux.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/um/os-Linux/elf_aux.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,67 @@
+/*
+ *  arch/um/kernel/elf_aux.c
+ *
+ *  Scan the Elf auxiliary vector provided by the host to extract
+ *  information about vsyscall-page, etc.
+ *
+ *  Copyright (C) 2004 Fujitsu Siemens Computers GmbH
+ *  Author: Bodo Stroesser (bodo.stroesser@fujitsu-siemens.com)
+ */
+#include <elf.h>
+#include <stddef.h>
+#include "init.h"
+#include "elf_user.h"
+
+#if ELF_CLASS == ELFCLASS32
+typedef Elf32_auxv_t elf_auxv_t;
+#else
+typedef Elf64_auxv_t elf_auxv_t;
+#endif
+
+char * elf_aux_platform;
+long elf_aux_hwcap;
+
+unsigned long vsyscall_ehdr;
+unsigned long vsyscall_end;
+
+unsigned long __kernel_vsyscall;
+
+
+__init void scan_elf_aux( char **envp)
+{
+	long page_size = 0;
+	elf_auxv_t * auxv;
+
+	while ( *envp++ != NULL) ;
+
+	for ( auxv = (elf_auxv_t *)envp; auxv->a_type != AT_NULL; auxv++) {
+		switch ( auxv->a_type ) {
+			case AT_SYSINFO:
+				__kernel_vsyscall = auxv->a_un.a_val;
+				break;
+			case AT_SYSINFO_EHDR:
+				vsyscall_ehdr = auxv->a_un.a_val;
+				break;
+			case AT_HWCAP:
+				elf_aux_hwcap = auxv->a_un.a_val;
+				break;
+			case AT_PLATFORM:
+				elf_aux_platform = auxv->a_un.a_ptr;
+				break;
+			case AT_PAGESZ:
+				page_size = auxv->a_un.a_val;
+				break;
+		}
+	}
+	if ( ! __kernel_vsyscall || ! vsyscall_ehdr ||
+	     ! elf_aux_hwcap || ! elf_aux_platform ||
+	     ! page_size || (vsyscall_ehdr % page_size) ) {
+		__kernel_vsyscall = 0;
+		vsyscall_ehdr = 0;
+		elf_aux_hwcap = 0;
+		elf_aux_platform = "i586";
+	}
+	else {
+		vsyscall_end = vsyscall_ehdr + page_size;
+	}
+}
diff -Nru a/arch/um/os-Linux/process.c b/arch/um/os-Linux/process.c
--- a/arch/um/os-Linux/process.c	2005-01-10 20:11:16 -08:00
+++ b/arch/um/os-Linux/process.c	2005-01-10 20:11:16 -08:00
@@ -95,9 +95,16 @@
 		
 }
 
+/* Kill off a ptraced child by all means available.  kill it normally first,
+ * then PTRACE_KILL it, then PTRACE_CONT it in case it's in a run state from
+ * which it can't exit directly.
+ */
+
 void os_kill_ptraced_process(int pid, int reap_child)
 {
+	kill(pid, SIGKILL);
 	ptrace(PTRACE_KILL, pid);
+	ptrace(PTRACE_CONT, pid);
 	if(reap_child)
 		CATCH_EINTR(waitpid(pid, NULL, 0));
 }
diff -Nru a/arch/um/os-Linux/user_syms.c b/arch/um/os-Linux/user_syms.c
--- a/arch/um/os-Linux/user_syms.c	2005-01-10 20:11:21 -08:00
+++ b/arch/um/os-Linux/user_syms.c	2005-01-10 20:11:21 -08:00
@@ -26,6 +26,9 @@
 
 EXPORT_SYMBOL(strstr);
 
+EXPORT_SYMBOL(vsyscall_ehdr);
+EXPORT_SYMBOL(vsyscall_end);
+
 /* Here, instead, I can provide a fake prototype. Yes, someone cares: genksyms.
  * However, the modules will use the CRC defined *here*, no matter if it is
  * good; so the versions of these symbols will always match
diff -Nru a/arch/um/sys-i386/Makefile b/arch/um/sys-i386/Makefile
--- a/arch/um/sys-i386/Makefile	2005-01-10 20:11:16 -08:00
+++ b/arch/um/sys-i386/Makefile	2005-01-10 20:11:16 -08:00
@@ -1,5 +1,5 @@
 obj-y = bitops.o bugs.o checksum.o fault.o ksyms.o ldt.o ptrace.o \
-	ptrace_user.o semaphore.o sigcontext.o syscalls.o sysrq.o
+	ptrace_user.o semaphore.o signal.o sigcontext.o syscalls.o sysrq.o
 
 obj-$(CONFIG_HIGHMEM) += highmem.o
 obj-$(CONFIG_MODULES) += module.o
diff -Nru a/arch/um/sys-i386/ptrace_user.c b/arch/um/sys-i386/ptrace_user.c
--- a/arch/um/sys-i386/ptrace_user.c	2005-01-10 20:11:24 -08:00
+++ b/arch/um/sys-i386/ptrace_user.c	2005-01-10 20:11:24 -08:00
@@ -17,17 +17,30 @@
 
 int ptrace_getregs(long pid, unsigned long *regs_out)
 {
-	return(ptrace(PTRACE_GETREGS, pid, 0, regs_out));
+	if (ptrace(PTRACE_GETREGS, pid, 0, regs_out) < 0)
+		return -errno;
+	return 0;
 }
 
 int ptrace_setregs(long pid, unsigned long *regs)
 {
-	return(ptrace(PTRACE_SETREGS, pid, 0, regs));
+	if (ptrace(PTRACE_SETREGS, pid, 0, regs) < 0)
+		return -errno;
+	return 0;
 }
 
 int ptrace_getfpregs(long pid, unsigned long *regs)
 {
-	return(ptrace(PTRACE_GETFPREGS, pid, 0, regs));
+	if (ptrace(PTRACE_GETFPREGS, pid, 0, regs) < 0)
+		return -errno;
+	return 0;
+}
+
+int ptrace_setfpregs(long pid, unsigned long *regs)
+{
+	if (ptrace(PTRACE_SETFPREGS, pid, 0, regs) < 0)
+		return -errno;
+	return 0;
 }
 
 static void write_debugregs(int pid, unsigned long *regs)
diff -Nru a/arch/um/sys-i386/sigcontext.c b/arch/um/sys-i386/sigcontext.c
--- a/arch/um/sys-i386/sigcontext.c	2005-01-10 20:11:15 -08:00
+++ b/arch/um/sys-i386/sigcontext.c	2005-01-10 20:11:15 -08:00
@@ -9,22 +9,14 @@
 #include <asm/sigcontext.h>
 #include "sysdep/ptrace.h"
 #include "kern_util.h"
-#include "frame_user.h"
-
-int sc_size(void *data)
-{
-	struct arch_frame_data *arch = data;
-
-	return(sizeof(struct sigcontext) + arch->fpstate_size);
-}
 
 void sc_to_sc(void *to_ptr, void *from_ptr)
 {
 	struct sigcontext *to = to_ptr, *from = from_ptr;
-	int size = sizeof(*to) + signal_frame_sc.common.arch.fpstate_size;
 
-	memcpy(to, from, size);
-	if(from->fpstate != NULL) to->fpstate = (struct _fpstate *) (to + 1);
+	memcpy(to, from, sizeof(*to) + sizeof(struct _fpstate));
+	if(from->fpstate != NULL)
+		to->fpstate = (struct _fpstate *) (to + 1);
 }
 
 unsigned long *sc_sigmask(void *sc_ptr)
diff -Nru a/arch/um/sys-i386/signal.c b/arch/um/sys-i386/signal.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/um/sys-i386/signal.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,376 @@
+/*
+ * Copyright (C) 2004 Jeff Dike (jdike@addtoit.com)
+ * Licensed under the GPL
+ */
+
+#include "linux/signal.h"
+#include "linux/ptrace.h"
+#include "asm/current.h"
+#include "asm/ucontext.h"
+#include "asm/uaccess.h"
+#include "asm/unistd.h"
+#include "frame_kern.h"
+#include "signal_user.h"
+#include "ptrace_user.h"
+#include "sigcontext.h"
+#include "mode.h"
+
+#ifdef CONFIG_MODE_SKAS
+
+#include "skas.h"
+
+static int copy_sc_from_user_skas(struct pt_regs *regs,
+				  struct sigcontext *from)
+{
+  	struct sigcontext sc;
+	unsigned long fpregs[HOST_FP_SIZE];
+	int err;
+
+	err = copy_from_user(&sc, from, sizeof(sc));
+	err |= copy_from_user(fpregs, sc.fpstate, sizeof(fpregs));
+	if(err)
+		return(err);
+
+	REGS_GS(regs->regs.skas.regs) = sc.gs;
+	REGS_FS(regs->regs.skas.regs) = sc.fs;
+	REGS_ES(regs->regs.skas.regs) = sc.es;
+	REGS_DS(regs->regs.skas.regs) = sc.ds;
+	REGS_EDI(regs->regs.skas.regs) = sc.edi;
+	REGS_ESI(regs->regs.skas.regs) = sc.esi;
+	REGS_EBP(regs->regs.skas.regs) = sc.ebp;
+	REGS_SP(regs->regs.skas.regs) = sc.esp;
+	REGS_EBX(regs->regs.skas.regs) = sc.ebx;
+	REGS_EDX(regs->regs.skas.regs) = sc.edx;
+	REGS_ECX(regs->regs.skas.regs) = sc.ecx;
+	REGS_EAX(regs->regs.skas.regs) = sc.eax;
+	REGS_IP(regs->regs.skas.regs) = sc.eip;
+	REGS_CS(regs->regs.skas.regs) = sc.cs;
+	REGS_EFLAGS(regs->regs.skas.regs) = sc.eflags;
+	REGS_SS(regs->regs.skas.regs) = sc.ss;
+	regs->regs.skas.fault_addr = sc.cr2;
+	regs->regs.skas.fault_type = FAULT_WRITE(sc.err);
+	regs->regs.skas.trap_type = sc.trapno;
+
+	err = ptrace_setfpregs(userspace_pid[0], fpregs);
+	if(err < 0){
+	  	printk("copy_sc_from_user_skas - PTRACE_SETFPREGS failed, "
+		       "errno = %d\n", err);
+		return(1);
+	}
+
+	return(0);
+}
+
+int copy_sc_to_user_skas(struct sigcontext *to, struct _fpstate *to_fp,
+			 struct pt_regs *regs, unsigned long fault_addr,
+			 int fault_type)
+{
+  	struct sigcontext sc;
+	unsigned long fpregs[HOST_FP_SIZE];
+	int err;
+
+	sc.gs = REGS_GS(regs->regs.skas.regs);
+	sc.fs = REGS_FS(regs->regs.skas.regs);
+	sc.es = REGS_ES(regs->regs.skas.regs);
+	sc.ds = REGS_DS(regs->regs.skas.regs);
+	sc.edi = REGS_EDI(regs->regs.skas.regs);
+	sc.esi = REGS_ESI(regs->regs.skas.regs);
+	sc.ebp = REGS_EBP(regs->regs.skas.regs);
+	sc.esp = REGS_SP(regs->regs.skas.regs);
+	sc.ebx = REGS_EBX(regs->regs.skas.regs);
+	sc.edx = REGS_EDX(regs->regs.skas.regs);
+	sc.ecx = REGS_ECX(regs->regs.skas.regs);
+	sc.eax = REGS_EAX(regs->regs.skas.regs);
+	sc.eip = REGS_IP(regs->regs.skas.regs);
+	sc.cs = REGS_CS(regs->regs.skas.regs);
+	sc.eflags = REGS_EFLAGS(regs->regs.skas.regs);
+	sc.esp_at_signal = regs->regs.skas.regs[UESP];
+	sc.ss = regs->regs.skas.regs[SS];
+	sc.cr2 = fault_addr;
+	sc.err = TO_SC_ERR(fault_type);
+	sc.trapno = regs->regs.skas.trap_type;
+
+	err = ptrace_getfpregs(userspace_pid[0], fpregs);
+	if(err < 0){
+	  	printk("copy_sc_to_user_skas - PTRACE_GETFPREGS failed, "
+		       "errno = %d\n", err);
+		return(1);
+	}
+	to_fp = (to_fp ? to_fp : (struct _fpstate *) (to + 1));
+	sc.fpstate = to_fp;
+
+	if(err)
+	  	return(err);
+
+	return(copy_to_user(to, &sc, sizeof(sc)) ||
+	       copy_to_user(to_fp, fpregs, sizeof(fpregs)));
+}
+#endif
+
+#ifdef CONFIG_MODE_TT
+int copy_sc_from_user_tt(struct sigcontext *to, struct sigcontext *from,
+			 int fpsize)
+{
+	struct _fpstate *to_fp, *from_fp;
+	unsigned long sigs;
+	int err;
+
+	to_fp = to->fpstate;
+	from_fp = from->fpstate;
+	sigs = to->oldmask;
+	err = copy_from_user(to, from, sizeof(*to));
+	to->oldmask = sigs;
+	if(to_fp != NULL){
+		err |= copy_from_user(&to->fpstate, &to_fp,
+				      sizeof(to->fpstate));
+		err |= copy_from_user(to_fp, from_fp, fpsize);
+	}
+	return(err);
+}
+
+int copy_sc_to_user_tt(struct sigcontext *to, struct _fpstate *fp,
+		       struct sigcontext *from, int fpsize)
+{
+	struct _fpstate *to_fp, *from_fp;
+	int err;
+
+	to_fp =	(fp ? fp : (struct _fpstate *) (to + 1));
+	from_fp = from->fpstate;
+	err = copy_to_user(to, from, sizeof(*to));
+	if(from_fp != NULL){
+		err |= copy_to_user(&to->fpstate, &to_fp,
+					 sizeof(to->fpstate));
+		err |= copy_to_user(to_fp, from_fp, fpsize);
+	}
+	return(err);
+}
+#endif
+
+static int copy_sc_from_user(struct pt_regs *to, void *from)
+{
+	int ret;
+
+	ret = CHOOSE_MODE(copy_sc_from_user_tt(UPT_SC(&to->regs), from,
+					       sizeof(struct _fpstate)),
+			  copy_sc_from_user_skas(to, from));
+	return(ret);
+}
+
+static int copy_sc_to_user(struct sigcontext *to, struct _fpstate *fp,
+			   struct pt_regs *from)
+{
+	return(CHOOSE_MODE(copy_sc_to_user_tt(to, fp, UPT_SC(&from->regs),
+					      sizeof(*fp)),
+			   copy_sc_to_user_skas(to, fp, from,
+						current->thread.cr2,
+						current->thread.err)));
+}
+
+static int copy_ucontext_to_user(struct ucontext *uc, struct _fpstate *fp,
+				 sigset_t *set, unsigned long sp)
+{
+	int err = 0;
+
+	err |= put_user(current->sas_ss_sp, &uc->uc_stack.ss_sp);
+	err |= put_user(sas_ss_flags(sp), &uc->uc_stack.ss_flags);
+	err |= put_user(current->sas_ss_size, &uc->uc_stack.ss_size);
+	err |= copy_sc_to_user(&uc->uc_mcontext, fp, &current->thread.regs);
+	err |= copy_to_user(&uc->uc_sigmask, set, sizeof(*set));
+	return(err);
+}
+
+struct sigframe
+{
+	char *pretcode;
+	int sig;
+	struct sigcontext sc;
+	struct _fpstate fpstate;
+	unsigned long extramask[_NSIG_WORDS-1];
+	char retcode[8];
+};
+
+struct rt_sigframe
+{
+	char *pretcode;
+	int sig;
+	struct siginfo *pinfo;
+	void *puc;
+	struct siginfo info;
+	struct ucontext uc;
+	struct _fpstate fpstate;
+	char retcode[8];
+};
+
+int setup_signal_stack_sc(unsigned long stack_top, int sig,
+			  struct k_sigaction *ka, struct pt_regs *regs,
+			  sigset_t *mask)
+{
+	struct sigframe __user *frame;
+	void *restorer;
+	int err = 0;
+
+	stack_top &= -8UL;
+	frame = (struct sigframe *) stack_top - 1;
+	if(verify_area(VERIFY_WRITE, frame, sizeof(*frame)))
+		return(1);
+
+	restorer = (void *) frame->retcode;
+	if(ka->sa.sa_flags & SA_RESTORER)
+		restorer = ka->sa.sa_restorer;
+
+	err |= __put_user(restorer, &frame->pretcode);
+	err |= __put_user(sig, &frame->sig);
+	err |= copy_sc_to_user(&frame->sc, NULL, regs);
+	err |= __put_user(mask->sig[0], &frame->sc.oldmask);
+	if (_NSIG_WORDS > 1)
+		err |= __copy_to_user(&frame->extramask, &mask->sig[1],
+				      sizeof(frame->extramask));
+
+	/*
+	 * This is popl %eax ; movl $,%eax ; int $0x80
+	 *
+	 * WE DO NOT USE IT ANY MORE! It's only left here for historical
+	 * reasons and because gdb uses it as a signature to notice
+	 * signal handler stack frames.
+	 */
+	err |= __put_user(0xb858, (short __user *)(frame->retcode+0));
+	err |= __put_user(__NR_sigreturn, (int __user *)(frame->retcode+2));
+	err |= __put_user(0x80cd, (short __user *)(frame->retcode+6));
+
+	if(err)
+		return(err);
+
+	PT_REGS_SP(regs) = (unsigned long) frame;
+	PT_REGS_IP(regs) = (unsigned long) ka->sa.sa_handler;
+	PT_REGS_EAX(regs) = (unsigned long) sig;
+	PT_REGS_EDX(regs) = (unsigned long) 0;
+	PT_REGS_ECX(regs) = (unsigned long) 0;
+
+	if ((current->ptrace & PT_DTRACE) && (current->ptrace & PT_PTRACED))
+		ptrace_notify(SIGTRAP);
+	return(0);
+}
+
+int setup_signal_stack_si(unsigned long stack_top, int sig,
+			  struct k_sigaction *ka, struct pt_regs *regs,
+			  siginfo_t *info, sigset_t *mask)
+{
+	struct rt_sigframe __user *frame;
+	void *restorer;
+	int err = 0;
+
+	stack_top &= -8UL;
+	frame = (struct rt_sigframe *) stack_top - 1;
+	if(verify_area(VERIFY_WRITE, frame, sizeof(*frame)))
+		return(1);
+
+	restorer = (void *) frame->retcode;
+	if(ka->sa.sa_flags & SA_RESTORER)
+		restorer = ka->sa.sa_restorer;
+
+	err |= __put_user(restorer, &frame->pretcode);
+	err |= __put_user(sig, &frame->sig);
+	err |= __put_user(&frame->info, &frame->pinfo);
+	err |= __put_user(&frame->uc, &frame->puc);
+	err |= copy_siginfo_to_user(&frame->info, info);
+	err |= copy_ucontext_to_user(&frame->uc, &frame->fpstate, mask,
+				     PT_REGS_SP(regs));
+
+	/*
+	 * This is movl $,%eax ; int $0x80
+	 *
+	 * WE DO NOT USE IT ANY MORE! It's only left here for historical
+	 * reasons and because gdb uses it as a signature to notice
+	 * signal handler stack frames.
+	 */
+	err |= __put_user(0xb8, (char __user *)(frame->retcode+0));
+	err |= __put_user(__NR_rt_sigreturn, (int __user *)(frame->retcode+1));
+	err |= __put_user(0x80cd, (short __user *)(frame->retcode+5));
+
+	if(err)
+		return(err);
+
+	PT_REGS_SP(regs) = (unsigned long) frame;
+	PT_REGS_IP(regs) = (unsigned long) ka->sa.sa_handler;
+	PT_REGS_EAX(regs) = (unsigned long) sig;
+	PT_REGS_EDX(regs) = (unsigned long) &frame->info;
+	PT_REGS_ECX(regs) = (unsigned long) &frame->uc;
+
+	if ((current->ptrace & PT_DTRACE) && (current->ptrace & PT_PTRACED))
+		ptrace_notify(SIGTRAP);
+	return(0);
+}
+
+long sys_sigreturn(struct pt_regs regs)
+{
+	unsigned long __user sp = PT_REGS_SP(&current->thread.regs);
+	struct sigframe __user *frame = (struct sigframe *)(sp - 8);
+	sigset_t set;
+	struct sigcontext __user *sc = &frame->sc;
+	unsigned long __user *oldmask = &sc->oldmask;
+	unsigned long __user *extramask = frame->extramask;
+	int sig_size = (_NSIG_WORDS - 1) * sizeof(unsigned long);
+
+	if(copy_from_user(&set.sig[0], oldmask, sizeof(&set.sig[0])) ||
+	   copy_from_user(&set.sig[1], extramask, sig_size))
+		goto segfault;
+
+	sigdelsetmask(&set, ~_BLOCKABLE);
+
+	spin_lock_irq(&current->sighand->siglock);
+	current->blocked = set;
+	recalc_sigpending();
+	spin_unlock_irq(&current->sighand->siglock);
+
+	if(copy_sc_from_user(&current->thread.regs, sc))
+		goto segfault;
+
+	/* Avoid ERESTART handling */
+	PT_REGS_SYSCALL_NR(&current->thread.regs) = -1;
+	return(PT_REGS_SYSCALL_RET(&current->thread.regs));
+
+ segfault:
+	force_sig(SIGSEGV, current);
+	return 0;
+}
+
+long sys_rt_sigreturn(struct pt_regs regs)
+{
+	unsigned long __user sp = PT_REGS_SP(&current->thread.regs);
+	struct rt_sigframe __user *frame = (struct rt_sigframe *) (sp - 4);
+	sigset_t set;
+	struct ucontext __user *uc = &frame->uc;
+	int sig_size = _NSIG_WORDS * sizeof(unsigned long);
+
+	if(copy_from_user(&set, &uc->uc_sigmask, sig_size))
+		goto segfault;
+
+	sigdelsetmask(&set, ~_BLOCKABLE);
+
+	spin_lock_irq(&current->sighand->siglock);
+	current->blocked = set;
+	recalc_sigpending();
+	spin_unlock_irq(&current->sighand->siglock);
+
+	if(copy_sc_from_user(&current->thread.regs, &uc->uc_mcontext))
+		goto segfault;
+
+	/* Avoid ERESTART handling */
+	PT_REGS_SYSCALL_NR(&current->thread.regs) = -1;
+	return(PT_REGS_SYSCALL_RET(&current->thread.regs));
+
+ segfault:
+	force_sig(SIGSEGV, current);
+	return 0;
+}
+
+/*
+ * 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-file-style: "linux"
+ * End:
+ */
diff -Nru a/arch/v850/Kconfig b/arch/v850/Kconfig
--- a/arch/v850/Kconfig	2005-01-10 20:11:18 -08:00
+++ b/arch/v850/Kconfig	2005-01-10 20:11:18 -08:00
@@ -19,6 +19,9 @@
 config RWSEM_XCHGADD_ALGORITHM
 	bool
 	default n
+config GENERIC_CALIBRATE_DELAY
+	bool
+	default y
 
 # Turn off some random 386 crap that can affect device config
 config ISA
diff -Nru a/arch/v850/kernel/fpga85e2c.c b/arch/v850/kernel/fpga85e2c.c
--- a/arch/v850/kernel/fpga85e2c.c	2005-01-10 20:11:22 -08:00
+++ b/arch/v850/kernel/fpga85e2c.c	2005-01-10 20:11:22 -08:00
@@ -42,7 +42,6 @@
 	int i;
 	const u32 *src;
 	register u32 *dst asm ("ep");
-	extern int panic_timeout;
 	extern u32 _intv_end, _intv_load_start;
 
 	/* Set bus sizes: CS0 32-bit, CS1 16-bit, CS7 8-bit,
diff -Nru a/arch/v850/kernel/sim85e2.c b/arch/v850/kernel/sim85e2.c
--- a/arch/v850/kernel/sim85e2.c	2005-01-10 20:11:19 -08:00
+++ b/arch/v850/kernel/sim85e2.c	2005-01-10 20:11:19 -08:00
@@ -65,8 +65,6 @@
 
 void EARLY_INIT_SECTION_ATTR mach_early_init (void)
 {
-	extern int panic_timeout;
-
 	/* The sim85e2 simulator tracks `undefined' values, so to make
 	   debugging easier, we begin by zeroing out all otherwise
 	   undefined registers.  This is not strictly necessary.
diff -Nru a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig
--- a/arch/x86_64/Kconfig	2005-01-10 20:11:21 -08:00
+++ b/arch/x86_64/Kconfig	2005-01-10 20:11:21 -08:00
@@ -41,6 +41,10 @@
 config RWSEM_XCHGADD_ALGORITHM
 	bool
 
+config GENERIC_CALIBRATE_DELAY
+	bool
+	default y
+
 config X86_CMPXCHG
 	bool
 	default y
@@ -98,10 +102,11 @@
 	  Optimize for AMD Opteron/Athlon64/Hammer/K8 CPUs.
 
 config MPSC
-       bool "Intel x86-64"
+       bool "Intel EM64T"
        help
-	  Optimize for Intel IA32 with 64bit extension CPUs
-	  (Prescott/Nocona/Potomac)
+	  Optimize for Intel Pentium 4 and Xeon CPUs with Intel
+	  Extended Memory 64 Technology(EM64T). For details see
+	  <http://www.intel.com/technology/64bitextensions/>.
 
 config GENERIC_CPU
 	bool "Generic-x86-64"
@@ -244,6 +249,17 @@
 	  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 PREEMPT_BKL
+	bool "Preempt The Big Kernel Lock"
+	depends on PREEMPT || SMP
+	default y
+	help
+	  This option reduces the latency of the kernel by making the
+	  big kernel lock preemptible.
+
+	  Say Y here if you are building a kernel for a desktop system.
+	  Say N if you are unsure.
+
 config SCHED_SMT
 	bool "SMT (Hyperthreading) scheduler support"
 	depends on SMP
@@ -289,17 +305,15 @@
 	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)"
-	range 2 8
+	int "Maximum number of CPUs (2-256)"
+	range 2 256
 	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.
+	  kernel will support. Current maximum is 256 CPUs due to
+	  APIC addressing limits. Less depending on the hardware.
 
 	  This is purely to save memory - each supported CPU requires
 	  memory in the static kernel configuration.
@@ -338,6 +352,13 @@
 	   machine check error logs. See
 	   ftp://ftp.x86-64.org/pub/linux/tools/mcelog
 
+config X86_MCE_INTEL
+	bool "Intel MCE features"
+	depends on X86_MCE && X86_LOCAL_APIC
+	default y
+	help
+	   Additional support for intel specific MCE features such as
+	   the thermal monitor.
 endmenu
 
 #
diff -Nru a/arch/x86_64/boot/setup.S b/arch/x86_64/boot/setup.S
--- a/arch/x86_64/boot/setup.S	2005-01-10 20:11:22 -08:00
+++ b/arch/x86_64/boot/setup.S	2005-01-10 20:11:22 -08:00
@@ -158,7 +158,9 @@
 ramdisk_max:	.long 0xffffffff
 	
 trampoline:	call	start_of_setup
-		.space	1024
+		.align 16
+					# The offset at this point is 0x240
+		.space  (0x7ff-0x240+1)	# E820 & EDD space (ending at 0x7ff)
 # End of setup header #####################################################
 
 start_of_setup:
diff -Nru a/arch/x86_64/ia32/ia32_aout.c b/arch/x86_64/ia32/ia32_aout.c
--- a/arch/x86_64/ia32/ia32_aout.c	2005-01-10 20:11:23 -08:00
+++ b/arch/x86_64/ia32/ia32_aout.c	2005-01-10 20:11:23 -08:00
@@ -36,7 +36,8 @@
 #undef WARN_OLD
 #undef CORE_DUMP /* probably broken */
 
-extern int ia32_setup_arg_pages(struct linux_binprm *bprm, int exec_stack);
+extern int ia32_setup_arg_pages(struct linux_binprm *bprm,
+				unsigned long stack_top, int exec_stack);
 
 static int load_aout_binary(struct linux_binprm *, struct pt_regs * regs);
 static int load_aout_library(struct file*);
@@ -397,7 +398,7 @@
 
 	set_brk(current->mm->start_brk, current->mm->brk);
 
-	retval = ia32_setup_arg_pages(bprm, EXSTACK_DEFAULT);
+	retval = ia32_setup_arg_pages(bprm, IA32_STACK_TOP, EXSTACK_DEFAULT);
 	if (retval < 0) { 
 		/* Someone check-me: is this error path enough? */ 
 		send_sig(SIGKILL, current, 0); 
diff -Nru a/arch/x86_64/ia32/ia32_binfmt.c b/arch/x86_64/ia32/ia32_binfmt.c
--- a/arch/x86_64/ia32/ia32_binfmt.c	2005-01-10 20:11:15 -08:00
+++ b/arch/x86_64/ia32/ia32_binfmt.c	2005-01-10 20:11:15 -08:00
@@ -273,8 +273,9 @@
 #define load_elf_binary load_elf32_binary
 
 #define ELF_PLAT_INIT(r, load_addr)	elf32_init(r)
-#define setup_arg_pages(bprm, exec_stack)	ia32_setup_arg_pages(bprm, exec_stack)
-int ia32_setup_arg_pages(struct linux_binprm *bprm, int executable_stack);
+#define setup_arg_pages(bprm, stack_top, exec_stack) \
+	ia32_setup_arg_pages(bprm, stack_top, exec_stack)
+int ia32_setup_arg_pages(struct linux_binprm *bprm, unsigned long stack_top, int executable_stack);
 
 #undef start_thread
 #define start_thread(regs,new_rip,new_rsp) do { \
@@ -329,7 +330,7 @@
 	me->thread.es = __USER_DS;
 }
 
-int setup_arg_pages(struct linux_binprm *bprm, int executable_stack)
+int setup_arg_pages(struct linux_binprm *bprm, unsigned long stack_top, int executable_stack)
 {
 	unsigned long stack_base;
 	struct vm_area_struct *mpnt;
diff -Nru a/arch/x86_64/ia32/ia32_signal.c b/arch/x86_64/ia32/ia32_signal.c
--- a/arch/x86_64/ia32/ia32_signal.c	2005-01-10 20:11:23 -08:00
+++ b/arch/x86_64/ia32/ia32_signal.c	2005-01-10 20:11:23 -08:00
@@ -44,10 +44,10 @@
 asmlinkage int do_signal(struct pt_regs *regs, sigset_t *oldset);
 void signal_fault(struct pt_regs *regs, void __user *frame, char *where);
 
-int ia32_copy_siginfo_to_user(siginfo_t32 __user *to, siginfo_t *from)
+int copy_siginfo_to_user32(compat_siginfo_t __user *to, siginfo_t *from)
 {
 	int err;
-	if (!access_ok (VERIFY_WRITE, to, sizeof(siginfo_t32)))
+	if (!access_ok (VERIFY_WRITE, to, sizeof(compat_siginfo_t)))
 		return -EFAULT;
 
 	/* If you change siginfo_t structure, please make sure that
@@ -95,11 +95,11 @@
 	return err;
 }
 
-int ia32_copy_siginfo_from_user(siginfo_t *to, siginfo_t32 __user *from)
+int copy_siginfo_from_user32(siginfo_t *to, compat_siginfo_t __user *from)
 {
 	int err;
 	u32 ptr32;
-	if (!access_ok (VERIFY_READ, from, sizeof(siginfo_t32)))
+	if (!access_ok (VERIFY_READ, from, sizeof(compat_siginfo_t)))
 		return -EFAULT;
 
 	err = __get_user(to->si_signo, &from->si_signo);
@@ -188,7 +188,7 @@
 	int sig;
 	u32 pinfo;
 	u32 puc;
-	struct siginfo32 info;
+	compat_siginfo_t info;
 	struct ucontext_ia32 uc;
 	struct _fpstate_ia32 fpstate;
 	char retcode[8];
@@ -536,7 +536,7 @@
 	}
 	err |= __put_user((u32)(u64)&frame->info, &frame->pinfo);
 	err |= __put_user((u32)(u64)&frame->uc, &frame->puc);
-	err |= ia32_copy_siginfo_to_user(&frame->info, info);
+	err |= copy_siginfo_to_user32(&frame->info, info);
 	if (err)
 		goto give_sigsegv;
 
diff -Nru a/arch/x86_64/ia32/ia32entry.S b/arch/x86_64/ia32/ia32entry.S
--- a/arch/x86_64/ia32/ia32entry.S	2005-01-10 20:11:18 -08:00
+++ b/arch/x86_64/ia32/ia32entry.S	2005-01-10 20:11:18 -08:00
@@ -315,7 +315,7 @@
 	.quad sys_unlink		/* 10 */
 	.quad stub32_execve
 	.quad sys_chdir
-	.quad sys32_time
+	.quad compat_sys_time
 	.quad sys_mknod
 	.quad sys_chmod		/* 15 */
 	.quad sys_lchown16
@@ -327,7 +327,7 @@
 	.quad sys_oldumount	/* old_umount  */
 	.quad sys_setuid16
 	.quad sys_getuid16
-	.quad sys_stime		/* stime */		/* 25 */
+	.quad compat_sys_stime	/* stime */		/* 25 */
 	.quad sys32_ptrace	/* ptrace */
 	.quad sys_alarm
 	.quad sys_fstat	/* (old)fstat */
@@ -479,7 +479,7 @@
 	.quad sys32_rt_sigaction
 	.quad sys32_rt_sigprocmask	/* 175 */
 	.quad sys32_rt_sigpending
-	.quad sys32_rt_sigtimedwait
+	.quad compat_rt_sigtimedwait
 	.quad sys32_rt_sigqueueinfo
 	.quad stub32_rt_sigsuspend
 	.quad sys32_pread		/* 180 */
diff -Nru a/arch/x86_64/ia32/sys_ia32.c b/arch/x86_64/ia32/sys_ia32.c
--- a/arch/x86_64/ia32/sys_ia32.c	2005-01-10 20:11:18 -08:00
+++ b/arch/x86_64/ia32/sys_ia32.c	2005-01-10 20:11:18 -08:00
@@ -492,26 +492,6 @@
 				 compat_ptr(a.exp), compat_ptr(a.tvp));
 }
 
-/*
- * sys_time() can be implemented in user-level using
- * sys_gettimeofday().  x86-64 did this but i386 Linux did not
- * so we have to implement this system call here.
- */
-asmlinkage long sys32_time(int __user * tloc)
-{
-	int i;
-	struct timeval tv;
-
-	do_gettimeofday(&tv);
-	i = tv.tv_sec;
-
-	if (tloc) {
-		if (put_user(i,tloc))
-			i = -EFAULT;
-	}
-	return i;
-}
-
 extern asmlinkage long
 compat_sys_wait4(compat_pid_t pid, compat_uint_t * stat_addr, int options,
 		 struct compat_rusage *ru);
@@ -648,53 +628,14 @@
 	return ret;
 }
 
-
-asmlinkage long
-sys32_rt_sigtimedwait(compat_sigset_t __user *uthese, siginfo_t32 __user *uinfo,
-		      struct compat_timespec __user *uts, compat_size_t sigsetsize)
-{
-	sigset_t s;
-	compat_sigset_t s32;
-	struct timespec t;
-	int ret;
-	mm_segment_t old_fs = get_fs();
-	siginfo_t info;
-		
-	if (copy_from_user (&s32, uthese, sizeof(compat_sigset_t)))
-		return -EFAULT;
-	switch (_NSIG_WORDS) {
-	case 4: s.sig[3] = s32.sig[6] | (((long)s32.sig[7]) << 32);
-	case 3: s.sig[2] = s32.sig[4] | (((long)s32.sig[5]) << 32);
-	case 2: s.sig[1] = s32.sig[2] | (((long)s32.sig[3]) << 32);
-	case 1: s.sig[0] = s32.sig[0] | (((long)s32.sig[1]) << 32);
-	}
-	if (uts && get_compat_timespec(&t, uts))
-		return -EFAULT;
-	if (uinfo) {
-		/* stop data leak to user space in case of structure fill mismatch
-		 * between sys_rt_sigtimedwait & ia32_copy_siginfo_to_user.
-		 */
-		memset(&info, 0, sizeof(info));
-	}
-	set_fs (KERNEL_DS);
-	ret = sys_rt_sigtimedwait(&s, uinfo ? &info : NULL, uts ? &t : NULL,
-			sigsetsize);
-	set_fs (old_fs);
-	if (ret >= 0 && uinfo) {
-		if (ia32_copy_siginfo_to_user(uinfo, &info))
-			return -EFAULT;
-	}
-	return ret;
-}
-
 asmlinkage long
-sys32_rt_sigqueueinfo(int pid, int sig, siginfo_t32 __user *uinfo)
+sys32_rt_sigqueueinfo(int pid, int sig, compat_siginfo_t __user *uinfo)
 {
 	siginfo_t info;
 	int ret;
 	mm_segment_t old_fs = get_fs();
 	
-	if (ia32_copy_siginfo_from_user(&info, uinfo))
+	if (copy_siginfo_from_user32(&info, uinfo))
 		return -EFAULT;
 	set_fs (KERNEL_DS);
 	ret = sys_rt_sigqueueinfo(pid, sig, &info);
@@ -1020,7 +961,7 @@
 }
 
 asmlinkage long sys32_waitid(int which, compat_pid_t pid,
-			     siginfo_t32 __user *uinfo, int options,
+			     compat_siginfo_t __user *uinfo, int options,
 			     struct compat_rusage __user *uru)
 {
 	siginfo_t info;
@@ -1042,7 +983,7 @@
 
 	BUG_ON(info.si_code & __SI_MASK);
 	info.si_code |= __SI_CHLD;
-	return ia32_copy_siginfo_to_user(uinfo, &info);
+	return copy_siginfo_to_user32(uinfo, &info);
 }
 
 /*
diff -Nru a/arch/x86_64/ia32/syscall32.c b/arch/x86_64/ia32/syscall32.c
--- a/arch/x86_64/ia32/syscall32.c	2005-01-10 20:11:20 -08:00
+++ b/arch/x86_64/ia32/syscall32.c	2005-01-10 20:11:20 -08:00
@@ -40,23 +40,30 @@
  */
 int __map_syscall32(struct mm_struct *mm, unsigned long address)
 { 
+	pgd_t *pgd;
+	pud_t *pud;
 	pte_t *pte;
 	pmd_t *pmd;
-	int err = 0;
+	int err = -ENOMEM;
 
 	spin_lock(&mm->page_table_lock); 
-	pmd = pmd_alloc(mm, pgd_offset(mm, address), address); 
-	if (pmd && (pte = pte_alloc_map(mm, pmd, address)) != NULL) { 
-		if (pte_none(*pte)) { 
-			set_pte(pte, 
-				mk_pte(virt_to_page(syscall32_page), 
-				       PAGE_KERNEL_VSYSCALL)); 
+ 	pgd = pgd_offset(mm, address);
+ 	pud = pud_alloc(mm, pgd, address);
+ 	if (pud) {
+ 		pmd = pmd_alloc(mm, pud, address);
+ 		if (pmd && (pte = pte_alloc_map(mm, pmd, address)) != NULL) {
+ 			if (pte_none(*pte)) {
+ 				set_pte(pte,
+ 					mk_pte(virt_to_page(syscall32_page),
+ 					       PAGE_KERNEL_VSYSCALL));
+ 			}
+ 			/* Flush only the local CPU. Other CPUs taking a fault
+ 			   will just end up here again
+			   This probably not needed and just paranoia. */
+ 			__flush_tlb_one(address);
+ 			err = 0;
 		}
-		/* Flush only the local CPU. Other CPUs taking a fault
-		   will just end up here again */
-		__flush_tlb_one(address); 
-	} else
-		err = -ENOMEM; 
+	}
 	spin_unlock(&mm->page_table_lock);
 	return err;
 }
diff -Nru a/arch/x86_64/kernel/Makefile b/arch/x86_64/kernel/Makefile
--- a/arch/x86_64/kernel/Makefile	2005-01-10 20:11:21 -08:00
+++ b/arch/x86_64/kernel/Makefile	2005-01-10 20:11:21 -08:00
@@ -7,9 +7,10 @@
 obj-y	:= process.o semaphore.o signal.o entry.o traps.o irq.o \
 		ptrace.o time.o ioport.o ldt.o setup.o i8259.o sys_x86_64.o \
 		x8664_ksyms.o i387.o syscall.o vsyscall.o \
-		setup64.o bootflag.o e820.o reboot.o warmreboot.o quirks.o
+		setup64.o bootflag.o e820.o reboot.o quirks.o
 
 obj-$(CONFIG_X86_MCE)         += mce.o
+obj-$(CONFIG_X86_MCE_INTEL)	+= mce_intel.o
 obj-$(CONFIG_MTRR)		+= ../../i386/kernel/cpu/mtrr/
 obj-$(CONFIG_ACPI_BOOT)		+= acpi/
 obj-$(CONFIG_X86_MSR)		+= msr.o
@@ -32,6 +33,8 @@
 
 obj-y				+= topology.o
 obj-y				+= intel_cacheinfo.o
+
+CFLAGS_vsyscall.o		:= $(PROFILING) -g0
 
 bootflag-y			+= ../../i386/kernel/bootflag.o
 cpuid-$(subst m,y,$(CONFIG_X86_CPUID))  += ../../i386/kernel/cpuid.o
diff -Nru a/arch/x86_64/kernel/acpi/sleep.c b/arch/x86_64/kernel/acpi/sleep.c
--- a/arch/x86_64/kernel/acpi/sleep.c	2005-01-10 20:11:16 -08:00
+++ b/arch/x86_64/kernel/acpi/sleep.c	2005-01-10 20:11:16 -08:00
@@ -61,9 +61,13 @@
 
 extern unsigned long FASTCALL(acpi_copy_wakeup_routine(unsigned long));
 
+static pgd_t low_ptr;
+
 static void init_low_mapping(void)
 {
-	cpu_pda[0].level4_pgt[0] = cpu_pda[0].level4_pgt[pml4_index(PAGE_OFFSET)];
+	pgd_t *slot0 = pgd_offset(current->mm, 0UL);
+	low_ptr = *slot0;
+	set_pgd(slot0, *pgd_offset(current->mm, PAGE_OFFSET));
 	flush_tlb_all();
 }
 
@@ -97,7 +101,7 @@
  */
 void acpi_restore_state_mem (void)
 {
-	cpu_pda[0].level4_pgt[0] = 0;
+	set_pgd(pgd_offset(current->mm, 0UL), low_ptr);
 	flush_tlb_all();
 }
 
diff -Nru a/arch/x86_64/kernel/early_printk.c b/arch/x86_64/kernel/early_printk.c
--- a/arch/x86_64/kernel/early_printk.c	2005-01-10 20:11:21 -08:00
+++ b/arch/x86_64/kernel/early_printk.c	2005-01-10 20:11:21 -08:00
@@ -10,7 +10,7 @@
 #ifdef __i386__
 #define VGABASE		(__ISA_IO_base + 0xb8000)
 #else
-#define VGABASE		((void *)0xffffffff800b8000UL)
+#define VGABASE		((void __iomem *)0xffffffff800b8000UL)
 #endif
 
 #define MAX_YPOS	25
diff -Nru a/arch/x86_64/kernel/entry.S b/arch/x86_64/kernel/entry.S
--- a/arch/x86_64/kernel/entry.S	2005-01-10 20:11:18 -08:00
+++ b/arch/x86_64/kernel/entry.S	2005-01-10 20:11:18 -08:00
@@ -538,6 +538,9 @@
 	CFI_ENDPROC
 	.endm
 
+ENTRY(thermal_interrupt)
+	apicinterrupt THERMAL_APIC_VECTOR,smp_thermal_interrupt
+
 #ifdef CONFIG_SMP	
 ENTRY(reschedule_interrupt)
 	apicinterrupt RESCHEDULE_VECTOR,smp_reschedule_interrupt
diff -Nru a/arch/x86_64/kernel/head.S b/arch/x86_64/kernel/head.S
--- a/arch/x86_64/kernel/head.S	2005-01-10 20:11:20 -08:00
+++ b/arch/x86_64/kernel/head.S	2005-01-10 20:11:20 -08:00
@@ -225,7 +225,6 @@
 	.quad	0x0000000000103007		/* -> level3_kernel_pgt */
 
 .org 0x2000
-/* Kernel does not "know" about 4-th level of page tables. */
 ENTRY(level3_ident_pgt)
 	.quad	0x0000000000104007
 	.fill	511,8,0
diff -Nru a/arch/x86_64/kernel/i8259.c b/arch/x86_64/kernel/i8259.c
--- a/arch/x86_64/kernel/i8259.c	2005-01-10 20:11:16 -08:00
+++ b/arch/x86_64/kernel/i8259.c	2005-01-10 20:11:16 -08:00
@@ -476,6 +476,7 @@
 void reschedule_interrupt(void);
 void call_function_interrupt(void);
 void invalidate_interrupt(void);
+void thermal_interrupt(void);
 
 static void setup_timer(void)
 {
@@ -550,6 +551,7 @@
 	/* IPI for generic function call */
 	set_intr_gate(CALL_FUNCTION_VECTOR, call_function_interrupt);
 #endif	
+	set_intr_gate(THERMAL_APIC_VECTOR, thermal_interrupt);
 
 #ifdef CONFIG_X86_LOCAL_APIC
 	/* self generated IPI for local APIC timer */
diff -Nru a/arch/x86_64/kernel/init_task.c b/arch/x86_64/kernel/init_task.c
--- a/arch/x86_64/kernel/init_task.c	2005-01-10 20:11:19 -08:00
+++ b/arch/x86_64/kernel/init_task.c	2005-01-10 20:11:19 -08:00
@@ -47,5 +47,3 @@
 DEFINE_PER_CPU(struct tss_struct, init_tss) ____cacheline_maxaligned_in_smp;
 
 #define ALIGN_TO_4K __attribute__((section(".data.init_task")))
-
-pgd_t boot_vmalloc_pgt[512]  ALIGN_TO_4K;
diff -Nru a/arch/x86_64/kernel/mce.c b/arch/x86_64/kernel/mce.c
--- a/arch/x86_64/kernel/mce.c	2005-01-10 20:11:17 -08:00
+++ b/arch/x86_64/kernel/mce.c	2005-01-10 20:11:17 -08:00
@@ -43,7 +43,7 @@
 	MCE_LOG_LEN,
 }; 
 
-static void mce_log(struct mce *mce)
+void mce_log(struct mce *mce)
 {
 	unsigned next, entry;
 	mce->finished = 0;
@@ -305,6 +305,17 @@
 	}
 }			
 
+static void __init mce_cpu_features(struct cpuinfo_x86 *c)
+{
+	switch (c->x86_vendor) {
+	case X86_VENDOR_INTEL:
+		mce_intel_feature_init(c);
+		break;
+	default:
+		break;
+	}
+}
+
 /* 
  * Called for each booted CPU to set up machine checks.
  * Must be called with preempt off. 
@@ -321,6 +332,7 @@
 		return;
 
 	mce_init(NULL);
+	mce_cpu_features(c);
 }
 
 /*
diff -Nru a/arch/x86_64/kernel/mce_intel.c b/arch/x86_64/kernel/mce_intel.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/x86_64/kernel/mce_intel.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,99 @@
+/*
+ * Intel specific MCE features.
+ * Copyright 2004 Zwane Mwaikambo <zwane@linuxpower.ca>
+ */
+
+#include <linux/init.h>
+#include <linux/interrupt.h>
+#include <linux/percpu.h>
+#include <asm/processor.h>
+#include <asm/msr.h>
+#include <asm/mce.h>
+#include <asm/hw_irq.h>
+
+static DEFINE_PER_CPU(unsigned long, next_check);
+
+asmlinkage void smp_thermal_interrupt(void)
+{
+	struct mce m;
+
+	ack_APIC_irq();
+
+	irq_enter();
+	if (time_before(jiffies, __get_cpu_var(next_check)))
+		goto done;
+
+	__get_cpu_var(next_check) = jiffies + HZ*300;
+	memset(&m, 0, sizeof(m));
+	m.cpu = smp_processor_id();
+	m.bank = MCE_THERMAL_BANK;
+	rdtscll(m.tsc);
+	rdmsrl(MSR_IA32_THERM_STATUS, m.status);
+	if (m.status & 0x1) {
+		printk(KERN_EMERG
+			"CPU%d: Temperature above threshold, cpu clock throttled\n", m.cpu);
+		add_taint(TAINT_MACHINE_CHECK);
+	} else {
+		printk(KERN_EMERG "CPU%d: Temperature/speed normal\n", m.cpu);
+	}
+
+	mce_log(&m);
+done:
+	irq_exit();
+}
+
+static void __init intel_init_thermal(struct cpuinfo_x86 *c)
+{
+	u32 l, h;
+	int tm2 = 0;
+	unsigned int cpu = smp_processor_id();
+
+	if (!cpu_has(c, X86_FEATURE_ACPI))
+		return;
+
+	if (!cpu_has(c, X86_FEATURE_ACC))
+		return;
+
+	/* first check if TM1 is already enabled by the BIOS, in which
+	 * case there might be some SMM goo which handles it, so we can't even
+	 * put a handler since it might be delivered via SMI already.
+	 */
+	rdmsr(MSR_IA32_MISC_ENABLE, l, h);
+	h = apic_read(APIC_LVTTHMR);
+	if ((l & (1 << 3)) && (h & APIC_DM_SMI)) {
+		printk(KERN_DEBUG
+		       "CPU%d: Thermal monitoring handled by SMI\n", cpu);
+		return;
+	}
+
+	if (cpu_has(c, X86_FEATURE_TM2) && (l & (1 << 13)))
+		tm2 = 1;
+
+	if (h & APIC_VECTOR_MASK) {
+		printk(KERN_DEBUG
+		       "CPU%d: Thermal LVT vector (%#x) already "
+		       "installed\n", cpu, (h & APIC_VECTOR_MASK));
+		return;
+	}
+
+	h = THERMAL_APIC_VECTOR;
+	h |= (APIC_DM_FIXED | APIC_LVT_MASKED);
+	apic_write_around(APIC_LVTTHMR, h);
+
+	rdmsr(MSR_IA32_THERM_INTERRUPT, l, h);
+	wrmsr(MSR_IA32_THERM_INTERRUPT, l | 0x03, h);
+
+	rdmsr(MSR_IA32_MISC_ENABLE, l, h);
+	wrmsr(MSR_IA32_MISC_ENABLE, l | (1 << 3), h);
+
+	l = apic_read(APIC_LVTTHMR);
+	apic_write_around(APIC_LVTTHMR, l & ~APIC_LVT_MASKED);
+	printk(KERN_INFO "CPU%d: Thermal monitoring enabled (%s)\n",
+		cpu, tm2 ? "TM2" : "TM1");
+	return;
+}
+
+void __init mce_intel_feature_init(struct cpuinfo_x86 *c)
+{
+	intel_init_thermal(c);
+}
diff -Nru a/arch/x86_64/kernel/process.c b/arch/x86_64/kernel/process.c
--- a/arch/x86_64/kernel/process.c	2005-01-10 20:11:19 -08:00
+++ b/arch/x86_64/kernel/process.c	2005-01-10 20:11:19 -08:00
@@ -61,6 +61,7 @@
  * Powermanagement idle function, if any..
  */
 void (*pm_idle)(void);
+static cpumask_t cpu_idle_map;
 
 void disable_hlt(void)
 {
@@ -123,6 +124,23 @@
 	}
 }
 
+
+void cpu_idle_wait(void)
+{
+        int cpu;
+        cpumask_t map;
+
+        for_each_online_cpu(cpu)
+                cpu_set(cpu, cpu_idle_map);
+
+        wmb();
+        do {
+                ssleep(1);
+                cpus_and(map, cpu_idle_map, cpu_online_map);
+        } while (!cpus_empty(map));
+}
+EXPORT_SYMBOL_GPL(cpu_idle_wait);
+
 /*
  * The idle thread. There's no useful work to be
  * done, so just try to conserve power and have a
@@ -131,21 +149,20 @@
  */
 void cpu_idle (void)
 {
+	int cpu = smp_processor_id();
+
 	/* endless idle loop with no priority at all */
 	while (1) {
 		while (!need_resched()) {
 			void (*idle)(void);
-			/*
-			 * Mark this as an RCU critical section so that
-			 * synchronize_kernel() in the unload path waits
-			 * for our completion.
-			 */
-			rcu_read_lock();
+
+			if (cpu_isset(cpu, cpu_idle_map))
+				cpu_clear(cpu, cpu_idle_map);
+			rmb();
 			idle = pm_idle;
 			if (!idle)
 				idle = default_idle;
 			idle();
-			rcu_read_unlock();
 		}
 		schedule();
 	}
diff -Nru a/arch/x86_64/kernel/reboot.c b/arch/x86_64/kernel/reboot.c
--- a/arch/x86_64/kernel/reboot.c	2005-01-10 20:11:22 -08:00
+++ b/arch/x86_64/kernel/reboot.c	2005-01-10 20:11:22 -08:00
@@ -22,18 +22,18 @@
 
 static long no_idt[3];
 static enum { 
-	BOOT_BIOS = 'b',
 	BOOT_TRIPLE = 't',
 	BOOT_KBD = 'k'
 } reboot_type = BOOT_KBD;
 static int reboot_mode = 0;
+int reboot_force;
 
-/* reboot=b[ios] | t[riple] | k[bd] [, [w]arm | [c]old]
-   bios	  Use the CPU reboot vector for warm reset
+/* reboot=t[riple] | k[bd] [, [w]arm | [c]old]
    warm   Don't set the cold reboot flag
    cold   Set the cold reboot flag
    triple Force a triple fault (init)
    kbd    Use the keyboard controller. cold reset (default)
+   force  Avoid anything that could hang.
  */ 
 static int __init reboot_setup(char *str)
 {
@@ -52,6 +52,9 @@
 		case 'k':
 			reboot_type = *str;
 			break;
+		case 'f':
+			reboot_force = 1;
+			break;
 		}
 		if((str = strchr(str,',')) != NULL)
 			str++;
@@ -63,44 +66,19 @@
 
 __setup("reboot=", reboot_setup);
 
-/* overwrites random kernel memory. Should not be kernel .text */
-#define WARMBOOT_TRAMP 0x1000UL
-
-static void reboot_warm(void)
-{
-	extern unsigned char warm_reboot[], warm_reboot_end[];
-	printk("warm reboot\n");
-
-	local_irq_disable(); 
-		
-	/* restore identity mapping */
-	init_level4_pgt[0] = __pml4(__pa(level3_ident_pgt) | 7); 
-	__flush_tlb_all(); 
-
-	/* Move the trampoline to low memory */
-	memcpy(__va(WARMBOOT_TRAMP), warm_reboot, warm_reboot_end - warm_reboot); 
-
-	/* Start it in compatibility mode. */
-	asm volatile( "   pushq $0\n" 		/* ss */
-		     "   pushq $0x2000\n" 	/* rsp */
-	             "   pushfq\n"		/* eflags */
-		     "   pushq %[cs]\n"
-		     "   pushq %[target]\n"
-		     "   iretq" :: 
-		      [cs] "i" (__KERNEL_COMPAT32_CS), 
-		      [target] "b" (WARMBOOT_TRAMP));
-}
-
 #ifdef CONFIG_SMP
 static void smp_halt(void)
 {
 	int cpuid = safe_smp_processor_id(); 
-		static int first_entry = 1;
+	static int first_entry = 1;
+
+	if (reboot_force)
+		return;
 
-		if (first_entry) { 
-			first_entry = 0;
-			smp_call_function((void *)machine_restart, NULL, 1, 0);
-		} 
+	if (first_entry) {
+		first_entry = 0;
+		smp_call_function((void *)machine_restart, NULL, 1, 0);
+	}
 			
 	smp_stop_cpu(); 
 
@@ -129,19 +107,20 @@
 {
 	int i;
 
+	printk("machine restart\n");
+
 #ifdef CONFIG_SMP
 	smp_halt(); 
 #endif
 
-	local_irq_disable();
-       
+	if (!reboot_force) {
+		local_irq_disable();
 #ifndef CONFIG_SMP
-	disable_local_APIC();
+		disable_local_APIC();
 #endif
-
-	disable_IO_APIC();
-	
-	local_irq_enable();
+		disable_IO_APIC();
+		local_irq_enable();
+	}
 	
 	/* Tell the BIOS if we want cold or warm reboot */
 	*((unsigned short *)__va(0x472)) = reboot_mode;
@@ -149,9 +128,6 @@
 	for (;;) {
 		/* Could also try the reset bit in the Hammer NB */
 		switch (reboot_type) { 
-		case BOOT_BIOS:
-			reboot_warm();
-
 		case BOOT_KBD:
 		for (i=0; i<100; i++) {
 			kb_wait();
@@ -161,8 +137,8 @@
 		}
 
 		case BOOT_TRIPLE: 
-		__asm__ __volatile__("lidt (%0)": :"r" (&no_idt));
-		__asm__ __volatile__("int3");
+			__asm__ __volatile__("lidt (%0)": :"r" (&no_idt));
+			__asm__ __volatile__("int3");
 
 			reboot_type = BOOT_KBD;
 			break;
diff -Nru a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c
--- a/arch/x86_64/kernel/setup.c	2005-01-10 20:11:15 -08:00
+++ b/arch/x86_64/kernel/setup.c	2005-01-10 20:11:16 -08:00
@@ -57,6 +57,7 @@
 #include <asm/proto.h>
 #include <asm/setup.h>
 #include <asm/mach_apic.h>
+#include <asm/numa.h>
 
 /*
  * Machine setup..
@@ -75,9 +76,14 @@
 int __initdata acpi_force = 0;
 #endif
 
+int acpi_numa __initdata;
+
 /* For PCI or other memory-mapped resources */
 unsigned long pci_mem_start = 0x10000000;
 
+/* Boot loader ID as an integer, for the benefit of proc_dointvec */
+int bootloader_type;
+
 unsigned long saved_video_mode;
 
 #ifdef CONFIG_SWIOTLB
@@ -312,6 +318,9 @@
 		if (!memcmp(from,"oops=panic", 10))
 			panic_on_oops = 1;
 
+		if (!memcmp(from, "noexec=", 7))
+			nonx_setup(from + 7);
+
 	next_char:
 		c = *(from++);
 		if (!c)
@@ -452,6 +461,7 @@
 	edid_info = EDID_INFO;
 	aux_device_present = AUX_DEVICE_INFO;
 	saved_video_mode = SAVED_VIDEO_MODE;
+	bootloader_type = LOADER_TYPE;
 
 #ifdef CONFIG_BLK_DEV_RAM
 	rd_image_start = RAMDISK_FLAGS & RAMDISK_IMAGE_START_MASK;
@@ -485,6 +495,21 @@
 
 	init_memory_mapping(); 
 
+#ifdef CONFIG_ACPI_BOOT
+	/*
+	 * Initialize the ACPI boot-time table parser (gets the RSDP and SDT).
+	 * Call this early for SRAT node setup.
+	 */
+	acpi_boot_table_init();
+#endif
+
+#ifdef CONFIG_ACPI_NUMA
+	/*
+	 * Parse SRAT to discover nodes.
+	 */
+	acpi_numa_init();
+#endif
+
 #ifdef CONFIG_DISCONTIGMEM
 	numa_initmem_init(0, end_pfn); 
 #else
@@ -551,16 +576,15 @@
 #endif
 	paging_init();
 
-		check_ioapic();
+	check_ioapic();
+
 #ifdef CONFIG_ACPI_BOOT
-       /*
-        * Initialize the ACPI boot-time table parser (gets the RSDP and SDT).
-        * Must do this after paging_init (due to reliance on fixmap, and thus
-        * the bootmem allocator) but before get_smp_config (to allow parsing
-        * of MADT).
-        */
+	/*
+	 * Read APIC and some other early information from ACPI tables.
+	 */
 	acpi_boot_init();
 #endif
+
 #ifdef CONFIG_X86_LOCAL_APIC
 	/*
 	 * get boot-time SMP configuration:
@@ -662,6 +686,9 @@
 {
 	int r;
 	int level;
+#ifdef CONFIG_NUMA
+	int cpu;
+#endif
 
 	/* Bit 31 in normal CPUID used for nonstandard 3DNow ID;
 	   3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway */
@@ -684,7 +711,7 @@
 	} 
 	display_cacheinfo(c);
 
-	if (c->cpuid_level >= 0x80000008) {
+	if (cpuid_eax(0x80000000) >= 0x80000008) {
 		c->x86_num_cores = (cpuid_ecx(0x80000008) & 0xff) + 1;
 		if (c->x86_num_cores & (c->x86_num_cores - 1))
 			c->x86_num_cores = 1;
@@ -693,13 +720,14 @@
 		/* On a dual core setup the lower bits of apic id
 		   distingush the cores. Fix up the CPU<->node mappings
 		   here based on that.
-		   Assumes number of cores is a power of two. */
-		if (c->x86_num_cores > 1) {
-			int cpu = c->x86_apicid;
+		   Assumes number of cores is a power of two.
+		   When using SRAT use mapping from SRAT. */
+		cpu = c->x86_apicid;
+		if (acpi_numa <= 0 && c->x86_num_cores > 1) {
 			cpu_to_node[cpu] = cpu >> hweight32(c->x86_num_cores - 1);
-			printk(KERN_INFO "CPU %d -> Node %d\n",
-			       cpu, cpu_to_node[cpu]);
 		}
+		printk(KERN_INFO "CPU %d(%d) -> Node %d\n",
+				cpu, c->x86_num_cores, cpu_to_node[cpu]);
 #endif
 	}
 
@@ -752,6 +780,19 @@
 	}
 #endif
 }
+
+static void __init sched_cmp_hack(struct cpuinfo_x86 *c)
+{
+#ifdef CONFIG_SMP
+	/* AMD dual core looks like HT but isn't really. Hide it from the
+	   scheduler. This works around problems with the domain scheduler.
+	   Also probably gives slightly better scheduling and disables
+	   SMT nice which is harmful on dual core.
+	   TBD tune the domain scheduler for dual core. */
+	if (c->x86_vendor == X86_VENDOR_AMD && cpu_has(c, X86_FEATURE_CMP_LEGACY))
+		smp_num_siblings = 1;
+#endif
+}
 	
 static void __init init_intel(struct cpuinfo_x86 *c)
 {
@@ -895,7 +936,8 @@
 
 	select_idle_routine(c);
 	detect_ht(c); 
-		
+	sched_cmp_hack(c);
+
 	/*
 	 * On SMP, boot_cpu_data holds the common feature set between
 	 * all CPUs; so make sure that we indicate which features are
@@ -911,6 +953,10 @@
 #ifdef CONFIG_X86_MCE
 	mcheck_init(c);
 #endif
+#ifdef CONFIG_NUMA
+	if (c != &boot_cpu_data)
+		numa_add_cpu(c - cpu_data);
+#endif
 }
  
 
@@ -973,7 +1019,7 @@
 		NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 
 		/* AMD-defined (#2) */
-		"lahf_lm", "htvalid", NULL, NULL, NULL, NULL, NULL, NULL,
+		"lahf_lm", "cmp_legacy", NULL, NULL, NULL, NULL, NULL, NULL,
 		NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 		NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 		NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
@@ -1016,11 +1062,9 @@
 	if (c->x86_cache_size >= 0) 
 		seq_printf(m, "cache size\t: %d KB\n", c->x86_cache_size);
 	
-#ifdef CONFIG_X86_HT
-	if (smp_num_siblings > 1) {
-		seq_printf(m, "physical id\t: %d\n", phys_proc_id[c - cpu_data]);
-		seq_printf(m, "siblings\t: %d\n", smp_num_siblings);
-	}
+#ifdef CONFIG_SMP
+	seq_printf(m, "physical id\t: %d\n", phys_proc_id[c - cpu_data]);
+	seq_printf(m, "siblings\t: %d\n", c->x86_num_cores * smp_num_siblings);
 #endif	
 
 	seq_printf(m,
@@ -1062,6 +1106,7 @@
 					seq_printf(m, " [%d]", i);
 			}
 	}
+	seq_printf(m, "\n");
 
 	if (c->x86_num_cores > 1)
 		seq_printf(m, "cpu cores\t: %d\n", c->x86_num_cores);
diff -Nru a/arch/x86_64/kernel/setup64.c b/arch/x86_64/kernel/setup64.c
--- a/arch/x86_64/kernel/setup64.c	2005-01-10 20:11:17 -08:00
+++ b/arch/x86_64/kernel/setup64.c	2005-01-10 20:11:17 -08:00
@@ -50,7 +50,7 @@
 on	Enable(default)
 off	Disable
 */ 
-static int __init nonx_setup(char *str)
+void __init nonx_setup(const char *str)
 {
 	if (!strcmp(str, "on")) {
                 __supported_pte_mask |= _PAGE_NX; 
@@ -59,14 +59,11 @@
 		do_not_nx = 1;
 		__supported_pte_mask &= ~_PAGE_NX;
         } 
-        return 1;
 } 
 
-__setup("noexec=", nonx_setup); 
-
 /*
  * Great future plan:
- * Declare PDA itself and support (irqstack,tss,pml4) as per cpu data.
+ * Declare PDA itself and support (irqstack,tss,pgd) as per cpu data.
  * Always point %gs to its beginning
  */
 void __init setup_per_cpu_areas(void)
@@ -83,13 +80,13 @@
 
 	for (i = 0; i < NR_CPUS; i++) { 
 		unsigned char *ptr;
-		/* If possible allocate on the node of the CPU.
-		   In case it doesn't exist round-robin nodes. */
-		if (!NODE_DATA(i % numnodes)) { 
-			printk("cpu with no node %d, numnodes %d\n", i, numnodes);
+
+		if (!NODE_DATA(cpu_to_node(i))) {
+			printk("cpu with no node %d, num_online_nodes %d\n",
+			       i, num_online_nodes());
 			ptr = alloc_bootmem(size);
 		} else { 
-			ptr = alloc_bootmem_node(NODE_DATA(i % numnodes), size);
+			ptr = alloc_bootmem_node(NODE_DATA(cpu_to_node(i)), size);
 		}
 		if (!ptr)
 			panic("Cannot allocate cpu data for CPU %d\n", i);
@@ -100,7 +97,6 @@
 
 void pda_init(int cpu)
 { 
-        pml4_t *level4;
 	struct x8664_pda *pda = &cpu_pda[cpu];
 
 	/* Setup up data that may be needed in __get_free_pages early */
@@ -119,22 +115,14 @@
 		/* others are initialized in smpboot.c */
 		pda->pcurrent = &init_task;
 		pda->irqstackptr = boot_cpu_stack; 
-		level4 = init_level4_pgt; 
 	} else {
-		level4 = (pml4_t *)__get_free_pages(GFP_ATOMIC, 0); 
-		if (!level4) 
-			panic("Cannot allocate top level page for cpu %d", cpu); 
 		pda->irqstackptr = (char *)
 			__get_free_pages(GFP_ATOMIC, IRQSTACK_ORDER);
 		if (!pda->irqstackptr)
 			panic("cannot allocate irqstack for cpu %d", cpu); 
 	}
 
-	pda->level4_pgt = (unsigned long *)level4; 
-	if (level4 != init_level4_pgt)
-		memcpy(level4, &init_level4_pgt, PAGE_SIZE); 
-	set_pml4(level4 + 510, mk_kernel_pml4(__pa_symbol(boot_vmalloc_pgt)));
-	asm volatile("movq %0,%%cr3" :: "r" (__pa(level4))); 
+	asm volatile("movq %0,%%cr3" :: "r" (__pa_symbol(&init_level4_pgt)));
 
 	pda->irqstackptr += IRQSTACKSIZE-64;
 } 
@@ -283,8 +271,4 @@
 	set_debug(0UL, 7);
 
 	fpu_init(); 
-
-#ifdef CONFIG_NUMA
-	numa_add_cpu(cpu);
-#endif
 }
diff -Nru a/arch/x86_64/kernel/smp.c b/arch/x86_64/kernel/smp.c
--- a/arch/x86_64/kernel/smp.c	2005-01-10 20:11:24 -08:00
+++ b/arch/x86_64/kernel/smp.c	2005-01-10 20:11:24 -08:00
@@ -25,6 +25,7 @@
 #include <asm/pgalloc.h>
 #include <asm/tlbflush.h>
 #include <asm/mach_apic.h>
+#include <asm/proto.h>
 
 /*
  *	Smarter SMP flushing macros. 
@@ -361,6 +362,8 @@
 void smp_send_stop(void)
 {
 	int nolock = 0;
+	if (reboot_force)
+		return;
 	/* Don't deadlock on the call lock in panic */
 	if (!spin_trylock(&call_lock)) {
 		/* ignore locking because we have paniced anyways */
diff -Nru a/arch/x86_64/kernel/smpboot.c b/arch/x86_64/kernel/smpboot.c
--- a/arch/x86_64/kernel/smpboot.c	2005-01-10 20:11:23 -08:00
+++ b/arch/x86_64/kernel/smpboot.c	2005-01-10 20:11:23 -08:00
@@ -58,6 +58,7 @@
 int smp_num_siblings = 1;
 /* Package ID of each logical CPU */
 u8 phys_proc_id[NR_CPUS] = { [0 ... NR_CPUS-1] = BAD_APICID };
+EXPORT_SYMBOL(phys_proc_id);
 
 /* Bitmask of currently online CPUs */
 cpumask_t cpu_online_map;
diff -Nru a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c
--- a/arch/x86_64/kernel/time.c	2005-01-10 20:11:20 -08:00
+++ b/arch/x86_64/kernel/time.c	2005-01-10 20:11:20 -08:00
@@ -955,7 +955,7 @@
 
 __setup("report_lost_ticks", time_setup);
 
-static long clock_cmos_diff;
+static long clock_cmos_diff, sleep_start;
 
 static int timer_suspend(struct sys_device *dev, u32 state)
 {
@@ -964,6 +964,7 @@
 	 */
 	clock_cmos_diff = -get_cmos_time();
 	clock_cmos_diff += get_seconds();
+	sleep_start = jiffies;
 	return 0;
 }
 
@@ -971,15 +972,18 @@
 {
 	unsigned long flags;
 	unsigned long sec;
+	unsigned long ctime = get_cmos_time();
+	unsigned long sleep_length = ctime - sleep_start;
 
 	if (vxtime.hpet_address)
 		hpet_reenable();
 
-	sec = get_cmos_time() + clock_cmos_diff;
+	sec = ctime + clock_cmos_diff;
 	write_seqlock_irqsave(&xtime_lock,flags);
 	xtime.tv_sec = sec;
 	xtime.tv_nsec = 0;
 	write_sequnlock_irqrestore(&xtime_lock,flags);
+	jiffies += sleep_length * HZ;
 	return 0;
 }
 
diff -Nru a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c
--- a/arch/x86_64/kernel/traps.c	2005-01-10 20:11:15 -08:00
+++ b/arch/x86_64/kernel/traps.c	2005-01-10 20:11:15 -08:00
@@ -556,8 +556,9 @@
 			regs->rip = fixup->fixup;
 			return;
 		}
-		notify_die(DIE_GPF, "general protection fault", regs, error_code,
-			   13, SIGSEGV); 
+		if (notify_die(DIE_GPF, "general protection fault", regs,
+					error_code, 13, SIGSEGV) == NOTIFY_STOP)
+			return;
 		die("general protection fault", regs, error_code);
 	}
 }
@@ -690,7 +691,9 @@
 	tsk->thread.debugreg6 = condition;
 
 	/* Mask out spurious TF errors due to lazy TF clearing */
-	if (condition & DR_STEP) {
+	if ((condition & DR_STEP) &&
+	    (notify_die(DIE_DEBUGSTEP, "debugstep", regs, condition,
+			1, SIGTRAP) != NOTIFY_STOP)) {
 		/*
 		 * The TF error should be masked out only if the current
 		 * process is not traced and if the TRAP flag has been set
@@ -879,6 +882,10 @@
 }
 
 asmlinkage void do_spurious_interrupt_bug(struct pt_regs * regs)
+{
+}
+
+asmlinkage void __attribute__((weak)) smp_thermal_interrupt(void)
 {
 }
 
diff -Nru a/arch/x86_64/kernel/warmreboot.S b/arch/x86_64/kernel/warmreboot.S
--- a/arch/x86_64/kernel/warmreboot.S	2005-01-10 20:11:16 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,83 +0,0 @@
-/*
- * Switch back to real mode and call the BIOS reboot vector.
- * This is a trampoline copied around in process.c 
- * Written 2003 by Andi Kleen, SuSE Labs.	 	
- */			
-	
-#include <asm/msr.h>
-
-#define R(x) x-warm_reboot(%ebx)
-#define R64(x) x-warm_reboot(%rbx)
-		
-	/* running in identity mapping and in the first 64k of memory
-	   and in compatibility mode. This must be position independent */
-
-	/* Follows 14.7 "Leaving Long Mode" in the AMD x86-64 manual, volume 2
-	   and 8.9.2 "Switching Back to Real-Address Mode" in the Intel IA32
-	   manual, volume 2 */
-
-	/* ebx:	self pointer to warm_reboot */
-
-	.globl warm_reboot
-warm_reboot:
-	addl  %ebx,  R64(real_mode_desc)	/* relocate tables */
-	addl  %ebx,2+R64(warm_gdt_desc)		
-
-	movq  %cr0,%rax
-	btr  $31,%rax		
-	movq %rax,%cr0		/* disable paging */
-	jmp  1f			/* flush prefetch queue */
-	
-	.code32	
-1:	movl $MSR_EFER,%ecx
-	rdmsr
-	andl $~((1<<_EFER_LME)|(1<<_EFER_SCE)|(1<<_EFER_NX)),%eax
-	wrmsr			/* disable long mode in EFER */
-		
-	xorl %eax,%eax
-	movl %eax,%cr3		/* flush tlb */
-
-	/* Running protected mode without paging now */
-	
-	wbinvd			/* flush caches. Needed? */
-
-	lidt R(warm_idt_desc)
-	lgdt R(warm_gdt_desc)
-	
-	movl $0x10,%ecx		/* load segment registers with real mode settings */
-	movl %ecx,%ds
-	movl %ecx,%es
-	movl %ecx,%fs
-	movl %ecx,%gs
-	movl %ecx,%ss
-	
-	lea  R(real_mode_desc),%eax		
-	ljmp *(%eax)
-
-	.code16:
-real_mode:
-	xorl %eax,%eax
-	movl %eax,%cr0
-	
-	/* some people claim $0xf000,0xfff0 is better. Use what 32bit linux uses. */
-	/* code as bytes because gas has problems with it */
-	.byte 	0xea,0xf0,0xff,0x00,0xf0	/* ljmp  0xf000:0xfff0 */
-
-real_mode_desc:
-	.long  real_mode - warm_reboot
-	.short 8	
-warm_gdt_desc:
-	.short 8*3
-	.long warm_gdt - warm_reboot
-warm_gdt:	
-	.quad   0
-	.quad 	0x00009a000000ffff	/* 16-bit real-mode 64k code at 0x00000000 */
-	.quad   0x000092000100ffff	/* 16-bit real-mode 64k data at 0x00000100 */
-	
-warm_idt_desc:
-	.short 0x3ff
-	.long  0
-				
-	.globl warm_reboot_end
-warm_reboot_end:
-
diff -Nru a/arch/x86_64/lib/delay.c b/arch/x86_64/lib/delay.c
--- a/arch/x86_64/lib/delay.c	2005-01-10 20:11:24 -08:00
+++ b/arch/x86_64/lib/delay.c	2005-01-10 20:11:24 -08:00
@@ -34,7 +34,7 @@
 
 inline void __const_udelay(unsigned long xloops)
 {
-        __delay(((xloops * current_cpu_data.loops_per_jiffy) >> 32) * HZ);
+	__delay(((xloops * cpu_data[_smp_processor_id()].loops_per_jiffy) >> 32) * HZ);
 }
 
 void __udelay(unsigned long usecs)
diff -Nru a/arch/x86_64/lib/io.c b/arch/x86_64/lib/io.c
--- a/arch/x86_64/lib/io.c	2005-01-10 20:11:16 -08:00
+++ b/arch/x86_64/lib/io.c	2005-01-10 20:11:16 -08:00
@@ -2,14 +2,14 @@
 #include <asm/io.h>
 #include <linux/module.h>
 
-void *__memcpy_toio(unsigned long dst,const void*src,unsigned len)
+void __memcpy_toio(unsigned long dst,const void*src,unsigned len)
 {
-	return __inline_memcpy((void *) dst,src,len);
+	__inline_memcpy((void *) dst,src,len);
 }
 EXPORT_SYMBOL(__memcpy_toio);
 
-void *__memcpy_fromio(void *dst,unsigned long src,unsigned len)
+void __memcpy_fromio(void *dst,unsigned long src,unsigned len)
 {
-	return __inline_memcpy(dst,(const void *) src,len);
+	__inline_memcpy(dst,(const void *) src,len);
 }
 EXPORT_SYMBOL(__memcpy_fromio);
diff -Nru a/arch/x86_64/mm/Makefile b/arch/x86_64/mm/Makefile
--- a/arch/x86_64/mm/Makefile	2005-01-10 20:11:21 -08:00
+++ b/arch/x86_64/mm/Makefile	2005-01-10 20:11:21 -08:00
@@ -6,5 +6,6 @@
 obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
 obj-$(CONFIG_DISCONTIGMEM) += numa.o
 obj-$(CONFIG_K8_NUMA) += k8topology.o
+obj-$(CONFIG_ACPI_NUMA) += srat.o
 
 hugetlbpage-y = ../../i386/mm/hugetlbpage.o
diff -Nru a/arch/x86_64/mm/fault.c b/arch/x86_64/mm/fault.c
--- a/arch/x86_64/mm/fault.c	2005-01-10 20:11:15 -08:00
+++ b/arch/x86_64/mm/fault.c	2005-01-10 20:11:15 -08:00
@@ -143,25 +143,25 @@
 
 void dump_pagetable(unsigned long address)
 {
-	pml4_t *pml4;
 	pgd_t *pgd;
+	pud_t *pud;
 	pmd_t *pmd;
 	pte_t *pte;
 
-	asm("movq %%cr3,%0" : "=r" (pml4));
+	asm("movq %%cr3,%0" : "=r" (pgd));
 
-	pml4 = __va((unsigned long)pml4 & PHYSICAL_PAGE_MASK); 
-	pml4 += pml4_index(address);
-	printk("PML4 %lx ", pml4_val(*pml4));
-	if (bad_address(pml4)) goto bad;
-	if (!pml4_present(*pml4)) goto ret; 
-
-	pgd = __pgd_offset_k((pgd_t *)pml4_page(*pml4), address);
+	pgd = __va((unsigned long)pgd & PHYSICAL_PAGE_MASK); 
+	pgd += pgd_index(address);
+	printk("PGD %lx ", pgd_val(*pgd));
 	if (bad_address(pgd)) goto bad;
-	printk("PGD %lx ", pgd_val(*pgd)); 
-	if (!pgd_present(*pgd))	goto ret;
+	if (!pgd_present(*pgd)) goto ret; 
+
+	pud = __pud_offset_k((pud_t *)pgd_page(*pgd), address);
+	if (bad_address(pud)) goto bad;
+	printk("PUD %lx ", pud_val(*pud));
+	if (!pud_present(*pud))	goto ret;
 
-	pmd = pmd_offset(pgd, address);
+	pmd = pmd_offset(pud, address);
 	if (bad_address(pmd)) goto bad;
 	printk("PMD %lx ", pmd_val(*pmd));
 	if (!pmd_present(*pmd))	goto ret;	 
@@ -212,6 +212,8 @@
 
 int unhandled_signal(struct task_struct *tsk, int sig)
 {
+	if (tsk->pid == 1)
+		return 1;
 	/* Warn for strace, but not for gdb */
 	if (!test_ti_thread_flag(tsk->thread_info, TIF_SYSCALL_TRACE) &&
 	    (tsk->ptrace & PT_PTRACED))
@@ -232,7 +234,53 @@
 	do_exit(SIGKILL);
 }
 
-int page_fault_trace; 
+/*
+ * Handle a fault on the vmalloc or module mapping area
+ */
+static int vmalloc_fault(unsigned long address)
+{
+	pgd_t *pgd, *pgd_ref;
+	pud_t *pud, *pud_ref;
+	pmd_t *pmd, *pmd_ref;
+	pte_t *pte, *pte_ref;
+
+	/* Copy kernel mappings over when needed. This can also
+	   happen within a race in page table update. In the later
+	   case just flush. */
+
+	pgd = pgd_offset(current->mm ?: &init_mm, address);
+	pgd_ref = pgd_offset_k(address);
+	if (pgd_none(*pgd_ref))
+		return -1;
+	if (pgd_none(*pgd))
+		set_pgd(pgd, *pgd_ref);
+
+	/* Below here mismatches are bugs because these lower tables
+	   are shared */
+
+	pud = pud_offset(pgd, address);
+	pud_ref = pud_offset(pgd_ref, address);
+	if (pud_none(*pud_ref))
+		return -1;
+	if (pud_none(*pud) || pud_page(*pud) != pud_page(*pud_ref))
+		BUG();
+	pmd = pmd_offset(pud, address);
+	pmd_ref = pmd_offset(pud_ref, address);
+	if (pmd_none(*pmd_ref))
+		return -1;
+	if (pmd_none(*pmd) || pmd_page(*pmd) != pmd_page(*pmd_ref))
+		BUG();
+	pte_ref = pte_offset_kernel(pmd_ref, address);
+	if (!pte_present(*pte_ref))
+		return -1;
+	pte = pte_offset_kernel(pmd, address);
+	if (!pte_present(*pte) || pte_page(*pte) != pte_page(*pte_ref))
+		BUG();
+	__flush_tlb_all();
+	return 0;
+}
+
+int page_fault_trace = 0;
 int exception_trace = 1;
 
 /*
@@ -300,8 +348,11 @@
 	 * protection error (error_code & 1) == 0.
 	 */
 	if (unlikely(address >= TASK_SIZE)) {
-		if (!(error_code & 5))
-			goto vmalloc_fault;
+		if (!(error_code & 5)) {
+			if (vmalloc_fault(address) < 0)
+				goto bad_area_nosemaphore;
+			return;
+		}
 		/*
 		 * Don't take the mm semaphore here. If we fixup a prefetch
 		 * fault we could otherwise deadlock.
@@ -310,7 +361,7 @@
 	}
 
 	if (unlikely(error_code & (1 << 3)))
-		goto page_table_corruption;
+		pgtable_bad(address, regs, error_code);
 
 	/*
 	 * If we're in an interrupt or have no user
@@ -434,8 +485,9 @@
 			return;
 
 		if (exception_trace && unhandled_signal(tsk, SIGSEGV)) {
-			printk(KERN_INFO
-		       "%s[%d]: segfault at %016lx rip %016lx rsp %016lx error %lx\n",
+			printk(
+		       "%s%s[%d]: segfault at %016lx rip %016lx rsp %016lx error %lx\n",
+					tsk->pid > 1 ? KERN_INFO : KERN_EMERG,
 					tsk->comm, tsk->pid, address, regs->rip,
 					regs->rsp, error_code);
 		}
@@ -524,34 +576,4 @@
 	info.si_addr = (void __user *)address;
 	force_sig_info(SIGBUS, &info, tsk);
 	return;
-
-vmalloc_fault:
-	{
-		pgd_t *pgd;
-		pmd_t *pmd;
-		pte_t *pte; 
-
-		/*
-		 * x86-64 has the same kernel 3rd level pages for all CPUs.
-		 * But for vmalloc/modules the TLB synchronization works lazily,
-		 * so it can happen that we get a page fault for something
-		 * that is really already in the page table. Just check if it
-		 * is really there and when yes flush the local TLB. 
-		 */
-		pgd = pgd_offset_k(address);
-		if (!pgd_present(*pgd))
-			goto bad_area_nosemaphore;
-		pmd = pmd_offset(pgd, address);
-		if (!pmd_present(*pmd))
-			goto bad_area_nosemaphore;
-		pte = pte_offset_kernel(pmd, address); 
-		if (!pte_present(*pte))
-			goto bad_area_nosemaphore;
-
-		__flush_tlb_all();		
-		return;
-	}
-
-page_table_corruption:
-	pgtable_bad(address, regs, error_code);
 }
diff -Nru a/arch/x86_64/mm/init.c b/arch/x86_64/mm/init.c
--- a/arch/x86_64/mm/init.c	2005-01-10 20:11:17 -08:00
+++ b/arch/x86_64/mm/init.c	2005-01-10 20:11:17 -08:00
@@ -108,28 +108,28 @@
 static void set_pte_phys(unsigned long vaddr,
 			 unsigned long phys, pgprot_t prot)
 {
-	pml4_t *level4;
 	pgd_t *pgd;
+	pud_t *pud;
 	pmd_t *pmd;
 	pte_t *pte, new_pte;
 
 	Dprintk("set_pte_phys %lx to %lx\n", vaddr, phys);
 
-	level4 = pml4_offset_k(vaddr);
-	if (pml4_none(*level4)) {
-		printk("PML4 FIXMAP MISSING, it should be setup in head.S!\n");
+	pgd = pgd_offset_k(vaddr);
+	if (pgd_none(*pgd)) {
+		printk("PGD FIXMAP MISSING, it should be setup in head.S!\n");
 		return;
 	}
-	pgd = level3_offset_k(level4, vaddr);
-	if (pgd_none(*pgd)) {
+	pud = pud_offset(pgd, vaddr);
+	if (pud_none(*pud)) {
 		pmd = (pmd_t *) spp_getpage(); 
-		set_pgd(pgd, __pgd(__pa(pmd) | _KERNPG_TABLE | _PAGE_USER));
-		if (pmd != pmd_offset(pgd, 0)) {
-			printk("PAGETABLE BUG #01! %p <-> %p\n", pmd, pmd_offset(pgd,0));
+		set_pud(pud, __pud(__pa(pmd) | _KERNPG_TABLE | _PAGE_USER));
+		if (pmd != pmd_offset(pud, 0)) {
+			printk("PAGETABLE BUG #01! %p <-> %p\n", pmd, pmd_offset(pud,0));
 			return;
 		}
 	}
-	pmd = pmd_offset(pgd, vaddr);
+	pmd = pmd_offset(pud, vaddr);
 	if (pmd_none(*pmd)) {
 		pte = (pte_t *) spp_getpage();
 		set_pmd(pmd, __pmd(__pa(pte) | _KERNPG_TABLE | _PAGE_USER));
@@ -210,31 +210,31 @@
 	ti->allocated = 0; 
 } 
 
-static void __init phys_pgd_init(pgd_t *pgd, unsigned long address, unsigned long end)
+static void __init phys_pud_init(pud_t *pud, unsigned long address, unsigned long end)
 { 
 	long i, j; 
 
-	i = pgd_index(address);
-	pgd = pgd + i;
-	for (; i < PTRS_PER_PGD; pgd++, i++) {
+	i = pud_index(address);
+	pud = pud + i;
+	for (; i < PTRS_PER_PUD; pud++, i++) {
 		int map; 
 		unsigned long paddr, pmd_phys;
 		pmd_t *pmd;
 
-		paddr = (address & PML4_MASK) + i*PGDIR_SIZE;
+		paddr = address + i*PUD_SIZE;
 		if (paddr >= end) { 
-			for (; i < PTRS_PER_PGD; i++, pgd++) 
-				set_pgd(pgd, __pgd(0)); 
+			for (; i < PTRS_PER_PUD; i++, pud++) 
+				set_pud(pud, __pud(0)); 
 			break;
 		} 
 
-		if (!e820_mapped(paddr, paddr+PGDIR_SIZE, 0)) { 
-			set_pgd(pgd, __pgd(0)); 
+		if (!e820_mapped(paddr, paddr+PUD_SIZE, 0)) { 
+			set_pud(pud, __pud(0)); 
 			continue;
 		} 
 
 		pmd = alloc_low_page(&map, &pmd_phys);
-		set_pgd(pgd, __pgd(pmd_phys | _KERNPG_TABLE));
+		set_pud(pud, __pud(pmd_phys | _KERNPG_TABLE));
 		for (j = 0; j < PTRS_PER_PMD; pmd++, j++, paddr += PMD_SIZE) {
 			unsigned long pe;
 
@@ -260,7 +260,7 @@
 	unsigned long adr;	       
 	unsigned long end;
 	unsigned long next; 
-	unsigned long pgds, pmds, tables; 
+	unsigned long puds, pmds, tables; 
 
 	Dprintk("init_memory_mapping\n");
 
@@ -273,9 +273,9 @@
 	 * discovered.
 	 */
 
-	pgds = (end + PGDIR_SIZE - 1) >> PGDIR_SHIFT;
+	puds = (end + PUD_SIZE - 1) >> PUD_SHIFT;
 	pmds = (end + PMD_SIZE - 1) >> PMD_SHIFT; 
-	tables = round_up(pgds*8, PAGE_SIZE) + round_up(pmds * 8, PAGE_SIZE); 
+	tables = round_up(puds*8, PAGE_SIZE) + round_up(pmds * 8, PAGE_SIZE); 
 
 	table_start = find_e820_area(0x8000, __pa_symbol(&_text), tables); 
 	if (table_start == -1UL) 
@@ -288,13 +288,13 @@
 
 	for (adr = PAGE_OFFSET; adr < end; adr = next) { 
 		int map;
-		unsigned long pgd_phys; 
-		pgd_t *pgd = alloc_low_page(&map, &pgd_phys);
-		next = adr + PML4_SIZE;
+		unsigned long pud_phys; 
+		pud_t *pud = alloc_low_page(&map, &pud_phys);
+		next = adr + PGDIR_SIZE;
 		if (next > end) 
 			next = end; 
-		phys_pgd_init(pgd, adr-PAGE_OFFSET, next-PAGE_OFFSET); 
-		set_pml4(init_level4_pgt + pml4_index(adr), mk_kernel_pml4(pgd_phys));
+		phys_pud_init(pud, adr-PAGE_OFFSET, next-PAGE_OFFSET); 
+		set_pgd(init_level4_pgt + pgd_index(adr), mk_kernel_pgd(pud_phys));
 		unmap_low_page(map);   
 	} 
 	asm volatile("movq %%cr4,%0" : "=r" (mmu_cr4_features));
@@ -306,25 +306,12 @@
 
 extern struct x8664_pda cpu_pda[NR_CPUS];
 
-static unsigned long low_pml4[NR_CPUS];
-
-void swap_low_mappings(void)
-{
-	int i;
-	for (i = 0; i < NR_CPUS; i++) {
-	        unsigned long t;
-		if (!cpu_pda[i].level4_pgt) 
-			continue;
-		t = cpu_pda[i].level4_pgt[0];
-		cpu_pda[i].level4_pgt[0] = low_pml4[i];
-		low_pml4[i] = t;
-	}
-	flush_tlb_all();
-}
-
+/* Assumes all CPUs still execute in init_mm */
 void zap_low_mappings(void)
 {
-	swap_low_mappings();
+	pgd_t *pgd = pgd_offset_k(0UL);
+	pgd_clear(pgd);
+	flush_tlb_all();
 }
 
 #ifndef CONFIG_DISCONTIGMEM
@@ -361,10 +348,14 @@
 	
 	for (; address < end; address += LARGE_PAGE_SIZE) { 
 		pgd_t *pgd = pgd_offset_k(address);
-               pmd_t *pmd;
-		if (!pgd || pgd_none(*pgd))
+		pud_t *pud;
+		pmd_t *pmd;
+		if (pgd_none(*pgd))
+			continue;
+		pud = pud_offset(pgd, address);
+		if (pud_none(*pud))
 			continue; 
-               pmd = pmd_offset(pgd, address);
+		pmd = pmd_offset(pud, address);
 		if (!pmd || pmd_none(*pmd))
 			continue; 
 		if (0 == (pmd_val(*pmd) & _PAGE_PSE)) { 
@@ -531,29 +522,29 @@
 int kern_addr_valid(unsigned long addr) 
 { 
 	unsigned long above = ((long)addr) >> __VIRTUAL_MASK_SHIFT;
-       pml4_t *pml4;
        pgd_t *pgd;
+       pud_t *pud;
        pmd_t *pmd;
        pte_t *pte;
 
 	if (above != 0 && above != -1UL)
 		return 0; 
 	
-       pml4 = pml4_offset_k(addr);
-	if (pml4_none(*pml4))
+	pgd = pgd_offset_k(addr);
+	if (pgd_none(*pgd))
 		return 0;
 
-       pgd = pgd_offset_k(addr);
-	if (pgd_none(*pgd))
+	pud = pud_offset(pgd, addr);
+	if (pud_none(*pud))
 		return 0; 
 
-       pmd = pmd_offset(pgd, addr);
+	pmd = pmd_offset(pud, addr);
 	if (pmd_none(*pmd))
 		return 0;
 	if (pmd_large(*pmd))
 		return pfn_valid(pmd_pfn(*pmd));
 
-       pte = pte_offset_kernel(pmd, addr);
+	pte = pte_offset_kernel(pmd, addr);
 	if (pte_none(*pte))
 		return 0;
 	return pfn_valid(pte_pfn(*pte));
@@ -622,4 +613,14 @@
 {
 	struct vm_area_struct *vma = get_gate_vma(task);
 	return (addr >= vma->vm_start) && (addr < vma->vm_end);
+}
+
+/* Use this when you have no reliable task/vma, typically from interrupt
+ * context.  It is less reliable than using the task's vma and may give
+ * false positives.
+ */
+int in_gate_area_no_task(unsigned long addr)
+{
+	return (((addr >= VSYSCALL_START) && (addr < VSYSCALL_END)) ||
+		((addr >= VSYSCALL32_BASE) && (addr < VSYSCALL32_END)));
 }
diff -Nru a/arch/x86_64/mm/ioremap.c b/arch/x86_64/mm/ioremap.c
--- a/arch/x86_64/mm/ioremap.c	2005-01-10 20:11:22 -08:00
+++ b/arch/x86_64/mm/ioremap.c	2005-01-10 20:11:22 -08:00
@@ -16,7 +16,7 @@
 #include <asm/fixmap.h>
 #include <asm/cacheflush.h>
 #include <asm/tlbflush.h>
-
+#include <asm/proto.h>
 
 static inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned long size,
 	unsigned long phys_addr, unsigned long flags)
@@ -49,10 +49,10 @@
 {
 	unsigned long end;
 
-	address &= ~PGDIR_MASK;
+	address &= ~PUD_MASK;
 	end = address + size;
-	if (end > PGDIR_SIZE)
-		end = PGDIR_SIZE;
+	if (end > PUD_SIZE)
+		end = PUD_SIZE;
 	phys_addr -= address;
 	if (address >= end)
 		BUG();
@@ -67,31 +67,54 @@
 	return 0;
 }
 
+static inline int remap_area_pud(pud_t * pud, 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 {
+		pmd_t * pmd = pmd_alloc(&init_mm, pud, address);
+		if (!pmd)
+			return -ENOMEM;
+		remap_area_pmd(pmd, address, end - address, address + phys_addr, flags);
+		address = (address + PUD_SIZE) & PUD_MASK;
+		pmd++;
+	} while (address && (address < end));
+	return 0;
+}
+
 static int remap_area_pages(unsigned long address, unsigned long phys_addr,
 				 unsigned long size, unsigned long flags)
 {
 	int error;
-	pgd_t * dir;
+	pgd_t *pgd;
 	unsigned long end = address + size;
 
 	phys_addr -= address;
-	dir = pgd_offset_k(address);
+	pgd = pgd_offset_k(address);
 	flush_cache_all();
 	if (address >= end)
 		BUG();
 	spin_lock(&init_mm.page_table_lock);
 	do {
-		pmd_t *pmd;
-		pmd = pmd_alloc(&init_mm, dir, address);
+		pud_t *pud;
+		pud = pud_alloc(&init_mm, pgd, address);
 		error = -ENOMEM;
-		if (!pmd)
+		if (!pud)
 			break;
-		if (remap_area_pmd(pmd, address, end - address,
+		if (remap_area_pud(pud, address, end - address,
 					 phys_addr + address, flags))
 			break;
 		error = 0;
 		address = (address + PGDIR_SIZE) & PGDIR_MASK;
-		dir++;
+		pgd++;
 	} while (address && (address < end));
 	spin_unlock(&init_mm.page_table_lock);
 	flush_tlb_all();
@@ -99,7 +122,31 @@
 }
 
 /*
- * Generic mapping function (not visible outside):
+ * Fix up the linear direct mapping of the kernel to avoid cache attribute
+ * conflicts.
+ */
+static int
+ioremap_change_attr(unsigned long phys_addr, unsigned long size,
+					unsigned long flags)
+{
+	int err = 0;
+	if (flags && phys_addr + size - 1 < (end_pfn_map << PAGE_SHIFT)) {
+		unsigned long npages = (size + PAGE_SIZE - 1) >> PAGE_SHIFT;
+		unsigned long vaddr = (unsigned long) __va(phys_addr);
+
+		/*
+ 		 * Must use a address here and not struct page because the phys addr
+		 * can be a in hole between nodes and not have an memmap entry.
+		 */
+		err = change_page_attr_addr(vaddr,npages,__pgprot(__PAGE_KERNEL|flags));
+		if (!err)
+			global_flush_tlb();
+	}
+	return err;
+}
+
+/*
+ * Generic mapping function
  */
 
 /*
@@ -155,12 +202,17 @@
 	/*
 	 * Ok, go for it..
 	 */
-	area = get_vm_area(size, VM_IOREMAP);
+	area = get_vm_area(size, VM_IOREMAP | (flags << 24));
 	if (!area)
 		return NULL;
 	area->phys_addr = phys_addr;
 	addr = area->addr;
 	if (remap_area_pages((unsigned long) addr, phys_addr, size, flags)) {
+		remove_vm_area((void *)(PAGE_MASK & (unsigned long) addr));
+		return NULL;
+	}
+	if (ioremap_change_attr(phys_addr, size, flags) < 0) {
+		area->flags &= 0xffffff;
 		vunmap(addr);
 		return NULL;
 	}
@@ -191,43 +243,34 @@
 
 void __iomem *ioremap_nocache (unsigned long phys_addr, unsigned long size)
 {
-	void __iomem *p = __ioremap(phys_addr, size, _PAGE_PCD);
-	if (!p) 
-		return p; 
-
-	if (phys_addr + size < virt_to_phys(high_memory)) { 
-		struct page *ppage = virt_to_page(__va(phys_addr));		
-		unsigned long npages = (size + PAGE_SIZE - 1) >> PAGE_SHIFT;
-
-		BUG_ON(phys_addr+size > (unsigned long)high_memory);
-		BUG_ON(phys_addr + size < phys_addr);
-
-		if (change_page_attr(ppage, npages, PAGE_KERNEL_NOCACHE) < 0) { 
-			iounmap(p); 
-			p = NULL;
-		}
-		global_flush_tlb();
-	} 
-
-	return p;					
+	return __ioremap(phys_addr, size, _PAGE_PCD);
 }
 
 void iounmap(volatile void __iomem *addr)
 {
-	struct vm_struct *p;
+	struct vm_struct *p, **pprev;
+
 	if (addr <= high_memory) 
 		return; 
-	p = remove_vm_area((void *)(PAGE_MASK & (unsigned long) addr)); 
+
+	write_lock(&vmlist_lock);
+	for (p = vmlist, pprev = &vmlist; p != NULL; pprev = &p->next, p = *pprev)
+		if (p->addr == (void *)(PAGE_MASK & (unsigned long)addr))
+			break;
 	if (!p) { 
 		printk("__iounmap: bad address %p\n", addr);
-		return;
-	} 
-
-	if (p->flags && p->phys_addr < virt_to_phys(high_memory)) { 
+		goto out_unlock;
+	}
+	*pprev = p->next;
+	unmap_vm_area(p);
+	if ((p->flags >> 24) &&
+		p->phys_addr + p->size - 1 < virt_to_phys(high_memory)) {
 		change_page_attr(virt_to_page(__va(p->phys_addr)),
 				 p->size >> PAGE_SHIFT,
 				 PAGE_KERNEL); 				 
 		global_flush_tlb();
 	} 
+out_unlock:
+	write_unlock(&vmlist_lock);
 	kfree(p); 
 }
diff -Nru a/arch/x86_64/mm/k8topology.c b/arch/x86_64/mm/k8topology.c
--- a/arch/x86_64/mm/k8topology.c	2005-01-10 20:11:23 -08:00
+++ b/arch/x86_64/mm/k8topology.c	2005-01-10 20:11:23 -08:00
@@ -2,9 +2,7 @@
  * AMD K8 NUMA support.
  * Discover the memory map and associated nodes.
  * 
- * Doesn't use the ACPI SRAT table because it has a questionable license.
- * Instead the northbridge registers are read directly. 
- * XXX in 2.5 we could use the generic SRAT code
+ * This version reads it directly from the K8 northbridge.
  * 
  * Copyright 2002,2003 Andi Kleen, SuSE Labs.
  */
@@ -45,7 +43,7 @@
 int __init k8_scan_nodes(unsigned long start, unsigned long end)
 { 
 	unsigned long prevbase;
-	struct node nodes[MAXNODE];
+	struct node nodes[8];
 	int nodeid, i, nb; 
 	int found = 0;
 	u32 reg;
@@ -57,9 +55,10 @@
 	printk(KERN_INFO "Scanning NUMA topology in Northbridge %d\n", nb); 
 
 	reg = read_pci_config(0, nb, 0, 0x60); 
-	numnodes =  ((reg >> 4) & 7) + 1; 
+	for (i = 0; i <= ((reg >> 4) & 7); i++)
+		node_set_online(i);
 
-	printk(KERN_INFO "Number of nodes %d (%x)\n", numnodes, reg);
+	printk(KERN_INFO "Number of nodes %d (%x)\n", num_online_nodes(), reg);
 
 	memset(&nodes,0,sizeof(nodes)); 
 	prevbase = 0;
@@ -71,11 +70,11 @@
 
 		nodeid = limit & 7; 
 		if ((base & 3) == 0) { 
-			if (i < numnodes) 
+			if (i < num_online_nodes())
 				printk("Skipping disabled node %d\n", i); 
 			continue;
 		} 
-		if (nodeid >= numnodes) { 
+		if (nodeid >= num_online_nodes()) {
 			printk("Ignoring excess node %d (%lx:%lx)\n", nodeid,
 			       base, limit); 
 			continue;
@@ -151,7 +150,7 @@
 	} 
 	printk(KERN_INFO "Using node hash shift of %d\n", memnode_shift); 
 
-	for (i = 0; i < MAXNODE; i++) { 
+	for (i = 0; i < 8; i++) {
 		if (nodes[i].start != nodes[i].end) { 
 			/* assume 1:1 NODE:CPU */
 			cpu_to_node[i] = i; 
diff -Nru a/arch/x86_64/mm/numa.c b/arch/x86_64/mm/numa.c
--- a/arch/x86_64/mm/numa.c	2005-01-10 20:11:21 -08:00
+++ b/arch/x86_64/mm/numa.c	2005-01-10 20:11:21 -08:00
@@ -16,21 +16,23 @@
 #include <asm/proto.h>
 #include <asm/dma.h>
 #include <asm/numa.h>
+#include <asm/acpi.h>
 
 #ifndef Dprintk
 #define Dprintk(x...)
 #endif
 
-struct pglist_data *node_data[MAXNODE];
+struct pglist_data *node_data[MAX_NUMNODES];
 bootmem_data_t plat_node_bdata[MAX_NUMNODES];
 
 int memnode_shift;
 u8  memnodemap[NODEMAPSIZE];
 
-unsigned char cpu_to_node[NR_CPUS];  
-cpumask_t     node_to_cpumask[MAXNODE]; 
+#define NUMA_NO_NODE 0xff
+unsigned char cpu_to_node[NR_CPUS] = { [0 ... NR_CPUS-1] = NUMA_NO_NODE };
+cpumask_t     node_to_cpumask[MAX_NUMNODES];
 
-static int numa_off __initdata; 
+int numa_off __initdata;
 
 unsigned long nodes_present; 
 
@@ -43,7 +45,7 @@
 	/* When in doubt use brute force. */
 	while (shift < 48) { 
 		memset(memnodemap,0xff,sizeof(*memnodemap) * NODEMAPSIZE); 
-		for (i = 0; i < numnodes; i++) { 
+		for_each_online_node(i) {
 			if (nodes[i].start == nodes[i].end) 
 				continue;
 			for (addr = nodes[i].start; 
@@ -109,8 +111,6 @@
 
 	reserve_bootmem_node(NODE_DATA(nodeid), nodedata_phys, pgdat_size); 
 	reserve_bootmem_node(NODE_DATA(nodeid), bootmap_start, bootmap_pages<<PAGE_SHIFT);
-	if (nodeid + 1 > numnodes)
-		numnodes = nodeid + 1;
 	node_set_online(nodeid);
 } 
 
@@ -150,13 +150,12 @@
 	   CPUs, as the number of CPUs is not known yet. 
 	   We round robin the existing nodes. */
 	rr = 0;
-	for (i = 0; i < MAXNODE; i++) {
-		if (node_online(i))
+	for (i = 0; i < NR_CPUS; i++) {
+		if (cpu_to_node[i] != NUMA_NO_NODE)
 			continue;
 		rr = next_node(rr, node_online_map);
 		if (rr == MAX_NUMNODES)
 			rr = first_node(node_online_map);
-		node_data[i] = node_data[rr];
 		cpu_to_node[i] = rr;
 		rr++; 
 	}
@@ -171,7 +170,7 @@
 static int numa_emulation(unsigned long start_pfn, unsigned long end_pfn)
 {
  	int i;
- 	struct node nodes[MAXNODE];
+ 	struct node nodes[MAX_NUMNODES];
  	unsigned long sz = ((end_pfn - start_pfn)<<PAGE_SHIFT) / numa_fake;
 
  	/* Kludge needed for the hash function */
@@ -196,15 +195,15 @@
  		       i,
  		       nodes[i].start, nodes[i].end,
  		       (nodes[i].end - nodes[i].start) >> 20);
+		node_set_online(i);
  	}
- 	numnodes = numa_fake;
  	memnode_shift = compute_hash_shift(nodes);
  	if (memnode_shift < 0) {
  		memnode_shift = 0;
  		printk(KERN_ERR "No NUMA hash function found. Emulation disabled.\n");
  		return -1;
  	}
- 	for (i = 0; i < numa_fake; i++)
+ 	for_each_online_node(i)
  		setup_node_bootmem(i, nodes[i].start, nodes[i].end);
  	numa_init_array();
  	return 0;
@@ -220,6 +219,12 @@
  		return;
 #endif
 
+#ifdef CONFIG_ACPI_NUMA
+	if (!numa_off && !acpi_scan_nodes(start_pfn << PAGE_SHIFT,
+					  end_pfn << PAGE_SHIFT))
+ 		return;
+#endif
+
 #ifdef CONFIG_K8_NUMA
 	if (!numa_off && !k8_scan_nodes(start_pfn<<PAGE_SHIFT, end_pfn<<PAGE_SHIFT))
 		return;
@@ -233,11 +238,12 @@
 		/* setup dummy node covering all memory */ 
 	memnode_shift = 63; 
 	memnodemap[0] = 0;
-	numnodes = 1;
+	nodes_clear(node_online_map);
+	node_set_online(0);
 	for (i = 0; i < NR_CPUS; i++)
 		cpu_to_node[i] = 0;
 	node_to_cpumask[0] = cpumask_of_cpu(0);
-	setup_node_bootmem(0, start_pfn<<PAGE_SHIFT, end_pfn<<PAGE_SHIFT);
+	setup_node_bootmem(0, start_pfn << PAGE_SHIFT, end_pfn << PAGE_SHIFT);
 }
 
 __init void numa_add_cpu(int cpu)
@@ -251,7 +257,7 @@
 { 
 	int i;
 	unsigned long pages = 0;
-	for_all_nodes(i) {
+	for_each_online_node(i) {
 		pages += free_all_bootmem_node(NODE_DATA(i));
 	}
 	return pages;
@@ -260,7 +266,7 @@
 void __init paging_init(void)
 { 
 	int i;
-	for_all_nodes(i) { 
+	for_each_online_node(i) {
 		setup_node_zones(i); 
 	}
 } 
@@ -276,6 +282,10 @@
 		if (numa_fake >= MAX_NUMNODES)
 			numa_fake = MAX_NUMNODES;
 	}
+#endif
+#ifdef CONFIG_ACPI_NUMA
+ 	if (!strncmp(opt,"noacpi",6))
+ 		acpi_numa = -1;
 #endif
 	return 1;
 } 
diff -Nru a/arch/x86_64/mm/pageattr.c b/arch/x86_64/mm/pageattr.c
--- a/arch/x86_64/mm/pageattr.c	2005-01-10 20:11:19 -08:00
+++ b/arch/x86_64/mm/pageattr.c	2005-01-10 20:11:19 -08:00
@@ -16,12 +16,16 @@
 
 static inline pte_t *lookup_address(unsigned long address) 
 { 
-	pgd_t *pgd = pgd_offset_k(address); 
+	pgd_t *pgd = pgd_offset_k(address);
+	pud_t *pud;
 	pmd_t *pmd;
 	pte_t *pte;
-	if (!pgd || !pgd_present(*pgd))
+	if (pgd_none(*pgd))
+		return NULL;
+	pud = pud_offset(pgd, address);
+	if (!pud_present(*pud))
 		return NULL; 
-	pmd = pmd_offset(pgd, address); 	       
+	pmd = pmd_offset(pud, address);
 	if (!pmd_present(*pmd))
 		return NULL; 
 	if (pmd_large(*pmd))
@@ -98,26 +102,29 @@
  */
 static void revert_page(unsigned long address, pgprot_t ref_prot)
 {
-       pgd_t *pgd;
-       pmd_t *pmd; 
-       pte_t large_pte; 
-       
-       pgd = pgd_offset_k(address); 
-       pmd = pmd_offset(pgd, address);
-       BUG_ON(pmd_val(*pmd) & _PAGE_PSE); 
-       pgprot_val(ref_prot) |= _PAGE_PSE;
-       large_pte = mk_pte_phys(__pa(address) & LARGE_PAGE_MASK, ref_prot);
-       set_pte((pte_t *)pmd, large_pte);
+	pgd_t *pgd;
+	pud_t *pud;
+	pmd_t *pmd;
+	pte_t large_pte;
+
+	pgd = pgd_offset_k(address);
+	BUG_ON(pgd_none(*pgd));
+	pud = pud_offset(pgd,address);
+	BUG_ON(pud_none(*pud));
+	pmd = pmd_offset(pud, address);
+	BUG_ON(pmd_val(*pmd) & _PAGE_PSE);
+	pgprot_val(ref_prot) |= _PAGE_PSE;
+	large_pte = mk_pte_phys(__pa(address) & LARGE_PAGE_MASK, ref_prot);
+	set_pte((pte_t *)pmd, large_pte);
 }      
 
 static int
-__change_page_attr(unsigned long address, struct page *page, pgprot_t prot, 
-		   pgprot_t ref_prot)
+__change_page_attr(unsigned long address, unsigned long pfn, pgprot_t prot,
+				   pgprot_t ref_prot)
 { 
 	pte_t *kpte; 
 	struct page *kpte_page;
 	unsigned kpte_flags;
-
 	kpte = lookup_address(address);
 	if (!kpte) return 0;
 	kpte_page = virt_to_page(((unsigned long)kpte) & PAGE_MASK);
@@ -125,20 +132,20 @@
 	if (pgprot_val(prot) != pgprot_val(ref_prot)) { 
 		if ((kpte_flags & _PAGE_PSE) == 0) { 
 			pte_t old = *kpte;
-			pte_t standard = mk_pte(page, ref_prot); 
+			pte_t standard = pfn_pte(pfn, ref_prot);
 
-			set_pte(kpte, mk_pte(page, prot)); 
+			set_pte(kpte, pfn_pte(pfn, prot));
 			if (pte_same(old,standard))
 				get_page(kpte_page);
 		} else {
 			struct page *split = split_large_page(address, prot, ref_prot); 
 			if (!split)
 				return -ENOMEM;
-			get_page(kpte_page);
+			get_page(split);
 			set_pte(kpte,mk_pte(split, ref_prot));
 		}	
 	} else if ((kpte_flags & _PAGE_PSE) == 0) { 
-		set_pte(kpte, mk_pte(page, ref_prot));
+		set_pte(kpte, pfn_pte(pfn, ref_prot));
 		__put_page(kpte_page);
 	}
 
@@ -162,29 +169,37 @@
  * 
  * Caller must call global_flush_tlb() after this.
  */
-int change_page_attr(struct page *page, int numpages, pgprot_t prot)
+int change_page_attr_addr(unsigned long address, int numpages, pgprot_t prot)
 {
 	int err = 0; 
 	int i; 
 
 	down_write(&init_mm.mmap_sem);
-	for (i = 0; i < numpages; !err && i++, page++) { 
-		unsigned long address = (unsigned long)page_address(page); 
-		err = __change_page_attr(address, page, prot, PAGE_KERNEL); 
+	for (i = 0; i < numpages; i++, address += PAGE_SIZE) {
+		unsigned long pfn = __pa(address) >> PAGE_SHIFT;
+
+		err = __change_page_attr(address, pfn, prot, PAGE_KERNEL);
 		if (err) 
 			break; 
 		/* Handle kernel mapping too which aliases part of the
 		 * lowmem */
-		/* Disabled right now. Fixme */ 
-		if (0 && page_to_phys(page) < KERNEL_TEXT_SIZE) {		
+		if (__pa(address) < KERNEL_TEXT_SIZE) {
 			unsigned long addr2;
-			addr2 = __START_KERNEL_map + page_to_phys(page);
-			err = __change_page_attr(addr2, page, prot, 
-						 PAGE_KERNEL_EXEC);
+			pgprot_t prot2 = prot;
+			addr2 = __START_KERNEL_map + __pa(address);
+ 			pgprot_val(prot2) &= ~_PAGE_NX;
+			err = __change_page_attr(addr2, pfn, prot2, PAGE_KERNEL_EXEC);
 		} 
 	} 	
 	up_write(&init_mm.mmap_sem); 
 	return err;
+}
+
+/* Don't call this for MMIO areas that may not have a mem_map entry */
+int change_page_attr(struct page *page, int numpages, pgprot_t prot)
+{
+	unsigned long addr = (unsigned long)page_address(page);
+	return change_page_attr_addr(addr, numpages, prot);
 }
 
 void global_flush_tlb(void)
diff -Nru a/arch/x86_64/mm/srat.c b/arch/x86_64/mm/srat.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/x86_64/mm/srat.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,206 @@
+/*
+ * ACPI 3.0 based NUMA setup
+ * Copyright 2004 Andi Kleen, SuSE Labs.
+ *
+ * Reads the ACPI SRAT table to figure out what memory belongs to which CPUs.
+ *
+ * Called from acpi_numa_init while reading the SRAT and SLIT tables.
+ * Assumes all memory regions belonging to a single proximity domain
+ * are in one chunk. Holes between them will be included in the node.
+ */
+
+#include <linux/kernel.h>
+#include <linux/acpi.h>
+#include <linux/mmzone.h>
+#include <linux/bitmap.h>
+#include <linux/module.h>
+#include <linux/topology.h>
+#include <asm/proto.h>
+#include <asm/numa.h>
+
+static struct acpi_table_slit *acpi_slit;
+
+static DECLARE_BITMAP(nodes_parsed, MAX_NUMNODES) __initdata;
+static struct node nodes[MAX_NUMNODES] __initdata;
+static __u8  pxm2node[256] __initdata = { [0 ... 255] = 0xff };
+
+static __init int setup_node(int pxm)
+{
+	if (pxm2node[pxm] == 0xff) {
+		if (num_online_nodes() >= MAX_NUMNODES)
+			return -1;
+		pxm2node[pxm] = num_online_nodes();
+		node_set_online(num_online_nodes());
+	}
+	return pxm2node[pxm];
+}
+
+static __init int conflicting_nodes(unsigned long start, unsigned long end)
+{
+	int i;
+	for_each_online_node(i) {
+		struct node *nd = &nodes[i];
+		if (nd->start == nd->end)
+			continue;
+		if (nd->end > start && nd->start < end)
+			return 1;
+		if (nd->end == end && nd->start == start)
+			return 1;
+	}
+	return -1;
+}
+
+static __init void cutoff_node(int i, unsigned long start, unsigned long end)
+{
+	struct node *nd = &nodes[i];
+	if (nd->start < start) {
+		nd->start = start;
+		if (nd->end < nd->start)
+			nd->start = nd->end;
+	}
+	if (nd->end > end) {
+		if (!(end & 0xfff))
+			end--;
+		nd->end = end;
+		if (nd->start > nd->end)
+			nd->start = nd->end;
+	}
+}
+
+static __init void bad_srat(void)
+{
+	printk(KERN_ERR "SRAT: SRAT not used.\n");
+	acpi_numa = -1;
+}
+
+static __init inline int srat_disabled(void)
+{
+	return numa_off || acpi_numa < 0;
+}
+
+/* Callback for SLIT parsing */
+void __init acpi_numa_slit_init(struct acpi_table_slit *slit)
+{
+	acpi_slit = slit;
+}
+
+/* Callback for Proximity Domain -> LAPIC mapping */
+void __init
+acpi_numa_processor_affinity_init(struct acpi_table_processor_affinity *pa)
+{
+	int pxm, node;
+	if (srat_disabled() || pa->flags.enabled == 0)
+		return;
+	pxm = pa->proximity_domain;
+	node = setup_node(pxm);
+	if (node < 0) {
+		printk(KERN_ERR "SRAT: Too many proximity domains %x\n", pxm);
+		bad_srat();
+		return;
+	}
+	if (pa->apic_id >= NR_CPUS) {
+		printk(KERN_ERR "SRAT: lapic %u too large.\n",
+		       pa->apic_id);
+		bad_srat();
+		return;
+	}
+	cpu_to_node[pa->apic_id] = node;
+	acpi_numa = 1;
+	printk(KERN_INFO "SRAT: PXM %u -> APIC %u -> Node %u\n",
+	       pxm, pa->apic_id, node);
+}
+
+/* Callback for parsing of the Proximity Domain <-> Memory Area mappings */
+void __init
+acpi_numa_memory_affinity_init(struct acpi_table_memory_affinity *ma)
+{
+	struct node *nd;
+	unsigned long start, end;
+	int node, pxm;
+	int i;
+
+	if (srat_disabled() || ma->flags.enabled == 0)
+		return;
+	/* hotplug bit is ignored for now */
+	pxm = ma->proximity_domain;
+	node = setup_node(pxm);
+	if (node < 0) {
+		printk(KERN_ERR "SRAT: Too many proximity domains.\n");
+		bad_srat();
+		return;
+	}
+	start = ma->base_addr_lo | ((u64)ma->base_addr_hi << 32);
+	end = start + (ma->length_lo | ((u64)ma->length_hi << 32));
+	i = conflicting_nodes(start, end);
+	if (i >= 0) {
+		printk(KERN_ERR
+		       "SRAT: pxm %d overlap %lx-%lx with node %d(%Lx-%Lx)\n",
+		       pxm, start, end, i, nodes[i].start, nodes[i].end);
+		bad_srat();
+		return;
+	}
+	nd = &nodes[node];
+	if (!test_and_set_bit(node, &nodes_parsed)) {
+		nd->start = start;
+		nd->end = end;
+	} else {
+		if (start < nd->start)
+			nd->start = start;
+		if (nd->end < end)
+			nd->end = end;
+	}
+	if (!(nd->end & 0xfff))
+		nd->end--;
+	printk(KERN_INFO "SRAT: Node %u PXM %u %Lx-%Lx\n", node, pxm,
+	       nd->start, nd->end);
+}
+
+void __init acpi_numa_arch_fixup(void) {}
+
+/* Use the information discovered above to actually set up the nodes. */
+int __init acpi_scan_nodes(unsigned long start, unsigned long end)
+{
+	int i;
+	if (acpi_numa <= 0)
+		return -1;
+	memnode_shift = compute_hash_shift(nodes);
+	if (memnode_shift < 0) {
+		printk(KERN_ERR
+		     "SRAT: No NUMA node hash function found. Contact maintainer\n");
+		bad_srat();
+		return -1;
+	}
+	for (i = 0; i < MAX_NUMNODES; i++) {
+		if (!test_bit(i, &nodes_parsed))
+			continue;
+		cutoff_node(i, start, end);
+		if (nodes[i].start == nodes[i].end)
+			continue;
+		setup_node_bootmem(i, nodes[i].start, nodes[i].end);
+	}
+	numa_init_array();
+	return 0;
+}
+
+int node_to_pxm(int n)
+{
+       int i;
+       if (pxm2node[n] == n)
+               return n;
+       for (i = 0; i < 256; i++)
+               if (pxm2node[i] == n)
+                       return i;
+       return 0;
+}
+
+int __node_distance(int a, int b)
+{
+	int index;
+
+	if (!acpi_slit)
+		return a == b ? 10 : 20;
+	index = acpi_slit->localities * node_to_pxm(a);
+	return acpi_slit->entry[index + node_to_pxm(b)];
+}
+
+EXPORT_SYMBOL(__node_distance);
diff -Nru a/arch/x86_64/oprofile/Makefile b/arch/x86_64/oprofile/Makefile
--- a/arch/x86_64/oprofile/Makefile	2005-01-10 20:11:17 -08:00
+++ b/arch/x86_64/oprofile/Makefile	2005-01-10 20:11:17 -08:00
@@ -11,7 +11,7 @@
 	oprofilefs.o oprofile_stats.o \
 	timer_int.o )
 
-OPROFILE-y := init.o
+OPROFILE-y := init.o backtrace.o
 OPROFILE-$(CONFIG_X86_LOCAL_APIC) += nmi_int.o op_model_athlon.o op_model_p4.o \
 				     op_model_ppro.o
 OPROFILE-$(CONFIG_X86_IO_APIC)    += nmi_timer_int.o 
diff -Nru a/crypto/Kconfig b/crypto/Kconfig
--- a/crypto/Kconfig	2005-01-10 20:11:22 -08:00
+++ b/crypto/Kconfig	2005-01-10 20:11:22 -08:00
@@ -274,5 +274,6 @@
 	help
 	  Quick & dirty crypto test module.
 
+source "drivers/crypto/Kconfig"
 endmenu
 
diff -Nru a/crypto/sha512.c b/crypto/sha512.c
--- a/crypto/sha512.c	2005-01-10 20:11:22 -08:00
+++ b/crypto/sha512.c	2005-01-10 20:11:22 -08:00
@@ -48,7 +48,7 @@
         return (x >> y) | (x << (64 - y));
 }
 
-const u64 sha512_K[80] = {
+static const u64 sha512_K[80] = {
         0x428a2f98d728ae22ULL, 0x7137449123ef65cdULL, 0xb5c0fbcfec4d3b2fULL,
         0xe9b5dba58189dbbcULL, 0x3956c25bf348b538ULL, 0x59f111f1b605d019ULL,
         0x923f82a4af194f9bULL, 0xab1c5ed5da6d8118ULL, 0xd807aa98a3030242ULL,
diff -Nru a/crypto/tcrypt.c b/crypto/tcrypt.c
--- a/crypto/tcrypt.c	2005-01-10 20:11:21 -08:00
+++ b/crypto/tcrypt.c	2005-01-10 20:11:21 -08:00
@@ -255,7 +255,7 @@
 
 #endif	/* CONFIG_CRYPTO_HMAC */
 
-void
+static void
 test_cipher(char * algo, int mode, int enc, struct cipher_testvec * template, unsigned int tcount)
 {
 	unsigned int ret, i, j, k, temp;
diff -Nru a/crypto/tcrypt.h b/crypto/tcrypt.h
--- a/crypto/tcrypt.h	2005-01-10 20:11:22 -08:00
+++ b/crypto/tcrypt.h	2005-01-10 20:11:22 -08:00
@@ -63,7 +63,7 @@
  */
 #define MD4_TEST_VECTORS	7
 
-struct hash_testvec md4_tv_template [] = {
+static struct hash_testvec md4_tv_template [] = {
 	{
 		.plaintext = "",
 		.digest	= { 0x31, 0xd6, 0xcf, 0xe0, 0xd1, 0x6a, 0xe9, 0x31,
@@ -109,7 +109,7 @@
  */
 #define MD5_TEST_VECTORS	7
 
-struct hash_testvec md5_tv_template[] = {
+static struct hash_testvec md5_tv_template[] = {
 	{
 		.digest	= { 0xd4, 0x1d, 0x8c, 0xd9, 0x8f, 0x00, 0xb2, 0x04,
 			    0xe9, 0x80, 0x09, 0x98, 0xec, 0xf8, 0x42, 0x7e },
@@ -154,7 +154,7 @@
  */
 #define SHA1_TEST_VECTORS	2
 
-struct hash_testvec sha1_tv_template[] = {
+static struct hash_testvec sha1_tv_template[] = {
 	{ 
 		.plaintext = "abc",
 		.psize	= 3,
@@ -175,7 +175,7 @@
  */
 #define SHA256_TEST_VECTORS	2
 
-struct hash_testvec sha256_tv_template[] = {	
+static struct hash_testvec sha256_tv_template[] = {	
 	{ 
 		.plaintext = "abc",
 		.psize	= 3,
@@ -200,7 +200,7 @@
  */
 #define SHA384_TEST_VECTORS	4
 
-struct hash_testvec sha384_tv_template[] = {
+static struct hash_testvec sha384_tv_template[] = {
 	{ 
 		.plaintext= "abc",
 		.psize	= 3,
@@ -249,7 +249,7 @@
  */
 #define SHA512_TEST_VECTORS	4
 
-struct hash_testvec sha512_tv_template[] = {
+static struct hash_testvec sha512_tv_template[] = {
 	{ 
 		.plaintext = "abc",
 		.psize	= 3,
@@ -309,7 +309,7 @@
  */
 #define WP512_TEST_VECTORS	8
 
-struct hash_testvec wp512_tv_template[] = {
+static struct hash_testvec wp512_tv_template[] = {
 	{ 
 		.plaintext = "",
 		.psize	= 0,
@@ -407,7 +407,7 @@
 
 #define WP384_TEST_VECTORS	8
 
-struct hash_testvec wp384_tv_template[] = {
+static struct hash_testvec wp384_tv_template[] = {
 	{ 
 		.plaintext = "",
 		.psize	= 0,
@@ -489,7 +489,7 @@
 
 #define WP256_TEST_VECTORS	8
 
-struct hash_testvec wp256_tv_template[] = {
+static struct hash_testvec wp256_tv_template[] = {
 	{ 
 		.plaintext = "",
 		.psize	= 0,
@@ -561,7 +561,7 @@
  */
 #define HMAC_MD5_TEST_VECTORS	7
 
-struct hmac_testvec hmac_md5_tv_template[] =
+static struct hmac_testvec hmac_md5_tv_template[] =
 {	
 	{
 		.key	= { [0 ... 15] =  0x0b },
@@ -625,7 +625,7 @@
  */
 #define HMAC_SHA1_TEST_VECTORS	7
 
-struct hmac_testvec hmac_sha1_tv_template[] = {	
+static struct hmac_testvec hmac_sha1_tv_template[] = {	
 	{
 		.key	= { [0 ... 19] = 0x0b },
 		.ksize	= 20,
@@ -690,7 +690,7 @@
  */
 #define HMAC_SHA256_TEST_VECTORS	10
 
-struct hmac_testvec hmac_sha256_tv_template[] = {
+static struct hmac_testvec hmac_sha256_tv_template[] = {
 	{
 		.key	= { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
 			    0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10,
@@ -813,7 +813,7 @@
 #define DES3_EDE_ENC_TEST_VECTORS	3
 #define DES3_EDE_DEC_TEST_VECTORS	3
 
-struct cipher_testvec des_enc_tv_template[] = {
+static struct cipher_testvec des_enc_tv_template[] = {
 	{ /* From Applied Cryptography */
 		.key	= { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
 		.klen	= 8,
@@ -917,7 +917,7 @@
 	},
 };
 
-struct cipher_testvec des_dec_tv_template[] = {
+static struct cipher_testvec des_dec_tv_template[] = {
 	{ /* From Applied Cryptography */
 		.key	= { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
 		.klen	= 8,
@@ -957,7 +957,7 @@
 	},
 };
 
-struct cipher_testvec des_cbc_enc_tv_template[] = {
+static struct cipher_testvec des_cbc_enc_tv_template[] = {
 	{ /* From OpenSSL */
 		.key	= { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef},
 		.klen	= 8,
@@ -1012,7 +1012,7 @@
 	},
 };
 
-struct cipher_testvec des_cbc_dec_tv_template[] = {
+static struct cipher_testvec des_cbc_dec_tv_template[] = {
 	{ /* FIPS Pub 81 */
 		.key	= { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
 		.klen	= 8,
@@ -1053,7 +1053,7 @@
 /*
  * We really need some more test vectors, especially for DES3 CBC.
  */
-struct cipher_testvec des3_ede_enc_tv_template[] = {
+static struct cipher_testvec des3_ede_enc_tv_template[] = {
 	{ /* These are from openssl */
 		.key	= { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,
 			    0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
@@ -1084,7 +1084,7 @@
 	},
 };
 
-struct cipher_testvec des3_ede_dec_tv_template[] = {
+static struct cipher_testvec des3_ede_dec_tv_template[] = {
 	{ /* These are from openssl */
 		.key	= { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,
 			    0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
@@ -1123,7 +1123,7 @@
 #define BF_CBC_ENC_TEST_VECTORS	1
 #define BF_CBC_DEC_TEST_VECTORS	1
 
-struct cipher_testvec bf_enc_tv_template[] = {
+static struct cipher_testvec bf_enc_tv_template[] = {
 	{ /* DES test vectors from OpenSSL */
 		.key	= { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, },
 		.klen	= 8,
@@ -1178,7 +1178,7 @@
 	},
 };
 
-struct cipher_testvec bf_dec_tv_template[] = {
+static struct cipher_testvec bf_dec_tv_template[] = {
 	{ /* DES test vectors from OpenSSL */
 		.key	= { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
 		.klen	= 8,
@@ -1233,7 +1233,7 @@
 	},
 };
 
-struct cipher_testvec bf_cbc_enc_tv_template[] = {
+static struct cipher_testvec bf_cbc_enc_tv_template[] = {
 	{ /* From OpenSSL */
 		.key	= { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,
 			    0xf0, 0xe1, 0xd2, 0xc3, 0xb4, 0xa5, 0x96, 0x87 },
@@ -1252,7 +1252,7 @@
 	},
 };
 
-struct cipher_testvec bf_cbc_dec_tv_template[] = {
+static struct cipher_testvec bf_cbc_dec_tv_template[] = {
 	{ /* From OpenSSL */
 		.key	= { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,
 			    0xf0, 0xe1, 0xd2, 0xc3, 0xb4, 0xa5, 0x96, 0x87 },
@@ -1279,7 +1279,7 @@
 #define TF_CBC_ENC_TEST_VECTORS		4
 #define TF_CBC_DEC_TEST_VECTORS		4
 
-struct cipher_testvec tf_enc_tv_template[] = {
+static struct cipher_testvec tf_enc_tv_template[] = {
 	{
 		.key	= { [0 ... 15] = 0x00 },
 		.klen	= 16,
@@ -1312,7 +1312,7 @@
 	},
 };
 
-struct cipher_testvec tf_dec_tv_template[] = {
+static struct cipher_testvec tf_dec_tv_template[] = {
 	{
 		.key	= { [0 ... 15] = 0x00 },
 		.klen	= 16,
@@ -1345,7 +1345,7 @@
 	},
 };
 
-struct cipher_testvec tf_cbc_enc_tv_template[] = {
+static struct cipher_testvec tf_cbc_enc_tv_template[] = {
 	{ /* Generated with Nettle */
 		.key	= { [0 ... 15] = 0x00 },
 		.klen	= 16,
@@ -1391,7 +1391,7 @@
 	},
 };
 
-struct cipher_testvec tf_cbc_dec_tv_template[] = {
+static struct cipher_testvec tf_cbc_dec_tv_template[] = {
 	{ /* Reverse of the first four above */
 		.key	= { [0 ... 15] = 0x00 },
 		.klen	= 16,
@@ -1447,7 +1447,7 @@
 #define TNEPRES_ENC_TEST_VECTORS	4
 #define TNEPRES_DEC_TEST_VECTORS	4
 
-struct cipher_testvec serpent_enc_tv_template[] = 
+static struct cipher_testvec serpent_enc_tv_template[] = 
 {
 	{
 		.input	= { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
@@ -1489,7 +1489,7 @@
 	},
 };
 
-struct cipher_testvec tnepres_enc_tv_template[] = 
+static struct cipher_testvec tnepres_enc_tv_template[] = 
 {
 	{ /* KeySize=128, PT=0, I=1 */
 		.input	= { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -1540,7 +1540,7 @@
 };
 
 
-struct cipher_testvec serpent_dec_tv_template[] = 
+static struct cipher_testvec serpent_dec_tv_template[] = 
 {
 	{
 		.input	= { 0x12, 0x07, 0xfc, 0xce, 0x9b, 0xd0, 0xd6, 0x47,
@@ -1582,7 +1582,7 @@
 	},
 };
 
-struct cipher_testvec tnepres_dec_tv_template[] =
+static struct cipher_testvec tnepres_dec_tv_template[] =
 {
 	{
 		.input	= { 0x41, 0xcc, 0x6b, 0x31, 0x59, 0x31, 0x45, 0x97,
@@ -1629,7 +1629,7 @@
 #define CAST6_ENC_TEST_VECTORS	3
 #define CAST6_DEC_TEST_VECTORS  3
 
-struct cipher_testvec cast6_enc_tv_template[] = 
+static struct cipher_testvec cast6_enc_tv_template[] = 
 {
 	{
 		.key	= { 0x23, 0x42, 0xbb, 0x9e, 0xfa, 0x38, 0x54, 0x2c, 
@@ -1664,7 +1664,7 @@
 	},
 };
 
-struct cipher_testvec cast6_dec_tv_template[] = 
+static struct cipher_testvec cast6_dec_tv_template[] = 
 {
 	{
 		.key	= { 0x23, 0x42, 0xbb, 0x9e, 0xfa, 0x38, 0x54, 0x2c, 
@@ -1706,7 +1706,7 @@
 #define AES_ENC_TEST_VECTORS 3
 #define AES_DEC_TEST_VECTORS 3
 
-struct cipher_testvec aes_enc_tv_template[] = { 
+static struct cipher_testvec aes_enc_tv_template[] = { 
 	{ /* From FIPS-197 */
 		.key	= { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 
 			    0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
@@ -1743,7 +1743,7 @@
 	},
 };
 
-struct cipher_testvec aes_dec_tv_template[] = { 
+static struct cipher_testvec aes_dec_tv_template[] = { 
 	{ /* From FIPS-197 */
 		.key	= { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 
 			    0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
@@ -1784,7 +1784,7 @@
 #define CAST5_ENC_TEST_VECTORS	3
 #define CAST5_DEC_TEST_VECTORS	3
 
-struct cipher_testvec cast5_enc_tv_template[] =
+static struct cipher_testvec cast5_enc_tv_template[] =
 {
 	{
 		.key	= { 0x01, 0x23, 0x45, 0x67, 0x12, 0x34, 0x56, 0x78,
@@ -1812,7 +1812,7 @@
 	},
 };
 
-struct cipher_testvec cast5_dec_tv_template[] =
+static struct cipher_testvec cast5_dec_tv_template[] =
 {
 	{
 		.key	= { 0x01, 0x23, 0x45, 0x67, 0x12, 0x34, 0x56, 0x78,
@@ -1846,7 +1846,7 @@
 #define ARC4_ENC_TEST_VECTORS	7
 #define ARC4_DEC_TEST_VECTORS	7
 
-struct cipher_testvec arc4_enc_tv_template[] =
+static struct cipher_testvec arc4_enc_tv_template[] =
 {
 	{
 		.key	= { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
@@ -1913,7 +1913,7 @@
 	},
 };
 
-struct cipher_testvec arc4_dec_tv_template[] =
+static struct cipher_testvec arc4_dec_tv_template[] =
 {
 	{
 		.key	= { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
@@ -1986,7 +1986,7 @@
 #define TEA_ENC_TEST_VECTORS	4
 #define TEA_DEC_TEST_VECTORS	4
 
-struct cipher_testvec tea_enc_tv_template[] =
+static struct cipher_testvec xtea_enc_tv_template[] =
 {
 	{
 		.key    = { [0 ... 15] = 0x00 },
@@ -2030,7 +2030,7 @@
 	}
 };
 
-struct cipher_testvec tea_dec_tv_template[] =
+static struct cipher_testvec tea_dec_tv_template[] =
 {
 	{
 		.key    = { [0 ... 15] = 0x00 },
@@ -2080,7 +2080,7 @@
 #define XTEA_ENC_TEST_VECTORS	4
 #define XTEA_DEC_TEST_VECTORS	4
 
-struct cipher_testvec xtea_enc_tv_template[] =
+static struct cipher_testvec tea_enc_tv_template[] =
 {
 	{
 		.key    = { [0 ... 15] = 0x00 },
@@ -2124,7 +2124,7 @@
 	}
 };
 
-struct cipher_testvec xtea_dec_tv_template[] =
+static struct cipher_testvec xtea_dec_tv_template[] =
 {
 	{
 		.key    = { [0 ... 15] = 0x00 },
@@ -2174,7 +2174,7 @@
 #define KHAZAD_ENC_TEST_VECTORS 5
 #define KHAZAD_DEC_TEST_VECTORS 5
 
-struct cipher_testvec khazad_enc_tv_template[] = { 
+static struct cipher_testvec khazad_enc_tv_template[] = { 
 	{ 
 		.key	= { 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
 			    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
@@ -2220,7 +2220,7 @@
 	},
 };
 
-struct cipher_testvec khazad_dec_tv_template[] = { 
+static struct cipher_testvec khazad_dec_tv_template[] = { 
 	{
 		.key	= { 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
 			    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
@@ -2275,7 +2275,7 @@
 #define ANUBIS_CBC_ENC_TEST_VECTORS		2
 #define ANUBIS_CBC_DEC_TEST_VECTORS		2
 
-struct cipher_testvec anubis_enc_tv_template[] = {
+static struct cipher_testvec anubis_enc_tv_template[] = {
 	{
 		.key	= { 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
 			    0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe },
@@ -2338,7 +2338,7 @@
 	},
 };
 
-struct cipher_testvec anubis_dec_tv_template[] = {
+static struct cipher_testvec anubis_dec_tv_template[] = {
 	{
 		.key	= { 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
 			    0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe },
@@ -2401,7 +2401,7 @@
 	},
 };
 
-struct cipher_testvec anubis_cbc_enc_tv_template[] = {
+static struct cipher_testvec anubis_cbc_enc_tv_template[] = {
 	{
 		.key	= { 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
 			    0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe },
@@ -2436,7 +2436,7 @@
 	},
 };
 
-struct cipher_testvec anubis_cbc_dec_tv_template[] = {
+static struct cipher_testvec anubis_cbc_dec_tv_template[] = {
 	{
 		.key	= { 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
 			    0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe },
@@ -2489,7 +2489,7 @@
 #define DEFLATE_COMP_TEST_VECTORS 2
 #define DEFLATE_DECOMP_TEST_VECTORS 2
 
-struct comp_testvec deflate_comp_tv_template[] = {
+static struct comp_testvec deflate_comp_tv_template[] = {
 	{
 		.inlen	= 70,
 		.outlen	= 38,
@@ -2525,7 +2525,7 @@
 	},
 };
 
-struct comp_testvec deflate_decomp_tv_template[] = {
+static struct comp_testvec deflate_decomp_tv_template[] = {
 	{
 		.inlen	= 122,
 		.outlen	= 191,
@@ -2566,7 +2566,7 @@
  */
 #define MICHAEL_MIC_TEST_VECTORS 6
 
-struct hash_testvec michael_mic_tv_template[] =
+static struct hash_testvec michael_mic_tv_template[] =
 {
 	{
 		.key = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
diff -Nru a/drivers/Kconfig b/drivers/Kconfig
--- a/drivers/Kconfig	2005-01-10 20:11:22 -08:00
+++ b/drivers/Kconfig	2005-01-10 20:11:22 -08:00
@@ -56,4 +56,6 @@
 
 source "drivers/mmc/Kconfig"
 
+source "drivers/infiniband/Kconfig"
+
 endmenu
diff -Nru a/drivers/Makefile b/drivers/Makefile
--- a/drivers/Makefile	2005-01-10 20:11:24 -08:00
+++ b/drivers/Makefile	2005-01-10 20:11:24 -08:00
@@ -42,6 +42,7 @@
 obj-$(CONFIG_SBUS)		+= sbus/
 obj-$(CONFIG_ZORRO)		+= zorro/
 obj-$(CONFIG_MAC)		+= macintosh/
+obj-$(CONFIG_ATA_OVER_ETH)	+= block/aoe/
 obj-$(CONFIG_PARIDE) 		+= block/paride/
 obj-$(CONFIG_TC)		+= tc/
 obj-$(CONFIG_USB)		+= usb/
@@ -59,4 +60,6 @@
 obj-$(CONFIG_EISA)		+= eisa/
 obj-$(CONFIG_CPU_FREQ)		+= cpufreq/
 obj-$(CONFIG_MMC)		+= mmc/
+obj-$(CONFIG_INFINIBAND)	+= infiniband/
 obj-y				+= firmware/
+obj-$(CONFIG_CRYPTO)		+= crypto/
diff -Nru a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
--- a/drivers/acpi/Kconfig	2005-01-10 20:11:23 -08:00
+++ b/drivers/acpi/Kconfig	2005-01-10 20:11:23 -08:00
@@ -144,6 +144,15 @@
 	  ACPI C2 and C3 processor states to save power, on systems that
 	  support it.
 
+config ACPI_HOTPLUG_CPU
+	bool "Processor Hotplug (EXPERIMENTAL)"
+	depends on ACPI_PROCESSOR && HOTPLUG_CPU && EXPERIMENTAL
+	depends on !IA64_SGI_SN
+	select ACPI_CONTAINER
+	default n
+	 ---help---
+	 Select this option if your platform support physical CPU hotplug.
+
 config ACPI_THERMAL
 	tristate "Thermal Zone"
 	depends on ACPI_PROCESSOR
@@ -158,7 +167,7 @@
 	bool "NUMA support"
 	depends on ACPI_INTERPRETER
 	depends on NUMA
-	depends on IA64
+	depends on (IA64 || X86_64)
 	default y if IA64_GENERIC || IA64_SGI_SN2
 
 config ACPI_ASUS
@@ -325,5 +334,12 @@
 	  kernel logs, and/or you are using this on a notebook which
 	  does not yet have an HPET, you should say "Y" here.
 
-endmenu
+config ACPI_CONTAINER
+	tristate "ACPI0004,PNP0A05 and PNP0A06 Container Driver (EXPERIMENTAL)"
+	depends on ACPI && EXPERIMENTAL
+	default (ACPI_HOTPLUG_MEMORY || ACPI_HOTPLUG_CPU || ACPI_HOTPLUG_IO)
+	 ---help---
+	 	This is the ACPI generic container driver which supports
+		ACPI0004, PNP0A05 and PNP0A06 devices
 
+endmenu
diff -Nru a/drivers/acpi/Makefile b/drivers/acpi/Makefile
--- a/drivers/acpi/Makefile	2005-01-10 20:11:22 -08:00
+++ b/drivers/acpi/Makefile	2005-01-10 20:11:22 -08:00
@@ -29,6 +29,12 @@
 #
 # ACPI Bus and Device Drivers
 #
+processor-objs	+= processor_core.o processor_throttling.o \
+				processor_idle.o processor_thermal.o
+ifdef CONFIG_CPU_FREQ
+processor-objs	+= processor_perflib.o			
+endif
+
 obj-$(CONFIG_ACPI_BUS)		+= sleep/
 obj-$(CONFIG_ACPI_BUS)		+= bus.o
 obj-$(CONFIG_ACPI_AC) 		+= ac.o
@@ -40,6 +46,7 @@
 obj-$(CONFIG_ACPI_PCI)		+= pci_root.o pci_link.o pci_irq.o pci_bind.o
 obj-$(CONFIG_ACPI_POWER)	+= power.o
 obj-$(CONFIG_ACPI_PROCESSOR)	+= processor.o
+obj-$(CONFIG_ACPI_CONTAINER)	+= container.o
 obj-$(CONFIG_ACPI_THERMAL)	+= thermal.o
 obj-$(CONFIG_ACPI_SYSTEM)	+= system.o event.o
 obj-$(CONFIG_ACPI_DEBUG)	+= debug.o
diff -Nru a/drivers/acpi/asus_acpi.c b/drivers/acpi/asus_acpi.c
--- a/drivers/acpi/asus_acpi.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/acpi/asus_acpi.c	2005-01-10 20:11:17 -08:00
@@ -78,9 +78,9 @@
 
 static uid_t asus_uid;
 static gid_t asus_gid;
-MODULE_PARM(asus_uid, "i");
+module_param(asus_uid, uint, 0);
 MODULE_PARM_DESC(uid, "UID for entries in /proc/acpi/asus.\n");
-MODULE_PARM(asus_gid, "i");
+module_param(asus_gid, uint, 0);
 MODULE_PARM_DESC(gid, "GID for entries in /proc/acpi/asus.\n");
 
 
@@ -866,7 +866,7 @@
 
 	acpi_device_dir(device) = asus_proc_dir;
 	if (!acpi_device_dir(device))
-		return(-ENODEV);
+		return -ENODEV;
 
 	proc = create_proc_entry(PROC_INFO, mode, acpi_device_dir(device));
 	if (proc) {
@@ -1098,16 +1098,16 @@
 
 	result = acpi_bus_get_status(hotk->device);
 	if (result)
-		return(result);
+		return result;
 
 	if (hotk->device->status.present) {
 		result = asus_hotk_get_info();
 	} else {
 		printk(KERN_ERR "  Hotkey device not present, aborting\n");
-		return(-EINVAL);
+		return -EINVAL;
 	}
 
-	return(result);
+	return result;
 }
 
 
@@ -1117,7 +1117,7 @@
 	int result;
 
 	if (!device)
-		return(-EINVAL);
+		return -EINVAL;
 
 	printk(KERN_NOTICE "Asus Laptop ACPI Extras version %s\n",
 	       ASUS_ACPI_VERSION);
@@ -1125,7 +1125,7 @@
 	hotk =
 	    (struct asus_hotk *) kmalloc(sizeof(struct asus_hotk), GFP_KERNEL);
 	if (!hotk)
-		return(-ENOMEM);
+		return -ENOMEM;
 	memset(hotk, 0, sizeof(struct asus_hotk));
 
 	hotk->handle = device->handle;
@@ -1173,7 +1173,7 @@
 		kfree(hotk);
 	}
 
-	return(result);
+	return result;
 }
 
 
@@ -1182,7 +1182,7 @@
 	acpi_status status = 0;
 
 	if (!device || !acpi_driver_data(device))
-		return(-EINVAL);
+		return -EINVAL;
 
 	status = acpi_remove_notify_handler(hotk->handle, ACPI_SYSTEM_NOTIFY,
 					    asus_hotk_notify);
@@ -1193,7 +1193,7 @@
 
 	kfree(hotk);
 
-	return(0);
+	return 0;
 }
 
 
diff -Nru a/drivers/acpi/bus.c b/drivers/acpi/bus.c
--- a/drivers/acpi/bus.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/acpi/bus.c	2005-01-10 20:11:20 -08:00
@@ -57,10 +57,6 @@
                                 Device Management
    -------------------------------------------------------------------------- */
 
-extern void acpi_bus_data_handler (
-	acpi_handle		handle,
-	u32			function,
-	void			*context);
 int
 acpi_bus_get_device (
 	acpi_handle		handle,
@@ -77,7 +73,7 @@
 
 	status = acpi_get_data(handle, acpi_bus_data_handler, (void**) device);
 	if (ACPI_FAILURE(status) || !*device) {
-		ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Error getting context for object [%p]\n",
+		ACPI_DEBUG_PRINT((ACPI_DB_WARN, "No context for object [%p]\n",
 			handle));
 		return_VALUE(-ENODEV);
 	}
diff -Nru a/drivers/acpi/container.c b/drivers/acpi/container.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/acpi/container.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,298 @@
+/*
+ * acpi_container.c  - ACPI Generic Container Driver
+ * ($Revision: )
+ *
+ * Copyright (C) 2004 Anil S Keshavamurthy (anil.s.keshavamurthy@intel.com)
+ * Copyright (C) 2004 Keiichiro Tokunaga (tokunaga.keiich@jp.fujitsu.com)
+ * Copyright (C) 2004 Motoyuki Ito (motoyuki@soft.fujitsu.com)
+ * Copyright (C) 2004 Intel Corp.
+ * Copyright (C) 2004 FUJITSU LIMITED
+ *
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or (at
+ *  your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program; if not, write to the Free Software Foundation, Inc.,
+ *  59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+ *
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ */
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/types.h>
+#include <linux/acpi.h>
+#include <acpi/acpi_bus.h>
+#include <acpi/acpi_drivers.h>
+#include <acpi/container.h>
+
+#define ACPI_CONTAINER_DRIVER_NAME	"ACPI container driver"
+#define ACPI_CONTAINER_DEVICE_NAME	"ACPI container device"
+#define ACPI_CONTAINER_CLASS		"container"
+
+#define INSTALL_NOTIFY_HANDLER		1
+#define UNINSTALL_NOTIFY_HANDLER	2
+
+#define ACPI_CONTAINER_COMPONENT	0x01000000
+#define _COMPONENT			ACPI_CONTAINER_COMPONENT
+ACPI_MODULE_NAME			("acpi_container")
+
+MODULE_AUTHOR("Anil S Keshavamurthy");
+MODULE_DESCRIPTION(ACPI_CONTAINER_DRIVER_NAME);
+MODULE_LICENSE("GPL");
+
+#define ACPI_STA_PRESENT		(0x00000001)
+
+static int acpi_container_add(struct acpi_device *device);
+static int acpi_container_remove(struct acpi_device *device, int type);
+
+static struct acpi_driver acpi_container_driver = {
+	.name =		ACPI_CONTAINER_DRIVER_NAME,
+	.class =	ACPI_CONTAINER_CLASS,
+	.ids =		"ACPI0004,PNP0A05,PNP0A06",
+	.ops =		{
+				.add =		acpi_container_add,
+				.remove =	acpi_container_remove,
+			},
+};
+
+
+/*******************************************************************/
+
+static int
+is_device_present(acpi_handle handle)
+{
+	acpi_handle		temp;
+	acpi_status		status;
+	unsigned long	sta;
+
+	ACPI_FUNCTION_TRACE("is_device_present");
+
+	status = acpi_get_handle(handle, "_STA", &temp);
+	if (ACPI_FAILURE(status))
+		return_VALUE(1); /* _STA not found, assmue device present */
+
+	status = acpi_evaluate_integer(handle, "_STA", NULL, &sta);
+	if (ACPI_FAILURE(status))
+		return_VALUE(0); /* Firmware error */
+
+	return_VALUE((sta & ACPI_STA_PRESENT) == ACPI_STA_PRESENT);
+}
+
+/*******************************************************************/
+static int
+acpi_container_add(struct acpi_device *device)
+{
+	struct acpi_container *container;
+
+	ACPI_FUNCTION_TRACE("acpi_container_add");
+
+	if (!device) {
+		ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "device is NULL\n"));
+		return_VALUE(-EINVAL);
+	}
+
+	container = kmalloc(sizeof(struct acpi_container), GFP_KERNEL);
+	if(!container)
+		return_VALUE(-ENOMEM);
+	
+	memset(container, 0, sizeof(struct acpi_container));
+	container->handle = device->handle;
+	strcpy(acpi_device_name(device), ACPI_CONTAINER_DEVICE_NAME);
+	strcpy(acpi_device_class(device), ACPI_CONTAINER_CLASS);
+	acpi_driver_data(device) = container;
+
+	ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device <%s> bid <%s>\n",	\
+		acpi_device_name(device), acpi_device_bid(device)));
+
+
+	return_VALUE(0);
+}
+
+static int
+acpi_container_remove(struct acpi_device *device, int type)
+{
+	acpi_status		status = AE_OK;
+	struct acpi_container	*pc = NULL;
+	pc = (struct acpi_container*) acpi_driver_data(device);
+
+	if (pc)
+		kfree(pc);
+
+	return status;
+}
+
+
+static int
+container_device_add(struct acpi_device **device, acpi_handle handle)
+{
+	acpi_handle phandle;
+	struct acpi_device *pdev;
+	int result;
+
+	ACPI_FUNCTION_TRACE("container_device_add");
+
+	if (acpi_get_parent(handle, &phandle)) {
+		return_VALUE(-ENODEV);
+	}
+
+	if (acpi_bus_get_device(phandle, &pdev)) {
+		return_VALUE(-ENODEV);
+	}
+
+	if (acpi_bus_add(device, pdev, handle, ACPI_BUS_TYPE_DEVICE)) {
+		return_VALUE(-ENODEV);
+	}
+
+	result = acpi_bus_scan(*device);
+
+	return_VALUE(result);
+}
+
+static void
+container_notify_cb(acpi_handle handle, u32 type, void *context)
+{
+	struct acpi_device		*device = NULL;
+	int result;
+	int present;
+	acpi_status status;
+
+	ACPI_FUNCTION_TRACE("container_notify_cb");
+
+	present = is_device_present(handle);
+	
+	switch (type) {
+	case ACPI_NOTIFY_BUS_CHECK:
+		/* Fall through */
+	case ACPI_NOTIFY_DEVICE_CHECK:
+		printk("Container driver received %s event\n",
+			(type == ACPI_NOTIFY_BUS_CHECK)?
+			"ACPI_NOTIFY_BUS_CHECK":"ACPI_NOTIFY_DEVICE_CHECK");
+		if (present) {
+			status = acpi_bus_get_device(handle, &device);
+			if (ACPI_FAILURE(status) || !device) {
+				result = container_device_add(&device, handle);
+				if (!result)
+					kobject_hotplug(&device->kobj, KOBJ_ONLINE);
+			} else {
+				/* device exist and this is a remove request */
+				kobject_hotplug(&device->kobj, KOBJ_OFFLINE);
+			}
+		}
+		break;
+	case ACPI_NOTIFY_EJECT_REQUEST:
+		if (!acpi_bus_get_device(handle, &device) && device) {
+			kobject_hotplug(&device->kobj, KOBJ_OFFLINE);
+		}
+		break;
+	default:
+		break;
+	}
+	return_VOID;
+}
+
+static acpi_status
+container_walk_namespace_cb(acpi_handle handle,
+	u32 lvl,
+	void *context,
+	void **rv)
+{
+	char 				*hid = NULL;
+	struct acpi_buffer 		buffer = {ACPI_ALLOCATE_BUFFER, NULL};
+	struct acpi_device_info 	*info;
+	acpi_status 			status;
+	int 				*action = context;
+
+	ACPI_FUNCTION_TRACE("container_walk_namespace_cb");
+
+	status = acpi_get_object_info(handle, &buffer);
+	if (ACPI_FAILURE(status) || !buffer.pointer) {
+		return_ACPI_STATUS(AE_OK);
+	}
+
+	info = buffer.pointer;
+	if (info->valid & ACPI_VALID_HID)
+		hid = info->hardware_id.value;
+
+	if (hid == NULL) {
+		goto end;
+	}
+
+	if (strcmp(hid, "ACPI0004") && strcmp(hid, "PNP0A05") &&
+			strcmp(hid, "PNP0A06")) {
+		goto end;
+	}
+
+	switch(*action) {
+	case INSTALL_NOTIFY_HANDLER:
+		acpi_install_notify_handler(handle,
+			ACPI_SYSTEM_NOTIFY,
+			container_notify_cb,
+			NULL);
+		break;
+	case UNINSTALL_NOTIFY_HANDLER:
+		acpi_remove_notify_handler(handle,
+			ACPI_SYSTEM_NOTIFY,
+			container_notify_cb);
+		break;
+	default:
+		break;
+	}
+
+end:
+	acpi_os_free(buffer.pointer);
+
+	return_ACPI_STATUS(AE_OK);
+}
+
+
+int __init
+acpi_container_init(void)
+{
+	int	result = 0;
+	int	action = INSTALL_NOTIFY_HANDLER;
+
+	result = acpi_bus_register_driver(&acpi_container_driver);
+	if (result < 0) {
+		return(result);
+	}
+
+	/* register notify handler to every container device */
+	acpi_walk_namespace(ACPI_TYPE_DEVICE,
+				     ACPI_ROOT_OBJECT,
+				     ACPI_UINT32_MAX,
+				     container_walk_namespace_cb,
+				     &action, NULL);
+
+	return(0);
+}
+
+void __exit
+acpi_container_exit(void)
+{
+	int			action = UNINSTALL_NOTIFY_HANDLER;
+
+	ACPI_FUNCTION_TRACE("acpi_container_exit");
+
+	acpi_walk_namespace(ACPI_TYPE_DEVICE,
+				     ACPI_ROOT_OBJECT,
+				     ACPI_UINT32_MAX,
+				     container_walk_namespace_cb,
+				     &action, NULL);
+
+	acpi_bus_unregister_driver(&acpi_container_driver);
+
+	return_VOID;
+}
+
+module_init(acpi_container_init);
+module_exit(acpi_container_exit);
diff -Nru a/drivers/acpi/dispatcher/dsopcode.c b/drivers/acpi/dispatcher/dsopcode.c
--- a/drivers/acpi/dispatcher/dsopcode.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/acpi/dispatcher/dsopcode.c	2005-01-10 20:11:21 -08:00
@@ -762,9 +762,8 @@
  *
  * RETURN:      Status
  *
- * DESCRIPTION: Get the operands and complete the following data objec types:
- *              Buffer
- *              Package
+ * DESCRIPTION: Get the operands and complete the following data object types:
+ *              Buffer, Package.
  *
  ****************************************************************************/
 
diff -Nru a/drivers/acpi/dispatcher/dswexec.c b/drivers/acpi/dispatcher/dswexec.c
--- a/drivers/acpi/dispatcher/dswexec.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/acpi/dispatcher/dswexec.c	2005-01-10 20:11:23 -08:00
@@ -399,16 +399,24 @@
 			goto cleanup;
 		}
 
-		/* Resolve all operands */
+		/*
+		 * All opcodes require operand resolution, with the only exceptions
+		 * being the object_type and size_of operators.
+		 */
+		if (!(walk_state->op_info->flags & AML_NO_OPERAND_RESOLVE)) {
+			/* Resolve all operands */
 
-		status = acpi_ex_resolve_operands (walk_state->opcode,
-				  &(walk_state->operands [walk_state->num_operands -1]),
-				  walk_state);
-		if (ACPI_SUCCESS (status)) {
-			ACPI_DUMP_OPERANDS (ACPI_WALK_OPERANDS, ACPI_IMODE_EXECUTE,
-					  acpi_ps_get_opcode_name (walk_state->opcode),
-					  walk_state->num_operands, "after ex_resolve_operands");
+			status = acpi_ex_resolve_operands (walk_state->opcode,
+					  &(walk_state->operands [walk_state->num_operands -1]),
+					  walk_state);
+			if (ACPI_SUCCESS (status)) {
+				ACPI_DUMP_OPERANDS (ACPI_WALK_OPERANDS, ACPI_IMODE_EXECUTE,
+						  acpi_ps_get_opcode_name (walk_state->opcode),
+						  walk_state->num_operands, "after ex_resolve_operands");
+			}
+		}
 
+		if (ACPI_SUCCESS (status)) {
 			/*
 			 * Dispatch the request to the appropriate interpreter handler
 			 * routine.  There is one routine per opcode "type" based upon the
diff -Nru a/drivers/acpi/ec.c b/drivers/acpi/ec.c
--- a/drivers/acpi/ec.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/acpi/ec.c	2005-01-10 20:11:19 -08:00
@@ -442,6 +442,8 @@
 	int			result = 0;
 	struct acpi_ec		*ec = NULL;
 	u32			temp = 0;
+	acpi_integer		f_v = 0;
+	int 			i = 0;
 
 	ACPI_FUNCTION_TRACE("acpi_ec_space_handler");
 
@@ -456,6 +458,7 @@
 
 	ec = (struct acpi_ec *) handler_context;
 
+next_byte:
 	switch (function) {
 	case ACPI_READ:
 		result = acpi_ec_read(ec, (u8) address, &temp);
@@ -466,9 +469,29 @@
 		break;
 	default:
 		result = -EINVAL;
+		goto out;
 		break;
 	}
 
+	bit_width -= 8;
+	if(bit_width){
+
+		if(function == ACPI_READ)
+			f_v |= (acpi_integer) (*value) << 8*i;
+		if(function == ACPI_WRITE)
+			(*value) >>=8; 
+		i++;
+		goto next_byte;
+	}
+
+
+	if(function == ACPI_READ){
+		f_v |= (acpi_integer) (*value) << 8*i;
+		*value = f_v;
+	}
+
+		
+out:
 	switch (result) {
 	case -EINVAL:
 		return_VALUE(AE_BAD_PARAMETER);
@@ -482,6 +505,7 @@
 	default:
 		return_VALUE(AE_OK);
 	}
+	
 
 }
 
@@ -599,7 +623,7 @@
 
 	ec->handle = device->handle;
 	ec->uid = -1;
-	ec->lock = SPIN_LOCK_UNLOCKED;
+	spin_lock_init(&ec->lock);
 	strcpy(acpi_device_name(device), ACPI_EC_DEVICE_NAME);
 	strcpy(acpi_device_class(device), ACPI_EC_CLASS);
 	acpi_driver_data(device) = ec;
@@ -787,9 +811,81 @@
 	return_VALUE(0);
 }
 
+static acpi_status __init
+acpi_fake_ecdt_callback (
+	acpi_handle	handle,
+	u32		Level,
+	void		*context,
+	void		**retval)
+{
+	acpi_status	status;
 
-int __init
-acpi_ec_ecdt_probe (void)
+	status = acpi_walk_resources(handle, METHOD_NAME__CRS,
+		acpi_ec_io_ports, ec_ecdt);
+	if (ACPI_FAILURE(status))
+		return status;
+	ec_ecdt->status_addr = ec_ecdt->command_addr;
+
+	ec_ecdt->uid = -1;
+	acpi_evaluate_integer(handle, "_UID", NULL, &ec_ecdt->uid);
+
+	status = acpi_evaluate_integer(handle, "_GPE", NULL, &ec_ecdt->gpe_bit);
+	if (ACPI_FAILURE(status))
+		return status;
+	ec_ecdt->lock = SPIN_LOCK_UNLOCKED;
+	ec_ecdt->global_lock = TRUE;
+	ec_ecdt->handle = handle;
+
+	printk(KERN_INFO PREFIX  "GPE=0x%02x, ports=0x%2x, 0x%2x\n",
+		(u32) ec_ecdt->gpe_bit, (u32) ec_ecdt->command_addr.address,
+		(u32) ec_ecdt->data_addr.address);
+
+	return AE_CTRL_TERMINATE;
+}
+
+/*
+ * Some BIOS (such as some from Gateway laptops) access EC region very early
+ * such as in BAT0._INI or EC._INI before an EC device is found and
+ * do not provide an ECDT. According to ACPI spec, ECDT isn't mandatorily
+ * required, but if EC regison is accessed early, it is required.
+ * The routine tries to workaround the BIOS bug by pre-scan EC device
+ * It assumes that _CRS, _HID, _GPE, _UID methods of EC don't touch any
+ * op region (since _REG isn't invoked yet). The assumption is true for
+ * all systems found.
+ */
+static int __init
+acpi_ec_fake_ecdt(void)
+{
+	acpi_status	status;
+	int		ret = 0;
+
+	printk(KERN_INFO PREFIX "Try to make an fake ECDT\n");
+
+	ec_ecdt = kmalloc(sizeof(struct acpi_ec), GFP_KERNEL);
+	if (!ec_ecdt) {
+		ret = -ENOMEM;
+		goto error;
+	}
+	memset(ec_ecdt, 0, sizeof(struct acpi_ec));
+
+	status = acpi_get_devices (ACPI_EC_HID,
+				acpi_fake_ecdt_callback,
+				NULL,
+				NULL);
+	if (ACPI_FAILURE(status)) {
+		kfree(ec_ecdt);
+		ec_ecdt = NULL;
+		ret = -ENODEV;
+		goto error;
+	}
+	return 0;
+error:
+	printk(KERN_ERR PREFIX "Can't make an fake ECDT\n");
+	return ret;
+}
+
+static int __init
+acpi_ec_get_real_ecdt(void)
 {
 	acpi_status		status;
 	struct acpi_table_ecdt 	*ecdt_ptr;
@@ -797,11 +893,11 @@
 	status = acpi_get_firmware_table("ECDT", 1, ACPI_LOGICAL_ADDRESSING, 
 		(struct acpi_table_header **) &ecdt_ptr);
 	if (ACPI_FAILURE(status))
-		return 0;
+		return -ENODEV;
 
 	printk(KERN_INFO PREFIX "Found ECDT\n");
 
-	 /*
+	/*
 	 * Generate a temporary ec context to use until the namespace is scanned
 	 */
 	ec_ecdt = kmalloc(sizeof(struct acpi_ec), GFP_KERNEL);
@@ -813,7 +909,7 @@
 	ec_ecdt->status_addr = ecdt_ptr->ec_control;
 	ec_ecdt->data_addr = ecdt_ptr->ec_data;
 	ec_ecdt->gpe_bit = ecdt_ptr->gpe_bit;
-	ec_ecdt->lock = SPIN_LOCK_UNLOCKED;
+	spin_lock_init(&ec_ecdt->lock);
 	/* use the GL just to be safe */
 	ec_ecdt->global_lock = TRUE;
 	ec_ecdt->uid = ecdt_ptr->uid;
@@ -823,6 +919,31 @@
 		goto error;
 	}
 
+	return 0;
+error:
+	printk(KERN_ERR PREFIX "Could not use ECDT\n");
+	kfree(ec_ecdt);
+	ec_ecdt = NULL;
+
+	return -ENODEV;
+}
+
+static int __initdata acpi_fake_ecdt_enabled;
+int __init
+acpi_ec_ecdt_probe (void)
+{
+	acpi_status		status;
+	int			ret;
+
+	ret = acpi_ec_get_real_ecdt();
+	/* Try to make a fake ECDT */
+	if (ret && acpi_fake_ecdt_enabled) {
+		ret = acpi_ec_fake_ecdt();
+	}
+
+	if (ret)
+		return 0;
+
 	/*
 	 * Install GPE handler
 	 */
@@ -895,3 +1016,9 @@
 }
 #endif /* 0 */
 
+static int __init acpi_fake_ecdt_setup(char *str)
+{
+	acpi_fake_ecdt_enabled = 1;
+	return 0;
+}
+__setup("acpi_fake_ecdt", acpi_fake_ecdt_setup);
diff -Nru a/drivers/acpi/events/evgpe.c b/drivers/acpi/events/evgpe.c
--- a/drivers/acpi/events/evgpe.c	2005-01-10 20:11:24 -08:00
+++ b/drivers/acpi/events/evgpe.c	2005-01-10 20:11:24 -08:00
@@ -605,8 +605,8 @@
 	if ((gpe_event_info->flags & ACPI_GPE_XRUPT_TYPE_MASK) == ACPI_GPE_EDGE_TRIGGERED) {
 		status = acpi_hw_clear_gpe (gpe_event_info);
 		if (ACPI_FAILURE (status)) {
-			ACPI_REPORT_ERROR (("acpi_ev_gpe_dispatch: Unable to clear GPE[%2X]\n",
-				gpe_number));
+			ACPI_REPORT_ERROR (("acpi_ev_gpe_dispatch: %s, Unable to clear GPE[%2X]\n",
+				acpi_format_exception (status), gpe_number));
 			return_VALUE (ACPI_INTERRUPT_NOT_HANDLED);
 		}
 	}
@@ -643,8 +643,8 @@
 			status = acpi_hw_clear_gpe (gpe_event_info);
 			if (ACPI_FAILURE (status)) {
 				ACPI_REPORT_ERROR ((
-					"acpi_ev_gpe_dispatch: Unable to clear GPE[%2X]\n",
-					gpe_number));
+					"acpi_ev_gpe_dispatch: %s, Unable to clear GPE[%2X]\n",
+					acpi_format_exception (status), gpe_number));
 				return_VALUE (ACPI_INTERRUPT_NOT_HANDLED);
 			}
 		}
@@ -659,8 +659,8 @@
 		status = acpi_ev_disable_gpe (gpe_event_info);
 		if (ACPI_FAILURE (status)) {
 			ACPI_REPORT_ERROR ((
-				"acpi_ev_gpe_dispatch: Unable to disable GPE[%2X]\n",
-				gpe_number));
+				"acpi_ev_gpe_dispatch: %s, Unable to disable GPE[%2X]\n",
+				acpi_format_exception (status), gpe_number));
 			return_VALUE (ACPI_INTERRUPT_NOT_HANDLED);
 		}
 
@@ -668,12 +668,12 @@
 		 * Execute the method associated with the GPE
 		 * NOTE: Level-triggered GPEs are cleared after the method completes.
 		 */
-		if (ACPI_FAILURE (acpi_os_queue_for_execution (OSD_PRIORITY_GPE,
-				 acpi_ev_asynch_execute_gpe_method,
-				 gpe_event_info))) {
+		status = acpi_os_queue_for_execution (OSD_PRIORITY_GPE,
+				 acpi_ev_asynch_execute_gpe_method, gpe_event_info);
+		if (ACPI_FAILURE (status)) {
 			ACPI_REPORT_ERROR ((
-				"acpi_ev_gpe_dispatch: Unable to queue handler for GPE[%2X], event is disabled\n",
-				gpe_number));
+				"acpi_ev_gpe_dispatch: %s, Unable to queue handler for GPE[%2X] - event disabled\n",
+				acpi_format_exception (status), gpe_number));
 		}
 		break;
 
@@ -692,8 +692,8 @@
 		status = acpi_ev_disable_gpe (gpe_event_info);
 		if (ACPI_FAILURE (status)) {
 			ACPI_REPORT_ERROR ((
-				"acpi_ev_gpe_dispatch: Unable to disable GPE[%2X]\n",
-				gpe_number));
+				"acpi_ev_gpe_dispatch: %s, Unable to disable GPE[%2X]\n",
+				acpi_format_exception (status), gpe_number));
 			return_VALUE (ACPI_INTERRUPT_NOT_HANDLED);
 		}
 		break;
diff -Nru a/drivers/acpi/events/evxfevnt.c b/drivers/acpi/events/evxfevnt.c
--- a/drivers/acpi/events/evxfevnt.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/acpi/events/evxfevnt.c	2005-01-10 20:11:17 -08:00
@@ -435,7 +435,7 @@
  * DESCRIPTION: Clear an ACPI event (fixed)
  *
  ******************************************************************************/
-#ifdef ACPI_FUTURE_USAGE
+
 acpi_status
 acpi_clear_event (
 	u32                             event)
@@ -462,7 +462,6 @@
 	return_ACPI_STATUS (status);
 }
 EXPORT_SYMBOL(acpi_clear_event);
-#endif  /*  ACPI_FUTURE_USAGE  */
 
 
 /*******************************************************************************
diff -Nru a/drivers/acpi/executer/exconfig.c b/drivers/acpi/executer/exconfig.c
--- a/drivers/acpi/executer/exconfig.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/acpi/executer/exconfig.c	2005-01-10 20:11:20 -08:00
@@ -95,7 +95,7 @@
 
 	ACPI_MEMSET (&table_info, 0, sizeof (struct acpi_table_desc));
 
-	table_info.type        = 5;
+	table_info.type        = ACPI_TABLE_SSDT;
 	table_info.pointer     = table;
 	table_info.length      = (acpi_size) table->length;
 	table_info.allocation  = ACPI_MEM_ALLOCATED;
diff -Nru a/drivers/acpi/executer/exconvrt.c b/drivers/acpi/executer/exconvrt.c
--- a/drivers/acpi/executer/exconvrt.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/acpi/executer/exconvrt.c	2005-01-10 20:11:16 -08:00
@@ -115,12 +115,6 @@
 	 */
 	result = 0;
 
-	/* Transfer no more than an integer's worth of data */
-
-	if (count > acpi_gbl_integer_byte_width) {
-		count = acpi_gbl_integer_byte_width;
-	}
-
 	/*
 	 * String conversion is different than Buffer conversion
 	 */
@@ -142,6 +136,12 @@
 
 	case ACPI_TYPE_BUFFER:
 
+		/* Transfer no more than an integer's worth of data */
+
+		if (count > acpi_gbl_integer_byte_width) {
+			count = acpi_gbl_integer_byte_width;
+		}
+
 		/*
 		 * Convert buffer to an integer - we simply grab enough raw data
 		 * from the buffer to fill an integer
@@ -173,6 +173,7 @@
 	/* Save the Result */
 
 	return_desc->integer.value = result;
+	acpi_ex_truncate_for32bit_table (return_desc);
 	*result_desc = return_desc;
 	return_ACPI_STATUS (AE_OK);
 }
@@ -398,9 +399,9 @@
 {
 	union acpi_operand_object       *return_desc;
 	u8                              *new_buf;
+	u32                             i;
 	u32                             string_length = 0;
 	u16                             base = 16;
-	u32                             i;
 	u8                              separator = ',';
 
 
@@ -460,6 +461,8 @@
 
 	case ACPI_TYPE_BUFFER:
 
+		/* Setup string length, base, and separator */
+
 		switch (type) {
 		case ACPI_EXPLICIT_CONVERT_DECIMAL: /* Used by to_decimal_string operator */
 			/*
@@ -467,9 +470,23 @@
 			 * decimal values separated by commas."
 			 */
 			base = 10;
-			string_length = obj_desc->buffer.length; /* 4 chars for each decimal */
 
-			/*lint -fallthrough */
+			/*
+			 * Calculate the final string length.  Individual string values
+			 * are variable length (include separator for each)
+			 */
+			for (i = 0; i < obj_desc->buffer.length; i++) {
+				if (obj_desc->buffer.pointer[i] >= 100) {
+					string_length += 4;
+				}
+				else if (obj_desc->buffer.pointer[i] >= 10) {
+					string_length += 3;
+				}
+				else {
+					string_length += 2;
+				}
+			}
+			break;
 
 		case ACPI_IMPLICIT_CONVERT_HEX:
 			/*
@@ -477,55 +494,56 @@
 			 *"The entire contents of the buffer are converted to a string of
 			 * two-character hexadecimal numbers, each separated by a space."
 			 */
-			if (type == ACPI_IMPLICIT_CONVERT_HEX) {
-				separator = ' ';
-			}
-
-			/*lint -fallthrough */
+			separator = ' ';
+			string_length = (obj_desc->buffer.length * 3);
+			break;
 
 		case ACPI_EXPLICIT_CONVERT_HEX:     /* Used by to_hex_string operator */
 			/*
 			 * From ACPI: "If Data is a buffer, it is converted to a string of
 			 * hexadecimal values separated by commas."
 			 */
-			string_length += (obj_desc->buffer.length * 3);
-			if (string_length > ACPI_MAX_STRING_CONVERSION) /* ACPI limit */ {
-				return_ACPI_STATUS (AE_AML_STRING_LIMIT);
-			}
-
-			/* Create a new string object and string buffer */
-
-			return_desc = acpi_ut_create_string_object ((acpi_size) string_length -1);
-			if (!return_desc) {
-				return_ACPI_STATUS (AE_NO_MEMORY);
-			}
+			string_length = (obj_desc->buffer.length * 3);
+			break;
 
-			new_buf = return_desc->buffer.pointer;
+		default:
+			return_ACPI_STATUS (AE_BAD_PARAMETER);
+		}
 
-			/*
-			 * Convert buffer bytes to hex or decimal values
-			 * (separated by commas)
-			 */
-			for (i = 0; i < obj_desc->buffer.length; i++) {
-				new_buf += acpi_ex_convert_to_ascii (
-						 (acpi_integer) obj_desc->buffer.pointer[i], base,
-						 new_buf, 1);
-				*new_buf++ = separator; /* each separated by a comma or space */
-			}
+		/*
+		 * Perform the conversion.
+		 * (-1 because of extra separator included in string_length from above)
+		 */
+		string_length--;
+		if (string_length > ACPI_MAX_STRING_CONVERSION) /* ACPI limit */ {
+			return_ACPI_STATUS (AE_AML_STRING_LIMIT);
+		}
 
-			/* Null terminate the string (overwrites final comma from above) */
+		/*
+		 * Create a new string object and string buffer
+		 */
+		return_desc = acpi_ut_create_string_object ((acpi_size) string_length);
+		if (!return_desc) {
+			return_ACPI_STATUS (AE_NO_MEMORY);
+		}
 
-			new_buf--;
-			*new_buf = 0;
+		new_buf = return_desc->buffer.pointer;
 
-			/* Recalculate length */
+		/*
+		 * Convert buffer bytes to hex or decimal values
+		 * (separated by commas or spaces)
+		 */
+		for (i = 0; i < obj_desc->buffer.length; i++) {
+			new_buf += acpi_ex_convert_to_ascii (
+					 (acpi_integer) obj_desc->buffer.pointer[i], base,
+					 new_buf, 1);
+			*new_buf++ = separator; /* each separated by a comma or space */
+		}
 
-			return_desc->string.length = ACPI_STRLEN (return_desc->string.pointer);
-			break;
+		/* Null terminate the string (overwrites final comma/space from above) */
 
-		default:
-			return_ACPI_STATUS (AE_BAD_PARAMETER);
-		}
+		new_buf--;
+		*new_buf = 0;
 		break;
 
 	default:
diff -Nru a/drivers/acpi/executer/exdump.c b/drivers/acpi/executer/exdump.c
--- a/drivers/acpi/executer/exdump.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/acpi/executer/exdump.c	2005-01-10 20:11:16 -08:00
@@ -110,10 +110,12 @@
 	/* obj_desc is a valid object */
 
 	if (depth > 0) {
-		ACPI_DEBUG_PRINT_RAW ((ACPI_DB_EXEC, "%*s[%u] ", depth, " ", depth));
+		ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%*s[%u] %p ",
+			depth, " ", depth, obj_desc));
+	}
+	else {
+		ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%p ", obj_desc));
 	}
-	ACPI_DEBUG_PRINT_RAW ((ACPI_DB_EXEC, "%p ", obj_desc));
-
 
 	switch (ACPI_GET_OBJECT_TYPE (obj_desc)) {
 	case ACPI_TYPE_LOCAL_REFERENCE:
@@ -712,9 +714,6 @@
 		acpi_ex_out_integer ("bit_length",  obj_desc->common_field.bit_length);
 		acpi_ex_out_integer ("fld_bit_offset", obj_desc->common_field.start_field_bit_offset);
 		acpi_ex_out_integer ("base_byte_offset", obj_desc->common_field.base_byte_offset);
-		acpi_ex_out_integer ("datum_valid_bits", obj_desc->common_field.datum_valid_bits);
-		acpi_ex_out_integer ("end_fld_valid_bits",obj_desc->common_field.end_field_valid_bits);
-		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)) {
diff -Nru a/drivers/acpi/executer/exfldio.c b/drivers/acpi/executer/exfldio.c
--- a/drivers/acpi/executer/exfldio.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/acpi/executer/exfldio.c	2005-01-10 20:11:17 -08:00
@@ -612,210 +612,6 @@
 
 /*******************************************************************************
  *
- * FUNCTION:    acpi_ex_get_buffer_datum
- *
- * PARAMETERS:  Datum               - Where the Datum is returned
- *              Buffer              - Raw field buffer
- *              buffer_length       - Entire length (used for big-endian only)
- *              byte_granularity    - 1/2/4/8 Granularity of the field
- *                                    (aka Datum Size)
- *              buffer_offset       - Datum offset into the buffer
- *
- * RETURN:      none
- *
- * DESCRIPTION: Get a datum from the buffer according to the buffer field
- *              byte granularity
- *
- ******************************************************************************/
-
-void
-acpi_ex_get_buffer_datum (
-	acpi_integer                    *datum,
-	void                            *buffer,
-	u32                             buffer_length,
-	u32                             byte_granularity,
-	u32                             buffer_offset)
-{
-	u32                             index;
-
-
-	ACPI_FUNCTION_TRACE_U32 ("ex_get_buffer_datum", byte_granularity);
-
-
-	/* Get proper index into buffer (handles big/little endian) */
-
-	index = ACPI_BUFFER_INDEX (buffer_length, buffer_offset, byte_granularity);
-
-	/* Move the requested number of bytes */
-
-	switch (byte_granularity) {
-	case ACPI_FIELD_BYTE_GRANULARITY:
-
-		*datum = ((u8 *) buffer) [index];
-		break;
-
-	case ACPI_FIELD_WORD_GRANULARITY:
-
-		ACPI_MOVE_16_TO_64 (datum, &(((u16 *) buffer) [index]));
-		break;
-
-	case ACPI_FIELD_DWORD_GRANULARITY:
-
-		ACPI_MOVE_32_TO_64 (datum, &(((u32 *) buffer) [index]));
-		break;
-
-	case ACPI_FIELD_QWORD_GRANULARITY:
-
-		ACPI_MOVE_64_TO_64 (datum, &(((u64 *) buffer) [index]));
-		break;
-
-	default:
-		/* Should not get here */
-		break;
-	}
-
-	return_VOID;
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION:    acpi_ex_set_buffer_datum
- *
- * PARAMETERS:  merged_datum        - Value to store
- *              Buffer              - Receiving buffer
- *              buffer_length       - Entire length (used for big-endian only)
- *              byte_granularity    - 1/2/4/8 Granularity of the field
- *                                    (aka Datum Size)
- *              buffer_offset       - Datum offset into the buffer
- *
- * RETURN:      none
- *
- * DESCRIPTION: Store the merged datum to the buffer according to the
- *              byte granularity
- *
- ******************************************************************************/
-
-void
-acpi_ex_set_buffer_datum (
-	acpi_integer                    merged_datum,
-	void                            *buffer,
-	u32                             buffer_length,
-	u32                             byte_granularity,
-	u32                             buffer_offset)
-{
-	u32                             index;
-
-
-	ACPI_FUNCTION_TRACE_U32 ("ex_set_buffer_datum", byte_granularity);
-
-
-	/* Get proper index into buffer (handles big/little endian) */
-
-	index = ACPI_BUFFER_INDEX (buffer_length, buffer_offset, byte_granularity);
-
-	/* Move the requested number of bytes */
-
-	switch (byte_granularity) {
-	case ACPI_FIELD_BYTE_GRANULARITY:
-
-		((u8 *) buffer) [index] = (u8) merged_datum;
-		break;
-
-	case ACPI_FIELD_WORD_GRANULARITY:
-
-		ACPI_MOVE_64_TO_16 (&(((u16 *) buffer)[index]), &merged_datum);
-		break;
-
-	case ACPI_FIELD_DWORD_GRANULARITY:
-
-		ACPI_MOVE_64_TO_32 (&(((u32 *) buffer)[index]), &merged_datum);
-		break;
-
-	case ACPI_FIELD_QWORD_GRANULARITY:
-
-		ACPI_MOVE_64_TO_64 (&(((u64 *) buffer)[index]), &merged_datum);
-		break;
-
-	default:
-		/* Should not get here */
-		break;
-	}
-
-	return_VOID;
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION:    acpi_ex_common_buffer_setup
- *
- * PARAMETERS:  obj_desc            - Field object
- *              buffer_length       - Length of caller's buffer
- *              datum_count         - Where the datum_count is returned
- *
- * RETURN:      Status, datum_count
- *
- * DESCRIPTION: Common code to validate the incoming buffer size and compute
- *              the number of field "datums" that must be read or written.
- *              A "datum" is the smallest unit that can be read or written
- *              to the field, it is either 1,2,4, or 8 bytes.
- *
- ******************************************************************************/
-
-acpi_status
-acpi_ex_common_buffer_setup (
-	union acpi_operand_object       *obj_desc,
-	u32                             buffer_length,
-	u32                             *datum_count)
-{
-	u32                             byte_field_length;
-	u32                             actual_byte_field_length;
-
-
-	ACPI_FUNCTION_TRACE ("ex_common_buffer_setup");
-
-
-	/*
-	 * Incoming buffer must be at least as long as the field, we do not
-	 * allow "partial" field reads/writes.  We do not care if the buffer is
-	 * larger than the field, this typically happens when an integer is
-	 * read/written to a field that is actually smaller than an integer.
-	 */
-	byte_field_length = ACPI_ROUND_BITS_UP_TO_BYTES (
-			 obj_desc->common_field.bit_length);
-	if (byte_field_length > buffer_length) {
-		ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
-			"Field size %X (bytes) is too large for buffer (%X)\n",
-			byte_field_length, buffer_length));
-
-		return_ACPI_STATUS (AE_BUFFER_OVERFLOW);
-	}
-
-	/*
-	 * Create "actual" field byte count (minimum number of bytes that
-	 * must be read), then convert to datum count (minimum number
-	 * of datum-sized units that must be read)
-	 */
-	actual_byte_field_length = ACPI_ROUND_BITS_UP_TO_BYTES (
-			  obj_desc->common_field.start_field_bit_offset +
-			  obj_desc->common_field.bit_length);
-
-
-	*datum_count = ACPI_ROUND_UP_TO (actual_byte_field_length,
-			   obj_desc->common_field.access_byte_width);
-
-	ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
-		"buffer_bytes %X, actual_bytes %X, Datums %X, byte_gran %X\n",
-		byte_field_length, actual_byte_field_length,
-		*datum_count, obj_desc->common_field.access_byte_width));
-
-	return_ACPI_STATUS (AE_OK);
-}
-
-
-/*******************************************************************************
- *
  * FUNCTION:    acpi_ex_extract_from_field
  *
  * PARAMETERS:  obj_desc            - Field to be read
@@ -835,128 +631,92 @@
 	u32                             buffer_length)
 {
 	acpi_status                     status;
-	u32                             field_datum_byte_offset;
-	u32                             buffer_datum_offset;
-	acpi_integer                    previous_raw_datum = 0;
-	acpi_integer                    this_raw_datum = 0;
-	acpi_integer                    merged_datum = 0;
+	acpi_integer                    raw_datum;
+	acpi_integer                    merged_datum;
+	u32                             field_offset = 0;
+	u32                             buffer_offset = 0;
+	u32                             buffer_tail_bits;
 	u32                             datum_count;
+	u32                             field_datum_count;
 	u32                             i;
 
 
 	ACPI_FUNCTION_TRACE ("ex_extract_from_field");
 
 
-	/* Validate buffer, compute number of datums */
+	/* Validate target buffer and clear it */
 
-	status = acpi_ex_common_buffer_setup (obj_desc, buffer_length, &datum_count);
-	if (ACPI_FAILURE (status)) {
-		return_ACPI_STATUS (status);
-	}
+	if (buffer_length < ACPI_ROUND_BITS_UP_TO_BYTES (
+			 obj_desc->common_field.bit_length)) {
+		ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
+			"Field size %X (bits) is too large for buffer (%X)\n",
+			obj_desc->common_field.bit_length, buffer_length));
 
-	/*
-	 * Clear the caller's buffer (the whole buffer length as given)
-	 * This is very important, especially in the cases where the buffer
-	 * is longer than the size of the field.
-	 */
+		return_ACPI_STATUS (AE_BUFFER_OVERFLOW);
+	}
 	ACPI_MEMSET (buffer, 0, buffer_length);
 
-	field_datum_byte_offset = 0;
-	buffer_datum_offset= 0;
-
-	/* Read the entire field */
+	/* Compute the number of datums (access width data items) */
 
-	for (i = 0; i < datum_count; i++) {
-		status = acpi_ex_field_datum_io (obj_desc, field_datum_byte_offset,
-				  &this_raw_datum, ACPI_READ);
-		if (ACPI_FAILURE (status)) {
-			return_ACPI_STATUS (status);
-		}
+	datum_count = ACPI_ROUND_UP_TO (
+			   obj_desc->common_field.bit_length,
+			   obj_desc->common_field.access_bit_width);
+	field_datum_count = ACPI_ROUND_UP_TO (
+			   obj_desc->common_field.bit_length +
+			   obj_desc->common_field.start_field_bit_offset,
+			   obj_desc->common_field.access_bit_width);
 
-		/* We might actually be done if the request fits in one datum */
+	/* Priming read from the field */
 
-		if ((datum_count == 1) &&
-			(obj_desc->common_field.flags & AOPOBJ_SINGLE_DATUM)) {
-			/* 1) Shift the valid data bits down to start at bit 0 */
+	status = acpi_ex_field_datum_io (obj_desc, field_offset, &raw_datum, ACPI_READ);
+	if (ACPI_FAILURE (status)) {
+		return_ACPI_STATUS (status);
+	}
+	merged_datum = raw_datum >> obj_desc->common_field.start_field_bit_offset;
 
-			merged_datum = (this_raw_datum >> obj_desc->common_field.start_field_bit_offset);
+	/* Read the rest of the field */
 
-			/* 2) Mask off any upper unused bits (bits not part of the field) */
+	for (i = 1; i < field_datum_count; i++) {
+		/* Get next input datum from the field */
 
-			if (obj_desc->common_field.end_buffer_valid_bits) {
-				merged_datum &= ACPI_MASK_BITS_ABOVE (obj_desc->common_field.end_buffer_valid_bits);
-			}
+		field_offset += obj_desc->common_field.access_byte_width;
+		status = acpi_ex_field_datum_io (obj_desc, field_offset,
+				  &raw_datum, ACPI_READ);
+		if (ACPI_FAILURE (status)) {
+			return_ACPI_STATUS (status);
+		}
 
-			/* Store the datum to the caller buffer */
+		/* Merge with previous datum if necessary */
 
-			acpi_ex_set_buffer_datum (merged_datum, buffer, buffer_length,
-					obj_desc->common_field.access_byte_width, buffer_datum_offset);
+		merged_datum |= raw_datum <<
+			(obj_desc->common_field.access_bit_width - obj_desc->common_field.start_field_bit_offset);
 
-			return_ACPI_STATUS (AE_OK);
+		if (i == datum_count) {
+			break;
 		}
 
-		/* Special handling for the last datum to ignore extra bits */
+		/* Write merged datum to target buffer */
 
-		if ((i >= (datum_count -1))          &&
-			(obj_desc->common_field.end_field_valid_bits)) {
-			/*
-			 * This is the last iteration of the loop.  We need to clear
-			 * any unused bits (bits that are not part of this field) before
-			 * we store the final merged datum into the caller buffer.
-			 */
-			this_raw_datum &=
-				ACPI_MASK_BITS_ABOVE (obj_desc->common_field.end_field_valid_bits);
-		}
+		ACPI_MEMCPY (((char *) buffer) + buffer_offset, &merged_datum,
+			ACPI_MIN(obj_desc->common_field.access_byte_width,
+					 buffer_length - buffer_offset));
 
-		/*
-		 * Create the (possibly) merged datum to be stored to the caller buffer
-		 */
-		if (obj_desc->common_field.start_field_bit_offset == 0) {
-			/* Field is not skewed and we can just copy the datum */
-
-			acpi_ex_set_buffer_datum (this_raw_datum, buffer, buffer_length,
-					obj_desc->common_field.access_byte_width, buffer_datum_offset);
-			buffer_datum_offset++;
-		}
-		else {
-			/* Not aligned -- on the first iteration, just save the datum */
+		buffer_offset += obj_desc->common_field.access_byte_width;
+		merged_datum = raw_datum >> obj_desc->common_field.start_field_bit_offset;
+	}
 
-			if (i != 0) {
-				/*
-				 * Put together the appropriate bits of the two raw data to make a
-				 * single complete field datum
-				 *
-				 * 1) Normalize the first datum down to bit 0
-				 */
-				merged_datum = (previous_raw_datum >> obj_desc->common_field.start_field_bit_offset);
-
-				/* 2) Insert the second datum "above" the first datum */
-
-				merged_datum |= (this_raw_datum << obj_desc->common_field.datum_valid_bits);
-
-				acpi_ex_set_buffer_datum (merged_datum, buffer, buffer_length,
-						obj_desc->common_field.access_byte_width, buffer_datum_offset);
-				buffer_datum_offset++;
-			}
-
-			/*
-			 * Save the raw datum that was just acquired since it may contain bits
-			 * of the *next* field datum
-			 */
-			previous_raw_datum = this_raw_datum;
-		}
+	/* Mask off any extra bits in the last datum */
 
-		field_datum_byte_offset += obj_desc->common_field.access_byte_width;
+	buffer_tail_bits = obj_desc->common_field.bit_length % obj_desc->common_field.access_bit_width;
+	if (buffer_tail_bits) {
+		merged_datum &= ACPI_MASK_BITS_ABOVE (buffer_tail_bits);
 	}
 
-	/* For non-aligned case, there is one last datum to insert */
-
-	if (obj_desc->common_field.start_field_bit_offset != 0) {
-		merged_datum = (this_raw_datum >> obj_desc->common_field.start_field_bit_offset);
+	/* Write the last datum to the buffer */
 
-		acpi_ex_set_buffer_datum (merged_datum, buffer, buffer_length,
-				obj_desc->common_field.access_byte_width, buffer_datum_offset);
-	}
+	ACPI_MEMCPY (((char *) buffer) + buffer_offset, &merged_datum,
+		ACPI_MIN(obj_desc->common_field.access_byte_width,
+				 buffer_length - buffer_offset));
 
 	return_ACPI_STATUS (AE_OK);
 }
@@ -983,169 +743,91 @@
 	u32                             buffer_length)
 {
 	acpi_status                     status;
-	u32                             field_datum_byte_offset;
-	u32                             datum_offset;
 	acpi_integer                    mask;
 	acpi_integer                    merged_datum;
-	acpi_integer                    previous_raw_datum;
-	acpi_integer                    this_raw_datum;
+	acpi_integer                    raw_datum = 0;
+	u32                             field_offset = 0;
+	u32                             buffer_offset = 0;
+	u32                             buffer_tail_bits;
 	u32                             datum_count;
+	u32                             field_datum_count;
+	u32                             i;
 
 
 	ACPI_FUNCTION_TRACE ("ex_insert_into_field");
 
 
-	/* Validate buffer, compute number of datums */
+	/* Validate input buffer */
 
-	status = acpi_ex_common_buffer_setup (obj_desc, buffer_length, &datum_count);
-	if (ACPI_FAILURE (status)) {
-		return_ACPI_STATUS (status);
+	if (buffer_length < ACPI_ROUND_BITS_UP_TO_BYTES (
+			 obj_desc->common_field.bit_length)) {
+		ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
+			"Field size %X (bits) is too large for buffer (%X)\n",
+			obj_desc->common_field.bit_length, buffer_length));
+
+		return_ACPI_STATUS (AE_BUFFER_OVERFLOW);
 	}
 
-	/*
-	 * Break the request into up to three parts (similar to an I/O request):
-	 * 1) non-aligned part at start
-	 * 2) aligned part in middle
-	 * 3) non-aligned part at the end
-	 */
-	field_datum_byte_offset = 0;
-	datum_offset= 0;
-
-	/* Get a single datum from the caller's buffer */
-
-	acpi_ex_get_buffer_datum (&previous_raw_datum, buffer, buffer_length,
-			obj_desc->common_field.access_byte_width, datum_offset);
-
-	/*
-	 * Part1:
-	 * Write a partial field datum if field does not begin on a datum boundary
-	 * Note: The code in this section also handles the aligned case
-	 *
-	 * Construct Mask with 1 bits where the field is, 0 bits elsewhere
-	 * (Only the bottom 5 bits of bit_length are valid for a shift operation)
-	 *
-	 * Mask off bits that are "below" the field (if any)
-	 */
+	/* Compute the number of datums (access width data items) */
+
 	mask = ACPI_MASK_BITS_BELOW (obj_desc->common_field.start_field_bit_offset);
+	datum_count = ACPI_ROUND_UP_TO (obj_desc->common_field.bit_length,
+			  obj_desc->common_field.access_bit_width);
+	field_datum_count = ACPI_ROUND_UP_TO (obj_desc->common_field.bit_length +
+			   obj_desc->common_field.start_field_bit_offset,
+			   obj_desc->common_field.access_bit_width);
 
-	/* If the field fits in one datum, may need to mask upper bits */
+	/* Get initial Datum from the input buffer */
 
-	if ((obj_desc->common_field.flags & AOPOBJ_SINGLE_DATUM) &&
-		 obj_desc->common_field.end_field_valid_bits) {
-		/* There are bits above the field, mask them off also */
+	ACPI_MEMCPY (&raw_datum, buffer,
+		ACPI_MIN(obj_desc->common_field.access_byte_width,
+				 buffer_length - buffer_offset));
 
-		mask &= ACPI_MASK_BITS_ABOVE (obj_desc->common_field.end_field_valid_bits);
-	}
+	merged_datum = raw_datum << obj_desc->common_field.start_field_bit_offset;
 
-	/* Shift and mask the value into the field position */
+	/* Write the entire field */
 
-	merged_datum = (previous_raw_datum << obj_desc->common_field.start_field_bit_offset);
-	merged_datum &= mask;
+	for (i = 1; i < field_datum_count; i++) {
+		/* Write merged datum to the target field */
 
-	/* Apply the update rule (if necessary) and write the datum to the field */
+		merged_datum &= mask;
+		status = acpi_ex_write_with_update_rule (obj_desc, mask, merged_datum, field_offset);
+		if (ACPI_FAILURE (status)) {
+			return_ACPI_STATUS (status);
+		}
 
-	status = acpi_ex_write_with_update_rule (obj_desc, mask, merged_datum,
-			   field_datum_byte_offset);
-	if (ACPI_FAILURE (status)) {
-		return_ACPI_STATUS (status);
-	}
+		/* Start new output datum by merging with previous input datum */
 
-	/* We just wrote the first datum */
+		field_offset += obj_desc->common_field.access_byte_width;
+		merged_datum = raw_datum >>
+			(obj_desc->common_field.access_bit_width - obj_desc->common_field.start_field_bit_offset);
+		mask = ACPI_INTEGER_MAX;
 
-	datum_offset++;
+		if (i == datum_count) {
+			break;
+		}
 
-	/* If the entire field fits within one datum, we are done. */
+		/* Get the next input datum from the buffer */
 
-	if ((datum_count == 1) &&
-	   (obj_desc->common_field.flags & AOPOBJ_SINGLE_DATUM)) {
-		return_ACPI_STATUS (AE_OK);
+		buffer_offset += obj_desc->common_field.access_byte_width;
+		ACPI_MEMCPY (&raw_datum, ((char *) buffer) + buffer_offset,
+			ACPI_MIN(obj_desc->common_field.access_byte_width,
+					 buffer_length - buffer_offset));
+		merged_datum |= raw_datum << obj_desc->common_field.start_field_bit_offset;
 	}
 
-	/*
-	 * Part2:
-	 * Write the aligned data.
-	 *
-	 * We don't need to worry about the update rule for these data, because
-	 * all of the bits in each datum are part of the field.
-	 *
-	 * The last datum must be special cased because it might contain bits
-	 * that are not part of the field -- therefore the "update rule" must be
-	 * applied in Part3 below.
-	 */
-	while (datum_offset < datum_count) {
-		field_datum_byte_offset += obj_desc->common_field.access_byte_width;
-
-		/*
-		 * Get the next raw buffer datum.  It may contain bits of the previous
-		 * field datum
-		 */
-		acpi_ex_get_buffer_datum (&this_raw_datum, buffer, buffer_length,
-				obj_desc->common_field.access_byte_width, datum_offset);
-
-		/* Create the field datum based on the field alignment */
-
-		if (obj_desc->common_field.start_field_bit_offset != 0) {
-			/*
-			 * Put together appropriate bits of the two raw buffer data to make
-			 * a single complete field datum
-			 */
-			merged_datum =
-				(previous_raw_datum >> obj_desc->common_field.datum_valid_bits) |
-				(this_raw_datum << obj_desc->common_field.start_field_bit_offset);
-		}
-		else {
-			/* Field began aligned on datum boundary */
-
-			merged_datum = this_raw_datum;
-		}
+	/* Mask off any extra bits in the last datum */
 
-		/*
-		 * Special handling for the last datum if the field does NOT end on
-		 * a datum boundary.  Update Rule must be applied to the bits outside
-		 * the field.
-		 */
-		datum_offset++;
-		if ((datum_offset == datum_count) &&
-			(obj_desc->common_field.end_field_valid_bits)) {
-			/*
-			 * If there are dangling non-aligned bits, perform one more merged write
-			 * Else - field is aligned at the end, no need for any more writes
-			 */
-
-			/*
-			 * Part3:
-			 * This is the last datum and the field does not end on a datum boundary.
-			 * Build the partial datum and write with the update rule.
-			 *
-			 * Mask off the unused bits above (after) the end-of-field
-			 */
-			mask = ACPI_MASK_BITS_ABOVE (obj_desc->common_field.end_field_valid_bits);
-			merged_datum &= mask;
-
-			/* Write the last datum with the update rule */
-
-			status = acpi_ex_write_with_update_rule (obj_desc, mask, merged_datum,
-					   field_datum_byte_offset);
-			if (ACPI_FAILURE (status)) {
-				return_ACPI_STATUS (status);
-			}
-		}
-		else {
-			/* Normal (aligned) case -- write the completed datum */
+	buffer_tail_bits = (obj_desc->common_field.bit_length +
+			obj_desc->common_field.start_field_bit_offset) % obj_desc->common_field.access_bit_width;
+	if (buffer_tail_bits) {
+		mask &= ACPI_MASK_BITS_ABOVE (buffer_tail_bits);
+	}
 
-			status = acpi_ex_field_datum_io (obj_desc, field_datum_byte_offset,
-					  &merged_datum, ACPI_WRITE);
-			if (ACPI_FAILURE (status)) {
-				return_ACPI_STATUS (status);
-			}
-		}
+	/* Write the last datum to the field */
 
-		/*
-		 * Save the most recent datum since it may contain bits of the *next*
-		 * field datum.  Update current byte offset.
-		 */
-		previous_raw_datum = this_raw_datum;
-	}
+	merged_datum &= mask;
+	status = acpi_ex_write_with_update_rule (obj_desc, mask, merged_datum, field_offset);
 
 	return_ACPI_STATUS (status);
 }
diff -Nru a/drivers/acpi/executer/exmisc.c b/drivers/acpi/executer/exmisc.c
--- a/drivers/acpi/executer/exmisc.c	2005-01-10 20:11:24 -08:00
+++ b/drivers/acpi/executer/exmisc.c	2005-01-10 20:11:24 -08:00
@@ -389,7 +389,7 @@
 	if (local_operand1 != operand1) {
 		acpi_ut_remove_reference (local_operand1);
 	}
-	return_ACPI_STATUS (AE_OK);
+	return_ACPI_STATUS (status);
 }
 
 
diff -Nru a/drivers/acpi/executer/exoparg1.c b/drivers/acpi/executer/exoparg1.c
--- a/drivers/acpi/executer/exoparg1.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/acpi/executer/exoparg1.c	2005-01-10 20:11:22 -08:00
@@ -507,6 +507,10 @@
 
 		status = acpi_ex_convert_to_string (operand[0], &return_desc,
 				 ACPI_EXPLICIT_CONVERT_DECIMAL);
+		if (return_desc == operand[0]) {
+			/* No conversion performed, add ref to handle return value */
+			acpi_ut_add_reference (return_desc);
+		}
 		break;
 
 
@@ -514,12 +518,20 @@
 
 		status = acpi_ex_convert_to_string (operand[0], &return_desc,
 				 ACPI_EXPLICIT_CONVERT_HEX);
+		if (return_desc == operand[0]) {
+			/* No conversion performed, add ref to handle return value */
+			acpi_ut_add_reference (return_desc);
+		}
 		break;
 
 
 	case AML_TO_BUFFER_OP:          /* to_buffer (Data, Result) */
 
 		status = acpi_ex_convert_to_buffer (operand[0], &return_desc);
+		if (return_desc == operand[0]) {
+			/* No conversion performed, add ref to handle return value */
+			acpi_ut_add_reference (return_desc);
+		}
 		break;
 
 
@@ -527,6 +539,10 @@
 
 		status = acpi_ex_convert_to_integer (operand[0], &return_desc,
 				 ACPI_ANY_BASE);
+		if (return_desc == operand[0]) {
+			/* No conversion performed, add ref to handle return value */
+			acpi_ut_add_reference (return_desc);
+		}
 		break;
 
 
@@ -551,10 +567,12 @@
 		goto cleanup;
 	}
 
-	/*
-	 * Store the return value computed above into the target object
-	 */
-	status = acpi_ex_store (return_desc, operand[1], walk_state);
+	if (ACPI_SUCCESS (status)) {
+		/*
+		 * Store the return value computed above into the target object
+		 */
+		status = acpi_ex_store (return_desc, operand[1], walk_state);
+	}
 
 
 cleanup:
diff -Nru a/drivers/acpi/executer/exoparg2.c b/drivers/acpi/executer/exoparg2.c
--- a/drivers/acpi/executer/exoparg2.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/acpi/executer/exoparg2.c	2005-01-10 20:11:19 -08:00
@@ -410,7 +410,7 @@
 		index = (u32) operand[1]->integer.value;
 
 		/*
-		 * At this point, the Source operand is either a Package or a Buffer
+		 * At this point, the Source operand is a Package, Buffer, or String
 		 */
 		if (ACPI_GET_OBJECT_TYPE (operand[0]) == ACPI_TYPE_PACKAGE) {
 			/* Object to be indexed is a Package */
@@ -428,7 +428,7 @@
 			return_desc->reference.where     = &operand[0]->package.elements [index];
 		}
 		else {
-			/* Object to be indexed is a Buffer */
+			/* Object to be indexed is a Buffer/String */
 
 			if (index >= operand[0]->buffer.length) {
 				ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
diff -Nru a/drivers/acpi/executer/exprep.c b/drivers/acpi/executer/exprep.c
--- a/drivers/acpi/executer/exprep.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/acpi/executer/exprep.c	2005-01-10 20:11:17 -08:00
@@ -339,6 +339,8 @@
 	obj_desc->common_field.access_byte_width = (u8)
 			ACPI_DIV_8 (access_bit_width); /* 1, 2, 4,  8 */
 
+	obj_desc->common_field.access_bit_width = (u8) access_bit_width;
+
 	/*
 	 * base_byte_offset is the address of the start of the field within the
 	 * region.  It is the byte address of the first *datum* (field-width data
@@ -360,28 +362,6 @@
 	 */
 	obj_desc->common_field.start_field_bit_offset = (u8)
 		(field_bit_position - ACPI_MUL_8 (obj_desc->common_field.base_byte_offset));
-
-	/*
-	 * Valid bits -- the number of bits that compose a partial datum,
-	 * 1) At the end of the field within the region (arbitrary starting bit
-	 *    offset)
-	 * 2) At the end of a buffer used to contain the field (starting offset
-	 *    always zero)
-	 */
-	obj_desc->common_field.end_field_valid_bits = (u8)
-		((obj_desc->common_field.start_field_bit_offset + field_bit_length) %
-				  access_bit_width);
-	/* start_buffer_bit_offset always = 0 */
-
-	obj_desc->common_field.end_buffer_valid_bits = (u8)
-		(field_bit_length % access_bit_width);
-
-	/*
-	 * datum_valid_bits is the number of valid field bits in the first
-	 * field datum.
-	 */
-	obj_desc->common_field.datum_valid_bits  = (u8)
-		(access_bit_width - obj_desc->common_field.start_field_bit_offset);
 
 	/*
 	 * Does the entire field fit within a single field access element? (datum)
diff -Nru a/drivers/acpi/executer/exstore.c b/drivers/acpi/executer/exstore.c
--- a/drivers/acpi/executer/exstore.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/acpi/executer/exstore.c	2005-01-10 20:11:18 -08:00
@@ -295,56 +295,45 @@
 	switch (index_desc->reference.target_type) {
 	case ACPI_TYPE_PACKAGE:
 		/*
-		 * Storing to a package element is not simple.  The source must be
-		 * evaluated and converted to the type of the destination and then the
-		 * source is copied into the destination - we can't just point to the
-		 * source object.
-		 */
-		/*
+		 * Storing to a package element. Copy the object and replace
+		 * any existing object with the new object. No implicit
+		 * conversion is performed.
+		 *
 		 * The object at *(index_desc->Reference.Where) is the
 		 * element within the package that is to be modified.
 		 * The parent package object is at index_desc->Reference.Object
 		 */
 		obj_desc = *(index_desc->reference.where);
 
-		/* Do the conversion/store */
-
-		status = acpi_ex_store_object_to_object (source_desc, obj_desc, &new_desc,
-				  walk_state);
+		status = acpi_ut_copy_iobject_to_iobject (source_desc, &new_desc, walk_state);
 		if (ACPI_FAILURE (status)) {
-			ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
-				"Could not store object to indexed package element\n"));
 			return_ACPI_STATUS (status);
 		}
 
-		/*
-		 * If a new object was created, we must install it as the new
-		 * package element
-		 */
-		if (new_desc != obj_desc) {
-			acpi_ut_remove_reference (obj_desc);
-			*(index_desc->reference.where) = new_desc;
-
-			/* If same as the original source, add a reference */
+		if (obj_desc) {
+			/* Decrement reference count by the ref count of the parent package */
 
-			if (new_desc == source_desc) {
-				acpi_ut_add_reference (new_desc);
+			for (i = 0; i < ((union acpi_operand_object *) index_desc->reference.object)->common.reference_count; i++) {
+				acpi_ut_remove_reference (obj_desc);
 			}
+		}
 
-			/* Increment reference count by the ref count of the parent package -1 */
+		*(index_desc->reference.where) = new_desc;
 
-			for (i = 1; i < ((union acpi_operand_object *) index_desc->reference.object)->common.reference_count; i++) {
-				acpi_ut_add_reference (new_desc);
-			}
+		/* Increment reference count by the ref count of the parent package -1 */
+
+		for (i = 1; i < ((union acpi_operand_object *) index_desc->reference.object)->common.reference_count; i++) {
+			acpi_ut_add_reference (new_desc);
 		}
+
 		break;
 
 
 	case ACPI_TYPE_BUFFER_FIELD:
 
 		/*
-		 * Store into a Buffer (not actually a real buffer_field) at a
-		 * location defined by an Index.
+		 * Store into a Buffer or String (not actually a real buffer_field)
+		 * at a location defined by an Index.
 		 *
 		 * The first 8-bit element of the source object is written to the
 		 * 8-bit Buffer location defined by the Index destination object,
@@ -352,10 +341,13 @@
 		 */
 
 		/*
-		 * Make sure the target is a Buffer
+		 * Make sure the target is a Buffer or String. An error should
+		 * not happen here, since the reference_object was constructed
+		 * by the INDEX_OP code.
 		 */
 		obj_desc = index_desc->reference.object;
-		if (ACPI_GET_OBJECT_TYPE (obj_desc) != ACPI_TYPE_BUFFER) {
+		if ((ACPI_GET_OBJECT_TYPE (obj_desc) != ACPI_TYPE_BUFFER) &&
+			(ACPI_GET_OBJECT_TYPE (obj_desc) != ACPI_TYPE_STRING)) {
 			return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
 		}
 
@@ -372,13 +364,11 @@
 			break;
 
 		case ACPI_TYPE_BUFFER:
-
-			value = source_desc->buffer.pointer[0];
-			break;
-
 		case ACPI_TYPE_STRING:
 
-			value = (u8) source_desc->string.pointer[0];
+			/* Note: Takes advantage of common string/buffer fields */
+
+			value = source_desc->buffer.pointer[0];
 			break;
 
 		default:
diff -Nru a/drivers/acpi/executer/exstorob.c b/drivers/acpi/executer/exstorob.c
--- a/drivers/acpi/executer/exstorob.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/acpi/executer/exstorob.c	2005-01-10 20:11:22 -08:00
@@ -93,34 +93,35 @@
 			return_ACPI_STATUS (AE_NO_MEMORY);
 		}
 
-		target_desc->common.flags &= ~AOPOBJ_STATIC_POINTER;
 		target_desc->buffer.length = length;
 	}
 
-	/*
-	 * Buffer is a static allocation,
-	 * only place what will fit in the buffer.
-	 */
+	/* Copy source buffer to target buffer */
+
 	if (length <= target_desc->buffer.length) {
 		/* Clear existing buffer and copy in the new one */
 
 		ACPI_MEMSET (target_desc->buffer.pointer, 0, target_desc->buffer.length);
 		ACPI_MEMCPY (target_desc->buffer.pointer, buffer, length);
+
+		/* Set the new length of the target */
+
+		target_desc->buffer.length = length;
 	}
 	else {
-		/*
-		 * Truncate the source, copy only what will fit
-		 */
+		/* Truncate the source, copy only what will fit */
+
 		ACPI_MEMCPY (target_desc->buffer.pointer, buffer, target_desc->buffer.length);
 
 		ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
-			"Truncating src buffer from %X to %X\n",
+			"Truncating source buffer from %X to %X\n",
 			length, target_desc->buffer.length));
 	}
 
 	/* Copy flags */
 
 	target_desc->buffer.flags = source_desc->buffer.flags;
+	target_desc->common.flags &= ~AOPOBJ_STATIC_POINTER;
 	return_ACPI_STATUS (AE_OK);
 }
 
diff -Nru a/drivers/acpi/hardware/hwsleep.c b/drivers/acpi/hardware/hwsleep.c
--- a/drivers/acpi/hardware/hwsleep.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/acpi/hardware/hwsleep.c	2005-01-10 20:11:16 -08:00
@@ -282,15 +282,6 @@
 		return_ACPI_STATUS (status);
 	}
 
-	if (sleep_state != ACPI_STATE_S5) {
-		/* Disable BM arbitration */
-
-		status = acpi_set_register (ACPI_BITREG_ARB_DISABLE, 1, ACPI_MTX_DO_NOT_LOCK);
-		if (ACPI_FAILURE (status)) {
-			return_ACPI_STATUS (status);
-		}
-	}
-
 	/*
 	 * 1) Disable/Clear all GPEs
 	 * 2) Enable all wakeup GPEs
@@ -580,13 +571,6 @@
 			1, ACPI_MTX_DO_NOT_LOCK);
 	(void) acpi_set_register(acpi_gbl_fixed_event_info[ACPI_EVENT_POWER_BUTTON].status_register_id,
 			1, ACPI_MTX_DO_NOT_LOCK);
-
-	/* Enable BM arbitration */
-
-	status = acpi_set_register (ACPI_BITREG_ARB_DISABLE, 0, ACPI_MTX_LOCK);
-	if (ACPI_FAILURE (status)) {
-		return_ACPI_STATUS (status);
-	}
 
 	arg.integer.value = ACPI_SST_WORKING;
 	status = acpi_evaluate_object (NULL, METHOD_NAME__SST, &arg_list, NULL);
diff -Nru a/drivers/acpi/ibm_acpi.c b/drivers/acpi/ibm_acpi.c
--- a/drivers/acpi/ibm_acpi.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/acpi/ibm_acpi.c	2005-01-10 20:11:21 -08:00
@@ -1168,7 +1168,7 @@
 #define IBM_PARAM(feature) \
 	module_param_call(feature, set_ibm_param, NULL, NULL, 0)
 
-static void __exit acpi_ibm_exit(void)
+static void acpi_ibm_exit(void)
 {
 	int i;
 
diff -Nru a/drivers/acpi/numa.c b/drivers/acpi/numa.c
--- a/drivers/acpi/numa.c	2005-01-10 20:11:24 -08:00
+++ b/drivers/acpi/numa.c	2005-01-10 20:11:24 -08:00
@@ -22,7 +22,7 @@
  * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  *
  */
-
+#include <linux/module.h>
 #include <linux/config.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
@@ -184,18 +184,30 @@
 		result = acpi_table_parse_srat(ACPI_SRAT_MEMORY_AFFINITY,
 					       acpi_parse_memory_affinity,
 					       NR_NODE_MEMBLKS);	// IA64 specific
-	} else {
-		/* FIXME */
-		printk("Warning: acpi_table_parse(ACPI_SRAT) returned %d!\n",result);
 	}
 
 	/* SLIT: System Locality Information Table */
 	result = acpi_table_parse(ACPI_SLIT, acpi_parse_slit);
-	if (result < 1) {
-		/* FIXME */
-		printk("Warning: acpi_table_parse(ACPI_SLIT) returned %d!\n",result);
-	}
 
 	acpi_numa_arch_fixup();
 	return 0;
 }
+
+int
+acpi_get_pxm(acpi_handle h)
+{
+	unsigned long pxm;
+	acpi_status status;
+	acpi_handle handle;
+	acpi_handle phandle = h;
+
+	do {
+		handle = phandle;
+		status = acpi_evaluate_integer(handle, "_PXM", NULL, &pxm);
+		if (ACPI_SUCCESS(status))
+			return (int)pxm;
+		status = acpi_get_parent(handle, &phandle);
+	} while(ACPI_SUCCESS(status));
+	return -1;
+}
+EXPORT_SYMBOL(acpi_get_pxm);
diff -Nru a/drivers/acpi/osl.c b/drivers/acpi/osl.c
--- a/drivers/acpi/osl.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/acpi/osl.c	2005-01-10 20:11:21 -08:00
@@ -40,6 +40,7 @@
 #include <acpi/acpi.h>
 #include <asm/io.h>
 #include <acpi/acpi_bus.h>
+#include <acpi/processor.h>
 #include <asm/uaccess.h>
 
 #include <linux/efi.h>
@@ -356,7 +357,7 @@
 	if (!t)
 		printk(KERN_ERR PREFIX "acpi_os_get_timer() TBD\n");
 
-	return(++t);
+	return ++t;
 }
 
 acpi_status
@@ -635,7 +636,7 @@
 	acpi_integer		value,
 	u32			width)
 {
-	return (AE_SUPPORT);
+	return AE_SUPPORT;
 }
 
 acpi_status
@@ -645,7 +646,7 @@
 	void			*value,
 	u32			width)
 {
-	return (AE_SUPPORT);
+	return AE_SUPPORT;
 }
 
 void
@@ -1155,7 +1156,7 @@
  * max_cstate is defined in the base kernel so modules can
  * change it w/o depending on the state of the processor module.
  */
-unsigned int max_cstate = ACPI_C_STATES_MAX;
+unsigned int max_cstate = ACPI_PROCESSOR_MAX_POWER;
 
 
 EXPORT_SYMBOL(max_cstate);
diff -Nru a/drivers/acpi/parser/psopcode.c b/drivers/acpi/parser/psopcode.c
--- a/drivers/acpi/parser/psopcode.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/acpi/parser/psopcode.c	2005-01-10 20:11:16 -08:00
@@ -318,7 +318,7 @@
 #define ARGI_SHIFT_LEFT_OP              ARGI_LIST3 (ARGI_INTEGER,    ARGI_INTEGER,       ARGI_TARGETREF)
 #define ARGI_SHIFT_RIGHT_OP             ARGI_LIST3 (ARGI_INTEGER,    ARGI_INTEGER,       ARGI_TARGETREF)
 #define ARGI_SIGNAL_OP                  ARGI_LIST1 (ARGI_EVENT)
-#define ARGI_SIZE_OF_OP                 ARGI_LIST1 (ARGI_REFERENCE) /* Force delay of operand resolution */
+#define ARGI_SIZE_OF_OP                 ARGI_LIST1 (ARGI_DATAOBJECT)
 #define ARGI_SLEEP_OP                   ARGI_LIST1 (ARGI_INTEGER)
 #define ARGI_STALL_OP                   ARGI_LIST1 (ARGI_INTEGER)
 #define ARGI_STATICSTRING_OP            ARGI_INVALID_OPCODE
@@ -333,7 +333,7 @@
 #define ARGI_TO_HEX_STR_OP              ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_FIXED_TARGET)
 #define ARGI_TO_INTEGER_OP              ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_FIXED_TARGET)
 #define ARGI_TO_STRING_OP               ARGI_LIST3 (ARGI_BUFFER,     ARGI_INTEGER,       ARGI_FIXED_TARGET)
-#define ARGI_TYPE_OP                    ARGI_LIST1 (ARGI_REFERENCE) /* Force delay of operand resolution */
+#define ARGI_TYPE_OP                    ARGI_LIST1 (ARGI_ANYTYPE)
 #define ARGI_UNLOAD_OP                  ARGI_LIST1 (ARGI_DDBHANDLE)
 #define ARGI_VAR_PACKAGE_OP             ARGI_LIST1 (ARGI_INTEGER)
 #define ARGI_WAIT_OP                    ARGI_LIST2 (ARGI_EVENT,      ARGI_INTEGER)
@@ -521,14 +521,14 @@
 /* 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),
+/* 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 | AML_NO_OPERAND_RESOLVE),
 /* 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),
+/* 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 | AML_NO_OPERAND_RESOLVE),
 /* 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_NUMERIC | 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_NUMERIC | 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),
diff -Nru a/drivers/acpi/pci_bind.c b/drivers/acpi/pci_bind.c
--- a/drivers/acpi/pci_bind.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/acpi/pci_bind.c	2005-01-10 20:11:21 -08:00
@@ -126,8 +126,8 @@
 	acpi_status		status = AE_OK;
 	struct acpi_pci_data	*data = NULL;
 	struct acpi_pci_data	*pdata = NULL;
-	char			pathname[ACPI_PATHNAME_MAX] = {0};
-	struct acpi_buffer	buffer = {ACPI_PATHNAME_MAX, pathname};
+	char			*pathname = NULL;
+	struct acpi_buffer	buffer = {0, NULL};
 	acpi_handle		handle = NULL;
 
 	ACPI_FUNCTION_TRACE("acpi_pci_bind");
@@ -135,9 +135,18 @@
 	if (!device || !device->parent)
 		return_VALUE(-EINVAL);
 
+	pathname = kmalloc(ACPI_PATHNAME_MAX, GFP_KERNEL);
+	if(!pathname)
+		return_VALUE(-ENOMEM);
+	memset(pathname, 0, ACPI_PATHNAME_MAX);
+	buffer.length = ACPI_PATHNAME_MAX;
+	buffer.pointer = pathname;
+
 	data = kmalloc(sizeof(struct acpi_pci_data), GFP_KERNEL);
-	if (!data)
+	if (!data){
+		kfree (pathname);
 		return_VALUE(-ENOMEM);
+	}
 	memset(data, 0, sizeof(struct acpi_pci_data));
 
 	acpi_get_name(device->handle, ACPI_FULL_PATHNAME, &buffer);
@@ -216,6 +225,7 @@
 			data->id.device, data->id.function));
 		data->bus = data->dev->subordinate;
 		device->ops.bind = acpi_pci_bind;
+		device->ops.unbind = acpi_pci_unbind;
 	}
 
 	/*
@@ -253,12 +263,56 @@
 	}
 
 end:
+	kfree(pathname);
 	if (result)
 		kfree(data);
 
 	return_VALUE(result);
 }
 
+int acpi_pci_unbind(
+	struct acpi_device      *device)
+{
+	int                     result = 0;
+	acpi_status             status = AE_OK;
+	struct acpi_pci_data    *data = NULL;
+	char                    pathname[ACPI_PATHNAME_MAX] = {0};
+	struct acpi_buffer      buffer = {ACPI_PATHNAME_MAX, pathname};
+
+	ACPI_FUNCTION_TRACE("acpi_pci_unbind");
+
+	if (!device || !device->parent)
+		return_VALUE(-EINVAL);
+
+	acpi_get_name(device->handle, ACPI_FULL_PATHNAME, &buffer);
+	ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Unbinding PCI device [%s]...\n",
+		pathname));
+
+	status = acpi_get_data(device->handle, acpi_pci_data_handler, (void**)&data);
+	if (ACPI_FAILURE(status)) {
+		ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
+			"Unable to get data from device %s\n",
+			acpi_device_bid(device)));
+		result = -ENODEV;
+		goto end;
+	}
+
+	status = acpi_detach_data(device->handle, acpi_pci_data_handler);
+	if (ACPI_FAILURE(status)) {
+		ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
+			"Unable to detach data from device %s\n",
+			acpi_device_bid(device)));
+		result = -ENODEV;
+		goto end;
+	}
+	if (data->dev->subordinate) {
+		acpi_pci_irq_del_prt(data->id.segment, data->bus->number);
+	}
+	kfree(data);
+
+end:
+	return_VALUE(result);
+}
 
 int 
 acpi_pci_bind_root (
@@ -269,22 +323,35 @@
 	int			result = 0;
 	acpi_status		status = AE_OK;
 	struct acpi_pci_data	*data = NULL;
-	char			pathname[ACPI_PATHNAME_MAX] = {0};
-	struct acpi_buffer	buffer = {ACPI_PATHNAME_MAX, pathname};
+	char			*pathname = NULL;
+	struct acpi_buffer	buffer = {0, NULL};
 
 	ACPI_FUNCTION_TRACE("acpi_pci_bind_root");
 
-	if (!device || !id || !bus)
+	pathname = (char *)kmalloc(ACPI_PATHNAME_MAX, GFP_KERNEL);
+	if(!pathname)
+		return_VALUE(-ENOMEM);
+	memset(pathname, 0, ACPI_PATHNAME_MAX);
+
+	buffer.length = ACPI_PATHNAME_MAX;
+	buffer.pointer = pathname;
+
+	if (!device || !id || !bus){
+		kfree(pathname);
 		return_VALUE(-EINVAL);
+	}
 
 	data = kmalloc(sizeof(struct acpi_pci_data), GFP_KERNEL);
-	if (!data)
+	if (!data){
+		kfree(pathname);
 		return_VALUE(-ENOMEM);
+	}
 	memset(data, 0, sizeof(struct acpi_pci_data));
 
 	data->id = *id;
 	data->bus = bus;
 	device->ops.bind = acpi_pci_bind;
+	device->ops.unbind = acpi_pci_unbind;
 
 	acpi_get_name(device->handle, ACPI_FULL_PATHNAME, &buffer);
 
@@ -301,6 +368,7 @@
 	}
 
 end:
+	kfree(pathname);
 	if (result != 0)
 		kfree(data);
 
diff -Nru a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c
--- a/drivers/acpi/pci_irq.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/acpi/pci_irq.c	2005-01-10 20:11:18 -08:00
@@ -43,7 +43,7 @@
 ACPI_MODULE_NAME		("pci_irq")
 
 struct acpi_prt_list		acpi_prt;
-
+spinlock_t acpi_prt_lock = SPIN_LOCK_UNLOCKED;
 
 /* --------------------------------------------------------------------------
                          PCI IRQ Routing Table (PRT) Support
@@ -68,18 +68,20 @@
 	 * Parse through all PRT entries looking for a match on the specified
 	 * PCI device's segment, bus, device, and pin (don't care about func).
 	 *
-	 * TBD: Acquire/release lock
 	 */
+	spin_lock(&acpi_prt_lock);
 	list_for_each(node, &acpi_prt.entries) {
 		entry = list_entry(node, struct acpi_prt_entry, node);
 		if ((segment == entry->id.segment) 
 			&& (bus == entry->id.bus) 
 			&& (device == entry->id.device)
 			&& (pin == entry->pin)) {
+			spin_unlock(&acpi_prt_lock);
 			return_PTR(entry);
 		}
 	}
 
+	spin_unlock(&acpi_prt_lock);
 	return_PTR(NULL);
 }
 
@@ -141,14 +143,29 @@
 		entry->id.segment, entry->id.bus, entry->id.device, 
 		('A' + entry->pin), prt->source, entry->link.index));
 
-	/* TBD: Acquire/release lock */
+	spin_lock(&acpi_prt_lock);
 	list_add_tail(&entry->node, &acpi_prt.entries);
 	acpi_prt.count++;
+	spin_unlock(&acpi_prt_lock);
 
 	return_VALUE(0);
 }
 
 
+static void
+acpi_pci_irq_del_entry (
+	int				segment,
+	int				bus,
+	struct acpi_prt_entry		*entry)
+{
+	if (segment == entry->id.segment && bus == entry->id.bus){
+		acpi_prt.count--;
+		list_del(&entry->node);
+		kfree(entry);
+	}
+}
+
+
 int
 acpi_pci_irq_add_prt (
 	acpi_handle		handle,
@@ -156,7 +173,7 @@
 	int			bus)
 {
 	acpi_status			status = AE_OK;
-	char				pathname[ACPI_PATHNAME_MAX] = {0};
+	char				*pathname = NULL;
 	struct acpi_buffer		buffer = {0, NULL};
 	struct acpi_pci_routing_table	*prt = NULL;
 	struct acpi_pci_routing_table	*entry = NULL;
@@ -164,6 +181,11 @@
 
 	ACPI_FUNCTION_TRACE("acpi_pci_irq_add_prt");
 
+	pathname = (char *) kmalloc(ACPI_PATHNAME_MAX, GFP_KERNEL);
+	if(!pathname)
+		return_VALUE(-ENOMEM);
+	memset(pathname, 0, ACPI_PATHNAME_MAX);
+
 	if (first_time) {
 		acpi_prt.count = 0;
 		INIT_LIST_HEAD(&acpi_prt.entries);
@@ -175,7 +197,7 @@
 	 *       (either a PCI root bridge or PCI-PCI bridge).
 	 */
 
-	buffer.length = sizeof(pathname);
+	buffer.length = ACPI_PATHNAME_MAX;
 	buffer.pointer = pathname;
 	acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
 
@@ -188,6 +210,7 @@
 
 	buffer.length = 0;
 	buffer.pointer = NULL;
+	kfree(pathname);
 	status = acpi_get_irq_routing_table(handle, &buffer);
 	if (status != AE_BUFFER_OVERFLOW) {
 		ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _PRT [%s]\n",
@@ -196,8 +219,9 @@
 	}
 
 	prt = kmalloc(buffer.length, GFP_KERNEL);
-	if (!prt)
+	if (!prt){
 		return_VALUE(-ENOMEM);
+	}
 	memset(prt, 0, buffer.length);
 	buffer.pointer = prt;
 
@@ -222,7 +246,26 @@
 	return_VALUE(0);
 }
 
+void
+acpi_pci_irq_del_prt (int segment, int bus)
+{
+	struct list_head        *node = NULL, *n = NULL;
+	struct acpi_prt_entry   *entry = NULL;
+
+	if (!acpi_prt.count)    {
+		return;
+	}
 
+	printk(KERN_DEBUG "ACPI: Delete PCI Interrupt Routing Table for %x:%x\n",
+		segment, bus);
+	spin_lock(&acpi_prt_lock);
+	list_for_each_safe(node, n, &acpi_prt.entries) {
+		entry = list_entry(node, struct acpi_prt_entry, node);
+
+		acpi_pci_irq_del_entry(segment, bus, entry);
+	}
+	spin_unlock(&acpi_prt_lock);
+}
 /* --------------------------------------------------------------------------
                           PCI Interrupt Routing Support
    -------------------------------------------------------------------------- */
@@ -345,6 +388,7 @@
 	u8			pin = 0;
 	int			edge_level = ACPI_LEVEL_SENSITIVE;
 	int			active_high_low = ACPI_ACTIVE_LOW;
+	extern int		via_interrupt_line_quirk;
 
 	ACPI_FUNCTION_TRACE("acpi_pci_irq_enable");
 
@@ -394,6 +438,9 @@
 		}
  	}
 
+	if (via_interrupt_line_quirk)
+		pci_write_config_byte(dev, PCI_INTERRUPT_LINE, irq & 15);
+
 	dev->irq = acpi_register_gsi(irq, edge_level, active_high_low);
 
 	printk(KERN_INFO PREFIX "PCI interrupt %s[%c] -> GSI %u "
@@ -407,3 +454,55 @@
 }
 EXPORT_SYMBOL(acpi_pci_irq_enable);
 
+
+#ifdef CONFIG_ACPI_DEALLOCATE_IRQ
+void
+acpi_pci_irq_disable (
+	struct pci_dev		*dev)
+{
+	u32			gsi = 0;
+	u8			pin = 0;
+	int			edge_level = ACPI_LEVEL_SENSITIVE;
+	int			active_high_low = ACPI_ACTIVE_LOW;
+
+	ACPI_FUNCTION_TRACE("acpi_pci_irq_disable");
+
+	if (!dev)
+		return_VOID;
+
+	pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin);
+	if (!pin)
+		return_VOID;
+	pin--;
+
+	if (!dev->bus)
+		return_VOID;
+
+	/*
+	 * First we check the PCI IRQ routing table (PRT) for an IRQ.
+	 */
+ 	gsi = acpi_pci_irq_lookup(dev->bus, PCI_SLOT(dev->devfn), pin,
+				  &edge_level, &active_high_low);
+	/*
+	 * If no PRT entry was found, we'll try to derive an IRQ from the
+	 * device's parent bridge.
+	 */
+	if (!gsi)
+ 		gsi = acpi_pci_irq_derive(dev, pin,
+					  &edge_level, &active_high_low);
+	if (!gsi)
+		return_VOID;
+
+	/*
+	 * TBD: It might be worth clearing dev->irq by magic constant
+	 * (e.g. PCI_UNDEFINED_IRQ).
+	 */
+
+	printk(KERN_INFO PREFIX "PCI interrupt for device %s disabled\n",
+	       pci_name(dev));
+
+	acpi_unregister_gsi(gsi);
+
+	return_VOID;
+}
+#endif /* CONFIG_ACPI_DEALLOCATE_IRQ */
diff -Nru a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
--- a/drivers/acpi/pci_link.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/acpi/pci_link.c	2005-01-10 20:11:16 -08:00
@@ -307,50 +307,57 @@
 	struct {
 		struct acpi_resource	res;
 		struct acpi_resource	end;
-	}                       resource;
-	struct acpi_buffer	buffer = {sizeof(resource)+1, &resource};
+	}    *resource;
+	struct acpi_buffer	buffer = {0, NULL};
 
 	ACPI_FUNCTION_TRACE("acpi_pci_link_set");
 
 	if (!link || !irq)
 		return_VALUE(-EINVAL);
 
-	memset(&resource, 0, sizeof(resource));
+	resource = kmalloc( sizeof(*resource)+1, GFP_KERNEL);
+	if(!resource)
+		return_VALUE(-ENOMEM);
+
+	memset(resource, 0, sizeof(*resource)+1);
+	buffer.length = sizeof(*resource) +1;
+	buffer.pointer = resource;
 
 	switch(link->irq.resource_type) {
 	case ACPI_RSTYPE_IRQ:
-		resource.res.id = ACPI_RSTYPE_IRQ;
-		resource.res.length = sizeof(struct acpi_resource);
-		resource.res.data.irq.edge_level = link->irq.edge_level;
-		resource.res.data.irq.active_high_low = link->irq.active_high_low;
+		resource->res.id = ACPI_RSTYPE_IRQ;
+		resource->res.length = sizeof(struct acpi_resource);
+		resource->res.data.irq.edge_level = link->irq.edge_level;
+		resource->res.data.irq.active_high_low = link->irq.active_high_low;
 		if (link->irq.edge_level == ACPI_EDGE_SENSITIVE)
-			resource.res.data.irq.shared_exclusive = ACPI_EXCLUSIVE;
+			resource->res.data.irq.shared_exclusive = ACPI_EXCLUSIVE;
 		else
-			resource.res.data.irq.shared_exclusive = ACPI_SHARED;
-		resource.res.data.irq.number_of_interrupts = 1;
-		resource.res.data.irq.interrupts[0] = irq;
+			resource->res.data.irq.shared_exclusive = ACPI_SHARED;
+		resource->res.data.irq.number_of_interrupts = 1;
+		resource->res.data.irq.interrupts[0] = irq;
 		break;
 	   
 	case ACPI_RSTYPE_EXT_IRQ:
-		resource.res.id = ACPI_RSTYPE_EXT_IRQ;
-		resource.res.length = sizeof(struct acpi_resource);
-		resource.res.data.extended_irq.producer_consumer = ACPI_CONSUMER;
-		resource.res.data.extended_irq.edge_level = link->irq.edge_level;
-		resource.res.data.extended_irq.active_high_low = link->irq.active_high_low;
+		resource->res.id = ACPI_RSTYPE_EXT_IRQ;
+		resource->res.length = sizeof(struct acpi_resource);
+		resource->res.data.extended_irq.producer_consumer = ACPI_CONSUMER;
+		resource->res.data.extended_irq.edge_level = link->irq.edge_level;
+		resource->res.data.extended_irq.active_high_low = link->irq.active_high_low;
 		if (link->irq.edge_level == ACPI_EDGE_SENSITIVE)
-			resource.res.data.irq.shared_exclusive = ACPI_EXCLUSIVE;
+			resource->res.data.irq.shared_exclusive = ACPI_EXCLUSIVE;
 		else
-			resource.res.data.irq.shared_exclusive = ACPI_SHARED;
-		resource.res.data.extended_irq.number_of_interrupts = 1;
-		resource.res.data.extended_irq.interrupts[0] = irq;
+			resource->res.data.irq.shared_exclusive = ACPI_SHARED;
+		resource->res.data.extended_irq.number_of_interrupts = 1;
+		resource->res.data.extended_irq.interrupts[0] = irq;
 		/* ignore resource_source, it's optional */
 		break;
 	default:
 		printk("ACPI BUG: resource_type %d\n", link->irq.resource_type);
-		return_VALUE(-EINVAL);
+		result = -EINVAL;
+		goto end;
 
 	}
-	resource.end.id = ACPI_RSTYPE_END_TAG;
+	resource->end.id = ACPI_RSTYPE_END_TAG;
 
 	/* Attempt to set the resource */
 	status = acpi_set_current_resources(link->handle, &buffer);
@@ -358,14 +365,15 @@
 	/* check for total failure */
 	if (ACPI_FAILURE(status)) {
 		ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _SRS\n"));
-		return_VALUE(-ENODEV);
+		result = -ENODEV;
+		goto end;
 	}
 
 	/* Query _STA, set device->status */
 	result = acpi_bus_get_status(link->device);
 	if (result) {
 		ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Unable to read status\n"));
-		return_VALUE(result);
+		goto end;
 	}
 	if (!link->device->status.enabled) {
 		printk(KERN_WARNING PREFIX
@@ -377,7 +385,7 @@
 	/* Query _CRS, set link->irq.active */
 	result = acpi_pci_link_get_current(link);
 	if (result) {
-		return_VALUE(result);
+		goto end;
 	}
 
 	/*
@@ -399,7 +407,9 @@
 
 	ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Set IRQ %d\n", link->irq.active));
 	
-	return_VALUE(0);
+end:
+	kfree(resource);
+	return_VALUE(result);
 }
 
 
@@ -810,7 +820,7 @@
  */
 static int __init acpi_irq_isa(char *str)
 {
-	return(acpi_irq_penalty_update(str, 1));
+	return acpi_irq_penalty_update(str, 1);
 }
 __setup("acpi_irq_isa=", acpi_irq_isa);
 
@@ -821,7 +831,7 @@
  */
 static int __init acpi_irq_pci(char *str)
 {
-	return(acpi_irq_penalty_update(str, 0));
+	return acpi_irq_penalty_update(str, 0);
 }
 __setup("acpi_irq_pci=", acpi_irq_pci);
 
diff -Nru a/drivers/acpi/processor.c b/drivers/acpi/processor.c
--- a/drivers/acpi/processor.c	2005-01-10 20:11:20 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,2644 +0,0 @@
-/*
- * acpi_processor.c - ACPI Processor Driver ($Revision: 71 $)
- *
- *  Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
- *  Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
- *  Copyright (C) 2004       Dominik Brodowski <linux@brodo.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.
- *
- * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- *  TBD:
- *	1. Make # power states dynamic.
- *	2. Support duty_cycle values that span bit 4.
- *	3. Optimize by having scheduler determine business instead of
- *	   having us try to calculate it here.
- *	4. Need C1 timing -- must modify kernel (IRQ handler) to get this.
- */
-
-#include <linux/kernel.h>
-#include <linux/module.h>
-#include <linux/init.h>
-#include <linux/types.h>
-#include <linux/pci.h>
-#include <linux/pm.h>
-#include <linux/cpufreq.h>
-#include <linux/proc_fs.h>
-#include <linux/seq_file.h>
-#include <linux/dmi.h>
-#include <linux/moduleparam.h>
-
-#include <asm/io.h>
-#include <asm/system.h>
-#include <asm/delay.h>
-#include <asm/uaccess.h>
-#include <asm/processor.h>
-#include <asm/smp.h>
-#include <asm/acpi.h>
-
-#include <acpi/acpi_bus.h>
-#include <acpi/acpi_drivers.h>
-#include <acpi/processor.h>
-
-
-#define ACPI_PROCESSOR_COMPONENT	0x01000000
-#define ACPI_PROCESSOR_CLASS		"processor"
-#define ACPI_PROCESSOR_DRIVER_NAME	"ACPI Processor Driver"
-#define ACPI_PROCESSOR_DEVICE_NAME	"Processor"
-#define ACPI_PROCESSOR_FILE_INFO	"info"
-#define ACPI_PROCESSOR_FILE_POWER	"power"
-#define ACPI_PROCESSOR_FILE_THROTTLING	"throttling"
-#define ACPI_PROCESSOR_FILE_LIMIT	"limit"
-#define ACPI_PROCESSOR_FILE_PERFORMANCE	"performance"
-#define ACPI_PROCESSOR_NOTIFY_PERFORMANCE 0x80
-#define ACPI_PROCESSOR_NOTIFY_POWER	0x81
-
-#define US_TO_PM_TIMER_TICKS(t)		((t * (PM_TIMER_FREQUENCY/1000)) / 1000)
-#define C2_OVERHEAD			4	/* 1us (3.579 ticks per us) */
-#define C3_OVERHEAD			4	/* 1us (3.579 ticks per us) */
-
-
-#define ACPI_PROCESSOR_LIMIT_USER	0
-#define ACPI_PROCESSOR_LIMIT_THERMAL	1
-
-#define _COMPONENT		ACPI_PROCESSOR_COMPONENT
-ACPI_MODULE_NAME		("acpi_processor")
-
-MODULE_AUTHOR("Paul Diefenbaugh");
-MODULE_DESCRIPTION(ACPI_PROCESSOR_DRIVER_NAME);
-MODULE_LICENSE("GPL");
-
-
-static int acpi_processor_add (struct acpi_device *device);
-static int acpi_processor_remove (struct acpi_device *device, int type);
-static int acpi_processor_info_open_fs(struct inode *inode, struct file *file);
-static int acpi_processor_throttling_open_fs(struct inode *inode, struct file *file);
-static int acpi_processor_power_open_fs(struct inode *inode, struct file *file);
-static int acpi_processor_limit_open_fs(struct inode *inode, struct file *file);
-static int acpi_processor_get_limit_info(struct acpi_processor *pr);
-
-static struct acpi_driver acpi_processor_driver = {
-	.name =		ACPI_PROCESSOR_DRIVER_NAME,
-	.class =	ACPI_PROCESSOR_CLASS,
-	.ids =		ACPI_PROCESSOR_HID,
-	.ops =		{
-				.add =		acpi_processor_add,
-				.remove =	acpi_processor_remove,
-			},
-};
-
-
-struct acpi_processor_errata {
-	u8			smp;
-	struct {
-		u8			throttle:1;
-		u8			fdma:1;
-		u8			reserved:6;
-		u32			bmisx;
-	}			piix4;
-};
-
-static struct file_operations acpi_processor_info_fops = {
-	.open 		= acpi_processor_info_open_fs,
-	.read		= seq_read,
-	.llseek		= seq_lseek,
-	.release	= single_release,
-};
-
-static struct file_operations acpi_processor_power_fops = {
-	.open 		= acpi_processor_power_open_fs,
-	.read		= seq_read,
-	.llseek		= seq_lseek,
-	.release	= single_release,
-};
-
-static struct file_operations acpi_processor_throttling_fops = {
-	.open 		= acpi_processor_throttling_open_fs,
-	.read		= seq_read,
-	.llseek		= seq_lseek,
-	.release	= single_release,
-};
-
-static struct file_operations acpi_processor_limit_fops = {
-	.open 		= acpi_processor_limit_open_fs,
-	.read		= seq_read,
-	.llseek		= seq_lseek,
-	.release	= single_release,
-};
-
-static struct acpi_processor	*processors[NR_CPUS];
-static struct acpi_processor_errata errata;
-static void (*pm_idle_save)(void);
-
-
-/* --------------------------------------------------------------------------
-                                Errata Handling
-   -------------------------------------------------------------------------- */
-
-int
-acpi_processor_errata_piix4 (
-	struct pci_dev		*dev)
-{
-	u8			rev = 0;
-	u8			value1 = 0;
-	u8			value2 = 0;
-
-	ACPI_FUNCTION_TRACE("acpi_processor_errata_piix4");
-
-	if (!dev)
-		return_VALUE(-EINVAL);
-
-	/*
-	 * Note that 'dev' references the PIIX4 ACPI Controller.
-	 */
-
-	pci_read_config_byte(dev, PCI_REVISION_ID, &rev);
-
-	switch (rev) {
-	case 0:
-		ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found PIIX4 A-step\n"));
-		break;
-	case 1:
-		ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found PIIX4 B-step\n"));
-		break;
-	case 2:
-		ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found PIIX4E\n"));
-		break;
-	case 3:
-		ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found PIIX4M\n"));
-		break;
-	default:
-		ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found unknown PIIX4\n"));
-		break;
-	}
-
-	switch (rev) {
-
-	case 0:		/* PIIX4 A-step */
-	case 1:		/* PIIX4 B-step */
-		/*
-		 * See specification changes #13 ("Manual Throttle Duty Cycle")
-		 * and #14 ("Enabling and Disabling Manual Throttle"), plus
-		 * erratum #5 ("STPCLK# Deassertion Time") from the January 
-		 * 2002 PIIX4 specification update.  Applies to only older 
-		 * PIIX4 models.
-		 */
-		errata.piix4.throttle = 1;
-
-	case 2:		/* PIIX4E */
-	case 3:		/* PIIX4M */
-		/*
-		 * See erratum #18 ("C3 Power State/BMIDE and Type-F DMA 
-		 * Livelock") from the January 2002 PIIX4 specification update.
-		 * Applies to all PIIX4 models.
-		 */
-
-		/* 
-		 * BM-IDE
-		 * ------
-		 * Find the PIIX4 IDE Controller and get the Bus Master IDE 
-		 * Status register address.  We'll use this later to read 
-		 * each IDE controller's DMA status to make sure we catch all
-		 * DMA activity.
-		 */
-		dev = pci_get_subsys(PCI_VENDOR_ID_INTEL,
-		           PCI_DEVICE_ID_INTEL_82371AB, 
-                           PCI_ANY_ID, PCI_ANY_ID, NULL);
-		if (dev) {
-			errata.piix4.bmisx = pci_resource_start(dev, 4);
-			pci_dev_put(dev);
-		}
-
-		/* 
-		 * Type-F DMA
-		 * ----------
-		 * Find the PIIX4 ISA Controller and read the Motherboard
-		 * DMA controller's status to see if Type-F (Fast) DMA mode
-		 * is enabled (bit 7) on either channel.  Note that we'll 
-		 * disable C3 support if this is enabled, as some legacy 
-		 * devices won't operate well if fast DMA is disabled.
-		 */
-		dev = pci_get_subsys(PCI_VENDOR_ID_INTEL, 
-			PCI_DEVICE_ID_INTEL_82371AB_0, 
-			PCI_ANY_ID, PCI_ANY_ID, NULL);
-		if (dev) {
-			pci_read_config_byte(dev, 0x76, &value1);
-			pci_read_config_byte(dev, 0x77, &value2);
-			if ((value1 & 0x80) || (value2 & 0x80))
-				errata.piix4.fdma = 1;
-			pci_dev_put(dev);
-		}
-
-		break;
-	}
-
-	if (errata.piix4.bmisx)
-		ACPI_DEBUG_PRINT((ACPI_DB_INFO, 
-			"Bus master activity detection (BM-IDE) erratum enabled\n"));
-	if (errata.piix4.fdma)
-		ACPI_DEBUG_PRINT((ACPI_DB_INFO, 
-			"Type-F DMA livelock erratum (C3 disabled)\n"));
-
-	return_VALUE(0);
-}
-
-
-int
-acpi_processor_errata (
-	struct acpi_processor	*pr)
-{
-	int			result = 0;
-	struct pci_dev		*dev = NULL;
-
-	ACPI_FUNCTION_TRACE("acpi_processor_errata");
-
-	if (!pr)
-		return_VALUE(-EINVAL);
-
-	/*
-	 * PIIX4
-	 */
-	dev = pci_get_subsys(PCI_VENDOR_ID_INTEL, 
-		PCI_DEVICE_ID_INTEL_82371AB_3, PCI_ANY_ID, PCI_ANY_ID, NULL);
-	if (dev) {
-		result = acpi_processor_errata_piix4(dev);
-		pci_dev_put(dev);
-	}
-
-	return_VALUE(result);
-}
-
-
-/* --------------------------------------------------------------------------
-                                Power Management
-   -------------------------------------------------------------------------- */
-
-static inline u32
-ticks_elapsed (
-	u32			t1,
-	u32			t2)
-{
-	if (t2 >= t1)
-		return (t2 - t1);
-	else if (!acpi_fadt.tmr_val_ext)
-		return (((0x00FFFFFF - t1) + t2) & 0x00FFFFFF);
-	else
-		return ((0xFFFFFFFF - t1) + t2);
-}
-
-
-static void
-acpi_processor_power_activate (
-	struct acpi_processor	*pr,
-	int			state)
-{
-	if (!pr)
-		return;
-
-	pr->power.states[pr->power.state].promotion.count = 0;
-	pr->power.states[pr->power.state].demotion.count = 0;
-
-	/* Cleanup from old state. */
-	switch (pr->power.state) {
-	case ACPI_STATE_C3:
-		/* Disable bus master reload */
-		acpi_set_register(ACPI_BITREG_BUS_MASTER_RLD, 0, ACPI_MTX_DO_NOT_LOCK);
-		break;
-	}
-
-	/* Prepare to use new state. */
-	switch (state) {
-	case ACPI_STATE_C3:
-		/* Enable bus master reload */
-		acpi_set_register(ACPI_BITREG_BUS_MASTER_RLD, 1, ACPI_MTX_DO_NOT_LOCK);
-		break;
-	}
-
-	pr->power.state = state;
-
-	return;
-}
-
-
-static void
-acpi_processor_idle (void)
-{
-	struct acpi_processor	*pr = NULL;
-	struct acpi_processor_cx *cx = NULL;
-	unsigned int			next_state = 0;
-	unsigned int		sleep_ticks = 0;
-	u32			t1, t2 = 0;
-
-	pr = processors[smp_processor_id()];
-	if (!pr)
-		return;
-
-	/*
-	 * Interrupts must be disabled during bus mastering calculations and
-	 * for C2/C3 transitions.
-	 */
-	local_irq_disable();
-
-	/*
-	 * Check whether we truly need to go idle, or should
-	 * reschedule:
-	 */
-	if (unlikely(need_resched())) {
-		local_irq_enable();
-		return;
-	}
-
-	cx = &(pr->power.states[pr->power.state]);
-
-	/*
-	 * Check BM Activity
-	 * -----------------
-	 * Check for bus mastering activity (if required), record, and check
-	 * for demotion.
-	 */
-	if (pr->flags.bm_check) {
-		u32		bm_status = 0;
-
-		pr->power.bm_activity <<= 1;
-
-		acpi_get_register(ACPI_BITREG_BUS_MASTER_STATUS, 
-			&bm_status, ACPI_MTX_DO_NOT_LOCK);
-		if (bm_status) {
-			pr->power.bm_activity++;
-			acpi_set_register(ACPI_BITREG_BUS_MASTER_STATUS,
-				1, ACPI_MTX_DO_NOT_LOCK);
-		}
-		/*
-		 * PIIX4 Erratum #18: Note that BM_STS doesn't always reflect
-		 * the true state of bus mastering activity; forcing us to 
-		 * manually check the BMIDEA bit of each IDE channel.
-		 */
-		else if (errata.piix4.bmisx) {
-			if ((inb_p(errata.piix4.bmisx + 0x02) & 0x01) 
-				|| (inb_p(errata.piix4.bmisx + 0x0A) & 0x01))
-				pr->power.bm_activity++;
-		}
-		/*
-		 * Apply bus mastering demotion policy.  Automatically demote
-		 * to avoid a faulty transition.  Note that the processor 
-		 * won't enter a low-power state during this call (to this 
-		 * funciton) but should upon the next.
-		 *
-		 * TBD: A better policy might be to fallback to the demotion 
-		 *      state (use it for this quantum only) istead of 
-		 *      demoting -- and rely on duration as our sole demotion
-		 *      qualification.  This may, however, introduce DMA 
-		 *      issues (e.g. floppy DMA transfer overrun/underrun).
-		 */
-		if (pr->power.bm_activity & cx->demotion.threshold.bm) {
-			local_irq_enable();
-			next_state = cx->demotion.state;
-			goto end;
-		}
-	}
-
-	cx->usage++;
-
-	/*
-	 * Sleep:
-	 * ------
-	 * Invoke the current Cx state to put the processor to sleep.
-	 */
-	switch (pr->power.state) {
-
-	case ACPI_STATE_C1:
-		/*
-		 * Invoke C1.
-		 * Use the appropriate idle routine, the one that would
-		 * be used without acpi C-states.
-		 */
-		if (pm_idle_save)
-			pm_idle_save();
-		else
-			safe_halt();
-		/*
-                 * TBD: Can't get time duration while in C1, as resumes
-		 *      go to an ISR rather than here.  Need to instrument
-		 *      base interrupt handler.
-		 */
-		sleep_ticks = 0xFFFFFFFF;
-		break;
-
-	case ACPI_STATE_C2:
-		/* Get start time (ticks) */
-		t1 = inl(acpi_fadt.xpm_tmr_blk.address);
-		/* Invoke C2 */
-		inb(pr->power.states[ACPI_STATE_C2].address);
-		/* Dummy op - must do something useless after P_LVL2 read */
-		t2 = inl(acpi_fadt.xpm_tmr_blk.address);
-		/* Get end time (ticks) */
-		t2 = inl(acpi_fadt.xpm_tmr_blk.address);
-		/* Re-enable interrupts */
-		local_irq_enable();
-		/* Compute time (ticks) that we were actually asleep */
-		sleep_ticks = ticks_elapsed(t1, t2) - cx->latency_ticks - C2_OVERHEAD;
-		break;
-
-	case ACPI_STATE_C3:
-		/* Disable bus master arbitration */
-		acpi_set_register(ACPI_BITREG_ARB_DISABLE, 1, ACPI_MTX_DO_NOT_LOCK);
-		/* Get start time (ticks) */
-		t1 = inl(acpi_fadt.xpm_tmr_blk.address);
-		/* Invoke C3 */
-		inb(pr->power.states[ACPI_STATE_C3].address);
-		/* Dummy op - must do something useless after P_LVL3 read */
-		t2 = inl(acpi_fadt.xpm_tmr_blk.address);
-		/* Get end time (ticks) */
-		t2 = inl(acpi_fadt.xpm_tmr_blk.address);
-		/* Enable bus master arbitration */
-		acpi_set_register(ACPI_BITREG_ARB_DISABLE, 0, ACPI_MTX_DO_NOT_LOCK);
-		/* Re-enable interrupts */
-		local_irq_enable();
-		/* Compute time (ticks) that we were actually asleep */
-		sleep_ticks = ticks_elapsed(t1, t2) - cx->latency_ticks - C3_OVERHEAD;
-		break;
-
-	default:
-		local_irq_enable();
-		return;
-	}
-
-	next_state = pr->power.state;
-
-	/*
-	 * Promotion?
-	 * ----------
-	 * Track the number of longs (time asleep is greater than threshold)
-	 * and promote when the count threshold is reached.  Note that bus
-	 * mastering activity may prevent promotions.
-	 * Do not promote above max_cstate.
-	 */
-	if (cx->promotion.state && (cx->promotion.state <= max_cstate)) {
-		if (sleep_ticks > cx->promotion.threshold.ticks) {
-			cx->promotion.count++;
- 			cx->demotion.count = 0;
-			if (cx->promotion.count >= cx->promotion.threshold.count) {
-				if (pr->flags.bm_check) {
-					if (!(pr->power.bm_activity & cx->promotion.threshold.bm)) {
-						next_state = cx->promotion.state;
-						goto end;
-					}
-				}
-				else {
-					next_state = cx->promotion.state;
-					goto end;
-				}
-			}
-		}
-	}
-
-	/*
-	 * Demotion?
-	 * ---------
-	 * Track the number of shorts (time asleep is less than time threshold)
-	 * and demote when the usage threshold is reached.
-	 */
-	if (cx->demotion.state) {
-		if (sleep_ticks < cx->demotion.threshold.ticks) {
-			cx->demotion.count++;
-			cx->promotion.count = 0;
-			if (cx->demotion.count >= cx->demotion.threshold.count) {
-				next_state = cx->demotion.state;
-				goto end;
-			}
-		}
-	}
-
-end:
-	/*
-	 * Demote if current state exceeds max_cstate
-	 */
-	if (pr->power.state > max_cstate) {
-		next_state = max_cstate;
-	}
-
-	/*
-	 * New Cx State?
-	 * -------------
-	 * If we're going to start using a new Cx state we must clean up
-	 * from the previous and prepare to use the new.
-	 */
-	if (next_state != pr->power.state)
-		acpi_processor_power_activate(pr, next_state);
-
-	return;
-}
-
-
-static int
-acpi_processor_set_power_policy (
-	struct acpi_processor	*pr)
-{
-	ACPI_FUNCTION_TRACE("acpi_processor_set_power_policy");
-
-	/*
-	 * This function sets the default Cx state policy (OS idle handler).
-	 * Our scheme is to promote quickly to C2 but more conservatively
-	 * to C3.  We're favoring C2  for its characteristics of low latency
-	 * (quick response), good power savings, and ability to allow bus
-	 * mastering activity.  Note that the Cx state policy is completely
-	 * customizable and can be altered dynamically.
-	 */
-
-	if (!pr)
-		return_VALUE(-EINVAL);
-
-	/*
-	 * C0/C1
-	 * -----
-	 */
-	pr->power.state = ACPI_STATE_C1;
-	pr->power.default_state = ACPI_STATE_C1;
-
-	/*
-	 * C1/C2
-	 * -----
-	 * Set the default C1 promotion and C2 demotion policies, where we
-	 * promote from C1 to C2 after several (10) successive C1 transitions,
-	 * as we cannot (currently) measure the time spent in C1. Demote from
-	 * C2 to C1 anytime we experience a 'short' (time spent in C2 is less
-	 * than the C2 transtion latency).  Note the simplifying assumption 
-	 * that the 'cost' of a transition is amortized when we sleep for at
-	 * least as long as the transition's latency (thus the total transition
-	 * time is two times the latency).
-	 *
-	 * TBD: Measure C1 sleep times by instrumenting the core IRQ handler.
-	 * TBD: Demote to default C-State after long periods of activity.
-	 * TBD: Investigate policy's use of CPU utilization -vs- sleep duration.
-	 */
-	if (pr->power.states[ACPI_STATE_C2].valid) {
-		pr->power.states[ACPI_STATE_C1].promotion.threshold.count = 10;
-		pr->power.states[ACPI_STATE_C1].promotion.threshold.ticks =
-			pr->power.states[ACPI_STATE_C2].latency_ticks;
-		pr->power.states[ACPI_STATE_C1].promotion.state = ACPI_STATE_C2;
-
-		pr->power.states[ACPI_STATE_C2].demotion.threshold.count = 1;
-		pr->power.states[ACPI_STATE_C2].demotion.threshold.ticks =
-			pr->power.states[ACPI_STATE_C2].latency_ticks;
-		pr->power.states[ACPI_STATE_C2].demotion.state = ACPI_STATE_C1;
-	}
-
-	/*
-	 * C2/C3
-	 * -----
-	 * Set default C2 promotion and C3 demotion policies, where we promote
-	 * from C2 to C3 after several (4) cycles of no bus mastering activity
-	 * while maintaining sleep time criteria.  Demote immediately on a
-	 * short or whenever bus mastering activity occurs.
-	 */
-	if ((pr->power.states[ACPI_STATE_C2].valid) &&
-		(pr->power.states[ACPI_STATE_C3].valid)) {
-		pr->power.states[ACPI_STATE_C2].promotion.threshold.count = 4;
-		pr->power.states[ACPI_STATE_C2].promotion.threshold.ticks =
-			pr->power.states[ACPI_STATE_C3].latency_ticks;
-		pr->power.states[ACPI_STATE_C2].promotion.threshold.bm = 0x0F;
-		pr->power.states[ACPI_STATE_C2].promotion.state = ACPI_STATE_C3;
-
-		pr->power.states[ACPI_STATE_C3].demotion.threshold.count = 1;
-		pr->power.states[ACPI_STATE_C3].demotion.threshold.ticks =
-			pr->power.states[ACPI_STATE_C3].latency_ticks;
-		pr->power.states[ACPI_STATE_C3].demotion.threshold.bm = 0x0F;
-		pr->power.states[ACPI_STATE_C3].demotion.state = ACPI_STATE_C2;
-	}
-
-	return_VALUE(0);
-}
-
-
-int
-acpi_processor_get_power_info (
-	struct acpi_processor	*pr)
-{
-	int			result = 0;
-
-	ACPI_FUNCTION_TRACE("acpi_processor_get_power_info");
-
-	if (!pr)
-		return_VALUE(-EINVAL);
-
-	ACPI_DEBUG_PRINT((ACPI_DB_INFO,
-		"lvl2[0x%08x] lvl3[0x%08x]\n",
-		pr->power.states[ACPI_STATE_C2].address,
-		pr->power.states[ACPI_STATE_C3].address));
-
-	/* TBD: Support ACPI 2.0 objects */
-
-	/*
-	 * C0
-	 * --
-	 * This state exists only as filler in our array.
-	 */
-	pr->power.states[ACPI_STATE_C0].valid = 1;
-
-	/*
-	 * C1
-	 * --
-	 * ACPI requires C1 support for all processors.
-	 *
-	 * TBD: What about PROC_C1?
-	 */
-	pr->power.states[ACPI_STATE_C1].valid = 1;
-
-	/*
-	 * C2
-	 * --
-	 * We're (currently) only supporting C2 on UP systems.
-	 *
-	 * TBD: Support for C2 on MP (P_LVL2_UP).
-	 */
-	if (pr->power.states[ACPI_STATE_C2].address) {
-
-		pr->power.states[ACPI_STATE_C2].latency = acpi_fadt.plvl2_lat;
-
-		/*
-		 * C2 latency must be less than or equal to 100 microseconds.
-		 */
-		if (acpi_fadt.plvl2_lat > ACPI_PROCESSOR_MAX_C2_LATENCY)
-			ACPI_DEBUG_PRINT((ACPI_DB_INFO,
-				"C2 latency too large [%d]\n",
-				acpi_fadt.plvl2_lat));
-		/*
-		 * Only support C2 on UP systems (see TBD above).
-		 */
-		else if (errata.smp)
-			ACPI_DEBUG_PRINT((ACPI_DB_INFO,
-				"C2 not supported in SMP mode\n"));
-		/*
-		 * Otherwise we've met all of our C2 requirements.
-		 * Normalize the C2 latency to expidite policy.
-		 */
-		else {
-			pr->power.states[ACPI_STATE_C2].valid = 1;
-			pr->power.states[ACPI_STATE_C2].latency_ticks = 
-				US_TO_PM_TIMER_TICKS(acpi_fadt.plvl2_lat);
-		}
-	}
-
-	/*
-	 * C3
-	 * --
-	 * TBD: Investigate use of WBINVD on UP/SMP system in absence of
-	 *	bm_control.
-	 */
-	if (pr->power.states[ACPI_STATE_C3].address) {
-
-		pr->power.states[ACPI_STATE_C3].latency = acpi_fadt.plvl3_lat;
-
-		/*
-		 * C3 latency must be less than or equal to 1000 microseconds.
-		 */
-		if (acpi_fadt.plvl3_lat > ACPI_PROCESSOR_MAX_C3_LATENCY)
-			ACPI_DEBUG_PRINT((ACPI_DB_INFO,
-				"C3 latency too large [%d]\n", 
-				acpi_fadt.plvl3_lat));
-		/*
-		 * Only support C3 when bus mastering arbitration control
-		 * is present (able to disable bus mastering to maintain
-		 * cache coherency while in C3).
-		 */
-		else if (!pr->flags.bm_control)
-			ACPI_DEBUG_PRINT((ACPI_DB_INFO,
-				"C3 support requires bus mastering control\n"));
-		/*
-		 * Only support C3 on UP systems, as bm_control is only viable
-		 * on a UP system and flushing caches (e.g. WBINVD) is simply 
-		 * too costly (at this time).
-		 */
-		else if (errata.smp)
-			ACPI_DEBUG_PRINT((ACPI_DB_INFO,
-				"C3 not supported in SMP mode\n"));
-		/*
-		 * PIIX4 Erratum #18: We don't support C3 when Type-F (fast) 
-		 * DMA transfers are used by any ISA device to avoid livelock.
-		 * Note that we could disable Type-F DMA (as recommended by
-		 * the erratum), but this is known to disrupt certain ISA 
-		 * devices thus we take the conservative approach.
-		 */
-		else if (errata.piix4.fdma) {
-			ACPI_DEBUG_PRINT((ACPI_DB_INFO,
-				"C3 not supported on PIIX4 with Type-F DMA\n"));
-		}
-		/*
-		 * Otherwise we've met all of our C3 requirements.  
-		 * Normalize the C2 latency to expidite policy.  Enable
-		 * checking of bus mastering status (bm_check) so we can 
-		 * use this in our C3 policy.
-		 */
-		else {
-			pr->power.states[ACPI_STATE_C3].valid = 1;
-			pr->power.states[ACPI_STATE_C3].latency_ticks = 
-				US_TO_PM_TIMER_TICKS(acpi_fadt.plvl3_lat);
-			pr->flags.bm_check = 1;
-		}
-	}
-
-	/*
-	 * Set Default Policy
-	 * ------------------
-	 * Now that we know which state are supported, set the default
-	 * policy.  Note that this policy can be changed dynamically
-	 * (e.g. encourage deeper sleeps to conserve battery life when
-	 * not on AC).
-	 */
-	result = acpi_processor_set_power_policy(pr);
-	if (result)
-		return_VALUE(result);
-
-	/*
-	 * If this processor supports C2 or C3 we denote it as being 'power
-	 * manageable'.  Note that there's really no policy involved for
-	 * when only C1 is supported.
-	 */
-	if (pr->power.states[ACPI_STATE_C2].valid 
-		|| pr->power.states[ACPI_STATE_C3].valid)
-		pr->flags.power = 1;
-
-	return_VALUE(0);
-}
-
-
-/* --------------------------------------------------------------------------
-                              Performance Management
-   -------------------------------------------------------------------------- */
-#ifdef CONFIG_CPU_FREQ
-
-static DECLARE_MUTEX(performance_sem);
-
-/*
- * _PPC support is implemented as a CPUfreq policy notifier: 
- * This means each time a CPUfreq driver registered also with
- * the ACPI core is asked to change the speed policy, the maximum
- * value is adjusted so that it is within the platform limit.
- * 
- * Also, when a new platform limit value is detected, the CPUfreq
- * policy is adjusted accordingly.
- */
-
-#define PPC_REGISTERED   1
-#define PPC_IN_USE       2
-
-static int acpi_processor_ppc_status = 0;
-
-static int acpi_processor_ppc_notifier(struct notifier_block *nb, 
-	unsigned long event,
-	void *data)
-{
-	struct cpufreq_policy *policy = data;
-	struct acpi_processor *pr;
-	unsigned int ppc = 0;
-
-	down(&performance_sem);
-
-	if (event != CPUFREQ_INCOMPATIBLE)
-		goto out;
-
-	pr = processors[policy->cpu];
-	if (!pr || !pr->performance)
-		goto out;
-
-	ppc = (unsigned int) pr->performance_platform_limit;
-	if (!ppc)
-		goto out;
-
-	if (ppc > pr->performance->state_count)
-		goto out;
-
-	cpufreq_verify_within_limits(policy, 0, 
-		pr->performance->states[ppc].core_frequency * 1000);
-
- out:
-	up(&performance_sem);
-
-	return 0;
-}
-
-
-static struct notifier_block acpi_ppc_notifier_block = {
-	.notifier_call = acpi_processor_ppc_notifier,
-};
-
-
-static int
-acpi_processor_get_platform_limit (
-	struct acpi_processor*	pr)
-{
-	acpi_status		status = 0;
-	unsigned long		ppc = 0;
-
-	ACPI_FUNCTION_TRACE("acpi_processor_get_platform_limit");
-
-	if (!pr)
-		return_VALUE(-EINVAL);
-
-	/*
-	 * _PPC indicates the maximum state currently supported by the platform
-	 * (e.g. 0 = states 0..n; 1 = states 1..n; etc.
-	 */
-	status = acpi_evaluate_integer(pr->handle, "_PPC", NULL, &ppc);
-
-	if (status != AE_NOT_FOUND)
-		acpi_processor_ppc_status |= PPC_IN_USE;
-
-	if(ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
-		ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _PPC\n"));
-		return_VALUE(-ENODEV);
-	}
-
-	pr->performance_platform_limit = (int) ppc;
-	
-	return_VALUE(0);
-}
-
-
-static int acpi_processor_ppc_has_changed(
-	struct acpi_processor *pr)
-{
-	int ret = acpi_processor_get_platform_limit(pr);
-	if (ret < 0)
-		return (ret);
-	else
-		return cpufreq_update_policy(pr->id);
-}
-
-
-static void acpi_processor_ppc_init(void) {
-	if (!cpufreq_register_notifier(&acpi_ppc_notifier_block, CPUFREQ_POLICY_NOTIFIER))
-		acpi_processor_ppc_status |= PPC_REGISTERED;
-	else
-		printk(KERN_DEBUG "Warning: Processor Platform Limit not supported.\n");
-}
-
-
-static void acpi_processor_ppc_exit(void) {
-	if (acpi_processor_ppc_status & PPC_REGISTERED)
-		cpufreq_unregister_notifier(&acpi_ppc_notifier_block, CPUFREQ_POLICY_NOTIFIER);
-
-	acpi_processor_ppc_status &= ~PPC_REGISTERED;
-}
-
-/*
- * when registering a cpufreq driver with this ACPI processor driver, the
- * _PCT and _PSS structures are read out and written into struct
- * acpi_processor_performance.
- */
-static int acpi_processor_set_pdc (struct acpi_processor *pr)
-{
-	acpi_status             status = AE_OK;
-	u32			arg0_buf[3];
-	union acpi_object	arg0 = {ACPI_TYPE_BUFFER};
-	struct acpi_object_list no_object = {1, &arg0};
-	struct acpi_object_list *pdc;
-
-	ACPI_FUNCTION_TRACE("acpi_processor_set_pdc");
-	
-	arg0.buffer.length = 12;
-	arg0.buffer.pointer = (u8 *) arg0_buf;
-	arg0_buf[0] = ACPI_PDC_REVISION_ID;
-	arg0_buf[1] = 0;
-	arg0_buf[2] = 0;
-
-	pdc = (pr->performance->pdc) ? pr->performance->pdc : &no_object;
-
-	status = acpi_evaluate_object(pr->handle, "_PDC", pdc, NULL);
-
-	if ((ACPI_FAILURE(status)) && (pr->performance->pdc))
-		ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Error evaluating _PDC, using legacy perf. control...\n"));
-
-	return_VALUE(status);
-}
-
-
-static int 
-acpi_processor_get_performance_control (
-	struct acpi_processor *pr)
-{
-	int			result = 0;
-	acpi_status		status = 0;
-	struct acpi_buffer	buffer = {ACPI_ALLOCATE_BUFFER, NULL};
-	union acpi_object	*pct = NULL;
-	union acpi_object	obj = {0};
-
-	ACPI_FUNCTION_TRACE("acpi_processor_get_performance_control");
-
-	status = acpi_evaluate_object(pr->handle, "_PCT", NULL, &buffer);
-	if(ACPI_FAILURE(status)) {
-		ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _PCT\n"));
-		return_VALUE(-ENODEV);
-	}
-
-	pct = (union acpi_object *) buffer.pointer;
-	if (!pct || (pct->type != ACPI_TYPE_PACKAGE) 
-		|| (pct->package.count != 2)) {
-		ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _PCT data\n"));
-		result = -EFAULT;
-		goto end;
-	}
-
-	/*
-	 * control_register
-	 */
-
-	obj = pct->package.elements[0];
-
-	if ((obj.type != ACPI_TYPE_BUFFER) 
-		|| (obj.buffer.length < sizeof(struct acpi_pct_register)) 
-		|| (obj.buffer.pointer == NULL)) {
-		ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 
-			"Invalid _PCT data (control_register)\n"));
-		result = -EFAULT;
-		goto end;
-	}
-	memcpy(&pr->performance->control_register, obj.buffer.pointer, sizeof(struct acpi_pct_register));
-
-
-	/*
-	 * status_register
-	 */
-
-	obj = pct->package.elements[1];
-
-	if ((obj.type != ACPI_TYPE_BUFFER) 
-		|| (obj.buffer.length < sizeof(struct acpi_pct_register)) 
-		|| (obj.buffer.pointer == NULL)) {
-		ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 
-			"Invalid _PCT data (status_register)\n"));
-		result = -EFAULT;
-		goto end;
-	}
-
-	memcpy(&pr->performance->status_register, obj.buffer.pointer, sizeof(struct acpi_pct_register));
-
-end:
-	acpi_os_free(buffer.pointer);
-
-	return_VALUE(result);
-}
-
-
-static int 
-acpi_processor_get_performance_states (
-	struct acpi_processor	*pr)
-{
-	int			result = 0;
-	acpi_status		status = AE_OK;
-	struct acpi_buffer	buffer = {ACPI_ALLOCATE_BUFFER, NULL};
-	struct acpi_buffer	format = {sizeof("NNNNNN"), "NNNNNN"};
-	struct acpi_buffer	state = {0, NULL};
-	union acpi_object 	*pss = NULL;
-	unsigned int		i;
-
-	ACPI_FUNCTION_TRACE("acpi_processor_get_performance_states");
-
-	status = acpi_evaluate_object(pr->handle, "_PSS", NULL, &buffer);
-	if(ACPI_FAILURE(status)) {
-		ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _PSS\n"));
-		return_VALUE(-ENODEV);
-	}
-
-	pss = (union acpi_object *) buffer.pointer;
-	if (!pss || (pss->type != ACPI_TYPE_PACKAGE)) {
-		ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _PSS data\n"));
-		result = -EFAULT;
-		goto end;
-	}
-
-	ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found %d performance states\n", 
-		pss->package.count));
-
-	pr->performance->state_count = pss->package.count;
-	pr->performance->states = kmalloc(sizeof(struct acpi_processor_px) * pss->package.count, GFP_KERNEL);
-	if (!pr->performance->states) {
-		result = -ENOMEM;
-		goto end;
-	}
-
-	for (i = 0; i < pr->performance->state_count; i++) {
-
-		struct acpi_processor_px *px = &(pr->performance->states[i]);
-
-		state.length = sizeof(struct acpi_processor_px);
-		state.pointer = px;
-
-		ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Extracting state %d\n", i));
-
-		status = acpi_extract_package(&(pss->package.elements[i]), 
-			&format, &state);
-		if (ACPI_FAILURE(status)) {
-			ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _PSS data\n"));
-			result = -EFAULT;
-			kfree(pr->performance->states);
-			goto end;
-		}
-
-		ACPI_DEBUG_PRINT((ACPI_DB_INFO, 
-			"State [%d]: core_frequency[%d] power[%d] transition_latency[%d] bus_master_latency[%d] control[0x%x] status[0x%x]\n",
-			i, 
-			(u32) px->core_frequency, 
-			(u32) px->power, 
-			(u32) px->transition_latency, 
-			(u32) px->bus_master_latency,
-			(u32) px->control, 
-			(u32) px->status));
-
-		if (!px->core_frequency) {
-			ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _PSS data: freq is zero\n"));
-			result = -EFAULT;
-			kfree(pr->performance->states);
-			goto end;
-		}
-	}
-
-end:
-	acpi_os_free(buffer.pointer);
-
-	return_VALUE(result);
-}
-
-
-static int
-acpi_processor_get_performance_info (
-	struct acpi_processor	*pr)
-{
-	int			result = 0;
-	acpi_status		status = AE_OK;
-	acpi_handle		handle = NULL;
-
-	ACPI_FUNCTION_TRACE("acpi_processor_get_performance_info");
-
-	if (!pr || !pr->performance || !pr->handle)
-		return_VALUE(-EINVAL);
-
-	acpi_processor_set_pdc(pr);
-
-	status = acpi_get_handle(pr->handle, "_PCT", &handle);
-	if (ACPI_FAILURE(status)) {
-		ACPI_DEBUG_PRINT((ACPI_DB_INFO, 
-			"ACPI-based processor performance control unavailable\n"));
-		return_VALUE(-ENODEV);
-	}
-
-	result = acpi_processor_get_performance_control(pr);
-	if (result)
-		return_VALUE(result);
-
-	result = acpi_processor_get_performance_states(pr);
-	if (result)
-		return_VALUE(result);
-
-	result = acpi_processor_get_platform_limit(pr);
-	if (result)
-		return_VALUE(result);
-
-	return_VALUE(0);
-}
-
-
-int acpi_processor_notify_smm(struct module *calling_module) {
-	acpi_status		status;
-	static int		is_done = 0;
-
-	ACPI_FUNCTION_TRACE("acpi_processor_notify_smm");
-
-	if (!(acpi_processor_ppc_status & PPC_REGISTERED))
-		return_VALUE(-EBUSY);
-
-	if (!try_module_get(calling_module))
-		return_VALUE(-EINVAL);
-
-	/* is_done is set to negative if an error occured,
-	 * and to postitive if _no_ error occured, but SMM
-	 * was already notified. This avoids double notification
-	 * which might lead to unexpected results...
-	 */
-	if (is_done > 0) {
-		module_put(calling_module);
-		return_VALUE(0);
-	}
-	else if (is_done < 0) {
-		module_put(calling_module);
-		return_VALUE(is_done);
-	}
-
-	is_done = -EIO;
-
-	/* Can't write pstate_cnt to smi_cmd if either value is zero */
-	if ((!acpi_fadt.smi_cmd) ||
-	    (!acpi_fadt.pstate_cnt)) {
-		ACPI_DEBUG_PRINT((ACPI_DB_INFO,
-			"No SMI port or pstate_cnt\n"));
-		module_put(calling_module);
-		return_VALUE(0);
-	}
-
-	ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Writing pstate_cnt [0x%x] to smi_cmd [0x%x]\n", acpi_fadt.pstate_cnt, acpi_fadt.smi_cmd));
-
-	/* FADT v1 doesn't support pstate_cnt, many BIOS vendors use
-	 * it anyway, so we need to support it... */
-	if (acpi_fadt_is_v1) {
-		ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Using v1.0 FADT reserved value for pstate_cnt\n"));
-	}
-
-	status = acpi_os_write_port (acpi_fadt.smi_cmd,
-				     (u32) acpi_fadt.pstate_cnt, 8);
-	if (ACPI_FAILURE (status)) {
-		ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
-				  "Failed to write pstate_cnt [0x%x] to "
-				  "smi_cmd [0x%x]\n", acpi_fadt.pstate_cnt, acpi_fadt.smi_cmd));
-		module_put(calling_module);
-		return_VALUE(status);
-	}
-
-	/* Success. If there's no _PPC, we need to fear nothing, so
-	 * we can allow the cpufreq driver to be rmmod'ed. */
-	is_done = 1;
-
-	if (!(acpi_processor_ppc_status & PPC_IN_USE))
-		module_put(calling_module);
-
-	return_VALUE(0);
-}
-EXPORT_SYMBOL(acpi_processor_notify_smm);
-
-
-#ifdef CONFIG_X86_ACPI_CPUFREQ_PROC_INTF
-/* /proc/acpi/processor/../performance interface (DEPRECATED) */
-
-static int acpi_processor_perf_open_fs(struct inode *inode, struct file *file);
-static struct file_operations acpi_processor_perf_fops = {
-	.open 		= acpi_processor_perf_open_fs,
-	.read		= seq_read,
-	.llseek		= seq_lseek,
-	.release	= single_release,
-};
-
-static int acpi_processor_perf_seq_show(struct seq_file *seq, void *offset)
-{
-	struct acpi_processor	*pr = (struct acpi_processor *)seq->private;
-	unsigned int		i;
-
-	ACPI_FUNCTION_TRACE("acpi_processor_perf_seq_show");
-
-	if (!pr)
-		goto end;
-
-	if (!pr->performance) {
-		seq_puts(seq, "<not supported>\n");
-		goto end;
-	}
-
-	seq_printf(seq, "state count:             %d\n"
-			"active state:            P%d\n",
-			pr->performance->state_count,
-			pr->performance->state);
-
-	seq_puts(seq, "states:\n");
-	for (i = 0; i < pr->performance->state_count; i++)
-		seq_printf(seq, "   %cP%d:                  %d MHz, %d mW, %d uS\n",
-			(i == pr->performance->state?'*':' '), i,
-			(u32) pr->performance->states[i].core_frequency,
-			(u32) pr->performance->states[i].power,
-			(u32) pr->performance->states[i].transition_latency);
-
-end:
-	return_VALUE(0);
-}
-
-static int acpi_processor_perf_open_fs(struct inode *inode, struct file *file)
-{
-	return single_open(file, acpi_processor_perf_seq_show,
-						PDE(inode)->data);
-}
-
-static ssize_t
-acpi_processor_write_performance (
-        struct file		*file,
-        const char		__user *buffer,
-        size_t			count,
-        loff_t			*data)
-{
-	int			result = 0;
-	struct seq_file		*m = (struct seq_file *) file->private_data;
-	struct acpi_processor	*pr = (struct acpi_processor *) m->private;
-	struct acpi_processor_performance *perf;
-	char			state_string[12] = {'\0'};
-	unsigned int            new_state = 0;
-	struct cpufreq_policy   policy;
-
-	ACPI_FUNCTION_TRACE("acpi_processor_write_performance");
-
-	if (!pr || (count > sizeof(state_string) - 1))
-		return_VALUE(-EINVAL);
-
-	perf = pr->performance;
-	if (!perf)
-		return_VALUE(-EINVAL);
-	
-	if (copy_from_user(state_string, buffer, count))
-		return_VALUE(-EFAULT);
-	
-	state_string[count] = '\0';
-	new_state = simple_strtoul(state_string, NULL, 0);
-
-	if (new_state >= perf->state_count)
-		return_VALUE(-EINVAL);
-
-	cpufreq_get_policy(&policy, pr->id);
-
-	policy.cpu = pr->id;
-	policy.min = perf->states[new_state].core_frequency * 1000;
-	policy.max = perf->states[new_state].core_frequency * 1000;
-
-	result = cpufreq_set_policy(&policy);
-	if (result)
-		return_VALUE(result);
-
-	return_VALUE(count);
-}
-
-static void
-acpi_cpufreq_add_file (
-	struct acpi_processor *pr)
-{
-	struct proc_dir_entry	*entry = NULL;
-	struct acpi_device	*device = NULL;
-
-	ACPI_FUNCTION_TRACE("acpi_cpufreq_addfile");
-
-	if (acpi_bus_get_device(pr->handle, &device))
-		return_VOID;
-
-	/* add file 'performance' [R/W] */
-	entry = create_proc_entry(ACPI_PROCESSOR_FILE_PERFORMANCE,
-		  S_IFREG|S_IRUGO|S_IWUSR, acpi_device_dir(device));
-	if (!entry)
-		ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
-			"Unable to create '%s' fs entry\n",
-			ACPI_PROCESSOR_FILE_PERFORMANCE));
-	else {
-		entry->proc_fops = &acpi_processor_perf_fops;
-		entry->proc_fops->write = acpi_processor_write_performance;
-		entry->data = acpi_driver_data(device);
-		entry->owner = THIS_MODULE;
-	}
-	return_VOID;
-}
-
-static void
-acpi_cpufreq_remove_file (
-	struct acpi_processor *pr)
-{
-	struct acpi_device	*device = NULL;
-
-	ACPI_FUNCTION_TRACE("acpi_cpufreq_addfile");
-
-	if (acpi_bus_get_device(pr->handle, &device))
-		return_VOID;
-
-	/* remove file 'performance' */
-	remove_proc_entry(ACPI_PROCESSOR_FILE_PERFORMANCE,
-		  acpi_device_dir(device));
-
-	return_VOID;
-}
-
-#else
-static void acpi_cpufreq_add_file (struct acpi_processor *pr) { return; }
-static void acpi_cpufreq_remove_file (struct acpi_processor *pr) { return; }
-#endif /* CONFIG_X86_ACPI_CPUFREQ_PROC_INTF */
-
-
-int 
-acpi_processor_register_performance (
-	struct acpi_processor_performance * performance,
-	unsigned int cpu)
-{
-	struct acpi_processor *pr;
-
-	ACPI_FUNCTION_TRACE("acpi_processor_register_performance");
-
-	if (!(acpi_processor_ppc_status & PPC_REGISTERED))
-		return_VALUE(-EINVAL);
-
-	down(&performance_sem);
-
-	pr = processors[cpu];
-	if (!pr) {
-		up(&performance_sem);
-		return_VALUE(-ENODEV);
-	}
-
-	if (pr->performance) {
-		up(&performance_sem);
-		return_VALUE(-EBUSY);
-	}
-
-	pr->performance = performance;
-
-	if (acpi_processor_get_performance_info(pr)) {
-		pr->performance = NULL;
-		up(&performance_sem);
-		return_VALUE(-EIO);
-	}
-
-	acpi_cpufreq_add_file(pr);
-
-	up(&performance_sem);
-	return_VALUE(0);
-}
-EXPORT_SYMBOL(acpi_processor_register_performance);
-
-
-void 
-acpi_processor_unregister_performance (
-	struct acpi_processor_performance * performance,
-	unsigned int cpu)
-{
-	struct acpi_processor *pr;
-
-	ACPI_FUNCTION_TRACE("acpi_processor_unregister_performance");
-
-	down(&performance_sem);
-
-	pr = processors[cpu];
-	if (!pr) {
-		up(&performance_sem);
-		return_VOID;
-	}
-
-	kfree(pr->performance->states);
-	pr->performance = NULL;
-
-	acpi_cpufreq_remove_file(pr);
-
-	up(&performance_sem);
-
-	return_VOID;
-}
-EXPORT_SYMBOL(acpi_processor_unregister_performance);
-
-
-/* for the rest of it, check arch/i386/kernel/cpu/cpufreq/acpi.c */
-
-#else  /* !CONFIG_CPU_FREQ */
-
-static void acpi_processor_ppc_init(void) { return; }
-static void acpi_processor_ppc_exit(void) { return; }
-
-static int acpi_processor_ppc_has_changed(struct acpi_processor *pr) {
-	static unsigned int printout = 1;
-	if (printout) {
-		printk(KERN_WARNING "Warning: Processor Platform Limit event detected, but not handled.\n");
-		printk(KERN_WARNING "Consider compiling CPUfreq support into your kernel.\n");
-		printout = 0;
-	}
-	return 0;
-}
-
-#endif /* CONFIG_CPU_FREQ */
-
-/* --------------------------------------------------------------------------
-                              Throttling Control
-   -------------------------------------------------------------------------- */
-
-static int
-acpi_processor_get_throttling (
-	struct acpi_processor	*pr)
-{
-	int			state = 0;
-	u32			value = 0;
-	u32			duty_mask = 0;
-	u32			duty_value = 0;
-
-	ACPI_FUNCTION_TRACE("acpi_processor_get_throttling");
-
-	if (!pr)
-		return_VALUE(-EINVAL);
-
-	if (!pr->flags.throttling)
-		return_VALUE(-ENODEV);
-
-	pr->throttling.state = 0;
-
-	local_irq_disable();
-
-	duty_mask = pr->throttling.state_count - 1;
-
-	duty_mask <<= pr->throttling.duty_offset;
-
-	value = inl(pr->throttling.address);
-
-	/*
-	 * Compute the current throttling state when throttling is enabled
-	 * (bit 4 is on).
-	 */
-	if (value & 0x10) {
-		duty_value = value & duty_mask;
-		duty_value >>= pr->throttling.duty_offset;
-
-		if (duty_value)
-			state = pr->throttling.state_count-duty_value;
-	}
-
-	pr->throttling.state = state;
-
-	local_irq_enable();
-
-	ACPI_DEBUG_PRINT((ACPI_DB_INFO, 
-		"Throttling state is T%d (%d%% throttling applied)\n",
-		state, pr->throttling.states[state].performance));
-
-	return_VALUE(0);
-}
-
-
-static int
-acpi_processor_set_throttling (
-	struct acpi_processor	*pr,
-	int			state)
-{
-	u32                     value = 0;
-	u32                     duty_mask = 0;
-	u32                     duty_value = 0;
-
-	ACPI_FUNCTION_TRACE("acpi_processor_set_throttling");
-
-	if (!pr)
-		return_VALUE(-EINVAL);
-
-	if ((state < 0) || (state > (pr->throttling.state_count - 1)))
-		return_VALUE(-EINVAL);
-
-	if (!pr->flags.throttling)
-		return_VALUE(-ENODEV);
-
-	if (state == pr->throttling.state)
-		return_VALUE(0);
-
-	local_irq_disable();
-
-	/*
-	 * Calculate the duty_value and duty_mask.
-	 */
-	if (state) {
-		duty_value = pr->throttling.state_count - state;
-
-		duty_value <<= pr->throttling.duty_offset;
-
-		/* Used to clear all duty_value bits */
-		duty_mask = pr->throttling.state_count - 1;
-
-		duty_mask <<= acpi_fadt.duty_offset;
-		duty_mask = ~duty_mask;
-	}
-
-	/*
-	 * Disable throttling by writing a 0 to bit 4.  Note that we must
-	 * turn it off before you can change the duty_value.
-	 */
-	value = inl(pr->throttling.address);
-	if (value & 0x10) {
-		value &= 0xFFFFFFEF;
-		outl(value, pr->throttling.address);
-	}
-
-	/*
-	 * Write the new duty_value and then enable throttling.  Note
-	 * that a state value of 0 leaves throttling disabled.
-	 */
-	if (state) {
-		value &= duty_mask;
-		value |= duty_value;
-		outl(value, pr->throttling.address);
-
-		value |= 0x00000010;
-		outl(value, pr->throttling.address);
-	}
-
-	pr->throttling.state = state;
-
-	local_irq_enable();
-
-	ACPI_DEBUG_PRINT((ACPI_DB_INFO, 
-		"Throttling state set to T%d (%d%%)\n", state, 
-		(pr->throttling.states[state].performance?pr->throttling.states[state].performance/10:0)));
-
-	return_VALUE(0);
-}
-
-
-static int
-acpi_processor_get_throttling_info (
-	struct acpi_processor	*pr)
-{
-	int			result = 0;
-	int			step = 0;
-	int			i = 0;
-
-	ACPI_FUNCTION_TRACE("acpi_processor_get_throttling_info");
-
-	ACPI_DEBUG_PRINT((ACPI_DB_INFO,
-		"pblk_address[0x%08x] duty_offset[%d] duty_width[%d]\n",
-		pr->throttling.address,
-		pr->throttling.duty_offset,
-		pr->throttling.duty_width));
-
-	if (!pr)
-		return_VALUE(-EINVAL);
-
-	/* TBD: Support ACPI 2.0 objects */
-
-	if (!pr->throttling.address) {
-		ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No throttling register\n"));
-		return_VALUE(0);
-	}
-	else if (!pr->throttling.duty_width) {
-		ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No throttling states\n"));
-		return_VALUE(0);
-	}
-	/* TBD: Support duty_cycle values that span bit 4. */
-	else if ((pr->throttling.duty_offset
-		+ pr->throttling.duty_width) > 4) {
-		ACPI_DEBUG_PRINT((ACPI_DB_WARN, "duty_cycle spans bit 4\n"));
-		return_VALUE(0);
-	}
-
-	/*
-	 * PIIX4 Errata: We don't support throttling on the original PIIX4.
-	 * This shouldn't be an issue as few (if any) mobile systems ever
-	 * used this part.
-	 */
-	if (errata.piix4.throttle) {
-		ACPI_DEBUG_PRINT((ACPI_DB_INFO, 
-			"Throttling not supported on PIIX4 A- or B-step\n"));
-		return_VALUE(0);
-	}
-
-	pr->throttling.state_count = 1 << acpi_fadt.duty_width;
-
-	/*
-	 * Compute state values. Note that throttling displays a linear power/
-	 * performance relationship (at 50% performance the CPU will consume
-	 * 50% power).  Values are in 1/10th of a percent to preserve accuracy.
-	 */
-
-	step = (1000 / pr->throttling.state_count);
-
-	for (i=0; i<pr->throttling.state_count; i++) {
-		pr->throttling.states[i].performance = step * i;
-		pr->throttling.states[i].power = step * i;
-	}
-
-	ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found %d throttling states\n", 
-		pr->throttling.state_count));
-
-	pr->flags.throttling = 1;
-
-	/*
-	 * Disable throttling (if enabled).  We'll let subsequent policy (e.g. 
-	 * thermal) decide to lower performance if it so chooses, but for now 
-	 * we'll crank up the speed.
-	 */
-
-	result = acpi_processor_get_throttling(pr);
-	if (result)
-		goto end;
-
-	if (pr->throttling.state) {
-		ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Disabling throttling (was T%d)\n", 
-			pr->throttling.state));
-		result = acpi_processor_set_throttling(pr, 0);
-		if (result)
-			goto end;
-	}
-
-end:
-	if (result)
-		pr->flags.throttling = 0;
-
-	return_VALUE(result);
-}
-
-
-/* --------------------------------------------------------------------------
-                                 Limit Interface
-   -------------------------------------------------------------------------- */
-
-static int
-acpi_processor_apply_limit (
-	struct acpi_processor* 	pr)
-{
-	int			result = 0;
-	u16			px = 0;
-	u16			tx = 0;
-
-	ACPI_FUNCTION_TRACE("acpi_processor_apply_limit");
-
-	if (!pr)
-		return_VALUE(-EINVAL);
-
-	if (!pr->flags.limit)
-		return_VALUE(-ENODEV);
-
-	if (pr->flags.throttling) {
-		if (pr->limit.user.tx > tx)
-			tx = pr->limit.user.tx;
-		if (pr->limit.thermal.tx > tx)
-			tx = pr->limit.thermal.tx;
-
-		result = acpi_processor_set_throttling(pr, tx);
-		if (result)
-			goto end;
-	}
-
-	pr->limit.state.px = px;
-	pr->limit.state.tx = tx;
-
-	ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Processor [%d] limit set to (P%d:T%d)\n",
-		pr->id,
-		pr->limit.state.px,
-		pr->limit.state.tx));
-
-end:
-	if (result)
-		ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Unable to set limit\n"));
-
-	return_VALUE(result);
-}
-
-
-#ifdef CONFIG_CPU_FREQ
-
-/* If a passive cooling situation is detected, primarily CPUfreq is used, as it
- * offers (in most cases) voltage scaling in addition to frequency scaling, and
- * thus a cubic (instead of linear) reduction of energy. Also, we allow for
- * _any_ cpufreq driver and not only the acpi-cpufreq driver.
- */
-
-static unsigned int cpufreq_thermal_reduction_pctg[NR_CPUS];
-static unsigned int acpi_thermal_cpufreq_is_init = 0;
-
-
-static int cpu_has_cpufreq(unsigned int cpu)
-{
-	struct cpufreq_policy policy;
-	if (!acpi_thermal_cpufreq_is_init)
-		return -ENODEV;
-	if (!cpufreq_get_policy(&policy, cpu))
-		return -ENODEV;
-	return 0;
-}
-
-
-static int acpi_thermal_cpufreq_increase(unsigned int cpu)
-{
-	if (!cpu_has_cpufreq(cpu))
-		return -ENODEV;
-
-	if (cpufreq_thermal_reduction_pctg[cpu] < 60) {
-		cpufreq_thermal_reduction_pctg[cpu] += 20;
-		cpufreq_update_policy(cpu);
-		return 0;
-	}
-
-	return -ERANGE;
-}
-
-
-static int acpi_thermal_cpufreq_decrease(unsigned int cpu)
-{
-	if (!cpu_has_cpufreq(cpu))
-		return -ENODEV;
-
-	if (cpufreq_thermal_reduction_pctg[cpu] >= 20) {
-		cpufreq_thermal_reduction_pctg[cpu] -= 20;
-		cpufreq_update_policy(cpu);
-		return 0;
-	}
-
-	return -ERANGE;
-}
-
-
-static int acpi_thermal_cpufreq_notifier(
-	struct notifier_block *nb,
-	unsigned long event,
-	void *data)
-{
-	struct cpufreq_policy *policy = data;
-	unsigned long max_freq = 0;
-
-	if (event != CPUFREQ_ADJUST)
-		goto out;
-
-	max_freq = (policy->cpuinfo.max_freq * (100 - cpufreq_thermal_reduction_pctg[policy->cpu])) / 100;
-
-	cpufreq_verify_within_limits(policy, 0, max_freq);
-
- out:
-	return 0;
-}
-
-
-static struct notifier_block acpi_thermal_cpufreq_notifier_block = {
-	.notifier_call = acpi_thermal_cpufreq_notifier,
-};
-
-
-static void acpi_thermal_cpufreq_init(void) {
-	int i;
-
-	for (i=0; i<NR_CPUS; i++)
-		cpufreq_thermal_reduction_pctg[i] = 0;
-
-	i = cpufreq_register_notifier(&acpi_thermal_cpufreq_notifier_block, CPUFREQ_POLICY_NOTIFIER);
-	if (!i)
-		acpi_thermal_cpufreq_is_init = 1;
-}
-
-static void acpi_thermal_cpufreq_exit(void) {
-	if (acpi_thermal_cpufreq_is_init)
-		cpufreq_unregister_notifier(&acpi_thermal_cpufreq_notifier_block, CPUFREQ_POLICY_NOTIFIER);
-
-	acpi_thermal_cpufreq_is_init = 0;
-}
-
-#else /* ! CONFIG_CPU_FREQ */
-
-static void acpi_thermal_cpufreq_init(void) { return; }
-static void acpi_thermal_cpufreq_exit(void) { return; }
-static int acpi_thermal_cpufreq_increase(unsigned int cpu) { return -ENODEV; }
-static int acpi_thermal_cpufreq_decrease(unsigned int cpu) { return -ENODEV; }
-
-
-#endif
-
-
-int
-acpi_processor_set_thermal_limit (
-	acpi_handle		handle,
-	int			type)
-{
-	int			result = 0;
-	struct acpi_processor	*pr = NULL;
-	struct acpi_device	*device = NULL;
-	int			tx = 0;
-
-	ACPI_FUNCTION_TRACE("acpi_processor_set_thermal_limit");
-
-	if ((type < ACPI_PROCESSOR_LIMIT_NONE) 
-		|| (type > ACPI_PROCESSOR_LIMIT_DECREMENT))
-		return_VALUE(-EINVAL);
-
-	result = acpi_bus_get_device(handle, &device);
-	if (result)
-		return_VALUE(result);
-
-	pr = (struct acpi_processor *) acpi_driver_data(device);
-	if (!pr)
-		return_VALUE(-ENODEV);
-
-	/* Thermal limits are always relative to the current Px/Tx state. */
-	if (pr->flags.throttling)
-		pr->limit.thermal.tx = pr->throttling.state;
-
-	/*
-	 * Our default policy is to only use throttling at the lowest
-	 * performance state.
-	 */
-
-	tx = pr->limit.thermal.tx;
-
-	switch (type) {
-
-	case ACPI_PROCESSOR_LIMIT_NONE:
-		do {
-			result = acpi_thermal_cpufreq_decrease(pr->id);
-		} while (!result);
-		tx = 0;
-		break;
-
-	case ACPI_PROCESSOR_LIMIT_INCREMENT:
-		/* if going up: P-states first, T-states later */
-
-		result = acpi_thermal_cpufreq_increase(pr->id);
-		if (!result)
-			goto end;
-		else if (result == -ERANGE)
-			ACPI_DEBUG_PRINT((ACPI_DB_INFO, 
-					"At maximum performance state\n"));
-
-		if (pr->flags.throttling) {
-			if (tx == (pr->throttling.state_count - 1))
-				ACPI_DEBUG_PRINT((ACPI_DB_INFO, 
-					"At maximum throttling state\n"));
-			else
-				tx++;
-		}
-		break;
-
-	case ACPI_PROCESSOR_LIMIT_DECREMENT:
-		/* if going down: T-states first, P-states later */
-
-		if (pr->flags.throttling) {
-			if (tx == 0)
-				ACPI_DEBUG_PRINT((ACPI_DB_INFO, 
-					"At minimum throttling state\n"));
-			else {
-				tx--;
-				goto end;
-			}
-		}
-
-		result = acpi_thermal_cpufreq_decrease(pr->id);
-		if (result == -ERANGE)
-			ACPI_DEBUG_PRINT((ACPI_DB_INFO, 
-					"At minimum performance state\n"));
-
-		break;
-	}
-
-end:
-	if (pr->flags.throttling) {
-		pr->limit.thermal.px = 0;
-		pr->limit.thermal.tx = tx;
-
-		result = acpi_processor_apply_limit(pr);
-		if (result)
-			ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 
-					  "Unable to set thermal limit\n"));
-
-		ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Thermal limit now (P%d:T%d)\n",
-				  pr->limit.thermal.px,
-				  pr->limit.thermal.tx));
-	} else
-		result = 0;
-
-	return_VALUE(result);
-}
-
-
-static int
-acpi_processor_get_limit_info (
-	struct acpi_processor	*pr)
-{
-	ACPI_FUNCTION_TRACE("acpi_processor_get_limit_info");
-
-	if (!pr)
-		return_VALUE(-EINVAL);
-
-	if (pr->flags.throttling)
-		pr->flags.limit = 1;
-
-	return_VALUE(0);
-}
-
-
-/* --------------------------------------------------------------------------
-                              FS Interface (/proc)
-   -------------------------------------------------------------------------- */
-
-struct proc_dir_entry		*acpi_processor_dir = NULL;
-
-static int acpi_processor_info_seq_show(struct seq_file *seq, void *offset)
-{
-	struct acpi_processor	*pr = (struct acpi_processor *)seq->private;
-
-	ACPI_FUNCTION_TRACE("acpi_processor_info_seq_show");
-
-	if (!pr)
-		goto end;
-
-	seq_printf(seq, "processor id:            %d\n"
-			"acpi id:                 %d\n"
-			"bus mastering control:   %s\n"
-			"power management:        %s\n"
-			"throttling control:      %s\n"
-			"limit interface:         %s\n",
-			pr->id,
-			pr->acpi_id,
-			pr->flags.bm_control ? "yes" : "no",
-			pr->flags.power ? "yes" : "no",
-			pr->flags.throttling ? "yes" : "no",
-			pr->flags.limit ? "yes" : "no");
-
-end:
-	return_VALUE(0);
-}
-
-static int acpi_processor_info_open_fs(struct inode *inode, struct file *file)
-{
-	return single_open(file, acpi_processor_info_seq_show,
-						PDE(inode)->data);
-}
-
-static int acpi_processor_power_seq_show(struct seq_file *seq, void *offset)
-{
-	struct acpi_processor	*pr = (struct acpi_processor *)seq->private;
-	unsigned int		i;
-
-	ACPI_FUNCTION_TRACE("acpi_processor_power_seq_show");
-
-	if (!pr)
-		goto end;
-
-	seq_printf(seq, "active state:            C%d\n"
-			"default state:           C%d\n"
-			"max_cstate:              C%d\n"
-			"bus master activity:     %08x\n",
-			pr->power.state,
-			pr->power.default_state,
-			max_cstate,
-			pr->power.bm_activity);
-
-	seq_puts(seq, "states:\n");
-
-	for (i = 1; i < ACPI_C_STATE_COUNT; i++) {
-		seq_printf(seq, "   %cC%d:                  ", 
-			(i == pr->power.state?'*':' '), i);
-
-		if (!pr->power.states[i].valid) {
-			seq_puts(seq, "<not supported>\n");
-			continue;
-		}
-
-		if (pr->power.states[i].promotion.state)
-			seq_printf(seq, "promotion[C%d] ",
-				pr->power.states[i].promotion.state);
-		else
-			seq_puts(seq, "promotion[--] ");
-
-		if (pr->power.states[i].demotion.state)
-			seq_printf(seq, "demotion[C%d] ",
-				pr->power.states[i].demotion.state);
-		else
-			seq_puts(seq, "demotion[--] ");
-
-		seq_printf(seq, "latency[%03d] usage[%08d]\n",
-			pr->power.states[i].latency,
-			pr->power.states[i].usage);
-	}
-
-end:
-	return_VALUE(0);
-}
-
-static int acpi_processor_power_open_fs(struct inode *inode, struct file *file)
-{
-	return single_open(file, acpi_processor_power_seq_show,
-						PDE(inode)->data);
-}
-
-static int acpi_processor_throttling_seq_show(struct seq_file *seq, void *offset)
-{
-	struct acpi_processor	*pr = (struct acpi_processor *)seq->private;
-	int			i = 0;
-	int                     result = 0;
-
-	ACPI_FUNCTION_TRACE("acpi_processor_throttling_seq_show");
-
-	if (!pr)
-		goto end;
-
-	if (!(pr->throttling.state_count > 0)) {
-		seq_puts(seq, "<not supported>\n");
-		goto end;
-	}
-
-	result = acpi_processor_get_throttling(pr);
-
-	if (result) {
-		seq_puts(seq, "Could not determine current throttling state.\n");
-		goto end;
-	}
-
-	seq_printf(seq, "state count:             %d\n"
-			"active state:            T%d\n",
-			pr->throttling.state_count,
-			pr->throttling.state);
-
-	seq_puts(seq, "states:\n");
-	for (i = 0; i < pr->throttling.state_count; i++)
-		seq_printf(seq, "   %cT%d:                  %02d%%\n",
-			(i == pr->throttling.state?'*':' '), i,
-			(pr->throttling.states[i].performance?pr->throttling.states[i].performance/10:0));
-
-end:
-	return_VALUE(0);
-}
-
-static int acpi_processor_throttling_open_fs(struct inode *inode, struct file *file)
-{
-	return single_open(file, acpi_processor_throttling_seq_show,
-						PDE(inode)->data);
-}
-
-static ssize_t
-acpi_processor_write_throttling (
-        struct file		*file,
-        const char		__user *buffer,
-        size_t			count,
-        loff_t			*data)
-{
-	int			result = 0;
-        struct seq_file 	*m = (struct seq_file *)file->private_data;
-	struct acpi_processor	*pr = (struct acpi_processor *)m->private;
-	char			state_string[12] = {'\0'};
-
-	ACPI_FUNCTION_TRACE("acpi_processor_write_throttling");
-
-	if (!pr || (count > sizeof(state_string) - 1))
-		return_VALUE(-EINVAL);
-	
-	if (copy_from_user(state_string, buffer, count))
-		return_VALUE(-EFAULT);
-	
-	state_string[count] = '\0';
-	
-	result = acpi_processor_set_throttling(pr, 
-		simple_strtoul(state_string, NULL, 0));
-	if (result)
-		return_VALUE(result);
-
-	return_VALUE(count);
-}
-
-static int acpi_processor_limit_seq_show(struct seq_file *seq, void *offset)
-{
-	struct acpi_processor	*pr = (struct acpi_processor *)seq->private;
-
-	ACPI_FUNCTION_TRACE("acpi_processor_limit_seq_show");
-
-	if (!pr)
-		goto end;
-
-	if (!pr->flags.limit) {
-		seq_puts(seq, "<not supported>\n");
-		goto end;
-	}
-
-	seq_printf(seq, "active limit:            P%d:T%d\n"
-			"user limit:              P%d:T%d\n"
-			"thermal limit:           P%d:T%d\n",
-			pr->limit.state.px, pr->limit.state.tx,
-			pr->limit.user.px, pr->limit.user.tx,
-			pr->limit.thermal.px, pr->limit.thermal.tx);
-
-end:
-	return_VALUE(0);
-}
-
-static int acpi_processor_limit_open_fs(struct inode *inode, struct file *file)
-{
-	return single_open(file, acpi_processor_limit_seq_show,
-						PDE(inode)->data);
-}
-
-static ssize_t
-acpi_processor_write_limit (
-	struct file		*file,
-	const char		__user *buffer,
-	size_t			count,
-	loff_t			*data)
-{
-	int			result = 0;
-        struct seq_file 	*m = (struct seq_file *)file->private_data;
-	struct acpi_processor	*pr = (struct acpi_processor *)m->private;
-	char			limit_string[25] = {'\0'};
-	int			px = 0;
-	int			tx = 0;
-
-	ACPI_FUNCTION_TRACE("acpi_processor_write_limit");
-
-	if (!pr || (count > sizeof(limit_string) - 1)) {
-		ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid argument\n"));
-		return_VALUE(-EINVAL);
-	}
-	
-	if (copy_from_user(limit_string, buffer, count)) {
-		ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid data\n"));
-		return_VALUE(-EFAULT);
-	}
-	
-	limit_string[count] = '\0';
-
-	if (sscanf(limit_string, "%d:%d", &px, &tx) != 2) {
-		ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid data format\n"));
-		return_VALUE(-EINVAL);
-	}
-
-	if (pr->flags.throttling) {
-		if ((tx < 0) || (tx > (pr->throttling.state_count - 1))) {
-			ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid tx\n"));
-			return_VALUE(-EINVAL);
-		}
-		pr->limit.user.tx = tx;
-	}
-
-	result = acpi_processor_apply_limit(pr);
-
-	return_VALUE(count);
-}
-
-
-static int
-acpi_processor_add_fs (
-	struct acpi_device	*device)
-{
-	struct proc_dir_entry	*entry = NULL;
-
-	ACPI_FUNCTION_TRACE("acpi_processor_add_fs");
-
-	if (!acpi_device_dir(device)) {
-		acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device),
-			acpi_processor_dir);
-		if (!acpi_device_dir(device))
-			return_VALUE(-ENODEV);
-	}
-	acpi_device_dir(device)->owner = THIS_MODULE;
-
-	/* 'info' [R] */
-	entry = create_proc_entry(ACPI_PROCESSOR_FILE_INFO,
-		S_IRUGO, acpi_device_dir(device));
-	if (!entry)
-		ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
-			"Unable to create '%s' fs entry\n",
-			ACPI_PROCESSOR_FILE_INFO));
-	else {
-		entry->proc_fops = &acpi_processor_info_fops;
-		entry->data = acpi_driver_data(device);
-		entry->owner = THIS_MODULE;
-	}
-
-	/* 'power' [R] */
-	entry = create_proc_entry(ACPI_PROCESSOR_FILE_POWER,
-		S_IRUGO, acpi_device_dir(device));
-	if (!entry)
-		ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
-			"Unable to create '%s' fs entry\n",
-			ACPI_PROCESSOR_FILE_POWER));
-	else {
-		entry->proc_fops = &acpi_processor_power_fops;
-		entry->data = acpi_driver_data(device);
-		entry->owner = THIS_MODULE;
-	}
-
-	/* 'throttling' [R/W] */
-	entry = create_proc_entry(ACPI_PROCESSOR_FILE_THROTTLING,
-		S_IFREG|S_IRUGO|S_IWUSR, acpi_device_dir(device));
-	if (!entry)
-		ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
-			"Unable to create '%s' fs entry\n",
-			ACPI_PROCESSOR_FILE_THROTTLING));
-	else {
-		entry->proc_fops = &acpi_processor_throttling_fops;
-		entry->proc_fops->write = acpi_processor_write_throttling;
-		entry->data = acpi_driver_data(device);
-		entry->owner = THIS_MODULE;
-	}
-
-	/* 'limit' [R/W] */
-	entry = create_proc_entry(ACPI_PROCESSOR_FILE_LIMIT,
-		S_IFREG|S_IRUGO|S_IWUSR, acpi_device_dir(device));
-	if (!entry)
-		ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
-			"Unable to create '%s' fs entry\n",
-			ACPI_PROCESSOR_FILE_LIMIT));
-	else {
-		entry->proc_fops = &acpi_processor_limit_fops;
-		entry->proc_fops->write = acpi_processor_write_limit;
-		entry->data = acpi_driver_data(device);
-		entry->owner = THIS_MODULE;
-	}
-
-	return_VALUE(0);
-}
-
-
-static int
-acpi_processor_remove_fs (
-	struct acpi_device	*device)
-{
-	ACPI_FUNCTION_TRACE("acpi_processor_remove_fs");
-
-	if (acpi_device_dir(device)) {
-		remove_proc_entry(ACPI_PROCESSOR_FILE_INFO,acpi_device_dir(device));
-		remove_proc_entry(ACPI_PROCESSOR_FILE_POWER,acpi_device_dir(device));
-		remove_proc_entry(ACPI_PROCESSOR_FILE_THROTTLING,
-			acpi_device_dir(device));
-		remove_proc_entry(ACPI_PROCESSOR_FILE_LIMIT,acpi_device_dir(device));
-		remove_proc_entry(acpi_device_bid(device), acpi_processor_dir);
-		acpi_device_dir(device) = NULL;
-	}
-
-	return_VALUE(0);
-}
-
-/* Use the acpiid in MADT to map cpus in case of SMP */
-#ifndef CONFIG_SMP
-#define convert_acpiid_to_cpu(acpi_id) (0xff)
-#else
-
-#ifdef CONFIG_IA64
-#define arch_acpiid_to_apicid 	ia64_acpiid_to_sapicid
-#define arch_cpu_to_apicid 	ia64_cpu_to_sapicid
-#define ARCH_BAD_APICID		(0xffff)
-#else
-#define arch_acpiid_to_apicid 	x86_acpiid_to_apicid
-#define arch_cpu_to_apicid 	x86_cpu_to_apicid
-#define ARCH_BAD_APICID		(0xff)
-#endif
-
-static u8 convert_acpiid_to_cpu(u8 acpi_id)
-{
-	u16 apic_id;
-	int i;
-	
-	apic_id = arch_acpiid_to_apicid[acpi_id];
-	if (apic_id == ARCH_BAD_APICID)
-		return -1;
-
-	for (i = 0; i < NR_CPUS; i++) {
-		if (arch_cpu_to_apicid[i] == apic_id)
-			return i;
-	}
-	return -1;
-}
-#endif
-
-/* --------------------------------------------------------------------------
-                                 Driver Interface
-   -------------------------------------------------------------------------- */
-
-static int
-acpi_processor_get_info (
-	struct acpi_processor	*pr)
-{
-	acpi_status		status = 0;
-	union acpi_object	object = {0};
-	struct acpi_buffer	buffer = {sizeof(union acpi_object), &object};
-	u8			cpu_index;
-	static int		cpu0_initialized;
-
-	ACPI_FUNCTION_TRACE("acpi_processor_get_info");
-
-	if (!pr)
-		return_VALUE(-EINVAL);
-
-	if (num_online_cpus() > 1)
-		errata.smp = TRUE;
-
-	acpi_processor_errata(pr);
-
-	/*
-	 * Check to see if we have bus mastering arbitration control.  This
-	 * is required for proper C3 usage (to maintain cache coherency).
-	 */
-	if (acpi_fadt.V1_pm2_cnt_blk && acpi_fadt.pm2_cnt_len) {
-		pr->flags.bm_control = 1;
-		ACPI_DEBUG_PRINT((ACPI_DB_INFO,
-			"Bus mastering arbitration control present\n"));
-	}
-	else
-		ACPI_DEBUG_PRINT((ACPI_DB_INFO,
-			"No bus mastering arbitration control\n"));
-
-	/*
-	 * Evalute the processor object.  Note that it is common on SMP to
-	 * have the first (boot) processor with a valid PBLK address while
-	 * all others have a NULL address.
-	 */
-	status = acpi_evaluate_object(pr->handle, NULL, NULL, &buffer);
-	if (ACPI_FAILURE(status)) {
-		ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
-			"Error evaluating processor object\n"));
-		return_VALUE(-ENODEV);
-	}
-
-	/*
-	 * TBD: Synch processor ID (via LAPIC/LSAPIC structures) on SMP.
-	 *	>>> 'acpi_get_processor_id(acpi_id, &id)' in arch/xxx/acpi.c
-	 */
-	pr->acpi_id = object.processor.proc_id;
-
-	cpu_index = convert_acpiid_to_cpu(pr->acpi_id);
-
-	if ( !cpu0_initialized && (cpu_index == 0xff)) {
-		/* Handle UP system running SMP kernel, with no LAPIC in MADT */
-		cpu_index = 0;
-	} else if (cpu_index > num_online_cpus()) {
-		/*
-		 *  Extra Processor objects may be enumerated on MP systems with
-		 *  less than the max # of CPUs. They should be ignored.
-		 */
-		ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
-			"Error getting cpuindex for acpiid 0x%x\n",
-			pr->acpi_id));
-		return_VALUE(-ENODEV);
-	}
-	cpu0_initialized = 1;
-
-	pr->id = cpu_index;
-
-	ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Processor [%d:%d]\n", pr->id, 
-		pr->acpi_id));
-
-	if (!object.processor.pblk_address)
-		ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No PBLK (NULL address)\n"));
-	else if (object.processor.pblk_length != 6)
-		ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid PBLK length [%d]\n",
-			object.processor.pblk_length));
-	else {
-		pr->throttling.address = object.processor.pblk_address;
-		pr->throttling.duty_offset = acpi_fadt.duty_offset;
-		pr->throttling.duty_width = acpi_fadt.duty_width;
-		pr->power.states[ACPI_STATE_C2].address =
-			object.processor.pblk_address + 4;
-		pr->power.states[ACPI_STATE_C3].address =
-			object.processor.pblk_address + 5;
-
-		/*
-		 * We don't care about error returns - we just try to mark
-		 * these reserved so that nobody else is confused into thinking
-		 * that this region might be unused..
-		 *
-		 * (In particular, allocating the IO range for Cardbus)
-		 */
-		request_region(pr->throttling.address, 6, "ACPI CPU throttle");
-	}
-
-	acpi_processor_get_power_info(pr);
-#ifdef CONFIG_CPU_FREQ
-	acpi_processor_ppc_has_changed(pr);
-#endif
-	acpi_processor_get_throttling_info(pr);
-	acpi_processor_get_limit_info(pr);
-
-	return_VALUE(0);
-}
-
-
-static void
-acpi_processor_notify (
-	acpi_handle		handle,
-	u32			event,
-	void			*data)
-{
-	struct acpi_processor	*pr = (struct acpi_processor *) data;
-	struct acpi_device	*device = NULL;
-
-	ACPI_FUNCTION_TRACE("acpi_processor_notify");
-
-	if (!pr)
-		return_VOID;
-
-	if (acpi_bus_get_device(pr->handle, &device))
-		return_VOID;
-
-	switch (event) {
-	case ACPI_PROCESSOR_NOTIFY_PERFORMANCE:
-		acpi_processor_ppc_has_changed(pr);
-		acpi_bus_generate_event(device, event, 
-			pr->performance_platform_limit);
-		break;
-	case ACPI_PROCESSOR_NOTIFY_POWER:
-		/* TBD */
-		acpi_bus_generate_event(device, event, 0);
-		break;
-	default:
-		ACPI_DEBUG_PRINT((ACPI_DB_INFO,
-			"Unsupported event [0x%x]\n", event));
-		break;
-	}
-
-	return_VOID;
-}
-
-
-static int
-acpi_processor_add (
-	struct acpi_device	*device)
-{
-	int			result = 0;
-	acpi_status		status = AE_OK;
-	struct acpi_processor	*pr = NULL;
-	u32			i = 0;
-
-	ACPI_FUNCTION_TRACE("acpi_processor_add");
-
-	if (!device)
-		return_VALUE(-EINVAL);
-
-	pr = kmalloc(sizeof(struct acpi_processor), GFP_KERNEL);
-	if (!pr)
-		return_VALUE(-ENOMEM);
-	memset(pr, 0, sizeof(struct acpi_processor));
-
-	pr->handle = device->handle;
-	strcpy(acpi_device_name(device), ACPI_PROCESSOR_DEVICE_NAME);
-	strcpy(acpi_device_class(device), ACPI_PROCESSOR_CLASS);
-	acpi_driver_data(device) = pr;
-
-	result = acpi_processor_get_info(pr);
-	if (result)
-		goto end;
-
-	result = acpi_processor_add_fs(device);
-	if (result)
-		goto end;
-
-	status = acpi_install_notify_handler(pr->handle, ACPI_DEVICE_NOTIFY, 
-		acpi_processor_notify, pr);
-	if (ACPI_FAILURE(status)) {
-		ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 
-			"Error installing notify handler\n"));
-		result = -ENODEV;
-		goto end;
-	}
-
-	processors[pr->id] = pr;
-
-	/*
-	 * Install the idle handler if processor power management is supported.
-	 * Note that we use previously set idle handler will be used on 
-	 * platforms that only support C1.
-	 */
-	if ((pr->flags.power) && (!boot_option_idle_override)) {
-		printk(KERN_INFO PREFIX "%s [%s] (supports",
-			acpi_device_name(device), acpi_device_bid(device));
-		for (i = 1; i < ACPI_C_STATE_COUNT; i++)
-			if (pr->power.states[i].valid)
-				printk(" C%d", i);
-		printk(")\n");
-		if (pr->id == 0) {
-			pm_idle_save = pm_idle;
-			pm_idle = acpi_processor_idle;
-		}
-	}
-	
-	if (pr->flags.throttling) {
-		printk(KERN_INFO PREFIX "%s [%s] (supports",
-			acpi_device_name(device), acpi_device_bid(device));
-		printk(" %d throttling states", pr->throttling.state_count);
-		printk(")\n");
-	}
-
-end:
-	if (result) {
-		acpi_processor_remove_fs(device);
-		kfree(pr);
-	}
-
-	return_VALUE(result);
-}
-
-
-static int
-acpi_processor_remove (
-	struct acpi_device	*device,
-	int			type)
-{
-	acpi_status		status = AE_OK;
-	struct acpi_processor	*pr = NULL;
-
-	ACPI_FUNCTION_TRACE("acpi_processor_remove");
-
-	if (!device || !acpi_driver_data(device))
-		return_VALUE(-EINVAL);
-
-	pr = (struct acpi_processor *) acpi_driver_data(device);
-
-	/* Unregister the idle handler when processor #0 is removed. */
-	if (pr->id == 0) {
-		pm_idle = pm_idle_save;
-		/*
-		 * We are about to unload the current idle thread pm callback
-		 * (pm_idle), Wait for all processors to update cached/local
-		 * copies of pm_idle before proceeding.
-		 */
-		synchronize_kernel();
-	}
-
-	status = acpi_remove_notify_handler(pr->handle, ACPI_DEVICE_NOTIFY, 
-		acpi_processor_notify);
-	if (ACPI_FAILURE(status)) {
-		ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 
-			"Error removing notify handler\n"));
-	}
-
-	acpi_processor_remove_fs(device);
-
-	processors[pr->id] = NULL;
-
-	kfree(pr);
-
-	return_VALUE(0);
-}
-
-/*
- * IBM ThinkPad R40e crashes mysteriously when going into C2 or C3. 
- * For now disable this. Probably a bug somewhere else.
- *
- * To skip this limit, boot/load with a large max_cstate limit.
- */
-static int no_c2c3(struct dmi_system_id *id)
-{
-	if (max_cstate > ACPI_C_STATES_MAX)
-		return 0;
-
-	printk(KERN_NOTICE PREFIX "%s detected - C2,C3 disabled."
-		" Override with \"processor.max_cstate=9\"\n", id->ident);
-
-	max_cstate = 1;
-
-	return 0;
-}
-
-static struct dmi_system_id __initdata processor_dmi_table[] = { 
-	{ no_c2c3, "IBM ThinkPad R40e", {
-	  DMI_MATCH(DMI_BIOS_VENDOR,"IBM"),
-	  DMI_MATCH(DMI_BIOS_VERSION,"1SET60WW") }},
-	{ no_c2c3, "Medion 41700", {
-	  DMI_MATCH(DMI_BIOS_VENDOR,"Phoenix Technologies LTD"),
-	  DMI_MATCH(DMI_BIOS_VERSION,"R01-A1J") }},
-	{},
-};
-
-/* We keep the driver loaded even when ACPI is not running. 
-   This is needed for the powernow-k8 driver, that works even without
-   ACPI, but needs symbols from this driver */
-
-static int __init
-acpi_processor_init (void)
-{
-	int			result = 0;
-
-	ACPI_FUNCTION_TRACE("acpi_processor_init");
-
-	memset(&processors, 0, sizeof(processors));
-	memset(&errata, 0, sizeof(errata));
-
-	acpi_processor_dir = proc_mkdir(ACPI_PROCESSOR_CLASS, acpi_root_dir);
-	if (!acpi_processor_dir)
-		return_VALUE(0);
-	acpi_processor_dir->owner = THIS_MODULE;
-
-	result = acpi_bus_register_driver(&acpi_processor_driver);
-	if (result < 0) {
-		remove_proc_entry(ACPI_PROCESSOR_CLASS, acpi_root_dir);
-		return_VALUE(0);
-	}
-
-	acpi_thermal_cpufreq_init();
-
-	acpi_processor_ppc_init();
-
-	dmi_check_system(processor_dmi_table); 
-
-	if (max_cstate < ACPI_C_STATES_MAX)
-		printk(KERN_NOTICE "ACPI: processor limited to max C-state %d\n", max_cstate);
-
-	return_VALUE(0);
-}
-
-
-static void __exit
-acpi_processor_exit (void)
-{
-	ACPI_FUNCTION_TRACE("acpi_processor_exit");
-
-	acpi_processor_ppc_exit();
-
-	acpi_thermal_cpufreq_exit();
-
-	acpi_bus_unregister_driver(&acpi_processor_driver);
-
-	remove_proc_entry(ACPI_PROCESSOR_CLASS, acpi_root_dir);
-
-	return_VOID;
-}
-
-
-module_init(acpi_processor_init);
-module_exit(acpi_processor_exit);
-module_param_named(max_cstate, max_cstate, uint, 0);
-
-EXPORT_SYMBOL(acpi_processor_set_thermal_limit);
diff -Nru a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/acpi/processor_core.c	2005-01-10 20:11:20 -08:00
@@ -0,0 +1,989 @@
+/*
+ * acpi_processor.c - ACPI Processor Driver ($Revision: 71 $)
+ *
+ *  Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
+ *  Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
+ *  Copyright (C) 2004       Dominik Brodowski <linux@brodo.de>
+ *  Copyright (C) 2004  Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
+ *  			- Added processor hotplug support
+ *
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ *
+ *  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.
+ *
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ *  TBD:
+ *	1. Make # power states dynamic.
+ *	2. Support duty_cycle values that span bit 4.
+ *	3. Optimize by having scheduler determine business instead of
+ *	   having us try to calculate it here.
+ *	4. Need C1 timing -- must modify kernel (IRQ handler) to get this.
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/types.h>
+#include <linux/pci.h>
+#include <linux/pm.h>
+#include <linux/cpufreq.h>
+#include <linux/cpu.h>
+#include <linux/proc_fs.h>
+#include <linux/seq_file.h>
+#include <linux/dmi.h>
+#include <linux/moduleparam.h>
+
+#include <asm/io.h>
+#include <asm/system.h>
+#include <asm/cpu.h>
+#include <asm/delay.h>
+#include <asm/uaccess.h>
+#include <asm/processor.h>
+#include <asm/smp.h>
+#include <asm/acpi.h>
+
+#include <acpi/acpi_bus.h>
+#include <acpi/acpi_drivers.h>
+#include <acpi/processor.h>
+
+
+#define ACPI_PROCESSOR_COMPONENT	0x01000000
+#define ACPI_PROCESSOR_CLASS		"processor"
+#define ACPI_PROCESSOR_DRIVER_NAME	"ACPI Processor Driver"
+#define ACPI_PROCESSOR_DEVICE_NAME	"Processor"
+#define ACPI_PROCESSOR_FILE_INFO	"info"
+#define ACPI_PROCESSOR_FILE_THROTTLING	"throttling"
+#define ACPI_PROCESSOR_FILE_LIMIT	"limit"
+#define ACPI_PROCESSOR_NOTIFY_PERFORMANCE 0x80
+#define ACPI_PROCESSOR_NOTIFY_POWER	0x81
+
+#define ACPI_PROCESSOR_LIMIT_USER	0
+#define ACPI_PROCESSOR_LIMIT_THERMAL	1
+
+#define ACPI_STA_PRESENT 0x00000001
+
+#define _COMPONENT		ACPI_PROCESSOR_COMPONENT
+ACPI_MODULE_NAME		("acpi_processor")
+
+MODULE_AUTHOR("Paul Diefenbaugh");
+MODULE_DESCRIPTION(ACPI_PROCESSOR_DRIVER_NAME);
+MODULE_LICENSE("GPL");
+
+
+static int acpi_processor_add (struct acpi_device *device);
+static int acpi_processor_start (struct acpi_device *device);
+static int acpi_processor_remove (struct acpi_device *device, int type);
+static int acpi_processor_info_open_fs(struct inode *inode, struct file *file);
+static void acpi_processor_notify ( acpi_handle	handle, u32 event, void *data);
+static acpi_status acpi_processor_hotadd_init(acpi_handle handle, int *p_cpu);
+static int acpi_processor_handle_eject(struct acpi_processor *pr);
+
+static struct acpi_driver acpi_processor_driver = {
+	.name =		ACPI_PROCESSOR_DRIVER_NAME,
+	.class =	ACPI_PROCESSOR_CLASS,
+	.ids =		ACPI_PROCESSOR_HID,
+	.ops =		{
+				.add =		acpi_processor_add,
+				.remove =	acpi_processor_remove,
+				.start	= 	acpi_processor_start,
+			},
+};
+
+#define INSTALL_NOTIFY_HANDLER		1
+#define UNINSTALL_NOTIFY_HANDLER	2
+
+
+struct file_operations acpi_processor_info_fops = {
+	.open 		= acpi_processor_info_open_fs,
+	.read		= seq_read,
+	.llseek		= seq_lseek,
+	.release	= single_release,
+};
+
+
+struct acpi_processor	*processors[NR_CPUS];
+struct acpi_processor_errata errata;
+
+
+/* --------------------------------------------------------------------------
+                                Errata Handling
+   -------------------------------------------------------------------------- */
+
+int
+acpi_processor_errata_piix4 (
+	struct pci_dev		*dev)
+{
+	u8			rev = 0;
+	u8			value1 = 0;
+	u8			value2 = 0;
+
+	ACPI_FUNCTION_TRACE("acpi_processor_errata_piix4");
+
+	if (!dev)
+		return_VALUE(-EINVAL);
+
+	/*
+	 * Note that 'dev' references the PIIX4 ACPI Controller.
+	 */
+
+	pci_read_config_byte(dev, PCI_REVISION_ID, &rev);
+
+	switch (rev) {
+	case 0:
+		ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found PIIX4 A-step\n"));
+		break;
+	case 1:
+		ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found PIIX4 B-step\n"));
+		break;
+	case 2:
+		ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found PIIX4E\n"));
+		break;
+	case 3:
+		ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found PIIX4M\n"));
+		break;
+	default:
+		ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found unknown PIIX4\n"));
+		break;
+	}
+
+	switch (rev) {
+
+	case 0:		/* PIIX4 A-step */
+	case 1:		/* PIIX4 B-step */
+		/*
+		 * See specification changes #13 ("Manual Throttle Duty Cycle")
+		 * and #14 ("Enabling and Disabling Manual Throttle"), plus
+		 * erratum #5 ("STPCLK# Deassertion Time") from the January
+		 * 2002 PIIX4 specification update.  Applies to only older
+		 * PIIX4 models.
+		 */
+		errata.piix4.throttle = 1;
+
+	case 2:		/* PIIX4E */
+	case 3:		/* PIIX4M */
+		/*
+		 * See erratum #18 ("C3 Power State/BMIDE and Type-F DMA
+		 * Livelock") from the January 2002 PIIX4 specification update.
+		 * Applies to all PIIX4 models.
+		 */
+
+		/*
+		 * BM-IDE
+		 * ------
+		 * Find the PIIX4 IDE Controller and get the Bus Master IDE
+		 * Status register address.  We'll use this later to read
+		 * each IDE controller's DMA status to make sure we catch all
+		 * DMA activity.
+		 */
+		dev = pci_get_subsys(PCI_VENDOR_ID_INTEL,
+		           PCI_DEVICE_ID_INTEL_82371AB,
+                           PCI_ANY_ID, PCI_ANY_ID, NULL);
+		if (dev) {
+			errata.piix4.bmisx = pci_resource_start(dev, 4);
+			pci_dev_put(dev);
+		}
+
+		/*
+		 * Type-F DMA
+		 * ----------
+		 * Find the PIIX4 ISA Controller and read the Motherboard
+		 * DMA controller's status to see if Type-F (Fast) DMA mode
+		 * is enabled (bit 7) on either channel.  Note that we'll
+		 * disable C3 support if this is enabled, as some legacy
+		 * devices won't operate well if fast DMA is disabled.
+		 */
+		dev = pci_get_subsys(PCI_VENDOR_ID_INTEL,
+			PCI_DEVICE_ID_INTEL_82371AB_0,
+			PCI_ANY_ID, PCI_ANY_ID, NULL);
+		if (dev) {
+			pci_read_config_byte(dev, 0x76, &value1);
+			pci_read_config_byte(dev, 0x77, &value2);
+			if ((value1 & 0x80) || (value2 & 0x80))
+				errata.piix4.fdma = 1;
+			pci_dev_put(dev);
+		}
+
+		break;
+	}
+
+	if (errata.piix4.bmisx)
+		ACPI_DEBUG_PRINT((ACPI_DB_INFO,
+			"Bus master activity detection (BM-IDE) erratum enabled\n"));
+	if (errata.piix4.fdma)
+		ACPI_DEBUG_PRINT((ACPI_DB_INFO,
+			"Type-F DMA livelock erratum (C3 disabled)\n"));
+
+	return_VALUE(0);
+}
+
+
+int
+acpi_processor_errata (
+	struct acpi_processor	*pr)
+{
+	int			result = 0;
+	struct pci_dev		*dev = NULL;
+
+	ACPI_FUNCTION_TRACE("acpi_processor_errata");
+
+	if (!pr)
+		return_VALUE(-EINVAL);
+
+	/*
+	 * PIIX4
+	 */
+	dev = pci_get_subsys(PCI_VENDOR_ID_INTEL,
+		PCI_DEVICE_ID_INTEL_82371AB_3, PCI_ANY_ID, PCI_ANY_ID, NULL);
+	if (dev) {
+		result = acpi_processor_errata_piix4(dev);
+		pci_dev_put(dev);
+	}
+
+	return_VALUE(result);
+}
+
+
+/* --------------------------------------------------------------------------
+                              FS Interface (/proc)
+   -------------------------------------------------------------------------- */
+
+struct proc_dir_entry		*acpi_processor_dir = NULL;
+
+static int acpi_processor_info_seq_show(struct seq_file *seq, void *offset)
+{
+	struct acpi_processor	*pr = (struct acpi_processor *)seq->private;
+
+	ACPI_FUNCTION_TRACE("acpi_processor_info_seq_show");
+
+	if (!pr)
+		goto end;
+
+	seq_printf(seq, "processor id:            %d\n"
+			"acpi id:                 %d\n"
+			"bus mastering control:   %s\n"
+			"power management:        %s\n"
+			"throttling control:      %s\n"
+			"limit interface:         %s\n",
+			pr->id,
+			pr->acpi_id,
+			pr->flags.bm_control ? "yes" : "no",
+			pr->flags.power ? "yes" : "no",
+			pr->flags.throttling ? "yes" : "no",
+			pr->flags.limit ? "yes" : "no");
+
+end:
+	return_VALUE(0);
+}
+
+static int acpi_processor_info_open_fs(struct inode *inode, struct file *file)
+{
+	return single_open(file, acpi_processor_info_seq_show,
+						PDE(inode)->data);
+}
+
+
+static int
+acpi_processor_add_fs (
+	struct acpi_device	*device)
+{
+	struct proc_dir_entry	*entry = NULL;
+
+	ACPI_FUNCTION_TRACE("acpi_processor_add_fs");
+
+	if (!acpi_device_dir(device)) {
+		acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device),
+			acpi_processor_dir);
+		if (!acpi_device_dir(device))
+			return_VALUE(-ENODEV);
+	}
+	acpi_device_dir(device)->owner = THIS_MODULE;
+
+	/* 'info' [R] */
+	entry = create_proc_entry(ACPI_PROCESSOR_FILE_INFO,
+		S_IRUGO, acpi_device_dir(device));
+	if (!entry)
+		ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
+			"Unable to create '%s' fs entry\n",
+			ACPI_PROCESSOR_FILE_INFO));
+	else {
+		entry->proc_fops = &acpi_processor_info_fops;
+		entry->data = acpi_driver_data(device);
+		entry->owner = THIS_MODULE;
+	}
+
+	/* 'throttling' [R/W] */
+	entry = create_proc_entry(ACPI_PROCESSOR_FILE_THROTTLING,
+		S_IFREG|S_IRUGO|S_IWUSR, acpi_device_dir(device));
+	if (!entry)
+		ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
+			"Unable to create '%s' fs entry\n",
+			ACPI_PROCESSOR_FILE_THROTTLING));
+	else {
+		entry->proc_fops = &acpi_processor_throttling_fops;
+		entry->proc_fops->write = acpi_processor_write_throttling;
+		entry->data = acpi_driver_data(device);
+		entry->owner = THIS_MODULE;
+	}
+
+	/* 'limit' [R/W] */
+	entry = create_proc_entry(ACPI_PROCESSOR_FILE_LIMIT,
+		S_IFREG|S_IRUGO|S_IWUSR, acpi_device_dir(device));
+	if (!entry)
+		ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
+			"Unable to create '%s' fs entry\n",
+			ACPI_PROCESSOR_FILE_LIMIT));
+	else {
+		entry->proc_fops = &acpi_processor_limit_fops;
+		entry->proc_fops->write = acpi_processor_write_limit;
+		entry->data = acpi_driver_data(device);
+		entry->owner = THIS_MODULE;
+	}
+
+	return_VALUE(0);
+}
+
+
+static int
+acpi_processor_remove_fs (
+	struct acpi_device	*device)
+{
+	ACPI_FUNCTION_TRACE("acpi_processor_remove_fs");
+
+	if (acpi_device_dir(device)) {
+		remove_proc_entry(ACPI_PROCESSOR_FILE_INFO,acpi_device_dir(device));
+		remove_proc_entry(ACPI_PROCESSOR_FILE_THROTTLING,
+			acpi_device_dir(device));
+		remove_proc_entry(ACPI_PROCESSOR_FILE_LIMIT,acpi_device_dir(device));
+		remove_proc_entry(acpi_device_bid(device), acpi_processor_dir);
+		acpi_device_dir(device) = NULL;
+	}
+
+	return_VALUE(0);
+}
+
+/* Use the acpiid in MADT to map cpus in case of SMP */
+#ifndef CONFIG_SMP
+#define convert_acpiid_to_cpu(acpi_id) (0xff)
+#else
+
+#ifdef CONFIG_IA64
+#define arch_acpiid_to_apicid 	ia64_acpiid_to_sapicid
+#define arch_cpu_to_apicid 	ia64_cpu_to_sapicid
+#define ARCH_BAD_APICID		(0xffff)
+#else
+#define arch_acpiid_to_apicid 	x86_acpiid_to_apicid
+#define arch_cpu_to_apicid 	x86_cpu_to_apicid
+#define ARCH_BAD_APICID		(0xff)
+#endif
+
+static u8 convert_acpiid_to_cpu(u8 acpi_id)
+{
+	u16 apic_id;
+	int i;
+
+	apic_id = arch_acpiid_to_apicid[acpi_id];
+	if (apic_id == ARCH_BAD_APICID)
+		return -1;
+
+	for (i = 0; i < NR_CPUS; i++) {
+		if (arch_cpu_to_apicid[i] == apic_id)
+			return i;
+	}
+	return -1;
+}
+#endif
+
+/* --------------------------------------------------------------------------
+                                 Driver Interface
+   -------------------------------------------------------------------------- */
+
+static int
+acpi_processor_get_info (
+	struct acpi_processor	*pr)
+{
+	acpi_status		status = 0;
+	union acpi_object	object = {0};
+	struct acpi_buffer	buffer = {sizeof(union acpi_object), &object};
+	u8			cpu_index;
+	static int		cpu0_initialized;
+
+	ACPI_FUNCTION_TRACE("acpi_processor_get_info");
+
+	if (!pr)
+		return_VALUE(-EINVAL);
+
+	if (num_online_cpus() > 1)
+		errata.smp = TRUE;
+
+	acpi_processor_errata(pr);
+
+	/*
+	 * Check to see if we have bus mastering arbitration control.  This
+	 * is required for proper C3 usage (to maintain cache coherency).
+	 */
+	if (acpi_fadt.V1_pm2_cnt_blk && acpi_fadt.pm2_cnt_len) {
+		pr->flags.bm_control = 1;
+		ACPI_DEBUG_PRINT((ACPI_DB_INFO,
+			"Bus mastering arbitration control present\n"));
+	}
+	else
+		ACPI_DEBUG_PRINT((ACPI_DB_INFO,
+			"No bus mastering arbitration control\n"));
+
+	/*
+	 * Evalute the processor object.  Note that it is common on SMP to
+	 * have the first (boot) processor with a valid PBLK address while
+	 * all others have a NULL address.
+	 */
+	status = acpi_evaluate_object(pr->handle, NULL, NULL, &buffer);
+	if (ACPI_FAILURE(status)) {
+		ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
+			"Error evaluating processor object\n"));
+		return_VALUE(-ENODEV);
+	}
+
+	/*
+	 * TBD: Synch processor ID (via LAPIC/LSAPIC structures) on SMP.
+	 *	>>> 'acpi_get_processor_id(acpi_id, &id)' in arch/xxx/acpi.c
+	 */
+	pr->acpi_id = object.processor.proc_id;
+
+	cpu_index = convert_acpiid_to_cpu(pr->acpi_id);
+
+  	/* Handle UP system running SMP kernel, with no LAPIC in MADT */
+  	if ( !cpu0_initialized && (cpu_index == 0xff) &&
+  		       	(num_online_cpus() == 1)) {
+   		cpu_index = 0;
+   	}
+
+   	cpu0_initialized = 1;
+
+   	pr->id = cpu_index;
+
+  	/*
+  	 *  Extra Processor objects may be enumerated on MP systems with
+  	 *  less than the max # of CPUs. They should be ignored _iff
+  	 *  they are physically not present.
+  	 */
+   	if (cpu_index >=  NR_CPUS) {
+   		if (ACPI_FAILURE(acpi_processor_hotadd_init(pr->handle, &pr->id))) {
+   			ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
+   				"Error getting cpuindex for acpiid 0x%x\n",
+   				pr->acpi_id));
+   			return_VALUE(-ENODEV);
+   		}
+    	}
+
+	ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Processor [%d:%d]\n", pr->id,
+		pr->acpi_id));
+
+	if (!object.processor.pblk_address)
+		ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No PBLK (NULL address)\n"));
+	else if (object.processor.pblk_length != 6)
+		ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid PBLK length [%d]\n",
+			object.processor.pblk_length));
+	else {
+		pr->throttling.address = object.processor.pblk_address;
+		pr->throttling.duty_offset = acpi_fadt.duty_offset;
+		pr->throttling.duty_width = acpi_fadt.duty_width;
+
+		pr->pblk = object.processor.pblk_address;
+
+		/*
+		 * We don't care about error returns - we just try to mark
+		 * these reserved so that nobody else is confused into thinking
+		 * that this region might be unused..
+		 *
+		 * (In particular, allocating the IO range for Cardbus)
+		 */
+		request_region(pr->throttling.address, 6, "ACPI CPU throttle");
+	}
+
+#ifdef CONFIG_CPU_FREQ
+	acpi_processor_ppc_has_changed(pr);
+#endif
+	acpi_processor_get_throttling_info(pr);
+	acpi_processor_get_limit_info(pr);
+
+	return_VALUE(0);
+}
+
+static int
+acpi_processor_start(
+	struct acpi_device	*device)
+{
+	int			result = 0;
+	acpi_status		status = AE_OK;
+	struct acpi_processor	*pr;
+
+	ACPI_FUNCTION_TRACE("acpi_processor_start");
+
+	pr = acpi_driver_data(device);
+
+	result = acpi_processor_get_info(pr);
+	if (result) {
+		/* Processor is physically not present */
+		return_VALUE(0);
+	}
+
+	BUG_ON((pr->id >= NR_CPUS) || (pr->id < 0));
+
+	processors[pr->id] = pr;
+
+	result = acpi_processor_add_fs(device);
+	if (result)
+		goto end;
+
+	status = acpi_install_notify_handler(pr->handle, ACPI_DEVICE_NOTIFY,
+		acpi_processor_notify, pr);
+	if (ACPI_FAILURE(status)) {
+		ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
+			"Error installing device notify handler\n"));
+	}
+
+	acpi_processor_power_init(pr, device);
+
+	if (pr->flags.throttling) {
+		printk(KERN_INFO PREFIX "%s [%s] (supports",
+			acpi_device_name(device), acpi_device_bid(device));
+		printk(" %d throttling states", pr->throttling.state_count);
+		printk(")\n");
+	}
+
+end:
+
+	return_VALUE(result);
+}
+
+
+
+static void
+acpi_processor_notify (
+	acpi_handle		handle,
+	u32			event,
+	void			*data)
+{
+	struct acpi_processor	*pr = (struct acpi_processor *) data;
+	struct acpi_device	*device = NULL;
+
+	ACPI_FUNCTION_TRACE("acpi_processor_notify");
+
+	if (!pr)
+		return_VOID;
+
+	if (acpi_bus_get_device(pr->handle, &device))
+		return_VOID;
+
+	switch (event) {
+	case ACPI_PROCESSOR_NOTIFY_PERFORMANCE:
+		acpi_processor_ppc_has_changed(pr);
+		acpi_bus_generate_event(device, event,
+			pr->performance_platform_limit);
+		break;
+	case ACPI_PROCESSOR_NOTIFY_POWER:
+		acpi_processor_cst_has_changed(pr);
+		acpi_bus_generate_event(device, event, 0);
+		break;
+	default:
+		ACPI_DEBUG_PRINT((ACPI_DB_INFO,
+			"Unsupported event [0x%x]\n", event));
+		break;
+	}
+
+	return_VOID;
+}
+
+
+static int
+acpi_processor_add (
+	struct acpi_device	*device)
+{
+	struct acpi_processor	*pr = NULL;
+
+	ACPI_FUNCTION_TRACE("acpi_processor_add");
+
+	if (!device)
+		return_VALUE(-EINVAL);
+
+	pr = kmalloc(sizeof(struct acpi_processor), GFP_KERNEL);
+	if (!pr)
+		return_VALUE(-ENOMEM);
+	memset(pr, 0, sizeof(struct acpi_processor));
+
+	pr->handle = device->handle;
+	strcpy(acpi_device_name(device), ACPI_PROCESSOR_DEVICE_NAME);
+	strcpy(acpi_device_class(device), ACPI_PROCESSOR_CLASS);
+	acpi_driver_data(device) = pr;
+
+	return_VALUE(0);
+}
+
+
+static int
+acpi_processor_remove (
+	struct acpi_device	*device,
+	int			type)
+{
+	acpi_status		status = AE_OK;
+	struct acpi_processor	*pr = NULL;
+
+	ACPI_FUNCTION_TRACE("acpi_processor_remove");
+
+	if (!device || !acpi_driver_data(device))
+		return_VALUE(-EINVAL);
+
+	pr = (struct acpi_processor *) acpi_driver_data(device);
+
+	if (pr->id >= NR_CPUS) {
+		kfree(pr);
+		return_VALUE(0);
+	}
+
+	if (type == ACPI_BUS_REMOVAL_EJECT) {
+		if (acpi_processor_handle_eject(pr))
+			return_VALUE(-EINVAL);
+	}
+
+	acpi_processor_power_exit(pr, device);
+
+	status = acpi_remove_notify_handler(pr->handle, ACPI_DEVICE_NOTIFY,
+		acpi_processor_notify);
+	if (ACPI_FAILURE(status)) {
+		ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
+			"Error removing notify handler\n"));
+	}
+
+	acpi_processor_remove_fs(device);
+
+	processors[pr->id] = NULL;
+
+	kfree(pr);
+
+	return_VALUE(0);
+}
+
+#ifdef CONFIG_ACPI_HOTPLUG_CPU
+/****************************************************************************
+ * 	Acpi processor hotplug support 				       	    *
+ ****************************************************************************/
+
+static int is_processor_present(acpi_handle handle);
+
+static int
+is_processor_present(
+	acpi_handle handle)
+{
+	acpi_status 		status;
+	unsigned long		sta = 0;
+
+	ACPI_FUNCTION_TRACE("is_processor_present");
+
+	status = acpi_evaluate_integer(handle, "_STA", NULL, &sta);
+	if (ACPI_FAILURE(status) || !(sta & ACPI_STA_PRESENT)) {
+		ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
+			"Processor Device is not present\n"));
+		return_VALUE(0);
+	}
+	return_VALUE(1);
+}
+
+
+static
+int acpi_processor_device_add(
+	acpi_handle	handle,
+	struct acpi_device **device)
+{
+	acpi_handle		phandle;
+	struct acpi_device 	*pdev;
+	struct acpi_processor	*pr;
+
+	ACPI_FUNCTION_TRACE("acpi_processor_device_add");
+
+	if (acpi_get_parent(handle, &phandle)) {
+		return_VALUE(-ENODEV);
+	}
+
+	if (acpi_bus_get_device(phandle, &pdev)) {
+		return_VALUE(-ENODEV);
+	}
+
+	if (acpi_bus_add(device, pdev, handle, ACPI_BUS_TYPE_PROCESSOR)) {
+		return_VALUE(-ENODEV);
+	}
+
+	acpi_bus_scan(*device);
+
+	pr = acpi_driver_data(*device);
+	if (!pr)
+		return_VALUE(-ENODEV);
+
+	if ((pr->id >=0) && (pr->id < NR_CPUS)) {
+		kobject_hotplug(&(*device)->kobj, KOBJ_ONLINE);
+	}
+	return_VALUE(0);
+}
+
+
+static void
+acpi_processor_hotplug_notify (
+	acpi_handle		handle,
+	u32			event,
+	void			*data)
+{
+	struct acpi_processor	*pr;
+	struct acpi_device	*device = NULL;
+	int result;
+
+	ACPI_FUNCTION_TRACE("acpi_processor_hotplug_notify");
+
+	switch (event) {
+	case ACPI_NOTIFY_BUS_CHECK:
+	case ACPI_NOTIFY_DEVICE_CHECK:
+		printk("Processor driver received %s event\n",
+			(event==ACPI_NOTIFY_BUS_CHECK)?
+			"ACPI_NOTIFY_BUS_CHECK":"ACPI_NOTIFY_DEVICE_CHECK");
+
+		if (!is_processor_present(handle))
+			break;
+
+		if (acpi_bus_get_device(handle, &device)) {
+			result = acpi_processor_device_add(handle, &device);
+			if (result)
+				ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
+					"Unable to add the device\n"));
+			break;
+		}
+
+		pr = acpi_driver_data(device);
+		if (!pr) {
+			ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
+				"Driver data is NULL\n"));
+			break;
+		}
+
+		if (pr->id >= 0 && (pr->id < NR_CPUS)) {
+			kobject_hotplug(&device->kobj, KOBJ_OFFLINE);
+			break;
+		}
+
+		result = acpi_processor_start(device);
+		if ((!result) && ((pr->id >=0) && (pr->id < NR_CPUS))) {
+			kobject_hotplug(&device->kobj, KOBJ_ONLINE);
+		} else {
+			ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
+				"Device [%s] failed to start\n",
+				acpi_device_bid(device)));
+		}
+	break;
+	case ACPI_NOTIFY_EJECT_REQUEST:
+		ACPI_DEBUG_PRINT((ACPI_DB_INFO,"received ACPI_NOTIFY_EJECT_REQUEST\n"));
+
+		if (acpi_bus_get_device(handle, &device)) {
+			ACPI_DEBUG_PRINT((ACPI_DB_ERROR,"Device don't exist, dropping EJECT\n"));
+			break;
+		}
+		pr = acpi_driver_data(device);
+		if (!pr) {
+			ACPI_DEBUG_PRINT((ACPI_DB_ERROR,"Driver data is NULL, dropping EJECT\n"));
+			return_VOID;
+		}
+
+		if ((pr->id < NR_CPUS) && (cpu_present(pr->id)))
+			kobject_hotplug(&device->kobj, KOBJ_OFFLINE);
+		break;
+	default:
+		ACPI_DEBUG_PRINT((ACPI_DB_INFO,
+			"Unsupported event [0x%x]\n", event));
+		break;
+	}
+
+	return_VOID;
+}
+
+static acpi_status
+processor_walk_namespace_cb(acpi_handle handle,
+	u32 lvl,
+	void *context,
+	void **rv)
+{
+	acpi_status 			status;
+	int *action = context;
+	acpi_object_type	type = 0;
+
+	status = acpi_get_type(handle, &type);
+	if (ACPI_FAILURE(status))
+		return(AE_OK);
+
+	if (type != ACPI_TYPE_PROCESSOR)
+		return(AE_OK);
+
+	switch(*action) {
+	case INSTALL_NOTIFY_HANDLER:
+		acpi_install_notify_handler(handle,
+			ACPI_SYSTEM_NOTIFY,
+			acpi_processor_hotplug_notify,
+			NULL);
+		break;
+	case UNINSTALL_NOTIFY_HANDLER:
+		acpi_remove_notify_handler(handle,
+			ACPI_SYSTEM_NOTIFY,
+			acpi_processor_hotplug_notify);
+		break;
+	default:
+		break;
+	}
+
+	return(AE_OK);
+}
+
+
+static acpi_status
+acpi_processor_hotadd_init(
+	acpi_handle		handle,
+	int			*p_cpu)
+{
+	ACPI_FUNCTION_TRACE("acpi_processor_hotadd_init");
+
+	if (!is_processor_present(handle)) {
+		return_VALUE(AE_ERROR);
+	}
+
+	if (acpi_map_lsapic(handle, p_cpu))
+		return_VALUE(AE_ERROR);
+
+	if (arch_register_cpu(*p_cpu)) {
+		acpi_unmap_lsapic(*p_cpu);
+		return_VALUE(AE_ERROR);
+	}
+
+	return_VALUE(AE_OK);
+}
+
+
+static int
+acpi_processor_handle_eject(struct acpi_processor *pr)
+{
+	if (cpu_online(pr->id)) {
+		return(-EINVAL);
+	}
+	arch_unregister_cpu(pr->id);
+	acpi_unmap_lsapic(pr->id);
+	return(0);
+}
+#else
+static acpi_status
+acpi_processor_hotadd_init(
+	acpi_handle		handle,
+	int			*p_cpu)
+{
+	return AE_ERROR;
+}
+static int
+acpi_processor_handle_eject(struct acpi_processor *pr)
+{
+	return(-EINVAL);
+}
+#endif
+
+
+static
+void acpi_processor_install_hotplug_notify(void)
+{
+#ifdef CONFIG_ACPI_HOTPLUG_CPU
+	int action = INSTALL_NOTIFY_HANDLER;
+	acpi_walk_namespace(ACPI_TYPE_PROCESSOR,
+				     ACPI_ROOT_OBJECT,
+				     ACPI_UINT32_MAX,
+				     processor_walk_namespace_cb,
+				     &action, NULL);
+#endif
+}
+
+
+static
+void acpi_processor_uninstall_hotplug_notify(void)
+{
+#ifdef CONFIG_ACPI_HOTPLUG_CPU
+	int action = UNINSTALL_NOTIFY_HANDLER;
+	acpi_walk_namespace(ACPI_TYPE_PROCESSOR,
+				     ACPI_ROOT_OBJECT,
+				     ACPI_UINT32_MAX,
+				     processor_walk_namespace_cb,
+				     &action, NULL);
+#endif
+}
+
+/*
+ * We keep the driver loaded even when ACPI is not running.
+ * This is needed for the powernow-k8 driver, that works even without
+ * ACPI, but needs symbols from this driver
+ */
+
+static int __init
+acpi_processor_init (void)
+{
+	int			result = 0;
+
+	ACPI_FUNCTION_TRACE("acpi_processor_init");
+
+	memset(&processors, 0, sizeof(processors));
+	memset(&errata, 0, sizeof(errata));
+
+	acpi_processor_dir = proc_mkdir(ACPI_PROCESSOR_CLASS, acpi_root_dir);
+	if (!acpi_processor_dir)
+		return_VALUE(0);
+	acpi_processor_dir->owner = THIS_MODULE;
+
+	result = acpi_bus_register_driver(&acpi_processor_driver);
+	if (result < 0) {
+		remove_proc_entry(ACPI_PROCESSOR_CLASS, acpi_root_dir);
+		return_VALUE(0);
+	}
+
+	acpi_processor_install_hotplug_notify();
+
+	acpi_thermal_cpufreq_init();
+
+	acpi_processor_ppc_init();
+
+	return_VALUE(0);
+}
+
+
+static void __exit
+acpi_processor_exit (void)
+{
+	ACPI_FUNCTION_TRACE("acpi_processor_exit");
+
+	acpi_processor_ppc_exit();
+
+	acpi_thermal_cpufreq_exit();
+
+	acpi_processor_uninstall_hotplug_notify();
+
+	acpi_bus_unregister_driver(&acpi_processor_driver);
+
+	remove_proc_entry(ACPI_PROCESSOR_CLASS, acpi_root_dir);
+
+	return_VOID;
+}
+
+
+module_init(acpi_processor_init);
+module_exit(acpi_processor_exit);
+
+EXPORT_SYMBOL(acpi_processor_set_thermal_limit);
+
+MODULE_ALIAS("processor");
diff -Nru a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/acpi/processor_idle.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,995 @@
+/*
+ * processor_idle - idle state submodule to the ACPI processor driver
+ *
+ *  Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
+ *  Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
+ *  Copyright (C) 2004       Dominik Brodowski <linux@brodo.de>
+ *  Copyright (C) 2004  Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
+ *  			- Added processor hotplug support
+ *
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or (at
+ *  your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program; if not, write to the Free Software Foundation, Inc.,
+ *  59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+ *
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/cpufreq.h>
+#include <linux/proc_fs.h>
+#include <linux/seq_file.h>
+#include <linux/acpi.h>
+#include <linux/dmi.h>
+#include <linux/moduleparam.h>
+
+#include <asm/io.h>
+#include <asm/uaccess.h>
+
+#include <acpi/acpi_bus.h>
+#include <acpi/processor.h>
+
+#define ACPI_PROCESSOR_COMPONENT        0x01000000
+#define ACPI_PROCESSOR_CLASS            "processor"
+#define ACPI_PROCESSOR_DRIVER_NAME      "ACPI Processor Driver"
+#define _COMPONENT              ACPI_PROCESSOR_COMPONENT
+ACPI_MODULE_NAME                ("acpi_processor")
+
+#define ACPI_PROCESSOR_FILE_POWER	"power"
+
+#define US_TO_PM_TIMER_TICKS(t)		((t * (PM_TIMER_FREQUENCY/1000)) / 1000)
+#define C2_OVERHEAD			4	/* 1us (3.579 ticks per us) */
+#define C3_OVERHEAD			4	/* 1us (3.579 ticks per us) */
+
+static void (*pm_idle_save)(void);
+module_param(max_cstate, uint, 0644);
+
+static unsigned int nocst = 0;
+module_param(nocst, uint, 0000);
+
+/* --------------------------------------------------------------------------
+                                Power Management
+   -------------------------------------------------------------------------- */
+
+/*
+ * IBM ThinkPad R40e crashes mysteriously when going into C2 or C3.
+ * For now disable this. Probably a bug somewhere else.
+ *
+ * To skip this limit, boot/load with a large max_cstate limit.
+ */
+static int no_c2c3(struct dmi_system_id *id)
+{
+	if (max_cstate > ACPI_PROCESSOR_MAX_POWER)
+		return 0;
+
+	printk(KERN_NOTICE PREFIX "%s detected - C2,C3 disabled."
+		" Override with \"processor.max_cstate=%d\"\n", id->ident,
+	       ACPI_PROCESSOR_MAX_POWER + 1);
+
+	max_cstate = 1;
+
+	return 0;
+}
+
+
+
+
+static struct dmi_system_id __initdata processor_power_dmi_table[] = {
+	{ no_c2c3, "IBM ThinkPad R40e", {
+	  DMI_MATCH(DMI_BIOS_VENDOR,"IBM"),
+	  DMI_MATCH(DMI_BIOS_VERSION,"1SET60WW") }},
+	{ no_c2c3, "Medion 41700", {
+	  DMI_MATCH(DMI_BIOS_VENDOR,"Phoenix Technologies LTD"),
+	  DMI_MATCH(DMI_BIOS_VERSION,"R01-A1J") }},
+	{},
+};
+
+
+static inline u32
+ticks_elapsed (
+	u32			t1,
+	u32			t2)
+{
+	if (t2 >= t1)
+		return (t2 - t1);
+	else if (!acpi_fadt.tmr_val_ext)
+		return (((0x00FFFFFF - t1) + t2) & 0x00FFFFFF);
+	else
+		return ((0xFFFFFFFF - t1) + t2);
+}
+
+
+static void
+acpi_processor_power_activate (
+	struct acpi_processor	*pr,
+	struct acpi_processor_cx  *new)
+{
+	struct acpi_processor_cx  *old;
+
+	if (!pr || !new)
+		return;
+
+	old = pr->power.state;
+
+	if (old)
+		old->promotion.count = 0;
+ 	new->demotion.count = 0;
+
+	/* Cleanup from old state. */
+	if (old) {
+		switch (old->type) {
+		case ACPI_STATE_C3:
+			/* Disable bus master reload */
+			if (new->type != ACPI_STATE_C3)
+				acpi_set_register(ACPI_BITREG_BUS_MASTER_RLD, 0, ACPI_MTX_DO_NOT_LOCK);
+			break;
+		}
+	}
+
+	/* Prepare to use new state. */
+	switch (new->type) {
+	case ACPI_STATE_C3:
+		/* Enable bus master reload */
+		if (old->type != ACPI_STATE_C3)
+			acpi_set_register(ACPI_BITREG_BUS_MASTER_RLD, 1, ACPI_MTX_DO_NOT_LOCK);
+		break;
+	}
+
+	pr->power.state = new;
+
+	return;
+}
+
+
+static void acpi_processor_idle (void)
+{
+	struct acpi_processor	*pr = NULL;
+	struct acpi_processor_cx *cx = NULL;
+	struct acpi_processor_cx *next_state = NULL;
+	int			sleep_ticks = 0;
+	u32			t1, t2 = 0;
+
+	pr = processors[smp_processor_id()];
+	if (!pr)
+		return;
+
+	/*
+	 * Interrupts must be disabled during bus mastering calculations and
+	 * for C2/C3 transitions.
+	 */
+	local_irq_disable();
+
+	/*
+	 * Check whether we truly need to go idle, or should
+	 * reschedule:
+	 */
+	if (unlikely(need_resched())) {
+		local_irq_enable();
+		return;
+	}
+
+	cx = pr->power.state;
+	if (!cx)
+		goto easy_out;
+
+	/*
+	 * Check BM Activity
+	 * -----------------
+	 * Check for bus mastering activity (if required), record, and check
+	 * for demotion.
+	 */
+	if (pr->flags.bm_check) {
+		u32		bm_status = 0;
+
+		pr->power.bm_activity <<= 1;
+
+		acpi_get_register(ACPI_BITREG_BUS_MASTER_STATUS,
+			&bm_status, ACPI_MTX_DO_NOT_LOCK);
+		if (bm_status) {
+			pr->power.bm_activity++;
+			acpi_set_register(ACPI_BITREG_BUS_MASTER_STATUS,
+				1, ACPI_MTX_DO_NOT_LOCK);
+		}
+		/*
+		 * PIIX4 Erratum #18: Note that BM_STS doesn't always reflect
+		 * the true state of bus mastering activity; forcing us to
+		 * manually check the BMIDEA bit of each IDE channel.
+		 */
+		else if (errata.piix4.bmisx) {
+			if ((inb_p(errata.piix4.bmisx + 0x02) & 0x01)
+				|| (inb_p(errata.piix4.bmisx + 0x0A) & 0x01))
+				pr->power.bm_activity++;
+		}
+		/*
+		 * Apply bus mastering demotion policy.  Automatically demote
+		 * to avoid a faulty transition.  Note that the processor
+		 * won't enter a low-power state during this call (to this
+		 * funciton) but should upon the next.
+		 *
+		 * TBD: A better policy might be to fallback to the demotion
+		 *      state (use it for this quantum only) istead of
+		 *      demoting -- and rely on duration as our sole demotion
+		 *      qualification.  This may, however, introduce DMA
+		 *      issues (e.g. floppy DMA transfer overrun/underrun).
+		 */
+		if (pr->power.bm_activity & cx->demotion.threshold.bm) {
+			local_irq_enable();
+			next_state = cx->demotion.state;
+			goto end;
+		}
+	}
+
+	cx->usage++;
+
+	/*
+	 * Sleep:
+	 * ------
+	 * Invoke the current Cx state to put the processor to sleep.
+	 */
+	switch (cx->type) {
+
+	case ACPI_STATE_C1:
+		/*
+		 * Invoke C1.
+		 * Use the appropriate idle routine, the one that would
+		 * be used without acpi C-states.
+		 */
+		if (pm_idle_save)
+			pm_idle_save();
+		else
+			safe_halt();
+		/*
+                 * TBD: Can't get time duration while in C1, as resumes
+		 *      go to an ISR rather than here.  Need to instrument
+		 *      base interrupt handler.
+		 */
+		sleep_ticks = 0xFFFFFFFF;
+		break;
+
+	case ACPI_STATE_C2:
+		/* Get start time (ticks) */
+		t1 = inl(acpi_fadt.xpm_tmr_blk.address);
+		/* Invoke C2 */
+		inb(cx->address);
+		/* Dummy op - must do something useless after P_LVL2 read */
+		t2 = inl(acpi_fadt.xpm_tmr_blk.address);
+		/* Get end time (ticks) */
+		t2 = inl(acpi_fadt.xpm_tmr_blk.address);
+		/* Re-enable interrupts */
+		local_irq_enable();
+		/* Compute time (ticks) that we were actually asleep */
+		sleep_ticks = ticks_elapsed(t1, t2) - cx->latency_ticks - C2_OVERHEAD;
+		break;
+
+	case ACPI_STATE_C3:
+		/* Disable bus master arbitration */
+		acpi_set_register(ACPI_BITREG_ARB_DISABLE, 1, ACPI_MTX_DO_NOT_LOCK);
+		/* Get start time (ticks) */
+		t1 = inl(acpi_fadt.xpm_tmr_blk.address);
+		/* Invoke C3 */
+		inb(cx->address);
+		/* Dummy op - must do something useless after P_LVL3 read */
+		t2 = inl(acpi_fadt.xpm_tmr_blk.address);
+		/* Get end time (ticks) */
+		t2 = inl(acpi_fadt.xpm_tmr_blk.address);
+		/* Enable bus master arbitration */
+		acpi_set_register(ACPI_BITREG_ARB_DISABLE, 0, ACPI_MTX_DO_NOT_LOCK);
+		/* Re-enable interrupts */
+		local_irq_enable();
+		/* Compute time (ticks) that we were actually asleep */
+		sleep_ticks = ticks_elapsed(t1, t2) - cx->latency_ticks - C3_OVERHEAD;
+		break;
+
+	default:
+		local_irq_enable();
+		return;
+	}
+
+	next_state = pr->power.state;
+
+	/*
+	 * Promotion?
+	 * ----------
+	 * Track the number of longs (time asleep is greater than threshold)
+	 * and promote when the count threshold is reached.  Note that bus
+	 * mastering activity may prevent promotions.
+	 * Do not promote above max_cstate.
+	 */
+	if (cx->promotion.state &&
+	    ((cx->promotion.state - pr->power.states) <= max_cstate)) {
+		if (sleep_ticks > cx->promotion.threshold.ticks) {
+			cx->promotion.count++;
+ 			cx->demotion.count = 0;
+			if (cx->promotion.count >= cx->promotion.threshold.count) {
+				if (pr->flags.bm_check) {
+					if (!(pr->power.bm_activity & cx->promotion.threshold.bm)) {
+						next_state = cx->promotion.state;
+						goto end;
+					}
+				}
+				else {
+					next_state = cx->promotion.state;
+					goto end;
+				}
+			}
+		}
+	}
+
+	/*
+	 * Demotion?
+	 * ---------
+	 * Track the number of shorts (time asleep is less than time threshold)
+	 * and demote when the usage threshold is reached.
+	 */
+	if (cx->demotion.state) {
+		if (sleep_ticks < cx->demotion.threshold.ticks) {
+			cx->demotion.count++;
+			cx->promotion.count = 0;
+			if (cx->demotion.count >= cx->demotion.threshold.count) {
+				next_state = cx->demotion.state;
+				goto end;
+			}
+		}
+	}
+
+end:
+	/*
+	 * Demote if current state exceeds max_cstate
+	 */
+	if ((pr->power.state - pr->power.states) > max_cstate) {
+		if (cx->demotion.state)
+			next_state = cx->demotion.state;
+	}
+
+	/*
+	 * New Cx State?
+	 * -------------
+	 * If we're going to start using a new Cx state we must clean up
+	 * from the previous and prepare to use the new.
+	 */
+	if (next_state != pr->power.state)
+		acpi_processor_power_activate(pr, next_state);
+
+	return;
+
+ easy_out:
+	/* do C1 instead of busy loop */
+	if (pm_idle_save)
+		pm_idle_save();
+	else
+		safe_halt();
+	return;
+}
+
+
+static int
+acpi_processor_set_power_policy (
+	struct acpi_processor	*pr)
+{
+	unsigned int i;
+	unsigned int state_is_set = 0;
+	struct acpi_processor_cx *lower = NULL;
+	struct acpi_processor_cx *higher = NULL;
+	struct acpi_processor_cx *cx;
+
+ 	ACPI_FUNCTION_TRACE("acpi_processor_set_power_policy");
+
+	if (!pr)
+		return_VALUE(-EINVAL);
+
+	/*
+	 * This function sets the default Cx state policy (OS idle handler).
+	 * Our scheme is to promote quickly to C2 but more conservatively
+	 * to C3.  We're favoring C2  for its characteristics of low latency
+	 * (quick response), good power savings, and ability to allow bus
+	 * mastering activity.  Note that the Cx state policy is completely
+	 * customizable and can be altered dynamically.
+	 */
+
+	/* startup state */
+	for (i=1; i < ACPI_PROCESSOR_MAX_POWER; i++) {
+		cx = &pr->power.states[i];
+		if (!cx->valid)
+			continue;
+
+		if (!state_is_set)
+			pr->power.state = cx;
+		state_is_set++;
+		break;
+ 	}
+
+	if (!state_is_set)
+		return_VALUE(-ENODEV);
+
+	/* demotion */
+	for (i=1; i < ACPI_PROCESSOR_MAX_POWER; i++) {
+		cx = &pr->power.states[i];
+		if (!cx->valid)
+			continue;
+
+		if (lower) {
+			cx->demotion.state = lower;
+			cx->demotion.threshold.ticks = cx->latency_ticks;
+			cx->demotion.threshold.count = 1;
+			if (cx->type == ACPI_STATE_C3)
+				cx->demotion.threshold.bm = 0x0F;
+		}
+
+		lower = cx;
+	}
+
+	/* promotion */
+	for (i = (ACPI_PROCESSOR_MAX_POWER - 1); i > 0; i--) {
+		cx = &pr->power.states[i];
+		if (!cx->valid)
+			continue;
+
+		if (higher) {
+			cx->promotion.state  = higher;
+			cx->promotion.threshold.ticks = cx->latency_ticks;
+			if (cx->type >= ACPI_STATE_C2)
+				cx->promotion.threshold.count = 4;
+			else
+				cx->promotion.threshold.count = 10;
+			if (higher->type == ACPI_STATE_C3)
+				cx->promotion.threshold.bm = 0x0F;
+		}
+
+		higher = cx;
+	}
+
+ 	return_VALUE(0);
+}
+
+
+static int acpi_processor_get_power_info_fadt (struct acpi_processor *pr)
+{
+	int i;
+
+	ACPI_FUNCTION_TRACE("acpi_processor_get_power_info_fadt");
+
+	if (!pr)
+		return_VALUE(-EINVAL);
+
+	if (!pr->pblk)
+		return_VALUE(-ENODEV);
+
+	for (i = 0; i < ACPI_PROCESSOR_MAX_POWER; i++)
+		memset(pr->power.states, 0, sizeof(struct acpi_processor_cx));
+
+	/* if info is obtained from pblk/fadt, type equals state */
+	pr->power.states[ACPI_STATE_C1].type = ACPI_STATE_C1;
+	pr->power.states[ACPI_STATE_C2].type = ACPI_STATE_C2;
+	pr->power.states[ACPI_STATE_C3].type = ACPI_STATE_C3;
+
+	/* the C0 state only exists as a filler in our array,
+	 * and all processors need to support C1 */
+	pr->power.states[ACPI_STATE_C0].valid = 1;
+	pr->power.states[ACPI_STATE_C1].valid = 1;
+
+	/* determine C2 and C3 address from pblk */
+	pr->power.states[ACPI_STATE_C2].address = pr->pblk + 4;
+	pr->power.states[ACPI_STATE_C3].address = pr->pblk + 5;
+
+	/* determine latencies from FADT */
+	pr->power.states[ACPI_STATE_C2].latency = acpi_fadt.plvl2_lat;
+	pr->power.states[ACPI_STATE_C3].latency = acpi_fadt.plvl3_lat;
+
+	ACPI_DEBUG_PRINT((ACPI_DB_INFO,
+			  "lvl2[0x%08x] lvl3[0x%08x]\n",
+			  pr->power.states[ACPI_STATE_C2].address,
+			  pr->power.states[ACPI_STATE_C3].address));
+
+	return_VALUE(0);
+}
+
+
+static int acpi_processor_get_power_info_cst (struct acpi_processor *pr)
+{
+	acpi_status		status = 0;
+	acpi_integer		count;
+	int			i;
+	struct acpi_buffer	buffer = {ACPI_ALLOCATE_BUFFER, NULL};
+	union acpi_object	*cst;
+
+	ACPI_FUNCTION_TRACE("acpi_processor_get_power_info_cst");
+
+	if (errata.smp)
+		return_VALUE(-ENODEV);
+
+	if (nocst)
+		return_VALUE(-ENODEV);
+
+	pr->power.count = 0;
+	for (i = 0; i < ACPI_PROCESSOR_MAX_POWER; i++)
+		memset(pr->power.states, 0, sizeof(struct acpi_processor_cx));
+
+	status = acpi_evaluate_object(pr->handle, "_CST", NULL, &buffer);
+	if (ACPI_FAILURE(status)) {
+		ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No _CST, giving up\n"));
+		return_VALUE(-ENODEV);
+ 	}
+
+	cst = (union acpi_object *) buffer.pointer;
+
+	/* There must be at least 2 elements */
+	if (!cst || (cst->type != ACPI_TYPE_PACKAGE) || cst->package.count < 2) {
+		ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "not enough elements in _CST\n"));
+		status = -EFAULT;
+		goto end;
+	}
+
+	count = cst->package.elements[0].integer.value;
+
+	/* Validate number of power states. */
+	if (count < 1 || count != cst->package.count - 1) {
+		ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "count given by _CST is not valid\n"));
+		status = -EFAULT;
+		goto end;
+	}
+
+	/* We support up to ACPI_PROCESSOR_MAX_POWER. */
+	if (count > ACPI_PROCESSOR_MAX_POWER) {
+		printk(KERN_WARNING "Limiting number of power states to max (%d)\n", ACPI_PROCESSOR_MAX_POWER);
+		printk(KERN_WARNING "Please increase ACPI_PROCESSOR_MAX_POWER if needed.\n");
+		count = ACPI_PROCESSOR_MAX_POWER;
+	}
+
+	/* Tell driver that at least _CST is supported. */
+	pr->flags.has_cst = 1;
+
+	for (i = 1; i <= count; i++) {
+		union acpi_object *element;
+		union acpi_object *obj;
+		struct acpi_power_register *reg;
+		struct acpi_processor_cx cx;
+
+		memset(&cx, 0, sizeof(cx));
+
+		element = (union acpi_object *) &(cst->package.elements[i]);
+		if (element->type != ACPI_TYPE_PACKAGE)
+			continue;
+
+		if (element->package.count != 4)
+			continue;
+
+		obj = (union acpi_object *) &(element->package.elements[0]);
+
+		if (obj->type != ACPI_TYPE_BUFFER)
+			continue;
+
+		reg = (struct acpi_power_register *) obj->buffer.pointer;
+
+		if (reg->space_id != ACPI_ADR_SPACE_SYSTEM_IO &&
+			(reg->space_id != ACPI_ADR_SPACE_FIXED_HARDWARE))
+			continue;
+
+		cx.address = (reg->space_id == ACPI_ADR_SPACE_FIXED_HARDWARE) ?
+			0 : reg->address;
+
+		/* There should be an easy way to extract an integer... */
+		obj = (union acpi_object *) &(element->package.elements[1]);
+		if (obj->type != ACPI_TYPE_INTEGER)
+			continue;
+
+		cx.type = obj->integer.value;
+
+		if ((cx.type != ACPI_STATE_C1) &&
+		    (reg->space_id != ACPI_ADR_SPACE_SYSTEM_IO))
+			continue;
+
+		if ((cx.type < ACPI_STATE_C1) ||
+		    (cx.type > ACPI_STATE_C3))
+			continue;
+
+		obj = (union acpi_object *) &(element->package.elements[2]);
+		if (obj->type != ACPI_TYPE_INTEGER)
+			continue;
+
+		cx.latency = obj->integer.value;
+
+		obj = (union acpi_object *) &(element->package.elements[3]);
+		if (obj->type != ACPI_TYPE_INTEGER)
+			continue;
+
+		cx.power = obj->integer.value;
+
+		(pr->power.count)++;
+		memcpy(&(pr->power.states[pr->power.count]), &cx, sizeof(cx));
+	}
+
+	ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found %d power states\n", pr->power.count));
+
+	/* Validate number of power states discovered */
+	if (pr->power.count < 2)
+		status = -ENODEV;
+
+end:
+	acpi_os_free(buffer.pointer);
+
+	return_VALUE(status);
+}
+
+
+static void acpi_processor_power_verify_c2(struct acpi_processor_cx *cx)
+{
+	ACPI_FUNCTION_TRACE("acpi_processor_get_power_verify_c2");
+
+	if (!cx->address)
+		return_VOID;
+
+	/*
+	 * C2 latency must be less than or equal to 100
+	 * microseconds.
+	 */
+	else if (cx->latency > ACPI_PROCESSOR_MAX_C2_LATENCY) {
+		ACPI_DEBUG_PRINT((ACPI_DB_INFO,
+				  "latency too large [%d]\n",
+				  cx->latency));
+		return_VOID;
+	}
+
+	/* We're (currently) only supporting C2 on UP */
+	else if (errata.smp) {
+		ACPI_DEBUG_PRINT((ACPI_DB_INFO,
+				  "C2 not supported in SMP mode\n"));
+		return_VOID;
+	}
+
+	/*
+	 * Otherwise we've met all of our C2 requirements.
+	 * Normalize the C2 latency to expidite policy
+	 */
+	cx->valid = 1;
+	cx->latency_ticks = US_TO_PM_TIMER_TICKS(cx->latency);
+
+	return_VOID;
+}
+
+
+static void acpi_processor_power_verify_c3(
+	struct acpi_processor *pr,
+	struct acpi_processor_cx *cx)
+{
+	ACPI_FUNCTION_TRACE("acpi_processor_get_power_verify_c3");
+
+	if (!cx->address)
+		return_VOID;
+
+	/*
+	 * C3 latency must be less than or equal to 1000
+	 * microseconds.
+	 */
+	else if (cx->latency > ACPI_PROCESSOR_MAX_C3_LATENCY) {
+		ACPI_DEBUG_PRINT((ACPI_DB_INFO,
+				  "latency too large [%d]\n",
+				  cx->latency));
+		return_VOID;
+	}
+
+	/* bus mastering control is necessary */
+	else if (!pr->flags.bm_control) {
+		ACPI_DEBUG_PRINT((ACPI_DB_INFO,
+				  "C3 support requires bus mastering control\n"));
+		return_VOID;
+	}
+
+	/* We're (currently) only supporting C2 on UP */
+	else if (errata.smp) {
+		ACPI_DEBUG_PRINT((ACPI_DB_INFO,
+				  "C3 not supported in SMP mode\n"));
+		return_VOID;
+	}
+
+	/*
+	 * PIIX4 Erratum #18: We don't support C3 when Type-F (fast)
+	 * DMA transfers are used by any ISA device to avoid livelock.
+	 * Note that we could disable Type-F DMA (as recommended by
+	 * the erratum), but this is known to disrupt certain ISA
+	 * devices thus we take the conservative approach.
+	 */
+	else if (errata.piix4.fdma) {
+		ACPI_DEBUG_PRINT((ACPI_DB_INFO,
+			"C3 not supported on PIIX4 with Type-F DMA\n"));
+		return_VOID;
+	}
+
+	/*
+	 * Otherwise we've met all of our C3 requirements.
+	 * Normalize the C3 latency to expidite policy.  Enable
+	 * checking of bus mastering status (bm_check) so we can
+	 * use this in our C3 policy
+	 */
+	cx->valid = 1;
+	cx->latency_ticks = US_TO_PM_TIMER_TICKS(cx->latency);
+	pr->flags.bm_check = 1;
+
+	return_VOID;
+}
+
+
+static int acpi_processor_power_verify(struct acpi_processor *pr)
+{
+	unsigned int i;
+	unsigned int working = 0;
+
+	for (i=1; i < ACPI_PROCESSOR_MAX_POWER; i++) {
+		struct acpi_processor_cx *cx = &pr->power.states[i];
+
+		switch (cx->type) {
+		case ACPI_STATE_C1:
+			cx->valid = 1;
+			break;
+
+		case ACPI_STATE_C2:
+			acpi_processor_power_verify_c2(cx);
+			break;
+
+		case ACPI_STATE_C3:
+			acpi_processor_power_verify_c3(pr, cx);
+			break;
+		}
+
+		if (cx->valid)
+			working++;
+	}
+
+	return (working);
+}
+
+static int acpi_processor_get_power_info (
+	struct acpi_processor	*pr)
+{
+	unsigned int i;
+	int result;
+
+	ACPI_FUNCTION_TRACE("acpi_processor_get_power_info");
+
+	/* NOTE: the idle thread may not be running while calling
+	 * this function */
+
+	result = acpi_processor_get_power_info_cst(pr);
+	if ((result) || (acpi_processor_power_verify(pr) < 2)) {
+		result = acpi_processor_get_power_info_fadt(pr);
+		if (result)
+			return_VALUE(result);
+
+		if (acpi_processor_power_verify(pr) < 2)
+			return_VALUE(-ENODEV);
+	}
+
+	/*
+	 * Set Default Policy
+	 * ------------------
+	 * Now that we know which states are supported, set the default
+	 * policy.  Note that this policy can be changed dynamically
+	 * (e.g. encourage deeper sleeps to conserve battery life when
+	 * not on AC).
+	 */
+	result = acpi_processor_set_power_policy(pr);
+	if (result)
+		return_VALUE(result);
+
+	/*
+	 * if one state of type C2 or C3 is available, mark this
+	 * CPU as being "idle manageable"
+	 */
+	for (i = 1; i < ACPI_PROCESSOR_MAX_POWER; i++) {
+		if (pr->power.states[i].valid)
+			pr->power.count = i;
+		if ((pr->power.states[i].valid) &&
+		    (pr->power.states[i].type >= ACPI_STATE_C2))
+			pr->flags.power = 1;
+	}
+
+	return_VALUE(0);
+}
+
+int acpi_processor_cst_has_changed (struct acpi_processor *pr)
+{
+ 	int			result = 0;
+
+	ACPI_FUNCTION_TRACE("acpi_processor_cst_has_changed");
+
+	if (!pr)
+ 		return_VALUE(-EINVAL);
+
+	if (errata.smp || nocst) {
+		return_VALUE(-ENODEV);
+	}
+
+	if (!pr->flags.power_setup_done)
+		return_VALUE(-ENODEV);
+
+	/* Fall back to the default idle loop */
+	pm_idle = pm_idle_save;
+	synchronize_kernel();
+
+	pr->flags.power = 0;
+	result = acpi_processor_get_power_info(pr);
+	if ((pr->flags.power == 1) && (pr->flags.power_setup_done))
+		pm_idle = acpi_processor_idle;
+
+	return_VALUE(result);
+}
+
+/* proc interface */
+
+static int acpi_processor_power_seq_show(struct seq_file *seq, void *offset)
+{
+	struct acpi_processor	*pr = (struct acpi_processor *)seq->private;
+	unsigned int		i;
+
+	ACPI_FUNCTION_TRACE("acpi_processor_power_seq_show");
+
+	if (!pr)
+		goto end;
+
+	seq_printf(seq, "active state:            C%d\n"
+			"max_cstate:              C%d\n"
+			"bus master activity:     %08x\n",
+			pr->power.state ? pr->power.state - pr->power.states : 0,
+			max_cstate,
+			pr->power.bm_activity);
+
+	seq_puts(seq, "states:\n");
+
+	for (i = 1; i <= pr->power.count; i++) {
+		seq_printf(seq, "   %cC%d:                  ",
+			(&pr->power.states[i] == pr->power.state?'*':' '), i);
+
+		if (!pr->power.states[i].valid) {
+			seq_puts(seq, "<not supported>\n");
+			continue;
+		}
+
+		switch (pr->power.states[i].type) {
+		case ACPI_STATE_C1:
+			seq_printf(seq, "type[C1] ");
+			break;
+		case ACPI_STATE_C2:
+			seq_printf(seq, "type[C2] ");
+			break;
+		case ACPI_STATE_C3:
+			seq_printf(seq, "type[C3] ");
+			break;
+		default:
+			seq_printf(seq, "type[--] ");
+			break;
+		}
+
+		if (pr->power.states[i].promotion.state)
+			seq_printf(seq, "promotion[C%d] ",
+				(pr->power.states[i].promotion.state -
+				 pr->power.states));
+		else
+			seq_puts(seq, "promotion[--] ");
+
+		if (pr->power.states[i].demotion.state)
+			seq_printf(seq, "demotion[C%d] ",
+				(pr->power.states[i].demotion.state -
+				 pr->power.states));
+		else
+			seq_puts(seq, "demotion[--] ");
+
+		seq_printf(seq, "latency[%03d] usage[%08d]\n",
+			pr->power.states[i].latency,
+			pr->power.states[i].usage);
+	}
+
+end:
+	return_VALUE(0);
+}
+
+static int acpi_processor_power_open_fs(struct inode *inode, struct file *file)
+{
+	return single_open(file, acpi_processor_power_seq_show,
+						PDE(inode)->data);
+}
+
+static struct file_operations acpi_processor_power_fops = {
+	.open 		= acpi_processor_power_open_fs,
+	.read		= seq_read,
+	.llseek		= seq_lseek,
+	.release	= single_release,
+};
+
+
+int acpi_processor_power_init(struct acpi_processor *pr, struct acpi_device *device)
+{
+	acpi_status		status = 0;
+	static int		first_run = 0;
+	struct proc_dir_entry	*entry = NULL;
+	unsigned int i;
+
+	ACPI_FUNCTION_TRACE("acpi_processor_power_init");
+
+	if (!first_run) {
+		dmi_check_system(processor_power_dmi_table);
+		if (max_cstate < ACPI_C_STATES_MAX)
+			printk(KERN_NOTICE "ACPI: processor limited to max C-state %d\n", max_cstate);
+		first_run++;
+	}
+
+	if (!errata.smp && (pr->id == 0) && acpi_fadt.cst_cnt && !nocst) {
+		status = acpi_os_write_port(acpi_fadt.smi_cmd, acpi_fadt.cst_cnt, 8);
+		if (ACPI_FAILURE(status)) {
+			ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
+					  "Notifying BIOS of _CST ability failed\n"));
+		}
+	}
+
+	acpi_processor_get_power_info(pr);
+
+	/*
+	 * Install the idle handler if processor power management is supported.
+	 * Note that we use previously set idle handler will be used on
+	 * platforms that only support C1.
+	 */
+	if ((pr->flags.power) && (!boot_option_idle_override)) {
+		printk(KERN_INFO PREFIX "CPU%d (power states:", pr->id);
+		for (i = 1; i <= pr->power.count; i++)
+			if (pr->power.states[i].valid)
+				printk(" C%d[C%d]", i, pr->power.states[i].type);
+		printk(")\n");
+
+		if (pr->id == 0) {
+			pm_idle_save = pm_idle;
+			pm_idle = acpi_processor_idle;
+		}
+	}
+
+	/* 'power' [R] */
+	entry = create_proc_entry(ACPI_PROCESSOR_FILE_POWER,
+		S_IRUGO, acpi_device_dir(device));
+	if (!entry)
+		ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
+			"Unable to create '%s' fs entry\n",
+			ACPI_PROCESSOR_FILE_POWER));
+	else {
+		entry->proc_fops = &acpi_processor_power_fops;
+		entry->data = acpi_driver_data(device);
+		entry->owner = THIS_MODULE;
+	}
+
+	pr->flags.power_setup_done = 1;
+
+	return_VALUE(0);
+}
+
+int acpi_processor_power_exit(struct acpi_processor *pr, struct acpi_device *device)
+{
+	ACPI_FUNCTION_TRACE("acpi_processor_power_exit");
+
+	pr->flags.power_setup_done = 0;
+
+	if (acpi_device_dir(device))
+		remove_proc_entry(ACPI_PROCESSOR_FILE_POWER,acpi_device_dir(device));
+
+	/* Unregister the idle handler when processor #0 is removed. */
+	if (pr->id == 0) {
+		pm_idle = pm_idle_save;
+
+		/*
+		 * We are about to unload the current idle thread pm callback
+		 * (pm_idle), Wait for all processors to update cached/local
+		 * copies of pm_idle before proceeding.
+		 */
+		cpu_idle_wait();
+	}
+
+	return_VALUE(0);
+}
diff -Nru a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/acpi/processor_perflib.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,666 @@
+/*
+ * processor_perflib.c - ACPI Processor P-States Library ($Revision: 71 $)
+ *
+ *  Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
+ *  Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
+ *  Copyright (C) 2004       Dominik Brodowski <linux@brodo.de>
+ *  Copyright (C) 2004  Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
+ *  			- Added processor hotplug support
+ *
+ *
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or (at
+ *  your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program; if not, write to the Free Software Foundation, Inc.,
+ *  59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+ *
+ */
+
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/cpufreq.h>
+
+#ifdef CONFIG_X86_ACPI_CPUFREQ_PROC_INTF
+#include <linux/proc_fs.h>
+#include <linux/seq_file.h>
+
+#include <asm/uaccess.h>
+#endif
+
+#include <acpi/acpi_bus.h>
+#include <acpi/processor.h>
+
+
+#define ACPI_PROCESSOR_COMPONENT	0x01000000
+#define ACPI_PROCESSOR_CLASS		"processor"
+#define ACPI_PROCESSOR_DRIVER_NAME	"ACPI Processor Driver"
+#define ACPI_PROCESSOR_FILE_PERFORMANCE	"performance"
+#define _COMPONENT		ACPI_PROCESSOR_COMPONENT
+ACPI_MODULE_NAME		("acpi_processor")
+
+
+static DECLARE_MUTEX(performance_sem);
+
+/*
+ * _PPC support is implemented as a CPUfreq policy notifier:
+ * This means each time a CPUfreq driver registered also with
+ * the ACPI core is asked to change the speed policy, the maximum
+ * value is adjusted so that it is within the platform limit.
+ *
+ * Also, when a new platform limit value is detected, the CPUfreq
+ * policy is adjusted accordingly.
+ */
+
+#define PPC_REGISTERED   1
+#define PPC_IN_USE       2
+
+static int acpi_processor_ppc_status = 0;
+
+static int acpi_processor_ppc_notifier(struct notifier_block *nb,
+	unsigned long event,
+	void *data)
+{
+	struct cpufreq_policy *policy = data;
+	struct acpi_processor *pr;
+	unsigned int ppc = 0;
+
+	down(&performance_sem);
+
+	if (event != CPUFREQ_INCOMPATIBLE)
+		goto out;
+
+	pr = processors[policy->cpu];
+	if (!pr || !pr->performance)
+		goto out;
+
+	ppc = (unsigned int) pr->performance_platform_limit;
+	if (!ppc)
+		goto out;
+
+	if (ppc > pr->performance->state_count)
+		goto out;
+
+	cpufreq_verify_within_limits(policy, 0,
+		pr->performance->states[ppc].core_frequency * 1000);
+
+ out:
+	up(&performance_sem);
+
+	return 0;
+}
+
+
+static struct notifier_block acpi_ppc_notifier_block = {
+	.notifier_call = acpi_processor_ppc_notifier,
+};
+
+
+static int
+acpi_processor_get_platform_limit (
+	struct acpi_processor*	pr)
+{
+	acpi_status		status = 0;
+	unsigned long		ppc = 0;
+
+	ACPI_FUNCTION_TRACE("acpi_processor_get_platform_limit");
+
+	if (!pr)
+		return_VALUE(-EINVAL);
+
+	/*
+	 * _PPC indicates the maximum state currently supported by the platform
+	 * (e.g. 0 = states 0..n; 1 = states 1..n; etc.
+	 */
+	status = acpi_evaluate_integer(pr->handle, "_PPC", NULL, &ppc);
+
+	if (status != AE_NOT_FOUND)
+		acpi_processor_ppc_status |= PPC_IN_USE;
+
+	if(ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
+		ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _PPC\n"));
+		return_VALUE(-ENODEV);
+	}
+
+	pr->performance_platform_limit = (int) ppc;
+
+	return_VALUE(0);
+}
+
+
+int acpi_processor_ppc_has_changed(
+	struct acpi_processor *pr)
+{
+	int ret = acpi_processor_get_platform_limit(pr);
+	if (ret < 0)
+		return (ret);
+	else
+		return cpufreq_update_policy(pr->id);
+}
+
+
+void acpi_processor_ppc_init(void) {
+	if (!cpufreq_register_notifier(&acpi_ppc_notifier_block, CPUFREQ_POLICY_NOTIFIER))
+		acpi_processor_ppc_status |= PPC_REGISTERED;
+	else
+		printk(KERN_DEBUG "Warning: Processor Platform Limit not supported.\n");
+}
+
+
+void acpi_processor_ppc_exit(void) {
+	if (acpi_processor_ppc_status & PPC_REGISTERED)
+		cpufreq_unregister_notifier(&acpi_ppc_notifier_block, CPUFREQ_POLICY_NOTIFIER);
+
+	acpi_processor_ppc_status &= ~PPC_REGISTERED;
+}
+
+/*
+ * when registering a cpufreq driver with this ACPI processor driver, the
+ * _PCT and _PSS structures are read out and written into struct
+ * acpi_processor_performance.
+ */
+static int acpi_processor_set_pdc (struct acpi_processor *pr)
+{
+	acpi_status             status = AE_OK;
+	u32			arg0_buf[3];
+	union acpi_object	arg0 = {ACPI_TYPE_BUFFER};
+	struct acpi_object_list no_object = {1, &arg0};
+	struct acpi_object_list *pdc;
+
+	ACPI_FUNCTION_TRACE("acpi_processor_set_pdc");
+
+	arg0.buffer.length = 12;
+	arg0.buffer.pointer = (u8 *) arg0_buf;
+	arg0_buf[0] = ACPI_PDC_REVISION_ID;
+	arg0_buf[1] = 0;
+	arg0_buf[2] = 0;
+
+	pdc = (pr->performance->pdc) ? pr->performance->pdc : &no_object;
+
+	status = acpi_evaluate_object(pr->handle, "_PDC", pdc, NULL);
+
+	if ((ACPI_FAILURE(status)) && (pr->performance->pdc))
+		ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Error evaluating _PDC, using legacy perf. control...\n"));
+
+	return_VALUE(status);
+}
+
+
+static int
+acpi_processor_get_performance_control (
+	struct acpi_processor *pr)
+{
+	int			result = 0;
+	acpi_status		status = 0;
+	struct acpi_buffer	buffer = {ACPI_ALLOCATE_BUFFER, NULL};
+	union acpi_object	*pct = NULL;
+	union acpi_object	obj = {0};
+
+	ACPI_FUNCTION_TRACE("acpi_processor_get_performance_control");
+
+	status = acpi_evaluate_object(pr->handle, "_PCT", NULL, &buffer);
+	if(ACPI_FAILURE(status)) {
+		ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _PCT\n"));
+		return_VALUE(-ENODEV);
+	}
+
+	pct = (union acpi_object *) buffer.pointer;
+	if (!pct || (pct->type != ACPI_TYPE_PACKAGE)
+		|| (pct->package.count != 2)) {
+		ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _PCT data\n"));
+		result = -EFAULT;
+		goto end;
+	}
+
+	/*
+	 * control_register
+	 */
+
+	obj = pct->package.elements[0];
+
+	if ((obj.type != ACPI_TYPE_BUFFER)
+		|| (obj.buffer.length < sizeof(struct acpi_pct_register))
+		|| (obj.buffer.pointer == NULL)) {
+		ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
+			"Invalid _PCT data (control_register)\n"));
+		result = -EFAULT;
+		goto end;
+	}
+	memcpy(&pr->performance->control_register, obj.buffer.pointer, sizeof(struct acpi_pct_register));
+
+
+	/*
+	 * status_register
+	 */
+
+	obj = pct->package.elements[1];
+
+	if ((obj.type != ACPI_TYPE_BUFFER)
+		|| (obj.buffer.length < sizeof(struct acpi_pct_register))
+		|| (obj.buffer.pointer == NULL)) {
+		ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
+			"Invalid _PCT data (status_register)\n"));
+		result = -EFAULT;
+		goto end;
+	}
+
+	memcpy(&pr->performance->status_register, obj.buffer.pointer, sizeof(struct acpi_pct_register));
+
+end:
+	acpi_os_free(buffer.pointer);
+
+	return_VALUE(result);
+}
+
+
+static int
+acpi_processor_get_performance_states (
+	struct acpi_processor	*pr)
+{
+	int			result = 0;
+	acpi_status		status = AE_OK;
+	struct acpi_buffer	buffer = {ACPI_ALLOCATE_BUFFER, NULL};
+	struct acpi_buffer	format = {sizeof("NNNNNN"), "NNNNNN"};
+	struct acpi_buffer	state = {0, NULL};
+	union acpi_object 	*pss = NULL;
+	int			i;
+
+	ACPI_FUNCTION_TRACE("acpi_processor_get_performance_states");
+
+	status = acpi_evaluate_object(pr->handle, "_PSS", NULL, &buffer);
+	if(ACPI_FAILURE(status)) {
+		ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _PSS\n"));
+		return_VALUE(-ENODEV);
+	}
+
+	pss = (union acpi_object *) buffer.pointer;
+	if (!pss || (pss->type != ACPI_TYPE_PACKAGE)) {
+		ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _PSS data\n"));
+		result = -EFAULT;
+		goto end;
+	}
+
+	ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found %d performance states\n",
+		pss->package.count));
+
+	pr->performance->state_count = pss->package.count;
+	pr->performance->states = kmalloc(sizeof(struct acpi_processor_px) * pss->package.count, GFP_KERNEL);
+	if (!pr->performance->states) {
+		result = -ENOMEM;
+		goto end;
+	}
+
+	for (i = 0; i < pr->performance->state_count; i++) {
+
+		struct acpi_processor_px *px = &(pr->performance->states[i]);
+
+		state.length = sizeof(struct acpi_processor_px);
+		state.pointer = px;
+
+		ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Extracting state %d\n", i));
+
+		status = acpi_extract_package(&(pss->package.elements[i]),
+			&format, &state);
+		if (ACPI_FAILURE(status)) {
+			ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _PSS data\n"));
+			result = -EFAULT;
+			kfree(pr->performance->states);
+			goto end;
+		}
+
+		ACPI_DEBUG_PRINT((ACPI_DB_INFO,
+			"State [%d]: core_frequency[%d] power[%d] transition_latency[%d] bus_master_latency[%d] control[0x%x] status[0x%x]\n",
+			i,
+			(u32) px->core_frequency,
+			(u32) px->power,
+			(u32) px->transition_latency,
+			(u32) px->bus_master_latency,
+			(u32) px->control,
+			(u32) px->status));
+
+		if (!px->core_frequency) {
+			ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _PSS data: freq is zero\n"));
+			result = -EFAULT;
+			kfree(pr->performance->states);
+			goto end;
+		}
+	}
+
+end:
+	acpi_os_free(buffer.pointer);
+
+	return_VALUE(result);
+}
+
+
+static int
+acpi_processor_get_performance_info (
+	struct acpi_processor	*pr)
+{
+	int			result = 0;
+	acpi_status		status = AE_OK;
+	acpi_handle		handle = NULL;
+
+	ACPI_FUNCTION_TRACE("acpi_processor_get_performance_info");
+
+	if (!pr || !pr->performance || !pr->handle)
+		return_VALUE(-EINVAL);
+
+	acpi_processor_set_pdc(pr);
+
+	status = acpi_get_handle(pr->handle, "_PCT", &handle);
+	if (ACPI_FAILURE(status)) {
+		ACPI_DEBUG_PRINT((ACPI_DB_INFO,
+			"ACPI-based processor performance control unavailable\n"));
+		return_VALUE(-ENODEV);
+	}
+
+	result = acpi_processor_get_performance_control(pr);
+	if (result)
+		return_VALUE(result);
+
+	result = acpi_processor_get_performance_states(pr);
+	if (result)
+		return_VALUE(result);
+
+	result = acpi_processor_get_platform_limit(pr);
+	if (result)
+		return_VALUE(result);
+
+	return_VALUE(0);
+}
+
+
+int acpi_processor_notify_smm(struct module *calling_module) {
+	acpi_status		status;
+	static int		is_done = 0;
+
+	ACPI_FUNCTION_TRACE("acpi_processor_notify_smm");
+
+	if (!(acpi_processor_ppc_status & PPC_REGISTERED))
+		return_VALUE(-EBUSY);
+
+	if (!try_module_get(calling_module))
+		return_VALUE(-EINVAL);
+
+	/* is_done is set to negative if an error occured,
+	 * and to postitive if _no_ error occured, but SMM
+	 * was already notified. This avoids double notification
+	 * which might lead to unexpected results...
+	 */
+	if (is_done > 0) {
+		module_put(calling_module);
+		return_VALUE(0);
+	}
+	else if (is_done < 0) {
+		module_put(calling_module);
+		return_VALUE(is_done);
+	}
+
+	is_done = -EIO;
+
+	/* Can't write pstate_cnt to smi_cmd if either value is zero */
+	if ((!acpi_fadt.smi_cmd) ||
+	    (!acpi_fadt.pstate_cnt)) {
+		ACPI_DEBUG_PRINT((ACPI_DB_INFO,
+			"No SMI port or pstate_cnt\n"));
+		module_put(calling_module);
+		return_VALUE(0);
+	}
+
+	ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Writing pstate_cnt [0x%x] to smi_cmd [0x%x]\n", acpi_fadt.pstate_cnt, acpi_fadt.smi_cmd));
+
+	/* FADT v1 doesn't support pstate_cnt, many BIOS vendors use
+	 * it anyway, so we need to support it... */
+	if (acpi_fadt_is_v1) {
+		ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Using v1.0 FADT reserved value for pstate_cnt\n"));
+	}
+
+	status = acpi_os_write_port (acpi_fadt.smi_cmd,
+				     (u32) acpi_fadt.pstate_cnt, 8);
+	if (ACPI_FAILURE (status)) {
+		ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
+				  "Failed to write pstate_cnt [0x%x] to "
+				  "smi_cmd [0x%x]\n", acpi_fadt.pstate_cnt, acpi_fadt.smi_cmd));
+		module_put(calling_module);
+		return_VALUE(status);
+	}
+
+	/* Success. If there's no _PPC, we need to fear nothing, so
+	 * we can allow the cpufreq driver to be rmmod'ed. */
+	is_done = 1;
+
+	if (!(acpi_processor_ppc_status & PPC_IN_USE))
+		module_put(calling_module);
+
+	return_VALUE(0);
+}
+EXPORT_SYMBOL(acpi_processor_notify_smm);
+
+
+#ifdef CONFIG_X86_ACPI_CPUFREQ_PROC_INTF
+/* /proc/acpi/processor/../performance interface (DEPRECATED) */
+
+static int acpi_processor_perf_open_fs(struct inode *inode, struct file *file);
+static struct file_operations acpi_processor_perf_fops = {
+	.open 		= acpi_processor_perf_open_fs,
+	.read		= seq_read,
+	.llseek		= seq_lseek,
+	.release	= single_release,
+};
+
+static int acpi_processor_perf_seq_show(struct seq_file *seq, void *offset)
+{
+	struct acpi_processor	*pr = (struct acpi_processor *)seq->private;
+	int			i;
+
+	ACPI_FUNCTION_TRACE("acpi_processor_perf_seq_show");
+
+	if (!pr)
+		goto end;
+
+	if (!pr->performance) {
+		seq_puts(seq, "<not supported>\n");
+		goto end;
+	}
+
+	seq_printf(seq, "state count:             %d\n"
+			"active state:            P%d\n",
+			pr->performance->state_count,
+			pr->performance->state);
+
+	seq_puts(seq, "states:\n");
+	for (i = 0; i < pr->performance->state_count; i++)
+		seq_printf(seq, "   %cP%d:                  %d MHz, %d mW, %d uS\n",
+			(i == pr->performance->state?'*':' '), i,
+			(u32) pr->performance->states[i].core_frequency,
+			(u32) pr->performance->states[i].power,
+			(u32) pr->performance->states[i].transition_latency);
+
+end:
+	return_VALUE(0);
+}
+
+static int acpi_processor_perf_open_fs(struct inode *inode, struct file *file)
+{
+	return single_open(file, acpi_processor_perf_seq_show,
+						PDE(inode)->data);
+}
+
+static ssize_t
+acpi_processor_write_performance (
+        struct file		*file,
+        const char		__user *buffer,
+        size_t			count,
+        loff_t			*data)
+{
+	int			result = 0;
+	struct seq_file		*m = (struct seq_file *) file->private_data;
+	struct acpi_processor	*pr = (struct acpi_processor *) m->private;
+	struct acpi_processor_performance *perf;
+	char			state_string[12] = {'\0'};
+	unsigned int            new_state = 0;
+	struct cpufreq_policy   policy;
+
+	ACPI_FUNCTION_TRACE("acpi_processor_write_performance");
+
+	if (!pr || (count > sizeof(state_string) - 1))
+		return_VALUE(-EINVAL);
+
+	perf = pr->performance;
+	if (!perf)
+		return_VALUE(-EINVAL);
+
+	if (copy_from_user(state_string, buffer, count))
+		return_VALUE(-EFAULT);
+
+	state_string[count] = '\0';
+	new_state = simple_strtoul(state_string, NULL, 0);
+
+	if (new_state >= perf->state_count)
+		return_VALUE(-EINVAL);
+
+	cpufreq_get_policy(&policy, pr->id);
+
+	policy.cpu = pr->id;
+	policy.min = perf->states[new_state].core_frequency * 1000;
+	policy.max = perf->states[new_state].core_frequency * 1000;
+
+	result = cpufreq_set_policy(&policy);
+	if (result)
+		return_VALUE(result);
+
+	return_VALUE(count);
+}
+
+static void
+acpi_cpufreq_add_file (
+	struct acpi_processor *pr)
+{
+	struct proc_dir_entry	*entry = NULL;
+	struct acpi_device	*device = NULL;
+
+	ACPI_FUNCTION_TRACE("acpi_cpufreq_addfile");
+
+	if (acpi_bus_get_device(pr->handle, &device))
+		return_VOID;
+
+	/* add file 'performance' [R/W] */
+	entry = create_proc_entry(ACPI_PROCESSOR_FILE_PERFORMANCE,
+		  S_IFREG|S_IRUGO|S_IWUSR, acpi_device_dir(device));
+	if (!entry)
+		ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
+			"Unable to create '%s' fs entry\n",
+			ACPI_PROCESSOR_FILE_PERFORMANCE));
+	else {
+		entry->proc_fops = &acpi_processor_perf_fops;
+		entry->proc_fops->write = acpi_processor_write_performance;
+		entry->data = acpi_driver_data(device);
+		entry->owner = THIS_MODULE;
+	}
+	return_VOID;
+}
+
+static void
+acpi_cpufreq_remove_file (
+	struct acpi_processor *pr)
+{
+	struct acpi_device	*device = NULL;
+
+	ACPI_FUNCTION_TRACE("acpi_cpufreq_addfile");
+
+	if (acpi_bus_get_device(pr->handle, &device))
+		return_VOID;
+
+	/* remove file 'performance' */
+	remove_proc_entry(ACPI_PROCESSOR_FILE_PERFORMANCE,
+		  acpi_device_dir(device));
+
+	return_VOID;
+}
+
+#else
+static void acpi_cpufreq_add_file (struct acpi_processor *pr) { return; }
+static void acpi_cpufreq_remove_file (struct acpi_processor *pr) { return; }
+#endif /* CONFIG_X86_ACPI_CPUFREQ_PROC_INTF */
+
+
+int
+acpi_processor_register_performance (
+	struct acpi_processor_performance * performance,
+	unsigned int cpu)
+{
+	struct acpi_processor *pr;
+
+	ACPI_FUNCTION_TRACE("acpi_processor_register_performance");
+
+	if (!(acpi_processor_ppc_status & PPC_REGISTERED))
+		return_VALUE(-EINVAL);
+
+	down(&performance_sem);
+
+	pr = processors[cpu];
+	if (!pr) {
+		up(&performance_sem);
+		return_VALUE(-ENODEV);
+	}
+
+	if (pr->performance) {
+		up(&performance_sem);
+		return_VALUE(-EBUSY);
+	}
+
+	pr->performance = performance;
+
+	if (acpi_processor_get_performance_info(pr)) {
+		pr->performance = NULL;
+		up(&performance_sem);
+		return_VALUE(-EIO);
+	}
+
+	acpi_cpufreq_add_file(pr);
+
+	up(&performance_sem);
+	return_VALUE(0);
+}
+EXPORT_SYMBOL(acpi_processor_register_performance);
+
+
+void
+acpi_processor_unregister_performance (
+	struct acpi_processor_performance * performance,
+	unsigned int cpu)
+{
+	struct acpi_processor *pr;
+
+	ACPI_FUNCTION_TRACE("acpi_processor_unregister_performance");
+
+	down(&performance_sem);
+
+	pr = processors[cpu];
+	if (!pr) {
+		up(&performance_sem);
+		return_VOID;
+	}
+
+	kfree(pr->performance->states);
+	pr->performance = NULL;
+
+	acpi_cpufreq_remove_file(pr);
+
+	up(&performance_sem);
+
+	return_VOID;
+}
+EXPORT_SYMBOL(acpi_processor_unregister_performance);
diff -Nru a/drivers/acpi/processor_thermal.c b/drivers/acpi/processor_thermal.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/acpi/processor_thermal.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,406 @@
+/*
+ * processor_thermal.c - Passive cooling submodule of the ACPI processor driver
+ *
+ *  Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
+ *  Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
+ *  Copyright (C) 2004       Dominik Brodowski <linux@brodo.de>
+ *  Copyright (C) 2004  Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
+ *  			- Added processor hotplug support
+ *
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or (at
+ *  your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program; if not, write to the Free Software Foundation, Inc.,
+ *  59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+ *
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/cpufreq.h>
+#include <linux/proc_fs.h>
+#include <linux/seq_file.h>
+
+#include <asm/uaccess.h>
+
+#include <acpi/acpi_bus.h>
+#include <acpi/processor.h>
+#include <acpi/acpi_drivers.h>
+
+#define ACPI_PROCESSOR_COMPONENT        0x01000000
+#define ACPI_PROCESSOR_CLASS            "processor"
+#define ACPI_PROCESSOR_DRIVER_NAME      "ACPI Processor Driver"
+#define _COMPONENT              ACPI_PROCESSOR_COMPONENT
+ACPI_MODULE_NAME                ("acpi_processor")
+
+
+/* --------------------------------------------------------------------------
+                                 Limit Interface
+   -------------------------------------------------------------------------- */
+
+static int
+acpi_processor_apply_limit (
+	struct acpi_processor* 	pr)
+{
+	int			result = 0;
+	u16			px = 0;
+	u16			tx = 0;
+
+	ACPI_FUNCTION_TRACE("acpi_processor_apply_limit");
+
+	if (!pr)
+		return_VALUE(-EINVAL);
+
+	if (!pr->flags.limit)
+		return_VALUE(-ENODEV);
+
+	if (pr->flags.throttling) {
+		if (pr->limit.user.tx > tx)
+			tx = pr->limit.user.tx;
+		if (pr->limit.thermal.tx > tx)
+			tx = pr->limit.thermal.tx;
+
+		result = acpi_processor_set_throttling(pr, tx);
+		if (result)
+			goto end;
+	}
+
+	pr->limit.state.px = px;
+	pr->limit.state.tx = tx;
+
+	ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Processor [%d] limit set to (P%d:T%d)\n",
+		pr->id,
+		pr->limit.state.px,
+		pr->limit.state.tx));
+
+end:
+	if (result)
+		ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Unable to set limit\n"));
+
+	return_VALUE(result);
+}
+
+
+#ifdef CONFIG_CPU_FREQ
+
+/* If a passive cooling situation is detected, primarily CPUfreq is used, as it
+ * offers (in most cases) voltage scaling in addition to frequency scaling, and
+ * thus a cubic (instead of linear) reduction of energy. Also, we allow for
+ * _any_ cpufreq driver and not only the acpi-cpufreq driver.
+ */
+
+static unsigned int cpufreq_thermal_reduction_pctg[NR_CPUS];
+static unsigned int acpi_thermal_cpufreq_is_init = 0;
+
+
+static int cpu_has_cpufreq(unsigned int cpu)
+{
+	struct cpufreq_policy policy;
+	if (!acpi_thermal_cpufreq_is_init)
+		return -ENODEV;
+	if (!cpufreq_get_policy(&policy, cpu))
+		return -ENODEV;
+	return 0;
+}
+
+
+static int acpi_thermal_cpufreq_increase(unsigned int cpu)
+{
+	if (!cpu_has_cpufreq(cpu))
+		return -ENODEV;
+
+	if (cpufreq_thermal_reduction_pctg[cpu] < 60) {
+		cpufreq_thermal_reduction_pctg[cpu] += 20;
+		cpufreq_update_policy(cpu);
+		return 0;
+	}
+
+	return -ERANGE;
+}
+
+
+static int acpi_thermal_cpufreq_decrease(unsigned int cpu)
+{
+	if (!cpu_has_cpufreq(cpu))
+		return -ENODEV;
+
+	if (cpufreq_thermal_reduction_pctg[cpu] >= 20) {
+		cpufreq_thermal_reduction_pctg[cpu] -= 20;
+		cpufreq_update_policy(cpu);
+		return 0;
+	}
+
+	return -ERANGE;
+}
+
+
+static int acpi_thermal_cpufreq_notifier(
+	struct notifier_block *nb,
+	unsigned long event,
+	void *data)
+{
+	struct cpufreq_policy *policy = data;
+	unsigned long max_freq = 0;
+
+	if (event != CPUFREQ_ADJUST)
+		goto out;
+
+	max_freq = (policy->cpuinfo.max_freq * (100 - cpufreq_thermal_reduction_pctg[policy->cpu])) / 100;
+
+	cpufreq_verify_within_limits(policy, 0, max_freq);
+
+ out:
+	return 0;
+}
+
+
+static struct notifier_block acpi_thermal_cpufreq_notifier_block = {
+	.notifier_call = acpi_thermal_cpufreq_notifier,
+};
+
+
+void acpi_thermal_cpufreq_init(void) {
+	int i;
+
+	for (i=0; i<NR_CPUS; i++)
+		cpufreq_thermal_reduction_pctg[i] = 0;
+
+	i = cpufreq_register_notifier(&acpi_thermal_cpufreq_notifier_block, CPUFREQ_POLICY_NOTIFIER);
+	if (!i)
+		acpi_thermal_cpufreq_is_init = 1;
+}
+
+void acpi_thermal_cpufreq_exit(void) {
+	if (acpi_thermal_cpufreq_is_init)
+		cpufreq_unregister_notifier(&acpi_thermal_cpufreq_notifier_block, CPUFREQ_POLICY_NOTIFIER);
+
+	acpi_thermal_cpufreq_is_init = 0;
+}
+
+#else /* ! CONFIG_CPU_FREQ */
+
+static int acpi_thermal_cpufreq_increase(unsigned int cpu) { return -ENODEV; }
+static int acpi_thermal_cpufreq_decrease(unsigned int cpu) { return -ENODEV; }
+
+
+#endif
+
+
+int
+acpi_processor_set_thermal_limit (
+	acpi_handle		handle,
+	int			type)
+{
+	int			result = 0;
+	struct acpi_processor	*pr = NULL;
+	struct acpi_device	*device = NULL;
+	int			tx = 0;
+
+	ACPI_FUNCTION_TRACE("acpi_processor_set_thermal_limit");
+
+	if ((type < ACPI_PROCESSOR_LIMIT_NONE)
+		|| (type > ACPI_PROCESSOR_LIMIT_DECREMENT))
+		return_VALUE(-EINVAL);
+
+	result = acpi_bus_get_device(handle, &device);
+	if (result)
+		return_VALUE(result);
+
+	pr = (struct acpi_processor *) acpi_driver_data(device);
+	if (!pr)
+		return_VALUE(-ENODEV);
+
+	/* Thermal limits are always relative to the current Px/Tx state. */
+	if (pr->flags.throttling)
+		pr->limit.thermal.tx = pr->throttling.state;
+
+	/*
+	 * Our default policy is to only use throttling at the lowest
+	 * performance state.
+	 */
+
+	tx = pr->limit.thermal.tx;
+
+	switch (type) {
+
+	case ACPI_PROCESSOR_LIMIT_NONE:
+		do {
+			result = acpi_thermal_cpufreq_decrease(pr->id);
+		} while (!result);
+		tx = 0;
+		break;
+
+	case ACPI_PROCESSOR_LIMIT_INCREMENT:
+		/* if going up: P-states first, T-states later */
+
+		result = acpi_thermal_cpufreq_increase(pr->id);
+		if (!result)
+			goto end;
+		else if (result == -ERANGE)
+			ACPI_DEBUG_PRINT((ACPI_DB_INFO,
+					"At maximum performance state\n"));
+
+		if (pr->flags.throttling) {
+			if (tx == (pr->throttling.state_count - 1))
+				ACPI_DEBUG_PRINT((ACPI_DB_INFO,
+					"At maximum throttling state\n"));
+			else
+				tx++;
+		}
+		break;
+
+	case ACPI_PROCESSOR_LIMIT_DECREMENT:
+		/* if going down: T-states first, P-states later */
+
+		if (pr->flags.throttling) {
+			if (tx == 0)
+				ACPI_DEBUG_PRINT((ACPI_DB_INFO,
+					"At minimum throttling state\n"));
+			else {
+				tx--;
+				goto end;
+			}
+		}
+
+		result = acpi_thermal_cpufreq_decrease(pr->id);
+		if (result == -ERANGE)
+			ACPI_DEBUG_PRINT((ACPI_DB_INFO,
+					"At minimum performance state\n"));
+
+		break;
+	}
+
+end:
+	if (pr->flags.throttling) {
+		pr->limit.thermal.px = 0;
+		pr->limit.thermal.tx = tx;
+
+		result = acpi_processor_apply_limit(pr);
+		if (result)
+			ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
+					  "Unable to set thermal limit\n"));
+
+		ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Thermal limit now (P%d:T%d)\n",
+				  pr->limit.thermal.px,
+				  pr->limit.thermal.tx));
+	} else
+		result = 0;
+
+	return_VALUE(result);
+}
+
+
+int
+acpi_processor_get_limit_info (
+	struct acpi_processor	*pr)
+{
+	ACPI_FUNCTION_TRACE("acpi_processor_get_limit_info");
+
+	if (!pr)
+		return_VALUE(-EINVAL);
+
+	if (pr->flags.throttling)
+		pr->flags.limit = 1;
+
+	return_VALUE(0);
+}
+
+
+/* /proc interface */
+
+static int acpi_processor_limit_seq_show(struct seq_file *seq, void *offset)
+{
+	struct acpi_processor	*pr = (struct acpi_processor *)seq->private;
+
+	ACPI_FUNCTION_TRACE("acpi_processor_limit_seq_show");
+
+	if (!pr)
+		goto end;
+
+	if (!pr->flags.limit) {
+		seq_puts(seq, "<not supported>\n");
+		goto end;
+	}
+
+	seq_printf(seq, "active limit:            P%d:T%d\n"
+			"user limit:              P%d:T%d\n"
+			"thermal limit:           P%d:T%d\n",
+			pr->limit.state.px, pr->limit.state.tx,
+			pr->limit.user.px, pr->limit.user.tx,
+			pr->limit.thermal.px, pr->limit.thermal.tx);
+
+end:
+	return_VALUE(0);
+}
+
+int acpi_processor_limit_open_fs(struct inode *inode, struct file *file)
+{
+	return single_open(file, acpi_processor_limit_seq_show,
+						PDE(inode)->data);
+}
+
+ssize_t acpi_processor_write_limit (
+	struct file		*file,
+	const char		__user *buffer,
+	size_t			count,
+	loff_t			*data)
+{
+	int			result = 0;
+        struct seq_file 	*m = (struct seq_file *)file->private_data;
+	struct acpi_processor	*pr = (struct acpi_processor *)m->private;
+	char			limit_string[25] = {'\0'};
+	int			px = 0;
+	int			tx = 0;
+
+	ACPI_FUNCTION_TRACE("acpi_processor_write_limit");
+
+	if (!pr || (count > sizeof(limit_string) - 1)) {
+		ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid argument\n"));
+		return_VALUE(-EINVAL);
+	}
+
+	if (copy_from_user(limit_string, buffer, count)) {
+		ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid data\n"));
+		return_VALUE(-EFAULT);
+	}
+
+	limit_string[count] = '\0';
+
+	if (sscanf(limit_string, "%d:%d", &px, &tx) != 2) {
+		ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid data format\n"));
+		return_VALUE(-EINVAL);
+	}
+
+	if (pr->flags.throttling) {
+		if ((tx < 0) || (tx > (pr->throttling.state_count - 1))) {
+			ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid tx\n"));
+			return_VALUE(-EINVAL);
+		}
+		pr->limit.user.tx = tx;
+	}
+
+	result = acpi_processor_apply_limit(pr);
+
+	return_VALUE(count);
+}
+
+
+struct file_operations acpi_processor_limit_fops = {
+	.open 		= acpi_processor_limit_open_fs,
+	.read		= seq_read,
+	.llseek		= seq_lseek,
+	.release	= single_release,
+};
+
diff -Nru a/drivers/acpi/processor_throttling.c b/drivers/acpi/processor_throttling.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/acpi/processor_throttling.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,351 @@
+/*
+ * processor_throttling.c - Throttling submodule of the ACPI processor driver
+ *
+ *  Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
+ *  Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
+ *  Copyright (C) 2004       Dominik Brodowski <linux@brodo.de>
+ *  Copyright (C) 2004  Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
+ *  			- Added processor hotplug support
+ *
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or (at
+ *  your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program; if not, write to the Free Software Foundation, Inc.,
+ *  59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+ *
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/cpufreq.h>
+#include <linux/proc_fs.h>
+#include <linux/seq_file.h>
+
+#include <asm/io.h>
+#include <asm/uaccess.h>
+
+#include <acpi/acpi_bus.h>
+#include <acpi/processor.h>
+
+#define ACPI_PROCESSOR_COMPONENT        0x01000000
+#define ACPI_PROCESSOR_CLASS            "processor"
+#define ACPI_PROCESSOR_DRIVER_NAME      "ACPI Processor Driver"
+#define _COMPONENT              ACPI_PROCESSOR_COMPONENT
+ACPI_MODULE_NAME                ("acpi_processor")
+
+
+/* --------------------------------------------------------------------------
+                              Throttling Control
+   -------------------------------------------------------------------------- */
+
+static int
+acpi_processor_get_throttling (
+	struct acpi_processor	*pr)
+{
+	int			state = 0;
+	u32			value = 0;
+	u32			duty_mask = 0;
+	u32			duty_value = 0;
+
+	ACPI_FUNCTION_TRACE("acpi_processor_get_throttling");
+
+	if (!pr)
+		return_VALUE(-EINVAL);
+
+	if (!pr->flags.throttling)
+		return_VALUE(-ENODEV);
+
+	pr->throttling.state = 0;
+
+	duty_mask = pr->throttling.state_count - 1;
+
+	duty_mask <<= pr->throttling.duty_offset;
+
+	local_irq_disable();
+
+	value = inl(pr->throttling.address);
+
+	/*
+	 * Compute the current throttling state when throttling is enabled
+	 * (bit 4 is on).
+	 */
+	if (value & 0x10) {
+		duty_value = value & duty_mask;
+		duty_value >>= pr->throttling.duty_offset;
+
+		if (duty_value)
+			state = pr->throttling.state_count-duty_value;
+	}
+
+	pr->throttling.state = state;
+
+	local_irq_enable();
+
+	ACPI_DEBUG_PRINT((ACPI_DB_INFO,
+		"Throttling state is T%d (%d%% throttling applied)\n",
+		state, pr->throttling.states[state].performance));
+
+	return_VALUE(0);
+}
+
+
+int acpi_processor_set_throttling (
+	struct acpi_processor	*pr,
+	int			state)
+{
+	u32                     value = 0;
+	u32                     duty_mask = 0;
+	u32                     duty_value = 0;
+
+	ACPI_FUNCTION_TRACE("acpi_processor_set_throttling");
+
+	if (!pr)
+		return_VALUE(-EINVAL);
+
+	if ((state < 0) || (state > (pr->throttling.state_count - 1)))
+		return_VALUE(-EINVAL);
+
+	if (!pr->flags.throttling)
+		return_VALUE(-ENODEV);
+
+	if (state == pr->throttling.state)
+		return_VALUE(0);
+
+	/*
+	 * Calculate the duty_value and duty_mask.
+	 */
+	if (state) {
+		duty_value = pr->throttling.state_count - state;
+
+		duty_value <<= pr->throttling.duty_offset;
+
+		/* Used to clear all duty_value bits */
+		duty_mask = pr->throttling.state_count - 1;
+
+		duty_mask <<= acpi_fadt.duty_offset;
+		duty_mask = ~duty_mask;
+	}
+
+	local_irq_disable();
+
+	/*
+	 * Disable throttling by writing a 0 to bit 4.  Note that we must
+	 * turn it off before you can change the duty_value.
+	 */
+	value = inl(pr->throttling.address);
+	if (value & 0x10) {
+		value &= 0xFFFFFFEF;
+		outl(value, pr->throttling.address);
+	}
+
+	/*
+	 * Write the new duty_value and then enable throttling.  Note
+	 * that a state value of 0 leaves throttling disabled.
+	 */
+	if (state) {
+		value &= duty_mask;
+		value |= duty_value;
+		outl(value, pr->throttling.address);
+
+		value |= 0x00000010;
+		outl(value, pr->throttling.address);
+	}
+
+	pr->throttling.state = state;
+
+	local_irq_enable();
+
+	ACPI_DEBUG_PRINT((ACPI_DB_INFO,
+		"Throttling state set to T%d (%d%%)\n", state,
+		(pr->throttling.states[state].performance?pr->throttling.states[state].performance/10:0)));
+
+	return_VALUE(0);
+}
+
+
+int
+acpi_processor_get_throttling_info (
+	struct acpi_processor	*pr)
+{
+	int			result = 0;
+	int			step = 0;
+	int			i = 0;
+
+	ACPI_FUNCTION_TRACE("acpi_processor_get_throttling_info");
+
+	ACPI_DEBUG_PRINT((ACPI_DB_INFO,
+		"pblk_address[0x%08x] duty_offset[%d] duty_width[%d]\n",
+		pr->throttling.address,
+		pr->throttling.duty_offset,
+		pr->throttling.duty_width));
+
+	if (!pr)
+		return_VALUE(-EINVAL);
+
+	/* TBD: Support ACPI 2.0 objects */
+
+	if (!pr->throttling.address) {
+		ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No throttling register\n"));
+		return_VALUE(0);
+	}
+	else if (!pr->throttling.duty_width) {
+		ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No throttling states\n"));
+		return_VALUE(0);
+	}
+	/* TBD: Support duty_cycle values that span bit 4. */
+	else if ((pr->throttling.duty_offset
+		+ pr->throttling.duty_width) > 4) {
+		ACPI_DEBUG_PRINT((ACPI_DB_WARN, "duty_cycle spans bit 4\n"));
+		return_VALUE(0);
+	}
+
+	/*
+	 * PIIX4 Errata: We don't support throttling on the original PIIX4.
+	 * This shouldn't be an issue as few (if any) mobile systems ever
+	 * used this part.
+	 */
+	if (errata.piix4.throttle) {
+		ACPI_DEBUG_PRINT((ACPI_DB_INFO,
+			"Throttling not supported on PIIX4 A- or B-step\n"));
+		return_VALUE(0);
+	}
+
+	pr->throttling.state_count = 1 << acpi_fadt.duty_width;
+
+	/*
+	 * Compute state values. Note that throttling displays a linear power/
+	 * performance relationship (at 50% performance the CPU will consume
+	 * 50% power).  Values are in 1/10th of a percent to preserve accuracy.
+	 */
+
+	step = (1000 / pr->throttling.state_count);
+
+	for (i=0; i<pr->throttling.state_count; i++) {
+		pr->throttling.states[i].performance = step * i;
+		pr->throttling.states[i].power = step * i;
+	}
+
+	ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found %d throttling states\n",
+		pr->throttling.state_count));
+
+	pr->flags.throttling = 1;
+
+	/*
+	 * Disable throttling (if enabled).  We'll let subsequent policy (e.g.
+	 * thermal) decide to lower performance if it so chooses, but for now
+	 * we'll crank up the speed.
+	 */
+
+	result = acpi_processor_get_throttling(pr);
+	if (result)
+		goto end;
+
+	if (pr->throttling.state) {
+		ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Disabling throttling (was T%d)\n",
+			pr->throttling.state));
+		result = acpi_processor_set_throttling(pr, 0);
+		if (result)
+			goto end;
+	}
+
+end:
+	if (result)
+		pr->flags.throttling = 0;
+
+	return_VALUE(result);
+}
+
+
+/* proc interface */
+
+static int acpi_processor_throttling_seq_show(struct seq_file *seq, void *offset)
+{
+	struct acpi_processor	*pr = (struct acpi_processor *)seq->private;
+	int			i = 0;
+	int                     result = 0;
+
+	ACPI_FUNCTION_TRACE("acpi_processor_throttling_seq_show");
+
+	if (!pr)
+		goto end;
+
+	if (!(pr->throttling.state_count > 0)) {
+		seq_puts(seq, "<not supported>\n");
+		goto end;
+	}
+
+	result = acpi_processor_get_throttling(pr);
+
+	if (result) {
+		seq_puts(seq, "Could not determine current throttling state.\n");
+		goto end;
+	}
+
+	seq_printf(seq, "state count:             %d\n"
+			"active state:            T%d\n",
+			pr->throttling.state_count,
+			pr->throttling.state);
+
+	seq_puts(seq, "states:\n");
+	for (i = 0; i < pr->throttling.state_count; i++)
+		seq_printf(seq, "   %cT%d:                  %02d%%\n",
+			(i == pr->throttling.state?'*':' '), i,
+			(pr->throttling.states[i].performance?pr->throttling.states[i].performance/10:0));
+
+end:
+	return_VALUE(0);
+}
+
+int acpi_processor_throttling_open_fs(struct inode *inode, struct file *file)
+{
+	return single_open(file, acpi_processor_throttling_seq_show,
+						PDE(inode)->data);
+}
+
+ssize_t acpi_processor_write_throttling (
+        struct file		*file,
+        const char		__user *buffer,
+        size_t			count,
+        loff_t			*data)
+{
+	int			result = 0;
+        struct seq_file 	*m = (struct seq_file *)file->private_data;
+	struct acpi_processor	*pr = (struct acpi_processor *)m->private;
+	char			state_string[12] = {'\0'};
+
+	ACPI_FUNCTION_TRACE("acpi_processor_write_throttling");
+
+	if (!pr || (count > sizeof(state_string) - 1))
+		return_VALUE(-EINVAL);
+
+	if (copy_from_user(state_string, buffer, count))
+		return_VALUE(-EFAULT);
+
+	state_string[count] = '\0';
+
+	result = acpi_processor_set_throttling(pr,
+		simple_strtoul(state_string, NULL, 0));
+	if (result)
+		return_VALUE(result);
+
+	return_VALUE(count);
+}
+
+struct file_operations acpi_processor_throttling_fops = {
+	.open 		= acpi_processor_throttling_open_fs,
+	.read		= seq_read,
+	.llseek		= seq_lseek,
+	.release	= single_release,
+};
diff -Nru a/drivers/acpi/scan.c b/drivers/acpi/scan.c
--- a/drivers/acpi/scan.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/acpi/scan.c	2005-01-10 20:11:18 -08:00
@@ -2,9 +2,9 @@
  * scan.c - support for transforming the ACPI namespace into individual objects
  */
 
+#include <linux/module.h>
 #include <linux/init.h>
 #include <linux/acpi.h>
-#include <linux/module.h>
 
 #include <acpi/acpi_drivers.h>
 #include <acpi/acinterp.h>	/* for acpi_ex_eisa_id_to_string() */
@@ -35,7 +35,49 @@
 	kfree(dev);
 }
 
+struct acpi_device_attribute {
+	struct attribute attr;
+	ssize_t (*show)(struct acpi_device *, char *);
+	ssize_t (*store)(struct acpi_device *, const char *, size_t);
+};
+
+typedef void acpi_device_sysfs_files(struct kobject *,
+				const struct attribute *);
+
+static void setup_sys_fs_device_files(struct acpi_device *dev,
+		acpi_device_sysfs_files *func);
+
+#define create_sysfs_device_files(dev)	\
+	setup_sys_fs_device_files(dev, (acpi_device_sysfs_files *)&sysfs_create_file)
+#define remove_sysfs_device_files(dev)	\
+	setup_sys_fs_device_files(dev, (acpi_device_sysfs_files *)&sysfs_remove_file)
+
+
+#define to_acpi_device(n) container_of(n, struct acpi_device, kobj)
+#define to_handle_attr(n) container_of(n, struct acpi_device_attribute, attr);
+
+static ssize_t acpi_device_attr_show(struct kobject *kobj,
+		struct attribute *attr, char *buf)
+{
+	struct acpi_device *device = to_acpi_device(kobj);
+	struct acpi_device_attribute *attribute = to_handle_attr(attr);
+	return attribute->show ? attribute->show(device, buf) : 0;
+}
+static ssize_t acpi_device_attr_store(struct kobject *kobj,
+		struct attribute *attr, const char *buf, size_t len)
+{
+	struct acpi_device *device = to_acpi_device(kobj);
+	struct acpi_device_attribute *attribute = to_handle_attr(attr);
+	return attribute->store ? attribute->store(device, buf, len) : len;
+}
+
+static struct sysfs_ops acpi_device_sysfs_ops = {
+	.show	= acpi_device_attr_show,
+	.store	= acpi_device_attr_store,
+};
+
 static struct kobj_type ktype_acpi_ns = {
+	.sysfs_ops	= &acpi_device_sysfs_ops,
 	.release	= acpi_device_release,
 };
 
@@ -58,6 +100,7 @@
 	INIT_LIST_HEAD(&device->children);
 	INIT_LIST_HEAD(&device->node);
 	INIT_LIST_HEAD(&device->g_list);
+	INIT_LIST_HEAD(&device->wakeup_list);
 
 	spin_lock(&acpi_device_lock);
 	if (device->parent) {
@@ -65,15 +108,17 @@
 		list_add_tail(&device->g_list,&device->parent->g_list);
 	} else
 		list_add_tail(&device->g_list,&acpi_device_list);
+	if (device->wakeup.flags.valid)
+		list_add_tail(&device->wakeup_list,&acpi_wakeup_device_list);
 	spin_unlock(&acpi_device_lock);
 
-	kobject_init(&device->kobj);
 	strlcpy(device->kobj.name,device->pnp.bus_id,KOBJ_NAME_LEN);
 	if (parent)
 		device->kobj.parent = &parent->kobj;
 	device->kobj.ktype = &ktype_acpi_ns;
 	device->kobj.kset = &acpi_namespace_kset;
-	kobject_add(&device->kobj);
+	kobject_register(&device->kobj);
+	create_sysfs_device_files(device);
 }
 
 static int
@@ -81,6 +126,19 @@
 	struct acpi_device	*device, 
 	int			type)
 {
+	spin_lock(&acpi_device_lock);
+	if (device->parent) {
+		list_del(&device->node);
+		list_del(&device->g_list);
+	} else
+		list_del(&device->g_list);
+
+	list_del(&device->wakeup_list);
+
+	spin_unlock(&acpi_device_lock);
+
+	acpi_detach_data(device->handle, acpi_bus_data_handler);
+	remove_sysfs_device_files(device);
 	kobject_unregister(&device->kobj);
 	return 0;
 }
@@ -272,12 +330,6 @@
 	if (!acpi_match_ids(device, "PNP0C0D,PNP0C0C,PNP0C0E"))
 		device->wakeup.flags.run_wake = 1;
 
-	/* TBD: lock */
-	INIT_LIST_HEAD(&device->wakeup_list);
-	spin_lock(&acpi_device_lock);
-	list_add_tail(&device->wakeup_list, &acpi_wakeup_device_list);
-	spin_unlock(&acpi_device_lock);
-
 end:
 	if (ACPI_FAILURE(status))
 		device->flags.wake_capable = 0;
@@ -285,6 +337,114 @@
 }
 
 /* --------------------------------------------------------------------------
+		ACPI hotplug sysfs device file support
+   -------------------------------------------------------------------------- */
+static ssize_t acpi_eject_store(struct acpi_device *device, 
+		const char *buf, size_t count);
+
+#define ACPI_DEVICE_ATTR(_name,_mode,_show,_store) \
+static struct acpi_device_attribute acpi_device_attr_##_name = \
+		__ATTR(_name, _mode, _show, _store)
+
+ACPI_DEVICE_ATTR(eject, 0200, NULL, acpi_eject_store);
+
+/**
+ * setup_sys_fs_device_files - sets up the device files under device namespace
+ * @@dev:	acpi_device object
+ * @@func:	function pointer to create or destroy the device file
+ */
+static void
+setup_sys_fs_device_files (
+	struct acpi_device *dev,
+	acpi_device_sysfs_files *func)
+{
+	if (dev->flags.ejectable == 1)
+		(*(func))(&dev->kobj,&acpi_device_attr_eject.attr);
+}
+
+static int
+acpi_eject_operation(acpi_handle handle, int lockable)
+{
+	struct acpi_object_list arg_list;
+	union acpi_object arg;
+	acpi_status status = AE_OK;
+
+	/*
+	 * TBD: evaluate _PS3?
+	 */
+
+	if (lockable) {
+		arg_list.count = 1;
+		arg_list.pointer = &arg;
+		arg.type = ACPI_TYPE_INTEGER;
+		arg.integer.value = 0;
+		acpi_evaluate_object(handle, "_LCK", &arg_list, NULL);
+	}
+
+	arg_list.count = 1;
+	arg_list.pointer = &arg;
+	arg.type = ACPI_TYPE_INTEGER;
+	arg.integer.value = 1;
+
+	/*
+	 * TBD: _EJD support.
+	 */
+
+	status = acpi_evaluate_object(handle, "_EJ0", &arg_list, NULL);
+	if (ACPI_FAILURE(status)) {
+		return(-ENODEV);
+	}
+
+	return(0);
+}
+
+
+static ssize_t
+acpi_eject_store(struct acpi_device *device, const char *buf, size_t count)
+{
+	int	result;
+	int	ret = count;
+	int	islockable;
+	acpi_status	status;
+	acpi_handle	handle;
+	acpi_object_type	type = 0;
+
+	if ((!count) || (buf[0] != '1')) {
+		return -EINVAL;
+	}
+
+#ifndef FORCE_EJECT
+	if (device->driver == NULL) {
+		ret = -ENODEV;
+		goto err;
+	}
+#endif
+	status = acpi_get_type(device->handle, &type);
+	if (ACPI_FAILURE(status) || (!device->flags.ejectable) ) {
+		ret = -ENODEV;
+		goto err;
+	}
+
+	islockable = device->flags.lockable;
+	handle = device->handle;
+
+	if (type == ACPI_TYPE_PROCESSOR)
+		result = acpi_bus_trim(device, 0);
+	else
+		result = acpi_bus_trim(device, 1);
+
+	if (!result)
+		result = acpi_eject_operation(handle, islockable);
+
+	if (result) {
+		ret = -EBUSY;
+	}
+err:
+	return ret;
+}
+
+
+/* --------------------------------------------------------------------------
                               Performance Management
    -------------------------------------------------------------------------- */
 
@@ -727,7 +887,7 @@
 #ifdef CONFIG_ACPI_DEBUG_OUTPUT
 	char		*type_string = NULL;
 	char		name[80] = {'?','\0'};
-	acpi_buffer	buffer = {sizeof(name), name};
+	struct acpi_buffer	buffer = {sizeof(name), name};
 
 	switch (type) {
 	case ACPI_BUS_TYPE_DEVICE:
@@ -764,7 +924,55 @@
 #endif /*CONFIG_ACPI_DEBUG_OUTPUT*/
 }
 
-int 
+
+int
+acpi_bus_remove (
+	struct acpi_device *dev,
+	int rmdevice)
+{
+	int 			result = 0;
+	struct acpi_driver	*driver;
+	
+	ACPI_FUNCTION_TRACE("acpi_bus_remove");
+
+	if (!dev)
+		return_VALUE(-EINVAL);
+
+	driver = dev->driver;
+
+	if ((driver) && (driver->ops.remove)) {
+
+		if (driver->ops.stop) {
+			result = driver->ops.stop(dev, ACPI_BUS_REMOVAL_EJECT);
+			if (result)
+				return_VALUE(result);
+		}
+
+		result = dev->driver->ops.remove(dev, ACPI_BUS_REMOVAL_EJECT);
+		if (result) {
+			return_VALUE(result);
+		}
+
+		atomic_dec(&dev->driver->references);
+		dev->driver = NULL;
+		acpi_driver_data(dev) = NULL;
+	}
+
+	if (!rmdevice)
+		return_VALUE(0);
+
+	if (dev->flags.bus_address) {
+		if ((dev->parent) && (dev->parent->ops.unbind))
+			dev->parent->ops.unbind(dev);
+	}
+	
+	acpi_device_unregister(dev, ACPI_BUS_REMOVAL_EJECT);
+
+	return_VALUE(0);
+}
+
+
+int
 acpi_bus_add (
 	struct acpi_device	**child,
 	struct acpi_device	*parent,
@@ -911,7 +1119,7 @@
 EXPORT_SYMBOL(acpi_bus_add);
 
 
-static int acpi_bus_scan (struct acpi_device	*start)
+int acpi_bus_scan (struct acpi_device	*start)
 {
 	acpi_status		status = AE_OK;
 	struct acpi_device	*parent = NULL;
@@ -1014,6 +1222,62 @@
 }
 EXPORT_SYMBOL(acpi_bus_scan);
 
+
+int
+acpi_bus_trim(struct acpi_device	*start,
+		int rmdevice)
+{
+	acpi_status		status;
+	struct acpi_device	*parent, *child;
+	acpi_handle		phandle, chandle;
+	acpi_object_type	type;
+	u32			level = 1;
+	int			err = 0;
+
+	parent  = start;
+	phandle = start->handle;
+	child = chandle = NULL;
+
+	while ((level > 0) && parent && (!err)) {
+		status = acpi_get_next_object(ACPI_TYPE_ANY, phandle,
+			chandle, &chandle);
+
+		/*
+		 * If this scope is exhausted then move our way back up.
+		 */
+		if (ACPI_FAILURE(status)) {
+			level--;
+			chandle = phandle;
+			acpi_get_parent(phandle, &phandle);
+			child = parent;
+			parent = parent->parent;
+
+			if (level == 0)
+				err = acpi_bus_remove(child, rmdevice);
+			else
+				err = acpi_bus_remove(child, 1);
+
+			continue;
+		}
+
+		status = acpi_get_type(chandle, &type);
+		if (ACPI_FAILURE(status)) {
+			continue;
+		}
+		/*
+		 * If there is a device corresponding to chandle then
+		 * parse it (depth-first).
+		 */
+		if (acpi_bus_get_device(chandle, &child) == 0) {
+			level++;
+			phandle = chandle;
+			chandle = NULL;
+			parent = child;
+		}
+		continue;
+	}
+	return err;
+}
 
 static int
 acpi_bus_scan_fixed (
diff -Nru a/drivers/acpi/sleep/proc.c b/drivers/acpi/sleep/proc.c
--- a/drivers/acpi/sleep/proc.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/acpi/sleep/proc.c	2005-01-10 20:11:20 -08:00
@@ -83,6 +83,7 @@
 {
 	u32			sec, min, hr;
 	u32			day, mo, yr;
+	unsigned char		rtc_control = 0;
 
 	ACPI_FUNCTION_TRACE("acpi_system_alarm_seq_show");
 
@@ -91,10 +92,12 @@
 	sec = CMOS_READ(RTC_SECONDS_ALARM);
 	min = CMOS_READ(RTC_MINUTES_ALARM);
 	hr = CMOS_READ(RTC_HOURS_ALARM);
+	rtc_control = CMOS_READ(RTC_CONTROL);
 
-#if 0	/* If we ever get an FACP with proper values... */
+	/* If we ever get an FACP with proper values... */
 	if (acpi_gbl_FADT->day_alrm)
-		day = CMOS_READ(acpi_gbl_FADT->day_alrm);
+		/* ACPI spec: only low 6 its should be cared */
+		day = CMOS_READ(acpi_gbl_FADT->day_alrm) & 0x3F;
 	else
 		day =  CMOS_READ(RTC_DAY_OF_MONTH);
 	if (acpi_gbl_FADT->mon_alrm)
@@ -105,24 +108,20 @@
 		yr = CMOS_READ(acpi_gbl_FADT->century) * 100 + CMOS_READ(RTC_YEAR);
 	else
 		yr = CMOS_READ(RTC_YEAR);
-#else
-	day = CMOS_READ(RTC_DAY_OF_MONTH);
-	mo = CMOS_READ(RTC_MONTH);
-	yr = CMOS_READ(RTC_YEAR);
-#endif
 
 	spin_unlock(&rtc_lock);
 
-	BCD_TO_BIN(sec);
-	BCD_TO_BIN(min);
-	BCD_TO_BIN(hr);
-	BCD_TO_BIN(day);
-	BCD_TO_BIN(mo);
-	BCD_TO_BIN(yr);
+	if (!(rtc_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) {
+		BCD_TO_BIN(sec);
+		BCD_TO_BIN(min);
+		BCD_TO_BIN(hr);
+		BCD_TO_BIN(day);
+		BCD_TO_BIN(mo);
+		BCD_TO_BIN(yr);
+	}
 
-#if 0
 	/* we're trusting the FADT (see above)*/
-#else
+	if (!acpi_gbl_FADT->century)
 	/* If we're not trusting the FADT, we should at least make it
 	 * right for _this_ century... ehm, what is _this_ century?
 	 *
@@ -141,8 +140,7 @@
 	 *        s/2000/2100
 	 *
 	 */
-	yr += 2000;
-#endif
+		yr += 2000;
 
 	seq_printf(seq,"%4.4u-", yr);
 	(mo > 12)  ? seq_puts(seq, "**-")  : seq_printf(seq, "%2.2u-", mo);
@@ -316,6 +314,13 @@
 	}
 
 	spin_lock_irq(&rtc_lock);
+	/*
+	 * Disable alarm interrupt before setting alarm timer or else
+	 * when ACPI_EVENT_RTC is enabled, a spurious ACPI interrupt occurs
+	 */
+	rtc_control &= ~RTC_AIE;
+	CMOS_WRITE(rtc_control, RTC_CONTROL);
+	CMOS_READ(RTC_INTR_FLAGS);
 
 	/* write the fields the rtc knows about */
 	CMOS_WRITE(hr, RTC_HOURS_ALARM);
@@ -327,24 +332,21 @@
 	 * offsets into the CMOS RAM here -- which for some reason are pointing
 	 * to the RTC area of memory.
 	 */
-#if 0
 	if (acpi_gbl_FADT->day_alrm)
 		CMOS_WRITE(day, acpi_gbl_FADT->day_alrm);
 	if (acpi_gbl_FADT->mon_alrm)
 		CMOS_WRITE(mo, acpi_gbl_FADT->mon_alrm);
 	if (acpi_gbl_FADT->century)
 		CMOS_WRITE(yr/100, acpi_gbl_FADT->century);
-#endif
 	/* enable the rtc alarm interrupt */
-	if (!(rtc_control & RTC_AIE)) {
-		rtc_control |= RTC_AIE;
-		CMOS_WRITE(rtc_control,RTC_CONTROL);
-		CMOS_READ(RTC_INTR_FLAGS);
-	}
+	rtc_control |= RTC_AIE;
+	CMOS_WRITE(rtc_control, RTC_CONTROL);
+	CMOS_READ(RTC_INTR_FLAGS);
 
 	spin_unlock_irq(&rtc_lock);
 
-	acpi_set_register(ACPI_BITREG_RT_CLOCK_ENABLE, 1, ACPI_MTX_LOCK);
+	acpi_clear_event(ACPI_EVENT_RTC);
+	acpi_enable_event(ACPI_EVENT_RTC, 0);
 
 	*ppos += count;
 
@@ -395,6 +397,7 @@
 	char		strbuf[5];
 	char		str[5] = "";
 	int 		len = count;
+	struct acpi_device *found_dev = NULL;
 
 	if (len > 4) len = 4;
 
@@ -411,9 +414,25 @@
 
 		if (!strncmp(dev->pnp.bus_id, str, 4)) {
 			dev->wakeup.state.enabled = dev->wakeup.state.enabled ? 0:1;
+			found_dev = dev;
 			break;
 		}
 	}
+	if (found_dev) {
+		list_for_each_safe(node, next, &acpi_wakeup_device_list) {
+			struct acpi_device * dev = container_of(node,
+				struct acpi_device, wakeup_list);
+
+			if ((dev != found_dev) &&
+				(dev->wakeup.gpe_number == found_dev->wakeup.gpe_number) &&
+				(dev->wakeup.gpe_device == found_dev->wakeup.gpe_device)) {
+				printk(KERN_WARNING "ACPI: '%s' and '%s' have the same GPE, "
+					"can't disable/enable one seperately\n",
+					dev->pnp.bus_id, found_dev->pnp.bus_id);
+				dev->wakeup.state.enabled = found_dev->wakeup.state.enabled;
+			}
+		}
+	}
 	spin_unlock(&acpi_device_lock);
 	return count;
 }
@@ -449,6 +468,14 @@
 };
 
 
+static u32 rtc_handler(void * context)
+{
+	acpi_clear_event(ACPI_EVENT_RTC);
+	acpi_disable_event(ACPI_EVENT_RTC, 0);
+
+	return ACPI_INTERRUPT_HANDLED;
+}
+
 static int acpi_sleep_proc_init(void)
 {
 	struct proc_dir_entry	*entry = NULL;
@@ -474,6 +501,7 @@
 	if (entry)
 		entry->proc_fops = &acpi_system_wakeup_device_fops;
 
+	acpi_install_fixed_event_handler(ACPI_EVENT_RTC, rtc_handler, NULL);
 	return 0;
 }
 
diff -Nru a/drivers/acpi/tables/tbconvrt.c b/drivers/acpi/tables/tbconvrt.c
--- a/drivers/acpi/tables/tbconvrt.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/acpi/tables/tbconvrt.c	2005-01-10 20:11:18 -08:00
@@ -190,7 +190,7 @@
 	new_gas_struct->address_space_id = ACPI_ADR_SPACE_SYSTEM_IO;
 	new_gas_struct->register_bit_width = register_bit_width;
 	new_gas_struct->register_bit_offset = 0;
-	new_gas_struct->reserved        = 0;
+	new_gas_struct->access_width    = 0;
 }
 
 
@@ -510,7 +510,7 @@
  *
  * FUNCTION:    acpi_tb_convert_table_facs
  *
- * PARAMETERS:  table_info      - Info for currently installad FACS
+ * PARAMETERS:  table_info      - Info for currently installed FACS
  *
  * RETURN:      Status
  *
diff -Nru a/drivers/acpi/tables/tbrsdt.c b/drivers/acpi/tables/tbrsdt.c
--- a/drivers/acpi/tables/tbrsdt.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/acpi/tables/tbrsdt.c	2005-01-10 20:11:20 -08:00
@@ -277,6 +277,7 @@
 
 	acpi_tb_get_rsdt_address (&address);
 
+	table_info.type = ACPI_TABLE_XSDT;
 	status = acpi_tb_get_table (&address, &table_info);
 	if (ACPI_FAILURE (status)) {
 		ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not get the RSDT/XSDT, %s\n",
diff -Nru a/drivers/acpi/tables/tbxfroot.c b/drivers/acpi/tables/tbxfroot.c
--- a/drivers/acpi/tables/tbxfroot.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/acpi/tables/tbxfroot.c	2005-01-10 20:11:21 -08:00
@@ -387,35 +387,58 @@
 	u8                              *start_address,
 	u32                             length)
 {
-	u32                             offset;
 	u8                              *mem_rover;
+	u8                              *end_address;
+	u8                              checksum;
 
 
 	ACPI_FUNCTION_TRACE ("tb_scan_memory_for_rsdp");
 
 
-	/* Search from given start addr for the requested length  */
+	end_address = start_address + length;
 
-	for (offset = 0, mem_rover = start_address;
-		 offset < length;
-		 offset += ACPI_RSDP_SCAN_STEP, mem_rover += ACPI_RSDP_SCAN_STEP) {
+	/* Search from given start address for the requested length */
 
+	for (mem_rover = start_address; mem_rover < end_address;
+		 mem_rover += ACPI_RSDP_SCAN_STEP) {
 		/* The signature and checksum must both be correct */
 
-		if (ACPI_STRNCMP ((char *) mem_rover,
-				RSDP_SIG, sizeof (RSDP_SIG)-1) == 0 &&
-			acpi_tb_checksum (mem_rover, ACPI_RSDP_CHECKSUM_LENGTH) == 0) {
-			/* If so, we have found the RSDP */
+		if (ACPI_STRNCMP ((char *) mem_rover, RSDP_SIG, sizeof (RSDP_SIG)-1) != 0) {
+			/* No signature match, keep looking */
+
+			continue;
+		}
+
+		/* Signature matches, check the appropriate checksum */
+
+		if (((struct rsdp_descriptor *) mem_rover)->revision < 2) {
+			/* ACPI version 1.0 */
+
+			checksum = acpi_tb_checksum (mem_rover, ACPI_RSDP_CHECKSUM_LENGTH);
+		}
+		else {
+			/* Post ACPI 1.0, use extended_checksum */
+
+			checksum = acpi_tb_checksum (mem_rover, ACPI_RSDP_XCHECKSUM_LENGTH);
+		}
+
+		if (checksum == 0) {
+			/* Checksum valid, we have found a valid RSDP */
 
 			ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
-				"RSDP located at physical address %p\n",mem_rover));
+				"RSDP located at physical address %p\n", mem_rover));
 			return_PTR (mem_rover);
 		}
+
+		ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
+			"Found an RSDP at physical address %p, but it has a bad checksum\n",
+			mem_rover));
 	}
 
 	/* Searched entire block, no RSDP was found */
 
-	ACPI_DEBUG_PRINT ((ACPI_DB_INFO,"Searched entire block, no RSDP was found.\n"));
+	ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
+		"Searched entire block, no valid RSDP was found.\n"));
 	return_PTR (NULL);
 }
 
diff -Nru a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
--- a/drivers/acpi/thermal.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/acpi/thermal.c	2005-01-10 20:11:22 -08:00
@@ -64,6 +64,7 @@
 #define ACPI_THERMAL_PATH_POWEROFF	"/sbin/poweroff"
 
 #define ACPI_THERMAL_MAX_ACTIVE	10
+#define ACPI_THERMAL_MAX_LIMIT_STR_LEN 65
 
 #define KELVIN_TO_CELSIUS(t)    (long)(((long)t-2732>=0) ? ((long)t-2732+5)/10 : ((long)t-2732-5)/10)
 #define CELSIUS_TO_KELVIN(t)	((t+273)*10)
@@ -899,21 +900,33 @@
 	struct seq_file		*m = (struct seq_file *)file->private_data;
 	struct acpi_thermal	*tz = (struct acpi_thermal *)m->private;
 
-	char			limit_string[65] = {'\0'};
+	char			*limit_string; 
 	int			num, critical, hot, passive;
-	int			active[ACPI_THERMAL_MAX_ACTIVE];
+	int			*active; 
 	int			i = 0;
 
 	ACPI_FUNCTION_TRACE("acpi_thermal_write_trip_points");
 
-	if (!tz || (count > sizeof(limit_string) - 1)) {
+	limit_string = kmalloc(ACPI_THERMAL_MAX_LIMIT_STR_LEN, GFP_KERNEL);
+	if(!limit_string)
+		return_VALUE(-ENOMEM);
+
+	memset(limit_string, 0, ACPI_THERMAL_MAX_LIMIT_STR_LEN);
+
+	active = kmalloc(ACPI_THERMAL_MAX_ACTIVE *sizeof(int), GFP_KERNEL);
+	if(!active)
+		return_VALUE(-ENOMEM);
+
+	if (!tz || (count > ACPI_THERMAL_MAX_LIMIT_STR_LEN - 1)) {
 		ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid argument\n"));
-		return_VALUE(-EINVAL);
+		count = -EINVAL;
+		goto end;
 	}
 	
 	if (copy_from_user(limit_string, buffer, count)) {
 		ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid data\n"));
-		return_VALUE(-EFAULT);
+		count = -EFAULT;
+		goto end;
 	}
 	
 	limit_string[count] = '\0';
@@ -924,7 +937,8 @@
 				&active[5], &active[6], &active[7], &active[8], &active[9]);
 	if(!(num >=5 && num < (ACPI_THERMAL_MAX_ACTIVE + 3))) {
 		ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid data format\n"));
-		return_VALUE(-EINVAL);
+		count = -EINVAL;
+		goto end;
 	}
 
 	tz->trips.critical.temperature = CELSIUS_TO_KELVIN(critical);
@@ -936,6 +950,9 @@
 		tz->trips.active[i].temperature = CELSIUS_TO_KELVIN(active[i]);
 	}
 	
+end:
+	kfree(active);
+	kfree(limit_string);
 	return_VALUE(count);
 }
 
diff -Nru a/drivers/acpi/toshiba_acpi.c b/drivers/acpi/toshiba_acpi.c
--- a/drivers/acpi/toshiba_acpi.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/acpi/toshiba_acpi.c	2005-01-10 20:11:16 -08:00
@@ -508,7 +508,7 @@
 			proc->write_proc = (write_proc_t*)dispatch_write;
 	}
 
-	return(AE_OK);
+	return AE_OK;
 }
 
 static acpi_status __exit
@@ -518,7 +518,7 @@
 
 	for (item = proc_items; item->name; ++item)
 		remove_proc_entry(item->name, toshiba_proc_dir);
-	return(AE_OK);
+	return AE_OK;
 }
 
 static int __init
diff -Nru a/drivers/acpi/video.c b/drivers/acpi/video.c
--- a/drivers/acpi/video.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/acpi/video.c	2005-01-10 20:11:23 -08:00
@@ -242,6 +242,13 @@
 	.release	= single_release,
 };
 
+static char	device_decode[][30] = {
+	"motherboard VGA device",
+	"PCI VGA device",
+	"AGP VGA device",
+	"UNKNOWN",
+};
+
 static void acpi_video_device_notify ( acpi_handle handle, u32 event, void *data);
 static void acpi_video_device_rebind( struct acpi_video_bus *video);
 static void acpi_video_device_bind( struct acpi_video_bus *video, struct acpi_video_device *device);
@@ -1117,12 +1124,6 @@
 	struct acpi_video_bus	*video = (struct acpi_video_bus *) seq->private;
 	int			status;
 	unsigned long		id;
-	char			device_decode[][30] = {
-					"motherboard VGA device",
-					"PCI VGA device",
-					"AGP VGA device",
-					"UNKNOWN",
-	};
 
 	ACPI_FUNCTION_TRACE("acpi_video_bus_POST_seq_show");
 
@@ -1523,7 +1524,7 @@
 		dod->package.count));
 
 	active_device_list= kmalloc(
- 		dod->package.count*sizeof(struct acpi_video_enumerated_device),
+ 		(1+dod->package.count)*sizeof(struct acpi_video_enumerated_device),
 	       	GFP_KERNEL);
 
 	if (!active_device_list) {
diff -Nru a/drivers/atm/ambassador.c b/drivers/atm/ambassador.c
--- a/drivers/atm/ambassador.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/atm/ambassador.c	2005-01-10 20:11:16 -08:00
@@ -1692,7 +1692,7 @@
 };
 
 
-unsigned int command_successes [] = {
+static unsigned int command_successes [] = {
 	[host_memory_test]     = COMMAND_PASSED_TEST,
 	[read_adapter_memory]  = COMMAND_READ_DATA_OK,
 	[write_adapter_memory] = COMMAND_WRITE_DATA_OK,
@@ -2088,7 +2088,7 @@
 }
   
 // swap bits within byte to get Ethernet ordering
-u8 bit_swap (u8 byte)
+static u8 bit_swap (u8 byte)
 {
     const u8 swap[] = {
       0x0, 0x8, 0x4, 0xc,
diff -Nru a/drivers/atm/atmtcp.c b/drivers/atm/atmtcp.c
--- a/drivers/atm/atmtcp.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/atm/atmtcp.c	2005-01-10 20:11:20 -08:00
@@ -396,7 +396,7 @@
 }
 
 
-int atmtcp_attach(struct atm_vcc *vcc,int itf)
+static int atmtcp_attach(struct atm_vcc *vcc,int itf)
 {
 	struct atm_dev *dev;
 
@@ -427,13 +427,13 @@
 }
 
 
-int atmtcp_create_persistent(int itf)
+static int atmtcp_create_persistent(int itf)
 {
 	return atmtcp_create(itf,1,NULL);
 }
 
 
-int atmtcp_remove_persistent(int itf)
+static int atmtcp_remove_persistent(int itf)
 {
 	struct atm_dev *dev;
 	struct atmtcp_dev_data *dev_data;
diff -Nru a/drivers/atm/firestream.c b/drivers/atm/firestream.c
--- a/drivers/atm/firestream.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/atm/firestream.c	2005-01-10 20:11:16 -08:00
@@ -82,14 +82,14 @@
  * would be interpreted. -- REW */
 
 #define NP FS_NR_FREE_POOLS
-int rx_buf_sizes[NP]  = {128,  256,  512, 1024, 2048, 4096, 16384, 65520};
+static int rx_buf_sizes[NP]  = {128,  256,  512, 1024, 2048, 4096, 16384, 65520};
 /* log2:                 7     8     9    10    11    12    14     16 */
 
 #if 0
-int rx_pool_sizes[NP] = {1024, 1024, 512, 256,  128,  64,   32,    32};
+static int rx_pool_sizes[NP] = {1024, 1024, 512, 256,  128,  64,   32,    32};
 #else
 /* debug */
-int rx_pool_sizes[NP] = {128,  128,  128, 64,   64,   64,   32,    32};
+static int rx_pool_sizes[NP] = {128,  128,  128, 64,   64,   64,   32,    32};
 #endif
 /* log2:                 10    10    9    8     7     6     5      5  */
 /* sumlog2:              17    18    18   18    18    18    19     21 */
@@ -250,7 +250,7 @@
 };
 
 
-struct reginit_item PHY_NTC_INIT[] __devinitdata = {
+static struct reginit_item PHY_NTC_INIT[] __devinitdata = {
 	{ PHY_CLEARALL, 0x40 }, 
 	{ 0x12,  0x0001 },
 	{ 0x13,  0x7605 },
@@ -334,7 +334,7 @@
 #define func_exit()  fs_dprintk (FS_DEBUG_FLOW, "fs: exit  %s\n", __FUNCTION__)
 
 
-struct fs_dev *fs_boards = NULL;
+static struct fs_dev *fs_boards = NULL;
 
 #ifdef DEBUG
 
@@ -1921,7 +1921,7 @@
 	return -ENODEV;
 }
 
-void __devexit firestream_remove_one (struct pci_dev *pdev)
+static void __devexit firestream_remove_one (struct pci_dev *pdev)
 {
 	int i;
 	struct fs_dev *dev, *nxtdev;
diff -Nru a/drivers/atm/he.c b/drivers/atm/he.c
--- a/drivers/atm/he.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/atm/he.c	2005-01-10 20:11:16 -08:00
@@ -147,13 +147,55 @@
 
 /* globals */
 
-struct he_dev *he_devs = NULL;
+static struct he_dev *he_devs = NULL;
 static int disable64 = 0;
 static short nvpibits = -1;
 static short nvcibits = -1;
 static short rx_skb_reserve = 16;
 static int irq_coalesce = 1;
 static int sdh = 0;
+
+/* Read from EEPROM = 0000 0011b */
+static unsigned int readtab[] = {
+	CS_HIGH | CLK_HIGH,
+	CS_LOW | CLK_LOW,
+	CLK_HIGH,               /* 0 */
+	CLK_LOW,
+	CLK_HIGH,               /* 0 */
+	CLK_LOW,
+	CLK_HIGH,               /* 0 */
+	CLK_LOW,
+	CLK_HIGH,               /* 0 */
+	CLK_LOW,
+	CLK_HIGH,               /* 0 */
+	CLK_LOW,
+	CLK_HIGH,               /* 0 */
+	CLK_LOW | SI_HIGH,
+	CLK_HIGH | SI_HIGH,     /* 1 */
+	CLK_LOW | SI_HIGH,
+	CLK_HIGH | SI_HIGH      /* 1 */
+};     
+ 
+/* Clock to read from/write to the EEPROM */
+static unsigned int clocktab[] = {
+	CLK_LOW,
+	CLK_HIGH,
+	CLK_LOW,
+	CLK_HIGH,
+	CLK_LOW,
+	CLK_HIGH,
+	CLK_LOW,
+	CLK_HIGH,
+	CLK_LOW,
+	CLK_HIGH,
+	CLK_LOW,
+	CLK_HIGH,
+	CLK_LOW,
+	CLK_HIGH,
+	CLK_LOW,
+	CLK_HIGH,
+	CLK_LOW
+};     
 
 static struct atmdev_ops he_ops =
 {
diff -Nru a/drivers/atm/he.h b/drivers/atm/he.h
--- a/drivers/atm/he.h	2005-01-10 20:11:24 -08:00
+++ b/drivers/atm/he.h	2005-01-10 20:11:24 -08:00
@@ -892,47 +892,4 @@
 #define SI_HIGH		ID_DIN /* HOST_CNTL_ID_PROM_DATA_IN */
 #define EEPROM_DELAY	400 /* microseconds */
 
-/* Read from EEPROM = 0000 0011b */
-unsigned int readtab[] = {
-	CS_HIGH | CLK_HIGH,
-	CS_LOW | CLK_LOW,
-	CLK_HIGH,               /* 0 */
-	CLK_LOW,
-	CLK_HIGH,               /* 0 */
-	CLK_LOW,
-	CLK_HIGH,               /* 0 */
-	CLK_LOW,
-	CLK_HIGH,               /* 0 */
-	CLK_LOW,
-	CLK_HIGH,               /* 0 */
-	CLK_LOW,
-	CLK_HIGH,               /* 0 */
-	CLK_LOW | SI_HIGH,
-	CLK_HIGH | SI_HIGH,     /* 1 */
-	CLK_LOW | SI_HIGH,
-	CLK_HIGH | SI_HIGH      /* 1 */
-};     
- 
-/* Clock to read from/write to the EEPROM */
-unsigned int clocktab[] = {
-	CLK_LOW,
-	CLK_HIGH,
-	CLK_LOW,
-	CLK_HIGH,
-	CLK_LOW,
-	CLK_HIGH,
-	CLK_LOW,
-	CLK_HIGH,
-	CLK_LOW,
-	CLK_HIGH,
-	CLK_LOW,
-	CLK_HIGH,
-	CLK_LOW,
-	CLK_HIGH,
-	CLK_LOW,
-	CLK_HIGH,
-	CLK_LOW
-};     
-
-
 #endif /* _HE_H_ */
diff -Nru a/drivers/atm/idt77105.c b/drivers/atm/idt77105.c
--- a/drivers/atm/idt77105.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/atm/idt77105.c	2005-01-10 20:11:20 -08:00
@@ -323,7 +323,7 @@
 }
 
 
-int idt77105_stop(struct atm_dev *dev)
+static int idt77105_stop(struct atm_dev *dev)
 {
 	struct idt77105_priv *walk, *prev;
 
diff -Nru a/drivers/atm/idt77105.h b/drivers/atm/idt77105.h
--- a/drivers/atm/idt77105.h	2005-01-10 20:11:18 -08:00
+++ b/drivers/atm/idt77105.h	2005-01-10 20:11:18 -08:00
@@ -77,7 +77,6 @@
 
 #ifdef __KERNEL__
 int idt77105_init(struct atm_dev *dev) __init;
-int idt77105_stop(struct atm_dev *dev);
 #endif
 
 /*
diff -Nru a/drivers/atm/idt77252.h b/drivers/atm/idt77252.h
--- a/drivers/atm/idt77252.h	2005-01-10 20:11:21 -08:00
+++ b/drivers/atm/idt77252.h	2005-01-10 20:11:21 -08:00
@@ -275,7 +275,7 @@
 	struct rsq_entry	*next;
 	struct rsq_entry	*last;
 	dma_addr_t		paddr;
-} rsq_info;
+};
 
 
 /*****************************************************************************/
diff -Nru a/drivers/atm/iphase.c b/drivers/atm/iphase.c
--- a/drivers/atm/iphase.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/atm/iphase.c	2005-01-10 20:11:22 -08:00
@@ -72,13 +72,13 @@
 #define PRIV(dev) ((struct suni_priv *) dev->phy_data)
 
 static unsigned char ia_phy_get(struct atm_dev *dev, unsigned long addr);
+static void desc_dbg(IADEV *iadev);
 
 static IADEV *ia_dev[8];
 static struct atm_dev *_ia_dev[8];
 static int iadev_count;
 static void ia_led_timer(unsigned long arg);
 static struct timer_list ia_timer = TIMER_INITIALIZER(ia_led_timer, 0, 0);
-struct atm_vcc *vcc_close_que[100];
 static int IA_TX_BUF = DFL_TX_BUFFERS, IA_TX_BUF_SZ = DFL_TX_BUF_SZ;
 static int IA_RX_BUF = DFL_RX_BUFFERS, IA_RX_BUF_SZ = DFL_RX_BUF_SZ;
 static uint IADebugFlag = /* IF_IADBG_ERR | IF_IADBG_CBR| IF_IADBG_INIT_ADAPTER
@@ -147,7 +147,6 @@
   u_short 		desc1;
   u_short		tcq_wr;
   struct ia_vcc         *iavcc_r = NULL; 
-  extern void desc_dbg(IADEV *iadev);
 
   tcq_wr = readl(dev->seg_reg+TCQ_WR_PTR) & 0xffff;
   while (dev->host_tcq_wr != tcq_wr) {
@@ -187,7 +186,6 @@
   unsigned long delta;
   static unsigned long timer = 0;
   int ltimeout;
-  extern void desc_dbg(IADEV *iadev);
 
   ia_hack_tcq (dev);
   if(((jiffies - timer)>50)||((dev->ffL.tcq_rd==dev->host_tcq_wr))){      
@@ -644,7 +642,7 @@
    return 0;
 }
 
-void ia_tx_poll (IADEV *iadev) {
+static void ia_tx_poll (IADEV *iadev) {
    struct atm_vcc *vcc = NULL;
    struct sk_buff *skb = NULL, *skb1 = NULL;
    struct ia_vcc *iavcc;
@@ -861,7 +859,7 @@
   return;
 }
 
-void ia_mb25_init (IADEV *iadev)
+static void ia_mb25_init (IADEV *iadev)
 {
    volatile ia_mb25_t  *mb25 = (ia_mb25_t*)iadev->phy;
 #if 0
@@ -876,7 +874,7 @@
    return;
 }                   
 
-void ia_suni_pm7345_init (IADEV *iadev)
+static void ia_suni_pm7345_init (IADEV *iadev)
 {
    volatile suni_pm7345_t *suni_pm7345 = (suni_pm7345_t *)iadev->phy;
    if (iadev->phy_type & FE_DS3_PHY)
@@ -959,9 +957,8 @@
 
 /***************************** IA_LIB END *****************************/
     
-/* pwang_test debug utility */
-int tcnter = 0, rcnter = 0;
-void xdump( u_char*  cp, int  length, char*  prefix )
+static int tcnter = 0;
+static void xdump( u_char*  cp, int  length, char*  prefix )
 {
     int col, count;
     u_char prntBuf[120];
@@ -1008,7 +1005,7 @@
   
 /*-- some utilities and memory allocation stuff will come here -------------*/  
   
-void desc_dbg(IADEV *iadev) {
+static void desc_dbg(IADEV *iadev) {
 
   u_short tcq_wr_ptr, tcq_st_ptr, tcq_ed_ptr;
   u32 i;
diff -Nru a/drivers/atm/iphase.h b/drivers/atm/iphase.h
--- a/drivers/atm/iphase.h	2005-01-10 20:11:17 -08:00
+++ b/drivers/atm/iphase.h	2005-01-10 20:11:17 -08:00
@@ -1126,8 +1126,6 @@
 #define FE_DS3_PHY      0x0080          /* DS3 */
 #define FE_E3_PHY       0x0090          /* E3 */
 		     
-extern void ia_mb25_init (IADEV *);
-
 /*********************** SUNI_PM7345 PHY DEFINE HERE *********************/
 typedef struct _suni_pm7345_t
 {
@@ -1325,8 +1323,6 @@
 #define SUNI_DS3_COCAI  0x04            /* Corr. HCS errors detected    */
 #define SUNI_DS3_FOVRI  0x02            /* FIFO overrun                 */
 #define SUNI_DS3_FUDRI  0x01            /* FIFO underrun                */
-
-extern void ia_suni_pm7345_init (IADEV *iadev);
 
 ///////////////////SUNI_PM7345 PHY DEFINE END /////////////////////////////
 
diff -Nru a/drivers/atm/nicstarmac.c b/drivers/atm/nicstarmac.c
--- a/drivers/atm/nicstarmac.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/atm/nicstarmac.c	2005-01-10 20:11:23 -08:00
@@ -35,6 +35,7 @@
 #define SI_LOW		0x0000		/* Serial input data low */
 
 /* Read Status Register = 0000 0101b */
+#if 0
 static u_int32_t rdsrtab[] =
 {
     CS_HIGH | CLK_HIGH, 
@@ -55,6 +56,7 @@
     CLK_LOW | SI_HIGH, 
     CLK_HIGH | SI_HIGH   /* 1 */
 };
+#endif  /*  0  */
 
 
 /* Read from EEPROM = 0000 0011b */
@@ -117,7 +119,7 @@
  * eeprom, then pull the result from bit 16 of the NicSTaR's General Purpose 
  * register.  
  */
-
+#if 0
 u_int32_t
 nicstar_read_eprom_status( virt_addr_t base )
 {
@@ -153,6 +155,7 @@
    osp_MicroDelay( CYCLE_DELAY );
    return rbyte;
 }
+#endif  /*  0  */
 
 
 /*
diff -Nru a/drivers/atm/nicstarmac.h b/drivers/atm/nicstarmac.h
--- a/drivers/atm/nicstarmac.h	2005-01-10 20:11:16 -08:00
+++ b/drivers/atm/nicstarmac.h	2005-01-10 20:11:16 -08:00
@@ -9,6 +9,5 @@
 
 typedef void __iomem *virt_addr_t;
 
-u_int32_t nicstar_read_eprom_status( virt_addr_t base );
 void nicstar_init_eprom( virt_addr_t base );
 void nicstar_read_eprom( virt_addr_t, u_int8_t, u_int8_t *, u_int32_t);
diff -Nru a/drivers/atm/zatm.c b/drivers/atm/zatm.c
--- a/drivers/atm/zatm.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/atm/zatm.c	2005-01-10 20:11:17 -08:00
@@ -1605,7 +1605,7 @@
 		goto out_disable;
 
 	zatm_dev->pci_dev = pci_dev;
-	dev = (struct atm_dev *)zatm_dev;
+	dev->dev_data = zatm_dev;
 	zatm_dev->copper = (int)ent->driver_data;
 	if ((ret = zatm_init(dev)) || (ret = zatm_start(dev)))
 		goto out_release;
diff -Nru a/drivers/base/Kconfig b/drivers/base/Kconfig
--- a/drivers/base/Kconfig	2005-01-10 20:11:16 -08:00
+++ b/drivers/base/Kconfig	2005-01-10 20:11:16 -08:00
@@ -20,7 +20,7 @@
 
 config FW_LOADER
 	tristate "Hotplug firmware loading support"
-	depends on HOTPLUG
+	select HOTPLUG
 	---help---
 	  This option is provided for the case where no in-kernel-tree modules
 	  require hotplug firmware loading support, but a module built outside
diff -Nru a/drivers/base/bus.c b/drivers/base/bus.c
--- a/drivers/base/bus.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/base/bus.c	2005-01-10 20:11:17 -08:00
@@ -326,7 +326,7 @@
 			if (!error)
 				/* success, driver matched */
 				return 1;
-			if (error != -ENODEV)
+			if (error != -ENODEV && error != -ENXIO)
 				/* driver matched but the probe failed */
 				printk(KERN_WARNING
 				    "%s: probe of %s failed with error %d\n",
diff -Nru a/drivers/base/class.c b/drivers/base/class.c
--- a/drivers/base/class.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/base/class.c	2005-01-10 20:11:23 -08:00
@@ -179,6 +179,22 @@
 		sysfs_remove_file(&class_dev->kobj, &attr->attr);
 }
 
+int class_device_create_bin_file(struct class_device *class_dev,
+				 struct bin_attribute *attr)
+{
+	int error = -EINVAL;
+	if (class_dev)
+		error = sysfs_create_bin_file(&class_dev->kobj, attr);
+	return error;
+}
+
+void class_device_remove_bin_file(struct class_device *class_dev,
+				  struct bin_attribute *attr)
+{
+	if (class_dev)
+		sysfs_remove_bin_file(&class_dev->kobj, attr);
+}
+
 static int class_device_dev_link(struct class_device * class_dev)
 {
 	if (class_dev->dev)
@@ -576,6 +592,8 @@
 EXPORT_SYMBOL_GPL(class_device_put);
 EXPORT_SYMBOL_GPL(class_device_create_file);
 EXPORT_SYMBOL_GPL(class_device_remove_file);
+EXPORT_SYMBOL_GPL(class_device_create_bin_file);
+EXPORT_SYMBOL_GPL(class_device_remove_bin_file);
 
 EXPORT_SYMBOL_GPL(class_interface_register);
 EXPORT_SYMBOL_GPL(class_interface_unregister);
diff -Nru a/drivers/base/cpu.c b/drivers/base/cpu.c
--- a/drivers/base/cpu.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/base/cpu.c	2005-01-10 20:11:17 -08:00
@@ -48,10 +48,23 @@
 }
 static SYSDEV_ATTR(online, 0600, show_online, store_online);
 
-static void __init register_cpu_control(struct cpu *cpu)
+static void __devinit register_cpu_control(struct cpu *cpu)
 {
 	sysdev_create_file(&cpu->sysdev, &attr_online);
 }
+void unregister_cpu(struct cpu *cpu, struct node *root)
+{
+
+	if (root)
+		sysfs_remove_link(&root->sysdev.kobj,
+				  kobject_name(&cpu->sysdev.kobj));
+	sysdev_remove_file(&cpu->sysdev, &attr_online);
+
+	sysdev_unregister(&cpu->sysdev);
+
+	return;
+}
+EXPORT_SYMBOL(unregister_cpu);
 #else /* ... !CONFIG_HOTPLUG_CPU */
 static inline void register_cpu_control(struct cpu *cpu)
 {
@@ -66,7 +79,7 @@
  *
  * Initialize and register the CPU device.
  */
-int __init register_cpu(struct cpu *cpu, int num, struct node *root)
+int __devinit register_cpu(struct cpu *cpu, int num, struct node *root)
 {
 	int error;
 
@@ -83,6 +96,9 @@
 		register_cpu_control(cpu);
 	return error;
 }
+#ifdef CONFIG_HOTPLUG_CPU
+EXPORT_SYMBOL(register_cpu);
+#endif
 
 
 
diff -Nru a/drivers/base/node.c b/drivers/base/node.c
--- a/drivers/base/node.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/base/node.c	2005-01-10 20:11:16 -08:00
@@ -10,6 +10,7 @@
 #include <linux/hugetlb.h>
 #include <linux/cpumask.h>
 #include <linux/topology.h>
+#include <linux/nodemask.h>
 
 static struct sysdev_class node_class = {
 	set_kset_name("node"),
@@ -23,7 +24,7 @@
 	int len;
 
 	/* 2004/06/03: buf currently PAGE_SIZE, need > 1 char per 4 bits. */
-	BUILD_BUG_ON(NR_CPUS/4 > PAGE_SIZE/2);
+	BUILD_BUG_ON(MAX_NUMNODES/4 > PAGE_SIZE/2);
 
 	len = cpumask_scnprintf(buf, PAGE_SIZE-1, mask);
 	len += sprintf(buf + len, "\n");
@@ -111,6 +112,24 @@
 }
 static SYSDEV_ATTR(numastat, S_IRUGO, node_read_numastat, NULL);
 
+static ssize_t node_read_distance(struct sys_device * dev, char * buf)
+{
+	int nid = dev->id;
+	int len = 0;
+	int i;
+
+	/* buf currently PAGE_SIZE, need ~4 chars per node */
+	BUILD_BUG_ON(MAX_NUMNODES*4 > PAGE_SIZE/2);
+
+	for_each_online_node(i)
+		len += sprintf(buf + len, "%s%d", i ? " " : "", node_distance(nid, i));
+
+	len += sprintf(buf + len, "\n");
+	return len;
+}
+static SYSDEV_ATTR(distance, S_IRUGO, node_read_distance, NULL);
+
+
 /*
  * register_node - Setup a driverfs device for a node.
  * @num - Node number to use when creating the device.
@@ -129,6 +148,7 @@
 		sysdev_create_file(&node->sysdev, &attr_cpumap);
 		sysdev_create_file(&node->sysdev, &attr_meminfo);
 		sysdev_create_file(&node->sysdev, &attr_numastat);
+		sysdev_create_file(&node->sysdev, &attr_distance);
 	}
 	return error;
 }
diff -Nru a/drivers/base/platform.c b/drivers/base/platform.c
--- a/drivers/base/platform.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/base/platform.c	2005-01-10 20:11:16 -08:00
@@ -58,6 +58,41 @@
 }
 
 /**
+ *	platform_get_resource_byname - get a resource for a device by name
+ *	@dev: platform device
+ *	@type: resource type
+ *	@name: resource name
+ */
+struct resource *
+platform_get_resource_byname(struct platform_device *dev, unsigned int type,
+		      char *name)
+{
+	int i;
+
+	for (i = 0; i < dev->num_resources; i++) {
+		struct resource *r = &dev->resource[i];
+
+		if ((r->flags & (IORESOURCE_IO|IORESOURCE_MEM|
+				 IORESOURCE_IRQ|IORESOURCE_DMA)) == type)
+			if (!strcmp(r->name, name))
+				return r;
+	}
+	return NULL;
+}
+
+/**
+ *	platform_get_irq - get an IRQ for a device
+ *	@dev: platform device
+ *	@name: IRQ name
+ */
+int platform_get_irq_byname(struct platform_device *dev, char *name)
+{
+	struct resource *r = platform_get_resource_byname(dev, IORESOURCE_IRQ, name);
+
+	return r ? r->start : 0;
+}
+
+/**
  *	platform_add_devices - add a numbers of platform devices
  *	@devs: array of platform devices to add
  *	@num: number of platform devices in array
@@ -103,13 +138,16 @@
 	for (i = 0; i < pdev->num_resources; i++) {
 		struct resource *p, *r = &pdev->resource[i];
 
-		r->name = pdev->dev.bus_id;
+		if (r->name == NULL)
+			r->name = pdev->dev.bus_id;
 
-		p = NULL;
-		if (r->flags & IORESOURCE_MEM)
-			p = &iomem_resource;
-		else if (r->flags & IORESOURCE_IO)
-			p = &ioport_resource;
+		p = r->parent;
+		if (!p) {
+			if (r->flags & IORESOURCE_MEM)
+				p = &iomem_resource;
+			else if (r->flags & IORESOURCE_IO)
+				p = &ioport_resource;
+		}
 
 		if (p && request_resource(p, r)) {
 			printk(KERN_ERR
@@ -308,3 +346,5 @@
 EXPORT_SYMBOL_GPL(platform_device_unregister);
 EXPORT_SYMBOL_GPL(platform_get_irq);
 EXPORT_SYMBOL_GPL(platform_get_resource);
+EXPORT_SYMBOL_GPL(platform_get_irq_byname);
+EXPORT_SYMBOL_GPL(platform_get_resource_byname);
diff -Nru a/drivers/block/DAC960.c b/drivers/block/DAC960.c
--- a/drivers/block/DAC960.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/block/DAC960.c	2005-01-10 20:11:21 -08:00
@@ -2738,7 +2738,7 @@
   }
   init_waitqueue_head(&Controller->CommandWaitQueue);
   init_waitqueue_head(&Controller->HealthStatusWaitQueue);
-  Controller->queue_lock = SPIN_LOCK_UNLOCKED; 
+  spin_lock_init(&Controller->queue_lock);
   DAC960_AnnounceDriver(Controller);
   /*
     Map the Controller Register Window.
diff -Nru a/drivers/block/Kconfig b/drivers/block/Kconfig
--- a/drivers/block/Kconfig	2005-01-10 20:11:17 -08:00
+++ b/drivers/block/Kconfig	2005-01-10 20:11:17 -08:00
@@ -359,31 +359,48 @@
 	  for details.
 
 config INITRAMFS_SOURCE
-	string "Source directory of cpio_list"
+	string "Initramfs source file(s)"
 	default ""
 	help
-	  This can be set to either a directory containing files, etc to be
-	  included in the initramfs archive, or a file containing newline
-	  separated entries.
-
-	  If it is a file, it should be in the following format:
-	    # a comment
-	    file <name> <location> <mode> <uid> <gid>
-	    dir <name> <mode> <uid> <gid>
-	    nod <name> <mode> <uid> <gid> <dev_type> <maj> <min>
-
-	  Where:
-	    <name>      name of the file/dir/nod in the archive
-	    <location>  location of the file in the current filesystem
-	    <mode>      mode/permissions of the file
-	    <uid>       user id (0=root)
-	    <gid>       group id (0=root)
-	    <dev_type>  device type (b=block, c=character)
-	    <maj>       major number of nod
-	    <min>       minor number of nod
+	  This can be either a single cpio archive with a .cpio suffix or a
+	  space-separated list of directories and files for building the
+	  initramfs image.  A cpio archive should contain a filesystem archive
+	  to be used as an initramfs image.  Directories should contain a
+	  filesystem layout to be included in the initramfs image.  Files
+	  should contain entries according to the format described by the
+	  "usr/gen_init_cpio" program in the kernel tree.
+
+	  When multiple directories and files are specified then the
+	  initramfs image will be the aggregate of all of them.
+
+	  See <file:Documentation/early-userspace/README for more details.
 
 	  If you are not sure, leave it blank.
 
+config INITRAMFS_ROOT_UID
+	int "User ID to map to 0 (user root)"
+	depends on INITRAMFS_SOURCE!=""
+	default "0"
+	help
+	  This setting is only meaningful if the INITRAMFS_SOURCE is
+	  contains a directory.  Setting this user ID (UID) to something
+	  other than "0" will cause all files owned by that UID to be
+	  owned by user root in the initial ramdisk image.
+
+	  If you are not sure, leave it set to "0".
+
+config INITRAMFS_ROOT_GID
+	int "Group ID to map to 0 (group root)"
+	depends on INITRAMFS_SOURCE!=""
+	default "0"
+	help
+	  This setting is only meaningful if the INITRAMFS_SOURCE is
+	  contains a directory.  Setting this group ID (GID) to something
+	  other than "0" will cause all files owned by that GID to be
+	  owned by group root in the initial ramdisk image.
+
+	  If you are not sure, leave it set to "0".
+
 config LBD
 	bool "Support for Large Block Devices"
 	depends on X86 || MIPS32 || PPC32 || ARCH_S390_31 || SUPERH
@@ -428,5 +445,13 @@
 source "drivers/s390/block/Kconfig"
 
 source "drivers/block/Kconfig.iosched"
+
+config ATA_OVER_ETH
+	tristate "ATA over Ethernet support"
+	depends on NET
+	default m
+	help
+	This driver provides Support for ATA over Ethernet block
+	devices like the Coraid EtherDrive (R) Storage Blade.
 
 endmenu
diff -Nru a/drivers/block/aoe/Makefile b/drivers/block/aoe/Makefile
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/block/aoe/Makefile	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,6 @@
+#
+# Makefile for ATA over Ethernet
+#
+
+obj-$(CONFIG_ATA_OVER_ETH)	+= aoe.o
+aoe-objs := aoeblk.o aoechr.o aoecmd.o aoedev.o aoemain.o aoenet.o
diff -Nru a/drivers/block/aoe/aoe.h b/drivers/block/aoe/aoe.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/block/aoe/aoe.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,162 @@
+/* Copyright (c) 2004 Coraid, Inc.  See COPYING for GPL terms. */
+#define VERSION "4"
+#define AOE_MAJOR 152
+#define DEVICE_NAME "aoe"
+#define SYSMINOR(aoemajor, aoeminor) ((aoemajor) * 10 + (aoeminor))
+#define AOEMAJOR(sysminor) ((sysminor) / 10)
+#define AOEMINOR(sysminor) ((sysminor) % 10)
+#define WHITESPACE " \t\v\f\n"
+
+enum {
+	AOECMD_ATA,
+	AOECMD_CFG,
+
+	AOEFL_RSP = (1<<3),
+	AOEFL_ERR = (1<<2),
+
+	AOEAFL_EXT = (1<<6),
+	AOEAFL_DEV = (1<<4),
+	AOEAFL_ASYNC = (1<<1),
+	AOEAFL_WRITE = (1<<0),
+
+	AOECCMD_READ = 0,
+	AOECCMD_TEST,
+	AOECCMD_PTEST,
+	AOECCMD_SET,
+	AOECCMD_FSET,
+
+	AOE_HVER = 0x10,
+};
+
+struct aoe_hdr {
+	unsigned char dst[6];
+	unsigned char src[6];
+	unsigned char type[2];
+	unsigned char verfl;
+	unsigned char err;
+	unsigned char major[2];
+	unsigned char minor;
+	unsigned char cmd;
+	unsigned char tag[4];
+};
+
+struct aoe_atahdr {
+	unsigned char aflags;
+	unsigned char errfeat;
+	unsigned char scnt;
+	unsigned char cmdstat;
+	unsigned char lba0;
+	unsigned char lba1;
+	unsigned char lba2;
+	unsigned char lba3;
+	unsigned char lba4;
+	unsigned char lba5;
+	unsigned char res[2];
+};
+
+struct aoe_cfghdr {
+	unsigned char bufcnt[2];
+	unsigned char fwver[2];
+	unsigned char res;
+	unsigned char aoeccmd;
+	unsigned char cslen[2];
+};
+
+enum {
+	DEVFL_UP = 1,	/* device is installed in system and ready for AoE->ATA commands */
+	DEVFL_TKILL = (1<<1),	/* flag for timer to know when to kill self */
+	DEVFL_EXT = (1<<2),	/* device accepts lba48 commands */
+	DEVFL_CLOSEWAIT = (1<<3), /* device is waiting for all closes to revalidate */
+	DEVFL_WC_UPDATE = (1<<4), /* this device needs to update write cache status */
+	DEVFL_WORKON = (1<<4),
+
+	BUFFL_FAIL = 1,
+};
+
+enum {
+	MAXATADATA = 1024,
+	NPERSHELF = 10,
+	FREETAG = -1,
+	MIN_BUFS = 8,
+};
+
+struct buf {
+	struct list_head bufs;
+	ulong flags;
+	ulong nframesout;
+	char *bufaddr;
+	ulong resid;
+	ulong bv_resid;
+	sector_t sector;
+	struct bio *bio;
+	struct bio_vec *bv;
+};
+
+struct frame {
+	int tag;
+	ulong waited;
+	struct buf *buf;
+	char *bufaddr;
+	int writedatalen;
+	int ndata;
+
+	/* largest possible */
+	char data[sizeof(struct aoe_hdr) + sizeof(struct aoe_atahdr)];
+};
+
+struct aoedev {
+	struct aoedev *next;
+	unsigned char addr[6];	/* remote mac addr */
+	ushort flags;
+	ulong sysminor;
+	ulong aoemajor;
+	ulong aoeminor;
+	ulong rttavg;		/* round trip average of requests/responses */
+	u16 fw_ver;		/* version of blade's firmware */
+	struct work_struct work;/* disk create work struct */
+	struct gendisk *gd;
+	request_queue_t blkq;
+	struct hd_geometry geo; 
+	sector_t ssize;
+	struct timer_list timer;
+	spinlock_t lock;
+	struct net_device *ifp;	/* interface ed is attached to */
+	struct sk_buff *skblist;/* packets needing to be sent */
+	mempool_t *bufpool;	/* for deadlock-free Buf allocation */
+	struct list_head bufq;	/* queue of bios to work on */
+	struct buf *inprocess;	/* the one we're currently working on */
+	ulong lasttag;		/* last tag sent */
+	ulong nframes;		/* number of frames below */
+	struct frame *frames;
+};
+
+
+int aoeblk_init(void);
+void aoeblk_exit(void);
+void aoeblk_gdalloc(void *);
+void aoedisk_rm_sysfs(struct aoedev *d);
+
+int aoechr_init(void);
+void aoechr_exit(void);
+void aoechr_error(char *);
+void aoechr_hdump(char *, int len);
+
+void aoecmd_work(struct aoedev *d);
+void aoecmd_cfg(ushort, unsigned char);
+void aoecmd_ata_rsp(struct sk_buff *);
+void aoecmd_cfg_rsp(struct sk_buff *);
+
+int aoedev_init(void);
+void aoedev_exit(void);
+struct aoedev *aoedev_bymac(unsigned char *);
+void aoedev_downdev(struct aoedev *d);
+struct aoedev *aoedev_set(ulong, unsigned char *, struct net_device *, ulong);
+int aoedev_busy(void);
+
+int aoenet_init(void);
+void aoenet_exit(void);
+void aoenet_xmit(struct sk_buff *);
+int is_aoe_netif(struct net_device *ifp);
+int set_aoe_iflist(const char __user *str, size_t size);
+
+u64 mac_addr(char addr[6]);
diff -Nru a/drivers/block/aoe/aoeblk.c b/drivers/block/aoe/aoeblk.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/block/aoe/aoeblk.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,251 @@
+/* Copyright (c) 2004 Coraid, Inc.  See COPYING for GPL terms. */
+/*
+ * aoeblk.c
+ * block device routines
+ */
+
+#include <linux/hdreg.h>
+#include <linux/blkdev.h>
+#include <linux/fs.h>
+#include <linux/ioctl.h>
+#include <linux/genhd.h>
+#include <linux/netdevice.h>
+#include "aoe.h"
+
+/* add attributes for our block devices in sysfs
+ * (see drivers/block/genhd.c:disk_attr_show, etc.)
+ */
+struct disk_attribute {
+	struct attribute attr;
+	ssize_t (*show)(struct gendisk *, char *);
+};
+
+static ssize_t aoedisk_show_state(struct gendisk * disk, char *page)
+{
+	struct aoedev *d = disk->private_data;
+
+	return snprintf(page, PAGE_SIZE,
+			"%s%s\n",
+			(d->flags & DEVFL_UP) ? "up" : "down",
+			(d->flags & DEVFL_CLOSEWAIT) ? ",closewait" : "");
+}
+static ssize_t aoedisk_show_mac(struct gendisk * disk, char *page)
+{
+	struct aoedev *d = disk->private_data;
+
+	return snprintf(page, PAGE_SIZE, "%012llx\n", mac_addr(d->addr));
+}
+static ssize_t aoedisk_show_netif(struct gendisk * disk, char *page)
+{
+	struct aoedev *d = disk->private_data;
+
+	return snprintf(page, PAGE_SIZE, "%s\n", d->ifp->name);
+}
+
+static struct disk_attribute disk_attr_state = {
+	.attr = {.name = "state", .mode = S_IRUGO },
+	.show = aoedisk_show_state
+};
+static struct disk_attribute disk_attr_mac = {
+	.attr = {.name = "mac", .mode = S_IRUGO },
+	.show = aoedisk_show_mac
+};
+static struct disk_attribute disk_attr_netif = {
+	.attr = {.name = "netif", .mode = S_IRUGO },
+	.show = aoedisk_show_netif
+};
+
+static void
+aoedisk_add_sysfs(struct aoedev *d)
+{
+	sysfs_create_file(&d->gd->kobj, &disk_attr_state.attr);
+	sysfs_create_file(&d->gd->kobj, &disk_attr_mac.attr);
+	sysfs_create_file(&d->gd->kobj, &disk_attr_netif.attr);
+}
+void
+aoedisk_rm_sysfs(struct aoedev *d)
+{
+	sysfs_remove_link(&d->gd->kobj, "state");
+	sysfs_remove_link(&d->gd->kobj, "mac");
+	sysfs_remove_link(&d->gd->kobj, "netif");
+}
+
+static int
+aoeblk_open(struct inode *inode, struct file *filp)
+{
+	struct aoedev *d;
+
+	d = inode->i_bdev->bd_disk->private_data;
+	return (d->flags & DEVFL_UP) ? 0 : -ENODEV;
+}
+
+static int
+aoeblk_release(struct inode *inode, struct file *filp)
+{
+	struct aoedev *d;
+	ulong flags;
+
+	d = inode->i_bdev->bd_disk->private_data;
+
+	spin_lock_irqsave(&d->lock, flags);
+
+	if (inode->i_bdev->bd_openers == 0 && (d->flags & DEVFL_CLOSEWAIT)) {
+		d->flags &= ~DEVFL_CLOSEWAIT;
+		spin_unlock_irqrestore(&d->lock, flags);
+		aoecmd_cfg(d->aoemajor, d->aoeminor);
+		return 0;
+	}
+	spin_unlock_irqrestore(&d->lock, flags);
+
+	return 0;
+}
+
+static int
+aoeblk_make_request(request_queue_t *q, struct bio *bio)
+{
+	struct aoedev *d;
+	struct buf *buf;
+	struct sk_buff *sl;
+	ulong flags;
+
+	blk_queue_bounce(q, &bio);
+
+	d = bio->bi_bdev->bd_disk->private_data;
+	buf = mempool_alloc(d->bufpool, GFP_NOIO);
+	if (buf == NULL) {
+		printk(KERN_INFO "aoe: aoeblk_make_request: buf allocation "
+			"failure\n");
+		bio_endio(bio, bio->bi_size, -ENOMEM);
+		return 0;
+	}
+	memset(buf, 0, sizeof(*buf));
+	INIT_LIST_HEAD(&buf->bufs);
+	buf->bio = bio;
+	buf->resid = bio->bi_size;
+	buf->sector = bio->bi_sector;
+	buf->bv = buf->bio->bi_io_vec;
+	buf->bv_resid = buf->bv->bv_len;
+	buf->bufaddr = page_address(buf->bv->bv_page) + buf->bv->bv_offset;
+
+	spin_lock_irqsave(&d->lock, flags);
+
+	if ((d->flags & DEVFL_UP) == 0) {
+		printk(KERN_INFO "aoe: aoeblk_make_request: device %ld.%ld is not up\n",
+			d->aoemajor, d->aoeminor);
+		spin_unlock_irqrestore(&d->lock, flags);
+		mempool_free(buf, d->bufpool);
+		bio_endio(bio, bio->bi_size, -ENXIO);
+		return 0;
+	}
+
+	list_add_tail(&buf->bufs, &d->bufq);
+	aoecmd_work(d);
+
+	sl = d->skblist;
+	d->skblist = NULL;
+
+	spin_unlock_irqrestore(&d->lock, flags);
+
+	aoenet_xmit(sl);
+	return 0;
+}
+
+/* This ioctl implementation expects userland to have the device node
+ * permissions set so that only priviledged users can open an aoe
+ * block device directly.
+ */
+static int
+aoeblk_ioctl(struct inode *inode, struct file *filp, uint cmd, ulong arg)
+{
+	struct aoedev *d;
+
+	if (!arg)
+		return -EINVAL;
+
+	d = inode->i_bdev->bd_disk->private_data;
+	if ((d->flags & DEVFL_UP) == 0) {
+		printk(KERN_ERR "aoe: aoeblk_ioctl: disk not up\n");
+		return -ENODEV;
+	}
+
+	if (cmd == HDIO_GETGEO) {
+		d->geo.start = get_start_sect(inode->i_bdev);
+		if (!copy_to_user((void __user *) arg, &d->geo, sizeof d->geo))
+			return 0;
+		return -EFAULT;
+	}
+	printk(KERN_INFO "aoe: aoeblk_ioctl: unknown ioctl %d\n", cmd);
+	return -EINVAL;
+}
+
+static struct block_device_operations aoe_bdops = {
+	.open = aoeblk_open,
+	.release = aoeblk_release,
+	.ioctl = aoeblk_ioctl,
+	.owner = THIS_MODULE,
+};
+
+/* alloc_disk and add_disk can sleep */
+void
+aoeblk_gdalloc(void *vp)
+{
+	struct aoedev *d = vp;
+	struct gendisk *gd;
+	ulong flags;
+	enum { NPARTITIONS = 16 };
+
+	gd = alloc_disk(NPARTITIONS);
+
+	spin_lock_irqsave(&d->lock, flags);
+
+	if (gd == NULL) {
+		printk(KERN_CRIT "aoe: aoeblk_gdalloc: cannot allocate disk "
+			"structure for %ld.%ld\n", d->aoemajor, d->aoeminor);
+		d->flags &= ~DEVFL_WORKON;
+		spin_unlock_irqrestore(&d->lock, flags);
+		return;
+	}
+
+	blk_queue_make_request(&d->blkq, aoeblk_make_request);
+	gd->major = AOE_MAJOR;
+	gd->first_minor = d->sysminor * NPARTITIONS;
+	gd->fops = &aoe_bdops;
+	gd->private_data = d;
+	gd->capacity = d->ssize;
+	snprintf(gd->disk_name, sizeof gd->disk_name, "etherd/e%ld.%ld",
+		d->aoemajor, d->aoeminor);
+
+	gd->queue = &d->blkq;
+	d->gd = gd;
+	d->flags &= ~DEVFL_WORKON;
+	d->flags |= DEVFL_UP;
+
+	spin_unlock_irqrestore(&d->lock, flags);
+
+	add_disk(gd);
+	aoedisk_add_sysfs(d);
+	
+	printk(KERN_INFO "aoe: %012llx e%lu.%lu v%04x has %llu "
+		"sectors\n", mac_addr(d->addr), d->aoemajor, d->aoeminor,
+		d->fw_ver, (long long)d->ssize);
+}
+
+void __exit
+aoeblk_exit(void)
+{
+	unregister_blkdev(AOE_MAJOR, DEVICE_NAME);
+}
+
+int __init
+aoeblk_init(void)
+{
+	int n;
+
+	n = register_blkdev(AOE_MAJOR, DEVICE_NAME);
+	if (n < 0) {
+		printk(KERN_ERR "aoe: aoeblk_init: can't register major\n");
+		return n;
+	}
+	return 0;
+}
+
diff -Nru a/drivers/block/aoe/aoechr.c b/drivers/block/aoe/aoechr.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/block/aoe/aoechr.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,279 @@
+/* Copyright (c) 2004 Coraid, Inc.  See COPYING for GPL terms. */
+/*
+ * aoechr.c
+ * AoE character device driver
+ */
+
+#include <linux/hdreg.h>
+#include <linux/blkdev.h>
+#include "aoe.h"
+
+enum {
+	//MINOR_STAT = 1, (moved to sysfs)
+	MINOR_ERR = 2,
+	MINOR_DISCOVER,
+	MINOR_INTERFACES,
+	MSGSZ = 2048,
+	NARGS = 10,
+	NMSG = 100,		/* message backlog to retain */
+};
+
+struct aoe_chardev {
+	ulong minor;
+	char name[32];
+};
+
+enum { EMFL_VALID = 1 };
+
+struct ErrMsg {
+	short flags;
+	short len;
+	char *msg;
+};
+
+static struct ErrMsg emsgs[NMSG];
+static int emsgs_head_idx, emsgs_tail_idx;
+static struct semaphore emsgs_sema;
+static spinlock_t emsgs_lock;
+static int nblocked_emsgs_readers;
+static struct class_simple *aoe_class;
+static struct aoe_chardev chardevs[] = {
+	{ MINOR_ERR, "err" },
+	{ MINOR_DISCOVER, "discover" },
+	{ MINOR_INTERFACES, "interfaces" },
+};
+
+static int
+discover(void)
+{
+	aoecmd_cfg(0xffff, 0xff);
+	return 0;
+}
+
+static int
+interfaces(const char __user *str, size_t size)
+{
+	if (set_aoe_iflist(str, size)) {
+		printk(KERN_CRIT
+		       "%s: could not set interface list: %s\n",
+		       __FUNCTION__, "too many interfaces");
+		return -EINVAL;
+	}
+	return 0;
+}
+
+void
+aoechr_error(char *msg)
+{
+	struct ErrMsg *em;
+	char *mp;
+	ulong flags, n;
+
+	n = strlen(msg);
+
+	spin_lock_irqsave(&emsgs_lock, flags);
+
+	em = emsgs + emsgs_tail_idx;
+	if ((em->flags & EMFL_VALID)) {
+bail:		spin_unlock_irqrestore(&emsgs_lock, flags);
+		return;
+	}
+
+	mp = kmalloc(n, GFP_ATOMIC);
+	if (mp == NULL) {
+		printk(KERN_CRIT "aoe: aoechr_error: allocation failure, len=%ld\n", n);
+		goto bail;
+	}
+
+	memcpy(mp, msg, n);
+	em->msg = mp;
+	em->flags |= EMFL_VALID;
+	em->len = n;
+
+	emsgs_tail_idx++;
+	emsgs_tail_idx %= ARRAY_SIZE(emsgs);
+
+	spin_unlock_irqrestore(&emsgs_lock, flags);
+
+	if (nblocked_emsgs_readers)
+		up(&emsgs_sema);
+}
+
+#define PERLINE 16
+void
+aoechr_hdump(char *buf, int n)
+{
+	int bufsiz;
+	char *fbuf;
+	int linelen;
+	char *p, *e, *fp;
+
+	bufsiz = n * 3;			/* 2 hex digits and a space */
+	bufsiz += n / PERLINE + 1;	/* the newline characters */
+	bufsiz += 1;			/* the final '\0' */
+
+	fbuf = kmalloc(bufsiz, GFP_ATOMIC);
+	if (!fbuf) {
+		printk(KERN_INFO
+		       "%s: cannot allocate memory\n",
+		       __FUNCTION__);
+		return;
+	}
+	
+	for (p = buf; n <= 0;) {
+		linelen = n > PERLINE ? PERLINE : n;
+		n -= linelen;
+
+		fp = fbuf;
+		for (e=p+linelen; p<e; p++)
+			fp += sprintf(fp, "%2.2X ", *p & 255);
+		sprintf(fp, "\n");
+		aoechr_error(fbuf);
+	}
+
+	kfree(fbuf);
+}
+
+static ssize_t
+aoechr_write(struct file *filp, const char __user *buf, size_t cnt, loff_t *offp)
+{
+	int ret = -EINVAL;
+
+	switch ((unsigned long) filp->private_data) {
+	default:
+		printk(KERN_INFO "aoe: aoechr_write: can't write to that file.\n");
+		break;
+	case MINOR_DISCOVER:
+		ret = discover();
+		break;
+	case MINOR_INTERFACES:
+		ret = interfaces(buf, cnt);
+		break;
+	}
+	if (ret == 0)
+		ret = cnt;
+	return ret;
+}
+
+static int
+aoechr_open(struct inode *inode, struct file *filp)
+{
+	int n, i;
+
+	n = MINOR(inode->i_rdev);
+	filp->private_data = (void *) (unsigned long) n;
+
+	for (i = 0; i < ARRAY_SIZE(chardevs); ++i)
+		if (chardevs[i].minor == n)
+			return 0;
+	return -EINVAL;
+}
+
+static int
+aoechr_rel(struct inode *inode, struct file *filp)
+{
+	return 0;
+}
+
+static ssize_t
+aoechr_read(struct file *filp, char __user *buf, size_t cnt, loff_t *off)
+{
+	int n;
+	char *mp;
+	struct ErrMsg *em;
+	ssize_t len;
+	ulong flags;
+
+	n = (int) filp->private_data;
+	switch (n) {
+	case MINOR_ERR:
+		spin_lock_irqsave(&emsgs_lock, flags);
+loop:
+		em = emsgs + emsgs_head_idx;
+		if ((em->flags & EMFL_VALID) == 0) {
+			if (filp->f_flags & O_NDELAY) {
+				spin_unlock_irqrestore(&emsgs_lock, flags);
+				return -EAGAIN;
+			}
+			nblocked_emsgs_readers++;
+
+			spin_unlock_irqrestore(&emsgs_lock, flags);
+
+			n = down_interruptible(&emsgs_sema);
+
+			spin_lock_irqsave(&emsgs_lock, flags);
+
+			nblocked_emsgs_readers--;
+
+			if (n) {
+				spin_unlock_irqrestore(&emsgs_lock, flags);
+				return -ERESTARTSYS;
+			}
+			goto loop;
+		}
+		if (em->len > cnt) {
+			spin_unlock_irqrestore(&emsgs_lock, flags);
+			return -EAGAIN;
+		}
+		mp = em->msg;
+		len = em->len;
+		em->msg = NULL;
+		em->flags &= ~EMFL_VALID;
+
+		emsgs_head_idx++;
+		emsgs_head_idx %= ARRAY_SIZE(emsgs);
+
+		spin_unlock_irqrestore(&emsgs_lock, flags);
+
+		n = copy_to_user(buf, mp, len);
+		kfree(mp);
+		return n == 0 ? len : -EFAULT;
+	default:
+		return -EFAULT;
+	}
+}
+
+struct file_operations aoe_fops = {
+	.write = aoechr_write,
+	.read = aoechr_read,
+	.open = aoechr_open,
+	.release = aoechr_rel,
+	.owner = THIS_MODULE,
+};
+
+int __init
+aoechr_init(void)
+{
+	int n, i;
+
+	n = register_chrdev(AOE_MAJOR, "aoechr", &aoe_fops);
+	if (n < 0) { 
+		printk(KERN_ERR "aoe: aoechr_init: can't register char device\n");
+		return n;
+	}
+	sema_init(&emsgs_sema, 0);
+	spin_lock_init(&emsgs_lock);
+	aoe_class = class_simple_create(THIS_MODULE, "aoe");
+	if (IS_ERR(aoe_class)) {
+		unregister_chrdev(AOE_MAJOR, "aoechr");
+		return PTR_ERR(aoe_class);
+	}
+	for (i = 0; i < ARRAY_SIZE(chardevs); ++i)
+		class_simple_device_add(aoe_class,
+					MKDEV(AOE_MAJOR, chardevs[i].minor),
+					NULL, chardevs[i].name);
+
+	return 0;
+}
+
+void __exit
+aoechr_exit(void)
+{
+	int i;
+
+	for (i = 0; i < ARRAY_SIZE(chardevs); ++i)
+		class_simple_device_remove(MKDEV(AOE_MAJOR, chardevs[i].minor));
+	class_simple_destroy(aoe_class);
+	unregister_chrdev(AOE_MAJOR, "aoechr");
+}
+
diff -Nru a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/block/aoe/aoecmd.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,627 @@
+/* Copyright (c) 2004 Coraid, Inc.  See COPYING for GPL terms. */
+/*
+ * aoecmd.c
+ * Filesystem request handling methods
+ */
+
+#include <linux/hdreg.h>
+#include <linux/blkdev.h>
+#include <linux/skbuff.h>
+#include <linux/netdevice.h>
+#include "aoe.h"
+
+#define TIMERTICK (HZ / 10)
+#define MINTIMER (2 * TIMERTICK)
+#define MAXTIMER (HZ << 1)
+#define MAXWAIT (60 * 3)	/* After MAXWAIT seconds, give up and fail dev */
+
+static struct sk_buff *
+new_skb(struct net_device *if_dev, ulong len)
+{
+	struct sk_buff *skb;
+
+	skb = alloc_skb(len, GFP_ATOMIC);
+	if (skb) {
+		skb->nh.raw = skb->mac.raw = skb->data;
+		skb->dev = if_dev;
+		skb->protocol = __constant_htons(ETH_P_AOE);
+		skb->priority = 0;
+		skb_put(skb, len);
+		skb->next = skb->prev = NULL;
+
+		/* tell the network layer not to perform IP checksums
+		 * or to get the NIC to do it
+		 */
+		skb->ip_summed = CHECKSUM_NONE;
+	}
+	return skb;
+}
+
+static struct sk_buff *
+skb_prepare(struct aoedev *d, struct frame *f)
+{
+	struct sk_buff *skb;
+	char *p;
+
+	skb = new_skb(d->ifp, f->ndata + f->writedatalen);
+	if (!skb) {
+		printk(KERN_INFO "aoe: skb_prepare: failure to allocate skb\n");
+		return NULL;
+	}
+
+	p = skb->mac.raw;
+	memcpy(p, f->data, f->ndata);
+
+	if (f->writedatalen) {
+		p += sizeof(struct aoe_hdr) + sizeof(struct aoe_atahdr);
+		memcpy(p, f->bufaddr, f->writedatalen);
+	}
+
+	return skb;
+}
+
+static struct frame *
+getframe(struct aoedev *d, int tag)
+{
+	struct frame *f, *e;
+
+	f = d->frames;
+	e = f + d->nframes;
+	for (; f<e; f++)
+		if (f->tag == tag)
+			return f;
+	return NULL;
+}
+
+/*
+ * Leave the top bit clear so we have tagspace for userland.
+ * The bottom 16 bits are the xmit tick for rexmit/rttavg processing.
+ * This driver reserves tag -1 to mean "unused frame."
+ */
+static int
+newtag(struct aoedev *d)
+{
+	register ulong n;
+
+	n = jiffies & 0xffff;
+	return n |= (++d->lasttag & 0x7fff) << 16;
+}
+
+static int
+aoehdr_atainit(struct aoedev *d, struct aoe_hdr *h)
+{
+	u16 type = __constant_cpu_to_be16(ETH_P_AOE);
+	u16 aoemajor = __cpu_to_be16(d->aoemajor);
+	u32 host_tag = newtag(d);
+	u32 tag = __cpu_to_be32(host_tag);
+
+	memcpy(h->src, d->ifp->dev_addr, sizeof h->src);
+	memcpy(h->dst, d->addr, sizeof h->dst);
+	memcpy(h->type, &type, sizeof type);
+	h->verfl = AOE_HVER;
+	memcpy(h->major, &aoemajor, sizeof aoemajor);
+	h->minor = d->aoeminor;
+	h->cmd = AOECMD_ATA;
+	memcpy(h->tag, &tag, sizeof tag);
+
+	return host_tag;
+}
+
+static void
+aoecmd_ata_rw(struct aoedev *d, struct frame *f)
+{
+	struct aoe_hdr *h;
+	struct aoe_atahdr *ah;
+	struct buf *buf;
+	struct sk_buff *skb;
+	ulong bcnt;
+	register sector_t sector;
+	char writebit, extbit;
+
+	writebit = 0x10;
+	extbit = 0x4;
+
+	buf = d->inprocess;
+
+	sector = buf->sector;
+	bcnt = buf->bv_resid;
+	if (bcnt > MAXATADATA)
+		bcnt = MAXATADATA;
+
+	/* initialize the headers & frame */
+	h = (struct aoe_hdr *) f->data;
+	ah = (struct aoe_atahdr *) (h+1);
+	f->ndata = sizeof *h + sizeof *ah;
+	memset(h, 0, f->ndata);
+	f->tag = aoehdr_atainit(d, h);
+	f->waited = 0;
+	f->buf = buf;
+	f->bufaddr = buf->bufaddr;
+
+	/* set up ata header */
+	ah->scnt = bcnt >> 9;
+	ah->lba0 = sector;
+	ah->lba1 = sector >>= 8;
+	ah->lba2 = sector >>= 8;
+	ah->lba3 = sector >>= 8;
+	if (d->flags & DEVFL_EXT) {
+		ah->aflags |= AOEAFL_EXT;
+		ah->lba4 = sector >>= 8;
+		ah->lba5 = sector >>= 8;
+	} else {
+		extbit = 0;
+		ah->lba3 &= 0x0f;
+		ah->lba3 |= 0xe0;	/* LBA bit + obsolete 0xa0 */
+	}
+
+	if (bio_data_dir(buf->bio) == WRITE) {
+		ah->aflags |= AOEAFL_WRITE;
+		f->writedatalen = bcnt;
+	} else {
+		writebit = 0;
+		f->writedatalen = 0;
+	}
+
+	ah->cmdstat = WIN_READ | writebit | extbit;
+
+	/* mark all tracking fields and load out */
+	buf->nframesout += 1;
+	buf->bufaddr += bcnt;
+	buf->bv_resid -= bcnt;
+/* printk(KERN_INFO "aoe: bv_resid=%ld\n", buf->bv_resid); */
+	buf->resid -= bcnt;
+	buf->sector += bcnt >> 9;
+	if (buf->resid == 0) {
+		d->inprocess = NULL;
+	} else if (buf->bv_resid == 0) {
+		buf->bv++;
+		buf->bv_resid = buf->bv->bv_len;
+		buf->bufaddr = page_address(buf->bv->bv_page) + buf->bv->bv_offset;
+	}
+
+	skb = skb_prepare(d, f);
+	if (skb) {
+		skb->next = d->skblist;
+		d->skblist = skb;
+	}
+}
+
+/* enters with d->lock held */
+void
+aoecmd_work(struct aoedev *d)
+{
+	struct frame *f;
+	struct buf *buf;
+loop:
+	f = getframe(d, FREETAG);
+	if (f == NULL)
+		return;
+	if (d->inprocess == NULL) {
+		if (list_empty(&d->bufq))
+			return;
+		buf = container_of(d->bufq.next, struct buf, bufs);
+		list_del(d->bufq.next);
+/*printk(KERN_INFO "aoecmd_work: bi_size=%ld\n", buf->bio->bi_size); */
+		d->inprocess = buf;
+	}
+	aoecmd_ata_rw(d, f);
+	goto loop;
+}
+
+static void
+rexmit(struct aoedev *d, struct frame *f)
+{
+	struct sk_buff *skb;
+	struct aoe_hdr *h;
+	char buf[128];
+	u32 n;
+	u32 net_tag;
+
+	n = newtag(d);
+
+	snprintf(buf, sizeof buf,
+		"%15s e%ld.%ld oldtag=%08x@%08lx newtag=%08x\n",
+		"retransmit",
+		d->aoemajor, d->aoeminor, f->tag, jiffies, n);
+	aoechr_error(buf);
+
+	h = (struct aoe_hdr *) f->data;
+	f->tag = n;
+	net_tag = __cpu_to_be32(n);
+	memcpy(h->tag, &net_tag, sizeof net_tag);
+
+	skb = skb_prepare(d, f);
+	if (skb) {
+		skb->next = d->skblist;
+		d->skblist = skb;
+	}
+}
+
+static int
+tsince(int tag)
+{
+	int n;
+
+	n = jiffies & 0xffff;
+	n -= tag & 0xffff;
+	if (n < 0)
+		n += 1<<16;
+	return n;
+}
+
+static void
+rexmit_timer(ulong vp)
+{
+	struct aoedev *d;
+	struct frame *f, *e;
+	struct sk_buff *sl;
+	register long timeout;
+	ulong flags, n;
+
+	d = (struct aoedev *) vp;
+	sl = NULL;
+
+	/* timeout is always ~150% of the moving average */
+	timeout = d->rttavg;
+	timeout += timeout >> 1;
+
+	spin_lock_irqsave(&d->lock, flags);
+
+	if (d->flags & DEVFL_TKILL) {
+tdie:		spin_unlock_irqrestore(&d->lock, flags);
+		return;
+	}
+	f = d->frames;
+	e = f + d->nframes;
+	for (; f<e; f++) {
+		if (f->tag != FREETAG && tsince(f->tag) >= timeout) {
+			n = f->waited += timeout;
+			n /= HZ;
+			if (n > MAXWAIT) { /* waited too long.  device failure. */
+				aoedev_downdev(d);
+				goto tdie;
+			}
+			rexmit(d, f);
+		}
+	}
+
+	sl = d->skblist;
+	d->skblist = NULL;
+	if (sl) {
+		n = d->rttavg <<= 1;
+		if (n > MAXTIMER)
+			d->rttavg = MAXTIMER;
+	}
+
+	d->timer.expires = jiffies + TIMERTICK;
+	add_timer(&d->timer);
+
+	spin_unlock_irqrestore(&d->lock, flags);
+
+	aoenet_xmit(sl);
+}
+
+static void
+ataid_complete(struct aoedev *d, unsigned char *id)
+{
+	u64 ssize;
+	u16 n;
+
+	/* word 83: command set supported */
+	n = __le16_to_cpu(*((u16 *) &id[83<<1]));
+
+	/* word 86: command set/feature enabled */
+	n |= __le16_to_cpu(*((u16 *) &id[86<<1]));
+
+	if (n & (1<<10)) {	/* bit 10: LBA 48 */
+		d->flags |= DEVFL_EXT;
+
+		/* word 100: number lba48 sectors */
+		ssize = __le64_to_cpu(*((u64 *) &id[100<<1]));
+
+		/* set as in ide-disk.c:init_idedisk_capacity */
+		d->geo.cylinders = ssize;
+		d->geo.cylinders /= (255 * 63);
+		d->geo.heads = 255;
+		d->geo.sectors = 63;
+	} else {
+		d->flags &= ~DEVFL_EXT;
+
+		/* number lba28 sectors */
+		ssize = __le32_to_cpu(*((u32 *) &id[60<<1]));
+
+		/* NOTE: obsolete in ATA 6 */
+		d->geo.cylinders = __le16_to_cpu(*((u16 *) &id[54<<1]));
+		d->geo.heads = __le16_to_cpu(*((u16 *) &id[55<<1]));
+		d->geo.sectors = __le16_to_cpu(*((u16 *) &id[56<<1]));
+	}
+	d->ssize = ssize;
+	d->geo.start = 0;
+	if (d->gd != NULL) {
+		d->gd->capacity = ssize;
+		d->flags |= DEVFL_UP;
+		return;
+	}
+	if (d->flags & DEVFL_WORKON) {
+		printk(KERN_INFO "aoe: ataid_complete: can't schedule work, it's already on!  "
+			"(This really shouldn't happen).\n");
+		return;
+	}
+	INIT_WORK(&d->work, aoeblk_gdalloc, d);
+	schedule_work(&d->work);
+	d->flags |= DEVFL_WORKON;
+}
+
+static void
+calc_rttavg(struct aoedev *d, int rtt)
+{
+	register long n;
+
+	n = rtt;
+	if (n < MINTIMER)
+		n = MINTIMER;
+	else if (n > MAXTIMER)
+		n = MAXTIMER;
+
+	/* g == .25; cf. Congestion Avoidance and Control, Jacobson & Karels; 1988 */
+	n -= d->rttavg;
+	d->rttavg += n >> 2;
+}
+
+void
+aoecmd_ata_rsp(struct sk_buff *skb)
+{
+	struct aoedev *d;
+	struct aoe_hdr *hin;
+	struct aoe_atahdr *ahin, *ahout;
+	struct frame *f;
+	struct buf *buf;
+	struct sk_buff *sl;
+	register long n;
+	ulong flags;
+	char ebuf[128];
+	
+	hin = (struct aoe_hdr *) skb->mac.raw;
+	d = aoedev_bymac(hin->src);
+	if (d == NULL) {
+		snprintf(ebuf, sizeof ebuf, "aoecmd_ata_rsp: ata response "
+			"for unknown device %d.%d\n",
+			 __be16_to_cpu(*((u16 *) hin->major)),
+			hin->minor);
+		aoechr_error(ebuf);
+		return;
+	}
+
+	spin_lock_irqsave(&d->lock, flags);
+
+	f = getframe(d, __be32_to_cpu(*((u32 *) hin->tag)));
+	if (f == NULL) {
+		spin_unlock_irqrestore(&d->lock, flags);
+		snprintf(ebuf, sizeof ebuf,
+			"%15s e%d.%d    tag=%08x@%08lx\n",
+			"unexpected rsp",
+			__be16_to_cpu(*((u16 *) hin->major)),
+			hin->minor,
+			__be32_to_cpu(*((u32 *) hin->tag)),
+			jiffies);
+		aoechr_error(ebuf);
+		return;
+	}
+
+	calc_rttavg(d, tsince(f->tag));
+
+	ahin = (struct aoe_atahdr *) (hin+1);
+	ahout = (struct aoe_atahdr *) (f->data + sizeof(struct aoe_hdr));
+	buf = f->buf;
+
+	if (ahin->cmdstat & 0xa9) {	/* these bits cleared on success */
+		printk(KERN_CRIT "aoe: aoecmd_ata_rsp: ata error cmd=%2.2Xh "
+			"stat=%2.2Xh\n", ahout->cmdstat, ahin->cmdstat);
+		if (buf)
+			buf->flags |= BUFFL_FAIL;
+	} else {
+		switch (ahout->cmdstat) {
+		case WIN_READ:
+		case WIN_READ_EXT:
+			n = ahout->scnt << 9;
+			if (skb->len - sizeof *hin - sizeof *ahin < n) {
+				printk(KERN_CRIT "aoe: aoecmd_ata_rsp: runt "
+					"ata data size in read.  skb->len=%d\n",
+					skb->len);
+				/* fail frame f?  just returning will rexmit. */
+				spin_unlock_irqrestore(&d->lock, flags);
+				return;
+			}
+			memcpy(f->bufaddr, ahin+1, n);
+		case WIN_WRITE:
+		case WIN_WRITE_EXT:
+			break;
+		case WIN_IDENTIFY:
+			if (skb->len - sizeof *hin - sizeof *ahin < 512) {
+				printk(KERN_INFO "aoe: aoecmd_ata_rsp: runt data size "
+					"in ataid.  skb->len=%d\n", skb->len);
+				spin_unlock_irqrestore(&d->lock, flags);
+				return;
+			}
+			ataid_complete(d, (char *) (ahin+1));
+			/* d->flags |= DEVFL_WC_UPDATE; */
+			break;
+		default:
+			printk(KERN_INFO "aoe: aoecmd_ata_rsp: unrecognized "
+			       "outbound ata command %2.2Xh for %d.%d\n", 
+			       ahout->cmdstat,
+			       __be16_to_cpu(*((u16 *) hin->major)),
+			       hin->minor);
+		}
+	}
+
+	if (buf) {
+		buf->nframesout -= 1;
+		if (buf->nframesout == 0 && buf->resid == 0) {
+			n = !(buf->flags & BUFFL_FAIL);
+			bio_endio(buf->bio, buf->bio->bi_size, 0);
+			mempool_free(buf, d->bufpool);
+		}
+	}
+
+	f->buf = NULL;
+	f->tag = FREETAG;
+
+	aoecmd_work(d);
+
+	sl = d->skblist;
+	d->skblist = NULL;
+
+	spin_unlock_irqrestore(&d->lock, flags);
+
+	aoenet_xmit(sl);
+}
+
+void
+aoecmd_cfg(ushort aoemajor, unsigned char aoeminor)
+{
+	struct aoe_hdr *h;
+	struct aoe_cfghdr *ch;
+	struct sk_buff *skb, *sl;
+	struct net_device *ifp;
+	u16 aoe_type = __constant_cpu_to_be16(ETH_P_AOE);
+	u16 net_aoemajor = __cpu_to_be16(aoemajor);
+
+	sl = NULL;
+
+	read_lock(&dev_base_lock);
+	for (ifp = dev_base; ifp; dev_put(ifp), ifp = ifp->next) {
+		dev_hold(ifp);
+		if (!is_aoe_netif(ifp))
+			continue;
+
+		skb = new_skb(ifp, sizeof *h + sizeof *ch);
+		if (skb == NULL) {
+			printk(KERN_INFO "aoe: aoecmd_cfg: skb alloc failure\n");
+			continue;
+		}
+		h = (struct aoe_hdr *) skb->mac.raw;
+		memset(h, 0, sizeof *h + sizeof *ch);
+
+		memset(h->dst, 0xff, sizeof h->dst);
+		memcpy(h->src, ifp->dev_addr, sizeof h->src);
+		memcpy(h->type, &aoe_type, sizeof aoe_type);
+		h->verfl = AOE_HVER;
+		memcpy(h->major, &net_aoemajor, sizeof net_aoemajor);
+		h->minor = aoeminor;
+		h->cmd = AOECMD_CFG;
+
+		skb->next = sl;
+		sl = skb;
+	}
+	read_unlock(&dev_base_lock);
+
+	aoenet_xmit(sl);
+}
+ 
+/*
+ * Since we only call this in one place (and it only prepares one frame)
+ * we just return the skb.  Usually we'd chain it up to the d->skblist.
+ */
+static struct sk_buff *
+aoecmd_ata_id(struct aoedev *d)
+{
+	struct aoe_hdr *h;
+	struct aoe_atahdr *ah;
+	struct frame *f;
+	struct sk_buff *skb;
+
+	f = getframe(d, FREETAG);
+	if (f == NULL) {
+		printk(KERN_CRIT "aoe: aoecmd_ata_id: can't get a frame.  "
+			"This shouldn't happen.\n");
+		return NULL;
+	}
+
+	/* initialize the headers & frame */
+	h = (struct aoe_hdr *) f->data;
+	ah = (struct aoe_atahdr *) (h+1);
+	f->ndata = sizeof *h + sizeof *ah;
+	memset(h, 0, f->ndata);
+	f->tag = aoehdr_atainit(d, h);
+	f->waited = 0;
+	f->writedatalen = 0;
+
+	/* this message initializes the device, so we reset the rttavg */
+	d->rttavg = MAXTIMER;
+
+	/* set up ata header */
+	ah->scnt = 1;
+	ah->cmdstat = WIN_IDENTIFY;
+	ah->lba3 = 0xa0;
+
+	skb = skb_prepare(d, f);
+
+	/* we now want to start the rexmit tracking */
+	d->flags &= ~DEVFL_TKILL;
+	d->timer.data = (ulong) d;
+	d->timer.function = rexmit_timer;
+	d->timer.expires = jiffies + TIMERTICK;
+	add_timer(&d->timer);
+
+	return skb;
+}
+ 
+void
+aoecmd_cfg_rsp(struct sk_buff *skb)
+{
+	struct aoedev *d;
+	struct aoe_hdr *h;
+	struct aoe_cfghdr *ch;
+	ulong flags, bufcnt, sysminor, aoemajor;
+	struct sk_buff *sl;
+	enum { MAXFRAMES = 8, MAXSYSMINOR = 255 };
+
+	h = (struct aoe_hdr *) skb->mac.raw;
+	ch = (struct aoe_cfghdr *) (h+1);
+
+	/*
+	 * Enough people have their dip switches set backwards to
+	 * warrant a loud message for this special case.
+	 */
+	aoemajor = __be16_to_cpu(*((u16 *) h->major));
+	if (aoemajor == 0xfff) {
+		printk(KERN_CRIT "aoe: aoecmd_cfg_rsp: Warning: shelf "
+			"address is all ones.  Check shelf dip switches\n");
+		return;
+	}
+
+	sysminor = SYSMINOR(aoemajor, h->minor);
+	if (sysminor > MAXSYSMINOR) {
+		printk(KERN_INFO "aoe: aoecmd_cfg_rsp: sysminor %ld too "
+			"large\n", sysminor);
+		return;
+	}
+
+	bufcnt = __be16_to_cpu(*((u16 *) ch->bufcnt));
+	if (bufcnt > MAXFRAMES)	/* keep it reasonable */
+		bufcnt = MAXFRAMES;
+
+	d = aoedev_set(sysminor, h->src, skb->dev, bufcnt);
+	if (d == NULL) {
+		printk(KERN_INFO "aoe: aoecmd_cfg_rsp: device set failure\n");
+		return;
+	}
+
+	spin_lock_irqsave(&d->lock, flags);
+
+	if (d->flags & (DEVFL_UP | DEVFL_CLOSEWAIT)) {
+		spin_unlock_irqrestore(&d->lock, flags);
+		return;
+	}
+
+	d->fw_ver = __be16_to_cpu(*((u16 *) ch->fwver));
+
+	/* we get here only if the device is new */
+	sl = aoecmd_ata_id(d);
+
+	spin_unlock_irqrestore(&d->lock, flags);
+
+	aoenet_xmit(sl);
+}
+
diff -Nru a/drivers/block/aoe/aoedev.c b/drivers/block/aoe/aoedev.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/block/aoe/aoedev.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,194 @@
+/* Copyright (c) 2004 Coraid, Inc.  See COPYING for GPL terms. */
+/*
+ * aoedev.c
+ * AoE device utility functions; maintains device list.
+ */
+
+#include <linux/hdreg.h>
+#include <linux/blkdev.h>
+#include <linux/netdevice.h>
+#include "aoe.h"
+
+static struct aoedev *devlist;
+static spinlock_t devlist_lock;
+static kmem_cache_t *buf_pool_cache;
+
+struct aoedev *
+aoedev_bymac(unsigned char *macaddr)
+{
+	struct aoedev *d;
+	ulong flags;
+
+	spin_lock_irqsave(&devlist_lock, flags);
+
+	for (d=devlist; d; d=d->next)
+		if (!memcmp(d->addr, macaddr, 6))
+			break;
+
+	spin_unlock_irqrestore(&devlist_lock, flags);
+	return d;
+}
+
+/* called with devlist lock held */
+static struct aoedev *
+aoedev_newdev(ulong nframes)
+{
+	struct aoedev *d;
+	struct frame *f, *e;
+
+	d = kcalloc(1, sizeof *d, GFP_ATOMIC);
+	if (d == NULL)
+		return NULL;
+	f = kcalloc(nframes, sizeof *f, GFP_ATOMIC);
+	if (f == NULL) {
+		kfree(d);
+		return NULL;
+	}
+
+	d->nframes = nframes;
+	d->frames = f;
+	e = f + nframes;
+	for (; f<e; f++)
+		f->tag = FREETAG;
+
+	spin_lock_init(&d->lock);
+	init_timer(&d->timer);
+	d->bufpool = mempool_create(MIN_BUFS,
+				    mempool_alloc_slab, mempool_free_slab,
+				    buf_pool_cache);
+	INIT_LIST_HEAD(&d->bufq);
+	d->next = devlist;
+	devlist = d;
+
+	return d;
+}
+
+void
+aoedev_downdev(struct aoedev *d)
+{
+	struct frame *f, *e;
+	struct buf *buf;
+	struct bio *bio;
+
+	d->flags |= DEVFL_TKILL;
+	del_timer(&d->timer);
+
+	f = d->frames;
+	e = f + d->nframes;
+	for (; f<e; f->tag = FREETAG, f->buf = NULL, f++) {
+		if (f->tag == FREETAG || f->buf == NULL)
+			continue;
+		buf = f->buf;
+		bio = buf->bio;
+		if (--buf->nframesout == 0) {
+			mempool_free(buf, d->bufpool);
+			bio_endio(bio, bio->bi_size, -EIO);
+		}
+	}
+	d->inprocess = NULL;
+
+	while (!list_empty(&d->bufq)) {
+		buf = container_of(d->bufq.next, struct buf, bufs);
+		list_del(d->bufq.next);
+		bio = buf->bio;
+		mempool_free(buf, d->bufpool);
+		bio_endio(bio, bio->bi_size, -EIO);
+	}
+
+	if (d->gd) {
+		struct block_device *bdev = bdget_disk(d->gd, 0);
+		if (bdev) {
+			if (bdev->bd_openers)
+				d->flags |= DEVFL_CLOSEWAIT;
+			bdput(bdev);
+		}
+		d->gd->capacity = 0;
+	}
+
+	d->flags &= ~DEVFL_UP;
+}
+
+struct aoedev *
+aoedev_set(ulong sysminor, unsigned char *addr, struct net_device *ifp, ulong bufcnt)
+{
+	struct aoedev *d;
+	ulong flags;
+
+	spin_lock_irqsave(&devlist_lock, flags);
+
+	for (d=devlist; d; d=d->next)
+		if (d->sysminor == sysminor
+		|| memcmp(d->addr, addr, sizeof d->addr) == 0)
+			break;
+
+	if (d == NULL && (d = aoedev_newdev(bufcnt)) == NULL) {
+		spin_unlock_irqrestore(&devlist_lock, flags);
+		printk(KERN_INFO "aoe: aoedev_set: aoedev_newdev failure.\n");
+		return NULL;
+	}
+
+	spin_unlock_irqrestore(&devlist_lock, flags);
+	spin_lock_irqsave(&d->lock, flags);
+
+	d->ifp = ifp;
+
+	if (d->sysminor != sysminor
+	|| memcmp(d->addr, addr, sizeof d->addr)
+	|| (d->flags & DEVFL_UP) == 0) {
+		aoedev_downdev(d); /* flushes outstanding frames */
+		memcpy(d->addr, addr, sizeof d->addr);
+		d->sysminor = sysminor;
+		d->aoemajor = AOEMAJOR(sysminor);
+		d->aoeminor = AOEMINOR(sysminor);
+	}
+
+	spin_unlock_irqrestore(&d->lock, flags);
+	return d;
+}
+
+static void
+aoedev_freedev(struct aoedev *d)
+{
+	if (d->gd) {
+		aoedisk_rm_sysfs(d);
+		del_gendisk(d->gd);
+		put_disk(d->gd);
+	}
+	kfree(d->frames);
+	mempool_destroy(d->bufpool);
+	kfree(d);
+}
+
+void __exit
+aoedev_exit(void)
+{
+	struct aoedev *d;
+	ulong flags;
+
+	flush_scheduled_work();
+
+	while ((d = devlist)) {
+		devlist = d->next;
+
+		spin_lock_irqsave(&d->lock, flags);
+		aoedev_downdev(d);
+		spin_unlock_irqrestore(&d->lock, flags);
+
+		del_timer_sync(&d->timer);
+		aoedev_freedev(d);
+	}
+	kmem_cache_destroy(buf_pool_cache);
+}
+
+int __init
+aoedev_init(void)
+{
+	buf_pool_cache = kmem_cache_create("aoe_bufs", 
+					   sizeof(struct buf),
+					   0, 0, NULL, NULL);
+	if (buf_pool_cache == NULL)
+		return -ENOMEM;
+	spin_lock_init(&devlist_lock);
+	return 0;
+}
+
diff -Nru a/drivers/block/aoe/aoemain.c b/drivers/block/aoe/aoemain.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/block/aoe/aoemain.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,93 @@
+/* Copyright (c) 2004 Coraid, Inc.  See COPYING for GPL terms. */
+/*
+ * aoemain.c
+ * Module initialization routines, discover timer
+ */
+
+#include <linux/hdreg.h>
+#include <linux/blkdev.h>
+#include <linux/module.h>
+#include "aoe.h"
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Sam Hopkins <sah@coraid.com>");
+MODULE_DESCRIPTION("AoE block/char driver for 2.6.[0-9]+");
+MODULE_VERSION(VERSION);
+
+enum { TINIT, TRUN, TKILL };
+
+static void
+discover_timer(ulong vp)
+{
+	static struct timer_list t;
+	static volatile ulong die;
+	static spinlock_t lock;
+	ulong flags;
+	enum { DTIMERTICK = HZ * 60 }; /* one minute */
+
+	switch (vp) {
+	case TINIT:
+		init_timer(&t);
+		spin_lock_init(&lock);
+		t.data = TRUN;
+		t.function = discover_timer;
+		die = 0;
+	case TRUN:
+		spin_lock_irqsave(&lock, flags);
+		if (!die) {
+			t.expires = jiffies + DTIMERTICK;
+			add_timer(&t);
+		}
+		spin_unlock_irqrestore(&lock, flags);
+
+		aoecmd_cfg(0xffff, 0xff);
+		return;
+	case TKILL:
+		spin_lock_irqsave(&lock, flags);
+		die = 1;
+		spin_unlock_irqrestore(&lock, flags);
+
+		del_timer_sync(&t);
+	default:
+		return;
+	}
+}
+
+static void __exit
+aoe_exit(void)
+{
+	discover_timer(TKILL);
+
+	aoenet_exit();
+	aoeblk_exit();
+	aoechr_exit();
+	aoedev_exit();
+}
+
+static int __init
+aoe_init(void)
+{
+	int n, (**p)(void);
+	int (*fns[])(void) = {
+		aoedev_init, aoechr_init, aoeblk_init, aoenet_init, NULL
+	};
+
+	for (p=fns; *p != NULL; p++) {
+		n = (*p)();
+		if (n) {
+			aoe_exit();
+			printk(KERN_INFO "aoe: aoe_init: initialisation failure.\n");
+			return n;
+		}
+	}
+	printk(KERN_INFO
+	       "aoe: aoe_init: AoE v2.6-%s initialised.\n",
+	       VERSION);
+
+	discover_timer(TINIT);
+	return 0;
+}
+
+module_init(aoe_init);
+module_exit(aoe_exit);
+
diff -Nru a/drivers/block/aoe/aoenet.c b/drivers/block/aoe/aoenet.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/block/aoe/aoenet.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,175 @@
+/* Copyright (c) 2004 Coraid, Inc.  See COPYING for GPL terms. */
+/*
+ * aoenet.c
+ * Ethernet portion of AoE driver
+ */
+
+#include <linux/hdreg.h>
+#include <linux/blkdev.h>
+#include <linux/netdevice.h>
+#include "aoe.h"
+
+#define NECODES 5
+
+static char *aoe_errlist[] =
+{
+	"no such error",
+	"unrecognized command code",
+	"bad argument parameter",
+	"device unavailable",
+	"config string present",
+	"unsupported version"
+};
+
+enum {
+	IFLISTSZ = 1024,
+};
+
+static char aoe_iflist[IFLISTSZ];
+
+int
+is_aoe_netif(struct net_device *ifp)
+{
+	register char *p, *q;
+	register int len;
+
+	if (aoe_iflist[0] == '\0')
+		return 1;
+
+	for (p = aoe_iflist; *p; p = q + strspn(q, WHITESPACE)) {
+		q = p + strcspn(p, WHITESPACE);
+		if (q != p)
+			len = q - p;
+		else
+			len = strlen(p); /* last token in aoe_iflist */
+
+		if (strlen(ifp->name) == len && !strncmp(ifp->name, p, len))
+			return 1;
+		if (q == p)
+			break;
+	}
+
+	return 0;
+}
+
+int
+set_aoe_iflist(const char __user *user_str, size_t size)
+{
+	if (size >= IFLISTSZ)
+		return -EINVAL;
+
+	if (copy_from_user(aoe_iflist, user_str, size)) {
+		printk(KERN_INFO "aoe: %s: copy from user failed\n", __FUNCTION__);
+		return -EFAULT;
+	}
+	aoe_iflist[size] = 0x00;
+	return 0;
+}
+
+u64
+mac_addr(char addr[6])
+{
+	u64 n = 0;
+	char *p = (char *) &n;
+
+	memcpy(p + 2, addr, 6);	/* (sizeof addr != 6) */
+
+	return __be64_to_cpu(n);
+}
+
+static struct sk_buff *
+skb_check(struct sk_buff *skb)
+{
+	if (skb_is_nonlinear(skb))
+	if ((skb = skb_share_check(skb, GFP_ATOMIC)))
+	if (skb_linearize(skb, GFP_ATOMIC) < 0) {
+		dev_kfree_skb(skb);
+		return NULL;
+	}
+	return skb;
+}
+
+void
+aoenet_xmit(struct sk_buff *sl)
+{
+	struct sk_buff *skb;
+
+	while ((skb = sl)) {
+		sl = sl->next;
+		skb->next = skb->prev = NULL;
+		dev_queue_xmit(skb);
+	}
+}
+
+/* 
+ * (1) i have no idea if this is redundant, but i can't figure why
+ * the ifp is passed in if it is.
+ *
+ * (2) len doesn't include the header by default.  I want this. 
+ */
+static int
+aoenet_rcv(struct sk_buff *skb, struct net_device *ifp, struct packet_type *pt)
+{
+	struct aoe_hdr *h;
+	ulong n;
+
+	skb = skb_check(skb);
+	if (!skb)
+		return 0;
+
+	skb->dev = ifp;	/* (1) */
+
+	if (!is_aoe_netif(ifp))
+		goto exit;
+
+	skb->len += ETH_HLEN;	/* (2) */
+
+	h = (struct aoe_hdr *) skb->mac.raw;
+	n = __be32_to_cpu(*((u32 *) h->tag));
+	if ((h->verfl & AOEFL_RSP) == 0 || (n & 1<<31))
+		goto exit;
+
+	if (h->verfl & AOEFL_ERR) {
+		n = h->err;
+		if (n > NECODES)
+			n = 0;
+		printk(KERN_CRIT "aoe: aoenet_rcv: error packet from %d.%d; "
+			"ecode=%d '%s'\n",
+		       __be16_to_cpu(*((u16 *) h->major)), h->minor, 
+			h->err, aoe_errlist[n]);
+		goto exit;
+	}
+
+	switch (h->cmd) {
+	case AOECMD_ATA:
+		aoecmd_ata_rsp(skb);
+		break;
+	case AOECMD_CFG:
+		aoecmd_cfg_rsp(skb);
+		break;
+	default:
+		printk(KERN_INFO "aoe: aoenet_rcv: unknown cmd %d\n", h->cmd);
+	}
+exit:
+	dev_kfree_skb(skb);
+	return 0;
+}
+
+static struct packet_type aoe_pt = {
+	.type = __constant_htons(ETH_P_AOE),
+	.func = aoenet_rcv,
+};
+
+int __init
+aoenet_init(void)
+{
+	dev_add_pack(&aoe_pt);
+	return 0;
+}
+
+void __exit
+aoenet_exit(void)
+{
+	dev_remove_pack(&aoe_pt);
+}
+
diff -Nru a/drivers/block/cciss.c b/drivers/block/cciss.c
--- a/drivers/block/cciss.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/block/cciss.c	2005-01-10 20:11:22 -08:00
@@ -16,7 +16,7 @@
  *    along with this program; if not, write to the Free Software
  *    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *    Questions/Comments/Bugfixes to Cciss-discuss@lists.sourceforge.net
+ *    Questions/Comments/Bugfixes to iss_storagedev@hp.com
  *
  */
 
diff -Nru a/drivers/block/cciss_scsi.c b/drivers/block/cciss_scsi.c
--- a/drivers/block/cciss_scsi.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/block/cciss_scsi.c	2005-01-10 20:11:17 -08:00
@@ -16,7 +16,7 @@
  *    along with this program; if not, write to the Free Software
  *    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *    Questions/Comments/Bugfixes to arrays@compaq.com
+ *    Questions/Comments/Bugfixes to iss_storagedev@hp.com
  *    
  *    Author: Stephen M. Cameron
  */
@@ -534,7 +534,7 @@
 	if (shba == NULL)
 		return;
 	shba->scsi_host = NULL;
-	shba->lock = SPIN_LOCK_UNLOCKED;
+	spin_lock_init(&shba->lock);
 	shba->registered = 0;
 	if (scsi_cmd_stack_setup(cntl_num, shba) != 0) {
 		kfree(shba);
diff -Nru a/drivers/block/cciss_scsi.h b/drivers/block/cciss_scsi.h
--- a/drivers/block/cciss_scsi.h	2005-01-10 20:11:19 -08:00
+++ b/drivers/block/cciss_scsi.h	2005-01-10 20:11:19 -08:00
@@ -16,7 +16,7 @@
  *    along with this program; if not, write to the Free Software
  *    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *    Questions/Comments/Bugfixes to arrays@compaq.com
+ *    Questions/Comments/Bugfixes to iss_storagedev@hp.com
  *
  */
 #ifdef CONFIG_CISS_SCSI_TAPE
diff -Nru a/drivers/block/cpqarray.c b/drivers/block/cpqarray.c
--- a/drivers/block/cpqarray.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/block/cpqarray.c	2005-01-10 20:11:16 -08:00
@@ -16,7 +16,7 @@
  *    along with this program; if not, write to the Free Software
  *    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *    Questions/Comments/Bugfixes to Cpqarray-discuss@lists.sourceforge.net
+ *    Questions/Comments/Bugfixes to iss_storagedev@hp.com
  *
  */
 #include <linux/config.h>	/* CONFIG_PROC_FS */
@@ -310,7 +310,7 @@
 }
 #endif /* CONFIG_PROC_FS */
 
-MODULE_PARM(eisa, "1-8i");
+module_param_array(eisa, int, NULL, 0);
 
 /* This is a bit of a hack,
  * necessary to support both eisa and pci
diff -Nru a/drivers/block/cpqarray.h b/drivers/block/cpqarray.h
--- a/drivers/block/cpqarray.h	2005-01-10 20:11:20 -08:00
+++ b/drivers/block/cpqarray.h	2005-01-10 20:11:20 -08:00
@@ -16,7 +16,7 @@
  *    along with this program; if not, write to the Free Software
  *    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *    Questions/Comments/Bugfixes to arrays@compaq.com
+ *    Questions/Comments/Bugfixes to iss_storagedev@hp.com
  *
  *    If you want to make changes, improve or add functionality to this
  *    driver, you'll probably need the Compaq Array Controller Interface
diff -Nru a/drivers/block/floppy.c b/drivers/block/floppy.c
--- a/drivers/block/floppy.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/block/floppy.c	2005-01-10 20:11:16 -08:00
@@ -155,7 +155,6 @@
 #include <linux/kernel.h>
 #include <linux/timer.h>
 #include <linux/workqueue.h>
-#include <linux/version.h>
 #define FDPATCHES
 #include <linux/fdreg.h>
 
@@ -3319,11 +3318,6 @@
 	return 0;
 }
 
-static inline void clear_write_error(int drive)
-{
-	CLEARSTRUCT(UDRWE);
-}
-
 static inline int set_geometry(unsigned int cmd, struct floppy_struct *g,
 			       int drive, int type, struct block_device *bdev)
 {
@@ -4596,8 +4590,6 @@
 
 int init_module(void)
 {
-	printk(KERN_INFO "inserting floppy driver for " UTS_RELEASE "\n");
-
 	if (floppy)
 		parse_floppy_cfg_string(floppy);
 	return floppy_init();
diff -Nru a/drivers/block/genhd.c b/drivers/block/genhd.c
--- a/drivers/block/genhd.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/block/genhd.c	2005-01-10 20:11:19 -08:00
@@ -38,6 +38,7 @@
 	return major % MAX_PROBE_HASH;
 }
 
+#ifdef CONFIG_PROC_FS
 /* get block device names in somewhat random order */
 int get_blkdev_list(char *p)
 {
@@ -56,6 +57,7 @@
 
 	return len;
 }
+#endif
 
 int register_blkdev(unsigned int major, const char *name)
 {
diff -Nru a/drivers/block/ida_cmd.h b/drivers/block/ida_cmd.h
--- a/drivers/block/ida_cmd.h	2005-01-10 20:11:17 -08:00
+++ b/drivers/block/ida_cmd.h	2005-01-10 20:11:17 -08:00
@@ -16,7 +16,7 @@
  *    along with this program; if not, write to the Free Software
  *    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *    Questions/Comments/Bugfixes to arrays@compaq.com
+ *    Questions/Comments/Bugfixes to iss_storagedev@hp.com
  *
  */
 #ifndef ARRAYCMD_H
diff -Nru a/drivers/block/ida_ioctl.h b/drivers/block/ida_ioctl.h
--- a/drivers/block/ida_ioctl.h	2005-01-10 20:11:19 -08:00
+++ b/drivers/block/ida_ioctl.h	2005-01-10 20:11:19 -08:00
@@ -16,7 +16,7 @@
  *    along with this program; if not, write to the Free Software
  *    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *    Questions/Comments/Bugfixes to arrays@compaq.com
+ *    Questions/Comments/Bugfixes to iss_storagedev@hp.com
  *
  */
 #ifndef IDA_IOCTL_H
diff -Nru a/drivers/block/loop.c b/drivers/block/loop.c
--- a/drivers/block/loop.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/block/loop.c	2005-01-10 20:11:19 -08:00
@@ -622,10 +622,17 @@
 	return error;
 }
 
+static inline int is_loop_device(struct file *file)
+{
+	struct inode *i = file->f_mapping->host;
+
+	return i && S_ISBLK(i->i_mode) && MAJOR(i->i_rdev) == LOOP_MAJOR;
+}
+
 static int loop_set_fd(struct loop_device *lo, struct file *lo_file,
 		       struct block_device *bdev, unsigned int arg)
 {
-	struct file	*file;
+	struct file	*file, *f;
 	struct inode	*inode;
 	struct address_space *mapping;
 	unsigned lo_blocksize;
@@ -636,14 +643,30 @@
 	/* This is safe, since we have a reference from open(). */
 	__module_get(THIS_MODULE);
 
-	error = -EBUSY;
-	if (lo->lo_state != Lo_unbound)
-		goto out;
-
 	error = -EBADF;
 	file = fget(arg);
 	if (!file)
 		goto out;
+
+	error = -EBUSY;
+	if (lo->lo_state != Lo_unbound)
+		goto out_putf;
+
+	/* Avoid recursion */
+	f = file;
+	while (is_loop_device(f)) {
+		struct loop_device *l;
+
+		if (f->f_mapping->host->i_rdev == lo_file->f_mapping->host->i_rdev)
+			goto out_putf;
+
+		l = f->f_mapping->host->i_bdev->bd_disk->private_data;
+		if (l->lo_state == Lo_unbound) {
+			error = -EINVAL;
+			goto out_putf;
+		}
+		f = l->lo_backing_file;
+	}
 
 	mapping = file->f_mapping;
 	inode = mapping->host;
diff -Nru a/drivers/block/nbd.c b/drivers/block/nbd.c
--- a/drivers/block/nbd.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/block/nbd.c	2005-01-10 20:11:17 -08:00
@@ -726,6 +726,6 @@
 MODULE_LICENSE("GPL");
 
 #ifndef NDEBUG
-MODULE_PARM(debugflags, "i");
+module_param(debugflags, int, 0644);
 MODULE_PARM_DESC(debugflags, "flags for controlling debug output");
 #endif
diff -Nru a/drivers/block/noop-iosched.c b/drivers/block/noop-iosched.c
--- a/drivers/block/noop-iosched.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/block/noop-iosched.c	2005-01-10 20:11:20 -08:00
@@ -1,24 +1,17 @@
 /*
  * elevator noop
  */
-#include <linux/kernel.h>
-#include <linux/fs.h>
 #include <linux/blkdev.h>
 #include <linux/elevator.h>
 #include <linux/bio.h>
-#include <linux/config.h>
 #include <linux/module.h>
-#include <linux/slab.h>
 #include <linux/init.h>
-#include <linux/compiler.h>
-
-#include <asm/uaccess.h>
 
 /*
  * See if we can find a request that this buffer can be coalesced with.
  */
-int elevator_noop_merge(request_queue_t *q, struct request **req,
-			struct bio *bio)
+static int elevator_noop_merge(request_queue_t *q, struct request **req,
+			       struct bio *bio)
 {
 	struct list_head *entry = &q->queue_head;
 	struct request *__rq;
@@ -50,14 +43,14 @@
 	return ELEVATOR_NO_MERGE;
 }
 
-void elevator_noop_merge_requests(request_queue_t *q, struct request *req,
-				  struct request *next)
+static void elevator_noop_merge_requests(request_queue_t *q, struct request *req,
+					 struct request *next)
 {
 	list_del_init(&next->queuelist);
 }
 
-void elevator_noop_add_request(request_queue_t *q, struct request *rq,
-			       int where)
+static void elevator_noop_add_request(request_queue_t *q, struct request *rq,
+				      int where)
 {
 	struct list_head *insert = q->queue_head.prev;
 
@@ -75,7 +68,7 @@
 		q->last_merge = rq;
 }
 
-struct request *elevator_noop_next_request(request_queue_t *q)
+static struct request *elevator_noop_next_request(request_queue_t *q)
 {
 	if (!list_empty(&q->queue_head))
 		return list_entry_rq(q->queue_head.next);
@@ -94,12 +87,12 @@
 	.elevator_owner = THIS_MODULE,
 };
 
-int noop_init(void)
+static int __init noop_init(void)
 {
 	return elv_register(&elevator_noop);
 }
 
-void noop_exit(void)
+static void __exit noop_exit(void)
 {
 	elv_unregister(&elevator_noop);
 }
diff -Nru a/drivers/block/paride/bpck6.c b/drivers/block/paride/bpck6.c
--- a/drivers/block/paride/bpck6.c	2005-01-10 20:11:24 -08:00
+++ b/drivers/block/paride/bpck6.c	2005-01-10 20:11:24 -08:00
@@ -277,6 +277,6 @@
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Micro Solutions Inc.");
 MODULE_DESCRIPTION("BACKPACK Protocol module, compatible with PARIDE");
-MODULE_PARM(verbose,"i");
+module_param(verbose, bool, 0644);
 module_init(bpck6_init)
 module_exit(bpck6_exit)
diff -Nru a/drivers/block/paride/pcd.c b/drivers/block/paride/pcd.c
--- a/drivers/block/paride/pcd.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/block/paride/pcd.c	2005-01-10 20:11:23 -08:00
@@ -162,14 +162,14 @@
 
 #endif
 
-MODULE_PARM(verbose, "i");
-MODULE_PARM(major, "i");
-MODULE_PARM(name, "s");
-MODULE_PARM(nice, "i");
-MODULE_PARM(drive0, "1-6i");
-MODULE_PARM(drive1, "1-6i");
-MODULE_PARM(drive2, "1-6i");
-MODULE_PARM(drive3, "1-6i");
+module_param(verbose, bool, 0644);
+module_param(major, int, 0);
+module_param(name, charp, 0);
+module_param(nice, int, 0);
+module_param_array(drive0, int, NULL, 0);
+module_param_array(drive1, int, NULL, 0);
+module_param_array(drive2, int, NULL, 0);
+module_param_array(drive3, int, NULL, 0);
 
 #include "paride.h"
 #include "pseudo.h"
diff -Nru a/drivers/block/paride/pd.c b/drivers/block/paride/pd.c
--- a/drivers/block/paride/pd.c	2005-01-10 20:11:24 -08:00
+++ b/drivers/block/paride/pd.c	2005-01-10 20:11:24 -08:00
@@ -178,15 +178,15 @@
 
 #endif
 
-MODULE_PARM(verbose, "i");
-MODULE_PARM(major, "i");
-MODULE_PARM(name, "s");
-MODULE_PARM(cluster, "i");
-MODULE_PARM(nice, "i");
-MODULE_PARM(drive0, "1-8i");
-MODULE_PARM(drive1, "1-8i");
-MODULE_PARM(drive2, "1-8i");
-MODULE_PARM(drive3, "1-8i");
+module_param(verbose, bool, 0);
+module_param(major, int, 0);
+module_param(name, charp, 0);
+module_param(cluster, int, 0);
+module_param(nice, int, 0);
+module_param_array(drive0, int, NULL, 0);
+module_param_array(drive1, int, NULL, 0);
+module_param_array(drive2, int, NULL, 0);
+module_param_array(drive3, int, NULL, 0);
 
 #include "paride.h"
 
diff -Nru a/drivers/block/paride/pf.c b/drivers/block/paride/pf.c
--- a/drivers/block/paride/pf.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/block/paride/pf.c	2005-01-10 20:11:20 -08:00
@@ -177,15 +177,15 @@
 
 #endif
 
-MODULE_PARM(verbose, "i");
-MODULE_PARM(major, "i");
-MODULE_PARM(name, "s");
-MODULE_PARM(cluster, "i");
-MODULE_PARM(nice, "i");
-MODULE_PARM(drive0, "1-7i");
-MODULE_PARM(drive1, "1-7i");
-MODULE_PARM(drive2, "1-7i");
-MODULE_PARM(drive3, "1-7i");
+module_param(verbose, bool, 0644);
+module_param(major, int, 0);
+module_param(name, charp, 0);
+module_param(cluster, int, 0);
+module_param(nice, int, 0);
+module_param_array(drive0, int, NULL, 0);
+module_param_array(drive1, int, NULL, 0);
+module_param_array(drive2, int, NULL, 0);
+module_param_array(drive3, int, NULL, 0);
 
 #include "paride.h"
 #include "pseudo.h"
diff -Nru a/drivers/block/paride/pg.c b/drivers/block/paride/pg.c
--- a/drivers/block/paride/pg.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/block/paride/pg.c	2005-01-10 20:11:22 -08:00
@@ -184,13 +184,13 @@
 
 #endif
 
-MODULE_PARM(verbose, "i");
-MODULE_PARM(major, "i");
-MODULE_PARM(name, "s");
-MODULE_PARM(drive0, "1-6i");
-MODULE_PARM(drive1, "1-6i");
-MODULE_PARM(drive2, "1-6i");
-MODULE_PARM(drive3, "1-6i");
+module_param(verbose, bool, 0644);
+module_param(major, int, 0);
+module_param(name, charp, 0);
+module_param_array(drive0, int, NULL, 0);
+module_param_array(drive1, int, NULL, 0);
+module_param_array(drive2, int, NULL, 0);
+module_param_array(drive3, int, NULL, 0);
 
 #include "paride.h"
 
diff -Nru a/drivers/block/paride/pt.c b/drivers/block/paride/pt.c
--- a/drivers/block/paride/pt.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/block/paride/pt.c	2005-01-10 20:11:17 -08:00
@@ -169,13 +169,13 @@
 
 #endif
 
-MODULE_PARM(verbose, "i");
-MODULE_PARM(major, "i");
-MODULE_PARM(name, "s");
-MODULE_PARM(drive0, "1-6i");
-MODULE_PARM(drive1, "1-6i");
-MODULE_PARM(drive2, "1-6i");
-MODULE_PARM(drive3, "1-6i");
+module_param(verbose, bool, 0);
+module_param(major, int, 0);
+module_param(name, charp, 0);
+module_param_array(drive0, int, NULL, 0);
+module_param_array(drive1, int, NULL, 0);
+module_param_array(drive2, int, NULL, 0);
+module_param_array(drive3, int, NULL, 0);
 
 #include "paride.h"
 
diff -Nru a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
--- a/drivers/block/pktcdvd.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/block/pktcdvd.c	2005-01-10 20:11:15 -08:00
@@ -135,12 +135,10 @@
 		goto no_bio;
 
 	for (i = 0; i < PAGES_PER_PACKET; i++) {
-		pkt->pages[i] = alloc_page(GFP_KERNEL);
+		pkt->pages[i] = alloc_page(GFP_KERNEL|__GFP_ZERO);
 		if (!pkt->pages[i])
 			goto no_page;
 	}
-	for (i = 0; i < PAGES_PER_PACKET; i++)
-		clear_page(page_address(pkt->pages[i]));
 
 	spin_lock_init(&pkt->lock);
 
diff -Nru a/drivers/block/ps2esdi.c b/drivers/block/ps2esdi.c
--- a/drivers/block/ps2esdi.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/block/ps2esdi.c	2005-01-10 20:11:15 -08:00
@@ -177,10 +177,10 @@
 static int head[MAX_HD] = {-1, -1};
 static int sect[MAX_HD] = {-1, -1};
 
-MODULE_PARM(tp720esdi, "i");
-MODULE_PARM(cyl, "i");
-MODULE_PARM(head, "i");
-MODULE_PARM(sect, "i");
+module_param(tp720esdi, bool, 0);
+module_param_array(cyl, int, NULL, 0);
+module_param_array(head, int, NULL, 0);
+module_param_array(sect, int, NULL, 0);
 MODULE_LICENSE("GPL");
 
 int init_module(void) {
diff -Nru a/drivers/block/scsi_ioctl.c b/drivers/block/scsi_ioctl.c
--- a/drivers/block/scsi_ioctl.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/block/scsi_ioctl.c	2005-01-10 20:11:23 -08:00
@@ -356,7 +356,7 @@
 
 	bytes = max(in_len, out_len);
 	if (bytes) {
-		buffer = kmalloc(bytes, q->bounce_gfp | GFP_USER);
+		buffer = kmalloc(bytes, q->bounce_gfp | GFP_USER| __GFP_NOWARN);
 		if (!buffer)
 			return -ENOMEM;
 
diff -Nru a/drivers/block/smart1,2.h b/drivers/block/smart1,2.h
--- a/drivers/block/smart1,2.h	2005-01-10 20:11:20 -08:00
+++ b/drivers/block/smart1,2.h	2005-01-10 20:11:20 -08:00
@@ -16,7 +16,7 @@
  *    along with this program; if not, write to the Free Software
  *    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *    Questions/Comments/Bugfixes to arrays@compaq.com
+ *    Questions/Comments/Bugfixes to iss_storagedev@hp.com
  *
  *    If you want to make changes, improve or add functionality to this
  *    driver, you'll probably need the Compaq Array Controller Interface
diff -Nru a/drivers/block/sx8.c b/drivers/block/sx8.c
--- a/drivers/block/sx8.c	2005-01-10 20:11:24 -08:00
+++ b/drivers/block/sx8.c	2005-01-10 20:11:24 -08:00
@@ -1503,7 +1503,7 @@
 		}
 
 		port->disk = disk;
-		sprintf(disk->disk_name, DRV_NAME "%u_%u", host->id, i);
+		sprintf(disk->disk_name, DRV_NAME "/%u", (host->id * CARM_MAX_PORTS) + i);
 		sprintf(disk->devfs_name, DRV_NAME "/%u_%u", host->id, i);
 		disk->major = host->major;
 		disk->first_minor = i * CARM_MINORS_PER_MAJOR;
diff -Nru a/drivers/block/xd.c b/drivers/block/xd.c
--- a/drivers/block/xd.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/block/xd.c	2005-01-10 20:11:21 -08:00
@@ -1054,9 +1054,9 @@
 
 #ifdef MODULE
 
-MODULE_PARM(xd, "1-4i");
-MODULE_PARM(xd_geo, "3-6i");
-MODULE_PARM(nodma, "i");
+module_param_array(xd, int, NULL, 0);
+module_param_array(xd_geo, int, NULL, 0);
+module_param(nodma, bool, 0);
 
 MODULE_LICENSE("GPL");
 
diff -Nru a/drivers/bluetooth/bfusb.c b/drivers/bluetooth/bfusb.c
--- a/drivers/bluetooth/bfusb.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/bluetooth/bfusb.c	2005-01-10 20:11:21 -08:00
@@ -678,7 +678,7 @@
 	bfusb->udev = udev;
 	bfusb->bulk_in_ep    = bulk_in_ep->desc.bEndpointAddress;
 	bfusb->bulk_out_ep   = bulk_out_ep->desc.bEndpointAddress;
-	bfusb->bulk_pkt_size = bulk_out_ep->desc.wMaxPacketSize;
+	bfusb->bulk_pkt_size = le16_to_cpu(bulk_out_ep->desc.wMaxPacketSize);
 
 	rwlock_init(&bfusb->lock);
 
diff -Nru a/drivers/bluetooth/hci_usb.c b/drivers/bluetooth/hci_usb.c
--- a/drivers/bluetooth/hci_usb.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/bluetooth/hci_usb.c	2005-01-10 20:11:22 -08:00
@@ -193,7 +193,7 @@
 
 	BT_DBG("%s", husb->hdev->name);
 
-	size = husb->intr_in_ep->desc.wMaxPacketSize;
+	size = le16_to_cpu(husb->intr_in_ep->desc.wMaxPacketSize);
 
 	buf = kmalloc(size, GFP_ATOMIC);
 	if (!buf)
@@ -268,7 +268,7 @@
 	int err, mtu, size;
 	void *buf;
 
-	mtu  = husb->isoc_in_ep->desc.wMaxPacketSize;
+	mtu  = le16_to_cpu(husb->isoc_in_ep->desc.wMaxPacketSize);
 	size = mtu * HCI_MAX_ISOC_FRAMES;
 
 	buf = kmalloc(size, GFP_ATOMIC);
@@ -525,7 +525,7 @@
 	urb->transfer_buffer = skb->data;
 	urb->transfer_buffer_length = skb->len;
 
-	__fill_isoc_desc(urb, skb->len, husb->isoc_out_ep->desc.wMaxPacketSize);
+	__fill_isoc_desc(urb, skb->len, le16_to_cpu(husb->isoc_out_ep->desc.wMaxPacketSize));
 
 	_urb->priv = skb;
 	return __tx_submit(husb, _urb);
@@ -897,10 +897,10 @@
 
 				switch (ep->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) {
 				case USB_ENDPOINT_XFER_ISOC:
-					if (ep->desc.wMaxPacketSize < size ||
+					if (le16_to_cpu(ep->desc.wMaxPacketSize) < size ||
 							uif->desc.bAlternateSetting != isoc)
 						break;
-					size = ep->desc.wMaxPacketSize;
+					size = le16_to_cpu(ep->desc.wMaxPacketSize);
 
 					isoc_alts = uif->desc.bAlternateSetting;
 
diff -Nru a/drivers/cdrom/aztcd.c b/drivers/cdrom/aztcd.c
--- a/drivers/cdrom/aztcd.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/cdrom/aztcd.c	2005-01-10 20:11:22 -08:00
@@ -288,7 +288,7 @@
 
 static int azt_port = AZT_BASE_ADDR;
 
-MODULE_PARM(azt_port, "i");
+module_param(azt_port, int, 0);
 
 static int azt_port_auto[16] = AZT_BASE_AUTO;
 
diff -Nru a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
--- a/drivers/cdrom/cdrom.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/cdrom/cdrom.c	2005-01-10 20:11:16 -08:00
@@ -505,7 +505,7 @@
  * the first prototypes used 0x2c as the page code for the mrw mode page,
  * subsequently this was changed to 0x03. probe the one used by this drive
  */
-int cdrom_mrw_probe_pc(struct cdrom_device_info *cdi)
+static int cdrom_mrw_probe_pc(struct cdrom_device_info *cdi)
 {
 	struct packet_command cgc;
 	char buffer[16];
@@ -526,7 +526,7 @@
 	return 1;
 }
 
-int cdrom_is_mrw(struct cdrom_device_info *cdi, int *write)
+static int cdrom_is_mrw(struct cdrom_device_info *cdi, int *write)
 {
 	struct packet_command cgc;
 	struct mrw_feature_desc *mfd;
@@ -680,7 +680,7 @@
 	return 0;
 }
 
-int cdrom_get_random_writable(struct cdrom_device_info *cdi,
+static int cdrom_get_random_writable(struct cdrom_device_info *cdi,
 			      struct rwrt_feature_desc *rfd)
 {
 	struct packet_command cgc;
@@ -701,7 +701,7 @@
 	return 0;
 }
 
-int cdrom_has_defect_mgt(struct cdrom_device_info *cdi)
+static int cdrom_has_defect_mgt(struct cdrom_device_info *cdi)
 {
 	struct packet_command cgc;
 	char buffer[16];
@@ -726,7 +726,7 @@
 }
 
 
-int cdrom_is_random_writable(struct cdrom_device_info *cdi, int *write)
+static int cdrom_is_random_writable(struct cdrom_device_info *cdi, int *write)
 {
 	struct rwrt_feature_desc rfd;
 	int ret;
@@ -1076,6 +1076,8 @@
 			}
 			cdinfo(CD_OPEN, "the tray is now closed.\n"); 
 		}
+		/* the door should be closed now, check for the disc */
+		ret = cdo->drive_status(cdi, CDSL_CURRENT);
 		if (ret!=CDS_DISC_OK) {
 			ret = -ENOMEDIUM;
 			goto clean_up_and_return;
@@ -3074,14 +3076,12 @@
 EXPORT_SYMBOL(cdrom_mode_sense);
 EXPORT_SYMBOL(init_cdrom_command);
 EXPORT_SYMBOL(cdrom_get_media_event);
-EXPORT_SYMBOL(cdrom_is_mrw);
-EXPORT_SYMBOL(cdrom_is_random_writable);
 
 #ifdef CONFIG_SYSCTL
 
 #define CDROM_STR_SIZE 1000
 
-struct cdrom_sysctl_settings {
+static struct cdrom_sysctl_settings {
 	char	info[CDROM_STR_SIZE];	/* general info */
 	int	autoclose;		/* close tray upon mount, etc */
 	int	autoeject;		/* eject on umount */
@@ -3090,7 +3090,7 @@
 	int	check;			/* check media type */
 } cdrom_sysctl_settings;
 
-int cdrom_sysctl_info(ctl_table *ctl, int write, struct file * filp,
+static int cdrom_sysctl_info(ctl_table *ctl, int write, struct file * filp,
                            void __user *buffer, size_t *lenp, loff_t *ppos)
 {
         int pos;
@@ -3193,7 +3193,7 @@
    procfs/sysctl yet. When they are, this will naturally disappear. For now
    just update all drives. Later this will become the template on which
    new registered drives will be based. */
-void cdrom_update_settings(void)
+static void cdrom_update_settings(void)
 {
 	struct cdrom_device_info *cdi;
 
@@ -3271,7 +3271,7 @@
 }
 
 /* Place files in /proc/sys/dev/cdrom */
-ctl_table cdrom_table[] = {
+static ctl_table cdrom_table[] = {
 	{
 		.ctl_name	= DEV_CDROM_INFO,
 		.procname	= "info",
@@ -3323,7 +3323,7 @@
 	{ .ctl_name = 0 }
 };
 
-ctl_table cdrom_cdrom_table[] = {
+static ctl_table cdrom_cdrom_table[] = {
 	{
 		.ctl_name	= DEV_CDROM,
 		.procname	= "cdrom",
@@ -3335,7 +3335,7 @@
 };
 
 /* Make sure that /proc/sys/dev is there */
-ctl_table cdrom_root_table[] = {
+static ctl_table cdrom_root_table[] = {
 	{
 		.ctl_name	= CTL_DEV,
 		.procname	= "dev",
diff -Nru a/drivers/cdrom/gscd.c b/drivers/cdrom/gscd.c
--- a/drivers/cdrom/gscd.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/cdrom/gscd.c	2005-01-10 20:11:15 -08:00
@@ -70,7 +70,6 @@
 
 #define MAJOR_NR GOLDSTAR_CDROM_MAJOR
 #include <linux/blkdev.h>
-#define gscd_port gscd		/* for compatible parameter passing with "insmod" */
 #include "gscd.h"
 
 static int gscdPresent = 0;
@@ -78,7 +77,7 @@
 static unsigned char gscd_buf[2048];	/* buffer for block size conversion */
 static int gscd_bn = -1;
 static short gscd_port = GSCD_BASE_ADDR;
-MODULE_PARM(gscd, "h");
+module_param_named(gscd, gscd_port, short, 0);
 
 /* Kommt spaeter vielleicht noch mal dran ...
  *    static DECLARE_WAIT_QUEUE_HEAD(gscd_waitq);
diff -Nru a/drivers/cdrom/isp16.c b/drivers/cdrom/isp16.c
--- a/drivers/cdrom/isp16.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/cdrom/isp16.c	2005-01-10 20:11:22 -08:00
@@ -72,10 +72,10 @@
 static int isp16_cdrom_dma = ISP16_CDROM_DMA;
 static char *isp16_cdrom_type = ISP16_CDROM_TYPE;
 
-MODULE_PARM(isp16_cdrom_base, "i");
-MODULE_PARM(isp16_cdrom_irq, "i");
-MODULE_PARM(isp16_cdrom_dma, "i");
-MODULE_PARM(isp16_cdrom_type, "s");
+module_param(isp16_cdrom_base, int, 0);
+module_param(isp16_cdrom_irq, int, 0);
+module_param(isp16_cdrom_dma, int, 0);
+module_param(isp16_cdrom_type, charp, 0);
 
 #ifdef MODULE
 void isp16_exit(void);
diff -Nru a/drivers/cdrom/mcd.c b/drivers/cdrom/mcd.c
--- a/drivers/cdrom/mcd.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/cdrom/mcd.c	2005-01-10 20:11:20 -08:00
@@ -103,7 +103,6 @@
 #include <asm/uaccess.h>
 #include <linux/blkdev.h>
 
-#define mcd_port mcd		/* for compatible parameter passing with "insmod" */
 #include "mcd.h"
 
 /* I added A flag to drop to 1x speed if too many errors 0 = 1X ; 1 = 2X */
@@ -157,7 +156,6 @@
 
 static short mcd_port = CONFIG_MCD_BASE;	/* used as "mcd" by "insmod" */
 static int mcd_irq = CONFIG_MCD_IRQ;	/* must directly follow mcd_port */
-MODULE_PARM(mcd, "1-2i");
 
 static int McdTimeout, McdTries;
 static DECLARE_WAIT_QUEUE_HEAD(mcd_waitq);
@@ -246,7 +244,6 @@
 
 static struct gendisk *mcd_gendisk;
 
-#ifndef MODULE
 static int __init mcd_setup(char *str)
 {
 	int ints[9];
@@ -265,7 +262,14 @@
 
 __setup("mcd=", mcd_setup);
 
-#endif				/* MODULE */
+#ifdef MODULE
+static int __init param_set_mcd(const char *val, struct kernel_param *kp)
+{
+	mcd_setup(val);
+	return 0;
+}
+module_param_call(mcd, param_set_mcd, NULL, NULL, 0);
+#endif
 
 static int mcd_media_changed(struct cdrom_device_info *cdi, int disc_nr)
 {
diff -Nru a/drivers/cdrom/mcdx.c b/drivers/cdrom/mcdx.c
--- a/drivers/cdrom/mcdx.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/cdrom/mcdx.c	2005-01-10 20:11:18 -08:00
@@ -77,8 +77,6 @@
 #include <linux/blkdev.h>
 #include <linux/devfs_fs_kernel.h>
 
-/* for compatible parameter passing with "insmod" */
-#define	mcdx_drive_map mcdx
 #include "mcdx.h"
 
 #ifndef HZ
@@ -309,7 +307,14 @@
 static struct s_drive_stuff *mcdx_stuffp[MCDX_NDRIVES];
 static spinlock_t mcdx_lock = SPIN_LOCK_UNLOCKED;
 static struct request_queue *mcdx_queue;
-MODULE_PARM(mcdx, "1-4i");
+
+/* You can only set the first two pairs, from old MODULE_PARM code.  */
+static int mcdx_set(const char *val, struct kernel_param *kp)
+{
+	get_options((char *)val, 4, (int *)mcdx_drive_map);
+	return 0;
+}
+module_param_call(mcdx, mcdx_set, NULL, NULL, 0);
 
 static struct cdrom_device_ops mcdx_dops = {
 	.open		= mcdx_open,
diff -Nru a/drivers/cdrom/optcd.c b/drivers/cdrom/optcd.c
--- a/drivers/cdrom/optcd.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/cdrom/optcd.c	2005-01-10 20:11:17 -08:00
@@ -116,7 +116,7 @@
 
 #define optcd_port optcd			/* Needed for the modutils. */
 static short optcd_port = OPTCD_PORTBASE;	/* I/O base of drive. */
-MODULE_PARM(optcd_port, "h");
+module_param(optcd_port, short, 0);
 /* Drive registers, read */
 #define DATA_PORT	optcd_port	/* Read data/status */
 #define STATUS_PORT	optcd_port+1	/* Indicate data/status availability */
diff -Nru a/drivers/cdrom/sjcd.c b/drivers/cdrom/sjcd.c
--- a/drivers/cdrom/sjcd.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/cdrom/sjcd.c	2005-01-10 20:11:20 -08:00
@@ -116,7 +116,7 @@
 
 static int sjcd_base = SJCD_BASE_ADDR;
 
-MODULE_PARM(sjcd_base, "i");
+module_param(sjcd_base, int, 0);
 
 static DECLARE_WAIT_QUEUE_HEAD(sjcd_waitq);
 
diff -Nru a/drivers/cdrom/sonycd535.c b/drivers/cdrom/sonycd535.c
--- a/drivers/cdrom/sonycd535.c	2005-01-10 20:11:24 -08:00
+++ b/drivers/cdrom/sonycd535.c	2005-01-10 20:11:24 -08:00
@@ -210,7 +210,7 @@
 /* The base I/O address of the Sony Interface.  This is a variable (not a
    #define) so it can be easily changed via some future ioctl() */
 static unsigned int sony535_cd_base_io = CDU535_ADDRESS;
-MODULE_PARM(sony535_cd_base_io, "i");
+module_param(sony535_cd_base_io, int, 0);
 
 /*
  * The following are I/O addresses of the various registers for the drive.  The
diff -Nru a/drivers/char/Kconfig b/drivers/char/Kconfig
--- a/drivers/char/Kconfig	2005-01-10 20:11:15 -08:00
+++ b/drivers/char/Kconfig	2005-01-10 20:11:15 -08:00
@@ -203,7 +203,7 @@
 
 config ISI
 	tristate "Multi-Tech multiport card support (EXPERIMENTAL)"
-	depends on SERIAL_NONSTANDARD && PCI && EXPERIMENTAL && BROKEN_ON_SMP && m
+	depends on SERIAL_NONSTANDARD
 	help
 	  This is a driver for the Multi-Tech cards which provide several
 	  serial ports.  The driver is experimental and can currently only be
diff -Nru a/drivers/char/README.cycladesZ b/drivers/char/README.cycladesZ
--- a/drivers/char/README.cycladesZ	2005-01-10 20:11:19 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,8 +0,0 @@
-
-The Cyclades-Z must have firmware loaded onto the card before it will
-operate.  This operation should be performed during system startup,
-
-The firmware, loader program and the latest device driver code are
-available from Cyclades at
-    ftp://ftp.cyclades.com/pub/cyclades/cyclades-z/linux/
-
diff -Nru a/drivers/char/agp/agp.h b/drivers/char/agp/agp.h
--- a/drivers/char/agp/agp.h	2005-01-10 20:11:18 -08:00
+++ b/drivers/char/agp/agp.h	2005-01-10 20:11:18 -08:00
@@ -141,16 +141,6 @@
 	char minor_version;
 };
 
-#define OUTREG64(mmap, addr, val)	__raw_writeq((val), (mmap)+(addr))
-#define OUTREG32(mmap, addr, val)	__raw_writel((val), (mmap)+(addr))
-#define OUTREG16(mmap, addr, val)	__raw_writew((val), (mmap)+(addr))
-#define OUTREG8(mmap, addr, val)	__raw_writeb((val), (mmap)+(addr))
-
-#define INREG64(mmap, addr)		__raw_readq((mmap)+(addr))
-#define INREG32(mmap, addr)		__raw_readl((mmap)+(addr))
-#define INREG16(mmap, addr)		__raw_readw((mmap)+(addr))
-#define INREG8(mmap, addr)		__raw_readb((mmap)+(addr))
-
 #define KB(x)	((x) * 1024)
 #define MB(x)	(KB (KB (x)))
 #define GB(x)	(MB (KB (x)))
diff -Nru a/drivers/char/agp/ali-agp.c b/drivers/char/agp/ali-agp.c
--- a/drivers/char/agp/ali-agp.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/char/agp/ali-agp.c	2005-01-10 20:11:20 -08:00
@@ -277,6 +277,15 @@
 		.device_id	= PCI_DEVICE_ID_AL_M1671,
 		.chipset_name	= "M1671",
 	},
+	{
+		.device_id	= PCI_DEVICE_ID_AL_M1681,
+		.chipset_name	= "M1681",
+	},
+	{
+		.device_id	= PCI_DEVICE_ID_AL_M1683,
+		.chipset_name	= "M1683",
+	},
+
 	{ }, /* dummy final entry, always present */
 };
 
@@ -387,6 +396,8 @@
 
 static int __init agp_ali_init(void)
 {
+	if (agp_off)
+		return -EINVAL;
 	return pci_module_init(&agp_ali_pci_driver);
 }
 
diff -Nru a/drivers/char/agp/alpha-agp.c b/drivers/char/agp/alpha-agp.c
--- a/drivers/char/agp/alpha-agp.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/char/agp/alpha-agp.c	2005-01-10 20:11:20 -08:00
@@ -195,6 +195,8 @@
 
 static int __init agp_alpha_core_init(void)
 {
+	if (agp_off)
+		return -EINVAL;
 	if (alpha_mv.agp_info)
 		return alpha_core_agp_setup();
 	return -ENODEV;
diff -Nru a/drivers/char/agp/amd-k7-agp.c b/drivers/char/agp/amd-k7-agp.c
--- a/drivers/char/agp/amd-k7-agp.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/char/agp/amd-k7-agp.c	2005-01-10 20:11:23 -08:00
@@ -53,8 +53,10 @@
 	}
 	global_cache_flush();
 
-	for (i = 0; i < PAGE_SIZE / sizeof(unsigned long); i++)
+	for (i = 0; i < PAGE_SIZE / sizeof(unsigned long); i++) {
 		writel(agp_bridge->scratch_page, page_map->remapped+i);
+		readl(page_map->remapped+i);	/* PCI Posting. */
+	}
 
 	return 0;
 }
@@ -167,6 +169,7 @@
 	for (i = 0; i < value->num_entries / 1024; i++, addr += 0x00400000) {
 		writel(virt_to_phys(amd_irongate_private.gatt_pages[i]->real) | 1,
 			page_dir.remapped+GET_PAGE_DIR_OFF(addr));
+		readl(page_dir.remapped+GET_PAGE_DIR_OFF(addr));	/* PCI Posting. */
 	}
 
 	return 0;
@@ -220,8 +223,8 @@
 	amd_irongate_private.registers = (volatile u8 __iomem *) ioremap(temp, 4096);
 
 	/* Write out the address of the gatt table */
-	OUTREG32(amd_irongate_private.registers, AMD_ATTBASE,
-		 agp_bridge->gatt_bus_addr);
+	writel(agp_bridge->gatt_bus_addr, amd_irongate_private.registers+AMD_ATTBASE);
+	readl(amd_irongate_private.registers+AMD_ATTBASE);	/* PCI Posting. */
 
 	/* Write the Sync register */
 	pci_write_config_byte(agp_bridge->dev, AMD_MODECNTL, 0x80);
@@ -230,19 +233,19 @@
 	pci_write_config_byte(agp_bridge->dev, AMD_MODECNTL2, 0x00);
 
 	/* Write the enable register */
-	enable_reg = INREG16(amd_irongate_private.registers, AMD_GARTENABLE);
+	enable_reg = readw(amd_irongate_private.registers+AMD_GARTENABLE);
 	enable_reg = (enable_reg | 0x0004);
-	OUTREG16(amd_irongate_private.registers, AMD_GARTENABLE, enable_reg);
+	writew(enable_reg, amd_irongate_private.registers+AMD_GARTENABLE);
+	readw(amd_irongate_private.registers+AMD_GARTENABLE);	/* PCI Posting. */
 
 	/* Write out the size register */
 	pci_read_config_dword(agp_bridge->dev, AMD_APSIZE, &temp);
-	temp = (((temp & ~(0x0000000e)) | current_size->size_value)
-		| 0x00000001);
+	temp = (((temp & ~(0x0000000e)) | current_size->size_value) | 1);
 	pci_write_config_dword(agp_bridge->dev, AMD_APSIZE, temp);
 
 	/* Flush the tlb */
-	OUTREG32(amd_irongate_private.registers, AMD_TLBFLUSH, 0x00000001);
-
+	writel(1, amd_irongate_private.registers+AMD_TLBFLUSH);
+	readl(amd_irongate_private.registers+AMD_TLBFLUSH);	/* PCI Posting.*/
 	return 0;
 }
 
@@ -254,9 +257,10 @@
 
 	previous_size = A_SIZE_LVL2(agp_bridge->previous_size);
 
-	enable_reg = INREG16(amd_irongate_private.registers, AMD_GARTENABLE);
+	enable_reg = readw(amd_irongate_private.registers+AMD_GARTENABLE);
 	enable_reg = (enable_reg & ~(0x0004));
-	OUTREG16(amd_irongate_private.registers, AMD_GARTENABLE, enable_reg);
+	writew(enable_reg, amd_irongate_private.registers+AMD_GARTENABLE);
+	readw(amd_irongate_private.registers+AMD_GARTENABLE);	/* PCI Posting. */
 
 	/* Write back the previous size and disable gart translation */
 	pci_read_config_dword(agp_bridge->dev, AMD_APSIZE, &temp);
@@ -275,7 +279,8 @@
 
 static void amd_irongate_tlbflush(struct agp_memory *temp)
 {
-	OUTREG32(amd_irongate_private.registers, AMD_TLBFLUSH, 0x00000001);
+	writel(1, amd_irongate_private.registers+AMD_TLBFLUSH);
+	readl(amd_irongate_private.registers+AMD_TLBFLUSH);	/* PCI Posting. */
 }
 
 static int amd_insert_memory(struct agp_memory *mem, off_t pg_start, int type)
@@ -310,6 +315,7 @@
 		addr = (j * PAGE_SIZE) + agp_bridge->gart_bus_addr;
 		cur_gatt = GET_GATT(addr);
 		writel(agp_generic_mask_memory(mem->memory[i], mem->type), cur_gatt+GET_GATT_OFF(addr));
+		readl(cur_gatt+GET_GATT_OFF(addr));	/* PCI Posting. */
 	}
 	amd_irongate_tlbflush(mem);
 	return 0;
@@ -328,6 +334,7 @@
 		addr = (i * PAGE_SIZE) + agp_bridge->gart_bus_addr;
 		cur_gatt = GET_GATT(addr);
 		writel(agp_bridge->scratch_page, cur_gatt+GET_GATT_OFF(addr));
+		readl(cur_gatt+GET_GATT_OFF(addr));	/* PCI Posting. */
 	}
 
 	amd_irongate_tlbflush(mem);
@@ -471,6 +478,8 @@
 
 static int __init agp_amdk7_init(void)
 {
+	if (agp_off)
+		return -EINVAL;
 	return pci_module_init(&agp_amdk7_pci_driver);
 }
 
diff -Nru a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c
--- a/drivers/char/agp/amd64-agp.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/char/agp/amd64-agp.c	2005-01-10 20:11:20 -08:00
@@ -46,6 +46,11 @@
 #define NVIDIA_X86_64_1_APBASE2		0xd8
 #define NVIDIA_X86_64_1_APLIMIT2	0xdc
 
+/* ULi K8 registers */
+#define ULI_X86_64_BASE_ADDR		0x10
+#define ULI_X86_64_HTT_FEA_REG		0x50
+#define ULI_X86_64_ENU_SCR_REG		0x54
+
 static int nr_garts;
 static struct pci_dev * hammers[MAX_HAMMER_GARTS];
 
@@ -109,6 +114,7 @@
 		pte |= GPTE_VALID | GPTE_COHERENT;
 
 		writel(pte, agp_bridge->gatt_table+j);
+		readl(agp_bridge->gatt_table+j);	/* PCI Posting. */
 	}
 	amd64_tlbflush(mem);
 	return 0;
@@ -355,7 +361,7 @@
 	int i = 0;
 
 	/* cache pci_devs of northbridges. */
-	while ((loop_dev = pci_find_device(PCI_VENDOR_ID_AMD, 0x1103, loop_dev))
+	while ((loop_dev = pci_get_device(PCI_VENDOR_ID_AMD, 0x1103, loop_dev))
 			!= NULL) {
 		if (i == MAX_HAMMER_GARTS) {
 			printk(KERN_ERR PFX "Too many northbridges for AGP\n");
@@ -405,6 +411,61 @@
 	}
 }
 
+
+static struct aper_size_info_32 uli_sizes[7] =
+{
+	{256, 65536, 6, 10},
+	{128, 32768, 5, 9},
+	{64, 16384, 4, 8},
+	{32, 8192, 3, 7},
+	{16, 4096, 2, 6},
+	{8, 2048, 1, 4},
+	{4, 1024, 0, 3}
+};
+static int __devinit uli_agp_init(struct pci_dev *pdev)
+{
+	u32 httfea,baseaddr,enuscr;
+	struct pci_dev *dev1;
+	int i;
+	unsigned size = amd64_fetch_size();
+	printk(KERN_INFO "Setting up ULi AGP. \n");
+	dev1 = pci_find_slot ((unsigned int)pdev->bus->number,PCI_DEVFN(0,0));
+	if (dev1 == NULL) {
+		printk(KERN_INFO PFX "Detected a ULi chipset, "
+			"but could not fine the secondary device.\n");
+		return -ENODEV;
+	}
+
+	for (i = 0; i < ARRAY_SIZE(uli_sizes); i++)
+		if (uli_sizes[i].size == size)
+			break;
+
+	if (i == ARRAY_SIZE(uli_sizes)) {
+		printk(KERN_INFO PFX "No ULi size found for %d\n", size);
+		return -ENODEV;
+	}
+
+	/* shadow x86-64 registers into ULi registers */
+	pci_read_config_dword (hammers[0], AMD64_GARTAPERTUREBASE, &httfea);
+
+	/* if x86-64 aperture base is beyond 4G, exit here */
+	if ((httfea & 0x7fff) >> (32 - 25))
+		return -ENODEV;
+
+	httfea = (httfea& 0x7fff) << 25;
+
+	pci_read_config_dword(pdev, ULI_X86_64_BASE_ADDR, &baseaddr);
+	baseaddr&= ~PCI_BASE_ADDRESS_MEM_MASK;
+	baseaddr|= httfea;
+	pci_write_config_dword(pdev, ULI_X86_64_BASE_ADDR, baseaddr);
+
+	enuscr= httfea+ (size * 1024 * 1024) - 1;
+	pci_write_config_dword(dev1, ULI_X86_64_HTT_FEA_REG, httfea);
+	pci_write_config_dword(dev1, ULI_X86_64_ENU_SCR_REG, enuscr);
+	return 0;
+}
+
+
 static struct aper_size_info_32 nforce3_sizes[5] =
 {
 	{512,  131072, 7, 0x00000000 },
@@ -513,6 +574,14 @@
 		}
 	}
 
+	if (pdev->vendor == PCI_VENDOR_ID_AL) {
+		int ret = uli_agp_init(pdev);
+		if (ret) {
+			agp_put_bridge(bridge);
+			return ret;
+		}
+	}
+
 	pci_set_drvdata(pdev, bridge);
 	return agp_add_bridge(bridge);
 }
@@ -536,6 +605,15 @@
 	.subvendor	= PCI_ANY_ID,
 	.subdevice	= PCI_ANY_ID,
 	},
+	/* ULi M1689 */
+	{
+	.class		= (PCI_CLASS_BRIDGE_HOST << 8),
+	.class_mask	= ~0,
+	.vendor		= PCI_VENDOR_ID_AL,
+	.device		= PCI_DEVICE_ID_AL_M1689,
+	.subvendor	= PCI_ANY_ID,
+	.subdevice	= PCI_ANY_ID,
+	},
 	/* VIA K8T800Pro */
 	{
 	.class		= (PCI_CLASS_BRIDGE_HOST << 8),
@@ -581,7 +659,6 @@
 	.subvendor	= PCI_ANY_ID,
 	.subdevice	= PCI_ANY_ID,
 	},
-
 	/* NForce3 */
 	{
 	.class		= (PCI_CLASS_BRIDGE_HOST << 8),
@@ -625,6 +702,11 @@
 int __init agp_amd64_init(void)
 {
 	int err = 0;
+	static struct pci_device_id amd64nb[] = {
+		{ PCI_DEVICE(PCI_VENDOR_ID_AMD, 0x1103) },
+		{ },
+	};
+
 	if (agp_off)
 		return -EINVAL;
 	if (pci_module_init(&agp_amd64_pci_driver) > 0) {
@@ -640,13 +722,13 @@
 		}
 
 		/* First check that we have at least one AMD64 NB */
-		if (!pci_find_device(PCI_VENDOR_ID_AMD, 0x1103, NULL))
+		if (!pci_dev_present(amd64nb))
 			return -ENODEV;
 
 		/* Look for any AGP bridge */
 		dev = NULL;
 		err = -ENODEV;
-		while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev))) {
+		for_each_pci_dev(dev) {
 			if (!pci_find_capability(dev, PCI_CAP_ID_AGP))
 				continue;
 			/* Only one bridge supported right now */
@@ -674,5 +756,5 @@
 #endif
 
 MODULE_AUTHOR("Dave Jones <davej@codemonkey.org.uk>, Andi Kleen");
-MODULE_PARM(agp_try_unsupported, "1i");
+module_param(agp_try_unsupported, bool, 0);
 MODULE_LICENSE("GPL");
diff -Nru a/drivers/char/agp/ati-agp.c b/drivers/char/agp/ati-agp.c
--- a/drivers/char/agp/ati-agp.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/char/agp/ati-agp.c	2005-01-10 20:11:21 -08:00
@@ -61,9 +61,6 @@
 
 	SetPageReserved(virt_to_page(page_map->real));
 	err = map_page_into_agp(virt_to_page(page_map->real));
-
-	/* CACHE_FLUSH(); */
-	global_cache_flush();
 	page_map->remapped = ioremap_nocache(virt_to_phys(page_map->real),
 					    PAGE_SIZE);
 	if (page_map->remapped == NULL || err) {
@@ -75,8 +72,10 @@
 	/*CACHE_FLUSH();*/
 	global_cache_flush();
 
-	for(i = 0; i < PAGE_SIZE / sizeof(unsigned long); i++)
+	for(i = 0; i < PAGE_SIZE / sizeof(unsigned long); i++) {
 		writel(agp_bridge->scratch_page, page_map->remapped+i);
+		readl(page_map->remapped+i);	/* PCI Posting. */
+	}
 
 	return 0;
 }
@@ -186,7 +185,8 @@
 
 static void ati_tlbflush(struct agp_memory * mem)
 {
-	OUTREG32(ati_generic_private.registers, ATI_GART_CACHE_CNTRL, 1);
+	writel(1, ati_generic_private.registers+ATI_GART_CACHE_CNTRL);
+	readl(ati_generic_private.registers+ATI_GART_CACHE_CNTRL);	/* PCI Posting. */
 }
 
 static void ati_cleanup(void)
@@ -230,15 +230,16 @@
 	agp_bridge.gart_bus_addr = (temp & PCI_BASE_ADDRESS_MEM_MASK);
 	printk(KERN_INFO PFX "IGP320 gart_bus_addr: %x\n", agp_bridge.gart_bus_addr);
         */
-	OUTREG32(ati_generic_private.registers, ATI_GART_FEATURE_ID, 0x60000);
+	writel(0x60000, ati_generic_private.registers+ATI_GART_FEATURE_ID);
+	readl(ati_generic_private.registers+ATI_GART_FEATURE_ID);	/* PCI Posting.*/
 
 	/* SIGNALED_SYSTEM_ERROR @ NB_STATUS */
 	pci_read_config_dword(agp_bridge->dev, 4, &temp);
 	pci_write_config_dword(agp_bridge->dev, 4, temp | (1<<14));
 
 	/* Write out the address of the gatt table */
-	OUTREG32(ati_generic_private.registers, ATI_GART_BASE,
-		 agp_bridge->gatt_bus_addr);
+	writel(agp_bridge->gatt_bus_addr, ati_generic_private.registers+ATI_GART_BASE);
+	readl(ati_generic_private.registers+ATI_GART_BASE);	/* PCI Posting. */
 
 	return 0;
 }
@@ -291,6 +292,7 @@
 		addr = (j * PAGE_SIZE) + agp_bridge->gart_bus_addr;
 		cur_gatt = GET_GATT(addr);
 		writel(agp_bridge->driver->mask_memory(mem->memory[i], mem->type), cur_gatt+GET_GATT_OFF(addr));
+		readl(cur_gatt+GET_GATT_OFF(addr));	/* PCI Posting. */
 	}
 	agp_bridge->driver->tlb_flush(mem);
 	return 0;
@@ -310,6 +312,7 @@
 		addr = (i * PAGE_SIZE) + agp_bridge->gart_bus_addr;
 		cur_gatt = GET_GATT(addr);
 		writel(agp_bridge->scratch_page, cur_gatt+GET_GATT_OFF(addr));
+		readl(cur_gatt+GET_GATT_OFF(addr)); /* PCI Posting. */
 	}
 
 	agp_bridge->driver->tlb_flush(mem);
@@ -371,6 +374,7 @@
 	for(i = 0; i < value->num_entries / 1024; i++, addr += 0x00400000) {
 		writel(virt_to_bus(ati_generic_private.gatt_pages[i]->real) | 1,
 			page_dir.remapped+GET_PAGE_DIR_OFF(addr));
+		readl(page_dir.remapped+GET_PAGE_DIR_OFF(addr));	/* PCI Posting. */
 	}
 
 	return 0;
@@ -525,6 +529,8 @@
 
 static int __init agp_ati_init(void)
 {
+	if (agp_off)
+		return -EINVAL;
 	return pci_module_init(&agp_ati_pci_driver);
 }
 
diff -Nru a/drivers/char/agp/efficeon-agp.c b/drivers/char/agp/efficeon-agp.c
--- a/drivers/char/agp/efficeon-agp.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/char/agp/efficeon-agp.c	2005-01-10 20:11:15 -08:00
@@ -375,7 +375,7 @@
 	if (!r->start && r->end) {
 		if(pci_assign_resource(pdev, 0)) {
 			printk(KERN_ERR PFX "could not assign resource 0\n");
-			return (-ENODEV);
+			return -ENODEV;
 		}
 	}
 
@@ -386,7 +386,7 @@
 	*/
 	if (pci_enable_device(pdev)) {
 		printk(KERN_ERR PFX "Unable to Enable PCI device\n");
-		return (-ENODEV);
+		return -ENODEV;
 	}
 
 	/* Fill in the mode register */
@@ -440,6 +440,9 @@
 static int __init agp_efficeon_init(void)
 {
 	static int agp_initialised=0;
+
+	if (agp_off)
+		return -EINVAL;
 
 	if (agp_initialised == 1)
 		return 0;
diff -Nru a/drivers/char/agp/generic.c b/drivers/char/agp/generic.c
--- a/drivers/char/agp/generic.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/char/agp/generic.c	2005-01-10 20:11:18 -08:00
@@ -35,7 +35,10 @@
 #include <linux/pm.h>
 #include <linux/agp_backend.h>
 #include <linux/vmalloc.h>
+#include <linux/mm.h>
 #include <asm/io.h>
+#include <asm/cacheflush.h>
+#include <asm/pgtable.h>
 #include "agp.h"
 
 __u32 *agp_gatt_table;
@@ -47,6 +50,26 @@
  */
 EXPORT_SYMBOL_GPL(agp_memory_reserved);
 
+#if defined(CONFIG_X86)
+int map_page_into_agp(struct page *page)
+{
+	int i;
+	i = change_page_attr(page, 1, PAGE_KERNEL_NOCACHE);
+	global_flush_tlb();
+	return i;
+}
+EXPORT_SYMBOL_GPL(map_page_into_agp);
+
+int unmap_page_from_agp(struct page *page)
+{
+	int i;
+	i = change_page_attr(page, 1, PAGE_KERNEL);
+	global_flush_tlb();
+	return i;
+}
+EXPORT_SYMBOL_GPL(unmap_page_from_agp);
+#endif
+
 /*
  * Generic routines for handling agp_memory structures -
  * They use the basic page allocation routines to do the brunt of the work.
@@ -181,8 +204,7 @@
 			agp_free_memory(new);
 			return NULL;
 		}
-		new->memory[i] =
-			agp_bridge->driver->mask_memory(virt_to_phys(addr), type);
+		new->memory[i] = virt_to_phys(addr);
 		new->page_count++;
 	}
 
@@ -507,7 +529,7 @@
 	u32 tmp;
 	u32 agp3;
 
-	while ((device = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, device)) != NULL) {
+	for_each_pci_dev(device) {
 		cap_ptr = pci_find_capability(device, PCI_CAP_ID_AGP);
 		if (!cap_ptr)
 			continue;
@@ -551,7 +573,7 @@
 	if (agp_v3)
 		mode *= 4;
 
-	while ((device = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, device)) != NULL) {
+	for_each_pci_dev(device) {
 		u8 agp = pci_find_capability(device, PCI_CAP_ID_AGP);
 		if (!agp)
 			continue;
@@ -737,8 +759,10 @@
 	agp_bridge->gatt_bus_addr = virt_to_phys(agp_bridge->gatt_table_real);
 
 	/* AK: bogus, should encode addresses > 4GB */
-	for (i = 0; i < num_entries; i++)
+	for (i = 0; i < num_entries; i++) {
 		writel(agp_bridge->scratch_page, agp_bridge->gatt_table+i);
+		readl(agp_bridge->gatt_table+i);	/* PCI Posting. */
+	}
 
 	return 0;
 }
@@ -854,8 +878,10 @@
 		mem->is_flushed = TRUE;
 	}
 
-	for (i = 0, j = pg_start; i < mem->page_count; i++, j++)
+	for (i = 0, j = pg_start; i < mem->page_count; i++, j++) {
 		writel(agp_bridge->driver->mask_memory(mem->memory[i], mem->type), agp_bridge->gatt_table+j);
+		readl(agp_bridge->gatt_table+j);	/* PCI Posting. */
+	}
 
 	agp_bridge->driver->tlb_flush(mem);
 	return 0;
@@ -873,9 +899,12 @@
 	}
 
 	/* AK: bogus, should encode addresses > 4GB */
-	for (i = pg_start; i < (mem->page_count + pg_start); i++)
+	for (i = pg_start; i < (mem->page_count + pg_start); i++) {
 		writel(agp_bridge->scratch_page, agp_bridge->gatt_table+i);
+		readl(agp_bridge->gatt_table+i);	/* PCI Posting. */
+	}
 
+	global_cache_flush();
 	agp_bridge->driver->tlb_flush(mem);
 	return 0;
 }
@@ -958,21 +987,15 @@
 EXPORT_SYMBOL(agp_enable);
 
 
-#ifdef CONFIG_SMP
 static void ipi_handler(void *null)
 {
 	flush_agp_cache();
 }
-#endif
 
 void global_cache_flush(void)
 {
-#ifdef CONFIG_SMP
 	if (on_each_cpu(ipi_handler, NULL, 1, 1) != 0)
 		panic(PFX "timed out waiting for the other CPUs!\n");
-#else
-	flush_agp_cache();
-#endif
 }
 EXPORT_SYMBOL(global_cache_flush);
 
diff -Nru a/drivers/char/agp/hp-agp.c b/drivers/char/agp/hp-agp.c
--- a/drivers/char/agp/hp-agp.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/char/agp/hp-agp.c	2005-01-10 20:11:21 -08:00
@@ -88,7 +88,7 @@
 	 * 	- IOVA space is 1Gb in size
 	 * 	- first 512Mb is IOMMU, second 512Mb is GART
 	 */
-	hp->io_tlb_ps = INREG64(hp->ioc_regs, HP_ZX1_TCNFG);
+	hp->io_tlb_ps = readq(hp->ioc_regs+HP_ZX1_TCNFG);
 	switch (hp->io_tlb_ps) {
 		case 0: hp->io_tlb_shift = 12; break;
 		case 1: hp->io_tlb_shift = 13; break;
@@ -104,13 +104,13 @@
 	hp->io_page_size = 1 << hp->io_tlb_shift;
 	hp->io_pages_per_kpage = PAGE_SIZE / hp->io_page_size;
 
-	hp->iova_base = INREG64(hp->ioc_regs, HP_ZX1_IBASE) & ~0x1;
+	hp->iova_base = readq(hp->ioc_regs+HP_ZX1_IBASE) & ~0x1;
 	hp->gart_base = hp->iova_base + HP_ZX1_IOVA_SIZE - HP_ZX1_GART_SIZE;
 
 	hp->gart_size = HP_ZX1_GART_SIZE;
 	hp->gatt_entries = hp->gart_size / hp->io_page_size;
 
-	hp->io_pdir = phys_to_virt(INREG64(hp->ioc_regs, HP_ZX1_PDIR_BASE));
+	hp->io_pdir = phys_to_virt(readq(hp->ioc_regs+HP_ZX1_PDIR_BASE));
 	hp->gatt = &hp->io_pdir[HP_ZX1_IOVA_TO_PDIR(hp->gart_base)];
 
 	if (hp->gatt[0] != HP_ZX1_SBA_IOMMU_COOKIE) {
@@ -174,7 +174,7 @@
 	 * If the IOTLB is currently disabled, we can take it over.
 	 * Otherwise, we have to share with sba_iommu.
 	 */
-	hp->io_pdir_owner = (INREG64(hp->ioc_regs, HP_ZX1_IBASE) & 0x1) == 0;
+	hp->io_pdir_owner = (readq(hp->ioc_regs+HP_ZX1_IBASE) & 0x1) == 0;
 
 	if (hp->io_pdir_owner)
 		return hp_zx1_ioc_owner();
@@ -189,18 +189,18 @@
 	u8 pos, id;
 	int ttl = 48;
 
-	status = INREG16(hpa, PCI_STATUS);
+	status = readw(hpa+PCI_STATUS);
 	if (!(status & PCI_STATUS_CAP_LIST))
 		return 0;
-	pos = INREG8(hpa, PCI_CAPABILITY_LIST);
+	pos = readb(hpa+PCI_CAPABILITY_LIST);
 	while (ttl-- && pos >= 0x40) {
 		pos &= ~3;
-		id = INREG8(hpa, pos + PCI_CAP_LIST_ID);
+		id = readb(hpa+pos+PCI_CAP_LIST_ID);
 		if (id == 0xff)
 			break;
 		if (id == cap)
 			return pos;
-		pos = INREG8(hpa, pos + PCI_CAP_LIST_NEXT);
+		pos = readb(hpa+pos+PCI_CAP_LIST_NEXT);
 	}
 	return 0;
 }
@@ -217,7 +217,7 @@
 
 	hp->lba_cap_offset = hp_zx1_lba_find_capability(hp->lba_regs, PCI_CAP_ID_AGP);
 
-	cap = INREG32(hp->lba_regs, hp->lba_cap_offset) & 0xff;
+	cap = readl(hp->lba_regs+hp->lba_cap_offset) & 0xff;
 	if (cap != PCI_CAP_ID_AGP) {
 		printk(KERN_ERR PFX "Invalid capability ID 0x%02x at 0x%x\n",
 		       cap, hp->lba_cap_offset);
@@ -245,15 +245,19 @@
 
 	agp_bridge->gart_bus_addr = hp->gart_base;
 	agp_bridge->capndx = hp->lba_cap_offset;
-	agp_bridge->mode = INREG32(hp->lba_regs, hp->lba_cap_offset + PCI_AGP_STATUS);
+	agp_bridge->mode = readl(hp->lba_regs+hp->lba_cap_offset+PCI_AGP_STATUS);
 
 	if (hp->io_pdir_owner) {
-		OUTREG64(hp->ioc_regs, HP_ZX1_PDIR_BASE, virt_to_phys(hp->io_pdir));
-		OUTREG64(hp->ioc_regs, HP_ZX1_TCNFG, hp->io_tlb_ps);
-		OUTREG64(hp->ioc_regs, HP_ZX1_IMASK, ~(HP_ZX1_IOVA_SIZE - 1));
-		OUTREG64(hp->ioc_regs, HP_ZX1_IBASE, hp->iova_base | 0x1);
-		OUTREG64(hp->ioc_regs, HP_ZX1_PCOM, hp->iova_base | log2(HP_ZX1_IOVA_SIZE));
-		INREG64(hp->ioc_regs, HP_ZX1_PCOM);
+		writel(virt_to_phys(hp->io_pdir), hp->ioc_regs+HP_ZX1_PDIR_BASE);
+		readl(hp->ioc_regs+HP_ZX1_PDIR_BASE);
+		writel(hp->io_tlb_ps, hp->ioc_regs+HP_ZX1_TCNFG);
+		readl(hp->ioc_regs+HP_ZX1_TCNFG);
+		writel(~(HP_ZX1_IOVA_SIZE-1), hp->ioc_regs+HP_ZX1_IMASK);
+		readl(hp->ioc_regs+HP_ZX1_IMASK);
+		writel(hp->iova_base|1, hp->ioc_regs+HP_ZX1_IBASE);
+		readl(hp->ioc_regs+HP_ZX1_IBASE);
+		writel(hp->iova_base|log2(HP_ZX1_IOVA_SIZE), hp->ioc_regs+HP_ZX1_PCOM);
+		readl(hp->ioc_regs+HP_ZX1_PCOM);
 	}
 
 	return 0;
@@ -265,8 +269,10 @@
 	struct _hp_private *hp = &hp_private;
 
 	if (hp->ioc_regs) {
-		if (hp->io_pdir_owner)
-			OUTREG64(hp->ioc_regs, HP_ZX1_IBASE, 0);
+		if (hp->io_pdir_owner) {
+			writeq(0, hp->ioc_regs+HP_ZX1_IBASE);
+			readq(hp->ioc_regs+HP_ZX1_IBASE);
+		}
 		iounmap(hp->ioc_regs);
 	}
 	if (hp->lba_regs)
@@ -278,8 +284,8 @@
 {
 	struct _hp_private *hp = &hp_private;
 
-	OUTREG64(hp->ioc_regs, HP_ZX1_PCOM, hp->gart_base | log2(hp->gart_size));
-	INREG64(hp->ioc_regs, HP_ZX1_PCOM);
+	writeq(hp->gart_base | log2(hp->gart_size), hp->ioc_regs+HP_ZX1_PCOM);
+	readq(hp->ioc_regs+HP_ZX1_PCOM);
 }
 
 static int
@@ -401,12 +407,11 @@
 	struct _hp_private *hp = &hp_private;
 	u32 command;
 
-	command = INREG32(hp->lba_regs, hp->lba_cap_offset + PCI_AGP_STATUS);
-
+	command = readl(hp->lba_regs+hp->lba_cap_offset+PCI_AGP_STATUS);
 	command = agp_collect_device_status(mode, command);
 	command |= 0x00000100;
 
-	OUTREG32(hp->lba_regs, hp->lba_cap_offset + PCI_AGP_COMMAND, command);
+	writel(command, hp->lba_regs+hp->lba_cap_offset+PCI_AGP_COMMAND);
 
 	agp_device_command(command, (mode & AGP8X_MODE) != 0);
 }
@@ -519,6 +524,8 @@
 static int __init
 agp_hp_init (void)
 {
+	if (agp_off)
+		return -EINVAL;
 
 	acpi_get_devices("HWP0003", zx1_gart_probe, "HWP0003", NULL);
 	if (hp_zx1_gart_found)
diff -Nru a/drivers/char/agp/i460-agp.c b/drivers/char/agp/i460-agp.c
--- a/drivers/char/agp/i460-agp.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/char/agp/i460-agp.c	2005-01-10 20:11:20 -08:00
@@ -532,8 +532,8 @@
 static unsigned long i460_mask_memory (unsigned long addr, int type)
 {
 	/* Make sure the returned address is a valid GATT entry */
-	return (agp_bridge->driver->masks[0].mask
-		| (((addr & ~((1 << I460_IO_PAGE_SHIFT) - 1)) & 0xffffff000) >> 12));
+	return agp_bridge->driver->masks[0].mask
+		| (((addr & ~((1 << I460_IO_PAGE_SHIFT) - 1)) & 0xffffff000) >> 12);
 }
 
 struct agp_bridge_driver intel_i460_driver = {
@@ -585,6 +585,8 @@
 	bridge->dev = pdev;
 	bridge->capndx = cap_ptr;
 
+	printk(KERN_INFO PFX "Detected Intel 460GX chipset\n");
+
 	pci_set_drvdata(pdev, bridge);
 	return agp_add_bridge(bridge);
 }
@@ -620,6 +622,8 @@
 
 static int __init agp_intel_i460_init(void)
 {
+	if (agp_off)
+		return -EINVAL;
 	return pci_module_init(&agp_intel_i460_pci_driver);
 }
 
diff -Nru a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c
--- a/drivers/char/agp/intel-agp.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/char/agp/intel-agp.c	2005-01-10 20:11:19 -08:00
@@ -117,7 +117,7 @@
 		return -ENOMEM;
 	}
 
-	if ((INREG32(intel_i810_private.registers, I810_DRAM_CTL)
+	if ((readl(intel_i810_private.registers+I810_DRAM_CTL)
 		& I810_DRAM_ROW_0) == I810_DRAM_ROW_0_SDRAM) {
 		/* This will need to be dynamically assigned */
 		printk(KERN_INFO PFX "detected 4MB dedicated video ram.\n");
@@ -125,23 +125,23 @@
 	}
 	pci_read_config_dword(intel_i810_private.i810_dev, I810_GMADDR, &temp);
 	agp_bridge->gart_bus_addr = (temp & PCI_BASE_ADDRESS_MEM_MASK);
-	OUTREG32(intel_i810_private.registers, I810_PGETBL_CTL,
-		 agp_bridge->gatt_bus_addr | I810_PGETBL_ENABLED);
-	global_cache_flush();
+	writel(agp_bridge->gatt_bus_addr | I810_PGETBL_ENABLED, intel_i810_private.registers+I810_PGETBL_CTL);
+	readl(intel_i810_private.registers+I810_PGETBL_CTL);	/* PCI Posting. */
 
 	if (agp_bridge->driver->needs_scratch_page) {
 		for (i = 0; i < current_size->num_entries; i++) {
-			OUTREG32(intel_i810_private.registers,
-				 I810_PTE_BASE + (i * 4),
-				 agp_bridge->scratch_page);
+			writel(agp_bridge->scratch_page, intel_i810_private.registers+I810_PTE_BASE+(i*4));
+			readl(intel_i810_private.registers+I810_PTE_BASE+(i*4));	/* PCI posting. */
 		}
 	}
+	global_cache_flush();
 	return 0;
 }
 
 static void intel_i810_cleanup(void)
 {
-	OUTREG32(intel_i810_private.registers, I810_PGETBL_CTL, 0);
+	writel(0, intel_i810_private.registers+I810_PGETBL_CTL);
+	readl(intel_i810_private.registers);	/* PCI Posting. */
 	iounmap(intel_i810_private.registers);
 }
 
@@ -161,13 +161,15 @@
 	struct page * page;
 
 	page = alloc_pages(GFP_KERNEL, 2);
-	if (page == NULL) {
+	if (page == NULL)
 		return NULL;
-	}
+
 	if (change_page_attr(page, 4, PAGE_KERNEL_NOCACHE) < 0) {
+		global_flush_tlb();
 		__free_page(page);
 		return NULL;
 	}
+	global_flush_tlb();
 	get_page(page);
 	SetPageLocked(page);
 	atomic_inc(&agp_bridge->current_memory_agp);
@@ -183,6 +185,7 @@
 
 	page = virt_to_page(addr);
 	change_page_attr(page, 4, PAGE_KERNEL);
+	global_flush_tlb();
 	put_page(page);
 	unlock_page(page);
 	free_pages((unsigned long)addr, 2);
@@ -211,10 +214,8 @@
 			/* special insert */
 			global_cache_flush();
 			for (i = pg_start; i < (pg_start + mem->page_count); i++) {
-				OUTREG32(intel_i810_private.registers,
-					 I810_PTE_BASE + (i * 4),
-					 (i * 4096) | I810_PTE_LOCAL |
-					 I810_PTE_VALID);
+				writel((i*4096)|I810_PTE_LOCAL|I810_PTE_VALID, intel_i810_private.registers+I810_PTE_BASE+(i*4));
+				readl(intel_i810_private.registers+I810_PTE_BASE+(i*4));	/* PCI Posting. */
 			}
 			global_cache_flush();
 			agp_bridge->driver->tlb_flush(mem);
@@ -228,9 +229,9 @@
 insert:
 	global_cache_flush();
 	for (i = 0, j = pg_start; i < mem->page_count; i++, j++) {
-		OUTREG32(intel_i810_private.registers,
-			I810_PTE_BASE + (j * 4),
-			agp_bridge->driver->mask_memory(mem->memory[i], mem->type));
+		writel(agp_bridge->driver->mask_memory(mem->memory[i], mem->type),
+				intel_i810_private.registers+I810_PTE_BASE+(j*4));
+		readl(intel_i810_private.registers+I810_PTE_BASE+(j*4));	/* PCI Posting. */
 	}
 	global_cache_flush();
 
@@ -244,9 +245,8 @@
 	int i;
 
 	for (i = pg_start; i < (mem->page_count + pg_start); i++) {
-		OUTREG32(intel_i810_private.registers,
-			 I810_PTE_BASE + (i * 4),
-			 agp_bridge->scratch_page);
+		writel(agp_bridge->scratch_page, intel_i810_private.registers+I810_PTE_BASE+(i*4));
+		readl(intel_i810_private.registers+I810_PTE_BASE+(i*4));	/* PCI Posting. */
 	}
 
 	global_cache_flush();
@@ -318,7 +318,7 @@
 		return new;
 	}
 	if (type == AGP_PHYS_MEMORY)
-		return(alloc_agpphysmem_i8xx(pg_count, type));
+		return alloc_agpphysmem_i8xx(pg_count, type);
 
 	return NULL;
 }
@@ -387,8 +387,7 @@
 			gtt_entries = MB(8) - KB(size);
 			break;
 		case I830_GMCH_GMS_LOCAL:
-			rdct = INREG8(intel_i830_private.registers,
-				      I830_RDRAM_CHANNEL_TYPE);
+			rdct = readb(intel_i830_private.registers+I830_RDRAM_CHANNEL_TYPE);
 			gtt_entries = (I830_RDRAM_ND(rdct) + 1) *
 					MB(ddt[I830_RDRAM_DDT(rdct)]);
 			local = 1;
@@ -463,10 +462,10 @@
 
 	intel_i830_private.registers = ioremap(temp,128 * 4096);
 	if (!intel_i830_private.registers)
-		return (-ENOMEM);
+		return -ENOMEM;
 
-	temp = INREG32(intel_i830_private.registers,I810_PGETBL_CTL) & 0xfffff000;
-	global_cache_flush();
+	temp = readl(intel_i830_private.registers+I810_PGETBL_CTL) & 0xfffff000;
+	global_cache_flush();	/* FIXME: ?? */
 
 	/* we have to call this as early as possible after the MMIO base address is known */
 	intel_i830_init_gtt_entries();
@@ -475,7 +474,7 @@
 
 	agp_bridge->gatt_bus_addr = temp;
 
-	return(0);
+	return 0;
 }
 
 /* Return the gatt table to a sane state. Use the top of stolen
@@ -483,7 +482,7 @@
  */
 static int intel_i830_free_gatt_table(void)
 {
-	return(0);
+	return 0;
 }
 
 static int intel_i830_fetch_size(void)
@@ -498,7 +497,7 @@
 		/* 855GM/852GM/865G has 128MB aperture size */
 		agp_bridge->previous_size = agp_bridge->current_size = (void *) values;
 		agp_bridge->aperture_size_idx = 0;
-		return(values[0].size);
+		return values[0].size;
 	}
 
 	pci_read_config_word(agp_bridge->dev,I830_GMCH_CTRL,&gmch_ctrl);
@@ -506,14 +505,14 @@
 	if ((gmch_ctrl & I830_GMCH_MEM_MASK) == I830_GMCH_MEM_128M) {
 		agp_bridge->previous_size = agp_bridge->current_size = (void *) values;
 		agp_bridge->aperture_size_idx = 0;
-		return(values[0].size);
+		return values[0].size;
 	} else {
 		agp_bridge->previous_size = agp_bridge->current_size = (void *) (values + 1);
 		agp_bridge->aperture_size_idx = 1;
-		return(values[1].size);
+		return values[1].size;
 	}
 
-	return(0);
+	return 0;
 }
 
 static int intel_i830_configure(void)
@@ -532,14 +531,18 @@
 	gmch_ctrl |= I830_GMCH_ENABLED;
 	pci_write_config_word(agp_bridge->dev,I830_GMCH_CTRL,gmch_ctrl);
 
-	OUTREG32(intel_i830_private.registers,I810_PGETBL_CTL,agp_bridge->gatt_bus_addr | I810_PGETBL_ENABLED);
-	global_cache_flush();
+	writel(agp_bridge->gatt_bus_addr|I810_PGETBL_ENABLED, intel_i830_private.registers+I810_PGETBL_CTL);
+	readl(intel_i830_private.registers+I810_PGETBL_CTL);	/* PCI Posting. */
 
-	if (agp_bridge->driver->needs_scratch_page)
-		for (i = intel_i830_private.gtt_entries; i < current_size->num_entries; i++)
-			OUTREG32(intel_i830_private.registers,I810_PTE_BASE + (i * 4),agp_bridge->scratch_page);
+	if (agp_bridge->driver->needs_scratch_page) {
+		for (i = intel_i830_private.gtt_entries; i < current_size->num_entries; i++) {
+			writel(agp_bridge->scratch_page, intel_i830_private.registers+I810_PTE_BASE+(i*4));
+			readl(intel_i830_private.registers+I810_PTE_BASE+(i*4));	/* PCI Posting. */
+		}
+	}
 
-	return (0);
+	global_cache_flush();
+	return 0;
 }
 
 static void intel_i830_cleanup(void)
@@ -547,8 +550,7 @@
 	iounmap(intel_i830_private.registers);
 }
 
-static int intel_i830_insert_entries(struct agp_memory *mem,off_t pg_start,
-				int type)
+static int intel_i830_insert_entries(struct agp_memory *mem,off_t pg_start, int type)
 {
 	int i,j,num_entries;
 	void *temp;
@@ -561,11 +563,11 @@
 				pg_start,intel_i830_private.gtt_entries);
 
 		printk (KERN_INFO PFX "Trying to insert into local/stolen memory\n");
-		return (-EINVAL);
+		return -EINVAL;
 	}
 
 	if ((pg_start + mem->page_count) > num_entries)
-		return (-EINVAL);
+		return -EINVAL;
 
 	/* The i830 can't check the GTT for entries since its read only,
 	 * depend on the caller to make the correct offset decisions.
@@ -573,19 +575,19 @@
 
 	if ((type != 0 && type != AGP_PHYS_MEMORY) ||
 		(mem->type != 0 && mem->type != AGP_PHYS_MEMORY))
-		return (-EINVAL);
+		return -EINVAL;
 
-	global_cache_flush();
+	global_cache_flush();	/* FIXME: Necessary ?*/
 
-	for (i = 0, j = pg_start; i < mem->page_count; i++, j++)
-		OUTREG32(intel_i830_private.registers,I810_PTE_BASE + (j * 4),
-			agp_bridge->driver->mask_memory(mem->memory[i], mem->type));
+	for (i = 0, j = pg_start; i < mem->page_count; i++, j++) {
+		writel(agp_bridge->driver->mask_memory(mem->memory[i], mem->type),
+				intel_i830_private.registers+I810_PTE_BASE+(j*4));
+		readl(intel_i830_private.registers+I810_PTE_BASE+(j*4));	/* PCI Posting. */
+	}
 
 	global_cache_flush();
-
 	agp_bridge->driver->tlb_flush(mem);
-
-	return(0);
+	return 0;
 }
 
 static int intel_i830_remove_entries(struct agp_memory *mem,off_t pg_start,
@@ -597,26 +599,26 @@
 
 	if (pg_start < intel_i830_private.gtt_entries) {
 		printk (KERN_INFO PFX "Trying to disable local/stolen memory\n");
-		return (-EINVAL);
+		return -EINVAL;
 	}
 
-	for (i = pg_start; i < (mem->page_count + pg_start); i++)
-		OUTREG32(intel_i830_private.registers,I810_PTE_BASE + (i * 4),agp_bridge->scratch_page);
+	for (i = pg_start; i < (mem->page_count + pg_start); i++) {
+		writel(agp_bridge->scratch_page, intel_i830_private.registers+I810_PTE_BASE+(i*4));
+		readl(intel_i830_private.registers+I810_PTE_BASE+(i*4));	/* PCI Posting. */
+	}
 
 	global_cache_flush();
-
 	agp_bridge->driver->tlb_flush(mem);
-
-	return (0);
+	return 0;
 }
 
 static struct agp_memory *intel_i830_alloc_by_type(size_t pg_count,int type)
 {
 	if (type == AGP_PHYS_MEMORY)
-		return(alloc_agpphysmem_i8xx(pg_count, type));
+		return alloc_agpphysmem_i8xx(pg_count, type);
 
 	/* always return NULL for other allocation types for now */
-	return(NULL);
+	return NULL;
 }
 
 static int intel_i915_configure(void)
@@ -636,15 +638,18 @@
 	gmch_ctrl |= I830_GMCH_ENABLED;
 	pci_write_config_word(agp_bridge->dev,I830_GMCH_CTRL,gmch_ctrl);
 
-	OUTREG32(intel_i830_private.registers,I810_PGETBL_CTL,agp_bridge->gatt_bus_addr | I810_PGETBL_ENABLED);
-	global_cache_flush();
+	writel(agp_bridge->gatt_bus_addr|I810_PGETBL_ENABLED, intel_i830_private.registers+I810_PGETBL_CTL);
+	readl(intel_i830_private.registers+I810_PGETBL_CTL);	/* PCI Posting. */
 
 	if (agp_bridge->driver->needs_scratch_page) {
-		for (i = intel_i830_private.gtt_entries; i < current_size->num_entries; i++)
-			OUTREG32(intel_i830_private.gtt, i, agp_bridge->scratch_page);
+		for (i = intel_i830_private.gtt_entries; i < current_size->num_entries; i++) {
+			writel(agp_bridge->scratch_page, intel_i830_private.gtt+i);
+			readl(intel_i830_private.gtt+i);	/* PCI Posting. */
+		}
 	}
 
-	return (0);
+	global_cache_flush();
+	return 0;
 }
 
 static void intel_i915_cleanup(void)
@@ -667,11 +672,11 @@
 				pg_start,intel_i830_private.gtt_entries);
 
 		printk (KERN_INFO PFX "Trying to insert into local/stolen memory\n");
-		return (-EINVAL);
+		return -EINVAL;
 	}
 
 	if ((pg_start + mem->page_count) > num_entries)
-		return (-EINVAL);
+		return -EINVAL;
 
 	/* The i830 can't check the GTT for entries since its read only,
 	 * depend on the caller to make the correct offset decisions.
@@ -679,18 +684,18 @@
 
 	if ((type != 0 && type != AGP_PHYS_MEMORY) ||
 		(mem->type != 0 && mem->type != AGP_PHYS_MEMORY))
-		return (-EINVAL);
+		return -EINVAL;
 
 	global_cache_flush();
 
-	for (i = 0, j = pg_start; i < mem->page_count; i++, j++)
-		OUTREG32(intel_i830_private.gtt, j, agp_bridge->driver->mask_memory(mem->memory[i], mem->type));
+	for (i = 0, j = pg_start; i < mem->page_count; i++, j++) {
+		writel(agp_bridge->driver->mask_memory(mem->memory[i], mem->type), intel_i830_private.gtt+j);
+		readl(intel_i830_private.gtt+j);	/* PCI Posting. */
+	}
 
 	global_cache_flush();
-
 	agp_bridge->driver->tlb_flush(mem);
-
-	return(0);
+	return 0;
 }
 
 static int intel_i915_remove_entries(struct agp_memory *mem,off_t pg_start,
@@ -702,17 +707,17 @@
 
 	if (pg_start < intel_i830_private.gtt_entries) {
 		printk (KERN_INFO PFX "Trying to disable local/stolen memory\n");
-		return (-EINVAL);
+		return -EINVAL;
 	}
 
-	for (i = pg_start; i < (mem->page_count + pg_start); i++)
-		OUTREG32(intel_i830_private.gtt, i, agp_bridge->scratch_page);
+	for (i = pg_start; i < (mem->page_count + pg_start); i++) {
+		writel(agp_bridge->scratch_page, intel_i830_private.gtt+i);
+		readl(intel_i830_private.gtt+i);
+	}
 
 	global_cache_flush();
-
 	agp_bridge->driver->tlb_flush(mem);
-
-	return (0);
+	return 0;
 }
 
 static int intel_i915_fetch_size(void)
@@ -730,7 +735,7 @@
 	else
 		offset = 2;	/* 256MB aperture */
 	agp_bridge->previous_size = agp_bridge->current_size = (void *)(values + offset);
-	return(values[offset].size);
+	return values[offset].size;
 }
 
 /* The intel i915 automatically initializes the agp aperture during POST.
@@ -753,16 +758,16 @@
 
 	intel_i830_private.gtt = ioremap(temp2, 256 * 1024);
 	if (!intel_i830_private.gtt)
-		return (-ENOMEM);
+		return -ENOMEM;
 
 	temp &= 0xfff80000;
 
 	intel_i830_private.registers = ioremap(temp,128 * 4096);
 	if (!intel_i830_private.registers)
-		return (-ENOMEM);
+		return -ENOMEM;
 
-	temp = INREG32(intel_i830_private.registers,I810_PGETBL_CTL) & 0xfffff000;
-	global_cache_flush();
+	temp = readl(intel_i830_private.registers+I810_PGETBL_CTL) & 0xfffff000;
+	global_cache_flush();	/* FIXME: ? */
 
 	/* we have to call this as early as possible after the MMIO base address is known */
 	intel_i830_init_gtt_entries();
@@ -771,7 +776,7 @@
 
 	agp_bridge->gatt_bus_addr = temp;
 
-	return(0);
+	return 0;
 }
 
 static int intel_fetch_size(void)
@@ -1493,7 +1498,7 @@
 {
 	struct pci_dev *i810_dev;
 
-	i810_dev = pci_find_device(PCI_VENDOR_ID_INTEL, device, NULL);
+	i810_dev = pci_get_device(PCI_VENDOR_ID_INTEL, device, NULL);
 	if (!i810_dev)
 		return 0;
 	intel_i810_private.i810_dev = i810_dev;
@@ -1504,9 +1509,9 @@
 {
 	struct pci_dev *i830_dev;
 
-	i830_dev = pci_find_device(PCI_VENDOR_ID_INTEL, device, NULL);
+	i830_dev = pci_get_device(PCI_VENDOR_ID_INTEL, device, NULL);
 	if (i830_dev && PCI_FUNC(i830_dev->devfn) != 0) {
-		i830_dev = pci_find_device(PCI_VENDOR_ID_INTEL,
+		i830_dev = pci_get_device(PCI_VENDOR_ID_INTEL,
 				device, i830_dev);
 	}
 
@@ -1715,6 +1720,7 @@
 {
 	struct agp_bridge_data *bridge = pci_get_drvdata(pdev);
 
+	pci_dev_put(pdev);
 	agp_remove_bridge(bridge);
 	agp_put_bridge(bridge);
 }
diff -Nru a/drivers/char/agp/intel-mch-agp.c b/drivers/char/agp/intel-mch-agp.c
--- a/drivers/char/agp/intel-mch-agp.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/char/agp/intel-mch-agp.c	2005-01-10 20:11:16 -08:00
@@ -51,7 +51,7 @@
 	if (new == NULL)
 		return NULL;
 
-	new->memory[0] = agp_bridge->driver->mask_memory(virt_to_phys(addr), type);
+	new->memory[0] = virt_to_phys(addr);
 	new->page_count = 1;
 	new->num_scratch_pages = 1;
 	new->type = AGP_PHYS_MEMORY;
@@ -111,8 +111,7 @@
 			gtt_entries = MB(8) - KB(132);
 			break;
 		case I830_GMCH_GMS_LOCAL:
-			rdct = INREG8(intel_i830_private.registers,
-				      I830_RDRAM_CHANNEL_TYPE);
+			rdct = readb(intel_i830_private.registers+I830_RDRAM_CHANNEL_TYPE);
 			gtt_entries = (I830_RDRAM_ND(rdct) + 1) *
 					MB(ddt[I830_RDRAM_DDT(rdct)]);
 			local = 1;
@@ -174,10 +173,10 @@
 
 	intel_i830_private.registers = (volatile u8 __iomem*) ioremap(temp,128 * 4096);
 	if (!intel_i830_private.registers)
-		return (-ENOMEM);
+		return -ENOMEM;
 
-	temp = INREG32(intel_i830_private.registers,I810_PGETBL_CTL) & 0xfffff000;
-	global_cache_flush();
+	temp = readl(intel_i830_private.registers+I810_PGETBL_CTL) & 0xfffff000;
+	global_cache_flush();	/* FIXME: ?? */
 
 	/* we have to call this as early as possible after the MMIO base address is known */
 	intel_i830_init_gtt_entries();
@@ -186,7 +185,7 @@
 
 	agp_bridge->gatt_bus_addr = temp;
 
-	return(0);
+	return 0;
 }
 
 /* Return the gatt table to a sane state. Use the top of stolen
@@ -194,7 +193,7 @@
  */
 static int intel_i830_free_gatt_table(void)
 {
-	return(0);
+	return 0;
 }
 
 static int intel_i830_fetch_size(void)
@@ -209,7 +208,7 @@
 		/* 855GM/852GM/865G has 128MB aperture size */
 		agp_bridge->previous_size = agp_bridge->current_size = (void *) values;
 		agp_bridge->aperture_size_idx = 0;
-		return(values[0].size);
+		return values[0].size;
 	}
 
 	pci_read_config_word(agp_bridge->dev,I830_GMCH_CTRL,&gmch_ctrl);
@@ -217,14 +216,14 @@
 	if ((gmch_ctrl & I830_GMCH_MEM_MASK) == I830_GMCH_MEM_128M) {
 		agp_bridge->previous_size = agp_bridge->current_size = (void *) values;
 		agp_bridge->aperture_size_idx = 0;
-		return(values[0].size);
+		return values[0].size;
 	} else {
 		agp_bridge->previous_size = agp_bridge->current_size = (void *) values;
 		agp_bridge->aperture_size_idx = 1;
-		return(values[1].size);
+		return values[1].size;
 	}
 
-	return(0);
+	return 0;
 }
 
 static int intel_i830_configure(void)
@@ -243,14 +242,17 @@
 	gmch_ctrl |= I830_GMCH_ENABLED;
 	pci_write_config_word(agp_bridge->dev,I830_GMCH_CTRL,gmch_ctrl);
 
-	OUTREG32(intel_i830_private.registers,I810_PGETBL_CTL,agp_bridge->gatt_bus_addr | I810_PGETBL_ENABLED);
-	global_cache_flush();
-
-	if (agp_bridge->driver->needs_scratch_page)
-		for (i = intel_i830_private.gtt_entries; i < current_size->num_entries; i++)
-			OUTREG32(intel_i830_private.registers,I810_PTE_BASE + (i * 4),agp_bridge->scratch_page);
+	writel(agp_bridge->gatt_bus_addr|I810_PGETBL_ENABLED, intel_i830_private.registers+I810_PGETBL_CTL);
+	readl(intel_i830_private.registers+I810_PGETBL_CTL);	/* PCI Posting. */
 
-	return (0);
+	if (agp_bridge->driver->needs_scratch_page) {
+		for (i = intel_i830_private.gtt_entries; i < current_size->num_entries; i++) {
+			writel(agp_bridge->scratch_page, intel_i830_private.registers+I810_PTE_BASE+(i*4));
+			readl(intel_i830_private.registers+I810_PTE_BASE+(i*4));	/* PCI Posting. */
+		}
+	}
+	global_cache_flush();
+	return 0;
 }
 
 static void intel_i830_cleanup(void)
@@ -272,11 +274,11 @@
 				pg_start,intel_i830_private.gtt_entries);
 
 		printk (KERN_INFO PFX "Trying to insert into local/stolen memory\n");
-		return (-EINVAL);
+		return -EINVAL;
 	}
 
 	if ((pg_start + mem->page_count) > num_entries)
-		return (-EINVAL);
+		return -EINVAL;
 
 	/* The i830 can't check the GTT for entries since its read only,
 	 * depend on the caller to make the correct offset decisions.
@@ -284,19 +286,21 @@
 
 	if ((type != 0 && type != AGP_PHYS_MEMORY) ||
 		(mem->type != 0 && mem->type != AGP_PHYS_MEMORY))
-		return (-EINVAL);
+		return -EINVAL;
 
-	global_cache_flush();
+	global_cache_flush();	/* FIXME: ?? */
 
-	for (i = 0, j = pg_start; i < mem->page_count; i++, j++)
-		OUTREG32(intel_i830_private.registers,I810_PTE_BASE + (j * 4),
-			agp_bridge->driver->mask_memory(mem->memory[i], mem->type));
+	for (i = 0, j = pg_start; i < mem->page_count; i++, j++) {
+		writel(agp_bridge->driver->mask_memory(mem->memory[i], mem->type),
+				intel_i830_private.registers+I810_PTE_BASE+(j*4));
+		readl(intel_i830_private.registers+I810_PTE_BASE+(j*4));	/* PCI Posting. */
+	}
 
 	global_cache_flush();
 
 	agp_bridge->driver->tlb_flush(mem);
 
-	return(0);
+	return 0;
 }
 
 static int intel_i830_remove_entries(struct agp_memory *mem,off_t pg_start,
@@ -308,26 +312,26 @@
 
 	if (pg_start < intel_i830_private.gtt_entries) {
 		printk (KERN_INFO PFX "Trying to disable local/stolen memory\n");
-		return (-EINVAL);
+		return -EINVAL;
 	}
 
-	for (i = pg_start; i < (mem->page_count + pg_start); i++)
-		OUTREG32(intel_i830_private.registers,I810_PTE_BASE + (i * 4),agp_bridge->scratch_page);
+	for (i = pg_start; i < (mem->page_count + pg_start); i++) {
+		writel(agp_bridge->scratch_page, intel_i830_private.registers+I810_PTE_BASE+(i*4));
+		readl(intel_i830_private.registers+I810_PTE_BASE+(i*4));	/* PCI Posting. */
+	}
 
 	global_cache_flush();
-
 	agp_bridge->driver->tlb_flush(mem);
-
-	return (0);
+	return 0;
 }
 
 static struct agp_memory *intel_i830_alloc_by_type(size_t pg_count,int type)
 {
 	if (type == AGP_PHYS_MEMORY)
-		return(alloc_agpphysmem_i8xx(pg_count, type));
+		return alloc_agpphysmem_i8xx(pg_count, type);
 
 	/* always return NULL for other allocation types for now */
-	return(NULL);
+	return NULL;
 }
 
 static int intel_8xx_fetch_size(void)
@@ -470,9 +474,9 @@
 {
 	struct pci_dev *i830_dev;
 
-	i830_dev = pci_find_device(PCI_VENDOR_ID_INTEL, device, NULL);
+	i830_dev = pci_get_device(PCI_VENDOR_ID_INTEL, device, NULL);
 	if (i830_dev && PCI_FUNC(i830_dev->devfn) != 0) {
-		i830_dev = pci_find_device(PCI_VENDOR_ID_INTEL,
+		i830_dev = pci_get_device(PCI_VENDOR_ID_INTEL,
 				device, i830_dev);
 	}
 
@@ -536,7 +540,7 @@
 	if (!r->start && r->end) {
 		if(pci_assign_resource(pdev, 0)) {
 			printk(KERN_ERR PFX "could not assign resource 0\n");
-			return (-ENODEV);
+			return -ENODEV;
 		}
 	}
 
@@ -547,7 +551,7 @@
 	*/
 	if (pci_enable_device(pdev)) {
 		printk(KERN_ERR PFX "Unable to Enable PCI device\n");
-		return (-ENODEV);
+		return -ENODEV;
 	}
 
 	/* Fill in the mode register */
@@ -565,6 +569,7 @@
 {
 	struct agp_bridge_data *bridge = pci_get_drvdata(pdev);
 
+	pci_dev_put(pdev);
 	agp_remove_bridge(bridge);
 	agp_put_bridge(bridge);
 }
diff -Nru a/drivers/char/agp/isoch.c b/drivers/char/agp/isoch.c
--- a/drivers/char/agp/isoch.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/char/agp/isoch.c	2005-01-10 20:11:22 -08:00
@@ -347,7 +347,7 @@
 	INIT_LIST_HEAD(head);
 
 	/* Find all AGP devices, and add them to dev_list. */
-	while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
+	for_each_pci_dev(dev) {
 		mcapndx = pci_find_capability(dev, PCI_CAP_ID_AGP);
 		if (mcapndx == 0)
 			continue;
diff -Nru a/drivers/char/agp/nvidia-agp.c b/drivers/char/agp/nvidia-agp.c
--- a/drivers/char/agp/nvidia-agp.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/char/agp/nvidia-agp.c	2005-01-10 20:11:17 -08:00
@@ -214,9 +214,11 @@
 		global_cache_flush();
 		mem->is_flushed = TRUE;
 	}
-	for (i = 0, j = pg_start; i < mem->page_count; i++, j++)
+	for (i = 0, j = pg_start; i < mem->page_count; i++, j++) {
 		writel(agp_bridge->driver->mask_memory(mem->memory[i], mem->type),
 			agp_bridge->gatt_table+nvidia_private.pg_offset+j);
+		readl(agp_bridge->gatt_table+nvidia_private.pg_offset+j);	/* PCI Posting. */
+	}
 	agp_bridge->driver->tlb_flush(mem);
 	return 0;
 }
@@ -403,6 +405,8 @@
 
 static int __init agp_nvidia_init(void)
 {
+	if (agp_off)
+		return -EINVAL;
 	return pci_module_init(&agp_nvidia_pci_driver);
 }
 
diff -Nru a/drivers/char/agp/sis-agp.c b/drivers/char/agp/sis-agp.c
--- a/drivers/char/agp/sis-agp.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/char/agp/sis-agp.c	2005-01-10 20:11:16 -08:00
@@ -340,6 +340,8 @@
 
 static int __init agp_sis_init(void)
 {
+	if (agp_off)
+		return -EINVAL;
 	return pci_module_init(&agp_sis_pci_driver);
 }
 
@@ -351,8 +353,8 @@
 module_init(agp_sis_init);
 module_exit(agp_sis_cleanup);
 
-MODULE_PARM(agp_sis_force_delay,"i");
+module_param(agp_sis_force_delay, bool, 0);
 MODULE_PARM_DESC(agp_sis_force_delay,"forces sis delay hack");
-MODULE_PARM(agp_sis_agp_spec,"i");
+module_param(agp_sis_agp_spec, int, 0);
 MODULE_PARM_DESC(agp_sis_agp_spec,"0=force sis init, 1=force generic agp3 init, default: autodetect");
 MODULE_LICENSE("GPL and additional rights");
diff -Nru a/drivers/char/agp/sworks-agp.c b/drivers/char/agp/sworks-agp.c
--- a/drivers/char/agp/sworks-agp.c	2005-01-10 20:11:24 -08:00
+++ b/drivers/char/agp/sworks-agp.c	2005-01-10 20:11:24 -08:00
@@ -242,12 +242,12 @@
  */
 static void serverworks_tlbflush(struct agp_memory *temp)
 {
-	OUTREG8(serverworks_private.registers, SVWRKS_POSTFLUSH, 1);
-	while(INREG8(serverworks_private.registers, SVWRKS_POSTFLUSH) == 1)
+	writeb(1, serverworks_private.registers+SVWRKS_POSTFLUSH);
+	while (readb(serverworks_private.registers+SVWRKS_POSTFLUSH) == 1)
 		cpu_relax();
 
-	OUTREG32(serverworks_private.registers, SVWRKS_DIRFLUSH, 1);
-	while(INREG32(serverworks_private.registers, SVWRKS_DIRFLUSH) == 1)
+	writel(1, serverworks_private.registers+SVWRKS_DIRFLUSH);
+	while(readl(serverworks_private.registers+SVWRKS_DIRFLUSH) == 1)
 		cpu_relax();
 }
 
@@ -269,21 +269,21 @@
 		return -ENOMEM;
 	}
 
-	OUTREG8(serverworks_private.registers, SVWRKS_GART_CACHE, 0x0a);
+	writeb(0xA, serverworks_private.registers+SVWRKS_GART_CACHE);
+	readb(serverworks_private.registers+SVWRKS_GART_CACHE);	/* PCI Posting. */
 
-	OUTREG32(serverworks_private.registers, SVWRKS_GATTBASE, 
-		 agp_bridge->gatt_bus_addr);
+	writel(agp_bridge->gatt_bus_addr, serverworks_private.registers+SVWRKS_GATTBASE);
+	readl(serverworks_private.registers+SVWRKS_GATTBASE);	/* PCI Posting. */
 
-	cap_reg = INREG16(serverworks_private.registers, SVWRKS_COMMAND);
+	cap_reg = readw(serverworks_private.registers+SVWRKS_COMMAND);
 	cap_reg &= ~0x0007;
 	cap_reg |= 0x4;
-	OUTREG16(serverworks_private.registers, SVWRKS_COMMAND, cap_reg);
+	writew(cap_reg, serverworks_private.registers+SVWRKS_COMMAND);
+	readw(serverworks_private.registers+SVWRKS_COMMAND);
 
-	pci_read_config_byte(serverworks_private.svrwrks_dev,
-			     SVWRKS_AGP_ENABLE, &enable_reg);
+	pci_read_config_byte(serverworks_private.svrwrks_dev,SVWRKS_AGP_ENABLE, &enable_reg);
 	enable_reg |= 0x1; /* Agp Enable bit */
-	pci_write_config_byte(serverworks_private.svrwrks_dev,
-			      SVWRKS_AGP_ENABLE, enable_reg);
+	pci_write_config_byte(serverworks_private.svrwrks_dev,SVWRKS_AGP_ENABLE, enable_reg);
 	serverworks_tlbflush(NULL);
 
 	agp_bridge->capndx = pci_find_capability(serverworks_private.svrwrks_dev, PCI_CAP_ID_AGP);
@@ -539,6 +539,8 @@
 
 static int __init agp_serverworks_init(void)
 {
+	if (agp_off)
+		return -EINVAL;
 	return pci_module_init(&agp_serverworks_pci_driver);
 }
 
diff -Nru a/drivers/char/agp/uninorth-agp.c b/drivers/char/agp/uninorth-agp.c
--- a/drivers/char/agp/uninorth-agp.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/char/agp/uninorth-agp.c	2005-01-10 20:11:19 -08:00
@@ -373,6 +373,8 @@
 
 static int __init agp_uninorth_init(void)
 {
+	if (agp_off)
+		return -EINVAL;
 	return pci_module_init(&agp_uninorth_pci_driver);
 }
 
diff -Nru a/drivers/char/agp/via-agp.c b/drivers/char/agp/via-agp.c
--- a/drivers/char/agp/via-agp.c	2005-01-10 20:11:24 -08:00
+++ b/drivers/char/agp/via-agp.c	2005-01-10 20:11:24 -08:00
@@ -523,6 +523,8 @@
 
 static int __init agp_via_init(void)
 {
+	if (agp_off)
+		return -EINVAL;
 	return pci_module_init(&agp_via_pci_driver);
 }
 
diff -Nru a/drivers/char/applicom.c b/drivers/char/applicom.c
--- a/drivers/char/applicom.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/char/applicom.c	2005-01-10 20:11:22 -08:00
@@ -1,6 +1,6 @@
 /* Derived from Applicom driver ac.c for SCO Unix                            */
 /* Ported by David Woodhouse, Axiom (Cambridge) Ltd.                         */
-/* dwmw2@redhat.com  30/8/98                                                 */
+/* dwmw2@infradead.org 30/8/98                                               */
 /* $Id: ac.c,v 1.30 2000/03/22 16:03:57 dwmw2 Exp $			     */
 /* This module is for Linux 2.1 and 2.2 series kernels.                      */
 /*****************************************************************************/
@@ -79,10 +79,6 @@
 MODULE_AUTHOR("David Woodhouse & Applicom International");
 MODULE_DESCRIPTION("Driver for Applicom Profibus card");
 MODULE_LICENSE("GPL");
-MODULE_PARM(irq, "i");
-MODULE_PARM_DESC(irq, "IRQ of the Applicom board");
-MODULE_PARM(mem, "i");
-MODULE_PARM_DESC(mem, "Shared Memory Address of Applicom board");
 
 MODULE_SUPPORTED_DEVICE("ac");
 
@@ -97,6 +93,11 @@
 
 static unsigned int irq = 0;	/* interrupt number IRQ       */
 static unsigned long mem = 0;	/* physical segment of board  */
+
+module_param(irq, uint, 0);
+MODULE_PARM_DESC(irq, "IRQ of the Applicom board");
+module_param(mem, ulong, 0);
+MODULE_PARM_DESC(mem, "Shared Memory Address of Applicom board");
 
 static unsigned int numboards;	/* number of installed boards */
 static volatile unsigned char Dummy;
diff -Nru a/drivers/char/cyclades.c b/drivers/char/cyclades.c
--- a/drivers/char/cyclades.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/char/cyclades.c	2005-01-10 20:11:17 -08:00
@@ -758,7 +758,6 @@
  * allocated when the first cy_open occurs.
  */
 static unsigned char *tmp_buf;
-DECLARE_MUTEX(tmp_buf_sem);
 
 /*
  * This is used to look up the divisor speeds and the timeouts
@@ -5537,25 +5536,5 @@
 
 module_init(cy_init);
 module_exit(cy_cleanup_module);
-
-#ifndef MODULE
-/* called by linux/init/main.c to parse command line options */
-void
-cy_setup(char *str, int *ints)
-{
-#ifdef CONFIG_ISA
-  int i, j;
-
-    for (i = 0 ; i < NR_ISA_ADDRS ; i++) {
-        if (cy_isa_addresses[i] == 0) break;
-    }
-    for (j = 1; j <= ints[0]; j++){
-        if ( i < NR_ISA_ADDRS ){
-            cy_isa_addresses[i++] = ints[j];
-        }
-    }
-#endif /* CONFIG_ISA */
-} /* cy_setup */
-#endif /* MODULE */
 
 MODULE_LICENSE("GPL");
diff -Nru a/drivers/char/drm/Kconfig b/drivers/char/drm/Kconfig
--- a/drivers/char/drm/Kconfig	2005-01-10 20:11:22 -08:00
+++ b/drivers/char/drm/Kconfig	2005-01-10 20:11:22 -08:00
@@ -5,7 +5,8 @@
 # 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)"
+	tristate "Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)"
+	depends on AGP || AGP=n
 	help
 	  Kernel-level support for the Direct Rendering Infrastructure (DRI)
 	  introduced in XFree86 4.0. If you say Y here, you need to select
@@ -81,7 +82,7 @@
 
 config DRM_MGA
 	tristate "Matrox g200/g400"
-	depends on DRM && AGP && (!X86_64 || BROKEN) 
+	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.  AGP
diff -Nru a/drivers/char/drm/Makefile b/drivers/char/drm/Makefile
--- a/drivers/char/drm/Makefile	2005-01-10 20:11:22 -08:00
+++ b/drivers/char/drm/Makefile	2005-01-10 20:11:22 -08:00
@@ -2,6 +2,11 @@
 # Makefile for the drm device driver.  This driver provides support for the
 # Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
 
+drm-objs    :=	drm_auth.o drm_bufs.o drm_context.o drm_dma.o drm_drawable.o \
+		drm_drv.o drm_fops.o drm_init.o drm_ioctl.o drm_irq.o \
+		drm_lock.o drm_memory.o drm_proc.o drm_stub.o drm_vm.o \
+		drm_agpsupport.o drm_scatter.o ati_pcigart.o
+
 gamma-objs  := gamma_drv.o gamma_dma.o
 tdfx-objs   := tdfx_drv.o
 r128-objs   := r128_drv.o r128_cce.o r128_state.o r128_irq.o
@@ -13,6 +18,7 @@
 ffb-objs    := ffb_drv.o ffb_context.o
 sis-objs    := sis_drv.o sis_ds.o sis_mm.o
 
+obj-$(CONFIG_DRM)	+= drm.o
 obj-$(CONFIG_DRM_GAMMA) += gamma.o
 obj-$(CONFIG_DRM_TDFX)	+= tdfx.o
 obj-$(CONFIG_DRM_R128)	+= r128.o
diff -Nru a/drivers/char/drm/ati_pcigart.c b/drivers/char/drm/ati_pcigart.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/char/drm/ati_pcigart.c	2005-01-10 20:11:22 -08:00
@@ -0,0 +1,208 @@
+/**
+ * \file ati_pcigart.h 
+ * ATI PCI GART support
+ *
+ * \author Gareth Hughes <gareth@valinux.com>
+ */
+
+/*
+ * Created: Wed Dec 13 21:52:19 2000 by gareth@valinux.com
+ *
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#include "drmP.h"
+
+#if PAGE_SIZE == 65536
+# define ATI_PCIGART_TABLE_ORDER	0
+# define ATI_PCIGART_TABLE_PAGES	(1 << 0)
+#elif PAGE_SIZE == 16384
+# define ATI_PCIGART_TABLE_ORDER	1
+# define ATI_PCIGART_TABLE_PAGES	(1 << 1)
+#elif PAGE_SIZE == 8192
+# define ATI_PCIGART_TABLE_ORDER 	2
+# define ATI_PCIGART_TABLE_PAGES 	(1 << 2)
+#elif PAGE_SIZE == 4096
+# define ATI_PCIGART_TABLE_ORDER 	3
+# define ATI_PCIGART_TABLE_PAGES 	(1 << 3)
+#else
+# error - PAGE_SIZE not 64K, 16K, 8K or 4K
+#endif
+
+# define ATI_MAX_PCIGART_PAGES		8192	/**< 32 MB aperture, 4K pages */
+# define ATI_PCIGART_PAGE_SIZE		4096	/**< PCI GART page size */
+
+unsigned long drm_ati_alloc_pcigart_table( void )
+{
+	unsigned long address;
+	struct page *page;
+	int i;
+	DRM_DEBUG( "%s\n", __FUNCTION__ );
+
+	address = __get_free_pages( GFP_KERNEL, ATI_PCIGART_TABLE_ORDER );
+	if ( address == 0UL ) {
+		return 0;
+	}
+
+	page = virt_to_page( address );
+
+	for ( i = 0 ; i < ATI_PCIGART_TABLE_PAGES ; i++, page++ ) {
+		get_page(page);
+		SetPageReserved( page );
+	}
+
+	DRM_DEBUG( "%s: returning 0x%08lx\n", __FUNCTION__, address );
+	return address;
+}
+
+static void drm_ati_free_pcigart_table( unsigned long address )
+{
+	struct page *page;
+	int i;
+	DRM_DEBUG( "%s\n", __FUNCTION__ );
+
+	page = virt_to_page( address );
+
+	for ( i = 0 ; i < ATI_PCIGART_TABLE_PAGES ; i++, page++ ) {
+		__put_page(page);
+		ClearPageReserved( page );
+	}
+
+	free_pages( address, ATI_PCIGART_TABLE_ORDER );
+}
+
+int drm_ati_pcigart_cleanup( drm_device_t *dev,
+			      unsigned long addr,
+			      dma_addr_t bus_addr)
+{
+	drm_sg_mem_t *entry = dev->sg;
+	unsigned long pages;
+	int i;
+
+	/* we need to support large memory configurations */
+	if ( !entry ) {
+		DRM_ERROR( "no scatter/gather memory!\n" );
+		return 0;
+	}
+
+	if ( bus_addr ) {
+		pci_unmap_single(dev->pdev, bus_addr,
+				 ATI_PCIGART_TABLE_PAGES * PAGE_SIZE,
+				 PCI_DMA_TODEVICE);
+
+		pages = ( entry->pages <= ATI_MAX_PCIGART_PAGES )
+		        ? entry->pages : ATI_MAX_PCIGART_PAGES;
+
+		for ( i = 0 ; i < pages ; i++ ) {
+			if ( !entry->busaddr[i] ) break;
+			pci_unmap_single(dev->pdev, entry->busaddr[i],
+					 PAGE_SIZE, PCI_DMA_TODEVICE);
+		}
+	}
+
+	if ( addr ) {
+		drm_ati_free_pcigart_table( addr );
+	}
+
+	return 1;
+}
+EXPORT_SYMBOL(drm_ati_pcigart_cleanup);
+
+int drm_ati_pcigart_init( drm_device_t *dev,
+			   unsigned long *addr,
+			   dma_addr_t *bus_addr)
+{
+	drm_sg_mem_t *entry = dev->sg;
+	unsigned long address = 0;
+	unsigned long pages;
+	u32 *pci_gart, page_base, bus_address = 0;
+	int i, j, ret = 0;
+
+	if ( !entry ) {
+		DRM_ERROR( "no scatter/gather memory!\n" );
+		goto done;
+	}
+
+	address = drm_ati_alloc_pcigart_table();
+	if ( !address ) {
+		DRM_ERROR( "cannot allocate PCI GART page!\n" );
+		goto done;
+	}
+
+	if ( !dev->pdev ) {
+		DRM_ERROR( "PCI device unknown!\n" );
+		goto done;
+	}
+
+	bus_address = pci_map_single(dev->pdev, (void *)address,
+				  ATI_PCIGART_TABLE_PAGES * PAGE_SIZE,
+				  PCI_DMA_TODEVICE);
+	if (bus_address == 0) {
+		DRM_ERROR( "unable to map PCIGART pages!\n" );
+		drm_ati_free_pcigart_table( address );
+		address = 0;
+		goto done;
+	}
+
+	pci_gart = (u32 *)address;
+
+	pages = ( entry->pages <= ATI_MAX_PCIGART_PAGES )
+		? entry->pages : ATI_MAX_PCIGART_PAGES;
+
+	memset( pci_gart, 0, ATI_MAX_PCIGART_PAGES * sizeof(u32) );
+
+	for ( i = 0 ; i < pages ; i++ ) {
+		/* we need to support large memory configurations */
+		entry->busaddr[i] = pci_map_single(dev->pdev,
+					   page_address( entry->pagelist[i] ),
+					   PAGE_SIZE,
+					   PCI_DMA_TODEVICE);
+		if (entry->busaddr[i] == 0) {
+			DRM_ERROR( "unable to map PCIGART pages!\n" );
+			drm_ati_pcigart_cleanup( dev, address, bus_address );
+			address = 0;
+			bus_address = 0;
+			goto done;
+		}
+		page_base = (u32) entry->busaddr[i];
+
+		for (j = 0; j < (PAGE_SIZE / ATI_PCIGART_PAGE_SIZE); j++) {
+			*pci_gart++ = cpu_to_le32( page_base );
+			page_base += ATI_PCIGART_PAGE_SIZE;
+		}
+	}
+
+	ret = 1;
+
+#if defined(__i386__) || defined(__x86_64__)
+	wbinvd();
+#else
+	mb();
+#endif
+
+done:
+	*addr = address;
+	*bus_addr = bus_address;
+	return ret;
+}
+EXPORT_SYMBOL(drm_ati_pcigart_init);
diff -Nru a/drivers/char/drm/ati_pcigart.h b/drivers/char/drm/ati_pcigart.h
--- a/drivers/char/drm/ati_pcigart.h	2005-01-10 20:11:22 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,206 +0,0 @@
-/**
- * \file ati_pcigart.h 
- * ATI PCI GART support
- *
- * \author Gareth Hughes <gareth@valinux.com>
- */
-
-/*
- * Created: Wed Dec 13 21:52:19 2000 by gareth@valinux.com
- *
- * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-
-#include "drmP.h"
-
-#if PAGE_SIZE == 65536
-# define ATI_PCIGART_TABLE_ORDER	0
-# define ATI_PCIGART_TABLE_PAGES	(1 << 0)
-#elif PAGE_SIZE == 16384
-# define ATI_PCIGART_TABLE_ORDER	1
-# define ATI_PCIGART_TABLE_PAGES	(1 << 1)
-#elif PAGE_SIZE == 8192
-# define ATI_PCIGART_TABLE_ORDER 	2
-# define ATI_PCIGART_TABLE_PAGES 	(1 << 2)
-#elif PAGE_SIZE == 4096
-# define ATI_PCIGART_TABLE_ORDER 	3
-# define ATI_PCIGART_TABLE_PAGES 	(1 << 3)
-#else
-# error - PAGE_SIZE not 64K, 16K, 8K or 4K
-#endif
-
-# define ATI_MAX_PCIGART_PAGES		8192	/**< 32 MB aperture, 4K pages */
-# define ATI_PCIGART_PAGE_SIZE		4096	/**< PCI GART page size */
-
-static unsigned long DRM(ati_alloc_pcigart_table)( void )
-{
-	unsigned long address;
-	struct page *page;
-	int i;
-	DRM_DEBUG( "%s\n", __FUNCTION__ );
-
-	address = __get_free_pages( GFP_KERNEL, ATI_PCIGART_TABLE_ORDER );
-	if ( address == 0UL ) {
-		return 0;
-	}
-
-	page = virt_to_page( address );
-
-	for ( i = 0 ; i < ATI_PCIGART_TABLE_PAGES ; i++, page++ ) {
-		get_page(page);
-		SetPageReserved( page );
-	}
-
-	DRM_DEBUG( "%s: returning 0x%08lx\n", __FUNCTION__, address );
-	return address;
-}
-
-static void DRM(ati_free_pcigart_table)( unsigned long address )
-{
-	struct page *page;
-	int i;
-	DRM_DEBUG( "%s\n", __FUNCTION__ );
-
-	page = virt_to_page( address );
-
-	for ( i = 0 ; i < ATI_PCIGART_TABLE_PAGES ; i++, page++ ) {
-		__put_page(page);
-		ClearPageReserved( page );
-	}
-
-	free_pages( address, ATI_PCIGART_TABLE_ORDER );
-}
-
-int DRM(ati_pcigart_init)( drm_device_t *dev,
-			   unsigned long *addr,
-			   dma_addr_t *bus_addr)
-{
-	drm_sg_mem_t *entry = dev->sg;
-	unsigned long address = 0;
-	unsigned long pages;
-	u32 *pci_gart, page_base, bus_address = 0;
-	int i, j, ret = 0;
-
-	if ( !entry ) {
-		DRM_ERROR( "no scatter/gather memory!\n" );
-		goto done;
-	}
-
-	address = DRM(ati_alloc_pcigart_table)();
-	if ( !address ) {
-		DRM_ERROR( "cannot allocate PCI GART page!\n" );
-		goto done;
-	}
-
-	if ( !dev->pdev ) {
-		DRM_ERROR( "PCI device unknown!\n" );
-		goto done;
-	}
-
-	bus_address = pci_map_single(dev->pdev, (void *)address,
-				  ATI_PCIGART_TABLE_PAGES * PAGE_SIZE,
-				  PCI_DMA_TODEVICE);
-	if (bus_address == 0) {
-		DRM_ERROR( "unable to map PCIGART pages!\n" );
-		DRM(ati_free_pcigart_table)( address );
-		address = 0;
-		goto done;
-	}
-
-	pci_gart = (u32 *)address;
-
-	pages = ( entry->pages <= ATI_MAX_PCIGART_PAGES )
-		? entry->pages : ATI_MAX_PCIGART_PAGES;
-
-	memset( pci_gart, 0, ATI_MAX_PCIGART_PAGES * sizeof(u32) );
-
-	for ( i = 0 ; i < pages ; i++ ) {
-		/* we need to support large memory configurations */
-		entry->busaddr[i] = pci_map_single(dev->pdev,
-					   page_address( entry->pagelist[i] ),
-					   PAGE_SIZE,
-					   PCI_DMA_TODEVICE);
-		if (entry->busaddr[i] == 0) {
-			DRM_ERROR( "unable to map PCIGART pages!\n" );
-			DRM(ati_pcigart_cleanup)( dev, address, bus_address );
-			address = 0;
-			bus_address = 0;
-			goto done;
-		}
-		page_base = (u32) entry->busaddr[i];
-
-		for (j = 0; j < (PAGE_SIZE / ATI_PCIGART_PAGE_SIZE); j++) {
-			*pci_gart++ = cpu_to_le32( page_base );
-			page_base += ATI_PCIGART_PAGE_SIZE;
-		}
-	}
-
-	ret = 1;
-
-#if defined(__i386__) || defined(__x86_64__)
-	asm volatile ( "wbinvd" ::: "memory" );
-#else
-	mb();
-#endif
-
-done:
-	*addr = address;
-	*bus_addr = bus_address;
-	return ret;
-}
-
-int DRM(ati_pcigart_cleanup)( drm_device_t *dev,
-			      unsigned long addr,
-			      dma_addr_t bus_addr)
-{
-	drm_sg_mem_t *entry = dev->sg;
-	unsigned long pages;
-	int i;
-
-	/* we need to support large memory configurations */
-	if ( !entry ) {
-		DRM_ERROR( "no scatter/gather memory!\n" );
-		return 0;
-	}
-
-	if ( bus_addr ) {
-		pci_unmap_single(dev->pdev, bus_addr,
-				 ATI_PCIGART_TABLE_PAGES * PAGE_SIZE,
-				 PCI_DMA_TODEVICE);
-
-		pages = ( entry->pages <= ATI_MAX_PCIGART_PAGES )
-		        ? entry->pages : ATI_MAX_PCIGART_PAGES;
-
-		for ( i = 0 ; i < pages ; i++ ) {
-			if ( !entry->busaddr[i] ) break;
-			pci_unmap_single(dev->pdev, entry->busaddr[i],
-					 PAGE_SIZE, PCI_DMA_TODEVICE);
-		}
-	}
-
-	if ( addr ) {
-		DRM(ati_free_pcigart_table)( addr );
-	}
-
-	return 1;
-}
diff -Nru a/drivers/char/drm/drmP.h b/drivers/char/drm/drmP.h
--- a/drivers/char/drm/drmP.h	2005-01-10 20:11:21 -08:00
+++ b/drivers/char/drm/drmP.h	2005-01-10 20:11:21 -08:00
@@ -34,6 +34,8 @@
 #ifndef _DRM_P_H_
 #define _DRM_P_H_
 
+/* If you want the memory alloc debug functionality, change define below */
+/* #define DEBUG_MEMORY */
 
 #ifdef __KERNEL__
 #ifdef __alpha__
@@ -55,6 +57,7 @@
 #include <linux/jiffies.h>
 #include <linux/smp_lock.h>	/* For (un)lock_kernel */
 #include <linux/mm.h>
+#include <linux/cdev.h>
 #if defined(__alpha__) || defined(__powerpc__)
 #include <asm/pgtable.h> /* For pte_wrprotect */
 #endif
@@ -215,7 +218,8 @@
  */
 #define DRM_MEM_ERROR(area, fmt, arg...) \
 	printk(KERN_ERR "[" DRM_NAME ":%s:%s] *ERROR* " fmt , __FUNCTION__, \
-	       DRM(mem_stats)[area].name , ##arg)
+	       drm_mem_stats[area].name , ##arg)
+
 #define DRM_INFO(fmt, arg...)  printk(KERN_INFO "[" DRM_NAME "] " fmt , ##arg)
 
 /**
@@ -227,7 +231,7 @@
 #if DRM_DEBUG_CODE
 #define DRM_DEBUG(fmt, arg...)						\
 	do {								\
-		if ( DRM(flags) & DRM_FLAG_DEBUG )			\
+		if ( drm_debug )			\
 			printk(KERN_DEBUG				\
 			       "[" DRM_NAME ":%s] " fmt ,	\
 			       __FUNCTION__ , ##arg);			\
@@ -290,6 +294,18 @@
 } while (0)
 
 /**
+ * Copy and IOCTL return string to user space
+ */
+#define DRM_COPY( name, value )						\
+	len = strlen( value );						\
+	if ( len > name##_len ) len = name##_len;			\
+	name##_len = strlen( value );					\
+	if ( len && name ) {						\
+		if ( copy_to_user( name, value, len ) )			\
+			return -EFAULT;					\
+	}
+	
+/**
  * Ioctl function type.
  *
  * \param inode device inode.
@@ -475,7 +491,7 @@
 /**
  * AGP data.
  *
- * \sa DRM(agp_init)() and drm_device::agp.
+ * \sa drm_agp_init() and drm_device::agp.
  */
 typedef struct drm_agp_head {
 	DRM_AGP_KERN       agp_info;	/**< AGP device information */
@@ -533,19 +549,21 @@
 } drm_vbl_sig_t;
 
 
-/** 
- * DRM device functions structure
+/**
+ * DRM driver structure. This structure represent the common code for
+ * a family of cards. There will one drm_device for each card present
+ * in this family
  */
 struct drm_device;
 
-struct drm_driver_fn {
+struct drm_driver {
 	int (*preinit)(struct drm_device *);
-	int (*postinit)(struct drm_device *);
 	void (*prerelease)(struct drm_device *, struct file *filp);
 	void (*pretakedown)(struct drm_device *);
 	int (*postcleanup)(struct drm_device *);
 	int (*presetup)(struct drm_device *);
 	int (*postsetup)(struct drm_device *);
+ 	int (*dma_ioctl)( DRM_IOCTL_ARGS );
 	int (*open_helper)(struct drm_device *, drm_file_t *);
 	void (*free_filp_priv)(struct drm_device *, drm_file_t *);
 	void (*release)(struct drm_device *, struct file *filp);
@@ -557,20 +575,27 @@
 	void (*kernel_context_switch_unlock)(struct drm_device *dev, drm_lock_t *lock);
 	int (*vblank_wait)(struct drm_device *dev, unsigned int *sequence);
 	/* these have to be filled in */
+ 	int (*postinit)(struct drm_device *, unsigned long flags);
 	irqreturn_t (*irq_handler)( DRM_IRQ_ARGS );
  	void (*irq_preinstall)(struct drm_device *dev);
  	void (*irq_postinstall)(struct drm_device *dev);
  	void (*irq_uninstall)(struct drm_device *dev);
-	void (*reclaim_buffers)(struct file *filp);
+	void (*reclaim_buffers)(struct drm_device *dev, struct file *filp);
 	unsigned long (*get_map_ofs)(drm_map_t *map);
 	unsigned long (*get_reg_ofs)(struct drm_device *dev);
 	void (*set_version)(struct drm_device *dev, drm_set_version_t *sv);
+ 	int (*version)(drm_version_t *version);
+	u32 driver_features;
+	int dev_priv_size;
+	drm_ioctl_desc_t *ioctls;
+	int num_ioctls;
+	struct file_operations fops;
+	struct pci_driver pci_driver;
 };
 /**
  * DRM device structure.
  */
 typedef struct drm_device {
-	const char	  *name;	/**< Simple driver name */
 	char		  *unique;	/**< Unique identifier: e.g., busid */
 	int		  unique_len;	/**< Length of unique field */
 	dev_t		  device;	/**< Device number for mknod */
@@ -693,15 +718,22 @@
 	drm_sigdata_t     sigdata; /**< For block_all_signals */
 	sigset_t          sigmask;
 
-	struct            drm_driver_fn fn_tbl;
+	struct            drm_driver *driver;
 	drm_local_map_t   *agp_buffer_map;
-	int               dev_priv_size;
-	u32               driver_features;
 } drm_device_t;
 
+typedef struct drm_minor {
+	enum {
+		DRM_MINOR_FREE = 0,
+		DRM_MINOR_PRIMARY,
+	} type;
+	drm_device_t *dev;
+	struct proc_dir_entry  *dev_root; /**< proc directory entry */
+} drm_minor_t;
+
 static __inline__ int drm_core_check_feature(struct drm_device *dev, int feature)
 {
-	return ((dev->driver_features & feature) ? 1 : 0);
+	return ((dev->driver->driver_features & feature) ? 1 : 0);
 }
 
 #if __OS_HAS_AGP
@@ -722,231 +754,236 @@
 #define drm_core_has_MTRR(dev) (0)
 #endif
 
-extern void DRM(driver_register_fns)(struct drm_device *dev);
-
 /******************************************************************/
 /** \name Internal function definitions */
 /*@{*/
 
 				/* Misc. support (drm_init.h) */
-extern int	     DRM(flags);
-extern void	     DRM(parse_options)( char *s );
-extern int           DRM(cpu_valid)( void );
+extern int	     drm_flags;
+extern void	     drm_parse_options( char *s );
+extern int           drm_cpu_valid( void );
 
 				/* Driver support (drm_drv.h) */
-extern int           DRM(version)(struct inode *inode, struct file *filp,
+extern int           drm_init(struct drm_driver *driver);
+extern void          drm_exit(struct drm_driver *driver);
+extern int           drm_version(struct inode *inode, struct file *filp,
 				  unsigned int cmd, unsigned long arg);
-extern int           DRM(open)(struct inode *inode, struct file *filp);
-extern int           DRM(release)(struct inode *inode, struct file *filp);
-extern int           DRM(ioctl)(struct inode *inode, struct file *filp,
+extern int           drm_ioctl(struct inode *inode, struct file *filp,
 				unsigned int cmd, unsigned long arg);
-extern int           DRM(lock)(struct inode *inode, struct file *filp,
-			       unsigned int cmd, unsigned long arg);
-extern int           DRM(unlock)(struct inode *inode, struct file *filp,
-				 unsigned int cmd, unsigned long arg);
+extern int           drm_takedown(drm_device_t * dev);
 
 				/* Device support (drm_fops.h) */
-extern int	     DRM(open_helper)(struct inode *inode, struct file *filp,
+extern int           drm_open(struct inode *inode, struct file *filp);
+extern int           drm_stub_open(struct inode *inode, struct file *filp);
+extern int	     drm_open_helper(struct inode *inode, struct file *filp,
 				      drm_device_t *dev);
-extern int	     DRM(flush)(struct file *filp);
-extern int	     DRM(fasync)(int fd, struct file *filp, int on);
+extern int	     drm_flush(struct file *filp);
+extern int	     drm_fasync(int fd, struct file *filp, int on);
+extern int           drm_release(struct inode *inode, struct file *filp);
 
 				/* Mapping support (drm_vm.h) */
-extern void	     DRM(vm_open)(struct vm_area_struct *vma);
-extern void	     DRM(vm_close)(struct vm_area_struct *vma);
-extern void	     DRM(vm_shm_close)(struct vm_area_struct *vma);
-extern int	     DRM(mmap_dma)(struct file *filp,
+extern void	     drm_vm_open(struct vm_area_struct *vma);
+extern void	     drm_vm_close(struct vm_area_struct *vma);
+extern void	     drm_vm_shm_close(struct vm_area_struct *vma);
+extern int	     drm_mmap_dma(struct file *filp,
 				   struct vm_area_struct *vma);
-extern int	     DRM(mmap)(struct file *filp, struct vm_area_struct *vma);
-extern unsigned int  DRM(poll)(struct file *filp, struct poll_table_struct *wait);
-extern ssize_t       DRM(read)(struct file *filp, char __user *buf, size_t count, loff_t *off);
+extern int	     drm_mmap(struct file *filp, struct vm_area_struct *vma);
+extern unsigned int  drm_poll(struct file *filp, struct poll_table_struct *wait);
+extern ssize_t       drm_read(struct file *filp, char __user *buf, size_t count, loff_t *off);
 
 				/* Memory management support (drm_memory.h) */
-extern void	     DRM(mem_init)(void);
-extern int	     DRM(mem_info)(char *buf, char **start, off_t offset,
+#include "drm_memory.h"
+extern void	     drm_mem_init(void);
+extern int	     drm_mem_info(char *buf, char **start, off_t offset,
 				   int request, int *eof, void *data);
-extern void	     *DRM(alloc)(size_t size, int area);
-extern void	     *DRM(calloc)(size_t nmemb, size_t size, int area);
-extern void	     *DRM(realloc)(void *oldpt, size_t oldsize, size_t size,
+extern void	     *drm_calloc(size_t nmemb, size_t size, int area);
+extern void	     *drm_realloc(void *oldpt, size_t oldsize, size_t size,
 				   int area);
-extern void	     DRM(free)(void *pt, size_t size, int area);
-extern unsigned long DRM(alloc_pages)(int order, int area);
-extern void	     DRM(free_pages)(unsigned long address, int order,
+extern unsigned long drm_alloc_pages(int order, int area);
+extern void	     drm_free_pages(unsigned long address, int order,
 				     int area);
-extern void	     *DRM(ioremap)(unsigned long offset, unsigned long size, drm_device_t *dev);
-extern void	     *DRM(ioremap_nocache)(unsigned long offset, unsigned long size,
+extern void	     *drm_ioremap(unsigned long offset, unsigned long size, drm_device_t *dev);
+extern void	     *drm_ioremap_nocache(unsigned long offset, unsigned long size,
 					   drm_device_t *dev);
-extern void	     DRM(ioremapfree)(void *pt, unsigned long size, drm_device_t *dev);
+extern void	     drm_ioremapfree(void *pt, unsigned long size, drm_device_t *dev);
 
-extern DRM_AGP_MEM   *DRM(alloc_agp)(int pages, u32 type);
-extern int           DRM(free_agp)(DRM_AGP_MEM *handle, int pages);
-extern int           DRM(bind_agp)(DRM_AGP_MEM *handle, unsigned int start);
-extern int           DRM(unbind_agp)(DRM_AGP_MEM *handle);
+extern DRM_AGP_MEM   *drm_alloc_agp(int pages, u32 type);
+extern int           drm_free_agp(DRM_AGP_MEM *handle, int pages);
+extern int           drm_bind_agp(DRM_AGP_MEM *handle, unsigned int start);
+extern int           drm_unbind_agp(DRM_AGP_MEM *handle);
 
 				/* Misc. IOCTL support (drm_ioctl.h) */
-extern int	     DRM(irq_by_busid)(struct inode *inode, struct file *filp,
+extern int	     drm_irq_by_busid(struct inode *inode, struct file *filp,
 				       unsigned int cmd, unsigned long arg);
-extern int	     DRM(getunique)(struct inode *inode, struct file *filp,
+extern int	     drm_getunique(struct inode *inode, struct file *filp,
 				    unsigned int cmd, unsigned long arg);
-extern int	     DRM(setunique)(struct inode *inode, struct file *filp,
+extern int	     drm_setunique(struct inode *inode, struct file *filp,
 				    unsigned int cmd, unsigned long arg);
-extern int	     DRM(getmap)(struct inode *inode, struct file *filp,
+extern int	     drm_getmap(struct inode *inode, struct file *filp,
 				 unsigned int cmd, unsigned long arg);
-extern int	     DRM(getclient)(struct inode *inode, struct file *filp,
+extern int	     drm_getclient(struct inode *inode, struct file *filp,
 				    unsigned int cmd, unsigned long arg);
-extern int	     DRM(getstats)(struct inode *inode, struct file *filp,
+extern int	     drm_getstats(struct inode *inode, struct file *filp,
 				   unsigned int cmd, unsigned long arg);
-extern int	     DRM(setversion)(struct inode *inode, struct file *filp,
+extern int	     drm_setversion(struct inode *inode, struct file *filp,
 				     unsigned int cmd, unsigned long arg);
 
 				/* Context IOCTL support (drm_context.h) */
-extern int	     DRM(resctx)( struct inode *inode, struct file *filp,
+extern int	     drm_resctx( struct inode *inode, struct file *filp,
 				  unsigned int cmd, unsigned long arg );
-extern int	     DRM(addctx)( struct inode *inode, struct file *filp,
+extern int	     drm_addctx( struct inode *inode, struct file *filp,
 				  unsigned int cmd, unsigned long arg );
-extern int	     DRM(modctx)( struct inode *inode, struct file *filp,
+extern int	     drm_modctx( struct inode *inode, struct file *filp,
 				  unsigned int cmd, unsigned long arg );
-extern int	     DRM(getctx)( struct inode *inode, struct file *filp,
+extern int	     drm_getctx( struct inode *inode, struct file *filp,
 				  unsigned int cmd, unsigned long arg );
-extern int	     DRM(switchctx)( struct inode *inode, struct file *filp,
+extern int	     drm_switchctx( struct inode *inode, struct file *filp,
 				     unsigned int cmd, unsigned long arg );
-extern int	     DRM(newctx)( struct inode *inode, struct file *filp,
+extern int	     drm_newctx( struct inode *inode, struct file *filp,
 				  unsigned int cmd, unsigned long arg );
-extern int	     DRM(rmctx)( struct inode *inode, struct file *filp,
+extern int	     drm_rmctx( struct inode *inode, struct file *filp,
 				 unsigned int cmd, unsigned long arg );
 
-extern int	     DRM(context_switch)(drm_device_t *dev, int old, int new);
-extern int	     DRM(context_switch_complete)(drm_device_t *dev, int new);
+extern int	     drm_context_switch(drm_device_t *dev, int old, int new);
+extern int	     drm_context_switch_complete(drm_device_t *dev, int new);
 
-extern int	     DRM(ctxbitmap_init)( drm_device_t *dev );
-extern void	     DRM(ctxbitmap_cleanup)( drm_device_t *dev );
+extern int	     drm_ctxbitmap_init( drm_device_t *dev );
+extern void	     drm_ctxbitmap_cleanup( drm_device_t *dev );
+extern void          drm_ctxbitmap_free( drm_device_t *dev, int ctx_handle );
 
-extern int	     DRM(setsareactx)( struct inode *inode, struct file *filp,
+extern int	     drm_setsareactx( struct inode *inode, struct file *filp,
 				       unsigned int cmd, unsigned long arg );
-extern int	     DRM(getsareactx)( struct inode *inode, struct file *filp,
+extern int	     drm_getsareactx( struct inode *inode, struct file *filp,
 				       unsigned int cmd, unsigned long arg );
 
 				/* Drawable IOCTL support (drm_drawable.h) */
-extern int	     DRM(adddraw)(struct inode *inode, struct file *filp,
+extern int	     drm_adddraw(struct inode *inode, struct file *filp,
 				  unsigned int cmd, unsigned long arg);
-extern int	     DRM(rmdraw)(struct inode *inode, struct file *filp,
+extern int	     drm_rmdraw(struct inode *inode, struct file *filp,
 				 unsigned int cmd, unsigned long arg);
 
 
 				/* Authentication IOCTL support (drm_auth.h) */
-extern int	     DRM(add_magic)(drm_device_t *dev, drm_file_t *priv,
+extern int	     drm_add_magic(drm_device_t *dev, drm_file_t *priv,
 				    drm_magic_t magic);
-extern int	     DRM(remove_magic)(drm_device_t *dev, drm_magic_t magic);
-extern int	     DRM(getmagic)(struct inode *inode, struct file *filp,
+extern int	     drm_remove_magic(drm_device_t *dev, drm_magic_t magic);
+extern int	     drm_getmagic(struct inode *inode, struct file *filp,
 				   unsigned int cmd, unsigned long arg);
-extern int	     DRM(authmagic)(struct inode *inode, struct file *filp,
+extern int	     drm_authmagic(struct inode *inode, struct file *filp,
 				    unsigned int cmd, unsigned long arg);
 
                                 /* Placeholder for ioctls past */
-extern int	     DRM(noop)(struct inode *inode, struct file *filp,
+extern int	     drm_noop(struct inode *inode, struct file *filp,
 				  unsigned int cmd, unsigned long arg);
 
 				/* Locking IOCTL support (drm_lock.h) */
-extern int	     DRM(lock_take)(__volatile__ unsigned int *lock,
+extern int           drm_lock(struct inode *inode, struct file *filp,
+			       unsigned int cmd, unsigned long arg);
+extern int           drm_unlock(struct inode *inode, struct file *filp,
+				 unsigned int cmd, unsigned long arg);
+extern int	     drm_lock_take(__volatile__ unsigned int *lock,
 				    unsigned int context);
-extern int	     DRM(lock_transfer)(drm_device_t *dev,
+extern int	     drm_lock_transfer(drm_device_t *dev,
 					__volatile__ unsigned int *lock,
 					unsigned int context);
-extern int	     DRM(lock_free)(drm_device_t *dev,
+extern int	     drm_lock_free(drm_device_t *dev,
 				    __volatile__ unsigned int *lock,
 				    unsigned int context);
-extern int           DRM(notifier)(void *priv);
+extern int           drm_notifier(void *priv);
 
 				/* Buffer management support (drm_bufs.h) */
-extern int	     DRM(order)( unsigned long size );
-extern int	     DRM(addmap)( struct inode *inode, struct file *filp,
+extern int	     drm_order( unsigned long size );
+extern int	     drm_addmap( struct inode *inode, struct file *filp,
 				  unsigned int cmd, unsigned long arg );
-extern int	     DRM(rmmap)( struct inode *inode, struct file *filp,
+extern int	     drm_rmmap( struct inode *inode, struct file *filp,
 				 unsigned int cmd, unsigned long arg );
-extern int	     DRM(addbufs)( struct inode *inode, struct file *filp,
+extern int	     drm_addbufs( struct inode *inode, struct file *filp,
 				   unsigned int cmd, unsigned long arg );
-extern int	     DRM(infobufs)( struct inode *inode, struct file *filp,
+extern int	     drm_infobufs( struct inode *inode, struct file *filp,
 				    unsigned int cmd, unsigned long arg );
-extern int	     DRM(markbufs)( struct inode *inode, struct file *filp,
+extern int	     drm_markbufs( struct inode *inode, struct file *filp,
 				    unsigned int cmd, unsigned long arg );
-extern int	     DRM(freebufs)( struct inode *inode, struct file *filp,
+extern int	     drm_freebufs( struct inode *inode, struct file *filp,
 				    unsigned int cmd, unsigned long arg );
-extern int	     DRM(mapbufs)( struct inode *inode, struct file *filp,
+extern int	     drm_mapbufs( struct inode *inode, struct file *filp,
 				   unsigned int cmd, unsigned long arg );
 
 				/* DMA support (drm_dma.h) */
-extern int	     DRM(dma_setup)(drm_device_t *dev);
-extern void	     DRM(dma_takedown)(drm_device_t *dev);
-extern void	     DRM(free_buffer)(drm_device_t *dev, drm_buf_t *buf);
-extern void	     DRM(reclaim_buffers)( struct file *filp );
+extern int	     drm_dma_setup(drm_device_t *dev);
+extern void	     drm_dma_takedown(drm_device_t *dev);
+extern void	     drm_free_buffer(drm_device_t *dev, drm_buf_t *buf);
+extern void	     drm_core_reclaim_buffers(drm_device_t *dev, struct file *filp);
 
 				/* IRQ support (drm_irq.h) */
-extern int           DRM(control)( struct inode *inode, struct file *filp,
+extern int           drm_control( struct inode *inode, struct file *filp,
 				   unsigned int cmd, unsigned long arg );
-extern int           DRM(irq_install)( drm_device_t *dev );
-extern int           DRM(irq_uninstall)( drm_device_t *dev );
-extern irqreturn_t   DRM(irq_handler)( DRM_IRQ_ARGS );
-extern void          DRM(driver_irq_preinstall)( drm_device_t *dev );
-extern void          DRM(driver_irq_postinstall)( drm_device_t *dev );
-extern void          DRM(driver_irq_uninstall)( drm_device_t *dev );
+extern int           drm_irq_install( drm_device_t *dev );
+extern int           drm_irq_uninstall( drm_device_t *dev );
+extern irqreturn_t   drm_irq_handler( DRM_IRQ_ARGS );
+extern void          drm_driver_irq_preinstall( drm_device_t *dev );
+extern void          drm_driver_irq_postinstall( drm_device_t *dev );
+extern void          drm_driver_irq_uninstall( drm_device_t *dev );
 
-extern int           DRM(wait_vblank)(struct inode *inode, struct file *filp,
+extern int           drm_wait_vblank(struct inode *inode, struct file *filp,
 				      unsigned int cmd, unsigned long arg);
-extern int           DRM(vblank_wait)(drm_device_t *dev, unsigned int *vbl_seq);
-extern void          DRM(vbl_send_signals)( drm_device_t *dev );
+extern int           drm_vblank_wait(drm_device_t *dev, unsigned int *vbl_seq);
+extern void          drm_vbl_send_signals( drm_device_t *dev );
 
 				/* AGP/GART support (drm_agpsupport.h) */
-extern drm_agp_head_t *DRM(agp_init)(void);
-extern void           DRM(agp_uninit)(void);
-extern int            DRM(agp_acquire)(struct inode *inode, struct file *filp,
+extern drm_agp_head_t *drm_agp_init(void);
+extern int            drm_agp_acquire(struct inode *inode, struct file *filp,
 				       unsigned int cmd, unsigned long arg);
-extern void           DRM(agp_do_release)(void);
-extern int            DRM(agp_release)(struct inode *inode, struct file *filp,
+extern void           drm_agp_do_release(void);
+extern int            drm_agp_release(struct inode *inode, struct file *filp,
 				       unsigned int cmd, unsigned long arg);
-extern int            DRM(agp_enable)(struct inode *inode, struct file *filp,
+extern int            drm_agp_enable(struct inode *inode, struct file *filp,
 				      unsigned int cmd, unsigned long arg);
-extern int            DRM(agp_info)(struct inode *inode, struct file *filp,
+extern int            drm_agp_info(struct inode *inode, struct file *filp,
 				    unsigned int cmd, unsigned long arg);
-extern int            DRM(agp_alloc)(struct inode *inode, struct file *filp,
+extern int            drm_agp_alloc(struct inode *inode, struct file *filp,
 				     unsigned int cmd, unsigned long arg);
-extern int            DRM(agp_free)(struct inode *inode, struct file *filp,
+extern int            drm_agp_free(struct inode *inode, struct file *filp,
 				    unsigned int cmd, unsigned long arg);
-extern int            DRM(agp_unbind)(struct inode *inode, struct file *filp,
+extern int            drm_agp_unbind(struct inode *inode, struct file *filp,
 				      unsigned int cmd, unsigned long arg);
-extern int            DRM(agp_bind)(struct inode *inode, struct file *filp,
+extern int            drm_agp_bind(struct inode *inode, struct file *filp,
 				    unsigned int cmd, unsigned long arg);
-extern DRM_AGP_MEM    *DRM(agp_allocate_memory)(size_t pages, u32 type);
-extern int            DRM(agp_free_memory)(DRM_AGP_MEM *handle);
-extern int            DRM(agp_bind_memory)(DRM_AGP_MEM *handle, off_t start);
-extern int            DRM(agp_unbind_memory)(DRM_AGP_MEM *handle);
+extern DRM_AGP_MEM    *drm_agp_allocate_memory(size_t pages, u32 type);
+extern int            drm_agp_free_memory(DRM_AGP_MEM *handle);
+extern int            drm_agp_bind_memory(DRM_AGP_MEM *handle, off_t start);
+extern int            drm_agp_unbind_memory(DRM_AGP_MEM *handle);
 
 				/* Stub support (drm_stub.h) */
-int                   DRM(stub_register)(const char *name,
-					 struct file_operations *fops,
-					 drm_device_t *dev);
-int                   DRM(stub_unregister)(int minor);
+extern int            drm_probe(struct pci_dev *pdev, const struct pci_device_id *ent, struct drm_driver *driver);
+
+extern int 	      drm_put_minor(drm_device_t *dev);
+extern unsigned int   drm_debug;
+extern unsigned int   drm_cards_limit;
+extern drm_minor_t    *drm_minors;
+extern struct class_simple *drm_class;
+extern struct proc_dir_entry *drm_proc_root;
 
 				/* Proc support (drm_proc.h) */
-extern struct proc_dir_entry *DRM(proc_init)(drm_device_t *dev,
+extern int            drm_proc_init(drm_device_t *dev,
 					     int minor,
 					     struct proc_dir_entry *root,
 					     struct proc_dir_entry **dev_root);
-extern int            DRM(proc_cleanup)(int minor,
+extern int            drm_proc_cleanup(int minor,
 					struct proc_dir_entry *root,
 					struct proc_dir_entry *dev_root);
 
 				/* Scatter Gather Support (drm_scatter.h) */
-extern void           DRM(sg_cleanup)(drm_sg_mem_t *entry);
-extern int            DRM(sg_alloc)(struct inode *inode, struct file *filp,
+extern void           drm_sg_cleanup(drm_sg_mem_t *entry);
+extern int            drm_sg_alloc(struct inode *inode, struct file *filp,
 				    unsigned int cmd, unsigned long arg);
-extern int            DRM(sg_free)(struct inode *inode, struct file *filp,
+extern int            drm_sg_free(struct inode *inode, struct file *filp,
 				   unsigned int cmd, unsigned long arg);
 
                                /* ATI PCIGART support (ati_pcigart.h) */
-extern int            DRM(ati_pcigart_init)(drm_device_t *dev,
+extern int            drm_ati_pcigart_init(drm_device_t *dev,
 					    unsigned long *addr,
 					    dma_addr_t *bus_addr);
-extern int            DRM(ati_pcigart_cleanup)(drm_device_t *dev,
+extern int            drm_ati_pcigart_cleanup(drm_device_t *dev,
 					       unsigned long addr,
 					       dma_addr_t bus_addr);
 
@@ -954,18 +991,18 @@
 /* Inline replacements for DRM_IOREMAP macros */
 static __inline__ void drm_core_ioremap(struct drm_map *map, struct drm_device *dev)
 {
-	map->handle = DRM(ioremap)( map->offset, map->size, dev );
+	map->handle = drm_ioremap( map->offset, map->size, dev );
 }
 
 static __inline__ void drm_core_ioremap_nocache(struct drm_map *map, struct drm_device *dev)
 {
-	map->handle = DRM(ioremap_nocache)(map->offset, map->size, dev);
+	map->handle = drm_ioremap_nocache(map->offset, map->size, dev);
 }
 
 static __inline__ void drm_core_ioremapfree(struct drm_map *map, struct drm_device *dev)
 {
 	if ( map->handle && map->size )
-		DRM(ioremapfree)( map->handle, map->size, dev );
+		drm_ioremapfree( map->handle, map->size, dev );
 }
 
 static __inline__ struct drm_map *drm_core_findmap(struct drm_device *dev, unsigned long offset)
@@ -984,10 +1021,28 @@
 static __inline__ void drm_core_dropmap(struct drm_map *map)
 {
 }
+
+#ifndef DEBUG_MEMORY
+/** Wrapper around kmalloc() */
+static __inline__ void *drm_alloc(size_t size, int area)
+{
+	return kmalloc(size, GFP_KERNEL);
+}
+
+/** Wrapper around kfree() */
+static __inline__ void drm_free(void *pt, size_t size, int area)
+{
+	kfree(pt);
+}
+#else
+extern void *drm_alloc(size_t size, int area);
+extern void drm_free(void *pt, size_t size, int area);
+#endif
+
 /*@}*/
 
-extern unsigned long DRM(core_get_map_ofs)(drm_map_t *map);
-extern unsigned long DRM(core_get_reg_ofs)(struct drm_device *dev);
+extern unsigned long drm_core_get_map_ofs(drm_map_t *map);
+extern unsigned long drm_core_get_reg_ofs(struct drm_device *dev);
 
 #endif /* __KERNEL__ */
 #endif
diff -Nru a/drivers/char/drm/drm_agpsupport.c b/drivers/char/drm/drm_agpsupport.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/char/drm/drm_agpsupport.c	2005-01-10 20:11:15 -08:00
@@ -0,0 +1,439 @@
+/**
+ * \file drm_agpsupport.h 
+ * DRM support for AGP/GART backend
+ *    
+ * \author Rickard E. (Rik) Faith <faith@valinux.com>
+ * \author Gareth Hughes <gareth@valinux.com>
+ */
+
+/*
+ * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "drmP.h"
+#include <linux/module.h>
+
+#if __OS_HAS_AGP
+
+/**
+ * AGP information ioctl.
+ *
+ * \param inode device inode.
+ * \param filp file pointer.
+ * \param cmd command.
+ * \param arg pointer to a (output) drm_agp_info structure.
+ * \return zero on success or a negative number on failure.
+ *
+ * Verifies the AGP device has been initialized and acquired and fills in the
+ * drm_agp_info structure with the information in drm_agp_head::agp_info.
+ */
+int drm_agp_info(struct inode *inode, struct file *filp,
+		  unsigned int cmd, unsigned long arg)
+{
+	drm_file_t	 *priv	 = filp->private_data;
+	drm_device_t	 *dev	 = priv->dev;
+	DRM_AGP_KERN     *kern;
+	drm_agp_info_t   info;
+
+	if (!dev->agp || !dev->agp->acquired)
+		return -EINVAL;
+
+	kern                   = &dev->agp->agp_info;
+	info.agp_version_major = kern->version.major;
+	info.agp_version_minor = kern->version.minor;
+	info.mode              = kern->mode;
+	info.aperture_base     = kern->aper_base;
+	info.aperture_size     = kern->aper_size * 1024 * 1024;
+	info.memory_allowed    = kern->max_memory << PAGE_SHIFT;
+	info.memory_used       = kern->current_memory << PAGE_SHIFT;
+	info.id_vendor         = kern->device->vendor;
+	info.id_device         = kern->device->device;
+
+	if (copy_to_user((drm_agp_info_t __user *)arg, &info, sizeof(info)))
+		return -EFAULT;
+	return 0;
+}
+
+/**
+ * Acquire the AGP device (ioctl).
+ *
+ * \param inode device inode.
+ * \param filp file pointer.
+ * \param cmd command.
+ * \param arg user argument.
+ * \return zero on success or a negative number on failure. 
+ *
+ * Verifies the AGP device hasn't been acquired before and calls
+ * agp_acquire().
+ */
+int drm_agp_acquire(struct inode *inode, struct file *filp,
+		     unsigned int cmd, unsigned long arg)
+{
+	drm_file_t	 *priv	 = filp->private_data;
+	drm_device_t	 *dev	 = priv->dev;
+	int              retcode;
+
+	if (!dev->agp)
+		return -ENODEV;
+	if (dev->agp->acquired)
+		return -EBUSY;
+	if ((retcode = agp_backend_acquire()))
+		return retcode;
+	dev->agp->acquired = 1;
+	return 0;
+}
+
+/**
+ * Release the AGP device (ioctl).
+ *
+ * \param inode device inode.
+ * \param filp file pointer.
+ * \param cmd command.
+ * \param arg user argument.
+ * \return zero on success or a negative number on failure.
+ *
+ * Verifies the AGP device has been acquired and calls agp_backend_release().
+ */
+int drm_agp_release(struct inode *inode, struct file *filp,
+		     unsigned int cmd, unsigned long arg)
+{
+	drm_file_t	 *priv	 = filp->private_data;
+	drm_device_t	 *dev	 = priv->dev;
+
+	if (!dev->agp || !dev->agp->acquired)
+		return -EINVAL;
+	agp_backend_release();
+	dev->agp->acquired = 0;
+	return 0;
+
+}
+
+/**
+ * Release the AGP device.
+ *
+ * Calls agp_backend_release().
+ */
+void drm_agp_do_release(void)
+{
+  agp_backend_release();
+}
+
+/**
+ * Enable the AGP bus.
+ * 
+ * \param inode device inode.
+ * \param filp file pointer.
+ * \param cmd command.
+ * \param arg pointer to a drm_agp_mode structure.
+ * \return zero on success or a negative number on failure.
+ *
+ * Verifies the AGP device has been acquired but not enabled, and calls
+ * agp_enable().
+ */
+int drm_agp_enable(struct inode *inode, struct file *filp,
+		    unsigned int cmd, unsigned long arg)
+{
+	drm_file_t	 *priv	 = filp->private_data;
+	drm_device_t	 *dev	 = priv->dev;
+	drm_agp_mode_t   mode;
+
+	if (!dev->agp || !dev->agp->acquired)
+		return -EINVAL;
+
+	if (copy_from_user(&mode, (drm_agp_mode_t __user *)arg, sizeof(mode)))
+		return -EFAULT;
+
+	dev->agp->mode    = mode.mode;
+	agp_enable(mode.mode);
+	dev->agp->base    = dev->agp->agp_info.aper_base;
+	dev->agp->enabled = 1;
+	return 0;
+}
+
+/**
+ * Allocate AGP memory.
+ *
+ * \param inode device inode.
+ * \param filp file pointer.
+ * \param cmd command.
+ * \param arg pointer to a drm_agp_buffer structure.
+ * \return zero on success or a negative number on failure.
+ * 
+ * Verifies the AGP device is present and has been acquired, allocates the
+ * memory via alloc_agp() and creates a drm_agp_mem entry for it.
+ */
+int drm_agp_alloc(struct inode *inode, struct file *filp,
+		   unsigned int cmd, unsigned long arg)
+{
+	drm_file_t	 *priv	 = filp->private_data;
+	drm_device_t	 *dev	 = priv->dev;
+	drm_agp_buffer_t request;
+	drm_agp_mem_t    *entry;
+	DRM_AGP_MEM      *memory;
+	unsigned long    pages;
+	u32 		 type;
+	drm_agp_buffer_t __user *argp = (void __user *)arg;
+
+	if (!dev->agp || !dev->agp->acquired)
+		return -EINVAL;
+	if (copy_from_user(&request, argp, sizeof(request)))
+		return -EFAULT;
+	if (!(entry = drm_alloc(sizeof(*entry), DRM_MEM_AGPLISTS)))
+		return -ENOMEM;
+
+   	memset(entry, 0, sizeof(*entry));
+
+	pages = (request.size + PAGE_SIZE - 1) / PAGE_SIZE;
+	type = (u32) request.type;
+
+	if (!(memory = drm_alloc_agp(pages, type))) {
+		drm_free(entry, sizeof(*entry), DRM_MEM_AGPLISTS);
+		return -ENOMEM;
+	}
+
+	entry->handle    = (unsigned long)memory->key + 1;
+	entry->memory    = memory;
+	entry->bound     = 0;
+	entry->pages     = pages;
+	entry->prev      = NULL;
+	entry->next      = dev->agp->memory;
+	if (dev->agp->memory)
+		dev->agp->memory->prev = entry;
+	dev->agp->memory = entry;
+
+	request.handle   = entry->handle;
+	request.physical = memory->physical;
+
+	if (copy_to_user(argp, &request, sizeof(request))) {
+		dev->agp->memory       = entry->next;
+		dev->agp->memory->prev = NULL;
+		drm_free_agp(memory, pages);
+		drm_free(entry, sizeof(*entry), DRM_MEM_AGPLISTS);
+		return -EFAULT;
+	}
+	return 0;
+}
+
+/**
+ * Search for the AGP memory entry associated with a handle.
+ *
+ * \param dev DRM device structure.
+ * \param handle AGP memory handle.
+ * \return pointer to the drm_agp_mem structure associated with \p handle.
+ * 
+ * Walks through drm_agp_head::memory until finding a matching handle.
+ */
+static drm_agp_mem_t *drm_agp_lookup_entry(drm_device_t *dev,
+					    unsigned long handle)
+{
+	drm_agp_mem_t *entry;
+
+	for (entry = dev->agp->memory; entry; entry = entry->next) {
+		if (entry->handle == handle)
+			return entry;
+	}
+	return NULL;
+}
+
+/**
+ * Unbind AGP memory from the GATT (ioctl).
+ *
+ * \param inode device inode.
+ * \param filp file pointer.
+ * \param cmd command.
+ * \param arg pointer to a drm_agp_binding structure.
+ * \return zero on success or a negative number on failure.
+ *
+ * Verifies the AGP device is present and acquired, looks-up the AGP memory
+ * entry and passes it to the unbind_agp() function.
+ */
+int drm_agp_unbind(struct inode *inode, struct file *filp,
+		    unsigned int cmd, unsigned long arg)
+{
+	drm_file_t	  *priv	 = filp->private_data;
+	drm_device_t	  *dev	 = priv->dev;
+	drm_agp_binding_t request;
+	drm_agp_mem_t     *entry;
+	int ret;
+
+	if (!dev->agp || !dev->agp->acquired)
+		return -EINVAL;
+	if (copy_from_user(&request, (drm_agp_binding_t __user *)arg, sizeof(request)))
+		return -EFAULT;
+	if (!(entry = drm_agp_lookup_entry(dev, request.handle)))
+		return -EINVAL;
+	if (!entry->bound)
+		return -EINVAL;
+	ret = drm_unbind_agp(entry->memory);
+	if (ret == 0)
+	    entry->bound = 0;
+	return ret;
+}
+
+/**
+ * Bind AGP memory into the GATT (ioctl)
+ *
+ * \param inode device inode.
+ * \param filp file pointer.
+ * \param cmd command.
+ * \param arg pointer to a drm_agp_binding structure.
+ * \return zero on success or a negative number on failure.
+ *
+ * Verifies the AGP device is present and has been acquired and that no memory
+ * is currently bound into the GATT. Looks-up the AGP memory entry and passes
+ * it to bind_agp() function.
+ */
+int drm_agp_bind(struct inode *inode, struct file *filp,
+		  unsigned int cmd, unsigned long arg)
+{
+	drm_file_t	  *priv	 = filp->private_data;
+	drm_device_t	  *dev	 = priv->dev;
+	drm_agp_binding_t request;
+	drm_agp_mem_t     *entry;
+	int               retcode;
+	int               page;
+
+	if (!dev->agp || !dev->agp->acquired)
+		return -EINVAL;
+	if (copy_from_user(&request, (drm_agp_binding_t __user *)arg, sizeof(request)))
+		return -EFAULT;
+	if (!(entry = drm_agp_lookup_entry(dev, request.handle)))
+		return -EINVAL;
+	if (entry->bound)
+		return -EINVAL;
+	page = (request.offset + PAGE_SIZE - 1) / PAGE_SIZE;
+	if ((retcode = drm_bind_agp(entry->memory, page)))
+		return retcode;
+	entry->bound = dev->agp->base + (page << PAGE_SHIFT);
+	DRM_DEBUG("base = 0x%lx entry->bound = 0x%lx\n",
+		  dev->agp->base, entry->bound);
+	return 0;
+}
+
+/**
+ * Free AGP memory (ioctl).
+ *
+ * \param inode device inode.
+ * \param filp file pointer.
+ * \param cmd command.
+ * \param arg pointer to a drm_agp_buffer structure.
+ * \return zero on success or a negative number on failure.
+ *
+ * Verifies the AGP device is present and has been acquired and looks up the
+ * AGP memory entry. If the memory it's currently bound, unbind it via
+ * unbind_agp(). Frees it via free_agp() as well as the entry itself
+ * and unlinks from the doubly linked list it's inserted in.
+ */
+int drm_agp_free(struct inode *inode, struct file *filp,
+		  unsigned int cmd, unsigned long arg)
+{
+	drm_file_t	 *priv	 = filp->private_data;
+	drm_device_t	 *dev	 = priv->dev;
+	drm_agp_buffer_t request;
+	drm_agp_mem_t    *entry;
+
+	if (!dev->agp || !dev->agp->acquired)
+		return -EINVAL;
+	if (copy_from_user(&request, (drm_agp_buffer_t __user *)arg, sizeof(request)))
+		return -EFAULT;
+	if (!(entry = drm_agp_lookup_entry(dev, request.handle)))
+		return -EINVAL;
+	if (entry->bound)
+		drm_unbind_agp(entry->memory);
+
+	if (entry->prev)
+		entry->prev->next = entry->next;
+	else
+		dev->agp->memory = entry->next;
+
+	if (entry->next)
+		entry->next->prev = entry->prev;
+
+	drm_free_agp(entry->memory, entry->pages);
+	drm_free(entry, sizeof(*entry), DRM_MEM_AGPLISTS);
+	return 0;
+}
+
+/**
+ * Initialize the AGP resources.
+ *
+ * \return pointer to a drm_agp_head structure.
+ *
+ */
+drm_agp_head_t *drm_agp_init(void)
+{
+	drm_agp_head_t *head         = NULL;
+
+	if (!(head = drm_alloc(sizeof(*head), DRM_MEM_AGPLISTS)))
+		return NULL;
+	memset((void *)head, 0, sizeof(*head));
+	agp_copy_info(&head->agp_info);
+	if (head->agp_info.chipset == NOT_SUPPORTED) {
+		drm_free(head, sizeof(*head), DRM_MEM_AGPLISTS);
+		return NULL;
+	}
+	head->memory = NULL;
+#if LINUX_VERSION_CODE <= 0x020408
+	head->cant_use_aperture = 0;
+	head->page_mask = ~(0xfff);
+#else
+	head->cant_use_aperture = head->agp_info.cant_use_aperture;
+	head->page_mask = head->agp_info.page_mask;
+#endif
+
+	return head;
+}
+
+/** Calls agp_allocate_memory() */
+DRM_AGP_MEM *drm_agp_allocate_memory(size_t pages, u32 type)
+{
+	return agp_allocate_memory(pages, type);
+}
+
+/** Calls agp_free_memory() */
+int drm_agp_free_memory(DRM_AGP_MEM *handle)
+{
+	if (!handle)
+		return 0;
+	agp_free_memory(handle);
+	return 1;
+}
+
+/** Calls agp_bind_memory() */
+int drm_agp_bind_memory(DRM_AGP_MEM *handle, off_t start)
+{
+	if (!handle)
+		return -EINVAL;
+	return agp_bind_memory(handle, start);
+}
+
+/** Calls agp_unbind_memory() */
+int drm_agp_unbind_memory(DRM_AGP_MEM *handle)
+{
+	if (!handle)
+		return -EINVAL;
+	return agp_unbind_memory(handle);
+}
+
+#endif /* __OS_HAS_AGP */
diff -Nru a/drivers/char/drm/drm_agpsupport.h b/drivers/char/drm/drm_agpsupport.h
--- a/drivers/char/drm/drm_agpsupport.h	2005-01-10 20:11:15 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,468 +0,0 @@
-/**
- * \file drm_agpsupport.h 
- * DRM support for AGP/GART backend
- *    
- * \author Rickard E. (Rik) Faith <faith@valinux.com>
- * \author Gareth Hughes <gareth@valinux.com>
- */
-
-/*
- * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
- * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "drmP.h"
-#include <linux/module.h>
-
-#if __OS_HAS_AGP
-
-#define DRM_AGP_GET (drm_agp_t *)inter_module_get("drm_agp")
-#define DRM_AGP_PUT inter_module_put("drm_agp")
-
-/**
- * Pointer to the drm_agp_t structure made available by the agpgart module.
- */
-static const drm_agp_t *drm_agp = NULL;
-
-/**
- * AGP information ioctl.
- *
- * \param inode device inode.
- * \param filp file pointer.
- * \param cmd command.
- * \param arg pointer to a (output) drm_agp_info structure.
- * \return zero on success or a negative number on failure.
- *
- * Verifies the AGP device has been initialized and acquired and fills in the
- * drm_agp_info structure with the information in drm_agp_head::agp_info.
- */
-int DRM(agp_info)(struct inode *inode, struct file *filp,
-		  unsigned int cmd, unsigned long arg)
-{
-	drm_file_t	 *priv	 = filp->private_data;
-	drm_device_t	 *dev	 = priv->dev;
-	DRM_AGP_KERN     *kern;
-	drm_agp_info_t   info;
-
-	if (!dev->agp || !dev->agp->acquired || !drm_agp->copy_info)
-		return -EINVAL;
-
-	kern                   = &dev->agp->agp_info;
-	info.agp_version_major = kern->version.major;
-	info.agp_version_minor = kern->version.minor;
-	info.mode              = kern->mode;
-	info.aperture_base     = kern->aper_base;
-	info.aperture_size     = kern->aper_size * 1024 * 1024;
-	info.memory_allowed    = kern->max_memory << PAGE_SHIFT;
-	info.memory_used       = kern->current_memory << PAGE_SHIFT;
-	info.id_vendor         = kern->device->vendor;
-	info.id_device         = kern->device->device;
-
-	if (copy_to_user((drm_agp_info_t __user *)arg, &info, sizeof(info)))
-		return -EFAULT;
-	return 0;
-}
-
-/**
- * Acquire the AGP device (ioctl).
- *
- * \param inode device inode.
- * \param filp file pointer.
- * \param cmd command.
- * \param arg user argument.
- * \return zero on success or a negative number on failure. 
- *
- * Verifies the AGP device hasn't been acquired before and calls
- * drm_agp->acquire().
- */
-int DRM(agp_acquire)(struct inode *inode, struct file *filp,
-		     unsigned int cmd, unsigned long arg)
-{
-	drm_file_t	 *priv	 = filp->private_data;
-	drm_device_t	 *dev	 = priv->dev;
-	int              retcode;
-
-	if (!dev->agp)
-		return -ENODEV;
-	if (dev->agp->acquired)
-		return -EBUSY;
-	if (!drm_agp->acquire)
-		return -EINVAL;
-	if ((retcode = drm_agp->acquire()))
-		return retcode;
-	dev->agp->acquired = 1;
-	return 0;
-}
-
-/**
- * Release the AGP device (ioctl).
- *
- * \param inode device inode.
- * \param filp file pointer.
- * \param cmd command.
- * \param arg user argument.
- * \return zero on success or a negative number on failure.
- *
- * Verifies the AGP device has been acquired and calls drm_agp->release().
- */
-int DRM(agp_release)(struct inode *inode, struct file *filp,
-		     unsigned int cmd, unsigned long arg)
-{
-	drm_file_t	 *priv	 = filp->private_data;
-	drm_device_t	 *dev	 = priv->dev;
-
-	if (!dev->agp || !dev->agp->acquired || !drm_agp->release)
-		return -EINVAL;
-	drm_agp->release();
-	dev->agp->acquired = 0;
-	return 0;
-
-}
-
-/**
- * Release the AGP device.
- *
- * Calls drm_agp->release().
- */
-void DRM(agp_do_release)(void)
-{
-	if (drm_agp->release)
-		drm_agp->release();
-}
-
-/**
- * Enable the AGP bus.
- * 
- * \param inode device inode.
- * \param filp file pointer.
- * \param cmd command.
- * \param arg pointer to a drm_agp_mode structure.
- * \return zero on success or a negative number on failure.
- *
- * Verifies the AGP device has been acquired but not enabled, and calls
- * drm_agp->enable().
- */
-int DRM(agp_enable)(struct inode *inode, struct file *filp,
-		    unsigned int cmd, unsigned long arg)
-{
-	drm_file_t	 *priv	 = filp->private_data;
-	drm_device_t	 *dev	 = priv->dev;
-	drm_agp_mode_t   mode;
-
-	if (!dev->agp || !dev->agp->acquired || !drm_agp->enable)
-		return -EINVAL;
-
-	if (copy_from_user(&mode, (drm_agp_mode_t __user *)arg, sizeof(mode)))
-		return -EFAULT;
-
-	dev->agp->mode    = mode.mode;
-	drm_agp->enable(mode.mode);
-	dev->agp->base    = dev->agp->agp_info.aper_base;
-	dev->agp->enabled = 1;
-	return 0;
-}
-
-/**
- * Allocate AGP memory.
- *
- * \param inode device inode.
- * \param filp file pointer.
- * \param cmd command.
- * \param arg pointer to a drm_agp_buffer structure.
- * \return zero on success or a negative number on failure.
- * 
- * Verifies the AGP device is present and has been acquired, allocates the
- * memory via alloc_agp() and creates a drm_agp_mem entry for it.
- */
-int DRM(agp_alloc)(struct inode *inode, struct file *filp,
-		   unsigned int cmd, unsigned long arg)
-{
-	drm_file_t	 *priv	 = filp->private_data;
-	drm_device_t	 *dev	 = priv->dev;
-	drm_agp_buffer_t request;
-	drm_agp_mem_t    *entry;
-	DRM_AGP_MEM      *memory;
-	unsigned long    pages;
-	u32 		 type;
-	drm_agp_buffer_t __user *argp = (void __user *)arg;
-
-	if (!dev->agp || !dev->agp->acquired)
-		return -EINVAL;
-	if (copy_from_user(&request, argp, sizeof(request)))
-		return -EFAULT;
-	if (!(entry = DRM(alloc)(sizeof(*entry), DRM_MEM_AGPLISTS)))
-		return -ENOMEM;
-
-   	memset(entry, 0, sizeof(*entry));
-
-	pages = (request.size + PAGE_SIZE - 1) / PAGE_SIZE;
-	type = (u32) request.type;
-
-	if (!(memory = DRM(alloc_agp)(pages, type))) {
-		DRM(free)(entry, sizeof(*entry), DRM_MEM_AGPLISTS);
-		return -ENOMEM;
-	}
-
-	entry->handle    = (unsigned long)memory->key + 1;
-	entry->memory    = memory;
-	entry->bound     = 0;
-	entry->pages     = pages;
-	entry->prev      = NULL;
-	entry->next      = dev->agp->memory;
-	if (dev->agp->memory)
-		dev->agp->memory->prev = entry;
-	dev->agp->memory = entry;
-
-	request.handle   = entry->handle;
-	request.physical = memory->physical;
-
-	if (copy_to_user(argp, &request, sizeof(request))) {
-		dev->agp->memory       = entry->next;
-		dev->agp->memory->prev = NULL;
-		DRM(free_agp)(memory, pages);
-		DRM(free)(entry, sizeof(*entry), DRM_MEM_AGPLISTS);
-		return -EFAULT;
-	}
-	return 0;
-}
-
-/**
- * Search for the AGP memory entry associated with a handle.
- *
- * \param dev DRM device structure.
- * \param handle AGP memory handle.
- * \return pointer to the drm_agp_mem structure associated with \p handle.
- * 
- * Walks through drm_agp_head::memory until finding a matching handle.
- */
-static drm_agp_mem_t *DRM(agp_lookup_entry)(drm_device_t *dev,
-					    unsigned long handle)
-{
-	drm_agp_mem_t *entry;
-
-	for (entry = dev->agp->memory; entry; entry = entry->next) {
-		if (entry->handle == handle)
-			return entry;
-	}
-	return NULL;
-}
-
-/**
- * Unbind AGP memory from the GATT (ioctl).
- *
- * \param inode device inode.
- * \param filp file pointer.
- * \param cmd command.
- * \param arg pointer to a drm_agp_binding structure.
- * \return zero on success or a negative number on failure.
- *
- * Verifies the AGP device is present and acquired, looks-up the AGP memory
- * entry and passes it to the unbind_agp() function.
- */
-int DRM(agp_unbind)(struct inode *inode, struct file *filp,
-		    unsigned int cmd, unsigned long arg)
-{
-	drm_file_t	  *priv	 = filp->private_data;
-	drm_device_t	  *dev	 = priv->dev;
-	drm_agp_binding_t request;
-	drm_agp_mem_t     *entry;
-	int ret;
-
-	if (!dev->agp || !dev->agp->acquired)
-		return -EINVAL;
-	if (copy_from_user(&request, (drm_agp_binding_t __user *)arg, sizeof(request)))
-		return -EFAULT;
-	if (!(entry = DRM(agp_lookup_entry)(dev, request.handle)))
-		return -EINVAL;
-	if (!entry->bound)
-		return -EINVAL;
-	ret = DRM(unbind_agp)(entry->memory);
-	if (ret == 0)
-	    entry->bound = 0;
-	return ret;
-}
-
-/**
- * Bind AGP memory into the GATT (ioctl)
- *
- * \param inode device inode.
- * \param filp file pointer.
- * \param cmd command.
- * \param arg pointer to a drm_agp_binding structure.
- * \return zero on success or a negative number on failure.
- *
- * Verifies the AGP device is present and has been acquired and that no memory
- * is currently bound into the GATT. Looks-up the AGP memory entry and passes
- * it to bind_agp() function.
- */
-int DRM(agp_bind)(struct inode *inode, struct file *filp,
-		  unsigned int cmd, unsigned long arg)
-{
-	drm_file_t	  *priv	 = filp->private_data;
-	drm_device_t	  *dev	 = priv->dev;
-	drm_agp_binding_t request;
-	drm_agp_mem_t     *entry;
-	int               retcode;
-	int               page;
-
-	if (!dev->agp || !dev->agp->acquired || !drm_agp->bind_memory)
-		return -EINVAL;
-	if (copy_from_user(&request, (drm_agp_binding_t __user *)arg, sizeof(request)))
-		return -EFAULT;
-	if (!(entry = DRM(agp_lookup_entry)(dev, request.handle)))
-		return -EINVAL;
-	if (entry->bound)
-		return -EINVAL;
-	page = (request.offset + PAGE_SIZE - 1) / PAGE_SIZE;
-	if ((retcode = DRM(bind_agp)(entry->memory, page)))
-		return retcode;
-	entry->bound = dev->agp->base + (page << PAGE_SHIFT);
-	DRM_DEBUG("base = 0x%lx entry->bound = 0x%lx\n",
-		  dev->agp->base, entry->bound);
-	return 0;
-}
-
-/**
- * Free AGP memory (ioctl).
- *
- * \param inode device inode.
- * \param filp file pointer.
- * \param cmd command.
- * \param arg pointer to a drm_agp_buffer structure.
- * \return zero on success or a negative number on failure.
- *
- * Verifies the AGP device is present and has been acquired and looks up the
- * AGP memory entry. If the memory it's currently bound, unbind it via
- * unbind_agp(). Frees it via free_agp() as well as the entry itself
- * and unlinks from the doubly linked list it's inserted in.
- */
-int DRM(agp_free)(struct inode *inode, struct file *filp,
-		  unsigned int cmd, unsigned long arg)
-{
-	drm_file_t	 *priv	 = filp->private_data;
-	drm_device_t	 *dev	 = priv->dev;
-	drm_agp_buffer_t request;
-	drm_agp_mem_t    *entry;
-
-	if (!dev->agp || !dev->agp->acquired)
-		return -EINVAL;
-	if (copy_from_user(&request, (drm_agp_buffer_t __user *)arg, sizeof(request)))
-		return -EFAULT;
-	if (!(entry = DRM(agp_lookup_entry)(dev, request.handle)))
-		return -EINVAL;
-	if (entry->bound)
-		DRM(unbind_agp)(entry->memory);
-
-	if (entry->prev)
-		entry->prev->next = entry->next;
-	else
-		dev->agp->memory = entry->next;
-
-	if (entry->next)
-		entry->next->prev = entry->prev;
-
-	DRM(free_agp)(entry->memory, entry->pages);
-	DRM(free)(entry, sizeof(*entry), DRM_MEM_AGPLISTS);
-	return 0;
-}
-
-/**
- * Initialize the AGP resources.
- *
- * \return pointer to a drm_agp_head structure.
- *
- * Gets the drm_agp_t structure which is made available by the agpgart module
- * via the inter_module_* functions. Creates and initializes a drm_agp_head
- * structure.
- */
-drm_agp_head_t *DRM(agp_init)(void)
-{
-	drm_agp_head_t *head         = NULL;
-
-	drm_agp = DRM_AGP_GET;
-	if (drm_agp) {
-		if (!(head = DRM(alloc)(sizeof(*head), DRM_MEM_AGPLISTS)))
-			return NULL;
-		memset((void *)head, 0, sizeof(*head));
-		drm_agp->copy_info(&head->agp_info);
-		if (head->agp_info.chipset == NOT_SUPPORTED) {
-			DRM(free)(head, sizeof(*head), DRM_MEM_AGPLISTS);
-			return NULL;
-		}
-		head->memory = NULL;
-#if LINUX_VERSION_CODE <= 0x020408
-		head->cant_use_aperture = 0;
-		head->page_mask = ~(0xfff);
-#else
-		head->cant_use_aperture = head->agp_info.cant_use_aperture;
-		head->page_mask = head->agp_info.page_mask;
-#endif
-	}
-	return head;
-}
-
-/**
- * Free the AGP resources.
- *
- * Releases the pointer in ::drm_agp.
- */
-void DRM(agp_uninit)(void)
-{
-	DRM_AGP_PUT;
-	drm_agp = NULL;
-}
-
-/** Calls drm_agp->allocate_memory() */
-DRM_AGP_MEM *DRM(agp_allocate_memory)(size_t pages, u32 type)
-{
-	if (!drm_agp->allocate_memory)
-		return NULL;
-	return drm_agp->allocate_memory(pages, type);
-}
-
-/** Calls drm_agp->free_memory() */
-int DRM(agp_free_memory)(DRM_AGP_MEM *handle)
-{
-	if (!handle || !drm_agp->free_memory)
-		return 0;
-	drm_agp->free_memory(handle);
-	return 1;
-}
-
-/** Calls drm_agp->bind_memory() */
-int DRM(agp_bind_memory)(DRM_AGP_MEM *handle, off_t start)
-{
-	if (!handle || !drm_agp->bind_memory)
-		return -EINVAL;
-	return drm_agp->bind_memory(handle, start);
-}
-
-/** Calls drm_agp->unbind_memory() */
-int DRM(agp_unbind_memory)(DRM_AGP_MEM *handle)
-{
-	if (!handle || !drm_agp->unbind_memory)
-		return -EINVAL;
-	return drm_agp->unbind_memory(handle);
-}
-
-#endif /* __OS_HAS_AGP */
diff -Nru a/drivers/char/drm/drm_auth.c b/drivers/char/drm/drm_auth.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/char/drm/drm_auth.c	2005-01-10 20:11:22 -08:00
@@ -0,0 +1,230 @@
+/**
+ * \file drm_auth.h 
+ * IOCTLs for authentication
+ *
+ * \author Rickard E. (Rik) Faith <faith@valinux.com>
+ * \author Gareth Hughes <gareth@valinux.com>
+ */
+
+/*
+ * Created: Tue Feb  2 08:37:54 1999 by faith@valinux.com
+ *
+ * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "drmP.h"
+
+/**
+ * Generate a hash key from a magic.
+ *
+ * \param magic magic.
+ * \return hash key.
+ *
+ * The key is the modulus of the hash table size, #DRM_HASH_SIZE, which must be
+ * a power of 2.
+ */
+static int drm_hash_magic(drm_magic_t magic)
+{
+	return magic & (DRM_HASH_SIZE-1);
+}
+
+/**
+ * Find the file with the given magic number.
+ *
+ * \param dev DRM device.
+ * \param magic magic number.
+ *
+ * Searches in drm_device::magiclist within all files with the same hash key
+ * the one with matching magic number, while holding the drm_device::struct_sem
+ * lock.
+ */
+static drm_file_t *drm_find_file(drm_device_t *dev, drm_magic_t magic)
+{
+	drm_file_t	  *retval = NULL;
+	drm_magic_entry_t *pt;
+	int		  hash	  = drm_hash_magic(magic);
+
+	down(&dev->struct_sem);
+	for (pt = dev->magiclist[hash].head; pt; pt = pt->next) {
+		if (pt->magic == magic) {
+			retval = pt->priv;
+			break;
+		}
+	}
+	up(&dev->struct_sem);
+	return retval;
+}
+
+/**
+ * Adds a magic number.
+ * 
+ * \param dev DRM device.
+ * \param priv file private data.
+ * \param magic magic number.
+ *
+ * Creates a drm_magic_entry structure and appends to the linked list
+ * associated the magic number hash key in drm_device::magiclist, while holding
+ * the drm_device::struct_sem lock.
+ */
+int drm_add_magic(drm_device_t *dev, drm_file_t *priv, drm_magic_t magic)
+{
+	int		  hash;
+	drm_magic_entry_t *entry;
+
+	DRM_DEBUG("%d\n", magic);
+
+	hash	     = drm_hash_magic(magic);
+	entry	     = drm_alloc(sizeof(*entry), DRM_MEM_MAGIC);
+	if (!entry) return -ENOMEM;
+	memset(entry, 0, sizeof(*entry));
+	entry->magic = magic;
+	entry->priv  = priv;
+	entry->next  = NULL;
+
+	down(&dev->struct_sem);
+	if (dev->magiclist[hash].tail) {
+		dev->magiclist[hash].tail->next = entry;
+		dev->magiclist[hash].tail	= entry;
+	} else {
+		dev->magiclist[hash].head	= entry;
+		dev->magiclist[hash].tail	= entry;
+	}
+	up(&dev->struct_sem);
+
+	return 0;
+}
+
+/**
+ * Remove a magic number.
+ * 
+ * \param dev DRM device.
+ * \param magic magic number.
+ *
+ * Searches and unlinks the entry in drm_device::magiclist with the magic
+ * number hash key, while holding the drm_device::struct_sem lock.
+ */
+int drm_remove_magic(drm_device_t *dev, drm_magic_t magic)
+{
+	drm_magic_entry_t *prev = NULL;
+	drm_magic_entry_t *pt;
+	int		  hash;
+
+
+	DRM_DEBUG("%d\n", magic);
+	hash = drm_hash_magic(magic);
+
+	down(&dev->struct_sem);
+	for (pt = dev->magiclist[hash].head; pt; prev = pt, pt = pt->next) {
+		if (pt->magic == magic) {
+			if (dev->magiclist[hash].head == pt) {
+				dev->magiclist[hash].head = pt->next;
+			}
+			if (dev->magiclist[hash].tail == pt) {
+				dev->magiclist[hash].tail = prev;
+			}
+			if (prev) {
+				prev->next = pt->next;
+			}
+			up(&dev->struct_sem);
+			return 0;
+		}
+	}
+	up(&dev->struct_sem);
+
+	drm_free(pt, sizeof(*pt), DRM_MEM_MAGIC);
+
+	return -EINVAL;
+}
+
+/**
+ * Get a unique magic number (ioctl).
+ *
+ * \param inode device inode.
+ * \param filp file pointer.
+ * \param cmd command.
+ * \param arg pointer to a resulting drm_auth structure.
+ * \return zero on success, or a negative number on failure.
+ *
+ * If there is a magic number in drm_file::magic then use it, otherwise
+ * searches an unique non-zero magic number and add it associating it with \p
+ * filp.
+ */
+int drm_getmagic(struct inode *inode, struct file *filp,
+		  unsigned int cmd, unsigned long arg)
+{
+	static drm_magic_t sequence = 0;
+	static spinlock_t  lock	    = SPIN_LOCK_UNLOCKED;
+	drm_file_t	   *priv    = filp->private_data;
+	drm_device_t	   *dev	    = priv->dev;
+	drm_auth_t	   auth;
+
+				/* Find unique magic */
+	if (priv->magic) {
+		auth.magic = priv->magic;
+	} else {
+		do {
+			spin_lock(&lock);
+			if (!sequence) ++sequence; /* reserve 0 */
+			auth.magic = sequence++;
+			spin_unlock(&lock);
+		} while (drm_find_file(dev, auth.magic));
+		priv->magic = auth.magic;
+		drm_add_magic(dev, priv, auth.magic);
+	}
+
+	DRM_DEBUG("%u\n", auth.magic);
+	if (copy_to_user((drm_auth_t __user *)arg, &auth, sizeof(auth)))
+		return -EFAULT;
+	return 0;
+}
+
+/**
+ * Authenticate with a magic.
+ *
+ * \param inode device inode.
+ * \param filp file pointer.
+ * \param cmd command.
+ * \param arg pointer to a drm_auth structure.
+ * \return zero if authentication successed, or a negative number otherwise.
+ *
+ * Checks if \p filp is associated with the magic number passed in \arg.
+ */
+int drm_authmagic(struct inode *inode, struct file *filp,
+		   unsigned int cmd, unsigned long arg)
+{
+	drm_file_t	   *priv    = filp->private_data;
+	drm_device_t	   *dev	    = priv->dev;
+	drm_auth_t	   auth;
+	drm_file_t	   *file;
+
+	if (copy_from_user(&auth, (drm_auth_t __user *)arg, sizeof(auth)))
+		return -EFAULT;
+	DRM_DEBUG("%u\n", auth.magic);
+	if ((file = drm_find_file(dev, auth.magic))) {
+		file->authenticated = 1;
+		drm_remove_magic(dev, auth.magic);
+		return 0;
+	}
+	return -EINVAL;
+}
diff -Nru a/drivers/char/drm/drm_auth.h b/drivers/char/drm/drm_auth.h
--- a/drivers/char/drm/drm_auth.h	2005-01-10 20:11:22 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,230 +0,0 @@
-/**
- * \file drm_auth.h 
- * IOCTLs for authentication
- *
- * \author Rickard E. (Rik) Faith <faith@valinux.com>
- * \author Gareth Hughes <gareth@valinux.com>
- */
-
-/*
- * Created: Tue Feb  2 08:37:54 1999 by faith@valinux.com
- *
- * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
- * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "drmP.h"
-
-/**
- * Generate a hash key from a magic.
- *
- * \param magic magic.
- * \return hash key.
- *
- * The key is the modulus of the hash table size, #DRM_HASH_SIZE, which must be
- * a power of 2.
- */
-static int DRM(hash_magic)(drm_magic_t magic)
-{
-	return magic & (DRM_HASH_SIZE-1);
-}
-
-/**
- * Find the file with the given magic number.
- *
- * \param dev DRM device.
- * \param magic magic number.
- *
- * Searches in drm_device::magiclist within all files with the same hash key
- * the one with matching magic number, while holding the drm_device::struct_sem
- * lock.
- */
-static drm_file_t *DRM(find_file)(drm_device_t *dev, drm_magic_t magic)
-{
-	drm_file_t	  *retval = NULL;
-	drm_magic_entry_t *pt;
-	int		  hash	  = DRM(hash_magic)(magic);
-
-	down(&dev->struct_sem);
-	for (pt = dev->magiclist[hash].head; pt; pt = pt->next) {
-		if (pt->magic == magic) {
-			retval = pt->priv;
-			break;
-		}
-	}
-	up(&dev->struct_sem);
-	return retval;
-}
-
-/**
- * Adds a magic number.
- * 
- * \param dev DRM device.
- * \param priv file private data.
- * \param magic magic number.
- *
- * Creates a drm_magic_entry structure and appends to the linked list
- * associated the magic number hash key in drm_device::magiclist, while holding
- * the drm_device::struct_sem lock.
- */
-int DRM(add_magic)(drm_device_t *dev, drm_file_t *priv, drm_magic_t magic)
-{
-	int		  hash;
-	drm_magic_entry_t *entry;
-
-	DRM_DEBUG("%d\n", magic);
-
-	hash	     = DRM(hash_magic)(magic);
-	entry	     = DRM(alloc)(sizeof(*entry), DRM_MEM_MAGIC);
-	if (!entry) return -ENOMEM;
-	memset(entry, 0, sizeof(*entry));
-	entry->magic = magic;
-	entry->priv  = priv;
-	entry->next  = NULL;
-
-	down(&dev->struct_sem);
-	if (dev->magiclist[hash].tail) {
-		dev->magiclist[hash].tail->next = entry;
-		dev->magiclist[hash].tail	= entry;
-	} else {
-		dev->magiclist[hash].head	= entry;
-		dev->magiclist[hash].tail	= entry;
-	}
-	up(&dev->struct_sem);
-
-	return 0;
-}
-
-/**
- * Remove a magic number.
- * 
- * \param dev DRM device.
- * \param magic magic number.
- *
- * Searches and unlinks the entry in drm_device::magiclist with the magic
- * number hash key, while holding the drm_device::struct_sem lock.
- */
-int DRM(remove_magic)(drm_device_t *dev, drm_magic_t magic)
-{
-	drm_magic_entry_t *prev = NULL;
-	drm_magic_entry_t *pt;
-	int		  hash;
-
-
-	DRM_DEBUG("%d\n", magic);
-	hash = DRM(hash_magic)(magic);
-
-	down(&dev->struct_sem);
-	for (pt = dev->magiclist[hash].head; pt; prev = pt, pt = pt->next) {
-		if (pt->magic == magic) {
-			if (dev->magiclist[hash].head == pt) {
-				dev->magiclist[hash].head = pt->next;
-			}
-			if (dev->magiclist[hash].tail == pt) {
-				dev->magiclist[hash].tail = prev;
-			}
-			if (prev) {
-				prev->next = pt->next;
-			}
-			up(&dev->struct_sem);
-			return 0;
-		}
-	}
-	up(&dev->struct_sem);
-
-	DRM(free)(pt, sizeof(*pt), DRM_MEM_MAGIC);
-
-	return -EINVAL;
-}
-
-/**
- * Get a unique magic number (ioctl).
- *
- * \param inode device inode.
- * \param filp file pointer.
- * \param cmd command.
- * \param arg pointer to a resulting drm_auth structure.
- * \return zero on success, or a negative number on failure.
- *
- * If there is a magic number in drm_file::magic then use it, otherwise
- * searches an unique non-zero magic number and add it associating it with \p
- * filp.
- */
-int DRM(getmagic)(struct inode *inode, struct file *filp,
-		  unsigned int cmd, unsigned long arg)
-{
-	static drm_magic_t sequence = 0;
-	static spinlock_t  lock	    = SPIN_LOCK_UNLOCKED;
-	drm_file_t	   *priv    = filp->private_data;
-	drm_device_t	   *dev	    = priv->dev;
-	drm_auth_t	   auth;
-
-				/* Find unique magic */
-	if (priv->magic) {
-		auth.magic = priv->magic;
-	} else {
-		do {
-			spin_lock(&lock);
-			if (!sequence) ++sequence; /* reserve 0 */
-			auth.magic = sequence++;
-			spin_unlock(&lock);
-		} while (DRM(find_file)(dev, auth.magic));
-		priv->magic = auth.magic;
-		DRM(add_magic)(dev, priv, auth.magic);
-	}
-
-	DRM_DEBUG("%u\n", auth.magic);
-	if (copy_to_user((drm_auth_t __user *)arg, &auth, sizeof(auth)))
-		return -EFAULT;
-	return 0;
-}
-
-/**
- * Authenticate with a magic.
- *
- * \param inode device inode.
- * \param filp file pointer.
- * \param cmd command.
- * \param arg pointer to a drm_auth structure.
- * \return zero if authentication successed, or a negative number otherwise.
- *
- * Checks if \p filp is associated with the magic number passed in \arg.
- */
-int DRM(authmagic)(struct inode *inode, struct file *filp,
-		   unsigned int cmd, unsigned long arg)
-{
-	drm_file_t	   *priv    = filp->private_data;
-	drm_device_t	   *dev	    = priv->dev;
-	drm_auth_t	   auth;
-	drm_file_t	   *file;
-
-	if (copy_from_user(&auth, (drm_auth_t __user *)arg, sizeof(auth)))
-		return -EFAULT;
-	DRM_DEBUG("%u\n", auth.magic);
-	if ((file = DRM(find_file)(dev, auth.magic))) {
-		file->authenticated = 1;
-		DRM(remove_magic)(dev, auth.magic);
-		return 0;
-	}
-	return -EINVAL;
-}
diff -Nru a/drivers/char/drm/drm_bufs.c b/drivers/char/drm/drm_bufs.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/char/drm/drm_bufs.c	2005-01-10 20:11:17 -08:00
@@ -0,0 +1,1270 @@
+/**
+ * \file drm_bufs.h 
+ * Generic buffer template
+ * 
+ * \author Rickard E. (Rik) Faith <faith@valinux.com>
+ * \author Gareth Hughes <gareth@valinux.com>
+ */
+
+/*
+ * Created: Thu Nov 23 03:10:50 2000 by gareth@valinux.com
+ *
+ * Copyright 1999, 2000 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include <linux/vmalloc.h>
+#include "drmP.h"
+
+/**
+ * Compute size order.  Returns the exponent of the smaller power of two which
+ * is greater or equal to given number.
+ * 
+ * \param size size.
+ * \return order.
+ *
+ * \todo Can be made faster.
+ */
+int drm_order( unsigned long size )
+{
+	int order;
+	unsigned long tmp;
+
+	for (order = 0, tmp = size >> 1; tmp; tmp >>= 1, order++)
+		;
+
+	if (size & (size - 1))
+		++order;
+
+	return order;
+}
+EXPORT_SYMBOL(drm_order);
+
+/**
+ * Ioctl to specify a range of memory that is available for mapping by a non-root process.
+ *
+ * \param inode device inode.
+ * \param filp file pointer.
+ * \param cmd command.
+ * \param arg pointer to a drm_map structure.
+ * \return zero on success or a negative value on error.
+ *
+ * Adjusts the memory offset to its absolute value according to the mapping
+ * type.  Adds the map to the map list drm_device::maplist. Adds MTRR's where
+ * applicable and if supported by the kernel.
+ */
+int drm_addmap( struct inode *inode, struct file *filp,
+		 unsigned int cmd, unsigned long arg )
+{
+	drm_file_t *priv = filp->private_data;
+	drm_device_t *dev = priv->dev;
+	drm_map_t *map;
+	drm_map_t __user *argp = (void __user *)arg;
+	drm_map_list_t *list;
+
+	if ( !(filp->f_mode & 3) ) return -EACCES; /* Require read/write */
+
+	map = drm_alloc( sizeof(*map), DRM_MEM_MAPS );
+	if ( !map )
+		return -ENOMEM;
+
+	if ( copy_from_user( map, argp, sizeof(*map) ) ) {
+		drm_free( map, sizeof(*map), DRM_MEM_MAPS );
+		return -EFAULT;
+	}
+
+	/* Only allow shared memory to be removable since we only keep enough
+	 * book keeping information about shared memory to allow for removal
+	 * when processes fork.
+	 */
+	if ( (map->flags & _DRM_REMOVABLE) && map->type != _DRM_SHM ) {
+		drm_free( map, sizeof(*map), DRM_MEM_MAPS );
+		return -EINVAL;
+	}
+	DRM_DEBUG( "offset = 0x%08lx, size = 0x%08lx, type = %d\n",
+		   map->offset, map->size, map->type );
+	if ( (map->offset & (~PAGE_MASK)) || (map->size & (~PAGE_MASK)) ) {
+		drm_free( map, sizeof(*map), DRM_MEM_MAPS );
+		return -EINVAL;
+	}
+	map->mtrr   = -1;
+	map->handle = NULL;
+
+	switch ( map->type ) {
+	case _DRM_REGISTERS:
+	case _DRM_FRAME_BUFFER:
+#if !defined(__sparc__) && !defined(__alpha__) && !defined(__ia64__)
+		if ( map->offset + map->size < map->offset ||
+		     map->offset < virt_to_phys(high_memory) ) {
+			drm_free( map, sizeof(*map), DRM_MEM_MAPS );
+			return -EINVAL;
+		}
+#endif
+#ifdef __alpha__
+		map->offset += dev->hose->mem_space->start;
+#endif
+		if (drm_core_has_MTRR(dev)) {
+			if ( map->type == _DRM_FRAME_BUFFER ||
+			     (map->flags & _DRM_WRITE_COMBINING) ) {
+				map->mtrr = mtrr_add( map->offset, map->size,
+						      MTRR_TYPE_WRCOMB, 1 );
+			}
+		}
+		if (map->type == _DRM_REGISTERS)
+			map->handle = drm_ioremap( map->offset, map->size,
+						    dev );
+		break;
+
+	case _DRM_SHM:
+		map->handle = vmalloc_32(map->size);
+		DRM_DEBUG( "%lu %d %p\n",
+			   map->size, drm_order( map->size ), map->handle );
+		if ( !map->handle ) {
+			drm_free( map, sizeof(*map), DRM_MEM_MAPS );
+			return -ENOMEM;
+		}
+		map->offset = (unsigned long)map->handle;
+		if ( map->flags & _DRM_CONTAINS_LOCK ) {
+			/* Prevent a 2nd X Server from creating a 2nd lock */
+			if (dev->lock.hw_lock != NULL) {
+				vfree( map->handle );
+				drm_free( map, sizeof(*map), DRM_MEM_MAPS );
+				return -EBUSY;
+			}
+			dev->sigdata.lock =
+			dev->lock.hw_lock = map->handle; /* Pointer to lock */
+		}
+		break;
+	case _DRM_AGP:
+		if (drm_core_has_AGP(dev)) {
+#ifdef __alpha__
+			map->offset += dev->hose->mem_space->start;
+#endif
+			map->offset += dev->agp->base;
+			map->mtrr   = dev->agp->agp_mtrr; /* for getmap */
+		}
+		break;
+	case _DRM_SCATTER_GATHER:
+		if (!dev->sg) {
+			drm_free(map, sizeof(*map), DRM_MEM_MAPS);
+			return -EINVAL;
+		}
+		map->offset += dev->sg->handle;
+		break;
+
+	default:
+		drm_free( map, sizeof(*map), DRM_MEM_MAPS );
+		return -EINVAL;
+	}
+
+	list = drm_alloc(sizeof(*list), DRM_MEM_MAPS);
+	if(!list) {
+		drm_free(map, sizeof(*map), DRM_MEM_MAPS);
+		return -EINVAL;
+	}
+	memset(list, 0, sizeof(*list));
+	list->map = map;
+
+	down(&dev->struct_sem);
+	list_add(&list->head, &dev->maplist->head);
+ 	up(&dev->struct_sem);
+
+	if ( copy_to_user( argp, map, sizeof(*map) ) )
+		return -EFAULT;
+	if ( map->type != _DRM_SHM ) {
+		if ( copy_to_user( &argp->handle,
+				   &map->offset,
+				   sizeof(map->offset) ) )
+			return -EFAULT;
+	}
+	return 0;
+}
+
+
+/**
+ * Remove a map private from list and deallocate resources if the mapping
+ * isn't in use.
+ *
+ * \param inode device inode.
+ * \param filp file pointer.
+ * \param cmd command.
+ * \param arg pointer to a drm_map_t structure.
+ * \return zero on success or a negative value on error.
+ *
+ * Searches the map on drm_device::maplist, removes it from the list, see if
+ * its being used, and free any associate resource (such as MTRR's) if it's not
+ * being on use.
+ *
+ * \sa addmap().
+ */
+int drm_rmmap(struct inode *inode, struct file *filp,
+	       unsigned int cmd, unsigned long arg)
+{
+	drm_file_t	*priv	= filp->private_data;
+	drm_device_t	*dev	= priv->dev;
+	struct list_head *list;
+	drm_map_list_t *r_list = NULL;
+	drm_vma_entry_t *pt, *prev;
+	drm_map_t *map;
+	drm_map_t request;
+	int found_maps = 0;
+
+	if (copy_from_user(&request, (drm_map_t __user *)arg,
+			   sizeof(request))) {
+		return -EFAULT;
+	}
+
+	down(&dev->struct_sem);
+	list = &dev->maplist->head;
+	list_for_each(list, &dev->maplist->head) {
+		r_list = list_entry(list, drm_map_list_t, head);
+
+		if(r_list->map &&
+		   r_list->map->handle == request.handle &&
+		   r_list->map->flags & _DRM_REMOVABLE) break;
+	}
+
+	/* List has wrapped around to the head pointer, or its empty we didn't
+	 * find anything.
+	 */
+	if(list == (&dev->maplist->head)) {
+		up(&dev->struct_sem);
+		return -EINVAL;
+	}
+	map = r_list->map;
+	list_del(list);
+	drm_free(list, sizeof(*list), DRM_MEM_MAPS);
+
+	for (pt = dev->vmalist, prev = NULL; pt; prev = pt, pt = pt->next) {
+		if (pt->vma->vm_private_data == map) found_maps++;
+	}
+
+	if(!found_maps) {
+		switch (map->type) {
+		case _DRM_REGISTERS:
+		case _DRM_FRAME_BUFFER:
+		  if (drm_core_has_MTRR(dev)) {
+				if (map->mtrr >= 0) {
+					int retcode;
+					retcode = mtrr_del(map->mtrr,
+							   map->offset,
+							   map->size);
+					DRM_DEBUG("mtrr_del = %d\n", retcode);
+				}
+			}
+			drm_ioremapfree(map->handle, map->size, dev);
+			break;
+		case _DRM_SHM:
+			vfree(map->handle);
+			break;
+		case _DRM_AGP:
+		case _DRM_SCATTER_GATHER:
+			break;
+		}
+		drm_free(map, sizeof(*map), DRM_MEM_MAPS);
+	}
+	up(&dev->struct_sem);
+	return 0;
+}
+
+/**
+ * Cleanup after an error on one of the addbufs() functions.
+ *
+ * \param entry buffer entry where the error occurred.
+ *
+ * Frees any pages and buffers associated with the given entry.
+ */
+static void drm_cleanup_buf_error(drm_device_t *dev, drm_buf_entry_t *entry)
+{
+	int i;
+
+	if (entry->seg_count) {
+		for (i = 0; i < entry->seg_count; i++) {
+			if (entry->seglist[i]) {
+				drm_free_pages(entry->seglist[i],
+					        entry->page_order,
+					        DRM_MEM_DMA);
+			}
+		}
+		drm_free(entry->seglist,
+			  entry->seg_count *
+			  sizeof(*entry->seglist),
+			  DRM_MEM_SEGS);
+
+		entry->seg_count = 0;
+	}
+
+   	if (entry->buf_count) {
+	   	for (i = 0; i < entry->buf_count; i++) {
+			if (entry->buflist[i].dev_private) {
+				drm_free(entry->buflist[i].dev_private,
+					  entry->buflist[i].dev_priv_size,
+					  DRM_MEM_BUFS);
+			}
+		}
+		drm_free(entry->buflist,
+			  entry->buf_count *
+			  sizeof(*entry->buflist),
+			  DRM_MEM_BUFS);
+
+		entry->buf_count = 0;
+	}
+}
+
+#if __OS_HAS_AGP
+/**
+ * Add AGP buffers for DMA transfers (ioctl).
+ *
+ * \param inode device inode.
+ * \param filp file pointer.
+ * \param cmd command.
+ * \param arg pointer to a drm_buf_desc_t request.
+ * \return zero on success or a negative number on failure.
+ * 
+ * After some sanity checks creates a drm_buf structure for each buffer and
+ * reallocates the buffer list of the same size order to accommodate the new
+ * buffers.
+ */
+int drm_addbufs_agp( struct inode *inode, struct file *filp,
+		      unsigned int cmd, unsigned long arg )
+{
+	drm_file_t *priv = filp->private_data;
+	drm_device_t *dev = priv->dev;
+	drm_device_dma_t *dma = dev->dma;
+	drm_buf_desc_t request;
+	drm_buf_entry_t *entry;
+	drm_buf_t *buf;
+	unsigned long offset;
+	unsigned long agp_offset;
+	int count;
+	int order;
+	int size;
+	int alignment;
+	int page_order;
+	int total;
+	int byte_count;
+	int i;
+	drm_buf_t **temp_buflist;
+	drm_buf_desc_t __user *argp = (void __user *)arg;
+
+	if ( !dma ) return -EINVAL;
+
+	if ( copy_from_user( &request, argp,
+			     sizeof(request) ) )
+		return -EFAULT;
+
+	count = request.count;
+	order = drm_order( request.size );
+	size = 1 << order;
+
+	alignment  = (request.flags & _DRM_PAGE_ALIGN)
+		? PAGE_ALIGN(size) : size;
+	page_order = order - PAGE_SHIFT > 0 ? order - PAGE_SHIFT : 0;
+	total = PAGE_SIZE << page_order;
+
+	byte_count = 0;
+	agp_offset = dev->agp->base + request.agp_start;
+
+	DRM_DEBUG( "count:      %d\n",  count );
+	DRM_DEBUG( "order:      %d\n",  order );
+	DRM_DEBUG( "size:       %d\n",  size );
+	DRM_DEBUG( "agp_offset: %lu\n", agp_offset );
+	DRM_DEBUG( "alignment:  %d\n",  alignment );
+	DRM_DEBUG( "page_order: %d\n",  page_order );
+	DRM_DEBUG( "total:      %d\n",  total );
+
+	if ( order < DRM_MIN_ORDER || order > DRM_MAX_ORDER ) return -EINVAL;
+	if ( dev->queue_count ) return -EBUSY; /* Not while in use */
+
+	spin_lock( &dev->count_lock );
+	if ( dev->buf_use ) {
+		spin_unlock( &dev->count_lock );
+		return -EBUSY;
+	}
+	atomic_inc( &dev->buf_alloc );
+	spin_unlock( &dev->count_lock );
+
+	down( &dev->struct_sem );
+	entry = &dma->bufs[order];
+	if ( entry->buf_count ) {
+		up( &dev->struct_sem );
+		atomic_dec( &dev->buf_alloc );
+		return -ENOMEM; /* May only call once for each order */
+	}
+
+	if (count < 0 || count > 4096) {
+		up( &dev->struct_sem );
+		atomic_dec( &dev->buf_alloc );
+		return -EINVAL;
+	}
+
+	entry->buflist = drm_alloc( count * sizeof(*entry->buflist),
+				    DRM_MEM_BUFS );
+	if ( !entry->buflist ) {
+		up( &dev->struct_sem );
+		atomic_dec( &dev->buf_alloc );
+		return -ENOMEM;
+	}
+	memset( entry->buflist, 0, count * sizeof(*entry->buflist) );
+
+	entry->buf_size = size;
+	entry->page_order = page_order;
+
+	offset = 0;
+
+	while ( entry->buf_count < count ) {
+		buf          = &entry->buflist[entry->buf_count];
+		buf->idx     = dma->buf_count + entry->buf_count;
+		buf->total   = alignment;
+		buf->order   = order;
+		buf->used    = 0;
+
+		buf->offset  = (dma->byte_count + offset);
+		buf->bus_address = agp_offset + offset;
+		buf->address = (void *)(agp_offset + offset);
+		buf->next    = NULL;
+		buf->waiting = 0;
+		buf->pending = 0;
+		init_waitqueue_head( &buf->dma_wait );
+		buf->filp    = NULL;
+
+		buf->dev_priv_size = dev->driver->dev_priv_size;
+		buf->dev_private = drm_alloc( buf->dev_priv_size,
+					       DRM_MEM_BUFS );
+		if(!buf->dev_private) {
+			/* Set count correctly so we free the proper amount. */
+			entry->buf_count = count;
+			drm_cleanup_buf_error(dev,entry);
+			up( &dev->struct_sem );
+			atomic_dec( &dev->buf_alloc );
+			return -ENOMEM;
+		}
+		memset( buf->dev_private, 0, buf->dev_priv_size );
+
+		DRM_DEBUG( "buffer %d @ %p\n",
+			   entry->buf_count, buf->address );
+
+		offset += alignment;
+		entry->buf_count++;
+		byte_count += PAGE_SIZE << page_order;
+	}
+
+	DRM_DEBUG( "byte_count: %d\n", byte_count );
+
+	temp_buflist = drm_realloc( dma->buflist,
+				     dma->buf_count * sizeof(*dma->buflist),
+				     (dma->buf_count + entry->buf_count)
+				     * sizeof(*dma->buflist),
+				     DRM_MEM_BUFS );
+	if(!temp_buflist) {
+		/* Free the entry because it isn't valid */
+		drm_cleanup_buf_error(dev,entry);
+		up( &dev->struct_sem );
+		atomic_dec( &dev->buf_alloc );
+		return -ENOMEM;
+	}
+	dma->buflist = temp_buflist;
+
+	for ( i = 0 ; i < entry->buf_count ; i++ ) {
+		dma->buflist[i + dma->buf_count] = &entry->buflist[i];
+	}
+
+	dma->buf_count += entry->buf_count;
+	dma->byte_count += byte_count;
+
+	DRM_DEBUG( "dma->buf_count : %d\n", dma->buf_count );
+	DRM_DEBUG( "entry->buf_count : %d\n", entry->buf_count );
+
+	up( &dev->struct_sem );
+
+	request.count = entry->buf_count;
+	request.size = size;
+
+	if ( copy_to_user( argp, &request, sizeof(request) ) )
+		return -EFAULT;
+
+	dma->flags = _DRM_DMA_USE_AGP;
+
+	atomic_dec( &dev->buf_alloc );
+	return 0;
+}
+#endif /* __OS_HAS_AGP */
+
+int drm_addbufs_pci( struct inode *inode, struct file *filp,
+		      unsigned int cmd, unsigned long arg )
+{
+   	drm_file_t *priv = filp->private_data;
+	drm_device_t *dev = priv->dev;
+	drm_device_dma_t *dma = dev->dma;
+	drm_buf_desc_t request;
+	int count;
+	int order;
+	int size;
+	int total;
+	int page_order;
+	drm_buf_entry_t *entry;
+	unsigned long page;
+	drm_buf_t *buf;
+	int alignment;
+	unsigned long offset;
+	int i;
+	int byte_count;
+	int page_count;
+	unsigned long *temp_pagelist;
+	drm_buf_t **temp_buflist;
+	drm_buf_desc_t __user *argp = (void __user *)arg;
+
+	if (!drm_core_check_feature(dev, DRIVER_PCI_DMA)) return -EINVAL;
+	if ( !dma ) return -EINVAL;
+
+	if ( copy_from_user( &request, argp, sizeof(request) ) )
+		return -EFAULT;
+
+	count = request.count;
+	order = drm_order( request.size );
+	size = 1 << order;
+
+	DRM_DEBUG( "count=%d, size=%d (%d), order=%d, queue_count=%d\n",
+		   request.count, request.size, size,
+		   order, dev->queue_count );
+
+	if ( order < DRM_MIN_ORDER || order > DRM_MAX_ORDER ) return -EINVAL;
+	if ( dev->queue_count ) return -EBUSY; /* Not while in use */
+
+	alignment = (request.flags & _DRM_PAGE_ALIGN)
+		? PAGE_ALIGN(size) : size;
+	page_order = order - PAGE_SHIFT > 0 ? order - PAGE_SHIFT : 0;
+	total = PAGE_SIZE << page_order;
+
+	spin_lock( &dev->count_lock );
+	if ( dev->buf_use ) {
+		spin_unlock( &dev->count_lock );
+		return -EBUSY;
+	}
+	atomic_inc( &dev->buf_alloc );
+	spin_unlock( &dev->count_lock );
+
+	down( &dev->struct_sem );
+	entry = &dma->bufs[order];
+	if ( entry->buf_count ) {
+		up( &dev->struct_sem );
+		atomic_dec( &dev->buf_alloc );
+		return -ENOMEM;	/* May only call once for each order */
+	}
+
+	if (count < 0 || count > 4096) {
+		up( &dev->struct_sem );
+		atomic_dec( &dev->buf_alloc );
+		return -EINVAL;
+	}
+
+	entry->buflist = drm_alloc( count * sizeof(*entry->buflist),
+				    DRM_MEM_BUFS );
+	if ( !entry->buflist ) {
+		up( &dev->struct_sem );
+		atomic_dec( &dev->buf_alloc );
+		return -ENOMEM;
+	}
+	memset( entry->buflist, 0, count * sizeof(*entry->buflist) );
+
+	entry->seglist = drm_alloc( count * sizeof(*entry->seglist),
+				    DRM_MEM_SEGS );
+	if ( !entry->seglist ) {
+		drm_free( entry->buflist,
+			  count * sizeof(*entry->buflist),
+			  DRM_MEM_BUFS );
+		up( &dev->struct_sem );
+		atomic_dec( &dev->buf_alloc );
+		return -ENOMEM;
+	}
+	memset( entry->seglist, 0, count * sizeof(*entry->seglist) );
+
+	/* Keep the original pagelist until we know all the allocations
+	 * have succeeded
+	 */
+	temp_pagelist = drm_alloc( (dma->page_count + (count << page_order))
+				    * sizeof(*dma->pagelist),
+				    DRM_MEM_PAGES );
+	if (!temp_pagelist) {
+		drm_free( entry->buflist,
+			   count * sizeof(*entry->buflist),
+			   DRM_MEM_BUFS );
+		drm_free( entry->seglist,
+			   count * sizeof(*entry->seglist),
+			   DRM_MEM_SEGS );
+		up( &dev->struct_sem );
+		atomic_dec( &dev->buf_alloc );
+		return -ENOMEM;
+	}
+	memcpy(temp_pagelist,
+	       dma->pagelist,
+	       dma->page_count * sizeof(*dma->pagelist));
+	DRM_DEBUG( "pagelist: %d entries\n",
+		   dma->page_count + (count << page_order) );
+
+	entry->buf_size	= size;
+	entry->page_order = page_order;
+	byte_count = 0;
+	page_count = 0;
+
+	while ( entry->buf_count < count ) {
+		page = drm_alloc_pages( page_order, DRM_MEM_DMA );
+		if ( !page ) {
+			/* Set count correctly so we free the proper amount. */
+			entry->buf_count = count;
+			entry->seg_count = count;
+			drm_cleanup_buf_error(dev, entry);
+			drm_free( temp_pagelist,
+				   (dma->page_count + (count << page_order))
+				   * sizeof(*dma->pagelist),
+				   DRM_MEM_PAGES );
+			up( &dev->struct_sem );
+			atomic_dec( &dev->buf_alloc );
+			return -ENOMEM;
+		}
+		entry->seglist[entry->seg_count++] = page;
+		for ( i = 0 ; i < (1 << page_order) ; i++ ) {
+			DRM_DEBUG( "page %d @ 0x%08lx\n",
+				   dma->page_count + page_count,
+				   page + PAGE_SIZE * i );
+			temp_pagelist[dma->page_count + page_count++]
+				= page + PAGE_SIZE * i;
+		}
+		for ( offset = 0 ;
+		      offset + size <= total && entry->buf_count < count ;
+		      offset += alignment, ++entry->buf_count ) {
+			buf	     = &entry->buflist[entry->buf_count];
+			buf->idx     = dma->buf_count + entry->buf_count;
+			buf->total   = alignment;
+			buf->order   = order;
+			buf->used    = 0;
+			buf->offset  = (dma->byte_count + byte_count + offset);
+			buf->address = (void *)(page + offset);
+			buf->next    = NULL;
+			buf->waiting = 0;
+			buf->pending = 0;
+			init_waitqueue_head( &buf->dma_wait );
+			buf->filp    = NULL;
+
+			buf->dev_priv_size = dev->driver->dev_priv_size;
+			buf->dev_private = drm_alloc( buf->dev_priv_size,
+						       DRM_MEM_BUFS );
+			if(!buf->dev_private) {
+				/* Set count correctly so we free the proper amount. */
+				entry->buf_count = count;
+				entry->seg_count = count;
+				drm_cleanup_buf_error(dev,entry);
+				drm_free( temp_pagelist,
+					   (dma->page_count + (count << page_order))
+					   * sizeof(*dma->pagelist),
+					   DRM_MEM_PAGES );
+				up( &dev->struct_sem );
+				atomic_dec( &dev->buf_alloc );
+				return -ENOMEM;
+			}
+			memset( buf->dev_private, 0, buf->dev_priv_size );
+
+			DRM_DEBUG( "buffer %d @ %p\n",
+				   entry->buf_count, buf->address );
+		}
+		byte_count += PAGE_SIZE << page_order;
+	}
+
+	temp_buflist = drm_realloc( dma->buflist,
+				     dma->buf_count * sizeof(*dma->buflist),
+				     (dma->buf_count + entry->buf_count)
+				     * sizeof(*dma->buflist),
+				     DRM_MEM_BUFS );
+	if (!temp_buflist) {
+		/* Free the entry because it isn't valid */
+		drm_cleanup_buf_error(dev,entry);
+		drm_free( temp_pagelist,
+			   (dma->page_count + (count << page_order))
+			   * sizeof(*dma->pagelist),
+			   DRM_MEM_PAGES );
+		up( &dev->struct_sem );
+		atomic_dec( &dev->buf_alloc );
+		return -ENOMEM;
+	}
+	dma->buflist = temp_buflist;
+
+	for ( i = 0 ; i < entry->buf_count ; i++ ) {
+		dma->buflist[i + dma->buf_count] = &entry->buflist[i];
+	}
+
+	/* No allocations failed, so now we can replace the orginal pagelist
+	 * with the new one.
+	 */
+	if (dma->page_count) {
+		drm_free(dma->pagelist,
+			  dma->page_count * sizeof(*dma->pagelist),
+			  DRM_MEM_PAGES);
+	}
+	dma->pagelist = temp_pagelist;
+
+	dma->buf_count += entry->buf_count;
+	dma->seg_count += entry->seg_count;
+	dma->page_count += entry->seg_count << page_order;
+	dma->byte_count += PAGE_SIZE * (entry->seg_count << page_order);
+
+	up( &dev->struct_sem );
+
+	request.count = entry->buf_count;
+	request.size = size;
+
+	if ( copy_to_user( argp, &request, sizeof(request) ) )
+		return -EFAULT;
+
+	atomic_dec( &dev->buf_alloc );
+	return 0;
+
+}
+
+int drm_addbufs_sg( struct inode *inode, struct file *filp,
+                     unsigned int cmd, unsigned long arg )
+{
+	drm_file_t *priv = filp->private_data;
+	drm_device_t *dev = priv->dev;
+	drm_device_dma_t *dma = dev->dma;
+	drm_buf_desc_t __user *argp = (void __user *)arg;
+	drm_buf_desc_t request;
+	drm_buf_entry_t *entry;
+	drm_buf_t *buf;
+	unsigned long offset;
+	unsigned long agp_offset;
+	int count;
+	int order;
+	int size;
+	int alignment;
+	int page_order;
+	int total;
+	int byte_count;
+	int i;
+	drm_buf_t **temp_buflist;
+
+	if (!drm_core_check_feature(dev, DRIVER_SG)) return -EINVAL;
+	
+	if ( !dma ) return -EINVAL;
+
+	if ( copy_from_user( &request, argp, sizeof(request) ) )
+		return -EFAULT;
+
+	count = request.count;
+	order = drm_order( request.size );
+	size = 1 << order;
+
+	alignment  = (request.flags & _DRM_PAGE_ALIGN)
+			? PAGE_ALIGN(size) : size;
+	page_order = order - PAGE_SHIFT > 0 ? order - PAGE_SHIFT : 0;
+	total = PAGE_SIZE << page_order;
+
+	byte_count = 0;
+	agp_offset = request.agp_start;
+
+	DRM_DEBUG( "count:      %d\n",  count );
+	DRM_DEBUG( "order:      %d\n",  order );
+	DRM_DEBUG( "size:       %d\n",  size );
+	DRM_DEBUG( "agp_offset: %lu\n", agp_offset );
+	DRM_DEBUG( "alignment:  %d\n",  alignment );
+	DRM_DEBUG( "page_order: %d\n",  page_order );
+	DRM_DEBUG( "total:      %d\n",  total );
+
+	if ( order < DRM_MIN_ORDER || order > DRM_MAX_ORDER ) return -EINVAL;
+	if ( dev->queue_count ) return -EBUSY; /* Not while in use */
+
+	spin_lock( &dev->count_lock );
+	if ( dev->buf_use ) {
+		spin_unlock( &dev->count_lock );
+		return -EBUSY;
+	}
+	atomic_inc( &dev->buf_alloc );
+	spin_unlock( &dev->count_lock );
+
+	down( &dev->struct_sem );
+	entry = &dma->bufs[order];
+	if ( entry->buf_count ) {
+		up( &dev->struct_sem );
+		atomic_dec( &dev->buf_alloc );
+		return -ENOMEM; /* May only call once for each order */
+	}
+
+	if (count < 0 || count > 4096) {
+		up( &dev->struct_sem );
+		atomic_dec( &dev->buf_alloc );
+		return -EINVAL;
+	}
+
+	entry->buflist = drm_alloc( count * sizeof(*entry->buflist),
+				     DRM_MEM_BUFS );
+	if ( !entry->buflist ) {
+		up( &dev->struct_sem );
+		atomic_dec( &dev->buf_alloc );
+		return -ENOMEM;
+	}
+	memset( entry->buflist, 0, count * sizeof(*entry->buflist) );
+
+	entry->buf_size = size;
+	entry->page_order = page_order;
+
+	offset = 0;
+
+	while ( entry->buf_count < count ) {
+		buf          = &entry->buflist[entry->buf_count];
+		buf->idx     = dma->buf_count + entry->buf_count;
+		buf->total   = alignment;
+		buf->order   = order;
+		buf->used    = 0;
+
+		buf->offset  = (dma->byte_count + offset);
+		buf->bus_address = agp_offset + offset;
+		buf->address = (void *)(agp_offset + offset + dev->sg->handle);
+		buf->next    = NULL;
+		buf->waiting = 0;
+		buf->pending = 0;
+		init_waitqueue_head( &buf->dma_wait );
+		buf->filp    = NULL;
+
+		buf->dev_priv_size = dev->driver->dev_priv_size;
+		buf->dev_private = drm_alloc( buf->dev_priv_size,
+					       DRM_MEM_BUFS );
+		if(!buf->dev_private) {
+			/* Set count correctly so we free the proper amount. */
+			entry->buf_count = count;
+			drm_cleanup_buf_error(dev,entry);
+			up( &dev->struct_sem );
+			atomic_dec( &dev->buf_alloc );
+			return -ENOMEM;
+		}
+
+		memset( buf->dev_private, 0, buf->dev_priv_size );
+
+		DRM_DEBUG( "buffer %d @ %p\n",
+			   entry->buf_count, buf->address );
+
+		offset += alignment;
+		entry->buf_count++;
+		byte_count += PAGE_SIZE << page_order;
+	}
+
+	DRM_DEBUG( "byte_count: %d\n", byte_count );
+
+	temp_buflist = drm_realloc( dma->buflist,
+				     dma->buf_count * sizeof(*dma->buflist),
+				     (dma->buf_count + entry->buf_count)
+				     * sizeof(*dma->buflist),
+				     DRM_MEM_BUFS );
+	if(!temp_buflist) {
+		/* Free the entry because it isn't valid */
+		drm_cleanup_buf_error(dev,entry);
+		up( &dev->struct_sem );
+		atomic_dec( &dev->buf_alloc );
+		return -ENOMEM;
+	}
+	dma->buflist = temp_buflist;
+
+	for ( i = 0 ; i < entry->buf_count ; i++ ) {
+		dma->buflist[i + dma->buf_count] = &entry->buflist[i];
+	}
+
+	dma->buf_count += entry->buf_count;
+	dma->byte_count += byte_count;
+
+	DRM_DEBUG( "dma->buf_count : %d\n", dma->buf_count );
+	DRM_DEBUG( "entry->buf_count : %d\n", entry->buf_count );
+
+	up( &dev->struct_sem );
+
+	request.count = entry->buf_count;
+	request.size = size;
+
+	if ( copy_to_user( argp, &request, sizeof(request) ) )
+		return -EFAULT;
+
+	dma->flags = _DRM_DMA_USE_SG;
+
+	atomic_dec( &dev->buf_alloc );
+	return 0;
+}
+
+/**
+ * Add buffers for DMA transfers (ioctl).
+ *
+ * \param inode device inode.
+ * \param filp file pointer.
+ * \param cmd command.
+ * \param arg pointer to a drm_buf_desc_t request.
+ * \return zero on success or a negative number on failure.
+ *
+ * According with the memory type specified in drm_buf_desc::flags and the
+ * build options, it dispatches the call either to addbufs_agp(),
+ * addbufs_sg() or addbufs_pci() for AGP, scatter-gather or consistent
+ * PCI memory respectively.
+ */
+int drm_addbufs( struct inode *inode, struct file *filp,
+		  unsigned int cmd, unsigned long arg )
+{
+	drm_buf_desc_t request;
+	drm_file_t *priv = filp->private_data;
+	drm_device_t *dev = priv->dev;
+	
+	if (!drm_core_check_feature(dev, DRIVER_HAVE_DMA))
+		return -EINVAL;
+
+	if ( copy_from_user( &request, (drm_buf_desc_t __user *)arg,
+			     sizeof(request) ) )
+		return -EFAULT;
+
+#if __OS_HAS_AGP
+	if ( request.flags & _DRM_AGP_BUFFER )
+		return drm_addbufs_agp( inode, filp, cmd, arg );
+	else
+#endif
+	if ( request.flags & _DRM_SG_BUFFER )
+		return drm_addbufs_sg( inode, filp, cmd, arg );
+	else
+		return drm_addbufs_pci( inode, filp, cmd, arg );
+}
+
+
+/**
+ * Get information about the buffer mappings.
+ *
+ * This was originally mean for debugging purposes, or by a sophisticated
+ * client library to determine how best to use the available buffers (e.g.,
+ * large buffers can be used for image transfer).
+ *
+ * \param inode device inode.
+ * \param filp file pointer.
+ * \param cmd command.
+ * \param arg pointer to a drm_buf_info structure.
+ * \return zero on success or a negative number on failure.
+ *
+ * Increments drm_device::buf_use while holding the drm_device::count_lock
+ * lock, preventing of allocating more buffers after this call. Information
+ * about each requested buffer is then copied into user space.
+ */
+int drm_infobufs( struct inode *inode, struct file *filp,
+		   unsigned int cmd, unsigned long arg )
+{
+	drm_file_t *priv = filp->private_data;
+	drm_device_t *dev = priv->dev;
+	drm_device_dma_t *dma = dev->dma;
+	drm_buf_info_t request;
+	drm_buf_info_t __user *argp = (void __user *)arg;
+	int i;
+	int count;
+
+	if (!drm_core_check_feature(dev, DRIVER_HAVE_DMA))
+		return -EINVAL;
+
+	if ( !dma ) return -EINVAL;
+
+	spin_lock( &dev->count_lock );
+	if ( atomic_read( &dev->buf_alloc ) ) {
+		spin_unlock( &dev->count_lock );
+		return -EBUSY;
+	}
+	++dev->buf_use;		/* Can't allocate more after this call */
+	spin_unlock( &dev->count_lock );
+
+	if ( copy_from_user( &request, argp, sizeof(request) ) )
+		return -EFAULT;
+
+	for ( i = 0, count = 0 ; i < DRM_MAX_ORDER + 1 ; i++ ) {
+		if ( dma->bufs[i].buf_count ) ++count;
+	}
+
+	DRM_DEBUG( "count = %d\n", count );
+
+	if ( request.count >= count ) {
+		for ( i = 0, count = 0 ; i < DRM_MAX_ORDER + 1 ; i++ ) {
+			if ( dma->bufs[i].buf_count ) {
+				drm_buf_desc_t __user *to = &request.list[count];
+				drm_buf_entry_t *from = &dma->bufs[i];
+				drm_freelist_t *list = &dma->bufs[i].freelist;
+				if ( copy_to_user( &to->count,
+						   &from->buf_count,
+						   sizeof(from->buf_count) ) ||
+				     copy_to_user( &to->size,
+						   &from->buf_size,
+						   sizeof(from->buf_size) ) ||
+				     copy_to_user( &to->low_mark,
+						   &list->low_mark,
+						   sizeof(list->low_mark) ) ||
+				     copy_to_user( &to->high_mark,
+						   &list->high_mark,
+						   sizeof(list->high_mark) ) )
+					return -EFAULT;
+
+				DRM_DEBUG( "%d %d %d %d %d\n",
+					   i,
+					   dma->bufs[i].buf_count,
+					   dma->bufs[i].buf_size,
+					   dma->bufs[i].freelist.low_mark,
+					   dma->bufs[i].freelist.high_mark );
+				++count;
+			}
+		}
+	}
+	request.count = count;
+
+	if ( copy_to_user( argp, &request, sizeof(request) ) )
+		return -EFAULT;
+
+	return 0;
+}
+
+/**
+ * Specifies a low and high water mark for buffer allocation
+ *
+ * \param inode device inode.
+ * \param filp file pointer.
+ * \param cmd command.
+ * \param arg a pointer to a drm_buf_desc structure.
+ * \return zero on success or a negative number on failure.
+ *
+ * Verifies that the size order is bounded between the admissible orders and
+ * updates the respective drm_device_dma::bufs entry low and high water mark.
+ *
+ * \note This ioctl is deprecated and mostly never used.
+ */
+int drm_markbufs( struct inode *inode, struct file *filp,
+		   unsigned int cmd, unsigned long arg )
+{
+	drm_file_t *priv = filp->private_data;
+	drm_device_t *dev = priv->dev;
+	drm_device_dma_t *dma = dev->dma;
+	drm_buf_desc_t request;
+	int order;
+	drm_buf_entry_t *entry;
+
+	if (!drm_core_check_feature(dev, DRIVER_HAVE_DMA))
+		return -EINVAL;
+
+	if ( !dma ) return -EINVAL;
+
+	if ( copy_from_user( &request,
+			     (drm_buf_desc_t __user *)arg,
+			     sizeof(request) ) )
+		return -EFAULT;
+
+	DRM_DEBUG( "%d, %d, %d\n",
+		   request.size, request.low_mark, request.high_mark );
+	order = drm_order( request.size );
+	if ( order < DRM_MIN_ORDER || order > DRM_MAX_ORDER ) return -EINVAL;
+	entry = &dma->bufs[order];
+
+	if ( request.low_mark < 0 || request.low_mark > entry->buf_count )
+		return -EINVAL;
+	if ( request.high_mark < 0 || request.high_mark > entry->buf_count )
+		return -EINVAL;
+
+	entry->freelist.low_mark  = request.low_mark;
+	entry->freelist.high_mark = request.high_mark;
+
+	return 0;
+}
+
+/**
+ * Unreserve the buffers in list, previously reserved using drmDMA. 
+ *
+ * \param inode device inode.
+ * \param filp file pointer.
+ * \param cmd command.
+ * \param arg pointer to a drm_buf_free structure.
+ * \return zero on success or a negative number on failure.
+ * 
+ * Calls free_buffer() for each used buffer.
+ * This function is primarily used for debugging.
+ */
+int drm_freebufs( struct inode *inode, struct file *filp,
+		   unsigned int cmd, unsigned long arg )
+{
+	drm_file_t *priv = filp->private_data;
+	drm_device_t *dev = priv->dev;
+	drm_device_dma_t *dma = dev->dma;
+	drm_buf_free_t request;
+	int i;
+	int idx;
+	drm_buf_t *buf;
+
+	if (!drm_core_check_feature(dev, DRIVER_HAVE_DMA))
+		return -EINVAL;
+
+	if ( !dma ) return -EINVAL;
+
+	if ( copy_from_user( &request,
+			     (drm_buf_free_t __user *)arg,
+			     sizeof(request) ) )
+		return -EFAULT;
+
+	DRM_DEBUG( "%d\n", request.count );
+	for ( i = 0 ; i < request.count ; i++ ) {
+		if ( copy_from_user( &idx,
+				     &request.list[i],
+				     sizeof(idx) ) )
+			return -EFAULT;
+		if ( idx < 0 || idx >= dma->buf_count ) {
+			DRM_ERROR( "Index %d (of %d max)\n",
+				   idx, dma->buf_count - 1 );
+			return -EINVAL;
+		}
+		buf = dma->buflist[idx];
+		if ( buf->filp != filp ) {
+			DRM_ERROR( "Process %d freeing buffer not owned\n",
+				   current->pid );
+			return -EINVAL;
+		}
+		drm_free_buffer( dev, buf );
+	}
+
+	return 0;
+}
+
+/**
+ * Maps all of the DMA buffers into client-virtual space (ioctl).
+ *
+ * \param inode device inode.
+ * \param filp file pointer.
+ * \param cmd command.
+ * \param arg pointer to a drm_buf_map structure.
+ * \return zero on success or a negative number on failure.
+ *
+ * Maps the AGP or SG buffer region with do_mmap(), and copies information
+ * about each buffer into user space. The PCI buffers are already mapped on the
+ * addbufs_pci() call.
+ */
+int drm_mapbufs( struct inode *inode, struct file *filp,
+		  unsigned int cmd, unsigned long arg )
+{
+	drm_file_t *priv = filp->private_data;
+	drm_device_t *dev = priv->dev;
+	drm_device_dma_t *dma = dev->dma;
+	drm_buf_map_t __user *argp = (void __user *)arg;
+	int retcode = 0;
+	const int zero = 0;
+	unsigned long virtual;
+	unsigned long address;
+	drm_buf_map_t request;
+	int i;
+
+	if (!drm_core_check_feature(dev, DRIVER_HAVE_DMA))
+		return -EINVAL;
+
+	if ( !dma ) return -EINVAL;
+
+	spin_lock( &dev->count_lock );
+	if ( atomic_read( &dev->buf_alloc ) ) {
+		spin_unlock( &dev->count_lock );
+		return -EBUSY;
+	}
+	dev->buf_use++;		/* Can't allocate more after this call */
+	spin_unlock( &dev->count_lock );
+
+	if ( copy_from_user( &request, argp, sizeof(request) ) )
+		return -EFAULT;
+
+	if ( request.count >= dma->buf_count ) {
+		if ((drm_core_has_AGP(dev) && (dma->flags & _DRM_DMA_USE_AGP)) ||
+		    (drm_core_check_feature(dev, DRIVER_SG) && (dma->flags & _DRM_DMA_USE_SG)) ) {
+			drm_map_t *map = dev->agp_buffer_map;
+
+			if ( !map ) {
+				retcode = -EINVAL;
+				goto done;
+			}
+
+#if LINUX_VERSION_CODE <= 0x020402
+			down( &current->mm->mmap_sem );
+#else
+			down_write( &current->mm->mmap_sem );
+#endif
+			virtual = do_mmap( filp, 0, map->size,
+					   PROT_READ | PROT_WRITE,
+					   MAP_SHARED,
+					   (unsigned long)map->offset );
+#if LINUX_VERSION_CODE <= 0x020402
+			up( &current->mm->mmap_sem );
+#else
+			up_write( &current->mm->mmap_sem );
+#endif
+		} else {
+#if LINUX_VERSION_CODE <= 0x020402
+			down( &current->mm->mmap_sem );
+#else
+			down_write( &current->mm->mmap_sem );
+#endif
+			virtual = do_mmap( filp, 0, dma->byte_count,
+					   PROT_READ | PROT_WRITE,
+					   MAP_SHARED, 0 );
+#if LINUX_VERSION_CODE <= 0x020402
+			up( &current->mm->mmap_sem );
+#else
+			up_write( &current->mm->mmap_sem );
+#endif
+		}
+		if ( virtual > -1024UL ) {
+			/* Real error */
+			retcode = (signed long)virtual;
+			goto done;
+		}
+		request.virtual = (void __user *)virtual;
+
+		for ( i = 0 ; i < dma->buf_count ; i++ ) {
+			if ( copy_to_user( &request.list[i].idx,
+					   &dma->buflist[i]->idx,
+					   sizeof(request.list[0].idx) ) ) {
+				retcode = -EFAULT;
+				goto done;
+			}
+			if ( copy_to_user( &request.list[i].total,
+					   &dma->buflist[i]->total,
+					   sizeof(request.list[0].total) ) ) {
+				retcode = -EFAULT;
+				goto done;
+			}
+			if ( copy_to_user( &request.list[i].used,
+					   &zero,
+					   sizeof(zero) ) ) {
+				retcode = -EFAULT;
+				goto done;
+			}
+			address = virtual + dma->buflist[i]->offset; /* *** */
+			if ( copy_to_user( &request.list[i].address,
+					   &address,
+					   sizeof(address) ) ) {
+				retcode = -EFAULT;
+				goto done;
+			}
+		}
+	}
+ done:
+	request.count = dma->buf_count;
+	DRM_DEBUG( "%d buffers, retcode = %d\n", request.count, retcode );
+
+	if ( copy_to_user( argp, &request, sizeof(request) ) )
+		return -EFAULT;
+
+	return retcode;
+}
+
diff -Nru a/drivers/char/drm/drm_bufs.h b/drivers/char/drm/drm_bufs.h
--- a/drivers/char/drm/drm_bufs.h	2005-01-10 20:11:17 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,1269 +0,0 @@
-/**
- * \file drm_bufs.h 
- * Generic buffer template
- * 
- * \author Rickard E. (Rik) Faith <faith@valinux.com>
- * \author Gareth Hughes <gareth@valinux.com>
- */
-
-/*
- * Created: Thu Nov 23 03:10:50 2000 by gareth@valinux.com
- *
- * Copyright 1999, 2000 Precision Insight, Inc., Cedar Park, Texas.
- * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include <linux/vmalloc.h>
-#include "drmP.h"
-
-/**
- * Compute size order.  Returns the exponent of the smaller power of two which
- * is greater or equal to given number.
- * 
- * \param size size.
- * \return order.
- *
- * \todo Can be made faster.
- */
-int DRM(order)( unsigned long size )
-{
-	int order;
-	unsigned long tmp;
-
-	for (order = 0, tmp = size >> 1; tmp; tmp >>= 1, order++)
-		;
-
-	if (size & (size - 1))
-		++order;
-
-	return order;
-}
-
-/**
- * Ioctl to specify a range of memory that is available for mapping by a non-root process.
- *
- * \param inode device inode.
- * \param filp file pointer.
- * \param cmd command.
- * \param arg pointer to a drm_map structure.
- * \return zero on success or a negative value on error.
- *
- * Adjusts the memory offset to its absolute value according to the mapping
- * type.  Adds the map to the map list drm_device::maplist. Adds MTRR's where
- * applicable and if supported by the kernel.
- */
-int DRM(addmap)( struct inode *inode, struct file *filp,
-		 unsigned int cmd, unsigned long arg )
-{
-	drm_file_t *priv = filp->private_data;
-	drm_device_t *dev = priv->dev;
-	drm_map_t *map;
-	drm_map_t __user *argp = (void __user *)arg;
-	drm_map_list_t *list;
-
-	if ( !(filp->f_mode & 3) ) return -EACCES; /* Require read/write */
-
-	map = DRM(alloc)( sizeof(*map), DRM_MEM_MAPS );
-	if ( !map )
-		return -ENOMEM;
-
-	if ( copy_from_user( map, argp, sizeof(*map) ) ) {
-		DRM(free)( map, sizeof(*map), DRM_MEM_MAPS );
-		return -EFAULT;
-	}
-
-	/* Only allow shared memory to be removable since we only keep enough
-	 * book keeping information about shared memory to allow for removal
-	 * when processes fork.
-	 */
-	if ( (map->flags & _DRM_REMOVABLE) && map->type != _DRM_SHM ) {
-		DRM(free)( map, sizeof(*map), DRM_MEM_MAPS );
-		return -EINVAL;
-	}
-	DRM_DEBUG( "offset = 0x%08lx, size = 0x%08lx, type = %d\n",
-		   map->offset, map->size, map->type );
-	if ( (map->offset & (~PAGE_MASK)) || (map->size & (~PAGE_MASK)) ) {
-		DRM(free)( map, sizeof(*map), DRM_MEM_MAPS );
-		return -EINVAL;
-	}
-	map->mtrr   = -1;
-	map->handle = NULL;
-
-	switch ( map->type ) {
-	case _DRM_REGISTERS:
-	case _DRM_FRAME_BUFFER:
-#if !defined(__sparc__) && !defined(__alpha__) && !defined(__ia64__)
-		if ( map->offset + map->size < map->offset ||
-		     map->offset < virt_to_phys(high_memory) ) {
-			DRM(free)( map, sizeof(*map), DRM_MEM_MAPS );
-			return -EINVAL;
-		}
-#endif
-#ifdef __alpha__
-		map->offset += dev->hose->mem_space->start;
-#endif
-		if (drm_core_has_MTRR(dev)) {
-			if ( map->type == _DRM_FRAME_BUFFER ||
-			     (map->flags & _DRM_WRITE_COMBINING) ) {
-				map->mtrr = mtrr_add( map->offset, map->size,
-						      MTRR_TYPE_WRCOMB, 1 );
-			}
-		}
-		if (map->type == _DRM_REGISTERS)
-			map->handle = DRM(ioremap)( map->offset, map->size,
-						    dev );
-		break;
-
-	case _DRM_SHM:
-		map->handle = vmalloc_32(map->size);
-		DRM_DEBUG( "%lu %d %p\n",
-			   map->size, DRM(order)( map->size ), map->handle );
-		if ( !map->handle ) {
-			DRM(free)( map, sizeof(*map), DRM_MEM_MAPS );
-			return -ENOMEM;
-		}
-		map->offset = (unsigned long)map->handle;
-		if ( map->flags & _DRM_CONTAINS_LOCK ) {
-			/* Prevent a 2nd X Server from creating a 2nd lock */
-			if (dev->lock.hw_lock != NULL) {
-				vfree( map->handle );
-				DRM(free)( map, sizeof(*map), DRM_MEM_MAPS );
-				return -EBUSY;
-			}
-			dev->sigdata.lock =
-			dev->lock.hw_lock = map->handle; /* Pointer to lock */
-		}
-		break;
-	case _DRM_AGP:
-		if (drm_core_has_AGP(dev)) {
-#ifdef __alpha__
-			map->offset += dev->hose->mem_space->start;
-#endif
-			map->offset += dev->agp->base;
-			map->mtrr   = dev->agp->agp_mtrr; /* for getmap */
-		}
-		break;
-	case _DRM_SCATTER_GATHER:
-		if (!dev->sg) {
-			DRM(free)(map, sizeof(*map), DRM_MEM_MAPS);
-			return -EINVAL;
-		}
-		map->offset += dev->sg->handle;
-		break;
-
-	default:
-		DRM(free)( map, sizeof(*map), DRM_MEM_MAPS );
-		return -EINVAL;
-	}
-
-	list = DRM(alloc)(sizeof(*list), DRM_MEM_MAPS);
-	if(!list) {
-		DRM(free)(map, sizeof(*map), DRM_MEM_MAPS);
-		return -EINVAL;
-	}
-	memset(list, 0, sizeof(*list));
-	list->map = map;
-
-	down(&dev->struct_sem);
-	list_add(&list->head, &dev->maplist->head);
- 	up(&dev->struct_sem);
-
-	if ( copy_to_user( argp, map, sizeof(*map) ) )
-		return -EFAULT;
-	if ( map->type != _DRM_SHM ) {
-		if ( copy_to_user( &argp->handle,
-				   &map->offset,
-				   sizeof(map->offset) ) )
-			return -EFAULT;
-	}
-	return 0;
-}
-
-
-/**
- * Remove a map private from list and deallocate resources if the mapping
- * isn't in use.
- *
- * \param inode device inode.
- * \param filp file pointer.
- * \param cmd command.
- * \param arg pointer to a drm_map_t structure.
- * \return zero on success or a negative value on error.
- *
- * Searches the map on drm_device::maplist, removes it from the list, see if
- * its being used, and free any associate resource (such as MTRR's) if it's not
- * being on use.
- *
- * \sa addmap().
- */
-int DRM(rmmap)(struct inode *inode, struct file *filp,
-	       unsigned int cmd, unsigned long arg)
-{
-	drm_file_t	*priv	= filp->private_data;
-	drm_device_t	*dev	= priv->dev;
-	struct list_head *list;
-	drm_map_list_t *r_list = NULL;
-	drm_vma_entry_t *pt, *prev;
-	drm_map_t *map;
-	drm_map_t request;
-	int found_maps = 0;
-
-	if (copy_from_user(&request, (drm_map_t __user *)arg,
-			   sizeof(request))) {
-		return -EFAULT;
-	}
-
-	down(&dev->struct_sem);
-	list = &dev->maplist->head;
-	list_for_each(list, &dev->maplist->head) {
-		r_list = list_entry(list, drm_map_list_t, head);
-
-		if(r_list->map &&
-		   r_list->map->handle == request.handle &&
-		   r_list->map->flags & _DRM_REMOVABLE) break;
-	}
-
-	/* List has wrapped around to the head pointer, or its empty we didn't
-	 * find anything.
-	 */
-	if(list == (&dev->maplist->head)) {
-		up(&dev->struct_sem);
-		return -EINVAL;
-	}
-	map = r_list->map;
-	list_del(list);
-	DRM(free)(list, sizeof(*list), DRM_MEM_MAPS);
-
-	for (pt = dev->vmalist, prev = NULL; pt; prev = pt, pt = pt->next) {
-		if (pt->vma->vm_private_data == map) found_maps++;
-	}
-
-	if(!found_maps) {
-		switch (map->type) {
-		case _DRM_REGISTERS:
-		case _DRM_FRAME_BUFFER:
-		  if (drm_core_has_MTRR(dev)) {
-				if (map->mtrr >= 0) {
-					int retcode;
-					retcode = mtrr_del(map->mtrr,
-							   map->offset,
-							   map->size);
-					DRM_DEBUG("mtrr_del = %d\n", retcode);
-				}
-			}
-			DRM(ioremapfree)(map->handle, map->size, dev);
-			break;
-		case _DRM_SHM:
-			vfree(map->handle);
-			break;
-		case _DRM_AGP:
-		case _DRM_SCATTER_GATHER:
-			break;
-		}
-		DRM(free)(map, sizeof(*map), DRM_MEM_MAPS);
-	}
-	up(&dev->struct_sem);
-	return 0;
-}
-
-/**
- * Cleanup after an error on one of the addbufs() functions.
- *
- * \param entry buffer entry where the error occurred.
- *
- * Frees any pages and buffers associated with the given entry.
- */
-static void DRM(cleanup_buf_error)(drm_buf_entry_t *entry)
-{
-	int i;
-
-	if (entry->seg_count) {
-		for (i = 0; i < entry->seg_count; i++) {
-			if (entry->seglist[i]) {
-				DRM(free_pages)(entry->seglist[i],
-					        entry->page_order,
-					        DRM_MEM_DMA);
-			}
-		}
-		DRM(free)(entry->seglist,
-			  entry->seg_count *
-			  sizeof(*entry->seglist),
-			  DRM_MEM_SEGS);
-
-		entry->seg_count = 0;
-	}
-
-   	if (entry->buf_count) {
-	   	for (i = 0; i < entry->buf_count; i++) {
-			if (entry->buflist[i].dev_private) {
-				DRM(free)(entry->buflist[i].dev_private,
-					  entry->buflist[i].dev_priv_size,
-					  DRM_MEM_BUFS);
-			}
-		}
-		DRM(free)(entry->buflist,
-			  entry->buf_count *
-			  sizeof(*entry->buflist),
-			  DRM_MEM_BUFS);
-
-		entry->buf_count = 0;
-	}
-}
-
-#if __OS_HAS_AGP
-/**
- * Add AGP buffers for DMA transfers (ioctl).
- *
- * \param inode device inode.
- * \param filp file pointer.
- * \param cmd command.
- * \param arg pointer to a drm_buf_desc_t request.
- * \return zero on success or a negative number on failure.
- * 
- * After some sanity checks creates a drm_buf structure for each buffer and
- * reallocates the buffer list of the same size order to accommodate the new
- * buffers.
- */
-int DRM(addbufs_agp)( struct inode *inode, struct file *filp,
-		      unsigned int cmd, unsigned long arg )
-{
-	drm_file_t *priv = filp->private_data;
-	drm_device_t *dev = priv->dev;
-	drm_device_dma_t *dma = dev->dma;
-	drm_buf_desc_t request;
-	drm_buf_entry_t *entry;
-	drm_buf_t *buf;
-	unsigned long offset;
-	unsigned long agp_offset;
-	int count;
-	int order;
-	int size;
-	int alignment;
-	int page_order;
-	int total;
-	int byte_count;
-	int i;
-	drm_buf_t **temp_buflist;
-	drm_buf_desc_t __user *argp = (void __user *)arg;
-
-	if ( !dma ) return -EINVAL;
-
-	if ( copy_from_user( &request, argp,
-			     sizeof(request) ) )
-		return -EFAULT;
-
-	count = request.count;
-	order = DRM(order)( request.size );
-	size = 1 << order;
-
-	alignment  = (request.flags & _DRM_PAGE_ALIGN)
-		? PAGE_ALIGN(size) : size;
-	page_order = order - PAGE_SHIFT > 0 ? order - PAGE_SHIFT : 0;
-	total = PAGE_SIZE << page_order;
-
-	byte_count = 0;
-	agp_offset = dev->agp->base + request.agp_start;
-
-	DRM_DEBUG( "count:      %d\n",  count );
-	DRM_DEBUG( "order:      %d\n",  order );
-	DRM_DEBUG( "size:       %d\n",  size );
-	DRM_DEBUG( "agp_offset: %lu\n", agp_offset );
-	DRM_DEBUG( "alignment:  %d\n",  alignment );
-	DRM_DEBUG( "page_order: %d\n",  page_order );
-	DRM_DEBUG( "total:      %d\n",  total );
-
-	if ( order < DRM_MIN_ORDER || order > DRM_MAX_ORDER ) return -EINVAL;
-	if ( dev->queue_count ) return -EBUSY; /* Not while in use */
-
-	spin_lock( &dev->count_lock );
-	if ( dev->buf_use ) {
-		spin_unlock( &dev->count_lock );
-		return -EBUSY;
-	}
-	atomic_inc( &dev->buf_alloc );
-	spin_unlock( &dev->count_lock );
-
-	down( &dev->struct_sem );
-	entry = &dma->bufs[order];
-	if ( entry->buf_count ) {
-		up( &dev->struct_sem );
-		atomic_dec( &dev->buf_alloc );
-		return -ENOMEM; /* May only call once for each order */
-	}
-
-	if (count < 0 || count > 4096) {
-		up( &dev->struct_sem );
-		atomic_dec( &dev->buf_alloc );
-		return -EINVAL;
-	}
-
-	entry->buflist = DRM(alloc)( count * sizeof(*entry->buflist),
-				    DRM_MEM_BUFS );
-	if ( !entry->buflist ) {
-		up( &dev->struct_sem );
-		atomic_dec( &dev->buf_alloc );
-		return -ENOMEM;
-	}
-	memset( entry->buflist, 0, count * sizeof(*entry->buflist) );
-
-	entry->buf_size = size;
-	entry->page_order = page_order;
-
-	offset = 0;
-
-	while ( entry->buf_count < count ) {
-		buf          = &entry->buflist[entry->buf_count];
-		buf->idx     = dma->buf_count + entry->buf_count;
-		buf->total   = alignment;
-		buf->order   = order;
-		buf->used    = 0;
-
-		buf->offset  = (dma->byte_count + offset);
-		buf->bus_address = agp_offset + offset;
-		buf->address = (void *)(agp_offset + offset);
-		buf->next    = NULL;
-		buf->waiting = 0;
-		buf->pending = 0;
-		init_waitqueue_head( &buf->dma_wait );
-		buf->filp    = NULL;
-
-		buf->dev_priv_size = dev->dev_priv_size;
-		buf->dev_private = DRM(alloc)( buf->dev_priv_size,
-					       DRM_MEM_BUFS );
-		if(!buf->dev_private) {
-			/* Set count correctly so we free the proper amount. */
-			entry->buf_count = count;
-			DRM(cleanup_buf_error)(entry);
-			up( &dev->struct_sem );
-			atomic_dec( &dev->buf_alloc );
-			return -ENOMEM;
-		}
-		memset( buf->dev_private, 0, buf->dev_priv_size );
-
-		DRM_DEBUG( "buffer %d @ %p\n",
-			   entry->buf_count, buf->address );
-
-		offset += alignment;
-		entry->buf_count++;
-		byte_count += PAGE_SIZE << page_order;
-	}
-
-	DRM_DEBUG( "byte_count: %d\n", byte_count );
-
-	temp_buflist = DRM(realloc)( dma->buflist,
-				     dma->buf_count * sizeof(*dma->buflist),
-				     (dma->buf_count + entry->buf_count)
-				     * sizeof(*dma->buflist),
-				     DRM_MEM_BUFS );
-	if(!temp_buflist) {
-		/* Free the entry because it isn't valid */
-		DRM(cleanup_buf_error)(entry);
-		up( &dev->struct_sem );
-		atomic_dec( &dev->buf_alloc );
-		return -ENOMEM;
-	}
-	dma->buflist = temp_buflist;
-
-	for ( i = 0 ; i < entry->buf_count ; i++ ) {
-		dma->buflist[i + dma->buf_count] = &entry->buflist[i];
-	}
-
-	dma->buf_count += entry->buf_count;
-	dma->byte_count += byte_count;
-
-	DRM_DEBUG( "dma->buf_count : %d\n", dma->buf_count );
-	DRM_DEBUG( "entry->buf_count : %d\n", entry->buf_count );
-
-	up( &dev->struct_sem );
-
-	request.count = entry->buf_count;
-	request.size = size;
-
-	if ( copy_to_user( argp, &request, sizeof(request) ) )
-		return -EFAULT;
-
-	dma->flags = _DRM_DMA_USE_AGP;
-
-	atomic_dec( &dev->buf_alloc );
-	return 0;
-}
-#endif /* __OS_HAS_AGP */
-
-int DRM(addbufs_pci)( struct inode *inode, struct file *filp,
-		      unsigned int cmd, unsigned long arg )
-{
-   	drm_file_t *priv = filp->private_data;
-	drm_device_t *dev = priv->dev;
-	drm_device_dma_t *dma = dev->dma;
-	drm_buf_desc_t request;
-	int count;
-	int order;
-	int size;
-	int total;
-	int page_order;
-	drm_buf_entry_t *entry;
-	unsigned long page;
-	drm_buf_t *buf;
-	int alignment;
-	unsigned long offset;
-	int i;
-	int byte_count;
-	int page_count;
-	unsigned long *temp_pagelist;
-	drm_buf_t **temp_buflist;
-	drm_buf_desc_t __user *argp = (void __user *)arg;
-
-	if (!drm_core_check_feature(dev, DRIVER_PCI_DMA)) return -EINVAL;
-	if ( !dma ) return -EINVAL;
-
-	if ( copy_from_user( &request, argp, sizeof(request) ) )
-		return -EFAULT;
-
-	count = request.count;
-	order = DRM(order)( request.size );
-	size = 1 << order;
-
-	DRM_DEBUG( "count=%d, size=%d (%d), order=%d, queue_count=%d\n",
-		   request.count, request.size, size,
-		   order, dev->queue_count );
-
-	if ( order < DRM_MIN_ORDER || order > DRM_MAX_ORDER ) return -EINVAL;
-	if ( dev->queue_count ) return -EBUSY; /* Not while in use */
-
-	alignment = (request.flags & _DRM_PAGE_ALIGN)
-		? PAGE_ALIGN(size) : size;
-	page_order = order - PAGE_SHIFT > 0 ? order - PAGE_SHIFT : 0;
-	total = PAGE_SIZE << page_order;
-
-	spin_lock( &dev->count_lock );
-	if ( dev->buf_use ) {
-		spin_unlock( &dev->count_lock );
-		return -EBUSY;
-	}
-	atomic_inc( &dev->buf_alloc );
-	spin_unlock( &dev->count_lock );
-
-	down( &dev->struct_sem );
-	entry = &dma->bufs[order];
-	if ( entry->buf_count ) {
-		up( &dev->struct_sem );
-		atomic_dec( &dev->buf_alloc );
-		return -ENOMEM;	/* May only call once for each order */
-	}
-
-	if (count < 0 || count > 4096) {
-		up( &dev->struct_sem );
-		atomic_dec( &dev->buf_alloc );
-		return -EINVAL;
-	}
-
-	entry->buflist = DRM(alloc)( count * sizeof(*entry->buflist),
-				    DRM_MEM_BUFS );
-	if ( !entry->buflist ) {
-		up( &dev->struct_sem );
-		atomic_dec( &dev->buf_alloc );
-		return -ENOMEM;
-	}
-	memset( entry->buflist, 0, count * sizeof(*entry->buflist) );
-
-	entry->seglist = DRM(alloc)( count * sizeof(*entry->seglist),
-				    DRM_MEM_SEGS );
-	if ( !entry->seglist ) {
-		DRM(free)( entry->buflist,
-			  count * sizeof(*entry->buflist),
-			  DRM_MEM_BUFS );
-		up( &dev->struct_sem );
-		atomic_dec( &dev->buf_alloc );
-		return -ENOMEM;
-	}
-	memset( entry->seglist, 0, count * sizeof(*entry->seglist) );
-
-	/* Keep the original pagelist until we know all the allocations
-	 * have succeeded
-	 */
-	temp_pagelist = DRM(alloc)( (dma->page_count + (count << page_order))
-				    * sizeof(*dma->pagelist),
-				    DRM_MEM_PAGES );
-	if (!temp_pagelist) {
-		DRM(free)( entry->buflist,
-			   count * sizeof(*entry->buflist),
-			   DRM_MEM_BUFS );
-		DRM(free)( entry->seglist,
-			   count * sizeof(*entry->seglist),
-			   DRM_MEM_SEGS );
-		up( &dev->struct_sem );
-		atomic_dec( &dev->buf_alloc );
-		return -ENOMEM;
-	}
-	memcpy(temp_pagelist,
-	       dma->pagelist,
-	       dma->page_count * sizeof(*dma->pagelist));
-	DRM_DEBUG( "pagelist: %d entries\n",
-		   dma->page_count + (count << page_order) );
-
-	entry->buf_size	= size;
-	entry->page_order = page_order;
-	byte_count = 0;
-	page_count = 0;
-
-	while ( entry->buf_count < count ) {
-		page = DRM(alloc_pages)( page_order, DRM_MEM_DMA );
-		if ( !page ) {
-			/* Set count correctly so we free the proper amount. */
-			entry->buf_count = count;
-			entry->seg_count = count;
-			DRM(cleanup_buf_error)(entry);
-			DRM(free)( temp_pagelist,
-				   (dma->page_count + (count << page_order))
-				   * sizeof(*dma->pagelist),
-				   DRM_MEM_PAGES );
-			up( &dev->struct_sem );
-			atomic_dec( &dev->buf_alloc );
-			return -ENOMEM;
-		}
-		entry->seglist[entry->seg_count++] = page;
-		for ( i = 0 ; i < (1 << page_order) ; i++ ) {
-			DRM_DEBUG( "page %d @ 0x%08lx\n",
-				   dma->page_count + page_count,
-				   page + PAGE_SIZE * i );
-			temp_pagelist[dma->page_count + page_count++]
-				= page + PAGE_SIZE * i;
-		}
-		for ( offset = 0 ;
-		      offset + size <= total && entry->buf_count < count ;
-		      offset += alignment, ++entry->buf_count ) {
-			buf	     = &entry->buflist[entry->buf_count];
-			buf->idx     = dma->buf_count + entry->buf_count;
-			buf->total   = alignment;
-			buf->order   = order;
-			buf->used    = 0;
-			buf->offset  = (dma->byte_count + byte_count + offset);
-			buf->address = (void *)(page + offset);
-			buf->next    = NULL;
-			buf->waiting = 0;
-			buf->pending = 0;
-			init_waitqueue_head( &buf->dma_wait );
-			buf->filp    = NULL;
-
-			buf->dev_priv_size = dev->dev_priv_size;
-			buf->dev_private = DRM(alloc)( dev->dev_priv_size,
-						       DRM_MEM_BUFS );
-			if(!buf->dev_private) {
-				/* Set count correctly so we free the proper amount. */
-				entry->buf_count = count;
-				entry->seg_count = count;
-				DRM(cleanup_buf_error)(entry);
-				DRM(free)( temp_pagelist,
-					   (dma->page_count + (count << page_order))
-					   * sizeof(*dma->pagelist),
-					   DRM_MEM_PAGES );
-				up( &dev->struct_sem );
-				atomic_dec( &dev->buf_alloc );
-				return -ENOMEM;
-			}
-			memset( buf->dev_private, 0, buf->dev_priv_size );
-
-			DRM_DEBUG( "buffer %d @ %p\n",
-				   entry->buf_count, buf->address );
-		}
-		byte_count += PAGE_SIZE << page_order;
-	}
-
-	temp_buflist = DRM(realloc)( dma->buflist,
-				     dma->buf_count * sizeof(*dma->buflist),
-				     (dma->buf_count + entry->buf_count)
-				     * sizeof(*dma->buflist),
-				     DRM_MEM_BUFS );
-	if (!temp_buflist) {
-		/* Free the entry because it isn't valid */
-		DRM(cleanup_buf_error)(entry);
-		DRM(free)( temp_pagelist,
-			   (dma->page_count + (count << page_order))
-			   * sizeof(*dma->pagelist),
-			   DRM_MEM_PAGES );
-		up( &dev->struct_sem );
-		atomic_dec( &dev->buf_alloc );
-		return -ENOMEM;
-	}
-	dma->buflist = temp_buflist;
-
-	for ( i = 0 ; i < entry->buf_count ; i++ ) {
-		dma->buflist[i + dma->buf_count] = &entry->buflist[i];
-	}
-
-	/* No allocations failed, so now we can replace the orginal pagelist
-	 * with the new one.
-	 */
-	if (dma->page_count) {
-		DRM(free)(dma->pagelist,
-			  dma->page_count * sizeof(*dma->pagelist),
-			  DRM_MEM_PAGES);
-	}
-	dma->pagelist = temp_pagelist;
-
-	dma->buf_count += entry->buf_count;
-	dma->seg_count += entry->seg_count;
-	dma->page_count += entry->seg_count << page_order;
-	dma->byte_count += PAGE_SIZE * (entry->seg_count << page_order);
-
-	up( &dev->struct_sem );
-
-	request.count = entry->buf_count;
-	request.size = size;
-
-	if ( copy_to_user( argp, &request, sizeof(request) ) )
-		return -EFAULT;
-
-	atomic_dec( &dev->buf_alloc );
-	return 0;
-
-}
-
-int DRM(addbufs_sg)( struct inode *inode, struct file *filp,
-                     unsigned int cmd, unsigned long arg )
-{
-	drm_file_t *priv = filp->private_data;
-	drm_device_t *dev = priv->dev;
-	drm_device_dma_t *dma = dev->dma;
-	drm_buf_desc_t __user *argp = (void __user *)arg;
-	drm_buf_desc_t request;
-	drm_buf_entry_t *entry;
-	drm_buf_t *buf;
-	unsigned long offset;
-	unsigned long agp_offset;
-	int count;
-	int order;
-	int size;
-	int alignment;
-	int page_order;
-	int total;
-	int byte_count;
-	int i;
-	drm_buf_t **temp_buflist;
-
-	if (!drm_core_check_feature(dev, DRIVER_SG)) return -EINVAL;
-	
-	if ( !dma ) return -EINVAL;
-
-	if ( copy_from_user( &request, argp, sizeof(request) ) )
-		return -EFAULT;
-
-	count = request.count;
-	order = DRM(order)( request.size );
-	size = 1 << order;
-
-	alignment  = (request.flags & _DRM_PAGE_ALIGN)
-			? PAGE_ALIGN(size) : size;
-	page_order = order - PAGE_SHIFT > 0 ? order - PAGE_SHIFT : 0;
-	total = PAGE_SIZE << page_order;
-
-	byte_count = 0;
-	agp_offset = request.agp_start;
-
-	DRM_DEBUG( "count:      %d\n",  count );
-	DRM_DEBUG( "order:      %d\n",  order );
-	DRM_DEBUG( "size:       %d\n",  size );
-	DRM_DEBUG( "agp_offset: %lu\n", agp_offset );
-	DRM_DEBUG( "alignment:  %d\n",  alignment );
-	DRM_DEBUG( "page_order: %d\n",  page_order );
-	DRM_DEBUG( "total:      %d\n",  total );
-
-	if ( order < DRM_MIN_ORDER || order > DRM_MAX_ORDER ) return -EINVAL;
-	if ( dev->queue_count ) return -EBUSY; /* Not while in use */
-
-	spin_lock( &dev->count_lock );
-	if ( dev->buf_use ) {
-		spin_unlock( &dev->count_lock );
-		return -EBUSY;
-	}
-	atomic_inc( &dev->buf_alloc );
-	spin_unlock( &dev->count_lock );
-
-	down( &dev->struct_sem );
-	entry = &dma->bufs[order];
-	if ( entry->buf_count ) {
-		up( &dev->struct_sem );
-		atomic_dec( &dev->buf_alloc );
-		return -ENOMEM; /* May only call once for each order */
-	}
-
-	if (count < 0 || count > 4096) {
-		up( &dev->struct_sem );
-		atomic_dec( &dev->buf_alloc );
-		return -EINVAL;
-	}
-
-	entry->buflist = DRM(alloc)( count * sizeof(*entry->buflist),
-				     DRM_MEM_BUFS );
-	if ( !entry->buflist ) {
-		up( &dev->struct_sem );
-		atomic_dec( &dev->buf_alloc );
-		return -ENOMEM;
-	}
-	memset( entry->buflist, 0, count * sizeof(*entry->buflist) );
-
-	entry->buf_size = size;
-	entry->page_order = page_order;
-
-	offset = 0;
-
-	while ( entry->buf_count < count ) {
-		buf          = &entry->buflist[entry->buf_count];
-		buf->idx     = dma->buf_count + entry->buf_count;
-		buf->total   = alignment;
-		buf->order   = order;
-		buf->used    = 0;
-
-		buf->offset  = (dma->byte_count + offset);
-		buf->bus_address = agp_offset + offset;
-		buf->address = (void *)(agp_offset + offset + dev->sg->handle);
-		buf->next    = NULL;
-		buf->waiting = 0;
-		buf->pending = 0;
-		init_waitqueue_head( &buf->dma_wait );
-		buf->filp    = NULL;
-
-		buf->dev_priv_size = dev->dev_priv_size;
-		buf->dev_private = DRM(alloc)( dev->dev_priv_size,
-					       DRM_MEM_BUFS );
-		if(!buf->dev_private) {
-			/* Set count correctly so we free the proper amount. */
-			entry->buf_count = count;
-			DRM(cleanup_buf_error)(entry);
-			up( &dev->struct_sem );
-			atomic_dec( &dev->buf_alloc );
-			return -ENOMEM;
-		}
-
-		memset( buf->dev_private, 0, buf->dev_priv_size );
-
-		DRM_DEBUG( "buffer %d @ %p\n",
-			   entry->buf_count, buf->address );
-
-		offset += alignment;
-		entry->buf_count++;
-		byte_count += PAGE_SIZE << page_order;
-	}
-
-	DRM_DEBUG( "byte_count: %d\n", byte_count );
-
-	temp_buflist = DRM(realloc)( dma->buflist,
-				     dma->buf_count * sizeof(*dma->buflist),
-				     (dma->buf_count + entry->buf_count)
-				     * sizeof(*dma->buflist),
-				     DRM_MEM_BUFS );
-	if(!temp_buflist) {
-		/* Free the entry because it isn't valid */
-		DRM(cleanup_buf_error)(entry);
-		up( &dev->struct_sem );
-		atomic_dec( &dev->buf_alloc );
-		return -ENOMEM;
-	}
-	dma->buflist = temp_buflist;
-
-	for ( i = 0 ; i < entry->buf_count ; i++ ) {
-		dma->buflist[i + dma->buf_count] = &entry->buflist[i];
-	}
-
-	dma->buf_count += entry->buf_count;
-	dma->byte_count += byte_count;
-
-	DRM_DEBUG( "dma->buf_count : %d\n", dma->buf_count );
-	DRM_DEBUG( "entry->buf_count : %d\n", entry->buf_count );
-
-	up( &dev->struct_sem );
-
-	request.count = entry->buf_count;
-	request.size = size;
-
-	if ( copy_to_user( argp, &request, sizeof(request) ) )
-		return -EFAULT;
-
-	dma->flags = _DRM_DMA_USE_SG;
-
-	atomic_dec( &dev->buf_alloc );
-	return 0;
-}
-
-/**
- * Add buffers for DMA transfers (ioctl).
- *
- * \param inode device inode.
- * \param filp file pointer.
- * \param cmd command.
- * \param arg pointer to a drm_buf_desc_t request.
- * \return zero on success or a negative number on failure.
- *
- * According with the memory type specified in drm_buf_desc::flags and the
- * build options, it dispatches the call either to addbufs_agp(),
- * addbufs_sg() or addbufs_pci() for AGP, scatter-gather or consistent
- * PCI memory respectively.
- */
-int DRM(addbufs)( struct inode *inode, struct file *filp,
-		  unsigned int cmd, unsigned long arg )
-{
-	drm_buf_desc_t request;
-	drm_file_t *priv = filp->private_data;
-	drm_device_t *dev = priv->dev;
-	
-	if (!drm_core_check_feature(dev, DRIVER_HAVE_DMA))
-		return -EINVAL;
-
-	if ( copy_from_user( &request, (drm_buf_desc_t __user *)arg,
-			     sizeof(request) ) )
-		return -EFAULT;
-
-#if __OS_HAS_AGP
-	if ( request.flags & _DRM_AGP_BUFFER )
-		return DRM(addbufs_agp)( inode, filp, cmd, arg );
-	else
-#endif
-	if ( request.flags & _DRM_SG_BUFFER )
-		return DRM(addbufs_sg)( inode, filp, cmd, arg );
-	else
-		return DRM(addbufs_pci)( inode, filp, cmd, arg );
-}
-
-
-/**
- * Get information about the buffer mappings.
- *
- * This was originally mean for debugging purposes, or by a sophisticated
- * client library to determine how best to use the available buffers (e.g.,
- * large buffers can be used for image transfer).
- *
- * \param inode device inode.
- * \param filp file pointer.
- * \param cmd command.
- * \param arg pointer to a drm_buf_info structure.
- * \return zero on success or a negative number on failure.
- *
- * Increments drm_device::buf_use while holding the drm_device::count_lock
- * lock, preventing of allocating more buffers after this call. Information
- * about each requested buffer is then copied into user space.
- */
-int DRM(infobufs)( struct inode *inode, struct file *filp,
-		   unsigned int cmd, unsigned long arg )
-{
-	drm_file_t *priv = filp->private_data;
-	drm_device_t *dev = priv->dev;
-	drm_device_dma_t *dma = dev->dma;
-	drm_buf_info_t request;
-	drm_buf_info_t __user *argp = (void __user *)arg;
-	int i;
-	int count;
-
-	if (!drm_core_check_feature(dev, DRIVER_HAVE_DMA))
-		return -EINVAL;
-
-	if ( !dma ) return -EINVAL;
-
-	spin_lock( &dev->count_lock );
-	if ( atomic_read( &dev->buf_alloc ) ) {
-		spin_unlock( &dev->count_lock );
-		return -EBUSY;
-	}
-	++dev->buf_use;		/* Can't allocate more after this call */
-	spin_unlock( &dev->count_lock );
-
-	if ( copy_from_user( &request, argp, sizeof(request) ) )
-		return -EFAULT;
-
-	for ( i = 0, count = 0 ; i < DRM_MAX_ORDER + 1 ; i++ ) {
-		if ( dma->bufs[i].buf_count ) ++count;
-	}
-
-	DRM_DEBUG( "count = %d\n", count );
-
-	if ( request.count >= count ) {
-		for ( i = 0, count = 0 ; i < DRM_MAX_ORDER + 1 ; i++ ) {
-			if ( dma->bufs[i].buf_count ) {
-				drm_buf_desc_t __user *to = &request.list[count];
-				drm_buf_entry_t *from = &dma->bufs[i];
-				drm_freelist_t *list = &dma->bufs[i].freelist;
-				if ( copy_to_user( &to->count,
-						   &from->buf_count,
-						   sizeof(from->buf_count) ) ||
-				     copy_to_user( &to->size,
-						   &from->buf_size,
-						   sizeof(from->buf_size) ) ||
-				     copy_to_user( &to->low_mark,
-						   &list->low_mark,
-						   sizeof(list->low_mark) ) ||
-				     copy_to_user( &to->high_mark,
-						   &list->high_mark,
-						   sizeof(list->high_mark) ) )
-					return -EFAULT;
-
-				DRM_DEBUG( "%d %d %d %d %d\n",
-					   i,
-					   dma->bufs[i].buf_count,
-					   dma->bufs[i].buf_size,
-					   dma->bufs[i].freelist.low_mark,
-					   dma->bufs[i].freelist.high_mark );
-				++count;
-			}
-		}
-	}
-	request.count = count;
-
-	if ( copy_to_user( argp, &request, sizeof(request) ) )
-		return -EFAULT;
-
-	return 0;
-}
-
-/**
- * Specifies a low and high water mark for buffer allocation
- *
- * \param inode device inode.
- * \param filp file pointer.
- * \param cmd command.
- * \param arg a pointer to a drm_buf_desc structure.
- * \return zero on success or a negative number on failure.
- *
- * Verifies that the size order is bounded between the admissible orders and
- * updates the respective drm_device_dma::bufs entry low and high water mark.
- *
- * \note This ioctl is deprecated and mostly never used.
- */
-int DRM(markbufs)( struct inode *inode, struct file *filp,
-		   unsigned int cmd, unsigned long arg )
-{
-	drm_file_t *priv = filp->private_data;
-	drm_device_t *dev = priv->dev;
-	drm_device_dma_t *dma = dev->dma;
-	drm_buf_desc_t request;
-	int order;
-	drm_buf_entry_t *entry;
-
-	if (!drm_core_check_feature(dev, DRIVER_HAVE_DMA))
-		return -EINVAL;
-
-	if ( !dma ) return -EINVAL;
-
-	if ( copy_from_user( &request,
-			     (drm_buf_desc_t __user *)arg,
-			     sizeof(request) ) )
-		return -EFAULT;
-
-	DRM_DEBUG( "%d, %d, %d\n",
-		   request.size, request.low_mark, request.high_mark );
-	order = DRM(order)( request.size );
-	if ( order < DRM_MIN_ORDER || order > DRM_MAX_ORDER ) return -EINVAL;
-	entry = &dma->bufs[order];
-
-	if ( request.low_mark < 0 || request.low_mark > entry->buf_count )
-		return -EINVAL;
-	if ( request.high_mark < 0 || request.high_mark > entry->buf_count )
-		return -EINVAL;
-
-	entry->freelist.low_mark  = request.low_mark;
-	entry->freelist.high_mark = request.high_mark;
-
-	return 0;
-}
-
-/**
- * Unreserve the buffers in list, previously reserved using drmDMA. 
- *
- * \param inode device inode.
- * \param filp file pointer.
- * \param cmd command.
- * \param arg pointer to a drm_buf_free structure.
- * \return zero on success or a negative number on failure.
- * 
- * Calls free_buffer() for each used buffer.
- * This function is primarily used for debugging.
- */
-int DRM(freebufs)( struct inode *inode, struct file *filp,
-		   unsigned int cmd, unsigned long arg )
-{
-	drm_file_t *priv = filp->private_data;
-	drm_device_t *dev = priv->dev;
-	drm_device_dma_t *dma = dev->dma;
-	drm_buf_free_t request;
-	int i;
-	int idx;
-	drm_buf_t *buf;
-
-	if (!drm_core_check_feature(dev, DRIVER_HAVE_DMA))
-		return -EINVAL;
-
-	if ( !dma ) return -EINVAL;
-
-	if ( copy_from_user( &request,
-			     (drm_buf_free_t __user *)arg,
-			     sizeof(request) ) )
-		return -EFAULT;
-
-	DRM_DEBUG( "%d\n", request.count );
-	for ( i = 0 ; i < request.count ; i++ ) {
-		if ( copy_from_user( &idx,
-				     &request.list[i],
-				     sizeof(idx) ) )
-			return -EFAULT;
-		if ( idx < 0 || idx >= dma->buf_count ) {
-			DRM_ERROR( "Index %d (of %d max)\n",
-				   idx, dma->buf_count - 1 );
-			return -EINVAL;
-		}
-		buf = dma->buflist[idx];
-		if ( buf->filp != filp ) {
-			DRM_ERROR( "Process %d freeing buffer not owned\n",
-				   current->pid );
-			return -EINVAL;
-		}
-		DRM(free_buffer)( dev, buf );
-	}
-
-	return 0;
-}
-
-/**
- * Maps all of the DMA buffers into client-virtual space (ioctl).
- *
- * \param inode device inode.
- * \param filp file pointer.
- * \param cmd command.
- * \param arg pointer to a drm_buf_map structure.
- * \return zero on success or a negative number on failure.
- *
- * Maps the AGP or SG buffer region with do_mmap(), and copies information
- * about each buffer into user space. The PCI buffers are already mapped on the
- * addbufs_pci() call.
- */
-int DRM(mapbufs)( struct inode *inode, struct file *filp,
-		  unsigned int cmd, unsigned long arg )
-{
-	drm_file_t *priv = filp->private_data;
-	drm_device_t *dev = priv->dev;
-	drm_device_dma_t *dma = dev->dma;
-	drm_buf_map_t __user *argp = (void __user *)arg;
-	int retcode = 0;
-	const int zero = 0;
-	unsigned long virtual;
-	unsigned long address;
-	drm_buf_map_t request;
-	int i;
-
-	if (!drm_core_check_feature(dev, DRIVER_HAVE_DMA))
-		return -EINVAL;
-
-	if ( !dma ) return -EINVAL;
-
-	spin_lock( &dev->count_lock );
-	if ( atomic_read( &dev->buf_alloc ) ) {
-		spin_unlock( &dev->count_lock );
-		return -EBUSY;
-	}
-	dev->buf_use++;		/* Can't allocate more after this call */
-	spin_unlock( &dev->count_lock );
-
-	if ( copy_from_user( &request, argp, sizeof(request) ) )
-		return -EFAULT;
-
-	if ( request.count >= dma->buf_count ) {
-		if ((drm_core_has_AGP(dev) && (dma->flags & _DRM_DMA_USE_AGP)) ||
-		    (drm_core_check_feature(dev, DRIVER_SG) && (dma->flags & _DRM_DMA_USE_SG)) ) {
-			drm_map_t *map = dev->agp_buffer_map;
-
-			if ( !map ) {
-				retcode = -EINVAL;
-				goto done;
-			}
-
-#if LINUX_VERSION_CODE <= 0x020402
-			down( &current->mm->mmap_sem );
-#else
-			down_write( &current->mm->mmap_sem );
-#endif
-			virtual = do_mmap( filp, 0, map->size,
-					   PROT_READ | PROT_WRITE,
-					   MAP_SHARED,
-					   (unsigned long)map->offset );
-#if LINUX_VERSION_CODE <= 0x020402
-			up( &current->mm->mmap_sem );
-#else
-			up_write( &current->mm->mmap_sem );
-#endif
-		} else {
-#if LINUX_VERSION_CODE <= 0x020402
-			down( &current->mm->mmap_sem );
-#else
-			down_write( &current->mm->mmap_sem );
-#endif
-			virtual = do_mmap( filp, 0, dma->byte_count,
-					   PROT_READ | PROT_WRITE,
-					   MAP_SHARED, 0 );
-#if LINUX_VERSION_CODE <= 0x020402
-			up( &current->mm->mmap_sem );
-#else
-			up_write( &current->mm->mmap_sem );
-#endif
-		}
-		if ( virtual > -1024UL ) {
-			/* Real error */
-			retcode = (signed long)virtual;
-			goto done;
-		}
-		request.virtual = (void __user *)virtual;
-
-		for ( i = 0 ; i < dma->buf_count ; i++ ) {
-			if ( copy_to_user( &request.list[i].idx,
-					   &dma->buflist[i]->idx,
-					   sizeof(request.list[0].idx) ) ) {
-				retcode = -EFAULT;
-				goto done;
-			}
-			if ( copy_to_user( &request.list[i].total,
-					   &dma->buflist[i]->total,
-					   sizeof(request.list[0].total) ) ) {
-				retcode = -EFAULT;
-				goto done;
-			}
-			if ( copy_to_user( &request.list[i].used,
-					   &zero,
-					   sizeof(zero) ) ) {
-				retcode = -EFAULT;
-				goto done;
-			}
-			address = virtual + dma->buflist[i]->offset; /* *** */
-			if ( copy_to_user( &request.list[i].address,
-					   &address,
-					   sizeof(address) ) ) {
-				retcode = -EFAULT;
-				goto done;
-			}
-		}
-	}
- done:
-	request.count = dma->buf_count;
-	DRM_DEBUG( "%d buffers, retcode = %d\n", request.count, retcode );
-
-	if ( copy_to_user( argp, &request, sizeof(request) ) )
-		return -EFAULT;
-
-	return retcode;
-}
-
diff -Nru a/drivers/char/drm/drm_context.c b/drivers/char/drm/drm_context.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/char/drm/drm_context.c	2005-01-10 20:11:15 -08:00
@@ -0,0 +1,578 @@
+/**
+ * \file drm_context.h 
+ * IOCTLs for generic contexts
+ * 
+ * \author Rickard E. (Rik) Faith <faith@valinux.com>
+ * \author Gareth Hughes <gareth@valinux.com>
+ */
+
+/*
+ * Created: Fri Nov 24 18:31:37 2000 by gareth@valinux.com
+ *
+ * Copyright 1999, 2000 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * ChangeLog:
+ *  2001-11-16	Torsten Duwe <duwe@caldera.de>
+ *		added context constructor/destructor hooks,
+ *		needed by SiS driver's memory management.
+ */
+
+#include "drmP.h"
+
+/******************************************************************/
+/** \name Context bitmap support */
+/*@{*/
+
+/**
+ * Free a handle from the context bitmap.
+ *
+ * \param dev DRM device.
+ * \param ctx_handle context handle.
+ *
+ * Clears the bit specified by \p ctx_handle in drm_device::ctx_bitmap and the entry
+ * in drm_device::context_sareas, while holding the drm_device::struct_sem
+ * lock.
+ */
+void drm_ctxbitmap_free( drm_device_t *dev, int ctx_handle )
+{
+	if ( ctx_handle < 0 ) goto failed;
+	if ( !dev->ctx_bitmap ) goto failed;
+
+	if ( ctx_handle < DRM_MAX_CTXBITMAP ) {
+		down(&dev->struct_sem);
+		clear_bit( ctx_handle, dev->ctx_bitmap );
+		dev->context_sareas[ctx_handle] = NULL;
+		up(&dev->struct_sem);
+		return;
+	}
+failed:
+       	DRM_ERROR( "Attempt to free invalid context handle: %d\n",
+		   ctx_handle );
+       	return;
+}
+
+/** 
+ * Context bitmap allocation.
+ *
+ * \param dev DRM device.
+ * \return (non-negative) context handle on success or a negative number on failure.
+ *
+ * Find the first zero bit in drm_device::ctx_bitmap and (re)allocates
+ * drm_device::context_sareas to accommodate the new entry while holding the
+ * drm_device::struct_sem lock.
+ */
+int drm_ctxbitmap_next( drm_device_t *dev )
+{
+	int bit;
+
+	if(!dev->ctx_bitmap) return -1;
+
+	down(&dev->struct_sem);
+	bit = find_first_zero_bit( dev->ctx_bitmap, DRM_MAX_CTXBITMAP );
+	if ( bit < DRM_MAX_CTXBITMAP ) {
+		set_bit( bit, dev->ctx_bitmap );
+	   	DRM_DEBUG( "drm_ctxbitmap_next bit : %d\n", bit );
+		if((bit+1) > dev->max_context) {
+			dev->max_context = (bit+1);
+			if(dev->context_sareas) {
+				drm_map_t **ctx_sareas;
+
+				ctx_sareas = drm_realloc(dev->context_sareas,
+						(dev->max_context - 1) * 
+						sizeof(*dev->context_sareas),
+						dev->max_context * 
+						sizeof(*dev->context_sareas),
+						DRM_MEM_MAPS);
+				if(!ctx_sareas) {
+					clear_bit(bit, dev->ctx_bitmap);
+					up(&dev->struct_sem);
+					return -1;
+				}
+				dev->context_sareas = ctx_sareas;
+				dev->context_sareas[bit] = NULL;
+			} else {
+				/* max_context == 1 at this point */
+				dev->context_sareas = drm_alloc(
+						dev->max_context * 
+						sizeof(*dev->context_sareas),
+						DRM_MEM_MAPS);
+				if(!dev->context_sareas) {
+					clear_bit(bit, dev->ctx_bitmap);
+					up(&dev->struct_sem);
+					return -1;
+				}
+				dev->context_sareas[bit] = NULL;
+			}
+		}
+		up(&dev->struct_sem);
+		return bit;
+	}
+	up(&dev->struct_sem);
+	return -1;
+}
+
+/**
+ * Context bitmap initialization.
+ *
+ * \param dev DRM device.
+ *
+ * Allocates and initialize drm_device::ctx_bitmap and drm_device::context_sareas, while holding
+ * the drm_device::struct_sem lock.
+ */
+int drm_ctxbitmap_init( drm_device_t *dev )
+{
+	int i;
+   	int temp;
+
+	down(&dev->struct_sem);
+	dev->ctx_bitmap = (unsigned long *) drm_alloc( PAGE_SIZE,
+							DRM_MEM_CTXBITMAP );
+	if ( dev->ctx_bitmap == NULL ) {
+		up(&dev->struct_sem);
+		return -ENOMEM;
+	}
+	memset( (void *)dev->ctx_bitmap, 0, PAGE_SIZE );
+	dev->context_sareas = NULL;
+	dev->max_context = -1;
+	up(&dev->struct_sem);
+
+	for ( i = 0 ; i < DRM_RESERVED_CONTEXTS ; i++ ) {
+		temp = drm_ctxbitmap_next( dev );
+	   	DRM_DEBUG( "drm_ctxbitmap_init : %d\n", temp );
+	}
+
+	return 0;
+}
+
+/**
+ * Context bitmap cleanup.
+ *
+ * \param dev DRM device.
+ *
+ * Frees drm_device::ctx_bitmap and drm_device::context_sareas, while holding
+ * the drm_device::struct_sem lock.
+ */
+void drm_ctxbitmap_cleanup( drm_device_t *dev )
+{
+	down(&dev->struct_sem);
+	if( dev->context_sareas ) drm_free( dev->context_sareas,
+					     sizeof(*dev->context_sareas) * 
+					     dev->max_context,
+					     DRM_MEM_MAPS );
+	drm_free( (void *)dev->ctx_bitmap, PAGE_SIZE, DRM_MEM_CTXBITMAP );
+	up(&dev->struct_sem);
+}
+
+/*@}*/
+
+/******************************************************************/
+/** \name Per Context SAREA Support */
+/*@{*/
+
+/**
+ * Get per-context SAREA.
+ * 
+ * \param inode device inode.
+ * \param filp file pointer.
+ * \param cmd command.
+ * \param arg user argument pointing to a drm_ctx_priv_map structure.
+ * \return zero on success or a negative number on failure.
+ *
+ * Gets the map from drm_device::context_sareas with the handle specified and
+ * returns its handle.
+ */
+int drm_getsareactx(struct inode *inode, struct file *filp,
+		     unsigned int cmd, unsigned long arg)
+{
+	drm_file_t	*priv	= filp->private_data;
+	drm_device_t	*dev	= priv->dev;
+	drm_ctx_priv_map_t __user *argp = (void __user *)arg;
+	drm_ctx_priv_map_t request;
+	drm_map_t *map;
+
+	if (copy_from_user(&request, argp, sizeof(request)))
+		return -EFAULT;
+
+	down(&dev->struct_sem);
+	if (dev->max_context < 0 || request.ctx_id >= (unsigned) dev->max_context) {
+		up(&dev->struct_sem);
+		return -EINVAL;
+	}
+
+	map = dev->context_sareas[request.ctx_id];
+	up(&dev->struct_sem);
+
+	request.handle = map->handle;
+	if (copy_to_user(argp, &request, sizeof(request)))
+		return -EFAULT;
+	return 0;
+}
+
+/**
+ * Set per-context SAREA.
+ * 
+ * \param inode device inode.
+ * \param filp file pointer.
+ * \param cmd command.
+ * \param arg user argument pointing to a drm_ctx_priv_map structure.
+ * \return zero on success or a negative number on failure.
+ *
+ * Searches the mapping specified in \p arg and update the entry in
+ * drm_device::context_sareas with it.
+ */
+int drm_setsareactx(struct inode *inode, struct file *filp,
+		     unsigned int cmd, unsigned long arg)
+{
+	drm_file_t	*priv	= filp->private_data;
+	drm_device_t	*dev	= priv->dev;
+	drm_ctx_priv_map_t request;
+	drm_map_t *map = NULL;
+	drm_map_list_t *r_list = NULL;
+	struct list_head *list;
+
+	if (copy_from_user(&request,
+			   (drm_ctx_priv_map_t __user *)arg,
+			   sizeof(request)))
+		return -EFAULT;
+
+	down(&dev->struct_sem);
+	list_for_each(list, &dev->maplist->head) {
+		r_list = list_entry(list, drm_map_list_t, head);
+		if(r_list->map &&
+		   r_list->map->handle == request.handle)
+			goto found;
+	}
+bad:
+	up(&dev->struct_sem);
+	return -EINVAL;
+
+found:
+	map = r_list->map;
+	if (!map) goto bad;
+	if (dev->max_context < 0)
+		goto bad;
+	if (request.ctx_id >= (unsigned) dev->max_context)
+		goto bad;
+	dev->context_sareas[request.ctx_id] = map;
+	up(&dev->struct_sem);
+	return 0;
+}
+
+/*@}*/
+
+/******************************************************************/
+/** \name The actual DRM context handling routines */
+/*@{*/
+
+/**
+ * Switch context.
+ *
+ * \param dev DRM device.
+ * \param old old context handle.
+ * \param new new context handle.
+ * \return zero on success or a negative number on failure.
+ *
+ * Attempt to set drm_device::context_flag.
+ */
+int drm_context_switch( drm_device_t *dev, int old, int new )
+{
+        if ( test_and_set_bit( 0, &dev->context_flag ) ) {
+                DRM_ERROR( "Reentering -- FIXME\n" );
+                return -EBUSY;
+        }
+
+
+        DRM_DEBUG( "Context switch from %d to %d\n", old, new );
+
+        if ( new == dev->last_context ) {
+                clear_bit( 0, &dev->context_flag );
+                return 0;
+        }
+
+        return 0;
+}
+
+/**
+ * Complete context switch.
+ *
+ * \param dev DRM device.
+ * \param new new context handle.
+ * \return zero on success or a negative number on failure.
+ *
+ * Updates drm_device::last_context and drm_device::last_switch. Verifies the
+ * hardware lock is held, clears the drm_device::context_flag and wakes up
+ * drm_device::context_wait.
+ */
+int drm_context_switch_complete( drm_device_t *dev, int new )
+{
+        dev->last_context = new;  /* PRE/POST: This is the _only_ writer. */
+        dev->last_switch  = jiffies;
+
+        if ( !_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock) ) {
+                DRM_ERROR( "Lock isn't held after context switch\n" );
+        }
+
+				/* If a context switch is ever initiated
+                                   when the kernel holds the lock, release
+                                   that lock here. */
+        clear_bit( 0, &dev->context_flag );
+        wake_up( &dev->context_wait );
+
+        return 0;
+}
+
+/**
+ * Reserve contexts.
+ *
+ * \param inode device inode.
+ * \param filp file pointer.
+ * \param cmd command.
+ * \param arg user argument pointing to a drm_ctx_res structure.
+ * \return zero on success or a negative number on failure.
+ */
+int drm_resctx( struct inode *inode, struct file *filp,
+		 unsigned int cmd, unsigned long arg )
+{
+	drm_ctx_res_t res;
+	drm_ctx_t __user *argp = (void __user *)arg;
+	drm_ctx_t ctx;
+	int i;
+
+	if ( copy_from_user( &res, argp, sizeof(res) ) )
+		return -EFAULT;
+
+	if ( res.count >= DRM_RESERVED_CONTEXTS ) {
+		memset( &ctx, 0, sizeof(ctx) );
+		for ( i = 0 ; i < DRM_RESERVED_CONTEXTS ; i++ ) {
+			ctx.handle = i;
+			if ( copy_to_user( &res.contexts[i],
+					   &i, sizeof(i) ) )
+				return -EFAULT;
+		}
+	}
+	res.count = DRM_RESERVED_CONTEXTS;
+
+	if ( copy_to_user( argp, &res, sizeof(res) ) )
+		return -EFAULT;
+	return 0;
+}
+
+/**
+ * Add context.
+ *
+ * \param inode device inode.
+ * \param filp file pointer.
+ * \param cmd command.
+ * \param arg user argument pointing to a drm_ctx structure.
+ * \return zero on success or a negative number on failure.
+ *
+ * Get a new handle for the context and copy to userspace.
+ */
+int drm_addctx( struct inode *inode, struct file *filp,
+		 unsigned int cmd, unsigned long arg )
+{
+	drm_file_t *priv = filp->private_data;
+	drm_device_t *dev = priv->dev;
+	drm_ctx_list_t * ctx_entry;
+	drm_ctx_t __user *argp = (void __user *)arg;
+	drm_ctx_t ctx;
+
+	if ( copy_from_user( &ctx, argp, sizeof(ctx) ) )
+		return -EFAULT;
+
+	ctx.handle = drm_ctxbitmap_next( dev );
+	if ( ctx.handle == DRM_KERNEL_CONTEXT ) {
+				/* Skip kernel's context and get a new one. */
+		ctx.handle = drm_ctxbitmap_next( dev );
+	}
+	DRM_DEBUG( "%d\n", ctx.handle );
+	if ( ctx.handle == -1 ) {
+		DRM_DEBUG( "Not enough free contexts.\n" );
+				/* Should this return -EBUSY instead? */
+		return -ENOMEM;
+	}
+
+	if ( ctx.handle != DRM_KERNEL_CONTEXT )
+	{
+		if (dev->driver->context_ctor)
+			dev->driver->context_ctor(dev, ctx.handle);
+	}
+
+	ctx_entry = drm_alloc( sizeof(*ctx_entry), DRM_MEM_CTXLIST );
+	if ( !ctx_entry ) {
+		DRM_DEBUG("out of memory\n");
+		return -ENOMEM;
+	}
+
+	INIT_LIST_HEAD( &ctx_entry->head );
+	ctx_entry->handle = ctx.handle;
+	ctx_entry->tag = priv;
+
+	down( &dev->ctxlist_sem );
+	list_add( &ctx_entry->head, &dev->ctxlist->head );
+	++dev->ctx_count;
+	up( &dev->ctxlist_sem );
+
+	if ( copy_to_user( argp, &ctx, sizeof(ctx) ) )
+		return -EFAULT;
+	return 0;
+}
+
+int drm_modctx( struct inode *inode, struct file *filp,
+		 unsigned int cmd, unsigned long arg )
+{
+	/* This does nothing */
+	return 0;
+}
+
+/**
+ * Get context.
+ *
+ * \param inode device inode.
+ * \param filp file pointer.
+ * \param cmd command.
+ * \param arg user argument pointing to a drm_ctx structure.
+ * \return zero on success or a negative number on failure.
+ */
+int drm_getctx( struct inode *inode, struct file *filp,
+		 unsigned int cmd, unsigned long arg )
+{
+	drm_ctx_t __user *argp = (void __user *)arg;
+	drm_ctx_t ctx;
+
+	if ( copy_from_user( &ctx, argp, sizeof(ctx) ) )
+		return -EFAULT;
+
+	/* This is 0, because we don't handle any context flags */
+	ctx.flags = 0;
+
+	if ( copy_to_user( argp, &ctx, sizeof(ctx) ) )
+		return -EFAULT;
+	return 0;
+}
+
+/**
+ * Switch context.
+ *
+ * \param inode device inode.
+ * \param filp file pointer.
+ * \param cmd command.
+ * \param arg user argument pointing to a drm_ctx structure.
+ * \return zero on success or a negative number on failure.
+ *
+ * Calls context_switch().
+ */
+int drm_switchctx( struct inode *inode, struct file *filp,
+		    unsigned int cmd, unsigned long arg )
+{
+	drm_file_t *priv = filp->private_data;
+	drm_device_t *dev = priv->dev;
+	drm_ctx_t ctx;
+
+	if ( copy_from_user( &ctx, (drm_ctx_t __user *)arg, sizeof(ctx) ) )
+		return -EFAULT;
+
+	DRM_DEBUG( "%d\n", ctx.handle );
+	return drm_context_switch( dev, dev->last_context, ctx.handle );
+}
+
+/**
+ * New context.
+ *
+ * \param inode device inode.
+ * \param filp file pointer.
+ * \param cmd command.
+ * \param arg user argument pointing to a drm_ctx structure.
+ * \return zero on success or a negative number on failure.
+ *
+ * Calls context_switch_complete().
+ */
+int drm_newctx( struct inode *inode, struct file *filp,
+		 unsigned int cmd, unsigned long arg )
+{
+	drm_file_t *priv = filp->private_data;
+	drm_device_t *dev = priv->dev;
+	drm_ctx_t ctx;
+
+	if ( copy_from_user( &ctx, (drm_ctx_t __user *)arg, sizeof(ctx) ) )
+		return -EFAULT;
+
+	DRM_DEBUG( "%d\n", ctx.handle );
+	drm_context_switch_complete( dev, ctx.handle );
+
+	return 0;
+}
+
+/**
+ * Remove context.
+ *
+ * \param inode device inode.
+ * \param filp file pointer.
+ * \param cmd command.
+ * \param arg user argument pointing to a drm_ctx structure.
+ * \return zero on success or a negative number on failure.
+ *
+ * If not the special kernel context, calls ctxbitmap_free() to free the specified context.
+ */
+int drm_rmctx( struct inode *inode, struct file *filp,
+		unsigned int cmd, unsigned long arg )
+{
+	drm_file_t *priv = filp->private_data;
+	drm_device_t *dev = priv->dev;
+	drm_ctx_t ctx;
+
+	if ( copy_from_user( &ctx, (drm_ctx_t __user *)arg, sizeof(ctx) ) )
+		return -EFAULT;
+
+	DRM_DEBUG( "%d\n", ctx.handle );
+	if ( ctx.handle == DRM_KERNEL_CONTEXT + 1 ) {
+		priv->remove_auth_on_close = 1;
+	}
+	if ( ctx.handle != DRM_KERNEL_CONTEXT ) {
+		if (dev->driver->context_dtor)
+			dev->driver->context_dtor(dev, ctx.handle);
+		drm_ctxbitmap_free( dev, ctx.handle );
+	}
+
+	down( &dev->ctxlist_sem );
+	if ( !list_empty( &dev->ctxlist->head ) ) {
+		drm_ctx_list_t *pos, *n;
+
+		list_for_each_entry_safe( pos, n, &dev->ctxlist->head, head ) {
+			if ( pos->handle == ctx.handle ) {
+				list_del( &pos->head );
+				drm_free( pos, sizeof(*pos), DRM_MEM_CTXLIST );
+				--dev->ctx_count;
+			}
+		}
+	}
+	up( &dev->ctxlist_sem );
+
+	return 0;
+}
+
+/*@}*/
+
diff -Nru a/drivers/char/drm/drm_context.h b/drivers/char/drm/drm_context.h
--- a/drivers/char/drm/drm_context.h	2005-01-10 20:11:15 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,578 +0,0 @@
-/**
- * \file drm_context.h 
- * IOCTLs for generic contexts
- * 
- * \author Rickard E. (Rik) Faith <faith@valinux.com>
- * \author Gareth Hughes <gareth@valinux.com>
- */
-
-/*
- * Created: Fri Nov 24 18:31:37 2000 by gareth@valinux.com
- *
- * Copyright 1999, 2000 Precision Insight, Inc., Cedar Park, Texas.
- * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/*
- * ChangeLog:
- *  2001-11-16	Torsten Duwe <duwe@caldera.de>
- *		added context constructor/destructor hooks,
- *		needed by SiS driver's memory management.
- */
-
-#include "drmP.h"
-
-/******************************************************************/
-/** \name Context bitmap support */
-/*@{*/
-
-/**
- * Free a handle from the context bitmap.
- *
- * \param dev DRM device.
- * \param ctx_handle context handle.
- *
- * Clears the bit specified by \p ctx_handle in drm_device::ctx_bitmap and the entry
- * in drm_device::context_sareas, while holding the drm_device::struct_sem
- * lock.
- */
-void DRM(ctxbitmap_free)( drm_device_t *dev, int ctx_handle )
-{
-	if ( ctx_handle < 0 ) goto failed;
-	if ( !dev->ctx_bitmap ) goto failed;
-
-	if ( ctx_handle < DRM_MAX_CTXBITMAP ) {
-		down(&dev->struct_sem);
-		clear_bit( ctx_handle, dev->ctx_bitmap );
-		dev->context_sareas[ctx_handle] = NULL;
-		up(&dev->struct_sem);
-		return;
-	}
-failed:
-       	DRM_ERROR( "Attempt to free invalid context handle: %d\n",
-		   ctx_handle );
-       	return;
-}
-
-/** 
- * Context bitmap allocation.
- *
- * \param dev DRM device.
- * \return (non-negative) context handle on success or a negative number on failure.
- *
- * Find the first zero bit in drm_device::ctx_bitmap and (re)allocates
- * drm_device::context_sareas to accommodate the new entry while holding the
- * drm_device::struct_sem lock.
- */
-int DRM(ctxbitmap_next)( drm_device_t *dev )
-{
-	int bit;
-
-	if(!dev->ctx_bitmap) return -1;
-
-	down(&dev->struct_sem);
-	bit = find_first_zero_bit( dev->ctx_bitmap, DRM_MAX_CTXBITMAP );
-	if ( bit < DRM_MAX_CTXBITMAP ) {
-		set_bit( bit, dev->ctx_bitmap );
-	   	DRM_DEBUG( "drm_ctxbitmap_next bit : %d\n", bit );
-		if((bit+1) > dev->max_context) {
-			dev->max_context = (bit+1);
-			if(dev->context_sareas) {
-				drm_map_t **ctx_sareas;
-
-				ctx_sareas = DRM(realloc)(dev->context_sareas,
-						(dev->max_context - 1) * 
-						sizeof(*dev->context_sareas),
-						dev->max_context * 
-						sizeof(*dev->context_sareas),
-						DRM_MEM_MAPS);
-				if(!ctx_sareas) {
-					clear_bit(bit, dev->ctx_bitmap);
-					up(&dev->struct_sem);
-					return -1;
-				}
-				dev->context_sareas = ctx_sareas;
-				dev->context_sareas[bit] = NULL;
-			} else {
-				/* max_context == 1 at this point */
-				dev->context_sareas = DRM(alloc)(
-						dev->max_context * 
-						sizeof(*dev->context_sareas),
-						DRM_MEM_MAPS);
-				if(!dev->context_sareas) {
-					clear_bit(bit, dev->ctx_bitmap);
-					up(&dev->struct_sem);
-					return -1;
-				}
-				dev->context_sareas[bit] = NULL;
-			}
-		}
-		up(&dev->struct_sem);
-		return bit;
-	}
-	up(&dev->struct_sem);
-	return -1;
-}
-
-/**
- * Context bitmap initialization.
- *
- * \param dev DRM device.
- *
- * Allocates and initialize drm_device::ctx_bitmap and drm_device::context_sareas, while holding
- * the drm_device::struct_sem lock.
- */
-int DRM(ctxbitmap_init)( drm_device_t *dev )
-{
-	int i;
-   	int temp;
-
-	down(&dev->struct_sem);
-	dev->ctx_bitmap = (unsigned long *) DRM(alloc)( PAGE_SIZE,
-							DRM_MEM_CTXBITMAP );
-	if ( dev->ctx_bitmap == NULL ) {
-		up(&dev->struct_sem);
-		return -ENOMEM;
-	}
-	memset( (void *)dev->ctx_bitmap, 0, PAGE_SIZE );
-	dev->context_sareas = NULL;
-	dev->max_context = -1;
-	up(&dev->struct_sem);
-
-	for ( i = 0 ; i < DRM_RESERVED_CONTEXTS ; i++ ) {
-		temp = DRM(ctxbitmap_next)( dev );
-	   	DRM_DEBUG( "drm_ctxbitmap_init : %d\n", temp );
-	}
-
-	return 0;
-}
-
-/**
- * Context bitmap cleanup.
- *
- * \param dev DRM device.
- *
- * Frees drm_device::ctx_bitmap and drm_device::context_sareas, while holding
- * the drm_device::struct_sem lock.
- */
-void DRM(ctxbitmap_cleanup)( drm_device_t *dev )
-{
-	down(&dev->struct_sem);
-	if( dev->context_sareas ) DRM(free)( dev->context_sareas,
-					     sizeof(*dev->context_sareas) * 
-					     dev->max_context,
-					     DRM_MEM_MAPS );
-	DRM(free)( (void *)dev->ctx_bitmap, PAGE_SIZE, DRM_MEM_CTXBITMAP );
-	up(&dev->struct_sem);
-}
-
-/*@}*/
-
-/******************************************************************/
-/** \name Per Context SAREA Support */
-/*@{*/
-
-/**
- * Get per-context SAREA.
- * 
- * \param inode device inode.
- * \param filp file pointer.
- * \param cmd command.
- * \param arg user argument pointing to a drm_ctx_priv_map structure.
- * \return zero on success or a negative number on failure.
- *
- * Gets the map from drm_device::context_sareas with the handle specified and
- * returns its handle.
- */
-int DRM(getsareactx)(struct inode *inode, struct file *filp,
-		     unsigned int cmd, unsigned long arg)
-{
-	drm_file_t	*priv	= filp->private_data;
-	drm_device_t	*dev	= priv->dev;
-	drm_ctx_priv_map_t __user *argp = (void __user *)arg;
-	drm_ctx_priv_map_t request;
-	drm_map_t *map;
-
-	if (copy_from_user(&request, argp, sizeof(request)))
-		return -EFAULT;
-
-	down(&dev->struct_sem);
-	if (dev->max_context < 0 || request.ctx_id >= (unsigned) dev->max_context) {
-		up(&dev->struct_sem);
-		return -EINVAL;
-	}
-
-	map = dev->context_sareas[request.ctx_id];
-	up(&dev->struct_sem);
-
-	request.handle = map->handle;
-	if (copy_to_user(argp, &request, sizeof(request)))
-		return -EFAULT;
-	return 0;
-}
-
-/**
- * Set per-context SAREA.
- * 
- * \param inode device inode.
- * \param filp file pointer.
- * \param cmd command.
- * \param arg user argument pointing to a drm_ctx_priv_map structure.
- * \return zero on success or a negative number on failure.
- *
- * Searches the mapping specified in \p arg and update the entry in
- * drm_device::context_sareas with it.
- */
-int DRM(setsareactx)(struct inode *inode, struct file *filp,
-		     unsigned int cmd, unsigned long arg)
-{
-	drm_file_t	*priv	= filp->private_data;
-	drm_device_t	*dev	= priv->dev;
-	drm_ctx_priv_map_t request;
-	drm_map_t *map = NULL;
-	drm_map_list_t *r_list = NULL;
-	struct list_head *list;
-
-	if (copy_from_user(&request,
-			   (drm_ctx_priv_map_t __user *)arg,
-			   sizeof(request)))
-		return -EFAULT;
-
-	down(&dev->struct_sem);
-	list_for_each(list, &dev->maplist->head) {
-		r_list = list_entry(list, drm_map_list_t, head);
-		if(r_list->map &&
-		   r_list->map->handle == request.handle)
-			goto found;
-	}
-bad:
-	up(&dev->struct_sem);
-	return -EINVAL;
-
-found:
-	map = r_list->map;
-	if (!map) goto bad;
-	if (dev->max_context < 0)
-		goto bad;
-	if (request.ctx_id >= (unsigned) dev->max_context)
-		goto bad;
-	dev->context_sareas[request.ctx_id] = map;
-	up(&dev->struct_sem);
-	return 0;
-}
-
-/*@}*/
-
-/******************************************************************/
-/** \name The actual DRM context handling routines */
-/*@{*/
-
-/**
- * Switch context.
- *
- * \param dev DRM device.
- * \param old old context handle.
- * \param new new context handle.
- * \return zero on success or a negative number on failure.
- *
- * Attempt to set drm_device::context_flag.
- */
-int DRM(context_switch)( drm_device_t *dev, int old, int new )
-{
-        if ( test_and_set_bit( 0, &dev->context_flag ) ) {
-                DRM_ERROR( "Reentering -- FIXME\n" );
-                return -EBUSY;
-        }
-
-
-        DRM_DEBUG( "Context switch from %d to %d\n", old, new );
-
-        if ( new == dev->last_context ) {
-                clear_bit( 0, &dev->context_flag );
-                return 0;
-        }
-
-        return 0;
-}
-
-/**
- * Complete context switch.
- *
- * \param dev DRM device.
- * \param new new context handle.
- * \return zero on success or a negative number on failure.
- *
- * Updates drm_device::last_context and drm_device::last_switch. Verifies the
- * hardware lock is held, clears the drm_device::context_flag and wakes up
- * drm_device::context_wait.
- */
-int DRM(context_switch_complete)( drm_device_t *dev, int new )
-{
-        dev->last_context = new;  /* PRE/POST: This is the _only_ writer. */
-        dev->last_switch  = jiffies;
-
-        if ( !_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock) ) {
-                DRM_ERROR( "Lock isn't held after context switch\n" );
-        }
-
-				/* If a context switch is ever initiated
-                                   when the kernel holds the lock, release
-                                   that lock here. */
-        clear_bit( 0, &dev->context_flag );
-        wake_up( &dev->context_wait );
-
-        return 0;
-}
-
-/**
- * Reserve contexts.
- *
- * \param inode device inode.
- * \param filp file pointer.
- * \param cmd command.
- * \param arg user argument pointing to a drm_ctx_res structure.
- * \return zero on success or a negative number on failure.
- */
-int DRM(resctx)( struct inode *inode, struct file *filp,
-		 unsigned int cmd, unsigned long arg )
-{
-	drm_ctx_res_t res;
-	drm_ctx_t __user *argp = (void __user *)arg;
-	drm_ctx_t ctx;
-	int i;
-
-	if ( copy_from_user( &res, argp, sizeof(res) ) )
-		return -EFAULT;
-
-	if ( res.count >= DRM_RESERVED_CONTEXTS ) {
-		memset( &ctx, 0, sizeof(ctx) );
-		for ( i = 0 ; i < DRM_RESERVED_CONTEXTS ; i++ ) {
-			ctx.handle = i;
-			if ( copy_to_user( &res.contexts[i],
-					   &i, sizeof(i) ) )
-				return -EFAULT;
-		}
-	}
-	res.count = DRM_RESERVED_CONTEXTS;
-
-	if ( copy_to_user( argp, &res, sizeof(res) ) )
-		return -EFAULT;
-	return 0;
-}
-
-/**
- * Add context.
- *
- * \param inode device inode.
- * \param filp file pointer.
- * \param cmd command.
- * \param arg user argument pointing to a drm_ctx structure.
- * \return zero on success or a negative number on failure.
- *
- * Get a new handle for the context and copy to userspace.
- */
-int DRM(addctx)( struct inode *inode, struct file *filp,
-		 unsigned int cmd, unsigned long arg )
-{
-	drm_file_t *priv = filp->private_data;
-	drm_device_t *dev = priv->dev;
-	drm_ctx_list_t * ctx_entry;
-	drm_ctx_t __user *argp = (void __user *)arg;
-	drm_ctx_t ctx;
-
-	if ( copy_from_user( &ctx, argp, sizeof(ctx) ) )
-		return -EFAULT;
-
-	ctx.handle = DRM(ctxbitmap_next)( dev );
-	if ( ctx.handle == DRM_KERNEL_CONTEXT ) {
-				/* Skip kernel's context and get a new one. */
-		ctx.handle = DRM(ctxbitmap_next)( dev );
-	}
-	DRM_DEBUG( "%d\n", ctx.handle );
-	if ( ctx.handle == -1 ) {
-		DRM_DEBUG( "Not enough free contexts.\n" );
-				/* Should this return -EBUSY instead? */
-		return -ENOMEM;
-	}
-
-	if ( ctx.handle != DRM_KERNEL_CONTEXT )
-	{
-		if (dev->fn_tbl.context_ctor)
-			dev->fn_tbl.context_ctor(dev, ctx.handle);
-	}
-
-	ctx_entry = DRM(alloc)( sizeof(*ctx_entry), DRM_MEM_CTXLIST );
-	if ( !ctx_entry ) {
-		DRM_DEBUG("out of memory\n");
-		return -ENOMEM;
-	}
-
-	INIT_LIST_HEAD( &ctx_entry->head );
-	ctx_entry->handle = ctx.handle;
-	ctx_entry->tag = priv;
-
-	down( &dev->ctxlist_sem );
-	list_add( &ctx_entry->head, &dev->ctxlist->head );
-	++dev->ctx_count;
-	up( &dev->ctxlist_sem );
-
-	if ( copy_to_user( argp, &ctx, sizeof(ctx) ) )
-		return -EFAULT;
-	return 0;
-}
-
-int DRM(modctx)( struct inode *inode, struct file *filp,
-		 unsigned int cmd, unsigned long arg )
-{
-	/* This does nothing */
-	return 0;
-}
-
-/**
- * Get context.
- *
- * \param inode device inode.
- * \param filp file pointer.
- * \param cmd command.
- * \param arg user argument pointing to a drm_ctx structure.
- * \return zero on success or a negative number on failure.
- */
-int DRM(getctx)( struct inode *inode, struct file *filp,
-		 unsigned int cmd, unsigned long arg )
-{
-	drm_ctx_t __user *argp = (void __user *)arg;
-	drm_ctx_t ctx;
-
-	if ( copy_from_user( &ctx, argp, sizeof(ctx) ) )
-		return -EFAULT;
-
-	/* This is 0, because we don't handle any context flags */
-	ctx.flags = 0;
-
-	if ( copy_to_user( argp, &ctx, sizeof(ctx) ) )
-		return -EFAULT;
-	return 0;
-}
-
-/**
- * Switch context.
- *
- * \param inode device inode.
- * \param filp file pointer.
- * \param cmd command.
- * \param arg user argument pointing to a drm_ctx structure.
- * \return zero on success or a negative number on failure.
- *
- * Calls context_switch().
- */
-int DRM(switchctx)( struct inode *inode, struct file *filp,
-		    unsigned int cmd, unsigned long arg )
-{
-	drm_file_t *priv = filp->private_data;
-	drm_device_t *dev = priv->dev;
-	drm_ctx_t ctx;
-
-	if ( copy_from_user( &ctx, (drm_ctx_t __user *)arg, sizeof(ctx) ) )
-		return -EFAULT;
-
-	DRM_DEBUG( "%d\n", ctx.handle );
-	return DRM(context_switch)( dev, dev->last_context, ctx.handle );
-}
-
-/**
- * New context.
- *
- * \param inode device inode.
- * \param filp file pointer.
- * \param cmd command.
- * \param arg user argument pointing to a drm_ctx structure.
- * \return zero on success or a negative number on failure.
- *
- * Calls context_switch_complete().
- */
-int DRM(newctx)( struct inode *inode, struct file *filp,
-		 unsigned int cmd, unsigned long arg )
-{
-	drm_file_t *priv = filp->private_data;
-	drm_device_t *dev = priv->dev;
-	drm_ctx_t ctx;
-
-	if ( copy_from_user( &ctx, (drm_ctx_t __user *)arg, sizeof(ctx) ) )
-		return -EFAULT;
-
-	DRM_DEBUG( "%d\n", ctx.handle );
-	DRM(context_switch_complete)( dev, ctx.handle );
-
-	return 0;
-}
-
-/**
- * Remove context.
- *
- * \param inode device inode.
- * \param filp file pointer.
- * \param cmd command.
- * \param arg user argument pointing to a drm_ctx structure.
- * \return zero on success or a negative number on failure.
- *
- * If not the special kernel context, calls ctxbitmap_free() to free the specified context.
- */
-int DRM(rmctx)( struct inode *inode, struct file *filp,
-		unsigned int cmd, unsigned long arg )
-{
-	drm_file_t *priv = filp->private_data;
-	drm_device_t *dev = priv->dev;
-	drm_ctx_t ctx;
-
-	if ( copy_from_user( &ctx, (drm_ctx_t __user *)arg, sizeof(ctx) ) )
-		return -EFAULT;
-
-	DRM_DEBUG( "%d\n", ctx.handle );
-	if ( ctx.handle == DRM_KERNEL_CONTEXT + 1 ) {
-		priv->remove_auth_on_close = 1;
-	}
-	if ( ctx.handle != DRM_KERNEL_CONTEXT ) {
-		if (dev->fn_tbl.context_dtor)
-			dev->fn_tbl.context_dtor(dev, ctx.handle);
-		DRM(ctxbitmap_free)( dev, ctx.handle );
-	}
-
-	down( &dev->ctxlist_sem );
-	if ( !list_empty( &dev->ctxlist->head ) ) {
-		drm_ctx_list_t *pos, *n;
-
-		list_for_each_entry_safe( pos, n, &dev->ctxlist->head, head ) {
-			if ( pos->handle == ctx.handle ) {
-				list_del( &pos->head );
-				DRM(free)( pos, sizeof(*pos), DRM_MEM_CTXLIST );
-				--dev->ctx_count;
-			}
-		}
-	}
-	up( &dev->ctxlist_sem );
-
-	return 0;
-}
-
-/*@}*/
-
diff -Nru a/drivers/char/drm/drm_core.h b/drivers/char/drm/drm_core.h
--- a/drivers/char/drm/drm_core.h	2005-01-10 20:11:18 -08:00
+++ b/drivers/char/drm/drm_core.h	2005-01-10 20:11:18 -08:00
@@ -20,21 +20,15 @@
  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  * DEALINGS IN THE SOFTWARE.
  */
+#define DRIVER_AUTHOR		"Gareth Hughes, Leif Delgass, JosÃ© Fonseca, Jon Smirl"
 
-#include "drm_auth.h"
-#include "drm_agpsupport.h"
-#include "drm_bufs.h"
-#include "drm_context.h"
-#include "drm_dma.h"
-#include "drm_irq.h"
-#include "drm_drawable.h"
-#include "drm_drv.h"
-#include "drm_fops.h"
-#include "drm_init.h"
-#include "drm_ioctl.h"
-#include "drm_lock.h"
-#include "drm_memory.h"
-#include "drm_proc.h"
-#include "drm_vm.h"
-#include "drm_stub.h"
-#include "drm_scatter.h"
+#define DRIVER_NAME		"drm"
+#define DRIVER_DESC		"DRM shared core routines"
+#define DRIVER_DATE		"20040925"
+
+#define DRM_IF_MAJOR	1
+#define DRM_IF_MINOR	2
+
+#define DRIVER_MAJOR	1
+#define DRIVER_MINOR	0
+#define DRIVER_PATCHLEVEL 0
diff -Nru a/drivers/char/drm/drm_dma.c b/drivers/char/drm/drm_dma.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/char/drm/drm_dma.c	2005-01-10 20:11:20 -08:00
@@ -0,0 +1,180 @@
+/**
+ * \file drm_dma.h 
+ * DMA IOCTL and function support
+ *
+ * \author Rickard E. (Rik) Faith <faith@valinux.com>
+ * \author Gareth Hughes <gareth@valinux.com>
+ */
+
+/*
+ * Created: Fri Mar 19 14:30:16 1999 by faith@valinux.com
+ *
+ * Copyright 1999, 2000 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "drmP.h"
+
+/**
+ * Initialize the DMA data.
+ * 
+ * \param dev DRM device.
+ * \return zero on success or a negative value on failure.
+ *
+ * Allocate and initialize a drm_device_dma structure.
+ */
+int drm_dma_setup( drm_device_t *dev )
+{
+	int i;
+
+	dev->dma = drm_alloc( sizeof(*dev->dma), DRM_MEM_DRIVER );
+	if ( !dev->dma )
+		return -ENOMEM;
+
+	memset( dev->dma, 0, sizeof(*dev->dma) );
+
+	for ( i = 0 ; i <= DRM_MAX_ORDER ; i++ )
+		memset(&dev->dma->bufs[i], 0, sizeof(dev->dma->bufs[0]));
+
+	return 0;
+}
+
+/**
+ * Cleanup the DMA resources.
+ *
+ * \param dev DRM device.
+ *
+ * Free all pages associated with DMA buffers, the buffers and pages lists, and
+ * finally the the drm_device::dma structure itself.
+ */
+void drm_dma_takedown(drm_device_t *dev)
+{
+	drm_device_dma_t  *dma = dev->dma;
+	int		  i, j;
+
+	if (!dma) return;
+
+				/* Clear dma buffers */
+	for (i = 0; i <= DRM_MAX_ORDER; i++) {
+		if (dma->bufs[i].seg_count) {
+			DRM_DEBUG("order %d: buf_count = %d,"
+				  " seg_count = %d\n",
+				  i,
+				  dma->bufs[i].buf_count,
+				  dma->bufs[i].seg_count);
+			for (j = 0; j < dma->bufs[i].seg_count; j++) {
+				if (dma->bufs[i].seglist[j]) {
+					drm_free_pages(dma->bufs[i].seglist[j],
+							dma->bufs[i].page_order,
+							DRM_MEM_DMA);
+				}
+			}
+			drm_free(dma->bufs[i].seglist,
+				  dma->bufs[i].seg_count
+				  * sizeof(*dma->bufs[0].seglist),
+				  DRM_MEM_SEGS);
+		}
+	   	if (dma->bufs[i].buf_count) {
+		   	for (j = 0; j < dma->bufs[i].buf_count; j++) {
+				if (dma->bufs[i].buflist[j].dev_private) {
+					drm_free(dma->bufs[i].buflist[j].dev_private,
+						  dma->bufs[i].buflist[j].dev_priv_size,
+						  DRM_MEM_BUFS);
+				}
+			}
+		   	drm_free(dma->bufs[i].buflist,
+				  dma->bufs[i].buf_count *
+				  sizeof(*dma->bufs[0].buflist),
+				  DRM_MEM_BUFS);
+		}
+	}
+
+	if (dma->buflist) {
+		drm_free(dma->buflist,
+			  dma->buf_count * sizeof(*dma->buflist),
+			  DRM_MEM_BUFS);
+	}
+
+	if (dma->pagelist) {
+		drm_free(dma->pagelist,
+			  dma->page_count * sizeof(*dma->pagelist),
+			  DRM_MEM_PAGES);
+	}
+	drm_free(dev->dma, sizeof(*dev->dma), DRM_MEM_DRIVER);
+	dev->dma = NULL;
+}
+
+
+/**
+ * Free a buffer.
+ *
+ * \param dev DRM device.
+ * \param buf buffer to free.
+ * 
+ * Resets the fields of \p buf.
+ */
+void drm_free_buffer(drm_device_t *dev, drm_buf_t *buf)
+{
+	if (!buf) return;
+
+	buf->waiting  = 0;
+	buf->pending  = 0;
+	buf->filp     = NULL;
+	buf->used     = 0;
+
+	if (drm_core_check_feature(dev, DRIVER_DMA_QUEUE) && waitqueue_active(&buf->dma_wait)) {
+		wake_up_interruptible(&buf->dma_wait);
+	}
+}
+
+/**
+ * Reclaim the buffers.
+ *
+ * \param filp file pointer.
+ *
+ * Frees each buffer associated with \p filp not already on the hardware.
+ */
+void drm_core_reclaim_buffers(drm_device_t *dev, struct file *filp)
+{
+	drm_device_dma_t *dma = dev->dma;
+	int		 i;
+
+	if (!dma) return;
+	for (i = 0; i < dma->buf_count; i++) {
+		if (dma->buflist[i]->filp == filp) {
+			switch (dma->buflist[i]->list) {
+			case DRM_LIST_NONE:
+				drm_free_buffer(dev, dma->buflist[i]);
+				break;
+			case DRM_LIST_WAIT:
+				dma->buflist[i]->list = DRM_LIST_RECLAIM;
+				break;
+			default:
+				/* Buffer already on hardware. */
+				break;
+			}
+		}
+	}
+}
+EXPORT_SYMBOL(drm_core_reclaim_buffers);
+
diff -Nru a/drivers/char/drm/drm_dma.h b/drivers/char/drm/drm_dma.h
--- a/drivers/char/drm/drm_dma.h	2005-01-10 20:11:20 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,181 +0,0 @@
-/**
- * \file drm_dma.h 
- * DMA IOCTL and function support
- *
- * \author Rickard E. (Rik) Faith <faith@valinux.com>
- * \author Gareth Hughes <gareth@valinux.com>
- */
-
-/*
- * Created: Fri Mar 19 14:30:16 1999 by faith@valinux.com
- *
- * Copyright 1999, 2000 Precision Insight, Inc., Cedar Park, Texas.
- * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "drmP.h"
-
-/**
- * Initialize the DMA data.
- * 
- * \param dev DRM device.
- * \return zero on success or a negative value on failure.
- *
- * Allocate and initialize a drm_device_dma structure.
- */
-int DRM(dma_setup)( drm_device_t *dev )
-{
-	int i;
-
-	dev->dma = DRM(alloc)( sizeof(*dev->dma), DRM_MEM_DRIVER );
-	if ( !dev->dma )
-		return -ENOMEM;
-
-	memset( dev->dma, 0, sizeof(*dev->dma) );
-
-	for ( i = 0 ; i <= DRM_MAX_ORDER ; i++ )
-		memset(&dev->dma->bufs[i], 0, sizeof(dev->dma->bufs[0]));
-
-	return 0;
-}
-
-/**
- * Cleanup the DMA resources.
- *
- * \param dev DRM device.
- *
- * Free all pages associated with DMA buffers, the buffers and pages lists, and
- * finally the the drm_device::dma structure itself.
- */
-void DRM(dma_takedown)(drm_device_t *dev)
-{
-	drm_device_dma_t  *dma = dev->dma;
-	int		  i, j;
-
-	if (!dma) return;
-
-				/* Clear dma buffers */
-	for (i = 0; i <= DRM_MAX_ORDER; i++) {
-		if (dma->bufs[i].seg_count) {
-			DRM_DEBUG("order %d: buf_count = %d,"
-				  " seg_count = %d\n",
-				  i,
-				  dma->bufs[i].buf_count,
-				  dma->bufs[i].seg_count);
-			for (j = 0; j < dma->bufs[i].seg_count; j++) {
-				if (dma->bufs[i].seglist[j]) {
-					DRM(free_pages)(dma->bufs[i].seglist[j],
-							dma->bufs[i].page_order,
-							DRM_MEM_DMA);
-				}
-			}
-			DRM(free)(dma->bufs[i].seglist,
-				  dma->bufs[i].seg_count
-				  * sizeof(*dma->bufs[0].seglist),
-				  DRM_MEM_SEGS);
-		}
-	   	if (dma->bufs[i].buf_count) {
-		   	for (j = 0; j < dma->bufs[i].buf_count; j++) {
-				if (dma->bufs[i].buflist[j].dev_private) {
-					DRM(free)(dma->bufs[i].buflist[j].dev_private,
-						  dma->bufs[i].buflist[j].dev_priv_size,
-						  DRM_MEM_BUFS);
-				}
-			}
-		   	DRM(free)(dma->bufs[i].buflist,
-				  dma->bufs[i].buf_count *
-				  sizeof(*dma->bufs[0].buflist),
-				  DRM_MEM_BUFS);
-		}
-	}
-
-	if (dma->buflist) {
-		DRM(free)(dma->buflist,
-			  dma->buf_count * sizeof(*dma->buflist),
-			  DRM_MEM_BUFS);
-	}
-
-	if (dma->pagelist) {
-		DRM(free)(dma->pagelist,
-			  dma->page_count * sizeof(*dma->pagelist),
-			  DRM_MEM_PAGES);
-	}
-	DRM(free)(dev->dma, sizeof(*dev->dma), DRM_MEM_DRIVER);
-	dev->dma = NULL;
-}
-
-
-/**
- * Free a buffer.
- *
- * \param dev DRM device.
- * \param buf buffer to free.
- * 
- * Resets the fields of \p buf.
- */
-void DRM(free_buffer)(drm_device_t *dev, drm_buf_t *buf)
-{
-	if (!buf) return;
-
-	buf->waiting  = 0;
-	buf->pending  = 0;
-	buf->filp     = NULL;
-	buf->used     = 0;
-
-	if (drm_core_check_feature(dev, DRIVER_DMA_QUEUE) && waitqueue_active(&buf->dma_wait)) {
-		wake_up_interruptible(&buf->dma_wait);
-	}
-}
-
-/**
- * Reclaim the buffers.
- *
- * \param filp file pointer.
- *
- * Frees each buffer associated with \p filp not already on the hardware.
- */
-void DRM(core_reclaim_buffers)( struct file *filp )
-{
-	drm_file_t    *priv   = filp->private_data;
-	drm_device_t  *dev    = priv->dev;
-	drm_device_dma_t *dma = dev->dma;
-	int		 i;
-
-	if (!dma) return;
-	for (i = 0; i < dma->buf_count; i++) {
-		if (dma->buflist[i]->filp == filp) {
-			switch (dma->buflist[i]->list) {
-			case DRM_LIST_NONE:
-				DRM(free_buffer)(dev, dma->buflist[i]);
-				break;
-			case DRM_LIST_WAIT:
-				dma->buflist[i]->list = DRM_LIST_RECLAIM;
-				break;
-			default:
-				/* Buffer already on hardware. */
-				break;
-			}
-		}
-	}
-}
-
diff -Nru a/drivers/char/drm/drm_drawable.c b/drivers/char/drm/drm_drawable.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/char/drm/drm_drawable.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,56 @@
+/**
+ * \file drm_drawable.h 
+ * IOCTLs for drawables
+ *
+ * \author Rickard E. (Rik) Faith <faith@valinux.com>
+ * \author Gareth Hughes <gareth@valinux.com>
+ */
+
+/*
+ * Created: Tue Feb  2 08:37:54 1999 by faith@valinux.com
+ *
+ * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "drmP.h"
+
+/** No-op. */
+int drm_adddraw(struct inode *inode, struct file *filp,
+		 unsigned int cmd, unsigned long arg)
+{
+	drm_draw_t draw;
+
+	draw.handle = 0;	/* NOOP */
+	DRM_DEBUG("%d\n", draw.handle);
+	if (copy_to_user((drm_draw_t __user *)arg, &draw, sizeof(draw)))
+		return -EFAULT;
+	return 0;
+}
+
+/** No-op. */
+int drm_rmdraw(struct inode *inode, struct file *filp,
+		unsigned int cmd, unsigned long arg)
+{
+	return 0;		/* NOOP */
+}
diff -Nru a/drivers/char/drm/drm_drawable.h b/drivers/char/drm/drm_drawable.h
--- a/drivers/char/drm/drm_drawable.h	2005-01-10 20:11:24 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,56 +0,0 @@
-/**
- * \file drm_drawable.h 
- * IOCTLs for drawables
- *
- * \author Rickard E. (Rik) Faith <faith@valinux.com>
- * \author Gareth Hughes <gareth@valinux.com>
- */
-
-/*
- * Created: Tue Feb  2 08:37:54 1999 by faith@valinux.com
- *
- * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
- * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "drmP.h"
-
-/** No-op. */
-int DRM(adddraw)(struct inode *inode, struct file *filp,
-		 unsigned int cmd, unsigned long arg)
-{
-	drm_draw_t draw;
-
-	draw.handle = 0;	/* NOOP */
-	DRM_DEBUG("%d\n", draw.handle);
-	if (copy_to_user((drm_draw_t __user *)arg, &draw, sizeof(draw)))
-		return -EFAULT;
-	return 0;
-}
-
-/** No-op. */
-int DRM(rmdraw)(struct inode *inode, struct file *filp,
-		unsigned int cmd, unsigned long arg)
-{
-	return 0;		/* NOOP */
-}
diff -Nru a/drivers/char/drm/drm_drv.c b/drivers/char/drm/drm_drv.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/char/drm/drm_drv.c	2005-01-10 20:11:21 -08:00
@@ -0,0 +1,545 @@
+/**
+ * \file drm_drv.h 
+ * Generic driver template
+ *
+ * \author Rickard E. (Rik) Faith <faith@valinux.com>
+ * \author Gareth Hughes <gareth@valinux.com>
+ *
+ * To use this template, you must at least define the following (samples
+ * given for the MGA driver):
+ *
+ * \code
+ * #define DRIVER_AUTHOR	"VA Linux Systems, Inc."
+ *
+ * #define DRIVER_NAME		"mga"
+ * #define DRIVER_DESC		"Matrox G200/G400"
+ * #define DRIVER_DATE		"20001127"
+ *
+ * #define DRIVER_MAJOR		2
+ * #define DRIVER_MINOR		0
+ * #define DRIVER_PATCHLEVEL	2
+ *
+ * #define DRIVER_IOCTL_COUNT	DRM_ARRAY_SIZE( mga_ioctls )
+ *
+ * #define drm_x		mga_##x
+ * \endcode
+ */
+
+/*
+ * Created: Thu Nov 23 03:10:50 2000 by gareth@valinux.com
+ *
+ * Copyright 1999, 2000 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "drmP.h"
+#include "drm_core.h"
+
+/** Ioctl table */
+drm_ioctl_desc_t		  drm_ioctls[] = {
+	[DRM_IOCTL_NR(DRM_IOCTL_VERSION)]       = { drm_version,     0, 0 },
+	[DRM_IOCTL_NR(DRM_IOCTL_GET_UNIQUE)]    = { drm_getunique,   0, 0 },
+	[DRM_IOCTL_NR(DRM_IOCTL_GET_MAGIC)]     = { drm_getmagic,    0, 0 },
+	[DRM_IOCTL_NR(DRM_IOCTL_IRQ_BUSID)]     = { drm_irq_by_busid, 0, 1 },
+	[DRM_IOCTL_NR(DRM_IOCTL_GET_MAP)]       = { drm_getmap,      0, 0 },
+	[DRM_IOCTL_NR(DRM_IOCTL_GET_CLIENT)]    = { drm_getclient,   0, 0 },
+	[DRM_IOCTL_NR(DRM_IOCTL_GET_STATS)]     = { drm_getstats,    0, 0 },
+	[DRM_IOCTL_NR(DRM_IOCTL_SET_VERSION)]   = { drm_setversion,  0, 1 },
+
+	[DRM_IOCTL_NR(DRM_IOCTL_SET_UNIQUE)]    = { drm_setunique,   1, 1 },
+	[DRM_IOCTL_NR(DRM_IOCTL_BLOCK)]         = { drm_noop,        1, 1 },
+	[DRM_IOCTL_NR(DRM_IOCTL_UNBLOCK)]       = { drm_noop,        1, 1 },
+	[DRM_IOCTL_NR(DRM_IOCTL_AUTH_MAGIC)]    = { drm_authmagic,   1, 1 },
+
+	[DRM_IOCTL_NR(DRM_IOCTL_ADD_MAP)]       = { drm_addmap,      1, 1 },
+	[DRM_IOCTL_NR(DRM_IOCTL_RM_MAP)]        = { drm_rmmap,       1, 0 },
+
+	[DRM_IOCTL_NR(DRM_IOCTL_SET_SAREA_CTX)] = { drm_setsareactx, 1, 1 },
+	[DRM_IOCTL_NR(DRM_IOCTL_GET_SAREA_CTX)] = { drm_getsareactx, 1, 0 },
+
+	[DRM_IOCTL_NR(DRM_IOCTL_ADD_CTX)]       = { drm_addctx,      1, 1 },
+	[DRM_IOCTL_NR(DRM_IOCTL_RM_CTX)]        = { drm_rmctx,       1, 1 },
+	[DRM_IOCTL_NR(DRM_IOCTL_MOD_CTX)]       = { drm_modctx,      1, 1 },
+	[DRM_IOCTL_NR(DRM_IOCTL_GET_CTX)]       = { drm_getctx,      1, 0 },
+	[DRM_IOCTL_NR(DRM_IOCTL_SWITCH_CTX)]    = { drm_switchctx,   1, 1 },
+	[DRM_IOCTL_NR(DRM_IOCTL_NEW_CTX)]       = { drm_newctx,      1, 1 },
+	[DRM_IOCTL_NR(DRM_IOCTL_RES_CTX)]       = { drm_resctx,      1, 0 },
+
+	[DRM_IOCTL_NR(DRM_IOCTL_ADD_DRAW)]      = { drm_adddraw,     1, 1 },
+	[DRM_IOCTL_NR(DRM_IOCTL_RM_DRAW)]       = { drm_rmdraw,      1, 1 },
+
+	[DRM_IOCTL_NR(DRM_IOCTL_LOCK)]	        = { drm_lock,        1, 0 },
+	[DRM_IOCTL_NR(DRM_IOCTL_UNLOCK)]        = { drm_unlock,      1, 0 },
+
+	[DRM_IOCTL_NR(DRM_IOCTL_FINISH)]        = { drm_noop,      1, 0 },
+
+	[DRM_IOCTL_NR(DRM_IOCTL_ADD_BUFS)]      = { drm_addbufs,     1, 1 },
+	[DRM_IOCTL_NR(DRM_IOCTL_MARK_BUFS)]     = { drm_markbufs,    1, 1 },
+	[DRM_IOCTL_NR(DRM_IOCTL_INFO_BUFS)]     = { drm_infobufs,    1, 0 },
+	[DRM_IOCTL_NR(DRM_IOCTL_MAP_BUFS)]      = { drm_mapbufs,     1, 0 },
+	[DRM_IOCTL_NR(DRM_IOCTL_FREE_BUFS)]     = { drm_freebufs,    1, 0 },
+	/* The DRM_IOCTL_DMA ioctl should be defined by the driver. */
+
+	[DRM_IOCTL_NR(DRM_IOCTL_CONTROL)]       = { drm_control,     1, 1 },
+
+#if __OS_HAS_AGP
+	[DRM_IOCTL_NR(DRM_IOCTL_AGP_ACQUIRE)]   = { drm_agp_acquire, 1, 1 },
+	[DRM_IOCTL_NR(DRM_IOCTL_AGP_RELEASE)]   = { drm_agp_release, 1, 1 },
+	[DRM_IOCTL_NR(DRM_IOCTL_AGP_ENABLE)]    = { drm_agp_enable,  1, 1 },
+	[DRM_IOCTL_NR(DRM_IOCTL_AGP_INFO)]      = { drm_agp_info,    1, 0 },
+	[DRM_IOCTL_NR(DRM_IOCTL_AGP_ALLOC)]     = { drm_agp_alloc,   1, 1 },
+	[DRM_IOCTL_NR(DRM_IOCTL_AGP_FREE)]      = { drm_agp_free,    1, 1 },
+	[DRM_IOCTL_NR(DRM_IOCTL_AGP_BIND)]      = { drm_agp_bind,    1, 1 },
+	[DRM_IOCTL_NR(DRM_IOCTL_AGP_UNBIND)]    = { drm_agp_unbind,  1, 1 },
+#endif
+
+	[DRM_IOCTL_NR(DRM_IOCTL_SG_ALLOC)]      = { drm_sg_alloc,    1, 1 },
+	[DRM_IOCTL_NR(DRM_IOCTL_SG_FREE)]       = { drm_sg_free,     1, 1 },
+
+	[DRM_IOCTL_NR(DRM_IOCTL_WAIT_VBLANK)]   = { drm_wait_vblank, 0, 0 },
+};
+
+#define DRIVER_IOCTL_COUNT	DRM_ARRAY_SIZE( drm_ioctls )
+
+/**
+ * Take down the DRM device.
+ *
+ * \param dev DRM device structure.
+ *
+ * Frees every resource in \p dev.
+ *
+ * \sa drm_device and setup().
+ */
+int drm_takedown( drm_device_t *dev )
+{
+	drm_magic_entry_t *pt, *next;
+	drm_map_t *map;
+	drm_map_list_t *r_list;
+	struct list_head *list, *list_next;
+	drm_vma_entry_t *vma, *vma_next;
+	int i;
+
+	DRM_DEBUG( "\n" );
+
+	if (dev->driver->pretakedown)
+	  dev->driver->pretakedown(dev);
+
+	if ( dev->irq_enabled ) drm_irq_uninstall( dev );
+
+	down( &dev->struct_sem );
+	del_timer( &dev->timer );
+
+	if ( dev->devname ) {
+		drm_free( dev->devname, strlen( dev->devname ) + 1,
+			   DRM_MEM_DRIVER );
+		dev->devname = NULL;
+	}
+
+	if ( dev->unique ) {
+		drm_free( dev->unique, strlen( dev->unique ) + 1,
+			   DRM_MEM_DRIVER );
+		dev->unique = NULL;
+		dev->unique_len = 0;
+	}
+				/* Clear pid list */
+	for ( i = 0 ; i < DRM_HASH_SIZE ; i++ ) {
+		for ( pt = dev->magiclist[i].head ; pt ; pt = next ) {
+			next = pt->next;
+			drm_free( pt, sizeof(*pt), DRM_MEM_MAGIC );
+		}
+		dev->magiclist[i].head = dev->magiclist[i].tail = NULL;
+	}
+
+				/* Clear AGP information */
+	if (drm_core_has_AGP(dev) && dev->agp) {
+		drm_agp_mem_t *entry;
+		drm_agp_mem_t *nexte;
+
+				/* Remove AGP resources, but leave dev->agp
+                                   intact until drv_cleanup is called. */
+		for ( entry = dev->agp->memory ; entry ; entry = nexte ) {
+			nexte = entry->next;
+			if ( entry->bound ) drm_unbind_agp( entry->memory );
+			drm_free_agp( entry->memory, entry->pages );
+			drm_free( entry, sizeof(*entry), DRM_MEM_AGPLISTS );
+		}
+		dev->agp->memory = NULL;
+
+		if ( dev->agp->acquired ) drm_agp_do_release();
+
+		dev->agp->acquired = 0;
+		dev->agp->enabled  = 0;
+	}
+
+				/* Clear vma list (only built for debugging) */
+	if ( dev->vmalist ) {
+		for ( vma = dev->vmalist ; vma ; vma = vma_next ) {
+			vma_next = vma->next;
+			drm_free( vma, sizeof(*vma), DRM_MEM_VMAS );
+		}
+		dev->vmalist = NULL;
+	}
+
+	if( dev->maplist ) {
+		list_for_each_safe( list, list_next, &dev->maplist->head ) {
+			r_list = (drm_map_list_t *)list;
+
+			if ( ( map = r_list->map ) ) {
+				switch ( map->type ) {
+				case _DRM_REGISTERS:
+				case _DRM_FRAME_BUFFER:
+					if (drm_core_has_MTRR(dev)) {
+						if ( map->mtrr >= 0 ) {
+							int retcode;
+							retcode = mtrr_del( map->mtrr,
+									    map->offset,
+									    map->size );
+							DRM_DEBUG( "mtrr_del=%d\n", retcode );
+						}
+					}
+					drm_ioremapfree( map->handle, map->size, dev );
+					break;
+				case _DRM_SHM:
+					vfree(map->handle);
+					break;
+
+				case _DRM_AGP:
+					/* Do nothing here, because this is all
+					 * handled in the AGP/GART driver.
+					 */
+					break;
+				case _DRM_SCATTER_GATHER:
+					/* Handle it */
+					if (drm_core_check_feature(dev, DRIVER_SG) && dev->sg) {
+						drm_sg_cleanup(dev->sg);
+						dev->sg = NULL;
+					}
+					break;
+				}
+				drm_free(map, sizeof(*map), DRM_MEM_MAPS);
+			}
+			list_del( list );
+			drm_free(r_list, sizeof(*r_list), DRM_MEM_MAPS);
+ 		}
+		drm_free(dev->maplist, sizeof(*dev->maplist), DRM_MEM_MAPS);
+		dev->maplist = NULL;
+ 	}
+
+	if (drm_core_check_feature(dev, DRIVER_DMA_QUEUE) && dev->queuelist ) {
+		for ( i = 0 ; i < dev->queue_count ; i++ ) {
+			if ( dev->queuelist[i] ) {
+				drm_free( dev->queuelist[i],
+					  sizeof(*dev->queuelist[0]),
+					  DRM_MEM_QUEUES );
+				dev->queuelist[i] = NULL;
+			}
+		}
+		drm_free( dev->queuelist,
+			  dev->queue_slots * sizeof(*dev->queuelist),
+			  DRM_MEM_QUEUES );
+		dev->queuelist = NULL;
+	}
+	dev->queue_count = 0;
+
+	if (drm_core_check_feature(dev, DRIVER_HAVE_DMA))
+		drm_dma_takedown( dev );
+
+	if ( dev->lock.hw_lock ) {
+		dev->sigdata.lock = dev->lock.hw_lock = NULL; /* SHM removed */
+		dev->lock.filp = NULL;
+		wake_up_interruptible( &dev->lock.lock_queue );
+	}
+	up( &dev->struct_sem );
+
+	return 0;
+}
+
+
+
+/**
+ * Module initialization. Called via init_module at module load time, or via
+ * linux/init/main.c (this is not currently supported).
+ *
+ * \return zero on success or a negative number on failure.
+ *
+ * Initializes an array of drm_device structures, and attempts to
+ * initialize all available devices, using consecutive minors, registering the
+ * stubs and initializing the AGP device.
+ * 
+ * Expands the \c DRIVER_PREINIT and \c DRIVER_POST_INIT macros before and
+ * after the initialization for driver customization.
+ */
+int drm_init( struct drm_driver *driver )
+{
+	struct pci_dev *pdev = NULL;
+	struct pci_device_id *pid;
+	int i;
+
+	DRM_DEBUG( "\n" );
+
+	drm_mem_init();
+
+	for (i=0; driver->pci_driver.id_table[i].vendor != 0; i++) {
+		pid = (struct pci_device_id *)&driver->pci_driver.id_table[i];
+		
+		pdev=NULL;
+		/* pass back in pdev to account for multiple identical cards */		
+		while ((pdev = pci_get_subsys(pid->vendor, pid->device, pid->subvendor, pid->subdevice, pdev)) != NULL) {
+			/* stealth mode requires a manual probe */
+			pci_dev_get(pdev);
+			drm_probe(pdev, pid, driver);
+		}
+	}
+	return 0;
+}
+EXPORT_SYMBOL(drm_init);
+
+/**
+ * Called via cleanup_module() at module unload time.
+ *
+ * Cleans up all DRM device, calling takedown().
+ * 
+ * \sa drm_init().
+ */
+static void drm_cleanup( drm_device_t *dev )
+{
+	DRM_DEBUG( "\n" );
+
+	if (!dev) {
+		DRM_ERROR("cleanup called no dev\n");
+		return;
+	}
+
+	drm_takedown( dev );	
+
+	drm_ctxbitmap_cleanup( dev );
+	
+	if (drm_core_has_MTRR(dev) && drm_core_has_AGP(dev) &&
+	    dev->agp && dev->agp->agp_mtrr >= 0) {
+		int retval;
+		retval = mtrr_del( dev->agp->agp_mtrr,
+				   dev->agp->agp_info.aper_base,
+				   dev->agp->agp_info.aper_size*1024*1024 );
+		DRM_DEBUG( "mtrr_del=%d\n", retval );
+	}
+	
+	if (drm_core_has_AGP(dev) && dev->agp ) {
+		drm_free( dev->agp, sizeof(*dev->agp), DRM_MEM_AGPLISTS );
+		dev->agp = NULL;
+	}
+
+	if (dev->driver->postcleanup)
+		dev->driver->postcleanup(dev);
+	
+	if ( drm_put_minor(dev) )
+		DRM_ERROR( "Cannot unload module\n" );
+}
+
+void drm_exit (struct drm_driver *driver)
+{
+	int i;
+	drm_device_t *dev = NULL;
+	drm_minor_t *minor;
+	
+	DRM_DEBUG( "\n" );
+
+	for (i = 0; i < drm_cards_limit; i++) {
+		minor = &drm_minors[i];
+		if (!minor->dev)
+			continue;
+		if (minor->dev->driver!=driver)
+			continue;
+
+		dev = minor->dev;
+		
+	}
+	if (dev) {
+		/* release the pci driver */
+		if (dev->pdev)
+			pci_dev_put(dev->pdev);
+		drm_cleanup(dev);
+	}
+	
+	DRM_INFO( "Module unloaded\n" );
+}
+EXPORT_SYMBOL(drm_exit);
+
+/** File operations structure */
+static struct file_operations drm_stub_fops = {
+	.owner = THIS_MODULE,
+	.open  = drm_stub_open
+};
+
+static int __init drm_core_init(void)
+{
+	int ret = -ENOMEM;
+	
+	drm_cards_limit = (drm_cards_limit < DRM_MAX_MINOR + 1 ? drm_cards_limit : DRM_MAX_MINOR + 1);
+	drm_minors = drm_calloc(drm_cards_limit,
+				sizeof(*drm_minors), DRM_MEM_STUB);
+	if(!drm_minors) 
+		goto err_p1;
+	
+	if (register_chrdev(DRM_MAJOR, "drm", &drm_stub_fops))
+		goto err_p1;
+	
+	drm_class = class_simple_create(THIS_MODULE, "drm");
+	if (IS_ERR(drm_class)) {
+		printk (KERN_ERR "DRM: Error creating drm class.\n");
+		ret = PTR_ERR(drm_class);
+		goto err_p2;
+	}
+
+	drm_proc_root = create_proc_entry("dri", S_IFDIR, NULL);
+	if (!drm_proc_root) {
+		DRM_ERROR("Cannot create /proc/dri\n");
+		ret = -1;
+		goto err_p3;
+	}
+		
+	DRM_INFO( "Initialized %s %d.%d.%d %s\n",
+		DRIVER_NAME,
+		DRIVER_MAJOR,
+		DRIVER_MINOR,
+		DRIVER_PATCHLEVEL,
+		DRIVER_DATE
+		);
+	return 0;
+err_p3:
+	class_simple_destroy(drm_class);
+err_p2:
+	unregister_chrdev(DRM_MAJOR, "drm");
+	drm_free(drm_minors, sizeof(*drm_minors) * drm_cards_limit, DRM_MEM_STUB);
+err_p1:	
+	return ret;
+}
+
+static void __exit drm_core_exit (void)
+{
+	remove_proc_entry("dri", NULL);
+	class_simple_destroy(drm_class);
+
+	unregister_chrdev(DRM_MAJOR, "drm");
+
+	drm_free(drm_minors, sizeof(*drm_minors) *
+				drm_cards_limit, DRM_MEM_STUB);
+}
+
+
+module_init( drm_core_init );
+module_exit( drm_core_exit );
+
+
+/**
+ * Get version information
+ *
+ * \param inode device inode.
+ * \param filp file pointer.
+ * \param cmd command.
+ * \param arg user argument, pointing to a drm_version structure.
+ * \return zero on success or negative number on failure.
+ *
+ * Fills in the version information in \p arg.
+ */
+int drm_version( struct inode *inode, struct file *filp,
+		  unsigned int cmd, unsigned long arg )
+{
+	drm_file_t *priv = filp->private_data;
+	drm_device_t *dev = priv->dev;
+	drm_version_t __user *argp = (void __user *)arg;
+	drm_version_t version;
+	int ret;
+
+	if ( copy_from_user( &version, argp, sizeof(version) ) )
+		return -EFAULT;
+
+	/* version is a required function to return the personality module version */
+	if ((ret = dev->driver->version(&version)))
+		return ret;
+		
+	if ( copy_to_user( argp, &version, sizeof(version) ) )
+		return -EFAULT;
+	return 0;
+}
+
+
+
+/** 
+ * Called whenever a process performs an ioctl on /dev/drm.
+ *
+ * \param inode device inode.
+ * \param filp file pointer.
+ * \param cmd command.
+ * \param arg user argument.
+ * \return zero on success or negative number on failure.
+ *
+ * Looks up the ioctl function in the ::ioctls table, checking for root
+ * previleges if so required, and dispatches to the respective function.
+ */
+int drm_ioctl( struct inode *inode, struct file *filp,
+		unsigned int cmd, unsigned long arg )
+{
+	drm_file_t *priv = filp->private_data;
+	drm_device_t *dev = priv->dev;
+	drm_ioctl_desc_t *ioctl;
+	drm_ioctl_t *func;
+	unsigned int nr = DRM_IOCTL_NR(cmd);
+	int retcode = -EINVAL;
+
+	atomic_inc( &dev->ioctl_count );
+	atomic_inc( &dev->counts[_DRM_STAT_IOCTLS] );
+	++priv->ioctl_count;
+
+	DRM_DEBUG( "pid=%d, cmd=0x%02x, nr=0x%02x, dev 0x%lx, auth=%d\n",
+		   current->pid, cmd, nr, (long)old_encode_dev(dev->device), 
+		   priv->authenticated );
+	
+	if (nr < DRIVER_IOCTL_COUNT)
+		ioctl = &drm_ioctls[nr];
+	else if ((nr >= DRM_COMMAND_BASE) || (nr < DRM_COMMAND_BASE + dev->driver->num_ioctls))
+		ioctl = &dev->driver->ioctls[nr - DRM_COMMAND_BASE];
+	else
+		goto err_i1;
+	
+	func = ioctl->func;
+	/* is there a local override? */
+	if ((nr == DRM_IOCTL_NR(DRM_IOCTL_DMA)) && dev->driver->dma_ioctl)
+		func = dev->driver->dma_ioctl;
+	
+	if ( !func ) {
+		DRM_DEBUG( "no function\n" );
+		retcode = -EINVAL;
+	} else if ( ( ioctl->root_only && !capable( CAP_SYS_ADMIN ) )||
+		    ( ioctl->auth_needed && !priv->authenticated ) ) {
+		retcode = -EACCES;
+	} else {
+		retcode = func( inode, filp, cmd, arg );
+	}
+	
+err_i1:
+	atomic_dec( &dev->ioctl_count );
+	if (retcode) DRM_DEBUG( "ret = %x\n", retcode);
+	return retcode;
+}
+EXPORT_SYMBOL(drm_ioctl);
+
diff -Nru a/drivers/char/drm/drm_drv.h b/drivers/char/drm/drm_drv.h
--- a/drivers/char/drm/drm_drv.h	2005-01-10 20:11:21 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,1060 +0,0 @@
-/**
- * \file drm_drv.h 
- * Generic driver template
- *
- * \author Rickard E. (Rik) Faith <faith@valinux.com>
- * \author Gareth Hughes <gareth@valinux.com>
- *
- * To use this template, you must at least define the following (samples
- * given for the MGA driver):
- *
- * \code
- * #define DRIVER_AUTHOR	"VA Linux Systems, Inc."
- *
- * #define DRIVER_NAME		"mga"
- * #define DRIVER_DESC		"Matrox G200/G400"
- * #define DRIVER_DATE		"20001127"
- *
- * #define DRIVER_MAJOR		2
- * #define DRIVER_MINOR		0
- * #define DRIVER_PATCHLEVEL	2
- *
- * #define DRIVER_IOCTL_COUNT	DRM_ARRAY_SIZE( mga_ioctls )
- *
- * #define DRM(x)		mga_##x
- * \endcode
- */
-
-/*
- * Created: Thu Nov 23 03:10:50 2000 by gareth@valinux.com
- *
- * Copyright 1999, 2000 Precision Insight, Inc., Cedar Park, Texas.
- * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef DRIVER_IOCTLS
-#define DRIVER_IOCTLS
-#endif
-
-#ifndef MODULE
-/** Use an additional macro to avoid preprocessor troubles */
-#define DRM_OPTIONS_FUNC DRM(options)
-/**
- * Called by the kernel to parse command-line options passed via the
- * boot-loader (e.g., LILO).  It calls the insmod option routine,
- * parse_options().
- */
-static int __init DRM(options)( char *str )
-{
-	DRM(parse_options)( str );
-	return 1;
-}
-
-__setup( DRIVER_NAME "=", DRM_OPTIONS_FUNC );
-#undef DRM_OPTIONS_FUNC
-#endif
-
-#define MAX_DEVICES 4
-static drm_device_t	DRM(device)[MAX_DEVICES];
-static int		DRM(numdevs) = 0;
-
-struct file_operations	DRM(fops) = {
-	.owner   = THIS_MODULE,
-	.open	 = DRM(open),
-	.flush	 = DRM(flush),
-	.release = DRM(release),
-	.ioctl	 = DRM(ioctl),
-	.mmap	 = DRM(mmap),
-	.fasync  = DRM(fasync),
-	.poll	 = DRM(poll),
-	.read	 = DRM(read),
-};
-
-/** Ioctl table */
-drm_ioctl_desc_t		  DRM(ioctls)[] = {
-	[DRM_IOCTL_NR(DRM_IOCTL_VERSION)]       = { DRM(version),     0, 0 },
-	[DRM_IOCTL_NR(DRM_IOCTL_GET_UNIQUE)]    = { DRM(getunique),   0, 0 },
-	[DRM_IOCTL_NR(DRM_IOCTL_GET_MAGIC)]     = { DRM(getmagic),    0, 0 },
-	[DRM_IOCTL_NR(DRM_IOCTL_IRQ_BUSID)]     = { DRM(irq_by_busid), 0, 1 },
-	[DRM_IOCTL_NR(DRM_IOCTL_GET_MAP)]       = { DRM(getmap),      0, 0 },
-	[DRM_IOCTL_NR(DRM_IOCTL_GET_CLIENT)]    = { DRM(getclient),   0, 0 },
-	[DRM_IOCTL_NR(DRM_IOCTL_GET_STATS)]     = { DRM(getstats),    0, 0 },
-	[DRM_IOCTL_NR(DRM_IOCTL_SET_VERSION)]   = { DRM(setversion),  0, 1 },
-
-	[DRM_IOCTL_NR(DRM_IOCTL_SET_UNIQUE)]    = { DRM(setunique),   1, 1 },
-	[DRM_IOCTL_NR(DRM_IOCTL_BLOCK)]         = { DRM(noop),        1, 1 },
-	[DRM_IOCTL_NR(DRM_IOCTL_UNBLOCK)]       = { DRM(noop),        1, 1 },
-	[DRM_IOCTL_NR(DRM_IOCTL_AUTH_MAGIC)]    = { DRM(authmagic),   1, 1 },
-
-	[DRM_IOCTL_NR(DRM_IOCTL_ADD_MAP)]       = { DRM(addmap),      1, 1 },
-	[DRM_IOCTL_NR(DRM_IOCTL_RM_MAP)]        = { DRM(rmmap),       1, 0 },
-
-	[DRM_IOCTL_NR(DRM_IOCTL_SET_SAREA_CTX)] = { DRM(setsareactx), 1, 1 },
-	[DRM_IOCTL_NR(DRM_IOCTL_GET_SAREA_CTX)] = { DRM(getsareactx), 1, 0 },
-
-	[DRM_IOCTL_NR(DRM_IOCTL_ADD_CTX)]       = { DRM(addctx),      1, 1 },
-	[DRM_IOCTL_NR(DRM_IOCTL_RM_CTX)]        = { DRM(rmctx),       1, 1 },
-	[DRM_IOCTL_NR(DRM_IOCTL_MOD_CTX)]       = { DRM(modctx),      1, 1 },
-	[DRM_IOCTL_NR(DRM_IOCTL_GET_CTX)]       = { DRM(getctx),      1, 0 },
-	[DRM_IOCTL_NR(DRM_IOCTL_SWITCH_CTX)]    = { DRM(switchctx),   1, 1 },
-	[DRM_IOCTL_NR(DRM_IOCTL_NEW_CTX)]       = { DRM(newctx),      1, 1 },
-	[DRM_IOCTL_NR(DRM_IOCTL_RES_CTX)]       = { DRM(resctx),      1, 0 },
-
-	[DRM_IOCTL_NR(DRM_IOCTL_ADD_DRAW)]      = { DRM(adddraw),     1, 1 },
-	[DRM_IOCTL_NR(DRM_IOCTL_RM_DRAW)]       = { DRM(rmdraw),      1, 1 },
-
-	[DRM_IOCTL_NR(DRM_IOCTL_LOCK)]	        = { DRM(lock),        1, 0 },
-	[DRM_IOCTL_NR(DRM_IOCTL_UNLOCK)]        = { DRM(unlock),      1, 0 },
-
-	[DRM_IOCTL_NR(DRM_IOCTL_FINISH)]        = { DRM(noop),      1, 0 },
-
-	[DRM_IOCTL_NR(DRM_IOCTL_ADD_BUFS)]      = { DRM(addbufs),     1, 1 },
-	[DRM_IOCTL_NR(DRM_IOCTL_MARK_BUFS)]     = { DRM(markbufs),    1, 1 },
-	[DRM_IOCTL_NR(DRM_IOCTL_INFO_BUFS)]     = { DRM(infobufs),    1, 0 },
-	[DRM_IOCTL_NR(DRM_IOCTL_MAP_BUFS)]      = { DRM(mapbufs),     1, 0 },
-	[DRM_IOCTL_NR(DRM_IOCTL_FREE_BUFS)]     = { DRM(freebufs),    1, 0 },
-	/* The DRM_IOCTL_DMA ioctl should be defined by the driver. */
-
-	[DRM_IOCTL_NR(DRM_IOCTL_CONTROL)]       = { DRM(control),     1, 1 },
-
-#if __OS_HAS_AGP
-	[DRM_IOCTL_NR(DRM_IOCTL_AGP_ACQUIRE)]   = { DRM(agp_acquire), 1, 1 },
-	[DRM_IOCTL_NR(DRM_IOCTL_AGP_RELEASE)]   = { DRM(agp_release), 1, 1 },
-	[DRM_IOCTL_NR(DRM_IOCTL_AGP_ENABLE)]    = { DRM(agp_enable),  1, 1 },
-	[DRM_IOCTL_NR(DRM_IOCTL_AGP_INFO)]      = { DRM(agp_info),    1, 0 },
-	[DRM_IOCTL_NR(DRM_IOCTL_AGP_ALLOC)]     = { DRM(agp_alloc),   1, 1 },
-	[DRM_IOCTL_NR(DRM_IOCTL_AGP_FREE)]      = { DRM(agp_free),    1, 1 },
-	[DRM_IOCTL_NR(DRM_IOCTL_AGP_BIND)]      = { DRM(agp_bind),    1, 1 },
-	[DRM_IOCTL_NR(DRM_IOCTL_AGP_UNBIND)]    = { DRM(agp_unbind),  1, 1 },
-#endif
-
-	[DRM_IOCTL_NR(DRM_IOCTL_SG_ALLOC)]      = { DRM(sg_alloc),    1, 1 },
-	[DRM_IOCTL_NR(DRM_IOCTL_SG_FREE)]       = { DRM(sg_free),     1, 1 },
-
-	[DRM_IOCTL_NR(DRM_IOCTL_WAIT_VBLANK)]   = { DRM(wait_vblank), 0, 0 },
-
-	DRIVER_IOCTLS
-};
-
-#define DRIVER_IOCTL_COUNT	DRM_ARRAY_SIZE( DRM(ioctls) )
-
-#ifdef MODULE
-static char *drm_opts = NULL;
-#endif
-
-MODULE_AUTHOR( DRIVER_AUTHOR );
-MODULE_DESCRIPTION( DRIVER_DESC );
-MODULE_PARM( drm_opts, "s" );
-MODULE_LICENSE("GPL and additional rights");
-
-static int DRM(setup)( drm_device_t *dev )
-{
-	int i;
-	int ret;
-
-	if (dev->fn_tbl.presetup)
-	{
-		ret=dev->fn_tbl.presetup(dev);
-		if (ret!=0) 
-			return ret;
-	}
-
-	atomic_set( &dev->ioctl_count, 0 );
-	atomic_set( &dev->vma_count, 0 );
-	dev->buf_use = 0;
-	atomic_set( &dev->buf_alloc, 0 );
-
-	if (drm_core_check_feature(dev, DRIVER_HAVE_DMA))
-	{
-		i = DRM(dma_setup)( dev );
-		if ( i < 0 )
-			return i;
-	}
-
-	for ( i = 0 ; i < DRM_ARRAY_SIZE(dev->counts) ; i++ )
-		atomic_set( &dev->counts[i], 0 );
-
-	for ( i = 0 ; i < DRM_HASH_SIZE ; i++ ) {
-		dev->magiclist[i].head = NULL;
-		dev->magiclist[i].tail = NULL;
-	}
-
-	dev->maplist = DRM(alloc)(sizeof(*dev->maplist),
-				  DRM_MEM_MAPS);
-	if(dev->maplist == NULL) return -ENOMEM;
-	memset(dev->maplist, 0, sizeof(*dev->maplist));
-	INIT_LIST_HEAD(&dev->maplist->head);
-
-	dev->ctxlist = DRM(alloc)(sizeof(*dev->ctxlist),
-				  DRM_MEM_CTXLIST);
-	if(dev->ctxlist == NULL) return -ENOMEM;
-	memset(dev->ctxlist, 0, sizeof(*dev->ctxlist));
-	INIT_LIST_HEAD(&dev->ctxlist->head);
-
-	dev->vmalist = NULL;
-	dev->sigdata.lock = dev->lock.hw_lock = NULL;
-	init_waitqueue_head( &dev->lock.lock_queue );
-	dev->queue_count = 0;
-	dev->queue_reserved = 0;
-	dev->queue_slots = 0;
-	dev->queuelist = NULL;
-	dev->irq_enabled = 0;
-	dev->context_flag = 0;
-	dev->interrupt_flag = 0;
-	dev->dma_flag = 0;
-	dev->last_context = 0;
-	dev->last_switch = 0;
-	dev->last_checked = 0;
-	init_waitqueue_head( &dev->context_wait );
-	dev->if_version = 0;
-
-	dev->ctx_start = 0;
-	dev->lck_start = 0;
-
-	dev->buf_rp = dev->buf;
-	dev->buf_wp = dev->buf;
-	dev->buf_end = dev->buf + DRM_BSZ;
-	dev->buf_async = NULL;
-	init_waitqueue_head( &dev->buf_readers );
-	init_waitqueue_head( &dev->buf_writers );
-
-	DRM_DEBUG( "\n" );
-
-	/*
-	 * The kernel's context could be created here, but is now created
-	 * in drm_dma_enqueue.	This is more resource-efficient for
-	 * hardware that does not do DMA, but may mean that
-	 * drm_select_queue fails between the time the interrupt is
-	 * initialized and the time the queues are initialized.
-	 */
-	if (dev->fn_tbl.postsetup)
-		dev->fn_tbl.postsetup(dev);
-
-	return 0;
-}
-
-
-/**
- * Take down the DRM device.
- *
- * \param dev DRM device structure.
- *
- * Frees every resource in \p dev.
- *
- * \sa drm_device and setup().
- */
-static int DRM(takedown)( drm_device_t *dev )
-{
-	drm_magic_entry_t *pt, *next;
-	drm_map_t *map;
-	drm_map_list_t *r_list;
-	struct list_head *list, *list_next;
-	drm_vma_entry_t *vma, *vma_next;
-	int i;
-
-	DRM_DEBUG( "\n" );
-
-	if (dev->fn_tbl.pretakedown)
-	  dev->fn_tbl.pretakedown(dev);
-
-	if ( dev->irq_enabled ) DRM(irq_uninstall)( dev );
-
-	down( &dev->struct_sem );
-	del_timer( &dev->timer );
-
-	if ( dev->devname ) {
-		DRM(free)( dev->devname, strlen( dev->devname ) + 1,
-			   DRM_MEM_DRIVER );
-		dev->devname = NULL;
-	}
-
-	if ( dev->unique ) {
-		DRM(free)( dev->unique, strlen( dev->unique ) + 1,
-			   DRM_MEM_DRIVER );
-		dev->unique = NULL;
-		dev->unique_len = 0;
-	}
-				/* Clear pid list */
-	for ( i = 0 ; i < DRM_HASH_SIZE ; i++ ) {
-		for ( pt = dev->magiclist[i].head ; pt ; pt = next ) {
-			next = pt->next;
-			DRM(free)( pt, sizeof(*pt), DRM_MEM_MAGIC );
-		}
-		dev->magiclist[i].head = dev->magiclist[i].tail = NULL;
-	}
-
-				/* Clear AGP information */
-	if (drm_core_has_AGP(dev) && dev->agp) {
-		drm_agp_mem_t *entry;
-		drm_agp_mem_t *nexte;
-
-				/* Remove AGP resources, but leave dev->agp
-                                   intact until drv_cleanup is called. */
-		for ( entry = dev->agp->memory ; entry ; entry = nexte ) {
-			nexte = entry->next;
-			if ( entry->bound ) DRM(unbind_agp)( entry->memory );
-			DRM(free_agp)( entry->memory, entry->pages );
-			DRM(free)( entry, sizeof(*entry), DRM_MEM_AGPLISTS );
-		}
-		dev->agp->memory = NULL;
-
-		if ( dev->agp->acquired ) DRM(agp_do_release)();
-
-		dev->agp->acquired = 0;
-		dev->agp->enabled  = 0;
-	}
-
-				/* Clear vma list (only built for debugging) */
-	if ( dev->vmalist ) {
-		for ( vma = dev->vmalist ; vma ; vma = vma_next ) {
-			vma_next = vma->next;
-			DRM(free)( vma, sizeof(*vma), DRM_MEM_VMAS );
-		}
-		dev->vmalist = NULL;
-	}
-
-	if( dev->maplist ) {
-		list_for_each_safe( list, list_next, &dev->maplist->head ) {
-			r_list = (drm_map_list_t *)list;
-
-			if ( ( map = r_list->map ) ) {
-				switch ( map->type ) {
-				case _DRM_REGISTERS:
-				case _DRM_FRAME_BUFFER:
-					if (drm_core_has_MTRR(dev)) {
-						if ( map->mtrr >= 0 ) {
-							int retcode;
-							retcode = mtrr_del( map->mtrr,
-									    map->offset,
-									    map->size );
-							DRM_DEBUG( "mtrr_del=%d\n", retcode );
-						}
-					}
-					DRM(ioremapfree)( map->handle, map->size, dev );
-					break;
-				case _DRM_SHM:
-					vfree(map->handle);
-					break;
-
-				case _DRM_AGP:
-					/* Do nothing here, because this is all
-					 * handled in the AGP/GART driver.
-					 */
-					break;
-				case _DRM_SCATTER_GATHER:
-					/* Handle it */
-					if (drm_core_check_feature(dev, DRIVER_SG) && dev->sg) {
-						DRM(sg_cleanup)(dev->sg);
-						dev->sg = NULL;
-					}
-					break;
-				}
-				DRM(free)(map, sizeof(*map), DRM_MEM_MAPS);
-			}
-			list_del( list );
-			DRM(free)(r_list, sizeof(*r_list), DRM_MEM_MAPS);
- 		}
-		DRM(free)(dev->maplist, sizeof(*dev->maplist), DRM_MEM_MAPS);
-		dev->maplist = NULL;
- 	}
-
-	if (drm_core_check_feature(dev, DRIVER_DMA_QUEUE) && dev->queuelist ) {
-		for ( i = 0 ; i < dev->queue_count ; i++ ) {
-			if ( dev->queuelist[i] ) {
-				DRM(free)( dev->queuelist[i],
-					  sizeof(*dev->queuelist[0]),
-					  DRM_MEM_QUEUES );
-				dev->queuelist[i] = NULL;
-			}
-		}
-		DRM(free)( dev->queuelist,
-			  dev->queue_slots * sizeof(*dev->queuelist),
-			  DRM_MEM_QUEUES );
-		dev->queuelist = NULL;
-	}
-	dev->queue_count = 0;
-
-	if (drm_core_check_feature(dev, DRIVER_HAVE_DMA))
-		DRM(dma_takedown)( dev );
-
-	if ( dev->lock.hw_lock ) {
-		dev->sigdata.lock = dev->lock.hw_lock = NULL; /* SHM removed */
-		dev->lock.filp = NULL;
-		wake_up_interruptible( &dev->lock.lock_queue );
-	}
-	up( &dev->struct_sem );
-
-	return 0;
-}
-
-static void DRM(init_fn_table)(struct drm_device *dev)
-{
-	dev->fn_tbl.reclaim_buffers = DRM(core_reclaim_buffers);
-	dev->fn_tbl.get_map_ofs = DRM(core_get_map_ofs);
-	dev->fn_tbl.get_reg_ofs = DRM(core_get_reg_ofs);
-}
-
-#include "drm_pciids.h"
-
-static struct pci_device_id DRM(pciidlist)[] = {
-	DRM(PCI_IDS)
-};
-
-static int DRM(probe)(struct pci_dev *pdev)
-{
-	drm_device_t *dev;
-	int retcode;
-	int i;
-	int is_compat = 0;
-
-	DRM_DEBUG( "\n" );
-
-	for (i = 0; DRM(pciidlist)[i].vendor != 0; i++) {
-		if ((DRM(pciidlist)[i].vendor == pdev->vendor) &&
-		    (DRM(pciidlist)[i].device == pdev->device)) {
-			is_compat = 1;
-		}
-	}
-	if (is_compat == 0)
-		return -ENODEV;
-
-	if (DRM(numdevs) >= MAX_DEVICES)
-		return -ENODEV;
-
-	if ((retcode=pci_enable_device(pdev)))
-		return retcode;
-
-	dev = &(DRM(device)[DRM(numdevs)]);
-
-	memset( (void *)dev, 0, sizeof(*dev) );
-	dev->count_lock = SPIN_LOCK_UNLOCKED;
-	init_timer( &dev->timer );
-	sema_init( &dev->struct_sem, 1 );
-	sema_init( &dev->ctxlist_sem, 1 );
-
-	if ((dev->minor = DRM(stub_register)(DRIVER_NAME, &DRM(fops),dev)) < 0)
-		return -EPERM;
-	dev->device = MKDEV(DRM_MAJOR, dev->minor );
-	dev->name   = DRIVER_NAME;
-
-	dev->pdev   = pdev;
-#ifdef __alpha__
-	dev->hose   = pdev->sysdata;
-	dev->pci_domain = dev->hose->bus->number;
-#else
-	dev->pci_domain = 0;
-#endif
-	dev->pci_bus = pdev->bus->number;
-	dev->pci_slot = PCI_SLOT(pdev->devfn);
-	dev->pci_func = PCI_FUNC(pdev->devfn);
-	dev->irq = pdev->irq;
-
-	/* dev_priv_size can be changed by a driver in driver_register_fns */
-	dev->dev_priv_size = sizeof(u32);
-
-	/* the DRM has 6 basic counters - drivers add theirs in register_fns */
-	dev->counters = 6;
-	dev->types[0]  = _DRM_STAT_LOCK;
-	dev->types[1]  = _DRM_STAT_OPENS;
-	dev->types[2]  = _DRM_STAT_CLOSES;
-	dev->types[3]  = _DRM_STAT_IOCTLS;
-	dev->types[4]  = _DRM_STAT_LOCKS;
-	dev->types[5]  = _DRM_STAT_UNLOCKS;
-
-	DRM(init_fn_table)(dev);
-
-	DRM(driver_register_fns)(dev);
-
-	if (dev->fn_tbl.preinit)
-	  dev->fn_tbl.preinit(dev);
-
-	if (drm_core_has_AGP(dev))
-	{
-		dev->agp = DRM(agp_init)();
-		if (drm_core_check_feature(dev, DRIVER_REQUIRE_AGP) && (dev->agp == NULL)) {
-			DRM_ERROR( "Cannot initialize the agpgart module.\n" );
-			DRM(stub_unregister)(dev->minor);
-			DRM(takedown)( dev );
-			return -EINVAL;
-		}
-		if (drm_core_has_MTRR(dev)) {
-			if (dev->agp)
-				dev->agp->agp_mtrr = mtrr_add( dev->agp->agp_info.aper_base,
-							       dev->agp->agp_info.aper_size*1024*1024,
-							       MTRR_TYPE_WRCOMB,
-							       1 );
-		}
-	}
-
-	retcode = DRM(ctxbitmap_init)( dev );
-	if( retcode ) {
-		DRM_ERROR( "Cannot allocate memory for context bitmap.\n" );
-		DRM(stub_unregister)(dev->minor);
-		DRM(takedown)( dev );
-		return retcode;
-	}
-
-	DRM(numdevs)++; /* no errors, mark it reserved */
-	
-	DRM_INFO( "Initialized %s %d.%d.%d %s on minor %d: %s\n",
-		DRIVER_NAME,
-		DRIVER_MAJOR,
-		DRIVER_MINOR,
-		DRIVER_PATCHLEVEL,
-		DRIVER_DATE,
-		dev->minor,
-		pci_pretty_name(pdev));
-
-	if (dev->fn_tbl.postinit)
-	  dev->fn_tbl.postinit(dev);
-
-	return 0;
-}
-
-/**
- * Module initialization. Called via init_module at module load time, or via
- * linux/init/main.c (this is not currently supported).
- *
- * \return zero on success or a negative number on failure.
- *
- * Initializes an array of drm_device structures, and attempts to
- * initialize all available devices, using consecutive minors, registering the
- * stubs and initializing the AGP device.
- * 
- * Expands the \c DRIVER_PREINIT and \c DRIVER_POST_INIT macros before and
- * after the initialization for driver customization.
- */
-static int __init drm_init( void )
-{
-	struct pci_dev *pdev = NULL;
-
-	DRM_DEBUG( "\n" );
-
-#ifdef MODULE
-	DRM(parse_options)( drm_opts );
-#endif
-
-	DRM(mem_init)();
-
-	for_each_pci_dev(pdev) 
-		DRM(probe)(pdev);
-	return 0;
-}
-
-/**
- * Called via cleanup_module() at module unload time.
- *
- * Cleans up all DRM device, calling takedown().
- * 
- * \sa drm_init().
- */
-static void __exit drm_cleanup( void )
-{
-	drm_device_t *dev;
-	int i;
-
-	DRM_DEBUG( "\n" );
-
-	for (i = DRM(numdevs) - 1; i >= 0; i--) {
-		dev = &(DRM(device)[i]);
-		if ( DRM(stub_unregister)(dev->minor) ) {
-			DRM_ERROR( "Cannot unload module\n" );
-		} else {
-			DRM_DEBUG("minor %d unregistered\n", dev->minor);
-			if (i == 0) {
-				DRM_INFO( "Module unloaded\n" );
-			}
-		}
-
-		DRM(ctxbitmap_cleanup)( dev );
-
-		if (drm_core_has_MTRR(dev) && drm_core_has_AGP(dev) &&
-		    dev->agp && dev->agp->agp_mtrr >= 0) {
-			int retval;
-			retval = mtrr_del( dev->agp->agp_mtrr,
-				   dev->agp->agp_info.aper_base,
-				   dev->agp->agp_info.aper_size*1024*1024 );
-			DRM_DEBUG( "mtrr_del=%d\n", retval );
-		}
-
-		DRM(takedown)( dev );
-
-		if (drm_core_has_AGP(dev) && dev->agp ) {
-			DRM(agp_uninit)();
-			DRM(free)( dev->agp, sizeof(*dev->agp), DRM_MEM_AGPLISTS );
-			dev->agp = NULL;
-		}
-
-		if (dev->fn_tbl.postcleanup)
-		  dev->fn_tbl.postcleanup(dev);
-
-	}
-	DRM(numdevs) = 0;
-}
-
-module_init( drm_init );
-module_exit( drm_cleanup );
-
-
-/**
- * Get version information
- *
- * \param inode device inode.
- * \param filp file pointer.
- * \param cmd command.
- * \param arg user argument, pointing to a drm_version structure.
- * \return zero on success or negative number on failure.
- *
- * Fills in the version information in \p arg.
- */
-int DRM(version)( struct inode *inode, struct file *filp,
-		  unsigned int cmd, unsigned long arg )
-{
-	drm_version_t __user *argp = (void __user *)arg;
-	drm_version_t version;
-	int len;
-
-	if ( copy_from_user( &version, argp, sizeof(version) ) )
-		return -EFAULT;
-
-#define DRM_COPY( name, value )						\
-	len = strlen( value );						\
-	if ( len > name##_len ) len = name##_len;			\
-	name##_len = strlen( value );					\
-	if ( len && name ) {						\
-		if ( copy_to_user( name, value, len ) )			\
-			return -EFAULT;					\
-	}
-
-	version.version_major = DRIVER_MAJOR;
-	version.version_minor = DRIVER_MINOR;
-	version.version_patchlevel = DRIVER_PATCHLEVEL;
-
-	DRM_COPY( version.name, DRIVER_NAME );
-	DRM_COPY( version.date, DRIVER_DATE );
-	DRM_COPY( version.desc, DRIVER_DESC );
-
-	if ( copy_to_user( argp, &version, sizeof(version) ) )
-		return -EFAULT;
-	return 0;
-}
-
-/**
- * Open file.
- * 
- * \param inode device inode
- * \param filp file pointer.
- * \return zero on success or a negative number on failure.
- *
- * Searches the DRM device with the same minor number, calls open_helper(), and
- * increments the device open count. If the open count was previous at zero,
- * i.e., it's the first that the device is open, then calls setup().
- */
-int DRM(open)( struct inode *inode, struct file *filp )
-{
-	drm_device_t *dev = NULL;
-	int retcode = 0;
-	int i;
-
-	for (i = 0; i < DRM(numdevs); i++) {
-		if (iminor(inode) == DRM(device)[i].minor) {
-			dev = &(DRM(device)[i]);
-			break;
-		}
-	}
-	if (!dev) {
-		return -ENODEV;
-	}
-
-	retcode = DRM(open_helper)( inode, filp, dev );
-	if ( !retcode ) {
-		atomic_inc( &dev->counts[_DRM_STAT_OPENS] );
-		spin_lock( &dev->count_lock );
-		if ( !dev->open_count++ ) {
-			spin_unlock( &dev->count_lock );
-			return DRM(setup)( dev );
-		}
-		spin_unlock( &dev->count_lock );
-	}
-
-	return retcode;
-}
-
-/**
- * Release file.
- *
- * \param inode device inode
- * \param filp file pointer.
- * \return zero on success or a negative number on failure.
- *
- * If the hardware lock is held then free it, and take it again for the kernel
- * context since it's necessary to reclaim buffers. Unlink the file private
- * data from its list and free it. Decreases the open count and if it reaches
- * zero calls takedown().
- */
-int DRM(release)( struct inode *inode, struct file *filp )
-{
-	drm_file_t *priv = filp->private_data;
-	drm_device_t *dev;
-	int retcode = 0;
-
-	lock_kernel();
-	dev = priv->dev;
-
-	DRM_DEBUG( "open_count = %d\n", dev->open_count );
-
-	if (dev->fn_tbl.prerelease)
-		dev->fn_tbl.prerelease(dev, filp);
-
-	/* ========================================================
-	 * Begin inline drm_release
-	 */
-
-	DRM_DEBUG( "pid = %d, device = 0x%lx, open_count = %d\n",
-		   current->pid, (long)old_encode_dev(dev->device), dev->open_count );
-
-	if ( priv->lock_count && dev->lock.hw_lock &&
-	     _DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock) &&
-	     dev->lock.filp == filp ) {
-		DRM_DEBUG( "File %p released, freeing lock for context %d\n",
-			filp,
-			_DRM_LOCKING_CONTEXT(dev->lock.hw_lock->lock) );
-		
-		if (dev->fn_tbl.release)
-			dev->fn_tbl.release(dev, filp);
-
-		DRM(lock_free)( dev, &dev->lock.hw_lock->lock,
-				_DRM_LOCKING_CONTEXT(dev->lock.hw_lock->lock) );
-
-				/* FIXME: may require heavy-handed reset of
-                                   hardware at this point, possibly
-                                   processed via a callback to the X
-                                   server. */
-	}
-	else if ( dev->fn_tbl.release && priv->lock_count && dev->lock.hw_lock ) {
-		/* The lock is required to reclaim buffers */
-		DECLARE_WAITQUEUE( entry, current );
-
-		add_wait_queue( &dev->lock.lock_queue, &entry );
-		for (;;) {
-			__set_current_state(TASK_INTERRUPTIBLE);
-			if ( !dev->lock.hw_lock ) {
-				/* Device has been unregistered */
-				retcode = -EINTR;
-				break;
-			}
-			if ( DRM(lock_take)( &dev->lock.hw_lock->lock,
-					     DRM_KERNEL_CONTEXT ) ) {
-				dev->lock.filp	    = filp;
-				dev->lock.lock_time = jiffies;
-                                atomic_inc( &dev->counts[_DRM_STAT_LOCKS] );
-				break;	/* Got lock */
-			}
-				/* Contention */
-			schedule();
-			if ( signal_pending( current ) ) {
-				retcode = -ERESTARTSYS;
-				break;
-			}
-		}
-		__set_current_state(TASK_RUNNING);
-		remove_wait_queue( &dev->lock.lock_queue, &entry );
-		if( !retcode ) {
-			if (dev->fn_tbl.release)
-				dev->fn_tbl.release(dev, filp);
-			DRM(lock_free)( dev, &dev->lock.hw_lock->lock,
-					DRM_KERNEL_CONTEXT );
-		}
-	}
-	
-	if (drm_core_check_feature(dev, DRIVER_HAVE_DMA))
-	{
-		dev->fn_tbl.reclaim_buffers(filp);
-	}
-
-	DRM(fasync)( -1, filp, 0 );
-
-	down( &dev->ctxlist_sem );
-	if ( !list_empty( &dev->ctxlist->head ) ) {
-		drm_ctx_list_t *pos, *n;
-
-		list_for_each_entry_safe( pos, n, &dev->ctxlist->head, head ) {
-			if ( pos->tag == priv &&
-			     pos->handle != DRM_KERNEL_CONTEXT ) {
-				if (dev->fn_tbl.context_dtor)
-					dev->fn_tbl.context_dtor(dev, pos->handle);
-
-				DRM(ctxbitmap_free)( dev, pos->handle );
-
-				list_del( &pos->head );
-				DRM(free)( pos, sizeof(*pos), DRM_MEM_CTXLIST );
-				--dev->ctx_count;
-			}
-		}
-	}
-	up( &dev->ctxlist_sem );
-
-	down( &dev->struct_sem );
-	if ( priv->remove_auth_on_close == 1 ) {
-		drm_file_t *temp = dev->file_first;
-		while ( temp ) {
-			temp->authenticated = 0;
-			temp = temp->next;
-		}
-	}
-	if ( priv->prev ) {
-		priv->prev->next = priv->next;
-	} else {
-		dev->file_first	 = priv->next;
-	}
-	if ( priv->next ) {
-		priv->next->prev = priv->prev;
-	} else {
-		dev->file_last	 = priv->prev;
-	}
-	up( &dev->struct_sem );
-	
-	if (dev->fn_tbl.free_filp_priv)
-		dev->fn_tbl.free_filp_priv(dev, priv);
-
-	DRM(free)( priv, sizeof(*priv), DRM_MEM_FILES );
-
-	/* ========================================================
-	 * End inline drm_release
-	 */
-
-	atomic_inc( &dev->counts[_DRM_STAT_CLOSES] );
-	spin_lock( &dev->count_lock );
-	if ( !--dev->open_count ) {
-		if ( atomic_read( &dev->ioctl_count ) || dev->blocked ) {
-			DRM_ERROR( "Device busy: %d %d\n",
-				   atomic_read( &dev->ioctl_count ),
-				   dev->blocked );
-			spin_unlock( &dev->count_lock );
-			unlock_kernel();
-			return -EBUSY;
-		}
-		spin_unlock( &dev->count_lock );
-		unlock_kernel();
-		return DRM(takedown)( dev );
-	}
-	spin_unlock( &dev->count_lock );
-
-	unlock_kernel();
-
-	return retcode;
-}
-
-/** 
- * Called whenever a process performs an ioctl on /dev/drm.
- *
- * \param inode device inode.
- * \param filp file pointer.
- * \param cmd command.
- * \param arg user argument.
- * \return zero on success or negative number on failure.
- *
- * Looks up the ioctl function in the ::ioctls table, checking for root
- * previleges if so required, and dispatches to the respective function.
- */
-int DRM(ioctl)( struct inode *inode, struct file *filp,
-		unsigned int cmd, unsigned long arg )
-{
-	drm_file_t *priv = filp->private_data;
-	drm_device_t *dev = priv->dev;
-	drm_ioctl_desc_t *ioctl;
-	drm_ioctl_t *func;
-	int nr = DRM_IOCTL_NR(cmd);
-	int retcode = 0;
-
-	atomic_inc( &dev->ioctl_count );
-	atomic_inc( &dev->counts[_DRM_STAT_IOCTLS] );
-	++priv->ioctl_count;
-
-	DRM_DEBUG( "pid=%d, cmd=0x%02x, nr=0x%02x, dev 0x%lx, auth=%d\n",
-		   current->pid, cmd, nr, (long)old_encode_dev(dev->device), 
-		   priv->authenticated );
-
-	if ( nr >= DRIVER_IOCTL_COUNT ) {
-		retcode = -EINVAL;
-	} else {
-		ioctl = &DRM(ioctls)[nr];
-		func = ioctl->func;
-
-		if ( !func ) {
-			DRM_DEBUG( "no function\n" );
-			retcode = -EINVAL;
-		} else if ( ( ioctl->root_only && !capable( CAP_SYS_ADMIN ) )||
-			    ( ioctl->auth_needed && !priv->authenticated ) ) {
-			retcode = -EACCES;
-		} else {
-			retcode = func( inode, filp, cmd, arg );
-		}
-	}
-
-	atomic_dec( &dev->ioctl_count );
-	return retcode;
-}
-
-/** 
- * Lock ioctl.
- *
- * \param inode device inode.
- * \param filp file pointer.
- * \param cmd command.
- * \param arg user argument, pointing to a drm_lock structure.
- * \return zero on success or negative number on failure.
- *
- * Add the current task to the lock wait queue, and attempt to take to lock.
- */
-int DRM(lock)( struct inode *inode, struct file *filp,
-	       unsigned int cmd, unsigned long arg )
-{
-        drm_file_t *priv = filp->private_data;
-        drm_device_t *dev = priv->dev;
-        DECLARE_WAITQUEUE( entry, current );
-        drm_lock_t lock;
-        int ret = 0;
-
-	++priv->lock_count;
-
-        if ( copy_from_user( &lock, (drm_lock_t __user *)arg, sizeof(lock) ) )
-		return -EFAULT;
-
-        if ( lock.context == DRM_KERNEL_CONTEXT ) {
-                DRM_ERROR( "Process %d using kernel context %d\n",
-			   current->pid, lock.context );
-                return -EINVAL;
-        }
-
-        DRM_DEBUG( "%d (pid %d) requests lock (0x%08x), flags = 0x%08x\n",
-		   lock.context, current->pid,
-		   dev->lock.hw_lock->lock, lock.flags );
-
-	if (drm_core_check_feature(dev, DRIVER_DMA_QUEUE))
-		if ( lock.context < 0 )
-			return -EINVAL;
-
-	add_wait_queue( &dev->lock.lock_queue, &entry );
-	for (;;) {
-		__set_current_state(TASK_INTERRUPTIBLE);
-		if ( !dev->lock.hw_lock ) {
-			/* Device has been unregistered */
-			ret = -EINTR;
-			break;
-		}
-		if ( DRM(lock_take)( &dev->lock.hw_lock->lock,
-				     lock.context ) ) {
-			dev->lock.filp      = filp;
-			dev->lock.lock_time = jiffies;
-			atomic_inc( &dev->counts[_DRM_STAT_LOCKS] );
-			break;  /* Got lock */
-		}
-		
-		/* Contention */
-		schedule();
-		if ( signal_pending( current ) ) {
-			ret = -ERESTARTSYS;
-			break;
-		}
-	}
-	__set_current_state(TASK_RUNNING);
-	remove_wait_queue( &dev->lock.lock_queue, &entry );
-
-	sigemptyset( &dev->sigmask );
-	sigaddset( &dev->sigmask, SIGSTOP );
-	sigaddset( &dev->sigmask, SIGTSTP );
-	sigaddset( &dev->sigmask, SIGTTIN );
-	sigaddset( &dev->sigmask, SIGTTOU );
-	dev->sigdata.context = lock.context;
-	dev->sigdata.lock    = dev->lock.hw_lock;
-	block_all_signals( DRM(notifier),
-			   &dev->sigdata, &dev->sigmask );
-	
-	if (dev->fn_tbl.dma_ready && (lock.flags & _DRM_LOCK_READY))
-		dev->fn_tbl.dma_ready(dev);
-	
-	if ( dev->fn_tbl.dma_quiescent && (lock.flags & _DRM_LOCK_QUIESCENT ))
-		return dev->fn_tbl.dma_quiescent(dev);
-	
-	/* dev->fn_tbl.kernel_context_switch isn't used by any of the x86 
-	 *  drivers but is used by the Sparc driver.
-	 */
-	
-	if (dev->fn_tbl.kernel_context_switch && 
-	    dev->last_context != lock.context) {
-	  dev->fn_tbl.kernel_context_switch(dev, dev->last_context, 
-					    lock.context);
-	}
-        DRM_DEBUG( "%d %s\n", lock.context, ret ? "interrupted" : "has lock" );
-
-        return ret;
-}
-
-/** 
- * Unlock ioctl.
- *
- * \param inode device inode.
- * \param filp file pointer.
- * \param cmd command.
- * \param arg user argument, pointing to a drm_lock structure.
- * \return zero on success or negative number on failure.
- *
- * Transfer and free the lock.
- */
-int DRM(unlock)( struct inode *inode, struct file *filp,
-		 unsigned int cmd, unsigned long arg )
-{
-	drm_file_t *priv = filp->private_data;
-	drm_device_t *dev = priv->dev;
-	drm_lock_t lock;
-
-	if ( copy_from_user( &lock, (drm_lock_t __user *)arg, sizeof(lock) ) )
-		return -EFAULT;
-
-	if ( lock.context == DRM_KERNEL_CONTEXT ) {
-		DRM_ERROR( "Process %d using kernel context %d\n",
-			   current->pid, lock.context );
-		return -EINVAL;
-	}
-
-	atomic_inc( &dev->counts[_DRM_STAT_UNLOCKS] );
-
-	/* kernel_context_switch isn't used by any of the x86 drm
-	 * modules but is required by the Sparc driver.
-	 */
-	if (dev->fn_tbl.kernel_context_switch_unlock)
-		dev->fn_tbl.kernel_context_switch_unlock(dev, &lock);
-	else {
-		DRM(lock_transfer)( dev, &dev->lock.hw_lock->lock, 
-				    DRM_KERNEL_CONTEXT );
-		
-		if ( DRM(lock_free)( dev, &dev->lock.hw_lock->lock,
-				     DRM_KERNEL_CONTEXT ) ) {
-			DRM_ERROR( "\n" );
-		}
-	}
-
-	unblock_all_signals();
-	return 0;
-}
diff -Nru a/drivers/char/drm/drm_fops.c b/drivers/char/drm/drm_fops.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/char/drm/drm_fops.c	2005-01-10 20:11:19 -08:00
@@ -0,0 +1,449 @@
+/**
+ * \file drm_fops.h 
+ * File operations for DRM
+ * 
+ * \author Rickard E. (Rik) Faith <faith@valinux.com>
+ * \author Daryll Strauss <daryll@valinux.com>
+ * \author Gareth Hughes <gareth@valinux.com>
+ */
+
+/*
+ * Created: Mon Jan  4 08:58:31 1999 by faith@valinux.com
+ *
+ * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "drmP.h"
+#include <linux/poll.h>
+
+static int drm_setup( drm_device_t *dev )
+{
+	int i;
+	int ret;
+
+	if (dev->driver->presetup)
+	{
+		ret=dev->driver->presetup(dev);
+		if (ret!=0) 
+			return ret;
+	}
+
+	atomic_set( &dev->ioctl_count, 0 );
+	atomic_set( &dev->vma_count, 0 );
+	dev->buf_use = 0;
+	atomic_set( &dev->buf_alloc, 0 );
+
+	if (drm_core_check_feature(dev, DRIVER_HAVE_DMA))
+	{
+		i = drm_dma_setup( dev );
+		if ( i < 0 )
+			return i;
+	}
+
+	for ( i = 0 ; i < DRM_ARRAY_SIZE(dev->counts) ; i++ )
+		atomic_set( &dev->counts[i], 0 );
+
+	for ( i = 0 ; i < DRM_HASH_SIZE ; i++ ) {
+		dev->magiclist[i].head = NULL;
+		dev->magiclist[i].tail = NULL;
+	}
+
+	dev->maplist = drm_alloc(sizeof(*dev->maplist),
+				  DRM_MEM_MAPS);
+	if(dev->maplist == NULL) return -ENOMEM;
+	memset(dev->maplist, 0, sizeof(*dev->maplist));
+	INIT_LIST_HEAD(&dev->maplist->head);
+
+	dev->ctxlist = drm_alloc(sizeof(*dev->ctxlist),
+				  DRM_MEM_CTXLIST);
+	if(dev->ctxlist == NULL) return -ENOMEM;
+	memset(dev->ctxlist, 0, sizeof(*dev->ctxlist));
+	INIT_LIST_HEAD(&dev->ctxlist->head);
+
+	dev->vmalist = NULL;
+	dev->sigdata.lock = dev->lock.hw_lock = NULL;
+	init_waitqueue_head( &dev->lock.lock_queue );
+	dev->queue_count = 0;
+	dev->queue_reserved = 0;
+	dev->queue_slots = 0;
+	dev->queuelist = NULL;
+	dev->irq_enabled = 0;
+	dev->context_flag = 0;
+	dev->interrupt_flag = 0;
+	dev->dma_flag = 0;
+	dev->last_context = 0;
+	dev->last_switch = 0;
+	dev->last_checked = 0;
+	init_waitqueue_head( &dev->context_wait );
+	dev->if_version = 0;
+
+	dev->ctx_start = 0;
+	dev->lck_start = 0;
+
+	dev->buf_rp = dev->buf;
+	dev->buf_wp = dev->buf;
+	dev->buf_end = dev->buf + DRM_BSZ;
+	dev->buf_async = NULL;
+	init_waitqueue_head( &dev->buf_readers );
+	init_waitqueue_head( &dev->buf_writers );
+
+	DRM_DEBUG( "\n" );
+
+	/*
+	 * The kernel's context could be created here, but is now created
+	 * in drm_dma_enqueue.	This is more resource-efficient for
+	 * hardware that does not do DMA, but may mean that
+	 * drm_select_queue fails between the time the interrupt is
+	 * initialized and the time the queues are initialized.
+	 */
+	if (dev->driver->postsetup)
+		dev->driver->postsetup(dev);
+
+	return 0;
+}
+
+/**
+ * Open file.
+ * 
+ * \param inode device inode
+ * \param filp file pointer.
+ * \return zero on success or a negative number on failure.
+ *
+ * Searches the DRM device with the same minor number, calls open_helper(), and
+ * increments the device open count. If the open count was previous at zero,
+ * i.e., it's the first that the device is open, then calls setup().
+ */
+int drm_open( struct inode *inode, struct file *filp )
+{
+	drm_device_t *dev = NULL;
+	int minor = iminor(inode);
+	int retcode = 0;
+
+	if (!((minor >= 0) && (minor < drm_cards_limit)))
+		return -ENODEV;
+		
+	dev = drm_minors[minor].dev;
+	if (!dev)
+		return -ENODEV;
+	
+	retcode = drm_open_helper( inode, filp, dev );
+	if ( !retcode ) {
+		atomic_inc( &dev->counts[_DRM_STAT_OPENS] );
+		spin_lock( &dev->count_lock );
+		if ( !dev->open_count++ ) {
+			spin_unlock( &dev->count_lock );
+			return drm_setup( dev );
+		}
+		spin_unlock( &dev->count_lock );
+	}
+
+	return retcode;
+}
+EXPORT_SYMBOL(drm_open);
+
+/**
+ * Release file.
+ *
+ * \param inode device inode
+ * \param filp file pointer.
+ * \return zero on success or a negative number on failure.
+ *
+ * If the hardware lock is held then free it, and take it again for the kernel
+ * context since it's necessary to reclaim buffers. Unlink the file private
+ * data from its list and free it. Decreases the open count and if it reaches
+ * zero calls takedown().
+ */
+int drm_release( struct inode *inode, struct file *filp )
+{
+	drm_file_t *priv = filp->private_data;
+	drm_device_t *dev;
+	int retcode = 0;
+
+	lock_kernel();
+	dev = priv->dev;
+
+	DRM_DEBUG( "open_count = %d\n", dev->open_count );
+
+	if (dev->driver->prerelease)
+		dev->driver->prerelease(dev, filp);
+
+	/* ========================================================
+	 * Begin inline drm_release
+	 */
+
+	DRM_DEBUG( "pid = %d, device = 0x%lx, open_count = %d\n",
+		   current->pid, (long)old_encode_dev(dev->device), dev->open_count );
+
+	if ( priv->lock_count && dev->lock.hw_lock &&
+	     _DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock) &&
+	     dev->lock.filp == filp ) {
+		DRM_DEBUG( "File %p released, freeing lock for context %d\n",
+			filp,
+			_DRM_LOCKING_CONTEXT(dev->lock.hw_lock->lock) );
+		
+		if (dev->driver->release)
+			dev->driver->release(dev, filp);
+
+		drm_lock_free( dev, &dev->lock.hw_lock->lock,
+				_DRM_LOCKING_CONTEXT(dev->lock.hw_lock->lock) );
+
+				/* FIXME: may require heavy-handed reset of
+                                   hardware at this point, possibly
+                                   processed via a callback to the X
+                                   server. */
+	}
+	else if ( dev->driver->release && priv->lock_count && dev->lock.hw_lock ) {
+		/* The lock is required to reclaim buffers */
+		DECLARE_WAITQUEUE( entry, current );
+
+		add_wait_queue( &dev->lock.lock_queue, &entry );
+		for (;;) {
+			__set_current_state(TASK_INTERRUPTIBLE);
+			if ( !dev->lock.hw_lock ) {
+				/* Device has been unregistered */
+				retcode = -EINTR;
+				break;
+			}
+			if ( drm_lock_take( &dev->lock.hw_lock->lock,
+					     DRM_KERNEL_CONTEXT ) ) {
+				dev->lock.filp	    = filp;
+				dev->lock.lock_time = jiffies;
+                                atomic_inc( &dev->counts[_DRM_STAT_LOCKS] );
+				break;	/* Got lock */
+			}
+				/* Contention */
+			schedule();
+			if ( signal_pending( current ) ) {
+				retcode = -ERESTARTSYS;
+				break;
+			}
+		}
+		__set_current_state(TASK_RUNNING);
+		remove_wait_queue( &dev->lock.lock_queue, &entry );
+		if( !retcode ) {
+			if (dev->driver->release)
+				dev->driver->release(dev, filp);
+			drm_lock_free( dev, &dev->lock.hw_lock->lock,
+					DRM_KERNEL_CONTEXT );
+		}
+	}
+	
+	if (drm_core_check_feature(dev, DRIVER_HAVE_DMA))
+	{
+		dev->driver->reclaim_buffers(dev, filp);
+	}
+
+	drm_fasync( -1, filp, 0 );
+
+	down( &dev->ctxlist_sem );
+	if ( !list_empty( &dev->ctxlist->head ) ) {
+		drm_ctx_list_t *pos, *n;
+
+		list_for_each_entry_safe( pos, n, &dev->ctxlist->head, head ) {
+			if ( pos->tag == priv &&
+			     pos->handle != DRM_KERNEL_CONTEXT ) {
+				if (dev->driver->context_dtor)
+					dev->driver->context_dtor(dev, pos->handle);
+
+				drm_ctxbitmap_free( dev, pos->handle );
+
+				list_del( &pos->head );
+				drm_free( pos, sizeof(*pos), DRM_MEM_CTXLIST );
+				--dev->ctx_count;
+			}
+		}
+	}
+	up( &dev->ctxlist_sem );
+
+	down( &dev->struct_sem );
+	if ( priv->remove_auth_on_close == 1 ) {
+		drm_file_t *temp = dev->file_first;
+		while ( temp ) {
+			temp->authenticated = 0;
+			temp = temp->next;
+		}
+	}
+	if ( priv->prev ) {
+		priv->prev->next = priv->next;
+	} else {
+		dev->file_first	 = priv->next;
+	}
+	if ( priv->next ) {
+		priv->next->prev = priv->prev;
+	} else {
+		dev->file_last	 = priv->prev;
+	}
+	up( &dev->struct_sem );
+	
+	if (dev->driver->free_filp_priv)
+		dev->driver->free_filp_priv(dev, priv);
+
+	drm_free( priv, sizeof(*priv), DRM_MEM_FILES );
+
+	/* ========================================================
+	 * End inline drm_release
+	 */
+
+	atomic_inc( &dev->counts[_DRM_STAT_CLOSES] );
+	spin_lock( &dev->count_lock );
+	if ( !--dev->open_count ) {
+		if ( atomic_read( &dev->ioctl_count ) || dev->blocked ) {
+			DRM_ERROR( "Device busy: %d %d\n",
+				   atomic_read( &dev->ioctl_count ),
+				   dev->blocked );
+			spin_unlock( &dev->count_lock );
+			unlock_kernel();
+			return -EBUSY;
+		}
+		spin_unlock( &dev->count_lock );
+		unlock_kernel();
+		return drm_takedown( dev );
+	}
+	spin_unlock( &dev->count_lock );
+
+	unlock_kernel();
+
+	return retcode;
+}
+EXPORT_SYMBOL(drm_release);
+
+/**
+ * Called whenever a process opens /dev/drm. 
+ *
+ * \param inode device inode.
+ * \param filp file pointer.
+ * \param dev device.
+ * \return zero on success or a negative number on failure.
+ * 
+ * Creates and initializes a drm_file structure for the file private data in \p
+ * filp and add it into the double linked list in \p dev.
+ */
+int drm_open_helper(struct inode *inode, struct file *filp, drm_device_t *dev)
+{
+	int	     minor = iminor(inode);
+	drm_file_t   *priv;
+	int ret;
+
+	if (filp->f_flags & O_EXCL)   return -EBUSY; /* No exclusive opens */
+	if (!drm_cpu_valid())        return -EINVAL;
+
+	DRM_DEBUG("pid = %d, minor = %d\n", current->pid, minor);
+
+	priv		    = drm_alloc(sizeof(*priv), DRM_MEM_FILES);
+	if(!priv) return -ENOMEM;
+
+	memset(priv, 0, sizeof(*priv));
+	filp->private_data  = priv;
+	priv->uid	    = current->euid;
+	priv->pid	    = current->pid;
+	priv->minor	    = minor;
+	priv->dev	    = dev;
+	priv->ioctl_count   = 0;
+	priv->authenticated = capable(CAP_SYS_ADMIN);
+	priv->lock_count    = 0;
+
+	if (dev->driver->open_helper) {
+		ret=dev->driver->open_helper(dev, priv);
+		if (ret < 0)
+			goto out_free;
+	}
+
+	down(&dev->struct_sem);
+	if (!dev->file_last) {
+		priv->next	= NULL;
+		priv->prev	= NULL;
+		dev->file_first = priv;
+		dev->file_last	= priv;
+	} else {
+		priv->next	     = NULL;
+		priv->prev	     = dev->file_last;
+		dev->file_last->next = priv;
+		dev->file_last	     = priv;
+	}
+	up(&dev->struct_sem);
+
+#ifdef __alpha__
+	/*
+	 * Default the hose
+	 */
+	if (!dev->hose) {
+		struct pci_dev *pci_dev;
+		pci_dev = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8, NULL);
+		if (pci_dev) {
+			dev->hose = pci_dev->sysdata;
+			pci_dev_put(pci_dev);
+		}
+		if (!dev->hose) {
+			struct pci_bus *b = pci_bus_b(pci_root_buses.next);
+			if (b) dev->hose = b->sysdata;
+		}
+	}
+#endif
+
+	return 0;
+out_free:
+	drm_free(priv, sizeof(*priv), DRM_MEM_FILES);
+	filp->private_data=NULL;
+	return ret;
+}
+
+/** No-op. */
+int drm_flush(struct file *filp)
+{
+	drm_file_t    *priv   = filp->private_data;
+	drm_device_t  *dev    = priv->dev;
+
+	DRM_DEBUG("pid = %d, device = 0x%lx, open_count = %d\n",
+		  current->pid, (long)old_encode_dev(dev->device), dev->open_count);
+	return 0;
+}
+EXPORT_SYMBOL(drm_flush);
+
+/** No-op. */
+int drm_fasync(int fd, struct file *filp, int on)
+{
+	drm_file_t    *priv   = filp->private_data;
+	drm_device_t  *dev    = priv->dev;
+	int	      retcode;
+
+	DRM_DEBUG("fd = %d, device = 0x%lx\n", fd, (long)old_encode_dev(dev->device));
+	retcode = fasync_helper(fd, filp, on, &dev->buf_async);
+	if (retcode < 0) return retcode;
+	return 0;
+}
+EXPORT_SYMBOL(drm_fasync);
+
+/** No-op. */
+unsigned int drm_poll(struct file *filp, struct poll_table_struct *wait)
+{
+	return 0;
+}
+EXPORT_SYMBOL(drm_poll);
+
+
+/** No-op. */
+ssize_t drm_read(struct file *filp, char __user *buf, size_t count, loff_t *off)
+{
+	return 0;
+}
diff -Nru a/drivers/char/drm/drm_fops.h b/drivers/char/drm/drm_fops.h
--- a/drivers/char/drm/drm_fops.h	2005-01-10 20:11:19 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,156 +0,0 @@
-/**
- * \file drm_fops.h 
- * File operations for DRM
- * 
- * \author Rickard E. (Rik) Faith <faith@valinux.com>
- * \author Daryll Strauss <daryll@valinux.com>
- * \author Gareth Hughes <gareth@valinux.com>
- */
-
-/*
- * Created: Mon Jan  4 08:58:31 1999 by faith@valinux.com
- *
- * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
- * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "drmP.h"
-#include <linux/poll.h>
-
-
-/**
- * Called whenever a process opens /dev/drm. 
- *
- * \param inode device inode.
- * \param filp file pointer.
- * \param dev device.
- * \return zero on success or a negative number on failure.
- * 
- * Creates and initializes a drm_file structure for the file private data in \p
- * filp and add it into the double linked list in \p dev.
- */
-int DRM(open_helper)(struct inode *inode, struct file *filp, drm_device_t *dev)
-{
-	int	     minor = iminor(inode);
-	drm_file_t   *priv;
-	int ret;
-
-	if (filp->f_flags & O_EXCL)   return -EBUSY; /* No exclusive opens */
-	if (!DRM(cpu_valid)())        return -EINVAL;
-
-	DRM_DEBUG("pid = %d, minor = %d\n", current->pid, minor);
-
-	priv		    = DRM(alloc)(sizeof(*priv), DRM_MEM_FILES);
-	if(!priv) return -ENOMEM;
-
-	memset(priv, 0, sizeof(*priv));
-	filp->private_data  = priv;
-	priv->uid	    = current->euid;
-	priv->pid	    = current->pid;
-	priv->minor	    = minor;
-	priv->dev	    = dev;
-	priv->ioctl_count   = 0;
-	priv->authenticated = capable(CAP_SYS_ADMIN);
-	priv->lock_count    = 0;
-
-	if (dev->fn_tbl.open_helper) {
-		ret=dev->fn_tbl.open_helper(dev, priv);
-		if (ret < 0)
-			goto out_free;
-	}
-
-	down(&dev->struct_sem);
-	if (!dev->file_last) {
-		priv->next	= NULL;
-		priv->prev	= NULL;
-		dev->file_first = priv;
-		dev->file_last	= priv;
-	} else {
-		priv->next	     = NULL;
-		priv->prev	     = dev->file_last;
-		dev->file_last->next = priv;
-		dev->file_last	     = priv;
-	}
-	up(&dev->struct_sem);
-
-#ifdef __alpha__
-	/*
-	 * Default the hose
-	 */
-	if (!dev->hose) {
-		struct pci_dev *pci_dev;
-		pci_dev = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8, NULL);
-		if (pci_dev) {
-			dev->hose = pci_dev->sysdata;
-			pci_dev_put(pci_dev);
-		}
-		if (!dev->hose) {
-			struct pci_bus *b = pci_bus_b(pci_root_buses.next);
-			if (b) dev->hose = b->sysdata;
-		}
-	}
-#endif
-
-	return 0;
-out_free:
-	DRM(free)(priv, sizeof(*priv), DRM_MEM_FILES);
-	filp->private_data=NULL;
-	return ret;
-}
-
-/** No-op. */
-int DRM(flush)(struct file *filp)
-{
-	drm_file_t    *priv   = filp->private_data;
-	drm_device_t  *dev    = priv->dev;
-
-	DRM_DEBUG("pid = %d, device = 0x%lx, open_count = %d\n",
-		  current->pid, (long)old_encode_dev(dev->device), dev->open_count);
-	return 0;
-}
-
-/** No-op. */
-int DRM(fasync)(int fd, struct file *filp, int on)
-{
-	drm_file_t    *priv   = filp->private_data;
-	drm_device_t  *dev    = priv->dev;
-	int	      retcode;
-
-	DRM_DEBUG("fd = %d, device = 0x%lx\n", fd, (long)old_encode_dev(dev->device));
-	retcode = fasync_helper(fd, filp, on, &dev->buf_async);
-	if (retcode < 0) return retcode;
-	return 0;
-}
-
-/** No-op. */
-unsigned int DRM(poll)(struct file *filp, struct poll_table_struct *wait)
-{
-	return 0;
-}
-
-
-/** No-op. */
-ssize_t DRM(read)(struct file *filp, char __user *buf, size_t count, loff_t *off)
-{
-	return 0;
-}
diff -Nru a/drivers/char/drm/drm_init.c b/drivers/char/drm/drm_init.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/char/drm/drm_init.c	2005-01-10 20:11:22 -08:00
@@ -0,0 +1,52 @@
+/**
+ * \file drm_init.h 
+ * Setup/Cleanup for DRM
+ *
+ * \author Rickard E. (Rik) Faith <faith@valinux.com>
+ * \author Gareth Hughes <gareth@valinux.com>
+ */
+
+/*
+ * Created: Mon Jan  4 08:58:31 1999 by faith@valinux.com
+ *
+ * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "drmP.h"
+
+/**
+ * Check whether DRI will run on this CPU.
+ *
+ * \return non-zero if the DRI will run on this CPU, or zero otherwise.
+ */
+int drm_cpu_valid(void)
+{
+#if defined(__i386__)
+	if (boot_cpu_data.x86 == 3) return 0; /* No cmpxchg on a 386 */
+#endif
+#if defined(__sparc__) && !defined(__sparc_v9__)
+	return 0; /* No cmpxchg before v9 sparc. */
+#endif
+	return 1;
+}
diff -Nru a/drivers/char/drm/drm_init.h b/drivers/char/drm/drm_init.h
--- a/drivers/char/drm/drm_init.h	2005-01-10 20:11:22 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,128 +0,0 @@
-/**
- * \file drm_init.h 
- * Setup/Cleanup for DRM
- *
- * \author Rickard E. (Rik) Faith <faith@valinux.com>
- * \author Gareth Hughes <gareth@valinux.com>
- */
-
-/*
- * Created: Mon Jan  4 08:58:31 1999 by faith@valinux.com
- *
- * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
- * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "drmP.h"
-
-/** Debug flags.  Set by parse_option(). */
-#if 0
-int DRM(flags) = DRM_FLAG_DEBUG;
-#else
-int DRM(flags) = 0;
-#endif
-
-/**
- * Parse a single option.
- *
- * \param s option string.
- *
- * \sa See parse_options() for details.
- */
-static void DRM(parse_option)(char *s)
-{
-	char *c, *r;
-
-	DRM_DEBUG("\"%s\"\n", s);
-	if (!s || !*s) return;
-	for (c = s; *c && *c != ':'; c++); /* find : or \0 */
-	if (*c) r = c + 1; else r = NULL;  /* remember remainder */
-	*c = '\0';			   /* terminate */
-	if (!strcmp(s, "debug")) {
-		DRM(flags) |= DRM_FLAG_DEBUG;
-		DRM_INFO("Debug messages ON\n");
-		return;
-	}
-	DRM_ERROR("\"%s\" is not a valid option\n", s);
-	return;
-}
-
-/**
- * Parse the insmod "drm_opts=" options, or the command-line
- * options passed to the kernel via LILO.  
- *
- * \param s contains option_list without the 'drm_opts=' part.
- *
- * The grammar of the format is as
- * follows:
- *
- * \code
- * drm		::= 'drm_opts=' option_list
- * option_list	::= option [ ';' option_list ]
- * option	::= 'device:' major
- *		|   'debug'
- *		|   'noctx'
- * major	::= INTEGER
- * \endcode
- *
- * - device=major,minor specifies the device number used for /dev/drm
- *   - if major == 0 then the misc device is used
- *   - if major == 0 and minor == 0 then dynamic misc allocation is used
- * - debug=on specifies that debugging messages will be printk'd
- * - debug=trace specifies that each function call will be logged via printk
- * - debug=off turns off all debugging options
- *
- * \todo Actually only the \e presence of the 'debug' option is currently
- * checked.
- */
-
-void DRM(parse_options)(char *s)
-{
-	char *h, *t, *n;
-
-	DRM_DEBUG("\"%s\"\n", s ?: "");
-	if (!s || !*s) return;
-
-	for (h = t = n = s; h && *h; h = n) {
-		for (; *t && *t != ';'; t++);	       /* find ; or \0 */
-		if (*t) n = t + 1; else n = NULL;      /* remember next */
-		*t = '\0';			       /* terminate */
-		DRM(parse_option)(h);		       /* parse */
-	}
-}
-
-/**
- * Check whether DRI will run on this CPU.
- *
- * \return non-zero if the DRI will run on this CPU, or zero otherwise.
- */
-int DRM(cpu_valid)(void)
-{
-#if defined(__i386__)
-	if (boot_cpu_data.x86 == 3) return 0; /* No cmpxchg on a 386 */
-#endif
-#if defined(__sparc__) && !defined(__sparc_v9__)
-	return 0; /* No cmpxchg before v9 sparc. */
-#endif
-	return 1;
-}
diff -Nru a/drivers/char/drm/drm_ioctl.c b/drivers/char/drm/drm_ioctl.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/char/drm/drm_ioctl.c	2005-01-10 20:11:17 -08:00
@@ -0,0 +1,355 @@
+/**
+ * \file drm_ioctl.h 
+ * IOCTL processing for DRM
+ *
+ * \author Rickard E. (Rik) Faith <faith@valinux.com>
+ * \author Gareth Hughes <gareth@valinux.com>
+ */
+
+/*
+ * Created: Fri Jan  8 09:01:26 1999 by faith@valinux.com
+ *
+ * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "drmP.h"
+#include "drm_core.h"
+
+#include "linux/pci.h"
+
+/**
+ * Get the bus id.
+ * 
+ * \param inode device inode.
+ * \param filp file pointer.
+ * \param cmd command.
+ * \param arg user argument, pointing to a drm_unique structure.
+ * \return zero on success or a negative number on failure.
+ *
+ * Copies the bus id from drm_device::unique into user space.
+ */
+int drm_getunique(struct inode *inode, struct file *filp,
+		   unsigned int cmd, unsigned long arg)
+{
+	drm_file_t	 *priv	 = filp->private_data;
+	drm_device_t	 *dev	 = priv->dev;
+	drm_unique_t	 __user *argp = (void __user *)arg;
+	drm_unique_t	 u;
+
+	if (copy_from_user(&u, argp, sizeof(u)))
+		return -EFAULT;
+	if (u.unique_len >= dev->unique_len) {
+		if (copy_to_user(u.unique, dev->unique, dev->unique_len))
+			return -EFAULT;
+	}
+	u.unique_len = dev->unique_len;
+	if (copy_to_user(argp, &u, sizeof(u)))
+		return -EFAULT;
+	return 0;
+}
+
+/**
+ * Set the bus id.
+ * 
+ * \param inode device inode.
+ * \param filp file pointer.
+ * \param cmd command.
+ * \param arg user argument, pointing to a drm_unique structure.
+ * \return zero on success or a negative number on failure.
+ *
+ * Copies the bus id from userspace into drm_device::unique, and verifies that
+ * it matches the device this DRM is attached to (EINVAL otherwise).  Deprecated
+ * in interface version 1.1 and will return EBUSY when setversion has requested
+ * version 1.1 or greater.
+ */
+int drm_setunique(struct inode *inode, struct file *filp,
+		   unsigned int cmd, unsigned long arg)
+{
+	drm_file_t	 *priv	 = filp->private_data;
+	drm_device_t	 *dev	 = priv->dev;
+	drm_unique_t	 u;
+	int		 domain, bus, slot, func, ret;
+
+	if (dev->unique_len || dev->unique) return -EBUSY;
+
+	if (copy_from_user(&u, (drm_unique_t __user *)arg, sizeof(u)))
+		return -EFAULT;
+
+	if (!u.unique_len || u.unique_len > 1024) return -EINVAL;
+
+	dev->unique_len = u.unique_len;
+	dev->unique	= drm_alloc(u.unique_len + 1, DRM_MEM_DRIVER);
+	if(!dev->unique) return -ENOMEM;
+	if (copy_from_user(dev->unique, u.unique, dev->unique_len))
+		return -EFAULT;
+
+	dev->unique[dev->unique_len] = '\0';
+
+	dev->devname = drm_alloc(strlen(dev->driver->pci_driver.name) + strlen(dev->unique) + 2,
+				  DRM_MEM_DRIVER);
+	if (!dev->devname)
+		return -ENOMEM;
+
+	sprintf(dev->devname, "%s@%s", dev->driver->pci_driver.name, dev->unique);
+
+	/* Return error if the busid submitted doesn't match the device's actual
+	 * busid.
+	 */
+	ret = sscanf(dev->unique, "PCI:%d:%d:%d", &bus, &slot, &func);
+	if (ret != 3)
+		return DRM_ERR(EINVAL);
+	domain = bus >> 8;
+	bus &= 0xff;
+	
+	if ((domain != dev->pci_domain) ||
+	    (bus != dev->pci_bus) ||
+	    (slot != dev->pci_slot) ||
+	    (func != dev->pci_func))
+		return -EINVAL;
+
+	return 0;
+}
+
+static int
+drm_set_busid(drm_device_t *dev)
+{
+	if (dev->unique != NULL)
+		return EBUSY;
+
+	dev->unique_len = 20;
+	dev->unique = drm_alloc(dev->unique_len + 1, DRM_MEM_DRIVER);
+	if (dev->unique == NULL)
+		return ENOMEM;
+
+	snprintf(dev->unique, dev->unique_len, "pci:%04x:%02x:%02x.%d",
+		dev->pci_domain, dev->pci_bus, dev->pci_slot, dev->pci_func);
+
+	dev->devname = drm_alloc(strlen(dev->driver->pci_driver.name) + dev->unique_len + 2,
+				DRM_MEM_DRIVER);
+	if (dev->devname == NULL)
+		return ENOMEM;
+
+	sprintf(dev->devname, "%s@%s", dev->driver->pci_driver.name, dev->unique);
+
+	return 0;
+}
+
+
+/**
+ * Get a mapping information.
+ *
+ * \param inode device inode.
+ * \param filp file pointer.
+ * \param cmd command.
+ * \param arg user argument, pointing to a drm_map structure.
+ * 
+ * \return zero on success or a negative number on failure.
+ *
+ * Searches for the mapping with the specified offset and copies its information
+ * into userspace
+ */
+int drm_getmap( struct inode *inode, struct file *filp,
+		 unsigned int cmd, unsigned long arg )
+{
+	drm_file_t   *priv = filp->private_data;
+	drm_device_t *dev  = priv->dev;
+	drm_map_t    __user *argp = (void __user *)arg;
+	drm_map_t    map;
+	drm_map_list_t *r_list = NULL;
+	struct list_head *list;
+	int          idx;
+	int	     i;
+
+	if (copy_from_user(&map, argp, sizeof(map)))
+		return -EFAULT;
+	idx = map.offset;
+
+	down(&dev->struct_sem);
+	if (idx < 0) {
+		up(&dev->struct_sem);
+		return -EINVAL;
+	}
+
+	i = 0;
+	list_for_each(list, &dev->maplist->head) {
+		if(i == idx) {
+			r_list = list_entry(list, drm_map_list_t, head);
+			break;
+		}
+		i++;
+	}
+	if(!r_list || !r_list->map) {
+		up(&dev->struct_sem);
+		return -EINVAL;
+	}
+
+	map.offset = r_list->map->offset;
+	map.size   = r_list->map->size;
+	map.type   = r_list->map->type;
+	map.flags  = r_list->map->flags;
+	map.handle = r_list->map->handle;
+	map.mtrr   = r_list->map->mtrr;
+	up(&dev->struct_sem);
+
+	if (copy_to_user(argp, &map, sizeof(map))) return -EFAULT;
+	return 0;
+}
+
+/**
+ * Get client information.
+ *
+ * \param inode device inode.
+ * \param filp file pointer.
+ * \param cmd command.
+ * \param arg user argument, pointing to a drm_client structure.
+ * 
+ * \return zero on success or a negative number on failure.
+ *
+ * Searches for the client with the specified index and copies its information
+ * into userspace
+ */
+int drm_getclient( struct inode *inode, struct file *filp,
+		    unsigned int cmd, unsigned long arg )
+{
+	drm_file_t   *priv = filp->private_data;
+	drm_device_t *dev  = priv->dev;
+	drm_client_t __user *argp = (void __user *)arg;
+	drm_client_t client;
+	drm_file_t   *pt;
+	int          idx;
+	int          i;
+
+	if (copy_from_user(&client, argp, sizeof(client)))
+		return -EFAULT;
+	idx = client.idx;
+	down(&dev->struct_sem);
+	for (i = 0, pt = dev->file_first; i < idx && pt; i++, pt = pt->next)
+		;
+
+	if (!pt) {
+		up(&dev->struct_sem);
+		return -EINVAL;
+	}
+	client.auth  = pt->authenticated;
+	client.pid   = pt->pid;
+	client.uid   = pt->uid;
+	client.magic = pt->magic;
+	client.iocs  = pt->ioctl_count;
+	up(&dev->struct_sem);
+
+	if (copy_to_user((drm_client_t __user *)arg, &client, sizeof(client)))
+		return -EFAULT;
+	return 0;
+}
+
+/** 
+ * Get statistics information. 
+ * 
+ * \param inode device inode.
+ * \param filp file pointer.
+ * \param cmd command.
+ * \param arg user argument, pointing to a drm_stats structure.
+ * 
+ * \return zero on success or a negative number on failure.
+ */
+int drm_getstats( struct inode *inode, struct file *filp,
+		   unsigned int cmd, unsigned long arg )
+{
+	drm_file_t   *priv = filp->private_data;
+	drm_device_t *dev  = priv->dev;
+	drm_stats_t  stats;
+	int          i;
+
+	memset(&stats, 0, sizeof(stats));
+	
+	down(&dev->struct_sem);
+
+	for (i = 0; i < dev->counters; i++) {
+		if (dev->types[i] == _DRM_STAT_LOCK)
+			stats.data[i].value
+				= (dev->lock.hw_lock
+				   ? dev->lock.hw_lock->lock : 0);
+		else 
+			stats.data[i].value = atomic_read(&dev->counts[i]);
+		stats.data[i].type  = dev->types[i];
+	}
+	
+	stats.count = dev->counters;
+
+	up(&dev->struct_sem);
+
+	if (copy_to_user((drm_stats_t __user *)arg, &stats, sizeof(stats)))
+		return -EFAULT;
+	return 0;
+}
+
+int drm_setversion(DRM_IOCTL_ARGS)
+{
+	DRM_DEVICE;
+	drm_set_version_t sv;
+	drm_set_version_t retv;
+	int if_version;
+	drm_set_version_t __user *argp = (void __user *)data;
+
+	DRM_COPY_FROM_USER_IOCTL(sv, argp, sizeof(sv));
+
+	retv.drm_di_major = DRM_IF_MAJOR;
+	retv.drm_di_minor = DRM_IF_MINOR;
+	retv.drm_dd_major = DRIVER_MAJOR;
+	retv.drm_dd_minor = DRIVER_MINOR;
+
+	DRM_COPY_TO_USER_IOCTL(argp, retv, sizeof(sv));
+
+	if (sv.drm_di_major != -1) {
+		if (sv.drm_di_major != DRM_IF_MAJOR ||
+		    sv.drm_di_minor < 0 || sv.drm_di_minor > DRM_IF_MINOR)
+			return EINVAL;
+		if_version = DRM_IF_VERSION(sv.drm_di_major, sv.drm_dd_minor);
+		dev->if_version = DRM_MAX(if_version, dev->if_version);
+		if (sv.drm_di_minor >= 1) {
+			/*
+			 * Version 1.1 includes tying of DRM to specific device
+			 */
+			drm_set_busid(dev);
+		}
+	}
+
+	if (sv.drm_dd_major != -1) {
+		if (sv.drm_dd_major != DRIVER_MAJOR ||
+		    sv.drm_dd_minor < 0 || sv.drm_dd_minor > DRIVER_MINOR)
+			return EINVAL;
+
+		if (dev->driver->set_version)
+			dev->driver->set_version(dev, &sv);
+	}
+	return 0;
+}
+
+/** No-op ioctl. */
+int drm_noop(struct inode *inode, struct file *filp, unsigned int cmd,
+	       unsigned long arg)
+{
+	DRM_DEBUG("\n");
+	return 0;
+}
diff -Nru a/drivers/char/drm/drm_ioctl.h b/drivers/char/drm/drm_ioctl.h
--- a/drivers/char/drm/drm_ioctl.h	2005-01-10 20:11:17 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,349 +0,0 @@
-/**
- * \file drm_ioctl.h 
- * IOCTL processing for DRM
- *
- * \author Rickard E. (Rik) Faith <faith@valinux.com>
- * \author Gareth Hughes <gareth@valinux.com>
- */
-
-/*
- * Created: Fri Jan  8 09:01:26 1999 by faith@valinux.com
- *
- * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
- * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "drmP.h"
-
-#include "linux/pci.h"
-
-/**
- * Get the bus id.
- * 
- * \param inode device inode.
- * \param filp file pointer.
- * \param cmd command.
- * \param arg user argument, pointing to a drm_unique structure.
- * \return zero on success or a negative number on failure.
- *
- * Copies the bus id from drm_device::unique into user space.
- */
-int DRM(getunique)(struct inode *inode, struct file *filp,
-		   unsigned int cmd, unsigned long arg)
-{
-	drm_file_t	 *priv	 = filp->private_data;
-	drm_device_t	 *dev	 = priv->dev;
-	drm_unique_t	 __user *argp = (void __user *)arg;
-	drm_unique_t	 u;
-
-	if (copy_from_user(&u, argp, sizeof(u)))
-		return -EFAULT;
-	if (u.unique_len >= dev->unique_len) {
-		if (copy_to_user(u.unique, dev->unique, dev->unique_len))
-			return -EFAULT;
-	}
-	u.unique_len = dev->unique_len;
-	if (copy_to_user(argp, &u, sizeof(u)))
-		return -EFAULT;
-	return 0;
-}
-
-/**
- * Set the bus id.
- * 
- * \param inode device inode.
- * \param filp file pointer.
- * \param cmd command.
- * \param arg user argument, pointing to a drm_unique structure.
- * \return zero on success or a negative number on failure.
- *
- * Copies the bus id from userspace into drm_device::unique, and verifies that
- * it matches the device this DRM is attached to (EINVAL otherwise).  Deprecated
- * in interface version 1.1 and will return EBUSY when setversion has requested
- * version 1.1 or greater.
- */
-int DRM(setunique)(struct inode *inode, struct file *filp,
-		   unsigned int cmd, unsigned long arg)
-{
-	drm_file_t	 *priv	 = filp->private_data;
-	drm_device_t	 *dev	 = priv->dev;
-	drm_unique_t	 u;
-	int		 domain, bus, slot, func, ret;
-
-	if (dev->unique_len || dev->unique) return -EBUSY;
-
-	if (copy_from_user(&u, (drm_unique_t __user *)arg, sizeof(u)))
-		return -EFAULT;
-
-	if (!u.unique_len || u.unique_len > 1024) return -EINVAL;
-
-	dev->unique_len = u.unique_len;
-	dev->unique	= DRM(alloc)(u.unique_len + 1, DRM_MEM_DRIVER);
-	if(!dev->unique) return -ENOMEM;
-	if (copy_from_user(dev->unique, u.unique, dev->unique_len))
-		return -EFAULT;
-
-	dev->unique[dev->unique_len] = '\0';
-
-	dev->devname = DRM(alloc)(strlen(dev->name) + strlen(dev->unique) + 2,
-				  DRM_MEM_DRIVER);
-	if (!dev->devname)
-		return -ENOMEM;
-
-	sprintf(dev->devname, "%s@%s", dev->name, dev->unique);
-
-	/* Return error if the busid submitted doesn't match the device's actual
-	 * busid.
-	 */
-	ret = sscanf(dev->unique, "PCI:%d:%d:%d", &bus, &slot, &func);
-	if (ret != 3)
-		return DRM_ERR(EINVAL);
-	domain = bus >> 8;
-	bus &= 0xff;
-	
-	if ((domain != dev->pci_domain) ||
-	    (bus != dev->pci_bus) ||
-	    (slot != dev->pci_slot) ||
-	    (func != dev->pci_func))
-		return -EINVAL;
-
-	return 0;
-}
-
-static int
-DRM(set_busid)(drm_device_t *dev)
-{
-	if (dev->unique != NULL)
-		return EBUSY;
-
-	dev->unique_len = 20;
-	dev->unique = DRM(alloc)(dev->unique_len + 1, DRM_MEM_DRIVER);
-	if (dev->unique == NULL)
-		return ENOMEM;
-
-	snprintf(dev->unique, dev->unique_len, "pci:%04x:%02x:%02x.%d",
-		dev->pci_domain, dev->pci_bus, dev->pci_slot, dev->pci_func);
-
-	dev->devname = DRM(alloc)(strlen(dev->name) + dev->unique_len + 2,
-				DRM_MEM_DRIVER);
-	if (dev->devname == NULL)
-		return ENOMEM;
-
-	sprintf(dev->devname, "%s@%s", dev->name, dev->unique);
-
-	return 0;
-}
-
-
-/**
- * Get a mapping information.
- *
- * \param inode device inode.
- * \param filp file pointer.
- * \param cmd command.
- * \param arg user argument, pointing to a drm_map structure.
- * 
- * \return zero on success or a negative number on failure.
- *
- * Searches for the mapping with the specified offset and copies its information
- * into userspace
- */
-int DRM(getmap)( struct inode *inode, struct file *filp,
-		 unsigned int cmd, unsigned long arg )
-{
-	drm_file_t   *priv = filp->private_data;
-	drm_device_t *dev  = priv->dev;
-	drm_map_t    __user *argp = (void __user *)arg;
-	drm_map_t    map;
-	drm_map_list_t *r_list = NULL;
-	struct list_head *list;
-	int          idx;
-	int	     i;
-
-	if (copy_from_user(&map, argp, sizeof(map)))
-		return -EFAULT;
-	idx = map.offset;
-
-	down(&dev->struct_sem);
-	if (idx < 0) {
-		up(&dev->struct_sem);
-		return -EINVAL;
-	}
-
-	i = 0;
-	list_for_each(list, &dev->maplist->head) {
-		if(i == idx) {
-			r_list = list_entry(list, drm_map_list_t, head);
-			break;
-		}
-		i++;
-	}
-	if(!r_list || !r_list->map) {
-		up(&dev->struct_sem);
-		return -EINVAL;
-	}
-
-	map.offset = r_list->map->offset;
-	map.size   = r_list->map->size;
-	map.type   = r_list->map->type;
-	map.flags  = r_list->map->flags;
-	map.handle = r_list->map->handle;
-	map.mtrr   = r_list->map->mtrr;
-	up(&dev->struct_sem);
-
-	if (copy_to_user(argp, &map, sizeof(map))) return -EFAULT;
-	return 0;
-}
-
-/**
- * Get client information.
- *
- * \param inode device inode.
- * \param filp file pointer.
- * \param cmd command.
- * \param arg user argument, pointing to a drm_client structure.
- * 
- * \return zero on success or a negative number on failure.
- *
- * Searches for the client with the specified index and copies its information
- * into userspace
- */
-int DRM(getclient)( struct inode *inode, struct file *filp,
-		    unsigned int cmd, unsigned long arg )
-{
-	drm_file_t   *priv = filp->private_data;
-	drm_device_t *dev  = priv->dev;
-	drm_client_t __user *argp = (void __user *)arg;
-	drm_client_t client;
-	drm_file_t   *pt;
-	int          idx;
-	int          i;
-
-	if (copy_from_user(&client, argp, sizeof(client)))
-		return -EFAULT;
-	idx = client.idx;
-	down(&dev->struct_sem);
-	for (i = 0, pt = dev->file_first; i < idx && pt; i++, pt = pt->next)
-		;
-
-	if (!pt) {
-		up(&dev->struct_sem);
-		return -EINVAL;
-	}
-	client.auth  = pt->authenticated;
-	client.pid   = pt->pid;
-	client.uid   = pt->uid;
-	client.magic = pt->magic;
-	client.iocs  = pt->ioctl_count;
-	up(&dev->struct_sem);
-
-	if (copy_to_user((drm_client_t __user *)arg, &client, sizeof(client)))
-		return -EFAULT;
-	return 0;
-}
-
-/** 
- * Get statistics information. 
- * 
- * \param inode device inode.
- * \param filp file pointer.
- * \param cmd command.
- * \param arg user argument, pointing to a drm_stats structure.
- * 
- * \return zero on success or a negative number on failure.
- */
-int DRM(getstats)( struct inode *inode, struct file *filp,
-		   unsigned int cmd, unsigned long arg )
-{
-	drm_file_t   *priv = filp->private_data;
-	drm_device_t *dev  = priv->dev;
-	drm_stats_t  stats;
-	int          i;
-
-	memset(&stats, 0, sizeof(stats));
-	
-	down(&dev->struct_sem);
-
-	for (i = 0; i < dev->counters; i++) {
-		if (dev->types[i] == _DRM_STAT_LOCK)
-			stats.data[i].value
-				= (dev->lock.hw_lock
-				   ? dev->lock.hw_lock->lock : 0);
-		else 
-			stats.data[i].value = atomic_read(&dev->counts[i]);
-		stats.data[i].type  = dev->types[i];
-	}
-	
-	stats.count = dev->counters;
-
-	up(&dev->struct_sem);
-
-	if (copy_to_user((drm_stats_t __user *)arg, &stats, sizeof(stats)))
-		return -EFAULT;
-	return 0;
-}
-
-#define DRM_IF_MAJOR	1
-#define DRM_IF_MINOR	2
-
-int DRM(setversion)(DRM_IOCTL_ARGS)
-{
-	DRM_DEVICE;
-	drm_set_version_t sv;
-	drm_set_version_t retv;
-	int if_version;
-	drm_set_version_t __user *argp = (void __user *)data;
-
-	DRM_COPY_FROM_USER_IOCTL(sv, argp, sizeof(sv));
-
-	retv.drm_di_major = DRM_IF_MAJOR;
-	retv.drm_di_minor = DRM_IF_MINOR;
-	retv.drm_dd_major = DRIVER_MAJOR;
-	retv.drm_dd_minor = DRIVER_MINOR;
-
-	DRM_COPY_TO_USER_IOCTL(argp, retv, sizeof(sv));
-
-	if (sv.drm_di_major != -1) {
-		if (sv.drm_di_major != DRM_IF_MAJOR ||
-		    sv.drm_di_minor < 0 || sv.drm_di_minor > DRM_IF_MINOR)
-			return EINVAL;
-		if_version = DRM_IF_VERSION(sv.drm_di_major, sv.drm_dd_minor);
-		dev->if_version = DRM_MAX(if_version, dev->if_version);
-		if (sv.drm_di_minor >= 1) {
-			/*
-			 * Version 1.1 includes tying of DRM to specific device
-			 */
-			DRM(set_busid)(dev);
-		}
-	}
-
-	if (sv.drm_dd_major != -1) {
-		if (sv.drm_dd_major != DRIVER_MAJOR ||
-		    sv.drm_dd_minor < 0 || sv.drm_dd_minor > DRIVER_MINOR)
-			return EINVAL;
-
-		if (dev->fn_tbl.set_version)
-			dev->fn_tbl.set_version(dev, &sv);
-	}
-	return 0;
-}
diff -Nru a/drivers/char/drm/drm_irq.c b/drivers/char/drm/drm_irq.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/char/drm/drm_irq.c	2005-01-10 20:11:20 -08:00
@@ -0,0 +1,370 @@
+/**
+ * \file drm_irq.h 
+ * IRQ support
+ *
+ * \author Rickard E. (Rik) Faith <faith@valinux.com>
+ * \author Gareth Hughes <gareth@valinux.com>
+ */
+
+/*
+ * Created: Fri Mar 19 14:30:16 1999 by faith@valinux.com
+ *
+ * Copyright 1999, 2000 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "drmP.h"
+
+#include <linux/interrupt.h>	/* For task queue support */
+
+/**
+ * Get interrupt from bus id.
+ * 
+ * \param inode device inode.
+ * \param filp file pointer.
+ * \param cmd command.
+ * \param arg user argument, pointing to a drm_irq_busid structure.
+ * \return zero on success or a negative number on failure.
+ * 
+ * Finds the PCI device with the specified bus id and gets its IRQ number.
+ * This IOCTL is deprecated, and will now return EINVAL for any busid not equal
+ * to that of the device that this DRM instance attached to.
+ */
+int drm_irq_by_busid(struct inode *inode, struct file *filp,
+		   unsigned int cmd, unsigned long arg)
+{
+	drm_file_t *priv = filp->private_data;
+	drm_device_t *dev = priv->dev;
+	drm_irq_busid_t __user *argp = (void __user *)arg;
+	drm_irq_busid_t p;
+
+	if (!drm_core_check_feature(dev, DRIVER_HAVE_IRQ))
+		return -EINVAL;
+
+	if (copy_from_user(&p, argp, sizeof(p)))
+		return -EFAULT;
+
+	if ((p.busnum >> 8) != dev->pci_domain ||
+	    (p.busnum & 0xff) != dev->pci_bus ||
+	    p.devnum != dev->pci_slot ||
+	    p.funcnum != dev->pci_func)
+		return -EINVAL;
+
+	p.irq = dev->irq;
+
+	DRM_DEBUG("%d:%d:%d => IRQ %d\n",
+		  p.busnum, p.devnum, p.funcnum, p.irq);
+	if (copy_to_user(argp, &p, sizeof(p)))
+		return -EFAULT;
+	return 0;
+}
+
+/**
+ * Install IRQ handler.
+ *
+ * \param dev DRM device.
+ * \param irq IRQ number.
+ *
+ * Initializes the IRQ related data, and setups drm_device::vbl_queue. Installs the handler, calling the driver
+ * \c drm_driver_irq_preinstall() and \c drm_driver_irq_postinstall() functions
+ * before and after the installation.
+ */
+int drm_irq_install( drm_device_t *dev )
+{
+	int ret;
+	unsigned long sh_flags=0;
+
+	if (!drm_core_check_feature(dev, DRIVER_HAVE_IRQ))
+		return -EINVAL;
+
+	if ( dev->irq == 0 )
+		return -EINVAL;
+
+	down( &dev->struct_sem );
+
+	/* Driver must have been initialized */
+	if ( !dev->dev_private ) {
+		up( &dev->struct_sem );
+		return -EINVAL;
+	}
+
+	if ( dev->irq_enabled ) {
+		up( &dev->struct_sem );
+		return -EBUSY;
+	}
+	dev->irq_enabled = 1;
+	up( &dev->struct_sem );
+
+	DRM_DEBUG( "%s: irq=%d\n", __FUNCTION__, dev->irq );
+
+	if (drm_core_check_feature(dev, DRIVER_IRQ_VBL)) {
+		init_waitqueue_head(&dev->vbl_queue);
+		
+		spin_lock_init( &dev->vbl_lock );
+		
+		INIT_LIST_HEAD( &dev->vbl_sigs.head );
+		
+		dev->vbl_pending = 0;
+	}
+
+				/* Before installing handler */
+	dev->driver->irq_preinstall(dev);
+
+				/* Install handler */
+	if (drm_core_check_feature(dev, DRIVER_IRQ_SHARED))
+		sh_flags = SA_SHIRQ;
+	
+	ret = request_irq( dev->irq, dev->driver->irq_handler,
+			   sh_flags, dev->devname, dev );
+	if ( ret < 0 ) {
+		down( &dev->struct_sem );
+		dev->irq_enabled = 0;
+		up( &dev->struct_sem );
+		return ret;
+	}
+
+				/* After installing handler */
+	dev->driver->irq_postinstall(dev);
+
+	return 0;
+}
+
+/**
+ * Uninstall the IRQ handler.
+ *
+ * \param dev DRM device.
+ *
+ * Calls the driver's \c drm_driver_irq_uninstall() function, and stops the irq.
+ */
+int drm_irq_uninstall( drm_device_t *dev )
+{
+	int irq_enabled;
+
+	if (!drm_core_check_feature(dev, DRIVER_HAVE_IRQ))
+		return -EINVAL;
+
+	down( &dev->struct_sem );
+	irq_enabled = dev->irq_enabled;
+	dev->irq_enabled = 0;
+	up( &dev->struct_sem );
+
+	if ( !irq_enabled )
+		return -EINVAL;
+
+	DRM_DEBUG( "%s: irq=%d\n", __FUNCTION__, dev->irq );
+
+	dev->driver->irq_uninstall(dev);
+
+	free_irq( dev->irq, dev );
+
+	return 0;
+}
+EXPORT_SYMBOL(drm_irq_uninstall);
+
+/**
+ * IRQ control ioctl.
+ *
+ * \param inode device inode.
+ * \param filp file pointer.
+ * \param cmd command.
+ * \param arg user argument, pointing to a drm_control structure.
+ * \return zero on success or a negative number on failure.
+ *
+ * Calls irq_install() or irq_uninstall() according to \p arg.
+ */
+int drm_control( struct inode *inode, struct file *filp,
+		  unsigned int cmd, unsigned long arg )
+{
+	drm_file_t *priv = filp->private_data;
+	drm_device_t *dev = priv->dev;
+	drm_control_t ctl;
+	
+	/* if we haven't irq we fallback for compatibility reasons - this used to be a separate function in drm_dma.h */
+
+	if ( copy_from_user( &ctl, (drm_control_t __user *)arg, sizeof(ctl) ) )
+		return -EFAULT;
+
+	switch ( ctl.func ) {
+	case DRM_INST_HANDLER:
+		if (!drm_core_check_feature(dev, DRIVER_HAVE_IRQ))
+			return 0;
+		if (dev->if_version < DRM_IF_VERSION(1, 2) &&
+		    ctl.irq != dev->irq)
+			return -EINVAL;
+		return drm_irq_install( dev );
+	case DRM_UNINST_HANDLER:
+		if (!drm_core_check_feature(dev, DRIVER_HAVE_IRQ))
+			return 0;
+		return drm_irq_uninstall( dev );
+	default:
+		return -EINVAL;
+	}
+}
+
+/**
+ * Wait for VBLANK.
+ *
+ * \param inode device inode.
+ * \param filp file pointer.
+ * \param cmd command.
+ * \param data user argument, pointing to a drm_wait_vblank structure.
+ * \return zero on success or a negative number on failure.
+ *
+ * Verifies the IRQ is installed. 
+ *
+ * If a signal is requested checks if this task has already scheduled the same signal
+ * for the same vblank sequence number - nothing to be done in
+ * that case. If the number of tasks waiting for the interrupt exceeds 100 the
+ * function fails. Otherwise adds a new entry to drm_device::vbl_sigs for this
+ * task.
+ *
+ * If a signal is not requested, then calls vblank_wait().
+ */
+int drm_wait_vblank( DRM_IOCTL_ARGS )
+{
+	drm_file_t *priv = filp->private_data;
+	drm_device_t *dev = priv->dev;
+	drm_wait_vblank_t __user *argp = (void __user *)data;
+	drm_wait_vblank_t vblwait;
+	struct timeval now;
+	int ret = 0;
+	unsigned int flags;
+
+	if (!drm_core_check_feature(dev, DRIVER_IRQ_VBL))
+		return -EINVAL;
+
+	if (!dev->irq)
+		return -EINVAL;
+
+	DRM_COPY_FROM_USER_IOCTL( vblwait, argp, sizeof(vblwait) );
+
+	switch ( vblwait.request.type & ~_DRM_VBLANK_FLAGS_MASK ) {
+	case _DRM_VBLANK_RELATIVE:
+		vblwait.request.sequence += atomic_read( &dev->vbl_received );
+		vblwait.request.type &= ~_DRM_VBLANK_RELATIVE;
+	case _DRM_VBLANK_ABSOLUTE:
+		break;
+	default:
+		return -EINVAL;
+	}
+
+	flags = vblwait.request.type & _DRM_VBLANK_FLAGS_MASK;
+	
+	if ( flags & _DRM_VBLANK_SIGNAL ) {
+		unsigned long irqflags;
+		drm_vbl_sig_t *vbl_sig;
+		
+		vblwait.reply.sequence = atomic_read( &dev->vbl_received );
+
+		spin_lock_irqsave( &dev->vbl_lock, irqflags );
+
+		/* Check if this task has already scheduled the same signal
+		 * for the same vblank sequence number; nothing to be done in
+		 * that case
+		 */
+		list_for_each_entry( vbl_sig, &dev->vbl_sigs.head, head ) {
+			if (vbl_sig->sequence == vblwait.request.sequence
+			    && vbl_sig->info.si_signo == vblwait.request.signal
+			    && vbl_sig->task == current)
+			{
+				spin_unlock_irqrestore( &dev->vbl_lock, irqflags );
+				goto done;
+			}
+		}
+
+		if ( dev->vbl_pending >= 100 ) {
+			spin_unlock_irqrestore( &dev->vbl_lock, irqflags );
+			return -EBUSY;
+		}
+
+		dev->vbl_pending++;
+
+		spin_unlock_irqrestore( &dev->vbl_lock, irqflags );
+
+		if ( !( vbl_sig = drm_alloc( sizeof( drm_vbl_sig_t ), DRM_MEM_DRIVER ) ) ) {
+			return -ENOMEM;
+		}
+
+		memset( (void *)vbl_sig, 0, sizeof(*vbl_sig) );
+
+		vbl_sig->sequence = vblwait.request.sequence;
+		vbl_sig->info.si_signo = vblwait.request.signal;
+		vbl_sig->task = current;
+
+		spin_lock_irqsave( &dev->vbl_lock, irqflags );
+
+		list_add_tail( (struct list_head *) vbl_sig, &dev->vbl_sigs.head );
+
+		spin_unlock_irqrestore( &dev->vbl_lock, irqflags );
+	} else {
+		if (dev->driver->vblank_wait)
+			ret = dev->driver->vblank_wait( dev, &vblwait.request.sequence );
+
+		do_gettimeofday( &now );
+		vblwait.reply.tval_sec = now.tv_sec;
+		vblwait.reply.tval_usec = now.tv_usec;
+	}
+
+done:
+	DRM_COPY_TO_USER_IOCTL( argp, vblwait, sizeof(vblwait) );
+
+	return ret;
+}
+
+/**
+ * Send the VBLANK signals.
+ *
+ * \param dev DRM device.
+ *
+ * Sends a signal for each task in drm_device::vbl_sigs and empties the list.
+ *
+ * If a signal is not requested, then calls vblank_wait().
+ */
+void drm_vbl_send_signals( drm_device_t *dev )
+{
+	struct list_head *list, *tmp;
+	drm_vbl_sig_t *vbl_sig;
+	unsigned int vbl_seq = atomic_read( &dev->vbl_received );
+	unsigned long flags;
+
+	spin_lock_irqsave( &dev->vbl_lock, flags );
+
+	list_for_each_safe( list, tmp, &dev->vbl_sigs.head ) {
+		vbl_sig = list_entry( list, drm_vbl_sig_t, head );
+		if ( ( vbl_seq - vbl_sig->sequence ) <= (1<<23) ) {
+			vbl_sig->info.si_code = vbl_seq;
+			send_sig_info( vbl_sig->info.si_signo, &vbl_sig->info, vbl_sig->task );
+
+			list_del( list );
+
+			drm_free( vbl_sig, sizeof(*vbl_sig), DRM_MEM_DRIVER );
+
+			dev->vbl_pending--;
+		}
+	}
+
+	spin_unlock_irqrestore( &dev->vbl_lock, flags );
+}
+EXPORT_SYMBOL(drm_vbl_send_signals);
+
+
diff -Nru a/drivers/char/drm/drm_irq.h b/drivers/char/drm/drm_irq.h
--- a/drivers/char/drm/drm_irq.h	2005-01-10 20:11:20 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,368 +0,0 @@
-/**
- * \file drm_irq.h 
- * IRQ support
- *
- * \author Rickard E. (Rik) Faith <faith@valinux.com>
- * \author Gareth Hughes <gareth@valinux.com>
- */
-
-/*
- * Created: Fri Mar 19 14:30:16 1999 by faith@valinux.com
- *
- * Copyright 1999, 2000 Precision Insight, Inc., Cedar Park, Texas.
- * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "drmP.h"
-
-#include <linux/interrupt.h>	/* For task queue support */
-
-/**
- * Get interrupt from bus id.
- * 
- * \param inode device inode.
- * \param filp file pointer.
- * \param cmd command.
- * \param arg user argument, pointing to a drm_irq_busid structure.
- * \return zero on success or a negative number on failure.
- * 
- * Finds the PCI device with the specified bus id and gets its IRQ number.
- * This IOCTL is deprecated, and will now return EINVAL for any busid not equal
- * to that of the device that this DRM instance attached to.
- */
-int DRM(irq_by_busid)(struct inode *inode, struct file *filp,
-		   unsigned int cmd, unsigned long arg)
-{
-	drm_file_t *priv = filp->private_data;
-	drm_device_t *dev = priv->dev;
-	drm_irq_busid_t __user *argp = (void __user *)arg;
-	drm_irq_busid_t p;
-
-	if (!drm_core_check_feature(dev, DRIVER_HAVE_IRQ))
-		return -EINVAL;
-
-	if (copy_from_user(&p, argp, sizeof(p)))
-		return -EFAULT;
-
-	if ((p.busnum >> 8) != dev->pci_domain ||
-	    (p.busnum & 0xff) != dev->pci_bus ||
-	    p.devnum != dev->pci_slot ||
-	    p.funcnum != dev->pci_func)
-		return -EINVAL;
-
-	p.irq = dev->irq;
-
-	DRM_DEBUG("%d:%d:%d => IRQ %d\n",
-		  p.busnum, p.devnum, p.funcnum, p.irq);
-	if (copy_to_user(argp, &p, sizeof(p)))
-		return -EFAULT;
-	return 0;
-}
-
-/**
- * Install IRQ handler.
- *
- * \param dev DRM device.
- * \param irq IRQ number.
- *
- * Initializes the IRQ related data, and setups drm_device::vbl_queue. Installs the handler, calling the driver
- * \c DRM(driver_irq_preinstall)() and \c DRM(driver_irq_postinstall)() functions
- * before and after the installation.
- */
-int DRM(irq_install)( drm_device_t *dev )
-{
-	int ret;
-	unsigned long sh_flags=0;
-
-	if (!drm_core_check_feature(dev, DRIVER_HAVE_IRQ))
-		return -EINVAL;
-
-	if ( dev->irq == 0 )
-		return -EINVAL;
-
-	down( &dev->struct_sem );
-
-	/* Driver must have been initialized */
-	if ( !dev->dev_private ) {
-		up( &dev->struct_sem );
-		return -EINVAL;
-	}
-
-	if ( dev->irq_enabled ) {
-		up( &dev->struct_sem );
-		return -EBUSY;
-	}
-	dev->irq_enabled = 1;
-	up( &dev->struct_sem );
-
-	DRM_DEBUG( "%s: irq=%d\n", __FUNCTION__, dev->irq );
-
-	if (drm_core_check_feature(dev, DRIVER_IRQ_VBL)) {
-		init_waitqueue_head(&dev->vbl_queue);
-		
-		spin_lock_init( &dev->vbl_lock );
-		
-		INIT_LIST_HEAD( &dev->vbl_sigs.head );
-		
-		dev->vbl_pending = 0;
-	}
-
-				/* Before installing handler */
-	dev->fn_tbl.irq_preinstall(dev);
-
-				/* Install handler */
-	if (drm_core_check_feature(dev, DRIVER_IRQ_SHARED))
-		sh_flags = SA_SHIRQ;
-	
-	ret = request_irq( dev->irq, dev->fn_tbl.irq_handler,
-			   sh_flags, dev->devname, dev );
-	if ( ret < 0 ) {
-		down( &dev->struct_sem );
-		dev->irq_enabled = 0;
-		up( &dev->struct_sem );
-		return ret;
-	}
-
-				/* After installing handler */
-	dev->fn_tbl.irq_postinstall(dev);
-
-	return 0;
-}
-
-/**
- * Uninstall the IRQ handler.
- *
- * \param dev DRM device.
- *
- * Calls the driver's \c DRM(driver_irq_uninstall)() function, and stops the irq.
- */
-int DRM(irq_uninstall)( drm_device_t *dev )
-{
-	int irq_enabled;
-
-	if (!drm_core_check_feature(dev, DRIVER_HAVE_IRQ))
-		return -EINVAL;
-
-	down( &dev->struct_sem );
-	irq_enabled = dev->irq_enabled;
-	dev->irq_enabled = 0;
-	up( &dev->struct_sem );
-
-	if ( !irq_enabled )
-		return -EINVAL;
-
-	DRM_DEBUG( "%s: irq=%d\n", __FUNCTION__, dev->irq );
-
-	dev->fn_tbl.irq_uninstall(dev);
-
-	free_irq( dev->irq, dev );
-
-	return 0;
-}
-
-/**
- * IRQ control ioctl.
- *
- * \param inode device inode.
- * \param filp file pointer.
- * \param cmd command.
- * \param arg user argument, pointing to a drm_control structure.
- * \return zero on success or a negative number on failure.
- *
- * Calls irq_install() or irq_uninstall() according to \p arg.
- */
-int DRM(control)( struct inode *inode, struct file *filp,
-		  unsigned int cmd, unsigned long arg )
-{
-	drm_file_t *priv = filp->private_data;
-	drm_device_t *dev = priv->dev;
-	drm_control_t ctl;
-	
-	/* if we haven't irq we fallback for compatibility reasons - this used to be a separate function in drm_dma.h */
-
-	if ( copy_from_user( &ctl, (drm_control_t __user *)arg, sizeof(ctl) ) )
-		return -EFAULT;
-
-	switch ( ctl.func ) {
-	case DRM_INST_HANDLER:
-		if (!drm_core_check_feature(dev, DRIVER_HAVE_IRQ))
-			return 0;
-		if (dev->if_version < DRM_IF_VERSION(1, 2) &&
-		    ctl.irq != dev->irq)
-			return -EINVAL;
-		return DRM(irq_install)( dev );
-	case DRM_UNINST_HANDLER:
-		if (!drm_core_check_feature(dev, DRIVER_HAVE_IRQ))
-			return 0;
-		return DRM(irq_uninstall)( dev );
-	default:
-		return -EINVAL;
-	}
-}
-
-/**
- * Wait for VBLANK.
- *
- * \param inode device inode.
- * \param filp file pointer.
- * \param cmd command.
- * \param data user argument, pointing to a drm_wait_vblank structure.
- * \return zero on success or a negative number on failure.
- *
- * Verifies the IRQ is installed. 
- *
- * If a signal is requested checks if this task has already scheduled the same signal
- * for the same vblank sequence number - nothing to be done in
- * that case. If the number of tasks waiting for the interrupt exceeds 100 the
- * function fails. Otherwise adds a new entry to drm_device::vbl_sigs for this
- * task.
- *
- * If a signal is not requested, then calls vblank_wait().
- */
-int DRM(wait_vblank)( DRM_IOCTL_ARGS )
-{
-	drm_file_t *priv = filp->private_data;
-	drm_device_t *dev = priv->dev;
-	drm_wait_vblank_t __user *argp = (void __user *)data;
-	drm_wait_vblank_t vblwait;
-	struct timeval now;
-	int ret = 0;
-	unsigned int flags;
-
-	if (!drm_core_check_feature(dev, DRIVER_IRQ_VBL))
-		return -EINVAL;
-
-	if (!dev->irq)
-		return -EINVAL;
-
-	DRM_COPY_FROM_USER_IOCTL( vblwait, argp, sizeof(vblwait) );
-
-	switch ( vblwait.request.type & ~_DRM_VBLANK_FLAGS_MASK ) {
-	case _DRM_VBLANK_RELATIVE:
-		vblwait.request.sequence += atomic_read( &dev->vbl_received );
-		vblwait.request.type &= ~_DRM_VBLANK_RELATIVE;
-	case _DRM_VBLANK_ABSOLUTE:
-		break;
-	default:
-		return -EINVAL;
-	}
-
-	flags = vblwait.request.type & _DRM_VBLANK_FLAGS_MASK;
-	
-	if ( flags & _DRM_VBLANK_SIGNAL ) {
-		unsigned long irqflags;
-		drm_vbl_sig_t *vbl_sig;
-		
-		vblwait.reply.sequence = atomic_read( &dev->vbl_received );
-
-		spin_lock_irqsave( &dev->vbl_lock, irqflags );
-
-		/* Check if this task has already scheduled the same signal
-		 * for the same vblank sequence number; nothing to be done in
-		 * that case
-		 */
-		list_for_each_entry( vbl_sig, &dev->vbl_sigs.head, head ) {
-			if (vbl_sig->sequence == vblwait.request.sequence
-			    && vbl_sig->info.si_signo == vblwait.request.signal
-			    && vbl_sig->task == current)
-			{
-				spin_unlock_irqrestore( &dev->vbl_lock, irqflags );
-				goto done;
-			}
-		}
-
-		if ( dev->vbl_pending >= 100 ) {
-			spin_unlock_irqrestore( &dev->vbl_lock, irqflags );
-			return -EBUSY;
-		}
-
-		dev->vbl_pending++;
-
-		spin_unlock_irqrestore( &dev->vbl_lock, irqflags );
-
-		if ( !( vbl_sig = DRM_MALLOC( sizeof( drm_vbl_sig_t ) ) ) ) {
-			return -ENOMEM;
-		}
-
-		memset( (void *)vbl_sig, 0, sizeof(*vbl_sig) );
-
-		vbl_sig->sequence = vblwait.request.sequence;
-		vbl_sig->info.si_signo = vblwait.request.signal;
-		vbl_sig->task = current;
-
-		spin_lock_irqsave( &dev->vbl_lock, irqflags );
-
-		list_add_tail( (struct list_head *) vbl_sig, &dev->vbl_sigs.head );
-
-		spin_unlock_irqrestore( &dev->vbl_lock, irqflags );
-	} else {
-		if (dev->fn_tbl.vblank_wait)
-			ret = dev->fn_tbl.vblank_wait( dev, &vblwait.request.sequence );
-
-		do_gettimeofday( &now );
-		vblwait.reply.tval_sec = now.tv_sec;
-		vblwait.reply.tval_usec = now.tv_usec;
-	}
-
-done:
-	DRM_COPY_TO_USER_IOCTL( argp, vblwait, sizeof(vblwait) );
-
-	return ret;
-}
-
-/**
- * Send the VBLANK signals.
- *
- * \param dev DRM device.
- *
- * Sends a signal for each task in drm_device::vbl_sigs and empties the list.
- *
- * If a signal is not requested, then calls vblank_wait().
- */
-void DRM(vbl_send_signals)( drm_device_t *dev )
-{
-	struct list_head *list, *tmp;
-	drm_vbl_sig_t *vbl_sig;
-	unsigned int vbl_seq = atomic_read( &dev->vbl_received );
-	unsigned long flags;
-
-	spin_lock_irqsave( &dev->vbl_lock, flags );
-
-	list_for_each_safe( list, tmp, &dev->vbl_sigs.head ) {
-		vbl_sig = list_entry( list, drm_vbl_sig_t, head );
-		if ( ( vbl_seq - vbl_sig->sequence ) <= (1<<23) ) {
-			vbl_sig->info.si_code = vbl_seq;
-			send_sig_info( vbl_sig->info.si_signo, &vbl_sig->info, vbl_sig->task );
-
-			list_del( list );
-
-			DRM_FREE( vbl_sig, sizeof(*vbl_sig) );
-
-			dev->vbl_pending--;
-		}
-	}
-
-	spin_unlock_irqrestore( &dev->vbl_lock, flags );
-}
-
-
diff -Nru a/drivers/char/drm/drm_lock.c b/drivers/char/drm/drm_lock.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/char/drm/drm_lock.c	2005-01-10 20:11:20 -08:00
@@ -0,0 +1,303 @@
+/**
+ * \file drm_lock.h 
+ * IOCTLs for locking
+ * 
+ * \author Rickard E. (Rik) Faith <faith@valinux.com>
+ * \author Gareth Hughes <gareth@valinux.com>
+ */
+
+/*
+ * Created: Tue Feb  2 08:37:54 1999 by faith@valinux.com
+ *
+ * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "drmP.h"
+
+/** 
+ * Lock ioctl.
+ *
+ * \param inode device inode.
+ * \param filp file pointer.
+ * \param cmd command.
+ * \param arg user argument, pointing to a drm_lock structure.
+ * \return zero on success or negative number on failure.
+ *
+ * Add the current task to the lock wait queue, and attempt to take to lock.
+ */
+int drm_lock( struct inode *inode, struct file *filp,
+	       unsigned int cmd, unsigned long arg )
+{
+        drm_file_t *priv = filp->private_data;
+        drm_device_t *dev = priv->dev;
+        DECLARE_WAITQUEUE( entry, current );
+        drm_lock_t lock;
+        int ret = 0;
+
+	++priv->lock_count;
+
+        if ( copy_from_user( &lock, (drm_lock_t __user *)arg, sizeof(lock) ) )
+		return -EFAULT;
+
+        if ( lock.context == DRM_KERNEL_CONTEXT ) {
+                DRM_ERROR( "Process %d using kernel context %d\n",
+			   current->pid, lock.context );
+                return -EINVAL;
+        }
+
+        DRM_DEBUG( "%d (pid %d) requests lock (0x%08x), flags = 0x%08x\n",
+		   lock.context, current->pid,
+		   dev->lock.hw_lock->lock, lock.flags );
+
+	if (drm_core_check_feature(dev, DRIVER_DMA_QUEUE))
+		if ( lock.context < 0 )
+			return -EINVAL;
+
+	add_wait_queue( &dev->lock.lock_queue, &entry );
+	for (;;) {
+		__set_current_state(TASK_INTERRUPTIBLE);
+		if ( !dev->lock.hw_lock ) {
+			/* Device has been unregistered */
+			ret = -EINTR;
+			break;
+		}
+		if ( drm_lock_take( &dev->lock.hw_lock->lock,
+				     lock.context ) ) {
+			dev->lock.filp      = filp;
+			dev->lock.lock_time = jiffies;
+			atomic_inc( &dev->counts[_DRM_STAT_LOCKS] );
+			break;  /* Got lock */
+		}
+		
+		/* Contention */
+		schedule();
+		if ( signal_pending( current ) ) {
+			ret = -ERESTARTSYS;
+			break;
+		}
+	}
+	__set_current_state(TASK_RUNNING);
+	remove_wait_queue( &dev->lock.lock_queue, &entry );
+
+	sigemptyset( &dev->sigmask );
+	sigaddset( &dev->sigmask, SIGSTOP );
+	sigaddset( &dev->sigmask, SIGTSTP );
+	sigaddset( &dev->sigmask, SIGTTIN );
+	sigaddset( &dev->sigmask, SIGTTOU );
+	dev->sigdata.context = lock.context;
+	dev->sigdata.lock    = dev->lock.hw_lock;
+	block_all_signals( drm_notifier,
+			   &dev->sigdata, &dev->sigmask );
+	
+	if (dev->driver->dma_ready && (lock.flags & _DRM_LOCK_READY))
+		dev->driver->dma_ready(dev);
+	
+	if ( dev->driver->dma_quiescent && (lock.flags & _DRM_LOCK_QUIESCENT ))
+		return dev->driver->dma_quiescent(dev);
+	
+	/* dev->driver->kernel_context_switch isn't used by any of the x86 
+	 *  drivers but is used by the Sparc driver.
+	 */
+	
+	if (dev->driver->kernel_context_switch && 
+	    dev->last_context != lock.context) {
+	  dev->driver->kernel_context_switch(dev, dev->last_context, 
+					    lock.context);
+	}
+        DRM_DEBUG( "%d %s\n", lock.context, ret ? "interrupted" : "has lock" );
+
+        return ret;
+}
+
+/** 
+ * Unlock ioctl.
+ *
+ * \param inode device inode.
+ * \param filp file pointer.
+ * \param cmd command.
+ * \param arg user argument, pointing to a drm_lock structure.
+ * \return zero on success or negative number on failure.
+ *
+ * Transfer and free the lock.
+ */
+int drm_unlock( struct inode *inode, struct file *filp,
+		 unsigned int cmd, unsigned long arg )
+{
+	drm_file_t *priv = filp->private_data;
+	drm_device_t *dev = priv->dev;
+	drm_lock_t lock;
+
+	if ( copy_from_user( &lock, (drm_lock_t __user *)arg, sizeof(lock) ) )
+		return -EFAULT;
+
+	if ( lock.context == DRM_KERNEL_CONTEXT ) {
+		DRM_ERROR( "Process %d using kernel context %d\n",
+			   current->pid, lock.context );
+		return -EINVAL;
+	}
+
+	atomic_inc( &dev->counts[_DRM_STAT_UNLOCKS] );
+
+	/* kernel_context_switch isn't used by any of the x86 drm
+	 * modules but is required by the Sparc driver.
+	 */
+	if (dev->driver->kernel_context_switch_unlock)
+		dev->driver->kernel_context_switch_unlock(dev, &lock);
+	else {
+		drm_lock_transfer( dev, &dev->lock.hw_lock->lock, 
+				    DRM_KERNEL_CONTEXT );
+		
+		if ( drm_lock_free( dev, &dev->lock.hw_lock->lock,
+				     DRM_KERNEL_CONTEXT ) ) {
+			DRM_ERROR( "\n" );
+		}
+	}
+
+	unblock_all_signals();
+	return 0;
+}
+
+/**
+ * Take the heavyweight lock.
+ *
+ * \param lock lock pointer.
+ * \param context locking context.
+ * \return one if the lock is held, or zero otherwise.
+ *
+ * Attempt to mark the lock as held by the given context, via the \p cmpxchg instruction.
+ */
+int drm_lock_take(__volatile__ unsigned int *lock, unsigned int context)
+{
+	unsigned int old, new, prev;
+
+	do {
+		old = *lock;
+		if (old & _DRM_LOCK_HELD) new = old | _DRM_LOCK_CONT;
+		else			  new = context | _DRM_LOCK_HELD;
+		prev = cmpxchg(lock, old, new);
+	} while (prev != old);
+	if (_DRM_LOCKING_CONTEXT(old) == context) {
+		if (old & _DRM_LOCK_HELD) {
+			if (context != DRM_KERNEL_CONTEXT) {
+				DRM_ERROR("%d holds heavyweight lock\n",
+					  context);
+			}
+			return 0;
+		}
+	}
+	if (new == (context | _DRM_LOCK_HELD)) {
+				/* Have lock */
+		return 1;
+	}
+	return 0;
+}
+
+/**
+ * This takes a lock forcibly and hands it to context.	Should ONLY be used
+ * inside *_unlock to give lock to kernel before calling *_dma_schedule. 
+ * 
+ * \param dev DRM device.
+ * \param lock lock pointer.
+ * \param context locking context.
+ * \return always one.
+ *
+ * Resets the lock file pointer.
+ * Marks the lock as held by the given context, via the \p cmpxchg instruction.
+ */
+int drm_lock_transfer(drm_device_t *dev,
+		       __volatile__ unsigned int *lock, unsigned int context)
+{
+	unsigned int old, new, prev;
+
+	dev->lock.filp = NULL;
+	do {
+		old  = *lock;
+		new  = context | _DRM_LOCK_HELD;
+		prev = cmpxchg(lock, old, new);
+	} while (prev != old);
+	return 1;
+}
+
+/**
+ * Free lock.
+ * 
+ * \param dev DRM device.
+ * \param lock lock.
+ * \param context context.
+ * 
+ * Resets the lock file pointer.
+ * Marks the lock as not held, via the \p cmpxchg instruction. Wakes any task
+ * waiting on the lock queue.
+ */
+int drm_lock_free(drm_device_t *dev,
+		   __volatile__ unsigned int *lock, unsigned int context)
+{
+	unsigned int old, new, prev;
+
+	dev->lock.filp = NULL;
+	do {
+		old  = *lock;
+		new  = 0;
+		prev = cmpxchg(lock, old, new);
+	} while (prev != old);
+	if (_DRM_LOCK_IS_HELD(old) && _DRM_LOCKING_CONTEXT(old) != context) {
+		DRM_ERROR("%d freed heavyweight lock held by %d\n",
+			  context,
+			  _DRM_LOCKING_CONTEXT(old));
+		return 1;
+	}
+	wake_up_interruptible(&dev->lock.lock_queue);
+	return 0;
+}
+
+/**
+ * If we get here, it means that the process has called DRM_IOCTL_LOCK
+ * without calling DRM_IOCTL_UNLOCK.
+ *
+ * If the lock is not held, then let the signal proceed as usual.  If the lock
+ * is held, then set the contended flag and keep the signal blocked.
+ *
+ * \param priv pointer to a drm_sigdata structure.
+ * \return one if the signal should be delivered normally, or zero if the
+ * signal should be blocked.
+ */
+int drm_notifier(void *priv)
+{
+	drm_sigdata_t *s = (drm_sigdata_t *)priv;
+	unsigned int  old, new, prev;
+
+
+				/* Allow signal delivery if lock isn't held */
+	if (!s->lock || !_DRM_LOCK_IS_HELD(s->lock->lock)
+	    || _DRM_LOCKING_CONTEXT(s->lock->lock) != s->context) return 1;
+
+				/* Otherwise, set flag to force call to
+                                   drmUnlock */
+	do {
+		old  = s->lock->lock;
+		new  = old | _DRM_LOCK_CONT;
+		prev = cmpxchg(&s->lock->lock, old, new);
+	} while (prev != old);
+	return 0;
+}
diff -Nru a/drivers/char/drm/drm_lock.h b/drivers/char/drm/drm_lock.h
--- a/drivers/char/drm/drm_lock.h	2005-01-10 20:11:20 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,168 +0,0 @@
-/**
- * \file drm_lock.h 
- * IOCTLs for locking
- * 
- * \author Rickard E. (Rik) Faith <faith@valinux.com>
- * \author Gareth Hughes <gareth@valinux.com>
- */
-
-/*
- * Created: Tue Feb  2 08:37:54 1999 by faith@valinux.com
- *
- * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
- * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "drmP.h"
-
-/** No-op ioctl. */
-int DRM(noop)(struct inode *inode, struct file *filp, unsigned int cmd,
-	       unsigned long arg)
-{
-	DRM_DEBUG("\n");
-	return 0;
-}
-
-/**
- * Take the heavyweight lock.
- *
- * \param lock lock pointer.
- * \param context locking context.
- * \return one if the lock is held, or zero otherwise.
- *
- * Attempt to mark the lock as held by the given context, via the \p cmpxchg instruction.
- */
-int DRM(lock_take)(__volatile__ unsigned int *lock, unsigned int context)
-{
-	unsigned int old, new, prev;
-
-	do {
-		old = *lock;
-		if (old & _DRM_LOCK_HELD) new = old | _DRM_LOCK_CONT;
-		else			  new = context | _DRM_LOCK_HELD;
-		prev = cmpxchg(lock, old, new);
-	} while (prev != old);
-	if (_DRM_LOCKING_CONTEXT(old) == context) {
-		if (old & _DRM_LOCK_HELD) {
-			if (context != DRM_KERNEL_CONTEXT) {
-				DRM_ERROR("%d holds heavyweight lock\n",
-					  context);
-			}
-			return 0;
-		}
-	}
-	if (new == (context | _DRM_LOCK_HELD)) {
-				/* Have lock */
-		return 1;
-	}
-	return 0;
-}
-
-/**
- * This takes a lock forcibly and hands it to context.	Should ONLY be used
- * inside *_unlock to give lock to kernel before calling *_dma_schedule. 
- * 
- * \param dev DRM device.
- * \param lock lock pointer.
- * \param context locking context.
- * \return always one.
- *
- * Resets the lock file pointer.
- * Marks the lock as held by the given context, via the \p cmpxchg instruction.
- */
-int DRM(lock_transfer)(drm_device_t *dev,
-		       __volatile__ unsigned int *lock, unsigned int context)
-{
-	unsigned int old, new, prev;
-
-	dev->lock.filp = NULL;
-	do {
-		old  = *lock;
-		new  = context | _DRM_LOCK_HELD;
-		prev = cmpxchg(lock, old, new);
-	} while (prev != old);
-	return 1;
-}
-
-/**
- * Free lock.
- * 
- * \param dev DRM device.
- * \param lock lock.
- * \param context context.
- * 
- * Resets the lock file pointer.
- * Marks the lock as not held, via the \p cmpxchg instruction. Wakes any task
- * waiting on the lock queue.
- */
-int DRM(lock_free)(drm_device_t *dev,
-		   __volatile__ unsigned int *lock, unsigned int context)
-{
-	unsigned int old, new, prev;
-
-	dev->lock.filp = NULL;
-	do {
-		old  = *lock;
-		new  = 0;
-		prev = cmpxchg(lock, old, new);
-	} while (prev != old);
-	if (_DRM_LOCK_IS_HELD(old) && _DRM_LOCKING_CONTEXT(old) != context) {
-		DRM_ERROR("%d freed heavyweight lock held by %d\n",
-			  context,
-			  _DRM_LOCKING_CONTEXT(old));
-		return 1;
-	}
-	wake_up_interruptible(&dev->lock.lock_queue);
-	return 0;
-}
-
-/**
- * If we get here, it means that the process has called DRM_IOCTL_LOCK
- * without calling DRM_IOCTL_UNLOCK.
- *
- * If the lock is not held, then let the signal proceed as usual.  If the lock
- * is held, then set the contended flag and keep the signal blocked.
- *
- * \param priv pointer to a drm_sigdata structure.
- * \return one if the signal should be delivered normally, or zero if the
- * signal should be blocked.
- */
-int DRM(notifier)(void *priv)
-{
-	drm_sigdata_t *s = (drm_sigdata_t *)priv;
-	unsigned int  old, new, prev;
-
-
-				/* Allow signal delivery if lock isn't held */
-	if (!s->lock || !_DRM_LOCK_IS_HELD(s->lock->lock)
-	    || _DRM_LOCKING_CONTEXT(s->lock->lock) != s->context) return 1;
-
-				/* Otherwise, set flag to force call to
-                                   drmUnlock */
-	do {
-		old  = s->lock->lock;
-		new  = old | _DRM_LOCK_CONT;
-		prev = cmpxchg(&s->lock->lock, old, new);
-	} while (prev != old);
-	return 0;
-}
diff -Nru a/drivers/char/drm/drm_memory.c b/drivers/char/drm/drm_memory.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/char/drm/drm_memory.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,181 @@
+/** 
+ * \file drm_memory.h 
+ * Memory management wrappers for DRM
+ *
+ * \author Rickard E. (Rik) Faith <faith@valinux.com>
+ * \author Gareth Hughes <gareth@valinux.com>
+ */
+
+/* 
+ * Created: Thu Feb  4 14:00:34 1999 by faith@valinux.com
+ *
+ * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include <linux/config.h>
+#include <linux/highmem.h>
+#include "drmP.h"
+
+#ifdef DEBUG_MEMORY
+#include "drm_memory_debug.h"
+#else
+
+/** No-op. */
+void drm_mem_init(void)
+{
+}
+
+/**
+ * Called when "/proc/dri/%dev%/mem" is read.
+ * 
+ * \param buf output buffer.
+ * \param start start of output data.
+ * \param offset requested start offset.
+ * \param len requested number of bytes.
+ * \param eof whether there is no more data to return.
+ * \param data private data.
+ * \return number of written bytes.
+ *
+ * No-op. 
+ */
+int drm_mem_info(char *buf, char **start, off_t offset,
+		  int len, int *eof, void *data)
+{
+	return 0;
+}
+
+/** Wrapper around kmalloc() */
+void *drm_calloc(size_t nmemb, size_t size, int area)
+{
+	void *addr;
+
+	addr = kmalloc(size * nmemb, GFP_KERNEL);
+	if (addr != NULL)
+		memset((void *)addr, 0, size * nmemb);
+
+	return addr;
+}
+EXPORT_SYMBOL(drm_calloc);
+
+/** Wrapper around kmalloc() and kfree() */
+void *drm_realloc(void *oldpt, size_t oldsize, size_t size, int area)
+{
+	void *pt;
+
+	if (!(pt = kmalloc(size, GFP_KERNEL))) return NULL;
+	if (oldpt && oldsize) {
+		memcpy(pt, oldpt, oldsize);
+		kfree(oldpt);
+	}
+	return pt;
+}
+
+/**
+ * Allocate pages.
+ *
+ * \param order size order.
+ * \param area memory area. (Not used.)
+ * \return page address on success, or zero on failure.
+ *
+ * Allocate and reserve free pages.
+ */
+unsigned long drm_alloc_pages(int order, int area)
+{
+	unsigned long address;
+	unsigned long bytes	  = PAGE_SIZE << order;
+	unsigned long addr;
+	unsigned int  sz;
+
+	address = __get_free_pages(GFP_KERNEL, order);
+	if (!address) 
+		return 0;
+
+				/* Zero */
+	memset((void *)address, 0, bytes);
+
+				/* Reserve */
+	for (addr = address, sz = bytes;
+	     sz > 0;
+	     addr += PAGE_SIZE, sz -= PAGE_SIZE) {
+		SetPageReserved(virt_to_page(addr));
+	}
+
+	return address;
+}
+
+/**
+ * Free pages.
+ * 
+ * \param address address of the pages to free.
+ * \param order size order.
+ * \param area memory area. (Not used.)
+ *
+ * Unreserve and free pages allocated by alloc_pages().
+ */
+void drm_free_pages(unsigned long address, int order, int area)
+{
+	unsigned long bytes = PAGE_SIZE << order;
+	unsigned long addr;
+	unsigned int  sz;
+
+	if (!address) 
+		return;
+
+	/* Unreserve */
+	for (addr = address, sz = bytes;
+	     sz > 0;
+	     addr += PAGE_SIZE, sz -= PAGE_SIZE) {
+		ClearPageReserved(virt_to_page(addr));
+	}
+
+	free_pages(address, order);
+}
+
+
+#if __OS_HAS_AGP
+/** Wrapper around agp_allocate_memory() */
+DRM_AGP_MEM *drm_alloc_agp(int pages, u32 type)
+{
+	return drm_agp_allocate_memory(pages, type);
+}
+
+/** Wrapper around agp_free_memory() */
+int drm_free_agp(DRM_AGP_MEM *handle, int pages)
+{
+	return drm_agp_free_memory(handle) ? 0 : -EINVAL;
+}
+
+/** Wrapper around agp_bind_memory() */
+int drm_bind_agp(DRM_AGP_MEM *handle, unsigned int start)
+{
+	return drm_agp_bind_memory(handle, start);
+}
+
+/** Wrapper around agp_unbind_memory() */
+int drm_unbind_agp(DRM_AGP_MEM *handle)
+{
+	return drm_agp_unbind_memory(handle);
+}
+#endif /* agp */
+#endif /* debug_memory */
diff -Nru a/drivers/char/drm/drm_memory.h b/drivers/char/drm/drm_memory.h
--- a/drivers/char/drm/drm_memory.h	2005-01-10 20:11:16 -08:00
+++ b/drivers/char/drm/drm_memory.h	2005-01-10 20:11:16 -08:00
@@ -35,14 +35,13 @@
 
 #include <linux/config.h>
 #include <linux/highmem.h>
+#include <linux/vmalloc.h>
 #include "drmP.h"
 
 /**
  * Cut down version of drm_memory_debug.h, which used to be called
- * drm_memory.h.  If you want the debug functionality, change 0 to 1
- * below.
+ * drm_memory.h.  
  */
-#define DEBUG_MEMORY 0
 
 #if __OS_HAS_AGP
 
@@ -125,7 +124,8 @@
 drm_follow_page (void *vaddr)
 {
 	pgd_t *pgd = pgd_offset_k((unsigned long) vaddr);
-	pmd_t *pmd = pmd_offset(pgd, (unsigned long) vaddr);
+	pud_t *pud = pud_offset(pgd, (unsigned long) vaddr);
+	pmd_t *pmd = pmd_offset(pud, (unsigned long) vaddr);
 	pte_t *ptep = pte_offset_kernel(pmd, (unsigned long) vaddr);
 	return pte_pfn(*ptep) << PAGE_SHIFT;
 }
@@ -197,173 +197,3 @@
 }
 
 
-#if DEBUG_MEMORY
-#include "drm_memory_debug.h"
-#else
-
-/** No-op. */
-void DRM(mem_init)(void)
-{
-}
-
-/**
- * Called when "/proc/dri/%dev%/mem" is read.
- * 
- * \param buf output buffer.
- * \param start start of output data.
- * \param offset requested start offset.
- * \param len requested number of bytes.
- * \param eof whether there is no more data to return.
- * \param data private data.
- * \return number of written bytes.
- *
- * No-op. 
- */
-int DRM(mem_info)(char *buf, char **start, off_t offset,
-		  int len, int *eof, void *data)
-{
-	return 0;
-}
-
-/** Wrapper around kmalloc() */
-void *DRM(alloc)(size_t size, int area)
-{
-	return kmalloc(size, GFP_KERNEL);
-}
-
-/** Wrapper around kmalloc() */
-void *DRM(calloc)(size_t size, size_t nmemb, int area)
-{
-	void *addr;
-
-	addr = kmalloc(size * nmemb, GFP_KERNEL);
-	if (addr != NULL)
-		memset((void *)addr, 0, size * nmemb);
-
-	return addr;
-}
-
-/** Wrapper around kmalloc() and kfree() */
-void *DRM(realloc)(void *oldpt, size_t oldsize, size_t size, int area)
-{
-	void *pt;
-
-	if (!(pt = kmalloc(size, GFP_KERNEL))) return NULL;
-	if (oldpt && oldsize) {
-		memcpy(pt, oldpt, oldsize);
-		kfree(oldpt);
-	}
-	return pt;
-}
-
-/** Wrapper around kfree() */
-void DRM(free)(void *pt, size_t size, int area)
-{
-	kfree(pt);
-}
-
-/**
- * Allocate pages.
- *
- * \param order size order.
- * \param area memory area. (Not used.)
- * \return page address on success, or zero on failure.
- *
- * Allocate and reserve free pages.
- */
-unsigned long DRM(alloc_pages)(int order, int area)
-{
-	unsigned long address;
-	unsigned long bytes	  = PAGE_SIZE << order;
-	unsigned long addr;
-	unsigned int  sz;
-
-	address = __get_free_pages(GFP_KERNEL, order);
-	if (!address) 
-		return 0;
-
-				/* Zero */
-	memset((void *)address, 0, bytes);
-
-				/* Reserve */
-	for (addr = address, sz = bytes;
-	     sz > 0;
-	     addr += PAGE_SIZE, sz -= PAGE_SIZE) {
-		SetPageReserved(virt_to_page(addr));
-	}
-
-	return address;
-}
-
-/**
- * Free pages.
- * 
- * \param address address of the pages to free.
- * \param order size order.
- * \param area memory area. (Not used.)
- *
- * Unreserve and free pages allocated by alloc_pages().
- */
-void DRM(free_pages)(unsigned long address, int order, int area)
-{
-	unsigned long bytes = PAGE_SIZE << order;
-	unsigned long addr;
-	unsigned int  sz;
-
-	if (!address) 
-		return;
-
-	/* Unreserve */
-	for (addr = address, sz = bytes;
-	     sz > 0;
-	     addr += PAGE_SIZE, sz -= PAGE_SIZE) {
-		ClearPageReserved(virt_to_page(addr));
-	}
-
-	free_pages(address, order);
-}
-
-/** Wrapper around drm_ioremap() */
-void *DRM(ioremap)(unsigned long offset, unsigned long size, drm_device_t *dev)
-{
-	return drm_ioremap(offset, size, dev);
-}
-
-/** Wrapper around drm_ioremap_nocache() */
-void *DRM(ioremap_nocache)(unsigned long offset, unsigned long size, drm_device_t *dev)
-{
-	return drm_ioremap_nocache(offset, size, dev);
-}
-
-/** Wrapper around drm_iounmap() */
-void DRM(ioremapfree)(void *pt, unsigned long size, drm_device_t *dev)
-{
-	drm_ioremapfree(pt, size, dev);
-}
-
-#if __OS_HAS_AGP
-/** Wrapper around agp_allocate_memory() */
-DRM_AGP_MEM *DRM(alloc_agp)(int pages, u32 type)
-{
-	return DRM(agp_allocate_memory)(pages, type);
-}
-
-/** Wrapper around agp_free_memory() */
-int DRM(free_agp)(DRM_AGP_MEM *handle, int pages)
-{
-	return DRM(agp_free_memory)(handle) ? 0 : -EINVAL;
-}
-
-/** Wrapper around agp_bind_memory() */
-int DRM(bind_agp)(DRM_AGP_MEM *handle, unsigned int start)
-{
-	return DRM(agp_bind_memory)(handle, start);
-}
-
-/** Wrapper around agp_unbind_memory() */
-int DRM(unbind_agp)(DRM_AGP_MEM *handle)
-{
-	return DRM(agp_unbind_memory)(handle);
-}
-#endif /* agp */
-#endif /* debug_memory */
diff -Nru a/drivers/char/drm/drm_memory_debug.h b/drivers/char/drm/drm_memory_debug.h
--- a/drivers/char/drm/drm_memory_debug.h	2005-01-10 20:11:16 -08:00
+++ b/drivers/char/drm/drm_memory_debug.h	2005-01-10 20:11:16 -08:00
@@ -167,7 +167,7 @@
 	return pt;
 }
 
-void *DRM(calloc)(size_t size, size_t nmemb, int area)
+void *DRM(calloc)(size_t nmemb, size_t size, int area)
 {
 	void *addr;
 
diff -Nru a/drivers/char/drm/drm_os_linux.h b/drivers/char/drm/drm_os_linux.h
--- a/drivers/char/drm/drm_os_linux.h	2005-01-10 20:11:22 -08:00
+++ b/drivers/char/drm/drm_os_linux.h	2005-01-10 20:11:22 -08:00
@@ -100,11 +100,6 @@
 	__put_user(val, uaddr)
 
 
-/** 'malloc' without the overhead of DRM(alloc)() */
-#define DRM_MALLOC(x) kmalloc(x, GFP_KERNEL)
-/** 'free' without the overhead of DRM(free)() */
-#define DRM_FREE(x,size) kfree(x)
-
 #define DRM_GET_PRIV_WITH_RETURN(_priv, _filp) _priv = _filp->private_data
 
 /** 
diff -Nru a/drivers/char/drm/drm_proc.c b/drivers/char/drm/drm_proc.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/char/drm/drm_proc.c	2005-01-10 20:11:16 -08:00
@@ -0,0 +1,539 @@
+/**
+ * \file drm_proc.h 
+ * /proc support for DRM
+ *
+ * \author Rickard E. (Rik) Faith <faith@valinux.com>
+ * \author Gareth Hughes <gareth@valinux.com>
+ *
+ * \par Acknowledgements:
+ *    Matthew J Sottek <matthew.j.sottek@intel.com> sent in a patch to fix
+ *    the problem with the proc files not outputting all their information.
+ */
+
+/*
+ * Created: Mon Jan 11 09:48:47 1999 by faith@valinux.com
+ *
+ * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "drmP.h"
+
+static int	   drm_name_info(char *buf, char **start, off_t offset,
+				  int request, int *eof, void *data);
+static int	   drm_vm_info(char *buf, char **start, off_t offset,
+				int request, int *eof, void *data);
+static int	   drm_clients_info(char *buf, char **start, off_t offset,
+				     int request, int *eof, void *data);
+static int	   drm_queues_info(char *buf, char **start, off_t offset,
+				    int request, int *eof, void *data);
+static int	   drm_bufs_info(char *buf, char **start, off_t offset,
+				  int request, int *eof, void *data);
+#if DRM_DEBUG_CODE
+static int	   drm_vma_info(char *buf, char **start, off_t offset,
+				 int request, int *eof, void *data);
+#endif
+
+/**
+ * Proc file list.
+ */
+struct drm_proc_list {
+	const char *name;	/**< file name */
+	int	   (*f)(char *, char **, off_t, int, int *, void *);	/**< proc callback*/
+} drm_proc_list[] = {
+	{ "name",    drm_name_info    },
+	{ "mem",     drm_mem_info     },
+	{ "vm",	     drm_vm_info      },
+	{ "clients", drm_clients_info },
+	{ "queues",  drm_queues_info  },
+	{ "bufs",    drm_bufs_info    },
+#if DRM_DEBUG_CODE
+	{ "vma",     drm_vma_info     },
+#endif
+};
+#define DRM_PROC_ENTRIES (sizeof(drm_proc_list)/sizeof(drm_proc_list[0]))
+
+/**
+ * Initialize the DRI proc filesystem for a device.
+ *
+ * \param dev DRM device.
+ * \param minor device minor number.
+ * \param root DRI proc dir entry.
+ * \param dev_root resulting DRI device proc dir entry.
+ * \return root entry pointer on success, or NULL on failure.
+ * 
+ * Create the DRI proc root entry "/proc/dri", the device proc root entry
+ * "/proc/dri/%minor%/", and each entry in proc_list as
+ * "/proc/dri/%minor%/%name%".
+ */
+int drm_proc_init(drm_device_t *dev, int minor,
+		    struct proc_dir_entry *root,
+		    struct proc_dir_entry **dev_root)
+{
+	struct proc_dir_entry *ent;
+	int		      i, j;
+	char                  name[64];
+
+	sprintf(name, "%d", minor);
+	*dev_root = create_proc_entry(name, S_IFDIR, root);
+	if (!*dev_root) {
+		DRM_ERROR("Cannot create /proc/dri/%s\n", name);
+		return -1;
+	}
+
+	for (i = 0; i < DRM_PROC_ENTRIES; i++) {
+		ent = create_proc_entry(drm_proc_list[i].name,
+					S_IFREG|S_IRUGO, *dev_root);
+		if (!ent) {
+			DRM_ERROR("Cannot create /proc/dri/%s/%s\n",
+				  name, drm_proc_list[i].name);
+			for (j = 0; j < i; j++)
+				remove_proc_entry(drm_proc_list[i].name,
+						  *dev_root);
+			remove_proc_entry(name, root);
+			return -1;
+		}
+		ent->read_proc = drm_proc_list[i].f;
+		ent->data      = dev;
+	}
+
+	return 0;
+}
+
+
+/**
+ * Cleanup the proc filesystem resources.
+ *
+ * \param minor device minor number.
+ * \param root DRI proc dir entry.
+ * \param dev_root DRI device proc dir entry.
+ * \return always zero.
+ *
+ * Remove all proc entries created by proc_init().
+ */
+int drm_proc_cleanup(int minor, struct proc_dir_entry *root,
+		      struct proc_dir_entry *dev_root)
+{
+	int  i;
+	char name[64];
+
+	if (!root || !dev_root) return 0;
+
+	for (i = 0; i < DRM_PROC_ENTRIES; i++)
+		remove_proc_entry(drm_proc_list[i].name, dev_root);
+	sprintf(name, "%d", minor);
+	remove_proc_entry(name, root);
+
+	return 0;
+}
+
+/**
+ * Called when "/proc/dri/.../name" is read.
+ * 
+ * \param buf output buffer.
+ * \param start start of output data.
+ * \param offset requested start offset.
+ * \param request requested number of bytes.
+ * \param eof whether there is no more data to return.
+ * \param data private data.
+ * \return number of written bytes.
+ * 
+ * Prints the device name together with the bus id if available.
+ */
+static int drm_name_info(char *buf, char **start, off_t offset, int request,
+			  int *eof, void *data)
+{
+	drm_device_t *dev = (drm_device_t *)data;
+	int          len  = 0;
+
+	if (offset > DRM_PROC_LIMIT) {
+		*eof = 1;
+		return 0;
+	}
+
+	*start = &buf[offset];
+	*eof   = 0;
+
+	if (dev->unique) {
+		DRM_PROC_PRINT("%s 0x%lx %s\n",
+			       dev->driver->pci_driver.name, (long)old_encode_dev(dev->device), dev->unique);
+	} else {
+		DRM_PROC_PRINT("%s 0x%lx\n", dev->driver->pci_driver.name, (long)old_encode_dev(dev->device));
+	}
+
+	if (len > request + offset) return request;
+	*eof = 1;
+	return len - offset;
+}
+
+/**
+ * Called when "/proc/dri/.../vm" is read.
+ * 
+ * \param buf output buffer.
+ * \param start start of output data.
+ * \param offset requested start offset.
+ * \param request requested number of bytes.
+ * \param eof whether there is no more data to return.
+ * \param data private data.
+ * \return number of written bytes.
+ * 
+ * Prints information about all mappings in drm_device::maplist.
+ */
+static int drm__vm_info(char *buf, char **start, off_t offset, int request,
+			 int *eof, void *data)
+{
+	drm_device_t *dev = (drm_device_t *)data;
+	int          len  = 0;
+	drm_map_t    *map;
+	drm_map_list_t *r_list;
+	struct list_head *list;
+
+				/* Hardcoded from _DRM_FRAME_BUFFER,
+                                   _DRM_REGISTERS, _DRM_SHM, _DRM_AGP, and
+                                   _DRM_SCATTER_GATHER. */
+	const char   *types[] = { "FB", "REG", "SHM", "AGP", "SG" };
+	const char   *type;
+	int	     i;
+
+	if (offset > DRM_PROC_LIMIT) {
+		*eof = 1;
+		return 0;
+	}
+
+	*start = &buf[offset];
+	*eof   = 0;
+
+	DRM_PROC_PRINT("slot	 offset	      size type flags	 "
+		       "address mtrr\n\n");
+	i = 0;
+	if (dev->maplist != NULL) list_for_each(list, &dev->maplist->head) {
+		r_list = list_entry(list, drm_map_list_t, head);
+		map = r_list->map;
+		if(!map) continue;
+		if (map->type < 0 || map->type > 4) type = "??";
+		else				    type = types[map->type];
+		DRM_PROC_PRINT("%4d 0x%08lx 0x%08lx %4.4s  0x%02x 0x%08lx ",
+			       i,
+			       map->offset,
+			       map->size,
+			       type,
+			       map->flags,
+			       (unsigned long)map->handle);
+		if (map->mtrr < 0) {
+			DRM_PROC_PRINT("none\n");
+		} else {
+			DRM_PROC_PRINT("%4d\n", map->mtrr);
+		}
+		i++;
+	}
+
+	if (len > request + offset) return request;
+	*eof = 1;
+	return len - offset;
+}
+
+/**
+ * Simply calls _vm_info() while holding the drm_device::struct_sem lock.
+ */
+static int drm_vm_info(char *buf, char **start, off_t offset, int request,
+			int *eof, void *data)
+{
+	drm_device_t *dev = (drm_device_t *)data;
+	int	     ret;
+
+	down(&dev->struct_sem);
+	ret = drm__vm_info(buf, start, offset, request, eof, data);
+	up(&dev->struct_sem);
+	return ret;
+}
+
+/**
+ * Called when "/proc/dri/.../queues" is read.
+ * 
+ * \param buf output buffer.
+ * \param start start of output data.
+ * \param offset requested start offset.
+ * \param request requested number of bytes.
+ * \param eof whether there is no more data to return.
+ * \param data private data.
+ * \return number of written bytes.
+ */
+static int drm__queues_info(char *buf, char **start, off_t offset,
+			     int request, int *eof, void *data)
+{
+	drm_device_t *dev = (drm_device_t *)data;
+	int          len  = 0;
+	int	     i;
+	drm_queue_t  *q;
+
+	if (offset > DRM_PROC_LIMIT) {
+		*eof = 1;
+		return 0;
+	}
+
+	*start = &buf[offset];
+	*eof   = 0;
+
+	DRM_PROC_PRINT("  ctx/flags   use   fin"
+		       "   blk/rw/rwf  wait    flushed	   queued"
+		       "      locks\n\n");
+	for (i = 0; i < dev->queue_count; i++) {
+		q = dev->queuelist[i];
+		atomic_inc(&q->use_count);
+		DRM_PROC_PRINT_RET(atomic_dec(&q->use_count),
+				   "%5d/0x%03x %5d %5d"
+				   " %5d/%c%c/%c%c%c %5Zd\n",
+				   i,
+				   q->flags,
+				   atomic_read(&q->use_count),
+				   atomic_read(&q->finalization),
+				   atomic_read(&q->block_count),
+				   atomic_read(&q->block_read) ? 'r' : '-',
+				   atomic_read(&q->block_write) ? 'w' : '-',
+				   waitqueue_active(&q->read_queue) ? 'r':'-',
+				   waitqueue_active(&q->write_queue) ? 'w':'-',
+				   waitqueue_active(&q->flush_queue) ? 'f':'-',
+				   DRM_BUFCOUNT(&q->waitlist));
+		atomic_dec(&q->use_count);
+	}
+
+	if (len > request + offset) return request;
+	*eof = 1;
+	return len - offset;
+}
+
+/**
+ * Simply calls _queues_info() while holding the drm_device::struct_sem lock.
+ */
+static int drm_queues_info(char *buf, char **start, off_t offset, int request,
+			    int *eof, void *data)
+{
+	drm_device_t *dev = (drm_device_t *)data;
+	int	     ret;
+
+	down(&dev->struct_sem);
+	ret = drm__queues_info(buf, start, offset, request, eof, data);
+	up(&dev->struct_sem);
+	return ret;
+}
+
+/**
+ * Called when "/proc/dri/.../bufs" is read.
+ * 
+ * \param buf output buffer.
+ * \param start start of output data.
+ * \param offset requested start offset.
+ * \param request requested number of bytes.
+ * \param eof whether there is no more data to return.
+ * \param data private data.
+ * \return number of written bytes.
+ */
+static int drm__bufs_info(char *buf, char **start, off_t offset, int request,
+			   int *eof, void *data)
+{
+	drm_device_t	 *dev = (drm_device_t *)data;
+	int              len  = 0;
+	drm_device_dma_t *dma = dev->dma;
+	int		 i;
+
+	if (!dma || offset > DRM_PROC_LIMIT) {
+		*eof = 1;
+		return 0;
+	}
+
+	*start = &buf[offset];
+	*eof   = 0;
+
+	DRM_PROC_PRINT(" o     size count  free	 segs pages    kB\n\n");
+	for (i = 0; i <= DRM_MAX_ORDER; i++) {
+		if (dma->bufs[i].buf_count)
+			DRM_PROC_PRINT("%2d %8d %5d %5d %5d %5d %5ld\n",
+				       i,
+				       dma->bufs[i].buf_size,
+				       dma->bufs[i].buf_count,
+				       atomic_read(&dma->bufs[i]
+						   .freelist.count),
+				       dma->bufs[i].seg_count,
+				       dma->bufs[i].seg_count
+				       *(1 << dma->bufs[i].page_order),
+				       (dma->bufs[i].seg_count
+					* (1 << dma->bufs[i].page_order))
+				       * PAGE_SIZE / 1024);
+	}
+	DRM_PROC_PRINT("\n");
+	for (i = 0; i < dma->buf_count; i++) {
+		if (i && !(i%32)) DRM_PROC_PRINT("\n");
+		DRM_PROC_PRINT(" %d", dma->buflist[i]->list);
+	}
+	DRM_PROC_PRINT("\n");
+
+	if (len > request + offset) return request;
+	*eof = 1;
+	return len - offset;
+}
+
+/**
+ * Simply calls _bufs_info() while holding the drm_device::struct_sem lock.
+ */
+static int drm_bufs_info(char *buf, char **start, off_t offset, int request,
+			  int *eof, void *data)
+{
+	drm_device_t *dev = (drm_device_t *)data;
+	int	     ret;
+
+	down(&dev->struct_sem);
+	ret = drm__bufs_info(buf, start, offset, request, eof, data);
+	up(&dev->struct_sem);
+	return ret;
+}
+
+/**
+ * Called when "/proc/dri/.../clients" is read.
+ * 
+ * \param buf output buffer.
+ * \param start start of output data.
+ * \param offset requested start offset.
+ * \param request requested number of bytes.
+ * \param eof whether there is no more data to return.
+ * \param data private data.
+ * \return number of written bytes.
+ */
+static int drm__clients_info(char *buf, char **start, off_t offset,
+			      int request, int *eof, void *data)
+{
+	drm_device_t *dev = (drm_device_t *)data;
+	int          len  = 0;
+	drm_file_t   *priv;
+
+	if (offset > DRM_PROC_LIMIT) {
+		*eof = 1;
+		return 0;
+	}
+
+	*start = &buf[offset];
+	*eof   = 0;
+
+	DRM_PROC_PRINT("a dev	pid    uid	magic	  ioctls\n\n");
+	for (priv = dev->file_first; priv; priv = priv->next) {
+		DRM_PROC_PRINT("%c %3d %5d %5d %10u %10lu\n",
+			       priv->authenticated ? 'y' : 'n',
+			       priv->minor,
+			       priv->pid,
+			       priv->uid,
+			       priv->magic,
+			       priv->ioctl_count);
+	}
+
+	if (len > request + offset) return request;
+	*eof = 1;
+	return len - offset;
+}
+
+/**
+ * Simply calls _clients_info() while holding the drm_device::struct_sem lock.
+ */
+static int drm_clients_info(char *buf, char **start, off_t offset,
+			     int request, int *eof, void *data)
+{
+	drm_device_t *dev = (drm_device_t *)data;
+	int	     ret;
+
+	down(&dev->struct_sem);
+	ret = drm__clients_info(buf, start, offset, request, eof, data);
+	up(&dev->struct_sem);
+	return ret;
+}
+
+#if DRM_DEBUG_CODE
+
+static int drm__vma_info(char *buf, char **start, off_t offset, int request,
+			  int *eof, void *data)
+{
+	drm_device_t	      *dev = (drm_device_t *)data;
+	int                   len  = 0;
+	drm_vma_entry_t	      *pt;
+	struct vm_area_struct *vma;
+#if defined(__i386__)
+	unsigned int	      pgprot;
+#endif
+
+	if (offset > DRM_PROC_LIMIT) {
+		*eof = 1;
+		return 0;
+	}
+
+	*start = &buf[offset];
+	*eof   = 0;
+
+	DRM_PROC_PRINT("vma use count: %d, high_memory = %p, 0x%08lx\n",
+		       atomic_read(&dev->vma_count),
+		       high_memory, virt_to_phys(high_memory));
+	for (pt = dev->vmalist; pt; pt = pt->next) {
+		if (!(vma = pt->vma)) continue;
+		DRM_PROC_PRINT("\n%5d 0x%08lx-0x%08lx %c%c%c%c%c%c 0x%08lx",
+			       pt->pid,
+			       vma->vm_start,
+			       vma->vm_end,
+			       vma->vm_flags & VM_READ	   ? 'r' : '-',
+			       vma->vm_flags & VM_WRITE	   ? 'w' : '-',
+			       vma->vm_flags & VM_EXEC	   ? 'x' : '-',
+			       vma->vm_flags & VM_MAYSHARE ? 's' : 'p',
+			       vma->vm_flags & VM_LOCKED   ? 'l' : '-',
+			       vma->vm_flags & VM_IO	   ? 'i' : '-',
+			       VM_OFFSET(vma));
+
+#if defined(__i386__)
+		pgprot = pgprot_val(vma->vm_page_prot);
+		DRM_PROC_PRINT(" %c%c%c%c%c%c%c%c%c",
+			       pgprot & _PAGE_PRESENT  ? 'p' : '-',
+			       pgprot & _PAGE_RW       ? 'w' : 'r',
+			       pgprot & _PAGE_USER     ? 'u' : 's',
+			       pgprot & _PAGE_PWT      ? 't' : 'b',
+			       pgprot & _PAGE_PCD      ? 'u' : 'c',
+			       pgprot & _PAGE_ACCESSED ? 'a' : '-',
+			       pgprot & _PAGE_DIRTY    ? 'd' : '-',
+			       pgprot & _PAGE_PSE      ? 'm' : 'k',
+			       pgprot & _PAGE_GLOBAL   ? 'g' : 'l' );
+#endif
+		DRM_PROC_PRINT("\n");
+	}
+
+	if (len > request + offset) return request;
+	*eof = 1;
+	return len - offset;
+}
+
+static int drm_vma_info(char *buf, char **start, off_t offset, int request,
+			 int *eof, void *data)
+{
+	drm_device_t *dev = (drm_device_t *)data;
+	int	     ret;
+
+	down(&dev->struct_sem);
+	ret = drm__vma_info(buf, start, offset, request, eof, data);
+	up(&dev->struct_sem);
+	return ret;
+}
+#endif
+
+
diff -Nru a/drivers/char/drm/drm_proc.h b/drivers/char/drm/drm_proc.h
--- a/drivers/char/drm/drm_proc.h	2005-01-10 20:11:16 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,547 +0,0 @@
-/**
- * \file drm_proc.h 
- * /proc support for DRM
- *
- * \author Rickard E. (Rik) Faith <faith@valinux.com>
- * \author Gareth Hughes <gareth@valinux.com>
- *
- * \par Acknowledgements:
- *    Matthew J Sottek <matthew.j.sottek@intel.com> sent in a patch to fix
- *    the problem with the proc files not outputting all their information.
- */
-
-/*
- * Created: Mon Jan 11 09:48:47 1999 by faith@valinux.com
- *
- * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
- * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "drmP.h"
-
-static int	   DRM(name_info)(char *buf, char **start, off_t offset,
-				  int request, int *eof, void *data);
-static int	   DRM(vm_info)(char *buf, char **start, off_t offset,
-				int request, int *eof, void *data);
-static int	   DRM(clients_info)(char *buf, char **start, off_t offset,
-				     int request, int *eof, void *data);
-static int	   DRM(queues_info)(char *buf, char **start, off_t offset,
-				    int request, int *eof, void *data);
-static int	   DRM(bufs_info)(char *buf, char **start, off_t offset,
-				  int request, int *eof, void *data);
-#if DRM_DEBUG_CODE
-static int	   DRM(vma_info)(char *buf, char **start, off_t offset,
-				 int request, int *eof, void *data);
-#endif
-
-/**
- * Proc file list.
- */
-struct drm_proc_list {
-	const char *name;	/**< file name */
-	int	   (*f)(char *, char **, off_t, int, int *, void *);	/**< proc callback*/
-} DRM(proc_list)[] = {
-	{ "name",    DRM(name_info)    },
-	{ "mem",     DRM(mem_info)     },
-	{ "vm",	     DRM(vm_info)      },
-	{ "clients", DRM(clients_info) },
-	{ "queues",  DRM(queues_info)  },
-	{ "bufs",    DRM(bufs_info)    },
-#if DRM_DEBUG_CODE
-	{ "vma",     DRM(vma_info)     },
-#endif
-};
-#define DRM_PROC_ENTRIES (sizeof(DRM(proc_list))/sizeof(DRM(proc_list)[0]))
-
-/**
- * Initialize the DRI proc filesystem for a device.
- *
- * \param dev DRM device.
- * \param minor device minor number.
- * \param root DRI proc dir entry.
- * \param dev_root resulting DRI device proc dir entry.
- * \return root entry pointer on success, or NULL on failure.
- * 
- * Create the DRI proc root entry "/proc/dri", the device proc root entry
- * "/proc/dri/%minor%/", and each entry in proc_list as
- * "/proc/dri/%minor%/%name%".
- */
-struct proc_dir_entry *DRM(proc_init)(drm_device_t *dev, int minor,
-				      struct proc_dir_entry *root,
-				      struct proc_dir_entry **dev_root)
-{
-	struct proc_dir_entry *ent;
-	int		      i, j;
-	char                  name[64];
-
-	if (!minor) root = create_proc_entry("dri", S_IFDIR, NULL);
-	if (!root) {
-		DRM_ERROR("Cannot create /proc/dri\n");
-		return NULL;
-	}
-
-	sprintf(name, "%d", minor);
-	*dev_root = create_proc_entry(name, S_IFDIR, root);
-	if (!*dev_root) {
-		DRM_ERROR("Cannot create /proc/dri/%s\n", name);
-		return NULL;
-	}
-
-	for (i = 0; i < DRM_PROC_ENTRIES; i++) {
-		ent = create_proc_entry(DRM(proc_list)[i].name,
-					S_IFREG|S_IRUGO, *dev_root);
-		if (!ent) {
-			DRM_ERROR("Cannot create /proc/dri/%s/%s\n",
-				  name, DRM(proc_list)[i].name);
-			for (j = 0; j < i; j++)
-				remove_proc_entry(DRM(proc_list)[i].name,
-						  *dev_root);
-			remove_proc_entry(name, root);
-			if (!minor) remove_proc_entry("dri", NULL);
-			return NULL;
-		}
-		ent->read_proc = DRM(proc_list)[i].f;
-		ent->data      = dev;
-	}
-
-	return root;
-}
-
-
-/**
- * Cleanup the proc filesystem resources.
- *
- * \param minor device minor number.
- * \param root DRI proc dir entry.
- * \param dev_root DRI device proc dir entry.
- * \return always zero.
- *
- * Remove all proc entries created by proc_init().
- */
-int DRM(proc_cleanup)(int minor, struct proc_dir_entry *root,
-		      struct proc_dir_entry *dev_root)
-{
-	int  i;
-	char name[64];
-
-	if (!root || !dev_root) return 0;
-
-	for (i = 0; i < DRM_PROC_ENTRIES; i++)
-		remove_proc_entry(DRM(proc_list)[i].name, dev_root);
-	sprintf(name, "%d", minor);
-	remove_proc_entry(name, root);
-	if (!minor) remove_proc_entry("dri", NULL);
-
-	return 0;
-}
-
-/**
- * Called when "/proc/dri/.../name" is read.
- * 
- * \param buf output buffer.
- * \param start start of output data.
- * \param offset requested start offset.
- * \param request requested number of bytes.
- * \param eof whether there is no more data to return.
- * \param data private data.
- * \return number of written bytes.
- * 
- * Prints the device name together with the bus id if available.
- */
-static int DRM(name_info)(char *buf, char **start, off_t offset, int request,
-			  int *eof, void *data)
-{
-	drm_device_t *dev = (drm_device_t *)data;
-	int          len  = 0;
-
-	if (offset > DRM_PROC_LIMIT) {
-		*eof = 1;
-		return 0;
-	}
-
-	*start = &buf[offset];
-	*eof   = 0;
-
-	if (dev->unique) {
-		DRM_PROC_PRINT("%s 0x%lx %s\n",
-			       dev->name, (long)old_encode_dev(dev->device), dev->unique);
-	} else {
-		DRM_PROC_PRINT("%s 0x%lx\n", dev->name, (long)old_encode_dev(dev->device));
-	}
-
-	if (len > request + offset) return request;
-	*eof = 1;
-	return len - offset;
-}
-
-/**
- * Called when "/proc/dri/.../vm" is read.
- * 
- * \param buf output buffer.
- * \param start start of output data.
- * \param offset requested start offset.
- * \param request requested number of bytes.
- * \param eof whether there is no more data to return.
- * \param data private data.
- * \return number of written bytes.
- * 
- * Prints information about all mappings in drm_device::maplist.
- */
-static int DRM(_vm_info)(char *buf, char **start, off_t offset, int request,
-			 int *eof, void *data)
-{
-	drm_device_t *dev = (drm_device_t *)data;
-	int          len  = 0;
-	drm_map_t    *map;
-	drm_map_list_t *r_list;
-	struct list_head *list;
-
-				/* Hardcoded from _DRM_FRAME_BUFFER,
-                                   _DRM_REGISTERS, _DRM_SHM, _DRM_AGP, and
-                                   _DRM_SCATTER_GATHER. */
-	const char   *types[] = { "FB", "REG", "SHM", "AGP", "SG" };
-	const char   *type;
-	int	     i;
-
-	if (offset > DRM_PROC_LIMIT) {
-		*eof = 1;
-		return 0;
-	}
-
-	*start = &buf[offset];
-	*eof   = 0;
-
-	DRM_PROC_PRINT("slot	 offset	      size type flags	 "
-		       "address mtrr\n\n");
-	i = 0;
-	if (dev->maplist != NULL) list_for_each(list, &dev->maplist->head) {
-		r_list = list_entry(list, drm_map_list_t, head);
-		map = r_list->map;
-		if(!map) continue;
-		if (map->type < 0 || map->type > 4) type = "??";
-		else				    type = types[map->type];
-		DRM_PROC_PRINT("%4d 0x%08lx 0x%08lx %4.4s  0x%02x 0x%08lx ",
-			       i,
-			       map->offset,
-			       map->size,
-			       type,
-			       map->flags,
-			       (unsigned long)map->handle);
-		if (map->mtrr < 0) {
-			DRM_PROC_PRINT("none\n");
-		} else {
-			DRM_PROC_PRINT("%4d\n", map->mtrr);
-		}
-		i++;
-	}
-
-	if (len > request + offset) return request;
-	*eof = 1;
-	return len - offset;
-}
-
-/**
- * Simply calls _vm_info() while holding the drm_device::struct_sem lock.
- */
-static int DRM(vm_info)(char *buf, char **start, off_t offset, int request,
-			int *eof, void *data)
-{
-	drm_device_t *dev = (drm_device_t *)data;
-	int	     ret;
-
-	down(&dev->struct_sem);
-	ret = DRM(_vm_info)(buf, start, offset, request, eof, data);
-	up(&dev->struct_sem);
-	return ret;
-}
-
-/**
- * Called when "/proc/dri/.../queues" is read.
- * 
- * \param buf output buffer.
- * \param start start of output data.
- * \param offset requested start offset.
- * \param request requested number of bytes.
- * \param eof whether there is no more data to return.
- * \param data private data.
- * \return number of written bytes.
- */
-static int DRM(_queues_info)(char *buf, char **start, off_t offset,
-			     int request, int *eof, void *data)
-{
-	drm_device_t *dev = (drm_device_t *)data;
-	int          len  = 0;
-	int	     i;
-	drm_queue_t  *q;
-
-	if (offset > DRM_PROC_LIMIT) {
-		*eof = 1;
-		return 0;
-	}
-
-	*start = &buf[offset];
-	*eof   = 0;
-
-	DRM_PROC_PRINT("  ctx/flags   use   fin"
-		       "   blk/rw/rwf  wait    flushed	   queued"
-		       "      locks\n\n");
-	for (i = 0; i < dev->queue_count; i++) {
-		q = dev->queuelist[i];
-		atomic_inc(&q->use_count);
-		DRM_PROC_PRINT_RET(atomic_dec(&q->use_count),
-				   "%5d/0x%03x %5d %5d"
-				   " %5d/%c%c/%c%c%c %5Zd\n",
-				   i,
-				   q->flags,
-				   atomic_read(&q->use_count),
-				   atomic_read(&q->finalization),
-				   atomic_read(&q->block_count),
-				   atomic_read(&q->block_read) ? 'r' : '-',
-				   atomic_read(&q->block_write) ? 'w' : '-',
-				   waitqueue_active(&q->read_queue) ? 'r':'-',
-				   waitqueue_active(&q->write_queue) ? 'w':'-',
-				   waitqueue_active(&q->flush_queue) ? 'f':'-',
-				   DRM_BUFCOUNT(&q->waitlist));
-		atomic_dec(&q->use_count);
-	}
-
-	if (len > request + offset) return request;
-	*eof = 1;
-	return len - offset;
-}
-
-/**
- * Simply calls _queues_info() while holding the drm_device::struct_sem lock.
- */
-static int DRM(queues_info)(char *buf, char **start, off_t offset, int request,
-			    int *eof, void *data)
-{
-	drm_device_t *dev = (drm_device_t *)data;
-	int	     ret;
-
-	down(&dev->struct_sem);
-	ret = DRM(_queues_info)(buf, start, offset, request, eof, data);
-	up(&dev->struct_sem);
-	return ret;
-}
-
-/**
- * Called when "/proc/dri/.../bufs" is read.
- * 
- * \param buf output buffer.
- * \param start start of output data.
- * \param offset requested start offset.
- * \param request requested number of bytes.
- * \param eof whether there is no more data to return.
- * \param data private data.
- * \return number of written bytes.
- */
-static int DRM(_bufs_info)(char *buf, char **start, off_t offset, int request,
-			   int *eof, void *data)
-{
-	drm_device_t	 *dev = (drm_device_t *)data;
-	int              len  = 0;
-	drm_device_dma_t *dma = dev->dma;
-	int		 i;
-
-	if (!dma || offset > DRM_PROC_LIMIT) {
-		*eof = 1;
-		return 0;
-	}
-
-	*start = &buf[offset];
-	*eof   = 0;
-
-	DRM_PROC_PRINT(" o     size count  free	 segs pages    kB\n\n");
-	for (i = 0; i <= DRM_MAX_ORDER; i++) {
-		if (dma->bufs[i].buf_count)
-			DRM_PROC_PRINT("%2d %8d %5d %5d %5d %5d %5ld\n",
-				       i,
-				       dma->bufs[i].buf_size,
-				       dma->bufs[i].buf_count,
-				       atomic_read(&dma->bufs[i]
-						   .freelist.count),
-				       dma->bufs[i].seg_count,
-				       dma->bufs[i].seg_count
-				       *(1 << dma->bufs[i].page_order),
-				       (dma->bufs[i].seg_count
-					* (1 << dma->bufs[i].page_order))
-				       * PAGE_SIZE / 1024);
-	}
-	DRM_PROC_PRINT("\n");
-	for (i = 0; i < dma->buf_count; i++) {
-		if (i && !(i%32)) DRM_PROC_PRINT("\n");
-		DRM_PROC_PRINT(" %d", dma->buflist[i]->list);
-	}
-	DRM_PROC_PRINT("\n");
-
-	if (len > request + offset) return request;
-	*eof = 1;
-	return len - offset;
-}
-
-/**
- * Simply calls _bufs_info() while holding the drm_device::struct_sem lock.
- */
-static int DRM(bufs_info)(char *buf, char **start, off_t offset, int request,
-			  int *eof, void *data)
-{
-	drm_device_t *dev = (drm_device_t *)data;
-	int	     ret;
-
-	down(&dev->struct_sem);
-	ret = DRM(_bufs_info)(buf, start, offset, request, eof, data);
-	up(&dev->struct_sem);
-	return ret;
-}
-
-/**
- * Called when "/proc/dri/.../clients" is read.
- * 
- * \param buf output buffer.
- * \param start start of output data.
- * \param offset requested start offset.
- * \param request requested number of bytes.
- * \param eof whether there is no more data to return.
- * \param data private data.
- * \return number of written bytes.
- */
-static int DRM(_clients_info)(char *buf, char **start, off_t offset,
-			      int request, int *eof, void *data)
-{
-	drm_device_t *dev = (drm_device_t *)data;
-	int          len  = 0;
-	drm_file_t   *priv;
-
-	if (offset > DRM_PROC_LIMIT) {
-		*eof = 1;
-		return 0;
-	}
-
-	*start = &buf[offset];
-	*eof   = 0;
-
-	DRM_PROC_PRINT("a dev	pid    uid	magic	  ioctls\n\n");
-	for (priv = dev->file_first; priv; priv = priv->next) {
-		DRM_PROC_PRINT("%c %3d %5d %5d %10u %10lu\n",
-			       priv->authenticated ? 'y' : 'n',
-			       priv->minor,
-			       priv->pid,
-			       priv->uid,
-			       priv->magic,
-			       priv->ioctl_count);
-	}
-
-	if (len > request + offset) return request;
-	*eof = 1;
-	return len - offset;
-}
-
-/**
- * Simply calls _clients_info() while holding the drm_device::struct_sem lock.
- */
-static int DRM(clients_info)(char *buf, char **start, off_t offset,
-			     int request, int *eof, void *data)
-{
-	drm_device_t *dev = (drm_device_t *)data;
-	int	     ret;
-
-	down(&dev->struct_sem);
-	ret = DRM(_clients_info)(buf, start, offset, request, eof, data);
-	up(&dev->struct_sem);
-	return ret;
-}
-
-#if DRM_DEBUG_CODE
-
-static int DRM(_vma_info)(char *buf, char **start, off_t offset, int request,
-			  int *eof, void *data)
-{
-	drm_device_t	      *dev = (drm_device_t *)data;
-	int                   len  = 0;
-	drm_vma_entry_t	      *pt;
-	struct vm_area_struct *vma;
-#if defined(__i386__)
-	unsigned int	      pgprot;
-#endif
-
-	if (offset > DRM_PROC_LIMIT) {
-		*eof = 1;
-		return 0;
-	}
-
-	*start = &buf[offset];
-	*eof   = 0;
-
-	DRM_PROC_PRINT("vma use count: %d, high_memory = %p, 0x%08lx\n",
-		       atomic_read(&dev->vma_count),
-		       high_memory, virt_to_phys(high_memory));
-	for (pt = dev->vmalist; pt; pt = pt->next) {
-		if (!(vma = pt->vma)) continue;
-		DRM_PROC_PRINT("\n%5d 0x%08lx-0x%08lx %c%c%c%c%c%c 0x%08lx",
-			       pt->pid,
-			       vma->vm_start,
-			       vma->vm_end,
-			       vma->vm_flags & VM_READ	   ? 'r' : '-',
-			       vma->vm_flags & VM_WRITE	   ? 'w' : '-',
-			       vma->vm_flags & VM_EXEC	   ? 'x' : '-',
-			       vma->vm_flags & VM_MAYSHARE ? 's' : 'p',
-			       vma->vm_flags & VM_LOCKED   ? 'l' : '-',
-			       vma->vm_flags & VM_IO	   ? 'i' : '-',
-			       VM_OFFSET(vma));
-
-#if defined(__i386__)
-		pgprot = pgprot_val(vma->vm_page_prot);
-		DRM_PROC_PRINT(" %c%c%c%c%c%c%c%c%c",
-			       pgprot & _PAGE_PRESENT  ? 'p' : '-',
-			       pgprot & _PAGE_RW       ? 'w' : 'r',
-			       pgprot & _PAGE_USER     ? 'u' : 's',
-			       pgprot & _PAGE_PWT      ? 't' : 'b',
-			       pgprot & _PAGE_PCD      ? 'u' : 'c',
-			       pgprot & _PAGE_ACCESSED ? 'a' : '-',
-			       pgprot & _PAGE_DIRTY    ? 'd' : '-',
-			       pgprot & _PAGE_PSE      ? 'm' : 'k',
-			       pgprot & _PAGE_GLOBAL   ? 'g' : 'l' );
-#endif
-		DRM_PROC_PRINT("\n");
-	}
-
-	if (len > request + offset) return request;
-	*eof = 1;
-	return len - offset;
-}
-
-static int DRM(vma_info)(char *buf, char **start, off_t offset, int request,
-			 int *eof, void *data)
-{
-	drm_device_t *dev = (drm_device_t *)data;
-	int	     ret;
-
-	down(&dev->struct_sem);
-	ret = DRM(_vma_info)(buf, start, offset, request, eof, data);
-	up(&dev->struct_sem);
-	return ret;
-}
-#endif
-
-
diff -Nru a/drivers/char/drm/drm_scatter.c b/drivers/char/drm/drm_scatter.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/char/drm/drm_scatter.c	2005-01-10 20:11:20 -08:00
@@ -0,0 +1,231 @@
+/**
+ * \file drm_scatter.h 
+ * IOCTLs to manage scatter/gather memory
+ *
+ * \author Gareth Hughes <gareth@valinux.com>
+ */
+
+/*
+ * Created: Mon Dec 18 23:20:54 2000 by gareth@valinux.com
+ *
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#include <linux/config.h>
+#include <linux/vmalloc.h>
+#include "drmP.h"
+
+#define DEBUG_SCATTER 0
+
+void drm_sg_cleanup( drm_sg_mem_t *entry )
+{
+	struct page *page;
+	int i;
+
+	for ( i = 0 ; i < entry->pages ; i++ ) {
+		page = entry->pagelist[i];
+		if ( page )
+			ClearPageReserved( page );
+	}
+
+	vfree( entry->virtual );
+
+	drm_free( entry->busaddr,
+		   entry->pages * sizeof(*entry->busaddr),
+		   DRM_MEM_PAGES );
+	drm_free( entry->pagelist,
+		   entry->pages * sizeof(*entry->pagelist),
+		   DRM_MEM_PAGES );
+	drm_free( entry,
+		   sizeof(*entry),
+		   DRM_MEM_SGLISTS );
+}
+
+int drm_sg_alloc( struct inode *inode, struct file *filp,
+		   unsigned int cmd, unsigned long arg )
+{
+	drm_file_t *priv = filp->private_data;
+	drm_device_t *dev = priv->dev;
+	drm_scatter_gather_t __user *argp = (void __user *)arg;
+	drm_scatter_gather_t request;
+	drm_sg_mem_t *entry;
+	unsigned long pages, i, j;
+
+	DRM_DEBUG( "%s\n", __FUNCTION__ );
+
+	if (!drm_core_check_feature(dev, DRIVER_SG))
+		return -EINVAL;
+
+	if ( dev->sg )
+		return -EINVAL;
+
+	if ( copy_from_user( &request, argp, sizeof(request) ) )
+		return -EFAULT;
+
+	entry = drm_alloc( sizeof(*entry), DRM_MEM_SGLISTS );
+	if ( !entry )
+		return -ENOMEM;
+
+   	memset( entry, 0, sizeof(*entry) );
+
+	pages = (request.size + PAGE_SIZE - 1) / PAGE_SIZE;
+	DRM_DEBUG( "sg size=%ld pages=%ld\n", request.size, pages );
+
+	entry->pages = pages;
+	entry->pagelist = drm_alloc( pages * sizeof(*entry->pagelist),
+				     DRM_MEM_PAGES );
+	if ( !entry->pagelist ) {
+		drm_free( entry, sizeof(*entry), DRM_MEM_SGLISTS );
+		return -ENOMEM;
+	}
+
+	memset(entry->pagelist, 0, pages * sizeof(*entry->pagelist));
+
+	entry->busaddr = drm_alloc( pages * sizeof(*entry->busaddr),
+				     DRM_MEM_PAGES );
+	if ( !entry->busaddr ) {
+		drm_free( entry->pagelist,
+			   entry->pages * sizeof(*entry->pagelist),
+			   DRM_MEM_PAGES );
+		drm_free( entry,
+			   sizeof(*entry),
+			   DRM_MEM_SGLISTS );
+		return -ENOMEM;
+	}
+	memset( (void *)entry->busaddr, 0, pages * sizeof(*entry->busaddr) );
+
+	entry->virtual = vmalloc_32( pages << PAGE_SHIFT );
+	if ( !entry->virtual ) {
+		drm_free( entry->busaddr,
+			   entry->pages * sizeof(*entry->busaddr),
+			   DRM_MEM_PAGES );
+		drm_free( entry->pagelist,
+			   entry->pages * sizeof(*entry->pagelist),
+			   DRM_MEM_PAGES );
+		drm_free( entry,
+			   sizeof(*entry),
+			   DRM_MEM_SGLISTS );
+		return -ENOMEM;
+	}
+
+	/* This also forces the mapping of COW pages, so our page list
+	 * will be valid.  Please don't remove it...
+	 */
+	memset( entry->virtual, 0, pages << PAGE_SHIFT );
+
+	entry->handle = (unsigned long)entry->virtual;
+
+	DRM_DEBUG( "sg alloc handle  = %08lx\n", entry->handle );
+	DRM_DEBUG( "sg alloc virtual = %p\n", entry->virtual );
+
+	for ( i = entry->handle, j = 0 ; j < pages ; i += PAGE_SIZE, j++ ) {
+		entry->pagelist[j] = vmalloc_to_page((void *)i);
+		if (!entry->pagelist[j])
+			goto failed;
+		SetPageReserved(entry->pagelist[j]);
+	}
+
+	request.handle = entry->handle;
+
+	if ( copy_to_user( argp, &request, sizeof(request) ) ) {
+		drm_sg_cleanup( entry );
+		return -EFAULT;
+	}
+
+	dev->sg = entry;
+
+#if DEBUG_SCATTER
+	/* Verify that each page points to its virtual address, and vice
+	 * versa.
+	 */
+	{
+	int error = 0;
+
+	for ( i = 0 ; i < pages ; i++ ) {
+		unsigned long *tmp;
+
+		tmp = page_address( entry->pagelist[i] );
+		for ( j = 0 ;
+		      j < PAGE_SIZE / sizeof(unsigned long) ;
+		      j++, tmp++ ) {
+			*tmp = 0xcafebabe;
+		}
+		tmp = (unsigned long *)((u8 *)entry->virtual +
+					(PAGE_SIZE * i));
+		for( j = 0 ;
+		     j < PAGE_SIZE / sizeof(unsigned long) ;
+		     j++, tmp++ ) {
+			if ( *tmp != 0xcafebabe && error == 0 ) {
+				error = 1;
+				DRM_ERROR( "Scatter allocation error, "
+					   "pagelist does not match "
+					   "virtual mapping\n" );
+			}
+		}
+		tmp = page_address( entry->pagelist[i] );
+		for(j = 0 ;
+		    j < PAGE_SIZE / sizeof(unsigned long) ;
+		    j++, tmp++) {
+			*tmp = 0;
+		}
+	}
+	if (error == 0)
+		DRM_ERROR( "Scatter allocation matches pagelist\n" );
+	}
+#endif
+
+	return 0;
+
+ failed:
+	drm_sg_cleanup( entry );
+	return -ENOMEM;
+}
+
+int drm_sg_free( struct inode *inode, struct file *filp,
+		 unsigned int cmd, unsigned long arg )
+{
+	drm_file_t *priv = filp->private_data;
+	drm_device_t *dev = priv->dev;
+	drm_scatter_gather_t request;
+	drm_sg_mem_t *entry;
+
+	if (!drm_core_check_feature(dev, DRIVER_SG))
+		return -EINVAL;
+
+	if ( copy_from_user( &request,
+			     (drm_scatter_gather_t __user *)arg,
+			     sizeof(request) ) )
+		return -EFAULT;
+
+	entry = dev->sg;
+	dev->sg = NULL;
+
+	if ( !entry || entry->handle != request.handle )
+		return -EINVAL;
+
+	DRM_DEBUG( "sg free virtual  = %p\n", entry->virtual );
+
+	drm_sg_cleanup( entry );
+
+	return 0;
+}
diff -Nru a/drivers/char/drm/drm_scatter.h b/drivers/char/drm/drm_scatter.h
--- a/drivers/char/drm/drm_scatter.h	2005-01-10 20:11:20 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,231 +0,0 @@
-/**
- * \file drm_scatter.h 
- * IOCTLs to manage scatter/gather memory
- *
- * \author Gareth Hughes <gareth@valinux.com>
- */
-
-/*
- * Created: Mon Dec 18 23:20:54 2000 by gareth@valinux.com
- *
- * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-
-#include <linux/config.h>
-#include <linux/vmalloc.h>
-#include "drmP.h"
-
-#define DEBUG_SCATTER 0
-
-void DRM(sg_cleanup)( drm_sg_mem_t *entry )
-{
-	struct page *page;
-	int i;
-
-	for ( i = 0 ; i < entry->pages ; i++ ) {
-		page = entry->pagelist[i];
-		if ( page )
-			ClearPageReserved( page );
-	}
-
-	vfree( entry->virtual );
-
-	DRM(free)( entry->busaddr,
-		   entry->pages * sizeof(*entry->busaddr),
-		   DRM_MEM_PAGES );
-	DRM(free)( entry->pagelist,
-		   entry->pages * sizeof(*entry->pagelist),
-		   DRM_MEM_PAGES );
-	DRM(free)( entry,
-		   sizeof(*entry),
-		   DRM_MEM_SGLISTS );
-}
-
-int DRM(sg_alloc)( struct inode *inode, struct file *filp,
-		   unsigned int cmd, unsigned long arg )
-{
-	drm_file_t *priv = filp->private_data;
-	drm_device_t *dev = priv->dev;
-	drm_scatter_gather_t __user *argp = (void __user *)arg;
-	drm_scatter_gather_t request;
-	drm_sg_mem_t *entry;
-	unsigned long pages, i, j;
-
-	DRM_DEBUG( "%s\n", __FUNCTION__ );
-
-	if (!drm_core_check_feature(dev, DRIVER_SG))
-		return -EINVAL;
-
-	if ( dev->sg )
-		return -EINVAL;
-
-	if ( copy_from_user( &request, argp, sizeof(request) ) )
-		return -EFAULT;
-
-	entry = DRM(alloc)( sizeof(*entry), DRM_MEM_SGLISTS );
-	if ( !entry )
-		return -ENOMEM;
-
-   	memset( entry, 0, sizeof(*entry) );
-
-	pages = (request.size + PAGE_SIZE - 1) / PAGE_SIZE;
-	DRM_DEBUG( "sg size=%ld pages=%ld\n", request.size, pages );
-
-	entry->pages = pages;
-	entry->pagelist = DRM(alloc)( pages * sizeof(*entry->pagelist),
-				     DRM_MEM_PAGES );
-	if ( !entry->pagelist ) {
-		DRM(free)( entry, sizeof(*entry), DRM_MEM_SGLISTS );
-		return -ENOMEM;
-	}
-
-	memset(entry->pagelist, 0, pages * sizeof(*entry->pagelist));
-
-	entry->busaddr = DRM(alloc)( pages * sizeof(*entry->busaddr),
-				     DRM_MEM_PAGES );
-	if ( !entry->busaddr ) {
-		DRM(free)( entry->pagelist,
-			   entry->pages * sizeof(*entry->pagelist),
-			   DRM_MEM_PAGES );
-		DRM(free)( entry,
-			   sizeof(*entry),
-			   DRM_MEM_SGLISTS );
-		return -ENOMEM;
-	}
-	memset( (void *)entry->busaddr, 0, pages * sizeof(*entry->busaddr) );
-
-	entry->virtual = vmalloc_32( pages << PAGE_SHIFT );
-	if ( !entry->virtual ) {
-		DRM(free)( entry->busaddr,
-			   entry->pages * sizeof(*entry->busaddr),
-			   DRM_MEM_PAGES );
-		DRM(free)( entry->pagelist,
-			   entry->pages * sizeof(*entry->pagelist),
-			   DRM_MEM_PAGES );
-		DRM(free)( entry,
-			   sizeof(*entry),
-			   DRM_MEM_SGLISTS );
-		return -ENOMEM;
-	}
-
-	/* This also forces the mapping of COW pages, so our page list
-	 * will be valid.  Please don't remove it...
-	 */
-	memset( entry->virtual, 0, pages << PAGE_SHIFT );
-
-	entry->handle = (unsigned long)entry->virtual;
-
-	DRM_DEBUG( "sg alloc handle  = %08lx\n", entry->handle );
-	DRM_DEBUG( "sg alloc virtual = %p\n", entry->virtual );
-
-	for ( i = entry->handle, j = 0 ; j < pages ; i += PAGE_SIZE, j++ ) {
-		entry->pagelist[j] = vmalloc_to_page((void *)i);
-		if (!entry->pagelist[j])
-			goto failed;
-		SetPageReserved(entry->pagelist[j]);
-	}
-
-	request.handle = entry->handle;
-
-	if ( copy_to_user( argp, &request, sizeof(request) ) ) {
-		DRM(sg_cleanup)( entry );
-		return -EFAULT;
-	}
-
-	dev->sg = entry;
-
-#if DEBUG_SCATTER
-	/* Verify that each page points to its virtual address, and vice
-	 * versa.
-	 */
-	{
-	int error = 0;
-
-	for ( i = 0 ; i < pages ; i++ ) {
-		unsigned long *tmp;
-
-		tmp = page_address( entry->pagelist[i] );
-		for ( j = 0 ;
-		      j < PAGE_SIZE / sizeof(unsigned long) ;
-		      j++, tmp++ ) {
-			*tmp = 0xcafebabe;
-		}
-		tmp = (unsigned long *)((u8 *)entry->virtual +
-					(PAGE_SIZE * i));
-		for( j = 0 ;
-		     j < PAGE_SIZE / sizeof(unsigned long) ;
-		     j++, tmp++ ) {
-			if ( *tmp != 0xcafebabe && error == 0 ) {
-				error = 1;
-				DRM_ERROR( "Scatter allocation error, "
-					   "pagelist does not match "
-					   "virtual mapping\n" );
-			}
-		}
-		tmp = page_address( entry->pagelist[i] );
-		for(j = 0 ;
-		    j < PAGE_SIZE / sizeof(unsigned long) ;
-		    j++, tmp++) {
-			*tmp = 0;
-		}
-	}
-	if (error == 0)
-		DRM_ERROR( "Scatter allocation matches pagelist\n" );
-	}
-#endif
-
-	return 0;
-
- failed:
-	DRM(sg_cleanup)( entry );
-	return -ENOMEM;
-}
-
-int DRM(sg_free)( struct inode *inode, struct file *filp,
-		 unsigned int cmd, unsigned long arg )
-{
-	drm_file_t *priv = filp->private_data;
-	drm_device_t *dev = priv->dev;
-	drm_scatter_gather_t request;
-	drm_sg_mem_t *entry;
-
-	if (!drm_core_check_feature(dev, DRIVER_SG))
-		return -EINVAL;
-
-	if ( copy_from_user( &request,
-			     (drm_scatter_gather_t __user *)arg,
-			     sizeof(request) ) )
-		return -EFAULT;
-
-	entry = dev->sg;
-	dev->sg = NULL;
-
-	if ( !entry || entry->handle != request.handle )
-		return -EINVAL;
-
-	DRM_DEBUG( "sg free virtual  = %p\n", entry->virtual );
-
-	DRM(sg_cleanup)( entry );
-
-	return 0;
-}
diff -Nru a/drivers/char/drm/drm_stub.c b/drivers/char/drm/drm_stub.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/char/drm/drm_stub.c	2005-01-10 20:11:21 -08:00
@@ -0,0 +1,256 @@
+/**
+ * \file drm_stub.h
+ * Stub support
+ *
+ * \author Rickard E. (Rik) Faith <faith@valinux.com>
+ */
+
+/*
+ * Created: Fri Jan 19 10:48:35 2001 by faith@acm.org
+ *
+ * Copyright 2001 VA Linux Systems, Inc., Sunnyvale, California.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#include <linux/module.h>
+#include <linux/moduleparam.h>
+#include "drmP.h"
+#include "drm_core.h"
+
+unsigned int drm_cards_limit = 16;	/* Enough for one machine */
+unsigned int drm_debug = 0;		/* 1 to enable debug output */
+EXPORT_SYMBOL(drm_debug);
+
+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+MODULE_LICENSE("GPL and additional rights");
+MODULE_PARM_DESC(drm_cards_limit, "Maximum number of graphics cards");
+MODULE_PARM_DESC(drm_debug, "Enable debug output");
+
+module_param_named(cards_limit, drm_cards_limit, int, 0444);
+module_param_named(debug, drm_debug, int, 0666);
+
+drm_minor_t *drm_minors;
+struct class_simple *drm_class;
+struct proc_dir_entry *drm_proc_root;
+
+static int drm_fill_in_dev(drm_device_t *dev, struct pci_dev *pdev, const struct pci_device_id *ent, struct drm_driver *driver)
+{
+	int retcode;
+
+	spin_lock_init(&dev->count_lock);
+	init_timer( &dev->timer );
+	sema_init( &dev->struct_sem, 1 );
+	sema_init( &dev->ctxlist_sem, 1 );
+
+	dev->pdev   = pdev;
+
+#ifdef __alpha__
+	dev->hose   = pdev->sysdata;
+	dev->pci_domain = dev->hose->bus->number;
+#else
+	dev->pci_domain = 0;
+#endif
+	dev->pci_bus = pdev->bus->number;
+	dev->pci_slot = PCI_SLOT(pdev->devfn);
+	dev->pci_func = PCI_FUNC(pdev->devfn);
+	dev->irq = pdev->irq;
+
+	/* the DRM has 6 basic counters */
+	dev->counters = 6;
+	dev->types[0]  = _DRM_STAT_LOCK;
+	dev->types[1]  = _DRM_STAT_OPENS;
+	dev->types[2]  = _DRM_STAT_CLOSES;
+	dev->types[3]  = _DRM_STAT_IOCTLS;
+	dev->types[4]  = _DRM_STAT_LOCKS;
+	dev->types[5]  = _DRM_STAT_UNLOCKS;
+
+	dev->driver = driver;
+	
+	if (dev->driver->preinit)
+		if ((retcode = dev->driver->preinit(dev)))
+			goto error_out_unreg;
+
+	if (drm_core_has_AGP(dev)) {
+		dev->agp = drm_agp_init();
+		if (drm_core_check_feature(dev, DRIVER_REQUIRE_AGP) && (dev->agp == NULL)) {
+			DRM_ERROR( "Cannot initialize the agpgart module.\n" );
+			retcode = -EINVAL;
+			goto error_out_unreg;
+		}
+		if (drm_core_has_MTRR(dev)) {
+			if (dev->agp)
+				dev->agp->agp_mtrr = mtrr_add( dev->agp->agp_info.aper_base,
+							       dev->agp->agp_info.aper_size*1024*1024,
+							       MTRR_TYPE_WRCOMB,
+							       1 );
+		}
+	}
+
+	retcode = drm_ctxbitmap_init( dev );
+	if( retcode ) {
+		DRM_ERROR( "Cannot allocate memory for context bitmap.\n" );
+		goto error_out_unreg;
+	}
+
+	dev->device = MKDEV(DRM_MAJOR, dev->minor );
+
+	/* postinit is a required function to display the signon banner */
+	if ((retcode = dev->driver->postinit(dev, ent->driver_data)))
+		goto error_out_unreg;
+
+	return 0;
+	
+error_out_unreg:
+	drm_takedown(dev);
+	return retcode;
+}
+
+/**
+ * File \c open operation.
+ *
+ * \param inode device inode.
+ * \param filp file pointer.
+ *
+ * Puts the dev->fops corresponding to the device minor number into
+ * \p filp, call the \c open method, and restore the file operations.
+ */
+int drm_stub_open(struct inode *inode, struct file *filp)
+{
+	drm_device_t *dev = NULL;
+	int minor = iminor(inode);
+	int err = -ENODEV;
+	struct file_operations *old_fops;
+	
+	DRM_DEBUG("\n");
+
+	if (!((minor >= 0) && (minor < drm_cards_limit)))
+		return -ENODEV;
+
+	dev = drm_minors[minor].dev;
+	if (!dev)
+		return -ENODEV;
+
+	old_fops = filp->f_op;
+	filp->f_op = fops_get(&dev->driver->fops);
+	if (filp->f_op->open && (err = filp->f_op->open(inode, filp))) {
+		fops_put(filp->f_op);
+		filp->f_op = fops_get(old_fops);
+	}
+	fops_put(old_fops);
+
+	return err;
+}
+
+/**
+ * Get a device minor number.
+ *
+ * \param pdev PCI device structure
+ * \param ent entry from the PCI ID table with device type flags
+ * \return zero on success or a negative number on failure.
+ *
+ * Attempt to gets inter module "drm" information. If we are first
+ * then register the character device and inter module information.
+ * Try and register, if we fail to register, backout previous work.
+ */
+int drm_probe(struct pci_dev *pdev, const struct pci_device_id *ent, struct drm_driver *driver)
+{
+	struct class_device *dev_class;
+	drm_device_t *dev;
+	int ret;
+	int minor;
+	drm_minor_t *minors = &drm_minors[0];
+
+	DRM_DEBUG("\n");
+
+	for (minor = 0; minor < drm_cards_limit; minor++, minors++) {
+		if (minors->type == DRM_MINOR_FREE) {
+
+			DRM_DEBUG("assigning minor %d\n", minor);
+			dev = drm_calloc(1, sizeof(*dev), DRM_MEM_STUB);
+			if (!dev)
+				return -ENOMEM;
+
+			*minors = (drm_minor_t){.dev = dev, .type=DRM_MINOR_PRIMARY};
+			dev->minor = minor;
+
+			pci_enable_device(pdev);
+
+			if ((ret=drm_fill_in_dev(dev, pdev, ent, driver))) {
+				printk(KERN_ERR "DRM: Fill_in_dev failed.\n");
+				goto err_g1;
+			}
+			if ((ret = drm_proc_init(dev, minor, drm_proc_root, &minors->dev_root))) {
+				printk (KERN_ERR "DRM: Failed to initialize /proc/dri.\n");
+				goto err_g1;
+			}
+
+			
+			dev_class = class_simple_device_add(drm_class, 
+							    MKDEV(DRM_MAJOR, minor), &pdev->dev, "card%d", minor);
+			if (IS_ERR(dev_class)) {
+				printk(KERN_ERR "DRM: Error class_simple_device_add.\n");
+				ret = PTR_ERR(dev_class);
+				goto err_g2;
+			}
+			
+			DRM_DEBUG("new minor assigned %d\n", minor);
+			return 0;
+		}
+	}
+	DRM_ERROR("out of minors\n");
+	return -ENOMEM;
+err_g2:
+	drm_proc_cleanup(minor, drm_proc_root, minors->dev_root);
+err_g1:
+	*minors = (drm_minor_t){.dev = NULL, .type = DRM_MINOR_FREE};
+	drm_free(dev, sizeof(*dev), DRM_MEM_STUB);
+	return ret;
+}
+EXPORT_SYMBOL(drm_probe);
+		
+
+/**
+ * Put a device minor number.
+ *
+ * \param minor minor number.
+ * \return always zero.
+ *
+ * Cleans up the proc resources. If a minor is zero then release the foreign
+ * "drm" data, otherwise unregisters the "drm" data, frees the stub list and
+ * unregisters the character device. 
+ */
+int drm_put_minor(drm_device_t *dev)
+{
+	drm_minor_t *minors = &drm_minors[dev->minor];
+	
+	DRM_DEBUG("release minor %d\n", dev->minor);
+	
+	drm_proc_cleanup(dev->minor, drm_proc_root, minors->dev_root);
+	class_simple_device_remove(MKDEV(DRM_MAJOR, dev->minor));
+	
+	*minors = (drm_minor_t){.dev = NULL, .type = DRM_MINOR_FREE};
+	drm_free(dev, sizeof(*dev), DRM_MEM_STUB);
+	
+	return 0;
+}
+
diff -Nru a/drivers/char/drm/drm_stub.h b/drivers/char/drm/drm_stub.h
--- a/drivers/char/drm/drm_stub.h	2005-01-10 20:11:21 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,236 +0,0 @@
-/**
- * \file drm_stub.h
- * Stub support
- *
- * \author Rickard E. (Rik) Faith <faith@valinux.com>
- */
-
-/*
- * Created: Fri Jan 19 10:48:35 2001 by faith@acm.org
- *
- * Copyright 2001 VA Linux Systems, Inc., Sunnyvale, California.
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-
-#include "drmP.h"
-
-#define DRM_STUB_MAXCARDS 16	/* Enough for one machine */
-
-static struct class_simple *drm_class;
-
-/** Stub list. One for each minor. */
-static struct drm_stub_list {
-	const char             *name;
-	struct file_operations *fops;	/**< file operations */
-	struct proc_dir_entry  *dev_root;	/**< proc directory entry */
-} *DRM(stub_list);
-
-static struct proc_dir_entry *DRM(stub_root);
-
-/** Stub information */
-static struct drm_stub_info {
-	int (*info_register)(const char *name, struct file_operations *fops,
-			     drm_device_t *dev);
-	int (*info_unregister)(int minor);
-} DRM(stub_info);
-
-/**
- * File \c open operation.
- *
- * \param inode device inode.
- * \param filp file pointer.
- *
- * Puts the drm_stub_list::fops corresponding to the device minor number into
- * \p filp, call the \c open method, and restore the file operations.
- */
-static int DRM(stub_open)(struct inode *inode, struct file *filp)
-{
-	int                    minor = iminor(inode);
-	int                    err   = -ENODEV;
-	struct file_operations *old_fops;
-
-	if (!DRM(stub_list) || !DRM(stub_list)[minor].fops) return -ENODEV;
-	old_fops   = filp->f_op;
-	filp->f_op = fops_get(DRM(stub_list)[minor].fops);
-	if (filp->f_op->open && (err = filp->f_op->open(inode, filp))) {
-		fops_put(filp->f_op);
-		filp->f_op = fops_get(old_fops);
-	}
-	fops_put(old_fops);
-
-	return err;
-}
-
-/** File operations structure */
-static struct file_operations DRM(stub_fops) = {
-	.owner = THIS_MODULE,
-	.open  = DRM(stub_open)
-};
-
-/**
- * Get a device minor number.
- *
- * \param name driver name.
- * \param fops file operations.
- * \param dev DRM device.
- * \return minor number on success, or a negative number on failure.
- *
- * Allocate and initialize ::stub_list if one doesn't exist already.  Search an
- * empty entry and initialize it to the given parameters, and create the proc
- * init entry via proc_init().
- */
-static int DRM(stub_getminor)(const char *name, struct file_operations *fops,
-			      drm_device_t *dev)
-{
-	int i;
-
-	if (!DRM(stub_list)) {
-		DRM(stub_list) = DRM(alloc)(sizeof(*DRM(stub_list))
-					    * DRM_STUB_MAXCARDS, DRM_MEM_STUB);
-		if(!DRM(stub_list)) return -1;
-		for (i = 0; i < DRM_STUB_MAXCARDS; i++) {
-			DRM(stub_list)[i].name = NULL;
-			DRM(stub_list)[i].fops = NULL;
-		}
-	}
-	for (i = 0; i < DRM_STUB_MAXCARDS; i++) {
-		if (!DRM(stub_list)[i].fops) {
-			DRM(stub_list)[i].name = name;
-			DRM(stub_list)[i].fops = fops;
-			DRM(stub_root) = DRM(proc_init)(dev, i, DRM(stub_root),
-							&DRM(stub_list)[i]
-							.dev_root);
-			class_simple_device_add(drm_class, MKDEV(DRM_MAJOR, i), NULL, name);
-			return i;
-		}
-	}
-	return -1;
-}
-
-/**
- * Put a device minor number.
- *
- * \param minor minor number.
- * \return always zero.
- *
- * Cleans up the proc resources. If a minor is zero then release the foreign
- * "drm" data, otherwise unregisters the "drm" data, frees the stub list and
- * unregisters the character device. 
- */
-static int DRM(stub_putminor)(int minor)
-{
-	if (minor < 0 || minor >= DRM_STUB_MAXCARDS) return -1;
-	DRM(stub_list)[minor].name = NULL;
-	DRM(stub_list)[minor].fops = NULL;
-	DRM(proc_cleanup)(minor, DRM(stub_root),
-			  DRM(stub_list)[minor].dev_root);
-	if (minor) {
-		class_simple_device_remove(MKDEV(DRM_MAJOR, minor));
-		inter_module_put("drm");
-	} else {
-		inter_module_unregister("drm");
-		DRM(free)(DRM(stub_list),
-			  sizeof(*DRM(stub_list)) * DRM_STUB_MAXCARDS,
-			  DRM_MEM_STUB);
-		unregister_chrdev(DRM_MAJOR, "drm");
-		class_simple_device_remove(MKDEV(DRM_MAJOR, minor));
-		class_simple_destroy(drm_class);
-	}
-	return 0;
-}
-
-/**
- * Register.
- *
- * \param name driver name.
- * \param fops file operations
- * \param dev DRM device.
- * \return zero on success or a negative number on failure.
- *
- * Attempt to register the char device and get the foreign "drm" data. If
- * successful then another module already registered so gets the stub info,
- * otherwise use this module stub info and make it available for other modules.
- *
- * Finally calls stub_info::info_register.
- */
-int DRM(stub_register)(const char *name, struct file_operations *fops,
-		       drm_device_t *dev)
-{
-	struct drm_stub_info *i = NULL;
-	int ret1;
-	int ret2;
-
-	DRM_DEBUG("\n");
-	ret1 = register_chrdev(DRM_MAJOR, "drm", &DRM(stub_fops));
-	if (!ret1) {
-		drm_class = class_simple_create(THIS_MODULE, "drm");
-		if (IS_ERR(drm_class)) {
-			printk (KERN_ERR "Error creating drm class.\n");
-			unregister_chrdev(DRM_MAJOR, "drm");
-			return PTR_ERR(drm_class);
-		}
-	}
-	else if (ret1 == -EBUSY)
-		i = (struct drm_stub_info *)inter_module_get("drm");
-	else
-		return -1;
-
-	if (i) {
-				/* Already registered */
-		DRM(stub_info).info_register   = i->info_register;
-		DRM(stub_info).info_unregister = i->info_unregister;
-		DRM_DEBUG("already registered\n");
-	} else if (DRM(stub_info).info_register != DRM(stub_getminor)) {
-		DRM(stub_info).info_register   = DRM(stub_getminor);
-		DRM(stub_info).info_unregister = DRM(stub_putminor);
-		DRM_DEBUG("calling inter_module_register\n");
-		inter_module_register("drm", THIS_MODULE, &DRM(stub_info));
-	}
-	if (DRM(stub_info).info_register) {
-		ret2 = DRM(stub_info).info_register(name, fops, dev);
-		if (ret2) {
-			if (!ret1) {
-				unregister_chrdev(DRM_MAJOR, "drm");
-				class_simple_destroy(drm_class);
-			}
-			if (!i)
-				inter_module_unregister("drm");
-		}
-		return ret2;
-	}
-	return -1;
-}
-
-/**
- * Unregister.
- *
- * \param minor
- *
- * Calls drm_stub_info::unregister.
- */
-int DRM(stub_unregister)(int minor)
-{
-	DRM_DEBUG("%d\n", minor);
-	if (DRM(stub_info).info_unregister)
-		return DRM(stub_info).info_unregister(minor);
-	return -1;
-}
diff -Nru a/drivers/char/drm/drm_vm.c b/drivers/char/drm/drm_vm.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/char/drm/drm_vm.c	2005-01-10 20:11:23 -08:00
@@ -0,0 +1,670 @@
+/**
+ * \file drm_vm.h
+ * Memory mapping for DRM
+ * 
+ * \author Rickard E. (Rik) Faith <faith@valinux.com>
+ * \author Gareth Hughes <gareth@valinux.com>
+ */
+
+/*
+ * Created: Mon Jan  4 08:58:31 1999 by faith@valinux.com
+ *
+ * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "drmP.h"
+
+
+/**
+ * \c nopage method for AGP virtual memory.
+ *
+ * \param vma virtual memory area.
+ * \param address access address.
+ * \return pointer to the page structure.
+ * 
+ * Find the right map and if it's AGP memory find the real physical page to
+ * map, get the page, increment the use count and return it.
+ */
+#if __OS_HAS_AGP
+static __inline__ struct page *drm_do_vm_nopage(struct vm_area_struct *vma,
+						 unsigned long address)
+{
+	drm_file_t *priv  = vma->vm_file->private_data;
+	drm_device_t *dev = priv->dev;
+	drm_map_t *map    = NULL;
+	drm_map_list_t  *r_list;
+	struct list_head *list;
+
+	/*
+         * Find the right map
+         */
+	if (!drm_core_has_AGP(dev))
+		goto vm_nopage_error;
+
+	if(!dev->agp || !dev->agp->cant_use_aperture) goto vm_nopage_error;
+
+	list_for_each(list, &dev->maplist->head) {
+		r_list = list_entry(list, drm_map_list_t, head);
+		map = r_list->map;
+		if (!map) continue;
+		if (map->offset == VM_OFFSET(vma)) break;
+	}
+
+	if (map && map->type == _DRM_AGP) {
+		unsigned long offset = address - vma->vm_start;
+		unsigned long baddr = VM_OFFSET(vma) + offset;
+		struct drm_agp_mem *agpmem;
+		struct page *page;
+
+#ifdef __alpha__
+		/*
+                 * Adjust to a bus-relative address
+                 */
+		baddr -= dev->hose->mem_space->start;
+#endif
+
+		/*
+                 * It's AGP memory - find the real physical page to map
+                 */
+		for(agpmem = dev->agp->memory; agpmem; agpmem = agpmem->next) {
+			if (agpmem->bound <= baddr &&
+			    agpmem->bound + agpmem->pages * PAGE_SIZE > baddr) 
+				break;
+		}
+
+		if (!agpmem) goto vm_nopage_error;
+
+		/*
+                 * Get the page, inc the use count, and return it
+                 */
+		offset = (baddr - agpmem->bound) >> PAGE_SHIFT;
+		page = virt_to_page(__va(agpmem->memory->memory[offset]));
+		get_page(page);
+
+		DRM_DEBUG("baddr = 0x%lx page = 0x%p, offset = 0x%lx, count=%d\n",
+			  baddr, __va(agpmem->memory->memory[offset]), offset,
+			  page_count(page));
+
+		return page;
+        }
+vm_nopage_error:
+	return NOPAGE_SIGBUS;		/* Disallow mremap */
+}
+#else /* __OS_HAS_AGP */
+static __inline__ struct page *drm_do_vm_nopage(struct vm_area_struct *vma,
+						 unsigned long address)
+{
+	return NOPAGE_SIGBUS;
+}
+#endif /* __OS_HAS_AGP */
+
+/**
+ * \c nopage method for shared virtual memory.
+ *
+ * \param vma virtual memory area.
+ * \param address access address.
+ * \return pointer to the page structure.
+ * 
+ * Get the the mapping, find the real physical page to map, get the page, and
+ * return it.
+ */
+static __inline__ struct page *drm_do_vm_shm_nopage(struct vm_area_struct *vma,
+						     unsigned long address)
+{
+	drm_map_t	 *map	 = (drm_map_t *)vma->vm_private_data;
+	unsigned long	 offset;
+	unsigned long	 i;
+	struct page	 *page;
+
+	if (address > vma->vm_end) return NOPAGE_SIGBUS; /* Disallow mremap */
+	if (!map)    		   return NOPAGE_OOM;  /* Nothing allocated */
+
+	offset	 = address - vma->vm_start;
+	i = (unsigned long)map->handle + offset;
+	page = vmalloc_to_page((void *)i);
+	if (!page)
+		return NOPAGE_OOM;
+	get_page(page);
+
+	DRM_DEBUG("shm_nopage 0x%lx\n", address);
+	return page;
+}
+
+
+/**
+ * \c close method for shared virtual memory.
+ * 
+ * \param vma virtual memory area.
+ * 
+ * Deletes map information if we are the last
+ * person to close a mapping and it's not in the global maplist.
+ */
+void drm_vm_shm_close(struct vm_area_struct *vma)
+{
+	drm_file_t	*priv	= vma->vm_file->private_data;
+	drm_device_t	*dev	= priv->dev;
+	drm_vma_entry_t *pt, *prev, *next;
+	drm_map_t *map;
+	drm_map_list_t *r_list;
+	struct list_head *list;
+	int found_maps = 0;
+
+	DRM_DEBUG("0x%08lx,0x%08lx\n",
+		  vma->vm_start, vma->vm_end - vma->vm_start);
+	atomic_dec(&dev->vma_count);
+
+	map = vma->vm_private_data;
+
+	down(&dev->struct_sem);
+	for (pt = dev->vmalist, prev = NULL; pt; pt = next) {
+		next = pt->next;
+		if (pt->vma->vm_private_data == map) found_maps++;
+		if (pt->vma == vma) {
+			if (prev) {
+				prev->next = pt->next;
+			} else {
+				dev->vmalist = pt->next;
+			}
+			drm_free(pt, sizeof(*pt), DRM_MEM_VMAS);
+		} else {
+			prev = pt;
+		}
+	}
+	/* We were the only map that was found */
+	if(found_maps == 1 &&
+	   map->flags & _DRM_REMOVABLE) {
+		/* Check to see if we are in the maplist, if we are not, then
+		 * we delete this mappings information.
+		 */
+		found_maps = 0;
+		list = &dev->maplist->head;
+		list_for_each(list, &dev->maplist->head) {
+			r_list = list_entry(list, drm_map_list_t, head);
+			if (r_list->map == map) found_maps++;
+		}
+
+		if(!found_maps) {
+			switch (map->type) {
+			case _DRM_REGISTERS:
+			case _DRM_FRAME_BUFFER:
+				if (drm_core_has_MTRR(dev) && map->mtrr >= 0) {
+					int retcode;
+					retcode = mtrr_del(map->mtrr,
+							   map->offset,
+							   map->size);
+					DRM_DEBUG("mtrr_del = %d\n", retcode);
+				}
+				drm_ioremapfree(map->handle, map->size, dev);
+				break;
+			case _DRM_SHM:
+				vfree(map->handle);
+				break;
+			case _DRM_AGP:
+			case _DRM_SCATTER_GATHER:
+				break;
+			}
+			drm_free(map, sizeof(*map), DRM_MEM_MAPS);
+		}
+	}
+	up(&dev->struct_sem);
+}
+
+/**
+ * \c nopage method for DMA virtual memory.
+ *
+ * \param vma virtual memory area.
+ * \param address access address.
+ * \return pointer to the page structure.
+ * 
+ * Determine the page number from the page offset and get it from drm_device_dma::pagelist.
+ */
+static __inline__ struct page *drm_do_vm_dma_nopage(struct vm_area_struct *vma,
+						     unsigned long address)
+{
+	drm_file_t	 *priv	 = vma->vm_file->private_data;
+	drm_device_t	 *dev	 = priv->dev;
+	drm_device_dma_t *dma	 = dev->dma;
+	unsigned long	 offset;
+	unsigned long	 page_nr;
+	struct page	 *page;
+
+	if (!dma)		   return NOPAGE_SIGBUS; /* Error */
+	if (address > vma->vm_end) return NOPAGE_SIGBUS; /* Disallow mremap */
+	if (!dma->pagelist)	   return NOPAGE_OOM ; /* Nothing allocated */
+
+	offset	 = address - vma->vm_start; /* vm_[pg]off[set] should be 0 */
+	page_nr  = offset >> PAGE_SHIFT;
+	page = virt_to_page((dma->pagelist[page_nr] + 
+			     (offset & (~PAGE_MASK))));
+
+	get_page(page);
+
+	DRM_DEBUG("dma_nopage 0x%lx (page %lu)\n", address, page_nr);
+	return page;
+}
+
+/**
+ * \c nopage method for scatter-gather virtual memory.
+ *
+ * \param vma virtual memory area.
+ * \param address access address.
+ * \return pointer to the page structure.
+ * 
+ * Determine the map offset from the page offset and get it from drm_sg_mem::pagelist.
+ */
+static __inline__ struct page *drm_do_vm_sg_nopage(struct vm_area_struct *vma,
+						    unsigned long address)
+{
+	drm_map_t        *map    = (drm_map_t *)vma->vm_private_data;
+	drm_file_t *priv = vma->vm_file->private_data;
+	drm_device_t *dev = priv->dev;
+	drm_sg_mem_t *entry = dev->sg;
+	unsigned long offset;
+	unsigned long map_offset;
+	unsigned long page_offset;
+	struct page *page;
+
+	if (!entry)                return NOPAGE_SIGBUS; /* Error */
+	if (address > vma->vm_end) return NOPAGE_SIGBUS; /* Disallow mremap */
+	if (!entry->pagelist)      return NOPAGE_OOM ;  /* Nothing allocated */
+
+
+	offset = address - vma->vm_start;
+	map_offset = map->offset - dev->sg->handle;
+	page_offset = (offset >> PAGE_SHIFT) + (map_offset >> PAGE_SHIFT);
+	page = entry->pagelist[page_offset];
+	get_page(page);
+
+	return page;
+}
+
+
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0)
+
+static struct page *drm_vm_nopage(struct vm_area_struct *vma,
+				   unsigned long address,
+				   int *type) {
+	if (type) *type = VM_FAULT_MINOR;
+	return drm_do_vm_nopage(vma, address);
+}
+
+static struct page *drm_vm_shm_nopage(struct vm_area_struct *vma,
+				       unsigned long address,
+				       int *type) {
+	if (type) *type = VM_FAULT_MINOR;
+	return drm_do_vm_shm_nopage(vma, address);
+}
+
+static struct page *drm_vm_dma_nopage(struct vm_area_struct *vma,
+				       unsigned long address,
+				       int *type) {
+	if (type) *type = VM_FAULT_MINOR;
+	return drm_do_vm_dma_nopage(vma, address);
+}
+
+static struct page *drm_vm_sg_nopage(struct vm_area_struct *vma,
+				      unsigned long address,
+				      int *type) {
+	if (type) *type = VM_FAULT_MINOR;
+	return drm_do_vm_sg_nopage(vma, address);
+}
+
+#else	/* LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,0) */
+
+static struct page *drm_vm_nopage(struct vm_area_struct *vma,
+				   unsigned long address,
+				   int unused) {
+	return drm_do_vm_nopage(vma, address);
+}
+
+static struct page *drm_vm_shm_nopage(struct vm_area_struct *vma,
+				       unsigned long address,
+				       int unused) {
+	return drm_do_vm_shm_nopage(vma, address);
+}
+
+static struct page *drm_vm_dma_nopage(struct vm_area_struct *vma,
+				       unsigned long address,
+				       int unused) {
+	return drm_do_vm_dma_nopage(vma, address);
+}
+
+static struct page *drm_vm_sg_nopage(struct vm_area_struct *vma,
+				      unsigned long address,
+				      int unused) {
+	return drm_do_vm_sg_nopage(vma, address);
+}
+
+#endif
+
+
+/** AGP virtual memory operations */
+static struct vm_operations_struct   drm_vm_ops = {
+	.nopage = drm_vm_nopage,
+	.open	= drm_vm_open,
+	.close	= drm_vm_close,
+};
+
+/** Shared virtual memory operations */
+static struct vm_operations_struct   drm_vm_shm_ops = {
+	.nopage = drm_vm_shm_nopage,
+	.open	= drm_vm_open,
+	.close	= drm_vm_shm_close,
+};
+
+/** DMA virtual memory operations */
+static struct vm_operations_struct   drm_vm_dma_ops = {
+	.nopage = drm_vm_dma_nopage,
+	.open	= drm_vm_open,
+	.close	= drm_vm_close,
+};
+
+/** Scatter-gather virtual memory operations */
+static struct vm_operations_struct   drm_vm_sg_ops = {
+	.nopage = drm_vm_sg_nopage,
+	.open   = drm_vm_open,
+	.close  = drm_vm_close,
+};
+
+
+/**
+ * \c open method for shared virtual memory.
+ * 
+ * \param vma virtual memory area.
+ * 
+ * Create a new drm_vma_entry structure as the \p vma private data entry and
+ * add it to drm_device::vmalist.
+ */
+void drm_vm_open(struct vm_area_struct *vma)
+{
+	drm_file_t	*priv	= vma->vm_file->private_data;
+	drm_device_t	*dev	= priv->dev;
+	drm_vma_entry_t *vma_entry;
+
+	DRM_DEBUG("0x%08lx,0x%08lx\n",
+		  vma->vm_start, vma->vm_end - vma->vm_start);
+	atomic_inc(&dev->vma_count);
+
+	vma_entry = drm_alloc(sizeof(*vma_entry), DRM_MEM_VMAS);
+	if (vma_entry) {
+		down(&dev->struct_sem);
+		vma_entry->vma	= vma;
+		vma_entry->next = dev->vmalist;
+		vma_entry->pid	= current->pid;
+		dev->vmalist	= vma_entry;
+		up(&dev->struct_sem);
+	}
+}
+
+/**
+ * \c close method for all virtual memory types.
+ * 
+ * \param vma virtual memory area.
+ * 
+ * Search the \p vma private data entry in drm_device::vmalist, unlink it, and
+ * free it.
+ */
+void drm_vm_close(struct vm_area_struct *vma)
+{
+	drm_file_t	*priv	= vma->vm_file->private_data;
+	drm_device_t	*dev	= priv->dev;
+	drm_vma_entry_t *pt, *prev;
+
+	DRM_DEBUG("0x%08lx,0x%08lx\n",
+		  vma->vm_start, vma->vm_end - vma->vm_start);
+	atomic_dec(&dev->vma_count);
+
+	down(&dev->struct_sem);
+	for (pt = dev->vmalist, prev = NULL; pt; prev = pt, pt = pt->next) {
+		if (pt->vma == vma) {
+			if (prev) {
+				prev->next = pt->next;
+			} else {
+				dev->vmalist = pt->next;
+			}
+			drm_free(pt, sizeof(*pt), DRM_MEM_VMAS);
+			break;
+		}
+	}
+	up(&dev->struct_sem);
+}
+
+/**
+ * mmap DMA memory.
+ *
+ * \param filp file pointer.
+ * \param vma virtual memory area.
+ * \return zero on success or a negative number on failure.
+ * 
+ * Sets the virtual memory area operations structure to vm_dma_ops, the file
+ * pointer, and calls vm_open().
+ */
+int drm_mmap_dma(struct file *filp, struct vm_area_struct *vma)
+{
+	drm_file_t	 *priv	 = filp->private_data;
+	drm_device_t	 *dev;
+	drm_device_dma_t *dma;
+	unsigned long	 length	 = vma->vm_end - vma->vm_start;
+
+	lock_kernel();
+	dev	 = priv->dev;
+	dma	 = dev->dma;
+	DRM_DEBUG("start = 0x%lx, end = 0x%lx, offset = 0x%lx\n",
+		  vma->vm_start, vma->vm_end, VM_OFFSET(vma));
+
+				/* Length must match exact page count */
+	if (!dma || (length >> PAGE_SHIFT) != dma->page_count) {
+		unlock_kernel();
+		return -EINVAL;
+	}
+	unlock_kernel();
+
+	vma->vm_ops   = &drm_vm_dma_ops;
+
+#if LINUX_VERSION_CODE <= 0x02040e /* KERNEL_VERSION(2,4,14) */
+	vma->vm_flags |= VM_LOCKED | VM_SHM; /* Don't swap */
+#else
+	vma->vm_flags |= VM_RESERVED; /* Don't swap */
+#endif
+
+	vma->vm_file  =	 filp;	/* Needed for drm_vm_open() */
+	drm_vm_open(vma);
+	return 0;
+}
+
+unsigned long drm_core_get_map_ofs(drm_map_t *map)
+{
+	return map->offset;
+}
+EXPORT_SYMBOL(drm_core_get_map_ofs);
+
+unsigned long drm_core_get_reg_ofs(struct drm_device *dev)
+{
+#ifdef __alpha__
+	return dev->hose->dense_mem_base - dev->hose->mem_space->start;
+#else
+	return 0;
+#endif
+}
+EXPORT_SYMBOL(drm_core_get_reg_ofs);
+
+/**
+ * mmap DMA memory.
+ *
+ * \param filp file pointer.
+ * \param vma virtual memory area.
+ * \return zero on success or a negative number on failure.
+ * 
+ * If the virtual memory area has no offset associated with it then it's a DMA
+ * area, so calls mmap_dma(). Otherwise searches the map in drm_device::maplist,
+ * checks that the restricted flag is not set, sets the virtual memory operations
+ * according to the mapping type and remaps the pages. Finally sets the file
+ * pointer and calls vm_open().
+ */
+int drm_mmap(struct file *filp, struct vm_area_struct *vma)
+{
+	drm_file_t	*priv	= filp->private_data;
+	drm_device_t	*dev	= priv->dev;
+	drm_map_t	*map	= NULL;
+	drm_map_list_t  *r_list;
+	unsigned long   offset  = 0;
+	struct list_head *list;
+
+	DRM_DEBUG("start = 0x%lx, end = 0x%lx, offset = 0x%lx\n",
+		  vma->vm_start, vma->vm_end, VM_OFFSET(vma));
+
+	if ( !priv->authenticated ) return -EACCES;
+
+	/* We check for "dma". On Apple's UniNorth, it's valid to have
+	 * the AGP mapped at physical address 0
+	 * --BenH.
+	 */
+	if (!VM_OFFSET(vma)
+#if __OS_HAS_AGP
+	    && (!dev->agp || dev->agp->agp_info.device->vendor != PCI_VENDOR_ID_APPLE)
+#endif
+	    )
+		return drm_mmap_dma(filp, vma);
+
+				/* A sequential search of a linked list is
+				   fine here because: 1) there will only be
+				   about 5-10 entries in the list and, 2) a
+				   DRI client only has to do this mapping
+				   once, so it doesn't have to be optimized
+				   for performance, even if the list was a
+				   bit longer. */
+	list_for_each(list, &dev->maplist->head) {
+		unsigned long off;
+
+		r_list = list_entry(list, drm_map_list_t, head);
+		map = r_list->map;
+		if (!map) continue;
+		off = dev->driver->get_map_ofs(map);
+		if (off == VM_OFFSET(vma)) break;
+	}
+
+	if (!map || ((map->flags&_DRM_RESTRICTED) && !capable(CAP_SYS_ADMIN)))
+		return -EPERM;
+
+				/* Check for valid size. */
+	if (map->size != vma->vm_end - vma->vm_start) return -EINVAL;
+
+	if (!capable(CAP_SYS_ADMIN) && (map->flags & _DRM_READ_ONLY)) {
+		vma->vm_flags &= ~(VM_WRITE | VM_MAYWRITE);
+#if defined(__i386__) || defined(__x86_64__)
+		pgprot_val(vma->vm_page_prot) &= ~_PAGE_RW;
+#else
+				/* Ye gads this is ugly.  With more thought
+                                   we could move this up higher and use
+                                   `protection_map' instead.  */
+		vma->vm_page_prot = __pgprot(pte_val(pte_wrprotect(
+			__pte(pgprot_val(vma->vm_page_prot)))));
+#endif
+	}
+
+	switch (map->type) {
+        case _DRM_AGP:
+	  if (drm_core_has_AGP(dev) && dev->agp->cant_use_aperture) {
+                /*
+                 * On some platforms we can't talk to bus dma address from the CPU, so for
+                 * memory of type DRM_AGP, we'll deal with sorting out the real physical
+                 * pages and mappings in nopage()
+                 */
+#if defined(__powerpc__)
+		pgprot_val(vma->vm_page_prot) |= _PAGE_NO_CACHE;
+#endif
+                vma->vm_ops = &drm_vm_ops;
+                break;
+	  }
+                /* fall through to _DRM_FRAME_BUFFER... */        
+	case _DRM_FRAME_BUFFER:
+	case _DRM_REGISTERS:
+		if (VM_OFFSET(vma) >= __pa(high_memory)) {
+#if defined(__i386__) || defined(__x86_64__)
+			if (boot_cpu_data.x86 > 3 && map->type != _DRM_AGP) {
+				pgprot_val(vma->vm_page_prot) |= _PAGE_PCD;
+				pgprot_val(vma->vm_page_prot) &= ~_PAGE_PWT;
+			}
+#elif defined(__powerpc__)
+			pgprot_val(vma->vm_page_prot) |= _PAGE_NO_CACHE | _PAGE_GUARDED;
+#endif
+			vma->vm_flags |= VM_IO;	/* not in core dump */
+		}
+#if defined(__ia64__)
+		if (map->type != _DRM_AGP)
+			vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
+#endif
+		offset = dev->driver->get_reg_ofs(dev);
+#ifdef __sparc__
+		if (io_remap_page_range(DRM_RPR_ARG(vma) vma->vm_start,
+					VM_OFFSET(vma) + offset,
+					vma->vm_end - vma->vm_start,
+					vma->vm_page_prot, 0))
+#else
+		if (remap_pfn_range(DRM_RPR_ARG(vma) vma->vm_start,
+				     (VM_OFFSET(vma) + offset) >> PAGE_SHIFT,
+				     vma->vm_end - vma->vm_start,
+				     vma->vm_page_prot))
+#endif
+				return -EAGAIN;
+		DRM_DEBUG("   Type = %d; start = 0x%lx, end = 0x%lx,"
+			  " offset = 0x%lx\n",
+			  map->type,
+			  vma->vm_start, vma->vm_end, VM_OFFSET(vma) + offset);
+		vma->vm_ops = &drm_vm_ops;
+		break;
+	case _DRM_SHM:
+		vma->vm_ops = &drm_vm_shm_ops;
+		vma->vm_private_data = (void *)map;
+				/* Don't let this area swap.  Change when
+				   DRM_KERNEL advisory is supported. */
+#if LINUX_VERSION_CODE <= 0x02040e /* KERNEL_VERSION(2,4,14) */
+		vma->vm_flags |= VM_LOCKED;
+#else
+		vma->vm_flags |= VM_RESERVED;
+#endif
+		break;
+	case _DRM_SCATTER_GATHER:
+		vma->vm_ops = &drm_vm_sg_ops;
+		vma->vm_private_data = (void *)map;
+#if LINUX_VERSION_CODE <= 0x02040e /* KERNEL_VERSION(2,4,14) */
+		vma->vm_flags |= VM_LOCKED;
+#else
+		vma->vm_flags |= VM_RESERVED;
+#endif
+                break;
+	default:
+		return -EINVAL;	/* This should never happen. */
+	}
+#if LINUX_VERSION_CODE <= 0x02040e /* KERNEL_VERSION(2,4,14) */
+	vma->vm_flags |= VM_LOCKED | VM_SHM; /* Don't swap */
+#else
+	vma->vm_flags |= VM_RESERVED; /* Don't swap */
+#endif
+
+	vma->vm_file  =	 filp;	/* Needed for drm_vm_open() */
+	drm_vm_open(vma);
+	return 0;
+}
+EXPORT_SYMBOL(drm_mmap);
diff -Nru a/drivers/char/drm/drm_vm.h b/drivers/char/drm/drm_vm.h
--- a/drivers/char/drm/drm_vm.h	2005-01-10 20:11:23 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,667 +0,0 @@
-/**
- * \file drm_vm.h
- * Memory mapping for DRM
- * 
- * \author Rickard E. (Rik) Faith <faith@valinux.com>
- * \author Gareth Hughes <gareth@valinux.com>
- */
-
-/*
- * Created: Mon Jan  4 08:58:31 1999 by faith@valinux.com
- *
- * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
- * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "drmP.h"
-
-
-/**
- * \c nopage method for AGP virtual memory.
- *
- * \param vma virtual memory area.
- * \param address access address.
- * \return pointer to the page structure.
- * 
- * Find the right map and if it's AGP memory find the real physical page to
- * map, get the page, increment the use count and return it.
- */
-#if __OS_HAS_AGP
-static __inline__ struct page *DRM(do_vm_nopage)(struct vm_area_struct *vma,
-						 unsigned long address)
-{
-	drm_file_t *priv  = vma->vm_file->private_data;
-	drm_device_t *dev = priv->dev;
-	drm_map_t *map    = NULL;
-	drm_map_list_t  *r_list;
-	struct list_head *list;
-
-	/*
-         * Find the right map
-         */
-	if (!drm_core_has_AGP(dev))
-		goto vm_nopage_error;
-
-	if(!dev->agp || !dev->agp->cant_use_aperture) goto vm_nopage_error;
-
-	list_for_each(list, &dev->maplist->head) {
-		r_list = list_entry(list, drm_map_list_t, head);
-		map = r_list->map;
-		if (!map) continue;
-		if (map->offset == VM_OFFSET(vma)) break;
-	}
-
-	if (map && map->type == _DRM_AGP) {
-		unsigned long offset = address - vma->vm_start;
-		unsigned long baddr = VM_OFFSET(vma) + offset;
-		struct drm_agp_mem *agpmem;
-		struct page *page;
-
-#ifdef __alpha__
-		/*
-                 * Adjust to a bus-relative address
-                 */
-		baddr -= dev->hose->mem_space->start;
-#endif
-
-		/*
-                 * It's AGP memory - find the real physical page to map
-                 */
-		for(agpmem = dev->agp->memory; agpmem; agpmem = agpmem->next) {
-			if (agpmem->bound <= baddr &&
-			    agpmem->bound + agpmem->pages * PAGE_SIZE > baddr) 
-				break;
-		}
-
-		if (!agpmem) goto vm_nopage_error;
-
-		/*
-                 * Get the page, inc the use count, and return it
-                 */
-		offset = (baddr - agpmem->bound) >> PAGE_SHIFT;
-		page = virt_to_page(__va(agpmem->memory->memory[offset]));
-		get_page(page);
-
-		DRM_DEBUG("baddr = 0x%lx page = 0x%p, offset = 0x%lx, count=%d\n",
-			  baddr, __va(agpmem->memory->memory[offset]), offset,
-			  page_count(page));
-
-		return page;
-        }
-vm_nopage_error:
-	return NOPAGE_SIGBUS;		/* Disallow mremap */
-}
-#else /* __OS_HAS_AGP */
-static __inline__ struct page *DRM(do_vm_nopage)(struct vm_area_struct *vma,
-						 unsigned long address)
-{
-	return NOPAGE_SIGBUS;
-}
-#endif /* __OS_HAS_AGP */
-
-/**
- * \c nopage method for shared virtual memory.
- *
- * \param vma virtual memory area.
- * \param address access address.
- * \return pointer to the page structure.
- * 
- * Get the the mapping, find the real physical page to map, get the page, and
- * return it.
- */
-static __inline__ struct page *DRM(do_vm_shm_nopage)(struct vm_area_struct *vma,
-						     unsigned long address)
-{
-	drm_map_t	 *map	 = (drm_map_t *)vma->vm_private_data;
-	unsigned long	 offset;
-	unsigned long	 i;
-	struct page	 *page;
-
-	if (address > vma->vm_end) return NOPAGE_SIGBUS; /* Disallow mremap */
-	if (!map)    		   return NOPAGE_OOM;  /* Nothing allocated */
-
-	offset	 = address - vma->vm_start;
-	i = (unsigned long)map->handle + offset;
-	page = vmalloc_to_page((void *)i);
-	if (!page)
-		return NOPAGE_OOM;
-	get_page(page);
-
-	DRM_DEBUG("shm_nopage 0x%lx\n", address);
-	return page;
-}
-
-
-/**
- * \c close method for shared virtual memory.
- * 
- * \param vma virtual memory area.
- * 
- * Deletes map information if we are the last
- * person to close a mapping and it's not in the global maplist.
- */
-void DRM(vm_shm_close)(struct vm_area_struct *vma)
-{
-	drm_file_t	*priv	= vma->vm_file->private_data;
-	drm_device_t	*dev	= priv->dev;
-	drm_vma_entry_t *pt, *prev, *next;
-	drm_map_t *map;
-	drm_map_list_t *r_list;
-	struct list_head *list;
-	int found_maps = 0;
-
-	DRM_DEBUG("0x%08lx,0x%08lx\n",
-		  vma->vm_start, vma->vm_end - vma->vm_start);
-	atomic_dec(&dev->vma_count);
-
-	map = vma->vm_private_data;
-
-	down(&dev->struct_sem);
-	for (pt = dev->vmalist, prev = NULL; pt; pt = next) {
-		next = pt->next;
-		if (pt->vma->vm_private_data == map) found_maps++;
-		if (pt->vma == vma) {
-			if (prev) {
-				prev->next = pt->next;
-			} else {
-				dev->vmalist = pt->next;
-			}
-			DRM(free)(pt, sizeof(*pt), DRM_MEM_VMAS);
-		} else {
-			prev = pt;
-		}
-	}
-	/* We were the only map that was found */
-	if(found_maps == 1 &&
-	   map->flags & _DRM_REMOVABLE) {
-		/* Check to see if we are in the maplist, if we are not, then
-		 * we delete this mappings information.
-		 */
-		found_maps = 0;
-		list = &dev->maplist->head;
-		list_for_each(list, &dev->maplist->head) {
-			r_list = list_entry(list, drm_map_list_t, head);
-			if (r_list->map == map) found_maps++;
-		}
-
-		if(!found_maps) {
-			switch (map->type) {
-			case _DRM_REGISTERS:
-			case _DRM_FRAME_BUFFER:
-				if (drm_core_has_MTRR(dev) && map->mtrr >= 0) {
-					int retcode;
-					retcode = mtrr_del(map->mtrr,
-							   map->offset,
-							   map->size);
-					DRM_DEBUG("mtrr_del = %d\n", retcode);
-				}
-				DRM(ioremapfree)(map->handle, map->size, dev);
-				break;
-			case _DRM_SHM:
-				vfree(map->handle);
-				break;
-			case _DRM_AGP:
-			case _DRM_SCATTER_GATHER:
-				break;
-			}
-			DRM(free)(map, sizeof(*map), DRM_MEM_MAPS);
-		}
-	}
-	up(&dev->struct_sem);
-}
-
-/**
- * \c nopage method for DMA virtual memory.
- *
- * \param vma virtual memory area.
- * \param address access address.
- * \return pointer to the page structure.
- * 
- * Determine the page number from the page offset and get it from drm_device_dma::pagelist.
- */
-static __inline__ struct page *DRM(do_vm_dma_nopage)(struct vm_area_struct *vma,
-						     unsigned long address)
-{
-	drm_file_t	 *priv	 = vma->vm_file->private_data;
-	drm_device_t	 *dev	 = priv->dev;
-	drm_device_dma_t *dma	 = dev->dma;
-	unsigned long	 offset;
-	unsigned long	 page_nr;
-	struct page	 *page;
-
-	if (!dma)		   return NOPAGE_SIGBUS; /* Error */
-	if (address > vma->vm_end) return NOPAGE_SIGBUS; /* Disallow mremap */
-	if (!dma->pagelist)	   return NOPAGE_OOM ; /* Nothing allocated */
-
-	offset	 = address - vma->vm_start; /* vm_[pg]off[set] should be 0 */
-	page_nr  = offset >> PAGE_SHIFT;
-	page = virt_to_page((dma->pagelist[page_nr] + 
-			     (offset & (~PAGE_MASK))));
-
-	get_page(page);
-
-	DRM_DEBUG("dma_nopage 0x%lx (page %lu)\n", address, page_nr);
-	return page;
-}
-
-/**
- * \c nopage method for scatter-gather virtual memory.
- *
- * \param vma virtual memory area.
- * \param address access address.
- * \return pointer to the page structure.
- * 
- * Determine the map offset from the page offset and get it from drm_sg_mem::pagelist.
- */
-static __inline__ struct page *DRM(do_vm_sg_nopage)(struct vm_area_struct *vma,
-						    unsigned long address)
-{
-	drm_map_t        *map    = (drm_map_t *)vma->vm_private_data;
-	drm_file_t *priv = vma->vm_file->private_data;
-	drm_device_t *dev = priv->dev;
-	drm_sg_mem_t *entry = dev->sg;
-	unsigned long offset;
-	unsigned long map_offset;
-	unsigned long page_offset;
-	struct page *page;
-
-	if (!entry)                return NOPAGE_SIGBUS; /* Error */
-	if (address > vma->vm_end) return NOPAGE_SIGBUS; /* Disallow mremap */
-	if (!entry->pagelist)      return NOPAGE_OOM ;  /* Nothing allocated */
-
-
-	offset = address - vma->vm_start;
-	map_offset = map->offset - dev->sg->handle;
-	page_offset = (offset >> PAGE_SHIFT) + (map_offset >> PAGE_SHIFT);
-	page = entry->pagelist[page_offset];
-	get_page(page);
-
-	return page;
-}
-
-
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0)
-
-static struct page *DRM(vm_nopage)(struct vm_area_struct *vma,
-				   unsigned long address,
-				   int *type) {
-	if (type) *type = VM_FAULT_MINOR;
-	return DRM(do_vm_nopage)(vma, address);
-}
-
-static struct page *DRM(vm_shm_nopage)(struct vm_area_struct *vma,
-				       unsigned long address,
-				       int *type) {
-	if (type) *type = VM_FAULT_MINOR;
-	return DRM(do_vm_shm_nopage)(vma, address);
-}
-
-static struct page *DRM(vm_dma_nopage)(struct vm_area_struct *vma,
-				       unsigned long address,
-				       int *type) {
-	if (type) *type = VM_FAULT_MINOR;
-	return DRM(do_vm_dma_nopage)(vma, address);
-}
-
-static struct page *DRM(vm_sg_nopage)(struct vm_area_struct *vma,
-				      unsigned long address,
-				      int *type) {
-	if (type) *type = VM_FAULT_MINOR;
-	return DRM(do_vm_sg_nopage)(vma, address);
-}
-
-#else	/* LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,0) */
-
-static struct page *DRM(vm_nopage)(struct vm_area_struct *vma,
-				   unsigned long address,
-				   int unused) {
-	return DRM(do_vm_nopage)(vma, address);
-}
-
-static struct page *DRM(vm_shm_nopage)(struct vm_area_struct *vma,
-				       unsigned long address,
-				       int unused) {
-	return DRM(do_vm_shm_nopage)(vma, address);
-}
-
-static struct page *DRM(vm_dma_nopage)(struct vm_area_struct *vma,
-				       unsigned long address,
-				       int unused) {
-	return DRM(do_vm_dma_nopage)(vma, address);
-}
-
-static struct page *DRM(vm_sg_nopage)(struct vm_area_struct *vma,
-				      unsigned long address,
-				      int unused) {
-	return DRM(do_vm_sg_nopage)(vma, address);
-}
-
-#endif
-
-
-/** AGP virtual memory operations */
-static struct vm_operations_struct   DRM(vm_ops) = {
-	.nopage = DRM(vm_nopage),
-	.open	= DRM(vm_open),
-	.close	= DRM(vm_close),
-};
-
-/** Shared virtual memory operations */
-static struct vm_operations_struct   DRM(vm_shm_ops) = {
-	.nopage = DRM(vm_shm_nopage),
-	.open	= DRM(vm_open),
-	.close	= DRM(vm_shm_close),
-};
-
-/** DMA virtual memory operations */
-static struct vm_operations_struct   DRM(vm_dma_ops) = {
-	.nopage = DRM(vm_dma_nopage),
-	.open	= DRM(vm_open),
-	.close	= DRM(vm_close),
-};
-
-/** Scatter-gather virtual memory operations */
-static struct vm_operations_struct   DRM(vm_sg_ops) = {
-	.nopage = DRM(vm_sg_nopage),
-	.open   = DRM(vm_open),
-	.close  = DRM(vm_close),
-};
-
-
-/**
- * \c open method for shared virtual memory.
- * 
- * \param vma virtual memory area.
- * 
- * Create a new drm_vma_entry structure as the \p vma private data entry and
- * add it to drm_device::vmalist.
- */
-void DRM(vm_open)(struct vm_area_struct *vma)
-{
-	drm_file_t	*priv	= vma->vm_file->private_data;
-	drm_device_t	*dev	= priv->dev;
-	drm_vma_entry_t *vma_entry;
-
-	DRM_DEBUG("0x%08lx,0x%08lx\n",
-		  vma->vm_start, vma->vm_end - vma->vm_start);
-	atomic_inc(&dev->vma_count);
-
-	vma_entry = DRM(alloc)(sizeof(*vma_entry), DRM_MEM_VMAS);
-	if (vma_entry) {
-		down(&dev->struct_sem);
-		vma_entry->vma	= vma;
-		vma_entry->next = dev->vmalist;
-		vma_entry->pid	= current->pid;
-		dev->vmalist	= vma_entry;
-		up(&dev->struct_sem);
-	}
-}
-
-/**
- * \c close method for all virtual memory types.
- * 
- * \param vma virtual memory area.
- * 
- * Search the \p vma private data entry in drm_device::vmalist, unlink it, and
- * free it.
- */
-void DRM(vm_close)(struct vm_area_struct *vma)
-{
-	drm_file_t	*priv	= vma->vm_file->private_data;
-	drm_device_t	*dev	= priv->dev;
-	drm_vma_entry_t *pt, *prev;
-
-	DRM_DEBUG("0x%08lx,0x%08lx\n",
-		  vma->vm_start, vma->vm_end - vma->vm_start);
-	atomic_dec(&dev->vma_count);
-
-	down(&dev->struct_sem);
-	for (pt = dev->vmalist, prev = NULL; pt; prev = pt, pt = pt->next) {
-		if (pt->vma == vma) {
-			if (prev) {
-				prev->next = pt->next;
-			} else {
-				dev->vmalist = pt->next;
-			}
-			DRM(free)(pt, sizeof(*pt), DRM_MEM_VMAS);
-			break;
-		}
-	}
-	up(&dev->struct_sem);
-}
-
-/**
- * mmap DMA memory.
- *
- * \param filp file pointer.
- * \param vma virtual memory area.
- * \return zero on success or a negative number on failure.
- * 
- * Sets the virtual memory area operations structure to vm_dma_ops, the file
- * pointer, and calls vm_open().
- */
-int DRM(mmap_dma)(struct file *filp, struct vm_area_struct *vma)
-{
-	drm_file_t	 *priv	 = filp->private_data;
-	drm_device_t	 *dev;
-	drm_device_dma_t *dma;
-	unsigned long	 length	 = vma->vm_end - vma->vm_start;
-
-	lock_kernel();
-	dev	 = priv->dev;
-	dma	 = dev->dma;
-	DRM_DEBUG("start = 0x%lx, end = 0x%lx, offset = 0x%lx\n",
-		  vma->vm_start, vma->vm_end, VM_OFFSET(vma));
-
-				/* Length must match exact page count */
-	if (!dma || (length >> PAGE_SHIFT) != dma->page_count) {
-		unlock_kernel();
-		return -EINVAL;
-	}
-	unlock_kernel();
-
-	vma->vm_ops   = &DRM(vm_dma_ops);
-
-#if LINUX_VERSION_CODE <= 0x02040e /* KERNEL_VERSION(2,4,14) */
-	vma->vm_flags |= VM_LOCKED | VM_SHM; /* Don't swap */
-#else
-	vma->vm_flags |= VM_RESERVED; /* Don't swap */
-#endif
-
-	vma->vm_file  =	 filp;	/* Needed for drm_vm_open() */
-	DRM(vm_open)(vma);
-	return 0;
-}
-
-unsigned long DRM(core_get_map_ofs)(drm_map_t *map)
-{
-	return map->offset;
-}
-
-unsigned long DRM(core_get_reg_ofs)(struct drm_device *dev)
-{
-#ifdef __alpha__
-	return dev->hose->dense_mem_base - dev->hose->mem_space->start;
-#else
-	return 0;
-#endif
-}
-
-/**
- * mmap DMA memory.
- *
- * \param filp file pointer.
- * \param vma virtual memory area.
- * \return zero on success or a negative number on failure.
- * 
- * If the virtual memory area has no offset associated with it then it's a DMA
- * area, so calls mmap_dma(). Otherwise searches the map in drm_device::maplist,
- * checks that the restricted flag is not set, sets the virtual memory operations
- * according to the mapping type and remaps the pages. Finally sets the file
- * pointer and calls vm_open().
- */
-int DRM(mmap)(struct file *filp, struct vm_area_struct *vma)
-{
-	drm_file_t	*priv	= filp->private_data;
-	drm_device_t	*dev	= priv->dev;
-	drm_map_t	*map	= NULL;
-	drm_map_list_t  *r_list;
-	unsigned long   offset  = 0;
-	struct list_head *list;
-
-	DRM_DEBUG("start = 0x%lx, end = 0x%lx, offset = 0x%lx\n",
-		  vma->vm_start, vma->vm_end, VM_OFFSET(vma));
-
-	if ( !priv->authenticated ) return -EACCES;
-
-	/* We check for "dma". On Apple's UniNorth, it's valid to have
-	 * the AGP mapped at physical address 0
-	 * --BenH.
-	 */
-	if (!VM_OFFSET(vma)
-#if __OS_HAS_AGP
-	    && (!dev->agp || dev->agp->agp_info.device->vendor != PCI_VENDOR_ID_APPLE)
-#endif
-	    )
-		return DRM(mmap_dma)(filp, vma);
-
-				/* A sequential search of a linked list is
-				   fine here because: 1) there will only be
-				   about 5-10 entries in the list and, 2) a
-				   DRI client only has to do this mapping
-				   once, so it doesn't have to be optimized
-				   for performance, even if the list was a
-				   bit longer. */
-	list_for_each(list, &dev->maplist->head) {
-		unsigned long off;
-
-		r_list = list_entry(list, drm_map_list_t, head);
-		map = r_list->map;
-		if (!map) continue;
-		off = dev->fn_tbl.get_map_ofs(map);
-		if (off == VM_OFFSET(vma)) break;
-	}
-
-	if (!map || ((map->flags&_DRM_RESTRICTED) && !capable(CAP_SYS_ADMIN)))
-		return -EPERM;
-
-				/* Check for valid size. */
-	if (map->size != vma->vm_end - vma->vm_start) return -EINVAL;
-
-	if (!capable(CAP_SYS_ADMIN) && (map->flags & _DRM_READ_ONLY)) {
-		vma->vm_flags &= ~(VM_WRITE | VM_MAYWRITE);
-#if defined(__i386__) || defined(__x86_64__)
-		pgprot_val(vma->vm_page_prot) &= ~_PAGE_RW;
-#else
-				/* Ye gads this is ugly.  With more thought
-                                   we could move this up higher and use
-                                   `protection_map' instead.  */
-		vma->vm_page_prot = __pgprot(pte_val(pte_wrprotect(
-			__pte(pgprot_val(vma->vm_page_prot)))));
-#endif
-	}
-
-	switch (map->type) {
-        case _DRM_AGP:
-	  if (drm_core_has_AGP(dev) && dev->agp->cant_use_aperture) {
-                /*
-                 * On some platforms we can't talk to bus dma address from the CPU, so for
-                 * memory of type DRM_AGP, we'll deal with sorting out the real physical
-                 * pages and mappings in nopage()
-                 */
-#if defined(__powerpc__)
-		pgprot_val(vma->vm_page_prot) |= _PAGE_NO_CACHE;
-#endif
-                vma->vm_ops = &DRM(vm_ops);
-                break;
-	  }
-                /* fall through to _DRM_FRAME_BUFFER... */        
-	case _DRM_FRAME_BUFFER:
-	case _DRM_REGISTERS:
-		if (VM_OFFSET(vma) >= __pa(high_memory)) {
-#if defined(__i386__) || defined(__x86_64__)
-			if (boot_cpu_data.x86 > 3 && map->type != _DRM_AGP) {
-				pgprot_val(vma->vm_page_prot) |= _PAGE_PCD;
-				pgprot_val(vma->vm_page_prot) &= ~_PAGE_PWT;
-			}
-#elif defined(__powerpc__)
-			pgprot_val(vma->vm_page_prot) |= _PAGE_NO_CACHE | _PAGE_GUARDED;
-#endif
-			vma->vm_flags |= VM_IO;	/* not in core dump */
-		}
-#if defined(__ia64__)
-		if (map->type != _DRM_AGP)
-			vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
-#endif
-		offset = dev->fn_tbl.get_reg_ofs(dev);
-#ifdef __sparc__
-		if (io_remap_page_range(DRM_RPR_ARG(vma) vma->vm_start,
-					VM_OFFSET(vma) + offset,
-					vma->vm_end - vma->vm_start,
-					vma->vm_page_prot, 0))
-#else
-		if (remap_pfn_range(DRM_RPR_ARG(vma) vma->vm_start,
-				     (VM_OFFSET(vma) + offset) >> PAGE_SHIFT,
-				     vma->vm_end - vma->vm_start,
-				     vma->vm_page_prot))
-#endif
-				return -EAGAIN;
-		DRM_DEBUG("   Type = %d; start = 0x%lx, end = 0x%lx,"
-			  " offset = 0x%lx\n",
-			  map->type,
-			  vma->vm_start, vma->vm_end, VM_OFFSET(vma) + offset);
-		vma->vm_ops = &DRM(vm_ops);
-		break;
-	case _DRM_SHM:
-		vma->vm_ops = &DRM(vm_shm_ops);
-		vma->vm_private_data = (void *)map;
-				/* Don't let this area swap.  Change when
-				   DRM_KERNEL advisory is supported. */
-#if LINUX_VERSION_CODE <= 0x02040e /* KERNEL_VERSION(2,4,14) */
-		vma->vm_flags |= VM_LOCKED;
-#else
-		vma->vm_flags |= VM_RESERVED;
-#endif
-		break;
-	case _DRM_SCATTER_GATHER:
-		vma->vm_ops = &DRM(vm_sg_ops);
-		vma->vm_private_data = (void *)map;
-#if LINUX_VERSION_CODE <= 0x02040e /* KERNEL_VERSION(2,4,14) */
-		vma->vm_flags |= VM_LOCKED;
-#else
-		vma->vm_flags |= VM_RESERVED;
-#endif
-                break;
-	default:
-		return -EINVAL;	/* This should never happen. */
-	}
-#if LINUX_VERSION_CODE <= 0x02040e /* KERNEL_VERSION(2,4,14) */
-	vma->vm_flags |= VM_LOCKED | VM_SHM; /* Don't swap */
-#else
-	vma->vm_flags |= VM_RESERVED; /* Don't swap */
-#endif
-
-	vma->vm_file  =	 filp;	/* Needed for drm_vm_open() */
-	DRM(vm_open)(vma);
-	return 0;
-}
diff -Nru a/drivers/char/drm/ffb_drv.c b/drivers/char/drm/ffb_drv.c
--- a/drivers/char/drm/ffb_drv.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/char/drm/ffb_drv.c	2005-01-10 20:11:23 -08:00
@@ -210,32 +210,17 @@
 	return addr;
 }
 
-#include "drm_core.h"
-
-/* This functions must be here since it references DRM(numdevs)
- * which drm_drv.h declares.
- */
 static int ffb_presetup(drm_device_t *dev)
 {
 	ffb_dev_priv_t	*ffb_priv;
-	drm_device_t *temp_dev;
 	int ret = 0;
-	int i;
+	int i = 0;
 
 	/* Check for the case where no device was found. */
 	if (ffb_position == NULL)
 		return -ENODEV;
 
-	/* Find our instance number by finding our device in dev structure */
-	for (i = 0; i < DRM(numdevs); i++) {
-		temp_dev = &(DRM(device)[i]);
-		if(temp_dev == dev)
-			break;
-	}
-
-	if (i == DRM(numdevs))
-		return -ENODEV;
-
+	/* code used to use numdevs no numdevs anymore */
 	ffb_priv = kmalloc(sizeof(ffb_dev_priv_t), GFP_KERNEL);
 	if (!ffb_priv)
 		return -ENOMEM;
@@ -307,16 +292,74 @@
        return 0;
 }
 
-void ffb_driver_register_fns(drm_device_t *dev)
+static int postinit( struct drm_device *dev, unsigned long flags ) 
 {
-	ffb_set_context_ioctls();
-	DRM(fops).get_unmapped_area = ffb_get_unmapped_area;
-	dev->fn_tbl.release = ffb_driver_release;
-	dev->fn_tbl.presetup = ffb_presetup;
-	dev->fn_tbl.pretakedown = ffb_driver_pretakedown;
-	dev->fn_tbl.postcleanup = ffb_driver_postcleanup;
-	dev->fn_tbl.kernel_context_switch = ffb_context_switch;
-	dev->fn_tbl.kernel_context_switch_unlock = ffb_driver_kernel_context_switch_unlock;
-	dev->fn_tbl.get_map_ofs = ffb_driver_get_map_ofs;
-	dev->fn_tbl.get_reg_ofs = ffb_driver_get_reg_ofs;
+	DRM_INFO( "Initialized %s %d.%d.%d %s on minor %d\n",
+		DRIVER_NAME,
+		DRIVER_MAJOR,
+		DRIVER_MINOR,
+		DRIVER_PATCHLEVEL,
+		DRIVER_DATE,
+		dev->minor
+		);
+	return 0;
 }
+
+static int version( drm_version_t *version )
+{
+	int len;
+
+	version->version_major = DRIVER_MAJOR;
+	version->version_minor = DRIVER_MINOR;
+	version->version_patchlevel = DRIVER_PATCHLEVEL;
+	DRM_COPY( version->name, DRIVER_NAME );
+	DRM_COPY( version->date, DRIVER_DATE );
+	DRM_COPY( version->desc, DRIVER_DESC );
+	return 0;
+}
+
+static drm_ioctl_desc_t ioctls[] = {
+	
+};
+
+static struct drm_driver driver = {
+	.driver_features = 0,
+	.dev_priv_size = sizeof(u32),
+	.release = ffb_driver_release,
+	.presetup = ffb_presetup,
+	.pretakedown = ffb_driver_pretakedown,
+	.postcleanup = ffb_driver_postcleanup,
+	.kernel_context_switch = ffb_driver_context_switch,
+	.kernel_context_switch_unlock = ffb_driver_kernel_context_switch_unlock,
+	.get_map_ofs = ffb_driver_get_map_ofs,
+	.get_reg_ofs = ffb_driver_get_reg_ofs,
+	.postinit = postinit,
+	.version = version,
+	.ioctls = ioctls,
+	.num_ioctls = DRM_ARRAY_SIZE(ioctls),
+	.fops = {
+		.owner = THIS_MODULE,
+		.open = drm_open,
+		.release = drm_release,
+		.ioctl = drm_ioctl,
+		.mmap = drm_mmap,
+		.poll = drm_poll,
+		.fasync = drm_fasync,
+	},
+};
+
+static int __init ffb_init(void)
+{
+	return -ENODEV;
+}
+
+static void __exit ffb_exit(void)
+{
+}
+
+module_init(ffb_init);
+module_exit(ffb_exit);
+
+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+MODULE_LICENSE("GPL and additional rights");
diff -Nru a/drivers/char/drm/ffb_drv.h b/drivers/char/drm/ffb_drv.h
--- a/drivers/char/drm/ffb_drv.h	2005-01-10 20:11:17 -08:00
+++ b/drivers/char/drm/ffb_drv.h	2005-01-10 20:11:17 -08:00
@@ -275,7 +275,6 @@
 	struct ffb_hw_context	*hw_state[FFB_MAX_CTXS];
 } ffb_dev_priv_t;
 
-extern struct file_operations DRM(fops);
 extern unsigned long ffb_get_unmapped_area(struct file *filp,
 					   unsigned long hint,
 					   unsigned long len,
@@ -284,3 +283,4 @@
 extern void ffb_set_context_ioctls(void);
 extern drm_ioctl_desc_t DRM(ioctls)[];
 
+extern int ffb_driver_context_switch(drm_device_t *dev, int old, int new);
diff -Nru a/drivers/char/drm/gamma_dma.c b/drivers/char/drm/gamma_dma.c
--- a/drivers/char/drm/gamma_dma.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/char/drm/gamma_dma.c	2005-01-10 20:11:22 -08:00
@@ -937,10 +937,10 @@
 	dev->driver_features = DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_PCI_DMA | DRIVER_HAVE_DMA | DRIVER_HAVE_IRQ;
 	DRM(fops).read = gamma_fops_read;
 	DRM(fops).poll = gamma_fops_poll;
-	dev->fn_tbl.preinit = gamma_driver_preinit;
-	dev->fn_tbl.pretakedown = gamma_driver_pretakedown;
-	dev->fn_tbl.dma_ready = gamma_driver_dma_ready;
-	dev->fn_tbl.dma_quiescent = gamma_driver_dma_quiescent;
-	dev->fn_tbl.dma_flush_block_and_flush = gamma_flush_block_and_flush;
-	dev->fn_tbl.dma_flush_unblock = gamma_flush_unblock;
+	dev->driver.preinit = gamma_driver_preinit;
+	dev->driver.pretakedown = gamma_driver_pretakedown;
+	dev->driver.dma_ready = gamma_driver_dma_ready;
+	dev->driver.dma_quiescent = gamma_driver_dma_quiescent;
+	dev->driver.dma_flush_block_and_flush = gamma_flush_block_and_flush;
+	dev->driver.dma_flush_unblock = gamma_flush_unblock;
 }
diff -Nru a/drivers/char/drm/gamma_lists.h b/drivers/char/drm/gamma_lists.h
--- a/drivers/char/drm/gamma_lists.h	2005-01-10 20:11:17 -08:00
+++ b/drivers/char/drm/gamma_lists.h	2005-01-10 20:11:17 -08:00
@@ -45,8 +45,8 @@
 	bl->rp	       = bl->bufs;
 	bl->wp	       = bl->bufs;
 	bl->end	       = &bl->bufs[bl->count+1];
-	bl->write_lock = SPIN_LOCK_UNLOCKED;
-	bl->read_lock  = SPIN_LOCK_UNLOCKED;
+	spin_lock_init(&bl->write_lock);
+	spin_lock_init(&bl->read_lock);
 	return 0;
 }
 
@@ -110,7 +110,7 @@
 	bl->low_mark  = 0;
 	bl->high_mark = 0;
 	atomic_set(&bl->wfh,   0);
-	bl->lock      = SPIN_LOCK_UNLOCKED;
+	spin_lock_init(&bl->lock);
 	++bl->initialized;
 	return 0;
 }
diff -Nru a/drivers/char/drm/i810_dma.c b/drivers/char/drm/i810_dma.c
--- a/drivers/char/drm/i810_dma.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/char/drm/i810_dma.c	2005-01-10 20:11:18 -08:00
@@ -30,7 +30,6 @@
  *
  */
 
-#include "i810.h"
 #include "drmP.h"
 #include "drm.h"
 #include "i810_drm.h"
@@ -51,24 +50,6 @@
 #define up_write up
 #endif
 
-static inline void i810_print_status_page(drm_device_t *dev)
-{
-   	drm_device_dma_t *dma = dev->dma;
-      	drm_i810_private_t *dev_priv = dev->dev_private;
-	u32 *temp = dev_priv->hw_status_page;
-   	int i;
-
-   	DRM_DEBUG(  "hw_status: Interrupt Status : %x\n", temp[0]);
-   	DRM_DEBUG(  "hw_status: LpRing Head ptr : %x\n", temp[1]);
-   	DRM_DEBUG(  "hw_status: IRing Head ptr : %x\n", temp[2]);
-      	DRM_DEBUG(  "hw_status: Reserved : %x\n", temp[3]);
-	DRM_DEBUG(  "hw_status: Last Render: %x\n", temp[4]);
-   	DRM_DEBUG(  "hw_status: Driver Counter : %d\n", temp[5]);
-   	for(i = 6; i < dma->buf_count + 6; i++) {
-	   	DRM_DEBUG( "buffer status idx : %d used: %d\n", i - 6, temp[i]);
-	}
-}
-
 static drm_buf_t *i810_freelist_get(drm_device_t *dev)
 {
    	drm_device_dma_t *dma = dev->dma;
@@ -110,12 +91,12 @@
 }
 
 static struct file_operations i810_buffer_fops = {
-	.open	 = DRM(open),
-	.flush	 = DRM(flush),
-	.release = DRM(release),
-	.ioctl	 = DRM(ioctl),
+	.open	 = drm_open,
+	.flush	 = drm_flush,
+	.release = drm_release,
+	.ioctl	 = drm_ioctl,
 	.mmap	 = i810_mmap_buffers,
-	.fasync  = DRM(fasync),
+	.fasync  = drm_fasync,
 };
 
 int i810_mmap_buffers(struct file *filp, struct vm_area_struct *vma)
@@ -237,7 +218,7 @@
 	 * is freed, it's too late.
 	 */
 	if (drm_core_check_feature(dev, DRIVER_HAVE_IRQ) && dev->irq_enabled)
-		DRM(irq_uninstall)(dev);
+		drm_irq_uninstall(dev);
 
 	if (dev->dev_private) {
 		int i;
@@ -245,7 +226,7 @@
 	     		(drm_i810_private_t *) dev->dev_private;
 
 		if (dev_priv->ring.virtual_start) {
-		   	DRM(ioremapfree)((void *) dev_priv->ring.virtual_start,
+		   	drm_ioremapfree((void *) dev_priv->ring.virtual_start,
 					 dev_priv->ring.Size, dev);
 		}
 	   	if (dev_priv->hw_status_page) {
@@ -255,7 +236,7 @@
 		   	/* Need to rewrite hardware status page */
 		   	I810_WRITE(0x02080, 0x1ffff000);
 		}
-	   	DRM(free)(dev->dev_private, sizeof(drm_i810_private_t),
+	   	drm_free(dev->dev_private, sizeof(drm_i810_private_t),
 			 DRM_MEM_DRIVER);
 	   	dev->dev_private = NULL;
 
@@ -263,7 +244,7 @@
 			drm_buf_t *buf = dma->buflist[ i ];
 			drm_i810_buf_priv_t *buf_priv = buf->dev_private;
 			if ( buf_priv->kernel_virtual && buf->total )
-				DRM(ioremapfree)(buf_priv->kernel_virtual, buf->total, dev);
+				drm_ioremapfree(buf_priv->kernel_virtual, buf->total, dev);
 		}
 	}
    	return 0;
@@ -334,7 +315,7 @@
 
 	   	*buf_priv->in_use = I810_BUF_FREE;
 
-		buf_priv->kernel_virtual = DRM(ioremap)(buf->bus_address,
+		buf_priv->kernel_virtual = drm_ioremap(buf->bus_address,
 							buf->total, dev);
 	}
 	return 0;
@@ -386,7 +367,7 @@
    	dev_priv->ring.End = init->ring_end;
    	dev_priv->ring.Size = init->ring_size;
 
-   	dev_priv->ring.virtual_start = DRM(ioremap)(dev->agp->base +
+   	dev_priv->ring.virtual_start = drm_ioremap(dev->agp->base +
 						    init->ring_start,
 						    init->ring_size, dev);
 
@@ -510,7 +491,7 @@
 			if (retcode)
 				return retcode;
 
-	   		dev_priv = DRM(alloc)(sizeof(drm_i810_private_t),
+	   		dev_priv = drm_alloc(sizeof(drm_i810_private_t),
 					     DRM_MEM_DRIVER);
 	   		if (dev_priv == NULL)
 				return -ENOMEM;
@@ -524,7 +505,7 @@
 					  sizeof(drm_i810_init_t))) {
 				return -EFAULT;
 			}
-	   		dev_priv = DRM(alloc)(sizeof(drm_i810_private_t),
+	   		dev_priv = drm_alloc(sizeof(drm_i810_private_t),
 					     DRM_MEM_DRIVER);
 			if (dev_priv == NULL) 
 				return -ENOMEM;
@@ -995,10 +976,8 @@
 }
 
 /* Must be called with the lock held */
-void i810_reclaim_buffers(struct file *filp)
+void i810_reclaim_buffers(drm_device_t *dev, struct file *filp)
 {
-	drm_file_t    *priv   = filp->private_data;
-	drm_device_t  *dev    = priv->dev;
 	drm_device_dma_t *dma = dev->dma;
 	int		 i;
 
@@ -1030,10 +1009,7 @@
    	drm_file_t	  *priv	  = filp->private_data;
    	drm_device_t	  *dev	  = priv->dev;
 
-	if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
-		DRM_ERROR("i810_flush_ioctl called without lock held\n");
-		return -EINVAL;
-	}
+	LOCK_TEST_WITH_RETURN(dev, filp);
 
    	i810_flush_queue(dev);
    	return 0;
@@ -1055,10 +1031,7 @@
 	if (copy_from_user(&vertex, (drm_i810_vertex_t __user *)arg, sizeof(vertex)))
 		return -EFAULT;
 
-	if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
-		DRM_ERROR("i810_dma_vertex called without lock held\n");
-		return -EINVAL;
-	}
+	LOCK_TEST_WITH_RETURN(dev, filp);
 
 	DRM_DEBUG("i810 dma vertex, idx %d used %d discard %d\n",
 		  vertex.idx, vertex.used, vertex.discard);
@@ -1090,10 +1063,7 @@
    	if (copy_from_user(&clear, (drm_i810_clear_t __user *)arg, sizeof(clear)))
 		return -EFAULT;
 
-	if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
-		DRM_ERROR("i810_clear_bufs called without lock held\n");
-		return -EINVAL;
-	}
+	LOCK_TEST_WITH_RETURN(dev, filp);
 
  	/* GH: Someone's doing nasty things... */
  	if (!dev->dev_private) {
@@ -1114,10 +1084,7 @@
 
 	DRM_DEBUG("i810_swap_bufs\n");
 
-	if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
-		DRM_ERROR("i810_swap_buf called without lock held\n");
-		return -EINVAL;
-	}
+	LOCK_TEST_WITH_RETURN(dev, filp);
 
 	i810_dma_dispatch_swap( dev );
    	return 0;
@@ -1152,10 +1119,7 @@
    	if (copy_from_user(&d, (drm_i810_dma_t __user *)arg, sizeof(d)))
 		return -EFAULT;
 
-	if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
-		DRM_ERROR("i810_dma called without lock held\n");
-		return -EINVAL;
-	}
+	LOCK_TEST_WITH_RETURN(dev, filp);
 
 	d.granted = 0;
 
@@ -1265,11 +1229,7 @@
 	if (copy_from_user(&mc, (drm_i810_mc_t __user *)arg, sizeof(mc)))
 		return -EFAULT;
 
-
-	if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
-		DRM_ERROR("i810_dma_mc called without lock held\n");
-		return -EINVAL;
-	}
+	LOCK_TEST_WITH_RETURN(dev, filp);
 
 	if (mc.idx >= dma->buf_count || mc.idx < 0)
 		return -EINVAL;
@@ -1317,10 +1277,8 @@
 	drm_device_t *dev = priv->dev;
 	drm_i810_private_t *dev_priv = (drm_i810_private_t *)dev->dev_private;
 
-	if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
-		DRM_ERROR("i810_fstatus called without lock held\n");
-		return -EINVAL;
-	}
+	LOCK_TEST_WITH_RETURN(dev, filp);
+
 	return I810_READ(0x30008);
 }
 
@@ -1331,10 +1289,7 @@
 	drm_device_t *dev = priv->dev;
 	drm_i810_private_t *dev_priv = (drm_i810_private_t *)dev->dev_private;
 
-	if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
-		DRM_ERROR("i810_ov0_flip called without lock held\n");
-		return -EINVAL;
-	}
+	LOCK_TEST_WITH_RETURN(dev, filp);
 
 	//Tell the overlay to update
 	I810_WRITE(0x30000,dev_priv->overlay_physical | 0x80000000);
@@ -1376,10 +1331,7 @@
 
 	DRM_DEBUG("%s\n", __FUNCTION__);
 
-	if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
-		DRM_ERROR("i810_flip_buf called without lock held\n");
-		return -EINVAL;
-	}
+	LOCK_TEST_WITH_RETURN(dev, filp);
 
 	if (!dev_priv->page_flipping) 
 		i810_do_init_pageflip( dev );
@@ -1388,35 +1340,20 @@
    	return 0;
 }
 
-static void i810_driver_pretakedown(drm_device_t *dev)
+void i810_driver_pretakedown(drm_device_t *dev)
 {
 	i810_dma_cleanup( dev );
 }
 
-static void i810_driver_release(drm_device_t *dev, struct file *filp)
+void i810_driver_release(drm_device_t *dev, struct file *filp)
 {
-	i810_reclaim_buffers(filp);
+	i810_reclaim_buffers(dev, filp);
 }
 
-static int i810_driver_dma_quiescent(drm_device_t *dev)
+int i810_driver_dma_quiescent(drm_device_t *dev)
 {
 	i810_dma_quiescent( dev );
 	return 0;
 }
 
-void i810_driver_register_fns(drm_device_t *dev)
-{
-	dev->driver_features = DRIVER_USE_AGP | DRIVER_REQUIRE_AGP | DRIVER_USE_MTRR | DRIVER_HAVE_DMA | DRIVER_DMA_QUEUE;
-	dev->dev_priv_size = sizeof(drm_i810_buf_priv_t);
-	dev->fn_tbl.pretakedown = i810_driver_pretakedown;
-	dev->fn_tbl.release = i810_driver_release;
-	dev->fn_tbl.dma_quiescent = i810_driver_dma_quiescent;
-	dev->fn_tbl.reclaim_buffers = i810_reclaim_buffers;
-
-	dev->counters += 4;
-	dev->types[6] = _DRM_STAT_IRQ;
-	dev->types[7] = _DRM_STAT_PRIMARY;
-	dev->types[8] = _DRM_STAT_SECONDARY;
-	dev->types[9] = _DRM_STAT_DMA;
-}
 
diff -Nru a/drivers/char/drm/i810_drm.h b/drivers/char/drm/i810_drm.h
--- a/drivers/char/drm/i810_drm.h	2005-01-10 20:11:23 -08:00
+++ b/drivers/char/drm/i810_drm.h	2005-01-10 20:11:23 -08:00
@@ -199,21 +199,37 @@
 /* i810 specific ioctls
  * The device specific ioctl range is 0x40 to 0x79.
  */
-#define DRM_IOCTL_I810_INIT		DRM_IOW( 0x40, drm_i810_init_t)
-#define DRM_IOCTL_I810_VERTEX		DRM_IOW( 0x41, drm_i810_vertex_t)
-#define DRM_IOCTL_I810_CLEAR		DRM_IOW( 0x42, drm_i810_clear_t)
-#define DRM_IOCTL_I810_FLUSH		DRM_IO(  0x43)
-#define DRM_IOCTL_I810_GETAGE		DRM_IO(  0x44)
-#define DRM_IOCTL_I810_GETBUF		DRM_IOWR(0x45, drm_i810_dma_t)
-#define DRM_IOCTL_I810_SWAP		DRM_IO(  0x46)
-#define DRM_IOCTL_I810_COPY		DRM_IOW( 0x47, drm_i810_copy_t)
-#define DRM_IOCTL_I810_DOCOPY		DRM_IO(  0x48)
-#define DRM_IOCTL_I810_OV0INFO		DRM_IOR( 0x49, drm_i810_overlay_t)
-#define DRM_IOCTL_I810_FSTATUS		DRM_IO ( 0x4a)
-#define DRM_IOCTL_I810_OV0FLIP		DRM_IO ( 0x4b)
-#define DRM_IOCTL_I810_MC		DRM_IOW( 0x4c, drm_i810_mc_t)
-#define DRM_IOCTL_I810_RSTATUS		DRM_IO ( 0x4d )
-#define DRM_IOCTL_I810_FLIP             DRM_IO ( 0x4e )
+#define DRM_I810_INIT		0x00
+#define DRM_I810_VERTEX		0x01
+#define DRM_I810_CLEAR		0x02
+#define DRM_I810_FLUSH		0x03
+#define DRM_I810_GETAGE		0x04
+#define DRM_I810_GETBUF		0x05
+#define DRM_I810_SWAP		0x06
+#define DRM_I810_COPY		0x07
+#define DRM_I810_DOCOPY		0x08
+#define DRM_I810_OV0INFO	0x09
+#define DRM_I810_FSTATUS	0x0a
+#define DRM_I810_OV0FLIP	0x0b
+#define DRM_I810_MC		0x0c
+#define DRM_I810_RSTATUS	0x0d
+#define DRM_I810_FLIP		0x0e
+
+#define DRM_IOCTL_I810_INIT		DRM_IOW( DRM_COMMAND_BASE + DRM_I810_INIT, drm_i810_init_t)
+#define DRM_IOCTL_I810_VERTEX		DRM_IOW( DRM_COMMAND_BASE + DRM_I810_VERTEX, drm_i810_vertex_t)
+#define DRM_IOCTL_I810_CLEAR		DRM_IOW( DRM_COMMAND_BASE + DRM_I810_CLEAR, drm_i810_clear_t)
+#define DRM_IOCTL_I810_FLUSH		DRM_IO(  DRM_COMMAND_BASE + DRM_I810_FLUSH)
+#define DRM_IOCTL_I810_GETAGE		DRM_IO(  DRM_COMMAND_BASE + DRM_I810_GETAGE)
+#define DRM_IOCTL_I810_GETBUF		DRM_IOWR(DRM_COMMAND_BASE + DRM_I810_GETBUF, drm_i810_dma_t)
+#define DRM_IOCTL_I810_SWAP		DRM_IO(  DRM_COMMAND_BASE + DRM_I810_SWAP)
+#define DRM_IOCTL_I810_COPY		DRM_IOW( DRM_COMMAND_BASE + DRM_I810_COPY, drm_i810_copy_t)
+#define DRM_IOCTL_I810_DOCOPY		DRM_IO(  DRM_COMMAND_BASE + DRM_I810_DOCOPY)
+#define DRM_IOCTL_I810_OV0INFO		DRM_IOR( DRM_COMMAND_BASE + DRM_I810_OV0INFO, drm_i810_overlay_t)
+#define DRM_IOCTL_I810_FSTATUS		DRM_IO ( DRM_COMMAND_BASE + DRM_I810_FSTATUS)
+#define DRM_IOCTL_I810_OV0FLIP		DRM_IO ( DRM_COMMAND_BASE + DRM_I810_OV0FLIP)
+#define DRM_IOCTL_I810_MC		DRM_IOW( DRM_COMMAND_BASE + DRM_I810_MC, drm_i810_mc_t)
+#define DRM_IOCTL_I810_RSTATUS		DRM_IO ( DRM_COMMAND_BASE + DRM_I810_RSTATUS)
+#define DRM_IOCTL_I810_FLIP             DRM_IO ( DRM_COMMAND_BASE + DRM_I810_FLIP)
 
 typedef struct _drm_i810_clear {
 	int clear_color;
diff -Nru a/drivers/char/drm/i810_drv.c b/drivers/char/drm/i810_drv.c
--- a/drivers/char/drm/i810_drv.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/char/drm/i810_drv.c	2005-01-10 20:11:22 -08:00
@@ -31,10 +31,110 @@
  */
 
 #include <linux/config.h>
-#include "i810.h"
 #include "drmP.h"
 #include "drm.h"
 #include "i810_drm.h"
 #include "i810_drv.h"
 
-#include "drm_core.h"
+#include "drm_pciids.h"
+
+static int postinit( struct drm_device *dev, unsigned long flags )
+{
+	/* i810 has 4 more counters */
+	dev->counters += 4;
+	dev->types[6] = _DRM_STAT_IRQ;
+	dev->types[7] = _DRM_STAT_PRIMARY;
+	dev->types[8] = _DRM_STAT_SECONDARY;
+	dev->types[9] = _DRM_STAT_DMA;
+	
+	DRM_INFO( "Initialized %s %d.%d.%d %s on minor %d: %s\n",
+		DRIVER_NAME,
+		DRIVER_MAJOR,
+		DRIVER_MINOR,
+		DRIVER_PATCHLEVEL,
+		DRIVER_DATE,
+		dev->minor,
+		pci_pretty_name(dev->pdev)
+		);
+	return 0;
+}
+
+static int version( drm_version_t *version )
+{
+	int len;
+
+	version->version_major = DRIVER_MAJOR;
+	version->version_minor = DRIVER_MINOR;
+	version->version_patchlevel = DRIVER_PATCHLEVEL;
+	DRM_COPY( version->name, DRIVER_NAME );
+	DRM_COPY( version->date, DRIVER_DATE );
+	DRM_COPY( version->desc, DRIVER_DESC );
+	return 0;
+}
+
+static struct pci_device_id pciidlist[] = {
+	i810_PCI_IDS
+};
+
+static drm_ioctl_desc_t ioctls[] = {
+	[DRM_IOCTL_NR(DRM_I810_INIT)]    = { i810_dma_init,    1, 1 },
+	[DRM_IOCTL_NR(DRM_I810_VERTEX)]  = { i810_dma_vertex,  1, 0 },
+	[DRM_IOCTL_NR(DRM_I810_CLEAR)]   = { i810_clear_bufs,  1, 0 },
+	[DRM_IOCTL_NR(DRM_I810_FLUSH)]   = { i810_flush_ioctl, 1, 0 },
+	[DRM_IOCTL_NR(DRM_I810_GETAGE)]  = { i810_getage,      1, 0 },
+	[DRM_IOCTL_NR(DRM_I810_GETBUF)]  = { i810_getbuf,      1, 0 },
+	[DRM_IOCTL_NR(DRM_I810_SWAP)]    = { i810_swap_bufs,   1, 0 },
+	[DRM_IOCTL_NR(DRM_I810_COPY)]    = { i810_copybuf,     1, 0 },
+	[DRM_IOCTL_NR(DRM_I810_DOCOPY)]  = { i810_docopy,      1, 0 },
+	[DRM_IOCTL_NR(DRM_I810_OV0INFO)] = { i810_ov0_info,    1, 0 },
+	[DRM_IOCTL_NR(DRM_I810_FSTATUS)] = { i810_fstatus,     1, 0 },
+	[DRM_IOCTL_NR(DRM_I810_OV0FLIP)] = { i810_ov0_flip,    1, 0 },
+	[DRM_IOCTL_NR(DRM_I810_MC)]      = { i810_dma_mc,      1, 1 },
+	[DRM_IOCTL_NR(DRM_I810_RSTATUS)] = { i810_rstatus,     1, 0 },
+	[DRM_IOCTL_NR(DRM_I810_FLIP)]    = { i810_flip_bufs,   1, 0 }
+};
+
+static struct drm_driver driver = {
+	.driver_features = DRIVER_USE_AGP | DRIVER_REQUIRE_AGP | DRIVER_USE_MTRR | DRIVER_HAVE_DMA | DRIVER_DMA_QUEUE,
+	.dev_priv_size = sizeof(drm_i810_buf_priv_t),
+	.pretakedown = i810_driver_pretakedown,
+	.release = i810_driver_release,
+	.dma_quiescent = i810_driver_dma_quiescent,
+	.reclaim_buffers = i810_reclaim_buffers,
+	.get_map_ofs = drm_core_get_map_ofs,
+	.get_reg_ofs = drm_core_get_reg_ofs,
+	.postinit = postinit,
+	.version = version,
+	.ioctls = ioctls,
+	.num_ioctls = DRM_ARRAY_SIZE(ioctls),
+	.fops = {
+		.owner = THIS_MODULE,
+		.open = drm_open,
+		.release = drm_release,
+		.ioctl = drm_ioctl,
+		.mmap = drm_mmap,
+		.poll = drm_poll,
+		.fasync = drm_fasync,
+	},
+	.pci_driver = {
+		.name          = DRIVER_NAME,
+		.id_table      = pciidlist,
+	},
+};
+
+static int __init i810_init(void)
+{
+	return drm_init(&driver);
+}
+
+static void __exit i810_exit(void)
+{
+	drm_exit(&driver);
+}
+
+module_init(i810_init);
+module_exit(i810_exit);
+
+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+MODULE_LICENSE("GPL and additional rights");
diff -Nru a/drivers/char/drm/i810_drv.h b/drivers/char/drm/i810_drv.h
--- a/drivers/char/drm/i810_drv.h	2005-01-10 20:11:22 -08:00
+++ b/drivers/char/drm/i810_drv.h	2005-01-10 20:11:22 -08:00
@@ -32,6 +32,29 @@
 #ifndef _I810_DRV_H_
 #define _I810_DRV_H_
 
+/* General customization:
+ */
+
+#define DRIVER_AUTHOR		"VA Linux Systems Inc."
+
+#define DRIVER_NAME		"i810"
+#define DRIVER_DESC		"Intel i810"
+#define DRIVER_DATE		"20030605"
+
+/* Interface history
+ *
+ * 1.1   - XFree86 4.1
+ * 1.2   - XvMC interfaces
+ *       - XFree86 4.2
+ * 1.2.1 - Disable copying code (leave stub ioctls for backwards compatibility)
+ *       - Remove requirement for interrupt (leave stubs again)
+ * 1.3   - Add page flipping.
+ * 1.4   - fix DRM interface
+ */
+#define DRIVER_MAJOR		1
+#define DRIVER_MINOR		4
+#define DRIVER_PATCHLEVEL	0
+
 typedef struct drm_i810_buf_priv {
    	u32 *in_use;
    	int my_use_idx;
@@ -99,7 +122,7 @@
 extern int  i810_dma_cleanup(drm_device_t *dev);
 extern int  i810_flush_ioctl(struct inode *inode, struct file *filp,
 			     unsigned int cmd, unsigned long arg);
-extern void i810_reclaim_buffers(struct file *filp);
+extern void i810_reclaim_buffers(drm_device_t *dev, struct file *filp);
 extern int  i810_getage(struct inode *inode, struct file *filp,
 			unsigned int cmd, unsigned long arg);
 extern int i810_mmap_buffers(struct file *filp, struct vm_area_struct *vma);
@@ -127,17 +150,21 @@
 
 extern void i810_dma_quiescent(drm_device_t *dev);
 
-int i810_dma_vertex(struct inode *inode, struct file *filp,
+extern int i810_dma_vertex(struct inode *inode, struct file *filp,
 		    unsigned int cmd, unsigned long arg);
 
-int i810_swap_bufs(struct inode *inode, struct file *filp,
+extern int i810_swap_bufs(struct inode *inode, struct file *filp,
 		   unsigned int cmd, unsigned long arg);
 
-int i810_clear_bufs(struct inode *inode, struct file *filp,
+extern int i810_clear_bufs(struct inode *inode, struct file *filp,
 		    unsigned int cmd, unsigned long arg);
 
-int i810_flip_bufs(struct inode *inode, struct file *filp,
+extern int i810_flip_bufs(struct inode *inode, struct file *filp,
 		   unsigned int cmd, unsigned long arg);
+
+extern int i810_driver_dma_quiescent(drm_device_t *dev);
+extern void i810_driver_release(drm_device_t *dev, struct file *filp);
+extern void i810_driver_pretakedown(drm_device_t *dev);
 
 #define I810_BASE(reg)		((unsigned long) \
 				dev_priv->mmio_map->handle)
diff -Nru a/drivers/char/drm/i830_dma.c b/drivers/char/drm/i830_dma.c
--- a/drivers/char/drm/i830_dma.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/char/drm/i830_dma.c	2005-01-10 20:11:16 -08:00
@@ -31,7 +31,6 @@
  *
  */
 
-#include "i830.h"
 #include "drmP.h"
 #include "drm.h"
 #include "i830_drm.h"
@@ -111,12 +110,12 @@
 }
 
 static struct file_operations i830_buffer_fops = {
-	.open	 = DRM(open),
-	.flush	 = DRM(flush),
-	.release = DRM(release),
-	.ioctl	 = DRM(ioctl),
+	.open	 = drm_open,
+	.flush	 = drm_flush,
+	.release = drm_release,
+	.ioctl	 = drm_ioctl,
 	.mmap	 = i830_mmap_buffers,
-	.fasync  = DRM(fasync),
+	.fasync  = drm_fasync,
 };
 
 int i830_mmap_buffers(struct file *filp, struct vm_area_struct *vma)
@@ -237,7 +236,7 @@
 	 * may not have been called from userspace and after dev_private
 	 * is freed, it's too late.
 	 */
-	if ( dev->irq_enabled ) DRM(irq_uninstall)(dev);
+	if ( dev->irq_enabled ) drm_irq_uninstall(dev);
 
 	if (dev->dev_private) {
 		int i;
@@ -245,7 +244,7 @@
 	     		(drm_i830_private_t *) dev->dev_private;
 	   
 	   	if (dev_priv->ring.virtual_start) {
-		   	DRM(ioremapfree)((void *) dev_priv->ring.virtual_start,
+		   	drm_ioremapfree((void *) dev_priv->ring.virtual_start,
 					 dev_priv->ring.Size, dev);
 		}
 	   	if (dev_priv->hw_status_page) {
@@ -256,7 +255,7 @@
 		   	I830_WRITE(0x02080, 0x1ffff000);
 		}
 
-	   	DRM(free)(dev->dev_private, sizeof(drm_i830_private_t), 
+	   	drm_free(dev->dev_private, sizeof(drm_i830_private_t), 
 			 DRM_MEM_DRIVER);
 	   	dev->dev_private = NULL;
 
@@ -264,7 +263,7 @@
 			drm_buf_t *buf = dma->buflist[ i ];
 			drm_i830_buf_priv_t *buf_priv = buf->dev_private;
 			if ( buf_priv->kernel_virtual && buf->total )
-				DRM(ioremapfree)(buf_priv->kernel_virtual, buf->total, dev);
+				drm_ioremapfree(buf_priv->kernel_virtual, buf->total, dev);
 		}
 	}
    	return 0;
@@ -339,7 +338,7 @@
 
 	   	*buf_priv->in_use = I830_BUF_FREE;
 
-		buf_priv->kernel_virtual = DRM(ioremap)(buf->bus_address, 
+		buf_priv->kernel_virtual = drm_ioremap(buf->bus_address, 
 							buf->total, dev);
 	}
 	return 0;
@@ -392,7 +391,7 @@
    	dev_priv->ring.End = init->ring_end;
    	dev_priv->ring.Size = init->ring_size;
 
-   	dev_priv->ring.virtual_start = DRM(ioremap)(dev->agp->base + 
+   	dev_priv->ring.virtual_start = drm_ioremap(dev->agp->base + 
 						    init->ring_start, 
 						    init->ring_size, dev);
 
@@ -475,7 +474,7 @@
 	
    	switch(init.func) {
 	 	case I830_INIT_DMA:
-			dev_priv = DRM(alloc)(sizeof(drm_i830_private_t), 
+			dev_priv = drm_alloc(sizeof(drm_i830_private_t), 
 					      DRM_MEM_DRIVER);
 	   		if(dev_priv == NULL) return -ENOMEM;
 	   		retcode = i830_dma_initialize(dev, dev_priv, &init);
@@ -1284,10 +1283,8 @@
 }
 
 /* Must be called with the lock held */
-void i830_reclaim_buffers( struct file *filp )
+void i830_reclaim_buffers(drm_device_t *dev, struct file *filp)
 {
-	drm_file_t    *priv   = filp->private_data;
-	drm_device_t  *dev    = priv->dev;
 	drm_device_dma_t *dma = dev->dma;
 	int		 i;
 
@@ -1319,10 +1316,7 @@
    	drm_file_t	  *priv	  = filp->private_data;
    	drm_device_t	  *dev	  = priv->dev;
 
-   	if(!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
-		DRM_ERROR("i830_flush_ioctl called without lock held\n");
-		return -EINVAL;
-	}
+	LOCK_TEST_WITH_RETURN(dev, filp);
 
    	i830_flush_queue(dev);
    	return 0;
@@ -1343,10 +1337,7 @@
 	if (copy_from_user(&vertex, (drm_i830_vertex_t __user *)arg, sizeof(vertex)))
 		return -EFAULT;
 
-   	if(!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
-		DRM_ERROR("i830_dma_vertex called without lock held\n");
-		return -EINVAL;
-	}
+	LOCK_TEST_WITH_RETURN(dev, filp);
 
 	DRM_DEBUG("i830 dma vertex, idx %d used %d discard %d\n",
 		  vertex.idx, vertex.used, vertex.discard);
@@ -1373,10 +1364,7 @@
    	if (copy_from_user(&clear, (drm_i830_clear_t __user *)arg, sizeof(clear)))
 		return -EFAULT;
    
-   	if(!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
-		DRM_ERROR("i830_clear_bufs called without lock held\n");
-		return -EINVAL;
-	}
+	LOCK_TEST_WITH_RETURN(dev, filp);
 
 	/* GH: Someone's doing nasty things... */
 	if (!dev->dev_private) {
@@ -1398,10 +1386,7 @@
    
 	DRM_DEBUG("i830_swap_bufs\n");
 
-   	if(!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
-		DRM_ERROR("i830_swap_buf called without lock held\n");
-		return -EINVAL;
-	}
+	LOCK_TEST_WITH_RETURN(dev, filp);
 
 	i830_dma_dispatch_swap( dev );
    	return 0;
@@ -1442,10 +1427,7 @@
 
 	DRM_DEBUG("%s\n", __FUNCTION__);
 
-   	if(!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
-		DRM_ERROR("i830_flip_buf called without lock held\n");
-		return -EINVAL;
-	}
+	LOCK_TEST_WITH_RETURN(dev, filp);
 
 	if (!dev_priv->page_flipping) 
 		i830_do_init_pageflip( dev );
@@ -1484,10 +1466,7 @@
    	if (copy_from_user(&d, (drm_i830_dma_t __user *)arg, sizeof(d)))
 		return -EFAULT;
    
-	if(!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
-		DRM_ERROR("i830_dma called without lock held\n");
-		return -EINVAL;
-	}
+	LOCK_TEST_WITH_RETURN(dev, filp);
 	
 	d.granted = 0;
 
@@ -1582,43 +1561,19 @@
 }
 
 
-static void i830_driver_pretakedown(drm_device_t *dev)
+void i830_driver_pretakedown(drm_device_t *dev)
 {
 	i830_dma_cleanup( dev );
 }
 
-static void i830_driver_release(drm_device_t *dev, struct file *filp)
+void i830_driver_release(drm_device_t *dev, struct file *filp)
 {
-	i830_reclaim_buffers(filp);
+	i830_reclaim_buffers(dev, filp);
 }
 
-static int i830_driver_dma_quiescent(drm_device_t *dev)
+int i830_driver_dma_quiescent(drm_device_t *dev)
 {
 	i830_dma_quiescent( dev );
 	return 0;
-}
-
-void i830_driver_register_fns(drm_device_t *dev)
-{
-	dev->driver_features = DRIVER_USE_AGP | DRIVER_REQUIRE_AGP | DRIVER_USE_MTRR | DRIVER_HAVE_DMA | DRIVER_DMA_QUEUE;
-#if USE_IRQS
-	dev->driver_features |= DRIVER_HAVE_IRQ | DRIVER_SHARED_IRQ;
-#endif
-	dev->dev_priv_size = sizeof(drm_i830_buf_priv_t);
-	dev->fn_tbl.pretakedown = i830_driver_pretakedown;
-	dev->fn_tbl.release = i830_driver_release;
-	dev->fn_tbl.dma_quiescent = i830_driver_dma_quiescent;
-	dev->fn_tbl.reclaim_buffers = i830_reclaim_buffers;
-#if USE_IRQS
-	dev->fn_tbl.irq_preinstall = i830_driver_irq_preinstall;
-	dev->fn_tbl.irq_postinstall = i830_driver_irq_postinstall;
-	dev->fn_tbl.irq_uninstall = i830_driver_irq_uninstall;
-	dev->fn_tbl.irq_handler = i830_driver_irq_handler;
-#endif
-	dev->counters += 4;
-	dev->types[6] = _DRM_STAT_IRQ;
-	dev->types[7] = _DRM_STAT_PRIMARY;
-	dev->types[8] = _DRM_STAT_SECONDARY;
-	dev->types[9] = _DRM_STAT_DMA;
 }
 
diff -Nru a/drivers/char/drm/i830_drm.h b/drivers/char/drm/i830_drm.h
--- a/drivers/char/drm/i830_drm.h	2005-01-10 20:11:18 -08:00
+++ b/drivers/char/drm/i830_drm.h	2005-01-10 20:11:18 -08:00
@@ -251,20 +251,35 @@
 /* I830 specific ioctls
  * The device specific ioctl range is 0x40 to 0x79.
  */
-#define DRM_IOCTL_I830_INIT		DRM_IOW( 0x40, drm_i830_init_t)
-#define DRM_IOCTL_I830_VERTEX		DRM_IOW( 0x41, drm_i830_vertex_t)
-#define DRM_IOCTL_I830_CLEAR		DRM_IOW( 0x42, drm_i830_clear_t)
-#define DRM_IOCTL_I830_FLUSH		DRM_IO ( 0x43)
-#define DRM_IOCTL_I830_GETAGE		DRM_IO ( 0x44)
-#define DRM_IOCTL_I830_GETBUF		DRM_IOWR(0x45, drm_i830_dma_t)
-#define DRM_IOCTL_I830_SWAP		DRM_IO ( 0x46)
-#define DRM_IOCTL_I830_COPY		DRM_IOW( 0x47, drm_i830_copy_t)
-#define DRM_IOCTL_I830_DOCOPY		DRM_IO ( 0x48)
-#define DRM_IOCTL_I830_FLIP		DRM_IO ( 0x49)
-#define DRM_IOCTL_I830_IRQ_EMIT         DRM_IOWR(0x4a, drm_i830_irq_emit_t)
-#define DRM_IOCTL_I830_IRQ_WAIT         DRM_IOW( 0x4b, drm_i830_irq_wait_t)
-#define DRM_IOCTL_I830_GETPARAM         DRM_IOWR(0x4c, drm_i830_getparam_t)
-#define DRM_IOCTL_I830_SETPARAM         DRM_IOWR(0x4d, drm_i830_setparam_t)
+#define DRM_I830_INIT	0x00
+#define DRM_I830_VERTEX	0x01
+#define DRM_I830_CLEAR	0x02
+#define DRM_I830_FLUSH	0x03
+#define DRM_I830_GETAGE	0x04
+#define DRM_I830_GETBUF	0x05
+#define DRM_I830_SWAP	0x06
+#define DRM_I830_COPY	0x07
+#define DRM_I830_DOCOPY	0x08
+#define DRM_I830_FLIP	0x09
+#define DRM_I830_IRQ_EMIT	0x0a
+#define DRM_I830_IRQ_WAIT	0x0b
+#define DRM_I830_GETPARAM	0x0c
+#define DRM_I830_SETPARAM	0x0d
+
+#define DRM_IOCTL_I830_INIT		DRM_IOW( DRM_COMMAND_BASE + DRM_IOCTL_I830_INIT, drm_i830_init_t)
+#define DRM_IOCTL_I830_VERTEX		DRM_IOW( DRM_COMMAND_BASE + DRM_IOCTL_I830_VERTEX, drm_i830_vertex_t)
+#define DRM_IOCTL_I830_CLEAR		DRM_IOW( DRM_COMMAND_BASE + DRM_IOCTL_I830_CLEAR, drm_i830_clear_t)
+#define DRM_IOCTL_I830_FLUSH		DRM_IO ( DRM_COMMAND_BASE + DRM_IOCTL_I830_FLUSH)
+#define DRM_IOCTL_I830_GETAGE		DRM_IO ( DRM_COMMAND_BASE + DRM_IOCTL_I830_GETAGE)
+#define DRM_IOCTL_I830_GETBUF		DRM_IOWR(DRM_COMMAND_BASE + DRM_IOCTL_I830_GETBUF, drm_i830_dma_t)
+#define DRM_IOCTL_I830_SWAP		DRM_IO ( DRM_COMMAND_BASE + DRM_IOCTL_I830_SWAP)
+#define DRM_IOCTL_I830_COPY		DRM_IOW( DRM_COMMAND_BASE + DRM_IOCTL_I830_COPY, drm_i830_copy_t)
+#define DRM_IOCTL_I830_DOCOPY		DRM_IO ( DRM_COMMAND_BASE + DRM_IOCTL_I830_DOCOPY)
+#define DRM_IOCTL_I830_FLIP		DRM_IO ( DRM_COMMAND_BASE + DRM_IOCTL_I830_FLIP)
+#define DRM_IOCTL_I830_IRQ_EMIT         DRM_IOWR(DRM_COMMAND_BASE + DRM_IOCTL_I830_IRQ_EMIT, drm_i830_irq_emit_t)
+#define DRM_IOCTL_I830_IRQ_WAIT         DRM_IOW( DRM_COMMAND_BASE + DRM_IOCTL_I830_IRQ_WAIT, drm_i830_irq_wait_t)
+#define DRM_IOCTL_I830_GETPARAM         DRM_IOWR(DRM_COMMAND_BASE + DRM_IOCTL_I830_GETPARAM, drm_i830_getparam_t)
+#define DRM_IOCTL_I830_SETPARAM         DRM_IOWR(DRM_COMMAND_BASE + DRM_IOCTL_I830_SETPARAM, drm_i830_setparam_t)
 
 typedef struct _drm_i830_clear {
 	int clear_color;
diff -Nru a/drivers/char/drm/i830_drv.c b/drivers/char/drm/i830_drv.c
--- a/drivers/char/drm/i830_drv.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/char/drm/i830_drv.c	2005-01-10 20:11:17 -08:00
@@ -33,10 +33,118 @@
  */
 
 #include <linux/config.h>
-#include "i830.h"
 #include "drmP.h"
 #include "drm.h"
 #include "i830_drm.h"
 #include "i830_drv.h"
 
-#include "drm_core.h"
+#include "drm_pciids.h"
+
+int postinit( struct drm_device *dev, unsigned long flags )
+{
+	dev->counters += 4;
+	dev->types[6] = _DRM_STAT_IRQ;
+	dev->types[7] = _DRM_STAT_PRIMARY;
+	dev->types[8] = _DRM_STAT_SECONDARY;
+	dev->types[9] = _DRM_STAT_DMA;
+	
+	DRM_INFO( "Initialized %s %d.%d.%d %s on minor %d: %s\n",
+		DRIVER_NAME,
+		DRIVER_MAJOR,
+		DRIVER_MINOR,
+		DRIVER_PATCHLEVEL,
+		DRIVER_DATE,
+		dev->minor,
+		pci_pretty_name(dev->pdev)
+		);
+	return 0;
+}
+
+static int version( drm_version_t *version )
+{
+	int len;
+
+	version->version_major = DRIVER_MAJOR;
+	version->version_minor = DRIVER_MINOR;
+	version->version_patchlevel = DRIVER_PATCHLEVEL;
+	DRM_COPY( version->name, DRIVER_NAME );
+	DRM_COPY( version->date, DRIVER_DATE );
+	DRM_COPY( version->desc, DRIVER_DESC );
+	return 0;
+}
+
+static struct pci_device_id pciidlist[] = {
+	i830_PCI_IDS
+};
+
+static drm_ioctl_desc_t ioctls[] = {
+	[DRM_IOCTL_NR(DRM_I830_INIT)]     = { i830_dma_init,    1, 1 },
+	[DRM_IOCTL_NR(DRM_I830_VERTEX)]   = { i830_dma_vertex,  1, 0 },
+	[DRM_IOCTL_NR(DRM_I830_CLEAR)]    = { i830_clear_bufs,  1, 0 },
+	[DRM_IOCTL_NR(DRM_I830_FLUSH)]    = { i830_flush_ioctl, 1, 0 },
+	[DRM_IOCTL_NR(DRM_I830_GETAGE)]   = { i830_getage,      1, 0 },
+	[DRM_IOCTL_NR(DRM_I830_GETBUF)]   = { i830_getbuf,      1, 0 },
+	[DRM_IOCTL_NR(DRM_I830_SWAP)]     = { i830_swap_bufs,   1, 0 },
+	[DRM_IOCTL_NR(DRM_I830_COPY)]     = { i830_copybuf,     1, 0 },
+	[DRM_IOCTL_NR(DRM_I830_DOCOPY)]   = { i830_docopy,      1, 0 },
+	[DRM_IOCTL_NR(DRM_I830_FLIP)]     = { i830_flip_bufs,   1, 0 },
+	[DRM_IOCTL_NR(DRM_I830_IRQ_EMIT)] = { i830_irq_emit,    1, 0 },
+	[DRM_IOCTL_NR(DRM_I830_IRQ_WAIT)] = { i830_irq_wait,    1, 0 },
+	[DRM_IOCTL_NR(DRM_I830_GETPARAM)] = { i830_getparam,    1, 0 },
+	[DRM_IOCTL_NR(DRM_I830_SETPARAM)] = { i830_setparam,    1, 0 } 
+};
+
+static struct drm_driver driver = {
+	.driver_features = DRIVER_USE_AGP | DRIVER_REQUIRE_AGP | DRIVER_USE_MTRR | DRIVER_HAVE_DMA | DRIVER_DMA_QUEUE,
+#if USE_IRQS
+	.driver_features |= DRIVER_HAVE_IRQ | DRIVER_SHARED_IRQ,
+#endif
+	.dev_priv_size = sizeof(drm_i830_buf_priv_t),
+	.pretakedown = i830_driver_pretakedown,
+	.release = i830_driver_release,
+	.dma_quiescent = i830_driver_dma_quiescent,
+	.reclaim_buffers = i830_reclaim_buffers,
+	.get_map_ofs = drm_core_get_map_ofs,
+	.get_reg_ofs = drm_core_get_reg_ofs,
+#if USE_IRQS
+	.irq_preinstall = i830_driver_irq_preinstall,
+	.irq_postinstall = i830_driver_irq_postinstall,
+	.irq_uninstall = i830_driver_irq_uninstall,
+	.irq_handler = i830_driver_irq_handler,
+#endif
+	.postinit = postinit,
+	.version = version,
+	.ioctls = ioctls,
+	.num_ioctls = DRM_ARRAY_SIZE(ioctls),
+	.fops = {
+		.owner = THIS_MODULE,
+		.open = drm_open,
+		.release = drm_release,
+		.ioctl = drm_ioctl,
+		.mmap = drm_mmap,
+		.poll = drm_poll,
+		.fasync = drm_fasync,
+	},
+	.pci_driver = {
+		.name          = DRIVER_NAME,
+		.id_table      = pciidlist,
+	}
+
+};
+
+static int __init i830_init(void)
+{
+	return drm_init(&driver);
+}
+
+static void __exit i830_exit(void)
+{
+	drm_exit(&driver);
+}
+
+module_init(i830_init);
+module_exit(i830_exit);
+
+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+MODULE_LICENSE("GPL and additional rights");
diff -Nru a/drivers/char/drm/i830_drv.h b/drivers/char/drm/i830_drv.h
--- a/drivers/char/drm/i830_drv.h	2005-01-10 20:11:20 -08:00
+++ b/drivers/char/drm/i830_drv.h	2005-01-10 20:11:20 -08:00
@@ -32,6 +32,36 @@
 #ifndef _I830_DRV_H_
 #define _I830_DRV_H_
 
+/* General customization:
+ */
+
+#define DRIVER_AUTHOR		"VA Linux Systems Inc."
+
+#define DRIVER_NAME		"i830"
+#define DRIVER_DESC		"Intel 830M"
+#define DRIVER_DATE		"20021108"
+
+/* Interface history:
+ *
+ * 1.1: Original.
+ * 1.2: ?
+ * 1.3: New irq emit/wait ioctls.
+ *      New pageflip ioctl.
+ *      New getparam ioctl.
+ *      State for texunits 3&4 in sarea.
+ *      New (alternative) layout for texture state.
+ */
+#define DRIVER_MAJOR		1
+#define DRIVER_MINOR		3
+#define DRIVER_PATCHLEVEL	2
+
+/* Driver will work either way: IRQ's save cpu time when waiting for
+ * the card, but are subject to subtle interactions between bios,
+ * hardware and the driver.
+ */
+/* XXX: Add vblank support? */
+#define USE_IRQS 0
+
 typedef struct drm_i830_buf_priv {
    	u32 *in_use;
    	int my_use_idx;
@@ -99,7 +129,7 @@
 extern int  i830_dma_cleanup(drm_device_t *dev);
 extern int  i830_flush_ioctl(struct inode *inode, struct file *filp,
 			     unsigned int cmd, unsigned long arg);
-extern void i830_reclaim_buffers(struct file *filp);
+extern void i830_reclaim_buffers(drm_device_t *dev, struct file *filp);
 extern int  i830_getage(struct inode *inode, struct file *filp, unsigned int cmd,
 			unsigned long arg);
 extern int i830_mmap_buffers(struct file *filp, struct vm_area_struct *vma);
@@ -140,6 +170,9 @@
 extern void i830_driver_irq_preinstall( drm_device_t *dev );
 extern void i830_driver_irq_postinstall( drm_device_t *dev );
 extern void i830_driver_irq_uninstall( drm_device_t *dev );
+extern void i830_driver_pretakedown(drm_device_t *dev);
+extern void i830_driver_release(drm_device_t *dev, struct file *filp);
+extern int i830_driver_dma_quiescent(drm_device_t *dev);
 
 #define I830_BASE(reg)		((unsigned long) \
 				dev_priv->mmio_map->handle)
diff -Nru a/drivers/char/drm/i830_irq.c b/drivers/char/drm/i830_irq.c
--- a/drivers/char/drm/i830_irq.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/char/drm/i830_irq.c	2005-01-10 20:11:21 -08:00
@@ -26,7 +26,6 @@
  *
  */
 
-#include "i830.h"
 #include "drmP.h"
 #include "drm.h"
 #include "i830_drm.h"
@@ -129,10 +128,7 @@
 	drm_i830_irq_emit_t emit;
 	int result;
 
-   	if(!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
-		DRM_ERROR("i830_irq_emit called without lock held\n");
-		return -EINVAL;
-	}
+	LOCK_TEST_WITH_RETURN(dev, filp);
 
 	if ( !dev_priv ) {
 		DRM_ERROR( "%s called with no initialization\n", __FUNCTION__ );
diff -Nru a/drivers/char/drm/i915_dma.c b/drivers/char/drm/i915_dma.c
--- a/drivers/char/drm/i915_dma.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/char/drm/i915_dma.c	2005-01-10 20:11:18 -08:00
@@ -7,30 +7,11 @@
  * 
  **************************************************************************/
 
-#include "i915.h"
 #include "drmP.h"
 #include "drm.h"
 #include "i915_drm.h"
 #include "i915_drv.h"
 
-static inline void i915_print_status_page(drm_device_t * dev)
-{
-	drm_i915_private_t *dev_priv = dev->dev_private;
-	u32 *temp = dev_priv->hw_status_page;
-
-	if (!temp) {
-		DRM_DEBUG("no status page\n");
-		return;
-	}
-
-	DRM_DEBUG("hw_status: Interrupt Status : %x\n", temp[0]);
-	DRM_DEBUG("hw_status: LpRing Head ptr : %x\n", temp[1]);
-	DRM_DEBUG("hw_status: IRing Head ptr : %x\n", temp[2]);
-	DRM_DEBUG("hw_status: Reserved : %x\n", temp[3]);
-	DRM_DEBUG("hw_status: Driver Counter : %d\n", temp[5]);
-
-}
-
 /* Really want an OS-independent resettable timer.  Would like to have
  * this loop run for (eg) 3 sec, but have the timer reset every time
  * the head pointer changes, so that EBUSY only happens if the ring
@@ -84,7 +65,7 @@
 	 * is freed, it's too late.
 	 */
 	if (dev->irq)
-		DRM(irq_uninstall) (dev);
+		drm_irq_uninstall (dev);
 
 	if (dev->dev_private) {
 		drm_i915_private_t *dev_priv =
@@ -102,7 +83,7 @@
 			I915_WRITE(0x02080, 0x1ffff000);
 		}
 
-		DRM(free) (dev->dev_private, sizeof(drm_i915_private_t),
+		drm_free (dev->dev_private, sizeof(drm_i915_private_t),
 			   DRM_MEM_DRIVER);
 
 		dev->dev_private = NULL;
@@ -242,7 +223,7 @@
 
 	switch (init.func) {
 	case I915_INIT_DMA:
-		dev_priv = DRM(alloc) (sizeof(drm_i915_private_t),
+		dev_priv = drm_alloc (sizeof(drm_i915_private_t),
 				       DRM_MEM_DRIVER);
 		if (dev_priv == NULL)
 			return DRM_ERR(ENOMEM);
@@ -545,10 +526,7 @@
 {
 	DRM_DEVICE;
 
-	if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
-		DRM_ERROR("i915_flush_ioctl called without lock held\n");
-		return DRM_ERR(EINVAL);
-	}
+	LOCK_TEST_WITH_RETURN(dev, filp);
 
 	return i915_quiescent(dev);
 }
@@ -574,10 +552,7 @@
 	DRM_DEBUG("i915 batchbuffer, start %x used %d cliprects %d\n",
 		  batch.start, batch.used, batch.num_cliprects);
 
-	if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
-		DRM_ERROR("i915_batchbuffer called without lock held\n");
-		return DRM_ERR(EINVAL);
-	}
+	LOCK_TEST_WITH_RETURN(dev, filp);
 
 	if (batch.num_cliprects && DRM_VERIFYAREA_READ(batch.cliprects,
 						       batch.num_cliprects *
@@ -606,10 +581,7 @@
 	DRM_DEBUG("i915 cmdbuffer, buf %p sz %d cliprects %d\n",
 		  cmdbuf.buf, cmdbuf.sz, cmdbuf.num_cliprects);
 
-	if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
-		DRM_ERROR("i915_cmdbuffer called without lock held\n");
-		return DRM_ERR(EINVAL);
-	}
+	LOCK_TEST_WITH_RETURN(dev, filp);
 
 	if (cmdbuf.num_cliprects &&
 	    DRM_VERIFYAREA_READ(cmdbuf.cliprects,
@@ -645,10 +617,8 @@
 	DRM_DEVICE;
 
 	DRM_DEBUG("%s\n", __FUNCTION__);
-	if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
-		DRM_ERROR("i915_flip_buf called without lock held\n");
-		return DRM_ERR(EINVAL);
-	}
+
+	LOCK_TEST_WITH_RETURN(dev, filp);
 
 	return i915_dispatch_flip(dev);
 }
@@ -720,7 +690,7 @@
 	return 0;
 }
 
-static void i915_driver_pretakedown(drm_device_t *dev)
+void i915_driver_pretakedown(drm_device_t *dev)
 {
 	if ( dev->dev_private ) {
 		drm_i915_private_t *dev_priv = dev->dev_private;
@@ -729,7 +699,7 @@
 	i915_dma_cleanup( dev );
 }
 
-static void i915_driver_prerelease(drm_device_t *dev, DRMFILE filp)
+void i915_driver_prerelease(drm_device_t *dev, DRMFILE filp)
 {
 	if ( dev->dev_private ) {
 		drm_i915_private_t *dev_priv = dev->dev_private;
@@ -737,19 +707,3 @@
 	}
 }
 
-void i915_driver_register_fns(drm_device_t *dev)
-{
-	dev->driver_features = DRIVER_USE_AGP | DRIVER_REQUIRE_AGP | DRIVER_USE_MTRR | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED;
-	dev->fn_tbl.pretakedown = i915_driver_pretakedown;
-	dev->fn_tbl.prerelease = i915_driver_prerelease;
-	dev->fn_tbl.irq_preinstall = i915_driver_irq_preinstall;
-	dev->fn_tbl.irq_postinstall = i915_driver_irq_postinstall;
-	dev->fn_tbl.irq_uninstall = i915_driver_irq_uninstall;
-	dev->fn_tbl.irq_handler = i915_driver_irq_handler;
-	
-	dev->counters += 4;
-	dev->types[6] = _DRM_STAT_IRQ;
-	dev->types[7] = _DRM_STAT_PRIMARY;
-	dev->types[8] = _DRM_STAT_SECONDARY;
-	dev->types[9] = _DRM_STAT_DMA;
-}
diff -Nru a/drivers/char/drm/i915_drm.h b/drivers/char/drm/i915_drm.h
--- a/drivers/char/drm/i915_drm.h	2005-01-10 20:11:24 -08:00
+++ b/drivers/char/drm/i915_drm.h	2005-01-10 20:11:24 -08:00
@@ -61,18 +61,31 @@
 /* I915 specific ioctls
  * The device specific ioctl range is 0x40 to 0x79.
  */
-#define DRM_IOCTL_I915_INIT		DRM_IOW( 0x40, drm_i915_init_t)
-#define DRM_IOCTL_I915_FLUSH		DRM_IO ( 0x41)
-#define DRM_IOCTL_I915_FLIP		DRM_IO ( 0x42)
-#define DRM_IOCTL_I915_BATCHBUFFER	DRM_IOW( 0x43, drm_i915_batchbuffer_t)
-#define DRM_IOCTL_I915_IRQ_EMIT         DRM_IOWR(0x44, drm_i915_irq_emit_t)
-#define DRM_IOCTL_I915_IRQ_WAIT         DRM_IOW( 0x45, drm_i915_irq_wait_t)
-#define DRM_IOCTL_I915_GETPARAM         DRM_IOWR(0x46, drm_i915_getparam_t)
-#define DRM_IOCTL_I915_SETPARAM         DRM_IOW( 0x47, drm_i915_setparam_t)
-#define DRM_IOCTL_I915_ALLOC            DRM_IOWR(0x48, drm_i915_mem_alloc_t)
-#define DRM_IOCTL_I915_FREE             DRM_IOW( 0x49, drm_i915_mem_free_t)
-#define DRM_IOCTL_I915_INIT_HEAP        DRM_IOW( 0x4a, drm_i915_mem_init_heap_t)
-#define DRM_IOCTL_I915_CMDBUFFER	DRM_IOW( 0x4b, drm_i915_cmdbuffer_t)
+#define DRM_I915_INIT		0x00
+#define DRM_I915_FLUSH		0x01
+#define DRM_I915_FLIP		0x02
+#define DRM_I915_BATCHBUFFER	0x03
+#define DRM_I915_IRQ_EMIT	0x04
+#define DRM_I915_IRQ_WAIT	0x05
+#define DRM_I915_GETPARAM	0x06
+#define DRM_I915_SETPARAM	0x07
+#define DRM_I915_ALLOC		0x08
+#define DRM_I915_FREE		0x09
+#define DRM_I915_INIT_HEAP	0x0a
+#define DRM_I915_CMDBUFFER	0x0b
+
+#define DRM_IOCTL_I915_INIT		DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t)
+#define DRM_IOCTL_I915_FLUSH		DRM_IO ( DRM_COMMAND_BASE + DRM_I915_FLUSH)
+#define DRM_IOCTL_I915_FLIP		DRM_IO ( DRM_COMMAND_BASE + DRM_I915_FLIP)
+#define DRM_IOCTL_I915_BATCHBUFFER	DRM_IOW( DRM_COMMAND_BASE + DRM_I915_BATCHBUFFER, drm_i915_batchbuffer_t)
+#define DRM_IOCTL_I915_IRQ_EMIT         DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_IRQ_EMIT, drm_i915_irq_emit_t)
+#define DRM_IOCTL_I915_IRQ_WAIT         DRM_IOW( DRM_COMMAND_BASE + DRM_I915_IRQ_WAIT, drm_i915_irq_wait_t)
+#define DRM_IOCTL_I915_GETPARAM         DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GETPARAM, drm_i915_getparam_t)
+#define DRM_IOCTL_I915_SETPARAM         DRM_IOW( DRM_COMMAND_BASE + DRM_I915_SETPARAM, drm_i915_setparam_t)
+#define DRM_IOCTL_I915_ALLOC            DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_ALLOC, drm_i915_mem_alloc_t)
+#define DRM_IOCTL_I915_FREE             DRM_IOW( DRM_COMMAND_BASE + DRM_I915_FREE, drm_i915_mem_free_t)
+#define DRM_IOCTL_I915_INIT_HEAP        DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT_HEAP, drm_i915_mem_init_heap_t)
+#define DRM_IOCTL_I915_CMDBUFFER	DRM_IOW( DRM_COMMAND_BASE + DRM_I915_CMDBUFFER, drm_i915_cmdbuffer_t)
 
 /* Allow drivers to submit batchbuffers directly to hardware, relying
  * on the security mechanisms provided by hardware.
diff -Nru a/drivers/char/drm/i915_drv.c b/drivers/char/drm/i915_drv.c
--- a/drivers/char/drm/i915_drv.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/char/drm/i915_drv.c	2005-01-10 20:11:18 -08:00
@@ -8,10 +8,109 @@
  * 
  **************************************************************************/
 
-#include "i915.h"
 #include "drmP.h"
 #include "drm.h"
 #include "i915_drm.h"
 #include "i915_drv.h"
 
-#include "drm_core.h"
+#include "drm_pciids.h"
+
+int postinit( struct drm_device *dev, unsigned long flags )
+{
+	dev->counters += 4;
+	dev->types[6] = _DRM_STAT_IRQ;
+	dev->types[7] = _DRM_STAT_PRIMARY;
+	dev->types[8] = _DRM_STAT_SECONDARY;
+	dev->types[9] = _DRM_STAT_DMA;
+	
+	DRM_INFO( "Initialized %s %d.%d.%d %s on minor %d: %s\n",
+		DRIVER_NAME,
+		DRIVER_MAJOR,
+		DRIVER_MINOR,
+		DRIVER_PATCHLEVEL,
+		DRIVER_DATE,
+		dev->minor,
+		pci_pretty_name(dev->pdev)
+		);
+	return 0;
+}
+
+static int version( drm_version_t *version )
+{
+	int len;
+
+	version->version_major = DRIVER_MAJOR;
+	version->version_minor = DRIVER_MINOR;
+	version->version_patchlevel = DRIVER_PATCHLEVEL;
+	DRM_COPY( version->name, DRIVER_NAME );
+	DRM_COPY( version->date, DRIVER_DATE );
+	DRM_COPY( version->desc, DRIVER_DESC );
+	return 0;
+}
+
+static struct pci_device_id pciidlist[] = {
+	i915_PCI_IDS
+};
+
+static drm_ioctl_desc_t ioctls[] = {
+	[DRM_IOCTL_NR(DRM_I915_INIT)]        = { i915_dma_init,      1, 1 },
+	[DRM_IOCTL_NR(DRM_I915_FLUSH)]       = { i915_flush_ioctl,   1, 0 },
+	[DRM_IOCTL_NR(DRM_I915_FLIP)]        = { i915_flip_bufs,     1, 0 },
+	[DRM_IOCTL_NR(DRM_I915_BATCHBUFFER)] = { i915_batchbuffer,   1, 0 },
+	[DRM_IOCTL_NR(DRM_I915_IRQ_EMIT)]    = { i915_irq_emit,      1, 0 },
+	[DRM_IOCTL_NR(DRM_I915_IRQ_WAIT)]    = { i915_irq_wait,      1, 0 },
+	[DRM_IOCTL_NR(DRM_I915_GETPARAM)]    = { i915_getparam,      1, 0 },
+	[DRM_IOCTL_NR(DRM_I915_SETPARAM)]    = { i915_setparam,      1, 1 },
+	[DRM_IOCTL_NR(DRM_I915_ALLOC)]       = { i915_mem_alloc,     1, 0 },
+	[DRM_IOCTL_NR(DRM_I915_FREE)]        = { i915_mem_free,      1, 0 },
+	[DRM_IOCTL_NR(DRM_I915_INIT_HEAP)]   = { i915_mem_init_heap, 1, 1 },
+	[DRM_IOCTL_NR(DRM_I915_CMDBUFFER)]   = { i915_cmdbuffer,     1, 0 }
+};
+
+static struct drm_driver driver = {
+	.driver_features = DRIVER_USE_AGP | DRIVER_REQUIRE_AGP | DRIVER_USE_MTRR |
+				DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED,
+	.pretakedown = i915_driver_pretakedown,
+	.prerelease = i915_driver_prerelease,
+	.irq_preinstall = i915_driver_irq_preinstall,
+	.irq_postinstall = i915_driver_irq_postinstall,
+	.irq_uninstall = i915_driver_irq_uninstall,
+	.irq_handler = i915_driver_irq_handler,
+	.reclaim_buffers = drm_core_reclaim_buffers,
+	.get_map_ofs = drm_core_get_map_ofs,
+	.get_reg_ofs = drm_core_get_reg_ofs,
+	.postinit = postinit,
+	.version = version,
+	.ioctls = ioctls,
+	.num_ioctls = DRM_ARRAY_SIZE(ioctls),
+	.fops = {
+		.owner = THIS_MODULE,
+		.open = drm_open,
+		.release = drm_release,
+		.ioctl = drm_ioctl,
+		.mmap = drm_mmap,
+		.poll = drm_poll,
+		.fasync = drm_fasync,
+	},
+	.pci_driver = {
+		.name          = DRIVER_NAME,
+		.id_table      = pciidlist,
+	}
+};
+
+static int __init i915_init(void)
+{
+	return drm_init(&driver);
+}
+
+static void __exit i915_exit(void)
+{
+	drm_exit(&driver);
+}
+
+module_init(i915_init);
+module_exit(i915_exit);
+
+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+MODULE_LICENSE("GPL and additional rights");
diff -Nru a/drivers/char/drm/i915_drv.h b/drivers/char/drm/i915_drv.h
--- a/drivers/char/drm/i915_drv.h	2005-01-10 20:11:22 -08:00
+++ b/drivers/char/drm/i915_drv.h	2005-01-10 20:11:22 -08:00
@@ -10,6 +10,28 @@
 #ifndef _I915_DRV_H_
 #define _I915_DRV_H_
 
+/* General customization:
+ */
+
+#define DRIVER_AUTHOR		"Tungsten Graphics, Inc."
+
+#define DRIVER_NAME		"i915"
+#define DRIVER_DESC		"Intel Graphics"
+#define DRIVER_DATE		"20040405"
+
+/* Interface history:
+ *
+ * 1.1: Original.
+ */
+#define DRIVER_MAJOR		1
+#define DRIVER_MINOR		1
+#define DRIVER_PATCHLEVEL	0
+
+/* We use our own dma mechanisms, not the drm template code.  However,
+ * the shared IRQ code is useful to us:
+ */
+#define __HAVE_PM		1
+
 typedef struct _drm_i915_ring_buffer {
 	int tail_mask;
 	unsigned long Start;
@@ -66,6 +88,8 @@
 extern int i915_setparam(DRM_IOCTL_ARGS);
 extern int i915_cmdbuffer(DRM_IOCTL_ARGS);
 extern void i915_kernel_lost_context(drm_device_t * dev);
+extern void i915_driver_pretakedown(drm_device_t *dev);
+extern void i915_driver_prerelease(drm_device_t *dev, DRMFILE filp);
 
 /* i915_irq.c */
 extern int i915_irq_emit(DRM_IOCTL_ARGS);
diff -Nru a/drivers/char/drm/i915_irq.c b/drivers/char/drm/i915_irq.c
--- a/drivers/char/drm/i915_irq.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/char/drm/i915_irq.c	2005-01-10 20:11:18 -08:00
@@ -7,7 +7,6 @@
  * 
  **************************************************************************/
 
-#include "i915.h"
 #include "drmP.h"
 #include "drm.h"
 #include "i915_drm.h"
@@ -92,10 +91,7 @@
 	drm_i915_irq_emit_t emit;
 	int result;
 
-	if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
-		DRM_ERROR("i915_irq_emit called without lock held\n");
-		return DRM_ERR(EINVAL);
-	}
+	LOCK_TEST_WITH_RETURN(dev, filp);
 
 	if (!dev_priv) {
 		DRM_ERROR("%s called with no initialization\n", __FUNCTION__);
diff -Nru a/drivers/char/drm/i915_mem.c b/drivers/char/drm/i915_mem.c
--- a/drivers/char/drm/i915_mem.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/char/drm/i915_mem.c	2005-01-10 20:11:19 -08:00
@@ -7,7 +7,6 @@
  * 
  **************************************************************************/
 
-#include "i915.h"
 #include "drmP.h"
 #include "drm.h"
 #include "i915_drm.h"
@@ -75,7 +74,7 @@
 {
 	/* Maybe cut off the start of an existing block */
 	if (start > p->start) {
-		struct mem_block *newblock = DRM_MALLOC(sizeof(*newblock));
+		struct mem_block *newblock = drm_alloc(sizeof(*newblock), DRM_MEM_BUFLISTS);
 		if (!newblock)
 			goto out;
 		newblock->start = start;
@@ -91,7 +90,7 @@
 
 	/* Maybe cut off the end of an existing block */
 	if (size < p->size) {
-		struct mem_block *newblock = DRM_MALLOC(sizeof(*newblock));
+		struct mem_block *newblock = drm_alloc(sizeof(*newblock), DRM_MEM_BUFLISTS);
 		if (!newblock)
 			goto out;
 		newblock->start = start + size;
@@ -148,7 +147,7 @@
 		p->size += q->size;
 		p->next = q->next;
 		p->next->prev = p;
-		DRM_FREE(q, sizeof(*q));
+		drm_free(q, sizeof(*q), DRM_MEM_BUFLISTS);
 	}
 
 	if (p->prev->filp == NULL) {
@@ -156,7 +155,7 @@
 		q->size += p->size;
 		q->next = p->next;
 		q->next->prev = q;
-		DRM_FREE(p, sizeof(*q));
+		drm_free(p, sizeof(*q), DRM_MEM_BUFLISTS);
 	}
 }
 
@@ -164,14 +163,14 @@
  */
 static int init_heap(struct mem_block **heap, int start, int size)
 {
-	struct mem_block *blocks = DRM_MALLOC(sizeof(*blocks));
+	struct mem_block *blocks = drm_alloc(sizeof(*blocks), DRM_MEM_BUFLISTS);
 
 	if (!blocks)
 		return -ENOMEM;
 
-	*heap = DRM_MALLOC(sizeof(**heap));
+	*heap = drm_alloc(sizeof(**heap), DRM_MEM_BUFLISTS);
 	if (!*heap) {
-		DRM_FREE(blocks, sizeof(*blocks));
+		drm_free(blocks, sizeof(*blocks), DRM_MEM_BUFLISTS);
 		return -ENOMEM;
 	}
 
@@ -211,7 +210,7 @@
 			p->size += q->size;
 			p->next = q->next;
 			p->next->prev = p;
-			DRM_FREE(q, sizeof(*q));
+			drm_free(q, sizeof(*q), DRM_MEM_BUFLISTS);
 		}
 	}
 }
@@ -228,10 +227,10 @@
 	for (p = (*heap)->next; p != *heap;) {
 		struct mem_block *q = p;
 		p = p->next;
-		DRM_FREE(q, sizeof(*q));
+		drm_free(q, sizeof(*q), DRM_MEM_BUFLISTS);
 	}
 
-	DRM_FREE(*heap, sizeof(**heap));
+	drm_free(*heap, sizeof(**heap), DRM_MEM_BUFLISTS);
 	*heap = NULL;
 }
 
diff -Nru a/drivers/char/drm/mga_dma.c b/drivers/char/drm/mga_dma.c
--- a/drivers/char/drm/mga_dma.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/char/drm/mga_dma.c	2005-01-10 20:11:22 -08:00
@@ -33,7 +33,6 @@
  *    Gareth Hughes <gareth@valinux.com>
  */
 
-#include "mga.h"
 #include "drmP.h"
 #include "drm.h"
 #include "mga_drm.h"
@@ -308,7 +307,7 @@
 	int i;
 	DRM_DEBUG( "count=%d\n", dma->buf_count );
 
-	dev_priv->head = DRM(alloc)( sizeof(drm_mga_freelist_t),
+	dev_priv->head = drm_alloc( sizeof(drm_mga_freelist_t),
 				     DRM_MEM_DRIVER );
 	if ( dev_priv->head == NULL )
 		return DRM_ERR(ENOMEM);
@@ -320,7 +319,7 @@
 		buf = dma->buflist[i];
 	        buf_priv = buf->dev_private;
 
-		entry = DRM(alloc)( sizeof(drm_mga_freelist_t),
+		entry = drm_alloc( sizeof(drm_mga_freelist_t),
 				    DRM_MEM_DRIVER );
 		if ( entry == NULL )
 			return DRM_ERR(ENOMEM);
@@ -357,7 +356,7 @@
 	entry = dev_priv->head;
 	while ( entry ) {
 		next = entry->next;
-		DRM(free)( entry, sizeof(drm_mga_freelist_t), DRM_MEM_DRIVER );
+		drm_free( entry, sizeof(drm_mga_freelist_t), DRM_MEM_DRIVER );
 		entry = next;
 	}
 
@@ -458,7 +457,7 @@
 	int ret;
 	DRM_DEBUG( "\n" );
 
-	dev_priv = DRM(alloc)( sizeof(drm_mga_private_t), DRM_MEM_DRIVER );
+	dev_priv = drm_alloc( sizeof(drm_mga_private_t), DRM_MEM_DRIVER );
 	if ( !dev_priv )
 		return DRM_ERR(ENOMEM);
 
@@ -634,7 +633,7 @@
 	 * may not have been called from userspace and after dev_private
 	 * is freed, it's too late.
 	 */
-	if ( dev->irq_enabled ) DRM(irq_uninstall)(dev);
+	if ( dev->irq_enabled ) drm_irq_uninstall(dev);
 
 	if ( dev->dev_private ) {
 		drm_mga_private_t *dev_priv = dev->dev_private;
@@ -650,7 +649,7 @@
 			mga_freelist_cleanup( dev );
 		}
 
-		DRM(free)( dev->dev_private, sizeof(drm_mga_private_t),
+		drm_free( dev->dev_private, sizeof(drm_mga_private_t),
 			   DRM_MEM_DRIVER );
 		dev->dev_private = NULL;
 	}
@@ -798,30 +797,13 @@
 	return ret;
 }
 
-static void mga_driver_pretakedown(drm_device_t *dev)
+void mga_driver_pretakedown(drm_device_t *dev)
 {
 	mga_do_cleanup_dma( dev );
 }
 
-static int mga_driver_dma_quiescent(drm_device_t *dev)
+int mga_driver_dma_quiescent(drm_device_t *dev)
 {
 	drm_mga_private_t *dev_priv = dev->dev_private;
 	return mga_do_wait_for_idle( dev_priv );
-}
-
-void mga_driver_register_fns(drm_device_t *dev)
-{
-	dev->driver_features = DRIVER_USE_AGP | DRIVER_REQUIRE_AGP | DRIVER_USE_MTRR | DRIVER_HAVE_DMA | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_IRQ_VBL;
-	dev->fn_tbl.pretakedown = mga_driver_pretakedown;
-	dev->fn_tbl.dma_quiescent = mga_driver_dma_quiescent;
-	dev->fn_tbl.vblank_wait = mga_driver_vblank_wait;
-	dev->fn_tbl.irq_preinstall = mga_driver_irq_preinstall;
-	dev->fn_tbl.irq_postinstall = mga_driver_irq_postinstall;
-	dev->fn_tbl.irq_uninstall = mga_driver_irq_uninstall;
-	dev->fn_tbl.irq_handler = mga_driver_irq_handler;
-	
-	dev->counters += 3;
-	dev->types[6] = _DRM_STAT_IRQ;
-	dev->types[7] = _DRM_STAT_PRIMARY;
-	dev->types[8] = _DRM_STAT_SECONDARY;
 }
diff -Nru a/drivers/char/drm/mga_drv.c b/drivers/char/drm/mga_drv.c
--- a/drivers/char/drm/mga_drv.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/char/drm/mga_drv.c	2005-01-10 20:11:18 -08:00
@@ -30,9 +30,108 @@
  */
 
 #include <linux/config.h>
-#include "mga.h"
 #include "drmP.h"
 #include "drm.h"
 #include "mga_drm.h"
 #include "mga_drv.h"
-#include "drm_core.h"
+
+  
+#include "drm_pciids.h"
+
+static int postinit( struct drm_device *dev, unsigned long flags )
+{
+	dev->counters += 3;
+	dev->types[6] = _DRM_STAT_IRQ;
+	dev->types[7] = _DRM_STAT_PRIMARY;
+	dev->types[8] = _DRM_STAT_SECONDARY;
+
+	DRM_INFO( "Initialized %s %d.%d.%d %s on minor %d: %s\n",
+		DRIVER_NAME,
+		DRIVER_MAJOR,
+		DRIVER_MINOR,
+		DRIVER_PATCHLEVEL,
+		DRIVER_DATE,
+		dev->minor,
+		pci_pretty_name(dev->pdev)
+		);
+	return 0;
+}
+
+static int version( drm_version_t *version )
+{
+	int len;
+
+	version->version_major = DRIVER_MAJOR;
+	version->version_minor = DRIVER_MINOR;
+	version->version_patchlevel = DRIVER_PATCHLEVEL;
+	DRM_COPY( version->name, DRIVER_NAME );
+	DRM_COPY( version->date, DRIVER_DATE );
+	DRM_COPY( version->desc, DRIVER_DESC );
+	return 0;
+}
+
+static struct pci_device_id pciidlist[] = {
+	mga_PCI_IDS
+};
+
+static drm_ioctl_desc_t ioctls[] = {
+	[DRM_IOCTL_NR(DRM_MGA_INIT)]    = { mga_dma_init,    1, 1 },
+	[DRM_IOCTL_NR(DRM_MGA_FLUSH)]   = { mga_dma_flush,   1, 0 },
+	[DRM_IOCTL_NR(DRM_MGA_RESET)]   = { mga_dma_reset,   1, 0 },
+	[DRM_IOCTL_NR(DRM_MGA_SWAP)]    = { mga_dma_swap,    1, 0 },
+	[DRM_IOCTL_NR(DRM_MGA_CLEAR)]   = { mga_dma_clear,   1, 0 },
+	[DRM_IOCTL_NR(DRM_MGA_VERTEX)]  = { mga_dma_vertex,  1, 0 },
+	[DRM_IOCTL_NR(DRM_MGA_INDICES)] = { mga_dma_indices, 1, 0 },
+	[DRM_IOCTL_NR(DRM_MGA_ILOAD)]   = { mga_dma_iload,   1, 0 },
+	[DRM_IOCTL_NR(DRM_MGA_BLIT)]    = { mga_dma_blit,    1, 0 },
+	[DRM_IOCTL_NR(DRM_MGA_GETPARAM)]= { mga_getparam,    1, 0 },
+};
+
+static struct drm_driver driver = {
+	.driver_features = DRIVER_USE_AGP | DRIVER_REQUIRE_AGP | DRIVER_USE_MTRR | DRIVER_HAVE_DMA | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_IRQ_VBL,
+	.pretakedown = mga_driver_pretakedown,
+	.dma_quiescent = mga_driver_dma_quiescent,
+	.vblank_wait = mga_driver_vblank_wait,
+	.irq_preinstall = mga_driver_irq_preinstall,
+	.irq_postinstall = mga_driver_irq_postinstall,
+	.irq_uninstall = mga_driver_irq_uninstall,
+	.irq_handler = mga_driver_irq_handler,
+	.reclaim_buffers = drm_core_reclaim_buffers,
+	.get_map_ofs = drm_core_get_map_ofs,
+	.get_reg_ofs = drm_core_get_reg_ofs,
+	.postinit = postinit,
+	.version = version,
+	.ioctls = ioctls,
+	.num_ioctls = DRM_ARRAY_SIZE(ioctls),
+	.dma_ioctl = mga_dma_buffers,
+	.fops = {
+		.owner = THIS_MODULE,
+		.open = drm_open,
+		.release = drm_release,
+		.ioctl = drm_ioctl,
+		.mmap = drm_mmap,
+		.poll = drm_poll,
+		.fasync = drm_fasync,
+	},
+	.pci_driver = {
+		.name = DRIVER_NAME,
+		.id_table = pciidlist,
+	}
+};
+
+static int __init mga_init(void)
+{
+	return drm_init(&driver);
+}
+
+static void __exit mga_exit(void)
+{
+	drm_exit(&driver);
+}
+
+module_init(mga_init);
+module_exit(mga_exit);
+
+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+MODULE_LICENSE("GPL and additional rights");
diff -Nru a/drivers/char/drm/mga_drv.h b/drivers/char/drm/mga_drv.h
--- a/drivers/char/drm/mga_drv.h	2005-01-10 20:11:22 -08:00
+++ b/drivers/char/drm/mga_drv.h	2005-01-10 20:11:22 -08:00
@@ -31,6 +31,19 @@
 #ifndef __MGA_DRV_H__
 #define __MGA_DRV_H__
 
+/* General customization:
+ */
+
+#define DRIVER_AUTHOR		"Gareth Hughes, VA Linux Systems Inc."
+
+#define DRIVER_NAME		"mga"
+#define DRIVER_DESC		"Matrox G200/G400"
+#define DRIVER_DATE		"20021029"
+
+#define DRIVER_MAJOR		3
+#define DRIVER_MINOR		1
+#define DRIVER_PATCHLEVEL	0
+
 typedef struct drm_mga_primary_buffer {
 	u8 *start;
 	u8 *end;
@@ -104,6 +117,8 @@
 extern int mga_dma_flush( DRM_IOCTL_ARGS );
 extern int mga_dma_reset( DRM_IOCTL_ARGS );
 extern int mga_dma_buffers( DRM_IOCTL_ARGS );
+extern void mga_driver_pretakedown(drm_device_t *dev);
+extern int mga_driver_dma_quiescent(drm_device_t *dev);
 
 extern int mga_do_wait_for_idle( drm_mga_private_t *dev_priv );
 extern int mga_do_dma_idle( drm_mga_private_t *dev_priv );
diff -Nru a/drivers/char/drm/mga_irq.c b/drivers/char/drm/mga_irq.c
--- a/drivers/char/drm/mga_irq.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/char/drm/mga_irq.c	2005-01-10 20:11:15 -08:00
@@ -30,7 +30,6 @@
  *    Eric Anholt <anholt@FreeBSD.org>
  */
 
-#include "mga.h"
 #include "drmP.h"
 #include "drm.h"
 #include "mga_drm.h"
@@ -50,7 +49,7 @@
 		MGA_WRITE( MGA_ICLEAR, MGA_VLINEICLR );
 		atomic_inc(&dev->vbl_received);
 		DRM_WAKEUP(&dev->vbl_queue);
-		DRM(vbl_send_signals)( dev );
+		drm_vbl_send_signals( dev );
 		return IRQ_HANDLED;
 	}
 	return IRQ_NONE;
diff -Nru a/drivers/char/drm/mga_state.c b/drivers/char/drm/mga_state.c
--- a/drivers/char/drm/mga_state.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/char/drm/mga_state.c	2005-01-10 20:11:18 -08:00
@@ -32,7 +32,6 @@
  *    Gareth Hughes <gareth@valinux.com>
  */
 
-#include "mga.h"
 #include "drmP.h"
 #include "drm.h"
 #include "mga_drm.h"
diff -Nru a/drivers/char/drm/mga_warp.c b/drivers/char/drm/mga_warp.c
--- a/drivers/char/drm/mga_warp.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/char/drm/mga_warp.c	2005-01-10 20:11:18 -08:00
@@ -27,7 +27,6 @@
  *    Gareth Hughes <gareth@valinux.com>
  */
 
-#include "mga.h"
 #include "drmP.h"
 #include "drm.h"
 #include "mga_drm.h"
diff -Nru a/drivers/char/drm/r128_cce.c b/drivers/char/drm/r128_cce.c
--- a/drivers/char/drm/r128_cce.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/char/drm/r128_cce.c	2005-01-10 20:11:16 -08:00
@@ -28,7 +28,6 @@
  *    Gareth Hughes <gareth@valinux.com>
  */
 
-#include "r128.h"
 #include "drmP.h"
 #include "drm.h"
 #include "r128_drm.h"
@@ -355,7 +354,7 @@
 
 	DRM_DEBUG( "\n" );
 
-	dev_priv = DRM(alloc)( sizeof(drm_r128_private_t), DRM_MEM_DRIVER );
+	dev_priv = drm_alloc( sizeof(drm_r128_private_t), DRM_MEM_DRIVER );
 	if ( dev_priv == NULL )
 		return DRM_ERR(ENOMEM);
 
@@ -544,7 +543,7 @@
 	dev_priv->ring.end = ((u32 *)dev_priv->cce_ring->handle
 			      + init->ring_size / sizeof(u32));
 	dev_priv->ring.size = init->ring_size;
-	dev_priv->ring.size_l2qw = DRM(order)( init->ring_size / 8 );
+	dev_priv->ring.size_l2qw = drm_order( init->ring_size / 8 );
 
 	dev_priv->ring.tail_mask =
 		(dev_priv->ring.size / sizeof(u32)) - 1;
@@ -561,7 +560,7 @@
 #if __OS_HAS_AGP
 	if ( dev_priv->is_pci ) {
 #endif
-		if (!DRM(ati_pcigart_init)( dev, &dev_priv->phys_pci_gart,
+		if (!drm_ati_pcigart_init( dev, &dev_priv->phys_pci_gart,
      					    &dev_priv->bus_pci_gart) ) {
 			DRM_ERROR( "failed to init PCI GART!\n" );
 			dev->dev_private = (void *)dev_priv;
@@ -590,7 +589,7 @@
 	 * may not have been called from userspace and after dev_private
 	 * is freed, it's too late.
 	 */
-	if ( dev->irq_enabled ) DRM(irq_uninstall)(dev);
+	if ( dev->irq_enabled ) drm_irq_uninstall(dev);
 
 	if ( dev->dev_private ) {
 		drm_r128_private_t *dev_priv = dev->dev_private;
@@ -606,13 +605,13 @@
 		} else
 #endif
 		{
-			if (!DRM(ati_pcigart_cleanup)( dev,
+			if (!drm_ati_pcigart_cleanup( dev,
 						dev_priv->phys_pci_gart,
 						dev_priv->bus_pci_gart ))
 				DRM_ERROR( "failed to cleanup PCI GART!\n" );
 		}
 
-		DRM(free)( dev->dev_private, sizeof(drm_r128_private_t),
+		drm_free( dev->dev_private, sizeof(drm_r128_private_t),
 			   DRM_MEM_DRIVER );
 		dev->dev_private = NULL;
 	}
@@ -771,7 +770,7 @@
 	drm_r128_freelist_t *entry;
 	int i;
 
-	dev_priv->head = DRM(alloc)( sizeof(drm_r128_freelist_t),
+	dev_priv->head = drm_alloc( sizeof(drm_r128_freelist_t),
 				     DRM_MEM_DRIVER );
 	if ( dev_priv->head == NULL )
 		return DRM_ERR(ENOMEM);
@@ -783,7 +782,7 @@
 		buf = dma->buflist[i];
 		buf_priv = buf->dev_private;
 
-		entry = DRM(alloc)( sizeof(drm_r128_freelist_t),
+		entry = drm_alloc( sizeof(drm_r128_freelist_t),
 				    DRM_MEM_DRIVER );
 		if ( !entry ) return DRM_ERR(ENOMEM);
 
diff -Nru a/drivers/char/drm/r128_drv.c b/drivers/char/drm/r128_drv.c
--- a/drivers/char/drm/r128_drv.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/char/drm/r128_drv.c	2005-01-10 20:11:17 -08:00
@@ -30,11 +30,116 @@
  */
 
 #include <linux/config.h>
-#include "r128.h"
 #include "drmP.h"
 #include "drm.h"
 #include "r128_drm.h"
 #include "r128_drv.h"
-#include "ati_pcigart.h"
 
-#include "drm_core.h"
+#include "drm_pciids.h"
+
+static int postinit( struct drm_device *dev, unsigned long flags )
+{
+	DRM_INFO( "Initialized %s %d.%d.%d %s on minor %d: %s\n",
+		DRIVER_NAME,
+		DRIVER_MAJOR,
+		DRIVER_MINOR,
+		DRIVER_PATCHLEVEL,
+		DRIVER_DATE,
+		dev->minor,
+		pci_pretty_name(dev->pdev)
+		);
+	return 0;
+}
+
+static int version( drm_version_t *version )
+{
+	int len;
+
+	version->version_major = DRIVER_MAJOR;
+	version->version_minor = DRIVER_MINOR;
+	version->version_patchlevel = DRIVER_PATCHLEVEL;
+	DRM_COPY( version->name, DRIVER_NAME );
+	DRM_COPY( version->date, DRIVER_DATE );
+	DRM_COPY( version->desc, DRIVER_DESC );
+	return 0;
+}
+
+static struct pci_device_id pciidlist[] = {
+	r128_PCI_IDS
+};
+
+/* Interface history:
+ *
+ * ??  - ??
+ * 2.4 - Add support for ycbcr textures (no new ioctls)
+ * 2.5 - Add FLIP ioctl, disable FULLSCREEN.
+ */
+static drm_ioctl_desc_t ioctls[] = {
+   [DRM_IOCTL_NR(DRM_R128_INIT)]       = { r128_cce_init,     1, 1 },
+   [DRM_IOCTL_NR(DRM_R128_CCE_START)]  = { r128_cce_start,    1, 1 },
+   [DRM_IOCTL_NR(DRM_R128_CCE_STOP)]   = { r128_cce_stop,     1, 1 },
+   [DRM_IOCTL_NR(DRM_R128_CCE_RESET)]  = { r128_cce_reset,    1, 1 },
+   [DRM_IOCTL_NR(DRM_R128_CCE_IDLE)]   = { r128_cce_idle,     1, 0 },
+   [DRM_IOCTL_NR(DRM_R128_RESET)]      = { r128_engine_reset, 1, 0 },
+   [DRM_IOCTL_NR(DRM_R128_FULLSCREEN)] = { r128_fullscreen,   1, 0 },
+   [DRM_IOCTL_NR(DRM_R128_SWAP)]       = { r128_cce_swap,     1, 0 },
+   [DRM_IOCTL_NR(DRM_R128_FLIP)]       = { r128_cce_flip,     1, 0 },
+   [DRM_IOCTL_NR(DRM_R128_CLEAR)]      = { r128_cce_clear,    1, 0 },
+   [DRM_IOCTL_NR(DRM_R128_VERTEX)]     = { r128_cce_vertex,   1, 0 },
+   [DRM_IOCTL_NR(DRM_R128_INDICES)]    = { r128_cce_indices,  1, 0 },
+   [DRM_IOCTL_NR(DRM_R128_BLIT)]       = { r128_cce_blit,     1, 0 },
+   [DRM_IOCTL_NR(DRM_R128_DEPTH)]      = { r128_cce_depth,    1, 0 },
+   [DRM_IOCTL_NR(DRM_R128_STIPPLE)]    = { r128_cce_stipple,  1, 0 },
+   [DRM_IOCTL_NR(DRM_R128_INDIRECT)]   = { r128_cce_indirect, 1, 1 },
+   [DRM_IOCTL_NR(DRM_R128_GETPARAM)]   = { r128_getparam, 1, 0 },
+};
+
+static struct drm_driver driver = {
+	.driver_features = DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_PCI_DMA | DRIVER_SG | DRIVER_HAVE_DMA | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_IRQ_VBL,
+	.dev_priv_size = sizeof(drm_r128_buf_priv_t),
+	.prerelease = r128_driver_prerelease,
+	.pretakedown = r128_driver_pretakedown,
+	.vblank_wait = r128_driver_vblank_wait,
+	.irq_preinstall = r128_driver_irq_preinstall,
+	.irq_postinstall = r128_driver_irq_postinstall,
+	.irq_uninstall = r128_driver_irq_uninstall,
+	.irq_handler = r128_driver_irq_handler,
+	.reclaim_buffers = drm_core_reclaim_buffers,
+	.get_map_ofs = drm_core_get_map_ofs,
+	.get_reg_ofs = drm_core_get_reg_ofs,
+	.postinit = postinit,
+	.version = version,
+	.ioctls = ioctls,
+	.num_ioctls = DRM_ARRAY_SIZE(ioctls),
+	.dma_ioctl = r128_cce_buffers,
+	.fops = {
+		.owner = THIS_MODULE,
+		.open = drm_open,
+		.release = drm_release,
+		.ioctl = drm_ioctl,
+		.mmap = drm_mmap,
+		.poll = drm_poll,
+		.fasync = drm_fasync,
+	},
+	.pci_driver = {
+		.name          = DRIVER_NAME,
+		.id_table      = pciidlist,
+	}
+};
+
+static int __init r128_init(void)
+{
+	return drm_init(&driver);
+}
+
+static void __exit r128_exit(void)
+{
+	drm_exit(&driver);
+}
+
+module_init(r128_init);
+module_exit(r128_exit);
+
+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+MODULE_LICENSE("GPL and additional rights");
diff -Nru a/drivers/char/drm/r128_drv.h b/drivers/char/drm/r128_drv.h
--- a/drivers/char/drm/r128_drv.h	2005-01-10 20:11:23 -08:00
+++ b/drivers/char/drm/r128_drv.h	2005-01-10 20:11:23 -08:00
@@ -28,12 +28,25 @@
  *    Rickard E. (Rik) Faith <faith@valinux.com>
  *    Kevin E. Martin <martin@valinux.com>
  *    Gareth Hughes <gareth@valinux.com>
- *    Michel Dänzer <daenzerm@student.ethz.ch>
+ *    Michel Dï¿½zer <daenzerm@student.ethz.ch>
  */
 
 #ifndef __R128_DRV_H__
 #define __R128_DRV_H__
 
+/* General customization:
+ */
+#define DRIVER_AUTHOR		"Gareth Hughes, VA Linux Systems Inc."
+
+#define DRIVER_NAME		"r128"
+#define DRIVER_DESC		"ATI Rage 128"
+#define DRIVER_DATE		"20030725"
+
+#define DRIVER_MAJOR		2
+#define DRIVER_MINOR		5
+#define DRIVER_PATCHLEVEL	0
+
+
 #define GET_RING_HEAD(dev_priv)		R128_READ( R128_PM4_BUFFER_DL_RPTR )
 
 typedef struct drm_r128_freelist {
@@ -148,6 +161,8 @@
 extern void r128_driver_irq_preinstall( drm_device_t *dev );
 extern void r128_driver_irq_postinstall( drm_device_t *dev );
 extern void r128_driver_irq_uninstall( drm_device_t *dev );
+extern void r128_driver_pretakedown(drm_device_t *dev);
+extern void r128_driver_prerelease(drm_device_t *dev, DRMFILE filp);
 
 /* Register definitions, register access macros and drmAddMap constants
  * for Rage 128 kernel driver.
diff -Nru a/drivers/char/drm/r128_irq.c b/drivers/char/drm/r128_irq.c
--- a/drivers/char/drm/r128_irq.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/char/drm/r128_irq.c	2005-01-10 20:11:23 -08:00
@@ -30,7 +30,6 @@
  *    Eric Anholt <anholt@FreeBSD.org>
  */
 
-#include "r128.h"
 #include "drmP.h"
 #include "drm.h"
 #include "r128_drm.h"
@@ -50,7 +49,7 @@
 		R128_WRITE( R128_GEN_INT_STATUS, R128_CRTC_VBLANK_INT_AK );
 		atomic_inc(&dev->vbl_received);
 		DRM_WAKEUP(&dev->vbl_queue);
-		DRM(vbl_send_signals)( dev );
+		drm_vbl_send_signals( dev );
 		return IRQ_HANDLED;
 	}
 	return IRQ_NONE;
diff -Nru a/drivers/char/drm/r128_state.c b/drivers/char/drm/r128_state.c
--- a/drivers/char/drm/r128_state.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/char/drm/r128_state.c	2005-01-10 20:11:16 -08:00
@@ -27,7 +27,6 @@
  *    Gareth Hughes <gareth@valinux.com>
  */
 
-#include "r128.h"
 #include "drmP.h"
 #include "drm.h"
 #include "r128_drm.h"
@@ -926,24 +925,24 @@
 	}
 
 	buffer_size = depth->n * sizeof(u32);
-	buffer = DRM_MALLOC( buffer_size );
+	buffer = drm_alloc( buffer_size, DRM_MEM_BUFS );
 	if ( buffer == NULL )
 		return DRM_ERR(ENOMEM);
 	if ( DRM_COPY_FROM_USER( buffer, depth->buffer, buffer_size ) ) {
-		DRM_FREE( buffer, buffer_size);
+		drm_free( buffer, buffer_size, DRM_MEM_BUFS);
 		return DRM_ERR(EFAULT);
 	}
 
 	mask_size = depth->n * sizeof(u8);
 	if ( depth->mask ) {
-		mask = DRM_MALLOC( mask_size );
+		mask = drm_alloc( mask_size, DRM_MEM_BUFS );
 		if ( mask == NULL ) {
-			DRM_FREE( buffer, buffer_size );
+			drm_free( buffer, buffer_size, DRM_MEM_BUFS );
 			return DRM_ERR(ENOMEM);
 		}
 		if ( DRM_COPY_FROM_USER( mask, depth->mask, mask_size ) ) {
-			DRM_FREE( buffer, buffer_size );
-			DRM_FREE( mask, mask_size );
+			drm_free( buffer, buffer_size, DRM_MEM_BUFS );
+			drm_free( mask, mask_size, DRM_MEM_BUFS );
 			return DRM_ERR(EFAULT);
 		}
 
@@ -970,7 +969,7 @@
 			}
 		}
 
-		DRM_FREE( mask, mask_size );
+		drm_free( mask, mask_size, DRM_MEM_BUFS );
 	} else {
 		for ( i = 0 ; i < count ; i++, x++ ) {
 			BEGIN_RING( 6 );
@@ -994,7 +993,7 @@
 		}
 	}
 
-	DRM_FREE( buffer, buffer_size );
+	drm_free( buffer, buffer_size, DRM_MEM_BUFS );
 
 	return 0;
 }
@@ -1016,54 +1015,54 @@
 
 	xbuf_size = count * sizeof(*x);
 	ybuf_size = count * sizeof(*y);
-	x = DRM_MALLOC( xbuf_size );
+	x = drm_alloc( xbuf_size, DRM_MEM_BUFS );
 	if ( x == NULL ) {
 		return DRM_ERR(ENOMEM);
 	}
-	y = DRM_MALLOC( ybuf_size );
+	y = drm_alloc( ybuf_size, DRM_MEM_BUFS );
 	if ( y == NULL ) {
-		DRM_FREE( x, xbuf_size );
+		drm_free( x, xbuf_size, DRM_MEM_BUFS );
 		return DRM_ERR(ENOMEM);
 	}
 	if ( DRM_COPY_FROM_USER( x, depth->x, xbuf_size ) ) {
-		DRM_FREE( x, xbuf_size );
-		DRM_FREE( y, ybuf_size );
+		drm_free( x, xbuf_size, DRM_MEM_BUFS );
+		drm_free( y, ybuf_size, DRM_MEM_BUFS );
 		return DRM_ERR(EFAULT);
 	}
 	if ( DRM_COPY_FROM_USER( y, depth->y, xbuf_size ) ) {
-		DRM_FREE( x, xbuf_size );
-		DRM_FREE( y, ybuf_size );
+		drm_free( x, xbuf_size, DRM_MEM_BUFS );
+		drm_free( y, ybuf_size, DRM_MEM_BUFS );
 		return DRM_ERR(EFAULT);
 	}
 
 	buffer_size = depth->n * sizeof(u32);
-	buffer = DRM_MALLOC( buffer_size );
+	buffer = drm_alloc( buffer_size, DRM_MEM_BUFS );
 	if ( buffer == NULL ) {
-		DRM_FREE( x, xbuf_size );
-		DRM_FREE( y, ybuf_size );
+		drm_free( x, xbuf_size, DRM_MEM_BUFS );
+		drm_free( y, ybuf_size, DRM_MEM_BUFS );
 		return DRM_ERR(ENOMEM);
 	}
 	if ( DRM_COPY_FROM_USER( buffer, depth->buffer, buffer_size ) ) {
-		DRM_FREE( x, xbuf_size );
-		DRM_FREE( y, ybuf_size );
-		DRM_FREE( buffer, buffer_size );
+		drm_free( x, xbuf_size, DRM_MEM_BUFS );
+		drm_free( y, ybuf_size, DRM_MEM_BUFS );
+		drm_free( buffer, buffer_size, DRM_MEM_BUFS );
 		return DRM_ERR(EFAULT);
 	}
 
 	if ( depth->mask ) {
 		mask_size = depth->n * sizeof(u8);
-		mask = DRM_MALLOC( mask_size );
+		mask = drm_alloc( mask_size, DRM_MEM_BUFS );
 		if ( mask == NULL ) {
-			DRM_FREE( x, xbuf_size );
-			DRM_FREE( y, ybuf_size );
-			DRM_FREE( buffer, buffer_size );
+			drm_free( x, xbuf_size, DRM_MEM_BUFS );
+			drm_free( y, ybuf_size, DRM_MEM_BUFS );
+			drm_free( buffer, buffer_size, DRM_MEM_BUFS );
 			return DRM_ERR(ENOMEM);
 		}
 		if ( DRM_COPY_FROM_USER( mask, depth->mask, mask_size ) ) {
-			DRM_FREE( x, xbuf_size );
-			DRM_FREE( y, ybuf_size );
-			DRM_FREE( buffer, buffer_size );
-			DRM_FREE( mask, mask_size );
+			drm_free( x, xbuf_size, DRM_MEM_BUFS  );
+			drm_free( y, ybuf_size, DRM_MEM_BUFS  );
+			drm_free( buffer, buffer_size, DRM_MEM_BUFS  );
+			drm_free( mask, mask_size, DRM_MEM_BUFS  );
 			return DRM_ERR(EFAULT);
 		}
 
@@ -1090,7 +1089,7 @@
 			}
 		}
 
-		DRM_FREE( mask, mask_size );
+		drm_free( mask, mask_size, DRM_MEM_BUFS );
 	} else {
 		for ( i = 0 ; i < count ; i++ ) {
 			BEGIN_RING( 6 );
@@ -1114,9 +1113,9 @@
 		}
 	}
 
-	DRM_FREE( x, xbuf_size );
-	DRM_FREE( y, ybuf_size );
-	DRM_FREE( buffer, buffer_size );
+	drm_free( x, xbuf_size, DRM_MEM_BUFS );
+	drm_free( y, ybuf_size, DRM_MEM_BUFS );
+	drm_free( buffer, buffer_size, DRM_MEM_BUFS );
 
 	return 0;
 }
@@ -1184,23 +1183,23 @@
 
 	xbuf_size = count * sizeof(*x);
 	ybuf_size = count * sizeof(*y);
-	x = DRM_MALLOC( xbuf_size );
+	x = drm_alloc( xbuf_size, DRM_MEM_BUFS );
 	if ( x == NULL ) {
 		return DRM_ERR(ENOMEM);
 	}
-	y = DRM_MALLOC( ybuf_size );
+	y = drm_alloc( ybuf_size, DRM_MEM_BUFS );
 	if ( y == NULL ) {
-		DRM_FREE( x, xbuf_size );
+		drm_free( x, xbuf_size, DRM_MEM_BUFS );
 		return DRM_ERR(ENOMEM);
 	}
 	if ( DRM_COPY_FROM_USER( x, depth->x, xbuf_size ) ) {
-		DRM_FREE( x, xbuf_size );
-		DRM_FREE( y, ybuf_size );
+		drm_free( x, xbuf_size, DRM_MEM_BUFS );
+		drm_free( y, ybuf_size, DRM_MEM_BUFS );
 		return DRM_ERR(EFAULT);
 	}
 	if ( DRM_COPY_FROM_USER( y, depth->y, ybuf_size ) ) {
-		DRM_FREE( x, xbuf_size );
-		DRM_FREE( y, ybuf_size );
+		drm_free( x, xbuf_size, DRM_MEM_BUFS );
+		drm_free( y, ybuf_size, DRM_MEM_BUFS );
 		return DRM_ERR(EFAULT);
 	}
 
@@ -1228,8 +1227,8 @@
 		ADVANCE_RING();
 	}
 
-	DRM_FREE( x, xbuf_size );
-	DRM_FREE( y, ybuf_size );
+	drm_free( x, xbuf_size, DRM_MEM_BUFS );
+	drm_free( y, ybuf_size, DRM_MEM_BUFS );
 
 	return 0;
 }
@@ -1695,7 +1694,7 @@
 	return 0;
 }
 
-static void r128_driver_prerelease(drm_device_t *dev, DRMFILE filp)
+void r128_driver_prerelease(drm_device_t *dev, DRMFILE filp)
 {
 	if ( dev->dev_private ) {
 		drm_r128_private_t *dev_priv = dev->dev_private;
@@ -1705,20 +1704,8 @@
 	}			
 }
 
-static void r128_driver_pretakedown(drm_device_t *dev)
+void r128_driver_pretakedown(drm_device_t *dev)
 {
 	r128_do_cleanup_cce( dev );
 }
 
-void r128_driver_register_fns(drm_device_t *dev)
-{
-	dev->driver_features = DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_PCI_DMA | DRIVER_SG | DRIVER_HAVE_DMA | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_IRQ_VBL;
-	dev->dev_priv_size = sizeof(drm_r128_buf_priv_t);
-	dev->fn_tbl.prerelease = r128_driver_prerelease;
-	dev->fn_tbl.pretakedown = r128_driver_pretakedown;
-	dev->fn_tbl.vblank_wait = r128_driver_vblank_wait;
-	dev->fn_tbl.irq_preinstall = r128_driver_irq_preinstall;
-	dev->fn_tbl.irq_postinstall = r128_driver_irq_postinstall;
-	dev->fn_tbl.irq_uninstall = r128_driver_irq_uninstall;
-	dev->fn_tbl.irq_handler = r128_driver_irq_handler;
-}
diff -Nru a/drivers/char/drm/radeon_cp.c b/drivers/char/drm/radeon_cp.c
--- a/drivers/char/drm/radeon_cp.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/char/drm/radeon_cp.c	2005-01-10 20:11:17 -08:00
@@ -28,7 +28,6 @@
  *    Gareth Hughes <gareth@valinux.com>
  */
 
-#include "radeon.h"
 #include "drmP.h"
 #include "drm.h"
 #include "radeon_drm.h"
@@ -1006,7 +1005,7 @@
 	drm_radeon_private_t *dev_priv;
 	DRM_DEBUG( "\n" );
 
-	dev_priv = DRM(alloc)( sizeof(drm_radeon_private_t), DRM_MEM_DRIVER );
+	dev_priv = drm_alloc( sizeof(drm_radeon_private_t), DRM_MEM_DRIVER );
 	if ( dev_priv == NULL )
 		return DRM_ERR(ENOMEM);
 
@@ -1233,7 +1232,7 @@
 	dev_priv->ring.end = ((u32 *)dev_priv->cp_ring->handle
 			      + init->ring_size / sizeof(u32));
 	dev_priv->ring.size = init->ring_size;
-	dev_priv->ring.size_l2qw = DRM(order)( init->ring_size / 8 );
+	dev_priv->ring.size_l2qw = drm_order( init->ring_size / 8 );
 
 	dev_priv->ring.tail_mask =
 		(dev_priv->ring.size / sizeof(u32)) - 1;
@@ -1247,7 +1246,7 @@
 	} else
 #endif
 	{
-		if (!DRM(ati_pcigart_init)( dev, &dev_priv->phys_pci_gart,
+		if (!drm_ati_pcigart_init( dev, &dev_priv->phys_pci_gart,
 					    &dev_priv->bus_pci_gart)) {
 			DRM_ERROR( "failed to init PCI GART!\n" );
 			dev->dev_private = (void *)dev_priv;
@@ -1279,7 +1278,7 @@
 	 * may not have been called from userspace and after dev_private
 	 * is freed, it's too late.
 	 */
-	if ( dev->irq_enabled ) DRM(irq_uninstall)(dev);
+	if ( dev->irq_enabled ) drm_irq_uninstall(dev);
 
 	if ( dev->dev_private ) {
 		drm_radeon_private_t *dev_priv = dev->dev_private;
@@ -1295,13 +1294,13 @@
 		} else
 #endif
 		{
-			if (!DRM(ati_pcigart_cleanup)( dev,
+			if (!drm_ati_pcigart_cleanup( dev,
 						dev_priv->phys_pci_gart,
 						dev_priv->bus_pci_gart ))
 				DRM_ERROR( "failed to cleanup PCI GART!\n" );
 		}
 
-		DRM(free)( dev->dev_private, sizeof(drm_radeon_private_t),
+		drm_free( dev->dev_private, sizeof(drm_radeon_private_t),
 			   DRM_MEM_DRIVER );
 		dev->dev_private = NULL;
 	}
diff -Nru a/drivers/char/drm/radeon_drv.c b/drivers/char/drm/radeon_drv.c
--- a/drivers/char/drm/radeon_drv.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/char/drm/radeon_drv.c	2005-01-10 20:11:21 -08:00
@@ -31,11 +31,153 @@
 
 
 #include <linux/config.h>
-#include "radeon.h"
 #include "drmP.h"
 #include "drm.h"
 #include "radeon_drm.h"
 #include "radeon_drv.h"
-#include "ati_pcigart.h"
 
-#include "drm_core.h"
+#include "drm_pciids.h"
+
+static int postinit( struct drm_device *dev, unsigned long flags )
+{
+	DRM_INFO( "Initialized %s %d.%d.%d %s on minor %d: %s\n",
+		DRIVER_NAME,
+		DRIVER_MAJOR,
+		DRIVER_MINOR,
+		DRIVER_PATCHLEVEL,
+		DRIVER_DATE,
+		dev->minor,
+		pci_pretty_name(dev->pdev)
+		);
+	return 0;
+}
+
+static int version( drm_version_t *version )
+{
+	int len;
+
+	version->version_major = DRIVER_MAJOR;
+	version->version_minor = DRIVER_MINOR;
+	version->version_patchlevel = DRIVER_PATCHLEVEL;
+	DRM_COPY( version->name, DRIVER_NAME );
+	DRM_COPY( version->date, DRIVER_DATE );
+	DRM_COPY( version->desc, DRIVER_DESC );
+	return 0;
+}
+
+static struct pci_device_id pciidlist[] = {
+	radeon_PCI_IDS
+};
+
+/* Interface history:
+ *
+ * 1.1 - ??
+ * 1.2 - Add vertex2 ioctl (keith)
+ *     - Add stencil capability to clear ioctl (gareth, keith)
+ *     - Increase MAX_TEXTURE_LEVELS (brian)
+ * 1.3 - Add cmdbuf ioctl (keith)
+ *     - Add support for new radeon packets (keith)
+ *     - Add getparam ioctl (keith)
+ *     - Add flip-buffers ioctl, deprecate fullscreen foo (keith).
+ * 1.4 - Add scratch registers to get_param ioctl.
+ * 1.5 - Add r200 packets to cmdbuf ioctl
+ *     - Add r200 function to init ioctl
+ *     - Add 'scalar2' instruction to cmdbuf
+ * 1.6 - Add static GART memory manager
+ *       Add irq handler (won't be turned on unless X server knows to)
+ *       Add irq ioctls and irq_active getparam.
+ *       Add wait command for cmdbuf ioctl
+ *       Add GART offset query for getparam
+ * 1.7 - Add support for cube map registers: R200_PP_CUBIC_FACES_[0..5]
+ *       and R200_PP_CUBIC_OFFSET_F1_[0..5].
+ *       Added packets R200_EMIT_PP_CUBIC_FACES_[0..5] and
+ *       R200_EMIT_PP_CUBIC_OFFSETS_[0..5].  (brian)
+ * 1.8 - Remove need to call cleanup ioctls on last client exit (keith)
+ *       Add 'GET' queries for starting additional clients on different VT's.
+ * 1.9 - Add DRM_IOCTL_RADEON_CP_RESUME ioctl.
+ *       Add texture rectangle support for r100.
+ * 1.10- Add SETPARAM ioctl; first parameter to set is FB_LOCATION, which
+ *       clients use to tell the DRM where they think the framebuffer is 
+ *       located in the card's address space
+ * 1.11- Add packet R200_EMIT_RB3D_BLENDCOLOR to support GL_EXT_blend_color
+ *       and GL_EXT_blend_[func|equation]_separate on r200
+ */
+static drm_ioctl_desc_t ioctls[] = {
+ [DRM_IOCTL_NR(DRM_RADEON_CP_INIT)]    = { radeon_cp_init,      1, 1 },
+ [DRM_IOCTL_NR(DRM_RADEON_CP_START)]   = { radeon_cp_start,     1, 1 },
+ [DRM_IOCTL_NR(DRM_RADEON_CP_STOP)]    = { radeon_cp_stop,      1, 1 },
+ [DRM_IOCTL_NR(DRM_RADEON_CP_RESET)]   = { radeon_cp_reset,     1, 1 },
+ [DRM_IOCTL_NR(DRM_RADEON_CP_IDLE)]    = { radeon_cp_idle,      1, 0 },
+ [DRM_IOCTL_NR(DRM_RADEON_CP_RESUME)]  = { radeon_cp_resume,    1, 0 },
+ [DRM_IOCTL_NR(DRM_RADEON_RESET)]      = { radeon_engine_reset, 1, 0 },
+ [DRM_IOCTL_NR(DRM_RADEON_FULLSCREEN)] = { radeon_fullscreen,   1, 0 },
+ [DRM_IOCTL_NR(DRM_RADEON_SWAP)]       = { radeon_cp_swap,      1, 0 },
+ [DRM_IOCTL_NR(DRM_RADEON_CLEAR)]      = { radeon_cp_clear,     1, 0 },
+ [DRM_IOCTL_NR(DRM_RADEON_VERTEX)]     = { radeon_cp_vertex,    1, 0 },
+ [DRM_IOCTL_NR(DRM_RADEON_INDICES)]    = { radeon_cp_indices,   1, 0 },
+ [DRM_IOCTL_NR(DRM_RADEON_TEXTURE)]    = { radeon_cp_texture,   1, 0 },
+ [DRM_IOCTL_NR(DRM_RADEON_STIPPLE)]    = { radeon_cp_stipple,   1, 0 },
+ [DRM_IOCTL_NR(DRM_RADEON_INDIRECT)]   = { radeon_cp_indirect,  1, 1 },
+ [DRM_IOCTL_NR(DRM_RADEON_VERTEX2)]    = { radeon_cp_vertex2,   1, 0 },
+ [DRM_IOCTL_NR(DRM_RADEON_CMDBUF)]     = { radeon_cp_cmdbuf,    1, 0 },
+ [DRM_IOCTL_NR(DRM_RADEON_GETPARAM)]   = { radeon_cp_getparam,  1, 0 },
+ [DRM_IOCTL_NR(DRM_RADEON_FLIP)]       = { radeon_cp_flip,      1, 0 },
+ [DRM_IOCTL_NR(DRM_RADEON_ALLOC)]      = { radeon_mem_alloc,    1, 0 },
+ [DRM_IOCTL_NR(DRM_RADEON_FREE)]       = { radeon_mem_free,     1, 0 },
+ [DRM_IOCTL_NR(DRM_RADEON_INIT_HEAP)]  = { radeon_mem_init_heap,1, 1 },
+ [DRM_IOCTL_NR(DRM_RADEON_IRQ_EMIT)]   = { radeon_irq_emit,     1, 0 },
+ [DRM_IOCTL_NR(DRM_RADEON_IRQ_WAIT)]   = { radeon_irq_wait,     1, 0 },
+ [DRM_IOCTL_NR(DRM_RADEON_SETPARAM)]   = { radeon_cp_setparam,  1, 0 },
+};
+
+static struct drm_driver driver = {
+	.driver_features = DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_PCI_DMA | DRIVER_SG | DRIVER_HAVE_IRQ | DRIVER_HAVE_DMA | DRIVER_IRQ_SHARED | DRIVER_IRQ_VBL,
+	.dev_priv_size = sizeof(drm_radeon_buf_priv_t),
+	.prerelease = radeon_driver_prerelease,
+	.pretakedown = radeon_driver_pretakedown,
+	.open_helper = radeon_driver_open_helper,
+	.vblank_wait = radeon_driver_vblank_wait,
+	.irq_preinstall = radeon_driver_irq_preinstall,
+	.irq_postinstall = radeon_driver_irq_postinstall,
+	.irq_uninstall = radeon_driver_irq_uninstall,
+	.irq_handler = radeon_driver_irq_handler,
+	.free_filp_priv = radeon_driver_free_filp_priv,
+	.reclaim_buffers = drm_core_reclaim_buffers,
+	.get_map_ofs = drm_core_get_map_ofs,
+	.get_reg_ofs = drm_core_get_reg_ofs,
+	.postinit = postinit,
+	.version = version,
+	.ioctls = ioctls,
+	.num_ioctls = DRM_ARRAY_SIZE(ioctls),
+	.dma_ioctl = radeon_cp_buffers,
+	.fops = {
+		.owner = THIS_MODULE,
+		.open = drm_open,
+		.release = drm_release,
+		.ioctl = drm_ioctl,
+		.mmap = drm_mmap,
+		.poll = drm_poll,
+		.fasync = drm_fasync,
+	},
+	.pci_driver = {
+		.name          = DRIVER_NAME,
+		.id_table      = pciidlist,
+	}
+};
+
+static int __init radeon_init(void)
+{
+	return drm_init(&driver);
+}
+
+static void __exit radeon_exit(void)
+{
+	drm_exit(&driver);
+}
+
+module_init(radeon_init);
+module_exit(radeon_exit);
+
+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+MODULE_LICENSE("GPL and additional rights");
diff -Nru a/drivers/char/drm/radeon_drv.h b/drivers/char/drm/radeon_drv.h
--- a/drivers/char/drm/radeon_drv.h	2005-01-10 20:11:19 -08:00
+++ b/drivers/char/drm/radeon_drv.h	2005-01-10 20:11:19 -08:00
@@ -31,6 +31,19 @@
 #ifndef __RADEON_DRV_H__
 #define __RADEON_DRV_H__
 
+/* General customization:
+ */
+
+#define DRIVER_AUTHOR		"Gareth Hughes, Keith Whitwell, others."
+
+#define DRIVER_NAME		"radeon"
+#define DRIVER_DESC		"ATI Radeon"
+#define DRIVER_DATE		"20020828"
+
+#define DRIVER_MAJOR		1
+#define DRIVER_MINOR		11
+#define DRIVER_PATCHLEVEL	0
+
 #define GET_RING_HEAD(dev_priv)		DRM_READ32(  (dev_priv)->ring_rptr, 0 )
 #define SET_RING_HEAD(dev_priv,val)	DRM_WRITE32( (dev_priv)->ring_rptr, 0, (val) )
 
@@ -210,6 +223,14 @@
 extern void radeon_driver_irq_preinstall( drm_device_t *dev );
 extern void radeon_driver_irq_postinstall( drm_device_t *dev );
 extern void radeon_driver_irq_uninstall( drm_device_t *dev );
+extern void radeon_driver_prerelease(drm_device_t *dev, DRMFILE filp);
+extern void radeon_driver_pretakedown(drm_device_t *dev);
+extern int radeon_driver_open_helper(drm_device_t *dev, drm_file_t *filp_priv);
+extern void radeon_driver_free_filp_priv(drm_device_t *dev, drm_file_t *filp_priv);
+
+extern int radeon_preinit( struct drm_device *dev, unsigned long flags );
+extern int radeon_postinit( struct drm_device *dev, unsigned long flags );
+extern int radeon_postcleanup( struct drm_device *dev );
 
 /* Flags for stats.boxes
  */
diff -Nru a/drivers/char/drm/radeon_irq.c b/drivers/char/drm/radeon_irq.c
--- a/drivers/char/drm/radeon_irq.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/char/drm/radeon_irq.c	2005-01-10 20:11:22 -08:00
@@ -27,10 +27,9 @@
  *
  * Authors:
  *    Keith Whitwell <keith@tungstengraphics.com>
- *    Michel Dänzer <michel@daenzer.net>
+ *    Michel Dï¿½zer <michel@daenzer.net>
  */
 
-#include "radeon.h"
 #include "drmP.h"
 #include "drm.h"
 #include "radeon_drm.h"
@@ -78,7 +77,7 @@
 	if (stat & RADEON_CRTC_VBLANK_STAT) {
 		atomic_inc(&dev->vbl_received);
 		DRM_WAKEUP(&dev->vbl_queue);
-		DRM(vbl_send_signals)( dev );
+		drm_vbl_send_signals( dev );
 	}
 
 	/* Acknowledge interrupts we handle */
@@ -223,7 +222,7 @@
 
 /* drm_dma.h hooks
 */
-void DRM(driver_irq_preinstall)( drm_device_t *dev ) {
+void radeon_driver_irq_preinstall( drm_device_t *dev ) {
 	drm_radeon_private_t *dev_priv =
 		(drm_radeon_private_t *)dev->dev_private;
 
@@ -234,7 +233,7 @@
 	radeon_acknowledge_irqs( dev_priv );
 }
 
-void DRM(driver_irq_postinstall)( drm_device_t *dev ) {
+void radeon_driver_irq_postinstall( drm_device_t *dev ) {
 	drm_radeon_private_t *dev_priv =
 		(drm_radeon_private_t *)dev->dev_private;
 
@@ -247,7 +246,7 @@
 		      RADEON_SW_INT_ENABLE );
 }
 
-void DRM(driver_irq_uninstall)( drm_device_t *dev ) {
+void radeon_driver_irq_uninstall( drm_device_t *dev ) {
 	drm_radeon_private_t *dev_priv =
 		(drm_radeon_private_t *)dev->dev_private;
 	if (!dev_priv)
diff -Nru a/drivers/char/drm/radeon_mem.c b/drivers/char/drm/radeon_mem.c
--- a/drivers/char/drm/radeon_mem.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/char/drm/radeon_mem.c	2005-01-10 20:11:22 -08:00
@@ -29,7 +29,6 @@
  *    Keith Whitwell <keith@tungstengraphics.com>
  */
 
-#include "radeon.h"
 #include "drmP.h"
 #include "drm.h"
 #include "radeon_drm.h"
@@ -44,7 +43,7 @@
 {
 	/* Maybe cut off the start of an existing block */
 	if (start > p->start) {
-		struct mem_block *newblock = DRM_MALLOC(sizeof(*newblock));
+		struct mem_block *newblock = drm_alloc(sizeof(*newblock), DRM_MEM_BUFS );
 		if (!newblock) 
 			goto out;
 		newblock->start = start;
@@ -60,7 +59,7 @@
    
 	/* Maybe cut off the end of an existing block */
 	if (size < p->size) {
-		struct mem_block *newblock = DRM_MALLOC(sizeof(*newblock));
+		struct mem_block *newblock = drm_alloc(sizeof(*newblock), DRM_MEM_BUFS );
 		if (!newblock)
 			goto out;
 		newblock->start = start + size;
@@ -118,7 +117,7 @@
 		p->size += q->size;
 		p->next = q->next;
 		p->next->prev = p;
-		DRM_FREE(q, sizeof(*q));
+		drm_free(q, sizeof(*q), DRM_MEM_BUFS );
 	}
 
 	if (p->prev->filp == 0) {
@@ -126,7 +125,7 @@
 		q->size += p->size;
 		q->next = p->next;
 		q->next->prev = q;
-		DRM_FREE(p, sizeof(*q));
+		drm_free(p, sizeof(*q), DRM_MEM_BUFS );
 	}
 }
 
@@ -134,14 +133,14 @@
  */
 static int init_heap(struct mem_block **heap, int start, int size)
 {
-	struct mem_block *blocks = DRM_MALLOC(sizeof(*blocks));
+	struct mem_block *blocks = drm_alloc(sizeof(*blocks), DRM_MEM_BUFS );
 
 	if (!blocks) 
 		return DRM_ERR(ENOMEM);
 	
-	*heap = DRM_MALLOC(sizeof(**heap));
+	*heap = drm_alloc(sizeof(**heap), DRM_MEM_BUFS );
 	if (!*heap) {
-		DRM_FREE( blocks, sizeof(*blocks) );
+		drm_free( blocks, sizeof(*blocks), DRM_MEM_BUFS );
 		return DRM_ERR(ENOMEM);
 	}
 
@@ -180,7 +179,7 @@
 			p->size += q->size;
 			p->next = q->next;
 			p->next->prev = p;
-			DRM_FREE(q, sizeof(*q));
+			drm_free(q, sizeof(*q),DRM_MEM_DRIVER);
 		}
 	}
 }
@@ -197,10 +196,10 @@
 	for (p = (*heap)->next ; p != *heap ; ) {
 		struct mem_block *q = p;
 		p = p->next;
-		DRM_FREE(q, sizeof(*q));
+		drm_free(q, sizeof(*q),DRM_MEM_DRIVER);
 	}
 
-	DRM_FREE( *heap, sizeof(**heap) );
+	drm_free( *heap, sizeof(**heap),DRM_MEM_DRIVER );
 	*heap = NULL;
 }
 
diff -Nru a/drivers/char/drm/radeon_state.c b/drivers/char/drm/radeon_state.c
--- a/drivers/char/drm/radeon_state.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/char/drm/radeon_state.c	2005-01-10 20:11:22 -08:00
@@ -27,7 +27,6 @@
  *    Kevin E. Martin <martin@valinux.com>
  */
 
-#include "radeon.h"
 #include "drmP.h"
 #include "drm.h"
 #include "drm_sarea.h"
@@ -1440,7 +1439,8 @@
 		}
 		if ( !buf ) {
 			DRM_DEBUG("radeon_cp_dispatch_texture: EAGAIN\n");
-			DRM_COPY_TO_USER( tex->image, image, sizeof(*image) );
+			if (DRM_COPY_TO_USER( tex->image, image, sizeof(*image) ))
+				return DRM_ERR(EFAULT);
 			return DRM_ERR(EAGAIN);
 		}
 
@@ -1596,7 +1596,7 @@
 	return 0;
 }
 
-/* Called whenever a client dies, from DRM(release).
+/* Called whenever a client dies, from drm_release.
  * NOTE:  Lock isn't necessarily held when this is called!
  */
 int radeon_do_cleanup_pageflip( drm_device_t *dev )
@@ -2553,7 +2553,7 @@
  *
  * DRM infrastructure takes care of reclaiming dma buffers.
  */
-static void radeon_driver_prerelease(drm_device_t *dev, DRMFILE filp)
+void radeon_driver_prerelease(drm_device_t *dev, DRMFILE filp)
 {
 	if ( dev->dev_private ) {				
 		drm_radeon_private_t *dev_priv = dev->dev_private; 
@@ -2565,17 +2565,17 @@
 	}				
 }
 
-static void radeon_driver_pretakedown(drm_device_t *dev)
+void radeon_driver_pretakedown(drm_device_t *dev)
 {
 	radeon_do_release(dev);
 }
 
-static int radeon_driver_open_helper(drm_device_t *dev, drm_file_t *filp_priv)
+int radeon_driver_open_helper(drm_device_t *dev, drm_file_t *filp_priv)
 {
 	drm_radeon_private_t *dev_priv = dev->dev_private;
 	struct drm_radeon_driver_file_fields *radeon_priv;
 	
-	radeon_priv = (struct drm_radeon_driver_file_fields *)DRM(alloc)(sizeof(*radeon_priv), DRM_MEM_FILES);
+	radeon_priv = (struct drm_radeon_driver_file_fields *)drm_alloc(sizeof(*radeon_priv), DRM_MEM_FILES);
 	
 	if (!radeon_priv)
 		return -ENOMEM;
@@ -2589,24 +2589,9 @@
 }
 
 
-static void radeon_driver_free_filp_priv(drm_device_t *dev, drm_file_t *filp_priv)
+void radeon_driver_free_filp_priv(drm_device_t *dev, drm_file_t *filp_priv)
 {
 	 struct drm_radeon_driver_file_fields *radeon_priv = filp_priv->driver_priv;
 	 
-	 DRM(free)(radeon_priv, sizeof(*radeon_priv), DRM_MEM_FILES);
-}
-
-void radeon_driver_register_fns(struct drm_device *dev)
-{	
-	dev->driver_features = DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_PCI_DMA | DRIVER_SG | DRIVER_HAVE_IRQ | DRIVER_HAVE_DMA | DRIVER_IRQ_SHARED | DRIVER_IRQ_VBL;
-	dev->dev_priv_size = sizeof(drm_radeon_buf_priv_t);
-	dev->fn_tbl.prerelease = radeon_driver_prerelease;
-	dev->fn_tbl.pretakedown = radeon_driver_pretakedown;
-	dev->fn_tbl.open_helper = radeon_driver_open_helper;
-	dev->fn_tbl.free_filp_priv = radeon_driver_free_filp_priv;
-	dev->fn_tbl.vblank_wait = radeon_driver_vblank_wait;
- 	dev->fn_tbl.irq_preinstall = radeon_driver_irq_preinstall;
- 	dev->fn_tbl.irq_postinstall = radeon_driver_irq_postinstall;
- 	dev->fn_tbl.irq_uninstall = radeon_driver_irq_uninstall;
- 	dev->fn_tbl.irq_handler = radeon_driver_irq_handler;
+	 drm_free(radeon_priv, sizeof(*radeon_priv), DRM_MEM_FILES);
 }
diff -Nru a/drivers/char/drm/sis_drm.h b/drivers/char/drm/sis_drm.h
--- a/drivers/char/drm/sis_drm.h	2005-01-10 20:11:23 -08:00
+++ b/drivers/char/drm/sis_drm.h	2005-01-10 20:11:23 -08:00
@@ -3,12 +3,21 @@
 #define __SIS_DRM_H__
 
 /* SiS specific ioctls */
-#define DRM_IOCTL_SIS_FB_ALLOC		DRM_IOWR(0x44, drm_sis_mem_t)
-#define DRM_IOCTL_SIS_FB_FREE		DRM_IOW( 0x45, drm_sis_mem_t)
-#define DRM_IOCTL_SIS_AGP_INIT		DRM_IOWR(0x53, drm_sis_agp_t)
-#define DRM_IOCTL_SIS_AGP_ALLOC		DRM_IOWR(0x54, drm_sis_mem_t)
-#define DRM_IOCTL_SIS_AGP_FREE		DRM_IOW( 0x55, drm_sis_mem_t)
-#define DRM_IOCTL_SIS_FB_INIT		DRM_IOW( 0x56, drm_sis_fb_t)
+#define NOT_USED_0_3
+#define DRM_SIS_FB_ALLOC	0x04
+#define DRM_SIS_FB_FREE	        0x05
+#define NOT_USED_6_12
+#define DRM_SIS_AGP_INIT	0x13
+#define DRM_SIS_AGP_ALLOC	0x14
+#define DRM_SIS_AGP_FREE	0x15
+#define DRM_SIS_FB_INIT	        0x16
+
+#define DRM_IOCTL_SIS_FB_ALLOC		DRM_IOWR(DRM_COMMAND_BASE + DRM_SIS_FB_ALLOC, drm_sis_mem_t)
+#define DRM_IOCTL_SIS_FB_FREE		DRM_IOW( DRM_COMMAND_BASE + DRM_SIS_FB_FREE, drm_sis_mem_t)
+#define DRM_IOCTL_SIS_AGP_INIT		DRM_IOWR(DRM_COMMAND_BASE + DRM_SIS_AGP_INIT, drm_sis_agp_t)
+#define DRM_IOCTL_SIS_AGP_ALLOC		DRM_IOWR(DRM_COMMAND_BASE + DRM_SIS_AGP_ALLOC, drm_sis_mem_t)
+#define DRM_IOCTL_SIS_AGP_FREE		DRM_IOW( DRM_COMMAND_BASE + DRM_SIS_AGP_FREE, drm_sis_mem_t)
+#define DRM_IOCTL_SIS_FB_INIT		DRM_IOW( DRM_COMMAND_BASE + DRM_SIS_FB_INIT, drm_sis_fb_t)
 /*
 #define DRM_IOCTL_SIS_FLIP		DRM_IOW( 0x48, drm_sis_flip_t)
 #define DRM_IOCTL_SIS_FLIP_INIT		DRM_IO(  0x49)
diff -Nru a/drivers/char/drm/sis_drv.c b/drivers/char/drm/sis_drv.c
--- a/drivers/char/drm/sis_drv.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/char/drm/sis_drv.c	2005-01-10 20:11:15 -08:00
@@ -26,9 +26,91 @@
  */
 
 #include <linux/config.h>
-#include "sis.h"
 #include "drmP.h"
 #include "sis_drm.h"
 #include "sis_drv.h"
 
-#include "drm_core.h"
+#include "drm_pciids.h"
+  
+static int postinit( struct drm_device *dev, unsigned long flags )
+{
+	DRM_INFO( "Initialized %s %d.%d.%d %s on minor %d: %s\n",
+		DRIVER_NAME,
+		DRIVER_MAJOR,
+		DRIVER_MINOR,
+		DRIVER_PATCHLEVEL,
+		DRIVER_DATE,
+		dev->minor,
+		pci_pretty_name(dev->pdev)
+		);
+	return 0;
+}
+
+static int version( drm_version_t *version )
+{
+	int len;
+
+	version->version_major = DRIVER_MAJOR;
+	version->version_minor = DRIVER_MINOR;
+	version->version_patchlevel = DRIVER_PATCHLEVEL;
+	DRM_COPY( version->name, DRIVER_NAME );
+	DRM_COPY( version->date, DRIVER_DATE );
+	DRM_COPY( version->desc, DRIVER_DESC );
+	return 0;
+}
+
+static struct pci_device_id pciidlist[] = {
+	sisdrv_PCI_IDS
+};
+
+static drm_ioctl_desc_t ioctls[] = {
+	[DRM_IOCTL_NR(DRM_SIS_FB_ALLOC)]  = { sis_fb_alloc,        1, 0 },
+	[DRM_IOCTL_NR(DRM_SIS_FB_FREE)]   = { sis_fb_free,         1, 0 },
+	[DRM_IOCTL_NR(DRM_SIS_AGP_INIT)]  = { sis_ioctl_agp_init,  1, 1 },
+	[DRM_IOCTL_NR(DRM_SIS_AGP_ALLOC)] = { sis_ioctl_agp_alloc, 1, 0 },
+	[DRM_IOCTL_NR(DRM_SIS_AGP_FREE)]  = { sis_ioctl_agp_free,  1, 0 },
+	[DRM_IOCTL_NR(DRM_SIS_FB_INIT)]   = { sis_fb_init,         1, 1 }
+};
+
+static struct drm_driver driver = {
+	.driver_features = DRIVER_USE_AGP | DRIVER_USE_MTRR,
+	.context_ctor = sis_init_context,
+	.context_dtor = sis_final_context,
+	.reclaim_buffers = drm_core_reclaim_buffers,
+	.get_map_ofs = drm_core_get_map_ofs,
+	.get_reg_ofs = drm_core_get_reg_ofs,
+	.postinit = postinit,
+	.version = version,
+	.ioctls = ioctls,
+	.num_ioctls = DRM_ARRAY_SIZE(ioctls),
+	.fops = {
+		.owner = THIS_MODULE,
+		.open = drm_open,
+		.release = drm_release,
+		.ioctl = drm_ioctl,
+		.mmap = drm_mmap,
+		.poll = drm_poll,
+		.fasync = drm_fasync,
+	},
+	.pci_driver = {
+		.name          = DRIVER_NAME,
+		.id_table      = pciidlist,
+	}
+};
+
+static int __init sis_init(void)
+{
+	return drm_init(&driver);
+}
+
+static void __exit sis_exit(void)
+{
+	drm_exit(&driver);
+}
+
+module_init(sis_init);
+module_exit(sis_exit);
+
+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+MODULE_LICENSE("GPL and additional rights");
diff -Nru a/drivers/char/drm/sis_drv.h b/drivers/char/drm/sis_drv.h
--- a/drivers/char/drm/sis_drv.h	2005-01-10 20:11:17 -08:00
+++ b/drivers/char/drm/sis_drv.h	2005-01-10 20:11:17 -08:00
@@ -28,6 +28,17 @@
 #ifndef _SIS_DRV_H_
 #define _SIS_DRV_H_
 
+/* General customization:
+ */
+
+#define DRIVER_AUTHOR		"SIS"
+#define DRIVER_NAME		"sis"
+#define DRIVER_DESC		"SIS 300/630/540"
+#define DRIVER_DATE		"20030826"
+#define DRIVER_MAJOR		1
+#define DRIVER_MINOR		1
+#define DRIVER_PATCHLEVEL	0
+
 #include "sis_ds.h"
 
 typedef struct drm_sis_private {
@@ -41,5 +52,8 @@
 extern int sis_ioctl_agp_alloc( DRM_IOCTL_ARGS );
 extern int sis_ioctl_agp_free( DRM_IOCTL_ARGS );
 extern int sis_fb_init( DRM_IOCTL_ARGS );
+
+extern int sis_init_context(drm_device_t *dev, int context);
+extern int sis_final_context(drm_device_t *dev, int context);
 
 #endif
diff -Nru a/drivers/char/drm/sis_ds.c b/drivers/char/drm/sis_ds.c
--- a/drivers/char/drm/sis_ds.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/char/drm/sis_ds.c	2005-01-10 20:11:22 -08:00
@@ -28,7 +28,6 @@
  * 
  */
 
-#include "sis.h"
 #include "drmP.h"
 #include "drm.h"
 #include "sis_ds.h"
@@ -42,7 +41,7 @@
 	int i;
 	set_t *set;
 
-	set = (set_t *)DRM(alloc)(sizeof(set_t), DRM_MEM_DRIVER);
+	set = (set_t *)drm_alloc(sizeof(set_t), DRM_MEM_DRIVER);
 	if (set != NULL) {
 		for (i = 0; i < SET_SIZE; i++) {
 			set->list[i].free_next = i + 1;    
@@ -128,14 +127,14 @@
 
 int setDestroy(set_t *set)
 {
-	DRM(free)(set, sizeof(set_t), DRM_MEM_DRIVER);
+	drm_free(set, sizeof(set_t), DRM_MEM_DRIVER);
 
 	return 1;
 }
 
 /*
  * GLX Hardware Device Driver common code
- * Copyright (C) 1999 Keith Whitwell
+ * Copyright (C) 1999 Wittawat Yamwong
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -150,7 +149,7 @@
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * KEITH WHITWELL, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM, 
+ * WITTAWAT YAMWONG, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM, 
  * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 
  * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 
  * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -167,7 +166,7 @@
 	if (size <= 0)
 		return NULL;
 
-	blocks = (TMemBlock *)DRM(calloc)(1, sizeof(TMemBlock), DRM_MEM_DRIVER);
+	blocks = (TMemBlock *)drm_calloc(1, sizeof(TMemBlock), DRM_MEM_DRIVER);
 	if (blocks != NULL) {
 		blocks->ofs = ofs;
 		blocks->size = size;
@@ -202,7 +201,7 @@
 		       int size )
 {
 	PMemBlock blocks;
-	blocks = (TMemBlock *)DRM(calloc)(2, sizeof(TMemBlock), DRM_MEM_DRIVER);
+	blocks = (TMemBlock *)drm_calloc(2, sizeof(TMemBlock), DRM_MEM_DRIVER);
 	if (blocks != NULL) {
 		blocks[0].size = size;
 		blocks[0].free = 1;
@@ -229,7 +228,7 @@
 
 	/* break left */
 	if (startofs > p->ofs) {
-		newblock = (TMemBlock*) DRM(calloc)(1, sizeof(TMemBlock),
+		newblock = (TMemBlock*) drm_calloc(1, sizeof(TMemBlock),
 		    DRM_MEM_DRIVER);
 		newblock->ofs = startofs;
 		newblock->size = p->size - (startofs - p->ofs);
@@ -242,7 +241,7 @@
 
 	/* break right */
 	if (size < p->size) {
-		newblock = (TMemBlock*) DRM(calloc)(1, sizeof(TMemBlock),
+		newblock = (TMemBlock*) drm_calloc(1, sizeof(TMemBlock),
 		    DRM_MEM_DRIVER);
 		newblock->ofs = startofs + size;
 		newblock->size = p->size - size;
@@ -295,7 +294,7 @@
 		TMemBlock *q = p->next;
 		p->size += q->size;
 		p->next = q->next;
-		DRM(free)(q, sizeof(TMemBlock), DRM_MEM_DRIVER);
+		drm_free(q, sizeof(TMemBlock), DRM_MEM_DRIVER);
 		return 1;
 	}
 	return 0;
@@ -380,7 +379,7 @@
 	p = (TMemBlock *)heap;
 	while (p != NULL) {
 		q = p->next;
-		DRM(free)(p, sizeof(TMemBlock), DRM_MEM_DRIVER);
+		drm_free(p, sizeof(TMemBlock), DRM_MEM_DRIVER);
 		p = q;
 	}
 }
diff -Nru a/drivers/char/drm/sis_ds.h b/drivers/char/drm/sis_ds.h
--- a/drivers/char/drm/sis_ds.h	2005-01-10 20:11:18 -08:00
+++ b/drivers/char/drm/sis_ds.h	2005-01-10 20:11:18 -08:00
@@ -58,7 +58,7 @@
 
 /*
  * GLX Hardware Device Driver common code
- * Copyright (C) 1999 Keith Whitwell
+ * Copyright (C) 1999 Wittawat Yamwong
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -73,7 +73,7 @@
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * KEITH WHITWELL, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM, 
+ * WITTAWAT YAMWONG, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM, 
  * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 
  * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 
  * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -85,8 +85,8 @@
 	struct mem_block_t *heap;
 	int ofs,size;
 	int align;
-	int free:1;
-	int reserved:1;
+	unsigned int free:1;
+	unsigned int reserved:1;
 };
 typedef struct mem_block_t TMemBlock;
 typedef struct mem_block_t *PMemBlock;
diff -Nru a/drivers/char/drm/sis_mm.c b/drivers/char/drm/sis_mm.c
--- a/drivers/char/drm/sis_mm.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/char/drm/sis_mm.c	2005-01-10 20:11:20 -08:00
@@ -28,7 +28,6 @@
  * 
  */
 
-#include "sis.h"
 #include "drmP.h"
 #include "sis_drm.h"
 #include "sis_drv.h"
@@ -159,7 +158,7 @@
 	DRM_COPY_FROM_USER_IOCTL(fb, (drm_sis_fb_t __user *)data, sizeof(fb));
 
 	if (dev_priv == NULL) {
-		dev->dev_private = DRM(calloc)(1, sizeof(drm_sis_private_t),
+		dev->dev_private = drm_calloc(1, sizeof(drm_sis_private_t),
 		    DRM_MEM_DRIVER);
 		dev_priv = dev->dev_private;
 		if (dev_priv == NULL)
@@ -247,7 +246,7 @@
 	drm_sis_agp_t agp;
 
 	if (dev_priv == NULL) {
-		dev->dev_private = DRM(calloc)(1, sizeof(drm_sis_private_t),
+		dev->dev_private = drm_calloc(1, sizeof(drm_sis_private_t),
 		    DRM_MEM_DRIVER);
 		dev_priv = dev->dev_private;
 		if (dev_priv == NULL)
@@ -403,11 +402,4 @@
         }
 	
 	return 1;
-}
-
-void DRM(driver_register_fns)(drm_device_t *dev)
-{
-	dev->driver_features = DRIVER_USE_AGP | DRIVER_USE_MTRR;
-	dev->fn_tbl.context_ctor = sis_init_context;
-	dev->fn_tbl.context_dtor = sis_final_context;
 }
diff -Nru a/drivers/char/drm/tdfx.h b/drivers/char/drm/tdfx.h
--- a/drivers/char/drm/tdfx.h	2005-01-10 20:11:19 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,50 +0,0 @@
-/* tdfx.h -- 3dfx DRM template customization -*- linux-c -*-
- * Created: Wed Feb 14 12:32:32 2001 by gareth@valinux.com
- *
- * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * Authors:
- *    Gareth Hughes <gareth@valinux.com>
- */
-
-#ifndef __TDFX_H__
-#define __TDFX_H__
-
-/* This remains constant for all DRM template files.
- */
-#define DRM(x) tdfx_##x
-
-/* General customization:
- */
-
-#define DRIVER_AUTHOR		"VA Linux Systems Inc."
-
-#define DRIVER_NAME		"tdfx"
-#define DRIVER_DESC		"3dfx Banshee/Voodoo3+"
-#define DRIVER_DATE		"20010216"
-
-#define DRIVER_MAJOR		1
-#define DRIVER_MINOR		0
-#define DRIVER_PATCHLEVEL	0
-
-#endif
diff -Nru a/drivers/char/drm/tdfx_drv.c b/drivers/char/drm/tdfx_drv.c
--- a/drivers/char/drm/tdfx_drv.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/char/drm/tdfx_drv.c	2005-01-10 20:11:19 -08:00
@@ -31,13 +31,77 @@
  */
 
 #include <linux/config.h>
-#include "tdfx.h"
 #include "drmP.h"
+#include "tdfx_drv.h"
 
-#include "drm_core.h"
+#include "drm_pciids.h"
 
-void DRM(driver_register_fns)(drm_device_t *dev)
+static int postinit( struct drm_device *dev, unsigned long flags )
 {
-	dev->driver_features = DRIVER_USE_MTRR;
+	DRM_INFO( "Initialized %s %d.%d.%d %s on minor %d: %s\n",
+		DRIVER_NAME,
+		DRIVER_MAJOR,
+		DRIVER_MINOR,
+		DRIVER_PATCHLEVEL,
+		DRIVER_DATE,
+		dev->minor,
+		pci_pretty_name(dev->pdev)
+		);
+	return 0;
 }
 
+static int version( drm_version_t *version )
+{
+	int len;
+
+	version->version_major = DRIVER_MAJOR;
+	version->version_minor = DRIVER_MINOR;
+	version->version_patchlevel = DRIVER_PATCHLEVEL;
+	DRM_COPY( version->name, DRIVER_NAME );
+	DRM_COPY( version->date, DRIVER_DATE );
+	DRM_COPY( version->desc, DRIVER_DESC );
+	return 0;
+}
+
+static struct pci_device_id pciidlist[] = {
+	tdfx_PCI_IDS
+};
+
+static struct drm_driver driver = {
+	.driver_features = DRIVER_USE_MTRR,
+	.reclaim_buffers = drm_core_reclaim_buffers,
+	.get_map_ofs = drm_core_get_map_ofs,
+	.get_reg_ofs = drm_core_get_reg_ofs,
+	.postinit = postinit,
+	.version = version,
+	.fops = {
+		.owner = THIS_MODULE,
+		.open = drm_open,
+		.release = drm_release,
+		.ioctl = drm_ioctl,
+		.mmap = drm_mmap,
+		.poll = drm_poll,
+		.fasync = drm_fasync,
+	},
+	.pci_driver = {
+		.name          = DRIVER_NAME,
+		.id_table      = pciidlist,
+	}
+};
+
+static int __init tdfx_init(void)
+{
+	return drm_init(&driver);
+}
+
+static void __exit tdfx_exit(void)
+{
+	drm_exit(&driver);
+}
+
+module_init(tdfx_init);
+module_exit(tdfx_exit);
+
+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+MODULE_LICENSE("GPL and additional rights");
diff -Nru a/drivers/char/drm/tdfx_drv.h b/drivers/char/drm/tdfx_drv.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/char/drm/tdfx_drv.h	2005-01-10 20:11:19 -08:00
@@ -0,0 +1,50 @@
+/* tdfx.h -- 3dfx DRM template customization -*- linux-c -*-
+ * Created: Wed Feb 14 12:32:32 2001 by gareth@valinux.com
+ *
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Authors:
+ *    Gareth Hughes <gareth@valinux.com>
+ */
+
+#ifndef __TDFX_H__
+#define __TDFX_H__
+
+/* This remains constant for all DRM template files.
+ */
+#define DRM(x) tdfx_##x
+
+/* General customization:
+ */
+
+#define DRIVER_AUTHOR		"VA Linux Systems Inc."
+
+#define DRIVER_NAME		"tdfx"
+#define DRIVER_DESC		"3dfx Banshee/Voodoo3+"
+#define DRIVER_DATE		"20010216"
+
+#define DRIVER_MAJOR		1
+#define DRIVER_MINOR		0
+#define DRIVER_PATCHLEVEL	0
+
+#endif
diff -Nru a/drivers/char/ds1286.c b/drivers/char/ds1286.c
--- a/drivers/char/ds1286.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/char/ds1286.c	2005-01-10 20:11:18 -08:00
@@ -68,7 +68,7 @@
 
 static inline unsigned char ds1286_is_updating(void);
 
-static spinlock_t ds1286_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(ds1286_lock);
 
 static int ds1286_read_proc(char *page, char **start, off_t off,
                             int count, int *eof, void *data);
diff -Nru a/drivers/char/ec3104_keyb.c b/drivers/char/ec3104_keyb.c
--- a/drivers/char/ec3104_keyb.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/char/ec3104_keyb.c	2005-01-10 20:11:18 -08:00
@@ -92,7 +92,7 @@
 static void __aux_write_ack(int val);
 #endif
 
-static spinlock_t kbd_controller_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(kbd_controller_lock);
 static unsigned char handle_kbd_event(void);
 
 /* used only by send_data - set by keyboard_interrupt */
diff -Nru a/drivers/char/efirtc.c b/drivers/char/efirtc.c
--- a/drivers/char/efirtc.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/char/efirtc.c	2005-01-10 20:11:21 -08:00
@@ -48,7 +48,7 @@
  */
 #define EFI_RTC_EPOCH		1998
 
-static spinlock_t efi_rtc_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(efi_rtc_lock);
 
 static int efi_rtc_ioctl(struct inode *inode, struct file *file,
 		     unsigned int cmd, unsigned long arg);
diff -Nru a/drivers/char/ftape/compressor/zftape-compress.c b/drivers/char/ftape/compressor/zftape-compress.c
--- a/drivers/char/ftape/compressor/zftape-compress.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/char/ftape/compressor/zftape-compress.c	2005-01-10 20:11:22 -08:00
@@ -27,10 +27,6 @@
  *     changed * appropriately. See below.
  */
 
- char zftc_src[] ="$Source: /homes/cvs/ftape-stacked/ftape/compressor/zftape-compress.c,v $";
- char zftc_rev[] = "$Revision: 1.1.6.1 $";
- char zftc_dat[] = "$Date: 1997/11/16 15:15:56 $";
-
 #include <linux/version.h>
 #include <linux/errno.h>
 #include <linux/mm.h>
diff -Nru a/drivers/char/ftape/lowlevel/fc-10.c b/drivers/char/ftape/lowlevel/fc-10.c
--- a/drivers/char/ftape/lowlevel/fc-10.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/char/ftape/lowlevel/fc-10.c	2005-01-10 20:11:16 -08:00
@@ -56,13 +56,13 @@
 #include "../lowlevel/fdc-io.h"
 #include "../lowlevel/fc-10.h"
 
-__u16 inbs_magic[] = {
+static __u16 inbs_magic[] = {
 	0x3, 0x3, 0x0, 0x4, 0x7, 0x2, 0x5, 0x3, 0x1, 0x4,
 	0x3, 0x5, 0x2, 0x0, 0x3, 0x7, 0x4, 0x2,
 	0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7
 };
 
-__u16 fc10_ports[] = {
+static __u16 fc10_ports[] = {
 	0x180, 0x210, 0x2A0, 0x300, 0x330, 0x340, 0x370
 };
 
diff -Nru a/drivers/char/ftape/lowlevel/fdc-io.c b/drivers/char/ftape/lowlevel/fdc-io.c
--- a/drivers/char/ftape/lowlevel/fdc-io.c	2005-01-10 20:11:24 -08:00
+++ b/drivers/char/ftape/lowlevel/fdc-io.c	2005-01-10 20:11:24 -08:00
@@ -50,7 +50,7 @@
 
 /*      Global vars.
  */
-int ftape_motor;
+static int ftape_motor;
 volatile int ftape_current_cylinder = -1;
 volatile fdc_mode_enum fdc_mode = fdc_idle;
 fdc_config_info fdc;
@@ -86,6 +86,8 @@
 
 static char ftape_id[] = "ftape";  /* used by request irq and free irq */
 
+static int fdc_set_seek_rate(int seek_rate);
+
 void fdc_catch_stray_interrupts(int count)
 {
 	unsigned long flags;
@@ -103,7 +105,7 @@
  *  If usecs == 0 then just test status, else wait at least for usecs.
  *  Returns -ETIME on timeout. Function must be calibrated first !
  */
-int fdc_wait(unsigned int usecs, __u8 mask, __u8 state)
+static int fdc_wait(unsigned int usecs, __u8 mask, __u8 state)
 {
 	int count_1 = (fdc_calibr_count * usecs +
                        fdc_calibr_count - 1) / fdc_calibr_time;
@@ -129,18 +131,12 @@
 	fdc_wait(usecs, 0, 1);	/* will always timeout ! */
 }
 
-int fdc_ready_out_wait(unsigned int usecs)
+static int fdc_ready_out_wait(unsigned int usecs)
 {
 	fdc_usec_wait(FT_RQM_DELAY);	/* wait for valid RQM status */
 	return fdc_wait(usecs, FDC_DATA_OUT_READY, FDC_DATA_OUT_READY);
 }
 
-int fdc_ready_in_wait(unsigned int usecs)
-{
-	fdc_usec_wait(FT_RQM_DELAY);	/* wait for valid RQM status */
-	return fdc_wait(usecs, FDC_DATA_OUT_READY, FDC_DATA_IN_READY);
-}
-
 void fdc_wait_calibrate(void)
 {
 	ftape_calibrate("fdc_wait",
@@ -341,7 +337,7 @@
 /*      Handle command and result phases for
  *      commands without data phase.
  */
-int fdc_issue_command(const __u8 * out_data, int out_count,
+static int fdc_issue_command(const __u8 * out_data, int out_count,
 		      __u8 * in_data, int in_count)
 {
 	TRACE_FUN(ft_t_any);
@@ -497,7 +493,7 @@
 
 /*  Reprogram the 82078 registers to use Data Rate Table 1 on all drives.
  */
-void fdc_set_drive_specs(void)
+static void fdc_set_drive_specs(void)
 {
 	__u8 cmd[] = { FDC_DRIVE_SPEC, 0x00, 0x00, 0x00, 0x00, 0xc0};
 	int result;
@@ -705,7 +701,7 @@
 
 /*      Specify FDC seek-rate (milliseconds)
  */
-int fdc_set_seek_rate(int seek_rate)
+static int fdc_set_seek_rate(int seek_rate)
 {
 	/* set step rate, dma mode, and minimal head load and unload times
 	 */
@@ -803,49 +799,6 @@
 	TRACE_EXIT 0;
 }
 
-/*      Recalibrate and wait until home.
- */
-int fdc_recalibrate(void)
-{
-	__u8 out[2];
-	int st0;
-	int pcn;
-	int retry;
-	int old_seek_rate = fdc_seek_rate;
-	TRACE_FUN(ft_t_any);
-
-	TRACE_CATCH(fdc_set_seek_rate(6),);
-	out[0] = FDC_RECAL;
-	out[1] = ft_drive_sel;
-	ft_seek_completed = 0;
-	TRACE_CATCH(fdc_command(out, 2),);
-	/*    Handle interrupts until ft_seek_completed or timeout.
-	 */
-	for (retry = 0;; ++retry) {
-		TRACE_CATCH(fdc_interrupt_wait(2 * FT_SECOND),);
-		if (ft_seek_completed) {
-			TRACE_CATCH(fdc_sense_interrupt_status(&st0, &pcn),);
-			if ((st0 & ST0_SEEK_END) == 0) {
-				if (retry < 1) {
-					continue; /* some drives/fdc's
-						   * give an extra interrupt
-						   */
-				} else {
-					TRACE_ABORT(-EIO, ft_t_err,
-				    "no seek-end after seek completion !??");
-				}
-			}
-			break;
-		}
-	}
-	ftape_current_cylinder = pcn;
-	if (pcn != 0) {
-		TRACE(ft_t_err, "failed: resulting track = %d", pcn);
-	}
-	TRACE_CATCH(fdc_set_seek_rate(old_seek_rate),);
-	TRACE_EXIT 0;
-}
-
 static int perpend_mode; /* set if fdc is in perpendicular mode */
 
 static int perpend_off(void)
@@ -1079,7 +1032,7 @@
  */
 static __u8 fdc_save_state[2];
 
-int fdc_probe(void)
+static int fdc_probe(void)
 {
 	__u8 cmd[1];
 	__u8 stat[16]; /* must be able to hold dumpregs & save results */
@@ -1308,7 +1261,7 @@
 	TRACE_EXIT IRQ_RETVAL(handled);
 }
 
-int fdc_grab_irq_and_dma(void)
+static int fdc_grab_irq_and_dma(void)
 {
 	TRACE_FUN(ft_t_any);
 
diff -Nru a/drivers/char/ftape/lowlevel/fdc-io.h b/drivers/char/ftape/lowlevel/fdc-io.h
--- a/drivers/char/ftape/lowlevel/fdc-io.h	2005-01-10 20:11:22 -08:00
+++ b/drivers/char/ftape/lowlevel/fdc-io.h	2005-01-10 20:11:22 -08:00
@@ -210,7 +210,6 @@
 extern volatile fdc_mode_enum fdc_mode;
 extern int fdc_setup_error;	/* outdated ??? */
 extern wait_queue_head_t ftape_wait_intr;
-extern int ftape_motor;		/* fdc motor line state */
 extern volatile int ftape_current_cylinder; /* track nr FDC thinks we're on */
 extern volatile __u8 fdc_head;	/* FDC head */
 extern volatile __u8 fdc_cyl;	/* FDC track */
@@ -231,15 +230,11 @@
 extern int fdc_ready_wait(unsigned int timeout);
 extern int fdc_command(const __u8 * cmd_data, int cmd_len);
 extern int fdc_result(__u8 * res_data, int res_len);
-extern int fdc_issue_command(const __u8 * out_data, int out_count,
-			     __u8 * in_data, int in_count);
 extern int fdc_interrupt_wait(unsigned int time);
-extern int fdc_set_seek_rate(int seek_rate);
 extern int fdc_seek(int track);
 extern int fdc_sense_drive_status(int *st3);
 extern void fdc_motor(int motor);
 extern void fdc_reset(void);
-extern int fdc_recalibrate(void);
 extern void fdc_disable(void);
 extern int fdc_fifo_threshold(__u8 threshold,
 			      int *fifo_state, int *lock_state, int *fifo_thr);
diff -Nru a/drivers/char/ftape/lowlevel/ftape-bsm.c b/drivers/char/ftape/lowlevel/ftape-bsm.c
--- a/drivers/char/ftape/lowlevel/ftape-bsm.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/char/ftape/lowlevel/ftape-bsm.c	2005-01-10 20:11:17 -08:00
@@ -47,6 +47,10 @@
 } mode_type;
 
 #if 0
+static void ftape_put_bad_sector_entry(int segment_id, SectorMap new_map);
+#endif
+
+#if 0
 /*  fix_tape converts a normal QIC-80 tape into a 'wide' tape.
  *  For testing purposes only !
  */
@@ -375,7 +379,8 @@
 	}
 }
 
-void ftape_put_bad_sector_entry(int segment_id, SectorMap new_map)
+#if 0
+static void ftape_put_bad_sector_entry(int segment_id, SectorMap new_map)
 {
 	SectorCount *ptr = (SectorCount *)bad_sector_map;
 	int count;
@@ -438,6 +443,7 @@
 	}
 	TRACE_EXIT;
 }
+#endif  /*  0  */
 
 SectorMap ftape_get_bad_sector_entry(int segment_id)
 {
diff -Nru a/drivers/char/ftape/lowlevel/ftape-bsm.h b/drivers/char/ftape/lowlevel/ftape-bsm.h
--- a/drivers/char/ftape/lowlevel/ftape-bsm.h	2005-01-10 20:11:15 -08:00
+++ b/drivers/char/ftape/lowlevel/ftape-bsm.h	2005-01-10 20:11:15 -08:00
@@ -60,7 +60,6 @@
 extern void update_bad_sector_map(__u8 * buffer);
 extern void ftape_extract_bad_sector_map(__u8 * buffer);
 extern SectorMap ftape_get_bad_sector_entry(int segment_id);
-extern void      ftape_put_bad_sector_entry(int segment_id, SectorMap mask);
 extern __u8 *ftape_find_end_of_bsm_list(__u8 * address);
 extern void ftape_init_bsm(void);
 
diff -Nru a/drivers/char/ftape/lowlevel/ftape-ctl.c b/drivers/char/ftape/lowlevel/ftape-ctl.c
--- a/drivers/char/ftape/lowlevel/ftape-ctl.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/char/ftape/lowlevel/ftape-ctl.c	2005-01-10 20:11:23 -08:00
@@ -113,11 +113,6 @@
 #endif
 }
 
-void ftape_set_status(const ftape_info *status)
-{
-	ftape_status = *status;
-}
-
 static int ftape_not_operational(int status)
 {
 	/* return true if status indicates tape can not be used.
@@ -210,7 +205,7 @@
 	return i;
 }
 
-void ftape_detach_drive(void)
+static void ftape_detach_drive(void)
 {
 	TRACE_FUN(ft_t_any);
 
@@ -241,7 +236,7 @@
 		ft_history.rewinds = 0;
 }
 
-int ftape_activate_drive(vendor_struct * drive_type)
+static int ftape_activate_drive(vendor_struct * drive_type)
 {
 	int result = 0;
 	TRACE_FUN(ft_t_flow);
@@ -301,7 +296,7 @@
 	TRACE_EXIT result;
 }
 
-int ftape_get_drive_status(void)
+static int ftape_get_drive_status(void)
 {
 	int result;
 	int status;
@@ -374,7 +369,7 @@
 	TRACE_EXIT 0;
 }
 
-void ftape_log_vendor_id(void)
+static void ftape_log_vendor_id(void)
 {
 	int vendor_index;
 	TRACE_FUN(ft_t_flow);
@@ -580,7 +575,7 @@
 	TRACE_EXIT 0;
 }
 
-int ftape_init_drive(void)
+static int ftape_init_drive(void)
 {
 	int status;
 	qic_model model;
diff -Nru a/drivers/char/ftape/lowlevel/ftape-ctl.h b/drivers/char/ftape/lowlevel/ftape-ctl.h
--- a/drivers/char/ftape/lowlevel/ftape-ctl.h	2005-01-10 20:11:15 -08:00
+++ b/drivers/char/ftape/lowlevel/ftape-ctl.h	2005-01-10 20:11:15 -08:00
@@ -158,6 +158,5 @@
 				 unsigned int data_rate,
 				 unsigned int tape_len);
 extern int  ftape_calibrate_data_rate(unsigned int qic_std);
-extern int  ftape_init_drive(void);
 extern const ftape_info *ftape_get_status(void);
 #endif
diff -Nru a/drivers/char/ftape/lowlevel/ftape-init.c b/drivers/char/ftape/lowlevel/ftape-init.c
--- a/drivers/char/ftape/lowlevel/ftape-init.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/char/ftape/lowlevel/ftape-init.c	2005-01-10 20:11:22 -08:00
@@ -48,12 +48,6 @@
 #include "../lowlevel/ftape-proc.h"
 #include "../lowlevel/ftape-tracing.h"
 
-/*      Global vars.
- */
-char ft_src[] __initdata = "$Source: /homes/cvs/ftape-stacked/ftape/lowlevel/ftape-init.c,v $";
-char ft_rev[] __initdata = "$Revision: 1.8 $";
-char ft_dat[] __initdata = "$Date: 1997/11/06 00:38:08 $";
-
 
 #if defined(MODULE) && !defined(CONFIG_FT_NO_TRACE_AT_ALL)
 static int ft_tracing = -1;
diff -Nru a/drivers/char/ftape/lowlevel/ftape-io.c b/drivers/char/ftape/lowlevel/ftape-io.c
--- a/drivers/char/ftape/lowlevel/ftape-io.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/char/ftape/lowlevel/ftape-io.c	2005-01-10 20:11:18 -08:00
@@ -350,7 +350,7 @@
 	return result;
 }
 
-int ftape_parameter_wait(unsigned int parm, unsigned int timeout, int *status)
+static int ftape_parameter_wait(unsigned int parm, unsigned int timeout, int *status)
 {
 	int result;
 
@@ -503,16 +503,6 @@
 	TRACE_EXIT 0;
 }
 
-int ftape_in_error_state(int status)
-{
-	TRACE_FUN(ft_t_any);
-
-	if ((status & QIC_STATUS_READY) && (status & QIC_STATUS_ERROR)) {
-		TRACE_ABORT(1, ft_t_warn, "warning: error status set!");
-	}
-	TRACE_EXIT 0;
-}
-
 int ftape_report_configuration(qic_model *model,
 			       unsigned int *rate,
 			       int *qic_std,
@@ -617,7 +607,7 @@
 	TRACE_EXIT (result < 0) ? -EIO : 0;
 }
 
-int ftape_report_rom_version(int *version)
+static int ftape_report_rom_version(int *version)
 {
 
 	if (ftape_report_operation(version, QIC_REPORT_ROM_VERSION, 8) < 0) {
@@ -625,16 +615,6 @@
 	} else {
 		return 0;
 	}
-}
-
-int ftape_report_signature(int *signature)
-{
-	int result;
-
-	result = ftape_command(28);
-	result = ftape_report_operation(signature, 9, 8);
-	result = ftape_command(30);
-	return (result < 0) ? -EIO : 0;
 }
 
 void ftape_report_vendor_id(unsigned int *id)
diff -Nru a/drivers/char/ftape/lowlevel/ftape-io.h b/drivers/char/ftape/lowlevel/ftape-io.h
--- a/drivers/char/ftape/lowlevel/ftape-io.h	2005-01-10 20:11:19 -08:00
+++ b/drivers/char/ftape/lowlevel/ftape-io.h	2005-01-10 20:11:19 -08:00
@@ -65,9 +65,6 @@
 			       unsigned int timeout,
 			       int *status);
 extern int  ftape_parameter(unsigned int parameter);
-extern int  ftape_parameter_wait(unsigned int parameter,
-				 unsigned int timeout,
-				 int *status);
 extern int ftape_report_operation(int *status,
 				  qic117_cmd_t  command,
 				  int result_length);
@@ -80,7 +77,6 @@
 extern int ftape_report_status(int *status);
 extern int ftape_ready_wait(unsigned int timeout, int *status);
 extern int ftape_seek_head_to_track(unsigned int track);
-extern int ftape_in_error_state(int status);
 extern int ftape_set_data_rate(unsigned int new_rate, unsigned int qic_std);
 extern int ftape_report_error(unsigned int *error,
 			      qic117_cmd_t *command,
diff -Nru a/drivers/char/ftape/lowlevel/ftape-proc.c b/drivers/char/ftape/lowlevel/ftape-proc.c
--- a/drivers/char/ftape/lowlevel/ftape-proc.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/char/ftape/lowlevel/ftape-proc.c	2005-01-10 20:11:22 -08:00
@@ -174,8 +174,8 @@
 	return len;
 }
 
-int ftape_read_proc(char *page, char **start, off_t off,
-		    int count, int *eof, void *data)
+static int ftape_read_proc(char *page, char **start, off_t off,
+			   int count, int *eof, void *data)
 {
 	char *ptr = page;
 	size_t len;
diff -Nru a/drivers/char/ftape/lowlevel/ftape-rw.c b/drivers/char/ftape/lowlevel/ftape-rw.c
--- a/drivers/char/ftape/lowlevel/ftape-rw.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/char/ftape/lowlevel/ftape-rw.c	2005-01-10 20:11:18 -08:00
@@ -301,7 +301,7 @@
 
 /*      Read Id of first sector passing tape head.
  */
-int ftape_read_id(void)
+static int ftape_read_id(void)
 {
 	int status;
 	__u8 out[2];
diff -Nru a/drivers/char/ftape/lowlevel/ftape-rw.h b/drivers/char/ftape/lowlevel/ftape-rw.h
--- a/drivers/char/ftape/lowlevel/ftape-rw.h	2005-01-10 20:11:22 -08:00
+++ b/drivers/char/ftape/lowlevel/ftape-rw.h	2005-01-10 20:11:22 -08:00
@@ -101,7 +101,6 @@
 extern buffer_struct *ftape_get_buffer  (ft_buffer_queue_t pos);
 extern int            ftape_buffer_id   (ft_buffer_queue_t pos);
 extern void           ftape_reset_buffer(void);
-extern int  ftape_read_id(void);
 extern void ftape_tape_parameters(__u8 drive_configuration);
 extern int  ftape_wait_segment(buffer_state_enum state);
 extern int  ftape_dumb_stop(void);
diff -Nru a/drivers/char/ftape/zftape/zftape-buffers.c b/drivers/char/ftape/zftape/zftape-buffers.c
--- a/drivers/char/ftape/zftape/zftape-buffers.c	2005-01-10 20:11:24 -08:00
+++ b/drivers/char/ftape/zftape/zftape-buffers.c	2005-01-10 20:11:24 -08:00
@@ -87,13 +87,6 @@
 	TRACE_ABORT(0, ft_t_noise,
 		    "allocated buffer @ %p, %d bytes", *(void **)new, size);
 }
-int zft_vcalloc_always(void *new, size_t size)
-{
-	TRACE_FUN(ft_t_flow);
-
-	zft_vfree(new, size);
-	TRACE_EXIT zft_vcalloc_once(new, size);
-}
 int zft_vmalloc_always(void *new, size_t size)
 {
 	TRACE_FUN(ft_t_flow);
diff -Nru a/drivers/char/ftape/zftape/zftape-buffers.h b/drivers/char/ftape/zftape/zftape-buffers.h
--- a/drivers/char/ftape/zftape/zftape-buffers.h	2005-01-10 20:11:23 -08:00
+++ b/drivers/char/ftape/zftape/zftape-buffers.h	2005-01-10 20:11:23 -08:00
@@ -37,7 +37,6 @@
 extern int   zft_vmalloc_once(void *new, size_t size);
 extern int   zft_vcalloc_once(void *new, size_t size);
 extern int   zft_vmalloc_always(void *new, size_t size);
-extern int   zft_vcalloc_always(void *new, size_t size);
 extern void  zft_vfree(void *old, size_t size);
 extern void *zft_kmalloc(size_t size);
 extern void  zft_kfree(void *old, size_t size);
diff -Nru a/drivers/char/ftape/zftape/zftape-init.c b/drivers/char/ftape/zftape/zftape-init.c
--- a/drivers/char/ftape/zftape/zftape-init.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/char/ftape/zftape/zftape-init.c	2005-01-10 20:11:18 -08:00
@@ -46,10 +46,6 @@
 #include "../zftape/zftape-ctl.h"
 #include "../zftape/zftape-buffers.h"
 
-char zft_src[] __initdata = "$Source: /homes/cvs/ftape-stacked/ftape/zftape/zftape-init.c,v $";
-char zft_rev[] __initdata = "$Revision: 1.8 $";
-char zft_dat[] __initdata = "$Date: 1997/11/06 00:48:56 $";
-
 MODULE_AUTHOR("(c) 1996, 1997 Claus-Justus Heine "
 	      "(claus@momo.math.rwth-aachen.de)");
 MODULE_DESCRIPTION(ZFTAPE_VERSION " - "
@@ -276,15 +272,6 @@
 		zft_cmpr_ops = new_ops;
 		TRACE_EXIT 0;
 	}
-}
-
-struct zft_cmpr_ops *zft_cmpr_unregister(void)
-{
-	struct zft_cmpr_ops *old_ops = zft_cmpr_ops;
-	TRACE_FUN(ft_t_flow);
-
-	zft_cmpr_ops = NULL;
-	TRACE_EXIT old_ops;
 }
 
 /*  lock the zft-compressor() module.
diff -Nru a/drivers/char/ftape/zftape/zftape-init.h b/drivers/char/ftape/zftape/zftape-init.h
--- a/drivers/char/ftape/zftape/zftape-init.h	2005-01-10 20:11:19 -08:00
+++ b/drivers/char/ftape/zftape/zftape-init.h	2005-01-10 20:11:19 -08:00
@@ -70,7 +70,6 @@
 /* zftape-init.c defined global functions.
  */
 extern int                  zft_cmpr_register(struct zft_cmpr_ops *new_ops);
-extern struct zft_cmpr_ops *zft_cmpr_unregister(void);
 extern int                  zft_cmpr_lock(int try_to_load);
 
 #endif
diff -Nru a/drivers/char/ftape/zftape/zftape-rw.c b/drivers/char/ftape/zftape/zftape-rw.c
--- a/drivers/char/ftape/zftape/zftape-rw.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/char/ftape/zftape/zftape-rw.c	2005-01-10 20:11:19 -08:00
@@ -45,7 +45,6 @@
 int zft_deblock_segment = -1;
 zft_status_enum zft_io_state = zft_idle;
 int zft_header_changed;
-int zft_bad_sector_map_changed;
 int zft_qic113; /* conform to old specs. and old zftape */
 int zft_use_compression;
 zft_position zft_pos = {
diff -Nru a/drivers/char/ftape/zftape/zftape-rw.h b/drivers/char/ftape/zftape/zftape-rw.h
--- a/drivers/char/ftape/zftape/zftape-rw.h	2005-01-10 20:11:19 -08:00
+++ b/drivers/char/ftape/zftape/zftape-rw.h	2005-01-10 20:11:19 -08:00
@@ -79,7 +79,6 @@
 extern int zft_deblock_segment;
 extern zft_status_enum zft_io_state;
 extern int zft_header_changed;
-extern int zft_bad_sector_map_changed;
 extern int zft_qic113; /* conform to old specs. and old zftape */
 extern int zft_use_compression;
 extern unsigned int zft_blk_sz;
diff -Nru a/drivers/char/ftape/zftape/zftape-vtbl.c b/drivers/char/ftape/zftape/zftape-vtbl.c
--- a/drivers/char/ftape/zftape/zftape-vtbl.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/char/ftape/zftape/zftape-vtbl.c	2005-01-10 20:11:18 -08:00
@@ -62,7 +62,7 @@
 static zft_volinfo  eot_vtbl;
 static zft_volinfo *cur_vtbl;
 
-inline void zft_new_vtbl_entry(void)
+static inline void zft_new_vtbl_entry(void)
 {
 	struct list_head *tmp = &zft_last_vtbl->node;
 	zft_volinfo *new = zft_kmalloc(sizeof(zft_volinfo));
@@ -248,7 +248,7 @@
  * that buffer already contains the old volume-table, so that vtbl
  * entries without the zft_volume flag set can savely be ignored.
  */
-void zft_create_volume_headers(__u8 *buffer)
+static void zft_create_volume_headers(__u8 *buffer)
 {   
 	__u8 *entry;
 	struct list_head *tmp;
diff -Nru a/drivers/char/ftape/zftape/zftape-vtbl.h b/drivers/char/ftape/zftape/zftape-vtbl.h
--- a/drivers/char/ftape/zftape/zftape-vtbl.h	2005-01-10 20:11:18 -08:00
+++ b/drivers/char/ftape/zftape/zftape-vtbl.h	2005-01-10 20:11:18 -08:00
@@ -152,7 +152,6 @@
 /* exported functions */
 extern void  zft_init_vtbl             (void);
 extern void  zft_free_vtbl             (void);
-extern void  zft_new_vtbl_entry        (void);
 extern int   zft_extract_volume_headers(__u8 *buffer);
 extern int   zft_update_volume_table   (unsigned int segment);
 extern int   zft_open_volume           (zft_position *pos,
diff -Nru a/drivers/char/ftape/zftape/zftape_syms.c b/drivers/char/ftape/zftape/zftape_syms.c
--- a/drivers/char/ftape/zftape/zftape_syms.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/char/ftape/zftape/zftape_syms.c	2005-01-10 20:11:15 -08:00
@@ -35,7 +35,6 @@
 
 /* zftape-init.c */
 EXPORT_SYMBOL(zft_cmpr_register);
-EXPORT_SYMBOL(zft_cmpr_unregister);
 /* zftape-read.c */
 EXPORT_SYMBOL(zft_fetch_segment_fraction);
 /* zftape-buffers.c */
diff -Nru a/drivers/char/generic_serial.c b/drivers/char/generic_serial.c
--- a/drivers/char/generic_serial.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/char/generic_serial.c	2005-01-10 20:11:19 -08:00
@@ -279,7 +279,7 @@
 }
 
 
-int gs_real_chars_in_buffer(struct tty_struct *tty)
+static int gs_real_chars_in_buffer(struct tty_struct *tty)
 {
 	struct gs_port *port;
 	func_enter ();
@@ -457,7 +457,7 @@
 }
 
 
-void gs_shutdown_port (struct gs_port *port)
+static void gs_shutdown_port (struct gs_port *port)
 {
 	unsigned long flags;
 
@@ -511,27 +511,6 @@
 }
 
 
-void gs_do_softint(void *private_)
-{
-	struct gs_port *port = private_;
-	struct tty_struct *tty;
-
-	func_enter ();
-
-	if (!port) return;
-
-	tty = port->tty;
-
-	if (!tty) return;
-
-	if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &port->event)) {
-		tty_wakeup(tty);
-		wake_up_interruptible(&tty->write_wait);
-	}
-	func_exit ();
-}
-
-
 int gs_block_til_ready(void *port_, struct file * filp)
 {
 	struct gs_port *port = port_;
@@ -996,7 +975,6 @@
 EXPORT_SYMBOL(gs_stop);
 EXPORT_SYMBOL(gs_start);
 EXPORT_SYMBOL(gs_hangup);
-EXPORT_SYMBOL(gs_do_softint);
 EXPORT_SYMBOL(gs_block_til_ready);
 EXPORT_SYMBOL(gs_close);
 EXPORT_SYMBOL(gs_set_termios);
diff -Nru a/drivers/char/genrtc.c b/drivers/char/genrtc.c
--- a/drivers/char/genrtc.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/char/genrtc.c	2005-01-10 20:11:22 -08:00
@@ -95,7 +95,7 @@
 static volatile int stask_active;              /* schedule_work */
 static volatile int ttask_active;              /* timer_task */
 static int stop_rtc_timers;                    /* don't requeue tasks */
-static spinlock_t gen_rtc_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(gen_rtc_lock);
 
 static void gen_rtc_interrupt(unsigned long arg);
 
diff -Nru a/drivers/char/hpet.c b/drivers/char/hpet.c
--- a/drivers/char/hpet.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/char/hpet.c	2005-01-10 20:11:19 -08:00
@@ -52,9 +52,9 @@
 static u32 hpet_ntimer, hpet_nhpet, hpet_max_freq = HPET_USER_FREQ;
 
 /* A lock for concurrent access by app and isr hpet activity. */
-static spinlock_t hpet_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(hpet_lock);
 /* A lock for concurrent intermodule access to hpet and isr hpet activity. */
-static spinlock_t hpet_task_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(hpet_task_lock);
 
 #define	HPET_DEV_NAME	(7)
 
diff -Nru a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c
--- a/drivers/char/hvc_console.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/char/hvc_console.c	2005-01-10 20:11:22 -08:00
@@ -94,7 +94,7 @@
  * Protect the list of hvc_struct instances from inserts and removals during
  * list traversal.
  */
-static spinlock_t hvc_structs_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(hvc_structs_lock);
 
 /*
  * Initial console vtermnos for console API usage prior to full console
@@ -629,7 +629,7 @@
 	kobject_init(&hp->kobj);
 	hp->kobj.ktype = &hvc_kobj_type;
 
-	hp->lock = SPIN_LOCK_UNLOCKED;
+	spin_lock_init(&hp->lock);
 	spin_lock(&hvc_structs_lock);
 	hp->index = ++hvc_count;
 	list_add_tail(&(hp->next), &hvc_structs);
diff -Nru a/drivers/char/hvcs.c b/drivers/char/hvcs.c
--- a/drivers/char/hvcs.c	2005-01-10 20:11:24 -08:00
+++ b/drivers/char/hvcs.c	2005-01-10 20:11:24 -08:00
@@ -257,7 +257,7 @@
 static unsigned long *hvcs_pi_buff;
 
 /* Only allow one hvcs_struct to use the hvcs_pi_buff at a time. */
-static spinlock_t hvcs_pi_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(hvcs_pi_lock);
 
 /* One vty-server per hvcs_struct */
 struct hvcs_struct {
@@ -308,7 +308,7 @@
 #define from_kobj(kobj) container_of(kobj, struct hvcs_struct, kobj)
 
 static struct list_head hvcs_structs = LIST_HEAD_INIT(hvcs_structs);
-static spinlock_t hvcs_structs_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(hvcs_structs_lock);
 
 static void hvcs_unthrottle(struct tty_struct *tty);
 static void hvcs_throttle(struct tty_struct *tty);
@@ -631,7 +631,7 @@
 	/* hvcsd->tty is zeroed out with the memset */
 	memset(hvcsd, 0x00, sizeof(*hvcsd));
 
-	hvcsd->lock = SPIN_LOCK_UNLOCKED;
+	spin_lock_init(&hvcsd->lock);
 	/* Automatically incs the refcount the first time */
 	kobject_init(&hvcsd->kobj);
 	/* Set up the callback for terminating the hvcs_struct's life */
diff -Nru a/drivers/char/hvsi.c b/drivers/char/hvsi.c
--- a/drivers/char/hvsi.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/char/hvsi.c	2005-01-10 20:11:20 -08:00
@@ -1331,7 +1331,7 @@
 		INIT_WORK(&hp->handshaker, hvsi_handshaker, hp);
 		init_waitqueue_head(&hp->emptyq);
 		init_waitqueue_head(&hp->stateq);
-		hp->lock = SPIN_LOCK_UNLOCKED;
+		spin_lock_init(&hp->lock);
 		hp->index = hvsi_count;
 		hp->inbuf_end = hp->inbuf;
 		hp->state = HVSI_CLOSED;
diff -Nru a/drivers/char/hw_random.c b/drivers/char/hw_random.c
--- a/drivers/char/hw_random.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/char/hw_random.c	2005-01-10 20:11:18 -08:00
@@ -56,31 +56,27 @@
 /*
  * debugging macros
  */
-#undef RNG_DEBUG /* define to enable copious debugging info */
 
-#ifdef RNG_DEBUG
-/* note: prints function name for you */
-#define DPRINTK(fmt, args...) printk(KERN_DEBUG "%s: " fmt, __FUNCTION__ , ## args)
-#else
-#define DPRINTK(fmt, args...)
-#endif
+/* pr_debug() collapses to a no-op if DEBUG is not defined */
+#define DPRINTK(fmt, args...) pr_debug(PFX "%s: " fmt, __FUNCTION__ , ## args)
+
 
-#define RNG_NDEBUG        /* define to disable lightweight runtime checks */
+#undef RNG_NDEBUG        /* define to enable lightweight runtime checks */
 #ifdef RNG_NDEBUG
-#define assert(expr)
+#define assert(expr)							\
+		if(!(expr)) {						\
+		printk(KERN_DEBUG PFX "Assertion failed! %s,%s,%s,"	\
+		"line=%d\n", #expr, __FILE__, __FUNCTION__, __LINE__);	\
+		}
 #else
-#define assert(expr) \
-        if(!(expr)) {                                   \
-        printk( "Assertion failed! %s,%s,%s,line=%d\n", \
-        #expr,__FILE__,__FUNCTION__,__LINE__);          \
-        }
+#define assert(expr)
 #endif
 
 #define RNG_MISCDEV_MINOR		183 /* official */
 
 static int rng_dev_open (struct inode *inode, struct file *filp);
 static ssize_t rng_dev_read (struct file *filp, char __user *buf, size_t size,
-			     loff_t * offp);
+				loff_t * offp);
 
 static int __init intel_init (struct pci_dev *dev);
 static void intel_cleanup(void);
@@ -322,7 +318,8 @@
 	rnen |= (1 << 7);	/* PMIO enable */
 	pci_write_config_byte(dev, 0x41, rnen);
 
-	printk(KERN_INFO PFX "AMD768 system management I/O registers at 0x%X.\n", pmbase);
+	pr_info( PFX "AMD768 system management I/O registers at 0x%X.\n",
+			pmbase);
 
 	amd_dev = dev;
 
@@ -369,7 +366,7 @@
 	VIA_RNG_CHUNK_1_MASK	= 0xFF,
 };
 
-u32 via_rng_datum;
+static u32 via_rng_datum;
 
 /*
  * Investigate using the 'rep' prefix to obtain 32 bits of random data
@@ -483,9 +480,9 @@
 
 
 static ssize_t rng_dev_read (struct file *filp, char __user *buf, size_t size,
-			     loff_t * offp)
+				loff_t * offp)
 {
-	static spinlock_t rng_lock = SPIN_LOCK_UNLOCKED;
+	static DEFINE_SPINLOCK(rng_lock);
 	unsigned int have_data;
 	u32 data = 0;
 	ssize_t ret = 0;
@@ -606,7 +603,7 @@
 	if (rc)
 		return rc;
 
-	printk (KERN_INFO RNG_DRIVER_NAME " loaded\n");
+	pr_info( RNG_DRIVER_NAME " loaded\n");
 
 	DPRINTK ("EXIT, returning 0\n");
 	return 0;
diff -Nru a/drivers/char/i8k.c b/drivers/char/i8k.c
--- a/drivers/char/i8k.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/char/i8k.c	2005-01-10 20:11:17 -08:00
@@ -621,32 +621,35 @@
 
 static int __init dmi_iterate(void (*decode)(DMIHeader *))
 {
-    unsigned char buf[20];
-    long fp = 0x000e0000L;
-    fp -= 16;
+	unsigned char buf[20];
+	void __iomem *p = ioremap(0xe0000, 0x20000), *q;
 
-    while (fp < 0x000fffffL) {
-	fp += 16;
-	isa_memcpy_fromio(buf, fp, 20);
-	if (memcmp(buf, "_DMI_", 5)==0) {
-	    u16 num  = buf[13]<<8  | buf[12];
-	    u16 len  = buf [7]<<8  | buf [6];
-	    u32 base = buf[11]<<24 | buf[10]<<16 | buf[9]<<8 | buf[8];
+	if (!p)
+		return -1;
+
+	for (q = p; q < p + 0x20000; q += 16) {
+		memcpy_fromio(buf, q, 20);
+		if (memcmp(buf, "_DMI_", 5)==0) {
+			u16 num  = buf[13]<<8  | buf[12];
+			u16 len  = buf [7]<<8  | buf [6];
+			u32 base = buf[11]<<24 | buf[10]<<16 | buf[9]<<8 | buf[8];
 #ifdef I8K_DEBUG
-	    printk(KERN_INFO "DMI %d.%d present.\n",
-		   buf[14]>>4, buf[14]&0x0F);
-	    printk(KERN_INFO "%d structures occupying %d bytes.\n",
-		   buf[13]<<8 | buf[12],
-		   buf [7]<<8 | buf[6]);
-	    printk(KERN_INFO "DMI table at 0x%08X.\n",
-		   buf[11]<<24 | buf[10]<<16 | buf[9]<<8 | buf[8]);
+			printk(KERN_INFO "DMI %d.%d present.\n",
+			   buf[14]>>4, buf[14]&0x0F);
+			printk(KERN_INFO "%d structures occupying %d bytes.\n",
+			   buf[13]<<8 | buf[12],
+			   buf [7]<<8 | buf[6]);
+			printk(KERN_INFO "DMI table at 0x%08X.\n",
+			   buf[11]<<24 | buf[10]<<16 | buf[9]<<8 | buf[8]);
 #endif
-	    if (dmi_table(base, len, num, decode)==0) {
-		return 0;
-	    }
+			if (dmi_table(base, len, num, decode)==0) {
+				iounmap(p);
+				return 0;
+			}
+		}
 	}
-    }
-    return -1;
+	iounmap(p);
+	return -1;
 }
 /* end of DMI code */
 
diff -Nru a/drivers/char/ip2/Makefile b/drivers/char/ip2/Makefile
--- a/drivers/char/ip2/Makefile	2005-01-10 20:11:22 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,12 +0,0 @@
-
-all:	ip2mkdev ip2trace ip2stat
-
-ip2mkdev: ip2mkdev.c
-	cc -o ip2mkdev ip2mkdev.c
-
-ip2trace: ip2trace.c
-	cc -o ip2trace ip2trace.c
-
-ip2stat: ip2stat.c
-	cc -o ip2stat ip2stat.c
-
diff -Nru a/drivers/char/ip2/ip2mkdev.c b/drivers/char/ip2/ip2mkdev.c
--- a/drivers/char/ip2/ip2mkdev.c	2005-01-10 20:11:19 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,123 +0,0 @@
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <linux/major.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdio.h>
-
-#include "ip2.h"
-#include "i2ellis.h"
-
-char nm[256];
-i2eBordStr Board[2];
-
-static void ex_details(i2eBordStrPtr);
-
-int main (int argc, char *argv[])
-{
-	int board, box, port;
-	int fd;
-	int dev;
-	i2eBordStrPtr pB  = Board;
-
-	// Remove all IP2 devices
-
-	for ( board = 0; board < 4; ++board )
-	{
-		sprintf ( nm, "/dev/ip2ipl%d", board );
-		unlink ( nm );
-		sprintf ( nm, "/dev/ip2stat%d", board );
-		unlink ( nm );
-	}
-
-	for ( port = 0; port < 256; ++port  )
-	{
-		sprintf ( nm, "/dev/ttyF%d", port );
-		unlink ( nm );
-		sprintf ( nm, "/dev/cuf%d", port );
-		unlink ( nm );
-	}
-
-	// Now create management devices, and use the status device to determine how
-	// port devices need to exist, and then create them.
-
-	for ( board = 0; board < 4; ++board )
-	{
-		printf("Board %d: ", board );
-
-		sprintf ( nm, "/dev/ip2ipl%d", board );
-		mknod ( nm, S_IFCHR|0666, (IP2_IPL_MAJOR << 8) | board * 4 );
-		sprintf ( nm, "/dev/ip2stat%d", board );
-		mknod ( nm, S_IFCHR|0666, (IP2_IPL_MAJOR << 8) | board * 4 + 1 );
-
-		fd = open ( nm, O_RDONLY );
-		if ( !fd )
-		{
-			printf ( "Unable to open status device %s\n", nm );
-			exit ( 1 );
-		}
-		if ( ioctl ( fd,  65, Board ) < 0 )
-		{
-			printf ( "not present\n" );
-			close ( fd );
-			unlink ( nm );
-			sprintf ( nm, "/dev/ip2ipl%d", board );
-			unlink ( nm );
-		}
-		else
-		{
-			switch( pB->i2ePom.e.porID & ~POR_ID_RESERVED ) 
-			{
-			case POR_ID_FIIEX: ex_details ( pB );       break;
-			case POR_ID_II_4:  printf ( "ISA-4" );      break;
-			case POR_ID_II_8:  printf ( "ISA-8 std" );  break;
-			case POR_ID_II_8R: printf ( "ISA-8 RJ11" ); break;
-		
-			default:
-				printf ( "Unknown board type, ID = %x", pB->i2ePom.e.porID );
-			}
-
-			for ( box = 0; box < ABS_MAX_BOXES; ++box )
-			{
-				for ( port = 0; port < ABS_BIGGEST_BOX; ++port )
-				{
-					if ( pB->i2eChannelMap[box] & ( 1 << port ) )
-					{
-						dev = port 
-							 + box * ABS_BIGGEST_BOX 
-							 + board * ABS_BIGGEST_BOX * ABS_MAX_BOXES;
-	
-						sprintf ( nm, "/dev/ttyF%d", dev );
-						mknod ( nm, S_IFCHR|0666, (IP2_TTY_MAJOR << 8) | dev );
-						sprintf ( nm, "/dev/cuf%d", dev );
-						mknod ( nm, S_IFCHR|0666, (IP2_CALLOUT_MAJOR << 8) | dev );
-
-						printf(".");
-					}
-				}
-			}
-			printf("\n");
-		}
-	}
-}
-
-static void ex_details ( i2eBordStrPtr pB )
-{
-	int            box;
-	int            i;
-	int            ports = 0;
-	int            boxes = 0;
-
-	for( box = 0; box < ABS_MAX_BOXES; ++box )
-	{
-		if( pB->i2eChannelMap[box] != 0 ) ++boxes;
-		for( i = 0; i < ABS_BIGGEST_BOX; ++i ) 
-		{
-			if( pB->i2eChannelMap[box] & 1<< i ) ++ports;
-		}
-	}
-
-	printf("EX bx=%d pt=%d %d bit", boxes, ports, pB->i2eDataWidth16 ? 16 : 8 );
-}
-
-
diff -Nru a/drivers/char/ip2/ip2stat.c b/drivers/char/ip2/ip2stat.c
--- a/drivers/char/ip2/ip2stat.c	2005-01-10 20:11:18 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,115 +0,0 @@
-/*******************************************************************************
-*
-*   (c) 1998 by Computone Corporation
-*
-********************************************************************************
-*
-*
-*   PACKAGE:     Linux tty Device Driver for IntelliPort family of multiport
-*                serial I/O controllers.
-*
-*   DESCRIPTION: Status display utility
-*
-*******************************************************************************/
-
-#include <sys/time.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <signal.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <ctype.h>
-#include <linux/timer.h>
-#include <linux/termios.h>
-
-#include "i2ellis.h"
-#include "i2lib.h"
-
-i2eBordStr Board[2];
-i2ChanStr  Port[2];
-
-struct driver_stats
-{
-	ULONG ref_count;
-	ULONG irq_counter;
-	ULONG bh_counter;
-} Driver;
-
-char	devname[20];
-
-int main (int argc, char *argv[])
-{
-   int   fd;
-   int   dev, i;
-	i2eBordStrPtr pB  = Board;
-	i2ChanStrPtr  pCh = Port;
-
-	if ( argc != 2 ) 
-	{
-		printf ( "Usage: %s <port>\n", argv[0] );
-		exit(1);
-	}
-	i = sscanf ( argv[1], "/dev/ttyF%d", &dev );
-
-	if ( i != 1 ) exit(1);
-
-	//printf("%s: board %d, port %d\n", argv[1], dev / 64, dev % 64 );
-
-	sprintf ( devname, "/dev/ip2stat%d", dev / 64 );
-	if( 0 > ( fd = open ( devname, O_RDONLY ) ) ) {
-		// Conventional name failed - try devfs name
-		sprintf ( devname, "/dev/ip2/stat%d", dev / 64 );
-		if( 0 > ( fd = open ( devname, O_RDONLY ) ) ) {
-			// Where is our board???
-			printf( "Unable to open board %d to retrieve stats\n",
-				dev / 64 );
-			exit( 255 );
-		}
-	}
-
-	ioctl ( fd,  64, &Driver );
-	ioctl ( fd,  65, Board );
-	ioctl ( fd,  dev % 64, Port );
-
-	printf ( "Driver statistics:-\n" );
-	printf ( " Reference Count:  %d\n", Driver.ref_count );
-	printf ( " Interrupts to date:   %ld\n", Driver.irq_counter );
-	printf ( " Bottom half to date:  %ld\n", Driver.bh_counter );
-
-	printf ( "Board statistics(%d):-\n",dev/64 );
-	printf ( "FIFO: remains = %d%s\n", pB->i2eFifoRemains, 
-				pB->i2eWaitingForEmptyFifo ? ", busy" : "" );
-	printf ( "Mail: out mail = %02x\n", pB->i2eOutMailWaiting ); 
-	printf ( "  Input interrupts : %d\n", pB->i2eFifoInInts );
-	printf ( "  Output interrupts: %d\n", pB->i2eFifoOutInts );
-	printf ( "  Flow queued      : %ld\n", pB->debugFlowQueued );
-	printf ( "  Bypass queued    : %ld\n", pB->debugBypassQueued );
-	printf ( "  Inline queued    : %ld\n", pB->debugInlineQueued );
-	printf ( "  Data queued      : %ld\n", pB->debugDataQueued );
-	printf ( "  Flow packets     : %ld\n", pB->debugFlowCount );
-	printf ( "  Bypass packets   : %ld\n", pB->debugBypassCount );
-	printf ( "  Inline packets   : %ld\n", pB->debugInlineCount );
-	printf ( "  Mail status      : %x\n",  pB->i2eStatus );
-	printf ( "  Output mail      : %x\n",  pB->i2eOutMailWaiting );
-	printf ( "  Fatal flag       : %d\n",  pB->i2eFatal );
-
-	printf ( "Channel statistics(%s:%d):-\n",argv[1],dev%64 );
-	printf ( "ibuf: stuff = %d strip = %d\n", pCh->Ibuf_stuff, pCh->Ibuf_strip );
-	printf ( "obuf: stuff = %d strip = %d\n", pCh->Obuf_stuff, pCh->Obuf_strip );
-	printf ( "pbuf: stuff = %d\n", pCh->Pbuf_stuff );
-	printf ( "cbuf: stuff = %d strip = %d\n", pCh->Cbuf_stuff, pCh->Cbuf_strip );
-	printf ( "infl: count = %d room = %d\n", pCh->infl.asof, pCh->infl.room );
-	printf ( "outfl: count = %d room = %d\n", pCh->outfl.asof, pCh->outfl.room );
-	printf ( "throttled = %d ",pCh->throttled);
-	printf ( "bookmarks = %d ",pCh->bookMarks);
-	printf ( "flush_flags = %x\n",pCh->flush_flags);
-	printf ( "needs: ");
-	if (pCh->channelNeeds & NEED_FLOW)   printf("FLOW ");
-	if (pCh->channelNeeds & NEED_INLINE) printf("INLINE ");
-	if (pCh->channelNeeds & NEED_BYPASS) printf("BYPASS ");
-	if (pCh->channelNeeds & NEED_CREDIT) printf("CREDIT ");
-	printf ( "\n");
-	printf ( "dss: in = %x, out = %x\n",pCh->dataSetIn,pCh->dataSetOut);
-	
-}
diff -Nru a/drivers/char/ip2/ip2trace.c b/drivers/char/ip2/ip2trace.c
--- a/drivers/char/ip2/ip2trace.c	2005-01-10 20:11:20 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,279 +0,0 @@
-/*******************************************************************************
-*
-*   (c) 1998 by Computone Corporation
-*
-********************************************************************************
-*
-*
-*   PACKAGE:     Linux tty Device Driver for IntelliPort family of multiport
-*                serial I/O controllers.
-*
-*   DESCRIPTION: Interpretive trace dump utility
-*
-*******************************************************************************/
-
-#include <sys/time.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <signal.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <ctype.h>
-#include "ip2trace.h"
-
-unsigned long namebuf[100];
-
-struct { 
-	int wrap,
-	size,
-	o_strip,
-	o_stuff,
-	strip,
-	stuff;
-	unsigned long buf[1000];
-} tbuf;
-
-struct sigaction act;
-
-typedef enum { kChar, kInt, kAddr, kHex } eFormat;
-
-int active = 1;
-void quit() { active = 0; }
-
-int main (int argc, char *argv[])
-{
-   int   fd = open ( "/dev/ip2trace", O_RDONLY );
-   int   cnt, i;
-	unsigned long ts, td;
-   struct timeval timeout;
-   union ip2breadcrumb bc;
-	eFormat fmt = kHex;
-
-   if ( fd < 0 )
-   {
-      printf ( "Can't open device /dev/ip2trace\n" );
-      exit ( 1 );
-   }
-
-   act.sa_handler = quit;
-   /*act.sa_mask = 0;*/
-	sigemptyset(&act.sa_mask);
-   act.sa_flags = 0;
-   act.sa_restorer = NULL;
-
-   sigaction ( SIGTERM, &act, NULL );
-
-	ioctl ( fd,  1, namebuf );
-
-	printf ( "iiSendPendingMail %p\n",        namebuf[0] );
-	printf ( "i2InitChannels %p\n",           namebuf[1] );
-	printf ( "i2QueueNeeds %p\n",             namebuf[2] );
-	printf ( "i2QueueCommands %p\n",          namebuf[3] );
-	printf ( "i2GetStatus %p\n",              namebuf[4] );
-	printf ( "i2Input %p\n",                  namebuf[5] );
-	printf ( "i2InputFlush %p\n",             namebuf[6] );
-	printf ( "i2Output %p\n",                 namebuf[7] );
-	printf ( "i2FlushOutput %p\n",            namebuf[8] );
-	printf ( "i2DrainWakeup %p\n",            namebuf[9] );
-	printf ( "i2DrainOutput %p\n",            namebuf[10] );
-	printf ( "i2OutputFree %p\n",             namebuf[11] );
-	printf ( "i2StripFifo %p\n",              namebuf[12] );
-	printf ( "i2StuffFifoBypass %p\n",        namebuf[13] );
-	printf ( "i2StuffFifoFlow %p\n",          namebuf[14] );
-	printf ( "i2StuffFifoInline %p\n",        namebuf[15] );
-	printf ( "i2ServiceBoard %p\n",           namebuf[16] );
-	printf ( "serviceOutgoingFifo %p\n",      namebuf[17] );
-	printf ( "ip2_init %p\n",                 namebuf[18] ); 
-	printf ( "ip2_init_board %p\n",           namebuf[19] ); 
-	printf ( "find_eisa_board %p\n",          namebuf[20] );  
-	printf ( "set_irq %p\n",                  namebuf[21] );  
-	printf ( "ex_details %p\n",               namebuf[22] );  
-	printf ( "ip2_interrupt %p\n",            namebuf[23] );  
-	printf ( "ip2_poll %p\n",                 namebuf[24] );  
-	printf ( "service_all_boards %p\n",        namebuf[25] );  
-	printf ( "do_input %p\n",                 namebuf[27] );  
-	printf ( "do_status %p\n",                namebuf[26] );  
-	printf ( "open_sanity_check %p\n",        namebuf[27] );  
-	printf ( "open_block_til_ready %p\n",     namebuf[28] );   
-	printf ( "ip2_open %p\n",                 namebuf[29] );  
-	printf ( "ip2_close %p\n",                namebuf[30] );  
-	printf ( "ip2_hangup %p\n",               namebuf[31] );  
-	printf ( "ip2_write %p\n",                namebuf[32] );  
-	printf ( "ip2_putchar %p\n",              namebuf[33] );  
-	printf ( "ip2_flush_chars %p\n",          namebuf[34] );  
-	printf ( "ip2_write_room %p\n",           namebuf[35] );  
-	printf ( "ip2_chars_in_buf %p\n",         namebuf[36] );  
-	printf ( "ip2_flush_buffer %p\n",         namebuf[37] );  
-	//printf ( "ip2_wait_until_sent %p\n",      namebuf[38] );  
-	printf ( "ip2_throttle %p\n",             namebuf[39] );  
-	printf ( "ip2_unthrottle %p\n",           namebuf[40] );  
-	printf ( "ip2_ioctl %p\n",                namebuf[41] );  
-	printf ( "get_modem_info %p\n",           namebuf[42] );  
-	printf ( "set_modem_info %p\n",           namebuf[43] );  
-	printf ( "get_serial_info %p\n",          namebuf[44] );  
-	printf ( "set_serial_info %p\n",          namebuf[45] );  
-	printf ( "ip2_set_termios %p\n",          namebuf[46] );  
-	printf ( "ip2_set_line_discipline %p\n",  namebuf[47] );  
-	printf ( "set_line_characteristics %p\n", namebuf[48] );  
-
-	printf("\n-------------------------\n");
-	printf("Start of trace\n");
-
-   while ( active ) {
-      cnt = read ( fd, &tbuf, sizeof tbuf );
-
-      if ( cnt ) {
-         if ( tbuf.wrap ) {
-            printf ( "\nTrace buffer: wrap=%d, strip=%d, stuff=%d\n",
-                     tbuf.wrap, tbuf.strip, tbuf.stuff );
-         }
-         for ( i = 0, bc.value = 0; i < cnt; ++i ) {
-				if ( !bc.hdr.codes ) {
-					td = tbuf.buf[i] - ts;
-					ts = tbuf.buf[i++];
-					bc.value = tbuf.buf[i];
-	
-					printf ( "\n(%d) Port %3d ", ts, bc.hdr.port );
-
-					fmt = kHex;
-
-					switch ( bc.hdr.cat )
-					{
-					case ITRC_INIT:
-						printf ( "Init       %d: ", bc.hdr.label );
-						break;
-
-					case ITRC_OPEN:
-						printf ( "Open       %d: ", bc.hdr.label );
-						break;
-
-					case ITRC_CLOSE:
-						printf ( "Close      %d: ", bc.hdr.label );
-						break;
-
-					case ITRC_DRAIN:
-						printf ( "Drain      %d: ", bc.hdr.label );
-						fmt = kInt;
-						break;
-
-					case ITRC_IOCTL:
-						printf ( "Ioctl      %d: ", bc.hdr.label );
-						break;
-
-					case ITRC_FLUSH:
-						printf ( "Flush      %d: ", bc.hdr.label );
-						break;
-
-					case ITRC_STATUS:
-						printf ( "GetS       %d: ", bc.hdr.label );
-						break;
-
-					case ITRC_HANGUP:
-						printf ( "Hangup     %d: ", bc.hdr.label );
-						break;
-
-					case ITRC_INTR:
-						printf ( "*Intr      %d: ", bc.hdr.label );
-						break;
-
-					case ITRC_SFLOW:
-						printf ( "SFlow      %d: ", bc.hdr.label );
-						fmt = kInt;
-						break;
-
-					case ITRC_SBCMD:
-						printf ( "Bypass CMD %d: ", bc.hdr.label );
-						fmt = kInt;
-						break;
-
-					case ITRC_SICMD:
-						printf ( "Inline CMD %d: ", bc.hdr.label );
-						fmt = kInt;
-						break;
-
-					case ITRC_MODEM:
-						printf ( "Modem      %d: ", bc.hdr.label );
-						break;
-
-					case ITRC_INPUT:
-						printf ( "Input      %d: ", bc.hdr.label );
-						break;
-
-					case ITRC_OUTPUT:
-						printf ( "Output     %d: ", bc.hdr.label );
-						fmt = kInt;
-						break;
-
-					case ITRC_PUTC:
-						printf ( "Put char   %d: ", bc.hdr.label );
-						fmt = kChar;
-						break;
-
-					case ITRC_QUEUE:
-						printf ( "Queue CMD  %d: ", bc.hdr.label );
-						fmt = kInt;
-						break;
-
-					case ITRC_STFLW:
-						printf ( "Stat Flow  %d: ", bc.hdr.label );
-						fmt = kInt;
-						break;
-
-					case ITRC_SFIFO:
-						printf ( "SFifo      %d: ", bc.hdr.label );
-						break;
-
-					case ITRC_VERIFY:
-						printf ( "Verfy      %d: ", bc.hdr.label );
-						fmt = kHex;
-						break;
-
-					case ITRC_WRITE:
-						printf ( "Write      %d: ", bc.hdr.label );
-						fmt = kChar;
-						break;
-
-					case ITRC_ERROR:
-						printf ( "ERROR      %d: ", bc.hdr.label );
-						fmt = kInt;
-						break;
-
-					default:
-						printf ( "%08x          ", tbuf.buf[i] );
-						break;
-					}
-				}
-				else 
-				{
-               --bc.hdr.codes;
-					switch ( fmt )
-					{
-					case kChar:
-						printf ( "%c (0x%02x) ", 
-							isprint ( tbuf.buf[i] ) ? tbuf.buf[i] : '.', tbuf.buf[i] );
-						break;
-					case kInt:
-						printf ( "%d ", tbuf.buf[i] );
-						break;
-
-					case kAddr:
-					case kHex:
-						printf ( "0x%x ", tbuf.buf[i] );
-						break;
-					}
-				}
-         }
-      }
-      fflush ( stdout );
-      timeout.tv_sec = 0;
-      timeout.tv_usec = 250;
-      select ( 0, NULL, NULL, NULL, &timeout );
-
-   }
-	printf("\n-------------------------\n");
-	printf("End of trace\n");
-
-   close ( fd );
-}
-
diff -Nru a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
--- a/drivers/char/ipmi/ipmi_msghandler.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/char/ipmi/ipmi_msghandler.c	2005-01-10 20:11:19 -08:00
@@ -49,7 +49,7 @@
 #define PFX "IPMI message handler: "
 #define IPMI_MSGHANDLER_VERSION "v33"
 
-struct ipmi_recv_msg *ipmi_alloc_recv_msg(void);
+static struct ipmi_recv_msg *ipmi_alloc_recv_msg(void);
 static int ipmi_init_msghandler(void);
 
 static int initialized = 0;
@@ -294,44 +294,6 @@
 	unsigned int events;
 };
 
-int
-ipmi_register_all_cmd_rcvr(ipmi_user_t user)
-{
-	unsigned long flags;
-	int           rv = -EBUSY;
-
-	write_lock_irqsave(&(user->intf->users_lock), flags);
-	write_lock(&(user->intf->cmd_rcvr_lock));
-	if ((user->intf->all_cmd_rcvr == NULL)
-	    && (list_empty(&(user->intf->cmd_rcvrs))))
-	{
-		user->intf->all_cmd_rcvr = user;
-		rv = 0;
-	}
-	write_unlock(&(user->intf->cmd_rcvr_lock));
-	write_unlock_irqrestore(&(user->intf->users_lock), flags);
-	return rv;
-}
-
-int
-ipmi_unregister_all_cmd_rcvr(ipmi_user_t user)
-{
-	unsigned long flags;
-	int           rv = -EINVAL;
-
-	write_lock_irqsave(&(user->intf->users_lock), flags);
-	write_lock(&(user->intf->cmd_rcvr_lock));
-	if (user->intf->all_cmd_rcvr == user)
-	{
-		user->intf->all_cmd_rcvr = NULL;
-		rv = 0;
-	}
-	write_unlock(&(user->intf->cmd_rcvr_lock));
-	write_unlock_irqrestore(&(user->intf->users_lock), flags);
-	return rv;
-}
-
-
 #define MAX_IPMI_INTERFACES 4
 static ipmi_smi_t ipmi_interfaces[MAX_IPMI_INTERFACES];
 
@@ -342,7 +304,7 @@
 
 /* Directly protects the ipmi_interfaces data structure.  This is
    claimed in the timer interrupt. */
-static spinlock_t interfaces_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(interfaces_lock);
 
 /* List of watchers that want to know when smi's are added and
    deleted. */
@@ -389,7 +351,7 @@
 	up_read(&smi_watchers_sem);
 }
 
-int
+static int
 ipmi_addr_equal(struct ipmi_addr *addr1, struct ipmi_addr *addr2)
 {
 	if (addr1->addr_type != addr2->addr_type)
@@ -1360,26 +1322,6 @@
 	return rv;
 }
 
-int ipmi_request(ipmi_user_t      user,
-		 struct ipmi_addr *addr,
-		 long             msgid,
-		 struct kernel_ipmi_msg  *msg,
-		 void             *user_msg_data,
-		 int              priority)
-{
-	return i_ipmi_request(user,
-			      user->intf,
-			      addr,
-			      msgid,
-			      msg,
-			      user_msg_data,
-			      NULL, NULL,
-			      priority,
-			      user->intf->my_address,
-			      user->intf->my_lun,
-			      -1, 0);
-}
-
 int ipmi_request_settime(ipmi_user_t      user,
 			 struct ipmi_addr *addr,
 			 long             msgid,
@@ -1426,28 +1368,6 @@
 			      -1, 0);
 }
 
-int ipmi_request_with_source(ipmi_user_t      user,
-			     struct ipmi_addr *addr,
-			     long             msgid,
-			     struct kernel_ipmi_msg  *msg,
-			     void             *user_msg_data,
-			     int              priority,
-			     unsigned char    source_address,
-			     unsigned char    source_lun)
-{
-	return i_ipmi_request(user,
-			      user->intf,
-			      addr,
-			      msgid,
-			      msg,
-			      user_msg_data,
-			      NULL, NULL,
-			      priority,
-			      source_address,
-			      source_lun,
-			      -1, 0);
-}
-
 static int ipmb_file_read_proc(char *page, char **start, off_t off,
 			       int count, int *eof, void *data)
 {
@@ -1702,14 +1622,6 @@
 	return;
 }
 
-void ipmi_poll_interface(ipmi_user_t user)
-{
-	ipmi_smi_t intf = user->intf;
-
-	if (intf->handlers->poll)
-		intf->handlers->poll(intf->send_info);
-}
-
 int ipmi_register_smi(struct ipmi_smi_handlers *handlers,
 		      void		       *send_info,
 		      unsigned char            version_major,
@@ -3126,9 +3038,9 @@
 }
 
 static struct notifier_block panic_block = {
-	panic_event,
-	NULL,
-	200   /* priority: INT_MAX >= x >= 0 */
+	.notifier_call	= panic_event,
+	.next		= NULL,
+	.priority	= 200	/* priority: INT_MAX >= x >= 0 */
 };
 
 static int ipmi_init_msghandler(void)
@@ -3211,15 +3123,11 @@
 module_init(ipmi_init_msghandler_mod);
 MODULE_LICENSE("GPL");
 
-EXPORT_SYMBOL(ipmi_alloc_recv_msg);
 EXPORT_SYMBOL(ipmi_create_user);
 EXPORT_SYMBOL(ipmi_destroy_user);
 EXPORT_SYMBOL(ipmi_get_version);
-EXPORT_SYMBOL(ipmi_request);
 EXPORT_SYMBOL(ipmi_request_settime);
 EXPORT_SYMBOL(ipmi_request_supply_msgs);
-EXPORT_SYMBOL(ipmi_request_with_source);
-EXPORT_SYMBOL(ipmi_poll_interface);
 EXPORT_SYMBOL(ipmi_register_smi);
 EXPORT_SYMBOL(ipmi_unregister_smi);
 EXPORT_SYMBOL(ipmi_register_for_cmd);
@@ -3227,12 +3135,9 @@
 EXPORT_SYMBOL(ipmi_smi_msg_received);
 EXPORT_SYMBOL(ipmi_smi_watchdog_pretimeout);
 EXPORT_SYMBOL(ipmi_alloc_smi_msg);
-EXPORT_SYMBOL(ipmi_register_all_cmd_rcvr);
-EXPORT_SYMBOL(ipmi_unregister_all_cmd_rcvr);
 EXPORT_SYMBOL(ipmi_addr_length);
 EXPORT_SYMBOL(ipmi_validate_addr);
 EXPORT_SYMBOL(ipmi_set_gets_events);
-EXPORT_SYMBOL(ipmi_addr_equal);
 EXPORT_SYMBOL(ipmi_smi_watcher_register);
 EXPORT_SYMBOL(ipmi_smi_watcher_unregister);
 EXPORT_SYMBOL(ipmi_set_my_address);
diff -Nru a/drivers/char/ipmi/ipmi_poweroff.c b/drivers/char/ipmi/ipmi_poweroff.c
--- a/drivers/char/ipmi/ipmi_poweroff.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/char/ipmi/ipmi_poweroff.c	2005-01-10 20:11:20 -08:00
@@ -45,9 +45,9 @@
 extern void (*pm_power_off)(void);
 
 /* Stuff from the get device id command. */
-unsigned int mfg_id;
-unsigned int prod_id;
-unsigned char capabilities;
+static unsigned int mfg_id;
+static unsigned int prod_id;
+static unsigned char capabilities;
 
 /* We use our own messages for this operation, we don't let the system
    allocate them, since we may be in a panic situation.  The whole
@@ -381,11 +381,17 @@
 };
 
 static struct poweroff_function poweroff_functions[] = {
-	{ "ATCA",    ipmi_atca_detect, ipmi_poweroff_atca },
-	{ "CPI1",    ipmi_cpi1_detect, ipmi_poweroff_cpi1 },
+	{ .platform_type	= "ATCA",
+	  .detect		= ipmi_atca_detect,
+	  .poweroff_func	= ipmi_poweroff_atca },
+	{ .platform_type	= "CPI1",
+	  .detect		= ipmi_cpi1_detect,
+	  .poweroff_func	= ipmi_poweroff_cpi1 },
 	/* Chassis should generally be last, other things should override
 	   it. */
-	{ "chassis", ipmi_chassis_detect, ipmi_poweroff_chassis },
+	{ .platform_type	= "chassis",
+	  .detect		= ipmi_chassis_detect,
+	  .poweroff_func	= ipmi_poweroff_chassis },
 };
 #define NUM_PO_FUNCS (sizeof(poweroff_functions) \
 		      / sizeof(struct poweroff_function))
diff -Nru a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
--- a/drivers/char/ipmi/ipmi_si_intf.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/char/ipmi/ipmi_si_intf.c	2005-01-10 20:11:16 -08:00
@@ -959,7 +959,7 @@
 #define IPMI_MEM_ADDR_SPACE 1
 #define IPMI_IO_ADDR_SPACE  2
 
-#if defined(CONFIG_ACPI_INTERPETER) || defined(CONFIG_X86) || defined(CONFIG_PCI)
+#if defined(CONFIG_ACPI_INTERPRETER) || defined(CONFIG_X86) || defined(CONFIG_PCI)
 static int is_new_interface(int intf, u8 addr_space, unsigned long base_addr)
 {
 	int i;
@@ -1331,7 +1331,7 @@
 static int acpi_failure = 0;
 
 /* For GPE-type interrupts. */
-u32 ipmi_acpi_gpe(void *context)
+static u32 ipmi_acpi_gpe(void *context)
 {
 	struct smi_info *smi_info = context;
 	unsigned long   flags;
@@ -2253,7 +2253,7 @@
 }
 module_init(init_ipmi_si);
 
-void __exit cleanup_one_si(struct smi_info *to_clean)
+static void __exit cleanup_one_si(struct smi_info *to_clean)
 {
 	int           rv;
 	unsigned long flags;
diff -Nru a/drivers/char/ipmi/ipmi_watchdog.c b/drivers/char/ipmi/ipmi_watchdog.c
--- a/drivers/char/ipmi/ipmi_watchdog.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/char/ipmi/ipmi_watchdog.c	2005-01-10 20:11:23 -08:00
@@ -157,7 +157,7 @@
 static unsigned char preop_val = WDOG_PREOP_NONE;
 
 static char preop[16] = "preop_none";
-static spinlock_t ipmi_read_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(ipmi_read_lock);
 static char data_to_read = 0;
 static DECLARE_WAIT_QUEUE_HEAD(read_q);
 static struct fasync_struct *fasync_q = NULL;
@@ -366,20 +366,6 @@
 	}
 }
 
-/* Do a delayed shutdown, with the delay in milliseconds.  If power_off is
-   false, do a reset.  If power_off is true, do a power down.  This is
-   primarily for the IMB code's shutdown. */
-void ipmi_delayed_shutdown(long delay, int power_off)
-{
-	ipmi_ignore_heartbeat = 1;
-	if (power_off) 
-		ipmi_watchdog_state = WDOG_TIMEOUT_POWER_DOWN;
-	else
-		ipmi_watchdog_state = WDOG_TIMEOUT_RESET;
-	timeout = delay;
-	ipmi_set_timeout(IPMI_SET_TIMEOUT_HB_IF_NECESSARY);
-}
-
 /* We use a semaphore to make sure that only one thing can send a
    heartbeat at one time, because we only have one copy of the data.
    The semaphore is claimed when the set_timeout is sent and freed
@@ -518,9 +504,9 @@
 
 static struct watchdog_info ident=
 {
-	0, /* WDIOF_SETTIMEOUT, */
-	1,
-	"IPMI"
+	.options	= 0,	/* WDIOF_SETTIMEOUT, */
+	.firmware_version = 1,
+	.identity	= "IPMI"
 };
 
 static int ipmi_ioctl(struct inode *inode, struct file *file,
@@ -748,9 +734,9 @@
 };
 
 static struct miscdevice ipmi_wdog_miscdev = {
-	WATCHDOG_MINOR,
-	"watchdog",
-	&ipmi_wdog_fops
+	.minor		= WATCHDOG_MINOR,
+	.name		= "watchdog",
+	.fops		= &ipmi_wdog_fops
 };
 
 static DECLARE_RWSEM(register_sem);
@@ -885,13 +871,11 @@
 }
 
 static struct notifier_block wdog_reboot_notifier = {
-	wdog_reboot_handler,
-	NULL,
-	0
+	.notifier_call	= wdog_reboot_handler,
+	.next		= NULL,
+	.priority	= 0
 };
 
-extern int panic_timeout; /* Why isn't this defined anywhere? */
-
 static int wdog_panic_handler(struct notifier_block *this,
 			      unsigned long         event,
 			      void                  *unused)
@@ -915,9 +899,9 @@
 }
 
 static struct notifier_block wdog_panic_notifier = {
-	wdog_panic_handler,
-	NULL,
-	150   /* priority: INT_MAX >= x >= 0 */
+	.notifier_call	= wdog_panic_handler,
+	.next		= NULL,
+	.priority	= 150	/* priority: INT_MAX >= x >= 0 */
 };
 
 
@@ -1054,10 +1038,6 @@
 	/* Make sure no one can call us any more. */
 	misc_deregister(&ipmi_wdog_miscdev);
 
-	/*  Disable the timer. */
-	ipmi_watchdog_state = WDOG_TIMEOUT_NONE;
-	ipmi_set_timeout(IPMI_SET_TIMEOUT_NO_HB);
-
 	/* Wait to make sure the message makes it out.  The lower layer has
 	   pointers to our buffers, we want to make sure they are done before
 	   we release our memory. */
@@ -1084,8 +1064,5 @@
 	ipmi_unregister_watchdog();
 }
 module_exit(ipmi_wdog_exit);
-
-EXPORT_SYMBOL(ipmi_delayed_shutdown);
-
 module_init(ipmi_wdog_init);
 MODULE_LICENSE("GPL");
diff -Nru a/drivers/char/isicom.c b/drivers/char/isicom.c
--- a/drivers/char/isicom.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/char/isicom.c	2005-01-10 20:11:15 -08:00
@@ -16,10 +16,81 @@
  *
  *	10/6/99 sameer			Merged the ISA and PCI drivers to
  *					a new unified driver.
+ *
+ *	3/9/99	sameer			Added support for ISI4616 cards.
+ *
+ *	16/9/99	sameer			We do not force RTS low anymore.
+ *					This is to prevent the firmware 
+ *					from getting confused.
+ *
+ *	26/10/99 sameer			Cosmetic changes:The driver now
+ *					dumps the Port Count information
+ *					along with I/O address and IRQ.
+ *
+ *	13/12/99 sameer			Fixed the problem with IRQ sharing.
+ *
+ *	10/5/00  sameer			Fixed isicom_shutdown_board()
+ *					to not lower DTR on all the ports
+ *					when the last port on the card is 
+ *					closed.
+ *
+ *	10/5/00  sameer			Signal mask setup command added
+ *					to  isicom_setup_port and 
+ *					isicom_shutdown_port.
+ *
+ *	24/5/00  sameer			The driver is now SMP aware.
+ *					
+ *	
+ *	27/11/00 Vinayak P Risbud	Fixed the Driver Crash Problem
+ *	
+ *	
+ *	03/01/01  anil .s		Added support for resetting the
+ *					internal modems on ISI cards.
+ *
+ *	08/02/01  anil .s		Upgraded the driver for kernel
+ *					2.4.x
+ *
+ *      11/04/01  Kevin			Fixed firmware load problem with
+ *					ISIHP-4X card
+ *	
+ *	30/04/01  anil .s		Fixed the remote login through
+ *					ISI port problem. Now the link
+ *					does not go down before password
+ *					prompt.
+ *
+ *	03/05/01  anil .s		Fixed the problem with IRQ sharing
+ *					among ISI-PCI cards.
+ *
+ *	03/05/01  anil .s		Added support to display the version
+ *					info during insmod as well as module 
+ *					listing by lsmod.
+ *	
+ *	10/05/01  anil .s		Done the modifications to the source
+ *					file and Install script so that the
+ *					same installation can be used for
+ *					2.2.x and 2.4.x kernel.
+ *
+ *	06/06/01  anil .s		Now we drop both dtr and rts during
+ *					shutdown_port as well as raise them
+ *					during isicom_config_port.
+ *  	
  *	09/06/01 acme@conectiva.com.br	use capable, not suser, do
  *					restore_flags on failure in
  *					isicom_send_break, verify put_user
  *					result
+ *
+ *  	11/02/03  ranjeeth		Added support for 230 Kbps and 460 Kbps
+ *  					Baud index extended to 21
+ *  	
+ *  	20/03/03  ranjeeth		Made to work for Linux Advanced server.
+ *  					Taken care of license warning.	
+ *      
+ *	10/12/03  Ravindra		Made to work for Fedora Core 1 of 
+ *					Red Hat Distribution
+ *
+ *	06/01/05  Alan Cox 		Merged the ISI and base kernel strands
+ *					into a single 2.6 driver
+ *
  *	***********************************************************
  *
  *	To use this driver you also need the support package. You 
@@ -35,6 +106,10 @@
  *
  *	Omit those entries for boards you don't have installed.
  *
+ *	TODO
+ *		Hotplug
+ *		Merge testing
+ *		64-bit verification
  */
 
 #include <linux/module.h>
@@ -74,7 +149,6 @@
 MODULE_DEVICE_TABLE(pci, isicom_pci_tbl);
 
 static int prev_card = 3;	/*	start servicing isi_card[0]	*/
-static struct isi_board * irq_to_board[16];
 static struct tty_driver *isicom_normal;
 
 static struct isi_board isi_card[BOARD_COUNT];
@@ -101,9 +175,205 @@
 	18, 19
 };
 
+struct	isi_board {
+	unsigned short		base;
+	unsigned char		irq;
+	unsigned char		port_count;
+	unsigned short		status;
+	unsigned short		port_status; /* each bit represents a single port */
+	unsigned short		shift_count;
+	struct isi_port		* ports;
+	signed char		count;
+	unsigned char		isa;
+	spinlock_t		card_lock; /* Card wide lock 11/5/00 -sameer */
+	unsigned long		flags;
+};
+
+struct	isi_port {
+	unsigned short		magic;
+	unsigned int		flags;
+	int			count;
+	int			blocked_open;
+	int			close_delay;
+	unsigned short		channel;
+	unsigned short		status;
+	unsigned short		closing_wait;
+	struct isi_board	* card;
+	struct tty_struct 	* tty;
+	wait_queue_head_t	close_wait;
+	wait_queue_head_t	open_wait;
+	struct work_struct	hangup_tq;
+	struct work_struct	bh_tqueue;
+	unsigned char		* xmit_buf;
+	int			xmit_head;
+	int			xmit_tail;
+	int			xmit_cnt;
+};
+
+/*
+ *	Locking functions for card level locking. We need to own both
+ *	the kernel lock for the card and have the card in a position that
+ *	it wants to talk.
+ */
+ 
+static int lock_card(struct isi_board *card)
+{
+	char		retries;
+	unsigned short base = card->base;
+
+	for (retries = 0; retries < 100; retries++) {
+		spin_lock_irqsave(&card->card_lock, card->flags);
+		if (inw(base + 0xe) & 0x1) {
+			return 1; 
+		} else {
+			spin_unlock_irqrestore(&card->card_lock, card->flags);
+			udelay(1000);   /* 1ms */
+		}
+	}
+	printk(KERN_WARNING "ISICOM: Failed to lock Card (0x%x)\n", card->base);
+	return 0;	/* Failed to aquire the card! */
+}
+
+static int lock_card_at_interrupt(struct isi_board *card)
+{
+	unsigned char		retries;
+	unsigned short 		base = card->base;
+
+	for (retries = 0; retries < 200; retries++) {
+		spin_lock_irqsave(&card->card_lock, card->flags);
+
+		if (inw(base + 0xe) & 0x1)
+			return 1; 
+		else
+			spin_unlock_irqrestore(&card->card_lock, card->flags);
+	}
+	/* Failing in interrupt is an acceptable event */
+	return 0;	/* Failed to aquire the card! */
+}
+
+static void unlock_card(struct isi_board *card)
+{
+	spin_unlock_irqrestore(&card->card_lock, card->flags);
+}
+
+/*
+ *  ISI Card specific ops ...
+ */
+ 
+static void raise_dtr(struct isi_port * port)
+{
+	struct isi_board * card = port->card;
+	unsigned short base = card->base;
+	unsigned char channel = port->channel;
+
+	if (!lock_card(card))
+		return;
+
+	outw(0x8000 | (channel << card->shift_count) | 0x02 , base);
+	outw(0x0504, base);
+	InterruptTheCard(base);
+	port->status |= ISI_DTR;
+	unlock_card(card);
+}
+
+static inline void drop_dtr(struct isi_port * port)
+{	
+	struct isi_board * card = port->card;
+	unsigned short base = card->base;
+	unsigned char channel = port->channel;
+
+	if (!lock_card(card))
+		return;
+
+	outw(0x8000 | (channel << card->shift_count) | 0x02 , base);
+	outw(0x0404, base);
+	InterruptTheCard(base);	
+	port->status &= ~ISI_DTR;
+	unlock_card(card);
+}
+
+static inline void raise_rts(struct isi_port * port)
+{
+	struct isi_board * card = port->card;
+	unsigned short base = card->base;
+	unsigned char channel = port->channel;
+
+	if (!lock_card(card))
+		return;
+
+	outw(0x8000 | (channel << card->shift_count) | 0x02 , base);
+	outw(0x0a04, base);
+	InterruptTheCard(base);	
+	port->status |= ISI_RTS;
+	unlock_card(card);
+}
+static inline void drop_rts(struct isi_port * port)
+{
+	struct isi_board * card = port->card;
+	unsigned short base = card->base;
+	unsigned char channel = port->channel;
+
+	if (!lock_card(card))
+		return;
+
+	outw(0x8000 | (channel << card->shift_count) | 0x02 , base);
+	outw(0x0804, base);
+	InterruptTheCard(base);	
+	port->status &= ~ISI_RTS;
+	unlock_card(card);
+}
+
+static inline void raise_dtr_rts(struct isi_port * port)
+{
+	struct isi_board * card = port->card;
+	unsigned short base = card->base;
+	unsigned char channel = port->channel;
+
+	if (!lock_card(card))
+		return;
+
+	outw(0x8000 | (channel << card->shift_count) | 0x02 , base);
+	outw(0x0f04, base);
+	InterruptTheCard(base);
+	port->status |= (ISI_DTR | ISI_RTS);
+	unlock_card(card);
+}
+
+static void drop_dtr_rts(struct isi_port * port)
+{
+	struct isi_board * card = port->card;
+	unsigned short base = card->base;
+	unsigned char channel = port->channel;
+
+	if (!lock_card(card))
+		return;
+
+	outw(0x8000 | (channel << card->shift_count) | 0x02 , base);
+	outw(0x0c04, base);
+	InterruptTheCard(base);	
+	port->status &= ~(ISI_RTS | ISI_DTR);
+	unlock_card(card);
+}
+
+static inline void kill_queue(struct isi_port * port, short queue)
+{
+	struct isi_board * card = port->card;
+	unsigned short base = card->base;
+	unsigned char channel = port->channel;
+
+	if (!lock_card(card))
+		return;
+
+	outw(0x8000 | (channel << card->shift_count) | 0x02 , base);
+	outw((queue << 8) | 0x06, base);
+	InterruptTheCard(base);	
+	unlock_card(card);
+}
+
+
 /* 
- *  Firmware loader driver specific routines
- *
+ *  Firmware loader driver specific routines. This needs to mostly die
+ *  and be replaced with request_firmware.
  */
 
 static struct file_operations ISILoad_fops = {
@@ -354,15 +624,19 @@
 	return 0;
 }
 			
-/*	Transmitter	*/
+/*
+ *	Transmitter. 
+ *
+ *	We shovel data into the card buffers on a regular basis. The card
+ *	will do the rest of the work for us.
+ */
 
 static void isicom_tx(unsigned long _data)
 {
 	short count = (BOARD_COUNT-1), card, base;
-	short txcount, wait, wrd, residue, word_count, cnt;
+	short txcount, wrd, residue, word_count, cnt;
 	struct isi_port * port;
 	struct tty_struct * tty;
-	unsigned long flags;
 	
 #ifdef ISICOM_DEBUG
 	++tx_count;
@@ -384,33 +658,29 @@
 	port = isi_card[card].ports;
 	base = isi_card[card].base;
 	for (;count > 0;count--, port++) {
+		if (!lock_card_at_interrupt(&isi_card[card]))
+			continue;
 		/* port not active or tx disabled to force flow control */
-		if (!(port->status & ISI_TXOK))
+		if (!(port->flags & ASYNC_INITIALIZED) ||
+		 	!(port->status & ISI_TXOK))
+			unlock_card(&isi_card[card]);
 			continue;
 		
 		tty = port->tty;
-		save_flags(flags); cli();
-		txcount = min_t(short, TX_SIZE, port->xmit_cnt);
-		if ((txcount <= 0) || tty->stopped || tty->hw_stopped) {
-			restore_flags(flags);
+		
+		
+		if(tty == NULL) {
+			unlock_card(&isi_card[card]);
 			continue;
 		}
-		wait = 200;	
-		while(((inw(base+0x0e) & 0x01) == 0) && (wait-- > 0));
-		if (wait <= 0) {
-			restore_flags(flags);
-#ifdef ISICOM_DEBUG
-			printk(KERN_DEBUG "ISICOM: isicom_tx:Card(0x%x) found busy.\n",
-				card);
-#endif
+		
+		txcount = min_t(short, TX_SIZE, port->xmit_cnt);
+		if (txcount <= 0 || tty->stopped || tty->hw_stopped) {
+			unlock_card(&isi_card[card]);
 			continue;
 		}
 		if (!(inw(base + 0x02) & (1 << port->channel))) {
-			restore_flags(flags);
-#ifdef ISICOM_DEBUG					
-			printk(KERN_DEBUG "ISICOM: isicom_tx: cannot tx to 0x%x:%d.\n",
-					base, port->channel + 1);
-#endif					
+			unlock_card(&isi_card[card]);
 			continue;		
 		}
 #ifdef ISICOM_DEBUG
@@ -459,10 +729,10 @@
 			port->status &= ~ISI_TXOK;
 		if (port->xmit_cnt <= WAKEUP_CHARS)
 			schedule_work(&port->bh_tqueue);
-		restore_flags(flags);
+		unlock_card(&isi_card[card]);
 	}	
 
-		/*	schedule another tx for hopefully in about 10ms	*/	
+	/*	schedule another tx for hopefully in about 10ms	*/	
 sched_again:	
 	if (!re_schedule)	
 		return;
@@ -490,7 +760,10 @@
 	wake_up_interruptible(&tty->write_wait);
 } 		
  		
-/* main interrupt handler routine */ 		
+/*
+ *	Main interrupt handler routine 
+ */
+ 
 static irqreturn_t isicom_interrupt(int irq, void *dev_id,
 					struct pt_regs *regs)
 {
@@ -501,31 +774,19 @@
 	unsigned char channel;
 	short byte_count;
 	
-	/*
-	 *      find the source of interrupt
-	 */
-	 
-	for(count = 0; count < BOARD_COUNT; count++) { 
-		card = &isi_card[count];
-		if (card->base != 0) {
-			if (((card->isa == YES) && (card->irq == irq)) || 
-				((card->isa == NO) && (card->irq == irq) && (inw(card->base+0x0e) & 0x02)))
-				break;
-		}
-		card = NULL;
-	}
+	card = (struct isi_board *) dev_id;
 
-	if (!card || !(card->status & FIRMWARE_LOADED)) {
-/*		printk(KERN_DEBUG "ISICOM: interrupt: not handling irq%d!.\n", irq);*/
+	if (!card || !(card->status & FIRMWARE_LOADED))
 		return IRQ_NONE;
-	}
 	
 	base = card->base;
+	spin_lock(&card->card_lock);
+	
 	if (card->isa == NO) {
-	/*
-	 *      disable any interrupts from the PCI card and lower the
-	 *      interrupt line
-	 */
+		/*
+		 *      disable any interrupts from the PCI card and lower the
+		 *      interrupt line
+		 */
 		outw(0x8000, base+0x04);
 		ClearInterrupt(base);
 	}
@@ -534,16 +795,15 @@
 	header = inw(base);
 	channel = (header & 0x7800) >> card->shift_count;
 	byte_count = header & 0xff;
-#ifdef ISICOM_DEBUG	
-	printk(KERN_DEBUG "ISICOM:Intr:(0x%x:%d).\n", base, channel+1);
-#endif	
-	if ((channel+1) > card->port_count) {
+
+	if (channel + 1 > card->port_count) {
 		printk(KERN_WARNING "ISICOM: isicom_interrupt(0x%x): %d(channel) > port_count.\n",
 				base, channel+1);
 		if (card->isa)
 			ClearInterrupt(base);
 		else
 			outw(0x0000, base+0x04); /* enable interrupts */		
+		spin_unlock(&card->card_lock);
 		return IRQ_HANDLED;			
 	}
 	port = card->ports + channel;
@@ -556,6 +816,21 @@
 	}	
 		
 	tty = port->tty;
+	if (tty == NULL) {
+		word_count = byte_count >> 1;
+		while(byte_count > 1) {
+			inw(base);
+			byte_count -= 2;
+		}
+		if (byte_count & 0x01)
+			inw(base);
+		if (card->isa == YES)
+			ClearInterrupt(base);
+		else
+			outw(0x0000, base+0x04); /* enable interrupts */
+		spin_unlock(&card->card_lock);
+		return IRQ_HANDLED;
+	}
 	
 	if (header & 0x8000) {		/* Status Packet */
 		header = inw(base);
@@ -631,7 +906,6 @@
 				if (tty->flip.count >= TTY_FLIPBUF_SIZE)
 					break;
 				*tty->flip.flag_buf_ptr++ = TTY_BREAK;
-				/* dunno if this is right */	
 				*tty->flip.char_buf_ptr++ = 0;
 				tty->flip.count++;
 				if (port->flags & ASYNC_SAK)
@@ -683,13 +957,12 @@
 	return IRQ_HANDLED;
 } 
 
- /* called with interrupts disabled */ 
 static void isicom_config_port(struct isi_port * port)
 {
 	struct isi_board * card = port->card;
 	struct tty_struct * tty;
 	unsigned long baud;
-	unsigned short channel_setup, wait, base = card->base;
+	unsigned short channel_setup, base = card->base;
 	unsigned short channel = port->channel, shift_count = card->shift_count;
 	unsigned char flow_ctrl;
 	
@@ -729,40 +1002,36 @@
 	else  
 		raise_dtr(port);
 		
-	wait = 100;	
-	while (((inw(base + 0x0e) & 0x0001) == 0) && (wait-- > 0));	
-	if (!wait) {
-		printk(KERN_WARNING "ISICOM: Card found busy in isicom_config_port at channel setup.\n");
-		return;
-	}			 
-	outw(0x8000 | (channel << shift_count) |0x03, base);
-	outw(linuxb_to_isib[baud] << 8 | 0x03, base);
-	channel_setup = 0;
-	switch(C_CSIZE(tty)) {
-		case CS5:
-			channel_setup |= ISICOM_CS5;
-			break;
-		case CS6:
-			channel_setup |= ISICOM_CS6;
-			break;
-		case CS7:
-			channel_setup |= ISICOM_CS7;
-			break;
-		case CS8:
-			channel_setup |= ISICOM_CS8;
-			break;
-	}
-		
-	if (C_CSTOPB(tty))
-		channel_setup |= ISICOM_2SB;
-	
-	if (C_PARENB(tty))
-		channel_setup |= ISICOM_EVPAR;
-	if (C_PARODD(tty))
-		channel_setup |= ISICOM_ODPAR;	
-	outw(channel_setup, base);	
-	InterruptTheCard(base);
-	
+	if (lock_card(card)) {
+		outw(0x8000 | (channel << shift_count) |0x03, base);
+		outw(linuxb_to_isib[baud] << 8 | 0x03, base);
+		channel_setup = 0;
+		switch(C_CSIZE(tty)) {
+			case CS5:
+				channel_setup |= ISICOM_CS5;
+				break;
+			case CS6:
+				channel_setup |= ISICOM_CS6;
+				break;
+			case CS7:
+				channel_setup |= ISICOM_CS7;
+				break;
+			case CS8:
+				channel_setup |= ISICOM_CS8;
+				break;
+		}
+			
+		if (C_CSTOPB(tty))
+			channel_setup |= ISICOM_2SB;
+		if (C_PARENB(tty)) {
+			channel_setup |= ISICOM_EVPAR;
+			if (C_PARODD(tty))
+				channel_setup |= ISICOM_ODPAR;	
+		}
+		outw(channel_setup, base);	
+		InterruptTheCard(base);
+		unlock_card(card);	
+	}	
 	if (C_CLOCAL(tty))
 		port->flags &= ~ASYNC_CHECK_CD;
 	else
@@ -780,23 +1049,19 @@
 	if (I_IXOFF(tty))
 		flow_ctrl |= ISICOM_INITIATE_XONXOFF;	
 		
-	wait = 100;	
-	while (((inw(base + 0x0e) & 0x0001) == 0) && (wait-- > 0));	
-	if (!wait) {
-		printk(KERN_WARNING "ISICOM: Card found busy in isicom_config_port at flow setup.\n");
-		return;
-	}			 
-	outw(0x8000 | (channel << shift_count) |0x04, base);
-	outw(flow_ctrl << 8 | 0x05, base);
-	outw((STOP_CHAR(tty)) << 8 | (START_CHAR(tty)), base);
-	InterruptTheCard(base);
+	if (lock_card(card)) {
+		outw(0x8000 | (channel << shift_count) |0x04, base);
+		outw(flow_ctrl << 8 | 0x05, base);
+		outw((STOP_CHAR(tty)) << 8 | (START_CHAR(tty)), base);
+		InterruptTheCard(base);
+		unlock_card(card);
+	}
 	
 	/*	rx enabled -> enable port for rx on the card	*/
 	if (C_CREAD(tty)) {
 		card->port_status |= (1 << channel);
 		outw(card->port_status, base + 0x02);
 	}
-		
 }
  
 /* open et all */ 
@@ -807,22 +1072,16 @@
 	struct isi_port * port;
 	unsigned long flags;
 	
-	if (bp->status & BOARD_ACTIVE) 
+	spin_lock_irqsave(&bp->card_lock, flags);
+	if (bp->status & BOARD_ACTIVE) {
+		spin_unlock_irqrestore(&bp->card_lock, flags);
 		return;
-	port = bp->ports;
-#ifdef ISICOM_DEBUG	
-	printk(KERN_DEBUG "ISICOM: setup_board: drop_dtr_rts start, port_count %d...\n", bp->port_count);
-#endif
-	for(channel = 0; channel < bp->port_count; channel++, port++) {
-		save_flags(flags); cli();
-		drop_dtr_rts(port);
-		restore_flags(flags);
 	}
-#ifdef ISICOM_DEBUG		
-	printk(KERN_DEBUG "ISICOM: setup_board: drop_dtr_rts stop...\n");	
-#endif	
-	
+	port = bp->ports;
 	bp->status |= BOARD_ACTIVE;
+	spin_unlock_irqrestore(&bp->card_lock, flags);
+	for(channel = 0; channel < bp->port_count; channel++, port++)
+		drop_dtr_rts(port);
 	return;
 }
  
@@ -831,8 +1090,9 @@
 	struct isi_board * card = port->card;
 	unsigned long flags;
 	
-	if (port->flags & ASYNC_INITIALIZED)
+	if (port->flags & ASYNC_INITIALIZED) {
 		return 0;
+	}
 	if (!port->xmit_buf) {
 		unsigned long page;
 		
@@ -845,7 +1105,8 @@
 		}
 		port->xmit_buf = (unsigned char *) page;	
 	}	
-	save_flags(flags); cli();
+
+	spin_lock_irqsave(&card->card_lock, flags);
 	if (port->tty)
 		clear_bit(TTY_IO_ERROR, &port->tty->flags);
 	if (port->count == 1)
@@ -858,15 +1119,16 @@
 	
 	isicom_config_port(port);
 	port->flags |= ASYNC_INITIALIZED;
-	
-	restore_flags(flags);
+	spin_unlock_irqrestore(&card->card_lock, flags);
 	
 	return 0;		
 } 
  
 static int block_til_ready(struct tty_struct * tty, struct file * filp, struct isi_port * port) 
 {
+	struct isi_board * card = port->card;
 	int do_clocal = 0, retval;
+	unsigned long flags;
 	DECLARE_WAITQUEUE(wait, current);
 
 	/* block if port is in the process of being closed */
@@ -894,49 +1156,34 @@
 	
 	if (C_CLOCAL(tty))
 		do_clocal = 1;
-#ifdef ISICOM_DEBUG	
-	if (do_clocal)
-		printk(KERN_DEBUG "ISICOM: block_til_ready: CLOCAL set.\n");
-#endif 		
 	
 	/* block waiting for DCD to be asserted, and while 
 						callout dev is busy */
 	retval = 0;
 	add_wait_queue(&port->open_wait, &wait);
-	cli();
-		if (!tty_hung_up_p(filp))
-			port->count--;
-	sti();
+
+	spin_lock_irqsave(&card->card_lock, flags);
+	if (!tty_hung_up_p(filp))
+		port->count--;
 	port->blocked_open++;
-#ifdef ISICOM_DEBUG	
-	printk(KERN_DEBUG "ISICOM: block_til_ready: waiting for DCD...\n");
-#endif	
+	spin_unlock_irqrestore(&card->card_lock, flags);
+	
 	while (1) {
-		cli();
 		raise_dtr_rts(port);
-		sti();
+
 		set_current_state(TASK_INTERRUPTIBLE);
 		if (tty_hung_up_p(filp) || !(port->flags & ASYNC_INITIALIZED)) { 	
 			if (port->flags & ASYNC_HUP_NOTIFY)
 				retval = -EAGAIN;
 			else
 				retval = -ERESTARTSYS;
-#ifdef ISICOM_DEBUG				
-			printk(KERN_DEBUG "ISICOM: block_til_ready: tty_hung_up_p || not init.\n"); 
-#endif			
 			break;
 		}	
 		if (!(port->flags & ASYNC_CLOSING) &&
 		    (do_clocal || (port->status & ISI_DCD))) {
-#ifdef ISICOM_DEBUG		    
-		 	printk(KERN_DEBUG "ISICOM: block_til_ready: do_clocal || DCD.\n");   
-#endif		 	
 			break;
 		}	
 		if (signal_pending(current)) {
-#ifdef ISICOM_DEBUG		
-			printk(KERN_DEBUG "ISICOM: block_til_ready: sig blocked.\n");
-#endif			
 			retval = -ERESTARTSYS;
 			break;
 		}
@@ -944,9 +1191,11 @@
 	}
 	set_current_state(TASK_RUNNING);
 	remove_wait_queue(&port->open_wait, &wait);
+	spin_lock_irqsave(&card->card_lock, flags);
 	if (!tty_hung_up_p(filp))
 		port->count++;
 	port->blocked_open--;
+	spin_unlock_irqrestore(&card->card_lock, flags);
 	if (retval)
 		return retval;
 	port->flags |= ASYNC_NORMAL_ACTIVE;
@@ -960,62 +1209,33 @@
 	unsigned int line, board;
 	int error;
 
-#ifdef ISICOM_DEBUG	
-	printk(KERN_DEBUG "ISICOM: open start!!!.\n");
-#endif	
 	line = tty->index;
-	
-#ifdef ISICOM_DEBUG	
-	printk(KERN_DEBUG "line = %d.\n", line);
-#endif	
-	
-	if ((line < 0) || (line > (PORT_COUNT-1)))
+	if (line < 0 || line > PORT_COUNT-1)
 		return -ENODEV;
 	board = BOARD(line);
-	
-#ifdef ISICOM_DEBUG	
-	printk(KERN_DEBUG "board = %d.\n", board);
-#endif	
-	
 	card = &isi_card[board];
-	if (!(card->status & FIRMWARE_LOADED)) {
-#ifdef ISICOM_DEBUG	
-		printk(KERN_DEBUG"ISICOM: Firmware not loaded to card%d.\n", board);
-#endif		
+	
+	if (!(card->status & FIRMWARE_LOADED))
 		return -ENODEV;
-	}
 	
 	/*  open on a port greater than the port count for the card !!! */
-	if (line > ((board * 16) + card->port_count - 1)) {
-		printk(KERN_ERR "ISICOM: Open on a port which exceeds the port_count of the card!\n");
+	if (line > ((board * 16) + card->port_count - 1))
 		return -ENODEV;
-	}	
+
 	port = &isi_ports[line];	
 	if (isicom_paranoia_check(port, tty->name, "isicom_open"))
 		return -ENODEV;
 		
-#ifdef ISICOM_DEBUG		
-	printk(KERN_DEBUG "ISICOM: isicom_setup_board ...\n");		
-#endif	
 	isicom_setup_board(card);		
 	
 	port->count++;
 	tty->driver_data = port;
 	port->tty = tty;
-#ifdef ISICOM_DEBUG	
-	printk(KERN_DEBUG "ISICOM: isicom_setup_port ...\n");
-#endif	
 	if ((error = isicom_setup_port(port))!=0)
 		return error;
-#ifdef ISICOM_DEBUG		
-	printk(KERN_DEBUG "ISICOM: block_til_ready ...\n");	
-#endif	
 	if ((error = block_til_ready(tty, filp, port))!=0)
 		return error;
 
-#ifdef ISICOM_DEBUG	
-	printk(KERN_DEBUG "ISICOM: open end!!!.\n");
-#endif	
 	return 0;      		
 }
  
@@ -1023,38 +1243,50 @@
 
 static inline void isicom_shutdown_board(struct isi_board * bp)
 {
-	int channel;
-	struct isi_port * port;
-	
-	if (!(bp->status & BOARD_ACTIVE))
-		return;
-	bp->status &= ~BOARD_ACTIVE;
-	port = bp->ports;
-	for(channel = 0; channel < bp->port_count; channel++, port++) {
-		drop_dtr_rts(port);
-	}	
+	unsigned long flags;
+
+	spin_lock_irqsave(&bp->card_lock, flags);
+	if (bp->status & BOARD_ACTIVE) {
+		bp->status &= ~BOARD_ACTIVE;
+	}
+	spin_unlock_irqrestore(&bp->card_lock, flags);
 }
 
 static void isicom_shutdown_port(struct isi_port * port)
 {
 	struct isi_board * card = port->card;
 	struct tty_struct * tty;	
+	unsigned long flags;
 	
-	if (!(port->flags & ASYNC_INITIALIZED))
+	tty = port->tty;
+
+	spin_lock_irqsave(&card->card_lock, flags);	
+	if (!(port->flags & ASYNC_INITIALIZED)) {
+		spin_unlock_irqrestore(&card->card_lock, flags);
 		return;
+	}
 	if (port->xmit_buf) {
 		free_page((unsigned long) port->xmit_buf);
 		port->xmit_buf = NULL;
 	}	
-	if (!(tty = port->tty) || C_HUPCL(tty)) 
+	port->flags &= ~ASYNC_INITIALIZED;
+	/* 3rd October 2000 : Vinayak P Risbud */
+	port->tty = 0;
+	spin_unlock_irqrestore(&card->card_lock, flags);
+	
+	/*Fix done by Anil .S on 30-04-2001
+	remote login through isi port has dtr toggle problem
+	due to which the carrier drops before the password prompt
+	appears on the remote end. Now we drop the dtr only if the 
+	HUPCL(Hangup on close) flag is set for the tty*/
+	
+	if (C_HUPCL(tty)) 
 		/* drop dtr on this port */
 		drop_dtr(port);
 		
 	/* any other port uninits  */ 
-	
 	if (tty)
 		set_bit(TTY_IO_ERROR, &tty->flags);
-	port->flags &= ~ASYNC_INITIALIZED;
 	
 	if (--card->count < 0) {
 		printk(KERN_DEBUG "ISICOM: isicom_shutdown_port: bad board(0x%x) count %d.\n",
@@ -1063,8 +1295,10 @@
 	}
 	
 	/* last port was closed , shutdown that boad too */
-	if (!card->count)
-		isicom_shutdown_board(card);
+	if(C_HUPCL(tty)) {
+		if (!card->count)
+			isicom_shutdown_board(card);
+	}
 }
 
 static void isicom_close(struct tty_struct * tty, struct file * filp)
@@ -1082,13 +1316,13 @@
 	printk(KERN_DEBUG "ISICOM: Close start!!!.\n");
 #endif	
 	
-	save_flags(flags); cli();
+	spin_lock_irqsave(&card->card_lock, flags);
 	if (tty_hung_up_p(filp)) {
-		restore_flags(flags);
+		spin_unlock_irqrestore(&card->card_lock, flags);
 		return;
 	}
 	
-	if ((tty->count == 1) && (port->count != 1)) {
+	if (tty->count == 1 && port->count != 1) {
 		printk(KERN_WARNING "ISICOM:(0x%x) isicom_close: bad port count"
 			"tty->count = 1	port count = %d.\n",
 			card->base, port->count);
@@ -1102,41 +1336,46 @@
 	}
 	
 	if (port->count) {
-		restore_flags(flags);
+		spin_unlock_irqrestore(&card->card_lock, flags);
 		return;
 	} 	
 	port->flags |= ASYNC_CLOSING;
 	tty->closing = 1;
+	spin_unlock_irqrestore(&card->card_lock, flags);
+	
 	if (port->closing_wait != ASYNC_CLOSING_WAIT_NONE)
 		tty_wait_until_sent(tty, port->closing_wait);
 	/* indicate to the card that no more data can be received 
 	   on this port */
+	spin_lock_irqsave(&card->card_lock, flags);
 	if (port->flags & ASYNC_INITIALIZED) {   
 		card->port_status &= ~(1 << port->channel);
 		outw(card->port_status, card->base + 0x02);
 	}	
 	isicom_shutdown_port(port);
+	spin_unlock_irqrestore(&card->card_lock, flags);
+	
 	if (tty->driver->flush_buffer)
 		tty->driver->flush_buffer(tty);
-		
 	tty_ldisc_flush(tty);
+
+	spin_lock_irqsave(&card->card_lock, flags);
 	tty->closing = 0;
-	port->tty = NULL;
+
 	if (port->blocked_open) {
+		spin_unlock_irqrestore(&card->card_lock, flags);
 		if (port->close_delay) {
 #ifdef ISICOM_DEBUG			
 			printk(KERN_DEBUG "ISICOM: scheduling until time out.\n");
 #endif			
 			msleep_interruptible(jiffies_to_msecs(port->close_delay));
 		}
+		spin_lock_irqsave(&card->card_lock, flags);
 		wake_up_interruptible(&port->open_wait);
 	}	
 	port->flags &= ~(ASYNC_NORMAL_ACTIVE | ASYNC_CLOSING);
 	wake_up_interruptible(&port->close_wait);
-	restore_flags(flags);
-#ifdef ISICOM_DEBUG	
-	printk(KERN_DEBUG "ISICOM: Close end!!!.\n");
-#endif	
+	spin_unlock_irqrestore(&card->card_lock, flags);
 }
 
 /* write et all */
@@ -1144,21 +1383,19 @@
 			const unsigned char * buf, int count)
 {
 	struct isi_port * port = (struct isi_port *) tty->driver_data;
+	struct isi_board * card = port->card;
 	unsigned long flags;
 	int cnt, total = 0;
-#ifdef ISICOM_DEBUG
-	printk(KERN_DEBUG "ISICOM: isicom_write for port%d: %d bytes.\n",
-			port->channel+1, count);
-#endif	  	
+
 	if (isicom_paranoia_check(port, tty->name, "isicom_write"))
 		return 0;
 	
 	if (!tty || !port->xmit_buf || !tmp_buf)
 		return 0;
 		
-	save_flags(flags);
+	spin_lock_irqsave(&card->card_lock, flags);
+	
 	while(1) {	
-		cli();
 		cnt = min_t(int, count, min(SERIAL_XMIT_SIZE - port->xmit_cnt - 1,
 					    SERIAL_XMIT_SIZE - port->xmit_head));
 		if (cnt <= 0) 
@@ -1167,17 +1404,13 @@
 		memcpy(port->xmit_buf + port->xmit_head, buf, cnt);
 		port->xmit_head = (port->xmit_head + cnt) & (SERIAL_XMIT_SIZE - 1);
 		port->xmit_cnt += cnt;
-		restore_flags(flags);
 		buf += cnt;
 		count -= cnt;
 		total += cnt;
 	}		
 	if (port->xmit_cnt && !tty->stopped && !tty->hw_stopped)
 		port->status |= ISI_TXOK;
-	restore_flags(flags);
-#ifdef ISICOM_DEBUG
-	printk(KERN_DEBUG "ISICOM: isicom_write %d bytes written.\n", total);
-#endif		
+	spin_unlock_irqrestore(&card->card_lock, flags);
 	return total;	
 }
 
@@ -1185,6 +1418,7 @@
 static void isicom_put_char(struct tty_struct * tty, unsigned char ch)
 {
 	struct isi_port * port = (struct isi_port *) tty->driver_data;
+	struct isi_board * card = port->card;
 	unsigned long flags;
 	
 	if (isicom_paranoia_check(port, tty->name, "isicom_put_char"))
@@ -1192,21 +1426,17 @@
 	
 	if (!tty || !port->xmit_buf)
 		return;
-#ifdef ISICOM_DEBUG
-	printk(KERN_DEBUG "ISICOM: put_char, port %d, char %c.\n", port->channel+1, ch);
-#endif			
-		
-	save_flags(flags); cli();
-	
-	if (port->xmit_cnt >= (SERIAL_XMIT_SIZE - 1)) {
-		restore_flags(flags);
+
+	spin_lock_irqsave(&card->card_lock, flags);
+	if (port->xmit_cnt >= SERIAL_XMIT_SIZE - 1) {
+		spin_unlock_irqrestore(&card->card_lock, flags);
 		return;
 	}
 	
 	port->xmit_buf[port->xmit_head++] = ch;
 	port->xmit_head &= (SERIAL_XMIT_SIZE - 1);
 	port->xmit_cnt++;
-	restore_flags(flags);
+	spin_unlock_irqrestore(&card->card_lock, flags);
 }
 
 /* flush_chars et all */
@@ -1217,8 +1447,7 @@
 	if (isicom_paranoia_check(port, tty->name, "isicom_flush_chars"))
 		return;
 	
-	if (port->xmit_cnt <= 0 || tty->stopped || tty->hw_stopped ||
-	    !port->xmit_buf)
+	if (port->xmit_cnt <= 0 || tty->stopped || tty->hw_stopped || !port->xmit_buf)
 		return;
 		
 	/* this tells the transmitter to consider this port for
@@ -1231,6 +1460,7 @@
 {
 	struct isi_port * port = (struct isi_port *) tty->driver_data;
 	int free;
+
 	if (isicom_paranoia_check(port, tty->name, "isicom_write_room"))
 		return 0;
 	
@@ -1253,21 +1483,17 @@
 static inline void isicom_send_break(struct isi_port * port, unsigned long length)
 {
 	struct isi_board * card = port->card;
-	short wait = 10;
 	unsigned short base = card->base;	
-	unsigned long flags;
 	
-	save_flags(flags); cli();
-	while (((inw(base + 0x0e) & 0x0001) == 0) && (wait-- > 0));	
-	if (!wait) {
-		printk(KERN_DEBUG "ISICOM: Card found busy in isicom_send_break.\n");
-		goto out;
-	}	
+	if(!lock_card(card))
+		return;
+		
 	outw(0x8000 | ((port->channel) << (card->shift_count)) | 0x3, base);
 	outw((length & 0xff) << 8 | 0x00, base);
 	outw((length & 0xff00), base);
 	InterruptTheCard(base);
-out:	restore_flags(flags);
+
+	unlock_card(card);
 }
 
 static int isicom_tiocmget(struct tty_struct *tty, struct file *file)
@@ -1291,12 +1517,10 @@
 			   unsigned int set, unsigned int clear)
 {
 	struct isi_port * port = (struct isi_port *) tty->driver_data;
-	unsigned long flags;
 	
 	if (isicom_paranoia_check(port, tty->name, "isicom_ioctl"))
 		return -ENODEV;
 	
-	save_flags(flags); cli();
 	if (set & TIOCM_RTS)
 		raise_rts(port);
 	if (set & TIOCM_DTR)
@@ -1307,7 +1531,6 @@
 	if (clear & TIOCM_DTR)
 		drop_dtr(port);
 
-	restore_flags(flags);
 	return 0;
 }			
 
@@ -1315,7 +1538,6 @@
 					struct serial_struct __user *info)
 {
 	struct serial_struct newinfo;
-	unsigned long flags;
 	int reconfig_port;
 
 	if(copy_from_user(&newinfo, info, sizeof(newinfo)))
@@ -1340,9 +1562,7 @@
 				(newinfo.flags & ASYNC_FLAGS));
 	}
 	if (reconfig_port) {
-		save_flags(flags); cli();
 		isicom_config_port(port);
-		restore_flags(flags);
 	}
 	return 0;		 
 }		
@@ -1421,7 +1641,6 @@
 static void isicom_set_termios(struct tty_struct * tty, struct termios * old_termios)
 {
 	struct isi_port * port = (struct isi_port *) tty->driver_data;
-	unsigned long flags;
 	
 	if (isicom_paranoia_check(port, tty->name, "isicom_set_termios"))
 		return;
@@ -1430,9 +1649,7 @@
 	    tty->termios->c_iflag == old_termios->c_iflag)
 		return;
 		
-	save_flags(flags); cli();
 	isicom_config_port(port);
-	restore_flags(flags);
 	
 	if ((old_termios->c_cflag & CRTSCTS) &&
 	    !(tty->termios->c_cflag & CRTSCTS)) {	
@@ -1446,16 +1663,13 @@
 {
 	struct isi_port * port = (struct isi_port *) tty->driver_data;
 	struct isi_board * card = port->card;
-	unsigned long flags;
 	
 	if (isicom_paranoia_check(port, tty->name, "isicom_throttle"))
 		return;
 	
 	/* tell the card that this port cannot handle any more data for now */
-	save_flags(flags); cli();
 	card->port_status &= ~(1 << port->channel);
 	outw(card->port_status, card->base + 0x02);
-	restore_flags(flags);
 }
 
 /* unthrottle et all */
@@ -1463,16 +1677,13 @@
 {
 	struct isi_port * port = (struct isi_port *) tty->driver_data;
 	struct isi_board * card = port->card;
-	unsigned long flags;
 	
 	if (isicom_paranoia_check(port, tty->name, "isicom_unthrottle"))
 		return;
 	
 	/* tell the card that this port is ready to accept more data */
-	save_flags(flags); cli();
 	card->port_status |= (1 << port->channel);
 	outw(card->port_status, card->base + 0x02);
-	restore_flags(flags);
 }
 
 /* stop et all */
@@ -1509,7 +1720,7 @@
 	
 	tty = port->tty;
 	if (tty)
-		tty_hangup(tty);	/* FIXME: module removal race here - AKPM */
+		tty_hangup(tty);
 }
 
 static void isicom_hangup(struct tty_struct * tty)
@@ -1530,21 +1741,22 @@
 static void isicom_flush_buffer(struct tty_struct * tty)
 {
 	struct isi_port * port = (struct isi_port *) tty->driver_data;
+	struct isi_board * card = port->card;
 	unsigned long flags;
 	
 	if (isicom_paranoia_check(port, tty->name, "isicom_flush_buffer"))
 		return;
 	
-	save_flags(flags); cli();
+	spin_lock_irqsave(&card->card_lock, flags);
 	port->xmit_cnt = port->xmit_head = port->xmit_tail = 0;
-	restore_flags(flags);
+	spin_unlock_irqrestore(&card->card_lock, flags);
 	
 	wake_up_interruptible(&tty->write_wait);
 	tty_wakeup(tty);
 }
 
 
-static int register_ioregion(void)
+static int __init register_ioregion(void)
 {
 	int count, done=0;
 	for (count=0; count < BOARD_COUNT; count++ ) {
@@ -1559,7 +1771,7 @@
 	return done;
 }
 
-static void unregister_ioregion(void)
+static void __exit unregister_ioregion(void)
 {
 	int count;
 	for (count=0; count < BOARD_COUNT; count++ ) 
@@ -1591,7 +1803,7 @@
 	.tiocmset	= isicom_tiocmset,
 };
 
-static int register_drivers(void)
+static int __init register_drivers(void)
 {
 	int error;
 
@@ -1622,7 +1834,7 @@
 	return 0;
 }
 
-static void unregister_drivers(void)
+static void __exit unregister_drivers(void)
 {
 	int error = tty_unregister_driver(isicom_normal);
 	if (error)
@@ -1630,78 +1842,48 @@
 	put_tty_driver(isicom_normal);
 }
 
-static int register_isr(void)
+static int __init register_isr(void)
 {
-	int count, done=0, card;
-	int flag;
-	unsigned char request;
+	int count, done=0;
+	unsigned long irqflags;
+
 	for (count=0; count < BOARD_COUNT; count++ ) {
 		if (isi_card[count].base) {
-		/*
-		 * verify if the required irq has already been requested for
-		 * another ISI Card, if so we already have it, else request it
-		 */
-			request = YES;
-			for(card = 0; card < count; card++)
-			if ((isi_card[card].base) && (isi_card[card].irq == isi_card[count].irq)) {
-				request = NO;
-				if ((isi_card[count].isa == NO) && (isi_card[card].isa == NO))
-					break;
-				/*
-				 * ISA cards cannot share interrupts with other
-				 * PCI or ISA devices hence disable this card.
-				 */
+			irqflags = (isi_card[count].isa == YES) ? 
+					SA_INTERRUPT : 
+					(SA_INTERRUPT | SA_SHIRQ);
+
+			if (request_irq(isi_card[count].irq, 
+					isicom_interrupt, 
+					irqflags, 
+					ISICOM_NAME, &isi_card[count])) {
+
+				printk(KERN_WARNING "ISICOM: Could not"
+					" install handler at Irq %d."
+					" Card%d will be disabled.\n",
+					isi_card[count].irq, count+1);
+
 				release_region(isi_card[count].base,16);
-				isi_card[count].base = 0;
-				break;
-			}
-			flag=0;
-			if(isi_card[count].isa == NO)
-				flag |= SA_SHIRQ;
-				
-			if (request == YES) { 
-				if (request_irq(isi_card[count].irq, isicom_interrupt, SA_INTERRUPT|flag, ISICOM_NAME, NULL)) {
-					printk(KERN_WARNING "ISICOM: Could not install handler at Irq %d. Card%d will be disabled.\n",
-						isi_card[count].irq, count+1);
-					release_region(isi_card[count].base,16);
-					isi_card[count].base=0;
-				}
-				else {
-					printk(KERN_INFO "ISICOM: Card%d at 0x%x using irq %d.\n", 
-					count+1, isi_card[count].base, isi_card[count].irq); 
-					
-					irq_to_board[isi_card[count].irq]=&isi_card[count];
-					done++;
-				}
+				isi_card[count].base=0;
 			}
+			else
+				done++;
 		}	
 	}
 	return done;
 }
 
-static void unregister_isr(void)
+static void __exit unregister_isr(void)
 {
-	int count, card;
-	unsigned char freeirq;
+	int count;
+
 	for (count=0; count < BOARD_COUNT; count++ ) {
-		if (isi_card[count].base) {
-			freeirq = YES;
-			for(card = 0; card < count; card++)
-				if ((isi_card[card].base) && (isi_card[card].irq == isi_card[count].irq)) {
-					freeirq = NO;
-					break;
-				}
-			if (freeirq == YES) {
-				free_irq(isi_card[count].irq, NULL);
-#ifdef ISICOM_DEBUG			
-				printk(KERN_DEBUG "ISICOM: Irq %d released for Card%d.\n",isi_card[count].irq, count+1);
-#endif	
-			}		
-		}
+		if (isi_card[count].base)
+			free_irq(isi_card[count].irq, &isi_card[count]);
 	}
 }
 
-static int isicom_init(void)
+static int __init isicom_init(void)
 {
 	int card, channel, base;
 	struct isi_port * port;
@@ -1744,11 +1926,12 @@
 	for (card = 0; card < BOARD_COUNT; card++) {
 		port = &isi_ports[card * 16];
 		isi_card[card].ports = port;
+		spin_lock_init(&isi_card[card].card_lock);
 		base = isi_card[card].base;
 		for (channel = 0; channel < 16; channel++, port++) {
 			port->magic = ISICOM_MAGIC;
 			port->card = &isi_card[card];
-			port->channel = channel;		
+			port->channel = channel;
 		 	port->close_delay = 50 * HZ/100;
 		 	port->closing_wait = 3000 * HZ/100;
 		 	INIT_WORK(&port->hangup_tq, do_isicom_hangup, port);
@@ -1778,7 +1961,7 @@
 module_param_array(irq, int, NULL, 0);
 MODULE_PARM_DESC(irq, "Interrupts for the cards");
 
-int init_module(void)
+static int __devinit isicom_setup(void)
 {
 	struct pci_dev *dev = NULL;
 	int retval, card, idx, count;
@@ -1878,38 +2061,19 @@
 	return 0;
 }
 
-void cleanup_module(void)
+static void __exit isicom_exit(void)
 {
 	re_schedule = 0;
+	/* FIXME */
 	msleep(1000);
-
-#ifdef ISICOM_DEBUG	
-	printk("ISICOM: isicom_tx tx_count = %ld.\n", tx_count);
-#endif	
-
-#ifdef ISICOM_DEBUG
-	printk("ISICOM: uregistering isr ...\n");
-#endif	
 	unregister_isr();
-
-#ifdef ISICOM_DEBUG	
-	printk("ISICOM: unregistering drivers ...\n");
-#endif
 	unregister_drivers();
-	
-#ifdef ISICOM_DEBUG	
-	printk("ISICOM: unregistering ioregion ...\n");
-#endif	
 	unregister_ioregion();	
-	
-#ifdef ISICOM_DEBUG	
-	printk("ISICOM: freeing tmp_buf ...\n");
-#endif	
-	free_page((unsigned long)tmp_buf);
-	
-#ifdef ISICOM_DEBUG		
-	printk("ISICOM: unregistering firmware loader ...\n");	
-#endif
+	if(tmp_buf)
+		free_page((unsigned long)tmp_buf);
 	if (misc_deregister(&isiloader_device))
 		printk(KERN_ERR "ISICOM: Unable to unregister Firmware Loader driver\n");
 }
+
+module_init(isicom_setup);
+module_exit(isicom_exit);
diff -Nru a/drivers/char/keyboard.c b/drivers/char/keyboard.c
--- a/drivers/char/keyboard.c	2005-01-10 20:11:24 -08:00
+++ b/drivers/char/keyboard.c	2005-01-10 20:11:24 -08:00
@@ -939,7 +939,10 @@
 	tasklet_enable(&keyboard_tasklet);
 }
 
-#if defined(CONFIG_X86) || defined(CONFIG_IA64) || defined(CONFIG_ALPHA) || defined(CONFIG_MIPS) || defined(CONFIG_PPC) || defined(CONFIG_SPARC32) || defined(CONFIG_SPARC64) || defined(CONFIG_PARISC) || defined(CONFIG_SUPERH)
+#if defined(CONFIG_X86) || defined(CONFIG_IA64) || defined(CONFIG_ALPHA) ||\
+    defined(CONFIG_MIPS) || defined(CONFIG_PPC) || defined(CONFIG_SPARC32) ||\
+    defined(CONFIG_SPARC64) || defined(CONFIG_PARISC) || defined(CONFIG_SUPERH) ||\
+    (defined(CONFIG_ARM) && defined(CONFIG_KEYBOARD_ATKBD) && !defined(CONFIG_RPC))
 
 #define HW_RAW(dev) (test_bit(EV_MSC, dev->evbit) && test_bit(MSC_RAW, dev->mscbit) &&\
 			((dev)->id.bustype == BUS_I8042) && ((dev)->id.vendor == 0x0001) && ((dev)->id.product == 0x0001))
diff -Nru a/drivers/char/lcd.c b/drivers/char/lcd.c
--- a/drivers/char/lcd.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/char/lcd.c	2005-01-10 20:11:18 -08:00
@@ -33,11 +33,14 @@
 
 #include "lcd.h"
 
+static spinlock_t lcd_lock = SPIN_LOCK_UNLOCKED;
+
 static int lcd_ioctl(struct inode *inode, struct file *file,
 		     unsigned int cmd, unsigned long arg);
 
-static int lcd_present = 1;
+static unsigned int lcd_present = 1;
 
+/* used in arch/mips/cobalt/reset.c */
 int led_state = 0;
 
 #if defined(CONFIG_TULIP) && 0
@@ -63,7 +66,6 @@
 {
 	struct lcd_display button_display;
 	unsigned long address, a;
-	int index;
 
 	switch (cmd) {
 	case LCD_On:
@@ -220,6 +222,7 @@
 
 	case LCD_Write:{
 			struct lcd_display display;
+			unsigned int index;
 
 
 			if (copy_from_user
@@ -316,7 +319,7 @@
 //  set only bit led_display.leds
 
 	case LED_Bit_Set:{
-			int i;
+			unsigned int i;
 			int bit = 1;
 			struct lcd_display led_display;
 
@@ -338,7 +341,7 @@
 //  clear only bit led_display.leds
 
 	case LED_Bit_Clear:{
-			int i;
+			unsigned int i;
 			int bit = 1;
 			struct lcd_display led_display;
 
@@ -413,6 +416,10 @@
 
 			int ctr = 0;
 
+			if ( !capable(CAP_SYS_ADMIN) ) return -EPERM;
+
+			pr_info(LCD "Erasing Flash\n");
+
 			// Chip Erase Sequence
 			WRITE_FLASH(kFlash_Addr1, kFlash_Data1);
 			WRITE_FLASH(kFlash_Addr2, kFlash_Data2);
@@ -421,21 +428,15 @@
 			WRITE_FLASH(kFlash_Addr2, kFlash_Data2);
 			WRITE_FLASH(kFlash_Addr1, kFlash_Erase6);
 
-			printk("Erasing Flash.\n");
-
 			while ((!dqpoll(0x00000000, 0xFF))
 			       && (!timeout(0x00000000))) {
 				ctr++;
 			}
 
-			printk("\n");
-			printk("\n");
-			printk("\n");
-
 			if (READ_FLASH(0x07FFF0) == 0xFF) {
-				printk("Erase Successful\r\n");
+				pr_info(LCD "Erase Successful\n");
 			} else if (timeout) {
-				printk("Erase Timed Out\r\n");
+				pr_info(LCD "Erase Timed Out\n");
 			}
 
 			break;
@@ -447,31 +448,35 @@
 
 			volatile unsigned long burn_addr;
 			unsigned long flags;
-			int i;
+			unsigned int i, index;
 			unsigned char *rom;
 
 
 			struct lcd_display display;
 
+			if ( !capable(CAP_SYS_ADMIN) ) return -EPERM;
+
 			if (copy_from_user
 			    (&display, (struct lcd_display *) arg,
 			     sizeof(struct lcd_display)))
 				return -EFAULT;
 			rom = (unsigned char *) kmalloc((128), GFP_ATOMIC);
 			if (rom == NULL) {
-				printk("broken\n");
-				return 1;
+				printk(KERN_ERR LCD "kmalloc() failed in %s\n",
+						__FUNCTION__);
+				return -ENOMEM;
 			}
 
-			printk("Churning and Burning -");
-			save_flags(flags);
+			pr_info(LCD "Starting Flash burn\n");
 			for (i = 0; i < FLASH_SIZE; i = i + 128) {
 
 				if (copy_from_user
-				    (rom, display.RomImage + i, 128))
+				    (rom, display.RomImage + i, 128)) {
+					kfree(rom);
 					return -EFAULT;
+				}
 				burn_addr = kFlashBase + i;
-				cli();
+				spin_lock_irqsave(&lcd_lock, flags);
 				for (index = 0; index < (128); index++) {
 
 					WRITE_FLASH(kFlash_Addr1,
@@ -480,32 +485,30 @@
 						    kFlash_Data2);
 					WRITE_FLASH(kFlash_Addr1,
 						    kFlash_Prog);
-					*((volatile unsigned char *)
-					  burn_addr) =
-		 (volatile unsigned char) rom[index];
-
-					while ((!dqpoll
-						(burn_addr,
-						 (volatile unsigned char)
-						 rom[index]))
-					       && (!timeout(burn_addr))) {
-					}
+					*((volatile unsigned char *)burn_addr) =
+					  (volatile unsigned char) rom[index];
+
+					while ((!dqpoll (burn_addr,
+						(volatile unsigned char)
+						rom[index])) &&
+						(!timeout(burn_addr))) { }
 					burn_addr++;
 				}
-				restore_flags(flags);
-				if (*
-				    ((volatile unsigned char *) (burn_addr
-								 - 1)) ==
-				    (volatile unsigned char) rom[index -
-								 1]) {
+				spin_unlock_irqrestore(&lcd_lock, flags);
+				if (* ((volatile unsigned char *)
+					(burn_addr - 1)) ==
+					(volatile unsigned char)
+					rom[index - 1]) {
 				} else if (timeout) {
-					printk("Program timed out\r\n");
+					pr_info(LCD "Flash burn timed out\n");
 				}
 
 
 			}
 			kfree(rom);
 
+			pr_info(LCD "Flash successfully burned\n");
+
 			break;
 		}
 
@@ -515,7 +518,7 @@
 
 			unsigned char *user_bytes;
 			volatile unsigned long read_addr;
-			int i;
+			unsigned int i;
 
 			user_bytes =
 			    &(((struct lcd_display *) arg)->RomImage[0]);
@@ -524,7 +527,7 @@
 			    (VERIFY_WRITE, user_bytes, FLASH_SIZE))
 				return -EFAULT;
 
-			printk("Reading Flash");
+			pr_info(LCD "Reading Flash");
 			for (i = 0; i < FLASH_SIZE; i++) {
 				unsigned char tmp_byte;
 				read_addr = kFlashBase + i;
@@ -540,8 +543,7 @@
 		}
 
 	default:
-		return 0;
-		break;
+		return -EINVAL;
 
 	}
 
@@ -613,7 +615,7 @@
 {
 	unsigned long data;
 
-	printk("%s\n", LCD_DRIVER);
+	pr_info("%s\n", LCD_DRIVER);
 	misc_register(&lcd_dev);
 
 	/* Check region? Naaah! Just snarf it up. */
@@ -623,7 +625,7 @@
 	data = LCDReadData;
 	if ((data & 0x000000FF) == (0x00)) {
 		lcd_present = 0;
-		printk("LCD Not Present\n");
+		pr_info(LCD "LCD Not Present\n");
 	} else {
 		lcd_present = 1;
 		WRITE_GAL(kGal_DevBank2PReg, kGal_DevBank2Cfg);
diff -Nru a/drivers/char/lcd.h b/drivers/char/lcd.h
--- a/drivers/char/lcd.h	2005-01-10 20:11:19 -08:00
+++ b/drivers/char/lcd.h	2005-01-10 20:11:19 -08:00
@@ -37,6 +37,8 @@
 
 #define LCD_DRIVER	"Cobalt LCD Driver v2.10"
 
+#define LCD		"lcd: "
+
 #define kLCD_IR		0x0F000000
 #define kLCD_DR		0x0F000010
 #define kGPI		0x0D000000
diff -Nru a/drivers/char/misc.c b/drivers/char/misc.c
--- a/drivers/char/misc.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/char/misc.c	2005-01-10 20:11:22 -08:00
@@ -207,10 +207,9 @@
 int misc_register(struct miscdevice * misc)
 {
 	struct miscdevice *c;
-	struct class_device *class;
 	dev_t dev;
 	int err;
-	
+
 	down(&misc_sem);
 	list_for_each_entry(c, &misc_list, list) {
 		if (c->minor == misc->minor) {
@@ -224,8 +223,7 @@
 		while (--i >= 0)
 			if ( (misc_minors[i>>3] & (1 << (i&7))) == 0)
 				break;
-		if (i<0)
-		{
+		if (i<0) {
 			up(&misc_sem);
 			return -EBUSY;
 		}
@@ -240,10 +238,10 @@
 	}
 	dev = MKDEV(MISC_MAJOR, misc->minor);
 
-	class = class_simple_device_add(misc_class, dev,
-					misc->dev, misc->name);
-	if (IS_ERR(class)) {
-		err = PTR_ERR(class);
+	misc->class = class_simple_device_add(misc_class, dev,
+					      misc->dev, misc->name);
+	if (IS_ERR(misc->class)) {
+		err = PTR_ERR(misc->class);
 		goto out;
 	}
 
diff -Nru a/drivers/char/mwave/3780i.c b/drivers/char/mwave/3780i.c
--- a/drivers/char/mwave/3780i.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/char/mwave/3780i.c	2005-01-10 20:11:22 -08:00
@@ -61,7 +61,7 @@
 #include "mwavedd.h"
 #include "3780i.h"
 
-static spinlock_t dsp_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(dsp_lock);
 static unsigned long flags;
 
 
diff -Nru a/drivers/char/mwave/mwavedd.c b/drivers/char/mwave/mwavedd.c
--- a/drivers/char/mwave/mwavedd.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/char/mwave/mwavedd.c	2005-01-10 20:11:17 -08:00
@@ -76,11 +76,11 @@
 int mwave_3780i_io = 0;
 int mwave_uart_irq = 0;
 int mwave_uart_io = 0;
-MODULE_PARM(mwave_debug, "i");
-MODULE_PARM(mwave_3780i_irq, "i");
-MODULE_PARM(mwave_3780i_io, "i");
-MODULE_PARM(mwave_uart_irq, "i");
-MODULE_PARM(mwave_uart_io, "i");
+module_param(mwave_debug, int, 0);
+module_param(mwave_3780i_irq, int, 0);
+module_param(mwave_3780i_io, int, 0);
+module_param(mwave_uart_irq, int, 0);
+module_param(mwave_uart_io, int, 0);
 
 static int mwave_open(struct inode *inode, struct file *file);
 static int mwave_close(struct inode *inode, struct file *file);
diff -Nru a/drivers/char/mxser.c b/drivers/char/mxser.c
--- a/drivers/char/mxser.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/char/mxser.c	2005-01-10 20:11:20 -08:00
@@ -401,7 +401,7 @@
 static void mxser_flush_chars(struct tty_struct *);
 static void mxser_put_char(struct tty_struct *, unsigned char);
 static int mxser_ioctl(struct tty_struct *, struct file *, uint, ulong);
-static int mxser_ioctl_special(unsigned int, unsigned long);
+static int mxser_ioctl_special(unsigned int, void __user *);
 static void mxser_throttle(struct tty_struct *);
 static void mxser_unthrottle(struct tty_struct *);
 static void mxser_set_termios(struct tty_struct *, struct termios *);
@@ -417,9 +417,9 @@
 static int mxser_startup(struct mxser_struct *);
 static void mxser_shutdown(struct mxser_struct *);
 static int mxser_change_speed(struct mxser_struct *, struct termios *old_termios);
-static int mxser_get_serial_info(struct mxser_struct *, struct serial_struct *);
-static int mxser_set_serial_info(struct mxser_struct *, struct serial_struct *);
-static int mxser_get_lsr_info(struct mxser_struct *, unsigned int *);
+static int mxser_get_serial_info(struct mxser_struct *, struct serial_struct __user *);
+static int mxser_set_serial_info(struct mxser_struct *, struct serial_struct __user *);
+static int mxser_get_lsr_info(struct mxser_struct *, unsigned int __user *);
 static void mxser_send_break(struct mxser_struct *, int);
 static int mxser_tiocmget(struct tty_struct *, struct file *);
 static int mxser_tiocmset(struct tty_struct *, struct file *, unsigned int, unsigned int);
@@ -834,6 +834,7 @@
 	}
 
 	/* start finding PCI board here */
+#ifdef CONFIG_PCI
 	n = (sizeof(mxser_pcibrds) / sizeof(mxser_pcibrds[0])) - 1;
 	index = 0;
 	b = 0;
@@ -875,6 +876,7 @@
 			m++;
 		}
 	}
+#endif
 
 	ret1 = 0;
 	if (!(ret1 = tty_register_driver(mxvar_sdriver))) {
@@ -968,7 +970,7 @@
 			*tty->termios = info->normal_termios;
 		else
 			*tty->termios = info->callout_termios;
-		mxser_change_speed(info, 0);
+		mxser_change_speed(info, NULL);
 	}
 
 	info->session = current->signal->session;
@@ -1084,7 +1086,7 @@
 		
 	tty->closing = 0;
 	info->event = 0;
-	info->tty = 0;
+	info->tty = NULL;
 	if (info->blocked_open) {
 		if (info->close_delay) {
 			set_current_state(TASK_INTERRUPTIBLE);
@@ -1223,12 +1225,13 @@
 	struct mxser_struct *info = (struct mxser_struct *) tty->driver_data;
 	int retval;
 	struct async_icount cprev, cnow;	/* kernel counter temps */
-	struct serial_icounter_struct *p_cuser;	/* user space */
+	struct serial_icounter_struct __user *p_cuser;
 	unsigned long templ;
 	unsigned long flags;
+	void __user *argp = (void __user *)arg;
 
 	if (tty->index == MXSER_PORTS)
-		return (mxser_ioctl_special(cmd, arg));
+		return (mxser_ioctl_special(cmd, argp));
 
 	// following add by Victor Yu. 01-05-2004
 	if (cmd == MOXA_SET_OP_MODE || cmd == MOXA_GET_OP_MODE) {
@@ -1239,7 +1242,7 @@
 
 		p = info->port % 4;
 		if (cmd == MOXA_SET_OP_MODE) {
-			if (get_user(opmode, (int *) arg))
+			if (get_user(opmode, (int __user *) argp))
 				return -EFAULT;
 			if (opmode != RS232_MODE && opmode != RS485_2WIRE_MODE && opmode != RS422_MODE && opmode != RS485_4WIRE_MODE)
 				return -EFAULT;
@@ -1253,7 +1256,7 @@
 			shiftbit = p * 2;
 			opmode = inb(info->opmode_ioaddr) >> shiftbit;
 			opmode &= OP_MODE_MASK;
-			if (copy_to_user((int *) arg, &opmode, sizeof(int)))
+			if (copy_to_user(argp, &opmode, sizeof(int)))
 				return -EFAULT;
 		}
 		return 0;
@@ -1281,19 +1284,19 @@
 		mxser_send_break(info, arg ? arg * (HZ / 10) : HZ / 4);
 		return (0);
 	case TIOCGSOFTCAR:
-		return put_user(C_CLOCAL(tty) ? 1 : 0, (unsigned long *) arg);
+		return put_user(C_CLOCAL(tty) ? 1 : 0, (unsigned long __user *) argp);
 	case TIOCSSOFTCAR:
-		if (get_user(templ, (unsigned long *) arg))
+		if (get_user(templ, (unsigned long __user *) argp))
 			return -EFAULT;
 		arg = templ;
 		tty->termios->c_cflag = ((tty->termios->c_cflag & ~CLOCAL) | (arg ? CLOCAL : 0));
 		return (0);
 	case TIOCGSERIAL:
-		return (mxser_get_serial_info(info, (struct serial_struct *) arg));
+		return mxser_get_serial_info(info, argp);
 	case TIOCSSERIAL:
-		return (mxser_set_serial_info(info, (struct serial_struct *) arg));
+		return mxser_set_serial_info(info, argp);
 	case TIOCSERGETLSR:	/* Get line status register */
-		return (mxser_get_lsr_info(info, (unsigned int *) arg));
+		return mxser_get_lsr_info(info, argp);
 		/*
 		 * Wait for any of the 4 modem inputs (DCD,RI,DSR,CTS) to change
 		 * - mask passed in arg for lines of interest
@@ -1340,7 +1343,7 @@
 		spin_lock_irqsave(&info->slock, flags);
 		cnow = info->icount;
 		spin_unlock_irqrestore(&info->slock, flags);
-		p_cuser = (struct serial_icounter_struct *) arg;
+		p_cuser = argp;
 		/* modified by casper 1/11/2000 */
 		if (put_user(cnow.frame, &p_cuser->frame))
 			return -EFAULT;
@@ -1364,7 +1367,7 @@
 /* */
 		return 0;
 	case MOXA_HighSpeedOn:
-		return put_user(info->baud_base != 115200 ? 1 : 0, (int *) arg);
+		return put_user(info->baud_base != 115200 ? 1 : 0, (int __user *) argp);
 
 	case MOXA_SDS_RSTICOUNTER:{
 			info->mon_data.rxcnt = 0;
@@ -1374,13 +1377,13 @@
 // (above) added by James.
 	case MOXA_ASPP_SETBAUD:{
 			long baud;
-			if (get_user(baud, (long *) arg))
+			if (get_user(baud, (long __user *) argp))
 				return -EFAULT;
 			mxser_set_baud(info, baud);
 			return 0;
 		}
 	case MOXA_ASPP_GETBAUD:
-		if (copy_to_user((long *) arg, &info->realbaud, sizeof(long)))
+		if (copy_to_user(argp, &info->realbaud, sizeof(long)))
 			return -EFAULT;
 
 		return 0;
@@ -1394,7 +1397,7 @@
 
 			len += (lsr ? 0 : 1);
 
-			if (copy_to_user((int *) arg, &len, sizeof(int)))
+			if (copy_to_user(argp, &len, sizeof(int)))
 				return -EFAULT;
 
 			return 0;
@@ -1423,7 +1426,7 @@
 				info->mon_data.hold_reason &= ~NPPI_NOTIFY_CTSHOLD;
 
 
-			if (copy_to_user((struct mxser_mon *) arg, &(info->mon_data), sizeof(struct mxser_mon)))
+			if (copy_to_user(argp, &info->mon_data, sizeof(struct mxser_mon)))
 				return -EFAULT;
 
 			return 0;
@@ -1431,7 +1434,7 @@
 		}
 
 	case MOXA_ASPP_LSTATUS:{
-			if (copy_to_user((struct mxser_mon *) arg, &(info->err_shadow), sizeof(unsigned char)))
+			if (copy_to_user(argp, &info->err_shadow, sizeof(unsigned char)))
 				return -EFAULT;
 
 			info->err_shadow = 0;
@@ -1440,10 +1443,10 @@
 		}
 	case MOXA_SET_BAUD_METHOD:{
 			int method;
-			if (get_user(method, (int *) arg))
+			if (get_user(method, (int __user *) argp))
 				return -EFAULT;
 			mxser_set_baud_method[info->port] = method;
-			if (copy_to_user((int *) arg, &method, sizeof(int)))
+			if (copy_to_user(argp, &method, sizeof(int)))
 				return -EFAULT;
 
 			return 0;
@@ -1454,22 +1457,26 @@
 	return 0;
 }
 
-static int mxser_ioctl_special(unsigned int cmd, unsigned long arg)
+#ifndef CMSPAR
+#define	CMSPAR 010000000000
+#endif
+
+static int mxser_ioctl_special(unsigned int cmd, void __user *argp)
 {
 	int i, result, status;
 
 	switch (cmd) {
 	case MOXA_GET_CONF:
-		if (copy_to_user((struct mxser_hwconf *) arg, mxsercfg, sizeof(struct mxser_hwconf) * 4))
+		if (copy_to_user(argp, mxsercfg, sizeof(struct mxser_hwconf) * 4))
 			return -EFAULT;
 		return 0;
 	case MOXA_GET_MAJOR:
-		if (copy_to_user((int *) arg, &ttymajor, sizeof(int)))
+		if (copy_to_user(argp, &ttymajor, sizeof(int)))
 			return -EFAULT;
 		return 0;
 
 	case MOXA_GET_CUMAJOR:
-		if (copy_to_user((int *) arg, &calloutmajor, sizeof(int)))
+		if (copy_to_user(argp, &calloutmajor, sizeof(int)))
 			return -EFAULT;
 		return 0;
 
@@ -1479,9 +1486,9 @@
 			if (mxvar_table[i].base)
 				result |= (1 << i);
 		}
-		return put_user(result, (unsigned long *) arg);
+		return put_user(result, (unsigned long __user *) argp);
 	case MOXA_GETDATACOUNT:
-		if (copy_to_user((struct mxser_log *) arg, &mxvar_log, sizeof(mxvar_log)))
+		if (copy_to_user(argp, &mxvar_log, sizeof(mxvar_log)))
 			return -EFAULT;
 		return (0);
 	case MOXA_GETMSTATUS:
@@ -1516,7 +1523,7 @@
 			else
 				GMStatus[i].cts = 0;
 		}
-		if (copy_to_user((struct mxser_mstatus *) arg, GMStatus, sizeof(struct mxser_mstatus) * MXSER_PORTS))
+		if (copy_to_user(argp, GMStatus, sizeof(struct mxser_mstatus) * MXSER_PORTS))
 			return -EFAULT;
 		return 0;
 	case MOXA_ASPP_MON_EXT:{
@@ -1584,7 +1591,7 @@
 				mon_data_ext.iftype[i] = opmode;
 
 			}
-			if (copy_to_user((struct mxser_mon_ext *) arg, &mon_data_ext, sizeof(struct mxser_mon_ext)))
+			if (copy_to_user(argp, &mon_data_ext, sizeof(struct mxser_mon_ext)))
 				return -EFAULT;
 
 			return 0;
@@ -1829,7 +1836,7 @@
 	info->event = 0;
 	info->count = 0;
 	info->flags &= ~ASYNC_NORMAL_ACTIVE;
-	info->tty = 0;
+	info->tty = NULL;
 	wake_up_interruptible(&info->open_wait);
 }
 
@@ -1866,7 +1873,7 @@
 	int pass_counter = 0;
 	int handled = IRQ_NONE;
 
-	port = 0;
+	port = NULL;
 	//spin_lock(&gm_lock);
 
 	for (i = 0; i < MXSER_BOARDS; i++) {
@@ -2412,7 +2419,7 @@
 	 * and set the speed of the serial port
 	 */
 	spin_unlock_irqrestore(&info->slock, flags);
-	mxser_change_speed(info, 0);
+	mxser_change_speed(info, NULL);
 
 	info->flags |= ASYNC_INITIALIZED;
 	return (0);
@@ -2442,7 +2449,7 @@
 	 */
 	if (info->xmit_buf) {
 		free_page((unsigned long) info->xmit_buf);
-		info->xmit_buf = 0;
+		info->xmit_buf = NULL;
 	}
 
 	info->IER = 0;
@@ -2591,9 +2598,6 @@
 		cval |= 0x04;
 	if (cflag & PARENB)
 		cval |= UART_LCR_PARITY;
-#ifndef CMSPAR
-#define	CMSPAR 010000000000
-#endif
 	if (!(cflag & PARODD)) {
 		cval |= UART_LCR_EPAR;
 	}
@@ -2807,7 +2811,7 @@
  * friends of mxser_ioctl()
  * ------------------------------------------------------------
  */
-static int mxser_get_serial_info(struct mxser_struct *info, struct serial_struct *retinfo)
+static int mxser_get_serial_info(struct mxser_struct *info, struct serial_struct __user *retinfo)
 {
 	struct serial_struct tmp;
 
@@ -2829,7 +2833,7 @@
 	return (0);
 }
 
-static int mxser_set_serial_info(struct mxser_struct *info, struct serial_struct *new_info)
+static int mxser_set_serial_info(struct mxser_struct *info, struct serial_struct __user *new_info)
 {
 	struct serial_struct new_serial;
 	unsigned int flags;
@@ -2869,7 +2873,7 @@
 	/* */
 	if (info->flags & ASYNC_INITIALIZED) {
 		if (flags != (info->flags & ASYNC_SPD_MASK)) {
-			mxser_change_speed(info, 0);
+			mxser_change_speed(info, NULL);
 		}
 	} else {
 		retval = mxser_startup(info);
@@ -2887,7 +2891,7 @@
  *	    transmit holding register is empty.  This functionality
  *	    allows an RS485 driver to be written in user space.
  */
-static int mxser_get_lsr_info(struct mxser_struct *info, unsigned int *value)
+static int mxser_get_lsr_info(struct mxser_struct *info, unsigned int __user *value)
 {
 	unsigned char status;
 	unsigned int result;
diff -Nru a/drivers/char/n_hdlc.c b/drivers/char/n_hdlc.c
--- a/drivers/char/n_hdlc.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/char/n_hdlc.c	2005-01-10 20:11:17 -08:00
@@ -975,6 +975,6 @@
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Paul Fulghum paulkf@microgate.com");
-MODULE_PARM(debuglevel, "i");
-MODULE_PARM(maxframe, "i");
+module_param(debuglevel, int, 0);
+module_param(maxframe, int, 0);
 MODULE_ALIAS_LDISC(N_HDLC);
diff -Nru a/drivers/char/nvram.c b/drivers/char/nvram.c
--- a/drivers/char/nvram.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/char/nvram.c	2005-01-10 20:11:18 -08:00
@@ -133,7 +133,7 @@
 #include <asm/uaccess.h>
 #include <asm/system.h>
 
-static spinlock_t nvram_state_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(nvram_state_lock);
 static int nvram_open_cnt;	/* #times opened */
 static int nvram_open_mode;	/* special open modes */
 #define NVRAM_WRITE		1 /* opened for writing (exclusive) */
diff -Nru a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c
--- a/drivers/char/pcmcia/synclink_cs.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/char/pcmcia/synclink_cs.c	2005-01-10 20:11:18 -08:00
@@ -471,14 +471,14 @@
 /* Newer, simpler way of listing specific interrupts */
 static int irq_list[4] = { -1 };
 
-MODULE_PARM(irq_mask, "i");
-MODULE_PARM(irq_list, "1-4i");
+module_param(irq_mask, int, 0);
+module_param_array(irq_list, int, NULL, 0);
 
-MODULE_PARM(break_on_load,"i");
-MODULE_PARM(ttymajor,"i");
-MODULE_PARM(debug_level,"i");
-MODULE_PARM(maxframe,"1-" __MODULE_STRING(MAX_DEVICE_COUNT) "i");
-MODULE_PARM(dosyncppp,"1-" __MODULE_STRING(MAX_DEVICE_COUNT) "i");
+module_param(break_on_load, bool, 0);
+module_param(ttymajor, int, 0);
+module_param(debug_level, int, 0);
+module_param_array(maxframe, int, NULL, 0);
+module_param_array(dosyncppp, int, NULL, 0);
 
 MODULE_LICENSE("GPL");
 
diff -Nru a/drivers/char/qtronix.c b/drivers/char/qtronix.c
--- a/drivers/char/qtronix.c	2005-01-10 20:11:24 -08:00
+++ b/drivers/char/qtronix.c	2005-01-10 20:11:24 -08:00
@@ -350,7 +350,7 @@
 }
 
 
-spinlock_t kbd_controller_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(kbd_controller_lock);
 static unsigned char handle_kbd_event(void);
 
 
@@ -537,7 +537,8 @@
 		i--;
 	}
 	if (count-i) {
-		file->f_dentry->d_inode->i_atime = CURRENT_TIME;
+		struct inode *inode = file->f_dentry->d_inode;
+		inode->i_atime = current_fs_time(inode->i_sb);
 		return count-i;
 	}
 	if (signal_pending(current))
diff -Nru a/drivers/char/random.c b/drivers/char/random.c
--- a/drivers/char/random.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/char/random.c	2005-01-10 20:11:16 -08:00
@@ -540,7 +540,7 @@
 		return -ENOMEM;
 	}
 	memset(r->pool, 0, POOLBYTES);
-	r->lock = SPIN_LOCK_UNLOCKED;
+	spin_lock_init(&r->lock);
 	r->name = name;
 	*ret_bucket = r;
 	return 0;
@@ -683,7 +683,7 @@
 
 static struct sample *batch_entropy_pool, *batch_entropy_copy;
 static int	batch_head, batch_tail;
-static spinlock_t batch_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(batch_lock);
 
 static int	batch_max;
 static void batch_entropy_process(void *private_);
@@ -1743,8 +1743,9 @@
 	if (p == buffer) {
 		return (ssize_t)ret;
 	} else {
-		file->f_dentry->d_inode->i_mtime = CURRENT_TIME;
-		mark_inode_dirty(file->f_dentry->d_inode);
+		struct inode *inode = file->f_dentry->d_inode;
+	        inode->i_mtime = current_fs_time(inode->i_sb);
+		mark_inode_dirty(inode);
 		return (ssize_t)(p - buffer);
 	}
 }
@@ -2364,6 +2365,24 @@
 	hash[0] = daddr;
 	hash[1] = keyptr->secret[9];
 	hash[2] = keyptr->secret[10];
+	hash[3] = keyptr->secret[11];
+
+	return halfMD4Transform(hash, keyptr->secret);
+}
+
+/* Generate secure starting point for ephemeral TCP port search */
+u32 secure_tcp_port_ephemeral(__u32 saddr, __u32 daddr, __u16 dport)
+{
+	struct keydata *keyptr = get_keyptr();
+	u32 hash[4];
+
+	/*
+	 *  Pick a unique starting offset for each ephemeral port search
+	 *  (saddr, daddr, dport) and 48bits of random data.
+	 */
+	hash[0] = saddr;
+	hash[1] = daddr;
+	hash[2] = dport ^ keyptr->secret[10];
 	hash[3] = keyptr->secret[11];
 
 	return halfMD4Transform(hash, keyptr->secret);
diff -Nru a/drivers/char/rio/func.h b/drivers/char/rio/func.h
--- a/drivers/char/rio/func.h	2005-01-10 20:11:19 -08:00
+++ b/drivers/char/rio/func.h	2005-01-10 20:11:19 -08:00
@@ -47,7 +47,6 @@
 int RIOBootCodeUNKNOWN(struct rio_info *, struct DownLoad *);
 void msec_timeout(struct Host *);
 int RIOBootRup(struct rio_info *, uint, struct Host *, struct PKT *);
-int RIOBootComplete(struct rio_info *, struct Host *, uint, struct PktCmd *);
 int RIOBootOk(struct rio_info *,struct Host *, ulong);
 int RIORtaBound(struct rio_info *, uint); 
 void FillSlot(int, int, uint, struct Host *);
@@ -61,15 +60,10 @@
 int RIOKillNeighbour(struct rio_info *, caddr_t);
 int RIOSuspendBootRta(struct Host *, int, int);
 int RIOFoadWakeup(struct rio_info *);
-int RIOCommandRup(struct rio_info *, uint, struct Host *, struct PKT *);
 struct CmdBlk * RIOGetCmdBlk(void);
 void RIOFreeCmdBlk(struct CmdBlk *);
 int RIOQueueCmdBlk(struct Host *, uint, struct CmdBlk *);
 void RIOPollHostCommands(struct rio_info *, struct Host *);
-int RIOStrlen(register char *);
-int RIOStrCmp(register char *, register char *);
-int RIOStrnCmp(register char *, register char *, int);
-void  RIOStrNCpy(char *, char *, int);
 int RIOWFlushMark(int, struct CmdBlk *);
 int RIORFlushEnable(int, struct CmdBlk *);
 int RIOUnUse(int, struct CmdBlk *);
@@ -77,7 +71,6 @@
 
 /* rioctrl.c */
 int copyin(int, caddr_t, int);
-int copyout(caddr_t, int, int);
 int riocontrol(struct rio_info *, dev_t,int,caddr_t,int); 
 int RIOPreemptiveCmd(struct rio_info *,struct Port *,uchar);
 
@@ -89,24 +82,17 @@
 caddr_t RIOCheckForATCard(int);
 int RIOAssignAT(struct rio_info *, int, caddr_t, int);
 int RIOBoardTest(paddr_t, caddr_t, uchar, int);
-int RIOScrub(int, BYTE *, int);
-void RIOAllocateInterrupts(struct rio_info *);
-void RIOStopInterrupts(struct rio_info *, int, int);
 void RIOAllocDataStructs(struct rio_info *);
 void RIOSetupDataStructs(struct rio_info *);
 int RIODefaultName(struct rio_info *, struct Host *, uint);
-int RIOReport(struct rio_info *);
 struct rioVersion * RIOVersid(void);
 int RIOMapin(paddr_t, int, caddr_t *);
 void RIOMapout(paddr_t, long, caddr_t);
 void RIOHostReset(uint, volatile struct DpRam *, uint);
 
 /* riointr.c */
-void riopoll(struct rio_info *);
-void riointr(struct rio_info *);
 void RIOTxEnable(char *);
 void RIOServiceHost(struct rio_info *, struct Host *, int);
-void RIOReceive(struct rio_info *, struct Port *);
 int riotproc(struct rio_info *, register struct ttystatics *, int, int);
 
 /* rioparam.c */
@@ -123,22 +109,15 @@
 /* rioroute.c */
 int RIORouteRup(struct rio_info *, uint, struct Host *, struct PKT *);
 void RIOFixPhbs(struct rio_info *, struct Host *, uint); 
-int RIOCheckIsolated(struct rio_info *, struct Host *, uint);
-int RIOIsolate(struct rio_info *, struct Host *, uint);
-int RIOCheck(struct Host *, uint);
 uint GetUnitType(uint);
 int RIOSetChange(struct rio_info *);
-void RIOConCon(struct rio_info *, struct Host *, uint, uint, uint, uint, int);
 int RIOFindFreeID(struct rio_info *, struct Host *, uint *, uint *);
-int RIOFreeDisconnected(struct rio_info *, struct Host *, int );
-int RIORemoveFromSavedTable(struct rio_info *, struct Map *);
 
 
 /* riotty.c */
 
 int riotopen(struct tty_struct * tty, struct file * filp);
 int riotclose(void  *ptr);
-int RIOCookMode(struct ttystatics *);
 int riotioctl(struct rio_info *, struct tty_struct *, register int, register caddr_t); 
 void ttyseth(struct Port *, struct ttystatics *, struct old_sgttyb *sg);
 
diff -Nru a/drivers/char/rio/rio_linux.c b/drivers/char/rio/rio_linux.c
--- a/drivers/char/rio/rio_linux.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/char/rio/rio_linux.c	2005-01-10 20:11:20 -08:00
@@ -32,11 +32,6 @@
  *
  * */
 
-
-#define RCS_ID "$Id: rio.c,v 1.1 1999/07/11 10:13:54 wolff Exp wolff $"
-#define RCS_REV "$Revision: 1.1 $"
-
-
 #include <linux/module.h>
 #include <linux/config.h> 
 #include <linux/kdev_t.h>
@@ -198,7 +193,7 @@
 		         unsigned int cmd, unsigned long arg);
 static int rio_init_drivers(void);
 
-void my_hd (void *addr, int len);
+static void my_hd (void *addr, int len);
 
 static struct tty_driver *rio_driver, *rio_driver2;
 
@@ -206,11 +201,6 @@
 sources use all over the place. */
 struct rio_info *p;
 
-/* struct rio_board boards[RIO_HOSTS]; */
-struct rio_port *rio_ports;
-
-int rio_initialized;
-int rio_nports;
 int rio_debug;
 
 
@@ -218,12 +208,12 @@
     - Set rio_poll to 1 to poll every timer tick (10ms on Intel). 
       This is used when the card cannot use an interrupt for some reason.
 */
-int rio_poll = 1;
+static int rio_poll = 1;
 
 
 /* These are the only open spaces in my computer. Yours may have more
    or less.... */
-int rio_probe_addrs[]= {0xc0000, 0xd0000, 0xe0000};
+static int rio_probe_addrs[]= {0xc0000, 0xd0000, 0xe0000};
 
 #define NR_RIO_ADDRS (sizeof(rio_probe_addrs)/sizeof (int))
 
@@ -264,7 +254,7 @@
 	.ioctl		= rio_fw_ioctl,
 };
 
-struct miscdevice rio_fw_device = {
+static struct miscdevice rio_fw_device = {
 	RIOCTL_MISC_MINOR, "rioctl", &rio_fw_fops
 };
 
@@ -302,7 +292,7 @@
 
 
 #ifdef DEBUG
-void my_hd (void *ad, int len)
+static void my_hd (void *ad, int len)
 {
   int i, j, ch;
   unsigned char *addr = ad;
@@ -387,7 +377,7 @@
 }
 
 
-void rio_reset_interrupt (struct Host *HostP)
+static void rio_reset_interrupt (struct Host *HostP)
 {
   func_enter();
 
@@ -824,7 +814,7 @@
  * ********************************************************************** */
 
 
-struct vpd_prom *get_VPD_PROM (struct Host *hp)
+static struct vpd_prom *get_VPD_PROM (struct Host *hp)
 {
   static struct vpd_prom vpdp;
   char *p;
@@ -979,7 +969,7 @@
     port->gs.close_delay = HZ/2;
     port->gs.closing_wait = 30 * HZ;
     port->gs.rd = &rio_real_driver;
-    port->portSem = SPIN_LOCK_UNLOCKED;
+    spin_lock_init(&port->portSem);
     /*
      * Initializing wait queue
      */
@@ -1045,7 +1035,7 @@
    EEprom.  As the bit is read/write for the CPU, we can fix it here,
    if we detect that it isn't set correctly. -- REW */
 
-void fix_rio_pci (struct pci_dev *pdev)
+static void fix_rio_pci (struct pci_dev *pdev)
 {
   unsigned int hwbase;
   unsigned long rebase;
@@ -1141,7 +1131,7 @@
       hp->Type  = RIO_PCI;
       hp->Copy  = rio_pcicopy; 
       hp->Mode  = RIO_PCI_BOOT_FROM_RAM;
-      hp->HostLock = SPIN_LOCK_UNLOCKED;
+      spin_lock_init(&hp->HostLock);
       rio_reset_interrupt (hp);
       rio_start_card_running (hp);
 
@@ -1199,7 +1189,7 @@
       hp->Type  = RIO_PCI;
       hp->Copy  = rio_pcicopy;
       hp->Mode  = RIO_PCI_BOOT_FROM_RAM;
-      hp->HostLock = SPIN_LOCK_UNLOCKED;
+      spin_lock_init(&hp->HostLock);
 
       rio_dprintk (RIO_DEBUG_PROBE, "Ivec: %x\n", hp->Ivec);
       rio_dprintk (RIO_DEBUG_PROBE, "Mode: %x\n", hp->Mode);
@@ -1249,7 +1239,7 @@
                              * Moreover, the ISA card will work with the 
                              * special PCI copy anyway. -- REW */
     hp->Mode = 0;
-    hp->HostLock = SPIN_LOCK_UNLOCKED;
+    spin_lock_init(&hp->HostLock);
 
     vpdp = get_VPD_PROM (hp);
     rio_dprintk (RIO_DEBUG_PROBE, "Got VPD ROM\n");
diff -Nru a/drivers/char/rio/rioboot.c b/drivers/char/rio/rioboot.c
--- a/drivers/char/rio/rioboot.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/char/rio/rioboot.c	2005-01-10 20:11:17 -08:00
@@ -80,6 +80,8 @@
 #include "cmdblk.h"
 #include "route.h"
 
+static int RIOBootComplete( struct rio_info *p, struct Host *HostP, uint Rup, struct PktCmd *PktCmdP );
+
 static uchar
 RIOAtVec2Ctrl[] =
 {
@@ -580,14 +582,14 @@
 			HostP->UnixRups[RupN].RupP		= &HostP->RupP[RupN];
 			HostP->UnixRups[RupN].Id		  = RupN+1;
 			HostP->UnixRups[RupN].BaseSysPort = NO_PORT;
-			HostP->UnixRups[RupN].RupLock = SPIN_LOCK_UNLOCKED;
+			spin_lock_init(&HostP->UnixRups[RupN].RupLock);
 		}
 
 		for ( RupN = 0; RupN<LINKS_PER_UNIT; RupN++ ) {
 			HostP->UnixRups[RupN+MAX_RUP].RupP	= &HostP->LinkStrP[RupN].rup;
 			HostP->UnixRups[RupN+MAX_RUP].Id  = 0;
 			HostP->UnixRups[RupN+MAX_RUP].BaseSysPort = NO_PORT;
-			HostP->UnixRups[RupN+MAX_RUP].RupLock = SPIN_LOCK_UNLOCKED;
+			spin_lock_init(&HostP->UnixRups[RupN+MAX_RUP].RupLock);
 		}
 
 		/*
@@ -802,7 +804,7 @@
 ** If booted by an RTA, HostP->Mapping[Rup].RtaUniqueNum is the booting RTA.
 ** RtaUniq is the booted RTA.
 */
-int RIOBootComplete( struct rio_info *p, struct Host *HostP, uint Rup, struct PktCmd *PktCmdP )
+static int RIOBootComplete( struct rio_info *p, struct Host *HostP, uint Rup, struct PktCmd *PktCmdP )
 {
 	struct Map	*MapP = NULL;
 	struct Map	*MapP2 = NULL;
diff -Nru a/drivers/char/rio/riocmd.c b/drivers/char/rio/riocmd.c
--- a/drivers/char/rio/riocmd.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/char/rio/riocmd.c	2005-01-10 20:11:17 -08:00
@@ -397,7 +397,7 @@
 /*
 ** Incoming command on the COMMAND_RUP to be processed.
 */
-int
+static int
 RIOCommandRup(p, Rup, HostP, PacketP)
 struct rio_info *	p;
 uint Rup;
@@ -915,62 +915,6 @@
 		}
 		spin_unlock_irqrestore(&UnixRupP->RupLock, flags);
 	} while ( Rup );
-}
-
-
-/*
-** Return the length of the named string
-*/
-int
-RIOStrlen(Str)
-register char *Str;
-{
-	register int len = 0;
-
-	while ( *Str++ )
-		len++;
-	return len;
-}
-
-/*
-** compares s1 to s2 and return 0 if they match.
-*/
-int
-RIOStrCmp(s1, s2)
-register char *s1;
-register char *s2;
-{
-	while ( *s1 && *s2 && *s1==*s2 )
-		s1++, s2++;
-	return *s1-*s2;
-}
-
-/*
-** compares s1 to s2 for upto n bytes and return 0 if they match.
-*/
-int
-RIOStrnCmp(s1, s2, n)
-register char *s1;
-register char *s2;
-int n;
-{
-	while ( n && *s1 && *s2 && *s1==*s2 )
-		n--, s1++, s2++;
-	return n ? *s1!=*s2 : 0;
-}
-
-/*
-** copy up to 'len' bytes from 'from' to 'to'.
-*/
-void
-RIOStrNCpy(to, from, len)
-char *to;
-char *from;
-int len; 
-{
-	while ( len-- && (*to++ = *from++) )
-		;
-	to[-1]='\0';
 }
 
 int
diff -Nru a/drivers/char/rio/rioctrl.c b/drivers/char/rio/rioctrl.c
--- a/drivers/char/rio/rioctrl.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/char/rio/rioctrl.c	2005-01-10 20:11:18 -08:00
@@ -130,7 +130,6 @@
 
 #define drv_makedev(maj, min) ((((uint) maj & 0xff) << 8) | ((uint) min & 0xff))
 
-#ifdef linux
 int copyin (int arg, caddr_t dp, int siz)
 {
   int rv;
@@ -141,8 +140,7 @@
   else return rv;
 }
 
-
-int copyout (caddr_t dp, int arg, int siz)
+static int copyout (caddr_t dp, int arg, int siz)
 {
   int rv;
 
@@ -152,35 +150,6 @@
   else return rv;
 }
 
-#else
-
-int
-copyin(arg, dp, siz)
-int arg;
-caddr_t dp;
-int siz; 
-{
-	if (rbounds ((unsigned long) arg) >= siz) {
-		bcopy ( arg, dp, siz );
-		return OK;
-	} else
-		return ( COPYFAIL );
-}
-
-int
-copyout (dp, arg, siz)
-caddr_t dp;
-int arg;
-int siz;
-{
-	if (wbounds ((unsigned long) arg) >=  siz ) {
-		bcopy ( dp, arg, siz );
-		return OK;
-	} else
-		return ( COPYFAIL );
-}
-#endif
-
 int
 riocontrol(p, dev, cmd, arg, su)
 struct rio_info	* p;
@@ -1203,7 +1172,7 @@
 					p->RIOPortp[loop]->TtyP = &p->channel[loop];
 #endif
 					
-					p->RIOPortp[loop]->portSem = SPIN_LOCK_UNLOCKED;
+					spin_lock_init(&p->RIOPortp[loop]->portSem);
 					p->RIOPortp[loop]->InUse = NOT_INUSE;
 				}
 
diff -Nru a/drivers/char/rio/rioinit.c b/drivers/char/rio/rioinit.c
--- a/drivers/char/rio/rioinit.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/char/rio/rioinit.c	2005-01-10 20:11:17 -08:00
@@ -84,9 +84,15 @@
 #undef bcopy
 #define bcopy rio_pcicopy
 
-int
-RIOPCIinit(struct rio_info *p, int Mode);
+int RIOPCIinit(struct rio_info *p, int Mode);
+
+#if 0
+static void RIOAllocateInterrupts(struct rio_info *);
+static int RIOReport(struct rio_info *);
+static void RIOStopInterrupts(struct rio_info *, int, int);
+#endif
 
+static int RIOScrub(int, BYTE *, int);
 
 #if 0
 extern int	rio_intr();
@@ -1116,7 +1122,7 @@
 ** Call with op not zero, and the RAM will be read and compated with val[op-1]
 ** to check that the data from the previous phase was retained.
 */
-int
+static int
 RIOScrub(op, ram, size)
 int		op;
 BYTE *	ram;
@@ -1262,7 +1268,8 @@
 ** and force into polled mode if told to. Patch up the
 ** interrupt vector & salute The Queen when you've done.
 */
-void
+#if 0
+static void
 RIOAllocateInterrupts(p)
 struct rio_info *	p;
 {
@@ -1301,7 +1308,7 @@
 ** new-fangled interrupt thingies. Set everything up to just
 ** poll.
 */
-void
+static void
 RIOStopInterrupts(p, Reason, Host)
 struct rio_info *	p;
 int	Reason;
@@ -1360,7 +1367,6 @@
 	}
 }
 
-#if 0
 /*
 ** This function is called at init time to setup the data structures.
 */
@@ -1444,7 +1450,7 @@
 				}
 				RIODefaultName(p, HostP, rup);
 			}
-			HostP->UnixRups[rup].RupLock = SPIN_LOCK_UNLOCKED;
+			spin_lock_init(&HostP->UnixRups[rup].RupLock);
 		}
 	}
 }
@@ -1476,7 +1482,8 @@
 #define RIO_RELEASE	"Linux"
 #define RELEASE_ID	"1.0"
 
-int
+#if 0
+static int
 RIOReport(p)
 struct rio_info *	p;
 {
@@ -1500,41 +1507,7 @@
 	}
 	return 0;
 }
-
-/*
-** This function returns release/version information as used by ioctl() calls
-** It returns a MAX_VERSION_LEN byte string, null terminated.
-*/
-char *
-OLD_RIOVersid( void )
-{
-	static char	Info[MAX_VERSION_LEN];
-	char *	RIORelease = RIO_RELEASE;
-	char *	cp;
-	int		ct = 0;
-
-	for ( ct=0; RIORelease[ct] && ct<MAX_VERSION_LEN; ct++ )
-		Info[ct] = RIORelease[ct];
-	if ( ct>=MAX_VERSION_LEN ) {
-		Info[MAX_VERSION_LEN-1] = '\0';
-		return Info;
-	}
-	Info[ct++]=' ';
-	if ( ct>=MAX_VERSION_LEN ) {
-		Info[MAX_VERSION_LEN-1] = '\0';
-		return Info;
-	}
-
-	cp="";	/* Fill the RCS Id here */
-
-	while ( *cp && ct<MAX_VERSION_LEN )
-		Info[ct++] = *cp++;
-	if ( ct<MAX_VERSION_LEN-1 )
-		Info[ct] = '\0';
-	Info[MAX_VERSION_LEN-1] = '\0';
-	return Info;
-}
-
+#endif
 
 static struct rioVersion	stVersion;
 
diff -Nru a/drivers/char/rio/riointr.c b/drivers/char/rio/riointr.c
--- a/drivers/char/rio/riointr.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/char/rio/riointr.c	2005-01-10 20:11:15 -08:00
@@ -84,83 +84,10 @@
 #include "rioioctl.h"
 
 
+static void RIOReceive(struct rio_info *, struct Port *);
 
 
-/*
-** riopoll is called every clock tick. Once the /dev/rio device has been
-** opened, and polldistributed( ) has been called, this routine is called
-** every clock tick *by every cpu*. The 'interesting' piece of code that
-** manipulates 'RIONumCpus' and 'RIOCpuCountdown' is used to fair-share
-** the work between the CPUs. If there are 'N' cpus, then each poll time
-** we increment a counter, modulo 'N-1'. When this counter is 0, we call
-** the interrupt handler. This has the effect that polls are serviced
-** by processor 'N', 'N-1', 'N-2', ... '0', round and round. Neat.
-*/
-void
-riopoll(p)
-struct rio_info *	p;
-{
-	int   host;
-
-	/*
-	** Here's the deal. We try to fair share as much as possible amongst
-	** all the processors that are available. Since each processor 
-	** should generate HZ ticks per second and since we only need HZ ticks
-	** in total for proper operation we simply attempt to cycle round each
-	** processor in turn, using RIOCpuCountdown to decide whether to call
-	** the interrupt routine. ( In fact the count zeroes when it reaches
-	** one less than the total number of processors - so e.g. on a two
-	** processor system RIOService will get called 2*HZ times per second. )
-	** this_cpu (cur_cpu()) tells us the number of the current processor
-	** as follows:
-	**
-	**		0 - default CPU
-	**		1 - first extra CPU
-	**		2 - second extra CPU
-	**		etc.
-	*/
-
-	/*
-	** okay, we've got a cpu that hasn't had a go recently 
-	** - lets check to see what needs doing.
-	*/
-	for ( host=0; host<p->RIONumHosts; host++ ) {
-		struct Host *HostP = &p->RIOHosts[host];
-
-		rio_spin_lock( &HostP->HostLock );
-
-		if ( ( (HostP->Flags & RUN_STATE) != RC_RUNNING ) ||
-		     HostP->InIntr ) {
-			rio_spin_unlock (&HostP->HostLock); 
-			continue;
-		}
-
-		if ( RWORD( HostP->ParmMapP->rup_intr ) ||
-			 RWORD( HostP->ParmMapP->rx_intr  ) ||
-			 RWORD( HostP->ParmMapP->tx_intr  ) ) {
-			HostP->InIntr = 1;
-
-#ifdef FUTURE_RELEASE
-			if( HostP->Type == RIO_EISA )
-				INBZ( HostP->Slot, EISA_INTERRUPT_RESET );
-			else
-#endif
-				WBYTE( HostP->ResetInt , 0xff );
-
-			rio_spin_lock(&HostP->HostLock); 
-
-			p->_RIO_Polled++;
-			RIOServiceHost(p, HostP, 'p' );
-			rio_spin_lock( &HostP->HostLock); 
-			HostP->InIntr = 0;
-			rio_spin_unlock (&HostP->HostLock);
-		}
-	}
-	rio_spin_unlock (&p->RIOIntrSem); 
-}
-
-
-char *firstchars (char *p, int nch)
+static char *firstchars (char *p, int nch)
 {
   static char buf[2][128];
   static int t=0;
@@ -258,93 +185,6 @@
 
 
 /*
-** When a real-life interrupt comes in here, we try to find out
-** which host card it belongs to, and then service only that host
-** Notice the cunning way that, once we've found a candidate, we
-** continue just in case we are sharing interrupts.
-*/
-void
-riointr(p)
-struct rio_info *	p;
-{
-	int host;
-
-	for ( host=0; host<p->RIONumHosts; host++ ) {
-		struct Host *HostP = &p->RIOHosts[host];
-
-		rio_dprintk (RIO_DEBUG_INTR,  "riointr() doing host %d type %d\n", host, HostP->Type);
-
-		switch( HostP->Type ) {
-			case RIO_AT:
-			case RIO_MCA:
-			case RIO_PCI:
-			  	rio_spin_lock(&HostP->HostLock);
-				WBYTE(HostP->ResetInt , 0xff);
-				if ( !HostP->InIntr ) {
-					HostP->InIntr = 1;
-					rio_spin_unlock (&HostP->HostLock);
-					p->_RIO_Interrupted++;
-					RIOServiceHost(p, HostP, 'i');
-					rio_spin_lock(&HostP->HostLock);
-					HostP->InIntr = 0;
-				}
-				rio_spin_unlock(&HostP->HostLock); 
-				break;
-#ifdef FUTURE_RELEASE
-		case RIO_EISA:
-			if ( ivec == HostP->Ivec )
-			{
-				OldSpl = LOCKB( &HostP->HostLock );
-				INBZ( HostP->Slot, EISA_INTERRUPT_RESET );
-				if ( !HostP->InIntr )
-				{
-					HostP->InIntr = 1;
-					UNLOCKB( &HostP->HostLock, OldSpl );
-					if ( this_cpu < RIO_CPU_LIMIT )
-					{
-						int intrSpl = LOCKB( &RIOIntrLock );
-						UNLOCKB( &RIOIntrLock, intrSpl );
-					}
-						p->_RIO_Interrupted++;
-					RIOServiceHost( HostP, 'i' );
-					OldSpl = LOCKB( &HostP->HostLock );
-					HostP->InIntr = 0;
-				}
-				UNLOCKB( &HostP->HostLock, OldSpl );
-				done++;
-			}
-			break;
-#endif
-		}
-
-		HostP->IntSrvDone++;
-	}
-
-#ifdef FUTURE_RELEASE
-	if ( !done )
-	{
-		cmn_err( CE_WARN, "RIO: Interrupt received with vector 0x%x\n", ivec );
-		cmn_err( CE_CONT, "	 Valid vectors are:\n");
-		for ( host=0; host<RIONumHosts; host++ )
-		{
-			switch( RIOHosts[host].Type )
-			{
-				case RIO_AT:
-				case RIO_MCA:
-				case RIO_EISA:
-						cmn_err( CE_CONT, "0x%x ", RIOHosts[host].Ivec );
-						break;
-				case RIO_PCI:
-						cmn_err( CE_CONT, "0x%x ", get_intr_arg( RIOHosts[host].PciDevInfo.busnum, IDIST_PCI_IRQ( RIOHosts[host].PciDevInfo.slotnum, RIOHosts[host].PciDevInfo.funcnum ) ));
-						break;
-			}
-		}
-		cmn_err( CE_CONT, "\n" );
-	}
-#endif
-}
-
-/*
 ** RIO Host Service routine. Does all the work traditionally associated with an
 ** interrupt.
 */
@@ -710,7 +550,7 @@
 ** NB: Called with the tty locked. The spl from the lockb( ) is passed.
 ** we return the ttySpl level that we re-locked at.
 */
-void
+static void
 RIOReceive(p, PortP)
 struct rio_info *	p;
 struct Port *		PortP;
diff -Nru a/drivers/char/rio/rioroute.c b/drivers/char/rio/rioroute.c
--- a/drivers/char/rio/rioroute.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/char/rio/rioroute.c	2005-01-10 20:11:19 -08:00
@@ -83,6 +83,12 @@
 #include "list.h"
 #include "sam.h"
 
+static int RIOCheckIsolated(struct rio_info *, struct Host *, uint);
+static int RIOIsolate(struct rio_info *, struct Host *, uint);
+static int RIOCheck(struct Host *, uint);
+static void RIOConCon(struct rio_info *, struct Host *, uint, uint, uint, uint, int);
+
+
 /*
 ** Incoming on the ROUTE_RUP
 ** I wrote this while I was tired. Forgive me.
@@ -717,7 +723,7 @@
 ** the world about it. This is done to ensure that the configurator
 ** only gets up-to-date information about what is going on.
 */
-int
+static int
 RIOCheckIsolated(p, HostP, UnitId)
 struct rio_info *	p;
 struct Host *HostP;
@@ -747,7 +753,7 @@
 ** all the units attached to it. This will mean that the entire
 ** subnet will re-introduce itself.
 */
-int
+static int
 RIOIsolate(p, HostP, UnitId)
 struct rio_info *	p;
 struct Host *		HostP;
@@ -782,7 +788,7 @@
 	return 1;
 }
 
-int
+static int
 RIOCheck(HostP, UnitId)
 struct Host *HostP;
 uint UnitId;
@@ -883,7 +889,7 @@
 	return(0);
 }
 
-void
+static void
 RIOConCon(p, HostP, FromId, FromLink, ToId, ToLink, Change)
 struct rio_info *	p;
 struct Host *HostP;
@@ -966,7 +972,7 @@
 ** Delete and RTA entry from the saved table given to us
 ** by the configuration program.
 */
-int
+static int
 RIORemoveFromSavedTable(struct rio_info *p, struct Map *pMap)
 {
     int		entry;
@@ -993,7 +999,7 @@
 ** Scan the unit links to and return zero if the unit is completely
 ** disconnected.
 */
-int
+static int
 RIOFreeDisconnected(struct rio_info *p, struct Host *HostP, int unit)
 {
     int		link;
diff -Nru a/drivers/char/rio/riotable.c b/drivers/char/rio/riotable.c
--- a/drivers/char/rio/riotable.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/char/rio/riotable.c	2005-01-10 20:11:22 -08:00
@@ -37,6 +37,7 @@
 #include <linux/slab.h>
 #include <linux/errno.h>
 #include <linux/interrupt.h>
+#include <linux/string.h>
 
 #include <asm/io.h>
 #include <asm/system.h>
@@ -276,7 +277,7 @@
 						return -ENXIO;
 					}
 					rio_dprintk (RIO_DEBUG_TABLE, "RIONewTable: entering(9)\n"); 
-					if (RIOStrCmp(MapP->Name,
+					if (strcmp(MapP->Name,
 							p->RIOConnectTable[SubEnt].Name)==0 && !(MapP->Flags & RTA16_SECOND_SLOT)) { /* (9) */
 						rio_dprintk (RIO_DEBUG_TABLE, "RTA name %s used twice\n", MapP->Name);
 						p->RIOError.Error = NAME_USED_TWICE;
@@ -405,7 +406,7 @@
 			for ( Host2=0; Host2<p->RIONumHosts; Host2++ ) {
 				if (Host2 == Host)
 					continue;
-				if (RIOStrCmp(p->RIOHosts[Host].Name, p->RIOHosts[Host2].Name)
+				if (strcmp(p->RIOHosts[Host].Name, p->RIOHosts[Host2].Name)
 									 == 0) {
 					NameIsUnique = 0;
 					Host1++;
@@ -938,20 +939,6 @@
 		PortP->Lock			= 0;
 		PortP->Store		= 0;
 		PortP->FirstOpen	= 1;
-
-		/*
-		** handle the xprint issues
-		*/
-#ifdef XPRINT_SUPPORT
-		PortP->Xprint.XpActive	= 0;
-		PortP->Xprint.XttyP = &riox_tty[SysPort];
-		/*				TO				FROM			MAXLEN */
-		RIOStrNCpy( PortP->Xprint.XpOn,	RIOConf.XpOn,	MAX_XP_CTRL_LEN );
-		RIOStrNCpy( PortP->Xprint.XpOff, RIOConf.XpOff, MAX_XP_CTRL_LEN );
-		PortP->Xprint.XpCps = RIOConf.XpCps;
-		PortP->Xprint.XpLen = RIOStrlen(PortP->Xprint.XpOn)+
-									RIOStrlen(PortP->Xprint.XpOff);
-#endif
 
 		/*
 		** Buffers 'n things
diff -Nru a/drivers/char/rio/riotty.c b/drivers/char/rio/riotty.c
--- a/drivers/char/rio/riotty.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/char/rio/riotty.c	2005-01-10 20:11:18 -08:00
@@ -40,6 +40,7 @@
 #include <linux/slab.h>
 #include <linux/errno.h>
 #include <linux/tty.h>
+#include <linux/string.h>
 #include <asm/io.h>
 #include <asm/system.h>
 #include <asm/string.h>
@@ -97,6 +98,9 @@
 int RIOShortCommand(struct rio_info *p, struct Port *PortP, 
 			   int command, int len, int arg);
 
+#if 0
+static int RIOCookMode(struct ttystatics *);
+#endif
 
 extern int	conv_vb[];	/* now defined in ttymgr.c */
 extern int	conv_bv[];	/* now defined in ttymgr.c */
@@ -726,7 +730,8 @@
 ** COOK_WELL if the line discipline must be used to do the processing
 ** COOK_MEDIUM if the card can do all the processing necessary.
 */
-int
+#if 0
+static int
 RIOCookMode(struct ttystatics *tp)
 {
 	/*
@@ -757,7 +762,7 @@
 	*/
 	return COOK_MEDIUM;
 }
-
+#endif
 
 static void
 RIOClearUp(PortP)
@@ -1011,8 +1016,8 @@
 				pseterr(EFAULT);
 			}
 			PortP->Xprint.XpOn[MAX_XP_CTRL_LEN-1] = '\0';
-			PortP->Xprint.XpLen = RIOStrlen(PortP->Xprint.XpOn)+
-												RIOStrlen(PortP->Xprint.XpOff);
+			PortP->Xprint.XpLen = strlen(PortP->Xprint.XpOn)+
+												strlen(PortP->Xprint.XpOff);
 			rio_spin_unlock_irqrestore(&PortP->portSem, flags);
 			return 0;
 
@@ -1026,8 +1031,8 @@
 				pseterr(EFAULT);
 			}
 			PortP->Xprint.XpOff[MAX_XP_CTRL_LEN-1] = '\0';
-			PortP->Xprint.XpLen = RIOStrlen(PortP->Xprint.XpOn)+
-										RIOStrlen(PortP->Xprint.XpOff);
+			PortP->Xprint.XpLen = strlen(PortP->Xprint.XpOn)+
+										strlen(PortP->Xprint.XpOff);
 			rio_spin_unlock_irqrestore(&PortP->portSem, flags);
 			return 0;
 
diff -Nru a/drivers/char/rtc.c b/drivers/char/rtc.c
--- a/drivers/char/rtc.c	2005-01-10 20:11:24 -08:00
+++ b/drivers/char/rtc.c	2005-01-10 20:11:24 -08:00
@@ -177,7 +177,7 @@
 /*
  * rtc_task_lock nests inside rtc_lock.
  */
-static spinlock_t rtc_task_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(rtc_task_lock);
 static rtc_task_t *rtc_callback = NULL;
 #endif
 
@@ -878,7 +878,7 @@
 	&rtc_fops
 };
 
-#ifdef RTC_IRQ
+#if defined(RTC_IRQ) && !defined(__sparc__)
 static irqreturn_t (*rtc_int_handler_ptr)(int irq, void *dev_id, struct pt_regs *regs);
 #endif
 
diff -Nru a/drivers/char/scx200_gpio.c b/drivers/char/scx200_gpio.c
--- a/drivers/char/scx200_gpio.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/char/scx200_gpio.c	2005-01-10 20:11:15 -08:00
@@ -23,7 +23,7 @@
 MODULE_LICENSE("GPL");
 
 static int major = 0;		/* default to dynamic major */
-MODULE_PARM(major, "i");
+module_param(major, int, 0);
 MODULE_PARM_DESC(major, "Major device number");
 
 static ssize_t scx200_gpio_write(struct file *file, const char __user *data, 
diff -Nru a/drivers/char/sonypi.c b/drivers/char/sonypi.c
--- a/drivers/char/sonypi.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/char/sonypi.c	2005-01-10 20:11:21 -08:00
@@ -536,8 +536,10 @@
 		ret++;
 	}
 
-	if (ret > 0)
-		file->f_dentry->d_inode->i_atime = CURRENT_TIME;
+	if (ret > 0) {
+		struct inode *inode = file->f_dentry->d_inode;
+		inode->i_atime = current_fs_time(inode->i_sb);
+	}
 
 	return ret;
 }
@@ -737,7 +739,7 @@
 	sonypi_device.model = pcidev ?
 		SONYPI_DEVICE_MODEL_TYPE1 : SONYPI_DEVICE_MODEL_TYPE2;
 
-	sonypi_device.fifo_lock = SPIN_LOCK_UNLOCKED;
+	spin_lock_init(&sonypi_device.fifo_lock);
 	sonypi_device.fifo = kfifo_alloc(SONYPI_BUF_SIZE, GFP_KERNEL,
 					 &sonypi_device.fifo_lock);
 	if (IS_ERR(sonypi_device.fifo)) {
@@ -850,7 +852,7 @@
 		printk(KERN_INFO "%s input method installed.\n",
 		       sonypi_device.input_key_dev.name);
 
-		sonypi_device.input_fifo_lock = SPIN_LOCK_UNLOCKED;
+		spin_lock_init(&sonypi_device.input_fifo_lock);
 		sonypi_device.input_fifo =
 			kfifo_alloc(SONYPI_BUF_SIZE, GFP_KERNEL,
 				    &sonypi_device.input_fifo_lock);
diff -Nru a/drivers/char/synclink.c b/drivers/char/synclink.c
--- a/drivers/char/synclink.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/char/synclink.c	2005-01-10 20:11:18 -08:00
@@ -886,16 +886,16 @@
 static int txdmabufs[MAX_TOTAL_DEVICES];
 static int txholdbufs[MAX_TOTAL_DEVICES];
 	
-MODULE_PARM(break_on_load,"i");
-MODULE_PARM(ttymajor,"i");
-MODULE_PARM(io,"1-" __MODULE_STRING(MAX_ISA_DEVICES) "i");
-MODULE_PARM(irq,"1-" __MODULE_STRING(MAX_ISA_DEVICES) "i");
-MODULE_PARM(dma,"1-" __MODULE_STRING(MAX_ISA_DEVICES) "i");
-MODULE_PARM(debug_level,"i");
-MODULE_PARM(maxframe,"1-" __MODULE_STRING(MAX_TOTAL_DEVICES) "i");
-MODULE_PARM(dosyncppp,"1-" __MODULE_STRING(MAX_TOTAL_DEVICES) "i");
-MODULE_PARM(txdmabufs,"1-" __MODULE_STRING(MAX_TOTAL_DEVICES) "i");
-MODULE_PARM(txholdbufs,"1-" __MODULE_STRING(MAX_TOTAL_DEVICES) "i");
+module_param(break_on_load, bool, 0);
+module_param(ttymajor, int, 0);
+module_param_array(io, int, NULL, 0);
+module_param_array(irq, int, NULL, 0);
+module_param_array(dma, int, NULL, 0);
+module_param(debug_level, int, 0);
+module_param_array(maxframe, int, NULL, 0);
+module_param_array(dosyncppp, int, NULL, 0);
+module_param_array(txdmabufs, int, NULL, 0);
+module_param_array(txholdbufs, int, NULL, 0);
 
 static char *driver_name = "SyncLink serial driver";
 static char *driver_version = "$Revision: 4.28 $";
diff -Nru a/drivers/char/synclinkmp.c b/drivers/char/synclinkmp.c
--- a/drivers/char/synclinkmp.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/char/synclinkmp.c	2005-01-10 20:11:17 -08:00
@@ -480,11 +480,11 @@
 static int maxframe[MAX_DEVICES] = {0,};
 static int dosyncppp[MAX_DEVICES] = {0,};
 
-MODULE_PARM(break_on_load,"i");
-MODULE_PARM(ttymajor,"i");
-MODULE_PARM(debug_level,"i");
-MODULE_PARM(maxframe,"1-" __MODULE_STRING(MAX_DEVICES) "i");
-MODULE_PARM(dosyncppp,"1-" __MODULE_STRING(MAX_DEVICES) "i");
+module_param(break_on_load, bool, 0);
+module_param(ttymajor, int, 0);
+module_param(debug_level, int, 0);
+module_param_array(maxframe, int, NULL, 0);
+module_param_array(dosyncppp, int, NULL, 0);
 
 static char *driver_name = "SyncLink MultiPort driver";
 static char *driver_version = "$Revision: 4.29 $";
diff -Nru a/drivers/char/sysrq.c b/drivers/char/sysrq.c
--- a/drivers/char/sysrq.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/char/sysrq.c	2005-01-10 20:11:22 -08:00
@@ -98,6 +98,7 @@
 static void sysrq_handle_reboot(int key, struct pt_regs *pt_regs,
 				struct tty_struct *tty) 
 {
+	local_irq_enable();
 	machine_restart(NULL);
 }
 
@@ -228,7 +229,7 @@
 };
 
 /* Key Operations table and lock */
-static spinlock_t sysrq_key_table_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(sysrq_key_table_lock);
 #define SYSRQ_KEY_TABLE_LENGTH 36
 static struct sysrq_key_op *sysrq_key_table[SYSRQ_KEY_TABLE_LENGTH] = {
 /* 0 */	&sysrq_loglevel_op,
diff -Nru a/drivers/char/tipar.c b/drivers/char/tipar.c
--- a/drivers/char/tipar.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/char/tipar.c	2005-01-10 20:11:21 -08:00
@@ -40,10 +40,10 @@
  * the minor number.
  *
  */
-
+#undef DEBUG				/* change to #define to get debugging
+					 * output - for pr_debug() */
 #include <linux/config.h>
 #include <linux/module.h>
-#include <linux/version.h>
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
@@ -57,7 +57,7 @@
 #include <asm/io.h>
 #include <linux/bitops.h>
 #include <linux/devfs_fs_kernel.h>	/* DevFs support */
-#include <linux/parport.h>	/* Our code depend on parport */
+#include <linux/parport.h>		/* Our code depend on parport */
 #include <linux/device.h>
 
 /*
@@ -74,9 +74,6 @@
 #define DRIVER_LICENSE "GPL"
 
 #define VERSION(ver,rel,seq) (((ver)<<16) | ((rel)<<8) | (seq))
-#if LINUX_VERSION_CODE < VERSION(2,5,0)
-# define need_resched() (current->need_resched)
-#endif
 
 /* ----- global variables --------------------------------------------- */
 
@@ -143,7 +140,7 @@
 static int
 put_ti_parallel(int minor, unsigned char data)
 {
-	int bit;
+	unsigned int bit;
 	unsigned long max;
 
 	for (bit = 0; bit < 8; bit++) {
@@ -187,7 +184,7 @@
 static int
 get_ti_parallel(int minor)
 {
-	int bit;
+	unsigned int bit;
 	unsigned char v, data = 0;
 	unsigned long max;
 
@@ -234,7 +231,8 @@
 		outbyte(3, minor);
 		outbyte(i, minor);
 		udelay(delay);
-		/*printk(KERN_DEBUG "Probing -> %i: 0x%02x 0x%02x\n", i, data & 0x30, seq[i]); */
+		pr_debug("tipar: Probing -> %i: 0x%02x 0x%02x\n", i,
+			data & 0x30, seq[i]);
 		if ((inbyte(minor) & 0x30) != seq[i]) {
 			outbyte(3, minor);
 			return -1;
@@ -279,7 +277,8 @@
 }
 
 static ssize_t
-tipar_write(struct file *file, const char __user *buf, size_t count, loff_t * ppos)
+tipar_write (struct file *file, const char __user *buf, size_t count,
+		loff_t * ppos)
 {
 	unsigned int minor = iminor(file->f_dentry->d_inode) - TIPAR_MINOR;
 	ssize_t n;
@@ -405,7 +404,8 @@
 		if (ints[1] != 0)
                         timeout = ints[1];
                 else
-                        printk("tipar: wrong timeout value (0), using default value instead.");
+                        printk(KERN_WARNING "tipar: bad timeout value (0), "
+				"using default value instead");
 		if (ints[0] > 1) {
 			delay = ints[2];
 		}
@@ -436,8 +436,8 @@
 		goto out;
 	}
 
-	class_simple_device_add(tipar_class, MKDEV(TIPAR_MAJOR, TIPAR_MINOR + nr),
-			NULL, "par%d", nr);
+	class_simple_device_add(tipar_class, MKDEV(TIPAR_MAJOR,
+			TIPAR_MINOR + nr), NULL, "par%d", nr);
 	/* Use devfs, tree: /dev/ticables/par/[0..2] */
 	err = devfs_mk_cdev(MKDEV(TIPAR_MAJOR, TIPAR_MINOR + nr),
 			S_IFCHR | S_IRUGO | S_IWUGO,
@@ -446,14 +446,13 @@
 		goto out_class;
 
 	/* Display informations */
-	printk(KERN_INFO "tipar%d: using %s (%s).\n", nr, port->name,
-	       (port->irq ==
+	pr_info("tipar%d: using %s (%s)\n", nr, port->name, (port->irq ==
 		PARPORT_IRQ_NONE) ? "polling" : "interrupt-driven");
 
 	if (probe_ti_parallel(nr) != -1)
-		printk("tipar%d: link cable found !\n", nr);
+		pr_info("tipar%d: link cable found\n", nr);
 	else
-		printk("tipar%d: link cable not found.\n", nr);
+		pr_info("tipar%d: link cable not found\n", nr);
 
 	err = 0;
 	goto out;
@@ -469,7 +468,7 @@
 tipar_attach(struct parport *port)
 {
 	if (tp_count == PP_NO) {
-		printk("tipar: ignoring parallel port (max. %d)\n", PP_NO);
+		pr_info("tipar: ignoring parallel port (max. %d)\n", PP_NO);
 		return;
 	}
 
@@ -494,11 +493,11 @@
 {
 	int err = 0;
 
-	printk("tipar: parallel link cable driver, version %s\n",
-	       DRIVER_VERSION);
+	pr_info("tipar: parallel link cable driver, version %s\n",
+		DRIVER_VERSION);
 
 	if (register_chrdev(TIPAR_MAJOR, "tipar", &tipar_fops)) {
-		printk("tipar: unable to get major %d\n", TIPAR_MAJOR);
+		printk(KERN_ERR "tipar: unable to get major %d\n", TIPAR_MAJOR);
 		err = -EIO;
 		goto out;
 	}
@@ -512,7 +511,7 @@
 		goto out_chrdev;
 	}
 	if (parport_register_driver(&tipar_driver)) {
-		printk("tipar: unable to register with parport\n");
+		printk(KERN_ERR "tipar: unable to register with parport\n");
 		err = -EIO;
 		goto out;
 	}
@@ -546,7 +545,7 @@
 	class_simple_destroy(tipar_class);
 	devfs_remove("ticables/par");
 
-	printk("tipar: module unloaded !\n");
+	pr_info("tipar: module unloaded\n");
 }
 
 /* --------------------------------------------------------------------- */
@@ -559,7 +558,7 @@
 MODULE_DESCRIPTION(DRIVER_DESC);
 MODULE_LICENSE(DRIVER_LICENSE);
 
-MODULE_PARM(timeout, "i");
+module_param(timeout, int, 0);
 MODULE_PARM_DESC(timeout, "Timeout (default=1.5 seconds)");
-MODULE_PARM(delay, "i");
+module_param(delay, int, 0);
 MODULE_PARM_DESC(delay, "Inter-bit delay (default=10 microseconds)");
diff -Nru a/drivers/char/toshiba.c b/drivers/char/toshiba.c
--- a/drivers/char/toshiba.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/char/toshiba.c	2005-01-10 20:11:22 -08:00
@@ -81,7 +81,7 @@
 
 static int tosh_fn = 0;
 
-MODULE_PARM(tosh_fn, "i");
+module_param(tosh_fn, int, 0);
 
 
 static int tosh_ioctl(struct inode *, struct file *, unsigned int,
diff -Nru a/drivers/char/tty_io.c b/drivers/char/tty_io.c
--- a/drivers/char/tty_io.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/char/tty_io.c	2005-01-10 20:11:20 -08:00
@@ -249,7 +249,7 @@
  *	callers who will do ldisc lookups and cannot sleep.
  */
  
-static spinlock_t tty_ldisc_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(tty_ldisc_lock);
 static DECLARE_WAIT_QUEUE_HEAD(tty_ldisc_wait);
 static struct tty_ldisc tty_ldiscs[NR_LDISCS];	/* line disc dispatch table	*/
 
@@ -690,7 +690,7 @@
 	.release	= tty_release,
 };
 
-static spinlock_t redirect_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(redirect_lock);
 static struct file *redirect;
 
 /**
@@ -918,9 +918,11 @@
 
 	lock_kernel();
 
+	down(&tty_sem);
 	tty = current->signal->tty;
 	if (tty) {
 		tty_pgrp = tty->pgrp;
+		up(&tty_sem);
 		if (on_exit && tty->driver->type != TTY_DRIVER_TYPE_PTY)
 			tty_vhangup(tty);
 	} else {
@@ -928,6 +930,7 @@
 			kill_pg(current->signal->tty_old_pgrp, SIGHUP, on_exit);
 			kill_pg(current->signal->tty_old_pgrp, SIGCONT, on_exit);
 		}
+		up(&tty_sem);
 		unlock_kernel();	
 		return;
 	}
@@ -937,15 +940,19 @@
 			kill_pg(tty_pgrp, SIGCONT, on_exit);
 	}
 
+	/* Must lock changes to tty_old_pgrp */
+	down(&tty_sem);
 	current->signal->tty_old_pgrp = 0;
 	tty->session = 0;
 	tty->pgrp = -1;
 
+	/* Now clear signal->tty under the lock */
 	read_lock(&tasklist_lock);
 	do_each_task_pid(current->signal->session, PIDTYPE_SID, p) {
 		p->signal->tty = NULL;
 	} while_each_task_pid(current->signal->session, PIDTYPE_SID, p);
 	read_unlock(&tasklist_lock);
+	up(&tty_sem);
 	unlock_kernel();
 }
 
@@ -1011,7 +1018,7 @@
 	tty_ldisc_deref(ld);
 	unlock_kernel();
 	if (i > 0)
-		inode->i_atime = CURRENT_TIME;
+		inode->i_atime = current_fs_time(inode->i_sb);
 	return i;
 }
 
@@ -1088,7 +1095,8 @@
 		cond_resched();
 	}
 	if (written) {
-		file->f_dentry->d_inode->i_mtime = CURRENT_TIME;
+		struct inode *inode = file->f_dentry->d_inode;
+		inode->i_mtime = current_fs_time(inode->i_sb);
 		ret = written;
 	}
 	up(&tty->atomic_write);
@@ -1171,12 +1179,6 @@
 	struct termios *ltp, **ltp_loc, *o_ltp, **o_ltp_loc;
 	int retval=0;
 
-	/* 
-	 * Check whether we need to acquire the tty semaphore to avoid
-	 * race conditions.  For now, play it safe.
-	 */
-	down(&tty_sem);
-
 	/* check whether we're reopening an existing tty */
 	if (driver->flags & TTY_DRIVER_DEVPTS_MEM) {
 		tty = devpts_get_tty(idx);
@@ -1365,7 +1367,6 @@
 	
 	/* All paths come through here to release the semaphore */
 end_init:
-	up(&tty_sem);
 	return retval;
 
 	/* Release locally allocated memory ... nothing placed in slots */
@@ -1561,9 +1562,14 @@
 	 * each iteration we avoid any problems.
 	 */
 	while (1) {
+		/* Guard against races with tty->count changes elsewhere and
+		   opens on /dev/tty */
+		   
+		down(&tty_sem);
 		tty_closing = tty->count <= 1;
 		o_tty_closing = o_tty &&
 			(o_tty->count <= (pty_master ? 1 : 0));
+		up(&tty_sem);
 		do_sleep = 0;
 
 		if (tty_closing) {
@@ -1599,6 +1605,8 @@
 	 * both sides, and we've completed the last operation that could 
 	 * block, so it's safe to proceed with closing.
 	 */
+	 
+	down(&tty_sem);
 	if (pty_master) {
 		if (--o_tty->count < 0) {
 			printk(KERN_WARNING "release_dev: bad pty slave count "
@@ -1612,7 +1620,8 @@
 		       tty->count, tty_name(tty, buf));
 		tty->count = 0;
 	}
-
+	up(&tty_sem);
+	
 	/*
 	 * We've decremented tty->count, so we need to remove this file
 	 * descriptor off the tty->tty_files list; this serves two
@@ -1759,10 +1768,14 @@
 	noctty = filp->f_flags & O_NOCTTY;
 	index  = -1;
 	retval = 0;
+	
+	down(&tty_sem);
 
 	if (device == MKDEV(TTYAUX_MAJOR,0)) {
-		if (!current->signal->tty)
+		if (!current->signal->tty) {
+			up(&tty_sem);
 			return -ENXIO;
+		}
 		driver = current->signal->tty->driver;
 		index = current->signal->tty->index;
 		filp->f_flags |= O_NONBLOCK; /* Don't let /dev/tty block */
@@ -1787,14 +1800,18 @@
 			noctty = 1;
 			goto got_driver;
 		}
+		up(&tty_sem);
 		return -ENODEV;
 	}
 
 	driver = get_tty_driver(device, &index);
-	if (!driver)
+	if (!driver) {
+		up(&tty_sem);
 		return -ENODEV;
+	}
 got_driver:
 	retval = init_dev(driver, index, &tty);
+	up(&tty_sem);
 	if (retval)
 		return retval;
 
@@ -1880,7 +1897,10 @@
 	}
 	up(&allocated_ptys_lock);
 
+	down(&tty_sem);
 	retval = init_dev(ptm_driver, index, &tty);
+	up(&tty_sem);
+	
 	if (retval)
 		goto out;
 
@@ -2903,8 +2923,8 @@
 	   So I haven't moved it. dwmw2 */
         rs_360_init();
 #endif
-	call = &__con_initcall_start;
-	while (call < &__con_initcall_end) {
+	call = __con_initcall_start;
+	while (call < __con_initcall_end) {
 		(*call)();
 		call++;
 	}
diff -Nru a/drivers/char/viocons.c b/drivers/char/viocons.c
--- a/drivers/char/viocons.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/char/viocons.c	2005-01-10 20:11:15 -08:00
@@ -61,8 +61,8 @@
 #define VIOCONS_KERN_WARN	KERN_WARNING "viocons: "
 #define VIOCONS_KERN_INFO	KERN_INFO "viocons: "
 
-static spinlock_t consolelock = SPIN_LOCK_UNLOCKED;
-static spinlock_t consoleloglock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(consolelock);
+static DEFINE_SPINLOCK(consoleloglock);
 
 #ifdef CONFIG_MAGIC_SYSRQ
 static int vio_sysrq_pressed;
diff -Nru a/drivers/char/vt.c b/drivers/char/vt.c
--- a/drivers/char/vt.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/char/vt.c	2005-01-10 20:11:22 -08:00
@@ -2824,7 +2824,7 @@
     	if (vesa_blank_mode)
 		sw->con_blank(vc_cons[currcons].d, vesa_blank_mode + 1, 0);
 }
-
+EXPORT_SYMBOL(do_blank_screen);
 
 /*
  * Called by timer as well as from vt_console_driver
@@ -2861,6 +2861,7 @@
 	set_palette(currcons);
 	set_cursor(fg_console);
 }
+EXPORT_SYMBOL(do_unblank_screen);
 
 /*
  * This is called by the outside world to cause a forced unblank, mostly for
diff -Nru a/drivers/char/watchdog/Kconfig b/drivers/char/watchdog/Kconfig
--- a/drivers/char/watchdog/Kconfig	2005-01-10 20:11:20 -08:00
+++ b/drivers/char/watchdog/Kconfig	2005-01-10 20:11:20 -08:00
@@ -93,6 +93,11 @@
 	  be built as a module by choosing M. The module will
 	  be called ixp4xx_wdt.
 
+	  Note: The internal IXP4xx watchdog does a soft CPU reset
+	  which doesn't reset any peripherals. There are circumstances
+	  where the watchdog will fail to reset the board correctly
+	  (e.g., if the boot ROM is in an unreadable state).
+
 	  Say N if you are unsure.
 
 config IXP2000_WATCHDOG
diff -Nru a/drivers/char/watchdog/alim7101_wdt.c b/drivers/char/watchdog/alim7101_wdt.c
--- a/drivers/char/watchdog/alim7101_wdt.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/char/watchdog/alim7101_wdt.c	2005-01-10 20:11:21 -08:00
@@ -12,6 +12,11 @@
  *  because this particular WDT has a very short timeout (1.6
  *  seconds) and it would be insane to count on any userspace
  *  daemon always getting scheduled within that time frame.
+ *
+ *  Additions:
+ *   Aug 23, 2004 - Added use_gpio module parameter for use on revision a1d PMUs
+ *                  found on very old cobalt hardware.
+ *                  -- Mike Waychison <michael.waychison@sun.com>
  */
 
 #include <linux/module.h>
@@ -38,6 +43,8 @@
 #define WDT_DISABLE 0x8C
 
 #define ALI_7101_WDT    0x92
+#define ALI_7101_GPIO   0x7D
+#define ALI_7101_GPIO_O 0x7E
 #define ALI_WDT_ARM     0x01
 
 /*
@@ -57,6 +64,10 @@
 module_param(timeout, int, 0);
 MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds. (1<=timeout<=3600, default=" __MODULE_STRING(WATCHDOG_TIMEOUT) ")");
 
+static int use_gpio = 0; /* Use the pic (for a1d revision alim7101) */
+module_param(use_gpio, int, 0);
+MODULE_PARM_DESC(use_gpio, "Use the gpio watchdog.  (required by old cobalt boards)");
+
 static void wdt_timer_ping(unsigned long);
 static struct timer_list timer;
 static unsigned long next_heartbeat;
@@ -90,6 +101,13 @@
 		pci_read_config_byte(alim7101_pmu, 0x92, &tmp);
 		pci_write_config_byte(alim7101_pmu, ALI_7101_WDT, (tmp & ~ALI_WDT_ARM));
 		pci_write_config_byte(alim7101_pmu, ALI_7101_WDT, (tmp | ALI_WDT_ARM));
+		if (use_gpio) {
+			pci_read_config_byte(alim7101_pmu, ALI_7101_GPIO_O, &tmp);
+			pci_write_config_byte(alim7101_pmu, ALI_7101_GPIO_O, tmp
+					| 0x20);
+			pci_write_config_byte(alim7101_pmu, ALI_7101_GPIO_O, tmp
+					& ~0x20);
+		}
 	} else {
 		printk(KERN_WARNING PFX "Heartbeat lost! Will not ping the watchdog\n");
 	}
@@ -106,11 +124,21 @@
 {
 	char	tmp;
 
-	pci_read_config_byte(alim7101_pmu, 0x92, &tmp);
-	if (writeval == WDT_ENABLE)
+	pci_read_config_byte(alim7101_pmu, ALI_7101_WDT, &tmp);
+	if (writeval == WDT_ENABLE) {
 		pci_write_config_byte(alim7101_pmu, ALI_7101_WDT, (tmp | ALI_WDT_ARM));
-	else
+		if (use_gpio) {
+			pci_read_config_byte(alim7101_pmu, ALI_7101_GPIO_O, &tmp);
+			pci_write_config_byte(alim7101_pmu, ALI_7101_GPIO_O, tmp & ~0x20);
+		}
+
+	} else {
 		pci_write_config_byte(alim7101_pmu, ALI_7101_WDT, (tmp & ~ALI_WDT_ARM));
+		if (use_gpio) {
+			pci_read_config_byte(alim7101_pmu, ALI_7101_GPIO_O, &tmp);
+			pci_write_config_byte(alim7101_pmu, ALI_7101_GPIO_O, tmp | 0x20);
+		}
+	}
 }
 
 static void wdt_startup(void)
@@ -334,7 +362,13 @@
 		return -EBUSY;
 	}
 	pci_read_config_byte(ali1543_south, 0x5e, &tmp);
-	if ((tmp & 0x1e) != 0x12) {
+	if ((tmp & 0x1e) == 0x00) {
+		if (!use_gpio) {
+			printk(KERN_INFO PFX "Detected old alim7101 revision 'a1d'.  If this is a cobalt board, set the 'use_gpio' module parameter.\n");
+			return -EBUSY;
+		} 
+		nowayout = 1;
+	} else if ((tmp & 0x1e) != 0x12 && (tmp & 0x1e) != 0x00) {
 		printk(KERN_INFO PFX "ALi 1543 South-Bridge does not have the correct revision number (???1001?) - WDT not set\n");
 		return -EBUSY;
 	}
@@ -362,6 +396,10 @@
 		printk(KERN_ERR PFX "cannot register reboot notifier (err=%d)\n",
 			rc);
 		goto err_out_miscdev;
+	}
+
+	if (nowayout) {
+		__module_get(THIS_MODULE);
 	}
 
 	printk(KERN_INFO PFX "WDT driver for ALi M7101 initialised. timeout=%d sec (nowayout=%d)\n",
diff -Nru a/drivers/char/watchdog/machzwd.c b/drivers/char/watchdog/machzwd.c
--- a/drivers/char/watchdog/machzwd.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/char/watchdog/machzwd.c	2005-01-10 20:11:17 -08:00
@@ -88,12 +88,6 @@
 	return inw(DATA_W);
 }
 
-static unsigned short zf_readb(unsigned char port)
-{
-	outb(port, INDEX);
-	return inb(DATA_B);
-}
-
 
 MODULE_AUTHOR("Fernando Fuganti <fuganti@conectiva.com.br>");
 MODULE_DESCRIPTION("MachZ ZF-Logic Watchdog driver");
@@ -155,13 +149,6 @@
 #endif
 
 
-/* STATUS register functions */
-
-static inline unsigned char zf_get_status(void)
-{
-	return zf_readb(STATUS);
-}
-
 static inline void zf_set_status(unsigned char new)
 {
 	zf_writeb(STATUS, new);
@@ -182,22 +169,6 @@
 
 
 /* WD#? counter functions */
-/*
- *	Just get current counter value
- */
-
-static inline unsigned short zf_get_timer(unsigned char n)
-{
-	switch(n){
-		case WD1:
-			return zf_readw(COUNTER_1);
-		case WD2:
-			return zf_readb(COUNTER_2);
-		default:
-			return 0;
-	}
-}
-
 /*
  *	Just set counter value
  */
diff -Nru a/drivers/char/watchdog/pcwd_usb.c b/drivers/char/watchdog/pcwd_usb.c
--- a/drivers/char/watchdog/pcwd_usb.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/char/watchdog/pcwd_usb.c	2005-01-10 20:11:17 -08:00
@@ -571,12 +571,6 @@
 	char fw_ver_str[20];
 	unsigned char option_switches, dummy;
 
-	/* See if the device offered us matches what we can accept */
-	if ((udev->descriptor.idVendor != USB_PCWD_VENDOR_ID) ||
-	    (udev->descriptor.idProduct != USB_PCWD_PRODUCT_ID)) {
-		return -ENODEV;
-	}
-
 	cards_found++;
 	if (cards_found > 1) {
 		printk(KERN_ERR PFX "This driver only supports 1 device\n");
@@ -621,7 +615,7 @@
 	usb_pcwd->udev = udev;
 	usb_pcwd->interface = interface;
 	usb_pcwd->interface_number = iface_desc->desc.bInterfaceNumber;
-	usb_pcwd->intr_size = (endpoint->wMaxPacketSize > 8 ? endpoint->wMaxPacketSize : 8);
+	usb_pcwd->intr_size = (le16_to_cpu(endpoint->wMaxPacketSize) > 8 ? le16_to_cpu(endpoint->wMaxPacketSize) : 8);
 
 	/* set up the memory buffer's */
 	if (!(usb_pcwd->intr_buffer = usb_buffer_alloc(udev, usb_pcwd->intr_size, SLAB_ATOMIC, &usb_pcwd->intr_dma))) {
diff -Nru a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/crypto/Kconfig	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,23 @@
+menu "Hardware crypto devices"
+
+config CRYPTO_DEV_PADLOCK
+	tristate "Support for VIA PadLock ACE"
+	depends on CRYPTO && X86 && !X86_64
+	help
+	  Some VIA processors come with an integrated crypto engine
+	  (so called VIA PadLock ACE, Advanced Cryptography Engine)
+	  that provides instructions for very fast {en,de}cryption 
+	  with some algorithms.
+	  
+	  The instructions are used only when the CPU supports them.
+	  Otherwise software encryption is used. If you are unsure,
+	  say Y.
+
+config CRYPTO_DEV_PADLOCK_AES
+	bool "Support for AES in VIA PadLock"
+	depends on CRYPTO_DEV_PADLOCK
+	default y
+	help
+	  Use VIA PadLock for AES algorithm.
+
+endmenu
diff -Nru a/drivers/crypto/Makefile b/drivers/crypto/Makefile
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/crypto/Makefile	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,7 @@
+
+obj-$(CONFIG_CRYPTO_DEV_PADLOCK) += padlock.o
+
+padlock-objs-$(CONFIG_CRYPTO_DEV_PADLOCK_AES) += padlock-aes.o
+
+padlock-objs := padlock-generic.o $(padlock-objs-y)
+
diff -Nru a/drivers/crypto/padlock-aes.c b/drivers/crypto/padlock-aes.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/crypto/padlock-aes.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,468 @@
+/* 
+ * Cryptographic API.
+ *
+ * Support for VIA PadLock hardware crypto engine.
+ *
+ * Copyright (c) 2004  Michal Ludvig <michal@logix.cz>
+ *
+ * Key expansion routine taken from crypto/aes.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) 2002, Dr Brian Gladman <brg@gladman.me.uk>, Worcester, UK.
+ * All rights reserved.
+ *
+ * LICENSE TERMS
+ *
+ * The free distribution and use of this software in both source and binary
+ * form is allowed (with or without changes) provided that:
+ *
+ *   1. distributions of this source code include the above copyright
+ *      notice, this list of conditions and the following disclaimer;
+ *
+ *   2. distributions in binary form include the above copyright
+ *      notice, this list of conditions and the following disclaimer
+ *      in the documentation and/or other associated materials;
+ *
+ *   3. the copyright holder's name is not used to endorse products
+ *      built using this software without specific written permission.
+ *
+ * ALTERNATIVELY, provided that this notice is retained in full, this product
+ * may be distributed under the terms of the GNU General Public License (GPL),
+ * in which case the provisions of the GPL apply INSTEAD OF those given above.
+ *
+ * DISCLAIMER
+ *
+ * This software is provided 'as is' with no explicit or implied warranties
+ * in respect of its properties, including, but not limited to, correctness
+ * and/or fitness for purpose.
+ * ---------------------------------------------------------------------------
+ */
+
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/types.h>
+#include <linux/errno.h>
+#include <linux/crypto.h>
+#include <linux/interrupt.h>
+#include <asm/byteorder.h>
+#include "padlock.h"
+
+#define AES_MIN_KEY_SIZE	16	/* in uint8_t units */
+#define AES_MAX_KEY_SIZE	32	/* ditto */
+#define AES_BLOCK_SIZE		16	/* ditto */
+#define AES_EXTENDED_KEY_SIZE	64	/* in uint32_t units */
+#define AES_EXTENDED_KEY_SIZE_B	(AES_EXTENDED_KEY_SIZE * sizeof(uint32_t))
+
+struct aes_ctx {
+	uint32_t e_data[AES_EXTENDED_KEY_SIZE+4];
+	uint32_t d_data[AES_EXTENDED_KEY_SIZE+4];
+	uint32_t *E;
+	uint32_t *D;
+	int key_length;
+};
+
+/* ====== Key management routines ====== */
+
+static inline uint32_t
+generic_rotr32 (const uint32_t x, const unsigned bits)
+{
+	const unsigned n = bits % 32;
+	return (x >> n) | (x << (32 - n));
+}
+
+static inline uint32_t
+generic_rotl32 (const uint32_t x, const unsigned bits)
+{
+	const unsigned n = bits % 32;
+	return (x << n) | (x >> (32 - n));
+}
+
+#define rotl generic_rotl32
+#define rotr generic_rotr32
+
+/*
+ * #define byte(x, nr) ((unsigned char)((x) >> (nr*8))) 
+ */
+static inline uint8_t
+byte(const uint32_t x, const unsigned n)
+{
+	return x >> (n << 3);
+}
+
+#define uint32_t_in(x) le32_to_cpu(*(const uint32_t *)(x))
+#define uint32_t_out(to, from) (*(uint32_t *)(to) = cpu_to_le32(from))
+
+#define E_KEY ctx->E
+#define D_KEY ctx->D
+
+static uint8_t pow_tab[256];
+static uint8_t log_tab[256];
+static uint8_t sbx_tab[256];
+static uint8_t isb_tab[256];
+static uint32_t rco_tab[10];
+static uint32_t ft_tab[4][256];
+static uint32_t it_tab[4][256];
+
+static uint32_t fl_tab[4][256];
+static uint32_t il_tab[4][256];
+
+static inline uint8_t
+f_mult (uint8_t a, uint8_t b)
+{
+	uint8_t aa = log_tab[a], cc = aa + log_tab[b];
+
+	return pow_tab[cc + (cc < aa ? 1 : 0)];
+}
+
+#define ff_mult(a,b)    (a && b ? f_mult(a, b) : 0)
+
+#define f_rn(bo, bi, n, k)					\
+    bo[n] =  ft_tab[0][byte(bi[n],0)] ^				\
+             ft_tab[1][byte(bi[(n + 1) & 3],1)] ^		\
+             ft_tab[2][byte(bi[(n + 2) & 3],2)] ^		\
+             ft_tab[3][byte(bi[(n + 3) & 3],3)] ^ *(k + n)
+
+#define i_rn(bo, bi, n, k)					\
+    bo[n] =  it_tab[0][byte(bi[n],0)] ^				\
+             it_tab[1][byte(bi[(n + 3) & 3],1)] ^		\
+             it_tab[2][byte(bi[(n + 2) & 3],2)] ^		\
+             it_tab[3][byte(bi[(n + 1) & 3],3)] ^ *(k + n)
+
+#define ls_box(x)				\
+    ( fl_tab[0][byte(x, 0)] ^			\
+      fl_tab[1][byte(x, 1)] ^			\
+      fl_tab[2][byte(x, 2)] ^			\
+      fl_tab[3][byte(x, 3)] )
+
+#define f_rl(bo, bi, n, k)					\
+    bo[n] =  fl_tab[0][byte(bi[n],0)] ^				\
+             fl_tab[1][byte(bi[(n + 1) & 3],1)] ^		\
+             fl_tab[2][byte(bi[(n + 2) & 3],2)] ^		\
+             fl_tab[3][byte(bi[(n + 3) & 3],3)] ^ *(k + n)
+
+#define i_rl(bo, bi, n, k)					\
+    bo[n] =  il_tab[0][byte(bi[n],0)] ^				\
+             il_tab[1][byte(bi[(n + 3) & 3],1)] ^		\
+             il_tab[2][byte(bi[(n + 2) & 3],2)] ^		\
+             il_tab[3][byte(bi[(n + 1) & 3],3)] ^ *(k + n)
+
+static void
+gen_tabs (void)
+{
+	uint32_t i, t;
+	uint8_t p, q;
+
+	/* log and power tables for GF(2**8) finite field with
+	   0x011b as modular polynomial - the simplest prmitive
+	   root is 0x03, used here to generate the tables */
+
+	for (i = 0, p = 1; i < 256; ++i) {
+		pow_tab[i] = (uint8_t) p;
+		log_tab[p] = (uint8_t) i;
+
+		p ^= (p << 1) ^ (p & 0x80 ? 0x01b : 0);
+	}
+
+	log_tab[1] = 0;
+
+	for (i = 0, p = 1; i < 10; ++i) {
+		rco_tab[i] = p;
+
+		p = (p << 1) ^ (p & 0x80 ? 0x01b : 0);
+	}
+
+	for (i = 0; i < 256; ++i) {
+		p = (i ? pow_tab[255 - log_tab[i]] : 0);
+		q = ((p >> 7) | (p << 1)) ^ ((p >> 6) | (p << 2));
+		p ^= 0x63 ^ q ^ ((q >> 6) | (q << 2));
+		sbx_tab[i] = p;
+		isb_tab[p] = (uint8_t) i;
+	}
+
+	for (i = 0; i < 256; ++i) {
+		p = sbx_tab[i];
+
+		t = p;
+		fl_tab[0][i] = t;
+		fl_tab[1][i] = rotl (t, 8);
+		fl_tab[2][i] = rotl (t, 16);
+		fl_tab[3][i] = rotl (t, 24);
+
+		t = ((uint32_t) ff_mult (2, p)) |
+		    ((uint32_t) p << 8) |
+		    ((uint32_t) p << 16) | ((uint32_t) ff_mult (3, p) << 24);
+
+		ft_tab[0][i] = t;
+		ft_tab[1][i] = rotl (t, 8);
+		ft_tab[2][i] = rotl (t, 16);
+		ft_tab[3][i] = rotl (t, 24);
+
+		p = isb_tab[i];
+
+		t = p;
+		il_tab[0][i] = t;
+		il_tab[1][i] = rotl (t, 8);
+		il_tab[2][i] = rotl (t, 16);
+		il_tab[3][i] = rotl (t, 24);
+
+		t = ((uint32_t) ff_mult (14, p)) |
+		    ((uint32_t) ff_mult (9, p) << 8) |
+		    ((uint32_t) ff_mult (13, p) << 16) |
+		    ((uint32_t) ff_mult (11, p) << 24);
+
+		it_tab[0][i] = t;
+		it_tab[1][i] = rotl (t, 8);
+		it_tab[2][i] = rotl (t, 16);
+		it_tab[3][i] = rotl (t, 24);
+	}
+}
+
+#define star_x(x) (((x) & 0x7f7f7f7f) << 1) ^ ((((x) & 0x80808080) >> 7) * 0x1b)
+
+#define imix_col(y,x)       \
+    u   = star_x(x);        \
+    v   = star_x(u);        \
+    w   = star_x(v);        \
+    t   = w ^ (x);          \
+   (y)  = u ^ v ^ w;        \
+   (y) ^= rotr(u ^ t,  8) ^ \
+          rotr(v ^ t, 16) ^ \
+          rotr(t,24)
+
+/* initialise the key schedule from the user supplied key */
+
+#define loop4(i)                                    \
+{   t = rotr(t,  8); t = ls_box(t) ^ rco_tab[i];    \
+    t ^= E_KEY[4 * i];     E_KEY[4 * i + 4] = t;    \
+    t ^= E_KEY[4 * i + 1]; E_KEY[4 * i + 5] = t;    \
+    t ^= E_KEY[4 * i + 2]; E_KEY[4 * i + 6] = t;    \
+    t ^= E_KEY[4 * i + 3]; E_KEY[4 * i + 7] = t;    \
+}
+
+#define loop6(i)                                    \
+{   t = rotr(t,  8); t = ls_box(t) ^ rco_tab[i];    \
+    t ^= E_KEY[6 * i];     E_KEY[6 * i + 6] = t;    \
+    t ^= E_KEY[6 * i + 1]; E_KEY[6 * i + 7] = t;    \
+    t ^= E_KEY[6 * i + 2]; E_KEY[6 * i + 8] = t;    \
+    t ^= E_KEY[6 * i + 3]; E_KEY[6 * i + 9] = t;    \
+    t ^= E_KEY[6 * i + 4]; E_KEY[6 * i + 10] = t;   \
+    t ^= E_KEY[6 * i + 5]; E_KEY[6 * i + 11] = t;   \
+}
+
+#define loop8(i)                                    \
+{   t = rotr(t,  8); ; t = ls_box(t) ^ rco_tab[i];  \
+    t ^= E_KEY[8 * i];     E_KEY[8 * i + 8] = t;    \
+    t ^= E_KEY[8 * i + 1]; E_KEY[8 * i + 9] = t;    \
+    t ^= E_KEY[8 * i + 2]; E_KEY[8 * i + 10] = t;   \
+    t ^= E_KEY[8 * i + 3]; E_KEY[8 * i + 11] = t;   \
+    t  = E_KEY[8 * i + 4] ^ ls_box(t);    \
+    E_KEY[8 * i + 12] = t;                \
+    t ^= E_KEY[8 * i + 5]; E_KEY[8 * i + 13] = t;   \
+    t ^= E_KEY[8 * i + 6]; E_KEY[8 * i + 14] = t;   \
+    t ^= E_KEY[8 * i + 7]; E_KEY[8 * i + 15] = t;   \
+}
+
+/* Tells whether the ACE is capable to generate
+   the extended key for a given key_len. */
+static inline int
+aes_hw_extkey_available(uint8_t key_len)
+{
+	/* TODO: We should check the actual CPU model/stepping
+	         as it's possible that the capability will be
+	         added in the next CPU revisions. */
+	if (key_len == 16)
+		return 1;
+	return 0;
+}
+
+static int
+aes_set_key(void *ctx_arg, const uint8_t *in_key, unsigned int key_len, uint32_t *flags)
+{
+	struct aes_ctx *ctx = ctx_arg;
+	uint32_t i, t, u, v, w;
+	uint32_t P[AES_EXTENDED_KEY_SIZE];
+	uint32_t rounds;
+
+	if (key_len != 16 && key_len != 24 && key_len != 32) {
+		*flags |= CRYPTO_TFM_RES_BAD_KEY_LEN;
+		return -EINVAL;
+	}
+
+	ctx->key_length = key_len;
+
+	ctx->E = ctx->e_data;
+	ctx->D = ctx->d_data;
+
+	/* Ensure 16-Bytes alignmentation of keys for VIA PadLock. */
+	if ((int)(ctx->e_data) & 0x0F)
+		ctx->E += 4 - (((int)(ctx->e_data) & 0x0F) / sizeof (ctx->e_data[0]));
+
+	if ((int)(ctx->d_data) & 0x0F)
+		ctx->D += 4 - (((int)(ctx->d_data) & 0x0F) / sizeof (ctx->d_data[0]));
+
+	E_KEY[0] = uint32_t_in (in_key);
+	E_KEY[1] = uint32_t_in (in_key + 4);
+	E_KEY[2] = uint32_t_in (in_key + 8);
+	E_KEY[3] = uint32_t_in (in_key + 12);
+
+	/* Don't generate extended keys if the hardware can do it. */
+	if (aes_hw_extkey_available(key_len))
+		return 0;
+
+	switch (key_len) {
+	case 16:
+		t = E_KEY[3];
+		for (i = 0; i < 10; ++i)
+			loop4 (i);
+		break;
+
+	case 24:
+		E_KEY[4] = uint32_t_in (in_key + 16);
+		t = E_KEY[5] = uint32_t_in (in_key + 20);
+		for (i = 0; i < 8; ++i)
+			loop6 (i);
+		break;
+
+	case 32:
+		E_KEY[4] = uint32_t_in (in_key + 16);
+		E_KEY[5] = uint32_t_in (in_key + 20);
+		E_KEY[6] = uint32_t_in (in_key + 24);
+		t = E_KEY[7] = uint32_t_in (in_key + 28);
+		for (i = 0; i < 7; ++i)
+			loop8 (i);
+		break;
+	}
+
+	D_KEY[0] = E_KEY[0];
+	D_KEY[1] = E_KEY[1];
+	D_KEY[2] = E_KEY[2];
+	D_KEY[3] = E_KEY[3];
+
+	for (i = 4; i < key_len + 24; ++i) {
+		imix_col (D_KEY[i], E_KEY[i]);
+	}
+
+	/* PadLock needs a different format of the decryption key. */
+	rounds = 10 + (key_len - 16) / 4;
+
+	for (i = 0; i < rounds; i++) {
+		P[((i + 1) * 4) + 0] = D_KEY[((rounds - i - 1) * 4) + 0];
+		P[((i + 1) * 4) + 1] = D_KEY[((rounds - i - 1) * 4) + 1];
+		P[((i + 1) * 4) + 2] = D_KEY[((rounds - i - 1) * 4) + 2];
+		P[((i + 1) * 4) + 3] = D_KEY[((rounds - i - 1) * 4) + 3];
+	}
+
+	P[0] = E_KEY[(rounds * 4) + 0];
+	P[1] = E_KEY[(rounds * 4) + 1];
+	P[2] = E_KEY[(rounds * 4) + 2];
+	P[3] = E_KEY[(rounds * 4) + 3];
+
+	memcpy(D_KEY, P, AES_EXTENDED_KEY_SIZE_B);
+
+	return 0;
+}
+
+/* ====== Encryption/decryption routines ====== */
+
+/* This is the real call to PadLock. */
+static inline void
+padlock_xcrypt_ecb(uint8_t *input, uint8_t *output, uint8_t *key,
+		   void *control_word, uint32_t count)
+{
+	asm volatile ("pushfl; popfl");		/* enforce key reload. */
+	asm volatile (".byte 0xf3,0x0f,0xa7,0xc8"	/* rep xcryptecb */
+		      : "+S"(input), "+D"(output)
+		      : "d"(control_word), "b"(key), "c"(count));
+}
+
+static void
+aes_padlock(void *ctx_arg, uint8_t *out_arg, const uint8_t *in_arg, int encdec)
+{
+	/* Don't blindly modify this structure - the items must 
+	   fit on 16-Bytes boundaries! */
+	struct padlock_xcrypt_data {
+		uint8_t buf[AES_BLOCK_SIZE];
+		union cword cword;
+	};
+
+	struct aes_ctx *ctx = ctx_arg;
+	char bigbuf[sizeof(struct padlock_xcrypt_data) + 16];
+	struct padlock_xcrypt_data *data;
+	void *key;
+
+	/* Place 'data' at the first 16-Bytes aligned address in 'bigbuf'. */
+	if (((long)bigbuf) & 0x0F)
+		data = (void*)(bigbuf + 16 - ((long)bigbuf & 0x0F));
+	else
+		data = (void*)bigbuf;
+
+	/* Prepare Control word. */
+	memset (data, 0, sizeof(struct padlock_xcrypt_data));
+	data->cword.b.encdec = !encdec;	/* in the rest of cryptoapi ENC=1/DEC=0 */
+	data->cword.b.rounds = 10 + (ctx->key_length - 16) / 4;
+	data->cword.b.ksize = (ctx->key_length - 16) / 8;
+
+	/* Is the hardware capable to generate the extended key? */
+	if (!aes_hw_extkey_available(ctx->key_length))
+		data->cword.b.keygen = 1;
+
+	/* ctx->E starts with a plain key - if the hardware is capable
+	   to generate the extended key itself we must supply
+	   the plain key for both Encryption and Decryption. */
+	if (encdec == CRYPTO_DIR_ENCRYPT || data->cword.b.keygen == 0)
+		key = ctx->E;
+	else
+		key = ctx->D;
+	
+	memcpy(data->buf, in_arg, AES_BLOCK_SIZE);
+	padlock_xcrypt_ecb(data->buf, data->buf, key, &data->cword, 1);
+	memcpy(out_arg, data->buf, AES_BLOCK_SIZE);
+}
+
+static void
+aes_encrypt(void *ctx_arg, uint8_t *out, const uint8_t *in)
+{
+	aes_padlock(ctx_arg, out, in, CRYPTO_DIR_ENCRYPT);
+}
+
+static void
+aes_decrypt(void *ctx_arg, uint8_t *out, const uint8_t *in)
+{
+	aes_padlock(ctx_arg, out, in, CRYPTO_DIR_DECRYPT);
+}
+
+static struct crypto_alg aes_alg = {
+	.cra_name		=	"aes",
+	.cra_flags		=	CRYPTO_ALG_TYPE_CIPHER,
+	.cra_blocksize		=	AES_BLOCK_SIZE,
+	.cra_ctxsize		=	sizeof(struct aes_ctx),
+	.cra_module		=	THIS_MODULE,
+	.cra_list		=	LIST_HEAD_INIT(aes_alg.cra_list),
+	.cra_u			=	{
+		.cipher = {
+			.cia_min_keysize	=	AES_MIN_KEY_SIZE,
+			.cia_max_keysize	=	AES_MAX_KEY_SIZE,
+			.cia_setkey	   	= 	aes_set_key,
+			.cia_encrypt	 	=	aes_encrypt,
+			.cia_decrypt	  	=	aes_decrypt
+		}
+	}
+};
+
+int __init padlock_init_aes(void)
+{
+	printk(KERN_NOTICE PFX "Using VIA PadLock ACE for AES algorithm.\n");
+
+	gen_tabs();
+	return crypto_register_alg(&aes_alg);
+}
+
+void __exit padlock_fini_aes(void)
+{
+	crypto_unregister_alg(&aes_alg);
+}
diff -Nru a/drivers/crypto/padlock-generic.c b/drivers/crypto/padlock-generic.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/crypto/padlock-generic.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,63 @@
+/* 
+ * Cryptographic API.
+ *
+ * Support for VIA PadLock hardware crypto engine.
+ *
+ * Copyright (c) 2004  Michal Ludvig <michal@logix.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.
+ */
+
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/types.h>
+#include <linux/errno.h>
+#include <linux/crypto.h>
+#include <asm/byteorder.h>
+#include "padlock.h"
+
+static int __init
+padlock_init(void)
+{
+	int ret = -ENOSYS;
+	
+	if (!cpu_has_xcrypt) {
+		printk(KERN_ERR PFX "VIA PadLock not detected.\n");
+		return -ENODEV;
+	}
+
+	if (!cpu_has_xcrypt_enabled) {
+		printk(KERN_ERR PFX "VIA PadLock detected, but not enabled. Hmm, strange...\n");
+		return -ENODEV;
+	}
+
+#ifdef CONFIG_CRYPTO_DEV_PADLOCK_AES
+	if ((ret = padlock_init_aes())) {
+		printk(KERN_ERR PFX "VIA PadLock AES initialization failed.\n");
+		return ret;
+	}
+#endif
+
+	if (ret == -ENOSYS)
+		printk(KERN_ERR PFX "Hmm, VIA PadLock was compiled without any algorithm.\n");
+
+	return ret;
+}
+
+static void __exit
+padlock_fini(void)
+{
+#ifdef CONFIG_CRYPTO_DEV_PADLOCK_AES
+	padlock_fini_aes();
+#endif
+}
+
+module_init(padlock_init);
+module_exit(padlock_fini);
+
+MODULE_DESCRIPTION("VIA PadLock crypto engine support.");
+MODULE_LICENSE("Dual BSD/GPL");
+MODULE_AUTHOR("Michal Ludvig");
diff -Nru a/drivers/crypto/padlock.h b/drivers/crypto/padlock.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/crypto/padlock.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,36 @@
+/*
+ * Driver for VIA PadLock
+ *
+ * Copyright (c) 2004 Michal Ludvig <michal@logix.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.
+ *
+ */
+
+#ifndef _CRYPTO_PADLOCK_H
+#define _CRYPTO_PADLOCK_H
+
+/* Control word. */
+union cword {
+	uint32_t cword[4];
+	struct {
+		int rounds:4;
+		int algo:3;
+		int keygen:1;
+		int interm:1;
+		int encdec:1;
+		int ksize:2;
+	} b;
+};
+
+#define PFX	"padlock: "
+
+#ifdef CONFIG_CRYPTO_DEV_PADLOCK_AES
+int padlock_init_aes(void);
+void padlock_fini_aes(void);
+#endif
+
+#endif	/* _CRYPTO_PADLOCK_H */
diff -Nru a/drivers/eisa/Makefile b/drivers/eisa/Makefile
--- a/drivers/eisa/Makefile	2005-01-10 20:11:19 -08:00
+++ b/drivers/eisa/Makefile	2005-01-10 20:11:19 -08:00
@@ -1,8 +1,5 @@
 # Makefile for the Linux device tree
 
-# Being anal sometimes saves a crash/reboot cycle... ;-)
-EXTRA_CFLAGS    := -Werror
-
 obj-$(CONFIG_EISA)	        += eisa-bus.o
 obj-${CONFIG_EISA_PCI_EISA}     += pci_eisa.o
 
diff -Nru a/drivers/firmware/pcdp.c b/drivers/firmware/pcdp.c
--- a/drivers/firmware/pcdp.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/firmware/pcdp.c	2005-01-10 20:11:17 -08:00
@@ -98,44 +98,3 @@
 
 	return -ENODEV;
 }
-
-#ifdef CONFIG_IA64_EARLY_PRINTK_UART
-unsigned long
-hcdp_early_uart (void)
-{
-	efi_system_table_t *systab;
-	efi_config_table_t *config_tables;
-	unsigned long addr = 0;
-	struct pcdp *pcdp = 0;
-	struct pcdp_uart *uart;
-	int i;
-
-	systab = (efi_system_table_t *) ia64_boot_param->efi_systab;
-	if (!systab)
-		return 0;
-	systab = __va(systab);
-
-	config_tables = (efi_config_table_t *) systab->tables;
-	if (!config_tables)
-		return 0;
-	config_tables = __va(config_tables);
-
-	for (i = 0; i < systab->nr_tables; i++) {
-		if (efi_guidcmp(config_tables[i].guid, HCDP_TABLE_GUID) == 0) {
-			pcdp = (struct pcdp *) config_tables[i].table;
-			break;
-		}
-	}
-	if (!pcdp)
-		return 0;
-	pcdp = __va(pcdp);
-
-	for (i = 0, uart = pcdp->uart; i < pcdp->num_uarts; i++, uart++) {
-		if (uart->type == PCDP_CONSOLE_UART) {
-			addr = uart->addr.address;
-			break;
-		}
-	}
-	return addr;
-}
-#endif /* CONFIG_IA64_EARLY_PRINTK_UART */
diff -Nru a/drivers/i2c/algos/Kconfig b/drivers/i2c/algos/Kconfig
--- a/drivers/i2c/algos/Kconfig	2005-01-10 20:11:24 -08:00
+++ b/drivers/i2c/algos/Kconfig	2005-01-10 20:11:24 -08:00
@@ -53,5 +53,18 @@
 	tristate "MPC8xx CPM I2C interface"
 	depends on 8xx && I2C
 
+config I2C_ALGO_SIBYTE
+	tristate "SiByte SMBus interface"
+	depends on SIBYTE_SB1xxx_SOC && I2C
+	help
+	  Supports the SiByte SOC on-chip I2C interfaces (2 channels).
+
+config I2C_ALGO_SGI
+	tristate "I2C SGI interfaces"
+	depends on I2C && (SGI_IP22 || SGI_IP32 || X86_VISWS)
+	help
+	  Supports the SGI interfaces like the ones found on SGI Indy VINO
+	  or SGI O2 MACE.
+
 endmenu
 
diff -Nru a/drivers/i2c/algos/Makefile b/drivers/i2c/algos/Makefile
--- a/drivers/i2c/algos/Makefile	2005-01-10 20:11:21 -08:00
+++ b/drivers/i2c/algos/Makefile	2005-01-10 20:11:21 -08:00
@@ -6,6 +6,8 @@
 obj-$(CONFIG_I2C_ALGOPCF)	+= i2c-algo-pcf.o
 obj-$(CONFIG_I2C_ALGOPCA)	+= i2c-algo-pca.o
 obj-$(CONFIG_I2C_ALGOITE)	+= i2c-algo-ite.o
+obj-$(CONFIG_I2C_ALGO_SIBYTE)	+= i2c-algo-sibyte.o
+obj-$(CONFIG_I2C_ALGO_SGI)	+= i2c-algo-sgi.o
 
 ifeq ($(CONFIG_I2C_DEBUG_ALGO),y)
 EXTRA_CFLAGS += -DDEBUG
diff -Nru a/drivers/i2c/algos/i2c-algo-bit.c b/drivers/i2c/algos/i2c-algo-bit.c
--- a/drivers/i2c/algos/i2c-algo-bit.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/i2c/algos/i2c-algo-bit.c	2005-01-10 20:11:19 -08:00
@@ -511,8 +511,8 @@
 
 static u32 bit_func(struct i2c_adapter *adap)
 {
-	return I2C_FUNC_SMBUS_EMUL | I2C_FUNC_10BIT_ADDR | 
-	       I2C_FUNC_PROTOCOL_MANGLING;
+	return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL | 
+	       I2C_FUNC_10BIT_ADDR | I2C_FUNC_PROTOCOL_MANGLING;
 }
 
 
diff -Nru a/drivers/i2c/algos/i2c-algo-pca.c b/drivers/i2c/algos/i2c-algo-pca.c
--- a/drivers/i2c/algos/i2c-algo-pca.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/i2c/algos/i2c-algo-pca.c	2005-01-10 20:11:21 -08:00
@@ -189,7 +189,7 @@
 
 	state = pca_status(adap);
 	if ( state != 0xF8 ) {
-		printk(KERN_ERR DRIVER ": bus is not idle. status is %#04x\n", state );
+		dev_dbg(&i2c_adap->dev, "bus is not idle. status is %#04x\n", state );
 		/* FIXME: what to do. Force stop ? */
 		return -EREMOTEIO;
 	}
@@ -328,7 +328,7 @@
 
 static u32 pca_func(struct i2c_adapter *adap)
 {
-        return I2C_FUNC_SMBUS_EMUL;
+        return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL;
 }
 
 static int pca_init(struct i2c_algo_pca_data *adap)
diff -Nru a/drivers/i2c/algos/i2c-algo-pcf.c b/drivers/i2c/algos/i2c-algo-pcf.c
--- a/drivers/i2c/algos/i2c-algo-pcf.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/i2c/algos/i2c-algo-pcf.c	2005-01-10 20:11:21 -08:00
@@ -414,8 +414,8 @@
 
 static u32 pcf_func(struct i2c_adapter *adap)
 {
-	return I2C_FUNC_SMBUS_EMUL | I2C_FUNC_10BIT_ADDR | 
-	       I2C_FUNC_PROTOCOL_MANGLING; 
+	return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL | 
+	       I2C_FUNC_10BIT_ADDR | I2C_FUNC_PROTOCOL_MANGLING; 
 }
 
 /* -----exported algorithm data: -------------------------------------	*/
diff -Nru a/drivers/i2c/algos/i2c-algo-sgi.c b/drivers/i2c/algos/i2c-algo-sgi.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/i2c/algos/i2c-algo-sgi.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,189 @@
+/*
+ * i2c-algo-sgi.c: i2c driver algorithms for SGI adapters.
+ * 
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License version 2 as published by the Free Software Foundation.
+ *
+ * Copyright (C) 2003 Ladislav Michl <ladis@linux-mips.org>
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/errno.h>
+#include <linux/delay.h>
+
+#include <linux/i2c.h>
+#include <linux/i2c-algo-sgi.h>
+
+
+#define SGI_I2C_FORCE_IDLE	(0 << 0)
+#define SGI_I2C_NOT_IDLE	(1 << 0)
+#define SGI_I2C_WRITE		(0 << 1)
+#define SGI_I2C_READ		(1 << 1)
+#define SGI_I2C_RELEASE_BUS	(0 << 2)
+#define SGI_I2C_HOLD_BUS	(1 << 2)
+#define SGI_I2C_XFER_DONE	(0 << 4)
+#define SGI_I2C_XFER_BUSY	(1 << 4)
+#define SGI_I2C_ACK		(0 << 5)
+#define SGI_I2C_NACK		(1 << 5)
+#define SGI_I2C_BUS_OK		(0 << 7)
+#define SGI_I2C_BUS_ERR		(1 << 7)
+
+#define get_control()		adap->getctrl(adap->data)
+#define set_control(val)	adap->setctrl(adap->data, val)
+#define read_data()		adap->rdata(adap->data)
+#define write_data(val)		adap->wdata(adap->data, val)
+
+
+static int wait_xfer_done(struct i2c_algo_sgi_data *adap)
+{
+	int i;
+
+	for (i = 0; i < adap->xfer_timeout; i++) {
+		if ((get_control() & SGI_I2C_XFER_BUSY) == 0)
+			return 0;
+		udelay(1);
+	}
+
+	return -ETIMEDOUT;
+}
+
+static int wait_ack(struct i2c_algo_sgi_data *adap)
+{
+	int i;
+
+	if (wait_xfer_done(adap))
+		return -ETIMEDOUT;
+	for (i = 0; i < adap->ack_timeout; i++) {
+		if ((get_control() & SGI_I2C_NACK) == 0)
+			return 0;
+		udelay(1);
+	}
+
+	return -ETIMEDOUT;
+}
+
+static int force_idle(struct i2c_algo_sgi_data *adap)
+{
+	int i;
+
+	set_control(SGI_I2C_FORCE_IDLE);
+	for (i = 0; i < adap->xfer_timeout; i++) {
+		if ((get_control() & SGI_I2C_NOT_IDLE) == 0)
+			goto out;
+		udelay(1);
+	}
+	return -ETIMEDOUT;
+out:
+	if (get_control() & SGI_I2C_BUS_ERR)
+		return -EIO;
+	return 0;
+}
+
+static int do_address(struct i2c_algo_sgi_data *adap, unsigned int addr,
+		      int rd)
+{
+	if (rd)
+		set_control(SGI_I2C_NOT_IDLE);
+	/* Check if bus is idle, eventually force it to do so */
+	if (get_control() & SGI_I2C_NOT_IDLE)
+		if (force_idle(adap))
+	                return -EIO;
+	/* Write out the i2c chip address and specify operation */
+	set_control(SGI_I2C_HOLD_BUS | SGI_I2C_WRITE | SGI_I2C_NOT_IDLE);
+	if (rd)
+		addr |= 1;
+	write_data(addr);
+	if (wait_ack(adap))
+		return -EIO;
+	return 0;
+}
+
+static int i2c_read(struct i2c_algo_sgi_data *adap, unsigned char *buf,
+		    unsigned int len)
+{
+	int i;
+
+	set_control(SGI_I2C_HOLD_BUS | SGI_I2C_READ | SGI_I2C_NOT_IDLE);
+	for (i = 0; i < len; i++) {
+		if (wait_xfer_done(adap))
+			return -EIO;
+		buf[i] = read_data();
+	}
+	set_control(SGI_I2C_RELEASE_BUS | SGI_I2C_FORCE_IDLE);
+
+	return 0;
+
+}
+
+static int i2c_write(struct i2c_algo_sgi_data *adap, unsigned char *buf,
+		     unsigned int len)
+{
+	int i;
+
+	/* We are already in write state */
+	for (i = 0; i < len; i++) {
+		write_data(buf[i]);
+		if (wait_ack(adap))
+			return -EIO;
+	}
+	return 0;
+}
+
+static int sgi_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg msgs[],
+		    int num)
+{
+	struct i2c_algo_sgi_data *adap = i2c_adap->algo_data;
+	struct i2c_msg *p;
+	int i, err = 0;
+
+	for (i = 0; !err && i < num; i++) {
+		p = &msgs[i];
+		err = do_address(adap, p->addr, p->flags & I2C_M_RD);
+		if (err || !p->len)
+			continue;
+		if (p->flags & I2C_M_RD)
+			err = i2c_read(adap, p->buf, p->len);
+		else
+			err = i2c_write(adap, p->buf, p->len);
+	}
+
+	return err;
+}
+
+static u32 sgi_func(struct i2c_adapter *adap)
+{
+	return I2C_FUNC_SMBUS_EMUL;
+}
+
+static struct i2c_algorithm sgi_algo = {
+	.name		= "SGI algorithm",
+	.id		= I2C_ALGO_SGI,
+	.master_xfer	= sgi_xfer,
+	.functionality	= sgi_func,
+};
+
+/* 
+ * registering functions to load algorithms at runtime 
+ */
+int i2c_sgi_add_bus(struct i2c_adapter *adap)
+{
+	adap->id |= sgi_algo.id;
+	adap->algo = &sgi_algo;
+
+	return i2c_add_adapter(adap);
+}
+
+
+int i2c_sgi_del_bus(struct i2c_adapter *adap)
+{
+	return i2c_del_adapter(adap);
+}
+
+EXPORT_SYMBOL(i2c_sgi_add_bus);
+EXPORT_SYMBOL(i2c_sgi_del_bus);
+
+MODULE_AUTHOR("Ladislav Michl <ladis@linux-mips.org>");
+MODULE_DESCRIPTION("I2C-Bus SGI algorithm");
+MODULE_LICENSE("GPL");
diff -Nru a/drivers/i2c/algos/i2c-algo-sibyte.c b/drivers/i2c/algos/i2c-algo-sibyte.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/i2c/algos/i2c-algo-sibyte.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,231 @@
+/* ------------------------------------------------------------------------- */
+/* i2c-algo-sibyte.c i2c driver algorithms for bit-shift adapters		     */
+/* ------------------------------------------------------------------------- */
+/*   Copyright (C) 2001,2002,2003 Broadcom Corporation
+     Copyright (C) 1995-2000 Simon G. Vogl
+
+    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.		     */
+/* ------------------------------------------------------------------------- */
+
+/* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and even
+   Frodo Looijaard <frodol@dds.nl>.  */
+
+/* Ported for SiByte SOCs by Broadcom Corporation.  */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/init.h>
+
+#include <asm/io.h>
+#include <asm/sibyte/sb1250_regs.h>
+#include <asm/sibyte/sb1250_smbus.h>
+
+#include <linux/i2c.h>
+#include <linux/i2c-algo-sibyte.h>
+
+/* ----- global defines ----------------------------------------------- */
+#define SMB_CSR(a,r) ((long)(a->reg_base + r))
+
+/* ----- global variables ---------------------------------------------	*/
+
+/* module parameters:
+ */
+static int bit_scan=0;	/* have a look at what's hanging 'round		*/
+
+
+static int smbus_xfer(struct i2c_adapter *i2c_adap, u16 addr, 
+                      unsigned short flags, char read_write,
+                      u8 command, int size, union i2c_smbus_data * data)
+{
+	struct i2c_algo_sibyte_data *adap = i2c_adap->algo_data;
+        int data_bytes = 0;
+        int error;
+
+        while (csr_in32(SMB_CSR(adap, R_SMB_STATUS)) & M_SMB_BUSY)
+                ;
+
+        switch (size) {
+        case I2C_SMBUS_QUICK:
+                csr_out32((V_SMB_ADDR(addr) | (read_write == I2C_SMBUS_READ ? M_SMB_QDATA : 0) |
+			   V_SMB_TT_QUICKCMD), SMB_CSR(adap, R_SMB_START));
+                break;
+        case I2C_SMBUS_BYTE:
+                if (read_write == I2C_SMBUS_READ) {
+                        csr_out32((V_SMB_ADDR(addr) | V_SMB_TT_RD1BYTE),
+				  SMB_CSR(adap, R_SMB_START));
+                        data_bytes = 1;
+                } else {
+                        csr_out32(V_SMB_CMD(command), SMB_CSR(adap, R_SMB_CMD));
+                        csr_out32((V_SMB_ADDR(addr) | V_SMB_TT_WR1BYTE),
+				  SMB_CSR(adap, R_SMB_START));
+                }
+                break;
+        case I2C_SMBUS_BYTE_DATA:
+                csr_out32(V_SMB_CMD(command), SMB_CSR(adap, R_SMB_CMD));
+                if (read_write == I2C_SMBUS_READ) {
+                        csr_out32((V_SMB_ADDR(addr) | V_SMB_TT_CMD_RD1BYTE),
+				  SMB_CSR(adap, R_SMB_START));
+                        data_bytes = 1;
+                } else {
+                        csr_out32(V_SMB_LB(data->byte), SMB_CSR(adap, R_SMB_DATA));
+                        csr_out32((V_SMB_ADDR(addr) | V_SMB_TT_WR2BYTE),
+				  SMB_CSR(adap, R_SMB_START));
+                }
+                break;
+        case I2C_SMBUS_WORD_DATA:
+                csr_out32(V_SMB_CMD(command), SMB_CSR(adap, R_SMB_CMD));
+                if (read_write == I2C_SMBUS_READ) {
+                        csr_out32((V_SMB_ADDR(addr) | V_SMB_TT_CMD_RD2BYTE),
+				  SMB_CSR(adap, R_SMB_START));
+                        data_bytes = 2;
+                } else {
+                        csr_out32(V_SMB_LB(data->word & 0xff), SMB_CSR(adap, R_SMB_DATA));
+                        csr_out32(V_SMB_MB(data->word >> 8), SMB_CSR(adap, R_SMB_DATA));
+                        csr_out32((V_SMB_ADDR(addr) | V_SMB_TT_WR2BYTE),
+				  SMB_CSR(adap, R_SMB_START));
+                }
+                break;
+        default:
+                return -1;      /* XXXKW better error code? */
+        }
+
+        while (csr_in32(SMB_CSR(adap, R_SMB_STATUS)) & M_SMB_BUSY)
+                ;
+
+        error = csr_in32(SMB_CSR(adap, R_SMB_STATUS));
+        if (error & M_SMB_ERROR) {
+                /* Clear error bit by writing a 1 */
+                csr_out32(M_SMB_ERROR, SMB_CSR(adap, R_SMB_STATUS));
+                return -1;      /* XXXKW better error code? */
+        }
+
+        if (data_bytes == 1)
+                data->byte = csr_in32(SMB_CSR(adap, R_SMB_DATA)) & 0xff;
+        if (data_bytes == 2)
+                data->word = csr_in32(SMB_CSR(adap, R_SMB_DATA)) & 0xffff;
+
+        return 0;
+}
+
+static int algo_control(struct i2c_adapter *adapter, 
+	unsigned int cmd, unsigned long arg)
+{
+	return 0;
+}
+
+static u32 bit_func(struct i2c_adapter *adap)
+{
+	return (I2C_FUNC_SMBUS_QUICK | I2C_FUNC_SMBUS_BYTE |
+                I2C_FUNC_SMBUS_BYTE_DATA | I2C_FUNC_SMBUS_WORD_DATA);
+}
+
+
+/* -----exported algorithm data: -------------------------------------	*/
+
+static struct i2c_algorithm i2c_sibyte_algo = {
+	"SiByte algorithm",
+	I2C_ALGO_SIBYTE,
+	NULL,                           /* master_xfer          */
+	smbus_xfer,                   	/* smbus_xfer           */
+	NULL,				/* slave_xmit		*/
+	NULL,				/* slave_recv		*/
+	algo_control,			/* ioctl		*/
+	bit_func,			/* functionality	*/
+};
+
+/* 
+ * registering functions to load algorithms at runtime 
+ */
+int i2c_sibyte_add_bus(struct i2c_adapter *i2c_adap, int speed)
+{
+	int i;
+	struct i2c_algo_sibyte_data *adap = i2c_adap->algo_data;
+
+	/* register new adapter to i2c module... */
+
+	i2c_adap->id |= i2c_sibyte_algo.id;
+	i2c_adap->algo = &i2c_sibyte_algo;
+        
+        /* Set the frequency to 100 kHz */
+        csr_out32(speed, SMB_CSR(adap,R_SMB_FREQ));
+        csr_out32(0, SMB_CSR(adap,R_SMB_CONTROL));
+
+	/* scan bus */
+	if (bit_scan) {
+                union i2c_smbus_data data;
+                int rc;
+		printk(KERN_INFO " i2c-algo-sibyte.o: scanning bus %s.\n",
+		       i2c_adap->name);
+		for (i = 0x00; i < 0x7f; i++) {
+                        /* XXXKW is this a realistic probe? */
+                        rc = smbus_xfer(i2c_adap, i, 0, I2C_SMBUS_READ, 0,
+                                        I2C_SMBUS_BYTE_DATA, &data);
+			if (!rc) {
+				printk("(%02x)",i); 
+			} else 
+				printk("."); 
+		}
+		printk("\n");
+	}
+
+#ifdef MODULE
+	MOD_INC_USE_COUNT;
+#endif
+	i2c_add_adapter(i2c_adap);
+
+	return 0;
+}
+
+
+int i2c_sibyte_del_bus(struct i2c_adapter *adap)
+{
+	int res;
+
+	if ((res = i2c_del_adapter(adap)) < 0)
+		return res;
+
+#ifdef MODULE
+	MOD_DEC_USE_COUNT;
+#endif
+	return 0;
+}
+
+int __init i2c_algo_sibyte_init (void)
+{
+	printk("i2c-algo-sibyte.o: i2c SiByte algorithm module\n");
+	return 0;
+}
+
+
+EXPORT_SYMBOL(i2c_sibyte_add_bus);
+EXPORT_SYMBOL(i2c_sibyte_del_bus);
+
+#ifdef MODULE
+MODULE_AUTHOR("Kip Walker, Broadcom Corp.");
+MODULE_DESCRIPTION("SiByte I2C-Bus algorithm");
+MODULE_PARM(bit_scan, "i");
+MODULE_PARM_DESC(bit_scan, "Scan for active chips on the bus");
+MODULE_LICENSE("GPL");
+
+int init_module(void) 
+{
+	return i2c_algo_sibyte_init();
+}
+
+void cleanup_module(void) 
+{
+}
+#endif
diff -Nru a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
--- a/drivers/i2c/busses/Kconfig	2005-01-10 20:11:22 -08:00
+++ b/drivers/i2c/busses/Kconfig	2005-01-10 20:11:22 -08:00
@@ -143,8 +143,14 @@
 	  will be called i2c-ibm_iic.
 
 config I2C_IOP3XX
-	tristate "Intel XScale IOP3xx on-chip I2C interface"
-	depends on ARCH_IOP3XX && I2C
+	tristate "Intel IOP3xx and IXP4xx on-chip I2C interface"
+	depends on (ARCH_IOP3XX || ARCH_IXP4XX) && I2C
+	help
+	  Say Y here if you want to use the IIC bus controller on
+	  the Intel IOP3xx I/O Processors or IXP4xx Network Processors.
+
+	  This driver can also be built as a module.  If so, the module
+	  will be called i2c-iop3xx.
 
 config I2C_ISA
 	tristate "ISA Bus support"
@@ -322,6 +328,12 @@
 
 	  This driver can also be built as a module.  If so, the module
 	  will be called i2c-savage4.
+
+config I2C_SIBYTE
+	tristate "SiByte SMBus interface"
+	depends on SIBYTE_SB1xxx_SOC && I2C
+	help
+	  Supports the SiByte SOC on-chip I2C interfaces (2 channels).
 
 config SCx200_I2C
 	tristate "NatSemi SCx200 I2C using GPIO pins"
diff -Nru a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile
--- a/drivers/i2c/busses/Makefile	2005-01-10 20:11:16 -08:00
+++ b/drivers/i2c/busses/Makefile	2005-01-10 20:11:16 -08:00
@@ -29,6 +29,7 @@
 obj-$(CONFIG_I2C_RPXLITE)	+= i2c-rpx.o
 obj-$(CONFIG_I2C_S3C2410)	+= i2c-s3c2410.o
 obj-$(CONFIG_I2C_SAVAGE4)	+= i2c-savage4.o
+obj-$(CONFIG_I2C_SIBYTE)	+= i2c-sibyte.o
 obj-$(CONFIG_I2C_SIS5595)	+= i2c-sis5595.o
 obj-$(CONFIG_I2C_SIS630)	+= i2c-sis630.o
 obj-$(CONFIG_I2C_SIS96X)	+= i2c-sis96x.o
diff -Nru a/drivers/i2c/busses/i2c-ali1535.c b/drivers/i2c/busses/i2c-ali1535.c
--- a/drivers/i2c/busses/i2c-ali1535.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/i2c/busses/i2c-ali1535.c	2005-01-10 20:11:22 -08:00
@@ -487,12 +487,7 @@
 };
 
 static struct pci_device_id ali1535_ids[] = {
-	{
-		.vendor =	PCI_VENDOR_ID_AL,
-		.device =	PCI_DEVICE_ID_AL_M7101,
-		.subvendor =	PCI_ANY_ID,
-		.subdevice =	PCI_ANY_ID,
-	},
+	{ PCI_DEVICE(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M7101) },
 	{ },
 };
 
diff -Nru a/drivers/i2c/busses/i2c-ali1563.c b/drivers/i2c/busses/i2c-ali1563.c
--- a/drivers/i2c/busses/i2c-ali1563.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/i2c/busses/i2c-ali1563.c	2005-01-10 20:11:20 -08:00
@@ -306,7 +306,7 @@
 	pci_write_config_word(dev,ALI1563_SMBBA,ctrl);
 }
 
-static int __init ali1563_setup(struct pci_dev * dev)
+static int __devinit ali1563_setup(struct pci_dev * dev)
 {
 	u16 ctrl;
 
@@ -362,7 +362,7 @@
 	.algo	= &ali1563_algorithm,
 };
 
-static int __init ali1563_probe(struct pci_dev * dev,
+static int __devinit ali1563_probe(struct pci_dev * dev,
 				const struct pci_device_id * id_table)
 {
 	int error;
@@ -378,19 +378,14 @@
 	return error;
 }
 
-static void __exit ali1563_remove(struct pci_dev * dev)
+static void __devexit ali1563_remove(struct pci_dev * dev)
 {
 	i2c_del_adapter(&ali1563_adapter);
 	ali1563_shutdown(dev);
 }
 
 static struct pci_device_id __devinitdata ali1563_id_table[] = {
-	{
-		.vendor		= PCI_VENDOR_ID_AL,
-		.device		= PCI_DEVICE_ID_AL_M1563,
-		.subvendor	= PCI_ANY_ID,
-		.subdevice	= PCI_ANY_ID,
-	},
+	{ PCI_DEVICE(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1563) },
 	{},
 };
 
@@ -400,7 +395,7 @@
  	.name		= "ali1563_i2c",
 	.id_table	= ali1563_id_table,
  	.probe		= ali1563_probe,
-	.remove		= ali1563_remove,
+	.remove		= __devexit_p(ali1563_remove),
 };
 
 static int __init ali1563_init(void)
diff -Nru a/drivers/i2c/busses/i2c-ali15x3.c b/drivers/i2c/busses/i2c-ali15x3.c
--- a/drivers/i2c/busses/i2c-ali15x3.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/i2c/busses/i2c-ali15x3.c	2005-01-10 20:11:19 -08:00
@@ -477,12 +477,7 @@
 };
 
 static struct pci_device_id ali15x3_ids[] = {
-	{
-	.vendor =	PCI_VENDOR_ID_AL,
-	.device =	PCI_DEVICE_ID_AL_M7101,
-	.subvendor =	PCI_ANY_ID,
-	.subdevice =	PCI_ANY_ID,
-	},
+	{ PCI_DEVICE(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M7101) },
 	{ 0, }
 };
 
diff -Nru a/drivers/i2c/busses/i2c-amd756.c b/drivers/i2c/busses/i2c-amd756.c
--- a/drivers/i2c/busses/i2c-amd756.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/i2c/busses/i2c-amd756.c	2005-01-10 20:11:22 -08:00
@@ -316,11 +316,16 @@
 };
 
 static struct pci_device_id amd756_ids[] = {
-	{PCI_VENDOR_ID_AMD, 0x740B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AMD756 },
-	{PCI_VENDOR_ID_AMD, 0x7413, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AMD766 },
-	{PCI_VENDOR_ID_AMD, 0x7443, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AMD768 },
-	{PCI_VENDOR_ID_AMD, 0x746B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AMD8111 },
-	{PCI_VENDOR_ID_NVIDIA, 0x01B4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, NFORCE },
+	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VIPER_740B),
+	  .driver_data = AMD756 },
+	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VIPER_7413),
+	  .driver_data = AMD766 },
+	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_OPUS_7443),
+	  .driver_data = AMD768 },
+	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8111_SMBUS),
+	  .driver_data = AMD8111 },
+	{ PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_SMBUS),
+	  .driver_data = NFORCE },
 	{ 0, }
 };
 
diff -Nru a/drivers/i2c/busses/i2c-amd8111.c b/drivers/i2c/busses/i2c-amd8111.c
--- a/drivers/i2c/busses/i2c-amd8111.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/i2c/busses/i2c-amd8111.c	2005-01-10 20:11:21 -08:00
@@ -332,7 +332,7 @@
 
 
 static struct pci_device_id amd8111_ids[] = {
-	{ 0x1022, 0x746a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8111_SMBUS2) },
 	{ 0, }
 };
 
diff -Nru a/drivers/i2c/busses/i2c-hydra.c b/drivers/i2c/busses/i2c-hydra.c
--- a/drivers/i2c/busses/i2c-hydra.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/i2c/busses/i2c-hydra.c	2005-01-10 20:11:18 -08:00
@@ -111,12 +111,7 @@
 };
 
 static struct pci_device_id hydra_ids[] = {
-	{
-		.vendor		= PCI_VENDOR_ID_APPLE,
-		.device		= PCI_DEVICE_ID_APPLE_HYDRA,
-		.subvendor	= PCI_ANY_ID,
-		.subdevice	= PCI_ANY_ID,
-	},
+	{ PCI_DEVICE(PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_HYDRA) },
 	{ 0, }
 };
 
diff -Nru a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
--- a/drivers/i2c/busses/i2c-i801.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/i2c/busses/i2c-i801.c	2005-01-10 20:11:19 -08:00
@@ -548,54 +548,14 @@
 };
 
 static struct pci_device_id i801_ids[] = {
-	{
-		.vendor =	PCI_VENDOR_ID_INTEL,
-		.device =	PCI_DEVICE_ID_INTEL_82801AA_3,
-		.subvendor =	PCI_ANY_ID,
-		.subdevice =	PCI_ANY_ID,
-	},
-	{
-		.vendor =	PCI_VENDOR_ID_INTEL,
-		.device =	PCI_DEVICE_ID_INTEL_82801AB_3,
-		.subvendor =	PCI_ANY_ID,
-		.subdevice =	PCI_ANY_ID,
-	},
-	{
-		.vendor =	PCI_VENDOR_ID_INTEL,
-		.device =	PCI_DEVICE_ID_INTEL_82801BA_2,
-		.subvendor =	PCI_ANY_ID,
-		.subdevice =	PCI_ANY_ID,
-	},
-	{
-		.vendor =	PCI_VENDOR_ID_INTEL,
-		.device =	PCI_DEVICE_ID_INTEL_82801CA_3,
-		.subvendor =	PCI_ANY_ID,
-		.subdevice =	PCI_ANY_ID,
-	},
-	{
-		.vendor =	PCI_VENDOR_ID_INTEL,
-		.device =	PCI_DEVICE_ID_INTEL_82801DB_3,
-		.subvendor =	PCI_ANY_ID,
-		.subdevice =	PCI_ANY_ID,
-	},
-	{
-		.vendor =	PCI_VENDOR_ID_INTEL,
-		.device =	PCI_DEVICE_ID_INTEL_82801EB_3,
-		.subvendor =	PCI_ANY_ID,
-		.subdevice =	PCI_ANY_ID,
-	},
-	{
-		.vendor =	PCI_VENDOR_ID_INTEL,
-		.device =	PCI_DEVICE_ID_INTEL_ESB_4,
-		.subvendor =	PCI_ANY_ID,
-		.subdevice = 	PCI_ANY_ID,
-	},
-	{
-		.vendor =	PCI_VENDOR_ID_INTEL,
-		.device =	PCI_DEVICE_ID_INTEL_ICH6_16,
-		.subvendor =	PCI_ANY_ID,
-		.subdevice =	PCI_ANY_ID,
-	},
+	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AA_3) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AB_3) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_2) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_3) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_3) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801EB_3) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ESB_4) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_16) },
 	{ 0, }
 };
 
diff -Nru a/drivers/i2c/busses/i2c-iop3xx.c b/drivers/i2c/busses/i2c-iop3xx.c
--- a/drivers/i2c/busses/i2c-iop3xx.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/i2c/busses/i2c-iop3xx.c	2005-01-10 20:11:19 -08:00
@@ -1,35 +1,30 @@
 /* ------------------------------------------------------------------------- */
-/* i2c-iop3xx.c i2c driver algorithms for Intel XScale IOP3xx                */
+/* i2c-iop3xx.c i2c driver algorithms for Intel XScale IOP3xx & IXP46x       */
 /* ------------------------------------------------------------------------- */
-/*   Copyright (C) 2003 Peter Milne, D-TACQ Solutions Ltd
- *                      <Peter dot Milne at D hyphen TACQ dot 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, version 2.
-
-
-    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.                */
-/* ------------------------------------------------------------------------- */
-/*
-   With acknowledgements to i2c-algo-ibm_ocp.c by 
-   Ian DaSilva, MontaVista Software, Inc. idasilva@mvista.com
-
-   And i2c-algo-pcf.c, which was created by Simon G. Vogl and Hans Berglund:
-
-     Copyright (C) 1995-1997 Simon G. Vogl, 1998-2000 Hans Berglund
-   
-   And which acknowledged Kyösti Mälkki <kmalkki@cc.hut.fi>,
-   Frodo Looijaard <frodol@dds.nl>, Martin Bailey<mbailey@littlefeet-inc.com>
-
-  ---------------------------------------------------------------------------*/
+/* Copyright (C) 2003 Peter Milne, D-TACQ Solutions Ltd
+ *                    <Peter dot Milne at D hyphen TACQ dot com>
+ *
+ * With acknowledgements to i2c-algo-ibm_ocp.c by 
+ * Ian DaSilva, MontaVista Software, Inc. idasilva@mvista.com
+ *
+ * And i2c-algo-pcf.c, which was created by Simon G. Vogl and Hans Berglund:
+ *
+ * Copyright (C) 1995-1997 Simon G. Vogl, 1998-2000 Hans Berglund
+ *  
+ * And which acknowledged Kyösti Mälkki <kmalkki@cc.hut.fi>,
+ * Frodo Looijaard <frodol@dds.nl>, Martin Bailey<mbailey@littlefeet-inc.com>
+ *
+ * Major cleanup by Deepak Saxena <dsaxena@plexity.net>, 01/2005:
+ *
+ * - Use driver model to pass per-chip info instead of hardcoding and #ifdefs
+ * - Use ioremap/__raw_readl/__raw_writel instead of direct dereference
+ * - Make it work with IXP46x chips
+ * - Cleanup function names, coding style, etc
+ *
+ * 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.
+ */
 
 #include <linux/config.h>
 #include <linux/interrupt.h>
@@ -40,24 +35,18 @@
 #include <linux/init.h>
 #include <linux/errno.h>
 #include <linux/sched.h>
+#include <linux/device.h>
 #include <linux/i2c.h>
 
+#include <asm/io.h>
 
-#include <asm/arch-iop3xx/iop321.h>
-#include <asm/arch-iop3xx/iop321-irqs.h>
 #include "i2c-iop3xx.h"
 
+/* global unit counter */
+static int i2c_id = 0;
 
-/* ----- global defines ----------------------------------------------- */
-#define PASSERT(x) do { if (!(x) ) \
-		printk(KERN_CRIT "PASSERT %s in %s:%d\n", #x, __FILE__, __LINE__ );\
-	} while (0)
-
-
-/* ----- global variables ---------------------------------------------	*/
-
-
-static inline unsigned char iic_cook_addr(struct i2c_msg *msg) 
+static inline unsigned char 
+iic_cook_addr(struct i2c_msg *msg) 
 {
 	unsigned char addr;
 
@@ -66,103 +55,110 @@
 	if (msg->flags & I2C_M_RD)
 		addr |= 1;
 
-	/* PGM: what is M_REV_DIR_ADDR - do we need it ?? */
+	/*
+	 * Read or Write?
+	 */
 	if (msg->flags & I2C_M_REV_DIR_ADDR)
 		addr ^= 1;
 
 	return addr;   
 }
 
-
-static inline void iop3xx_adap_reset(struct i2c_algo_iop3xx_data *iop3xx_adap)
+static void 
+iop3xx_i2c_reset(struct i2c_algo_iop3xx_data *iop3xx_adap)
 {
 	/* Follows devman 9.3 */
-	*iop3xx_adap->biu->CR = IOP321_ICR_UNIT_RESET;
-	*iop3xx_adap->biu->SR = IOP321_ISR_CLEARBITS;
-	*iop3xx_adap->biu->CR = 0;
+	__raw_writel(IOP3XX_ICR_UNIT_RESET, iop3xx_adap->ioaddr + CR_OFFSET);
+	__raw_writel(IOP3XX_ISR_CLEARBITS, iop3xx_adap->ioaddr + SR_OFFSET);
+	__raw_writel(0, iop3xx_adap->ioaddr + CR_OFFSET);
 } 
 
-static inline void iop3xx_adap_set_slave_addr(struct i2c_algo_iop3xx_data *iop3xx_adap)
+static void 
+iop3xx_i2c_set_slave_addr(struct i2c_algo_iop3xx_data *iop3xx_adap)
 {
-	*iop3xx_adap->biu->SAR = MYSAR;
+	__raw_writel(MYSAR, iop3xx_adap->ioaddr + SAR_OFFSET);
 }
 
-static inline void iop3xx_adap_enable(struct i2c_algo_iop3xx_data *iop3xx_adap)
+static void 
+iop3xx_i2c_enable(struct i2c_algo_iop3xx_data *iop3xx_adap)
 {
-	u32 cr = IOP321_ICR_GCD|IOP321_ICR_SCLEN|IOP321_ICR_UE;
+	u32 cr = IOP3XX_ICR_GCD | IOP3XX_ICR_SCLEN | IOP3XX_ICR_UE;
 
+	/* 
+	 * Everytime unit enable is asserted, GPOD needs to be cleared
+	 * on IOP321 to avoid data corruption on the bus.
+	 */
+#ifdef CONFIG_ARCH_IOP321
+#define IOP321_GPOD_I2C0    0x00c0  /* clear these bits to enable ch0 */
+#define IOP321_GPOD_I2C1    0x0030  /* clear these bits to enable ch1 */
+
+	*IOP321_GPOD &= (iop3xx_adap->id == 0) ? ~IOP321_GPOD_I2C0 : 
+		~IOP321_GPOD_I2C1;
+#endif
 	/* NB SR bits not same position as CR IE bits :-( */
-	iop3xx_adap->biu->SR_enabled = 
-		IOP321_ISR_ALD | IOP321_ISR_BERRD |
-		IOP321_ISR_RXFULL | IOP321_ISR_TXEMPTY;
+	iop3xx_adap->SR_enabled = 
+		IOP3XX_ISR_ALD | IOP3XX_ISR_BERRD |
+		IOP3XX_ISR_RXFULL | IOP3XX_ISR_TXEMPTY;
 
-	cr |= IOP321_ICR_ALDIE | IOP321_ICR_BERRIE |
-		IOP321_ICR_RXFULLIE | IOP321_ICR_TXEMPTYIE;
+	cr |= IOP3XX_ICR_ALD_IE | IOP3XX_ICR_BERR_IE |
+		IOP3XX_ICR_RXFULL_IE | IOP3XX_ICR_TXEMPTY_IE;
 
-	*iop3xx_adap->biu->CR = cr;
+	__raw_writel(cr, iop3xx_adap->ioaddr + CR_OFFSET);
 }
 
-static void iop3xx_adap_transaction_cleanup(struct i2c_algo_iop3xx_data *iop3xx_adap)
+static void 
+iop3xx_i2c_transaction_cleanup(struct i2c_algo_iop3xx_data *iop3xx_adap)
 {
-	unsigned cr = *iop3xx_adap->biu->CR;
+	unsigned long cr = __raw_readl(iop3xx_adap->ioaddr + CR_OFFSET);
 	
-	cr &= ~(IOP321_ICR_MSTART | IOP321_ICR_TBYTE | 
-		IOP321_ICR_MSTOP | IOP321_ICR_SCLEN);
-	*iop3xx_adap->biu->CR = cr;
-}
+	cr &= ~(IOP3XX_ICR_MSTART | IOP3XX_ICR_TBYTE | 
+		IOP3XX_ICR_MSTOP | IOP3XX_ICR_SCLEN);
 
-static void iop3xx_adap_final_cleanup(struct i2c_algo_iop3xx_data *iop3xx_adap)
-{
-	unsigned cr = *iop3xx_adap->biu->CR;
-	
-	cr &= ~(IOP321_ICR_ALDIE | IOP321_ICR_BERRIE |
-		IOP321_ICR_RXFULLIE | IOP321_ICR_TXEMPTYIE);
-	iop3xx_adap->biu->SR_enabled = 0;
-	*iop3xx_adap->biu->CR = cr;
+	__raw_writel(cr, iop3xx_adap->ioaddr + CR_OFFSET);
 }
 
 /* 
  * NB: the handler has to clear the source of the interrupt! 
  * Then it passes the SR flags of interest to BH via adap data
  */
-static irqreturn_t iop3xx_i2c_handler(int this_irq, 
-				void *dev_id, 
-				struct pt_regs *regs) 
+static irqreturn_t 
+iop3xx_i2c_irq_handler(int this_irq, void *dev_id, struct pt_regs *regs) 
 {
 	struct i2c_algo_iop3xx_data *iop3xx_adap = dev_id;
+	u32 sr = __raw_readl(iop3xx_adap->ioaddr + SR_OFFSET);
 
-	u32 sr = *iop3xx_adap->biu->SR;
-
-	if ((sr &= iop3xx_adap->biu->SR_enabled)) {
-		*iop3xx_adap->biu->SR = sr;
-		iop3xx_adap->biu->SR_received |= sr;
+	if ((sr &= iop3xx_adap->SR_enabled)) {
+		__raw_writel(sr, iop3xx_adap->ioaddr + SR_OFFSET);
+		iop3xx_adap->SR_received |= sr;
 		wake_up_interruptible(&iop3xx_adap->waitq);
 	}
 	return IRQ_HANDLED;
 }
 
 /* check all error conditions, clear them , report most important */
-static int iop3xx_adap_error(u32 sr)
+static int 
+iop3xx_i2c_error(u32 sr)
 {
 	int rc = 0;
 
-	if ((sr&IOP321_ISR_BERRD)) {
+	if ((sr & IOP3XX_ISR_BERRD)) {
 		if ( !rc ) rc = -I2C_ERR_BERR;
 	}
-	if ((sr&IOP321_ISR_ALD)) {
+	if ((sr & IOP3XX_ISR_ALD)) {
 		if ( !rc ) rc = -I2C_ERR_ALD;		
 	}
 	return rc;	
 }
 
-static inline u32 get_srstat(struct i2c_algo_iop3xx_data *iop3xx_adap)
+static inline u32 
+iop3xx_i2c_get_srstat(struct i2c_algo_iop3xx_data *iop3xx_adap)
 {
 	unsigned long flags;
 	u32 sr;
 
 	spin_lock_irqsave(&iop3xx_adap->lock, flags);
-	sr = iop3xx_adap->biu->SR_received;
-	iop3xx_adap->biu->SR_received = 0;
+	sr = iop3xx_adap->SR_received;
+	iop3xx_adap->SR_received = 0;
 	spin_unlock_irqrestore(&iop3xx_adap->lock, flags);
 
 	return sr;
@@ -175,9 +171,10 @@
 typedef int (* compare_func)(unsigned test, unsigned mask);
 /* returns 1 on correct comparison */
 
-static int iop3xx_adap_wait_event(struct i2c_algo_iop3xx_data *iop3xx_adap, 
-				  unsigned flags, unsigned* status,
-				  compare_func compare)
+static int 
+iop3xx_i2c_wait_event(struct i2c_algo_iop3xx_data *iop3xx_adap, 
+			  unsigned flags, unsigned* status,
+			  compare_func compare)
 {
 	unsigned sr = 0;
 	int interrupted;
@@ -187,13 +184,13 @@
 	do {
 		interrupted = wait_event_interruptible_timeout (
 			iop3xx_adap->waitq,
-			(done = compare( sr = get_srstat(iop3xx_adap),flags )),
-			iop3xx_adap->timeout
+			(done = compare( sr = iop3xx_i2c_get_srstat(iop3xx_adap)					,flags )),
+			1 * HZ;
 			);
-		if ((rc = iop3xx_adap_error(sr)) < 0) {
+		if ((rc = iop3xx_i2c_error(sr)) < 0) {
 			*status = sr;
 			return rc;
-		}else if (!interrupted) {
+		} else if (!interrupted) {
 			*status = sr;
 			return -ETIMEDOUT;
 		}
@@ -207,141 +204,131 @@
 /*
  * Concrete compare_funcs 
  */
-static int all_bits_clear(unsigned test, unsigned mask)
+static int 
+all_bits_clear(unsigned test, unsigned mask)
 {
 	return (test & mask) == 0;
 }
-static int any_bits_set(unsigned test, unsigned mask)
+
+static int 
+any_bits_set(unsigned test, unsigned mask)
 {
 	return (test & mask) != 0;
 }
 
-static int iop3xx_adap_wait_tx_done(struct i2c_algo_iop3xx_data *iop3xx_adap, int *status)
+static int 
+iop3xx_i2c_wait_tx_done(struct i2c_algo_iop3xx_data *iop3xx_adap, int *status)
 {
-	return iop3xx_adap_wait_event( 
+	return iop3xx_i2c_wait_event( 
 		iop3xx_adap, 
-	        IOP321_ISR_TXEMPTY|IOP321_ISR_ALD|IOP321_ISR_BERRD,
+	        IOP3XX_ISR_TXEMPTY | IOP3XX_ISR_ALD | IOP3XX_ISR_BERRD,
 		status, any_bits_set);
 }
 
-static int iop3xx_adap_wait_rx_done(struct i2c_algo_iop3xx_data *iop3xx_adap, int *status)
+static int 
+iop3xx_i2c_wait_rx_done(struct i2c_algo_iop3xx_data *iop3xx_adap, int *status)
 {
-	return iop3xx_adap_wait_event( 
+	return iop3xx_i2c_wait_event( 
 		iop3xx_adap, 
-		IOP321_ISR_RXFULL|IOP321_ISR_ALD|IOP321_ISR_BERRD,
+		IOP3XX_ISR_RXFULL | IOP3XX_ISR_ALD | IOP3XX_ISR_BERRD,
 		status,	any_bits_set);
 }
 
-static int iop3xx_adap_wait_idle(struct i2c_algo_iop3xx_data *iop3xx_adap, int *status)
-{
-	return iop3xx_adap_wait_event( 
-		iop3xx_adap, IOP321_ISR_UNITBUSY, status, all_bits_clear);
-}
-
-/*
- * Description: This performs the IOP3xx initialization sequence
- * Valid for IOP321. Maybe valid for IOP310?.
- */
-static int iop3xx_adap_init (struct i2c_algo_iop3xx_data *iop3xx_adap)
+static int 
+iop3xx_i2c_wait_idle(struct i2c_algo_iop3xx_data *iop3xx_adap, int *status)
 {
-	*IOP321_GPOD &= ~(iop3xx_adap->channel==0 ?
-			  IOP321_GPOD_I2C0:
-			  IOP321_GPOD_I2C1);
-
-	iop3xx_adap_reset(iop3xx_adap);
-	iop3xx_adap_set_slave_addr(iop3xx_adap);
-	iop3xx_adap_enable(iop3xx_adap);
-	
-        return 0;
+	return iop3xx_i2c_wait_event( 
+		iop3xx_adap, IOP3XX_ISR_UNITBUSY, status, all_bits_clear);
 }
 
-static int iop3xx_adap_send_target_slave_addr(struct i2c_algo_iop3xx_data *iop3xx_adap,
-					      struct i2c_msg* msg)
+static int 
+iop3xx_i2c_send_target_addr(struct i2c_algo_iop3xx_data *iop3xx_adap, 
+				struct i2c_msg* msg)
 {
-	unsigned cr = *iop3xx_adap->biu->CR;
+	unsigned long cr = __raw_readl(iop3xx_adap->ioaddr + CR_OFFSET);
 	int status;
 	int rc;
 
-	*iop3xx_adap->biu->DBR = iic_cook_addr(msg);
+	__raw_writel(iic_cook_addr(msg), iop3xx_adap->ioaddr + DBR_OFFSET);
 	
-	cr &= ~(IOP321_ICR_MSTOP | IOP321_ICR_NACK);
-	cr |= IOP321_ICR_MSTART | IOP321_ICR_TBYTE;
+	cr &= ~(IOP3XX_ICR_MSTOP | IOP3XX_ICR_NACK);
+	cr |= IOP3XX_ICR_MSTART | IOP3XX_ICR_TBYTE;
+
+	__raw_writel(cr, iop3xx_adap->ioaddr + CR_OFFSET);
+	rc = iop3xx_i2c_wait_tx_done(iop3xx_adap, &status);
 
-	*iop3xx_adap->biu->CR = cr;
-	rc = iop3xx_adap_wait_tx_done(iop3xx_adap, &status);
-	/* this assert fires every time, contrary to IOP manual	
-	PASSERT((status&IOP321_ISR_UNITBUSY)!=0);
-	*/
-	PASSERT((status&IOP321_ISR_RXREAD)==0);
-	     
 	return rc;
 }
 
-static int iop3xx_adap_write_byte(struct i2c_algo_iop3xx_data *iop3xx_adap, char byte, int stop)
+static int 
+iop3xx_i2c_write_byte(struct i2c_algo_iop3xx_data *iop3xx_adap, char byte, 
+				int stop)
 {
-	unsigned cr = *iop3xx_adap->biu->CR;
+	unsigned long cr = __raw_readl(iop3xx_adap->ioaddr + CR_OFFSET);
 	int status;
 	int rc = 0;
 
-	*iop3xx_adap->biu->DBR = byte;
-	cr &= ~IOP321_ICR_MSTART;
+	__raw_writel(byte, iop3xx_adap->ioaddr + DBR_OFFSET);
+	cr &= ~IOP3XX_ICR_MSTART;
 	if (stop) {
-		cr |= IOP321_ICR_MSTOP;
+		cr |= IOP3XX_ICR_MSTOP;
 	} else {
-		cr &= ~IOP321_ICR_MSTOP;
+		cr &= ~IOP3XX_ICR_MSTOP;
 	}
-	*iop3xx_adap->biu->CR = cr |= IOP321_ICR_TBYTE;
-	rc = iop3xx_adap_wait_tx_done(iop3xx_adap, &status);
+	cr |= IOP3XX_ICR_TBYTE;
+	__raw_writel(cr, iop3xx_adap->ioaddr + CR_OFFSET);
+	rc = iop3xx_i2c_wait_tx_done(iop3xx_adap, &status);
 
 	return rc;
 } 
 
-static int iop3xx_adap_read_byte(struct i2c_algo_iop3xx_data *iop3xx_adap,
-				 char* byte, int stop)
+static int 
+iop3xx_i2c_read_byte(struct i2c_algo_iop3xx_data *iop3xx_adap, char* byte, 
+				int stop)
 {
-	unsigned cr = *iop3xx_adap->biu->CR;
+	unsigned long cr = __raw_readl(iop3xx_adap->ioaddr + CR_OFFSET);
 	int status;
 	int rc = 0;
 
-	cr &= ~IOP321_ICR_MSTART;
+	cr &= ~IOP3XX_ICR_MSTART;
 
 	if (stop) {
-		cr |= IOP321_ICR_MSTOP|IOP321_ICR_NACK;
+		cr |= IOP3XX_ICR_MSTOP | IOP3XX_ICR_NACK;
 	} else {
-		cr &= ~(IOP321_ICR_MSTOP|IOP321_ICR_NACK);
+		cr &= ~(IOP3XX_ICR_MSTOP | IOP3XX_ICR_NACK);
 	}
-	*iop3xx_adap->biu->CR = cr |= IOP321_ICR_TBYTE;
+	cr |= IOP3XX_ICR_TBYTE;
+	__raw_writel(cr, iop3xx_adap->ioaddr + CR_OFFSET);
 
-	rc = iop3xx_adap_wait_rx_done(iop3xx_adap, &status);
+	rc = iop3xx_i2c_wait_rx_done(iop3xx_adap, &status);
 
-	*byte = *iop3xx_adap->biu->DBR;
+	*byte = __raw_readl(iop3xx_adap->ioaddr + DBR_OFFSET);
 
 	return rc;
 }
 
-static int iop3xx_i2c_writebytes(struct i2c_adapter *i2c_adap, 
-				 const char *buf, int count)
+static int 
+iop3xx_i2c_writebytes(struct i2c_adapter *i2c_adap, const char *buf, int count)
 {
 	struct i2c_algo_iop3xx_data *iop3xx_adap = i2c_adap->algo_data;
 	int ii;
 	int rc = 0;
 
-	for (ii = 0; rc == 0 && ii != count; ++ii) {
-		rc = iop3xx_adap_write_byte(iop3xx_adap, buf[ii], ii==count-1);
-	}
+	for (ii = 0; rc == 0 && ii != count; ++ii) 
+		rc = iop3xx_i2c_write_byte(iop3xx_adap, buf[ii], ii==count-1);
 	return rc;
 }
 
-static int iop3xx_i2c_readbytes(struct i2c_adapter *i2c_adap, 
-				char *buf, int count)
+static int 
+iop3xx_i2c_readbytes(struct i2c_adapter *i2c_adap, char *buf, int count)
 {
 	struct i2c_algo_iop3xx_data *iop3xx_adap = i2c_adap->algo_data;
 	int ii;
 	int rc = 0;
 
-	for (ii = 0; rc == 0 && ii != count; ++ii) {
-		rc = iop3xx_adap_read_byte(iop3xx_adap, &buf[ii], ii==count-1);
-	}
+	for (ii = 0; rc == 0 && ii != count; ++ii)
+		rc = iop3xx_i2c_read_byte(iop3xx_adap, &buf[ii], ii==count-1);
+	
 	return rc;
 }
 
@@ -352,12 +339,13 @@
  * Each transfer (i.e. a read or a write) is separated by a repeated start
  * condition.
  */
-static int iop3xx_handle_msg(struct i2c_adapter *i2c_adap, struct i2c_msg* pmsg) 
+static int 
+iop3xx_i2c_handle_msg(struct i2c_adapter *i2c_adap, struct i2c_msg* pmsg) 
 {
 	struct i2c_algo_iop3xx_data *iop3xx_adap = i2c_adap->algo_data;
 	int rc;
 
-	rc = iop3xx_adap_send_target_slave_addr(iop3xx_adap, pmsg);
+	rc = iop3xx_i2c_send_target_addr(iop3xx_adap, pmsg);
 	if (rc < 0) {
 		return rc;
 	}
@@ -372,22 +360,24 @@
 /*
  * master_xfer() - main read/write entry
  */
-static int iop3xx_master_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg msgs[], int num)
+static int 
+iop3xx_i2c_master_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg msgs[], 
+				int num)
 {
 	struct i2c_algo_iop3xx_data *iop3xx_adap = i2c_adap->algo_data;
 	int im = 0;
 	int ret = 0;
 	int status;
 
-	iop3xx_adap_wait_idle(iop3xx_adap, &status);
-	iop3xx_adap_reset(iop3xx_adap);
-	iop3xx_adap_enable(iop3xx_adap);
+	iop3xx_i2c_wait_idle(iop3xx_adap, &status);
+	iop3xx_i2c_reset(iop3xx_adap);
+	iop3xx_i2c_enable(iop3xx_adap);
 
 	for (im = 0; ret == 0 && im != num; im++) {
-		ret = iop3xx_handle_msg(i2c_adap, &msgs[im]);
+		ret = iop3xx_i2c_handle_msg(i2c_adap, &msgs[im]);
 	}
 
-	iop3xx_adap_transaction_cleanup(iop3xx_adap);
+	iop3xx_i2c_transaction_cleanup(iop3xx_adap);
 	
 	if(ret)
 		return ret;
@@ -395,136 +385,165 @@
 	return im;   
 }
 
-static int algo_control(struct i2c_adapter *adapter, unsigned int cmd,
+static int 
+iop3xx_i2c_algo_control(struct i2c_adapter *adapter, unsigned int cmd,
 			unsigned long arg)
 {
 	return 0;
 }
 
-static u32 iic_func(struct i2c_adapter *adap)
+static u32 
+iop3xx_i2c_func(struct i2c_adapter *adap)
 {
 	return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL;
 }
 
-
-/* -----exported algorithm data: -------------------------------------	*/
-
-static struct i2c_algorithm iic_algo = {
+static struct i2c_algorithm iop3xx_i2c_algo = {
 	.name		= "IOP3xx I2C algorithm",
-	.id		= I2C_ALGO_OCP_IOP3XX,
-	.master_xfer	= iop3xx_master_xfer,
-	.algo_control	= algo_control,
-	.functionality	= iic_func,
+	.id		= I2C_ALGO_IOP3XX,
+	.master_xfer	= iop3xx_i2c_master_xfer,
+	.algo_control	= iop3xx_i2c_algo_control,
+	.functionality	= iop3xx_i2c_func,
 };
 
-/* 
- * registering functions to load algorithms at runtime 
- */
-static int i2c_iop3xx_add_bus(struct i2c_adapter *iic_adap)
+static int 
+iop3xx_i2c_remove(struct device *device)
+{
+	struct platform_device *pdev = to_platform_device(device);
+	struct i2c_adapter *padapter = dev_get_drvdata(&pdev->dev);
+	struct i2c_algo_iop3xx_data *adapter_data = 
+		(struct i2c_algo_iop3xx_data *)padapter->algo_data;
+	struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+	unsigned long cr = __raw_readl(adapter_data->ioaddr + CR_OFFSET);
+
+	/*
+	 * Disable the actual HW unit
+	 */
+	cr &= ~(IOP3XX_ICR_ALD_IE | IOP3XX_ICR_BERR_IE |
+		IOP3XX_ICR_RXFULL_IE | IOP3XX_ICR_TXEMPTY_IE);
+	__raw_writel(cr, adapter_data->ioaddr + CR_OFFSET);
+
+	iounmap((void __iomem*)adapter_data->ioaddr);
+	release_mem_region(res->start, IOP3XX_I2C_IO_SIZE);
+	kfree(adapter_data);
+	kfree(padapter);
+
+	dev_set_drvdata(&pdev->dev, NULL);
+
+	return 0;
+}
+
+static int 
+iop3xx_i2c_probe(struct device *dev)
 {
-	struct i2c_algo_iop3xx_data *iop3xx_adap = iic_adap->algo_data;
+	struct platform_device *pdev = to_platform_device(dev);
+	struct resource *res;
+	int ret;
+	struct i2c_adapter *new_adapter;
+	struct i2c_algo_iop3xx_data *adapter_data;
 
-	if (!request_region( REGION_START(iop3xx_adap), 
-			      REGION_LENGTH(iop3xx_adap),
-			      iic_adap->name)) {
-		return -ENODEV;
+	new_adapter = kmalloc(sizeof(struct i2c_adapter), GFP_KERNEL);
+	if (!new_adapter) {
+		ret = -ENOMEM;
+		goto out;
 	}
+	memset((void*)new_adapter, 0, sizeof(*new_adapter));
 
-	init_waitqueue_head(&iop3xx_adap->waitq);
-	spin_lock_init(&iop3xx_adap->lock);
+	adapter_data = kmalloc(sizeof(struct i2c_algo_iop3xx_data), GFP_KERNEL);
+	if (!adapter_data) {
+		ret = -ENOMEM;
+		goto free_adapter;
+	}
+	memset((void*)adapter_data, 0, sizeof(*adapter_data));
 
-	if (request_irq( 
-		     iop3xx_adap->biu->irq,
-		     iop3xx_i2c_handler,
-		     /* SA_SAMPLE_RANDOM */ 0,
-		     iic_adap->name,
-		     iop3xx_adap)) {
-		return -ENODEV;
-	}			  
+	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+	if (!res) {
+		ret = -ENODEV;
+		goto free_both;
+	}
 
-	/* register new iic_adapter to i2c module... */
-	iic_adap->id |= iic_algo.id;
-	iic_adap->algo = &iic_algo;
+	if (!request_mem_region(res->start, IOP3XX_I2C_IO_SIZE, pdev->name)) {
+		ret = -EBUSY;
+		goto free_both;
+	}
 
-	iic_adap->timeout = 100;	/* default values, should */
-	iic_adap->retries = 3;		/* be replaced by defines */
+	/* set the adapter enumeration # */
+	adapter_data->id = i2c_id++;
 
-	iop3xx_adap_init(iic_adap->algo_data);
-	i2c_add_adapter(iic_adap);
-	return 0;
-}
+	adapter_data->ioaddr = (u32)ioremap(res->start, IOP3XX_I2C_IO_SIZE);
+	if (!adapter_data->ioaddr) {
+		ret = -ENOMEM;
+		goto release_region;
+	}
 
-static int i2c_iop3xx_del_bus(struct i2c_adapter *iic_adap)
-{
-	struct i2c_algo_iop3xx_data *iop3xx_adap = iic_adap->algo_data;
+	res = request_irq(platform_get_irq(pdev, 0), iop3xx_i2c_irq_handler, 0, 
+				pdev->name, adapter_data);
+	if (res) {
+		ret = -EIO;
+		goto unmap;
+	}
 
-	iop3xx_adap_final_cleanup(iop3xx_adap);
-	free_irq(iop3xx_adap->biu->irq, iop3xx_adap);
+	memcpy(new_adapter->name, pdev->name, strlen(pdev->name));
+	new_adapter->id = I2C_HW_IOP3XX;
+	new_adapter->owner = THIS_MODULE;
+	new_adapter->dev.parent = &pdev->dev;
 
-	release_region(REGION_START(iop3xx_adap), REGION_LENGTH(iop3xx_adap));
+	/*
+	 * Default values...should these come in from board code?
+	 */
+	new_adapter->timeout = 100;	
+	new_adapter->retries = 3;
+	new_adapter->algo = &iop3xx_i2c_algo;
 
-	return i2c_del_adapter(iic_adap);
-}
+	init_waitqueue_head(&adapter_data->waitq);
+	spin_lock_init(&adapter_data->lock);
 
-#ifdef CONFIG_ARCH_IOP321
+	iop3xx_i2c_reset(adapter_data);
+	iop3xx_i2c_set_slave_addr(adapter_data);
+	iop3xx_i2c_enable(adapter_data);
 
-static struct iop3xx_biu biu0 = {
-	.CR	= IOP321_ICR0,
-	.SR	= IOP321_ISR0,
-	.SAR	= IOP321_ISAR0,
-	.DBR	= IOP321_IDBR0,
-	.BMR	= IOP321_IBMR0,
-	.irq	= IRQ_IOP321_I2C_0,
-};
+	dev_set_drvdata(&pdev->dev, new_adapter);
+	new_adapter->algo_data = adapter_data;
 
-static struct iop3xx_biu biu1 = {
-	.CR	= IOP321_ICR1,
-	.SR	= IOP321_ISR1,
-	.SAR	= IOP321_ISAR1,
-	.DBR	= IOP321_IDBR1,
-	.BMR	= IOP321_IBMR1,
-	.irq	= IRQ_IOP321_I2C_1,
-};
+	i2c_add_adapter(new_adapter);
 
-#define ADAPTER_NAME_ROOT "IOP321 i2c biu adapter "
-#else
-#error Please define the BIU struct iop3xx_biu for your processor arch
-#endif
+	return 0;
 
-static struct i2c_algo_iop3xx_data algo_iop3xx_data0 = {
-	.channel		= 0,
-	.biu			= &biu0,
-	.timeout		= 1*HZ,
-};
-static struct i2c_algo_iop3xx_data algo_iop3xx_data1 = {
-	.channel		= 1,
-	.biu			= &biu1,
-	.timeout		= 1*HZ,
-};
+unmap:
+	iounmap((void __iomem*)adapter_data->ioaddr);
 
-static struct i2c_adapter iop3xx_ops0 = {
-	.owner			= THIS_MODULE,
-	.name			= ADAPTER_NAME_ROOT "0",
-	.id			= I2C_HW_IOP321,
-	.algo_data		= &algo_iop3xx_data0,
-};
-static struct i2c_adapter iop3xx_ops1 = {
-	.owner			= THIS_MODULE,
-	.name			= ADAPTER_NAME_ROOT "1",
-	.id			= I2C_HW_IOP321,
-	.algo_data		= &algo_iop3xx_data1,
+release_region:
+	release_mem_region(res->start, IOP3XX_I2C_IO_SIZE);
+
+free_both:
+	kfree(adapter_data);
+
+free_adapter:
+	kfree(new_adapter);
+
+out:
+	return ret;
+}
+
+
+static struct device_driver iop3xx_i2c_driver = {
+	.name		= "IOP3xx-I2C",
+	.bus		= &platform_bus_type,
+	.probe		= iop3xx_i2c_probe,
+	.remove		= iop3xx_i2c_remove
 };
 
-static int __init i2c_iop3xx_init (void)
+static int __init 
+i2c_iop3xx_init (void)
 {
-	return i2c_iop3xx_add_bus(&iop3xx_ops0) ||
-		i2c_iop3xx_add_bus(&iop3xx_ops1);
+	return driver_register(&iop3xx_i2c_driver);
 }
 
-static void __exit i2c_iop3xx_exit (void)
+static void __exit 
+i2c_iop3xx_exit (void)
 {
-	i2c_iop3xx_del_bus(&iop3xx_ops0);
-	i2c_iop3xx_del_bus(&iop3xx_ops1);
+	driver_unregister(&iop3xx_i2c_driver);
+	return;
 }
 
 module_init (i2c_iop3xx_init);
diff -Nru a/drivers/i2c/busses/i2c-iop3xx.h b/drivers/i2c/busses/i2c-iop3xx.h
--- a/drivers/i2c/busses/i2c-iop3xx.h	2005-01-10 20:11:15 -08:00
+++ b/drivers/i2c/busses/i2c-iop3xx.h	2005-01-10 20:11:15 -08:00
@@ -25,20 +25,20 @@
 /*
  * iop321 hardware bit definitions
  */
-#define IOP321_ICR_FAST_MODE	0x8000	/* 1=400kBps, 0=100kBps */
-#define IOP321_ICR_UNIT_RESET	0x4000	/* 1=RESET */
-#define IOP321_ICR_SADIE	0x2000	/* 1=Slave Detect Interrupt Enable */
-#define IOP321_ICR_ALDIE	0x1000	/* 1=Arb Loss Detect Interrupt Enable */
-#define IOP321_ICR_SSDIE	0x0800	/* 1=Slave STOP Detect Interrupt Enable */
-#define IOP321_ICR_BERRIE	0x0400	/* 1=Bus Error Interrupt Enable */
-#define IOP321_ICR_RXFULLIE	0x0200	/* 1=Receive Full Interrupt Enable */
-#define IOP321_ICR_TXEMPTYIE	0x0100	/* 1=Transmit Empty Interrupt Enable */
-#define IOP321_ICR_GCD		0x0080	/* 1=General Call Disable */
+#define IOP3XX_ICR_FAST_MODE	0x8000	/* 1=400kBps, 0=100kBps */
+#define IOP3XX_ICR_UNIT_RESET	0x4000	/* 1=RESET */
+#define IOP3XX_ICR_SAD_IE	0x2000	/* 1=Slave Detect Interrupt Enable */
+#define IOP3XX_ICR_ALD_IE	0x1000	/* 1=Arb Loss Detect Interrupt Enable */
+#define IOP3XX_ICR_SSD_IE	0x0800	/* 1=Slave STOP Detect Interrupt Enable */
+#define IOP3XX_ICR_BERR_IE	0x0400	/* 1=Bus Error Interrupt Enable */
+#define IOP3XX_ICR_RXFULL_IE	0x0200	/* 1=Receive Full Interrupt Enable */
+#define IOP3XX_ICR_TXEMPTY_IE	0x0100	/* 1=Transmit Empty Interrupt Enable */
+#define IOP3XX_ICR_GCD		0x0080	/* 1=General Call Disable */
 /*
- * IOP321_ICR_GCD: 1 disables response as slave. "This bit must be set
+ * IOP3XX_ICR_GCD: 1 disables response as slave. "This bit must be set
  * when sending a master mode general call message from the I2C unit"
  */
-#define IOP321_ICR_UE		0x0040	/* 1=Unit Enable */
+#define IOP3XX_ICR_UE		0x0040	/* 1=Unit Enable */
 /*
  * "NOTE: To avoid I2C bus integrity problems, 
  * the user needs to ensure that the GPIO Output Data Register - 
@@ -47,38 +47,38 @@
  * The user prepares to enable I2C port 0 and 
  * I2C port 1 by clearing GPOD bits 7:6 and GPOD bits 5:4, respectively.
  */
-#define IOP321_ICR_SCLEN	0x0020	/* 1=SCL enable for master mode */
-#define IOP321_ICR_MABORT	0x0010	/* 1=Send a STOP with no data 
+#define IOP3XX_ICR_SCLEN	0x0020	/* 1=SCL enable for master mode */
+#define IOP3XX_ICR_MABORT	0x0010	/* 1=Send a STOP with no data 
 					 * NB TBYTE must be clear */
-#define IOP321_ICR_TBYTE	0x0008	/* 1=Send/Receive a byte. i2c clears */
-#define IOP321_ICR_NACK		0x0004	/* 1=reply with NACK */
-#define IOP321_ICR_MSTOP	0x0002	/* 1=send a STOP after next data byte */
-#define IOP321_ICR_MSTART	0x0001	/* 1=initiate a START */
-
-
-#define IOP321_ISR_BERRD	0x0400	/* 1=BUS ERROR Detected */
-#define IOP321_ISR_SAD		0x0200	/* 1=Slave ADdress Detected */
-#define IOP321_ISR_GCAD		0x0100	/* 1=General Call Address Detected */
-#define IOP321_ISR_RXFULL	0x0080	/* 1=Receive Full */
-#define IOP321_ISR_TXEMPTY	0x0040	/* 1=Transmit Empty */
-#define IOP321_ISR_ALD		0x0020	/* 1=Arbitration Loss Detected */
-#define IOP321_ISR_SSD		0x0010	/* 1=Slave STOP Detected */
-#define IOP321_ISR_BBUSY	0x0008	/* 1=Bus BUSY */
-#define IOP321_ISR_UNITBUSY	0x0004	/* 1=Unit Busy */
-#define IOP321_ISR_NACK		0x0002	/* 1=Unit Rx or Tx a NACK */
-#define IOP321_ISR_RXREAD	0x0001	/* 1=READ 0=WRITE (R/W bit of slave addr */
-
-#define IOP321_ISR_CLEARBITS	0x07f0
-
-#define IOP321_ISAR_SAMASK	0x007f
+#define IOP3XX_ICR_TBYTE	0x0008	/* 1=Send/Receive a byte. i2c clears */
+#define IOP3XX_ICR_NACK		0x0004	/* 1=reply with NACK */
+#define IOP3XX_ICR_MSTOP	0x0002	/* 1=send a STOP after next data byte */
+#define IOP3XX_ICR_MSTART	0x0001	/* 1=initiate a START */
+
+
+#define IOP3XX_ISR_BERRD	0x0400	/* 1=BUS ERROR Detected */
+#define IOP3XX_ISR_SAD		0x0200	/* 1=Slave ADdress Detected */
+#define IOP3XX_ISR_GCAD		0x0100	/* 1=General Call Address Detected */
+#define IOP3XX_ISR_RXFULL	0x0080	/* 1=Receive Full */
+#define IOP3XX_ISR_TXEMPTY	0x0040	/* 1=Transmit Empty */
+#define IOP3XX_ISR_ALD		0x0020	/* 1=Arbitration Loss Detected */
+#define IOP3XX_ISR_SSD		0x0010	/* 1=Slave STOP Detected */
+#define IOP3XX_ISR_BBUSY	0x0008	/* 1=Bus BUSY */
+#define IOP3XX_ISR_UNITBUSY	0x0004	/* 1=Unit Busy */
+#define IOP3XX_ISR_NACK		0x0002	/* 1=Unit Rx or Tx a NACK */
+#define IOP3XX_ISR_RXREAD	0x0001	/* 1=READ 0=WRITE (R/W bit of slave addr */
+
+#define IOP3XX_ISR_CLEARBITS	0x07f0
+
+#define IOP3XX_ISAR_SAMASK	0x007f
 
-#define IOP321_IDBR_MASK	0x00ff
+#define IOP3XX_IDBR_MASK	0x00ff
 
-#define IOP321_IBMR_SCL		0x0002
-#define IOP321_IBMR_SDA		0x0001
+#define IOP3XX_IBMR_SCL		0x0002
+#define IOP3XX_IBMR_SDA		0x0001
 
-#define IOP321_GPOD_I2C0	0x00c0	/* clear these bits to enable ch0 */
-#define IOP321_GPOD_I2C1	0x0030	/* clear these bits to enable ch1 */
+#define IOP3XX_GPOD_I2C0	0x00c0	/* clear these bits to enable ch0 */
+#define IOP3XX_GPOD_I2C1	0x0030	/* clear these bits to enable ch1 */
 
 #define MYSAR			0x02	/* SWAG a suitable slave address */
 
@@ -87,32 +87,21 @@
 #define I2C_ERR_ALD		(I2C_ERR+1)
 
 
-struct iop3xx_biu {                /* Bus Interface Unit - the hardware */
-/* physical hardware defs - regs*/
-	u32 *CR;
-	u32 *SR;
-	u32 *SAR;
-	u32 *DBR;
-	u32 *BMR;
-/* irq bit vector */
-	u32 irq;
-/* stored flags */
-	u32 SR_enabled, SR_received;
-};
+#define	CR_OFFSET		0
+#define	SR_OFFSET		0x4
+#define	SAR_OFFSET		0x8
+#define	DBR_OFFSET		0xc
+#define	CCR_OFFSET		0x10
+#define	BMR_OFFSET		0x14
 
-struct i2c_algo_iop3xx_data {
-	int channel;
+#define	IOP3XX_I2C_IO_SIZE	0x18
 
+struct i2c_algo_iop3xx_data {
+	u32 ioaddr;
 	wait_queue_head_t waitq;
 	spinlock_t lock;
-	int timeout;
-	struct iop3xx_biu* biu;
+	u32 SR_enabled, SR_received;
+	int id;
 };
-
-#define REGION_START(adap)	((u32)((adap)->biu->CR))
-#define REGION_END(adap)	((u32)((adap)->biu->BMR+1))
-#define REGION_LENGTH(adap)	(REGION_END(adap)-REGION_START(adap))
-
-#define IRQ_STATUS_MASK(adap)	(1<<adap->biu->irq)
 
 #endif /* I2C_IOP3XX_H */
diff -Nru a/drivers/i2c/busses/i2c-nforce2.c b/drivers/i2c/busses/i2c-nforce2.c
--- a/drivers/i2c/busses/i2c-nforce2.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/i2c/busses/i2c-nforce2.c	2005-01-10 20:11:16 -08:00
@@ -28,6 +28,7 @@
     nForce2 MCP			0064
     nForce2 Ultra 400 MCP	0084
     nForce3 Pro150 MCP		00D4
+    nForce3 250Gb MCP		00E4
 
     This driver supports the 2 SMBuses that are included in the MCP2 of the
     nForce2 chipset.
@@ -290,12 +291,10 @@
 
 
 static struct pci_device_id nforce2_ids[] = {
-	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2_SMBUS,
-	       	PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
-	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2S_SMBUS,
-	       	PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
-	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3_SMBUS,
-	       	PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+	{ PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2_SMBUS) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2S_SMBUS) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3_SMBUS) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3S_SMBUS) },
 	{ 0 }
 };
 
diff -Nru a/drivers/i2c/busses/i2c-piix4.c b/drivers/i2c/busses/i2c-piix4.c
--- a/drivers/i2c/busses/i2c-piix4.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/i2c/busses/i2c-piix4.c	2005-01-10 20:11:17 -08:00
@@ -414,48 +414,18 @@
 };
 
 static struct pci_device_id piix4_ids[] = {
-	{
-		.vendor =	PCI_VENDOR_ID_INTEL,
-		.device =	PCI_DEVICE_ID_INTEL_82371AB_3,
-		.subvendor =	PCI_ANY_ID,
-		.subdevice =	PCI_ANY_ID,
-		.driver_data =	3
-	},
-	{
-		.vendor =	PCI_VENDOR_ID_SERVERWORKS,
-		.device =	PCI_DEVICE_ID_SERVERWORKS_OSB4,
-		.subvendor =	PCI_ANY_ID,
-		.subdevice =	PCI_ANY_ID,
-		.driver_data =	0,
-	},
-	{
-		.vendor =	PCI_VENDOR_ID_SERVERWORKS,
-		.device =	PCI_DEVICE_ID_SERVERWORKS_CSB5,
-		.subvendor =	PCI_ANY_ID,
-		.subdevice =	PCI_ANY_ID,
-		.driver_data =	0,
-	},
-	{
-		.vendor =	PCI_VENDOR_ID_SERVERWORKS,
-		.device =	PCI_DEVICE_ID_SERVERWORKS_CSB6,
-		.subvendor =	PCI_ANY_ID,
-		.subdevice =	PCI_ANY_ID,
-		.driver_data =	0,
-	},
-	{
-		.vendor =	PCI_VENDOR_ID_INTEL,
-		.device =	PCI_DEVICE_ID_INTEL_82443MX_3,
-		.subvendor =	PCI_ANY_ID,
-		.subdevice =	PCI_ANY_ID,
-		.driver_data =	3,
-	},
-	{
-		.vendor =	PCI_VENDOR_ID_EFAR,
-		.device =	PCI_DEVICE_ID_EFAR_SLC90E66_3,
-		.subvendor =	PCI_ANY_ID,
-		.subdevice =	PCI_ANY_ID,
-		.driver_data =	0,
-	},
+	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_3),
+	  .driver_data = 3 },
+	{ PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_OSB4),
+	  .driver_data = 0 },
+	{ PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB5),
+	  .driver_data = 0 },
+	{ PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB6),
+	  .driver_data = 0 },
+	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443MX_3),
+	  .driver_data = 3 },
+	{ PCI_DEVICE(PCI_VENDOR_ID_EFAR, PCI_DEVICE_ID_EFAR_SLC90E66_3),
+	  .driver_data = 0 },
 	{ 0, }
 };
 
diff -Nru a/drivers/i2c/busses/i2c-prosavage.c b/drivers/i2c/busses/i2c-prosavage.c
--- a/drivers/i2c/busses/i2c-prosavage.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/i2c/busses/i2c-prosavage.c	2005-01-10 20:11:18 -08:00
@@ -96,13 +96,6 @@
 /* 
  * S3/VIA 8365/8375 registers
  */
-#ifndef PCI_DEVICE_ID_S3_SAVAGE4
-#define PCI_DEVICE_ID_S3_SAVAGE4	0x8a25
-#endif
-#ifndef PCI_DEVICE_ID_S3_PROSAVAGE8
-#define PCI_DEVICE_ID_S3_PROSAVAGE8	0x8d04
-#endif
-
 #define VGA_CR_IX	0x3d4
 #define VGA_CR_DATA	0x3d5
 
diff -Nru a/drivers/i2c/busses/i2c-sibyte.c b/drivers/i2c/busses/i2c-sibyte.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/i2c/busses/i2c-sibyte.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2004 Steven J. Hill
+ * Copyright (C) 2001,2002,2003 Broadcom Corporation
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/i2c-algo-sibyte.h>
+#include <asm/sibyte/sb1250_regs.h>
+#include <asm/sibyte/sb1250_smbus.h>
+
+static struct i2c_algo_sibyte_data sibyte_board_data[2] = {
+	{ NULL, 0, (void *) (KSEG1+A_SMB_BASE(0)) },
+	{ NULL, 1, (void *) (KSEG1+A_SMB_BASE(1)) }
+};
+
+static struct i2c_adapter sibyte_board_adapter[2] = {
+	{
+		.owner		= THIS_MODULE,
+		.id		= I2C_HW_SIBYTE,
+		.class		= I2C_CLASS_HWMON,
+		.algo		= NULL,
+		.algo_data	= &sibyte_board_data[0],
+		.name		= "SiByte SMBus 0",
+	},
+	{
+		.owner		= THIS_MODULE,
+		.id		= I2C_HW_SIBYTE,
+		.class		= I2C_CLASS_HWMON,
+		.algo		= NULL,
+		.algo_data	= &sibyte_board_data[1],
+		.name		= "SiByte SMBus 1",
+	},
+};
+
+static int __init i2c_sibyte_init(void)
+{
+	printk("i2c-swarm.o: i2c SMBus adapter module for SiByte board\n");
+	if (i2c_sibyte_add_bus(&sibyte_board_adapter[0], K_SMB_FREQ_100KHZ) < 0)
+		return -ENODEV;
+	if (i2c_sibyte_add_bus(&sibyte_board_adapter[1], K_SMB_FREQ_400KHZ) < 0)
+		return -ENODEV;
+	return 0;
+}
+
+static void __exit i2c_sibyte_exit(void)
+{
+	i2c_sibyte_del_bus(&sibyte_board_adapter[0]);
+	i2c_sibyte_del_bus(&sibyte_board_adapter[1]);
+}
+
+module_init(i2c_sibyte_init);
+module_exit(i2c_sibyte_exit);
+
+MODULE_AUTHOR("Kip Walker <kwalker@broadcom.com>, Steven J. Hill <sjhill@realitydiluted.com>");
+MODULE_DESCRIPTION("SMBus adapter routines for SiByte boards");
+MODULE_LICENSE("GPL");
diff -Nru a/drivers/i2c/busses/i2c-sis96x.c b/drivers/i2c/busses/i2c-sis96x.c
--- a/drivers/i2c/busses/i2c-sis96x.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/i2c/busses/i2c-sis96x.c	2005-01-10 20:11:17 -08:00
@@ -51,9 +51,6 @@
 */
 #define SIS96x_VERSION "1.0.0"
 
-/* SiS96x SMBus PCI device ID */
-#define PCI_DEVICE_ID_SI_SMBUS 0x16
-
 /* base address register in PCI config space */
 #define SIS96x_BAR 0x04
 
@@ -267,14 +264,7 @@
 };
 
 static struct pci_device_id sis96x_ids[] = {
-
-	{
-		.vendor	=	PCI_VENDOR_ID_SI,
-		.device =	PCI_DEVICE_ID_SI_SMBUS,
-		.subvendor =	PCI_ANY_ID,
-		.subdevice =	PCI_ANY_ID,
-	},
-
+	{ PCI_DEVICE(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_SMBUS) },
 	{ 0, }
 };
 
diff -Nru a/drivers/i2c/busses/i2c-stub.c b/drivers/i2c/busses/i2c-stub.c
--- a/drivers/i2c/busses/i2c-stub.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/i2c/busses/i2c-stub.c	2005-01-10 20:11:20 -08:00
@@ -28,6 +28,7 @@
 #include <linux/errno.h>
 #include <linux/i2c.h>
 
+static u8  stub_pointer;
 static u8  stub_bytes[256];
 static u16 stub_words[256];
 
@@ -44,6 +45,22 @@
 		ret = 0;
 		break;
 
+	case I2C_SMBUS_BYTE:
+		if (read_write == I2C_SMBUS_WRITE) {
+			stub_pointer = command;
+			dev_dbg(&adap->dev, "smbus byte - addr 0x%02x, "
+					"wrote 0x%02x.\n",
+					addr, command);
+		} else {
+			data->byte = stub_bytes[stub_pointer++];
+			dev_dbg(&adap->dev, "smbus byte - addr 0x%02x, "
+					"read  0x%02x.\n",
+					addr, data->byte);
+		}
+
+		ret = 0;
+		break;
+
 	case I2C_SMBUS_BYTE_DATA:
 		if (read_write == I2C_SMBUS_WRITE) {
 			stub_bytes[command] = data->byte;
@@ -56,6 +73,7 @@
 					"read  0x%02x at 0x%02x.\n",
 					addr, data->byte, command);
 		}
+		stub_pointer = command + 1;
 
 		ret = 0;
 		break;
@@ -87,8 +105,8 @@
 
 static u32 stub_func(struct i2c_adapter *adapter)
 {
-	return I2C_FUNC_SMBUS_QUICK | I2C_FUNC_SMBUS_BYTE_DATA |
-		I2C_FUNC_SMBUS_WORD_DATA;
+	return I2C_FUNC_SMBUS_QUICK | I2C_FUNC_SMBUS_BYTE |
+		I2C_FUNC_SMBUS_BYTE_DATA | I2C_FUNC_SMBUS_WORD_DATA;
 }
 
 static struct i2c_algorithm smbus_algorithm = {
diff -Nru a/drivers/i2c/busses/i2c-viapro.c b/drivers/i2c/busses/i2c-viapro.c
--- a/drivers/i2c/busses/i2c-viapro.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/i2c/busses/i2c-viapro.c	2005-01-10 20:11:21 -08:00
@@ -395,62 +395,22 @@
 }
 
 static struct pci_device_id vt596_ids[] = {
-	{
-		.vendor		= PCI_VENDOR_ID_VIA,
-		.device 	= PCI_DEVICE_ID_VIA_82C596_3,
-		.subvendor	= PCI_ANY_ID,
-		.subdevice	= PCI_ANY_ID,
-		.driver_data	= SMBBA1,
-	},
-	{
-		.vendor		= PCI_VENDOR_ID_VIA,
-		.device		= PCI_DEVICE_ID_VIA_82C596B_3,
-		.subvendor	= PCI_ANY_ID,
-		.subdevice	= PCI_ANY_ID,
-		.driver_data	= SMBBA1,
-	},
-	{
-		.vendor		= PCI_VENDOR_ID_VIA,
-		.device 	= PCI_DEVICE_ID_VIA_82C686_4,
-		.subvendor	= PCI_ANY_ID,
-		.subdevice	= PCI_ANY_ID,
-		.driver_data	= SMBBA1,
-	},
-	{
-		.vendor		= PCI_VENDOR_ID_VIA,
-		.device 	= PCI_DEVICE_ID_VIA_8233_0,
-		.subvendor	= PCI_ANY_ID,
-		.subdevice	= PCI_ANY_ID,
-		.driver_data	= SMBBA3
-	},
-	{
-		.vendor		= PCI_VENDOR_ID_VIA,
-		.device 	= PCI_DEVICE_ID_VIA_8233A,
-		.subvendor	= PCI_ANY_ID,
-		.subdevice	= PCI_ANY_ID,
-		.driver_data	= SMBBA3,
-	},
-	{
-		.vendor		= PCI_VENDOR_ID_VIA,
-		.device 	= PCI_DEVICE_ID_VIA_8235,
-		.subvendor	= PCI_ANY_ID,
-		.subdevice	= PCI_ANY_ID,
-		.driver_data	= SMBBA3
-	},
-	{
-		.vendor		= PCI_VENDOR_ID_VIA,
-		.device 	= PCI_DEVICE_ID_VIA_8237,
-		.subvendor	= PCI_ANY_ID,
-		.subdevice	= PCI_ANY_ID,
-		.driver_data	= SMBBA3
-	},
-	{
-		.vendor		= PCI_VENDOR_ID_VIA,
-		.device 	= PCI_DEVICE_ID_VIA_8231_4,
-		.subvendor	= PCI_ANY_ID,
-		.subdevice	= PCI_ANY_ID,
-		.driver_data	= SMBBA1,
-	},
+	{ PCI_DEVICE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C596_3),
+	  .driver_data = SMBBA1 },
+	{ PCI_DEVICE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C596B_3),
+	  .driver_data = SMBBA1 },
+	{ PCI_DEVICE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_4),
+	  .driver_data = SMBBA1 },
+	{ PCI_DEVICE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8233_0),
+	  .driver_data = SMBBA3 },
+	{ PCI_DEVICE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8233A),
+	  .driver_data = SMBBA3 },
+	{ PCI_DEVICE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8235),
+	  .driver_data = SMBBA3 },
+	{ PCI_DEVICE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237),
+	  .driver_data = SMBBA3 },
+	{ PCI_DEVICE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8231_4),
+	  .driver_data = SMBBA1 },
 	{ 0, }
 };
 
diff -Nru a/drivers/i2c/chips/Kconfig b/drivers/i2c/chips/Kconfig
--- a/drivers/i2c/chips/Kconfig	2005-01-10 20:11:19 -08:00
+++ b/drivers/i2c/chips/Kconfig	2005-01-10 20:11:19 -08:00
@@ -239,6 +239,18 @@
 	  This driver can also be built as a module.  If so, the module
 	  will be called pc87360.
 
+config SENSORS_SMSC47B397
+	tristate "SMSC LPC47B397-NC"
+	depends on I2C && EXPERIMENTAL
+	select I2C_SENSOR
+	select I2C_ISA
+	help
+	  If you say yes here you get support for the SMSC LPC47B397-NC
+	  sensor chip.
+
+	  This driver can also be built as a module.  If so, the module
+	  will be called smsc47b397.
+
 config SENSORS_SMSC47M1
 	tristate "SMSC LPC47M10x and compatibles"
 	depends on I2C && EXPERIMENTAL
diff -Nru a/drivers/i2c/chips/Makefile b/drivers/i2c/chips/Makefile
--- a/drivers/i2c/chips/Makefile	2005-01-10 20:11:23 -08:00
+++ b/drivers/i2c/chips/Makefile	2005-01-10 20:11:23 -08:00
@@ -30,6 +30,7 @@
 obj-$(CONFIG_SENSORS_PCF8574)	+= pcf8574.o
 obj-$(CONFIG_SENSORS_PCF8591)	+= pcf8591.o
 obj-$(CONFIG_SENSORS_RTC8564)	+= rtc8564.o
+obj-$(CONFIG_SENSORS_SMSC47B397)+= smsc47b397.o
 obj-$(CONFIG_SENSORS_SMSC47M1)	+= smsc47m1.o
 obj-$(CONFIG_SENSORS_VIA686A)	+= via686a.o
 obj-$(CONFIG_SENSORS_W83L785TS)	+= w83l785ts.o
diff -Nru a/drivers/i2c/chips/asb100.c b/drivers/i2c/chips/asb100.c
--- a/drivers/i2c/chips/asb100.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/i2c/chips/asb100.c	2005-01-10 20:11:19 -08:00
@@ -56,8 +56,7 @@
 #define ASB100_VERSION "1.0.0"
 
 /* I2C addresses to scan */
-static unsigned short normal_i2c[] = { 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d,
-					0x2e, 0x2f, I2C_CLIENT_END };
+static unsigned short normal_i2c[] = { 0x2d, I2C_CLIENT_END };
 
 /* ISA addresses to scan (none) */
 static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END };
diff -Nru a/drivers/i2c/chips/eeprom.c b/drivers/i2c/chips/eeprom.c
--- a/drivers/i2c/chips/eeprom.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/i2c/chips/eeprom.c	2005-01-10 20:11:18 -08:00
@@ -43,13 +43,6 @@
 /* Insmod parameters */
 SENSORS_INSMOD_1(eeprom);
 
-static int checksum = 0;
-module_param(checksum, bool, 0);
-MODULE_PARM_DESC(checksum, "Only accept eeproms whose checksum is correct");
-
-
-/* EEPROM registers */
-#define EEPROM_REG_CHECKSUM	0x3f
 
 /* Size of EEPROM in bytes */
 #define EEPROM_SIZE		256
@@ -168,7 +161,6 @@
 /* This function is called by i2c_detect */
 int eeprom_detect(struct i2c_adapter *adapter, int address, int kind)
 {
-	int i, cs;
 	struct i2c_client *new_client;
 	struct eeprom_data *data;
 	int err = 0;
@@ -204,17 +196,6 @@
 
 	/* prevent 24RF08 corruption */
 	i2c_smbus_write_quick(new_client, 0);
-
-	/* Now, we do the remaining detection. It is not there, unless you force
-	   the checksum to work out. */
-	if (checksum) {
-		cs = 0;
-		for (i = 0; i <= 0x3e; i++)
-			cs += i2c_smbus_read_byte_data(new_client, i);
-		cs &= 0xff;
-		if (i2c_smbus_read_byte_data (new_client, EEPROM_REG_CHECKSUM) != cs)
-			goto exit_kfree;
-	}
 
 	data->nature = UNKNOWN;
 	/* Detect the Vaio nature of EEPROMs.
diff -Nru a/drivers/i2c/chips/fscher.c b/drivers/i2c/chips/fscher.c
--- a/drivers/i2c/chips/fscher.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/i2c/chips/fscher.c	2005-01-10 20:11:19 -08:00
@@ -198,7 +198,7 @@
 static DEVICE_ATTR(kind, S_IRUGO, show_##kind##0##sub, NULL);
 
 #define sysfs_fan(offset, reg_status, reg_min, reg_ripple, reg_act) \
-sysfs_rw_n(fan, _pwm   , offset, reg_min) \
+sysfs_rw_n(pwm,        , offset, reg_min) \
 sysfs_rw_n(fan, _status, offset, reg_status) \
 sysfs_rw_n(fan, _div   , offset, reg_ripple) \
 sysfs_ro_n(fan, _input , offset, reg_act)
@@ -247,7 +247,7 @@
 #define device_create_file_fan(client, offset) \
 do { \
 	device_create_file(&client->dev, &dev_attr_fan##offset##_status); \
-	device_create_file(&client->dev, &dev_attr_fan##offset##_pwm); \
+	device_create_file(&client->dev, &dev_attr_pwm##offset); \
 	device_create_file(&client->dev, &dev_attr_fan##offset##_div); \
 	device_create_file(&client->dev, &dev_attr_fan##offset##_input); \
 } while (0)
@@ -483,16 +483,17 @@
 	return sprintf(buf, "%u\n", data->fan_status[FAN_INDEX_FROM_NUM(nr)] & 0x04);
 }
 
-static ssize_t set_fan_pwm(struct i2c_client *client, struct fscher_data *data,
+static ssize_t set_pwm(struct i2c_client *client, struct fscher_data *data,
 		       const char *buf, size_t count, int nr, int reg)
 {
-	data->fan_min[FAN_INDEX_FROM_NUM(nr)] = simple_strtoul(buf, NULL, 10) & 0xff;
+	unsigned long v = simple_strtoul(buf, NULL, 10);
+	data->fan_min[FAN_INDEX_FROM_NUM(nr)] = v > 0xff ? 0xff : v;
 
 	fscher_write_value(client, reg, data->fan_min[FAN_INDEX_FROM_NUM(nr)]);
 	return count;
 }
 
-static ssize_t show_fan_pwm (struct fscher_data *data, char *buf, int nr)
+static ssize_t show_pwm(struct fscher_data *data, char *buf, int nr)
 {
 	return sprintf(buf, "%u\n", data->fan_min[FAN_INDEX_FROM_NUM(nr)]);
 }
diff -Nru a/drivers/i2c/chips/isp1301_omap.c b/drivers/i2c/chips/isp1301_omap.c
--- a/drivers/i2c/chips/isp1301_omap.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/i2c/chips/isp1301_omap.c	2005-01-10 20:11:22 -08:00
@@ -934,13 +934,14 @@
 
 static void b_peripheral(struct isp1301 *isp)
 {
-	enable_vbus_draw(isp, 8);
 	OTG_CTRL_REG = OTG_CTRL_REG & OTG_XCEIV_OUTPUTS;
 	usb_gadget_vbus_connect(isp->otg.gadget);
 
 #ifdef	CONFIG_USB_OTG
+	enable_vbus_draw(isp, 8);
 	otg_update_isp(isp);
 #else
+	enable_vbus_draw(isp, 100);
 	/* UDC driver just set OTG_BSESSVLD */
 	isp1301_set_bits(isp, ISP1301_OTG_CONTROL_1, OTG1_DP_PULLUP);
 	isp1301_clear_bits(isp, ISP1301_OTG_CONTROL_1, OTG1_DP_PULLDOWN);
@@ -950,7 +951,7 @@
 #endif
 }
 
-static int isp_update_otg(struct isp1301 *isp, u8 stat)
+static void isp_update_otg(struct isp1301 *isp, u8 stat)
 {
 	u8			isp_stat, isp_bstat;
 	enum usb_otg_state	state = isp->otg.state;
@@ -1489,11 +1490,9 @@
 	if (the_transceiver)
 		return 0;
 
-	isp = kmalloc(sizeof *isp, GFP_KERNEL);
+	isp = kcalloc(1, sizeof *isp, GFP_KERNEL);
 	if (!isp)
 		return 0;
-
-	memset(isp, 0, sizeof *isp);
 
 	INIT_WORK(&isp->work, isp1301_work, isp);
 	init_timer(&isp->timer);
diff -Nru a/drivers/i2c/chips/it87.c b/drivers/i2c/chips/it87.c
--- a/drivers/i2c/chips/it87.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/i2c/chips/it87.c	2005-01-10 20:11:21 -08:00
@@ -624,7 +624,7 @@
 
 	/* Reserve the ISA region */
 	if (is_isa)
-		if (!request_region(address, IT87_EXTENT, name))
+		if (!request_region(address, IT87_EXTENT, it87_driver.name))
 			goto ERROR0;
 
 	/* Probe whether there is anything available on this address. Already
diff -Nru a/drivers/i2c/chips/lm78.c b/drivers/i2c/chips/lm78.c
--- a/drivers/i2c/chips/lm78.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/i2c/chips/lm78.c	2005-01-10 20:11:21 -08:00
@@ -462,7 +462,7 @@
 
 	/* Reserve the ISA region */
 	if (is_isa)
-		if (!request_region(address, LM78_EXTENT, "lm78")) {
+		if (!request_region(address, LM78_EXTENT, lm78_driver.name)) {
 			err = -EBUSY;
 			goto ERROR0;
 		}
diff -Nru a/drivers/i2c/chips/lm90.c b/drivers/i2c/chips/lm90.c
--- a/drivers/i2c/chips/lm90.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/i2c/chips/lm90.c	2005-01-10 20:11:16 -08:00
@@ -35,12 +35,13 @@
  * Among others, it has a higher accuracy than the LM90, much like the
  * LM86 does.
  *
- * This driver also supports the MAX6657 and MAX6658, sensor chips made
- * by Maxim. These chips are similar to the LM86. Complete datasheet
- * can be obtained at Maxim's website at:
+ * This driver also supports the MAX6657, MAX6658 and MAX6659 sensor
+ * chips made by Maxim. These chips are similar to the LM86. Complete
+ * datasheet can be obtained at Maxim's website at:
  *   http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2578
- * Note that there is no way to differenciate between both chips (but
- * no need either).
+ * Note that there is no easy way to differenciate between the three
+ * variants. The extra address and features of the MAX6659 are not
+ * supported by this driver.
  *
  * Since the LM90 was the first chipset supported by this driver, most
  * comments will refer to this chipset, but are actually general and
@@ -70,9 +71,11 @@
 
 /*
  * Addresses to scan
- * Address is fully defined internally and cannot be changed.
+ * Address is fully defined internally and cannot be changed except for
+ * MAX6659.
  * LM86, LM89, LM90, LM99, ADM1032, MAX6657 and MAX6658 have address 0x4c.
  * LM89-1, and LM99-1 have address 0x4d.
+ * MAX6659 can have address 0x4c, 0x4d or 0x4e (unsupported).
  */
 
 static unsigned short normal_i2c[] = { 0x4c, 0x4d, I2C_CLIENT_END };
@@ -386,8 +389,17 @@
 			}
 		} else
 		if (man_id == 0x4D) { /* Maxim */
-			if (address == 0x4C
-			 && (reg_config1 & 0x1F) == 0
+			/*
+			 * The Maxim variants do NOT have a chip_id register.
+			 * Reading from that address will return the last read
+			 * value, which in our case is those of the man_id
+			 * register. Likewise, the config1 register seems to
+			 * lack a low nibble, so the value will be those of the
+			 * previous read, so in our case those of the man_id
+			 * register.
+			 */
+			if (chip_id == man_id
+			 && (reg_config1 & 0x1F) == (man_id & 0x0F)
 			 && reg_convrate <= 0x09) {
 			 	kind = max6657;
 			}
diff -Nru a/drivers/i2c/chips/pc87360.c b/drivers/i2c/chips/pc87360.c
--- a/drivers/i2c/chips/pc87360.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/i2c/chips/pc87360.c	2005-01-10 20:11:17 -08:00
@@ -756,7 +756,8 @@
 
 	for (i = 0; i < 3; i++) {
 		if (((data->address[i] = extra_isa[i]))
-		 && !request_region(extra_isa[i], PC87360_EXTENT, "pc87360")) {
+		 && !request_region(extra_isa[i], PC87360_EXTENT,
+		 		    pc87360_driver.name)) {
 			dev_err(&new_client->dev, "Region 0x%x-0x%x already "
 				"in use!\n", extra_isa[i],
 				extra_isa[i]+PC87360_EXTENT-1);
diff -Nru a/drivers/i2c/chips/smsc47b397.c b/drivers/i2c/chips/smsc47b397.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/i2c/chips/smsc47b397.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,353 @@
+/*
+    smsc47b397.c - Part of lm_sensors, Linux kernel modules
+			for hardware monitoring
+
+    Supports the SMSC LPC47B397-NC Super-I/O chip.
+
+    Author/Maintainer: Mark M. Hoffman <mhoffman@lightlink.com>
+	Copyright (C) 2004 Utilitek Systems, Inc.
+
+    derived in part from smsc47m1.c:
+	Copyright (C) 2002 Mark D. Studebaker <mdsxyz123@yahoo.com>
+	Copyright (C) 2004 Jean Delvare <khali@linux-fr.org>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include <linux/module.h>
+#include <linux/slab.h>
+#include <linux/ioport.h>
+#include <linux/i2c.h>
+#include <linux/i2c-sensor.h>
+#include <linux/init.h>
+#include <asm/io.h>
+
+static unsigned short normal_i2c[] = { I2C_CLIENT_END };
+/* Address is autodetected, there is no default value */
+static unsigned int normal_isa[] = { 0x0000, I2C_CLIENT_ISA_END };
+static struct i2c_force_data forces[] = {{NULL}};
+
+enum chips { any_chip, smsc47b397 };
+static struct i2c_address_data addr_data = {
+	.normal_i2c		= normal_i2c,
+	.normal_isa		= normal_isa,
+	.probe			= normal_i2c,		/* cheat */
+	.ignore			= normal_i2c,		/* cheat */
+	.forces			= forces,
+};
+
+/* Super-I/0 registers and commands */
+
+#define	REG	0x2e	/* The register to read/write */
+#define	VAL	0x2f	/* The value to read/write */
+
+static inline void superio_outb(int reg, int val)
+{
+	outb(reg, REG);
+	outb(val, VAL);
+}
+
+static inline int superio_inb(int reg)
+{
+	outb(reg, REG);
+	return inb(VAL);
+}
+
+/* select superio logical device */
+static inline void superio_select(int ld)
+{
+	superio_outb(0x07, ld);
+}
+
+static inline void superio_enter(void)
+{
+	outb(0x55, REG);
+}
+
+static inline void superio_exit(void)
+{
+	outb(0xAA, REG);
+}
+
+#define SUPERIO_REG_DEVID	0x20
+#define SUPERIO_REG_DEVREV	0x21
+#define SUPERIO_REG_BASE_MSB	0x60
+#define SUPERIO_REG_BASE_LSB	0x61
+#define SUPERIO_REG_LD8		0x08
+
+#define SMSC_EXTENT		0x02
+
+/* 0 <= nr <= 3 */
+static u8 smsc47b397_reg_temp[] = {0x25, 0x26, 0x27, 0x80};
+#define SMSC47B397_REG_TEMP(nr)	(smsc47b397_reg_temp[(nr)])
+
+/* 0 <= nr <= 3 */
+#define SMSC47B397_REG_FAN_LSB(nr) (0x28 + 2 * (nr))
+#define SMSC47B397_REG_FAN_MSB(nr) (0x29 + 2 * (nr))
+
+struct smsc47b397_data {
+	struct i2c_client client;
+	struct semaphore lock;
+
+	struct semaphore update_lock;
+	unsigned long last_updated; /* in jiffies */
+	int valid;
+
+	/* register values */
+	u16 fan[4];
+	u8 temp[4];
+};
+
+static int smsc47b397_read_value(struct i2c_client *client, u8 reg)
+{
+	struct smsc47b397_data *data = i2c_get_clientdata(client);
+	int res;
+
+	down(&data->lock);
+	outb(reg, client->addr);
+	res = inb_p(client->addr + 1);
+	up(&data->lock);
+	return res;
+}
+
+static struct smsc47b397_data *smsc47b397_update_device(struct device *dev)
+{
+ 	struct i2c_client *client = to_i2c_client(dev);
+	struct smsc47b397_data *data = i2c_get_clientdata(client);
+	int i;
+
+	down(&data->update_lock);
+
+	if (time_after(jiffies - data->last_updated, (unsigned long)HZ)
+		|| time_before(jiffies, data->last_updated) || !data->valid) {
+
+		dev_dbg(&client->dev, "starting device update...\n");
+
+		/* 4 temperature inputs, 4 fan inputs */
+		for (i = 0; i < 4; i++) {
+			data->temp[i] = smsc47b397_read_value(client,
+					SMSC47B397_REG_TEMP(i));
+
+			/* must read LSB first */
+			data->fan[i]  = smsc47b397_read_value(client,
+					SMSC47B397_REG_FAN_LSB(i));
+			data->fan[i] |= smsc47b397_read_value(client,
+					SMSC47B397_REG_FAN_MSB(i)) << 8;
+		}
+
+		data->last_updated = jiffies;
+		data->valid = 1;
+
+		dev_dbg(&client->dev, "... device update complete\n");
+	}
+
+	up(&data->update_lock);
+
+	return data;
+}
+
+/* TEMP: 0.001C/bit (-128C to +127C)
+   REG: 1C/bit, two's complement */
+static int temp_from_reg(u8 reg)
+{
+	return (s8)reg * 1000;
+}
+
+/* 0 <= nr <= 3 */
+static ssize_t show_temp(struct device *dev, char *buf, int nr)
+{
+	struct smsc47b397_data *data = smsc47b397_update_device(dev);
+	return sprintf(buf, "%d\n", temp_from_reg(data->temp[nr]));
+}
+
+#define sysfs_temp(num) \
+static ssize_t show_temp##num(struct device *dev, char *buf) \
+{ \
+	return show_temp(dev, buf, num-1); \
+} \
+static DEVICE_ATTR(temp##num##_input, S_IRUGO, show_temp##num, NULL)
+
+sysfs_temp(1);
+sysfs_temp(2);
+sysfs_temp(3);
+sysfs_temp(4);
+
+#define device_create_file_temp(client, num) \
+	device_create_file(&client->dev, &dev_attr_temp##num##_input)
+
+/* FAN: 1 RPM/bit
+   REG: count of 90kHz pulses / revolution */
+static int fan_from_reg(u16 reg)
+{
+	return 90000 * 60 / reg;
+}
+
+/* 0 <= nr <= 3 */
+static ssize_t show_fan(struct device *dev, char *buf, int nr)
+{
+        struct smsc47b397_data *data = smsc47b397_update_device(dev);
+        return sprintf(buf, "%d\n", fan_from_reg(data->fan[nr]));
+}
+
+#define sysfs_fan(num) \
+static ssize_t show_fan##num(struct device *dev, char *buf) \
+{ \
+	return show_fan(dev, buf, num-1); \
+} \
+static DEVICE_ATTR(fan##num##_input, S_IRUGO, show_fan##num, NULL)
+
+sysfs_fan(1);
+sysfs_fan(2);
+sysfs_fan(3);
+sysfs_fan(4);
+
+#define device_create_file_fan(client, num) \
+	device_create_file(&client->dev, &dev_attr_fan##num##_input)
+
+static int smsc47b397_detect(struct i2c_adapter *adapter, int addr, int kind);
+
+static int smsc47b397_attach_adapter(struct i2c_adapter *adapter)
+{
+	if (!(adapter->class & I2C_CLASS_HWMON))
+		return 0;
+	return i2c_detect(adapter, &addr_data, smsc47b397_detect);
+}
+
+static int smsc47b397_detach_client(struct i2c_client *client)
+{
+	int err;
+
+	if ((err = i2c_detach_client(client))) {
+		dev_err(&client->dev, "Client deregistration failed, "
+			"client not detached.\n");
+		return err;
+	}
+
+	release_region(client->addr, SMSC_EXTENT);
+	kfree(i2c_get_clientdata(client));
+
+	return 0;
+}
+
+static struct i2c_driver smsc47b397_driver = {
+	.owner		= THIS_MODULE,
+	.name		= "smsc47b397",
+	.id		= I2C_DRIVERID_SMSC47B397,
+	.flags		= I2C_DF_NOTIFY,
+	.attach_adapter	= smsc47b397_attach_adapter,
+	.detach_client	= smsc47b397_detach_client,
+};
+
+static int smsc47b397_detect(struct i2c_adapter *adapter, int addr, int kind)
+{
+	struct i2c_client *new_client;
+	struct smsc47b397_data *data;
+	int err = 0;
+
+	if (!i2c_is_isa_adapter(adapter)) {
+		return 0;
+	}
+
+	if (!request_region(addr, SMSC_EXTENT, smsc47b397_driver.name)) {
+		dev_err(&adapter->dev, "Region 0x%x already in use!\n", addr);
+		return -EBUSY;
+	}
+
+	if (!(data = kmalloc(sizeof(struct smsc47b397_data), GFP_KERNEL))) {
+		err = -ENOMEM;
+		goto error_release;
+	}
+	memset(data, 0x00, sizeof(struct smsc47b397_data));
+
+	new_client = &data->client;
+	i2c_set_clientdata(new_client, data);
+	new_client->addr = addr;
+	init_MUTEX(&data->lock);
+	new_client->adapter = adapter;
+	new_client->driver = &smsc47b397_driver;
+	new_client->flags = 0;
+
+	strlcpy(new_client->name, "smsc47b397", I2C_NAME_SIZE);
+
+	init_MUTEX(&data->update_lock);
+
+	if ((err = i2c_attach_client(new_client)))
+		goto error_free;
+
+	device_create_file_temp(new_client, 1);
+	device_create_file_temp(new_client, 2);
+	device_create_file_temp(new_client, 3);
+	device_create_file_temp(new_client, 4);
+
+	device_create_file_fan(new_client, 1);
+	device_create_file_fan(new_client, 2);
+	device_create_file_fan(new_client, 3);
+	device_create_file_fan(new_client, 4);
+
+	return 0;
+
+error_free:
+	kfree(new_client);
+error_release:
+	release_region(addr, SMSC_EXTENT);
+	return err;
+}
+
+static int __init smsc47b397_find(unsigned int *addr)
+{
+	u8 id, rev;
+
+	superio_enter();
+	id = superio_inb(SUPERIO_REG_DEVID);
+
+	if (id != 0x6f) {
+		superio_exit();
+		return -ENODEV;
+	}
+
+	rev = superio_inb(SUPERIO_REG_DEVREV);
+
+	superio_select(SUPERIO_REG_LD8);
+	*addr = (superio_inb(SUPERIO_REG_BASE_MSB) << 8)
+		 |  superio_inb(SUPERIO_REG_BASE_LSB);
+
+	printk(KERN_INFO "smsc47b397: found SMSC LPC47B397-NC "
+		"(base address 0x%04x, revision %u)\n", *addr, rev);
+
+	superio_exit();
+	return 0;
+}
+
+static int __init smsc47b397_init(void)
+{
+	int ret;
+
+	if ((ret = smsc47b397_find(normal_isa)))
+		return ret;
+
+	return i2c_add_driver(&smsc47b397_driver);
+}
+
+static void __exit smsc47b397_exit(void)
+{
+	i2c_del_driver(&smsc47b397_driver);
+}
+
+MODULE_AUTHOR("Mark M. Hoffman <mhoffman@lightlink.com>");
+MODULE_DESCRIPTION("SMSC LPC47B397 driver");
+MODULE_LICENSE("GPL");
+
+module_init(smsc47b397_init);
+module_exit(smsc47b397_exit);
diff -Nru a/drivers/i2c/chips/smsc47m1.c b/drivers/i2c/chips/smsc47m1.c
--- a/drivers/i2c/chips/smsc47m1.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/i2c/chips/smsc47m1.c	2005-01-10 20:11:17 -08:00
@@ -400,7 +400,7 @@
 		return 0;
 	}
 
-	if (!request_region(address, SMSC_EXTENT, "smsc47m1")) {
+	if (!request_region(address, SMSC_EXTENT, smsc47m1_driver.name)) {
 		dev_err(&adapter->dev, "Region 0x%x already in use!\n", address);
 		return -EBUSY;
 	}
diff -Nru a/drivers/i2c/chips/via686a.c b/drivers/i2c/chips/via686a.c
--- a/drivers/i2c/chips/via686a.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/i2c/chips/via686a.c	2005-01-10 20:11:16 -08:00
@@ -613,7 +613,7 @@
 	}
 
 	/* Reserve the ISA region */
-	if (!request_region(address, VIA686A_EXTENT, "via686a-sensor")) {
+	if (!request_region(address, VIA686A_EXTENT, via686a_driver.name)) {
 		dev_err(&adapter->dev,"region 0x%x already in use!\n",
 		       address);
 		return -ENODEV;
diff -Nru a/drivers/i2c/chips/w83627hf.c b/drivers/i2c/chips/w83627hf.c
--- a/drivers/i2c/chips/w83627hf.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/i2c/chips/w83627hf.c	2005-01-10 20:11:21 -08:00
@@ -67,9 +67,9 @@
 MODULE_PARM_DESC(init, "Set to zero to bypass chip initialization");
 
 /* modified from kernel/include/traps.c */
-#define	REG	0x2e	/* The register to read/write */
+static int REG;		/* The register to read/write */
 #define	DEV	0x07	/* Register: Logical device select */
-#define	VAL	0x2f	/* The value to read/write */
+static int VAL;		/* The value to read/write */
 
 /* logical device numbers for superio_select (below) */
 #define W83627HF_LD_FDC		0x00
@@ -90,9 +90,9 @@
 
 #define	DEVID	0x20	/* Register: Device ID */
 
+#define W83627THF_GPIO5_EN	0x30 /* w83627thf only */
 #define W83627THF_GPIO5_IOSR	0xf3 /* w83627thf only */
 #define W83627THF_GPIO5_DR	0xf4 /* w83627thf only */
-#define W83627THF_GPIO5_INVR	0xf5 /* w83627thf only */
 
 static inline void
 superio_outb(int reg, int val)
@@ -938,10 +938,13 @@
 	return i2c_detect(adapter, &addr_data, w83627hf_detect);
 }
 
-static int w83627hf_find(int *address)
+static int w83627hf_find(int sioaddr, int *address)
 {
 	u16 val;
 
+	REG = sioaddr;
+	VAL = sioaddr + 1;
+
 	superio_enter();
 	val= superio_inb(DEVID);
 	if(val != W627_DEVID &&
@@ -984,7 +987,7 @@
 	if(force_addr)
 		address = force_addr & ~(WINB_EXTENT - 1);
 
-	if (!request_region(address, WINB_EXTENT, "w83627hf")) {
+	if (!request_region(address, WINB_EXTENT, w83627hf_driver.name)) {
 		err = -EBUSY;
 		goto ERROR0;
 	}
@@ -1187,16 +1190,31 @@
 
 static int w83627thf_read_gpio5(struct i2c_client *client)
 {
-	struct w83627hf_data *data = i2c_get_clientdata(client);
-	int res, inv;
+	int res = 0xff, sel;
 
-	down(&data->lock);
 	superio_enter();
 	superio_select(W83627HF_LD_GPIO5);
-	res = superio_inb(W83627THF_GPIO5_DR);
-	inv = superio_inb(W83627THF_GPIO5_INVR);
+
+	/* Make sure these GPIO pins are enabled */
+	if (!(superio_inb(W83627THF_GPIO5_EN) & (1<<3))) {
+		dev_dbg(&client->dev, "GPIO5 disabled, no VID function\n");
+		goto exit;
+	}
+
+	/* Make sure the pins are configured for input
+	   There must be at least five (VRM 9), and possibly 6 (VRM 10) */
+	sel = superio_inb(W83627THF_GPIO5_IOSR);
+	if ((sel & 0x1f) != 0x1f) {
+		dev_dbg(&client->dev, "GPIO5 not configured for VID "
+			"function\n");
+		goto exit;
+	}
+
+	dev_info(&client->dev, "Reading VID from GPIO5\n");
+	res = superio_inb(W83627THF_GPIO5_DR) & sel;
+
+exit:
 	superio_exit();
-	up(&data->lock);
 	return res;
 }
 
@@ -1269,7 +1287,7 @@
 		int hi = w83627hf_read_value(client, W83781D_REG_CHIPID);
 		data->vid = (lo & 0x0f) | ((hi & 0x01) << 4);
 	} else if (w83627thf == data->type) {
-		data->vid = w83627thf_read_gpio5(client) & 0x1f;
+		data->vid = w83627thf_read_gpio5(client) & 0x3f;
 	}
 
 	/* Read VRM & OVT Config only once */
@@ -1422,7 +1440,8 @@
 {
 	int addr;
 
-	if (w83627hf_find(&addr)) {
+	if (w83627hf_find(0x2e, &addr)
+	 && w83627hf_find(0x4e, &addr)) {
 		return -ENODEV;
 	}
 	normal_isa[0] = addr;
diff -Nru a/drivers/i2c/chips/w83781d.c b/drivers/i2c/chips/w83781d.c
--- a/drivers/i2c/chips/w83781d.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/i2c/chips/w83781d.c	2005-01-10 20:11:15 -08:00
@@ -1065,7 +1065,8 @@
 	}
 	
 	if (is_isa)
-		if (!request_region(address, W83781D_EXTENT, "w83781d")) {
+		if (!request_region(address, W83781D_EXTENT,
+				    w83781d_driver.name)) {
 			dev_dbg(&adapter->dev, "Request of region "
 				"0x%x-0x%x for w83781d failed\n", address,
 				address + W83781D_EXTENT - 1);
diff -Nru a/drivers/i2c/i2c-sensor-vid.c b/drivers/i2c/i2c-sensor-vid.c
--- a/drivers/i2c/i2c-sensor-vid.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/i2c/i2c-sensor-vid.c	2005-01-10 20:11:22 -08:00
@@ -36,8 +36,7 @@
 
 static struct vrm_model vrm_models[] = {
 	{X86_VENDOR_AMD, 0x6, ANY, 90},		/* Athlon Duron etc */
-	{X86_VENDOR_AMD, 0xF, 0x4, 90},		/* Athlon 64 */
-	{X86_VENDOR_AMD, 0xF, 0x5, 24},		/* Opteron */
+	{X86_VENDOR_AMD, 0xF, ANY, 24},		/* Athlon 64, Opteron */
 	{X86_VENDOR_INTEL, 0x6, 0x9, 85},	/* 0.13um too */
 	{X86_VENDOR_INTEL, 0x6, 0xB, 85},	/* 0xB Tualatin */
 	{X86_VENDOR_INTEL, 0x6, ANY, 82},	/* any P6 */
@@ -87,7 +86,7 @@
 	return vrm_ret;
 }
 
-/* and now something completely different for Non-x86 world*/
+/* and now for something completely different for Non-x86 world*/
 #else
 int i2c_which_vrm(void)
 {
diff -Nru a/drivers/ide/arm/icside.c b/drivers/ide/arm/icside.c
--- a/drivers/ide/arm/icside.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/ide/arm/icside.c	2005-01-10 20:11:19 -08:00
@@ -423,7 +423,7 @@
 		       drive->name, dma_stat);
 	}
 
-	return DRIVER(drive)->error(drive, __FUNCTION__, stat);
+	return ide_error(drive, __FUNCTION__, stat);
 }
 
 static int icside_dma_setup(ide_drive_t *drive)
diff -Nru a/drivers/ide/cris/ide-v10.c b/drivers/ide/cris/ide-v10.c
--- a/drivers/ide/cris/ide-v10.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/ide/cris/ide-v10.c	2005-01-10 20:11:19 -08:00
@@ -773,7 +773,7 @@
 		}
 		printk("%s: bad DMA status\n", drive->name);
 	}
-	return DRIVER(drive)->error(drive, "dma_intr", stat);
+	return ide_error(drive, "dma_intr", stat);
 }
 
 /*
diff -Nru a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
--- a/drivers/ide/ide-cd.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/ide/ide-cd.c	2005-01-10 20:11:18 -08:00
@@ -559,62 +559,6 @@
 	(void) ide_do_drive_cmd(drive, rq, ide_preempt);
 }
 
-/*
- * ide_error() takes action based on the error returned by the drive.
- */
-static ide_startstop_t ide_cdrom_error (ide_drive_t *drive, const char *msg, byte stat)
-{
-	struct request *rq;
-	byte err;
-
-	err = ide_dump_atapi_status(drive, msg, stat);
-	if (drive == NULL || (rq = HWGROUP(drive)->rq) == NULL)
-		return ide_stopped;
-	/* retry only "normal" I/O: */
-	if (rq->flags & (REQ_DRIVE_CMD | REQ_DRIVE_TASK | REQ_DRIVE_TASKFILE)) {
-		rq->errors = 1;
-		ide_end_drive_cmd(drive, stat, err);
-		return ide_stopped;
-	}
-
-	if (stat & BUSY_STAT || ((stat & WRERR_STAT) && !drive->nowerr)) {
-		/* other bits are useless when BUSY */
-		rq->errors |= ERROR_RESET;
-	} else {
-		/* add decoding error stuff */
-	}
-	if (HWIF(drive)->INB(IDE_STATUS_REG) & (BUSY_STAT|DRQ_STAT))
-		/* force an abort */
-		HWIF(drive)->OUTB(WIN_IDLEIMMEDIATE,IDE_COMMAND_REG);
-	if (rq->errors >= ERROR_MAX) {
-		DRIVER(drive)->end_request(drive, 0, 0);
-	} else {
-		if ((rq->errors & ERROR_RESET) == ERROR_RESET) {
-			++rq->errors;
-			return ide_do_reset(drive);
-		}
-		++rq->errors;
-	}
-	return ide_stopped;
-}
-
-static ide_startstop_t ide_cdrom_abort (ide_drive_t *drive, const char *msg)
-{
-	struct request *rq;
-
-	if (drive == NULL || (rq = HWGROUP(drive)->rq) == NULL)
-		return ide_stopped;
-	/* retry only "normal" I/O: */
-	if (rq->flags & (REQ_DRIVE_CMD | REQ_DRIVE_TASK | REQ_DRIVE_TASKFILE)) {
-		rq->errors = 1;
-		ide_end_drive_cmd(drive, BUSY_STAT, 0);
-		return ide_stopped;
-	}
-	rq->errors |= ERROR_RESET;
-	DRIVER(drive)->end_request(drive, 0, 0);
-	return ide_stopped;
-}
-
 static void cdrom_end_request (ide_drive_t *drive, int uptodate)
 {
 	struct request *rq = HWGROUP(drive)->rq;
@@ -690,7 +634,7 @@
 
 		rq->flags |= REQ_FAILED;
 		cdrom_end_request(drive, 0);
-		DRIVER(drive)->error(drive, "request sense failure", stat);
+		ide_error(drive, "request sense failure", stat);
 		return 1;
 
 	} else if (rq->flags & (REQ_PC | REQ_BLOCK_PC)) {
@@ -801,7 +745,7 @@
 		} else if ((err & ~ABRT_ERR) != 0) {
 			/* Go to the default handler
 			   for other errors. */
-			DRIVER(drive)->error(drive, "cdrom_decode_status",stat);
+			ide_error(drive, "cdrom_decode_status", stat);
 			return 1;
 		} else if ((++rq->errors > ERROR_MAX)) {
 			/* We've racked up too many retries.  Abort. */
@@ -1070,7 +1014,7 @@
 			ide_end_request(drive, 1, rq->nr_sectors);
 			return ide_stopped;
 		} else
-			return DRIVER(drive)->error(drive, "dma error", stat);
+			return ide_error(drive, "dma error", stat);
 	}
 
 	/* Read the interrupt reason and the transfer length. */
@@ -1673,7 +1617,7 @@
 		if (dma_error) {
 			printk("ide-cd: dma error\n");
 			__ide_dma_off(drive);
-			return DRIVER(drive)->error(drive, "dma error", stat);
+			return ide_error(drive, "dma error", stat);
 		}
 
 		end_that_request_chunk(rq, 1, rq->data_len);
@@ -1811,7 +1755,7 @@
 	 */
 	if (dma) {
 		if (dma_error)
-			return DRIVER(drive)->error(drive, "dma error", stat);
+			return ide_error(drive, "dma error", stat);
 
 		ide_end_request(drive, 1, rq->nr_sectors);
 		return ide_stopped;
@@ -2744,9 +2688,9 @@
 	 */
 	if (sense.sense_key == NOT_READY) {
 		if (sense.asc == 0x3a) {
-			if (sense.ascq == 0 || sense.ascq == 1)
+			if (sense.ascq == 1)
 				return CDS_NO_DISC;
-			else if (sense.ascq == 2)
+			else if (sense.ascq == 0 || sense.ascq == 2)
 				return CDS_TRAY_OPEN;
 		}
 	}
@@ -3369,9 +3313,6 @@
 	.supports_dsc_overlap	= 1,
 	.cleanup		= ide_cdrom_cleanup,
 	.do_request		= ide_do_rw_cdrom,
-	.sense			= ide_dump_atapi_status,
-	.error			= ide_cdrom_error,
-	.abort			= ide_cdrom_abort,
 	.capacity		= ide_cdrom_capacity,
 	.attach			= ide_cdrom_attach,
 	.drives			= LIST_HEAD_INIT(ide_cdrom_driver.drives),
diff -Nru a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c
--- a/drivers/ide/ide-disk.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/ide/ide-disk.c	2005-01-10 20:11:18 -08:00
@@ -287,189 +287,6 @@
 		return __ide_do_rw_disk(drive, rq, block);
 }
 
-static u8 idedisk_dump_status (ide_drive_t *drive, const char *msg, u8 stat)
-{
-	ide_hwif_t *hwif = HWIF(drive);
-	unsigned long flags;
-	u8 err = 0;
-
-	local_irq_set(flags);
-	printk("%s: %s: status=0x%02x", drive->name, msg, stat);
-	printk(" { ");
-	if (stat & BUSY_STAT)
-		printk("Busy ");
-	else {
-		if (stat & READY_STAT)	printk("DriveReady ");
-		if (stat & WRERR_STAT)	printk("DeviceFault ");
-		if (stat & SEEK_STAT)	printk("SeekComplete ");
-		if (stat & DRQ_STAT)	printk("DataRequest ");
-		if (stat & ECC_STAT)	printk("CorrectedError ");
-		if (stat & INDEX_STAT)	printk("Index ");
-		if (stat & ERR_STAT)	printk("Error ");
-	}
-	printk("}");
-	printk("\n");
-	if ((stat & (BUSY_STAT|ERR_STAT)) == ERR_STAT) {
-		err = hwif->INB(IDE_ERROR_REG);
-		printk("%s: %s: error=0x%02x", drive->name, msg, err);
-		printk(" { ");
-		if (err & ABRT_ERR)	printk("DriveStatusError ");
-		if (err & ICRC_ERR)
-			printk("Bad%s ", (err & ABRT_ERR) ? "CRC" : "Sector");
-		if (err & ECC_ERR)	printk("UncorrectableError ");
-		if (err & ID_ERR)	printk("SectorIdNotFound ");
-		if (err & TRK0_ERR)	printk("TrackZeroNotFound ");
-		if (err & MARK_ERR)	printk("AddrMarkNotFound ");
-		printk("}");
-		if ((err & (BBD_ERR | ABRT_ERR)) == BBD_ERR ||
-		    (err & (ECC_ERR|ID_ERR|MARK_ERR))) {
-			if (drive->addressing == 1) {
-				__u64 sectors = 0;
-				u32 low = 0, high = 0;
-				low = ide_read_24(drive);
-				hwif->OUTB(drive->ctl|0x80, IDE_CONTROL_REG);
-				high = ide_read_24(drive);
-				sectors = ((__u64)high << 24) | low;
-				printk(", LBAsect=%llu, high=%d, low=%d",
-				       (unsigned long long) sectors,
-				       high, low);
-			} else {
-				u8 cur = hwif->INB(IDE_SELECT_REG);
-				if (cur & 0x40) {	/* using LBA? */
-					printk(", LBAsect=%ld", (unsigned long)
-					 ((cur&0xf)<<24)
-					 |(hwif->INB(IDE_HCYL_REG)<<16)
-					 |(hwif->INB(IDE_LCYL_REG)<<8)
-					 | hwif->INB(IDE_SECTOR_REG));
-				} else {
-					printk(", CHS=%d/%d/%d",
-					 (hwif->INB(IDE_HCYL_REG)<<8) +
-					  hwif->INB(IDE_LCYL_REG),
-					  cur & 0xf,
-					  hwif->INB(IDE_SECTOR_REG));
-				}
-			}
-			if (HWGROUP(drive) && HWGROUP(drive)->rq)
-				printk(", sector=%llu",
-					(unsigned long long)HWGROUP(drive)->rq->sector);
-		}
-	}
-	printk("\n");
-	{
-		struct request *rq;
-		unsigned char opcode = 0;
-		int found = 0;
-
-		spin_lock(&ide_lock);
-		rq = HWGROUP(drive)->rq;
-		spin_unlock(&ide_lock);
-		if (!rq)
-			goto out;
-		if (rq->flags & (REQ_DRIVE_CMD | REQ_DRIVE_TASK)) {
-			char *args = rq->buffer;
-			if (args) {
-				opcode = args[0];
-				found = 1;
-			}
-		} else if (rq->flags & REQ_DRIVE_TASKFILE) {
-			ide_task_t *args = rq->special;
-			if (args) {
-				task_struct_t *tf = (task_struct_t *) args->tfRegister;
-				opcode = tf->command;
-				found = 1;
-			}
-		}
-		printk("ide: failed opcode was: ");
-		if (!found)
-			printk("unknown\n");
-		else
-			printk("0x%02x\n", opcode);
-	}
-out:
-	local_irq_restore(flags);
-	return err;
-}
-
-static ide_startstop_t idedisk_error (ide_drive_t *drive, const char *msg, u8 stat)
-{
-	ide_hwif_t *hwif;
-	struct request *rq;
-	u8 err;
-
-	err = idedisk_dump_status(drive, msg, stat);
-
-	if (drive == NULL || (rq = HWGROUP(drive)->rq) == NULL)
-		return ide_stopped;
-
-	hwif = HWIF(drive);
-	/* retry only "normal" I/O: */
-	if (rq->flags & (REQ_DRIVE_CMD | REQ_DRIVE_TASK | REQ_DRIVE_TASKFILE)) {
-		rq->errors = 1;
-		ide_end_drive_cmd(drive, stat, err);
-		return ide_stopped;
-	}
-
-	if (stat & BUSY_STAT || ((stat & WRERR_STAT) && !drive->nowerr)) {
-		/* other bits are useless when BUSY */
-		rq->errors |= ERROR_RESET;
-	} else if (stat & ERR_STAT) {
-		/* err has different meaning on cdrom and tape */
-		if (err == ABRT_ERR) {
-			if (drive->select.b.lba &&
-			    /* some newer drives don't support WIN_SPECIFY */
-			    hwif->INB(IDE_COMMAND_REG) == WIN_SPECIFY)
-				return ide_stopped;
-		} else if ((err & BAD_CRC) == BAD_CRC) {
-			/* UDMA crc error, just retry the operation */
-			drive->crc_count++;
-		} else if (err & (BBD_ERR | ECC_ERR)) {
-			/* retries won't help these */
-			rq->errors = ERROR_MAX;
-		} else if (err & TRK0_ERR) {
-			/* help it find track zero */
-			rq->errors |= ERROR_RECAL;
-		}
-	}
-	if ((stat & DRQ_STAT) && rq_data_dir(rq) == READ)
-		try_to_flush_leftover_data(drive);
-	if (hwif->INB(IDE_STATUS_REG) & (BUSY_STAT|DRQ_STAT)) {
-		/* force an abort */
-		hwif->OUTB(WIN_IDLEIMMEDIATE,IDE_COMMAND_REG);
-	}
-	if (rq->errors >= ERROR_MAX || blk_noretry_request(rq))
-		DRIVER(drive)->end_request(drive, 0, 0);
-	else {
-		if ((rq->errors & ERROR_RESET) == ERROR_RESET) {
-			++rq->errors;
-			return ide_do_reset(drive);
-		}
-		if ((rq->errors & ERROR_RECAL) == ERROR_RECAL)
-			drive->special.b.recalibrate = 1;
-		++rq->errors;
-	}
-	return ide_stopped;
-}
-
-static ide_startstop_t idedisk_abort(ide_drive_t *drive, const char *msg)
-{
-	ide_hwif_t *hwif;
-	struct request *rq;
-
-	if (drive == NULL || (rq = HWGROUP(drive)->rq) == NULL)
-		return ide_stopped;
-
-	hwif = HWIF(drive);
-
-	if (rq->flags & (REQ_DRIVE_CMD | REQ_DRIVE_TASK | REQ_DRIVE_TASKFILE)) {
-		rq->errors = 1;
-		ide_end_drive_cmd(drive, BUSY_STAT, 0);
-		return ide_stopped;
-	}
-
-	DRIVER(drive)->end_request(drive, 0, 0);
-	return ide_stopped;
-}
-
 /*
  * Queries for true maximum capacity of the drive.
  * Returns maximum LBA address (> 0) of the drive, 0 if failed.
@@ -1358,9 +1175,6 @@
 	.supports_dsc_overlap	= 0,
 	.cleanup		= idedisk_cleanup,
 	.do_request		= ide_do_rw_disk,
-	.sense			= idedisk_dump_status,
-	.error			= idedisk_error,
-	.abort			= idedisk_abort,
 	.pre_reset		= idedisk_pre_reset,
 	.capacity		= idedisk_capacity,
 	.special		= idedisk_special,
@@ -1434,7 +1248,7 @@
 static int idedisk_revalidate_disk(struct gendisk *disk)
 {
 	ide_drive_t *drive = disk->private_data;
-	set_capacity(disk, current_capacity(drive));
+	set_capacity(disk, idedisk_capacity(drive));
 	return 0;
 }
 
@@ -1478,7 +1292,7 @@
 	strcpy(g->devfs_name, drive->devfs_name);
 	g->driverfs_dev = &drive->gendev;
 	g->flags = drive->removable ? GENHD_FL_REMOVABLE : 0;
-	set_capacity(g, current_capacity(drive));
+	set_capacity(g, idedisk_capacity(drive));
 	g->fops = &idedisk_ops;
 	add_disk(g);
 	return 0;
diff -Nru a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c
--- a/drivers/ide/ide-dma.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/ide/ide-dma.c	2005-01-10 20:11:19 -08:00
@@ -116,7 +116,6 @@
 	{ "Compaq CRD-8241B"	,	"ALL"		},
 	{ "CRD-8400B"		,	"ALL"		},
 	{ "CRD-8480B",			"ALL"		},
-	{ "CRD-8480C",			"ALL"		},
 	{ "CRD-8482B",			"ALL"		},
  	{ "CRD-84"		,	"ALL"		},
 	{ "SanDisk SDP3B"	,	"ALL"		},
@@ -184,7 +183,7 @@
 		printk(KERN_ERR "%s: dma_intr: bad DMA status (dma_stat=%x)\n", 
 		       drive->name, dma_stat);
 	}
-	return DRIVER(drive)->error(drive, "dma_intr", stat);
+	return ide_error(drive, "dma_intr", stat);
 }
 
 EXPORT_SYMBOL_GPL(ide_dma_intr);
diff -Nru a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c
--- a/drivers/ide/ide-floppy.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/ide/ide-floppy.c	2005-01-10 20:11:19 -08:00
@@ -1640,7 +1640,7 @@
 }
 
 /*
- *	Return the current floppy capacity to ide.c.
+ *	Return the current floppy capacity.
  */
 static sector_t idefloppy_capacity (ide_drive_t *drive)
 {
@@ -2034,7 +2034,7 @@
 static int idefloppy_revalidate_disk(struct gendisk *disk)
 {
 	ide_drive_t *drive = disk->private_data;
-	set_capacity(disk, current_capacity(drive));
+	set_capacity(disk, idefloppy_capacity(drive));
 	return 0;
 }
 
diff -Nru a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
--- a/drivers/ide/ide-io.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/ide/ide-io.c	2005-01-10 20:11:21 -08:00
@@ -454,9 +454,88 @@
 
 EXPORT_SYMBOL(try_to_flush_leftover_data);
 
-/*
- * FIXME Add an ATAPI error
- */
+static ide_startstop_t ide_ata_error(ide_drive_t *drive, struct request *rq, u8 stat, u8 err)
+{
+	ide_hwif_t *hwif = drive->hwif;
+
+	if (stat & BUSY_STAT || ((stat & WRERR_STAT) && !drive->nowerr)) {
+		/* other bits are useless when BUSY */
+		rq->errors |= ERROR_RESET;
+	} else if (stat & ERR_STAT) {
+		/* err has different meaning on cdrom and tape */
+		if (err == ABRT_ERR) {
+			if (drive->select.b.lba &&
+			    /* some newer drives don't support WIN_SPECIFY */
+			    hwif->INB(IDE_COMMAND_REG) == WIN_SPECIFY)
+				return ide_stopped;
+		} else if ((err & BAD_CRC) == BAD_CRC) {
+			/* UDMA crc error, just retry the operation */
+			drive->crc_count++;
+		} else if (err & (BBD_ERR | ECC_ERR)) {
+			/* retries won't help these */
+			rq->errors = ERROR_MAX;
+		} else if (err & TRK0_ERR) {
+			/* help it find track zero */
+			rq->errors |= ERROR_RECAL;
+		}
+	}
+
+	if ((stat & DRQ_STAT) && rq_data_dir(rq) == READ)
+		try_to_flush_leftover_data(drive);
+
+	if (hwif->INB(IDE_STATUS_REG) & (BUSY_STAT|DRQ_STAT))
+		/* force an abort */
+		hwif->OUTB(WIN_IDLEIMMEDIATE, IDE_COMMAND_REG);
+
+	if (rq->errors >= ERROR_MAX || blk_noretry_request(rq))
+		drive->driver->end_request(drive, 0, 0);
+	else {
+		if ((rq->errors & ERROR_RESET) == ERROR_RESET) {
+			++rq->errors;
+			return ide_do_reset(drive);
+		}
+		if ((rq->errors & ERROR_RECAL) == ERROR_RECAL)
+			drive->special.b.recalibrate = 1;
+		++rq->errors;
+	}
+	return ide_stopped;
+}
+
+static ide_startstop_t ide_atapi_error(ide_drive_t *drive, struct request *rq, u8 stat, u8 err)
+{
+	ide_hwif_t *hwif = drive->hwif;
+
+	if (stat & BUSY_STAT || ((stat & WRERR_STAT) && !drive->nowerr)) {
+		/* other bits are useless when BUSY */
+		rq->errors |= ERROR_RESET;
+	} else {
+		/* add decoding error stuff */
+	}
+
+	if (hwif->INB(IDE_STATUS_REG) & (BUSY_STAT|DRQ_STAT))
+		/* force an abort */
+		hwif->OUTB(WIN_IDLEIMMEDIATE, IDE_COMMAND_REG);
+
+	if (rq->errors >= ERROR_MAX) {
+		drive->driver->end_request(drive, 0, 0);
+	} else {
+		if ((rq->errors & ERROR_RESET) == ERROR_RESET) {
+			++rq->errors;
+			return ide_do_reset(drive);
+		}
+		++rq->errors;
+	}
+
+	return ide_stopped;
+}
+
+ide_startstop_t
+__ide_error(ide_drive_t *drive, struct request *rq, u8 stat, u8 err)
+{
+	if (drive->media == ide_disk)
+		return ide_ata_error(drive, rq, stat, err);
+	return ide_atapi_error(drive, rq, stat, err);
+}
 
 /**
  *	ide_error	-	handle an error on the IDE
@@ -473,73 +552,32 @@
  
 ide_startstop_t ide_error (ide_drive_t *drive, const char *msg, u8 stat)
 {
-	ide_hwif_t *hwif;
 	struct request *rq;
 	u8 err;
 
 	err = ide_dump_status(drive, msg, stat);
+
 	if (drive == NULL || (rq = HWGROUP(drive)->rq) == NULL)
 		return ide_stopped;
 
-	hwif = HWIF(drive);
 	/* retry only "normal" I/O: */
-	if (rq->flags & (REQ_DRIVE_CMD | REQ_DRIVE_TASK)) {
-		rq->errors = 1;
-		ide_end_drive_cmd(drive, stat, err);
-		return ide_stopped;
-	}
-	if (rq->flags & REQ_DRIVE_TASKFILE) {
+	if (rq->flags & (REQ_DRIVE_CMD | REQ_DRIVE_TASK | REQ_DRIVE_TASKFILE)) {
 		rq->errors = 1;
 		ide_end_drive_cmd(drive, stat, err);
 		return ide_stopped;
 	}
 
-	if (stat & BUSY_STAT || ((stat & WRERR_STAT) && !drive->nowerr)) {
-		 /* other bits are useless when BUSY */
+	return drive->driver->error(drive, rq, stat, err);
+}
+
+EXPORT_SYMBOL_GPL(ide_error);
+
+ide_startstop_t __ide_abort(ide_drive_t *drive, struct request *rq)
+{
+	if (drive->media != ide_disk)
 		rq->errors |= ERROR_RESET;
-	} else {
-		if (drive->media != ide_disk)
-			goto media_out;
 
-		if (stat & ERR_STAT) {
-			/* err has different meaning on cdrom and tape */
-			if (err == ABRT_ERR) {
-				if (drive->select.b.lba &&
-				    (hwif->INB(IDE_COMMAND_REG) == WIN_SPECIFY))
-					/* some newer drives don't
-					 * support WIN_SPECIFY
-					 */
-					return ide_stopped;
-			} else if ((err & BAD_CRC) == BAD_CRC) {
-				drive->crc_count++;
-				/* UDMA crc error -- just retry the operation */
-			} else if (err & (BBD_ERR | ECC_ERR)) {
-				/* retries won't help these */
-				rq->errors = ERROR_MAX;
-			} else if (err & TRK0_ERR) {
-				/* help it find track zero */
-				rq->errors |= ERROR_RECAL;
-			}
-		}
-media_out:
-		if ((stat & DRQ_STAT) && rq_data_dir(rq) != WRITE)
-			try_to_flush_leftover_data(drive);
-	}
-	if (hwif->INB(IDE_STATUS_REG) & (BUSY_STAT|DRQ_STAT)) {
-		/* force an abort */
-		hwif->OUTB(WIN_IDLEIMMEDIATE,IDE_COMMAND_REG);
-	}
-	if (rq->errors >= ERROR_MAX) {
-		DRIVER(drive)->end_request(drive, 0, 0);
-	} else {
-		if ((rq->errors & ERROR_RESET) == ERROR_RESET) {
-			++rq->errors;
-			return ide_do_reset(drive);
-		}
-		if ((rq->errors & ERROR_RECAL) == ERROR_RECAL)
-			drive->special.b.recalibrate = 1;
-		++rq->errors;
-	}
+	DRIVER(drive)->end_request(drive, 0, 0);
 	return ide_stopped;
 }
 
@@ -559,28 +597,19 @@
  
 ide_startstop_t ide_abort(ide_drive_t *drive, const char *msg)
 {
-	ide_hwif_t *hwif;
 	struct request *rq;
 
 	if (drive == NULL || (rq = HWGROUP(drive)->rq) == NULL)
 		return ide_stopped;
 
-	hwif = HWIF(drive);
 	/* retry only "normal" I/O: */
-	if (rq->flags & (REQ_DRIVE_CMD | REQ_DRIVE_TASK)) {
-		rq->errors = 1;
-		ide_end_drive_cmd(drive, BUSY_STAT, 0);
-		return ide_stopped;
-	}
-	if (rq->flags & REQ_DRIVE_TASKFILE) {
+	if (rq->flags & (REQ_DRIVE_CMD | REQ_DRIVE_TASK | REQ_DRIVE_TASKFILE)) {
 		rq->errors = 1;
 		ide_end_drive_cmd(drive, BUSY_STAT, 0);
 		return ide_stopped;
 	}
 
-	rq->errors |= ERROR_RESET;
-	DRIVER(drive)->end_request(drive, 0, 0);
-	return ide_stopped;
+	return drive->driver->abort(drive, rq);
 }
 
 /**
@@ -634,7 +663,7 @@
 	}
 
 	if (!OK_STAT(stat, READY_STAT, BAD_STAT) && DRIVER(drive) != NULL)
-		return DRIVER(drive)->error(drive, "drive_cmd", stat);
+		return ide_error(drive, "drive_cmd", stat);
 		/* calls ide_end_drive_cmd */
 	ide_end_drive_cmd(drive, stat, hwif->INB(IDE_ERROR_REG));
 	return ide_stopped;
@@ -1181,7 +1210,7 @@
 	if (error < 0) {
 		printk(KERN_WARNING "%s: DMA timeout error\n", drive->name);
 		(void)HWIF(drive)->ide_dma_end(drive);
-		ret = DRIVER(drive)->error(drive, "dma timeout error",
+		ret = ide_error(drive, "dma timeout error",
 						hwif->INB(IDE_STATUS_REG));
 	} else {
 		printk(KERN_WARNING "%s: DMA timeout retry\n", drive->name);
@@ -1212,7 +1241,7 @@
 	rq->sector = rq->bio->bi_sector;
 	rq->current_nr_sectors = bio_iovec(rq->bio)->bv_len >> 9;
 	rq->hard_cur_sectors = rq->current_nr_sectors;
-	rq->buffer = NULL;
+	rq->buffer = bio_data(rq->bio);
 out:
 	return ret;
 }
@@ -1304,7 +1333,7 @@
 					startstop = ide_dma_timeout_retry(drive, wait);
 				} else
 					startstop =
-					DRIVER(drive)->error(drive, "irq timeout", hwif->INB(IDE_STATUS_REG));
+					ide_error(drive, "irq timeout", hwif->INB(IDE_STATUS_REG));
 			}
 			drive->service_time = jiffies - drive->service_start;
 			spin_lock_irq(&ide_lock);
diff -Nru a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c
--- a/drivers/ide/ide-iops.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/ide/ide-iops.c	2005-01-10 20:11:18 -08:00
@@ -576,7 +576,7 @@
 					break;
 
 				local_irq_restore(flags);
-				*startstop = DRIVER(drive)->error(drive, "status timeout", stat);
+				*startstop = ide_error(drive, "status timeout", stat);
 				return 1;
 			}
 		}
@@ -594,7 +594,7 @@
 		if (OK_STAT((stat = hwif->INB(IDE_STATUS_REG)), good, bad))
 			return 0;
 	}
-	*startstop = DRIVER(drive)->error(drive, "status error", stat);
+	*startstop = ide_error(drive, "status error", stat);
 	return 1;
 }
 
diff -Nru a/drivers/ide/ide-lib.c b/drivers/ide/ide-lib.c
--- a/drivers/ide/ide-lib.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/ide/ide-lib.c	2005-01-10 20:11:22 -08:00
@@ -445,6 +445,114 @@
 
 EXPORT_SYMBOL_GPL(ide_set_xfer_rate);
 
+static void ide_dump_opcode(ide_drive_t *drive)
+{
+	struct request *rq;
+	u8 opcode = 0;
+	int found = 0;
+
+	spin_lock(&ide_lock);
+	rq = NULL;
+	if (HWGROUP(drive))
+		rq = HWGROUP(drive)->rq;
+	spin_unlock(&ide_lock);
+	if (!rq)
+		return;
+	if (rq->flags & (REQ_DRIVE_CMD | REQ_DRIVE_TASK)) {
+		char *args = rq->buffer;
+		if (args) {
+			opcode = args[0];
+			found = 1;
+		}
+	} else if (rq->flags & REQ_DRIVE_TASKFILE) {
+		ide_task_t *args = rq->special;
+		if (args) {
+			task_struct_t *tf = (task_struct_t *) args->tfRegister;
+			opcode = tf->command;
+			found = 1;
+		}
+	}
+
+	printk("ide: failed opcode was: ");
+	if (!found)
+		printk("unknown\n");
+	else
+		printk("0x%02x\n", opcode);
+}
+
+static u8 ide_dump_ata_status(ide_drive_t *drive, const char *msg, u8 stat)
+{
+	ide_hwif_t *hwif = HWIF(drive);
+	unsigned long flags;
+	u8 err = 0;
+
+	local_irq_set(flags);
+	printk("%s: %s: status=0x%02x", drive->name, msg, stat);
+	printk(" { ");
+	if (stat & BUSY_STAT)
+		printk("Busy ");
+	else {
+		if (stat & READY_STAT)	printk("DriveReady ");
+		if (stat & WRERR_STAT)	printk("DeviceFault ");
+		if (stat & SEEK_STAT)	printk("SeekComplete ");
+		if (stat & DRQ_STAT)	printk("DataRequest ");
+		if (stat & ECC_STAT)	printk("CorrectedError ");
+		if (stat & INDEX_STAT)	printk("Index ");
+		if (stat & ERR_STAT)	printk("Error ");
+	}
+	printk("}");
+	printk("\n");
+	if ((stat & (BUSY_STAT|ERR_STAT)) == ERR_STAT) {
+		err = hwif->INB(IDE_ERROR_REG);
+		printk("%s: %s: error=0x%02x", drive->name, msg, err);
+		printk(" { ");
+		if (err & ABRT_ERR)	printk("DriveStatusError ");
+		if (err & ICRC_ERR)
+			printk("Bad%s ", (err & ABRT_ERR) ? "CRC" : "Sector");
+		if (err & ECC_ERR)	printk("UncorrectableError ");
+		if (err & ID_ERR)	printk("SectorIdNotFound ");
+		if (err & TRK0_ERR)	printk("TrackZeroNotFound ");
+		if (err & MARK_ERR)	printk("AddrMarkNotFound ");
+		printk("}");
+		if ((err & (BBD_ERR | ABRT_ERR)) == BBD_ERR ||
+		    (err & (ECC_ERR|ID_ERR|MARK_ERR))) {
+			if (drive->addressing == 1) {
+				__u64 sectors = 0;
+				u32 low = 0, high = 0;
+				low = ide_read_24(drive);
+				hwif->OUTB(drive->ctl|0x80, IDE_CONTROL_REG);
+				high = ide_read_24(drive);
+				sectors = ((__u64)high << 24) | low;
+				printk(", LBAsect=%llu, high=%d, low=%d",
+				       (unsigned long long) sectors,
+				       high, low);
+			} else {
+				u8 cur = hwif->INB(IDE_SELECT_REG);
+				if (cur & 0x40) {	/* using LBA? */
+					printk(", LBAsect=%ld", (unsigned long)
+					 ((cur&0xf)<<24)
+					 |(hwif->INB(IDE_HCYL_REG)<<16)
+					 |(hwif->INB(IDE_LCYL_REG)<<8)
+					 | hwif->INB(IDE_SECTOR_REG));
+				} else {
+					printk(", CHS=%d/%d/%d",
+					 (hwif->INB(IDE_HCYL_REG)<<8) +
+					  hwif->INB(IDE_LCYL_REG),
+					  cur & 0xf,
+					  hwif->INB(IDE_SECTOR_REG));
+				}
+			}
+			if (HWGROUP(drive) && HWGROUP(drive)->rq)
+				printk(", sector=%llu",
+					(unsigned long long)HWGROUP(drive)->rq->sector);
+		}
+	}
+	printk("\n");
+	ide_dump_opcode(drive);
+	local_irq_restore(flags);
+	return err;
+}
+
 /**
  *	ide_dump_atapi_status       -       print human readable atapi status
  *	@drive: drive that status applies to
@@ -453,7 +561,8 @@
  *
  *	Error reporting, in human readable form (luxurious, but a memory hog).
  */
-byte ide_dump_atapi_status (ide_drive_t *drive, const char *msg, byte stat)
+
+static u8 ide_dump_atapi_status(ide_drive_t *drive, const char *msg, u8 stat)
 {
 	unsigned long flags;
 
@@ -488,8 +597,27 @@
 						error.b.sense_key);
 		printk("\n");
 	}
+	ide_dump_opcode(drive);
 	local_irq_restore(flags);
 	return error.all;
 }
 
-EXPORT_SYMBOL(ide_dump_atapi_status);
+/**
+ *	ide_dump_status		-	translate ATA/ATAPI error
+ *	@drive: drive the error occured on
+ *	@msg: information string
+ *	@stat: status byte
+ *
+ *	Error reporting, in human readable form (luxurious, but a memory hog).
+ *	Combines the drive name, message and status byte to provide a
+ *	user understandable explanation of the device error.
+ */
+
+u8 ide_dump_status(ide_drive_t *drive, const char *msg, u8 stat)
+{
+	if (drive->media == ide_disk)
+		return ide_dump_ata_status(drive, msg, stat);
+	return ide_dump_atapi_status(drive, msg, stat);
+}
+
+EXPORT_SYMBOL(ide_dump_status);
diff -Nru a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c
--- a/drivers/ide/ide-proc.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/ide/ide-proc.c	2005-01-10 20:11:19 -08:00
@@ -492,20 +492,6 @@
 	}
 }
 
-static void destroy_proc_ide_interfaces(void)
-{
-	int	h;
-
-	for (h = 0; h < MAX_HWIFS; h++) {
-		ide_hwif_t *hwif = &ide_hwifs[h];
-#if 0
-		if (!hwif->present)
-			continue;
-#endif
-		destroy_proc_ide_interface(hwif);
-	}
-}
-
 extern struct seq_operations ide_drivers_op;
 static int ide_drivers_open(struct inode *inode, struct file *file)
 {
@@ -535,6 +521,5 @@
 void proc_ide_destroy(void)
 {
 	remove_proc_entry("ide/drivers", proc_ide_root);
-	destroy_proc_ide_interfaces();
 	remove_proc_entry("ide", NULL);
 }
diff -Nru a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c
--- a/drivers/ide/ide-taskfile.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/ide/ide-taskfile.c	2005-01-10 20:11:15 -08:00
@@ -199,7 +199,7 @@
 		return ide_stopped;
 
 	if (stat & (ERR_STAT|DRQ_STAT))
-		return DRIVER(drive)->error(drive, "set_geometry_intr", stat);
+		return ide_error(drive, "set_geometry_intr", stat);
 
 	if (HWGROUP(drive)->handler != NULL)
 		BUG();
@@ -218,7 +218,7 @@
 	u8 stat;
 
 	if (!OK_STAT(stat = hwif->INB(IDE_STATUS_REG), READY_STAT, BAD_STAT))
-		return DRIVER(drive)->error(drive, "recal_intr", stat);
+		return ide_error(drive, "recal_intr", stat);
 	return ide_stopped;
 }
 
@@ -235,7 +235,7 @@
 
 	local_irq_enable();
 	if (!OK_STAT(stat = hwif->INB(IDE_STATUS_REG),READY_STAT,BAD_STAT)) {
-		return DRIVER(drive)->error(drive, "task_no_data_intr", stat);
+		return ide_error(drive, "task_no_data_intr", stat);
 		/* calls ide_end_drive_cmd */
 	}
 	if (args)
@@ -363,7 +363,7 @@
 		if (sectors > 0)
 			drive->driver->end_request(drive, 1, sectors);
 	}
-	return drive->driver->error(drive, s, stat);
+	return ide_error(drive, s, stat);
 }
 
 static void task_end_request(ide_drive_t *drive, struct request *rq, u8 stat)
diff -Nru a/drivers/ide/ide.c b/drivers/ide/ide.c
--- a/drivers/ide/ide.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/ide/ide.c	2005-01-10 20:11:17 -08:00
@@ -358,137 +358,6 @@
 	return system_bus_speed;
 }
 
-/**
- *	current_capacity	-	drive capacity
- *	@drive: drive to query
- *
- *	Return the current capacity (in sectors) of a drive according to
- *	its current geometry/LBA settings. Empty removables are reported
- *	as size zero.
- */
-
-sector_t current_capacity (ide_drive_t *drive)
-{
-	if (!drive->present)
-		return 0;
-	return DRIVER(drive)->capacity(drive);
-}
-
-EXPORT_SYMBOL(current_capacity);
-
-/**
- *	ide_dump_status		-	translate ATA error
- *	@drive: drive the error occured on
- *	@msg: information string
- *	@stat: status byte
- *
- *	Error reporting, in human readable form (luxurious, but a memory hog).
- *	Combines the drive name, message and status byte to provide a
- *	user understandable explanation of the device error.
- */
-
-u8 ide_dump_status (ide_drive_t *drive, const char *msg, u8 stat)
-{
-	ide_hwif_t *hwif = HWIF(drive);
-	unsigned long flags;
-	u8 err = 0;
-
-	local_irq_set(flags);
-	printk(KERN_WARNING "%s: %s: status=0x%02x", drive->name, msg, stat);
-	printk(" { ");
-	if (stat & BUSY_STAT) {
-		printk("Busy ");
-	} else {
-		if (stat & READY_STAT)	printk("DriveReady ");
-		if (stat & WRERR_STAT)	printk("DeviceFault ");
-		if (stat & SEEK_STAT)	printk("SeekComplete ");
-		if (stat & DRQ_STAT)	printk("DataRequest ");
-		if (stat & ECC_STAT)	printk("CorrectedError ");
-		if (stat & INDEX_STAT)	printk("Index ");
-		if (stat & ERR_STAT)	printk("Error ");
-	}
-	printk("}");
-	printk("\n");
-	if ((stat & (BUSY_STAT|ERR_STAT)) == ERR_STAT) {
-		err = hwif->INB(IDE_ERROR_REG);
-		printk("%s: %s: error=0x%02x", drive->name, msg, err);
-		if (drive->media == ide_disk) {
-			printk(" { ");
-			if (err & ABRT_ERR)	printk("DriveStatusError ");
-			if (err & ICRC_ERR)	printk("Bad%s ", (err & ABRT_ERR) ? "CRC" : "Sector");
-			if (err & ECC_ERR)	printk("UncorrectableError ");
-			if (err & ID_ERR)	printk("SectorIdNotFound ");
-			if (err & TRK0_ERR)	printk("TrackZeroNotFound ");
-			if (err & MARK_ERR)	printk("AddrMarkNotFound ");
-			printk("}");
-			if ((err & (BBD_ERR | ABRT_ERR)) == BBD_ERR || (err & (ECC_ERR|ID_ERR|MARK_ERR))) {
-				if ((drive->id->command_set_2 & 0x0400) &&
-				    (drive->id->cfs_enable_2 & 0x0400) &&
-				    (drive->addressing == 1)) {
-					u64 sectors = 0;
-					u32 high = 0;
-					u32 low = ide_read_24(drive);
-					hwif->OUTB(drive->ctl|0x80, IDE_CONTROL_REG);
-					high = ide_read_24(drive);
-
-					sectors = ((u64)high << 24) | low;
-					printk(", LBAsect=%llu, high=%d, low=%d",
-					       (long long) sectors,
-					       high, low);
-				} else {
-					u8 cur = hwif->INB(IDE_SELECT_REG);
-					if (cur & 0x40) {	/* using LBA? */
-						printk(", LBAsect=%ld", (unsigned long)
-						 ((cur&0xf)<<24)
-						 |(hwif->INB(IDE_HCYL_REG)<<16)
-						 |(hwif->INB(IDE_LCYL_REG)<<8)
-						 | hwif->INB(IDE_SECTOR_REG));
-					} else {
-						printk(", CHS=%d/%d/%d",
-						 (hwif->INB(IDE_HCYL_REG)<<8) +
-						  hwif->INB(IDE_LCYL_REG),
-						  cur & 0xf,
-						  hwif->INB(IDE_SECTOR_REG));
-					}
-				}
-				if (HWGROUP(drive) && HWGROUP(drive)->rq)
-					printk(", sector=%llu", (unsigned long long)HWGROUP(drive)->rq->sector);
-			}
-		}
-		printk("\n");
-	}
-	{
-		struct request *rq;
-		int opcode = 0x100;
-
-		spin_lock(&ide_lock);
-		rq = NULL;
-		if (HWGROUP(drive))
-			rq = HWGROUP(drive)->rq;
-		spin_unlock(&ide_lock);
-		if (!rq)
-			goto out;
-		if (rq->flags & (REQ_DRIVE_CMD | REQ_DRIVE_TASK)) {
-			char *args = rq->buffer;
-			if (args)
-				opcode = args[0];
-		} else if (rq->flags & REQ_DRIVE_TASKFILE) {
-			ide_task_t *args = rq->special;
-			if (args) {
-				task_struct_t *tf = (task_struct_t *) args->tfRegister;
-				opcode = tf->command;
-			}
-		}
-
-		printk("ide: failed opcode was %x\n", opcode);
-	}
-out:
-	local_irq_restore(flags);
-	return err;
-}
-
-EXPORT_SYMBOL(ide_dump_status);
-
 static int ide_open (struct inode * inode, struct file * filp)
 {
 	return -ENXIO;
@@ -1673,8 +1542,9 @@
 			 */
 
 			spin_lock_irqsave(&ide_lock, flags);
-			
-			DRIVER(drive)->abort(drive, "drive reset");
+
+			ide_abort(drive, "drive reset");
+
 			if(HWGROUP(drive)->handler)
 				BUG();
 				
@@ -2180,14 +2050,10 @@
 	return ide_end_request(drive, uptodate, nr_sects);
 }
 
-static u8 default_sense (ide_drive_t *drive, const char *msg, u8 stat)
+static ide_startstop_t
+default_error(ide_drive_t *drive, struct request *rq, u8 stat, u8 err)
 {
-	return ide_dump_status(drive, msg, stat);
-}
-
-static ide_startstop_t default_error (ide_drive_t *drive, const char *msg, u8 stat)
-{
-	return ide_error(drive, msg, stat);
+	return __ide_error(drive, rq, stat, err);
 }
 
 static void default_pre_reset (ide_drive_t *drive)
@@ -2216,9 +2082,9 @@
 	return 0;
 }
 
-static ide_startstop_t default_abort (ide_drive_t *drive, const char *msg)
+static ide_startstop_t default_abort(ide_drive_t *drive, struct request *rq)
 {
-	return ide_abort(drive, msg);
+	return __ide_abort(drive, rq);
 }
 
 static ide_startstop_t default_start_power_step(ide_drive_t *drive,
@@ -2233,7 +2099,6 @@
 	if (d->cleanup == NULL)		d->cleanup = default_cleanup;
 	if (d->do_request == NULL)	d->do_request = default_do_request;
 	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->abort == NULL)		d->abort = default_abort;
 	if (d->pre_reset == NULL)	d->pre_reset = default_pre_reset;
@@ -2501,11 +2366,8 @@
 {
 	int index;
 
-	for (index = 0; index < MAX_HWIFS; ++index) {
+	for (index = 0; index < MAX_HWIFS; ++index)
 		ide_unregister(index);
-		if (ide_hwifs[index].dma_base)
-			(void) ide_release_dma(&ide_hwifs[index]);
-	}
 
 #ifdef CONFIG_PROC_FS
 	proc_ide_destroy();
diff -Nru a/drivers/ide/legacy/ide-cs.c b/drivers/ide/legacy/ide-cs.c
--- a/drivers/ide/legacy/ide-cs.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/ide/legacy/ide-cs.c	2005-01-10 20:11:21 -08:00
@@ -62,12 +62,12 @@
 MODULE_DESCRIPTION("PCMCIA ATA/IDE card driver");
 MODULE_LICENSE("Dual MPL/GPL");
 
-#define INT_MODULE_PARM(n, v) static int n = v; MODULE_PARM(n, "i")
+#define INT_MODULE_PARM(n, v) static int n = v; module_param(n, int, 0)
 
 /* Bit map of interrupts to choose from */
 INT_MODULE_PARM(irq_mask, 0xdeb8);
 static int irq_list[4] = { -1 };
-MODULE_PARM(irq_list, "1-4i");
+module_param_array(irq_list, int, NULL, 0);
 
 #ifdef PCMCIA_DEBUG
 INT_MODULE_PARM(pc_debug, PCMCIA_DEBUG);
diff -Nru a/drivers/ide/pci/aec62xx.c b/drivers/ide/pci/aec62xx.c
--- a/drivers/ide/pci/aec62xx.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/ide/pci/aec62xx.c	2005-01-10 20:11:21 -08:00
@@ -321,12 +321,12 @@
 	ide_setup_dma(hwif, dmabase, 8);
 }
 
-static void __devinit init_setup_aec62xx(struct pci_dev *dev, ide_pci_device_t *d)
+static int __devinit init_setup_aec62xx(struct pci_dev *dev, ide_pci_device_t *d)
 {
-	ide_setup_pci_device(dev, d);
+	return ide_setup_pci_device(dev, d);
 }
 
-static void __devinit init_setup_aec6x80(struct pci_dev *dev, ide_pci_device_t *d)
+static int __devinit init_setup_aec6x80(struct pci_dev *dev, ide_pci_device_t *d)
 {
 	unsigned long bar4reg = pci_resource_start(dev, 4);
 
@@ -340,7 +340,7 @@
 			strcpy(d->name, "AEC6280R");
 	}
 
-	ide_setup_pci_device(dev, d);
+	return ide_setup_pci_device(dev, d);
 }
 
 /**
@@ -356,8 +356,7 @@
 {
 	ide_pci_device_t *d = &aec62xx_chipsets[id->driver_data];
 
-	d->init_setup(dev, d);
-	return 0;
+	return d->init_setup(dev, d);
 }
 
 static struct pci_device_id aec62xx_pci_tbl[] = {
diff -Nru a/drivers/ide/pci/aec62xx.h b/drivers/ide/pci/aec62xx.h
--- a/drivers/ide/pci/aec62xx.h	2005-01-10 20:11:19 -08:00
+++ b/drivers/ide/pci/aec62xx.h	2005-01-10 20:11:19 -08:00
@@ -61,8 +61,8 @@
 #define BUSCLOCK(D)	\
 	((struct chipset_bus_clock_list_entry *) pci_get_drvdata((D)))
 
-static void init_setup_aec6x80(struct pci_dev *, ide_pci_device_t *);
-static void init_setup_aec62xx(struct pci_dev *, ide_pci_device_t *);
+static int init_setup_aec6x80(struct pci_dev *, ide_pci_device_t *);
+static int init_setup_aec62xx(struct pci_dev *, ide_pci_device_t *);
 static unsigned int init_chipset_aec62xx(struct pci_dev *, const char *);
 static void init_hwif_aec62xx(ide_hwif_t *);
 static void init_dma_aec62xx(ide_hwif_t *, unsigned long);
diff -Nru a/drivers/ide/pci/alim15x3.c b/drivers/ide/pci/alim15x3.c
--- a/drivers/ide/pci/alim15x3.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/ide/pci/alim15x3.c	2005-01-10 20:11:18 -08:00
@@ -884,8 +884,7 @@
 #if defined(CONFIG_SPARC64)
 	d->init_hwif = init_hwif_common_ali15x3;
 #endif /* CONFIG_SPARC64 */
-	ide_setup_pci_device(dev, d);
-	return 0;
+	return ide_setup_pci_device(dev, d);
 }
 
 
diff -Nru a/drivers/ide/pci/amd74xx.c b/drivers/ide/pci/amd74xx.c
--- a/drivers/ide/pci/amd74xx.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/ide/pci/amd74xx.c	2005-01-10 20:11:23 -08:00
@@ -493,9 +493,12 @@
 {
 	amd_chipset = amd74xx_chipsets + id->driver_data;
 	amd_config = amd_ide_chips + id->driver_data;
-	if (dev->device != amd_config->id) BUG();
-	ide_setup_pci_device(dev, amd_chipset);
-	return 0;
+	if (dev->device != amd_config->id) {
+		printk(KERN_ERR "%s: assertion 0x%02x == 0x%02x failed !\n",
+		       pci_name(dev), dev->device, amd_config->id);
+		return -ENODEV;
+	}
+	return ide_setup_pci_device(dev, amd_chipset);
 }
 
 static struct pci_device_id amd74xx_pci_tbl[] = {
diff -Nru a/drivers/ide/pci/atiixp.c b/drivers/ide/pci/atiixp.c
--- a/drivers/ide/pci/atiixp.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/ide/pci/atiixp.c	2005-01-10 20:11:18 -08:00
@@ -341,8 +341,7 @@
 
 static int __devinit atiixp_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
-	ide_setup_pci_device(dev, &atiixp_pci_info[id->driver_data]);
-	return 0;
+	return ide_setup_pci_device(dev, &atiixp_pci_info[id->driver_data]);
 }
 
 static struct pci_device_id atiixp_pci_tbl[] = {
diff -Nru a/drivers/ide/pci/cmd64x.c b/drivers/ide/pci/cmd64x.c
--- a/drivers/ide/pci/cmd64x.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/ide/pci/cmd64x.c	2005-01-10 20:11:22 -08:00
@@ -709,8 +709,7 @@
 
 static int __devinit cmd64x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
-	ide_setup_pci_device(dev, &cmd64x_chipsets[id->driver_data]);
-	return 0;
+	return ide_setup_pci_device(dev, &cmd64x_chipsets[id->driver_data]);
 }
 
 static struct pci_device_id cmd64x_pci_tbl[] = {
diff -Nru a/drivers/ide/pci/cs5530.c b/drivers/ide/pci/cs5530.c
--- a/drivers/ide/pci/cs5530.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/ide/pci/cs5530.c	2005-01-10 20:11:18 -08:00
@@ -357,8 +357,7 @@
 
 static int __devinit cs5530_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
-	ide_setup_pci_device(dev, &cs5530_chipset);
-	return 0;
+	return ide_setup_pci_device(dev, &cs5530_chipset);
 }
 
 static struct pci_device_id cs5530_pci_tbl[] = {
diff -Nru a/drivers/ide/pci/cy82c693.c b/drivers/ide/pci/cy82c693.c
--- a/drivers/ide/pci/cy82c693.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/ide/pci/cy82c693.c	2005-01-10 20:11:16 -08:00
@@ -426,15 +426,16 @@
 {
 	ide_pci_device_t *d = &cy82c693_chipsets[id->driver_data];
 	struct pci_dev *dev2;
+	int ret = -ENODEV;
 
 	/* CY82C693 is more than only a IDE controller.
 	   Function 1 is primary IDE channel, function 2 - secondary. */
         if ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE &&
 	    PCI_FUNC(dev->devfn) == 1) {
 		dev2 = pci_find_slot(dev->bus->number, dev->devfn + 1);
-		ide_setup_pci_devices(dev, dev2, d);
+		ret = ide_setup_pci_devices(dev, dev2, d);
 	}
-	return 0;
+	return ret;
 }
 
 static struct pci_device_id cy82c693_pci_tbl[] = {
diff -Nru a/drivers/ide/pci/generic.c b/drivers/ide/pci/generic.c
--- a/drivers/ide/pci/generic.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/ide/pci/generic.c	2005-01-10 20:11:19 -08:00
@@ -96,25 +96,26 @@
 {
 	ide_pci_device_t *d = &generic_chipsets[id->driver_data];
 	u16 command;
+	int ret = -ENODEV;
 
 	if (dev->vendor == PCI_VENDOR_ID_UMC &&
 	    dev->device == PCI_DEVICE_ID_UMC_UM8886A &&
 	    (!(PCI_FUNC(dev->devfn) & 1)))
-		return 1; /* UM8886A/BF pair */
+		goto out; /* UM8886A/BF pair */
 
 	if (dev->vendor == PCI_VENDOR_ID_OPTI &&
 	    dev->device == PCI_DEVICE_ID_OPTI_82C558 &&
 	    (!(PCI_FUNC(dev->devfn) & 1)))
-		return 1;
+		goto out;
 
 	pci_read_config_word(dev, PCI_COMMAND, &command);
-	if(!(command & PCI_COMMAND_IO))
-	{
+	if (!(command & PCI_COMMAND_IO)) {
 		printk(KERN_INFO "Skipping disabled %s IDE controller.\n", d->name);
-		return 1; 
+		goto out;
 	}
-	ide_setup_pci_device(dev, d);
-	return 0;
+	ret = ide_setup_pci_device(dev, d);
+out:
+	return ret;
 }
 
 static struct pci_device_id generic_pci_tbl[] = {
diff -Nru a/drivers/ide/pci/hpt34x.c b/drivers/ide/pci/hpt34x.c
--- a/drivers/ide/pci/hpt34x.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/ide/pci/hpt34x.c	2005-01-10 20:11:18 -08:00
@@ -251,8 +251,7 @@
 	d->name = chipset_names[(pcicmd & PCI_COMMAND_MEMORY) ? 1 : 0];
 	d->bootable = (pcicmd & PCI_COMMAND_MEMORY) ? OFF_BOARD : NEVER_BOARD;
 
-	ide_setup_pci_device(dev, d);
-	return 0;
+	return ide_setup_pci_device(dev, d);
 }
 
 static struct pci_device_id hpt34x_pci_tbl[] = {
diff -Nru a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c
--- a/drivers/ide/pci/hpt366.c	2005-01-10 20:11:24 -08:00
+++ b/drivers/ide/pci/hpt366.c	2005-01-10 20:11:24 -08:00
@@ -1191,12 +1191,12 @@
 	ide_setup_dma(hwif, dmabase, 8);
 }
 
-static void __devinit init_setup_hpt374(struct pci_dev *dev, ide_pci_device_t *d)
+static int __devinit init_setup_hpt374(struct pci_dev *dev, ide_pci_device_t *d)
 {
 	struct pci_dev *findev = NULL;
 
 	if (PCI_FUNC(dev->devfn) & 1)
-		return;
+		return -ENODEV;
 
 	while ((findev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, findev)) != NULL) {
 		if ((findev->vendor == dev->vendor) &&
@@ -1209,19 +1209,18 @@
 				printk(KERN_WARNING "%s: pci-config space interrupt "
 					"fixed.\n", d->name);
 			}
-			ide_setup_pci_devices(dev, findev, d);
-			return;
+			return ide_setup_pci_devices(dev, findev, d);
 		}
 	}
-	ide_setup_pci_device(dev, d);
+	return ide_setup_pci_device(dev, d);
 }
 
-static void __devinit init_setup_hpt37x(struct pci_dev *dev, ide_pci_device_t *d)
+static int __devinit init_setup_hpt37x(struct pci_dev *dev, ide_pci_device_t *d)
 {
-	ide_setup_pci_device(dev, d);
+	return ide_setup_pci_device(dev, d);
 }
 
-static void __devinit init_setup_hpt366(struct pci_dev *dev, ide_pci_device_t *d)
+static int __devinit init_setup_hpt366(struct pci_dev *dev, ide_pci_device_t *d)
 {
 	struct pci_dev *findev = NULL;
 	u8 pin1 = 0, pin2 = 0;
@@ -1231,7 +1230,7 @@
 				 "HPT372N" };
 
 	if (PCI_FUNC(dev->devfn) & 1)
-		return;
+		return -ENODEV;
 
 	pci_read_config_dword(dev, PCI_CLASS_REVISION, &class_rev);
 	class_rev &= 0xff;
@@ -1246,9 +1245,10 @@
 		case 6:
 		case 5:
 		case 4:
-		case 3: ide_setup_pci_device(dev, d);
-			return;
-		default:	break;
+		case 3:
+			goto init_single;
+		default:
+			break;
 	}
 
 	d->channels = 1;
@@ -1266,11 +1266,11 @@
 					"pin1=%d pin2=%d\n", d->name,
 					pin1, pin2);
 			}
-			ide_setup_pci_devices(dev, findev, d);
-			return;
+			return ide_setup_pci_devices(dev, findev, d);
 		}
 	}
-	ide_setup_pci_device(dev, d);
+init_single:
+	return ide_setup_pci_device(dev, d);
 }
 
 
@@ -1287,8 +1287,7 @@
 {
 	ide_pci_device_t *d = &hpt366_chipsets[id->driver_data];
 
-	d->init_setup(dev, d);
-	return 0;
+	return d->init_setup(dev, d);
 }
 
 static struct pci_device_id hpt366_pci_tbl[] = {
diff -Nru a/drivers/ide/pci/hpt366.h b/drivers/ide/pci/hpt366.h
--- a/drivers/ide/pci/hpt366.h	2005-01-10 20:11:21 -08:00
+++ b/drivers/ide/pci/hpt366.h	2005-01-10 20:11:21 -08:00
@@ -414,9 +414,9 @@
 #define F_LOW_PCI_50      0x2d
 #define F_LOW_PCI_66      0x42
 
-static void init_setup_hpt366(struct pci_dev *, ide_pci_device_t *);
-static void init_setup_hpt37x(struct pci_dev *, ide_pci_device_t *);
-static void init_setup_hpt374(struct pci_dev *, ide_pci_device_t *);
+static int init_setup_hpt366(struct pci_dev *, ide_pci_device_t *);
+static int init_setup_hpt37x(struct pci_dev *, ide_pci_device_t *);
+static int init_setup_hpt374(struct pci_dev *, ide_pci_device_t *);
 static unsigned int init_chipset_hpt366(struct pci_dev *, const char *);
 static void init_hwif_hpt366(ide_hwif_t *);
 static void init_dma_hpt366(ide_hwif_t *, unsigned long);
diff -Nru a/drivers/ide/pci/it8172.c b/drivers/ide/pci/it8172.c
--- a/drivers/ide/pci/it8172.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/ide/pci/it8172.c	2005-01-10 20:11:21 -08:00
@@ -270,9 +270,8 @@
 {
         if ((!(PCI_FUNC(dev->devfn) & 1) ||
             (!((dev->class >> 8) == PCI_CLASS_STORAGE_IDE))))
-                return 1; /* IT8172 is more than only a IDE controller */
-	ide_setup_pci_device(dev, &it8172_chipsets[id->driver_data]);
-	return 0;
+		return -ENODEV; /* IT8172 is more than an IDE controller */
+	return ide_setup_pci_device(dev, &it8172_chipsets[id->driver_data]);
 }
 
 static struct pci_device_id it8172_pci_tbl[] = {
diff -Nru a/drivers/ide/pci/ns87415.c b/drivers/ide/pci/ns87415.c
--- a/drivers/ide/pci/ns87415.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/ide/pci/ns87415.c	2005-01-10 20:11:18 -08:00
@@ -288,8 +288,7 @@
 
 static int __devinit ns87415_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
-	ide_setup_pci_device(dev, &ns87415_chipset);
-	return 0;
+	return ide_setup_pci_device(dev, &ns87415_chipset);
 }
 
 static struct pci_device_id ns87415_pci_tbl[] = {
diff -Nru a/drivers/ide/pci/opti621.c b/drivers/ide/pci/opti621.c
--- a/drivers/ide/pci/opti621.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/ide/pci/opti621.c	2005-01-10 20:11:18 -08:00
@@ -348,15 +348,14 @@
 	hwif->drives[1].autodma = hwif->autodma;
 }
 
-static void __init init_setup_opti621 (struct pci_dev *dev, ide_pci_device_t *d)
+static int __init init_setup_opti621 (struct pci_dev *dev, ide_pci_device_t *d)
 {
-	ide_setup_pci_device(dev, d);
+	return ide_setup_pci_device(dev, d);
 }
 
 static int __devinit opti621_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
-	ide_setup_pci_device(dev, &opti621_chipsets[id->driver_data]);
-	return 0;
+	return ide_setup_pci_device(dev, &opti621_chipsets[id->driver_data]);
 }
 
 static struct pci_device_id opti621_pci_tbl[] = {
diff -Nru a/drivers/ide/pci/opti621.h b/drivers/ide/pci/opti621.h
--- a/drivers/ide/pci/opti621.h	2005-01-10 20:11:22 -08:00
+++ b/drivers/ide/pci/opti621.h	2005-01-10 20:11:22 -08:00
@@ -5,7 +5,7 @@
 #include <linux/pci.h>
 #include <linux/ide.h>
 
-static void init_setup_opti621(struct pci_dev *, ide_pci_device_t *);
+static int init_setup_opti621(struct pci_dev *, ide_pci_device_t *);
 static void init_hwif_opti621(ide_hwif_t *);
 
 static ide_pci_device_t opti621_chipsets[] __devinitdata = {
diff -Nru a/drivers/ide/pci/pdc202xx_new.c b/drivers/ide/pci/pdc202xx_new.c
--- a/drivers/ide/pci/pdc202xx_new.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/ide/pci/pdc202xx_new.c	2005-01-10 20:11:21 -08:00
@@ -316,21 +316,21 @@
 #endif /* PDC202_DEBUG_CABLE */
 }
 
-static void __devinit init_setup_pdcnew(struct pci_dev *dev, ide_pci_device_t *d)
+static int __devinit init_setup_pdcnew(struct pci_dev *dev, ide_pci_device_t *d)
 {
-	ide_setup_pci_device(dev, d);
+	return ide_setup_pci_device(dev, d);
 }
 
-static void __devinit init_setup_pdc20270(struct pci_dev *dev, ide_pci_device_t *d)
+static int __devinit init_setup_pdc20270(struct pci_dev *dev,
+					 ide_pci_device_t *d)
 {
 	struct pci_dev *findev = NULL;
 
 	if ((dev->bus->self &&
 	     dev->bus->self->vendor == PCI_VENDOR_ID_DEC) &&
 	    (dev->bus->self->device == PCI_DEVICE_ID_DEC_21150)) {
-		if (PCI_SLOT(dev->devfn) & 2) {
-			return;
-		}
+		if (PCI_SLOT(dev->devfn) & 2)
+			return -ENODEV;
 		d->extra = 0;
 		while ((findev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, findev)) != NULL) {
 			if ((findev->vendor == dev->vendor) &&
@@ -339,15 +339,15 @@
 				if (findev->irq != dev->irq) {
 					findev->irq = dev->irq;
 				}
-				ide_setup_pci_devices(dev, findev, d);
-				return;
+				return ide_setup_pci_devices(dev, findev, d);
 			}
 		}
 	}
-	ide_setup_pci_device(dev, d);
+	return ide_setup_pci_device(dev, d);
 }
 
-static void __devinit init_setup_pdc20276(struct pci_dev *dev, ide_pci_device_t *d)
+static int __devinit init_setup_pdc20276(struct pci_dev *dev,
+					 ide_pci_device_t *d)
 {
 	if ((dev->bus->self) &&
 	    (dev->bus->self->vendor == PCI_VENDOR_ID_INTEL) &&
@@ -355,9 +355,9 @@
 	     (dev->bus->self->device == PCI_DEVICE_ID_INTEL_I960RM))) {
 		printk(KERN_INFO "ide: Skipping Promise PDC20276 "
 			"attached to I2O RAID controller.\n");
-		return;
+		return -ENODEV;
 	}
-	ide_setup_pci_device(dev, d);
+	return ide_setup_pci_device(dev, d);
 }
 
 /**
@@ -373,8 +373,7 @@
 {
 	ide_pci_device_t *d = &pdcnew_chipsets[id->driver_data];
 
-	d->init_setup(dev, d);
-	return 0;
+	return d->init_setup(dev, d);
 }
 
 static struct pci_device_id pdc202new_pci_tbl[] = {
diff -Nru a/drivers/ide/pci/pdc202xx_new.h b/drivers/ide/pci/pdc202xx_new.h
--- a/drivers/ide/pci/pdc202xx_new.h	2005-01-10 20:11:16 -08:00
+++ b/drivers/ide/pci/pdc202xx_new.h	2005-01-10 20:11:16 -08:00
@@ -43,9 +43,9 @@
 		set_2regs(0x13,(c));			\
 	} while(0)
 
-static void init_setup_pdcnew(struct pci_dev *, ide_pci_device_t *);
-static void init_setup_pdc20270(struct pci_dev *, ide_pci_device_t *);
-static void init_setup_pdc20276(struct pci_dev *dev, ide_pci_device_t *d);
+static int init_setup_pdcnew(struct pci_dev *, ide_pci_device_t *);
+static int init_setup_pdc20270(struct pci_dev *, ide_pci_device_t *);
+static int init_setup_pdc20276(struct pci_dev *dev, ide_pci_device_t *d);
 static unsigned int init_chipset_pdcnew(struct pci_dev *, const char *);
 static void init_hwif_pdc202new(ide_hwif_t *);
 
diff -Nru a/drivers/ide/pci/pdc202xx_old.c b/drivers/ide/pci/pdc202xx_old.c
--- a/drivers/ide/pci/pdc202xx_old.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/ide/pci/pdc202xx_old.c	2005-01-10 20:11:23 -08:00
@@ -658,7 +658,8 @@
 	ide_setup_dma(hwif, dmabase, 8);
 }
 
-static void __devinit init_setup_pdc202ata4(struct pci_dev *dev, ide_pci_device_t *d)
+static int __devinit init_setup_pdc202ata4(struct pci_dev *dev,
+					   ide_pci_device_t *d)
 {
 	if ((dev->class >> 8) != PCI_CLASS_STORAGE_IDE) {
 		u8 irq = 0, irq2 = 0;
@@ -685,10 +686,11 @@
         }
 #endif
 
-	ide_setup_pci_device(dev, d);
+	return ide_setup_pci_device(dev, d);
 }
 
-static void __devinit init_setup_pdc20265(struct pci_dev *dev, ide_pci_device_t *d)
+static int __devinit init_setup_pdc20265(struct pci_dev *dev,
+					 ide_pci_device_t *d)
 {
 	if ((dev->bus->self) &&
 	    (dev->bus->self->vendor == PCI_VENDOR_ID_INTEL) &&
@@ -696,7 +698,7 @@
 	     (dev->bus->self->device == PCI_DEVICE_ID_INTEL_I960RM))) {
 		printk(KERN_INFO "ide: Skipping Promise PDC20265 "
 			"attached to I2O RAID controller.\n");
-		return;
+		return -ENODEV;
 	}
 
 #if 0
@@ -714,12 +716,13 @@
         }
 #endif
 
-	ide_setup_pci_device(dev, d);
+	return ide_setup_pci_device(dev, d);
 }
 
-static void __devinit init_setup_pdc202xx(struct pci_dev *dev, ide_pci_device_t *d)
+static int __devinit init_setup_pdc202xx(struct pci_dev *dev,
+					 ide_pci_device_t *d)
 {
-	ide_setup_pci_device(dev, d);
+	return ide_setup_pci_device(dev, d);
 }
 
 /**
@@ -735,8 +738,7 @@
 {
 	ide_pci_device_t *d = &pdc202xx_chipsets[id->driver_data];
 
-	d->init_setup(dev, d);
-	return 0;
+	return d->init_setup(dev, d);
 }
 
 static struct pci_device_id pdc202xx_pci_tbl[] = {
diff -Nru a/drivers/ide/pci/pdc202xx_old.h b/drivers/ide/pci/pdc202xx_old.h
--- a/drivers/ide/pci/pdc202xx_old.h	2005-01-10 20:11:15 -08:00
+++ b/drivers/ide/pci/pdc202xx_old.h	2005-01-10 20:11:15 -08:00
@@ -63,9 +63,9 @@
 #define	MC1		0x02	/* DMA"C" timing */
 #define	MC0		0x01	/* DMA"C" timing */
 
-static void init_setup_pdc202ata4(struct pci_dev *dev, ide_pci_device_t *d);
-static void init_setup_pdc20265(struct pci_dev *, ide_pci_device_t *);
-static void init_setup_pdc202xx(struct pci_dev *, ide_pci_device_t *);
+static int init_setup_pdc202ata4(struct pci_dev *dev, ide_pci_device_t *d);
+static int init_setup_pdc20265(struct pci_dev *, ide_pci_device_t *);
+static int init_setup_pdc202xx(struct pci_dev *, ide_pci_device_t *);
 static unsigned int init_chipset_pdc202xx(struct pci_dev *, const char *);
 static void init_hwif_pdc202xx(ide_hwif_t *);
 static void init_dma_pdc202xx(ide_hwif_t *, unsigned long);
diff -Nru a/drivers/ide/pci/piix.c b/drivers/ide/pci/piix.c
--- a/drivers/ide/pci/piix.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/ide/pci/piix.c	2005-01-10 20:11:16 -08:00
@@ -134,6 +134,7 @@
 		case PCI_DEVICE_ID_INTEL_82801EB_11:
 		case PCI_DEVICE_ID_INTEL_ESB_2:
 		case PCI_DEVICE_ID_INTEL_ICH6_19:
+		case PCI_DEVICE_ID_INTEL_ICH7_21:
 			mode = 3;
 			break;
 		/* UDMA 66 capable */
@@ -445,6 +446,7 @@
 		case PCI_DEVICE_ID_INTEL_82801E_11:
 		case PCI_DEVICE_ID_INTEL_ESB_2:
 		case PCI_DEVICE_ID_INTEL_ICH6_19:
+		case PCI_DEVICE_ID_INTEL_ICH7_21:
 		{
 			unsigned int extra = 0;
 			pci_read_config_dword(dev, 0x54, &extra);
@@ -535,9 +537,9 @@
  *	a standard ide PCI setup
  */
 
-static void __devinit init_setup_piix(struct pci_dev *dev, ide_pci_device_t *d)
+static int __devinit init_setup_piix(struct pci_dev *dev, ide_pci_device_t *d)
 {
-	ide_setup_pci_device(dev, d);
+	return ide_setup_pci_device(dev, d);
 }
 
 /**
@@ -553,8 +555,7 @@
 {
 	ide_pci_device_t *d = &piix_pci_info[id->driver_data];
 
-	d->init_setup(dev, d);
-	return 0;
+	return d->init_setup(dev, d);
 }
 
 /**
@@ -612,6 +613,7 @@
 #endif
 	{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ESB_2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 19},
 	{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_19, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 20},
+	{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_21, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 21},
 	{ 0, },
 };
 MODULE_DEVICE_TABLE(pci, piix_pci_tbl);
diff -Nru a/drivers/ide/pci/piix.h b/drivers/ide/pci/piix.h
--- a/drivers/ide/pci/piix.h	2005-01-10 20:11:17 -08:00
+++ b/drivers/ide/pci/piix.h	2005-01-10 20:11:17 -08:00
@@ -5,7 +5,7 @@
 #include <linux/pci.h>
 #include <linux/ide.h>
 
-static void init_setup_piix(struct pci_dev *, ide_pci_device_t *);
+static int init_setup_piix(struct pci_dev *, ide_pci_device_t *);
 static unsigned int __devinit init_chipset_piix(struct pci_dev *, const char *);
 static void init_hwif_piix(ide_hwif_t *);
 
@@ -57,7 +57,8 @@
 	/* 17 */ DECLARE_PIIX_DEV("ICH4"),
 	/* 18 */ DECLARE_PIIX_DEV("ICH5-SATA"),
 	/* 19 */ DECLARE_PIIX_DEV("ICH5"),
-	/* 20 */ DECLARE_PIIX_DEV("ICH6")
+	/* 20 */ DECLARE_PIIX_DEV("ICH6"),
+	/* 21 */ DECLARE_PIIX_DEV("ICH7"),
 };
 
 #endif /* PIIX_H */
diff -Nru a/drivers/ide/pci/rz1000.c b/drivers/ide/pci/rz1000.c
--- a/drivers/ide/pci/rz1000.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/ide/pci/rz1000.c	2005-01-10 20:11:18 -08:00
@@ -62,8 +62,7 @@
 
 static int __devinit rz1000_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
-	ide_setup_pci_device(dev, &rz1000_chipset);
-	return 0;
+	return ide_setup_pci_device(dev, &rz1000_chipset);
 }
 
 static struct pci_device_id rz1000_pci_tbl[] = {
diff -Nru a/drivers/ide/pci/sc1200.c b/drivers/ide/pci/sc1200.c
--- a/drivers/ide/pci/sc1200.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/ide/pci/sc1200.c	2005-01-10 20:11:20 -08:00
@@ -489,8 +489,7 @@
 
 static int __devinit sc1200_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
-	ide_setup_pci_device(dev, &sc1200_chipset);
-	return 0;
+	return ide_setup_pci_device(dev, &sc1200_chipset);
 }
 
 static struct pci_device_id sc1200_pci_tbl[] = {
diff -Nru a/drivers/ide/pci/serverworks.c b/drivers/ide/pci/serverworks.c
--- a/drivers/ide/pci/serverworks.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/ide/pci/serverworks.c	2005-01-10 20:11:16 -08:00
@@ -359,11 +359,9 @@
 	else if ((dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB5IDE) ||
 		 (dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE) ||
 		 (dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2)) {
-//		u32 pioreg = 0, dmareg = 0;
 
 		/* Third Channel Test */
 		if (!(PCI_FUNC(dev->devfn) & 1)) {
-#if 1
 			struct pci_dev * findev = NULL;
 			u32 reg4c = 0;
 			findev = pci_find_device(PCI_VENDOR_ID_SERVERWORKS,
@@ -375,19 +373,11 @@
 				reg4c |=  0x00000020;
 				pci_write_config_dword(findev, 0x4C, reg4c);
 			}
-#endif
 			outb_p(0x06, 0x0c00);
 			dev->irq = inb_p(0x0c01);
 #if 0
-			/* WE need to figure out how to get the correct one */
-			printk("%s: interrupt %d\n", name, dev->irq);
-			if (dev->irq != 0x0B)
-				dev->irq = 0x0B;
-#endif
-#if 0
 			printk("%s: device class (0x%04x)\n",
 				name, dev->class);
-#else
 			if ((dev->class >> 8) != PCI_CLASS_STORAGE_IDE) {
 				dev->class &= ~0x000F0F00;
 		//		dev->class |= ~0x00000400;
@@ -413,7 +403,8 @@
 			 * interrupt pin to be set, and it is a compatibility
 			 * mode issue.
 			 */
-			dev->irq = 0;
+			if ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE)
+				dev->irq = 0;
 		}
 //		pci_read_config_dword(dev, 0x40, &pioreg)
 //		pci_write_config_dword(dev, 0x40, 0x99999999);
@@ -566,20 +557,17 @@
 	ide_setup_dma(hwif, dmabase, 8);
 }
 
-static void __init init_setup_svwks (struct pci_dev *dev, ide_pci_device_t *d)
+static int __init init_setup_svwks (struct pci_dev *dev, ide_pci_device_t *d)
 {
-	ide_setup_pci_device(dev, d);
+	return ide_setup_pci_device(dev, d);
 }
 
-static void __init init_setup_csb6 (struct pci_dev *dev, ide_pci_device_t *d)
+static int __init init_setup_csb6 (struct pci_dev *dev, ide_pci_device_t *d)
 {
 	if (!(PCI_FUNC(dev->devfn) & 1)) {
 		d->bootable = NEVER_BOARD;
 		if (dev->resource[0].start == 0x01f1)
 			d->bootable = ON_BOARD;
-	} else {
-		if ((dev->class >> 8) != PCI_CLASS_STORAGE_IDE)
-			return;
 	}
 #if 0
 	if ((IDE_PCI_DEVID_EQ(d->devid, DEVID_CSB6) &&
@@ -591,7 +579,7 @@
 			dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2) &&
 		       (!(PCI_FUNC(dev->devfn) & 1))) ? 1 : 2;
 
-	ide_setup_pci_device(dev, d);
+	return ide_setup_pci_device(dev, d);
 }
 
 
@@ -608,8 +596,7 @@
 {
 	ide_pci_device_t *d = &serverworks_chipsets[id->driver_data];
 
-	d->init_setup(dev, d);
-	return 0;
+	return d->init_setup(dev, d);
 }
 
 static struct pci_device_id svwks_pci_tbl[] = {
@@ -625,10 +612,6 @@
 	.name		= "Serverworks_IDE",
 	.id_table	= svwks_pci_tbl,
 	.probe		= svwks_init_one,
-#if 0	/* FIXME: implement */
-	.suspend	= ,
-	.resume		= ,
-#endif
 };
 
 static int svwks_ide_init(void)
diff -Nru a/drivers/ide/pci/serverworks.h b/drivers/ide/pci/serverworks.h
--- a/drivers/ide/pci/serverworks.h	2005-01-10 20:11:18 -08:00
+++ b/drivers/ide/pci/serverworks.h	2005-01-10 20:11:18 -08:00
@@ -21,8 +21,8 @@
 	NULL
 };
 
-static void init_setup_svwks(struct pci_dev *, ide_pci_device_t *);
-static void init_setup_csb6(struct pci_dev *, ide_pci_device_t *);
+static int init_setup_svwks(struct pci_dev *, ide_pci_device_t *);
+static int init_setup_csb6(struct pci_dev *, ide_pci_device_t *);
 static unsigned int init_chipset_svwks(struct pci_dev *, const char *);
 static void init_hwif_svwks(ide_hwif_t *);
 static void init_dma_svwks(ide_hwif_t *, unsigned long);
diff -Nru a/drivers/ide/pci/sgiioc4.c b/drivers/ide/pci/sgiioc4.c
--- a/drivers/ide/pci/sgiioc4.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/ide/pci/sgiioc4.c	2005-01-10 20:11:19 -08:00
@@ -681,12 +681,14 @@
 pci_init_sgiioc4(struct pci_dev *dev, ide_pci_device_t * d)
 {
 	unsigned int class_rev;
+	int ret;
 
-	if (pci_enable_device(dev)) {
+	ret = pci_enable_device(dev);
+	if (ret < 0) {
 		printk(KERN_ERR
 		       "Failed to enable device %s at slot %s\n",
 		       d->name, dev->slot_name);
-		return -ENODEV;
+		goto out;
 	}
 	pci_set_master(dev);
 
@@ -698,9 +700,12 @@
 		printk(KERN_ERR "Skipping %s IDE controller in slot %s: "
 			"firmware is obsolete - please upgrade to revision"
 			"46 or higher\n", d->name, dev->slot_name);
-		return -ENODEV;
+		ret = -EAGAIN;
+		goto out;
 	}
-	return sgiioc4_ide_setup_pci_device(dev, d);
+	ret = sgiioc4_ide_setup_pci_device(dev, d);
+out:
+	return ret;
 }
 
 static ide_pci_device_t sgiioc4_chipsets[] __devinitdata = {
diff -Nru a/drivers/ide/pci/siimage.c b/drivers/ide/pci/siimage.c
--- a/drivers/ide/pci/siimage.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/ide/pci/siimage.c	2005-01-10 20:11:18 -08:00
@@ -1102,8 +1102,7 @@
  
 static int __devinit siimage_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
-	ide_setup_pci_device(dev, &siimage_chipsets[id->driver_data]);
-	return 0;
+	return ide_setup_pci_device(dev, &siimage_chipsets[id->driver_data]);
 }
 
 static struct pci_device_id siimage_pci_tbl[] = {
diff -Nru a/drivers/ide/pci/sis5513.c b/drivers/ide/pci/sis5513.c
--- a/drivers/ide/pci/sis5513.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/ide/pci/sis5513.c	2005-01-10 20:11:19 -08:00
@@ -946,8 +946,7 @@
 
 static int __devinit sis5513_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
-	ide_setup_pci_device(dev, &sis5513_chipset);
-	return 0;
+	return ide_setup_pci_device(dev, &sis5513_chipset);
 }
 
 static struct pci_device_id sis5513_pci_tbl[] = {
diff -Nru a/drivers/ide/pci/sl82c105.c b/drivers/ide/pci/sl82c105.c
--- a/drivers/ide/pci/sl82c105.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/ide/pci/sl82c105.c	2005-01-10 20:11:18 -08:00
@@ -490,8 +490,7 @@
 
 static int __devinit sl82c105_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
-	ide_setup_pci_device(dev, &sl82c105_chipset);
-	return 0;
+	return ide_setup_pci_device(dev, &sl82c105_chipset);
 }
 
 static struct pci_device_id sl82c105_pci_tbl[] = {
diff -Nru a/drivers/ide/pci/slc90e66.c b/drivers/ide/pci/slc90e66.c
--- a/drivers/ide/pci/slc90e66.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/ide/pci/slc90e66.c	2005-01-10 20:11:21 -08:00
@@ -246,8 +246,7 @@
 
 static int __devinit slc90e66_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
-	ide_setup_pci_device(dev, &slc90e66_chipset);
-	return 0;
+	return ide_setup_pci_device(dev, &slc90e66_chipset);
 }
 
 static struct pci_device_id slc90e66_pci_tbl[] = {
diff -Nru a/drivers/ide/pci/triflex.c b/drivers/ide/pci/triflex.c
--- a/drivers/ide/pci/triflex.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/ide/pci/triflex.c	2005-01-10 20:11:18 -08:00
@@ -158,9 +158,7 @@
 static int __devinit triflex_init_one(struct pci_dev *dev, 
 		const struct pci_device_id *id)
 {
-	ide_setup_pci_device(dev, &triflex_device);
-
-	return 0;
+	return ide_setup_pci_device(dev, &triflex_device);
 }
 
 static struct pci_device_id triflex_pci_tbl[] = {
diff -Nru a/drivers/ide/pci/trm290.c b/drivers/ide/pci/trm290.c
--- a/drivers/ide/pci/trm290.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/ide/pci/trm290.c	2005-01-10 20:11:17 -08:00
@@ -342,8 +342,7 @@
 
 static int __devinit trm290_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
-	ide_setup_pci_device(dev, &trm290_chipset);
-	return 0;
+	return ide_setup_pci_device(dev, &trm290_chipset);
 }
 
 static struct pci_device_id trm290_pci_tbl[] = {
diff -Nru a/drivers/ide/pci/via82cxxx.c b/drivers/ide/pci/via82cxxx.c
--- a/drivers/ide/pci/via82cxxx.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/ide/pci/via82cxxx.c	2005-01-10 20:11:23 -08:00
@@ -620,8 +620,7 @@
 
 static int __devinit via_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
-	ide_setup_pci_device(dev, &via82cxxx_chipset);
-	return 0;
+	return ide_setup_pci_device(dev, &via82cxxx_chipset);
 }
 
 static struct pci_device_id via_pci_tbl[] = {
diff -Nru a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c
--- a/drivers/ide/ppc/pmac.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/ide/ppc/pmac.c	2005-01-10 20:11:16 -08:00
@@ -52,7 +52,7 @@
 
 #include "ide-timing.h"
 
-#define IDE_PMAC_DEBUG
+#undef IDE_PMAC_DEBUG
 
 #define DMA_WAIT_TIMEOUT	50
 
diff -Nru a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c
--- a/drivers/ide/setup-pci.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/ide/setup-pci.c	2005-01-10 20:11:18 -08:00
@@ -28,6 +28,7 @@
 #include <linux/mm.h>
 #include <linux/interrupt.h>
 #include <linux/ide.h>
+#include <linux/dma-mapping.h>
 
 #include <asm/io.h>
 #include <asm/irq.h>
@@ -290,14 +291,16 @@
  
 static int ide_pci_enable(struct pci_dev *dev, ide_pci_device_t *d)
 {
-	
+	int ret;
+
 	if (pci_enable_device(dev)) {
-		if (pci_enable_device_bars(dev, 1 << 4)) {
+		ret = pci_enable_device_bars(dev, 1 << 4);
+		if (ret < 0) {
 			printk(KERN_WARNING "%s: (ide_setup_pci_device:) "
 				"Could not enable device.\n", d->name);
-			return -EBUSY;
-		} else
-			printk(KERN_WARNING "%s: BIOS configuration fixed.\n", d->name);
+			goto out;
+		}
+		printk(KERN_WARNING "%s: BIOS configuration fixed.\n", d->name);
 	}
 
 	/*
@@ -305,18 +308,21 @@
 	 * dma mask field to the ide_pci_device_t if we need it (or let
 	 * lower level driver set the dma mask)
 	 */
-	if (pci_set_dma_mask(dev, 0xffffffff)) {
+	ret = pci_set_dma_mask(dev, DMA_32BIT_MASK);
+	if (ret < 0) {
 		printk(KERN_ERR "%s: can't set dma mask\n", d->name);
-		return -EBUSY;
+		goto out;
 	}
-	 
+
 	/* FIXME: Temporary - until we put in the hotplug interface logic
-	   Check that the bits we want are not in use by someone else */
-	if (pci_request_region(dev, 4, "ide_tmp"))
-		return -EBUSY;
+	   Check that the bits we want are not in use by someone else. */
+	ret = pci_request_region(dev, 4, "ide_tmp");
+	if (ret < 0)
+		goto out;
+
 	pci_release_region(dev, 4);
-	
-	return 0;	
+out:
+	return ret;
 }
 
 /**
@@ -425,7 +431,12 @@
 	if (hwif->io_ports[IDE_DATA_OFFSET] != base ||
 	    hwif->io_ports[IDE_CONTROL_OFFSET] != (ctl | 2)) {
 		memset(&hwif->hw, 0, sizeof(hwif->hw));
+#ifndef IDE_ARCH_OBSOLETE_INIT
+		ide_std_init_ports(&hwif->hw, base, (ctl | 2));
+		hwif->hw.io_ports[IDE_IRQ_OFFSET] = 0;
+#else
 		ide_init_hwif_ports(&hwif->hw, base, (ctl | 2), NULL);
+#endif
 		memcpy(hwif->io_ports, hwif->hw.io_ports, sizeof(hwif->io_ports));
 		hwif->noprobe = !hwif->io_ports[IDE_DATA_OFFSET];
 	}
@@ -515,22 +526,26 @@
  
 static int ide_setup_pci_controller(struct pci_dev *dev, ide_pci_device_t *d, int noisy, int *config)
 {
+	int ret;
 	u32 class_rev;
 	u16 pcicmd;
 
 	if (noisy)
 		ide_setup_pci_noise(dev, d);
 
-	if (ide_pci_enable(dev, d))
-		return -EBUSY;
-		
-	if (pci_read_config_word(dev, PCI_COMMAND, &pcicmd)) {
+	ret = ide_pci_enable(dev, d);
+	if (ret < 0)
+		goto out;
+
+	ret = pci_read_config_word(dev, PCI_COMMAND, &pcicmd);
+	if (ret < 0) {
 		printk(KERN_ERR "%s: error accessing PCI regs\n", d->name);
-		return -EIO;
+		goto out;
 	}
 	if (!(pcicmd & PCI_COMMAND_IO)) {	/* is device disabled? */
-		if (ide_pci_configure(dev, d))
-			return -ENODEV;
+		ret = ide_pci_configure(dev, d);
+		if (ret < 0)
+			goto out;
 		*config = 1;
 		printk(KERN_INFO "%s: device enabled (Linux)\n", d->name);
 	}
@@ -539,7 +554,8 @@
 	class_rev &= 0xff;
 	if (noisy)
 		printk(KERN_INFO "%s: chipset revision %d\n", d->name, class_rev);
-	return 0;
+out:
+	return ret;
 }
 
 /**
@@ -643,14 +659,16 @@
  * we "know" about, this information is in the ide_pci_device_t struct;
  * for all other chipsets, we just assume both interfaces are enabled.
  */
-static ata_index_t do_ide_setup_pci_device (struct pci_dev *dev, ide_pci_device_t *d, u8 noisy)
+static int do_ide_setup_pci_device(struct pci_dev *dev, ide_pci_device_t *d,
+				   ata_index_t *index, u8 noisy)
 {
-	int pciirq = 0;
+	static ata_index_t ata_index = { .b = { .low = 0xff, .high = 0xff } };
 	int tried_config = 0;
-	ata_index_t index = { .b = { .low = 0xff, .high = 0xff } };
+	int pciirq, ret;
 
-	if (ide_setup_pci_controller(dev, d, noisy, &tried_config) < 0)
-		return index;
+	ret = ide_setup_pci_controller(dev, d, noisy, &tried_config);
+	if (ret < 0)
+		goto out;
 
 	/*
 	 * Can we trust the reported IRQ?
@@ -668,7 +686,10 @@
 		 * space, place chipset into init-mode, and/or preserve
 		 * an interrupt if the card is not native ide support.
 		 */
-		pciirq = (d->init_chipset) ? d->init_chipset(dev, d->name) : 0;
+		ret = d->init_chipset ? d->init_chipset(dev, d->name) : 0;
+		if (ret < 0)
+			goto out;
+		pciirq = ret;
 	} else if (tried_config) {
 		if (noisy)
 			printk(KERN_INFO "%s: will probe irqs later\n", d->name);
@@ -679,10 +700,10 @@
 				d->name, pciirq);
 		pciirq = 0;
 	} else {
-		if (d->init_chipset)
-		{
-			if(d->init_chipset(dev, d->name) < 0)
-				return index;
+		if (d->init_chipset) {
+			ret = d->init_chipset(dev, d->name);
+			if (ret < 0)
+				goto out;
 		}
 		if (noisy)
 #ifdef __sparc__
@@ -693,18 +714,23 @@
 				d->name, pciirq);
 #endif
 	}
-	
-	if(pciirq < 0)		/* Error not an IRQ */
-		return index;
 
-	ide_pci_setup_ports(dev, d, pciirq, &index);
+	/* FIXME: silent failure can happen */
 
-	return index;
+	*index = ata_index;
+	ide_pci_setup_ports(dev, d, pciirq, index);
+out:
+	return ret;
 }
 
-void ide_setup_pci_device (struct pci_dev *dev, ide_pci_device_t *d)
+int ide_setup_pci_device(struct pci_dev *dev, ide_pci_device_t *d)
 {
-	ata_index_t index_list = do_ide_setup_pci_device(dev, d, 1);
+	ata_index_t index_list;
+	int ret;
+
+	ret = do_ide_setup_pci_device(dev, d, &index_list, 1);
+	if (ret < 0)
+		goto out;
 
 	if ((index_list.b.low & 0xf0) != 0xf0)
 		probe_hwif_init_with_fixup(&ide_hwifs[index_list.b.low], d->fixup);
@@ -712,25 +738,42 @@
 		probe_hwif_init_with_fixup(&ide_hwifs[index_list.b.high], d->fixup);
 
 	create_proc_ide_interfaces();
+out:
+	return ret;
 }
 
 EXPORT_SYMBOL_GPL(ide_setup_pci_device);
 
-void ide_setup_pci_devices (struct pci_dev *dev, struct pci_dev *dev2, ide_pci_device_t *d)
+int ide_setup_pci_devices(struct pci_dev *dev1, struct pci_dev *dev2,
+			  ide_pci_device_t *d)
 {
-	ata_index_t index_list  = do_ide_setup_pci_device(dev, d, 1);
-	ata_index_t index_list2 = do_ide_setup_pci_device(dev2, d, 0);
+	struct pci_dev *pdev[] = { dev1, dev2 };
+	ata_index_t index_list[2];
+	int ret, i;
 
-	if ((index_list.b.low & 0xf0) != 0xf0)
-		probe_hwif_init(&ide_hwifs[index_list.b.low]);
-	if ((index_list.b.high & 0xf0) != 0xf0)
-		probe_hwif_init(&ide_hwifs[index_list.b.high]);
-	if ((index_list2.b.low & 0xf0) != 0xf0)
-		probe_hwif_init(&ide_hwifs[index_list2.b.low]);
-	if ((index_list2.b.high & 0xf0) != 0xf0)
-		probe_hwif_init(&ide_hwifs[index_list2.b.high]);
+	for (i = 0; i < 2; i++) {
+		ret = do_ide_setup_pci_device(pdev[i], d, index_list + i, !i);
+		/*
+		 * FIXME: Mom, mom, they stole me the helper function to undo
+		 * do_ide_setup_pci_device() on the first device!
+		 */
+		if (ret < 0)
+			goto out;
+	}
+
+	for (i = 0; i < 2; i++) {
+		u8 idx[2] = { index_list[i].b.low, index_list[i].b.high };
+		int j;
+
+		for (j = 0; j < 2; j++) {
+			if ((idx[j] & 0xf0) != 0xf0)
+				probe_hwif_init(ide_hwifs + idx[j]);
+		}
+	}
 
 	create_proc_ide_interfaces();
+out:
+	return ret;
 }
 
 EXPORT_SYMBOL_GPL(ide_setup_pci_devices);
diff -Nru a/drivers/ieee1394/csr.c b/drivers/ieee1394/csr.c
--- a/drivers/ieee1394/csr.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/ieee1394/csr.c	2005-01-10 20:11:17 -08:00
@@ -201,7 +201,7 @@
 				CSR_REGISTER_BASE + CSR_SPEED_MAP,
 				CSR_REGISTER_BASE + CSR_SPEED_MAP_END);
 
-        host->csr.lock = SPIN_LOCK_UNLOCKED;
+        spin_lock_init(&host->csr.lock);
 
         host->csr.state                 = 0;
         host->csr.node_ids              = 0;
diff -Nru a/drivers/ieee1394/eth1394.c b/drivers/ieee1394/eth1394.c
--- a/drivers/ieee1394/eth1394.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/ieee1394/eth1394.c	2005-01-10 20:11:20 -08:00
@@ -168,11 +168,11 @@
  * consume in the event that some partial datagrams are never completed.  This
  * should probably change to a sysctl item or the like if possible.
  */
-MODULE_PARM(max_partial_datagrams, "i");
+static int max_partial_datagrams = 25;
+module_param(max_partial_datagrams, int, S_IRUGO | S_IWUSR);
 MODULE_PARM_DESC(max_partial_datagrams,
 		 "Maximum number of partially received fragmented datagrams "
 		 "(default = 25).");
-static int max_partial_datagrams = 25;
 
 
 static int ether1394_header(struct sk_buff *skb, struct net_device *dev,
diff -Nru a/drivers/ieee1394/pcilynx.c b/drivers/ieee1394/pcilynx.c
--- a/drivers/ieee1394/pcilynx.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/ieee1394/pcilynx.c	2005-01-10 20:11:18 -08:00
@@ -1546,8 +1546,8 @@
         host->pdev = dev;
         pci_set_drvdata(dev, lynx);
 
-        lynx->lock = SPIN_LOCK_UNLOCKED;
-        lynx->phy_reg_lock = SPIN_LOCK_UNLOCKED;
+        spin_lock_init(&lynx->lock);
+        spin_lock_init(&lynx->phy_reg_lock);
 
 #ifndef CONFIG_IEEE1394_PCILYNX_LOCALRAM
         lynx->pcl_mem = pci_alloc_consistent(dev, LOCALRAM_SIZE,
@@ -1659,11 +1659,11 @@
 	tasklet_init(&lynx->iso_rcv.tq, (void (*)(unsigned long))iso_rcv_bh,
 		     (unsigned long)lynx);
 
-        lynx->iso_rcv.lock = SPIN_LOCK_UNLOCKED;
+        spin_lock_init(&lynx->iso_rcv.lock);
 
-        lynx->async.queue_lock = SPIN_LOCK_UNLOCKED;
+        spin_lock_init(&lynx->async.queue_lock);
         lynx->async.channel = CHANNEL_ASYNC_SEND;
-        lynx->iso_send.queue_lock = SPIN_LOCK_UNLOCKED;
+        spin_lock_init(&lynx->iso_send.queue_lock);
         lynx->iso_send.channel = CHANNEL_ISO_SEND;
 
         PRINT(KERN_INFO, lynx->id, "remapped memory spaces reg 0x%p, rom 0x%p, "
diff -Nru a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c
--- a/drivers/ieee1394/sbp2.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/ieee1394/sbp2.c	2005-01-10 20:11:16 -08:00
@@ -708,7 +708,7 @@
 	INIT_LIST_HEAD(&scsi_id->sbp2_command_orb_inuse);
 	INIT_LIST_HEAD(&scsi_id->sbp2_command_orb_completed);
 	INIT_LIST_HEAD(&scsi_id->scsi_list);
-	scsi_id->sbp2_command_orb_lock = SPIN_LOCK_UNLOCKED;
+	spin_lock_init(&scsi_id->sbp2_command_orb_lock);
 	scsi_id->sbp2_device_type_and_lun = SBP2_DEVICE_TYPE_LUN_UNINITIALIZED;
 
 	ud->device.driver_data = scsi_id;
diff -Nru a/drivers/infiniband/Kconfig b/drivers/infiniband/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/Kconfig	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,14 @@
+menu "InfiniBand support"
+
+config INFINIBAND
+	tristate "InfiniBand support"
+	---help---
+	  Core support for InfiniBand (IB).  Make sure to also select
+	  any protocols you wish to use as well as drivers for your
+	  InfiniBand hardware.
+
+source "drivers/infiniband/hw/mthca/Kconfig"
+
+source "drivers/infiniband/ulp/ipoib/Kconfig"
+
+endmenu
diff -Nru a/drivers/infiniband/Makefile b/drivers/infiniband/Makefile
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/Makefile	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,3 @@
+obj-$(CONFIG_INFINIBAND)		+= core/
+obj-$(CONFIG_INFINIBAND_MTHCA)		+= hw/mthca/
+obj-$(CONFIG_INFINIBAND_IPOIB)		+= ulp/ipoib/
diff -Nru a/drivers/infiniband/core/Makefile b/drivers/infiniband/core/Makefile
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/core/Makefile	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,12 @@
+EXTRA_CFLAGS += -Idrivers/infiniband/include
+
+obj-$(CONFIG_INFINIBAND) +=	ib_core.o ib_mad.o ib_sa.o ib_umad.o
+
+ib_core-y :=			packer.o ud_header.o verbs.o sysfs.o \
+				device.o fmr_pool.o cache.o
+
+ib_mad-y :=			mad.o smi.o agent.o
+
+ib_sa-y :=			sa_query.o
+
+ib_umad-y :=			user_mad.o
diff -Nru a/drivers/infiniband/core/agent.c b/drivers/infiniband/core/agent.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/core/agent.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,399 @@
+/*
+ * Copyright (c) 2004 Mellanox Technologies Ltd.  All rights reserved.
+ * Copyright (c) 2004 Infinicon Corporation.  All rights reserved.
+ * Copyright (c) 2004 Intel Corporation.  All rights reserved.
+ * Copyright (c) 2004 Topspin Corporation.  All rights reserved.
+ * Copyright (c) 2004 Voltaire Corporation.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: agent.c 1389 2004-12-27 22:56:47Z roland $
+ */
+
+#include <linux/dma-mapping.h>
+
+#include <asm/bug.h>
+
+#include <ib_smi.h>
+
+#include "smi.h"
+#include "agent_priv.h"
+#include "mad_priv.h"
+
+
+spinlock_t ib_agent_port_list_lock;
+static LIST_HEAD(ib_agent_port_list);
+
+extern kmem_cache_t *ib_mad_cache;
+
+
+/*
+ * Caller must hold ib_agent_port_list_lock
+ */
+static inline struct ib_agent_port_private *
+__ib_get_agent_port(struct ib_device *device, int port_num,
+		    struct ib_mad_agent *mad_agent)
+{
+	struct ib_agent_port_private *entry;
+
+	BUG_ON(!(!!device ^ !!mad_agent));  /* Exactly one MUST be (!NULL) */
+
+	if (device) {
+		list_for_each_entry(entry, &ib_agent_port_list, port_list) {
+			if (entry->dr_smp_agent->device == device &&
+			    entry->port_num == port_num)
+				return entry;
+		}
+	} else {
+		list_for_each_entry(entry, &ib_agent_port_list, port_list) {
+			if ((entry->dr_smp_agent == mad_agent) ||
+			    (entry->lr_smp_agent == mad_agent) ||
+			    (entry->perf_mgmt_agent == mad_agent))
+				return entry;
+		}
+	}
+	return NULL;
+}
+
+static inline struct ib_agent_port_private *
+ib_get_agent_port(struct ib_device *device, int port_num,
+		  struct ib_mad_agent *mad_agent)
+{
+	struct ib_agent_port_private *entry;
+	unsigned long flags;
+
+	spin_lock_irqsave(&ib_agent_port_list_lock, flags);
+	entry = __ib_get_agent_port(device, port_num, mad_agent);
+	spin_unlock_irqrestore(&ib_agent_port_list_lock, flags);
+
+	return entry;
+}
+
+int smi_check_local_dr_smp(struct ib_smp *smp,
+			   struct ib_device *device,
+			   int port_num)
+{
+	struct ib_agent_port_private *port_priv;
+
+	if (smp->mgmt_class != IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE)
+		return 1;
+	port_priv = ib_get_agent_port(device, port_num, NULL);
+	if (!port_priv) {
+		printk(KERN_DEBUG SPFX "smi_check_local_dr_smp %s port %d "
+		       "not open\n",
+		       device->name, port_num);
+		return 1;
+	}
+
+	return smi_check_local_smp(port_priv->dr_smp_agent, smp);
+}
+
+static int agent_mad_send(struct ib_mad_agent *mad_agent,
+			  struct ib_agent_port_private *port_priv,
+			  struct ib_mad_private *mad_priv,
+			  struct ib_grh *grh,
+			  struct ib_wc *wc)
+{
+	struct ib_agent_send_wr *agent_send_wr;
+	struct ib_sge gather_list;
+	struct ib_send_wr send_wr;
+	struct ib_send_wr *bad_send_wr;
+	struct ib_ah_attr ah_attr;
+	unsigned long flags;
+	int ret = 1;
+
+	agent_send_wr = kmalloc(sizeof(*agent_send_wr), GFP_KERNEL);
+	if (!agent_send_wr)
+		goto out;
+	agent_send_wr->mad = mad_priv;
+
+	/* PCI mapping */
+	gather_list.addr = dma_map_single(mad_agent->device->dma_device,
+					  &mad_priv->mad,
+					  sizeof(mad_priv->mad),
+					  DMA_TO_DEVICE);
+	gather_list.length = sizeof(mad_priv->mad);
+	gather_list.lkey = (*port_priv->mr).lkey;
+
+	send_wr.next = NULL;
+	send_wr.opcode = IB_WR_SEND;
+	send_wr.sg_list = &gather_list;
+	send_wr.num_sge = 1;
+	send_wr.wr.ud.remote_qpn = wc->src_qp; /* DQPN */
+	send_wr.wr.ud.timeout_ms = 0;
+	send_wr.send_flags = IB_SEND_SIGNALED | IB_SEND_SOLICITED;
+
+	ah_attr.dlid = wc->slid;
+	ah_attr.port_num = mad_agent->port_num;
+	ah_attr.src_path_bits = wc->dlid_path_bits;
+	ah_attr.sl = wc->sl;
+	ah_attr.static_rate = 0;
+	ah_attr.ah_flags = 0; /* No GRH */
+	if (mad_priv->mad.mad.mad_hdr.mgmt_class == IB_MGMT_CLASS_PERF_MGMT) {
+		if (wc->wc_flags & IB_WC_GRH) {
+			ah_attr.ah_flags = IB_AH_GRH;
+			/* Should sgid be looked up ? */
+			ah_attr.grh.sgid_index = 0;
+			ah_attr.grh.hop_limit = grh->hop_limit;
+			ah_attr.grh.flow_label = be32_to_cpup(
+				&grh->version_tclass_flow)  & 0xfffff;
+			ah_attr.grh.traffic_class = (be32_to_cpup(
+				&grh->version_tclass_flow) >> 20) & 0xff;
+			memcpy(ah_attr.grh.dgid.raw,
+			       grh->sgid.raw,
+			       sizeof(ah_attr.grh.dgid));
+		}
+	}
+
+	agent_send_wr->ah = ib_create_ah(mad_agent->qp->pd, &ah_attr);
+	if (IS_ERR(agent_send_wr->ah)) {
+		printk(KERN_ERR SPFX "No memory for address handle\n");
+		kfree(agent_send_wr);
+		goto out;
+	}
+
+	send_wr.wr.ud.ah = agent_send_wr->ah;
+	if (mad_priv->mad.mad.mad_hdr.mgmt_class == IB_MGMT_CLASS_PERF_MGMT) {
+		send_wr.wr.ud.pkey_index = wc->pkey_index;
+		send_wr.wr.ud.remote_qkey = IB_QP1_QKEY;
+	} else { 	/* for SMPs */
+		send_wr.wr.ud.pkey_index = 0;
+		send_wr.wr.ud.remote_qkey = 0;
+	}
+	send_wr.wr.ud.mad_hdr = &mad_priv->mad.mad.mad_hdr;
+	send_wr.wr_id = (unsigned long)agent_send_wr;
+
+	pci_unmap_addr_set(agent_send_wr, mapping, gather_list.addr);
+
+	/* Send */
+	spin_lock_irqsave(&port_priv->send_list_lock, flags);
+	if (ib_post_send_mad(mad_agent, &send_wr, &bad_send_wr)) {
+		spin_unlock_irqrestore(&port_priv->send_list_lock, flags);
+		dma_unmap_single(mad_agent->device->dma_device,
+				 pci_unmap_addr(agent_send_wr, mapping),
+				 sizeof(mad_priv->mad),
+				 DMA_TO_DEVICE);
+		ib_destroy_ah(agent_send_wr->ah);
+		kfree(agent_send_wr);
+	} else {
+		list_add_tail(&agent_send_wr->send_list,
+			      &port_priv->send_posted_list);
+		spin_unlock_irqrestore(&port_priv->send_list_lock, flags);
+		ret = 0;
+	}
+
+out:
+	return ret;
+}
+
+int agent_send(struct ib_mad_private *mad,
+	       struct ib_grh *grh,
+	       struct ib_wc *wc,
+	       struct ib_device *device,
+	       int port_num)
+{
+	struct ib_agent_port_private *port_priv;
+	struct ib_mad_agent *mad_agent;
+
+	port_priv = ib_get_agent_port(device, port_num, NULL);
+	if (!port_priv) {
+		printk(KERN_DEBUG SPFX "agent_send %s port %d not open\n",
+		       device->name, port_num);
+		return 1;
+	}
+
+	/* Get mad agent based on mgmt_class in MAD */
+	switch (mad->mad.mad.mad_hdr.mgmt_class) {
+		case IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE:
+			mad_agent = port_priv->dr_smp_agent;
+			break;
+		case IB_MGMT_CLASS_SUBN_LID_ROUTED:
+			mad_agent = port_priv->lr_smp_agent;
+			break;
+		case IB_MGMT_CLASS_PERF_MGMT:
+			mad_agent = port_priv->perf_mgmt_agent;
+			break;
+		default:
+			return 1;
+	}
+
+	return agent_mad_send(mad_agent, port_priv, mad, grh, wc);
+}
+
+static void agent_send_handler(struct ib_mad_agent *mad_agent,
+			       struct ib_mad_send_wc *mad_send_wc)
+{
+	struct ib_agent_port_private	*port_priv;
+	struct ib_agent_send_wr		*agent_send_wr;
+	unsigned long			flags;
+
+	/* Find matching MAD agent */
+	port_priv = ib_get_agent_port(NULL, 0, mad_agent);
+	if (!port_priv) {
+		printk(KERN_ERR SPFX "agent_send_handler: no matching MAD "
+		       "agent %p\n", mad_agent);
+		return;
+	}
+
+	agent_send_wr = (struct ib_agent_send_wr *)(unsigned long)mad_send_wc->wr_id;
+	spin_lock_irqsave(&port_priv->send_list_lock, flags);
+	/* Remove completed send from posted send MAD list */
+	list_del(&agent_send_wr->send_list);
+	spin_unlock_irqrestore(&port_priv->send_list_lock, flags);
+
+	/* Unmap PCI */
+	dma_unmap_single(mad_agent->device->dma_device,
+			 pci_unmap_addr(agent_send_wr, mapping),
+			 sizeof(agent_send_wr->mad->mad),
+			 DMA_TO_DEVICE);
+
+	ib_destroy_ah(agent_send_wr->ah);
+
+	/* Release allocated memory */
+	kmem_cache_free(ib_mad_cache, agent_send_wr->mad);
+	kfree(agent_send_wr);
+}
+
+int ib_agent_port_open(struct ib_device *device, int port_num)
+{
+	int ret;
+	struct ib_agent_port_private *port_priv;
+	struct ib_mad_reg_req reg_req;
+	unsigned long flags;
+
+	/* First, check if port already open for SMI */
+	port_priv = ib_get_agent_port(device, port_num, NULL);
+	if (port_priv) {
+		printk(KERN_DEBUG SPFX "%s port %d already open\n",
+		       device->name, port_num);
+		return 0;
+	}
+
+	/* Create new device info */
+	port_priv = kmalloc(sizeof *port_priv, GFP_KERNEL);
+	if (!port_priv) {
+		printk(KERN_ERR SPFX "No memory for ib_agent_port_private\n");
+		ret = -ENOMEM;
+		goto error1;
+	}
+
+	memset(port_priv, 0, sizeof *port_priv);
+	port_priv->port_num = port_num;
+	spin_lock_init(&port_priv->send_list_lock);
+	INIT_LIST_HEAD(&port_priv->send_posted_list);
+
+	/* Obtain MAD agent for directed route SM class */
+	reg_req.mgmt_class = IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE;
+	reg_req.mgmt_class_version = 1;
+
+	port_priv->dr_smp_agent = ib_register_mad_agent(device, port_num,
+							IB_QPT_SMI,
+							NULL, 0,
+						       &agent_send_handler,
+							NULL, NULL);
+
+	if (IS_ERR(port_priv->dr_smp_agent)) {
+		ret = PTR_ERR(port_priv->dr_smp_agent);
+		goto error2;
+	}
+
+	/* Obtain MAD agent for LID routed SM class */
+	reg_req.mgmt_class = IB_MGMT_CLASS_SUBN_LID_ROUTED;
+	port_priv->lr_smp_agent = ib_register_mad_agent(device, port_num,
+							IB_QPT_SMI,
+							NULL, 0,
+						       &agent_send_handler,
+							NULL, NULL);
+	if (IS_ERR(port_priv->lr_smp_agent)) {
+		ret = PTR_ERR(port_priv->lr_smp_agent);
+		goto error3;
+	}
+
+	/* Obtain MAD agent for PerfMgmt class */
+	reg_req.mgmt_class = IB_MGMT_CLASS_PERF_MGMT;
+	port_priv->perf_mgmt_agent = ib_register_mad_agent(device, port_num,
+							   IB_QPT_GSI,
+							   NULL, 0,
+							  &agent_send_handler,
+							   NULL, NULL);
+	if (IS_ERR(port_priv->perf_mgmt_agent)) {
+		ret = PTR_ERR(port_priv->perf_mgmt_agent);
+		goto error4;
+	}
+
+	port_priv->mr = ib_get_dma_mr(port_priv->dr_smp_agent->qp->pd,
+				      IB_ACCESS_LOCAL_WRITE);
+	if (IS_ERR(port_priv->mr)) {
+		printk(KERN_ERR SPFX "Couldn't get DMA MR\n");
+		ret = PTR_ERR(port_priv->mr);
+		goto error5;
+	}
+
+	spin_lock_irqsave(&ib_agent_port_list_lock, flags);
+	list_add_tail(&port_priv->port_list, &ib_agent_port_list);
+	spin_unlock_irqrestore(&ib_agent_port_list_lock, flags);
+
+	return 0;
+
+error5:
+	ib_unregister_mad_agent(port_priv->perf_mgmt_agent);
+error4:
+	ib_unregister_mad_agent(port_priv->lr_smp_agent);
+error3:
+	ib_unregister_mad_agent(port_priv->dr_smp_agent);
+error2:
+	kfree(port_priv);
+error1:
+	return ret;
+}
+
+int ib_agent_port_close(struct ib_device *device, int port_num)
+{
+	struct ib_agent_port_private *port_priv;
+	unsigned long flags;
+
+	spin_lock_irqsave(&ib_agent_port_list_lock, flags);
+	port_priv = __ib_get_agent_port(device, port_num, NULL);
+	if (port_priv == NULL) {
+		spin_unlock_irqrestore(&ib_agent_port_list_lock, flags);
+		printk(KERN_ERR SPFX "Port %d not found\n", port_num);
+		return -ENODEV;
+	}
+	list_del(&port_priv->port_list);
+	spin_unlock_irqrestore(&ib_agent_port_list_lock, flags);
+
+	ib_dereg_mr(port_priv->mr);
+
+	ib_unregister_mad_agent(port_priv->perf_mgmt_agent);
+	ib_unregister_mad_agent(port_priv->lr_smp_agent);
+	ib_unregister_mad_agent(port_priv->dr_smp_agent);
+	kfree(port_priv);
+
+	return 0;
+}
diff -Nru a/drivers/infiniband/core/agent.h b/drivers/infiniband/core/agent.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/core/agent.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2004 Mellanox Technologies Ltd.  All rights reserved.
+ * Copyright (c) 2004 Infinicon Corporation.  All rights reserved.
+ * Copyright (c) 2004 Intel Corporation.  All rights reserved.
+ * Copyright (c) 2004 Topspin Corporation.  All rights reserved.
+ * Copyright (c) 2004 Voltaire Corporation.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: agent.h 1389 2004-12-27 22:56:47Z roland $
+ */
+
+#ifndef __AGENT_H_
+#define __AGENT_H_
+
+extern spinlock_t ib_agent_port_list_lock;
+
+extern int ib_agent_port_open(struct ib_device *device,
+			      int port_num);
+
+extern int ib_agent_port_close(struct ib_device *device, int port_num);
+
+extern int agent_send(struct ib_mad_private *mad,
+		      struct ib_grh *grh,
+		      struct ib_wc *wc,
+		      struct ib_device *device,
+		      int port_num);
+
+#endif	/* __AGENT_H_ */
diff -Nru a/drivers/infiniband/core/agent_priv.h b/drivers/infiniband/core/agent_priv.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/core/agent_priv.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2004 Mellanox Technologies Ltd.  All rights reserved.
+ * Copyright (c) 2004 Infinicon Corporation.  All rights reserved.
+ * Copyright (c) 2004 Intel Corporation.  All rights reserved.
+ * Copyright (c) 2004 Topspin Corporation.  All rights reserved.
+ * Copyright (c) 2004 Voltaire Corporation.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: agent_priv.h 1389 2004-12-27 22:56:47Z roland $
+ */
+
+#ifndef __IB_AGENT_PRIV_H__
+#define __IB_AGENT_PRIV_H__
+
+#include <linux/pci.h>
+
+#define SPFX "ib_agent: "
+
+struct ib_agent_send_wr {
+	struct list_head send_list;
+	struct ib_ah *ah;
+	struct ib_mad_private *mad;
+	DECLARE_PCI_UNMAP_ADDR(mapping)
+};
+
+struct ib_agent_port_private {
+	struct list_head port_list;
+	struct list_head send_posted_list;
+	spinlock_t send_list_lock;
+	int port_num;
+	struct ib_mad_agent *dr_smp_agent;    /* DR SM class */
+	struct ib_mad_agent *lr_smp_agent;    /* LR SM class */
+	struct ib_mad_agent *perf_mgmt_agent; /* PerfMgmt class */
+	struct ib_mr *mr;
+};
+
+#endif	/* __IB_AGENT_PRIV_H__ */
diff -Nru a/drivers/infiniband/core/cache.c b/drivers/infiniband/core/cache.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/core/cache.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,328 @@
+/*
+ * Copyright (c) 2004 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: cache.c 1349 2004-12-16 21:09:43Z roland $
+ */
+
+#include <linux/version.h>
+#include <linux/module.h>
+#include <linux/errno.h>
+#include <linux/slab.h>
+
+#include "core_priv.h"
+
+struct ib_pkey_cache {
+	int             table_len;
+	u16             table[0];
+};
+
+struct ib_gid_cache {
+	int             table_len;
+	union ib_gid    table[0];
+};
+
+struct ib_update_work {
+	struct work_struct work;
+	struct ib_device  *device;
+	u8                 port_num;
+};
+
+static inline int start_port(struct ib_device *device)
+{
+	return device->node_type == IB_NODE_SWITCH ? 0 : 1;
+}
+
+static inline int end_port(struct ib_device *device)
+{
+	return device->node_type == IB_NODE_SWITCH ? 0 : device->phys_port_cnt;
+}
+
+int ib_cached_gid_get(struct ib_device *device,
+		      u8                port,
+		      int               index,
+		      union ib_gid     *gid)
+{
+	struct ib_gid_cache *cache;
+	unsigned long flags;
+	int ret = 0;
+
+	if (port < start_port(device) || port > end_port(device))
+		return -EINVAL;
+
+	read_lock_irqsave(&device->cache.lock, flags);
+
+	cache = device->cache.gid_cache[port - start_port(device)];
+
+	if (index < 0 || index >= cache->table_len)
+		ret = -EINVAL;
+	else
+		*gid = cache->table[index];
+
+	read_unlock_irqrestore(&device->cache.lock, flags);
+
+	return ret;
+}
+EXPORT_SYMBOL(ib_cached_gid_get);
+
+int ib_cached_pkey_get(struct ib_device *device,
+		       u8                port,
+		       int               index,
+		       u16              *pkey)
+{
+	struct ib_pkey_cache *cache;
+	unsigned long flags;
+	int ret = 0;
+
+	if (port < start_port(device) || port > end_port(device))
+		return -EINVAL;
+
+	read_lock_irqsave(&device->cache.lock, flags);
+
+	cache = device->cache.pkey_cache[port - start_port(device)];
+
+	if (index < 0 || index >= cache->table_len)
+		ret = -EINVAL;
+	else
+		*pkey = cache->table[index];
+
+	read_unlock_irqrestore(&device->cache.lock, flags);
+
+	return ret;
+}
+EXPORT_SYMBOL(ib_cached_pkey_get);
+
+int ib_cached_pkey_find(struct ib_device *device,
+			u8                port,
+			u16               pkey,
+			u16              *index)
+{
+	struct ib_pkey_cache *cache;
+	unsigned long flags;
+	int i;
+	int ret = -ENOENT;
+
+	if (port < start_port(device) || port > end_port(device))
+		return -EINVAL;
+
+	read_lock_irqsave(&device->cache.lock, flags);
+
+	cache = device->cache.pkey_cache[port - start_port(device)];
+
+	*index = -1;
+
+	for (i = 0; i < cache->table_len; ++i)
+		if ((cache->table[i] & 0x7fff) == (pkey & 0x7fff)) {
+			*index = i;
+			ret = 0;
+			break;
+		}
+
+	read_unlock_irqrestore(&device->cache.lock, flags);
+
+	return ret;
+}
+EXPORT_SYMBOL(ib_cached_pkey_find);
+
+static void ib_cache_update(struct ib_device *device,
+			    u8                port)
+{
+	struct ib_port_attr       *tprops = NULL;
+	struct ib_pkey_cache      *pkey_cache = NULL, *old_pkey_cache;
+	struct ib_gid_cache       *gid_cache = NULL, *old_gid_cache;
+	int                        i;
+	int                        ret;
+
+	tprops = kmalloc(sizeof *tprops, GFP_KERNEL);
+	if (!tprops)
+		return;
+
+	ret = ib_query_port(device, port, tprops);
+	if (ret) {
+		printk(KERN_WARNING "ib_query_port failed (%d) for %s\n",
+		       ret, device->name);
+		goto err;
+	}
+
+	pkey_cache = kmalloc(sizeof *pkey_cache + tprops->pkey_tbl_len *
+			     sizeof *pkey_cache->table, GFP_KERNEL);
+	if (!pkey_cache)
+		goto err;
+
+	pkey_cache->table_len = tprops->pkey_tbl_len;
+
+	gid_cache = kmalloc(sizeof *gid_cache + tprops->gid_tbl_len *
+			    sizeof *gid_cache->table, GFP_KERNEL);
+	if (!gid_cache)
+		goto err;
+
+	gid_cache->table_len = tprops->gid_tbl_len;
+
+	for (i = 0; i < pkey_cache->table_len; ++i) {
+		ret = ib_query_pkey(device, port, i, pkey_cache->table + i);
+		if (ret) {
+			printk(KERN_WARNING "ib_query_pkey failed (%d) for %s (index %d)\n",
+			       ret, device->name, i);
+			goto err;
+		}
+	}
+
+	for (i = 0; i < gid_cache->table_len; ++i) {
+		ret = ib_query_gid(device, port, i, gid_cache->table + i);
+		if (ret) {
+			printk(KERN_WARNING "ib_query_gid failed (%d) for %s (index %d)\n",
+			       ret, device->name, i);
+			goto err;
+		}
+	}
+
+	write_lock_irq(&device->cache.lock);
+
+	old_pkey_cache = device->cache.pkey_cache[port - start_port(device)];
+	old_gid_cache  = device->cache.gid_cache [port - start_port(device)];
+
+	device->cache.pkey_cache[port - start_port(device)] = pkey_cache;
+	device->cache.gid_cache [port - start_port(device)] = gid_cache;
+
+	write_unlock_irq(&device->cache.lock);
+
+	kfree(old_pkey_cache);
+	kfree(old_gid_cache);
+	kfree(tprops);
+	return;
+
+err:
+	kfree(pkey_cache);
+	kfree(gid_cache);
+	kfree(tprops);
+}
+
+static void ib_cache_task(void *work_ptr)
+{
+	struct ib_update_work *work = work_ptr;
+
+	ib_cache_update(work->device, work->port_num);
+	kfree(work);
+}
+
+static void ib_cache_event(struct ib_event_handler *handler,
+			   struct ib_event *event)
+{
+	struct ib_update_work *work;
+
+	if (event->event == IB_EVENT_PORT_ERR    ||
+	    event->event == IB_EVENT_PORT_ACTIVE ||
+	    event->event == IB_EVENT_LID_CHANGE  ||
+	    event->event == IB_EVENT_PKEY_CHANGE ||
+	    event->event == IB_EVENT_SM_CHANGE) {
+		work = kmalloc(sizeof *work, GFP_ATOMIC);
+		if (work) {
+			INIT_WORK(&work->work, ib_cache_task, work);
+			work->device   = event->device;
+			work->port_num = event->element.port_num;
+			schedule_work(&work->work);
+		}
+	}
+}
+
+void ib_cache_setup_one(struct ib_device *device)
+{
+	int p;
+
+	rwlock_init(&device->cache.lock);
+
+	device->cache.pkey_cache =
+		kmalloc(sizeof *device->cache.pkey_cache *
+			(end_port(device) - start_port(device) + 1), GFP_KERNEL);
+	device->cache.gid_cache =
+		kmalloc(sizeof *device->cache.pkey_cache *
+			(end_port(device) - start_port(device) + 1), GFP_KERNEL);
+
+	if (!device->cache.pkey_cache || !device->cache.gid_cache) {
+		printk(KERN_WARNING "Couldn't allocate cache "
+		       "for %s\n", device->name);
+		goto err;
+	}
+
+	for (p = 0; p <= end_port(device) - start_port(device); ++p) {
+		device->cache.pkey_cache[p] = NULL;
+		device->cache.gid_cache [p] = NULL;
+		ib_cache_update(device, p + start_port(device));
+	}
+
+	INIT_IB_EVENT_HANDLER(&device->cache.event_handler,
+			      device, ib_cache_event);
+	if (ib_register_event_handler(&device->cache.event_handler))
+		goto err_cache;
+
+	return;
+
+err_cache:
+	for (p = 0; p <= end_port(device) - start_port(device); ++p) {
+		kfree(device->cache.pkey_cache[p]);
+		kfree(device->cache.gid_cache[p]);
+	}
+
+err:
+	kfree(device->cache.pkey_cache);
+	kfree(device->cache.gid_cache);
+}
+
+void ib_cache_cleanup_one(struct ib_device *device)
+{
+	int p;
+
+	ib_unregister_event_handler(&device->cache.event_handler);
+	flush_scheduled_work();
+
+	for (p = 0; p <= end_port(device) - start_port(device); ++p) {
+		kfree(device->cache.pkey_cache[p]);
+		kfree(device->cache.gid_cache[p]);
+	}
+
+	kfree(device->cache.pkey_cache);
+	kfree(device->cache.gid_cache);
+}
+
+struct ib_client cache_client = {
+	.name   = "cache",
+	.add    = ib_cache_setup_one,
+	.remove = ib_cache_cleanup_one
+};
+
+int __init ib_cache_setup(void)
+{
+	return ib_register_client(&cache_client);
+}
+
+void __exit ib_cache_cleanup(void)
+{
+	ib_unregister_client(&cache_client);
+}
diff -Nru a/drivers/infiniband/core/core_priv.h b/drivers/infiniband/core/core_priv.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/core/core_priv.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2004 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: core_priv.h 1349 2004-12-16 21:09:43Z roland $
+ */
+
+#ifndef _CORE_PRIV_H
+#define _CORE_PRIV_H
+
+#include <linux/list.h>
+#include <linux/spinlock.h>
+
+#include <ib_verbs.h>
+
+int  ib_device_register_sysfs(struct ib_device *device);
+void ib_device_unregister_sysfs(struct ib_device *device);
+
+int  ib_sysfs_setup(void);
+void ib_sysfs_cleanup(void);
+
+int  ib_cache_setup(void);
+void ib_cache_cleanup(void);
+
+#endif /* _CORE_PRIV_H */
diff -Nru a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/core/device.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,614 @@
+/*
+ * Copyright (c) 2004 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: device.c 1349 2004-12-16 21:09:43Z roland $
+ */
+
+#include <linux/module.h>
+#include <linux/string.h>
+#include <linux/errno.h>
+#include <linux/slab.h>
+#include <linux/init.h>
+
+#include <asm/semaphore.h>
+
+#include "core_priv.h"
+
+MODULE_AUTHOR("Roland Dreier");
+MODULE_DESCRIPTION("core kernel InfiniBand API");
+MODULE_LICENSE("Dual BSD/GPL");
+
+struct ib_client_data {
+	struct list_head  list;
+	struct ib_client *client;
+	void *            data;
+};
+
+static LIST_HEAD(device_list);
+static LIST_HEAD(client_list);
+
+/*
+ * device_sem protects access to both device_list and client_list.
+ * There's no real point to using multiple locks or something fancier
+ * like an rwsem: we always access both lists, and we're always
+ * modifying one list or the other list.  In any case this is not a
+ * hot path so there's no point in trying to optimize.
+ */
+static DECLARE_MUTEX(device_sem);
+
+static int ib_device_check_mandatory(struct ib_device *device)
+{
+#define IB_MANDATORY_FUNC(x) { offsetof(struct ib_device, x), #x }
+	static const struct {
+		size_t offset;
+		char  *name;
+	} mandatory_table[] = {
+		IB_MANDATORY_FUNC(query_device),
+		IB_MANDATORY_FUNC(query_port),
+		IB_MANDATORY_FUNC(query_pkey),
+		IB_MANDATORY_FUNC(query_gid),
+		IB_MANDATORY_FUNC(alloc_pd),
+		IB_MANDATORY_FUNC(dealloc_pd),
+		IB_MANDATORY_FUNC(create_ah),
+		IB_MANDATORY_FUNC(destroy_ah),
+		IB_MANDATORY_FUNC(create_qp),
+		IB_MANDATORY_FUNC(modify_qp),
+		IB_MANDATORY_FUNC(destroy_qp),
+		IB_MANDATORY_FUNC(post_send),
+		IB_MANDATORY_FUNC(post_recv),
+		IB_MANDATORY_FUNC(create_cq),
+		IB_MANDATORY_FUNC(destroy_cq),
+		IB_MANDATORY_FUNC(poll_cq),
+		IB_MANDATORY_FUNC(req_notify_cq),
+		IB_MANDATORY_FUNC(get_dma_mr),
+		IB_MANDATORY_FUNC(dereg_mr)
+	};
+	int i;
+
+	for (i = 0; i < sizeof mandatory_table / sizeof mandatory_table[0]; ++i) {
+		if (!*(void **) ((void *) device + mandatory_table[i].offset)) {
+			printk(KERN_WARNING "Device %s is missing mandatory function %s\n",
+			       device->name, mandatory_table[i].name);
+			return -EINVAL;
+		}
+	}
+
+	return 0;
+}
+
+static struct ib_device *__ib_device_get_by_name(const char *name)
+{
+	struct ib_device *device;
+
+	list_for_each_entry(device, &device_list, core_list)
+		if (!strncmp(name, device->name, IB_DEVICE_NAME_MAX))
+			return device;
+
+	return NULL;
+}
+
+
+static int alloc_name(char *name)
+{
+	long *inuse;
+	char buf[IB_DEVICE_NAME_MAX];
+	struct ib_device *device;
+	int i;
+
+	inuse = (long *) get_zeroed_page(GFP_KERNEL);
+	if (!inuse)
+		return -ENOMEM;
+
+	list_for_each_entry(device, &device_list, core_list) {
+		if (!sscanf(device->name, name, &i))
+			continue;
+		if (i < 0 || i >= PAGE_SIZE * 8)
+			continue;
+		snprintf(buf, sizeof buf, name, i);
+		if (!strncmp(buf, device->name, IB_DEVICE_NAME_MAX))
+			set_bit(i, inuse);
+	}
+
+	i = find_first_zero_bit(inuse, PAGE_SIZE * 8);
+	free_page((unsigned long) inuse);
+	snprintf(buf, sizeof buf, name, i);
+
+	if (__ib_device_get_by_name(buf))
+		return -ENFILE;
+
+	strlcpy(name, buf, IB_DEVICE_NAME_MAX);
+	return 0;
+}
+
+/**
+ * ib_alloc_device - allocate an IB device struct
+ * @size:size of structure to allocate
+ *
+ * Low-level drivers should use ib_alloc_device() to allocate &struct
+ * ib_device.  @size is the size of the structure to be allocated,
+ * including any private data used by the low-level driver.
+ * ib_dealloc_device() must be used to free structures allocated with
+ * ib_alloc_device().
+ */
+struct ib_device *ib_alloc_device(size_t size)
+{
+	void *dev;
+
+	BUG_ON(size < sizeof (struct ib_device));
+
+	dev = kmalloc(size, GFP_KERNEL);
+	if (!dev)
+		return NULL;
+
+	memset(dev, 0, size);
+
+	return dev;
+}
+EXPORT_SYMBOL(ib_alloc_device);
+
+/**
+ * ib_dealloc_device - free an IB device struct
+ * @device:structure to free
+ *
+ * Free a structure allocated with ib_alloc_device().
+ */
+void ib_dealloc_device(struct ib_device *device)
+{
+	if (device->reg_state == IB_DEV_UNINITIALIZED) {
+		kfree(device);
+		return;
+	}
+
+	BUG_ON(device->reg_state != IB_DEV_UNREGISTERED);
+
+	ib_device_unregister_sysfs(device);
+}
+EXPORT_SYMBOL(ib_dealloc_device);
+
+static int add_client_context(struct ib_device *device, struct ib_client *client)
+{
+	struct ib_client_data *context;
+	unsigned long flags;
+
+	context = kmalloc(sizeof *context, GFP_KERNEL);
+	if (!context) {
+		printk(KERN_WARNING "Couldn't allocate client context for %s/%s\n",
+		       device->name, client->name);
+		return -ENOMEM;
+	}
+
+	context->client = client;
+	context->data   = NULL;
+
+	spin_lock_irqsave(&device->client_data_lock, flags);
+	list_add(&context->list, &device->client_data_list);
+	spin_unlock_irqrestore(&device->client_data_lock, flags);
+
+	return 0;
+}
+
+/**
+ * ib_register_device - Register an IB device with IB core
+ * @device:Device to register
+ *
+ * Low-level drivers use ib_register_device() to register their
+ * devices with the IB core.  All registered clients will receive a
+ * callback for each device that is added. @device must be allocated
+ * with ib_alloc_device().
+ */
+int ib_register_device(struct ib_device *device)
+{
+	int ret;
+
+	down(&device_sem);
+
+	if (strchr(device->name, '%')) {
+		ret = alloc_name(device->name);
+		if (ret)
+			goto out;
+	}
+
+	if (ib_device_check_mandatory(device)) {
+		ret = -EINVAL;
+		goto out;
+	}
+
+	INIT_LIST_HEAD(&device->event_handler_list);
+	INIT_LIST_HEAD(&device->client_data_list);
+	spin_lock_init(&device->event_handler_lock);
+	spin_lock_init(&device->client_data_lock);
+
+	ret = ib_device_register_sysfs(device);
+	if (ret) {
+		printk(KERN_WARNING "Couldn't register device %s with driver model\n",
+		       device->name);
+		goto out;
+	}
+
+	list_add_tail(&device->core_list, &device_list);
+
+	device->reg_state = IB_DEV_REGISTERED;
+
+	{
+		struct ib_client *client;
+
+		list_for_each_entry(client, &client_list, list)
+			if (client->add && !add_client_context(device, client))
+				client->add(device);
+	}
+
+ out:
+	up(&device_sem);
+	return ret;
+}
+EXPORT_SYMBOL(ib_register_device);
+
+/**
+ * ib_unregister_device - Unregister an IB device
+ * @device:Device to unregister
+ *
+ * Unregister an IB device.  All clients will receive a remove callback.
+ */
+void ib_unregister_device(struct ib_device *device)
+{
+	struct ib_client *client;
+	struct ib_client_data *context, *tmp;
+	unsigned long flags;
+
+	down(&device_sem);
+
+	list_for_each_entry_reverse(client, &client_list, list)
+		if (client->remove)
+			client->remove(device);
+
+	list_del(&device->core_list);
+
+	up(&device_sem);
+
+	spin_lock_irqsave(&device->client_data_lock, flags);
+	list_for_each_entry_safe(context, tmp, &device->client_data_list, list)
+		kfree(context);
+	spin_unlock_irqrestore(&device->client_data_lock, flags);
+
+	device->reg_state = IB_DEV_UNREGISTERED;
+}
+EXPORT_SYMBOL(ib_unregister_device);
+
+/**
+ * ib_register_client - Register an IB client
+ * @client:Client to register
+ *
+ * Upper level users of the IB drivers can use ib_register_client() to
+ * register callbacks for IB device addition and removal.  When an IB
+ * device is added, each registered client's add method will be called
+ * (in the order the clients were registered), and when a device is
+ * removed, each client's remove method will be called (in the reverse
+ * order that clients were registered).  In addition, when
+ * ib_register_client() is called, the client will receive an add
+ * callback for all devices already registered.
+ */
+int ib_register_client(struct ib_client *client)
+{
+	struct ib_device *device;
+
+	down(&device_sem);
+
+	list_add_tail(&client->list, &client_list);
+	list_for_each_entry(device, &device_list, core_list)
+		if (client->add && !add_client_context(device, client))
+			client->add(device);
+
+	up(&device_sem);
+
+	return 0;
+}
+EXPORT_SYMBOL(ib_register_client);
+
+/**
+ * ib_unregister_client - Unregister an IB client
+ * @client:Client to unregister
+ *
+ * Upper level users use ib_unregister_client() to remove their client
+ * registration.  When ib_unregister_client() is called, the client
+ * will receive a remove callback for each IB device still registered.
+ */
+void ib_unregister_client(struct ib_client *client)
+{
+	struct ib_client_data *context, *tmp;
+	struct ib_device *device;
+	unsigned long flags;
+
+	down(&device_sem);
+
+	list_for_each_entry(device, &device_list, core_list) {
+		if (client->remove)
+			client->remove(device);
+
+		spin_lock_irqsave(&device->client_data_lock, flags);
+		list_for_each_entry_safe(context, tmp, &device->client_data_list, list)
+			if (context->client == client) {
+				list_del(&context->list);
+				kfree(context);
+			}
+		spin_unlock_irqrestore(&device->client_data_lock, flags);
+	}
+	list_del(&client->list);
+
+	up(&device_sem);
+}
+EXPORT_SYMBOL(ib_unregister_client);
+
+/**
+ * ib_get_client_data - Get IB client context
+ * @device:Device to get context for
+ * @client:Client to get context for
+ *
+ * ib_get_client_data() returns client context set with
+ * ib_set_client_data().
+ */
+void *ib_get_client_data(struct ib_device *device, struct ib_client *client)
+{
+	struct ib_client_data *context;
+	void *ret = NULL;
+	unsigned long flags;
+
+	spin_lock_irqsave(&device->client_data_lock, flags);
+	list_for_each_entry(context, &device->client_data_list, list)
+		if (context->client == client) {
+			ret = context->data;
+			break;
+		}
+	spin_unlock_irqrestore(&device->client_data_lock, flags);
+
+	return ret;
+}
+EXPORT_SYMBOL(ib_get_client_data);
+
+/**
+ * ib_set_client_data - Get IB client context
+ * @device:Device to set context for
+ * @client:Client to set context for
+ * @data:Context to set
+ *
+ * ib_set_client_data() sets client context that can be retrieved with
+ * ib_get_client_data().
+ */
+void ib_set_client_data(struct ib_device *device, struct ib_client *client,
+			void *data)
+{
+	struct ib_client_data *context;
+	unsigned long flags;
+
+	spin_lock_irqsave(&device->client_data_lock, flags);
+	list_for_each_entry(context, &device->client_data_list, list)
+		if (context->client == client) {
+			context->data = data;
+			goto out;
+		}
+
+	printk(KERN_WARNING "No client context found for %s/%s\n",
+	       device->name, client->name);
+
+out:
+	spin_unlock_irqrestore(&device->client_data_lock, flags);
+}
+EXPORT_SYMBOL(ib_set_client_data);
+
+/**
+ * ib_register_event_handler - Register an IB event handler
+ * @event_handler:Handler to register
+ *
+ * ib_register_event_handler() registers an event handler that will be
+ * called back when asynchronous IB events occur (as defined in
+ * chapter 11 of the InfiniBand Architecture Specification).  This
+ * callback may occur in interrupt context.
+ */
+int ib_register_event_handler  (struct ib_event_handler *event_handler)
+{
+	unsigned long flags;
+
+	spin_lock_irqsave(&event_handler->device->event_handler_lock, flags);
+	list_add_tail(&event_handler->list,
+		      &event_handler->device->event_handler_list);
+	spin_unlock_irqrestore(&event_handler->device->event_handler_lock, flags);
+
+	return 0;
+}
+EXPORT_SYMBOL(ib_register_event_handler);
+
+/**
+ * ib_unregister_event_handler - Unregister an event handler
+ * @event_handler:Handler to unregister
+ *
+ * Unregister an event handler registered with
+ * ib_register_event_handler().
+ */
+int ib_unregister_event_handler(struct ib_event_handler *event_handler)
+{
+	unsigned long flags;
+
+	spin_lock_irqsave(&event_handler->device->event_handler_lock, flags);
+	list_del(&event_handler->list);
+	spin_unlock_irqrestore(&event_handler->device->event_handler_lock, flags);
+
+	return 0;
+}
+EXPORT_SYMBOL(ib_unregister_event_handler);
+
+/**
+ * ib_dispatch_event - Dispatch an asynchronous event
+ * @event:Event to dispatch
+ *
+ * Low-level drivers must call ib_dispatch_event() to dispatch the
+ * event to all registered event handlers when an asynchronous event
+ * occurs.
+ */
+void ib_dispatch_event(struct ib_event *event)
+{
+	unsigned long flags;
+	struct ib_event_handler *handler;
+
+	spin_lock_irqsave(&event->device->event_handler_lock, flags);
+
+	list_for_each_entry(handler, &event->device->event_handler_list, list)
+		handler->handler(handler, event);
+
+	spin_unlock_irqrestore(&event->device->event_handler_lock, flags);
+}
+EXPORT_SYMBOL(ib_dispatch_event);
+
+/**
+ * ib_query_device - Query IB device attributes
+ * @device:Device to query
+ * @device_attr:Device attributes
+ *
+ * ib_query_device() returns the attributes of a device through the
+ * @device_attr pointer.
+ */
+int ib_query_device(struct ib_device *device,
+		    struct ib_device_attr *device_attr)
+{
+	return device->query_device(device, device_attr);
+}
+EXPORT_SYMBOL(ib_query_device);
+
+/**
+ * ib_query_port - Query IB port attributes
+ * @device:Device to query
+ * @port_num:Port number to query
+ * @port_attr:Port attributes
+ *
+ * ib_query_port() returns the attributes of a port through the
+ * @port_attr pointer.
+ */
+int ib_query_port(struct ib_device *device,
+		  u8 port_num,
+		  struct ib_port_attr *port_attr)
+{
+	return device->query_port(device, port_num, port_attr);
+}
+EXPORT_SYMBOL(ib_query_port);
+
+/**
+ * ib_query_gid - Get GID table entry
+ * @device:Device to query
+ * @port_num:Port number to query
+ * @index:GID table index to query
+ * @gid:Returned GID
+ *
+ * ib_query_gid() fetches the specified GID table entry.
+ */
+int ib_query_gid(struct ib_device *device,
+		 u8 port_num, int index, union ib_gid *gid)
+{
+	return device->query_gid(device, port_num, index, gid);
+}
+EXPORT_SYMBOL(ib_query_gid);
+
+/**
+ * ib_query_pkey - Get P_Key table entry
+ * @device:Device to query
+ * @port_num:Port number to query
+ * @index:P_Key table index to query
+ * @pkey:Returned P_Key
+ *
+ * ib_query_pkey() fetches the specified P_Key table entry.
+ */
+int ib_query_pkey(struct ib_device *device,
+		  u8 port_num, u16 index, u16 *pkey)
+{
+	return device->query_pkey(device, port_num, index, pkey);
+}
+EXPORT_SYMBOL(ib_query_pkey);
+
+/**
+ * ib_modify_device - Change IB device attributes
+ * @device:Device to modify
+ * @device_modify_mask:Mask of attributes to change
+ * @device_modify:New attribute values
+ *
+ * ib_modify_device() changes a device's attributes as specified by
+ * the @device_modify_mask and @device_modify structure.
+ */
+int ib_modify_device(struct ib_device *device,
+		     int device_modify_mask,
+		     struct ib_device_modify *device_modify)
+{
+	return device->modify_device(device, device_modify_mask,
+				     device_modify);
+}
+EXPORT_SYMBOL(ib_modify_device);
+
+/**
+ * ib_modify_port - Modifies the attributes for the specified port.
+ * @device: The device to modify.
+ * @port_num: The number of the port to modify.
+ * @port_modify_mask: Mask used to specify which attributes of the port
+ *   to change.
+ * @port_modify: New attribute values for the port.
+ *
+ * ib_modify_port() changes a port's attributes as specified by the
+ * @port_modify_mask and @port_modify structure.
+ */
+int ib_modify_port(struct ib_device *device,
+		   u8 port_num, int port_modify_mask,
+		   struct ib_port_modify *port_modify)
+{
+	return device->modify_port(device, port_num, port_modify_mask,
+				   port_modify);
+}
+EXPORT_SYMBOL(ib_modify_port);
+
+static int __init ib_core_init(void)
+{
+	int ret;
+
+	ret = ib_sysfs_setup();
+	if (ret)
+		printk(KERN_WARNING "Couldn't create InfiniBand device class\n");
+
+	ret = ib_cache_setup();
+	if (ret) {
+		printk(KERN_WARNING "Couldn't set up InfiniBand P_Key/GID cache\n");
+		ib_sysfs_cleanup();
+	}
+
+	return ret;
+}
+
+static void __exit ib_core_cleanup(void)
+{
+	ib_cache_cleanup();
+	ib_sysfs_cleanup();
+}
+
+module_init(ib_core_init);
+module_exit(ib_core_cleanup);
diff -Nru a/drivers/infiniband/core/fmr_pool.c b/drivers/infiniband/core/fmr_pool.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/core/fmr_pool.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,507 @@
+/*
+ * Copyright (c) 2004 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: fmr_pool.c 1349 2004-12-16 21:09:43Z roland $
+ */
+
+#include <linux/errno.h>
+#include <linux/spinlock.h>
+#include <linux/slab.h>
+#include <linux/jhash.h>
+#include <linux/kthread.h>
+
+#include <ib_fmr_pool.h>
+
+#include "core_priv.h"
+
+enum {
+	IB_FMR_MAX_REMAPS = 32,
+
+	IB_FMR_HASH_BITS  = 8,
+	IB_FMR_HASH_SIZE  = 1 << IB_FMR_HASH_BITS,
+	IB_FMR_HASH_MASK  = IB_FMR_HASH_SIZE - 1
+};
+
+/*
+ * If an FMR is not in use, then the list member will point to either
+ * its pool's free_list (if the FMR can be mapped again; that is,
+ * remap_count < IB_FMR_MAX_REMAPS) or its pool's dirty_list (if the
+ * FMR needs to be unmapped before being remapped).  In either of
+ * these cases it is a bug if the ref_count is not 0.  In other words,
+ * if ref_count is > 0, then the list member must not be linked into
+ * either free_list or dirty_list.
+ *
+ * The cache_node member is used to link the FMR into a cache bucket
+ * (if caching is enabled).  This is independent of the reference
+ * count of the FMR.  When a valid FMR is released, its ref_count is
+ * decremented, and if ref_count reaches 0, the FMR is placed in
+ * either free_list or dirty_list as appropriate.  However, it is not
+ * removed from the cache and may be "revived" if a call to
+ * ib_fmr_register_physical() occurs before the FMR is remapped.  In
+ * this case we just increment the ref_count and remove the FMR from
+ * free_list/dirty_list.
+ *
+ * Before we remap an FMR from free_list, we remove it from the cache
+ * (to prevent another user from obtaining a stale FMR).  When an FMR
+ * is released, we add it to the tail of the free list, so that our
+ * cache eviction policy is "least recently used."
+ *
+ * All manipulation of ref_count, list and cache_node is protected by
+ * pool_lock to maintain consistency.
+ */
+
+struct ib_fmr_pool {
+	spinlock_t                pool_lock;
+
+	int                       pool_size;
+	int                       max_pages;
+	int                       dirty_watermark;
+	int                       dirty_len;
+	struct list_head          free_list;
+	struct list_head          dirty_list;
+	struct hlist_head        *cache_bucket;
+
+	void                     (*flush_function)(struct ib_fmr_pool *pool,
+						   void *              arg);
+	void                     *flush_arg;
+
+	struct task_struct       *thread;
+
+	atomic_t                  req_ser;
+	atomic_t                  flush_ser;
+
+	wait_queue_head_t         force_wait;
+};
+
+static inline u32 ib_fmr_hash(u64 first_page)
+{
+	return jhash_2words((u32) first_page,
+			    (u32) (first_page >> 32),
+			    0);
+}
+
+/* Caller must hold pool_lock */
+static inline struct ib_pool_fmr *ib_fmr_cache_lookup(struct ib_fmr_pool *pool,
+						      u64 *page_list,
+						      int  page_list_len,
+						      u64  io_virtual_address)
+{
+	struct hlist_head *bucket;
+	struct ib_pool_fmr *fmr;
+	struct hlist_node *pos;
+
+	if (!pool->cache_bucket)
+		return NULL;
+
+	bucket = pool->cache_bucket + ib_fmr_hash(*page_list);
+
+	hlist_for_each_entry(fmr, pos, bucket, cache_node)
+		if (io_virtual_address == fmr->io_virtual_address &&
+		    page_list_len      == fmr->page_list_len      &&
+		    !memcmp(page_list, fmr->page_list,
+			    page_list_len * sizeof *page_list))
+			return fmr;
+
+	return NULL;
+}
+
+static void ib_fmr_batch_release(struct ib_fmr_pool *pool)
+{
+	int                 ret;
+	struct ib_pool_fmr *fmr;
+	LIST_HEAD(unmap_list);
+	LIST_HEAD(fmr_list);
+
+	spin_lock_irq(&pool->pool_lock);
+
+	list_for_each_entry(fmr, &pool->dirty_list, list) {
+		hlist_del_init(&fmr->cache_node);
+		fmr->remap_count = 0;
+		list_add_tail(&fmr->fmr->list, &fmr_list);
+
+#ifdef DEBUG
+		if (fmr->ref_count !=0) {
+			printk(KERN_WARNING "Unmapping FMR 0x%08x with ref count %d",
+			       fmr, fmr->ref_count);
+		}
+#endif
+	}
+
+	list_splice(&pool->dirty_list, &unmap_list);
+	INIT_LIST_HEAD(&pool->dirty_list);
+	pool->dirty_len = 0;
+
+	spin_unlock_irq(&pool->pool_lock);
+
+	if (list_empty(&unmap_list)) {
+		return;
+	}
+
+	ret = ib_unmap_fmr(&fmr_list);
+	if (ret)
+		printk(KERN_WARNING "ib_unmap_fmr returned %d", ret);
+
+	spin_lock_irq(&pool->pool_lock);
+	list_splice(&unmap_list, &pool->free_list);
+	spin_unlock_irq(&pool->pool_lock);
+}
+
+static int ib_fmr_cleanup_thread(void *pool_ptr)
+{
+	struct ib_fmr_pool *pool = pool_ptr;
+
+	do {
+		if (pool->dirty_len >= pool->dirty_watermark ||
+		    atomic_read(&pool->flush_ser) - atomic_read(&pool->req_ser) < 0) {
+			ib_fmr_batch_release(pool);
+
+			atomic_inc(&pool->flush_ser);
+			wake_up_interruptible(&pool->force_wait);
+
+			if (pool->flush_function)
+				pool->flush_function(pool, pool->flush_arg);
+		}
+
+		set_current_state(TASK_INTERRUPTIBLE);
+		if (pool->dirty_len < pool->dirty_watermark &&
+		    atomic_read(&pool->flush_ser) - atomic_read(&pool->req_ser) >= 0 &&
+		    !kthread_should_stop())
+			schedule();
+		__set_current_state(TASK_RUNNING);
+	} while (!kthread_should_stop());
+
+	return 0;
+}
+
+/**
+ * ib_create_fmr_pool - Create an FMR pool
+ * @pd:Protection domain for FMRs
+ * @params:FMR pool parameters
+ *
+ * Create a pool of FMRs.  Return value is pointer to new pool or
+ * error code if creation failed.
+ */
+struct ib_fmr_pool *ib_create_fmr_pool(struct ib_pd             *pd,
+				       struct ib_fmr_pool_param *params)
+{
+	struct ib_device   *device;
+	struct ib_fmr_pool *pool;
+	int i;
+	int ret;
+
+	if (!params)
+		return ERR_PTR(-EINVAL);
+
+	device = pd->device;
+	if (!device->alloc_fmr    || !device->dealloc_fmr  ||
+	    !device->map_phys_fmr || !device->unmap_fmr) {
+		printk(KERN_WARNING "Device %s does not support fast memory regions",
+		       device->name);
+		return ERR_PTR(-ENOSYS);
+	}
+
+	pool = kmalloc(sizeof *pool, GFP_KERNEL);
+	if (!pool) {
+		printk(KERN_WARNING "couldn't allocate pool struct");
+		return ERR_PTR(-ENOMEM);
+	}
+
+	pool->cache_bucket   = NULL;
+
+	pool->flush_function = params->flush_function;
+	pool->flush_arg      = params->flush_arg;
+
+	INIT_LIST_HEAD(&pool->free_list);
+	INIT_LIST_HEAD(&pool->dirty_list);
+
+	if (params->cache) {
+		pool->cache_bucket =
+			kmalloc(IB_FMR_HASH_SIZE * sizeof *pool->cache_bucket,
+				GFP_KERNEL);
+		if (!pool->cache_bucket) {
+			printk(KERN_WARNING "Failed to allocate cache in pool");
+			ret = -ENOMEM;
+			goto out_free_pool;
+		}
+
+		for (i = 0; i < IB_FMR_HASH_SIZE; ++i)
+			INIT_HLIST_HEAD(pool->cache_bucket + i);
+	}
+
+	pool->pool_size       = 0;
+	pool->max_pages       = params->max_pages_per_fmr;
+	pool->dirty_watermark = params->dirty_watermark;
+	pool->dirty_len       = 0;
+	spin_lock_init(&pool->pool_lock);
+	atomic_set(&pool->req_ser,   0);
+	atomic_set(&pool->flush_ser, 0);
+	init_waitqueue_head(&pool->force_wait);
+
+	pool->thread = kthread_create(ib_fmr_cleanup_thread,
+				      pool,
+				      "ib_fmr(%s)",
+				      device->name);
+	if (IS_ERR(pool->thread)) {
+		printk(KERN_WARNING "couldn't start cleanup thread");
+		ret = PTR_ERR(pool->thread);
+		goto out_free_pool;
+	}
+
+	{
+		struct ib_pool_fmr *fmr;
+		struct ib_fmr_attr attr = {
+			.max_pages = params->max_pages_per_fmr,
+			.max_maps  = IB_FMR_MAX_REMAPS,
+			.page_size = PAGE_SHIFT
+		};
+
+		for (i = 0; i < params->pool_size; ++i) {
+			fmr = kmalloc(sizeof *fmr + params->max_pages_per_fmr * sizeof (u64),
+				      GFP_KERNEL);
+			if (!fmr) {
+				printk(KERN_WARNING "failed to allocate fmr struct "
+				       "for FMR %d", i);
+				goto out_fail;
+			}
+
+			fmr->pool             = pool;
+			fmr->remap_count      = 0;
+			fmr->ref_count        = 0;
+			INIT_HLIST_NODE(&fmr->cache_node);
+
+			fmr->fmr = ib_alloc_fmr(pd, params->access, &attr);
+			if (IS_ERR(fmr->fmr)) {
+				printk(KERN_WARNING "fmr_create failed for FMR %d", i);
+				kfree(fmr);
+				goto out_fail;
+			}
+
+			list_add_tail(&fmr->list, &pool->free_list);
+			++pool->pool_size;
+		}
+	}
+
+	return pool;
+
+ out_free_pool:
+	kfree(pool->cache_bucket);
+	kfree(pool);
+
+	return ERR_PTR(ret);
+
+ out_fail:
+	ib_destroy_fmr_pool(pool);
+
+	return ERR_PTR(-ENOMEM);
+}
+EXPORT_SYMBOL(ib_create_fmr_pool);
+
+/**
+ * ib_destroy_fmr_pool - Free FMR pool
+ * @pool:FMR pool to free
+ *
+ * Destroy an FMR pool and free all associated resources.
+ */
+int ib_destroy_fmr_pool(struct ib_fmr_pool *pool)
+{
+	struct ib_pool_fmr *fmr;
+	struct ib_pool_fmr *tmp;
+	int                 i;
+
+	kthread_stop(pool->thread);
+	ib_fmr_batch_release(pool);
+
+	i = 0;
+	list_for_each_entry_safe(fmr, tmp, &pool->free_list, list) {
+		ib_dealloc_fmr(fmr->fmr);
+		list_del(&fmr->list);
+		kfree(fmr);
+		++i;
+	}
+
+	if (i < pool->pool_size)
+		printk(KERN_WARNING "pool still has %d regions registered",
+		       pool->pool_size - i);
+
+	kfree(pool->cache_bucket);
+	kfree(pool);
+
+	return 0;
+}
+EXPORT_SYMBOL(ib_destroy_fmr_pool);
+
+/**
+ * ib_flush_fmr_pool - Invalidate all unmapped FMRs
+ * @pool:FMR pool to flush
+ *
+ * Ensure that all unmapped FMRs are fully invalidated.
+ */
+int ib_flush_fmr_pool(struct ib_fmr_pool *pool)
+{
+	int serial;
+
+	atomic_inc(&pool->req_ser);
+	/*
+	 * It's OK if someone else bumps req_ser again here -- we'll
+	 * just wait a little longer.
+	 */
+	serial = atomic_read(&pool->req_ser);
+
+	wake_up_process(pool->thread);
+
+	if (wait_event_interruptible(pool->force_wait,
+				     atomic_read(&pool->flush_ser) -
+				     atomic_read(&pool->req_ser) >= 0))
+		return -EINTR;
+
+	return 0;
+}
+EXPORT_SYMBOL(ib_flush_fmr_pool);
+
+/**
+ * ib_fmr_pool_map_phys -
+ * @pool:FMR pool to allocate FMR from
+ * @page_list:List of pages to map
+ * @list_len:Number of pages in @page_list
+ * @io_virtual_address:I/O virtual address for new FMR
+ *
+ * Map an FMR from an FMR pool.
+ */
+struct ib_pool_fmr *ib_fmr_pool_map_phys(struct ib_fmr_pool *pool_handle,
+					 u64                *page_list,
+					 int                 list_len,
+					 u64                *io_virtual_address)
+{
+	struct ib_fmr_pool *pool = pool_handle;
+	struct ib_pool_fmr *fmr;
+	unsigned long       flags;
+	int                 result;
+
+	if (list_len < 1 || list_len > pool->max_pages)
+		return ERR_PTR(-EINVAL);
+
+	spin_lock_irqsave(&pool->pool_lock, flags);
+	fmr = ib_fmr_cache_lookup(pool,
+				  page_list,
+				  list_len,
+				  *io_virtual_address);
+	if (fmr) {
+		/* found in cache */
+		++fmr->ref_count;
+		if (fmr->ref_count == 1) {
+			list_del(&fmr->list);
+		}
+
+		spin_unlock_irqrestore(&pool->pool_lock, flags);
+
+		return fmr;
+	}
+
+	if (list_empty(&pool->free_list)) {
+		spin_unlock_irqrestore(&pool->pool_lock, flags);
+		return ERR_PTR(-EAGAIN);
+	}
+
+	fmr = list_entry(pool->free_list.next, struct ib_pool_fmr, list);
+	list_del(&fmr->list);
+	hlist_del_init(&fmr->cache_node);
+	spin_unlock_irqrestore(&pool->pool_lock, flags);
+
+	result = ib_map_phys_fmr(fmr->fmr, page_list, list_len,
+				 *io_virtual_address);
+
+	if (result) {
+		spin_lock_irqsave(&pool->pool_lock, flags);
+		list_add(&fmr->list, &pool->free_list);
+		spin_unlock_irqrestore(&pool->pool_lock, flags);
+
+		printk(KERN_WARNING "fmr_map returns %d",
+		       result);
+
+		return ERR_PTR(result);
+	}
+
+	++fmr->remap_count;
+	fmr->ref_count = 1;
+
+	if (pool->cache_bucket) {
+		fmr->io_virtual_address = *io_virtual_address;
+		fmr->page_list_len      = list_len;
+		memcpy(fmr->page_list, page_list, list_len * sizeof(*page_list));
+
+		spin_lock_irqsave(&pool->pool_lock, flags);
+		hlist_add_head(&fmr->cache_node,
+			       pool->cache_bucket + ib_fmr_hash(fmr->page_list[0]));
+		spin_unlock_irqrestore(&pool->pool_lock, flags);
+	}
+
+	return fmr;
+}
+EXPORT_SYMBOL(ib_fmr_pool_map_phys);
+
+/**
+ * ib_fmr_pool_unmap - Unmap FMR
+ * @fmr:FMR to unmap
+ *
+ * Unmap an FMR.  The FMR mapping may remain valid until the FMR is
+ * reused (or until ib_flush_fmr_pool() is called).
+ */
+int ib_fmr_pool_unmap(struct ib_pool_fmr *fmr)
+{
+	struct ib_fmr_pool *pool;
+	unsigned long flags;
+
+	pool = fmr->pool;
+
+	spin_lock_irqsave(&pool->pool_lock, flags);
+
+	--fmr->ref_count;
+	if (!fmr->ref_count) {
+		if (fmr->remap_count < IB_FMR_MAX_REMAPS) {
+			list_add_tail(&fmr->list, &pool->free_list);
+		} else {
+			list_add_tail(&fmr->list, &pool->dirty_list);
+			++pool->dirty_len;
+			wake_up_process(pool->thread);
+		}
+	}
+
+#ifdef DEBUG
+	if (fmr->ref_count < 0)
+		printk(KERN_WARNING "FMR %p has ref count %d < 0",
+		       fmr, fmr->ref_count);
+#endif
+
+	spin_unlock_irqrestore(&pool->pool_lock, flags);
+
+	return 0;
+}
+EXPORT_SYMBOL(ib_fmr_pool_unmap);
diff -Nru a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/core/mad.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,2632 @@
+/*
+ * Copyright (c) 2004, Voltaire, Inc. All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: mad.c 1389 2004-12-27 22:56:47Z roland $
+ */
+
+#include <linux/dma-mapping.h>
+#include <linux/interrupt.h>
+
+#include <ib_mad.h>
+
+#include "mad_priv.h"
+#include "smi.h"
+#include "agent.h"
+
+
+MODULE_LICENSE("Dual BSD/GPL");
+MODULE_DESCRIPTION("kernel IB MAD API");
+MODULE_AUTHOR("Hal Rosenstock");
+MODULE_AUTHOR("Sean Hefty");
+
+
+kmem_cache_t *ib_mad_cache;
+static struct list_head ib_mad_port_list;
+static u32 ib_mad_client_id = 0;
+
+/* Port list lock */
+static spinlock_t ib_mad_port_list_lock;
+
+
+/* Forward declarations */
+static int method_in_use(struct ib_mad_mgmt_method_table **method,
+			 struct ib_mad_reg_req *mad_reg_req);
+static void remove_mad_reg_req(struct ib_mad_agent_private *priv);
+static int ib_mad_post_receive_mads(struct ib_mad_qp_info *qp_info,
+				    struct ib_mad_private *mad);
+static void cancel_mads(struct ib_mad_agent_private *mad_agent_priv);
+static void ib_mad_complete_send_wr(struct ib_mad_send_wr_private *mad_send_wr,
+				    struct ib_mad_send_wc *mad_send_wc);
+static void timeout_sends(void *data);
+static void local_completions(void *data);
+static int solicited_mad(struct ib_mad *mad);
+static int add_nonoui_reg_req(struct ib_mad_reg_req *mad_reg_req,
+			      struct ib_mad_agent_private *agent_priv,
+			      u8 mgmt_class);
+static int add_oui_reg_req(struct ib_mad_reg_req *mad_reg_req,
+			   struct ib_mad_agent_private *agent_priv);
+
+/*
+ * Returns a ib_mad_port_private structure or NULL for a device/port
+ * Assumes ib_mad_port_list_lock is being held
+ */
+static inline struct ib_mad_port_private *
+__ib_get_mad_port(struct ib_device *device, int port_num)
+{
+	struct ib_mad_port_private *entry;
+
+	list_for_each_entry(entry, &ib_mad_port_list, port_list) {
+		if (entry->device == device && entry->port_num == port_num)
+			return entry;
+	}
+	return NULL;
+}
+
+/*
+ * Wrapper function to return a ib_mad_port_private structure or NULL
+ * for a device/port
+ */
+static inline struct ib_mad_port_private *
+ib_get_mad_port(struct ib_device *device, int port_num)
+{
+	struct ib_mad_port_private *entry;
+	unsigned long flags;
+
+	spin_lock_irqsave(&ib_mad_port_list_lock, flags);
+	entry = __ib_get_mad_port(device, port_num);
+	spin_unlock_irqrestore(&ib_mad_port_list_lock, flags);
+
+	return entry;
+}
+
+static inline u8 convert_mgmt_class(u8 mgmt_class)
+{
+	/* Alias IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE to 0 */
+	return mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE ?
+		0 : mgmt_class;
+}
+
+static int get_spl_qp_index(enum ib_qp_type qp_type)
+{
+	switch (qp_type)
+	{
+	case IB_QPT_SMI:
+		return 0;
+	case IB_QPT_GSI:
+		return 1;
+	default:
+		return -1;
+	}
+}
+
+static int vendor_class_index(u8 mgmt_class)
+{
+	return mgmt_class - IB_MGMT_CLASS_VENDOR_RANGE2_START;
+}
+
+static int is_vendor_class(u8 mgmt_class)
+{
+	if ((mgmt_class < IB_MGMT_CLASS_VENDOR_RANGE2_START) ||
+	    (mgmt_class > IB_MGMT_CLASS_VENDOR_RANGE2_END))
+		return 0;
+	return 1;
+}
+
+static int is_vendor_oui(char *oui)
+{
+	if (oui[0] || oui[1] || oui[2])
+		return 1;
+	return 0;
+}
+
+static int is_vendor_method_in_use(
+		struct ib_mad_mgmt_vendor_class *vendor_class,
+		struct ib_mad_reg_req *mad_reg_req)
+{
+	struct ib_mad_mgmt_method_table *method;
+	int i;
+
+	for (i = 0; i < MAX_MGMT_OUI; i++) {
+		if (!memcmp(vendor_class->oui[i], mad_reg_req->oui, 3)) {
+			method = vendor_class->method_table[i];
+			if (method) {
+				if (method_in_use(&method, mad_reg_req))
+					return 1;
+				else
+					break;
+			}
+		}
+	}
+	return 0;
+}
+
+/*
+ * ib_register_mad_agent - Register to send/receive MADs
+ */
+struct ib_mad_agent *ib_register_mad_agent(struct ib_device *device,
+					   u8 port_num,
+					   enum ib_qp_type qp_type,
+					   struct ib_mad_reg_req *mad_reg_req,
+					   u8 rmpp_version,
+					   ib_mad_send_handler send_handler,
+					   ib_mad_recv_handler recv_handler,
+					   void *context)
+{
+	struct ib_mad_port_private *port_priv;
+	struct ib_mad_agent *ret = ERR_PTR(-EINVAL);
+	struct ib_mad_agent_private *mad_agent_priv;
+	struct ib_mad_reg_req *reg_req = NULL;
+	struct ib_mad_mgmt_class_table *class;
+	struct ib_mad_mgmt_vendor_class_table *vendor;
+	struct ib_mad_mgmt_vendor_class *vendor_class;
+	struct ib_mad_mgmt_method_table *method;
+	int ret2, qpn;
+	unsigned long flags;
+	u8 mgmt_class, vclass;
+
+	/* Validate parameters */
+	qpn = get_spl_qp_index(qp_type);
+	if (qpn == -1)
+		goto error1;
+
+	if (rmpp_version)
+		goto error1;	/* XXX: until RMPP implemented */
+
+	/* Validate MAD registration request if supplied */
+	if (mad_reg_req) {
+		if (mad_reg_req->mgmt_class_version >= MAX_MGMT_VERSION)
+			goto error1;
+		if (!recv_handler)
+			goto error1;
+		if (mad_reg_req->mgmt_class >= MAX_MGMT_CLASS) {
+			/*
+			 * IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE is the only
+			 * one in this range currently allowed
+			 */
+			if (mad_reg_req->mgmt_class !=
+			    IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE)
+				goto error1;
+		} else if (mad_reg_req->mgmt_class == 0) {
+			/*
+			 * Class 0 is reserved in IBA and is used for
+			 * aliasing of IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE
+			 */
+			goto error1;
+		} else if (is_vendor_class(mad_reg_req->mgmt_class)) {
+			/*
+			 * If class is in "new" vendor range,
+			 * ensure supplied OUI is not zero
+			 */
+			if (!is_vendor_oui(mad_reg_req->oui))
+				goto error1;
+		}
+		/* Make sure class supplied is consistent with QP type */
+		if (qp_type == IB_QPT_SMI) {
+			if ((mad_reg_req->mgmt_class !=
+					IB_MGMT_CLASS_SUBN_LID_ROUTED) &&
+			    (mad_reg_req->mgmt_class !=
+					IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE))
+				goto error1;
+		} else {
+			if ((mad_reg_req->mgmt_class ==
+					IB_MGMT_CLASS_SUBN_LID_ROUTED) ||
+			    (mad_reg_req->mgmt_class ==
+					IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE))
+				goto error1;
+		}
+	} else {
+		/* No registration request supplied */
+		if (!send_handler)
+			goto error1;
+	}
+
+	/* Validate device and port */
+	port_priv = ib_get_mad_port(device, port_num);
+	if (!port_priv) {
+		ret = ERR_PTR(-ENODEV);
+		goto error1;
+	}
+
+	/* Allocate structures */
+	mad_agent_priv = kmalloc(sizeof *mad_agent_priv, GFP_KERNEL);
+	if (!mad_agent_priv) {
+		ret = ERR_PTR(-ENOMEM);
+		goto error1;
+	}
+
+	if (mad_reg_req) {
+		reg_req = kmalloc(sizeof *reg_req, GFP_KERNEL);
+		if (!reg_req) {
+			ret = ERR_PTR(-ENOMEM);
+			goto error2;
+		}
+		/* Make a copy of the MAD registration request */
+		memcpy(reg_req, mad_reg_req, sizeof *reg_req);
+	}
+
+	/* Now, fill in the various structures */
+	memset(mad_agent_priv, 0, sizeof *mad_agent_priv);
+	mad_agent_priv->qp_info = &port_priv->qp_info[qpn];
+	mad_agent_priv->reg_req = reg_req;
+	mad_agent_priv->rmpp_version = rmpp_version;
+	mad_agent_priv->agent.device = device;
+	mad_agent_priv->agent.recv_handler = recv_handler;
+	mad_agent_priv->agent.send_handler = send_handler;
+	mad_agent_priv->agent.context = context;
+	mad_agent_priv->agent.qp = port_priv->qp_info[qpn].qp;
+	mad_agent_priv->agent.port_num = port_num;
+
+	spin_lock_irqsave(&port_priv->reg_lock, flags);
+	mad_agent_priv->agent.hi_tid = ++ib_mad_client_id;
+
+	/*
+	 * Make sure MAD registration (if supplied)
+	 * is non overlapping with any existing ones
+	 */
+	if (mad_reg_req) {
+		mgmt_class = convert_mgmt_class(mad_reg_req->mgmt_class);
+		if (!is_vendor_class(mgmt_class)) {
+			class = port_priv->version[mad_reg_req->
+						   mgmt_class_version].class;
+			if (class) {
+				method = class->method_table[mgmt_class];
+				if (method) {
+					if (method_in_use(&method,
+							   mad_reg_req))
+						goto error3;
+				}
+			}
+			ret2 = add_nonoui_reg_req(mad_reg_req, mad_agent_priv,
+						  mgmt_class);
+		} else {
+			/* "New" vendor class range */
+			vendor = port_priv->version[mad_reg_req->
+						    mgmt_class_version].vendor;
+			if (vendor) {
+				vclass = vendor_class_index(mgmt_class);
+				vendor_class = vendor->vendor_class[vclass];
+				if (vendor_class) {
+					if (is_vendor_method_in_use(
+							vendor_class,
+							mad_reg_req))
+						goto error3;
+				}
+			}
+			ret2 = add_oui_reg_req(mad_reg_req, mad_agent_priv);
+		}
+		if (ret2) {
+			ret = ERR_PTR(ret2);
+			goto error3;
+		}
+	}
+
+	/* Add mad agent into port's agent list */
+	list_add_tail(&mad_agent_priv->agent_list, &port_priv->agent_list);
+	spin_unlock_irqrestore(&port_priv->reg_lock, flags);
+
+	spin_lock_init(&mad_agent_priv->lock);
+	INIT_LIST_HEAD(&mad_agent_priv->send_list);
+	INIT_LIST_HEAD(&mad_agent_priv->wait_list);
+	INIT_WORK(&mad_agent_priv->timed_work, timeout_sends, mad_agent_priv);
+	INIT_LIST_HEAD(&mad_agent_priv->local_list);
+	INIT_WORK(&mad_agent_priv->local_work, local_completions,
+		   mad_agent_priv);
+	atomic_set(&mad_agent_priv->refcount, 1);
+	init_waitqueue_head(&mad_agent_priv->wait);
+
+	return &mad_agent_priv->agent;
+
+error3:
+	spin_unlock_irqrestore(&port_priv->reg_lock, flags);
+	kfree(reg_req);
+error2:
+	kfree(mad_agent_priv);
+error1:
+	return ret;
+}
+EXPORT_SYMBOL(ib_register_mad_agent);
+
+static inline int is_snooping_sends(int mad_snoop_flags)
+{
+	return (mad_snoop_flags &
+		(/*IB_MAD_SNOOP_POSTED_SENDS |
+		 IB_MAD_SNOOP_RMPP_SENDS |*/
+		 IB_MAD_SNOOP_SEND_COMPLETIONS /*|
+		 IB_MAD_SNOOP_RMPP_SEND_COMPLETIONS*/));
+}
+
+static inline int is_snooping_recvs(int mad_snoop_flags)
+{
+	return (mad_snoop_flags &
+		(IB_MAD_SNOOP_RECVS /*|
+		 IB_MAD_SNOOP_RMPP_RECVS*/));
+}
+
+static int register_snoop_agent(struct ib_mad_qp_info *qp_info,
+				struct ib_mad_snoop_private *mad_snoop_priv)
+{
+	struct ib_mad_snoop_private **new_snoop_table;
+	unsigned long flags;
+	int i;
+
+	spin_lock_irqsave(&qp_info->snoop_lock, flags);
+	/* Check for empty slot in array. */
+	for (i = 0; i < qp_info->snoop_table_size; i++)
+		if (!qp_info->snoop_table[i])
+			break;
+
+	if (i == qp_info->snoop_table_size) {
+		/* Grow table. */
+		new_snoop_table = kmalloc(sizeof mad_snoop_priv *
+					  qp_info->snoop_table_size + 1,
+					  GFP_ATOMIC);
+		if (!new_snoop_table) {
+			i = -ENOMEM;
+			goto out;
+		}
+		if (qp_info->snoop_table) {
+			memcpy(new_snoop_table, qp_info->snoop_table,
+			       sizeof mad_snoop_priv *
+			       qp_info->snoop_table_size);
+			kfree(qp_info->snoop_table);
+		}
+		qp_info->snoop_table = new_snoop_table;
+		qp_info->snoop_table_size++;
+	}
+	qp_info->snoop_table[i] = mad_snoop_priv;
+	atomic_inc(&qp_info->snoop_count);
+out:
+	spin_unlock_irqrestore(&qp_info->snoop_lock, flags);
+	return i;
+}
+
+struct ib_mad_agent *ib_register_mad_snoop(struct ib_device *device,
+					   u8 port_num,
+					   enum ib_qp_type qp_type,
+					   int mad_snoop_flags,
+					   ib_mad_snoop_handler snoop_handler,
+					   ib_mad_recv_handler recv_handler,
+					   void *context)
+{
+	struct ib_mad_port_private *port_priv;
+	struct ib_mad_agent *ret;
+	struct ib_mad_snoop_private *mad_snoop_priv;
+	int qpn;
+
+	/* Validate parameters */
+	if ((is_snooping_sends(mad_snoop_flags) && !snoop_handler) ||
+	    (is_snooping_recvs(mad_snoop_flags) && !recv_handler)) {
+		ret = ERR_PTR(-EINVAL);
+		goto error1;
+	}
+	qpn = get_spl_qp_index(qp_type);
+	if (qpn == -1) {
+		ret = ERR_PTR(-EINVAL);
+		goto error1;
+	}
+	port_priv = ib_get_mad_port(device, port_num);
+	if (!port_priv) {
+		ret = ERR_PTR(-ENODEV);
+		goto error1;
+	}
+	/* Allocate structures */
+	mad_snoop_priv = kmalloc(sizeof *mad_snoop_priv, GFP_KERNEL);
+	if (!mad_snoop_priv) {
+		ret = ERR_PTR(-ENOMEM);
+		goto error1;
+	}
+
+	/* Now, fill in the various structures */
+	memset(mad_snoop_priv, 0, sizeof *mad_snoop_priv);
+	mad_snoop_priv->qp_info = &port_priv->qp_info[qpn];
+	mad_snoop_priv->agent.device = device;
+	mad_snoop_priv->agent.recv_handler = recv_handler;
+	mad_snoop_priv->agent.snoop_handler = snoop_handler;
+	mad_snoop_priv->agent.context = context;
+	mad_snoop_priv->agent.qp = port_priv->qp_info[qpn].qp;
+	mad_snoop_priv->agent.port_num = port_num;
+	mad_snoop_priv->mad_snoop_flags = mad_snoop_flags;
+	init_waitqueue_head(&mad_snoop_priv->wait);
+	mad_snoop_priv->snoop_index = register_snoop_agent(
+						&port_priv->qp_info[qpn],
+						mad_snoop_priv);
+	if (mad_snoop_priv->snoop_index < 0) {
+		ret = ERR_PTR(mad_snoop_priv->snoop_index);
+		goto error2;
+	}
+
+	atomic_set(&mad_snoop_priv->refcount, 1);
+	return &mad_snoop_priv->agent;
+
+error2:
+	kfree(mad_snoop_priv);
+error1:
+	return ret;
+}
+EXPORT_SYMBOL(ib_register_mad_snoop);
+
+static void unregister_mad_agent(struct ib_mad_agent_private *mad_agent_priv)
+{
+	struct ib_mad_port_private *port_priv;
+	unsigned long flags;
+
+	/* Note that we could still be handling received MADs */
+
+	/*
+	 * Canceling all sends results in dropping received response
+	 * MADs, preventing us from queuing additional work
+	 */
+	cancel_mads(mad_agent_priv);
+
+	port_priv = mad_agent_priv->qp_info->port_priv;
+	cancel_delayed_work(&mad_agent_priv->timed_work);
+	flush_workqueue(port_priv->wq);
+
+	spin_lock_irqsave(&port_priv->reg_lock, flags);
+	remove_mad_reg_req(mad_agent_priv);
+	list_del(&mad_agent_priv->agent_list);
+	spin_unlock_irqrestore(&port_priv->reg_lock, flags);
+
+	/* XXX: Cleanup pending RMPP receives for this agent */
+
+	atomic_dec(&mad_agent_priv->refcount);
+	wait_event(mad_agent_priv->wait,
+		   !atomic_read(&mad_agent_priv->refcount));
+
+	if (mad_agent_priv->reg_req)
+		kfree(mad_agent_priv->reg_req);
+	kfree(mad_agent_priv);
+}
+
+static void unregister_mad_snoop(struct ib_mad_snoop_private *mad_snoop_priv)
+{
+	struct ib_mad_qp_info *qp_info;
+	unsigned long flags;
+
+	qp_info = mad_snoop_priv->qp_info;
+	spin_lock_irqsave(&qp_info->snoop_lock, flags);
+	qp_info->snoop_table[mad_snoop_priv->snoop_index] = NULL;
+	atomic_dec(&qp_info->snoop_count);
+	spin_unlock_irqrestore(&qp_info->snoop_lock, flags);
+
+	atomic_dec(&mad_snoop_priv->refcount);
+	wait_event(mad_snoop_priv->wait,
+		   !atomic_read(&mad_snoop_priv->refcount));
+
+	kfree(mad_snoop_priv);
+}
+
+/*
+ * ib_unregister_mad_agent - Unregisters a client from using MAD services
+ */
+int ib_unregister_mad_agent(struct ib_mad_agent *mad_agent)
+{
+	struct ib_mad_agent_private *mad_agent_priv;
+	struct ib_mad_snoop_private *mad_snoop_priv;
+
+	/* If the TID is zero, the agent can only snoop. */
+	if (mad_agent->hi_tid) {
+		mad_agent_priv = container_of(mad_agent,
+					      struct ib_mad_agent_private,
+					      agent);
+		unregister_mad_agent(mad_agent_priv);
+	} else {
+		mad_snoop_priv = container_of(mad_agent,
+					      struct ib_mad_snoop_private,
+					      agent);
+		unregister_mad_snoop(mad_snoop_priv);
+	}
+	return 0;
+}
+EXPORT_SYMBOL(ib_unregister_mad_agent);
+
+static void dequeue_mad(struct ib_mad_list_head *mad_list)
+{
+	struct ib_mad_queue *mad_queue;
+	unsigned long flags;
+
+	BUG_ON(!mad_list->mad_queue);
+	mad_queue = mad_list->mad_queue;
+	spin_lock_irqsave(&mad_queue->lock, flags);
+	list_del(&mad_list->list);
+	mad_queue->count--;
+	spin_unlock_irqrestore(&mad_queue->lock, flags);
+}
+
+static void snoop_send(struct ib_mad_qp_info *qp_info,
+		       struct ib_send_wr *send_wr,
+		       struct ib_mad_send_wc *mad_send_wc,
+		       int mad_snoop_flags)
+{
+	struct ib_mad_snoop_private *mad_snoop_priv;
+	unsigned long flags;
+	int i;
+
+	spin_lock_irqsave(&qp_info->snoop_lock, flags);
+	for (i = 0; i < qp_info->snoop_table_size; i++) {
+		mad_snoop_priv = qp_info->snoop_table[i];
+		if (!mad_snoop_priv ||
+		    !(mad_snoop_priv->mad_snoop_flags & mad_snoop_flags))
+			continue;
+
+		atomic_inc(&mad_snoop_priv->refcount);
+		spin_unlock_irqrestore(&qp_info->snoop_lock, flags);
+		mad_snoop_priv->agent.snoop_handler(&mad_snoop_priv->agent,
+						    send_wr, mad_send_wc);
+		if (atomic_dec_and_test(&mad_snoop_priv->refcount))
+			wake_up(&mad_snoop_priv->wait);
+		spin_lock_irqsave(&qp_info->snoop_lock, flags);
+	}
+	spin_unlock_irqrestore(&qp_info->snoop_lock, flags);
+}
+
+static void snoop_recv(struct ib_mad_qp_info *qp_info,
+		       struct ib_mad_recv_wc *mad_recv_wc,
+		       int mad_snoop_flags)
+{
+	struct ib_mad_snoop_private *mad_snoop_priv;
+	unsigned long flags;
+	int i;
+
+	spin_lock_irqsave(&qp_info->snoop_lock, flags);
+	for (i = 0; i < qp_info->snoop_table_size; i++) {
+		mad_snoop_priv = qp_info->snoop_table[i];
+		if (!mad_snoop_priv ||
+		    !(mad_snoop_priv->mad_snoop_flags & mad_snoop_flags))
+			continue;
+
+		atomic_inc(&mad_snoop_priv->refcount);
+		spin_unlock_irqrestore(&qp_info->snoop_lock, flags);
+		mad_snoop_priv->agent.recv_handler(&mad_snoop_priv->agent,
+						   mad_recv_wc);
+		if (atomic_dec_and_test(&mad_snoop_priv->refcount))
+			wake_up(&mad_snoop_priv->wait);
+		spin_lock_irqsave(&qp_info->snoop_lock, flags);
+	}
+	spin_unlock_irqrestore(&qp_info->snoop_lock, flags);
+}
+
+/*
+ * Return 0 if SMP is to be sent
+ * Return 1 if SMP was consumed locally (whether or not solicited)
+ * Return < 0 if error
+ */
+static int handle_outgoing_smp(struct ib_mad_agent_private *mad_agent_priv,
+			       struct ib_smp *smp,
+			       struct ib_send_wr *send_wr)
+{
+	int ret, alloc_flags;
+	unsigned long flags;
+	struct ib_mad_local_private *local;
+	struct ib_mad_private *mad_priv;
+	struct ib_device *device = mad_agent_priv->agent.device;
+	u8 port_num = mad_agent_priv->agent.port_num;
+
+	if (!smi_handle_dr_smp_send(smp, device->node_type, port_num)) {
+		ret = -EINVAL;
+		printk(KERN_ERR PFX "Invalid directed route\n");
+		goto out;
+	}
+	/* Check to post send on QP or process locally */
+	ret = smi_check_local_dr_smp(smp, device, port_num);
+	if (!ret || !device->process_mad)
+		goto out;
+
+	if (in_atomic() || irqs_disabled())
+		alloc_flags = GFP_ATOMIC;
+	else
+		alloc_flags = GFP_KERNEL;
+	local = kmalloc(sizeof *local, alloc_flags);
+	if (!local) {
+		ret = -ENOMEM;
+		printk(KERN_ERR PFX "No memory for ib_mad_local_private\n");
+		goto out;
+	}
+	local->mad_priv = NULL;
+	mad_priv = kmem_cache_alloc(ib_mad_cache, alloc_flags);
+	if (!mad_priv) {
+		ret = -ENOMEM;
+		printk(KERN_ERR PFX "No memory for local response MAD\n");
+		kfree(local);
+		goto out;
+	}
+	ret = device->process_mad(device, 0, port_num, smp->dr_slid,
+				  (struct ib_mad *)smp,
+				  (struct ib_mad *)&mad_priv->mad);
+	switch (ret)
+	{
+	case IB_MAD_RESULT_SUCCESS | IB_MAD_RESULT_REPLY:
+		/*
+		 * See if response is solicited and
+		 * there is a recv handler
+		 */
+		if (solicited_mad(&mad_priv->mad.mad) &&
+		    mad_agent_priv->agent.recv_handler)
+			local->mad_priv = mad_priv;
+		else
+			kmem_cache_free(ib_mad_cache, mad_priv);
+		break;
+	case IB_MAD_RESULT_SUCCESS | IB_MAD_RESULT_CONSUMED:
+		kmem_cache_free(ib_mad_cache, mad_priv);
+		break;
+	case IB_MAD_RESULT_SUCCESS:
+		kmem_cache_free(ib_mad_cache, mad_priv);
+		kfree(local);
+		ret = 0;
+		goto out;
+	default:
+		kmem_cache_free(ib_mad_cache, mad_priv);
+		kfree(local);
+		ret = -EINVAL;
+		goto out;
+	}
+
+	local->send_wr = *send_wr;
+	local->send_wr.sg_list = local->sg_list;
+	memcpy(local->sg_list, send_wr->sg_list,
+	       sizeof *send_wr->sg_list * send_wr->num_sge);
+	local->send_wr.next = NULL;
+	local->tid = send_wr->wr.ud.mad_hdr->tid;
+	local->wr_id = send_wr->wr_id;
+	/* Reference MAD agent until local completion handled */
+	atomic_inc(&mad_agent_priv->refcount);
+	/* Queue local completion to local list */
+	spin_lock_irqsave(&mad_agent_priv->lock, flags);
+	list_add_tail(&local->completion_list, &mad_agent_priv->local_list);
+	spin_unlock_irqrestore(&mad_agent_priv->lock, flags);
+	queue_work(mad_agent_priv->qp_info->port_priv->wq,
+		  &mad_agent_priv->local_work);
+	ret = 1;
+out:
+	return ret;
+}
+
+static int ib_send_mad(struct ib_mad_agent_private *mad_agent_priv,
+		       struct ib_mad_send_wr_private *mad_send_wr)
+{
+	struct ib_mad_qp_info *qp_info;
+	struct ib_send_wr *bad_send_wr;
+	unsigned long flags;
+	int ret;
+
+	/* Replace user's WR ID with our own to find WR upon completion */
+	qp_info = mad_agent_priv->qp_info;
+	mad_send_wr->wr_id = mad_send_wr->send_wr.wr_id;
+	mad_send_wr->send_wr.wr_id = (unsigned long)&mad_send_wr->mad_list;
+	mad_send_wr->mad_list.mad_queue = &qp_info->send_queue;
+
+	spin_lock_irqsave(&qp_info->send_queue.lock, flags);
+	if (qp_info->send_queue.count++ < qp_info->send_queue.max_active) {
+		list_add_tail(&mad_send_wr->mad_list.list,
+			      &qp_info->send_queue.list);
+		spin_unlock_irqrestore(&qp_info->send_queue.lock, flags);
+		ret = ib_post_send(mad_agent_priv->agent.qp,
+				   &mad_send_wr->send_wr, &bad_send_wr);
+		if (ret) {
+			printk(KERN_ERR PFX "ib_post_send failed: %d\n", ret);
+			dequeue_mad(&mad_send_wr->mad_list);
+		}
+	} else {
+		list_add_tail(&mad_send_wr->mad_list.list,
+			      &qp_info->overflow_list);
+		spin_unlock_irqrestore(&qp_info->send_queue.lock, flags);
+		ret = 0;
+	}
+	return ret;
+}
+
+/*
+ * ib_post_send_mad - Posts MAD(s) to the send queue of the QP associated
+ *  with the registered client
+ */
+int ib_post_send_mad(struct ib_mad_agent *mad_agent,
+		     struct ib_send_wr *send_wr,
+		     struct ib_send_wr **bad_send_wr)
+{
+	int ret = -EINVAL;
+	struct ib_mad_agent_private *mad_agent_priv;
+
+	/* Validate supplied parameters */
+	if (!bad_send_wr)
+		goto error1;
+
+	if (!mad_agent || !send_wr)
+		goto error2;
+
+	if (!mad_agent->send_handler)
+		goto error2;
+
+	mad_agent_priv = container_of(mad_agent,
+				      struct ib_mad_agent_private,
+				      agent);
+
+	/* Walk list of send WRs and post each on send list */
+	while (send_wr) {
+		unsigned long			flags;
+		struct ib_send_wr		*next_send_wr;
+		struct ib_mad_send_wr_private	*mad_send_wr;
+		struct ib_smp			*smp;
+
+		/* Validate more parameters */
+		if (send_wr->num_sge > IB_MAD_SEND_REQ_MAX_SG)
+			goto error2;
+
+		if (send_wr->wr.ud.timeout_ms && !mad_agent->recv_handler)
+			goto error2;
+
+		if (!send_wr->wr.ud.mad_hdr) {
+			printk(KERN_ERR PFX "MAD header must be supplied "
+			       "in WR %p\n", send_wr);
+			goto error2;
+		}
+
+		/*
+		 * Save pointer to next work request to post in case the
+		 * current one completes, and the user modifies the work
+		 * request associated with the completion
+		 */
+		next_send_wr = (struct ib_send_wr *)send_wr->next;
+
+		smp = (struct ib_smp *)send_wr->wr.ud.mad_hdr;
+		if (smp->mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) {
+			ret = handle_outgoing_smp(mad_agent_priv, smp, send_wr);
+			if (ret < 0)		/* error */
+				goto error2;
+			else if (ret == 1)	/* locally consumed */
+				goto next;
+		}
+
+		/* Allocate MAD send WR tracking structure */
+		mad_send_wr = kmalloc(sizeof *mad_send_wr,
+				      (in_atomic() || irqs_disabled()) ?
+				      GFP_ATOMIC : GFP_KERNEL);
+		if (!mad_send_wr) {
+			printk(KERN_ERR PFX "No memory for "
+			       "ib_mad_send_wr_private\n");
+			ret = -ENOMEM;
+			goto error2;
+		}
+
+		mad_send_wr->send_wr = *send_wr;
+		mad_send_wr->send_wr.sg_list = mad_send_wr->sg_list;
+		memcpy(mad_send_wr->sg_list, send_wr->sg_list,
+		       sizeof *send_wr->sg_list * send_wr->num_sge);
+		mad_send_wr->send_wr.next = NULL;
+		mad_send_wr->tid = send_wr->wr.ud.mad_hdr->tid;
+		mad_send_wr->agent = mad_agent;
+		/* Timeout will be updated after send completes */
+		mad_send_wr->timeout = msecs_to_jiffies(send_wr->wr.
+							ud.timeout_ms);
+		mad_send_wr->retry = 0;
+		/* One reference for each work request to QP + response */
+		mad_send_wr->refcount = 1 + (mad_send_wr->timeout > 0);
+		mad_send_wr->status = IB_WC_SUCCESS;
+
+		/* Reference MAD agent until send completes */
+		atomic_inc(&mad_agent_priv->refcount);
+		spin_lock_irqsave(&mad_agent_priv->lock, flags);
+		list_add_tail(&mad_send_wr->agent_list,
+			      &mad_agent_priv->send_list);
+		spin_unlock_irqrestore(&mad_agent_priv->lock, flags);
+
+		ret = ib_send_mad(mad_agent_priv, mad_send_wr);
+		if (ret) {
+			/* Fail send request */
+			spin_lock_irqsave(&mad_agent_priv->lock, flags);
+			list_del(&mad_send_wr->agent_list);
+			spin_unlock_irqrestore(&mad_agent_priv->lock, flags);
+			atomic_dec(&mad_agent_priv->refcount);
+			goto error2;
+		}
+next:
+		send_wr = next_send_wr;
+	}
+	return 0;
+
+error2:
+	*bad_send_wr = send_wr;
+error1:
+	return ret;
+}
+EXPORT_SYMBOL(ib_post_send_mad);
+
+/*
+ * ib_free_recv_mad - Returns data buffers used to receive
+ *  a MAD to the access layer
+ */
+void ib_free_recv_mad(struct ib_mad_recv_wc *mad_recv_wc)
+{
+	struct ib_mad_recv_buf *entry;
+	struct ib_mad_private_header *mad_priv_hdr;
+	struct ib_mad_private *priv;
+
+	mad_priv_hdr = container_of(mad_recv_wc,
+				    struct ib_mad_private_header,
+				    recv_wc);
+	priv = container_of(mad_priv_hdr, struct ib_mad_private, header);
+
+	/*
+	 * Walk receive buffer list associated with this WC
+	 * No need to remove them from list of receive buffers
+	 */
+	list_for_each_entry(entry, &mad_recv_wc->recv_buf.list, list) {
+		/* Free previous receive buffer */
+		kmem_cache_free(ib_mad_cache, priv);
+		mad_priv_hdr = container_of(mad_recv_wc,
+					    struct ib_mad_private_header,
+					    recv_wc);
+		priv = container_of(mad_priv_hdr, struct ib_mad_private,
+				    header);
+	}
+
+	/* Free last buffer */
+	kmem_cache_free(ib_mad_cache, priv);
+}
+EXPORT_SYMBOL(ib_free_recv_mad);
+
+void ib_coalesce_recv_mad(struct ib_mad_recv_wc *mad_recv_wc,
+			  void *buf)
+{
+	printk(KERN_ERR PFX "ib_coalesce_recv_mad() not implemented yet\n");
+}
+EXPORT_SYMBOL(ib_coalesce_recv_mad);
+
+struct ib_mad_agent *ib_redirect_mad_qp(struct ib_qp *qp,
+					u8 rmpp_version,
+					ib_mad_send_handler send_handler,
+					ib_mad_recv_handler recv_handler,
+					void *context)
+{
+	return ERR_PTR(-EINVAL);	/* XXX: for now */
+}
+EXPORT_SYMBOL(ib_redirect_mad_qp);
+
+int ib_process_mad_wc(struct ib_mad_agent *mad_agent,
+		      struct ib_wc *wc)
+{
+	printk(KERN_ERR PFX "ib_process_mad_wc() not implemented yet\n");
+	return 0;
+}
+EXPORT_SYMBOL(ib_process_mad_wc);
+
+static int method_in_use(struct ib_mad_mgmt_method_table **method,
+			 struct ib_mad_reg_req *mad_reg_req)
+{
+	int i;
+
+	for (i = find_first_bit(mad_reg_req->method_mask, IB_MGMT_MAX_METHODS);
+	     i < IB_MGMT_MAX_METHODS;
+	     i = find_next_bit(mad_reg_req->method_mask, IB_MGMT_MAX_METHODS,
+			       1+i)) {
+		if ((*method)->agent[i]) {
+			printk(KERN_ERR PFX "Method %d already in use\n", i);
+			return -EINVAL;
+		}
+	}
+	return 0;
+}
+
+static int allocate_method_table(struct ib_mad_mgmt_method_table **method)
+{
+	/* Allocate management method table */
+	*method = kmalloc(sizeof **method, GFP_ATOMIC);
+	if (!*method) {
+		printk(KERN_ERR PFX "No memory for "
+		       "ib_mad_mgmt_method_table\n");
+		return -ENOMEM;
+	}
+	/* Clear management method table */
+	memset(*method, 0, sizeof **method);
+
+	return 0;
+}
+
+/*
+ * Check to see if there are any methods still in use
+ */
+static int check_method_table(struct ib_mad_mgmt_method_table *method)
+{
+	int i;
+
+	for (i = 0; i < IB_MGMT_MAX_METHODS; i++)
+		if (method->agent[i])
+			return 1;
+	return 0;
+}
+
+/*
+ * Check to see if there are any method tables for this class still in use
+ */
+static int check_class_table(struct ib_mad_mgmt_class_table *class)
+{
+	int i;
+
+	for (i = 0; i < MAX_MGMT_CLASS; i++)
+		if (class->method_table[i])
+			return 1;
+	return 0;
+}
+
+static int check_vendor_class(struct ib_mad_mgmt_vendor_class *vendor_class)
+{
+	int i;
+
+	for (i = 0; i < MAX_MGMT_OUI; i++)
+		if (vendor_class->method_table[i])
+			return 1;
+	return 0;
+}
+
+static int find_vendor_oui(struct ib_mad_mgmt_vendor_class *vendor_class,
+			   char *oui)
+{
+	int i;
+
+	for (i = 0; i < MAX_MGMT_OUI; i++)
+                /* Is there matching OUI for this vendor class ? */
+                if (!memcmp(vendor_class->oui[i], oui, 3))
+			return i;
+
+	return -1;
+}
+
+static int check_vendor_table(struct ib_mad_mgmt_vendor_class_table *vendor)
+{
+	int i;
+
+	for (i = 0; i < MAX_MGMT_VENDOR_RANGE2; i++)
+		if (vendor->vendor_class[i])
+			return 1;
+
+	return 0;
+}
+
+static void remove_methods_mad_agent(struct ib_mad_mgmt_method_table *method,
+				     struct ib_mad_agent_private *agent)
+{
+	int i;
+
+	/* Remove any methods for this mad agent */
+	for (i = 0; i < IB_MGMT_MAX_METHODS; i++) {
+		if (method->agent[i] == agent) {
+			method->agent[i] = NULL;
+		}
+	}
+}
+
+static int add_nonoui_reg_req(struct ib_mad_reg_req *mad_reg_req,
+			      struct ib_mad_agent_private *agent_priv,
+			      u8 mgmt_class)
+{
+	struct ib_mad_port_private *port_priv;
+	struct ib_mad_mgmt_class_table **class;
+	struct ib_mad_mgmt_method_table **method;
+	int i, ret;
+
+	port_priv = agent_priv->qp_info->port_priv;
+	class = &port_priv->version[mad_reg_req->mgmt_class_version].class;
+	if (!*class) {
+		/* Allocate management class table for "new" class version */
+		*class = kmalloc(sizeof **class, GFP_ATOMIC);
+		if (!*class) {
+			printk(KERN_ERR PFX "No memory for "
+			       "ib_mad_mgmt_class_table\n");
+			ret = -ENOMEM;
+			goto error1;
+		}
+		/* Clear management class table */
+		memset(*class, 0, sizeof(**class));
+		/* Allocate method table for this management class */
+		method = &(*class)->method_table[mgmt_class];
+		if ((ret = allocate_method_table(method)))
+			goto error2;
+	} else {
+		method = &(*class)->method_table[mgmt_class];
+		if (!*method) {
+			/* Allocate method table for this management class */
+			if ((ret = allocate_method_table(method)))
+				goto error1;
+		}
+	}
+
+	/* Now, make sure methods are not already in use */
+	if (method_in_use(method, mad_reg_req))
+		goto error3;
+
+	/* Finally, add in methods being registered */
+	for (i = find_first_bit(mad_reg_req->method_mask,
+				IB_MGMT_MAX_METHODS);
+	     i < IB_MGMT_MAX_METHODS;
+	     i = find_next_bit(mad_reg_req->method_mask, IB_MGMT_MAX_METHODS,
+			       1+i)) {
+		(*method)->agent[i] = agent_priv;
+	}
+	return 0;
+
+error3:
+	/* Remove any methods for this mad agent */
+	remove_methods_mad_agent(*method, agent_priv);
+	/* Now, check to see if there are any methods in use */
+	if (!check_method_table(*method)) {
+		/* If not, release management method table */
+		kfree(*method);
+		*method = NULL;
+	}
+	ret = -EINVAL;
+	goto error1;
+error2:
+	kfree(*class);
+	*class = NULL;
+error1:
+	return ret;
+}
+
+static int add_oui_reg_req(struct ib_mad_reg_req *mad_reg_req,
+			   struct ib_mad_agent_private *agent_priv)
+{
+	struct ib_mad_port_private *port_priv;
+	struct ib_mad_mgmt_vendor_class_table **vendor_table;
+	struct ib_mad_mgmt_vendor_class_table *vendor = NULL;
+	struct ib_mad_mgmt_vendor_class *vendor_class = NULL;
+	struct ib_mad_mgmt_method_table **method;
+	int i, ret = -ENOMEM;
+	u8 vclass;
+
+	/* "New" vendor (with OUI) class */
+	vclass = vendor_class_index(mad_reg_req->mgmt_class);
+	port_priv = agent_priv->qp_info->port_priv;
+	vendor_table = &port_priv->version[
+				mad_reg_req->mgmt_class_version].vendor;
+	if (!*vendor_table) {
+		/* Allocate mgmt vendor class table for "new" class version */
+		vendor = kmalloc(sizeof *vendor, GFP_ATOMIC);
+		if (!vendor) {
+			printk(KERN_ERR PFX "No memory for "
+			       "ib_mad_mgmt_vendor_class_table\n");
+			goto error1;
+		}
+		/* Clear management vendor class table */
+		memset(vendor, 0, sizeof(*vendor));
+		*vendor_table = vendor;
+	}
+	if (!(*vendor_table)->vendor_class[vclass]) {
+		/* Allocate table for this management vendor class */
+		vendor_class = kmalloc(sizeof *vendor_class, GFP_ATOMIC);
+		if (!vendor_class) {
+			printk(KERN_ERR PFX "No memory for "
+			       "ib_mad_mgmt_vendor_class\n");
+			goto error2;
+		}
+		memset(vendor_class, 0, sizeof(*vendor_class));
+		(*vendor_table)->vendor_class[vclass] = vendor_class;
+	}
+	for (i = 0; i < MAX_MGMT_OUI; i++) {
+		/* Is there matching OUI for this vendor class ? */
+		if (!memcmp((*vendor_table)->vendor_class[vclass]->oui[i],
+			    mad_reg_req->oui, 3)) {
+			method = &(*vendor_table)->vendor_class[
+						vclass]->method_table[i];
+			BUG_ON(!*method);
+			goto check_in_use;
+		}
+	}
+	for (i = 0; i < MAX_MGMT_OUI; i++) {
+		/* OUI slot available ? */
+		if (!is_vendor_oui((*vendor_table)->vendor_class[
+				vclass]->oui[i])) {
+			method = &(*vendor_table)->vendor_class[
+				vclass]->method_table[i];
+			BUG_ON(*method);
+			/* Allocate method table for this OUI */
+			if ((ret = allocate_method_table(method)))
+				goto error3;
+			memcpy((*vendor_table)->vendor_class[vclass]->oui[i],
+			       mad_reg_req->oui, 3);
+			goto check_in_use;
+		}
+	}
+	printk(KERN_ERR PFX "All OUI slots in use\n");
+	goto error3;
+
+check_in_use:
+	/* Now, make sure methods are not already in use */
+	if (method_in_use(method, mad_reg_req))
+		goto error4;
+
+	/* Finally, add in methods being registered */
+	for (i = find_first_bit(mad_reg_req->method_mask,
+				IB_MGMT_MAX_METHODS);
+	     i < IB_MGMT_MAX_METHODS;
+	     i = find_next_bit(mad_reg_req->method_mask, IB_MGMT_MAX_METHODS,
+			       1+i)) {
+		(*method)->agent[i] = agent_priv;
+	}
+	return 0;
+
+error4:
+	/* Remove any methods for this mad agent */
+	remove_methods_mad_agent(*method, agent_priv);
+	/* Now, check to see if there are any methods in use */
+	if (!check_method_table(*method)) {
+		/* If not, release management method table */
+		kfree(*method);
+		*method = NULL;
+	}
+	ret = -EINVAL;
+error3:
+	if (vendor_class) {
+		(*vendor_table)->vendor_class[vclass] = NULL;
+		kfree(vendor_class);
+	}
+error2:
+	if (vendor) {
+		*vendor_table = NULL;
+		kfree(vendor);
+	}
+error1:
+	return ret;
+}
+
+static void remove_mad_reg_req(struct ib_mad_agent_private *agent_priv)
+{
+	struct ib_mad_port_private *port_priv;
+	struct ib_mad_mgmt_class_table *class;
+	struct ib_mad_mgmt_method_table *method;
+	struct ib_mad_mgmt_vendor_class_table *vendor;
+	struct ib_mad_mgmt_vendor_class *vendor_class;
+	int index;
+	u8 mgmt_class;
+
+	/*
+	 * Was MAD registration request supplied
+	 * with original registration ?
+	 */
+	if (!agent_priv->reg_req) {
+		goto out;
+	}
+
+	port_priv = agent_priv->qp_info->port_priv;
+	class = port_priv->version[
+			agent_priv->reg_req->mgmt_class_version].class;
+	if (!class)
+		goto vendor_check;
+
+	mgmt_class = convert_mgmt_class(agent_priv->reg_req->mgmt_class);
+	method = class->method_table[mgmt_class];
+	if (method) {
+		/* Remove any methods for this mad agent */
+		remove_methods_mad_agent(method, agent_priv);
+		/* Now, check to see if there are any methods still in use */
+		if (!check_method_table(method)) {
+			/* If not, release management method table */
+			 kfree(method);
+			 class->method_table[mgmt_class] = NULL;
+			 /* Any management classes left ? */
+			if (!check_class_table(class)) {
+				/* If not, release management class table */
+				kfree(class);
+				port_priv->version[
+					agent_priv->reg_req->
+					mgmt_class_version].class = NULL;
+			}
+		}
+	}
+
+vendor_check:
+	vendor = port_priv->version[
+			agent_priv->reg_req->mgmt_class_version].vendor;
+	if (!vendor)
+		goto out;
+
+	mgmt_class = vendor_class_index(agent_priv->reg_req->mgmt_class);
+	vendor_class = vendor->vendor_class[mgmt_class];
+	if (vendor_class) {
+		index = find_vendor_oui(vendor_class, agent_priv->reg_req->oui);
+		if (index == -1)
+			goto out;
+		method = vendor_class->method_table[index];
+		if (method) {
+			/* Remove any methods for this mad agent */
+			remove_methods_mad_agent(method, agent_priv);
+			/*
+			 * Now, check to see if there are
+			 * any methods still in use
+			 */
+			if (!check_method_table(method)) {
+				/* If not, release management method table */
+				kfree(method);
+				vendor_class->method_table[index] = NULL;
+				memset(vendor_class->oui[index], 0, 3);
+				/* Any OUIs left ? */
+				if (!check_vendor_class(vendor_class)) {
+					/* If not, release vendor class table */
+					kfree(vendor_class);
+					vendor->vendor_class[mgmt_class] = NULL;
+					/* Any other vendor classes left ? */
+					if (!check_vendor_table(vendor)) {
+						kfree(vendor);
+						port_priv->version[
+							agent_priv->reg_req->
+							mgmt_class_version].
+							vendor = NULL;
+					}
+				}
+			}
+		}
+	}
+
+out:
+	return;
+}
+
+static int response_mad(struct ib_mad *mad)
+{
+	/* Trap represses are responses although response bit is reset */
+	return ((mad->mad_hdr.method == IB_MGMT_METHOD_TRAP_REPRESS) ||
+		(mad->mad_hdr.method & IB_MGMT_METHOD_RESP));
+}
+
+static int solicited_mad(struct ib_mad *mad)
+{
+	/* CM MADs are never solicited */
+	if (mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_CM) {
+		return 0;
+	}
+
+	/* XXX: Determine whether MAD is using RMPP */
+
+	/* Not using RMPP */
+	/* Is this MAD a response to a previous MAD ? */
+	return response_mad(mad);
+}
+
+static struct ib_mad_agent_private *
+find_mad_agent(struct ib_mad_port_private *port_priv,
+	       struct ib_mad *mad,
+	       int solicited)
+{
+	struct ib_mad_agent_private *mad_agent = NULL;
+	unsigned long flags;
+
+	spin_lock_irqsave(&port_priv->reg_lock, flags);
+
+	/*
+	 * Whether MAD was solicited determines type of routing to
+	 * MAD client.
+	 */
+	if (solicited) {
+		u32 hi_tid;
+		struct ib_mad_agent_private *entry;
+
+		/*
+		 * Routing is based on high 32 bits of transaction ID
+		 * of MAD.
+		 */
+		hi_tid = be64_to_cpu(mad->mad_hdr.tid) >> 32;
+		list_for_each_entry(entry, &port_priv->agent_list,
+				    agent_list) {
+			if (entry->agent.hi_tid == hi_tid) {
+				mad_agent = entry;
+				break;
+			}
+		}
+	} else {
+		struct ib_mad_mgmt_class_table *class;
+		struct ib_mad_mgmt_method_table *method;
+		struct ib_mad_mgmt_vendor_class_table *vendor;
+		struct ib_mad_mgmt_vendor_class *vendor_class;
+		struct ib_vendor_mad *vendor_mad;
+		int index;
+
+		/*
+		 * Routing is based on version, class, and method
+		 * For "newer" vendor MADs, also based on OUI
+		 */
+		if (mad->mad_hdr.class_version >= MAX_MGMT_VERSION)
+			goto out;
+		if (!is_vendor_class(mad->mad_hdr.mgmt_class)) {
+			class = port_priv->version[
+					mad->mad_hdr.class_version].class;
+			if (!class)
+				goto out;
+			method = class->method_table[convert_mgmt_class(
+							mad->mad_hdr.mgmt_class)];
+			if (method)
+				mad_agent = method->agent[mad->mad_hdr.method &
+							  ~IB_MGMT_METHOD_RESP];
+		} else {
+			vendor = port_priv->version[
+					mad->mad_hdr.class_version].vendor;
+			if (!vendor)
+				goto out;
+			vendor_class = vendor->vendor_class[vendor_class_index(
+						mad->mad_hdr.mgmt_class)];
+			if (!vendor_class)
+				goto out;
+			/* Find matching OUI */
+			vendor_mad = (struct ib_vendor_mad *)mad;
+			index = find_vendor_oui(vendor_class, vendor_mad->oui);
+			if (index == -1)
+				goto out;
+			method = vendor_class->method_table[index];
+			if (method) {
+				mad_agent = method->agent[mad->mad_hdr.method &
+							  ~IB_MGMT_METHOD_RESP];
+			}
+		}
+	}
+
+	if (mad_agent) {
+		if (mad_agent->agent.recv_handler)
+			atomic_inc(&mad_agent->refcount);
+		else {
+			printk(KERN_NOTICE PFX "No receive handler for client "
+			       "%p on port %d\n",
+			       &mad_agent->agent, port_priv->port_num);
+			mad_agent = NULL;
+		}
+	}
+out:
+	spin_unlock_irqrestore(&port_priv->reg_lock, flags);
+
+	return mad_agent;
+}
+
+static int validate_mad(struct ib_mad *mad, u32 qp_num)
+{
+	int valid = 0;
+
+	/* Make sure MAD base version is understood */
+	if (mad->mad_hdr.base_version != IB_MGMT_BASE_VERSION) {
+		printk(KERN_ERR PFX "MAD received with unsupported base "
+		       "version %d\n", mad->mad_hdr.base_version);
+		goto out;
+	}
+
+	/* Filter SMI packets sent to other than QP0 */
+	if ((mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_LID_ROUTED) ||
+	    (mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE)) {
+		if (qp_num == 0)
+			valid = 1;
+	} else {
+		/* Filter GSI packets sent to QP0 */
+		if (qp_num != 0)
+			valid = 1;
+	}
+
+out:
+	return valid;
+}
+
+/*
+ * Return start of fully reassembled MAD, or NULL, if MAD isn't assembled yet
+ */
+static struct ib_mad_private *
+reassemble_recv(struct ib_mad_agent_private *mad_agent_priv,
+		struct ib_mad_private *recv)
+{
+	/* Until we have RMPP, all receives are reassembled!... */
+	INIT_LIST_HEAD(&recv->header.recv_wc.recv_buf.list);
+	return recv;
+}
+
+static struct ib_mad_send_wr_private*
+find_send_req(struct ib_mad_agent_private *mad_agent_priv,
+	      u64 tid)
+{
+	struct ib_mad_send_wr_private *mad_send_wr;
+
+	list_for_each_entry(mad_send_wr, &mad_agent_priv->wait_list,
+			    agent_list) {
+		if (mad_send_wr->tid == tid)
+			return mad_send_wr;
+	}
+
+	/*
+	 * It's possible to receive the response before we've
+	 * been notified that the send has completed
+	 */
+	list_for_each_entry(mad_send_wr, &mad_agent_priv->send_list,
+			    agent_list) {
+		if (mad_send_wr->tid == tid && mad_send_wr->timeout) {
+			/* Verify request has not been canceled */
+			return (mad_send_wr->status == IB_WC_SUCCESS) ?
+				mad_send_wr : NULL;
+		}
+	}
+	return NULL;
+}
+
+static void ib_mad_complete_recv(struct ib_mad_agent_private *mad_agent_priv,
+				 struct ib_mad_private *recv,
+				 int solicited)
+{
+	struct ib_mad_send_wr_private *mad_send_wr;
+	struct ib_mad_send_wc mad_send_wc;
+	unsigned long flags;
+
+	/* Fully reassemble receive before processing */
+	recv = reassemble_recv(mad_agent_priv, recv);
+	if (!recv) {
+		if (atomic_dec_and_test(&mad_agent_priv->refcount))
+			wake_up(&mad_agent_priv->wait);
+		return;
+	}
+
+	/* Complete corresponding request */
+	if (solicited) {
+		spin_lock_irqsave(&mad_agent_priv->lock, flags);
+		mad_send_wr = find_send_req(mad_agent_priv,
+					    recv->mad.mad.mad_hdr.tid);
+		if (!mad_send_wr) {
+			spin_unlock_irqrestore(&mad_agent_priv->lock, flags);
+			ib_free_recv_mad(&recv->header.recv_wc);
+			if (atomic_dec_and_test(&mad_agent_priv->refcount))
+				wake_up(&mad_agent_priv->wait);
+			return;
+		}
+		/* Timeout = 0 means that we won't wait for a response */
+		mad_send_wr->timeout = 0;
+		spin_unlock_irqrestore(&mad_agent_priv->lock, flags);
+
+		/* Defined behavior is to complete response before request */
+		recv->header.recv_wc.wc->wr_id = mad_send_wr->wr_id;
+		mad_agent_priv->agent.recv_handler(
+						&mad_agent_priv->agent,
+						&recv->header.recv_wc);
+		atomic_dec(&mad_agent_priv->refcount);
+
+		mad_send_wc.status = IB_WC_SUCCESS;
+		mad_send_wc.vendor_err = 0;
+		mad_send_wc.wr_id = mad_send_wr->wr_id;
+		ib_mad_complete_send_wr(mad_send_wr, &mad_send_wc);
+	} else {
+		mad_agent_priv->agent.recv_handler(
+						&mad_agent_priv->agent,
+						&recv->header.recv_wc);
+		if (atomic_dec_and_test(&mad_agent_priv->refcount))
+			wake_up(&mad_agent_priv->wait);
+	}
+}
+
+static void ib_mad_recv_done_handler(struct ib_mad_port_private *port_priv,
+				     struct ib_wc *wc)
+{
+	struct ib_mad_qp_info *qp_info;
+	struct ib_mad_private_header *mad_priv_hdr;
+	struct ib_mad_private *recv, *response;
+	struct ib_mad_list_head *mad_list;
+	struct ib_mad_agent_private *mad_agent;
+	int solicited;
+
+	response = kmem_cache_alloc(ib_mad_cache, GFP_KERNEL);
+	if (!response)
+		printk(KERN_ERR PFX "ib_mad_recv_done_handler no memory "
+		       "for response buffer\n");
+
+	mad_list = (struct ib_mad_list_head *)(unsigned long)wc->wr_id;
+	qp_info = mad_list->mad_queue->qp_info;
+	dequeue_mad(mad_list);
+
+	mad_priv_hdr = container_of(mad_list, struct ib_mad_private_header,
+				    mad_list);
+	recv = container_of(mad_priv_hdr, struct ib_mad_private, header);
+	dma_unmap_single(port_priv->device->dma_device,
+			 pci_unmap_addr(&recv->header, mapping),
+			 sizeof(struct ib_mad_private) -
+			 sizeof(struct ib_mad_private_header),
+			 DMA_FROM_DEVICE);
+
+	/* Setup MAD receive work completion from "normal" work completion */
+	recv->header.recv_wc.wc = wc;
+	recv->header.recv_wc.mad_len = sizeof(struct ib_mad);
+	recv->header.recv_wc.recv_buf.mad = &recv->mad.mad;
+	recv->header.recv_wc.recv_buf.grh = &recv->grh;
+
+	if (atomic_read(&qp_info->snoop_count))
+		snoop_recv(qp_info, &recv->header.recv_wc, IB_MAD_SNOOP_RECVS);
+
+	/* Validate MAD */
+	if (!validate_mad(&recv->mad.mad, qp_info->qp->qp_num))
+		goto out;
+
+	if (recv->mad.mad.mad_hdr.mgmt_class ==
+	    IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) {
+		if (!smi_handle_dr_smp_recv(&recv->mad.smp,
+					    port_priv->device->node_type,
+					    port_priv->port_num,
+					    port_priv->device->phys_port_cnt))
+			goto out;
+		if (!smi_check_forward_dr_smp(&recv->mad.smp))
+			goto local;
+		if (!smi_handle_dr_smp_send(&recv->mad.smp,
+					    port_priv->device->node_type,
+					    port_priv->port_num))
+			goto out;
+		if (!smi_check_local_dr_smp(&recv->mad.smp,
+					    port_priv->device,
+					    port_priv->port_num))
+			goto out;
+	}
+
+local:
+	/* Give driver "right of first refusal" on incoming MAD */
+	if (port_priv->device->process_mad) {
+		int ret;
+
+		if (!response) {
+			printk(KERN_ERR PFX "No memory for response MAD\n");
+			/*
+			 * Is it better to assume that
+			 * it wouldn't be processed ?
+			 */
+			goto out;
+		}
+
+		ret = port_priv->device->process_mad(port_priv->device, 0,
+						     port_priv->port_num,
+						     wc->slid,
+						     &recv->mad.mad,
+						     &response->mad.mad);
+		if (ret & IB_MAD_RESULT_SUCCESS) {
+			if (ret & IB_MAD_RESULT_CONSUMED)
+				goto out;
+			if (ret & IB_MAD_RESULT_REPLY) {
+				/* Send response */
+				if (!agent_send(response, &recv->grh, wc,
+						port_priv->device,
+						port_priv->port_num))
+					response = NULL;
+				goto out;
+			}
+		}
+	}
+
+	/* Determine corresponding MAD agent for incoming receive MAD */
+	solicited = solicited_mad(&recv->mad.mad);
+	mad_agent = find_mad_agent(port_priv, &recv->mad.mad, solicited);
+	if (mad_agent) {
+		ib_mad_complete_recv(mad_agent, recv, solicited);
+		/*
+		 * recv is freed up in error cases in ib_mad_complete_recv
+		 * or via recv_handler in ib_mad_complete_recv()
+		 */
+		recv = NULL;
+	}
+
+out:
+	/* Post another receive request for this QP */
+	if (response) {
+		ib_mad_post_receive_mads(qp_info, response);
+		if (recv)
+			kmem_cache_free(ib_mad_cache, recv);
+	} else
+		ib_mad_post_receive_mads(qp_info, recv);
+}
+
+static void adjust_timeout(struct ib_mad_agent_private *mad_agent_priv)
+{
+	struct ib_mad_send_wr_private *mad_send_wr;
+	unsigned long delay;
+
+	if (list_empty(&mad_agent_priv->wait_list)) {
+		cancel_delayed_work(&mad_agent_priv->timed_work);
+	} else {
+		mad_send_wr = list_entry(mad_agent_priv->wait_list.next,
+					 struct ib_mad_send_wr_private,
+					 agent_list);
+
+		if (time_after(mad_agent_priv->timeout,
+			       mad_send_wr->timeout)) {
+			mad_agent_priv->timeout = mad_send_wr->timeout;
+			cancel_delayed_work(&mad_agent_priv->timed_work);
+			delay = mad_send_wr->timeout - jiffies;
+			if ((long)delay <= 0)
+				delay = 1;
+			queue_delayed_work(mad_agent_priv->qp_info->
+					   port_priv->wq,
+					   &mad_agent_priv->timed_work, delay);
+		}
+	}
+}
+
+static void wait_for_response(struct ib_mad_agent_private *mad_agent_priv,
+			      struct ib_mad_send_wr_private *mad_send_wr )
+{
+	struct ib_mad_send_wr_private *temp_mad_send_wr;
+	struct list_head *list_item;
+	unsigned long delay;
+
+	list_del(&mad_send_wr->agent_list);
+
+	delay = mad_send_wr->timeout;
+	mad_send_wr->timeout += jiffies;
+
+	list_for_each_prev(list_item, &mad_agent_priv->wait_list) {
+		temp_mad_send_wr = list_entry(list_item,
+					      struct ib_mad_send_wr_private,
+					      agent_list);
+		if (time_after(mad_send_wr->timeout,
+			       temp_mad_send_wr->timeout))
+			break;
+	}
+	list_add(&mad_send_wr->agent_list, list_item);
+
+	/* Reschedule a work item if we have a shorter timeout */
+	if (mad_agent_priv->wait_list.next == &mad_send_wr->agent_list) {
+		cancel_delayed_work(&mad_agent_priv->timed_work);
+		queue_delayed_work(mad_agent_priv->qp_info->port_priv->wq,
+				   &mad_agent_priv->timed_work, delay);
+	}
+}
+
+/*
+ * Process a send work completion
+ */
+static void ib_mad_complete_send_wr(struct ib_mad_send_wr_private *mad_send_wr,
+				    struct ib_mad_send_wc *mad_send_wc)
+{
+	struct ib_mad_agent_private	*mad_agent_priv;
+	unsigned long			flags;
+
+	mad_agent_priv = container_of(mad_send_wr->agent,
+				      struct ib_mad_agent_private, agent);
+
+	spin_lock_irqsave(&mad_agent_priv->lock, flags);
+	if (mad_send_wc->status != IB_WC_SUCCESS &&
+	    mad_send_wr->status == IB_WC_SUCCESS) {
+		mad_send_wr->status = mad_send_wc->status;
+		mad_send_wr->refcount -= (mad_send_wr->timeout > 0);
+	}
+
+	if (--mad_send_wr->refcount > 0) {
+		if (mad_send_wr->refcount == 1 && mad_send_wr->timeout &&
+		    mad_send_wr->status == IB_WC_SUCCESS) {
+			wait_for_response(mad_agent_priv, mad_send_wr);
+		}
+		spin_unlock_irqrestore(&mad_agent_priv->lock, flags);
+		return;
+	}
+
+	/* Remove send from MAD agent and notify client of completion */
+	list_del(&mad_send_wr->agent_list);
+	adjust_timeout(mad_agent_priv);
+	spin_unlock_irqrestore(&mad_agent_priv->lock, flags);
+
+	if (mad_send_wr->status != IB_WC_SUCCESS )
+		mad_send_wc->status = mad_send_wr->status;
+	mad_agent_priv->agent.send_handler(&mad_agent_priv->agent,
+					    mad_send_wc);
+
+	/* Release reference on agent taken when sending */
+	if (atomic_dec_and_test(&mad_agent_priv->refcount))
+		wake_up(&mad_agent_priv->wait);
+
+	kfree(mad_send_wr);
+}
+
+static void ib_mad_send_done_handler(struct ib_mad_port_private *port_priv,
+				     struct ib_wc *wc)
+{
+	struct ib_mad_send_wr_private	*mad_send_wr, *queued_send_wr;
+	struct ib_mad_list_head		*mad_list;
+	struct ib_mad_qp_info		*qp_info;
+	struct ib_mad_queue		*send_queue;
+	struct ib_send_wr		*bad_send_wr;
+	unsigned long flags;
+	int ret;
+
+	mad_list = (struct ib_mad_list_head *)(unsigned long)wc->wr_id;
+	mad_send_wr = container_of(mad_list, struct ib_mad_send_wr_private,
+				   mad_list);
+	send_queue = mad_list->mad_queue;
+	qp_info = send_queue->qp_info;
+
+retry:
+	queued_send_wr = NULL;
+	spin_lock_irqsave(&send_queue->lock, flags);
+	list_del(&mad_list->list);
+
+	/* Move queued send to the send queue */
+	if (send_queue->count-- > send_queue->max_active) {
+		mad_list = container_of(qp_info->overflow_list.next,
+					struct ib_mad_list_head, list);
+		queued_send_wr = container_of(mad_list,
+					struct ib_mad_send_wr_private,
+					mad_list);
+		list_del(&mad_list->list);
+		list_add_tail(&mad_list->list, &send_queue->list);
+	}
+	spin_unlock_irqrestore(&send_queue->lock, flags);
+
+	/* Restore client wr_id in WC and complete send */
+	wc->wr_id = mad_send_wr->wr_id;
+	if (atomic_read(&qp_info->snoop_count))
+		snoop_send(qp_info, &mad_send_wr->send_wr,
+			   (struct ib_mad_send_wc *)wc,
+			   IB_MAD_SNOOP_SEND_COMPLETIONS);
+	ib_mad_complete_send_wr(mad_send_wr, (struct ib_mad_send_wc *)wc);
+
+	if (queued_send_wr) {
+		ret = ib_post_send(qp_info->qp, &queued_send_wr->send_wr,
+				&bad_send_wr);
+		if (ret) {
+			printk(KERN_ERR PFX "ib_post_send failed: %d\n", ret);
+			mad_send_wr = queued_send_wr;
+			wc->status = IB_WC_LOC_QP_OP_ERR;
+			goto retry;
+		}
+	}
+}
+
+static void mark_sends_for_retry(struct ib_mad_qp_info *qp_info)
+{
+	struct ib_mad_send_wr_private *mad_send_wr;
+	struct ib_mad_list_head *mad_list;
+	unsigned long flags;
+
+	spin_lock_irqsave(&qp_info->send_queue.lock, flags);
+	list_for_each_entry(mad_list, &qp_info->send_queue.list, list) {
+		mad_send_wr = container_of(mad_list,
+					   struct ib_mad_send_wr_private,
+					   mad_list);
+		mad_send_wr->retry = 1;
+	}
+	spin_unlock_irqrestore(&qp_info->send_queue.lock, flags);
+}
+
+static void mad_error_handler(struct ib_mad_port_private *port_priv,
+			      struct ib_wc *wc)
+{
+	struct ib_mad_list_head *mad_list;
+	struct ib_mad_qp_info *qp_info;
+	struct ib_mad_send_wr_private *mad_send_wr;
+	int ret;
+
+	/* Determine if failure was a send or receive */
+	mad_list = (struct ib_mad_list_head *)(unsigned long)wc->wr_id;
+	qp_info = mad_list->mad_queue->qp_info;
+	if (mad_list->mad_queue == &qp_info->recv_queue)
+		/*
+		 * Receive errors indicate that the QP has entered the error
+		 * state - error handling/shutdown code will cleanup
+		 */
+		return;
+
+	/*
+	 * Send errors will transition the QP to SQE - move
+	 * QP to RTS and repost flushed work requests
+	 */
+	mad_send_wr = container_of(mad_list, struct ib_mad_send_wr_private,
+				   mad_list);
+	if (wc->status == IB_WC_WR_FLUSH_ERR) {
+		if (mad_send_wr->retry) {
+			/* Repost send */
+			struct ib_send_wr *bad_send_wr;
+
+			mad_send_wr->retry = 0;
+			ret = ib_post_send(qp_info->qp, &mad_send_wr->send_wr,
+					&bad_send_wr);
+			if (ret)
+				ib_mad_send_done_handler(port_priv, wc);
+		} else
+			ib_mad_send_done_handler(port_priv, wc);
+	} else {
+		struct ib_qp_attr *attr;
+
+		/* Transition QP to RTS and fail offending send */
+		attr = kmalloc(sizeof *attr, GFP_KERNEL);
+		if (attr) {
+			attr->qp_state = IB_QPS_RTS;
+			attr->cur_qp_state = IB_QPS_SQE;
+			ret = ib_modify_qp(qp_info->qp, attr,
+					   IB_QP_STATE | IB_QP_CUR_STATE);
+			kfree(attr);
+			if (ret)
+				printk(KERN_ERR PFX "mad_error_handler - "
+				       "ib_modify_qp to RTS : %d\n", ret);
+			else
+				mark_sends_for_retry(qp_info);
+		}
+		ib_mad_send_done_handler(port_priv, wc);
+	}
+}
+
+/*
+ * IB MAD completion callback
+ */
+static void ib_mad_completion_handler(void *data)
+{
+	struct ib_mad_port_private *port_priv;
+	struct ib_wc wc;
+
+	port_priv = (struct ib_mad_port_private *)data;
+	ib_req_notify_cq(port_priv->cq, IB_CQ_NEXT_COMP);
+
+	while (ib_poll_cq(port_priv->cq, 1, &wc) == 1) {
+		if (wc.status == IB_WC_SUCCESS) {
+			switch (wc.opcode) {
+			case IB_WC_SEND:
+				ib_mad_send_done_handler(port_priv, &wc);
+				break;
+			case IB_WC_RECV:
+				ib_mad_recv_done_handler(port_priv, &wc);
+				break;
+			default:
+				BUG_ON(1);
+				break;
+			}
+		} else
+			mad_error_handler(port_priv, &wc);
+	}
+}
+
+static void cancel_mads(struct ib_mad_agent_private *mad_agent_priv)
+{
+	unsigned long flags;
+	struct ib_mad_send_wr_private *mad_send_wr, *temp_mad_send_wr;
+	struct ib_mad_send_wc mad_send_wc;
+	struct list_head cancel_list;
+
+	INIT_LIST_HEAD(&cancel_list);
+
+	spin_lock_irqsave(&mad_agent_priv->lock, flags);
+	list_for_each_entry_safe(mad_send_wr, temp_mad_send_wr,
+				 &mad_agent_priv->send_list, agent_list) {
+		if (mad_send_wr->status == IB_WC_SUCCESS) {
+ 			mad_send_wr->status = IB_WC_WR_FLUSH_ERR;
+			mad_send_wr->refcount -= (mad_send_wr->timeout > 0);
+		}
+	}
+
+	/* Empty wait list to prevent receives from finding a request */
+	list_splice_init(&mad_agent_priv->wait_list, &cancel_list);
+	spin_unlock_irqrestore(&mad_agent_priv->lock, flags);
+
+	/* Report all cancelled requests */
+	mad_send_wc.status = IB_WC_WR_FLUSH_ERR;
+	mad_send_wc.vendor_err = 0;
+
+	list_for_each_entry_safe(mad_send_wr, temp_mad_send_wr,
+				 &cancel_list, agent_list) {
+		mad_send_wc.wr_id = mad_send_wr->wr_id;
+		mad_agent_priv->agent.send_handler(&mad_agent_priv->agent,
+						   &mad_send_wc);
+
+		list_del(&mad_send_wr->agent_list);
+		kfree(mad_send_wr);
+		atomic_dec(&mad_agent_priv->refcount);
+	}
+}
+
+static struct ib_mad_send_wr_private*
+find_send_by_wr_id(struct ib_mad_agent_private *mad_agent_priv,
+		   u64 wr_id)
+{
+	struct ib_mad_send_wr_private *mad_send_wr;
+
+	list_for_each_entry(mad_send_wr, &mad_agent_priv->wait_list,
+			    agent_list) {
+		if (mad_send_wr->wr_id == wr_id)
+			return mad_send_wr;
+	}
+
+	list_for_each_entry(mad_send_wr, &mad_agent_priv->send_list,
+			    agent_list) {
+		if (mad_send_wr->wr_id == wr_id)
+			return mad_send_wr;
+	}
+	return NULL;
+}
+
+void ib_cancel_mad(struct ib_mad_agent *mad_agent,
+		  u64 wr_id)
+{
+	struct ib_mad_agent_private *mad_agent_priv;
+	struct ib_mad_send_wr_private *mad_send_wr;
+	struct ib_mad_send_wc mad_send_wc;
+	unsigned long flags;
+
+	mad_agent_priv = container_of(mad_agent, struct ib_mad_agent_private,
+				      agent);
+	spin_lock_irqsave(&mad_agent_priv->lock, flags);
+	mad_send_wr = find_send_by_wr_id(mad_agent_priv, wr_id);
+	if (!mad_send_wr) {
+		spin_unlock_irqrestore(&mad_agent_priv->lock, flags);
+		goto out;
+	}
+
+	if (mad_send_wr->status == IB_WC_SUCCESS)
+		mad_send_wr->refcount -= (mad_send_wr->timeout > 0);
+
+	if (mad_send_wr->refcount != 0) {
+		mad_send_wr->status = IB_WC_WR_FLUSH_ERR;
+		spin_unlock_irqrestore(&mad_agent_priv->lock, flags);
+		goto out;
+	}
+
+	list_del(&mad_send_wr->agent_list);
+	adjust_timeout(mad_agent_priv);
+	spin_unlock_irqrestore(&mad_agent_priv->lock, flags);
+
+	mad_send_wc.status = IB_WC_WR_FLUSH_ERR;
+	mad_send_wc.vendor_err = 0;
+	mad_send_wc.wr_id = mad_send_wr->wr_id;
+	mad_agent_priv->agent.send_handler(&mad_agent_priv->agent,
+					   &mad_send_wc);
+
+	kfree(mad_send_wr);
+	if (atomic_dec_and_test(&mad_agent_priv->refcount))
+		wake_up(&mad_agent_priv->wait);
+
+out:
+	return;
+}
+EXPORT_SYMBOL(ib_cancel_mad);
+
+static void local_completions(void *data)
+{
+	struct ib_mad_agent_private *mad_agent_priv;
+	struct ib_mad_local_private *local;
+	unsigned long flags;
+	struct ib_wc wc;
+	struct ib_mad_send_wc mad_send_wc;
+
+	mad_agent_priv = (struct ib_mad_agent_private *)data;
+
+	spin_lock_irqsave(&mad_agent_priv->lock, flags);
+	while (!list_empty(&mad_agent_priv->local_list)) {
+		local = list_entry(mad_agent_priv->local_list.next,
+				   struct ib_mad_local_private,
+				   completion_list);
+		spin_unlock_irqrestore(&mad_agent_priv->lock, flags);
+		if (local->mad_priv) {
+			/*
+			 * Defined behavior is to complete response
+			 * before request
+			 */
+			wc.wr_id = local->wr_id;
+			wc.status = IB_WC_SUCCESS;
+			wc.opcode = IB_WC_RECV;
+			wc.vendor_err = 0;
+			wc.byte_len = sizeof(struct ib_mad);
+			wc.src_qp = IB_QP0;
+			wc.wc_flags = 0;
+			wc.pkey_index = 0;
+			wc.slid = IB_LID_PERMISSIVE;
+			wc.sl = 0;
+			wc.dlid_path_bits = 0;
+			local->mad_priv->header.recv_wc.wc = &wc;
+			local->mad_priv->header.recv_wc.mad_len =
+						sizeof(struct ib_mad);
+			INIT_LIST_HEAD(&local->mad_priv->header.recv_wc.recv_buf.list);
+			local->mad_priv->header.recv_wc.recv_buf.grh = NULL;
+			local->mad_priv->header.recv_wc.recv_buf.mad =
+						&local->mad_priv->mad.mad;
+			if (atomic_read(&mad_agent_priv->qp_info->snoop_count))
+				snoop_recv(mad_agent_priv->qp_info,
+					  &local->mad_priv->header.recv_wc,
+					   IB_MAD_SNOOP_RECVS);
+			mad_agent_priv->agent.recv_handler(
+						&mad_agent_priv->agent,
+						&local->mad_priv->header.recv_wc);
+		}
+
+		/* Complete send */
+		mad_send_wc.status = IB_WC_SUCCESS;
+		mad_send_wc.vendor_err = 0;
+		mad_send_wc.wr_id = local->wr_id;
+		if (atomic_read(&mad_agent_priv->qp_info->snoop_count))
+			snoop_send(mad_agent_priv->qp_info, &local->send_wr,
+				  &mad_send_wc,
+				   IB_MAD_SNOOP_SEND_COMPLETIONS);
+		mad_agent_priv->agent.send_handler(&mad_agent_priv->agent,
+						   &mad_send_wc);
+
+		spin_lock_irqsave(&mad_agent_priv->lock, flags);
+		list_del(&local->completion_list);
+		atomic_dec(&mad_agent_priv->refcount);
+		kfree(local);
+	}
+	spin_unlock_irqrestore(&mad_agent_priv->lock, flags);
+}
+
+static void timeout_sends(void *data)
+{
+	struct ib_mad_agent_private *mad_agent_priv;
+	struct ib_mad_send_wr_private *mad_send_wr;
+	struct ib_mad_send_wc mad_send_wc;
+	unsigned long flags, delay;
+
+	mad_agent_priv = (struct ib_mad_agent_private *)data;
+
+	mad_send_wc.status = IB_WC_RESP_TIMEOUT_ERR;
+	mad_send_wc.vendor_err = 0;
+
+	spin_lock_irqsave(&mad_agent_priv->lock, flags);
+	while (!list_empty(&mad_agent_priv->wait_list)) {
+		mad_send_wr = list_entry(mad_agent_priv->wait_list.next,
+					 struct ib_mad_send_wr_private,
+					 agent_list);
+
+		if (time_after(mad_send_wr->timeout, jiffies)) {
+			delay = mad_send_wr->timeout - jiffies;
+			if ((long)delay <= 0)
+				delay = 1;
+			queue_delayed_work(mad_agent_priv->qp_info->
+					   port_priv->wq,
+					   &mad_agent_priv->timed_work, delay);
+			break;
+		}
+
+		list_del(&mad_send_wr->agent_list);
+		spin_unlock_irqrestore(&mad_agent_priv->lock, flags);
+
+		mad_send_wc.wr_id = mad_send_wr->wr_id;
+		mad_agent_priv->agent.send_handler(&mad_agent_priv->agent,
+						   &mad_send_wc);
+
+		kfree(mad_send_wr);
+		atomic_dec(&mad_agent_priv->refcount);
+		spin_lock_irqsave(&mad_agent_priv->lock, flags);
+	}
+	spin_unlock_irqrestore(&mad_agent_priv->lock, flags);
+}
+
+static void ib_mad_thread_completion_handler(struct ib_cq *cq)
+{
+	struct ib_mad_port_private *port_priv = cq->cq_context;
+
+	queue_work(port_priv->wq, &port_priv->work);
+}
+
+/*
+ * Allocate receive MADs and post receive WRs for them
+ */
+static int ib_mad_post_receive_mads(struct ib_mad_qp_info *qp_info,
+				    struct ib_mad_private *mad)
+{
+	unsigned long flags;
+	int post, ret;
+	struct ib_mad_private *mad_priv;
+	struct ib_sge sg_list;
+	struct ib_recv_wr recv_wr, *bad_recv_wr;
+	struct ib_mad_queue *recv_queue = &qp_info->recv_queue;
+
+	/* Initialize common scatter list fields */
+	sg_list.length = sizeof *mad_priv - sizeof mad_priv->header;
+	sg_list.lkey = (*qp_info->port_priv->mr).lkey;
+
+	/* Initialize common receive WR fields */
+	recv_wr.next = NULL;
+	recv_wr.sg_list = &sg_list;
+	recv_wr.num_sge = 1;
+	recv_wr.recv_flags = IB_RECV_SIGNALED;
+
+	do {
+		/* Allocate and map receive buffer */
+		if (mad) {
+			mad_priv = mad;
+			mad = NULL;
+		} else {
+			mad_priv = kmem_cache_alloc(ib_mad_cache, GFP_KERNEL);
+			if (!mad_priv) {
+				printk(KERN_ERR PFX "No memory for receive buffer\n");
+				ret = -ENOMEM;
+				break;
+			}
+		}
+		sg_list.addr = dma_map_single(qp_info->port_priv->
+						device->dma_device,
+					&mad_priv->grh,
+					sizeof *mad_priv -
+						sizeof mad_priv->header,
+					DMA_FROM_DEVICE);
+		pci_unmap_addr_set(&mad_priv->header, mapping, sg_list.addr);
+		recv_wr.wr_id = (unsigned long)&mad_priv->header.mad_list;
+		mad_priv->header.mad_list.mad_queue = recv_queue;
+
+		/* Post receive WR */
+		spin_lock_irqsave(&recv_queue->lock, flags);
+		post = (++recv_queue->count < recv_queue->max_active);
+		list_add_tail(&mad_priv->header.mad_list.list, &recv_queue->list);
+		spin_unlock_irqrestore(&recv_queue->lock, flags);
+		ret = ib_post_recv(qp_info->qp, &recv_wr, &bad_recv_wr);
+		if (ret) {
+			spin_lock_irqsave(&recv_queue->lock, flags);
+			list_del(&mad_priv->header.mad_list.list);
+			recv_queue->count--;
+			spin_unlock_irqrestore(&recv_queue->lock, flags);
+			dma_unmap_single(qp_info->port_priv->device->dma_device,
+					 pci_unmap_addr(&mad_priv->header,
+							mapping),
+					 sizeof *mad_priv -
+					   sizeof mad_priv->header,
+					 DMA_FROM_DEVICE);
+			kmem_cache_free(ib_mad_cache, mad_priv);
+			printk(KERN_ERR PFX "ib_post_recv failed: %d\n", ret);
+			break;
+		}
+	} while (post);
+
+	return ret;
+}
+
+/*
+ * Return all the posted receive MADs
+ */
+static void cleanup_recv_queue(struct ib_mad_qp_info *qp_info)
+{
+	struct ib_mad_private_header *mad_priv_hdr;
+	struct ib_mad_private *recv;
+	struct ib_mad_list_head *mad_list;
+
+	while (!list_empty(&qp_info->recv_queue.list)) {
+
+		mad_list = list_entry(qp_info->recv_queue.list.next,
+				      struct ib_mad_list_head, list);
+		mad_priv_hdr = container_of(mad_list,
+					    struct ib_mad_private_header,
+					    mad_list);
+		recv = container_of(mad_priv_hdr, struct ib_mad_private,
+				    header);
+
+		/* Remove from posted receive MAD list */
+		list_del(&mad_list->list);
+
+		/* Undo PCI mapping */
+		dma_unmap_single(qp_info->port_priv->device->dma_device,
+				 pci_unmap_addr(&recv->header, mapping),
+				 sizeof(struct ib_mad_private) -
+				 sizeof(struct ib_mad_private_header),
+				 DMA_FROM_DEVICE);
+		kmem_cache_free(ib_mad_cache, recv);
+	}
+
+	qp_info->recv_queue.count = 0;
+}
+
+/*
+ * Start the port
+ */
+static int ib_mad_port_start(struct ib_mad_port_private *port_priv)
+{
+	int ret, i;
+	struct ib_qp_attr *attr;
+	struct ib_qp *qp;
+
+	attr = kmalloc(sizeof *attr, GFP_KERNEL);
+ 	if (!attr) {
+		printk(KERN_ERR PFX "Couldn't kmalloc ib_qp_attr\n");
+		return -ENOMEM;
+	}
+
+	for (i = 0; i < IB_MAD_QPS_CORE; i++) {
+		qp = port_priv->qp_info[i].qp;
+		/*
+		 * PKey index for QP1 is irrelevant but
+		 * one is needed for the Reset to Init transition
+		 */
+		attr->qp_state = IB_QPS_INIT;
+		attr->pkey_index = 0;
+		attr->qkey = (qp->qp_num == 0) ? 0 : IB_QP1_QKEY;
+		ret = ib_modify_qp(qp, attr, IB_QP_STATE |
+					     IB_QP_PKEY_INDEX | IB_QP_QKEY);
+		if (ret) {
+			printk(KERN_ERR PFX "Couldn't change QP%d state to "
+			       "INIT: %d\n", i, ret);
+			goto out;
+		}
+
+		attr->qp_state = IB_QPS_RTR;
+		ret = ib_modify_qp(qp, attr, IB_QP_STATE);
+		if (ret) {
+			printk(KERN_ERR PFX "Couldn't change QP%d state to "
+			       "RTR: %d\n", i, ret);
+			goto out;
+		}
+
+		attr->qp_state = IB_QPS_RTS;
+		attr->sq_psn = IB_MAD_SEND_Q_PSN;
+		ret = ib_modify_qp(qp, attr, IB_QP_STATE | IB_QP_SQ_PSN);
+		if (ret) {
+			printk(KERN_ERR PFX "Couldn't change QP%d state to "
+			       "RTS: %d\n", i, ret);
+			goto out;
+		}
+	}
+
+	ret = ib_req_notify_cq(port_priv->cq, IB_CQ_NEXT_COMP);
+	if (ret) {
+		printk(KERN_ERR PFX "Failed to request completion "
+		       "notification: %d\n", ret);
+		goto out;
+	}
+
+	for (i = 0; i < IB_MAD_QPS_CORE; i++) {
+		ret = ib_mad_post_receive_mads(&port_priv->qp_info[i], NULL);
+		if (ret) {
+			printk(KERN_ERR PFX "Couldn't post receive WRs\n");
+			goto out;
+		}
+	}
+out:
+	kfree(attr);
+	return ret;
+}
+
+static void qp_event_handler(struct ib_event *event, void *qp_context)
+{
+	struct ib_mad_qp_info	*qp_info = qp_context;
+
+	/* It's worse than that! He's dead, Jim! */
+	printk(KERN_ERR PFX "Fatal error (%d) on MAD QP (%d)\n",
+		event->event, qp_info->qp->qp_num);
+}
+
+static void init_mad_queue(struct ib_mad_qp_info *qp_info,
+			   struct ib_mad_queue *mad_queue)
+{
+	mad_queue->qp_info = qp_info;
+	mad_queue->count = 0;
+	spin_lock_init(&mad_queue->lock);
+	INIT_LIST_HEAD(&mad_queue->list);
+}
+
+static void init_mad_qp(struct ib_mad_port_private *port_priv,
+			struct ib_mad_qp_info *qp_info)
+{
+	qp_info->port_priv = port_priv;
+	init_mad_queue(qp_info, &qp_info->send_queue);
+	init_mad_queue(qp_info, &qp_info->recv_queue);
+	INIT_LIST_HEAD(&qp_info->overflow_list);
+	spin_lock_init(&qp_info->snoop_lock);
+	qp_info->snoop_table = NULL;
+	qp_info->snoop_table_size = 0;
+	atomic_set(&qp_info->snoop_count, 0);
+}
+
+static int create_mad_qp(struct ib_mad_qp_info *qp_info,
+			 enum ib_qp_type qp_type)
+{
+	struct ib_qp_init_attr	qp_init_attr;
+	int ret;
+
+	memset(&qp_init_attr, 0, sizeof qp_init_attr);
+	qp_init_attr.send_cq = qp_info->port_priv->cq;
+	qp_init_attr.recv_cq = qp_info->port_priv->cq;
+	qp_init_attr.sq_sig_type = IB_SIGNAL_ALL_WR;
+	qp_init_attr.rq_sig_type = IB_SIGNAL_ALL_WR;
+	qp_init_attr.cap.max_send_wr = IB_MAD_QP_SEND_SIZE;
+	qp_init_attr.cap.max_recv_wr = IB_MAD_QP_RECV_SIZE;
+	qp_init_attr.cap.max_send_sge = IB_MAD_SEND_REQ_MAX_SG;
+	qp_init_attr.cap.max_recv_sge = IB_MAD_RECV_REQ_MAX_SG;
+	qp_init_attr.qp_type = qp_type;
+	qp_init_attr.port_num = qp_info->port_priv->port_num;
+	qp_init_attr.qp_context = qp_info;
+	qp_init_attr.event_handler = qp_event_handler;
+	qp_info->qp = ib_create_qp(qp_info->port_priv->pd, &qp_init_attr);
+	if (IS_ERR(qp_info->qp)) {
+		printk(KERN_ERR PFX "Couldn't create ib_mad QP%d\n",
+		       get_spl_qp_index(qp_type));
+		ret = PTR_ERR(qp_info->qp);
+		goto error;
+	}
+	/* Use minimum queue sizes unless the CQ is resized */
+	qp_info->send_queue.max_active = IB_MAD_QP_SEND_SIZE;
+	qp_info->recv_queue.max_active = IB_MAD_QP_RECV_SIZE;
+	return 0;
+
+error:
+	return ret;
+}
+
+static void destroy_mad_qp(struct ib_mad_qp_info *qp_info)
+{
+	ib_destroy_qp(qp_info->qp);
+	if (qp_info->snoop_table)
+		kfree(qp_info->snoop_table);
+}
+
+/*
+ * Open the port
+ * Create the QP, PD, MR, and CQ if needed
+ */
+static int ib_mad_port_open(struct ib_device *device,
+			    int port_num)
+{
+	int ret, cq_size;
+	struct ib_mad_port_private *port_priv;
+	unsigned long flags;
+	char name[sizeof "ib_mad123"];
+
+	/* First, check if port already open at MAD layer */
+	port_priv = ib_get_mad_port(device, port_num);
+	if (port_priv) {
+		printk(KERN_DEBUG PFX "%s port %d already open\n",
+		       device->name, port_num);
+		return 0;
+	}
+
+	/* Create new device info */
+	port_priv = kmalloc(sizeof *port_priv, GFP_KERNEL);
+	if (!port_priv) {
+		printk(KERN_ERR PFX "No memory for ib_mad_port_private\n");
+		return -ENOMEM;
+	}
+	memset(port_priv, 0, sizeof *port_priv);
+	port_priv->device = device;
+	port_priv->port_num = port_num;
+	spin_lock_init(&port_priv->reg_lock);
+	INIT_LIST_HEAD(&port_priv->agent_list);
+	init_mad_qp(port_priv, &port_priv->qp_info[0]);
+	init_mad_qp(port_priv, &port_priv->qp_info[1]);
+
+	cq_size = (IB_MAD_QP_SEND_SIZE + IB_MAD_QP_RECV_SIZE) * 2;
+	port_priv->cq = ib_create_cq(port_priv->device,
+				     (ib_comp_handler)
+					ib_mad_thread_completion_handler,
+				     NULL, port_priv, cq_size);
+	if (IS_ERR(port_priv->cq)) {
+		printk(KERN_ERR PFX "Couldn't create ib_mad CQ\n");
+		ret = PTR_ERR(port_priv->cq);
+		goto error3;
+	}
+
+	port_priv->pd = ib_alloc_pd(device);
+	if (IS_ERR(port_priv->pd)) {
+		printk(KERN_ERR PFX "Couldn't create ib_mad PD\n");
+		ret = PTR_ERR(port_priv->pd);
+		goto error4;
+	}
+
+	port_priv->mr = ib_get_dma_mr(port_priv->pd, IB_ACCESS_LOCAL_WRITE);
+	if (IS_ERR(port_priv->mr)) {
+		printk(KERN_ERR PFX "Couldn't get ib_mad DMA MR\n");
+		ret = PTR_ERR(port_priv->mr);
+		goto error5;
+	}
+
+	ret = create_mad_qp(&port_priv->qp_info[0], IB_QPT_SMI);
+	if (ret)
+		goto error6;
+	ret = create_mad_qp(&port_priv->qp_info[1], IB_QPT_GSI);
+	if (ret)
+		goto error7;
+
+	snprintf(name, sizeof name, "ib_mad%d", port_num);
+	port_priv->wq = create_singlethread_workqueue(name);
+	if (!port_priv->wq) {
+		ret = -ENOMEM;
+		goto error8;
+	}
+	INIT_WORK(&port_priv->work, ib_mad_completion_handler, port_priv);
+
+	ret = ib_mad_port_start(port_priv);
+	if (ret) {
+		printk(KERN_ERR PFX "Couldn't start port\n");
+		goto error9;
+	}
+
+	spin_lock_irqsave(&ib_mad_port_list_lock, flags);
+	list_add_tail(&port_priv->port_list, &ib_mad_port_list);
+	spin_unlock_irqrestore(&ib_mad_port_list_lock, flags);
+	return 0;
+
+error9:
+	destroy_workqueue(port_priv->wq);
+error8:
+	destroy_mad_qp(&port_priv->qp_info[1]);
+error7:
+	destroy_mad_qp(&port_priv->qp_info[0]);
+error6:
+	ib_dereg_mr(port_priv->mr);
+error5:
+	ib_dealloc_pd(port_priv->pd);
+error4:
+	ib_destroy_cq(port_priv->cq);
+	cleanup_recv_queue(&port_priv->qp_info[1]);
+	cleanup_recv_queue(&port_priv->qp_info[0]);
+error3:
+	kfree(port_priv);
+
+	return ret;
+}
+
+/*
+ * Close the port
+ * If there are no classes using the port, free the port
+ * resources (CQ, MR, PD, QP) and remove the port's info structure
+ */
+static int ib_mad_port_close(struct ib_device *device, int port_num)
+{
+	struct ib_mad_port_private *port_priv;
+	unsigned long flags;
+
+	spin_lock_irqsave(&ib_mad_port_list_lock, flags);
+	port_priv = __ib_get_mad_port(device, port_num);
+	if (port_priv == NULL) {
+		spin_unlock_irqrestore(&ib_mad_port_list_lock, flags);
+		printk(KERN_ERR PFX "Port %d not found\n", port_num);
+		return -ENODEV;
+	}
+	list_del(&port_priv->port_list);
+	spin_unlock_irqrestore(&ib_mad_port_list_lock, flags);
+
+	/* Stop processing completions. */
+	flush_workqueue(port_priv->wq);
+	destroy_workqueue(port_priv->wq);
+	destroy_mad_qp(&port_priv->qp_info[1]);
+	destroy_mad_qp(&port_priv->qp_info[0]);
+	ib_dereg_mr(port_priv->mr);
+	ib_dealloc_pd(port_priv->pd);
+	ib_destroy_cq(port_priv->cq);
+	cleanup_recv_queue(&port_priv->qp_info[1]);
+	cleanup_recv_queue(&port_priv->qp_info[0]);
+	/* XXX: Handle deallocation of MAD registration tables */
+
+	kfree(port_priv);
+
+	return 0;
+}
+
+static void ib_mad_init_device(struct ib_device *device)
+{
+	int ret, num_ports, cur_port, i, ret2;
+
+	if (device->node_type == IB_NODE_SWITCH) {
+		num_ports = 1;
+		cur_port = 0;
+	} else {
+		num_ports = device->phys_port_cnt;
+		cur_port = 1;
+	}
+	for (i = 0; i < num_ports; i++, cur_port++) {
+		ret = ib_mad_port_open(device, cur_port);
+		if (ret) {
+			printk(KERN_ERR PFX "Couldn't open %s port %d\n",
+			       device->name, cur_port);
+			goto error_device_open;
+		}
+		ret = ib_agent_port_open(device, cur_port);
+		if (ret) {
+			printk(KERN_ERR PFX "Couldn't open %s port %d "
+			       "for agents\n",
+			       device->name, cur_port);
+			goto error_device_open;
+		}
+	}
+
+	goto error_device_query;
+
+error_device_open:
+	while (i > 0) {
+		cur_port--;
+		ret2 = ib_agent_port_close(device, cur_port);
+		if (ret2) {
+			printk(KERN_ERR PFX "Couldn't close %s port %d "
+			       "for agents\n",
+			       device->name, cur_port);
+		}
+		ret2 = ib_mad_port_close(device, cur_port);
+		if (ret2) {
+			printk(KERN_ERR PFX "Couldn't close %s port %d\n",
+			       device->name, cur_port);
+		}
+		i--;
+	}
+
+error_device_query:
+	return;
+}
+
+static void ib_mad_remove_device(struct ib_device *device)
+{
+	int ret = 0, i, num_ports, cur_port, ret2;
+
+	if (device->node_type == IB_NODE_SWITCH) {
+		num_ports = 1;
+		cur_port = 0;
+	} else {
+		num_ports = device->phys_port_cnt;
+		cur_port = 1;
+	}
+	for (i = 0; i < num_ports; i++, cur_port++) {
+		ret2 = ib_agent_port_close(device, cur_port);
+		if (ret2) {
+			printk(KERN_ERR PFX "Couldn't close %s port %d "
+			       "for agents\n",
+			       device->name, cur_port);
+			if (!ret)
+				ret = ret2;
+		}
+		ret2 = ib_mad_port_close(device, cur_port);
+		if (ret2) {
+			printk(KERN_ERR PFX "Couldn't close %s port %d\n",
+			       device->name, cur_port);
+			if (!ret)
+				ret = ret2;
+		}
+	}
+}
+
+static struct ib_client mad_client = {
+	.name   = "mad",
+	.add = ib_mad_init_device,
+	.remove = ib_mad_remove_device
+};
+
+static int __init ib_mad_init_module(void)
+{
+	int ret;
+
+	spin_lock_init(&ib_mad_port_list_lock);
+	spin_lock_init(&ib_agent_port_list_lock);
+
+	ib_mad_cache = kmem_cache_create("ib_mad",
+					 sizeof(struct ib_mad_private),
+					 0,
+					 SLAB_HWCACHE_ALIGN,
+					 NULL,
+					 NULL);
+	if (!ib_mad_cache) {
+		printk(KERN_ERR PFX "Couldn't create ib_mad cache\n");
+		ret = -ENOMEM;
+		goto error1;
+	}
+
+	INIT_LIST_HEAD(&ib_mad_port_list);
+
+	if (ib_register_client(&mad_client)) {
+		printk(KERN_ERR PFX "Couldn't register ib_mad client\n");
+		ret = -EINVAL;
+		goto error2;
+	}
+
+	return 0;
+
+error2:
+	kmem_cache_destroy(ib_mad_cache);
+error1:
+	return ret;
+}
+
+static void __exit ib_mad_cleanup_module(void)
+{
+	ib_unregister_client(&mad_client);
+
+	if (kmem_cache_destroy(ib_mad_cache)) {
+		printk(KERN_DEBUG PFX "Failed to destroy ib_mad cache\n");
+	}
+}
+
+module_init(ib_mad_init_module);
+module_exit(ib_mad_cleanup_module);
diff -Nru a/drivers/infiniband/core/mad_priv.h b/drivers/infiniband/core/mad_priv.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/core/mad_priv.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,194 @@
+/*
+ * Copyright (c) 2004, Voltaire, Inc. All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: mad_priv.h 1389 2004-12-27 22:56:47Z roland $
+ */
+
+#ifndef __IB_MAD_PRIV_H__
+#define __IB_MAD_PRIV_H__
+
+#include <linux/pci.h>
+#include <linux/kthread.h>
+#include <linux/workqueue.h>
+#include <ib_mad.h>
+#include <ib_smi.h>
+
+
+#define PFX "ib_mad: "
+
+#define IB_MAD_QPS_CORE		2 /* Always QP0 and QP1 as a minimum */
+
+/* QP and CQ parameters */
+#define IB_MAD_QP_SEND_SIZE	128
+#define IB_MAD_QP_RECV_SIZE	512
+#define IB_MAD_SEND_REQ_MAX_SG	2
+#define IB_MAD_RECV_REQ_MAX_SG	1
+
+#define IB_MAD_SEND_Q_PSN	0
+
+/* Registration table sizes */
+#define MAX_MGMT_CLASS		80
+#define MAX_MGMT_VERSION	8
+#define MAX_MGMT_OUI		8
+#define MAX_MGMT_VENDOR_RANGE2	IB_MGMT_CLASS_VENDOR_RANGE2_END - \
+				IB_MGMT_CLASS_VENDOR_RANGE2_START + 1
+
+struct ib_mad_list_head {
+	struct list_head list;
+	struct ib_mad_queue *mad_queue;
+};
+
+struct ib_mad_private_header {
+	struct ib_mad_list_head mad_list;
+	struct ib_mad_recv_wc recv_wc;
+	DECLARE_PCI_UNMAP_ADDR(mapping)
+} __attribute__ ((packed));
+
+struct ib_mad_private {
+	struct ib_mad_private_header header;
+	struct ib_grh grh;
+	union {
+		struct ib_mad mad;
+		struct ib_rmpp_mad rmpp_mad;
+		struct ib_smp smp;
+	} mad;
+} __attribute__ ((packed));
+
+struct ib_mad_agent_private {
+	struct list_head agent_list;
+	struct ib_mad_agent agent;
+	struct ib_mad_reg_req *reg_req;
+	struct ib_mad_qp_info *qp_info;
+
+	spinlock_t lock;
+	struct list_head send_list;
+	struct list_head wait_list;
+	struct work_struct timed_work;
+	unsigned long timeout;
+	struct list_head local_list;
+	struct work_struct local_work;
+
+	atomic_t refcount;
+	wait_queue_head_t wait;
+	u8 rmpp_version;
+};
+
+struct ib_mad_snoop_private {
+	struct ib_mad_agent agent;
+	struct ib_mad_qp_info *qp_info;
+	int snoop_index;
+	int mad_snoop_flags;
+	atomic_t refcount;
+	wait_queue_head_t wait;
+};
+
+struct ib_mad_send_wr_private {
+	struct ib_mad_list_head mad_list;
+	struct list_head agent_list;
+	struct ib_mad_agent *agent;
+	struct ib_send_wr send_wr;
+	struct ib_sge sg_list[IB_MAD_SEND_REQ_MAX_SG];
+	u64 wr_id;			/* client WR ID */
+	u64 tid;
+	unsigned long timeout;
+	int retry;
+	int refcount;
+	enum ib_wc_status status;
+};
+
+struct ib_mad_local_private {
+	struct list_head completion_list;
+	struct ib_mad_private *mad_priv;
+	struct ib_send_wr send_wr;
+	struct ib_sge sg_list[IB_MAD_SEND_REQ_MAX_SG];
+	u64 wr_id;			/* client WR ID */
+	u64 tid;
+};
+
+struct ib_mad_mgmt_method_table {
+	struct ib_mad_agent_private *agent[IB_MGMT_MAX_METHODS];
+};
+
+struct ib_mad_mgmt_class_table {
+	struct ib_mad_mgmt_method_table *method_table[MAX_MGMT_CLASS];
+};
+
+struct ib_mad_mgmt_vendor_class {
+	u8	oui[MAX_MGMT_OUI][3];
+	struct ib_mad_mgmt_method_table *method_table[MAX_MGMT_OUI];
+};
+
+struct ib_mad_mgmt_vendor_class_table {
+	struct ib_mad_mgmt_vendor_class *vendor_class[MAX_MGMT_VENDOR_RANGE2];
+};
+
+struct ib_mad_mgmt_version_table {
+	struct ib_mad_mgmt_class_table *class;
+	struct ib_mad_mgmt_vendor_class_table *vendor;
+};
+
+struct ib_mad_queue {
+	spinlock_t lock;
+	struct list_head list;
+	int count;
+	int max_active;
+	struct ib_mad_qp_info *qp_info;
+};
+
+struct ib_mad_qp_info {
+	struct ib_mad_port_private *port_priv;
+	struct ib_qp *qp;
+	struct ib_mad_queue send_queue;
+	struct ib_mad_queue recv_queue;
+	struct list_head overflow_list;
+	spinlock_t snoop_lock;
+	struct ib_mad_snoop_private **snoop_table;
+	int snoop_table_size;
+	atomic_t snoop_count;
+};
+
+struct ib_mad_port_private {
+	struct list_head port_list;
+	struct ib_device *device;
+	int port_num;
+	struct ib_cq *cq;
+	struct ib_pd *pd;
+	struct ib_mr *mr;
+
+	spinlock_t reg_lock;
+	struct ib_mad_mgmt_version_table version[MAX_MGMT_VERSION];
+	struct list_head agent_list;
+	struct workqueue_struct *wq;
+	struct work_struct work;
+	struct ib_mad_qp_info qp_info[IB_MAD_QPS_CORE];
+};
+
+#endif	/* __IB_MAD_PRIV_H__ */
diff -Nru a/drivers/infiniband/core/packer.c b/drivers/infiniband/core/packer.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/core/packer.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,201 @@
+/*
+ * Copyright (c) 2004 Topspin Corporation.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: packer.c 1349 2004-12-16 21:09:43Z roland $
+ */
+
+#include <ib_pack.h>
+
+static u64 value_read(int offset, int size, void *structure)
+{
+	switch (size) {
+	case 1: return                *(u8  *) (structure + offset);
+	case 2: return be16_to_cpup((__be16 *) (structure + offset));
+	case 4: return be32_to_cpup((__be32 *) (structure + offset));
+	case 8: return be64_to_cpup((__be64 *) (structure + offset));
+	default:
+		printk(KERN_WARNING "Field size %d bits not handled\n", size * 8);
+		return 0;
+	}
+}
+
+/**
+ * ib_pack - Pack a structure into a buffer
+ * @desc:Array of structure field descriptions
+ * @desc_len:Number of entries in @desc
+ * @structure:Structure to pack from
+ * @buf:Buffer to pack into
+ *
+ * ib_pack() packs a list of structure fields into a buffer,
+ * controlled by the array of fields in @desc.
+ */
+void ib_pack(const struct ib_field        *desc,
+	     int                           desc_len,
+	     void                         *structure,
+	     void                         *buf)
+{
+	int i;
+
+	for (i = 0; i < desc_len; ++i) {
+		if (desc[i].size_bits <= 32) {
+			int shift;
+			u32 val;
+			__be32 mask;
+			__be32 *addr;
+
+			shift = 32 - desc[i].offset_bits - desc[i].size_bits;
+			if (desc[i].struct_size_bytes)
+				val = value_read(desc[i].struct_offset_bytes,
+						 desc[i].struct_size_bytes,
+						 structure) << shift;
+			else
+				val = 0;
+
+			mask = cpu_to_be32(((1ull << desc[i].size_bits) - 1) << shift);
+			addr = (__be32 *) buf + desc[i].offset_words;
+			*addr = (*addr & ~mask) | (cpu_to_be32(val) & mask);
+		} else if (desc[i].size_bits <= 64) {
+			int shift;
+			u64 val;
+			__be64 mask;
+			__be64 *addr;
+
+			shift = 64 - desc[i].offset_bits - desc[i].size_bits;
+			if (desc[i].struct_size_bytes)
+				val = value_read(desc[i].struct_offset_bytes,
+						 desc[i].struct_size_bytes,
+						 structure) << shift;
+			else
+				val = 0;
+
+			mask = cpu_to_be64(((1ull << desc[i].size_bits) - 1) << shift);
+			addr = (__be64 *) ((__be32 *) buf + desc[i].offset_words);
+			*addr = (*addr & ~mask) | (cpu_to_be64(val) & mask);
+		} else {
+			if (desc[i].offset_bits % 8 ||
+			    desc[i].size_bits   % 8) {
+				printk(KERN_WARNING "Structure field %s of size %d "
+				       "bits is not byte-aligned\n",
+				       desc[i].field_name, desc[i].size_bits);
+			}
+
+			if (desc[i].struct_size_bytes)
+				memcpy(buf + desc[i].offset_words * 4 +
+				       desc[i].offset_bits / 8,
+				       structure + desc[i].struct_offset_bytes,
+				       desc[i].size_bits / 8);
+			else
+				memset(buf + desc[i].offset_words * 4 +
+				       desc[i].offset_bits / 8,
+				       0,
+				       desc[i].size_bits / 8);
+		}
+	}
+}
+EXPORT_SYMBOL(ib_pack);
+
+static void value_write(int offset, int size, u64 val, void *structure)
+{
+	switch (size * 8) {
+	case 8:  *(    u8 *) (structure + offset) = val; break;
+	case 16: *(__be16 *) (structure + offset) = cpu_to_be16(val); break;
+	case 32: *(__be32 *) (structure + offset) = cpu_to_be32(val); break;
+	case 64: *(__be64 *) (structure + offset) = cpu_to_be64(val); break;
+	default:
+		printk(KERN_WARNING "Field size %d bits not handled\n", size * 8);
+	}
+}
+
+/**
+ * ib_unpack - Unpack a buffer into a structure
+ * @desc:Array of structure field descriptions
+ * @desc_len:Number of entries in @desc
+ * @buf:Buffer to unpack from
+ * @structure:Structure to unpack into
+ *
+ * ib_pack() unpacks a list of structure fields from a buffer,
+ * controlled by the array of fields in @desc.
+ */
+void ib_unpack(const struct ib_field        *desc,
+	       int                           desc_len,
+	       void                         *buf,
+	       void                         *structure)
+{
+	int i;
+
+	for (i = 0; i < desc_len; ++i) {
+		if (!desc[i].struct_size_bytes)
+			continue;
+
+		if (desc[i].size_bits <= 32) {
+			int shift;
+			u32  val;
+			u32  mask;
+			__be32 *addr;
+
+			shift = 32 - desc[i].offset_bits - desc[i].size_bits;
+			mask = ((1ull << desc[i].size_bits) - 1) << shift;
+			addr = (__be32 *) buf + desc[i].offset_words;
+			val = (be32_to_cpup(addr) & mask) >> shift;
+			value_write(desc[i].struct_offset_bytes,
+				    desc[i].struct_size_bytes,
+				    val,
+				    structure);
+		} else if (desc[i].size_bits <= 64) {
+			int shift;
+			u64  val;
+			u64  mask;
+			__be64 *addr;
+
+			shift = 64 - desc[i].offset_bits - desc[i].size_bits;
+			mask = ((1ull << desc[i].size_bits) - 1) << shift;
+			addr = (__be64 *) buf + desc[i].offset_words;
+			val = (be64_to_cpup(addr) & mask) >> shift;
+			value_write(desc[i].struct_offset_bytes,
+				    desc[i].struct_size_bytes,
+				    val,
+				    structure);
+		} else {
+			if (desc[i].offset_bits % 8 ||
+			    desc[i].size_bits   % 8) {
+				printk(KERN_WARNING "Structure field %s of size %d "
+				       "bits is not byte-aligned\n",
+				       desc[i].field_name, desc[i].size_bits);
+			}
+
+			memcpy(structure + desc[i].struct_offset_bytes,
+			       buf + desc[i].offset_words * 4 +
+			       desc[i].offset_bits / 8,
+			       desc[i].size_bits / 8);
+		}
+	}
+}
+EXPORT_SYMBOL(ib_unpack);
diff -Nru a/drivers/infiniband/core/sa_query.c b/drivers/infiniband/core/sa_query.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/core/sa_query.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,866 @@
+/*
+ * Copyright (c) 2004 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: sa_query.c 1389 2004-12-27 22:56:47Z roland $
+ */
+
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/err.h>
+#include <linux/random.h>
+#include <linux/spinlock.h>
+#include <linux/slab.h>
+#include <linux/pci.h>
+#include <linux/dma-mapping.h>
+#include <linux/kref.h>
+#include <linux/idr.h>
+
+#include <ib_pack.h>
+#include <ib_sa.h>
+
+MODULE_AUTHOR("Roland Dreier");
+MODULE_DESCRIPTION("InfiniBand subnet administration query support");
+MODULE_LICENSE("Dual BSD/GPL");
+
+/*
+ * These two structures must be packed because they have 64-bit fields
+ * that are only 32-bit aligned.  64-bit architectures will lay them
+ * out wrong otherwise.  (And unfortunately they are sent on the wire
+ * so we can't change the layout)
+ */
+struct ib_sa_hdr {
+	u64			sm_key;
+	u16			attr_offset;
+	u16			reserved;
+	ib_sa_comp_mask		comp_mask;
+} __attribute__ ((packed));
+
+struct ib_sa_mad {
+	struct ib_mad_hdr	mad_hdr;
+	struct ib_rmpp_hdr	rmpp_hdr;
+	struct ib_sa_hdr	sa_hdr;
+	u8			data[200];
+} __attribute__ ((packed));
+
+struct ib_sa_sm_ah {
+	struct ib_ah        *ah;
+	struct kref          ref;
+};
+
+struct ib_sa_port {
+	struct ib_mad_agent *agent;
+	struct ib_mr        *mr;
+	struct ib_sa_sm_ah  *sm_ah;
+	struct work_struct   update_task;
+	spinlock_t           ah_lock;
+	u8                   port_num;
+};
+
+struct ib_sa_device {
+	int                     start_port, end_port;
+	struct ib_event_handler event_handler;
+	struct ib_sa_port port[0];
+};
+
+struct ib_sa_query {
+	void (*callback)(struct ib_sa_query *, int, struct ib_sa_mad *);
+	void (*release)(struct ib_sa_query *);
+	struct ib_sa_port  *port;
+	struct ib_sa_mad   *mad;
+	struct ib_sa_sm_ah *sm_ah;
+	DECLARE_PCI_UNMAP_ADDR(mapping)
+	int                 id;
+};
+
+struct ib_sa_path_query {
+	void (*callback)(int, struct ib_sa_path_rec *, void *);
+	void *context;
+	struct ib_sa_query sa_query;
+};
+
+struct ib_sa_mcmember_query {
+	void (*callback)(int, struct ib_sa_mcmember_rec *, void *);
+	void *context;
+	struct ib_sa_query sa_query;
+};
+
+static void ib_sa_add_one(struct ib_device *device);
+static void ib_sa_remove_one(struct ib_device *device);
+
+static struct ib_client sa_client = {
+	.name   = "sa",
+	.add    = ib_sa_add_one,
+	.remove = ib_sa_remove_one
+};
+
+static spinlock_t idr_lock;
+static DEFINE_IDR(query_idr);
+
+static spinlock_t tid_lock;
+static u32 tid;
+
+enum {
+	IB_SA_ATTR_CLASS_PORTINFO    = 0x01,
+	IB_SA_ATTR_NOTICE	     = 0x02,
+	IB_SA_ATTR_INFORM_INFO	     = 0x03,
+	IB_SA_ATTR_NODE_REC	     = 0x11,
+	IB_SA_ATTR_PORT_INFO_REC     = 0x12,
+	IB_SA_ATTR_SL2VL_REC	     = 0x13,
+	IB_SA_ATTR_SWITCH_REC	     = 0x14,
+	IB_SA_ATTR_LINEAR_FDB_REC    = 0x15,
+	IB_SA_ATTR_RANDOM_FDB_REC    = 0x16,
+	IB_SA_ATTR_MCAST_FDB_REC     = 0x17,
+	IB_SA_ATTR_SM_INFO_REC	     = 0x18,
+	IB_SA_ATTR_LINK_REC	     = 0x20,
+	IB_SA_ATTR_GUID_INFO_REC     = 0x30,
+	IB_SA_ATTR_SERVICE_REC	     = 0x31,
+	IB_SA_ATTR_PARTITION_REC     = 0x33,
+	IB_SA_ATTR_RANGE_REC	     = 0x34,
+	IB_SA_ATTR_PATH_REC	     = 0x35,
+	IB_SA_ATTR_VL_ARB_REC	     = 0x36,
+	IB_SA_ATTR_MC_GROUP_REC	     = 0x37,
+	IB_SA_ATTR_MC_MEMBER_REC     = 0x38,
+	IB_SA_ATTR_TRACE_REC	     = 0x39,
+	IB_SA_ATTR_MULTI_PATH_REC    = 0x3a,
+	IB_SA_ATTR_SERVICE_ASSOC_REC = 0x3b
+};
+
+#define PATH_REC_FIELD(field) \
+	.struct_offset_bytes = offsetof(struct ib_sa_path_rec, field),		\
+	.struct_size_bytes   = sizeof ((struct ib_sa_path_rec *) 0)->field,	\
+	.field_name          = "sa_path_rec:" #field
+
+static const struct ib_field path_rec_table[] = {
+	{ RESERVED,
+	  .offset_words = 0,
+	  .offset_bits  = 0,
+	  .size_bits    = 32 },
+	{ RESERVED,
+	  .offset_words = 1,
+	  .offset_bits  = 0,
+	  .size_bits    = 32 },
+	{ PATH_REC_FIELD(dgid),
+	  .offset_words = 2,
+	  .offset_bits  = 0,
+	  .size_bits    = 128 },
+	{ PATH_REC_FIELD(sgid),
+	  .offset_words = 6,
+	  .offset_bits  = 0,
+	  .size_bits    = 128 },
+	{ PATH_REC_FIELD(dlid),
+	  .offset_words = 10,
+	  .offset_bits  = 0,
+	  .size_bits    = 16 },
+	{ PATH_REC_FIELD(slid),
+	  .offset_words = 10,
+	  .offset_bits  = 16,
+	  .size_bits    = 16 },
+	{ PATH_REC_FIELD(raw_traffic),
+	  .offset_words = 11,
+	  .offset_bits  = 0,
+	  .size_bits    = 1 },
+	{ RESERVED,
+	  .offset_words = 11,
+	  .offset_bits  = 1,
+	  .size_bits    = 3 },
+	{ PATH_REC_FIELD(flow_label),
+	  .offset_words = 11,
+	  .offset_bits  = 4,
+	  .size_bits    = 20 },
+	{ PATH_REC_FIELD(hop_limit),
+	  .offset_words = 11,
+	  .offset_bits  = 24,
+	  .size_bits    = 8 },
+	{ PATH_REC_FIELD(traffic_class),
+	  .offset_words = 12,
+	  .offset_bits  = 0,
+	  .size_bits    = 8 },
+	{ PATH_REC_FIELD(reversible),
+	  .offset_words = 12,
+	  .offset_bits  = 8,
+	  .size_bits    = 1 },
+	{ PATH_REC_FIELD(numb_path),
+	  .offset_words = 12,
+	  .offset_bits  = 9,
+	  .size_bits    = 7 },
+	{ PATH_REC_FIELD(pkey),
+	  .offset_words = 12,
+	  .offset_bits  = 16,
+	  .size_bits    = 16 },
+	{ RESERVED,
+	  .offset_words = 13,
+	  .offset_bits  = 0,
+	  .size_bits    = 12 },
+	{ PATH_REC_FIELD(sl),
+	  .offset_words = 13,
+	  .offset_bits  = 12,
+	  .size_bits    = 4 },
+	{ PATH_REC_FIELD(mtu_selector),
+	  .offset_words = 13,
+	  .offset_bits  = 16,
+	  .size_bits    = 2 },
+	{ PATH_REC_FIELD(mtu),
+	  .offset_words = 13,
+	  .offset_bits  = 18,
+	  .size_bits    = 6 },
+	{ PATH_REC_FIELD(rate_selector),
+	  .offset_words = 13,
+	  .offset_bits  = 24,
+	  .size_bits    = 2 },
+	{ PATH_REC_FIELD(rate),
+	  .offset_words = 13,
+	  .offset_bits  = 26,
+	  .size_bits    = 6 },
+	{ PATH_REC_FIELD(packet_life_time_selector),
+	  .offset_words = 14,
+	  .offset_bits  = 0,
+	  .size_bits    = 2 },
+	{ PATH_REC_FIELD(packet_life_time),
+	  .offset_words = 14,
+	  .offset_bits  = 2,
+	  .size_bits    = 6 },
+	{ PATH_REC_FIELD(preference),
+	  .offset_words = 14,
+	  .offset_bits  = 8,
+	  .size_bits    = 8 },
+	{ RESERVED,
+	  .offset_words = 14,
+	  .offset_bits  = 16,
+	  .size_bits    = 48 },
+};
+
+#define MCMEMBER_REC_FIELD(field) \
+	.struct_offset_bytes = offsetof(struct ib_sa_mcmember_rec, field),	\
+	.struct_size_bytes   = sizeof ((struct ib_sa_mcmember_rec *) 0)->field,	\
+	.field_name          = "sa_mcmember_rec:" #field
+
+static const struct ib_field mcmember_rec_table[] = {
+	{ MCMEMBER_REC_FIELD(mgid),
+	  .offset_words = 0,
+	  .offset_bits  = 0,
+	  .size_bits    = 128 },
+	{ MCMEMBER_REC_FIELD(port_gid),
+	  .offset_words = 4,
+	  .offset_bits  = 0,
+	  .size_bits    = 128 },
+	{ MCMEMBER_REC_FIELD(qkey),
+	  .offset_words = 8,
+	  .offset_bits  = 0,
+	  .size_bits    = 32 },
+	{ MCMEMBER_REC_FIELD(mlid),
+	  .offset_words = 9,
+	  .offset_bits  = 0,
+	  .size_bits    = 16 },
+	{ MCMEMBER_REC_FIELD(mtu_selector),
+	  .offset_words = 9,
+	  .offset_bits  = 16,
+	  .size_bits    = 2 },
+	{ MCMEMBER_REC_FIELD(mtu),
+	  .offset_words = 9,
+	  .offset_bits  = 18,
+	  .size_bits    = 6 },
+	{ MCMEMBER_REC_FIELD(traffic_class),
+	  .offset_words = 9,
+	  .offset_bits  = 24,
+	  .size_bits    = 8 },
+	{ MCMEMBER_REC_FIELD(pkey),
+	  .offset_words = 10,
+	  .offset_bits  = 0,
+	  .size_bits    = 16 },
+	{ MCMEMBER_REC_FIELD(rate_selector),
+	  .offset_words = 10,
+	  .offset_bits  = 16,
+	  .size_bits    = 2 },
+	{ MCMEMBER_REC_FIELD(rate),
+	  .offset_words = 10,
+	  .offset_bits  = 18,
+	  .size_bits    = 6 },
+	{ MCMEMBER_REC_FIELD(packet_life_time_selector),
+	  .offset_words = 10,
+	  .offset_bits  = 24,
+	  .size_bits    = 2 },
+	{ MCMEMBER_REC_FIELD(packet_life_time),
+	  .offset_words = 10,
+	  .offset_bits  = 26,
+	  .size_bits    = 6 },
+	{ MCMEMBER_REC_FIELD(sl),
+	  .offset_words = 11,
+	  .offset_bits  = 0,
+	  .size_bits    = 4 },
+	{ MCMEMBER_REC_FIELD(flow_label),
+	  .offset_words = 11,
+	  .offset_bits  = 4,
+	  .size_bits    = 20 },
+	{ MCMEMBER_REC_FIELD(hop_limit),
+	  .offset_words = 11,
+	  .offset_bits  = 24,
+	  .size_bits    = 8 },
+	{ MCMEMBER_REC_FIELD(scope),
+	  .offset_words = 12,
+	  .offset_bits  = 0,
+	  .size_bits    = 4 },
+	{ MCMEMBER_REC_FIELD(join_state),
+	  .offset_words = 12,
+	  .offset_bits  = 4,
+	  .size_bits    = 4 },
+	{ MCMEMBER_REC_FIELD(proxy_join),
+	  .offset_words = 12,
+	  .offset_bits  = 8,
+	  .size_bits    = 1 },
+	{ RESERVED,
+	  .offset_words = 12,
+	  .offset_bits  = 9,
+	  .size_bits    = 23 },
+};
+
+static void free_sm_ah(struct kref *kref)
+{
+	struct ib_sa_sm_ah *sm_ah = container_of(kref, struct ib_sa_sm_ah, ref);
+
+	ib_destroy_ah(sm_ah->ah);
+	kfree(sm_ah);
+}
+
+static void update_sm_ah(void *port_ptr)
+{
+	struct ib_sa_port *port = port_ptr;
+	struct ib_sa_sm_ah *new_ah, *old_ah;
+	struct ib_port_attr port_attr;
+	struct ib_ah_attr   ah_attr;
+
+	if (ib_query_port(port->agent->device, port->port_num, &port_attr)) {
+		printk(KERN_WARNING "Couldn't query port\n");
+		return;
+	}
+
+	new_ah = kmalloc(sizeof *new_ah, GFP_KERNEL);
+	if (!new_ah) {
+		printk(KERN_WARNING "Couldn't allocate new SM AH\n");
+		return;
+	}
+
+	kref_init(&new_ah->ref);
+
+	memset(&ah_attr, 0, sizeof ah_attr);
+	ah_attr.dlid     = port_attr.sm_lid;
+	ah_attr.sl       = port_attr.sm_sl;
+	ah_attr.port_num = port->port_num;
+
+	new_ah->ah = ib_create_ah(port->agent->qp->pd, &ah_attr);
+	if (IS_ERR(new_ah->ah)) {
+		printk(KERN_WARNING "Couldn't create new SM AH\n");
+		kfree(new_ah);
+		return;
+	}
+
+	spin_lock_irq(&port->ah_lock);
+	old_ah = port->sm_ah;
+	port->sm_ah = new_ah;
+	spin_unlock_irq(&port->ah_lock);
+
+	if (old_ah)
+		kref_put(&old_ah->ref, free_sm_ah);
+}
+
+static void ib_sa_event(struct ib_event_handler *handler, struct ib_event *event)
+{
+	if (event->event == IB_EVENT_PORT_ERR    ||
+	    event->event == IB_EVENT_PORT_ACTIVE ||
+	    event->event == IB_EVENT_LID_CHANGE  ||
+	    event->event == IB_EVENT_PKEY_CHANGE ||
+	    event->event == IB_EVENT_SM_CHANGE) {
+		struct ib_sa_device *sa_dev =
+			ib_get_client_data(event->device, &sa_client);
+
+		schedule_work(&sa_dev->port[event->element.port_num -
+					    sa_dev->start_port].update_task);
+	}
+}
+
+/**
+ * ib_sa_cancel_query - try to cancel an SA query
+ * @id:ID of query to cancel
+ * @query:query pointer to cancel
+ *
+ * Try to cancel an SA query.  If the id and query don't match up or
+ * the query has already completed, nothing is done.  Otherwise the
+ * query is canceled and will complete with a status of -EINTR.
+ */
+void ib_sa_cancel_query(int id, struct ib_sa_query *query)
+{
+	unsigned long flags;
+	struct ib_mad_agent *agent;
+
+	spin_lock_irqsave(&idr_lock, flags);
+	if (idr_find(&query_idr, id) != query) {
+		spin_unlock_irqrestore(&idr_lock, flags);
+		return;
+	}
+	agent = query->port->agent;
+	spin_unlock_irqrestore(&idr_lock, flags);
+
+	ib_cancel_mad(agent, id);
+}
+EXPORT_SYMBOL(ib_sa_cancel_query);
+
+static void init_mad(struct ib_sa_mad *mad, struct ib_mad_agent *agent)
+{
+	unsigned long flags;
+
+	memset(mad, 0, sizeof *mad);
+
+	mad->mad_hdr.base_version  = IB_MGMT_BASE_VERSION;
+	mad->mad_hdr.mgmt_class    = IB_MGMT_CLASS_SUBN_ADM;
+	mad->mad_hdr.class_version = IB_SA_CLASS_VERSION;
+
+	spin_lock_irqsave(&tid_lock, flags);
+	mad->mad_hdr.tid           =
+		cpu_to_be64(((u64) agent->hi_tid) << 32 | tid++);
+	spin_unlock_irqrestore(&tid_lock, flags);
+}
+
+static int send_mad(struct ib_sa_query *query, int timeout_ms)
+{
+	struct ib_sa_port *port = query->port;
+	unsigned long flags;
+	int ret;
+	struct ib_sge      gather_list;
+	struct ib_send_wr *bad_wr, wr = {
+		.opcode      = IB_WR_SEND,
+		.sg_list     = &gather_list,
+		.num_sge     = 1,
+		.send_flags  = IB_SEND_SIGNALED,
+		.wr	     = {
+			 .ud = {
+				 .mad_hdr     = &query->mad->mad_hdr,
+				 .remote_qpn  = 1,
+				 .remote_qkey = IB_QP1_QKEY,
+				 .timeout_ms  = timeout_ms
+			 }
+		 }
+	};
+
+retry:
+	if (!idr_pre_get(&query_idr, GFP_ATOMIC))
+		return -ENOMEM;
+	spin_lock_irqsave(&idr_lock, flags);
+	ret = idr_get_new(&query_idr, query, &query->id);
+	spin_unlock_irqrestore(&idr_lock, flags);
+	if (ret == -EAGAIN)
+		goto retry;
+	if (ret)
+		return ret;
+
+	wr.wr_id = query->id;
+
+	spin_lock_irqsave(&port->ah_lock, flags);
+	kref_get(&port->sm_ah->ref);
+	query->sm_ah = port->sm_ah;
+	wr.wr.ud.ah  = port->sm_ah->ah;
+	spin_unlock_irqrestore(&port->ah_lock, flags);
+
+	gather_list.addr   = dma_map_single(port->agent->device->dma_device,
+					    query->mad,
+					    sizeof (struct ib_sa_mad),
+					    DMA_TO_DEVICE);
+	gather_list.length = sizeof (struct ib_sa_mad);
+	gather_list.lkey   = port->mr->lkey;
+	pci_unmap_addr_set(query, mapping, gather_list.addr);
+
+	ret = ib_post_send_mad(port->agent, &wr, &bad_wr);
+	if (ret) {
+		dma_unmap_single(port->agent->device->dma_device,
+				 pci_unmap_addr(query, mapping),
+				 sizeof (struct ib_sa_mad),
+				 DMA_TO_DEVICE);
+		kref_put(&query->sm_ah->ref, free_sm_ah);
+		spin_lock_irqsave(&idr_lock, flags);
+		idr_remove(&query_idr, query->id);
+		spin_unlock_irqrestore(&idr_lock, flags);
+	}
+
+	return ret;
+}
+
+static void ib_sa_path_rec_callback(struct ib_sa_query *sa_query,
+				    int status,
+				    struct ib_sa_mad *mad)
+{
+	struct ib_sa_path_query *query =
+		container_of(sa_query, struct ib_sa_path_query, sa_query);
+
+	if (mad) {
+		struct ib_sa_path_rec rec;
+
+		ib_unpack(path_rec_table, ARRAY_SIZE(path_rec_table),
+			  mad->data, &rec);
+		query->callback(status, &rec, query->context);
+	} else
+		query->callback(status, NULL, query->context);
+}
+
+static void ib_sa_path_rec_release(struct ib_sa_query *sa_query)
+{
+	kfree(sa_query->mad);
+	kfree(container_of(sa_query, struct ib_sa_path_query, sa_query));
+}
+
+/**
+ * ib_sa_path_rec_get - Start a Path get query
+ * @device:device to send query on
+ * @port_num: port number to send query on
+ * @rec:Path Record to send in query
+ * @comp_mask:component mask to send in query
+ * @timeout_ms:time to wait for response
+ * @gfp_mask:GFP mask to use for internal allocations
+ * @callback:function called when query completes, times out or is
+ * canceled
+ * @context:opaque user context passed to callback
+ * @sa_query:query context, used to cancel query
+ *
+ * Send a Path Record Get query to the SA to look up a path.  The
+ * callback function will be called when the query completes (or
+ * fails); status is 0 for a successful response, -EINTR if the query
+ * is canceled, -ETIMEDOUT is the query timed out, or -EIO if an error
+ * occurred sending the query.  The resp parameter of the callback is
+ * only valid if status is 0.
+ *
+ * If the return value of ib_sa_path_rec_get() is negative, it is an
+ * error code.  Otherwise it is a query ID that can be used to cancel
+ * the query.
+ */
+int ib_sa_path_rec_get(struct ib_device *device, u8 port_num,
+		       struct ib_sa_path_rec *rec,
+		       ib_sa_comp_mask comp_mask,
+		       int timeout_ms, int gfp_mask,
+		       void (*callback)(int status,
+					struct ib_sa_path_rec *resp,
+					void *context),
+		       void *context,
+		       struct ib_sa_query **sa_query)
+{
+	struct ib_sa_path_query *query;
+	struct ib_sa_device *sa_dev = ib_get_client_data(device, &sa_client);
+	struct ib_sa_port   *port   = &sa_dev->port[port_num - sa_dev->start_port];
+	struct ib_mad_agent *agent  = port->agent;
+	int ret;
+
+	query = kmalloc(sizeof *query, gfp_mask);
+	if (!query)
+		return -ENOMEM;
+	query->sa_query.mad = kmalloc(sizeof *query->sa_query.mad, gfp_mask);
+	if (!query->sa_query.mad) {
+		kfree(query);
+		return -ENOMEM;
+	}
+
+	query->callback = callback;
+	query->context  = context;
+
+	init_mad(query->sa_query.mad, agent);
+
+	query->sa_query.callback              = ib_sa_path_rec_callback;
+	query->sa_query.release               = ib_sa_path_rec_release;
+	query->sa_query.port                  = port;
+	query->sa_query.mad->mad_hdr.method   = IB_MGMT_METHOD_GET;
+	query->sa_query.mad->mad_hdr.attr_id  = cpu_to_be16(IB_SA_ATTR_PATH_REC);
+	query->sa_query.mad->sa_hdr.comp_mask = comp_mask;
+
+	ib_pack(path_rec_table, ARRAY_SIZE(path_rec_table),
+		rec, query->sa_query.mad->data);
+
+	*sa_query = &query->sa_query;
+	ret = send_mad(&query->sa_query, timeout_ms);
+	if (ret) {
+		*sa_query = NULL;
+		kfree(query->sa_query.mad);
+		kfree(query);
+	}
+
+	return ret ? ret : query->sa_query.id;
+}
+EXPORT_SYMBOL(ib_sa_path_rec_get);
+
+static void ib_sa_mcmember_rec_callback(struct ib_sa_query *sa_query,
+					int status,
+					struct ib_sa_mad *mad)
+{
+	struct ib_sa_mcmember_query *query =
+		container_of(sa_query, struct ib_sa_mcmember_query, sa_query);
+
+	if (mad) {
+		struct ib_sa_mcmember_rec rec;
+
+		ib_unpack(mcmember_rec_table, ARRAY_SIZE(mcmember_rec_table),
+			  mad->data, &rec);
+		query->callback(status, &rec, query->context);
+	} else
+		query->callback(status, NULL, query->context);
+}
+
+static void ib_sa_mcmember_rec_release(struct ib_sa_query *sa_query)
+{
+	kfree(sa_query->mad);
+	kfree(container_of(sa_query, struct ib_sa_mcmember_query, sa_query));
+}
+
+int ib_sa_mcmember_rec_query(struct ib_device *device, u8 port_num,
+			     u8 method,
+			     struct ib_sa_mcmember_rec *rec,
+			     ib_sa_comp_mask comp_mask,
+			     int timeout_ms, int gfp_mask,
+			     void (*callback)(int status,
+					      struct ib_sa_mcmember_rec *resp,
+					      void *context),
+			     void *context,
+			     struct ib_sa_query **sa_query)
+{
+	struct ib_sa_mcmember_query *query;
+	struct ib_sa_device *sa_dev = ib_get_client_data(device, &sa_client);
+	struct ib_sa_port   *port   = &sa_dev->port[port_num - sa_dev->start_port];
+	struct ib_mad_agent *agent  = port->agent;
+	int ret;
+
+	query = kmalloc(sizeof *query, gfp_mask);
+	if (!query)
+		return -ENOMEM;
+	query->sa_query.mad = kmalloc(sizeof *query->sa_query.mad, gfp_mask);
+	if (!query->sa_query.mad) {
+		kfree(query);
+		return -ENOMEM;
+	}
+
+	query->callback = callback;
+	query->context  = context;
+
+	init_mad(query->sa_query.mad, agent);
+
+	query->sa_query.callback              = ib_sa_mcmember_rec_callback;
+	query->sa_query.release               = ib_sa_mcmember_rec_release;
+	query->sa_query.port                  = port;
+	query->sa_query.mad->mad_hdr.method   = method;
+	query->sa_query.mad->mad_hdr.attr_id  = cpu_to_be16(IB_SA_ATTR_MC_MEMBER_REC);
+	query->sa_query.mad->sa_hdr.comp_mask = comp_mask;
+
+	ib_pack(mcmember_rec_table, ARRAY_SIZE(mcmember_rec_table),
+		rec, query->sa_query.mad->data);
+
+	*sa_query = &query->sa_query;
+	ret = send_mad(&query->sa_query, timeout_ms);
+	if (ret) {
+		*sa_query = NULL;
+		kfree(query->sa_query.mad);
+		kfree(query);
+	}
+
+	return ret ? ret : query->sa_query.id;
+}
+EXPORT_SYMBOL(ib_sa_mcmember_rec_query);
+
+static void send_handler(struct ib_mad_agent *agent,
+			 struct ib_mad_send_wc *mad_send_wc)
+{
+	struct ib_sa_query *query;
+	unsigned long flags;
+
+	spin_lock_irqsave(&idr_lock, flags);
+	query = idr_find(&query_idr, mad_send_wc->wr_id);
+	spin_unlock_irqrestore(&idr_lock, flags);
+
+	if (!query)
+		return;
+
+	switch (mad_send_wc->status) {
+	case IB_WC_SUCCESS:
+		/* No callback -- already got recv */
+		break;
+	case IB_WC_RESP_TIMEOUT_ERR:
+		query->callback(query, -ETIMEDOUT, NULL);
+		break;
+	case IB_WC_WR_FLUSH_ERR:
+		query->callback(query, -EINTR, NULL);
+		break;
+	default:
+		query->callback(query, -EIO, NULL);
+		break;
+	}
+
+	dma_unmap_single(agent->device->dma_device,
+			 pci_unmap_addr(query, mapping),
+			 sizeof (struct ib_sa_mad),
+			 DMA_TO_DEVICE);
+	kref_put(&query->sm_ah->ref, free_sm_ah);
+
+	query->release(query);
+
+	spin_lock_irqsave(&idr_lock, flags);
+	idr_remove(&query_idr, mad_send_wc->wr_id);
+	spin_unlock_irqrestore(&idr_lock, flags);
+}
+
+static void recv_handler(struct ib_mad_agent *mad_agent,
+			 struct ib_mad_recv_wc *mad_recv_wc)
+{
+	struct ib_sa_query *query;
+	unsigned long flags;
+
+	spin_lock_irqsave(&idr_lock, flags);
+	query = idr_find(&query_idr, mad_recv_wc->wc->wr_id);
+	spin_unlock_irqrestore(&idr_lock, flags);
+
+	if (query) {
+		if (mad_recv_wc->wc->status == IB_WC_SUCCESS)
+			query->callback(query,
+					mad_recv_wc->recv_buf.mad->mad_hdr.status ?
+					-EINVAL : 0,
+					(struct ib_sa_mad *) mad_recv_wc->recv_buf.mad);
+		else
+			query->callback(query, -EIO, NULL);
+	}
+
+	ib_free_recv_mad(mad_recv_wc);
+}
+
+static void ib_sa_add_one(struct ib_device *device)
+{
+	struct ib_sa_device *sa_dev;
+	int s, e, i;
+
+	if (device->node_type == IB_NODE_SWITCH)
+		s = e = 0;
+	else {
+		s = 1;
+		e = device->phys_port_cnt;
+	}
+
+	sa_dev = kmalloc(sizeof *sa_dev +
+			 (e - s + 1) * sizeof (struct ib_sa_port),
+			 GFP_KERNEL);
+	if (!sa_dev)
+		return;
+
+	sa_dev->start_port = s;
+	sa_dev->end_port   = e;
+
+	for (i = 0; i <= e - s; ++i) {
+		sa_dev->port[i].mr       = NULL;
+		sa_dev->port[i].sm_ah    = NULL;
+		sa_dev->port[i].port_num = i + s;
+		spin_lock_init(&sa_dev->port[i].ah_lock);
+
+		sa_dev->port[i].agent =
+			ib_register_mad_agent(device, i + s, IB_QPT_GSI,
+					      NULL, 0, send_handler,
+					      recv_handler, sa_dev);
+		if (IS_ERR(sa_dev->port[i].agent))
+			goto err;
+
+		sa_dev->port[i].mr = ib_get_dma_mr(sa_dev->port[i].agent->qp->pd,
+						   IB_ACCESS_LOCAL_WRITE);
+		if (IS_ERR(sa_dev->port[i].mr)) {
+			ib_unregister_mad_agent(sa_dev->port[i].agent);
+			goto err;
+		}
+
+		INIT_WORK(&sa_dev->port[i].update_task,
+			  update_sm_ah, &sa_dev->port[i]);
+	}
+
+	ib_set_client_data(device, &sa_client, sa_dev);
+
+	/*
+	 * We register our event handler after everything is set up,
+	 * and then update our cached info after the event handler is
+	 * registered to avoid any problems if a port changes state
+	 * during our initialization.
+	 */
+
+	INIT_IB_EVENT_HANDLER(&sa_dev->event_handler, device, ib_sa_event);
+	if (ib_register_event_handler(&sa_dev->event_handler))
+		goto err;
+
+	for (i = 0; i <= e - s; ++i)
+		update_sm_ah(&sa_dev->port[i]);
+
+	return;
+
+err:
+	while (--i >= 0) {
+		ib_dereg_mr(sa_dev->port[i].mr);
+		ib_unregister_mad_agent(sa_dev->port[i].agent);
+	}
+
+	kfree(sa_dev);
+
+	return;
+}
+
+static void ib_sa_remove_one(struct ib_device *device)
+{
+	struct ib_sa_device *sa_dev = ib_get_client_data(device, &sa_client);
+	int i;
+
+	if (!sa_dev)
+		return;
+
+	ib_unregister_event_handler(&sa_dev->event_handler);
+
+	for (i = 0; i <= sa_dev->end_port - sa_dev->start_port; ++i) {
+		ib_unregister_mad_agent(sa_dev->port[i].agent);
+		kref_put(&sa_dev->port[i].sm_ah->ref, free_sm_ah);
+	}
+
+	kfree(sa_dev);
+}
+
+static int __init ib_sa_init(void)
+{
+	int ret;
+
+	spin_lock_init(&idr_lock);
+	spin_lock_init(&tid_lock);
+
+	get_random_bytes(&tid, sizeof tid);
+
+	ret = ib_register_client(&sa_client);
+	if (ret)
+		printk(KERN_ERR "Couldn't register ib_sa client\n");
+
+	return ret;
+}
+
+static void __exit ib_sa_cleanup(void)
+{
+	ib_unregister_client(&sa_client);
+}
+
+module_init(ib_sa_init);
+module_exit(ib_sa_cleanup);
diff -Nru a/drivers/infiniband/core/smi.c b/drivers/infiniband/core/smi.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/core/smi.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,234 @@
+/*
+ * Copyright (c) 2004 Mellanox Technologies Ltd.  All rights reserved.
+ * Copyright (c) 2004 Infinicon Corporation.  All rights reserved.
+ * Copyright (c) 2004 Intel Corporation.  All rights reserved.
+ * Copyright (c) 2004 Topspin Corporation.  All rights reserved.
+ * Copyright (c) 2004 Voltaire Corporation.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: smi.c 1389 2004-12-27 22:56:47Z roland $
+ */
+
+#include <ib_smi.h>
+
+
+/*
+ * Fixup a directed route SMP for sending
+ * Return 0 if the SMP should be discarded
+ */
+int smi_handle_dr_smp_send(struct ib_smp *smp,
+			   u8 node_type,
+			   int port_num)
+{
+	u8 hop_ptr, hop_cnt;
+
+	hop_ptr = smp->hop_ptr;
+	hop_cnt = smp->hop_cnt;
+
+	/* See section 14.2.2.2, Vol 1 IB spec */
+	if (!ib_get_smp_direction(smp)) {
+		/* C14-9:1 */
+		if (hop_cnt && hop_ptr == 0) {
+			smp->hop_ptr++;
+			return (smp->initial_path[smp->hop_ptr] ==
+				port_num);
+		}
+
+		/* C14-9:2 */
+		if (hop_ptr && hop_ptr < hop_cnt) {
+			if (node_type != IB_NODE_SWITCH)
+				return 0;
+
+			/* smp->return_path set when received */
+			smp->hop_ptr++;
+			return (smp->initial_path[smp->hop_ptr] ==
+				port_num);
+		}
+
+		/* C14-9:3 -- We're at the end of the DR segment of path */
+		if (hop_ptr == hop_cnt) {
+			/* smp->return_path set when received */
+			smp->hop_ptr++;
+			return (node_type == IB_NODE_SWITCH ||
+				smp->dr_dlid == IB_LID_PERMISSIVE);
+		}
+
+		/* C14-9:4 -- hop_ptr = hop_cnt + 1 -> give to SMA/SM */
+		/* C14-9:5 -- Fail unreasonable hop pointer */
+		return (hop_ptr == hop_cnt + 1);
+
+	} else {
+		/* C14-13:1 */
+		if (hop_cnt && hop_ptr == hop_cnt + 1) {
+			smp->hop_ptr--;
+			return (smp->return_path[smp->hop_ptr] ==
+				port_num);
+		}
+
+		/* C14-13:2 */
+		if (2 <= hop_ptr && hop_ptr <= hop_cnt) {
+			if (node_type != IB_NODE_SWITCH)
+				return 0;
+
+			smp->hop_ptr--;
+			return (smp->return_path[smp->hop_ptr] ==
+				port_num);
+		}
+
+		/* C14-13:3 -- at the end of the DR segment of path */
+		if (hop_ptr == 1) {
+			smp->hop_ptr--;
+			/* C14-13:3 -- SMPs destined for SM shouldn't be here */
+			return (node_type == IB_NODE_SWITCH ||
+				smp->dr_slid == IB_LID_PERMISSIVE);
+		}
+
+		/* C14-13:4 -- hop_ptr = 0 -> should have gone to SM */
+		if (hop_ptr == 0)
+			return 1;
+
+		/* C14-13:5 -- Check for unreasonable hop pointer */
+		return 0;
+	}
+}
+
+/*
+ * Adjust information for a received SMP
+ * Return 0 if the SMP should be dropped
+ */
+int smi_handle_dr_smp_recv(struct ib_smp *smp,
+			   u8 node_type,
+			   int port_num,
+			   int phys_port_cnt)
+{
+	u8 hop_ptr, hop_cnt;
+
+	hop_ptr = smp->hop_ptr;
+	hop_cnt = smp->hop_cnt;
+
+	/* See section 14.2.2.2, Vol 1 IB spec */
+	if (!ib_get_smp_direction(smp)) {
+		/* C14-9:1 -- sender should have incremented hop_ptr */
+		if (hop_cnt && hop_ptr == 0)
+			return 0;
+
+		/* C14-9:2 -- intermediate hop */
+		if (hop_ptr && hop_ptr < hop_cnt) {
+			if (node_type != IB_NODE_SWITCH)
+				return 0;
+
+			smp->return_path[hop_ptr] = port_num;
+			/* smp->hop_ptr updated when sending */
+			return (smp->initial_path[hop_ptr+1] <= phys_port_cnt);
+		}
+
+		/* C14-9:3 -- We're at the end of the DR segment of path */
+		if (hop_ptr == hop_cnt) {
+			if (hop_cnt)
+				smp->return_path[hop_ptr] = port_num;
+			/* smp->hop_ptr updated when sending */
+
+			return (node_type == IB_NODE_SWITCH ||
+				smp->dr_dlid == IB_LID_PERMISSIVE);
+		}
+
+		/* C14-9:4 -- hop_ptr = hop_cnt + 1 -> give to SMA/SM */
+		/* C14-9:5 -- fail unreasonable hop pointer */
+		return (hop_ptr == hop_cnt + 1);
+
+	} else {
+
+		/* C14-13:1 */
+		if (hop_cnt && hop_ptr == hop_cnt + 1) {
+			smp->hop_ptr--;
+			return (smp->return_path[smp->hop_ptr] ==
+				port_num);
+		}
+
+		/* C14-13:2 */
+		if (2 <= hop_ptr && hop_ptr <= hop_cnt) {
+			if (node_type != IB_NODE_SWITCH)
+				return 0;
+
+			/* smp->hop_ptr updated when sending */
+			return (smp->return_path[hop_ptr-1] <= phys_port_cnt);
+		}
+
+		/* C14-13:3 -- We're at the end of the DR segment of path */
+		if (hop_ptr == 1) {
+			if (smp->dr_slid == IB_LID_PERMISSIVE) {
+				/* giving SMP to SM - update hop_ptr */
+				smp->hop_ptr--;
+				return 1;
+			}
+			/* smp->hop_ptr updated when sending */
+			return (node_type == IB_NODE_SWITCH);
+		}
+
+		/* C14-13:4 -- hop_ptr = 0 -> give to SM */
+		/* C14-13:5 -- Check for unreasonable hop pointer */
+		return (hop_ptr == 0);
+	}
+}
+
+/*
+ * Return 1 if the received DR SMP should be forwarded to the send queue
+ * Return 0 if the SMP should be completed up the stack
+ */
+int smi_check_forward_dr_smp(struct ib_smp *smp)
+{
+	u8 hop_ptr, hop_cnt;
+
+	hop_ptr = smp->hop_ptr;
+	hop_cnt = smp->hop_cnt;
+
+	if (!ib_get_smp_direction(smp)) {
+		/* C14-9:2 -- intermediate hop */
+		if (hop_ptr && hop_ptr < hop_cnt)
+			return 1;
+
+		/* C14-9:3 -- at the end of the DR segment of path */
+		if (hop_ptr == hop_cnt)
+			return (smp->dr_dlid == IB_LID_PERMISSIVE);
+
+		/* C14-9:4 -- hop_ptr = hop_cnt + 1 -> give to SMA/SM */
+		if (hop_ptr == hop_cnt + 1)
+			return 1;
+	} else {
+		/* C14-13:2 */
+		if (2 <= hop_ptr && hop_ptr <= hop_cnt)
+			return 1;
+
+		/* C14-13:3 -- at the end of the DR segment of path */
+		if (hop_ptr == 1)
+			return (smp->dr_slid != IB_LID_PERMISSIVE);
+	}
+	return 0;
+}
diff -Nru a/drivers/infiniband/core/smi.h b/drivers/infiniband/core/smi.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/core/smi.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2004 Mellanox Technologies Ltd.  All rights reserved.
+ * Copyright (c) 2004 Infinicon Corporation.  All rights reserved.
+ * Copyright (c) 2004 Intel Corporation.  All rights reserved.
+ * Copyright (c) 2004 Topspin Corporation.  All rights reserved.
+ * Copyright (c) 2004 Voltaire Corporation.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: smi.h 1389 2004-12-27 22:56:47Z roland $
+ */
+
+#ifndef __SMI_H_
+#define __SMI_H_
+
+int smi_handle_dr_smp_recv(struct ib_smp *smp,
+			   u8 node_type,
+			   int port_num,
+			   int phys_port_cnt);
+extern int smi_check_forward_dr_smp(struct ib_smp *smp);
+extern int smi_handle_dr_smp_send(struct ib_smp *smp,
+				  u8 node_type,
+				  int port_num);
+extern int smi_check_local_dr_smp(struct ib_smp *smp,
+				  struct ib_device *device,
+				  int port_num);
+
+/*
+ * Return 1 if the SMP should be handled by the local SMA/SM via process_mad
+ */
+static inline int smi_check_local_smp(struct ib_mad_agent *mad_agent,
+                         	      struct ib_smp *smp)
+{
+	/* C14-9:3 -- We're at the end of the DR segment of path */
+	/* C14-9:4 -- Hop Pointer = Hop Count + 1 -> give to SMA/SM */
+	return ((mad_agent->device->process_mad &&
+		!ib_get_smp_direction(smp) &&
+		(smp->hop_ptr == smp->hop_cnt + 1)));
+}
+
+#endif	/* __SMI_H_ */
diff -Nru a/drivers/infiniband/core/sysfs.c b/drivers/infiniband/core/sysfs.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/core/sysfs.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,725 @@
+/*
+ * Copyright (c) 2004 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: sysfs.c 1349 2004-12-16 21:09:43Z roland $
+ */
+
+#include "core_priv.h"
+
+#include <ib_mad.h>
+
+struct ib_port {
+	struct kobject         kobj;
+	struct ib_device      *ibdev;
+	struct attribute_group gid_group;
+	struct attribute     **gid_attr;
+	struct attribute_group pkey_group;
+	struct attribute     **pkey_attr;
+	u8                     port_num;
+};
+
+struct port_attribute {
+	struct attribute attr;
+	ssize_t (*show)(struct ib_port *, struct port_attribute *, char *buf);
+	ssize_t (*store)(struct ib_port *, struct port_attribute *,
+			 const char *buf, size_t count);
+};
+
+#define PORT_ATTR(_name, _mode, _show, _store) \
+struct port_attribute port_attr_##_name = __ATTR(_name, _mode, _show, _store)
+
+#define PORT_ATTR_RO(_name) \
+struct port_attribute port_attr_##_name = __ATTR_RO(_name)
+
+struct port_table_attribute {
+	struct port_attribute attr;
+	int                   index;
+};
+
+static ssize_t port_attr_show(struct kobject *kobj,
+			      struct attribute *attr, char *buf)
+{
+	struct port_attribute *port_attr =
+		container_of(attr, struct port_attribute, attr);
+	struct ib_port *p = container_of(kobj, struct ib_port, kobj);
+
+	if (!port_attr->show)
+		return 0;
+
+	return port_attr->show(p, port_attr, buf);
+}
+
+static struct sysfs_ops port_sysfs_ops = {
+	.show = port_attr_show
+};
+
+static ssize_t state_show(struct ib_port *p, struct port_attribute *unused,
+			  char *buf)
+{
+	struct ib_port_attr attr;
+	ssize_t ret;
+
+	static const char *state_name[] = {
+		[IB_PORT_NOP]		= "NOP",
+		[IB_PORT_DOWN]		= "DOWN",
+		[IB_PORT_INIT]		= "INIT",
+		[IB_PORT_ARMED]		= "ARMED",
+		[IB_PORT_ACTIVE]	= "ACTIVE",
+		[IB_PORT_ACTIVE_DEFER]	= "ACTIVE_DEFER"
+	};
+
+	ret = ib_query_port(p->ibdev, p->port_num, &attr);
+	if (ret)
+		return ret;
+
+	return sprintf(buf, "%d: %s\n", attr.state,
+		       attr.state >= 0 && attr.state <= ARRAY_SIZE(state_name) ?
+		       state_name[attr.state] : "UNKNOWN");
+}
+
+static ssize_t lid_show(struct ib_port *p, struct port_attribute *unused,
+			char *buf)
+{
+	struct ib_port_attr attr;
+	ssize_t ret;
+
+	ret = ib_query_port(p->ibdev, p->port_num, &attr);
+	if (ret)
+		return ret;
+
+	return sprintf(buf, "0x%x\n", attr.lid);
+}
+
+static ssize_t lid_mask_count_show(struct ib_port *p,
+				   struct port_attribute *unused,
+				   char *buf)
+{
+	struct ib_port_attr attr;
+	ssize_t ret;
+
+	ret = ib_query_port(p->ibdev, p->port_num, &attr);
+	if (ret)
+		return ret;
+
+	return sprintf(buf, "%d\n", attr.lmc);
+}
+
+static ssize_t sm_lid_show(struct ib_port *p, struct port_attribute *unused,
+			   char *buf)
+{
+	struct ib_port_attr attr;
+	ssize_t ret;
+
+	ret = ib_query_port(p->ibdev, p->port_num, &attr);
+	if (ret)
+		return ret;
+
+	return sprintf(buf, "0x%x\n", attr.sm_lid);
+}
+
+static ssize_t sm_sl_show(struct ib_port *p, struct port_attribute *unused,
+			  char *buf)
+{
+	struct ib_port_attr attr;
+	ssize_t ret;
+
+	ret = ib_query_port(p->ibdev, p->port_num, &attr);
+	if (ret)
+		return ret;
+
+	return sprintf(buf, "%d\n", attr.sm_sl);
+}
+
+static ssize_t cap_mask_show(struct ib_port *p, struct port_attribute *unused,
+			     char *buf)
+{
+	struct ib_port_attr attr;
+	ssize_t ret;
+
+	ret = ib_query_port(p->ibdev, p->port_num, &attr);
+	if (ret)
+		return ret;
+
+	return sprintf(buf, "0x%08x\n", attr.port_cap_flags);
+}
+
+static ssize_t rate_show(struct ib_port *p, struct port_attribute *unused,
+			 char *buf)
+{
+	struct ib_port_attr attr;
+	char *speed = "";
+	int rate;
+	ssize_t ret;
+
+	ret = ib_query_port(p->ibdev, p->port_num, &attr);
+	if (ret)
+		return ret;
+
+	switch (attr.active_speed) {
+	case 2: speed = " DDR"; break;
+	case 4: speed = " QDR"; break;
+	}
+
+	printk(KERN_ERR "width %d speed %d\n", attr.active_width, attr.active_speed);
+
+	rate = 25 * ib_width_enum_to_int(attr.active_width) * attr.active_speed;
+	if (rate < 0)
+		return -EINVAL;
+
+	return sprintf(buf, "%d%s Gb/sec (%dX%s)\n",
+		       rate / 10, rate % 10 ? ".5" : "",
+		       ib_width_enum_to_int(attr.active_width), speed);
+}
+
+static PORT_ATTR_RO(state);
+static PORT_ATTR_RO(lid);
+static PORT_ATTR_RO(lid_mask_count);
+static PORT_ATTR_RO(sm_lid);
+static PORT_ATTR_RO(sm_sl);
+static PORT_ATTR_RO(cap_mask);
+static PORT_ATTR_RO(rate);
+
+static struct attribute *port_default_attrs[] = {
+	&port_attr_state.attr,
+	&port_attr_lid.attr,
+	&port_attr_lid_mask_count.attr,
+	&port_attr_sm_lid.attr,
+	&port_attr_sm_sl.attr,
+	&port_attr_cap_mask.attr,
+	&port_attr_rate.attr,
+	NULL
+};
+
+static ssize_t show_port_gid(struct ib_port *p, struct port_attribute *attr,
+			     char *buf)
+{
+	struct port_table_attribute *tab_attr =
+		container_of(attr, struct port_table_attribute, attr);
+	union ib_gid gid;
+	ssize_t ret;
+
+	ret = ib_query_gid(p->ibdev, p->port_num, tab_attr->index, &gid);
+	if (ret)
+		return ret;
+
+	return sprintf(buf, "%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
+		       be16_to_cpu(((u16 *) gid.raw)[0]),
+		       be16_to_cpu(((u16 *) gid.raw)[1]),
+		       be16_to_cpu(((u16 *) gid.raw)[2]),
+		       be16_to_cpu(((u16 *) gid.raw)[3]),
+		       be16_to_cpu(((u16 *) gid.raw)[4]),
+		       be16_to_cpu(((u16 *) gid.raw)[5]),
+		       be16_to_cpu(((u16 *) gid.raw)[6]),
+		       be16_to_cpu(((u16 *) gid.raw)[7]));
+}
+
+static ssize_t show_port_pkey(struct ib_port *p, struct port_attribute *attr,
+			      char *buf)
+{
+	struct port_table_attribute *tab_attr =
+		container_of(attr, struct port_table_attribute, attr);
+	u16 pkey;
+	ssize_t ret;
+
+	ret = ib_query_pkey(p->ibdev, p->port_num, tab_attr->index, &pkey);
+	if (ret)
+		return ret;
+
+	return sprintf(buf, "0x%04x\n", pkey);
+}
+
+#define PORT_PMA_ATTR(_name, _counter, _width, _offset)			\
+struct port_table_attribute port_pma_attr_##_name = {			\
+	.attr  = __ATTR(_name, S_IRUGO, show_pma_counter, NULL),	\
+	.index = (_offset) | ((_width) << 16) | ((_counter) << 24)	\
+}
+
+static ssize_t show_pma_counter(struct ib_port *p, struct port_attribute *attr,
+				char *buf)
+{
+	struct port_table_attribute *tab_attr =
+		container_of(attr, struct port_table_attribute, attr);
+	int offset = tab_attr->index & 0xffff;
+	int width  = (tab_attr->index >> 16) & 0xff;
+	struct ib_mad *in_mad  = NULL;
+	struct ib_mad *out_mad = NULL;
+	ssize_t ret;
+
+	if (!p->ibdev->process_mad)
+		return sprintf(buf, "N/A (no PMA)\n");
+
+	in_mad  = kmalloc(sizeof *in_mad, GFP_KERNEL);
+	out_mad = kmalloc(sizeof *in_mad, GFP_KERNEL);
+	if (!in_mad || !out_mad) {
+		ret = -ENOMEM;
+		goto out;
+	}
+
+	memset(in_mad, 0, sizeof *in_mad);
+	in_mad->mad_hdr.base_version  = 1;
+	in_mad->mad_hdr.mgmt_class    = IB_MGMT_CLASS_PERF_MGMT;
+	in_mad->mad_hdr.class_version = 1;
+	in_mad->mad_hdr.method        = IB_MGMT_METHOD_GET;
+	in_mad->mad_hdr.attr_id       = cpu_to_be16(0x12); /* PortCounters */
+
+	in_mad->data[41] = p->port_num;	/* PortSelect field */
+
+	if ((p->ibdev->process_mad(p->ibdev, IB_MAD_IGNORE_MKEY, p->port_num, 0xffff,
+				   in_mad, out_mad) &
+	     (IB_MAD_RESULT_SUCCESS | IB_MAD_RESULT_REPLY)) !=
+	    (IB_MAD_RESULT_SUCCESS | IB_MAD_RESULT_REPLY)) {
+		ret = -EINVAL;
+		goto out;
+	}
+
+	switch (width) {
+	case 4:
+		ret = sprintf(buf, "%u\n", (out_mad->data[40 + offset / 8] >>
+					    (offset % 4)) & 0xf);
+		break;
+	case 8:
+		ret = sprintf(buf, "%u\n", out_mad->data[40 + offset / 8]);
+		break;
+	case 16:
+		ret = sprintf(buf, "%u\n",
+			      be16_to_cpup((u16 *)(out_mad->data + 40 + offset / 8)));
+		break;
+	case 32:
+		ret = sprintf(buf, "%u\n",
+			      be32_to_cpup((u32 *)(out_mad->data + 40 + offset / 8)));
+		break;
+	default:
+		ret = 0;
+	}
+
+out:
+	kfree(in_mad);
+	kfree(out_mad);
+
+	return ret;
+}
+
+static PORT_PMA_ATTR(symbol_error		    ,  0, 16,  32);
+static PORT_PMA_ATTR(link_error_recovery	    ,  1,  8,  48);
+static PORT_PMA_ATTR(link_downed		    ,  2,  8,  56);
+static PORT_PMA_ATTR(port_rcv_errors		    ,  3, 16,  64);
+static PORT_PMA_ATTR(port_rcv_remote_physical_errors,  4, 16,  80);
+static PORT_PMA_ATTR(port_rcv_switch_relay_errors   ,  5, 16,  96);
+static PORT_PMA_ATTR(port_xmit_discards		    ,  6, 16, 112);
+static PORT_PMA_ATTR(port_xmit_constraint_errors    ,  7,  8, 128);
+static PORT_PMA_ATTR(port_rcv_constraint_errors	    ,  8,  8, 136);
+static PORT_PMA_ATTR(local_link_integrity_errors    ,  9,  4, 152);
+static PORT_PMA_ATTR(excessive_buffer_overrun_errors, 10,  4, 156);
+static PORT_PMA_ATTR(VL15_dropped		    , 11, 16, 176);
+static PORT_PMA_ATTR(port_xmit_data		    , 12, 32, 192);
+static PORT_PMA_ATTR(port_rcv_data		    , 13, 32, 224);
+static PORT_PMA_ATTR(port_xmit_packets		    , 14, 32, 256);
+static PORT_PMA_ATTR(port_rcv_packets		    , 15, 32, 288);
+
+static struct attribute *pma_attrs[] = {
+	&port_pma_attr_symbol_error.attr.attr,
+	&port_pma_attr_link_error_recovery.attr.attr,
+	&port_pma_attr_link_downed.attr.attr,
+	&port_pma_attr_port_rcv_errors.attr.attr,
+	&port_pma_attr_port_rcv_remote_physical_errors.attr.attr,
+	&port_pma_attr_port_rcv_switch_relay_errors.attr.attr,
+	&port_pma_attr_port_xmit_discards.attr.attr,
+	&port_pma_attr_port_xmit_constraint_errors.attr.attr,
+	&port_pma_attr_port_rcv_constraint_errors.attr.attr,
+	&port_pma_attr_local_link_integrity_errors.attr.attr,
+	&port_pma_attr_excessive_buffer_overrun_errors.attr.attr,
+	&port_pma_attr_VL15_dropped.attr.attr,
+	&port_pma_attr_port_xmit_data.attr.attr,
+	&port_pma_attr_port_rcv_data.attr.attr,
+	&port_pma_attr_port_xmit_packets.attr.attr,
+	&port_pma_attr_port_rcv_packets.attr.attr,
+	NULL
+};
+
+static struct attribute_group pma_group = {
+	.name  = "counters",
+	.attrs  = pma_attrs
+};
+
+static void ib_port_release(struct kobject *kobj)
+{
+	struct ib_port *p = container_of(kobj, struct ib_port, kobj);
+	struct attribute *a;
+	int i;
+
+	for (i = 0; (a = p->gid_attr[i]); ++i) {
+		kfree(a->name);
+		kfree(a);
+	}
+
+	for (i = 0; (a = p->pkey_attr[i]); ++i) {
+		kfree(a->name);
+		kfree(a);
+	}
+
+	kfree(p->gid_attr);
+	kfree(p);
+}
+
+static struct kobj_type port_type = {
+	.release       = ib_port_release,
+	.sysfs_ops     = &port_sysfs_ops,
+	.default_attrs = port_default_attrs
+};
+
+static void ib_device_release(struct class_device *cdev)
+{
+	struct ib_device *dev = container_of(cdev, struct ib_device, class_dev);
+
+	kfree(dev);
+}
+
+static int ib_device_hotplug(struct class_device *cdev, char **envp,
+			     int num_envp, char *buf, int size)
+{
+	struct ib_device *dev = container_of(cdev, struct ib_device, class_dev);
+	int i = 0, len = 0;
+
+	if (add_hotplug_env_var(envp, num_envp, &i, buf, size, &len,
+				"NAME=%s", dev->name))
+		return -ENOMEM;
+
+	/*
+	 * It might be nice to pass the node GUID to hotplug, but
+	 * right now the only way to get it is to query the device
+	 * provider, and this can crash during device removal because
+	 * we are will be running after driver removal has started.
+	 * We could add a node_guid field to struct ib_device, or we
+	 * could just let the hotplug script read the node GUID from
+	 * sysfs when devices are added.
+	 */
+
+	envp[i] = NULL;
+	return 0;
+}
+
+static int alloc_group(struct attribute ***attr,
+		       ssize_t (*show)(struct ib_port *,
+				       struct port_attribute *, char *buf),
+		       int len)
+{
+	struct port_table_attribute ***tab_attr =
+		(struct port_table_attribute ***) attr;
+	int i;
+	int ret;
+
+	*tab_attr = kmalloc((1 + len) * sizeof *tab_attr, GFP_KERNEL);
+	if (!*tab_attr)
+		return -ENOMEM;
+
+	memset(*tab_attr, 0, (1 + len) * sizeof *tab_attr);
+
+	for (i = 0; i < len; ++i) {
+		(*tab_attr)[i] = kmalloc(sizeof *(*tab_attr)[i], GFP_KERNEL);
+		if (!(*tab_attr)[i]) {
+			ret = -ENOMEM;
+			goto err;
+		}
+		memset((*tab_attr)[i], 0, sizeof *(*tab_attr)[i]);
+		(*tab_attr)[i]->attr.attr.name = kmalloc(8, GFP_KERNEL);
+		if (!(*tab_attr)[i]->attr.attr.name) {
+			ret = -ENOMEM;
+			goto err;
+		}
+
+		if (snprintf((*tab_attr)[i]->attr.attr.name, 8, "%d", i) >= 8) {
+			ret = -ENOMEM;
+			goto err;
+		}
+
+		(*tab_attr)[i]->attr.attr.mode  = S_IRUGO;
+		(*tab_attr)[i]->attr.attr.owner = THIS_MODULE;
+		(*tab_attr)[i]->attr.show       = show;
+		(*tab_attr)[i]->index           = i;
+	}
+
+	return 0;
+
+err:
+	for (i = 0; i < len; ++i) {
+		if ((*tab_attr)[i])
+			kfree((*tab_attr)[i]->attr.attr.name);
+		kfree((*tab_attr)[i]);
+	}
+
+	kfree(*tab_attr);
+
+	return ret;
+}
+
+static int add_port(struct ib_device *device, int port_num)
+{
+	struct ib_port *p;
+	struct ib_port_attr attr;
+	int i;
+	int ret;
+
+	ret = ib_query_port(device, port_num, &attr);
+	if (ret)
+		return ret;
+
+	p = kmalloc(sizeof *p, GFP_KERNEL);
+	if (!p)
+		return -ENOMEM;
+	memset(p, 0, sizeof *p);
+
+	p->ibdev      = device;
+	p->port_num   = port_num;
+	p->kobj.ktype = &port_type;
+
+	p->kobj.parent = kobject_get(&device->ports_parent);
+	if (!p->kobj.parent) {
+		ret = -EBUSY;
+		goto err;
+	}
+
+	ret = kobject_set_name(&p->kobj, "%d", port_num);
+	if (ret)
+		goto err_put;
+
+	ret = kobject_register(&p->kobj);
+	if (ret)
+		goto err_put;
+
+	ret = sysfs_create_group(&p->kobj, &pma_group);
+	if (ret)
+		goto err_put;
+
+	ret = alloc_group(&p->gid_attr, show_port_gid, attr.gid_tbl_len);
+	if (ret)
+		goto err_remove_pma;
+
+	p->gid_group.name  = "gids";
+	p->gid_group.attrs = p->gid_attr;
+
+	ret = sysfs_create_group(&p->kobj, &p->gid_group);
+	if (ret)
+		goto err_free_gid;
+
+	ret = alloc_group(&p->pkey_attr, show_port_pkey, attr.pkey_tbl_len);
+	if (ret)
+		goto err_remove_gid;
+
+	p->pkey_group.name  = "pkeys";
+	p->pkey_group.attrs = p->pkey_attr;
+
+	ret = sysfs_create_group(&p->kobj, &p->pkey_group);
+	if (ret)
+		goto err_free_pkey;
+
+	list_add_tail(&p->kobj.entry, &device->port_list);
+
+	return 0;
+
+err_free_pkey:
+	for (i = 0; i < attr.pkey_tbl_len; ++i) {
+		kfree(p->pkey_attr[i]->name);
+		kfree(p->pkey_attr[i]);
+	}
+
+	kfree(p->pkey_attr);
+
+err_remove_gid:
+	sysfs_remove_group(&p->kobj, &p->gid_group);
+
+err_free_gid:
+	for (i = 0; i < attr.gid_tbl_len; ++i) {
+		kfree(p->gid_attr[i]->name);
+		kfree(p->gid_attr[i]);
+	}
+
+	kfree(p->gid_attr);
+
+err_remove_pma:
+	sysfs_remove_group(&p->kobj, &pma_group);
+
+err_put:
+	kobject_put(&device->ports_parent);
+
+err:
+	kfree(p);
+	return ret;
+}
+
+static ssize_t show_sys_image_guid(struct class_device *cdev, char *buf)
+{
+	struct ib_device *dev = container_of(cdev, struct ib_device, class_dev);
+	struct ib_device_attr attr;
+	ssize_t ret;
+
+	ret = ib_query_device(dev, &attr);
+	if (ret)
+		return ret;
+
+	return sprintf(buf, "%04x:%04x:%04x:%04x\n",
+		       be16_to_cpu(((u16 *) &attr.sys_image_guid)[0]),
+		       be16_to_cpu(((u16 *) &attr.sys_image_guid)[1]),
+		       be16_to_cpu(((u16 *) &attr.sys_image_guid)[2]),
+		       be16_to_cpu(((u16 *) &attr.sys_image_guid)[3]));
+}
+
+static ssize_t show_node_guid(struct class_device *cdev, char *buf)
+{
+	struct ib_device *dev = container_of(cdev, struct ib_device, class_dev);
+	struct ib_device_attr attr;
+	ssize_t ret;
+
+	ret = ib_query_device(dev, &attr);
+	if (ret)
+		return ret;
+
+	return sprintf(buf, "%04x:%04x:%04x:%04x\n",
+		       be16_to_cpu(((u16 *) &attr.node_guid)[0]),
+		       be16_to_cpu(((u16 *) &attr.node_guid)[1]),
+		       be16_to_cpu(((u16 *) &attr.node_guid)[2]),
+		       be16_to_cpu(((u16 *) &attr.node_guid)[3]));
+}
+
+static CLASS_DEVICE_ATTR(sys_image_guid, S_IRUGO, show_sys_image_guid, NULL);
+static CLASS_DEVICE_ATTR(node_guid, S_IRUGO, show_node_guid, NULL);
+
+static struct class_device_attribute *ib_class_attributes[] = {
+	&class_device_attr_sys_image_guid,
+	&class_device_attr_node_guid
+};
+
+static struct class ib_class = {
+	.name    = "infiniband",
+	.release = ib_device_release,
+	.hotplug = ib_device_hotplug,
+};
+
+int ib_device_register_sysfs(struct ib_device *device)
+{
+	struct class_device *class_dev = &device->class_dev;
+	int ret;
+	int i;
+
+	class_dev->class      = &ib_class;
+	class_dev->class_data = device;
+	strlcpy(class_dev->class_id, device->name, BUS_ID_SIZE);
+
+	INIT_LIST_HEAD(&device->port_list);
+
+	ret = class_device_register(class_dev);
+	if (ret)
+		goto err;
+
+	for (i = 0; i < ARRAY_SIZE(ib_class_attributes); ++i) {
+		ret = class_device_create_file(class_dev, ib_class_attributes[i]);
+		if (ret)
+			goto err_unregister;
+	}
+
+	device->ports_parent.parent = kobject_get(&class_dev->kobj);
+	if (!device->ports_parent.parent) {
+		ret = -EBUSY;
+		goto err_unregister;
+	}
+	ret = kobject_set_name(&device->ports_parent, "ports");
+	if (ret)
+		goto err_put;
+	ret = kobject_register(&device->ports_parent);
+	if (ret)
+		goto err_put;
+
+	if (device->node_type == IB_NODE_SWITCH) {
+		ret = add_port(device, 0);
+		if (ret)
+			goto err_put;
+	} else {
+		int i;
+
+		for (i = 1; i <= device->phys_port_cnt; ++i) {
+			ret = add_port(device, i);
+			if (ret)
+				goto err_put;
+		}
+	}
+
+	return 0;
+
+err_put:
+	{
+		struct kobject *p, *t;
+		struct ib_port *port;
+
+		list_for_each_entry_safe(p, t, &device->port_list, entry) {
+			list_del(&p->entry);
+			port = container_of(p, struct ib_port, kobj);
+			sysfs_remove_group(p, &pma_group);
+			sysfs_remove_group(p, &port->pkey_group);
+			sysfs_remove_group(p, &port->gid_group);
+			kobject_unregister(p);
+		}
+	}
+
+	kobject_put(&class_dev->kobj);
+
+err_unregister:
+	class_device_unregister(class_dev);
+
+err:
+	return ret;
+}
+
+void ib_device_unregister_sysfs(struct ib_device *device)
+{
+	struct kobject *p, *t;
+	struct ib_port *port;
+
+	list_for_each_entry_safe(p, t, &device->port_list, entry) {
+		list_del(&p->entry);
+		port = container_of(p, struct ib_port, kobj);
+		sysfs_remove_group(p, &pma_group);
+		sysfs_remove_group(p, &port->pkey_group);
+		sysfs_remove_group(p, &port->gid_group);
+		kobject_unregister(p);
+	}
+
+	kobject_unregister(&device->ports_parent);
+	class_device_unregister(&device->class_dev);
+}
+
+int ib_sysfs_setup(void)
+{
+	return class_register(&ib_class);
+}
+
+void ib_sysfs_cleanup(void)
+{
+	class_unregister(&ib_class);
+}
diff -Nru a/drivers/infiniband/core/ud_header.c b/drivers/infiniband/core/ud_header.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/core/ud_header.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,365 @@
+/*
+ * Copyright (c) 2004 Topspin Corporation.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: ud_header.c 1349 2004-12-16 21:09:43Z roland $
+ */
+
+#include <linux/errno.h>
+
+#include <ib_pack.h>
+
+#define STRUCT_FIELD(header, field) \
+	.struct_offset_bytes = offsetof(struct ib_unpacked_ ## header, field),      \
+	.struct_size_bytes   = sizeof ((struct ib_unpacked_ ## header *) 0)->field, \
+	.field_name          = #header ":" #field
+
+static const struct ib_field lrh_table[]  = {
+	{ STRUCT_FIELD(lrh, virtual_lane),
+	  .offset_words = 0,
+	  .offset_bits  = 0,
+	  .size_bits    = 4 },
+	{ STRUCT_FIELD(lrh, link_version),
+	  .offset_words = 0,
+	  .offset_bits  = 4,
+	  .size_bits    = 4 },
+	{ STRUCT_FIELD(lrh, service_level),
+	  .offset_words = 0,
+	  .offset_bits  = 8,
+	  .size_bits    = 4 },
+	{ RESERVED,
+	  .offset_words = 0,
+	  .offset_bits  = 12,
+	  .size_bits    = 2 },
+	{ STRUCT_FIELD(lrh, link_next_header),
+	  .offset_words = 0,
+	  .offset_bits  = 14,
+	  .size_bits    = 2 },
+	{ STRUCT_FIELD(lrh, destination_lid),
+	  .offset_words = 0,
+	  .offset_bits  = 16,
+	  .size_bits    = 16 },
+	{ RESERVED,
+	  .offset_words = 1,
+	  .offset_bits  = 0,
+	  .size_bits    = 5 },
+	{ STRUCT_FIELD(lrh, packet_length),
+	  .offset_words = 1,
+	  .offset_bits  = 5,
+	  .size_bits    = 11 },
+	{ STRUCT_FIELD(lrh, source_lid),
+	  .offset_words = 1,
+	  .offset_bits  = 16,
+	  .size_bits    = 16 }
+};
+
+static const struct ib_field grh_table[]  = {
+	{ STRUCT_FIELD(grh, ip_version),
+	  .offset_words = 0,
+	  .offset_bits  = 0,
+	  .size_bits    = 4 },
+	{ STRUCT_FIELD(grh, traffic_class),
+	  .offset_words = 0,
+	  .offset_bits  = 4,
+	  .size_bits    = 8 },
+	{ STRUCT_FIELD(grh, flow_label),
+	  .offset_words = 0,
+	  .offset_bits  = 12,
+	  .size_bits    = 20 },
+	{ STRUCT_FIELD(grh, payload_length),
+	  .offset_words = 1,
+	  .offset_bits  = 0,
+	  .size_bits    = 16 },
+	{ STRUCT_FIELD(grh, next_header),
+	  .offset_words = 1,
+	  .offset_bits  = 16,
+	  .size_bits    = 8 },
+	{ STRUCT_FIELD(grh, hop_limit),
+	  .offset_words = 1,
+	  .offset_bits  = 24,
+	  .size_bits    = 8 },
+	{ STRUCT_FIELD(grh, source_gid),
+	  .offset_words = 2,
+	  .offset_bits  = 0,
+	  .size_bits    = 128 },
+	{ STRUCT_FIELD(grh, destination_gid),
+	  .offset_words = 6,
+	  .offset_bits  = 0,
+	  .size_bits    = 128 }
+};
+
+static const struct ib_field bth_table[]  = {
+	{ STRUCT_FIELD(bth, opcode),
+	  .offset_words = 0,
+	  .offset_bits  = 0,
+	  .size_bits    = 8 },
+	{ STRUCT_FIELD(bth, solicited_event),
+	  .offset_words = 0,
+	  .offset_bits  = 8,
+	  .size_bits    = 1 },
+	{ STRUCT_FIELD(bth, mig_req),
+	  .offset_words = 0,
+	  .offset_bits  = 9,
+	  .size_bits    = 1 },
+	{ STRUCT_FIELD(bth, pad_count),
+	  .offset_words = 0,
+	  .offset_bits  = 10,
+	  .size_bits    = 2 },
+	{ STRUCT_FIELD(bth, transport_header_version),
+	  .offset_words = 0,
+	  .offset_bits  = 12,
+	  .size_bits    = 4 },
+	{ STRUCT_FIELD(bth, pkey),
+	  .offset_words = 0,
+	  .offset_bits  = 16,
+	  .size_bits    = 16 },
+	{ RESERVED,
+	  .offset_words = 1,
+	  .offset_bits  = 0,
+	  .size_bits    = 8 },
+	{ STRUCT_FIELD(bth, destination_qpn),
+	  .offset_words = 1,
+	  .offset_bits  = 8,
+	  .size_bits    = 24 },
+	{ STRUCT_FIELD(bth, ack_req),
+	  .offset_words = 2,
+	  .offset_bits  = 0,
+	  .size_bits    = 1 },
+	{ RESERVED,
+	  .offset_words = 2,
+	  .offset_bits  = 1,
+	  .size_bits    = 7 },
+	{ STRUCT_FIELD(bth, psn),
+	  .offset_words = 2,
+	  .offset_bits  = 8,
+	  .size_bits    = 24 }
+};
+
+static const struct ib_field deth_table[] = {
+	{ STRUCT_FIELD(deth, qkey),
+	  .offset_words = 0,
+	  .offset_bits  = 0,
+	  .size_bits    = 32 },
+	{ RESERVED,
+	  .offset_words = 1,
+	  .offset_bits  = 0,
+	  .size_bits    = 8 },
+	{ STRUCT_FIELD(deth, source_qpn),
+	  .offset_words = 1,
+	  .offset_bits  = 8,
+	  .size_bits    = 24 }
+};
+
+/**
+ * ib_ud_header_init - Initialize UD header structure
+ * @payload_bytes:Length of packet payload
+ * @grh_present:GRH flag (if non-zero, GRH will be included)
+ * @header:Structure to initialize
+ *
+ * ib_ud_header_init() initializes the lrh.link_version, lrh.link_next_header,
+ * lrh.packet_length, grh.ip_version, grh.payload_length,
+ * grh.next_header, bth.opcode, bth.pad_count and
+ * bth.transport_header_version fields of a &struct ib_ud_header given
+ * the payload length and whether a GRH will be included.
+ */
+void ib_ud_header_init(int     		    payload_bytes,
+		       int    		    grh_present,
+		       struct ib_ud_header *header)
+{
+	int header_len;
+
+	memset(header, 0, sizeof *header);
+
+	header_len =
+		IB_LRH_BYTES  +
+		IB_BTH_BYTES  +
+		IB_DETH_BYTES;
+	if (grh_present) {
+		header_len += IB_GRH_BYTES;
+	}
+
+	header->lrh.link_version     = 0;
+	header->lrh.link_next_header =
+		grh_present ? IB_LNH_IBA_GLOBAL : IB_LNH_IBA_LOCAL;
+	header->lrh.packet_length    = (IB_LRH_BYTES     +
+					IB_BTH_BYTES     +
+					IB_DETH_BYTES    +
+					payload_bytes    +
+					4                + /* ICRC     */
+					3) / 4;            /* round up */
+
+	header->grh_present          = grh_present;
+	if (grh_present) {
+		header->lrh.packet_length  += IB_GRH_BYTES / 4;
+
+		header->grh.ip_version      = 6;
+		header->grh.payload_length  =
+			cpu_to_be16((IB_BTH_BYTES     +
+				     IB_DETH_BYTES    +
+				     payload_bytes    +
+				     4                + /* ICRC     */
+				     3) & ~3);          /* round up */
+		header->grh.next_header     = 0x1b;
+	}
+
+	cpu_to_be16s(&header->lrh.packet_length);
+
+	if (header->immediate_present)
+		header->bth.opcode           = IB_OPCODE_UD_SEND_ONLY_WITH_IMMEDIATE;
+	else
+		header->bth.opcode           = IB_OPCODE_UD_SEND_ONLY;
+	header->bth.pad_count                = (4 - payload_bytes) & 3;
+	header->bth.transport_header_version = 0;
+}
+EXPORT_SYMBOL(ib_ud_header_init);
+
+/**
+ * ib_ud_header_pack - Pack UD header struct into wire format
+ * @header:UD header struct
+ * @buf:Buffer to pack into
+ *
+ * ib_ud_header_pack() packs the UD header structure @header into wire
+ * format in the buffer @buf.
+ */
+int ib_ud_header_pack(struct ib_ud_header *header,
+		      void                *buf)
+{
+	int len = 0;
+
+	ib_pack(lrh_table, ARRAY_SIZE(lrh_table),
+		&header->lrh, buf);
+	len += IB_LRH_BYTES;
+
+	if (header->grh_present) {
+		ib_pack(grh_table, ARRAY_SIZE(grh_table),
+			&header->grh, buf + len);
+		len += IB_GRH_BYTES;
+	}
+
+	ib_pack(bth_table, ARRAY_SIZE(bth_table),
+		&header->bth, buf + len);
+	len += IB_BTH_BYTES;
+
+	ib_pack(deth_table, ARRAY_SIZE(deth_table),
+		&header->deth, buf + len);
+	len += IB_DETH_BYTES;
+
+	if (header->immediate_present) {
+		memcpy(buf + len, &header->immediate_data, sizeof header->immediate_data);
+		len += sizeof header->immediate_data;
+	}
+
+	return len;
+}
+EXPORT_SYMBOL(ib_ud_header_pack);
+
+/**
+ * ib_ud_header_unpack - Unpack UD header struct from wire format
+ * @header:UD header struct
+ * @buf:Buffer to pack into
+ *
+ * ib_ud_header_pack() unpacks the UD header structure @header from wire
+ * format in the buffer @buf.
+ */
+int ib_ud_header_unpack(void                *buf,
+			struct ib_ud_header *header)
+{
+	ib_unpack(lrh_table, ARRAY_SIZE(lrh_table),
+		  buf, &header->lrh);
+	buf += IB_LRH_BYTES;
+
+	if (header->lrh.link_version != 0) {
+		printk(KERN_WARNING "Invalid LRH.link_version %d\n",
+		       header->lrh.link_version);
+		return -EINVAL;
+	}
+
+	switch (header->lrh.link_next_header) {
+	case IB_LNH_IBA_LOCAL:
+		header->grh_present = 0;
+		break;
+
+	case IB_LNH_IBA_GLOBAL:
+		header->grh_present = 1;
+		ib_unpack(grh_table, ARRAY_SIZE(grh_table),
+			  buf, &header->grh);
+		buf += IB_GRH_BYTES;
+
+		if (header->grh.ip_version != 6) {
+			printk(KERN_WARNING "Invalid GRH.ip_version %d\n",
+			       header->grh.ip_version);
+			return -EINVAL;
+		}
+		if (header->grh.next_header != 0x1b) {
+			printk(KERN_WARNING "Invalid GRH.next_header 0x%02x\n",
+			       header->grh.next_header);
+			return -EINVAL;
+		}
+		break;
+
+	default:
+		printk(KERN_WARNING "Invalid LRH.link_next_header %d\n",
+		       header->lrh.link_next_header);
+		return -EINVAL;
+	}
+
+	ib_unpack(bth_table, ARRAY_SIZE(bth_table),
+		  buf, &header->bth);
+	buf += IB_BTH_BYTES;
+
+	switch (header->bth.opcode) {
+	case IB_OPCODE_UD_SEND_ONLY:
+		header->immediate_present = 0;
+		break;
+	case IB_OPCODE_UD_SEND_ONLY_WITH_IMMEDIATE:
+		header->immediate_present = 1;
+		break;
+	default:
+		printk(KERN_WARNING "Invalid BTH.opcode 0x%02x\n",
+		       header->bth.opcode);
+		return -EINVAL;
+	}
+
+	if (header->bth.transport_header_version != 0) {
+		printk(KERN_WARNING "Invalid BTH.transport_header_version %d\n",
+		       header->bth.transport_header_version);
+		return -EINVAL;
+	}
+
+	ib_unpack(deth_table, ARRAY_SIZE(deth_table),
+		  buf, &header->deth);
+	buf += IB_DETH_BYTES;
+
+	if (header->immediate_present)
+		memcpy(&header->immediate_data, buf, sizeof header->immediate_data);
+
+	return 0;
+}
+EXPORT_SYMBOL(ib_ud_header_unpack);
diff -Nru a/drivers/infiniband/core/user_mad.c b/drivers/infiniband/core/user_mad.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/core/user_mad.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,738 @@
+/*
+ * Copyright (c) 2004 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: user_mad.c 1389 2004-12-27 22:56:47Z roland $
+ */
+
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/device.h>
+#include <linux/err.h>
+#include <linux/fs.h>
+#include <linux/cdev.h>
+#include <linux/pci.h>
+#include <linux/dma-mapping.h>
+#include <linux/poll.h>
+#include <linux/rwsem.h>
+#include <linux/kref.h>
+#include <linux/ioctl32.h>
+
+#include <asm/uaccess.h>
+
+#include <ib_mad.h>
+#include <ib_user_mad.h>
+
+MODULE_AUTHOR("Roland Dreier");
+MODULE_DESCRIPTION("InfiniBand userspace MAD packet access");
+MODULE_LICENSE("Dual BSD/GPL");
+
+enum {
+	IB_UMAD_MAX_PORTS  = 256,
+	IB_UMAD_MAX_AGENTS = 32
+};
+
+struct ib_umad_port {
+	int                    devnum;
+	struct cdev            dev;
+	struct class_device    class_dev;
+	struct ib_device      *ib_dev;
+	struct ib_umad_device *umad_dev;
+	u8                     port_num;
+};
+
+struct ib_umad_device {
+	int                  start_port, end_port;
+	struct kref          ref;
+	struct ib_umad_port  port[0];
+};
+
+struct ib_umad_file {
+	struct ib_umad_port *port;
+	spinlock_t           recv_lock;
+	struct list_head     recv_list;
+	wait_queue_head_t    recv_wait;
+	struct rw_semaphore  agent_mutex;
+	struct ib_mad_agent *agent[IB_UMAD_MAX_AGENTS];
+	struct ib_mr        *mr[IB_UMAD_MAX_AGENTS];
+};
+
+struct ib_umad_packet {
+	struct ib_user_mad mad;
+	struct ib_ah      *ah;
+	struct list_head   list;
+	DECLARE_PCI_UNMAP_ADDR(mapping)
+};
+
+static dev_t base_dev;
+static spinlock_t map_lock;
+static DECLARE_BITMAP(dev_map, IB_UMAD_MAX_PORTS);
+
+static void ib_umad_add_one(struct ib_device *device);
+static void ib_umad_remove_one(struct ib_device *device);
+
+static int queue_packet(struct ib_umad_file *file,
+			struct ib_mad_agent *agent,
+			struct ib_umad_packet *packet)
+{
+	int ret = 1;
+
+	down_read(&file->agent_mutex);
+	for (packet->mad.id = 0;
+	     packet->mad.id < IB_UMAD_MAX_AGENTS;
+	     packet->mad.id++)
+		if (agent == file->agent[packet->mad.id]) {
+			spin_lock_irq(&file->recv_lock);
+			list_add_tail(&packet->list, &file->recv_list);
+			spin_unlock_irq(&file->recv_lock);
+			wake_up_interruptible(&file->recv_wait);
+			ret = 0;
+			break;
+		}
+
+	up_read(&file->agent_mutex);
+
+	return ret;
+}
+
+static void send_handler(struct ib_mad_agent *agent,
+			 struct ib_mad_send_wc *send_wc)
+{
+	struct ib_umad_file *file = agent->context;
+	struct ib_umad_packet *packet =
+		(void *) (unsigned long) send_wc->wr_id;
+
+	dma_unmap_single(agent->device->dma_device,
+			 pci_unmap_addr(packet, mapping),
+			 sizeof packet->mad.data,
+			 DMA_TO_DEVICE);
+	ib_destroy_ah(packet->ah);
+
+	if (send_wc->status == IB_WC_RESP_TIMEOUT_ERR) {
+		packet->mad.status = ETIMEDOUT;
+
+		if (!queue_packet(file, agent, packet))
+			return;
+	}
+
+	kfree(packet);
+}
+
+static void recv_handler(struct ib_mad_agent *agent,
+			 struct ib_mad_recv_wc *mad_recv_wc)
+{
+	struct ib_umad_file *file = agent->context;
+	struct ib_umad_packet *packet;
+
+	if (mad_recv_wc->wc->status != IB_WC_SUCCESS)
+		goto out;
+
+	packet = kmalloc(sizeof *packet, GFP_KERNEL);
+	if (!packet)
+		goto out;
+
+	memset(packet, 0, sizeof *packet);
+
+	memcpy(packet->mad.data, mad_recv_wc->recv_buf.mad, sizeof packet->mad.data);
+	packet->mad.status        = 0;
+	packet->mad.qpn 	  = cpu_to_be32(mad_recv_wc->wc->src_qp);
+	packet->mad.lid 	  = cpu_to_be16(mad_recv_wc->wc->slid);
+	packet->mad.sl  	  = mad_recv_wc->wc->sl;
+	packet->mad.path_bits 	  = mad_recv_wc->wc->dlid_path_bits;
+	packet->mad.grh_present   = !!(mad_recv_wc->wc->wc_flags & IB_WC_GRH);
+	if (packet->mad.grh_present) {
+		/* XXX parse GRH */
+		packet->mad.gid_index 	  = 0;
+		packet->mad.hop_limit 	  = 0;
+		packet->mad.traffic_class = 0;
+		memset(packet->mad.gid, 0, 16);
+		packet->mad.flow_label 	  = 0;
+	}
+
+	if (queue_packet(file, agent, packet))
+		kfree(packet);
+
+out:
+	ib_free_recv_mad(mad_recv_wc);
+}
+
+static ssize_t ib_umad_read(struct file *filp, char __user *buf,
+			    size_t count, loff_t *pos)
+{
+	struct ib_umad_file *file = filp->private_data;
+	struct ib_umad_packet *packet;
+	ssize_t ret;
+
+	if (count < sizeof (struct ib_user_mad))
+		return -EINVAL;
+
+	spin_lock_irq(&file->recv_lock);
+
+	while (list_empty(&file->recv_list)) {
+		spin_unlock_irq(&file->recv_lock);
+
+		if (filp->f_flags & O_NONBLOCK)
+			return -EAGAIN;
+
+		if (wait_event_interruptible(file->recv_wait,
+					     !list_empty(&file->recv_list)))
+			return -ERESTARTSYS;
+
+		spin_lock_irq(&file->recv_lock);
+	}
+
+	packet = list_entry(file->recv_list.next, struct ib_umad_packet, list);
+	list_del(&packet->list);
+
+	spin_unlock_irq(&file->recv_lock);
+
+	if (copy_to_user(buf, &packet->mad, sizeof packet->mad))
+		ret = -EFAULT;
+	else
+		ret = sizeof packet->mad;
+
+	kfree(packet);
+	return ret;
+}
+
+static ssize_t ib_umad_write(struct file *filp, const char __user *buf,
+			     size_t count, loff_t *pos)
+{
+	struct ib_umad_file *file = filp->private_data;
+	struct ib_umad_packet *packet;
+	struct ib_mad_agent *agent;
+	struct ib_ah_attr ah_attr;
+	struct ib_sge      gather_list;
+	struct ib_send_wr *bad_wr, wr = {
+		.opcode      = IB_WR_SEND,
+		.sg_list     = &gather_list,
+		.num_sge     = 1,
+		.send_flags  = IB_SEND_SIGNALED,
+	};
+	u8 method;
+	u64 *tid;
+	int ret;
+
+	if (count < sizeof (struct ib_user_mad))
+		return -EINVAL;
+
+	packet = kmalloc(sizeof *packet, GFP_KERNEL);
+	if (!packet)
+		return -ENOMEM;
+
+	if (copy_from_user(&packet->mad, buf, sizeof packet->mad)) {
+		kfree(packet);
+		return -EFAULT;
+	}
+
+	if (packet->mad.id < 0 || packet->mad.id >= IB_UMAD_MAX_AGENTS) {
+		ret = -EINVAL;
+		goto err;
+	}
+
+	down_read(&file->agent_mutex);
+
+	agent = file->agent[packet->mad.id];
+	if (!agent) {
+		ret = -EINVAL;
+		goto err_up;
+	}
+
+	/*
+	 * If userspace is generating a request that will generate a
+	 * response, we need to make sure the high-order part of the
+	 * transaction ID matches the agent being used to send the
+	 * MAD.
+	 */
+	method = ((struct ib_mad_hdr *) packet->mad.data)->method;
+
+	if (!(method & IB_MGMT_METHOD_RESP)       &&
+	    method != IB_MGMT_METHOD_TRAP_REPRESS &&
+	    method != IB_MGMT_METHOD_SEND) {
+		tid = &((struct ib_mad_hdr *) packet->mad.data)->tid;
+		*tid = cpu_to_be64(((u64) agent->hi_tid) << 32 |
+				   (be64_to_cpup(tid) & 0xffffffff));
+	}
+
+	memset(&ah_attr, 0, sizeof ah_attr);
+	ah_attr.dlid          = be16_to_cpu(packet->mad.lid);
+	ah_attr.sl            = packet->mad.sl;
+	ah_attr.src_path_bits = packet->mad.path_bits;
+	ah_attr.port_num      = file->port->port_num;
+	if (packet->mad.grh_present) {
+		ah_attr.ah_flags = IB_AH_GRH;
+		memcpy(ah_attr.grh.dgid.raw, packet->mad.gid, 16);
+		ah_attr.grh.flow_label 	   = packet->mad.flow_label;
+		ah_attr.grh.hop_limit  	   = packet->mad.hop_limit;
+		ah_attr.grh.traffic_class  = packet->mad.traffic_class;
+	}
+
+	packet->ah = ib_create_ah(agent->qp->pd, &ah_attr);
+	if (IS_ERR(packet->ah)) {
+		ret = PTR_ERR(packet->ah);
+		goto err_up;
+	}
+
+	gather_list.addr = dma_map_single(agent->device->dma_device,
+					  packet->mad.data,
+					  sizeof packet->mad.data,
+					  DMA_TO_DEVICE);
+	gather_list.length = sizeof packet->mad.data;
+	gather_list.lkey   = file->mr[packet->mad.id]->lkey;
+	pci_unmap_addr_set(packet, mapping, gather_list.addr);
+
+	wr.wr.ud.mad_hdr     = (struct ib_mad_hdr *) packet->mad.data;
+	wr.wr.ud.ah          = packet->ah;
+	wr.wr.ud.remote_qpn  = be32_to_cpu(packet->mad.qpn);
+	wr.wr.ud.remote_qkey = be32_to_cpu(packet->mad.qkey);
+	wr.wr.ud.timeout_ms  = packet->mad.timeout_ms;
+
+	wr.wr_id            = (unsigned long) packet;
+
+	ret = ib_post_send_mad(agent, &wr, &bad_wr);
+	if (ret) {
+		dma_unmap_single(agent->device->dma_device,
+				 pci_unmap_addr(packet, mapping),
+				 sizeof packet->mad.data,
+				 DMA_TO_DEVICE);
+		goto err_up;
+	}
+
+	up_read(&file->agent_mutex);
+
+	return sizeof packet->mad;
+
+err_up:
+	up_read(&file->agent_mutex);
+
+err:
+	kfree(packet);
+	return ret;
+}
+
+static unsigned int ib_umad_poll(struct file *filp, struct poll_table_struct *wait)
+{
+	struct ib_umad_file *file = filp->private_data;
+
+	/* we will always be able to post a MAD send */
+	unsigned int mask = POLLOUT | POLLWRNORM;
+
+	poll_wait(filp, &file->recv_wait, wait);
+
+	if (!list_empty(&file->recv_list))
+		mask |= POLLIN | POLLRDNORM;
+
+	return mask;
+}
+
+static int ib_umad_reg_agent(struct ib_umad_file *file, unsigned long arg)
+{
+	struct ib_user_mad_reg_req ureq;
+	struct ib_mad_reg_req req;
+	struct ib_mad_agent *agent;
+	int agent_id;
+	int ret;
+
+	down_write(&file->agent_mutex);
+
+	if (copy_from_user(&ureq, (void __user *) arg, sizeof ureq)) {
+		ret = -EFAULT;
+		goto out;
+	}
+
+	if (ureq.qpn != 0 && ureq.qpn != 1) {
+		ret = -EINVAL;
+		goto out;
+	}
+
+	for (agent_id = 0; agent_id < IB_UMAD_MAX_AGENTS; ++agent_id)
+		if (!file->agent[agent_id])
+			goto found;
+
+	ret = -ENOMEM;
+	goto out;
+
+found:
+	req.mgmt_class         = ureq.mgmt_class;
+	req.mgmt_class_version = ureq.mgmt_class_version;
+	memcpy(req.method_mask, ureq.method_mask, sizeof req.method_mask);
+	memcpy(req.oui,         ureq.oui,         sizeof req.oui);
+
+	agent = ib_register_mad_agent(file->port->ib_dev, file->port->port_num,
+				      ureq.qpn ? IB_QPT_GSI : IB_QPT_SMI,
+				      &req, 0, send_handler, recv_handler,
+				      file);
+	if (IS_ERR(agent)) {
+		ret = PTR_ERR(agent);
+		goto out;
+	}
+
+	file->agent[agent_id] = agent;
+
+	file->mr[agent_id] = ib_get_dma_mr(agent->qp->pd, IB_ACCESS_LOCAL_WRITE);
+	if (IS_ERR(file->mr[agent_id])) {
+		ret = -ENOMEM;
+		goto err;
+	}
+
+	if (put_user(agent_id,
+		     (u32 __user *) (arg + offsetof(struct ib_user_mad_reg_req, id)))) {
+		ret = -EFAULT;
+		goto err_mr;
+	}
+
+	ret = 0;
+	goto out;
+
+err_mr:
+	ib_dereg_mr(file->mr[agent_id]);
+
+err:
+	file->agent[agent_id] = NULL;
+	ib_unregister_mad_agent(agent);
+
+out:
+	up_write(&file->agent_mutex);
+	return ret;
+}
+
+static int ib_umad_unreg_agent(struct ib_umad_file *file, unsigned long arg)
+{
+	u32 id;
+	int ret = 0;
+
+	down_write(&file->agent_mutex);
+
+	if (get_user(id, (u32 __user *) arg)) {
+		ret = -EFAULT;
+		goto out;
+	}
+
+	if (id < 0 || id >= IB_UMAD_MAX_AGENTS || !file->agent[id]) {
+		ret = -EINVAL;
+		goto out;
+	}
+
+	ib_dereg_mr(file->mr[id]);
+	ib_unregister_mad_agent(file->agent[id]);
+	file->agent[id] = NULL;
+
+out:
+	up_write(&file->agent_mutex);
+	return ret;
+}
+
+static int ib_umad_ioctl(struct inode *inode, struct file *filp,
+			 unsigned int cmd, unsigned long arg)
+{
+	switch (cmd) {
+	case IB_USER_MAD_REGISTER_AGENT:
+		return ib_umad_reg_agent(filp->private_data, arg);
+	case IB_USER_MAD_UNREGISTER_AGENT:
+		return ib_umad_unreg_agent(filp->private_data, arg);
+	default:
+		return -ENOIOCTLCMD;
+	}
+}
+
+static int ib_umad_open(struct inode *inode, struct file *filp)
+{
+	struct ib_umad_port *port =
+		container_of(inode->i_cdev, struct ib_umad_port, dev);
+	struct ib_umad_file *file;
+
+	file = kmalloc(sizeof *file, GFP_KERNEL);
+	if (!file)
+		return -ENOMEM;
+
+	memset(file, 0, sizeof *file);
+
+	spin_lock_init(&file->recv_lock);
+	init_rwsem(&file->agent_mutex);
+	INIT_LIST_HEAD(&file->recv_list);
+	init_waitqueue_head(&file->recv_wait);
+
+	file->port = port;
+	filp->private_data = file;
+
+	return 0;
+}
+
+static int ib_umad_close(struct inode *inode, struct file *filp)
+{
+	struct ib_umad_file *file = filp->private_data;
+	int i;
+
+	for (i = 0; i < IB_UMAD_MAX_AGENTS; ++i)
+		if (file->agent[i]) {
+			ib_dereg_mr(file->mr[i]);
+			ib_unregister_mad_agent(file->agent[i]);
+		}
+
+	kfree(file);
+
+	return 0;
+}
+
+static struct file_operations umad_fops = {
+	.owner 	 = THIS_MODULE,
+	.read 	 = ib_umad_read,
+	.write 	 = ib_umad_write,
+	.poll 	 = ib_umad_poll,
+	.ioctl 	 = ib_umad_ioctl,
+	.open 	 = ib_umad_open,
+	.release = ib_umad_close
+};
+
+static struct ib_client umad_client = {
+	.name   = "umad",
+	.add    = ib_umad_add_one,
+	.remove = ib_umad_remove_one
+};
+
+static ssize_t show_dev(struct class_device *class_dev, char *buf)
+{
+	struct ib_umad_port *port =
+		container_of(class_dev, struct ib_umad_port, class_dev);
+
+	return print_dev_t(buf, port->dev.dev);
+}
+static CLASS_DEVICE_ATTR(dev, S_IRUGO, show_dev, NULL);
+
+static ssize_t show_ibdev(struct class_device *class_dev, char *buf)
+{
+	struct ib_umad_port *port =
+		container_of(class_dev, struct ib_umad_port, class_dev);
+
+	return sprintf(buf, "%s\n", port->ib_dev->name);
+}
+static CLASS_DEVICE_ATTR(ibdev, S_IRUGO, show_ibdev, NULL);
+
+static ssize_t show_port(struct class_device *class_dev, char *buf)
+{
+	struct ib_umad_port *port =
+		container_of(class_dev, struct ib_umad_port, class_dev);
+
+	return sprintf(buf, "%d\n", port->port_num);
+}
+static CLASS_DEVICE_ATTR(port, S_IRUGO, show_port, NULL);
+
+static void ib_umad_release_dev(struct kref *ref)
+{
+	struct ib_umad_device *dev =
+		container_of(ref, struct ib_umad_device, ref);
+
+	kfree(dev);
+}
+
+static void ib_umad_release_port(struct class_device *class_dev)
+{
+	struct ib_umad_port *port =
+		container_of(class_dev, struct ib_umad_port, class_dev);
+
+	cdev_del(&port->dev);
+	clear_bit(port->devnum, dev_map);
+	kref_put(&port->umad_dev->ref, ib_umad_release_dev);
+}
+
+static struct class umad_class = {
+	.name    = "infiniband_mad",
+	.release = ib_umad_release_port
+};
+
+static ssize_t show_abi_version(struct class *class, char *buf)
+{
+	return sprintf(buf, "%d\n", IB_USER_MAD_ABI_VERSION);
+}
+static CLASS_ATTR(abi_version, S_IRUGO, show_abi_version, NULL);
+
+static void ib_umad_add_one(struct ib_device *device)
+{
+	struct ib_umad_device *umad_dev;
+	int s, e, i;
+
+	if (device->node_type == IB_NODE_SWITCH)
+		s = e = 0;
+	else {
+		s = 1;
+		e = device->phys_port_cnt;
+	}
+
+	umad_dev = kmalloc(sizeof *umad_dev +
+			   (e - s + 1) * sizeof (struct ib_umad_port),
+			   GFP_KERNEL);
+	if (!umad_dev)
+		return;
+
+	memset(umad_dev, 0, sizeof *umad_dev +
+	       (e - s + 1) * sizeof (struct ib_umad_port));
+
+	kref_init(&umad_dev->ref);
+
+	umad_dev->start_port = s;
+	umad_dev->end_port   = e;
+
+	for (i = s; i <= e; ++i) {
+		umad_dev->port[i - s].umad_dev = umad_dev;
+		kref_get(&umad_dev->ref);
+
+		spin_lock(&map_lock);
+		umad_dev->port[i - s].devnum =
+			find_first_zero_bit(dev_map, IB_UMAD_MAX_PORTS);
+		if (umad_dev->port[i - s].devnum >= IB_UMAD_MAX_PORTS) {
+			spin_unlock(&map_lock);
+			goto err;
+		}
+		set_bit(umad_dev->port[i - s].devnum, dev_map);
+		spin_unlock(&map_lock);
+
+		umad_dev->port[i - s].ib_dev   = device;
+		umad_dev->port[i - s].port_num = i;
+
+		cdev_init(&umad_dev->port[i - s].dev, &umad_fops);
+		umad_dev->port[i - s].dev.owner = THIS_MODULE;
+		kobject_set_name(&umad_dev->port[i - s].dev.kobj,
+				 "umad%d", umad_dev->port[i - s].devnum);
+		if (cdev_add(&umad_dev->port[i - s].dev, base_dev +
+			     umad_dev->port[i - s].devnum, 1))
+			goto err;
+
+		umad_dev->port[i - s].class_dev.class = &umad_class;
+		umad_dev->port[i - s].class_dev.dev   = device->dma_device;
+		snprintf(umad_dev->port[i - s].class_dev.class_id,
+			 BUS_ID_SIZE, "umad%d", umad_dev->port[i - s].devnum);
+		if (class_device_register(&umad_dev->port[i - s].class_dev))
+			goto err_class;
+
+		if (class_device_create_file(&umad_dev->port[i - s].class_dev,
+					     &class_device_attr_dev))
+			goto err_class;
+		if (class_device_create_file(&umad_dev->port[i - s].class_dev,
+					     &class_device_attr_ibdev))
+			goto err_class;
+		if (class_device_create_file(&umad_dev->port[i - s].class_dev,
+					     &class_device_attr_port))
+			goto err_class;
+	}
+
+	ib_set_client_data(device, &umad_client, umad_dev);
+
+	return;
+
+err_class:
+	cdev_del(&umad_dev->port[i - s].dev);
+	clear_bit(umad_dev->port[i - s].devnum, dev_map);
+
+err:
+	while (--i >= s)
+		class_device_unregister(&umad_dev->port[i - s].class_dev);
+
+	kref_put(&umad_dev->ref, ib_umad_release_dev);
+}
+
+static void ib_umad_remove_one(struct ib_device *device)
+{
+	struct ib_umad_device *umad_dev = ib_get_client_data(device, &umad_client);
+	int i;
+
+	if (!umad_dev)
+		return;
+
+	for (i = 0; i <= umad_dev->end_port - umad_dev->start_port; ++i)
+		class_device_unregister(&umad_dev->port[i].class_dev);
+
+	kref_put(&umad_dev->ref, ib_umad_release_dev);
+}
+
+static int __init ib_umad_init(void)
+{
+	int ret;
+
+	spin_lock_init(&map_lock);
+
+	ret = alloc_chrdev_region(&base_dev, 0, IB_UMAD_MAX_PORTS,
+				  "infiniband_mad");
+	if (ret) {
+		printk(KERN_ERR "user_mad: couldn't get device number\n");
+		goto out;
+	}
+
+	ret = class_register(&umad_class);
+	if (ret) {
+		printk(KERN_ERR "user_mad: couldn't create class infiniband_mad\n");
+		goto out_chrdev;
+	}
+
+	ret = class_create_file(&umad_class, &class_attr_abi_version);
+	if (ret) {
+		printk(KERN_ERR "user_mad: couldn't create abi_version attribute\n");
+		goto out_class;
+	}
+
+	ret = ib_register_client(&umad_client);
+	if (ret) {
+		printk(KERN_ERR "user_mad: couldn't register ib_umad client\n");
+		goto out_class;
+	}
+
+	/* Our ioctls are 32/64 clean */
+	ret  = register_ioctl32_conversion(IB_USER_MAD_REGISTER_AGENT,   NULL);
+	ret |= register_ioctl32_conversion(IB_USER_MAD_UNREGISTER_AGENT, NULL);
+	if (ret) {
+		printk(KERN_ERR "user_mad: couldn't register ioctl32 conversions\n");
+		goto out_client;
+	}
+
+	return 0;
+
+out_client:
+	ib_unregister_client(&umad_client);
+
+out_class:
+	class_unregister(&umad_class);
+
+out_chrdev:
+	unregister_chrdev_region(base_dev, IB_UMAD_MAX_PORTS);
+
+out:
+	return ret;
+}
+
+static void __exit ib_umad_cleanup(void)
+{
+	unregister_ioctl32_conversion(IB_USER_MAD_REGISTER_AGENT);
+	unregister_ioctl32_conversion(IB_USER_MAD_UNREGISTER_AGENT);
+	ib_unregister_client(&umad_client);
+	class_unregister(&umad_class);
+	unregister_chrdev_region(base_dev, IB_UMAD_MAX_PORTS);
+}
+
+module_init(ib_umad_init);
+module_exit(ib_umad_cleanup);
diff -Nru a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/core/verbs.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,433 @@
+/*
+ * Copyright (c) 2004 Mellanox Technologies Ltd.  All rights reserved.
+ * Copyright (c) 2004 Infinicon Corporation.  All rights reserved.
+ * Copyright (c) 2004 Intel Corporation.  All rights reserved.
+ * Copyright (c) 2004 Topspin Corporation.  All rights reserved.
+ * Copyright (c) 2004 Voltaire Corporation.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: verbs.c 1349 2004-12-16 21:09:43Z roland $
+ */
+
+#include <linux/errno.h>
+#include <linux/err.h>
+
+#include <ib_verbs.h>
+
+/* Protection domains */
+
+struct ib_pd *ib_alloc_pd(struct ib_device *device)
+{
+	struct ib_pd *pd;
+
+	pd = device->alloc_pd(device);
+
+	if (!IS_ERR(pd)) {
+		pd->device = device;
+		atomic_set(&pd->usecnt, 0);
+	}
+
+	return pd;
+}
+EXPORT_SYMBOL(ib_alloc_pd);
+
+int ib_dealloc_pd(struct ib_pd *pd)
+{
+	if (atomic_read(&pd->usecnt))
+		return -EBUSY;
+
+	return pd->device->dealloc_pd(pd);
+}
+EXPORT_SYMBOL(ib_dealloc_pd);
+
+/* Address handles */
+
+struct ib_ah *ib_create_ah(struct ib_pd *pd, struct ib_ah_attr *ah_attr)
+{
+	struct ib_ah *ah;
+
+	ah = pd->device->create_ah(pd, ah_attr);
+
+	if (!IS_ERR(ah)) {
+		ah->device = pd->device;
+		ah->pd     = pd;
+		atomic_inc(&pd->usecnt);
+	}
+
+	return ah;
+}
+EXPORT_SYMBOL(ib_create_ah);
+
+int ib_modify_ah(struct ib_ah *ah, struct ib_ah_attr *ah_attr)
+{
+	return ah->device->modify_ah ?
+		ah->device->modify_ah(ah, ah_attr) :
+		-ENOSYS;
+}
+EXPORT_SYMBOL(ib_modify_ah);
+
+int ib_query_ah(struct ib_ah *ah, struct ib_ah_attr *ah_attr)
+{
+	return ah->device->query_ah ?
+		ah->device->query_ah(ah, ah_attr) :
+		-ENOSYS;
+}
+EXPORT_SYMBOL(ib_query_ah);
+
+int ib_destroy_ah(struct ib_ah *ah)
+{
+	struct ib_pd *pd;
+	int ret;
+
+	pd = ah->pd;
+	ret = ah->device->destroy_ah(ah);
+	if (!ret)
+		atomic_dec(&pd->usecnt);
+
+	return ret;
+}
+EXPORT_SYMBOL(ib_destroy_ah);
+
+/* Queue pairs */
+
+struct ib_qp *ib_create_qp(struct ib_pd *pd,
+			   struct ib_qp_init_attr *qp_init_attr)
+{
+	struct ib_qp *qp;
+
+	qp = pd->device->create_qp(pd, qp_init_attr);
+
+	if (!IS_ERR(qp)) {
+		qp->device     	  = pd->device;
+		qp->pd         	  = pd;
+		qp->send_cq    	  = qp_init_attr->send_cq;
+		qp->recv_cq    	  = qp_init_attr->recv_cq;
+		qp->srq	       	  = qp_init_attr->srq;
+		qp->event_handler = qp_init_attr->event_handler;
+		qp->qp_context    = qp_init_attr->qp_context;
+		atomic_inc(&pd->usecnt);
+		atomic_inc(&qp_init_attr->send_cq->usecnt);
+		atomic_inc(&qp_init_attr->recv_cq->usecnt);
+		if (qp_init_attr->srq)
+			atomic_inc(&qp_init_attr->srq->usecnt);
+	}
+
+	return qp;
+}
+EXPORT_SYMBOL(ib_create_qp);
+
+int ib_modify_qp(struct ib_qp *qp,
+		 struct ib_qp_attr *qp_attr,
+		 int qp_attr_mask)
+{
+	return qp->device->modify_qp(qp, qp_attr, qp_attr_mask);
+}
+EXPORT_SYMBOL(ib_modify_qp);
+
+int ib_query_qp(struct ib_qp *qp,
+		struct ib_qp_attr *qp_attr,
+		int qp_attr_mask,
+		struct ib_qp_init_attr *qp_init_attr)
+{
+	return qp->device->query_qp ?
+		qp->device->query_qp(qp, qp_attr, qp_attr_mask, qp_init_attr) :
+		-ENOSYS;
+}
+EXPORT_SYMBOL(ib_query_qp);
+
+int ib_destroy_qp(struct ib_qp *qp)
+{
+	struct ib_pd *pd;
+	struct ib_cq *scq, *rcq;
+	struct ib_srq *srq;
+	int ret;
+
+	pd  = qp->pd;
+	scq = qp->send_cq;
+	rcq = qp->recv_cq;
+	srq = qp->srq;
+
+	ret = qp->device->destroy_qp(qp);
+	if (!ret) {
+		atomic_dec(&pd->usecnt);
+		atomic_dec(&scq->usecnt);
+		atomic_dec(&rcq->usecnt);
+		if (srq)
+			atomic_dec(&srq->usecnt);
+	}
+
+	return ret;
+}
+EXPORT_SYMBOL(ib_destroy_qp);
+
+/* Completion queues */
+
+struct ib_cq *ib_create_cq(struct ib_device *device,
+			   ib_comp_handler comp_handler,
+			   void (*event_handler)(struct ib_event *, void *),
+			   void *cq_context, int cqe)
+{
+	struct ib_cq *cq;
+
+	cq = device->create_cq(device, cqe);
+
+	if (!IS_ERR(cq)) {
+		cq->device        = device;
+		cq->comp_handler  = comp_handler;
+		cq->event_handler = event_handler;
+		cq->cq_context    = cq_context;
+		atomic_set(&cq->usecnt, 0);
+	}
+
+	return cq;
+}
+EXPORT_SYMBOL(ib_create_cq);
+
+int ib_destroy_cq(struct ib_cq *cq)
+{
+	if (atomic_read(&cq->usecnt))
+		return -EBUSY;
+
+	return cq->device->destroy_cq(cq);
+}
+EXPORT_SYMBOL(ib_destroy_cq);
+
+int ib_resize_cq(struct ib_cq *cq,
+                 int           cqe)
+{
+	int ret;
+
+	if (!cq->device->resize_cq)
+		return -ENOSYS;
+
+	ret = cq->device->resize_cq(cq, &cqe);
+	if (!ret)
+		cq->cqe = cqe;
+
+	return ret;
+}
+EXPORT_SYMBOL(ib_resize_cq);
+
+/* Memory regions */
+
+struct ib_mr *ib_get_dma_mr(struct ib_pd *pd, int mr_access_flags)
+{
+	struct ib_mr *mr;
+
+	mr = pd->device->get_dma_mr(pd, mr_access_flags);
+
+	if (!IS_ERR(mr)) {
+		mr->device = pd->device;
+		mr->pd     = pd;
+		atomic_inc(&pd->usecnt);
+		atomic_set(&mr->usecnt, 0);
+	}
+
+	return mr;
+}
+EXPORT_SYMBOL(ib_get_dma_mr);
+
+struct ib_mr *ib_reg_phys_mr(struct ib_pd *pd,
+			     struct ib_phys_buf *phys_buf_array,
+			     int num_phys_buf,
+			     int mr_access_flags,
+			     u64 *iova_start)
+{
+	struct ib_mr *mr;
+
+	mr = pd->device->reg_phys_mr(pd, phys_buf_array, num_phys_buf,
+				     mr_access_flags, iova_start);
+
+	if (!IS_ERR(mr)) {
+		mr->device = pd->device;
+		mr->pd     = pd;
+		atomic_inc(&pd->usecnt);
+		atomic_set(&mr->usecnt, 0);
+	}
+
+	return mr;
+}
+EXPORT_SYMBOL(ib_reg_phys_mr);
+
+int ib_rereg_phys_mr(struct ib_mr *mr,
+		     int mr_rereg_mask,
+		     struct ib_pd *pd,
+		     struct ib_phys_buf *phys_buf_array,
+		     int num_phys_buf,
+		     int mr_access_flags,
+		     u64 *iova_start)
+{
+	struct ib_pd *old_pd;
+	int ret;
+
+	if (!mr->device->rereg_phys_mr)
+		return -ENOSYS;
+
+	if (atomic_read(&mr->usecnt))
+		return -EBUSY;
+
+	old_pd = mr->pd;
+
+	ret = mr->device->rereg_phys_mr(mr, mr_rereg_mask, pd,
+					phys_buf_array, num_phys_buf,
+					mr_access_flags, iova_start);
+
+	if (!ret && (mr_rereg_mask & IB_MR_REREG_PD)) {
+		atomic_dec(&old_pd->usecnt);
+		atomic_inc(&pd->usecnt);
+	}
+
+	return ret;
+}
+EXPORT_SYMBOL(ib_rereg_phys_mr);
+
+int ib_query_mr(struct ib_mr *mr, struct ib_mr_attr *mr_attr)
+{
+	return mr->device->query_mr ?
+		mr->device->query_mr(mr, mr_attr) : -ENOSYS;
+}
+EXPORT_SYMBOL(ib_query_mr);
+
+int ib_dereg_mr(struct ib_mr *mr)
+{
+	struct ib_pd *pd;
+	int ret;
+
+	if (atomic_read(&mr->usecnt))
+		return -EBUSY;
+
+	pd = mr->pd;
+	ret = mr->device->dereg_mr(mr);
+	if (!ret)
+		atomic_dec(&pd->usecnt);
+
+	return ret;
+}
+EXPORT_SYMBOL(ib_dereg_mr);
+
+/* Memory windows */
+
+struct ib_mw *ib_alloc_mw(struct ib_pd *pd)
+{
+	struct ib_mw *mw;
+
+	if (!pd->device->alloc_mw)
+		return ERR_PTR(-ENOSYS);
+
+	mw = pd->device->alloc_mw(pd);
+	if (!IS_ERR(mw)) {
+		mw->device = pd->device;
+		mw->pd     = pd;
+		atomic_inc(&pd->usecnt);
+	}
+
+	return mw;
+}
+EXPORT_SYMBOL(ib_alloc_mw);
+
+int ib_dealloc_mw(struct ib_mw *mw)
+{
+	struct ib_pd *pd;
+	int ret;
+
+	pd = mw->pd;
+	ret = mw->device->dealloc_mw(mw);
+	if (!ret)
+		atomic_dec(&pd->usecnt);
+
+	return ret;
+}
+EXPORT_SYMBOL(ib_dealloc_mw);
+
+/* "Fast" memory regions */
+
+struct ib_fmr *ib_alloc_fmr(struct ib_pd *pd,
+			    int mr_access_flags,
+			    struct ib_fmr_attr *fmr_attr)
+{
+	struct ib_fmr *fmr;
+
+	if (!pd->device->alloc_fmr)
+		return ERR_PTR(-ENOSYS);
+
+	fmr = pd->device->alloc_fmr(pd, mr_access_flags, fmr_attr);
+	if (!IS_ERR(fmr)) {
+		fmr->device = pd->device;
+		fmr->pd     = pd;
+		atomic_inc(&pd->usecnt);
+	}
+
+	return fmr;
+}
+EXPORT_SYMBOL(ib_alloc_fmr);
+
+int ib_unmap_fmr(struct list_head *fmr_list)
+{
+	struct ib_fmr *fmr;
+
+	if (list_empty(fmr_list))
+		return 0;
+
+	fmr = list_entry(fmr_list->next, struct ib_fmr, list);
+	return fmr->device->unmap_fmr(fmr_list);
+}
+EXPORT_SYMBOL(ib_unmap_fmr);
+
+int ib_dealloc_fmr(struct ib_fmr *fmr)
+{
+	struct ib_pd *pd;
+	int ret;
+
+	pd = fmr->pd;
+	ret = fmr->device->dealloc_fmr(fmr);
+	if (!ret)
+		atomic_dec(&pd->usecnt);
+
+	return ret;
+}
+EXPORT_SYMBOL(ib_dealloc_fmr);
+
+/* Multicast groups */
+
+int ib_attach_mcast(struct ib_qp *qp, union ib_gid *gid, u16 lid)
+{
+	return qp->device->attach_mcast ?
+		qp->device->attach_mcast(qp, gid, lid) :
+		-ENOSYS;
+}
+EXPORT_SYMBOL(ib_attach_mcast);
+
+int ib_detach_mcast(struct ib_qp *qp, union ib_gid *gid, u16 lid)
+{
+	return qp->device->detach_mcast ?
+		qp->device->detach_mcast(qp, gid, lid) :
+		-ENOSYS;
+}
+EXPORT_SYMBOL(ib_detach_mcast);
diff -Nru a/drivers/infiniband/hw/mthca/Kconfig b/drivers/infiniband/hw/mthca/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/hw/mthca/Kconfig	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,26 @@
+config INFINIBAND_MTHCA
+	tristate "Mellanox HCA support"
+	depends on PCI && INFINIBAND
+	---help---
+	  This is a low-level driver for Mellanox InfiniHost host
+	  channel adapters (HCAs), including the MT23108 PCI-X HCA
+	  ("Tavor") and the MT25208 PCI Express HCA ("Arbel").
+
+config INFINIBAND_MTHCA_DEBUG
+	bool "Verbose debugging output"
+	depends on INFINIBAND_MTHCA
+	default n
+	---help---
+	  This option causes the mthca driver produce a bunch of debug
+	  messages.  Select this is you are developing the driver or
+	  trying to diagnose a problem.
+
+config INFINIBAND_MTHCA_SSE_DOORBELL
+	bool "SSE doorbell code"
+	depends on INFINIBAND_MTHCA && X86 && !X86_64
+	default n
+	---help---
+	  This option will have the mthca driver use SSE instructions
+	  to ring hardware doorbell registers.  This may improve
+	  performance for some workloads, but the driver will not run
+	  on processors without SSE instructions.
diff -Nru a/drivers/infiniband/hw/mthca/Makefile b/drivers/infiniband/hw/mthca/Makefile
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/hw/mthca/Makefile	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,12 @@
+EXTRA_CFLAGS += -Idrivers/infiniband/include
+
+ifdef CONFIG_INFINIBAND_MTHCA_DEBUG
+EXTRA_CFLAGS += -DDEBUG
+endif
+
+obj-$(CONFIG_INFINIBAND_MTHCA) += ib_mthca.o
+
+ib_mthca-y :=	mthca_main.o mthca_cmd.o mthca_profile.o mthca_reset.o \
+		mthca_allocator.o mthca_eq.o mthca_pd.o mthca_cq.o \
+		mthca_mr.o mthca_qp.o mthca_av.o mthca_mcg.o mthca_mad.o \
+		mthca_provider.o
diff -Nru a/drivers/infiniband/hw/mthca/mthca_allocator.c b/drivers/infiniband/hw/mthca/mthca_allocator.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/hw/mthca/mthca_allocator.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,179 @@
+/*
+ * Copyright (c) 2004 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: mthca_allocator.c 1349 2004-12-16 21:09:43Z roland $
+ */
+
+#include <linux/errno.h>
+#include <linux/slab.h>
+#include <linux/bitmap.h>
+
+#include "mthca_dev.h"
+
+/* Trivial bitmap-based allocator */
+u32 mthca_alloc(struct mthca_alloc *alloc)
+{
+	u32 obj;
+
+	spin_lock(&alloc->lock);
+	obj = find_next_zero_bit(alloc->table, alloc->max, alloc->last);
+	if (obj >= alloc->max) {
+		alloc->top = (alloc->top + alloc->max) & alloc->mask;
+		obj = find_first_zero_bit(alloc->table, alloc->max);
+	}
+
+	if (obj < alloc->max) {
+		set_bit(obj, alloc->table);
+		obj |= alloc->top;
+	} else
+		obj = -1;
+
+	spin_unlock(&alloc->lock);
+
+	return obj;
+}
+
+void mthca_free(struct mthca_alloc *alloc, u32 obj)
+{
+	obj &= alloc->max - 1;
+	spin_lock(&alloc->lock);
+	clear_bit(obj, alloc->table);
+	alloc->last = min(alloc->last, obj);
+	alloc->top = (alloc->top + alloc->max) & alloc->mask;
+	spin_unlock(&alloc->lock);
+}
+
+int mthca_alloc_init(struct mthca_alloc *alloc, u32 num, u32 mask,
+		     u32 reserved)
+{
+	int i;
+
+	/* num must be a power of 2 */
+	if (num != 1 << (ffs(num) - 1))
+		return -EINVAL;
+
+	alloc->last = 0;
+	alloc->top  = 0;
+	alloc->max  = num;
+	alloc->mask = mask;
+	spin_lock_init(&alloc->lock);
+	alloc->table = kmalloc(BITS_TO_LONGS(num) * sizeof (long),
+			       GFP_KERNEL);
+	if (!alloc->table)
+		return -ENOMEM;
+
+	bitmap_zero(alloc->table, num);
+	for (i = 0; i < reserved; ++i)
+		set_bit(i, alloc->table);
+
+	return 0;
+}
+
+void mthca_alloc_cleanup(struct mthca_alloc *alloc)
+{
+	kfree(alloc->table);
+}
+
+/*
+ * Array of pointers with lazy allocation of leaf pages.  Callers of
+ * _get, _set and _clear methods must use a lock or otherwise
+ * serialize access to the array.
+ */
+
+void *mthca_array_get(struct mthca_array *array, int index)
+{
+	int p = (index * sizeof (void *)) >> PAGE_SHIFT;
+
+	if (array->page_list[p].page) {
+		int i = index & (PAGE_SIZE / sizeof (void *) - 1);
+		return array->page_list[p].page[i];
+	} else
+		return NULL;
+}
+
+int mthca_array_set(struct mthca_array *array, int index, void *value)
+{
+	int p = (index * sizeof (void *)) >> PAGE_SHIFT;
+
+	/* Allocate with GFP_ATOMIC because we'll be called with locks held. */
+	if (!array->page_list[p].page)
+		array->page_list[p].page = (void **) get_zeroed_page(GFP_ATOMIC);
+
+	if (!array->page_list[p].page)
+		return -ENOMEM;
+
+	array->page_list[p].page[index & (PAGE_SIZE / sizeof (void *) - 1)] =
+		value;
+	++array->page_list[p].used;
+
+	return 0;
+}
+
+void mthca_array_clear(struct mthca_array *array, int index)
+{
+	int p = (index * sizeof (void *)) >> PAGE_SHIFT;
+
+	if (--array->page_list[p].used == 0) {
+		free_page((unsigned long) array->page_list[p].page);
+		array->page_list[p].page = NULL;
+	}
+
+	if (array->page_list[p].used < 0)
+		pr_debug("Array %p index %d page %d with ref count %d < 0\n",
+			 array, index, p, array->page_list[p].used);
+}
+
+int mthca_array_init(struct mthca_array *array, int nent)
+{
+	int npage = (nent * sizeof (void *) + PAGE_SIZE - 1) / PAGE_SIZE;
+	int i;
+
+	array->page_list = kmalloc(npage * sizeof *array->page_list, GFP_KERNEL);
+	if (!array->page_list)
+		return -ENOMEM;
+
+	for (i = 0; i < npage; ++i) {
+		array->page_list[i].page = NULL;
+		array->page_list[i].used = 0;
+	}
+
+	return 0;
+}
+
+void mthca_array_cleanup(struct mthca_array *array, int nent)
+{
+	int i;
+
+	for (i = 0; i < (nent * sizeof (void *) + PAGE_SIZE - 1) / PAGE_SIZE; ++i)
+		free_page((unsigned long) array->page_list[i].page);
+
+	kfree(array->page_list);
+}
diff -Nru a/drivers/infiniband/hw/mthca/mthca_av.c b/drivers/infiniband/hw/mthca/mthca_av.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/hw/mthca/mthca_av.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,219 @@
+/*
+ * Copyright (c) 2004 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: mthca_av.c 1349 2004-12-16 21:09:43Z roland $
+ */
+
+#include <linux/init.h>
+
+#include <ib_verbs.h>
+#include <ib_cache.h>
+
+#include "mthca_dev.h"
+
+struct mthca_av {
+	u32 port_pd;
+	u8  reserved1;
+	u8  g_slid;
+	u16 dlid;
+	u8  reserved2;
+	u8  gid_index;
+	u8  msg_sr;
+	u8  hop_limit;
+	u32 sl_tclass_flowlabel;
+	u32 dgid[4];
+};
+
+int mthca_create_ah(struct mthca_dev *dev,
+		    struct mthca_pd *pd,
+		    struct ib_ah_attr *ah_attr,
+		    struct mthca_ah *ah)
+{
+	u32 index = -1;
+	struct mthca_av *av = NULL;
+
+	ah->on_hca = 0;
+
+	if (!atomic_read(&pd->sqp_count) &&
+	    !(dev->mthca_flags & MTHCA_FLAG_DDR_HIDDEN)) {
+		index = mthca_alloc(&dev->av_table.alloc);
+
+		/* fall back to allocate in host memory */
+		if (index == -1)
+			goto host_alloc;
+
+		av = kmalloc(sizeof *av, GFP_KERNEL);
+		if (!av)
+			goto host_alloc;
+
+		ah->on_hca = 1;
+		ah->avdma  = dev->av_table.ddr_av_base +
+			index * MTHCA_AV_SIZE;
+	}
+
+ host_alloc:
+	if (!ah->on_hca) {
+		ah->av = pci_pool_alloc(dev->av_table.pool,
+					SLAB_KERNEL, &ah->avdma);
+		if (!ah->av)
+			return -ENOMEM;
+
+		av = ah->av;
+	}
+
+	ah->key = pd->ntmr.ibmr.lkey;
+
+	memset(av, 0, MTHCA_AV_SIZE);
+
+	av->port_pd = cpu_to_be32(pd->pd_num | (ah_attr->port_num << 24));
+	av->g_slid  = ah_attr->src_path_bits;
+	av->dlid    = cpu_to_be16(ah_attr->dlid);
+	av->msg_sr  = (3 << 4) | /* 2K message */
+		ah_attr->static_rate;
+	av->sl_tclass_flowlabel = cpu_to_be32(ah_attr->sl << 28);
+	if (ah_attr->ah_flags & IB_AH_GRH) {
+		av->g_slid |= 0x80;
+		av->gid_index = (ah_attr->port_num - 1) * dev->limits.gid_table_len +
+			ah_attr->grh.sgid_index;
+		av->hop_limit = ah_attr->grh.hop_limit;
+		av->sl_tclass_flowlabel |=
+			cpu_to_be32((ah_attr->grh.traffic_class << 20) |
+				    ah_attr->grh.flow_label);
+		memcpy(av->dgid, ah_attr->grh.dgid.raw, 16);
+	} else {
+		/* Arbel workaround -- low byte of GID must be 2 */
+		av->dgid[3] = cpu_to_be32(2);
+	}
+
+	if (0) {
+		int j;
+
+		mthca_dbg(dev, "Created UDAV at %p/%08lx:\n",
+			  av, (unsigned long) ah->avdma);
+		for (j = 0; j < 8; ++j)
+			printk(KERN_DEBUG "  [%2x] %08x\n",
+			       j * 4, be32_to_cpu(((u32 *) av)[j]));
+	}
+
+	if (ah->on_hca) {
+		memcpy_toio(dev->av_table.av_map + index * MTHCA_AV_SIZE,
+			    av, MTHCA_AV_SIZE);
+		kfree(av);
+	}
+
+	return 0;
+}
+
+int mthca_destroy_ah(struct mthca_dev *dev, struct mthca_ah *ah)
+{
+	if (ah->on_hca)
+		mthca_free(&dev->av_table.alloc,
+ 			   (ah->avdma - dev->av_table.ddr_av_base) /
+			   MTHCA_AV_SIZE);
+	else
+		pci_pool_free(dev->av_table.pool, ah->av, ah->avdma);
+
+	return 0;
+}
+
+int mthca_read_ah(struct mthca_dev *dev, struct mthca_ah *ah,
+		  struct ib_ud_header *header)
+{
+	if (ah->on_hca)
+		return -EINVAL;
+
+	header->lrh.service_level   = be32_to_cpu(ah->av->sl_tclass_flowlabel) >> 28;
+	header->lrh.destination_lid = ah->av->dlid;
+	header->lrh.source_lid      = ah->av->g_slid & 0x7f;
+	if (ah->av->g_slid & 0x80) {
+		header->grh_present = 1;
+		header->grh.traffic_class =
+			(be32_to_cpu(ah->av->sl_tclass_flowlabel) >> 20) & 0xff;
+		header->grh.flow_label    =
+			ah->av->sl_tclass_flowlabel & cpu_to_be32(0xfffff);
+		ib_cached_gid_get(&dev->ib_dev,
+				  be32_to_cpu(ah->av->port_pd) >> 24,
+				  ah->av->gid_index,
+				  &header->grh.source_gid);
+		memcpy(header->grh.destination_gid.raw,
+		       ah->av->dgid, 16);
+	} else {
+		header->grh_present = 0;
+	}
+
+	return 0;
+}
+
+int __devinit mthca_init_av_table(struct mthca_dev *dev)
+{
+	int err;
+
+	err = mthca_alloc_init(&dev->av_table.alloc,
+			       dev->av_table.num_ddr_avs,
+			       dev->av_table.num_ddr_avs - 1,
+			       0);
+	if (err)
+		return err;
+
+	dev->av_table.pool = pci_pool_create("mthca_av", dev->pdev,
+					     MTHCA_AV_SIZE,
+					     MTHCA_AV_SIZE, 0);
+	if (!dev->av_table.pool)
+		goto out_free_alloc;
+
+	if (!(dev->mthca_flags & MTHCA_FLAG_DDR_HIDDEN)) {
+		dev->av_table.av_map = ioremap(pci_resource_start(dev->pdev, 4) +
+					       dev->av_table.ddr_av_base -
+					       dev->ddr_start,
+					       dev->av_table.num_ddr_avs *
+					       MTHCA_AV_SIZE);
+		if (!dev->av_table.av_map)
+			goto out_free_pool;
+	} else
+		dev->av_table.av_map = NULL;
+
+	return 0;
+
+ out_free_pool:
+	pci_pool_destroy(dev->av_table.pool);
+
+ out_free_alloc:
+	mthca_alloc_cleanup(&dev->av_table.alloc);
+	return -ENOMEM;
+}
+
+void __devexit mthca_cleanup_av_table(struct mthca_dev *dev)
+{
+	if (dev->av_table.av_map)
+		iounmap(dev->av_table.av_map);
+	pci_pool_destroy(dev->av_table.pool);
+	mthca_alloc_cleanup(&dev->av_table.alloc);
+}
diff -Nru a/drivers/infiniband/hw/mthca/mthca_cmd.c b/drivers/infiniband/hw/mthca/mthca_cmd.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/hw/mthca/mthca_cmd.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,1573 @@
+/*
+ * Copyright (c) 2004 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: mthca_cmd.c 1349 2004-12-16 21:09:43Z roland $
+ */
+
+#include <linux/sched.h>
+#include <linux/pci.h>
+#include <linux/errno.h>
+#include <asm/io.h>
+
+#include "mthca_dev.h"
+#include "mthca_config_reg.h"
+#include "mthca_cmd.h"
+
+#define CMD_POLL_TOKEN 0xffff
+
+enum {
+	HCR_IN_PARAM_OFFSET    = 0x00,
+	HCR_IN_MODIFIER_OFFSET = 0x08,
+	HCR_OUT_PARAM_OFFSET   = 0x0c,
+	HCR_TOKEN_OFFSET       = 0x14,
+	HCR_STATUS_OFFSET      = 0x18,
+
+	HCR_OPMOD_SHIFT        = 12,
+	HCA_E_BIT              = 22,
+	HCR_GO_BIT             = 23
+};
+
+enum {
+	/* initialization and general commands */
+	CMD_SYS_EN          = 0x1,
+	CMD_SYS_DIS         = 0x2,
+	CMD_MAP_FA          = 0xfff,
+	CMD_UNMAP_FA        = 0xffe,
+	CMD_RUN_FW          = 0xff6,
+	CMD_MOD_STAT_CFG    = 0x34,
+	CMD_QUERY_DEV_LIM   = 0x3,
+	CMD_QUERY_FW        = 0x4,
+	CMD_ENABLE_LAM      = 0xff8,
+	CMD_DISABLE_LAM     = 0xff7,
+	CMD_QUERY_DDR       = 0x5,
+	CMD_QUERY_ADAPTER   = 0x6,
+	CMD_INIT_HCA        = 0x7,
+	CMD_CLOSE_HCA       = 0x8,
+	CMD_INIT_IB         = 0x9,
+	CMD_CLOSE_IB        = 0xa,
+	CMD_QUERY_HCA       = 0xb,
+	CMD_SET_IB          = 0xc,
+	CMD_ACCESS_DDR      = 0x2e,
+	CMD_MAP_ICM         = 0xffa,
+	CMD_UNMAP_ICM       = 0xff9,
+	CMD_MAP_ICM_AUX     = 0xffc,
+	CMD_UNMAP_ICM_AUX   = 0xffb,
+	CMD_SET_ICM_SIZE    = 0xffd,
+
+	/* TPT commands */
+	CMD_SW2HW_MPT 	    = 0xd,
+	CMD_QUERY_MPT 	    = 0xe,
+	CMD_HW2SW_MPT 	    = 0xf,
+	CMD_READ_MTT        = 0x10,
+	CMD_WRITE_MTT       = 0x11,
+	CMD_SYNC_TPT        = 0x2f,
+
+	/* EQ commands */
+	CMD_MAP_EQ          = 0x12,
+	CMD_SW2HW_EQ 	    = 0x13,
+	CMD_HW2SW_EQ 	    = 0x14,
+	CMD_QUERY_EQ        = 0x15,
+
+	/* CQ commands */
+	CMD_SW2HW_CQ 	    = 0x16,
+	CMD_HW2SW_CQ 	    = 0x17,
+	CMD_QUERY_CQ 	    = 0x18,
+	CMD_RESIZE_CQ       = 0x2c,
+
+	/* SRQ commands */
+	CMD_SW2HW_SRQ 	    = 0x35,
+	CMD_HW2SW_SRQ 	    = 0x36,
+	CMD_QUERY_SRQ       = 0x37,
+
+	/* QP/EE commands */
+	CMD_RST2INIT_QPEE   = 0x19,
+	CMD_INIT2RTR_QPEE   = 0x1a,
+	CMD_RTR2RTS_QPEE    = 0x1b,
+	CMD_RTS2RTS_QPEE    = 0x1c,
+	CMD_SQERR2RTS_QPEE  = 0x1d,
+	CMD_2ERR_QPEE       = 0x1e,
+	CMD_RTS2SQD_QPEE    = 0x1f,
+	CMD_SQD2SQD_QPEE    = 0x38,
+	CMD_SQD2RTS_QPEE    = 0x20,
+	CMD_ERR2RST_QPEE    = 0x21,
+	CMD_QUERY_QPEE      = 0x22,
+	CMD_INIT2INIT_QPEE  = 0x2d,
+	CMD_SUSPEND_QPEE    = 0x32,
+	CMD_UNSUSPEND_QPEE  = 0x33,
+	/* special QPs and management commands */
+	CMD_CONF_SPECIAL_QP = 0x23,
+	CMD_MAD_IFC         = 0x24,
+
+	/* multicast commands */
+	CMD_READ_MGM        = 0x25,
+	CMD_WRITE_MGM       = 0x26,
+	CMD_MGID_HASH       = 0x27,
+
+	/* miscellaneous commands */
+	CMD_DIAG_RPRT       = 0x30,
+	CMD_NOP             = 0x31,
+
+	/* debug commands */
+	CMD_QUERY_DEBUG_MSG = 0x2a,
+	CMD_SET_DEBUG_MSG   = 0x2b,
+};
+
+/*
+ * According to Mellanox code, FW may be starved and never complete
+ * commands.  So we can't use strict timeouts described in PRM -- we
+ * just arbitrarily select 60 seconds for now.
+ */
+#if 0
+/*
+ * Round up and add 1 to make sure we get the full wait time (since we
+ * will be starting in the middle of a jiffy)
+ */
+enum {
+	CMD_TIME_CLASS_A = (HZ + 999) / 1000 + 1,
+	CMD_TIME_CLASS_B = (HZ +  99) /  100 + 1,
+	CMD_TIME_CLASS_C = (HZ +   9) /   10 + 1
+};
+#else
+enum {
+	CMD_TIME_CLASS_A = 60 * HZ,
+	CMD_TIME_CLASS_B = 60 * HZ,
+	CMD_TIME_CLASS_C = 60 * HZ
+};
+#endif
+
+enum {
+	GO_BIT_TIMEOUT = HZ * 10
+};
+
+struct mthca_cmd_context {
+	struct completion done;
+	struct timer_list timer;
+	int               result;
+	int               next;
+	u64               out_param;
+	u16               token;
+	u8                status;
+};
+
+static inline int go_bit(struct mthca_dev *dev)
+{
+	return readl(dev->hcr + HCR_STATUS_OFFSET) &
+		swab32(1 << HCR_GO_BIT);
+}
+
+static int mthca_cmd_post(struct mthca_dev *dev,
+			  u64 in_param,
+			  u64 out_param,
+			  u32 in_modifier,
+			  u8 op_modifier,
+			  u16 op,
+			  u16 token,
+			  int event)
+{
+	int err = 0;
+
+	if (down_interruptible(&dev->cmd.hcr_sem))
+		return -EINTR;
+
+	if (event) {
+		unsigned long end = jiffies + GO_BIT_TIMEOUT;
+
+		while (go_bit(dev) && time_before(jiffies, end)) {
+			set_current_state(TASK_RUNNING);
+			schedule();
+		}
+	}
+
+	if (go_bit(dev)) {
+		err = -EAGAIN;
+		goto out;
+	}
+
+	/*
+	 * We use writel (instead of something like memcpy_toio)
+	 * because writes of less than 32 bits to the HCR don't work
+	 * (and some architectures such as ia64 implement memcpy_toio
+	 * in terms of writeb).
+	 */
+	__raw_writel(cpu_to_be32(in_param >> 32),           dev->hcr + 0 * 4);
+	__raw_writel(cpu_to_be32(in_param & 0xfffffffful),  dev->hcr + 1 * 4);
+	__raw_writel(cpu_to_be32(in_modifier),              dev->hcr + 2 * 4);
+	__raw_writel(cpu_to_be32(out_param >> 32),          dev->hcr + 3 * 4);
+	__raw_writel(cpu_to_be32(out_param & 0xfffffffful), dev->hcr + 4 * 4);
+	__raw_writel(cpu_to_be32(token << 16),              dev->hcr + 5 * 4);
+
+	/* __raw_writel may not order writes. */
+	wmb();
+
+	__raw_writel(cpu_to_be32((1 << HCR_GO_BIT)                |
+				 (event ? (1 << HCA_E_BIT) : 0)   |
+				 (op_modifier << HCR_OPMOD_SHIFT) |
+				 op),                       dev->hcr + 6 * 4);
+
+out:
+	up(&dev->cmd.hcr_sem);
+	return err;
+}
+
+static int mthca_cmd_poll(struct mthca_dev *dev,
+			  u64 in_param,
+			  u64 *out_param,
+			  int out_is_imm,
+			  u32 in_modifier,
+			  u8 op_modifier,
+			  u16 op,
+			  unsigned long timeout,
+			  u8 *status)
+{
+	int err = 0;
+	unsigned long end;
+
+	if (down_interruptible(&dev->cmd.poll_sem))
+		return -EINTR;
+
+	err = mthca_cmd_post(dev, in_param,
+			     out_param ? *out_param : 0,
+			     in_modifier, op_modifier,
+			     op, CMD_POLL_TOKEN, 0);
+	if (err)
+		goto out;
+
+	end = timeout + jiffies;
+	while (go_bit(dev) && time_before(jiffies, end)) {
+		set_current_state(TASK_RUNNING);
+		schedule();
+	}
+
+	if (go_bit(dev)) {
+		err = -EBUSY;
+		goto out;
+	}
+
+	if (out_is_imm) {
+		memcpy_fromio(out_param, dev->hcr + HCR_OUT_PARAM_OFFSET, sizeof (u64));
+		be64_to_cpus(out_param);
+	}
+
+	*status = be32_to_cpu(__raw_readl(dev->hcr + HCR_STATUS_OFFSET)) >> 24;
+
+out:
+	up(&dev->cmd.poll_sem);
+	return err;
+}
+
+void mthca_cmd_event(struct mthca_dev *dev,
+		     u16 token,
+		     u8  status,
+		     u64 out_param)
+{
+	struct mthca_cmd_context *context =
+		&dev->cmd.context[token & dev->cmd.token_mask];
+
+	/* previously timed out command completing at long last */
+	if (token != context->token)
+		return;
+
+	context->result    = 0;
+	context->status    = status;
+	context->out_param = out_param;
+
+	context->token += dev->cmd.token_mask + 1;
+
+	complete(&context->done);
+}
+
+static void event_timeout(unsigned long context_ptr)
+{
+	struct mthca_cmd_context *context =
+		(struct mthca_cmd_context *) context_ptr;
+
+	context->result = -EBUSY;
+	complete(&context->done);
+}
+
+static int mthca_cmd_wait(struct mthca_dev *dev,
+			  u64 in_param,
+			  u64 *out_param,
+			  int out_is_imm,
+			  u32 in_modifier,
+			  u8 op_modifier,
+			  u16 op,
+			  unsigned long timeout,
+			  u8 *status)
+{
+	int err = 0;
+	struct mthca_cmd_context *context;
+
+	if (down_interruptible(&dev->cmd.event_sem))
+		return -EINTR;
+
+	spin_lock(&dev->cmd.context_lock);
+	BUG_ON(dev->cmd.free_head < 0);
+	context = &dev->cmd.context[dev->cmd.free_head];
+	dev->cmd.free_head = context->next;
+	spin_unlock(&dev->cmd.context_lock);
+
+	init_completion(&context->done);
+
+	err = mthca_cmd_post(dev, in_param,
+			     out_param ? *out_param : 0,
+			     in_modifier, op_modifier,
+			     op, context->token, 1);
+	if (err)
+		goto out;
+
+	context->timer.expires  = jiffies + timeout;
+	add_timer(&context->timer);
+
+	wait_for_completion(&context->done);
+	del_timer_sync(&context->timer);
+
+	err = context->result;
+	if (err)
+		goto out;
+
+	*status = context->status;
+	if (*status)
+		mthca_dbg(dev, "Command %02x completed with status %02x\n",
+			  op, *status);
+
+	if (out_is_imm)
+		*out_param = context->out_param;
+
+out:
+	spin_lock(&dev->cmd.context_lock);
+	context->next = dev->cmd.free_head;
+	dev->cmd.free_head = context - dev->cmd.context;
+	spin_unlock(&dev->cmd.context_lock);
+
+	up(&dev->cmd.event_sem);
+	return err;
+}
+
+/* Invoke a command with an output mailbox */
+static int mthca_cmd_box(struct mthca_dev *dev,
+			 u64 in_param,
+			 u64 out_param,
+			 u32 in_modifier,
+			 u8 op_modifier,
+			 u16 op,
+			 unsigned long timeout,
+			 u8 *status)
+{
+	if (dev->cmd.use_events)
+		return mthca_cmd_wait(dev, in_param, &out_param, 0,
+				      in_modifier, op_modifier, op,
+				      timeout, status);
+	else
+		return mthca_cmd_poll(dev, in_param, &out_param, 0,
+				      in_modifier, op_modifier, op,
+				      timeout, status);
+}
+
+/* Invoke a command with no output parameter */
+static int mthca_cmd(struct mthca_dev *dev,
+		     u64 in_param,
+		     u32 in_modifier,
+		     u8 op_modifier,
+		     u16 op,
+		     unsigned long timeout,
+		     u8 *status)
+{
+	return mthca_cmd_box(dev, in_param, 0, in_modifier,
+			     op_modifier, op, timeout, status);
+}
+
+/*
+ * Invoke a command with an immediate output parameter (and copy the
+ * output into the caller's out_param pointer after the command
+ * executes).
+ */
+static int mthca_cmd_imm(struct mthca_dev *dev,
+			 u64 in_param,
+			 u64 *out_param,
+			 u32 in_modifier,
+			 u8 op_modifier,
+			 u16 op,
+			 unsigned long timeout,
+			 u8 *status)
+{
+	if (dev->cmd.use_events)
+		return mthca_cmd_wait(dev, in_param, out_param, 1,
+				      in_modifier, op_modifier, op,
+				      timeout, status);
+	else
+		return mthca_cmd_poll(dev, in_param, out_param, 1,
+				      in_modifier, op_modifier, op,
+				      timeout, status);
+}
+
+/*
+ * Switch to using events to issue FW commands (should be called after
+ * event queue to command events has been initialized).
+ */
+int mthca_cmd_use_events(struct mthca_dev *dev)
+{
+	int i;
+
+	dev->cmd.context = kmalloc(dev->cmd.max_cmds *
+				   sizeof (struct mthca_cmd_context),
+				   GFP_KERNEL);
+	if (!dev->cmd.context)
+		return -ENOMEM;
+
+	for (i = 0; i < dev->cmd.max_cmds; ++i) {
+		dev->cmd.context[i].token = i;
+		dev->cmd.context[i].next = i + 1;
+		init_timer(&dev->cmd.context[i].timer);
+		dev->cmd.context[i].timer.data     =
+			(unsigned long) &dev->cmd.context[i];
+		dev->cmd.context[i].timer.function = event_timeout;
+	}
+
+	dev->cmd.context[dev->cmd.max_cmds - 1].next = -1;
+	dev->cmd.free_head = 0;
+
+	sema_init(&dev->cmd.event_sem, dev->cmd.max_cmds);
+	spin_lock_init(&dev->cmd.context_lock);
+
+	for (dev->cmd.token_mask = 1;
+	     dev->cmd.token_mask < dev->cmd.max_cmds;
+	     dev->cmd.token_mask <<= 1)
+		; /* nothing */
+	--dev->cmd.token_mask;
+
+	dev->cmd.use_events = 1;
+	down(&dev->cmd.poll_sem);
+
+	return 0;
+}
+
+/*
+ * Switch back to polling (used when shutting down the device)
+ */
+void mthca_cmd_use_polling(struct mthca_dev *dev)
+{
+	int i;
+
+	dev->cmd.use_events = 0;
+
+	for (i = 0; i < dev->cmd.max_cmds; ++i)
+		down(&dev->cmd.event_sem);
+
+	kfree(dev->cmd.context);
+
+	up(&dev->cmd.poll_sem);
+}
+
+int mthca_SYS_EN(struct mthca_dev *dev, u8 *status)
+{
+	u64 out;
+	int ret;
+
+	ret = mthca_cmd_imm(dev, 0, &out, 0, 0, CMD_SYS_EN, HZ, status);
+
+	if (*status == MTHCA_CMD_STAT_DDR_MEM_ERR)
+		mthca_warn(dev, "SYS_EN DDR error: syn=%x, sock=%d, "
+			   "sladdr=%d, SPD source=%s\n",
+			   (int) (out >> 6) & 0xf, (int) (out >> 4) & 3,
+			   (int) (out >> 1) & 7, (int) out & 1 ? "NVMEM" : "DIMM");
+
+	return ret;
+}
+
+int mthca_SYS_DIS(struct mthca_dev *dev, u8 *status)
+{
+	return mthca_cmd(dev, 0, 0, 0, CMD_SYS_DIS, HZ, status);
+}
+
+int mthca_MAP_FA(struct mthca_dev *dev, int count,
+		 struct scatterlist *sglist, u8 *status)
+{
+	u32 *inbox;
+	dma_addr_t indma;
+	int lg;
+	int nent = 0;
+	int i, j;
+	int err = 0;
+	int ts = 0;
+
+	inbox = pci_alloc_consistent(dev->pdev, PAGE_SIZE, &indma);
+	memset(inbox, 0, PAGE_SIZE);
+
+	for (i = 0; i < count; ++i) {
+		/*
+		 * We have to pass pages that are aligned to their
+		 * size, so find the least significant 1 in the
+		 * address or size and use that as our log2 size.
+		 */
+		lg = ffs(sg_dma_address(sglist + i) | sg_dma_len(sglist + i)) - 1;
+		if (lg < 12) {
+			mthca_warn(dev, "Got FW area not aligned to 4K (%llx/%x).\n",
+				   (unsigned long long) sg_dma_address(sglist + i),
+				   sg_dma_len(sglist + i));
+			err = -EINVAL;
+			goto out;
+		}
+		for (j = 0; j < sg_dma_len(sglist + i) / (1 << lg); ++j, ++nent) {
+			*((__be64 *) (inbox + nent * 4 + 2)) =
+				cpu_to_be64((sg_dma_address(sglist + i) +
+					     (j << lg)) |
+					    (lg - 12));
+			ts += 1 << (lg - 10);
+			if (nent == PAGE_SIZE / 16) {
+				err = mthca_cmd(dev, indma, nent, 0, CMD_MAP_FA,
+						CMD_TIME_CLASS_B, status);
+				if (err || *status)
+					goto out;
+				nent = 0;
+			}
+		}
+	}
+
+	if (nent) {
+		err = mthca_cmd(dev, indma, nent, 0, CMD_MAP_FA,
+				CMD_TIME_CLASS_B, status);
+	}
+
+	mthca_dbg(dev, "Mapped %d KB of host memory for FW.\n", ts);
+
+out:
+	pci_free_consistent(dev->pdev, PAGE_SIZE, inbox, indma);
+	return err;
+}
+
+int mthca_UNMAP_FA(struct mthca_dev *dev, u8 *status)
+{
+	return mthca_cmd(dev, 0, 0, 0, CMD_UNMAP_FA, CMD_TIME_CLASS_B, status);
+}
+
+int mthca_RUN_FW(struct mthca_dev *dev, u8 *status)
+{
+	return mthca_cmd(dev, 0, 0, 0, CMD_RUN_FW, CMD_TIME_CLASS_A, status);
+}
+
+int mthca_QUERY_FW(struct mthca_dev *dev, u8 *status)
+{
+	u32 *outbox;
+	dma_addr_t outdma;
+	int err = 0;
+	u8 lg;
+
+#define QUERY_FW_OUT_SIZE             0x100
+#define QUERY_FW_VER_OFFSET            0x00
+#define QUERY_FW_MAX_CMD_OFFSET        0x0f
+#define QUERY_FW_ERR_START_OFFSET      0x30
+#define QUERY_FW_ERR_SIZE_OFFSET       0x38
+
+#define QUERY_FW_START_OFFSET          0x20
+#define QUERY_FW_END_OFFSET            0x28
+
+#define QUERY_FW_SIZE_OFFSET           0x00
+#define QUERY_FW_CLR_INT_BASE_OFFSET   0x20
+#define QUERY_FW_EQ_ARM_BASE_OFFSET    0x40
+#define QUERY_FW_EQ_SET_CI_BASE_OFFSET 0x48
+
+	outbox = pci_alloc_consistent(dev->pdev, QUERY_FW_OUT_SIZE, &outdma);
+	if (!outbox) {
+		return -ENOMEM;
+	}
+
+	err = mthca_cmd_box(dev, 0, outdma, 0, 0, CMD_QUERY_FW,
+			    CMD_TIME_CLASS_A, status);
+
+	if (err)
+		goto out;
+
+	MTHCA_GET(dev->fw_ver,   outbox, QUERY_FW_VER_OFFSET);
+	/*
+	 * FW subminor version is at more signifant bits than minor
+	 * version, so swap here.
+	 */
+	dev->fw_ver = (dev->fw_ver & 0xffff00000000ull) |
+		((dev->fw_ver & 0xffff0000ull) >> 16) |
+		((dev->fw_ver & 0x0000ffffull) << 16);
+
+	MTHCA_GET(lg, outbox, QUERY_FW_MAX_CMD_OFFSET);
+	dev->cmd.max_cmds = 1 << lg;
+
+	mthca_dbg(dev, "FW version %012llx, max commands %d\n",
+		  (unsigned long long) dev->fw_ver, dev->cmd.max_cmds);
+
+	if (dev->hca_type == ARBEL_NATIVE) {
+		MTHCA_GET(dev->fw.arbel.fw_pages,       outbox, QUERY_FW_SIZE_OFFSET);
+		MTHCA_GET(dev->fw.arbel.clr_int_base,   outbox, QUERY_FW_CLR_INT_BASE_OFFSET);
+		MTHCA_GET(dev->fw.arbel.eq_arm_base,    outbox, QUERY_FW_EQ_ARM_BASE_OFFSET);
+		MTHCA_GET(dev->fw.arbel.eq_set_ci_base, outbox, QUERY_FW_EQ_SET_CI_BASE_OFFSET);
+		mthca_dbg(dev, "FW size %d KB\n", dev->fw.arbel.fw_pages << 2);
+
+		/*
+		 * Arbel page size is always 4 KB; round up number of
+		 * system pages needed.
+		 */
+		dev->fw.arbel.fw_pages =
+			(dev->fw.arbel.fw_pages + (1 << (PAGE_SHIFT - 12)) - 1) >>
+			(PAGE_SHIFT - 12);
+
+		mthca_dbg(dev, "Clear int @ %llx, EQ arm @ %llx, EQ set CI @ %llx\n",
+			  (unsigned long long) dev->fw.arbel.clr_int_base,
+			  (unsigned long long) dev->fw.arbel.eq_arm_base,
+			  (unsigned long long) dev->fw.arbel.eq_set_ci_base);
+	} else {
+		MTHCA_GET(dev->fw.tavor.fw_start, outbox, QUERY_FW_START_OFFSET);
+		MTHCA_GET(dev->fw.tavor.fw_end,   outbox, QUERY_FW_END_OFFSET);
+
+		mthca_dbg(dev, "FW size %d KB (start %llx, end %llx)\n",
+			  (int) ((dev->fw.tavor.fw_end - dev->fw.tavor.fw_start) >> 10),
+			  (unsigned long long) dev->fw.tavor.fw_start,
+			  (unsigned long long) dev->fw.tavor.fw_end);
+	}
+
+out:
+	pci_free_consistent(dev->pdev, QUERY_FW_OUT_SIZE, outbox, outdma);
+	return err;
+}
+
+int mthca_ENABLE_LAM(struct mthca_dev *dev, u8 *status)
+{
+	u8 info;
+	u32 *outbox;
+	dma_addr_t outdma;
+	int err = 0;
+
+#define ENABLE_LAM_OUT_SIZE         0x100
+#define ENABLE_LAM_START_OFFSET     0x00
+#define ENABLE_LAM_END_OFFSET       0x08
+#define ENABLE_LAM_INFO_OFFSET      0x13
+
+#define ENABLE_LAM_INFO_HIDDEN_FLAG (1 << 4)
+#define ENABLE_LAM_INFO_ECC_MASK    0x3
+
+	outbox = pci_alloc_consistent(dev->pdev, ENABLE_LAM_OUT_SIZE, &outdma);
+	if (!outbox)
+		return -ENOMEM;
+
+	err = mthca_cmd_box(dev, 0, outdma, 0, 0, CMD_ENABLE_LAM,
+			    CMD_TIME_CLASS_C, status);
+
+	if (err)
+		goto out;
+
+	if (*status == MTHCA_CMD_STAT_LAM_NOT_PRE)
+		goto out;
+
+	MTHCA_GET(dev->ddr_start, outbox, ENABLE_LAM_START_OFFSET);
+	MTHCA_GET(dev->ddr_end,   outbox, ENABLE_LAM_END_OFFSET);
+	MTHCA_GET(info,           outbox, ENABLE_LAM_INFO_OFFSET);
+
+	if (!!(info & ENABLE_LAM_INFO_HIDDEN_FLAG) !=
+	    !!(dev->mthca_flags & MTHCA_FLAG_DDR_HIDDEN)) {
+		mthca_info(dev, "FW reports that HCA-attached memory "
+			   "is %s hidden; does not match PCI config\n",
+			   (info & ENABLE_LAM_INFO_HIDDEN_FLAG) ?
+			   "" : "not");
+	}
+	if (info & ENABLE_LAM_INFO_HIDDEN_FLAG)
+		mthca_dbg(dev, "HCA-attached memory is hidden.\n");
+
+	mthca_dbg(dev, "HCA memory size %d KB (start %llx, end %llx)\n",
+		  (int) ((dev->ddr_end - dev->ddr_start) >> 10),
+		  (unsigned long long) dev->ddr_start,
+		  (unsigned long long) dev->ddr_end);
+
+out:
+	pci_free_consistent(dev->pdev, ENABLE_LAM_OUT_SIZE, outbox, outdma);
+	return err;
+}
+
+int mthca_DISABLE_LAM(struct mthca_dev *dev, u8 *status)
+{
+	return mthca_cmd(dev, 0, 0, 0, CMD_SYS_DIS, CMD_TIME_CLASS_C, status);
+}
+
+int mthca_QUERY_DDR(struct mthca_dev *dev, u8 *status)
+{
+	u8 info;
+	u32 *outbox;
+	dma_addr_t outdma;
+	int err = 0;
+
+#define QUERY_DDR_OUT_SIZE         0x100
+#define QUERY_DDR_START_OFFSET     0x00
+#define QUERY_DDR_END_OFFSET       0x08
+#define QUERY_DDR_INFO_OFFSET      0x13
+
+#define QUERY_DDR_INFO_HIDDEN_FLAG (1 << 4)
+#define QUERY_DDR_INFO_ECC_MASK    0x3
+
+	outbox = pci_alloc_consistent(dev->pdev, QUERY_DDR_OUT_SIZE, &outdma);
+	if (!outbox)
+		return -ENOMEM;
+
+	err = mthca_cmd_box(dev, 0, outdma, 0, 0, CMD_QUERY_DDR,
+			    CMD_TIME_CLASS_A, status);
+
+	if (err)
+		goto out;
+
+	MTHCA_GET(dev->ddr_start, outbox, QUERY_DDR_START_OFFSET);
+	MTHCA_GET(dev->ddr_end,   outbox, QUERY_DDR_END_OFFSET);
+	MTHCA_GET(info,           outbox, QUERY_DDR_INFO_OFFSET);
+
+	if (!!(info & QUERY_DDR_INFO_HIDDEN_FLAG) !=
+	    !!(dev->mthca_flags & MTHCA_FLAG_DDR_HIDDEN)) {
+		mthca_info(dev, "FW reports that HCA-attached memory "
+			   "is %s hidden; does not match PCI config\n",
+			   (info & QUERY_DDR_INFO_HIDDEN_FLAG) ?
+			   "" : "not");
+	}
+	if (info & QUERY_DDR_INFO_HIDDEN_FLAG)
+		mthca_dbg(dev, "HCA-attached memory is hidden.\n");
+
+	mthca_dbg(dev, "HCA memory size %d KB (start %llx, end %llx)\n",
+		  (int) ((dev->ddr_end - dev->ddr_start) >> 10),
+		  (unsigned long long) dev->ddr_start,
+		  (unsigned long long) dev->ddr_end);
+
+out:
+	pci_free_consistent(dev->pdev, QUERY_DDR_OUT_SIZE, outbox, outdma);
+	return err;
+}
+
+int mthca_QUERY_DEV_LIM(struct mthca_dev *dev,
+			struct mthca_dev_lim *dev_lim, u8 *status)
+{
+	u32 *outbox;
+	dma_addr_t outdma;
+	u8 field;
+	u16 size;
+	int err;
+
+#define QUERY_DEV_LIM_OUT_SIZE             0x100
+#define QUERY_DEV_LIM_MAX_SRQ_SZ_OFFSET     0x10
+#define QUERY_DEV_LIM_MAX_QP_SZ_OFFSET      0x11
+#define QUERY_DEV_LIM_RSVD_QP_OFFSET        0x12
+#define QUERY_DEV_LIM_MAX_QP_OFFSET         0x13
+#define QUERY_DEV_LIM_RSVD_SRQ_OFFSET       0x14
+#define QUERY_DEV_LIM_MAX_SRQ_OFFSET        0x15
+#define QUERY_DEV_LIM_RSVD_EEC_OFFSET       0x16
+#define QUERY_DEV_LIM_MAX_EEC_OFFSET        0x17
+#define QUERY_DEV_LIM_MAX_CQ_SZ_OFFSET      0x19
+#define QUERY_DEV_LIM_RSVD_CQ_OFFSET        0x1a
+#define QUERY_DEV_LIM_MAX_CQ_OFFSET         0x1b
+#define QUERY_DEV_LIM_MAX_MPT_OFFSET        0x1d
+#define QUERY_DEV_LIM_RSVD_EQ_OFFSET        0x1e
+#define QUERY_DEV_LIM_MAX_EQ_OFFSET         0x1f
+#define QUERY_DEV_LIM_RSVD_MTT_OFFSET       0x20
+#define QUERY_DEV_LIM_MAX_MRW_SZ_OFFSET     0x21
+#define QUERY_DEV_LIM_RSVD_MRW_OFFSET       0x22
+#define QUERY_DEV_LIM_MAX_MTT_SEG_OFFSET    0x23
+#define QUERY_DEV_LIM_MAX_AV_OFFSET         0x27
+#define QUERY_DEV_LIM_MAX_REQ_QP_OFFSET     0x29
+#define QUERY_DEV_LIM_MAX_RES_QP_OFFSET     0x2b
+#define QUERY_DEV_LIM_MAX_RDMA_OFFSET       0x2f
+#define QUERY_DEV_LIM_RSZ_SRQ_OFFSET        0x33
+#define QUERY_DEV_LIM_ACK_DELAY_OFFSET      0x35
+#define QUERY_DEV_LIM_MTU_WIDTH_OFFSET      0x36
+#define QUERY_DEV_LIM_VL_PORT_OFFSET        0x37
+#define QUERY_DEV_LIM_MAX_GID_OFFSET        0x3b
+#define QUERY_DEV_LIM_MAX_PKEY_OFFSET       0x3f
+#define QUERY_DEV_LIM_FLAGS_OFFSET          0x44
+#define QUERY_DEV_LIM_RSVD_UAR_OFFSET       0x48
+#define QUERY_DEV_LIM_UAR_SZ_OFFSET         0x49
+#define QUERY_DEV_LIM_PAGE_SZ_OFFSET        0x4b
+#define QUERY_DEV_LIM_MAX_SG_OFFSET         0x51
+#define QUERY_DEV_LIM_MAX_DESC_SZ_OFFSET    0x52
+#define QUERY_DEV_LIM_MAX_SG_RQ_OFFSET      0x55
+#define QUERY_DEV_LIM_MAX_DESC_SZ_RQ_OFFSET 0x56
+#define QUERY_DEV_LIM_MAX_QP_MCG_OFFSET     0x61
+#define QUERY_DEV_LIM_RSVD_MCG_OFFSET       0x62
+#define QUERY_DEV_LIM_MAX_MCG_OFFSET        0x63
+#define QUERY_DEV_LIM_RSVD_PD_OFFSET        0x64
+#define QUERY_DEV_LIM_MAX_PD_OFFSET         0x65
+#define QUERY_DEV_LIM_RSVD_RDD_OFFSET       0x66
+#define QUERY_DEV_LIM_MAX_RDD_OFFSET        0x67
+#define QUERY_DEV_LIM_EEC_ENTRY_SZ_OFFSET   0x80
+#define QUERY_DEV_LIM_QPC_ENTRY_SZ_OFFSET   0x82
+#define QUERY_DEV_LIM_EEEC_ENTRY_SZ_OFFSET  0x84
+#define QUERY_DEV_LIM_EQPC_ENTRY_SZ_OFFSET  0x86
+#define QUERY_DEV_LIM_EQC_ENTRY_SZ_OFFSET   0x88
+#define QUERY_DEV_LIM_CQC_ENTRY_SZ_OFFSET   0x8a
+#define QUERY_DEV_LIM_SRQ_ENTRY_SZ_OFFSET   0x8c
+#define QUERY_DEV_LIM_UAR_ENTRY_SZ_OFFSET   0x8e
+#define QUERY_DEV_LIM_MTT_ENTRY_SZ_OFFSET   0x90
+#define QUERY_DEV_LIM_MPT_ENTRY_SZ_OFFSET   0x92
+#define QUERY_DEV_LIM_PBL_SZ_OFFSET         0x96
+#define QUERY_DEV_LIM_BMME_FLAGS_OFFSET     0x97
+#define QUERY_DEV_LIM_RSVD_LKEY_OFFSET      0x98
+#define QUERY_DEV_LIM_LAMR_OFFSET           0x9f
+#define QUERY_DEV_LIM_MAX_ICM_SZ_OFFSET     0xa0
+
+	outbox = pci_alloc_consistent(dev->pdev, QUERY_DEV_LIM_OUT_SIZE, &outdma);
+	if (!outbox)
+		return -ENOMEM;
+
+	err = mthca_cmd_box(dev, 0, outdma, 0, 0, CMD_QUERY_DEV_LIM,
+			    CMD_TIME_CLASS_A, status);
+
+	if (err)
+		goto out;
+
+	MTHCA_GET(field, outbox, QUERY_DEV_LIM_MAX_SRQ_SZ_OFFSET);
+	dev_lim->max_srq_sz = 1 << field;
+	MTHCA_GET(field, outbox, QUERY_DEV_LIM_MAX_QP_SZ_OFFSET);
+	dev_lim->max_qp_sz = 1 << field;
+	MTHCA_GET(field, outbox, QUERY_DEV_LIM_RSVD_QP_OFFSET);
+	dev_lim->reserved_qps = 1 << (field & 0xf);
+	MTHCA_GET(field, outbox, QUERY_DEV_LIM_MAX_QP_OFFSET);
+	dev_lim->max_qps = 1 << (field & 0x1f);
+	MTHCA_GET(field, outbox, QUERY_DEV_LIM_RSVD_SRQ_OFFSET);
+	dev_lim->reserved_srqs = 1 << (field >> 4);
+	MTHCA_GET(field, outbox, QUERY_DEV_LIM_MAX_SRQ_OFFSET);
+	dev_lim->max_srqs = 1 << (field & 0x1f);
+	MTHCA_GET(field, outbox, QUERY_DEV_LIM_RSVD_EEC_OFFSET);
+	dev_lim->reserved_eecs = 1 << (field & 0xf);
+	MTHCA_GET(field, outbox, QUERY_DEV_LIM_MAX_EEC_OFFSET);
+	dev_lim->max_eecs = 1 << (field & 0x1f);
+	MTHCA_GET(field, outbox, QUERY_DEV_LIM_MAX_CQ_SZ_OFFSET);
+	dev_lim->max_cq_sz = 1 << field;
+	MTHCA_GET(field, outbox, QUERY_DEV_LIM_RSVD_CQ_OFFSET);
+	dev_lim->reserved_cqs = 1 << (field & 0xf);
+	MTHCA_GET(field, outbox, QUERY_DEV_LIM_MAX_CQ_OFFSET);
+	dev_lim->max_cqs = 1 << (field & 0x1f);
+	MTHCA_GET(field, outbox, QUERY_DEV_LIM_MAX_MPT_OFFSET);
+	dev_lim->max_mpts = 1 << (field & 0x3f);
+	MTHCA_GET(field, outbox, QUERY_DEV_LIM_RSVD_EQ_OFFSET);
+	dev_lim->reserved_eqs = 1 << (field & 0xf);
+	MTHCA_GET(field, outbox, QUERY_DEV_LIM_MAX_EQ_OFFSET);
+	dev_lim->max_eqs = 1 << (field & 0x7);
+	MTHCA_GET(field, outbox, QUERY_DEV_LIM_RSVD_MTT_OFFSET);
+	dev_lim->reserved_mtts = 1 << (field >> 4);
+	MTHCA_GET(field, outbox, QUERY_DEV_LIM_MAX_MRW_SZ_OFFSET);
+	dev_lim->max_mrw_sz = 1 << field;
+	MTHCA_GET(field, outbox, QUERY_DEV_LIM_RSVD_MRW_OFFSET);
+	dev_lim->reserved_mrws = 1 << (field & 0xf);
+	MTHCA_GET(field, outbox, QUERY_DEV_LIM_MAX_MTT_SEG_OFFSET);
+	dev_lim->max_mtt_seg = 1 << (field & 0x3f);
+	MTHCA_GET(field, outbox, QUERY_DEV_LIM_MAX_REQ_QP_OFFSET);
+	dev_lim->max_requester_per_qp = 1 << (field & 0x3f);
+	MTHCA_GET(field, outbox, QUERY_DEV_LIM_MAX_RES_QP_OFFSET);
+	dev_lim->max_responder_per_qp = 1 << (field & 0x3f);
+	MTHCA_GET(field, outbox, QUERY_DEV_LIM_MAX_RDMA_OFFSET);
+	dev_lim->max_rdma_global = 1 << (field & 0x3f);
+	MTHCA_GET(field, outbox, QUERY_DEV_LIM_ACK_DELAY_OFFSET);
+	dev_lim->local_ca_ack_delay = field & 0x1f;
+	MTHCA_GET(field, outbox, QUERY_DEV_LIM_MTU_WIDTH_OFFSET);
+	dev_lim->max_mtu        = field >> 4;
+	dev_lim->max_port_width = field & 0xf;
+	MTHCA_GET(field, outbox, QUERY_DEV_LIM_VL_PORT_OFFSET);
+	dev_lim->max_vl    = field >> 4;
+	dev_lim->num_ports = field & 0xf;
+	MTHCA_GET(field, outbox, QUERY_DEV_LIM_MAX_GID_OFFSET);
+	dev_lim->max_gids = 1 << (field & 0xf);
+	MTHCA_GET(field, outbox, QUERY_DEV_LIM_MAX_PKEY_OFFSET);
+	dev_lim->max_pkeys = 1 << (field & 0xf);
+	MTHCA_GET(dev_lim->flags, outbox, QUERY_DEV_LIM_FLAGS_OFFSET);
+	MTHCA_GET(field, outbox, QUERY_DEV_LIM_RSVD_UAR_OFFSET);
+	dev_lim->reserved_uars = field >> 4;
+	MTHCA_GET(field, outbox, QUERY_DEV_LIM_UAR_SZ_OFFSET);
+	dev_lim->uar_size = 1 << ((field & 0x3f) + 20);
+	MTHCA_GET(field, outbox, QUERY_DEV_LIM_PAGE_SZ_OFFSET);
+	dev_lim->min_page_sz = 1 << field;
+	MTHCA_GET(field, outbox, QUERY_DEV_LIM_MAX_SG_OFFSET);
+	dev_lim->max_sg = field;
+
+	MTHCA_GET(size, outbox, QUERY_DEV_LIM_MAX_DESC_SZ_OFFSET);
+	dev_lim->max_desc_sz = size;
+
+	MTHCA_GET(field, outbox, QUERY_DEV_LIM_MAX_QP_MCG_OFFSET);
+	dev_lim->max_qp_per_mcg = 1 << field;
+	MTHCA_GET(field, outbox, QUERY_DEV_LIM_RSVD_MCG_OFFSET);
+	dev_lim->reserved_mgms = field & 0xf;
+	MTHCA_GET(field, outbox, QUERY_DEV_LIM_MAX_MCG_OFFSET);
+	dev_lim->max_mcgs = 1 << field;
+	MTHCA_GET(field, outbox, QUERY_DEV_LIM_RSVD_PD_OFFSET);
+	dev_lim->reserved_pds = field >> 4;
+	MTHCA_GET(field, outbox, QUERY_DEV_LIM_MAX_PD_OFFSET);
+	dev_lim->max_pds = 1 << (field & 0x3f);
+	MTHCA_GET(field, outbox, QUERY_DEV_LIM_RSVD_RDD_OFFSET);
+	dev_lim->reserved_rdds = field >> 4;
+	MTHCA_GET(field, outbox, QUERY_DEV_LIM_MAX_RDD_OFFSET);
+	dev_lim->max_rdds = 1 << (field & 0x3f);
+
+	MTHCA_GET(size, outbox, QUERY_DEV_LIM_EEC_ENTRY_SZ_OFFSET);
+	dev_lim->eec_entry_sz = size;
+	MTHCA_GET(size, outbox, QUERY_DEV_LIM_QPC_ENTRY_SZ_OFFSET);
+	dev_lim->qpc_entry_sz = size;
+	MTHCA_GET(size, outbox, QUERY_DEV_LIM_EEEC_ENTRY_SZ_OFFSET);
+	dev_lim->eeec_entry_sz = size;
+	MTHCA_GET(size, outbox, QUERY_DEV_LIM_EQPC_ENTRY_SZ_OFFSET);
+	dev_lim->eqpc_entry_sz = size;
+	MTHCA_GET(size, outbox, QUERY_DEV_LIM_EQC_ENTRY_SZ_OFFSET);
+	dev_lim->eqc_entry_sz = size;
+	MTHCA_GET(size, outbox, QUERY_DEV_LIM_CQC_ENTRY_SZ_OFFSET);
+	dev_lim->cqc_entry_sz = size;
+	MTHCA_GET(size, outbox, QUERY_DEV_LIM_SRQ_ENTRY_SZ_OFFSET);
+	dev_lim->srq_entry_sz = size;
+	MTHCA_GET(size, outbox, QUERY_DEV_LIM_UAR_ENTRY_SZ_OFFSET);
+	dev_lim->uar_scratch_entry_sz = size;
+
+	mthca_dbg(dev, "Max QPs: %d, reserved QPs: %d, entry size: %d\n",
+		  dev_lim->max_qps, dev_lim->reserved_qps, dev_lim->qpc_entry_sz);
+	mthca_dbg(dev, "Max CQs: %d, reserved CQs: %d, entry size: %d\n",
+		  dev_lim->max_cqs, dev_lim->reserved_cqs, dev_lim->cqc_entry_sz);
+	mthca_dbg(dev, "Max EQs: %d, reserved EQs: %d, entry size: %d\n",
+		  dev_lim->max_eqs, dev_lim->reserved_eqs, dev_lim->eqc_entry_sz);
+	mthca_dbg(dev, "reserved MPTs: %d, reserved MTTs: %d\n",
+		  dev_lim->reserved_mrws, dev_lim->reserved_mtts);
+	mthca_dbg(dev, "Max PDs: %d, reserved PDs: %d, reserved UARs: %d\n",
+		  dev_lim->max_pds, dev_lim->reserved_pds, dev_lim->reserved_uars);
+	mthca_dbg(dev, "Max QP/MCG: %d, reserved MGMs: %d\n",
+		  dev_lim->max_pds, dev_lim->reserved_mgms);
+
+	mthca_dbg(dev, "Flags: %08x\n", dev_lim->flags);
+
+	if (dev->hca_type == ARBEL_NATIVE) {
+		MTHCA_GET(field, outbox, QUERY_DEV_LIM_RSZ_SRQ_OFFSET);
+		dev_lim->hca.arbel.resize_srq = field & 1;
+		MTHCA_GET(size, outbox, QUERY_DEV_LIM_MTT_ENTRY_SZ_OFFSET);
+		dev_lim->hca.arbel.mtt_entry_sz = size;
+		MTHCA_GET(size, outbox, QUERY_DEV_LIM_MPT_ENTRY_SZ_OFFSET);
+		dev_lim->hca.arbel.mpt_entry_sz = size;
+		MTHCA_GET(field, outbox, QUERY_DEV_LIM_PBL_SZ_OFFSET);
+		dev_lim->hca.arbel.max_pbl_sz = 1 << (field & 0x3f);
+		MTHCA_GET(dev_lim->hca.arbel.bmme_flags, outbox,
+			  QUERY_DEV_LIM_BMME_FLAGS_OFFSET);
+		MTHCA_GET(dev_lim->hca.arbel.reserved_lkey, outbox,
+			  QUERY_DEV_LIM_RSVD_LKEY_OFFSET);
+		MTHCA_GET(field, outbox, QUERY_DEV_LIM_LAMR_OFFSET);
+		dev_lim->hca.arbel.lam_required = field & 1;
+		MTHCA_GET(dev_lim->hca.arbel.max_icm_sz, outbox,
+			  QUERY_DEV_LIM_MAX_ICM_SZ_OFFSET);
+
+		if (dev_lim->hca.arbel.bmme_flags & 1)
+			mthca_dbg(dev, "Base MM extensions: yes "
+				  "(flags %d, max PBL %d, rsvd L_Key %08x)\n",
+				  dev_lim->hca.arbel.bmme_flags,
+				  dev_lim->hca.arbel.max_pbl_sz,
+				  dev_lim->hca.arbel.reserved_lkey);
+		else
+			mthca_dbg(dev, "Base MM extensions: no\n");
+
+		mthca_dbg(dev, "Max ICM size %lld MB\n",
+			  (unsigned long long) dev_lim->hca.arbel.max_icm_sz >> 20);
+	} else {
+		MTHCA_GET(field, outbox, QUERY_DEV_LIM_MAX_AV_OFFSET);
+		dev_lim->hca.tavor.max_avs = 1 << (field & 0x3f);
+	}
+
+out:
+	pci_free_consistent(dev->pdev, QUERY_DEV_LIM_OUT_SIZE, outbox, outdma);
+	return err;
+}
+
+int mthca_QUERY_ADAPTER(struct mthca_dev *dev,
+			struct mthca_adapter *adapter, u8 *status)
+{
+	u32 *outbox;
+	dma_addr_t outdma;
+	int err;
+
+#define QUERY_ADAPTER_OUT_SIZE             0x100
+#define QUERY_ADAPTER_VENDOR_ID_OFFSET     0x00
+#define QUERY_ADAPTER_DEVICE_ID_OFFSET     0x04
+#define QUERY_ADAPTER_REVISION_ID_OFFSET   0x08
+#define QUERY_ADAPTER_INTA_PIN_OFFSET      0x10
+
+	outbox = pci_alloc_consistent(dev->pdev, QUERY_ADAPTER_OUT_SIZE, &outdma);
+	if (!outbox)
+		return -ENOMEM;
+
+	err = mthca_cmd_box(dev, 0, outdma, 0, 0, CMD_QUERY_ADAPTER,
+			    CMD_TIME_CLASS_A, status);
+
+	if (err)
+		goto out;
+
+	MTHCA_GET(adapter->vendor_id, outbox, QUERY_ADAPTER_VENDOR_ID_OFFSET);
+	MTHCA_GET(adapter->device_id, outbox, QUERY_ADAPTER_DEVICE_ID_OFFSET);
+	MTHCA_GET(adapter->revision_id, outbox, QUERY_ADAPTER_REVISION_ID_OFFSET);
+	MTHCA_GET(adapter->inta_pin, outbox, QUERY_ADAPTER_INTA_PIN_OFFSET);
+
+out:
+	pci_free_consistent(dev->pdev, QUERY_DEV_LIM_OUT_SIZE, outbox, outdma);
+	return err;
+}
+
+int mthca_INIT_HCA(struct mthca_dev *dev,
+		   struct mthca_init_hca_param *param,
+		   u8 *status)
+{
+	u32 *inbox;
+	dma_addr_t indma;
+	int err;
+
+#define INIT_HCA_IN_SIZE             	 0x200
+#define INIT_HCA_FLAGS_OFFSET        	 0x014
+#define INIT_HCA_QPC_OFFSET          	 0x020
+#define  INIT_HCA_QPC_BASE_OFFSET    	 (INIT_HCA_QPC_OFFSET + 0x10)
+#define  INIT_HCA_LOG_QP_OFFSET      	 (INIT_HCA_QPC_OFFSET + 0x17)
+#define  INIT_HCA_EEC_BASE_OFFSET    	 (INIT_HCA_QPC_OFFSET + 0x20)
+#define  INIT_HCA_LOG_EEC_OFFSET     	 (INIT_HCA_QPC_OFFSET + 0x27)
+#define  INIT_HCA_SRQC_BASE_OFFSET   	 (INIT_HCA_QPC_OFFSET + 0x28)
+#define  INIT_HCA_LOG_SRQ_OFFSET     	 (INIT_HCA_QPC_OFFSET + 0x2f)
+#define  INIT_HCA_CQC_BASE_OFFSET    	 (INIT_HCA_QPC_OFFSET + 0x30)
+#define  INIT_HCA_LOG_CQ_OFFSET      	 (INIT_HCA_QPC_OFFSET + 0x37)
+#define  INIT_HCA_EQPC_BASE_OFFSET   	 (INIT_HCA_QPC_OFFSET + 0x40)
+#define  INIT_HCA_EEEC_BASE_OFFSET   	 (INIT_HCA_QPC_OFFSET + 0x50)
+#define  INIT_HCA_EQC_BASE_OFFSET    	 (INIT_HCA_QPC_OFFSET + 0x60)
+#define  INIT_HCA_LOG_EQ_OFFSET      	 (INIT_HCA_QPC_OFFSET + 0x67)
+#define  INIT_HCA_RDB_BASE_OFFSET    	 (INIT_HCA_QPC_OFFSET + 0x70)
+#define INIT_HCA_UDAV_OFFSET         	 0x0b0
+#define  INIT_HCA_UDAV_LKEY_OFFSET   	 (INIT_HCA_UDAV_OFFSET + 0x0)
+#define  INIT_HCA_UDAV_PD_OFFSET     	 (INIT_HCA_UDAV_OFFSET + 0x4)
+#define INIT_HCA_MCAST_OFFSET        	 0x0c0
+#define  INIT_HCA_MC_BASE_OFFSET         (INIT_HCA_MCAST_OFFSET + 0x00)
+#define  INIT_HCA_LOG_MC_ENTRY_SZ_OFFSET (INIT_HCA_MCAST_OFFSET + 0x12)
+#define  INIT_HCA_MC_HASH_SZ_OFFSET      (INIT_HCA_MCAST_OFFSET + 0x16)
+#define  INIT_HCA_LOG_MC_TABLE_SZ_OFFSET (INIT_HCA_MCAST_OFFSET + 0x1b)
+#define INIT_HCA_TPT_OFFSET              0x0f0
+#define  INIT_HCA_MPT_BASE_OFFSET        (INIT_HCA_TPT_OFFSET + 0x00)
+#define  INIT_HCA_MTT_SEG_SZ_OFFSET      (INIT_HCA_TPT_OFFSET + 0x09)
+#define  INIT_HCA_LOG_MPT_SZ_OFFSET      (INIT_HCA_TPT_OFFSET + 0x0b)
+#define  INIT_HCA_MTT_BASE_OFFSET        (INIT_HCA_TPT_OFFSET + 0x10)
+#define INIT_HCA_UAR_OFFSET              0x120
+#define  INIT_HCA_UAR_BASE_OFFSET        (INIT_HCA_UAR_OFFSET + 0x00)
+#define  INIT_HCA_UAR_PAGE_SZ_OFFSET     (INIT_HCA_UAR_OFFSET + 0x0b)
+#define  INIT_HCA_UAR_SCATCH_BASE_OFFSET (INIT_HCA_UAR_OFFSET + 0x10)
+
+	inbox = pci_alloc_consistent(dev->pdev, INIT_HCA_IN_SIZE, &indma);
+	if (!inbox)
+		return -ENOMEM;
+
+	memset(inbox, 0, INIT_HCA_IN_SIZE);
+
+#if defined(__LITTLE_ENDIAN)
+	*(inbox + INIT_HCA_FLAGS_OFFSET / 4) &= ~cpu_to_be32(1 << 1);
+#elif defined(__BIG_ENDIAN)
+	*(inbox + INIT_HCA_FLAGS_OFFSET / 4) |= cpu_to_be32(1 << 1);
+#else
+#error Host endianness not defined
+#endif
+	/* Check port for UD address vector: */
+	*(inbox + INIT_HCA_FLAGS_OFFSET / 4) |= cpu_to_be32(1);
+
+	/* We leave wqe_quota, responder_exu, etc as 0 (default) */
+
+	/* QPC/EEC/CQC/EQC/RDB attributes */
+
+	MTHCA_PUT(inbox, param->qpc_base,     INIT_HCA_QPC_BASE_OFFSET);
+	MTHCA_PUT(inbox, param->log_num_qps,  INIT_HCA_LOG_QP_OFFSET);
+	MTHCA_PUT(inbox, param->eec_base,     INIT_HCA_EEC_BASE_OFFSET);
+	MTHCA_PUT(inbox, param->log_num_eecs, INIT_HCA_LOG_EEC_OFFSET);
+	MTHCA_PUT(inbox, param->srqc_base,    INIT_HCA_SRQC_BASE_OFFSET);
+	MTHCA_PUT(inbox, param->log_num_srqs, INIT_HCA_LOG_SRQ_OFFSET);
+	MTHCA_PUT(inbox, param->cqc_base,     INIT_HCA_CQC_BASE_OFFSET);
+	MTHCA_PUT(inbox, param->log_num_cqs,  INIT_HCA_LOG_CQ_OFFSET);
+	MTHCA_PUT(inbox, param->eqpc_base,    INIT_HCA_EQPC_BASE_OFFSET);
+	MTHCA_PUT(inbox, param->eeec_base,    INIT_HCA_EEEC_BASE_OFFSET);
+	MTHCA_PUT(inbox, param->eqc_base,     INIT_HCA_EQC_BASE_OFFSET);
+	MTHCA_PUT(inbox, param->log_num_eqs,  INIT_HCA_LOG_EQ_OFFSET);
+	MTHCA_PUT(inbox, param->rdb_base,     INIT_HCA_RDB_BASE_OFFSET);
+
+	/* UD AV attributes */
+
+	/* multicast attributes */
+
+	MTHCA_PUT(inbox, param->mc_base,         INIT_HCA_MC_BASE_OFFSET);
+	MTHCA_PUT(inbox, param->log_mc_entry_sz, INIT_HCA_LOG_MC_ENTRY_SZ_OFFSET);
+	MTHCA_PUT(inbox, param->mc_hash_sz,      INIT_HCA_MC_HASH_SZ_OFFSET);
+	MTHCA_PUT(inbox, param->log_mc_table_sz, INIT_HCA_LOG_MC_TABLE_SZ_OFFSET);
+
+	/* TPT attributes */
+
+	MTHCA_PUT(inbox, param->mpt_base,   INIT_HCA_MPT_BASE_OFFSET);
+	MTHCA_PUT(inbox, param->mtt_seg_sz, INIT_HCA_MTT_SEG_SZ_OFFSET);
+	MTHCA_PUT(inbox, param->log_mpt_sz, INIT_HCA_LOG_MPT_SZ_OFFSET);
+	MTHCA_PUT(inbox, param->mtt_base,   INIT_HCA_MTT_BASE_OFFSET);
+
+	/* UAR attributes */
+	{
+		u8 uar_page_sz = PAGE_SHIFT - 12;
+		MTHCA_PUT(inbox, uar_page_sz, INIT_HCA_UAR_PAGE_SZ_OFFSET);
+		MTHCA_PUT(inbox, param->uar_scratch_base, INIT_HCA_UAR_SCATCH_BASE_OFFSET);
+	}
+
+	err = mthca_cmd(dev, indma, 0, 0, CMD_INIT_HCA,
+			HZ, status);
+
+	pci_free_consistent(dev->pdev, INIT_HCA_IN_SIZE, inbox, indma);
+	return err;
+}
+
+int mthca_INIT_IB(struct mthca_dev *dev,
+		  struct mthca_init_ib_param *param,
+		  int port, u8 *status)
+{
+	u32 *inbox;
+	dma_addr_t indma;
+	int err;
+	u32 flags;
+
+#define INIT_IB_IN_SIZE          56
+#define INIT_IB_FLAGS_OFFSET     0x00
+#define INIT_IB_FLAG_SIG         (1 << 18)
+#define INIT_IB_FLAG_NG          (1 << 17)
+#define INIT_IB_FLAG_G0          (1 << 16)
+#define INIT_IB_FLAG_1X          (1 << 8)
+#define INIT_IB_FLAG_4X          (1 << 9)
+#define INIT_IB_FLAG_12X         (1 << 11)
+#define INIT_IB_VL_SHIFT         4
+#define INIT_IB_MTU_SHIFT        12
+#define INIT_IB_MAX_GID_OFFSET   0x06
+#define INIT_IB_MAX_PKEY_OFFSET  0x0a
+#define INIT_IB_GUID0_OFFSET     0x10
+#define INIT_IB_NODE_GUID_OFFSET 0x18
+#define INIT_IB_SI_GUID_OFFSET   0x20
+
+	inbox = pci_alloc_consistent(dev->pdev, INIT_IB_IN_SIZE, &indma);
+	if (!inbox)
+		return -ENOMEM;
+
+	memset(inbox, 0, INIT_IB_IN_SIZE);
+
+	flags = 0;
+	flags |= param->enable_1x     ? INIT_IB_FLAG_1X  : 0;
+	flags |= param->enable_4x     ? INIT_IB_FLAG_4X  : 0;
+	flags |= param->set_guid0     ? INIT_IB_FLAG_G0  : 0;
+	flags |= param->set_node_guid ? INIT_IB_FLAG_NG  : 0;
+	flags |= param->set_si_guid   ? INIT_IB_FLAG_SIG : 0;
+	flags |= param->vl_cap << INIT_IB_VL_SHIFT;
+	flags |= param->mtu_cap << INIT_IB_MTU_SHIFT;
+	MTHCA_PUT(inbox, flags, INIT_IB_FLAGS_OFFSET);
+
+	MTHCA_PUT(inbox, param->gid_cap,   INIT_IB_MAX_GID_OFFSET);
+	MTHCA_PUT(inbox, param->pkey_cap,  INIT_IB_MAX_PKEY_OFFSET);
+	MTHCA_PUT(inbox, param->guid0,     INIT_IB_GUID0_OFFSET);
+	MTHCA_PUT(inbox, param->node_guid, INIT_IB_NODE_GUID_OFFSET);
+	MTHCA_PUT(inbox, param->si_guid,   INIT_IB_SI_GUID_OFFSET);
+
+	err = mthca_cmd(dev, indma, port, 0, CMD_INIT_IB,
+			CMD_TIME_CLASS_A, status);
+
+	pci_free_consistent(dev->pdev, INIT_HCA_IN_SIZE, inbox, indma);
+	return err;
+}
+
+int mthca_CLOSE_IB(struct mthca_dev *dev, int port, u8 *status)
+{
+	return mthca_cmd(dev, 0, port, 0, CMD_CLOSE_IB, HZ, status);
+}
+
+int mthca_CLOSE_HCA(struct mthca_dev *dev, int panic, u8 *status)
+{
+	return mthca_cmd(dev, 0, 0, panic, CMD_CLOSE_HCA, HZ, status);
+}
+
+int mthca_SW2HW_MPT(struct mthca_dev *dev, void *mpt_entry,
+		    int mpt_index, u8 *status)
+{
+	dma_addr_t indma;
+	int err;
+
+	indma = pci_map_single(dev->pdev, mpt_entry,
+			       MTHCA_MPT_ENTRY_SIZE,
+			       PCI_DMA_TODEVICE);
+	if (pci_dma_mapping_error(indma))
+		return -ENOMEM;
+
+	err = mthca_cmd(dev, indma, mpt_index, 0, CMD_SW2HW_MPT,
+			CMD_TIME_CLASS_B, status);
+
+	pci_unmap_single(dev->pdev, indma,
+			 MTHCA_MPT_ENTRY_SIZE, PCI_DMA_TODEVICE);
+	return err;
+}
+
+int mthca_HW2SW_MPT(struct mthca_dev *dev, void *mpt_entry,
+		    int mpt_index, u8 *status)
+{
+	dma_addr_t outdma = 0;
+	int err;
+
+	if (mpt_entry) {
+		outdma = pci_map_single(dev->pdev, mpt_entry,
+					MTHCA_MPT_ENTRY_SIZE,
+					PCI_DMA_FROMDEVICE);
+		if (pci_dma_mapping_error(outdma))
+			return -ENOMEM;
+	}
+
+	err = mthca_cmd_box(dev, 0, outdma, mpt_index, !mpt_entry,
+			    CMD_HW2SW_MPT,
+			    CMD_TIME_CLASS_B, status);
+
+	if (mpt_entry)
+		pci_unmap_single(dev->pdev, outdma,
+				 MTHCA_MPT_ENTRY_SIZE,
+				 PCI_DMA_FROMDEVICE);
+	return err;
+}
+
+int mthca_WRITE_MTT(struct mthca_dev *dev, u64 *mtt_entry,
+		    int num_mtt, u8 *status)
+{
+	dma_addr_t indma;
+	int err;
+
+	indma = pci_map_single(dev->pdev, mtt_entry,
+			       (num_mtt + 2) * 8,
+			       PCI_DMA_TODEVICE);
+	if (pci_dma_mapping_error(indma))
+		return -ENOMEM;
+
+	err = mthca_cmd(dev, indma, num_mtt, 0, CMD_WRITE_MTT,
+			CMD_TIME_CLASS_B, status);
+
+	pci_unmap_single(dev->pdev, indma,
+			 (num_mtt + 2) * 8, PCI_DMA_TODEVICE);
+	return err;
+}
+
+int mthca_MAP_EQ(struct mthca_dev *dev, u64 event_mask, int unmap,
+		 int eq_num, u8 *status)
+{
+	mthca_dbg(dev, "%s mask %016llx for eqn %d\n",
+		  unmap ? "Clearing" : "Setting",
+		  (unsigned long long) event_mask, eq_num);
+	return mthca_cmd(dev, event_mask, (unmap << 31) | eq_num,
+			 0, CMD_MAP_EQ, CMD_TIME_CLASS_B, status);
+}
+
+int mthca_SW2HW_EQ(struct mthca_dev *dev, void *eq_context,
+		   int eq_num, u8 *status)
+{
+	dma_addr_t indma;
+	int err;
+
+	indma = pci_map_single(dev->pdev, eq_context,
+			       MTHCA_EQ_CONTEXT_SIZE,
+			       PCI_DMA_TODEVICE);
+	if (pci_dma_mapping_error(indma))
+		return -ENOMEM;
+
+	err = mthca_cmd(dev, indma, eq_num, 0, CMD_SW2HW_EQ,
+			CMD_TIME_CLASS_A, status);
+
+	pci_unmap_single(dev->pdev, indma,
+			 MTHCA_EQ_CONTEXT_SIZE, PCI_DMA_TODEVICE);
+	return err;
+}
+
+int mthca_HW2SW_EQ(struct mthca_dev *dev, void *eq_context,
+		   int eq_num, u8 *status)
+{
+	dma_addr_t outdma = 0;
+	int err;
+
+	outdma = pci_map_single(dev->pdev, eq_context,
+				MTHCA_EQ_CONTEXT_SIZE,
+				PCI_DMA_FROMDEVICE);
+	if (pci_dma_mapping_error(outdma))
+		return -ENOMEM;
+
+	err = mthca_cmd_box(dev, 0, outdma, eq_num, 0,
+			    CMD_HW2SW_EQ,
+			    CMD_TIME_CLASS_A, status);
+
+	pci_unmap_single(dev->pdev, outdma,
+			 MTHCA_EQ_CONTEXT_SIZE,
+			 PCI_DMA_FROMDEVICE);
+	return err;
+}
+
+int mthca_SW2HW_CQ(struct mthca_dev *dev, void *cq_context,
+		   int cq_num, u8 *status)
+{
+	dma_addr_t indma;
+	int err;
+
+	indma = pci_map_single(dev->pdev, cq_context,
+			       MTHCA_CQ_CONTEXT_SIZE,
+			       PCI_DMA_TODEVICE);
+	if (pci_dma_mapping_error(indma))
+		return -ENOMEM;
+
+	err = mthca_cmd(dev, indma, cq_num, 0, CMD_SW2HW_CQ,
+			CMD_TIME_CLASS_A, status);
+
+	pci_unmap_single(dev->pdev, indma,
+			 MTHCA_CQ_CONTEXT_SIZE, PCI_DMA_TODEVICE);
+	return err;
+}
+
+int mthca_HW2SW_CQ(struct mthca_dev *dev, void *cq_context,
+		   int cq_num, u8 *status)
+{
+	dma_addr_t outdma = 0;
+	int err;
+
+	outdma = pci_map_single(dev->pdev, cq_context,
+				MTHCA_CQ_CONTEXT_SIZE,
+				PCI_DMA_FROMDEVICE);
+	if (pci_dma_mapping_error(outdma))
+		return -ENOMEM;
+
+	err = mthca_cmd_box(dev, 0, outdma, cq_num, 0,
+			    CMD_HW2SW_CQ,
+			    CMD_TIME_CLASS_A, status);
+
+	pci_unmap_single(dev->pdev, outdma,
+			 MTHCA_CQ_CONTEXT_SIZE,
+			 PCI_DMA_FROMDEVICE);
+	return err;
+}
+
+int mthca_MODIFY_QP(struct mthca_dev *dev, int trans, u32 num,
+		    int is_ee, void *qp_context, u32 optmask,
+		    u8 *status)
+{
+	static const u16 op[] = {
+		[MTHCA_TRANS_RST2INIT]  = CMD_RST2INIT_QPEE,
+		[MTHCA_TRANS_INIT2INIT] = CMD_INIT2INIT_QPEE,
+		[MTHCA_TRANS_INIT2RTR]  = CMD_INIT2RTR_QPEE,
+		[MTHCA_TRANS_RTR2RTS]   = CMD_RTR2RTS_QPEE,
+		[MTHCA_TRANS_RTS2RTS]   = CMD_RTS2RTS_QPEE,
+		[MTHCA_TRANS_SQERR2RTS] = CMD_SQERR2RTS_QPEE,
+		[MTHCA_TRANS_ANY2ERR]   = CMD_2ERR_QPEE,
+		[MTHCA_TRANS_RTS2SQD]   = CMD_RTS2SQD_QPEE,
+		[MTHCA_TRANS_SQD2SQD]   = CMD_SQD2SQD_QPEE,
+		[MTHCA_TRANS_SQD2RTS]   = CMD_SQD2RTS_QPEE,
+		[MTHCA_TRANS_ANY2RST]   = CMD_ERR2RST_QPEE
+	};
+	u8 op_mod = 0;
+
+	dma_addr_t indma;
+	int err;
+
+	if (trans < 0 || trans >= ARRAY_SIZE(op))
+		return -EINVAL;
+
+	if (trans == MTHCA_TRANS_ANY2RST) {
+		indma  = 0;
+		op_mod = 3;	/* don't write outbox, any->reset */
+
+		/* For debugging */
+		qp_context = pci_alloc_consistent(dev->pdev, MTHCA_QP_CONTEXT_SIZE,
+						  &indma);
+		op_mod = 2;	/* write outbox, any->reset */
+	} else {
+		indma = pci_map_single(dev->pdev, qp_context,
+				       MTHCA_QP_CONTEXT_SIZE,
+				       PCI_DMA_TODEVICE);
+		if (pci_dma_mapping_error(indma))
+			return -ENOMEM;
+
+		if (0) {
+			int i;
+			mthca_dbg(dev, "Dumping QP context:\n");
+			printk(" %08x\n", be32_to_cpup(qp_context));
+			for (i = 0; i < 0x100 / 4; ++i) {
+				if (i % 8 == 0)
+					printk("[%02x] ", i * 4);
+				printk(" %08x", be32_to_cpu(((u32 *) qp_context)[i + 2]));
+				if ((i + 1) % 8 == 0)
+					printk("\n");
+			}
+		}
+	}
+
+	if (trans == MTHCA_TRANS_ANY2RST) {
+		err = mthca_cmd_box(dev, 0, indma, (!!is_ee << 24) | num,
+				    op_mod, op[trans], CMD_TIME_CLASS_C, status);
+
+		if (0) {
+			int i;
+			mthca_dbg(dev, "Dumping QP context:\n");
+			printk(" %08x\n", be32_to_cpup(qp_context));
+			for (i = 0; i < 0x100 / 4; ++i) {
+				if (i % 8 == 0)
+					printk("[%02x] ", i * 4);
+				printk(" %08x", be32_to_cpu(((u32 *) qp_context)[i + 2]));
+				if ((i + 1) % 8 == 0)
+					printk("\n");
+			}
+		}
+
+	} else
+		err = mthca_cmd(dev, indma, (!!is_ee << 24) | num,
+				op_mod, op[trans], CMD_TIME_CLASS_C, status);
+
+	if (trans != MTHCA_TRANS_ANY2RST)
+		pci_unmap_single(dev->pdev, indma,
+				 MTHCA_QP_CONTEXT_SIZE, PCI_DMA_TODEVICE);
+	else
+		pci_free_consistent(dev->pdev, MTHCA_QP_CONTEXT_SIZE,
+				    qp_context, indma);
+	return err;
+}
+
+int mthca_QUERY_QP(struct mthca_dev *dev, u32 num, int is_ee,
+		   void *qp_context, u8 *status)
+{
+	dma_addr_t outdma = 0;
+	int err;
+
+	outdma = pci_map_single(dev->pdev, qp_context,
+				MTHCA_QP_CONTEXT_SIZE,
+				PCI_DMA_FROMDEVICE);
+	if (pci_dma_mapping_error(outdma))
+		return -ENOMEM;
+
+	err = mthca_cmd_box(dev, 0, outdma, (!!is_ee << 24) | num, 0,
+			    CMD_QUERY_QPEE,
+			    CMD_TIME_CLASS_A, status);
+
+	pci_unmap_single(dev->pdev, outdma,
+			 MTHCA_QP_CONTEXT_SIZE,
+			 PCI_DMA_FROMDEVICE);
+	return err;
+}
+
+int mthca_CONF_SPECIAL_QP(struct mthca_dev *dev, int type, u32 qpn,
+			  u8 *status)
+{
+	u8 op_mod;
+
+	switch (type) {
+	case IB_QPT_SMI:
+		op_mod = 0;
+		break;
+	case IB_QPT_GSI:
+		op_mod = 1;
+		break;
+	case IB_QPT_RAW_IPV6:
+		op_mod = 2;
+		break;
+	case IB_QPT_RAW_ETY:
+		op_mod = 3;
+		break;
+	default:
+		return -EINVAL;
+	}
+
+	return mthca_cmd(dev, 0, qpn, op_mod, CMD_CONF_SPECIAL_QP,
+			 CMD_TIME_CLASS_B, status);
+}
+
+int mthca_MAD_IFC(struct mthca_dev *dev, int ignore_mkey, int port,
+		  void *in_mad, void *response_mad, u8 *status) {
+	void *box;
+	dma_addr_t dma;
+	int err;
+
+#define MAD_IFC_BOX_SIZE 512
+
+	box = pci_alloc_consistent(dev->pdev, MAD_IFC_BOX_SIZE, &dma);
+	if (!box)
+		return -ENOMEM;
+
+	memcpy(box, in_mad, 256);
+
+	err = mthca_cmd_box(dev, dma, dma + 256, port, !!ignore_mkey,
+			    CMD_MAD_IFC, CMD_TIME_CLASS_C, status);
+
+	if (!err && !*status)
+		memcpy(response_mad, box + 256, 256);
+
+	pci_free_consistent(dev->pdev, MAD_IFC_BOX_SIZE, box, dma);
+	return err;
+}
+
+int mthca_READ_MGM(struct mthca_dev *dev, int index, void *mgm,
+		   u8 *status)
+{
+	dma_addr_t outdma = 0;
+	int err;
+
+	outdma = pci_map_single(dev->pdev, mgm,
+				MTHCA_MGM_ENTRY_SIZE,
+				PCI_DMA_FROMDEVICE);
+	if (pci_dma_mapping_error(outdma))
+		return -ENOMEM;
+
+	err = mthca_cmd_box(dev, 0, outdma, index, 0,
+			    CMD_READ_MGM,
+			    CMD_TIME_CLASS_A, status);
+
+	pci_unmap_single(dev->pdev, outdma,
+			 MTHCA_MGM_ENTRY_SIZE,
+			 PCI_DMA_FROMDEVICE);
+	return err;
+}
+
+int mthca_WRITE_MGM(struct mthca_dev *dev, int index, void *mgm,
+		    u8 *status)
+{
+	dma_addr_t indma;
+	int err;
+
+	indma = pci_map_single(dev->pdev, mgm,
+			       MTHCA_MGM_ENTRY_SIZE,
+			       PCI_DMA_TODEVICE);
+	if (pci_dma_mapping_error(indma))
+		return -ENOMEM;
+
+	err = mthca_cmd(dev, indma, index, 0, CMD_WRITE_MGM,
+			CMD_TIME_CLASS_A, status);
+
+	pci_unmap_single(dev->pdev, indma,
+			 MTHCA_MGM_ENTRY_SIZE, PCI_DMA_TODEVICE);
+	return err;
+}
+
+int mthca_MGID_HASH(struct mthca_dev *dev, void *gid, u16 *hash,
+		    u8 *status)
+{
+	dma_addr_t indma;
+	u64 imm;
+	int err;
+
+	indma = pci_map_single(dev->pdev, gid, 16, PCI_DMA_TODEVICE);
+	if (pci_dma_mapping_error(indma))
+		return -ENOMEM;
+
+	err = mthca_cmd_imm(dev, indma, &imm, 0, 0, CMD_MGID_HASH,
+			    CMD_TIME_CLASS_A, status);
+	*hash = imm;
+
+	pci_unmap_single(dev->pdev, indma, 16, PCI_DMA_TODEVICE);
+	return err;
+}
diff -Nru a/drivers/infiniband/hw/mthca/mthca_cmd.h b/drivers/infiniband/hw/mthca/mthca_cmd.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/hw/mthca/mthca_cmd.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,276 @@
+/*
+ * Copyright (c) 2004 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: mthca_cmd.h 1349 2004-12-16 21:09:43Z roland $
+ */
+
+#ifndef MTHCA_CMD_H
+#define MTHCA_CMD_H
+
+#include <ib_verbs.h>
+
+#define MTHCA_CMD_MAILBOX_ALIGN 16UL
+#define MTHCA_CMD_MAILBOX_EXTRA (MTHCA_CMD_MAILBOX_ALIGN - 1)
+
+enum {
+	/* command completed successfully: */
+	MTHCA_CMD_STAT_OK 	      = 0x00,
+	/* Internal error (such as a bus error) occurred while processing command: */
+	MTHCA_CMD_STAT_INTERNAL_ERR   = 0x01,
+	/* Operation/command not supported or opcode modifier not supported: */
+	MTHCA_CMD_STAT_BAD_OP 	      = 0x02,
+	/* Parameter not supported or parameter out of range: */
+	MTHCA_CMD_STAT_BAD_PARAM      = 0x03,
+	/* System not enabled or bad system state: */
+	MTHCA_CMD_STAT_BAD_SYS_STATE  = 0x04,
+	/* Attempt to access reserved or unallocaterd resource: */
+	MTHCA_CMD_STAT_BAD_RESOURCE   = 0x05,
+	/* Requested resource is currently executing a command, or is otherwise busy: */
+	MTHCA_CMD_STAT_RESOURCE_BUSY  = 0x06,
+	/* memory error: */
+	MTHCA_CMD_STAT_DDR_MEM_ERR    = 0x07,
+	/* Required capability exceeds device limits: */
+	MTHCA_CMD_STAT_EXCEED_LIM     = 0x08,
+	/* Resource is not in the appropriate state or ownership: */
+	MTHCA_CMD_STAT_BAD_RES_STATE  = 0x09,
+	/* Index out of range: */
+	MTHCA_CMD_STAT_BAD_INDEX      = 0x0a,
+	/* FW image corrupted: */
+	MTHCA_CMD_STAT_BAD_NVMEM      = 0x0b,
+	/* Attempt to modify a QP/EE which is not in the presumed state: */
+	MTHCA_CMD_STAT_BAD_QPEE_STATE = 0x10,
+	/* Bad segment parameters (Address/Size): */
+	MTHCA_CMD_STAT_BAD_SEG_PARAM  = 0x20,
+	/* Memory Region has Memory Windows bound to: */
+	MTHCA_CMD_STAT_REG_BOUND      = 0x21,
+	/* HCA local attached memory not present: */
+	MTHCA_CMD_STAT_LAM_NOT_PRE    = 0x22,
+        /* Bad management packet (silently discarded): */
+	MTHCA_CMD_STAT_BAD_PKT 	      = 0x30,
+        /* More outstanding CQEs in CQ than new CQ size: */
+	MTHCA_CMD_STAT_BAD_SIZE       = 0x40
+};
+
+enum {
+	MTHCA_TRANS_INVALID = 0,
+	MTHCA_TRANS_RST2INIT,
+	MTHCA_TRANS_INIT2INIT,
+	MTHCA_TRANS_INIT2RTR,
+	MTHCA_TRANS_RTR2RTS,
+	MTHCA_TRANS_RTS2RTS,
+	MTHCA_TRANS_SQERR2RTS,
+	MTHCA_TRANS_ANY2ERR,
+	MTHCA_TRANS_RTS2SQD,
+	MTHCA_TRANS_SQD2SQD,
+	MTHCA_TRANS_SQD2RTS,
+	MTHCA_TRANS_ANY2RST,
+};
+
+enum {
+	DEV_LIM_FLAG_SRQ = 1 << 6
+};
+
+struct mthca_dev_lim {
+	int max_srq_sz;
+	int max_qp_sz;
+	int reserved_qps;
+	int max_qps;
+	int reserved_srqs;
+	int max_srqs;
+	int reserved_eecs;
+	int max_eecs;
+	int max_cq_sz;
+	int reserved_cqs;
+	int max_cqs;
+	int max_mpts;
+	int reserved_eqs;
+	int max_eqs;
+	int reserved_mtts;
+	int max_mrw_sz;
+	int reserved_mrws;
+	int max_mtt_seg;
+	int max_requester_per_qp;
+	int max_responder_per_qp;
+	int max_rdma_global;
+	int local_ca_ack_delay;
+	int max_mtu;
+	int max_port_width;
+	int max_vl;
+	int num_ports;
+	int max_gids;
+	int max_pkeys;
+	u32 flags;
+	int reserved_uars;
+	int uar_size;
+	int min_page_sz;
+	int max_sg;
+	int max_desc_sz;
+	int max_qp_per_mcg;
+	int reserved_mgms;
+	int max_mcgs;
+	int reserved_pds;
+	int max_pds;
+	int reserved_rdds;
+	int max_rdds;
+	int eec_entry_sz;
+	int qpc_entry_sz;
+	int eeec_entry_sz;
+	int eqpc_entry_sz;
+	int eqc_entry_sz;
+	int cqc_entry_sz;
+	int srq_entry_sz;
+	int uar_scratch_entry_sz;
+	union {
+		struct {
+			int max_avs;
+		} tavor;
+		struct {
+			int resize_srq;
+			int mtt_entry_sz;
+			int mpt_entry_sz;
+			int max_pbl_sz;
+			u8  bmme_flags;
+			u32 reserved_lkey;
+			int lam_required;
+			u64 max_icm_sz;
+		} arbel;
+	} hca;
+};
+
+struct mthca_adapter {
+	u32 vendor_id;
+	u32 device_id;
+	u32 revision_id;
+	u8  inta_pin;
+};
+
+struct mthca_init_hca_param {
+	u64 qpc_base;
+	u8  log_num_qps;
+	u64 eec_base;
+	u8  log_num_eecs;
+	u64 srqc_base;
+	u8  log_num_srqs;
+	u64 cqc_base;
+	u8  log_num_cqs;
+	u64 eqpc_base;
+	u64 eeec_base;
+	u64 eqc_base;
+	u8  log_num_eqs;
+	u64 rdb_base;
+	u64 mc_base;
+	u16 log_mc_entry_sz;
+	u16 mc_hash_sz;
+	u8  log_mc_table_sz;
+	u64 mpt_base;
+	u8  mtt_seg_sz;
+	u8  log_mpt_sz;
+	u64 mtt_base;
+	u64 uar_scratch_base;
+};
+
+struct mthca_init_ib_param {
+	int enable_1x;
+	int enable_4x;
+	int vl_cap;
+	int mtu_cap;
+	u16 gid_cap;
+	u16 pkey_cap;
+	int set_guid0;
+	u64 guid0;
+	int set_node_guid;
+	u64 node_guid;
+	int set_si_guid;
+	u64 si_guid;
+};
+
+int mthca_cmd_use_events(struct mthca_dev *dev);
+void mthca_cmd_use_polling(struct mthca_dev *dev);
+void mthca_cmd_event(struct mthca_dev *dev, u16 token,
+		     u8  status, u64 out_param);
+
+int mthca_SYS_EN(struct mthca_dev *dev, u8 *status);
+int mthca_SYS_DIS(struct mthca_dev *dev, u8 *status);
+int mthca_MAP_FA(struct mthca_dev *dev, int count,
+		 struct scatterlist *sglist, u8 *status);
+int mthca_UNMAP_FA(struct mthca_dev *dev, u8 *status);
+int mthca_RUN_FW(struct mthca_dev *dev, u8 *status);
+int mthca_QUERY_FW(struct mthca_dev *dev, u8 *status);
+int mthca_ENABLE_LAM(struct mthca_dev *dev, u8 *status);
+int mthca_DISABLE_LAM(struct mthca_dev *dev, u8 *status);
+int mthca_QUERY_DDR(struct mthca_dev *dev, u8 *status);
+int mthca_QUERY_DEV_LIM(struct mthca_dev *dev,
+			struct mthca_dev_lim *dev_lim, u8 *status);
+int mthca_QUERY_ADAPTER(struct mthca_dev *dev,
+			struct mthca_adapter *adapter, u8 *status);
+int mthca_INIT_HCA(struct mthca_dev *dev,
+		   struct mthca_init_hca_param *param,
+		   u8 *status);
+int mthca_INIT_IB(struct mthca_dev *dev,
+		  struct mthca_init_ib_param *param,
+		  int port, u8 *status);
+int mthca_CLOSE_IB(struct mthca_dev *dev, int port, u8 *status);
+int mthca_CLOSE_HCA(struct mthca_dev *dev, int panic, u8 *status);
+int mthca_SW2HW_MPT(struct mthca_dev *dev, void *mpt_entry,
+		    int mpt_index, u8 *status);
+int mthca_HW2SW_MPT(struct mthca_dev *dev, void *mpt_entry,
+		    int mpt_index, u8 *status);
+int mthca_WRITE_MTT(struct mthca_dev *dev, u64 *mtt_entry,
+		    int num_mtt, u8 *status);
+int mthca_MAP_EQ(struct mthca_dev *dev, u64 event_mask, int unmap,
+		 int eq_num, u8 *status);
+int mthca_SW2HW_EQ(struct mthca_dev *dev, void *eq_context,
+		   int eq_num, u8 *status);
+int mthca_HW2SW_EQ(struct mthca_dev *dev, void *eq_context,
+		   int eq_num, u8 *status);
+int mthca_SW2HW_CQ(struct mthca_dev *dev, void *cq_context,
+		   int cq_num, u8 *status);
+int mthca_HW2SW_CQ(struct mthca_dev *dev, void *cq_context,
+		   int cq_num, u8 *status);
+int mthca_MODIFY_QP(struct mthca_dev *dev, int trans, u32 num,
+		    int is_ee, void *qp_context, u32 optmask,
+		    u8 *status);
+int mthca_QUERY_QP(struct mthca_dev *dev, u32 num, int is_ee,
+		   void *qp_context, u8 *status);
+int mthca_CONF_SPECIAL_QP(struct mthca_dev *dev, int type, u32 qpn,
+			  u8 *status);
+int mthca_MAD_IFC(struct mthca_dev *dev, int ignore_mkey, int port,
+		  void *in_mad, void *response_mad, u8 *status);
+int mthca_READ_MGM(struct mthca_dev *dev, int index, void *mgm,
+		   u8 *status);
+int mthca_WRITE_MGM(struct mthca_dev *dev, int index, void *mgm,
+		    u8 *status);
+int mthca_MGID_HASH(struct mthca_dev *dev, void *gid, u16 *hash,
+		    u8 *status);
+
+#define MAILBOX_ALIGN(x) ((void *) ALIGN((unsigned long) (x), MTHCA_CMD_MAILBOX_ALIGN))
+
+#endif /* MTHCA_CMD_H */
diff -Nru a/drivers/infiniband/hw/mthca/mthca_config_reg.h b/drivers/infiniband/hw/mthca/mthca_config_reg.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/hw/mthca/mthca_config_reg.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2004 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: mthca_config_reg.h 1349 2004-12-16 21:09:43Z roland $
+ */
+
+#ifndef MTHCA_CONFIG_REG_H
+#define MTHCA_CONFIG_REG_H
+
+#include <asm/page.h>
+
+#define MTHCA_HCR_BASE         0x80680
+#define MTHCA_HCR_SIZE         0x0001c
+#define MTHCA_ECR_BASE         0x80700
+#define MTHCA_ECR_SIZE         0x00008
+#define MTHCA_ECR_CLR_BASE     0x80708
+#define MTHCA_ECR_CLR_SIZE     0x00008
+#define MTHCA_ECR_OFFSET       (MTHCA_ECR_BASE     - MTHCA_HCR_BASE)
+#define MTHCA_ECR_CLR_OFFSET   (MTHCA_ECR_CLR_BASE - MTHCA_HCR_BASE)
+#define MTHCA_CLR_INT_BASE     0xf00d8
+#define MTHCA_CLR_INT_SIZE     0x00008
+
+#define MTHCA_MAP_HCR_SIZE     (MTHCA_ECR_CLR_BASE   + \
+			        MTHCA_ECR_CLR_SIZE   - \
+			        MTHCA_HCR_BASE)
+
+#endif /* MTHCA_CONFIG_REG_H */
diff -Nru a/drivers/infiniband/hw/mthca/mthca_cq.c b/drivers/infiniband/hw/mthca/mthca_cq.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/hw/mthca/mthca_cq.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,836 @@
+/*
+ * Copyright (c) 2004 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: mthca_cq.c 1369 2004-12-20 16:17:07Z roland $
+ */
+
+#include <linux/init.h>
+
+#include <ib_pack.h>
+
+#include "mthca_dev.h"
+#include "mthca_cmd.h"
+
+enum {
+	MTHCA_MAX_DIRECT_CQ_SIZE = 4 * PAGE_SIZE
+};
+
+enum {
+	MTHCA_CQ_ENTRY_SIZE = 0x20
+};
+
+/*
+ * Must be packed because start is 64 bits but only aligned to 32 bits.
+ */
+struct mthca_cq_context {
+	u32 flags;
+	u64 start;
+	u32 logsize_usrpage;
+	u32 error_eqn;
+	u32 comp_eqn;
+	u32 pd;
+	u32 lkey;
+	u32 last_notified_index;
+	u32 solicit_producer_index;
+	u32 consumer_index;
+	u32 producer_index;
+	u32 cqn;
+	u32 reserved[3];
+} __attribute__((packed));
+
+#define MTHCA_CQ_STATUS_OK          ( 0 << 28)
+#define MTHCA_CQ_STATUS_OVERFLOW    ( 9 << 28)
+#define MTHCA_CQ_STATUS_WRITE_FAIL  (10 << 28)
+#define MTHCA_CQ_FLAG_TR            ( 1 << 18)
+#define MTHCA_CQ_FLAG_OI            ( 1 << 17)
+#define MTHCA_CQ_STATE_DISARMED     ( 0 <<  8)
+#define MTHCA_CQ_STATE_ARMED        ( 1 <<  8)
+#define MTHCA_CQ_STATE_ARMED_SOL    ( 4 <<  8)
+#define MTHCA_EQ_STATE_FIRED        (10 <<  8)
+
+enum {
+	MTHCA_ERROR_CQE_OPCODE_MASK = 0xfe
+};
+
+enum {
+	SYNDROME_LOCAL_LENGTH_ERR 	 = 0x01,
+	SYNDROME_LOCAL_QP_OP_ERR  	 = 0x02,
+	SYNDROME_LOCAL_EEC_OP_ERR 	 = 0x03,
+	SYNDROME_LOCAL_PROT_ERR   	 = 0x04,
+	SYNDROME_WR_FLUSH_ERR     	 = 0x05,
+	SYNDROME_MW_BIND_ERR      	 = 0x06,
+	SYNDROME_BAD_RESP_ERR     	 = 0x10,
+	SYNDROME_LOCAL_ACCESS_ERR 	 = 0x11,
+	SYNDROME_REMOTE_INVAL_REQ_ERR 	 = 0x12,
+	SYNDROME_REMOTE_ACCESS_ERR 	 = 0x13,
+	SYNDROME_REMOTE_OP_ERR     	 = 0x14,
+	SYNDROME_RETRY_EXC_ERR 		 = 0x15,
+	SYNDROME_RNR_RETRY_EXC_ERR 	 = 0x16,
+	SYNDROME_LOCAL_RDD_VIOL_ERR 	 = 0x20,
+	SYNDROME_REMOTE_INVAL_RD_REQ_ERR = 0x21,
+	SYNDROME_REMOTE_ABORTED_ERR 	 = 0x22,
+	SYNDROME_INVAL_EECN_ERR 	 = 0x23,
+	SYNDROME_INVAL_EEC_STATE_ERR 	 = 0x24
+};
+
+struct mthca_cqe {
+	u32 my_qpn;
+	u32 my_ee;
+	u32 rqpn;
+	u16 sl_g_mlpath;
+	u16 rlid;
+	u32 imm_etype_pkey_eec;
+	u32 byte_cnt;
+	u32 wqe;
+	u8  opcode;
+	u8  is_send;
+	u8  reserved;
+	u8  owner;
+};
+
+struct mthca_err_cqe {
+	u32 my_qpn;
+	u32 reserved1[3];
+	u8  syndrome;
+	u8  reserved2;
+	u16 db_cnt;
+	u32 reserved3;
+	u32 wqe;
+	u8  opcode;
+	u8  reserved4[2];
+	u8  owner;
+};
+
+#define MTHCA_CQ_ENTRY_OWNER_SW      (0 << 7)
+#define MTHCA_CQ_ENTRY_OWNER_HW      (1 << 7)
+
+#define MTHCA_CQ_DB_INC_CI       (1 << 24)
+#define MTHCA_CQ_DB_REQ_NOT      (2 << 24)
+#define MTHCA_CQ_DB_REQ_NOT_SOL  (3 << 24)
+#define MTHCA_CQ_DB_SET_CI       (4 << 24)
+#define MTHCA_CQ_DB_REQ_NOT_MULT (5 << 24)
+
+static inline struct mthca_cqe *get_cqe(struct mthca_cq *cq, int entry)
+{
+	if (cq->is_direct)
+		return cq->queue.direct.buf + (entry * MTHCA_CQ_ENTRY_SIZE);
+	else
+		return cq->queue.page_list[entry * MTHCA_CQ_ENTRY_SIZE / PAGE_SIZE].buf
+			+ (entry * MTHCA_CQ_ENTRY_SIZE) % PAGE_SIZE;
+}
+
+static inline int cqe_sw(struct mthca_cq *cq, int i)
+{
+	return !(MTHCA_CQ_ENTRY_OWNER_HW &
+		 get_cqe(cq, i)->owner);
+}
+
+static inline int next_cqe_sw(struct mthca_cq *cq)
+{
+	return cqe_sw(cq, cq->cons_index);
+}
+
+static inline void set_cqe_hw(struct mthca_cq *cq, int entry)
+{
+	get_cqe(cq, entry)->owner = MTHCA_CQ_ENTRY_OWNER_HW;
+}
+
+static inline void inc_cons_index(struct mthca_dev *dev, struct mthca_cq *cq,
+				  int nent)
+{
+	u32 doorbell[2];
+
+	doorbell[0] = cpu_to_be32(MTHCA_CQ_DB_INC_CI | cq->cqn);
+	doorbell[1] = cpu_to_be32(nent - 1);
+
+	mthca_write64(doorbell,
+		      dev->kar + MTHCA_CQ_DOORBELL,
+		      MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock));
+}
+
+void mthca_cq_event(struct mthca_dev *dev, u32 cqn)
+{
+	struct mthca_cq *cq;
+
+	spin_lock(&dev->cq_table.lock);
+	cq = mthca_array_get(&dev->cq_table.cq, cqn & (dev->limits.num_cqs - 1));
+	if (cq)
+		atomic_inc(&cq->refcount);
+	spin_unlock(&dev->cq_table.lock);
+
+	if (!cq) {
+		mthca_warn(dev, "Completion event for bogus CQ %08x\n", cqn);
+		return;
+	}
+
+	cq->ibcq.comp_handler(&cq->ibcq, cq->ibcq.cq_context);
+
+	if (atomic_dec_and_test(&cq->refcount))
+		wake_up(&cq->wait);
+}
+
+void mthca_cq_clean(struct mthca_dev *dev, u32 cqn, u32 qpn)
+{
+	struct mthca_cq *cq;
+	struct mthca_cqe *cqe;
+	int prod_index;
+	int nfreed = 0;
+
+	spin_lock_irq(&dev->cq_table.lock);
+	cq = mthca_array_get(&dev->cq_table.cq, cqn & (dev->limits.num_cqs - 1));
+	if (cq)
+		atomic_inc(&cq->refcount);
+	spin_unlock_irq(&dev->cq_table.lock);
+
+	if (!cq)
+		return;
+
+	spin_lock_irq(&cq->lock);
+
+	/*
+	 * First we need to find the current producer index, so we
+	 * know where to start cleaning from.  It doesn't matter if HW
+	 * adds new entries after this loop -- the QP we're worried
+	 * about is already in RESET, so the new entries won't come
+	 * from our QP and therefore don't need to be checked.
+	 */
+	for (prod_index = cq->cons_index;
+	     cqe_sw(cq, prod_index & cq->ibcq.cqe);
+	     ++prod_index)
+		if (prod_index == cq->cons_index + cq->ibcq.cqe)
+			break;
+
+	if (0)
+		mthca_dbg(dev, "Cleaning QPN %06x from CQN %06x; ci %d, pi %d\n",
+			  qpn, cqn, cq->cons_index, prod_index);
+
+	/*
+	 * Now sweep backwards through the CQ, removing CQ entries
+	 * that match our QP by copying older entries on top of them.
+	 */
+	while (prod_index > cq->cons_index) {
+		cqe = get_cqe(cq, (prod_index - 1) & cq->ibcq.cqe);
+		if (cqe->my_qpn == cpu_to_be32(qpn))
+			++nfreed;
+		else if (nfreed)
+			memcpy(get_cqe(cq, (prod_index - 1 + nfreed) &
+				       cq->ibcq.cqe),
+			       cqe,
+			       MTHCA_CQ_ENTRY_SIZE);
+		--prod_index;
+	}
+
+	if (nfreed) {
+		wmb();
+		inc_cons_index(dev, cq, nfreed);
+		cq->cons_index = (cq->cons_index + nfreed) & cq->ibcq.cqe;
+	}
+
+	spin_unlock_irq(&cq->lock);
+	if (atomic_dec_and_test(&cq->refcount))
+		wake_up(&cq->wait);
+}
+
+static int handle_error_cqe(struct mthca_dev *dev, struct mthca_cq *cq,
+			    struct mthca_qp *qp, int wqe_index, int is_send,
+			    struct mthca_err_cqe *cqe,
+			    struct ib_wc *entry, int *free_cqe)
+{
+	int err;
+	int dbd;
+	u32 new_wqe;
+
+	if (1 && cqe->syndrome != SYNDROME_WR_FLUSH_ERR) {
+		int j;
+
+		mthca_dbg(dev, "%x/%d: error CQE -> QPN %06x, WQE @ %08x\n",
+			  cq->cqn, cq->cons_index, be32_to_cpu(cqe->my_qpn),
+			  be32_to_cpu(cqe->wqe));
+
+		for (j = 0; j < 8; ++j)
+			printk(KERN_DEBUG "  [%2x] %08x\n",
+			       j * 4, be32_to_cpu(((u32 *) cqe)[j]));
+	}
+
+	/*
+	 * For completions in error, only work request ID, status (and
+	 * freed resource count for RD) have to be set.
+	 */
+	switch (cqe->syndrome) {
+	case SYNDROME_LOCAL_LENGTH_ERR:
+		entry->status = IB_WC_LOC_LEN_ERR;
+		break;
+	case SYNDROME_LOCAL_QP_OP_ERR:
+		entry->status = IB_WC_LOC_QP_OP_ERR;
+		break;
+	case SYNDROME_LOCAL_EEC_OP_ERR:
+		entry->status = IB_WC_LOC_EEC_OP_ERR;
+		break;
+	case SYNDROME_LOCAL_PROT_ERR:
+		entry->status = IB_WC_LOC_PROT_ERR;
+		break;
+	case SYNDROME_WR_FLUSH_ERR:
+		entry->status = IB_WC_WR_FLUSH_ERR;
+		break;
+	case SYNDROME_MW_BIND_ERR:
+		entry->status = IB_WC_MW_BIND_ERR;
+		break;
+	case SYNDROME_BAD_RESP_ERR:
+		entry->status = IB_WC_BAD_RESP_ERR;
+		break;
+	case SYNDROME_LOCAL_ACCESS_ERR:
+		entry->status = IB_WC_LOC_ACCESS_ERR;
+		break;
+	case SYNDROME_REMOTE_INVAL_REQ_ERR:
+		entry->status = IB_WC_REM_INV_REQ_ERR;
+		break;
+	case SYNDROME_REMOTE_ACCESS_ERR:
+		entry->status = IB_WC_REM_ACCESS_ERR;
+		break;
+	case SYNDROME_REMOTE_OP_ERR:
+		entry->status = IB_WC_REM_OP_ERR;
+		break;
+	case SYNDROME_RETRY_EXC_ERR:
+		entry->status = IB_WC_RETRY_EXC_ERR;
+		break;
+	case SYNDROME_RNR_RETRY_EXC_ERR:
+		entry->status = IB_WC_RNR_RETRY_EXC_ERR;
+		break;
+	case SYNDROME_LOCAL_RDD_VIOL_ERR:
+		entry->status = IB_WC_LOC_RDD_VIOL_ERR;
+		break;
+	case SYNDROME_REMOTE_INVAL_RD_REQ_ERR:
+		entry->status = IB_WC_REM_INV_RD_REQ_ERR;
+		break;
+	case SYNDROME_REMOTE_ABORTED_ERR:
+		entry->status = IB_WC_REM_ABORT_ERR;
+		break;
+	case SYNDROME_INVAL_EECN_ERR:
+		entry->status = IB_WC_INV_EECN_ERR;
+		break;
+	case SYNDROME_INVAL_EEC_STATE_ERR:
+		entry->status = IB_WC_INV_EEC_STATE_ERR;
+		break;
+	default:
+		entry->status = IB_WC_GENERAL_ERR;
+		break;
+	}
+
+	err = mthca_free_err_wqe(qp, is_send, wqe_index, &dbd, &new_wqe);
+	if (err)
+		return err;
+
+	/*
+	 * If we're at the end of the WQE chain, or we've used up our
+	 * doorbell count, free the CQE.  Otherwise just update it for
+	 * the next poll operation.
+	 */
+	if (!(new_wqe & cpu_to_be32(0x3f)) || (!cqe->db_cnt && dbd))
+		return 0;
+
+	cqe->db_cnt   = cpu_to_be16(be16_to_cpu(cqe->db_cnt) - dbd);
+	cqe->wqe      = new_wqe;
+	cqe->syndrome = SYNDROME_WR_FLUSH_ERR;
+
+	*free_cqe = 0;
+
+	return 0;
+}
+
+static void dump_cqe(struct mthca_cqe *cqe)
+{
+	int j;
+
+	for (j = 0; j < 8; ++j)
+		printk(KERN_DEBUG "  [%2x] %08x\n",
+		       j * 4, be32_to_cpu(((u32 *) cqe)[j]));
+}
+
+static inline int mthca_poll_one(struct mthca_dev *dev,
+				 struct mthca_cq *cq,
+				 struct mthca_qp **cur_qp,
+				 int *freed,
+				 struct ib_wc *entry)
+{
+	struct mthca_wq *wq;
+	struct mthca_cqe *cqe;
+	int wqe_index;
+	int is_error = 0;
+	int is_send;
+	int free_cqe = 1;
+	int err = 0;
+
+	if (!next_cqe_sw(cq))
+		return -EAGAIN;
+
+	rmb();
+
+	cqe = get_cqe(cq, cq->cons_index);
+
+	if (0) {
+		mthca_dbg(dev, "%x/%d: CQE -> QPN %06x, WQE @ %08x\n",
+			  cq->cqn, cq->cons_index, be32_to_cpu(cqe->my_qpn),
+			  be32_to_cpu(cqe->wqe));
+
+		dump_cqe(cqe);
+	}
+
+	if ((cqe->opcode & MTHCA_ERROR_CQE_OPCODE_MASK) ==
+	    MTHCA_ERROR_CQE_OPCODE_MASK) {
+		is_error = 1;
+		is_send = cqe->opcode & 1;
+	} else
+		is_send = cqe->is_send & 0x80;
+
+	if (!*cur_qp || be32_to_cpu(cqe->my_qpn) != (*cur_qp)->qpn) {
+		if (*cur_qp) {
+			if (*freed) {
+				wmb();
+				inc_cons_index(dev, cq, *freed);
+				*freed = 0;
+			}
+			spin_unlock(&(*cur_qp)->lock);
+			if (atomic_dec_and_test(&(*cur_qp)->refcount))
+				wake_up(&(*cur_qp)->wait);
+		}
+
+		spin_lock(&dev->qp_table.lock);
+		*cur_qp = mthca_array_get(&dev->qp_table.qp,
+					  be32_to_cpu(cqe->my_qpn) &
+					  (dev->limits.num_qps - 1));
+		if (*cur_qp)
+			atomic_inc(&(*cur_qp)->refcount);
+		spin_unlock(&dev->qp_table.lock);
+
+		if (!*cur_qp) {
+			mthca_warn(dev, "CQ entry for unknown QP %06x\n",
+				   be32_to_cpu(cqe->my_qpn) & 0xffffff);
+			err = -EINVAL;
+			goto out;
+		}
+
+		spin_lock(&(*cur_qp)->lock);
+	}
+
+	if (is_send) {
+		wq = &(*cur_qp)->sq;
+		wqe_index = ((be32_to_cpu(cqe->wqe) - (*cur_qp)->send_wqe_offset)
+			     >> wq->wqe_shift);
+		entry->wr_id = (*cur_qp)->wrid[wqe_index +
+					       (*cur_qp)->rq.max];
+	} else {
+		wq = &(*cur_qp)->rq;
+		wqe_index = be32_to_cpu(cqe->wqe) >> wq->wqe_shift;
+		entry->wr_id = (*cur_qp)->wrid[wqe_index];
+	}
+
+	if (wq->last_comp < wqe_index)
+		wq->cur -= wqe_index - wq->last_comp;
+	else
+		wq->cur -= wq->max - wq->last_comp + wqe_index;
+
+	wq->last_comp = wqe_index;
+
+	if (0)
+		mthca_dbg(dev, "%s completion for QP %06x, index %d (nr %d)\n",
+			  is_send ? "Send" : "Receive",
+			  (*cur_qp)->qpn, wqe_index, wq->max);
+
+	if (is_error) {
+		err = handle_error_cqe(dev, cq, *cur_qp, wqe_index, is_send,
+				       (struct mthca_err_cqe *) cqe,
+				       entry, &free_cqe);
+		goto out;
+	}
+
+	if (is_send) {
+		entry->opcode = IB_WC_SEND; /* XXX */
+	} else {
+		entry->byte_len = be32_to_cpu(cqe->byte_cnt);
+		switch (cqe->opcode & 0x1f) {
+		case IB_OPCODE_SEND_LAST_WITH_IMMEDIATE:
+		case IB_OPCODE_SEND_ONLY_WITH_IMMEDIATE:
+			entry->wc_flags = IB_WC_WITH_IMM;
+			entry->imm_data = cqe->imm_etype_pkey_eec;
+			entry->opcode = IB_WC_RECV;
+			break;
+		case IB_OPCODE_RDMA_WRITE_LAST_WITH_IMMEDIATE:
+		case IB_OPCODE_RDMA_WRITE_ONLY_WITH_IMMEDIATE:
+			entry->wc_flags = IB_WC_WITH_IMM;
+			entry->imm_data = cqe->imm_etype_pkey_eec;
+			entry->opcode = IB_WC_RECV_RDMA_WITH_IMM;
+			break;
+		default:
+			entry->wc_flags = 0;
+			entry->opcode = IB_WC_RECV;
+			break;
+		}
+		entry->slid 	   = be16_to_cpu(cqe->rlid);
+		entry->sl   	   = be16_to_cpu(cqe->sl_g_mlpath) >> 12;
+		entry->src_qp 	   = be32_to_cpu(cqe->rqpn) & 0xffffff;
+		entry->dlid_path_bits = be16_to_cpu(cqe->sl_g_mlpath) & 0x7f;
+		entry->pkey_index  = be32_to_cpu(cqe->imm_etype_pkey_eec) >> 16;
+		entry->wc_flags   |= be16_to_cpu(cqe->sl_g_mlpath) & 0x80 ?
+					IB_WC_GRH : 0;
+	}
+
+	entry->status = IB_WC_SUCCESS;
+
+ out:
+	if (free_cqe) {
+		set_cqe_hw(cq, cq->cons_index);
+		++(*freed);
+		cq->cons_index = (cq->cons_index + 1) & cq->ibcq.cqe;
+	}
+
+	return err;
+}
+
+int mthca_poll_cq(struct ib_cq *ibcq, int num_entries,
+		  struct ib_wc *entry)
+{
+	struct mthca_dev *dev = to_mdev(ibcq->device);
+	struct mthca_cq *cq = to_mcq(ibcq);
+	struct mthca_qp *qp = NULL;
+	unsigned long flags;
+	int err = 0;
+	int freed = 0;
+	int npolled;
+
+	spin_lock_irqsave(&cq->lock, flags);
+
+	for (npolled = 0; npolled < num_entries; ++npolled) {
+		err = mthca_poll_one(dev, cq, &qp,
+				     &freed, entry + npolled);
+		if (err)
+			break;
+	}
+
+	if (freed) {
+		wmb();
+		inc_cons_index(dev, cq, freed);
+	}
+
+	if (qp) {
+		spin_unlock(&qp->lock);
+		if (atomic_dec_and_test(&qp->refcount))
+			wake_up(&qp->wait);
+	}
+
+
+	spin_unlock_irqrestore(&cq->lock, flags);
+
+	return err == 0 || err == -EAGAIN ? npolled : err;
+}
+
+void mthca_arm_cq(struct mthca_dev *dev, struct mthca_cq *cq,
+		  int solicited)
+{
+	u32 doorbell[2];
+
+	doorbell[0] =  cpu_to_be32((solicited ?
+				    MTHCA_CQ_DB_REQ_NOT_SOL :
+				    MTHCA_CQ_DB_REQ_NOT)      |
+				   cq->cqn);
+	doorbell[1] = 0xffffffff;
+
+	mthca_write64(doorbell,
+		      dev->kar + MTHCA_CQ_DOORBELL,
+		      MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock));
+}
+
+int mthca_init_cq(struct mthca_dev *dev, int nent,
+		  struct mthca_cq *cq)
+{
+	int size = nent * MTHCA_CQ_ENTRY_SIZE;
+	dma_addr_t t;
+	void *mailbox = NULL;
+	int npages, shift;
+	u64 *dma_list = NULL;
+	struct mthca_cq_context *cq_context;
+	int err = -ENOMEM;
+	u8 status;
+	int i;
+
+	might_sleep();
+
+	mailbox = kmalloc(sizeof (struct mthca_cq_context) + MTHCA_CMD_MAILBOX_EXTRA,
+			  GFP_KERNEL);
+	if (!mailbox)
+		goto err_out;
+
+	cq_context = MAILBOX_ALIGN(mailbox);
+
+	if (size <= MTHCA_MAX_DIRECT_CQ_SIZE) {
+		if (0)
+			mthca_dbg(dev, "Creating direct CQ of size %d\n", size);
+
+		cq->is_direct = 1;
+		npages        = 1;
+		shift         = get_order(size) + PAGE_SHIFT;
+
+		cq->queue.direct.buf = pci_alloc_consistent(dev->pdev,
+							    size, &t);
+		if (!cq->queue.direct.buf)
+			goto err_out;
+
+		pci_unmap_addr_set(&cq->queue.direct, mapping, t);
+
+		memset(cq->queue.direct.buf, 0, size);
+
+		while (t & ((1 << shift) - 1)) {
+			--shift;
+			npages *= 2;
+		}
+
+		dma_list = kmalloc(npages * sizeof *dma_list, GFP_KERNEL);
+		if (!dma_list)
+			goto err_out_free;
+
+		for (i = 0; i < npages; ++i)
+			dma_list[i] = t + i * (1 << shift);
+	} else {
+		cq->is_direct = 0;
+		npages        = (size + PAGE_SIZE - 1) / PAGE_SIZE;
+		shift         = PAGE_SHIFT;
+
+		if (0)
+			mthca_dbg(dev, "Creating indirect CQ with %d pages\n", npages);
+
+		dma_list = kmalloc(npages * sizeof *dma_list, GFP_KERNEL);
+		if (!dma_list)
+			goto err_out;
+
+		cq->queue.page_list = kmalloc(npages * sizeof *cq->queue.page_list,
+					      GFP_KERNEL);
+		if (!cq->queue.page_list)
+			goto err_out;
+
+		for (i = 0; i < npages; ++i)
+			cq->queue.page_list[i].buf = NULL;
+
+		for (i = 0; i < npages; ++i) {
+			cq->queue.page_list[i].buf =
+				pci_alloc_consistent(dev->pdev, PAGE_SIZE, &t);
+			if (!cq->queue.page_list[i].buf)
+				goto err_out_free;
+
+			dma_list[i] = t;
+			pci_unmap_addr_set(&cq->queue.page_list[i], mapping, t);
+
+			memset(cq->queue.page_list[i].buf, 0, PAGE_SIZE);
+		}
+	}
+
+	for (i = 0; i < nent; ++i)
+		set_cqe_hw(cq, i);
+
+	cq->cqn = mthca_alloc(&dev->cq_table.alloc);
+	if (cq->cqn == -1)
+		goto err_out_free;
+
+	err = mthca_mr_alloc_phys(dev, dev->driver_pd.pd_num,
+				  dma_list, shift, npages,
+				  0, size,
+				  MTHCA_MPT_FLAG_LOCAL_WRITE |
+				  MTHCA_MPT_FLAG_LOCAL_READ,
+				  &cq->mr);
+	if (err)
+		goto err_out_free_cq;
+
+	spin_lock_init(&cq->lock);
+	atomic_set(&cq->refcount, 1);
+	init_waitqueue_head(&cq->wait);
+
+	memset(cq_context, 0, sizeof *cq_context);
+	cq_context->flags           = cpu_to_be32(MTHCA_CQ_STATUS_OK      |
+						  MTHCA_CQ_STATE_DISARMED |
+						  MTHCA_CQ_FLAG_TR);
+	cq_context->start           = cpu_to_be64(0);
+	cq_context->logsize_usrpage = cpu_to_be32((ffs(nent) - 1) << 24 |
+						  MTHCA_KAR_PAGE);
+	cq_context->error_eqn       = cpu_to_be32(dev->eq_table.eq[MTHCA_EQ_ASYNC].eqn);
+	cq_context->comp_eqn        = cpu_to_be32(dev->eq_table.eq[MTHCA_EQ_COMP].eqn);
+	cq_context->pd              = cpu_to_be32(dev->driver_pd.pd_num);
+	cq_context->lkey            = cpu_to_be32(cq->mr.ibmr.lkey);
+	cq_context->cqn             = cpu_to_be32(cq->cqn);
+
+	err = mthca_SW2HW_CQ(dev, cq_context, cq->cqn, &status);
+	if (err) {
+		mthca_warn(dev, "SW2HW_CQ failed (%d)\n", err);
+		goto err_out_free_mr;
+	}
+
+	if (status) {
+		mthca_warn(dev, "SW2HW_CQ returned status 0x%02x\n",
+			   status);
+		err = -EINVAL;
+		goto err_out_free_mr;
+	}
+
+	spin_lock_irq(&dev->cq_table.lock);
+	if (mthca_array_set(&dev->cq_table.cq,
+			    cq->cqn & (dev->limits.num_cqs - 1),
+			    cq)) {
+		spin_unlock_irq(&dev->cq_table.lock);
+		goto err_out_free_mr;
+	}
+	spin_unlock_irq(&dev->cq_table.lock);
+
+	cq->cons_index = 0;
+
+	kfree(dma_list);
+	kfree(mailbox);
+
+	return 0;
+
+ err_out_free_mr:
+	mthca_free_mr(dev, &cq->mr);
+
+ err_out_free_cq:
+	mthca_free(&dev->cq_table.alloc, cq->cqn);
+
+ err_out_free:
+	if (cq->is_direct)
+		pci_free_consistent(dev->pdev, size,
+				    cq->queue.direct.buf,
+				    pci_unmap_addr(&cq->queue.direct, mapping));
+	else {
+		for (i = 0; i < npages; ++i)
+			if (cq->queue.page_list[i].buf)
+				pci_free_consistent(dev->pdev, PAGE_SIZE,
+						    cq->queue.page_list[i].buf,
+						    pci_unmap_addr(&cq->queue.page_list[i],
+								   mapping));
+
+		kfree(cq->queue.page_list);
+	}
+
+ err_out:
+	kfree(dma_list);
+	kfree(mailbox);
+
+	return err;
+}
+
+void mthca_free_cq(struct mthca_dev *dev,
+		   struct mthca_cq *cq)
+{
+	void *mailbox;
+	int err;
+	u8 status;
+
+	might_sleep();
+
+	mailbox = kmalloc(sizeof (struct mthca_cq_context) + MTHCA_CMD_MAILBOX_EXTRA,
+			  GFP_KERNEL);
+	if (!mailbox) {
+		mthca_warn(dev, "No memory for mailbox to free CQ.\n");
+		return;
+	}
+
+	err = mthca_HW2SW_CQ(dev, MAILBOX_ALIGN(mailbox), cq->cqn, &status);
+	if (err)
+		mthca_warn(dev, "HW2SW_CQ failed (%d)\n", err);
+	else if (status)
+		mthca_warn(dev, "HW2SW_CQ returned status 0x%02x\n",
+			   status);
+
+	if (0) {
+		u32 *ctx = MAILBOX_ALIGN(mailbox);
+		int j;
+
+		printk(KERN_ERR "context for CQN %x\n", cq->cqn);
+		for (j = 0; j < 16; ++j)
+			printk(KERN_ERR "[%2x] %08x\n", j * 4, be32_to_cpu(ctx[j]));
+	}
+
+	spin_lock_irq(&dev->cq_table.lock);
+	mthca_array_clear(&dev->cq_table.cq,
+			  cq->cqn & (dev->limits.num_cqs - 1));
+	spin_unlock_irq(&dev->cq_table.lock);
+
+	atomic_dec(&cq->refcount);
+	wait_event(cq->wait, !atomic_read(&cq->refcount));
+
+	mthca_free_mr(dev, &cq->mr);
+
+	if (cq->is_direct)
+		pci_free_consistent(dev->pdev,
+				    (cq->ibcq.cqe + 1) * MTHCA_CQ_ENTRY_SIZE,
+				    cq->queue.direct.buf,
+				    pci_unmap_addr(&cq->queue.direct,
+						   mapping));
+	else {
+		int i;
+
+		for (i = 0;
+		     i < ((cq->ibcq.cqe + 1) * MTHCA_CQ_ENTRY_SIZE + PAGE_SIZE - 1) /
+			     PAGE_SIZE;
+		     ++i)
+			pci_free_consistent(dev->pdev, PAGE_SIZE,
+					    cq->queue.page_list[i].buf,
+					    pci_unmap_addr(&cq->queue.page_list[i],
+							   mapping));
+
+		kfree(cq->queue.page_list);
+	}
+
+	mthca_free(&dev->cq_table.alloc, cq->cqn);
+	kfree(mailbox);
+}
+
+int __devinit mthca_init_cq_table(struct mthca_dev *dev)
+{
+	int err;
+
+	spin_lock_init(&dev->cq_table.lock);
+
+	err = mthca_alloc_init(&dev->cq_table.alloc,
+			       dev->limits.num_cqs,
+			       (1 << 24) - 1,
+			       dev->limits.reserved_cqs);
+	if (err)
+		return err;
+
+	err = mthca_array_init(&dev->cq_table.cq,
+			       dev->limits.num_cqs);
+	if (err)
+		mthca_alloc_cleanup(&dev->cq_table.alloc);
+
+	return err;
+}
+
+void __devexit mthca_cleanup_cq_table(struct mthca_dev *dev)
+{
+	mthca_array_cleanup(&dev->cq_table.cq, dev->limits.num_cqs);
+	mthca_alloc_cleanup(&dev->cq_table.alloc);
+}
diff -Nru a/drivers/infiniband/hw/mthca/mthca_dev.h b/drivers/infiniband/hw/mthca/mthca_dev.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/hw/mthca/mthca_dev.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,391 @@
+/*
+ * Copyright (c) 2004 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: mthca_dev.h 1349 2004-12-16 21:09:43Z roland $
+ */
+
+#ifndef MTHCA_DEV_H
+#define MTHCA_DEV_H
+
+#include <linux/spinlock.h>
+#include <linux/kernel.h>
+#include <linux/pci.h>
+#include <linux/dma-mapping.h>
+#include <asm/semaphore.h>
+#include <asm/scatterlist.h>
+
+#include "mthca_provider.h"
+#include "mthca_doorbell.h"
+
+#define DRV_NAME	"ib_mthca"
+#define PFX		DRV_NAME ": "
+#define DRV_VERSION	"0.06-pre"
+#define DRV_RELDATE	"November 8, 2004"
+
+/* Types of supported HCA */
+enum {
+	TAVOR,			/* MT23108                        */
+	ARBEL_COMPAT,		/* MT25208 in Tavor compat mode   */
+	ARBEL_NATIVE		/* MT25208 with extended features */
+};
+
+enum {
+	MTHCA_FLAG_DDR_HIDDEN = 1 << 1,
+	MTHCA_FLAG_SRQ        = 1 << 2,
+	MTHCA_FLAG_MSI        = 1 << 3,
+	MTHCA_FLAG_MSI_X      = 1 << 4,
+	MTHCA_FLAG_NO_LAM     = 1 << 5
+};
+
+enum {
+	MTHCA_KAR_PAGE  = 1,
+	MTHCA_MAX_PORTS = 2
+};
+
+enum {
+	MTHCA_MPT_ENTRY_SIZE  =  0x40,
+	MTHCA_EQ_CONTEXT_SIZE =  0x40,
+	MTHCA_CQ_CONTEXT_SIZE =  0x40,
+	MTHCA_QP_CONTEXT_SIZE = 0x200,
+	MTHCA_AV_SIZE         =  0x20,
+	MTHCA_MGM_ENTRY_SIZE  =  0x40
+};
+
+enum {
+	MTHCA_EQ_CMD,
+	MTHCA_EQ_ASYNC,
+	MTHCA_EQ_COMP,
+	MTHCA_NUM_EQ
+};
+
+struct mthca_cmd {
+	int                       use_events;
+	struct semaphore          hcr_sem;
+	struct semaphore 	  poll_sem;
+	struct semaphore 	  event_sem;
+	int              	  max_cmds;
+	spinlock_t                context_lock;
+	int                       free_head;
+	struct mthca_cmd_context *context;
+	u16                       token_mask;
+};
+
+struct mthca_limits {
+	int      num_ports;
+	int      vl_cap;
+	int      mtu_cap;
+	int      gid_table_len;
+	int      pkey_table_len;
+	int      local_ca_ack_delay;
+	int      max_sg;
+	int      num_qps;
+	int      reserved_qps;
+	int      num_srqs;
+	int      reserved_srqs;
+	int      num_eecs;
+	int      reserved_eecs;
+	int      num_cqs;
+	int      reserved_cqs;
+	int      num_eqs;
+	int      reserved_eqs;
+	int      num_mpts;
+	int      num_mtt_segs;
+	int      mtt_seg_size;
+	int      reserved_mtts;
+	int      reserved_mrws;
+	int      num_rdbs;
+	int      reserved_uars;
+	int      num_mgms;
+	int      num_amgms;
+	int      reserved_mcgs;
+	int      num_pds;
+	int      reserved_pds;
+};
+
+struct mthca_alloc {
+	u32            last;
+	u32            top;
+	u32            max;
+	u32            mask;
+	spinlock_t     lock;
+	unsigned long *table;
+};
+
+struct mthca_array {
+	struct {
+		void    **page;
+		int       used;
+	} *page_list;
+};
+
+struct mthca_pd_table {
+	struct mthca_alloc alloc;
+};
+
+struct mthca_mr_table {
+	struct mthca_alloc mpt_alloc;
+	int                max_mtt_order;
+	unsigned long    **mtt_buddy;
+	u64                mtt_base;
+};
+
+struct mthca_eq_table {
+	struct mthca_alloc alloc;
+	void __iomem      *clr_int;
+	u32                clr_mask;
+	struct mthca_eq    eq[MTHCA_NUM_EQ];
+	int                have_irq;
+	u8                 inta_pin;
+};
+
+struct mthca_cq_table {
+	struct mthca_alloc alloc;
+	spinlock_t         lock;
+	struct mthca_array cq;
+};
+
+struct mthca_qp_table {
+	struct mthca_alloc alloc;
+	int                sqp_start;
+	spinlock_t         lock;
+	struct mthca_array qp;
+};
+
+struct mthca_av_table {
+	struct pci_pool   *pool;
+	int                num_ddr_avs;
+	u64                ddr_av_base;
+	void __iomem      *av_map;
+	struct mthca_alloc alloc;
+};
+
+struct mthca_mcg_table {
+	struct semaphore   sem;
+	struct mthca_alloc alloc;
+};
+
+struct mthca_dev {
+	struct ib_device  ib_dev;
+	struct pci_dev   *pdev;
+
+	int          	 hca_type;
+	unsigned long	 mthca_flags;
+
+	u32              rev_id;
+
+	/* firmware info */
+	u64              fw_ver;
+	union {
+		struct {
+			u64 fw_start;
+			u64 fw_end;
+		}        tavor;
+		struct {
+			u64 clr_int_base;
+			u64 eq_arm_base;
+			u64 eq_set_ci_base;
+			struct scatterlist *mem;
+			u16 fw_pages;
+		}        arbel;
+	}                fw;
+
+	u64              ddr_start;
+	u64              ddr_end;
+
+	MTHCA_DECLARE_DOORBELL_LOCK(doorbell_lock)
+
+	void __iomem    *hcr;
+	void __iomem    *clr_base;
+	void __iomem    *kar;
+
+	struct mthca_cmd    cmd;
+	struct mthca_limits limits;
+
+	struct mthca_pd_table  pd_table;
+	struct mthca_mr_table  mr_table;
+	struct mthca_eq_table  eq_table;
+	struct mthca_cq_table  cq_table;
+	struct mthca_qp_table  qp_table;
+	struct mthca_av_table  av_table;
+	struct mthca_mcg_table mcg_table;
+
+	struct mthca_pd       driver_pd;
+	struct mthca_mr       driver_mr;
+
+	struct ib_mad_agent  *send_agent[MTHCA_MAX_PORTS][2];
+	struct ib_ah         *sm_ah[MTHCA_MAX_PORTS];
+	spinlock_t            sm_lock;
+};
+
+#define mthca_dbg(mdev, format, arg...) \
+	dev_dbg(&mdev->pdev->dev, format, ## arg)
+#define mthca_err(mdev, format, arg...) \
+	dev_err(&mdev->pdev->dev, format, ## arg)
+#define mthca_info(mdev, format, arg...) \
+	dev_info(&mdev->pdev->dev, format, ## arg)
+#define mthca_warn(mdev, format, arg...) \
+	dev_warn(&mdev->pdev->dev, format, ## arg)
+
+extern void __buggy_use_of_MTHCA_GET(void);
+extern void __buggy_use_of_MTHCA_PUT(void);
+
+#define MTHCA_GET(dest, source, offset)                               \
+	do {                                                          \
+		void *__p = (char *) (source) + (offset);             \
+		switch (sizeof (dest)) {                              \
+			case 1: (dest) = *(u8 *) __p;       break;    \
+			case 2: (dest) = be16_to_cpup(__p); break;    \
+			case 4: (dest) = be32_to_cpup(__p); break;    \
+			case 8: (dest) = be64_to_cpup(__p); break;    \
+			default: __buggy_use_of_MTHCA_GET();          \
+		}                                                     \
+	} while (0)
+
+#define MTHCA_PUT(dest, source, offset)                               \
+	do {                                                          \
+		__typeof__(source) *__p =                             \
+			(__typeof__(source) *) ((char *) (dest) + (offset)); \
+		switch (sizeof(source)) {                             \
+			case 1: *__p = (source);            break;    \
+			case 2: *__p = cpu_to_be16(source); break;    \
+			case 4: *__p = cpu_to_be32(source); break;    \
+			case 8: *__p = cpu_to_be64(source); break;    \
+			default: __buggy_use_of_MTHCA_PUT();          \
+		}                                                     \
+	} while (0)
+
+int mthca_reset(struct mthca_dev *mdev);
+
+u32 mthca_alloc(struct mthca_alloc *alloc);
+void mthca_free(struct mthca_alloc *alloc, u32 obj);
+int mthca_alloc_init(struct mthca_alloc *alloc, u32 num, u32 mask,
+		     u32 reserved);
+void mthca_alloc_cleanup(struct mthca_alloc *alloc);
+void *mthca_array_get(struct mthca_array *array, int index);
+int mthca_array_set(struct mthca_array *array, int index, void *value);
+void mthca_array_clear(struct mthca_array *array, int index);
+int mthca_array_init(struct mthca_array *array, int nent);
+void mthca_array_cleanup(struct mthca_array *array, int nent);
+
+int mthca_init_pd_table(struct mthca_dev *dev);
+int mthca_init_mr_table(struct mthca_dev *dev);
+int mthca_init_eq_table(struct mthca_dev *dev);
+int mthca_init_cq_table(struct mthca_dev *dev);
+int mthca_init_qp_table(struct mthca_dev *dev);
+int mthca_init_av_table(struct mthca_dev *dev);
+int mthca_init_mcg_table(struct mthca_dev *dev);
+
+void mthca_cleanup_pd_table(struct mthca_dev *dev);
+void mthca_cleanup_mr_table(struct mthca_dev *dev);
+void mthca_cleanup_eq_table(struct mthca_dev *dev);
+void mthca_cleanup_cq_table(struct mthca_dev *dev);
+void mthca_cleanup_qp_table(struct mthca_dev *dev);
+void mthca_cleanup_av_table(struct mthca_dev *dev);
+void mthca_cleanup_mcg_table(struct mthca_dev *dev);
+
+int mthca_register_device(struct mthca_dev *dev);
+void mthca_unregister_device(struct mthca_dev *dev);
+
+int mthca_pd_alloc(struct mthca_dev *dev, struct mthca_pd *pd);
+void mthca_pd_free(struct mthca_dev *dev, struct mthca_pd *pd);
+
+int mthca_mr_alloc_notrans(struct mthca_dev *dev, u32 pd,
+			   u32 access, struct mthca_mr *mr);
+int mthca_mr_alloc_phys(struct mthca_dev *dev, u32 pd,
+			u64 *buffer_list, int buffer_size_shift,
+			int list_len, u64 iova, u64 total_size,
+			u32 access, struct mthca_mr *mr);
+void mthca_free_mr(struct mthca_dev *dev, struct mthca_mr *mr);
+
+int mthca_poll_cq(struct ib_cq *ibcq, int num_entries,
+		  struct ib_wc *entry);
+void mthca_arm_cq(struct mthca_dev *dev, struct mthca_cq *cq,
+		  int solicited);
+int mthca_init_cq(struct mthca_dev *dev, int nent,
+		  struct mthca_cq *cq);
+void mthca_free_cq(struct mthca_dev *dev,
+		   struct mthca_cq *cq);
+void mthca_cq_event(struct mthca_dev *dev, u32 cqn);
+void mthca_cq_clean(struct mthca_dev *dev, u32 cqn, u32 qpn);
+
+void mthca_qp_event(struct mthca_dev *dev, u32 qpn,
+		    enum ib_event_type event_type);
+int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask);
+int mthca_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
+		    struct ib_send_wr **bad_wr);
+int mthca_post_receive(struct ib_qp *ibqp, struct ib_recv_wr *wr,
+		       struct ib_recv_wr **bad_wr);
+int mthca_free_err_wqe(struct mthca_qp *qp, int is_send,
+		       int index, int *dbd, u32 *new_wqe);
+int mthca_alloc_qp(struct mthca_dev *dev,
+		   struct mthca_pd *pd,
+		   struct mthca_cq *send_cq,
+		   struct mthca_cq *recv_cq,
+		   enum ib_qp_type type,
+		   enum ib_sig_type send_policy,
+		   enum ib_sig_type recv_policy,
+		   struct mthca_qp *qp);
+int mthca_alloc_sqp(struct mthca_dev *dev,
+		    struct mthca_pd *pd,
+		    struct mthca_cq *send_cq,
+		    struct mthca_cq *recv_cq,
+		    enum ib_sig_type send_policy,
+		    enum ib_sig_type recv_policy,
+		    int qpn,
+		    int port,
+		    struct mthca_sqp *sqp);
+void mthca_free_qp(struct mthca_dev *dev, struct mthca_qp *qp);
+int mthca_create_ah(struct mthca_dev *dev,
+		    struct mthca_pd *pd,
+		    struct ib_ah_attr *ah_attr,
+		    struct mthca_ah *ah);
+int mthca_destroy_ah(struct mthca_dev *dev, struct mthca_ah *ah);
+int mthca_read_ah(struct mthca_dev *dev, struct mthca_ah *ah,
+		  struct ib_ud_header *header);
+
+int mthca_multicast_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid);
+int mthca_multicast_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid);
+
+int mthca_process_mad(struct ib_device *ibdev,
+		      int mad_flags,
+		      u8 port_num,
+		      u16 slid,
+		      struct ib_mad *in_mad,
+		      struct ib_mad *out_mad);
+int mthca_create_agents(struct mthca_dev *dev);
+void mthca_free_agents(struct mthca_dev *dev);
+
+static inline struct mthca_dev *to_mdev(struct ib_device *ibdev)
+{
+	return container_of(ibdev, struct mthca_dev, ib_dev);
+}
+
+#endif /* MTHCA_DEV_H */
diff -Nru a/drivers/infiniband/hw/mthca/mthca_doorbell.h b/drivers/infiniband/hw/mthca/mthca_doorbell.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/hw/mthca/mthca_doorbell.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,123 @@
+/*
+ * Copyright (c) 2004 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: mthca_doorbell.h 1349 2004-12-16 21:09:43Z roland $
+ */
+
+#include <linux/config.h>
+#include <linux/types.h>
+#include <linux/preempt.h>
+
+#define MTHCA_RD_DOORBELL      0x00
+#define MTHCA_SEND_DOORBELL    0x10
+#define MTHCA_RECEIVE_DOORBELL 0x18
+#define MTHCA_CQ_DOORBELL      0x20
+#define MTHCA_EQ_DOORBELL      0x28
+
+#if BITS_PER_LONG == 64
+/*
+ * Assume that we can just write a 64-bit doorbell atomically.  s390
+ * actually doesn't have writeq() but S/390 systems don't even have
+ * PCI so we won't worry about it.
+ */
+
+#define MTHCA_DECLARE_DOORBELL_LOCK(name)
+#define MTHCA_INIT_DOORBELL_LOCK(ptr)    do { } while (0)
+#define MTHCA_GET_DOORBELL_LOCK(ptr)      (NULL)
+
+static inline void mthca_write64(u32 val[2], void __iomem *dest,
+				 spinlock_t *doorbell_lock)
+{
+	__raw_writeq(*(u64 *) val, dest);
+}
+
+#elif defined(CONFIG_INFINIBAND_MTHCA_SSE_DOORBELL)
+/* Use SSE to write 64 bits atomically without a lock. */
+
+#define MTHCA_DECLARE_DOORBELL_LOCK(name)
+#define MTHCA_INIT_DOORBELL_LOCK(ptr)    do { } while (0)
+#define MTHCA_GET_DOORBELL_LOCK(ptr)      (NULL)
+
+static inline unsigned long mthca_get_fpu(void)
+{
+	unsigned long cr0;
+
+	preempt_disable();
+	asm volatile("mov %%cr0,%0; clts" : "=r" (cr0));
+	return cr0;
+}
+
+static inline void mthca_put_fpu(unsigned long cr0)
+{
+	asm volatile("mov %0,%%cr0" : : "r" (cr0));
+	preempt_enable();
+}
+
+static inline void mthca_write64(u32 val[2], void __iomem *dest,
+				 spinlock_t *doorbell_lock)
+{
+	/* i386 stack is aligned to 8 bytes, so this should be OK: */
+	u8 xmmsave[8] __attribute__((aligned(8)));
+	unsigned long cr0;
+
+	cr0 = mthca_get_fpu();
+
+	asm volatile (
+		"movlps %%xmm0,(%0); \n\t"
+		"movlps (%1),%%xmm0; \n\t"
+		"movlps %%xmm0,(%2); \n\t"
+		"movlps (%0),%%xmm0; \n\t"
+		:
+		: "r" (xmmsave), "r" (val), "r" (dest)
+		: "memory" );
+
+	mthca_put_fpu(cr0);
+}
+
+#else
+/* Just fall back to a spinlock to protect the doorbell */
+
+#define MTHCA_DECLARE_DOORBELL_LOCK(name) spinlock_t name;
+#define MTHCA_INIT_DOORBELL_LOCK(ptr)     spin_lock_init(ptr)
+#define MTHCA_GET_DOORBELL_LOCK(ptr)      (ptr)
+
+static inline void mthca_write64(u32 val[2], void __iomem *dest,
+				 spinlock_t *doorbell_lock)
+{
+	unsigned long flags;
+
+	spin_lock_irqsave(doorbell_lock, flags);
+	__raw_writel(val[0], dest);
+	__raw_writel(val[1], dest + 4);
+	spin_unlock_irqrestore(doorbell_lock, flags);
+}
+
+#endif
diff -Nru a/drivers/infiniband/hw/mthca/mthca_eq.c b/drivers/infiniband/hw/mthca/mthca_eq.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/hw/mthca/mthca_eq.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,690 @@
+/*
+ * Copyright (c) 2004 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: mthca_eq.c 1382 2004-12-24 02:21:02Z roland $
+ */
+
+#include <linux/init.h>
+#include <linux/errno.h>
+#include <linux/interrupt.h>
+#include <linux/pci.h>
+
+#include "mthca_dev.h"
+#include "mthca_cmd.h"
+#include "mthca_config_reg.h"
+
+enum {
+	MTHCA_NUM_ASYNC_EQE = 0x80,
+	MTHCA_NUM_CMD_EQE   = 0x80,
+	MTHCA_EQ_ENTRY_SIZE = 0x20
+};
+
+/*
+ * Must be packed because start is 64 bits but only aligned to 32 bits.
+ */
+struct mthca_eq_context {
+	u32 flags;
+	u64 start;
+	u32 logsize_usrpage;
+	u32 pd;
+	u8  reserved1[3];
+	u8  intr;
+	u32 lost_count;
+	u32 lkey;
+	u32 reserved2[2];
+	u32 consumer_index;
+	u32 producer_index;
+	u32 reserved3[4];
+} __attribute__((packed));
+
+#define MTHCA_EQ_STATUS_OK          ( 0 << 28)
+#define MTHCA_EQ_STATUS_OVERFLOW    ( 9 << 28)
+#define MTHCA_EQ_STATUS_WRITE_FAIL  (10 << 28)
+#define MTHCA_EQ_OWNER_SW           ( 0 << 24)
+#define MTHCA_EQ_OWNER_HW           ( 1 << 24)
+#define MTHCA_EQ_FLAG_TR            ( 1 << 18)
+#define MTHCA_EQ_FLAG_OI            ( 1 << 17)
+#define MTHCA_EQ_STATE_ARMED        ( 1 <<  8)
+#define MTHCA_EQ_STATE_FIRED        ( 2 <<  8)
+#define MTHCA_EQ_STATE_ALWAYS_ARMED ( 3 <<  8)
+
+enum {
+	MTHCA_EVENT_TYPE_COMP       	    = 0x00,
+	MTHCA_EVENT_TYPE_PATH_MIG   	    = 0x01,
+	MTHCA_EVENT_TYPE_COMM_EST   	    = 0x02,
+	MTHCA_EVENT_TYPE_SQ_DRAINED 	    = 0x03,
+	MTHCA_EVENT_TYPE_SRQ_LAST_WQE       = 0x13,
+	MTHCA_EVENT_TYPE_CQ_ERROR   	    = 0x04,
+	MTHCA_EVENT_TYPE_WQ_CATAS_ERROR     = 0x05,
+	MTHCA_EVENT_TYPE_EEC_CATAS_ERROR    = 0x06,
+	MTHCA_EVENT_TYPE_PATH_MIG_FAILED    = 0x07,
+	MTHCA_EVENT_TYPE_WQ_INVAL_REQ_ERROR = 0x10,
+	MTHCA_EVENT_TYPE_WQ_ACCESS_ERROR    = 0x11,
+	MTHCA_EVENT_TYPE_SRQ_CATAS_ERROR    = 0x12,
+	MTHCA_EVENT_TYPE_LOCAL_CATAS_ERROR  = 0x08,
+	MTHCA_EVENT_TYPE_PORT_CHANGE        = 0x09,
+	MTHCA_EVENT_TYPE_EQ_OVERFLOW        = 0x0f,
+	MTHCA_EVENT_TYPE_ECC_DETECT         = 0x0e,
+	MTHCA_EVENT_TYPE_CMD                = 0x0a
+};
+
+#define MTHCA_ASYNC_EVENT_MASK ((1ULL << MTHCA_EVENT_TYPE_PATH_MIG)           | \
+				(1ULL << MTHCA_EVENT_TYPE_COMM_EST)           | \
+				(1ULL << MTHCA_EVENT_TYPE_SQ_DRAINED)         | \
+				(1ULL << MTHCA_EVENT_TYPE_CQ_ERROR)           | \
+				(1ULL << MTHCA_EVENT_TYPE_WQ_CATAS_ERROR)     | \
+				(1ULL << MTHCA_EVENT_TYPE_EEC_CATAS_ERROR)    | \
+				(1ULL << MTHCA_EVENT_TYPE_PATH_MIG_FAILED)    | \
+				(1ULL << MTHCA_EVENT_TYPE_WQ_INVAL_REQ_ERROR) | \
+				(1ULL << MTHCA_EVENT_TYPE_WQ_ACCESS_ERROR)    | \
+				(1ULL << MTHCA_EVENT_TYPE_LOCAL_CATAS_ERROR)  | \
+				(1ULL << MTHCA_EVENT_TYPE_PORT_CHANGE)        | \
+				(1ULL << MTHCA_EVENT_TYPE_ECC_DETECT))
+#define MTHCA_SRQ_EVENT_MASK    (1ULL << MTHCA_EVENT_TYPE_SRQ_CATAS_ERROR)    | \
+				(1ULL << MTHCA_EVENT_TYPE_SRQ_LAST_WQE)
+#define MTHCA_CMD_EVENT_MASK    (1ULL << MTHCA_EVENT_TYPE_CMD)
+
+#define MTHCA_EQ_DB_INC_CI     (1 << 24)
+#define MTHCA_EQ_DB_REQ_NOT    (2 << 24)
+#define MTHCA_EQ_DB_DISARM_CQ  (3 << 24)
+#define MTHCA_EQ_DB_SET_CI     (4 << 24)
+#define MTHCA_EQ_DB_ALWAYS_ARM (5 << 24)
+
+struct mthca_eqe {
+	u8 reserved1;
+	u8 type;
+	u8 reserved2;
+	u8 subtype;
+	union {
+		u32 raw[6];
+		struct {
+			u32 cqn;
+		} __attribute__((packed)) comp;
+		struct {
+			u16 reserved1;
+			u16 token;
+			u32 reserved2;
+			u8  reserved3[3];
+			u8  status;
+			u64 out_param;
+		} __attribute__((packed)) cmd;
+		struct {
+			u32 qpn;
+		} __attribute__((packed)) qp;
+		struct {
+			u32 cqn;
+			u32 reserved1;
+			u8  reserved2[3];
+			u8  syndrome;
+		} __attribute__((packed)) cq_err;
+		struct {
+			u32 reserved1[2];
+			u32 port;
+		} __attribute__((packed)) port_change;
+	} event;
+	u8 reserved3[3];
+	u8 owner;
+} __attribute__((packed));
+
+#define  MTHCA_EQ_ENTRY_OWNER_SW      (0 << 7)
+#define  MTHCA_EQ_ENTRY_OWNER_HW      (1 << 7)
+
+static inline u64 async_mask(struct mthca_dev *dev)
+{
+	return dev->mthca_flags & MTHCA_FLAG_SRQ ?
+		MTHCA_ASYNC_EVENT_MASK | MTHCA_SRQ_EVENT_MASK :
+		MTHCA_ASYNC_EVENT_MASK;
+}
+
+static inline void set_eq_ci(struct mthca_dev *dev, int eqn, int ci)
+{
+	u32 doorbell[2];
+
+	doorbell[0] = cpu_to_be32(MTHCA_EQ_DB_SET_CI | eqn);
+	doorbell[1] = cpu_to_be32(ci);
+
+	mthca_write64(doorbell,
+		      dev->kar + MTHCA_EQ_DOORBELL,
+		      MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock));
+}
+
+static inline void eq_req_not(struct mthca_dev *dev, int eqn)
+{
+	u32 doorbell[2];
+
+	doorbell[0] = cpu_to_be32(MTHCA_EQ_DB_REQ_NOT | eqn);
+	doorbell[1] = 0;
+
+	mthca_write64(doorbell,
+		      dev->kar + MTHCA_EQ_DOORBELL,
+		      MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock));
+}
+
+static inline void disarm_cq(struct mthca_dev *dev, int eqn, int cqn)
+{
+	u32 doorbell[2];
+
+	doorbell[0] = cpu_to_be32(MTHCA_EQ_DB_DISARM_CQ | eqn);
+	doorbell[1] = cpu_to_be32(cqn);
+
+	mthca_write64(doorbell,
+		      dev->kar + MTHCA_EQ_DOORBELL,
+		      MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock));
+}
+
+static inline struct mthca_eqe *get_eqe(struct mthca_eq *eq, int entry)
+{
+	return eq->page_list[entry * MTHCA_EQ_ENTRY_SIZE / PAGE_SIZE].buf
+		+ (entry * MTHCA_EQ_ENTRY_SIZE) % PAGE_SIZE;
+}
+
+static inline int next_eqe_sw(struct mthca_eq *eq)
+{
+	return !(MTHCA_EQ_ENTRY_OWNER_HW &
+		 get_eqe(eq, eq->cons_index)->owner);
+}
+
+static inline void set_eqe_hw(struct mthca_eq *eq, int entry)
+{
+	get_eqe(eq, entry)->owner =  MTHCA_EQ_ENTRY_OWNER_HW;
+}
+
+static void port_change(struct mthca_dev *dev, int port, int active)
+{
+	struct ib_event record;
+
+	mthca_dbg(dev, "Port change to %s for port %d\n",
+		  active ? "active" : "down", port);
+
+	record.device = &dev->ib_dev;
+	record.event  = active ? IB_EVENT_PORT_ACTIVE : IB_EVENT_PORT_ERR;
+	record.element.port_num = port;
+
+	ib_dispatch_event(&record);
+}
+
+static void mthca_eq_int(struct mthca_dev *dev, struct mthca_eq *eq)
+{
+	struct mthca_eqe *eqe;
+	int disarm_cqn;
+
+	while (next_eqe_sw(eq)) {
+		int set_ci = 0;
+		eqe = get_eqe(eq, eq->cons_index);
+
+		switch (eqe->type) {
+		case MTHCA_EVENT_TYPE_COMP:
+			disarm_cqn = be32_to_cpu(eqe->event.comp.cqn) & 0xffffff;
+			disarm_cq(dev, eq->eqn, disarm_cqn);
+			mthca_cq_event(dev, disarm_cqn);
+			break;
+
+		case MTHCA_EVENT_TYPE_PATH_MIG:
+			mthca_qp_event(dev, be32_to_cpu(eqe->event.qp.qpn) & 0xffffff,
+				       IB_EVENT_PATH_MIG);
+			break;
+
+		case MTHCA_EVENT_TYPE_COMM_EST:
+			mthca_qp_event(dev, be32_to_cpu(eqe->event.qp.qpn) & 0xffffff,
+				       IB_EVENT_COMM_EST);
+			break;
+
+		case MTHCA_EVENT_TYPE_SQ_DRAINED:
+			mthca_qp_event(dev, be32_to_cpu(eqe->event.qp.qpn) & 0xffffff,
+				       IB_EVENT_SQ_DRAINED);
+			break;
+
+		case MTHCA_EVENT_TYPE_WQ_CATAS_ERROR:
+			mthca_qp_event(dev, be32_to_cpu(eqe->event.qp.qpn) & 0xffffff,
+				       IB_EVENT_QP_FATAL);
+			break;
+
+		case MTHCA_EVENT_TYPE_PATH_MIG_FAILED:
+			mthca_qp_event(dev, be32_to_cpu(eqe->event.qp.qpn) & 0xffffff,
+				       IB_EVENT_PATH_MIG_ERR);
+			break;
+
+		case MTHCA_EVENT_TYPE_WQ_INVAL_REQ_ERROR:
+			mthca_qp_event(dev, be32_to_cpu(eqe->event.qp.qpn) & 0xffffff,
+				       IB_EVENT_QP_REQ_ERR);
+			break;
+
+		case MTHCA_EVENT_TYPE_WQ_ACCESS_ERROR:
+			mthca_qp_event(dev, be32_to_cpu(eqe->event.qp.qpn) & 0xffffff,
+				       IB_EVENT_QP_ACCESS_ERR);
+			break;
+
+		case MTHCA_EVENT_TYPE_CMD:
+			mthca_cmd_event(dev,
+					be16_to_cpu(eqe->event.cmd.token),
+					eqe->event.cmd.status,
+					be64_to_cpu(eqe->event.cmd.out_param));
+			/*
+			 * cmd_event() may add more commands.
+			 * The card will think the queue has overflowed if
+			 * we don't tell it we've been processing events.
+			 */
+			set_ci = 1;
+			break;
+
+		case MTHCA_EVENT_TYPE_PORT_CHANGE:
+			port_change(dev,
+				    (be32_to_cpu(eqe->event.port_change.port) >> 28) & 3,
+				    eqe->subtype == 0x4);
+			break;
+
+		case MTHCA_EVENT_TYPE_CQ_ERROR:
+			mthca_warn(dev, "CQ %s on CQN %08x\n",
+				   eqe->event.cq_err.syndrome == 1 ?
+				   "overrun" : "access violation",
+				   be32_to_cpu(eqe->event.cq_err.cqn));
+			break;
+
+		case MTHCA_EVENT_TYPE_EQ_OVERFLOW:
+			mthca_warn(dev, "EQ overrun on EQN %d\n", eq->eqn);
+			break;
+
+		case MTHCA_EVENT_TYPE_EEC_CATAS_ERROR:
+		case MTHCA_EVENT_TYPE_SRQ_CATAS_ERROR:
+		case MTHCA_EVENT_TYPE_LOCAL_CATAS_ERROR:
+		case MTHCA_EVENT_TYPE_ECC_DETECT:
+		default:
+			mthca_warn(dev, "Unhandled event %02x(%02x) on EQ %d\n",
+				   eqe->type, eqe->subtype, eq->eqn);
+			break;
+		};
+
+		set_eqe_hw(eq, eq->cons_index);
+		eq->cons_index = (eq->cons_index + 1) & (eq->nent - 1);
+
+		if (set_ci) {
+			wmb(); /* see comment below */
+			set_eq_ci(dev, eq->eqn, eq->cons_index);
+			set_ci = 0;
+		}
+	}
+
+	/*
+	 * This barrier makes sure that all updates to
+	 * ownership bits done by set_eqe_hw() hit memory
+	 * before the consumer index is updated.  set_eq_ci()
+	 * allows the HCA to possibly write more EQ entries,
+	 * and we want to avoid the exceedingly unlikely
+	 * possibility of the HCA writing an entry and then
+	 * having set_eqe_hw() overwrite the owner field.
+	 */
+	wmb();
+	set_eq_ci(dev, eq->eqn, eq->cons_index);
+	eq_req_not(dev, eq->eqn);
+}
+
+static irqreturn_t mthca_interrupt(int irq, void *dev_ptr, struct pt_regs *regs)
+{
+	struct mthca_dev *dev = dev_ptr;
+	u32 ecr;
+	int work = 0;
+	int i;
+
+	if (dev->eq_table.clr_mask)
+		writel(dev->eq_table.clr_mask, dev->eq_table.clr_int);
+
+	while ((ecr = readl(dev->hcr + MTHCA_ECR_OFFSET + 4)) != 0) {
+		work = 1;
+
+		writel(ecr, dev->hcr + MTHCA_ECR_CLR_OFFSET + 4);
+
+		for (i = 0; i < MTHCA_NUM_EQ; ++i)
+			if (ecr & dev->eq_table.eq[i].ecr_mask)
+				mthca_eq_int(dev, &dev->eq_table.eq[i]);
+	}
+
+	return IRQ_RETVAL(work);
+}
+
+static irqreturn_t mthca_msi_x_interrupt(int irq, void *eq_ptr,
+					 struct pt_regs *regs)
+{
+	struct mthca_eq  *eq  = eq_ptr;
+	struct mthca_dev *dev = eq->dev;
+
+	writel(eq->ecr_mask, dev->hcr + MTHCA_ECR_CLR_OFFSET + 4);
+	mthca_eq_int(dev, eq);
+
+	/* MSI-X vectors always belong to us */
+	return IRQ_HANDLED;
+}
+
+static int __devinit mthca_create_eq(struct mthca_dev *dev,
+				     int nent,
+				     u8 intr,
+				     struct mthca_eq *eq)
+{
+	int npages = (nent * MTHCA_EQ_ENTRY_SIZE + PAGE_SIZE - 1) /
+		PAGE_SIZE;
+	u64 *dma_list = NULL;
+	dma_addr_t t;
+	void *mailbox = NULL;
+	struct mthca_eq_context *eq_context;
+	int err = -ENOMEM;
+	int i;
+	u8 status;
+
+	/* Make sure EQ size is aligned to a power of 2 size. */
+	for (i = 1; i < nent; i <<= 1)
+		; /* nothing */
+	nent = i;
+
+	eq->dev = dev;
+
+	eq->page_list = kmalloc(npages * sizeof *eq->page_list,
+				GFP_KERNEL);
+	if (!eq->page_list)
+		goto err_out;
+
+	for (i = 0; i < npages; ++i)
+		eq->page_list[i].buf = NULL;
+
+	dma_list = kmalloc(npages * sizeof *dma_list, GFP_KERNEL);
+	if (!dma_list)
+		goto err_out_free;
+
+	mailbox = kmalloc(sizeof *eq_context + MTHCA_CMD_MAILBOX_EXTRA,
+			  GFP_KERNEL);
+	if (!mailbox)
+		goto err_out_free;
+	eq_context = MAILBOX_ALIGN(mailbox);
+
+	for (i = 0; i < npages; ++i) {
+		eq->page_list[i].buf = pci_alloc_consistent(dev->pdev,
+							    PAGE_SIZE, &t);
+		if (!eq->page_list[i].buf)
+			goto err_out_free;
+
+		dma_list[i] = t;
+		pci_unmap_addr_set(&eq->page_list[i], mapping, t);
+
+		memset(eq->page_list[i].buf, 0, PAGE_SIZE);
+	}
+
+	for (i = 0; i < nent; ++i)
+		set_eqe_hw(eq, i);
+
+	eq->eqn = mthca_alloc(&dev->eq_table.alloc);
+	if (eq->eqn == -1)
+		goto err_out_free;
+
+	err = mthca_mr_alloc_phys(dev, dev->driver_pd.pd_num,
+				  dma_list, PAGE_SHIFT, npages,
+				  0, npages * PAGE_SIZE,
+				  MTHCA_MPT_FLAG_LOCAL_WRITE |
+				  MTHCA_MPT_FLAG_LOCAL_READ,
+				  &eq->mr);
+	if (err)
+		goto err_out_free_eq;
+
+	eq->nent = nent;
+
+	memset(eq_context, 0, sizeof *eq_context);
+	eq_context->flags           = cpu_to_be32(MTHCA_EQ_STATUS_OK   |
+						  MTHCA_EQ_OWNER_HW    |
+						  MTHCA_EQ_STATE_ARMED |
+						  MTHCA_EQ_FLAG_TR);
+	eq_context->start           = cpu_to_be64(0);
+	eq_context->logsize_usrpage = cpu_to_be32((ffs(nent) - 1) << 24 |
+						  MTHCA_KAR_PAGE);
+	eq_context->pd              = cpu_to_be32(dev->driver_pd.pd_num);
+	eq_context->intr            = intr;
+	eq_context->lkey            = cpu_to_be32(eq->mr.ibmr.lkey);
+
+	err = mthca_SW2HW_EQ(dev, eq_context, eq->eqn, &status);
+	if (err) {
+		mthca_warn(dev, "SW2HW_EQ failed (%d)\n", err);
+		goto err_out_free_mr;
+	}
+	if (status) {
+		mthca_warn(dev, "SW2HW_EQ returned status 0x%02x\n",
+			   status);
+		err = -EINVAL;
+		goto err_out_free_mr;
+	}
+
+	kfree(dma_list);
+	kfree(mailbox);
+
+	eq->ecr_mask   = swab32(1 << eq->eqn);
+	eq->cons_index = 0;
+
+	eq_req_not(dev, eq->eqn);
+
+	mthca_dbg(dev, "Allocated EQ %d with %d entries\n",
+		  eq->eqn, nent);
+
+	return err;
+
+ err_out_free_mr:
+	mthca_free_mr(dev, &eq->mr);
+
+ err_out_free_eq:
+	mthca_free(&dev->eq_table.alloc, eq->eqn);
+
+ err_out_free:
+	for (i = 0; i < npages; ++i)
+		if (eq->page_list[i].buf)
+			pci_free_consistent(dev->pdev, PAGE_SIZE,
+					    eq->page_list[i].buf,
+					    pci_unmap_addr(&eq->page_list[i],
+							   mapping));
+
+	kfree(eq->page_list);
+	kfree(dma_list);
+	kfree(mailbox);
+
+ err_out:
+	return err;
+}
+
+static void mthca_free_eq(struct mthca_dev *dev,
+			  struct mthca_eq *eq)
+{
+	void *mailbox = NULL;
+	int err;
+	u8 status;
+	int npages = (eq->nent * MTHCA_EQ_ENTRY_SIZE + PAGE_SIZE - 1) /
+		PAGE_SIZE;
+	int i;
+
+	mailbox = kmalloc(sizeof (struct mthca_eq_context) + MTHCA_CMD_MAILBOX_EXTRA,
+			  GFP_KERNEL);
+	if (!mailbox)
+		return;
+
+	err = mthca_HW2SW_EQ(dev, MAILBOX_ALIGN(mailbox),
+			     eq->eqn, &status);
+	if (err)
+		mthca_warn(dev, "HW2SW_EQ failed (%d)\n", err);
+	if (status)
+		mthca_warn(dev, "HW2SW_EQ returned status 0x%02x\n",
+			   status);
+
+	if (0) {
+		mthca_dbg(dev, "Dumping EQ context %02x:\n", eq->eqn);
+		for (i = 0; i < sizeof (struct mthca_eq_context) / 4; ++i) {
+			if (i % 4 == 0)
+				printk("[%02x] ", i * 4);
+			printk(" %08x", be32_to_cpup(MAILBOX_ALIGN(mailbox) + i * 4));
+			if ((i + 1) % 4 == 0)
+				printk("\n");
+		}
+	}
+
+
+	mthca_free_mr(dev, &eq->mr);
+	for (i = 0; i < npages; ++i)
+		pci_free_consistent(dev->pdev, PAGE_SIZE,
+				    eq->page_list[i].buf,
+				    pci_unmap_addr(&eq->page_list[i], mapping));
+
+	kfree(eq->page_list);
+	kfree(mailbox);
+}
+
+static void mthca_free_irqs(struct mthca_dev *dev)
+{
+	int i;
+
+	if (dev->eq_table.have_irq)
+		free_irq(dev->pdev->irq, dev);
+	for (i = 0; i < MTHCA_NUM_EQ; ++i)
+		if (dev->eq_table.eq[i].have_irq)
+			free_irq(dev->eq_table.eq[i].msi_x_vector,
+				 dev->eq_table.eq + i);
+}
+
+int __devinit mthca_init_eq_table(struct mthca_dev *dev)
+{
+	int err;
+	u8 status;
+	u8 intr;
+	int i;
+
+	err = mthca_alloc_init(&dev->eq_table.alloc,
+			       dev->limits.num_eqs,
+			       dev->limits.num_eqs - 1,
+			       dev->limits.reserved_eqs);
+	if (err)
+		return err;
+
+	if (dev->mthca_flags & MTHCA_FLAG_MSI ||
+	    dev->mthca_flags & MTHCA_FLAG_MSI_X) {
+		dev->eq_table.clr_mask = 0;
+	} else {
+		dev->eq_table.clr_mask =
+			swab32(1 << (dev->eq_table.inta_pin & 31));
+		dev->eq_table.clr_int  = dev->clr_base +
+			(dev->eq_table.inta_pin < 31 ? 4 : 0);
+	}
+
+	intr = (dev->mthca_flags & MTHCA_FLAG_MSI) ?
+		128 : dev->eq_table.inta_pin;
+
+	err = mthca_create_eq(dev, dev->limits.num_cqs,
+			      (dev->mthca_flags & MTHCA_FLAG_MSI_X) ? 128 : intr,
+			      &dev->eq_table.eq[MTHCA_EQ_COMP]);
+	if (err)
+		goto err_out_free;
+
+	err = mthca_create_eq(dev, MTHCA_NUM_ASYNC_EQE,
+			      (dev->mthca_flags & MTHCA_FLAG_MSI_X) ? 129 : intr,
+			      &dev->eq_table.eq[MTHCA_EQ_ASYNC]);
+	if (err)
+		goto err_out_comp;
+
+	err = mthca_create_eq(dev, MTHCA_NUM_CMD_EQE,
+			      (dev->mthca_flags & MTHCA_FLAG_MSI_X) ? 130 : intr,
+			      &dev->eq_table.eq[MTHCA_EQ_CMD]);
+	if (err)
+		goto err_out_async;
+
+	if (dev->mthca_flags & MTHCA_FLAG_MSI_X) {
+		static const char *eq_name[] = {
+			[MTHCA_EQ_COMP]  = DRV_NAME " (comp)",
+			[MTHCA_EQ_ASYNC] = DRV_NAME " (async)",
+			[MTHCA_EQ_CMD]   = DRV_NAME " (cmd)"
+		};
+
+		for (i = 0; i < MTHCA_NUM_EQ; ++i) {
+			err = request_irq(dev->eq_table.eq[i].msi_x_vector,
+					  mthca_msi_x_interrupt, 0,
+					  eq_name[i], dev->eq_table.eq + i);
+			if (err)
+				goto err_out_cmd;
+			dev->eq_table.eq[i].have_irq = 1;
+		}
+	} else {
+		err = request_irq(dev->pdev->irq, mthca_interrupt, SA_SHIRQ,
+				  DRV_NAME, dev);
+		if (err)
+			goto err_out_cmd;
+		dev->eq_table.have_irq = 1;
+	}
+
+	err = mthca_MAP_EQ(dev, async_mask(dev),
+			   0, dev->eq_table.eq[MTHCA_EQ_ASYNC].eqn, &status);
+	if (err)
+		mthca_warn(dev, "MAP_EQ for async EQ %d failed (%d)\n",
+			   dev->eq_table.eq[MTHCA_EQ_ASYNC].eqn, err);
+	if (status)
+		mthca_warn(dev, "MAP_EQ for async EQ %d returned status 0x%02x\n",
+			   dev->eq_table.eq[MTHCA_EQ_ASYNC].eqn, status);
+
+	err = mthca_MAP_EQ(dev, MTHCA_CMD_EVENT_MASK,
+			   0, dev->eq_table.eq[MTHCA_EQ_CMD].eqn, &status);
+	if (err)
+		mthca_warn(dev, "MAP_EQ for cmd EQ %d failed (%d)\n",
+			   dev->eq_table.eq[MTHCA_EQ_CMD].eqn, err);
+	if (status)
+		mthca_warn(dev, "MAP_EQ for cmd EQ %d returned status 0x%02x\n",
+			   dev->eq_table.eq[MTHCA_EQ_CMD].eqn, status);
+
+	return 0;
+
+err_out_cmd:
+	mthca_free_irqs(dev);
+	mthca_free_eq(dev, &dev->eq_table.eq[MTHCA_EQ_CMD]);
+
+err_out_async:
+	mthca_free_eq(dev, &dev->eq_table.eq[MTHCA_EQ_ASYNC]);
+
+err_out_comp:
+	mthca_free_eq(dev, &dev->eq_table.eq[MTHCA_EQ_COMP]);
+
+err_out_free:
+	mthca_alloc_cleanup(&dev->eq_table.alloc);
+	return err;
+}
+
+void __devexit mthca_cleanup_eq_table(struct mthca_dev *dev)
+{
+	u8 status;
+	int i;
+
+	mthca_free_irqs(dev);
+
+	mthca_MAP_EQ(dev, async_mask(dev),
+		     1, dev->eq_table.eq[MTHCA_EQ_ASYNC].eqn, &status);
+	mthca_MAP_EQ(dev, MTHCA_CMD_EVENT_MASK,
+		     1, dev->eq_table.eq[MTHCA_EQ_CMD].eqn, &status);
+
+	for (i = 0; i < MTHCA_NUM_EQ; ++i)
+		mthca_free_eq(dev, &dev->eq_table.eq[i]);
+
+	mthca_alloc_cleanup(&dev->eq_table.alloc);
+}
diff -Nru a/drivers/infiniband/hw/mthca/mthca_mad.c b/drivers/infiniband/hw/mthca/mthca_mad.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/hw/mthca/mthca_mad.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,320 @@
+/*
+ * Copyright (c) 2004 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: mthca_mad.c 1349 2004-12-16 21:09:43Z roland $
+ */
+
+#include <ib_verbs.h>
+#include <ib_mad.h>
+#include <ib_smi.h>
+
+#include "mthca_dev.h"
+#include "mthca_cmd.h"
+
+enum {
+	MTHCA_VENDOR_CLASS1 = 0x9,
+	MTHCA_VENDOR_CLASS2 = 0xa
+};
+
+struct mthca_trap_mad {
+	struct ib_mad *mad;
+	DECLARE_PCI_UNMAP_ADDR(mapping)
+};
+
+static void update_sm_ah(struct mthca_dev *dev,
+			 u8 port_num, u16 lid, u8 sl)
+{
+	struct ib_ah *new_ah;
+	struct ib_ah_attr ah_attr;
+	unsigned long flags;
+
+	if (!dev->send_agent[port_num - 1][0])
+		return;
+
+	memset(&ah_attr, 0, sizeof ah_attr);
+	ah_attr.dlid     = lid;
+	ah_attr.sl       = sl;
+	ah_attr.port_num = port_num;
+
+	new_ah = ib_create_ah(dev->send_agent[port_num - 1][0]->qp->pd,
+			      &ah_attr);
+	if (IS_ERR(new_ah))
+		return;
+
+	spin_lock_irqsave(&dev->sm_lock, flags);
+	if (dev->sm_ah[port_num - 1])
+		ib_destroy_ah(dev->sm_ah[port_num - 1]);
+	dev->sm_ah[port_num - 1] = new_ah;
+	spin_unlock_irqrestore(&dev->sm_lock, flags);
+}
+
+/*
+ * Snoop SM MADs for port info and P_Key table sets, so we can
+ * synthesize LID change and P_Key change events.
+ */
+static void smp_snoop(struct ib_device *ibdev,
+		      u8 port_num,
+		      struct ib_mad *mad)
+{
+	struct ib_event event;
+
+	if ((mad->mad_hdr.mgmt_class  == IB_MGMT_CLASS_SUBN_LID_ROUTED ||
+	     mad->mad_hdr.mgmt_class  == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) &&
+	    mad->mad_hdr.method     == IB_MGMT_METHOD_SET) {
+		if (mad->mad_hdr.attr_id == IB_SMP_ATTR_PORT_INFO) {
+			update_sm_ah(to_mdev(ibdev), port_num,
+				     be16_to_cpup((__be16 *) (mad->data + 58)),
+				     (*(u8 *) (mad->data + 76)) & 0xf);
+
+			event.device           = ibdev;
+			event.event            = IB_EVENT_LID_CHANGE;
+			event.element.port_num = port_num;
+			ib_dispatch_event(&event);
+		}
+
+		if (mad->mad_hdr.attr_id == IB_SMP_ATTR_PKEY_TABLE) {
+			event.device           = ibdev;
+			event.event            = IB_EVENT_PKEY_CHANGE;
+			event.element.port_num = port_num;
+			ib_dispatch_event(&event);
+		}
+	}
+}
+
+static void forward_trap(struct mthca_dev *dev,
+			 u8 port_num,
+			 struct ib_mad *mad)
+{
+	int qpn = mad->mad_hdr.mgmt_class != IB_MGMT_CLASS_SUBN_LID_ROUTED;
+	struct mthca_trap_mad *tmad;
+	struct ib_sge      gather_list;
+	struct ib_send_wr *bad_wr, wr = {
+		.opcode      = IB_WR_SEND,
+		.sg_list     = &gather_list,
+		.num_sge     = 1,
+		.send_flags  = IB_SEND_SIGNALED,
+		.wr	     = {
+			 .ud = {
+				 .remote_qpn  = qpn,
+				 .remote_qkey = qpn ? IB_QP1_QKEY : 0,
+				 .timeout_ms  = 0
+			 }
+		 }
+	};
+	struct ib_mad_agent *agent = dev->send_agent[port_num - 1][qpn];
+	int ret;
+	unsigned long flags;
+
+	if (agent) {
+		tmad = kmalloc(sizeof *tmad, GFP_KERNEL);
+		if (!tmad)
+			return;
+
+		tmad->mad = kmalloc(sizeof *tmad->mad, GFP_KERNEL);
+		if (!tmad->mad) {
+			kfree(tmad);
+			return;
+		}
+
+		memcpy(tmad->mad, mad, sizeof *mad);
+
+		wr.wr.ud.mad_hdr = &tmad->mad->mad_hdr;
+		wr.wr_id         = (unsigned long) tmad;
+
+		gather_list.addr   = dma_map_single(agent->device->dma_device,
+						    tmad->mad,
+						    sizeof *tmad->mad,
+						    DMA_TO_DEVICE);
+		gather_list.length = sizeof *tmad->mad;
+		gather_list.lkey   = to_mpd(agent->qp->pd)->ntmr.ibmr.lkey;
+		pci_unmap_addr_set(tmad, mapping, gather_list.addr);
+
+		/*
+		 * We rely here on the fact that MLX QPs don't use the
+		 * address handle after the send is posted (this is
+		 * wrong following the IB spec strictly, but we know
+		 * it's OK for our devices).
+		 */
+		spin_lock_irqsave(&dev->sm_lock, flags);
+		wr.wr.ud.ah      = dev->sm_ah[port_num - 1];
+		if (wr.wr.ud.ah)
+			ret = ib_post_send_mad(agent, &wr, &bad_wr);
+		else
+			ret = -EINVAL;
+		spin_unlock_irqrestore(&dev->sm_lock, flags);
+
+		if (ret) {
+			dma_unmap_single(agent->device->dma_device,
+					 pci_unmap_addr(tmad, mapping),
+					 sizeof *tmad->mad,
+					 DMA_TO_DEVICE);
+			kfree(tmad->mad);
+			kfree(tmad);
+		}
+	}
+}
+
+int mthca_process_mad(struct ib_device *ibdev,
+		      int mad_flags,
+		      u8 port_num,
+		      u16 slid,
+		      struct ib_mad *in_mad,
+		      struct ib_mad *out_mad)
+{
+	int err;
+	u8 status;
+
+	/* Forward locally generated traps to the SM */
+	if (in_mad->mad_hdr.method == IB_MGMT_METHOD_TRAP &&
+	    slid == 0) {
+		forward_trap(to_mdev(ibdev), port_num, in_mad);
+		return IB_MAD_RESULT_SUCCESS | IB_MAD_RESULT_CONSUMED;
+	}
+
+	/*
+	 * Only handle SM gets, sets and trap represses for SM class
+	 *
+	 * Only handle PMA and Mellanox vendor-specific class gets and
+	 * sets for other classes.
+	 */
+	if (in_mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_LID_ROUTED ||
+	    in_mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) {
+		if (in_mad->mad_hdr.method   != IB_MGMT_METHOD_GET &&
+		    in_mad->mad_hdr.method   != IB_MGMT_METHOD_SET &&
+		    in_mad->mad_hdr.method   != IB_MGMT_METHOD_TRAP_REPRESS)
+			return IB_MAD_RESULT_SUCCESS;
+
+		/*
+		 * Don't process SMInfo queries or vendor-specific
+		 * MADs -- the SMA can't handle them.
+		 */
+		if (in_mad->mad_hdr.attr_id == IB_SMP_ATTR_SM_INFO ||
+		    ((in_mad->mad_hdr.attr_id & IB_SMP_ATTR_VENDOR_MASK) ==
+		     IB_SMP_ATTR_VENDOR_MASK))
+			return IB_MAD_RESULT_SUCCESS;
+	} else if (in_mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_PERF_MGMT ||
+		   in_mad->mad_hdr.mgmt_class == MTHCA_VENDOR_CLASS1     ||
+		   in_mad->mad_hdr.mgmt_class == MTHCA_VENDOR_CLASS2) {
+		if (in_mad->mad_hdr.method  != IB_MGMT_METHOD_GET &&
+		    in_mad->mad_hdr.method  != IB_MGMT_METHOD_SET)
+			return IB_MAD_RESULT_SUCCESS;
+	} else
+		return IB_MAD_RESULT_SUCCESS;
+
+	err = mthca_MAD_IFC(to_mdev(ibdev),
+			    !!(mad_flags & IB_MAD_IGNORE_MKEY),
+			    port_num, in_mad, out_mad,
+			    &status);
+	if (err) {
+		mthca_err(to_mdev(ibdev), "MAD_IFC failed\n");
+		return IB_MAD_RESULT_FAILURE;
+	}
+	if (status == MTHCA_CMD_STAT_BAD_PKT)
+		return IB_MAD_RESULT_SUCCESS;
+	if (status) {
+		mthca_err(to_mdev(ibdev), "MAD_IFC returned status %02x\n",
+			  status);
+		return IB_MAD_RESULT_FAILURE;
+	}
+
+	if (!out_mad->mad_hdr.status)
+		smp_snoop(ibdev, port_num, in_mad);
+
+	/* set return bit in status of directed route responses */
+	if (in_mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE)
+		out_mad->mad_hdr.status |= cpu_to_be16(1 << 15);
+
+	if (in_mad->mad_hdr.method == IB_MGMT_METHOD_TRAP_REPRESS)
+		/* no response for trap repress */
+		return IB_MAD_RESULT_SUCCESS | IB_MAD_RESULT_CONSUMED;
+
+	return IB_MAD_RESULT_SUCCESS | IB_MAD_RESULT_REPLY;
+}
+
+static void send_handler(struct ib_mad_agent *agent,
+			 struct ib_mad_send_wc *mad_send_wc)
+{
+	struct mthca_trap_mad *tmad =
+		(void *) (unsigned long) mad_send_wc->wr_id;
+
+	dma_unmap_single(agent->device->dma_device,
+			 pci_unmap_addr(tmad, mapping),
+			 sizeof *tmad->mad,
+			 DMA_TO_DEVICE);
+	kfree(tmad->mad);
+	kfree(tmad);
+}
+
+int mthca_create_agents(struct mthca_dev *dev)
+{
+	struct ib_mad_agent *agent;
+	int p, q;
+
+	spin_lock_init(&dev->sm_lock);
+
+	for (p = 0; p < dev->limits.num_ports; ++p)
+		for (q = 0; q <= 1; ++q) {
+			agent = ib_register_mad_agent(&dev->ib_dev, p + 1,
+						      q ? IB_QPT_GSI : IB_QPT_SMI,
+						      NULL, 0, send_handler,
+						      NULL, NULL);
+			if (IS_ERR(agent))
+				goto err;
+			dev->send_agent[p][q] = agent;
+		}
+
+	return 0;
+
+err:
+	for (p = 0; p < dev->limits.num_ports; ++p)
+		for (q = 0; q <= 1; ++q)
+			if (dev->send_agent[p][q])
+				ib_unregister_mad_agent(dev->send_agent[p][q]);
+
+	return PTR_ERR(agent);
+}
+
+void mthca_free_agents(struct mthca_dev *dev)
+{
+	struct ib_mad_agent *agent;
+	int p, q;
+
+	for (p = 0; p < dev->limits.num_ports; ++p) {
+		for (q = 0; q <= 1; ++q) {
+			agent = dev->send_agent[p][q];
+			dev->send_agent[p][q] = NULL;
+			ib_unregister_mad_agent(agent);
+		}
+
+		if (dev->sm_ah[p])
+			ib_destroy_ah(dev->sm_ah[p]);
+	}
+}
diff -Nru a/drivers/infiniband/hw/mthca/mthca_main.c b/drivers/infiniband/hw/mthca/mthca_main.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/hw/mthca/mthca_main.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,936 @@
+/*
+ * Copyright (c) 2004 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: mthca_main.c 1396 2004-12-28 04:10:27Z roland $
+ */
+
+#include <linux/config.h>
+#include <linux/version.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/errno.h>
+#include <linux/pci.h>
+#include <linux/interrupt.h>
+
+#ifdef CONFIG_INFINIBAND_MTHCA_SSE_DOORBELL
+#include <asm/cpufeature.h>
+#endif
+
+#include "mthca_dev.h"
+#include "mthca_config_reg.h"
+#include "mthca_cmd.h"
+#include "mthca_profile.h"
+
+MODULE_AUTHOR("Roland Dreier");
+MODULE_DESCRIPTION("Mellanox InfiniBand HCA low-level driver");
+MODULE_LICENSE("Dual BSD/GPL");
+MODULE_VERSION(DRV_VERSION);
+
+#ifdef CONFIG_PCI_MSI
+
+static int msi_x = 0;
+module_param(msi_x, int, 0444);
+MODULE_PARM_DESC(msi_x, "attempt to use MSI-X if nonzero");
+
+static int msi = 0;
+module_param(msi, int, 0444);
+MODULE_PARM_DESC(msi, "attempt to use MSI if nonzero");
+
+#else /* CONFIG_PCI_MSI */
+
+#define msi_x (0)
+#define msi   (0)
+
+#endif /* CONFIG_PCI_MSI */
+
+static const char mthca_version[] __devinitdata =
+	"ib_mthca: Mellanox InfiniBand HCA driver v"
+	DRV_VERSION " (" DRV_RELDATE ")\n";
+
+static int __devinit mthca_tune_pci(struct mthca_dev *mdev)
+{
+	int cap;
+	u16 val;
+
+	/* First try to max out Read Byte Count */
+	cap = pci_find_capability(mdev->pdev, PCI_CAP_ID_PCIX);
+	if (cap) {
+		if (pci_read_config_word(mdev->pdev, cap + PCI_X_CMD, &val)) {
+			mthca_err(mdev, "Couldn't read PCI-X command register, "
+				  "aborting.\n");
+			return -ENODEV;
+		}
+		val = (val & ~PCI_X_CMD_MAX_READ) | (3 << 2);
+		if (pci_write_config_word(mdev->pdev, cap + PCI_X_CMD, val)) {
+			mthca_err(mdev, "Couldn't write PCI-X command register, "
+				  "aborting.\n");
+			return -ENODEV;
+		}
+	} else if (mdev->hca_type == TAVOR)
+		mthca_info(mdev, "No PCI-X capability, not setting RBC.\n");
+
+	cap = pci_find_capability(mdev->pdev, PCI_CAP_ID_EXP);
+	if (cap) {
+		if (pci_read_config_word(mdev->pdev, cap + PCI_EXP_DEVCTL, &val)) {
+			mthca_err(mdev, "Couldn't read PCI Express device control "
+				  "register, aborting.\n");
+			return -ENODEV;
+		}
+		val = (val & ~PCI_EXP_DEVCTL_READRQ) | (5 << 12);
+		if (pci_write_config_word(mdev->pdev, cap + PCI_EXP_DEVCTL, val)) {
+			mthca_err(mdev, "Couldn't write PCI Express device control "
+				  "register, aborting.\n");
+			return -ENODEV;
+		}
+	} else if (mdev->hca_type == ARBEL_NATIVE ||
+		   mdev->hca_type == ARBEL_COMPAT)
+		mthca_info(mdev, "No PCI Express capability, "
+			   "not setting Max Read Request Size.\n");
+
+	return 0;
+}
+
+static int __devinit mthca_dev_lim(struct mthca_dev *mdev, struct mthca_dev_lim *dev_lim)
+{
+	int err;
+	u8 status;
+
+	err = mthca_QUERY_DEV_LIM(mdev, dev_lim, &status);
+	if (err) {
+		mthca_err(mdev, "QUERY_DEV_LIM command failed, aborting.\n");
+		return err;
+	}
+	if (status) {
+		mthca_err(mdev, "QUERY_DEV_LIM returned status 0x%02x, "
+			  "aborting.\n", status);
+		return -EINVAL;
+	}
+	if (dev_lim->min_page_sz > PAGE_SIZE) {
+		mthca_err(mdev, "HCA minimum page size of %d bigger than "
+			  "kernel PAGE_SIZE of %ld, aborting.\n",
+			  dev_lim->min_page_sz, PAGE_SIZE);
+		return -ENODEV;
+	}
+	if (dev_lim->num_ports > MTHCA_MAX_PORTS) {
+		mthca_err(mdev, "HCA has %d ports, but we only support %d, "
+			  "aborting.\n",
+			  dev_lim->num_ports, MTHCA_MAX_PORTS);
+		return -ENODEV;
+	}
+
+	mdev->limits.num_ports      	= dev_lim->num_ports;
+	mdev->limits.vl_cap             = dev_lim->max_vl;
+	mdev->limits.mtu_cap            = dev_lim->max_mtu;
+	mdev->limits.gid_table_len  	= dev_lim->max_gids;
+	mdev->limits.pkey_table_len 	= dev_lim->max_pkeys;
+	mdev->limits.local_ca_ack_delay = dev_lim->local_ca_ack_delay;
+	mdev->limits.max_sg             = dev_lim->max_sg;
+	mdev->limits.reserved_qps       = dev_lim->reserved_qps;
+	mdev->limits.reserved_srqs      = dev_lim->reserved_srqs;
+	mdev->limits.reserved_eecs      = dev_lim->reserved_eecs;
+	mdev->limits.reserved_cqs       = dev_lim->reserved_cqs;
+	mdev->limits.reserved_eqs       = dev_lim->reserved_eqs;
+	mdev->limits.reserved_mtts      = dev_lim->reserved_mtts;
+	mdev->limits.reserved_mrws      = dev_lim->reserved_mrws;
+	mdev->limits.reserved_uars      = dev_lim->reserved_uars;
+	mdev->limits.reserved_pds       = dev_lim->reserved_pds;
+
+	if (dev_lim->flags & DEV_LIM_FLAG_SRQ)
+		mdev->mthca_flags |= MTHCA_FLAG_SRQ;
+
+	return 0;
+}
+
+static int __devinit mthca_init_tavor(struct mthca_dev *mdev)
+{
+	u8 status;
+	int err;
+	struct mthca_dev_lim        dev_lim;
+	struct mthca_init_hca_param init_hca;
+	struct mthca_adapter        adapter;
+
+	err = mthca_SYS_EN(mdev, &status);
+	if (err) {
+		mthca_err(mdev, "SYS_EN command failed, aborting.\n");
+		return err;
+	}
+	if (status) {
+		mthca_err(mdev, "SYS_EN returned status 0x%02x, "
+			  "aborting.\n", status);
+		return -EINVAL;
+	}
+
+	err = mthca_QUERY_FW(mdev, &status);
+	if (err) {
+		mthca_err(mdev, "QUERY_FW command failed, aborting.\n");
+		goto err_out_disable;
+	}
+	if (status) {
+		mthca_err(mdev, "QUERY_FW returned status 0x%02x, "
+			  "aborting.\n", status);
+		err = -EINVAL;
+		goto err_out_disable;
+	}
+	err = mthca_QUERY_DDR(mdev, &status);
+	if (err) {
+		mthca_err(mdev, "QUERY_DDR command failed, aborting.\n");
+		goto err_out_disable;
+	}
+	if (status) {
+		mthca_err(mdev, "QUERY_DDR returned status 0x%02x, "
+			  "aborting.\n", status);
+		err = -EINVAL;
+		goto err_out_disable;
+	}
+
+	err = mthca_dev_lim(mdev, &dev_lim);
+
+	err = mthca_make_profile(mdev, &dev_lim, &init_hca);
+	if (err)
+		goto err_out_disable;
+
+	err = mthca_INIT_HCA(mdev, &init_hca, &status);
+	if (err) {
+		mthca_err(mdev, "INIT_HCA command failed, aborting.\n");
+		goto err_out_disable;
+	}
+	if (status) {
+		mthca_err(mdev, "INIT_HCA returned status 0x%02x, "
+			  "aborting.\n", status);
+		err = -EINVAL;
+		goto err_out_disable;
+	}
+
+	err = mthca_QUERY_ADAPTER(mdev, &adapter, &status);
+	if (err) {
+		mthca_err(mdev, "QUERY_ADAPTER command failed, aborting.\n");
+		goto err_out_disable;
+	}
+	if (status) {
+		mthca_err(mdev, "QUERY_ADAPTER returned status 0x%02x, "
+			  "aborting.\n", status);
+		err = -EINVAL;
+		goto err_out_close;
+	}
+
+	mdev->eq_table.inta_pin = adapter.inta_pin;
+	mdev->rev_id            = adapter.revision_id;
+
+	return 0;
+
+err_out_close:
+	mthca_CLOSE_HCA(mdev, 0, &status);
+
+err_out_disable:
+	mthca_SYS_DIS(mdev, &status);
+
+	return err;
+}
+
+static int __devinit mthca_load_fw(struct mthca_dev *mdev)
+{
+	u8 status;
+	int err;
+	int num_ent, num_sg, fw_pages, cur_order;
+	int i;
+
+	/* FIXME: use HCA-attached memory for FW if present */
+
+	mdev->fw.arbel.mem = kmalloc(sizeof *mdev->fw.arbel.mem *
+				     mdev->fw.arbel.fw_pages,
+				     GFP_KERNEL);
+	if (!mdev->fw.arbel.mem) {
+		mthca_err(mdev, "Couldn't allocate FW area, aborting.\n");
+		return -ENOMEM;
+	}
+
+	memset(mdev->fw.arbel.mem, 0,
+	       sizeof *mdev->fw.arbel.mem * mdev->fw.arbel.fw_pages);
+
+	fw_pages = mdev->fw.arbel.fw_pages;
+	num_ent = 0;
+
+	/*
+	 * We allocate in as big chunks as we can, up to a maximum of
+	 * 256 KB per chunk.
+	 */
+	cur_order = get_order(1 << 18);
+
+	while (fw_pages > 0) {
+		while (1 << cur_order > fw_pages)
+			--cur_order;
+
+		/*
+		 * We allocate with GFP_HIGHUSER because only the
+		 * firmware is going to touch these pages, so there's
+		 * no need for a kernel virtual address.  We use
+		 * __GFP_NOWARN because we'll deal with any allocation
+		 * failures ourselves.
+		 */
+		mdev->fw.arbel.mem[num_ent].page   = alloc_pages(GFP_HIGHUSER | __GFP_NOWARN,
+								 cur_order);
+		mdev->fw.arbel.mem[num_ent].length = PAGE_SIZE << cur_order;
+		if (!mdev->fw.arbel.mem[num_ent].page) {
+			--cur_order;
+			if (cur_order < 0) {
+				mthca_err(mdev, "Couldn't allocate FW area, aborting.\n");
+				err = -ENOMEM;
+				goto err_free;
+			}
+		} else {
+			++num_ent;
+			fw_pages -= 1 << cur_order;
+		}
+	}
+
+	num_sg = pci_map_sg(mdev->pdev, mdev->fw.arbel.mem, num_ent,
+			    PCI_DMA_BIDIRECTIONAL);
+	if (num_sg <= 0) {
+		mthca_err(mdev, "Couldn't allocate FW area, aborting.\n");
+		err = -ENOMEM;
+		goto err_free;
+	}
+
+	err = mthca_MAP_FA(mdev, num_sg, mdev->fw.arbel.mem, &status);
+	if (err) {
+		mthca_err(mdev, "MAP_FA command failed, aborting.\n");
+		goto err_unmap;
+	}
+	if (status) {
+		mthca_err(mdev, "MAP_FA returned status 0x%02x, aborting.\n", status);
+		err = -EINVAL;
+		goto err_unmap;
+	}
+	err = mthca_RUN_FW(mdev, &status);
+	if (err) {
+		mthca_err(mdev, "RUN_FW command failed, aborting.\n");
+		goto err_unmap_fa;
+	}
+	if (status) {
+		mthca_err(mdev, "RUN_FW returned status 0x%02x, aborting.\n", status);
+		err = -EINVAL;
+		goto err_unmap_fa;
+	}
+
+	return 0;
+
+err_unmap_fa:
+	mthca_UNMAP_FA(mdev, &status);
+
+err_unmap:
+	pci_unmap_sg(mdev->pdev, mdev->fw.arbel.mem,
+		   mdev->fw.arbel.fw_pages, PCI_DMA_BIDIRECTIONAL);
+err_free:
+	for (i = 0; i < mdev->fw.arbel.fw_pages; ++i)
+		if (mdev->fw.arbel.mem[i].page)
+			__free_pages(mdev->fw.arbel.mem[i].page,
+				     get_order(mdev->fw.arbel.mem[i].length));
+	kfree(mdev->fw.arbel.mem);
+	return err;
+}
+
+static int __devinit mthca_init_arbel(struct mthca_dev *mdev)
+{
+	struct mthca_dev_lim dev_lim;
+	u8 status;
+	int err;
+
+	err = mthca_QUERY_FW(mdev, &status);
+	if (err) {
+		mthca_err(mdev, "QUERY_FW command failed, aborting.\n");
+		return err;
+	}
+	if (status) {
+		mthca_err(mdev, "QUERY_FW returned status 0x%02x, "
+			  "aborting.\n", status);
+		return -EINVAL;
+	}
+
+	err = mthca_ENABLE_LAM(mdev, &status);
+	if (err) {
+		mthca_err(mdev, "ENABLE_LAM command failed, aborting.\n");
+		return err;
+	}
+	if (status == MTHCA_CMD_STAT_LAM_NOT_PRE) {
+		mthca_dbg(mdev, "No HCA-attached memory (running in MemFree mode)\n");
+		mdev->mthca_flags |= MTHCA_FLAG_NO_LAM;
+	} else if (status) {
+		mthca_err(mdev, "ENABLE_LAM returned status 0x%02x, "
+			  "aborting.\n", status);
+		return -EINVAL;
+	}
+
+	err = mthca_load_fw(mdev);
+	if (err) {
+		mthca_err(mdev, "Failed to start FW, aborting.\n");
+		goto err_out_disable;
+	}
+
+	err = mthca_dev_lim(mdev, &dev_lim);
+	if (err) {
+		mthca_err(mdev, "QUERY_DEV_LIM command failed, aborting.\n");
+		goto err_out_disable;
+	}
+
+	mthca_warn(mdev, "Sorry, native MT25208 mode support is not done, "
+		   "aborting.\n");
+	err = -ENODEV;
+
+err_out_disable:
+	if (!(mdev->mthca_flags & MTHCA_FLAG_NO_LAM))
+		mthca_DISABLE_LAM(mdev, &status);
+	return err;
+}
+
+static int __devinit mthca_init_hca(struct mthca_dev *mdev)
+{
+	if (mdev->hca_type == ARBEL_NATIVE)
+		return mthca_init_arbel(mdev);
+	else
+		return mthca_init_tavor(mdev);
+}
+
+static int __devinit mthca_setup_hca(struct mthca_dev *dev)
+{
+	int err;
+
+	MTHCA_INIT_DOORBELL_LOCK(&dev->doorbell_lock);
+
+	err = mthca_init_pd_table(dev);
+	if (err) {
+		mthca_err(dev, "Failed to initialize "
+			  "protection domain table, aborting.\n");
+		return err;
+	}
+
+	err = mthca_init_mr_table(dev);
+	if (err) {
+		mthca_err(dev, "Failed to initialize "
+			  "memory region table, aborting.\n");
+		goto err_out_pd_table_free;
+	}
+
+	err = mthca_pd_alloc(dev, &dev->driver_pd);
+	if (err) {
+		mthca_err(dev, "Failed to create driver PD, "
+			  "aborting.\n");
+		goto err_out_mr_table_free;
+	}
+
+	err = mthca_init_eq_table(dev);
+	if (err) {
+		mthca_err(dev, "Failed to initialize "
+			  "event queue table, aborting.\n");
+		goto err_out_pd_free;
+	}
+
+	err = mthca_cmd_use_events(dev);
+	if (err) {
+		mthca_err(dev, "Failed to switch to event-driven "
+			  "firmware commands, aborting.\n");
+		goto err_out_eq_table_free;
+	}
+
+	err = mthca_init_cq_table(dev);
+	if (err) {
+		mthca_err(dev, "Failed to initialize "
+			  "completion queue table, aborting.\n");
+		goto err_out_cmd_poll;
+	}
+
+	err = mthca_init_qp_table(dev);
+	if (err) {
+		mthca_err(dev, "Failed to initialize "
+			  "queue pair table, aborting.\n");
+		goto err_out_cq_table_free;
+	}
+
+	err = mthca_init_av_table(dev);
+	if (err) {
+		mthca_err(dev, "Failed to initialize "
+			  "address vector table, aborting.\n");
+		goto err_out_qp_table_free;
+	}
+
+	err = mthca_init_mcg_table(dev);
+	if (err) {
+		mthca_err(dev, "Failed to initialize "
+			  "multicast group table, aborting.\n");
+		goto err_out_av_table_free;
+	}
+
+	return 0;
+
+err_out_av_table_free:
+	mthca_cleanup_av_table(dev);
+
+err_out_qp_table_free:
+	mthca_cleanup_qp_table(dev);
+
+err_out_cq_table_free:
+	mthca_cleanup_cq_table(dev);
+
+err_out_cmd_poll:
+	mthca_cmd_use_polling(dev);
+
+err_out_eq_table_free:
+	mthca_cleanup_eq_table(dev);
+
+err_out_pd_free:
+	mthca_pd_free(dev, &dev->driver_pd);
+
+err_out_mr_table_free:
+	mthca_cleanup_mr_table(dev);
+
+err_out_pd_table_free:
+	mthca_cleanup_pd_table(dev);
+	return err;
+}
+
+static int __devinit mthca_request_regions(struct pci_dev *pdev,
+					   int ddr_hidden)
+{
+	int err;
+
+	/*
+	 * We request our first BAR in two chunks, since the MSI-X
+	 * vector table is right in the middle.
+	 *
+	 * This is why we can't just use pci_request_regions() -- if
+	 * we did then setting up MSI-X would fail, since the PCI core
+	 * wants to do request_mem_region on the MSI-X vector table.
+	 */
+	if (!request_mem_region(pci_resource_start(pdev, 0) +
+				MTHCA_HCR_BASE,
+				MTHCA_MAP_HCR_SIZE,
+				DRV_NAME))
+		return -EBUSY;
+
+	if (!request_mem_region(pci_resource_start(pdev, 0) +
+				MTHCA_CLR_INT_BASE,
+				MTHCA_CLR_INT_SIZE,
+				DRV_NAME)) {
+		err = -EBUSY;
+		goto err_out_bar0_beg;
+	}
+
+	err = pci_request_region(pdev, 2, DRV_NAME);
+	if (err)
+		goto err_out_bar0_end;
+
+	if (!ddr_hidden) {
+		err = pci_request_region(pdev, 4, DRV_NAME);
+		if (err)
+			goto err_out_bar2;
+	}
+
+	return 0;
+
+err_out_bar0_beg:
+	release_mem_region(pci_resource_start(pdev, 0) +
+			   MTHCA_HCR_BASE,
+			   MTHCA_MAP_HCR_SIZE);
+
+err_out_bar0_end:
+	release_mem_region(pci_resource_start(pdev, 0) +
+			   MTHCA_CLR_INT_BASE,
+			   MTHCA_CLR_INT_SIZE);
+
+err_out_bar2:
+	pci_release_region(pdev, 2);
+	return err;
+}
+
+static void mthca_release_regions(struct pci_dev *pdev,
+				  int ddr_hidden)
+{
+	release_mem_region(pci_resource_start(pdev, 0) +
+			   MTHCA_HCR_BASE,
+			   MTHCA_MAP_HCR_SIZE);
+	release_mem_region(pci_resource_start(pdev, 0) +
+			   MTHCA_CLR_INT_BASE,
+			   MTHCA_CLR_INT_SIZE);
+	pci_release_region(pdev, 2);
+	if (!ddr_hidden)
+		pci_release_region(pdev, 4);
+}
+
+static int __devinit mthca_enable_msi_x(struct mthca_dev *mdev)
+{
+	struct msix_entry entries[3];
+	int err;
+
+	entries[0].entry = 0;
+	entries[1].entry = 1;
+	entries[2].entry = 2;
+
+	err = pci_enable_msix(mdev->pdev, entries, ARRAY_SIZE(entries));
+	if (err) {
+		if (err > 0)
+			mthca_info(mdev, "Only %d MSI-X vectors available, "
+				   "not using MSI-X\n", err);
+		return err;
+	}
+
+	mdev->eq_table.eq[MTHCA_EQ_COMP ].msi_x_vector = entries[0].vector;
+	mdev->eq_table.eq[MTHCA_EQ_ASYNC].msi_x_vector = entries[1].vector;
+	mdev->eq_table.eq[MTHCA_EQ_CMD  ].msi_x_vector = entries[2].vector;
+
+	return 0;
+}
+
+static void mthca_close_hca(struct mthca_dev *mdev)
+{
+	u8 status;
+	int i;
+
+	mthca_CLOSE_HCA(mdev, 0, &status);
+
+	if (mdev->hca_type == ARBEL_NATIVE) {
+		mthca_UNMAP_FA(mdev, &status);
+
+		pci_unmap_sg(mdev->pdev, mdev->fw.arbel.mem,
+			     mdev->fw.arbel.fw_pages, PCI_DMA_BIDIRECTIONAL);
+
+		for (i = 0; i < mdev->fw.arbel.fw_pages; ++i)
+			if (mdev->fw.arbel.mem[i].page)
+				__free_pages(mdev->fw.arbel.mem[i].page,
+					     get_order(mdev->fw.arbel.mem[i].length));
+		kfree(mdev->fw.arbel.mem);
+
+		if (!(mdev->mthca_flags & MTHCA_FLAG_NO_LAM))
+			mthca_DISABLE_LAM(mdev, &status);
+	} else
+		mthca_SYS_DIS(mdev, &status);
+}
+
+static int __devinit mthca_init_one(struct pci_dev *pdev,
+				    const struct pci_device_id *id)
+{
+	static int mthca_version_printed = 0;
+	int ddr_hidden = 0;
+	int err;
+	unsigned long mthca_base;
+	struct mthca_dev *mdev;
+
+	if (!mthca_version_printed) {
+		printk(KERN_INFO "%s", mthca_version);
+		++mthca_version_printed;
+	}
+
+	printk(KERN_INFO PFX "Initializing %s (%s)\n",
+	       pci_pretty_name(pdev), pci_name(pdev));
+
+	err = pci_enable_device(pdev);
+	if (err) {
+		dev_err(&pdev->dev, "Cannot enable PCI device, "
+			"aborting.\n");
+		return err;
+	}
+
+	/*
+	 * Check for BARs.  We expect 0: 1MB, 2: 8MB, 4: DDR (may not
+	 * be present)
+	 */
+	if (!(pci_resource_flags(pdev, 0) & IORESOURCE_MEM) ||
+	    pci_resource_len(pdev, 0) != 1 << 20) {
+		dev_err(&pdev->dev, "Missing DCS, aborting.");
+		err = -ENODEV;
+		goto err_out_disable_pdev;
+	}
+	if (!(pci_resource_flags(pdev, 2) & IORESOURCE_MEM) ||
+	    pci_resource_len(pdev, 2) != 1 << 23) {
+		dev_err(&pdev->dev, "Missing UAR, aborting.");
+		err = -ENODEV;
+		goto err_out_disable_pdev;
+	}
+	if (!(pci_resource_flags(pdev, 4) & IORESOURCE_MEM))
+		ddr_hidden = 1;
+
+	err = mthca_request_regions(pdev, ddr_hidden);
+	if (err) {
+		dev_err(&pdev->dev, "Cannot obtain PCI resources, "
+			"aborting.\n");
+		goto err_out_disable_pdev;
+	}
+
+	pci_set_master(pdev);
+
+	err = pci_set_dma_mask(pdev, DMA_64BIT_MASK);
+	if (err) {
+		dev_warn(&pdev->dev, "Warning: couldn't set 64-bit PCI DMA mask.\n");
+		err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+		if (err) {
+			dev_err(&pdev->dev, "Can't set PCI DMA mask, aborting.\n");
+			goto err_out_free_res;
+		}
+	}
+	err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
+	if (err) {
+		dev_warn(&pdev->dev, "Warning: couldn't set 64-bit "
+			 "consistent PCI DMA mask.\n");
+		err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
+		if (err) {
+			dev_err(&pdev->dev, "Can't set consistent PCI DMA mask, "
+				"aborting.\n");
+			goto err_out_free_res;
+		}
+	}
+
+	mdev = (struct mthca_dev *) ib_alloc_device(sizeof *mdev);
+	if (!mdev) {
+		dev_err(&pdev->dev, "Device struct alloc failed, "
+			"aborting.\n");
+		err = -ENOMEM;
+		goto err_out_free_res;
+	}
+
+	mdev->pdev     = pdev;
+	mdev->hca_type = id->driver_data;
+
+	if (ddr_hidden)
+		mdev->mthca_flags |= MTHCA_FLAG_DDR_HIDDEN;
+
+	/*
+	 * Now reset the HCA before we touch the PCI capabilities or
+	 * attempt a firmware command, since a boot ROM may have left
+	 * the HCA in an undefined state.
+	 */
+	err = mthca_reset(mdev);
+	if (err) {
+		mthca_err(mdev, "Failed to reset HCA, aborting.\n");
+		goto err_out_free_dev;
+	}
+
+	if (msi_x && !mthca_enable_msi_x(mdev))
+		mdev->mthca_flags |= MTHCA_FLAG_MSI_X;
+	if (msi && !(mdev->mthca_flags & MTHCA_FLAG_MSI_X) &&
+	    !pci_enable_msi(pdev))
+		mdev->mthca_flags |= MTHCA_FLAG_MSI;
+
+	sema_init(&mdev->cmd.hcr_sem, 1);
+	sema_init(&mdev->cmd.poll_sem, 1);
+	mdev->cmd.use_events = 0;
+
+	mthca_base = pci_resource_start(pdev, 0);
+	mdev->hcr = ioremap(mthca_base + MTHCA_HCR_BASE, MTHCA_MAP_HCR_SIZE);
+	if (!mdev->hcr) {
+		mthca_err(mdev, "Couldn't map command register, "
+			  "aborting.\n");
+		err = -ENOMEM;
+		goto err_out_free_dev;
+	}
+	mdev->clr_base = ioremap(mthca_base + MTHCA_CLR_INT_BASE,
+				 MTHCA_CLR_INT_SIZE);
+	if (!mdev->clr_base) {
+		mthca_err(mdev, "Couldn't map command register, "
+			  "aborting.\n");
+		err = -ENOMEM;
+		goto err_out_iounmap;
+	}
+
+	mthca_base = pci_resource_start(pdev, 2);
+	mdev->kar = ioremap(mthca_base + PAGE_SIZE * MTHCA_KAR_PAGE, PAGE_SIZE);
+	if (!mdev->kar) {
+		mthca_err(mdev, "Couldn't map kernel access region, "
+			  "aborting.\n");
+		err = -ENOMEM;
+		goto err_out_iounmap_clr;
+	}
+
+	err = mthca_tune_pci(mdev);
+	if (err)
+		goto err_out_iounmap_kar;
+
+	err = mthca_init_hca(mdev);
+	if (err)
+		goto err_out_iounmap_kar;
+
+	err = mthca_setup_hca(mdev);
+	if (err)
+		goto err_out_close;
+
+	err = mthca_register_device(mdev);
+	if (err)
+		goto err_out_cleanup;
+
+	err = mthca_create_agents(mdev);
+	if (err)
+		goto err_out_unregister;
+
+	pci_set_drvdata(pdev, mdev);
+
+	return 0;
+
+err_out_unregister:
+	mthca_unregister_device(mdev);
+
+err_out_cleanup:
+	mthca_cleanup_mcg_table(mdev);
+	mthca_cleanup_av_table(mdev);
+	mthca_cleanup_qp_table(mdev);
+	mthca_cleanup_cq_table(mdev);
+	mthca_cmd_use_polling(mdev);
+	mthca_cleanup_eq_table(mdev);
+
+	mthca_pd_free(mdev, &mdev->driver_pd);
+
+	mthca_cleanup_mr_table(mdev);
+	mthca_cleanup_pd_table(mdev);
+
+err_out_close:
+	mthca_close_hca(mdev);
+
+err_out_iounmap_kar:
+	iounmap(mdev->kar);
+
+err_out_iounmap_clr:
+	iounmap(mdev->clr_base);
+
+err_out_iounmap:
+	iounmap(mdev->hcr);
+
+err_out_free_dev:
+	if (mdev->mthca_flags & MTHCA_FLAG_MSI_X)
+		pci_disable_msix(pdev);
+	if (mdev->mthca_flags & MTHCA_FLAG_MSI)
+		pci_disable_msi(pdev);
+
+	ib_dealloc_device(&mdev->ib_dev);
+
+err_out_free_res:
+	mthca_release_regions(pdev, ddr_hidden);
+
+err_out_disable_pdev:
+	pci_disable_device(pdev);
+	pci_set_drvdata(pdev, NULL);
+	return err;
+}
+
+static void __devexit mthca_remove_one(struct pci_dev *pdev)
+{
+	struct mthca_dev *mdev = pci_get_drvdata(pdev);
+	u8 status;
+	int p;
+
+	if (mdev) {
+		mthca_free_agents(mdev);
+		mthca_unregister_device(mdev);
+
+		for (p = 1; p <= mdev->limits.num_ports; ++p)
+			mthca_CLOSE_IB(mdev, p, &status);
+
+		mthca_cleanup_mcg_table(mdev);
+		mthca_cleanup_av_table(mdev);
+		mthca_cleanup_qp_table(mdev);
+		mthca_cleanup_cq_table(mdev);
+		mthca_cmd_use_polling(mdev);
+		mthca_cleanup_eq_table(mdev);
+
+		mthca_pd_free(mdev, &mdev->driver_pd);
+
+		mthca_cleanup_mr_table(mdev);
+		mthca_cleanup_pd_table(mdev);
+
+		mthca_close_hca(mdev);
+
+		iounmap(mdev->hcr);
+		iounmap(mdev->clr_base);
+
+		if (mdev->mthca_flags & MTHCA_FLAG_MSI_X)
+			pci_disable_msix(pdev);
+		if (mdev->mthca_flags & MTHCA_FLAG_MSI)
+			pci_disable_msi(pdev);
+
+		ib_dealloc_device(&mdev->ib_dev);
+		mthca_release_regions(pdev, mdev->mthca_flags &
+				      MTHCA_FLAG_DDR_HIDDEN);
+		pci_disable_device(pdev);
+		pci_set_drvdata(pdev, NULL);
+	}
+}
+
+static struct pci_device_id mthca_pci_table[] = {
+	{ PCI_DEVICE(PCI_VENDOR_ID_MELLANOX, PCI_DEVICE_ID_MELLANOX_TAVOR),
+	  .driver_data = TAVOR },
+	{ PCI_DEVICE(PCI_VENDOR_ID_TOPSPIN, PCI_DEVICE_ID_MELLANOX_TAVOR),
+	  .driver_data = TAVOR },
+	{ PCI_DEVICE(PCI_VENDOR_ID_MELLANOX, PCI_DEVICE_ID_MELLANOX_ARBEL_COMPAT),
+	  .driver_data = ARBEL_COMPAT },
+	{ PCI_DEVICE(PCI_VENDOR_ID_TOPSPIN, PCI_DEVICE_ID_MELLANOX_ARBEL_COMPAT),
+	  .driver_data = ARBEL_COMPAT },
+	{ PCI_DEVICE(PCI_VENDOR_ID_MELLANOX, PCI_DEVICE_ID_MELLANOX_ARBEL),
+	  .driver_data = ARBEL_NATIVE },
+	{ PCI_DEVICE(PCI_VENDOR_ID_TOPSPIN, PCI_DEVICE_ID_MELLANOX_ARBEL),
+	  .driver_data = ARBEL_NATIVE },
+	{ 0, }
+};
+
+MODULE_DEVICE_TABLE(pci, mthca_pci_table);
+
+static struct pci_driver mthca_driver = {
+	.name		= "ib_mthca",
+	.id_table	= mthca_pci_table,
+	.probe		= mthca_init_one,
+	.remove		= __devexit_p(mthca_remove_one)
+};
+
+static int __init mthca_init(void)
+{
+	int ret;
+
+	/*
+	 * TODO: measure whether dynamically choosing doorbell code at
+	 * runtime affects our performance.  Is there a "magic" way to
+	 * choose without having to follow a function pointer every
+	 * time we ring a doorbell?
+	 */
+#ifdef CONFIG_INFINIBAND_MTHCA_SSE_DOORBELL
+	if (!cpu_has_xmm) {
+		printk(KERN_ERR PFX "mthca was compiled with SSE doorbell code, but\n");
+		printk(KERN_ERR PFX "the current CPU does not support SSE.\n");
+		printk(KERN_ERR PFX "Turn off CONFIG_INFINIBAND_MTHCA_SSE_DOORBELL "
+		       "and recompile.\n");
+		return -ENODEV;
+	}
+#endif
+
+	ret = pci_register_driver(&mthca_driver);
+	return ret < 0 ? ret : 0;
+}
+
+static void __exit mthca_cleanup(void)
+{
+	pci_unregister_driver(&mthca_driver);
+}
+
+module_init(mthca_init);
+module_exit(mthca_cleanup);
diff -Nru a/drivers/infiniband/hw/mthca/mthca_mcg.c b/drivers/infiniband/hw/mthca/mthca_mcg.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/hw/mthca/mthca_mcg.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,376 @@
+/*
+ * Copyright (c) 2004 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: mthca_mcg.c 1349 2004-12-16 21:09:43Z roland $
+ */
+
+#include <linux/init.h>
+
+#include "mthca_dev.h"
+#include "mthca_cmd.h"
+
+enum {
+	MTHCA_QP_PER_MGM = 4 * (MTHCA_MGM_ENTRY_SIZE / 16 - 2)
+};
+
+struct mthca_mgm {
+	u32 next_gid_index;
+	u32 reserved[3];
+	u8  gid[16];
+	u32 qp[MTHCA_QP_PER_MGM];
+};
+
+static const u8 zero_gid[16];	/* automatically initialized to 0 */
+
+/*
+ * Caller must hold MCG table semaphore.  gid and mgm parameters must
+ * be properly aligned for command interface.
+ *
+ *  Returns 0 unless a firmware command error occurs.
+ *
+ * If GID is found in MGM or MGM is empty, *index = *hash, *prev = -1
+ * and *mgm holds MGM entry.
+ *
+ * if GID is found in AMGM, *index = index in AMGM, *prev = index of
+ * previous entry in hash chain and *mgm holds AMGM entry.
+ *
+ * If no AMGM exists for given gid, *index = -1, *prev = index of last
+ * entry in hash chain and *mgm holds end of hash chain.
+ */
+static int find_mgm(struct mthca_dev *dev,
+		    u8 *gid, struct mthca_mgm *mgm,
+		    u16 *hash, int *prev, int *index)
+{
+	void *mailbox;
+	u8 *mgid;
+	int err;
+	u8 status;
+
+	mailbox = kmalloc(16 + MTHCA_CMD_MAILBOX_EXTRA, GFP_KERNEL);
+	if (!mailbox)
+		return -ENOMEM;
+	mgid = MAILBOX_ALIGN(mailbox);
+
+	memcpy(mgid, gid, 16);
+
+	err = mthca_MGID_HASH(dev, mgid, hash, &status);
+	if (err)
+		goto out;
+	if (status) {
+		mthca_err(dev, "MGID_HASH returned status %02x\n", status);
+		err = -EINVAL;
+		goto out;
+	}
+
+	if (0)
+		mthca_dbg(dev, "Hash for %04x:%04x:%04x:%04x:"
+			  "%04x:%04x:%04x:%04x is %04x\n",
+			  be16_to_cpu(((u16 *) gid)[0]), be16_to_cpu(((u16 *) gid)[1]),
+			  be16_to_cpu(((u16 *) gid)[2]), be16_to_cpu(((u16 *) gid)[3]),
+			  be16_to_cpu(((u16 *) gid)[4]), be16_to_cpu(((u16 *) gid)[5]),
+			  be16_to_cpu(((u16 *) gid)[6]), be16_to_cpu(((u16 *) gid)[7]),
+			  *hash);
+
+	*index = *hash;
+	*prev  = -1;
+
+	do {
+		err = mthca_READ_MGM(dev, *index, mgm, &status);
+		if (err)
+			goto out;
+		if (status) {
+			mthca_err(dev, "READ_MGM returned status %02x\n", status);
+			return -EINVAL;
+		}
+
+		if (!memcmp(mgm->gid, zero_gid, 16)) {
+			if (*index != *hash) {
+				mthca_err(dev, "Found zero MGID in AMGM.\n");
+				err = -EINVAL;
+			}
+			goto out;
+		}
+
+		if (!memcmp(mgm->gid, gid, 16))
+			goto out;
+
+		*prev = *index;
+		*index = be32_to_cpu(mgm->next_gid_index) >> 5;
+	} while (*index);
+
+	*index = -1;
+
+ out:
+	kfree(mailbox);
+	return err;
+}
+
+int mthca_multicast_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid)
+{
+	struct mthca_dev *dev = to_mdev(ibqp->device);
+	void *mailbox;
+	struct mthca_mgm *mgm;
+	u16 hash;
+	int index, prev;
+	int link = 0;
+	int i;
+	int err;
+	u8 status;
+
+	mailbox = kmalloc(sizeof *mgm + MTHCA_CMD_MAILBOX_EXTRA, GFP_KERNEL);
+	if (!mailbox)
+		return -ENOMEM;
+	mgm = MAILBOX_ALIGN(mailbox);
+
+	if (down_interruptible(&dev->mcg_table.sem))
+		return -EINTR;
+
+	err = find_mgm(dev, gid->raw, mgm, &hash, &prev, &index);
+	if (err)
+		goto out;
+
+	if (index != -1) {
+		if (!memcmp(mgm->gid, zero_gid, 16))
+			memcpy(mgm->gid, gid->raw, 16);
+	} else {
+		link = 1;
+
+		index = mthca_alloc(&dev->mcg_table.alloc);
+		if (index == -1) {
+			mthca_err(dev, "No AMGM entries left\n");
+			err = -ENOMEM;
+			goto out;
+		}
+
+		err = mthca_READ_MGM(dev, index, mgm, &status);
+		if (err)
+			goto out;
+		if (status) {
+			mthca_err(dev, "READ_MGM returned status %02x\n", status);
+			err = -EINVAL;
+			goto out;
+		}
+
+		memcpy(mgm->gid, gid->raw, 16);
+		mgm->next_gid_index = 0;
+	}
+
+	for (i = 0; i < MTHCA_QP_PER_MGM; ++i)
+		if (!(mgm->qp[i] & cpu_to_be32(1 << 31))) {
+			mgm->qp[i] = cpu_to_be32(ibqp->qp_num | (1 << 31));
+			break;
+		}
+
+	if (i == MTHCA_QP_PER_MGM) {
+		mthca_err(dev, "MGM at index %x is full.\n", index);
+		err = -ENOMEM;
+		goto out;
+	}
+
+	err = mthca_WRITE_MGM(dev, index, mgm, &status);
+	if (err)
+		goto out;
+	if (status) {
+		mthca_err(dev, "WRITE_MGM returned status %02x\n", status);
+		err = -EINVAL;
+	}
+
+	if (!link)
+		goto out;
+
+	err = mthca_READ_MGM(dev, prev, mgm, &status);
+	if (err)
+		goto out;
+	if (status) {
+		mthca_err(dev, "READ_MGM returned status %02x\n", status);
+		err = -EINVAL;
+		goto out;
+	}
+
+	mgm->next_gid_index = cpu_to_be32(index << 5);
+
+	err = mthca_WRITE_MGM(dev, prev, mgm, &status);
+	if (err)
+		goto out;
+	if (status) {
+		mthca_err(dev, "WRITE_MGM returned status %02x\n", status);
+		err = -EINVAL;
+	}
+
+ out:
+	up(&dev->mcg_table.sem);
+	kfree(mailbox);
+	return err;
+}
+
+int mthca_multicast_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid)
+{
+	struct mthca_dev *dev = to_mdev(ibqp->device);
+	void *mailbox;
+	struct mthca_mgm *mgm;
+	u16 hash;
+	int prev, index;
+	int i, loc;
+	int err;
+	u8 status;
+
+	mailbox = kmalloc(sizeof *mgm + MTHCA_CMD_MAILBOX_EXTRA, GFP_KERNEL);
+	if (!mailbox)
+		return -ENOMEM;
+	mgm = MAILBOX_ALIGN(mailbox);
+
+	if (down_interruptible(&dev->mcg_table.sem))
+		return -EINTR;
+
+	err = find_mgm(dev, gid->raw, mgm, &hash, &prev, &index);
+	if (err)
+		goto out;
+
+	if (index == -1) {
+		mthca_err(dev, "MGID %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x "
+			  "not found\n",
+			  be16_to_cpu(((u16 *) gid->raw)[0]),
+			  be16_to_cpu(((u16 *) gid->raw)[1]),
+			  be16_to_cpu(((u16 *) gid->raw)[2]),
+			  be16_to_cpu(((u16 *) gid->raw)[3]),
+			  be16_to_cpu(((u16 *) gid->raw)[4]),
+			  be16_to_cpu(((u16 *) gid->raw)[5]),
+			  be16_to_cpu(((u16 *) gid->raw)[6]),
+			  be16_to_cpu(((u16 *) gid->raw)[7]));
+		err = -EINVAL;
+		goto out;
+	}
+
+	for (loc = -1, i = 0; i < MTHCA_QP_PER_MGM; ++i) {
+		if (mgm->qp[i] == cpu_to_be32(ibqp->qp_num | (1 << 31)))
+			loc = i;
+		if (!(mgm->qp[i] & cpu_to_be32(1 << 31)))
+			break;
+	}
+
+	if (loc == -1) {
+		mthca_err(dev, "QP %06x not found in MGM\n", ibqp->qp_num);
+		err = -EINVAL;
+		goto out;
+	}
+
+	mgm->qp[loc]   = mgm->qp[i - 1];
+	mgm->qp[i - 1] = 0;
+
+	err = mthca_WRITE_MGM(dev, index, mgm, &status);
+	if (err)
+		goto out;
+	if (status) {
+		mthca_err(dev, "WRITE_MGM returned status %02x\n", status);
+		err = -EINVAL;
+		goto out;
+	}
+
+	if (i != 1)
+		goto out;
+
+	goto out;
+
+	if (prev == -1) {
+		/* Remove entry from MGM */
+		if (be32_to_cpu(mgm->next_gid_index) >> 5) {
+			err = mthca_READ_MGM(dev,
+					     be32_to_cpu(mgm->next_gid_index) >> 5,
+					     mgm, &status);
+			if (err)
+				goto out;
+			if (status) {
+				mthca_err(dev, "READ_MGM returned status %02x\n",
+					  status);
+				err = -EINVAL;
+				goto out;
+			}
+		} else
+			memset(mgm->gid, 0, 16);
+
+		err = mthca_WRITE_MGM(dev, index, mgm, &status);
+		if (err)
+			goto out;
+		if (status) {
+			mthca_err(dev, "WRITE_MGM returned status %02x\n", status);
+			err = -EINVAL;
+			goto out;
+		}
+	} else {
+		/* Remove entry from AMGM */
+		index = be32_to_cpu(mgm->next_gid_index) >> 5;
+		err = mthca_READ_MGM(dev, prev, mgm, &status);
+		if (err)
+			goto out;
+		if (status) {
+			mthca_err(dev, "READ_MGM returned status %02x\n", status);
+			err = -EINVAL;
+			goto out;
+		}
+
+		mgm->next_gid_index = cpu_to_be32(index << 5);
+
+		err = mthca_WRITE_MGM(dev, prev, mgm, &status);
+		if (err)
+			goto out;
+		if (status) {
+			mthca_err(dev, "WRITE_MGM returned status %02x\n", status);
+			err = -EINVAL;
+			goto out;
+		}
+	}
+
+ out:
+	up(&dev->mcg_table.sem);
+	kfree(mailbox);
+	return err;
+}
+
+int __devinit mthca_init_mcg_table(struct mthca_dev *dev)
+{
+	int err;
+
+	err = mthca_alloc_init(&dev->mcg_table.alloc,
+			       dev->limits.num_amgms,
+			       dev->limits.num_amgms - 1,
+			       0);
+	if (err)
+		return err;
+
+	init_MUTEX(&dev->mcg_table.sem);
+
+	return 0;
+}
+
+void __devexit mthca_cleanup_mcg_table(struct mthca_dev *dev)
+{
+	mthca_alloc_cleanup(&dev->mcg_table.alloc);
+}
diff -Nru a/drivers/infiniband/hw/mthca/mthca_mr.c b/drivers/infiniband/hw/mthca/mthca_mr.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/hw/mthca/mthca_mr.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,396 @@
+/*
+ * Copyright (c) 2004 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: mthca_mr.c 1349 2004-12-16 21:09:43Z roland $
+ */
+
+#include <linux/slab.h>
+#include <linux/init.h>
+#include <linux/errno.h>
+
+#include "mthca_dev.h"
+#include "mthca_cmd.h"
+
+/*
+ * Must be packed because mtt_seg is 64 bits but only aligned to 32 bits.
+ */
+struct mthca_mpt_entry {
+	u32 flags;
+	u32 page_size;
+	u32 key;
+	u32 pd;
+	u64 start;
+	u64 length;
+	u32 lkey;
+	u32 window_count;
+	u32 window_count_limit;
+	u64 mtt_seg;
+	u32 reserved[3];
+} __attribute__((packed));
+
+#define MTHCA_MPT_FLAG_SW_OWNS       (0xfUL << 28)
+#define MTHCA_MPT_FLAG_MIO           (1 << 17)
+#define MTHCA_MPT_FLAG_BIND_ENABLE   (1 << 15)
+#define MTHCA_MPT_FLAG_PHYSICAL      (1 <<  9)
+#define MTHCA_MPT_FLAG_REGION        (1 <<  8)
+
+#define MTHCA_MTT_FLAG_PRESENT       1
+
+/*
+ * Buddy allocator for MTT segments (currently not very efficient
+ * since it doesn't keep a free list and just searches linearly
+ * through the bitmaps)
+ */
+
+static u32 mthca_alloc_mtt(struct mthca_dev *dev, int order)
+{
+	int o;
+	int m;
+	u32 seg;
+
+	spin_lock(&dev->mr_table.mpt_alloc.lock);
+
+	for (o = order; o <= dev->mr_table.max_mtt_order; ++o) {
+		m = 1 << (dev->mr_table.max_mtt_order - o);
+		seg = find_first_bit(dev->mr_table.mtt_buddy[o], m);
+		if (seg < m)
+			goto found;
+	}
+
+	spin_unlock(&dev->mr_table.mpt_alloc.lock);
+	return -1;
+
+ found:
+	clear_bit(seg, dev->mr_table.mtt_buddy[o]);
+
+	while (o > order) {
+		--o;
+		seg <<= 1;
+		set_bit(seg ^ 1, dev->mr_table.mtt_buddy[o]);
+	}
+
+	spin_unlock(&dev->mr_table.mpt_alloc.lock);
+
+	seg <<= order;
+
+	return seg;
+}
+
+static void mthca_free_mtt(struct mthca_dev *dev, u32 seg, int order)
+{
+	seg >>= order;
+
+	spin_lock(&dev->mr_table.mpt_alloc.lock);
+
+	while (test_bit(seg ^ 1, dev->mr_table.mtt_buddy[order])) {
+		clear_bit(seg ^ 1, dev->mr_table.mtt_buddy[order]);
+		seg >>= 1;
+		++order;
+	}
+
+	set_bit(seg, dev->mr_table.mtt_buddy[order]);
+
+	spin_unlock(&dev->mr_table.mpt_alloc.lock);
+}
+
+int mthca_mr_alloc_notrans(struct mthca_dev *dev, u32 pd,
+			   u32 access, struct mthca_mr *mr)
+{
+	void *mailbox;
+	struct mthca_mpt_entry *mpt_entry;
+	int err;
+	u8 status;
+
+	might_sleep();
+
+	mr->order = -1;
+	mr->ibmr.lkey = mthca_alloc(&dev->mr_table.mpt_alloc);
+	if (mr->ibmr.lkey == -1)
+		return -ENOMEM;
+	mr->ibmr.rkey = mr->ibmr.lkey;
+
+	mailbox = kmalloc(sizeof *mpt_entry + MTHCA_CMD_MAILBOX_EXTRA,
+			  GFP_KERNEL);
+	if (!mailbox) {
+		mthca_free(&dev->mr_table.mpt_alloc, mr->ibmr.lkey);
+		return -ENOMEM;
+	}
+	mpt_entry = MAILBOX_ALIGN(mailbox);
+
+	mpt_entry->flags = cpu_to_be32(MTHCA_MPT_FLAG_SW_OWNS     |
+				       MTHCA_MPT_FLAG_MIO         |
+				       MTHCA_MPT_FLAG_PHYSICAL    |
+				       MTHCA_MPT_FLAG_REGION      |
+				       access);
+	mpt_entry->page_size = 0;
+	mpt_entry->key       = cpu_to_be32(mr->ibmr.lkey);
+	mpt_entry->pd        = cpu_to_be32(pd);
+	mpt_entry->start     = 0;
+	mpt_entry->length    = ~0ULL;
+
+	memset(&mpt_entry->lkey, 0,
+	       sizeof *mpt_entry - offsetof(struct mthca_mpt_entry, lkey));
+
+	err = mthca_SW2HW_MPT(dev, mpt_entry,
+			      mr->ibmr.lkey & (dev->limits.num_mpts - 1),
+			      &status);
+	if (err)
+		mthca_warn(dev, "SW2HW_MPT failed (%d)\n", err);
+	else if (status) {
+		mthca_warn(dev, "SW2HW_MPT returned status 0x%02x\n",
+			   status);
+		err = -EINVAL;
+	}
+
+	kfree(mailbox);
+	return err;
+}
+
+int mthca_mr_alloc_phys(struct mthca_dev *dev, u32 pd,
+			u64 *buffer_list, int buffer_size_shift,
+			int list_len, u64 iova, u64 total_size,
+			u32 access, struct mthca_mr *mr)
+{
+	void *mailbox;
+	u64 *mtt_entry;
+	struct mthca_mpt_entry *mpt_entry;
+	int err = -ENOMEM;
+	u8 status;
+	int i;
+
+	might_sleep();
+	WARN_ON(buffer_size_shift >= 32);
+
+	mr->ibmr.lkey = mthca_alloc(&dev->mr_table.mpt_alloc);
+	if (mr->ibmr.lkey == -1)
+		return -ENOMEM;
+	mr->ibmr.rkey = mr->ibmr.lkey;
+
+	for (i = dev->limits.mtt_seg_size / 8, mr->order = 0;
+	     i < list_len;
+	     i <<= 1, ++mr->order)
+		/* nothing */ ;
+
+	mr->first_seg = mthca_alloc_mtt(dev, mr->order);
+	if (mr->first_seg == -1)
+		goto err_out_mpt_free;
+
+	/*
+	 * If list_len is odd, we add one more dummy entry for
+	 * firmware efficiency.
+	 */
+	mailbox = kmalloc(max(sizeof *mpt_entry,
+			      (size_t) 8 * (list_len + (list_len & 1) + 2)) +
+			  MTHCA_CMD_MAILBOX_EXTRA,
+			  GFP_KERNEL);
+	if (!mailbox)
+		goto err_out_free_mtt;
+
+	mtt_entry = MAILBOX_ALIGN(mailbox);
+
+	mtt_entry[0] = cpu_to_be64(dev->mr_table.mtt_base +
+				   mr->first_seg * dev->limits.mtt_seg_size);
+	mtt_entry[1] = 0;
+	for (i = 0; i < list_len; ++i)
+		mtt_entry[i + 2] = cpu_to_be64(buffer_list[i] |
+					       MTHCA_MTT_FLAG_PRESENT);
+	if (list_len & 1) {
+		mtt_entry[i + 2] = 0;
+		++list_len;
+	}
+
+	if (0) {
+		mthca_dbg(dev, "Dumping MPT entry\n");
+		for (i = 0; i < list_len + 2; ++i)
+			printk(KERN_ERR "[%2d] %016llx\n",
+			       i, (unsigned long long) be64_to_cpu(mtt_entry[i]));
+	}
+
+	err = mthca_WRITE_MTT(dev, mtt_entry, list_len, &status);
+	if (err) {
+		mthca_warn(dev, "WRITE_MTT failed (%d)\n", err);
+		goto err_out_mailbox_free;
+	}
+	if (status) {
+		mthca_warn(dev, "WRITE_MTT returned status 0x%02x\n",
+			   status);
+		err = -EINVAL;
+		goto err_out_mailbox_free;
+	}
+
+	mpt_entry = MAILBOX_ALIGN(mailbox);
+
+	mpt_entry->flags = cpu_to_be32(MTHCA_MPT_FLAG_SW_OWNS     |
+				       MTHCA_MPT_FLAG_MIO         |
+				       MTHCA_MPT_FLAG_REGION      |
+				       access);
+
+	mpt_entry->page_size = cpu_to_be32(buffer_size_shift - 12);
+	mpt_entry->key       = cpu_to_be32(mr->ibmr.lkey);
+	mpt_entry->pd        = cpu_to_be32(pd);
+	mpt_entry->start     = cpu_to_be64(iova);
+	mpt_entry->length    = cpu_to_be64(total_size);
+	memset(&mpt_entry->lkey, 0,
+	       sizeof *mpt_entry - offsetof(struct mthca_mpt_entry, lkey));
+	mpt_entry->mtt_seg   = cpu_to_be64(dev->mr_table.mtt_base +
+					   mr->first_seg * dev->limits.mtt_seg_size);
+
+	if (0) {
+		mthca_dbg(dev, "Dumping MPT entry %08x:\n", mr->ibmr.lkey);
+		for (i = 0; i < sizeof (struct mthca_mpt_entry) / 4; ++i) {
+			if (i % 4 == 0)
+				printk("[%02x] ", i * 4);
+			printk(" %08x", be32_to_cpu(((u32 *) mpt_entry)[i]));
+			if ((i + 1) % 4 == 0)
+				printk("\n");
+		}
+	}
+
+	err = mthca_SW2HW_MPT(dev, mpt_entry,
+			      mr->ibmr.lkey & (dev->limits.num_mpts - 1),
+			      &status);
+	if (err)
+		mthca_warn(dev, "SW2HW_MPT failed (%d)\n", err);
+	else if (status) {
+		mthca_warn(dev, "SW2HW_MPT returned status 0x%02x\n",
+			   status);
+		err = -EINVAL;
+	}
+
+	kfree(mailbox);
+	return err;
+
+ err_out_mailbox_free:
+	kfree(mailbox);
+
+ err_out_free_mtt:
+	mthca_free_mtt(dev, mr->first_seg, mr->order);
+
+ err_out_mpt_free:
+	mthca_free(&dev->mr_table.mpt_alloc, mr->ibmr.lkey);
+	return err;
+}
+
+void mthca_free_mr(struct mthca_dev *dev, struct mthca_mr *mr)
+{
+	int err;
+	u8 status;
+
+	might_sleep();
+
+	err = mthca_HW2SW_MPT(dev, NULL,
+			      mr->ibmr.lkey & (dev->limits.num_mpts - 1),
+			      &status);
+	if (err)
+		mthca_warn(dev, "HW2SW_MPT failed (%d)\n", err);
+	else if (status)
+		mthca_warn(dev, "HW2SW_MPT returned status 0x%02x\n",
+			   status);
+
+	if (mr->order >= 0)
+		mthca_free_mtt(dev, mr->first_seg, mr->order);
+
+	mthca_free(&dev->mr_table.mpt_alloc, mr->ibmr.lkey);
+}
+
+int __devinit mthca_init_mr_table(struct mthca_dev *dev)
+{
+	int err;
+	int i, s;
+
+	err = mthca_alloc_init(&dev->mr_table.mpt_alloc,
+			       dev->limits.num_mpts,
+			       ~0, dev->limits.reserved_mrws);
+	if (err)
+		return err;
+
+	err = -ENOMEM;
+
+	for (i = 1, dev->mr_table.max_mtt_order = 0;
+	     i < dev->limits.num_mtt_segs;
+	     i <<= 1, ++dev->mr_table.max_mtt_order)
+		/* nothing */ ;
+
+	dev->mr_table.mtt_buddy = kmalloc((dev->mr_table.max_mtt_order + 1) *
+					  sizeof (long *),
+					  GFP_KERNEL);
+	if (!dev->mr_table.mtt_buddy)
+		goto err_out;
+
+	for (i = 0; i <= dev->mr_table.max_mtt_order; ++i)
+		dev->mr_table.mtt_buddy[i] = NULL;
+
+	for (i = 0; i <= dev->mr_table.max_mtt_order; ++i) {
+		s = BITS_TO_LONGS(1 << (dev->mr_table.max_mtt_order - i));
+		dev->mr_table.mtt_buddy[i] = kmalloc(s * sizeof (long),
+						     GFP_KERNEL);
+		if (!dev->mr_table.mtt_buddy[i])
+			goto err_out_free;
+		bitmap_zero(dev->mr_table.mtt_buddy[i],
+			    1 << (dev->mr_table.max_mtt_order - i));
+	}
+
+	set_bit(0, dev->mr_table.mtt_buddy[dev->mr_table.max_mtt_order]);
+
+	for (i = 0; i < dev->mr_table.max_mtt_order; ++i)
+		if (1 << i >= dev->limits.reserved_mtts)
+			break;
+
+	if (i == dev->mr_table.max_mtt_order) {
+		mthca_err(dev, "MTT table of order %d is "
+			  "too small.\n", i);
+		goto err_out_free;
+	}
+
+	(void) mthca_alloc_mtt(dev, i);
+
+	return 0;
+
+ err_out_free:
+	for (i = 0; i <= dev->mr_table.max_mtt_order; ++i)
+		kfree(dev->mr_table.mtt_buddy[i]);
+
+ err_out:
+	mthca_alloc_cleanup(&dev->mr_table.mpt_alloc);
+
+	return err;
+}
+
+void __devexit mthca_cleanup_mr_table(struct mthca_dev *dev)
+{
+	int i;
+
+	/* XXX check if any MRs are still allocated? */
+	for (i = 0; i <= dev->mr_table.max_mtt_order; ++i)
+		kfree(dev->mr_table.mtt_buddy[i]);
+	kfree(dev->mr_table.mtt_buddy);
+	mthca_alloc_cleanup(&dev->mr_table.mpt_alloc);
+}
diff -Nru a/drivers/infiniband/hw/mthca/mthca_pd.c b/drivers/infiniband/hw/mthca/mthca_pd.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/hw/mthca/mthca_pd.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2004 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: mthca_pd.c 1349 2004-12-16 21:09:43Z roland $
+ */
+
+#include <linux/init.h>
+#include <linux/errno.h>
+
+#include "mthca_dev.h"
+
+int mthca_pd_alloc(struct mthca_dev *dev, struct mthca_pd *pd)
+{
+	int err;
+
+	might_sleep();
+
+	atomic_set(&pd->sqp_count, 0);
+	pd->pd_num = mthca_alloc(&dev->pd_table.alloc);
+	if (pd->pd_num == -1)
+		return -ENOMEM;
+
+	err = mthca_mr_alloc_notrans(dev, pd->pd_num,
+				     MTHCA_MPT_FLAG_LOCAL_READ |
+				     MTHCA_MPT_FLAG_LOCAL_WRITE,
+				     &pd->ntmr);
+	if (err)
+		mthca_free(&dev->pd_table.alloc, pd->pd_num);
+
+	return err;
+}
+
+void mthca_pd_free(struct mthca_dev *dev, struct mthca_pd *pd)
+{
+	might_sleep();
+	mthca_free_mr(dev, &pd->ntmr);
+	mthca_free(&dev->pd_table.alloc, pd->pd_num);
+}
+
+int __devinit mthca_init_pd_table(struct mthca_dev *dev)
+{
+	return mthca_alloc_init(&dev->pd_table.alloc,
+				dev->limits.num_pds,
+				(1 << 24) - 1,
+				dev->limits.reserved_pds);
+}
+
+void __devexit mthca_cleanup_pd_table(struct mthca_dev *dev)
+{
+	/* XXX check if any PDs are still allocated? */
+	mthca_alloc_cleanup(&dev->pd_table.alloc);
+}
diff -Nru a/drivers/infiniband/hw/mthca/mthca_profile.c b/drivers/infiniband/hw/mthca/mthca_profile.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/hw/mthca/mthca_profile.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,226 @@
+/*
+ * Copyright (c) 2004 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: mthca_profile.c 1349 2004-12-16 21:09:43Z roland $
+ */
+
+#include <linux/module.h>
+#include <linux/moduleparam.h>
+
+#include "mthca_profile.h"
+
+static int default_profile[MTHCA_RES_NUM] = {
+	[MTHCA_RES_QP]    = 1 << 16,
+	[MTHCA_RES_EQP]   = 1 << 16,
+	[MTHCA_RES_CQ]    = 1 << 16,
+	[MTHCA_RES_EQ]    = 32,
+	[MTHCA_RES_RDB]   = 1 << 18,
+	[MTHCA_RES_MCG]   = 1 << 13,
+	[MTHCA_RES_MPT]   = 1 << 17,
+	[MTHCA_RES_MTT]   = 1 << 20,
+	[MTHCA_RES_UDAV]  = 1 << 15
+};
+
+enum {
+	MTHCA_RDB_ENTRY_SIZE = 32,
+	MTHCA_MTT_SEG_SIZE   = 64
+};
+
+enum {
+	MTHCA_NUM_PDS = 1 << 15
+};
+
+int mthca_make_profile(struct mthca_dev *dev,
+		       struct mthca_dev_lim *dev_lim,
+		       struct mthca_init_hca_param *init_hca)
+{
+	/* just use default profile for now */
+	struct mthca_resource {
+		u64 size;
+		u64 start;
+		int type;
+		int num;
+		int log_num;
+	};
+
+	u64 total_size = 0;
+	struct mthca_resource *profile;
+	struct mthca_resource tmp;
+	int i, j;
+
+	default_profile[MTHCA_RES_UAR] = dev_lim->uar_size / PAGE_SIZE;
+
+	profile = kmalloc(MTHCA_RES_NUM * sizeof *profile, GFP_KERNEL);
+	if (!profile)
+		return -ENOMEM;
+
+	profile[MTHCA_RES_QP].size   = dev_lim->qpc_entry_sz;
+	profile[MTHCA_RES_EEC].size  = dev_lim->eec_entry_sz;
+	profile[MTHCA_RES_SRQ].size  = dev_lim->srq_entry_sz;
+	profile[MTHCA_RES_CQ].size   = dev_lim->cqc_entry_sz;
+	profile[MTHCA_RES_EQP].size  = dev_lim->eqpc_entry_sz;
+	profile[MTHCA_RES_EEEC].size = dev_lim->eeec_entry_sz;
+	profile[MTHCA_RES_EQ].size   = dev_lim->eqc_entry_sz;
+	profile[MTHCA_RES_RDB].size  = MTHCA_RDB_ENTRY_SIZE;
+	profile[MTHCA_RES_MCG].size  = MTHCA_MGM_ENTRY_SIZE;
+	profile[MTHCA_RES_MPT].size  = MTHCA_MPT_ENTRY_SIZE;
+	profile[MTHCA_RES_MTT].size  = MTHCA_MTT_SEG_SIZE;
+	profile[MTHCA_RES_UAR].size  = dev_lim->uar_scratch_entry_sz;
+	profile[MTHCA_RES_UDAV].size = MTHCA_AV_SIZE;
+
+	for (i = 0; i < MTHCA_RES_NUM; ++i) {
+		profile[i].type     = i;
+		profile[i].num      = default_profile[i];
+		profile[i].log_num  = max(ffs(default_profile[i]) - 1, 0);
+		profile[i].size    *= default_profile[i];
+	}
+
+	/*
+	 * Sort the resources in decreasing order of size.  Since they
+	 * all have sizes that are powers of 2, we'll be able to keep
+	 * resources aligned to their size and pack them without gaps
+	 * using the sorted order.
+	 */
+	for (i = MTHCA_RES_NUM; i > 0; --i)
+		for (j = 1; j < i; ++j) {
+			if (profile[j].size > profile[j - 1].size) {
+				tmp            = profile[j];
+				profile[j]     = profile[j - 1];
+				profile[j - 1] = tmp;
+			}
+		}
+
+	for (i = 0; i < MTHCA_RES_NUM; ++i) {
+		if (profile[i].size) {
+			profile[i].start = dev->ddr_start + total_size;
+			total_size      += profile[i].size;
+		}
+		if (total_size > dev->fw.tavor.fw_start - dev->ddr_start) {
+			mthca_err(dev, "Profile requires 0x%llx bytes; "
+				  "won't fit between DDR start at 0x%016llx "
+				  "and FW start at 0x%016llx.\n",
+				  (unsigned long long) total_size,
+				  (unsigned long long) dev->ddr_start,
+				  (unsigned long long) dev->fw.tavor.fw_start);
+			kfree(profile);
+			return -ENOMEM;
+		}
+
+		if (profile[i].size)
+			mthca_dbg(dev, "profile[%2d]--%2d/%2d @ 0x%16llx "
+				  "(size 0x%8llx)\n",
+				  i, profile[i].type, profile[i].log_num,
+				  (unsigned long long) profile[i].start,
+				  (unsigned long long) profile[i].size);
+	}
+
+	mthca_dbg(dev, "HCA memory: allocated %d KB/%d KB (%d KB free)\n",
+		  (int) (total_size >> 10),
+		  (int) ((dev->fw.tavor.fw_start - dev->ddr_start) >> 10),
+		  (int) ((dev->fw.tavor.fw_start - dev->ddr_start - total_size) >> 10));
+
+	for (i = 0; i < MTHCA_RES_NUM; ++i) {
+		switch (profile[i].type) {
+		case MTHCA_RES_QP:
+			dev->limits.num_qps   = profile[i].num;
+			init_hca->qpc_base    = profile[i].start;
+			init_hca->log_num_qps = profile[i].log_num;
+			break;
+		case MTHCA_RES_EEC:
+			dev->limits.num_eecs   = profile[i].num;
+			init_hca->eec_base     = profile[i].start;
+			init_hca->log_num_eecs = profile[i].log_num;
+			break;
+		case MTHCA_RES_SRQ:
+			dev->limits.num_srqs   = profile[i].num;
+			init_hca->srqc_base    = profile[i].start;
+			init_hca->log_num_srqs = profile[i].log_num;
+			break;
+		case MTHCA_RES_CQ:
+			dev->limits.num_cqs   = profile[i].num;
+			init_hca->cqc_base    = profile[i].start;
+			init_hca->log_num_cqs = profile[i].log_num;
+			break;
+		case MTHCA_RES_EQP:
+			init_hca->eqpc_base = profile[i].start;
+			break;
+		case MTHCA_RES_EEEC:
+			init_hca->eeec_base = profile[i].start;
+			break;
+		case MTHCA_RES_EQ:
+			dev->limits.num_eqs   = profile[i].num;
+			init_hca->eqc_base    = profile[i].start;
+			init_hca->log_num_eqs = profile[i].log_num;
+			break;
+		case MTHCA_RES_RDB:
+			dev->limits.num_rdbs = profile[i].num;
+			init_hca->rdb_base   = profile[i].start;
+			break;
+		case MTHCA_RES_MCG:
+			dev->limits.num_mgms      = profile[i].num >> 1;
+			dev->limits.num_amgms     = profile[i].num >> 1;
+			init_hca->mc_base         = profile[i].start;
+			init_hca->log_mc_entry_sz = ffs(MTHCA_MGM_ENTRY_SIZE) - 1;
+			init_hca->log_mc_table_sz = profile[i].log_num;
+			init_hca->mc_hash_sz      = 1 << (profile[i].log_num - 1);
+			break;
+		case MTHCA_RES_MPT:
+			dev->limits.num_mpts = profile[i].num;
+			init_hca->mpt_base   = profile[i].start;
+			init_hca->log_mpt_sz = profile[i].log_num;
+			break;
+		case MTHCA_RES_MTT:
+			dev->limits.num_mtt_segs = profile[i].num;
+			dev->limits.mtt_seg_size = MTHCA_MTT_SEG_SIZE;
+			dev->mr_table.mtt_base   = profile[i].start;
+			init_hca->mtt_base       = profile[i].start;
+			init_hca->mtt_seg_sz     = ffs(MTHCA_MTT_SEG_SIZE) - 7;
+			break;
+		case MTHCA_RES_UAR:
+			init_hca->uar_scratch_base = profile[i].start;
+			break;
+		case MTHCA_RES_UDAV:
+			dev->av_table.ddr_av_base = profile[i].start;
+			dev->av_table.num_ddr_avs = profile[i].num;
+		default:
+			break;
+		}
+	}
+
+	/*
+	 * PDs don't take any HCA memory, but we assign them as part
+	 * of the HCA profile anyway.
+	 */
+	dev->limits.num_pds = MTHCA_NUM_PDS;
+
+	kfree(profile);
+	return 0;
+}
diff -Nru a/drivers/infiniband/hw/mthca/mthca_profile.h b/drivers/infiniband/hw/mthca/mthca_profile.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/hw/mthca/mthca_profile.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2004 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: mthca_profile.h 1349 2004-12-16 21:09:43Z roland $
+ */
+
+#ifndef MTHCA_PROFILE_H
+#define MTHCA_PROFILE_H
+
+#include "mthca_dev.h"
+#include "mthca_cmd.h"
+
+enum {
+	MTHCA_RES_QP,
+	MTHCA_RES_EEC,
+	MTHCA_RES_SRQ,
+	MTHCA_RES_CQ,
+	MTHCA_RES_EQP,
+	MTHCA_RES_EEEC,
+	MTHCA_RES_EQ,
+	MTHCA_RES_RDB,
+	MTHCA_RES_MCG,
+	MTHCA_RES_MPT,
+	MTHCA_RES_MTT,
+	MTHCA_RES_UAR,
+	MTHCA_RES_UDAV,
+	MTHCA_RES_NUM
+};
+
+int mthca_make_profile(struct mthca_dev *mdev,
+		       struct mthca_dev_lim *dev_lim,
+		       struct mthca_init_hca_param *init_hca);
+
+#endif /* MTHCA_PROFILE_H */
diff -Nru a/drivers/infiniband/hw/mthca/mthca_provider.c b/drivers/infiniband/hw/mthca/mthca_provider.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/hw/mthca/mthca_provider.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,627 @@
+/*
+ * Copyright (c) 2004 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: mthca_provider.c 1397 2004-12-28 05:09:00Z roland $
+ */
+
+#include <ib_smi.h>
+
+#include "mthca_dev.h"
+#include "mthca_cmd.h"
+
+static int mthca_query_device(struct ib_device *ibdev,
+			      struct ib_device_attr *props)
+{
+	struct ib_smp *in_mad  = NULL;
+	struct ib_smp *out_mad = NULL;
+	int err = -ENOMEM;
+	u8 status;
+
+	in_mad  = kmalloc(sizeof *in_mad, GFP_KERNEL);
+	out_mad = kmalloc(sizeof *out_mad, GFP_KERNEL);
+	if (!in_mad || !out_mad)
+		goto out;
+
+	props->fw_ver        = to_mdev(ibdev)->fw_ver;
+
+	memset(in_mad, 0, sizeof *in_mad);
+	in_mad->base_version       = 1;
+	in_mad->mgmt_class     	   = IB_MGMT_CLASS_SUBN_LID_ROUTED;
+	in_mad->class_version  	   = 1;
+	in_mad->method         	   = IB_MGMT_METHOD_GET;
+	in_mad->attr_id   	   = IB_SMP_ATTR_NODE_INFO;
+
+	err = mthca_MAD_IFC(to_mdev(ibdev), 1,
+			    1, in_mad, out_mad,
+			    &status);
+	if (err)
+		goto out;
+	if (status) {
+		err = -EINVAL;
+		goto out;
+	}
+
+	props->vendor_id      = be32_to_cpup((u32 *) (out_mad->data + 36)) &
+		0xffffff;
+	props->vendor_part_id = be16_to_cpup((u16 *) (out_mad->data + 30));
+	props->hw_ver         = be16_to_cpup((u16 *) (out_mad->data + 32));
+	memcpy(&props->sys_image_guid, out_mad->data +  4, 8);
+	memcpy(&props->node_guid,      out_mad->data + 12, 8);
+
+	err = 0;
+ out:
+	kfree(in_mad);
+	kfree(out_mad);
+	return err;
+}
+
+static int mthca_query_port(struct ib_device *ibdev,
+			    u8 port, struct ib_port_attr *props)
+{
+	struct ib_smp *in_mad  = NULL;
+	struct ib_smp *out_mad = NULL;
+	int err = -ENOMEM;
+	u8 status;
+
+	in_mad  = kmalloc(sizeof *in_mad, GFP_KERNEL);
+	out_mad = kmalloc(sizeof *out_mad, GFP_KERNEL);
+	if (!in_mad || !out_mad)
+		goto out;
+
+	memset(in_mad, 0, sizeof *in_mad);
+	in_mad->base_version       = 1;
+	in_mad->mgmt_class     	   = IB_MGMT_CLASS_SUBN_LID_ROUTED;
+	in_mad->class_version  	   = 1;
+	in_mad->method         	   = IB_MGMT_METHOD_GET;
+	in_mad->attr_id   	   = IB_SMP_ATTR_PORT_INFO;
+	in_mad->attr_mod           = cpu_to_be32(port);
+
+	err = mthca_MAD_IFC(to_mdev(ibdev), 1,
+			    port, in_mad, out_mad,
+			    &status);
+	if (err)
+		goto out;
+	if (status) {
+		err = -EINVAL;
+		goto out;
+	}
+
+	props->lid               = be16_to_cpup((u16 *) (out_mad->data + 16));
+	props->lmc               = out_mad->data[34] & 0x7;
+	props->sm_lid            = be16_to_cpup((u16 *) (out_mad->data + 18));
+	props->sm_sl             = out_mad->data[36] & 0xf;
+	props->state             = out_mad->data[32] & 0xf;
+	props->port_cap_flags    = be32_to_cpup((u32 *) (out_mad->data + 20));
+	props->gid_tbl_len       = to_mdev(ibdev)->limits.gid_table_len;
+	props->pkey_tbl_len      = to_mdev(ibdev)->limits.pkey_table_len;
+	props->qkey_viol_cntr    = be16_to_cpup((u16 *) (out_mad->data + 48));
+	props->active_width      = out_mad->data[31] & 0xf;
+	props->active_speed      = out_mad->data[35] >> 4;
+
+ out:
+	kfree(in_mad);
+	kfree(out_mad);
+	return err;
+}
+
+static int mthca_modify_port(struct ib_device *ibdev,
+			     u8 port, int port_modify_mask,
+			     struct ib_port_modify *props)
+{
+	return 0;
+}
+
+static int mthca_query_pkey(struct ib_device *ibdev,
+			    u8 port, u16 index, u16 *pkey)
+{
+	struct ib_smp *in_mad  = NULL;
+	struct ib_smp *out_mad = NULL;
+	int err = -ENOMEM;
+	u8 status;
+
+	in_mad  = kmalloc(sizeof *in_mad, GFP_KERNEL);
+	out_mad = kmalloc(sizeof *out_mad, GFP_KERNEL);
+	if (!in_mad || !out_mad)
+		goto out;
+
+	memset(in_mad, 0, sizeof *in_mad);
+	in_mad->base_version       = 1;
+	in_mad->mgmt_class     	   = IB_MGMT_CLASS_SUBN_LID_ROUTED;
+	in_mad->class_version  	   = 1;
+	in_mad->method         	   = IB_MGMT_METHOD_GET;
+	in_mad->attr_id   	   = IB_SMP_ATTR_PKEY_TABLE;
+	in_mad->attr_mod           = cpu_to_be32(index / 32);
+
+	err = mthca_MAD_IFC(to_mdev(ibdev), 1,
+			    port, in_mad, out_mad,
+			    &status);
+	if (err)
+		goto out;
+	if (status) {
+		err = -EINVAL;
+		goto out;
+	}
+
+	*pkey = be16_to_cpu(((u16 *) out_mad->data)[index % 32]);
+
+ out:
+	kfree(in_mad);
+	kfree(out_mad);
+	return err;
+}
+
+static int mthca_query_gid(struct ib_device *ibdev, u8 port,
+			   int index, union ib_gid *gid)
+{
+	struct ib_smp *in_mad  = NULL;
+	struct ib_smp *out_mad = NULL;
+	int err = -ENOMEM;
+	u8 status;
+
+	in_mad  = kmalloc(sizeof *in_mad, GFP_KERNEL);
+	out_mad = kmalloc(sizeof *out_mad, GFP_KERNEL);
+	if (!in_mad || !out_mad)
+		goto out;
+
+	memset(in_mad, 0, sizeof *in_mad);
+	in_mad->base_version       = 1;
+	in_mad->mgmt_class     	   = IB_MGMT_CLASS_SUBN_LID_ROUTED;
+	in_mad->class_version  	   = 1;
+	in_mad->method         	   = IB_MGMT_METHOD_GET;
+	in_mad->attr_id   	   = IB_SMP_ATTR_PORT_INFO;
+	in_mad->attr_mod           = cpu_to_be32(port);
+
+	err = mthca_MAD_IFC(to_mdev(ibdev), 1,
+			    port, in_mad, out_mad,
+			    &status);
+	if (err)
+		goto out;
+	if (status) {
+		err = -EINVAL;
+		goto out;
+	}
+
+	memcpy(gid->raw, out_mad->data + 8, 8);
+
+	memset(in_mad, 0, sizeof *in_mad);
+	in_mad->base_version       = 1;
+	in_mad->mgmt_class     	   = IB_MGMT_CLASS_SUBN_LID_ROUTED;
+	in_mad->class_version  	   = 1;
+	in_mad->method         	   = IB_MGMT_METHOD_GET;
+	in_mad->attr_id   	   = IB_SMP_ATTR_GUID_INFO;
+	in_mad->attr_mod           = cpu_to_be32(index / 8);
+
+	err = mthca_MAD_IFC(to_mdev(ibdev), 1,
+			    port, in_mad, out_mad,
+			    &status);
+	if (err)
+		goto out;
+	if (status) {
+		err = -EINVAL;
+		goto out;
+	}
+
+	memcpy(gid->raw + 8, out_mad->data + (index % 8) * 16, 8);
+
+ out:
+	kfree(in_mad);
+	kfree(out_mad);
+	return err;
+}
+
+static struct ib_pd *mthca_alloc_pd(struct ib_device *ibdev)
+{
+	struct mthca_pd *pd;
+	int err;
+
+	pd = kmalloc(sizeof *pd, GFP_KERNEL);
+	if (!pd)
+		return ERR_PTR(-ENOMEM);
+
+	err = mthca_pd_alloc(to_mdev(ibdev), pd);
+	if (err) {
+		kfree(pd);
+		return ERR_PTR(err);
+	}
+
+	return &pd->ibpd;
+}
+
+static int mthca_dealloc_pd(struct ib_pd *pd)
+{
+	mthca_pd_free(to_mdev(pd->device), to_mpd(pd));
+	kfree(pd);
+
+	return 0;
+}
+
+static struct ib_ah *mthca_ah_create(struct ib_pd *pd,
+				     struct ib_ah_attr *ah_attr)
+{
+	int err;
+	struct mthca_ah *ah;
+
+	ah = kmalloc(sizeof *ah, GFP_KERNEL);
+	if (!ah)
+		return ERR_PTR(-ENOMEM);
+
+	err = mthca_create_ah(to_mdev(pd->device), to_mpd(pd), ah_attr, ah);
+	if (err) {
+		kfree(ah);
+		return ERR_PTR(err);
+	}
+
+	return &ah->ibah;
+}
+
+static int mthca_ah_destroy(struct ib_ah *ah)
+{
+	mthca_destroy_ah(to_mdev(ah->device), to_mah(ah));
+	kfree(ah);
+
+	return 0;
+}
+
+static struct ib_qp *mthca_create_qp(struct ib_pd *pd,
+				     struct ib_qp_init_attr *init_attr)
+{
+	struct mthca_qp *qp;
+	int err;
+
+	switch (init_attr->qp_type) {
+	case IB_QPT_RC:
+	case IB_QPT_UC:
+	case IB_QPT_UD:
+	{
+		qp = kmalloc(sizeof *qp, GFP_KERNEL);
+		if (!qp)
+			return ERR_PTR(-ENOMEM);
+
+		qp->sq.max    = init_attr->cap.max_send_wr;
+		qp->rq.max    = init_attr->cap.max_recv_wr;
+		qp->sq.max_gs = init_attr->cap.max_send_sge;
+		qp->rq.max_gs = init_attr->cap.max_recv_sge;
+
+		err = mthca_alloc_qp(to_mdev(pd->device), to_mpd(pd),
+				     to_mcq(init_attr->send_cq),
+				     to_mcq(init_attr->recv_cq),
+				     init_attr->qp_type, init_attr->sq_sig_type,
+				     init_attr->rq_sig_type, qp);
+		qp->ibqp.qp_num = qp->qpn;
+		break;
+	}
+	case IB_QPT_SMI:
+	case IB_QPT_GSI:
+	{
+		qp = kmalloc(sizeof (struct mthca_sqp), GFP_KERNEL);
+		if (!qp)
+			return ERR_PTR(-ENOMEM);
+
+		qp->sq.max    = init_attr->cap.max_send_wr;
+		qp->rq.max    = init_attr->cap.max_recv_wr;
+		qp->sq.max_gs = init_attr->cap.max_send_sge;
+		qp->rq.max_gs = init_attr->cap.max_recv_sge;
+
+		qp->ibqp.qp_num = init_attr->qp_type == IB_QPT_SMI ? 0 : 1;
+
+		err = mthca_alloc_sqp(to_mdev(pd->device), to_mpd(pd),
+				      to_mcq(init_attr->send_cq),
+				      to_mcq(init_attr->recv_cq),
+				      init_attr->sq_sig_type, init_attr->rq_sig_type,
+				      qp->ibqp.qp_num, init_attr->port_num,
+				      to_msqp(qp));
+		break;
+	}
+	default:
+		/* Don't support raw QPs */
+		return ERR_PTR(-ENOSYS);
+	}
+
+	if (err) {
+		kfree(qp);
+		return ERR_PTR(err);
+	}
+
+        init_attr->cap.max_inline_data = 0;
+
+	return &qp->ibqp;
+}
+
+static int mthca_destroy_qp(struct ib_qp *qp)
+{
+	mthca_free_qp(to_mdev(qp->device), to_mqp(qp));
+	kfree(qp);
+	return 0;
+}
+
+static struct ib_cq *mthca_create_cq(struct ib_device *ibdev, int entries)
+{
+	struct mthca_cq *cq;
+	int nent;
+	int err;
+
+	cq = kmalloc(sizeof *cq, GFP_KERNEL);
+	if (!cq)
+		return ERR_PTR(-ENOMEM);
+
+	for (nent = 1; nent <= entries; nent <<= 1)
+		; /* nothing */
+
+	err = mthca_init_cq(to_mdev(ibdev), nent, cq);
+	if (err) {
+		kfree(cq);
+		cq = ERR_PTR(err);
+	} else
+		cq->ibcq.cqe = nent - 1;
+
+	return &cq->ibcq;
+}
+
+static int mthca_destroy_cq(struct ib_cq *cq)
+{
+	mthca_free_cq(to_mdev(cq->device), to_mcq(cq));
+	kfree(cq);
+
+	return 0;
+}
+
+static int mthca_req_notify_cq(struct ib_cq *cq, enum ib_cq_notify notify)
+{
+	mthca_arm_cq(to_mdev(cq->device), to_mcq(cq),
+		     notify == IB_CQ_SOLICITED);
+	return 0;
+}
+
+static inline u32 convert_access(int acc)
+{
+	return (acc & IB_ACCESS_REMOTE_ATOMIC ? MTHCA_MPT_FLAG_ATOMIC       : 0) |
+	       (acc & IB_ACCESS_REMOTE_WRITE  ? MTHCA_MPT_FLAG_REMOTE_WRITE : 0) |
+	       (acc & IB_ACCESS_REMOTE_READ   ? MTHCA_MPT_FLAG_REMOTE_READ  : 0) |
+	       (acc & IB_ACCESS_LOCAL_WRITE   ? MTHCA_MPT_FLAG_LOCAL_WRITE  : 0) |
+	       MTHCA_MPT_FLAG_LOCAL_READ;
+}
+
+static struct ib_mr *mthca_get_dma_mr(struct ib_pd *pd, int acc)
+{
+	struct mthca_mr *mr;
+	int err;
+
+	mr = kmalloc(sizeof *mr, GFP_KERNEL);
+	if (!mr)
+		return ERR_PTR(-ENOMEM);
+
+	err = mthca_mr_alloc_notrans(to_mdev(pd->device),
+				     to_mpd(pd)->pd_num,
+				     convert_access(acc), mr);
+
+	if (err) {
+		kfree(mr);
+		return ERR_PTR(err);
+	}
+
+	return &mr->ibmr;
+}
+
+static struct ib_mr *mthca_reg_phys_mr(struct ib_pd       *pd,
+				       struct ib_phys_buf *buffer_list,
+				       int                 num_phys_buf,
+				       int                 acc,
+				       u64                *iova_start)
+{
+	struct mthca_mr *mr;
+	u64 *page_list;
+	u64 total_size;
+	u64 mask;
+	int shift;
+	int npages;
+	int err;
+	int i, j, n;
+
+	/* First check that we have enough alignment */
+	if ((*iova_start & ~PAGE_MASK) != (buffer_list[0].addr & ~PAGE_MASK))
+		return ERR_PTR(-EINVAL);
+
+	if (num_phys_buf > 1 &&
+	    ((buffer_list[0].addr + buffer_list[0].size) & ~PAGE_MASK))
+		return ERR_PTR(-EINVAL);
+
+	mask = 0;
+	total_size = 0;
+	for (i = 0; i < num_phys_buf; ++i) {
+		if (buffer_list[i].addr & ~PAGE_MASK)
+			return ERR_PTR(-EINVAL);
+		if (i != 0 && i != num_phys_buf - 1 &&
+		    (buffer_list[i].size & ~PAGE_MASK))
+			return ERR_PTR(-EINVAL);
+
+		total_size += buffer_list[i].size;
+		if (i > 0)
+			mask |= buffer_list[i].addr;
+	}
+
+	/* Find largest page shift we can use to cover buffers */
+	for (shift = PAGE_SHIFT; shift < 31; ++shift)
+		if (num_phys_buf > 1) {
+			if ((1ULL << shift) & mask)
+				break;
+		} else {
+			if (1ULL << shift >=
+			    buffer_list[0].size +
+			    (buffer_list[0].addr & ((1ULL << shift) - 1)))
+				break;
+		}
+
+	buffer_list[0].size += buffer_list[0].addr & ((1ULL << shift) - 1);
+	buffer_list[0].addr &= ~0ull << shift;
+
+	mr = kmalloc(sizeof *mr, GFP_KERNEL);
+	if (!mr)
+		return ERR_PTR(-ENOMEM);
+
+	npages = 0;
+	for (i = 0; i < num_phys_buf; ++i)
+		npages += (buffer_list[i].size + (1ULL << shift) - 1) >> shift;
+
+	if (!npages)
+		return &mr->ibmr;
+
+	page_list = kmalloc(npages * sizeof *page_list, GFP_KERNEL);
+	if (!page_list) {
+		kfree(mr);
+		return ERR_PTR(-ENOMEM);
+	}
+
+	n = 0;
+	for (i = 0; i < num_phys_buf; ++i)
+		for (j = 0;
+		     j < (buffer_list[i].size + (1ULL << shift) - 1) >> shift;
+		     ++j)
+			page_list[n++] = buffer_list[i].addr + ((u64) j << shift);
+
+	mthca_dbg(to_mdev(pd->device), "Registering memory at %llx (iova %llx) "
+		  "in PD %x; shift %d, npages %d.\n",
+		  (unsigned long long) buffer_list[0].addr,
+		  (unsigned long long) *iova_start,
+		  to_mpd(pd)->pd_num,
+		  shift, npages);
+
+	err = mthca_mr_alloc_phys(to_mdev(pd->device),
+				  to_mpd(pd)->pd_num,
+				  page_list, shift, npages,
+				  *iova_start, total_size,
+				  convert_access(acc), mr);
+
+	if (err) {
+		kfree(mr);
+		return ERR_PTR(err);
+	}
+
+	kfree(page_list);
+	return &mr->ibmr;
+}
+
+static int mthca_dereg_mr(struct ib_mr *mr)
+{
+	mthca_free_mr(to_mdev(mr->device), to_mmr(mr));
+	kfree(mr);
+	return 0;
+}
+
+static ssize_t show_rev(struct class_device *cdev, char *buf)
+{
+	struct mthca_dev *dev = container_of(cdev, struct mthca_dev, ib_dev.class_dev);
+	return sprintf(buf, "%x\n", dev->rev_id);
+}
+
+static ssize_t show_fw_ver(struct class_device *cdev, char *buf)
+{
+	struct mthca_dev *dev = container_of(cdev, struct mthca_dev, ib_dev.class_dev);
+	return sprintf(buf, "%x.%x.%x\n", (int) (dev->fw_ver >> 32),
+		       (int) (dev->fw_ver >> 16) & 0xffff,
+		       (int) dev->fw_ver & 0xffff);
+}
+
+static ssize_t show_hca(struct class_device *cdev, char *buf)
+{
+	struct mthca_dev *dev = container_of(cdev, struct mthca_dev, ib_dev.class_dev);
+	switch (dev->hca_type) {
+	case TAVOR:        return sprintf(buf, "MT23108\n");
+	case ARBEL_COMPAT: return sprintf(buf, "MT25208 (MT23108 compat mode)\n");
+	case ARBEL_NATIVE: return sprintf(buf, "MT25208\n");
+	default:           return sprintf(buf, "unknown\n");
+	}
+}
+
+static CLASS_DEVICE_ATTR(hw_rev,   S_IRUGO, show_rev,    NULL);
+static CLASS_DEVICE_ATTR(fw_ver,   S_IRUGO, show_fw_ver, NULL);
+static CLASS_DEVICE_ATTR(hca_type, S_IRUGO, show_hca,    NULL);
+
+static struct class_device_attribute *mthca_class_attributes[] = {
+	&class_device_attr_hw_rev,
+	&class_device_attr_fw_ver,
+	&class_device_attr_hca_type
+};
+
+int mthca_register_device(struct mthca_dev *dev)
+{
+	int ret;
+	int i;
+
+	strlcpy(dev->ib_dev.name, "mthca%d", IB_DEVICE_NAME_MAX);
+	dev->ib_dev.node_type            = IB_NODE_CA;
+	dev->ib_dev.phys_port_cnt        = dev->limits.num_ports;
+	dev->ib_dev.dma_device           = &dev->pdev->dev;
+	dev->ib_dev.class_dev.dev        = &dev->pdev->dev;
+	dev->ib_dev.query_device         = mthca_query_device;
+	dev->ib_dev.query_port           = mthca_query_port;
+	dev->ib_dev.modify_port          = mthca_modify_port;
+	dev->ib_dev.query_pkey           = mthca_query_pkey;
+	dev->ib_dev.query_gid            = mthca_query_gid;
+	dev->ib_dev.alloc_pd             = mthca_alloc_pd;
+	dev->ib_dev.dealloc_pd           = mthca_dealloc_pd;
+	dev->ib_dev.create_ah            = mthca_ah_create;
+	dev->ib_dev.destroy_ah           = mthca_ah_destroy;
+	dev->ib_dev.create_qp            = mthca_create_qp;
+	dev->ib_dev.modify_qp            = mthca_modify_qp;
+	dev->ib_dev.destroy_qp           = mthca_destroy_qp;
+	dev->ib_dev.post_send            = mthca_post_send;
+	dev->ib_dev.post_recv            = mthca_post_receive;
+	dev->ib_dev.create_cq            = mthca_create_cq;
+	dev->ib_dev.destroy_cq           = mthca_destroy_cq;
+	dev->ib_dev.poll_cq              = mthca_poll_cq;
+	dev->ib_dev.req_notify_cq        = mthca_req_notify_cq;
+	dev->ib_dev.get_dma_mr           = mthca_get_dma_mr;
+	dev->ib_dev.reg_phys_mr          = mthca_reg_phys_mr;
+	dev->ib_dev.dereg_mr             = mthca_dereg_mr;
+	dev->ib_dev.attach_mcast         = mthca_multicast_attach;
+	dev->ib_dev.detach_mcast         = mthca_multicast_detach;
+	dev->ib_dev.process_mad          = mthca_process_mad;
+
+	ret = ib_register_device(&dev->ib_dev);
+	if (ret)
+		return ret;
+
+	for (i = 0; i < ARRAY_SIZE(mthca_class_attributes); ++i) {
+		ret = class_device_create_file(&dev->ib_dev.class_dev,
+					       mthca_class_attributes[i]);
+		if (ret) {
+			ib_unregister_device(&dev->ib_dev);
+			return ret;
+		}
+	}
+
+	return 0;
+}
+
+void mthca_unregister_device(struct mthca_dev *dev)
+{
+	ib_unregister_device(&dev->ib_dev);
+}
diff -Nru a/drivers/infiniband/hw/mthca/mthca_provider.h b/drivers/infiniband/hw/mthca/mthca_provider.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/hw/mthca/mthca_provider.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,225 @@
+/*
+ * Copyright (c) 2004 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: mthca_provider.h 1349 2004-12-16 21:09:43Z roland $
+ */
+
+#ifndef MTHCA_PROVIDER_H
+#define MTHCA_PROVIDER_H
+
+#include <ib_verbs.h>
+#include <ib_pack.h>
+
+#define MTHCA_MPT_FLAG_ATOMIC        (1 << 14)
+#define MTHCA_MPT_FLAG_REMOTE_WRITE  (1 << 13)
+#define MTHCA_MPT_FLAG_REMOTE_READ   (1 << 12)
+#define MTHCA_MPT_FLAG_LOCAL_WRITE   (1 << 11)
+#define MTHCA_MPT_FLAG_LOCAL_READ    (1 << 10)
+
+struct mthca_buf_list {
+	void *buf;
+	DECLARE_PCI_UNMAP_ADDR(mapping)
+};
+
+struct mthca_mr {
+	struct ib_mr ibmr;
+	int order;
+	u32 first_seg;
+};
+
+struct mthca_pd {
+	struct ib_pd    ibpd;
+	u32             pd_num;
+	atomic_t        sqp_count;
+	struct mthca_mr ntmr;
+};
+
+struct mthca_eq {
+	struct mthca_dev      *dev;
+	int                    eqn;
+	u32                    ecr_mask;
+	u16                    msi_x_vector;
+	u16                    msi_x_entry;
+	int                    have_irq;
+	int                    nent;
+	int                    cons_index;
+	struct mthca_buf_list *page_list;
+	struct mthca_mr        mr;
+};
+
+struct mthca_av;
+
+struct mthca_ah {
+	struct ib_ah     ibah;
+	int              on_hca;
+	u32              key;
+	struct mthca_av *av;
+	dma_addr_t       avdma;
+};
+
+/*
+ * Quick description of our CQ/QP locking scheme:
+ *
+ * We have one global lock that protects dev->cq/qp_table.  Each
+ * struct mthca_cq/qp also has its own lock.  An individual qp lock
+ * may be taken inside of an individual cq lock.  Both cqs attached to
+ * a qp may be locked, with the send cq locked first.  No other
+ * nesting should be done.
+ *
+ * Each struct mthca_cq/qp also has an atomic_t ref count.  The
+ * pointer from the cq/qp_table to the struct counts as one reference.
+ * This reference also is good for access through the consumer API, so
+ * modifying the CQ/QP etc doesn't need to take another reference.
+ * Access because of a completion being polled does need a reference.
+ *
+ * Finally, each struct mthca_cq/qp has a wait_queue_head_t for the
+ * destroy function to sleep on.
+ *
+ * This means that access from the consumer API requires nothing but
+ * taking the struct's lock.
+ *
+ * Access because of a completion event should go as follows:
+ * - lock cq/qp_table and look up struct
+ * - increment ref count in struct
+ * - drop cq/qp_table lock
+ * - lock struct, do your thing, and unlock struct
+ * - decrement ref count; if zero, wake up waiters
+ *
+ * To destroy a CQ/QP, we can do the following:
+ * - lock cq/qp_table, remove pointer, unlock cq/qp_table lock
+ * - decrement ref count
+ * - wait_event until ref count is zero
+ *
+ * It is the consumer's responsibilty to make sure that no QP
+ * operations (WQE posting or state modification) are pending when the
+ * QP is destroyed.  Also, the consumer must make sure that calls to
+ * qp_modify are serialized.
+ *
+ * Possible optimizations (wait for profile data to see if/where we
+ * have locks bouncing between CPUs):
+ * - split cq/qp table lock into n separate (cache-aligned) locks,
+ *   indexed (say) by the page in the table
+ * - split QP struct lock into three (one for common info, one for the
+ *   send queue and one for the receive queue)
+ */
+
+struct mthca_cq {
+	struct ib_cq           ibcq;
+	spinlock_t             lock;
+	atomic_t               refcount;
+	int                    cqn;
+	int                    cons_index;
+	int                    is_direct;
+	union {
+		struct mthca_buf_list direct;
+		struct mthca_buf_list *page_list;
+	}                      queue;
+	struct mthca_mr        mr;
+	wait_queue_head_t      wait;
+};
+
+struct mthca_wq {
+	int   max;
+	int   cur;
+	int   next;
+	int   last_comp;
+	void *last;
+	int   max_gs;
+	int   wqe_shift;
+	enum ib_sig_type policy;
+};
+
+struct mthca_qp {
+	struct ib_qp           ibqp;
+	spinlock_t             lock;
+	atomic_t               refcount;
+	u32                    qpn;
+	int                    transport;
+	enum ib_qp_state       state;
+	int                    is_direct;
+	struct mthca_mr        mr;
+
+	struct mthca_wq        rq;
+	struct mthca_wq        sq;
+	int                    send_wqe_offset;
+
+	u64                   *wrid;
+	union {
+		struct mthca_buf_list direct;
+		struct mthca_buf_list *page_list;
+	}                      queue;
+
+	wait_queue_head_t      wait;
+};
+
+struct mthca_sqp {
+	struct mthca_qp qp;
+	int             port;
+	int             pkey_index;
+	u32             qkey;
+	u32             send_psn;
+	struct ib_ud_header ud_header;
+	int             header_buf_size;
+	void           *header_buf;
+	dma_addr_t      header_dma;
+};
+
+static inline struct mthca_mr *to_mmr(struct ib_mr *ibmr)
+{
+	return container_of(ibmr, struct mthca_mr, ibmr);
+}
+
+static inline struct mthca_pd *to_mpd(struct ib_pd *ibpd)
+{
+	return container_of(ibpd, struct mthca_pd, ibpd);
+}
+
+static inline struct mthca_ah *to_mah(struct ib_ah *ibah)
+{
+	return container_of(ibah, struct mthca_ah, ibah);
+}
+
+static inline struct mthca_cq *to_mcq(struct ib_cq *ibcq)
+{
+	return container_of(ibcq, struct mthca_cq, ibcq);
+}
+
+static inline struct mthca_qp *to_mqp(struct ib_qp *ibqp)
+{
+	return container_of(ibqp, struct mthca_qp, ibqp);
+}
+
+static inline struct mthca_sqp *to_msqp(struct mthca_qp *qp)
+{
+	return container_of(qp, struct mthca_sqp, qp);
+}
+
+#endif /* MTHCA_PROVIDER_H */
diff -Nru a/drivers/infiniband/hw/mthca/mthca_qp.c b/drivers/infiniband/hw/mthca/mthca_qp.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/hw/mthca/mthca_qp.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,1536 @@
+/*
+ * Copyright (c) 2004 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: mthca_qp.c 1355 2004-12-17 15:23:43Z roland $
+ */
+
+#include <linux/init.h>
+
+#include <ib_verbs.h>
+#include <ib_cache.h>
+#include <ib_pack.h>
+
+#include "mthca_dev.h"
+#include "mthca_cmd.h"
+
+enum {
+	MTHCA_MAX_DIRECT_QP_SIZE = 4 * PAGE_SIZE,
+	MTHCA_ACK_REQ_FREQ       = 10,
+	MTHCA_FLIGHT_LIMIT       = 9,
+	MTHCA_UD_HEADER_SIZE     = 72 /* largest UD header possible */
+};
+
+enum {
+	MTHCA_QP_STATE_RST  = 0,
+	MTHCA_QP_STATE_INIT = 1,
+	MTHCA_QP_STATE_RTR  = 2,
+	MTHCA_QP_STATE_RTS  = 3,
+	MTHCA_QP_STATE_SQE  = 4,
+	MTHCA_QP_STATE_SQD  = 5,
+	MTHCA_QP_STATE_ERR  = 6,
+	MTHCA_QP_STATE_DRAINING = 7
+};
+
+enum {
+	MTHCA_QP_ST_RC 	= 0x0,
+	MTHCA_QP_ST_UC 	= 0x1,
+	MTHCA_QP_ST_RD 	= 0x2,
+	MTHCA_QP_ST_UD 	= 0x3,
+	MTHCA_QP_ST_MLX = 0x7
+};
+
+enum {
+	MTHCA_QP_PM_MIGRATED = 0x3,
+	MTHCA_QP_PM_ARMED    = 0x0,
+	MTHCA_QP_PM_REARM    = 0x1
+};
+
+enum {
+	/* qp_context flags */
+	MTHCA_QP_BIT_DE  = 1 <<  8,
+	/* params1 */
+	MTHCA_QP_BIT_SRE = 1 << 15,
+	MTHCA_QP_BIT_SWE = 1 << 14,
+	MTHCA_QP_BIT_SAE = 1 << 13,
+	MTHCA_QP_BIT_SIC = 1 <<  4,
+	MTHCA_QP_BIT_SSC = 1 <<  3,
+	/* params2 */
+	MTHCA_QP_BIT_RRE = 1 << 15,
+	MTHCA_QP_BIT_RWE = 1 << 14,
+	MTHCA_QP_BIT_RAE = 1 << 13,
+	MTHCA_QP_BIT_RIC = 1 <<  4,
+	MTHCA_QP_BIT_RSC = 1 <<  3
+};
+
+struct mthca_qp_path {
+	u32 port_pkey;
+	u8  rnr_retry;
+	u8  g_mylmc;
+	u16 rlid;
+	u8  ackto;
+	u8  mgid_index;
+	u8  static_rate;
+	u8  hop_limit;
+	u32 sl_tclass_flowlabel;
+	u8  rgid[16];
+} __attribute__((packed));
+
+struct mthca_qp_context {
+	u32 flags;
+	u32 sched_queue;
+	u32 mtu_msgmax;
+	u32 usr_page;
+	u32 local_qpn;
+	u32 remote_qpn;
+	u32 reserved1[2];
+	struct mthca_qp_path pri_path;
+	struct mthca_qp_path alt_path;
+	u32 rdd;
+	u32 pd;
+	u32 wqe_base;
+	u32 wqe_lkey;
+	u32 params1;
+	u32 reserved2;
+	u32 next_send_psn;
+	u32 cqn_snd;
+	u32 next_snd_wqe[2];
+	u32 last_acked_psn;
+	u32 ssn;
+	u32 params2;
+	u32 rnr_nextrecvpsn;
+	u32 ra_buff_indx;
+	u32 cqn_rcv;
+	u32 next_rcv_wqe[2];
+	u32 qkey;
+	u32 srqn;
+	u32 rmsn;
+	u32 reserved3[19];
+} __attribute__((packed));
+
+struct mthca_qp_param {
+	u32 opt_param_mask;
+	u32 reserved1;
+	struct mthca_qp_context context;
+	u32 reserved2[62];
+} __attribute__((packed));
+
+enum {
+	MTHCA_QP_OPTPAR_ALT_ADDR_PATH     = 1 << 0,
+	MTHCA_QP_OPTPAR_RRE               = 1 << 1,
+	MTHCA_QP_OPTPAR_RAE               = 1 << 2,
+	MTHCA_QP_OPTPAR_REW               = 1 << 3,
+	MTHCA_QP_OPTPAR_PKEY_INDEX        = 1 << 4,
+	MTHCA_QP_OPTPAR_Q_KEY             = 1 << 5,
+	MTHCA_QP_OPTPAR_RNR_TIMEOUT       = 1 << 6,
+	MTHCA_QP_OPTPAR_PRIMARY_ADDR_PATH = 1 << 7,
+	MTHCA_QP_OPTPAR_SRA_MAX           = 1 << 8,
+	MTHCA_QP_OPTPAR_RRA_MAX           = 1 << 9,
+	MTHCA_QP_OPTPAR_PM_STATE          = 1 << 10,
+	MTHCA_QP_OPTPAR_PORT_NUM          = 1 << 11,
+	MTHCA_QP_OPTPAR_RETRY_COUNT       = 1 << 12,
+	MTHCA_QP_OPTPAR_ALT_RNR_RETRY     = 1 << 13,
+	MTHCA_QP_OPTPAR_ACK_TIMEOUT       = 1 << 14,
+	MTHCA_QP_OPTPAR_RNR_RETRY         = 1 << 15,
+	MTHCA_QP_OPTPAR_SCHED_QUEUE       = 1 << 16
+};
+
+enum {
+	MTHCA_OPCODE_NOP            = 0x00,
+	MTHCA_OPCODE_RDMA_WRITE     = 0x08,
+	MTHCA_OPCODE_RDMA_WRITE_IMM = 0x09,
+	MTHCA_OPCODE_SEND           = 0x0a,
+	MTHCA_OPCODE_SEND_IMM       = 0x0b,
+	MTHCA_OPCODE_RDMA_READ      = 0x10,
+	MTHCA_OPCODE_ATOMIC_CS      = 0x11,
+	MTHCA_OPCODE_ATOMIC_FA      = 0x12,
+	MTHCA_OPCODE_BIND_MW        = 0x18,
+	MTHCA_OPCODE_INVALID        = 0xff
+};
+
+enum {
+	MTHCA_NEXT_DBD       = 1 << 7,
+	MTHCA_NEXT_FENCE     = 1 << 6,
+	MTHCA_NEXT_CQ_UPDATE = 1 << 3,
+	MTHCA_NEXT_EVENT_GEN = 1 << 2,
+	MTHCA_NEXT_SOLICIT   = 1 << 1,
+
+	MTHCA_MLX_VL15       = 1 << 17,
+	MTHCA_MLX_SLR        = 1 << 16
+};
+
+struct mthca_next_seg {
+	u32 nda_op;		/* [31:6] next WQE [4:0] next opcode */
+	u32 ee_nds;		/* [31:8] next EE  [7] DBD [6] F [5:0] next WQE size */
+	u32 flags;		/* [3] CQ [2] Event [1] Solicit */
+	u32 imm;		/* immediate data */
+};
+
+struct mthca_ud_seg {
+	u32 reserved1;
+	u32 lkey;
+	u64 av_addr;
+	u32 reserved2[4];
+	u32 dqpn;
+	u32 qkey;
+	u32 reserved3[2];
+};
+
+struct mthca_bind_seg {
+	u32 flags;		/* [31] Atomic [30] rem write [29] rem read */
+	u32 reserved;
+	u32 new_rkey;
+	u32 lkey;
+	u64 addr;
+	u64 length;
+};
+
+struct mthca_raddr_seg {
+	u64 raddr;
+	u32 rkey;
+	u32 reserved;
+};
+
+struct mthca_atomic_seg {
+	u64 swap_add;
+	u64 compare;
+};
+
+struct mthca_data_seg {
+	u32 byte_count;
+	u32 lkey;
+	u64 addr;
+};
+
+struct mthca_mlx_seg {
+	u32 nda_op;
+	u32 nds;
+	u32 flags;		/* [17] VL15 [16] SLR [14:12] static rate
+				   [11:8] SL [3] C [2] E */
+	u16 rlid;
+	u16 vcrc;
+};
+
+static int is_sqp(struct mthca_dev *dev, struct mthca_qp *qp)
+{
+	return qp->qpn >= dev->qp_table.sqp_start &&
+		qp->qpn <= dev->qp_table.sqp_start + 3;
+}
+
+static int is_qp0(struct mthca_dev *dev, struct mthca_qp *qp)
+{
+	return qp->qpn >= dev->qp_table.sqp_start &&
+		qp->qpn <= dev->qp_table.sqp_start + 1;
+}
+
+static void *get_recv_wqe(struct mthca_qp *qp, int n)
+{
+	if (qp->is_direct)
+		return qp->queue.direct.buf + (n << qp->rq.wqe_shift);
+	else
+		return qp->queue.page_list[(n << qp->rq.wqe_shift) >> PAGE_SHIFT].buf +
+			((n << qp->rq.wqe_shift) & (PAGE_SIZE - 1));
+}
+
+static void *get_send_wqe(struct mthca_qp *qp, int n)
+{
+	if (qp->is_direct)
+		return qp->queue.direct.buf + qp->send_wqe_offset +
+			(n << qp->sq.wqe_shift);
+	else
+		return qp->queue.page_list[(qp->send_wqe_offset +
+					    (n << qp->sq.wqe_shift)) >>
+					   PAGE_SHIFT].buf +
+			((qp->send_wqe_offset + (n << qp->sq.wqe_shift)) &
+			 (PAGE_SIZE - 1));
+}
+
+void mthca_qp_event(struct mthca_dev *dev, u32 qpn,
+		    enum ib_event_type event_type)
+{
+	struct mthca_qp *qp;
+	struct ib_event event;
+
+	spin_lock(&dev->qp_table.lock);
+	qp = mthca_array_get(&dev->qp_table.qp, qpn & (dev->limits.num_qps - 1));
+	if (qp)
+		atomic_inc(&qp->refcount);
+	spin_unlock(&dev->qp_table.lock);
+
+	if (!qp) {
+		mthca_warn(dev, "Async event for bogus QP %08x\n", qpn);
+		return;
+	}
+
+	event.device      = &dev->ib_dev;
+	event.event       = event_type;
+	event.element.qp  = &qp->ibqp;
+	if (qp->ibqp.event_handler)
+		qp->ibqp.event_handler(&event, qp->ibqp.qp_context);
+
+	if (atomic_dec_and_test(&qp->refcount))
+		wake_up(&qp->wait);
+}
+
+static int to_mthca_state(enum ib_qp_state ib_state)
+{
+	switch (ib_state) {
+	case IB_QPS_RESET: return MTHCA_QP_STATE_RST;
+	case IB_QPS_INIT:  return MTHCA_QP_STATE_INIT;
+	case IB_QPS_RTR:   return MTHCA_QP_STATE_RTR;
+	case IB_QPS_RTS:   return MTHCA_QP_STATE_RTS;
+	case IB_QPS_SQD:   return MTHCA_QP_STATE_SQD;
+	case IB_QPS_SQE:   return MTHCA_QP_STATE_SQE;
+	case IB_QPS_ERR:   return MTHCA_QP_STATE_ERR;
+	default:                return -1;
+	}
+}
+
+enum { RC, UC, UD, RD, RDEE, MLX, NUM_TRANS };
+
+static int to_mthca_st(int transport)
+{
+	switch (transport) {
+	case RC:  return MTHCA_QP_ST_RC;
+	case UC:  return MTHCA_QP_ST_UC;
+	case UD:  return MTHCA_QP_ST_UD;
+	case RD:  return MTHCA_QP_ST_RD;
+	case MLX: return MTHCA_QP_ST_MLX;
+	default:  return -1;
+	}
+}
+
+static const struct {
+	int trans;
+	u32 req_param[NUM_TRANS];
+	u32 opt_param[NUM_TRANS];
+} state_table[IB_QPS_ERR + 1][IB_QPS_ERR + 1] = {
+	[IB_QPS_RESET] = {
+		[IB_QPS_RESET] = { .trans = MTHCA_TRANS_ANY2RST },
+		[IB_QPS_ERR] = { .trans = MTHCA_TRANS_ANY2ERR },
+		[IB_QPS_INIT]  = {
+			.trans = MTHCA_TRANS_RST2INIT,
+			.req_param = {
+				[UD]  = (IB_QP_PKEY_INDEX |
+					 IB_QP_PORT       |
+					 IB_QP_QKEY),
+				[RC]  = (IB_QP_PKEY_INDEX |
+					 IB_QP_PORT       |
+					 IB_QP_ACCESS_FLAGS),
+				[MLX] = (IB_QP_PKEY_INDEX |
+					 IB_QP_QKEY),
+			},
+			/* bug-for-bug compatibility with VAPI: */
+			.opt_param = {
+				[MLX] = IB_QP_PORT
+			}
+		},
+	},
+	[IB_QPS_INIT]  = {
+		[IB_QPS_RESET] = { .trans = MTHCA_TRANS_ANY2RST },
+		[IB_QPS_ERR] = { .trans = MTHCA_TRANS_ANY2ERR },
+		[IB_QPS_INIT]  = {
+			.trans = MTHCA_TRANS_INIT2INIT,
+			.opt_param = {
+				[UD]  = (IB_QP_PKEY_INDEX |
+					 IB_QP_PORT       |
+					 IB_QP_QKEY),
+				[RC]  = (IB_QP_PKEY_INDEX |
+					 IB_QP_PORT       |
+					 IB_QP_ACCESS_FLAGS),
+				[MLX] = (IB_QP_PKEY_INDEX |
+					 IB_QP_QKEY),
+			}
+		},
+		[IB_QPS_RTR]   = {
+			.trans = MTHCA_TRANS_INIT2RTR,
+			.req_param = {
+				[RC]  = (IB_QP_AV                  |
+					 IB_QP_PATH_MTU            |
+					 IB_QP_DEST_QPN            |
+					 IB_QP_RQ_PSN              |
+					 IB_QP_MAX_DEST_RD_ATOMIC  |
+					 IB_QP_MIN_RNR_TIMER),
+			},
+			.opt_param = {
+				[UD]  = (IB_QP_PKEY_INDEX |
+					 IB_QP_QKEY),
+				[RC]  = (IB_QP_ALT_PATH     |
+					 IB_QP_ACCESS_FLAGS |
+					 IB_QP_PKEY_INDEX),
+				[MLX] = (IB_QP_PKEY_INDEX |
+					 IB_QP_QKEY),
+			}
+		}
+	},
+	[IB_QPS_RTR]   = {
+		[IB_QPS_RESET] = { .trans = MTHCA_TRANS_ANY2RST },
+		[IB_QPS_ERR] = { .trans = MTHCA_TRANS_ANY2ERR },
+		[IB_QPS_RTS]   = {
+			.trans = MTHCA_TRANS_RTR2RTS,
+			.req_param = {
+				[UD]  = IB_QP_SQ_PSN,
+				[RC]  = (IB_QP_TIMEOUT           |
+					 IB_QP_RETRY_CNT         |
+					 IB_QP_RNR_RETRY         |
+					 IB_QP_SQ_PSN            |
+					 IB_QP_MAX_QP_RD_ATOMIC),
+				[MLX] = IB_QP_SQ_PSN,
+			},
+			.opt_param = {
+				[UD]  = (IB_QP_CUR_STATE             |
+					 IB_QP_QKEY),
+				[RC]  = (IB_QP_CUR_STATE             |
+					 IB_QP_ALT_PATH              |
+					 IB_QP_ACCESS_FLAGS          |
+					 IB_QP_PKEY_INDEX            |
+					 IB_QP_MIN_RNR_TIMER         |
+					 IB_QP_PATH_MIG_STATE),
+				[MLX] = (IB_QP_CUR_STATE             |
+					 IB_QP_QKEY),
+			}
+		}
+	},
+	[IB_QPS_RTS]   = {
+		[IB_QPS_RESET] = { .trans = MTHCA_TRANS_ANY2RST },
+		[IB_QPS_ERR] = { .trans = MTHCA_TRANS_ANY2ERR },
+		[IB_QPS_RTS]   = {
+			.trans = MTHCA_TRANS_RTS2RTS,
+			.opt_param = {
+				[UD]  = (IB_QP_CUR_STATE             |
+					 IB_QP_QKEY),
+				[RC]  = (IB_QP_ACCESS_FLAGS          |
+					 IB_QP_ALT_PATH              |
+					 IB_QP_PATH_MIG_STATE        |
+					 IB_QP_MIN_RNR_TIMER),
+				[MLX] = (IB_QP_CUR_STATE             |
+					 IB_QP_QKEY),
+			}
+		},
+		[IB_QPS_SQD]   = {
+			.trans = MTHCA_TRANS_RTS2SQD,
+		},
+	},
+	[IB_QPS_SQD]   = {
+		[IB_QPS_RESET] = { .trans = MTHCA_TRANS_ANY2RST },
+		[IB_QPS_ERR] = { .trans = MTHCA_TRANS_ANY2ERR },
+		[IB_QPS_RTS]   = {
+			.trans = MTHCA_TRANS_SQD2RTS,
+			.opt_param = {
+				[UD]  = (IB_QP_CUR_STATE             |
+					 IB_QP_QKEY),
+				[RC]  = (IB_QP_CUR_STATE             |
+					 IB_QP_ALT_PATH              |
+					 IB_QP_ACCESS_FLAGS          |
+					 IB_QP_MIN_RNR_TIMER         |
+					 IB_QP_PATH_MIG_STATE),
+				[MLX] = (IB_QP_CUR_STATE             |
+					 IB_QP_QKEY),
+			}
+		},
+		[IB_QPS_SQD]   = {
+			.trans = MTHCA_TRANS_SQD2SQD,
+			.opt_param = {
+				[UD]  = (IB_QP_PKEY_INDEX            |
+					 IB_QP_QKEY),
+				[RC]  = (IB_QP_AV                    |
+					 IB_QP_TIMEOUT               |
+					 IB_QP_RETRY_CNT             |
+					 IB_QP_RNR_RETRY             |
+					 IB_QP_MAX_QP_RD_ATOMIC      |
+					 IB_QP_MAX_DEST_RD_ATOMIC    |
+					 IB_QP_CUR_STATE             |
+					 IB_QP_ALT_PATH              |
+					 IB_QP_ACCESS_FLAGS          |
+					 IB_QP_PKEY_INDEX            |
+					 IB_QP_MIN_RNR_TIMER         |
+					 IB_QP_PATH_MIG_STATE),
+				[MLX] = (IB_QP_PKEY_INDEX            |
+					 IB_QP_QKEY),
+			}
+		}
+	},
+	[IB_QPS_SQE]   = {
+		[IB_QPS_RESET] = { .trans = MTHCA_TRANS_ANY2RST },
+		[IB_QPS_ERR] = { .trans = MTHCA_TRANS_ANY2ERR },
+		[IB_QPS_RTS]   = {
+			.trans = MTHCA_TRANS_SQERR2RTS,
+			.opt_param = {
+				[UD]  = (IB_QP_CUR_STATE             |
+					 IB_QP_QKEY),
+				[RC]  = (IB_QP_CUR_STATE             |
+					 IB_QP_MIN_RNR_TIMER),
+				[MLX] = (IB_QP_CUR_STATE             |
+					 IB_QP_QKEY),
+			}
+		}
+	},
+	[IB_QPS_ERR] = {
+		[IB_QPS_RESET] = { .trans = MTHCA_TRANS_ANY2RST },
+		[IB_QPS_ERR] = { .trans = MTHCA_TRANS_ANY2ERR }
+	}
+};
+
+static void store_attrs(struct mthca_sqp *sqp, struct ib_qp_attr *attr,
+			int attr_mask)
+{
+	if (attr_mask & IB_QP_PKEY_INDEX)
+		sqp->pkey_index = attr->pkey_index;
+	if (attr_mask & IB_QP_QKEY)
+		sqp->qkey = attr->qkey;
+	if (attr_mask & IB_QP_SQ_PSN)
+		sqp->send_psn = attr->sq_psn;
+}
+
+static void init_port(struct mthca_dev *dev, int port)
+{
+	int err;
+	u8 status;
+	struct mthca_init_ib_param param;
+
+	memset(&param, 0, sizeof param);
+
+	param.enable_1x = 1;
+	param.enable_4x = 1;
+	param.vl_cap    = dev->limits.vl_cap;
+	param.mtu_cap   = dev->limits.mtu_cap;
+	param.gid_cap   = dev->limits.gid_table_len;
+	param.pkey_cap  = dev->limits.pkey_table_len;
+
+	err = mthca_INIT_IB(dev, &param, port, &status);
+	if (err)
+		mthca_warn(dev, "INIT_IB failed, return code %d.\n", err);
+	if (status)
+		mthca_warn(dev, "INIT_IB returned status %02x.\n", status);
+}
+
+int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask)
+{
+	struct mthca_dev *dev = to_mdev(ibqp->device);
+	struct mthca_qp *qp = to_mqp(ibqp);
+	enum ib_qp_state cur_state, new_state;
+	void *mailbox = NULL;
+	struct mthca_qp_param *qp_param;
+	struct mthca_qp_context *qp_context;
+	u32 req_param, opt_param;
+	u8 status;
+	int err;
+
+	if (attr_mask & IB_QP_CUR_STATE) {
+		if (attr->cur_qp_state != IB_QPS_RTR &&
+		    attr->cur_qp_state != IB_QPS_RTS &&
+		    attr->cur_qp_state != IB_QPS_SQD &&
+		    attr->cur_qp_state != IB_QPS_SQE)
+			return -EINVAL;
+		else
+			cur_state = attr->cur_qp_state;
+	} else {
+		spin_lock_irq(&qp->lock);
+		cur_state = qp->state;
+		spin_unlock_irq(&qp->lock);
+	}
+
+	if (attr_mask & IB_QP_STATE) {
+               if (attr->qp_state < 0 || attr->qp_state > IB_QPS_ERR)
+			return -EINVAL;
+		new_state = attr->qp_state;
+	} else
+		new_state = cur_state;
+
+	if (state_table[cur_state][new_state].trans == MTHCA_TRANS_INVALID) {
+		mthca_dbg(dev, "Illegal QP transition "
+			  "%d->%d\n", cur_state, new_state);
+		return -EINVAL;
+	}
+
+	req_param = state_table[cur_state][new_state].req_param[qp->transport];
+	opt_param = state_table[cur_state][new_state].opt_param[qp->transport];
+
+	if ((req_param & attr_mask) != req_param) {
+		mthca_dbg(dev, "QP transition "
+			  "%d->%d missing req attr 0x%08x\n",
+			  cur_state, new_state,
+			  req_param & ~attr_mask);
+		return -EINVAL;
+	}
+
+	if (attr_mask & ~(req_param | opt_param | IB_QP_STATE)) {
+		mthca_dbg(dev, "QP transition (transport %d) "
+			  "%d->%d has extra attr 0x%08x\n",
+			  qp->transport,
+			  cur_state, new_state,
+			  attr_mask & ~(req_param | opt_param |
+						 IB_QP_STATE));
+		return -EINVAL;
+	}
+
+	mailbox = kmalloc(sizeof (*qp_param) + MTHCA_CMD_MAILBOX_EXTRA, GFP_KERNEL);
+	if (!mailbox)
+		return -ENOMEM;
+	qp_param = MAILBOX_ALIGN(mailbox);
+	qp_context = &qp_param->context;
+	memset(qp_param, 0, sizeof *qp_param);
+
+	qp_context->flags      = cpu_to_be32((to_mthca_state(new_state) << 28) |
+					     (to_mthca_st(qp->transport) << 16));
+	qp_context->flags     |= cpu_to_be32(MTHCA_QP_BIT_DE);
+	if (!(attr_mask & IB_QP_PATH_MIG_STATE))
+		qp_context->flags |= cpu_to_be32(MTHCA_QP_PM_MIGRATED << 11);
+	else {
+		qp_param->opt_param_mask |= cpu_to_be32(MTHCA_QP_OPTPAR_PM_STATE);
+		switch (attr->path_mig_state) {
+		case IB_MIG_MIGRATED:
+			qp_context->flags |= cpu_to_be32(MTHCA_QP_PM_MIGRATED << 11);
+			break;
+		case IB_MIG_REARM:
+			qp_context->flags |= cpu_to_be32(MTHCA_QP_PM_REARM << 11);
+			break;
+		case IB_MIG_ARMED:
+			qp_context->flags |= cpu_to_be32(MTHCA_QP_PM_ARMED << 11);
+			break;
+		}
+	}
+	/* leave sched_queue as 0 */
+	if (qp->transport == MLX || qp->transport == UD)
+		qp_context->mtu_msgmax = cpu_to_be32((IB_MTU_2048 << 29) |
+						     (11 << 24));
+	else if (attr_mask & IB_QP_PATH_MTU) {
+		qp_context->mtu_msgmax = cpu_to_be32((attr->path_mtu << 29) |
+						     (31 << 24));
+	}
+	qp_context->usr_page   = cpu_to_be32(MTHCA_KAR_PAGE);
+	qp_context->local_qpn  = cpu_to_be32(qp->qpn);
+	if (attr_mask & IB_QP_DEST_QPN) {
+		qp_context->remote_qpn = cpu_to_be32(attr->dest_qp_num);
+	}
+
+	if (qp->transport == MLX)
+		qp_context->pri_path.port_pkey |=
+			cpu_to_be32(to_msqp(qp)->port << 24);
+	else {
+		if (attr_mask & IB_QP_PORT) {
+			qp_context->pri_path.port_pkey |=
+				cpu_to_be32(attr->port_num << 24);
+			qp_param->opt_param_mask |= cpu_to_be32(MTHCA_QP_OPTPAR_PORT_NUM);
+		}
+	}
+
+	if (attr_mask & IB_QP_PKEY_INDEX) {
+		qp_context->pri_path.port_pkey |=
+			cpu_to_be32(attr->pkey_index);
+		qp_param->opt_param_mask |= cpu_to_be32(MTHCA_QP_OPTPAR_PKEY_INDEX);
+	}
+
+	if (attr_mask & IB_QP_RNR_RETRY) {
+		qp_context->pri_path.rnr_retry = attr->rnr_retry << 5;
+		qp_param->opt_param_mask |= cpu_to_be32(MTHCA_QP_OPTPAR_RNR_RETRY);
+	}
+
+	if (attr_mask & IB_QP_AV) {
+		qp_context->pri_path.g_mylmc     = attr->ah_attr.src_path_bits & 0x7f;
+		qp_context->pri_path.rlid        = cpu_to_be16(attr->ah_attr.dlid);
+		qp_context->pri_path.static_rate = (!!attr->ah_attr.static_rate) << 3;
+		if (attr->ah_attr.ah_flags & IB_AH_GRH) {
+			qp_context->pri_path.g_mylmc |= 1 << 7;
+			qp_context->pri_path.mgid_index = attr->ah_attr.grh.sgid_index;
+			qp_context->pri_path.hop_limit = attr->ah_attr.grh.hop_limit;
+			qp_context->pri_path.sl_tclass_flowlabel =
+				cpu_to_be32((attr->ah_attr.sl << 28)                |
+					    (attr->ah_attr.grh.traffic_class << 20) |
+					    (attr->ah_attr.grh.flow_label));
+			memcpy(qp_context->pri_path.rgid,
+			       attr->ah_attr.grh.dgid.raw, 16);
+		} else {
+			qp_context->pri_path.sl_tclass_flowlabel =
+				cpu_to_be32(attr->ah_attr.sl << 28);
+		}
+		qp_param->opt_param_mask |= cpu_to_be32(MTHCA_QP_OPTPAR_PRIMARY_ADDR_PATH);
+	}
+
+	if (attr_mask & IB_QP_TIMEOUT) {
+		qp_context->pri_path.ackto = attr->timeout;
+		qp_param->opt_param_mask |= cpu_to_be32(MTHCA_QP_OPTPAR_ACK_TIMEOUT);
+	}
+
+	/* XXX alt_path */
+
+	/* leave rdd as 0 */
+	qp_context->pd         = cpu_to_be32(to_mpd(ibqp->pd)->pd_num);
+	/* leave wqe_base as 0 (we always create an MR based at 0 for WQs) */
+	qp_context->wqe_lkey   = cpu_to_be32(qp->mr.ibmr.lkey);
+	qp_context->params1    = cpu_to_be32((MTHCA_ACK_REQ_FREQ << 28) |
+					     (MTHCA_FLIGHT_LIMIT << 24) |
+					     MTHCA_QP_BIT_SRE           |
+					     MTHCA_QP_BIT_SWE           |
+					     MTHCA_QP_BIT_SAE);
+	if (qp->sq.policy == IB_SIGNAL_ALL_WR)
+		qp_context->params1 |= cpu_to_be32(MTHCA_QP_BIT_SSC);
+	if (attr_mask & IB_QP_RETRY_CNT) {
+		qp_context->params1 |= cpu_to_be32(attr->retry_cnt << 16);
+		qp_param->opt_param_mask |= cpu_to_be32(MTHCA_QP_OPTPAR_RETRY_COUNT);
+	}
+
+	/* XXX initiator resources */
+
+	if (attr_mask & IB_QP_SQ_PSN)
+		qp_context->next_send_psn = cpu_to_be32(attr->sq_psn);
+	qp_context->cqn_snd = cpu_to_be32(to_mcq(ibqp->send_cq)->cqn);
+
+	/* XXX RDMA/atomic enable, responder resources */
+
+	if (qp->rq.policy == IB_SIGNAL_ALL_WR)
+		qp_context->params2 |= cpu_to_be32(MTHCA_QP_BIT_RSC);
+	if (attr_mask & IB_QP_MIN_RNR_TIMER) {
+		qp_context->rnr_nextrecvpsn |= cpu_to_be32(attr->min_rnr_timer << 24);
+		qp_param->opt_param_mask |= cpu_to_be32(MTHCA_QP_OPTPAR_RNR_TIMEOUT);
+	}
+	if (attr_mask & IB_QP_RQ_PSN)
+		qp_context->rnr_nextrecvpsn |= cpu_to_be32(attr->rq_psn);
+
+	/* XXX ra_buff_indx */
+
+	qp_context->cqn_rcv = cpu_to_be32(to_mcq(ibqp->recv_cq)->cqn);
+
+	if (attr_mask & IB_QP_QKEY) {
+		qp_context->qkey = cpu_to_be32(attr->qkey);
+		qp_param->opt_param_mask |= cpu_to_be32(MTHCA_QP_OPTPAR_Q_KEY);
+	}
+
+	err = mthca_MODIFY_QP(dev, state_table[cur_state][new_state].trans,
+			      qp->qpn, 0, qp_param, 0, &status);
+	if (status) {
+		mthca_warn(dev, "modify QP %d returned status %02x.\n",
+			   state_table[cur_state][new_state].trans, status);
+		err = -EINVAL;
+	}
+
+	if (!err)
+		qp->state = new_state;
+
+	kfree(mailbox);
+
+	if (is_sqp(dev, qp))
+		store_attrs(to_msqp(qp), attr, attr_mask);
+
+	/*
+	 * If we are moving QP0 to RTR, bring the IB link up; if we
+	 * are moving QP0 to RESET or ERROR, bring the link back down.
+	 */
+	if (is_qp0(dev, qp)) {
+		if (cur_state != IB_QPS_RTR &&
+		    new_state == IB_QPS_RTR)
+			init_port(dev, to_msqp(qp)->port);
+
+		if (cur_state != IB_QPS_RESET &&
+		    cur_state != IB_QPS_ERR &&
+		    (new_state == IB_QPS_RESET ||
+		     new_state == IB_QPS_ERR))
+			mthca_CLOSE_IB(dev, to_msqp(qp)->port, &status);
+	}
+
+	return err;
+}
+
+/*
+ * Allocate and register buffer for WQEs.  qp->rq.max, sq.max,
+ * rq.max_gs and sq.max_gs must all be assigned.
+ * mthca_alloc_wqe_buf will calculate rq.wqe_shift and
+ * sq.wqe_shift (as well as send_wqe_offset, is_direct, and
+ * queue)
+ */
+static int mthca_alloc_wqe_buf(struct mthca_dev *dev,
+			       struct mthca_pd *pd,
+			       struct mthca_qp *qp)
+{
+	int size;
+	int i;
+	int npages, shift;
+	dma_addr_t t;
+	u64 *dma_list = NULL;
+	int err = -ENOMEM;
+
+	size = sizeof (struct mthca_next_seg) +
+		qp->rq.max_gs * sizeof (struct mthca_data_seg);
+
+	for (qp->rq.wqe_shift = 6; 1 << qp->rq.wqe_shift < size;
+	     qp->rq.wqe_shift++)
+		; /* nothing */
+
+	size = sizeof (struct mthca_next_seg) +
+		qp->sq.max_gs * sizeof (struct mthca_data_seg);
+	if (qp->transport == MLX)
+		size += 2 * sizeof (struct mthca_data_seg);
+	else if (qp->transport == UD)
+		size += sizeof (struct mthca_ud_seg);
+	else /* bind seg is as big as atomic + raddr segs */
+		size += sizeof (struct mthca_bind_seg);
+
+	for (qp->sq.wqe_shift = 6; 1 << qp->sq.wqe_shift < size;
+	     qp->sq.wqe_shift++)
+		; /* nothing */
+
+	qp->send_wqe_offset = ALIGN(qp->rq.max << qp->rq.wqe_shift,
+				    1 << qp->sq.wqe_shift);
+	size = PAGE_ALIGN(qp->send_wqe_offset +
+			  (qp->sq.max << qp->sq.wqe_shift));
+
+	qp->wrid = kmalloc((qp->rq.max + qp->sq.max) * sizeof (u64),
+			   GFP_KERNEL);
+	if (!qp->wrid)
+		goto err_out;
+
+	if (size <= MTHCA_MAX_DIRECT_QP_SIZE) {
+		qp->is_direct = 1;
+		npages = 1;
+		shift = get_order(size) + PAGE_SHIFT;
+
+		if (0)
+			mthca_dbg(dev, "Creating direct QP of size %d (shift %d)\n",
+				  size, shift);
+
+		qp->queue.direct.buf = pci_alloc_consistent(dev->pdev, size, &t);
+		if (!qp->queue.direct.buf)
+			goto err_out;
+
+		pci_unmap_addr_set(&qp->queue.direct, mapping, t);
+
+		memset(qp->queue.direct.buf, 0, size);
+
+		while (t & ((1 << shift) - 1)) {
+			--shift;
+			npages *= 2;
+		}
+
+		dma_list = kmalloc(npages * sizeof *dma_list, GFP_KERNEL);
+		if (!dma_list)
+			goto err_out_free;
+
+		for (i = 0; i < npages; ++i)
+			dma_list[i] = t + i * (1 << shift);
+	} else {
+		qp->is_direct = 0;
+		npages = size / PAGE_SIZE;
+		shift = PAGE_SHIFT;
+
+		if (0)
+			mthca_dbg(dev, "Creating indirect QP with %d pages\n", npages);
+
+		dma_list = kmalloc(npages * sizeof *dma_list, GFP_KERNEL);
+		if (!dma_list)
+			goto err_out;
+
+		qp->queue.page_list = kmalloc(npages *
+					      sizeof *qp->queue.page_list,
+					      GFP_KERNEL);
+		if (!qp->queue.page_list)
+			goto err_out;
+
+		for (i = 0; i < npages; ++i) {
+			qp->queue.page_list[i].buf =
+				pci_alloc_consistent(dev->pdev, PAGE_SIZE, &t);
+			if (!qp->queue.page_list[i].buf)
+				goto err_out_free;
+
+			memset(qp->queue.page_list[i].buf, 0, PAGE_SIZE);
+
+			pci_unmap_addr_set(&qp->queue.page_list[i], mapping, t);
+			dma_list[i] = t;
+		}
+	}
+
+	err = mthca_mr_alloc_phys(dev, pd->pd_num, dma_list, shift,
+				  npages, 0, size,
+				  MTHCA_MPT_FLAG_LOCAL_WRITE |
+				  MTHCA_MPT_FLAG_LOCAL_READ,
+				  &qp->mr);
+	if (err)
+		goto err_out_free;
+
+	kfree(dma_list);
+	return 0;
+
+ err_out_free:
+	if (qp->is_direct) {
+		pci_free_consistent(dev->pdev, size,
+				    qp->queue.direct.buf,
+				    pci_unmap_addr(&qp->queue.direct, mapping));
+	} else
+		for (i = 0; i < npages; ++i) {
+			if (qp->queue.page_list[i].buf)
+				pci_free_consistent(dev->pdev, PAGE_SIZE,
+						    qp->queue.page_list[i].buf,
+						    pci_unmap_addr(&qp->queue.page_list[i],
+								   mapping));
+
+		}
+
+ err_out:
+	kfree(qp->wrid);
+	kfree(dma_list);
+	return err;
+}
+
+static int mthca_alloc_qp_common(struct mthca_dev *dev,
+				 struct mthca_pd *pd,
+				 struct mthca_cq *send_cq,
+				 struct mthca_cq *recv_cq,
+				 enum ib_sig_type send_policy,
+				 enum ib_sig_type recv_policy,
+				 struct mthca_qp *qp)
+{
+	int err;
+
+	spin_lock_init(&qp->lock);
+	atomic_set(&qp->refcount, 1);
+	qp->state    	 = IB_QPS_RESET;
+	qp->sq.policy    = send_policy;
+	qp->rq.policy    = recv_policy;
+	qp->rq.cur       = 0;
+	qp->sq.cur       = 0;
+	qp->rq.next      = 0;
+	qp->sq.next      = 0;
+	qp->rq.last_comp = qp->rq.max - 1;
+	qp->sq.last_comp = qp->sq.max - 1;
+	qp->rq.last      = NULL;
+	qp->sq.last      = NULL;
+
+	err = mthca_alloc_wqe_buf(dev, pd, qp);
+	return err;
+}
+
+int mthca_alloc_qp(struct mthca_dev *dev,
+		   struct mthca_pd *pd,
+		   struct mthca_cq *send_cq,
+		   struct mthca_cq *recv_cq,
+		   enum ib_qp_type type,
+		   enum ib_sig_type send_policy,
+		   enum ib_sig_type recv_policy,
+		   struct mthca_qp *qp)
+{
+	int err;
+
+	switch (type) {
+	case IB_QPT_RC: qp->transport = RC; break;
+	case IB_QPT_UC: qp->transport = UC; break;
+	case IB_QPT_UD: qp->transport = UD; break;
+	default: return -EINVAL;
+	}
+
+	qp->qpn = mthca_alloc(&dev->qp_table.alloc);
+	if (qp->qpn == -1)
+		return -ENOMEM;
+
+	err = mthca_alloc_qp_common(dev, pd, send_cq, recv_cq,
+				    send_policy, recv_policy, qp);
+	if (err) {
+		mthca_free(&dev->qp_table.alloc, qp->qpn);
+		return err;
+	}
+
+	spin_lock_irq(&dev->qp_table.lock);
+	mthca_array_set(&dev->qp_table.qp,
+			qp->qpn & (dev->limits.num_qps - 1), qp);
+	spin_unlock_irq(&dev->qp_table.lock);
+
+	return 0;
+}
+
+int mthca_alloc_sqp(struct mthca_dev *dev,
+		    struct mthca_pd *pd,
+		    struct mthca_cq *send_cq,
+		    struct mthca_cq *recv_cq,
+		    enum ib_sig_type send_policy,
+		    enum ib_sig_type recv_policy,
+		    int qpn,
+		    int port,
+		    struct mthca_sqp *sqp)
+{
+	int err = 0;
+	u32 mqpn = qpn * 2 + dev->qp_table.sqp_start + port - 1;
+
+	sqp->header_buf_size = sqp->qp.sq.max * MTHCA_UD_HEADER_SIZE;
+	sqp->header_buf = dma_alloc_coherent(&dev->pdev->dev, sqp->header_buf_size,
+					     &sqp->header_dma, GFP_KERNEL);
+	if (!sqp->header_buf)
+		return -ENOMEM;
+
+	spin_lock_irq(&dev->qp_table.lock);
+	if (mthca_array_get(&dev->qp_table.qp, mqpn))
+		err = -EBUSY;
+	else
+		mthca_array_set(&dev->qp_table.qp, mqpn, sqp);
+	spin_unlock_irq(&dev->qp_table.lock);
+
+	if (err)
+		goto err_out;
+
+	sqp->port = port;
+	sqp->qp.qpn       = mqpn;
+	sqp->qp.transport = MLX;
+
+	err = mthca_alloc_qp_common(dev, pd, send_cq, recv_cq,
+				    send_policy, recv_policy,
+				    &sqp->qp);
+	if (err)
+		goto err_out_free;
+
+	atomic_inc(&pd->sqp_count);
+
+	return 0;
+
+ err_out_free:
+	spin_lock_irq(&dev->qp_table.lock);
+	mthca_array_clear(&dev->qp_table.qp, mqpn);
+	spin_unlock_irq(&dev->qp_table.lock);
+
+ err_out:
+	dma_free_coherent(&dev->pdev->dev, sqp->header_buf_size,
+			  sqp->header_buf, sqp->header_dma);
+
+	return err;
+}
+
+void mthca_free_qp(struct mthca_dev *dev,
+		   struct mthca_qp *qp)
+{
+	u8 status;
+	int size;
+	int i;
+
+	spin_lock_irq(&dev->qp_table.lock);
+	mthca_array_clear(&dev->qp_table.qp,
+			  qp->qpn & (dev->limits.num_qps - 1));
+	spin_unlock_irq(&dev->qp_table.lock);
+
+	atomic_dec(&qp->refcount);
+	wait_event(qp->wait, !atomic_read(&qp->refcount));
+
+	if (qp->state != IB_QPS_RESET)
+		mthca_MODIFY_QP(dev, MTHCA_TRANS_ANY2RST, qp->qpn, 0, NULL, 0, &status);
+
+	mthca_cq_clean(dev, to_mcq(qp->ibqp.send_cq)->cqn, qp->qpn);
+	if (qp->ibqp.send_cq != qp->ibqp.recv_cq)
+		mthca_cq_clean(dev, to_mcq(qp->ibqp.recv_cq)->cqn, qp->qpn);
+
+	mthca_free_mr(dev, &qp->mr);
+
+	size = PAGE_ALIGN(qp->send_wqe_offset +
+			  (qp->sq.max << qp->sq.wqe_shift));
+
+	if (qp->is_direct) {
+		pci_free_consistent(dev->pdev, size,
+				    qp->queue.direct.buf,
+				    pci_unmap_addr(&qp->queue.direct, mapping));
+	} else {
+		for (i = 0; i < size / PAGE_SIZE; ++i) {
+			pci_free_consistent(dev->pdev, PAGE_SIZE,
+					    qp->queue.page_list[i].buf,
+					    pci_unmap_addr(&qp->queue.page_list[i],
+							   mapping));
+		}
+	}
+
+	kfree(qp->wrid);
+
+	if (is_sqp(dev, qp)) {
+		atomic_dec(&(to_mpd(qp->ibqp.pd)->sqp_count));
+		dma_free_coherent(&dev->pdev->dev,
+				  to_msqp(qp)->header_buf_size,
+				  to_msqp(qp)->header_buf,
+				  to_msqp(qp)->header_dma);
+	}
+	else
+		mthca_free(&dev->qp_table.alloc, qp->qpn);
+}
+
+/* Create UD header for an MLX send and build a data segment for it */
+static int build_mlx_header(struct mthca_dev *dev, struct mthca_sqp *sqp,
+			    int ind, struct ib_send_wr *wr,
+			    struct mthca_mlx_seg *mlx,
+			    struct mthca_data_seg *data)
+{
+	int header_size;
+	int err;
+
+	ib_ud_header_init(256, /* assume a MAD */
+			  sqp->ud_header.grh_present,
+			  &sqp->ud_header);
+
+	err = mthca_read_ah(dev, to_mah(wr->wr.ud.ah), &sqp->ud_header);
+	if (err)
+		return err;
+	mlx->flags &= ~cpu_to_be32(MTHCA_NEXT_SOLICIT | 1);
+	mlx->flags |= cpu_to_be32((!sqp->qp.ibqp.qp_num ? MTHCA_MLX_VL15 : 0) |
+				  (sqp->ud_header.lrh.destination_lid == 0xffff ?
+				   MTHCA_MLX_SLR : 0) |
+				  (sqp->ud_header.lrh.service_level << 8));
+	mlx->rlid = sqp->ud_header.lrh.destination_lid;
+	mlx->vcrc = 0;
+
+	switch (wr->opcode) {
+	case IB_WR_SEND:
+		sqp->ud_header.bth.opcode = IB_OPCODE_UD_SEND_ONLY;
+		sqp->ud_header.immediate_present = 0;
+		break;
+	case IB_WR_SEND_WITH_IMM:
+		sqp->ud_header.bth.opcode = IB_OPCODE_UD_SEND_ONLY_WITH_IMMEDIATE;
+		sqp->ud_header.immediate_present = 1;
+		sqp->ud_header.immediate_data = wr->imm_data;
+		break;
+	default:
+		return -EINVAL;
+	}
+
+	sqp->ud_header.lrh.virtual_lane    = !sqp->qp.ibqp.qp_num ? 15 : 0;
+	if (sqp->ud_header.lrh.destination_lid == 0xffff)
+		sqp->ud_header.lrh.source_lid = 0xffff;
+	sqp->ud_header.bth.solicited_event = !!(wr->send_flags & IB_SEND_SOLICITED);
+	if (!sqp->qp.ibqp.qp_num)
+		ib_cached_pkey_get(&dev->ib_dev, sqp->port,
+				   sqp->pkey_index,
+				   &sqp->ud_header.bth.pkey);
+	else
+		ib_cached_pkey_get(&dev->ib_dev, sqp->port,
+				   wr->wr.ud.pkey_index,
+				   &sqp->ud_header.bth.pkey);
+	cpu_to_be16s(&sqp->ud_header.bth.pkey);
+	sqp->ud_header.bth.destination_qpn = cpu_to_be32(wr->wr.ud.remote_qpn);
+	sqp->ud_header.bth.psn = cpu_to_be32((sqp->send_psn++) & ((1 << 24) - 1));
+	sqp->ud_header.deth.qkey = cpu_to_be32(wr->wr.ud.remote_qkey & 0x80000000 ?
+					       sqp->qkey : wr->wr.ud.remote_qkey);
+	sqp->ud_header.deth.source_qpn = cpu_to_be32(sqp->qp.ibqp.qp_num);
+
+	header_size = ib_ud_header_pack(&sqp->ud_header,
+					sqp->header_buf +
+					ind * MTHCA_UD_HEADER_SIZE);
+
+	data->byte_count = cpu_to_be32(header_size);
+	data->lkey       = cpu_to_be32(to_mpd(sqp->qp.ibqp.pd)->ntmr.ibmr.lkey);
+	data->addr       = cpu_to_be64(sqp->header_dma +
+				       ind * MTHCA_UD_HEADER_SIZE);
+
+	return 0;
+}
+
+int mthca_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
+		    struct ib_send_wr **bad_wr)
+{
+	struct mthca_dev *dev = to_mdev(ibqp->device);
+	struct mthca_qp *qp = to_mqp(ibqp);
+	void *wqe;
+	void *prev_wqe;
+	unsigned long flags;
+	int err = 0;
+	int nreq;
+	int i;
+	int size;
+	int size0 = 0;
+	u32 f0 = 0;
+	int ind;
+	u8 op0 = 0;
+
+	static const u8 opcode[] = {
+		[IB_WR_SEND]                 = MTHCA_OPCODE_SEND,
+		[IB_WR_SEND_WITH_IMM]        = MTHCA_OPCODE_SEND_IMM,
+		[IB_WR_RDMA_WRITE]           = MTHCA_OPCODE_RDMA_WRITE,
+		[IB_WR_RDMA_WRITE_WITH_IMM]  = MTHCA_OPCODE_RDMA_WRITE_IMM,
+		[IB_WR_RDMA_READ]            = MTHCA_OPCODE_RDMA_READ,
+		[IB_WR_ATOMIC_CMP_AND_SWP]   = MTHCA_OPCODE_ATOMIC_CS,
+		[IB_WR_ATOMIC_FETCH_AND_ADD] = MTHCA_OPCODE_ATOMIC_FA,
+	};
+
+	spin_lock_irqsave(&qp->lock, flags);
+
+	/* XXX check that state is OK to post send */
+
+	ind = qp->sq.next;
+
+	for (nreq = 0; wr; ++nreq, wr = wr->next) {
+		if (qp->sq.cur + nreq >= qp->sq.max) {
+			mthca_err(dev, "SQ full (%d posted, %d max, %d nreq)\n",
+				  qp->sq.cur, qp->sq.max, nreq);
+			err = -ENOMEM;
+			*bad_wr = wr;
+			goto out;
+		}
+
+		wqe = get_send_wqe(qp, ind);
+		prev_wqe = qp->sq.last;
+		qp->sq.last = wqe;
+
+		((struct mthca_next_seg *) wqe)->nda_op = 0;
+		((struct mthca_next_seg *) wqe)->ee_nds = 0;
+		((struct mthca_next_seg *) wqe)->flags =
+			((wr->send_flags & IB_SEND_SIGNALED) ?
+			 cpu_to_be32(MTHCA_NEXT_CQ_UPDATE) : 0) |
+			((wr->send_flags & IB_SEND_SOLICITED) ?
+			 cpu_to_be32(MTHCA_NEXT_SOLICIT) : 0)   |
+			cpu_to_be32(1);
+		if (wr->opcode == IB_WR_SEND_WITH_IMM ||
+		    wr->opcode == IB_WR_RDMA_WRITE_WITH_IMM)
+			((struct mthca_next_seg *) wqe)->flags = wr->imm_data;
+
+		wqe += sizeof (struct mthca_next_seg);
+		size = sizeof (struct mthca_next_seg) / 16;
+
+		switch (qp->transport) {
+		case RC:
+			switch (wr->opcode) {
+			case IB_WR_ATOMIC_CMP_AND_SWP:
+			case IB_WR_ATOMIC_FETCH_AND_ADD:
+				((struct mthca_raddr_seg *) wqe)->raddr =
+					cpu_to_be64(wr->wr.atomic.remote_addr);
+				((struct mthca_raddr_seg *) wqe)->rkey =
+					cpu_to_be32(wr->wr.atomic.rkey);
+				((struct mthca_raddr_seg *) wqe)->reserved = 0;
+
+				wqe += sizeof (struct mthca_raddr_seg);
+
+				if (wr->opcode == IB_WR_ATOMIC_CMP_AND_SWP) {
+					((struct mthca_atomic_seg *) wqe)->swap_add =
+						cpu_to_be64(wr->wr.atomic.swap);
+					((struct mthca_atomic_seg *) wqe)->compare =
+						cpu_to_be64(wr->wr.atomic.compare_add);
+				} else {
+					((struct mthca_atomic_seg *) wqe)->swap_add =
+						cpu_to_be64(wr->wr.atomic.compare_add);
+					((struct mthca_atomic_seg *) wqe)->compare = 0;
+				}
+
+				wqe += sizeof (struct mthca_atomic_seg);
+				size += sizeof (struct mthca_raddr_seg) / 16 +
+					sizeof (struct mthca_atomic_seg);
+				break;
+
+			case IB_WR_RDMA_WRITE:
+			case IB_WR_RDMA_WRITE_WITH_IMM:
+			case IB_WR_RDMA_READ:
+				((struct mthca_raddr_seg *) wqe)->raddr =
+					cpu_to_be64(wr->wr.rdma.remote_addr);
+				((struct mthca_raddr_seg *) wqe)->rkey =
+					cpu_to_be32(wr->wr.rdma.rkey);
+				((struct mthca_raddr_seg *) wqe)->reserved = 0;
+				wqe += sizeof (struct mthca_raddr_seg);
+				size += sizeof (struct mthca_raddr_seg) / 16;
+				break;
+
+			default:
+				/* No extra segments required for sends */
+				break;
+			}
+
+		case UD:
+			((struct mthca_ud_seg *) wqe)->lkey =
+				cpu_to_be32(to_mah(wr->wr.ud.ah)->key);
+			((struct mthca_ud_seg *) wqe)->av_addr =
+				cpu_to_be64(to_mah(wr->wr.ud.ah)->avdma);
+			((struct mthca_ud_seg *) wqe)->dqpn =
+				cpu_to_be32(wr->wr.ud.remote_qpn);
+			((struct mthca_ud_seg *) wqe)->qkey =
+				cpu_to_be32(wr->wr.ud.remote_qkey);
+
+			wqe += sizeof (struct mthca_ud_seg);
+			size += sizeof (struct mthca_ud_seg) / 16;
+			break;
+
+		case MLX:
+			err = build_mlx_header(dev, to_msqp(qp), ind, wr,
+					       wqe - sizeof (struct mthca_next_seg),
+					       wqe);
+			if (err) {
+				*bad_wr = wr;
+				goto out;
+			}
+			wqe += sizeof (struct mthca_data_seg);
+			size += sizeof (struct mthca_data_seg) / 16;
+			break;
+		}
+
+		if (wr->num_sge > qp->sq.max_gs) {
+			mthca_err(dev, "too many gathers\n");
+			err = -EINVAL;
+			*bad_wr = wr;
+			goto out;
+		}
+
+		for (i = 0; i < wr->num_sge; ++i) {
+			((struct mthca_data_seg *) wqe)->byte_count =
+				cpu_to_be32(wr->sg_list[i].length);
+			((struct mthca_data_seg *) wqe)->lkey =
+				cpu_to_be32(wr->sg_list[i].lkey);
+			((struct mthca_data_seg *) wqe)->addr =
+				cpu_to_be64(wr->sg_list[i].addr);
+			wqe += sizeof (struct mthca_data_seg);
+			size += sizeof (struct mthca_data_seg) / 16;
+		}
+
+		/* Add one more inline data segment for ICRC */
+		if (qp->transport == MLX) {
+			((struct mthca_data_seg *) wqe)->byte_count =
+				cpu_to_be32((1 << 31) | 4);
+			((u32 *) wqe)[1] = 0;
+			wqe += sizeof (struct mthca_data_seg);
+			size += sizeof (struct mthca_data_seg) / 16;
+		}
+
+		qp->wrid[ind + qp->rq.max] = wr->wr_id;
+
+		if (wr->opcode >= ARRAY_SIZE(opcode)) {
+			mthca_err(dev, "opcode invalid\n");
+			err = -EINVAL;
+			*bad_wr = wr;
+			goto out;
+		}
+
+		if (prev_wqe) {
+			((struct mthca_next_seg *) prev_wqe)->nda_op =
+				cpu_to_be32(((ind << qp->sq.wqe_shift) +
+					     qp->send_wqe_offset) |
+					    opcode[wr->opcode]);
+			smp_wmb();
+			((struct mthca_next_seg *) prev_wqe)->ee_nds =
+				cpu_to_be32((size0 ? 0 : MTHCA_NEXT_DBD) | size);
+		}
+
+		if (!size0) {
+			size0 = size;
+			op0   = opcode[wr->opcode];
+		}
+
+		++ind;
+		if (unlikely(ind >= qp->sq.max))
+			ind -= qp->sq.max;
+	}
+
+out:
+	if (nreq) {
+		u32 doorbell[2];
+
+		doorbell[0] = cpu_to_be32(((qp->sq.next << qp->sq.wqe_shift) +
+					   qp->send_wqe_offset) | f0 | op0);
+		doorbell[1] = cpu_to_be32((qp->qpn << 8) | size0);
+
+		wmb();
+
+		mthca_write64(doorbell,
+			      dev->kar + MTHCA_SEND_DOORBELL,
+			      MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock));
+	}
+
+	qp->sq.cur += nreq;
+	qp->sq.next = ind;
+
+	spin_unlock_irqrestore(&qp->lock, flags);
+	return err;
+}
+
+int mthca_post_receive(struct ib_qp *ibqp, struct ib_recv_wr *wr,
+		       struct ib_recv_wr **bad_wr)
+{
+	struct mthca_dev *dev = to_mdev(ibqp->device);
+	struct mthca_qp *qp = to_mqp(ibqp);
+	unsigned long flags;
+	int err = 0;
+	int nreq;
+	int i;
+	int size;
+	int size0 = 0;
+	int ind;
+	void *wqe;
+	void *prev_wqe;
+
+	spin_lock_irqsave(&qp->lock, flags);
+
+	/* XXX check that state is OK to post receive */
+
+	ind = qp->rq.next;
+
+	for (nreq = 0; wr; ++nreq, wr = wr->next) {
+		if (qp->rq.cur + nreq >= qp->rq.max) {
+			mthca_err(dev, "RQ %06x full\n", qp->qpn);
+			err = -ENOMEM;
+			*bad_wr = wr;
+			goto out;
+		}
+
+		wqe = get_recv_wqe(qp, ind);
+		prev_wqe = qp->rq.last;
+		qp->rq.last = wqe;
+
+		((struct mthca_next_seg *) wqe)->nda_op = 0;
+		((struct mthca_next_seg *) wqe)->ee_nds =
+			cpu_to_be32(MTHCA_NEXT_DBD);
+		((struct mthca_next_seg *) wqe)->flags =
+			(wr->recv_flags & IB_RECV_SIGNALED) ?
+			cpu_to_be32(MTHCA_NEXT_CQ_UPDATE) : 0;
+
+		wqe += sizeof (struct mthca_next_seg);
+		size = sizeof (struct mthca_next_seg) / 16;
+
+		if (wr->num_sge > qp->rq.max_gs) {
+			err = -EINVAL;
+			*bad_wr = wr;
+			goto out;
+		}
+
+		for (i = 0; i < wr->num_sge; ++i) {
+			((struct mthca_data_seg *) wqe)->byte_count =
+				cpu_to_be32(wr->sg_list[i].length);
+			((struct mthca_data_seg *) wqe)->lkey =
+				cpu_to_be32(wr->sg_list[i].lkey);
+			((struct mthca_data_seg *) wqe)->addr =
+				cpu_to_be64(wr->sg_list[i].addr);
+			wqe += sizeof (struct mthca_data_seg);
+			size += sizeof (struct mthca_data_seg) / 16;
+		}
+
+		qp->wrid[ind] = wr->wr_id;
+
+		if (prev_wqe) {
+			((struct mthca_next_seg *) prev_wqe)->nda_op =
+				cpu_to_be32((ind << qp->rq.wqe_shift) | 1);
+			smp_wmb();
+			((struct mthca_next_seg *) prev_wqe)->ee_nds =
+				cpu_to_be32(MTHCA_NEXT_DBD | size);
+		}
+
+		if (!size0)
+			size0 = size;
+
+		++ind;
+		if (unlikely(ind >= qp->rq.max))
+			ind -= qp->rq.max;
+	}
+
+out:
+	if (nreq) {
+		u32 doorbell[2];
+
+		doorbell[0] = cpu_to_be32((qp->rq.next << qp->rq.wqe_shift) | size0);
+		doorbell[1] = cpu_to_be32((qp->qpn << 8) | nreq);
+
+		wmb();
+
+		mthca_write64(doorbell,
+			      dev->kar + MTHCA_RECEIVE_DOORBELL,
+			      MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock));
+	}
+
+	qp->rq.cur += nreq;
+	qp->rq.next = ind;
+
+	spin_unlock_irqrestore(&qp->lock, flags);
+	return err;
+}
+
+int mthca_free_err_wqe(struct mthca_qp *qp, int is_send,
+		       int index, int *dbd, u32 *new_wqe)
+{
+	struct mthca_next_seg *next;
+
+	if (is_send)
+		next = get_send_wqe(qp, index);
+	else
+		next = get_recv_wqe(qp, index);
+
+	*dbd = !!(next->ee_nds & cpu_to_be32(MTHCA_NEXT_DBD));
+	if (next->ee_nds & cpu_to_be32(0x3f))
+		*new_wqe = (next->nda_op & cpu_to_be32(~0x3f)) |
+			(next->ee_nds & cpu_to_be32(0x3f));
+	else
+		*new_wqe = 0;
+
+	return 0;
+}
+
+int __devinit mthca_init_qp_table(struct mthca_dev *dev)
+{
+	int err;
+	u8 status;
+	int i;
+
+	spin_lock_init(&dev->qp_table.lock);
+
+	/*
+	 * We reserve 2 extra QPs per port for the special QPs.  The
+	 * special QP for port 1 has to be even, so round up.
+	 */
+	dev->qp_table.sqp_start = (dev->limits.reserved_qps + 1) & ~1UL;
+	err = mthca_alloc_init(&dev->qp_table.alloc,
+			       dev->limits.num_qps,
+			       (1 << 24) - 1,
+			       dev->qp_table.sqp_start +
+			       MTHCA_MAX_PORTS * 2);
+	if (err)
+		return err;
+
+	err = mthca_array_init(&dev->qp_table.qp,
+			       dev->limits.num_qps);
+	if (err) {
+		mthca_alloc_cleanup(&dev->qp_table.alloc);
+		return err;
+	}
+
+	for (i = 0; i < 2; ++i) {
+		err = mthca_CONF_SPECIAL_QP(dev, i ? IB_QPT_GSI : IB_QPT_SMI,
+					    dev->qp_table.sqp_start + i * 2,
+					    &status);
+		if (err)
+			goto err_out;
+		if (status) {
+			mthca_warn(dev, "CONF_SPECIAL_QP returned "
+				   "status %02x, aborting.\n",
+				   status);
+			err = -EINVAL;
+			goto err_out;
+		}
+	}
+	return 0;
+
+ err_out:
+	for (i = 0; i < 2; ++i)
+		mthca_CONF_SPECIAL_QP(dev, i, 0, &status);
+
+	mthca_array_cleanup(&dev->qp_table.qp, dev->limits.num_qps);
+	mthca_alloc_cleanup(&dev->qp_table.alloc);
+
+	return err;
+}
+
+void __devexit mthca_cleanup_qp_table(struct mthca_dev *dev)
+{
+	int i;
+	u8 status;
+
+	for (i = 0; i < 2; ++i)
+		mthca_CONF_SPECIAL_QP(dev, i, 0, &status);
+
+	mthca_alloc_cleanup(&dev->qp_table.alloc);
+}
diff -Nru a/drivers/infiniband/hw/mthca/mthca_reset.c b/drivers/infiniband/hw/mthca/mthca_reset.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/hw/mthca/mthca_reset.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,232 @@
+/*
+ * Copyright (c) 2004 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: mthca_reset.c 1349 2004-12-16 21:09:43Z roland $
+ */
+
+#include <linux/config.h>
+#include <linux/init.h>
+#include <linux/errno.h>
+#include <linux/pci.h>
+#include <linux/delay.h>
+
+#include "mthca_dev.h"
+#include "mthca_cmd.h"
+
+int mthca_reset(struct mthca_dev *mdev)
+{
+	int i;
+	int err = 0;
+	u32 *hca_header    = NULL;
+	u32 *bridge_header = NULL;
+	struct pci_dev *bridge = NULL;
+
+#define MTHCA_RESET_OFFSET 0xf0010
+#define MTHCA_RESET_VALUE  cpu_to_be32(1)
+
+	/*
+	 * Reset the chip.  This is somewhat ugly because we have to
+	 * save off the PCI header before reset and then restore it
+	 * after the chip reboots.  We skip config space offsets 22
+	 * and 23 since those have a special meaning.
+	 *
+	 * To make matters worse, for Tavor (PCI-X HCA) we have to
+	 * find the associated bridge device and save off its PCI
+	 * header as well.
+	 */
+
+	if (mdev->hca_type == TAVOR) {
+		/* Look for the bridge -- its device ID will be 2 more
+		   than HCA's device ID. */
+		while ((bridge = pci_get_device(mdev->pdev->vendor,
+						mdev->pdev->device + 2,
+						bridge)) != NULL) {
+			if (bridge->hdr_type    == PCI_HEADER_TYPE_BRIDGE &&
+			    bridge->subordinate == mdev->pdev->bus) {
+				mthca_dbg(mdev, "Found bridge: %s (%s)\n",
+					  pci_pretty_name(bridge), pci_name(bridge));
+				break;
+			}
+		}
+
+		if (!bridge) {
+			/*
+			 * Didn't find a bridge for a Tavor device --
+			 * assume we're in no-bridge mode and hope for
+			 * the best.
+			 */
+			mthca_warn(mdev, "No bridge found for %s (%s)\n",
+				  pci_pretty_name(mdev->pdev), pci_name(mdev->pdev));
+		}
+
+	}
+
+	/* For Arbel do we need to save off the full 4K PCI Express header?? */
+	hca_header = kmalloc(256, GFP_KERNEL);
+	if (!hca_header) {
+		err = -ENOMEM;
+		mthca_err(mdev, "Couldn't allocate memory to save HCA "
+			  "PCI header, aborting.\n");
+		goto out;
+	}
+
+	for (i = 0; i < 64; ++i) {
+		if (i == 22 || i == 23)
+			continue;
+		if (pci_read_config_dword(mdev->pdev, i * 4, hca_header + i)) {
+			err = -ENODEV;
+			mthca_err(mdev, "Couldn't save HCA "
+				  "PCI header, aborting.\n");
+			goto out;
+		}
+	}
+
+	if (bridge) {
+		bridge_header = kmalloc(256, GFP_KERNEL);
+		if (!bridge_header) {
+			err = -ENOMEM;
+			mthca_err(mdev, "Couldn't allocate memory to save HCA "
+				  "bridge PCI header, aborting.\n");
+			goto out;
+		}
+
+		for (i = 0; i < 64; ++i) {
+			if (i == 22 || i == 23)
+				continue;
+			if (pci_read_config_dword(bridge, i * 4, bridge_header + i)) {
+				err = -ENODEV;
+				mthca_err(mdev, "Couldn't save HCA bridge "
+					  "PCI header, aborting.\n");
+				goto out;
+			}
+		}
+	}
+
+	/* actually hit reset */
+	{
+		void __iomem *reset = ioremap(pci_resource_start(mdev->pdev, 0) +
+					      MTHCA_RESET_OFFSET, 4);
+
+		if (!reset) {
+			err = -ENOMEM;
+			mthca_err(mdev, "Couldn't map HCA reset register, "
+				  "aborting.\n");
+			goto out;
+		}
+
+		writel(MTHCA_RESET_VALUE, reset);
+		iounmap(reset);
+	}
+
+	/* Docs say to wait one second before accessing device */
+	msleep(1000);
+
+	/* Now wait for PCI device to start responding again */
+	{
+		u32 v;
+		int c = 0;
+
+		for (c = 0; c < 100; ++c) {
+			if (pci_read_config_dword(bridge ? bridge : mdev->pdev, 0, &v)) {
+				err = -ENODEV;
+				mthca_err(mdev, "Couldn't access HCA after reset, "
+					  "aborting.\n");
+				goto out;
+			}
+
+			if (v != 0xffffffff)
+				goto good;
+
+			msleep(100);
+		}
+
+		err = -ENODEV;
+		mthca_err(mdev, "PCI device did not come back after reset, "
+			  "aborting.\n");
+		goto out;
+	}
+
+good:
+	/* Now restore the PCI headers */
+	if (bridge) {
+		/*
+		 * Bridge control register is at 0x3e, so we'll
+		 * naturally restore it last in this loop.
+		 */
+		for (i = 0; i < 16; ++i) {
+			if (i * 4 == PCI_COMMAND)
+				continue;
+
+			if (pci_write_config_dword(bridge, i * 4, bridge_header[i])) {
+				err = -ENODEV;
+				mthca_err(mdev, "Couldn't restore HCA bridge reg %x, "
+					  "aborting.\n", i);
+				goto out;
+			}
+		}
+
+		if (pci_write_config_dword(bridge, PCI_COMMAND,
+					   bridge_header[PCI_COMMAND / 4])) {
+			err = -ENODEV;
+			mthca_err(mdev, "Couldn't restore HCA bridge COMMAND, "
+				  "aborting.\n");
+			goto out;
+		}
+	}
+
+	for (i = 0; i < 16; ++i) {
+		if (i * 4 == PCI_COMMAND)
+			continue;
+
+		if (pci_write_config_dword(mdev->pdev, i * 4, hca_header[i])) {
+			err = -ENODEV;
+			mthca_err(mdev, "Couldn't restore HCA reg %x, "
+				  "aborting.\n", i);
+			goto out;
+		}
+	}
+
+	if (pci_write_config_dword(mdev->pdev, PCI_COMMAND,
+				   hca_header[PCI_COMMAND / 4])) {
+		err = -ENODEV;
+		mthca_err(mdev, "Couldn't restore HCA COMMAND, "
+			  "aborting.\n");
+		goto out;
+	}
+
+out:
+	if (bridge)
+		pci_dev_put(bridge);
+	kfree(bridge_header);
+	kfree(hca_header);
+
+	return err;
+}
diff -Nru a/drivers/infiniband/include/ib_cache.h b/drivers/infiniband/include/ib_cache.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/include/ib_cache.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2004 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: ib_cache.h 1349 2004-12-16 21:09:43Z roland $
+ */
+
+#ifndef _IB_CACHE_H
+#define _IB_CACHE_H
+
+#include <ib_verbs.h>
+
+int ib_cached_gid_get(struct ib_device    *device,
+		      u8                   port,
+		      int                  index,
+		      union ib_gid        *gid);
+int ib_cached_pkey_get(struct ib_device    *device_handle,
+		       u8                   port,
+		       int                  index,
+		       u16                 *pkey);
+int ib_cached_pkey_find(struct ib_device    *device,
+			u8                   port,
+			u16                  pkey,
+			u16                 *index);
+
+#endif /* _IB_CACHE_H */
diff -Nru a/drivers/infiniband/include/ib_fmr_pool.h b/drivers/infiniband/include/ib_fmr_pool.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/include/ib_fmr_pool.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2004 Topspin Corporation.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: ib_fmr_pool.h 1349 2004-12-16 21:09:43Z roland $
+ */
+
+#if !defined(IB_FMR_POOL_H)
+#define IB_FMR_POOL_H
+
+#include <ib_verbs.h>
+
+struct ib_fmr_pool;
+
+/**
+ * struct ib_fmr_pool_param - Parameters for creating FMR pool
+ * @max_pages_per_fmr:Maximum number of pages per map request.
+ * @access:Access flags for FMRs in pool.
+ * @pool_size:Number of FMRs to allocate for pool.
+ * @dirty_watermark:Flush is triggered when @dirty_watermark dirty
+ *     FMRs are present.
+ * @flush_function:Callback called when unmapped FMRs are flushed and
+ *     more FMRs are possibly available for mapping
+ * @flush_arg:Context passed to user's flush function.
+ * @cache:If set, FMRs may be reused after unmapping for identical map
+ *     requests.
+ */
+struct ib_fmr_pool_param {
+	int                     max_pages_per_fmr;
+	enum ib_access_flags    access;
+	int                     pool_size;
+	int                     dirty_watermark;
+	void                  (*flush_function)(struct ib_fmr_pool *pool,
+						void *              arg);
+	void                   *flush_arg;
+	unsigned                cache:1;
+};
+
+struct ib_pool_fmr {
+	struct ib_fmr      *fmr;
+	struct ib_fmr_pool *pool;
+	struct list_head    list;
+	struct hlist_node   cache_node;
+	int                 ref_count;
+	int                 remap_count;
+	u64                 io_virtual_address;
+	int                 page_list_len;
+	u64                 page_list[0];
+};
+
+struct ib_fmr_pool *ib_create_fmr_pool(struct ib_pd             *pd,
+				       struct ib_fmr_pool_param *params);
+
+int ib_destroy_fmr_pool(struct ib_fmr_pool *pool);
+
+int ib_flush_fmr_pool(struct ib_fmr_pool *pool);
+
+struct ib_pool_fmr *ib_fmr_pool_map_phys(struct ib_fmr_pool *pool_handle,
+					 u64                *page_list,
+					 int                 list_len,
+					 u64                *io_virtual_address);
+
+int ib_fmr_pool_unmap(struct ib_pool_fmr *fmr);
+
+#endif /* IB_FMR_POOL_H */
diff -Nru a/drivers/infiniband/include/ib_mad.h b/drivers/infiniband/include/ib_mad.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/include/ib_mad.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,404 @@
+/*
+ * Copyright (c) 2004 Mellanox Technologies Ltd.  All rights reserved.
+ * Copyright (c) 2004 Infinicon Corporation.  All rights reserved.
+ * Copyright (c) 2004 Intel Corporation.  All rights reserved.
+ * Copyright (c) 2004 Topspin Corporation.  All rights reserved.
+ * Copyright (c) 2004 Voltaire Corporation.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: ib_mad.h 1389 2004-12-27 22:56:47Z roland $
+ */
+
+#if !defined( IB_MAD_H )
+#define IB_MAD_H
+
+#include <ib_verbs.h>
+
+/* Management base version */
+#define IB_MGMT_BASE_VERSION			1
+
+/* Management classes */
+#define IB_MGMT_CLASS_SUBN_LID_ROUTED		0x01
+#define IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE	0x81
+#define IB_MGMT_CLASS_SUBN_ADM			0x03
+#define IB_MGMT_CLASS_PERF_MGMT			0x04
+#define IB_MGMT_CLASS_BM			0x05
+#define IB_MGMT_CLASS_DEVICE_MGMT		0x06
+#define IB_MGMT_CLASS_CM			0x07
+#define IB_MGMT_CLASS_SNMP			0x08
+#define IB_MGMT_CLASS_VENDOR_RANGE2_START	0x30
+#define IB_MGMT_CLASS_VENDOR_RANGE2_END		0x4F
+
+/* Management methods */
+#define IB_MGMT_METHOD_GET			0x01
+#define IB_MGMT_METHOD_SET			0x02
+#define IB_MGMT_METHOD_GET_RESP			0x81
+#define IB_MGMT_METHOD_SEND			0x03
+#define IB_MGMT_METHOD_TRAP			0x05
+#define IB_MGMT_METHOD_REPORT			0x06
+#define IB_MGMT_METHOD_REPORT_RESP		0x86
+#define IB_MGMT_METHOD_TRAP_REPRESS		0x07
+
+#define IB_MGMT_METHOD_RESP			0x80
+
+#define IB_MGMT_MAX_METHODS			128
+
+#define IB_QP0		0
+#define IB_QP1		__constant_htonl(1)
+#define IB_QP1_QKEY	0x80010000
+
+struct ib_grh {
+	u32		version_tclass_flow;
+	u16		paylen;
+	u8		next_hdr;
+	u8		hop_limit;
+	union ib_gid	sgid;
+	union ib_gid	dgid;
+} __attribute__ ((packed));
+
+struct ib_mad_hdr {
+	u8	base_version;
+	u8	mgmt_class;
+	u8	class_version;
+	u8	method;
+	u16	status;
+	u16	class_specific;
+	u64	tid;
+	u16	attr_id;
+	u16	resv;
+	u32	attr_mod;
+} __attribute__ ((packed));
+
+struct ib_rmpp_hdr {
+	u8	rmpp_version;
+	u8	rmpp_type;
+	u8	rmpp_rtime_flags;
+	u8	rmpp_status;
+	u32	seg_num;
+	u32	paylen_newwin;
+} __attribute__ ((packed));
+
+struct ib_mad {
+	struct ib_mad_hdr	mad_hdr;
+	u8			data[232];
+} __attribute__ ((packed));
+
+struct ib_rmpp_mad {
+	struct ib_mad_hdr	mad_hdr;
+	struct ib_rmpp_hdr	rmpp_hdr;
+	u8			data[220];
+} __attribute__ ((packed));
+
+struct ib_vendor_mad {
+	struct ib_mad_hdr	mad_hdr;
+	struct ib_rmpp_hdr	rmpp_hdr;
+	u8			reserved;
+	u8			oui[3];
+	u8			data[216];
+} __attribute__ ((packed));
+
+struct ib_mad_agent;
+struct ib_mad_send_wc;
+struct ib_mad_recv_wc;
+
+/**
+ * ib_mad_send_handler - callback handler for a sent MAD.
+ * @mad_agent: MAD agent that sent the MAD.
+ * @mad_send_wc: Send work completion information on the sent MAD.
+ */
+typedef void (*ib_mad_send_handler)(struct ib_mad_agent *mad_agent,
+				    struct ib_mad_send_wc *mad_send_wc);
+
+/**
+ * ib_mad_snoop_handler - Callback handler for snooping sent MADs.
+ * @mad_agent: MAD agent that snooped the MAD.
+ * @send_wr: Work request information on the sent MAD.
+ * @mad_send_wc: Work completion information on the sent MAD.  Valid
+ *   only for snooping that occurs on a send completion.
+ *
+ * Clients snooping MADs should not modify data referenced by the @send_wr
+ * or @mad_send_wc.
+ */
+typedef void (*ib_mad_snoop_handler)(struct ib_mad_agent *mad_agent,
+				     struct ib_send_wr *send_wr,
+				     struct ib_mad_send_wc *mad_send_wc);
+
+/**
+ * ib_mad_recv_handler - callback handler for a received MAD.
+ * @mad_agent: MAD agent requesting the received MAD.
+ * @mad_recv_wc: Received work completion information on the received MAD.
+ *
+ * MADs received in response to a send request operation will be handed to
+ * the user after the send operation completes.  All data buffers given
+ * to registered agents through this routine are owned by the receiving
+ * client, except for snooping agents.  Clients snooping MADs should not
+ * modify the data referenced by @mad_recv_wc.
+ */
+typedef void (*ib_mad_recv_handler)(struct ib_mad_agent *mad_agent,
+				    struct ib_mad_recv_wc *mad_recv_wc);
+
+/**
+ * ib_mad_agent - Used to track MAD registration with the access layer.
+ * @device: Reference to device registration is on.
+ * @qp: Reference to QP used for sending and receiving MADs.
+ * @recv_handler: Callback handler for a received MAD.
+ * @send_handler: Callback handler for a sent MAD.
+ * @snoop_handler: Callback handler for snooped sent MADs.
+ * @context: User-specified context associated with this registration.
+ * @hi_tid: Access layer assigned transaction ID for this client.
+ *   Unsolicited MADs sent by this client will have the upper 32-bits
+ *   of their TID set to this value.
+ * @port_num: Port number on which QP is registered
+ */
+struct ib_mad_agent {
+	struct ib_device	*device;
+	struct ib_qp		*qp;
+	ib_mad_recv_handler	recv_handler;
+	ib_mad_send_handler	send_handler;
+	ib_mad_snoop_handler	snoop_handler;
+	void			*context;
+	u32			hi_tid;
+	u8			port_num;
+};
+
+/**
+ * ib_mad_send_wc - MAD send completion information.
+ * @wr_id: Work request identifier associated with the send MAD request.
+ * @status: Completion status.
+ * @vendor_err: Optional vendor error information returned with a failed
+ *   request.
+ */
+struct ib_mad_send_wc {
+	u64			wr_id;
+	enum ib_wc_status	status;
+	u32			vendor_err;
+};
+
+/**
+ * ib_mad_recv_buf - received MAD buffer information.
+ * @list: Reference to next data buffer for a received RMPP MAD.
+ * @grh: References a data buffer containing the global route header.
+ *   The data refereced by this buffer is only valid if the GRH is
+ *   valid.
+ * @mad: References the start of the received MAD.
+ */
+struct ib_mad_recv_buf {
+	struct list_head	list;
+	struct ib_grh		*grh;
+	struct ib_mad		*mad;
+};
+
+/**
+ * ib_mad_recv_wc - received MAD information.
+ * @wc: Completion information for the received data.
+ * @recv_buf: Specifies the location of the received data buffer(s).
+ * @mad_len: The length of the received MAD, without duplicated headers.
+ *
+ * For received response, the wr_id field of the wc is set to the wr_id
+ *   for the corresponding send request.
+ */
+struct ib_mad_recv_wc {
+	struct ib_wc		*wc;
+	struct ib_mad_recv_buf	recv_buf;
+	int			mad_len;
+};
+
+/**
+ * ib_mad_reg_req - MAD registration request
+ * @mgmt_class: Indicates which management class of MADs should be receive
+ *   by the caller.  This field is only required if the user wishes to
+ *   receive unsolicited MADs, otherwise it should be 0.
+ * @mgmt_class_version: Indicates which version of MADs for the given
+ *   management class to receive.
+ * @oui: Indicates IEEE OUI when mgmt_class is a vendor class
+ *   in the range from 0x30 to 0x4f. Otherwise not used.
+ * @method_mask: The caller will receive unsolicited MADs for any method
+ *   where @method_mask = 1.
+ */
+struct ib_mad_reg_req {
+	u8	mgmt_class;
+	u8	mgmt_class_version;
+	u8	oui[3];
+	DECLARE_BITMAP(method_mask, IB_MGMT_MAX_METHODS);
+};
+
+/**
+ * ib_register_mad_agent - Register to send/receive MADs.
+ * @device: The device to register with.
+ * @port_num: The port on the specified device to use.
+ * @qp_type: Specifies which QP to access.  Must be either
+ *   IB_QPT_SMI or IB_QPT_GSI.
+ * @mad_reg_req: Specifies which unsolicited MADs should be received
+ *   by the caller.  This parameter may be NULL if the caller only
+ *   wishes to receive solicited responses.
+ * @rmpp_version: If set, indicates that the client will send
+ *   and receive MADs that contain the RMPP header for the given version.
+ *   If set to 0, indicates that RMPP is not used by this client.
+ * @send_handler: The completion callback routine invoked after a send
+ *   request has completed.
+ * @recv_handler: The completion callback routine invoked for a received
+ *   MAD.
+ * @context: User specified context associated with the registration.
+ */
+struct ib_mad_agent *ib_register_mad_agent(struct ib_device *device,
+					   u8 port_num,
+					   enum ib_qp_type qp_type,
+					   struct ib_mad_reg_req *mad_reg_req,
+					   u8 rmpp_version,
+					   ib_mad_send_handler send_handler,
+					   ib_mad_recv_handler recv_handler,
+					   void *context);
+
+enum ib_mad_snoop_flags {
+	/*IB_MAD_SNOOP_POSTED_SENDS	   = 1,*/
+	/*IB_MAD_SNOOP_RMPP_SENDS	   = (1<<1),*/
+	IB_MAD_SNOOP_SEND_COMPLETIONS	   = (1<<2),
+	/*IB_MAD_SNOOP_RMPP_SEND_COMPLETIONS = (1<<3),*/
+	IB_MAD_SNOOP_RECVS		   = (1<<4)
+	/*IB_MAD_SNOOP_RMPP_RECVS	   = (1<<5),*/
+	/*IB_MAD_SNOOP_REDIRECTED_QPS	   = (1<<6)*/
+};
+
+/**
+ * ib_register_mad_snoop - Register to snoop sent and received MADs.
+ * @device: The device to register with.
+ * @port_num: The port on the specified device to use.
+ * @qp_type: Specifies which QP traffic to snoop.  Must be either
+ *   IB_QPT_SMI or IB_QPT_GSI.
+ * @mad_snoop_flags: Specifies information where snooping occurs.
+ * @send_handler: The callback routine invoked for a snooped send.
+ * @recv_handler: The callback routine invoked for a snooped receive.
+ * @context: User specified context associated with the registration.
+ */
+struct ib_mad_agent *ib_register_mad_snoop(struct ib_device *device,
+					   u8 port_num,
+					   enum ib_qp_type qp_type,
+					   int mad_snoop_flags,
+					   ib_mad_snoop_handler snoop_handler,
+					   ib_mad_recv_handler recv_handler,
+					   void *context);
+
+/**
+ * ib_unregister_mad_agent - Unregisters a client from using MAD services.
+ * @mad_agent: Corresponding MAD registration request to deregister.
+ *
+ * After invoking this routine, MAD services are no longer usable by the
+ * client on the associated QP.
+ */
+int ib_unregister_mad_agent(struct ib_mad_agent *mad_agent);
+
+/**
+ * ib_post_send_mad - Posts MAD(s) to the send queue of the QP associated
+ *   with the registered client.
+ * @mad_agent: Specifies the associated registration to post the send to.
+ * @send_wr: Specifies the information needed to send the MAD(s).
+ * @bad_send_wr: Specifies the MAD on which an error was encountered.
+ *
+ * Sent MADs are not guaranteed to complete in the order that they were posted.
+ */
+int ib_post_send_mad(struct ib_mad_agent *mad_agent,
+		     struct ib_send_wr *send_wr,
+		     struct ib_send_wr **bad_send_wr);
+
+/**
+ * ib_coalesce_recv_mad - Coalesces received MAD data into a single buffer.
+ * @mad_recv_wc: Work completion information for a received MAD.
+ * @buf: User-provided data buffer to receive the coalesced buffers.  The
+ *   referenced buffer should be at least the size of the mad_len specified
+ *   by @mad_recv_wc.
+ *
+ * This call copies a chain of received RMPP MADs into a single data buffer,
+ * removing duplicated headers.
+ */
+void ib_coalesce_recv_mad(struct ib_mad_recv_wc *mad_recv_wc,
+			  void *buf);
+
+/**
+ * ib_free_recv_mad - Returns data buffers used to receive a MAD to the
+ *   access layer.
+ * @mad_recv_wc: Work completion information for a received MAD.
+ *
+ * Clients receiving MADs through their ib_mad_recv_handler must call this
+ * routine to return the work completion buffers to the access layer.
+ */
+void ib_free_recv_mad(struct ib_mad_recv_wc *mad_recv_wc);
+
+/**
+ * ib_cancel_mad - Cancels an outstanding send MAD operation.
+ * @mad_agent: Specifies the registration associated with sent MAD.
+ * @wr_id: Indicates the work request identifier of the MAD to cancel.
+ *
+ * MADs will be returned to the user through the corresponding
+ * ib_mad_send_handler.
+ */
+void ib_cancel_mad(struct ib_mad_agent *mad_agent,
+		   u64 wr_id);
+
+/**
+ * ib_redirect_mad_qp - Registers a QP for MAD services.
+ * @qp: Reference to a QP that requires MAD services.
+ * @rmpp_version: If set, indicates that the client will send
+ *   and receive MADs that contain the RMPP header for the given version.
+ *   If set to 0, indicates that RMPP is not used by this client.
+ * @send_handler: The completion callback routine invoked after a send
+ *   request has completed.
+ * @recv_handler: The completion callback routine invoked for a received
+ *   MAD.
+ * @context: User specified context associated with the registration.
+ *
+ * Use of this call allows clients to use MAD services, such as RMPP,
+ * on user-owned QPs.  After calling this routine, users may send
+ * MADs on the specified QP by calling ib_mad_post_send.
+ */
+struct ib_mad_agent *ib_redirect_mad_qp(struct ib_qp *qp,
+					u8 rmpp_version,
+					ib_mad_send_handler send_handler,
+					ib_mad_recv_handler recv_handler,
+					void *context);
+
+/**
+ * ib_process_mad_wc - Processes a work completion associated with a
+ *   MAD sent or received on a redirected QP.
+ * @mad_agent: Specifies the registered MAD service using the redirected QP.
+ * @wc: References a work completion associated with a sent or received
+ *   MAD segment.
+ *
+ * This routine is used to complete or continue processing on a MAD request.
+ * If the work completion is associated with a send operation, calling
+ * this routine is required to continue an RMPP transfer or to wait for a
+ * corresponding response, if it is a request.  If the work completion is
+ * associated with a receive operation, calling this routine is required to
+ * process an inbound or outbound RMPP transfer, or to match a response MAD
+ * with its corresponding request.
+ */
+int ib_process_mad_wc(struct ib_mad_agent *mad_agent,
+		      struct ib_wc *wc);
+
+#endif /* IB_MAD_H */
diff -Nru a/drivers/infiniband/include/ib_pack.h b/drivers/infiniband/include/ib_pack.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/include/ib_pack.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,245 @@
+/*
+ * Copyright (c) 2004 Topspin Corporation.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: ib_pack.h 1349 2004-12-16 21:09:43Z roland $
+ */
+
+#ifndef IB_PACK_H
+#define IB_PACK_H
+
+#include <ib_verbs.h>
+
+enum {
+	IB_LRH_BYTES  = 8,
+	IB_GRH_BYTES  = 40,
+	IB_BTH_BYTES  = 12,
+	IB_DETH_BYTES = 8
+};
+
+struct ib_field {
+	size_t struct_offset_bytes;
+	size_t struct_size_bytes;
+	int    offset_words;
+	int    offset_bits;
+	int    size_bits;
+	char  *field_name;
+};
+
+#define RESERVED \
+	.field_name          = "reserved"
+
+/*
+ * This macro cleans up the definitions of constants for BTH opcodes.
+ * It is used to define constants such as IB_OPCODE_UD_SEND_ONLY,
+ * which becomes IB_OPCODE_UD + IB_OPCODE_SEND_ONLY, and this gives
+ * the correct value.
+ *
+ * In short, user code should use the constants defined using the
+ * macro rather than worrying about adding together other constants.
+*/
+#define IB_OPCODE(transport, op) \
+	IB_OPCODE_ ## transport ## _ ## op = \
+		IB_OPCODE_ ## transport + IB_OPCODE_ ## op
+
+enum {
+	/* transport types -- just used to define real constants */
+	IB_OPCODE_RC                                = 0x00,
+	IB_OPCODE_UC                                = 0x20,
+	IB_OPCODE_RD                                = 0x40,
+	IB_OPCODE_UD                                = 0x60,
+
+	/* operations -- just used to define real constants */
+	IB_OPCODE_SEND_FIRST                        = 0x00,
+	IB_OPCODE_SEND_MIDDLE                       = 0x01,
+	IB_OPCODE_SEND_LAST                         = 0x02,
+	IB_OPCODE_SEND_LAST_WITH_IMMEDIATE          = 0x03,
+	IB_OPCODE_SEND_ONLY                         = 0x04,
+	IB_OPCODE_SEND_ONLY_WITH_IMMEDIATE          = 0x05,
+	IB_OPCODE_RDMA_WRITE_FIRST                  = 0x06,
+	IB_OPCODE_RDMA_WRITE_MIDDLE                 = 0x07,
+	IB_OPCODE_RDMA_WRITE_LAST                   = 0x08,
+	IB_OPCODE_RDMA_WRITE_LAST_WITH_IMMEDIATE    = 0x09,
+	IB_OPCODE_RDMA_WRITE_ONLY                   = 0x0a,
+	IB_OPCODE_RDMA_WRITE_ONLY_WITH_IMMEDIATE    = 0x0b,
+	IB_OPCODE_RDMA_READ_REQUEST                 = 0x0c,
+	IB_OPCODE_RDMA_READ_RESPONSE_FIRST          = 0x0d,
+	IB_OPCODE_RDMA_READ_RESPONSE_MIDDLE         = 0x0e,
+	IB_OPCODE_RDMA_READ_RESPONSE_LAST           = 0x0f,
+	IB_OPCODE_RDMA_READ_RESPONSE_ONLY           = 0x10,
+	IB_OPCODE_ACKNOWLEDGE                       = 0x11,
+	IB_OPCODE_ATOMIC_ACKNOWLEDGE                = 0x12,
+	IB_OPCODE_COMPARE_SWAP                      = 0x13,
+	IB_OPCODE_FETCH_ADD                         = 0x14,
+
+	/* real constants follow -- see comment about above IB_OPCODE()
+	   macro for more details */
+
+	/* RC */
+	IB_OPCODE(RC, SEND_FIRST),
+	IB_OPCODE(RC, SEND_MIDDLE),
+	IB_OPCODE(RC, SEND_LAST),
+	IB_OPCODE(RC, SEND_LAST_WITH_IMMEDIATE),
+	IB_OPCODE(RC, SEND_ONLY),
+	IB_OPCODE(RC, SEND_ONLY_WITH_IMMEDIATE),
+	IB_OPCODE(RC, RDMA_WRITE_FIRST),
+	IB_OPCODE(RC, RDMA_WRITE_MIDDLE),
+	IB_OPCODE(RC, RDMA_WRITE_LAST),
+	IB_OPCODE(RC, RDMA_WRITE_LAST_WITH_IMMEDIATE),
+	IB_OPCODE(RC, RDMA_WRITE_ONLY),
+	IB_OPCODE(RC, RDMA_WRITE_ONLY_WITH_IMMEDIATE),
+	IB_OPCODE(RC, RDMA_READ_REQUEST),
+	IB_OPCODE(RC, RDMA_READ_RESPONSE_FIRST),
+	IB_OPCODE(RC, RDMA_READ_RESPONSE_MIDDLE),
+	IB_OPCODE(RC, RDMA_READ_RESPONSE_LAST),
+	IB_OPCODE(RC, RDMA_READ_RESPONSE_ONLY),
+	IB_OPCODE(RC, ACKNOWLEDGE),
+	IB_OPCODE(RC, ATOMIC_ACKNOWLEDGE),
+	IB_OPCODE(RC, COMPARE_SWAP),
+	IB_OPCODE(RC, FETCH_ADD),
+
+	/* UC */
+	IB_OPCODE(UC, SEND_FIRST),
+	IB_OPCODE(UC, SEND_MIDDLE),
+	IB_OPCODE(UC, SEND_LAST),
+	IB_OPCODE(UC, SEND_LAST_WITH_IMMEDIATE),
+	IB_OPCODE(UC, SEND_ONLY),
+	IB_OPCODE(UC, SEND_ONLY_WITH_IMMEDIATE),
+	IB_OPCODE(UC, RDMA_WRITE_FIRST),
+	IB_OPCODE(UC, RDMA_WRITE_MIDDLE),
+	IB_OPCODE(UC, RDMA_WRITE_LAST),
+	IB_OPCODE(UC, RDMA_WRITE_LAST_WITH_IMMEDIATE),
+	IB_OPCODE(UC, RDMA_WRITE_ONLY),
+	IB_OPCODE(UC, RDMA_WRITE_ONLY_WITH_IMMEDIATE),
+
+	/* RD */
+	IB_OPCODE(RD, SEND_FIRST),
+	IB_OPCODE(RD, SEND_MIDDLE),
+	IB_OPCODE(RD, SEND_LAST),
+	IB_OPCODE(RD, SEND_LAST_WITH_IMMEDIATE),
+	IB_OPCODE(RD, SEND_ONLY),
+	IB_OPCODE(RD, SEND_ONLY_WITH_IMMEDIATE),
+	IB_OPCODE(RD, RDMA_WRITE_FIRST),
+	IB_OPCODE(RD, RDMA_WRITE_MIDDLE),
+	IB_OPCODE(RD, RDMA_WRITE_LAST),
+	IB_OPCODE(RD, RDMA_WRITE_LAST_WITH_IMMEDIATE),
+	IB_OPCODE(RD, RDMA_WRITE_ONLY),
+	IB_OPCODE(RD, RDMA_WRITE_ONLY_WITH_IMMEDIATE),
+	IB_OPCODE(RD, RDMA_READ_REQUEST),
+	IB_OPCODE(RD, RDMA_READ_RESPONSE_FIRST),
+	IB_OPCODE(RD, RDMA_READ_RESPONSE_MIDDLE),
+	IB_OPCODE(RD, RDMA_READ_RESPONSE_LAST),
+	IB_OPCODE(RD, RDMA_READ_RESPONSE_ONLY),
+	IB_OPCODE(RD, ACKNOWLEDGE),
+	IB_OPCODE(RD, ATOMIC_ACKNOWLEDGE),
+	IB_OPCODE(RD, COMPARE_SWAP),
+	IB_OPCODE(RD, FETCH_ADD),
+
+	/* UD */
+	IB_OPCODE(UD, SEND_ONLY),
+	IB_OPCODE(UD, SEND_ONLY_WITH_IMMEDIATE)
+};
+
+enum {
+	IB_LNH_RAW        = 0,
+	IB_LNH_IP         = 1,
+	IB_LNH_IBA_LOCAL  = 2,
+	IB_LNH_IBA_GLOBAL = 3
+};
+
+struct ib_unpacked_lrh {
+	u8        virtual_lane;
+	u8        link_version;
+	u8        service_level;
+	u8        link_next_header;
+	__be16    destination_lid;
+	__be16    packet_length;
+	__be16    source_lid;
+};
+
+struct ib_unpacked_grh {
+	u8    	     ip_version;
+	u8    	     traffic_class;
+	__be32 	     flow_label;
+	__be16       payload_length;
+	u8    	     next_header;
+	u8    	     hop_limit;
+	union ib_gid source_gid;
+	union ib_gid destination_gid;
+};
+
+struct ib_unpacked_bth {
+	u8           opcode;
+	u8           solicited_event;
+	u8           mig_req;
+	u8           pad_count;
+	u8           transport_header_version;
+	__be16       pkey;
+	__be32       destination_qpn;
+	u8           ack_req;
+	__be32       psn;
+};
+
+struct ib_unpacked_deth {
+	__be32       qkey;
+	__be32       source_qpn;
+};
+
+struct ib_ud_header {
+	struct ib_unpacked_lrh  lrh;
+	int                     grh_present;
+	struct ib_unpacked_grh  grh;
+	struct ib_unpacked_bth  bth;
+	struct ib_unpacked_deth deth;
+	int            		immediate_present;
+	__be32         		immediate_data;
+};
+
+void ib_pack(const struct ib_field        *desc,
+	     int                           desc_len,
+	     void                         *structure,
+	     void                         *buf);
+
+void ib_unpack(const struct ib_field        *desc,
+	       int                           desc_len,
+	       void                         *buf,
+	       void                         *structure);
+
+void ib_ud_header_init(int     		   payload_bytes,
+		       int    		   grh_present,
+		       struct ib_ud_header *header);
+
+int ib_ud_header_pack(struct ib_ud_header *header,
+		      void                *buf);
+
+int ib_ud_header_unpack(void                *buf,
+			struct ib_ud_header *header);
+
+#endif /* IB_PACK_H */
diff -Nru a/drivers/infiniband/include/ib_sa.h b/drivers/infiniband/include/ib_sa.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/include/ib_sa.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,280 @@
+/*
+ * Copyright (c) 2004 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: ib_sa.h 1389 2004-12-27 22:56:47Z roland $
+ */
+
+#ifndef IB_SA_H
+#define IB_SA_H
+
+#include <linux/compiler.h>
+
+#include <ib_verbs.h>
+#include <ib_mad.h>
+
+enum {
+	IB_SA_CLASS_VERSION	= 2,	/* IB spec version 1.1/1.2 */
+
+	IB_SA_METHOD_DELETE	= 0x15
+};
+
+enum ib_sa_selector {
+	IB_SA_GTE  = 0,
+	IB_SA_LTE  = 1,
+	IB_SA_EQ   = 2,
+	/*
+	 * The meaning of "best" depends on the attribute: for
+	 * example, for MTU best will return the largest available
+	 * MTU, while for packet life time, best will return the
+	 * smallest available life time.
+	 */
+	IB_SA_BEST = 3
+};
+
+typedef u64 __bitwise ib_sa_comp_mask;
+
+#define IB_SA_COMP_MASK(n)	((__force ib_sa_comp_mask) cpu_to_be64(1ull << n))
+
+/*
+ * Structures for SA records are named "struct ib_sa_xxx_rec."  No
+ * attempt is made to pack structures to match the physical layout of
+ * SA records in SA MADs; all packing and unpacking is handled by the
+ * SA query code.
+ *
+ * For a record with structure ib_sa_xxx_rec, the naming convention
+ * for the component mask value for field yyy is IB_SA_XXX_REC_YYY (we
+ * never use different abbreviations or otherwise change the spelling
+ * of xxx/yyy between ib_sa_xxx_rec.yyy and IB_SA_XXX_REC_YYY).
+ *
+ * Reserved rows are indicated with comments to help maintainability.
+ */
+
+/* reserved:								 0 */
+/* reserved:								 1 */
+#define IB_SA_PATH_REC_DGID				IB_SA_COMP_MASK( 2)
+#define IB_SA_PATH_REC_SGID				IB_SA_COMP_MASK( 3)
+#define IB_SA_PATH_REC_DLID				IB_SA_COMP_MASK( 4)
+#define IB_SA_PATH_REC_SLID				IB_SA_COMP_MASK( 5)
+#define IB_SA_PATH_REC_RAW_TRAFFIC			IB_SA_COMP_MASK( 6)
+/* reserved:								 7 */
+#define IB_SA_PATH_REC_FLOW_LABEL       		IB_SA_COMP_MASK( 8)
+#define IB_SA_PATH_REC_HOP_LIMIT			IB_SA_COMP_MASK( 9)
+#define IB_SA_PATH_REC_TRAFFIC_CLASS			IB_SA_COMP_MASK(10)
+#define IB_SA_PATH_REC_REVERSIBLE			IB_SA_COMP_MASK(11)
+#define IB_SA_PATH_REC_NUMB_PATH			IB_SA_COMP_MASK(12)
+#define IB_SA_PATH_REC_PKEY				IB_SA_COMP_MASK(13)
+/* reserved:								14 */
+#define IB_SA_PATH_REC_SL				IB_SA_COMP_MASK(15)
+#define IB_SA_PATH_REC_MTU_SELECTOR			IB_SA_COMP_MASK(16)
+#define IB_SA_PATH_REC_MTU				IB_SA_COMP_MASK(17)
+#define IB_SA_PATH_REC_RATE_SELECTOR			IB_SA_COMP_MASK(18)
+#define IB_SA_PATH_REC_RATE				IB_SA_COMP_MASK(19)
+#define IB_SA_PATH_REC_PACKET_LIFE_TIME_SELECTOR	IB_SA_COMP_MASK(20)
+#define IB_SA_PATH_REC_PACKET_LIFE_TIME			IB_SA_COMP_MASK(21)
+#define IB_SA_PATH_REC_PREFERENCE			IB_SA_COMP_MASK(22)
+
+struct ib_sa_path_rec {
+	/* reserved */
+	/* reserved */
+	union ib_gid dgid;
+	union ib_gid sgid;
+	u16          dlid;
+	u16          slid;
+	int          raw_traffic;
+	/* reserved */
+	u32          flow_label;
+	u8           hop_limit;
+	u8           traffic_class;
+	int          reversible;
+	u8           numb_path;
+	u16          pkey;
+	/* reserved */
+	u8           sl;
+	u8           mtu_selector;
+	enum ib_mtu  mtu;
+	u8           rate_selector;
+	u8           rate;
+	u8           packet_life_time_selector;
+	u8           packet_life_time;
+	u8           preference;
+};
+
+#define IB_SA_MCMEMBER_REC_MGID				IB_SA_COMP_MASK( 0)
+#define IB_SA_MCMEMBER_REC_PORT_GID			IB_SA_COMP_MASK( 1)
+#define IB_SA_MCMEMBER_REC_QKEY				IB_SA_COMP_MASK( 2)
+#define IB_SA_MCMEMBER_REC_MLID				IB_SA_COMP_MASK( 3)
+#define IB_SA_MCMEMBER_REC_MTU_SELECTOR			IB_SA_COMP_MASK( 4)
+#define IB_SA_MCMEMBER_REC_MTU				IB_SA_COMP_MASK( 5)
+#define IB_SA_MCMEMBER_REC_TRAFFIC_CLASS		IB_SA_COMP_MASK( 6)
+#define IB_SA_MCMEMBER_REC_PKEY				IB_SA_COMP_MASK( 7)
+#define IB_SA_MCMEMBER_REC_RATE_SELECTOR		IB_SA_COMP_MASK( 8)
+#define IB_SA_MCMEMBER_REC_RATE				IB_SA_COMP_MASK( 9)
+#define IB_SA_MCMEMBER_REC_PACKET_LIFE_TIME_SELECTOR	IB_SA_COMP_MASK(10)
+#define IB_SA_MCMEMBER_REC_PACKET_LIFE_TIME		IB_SA_COMP_MASK(11)
+#define IB_SA_MCMEMBER_REC_SL				IB_SA_COMP_MASK(12)
+#define IB_SA_MCMEMBER_REC_FLOW_LABEL			IB_SA_COMP_MASK(13)
+#define IB_SA_MCMEMBER_REC_HOP_LIMIT			IB_SA_COMP_MASK(14)
+#define IB_SA_MCMEMBER_REC_SCOPE			IB_SA_COMP_MASK(15)
+#define IB_SA_MCMEMBER_REC_JOIN_STATE			IB_SA_COMP_MASK(16)
+#define IB_SA_MCMEMBER_REC_PROXY_JOIN			IB_SA_COMP_MASK(17)
+
+struct ib_sa_mcmember_rec {
+	union ib_gid mgid;
+	union ib_gid port_gid;
+	u32          qkey;
+	u16          mlid;
+	u8           mtu_selector;
+	enum         ib_mtu mtu;
+	u8           traffic_class;
+	u16          pkey;
+	u8 	     rate_selector;
+	u8 	     rate;
+	u8 	     packet_life_time_selector;
+	u8 	     packet_life_time;
+	u8           sl;
+	u32          flow_label;
+	u8           hop_limit;
+	u8           scope;
+	u8           join_state;
+	int          proxy_join;
+};
+
+struct ib_sa_query;
+
+void ib_sa_cancel_query(int id, struct ib_sa_query *query);
+
+int ib_sa_path_rec_get(struct ib_device *device, u8 port_num,
+		       struct ib_sa_path_rec *rec,
+		       ib_sa_comp_mask comp_mask,
+		       int timeout_ms, int gfp_mask,
+		       void (*callback)(int status,
+					struct ib_sa_path_rec *resp,
+					void *context),
+		       void *context,
+		       struct ib_sa_query **query);
+
+int ib_sa_mcmember_rec_query(struct ib_device *device, u8 port_num,
+			     u8 method,
+			     struct ib_sa_mcmember_rec *rec,
+			     ib_sa_comp_mask comp_mask,
+			     int timeout_ms, int gfp_mask,
+			     void (*callback)(int status,
+					      struct ib_sa_mcmember_rec *resp,
+					      void *context),
+			     void *context,
+			     struct ib_sa_query **query);
+
+/**
+ * ib_sa_mcmember_rec_set - Start an MCMember set query
+ * @device:device to send query on
+ * @port_num: port number to send query on
+ * @rec:MCMember Record to send in query
+ * @comp_mask:component mask to send in query
+ * @timeout_ms:time to wait for response
+ * @gfp_mask:GFP mask to use for internal allocations
+ * @callback:function called when query completes, times out or is
+ * canceled
+ * @context:opaque user context passed to callback
+ * @sa_query:query context, used to cancel query
+ *
+ * Send an MCMember Set query to the SA (eg to join a multicast
+ * group).  The callback function will be called when the query
+ * completes (or fails); status is 0 for a successful response, -EINTR
+ * if the query is canceled, -ETIMEDOUT is the query timed out, or
+ * -EIO if an error occurred sending the query.  The resp parameter of
+ * the callback is only valid if status is 0.
+ *
+ * If the return value of ib_sa_mcmember_rec_set() is negative, it is
+ * an error code.  Otherwise it is a query ID that can be used to
+ * cancel the query.
+ */
+static inline int
+ib_sa_mcmember_rec_set(struct ib_device *device, u8 port_num,
+		       struct ib_sa_mcmember_rec *rec,
+		       ib_sa_comp_mask comp_mask,
+		       int timeout_ms, int gfp_mask,
+		       void (*callback)(int status,
+					struct ib_sa_mcmember_rec *resp,
+					void *context),
+		       void *context,
+		       struct ib_sa_query **query)
+{
+	return ib_sa_mcmember_rec_query(device, port_num,
+					IB_MGMT_METHOD_SET,
+					rec, comp_mask,
+					timeout_ms, gfp_mask, callback,
+					context, query);
+}
+
+/**
+ * ib_sa_mcmember_rec_delete - Start an MCMember delete query
+ * @device:device to send query on
+ * @port_num: port number to send query on
+ * @rec:MCMember Record to send in query
+ * @comp_mask:component mask to send in query
+ * @timeout_ms:time to wait for response
+ * @gfp_mask:GFP mask to use for internal allocations
+ * @callback:function called when query completes, times out or is
+ * canceled
+ * @context:opaque user context passed to callback
+ * @sa_query:query context, used to cancel query
+ *
+ * Send an MCMember Delete query to the SA (eg to leave a multicast
+ * group).  The callback function will be called when the query
+ * completes (or fails); status is 0 for a successful response, -EINTR
+ * if the query is canceled, -ETIMEDOUT is the query timed out, or
+ * -EIO if an error occurred sending the query.  The resp parameter of
+ * the callback is only valid if status is 0.
+ *
+ * If the return value of ib_sa_mcmember_rec_delete() is negative, it
+ * is an error code.  Otherwise it is a query ID that can be used to
+ * cancel the query.
+ */
+static inline int
+ib_sa_mcmember_rec_delete(struct ib_device *device, u8 port_num,
+			  struct ib_sa_mcmember_rec *rec,
+			  ib_sa_comp_mask comp_mask,
+			  int timeout_ms, int gfp_mask,
+			  void (*callback)(int status,
+					   struct ib_sa_mcmember_rec *resp,
+					   void *context),
+			  void *context,
+			  struct ib_sa_query **query)
+{
+	return ib_sa_mcmember_rec_query(device, port_num,
+					IB_SA_METHOD_DELETE,
+					rec, comp_mask,
+					timeout_ms, gfp_mask, callback,
+					context, query);
+}
+
+
+#endif /* IB_SA_H */
diff -Nru a/drivers/infiniband/include/ib_smi.h b/drivers/infiniband/include/ib_smi.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/include/ib_smi.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2004 Mellanox Technologies Ltd.  All rights reserved.
+ * Copyright (c) 2004 Infinicon Corporation.  All rights reserved.
+ * Copyright (c) 2004 Intel Corporation.  All rights reserved.
+ * Copyright (c) 2004 Topspin Corporation.  All rights reserved.
+ * Copyright (c) 2004 Voltaire Corporation.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: ib_smi.h 1389 2004-12-27 22:56:47Z roland $
+ */
+
+#if !defined( IB_SMI_H )
+#define IB_SMI_H
+
+#include <ib_mad.h>
+
+#define IB_LID_PERMISSIVE			0xFFFF
+
+#define IB_SMP_DATA_SIZE			64
+#define IB_SMP_MAX_PATH_HOPS			64
+
+struct ib_smp {
+	u8	base_version;
+	u8	mgmt_class;
+	u8	class_version;
+	u8	method;
+	u16	status;
+	u8	hop_ptr;
+	u8	hop_cnt;
+	u64	tid;
+	u16	attr_id;
+	u16	resv;
+	u32	attr_mod;
+	u64	mkey;
+	u16	dr_slid;
+	u16	dr_dlid;
+	u8	reserved[28];
+	u8	data[IB_SMP_DATA_SIZE];
+	u8	initial_path[IB_SMP_MAX_PATH_HOPS];
+	u8	return_path[IB_SMP_MAX_PATH_HOPS];
+} __attribute__ ((packed));
+
+#define IB_SMP_DIRECTION			__constant_htons(0x8000)
+
+/* Subnet management attributes */
+#define IB_SMP_ATTR_NOTICE			__constant_htons(0x0002)
+#define IB_SMP_ATTR_NODE_DESC			__constant_htons(0x0010)
+#define IB_SMP_ATTR_NODE_INFO			__constant_htons(0x0011)
+#define IB_SMP_ATTR_SWITCH_INFO			__constant_htons(0x0012)
+#define IB_SMP_ATTR_GUID_INFO			__constant_htons(0x0014)
+#define IB_SMP_ATTR_PORT_INFO			__constant_htons(0x0015)
+#define IB_SMP_ATTR_PKEY_TABLE			__constant_htons(0x0016)
+#define IB_SMP_ATTR_SL_TO_VL_TABLE		__constant_htons(0x0017)
+#define IB_SMP_ATTR_VL_ARB_TABLE		__constant_htons(0x0018)
+#define IB_SMP_ATTR_LINEAR_FORWARD_TABLE	__constant_htons(0x0019)
+#define IB_SMP_ATTR_RANDOM_FORWARD_TABLE	__constant_htons(0x001A)
+#define IB_SMP_ATTR_MCAST_FORWARD_TABLE		__constant_htons(0x001B)
+#define IB_SMP_ATTR_SM_INFO			__constant_htons(0x0020)
+#define IB_SMP_ATTR_VENDOR_DIAG			__constant_htons(0x0030)
+#define IB_SMP_ATTR_LED_INFO			__constant_htons(0x0031)
+#define IB_SMP_ATTR_VENDOR_MASK			__constant_htons(0xFF00)
+
+static inline u8
+ib_get_smp_direction(struct ib_smp *smp)
+{
+	return ((smp->status & IB_SMP_DIRECTION) == IB_SMP_DIRECTION);
+}
+
+#endif /* IB_SMI_H */
diff -Nru a/drivers/infiniband/include/ib_user_mad.h b/drivers/infiniband/include/ib_user_mad.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/include/ib_user_mad.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,123 @@
+/*
+ * Copyright (c) 2004 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: ib_user_mad.h 1389 2004-12-27 22:56:47Z roland $
+ */
+
+#ifndef IB_USER_MAD_H
+#define IB_USER_MAD_H
+
+#include <linux/types.h>
+#include <linux/ioctl.h>
+
+/*
+ * Increment this value if any changes that break userspace ABI
+ * compatibility are made.
+ */
+#define IB_USER_MAD_ABI_VERSION	2
+
+/*
+ * Make sure that all structs defined in this file remain laid out so
+ * that they pack the same way on 32-bit and 64-bit architectures (to
+ * avoid incompatibility between 32-bit userspace and 64-bit kernels).
+ */
+
+/**
+ * ib_user_mad - MAD packet
+ * @data - Contents of MAD
+ * @id - ID of agent MAD received with/to be sent with
+ * @status - 0 on successful receive, ETIMEDOUT if no response
+ *   received (transaction ID in data[] will be set to TID of original
+ *   request) (ignored on send)
+ * @timeout_ms - Milliseconds to wait for response (unset on receive)
+ * @qpn - Remote QP number received from/to be sent to
+ * @qkey - Remote Q_Key to be sent with (unset on receive)
+ * @lid - Remote lid received from/to be sent to
+ * @sl - Service level received with/to be sent with
+ * @path_bits - Local path bits received with/to be sent with
+ * @grh_present - If set, GRH was received/should be sent
+ * @gid_index - Local GID index to send with (unset on receive)
+ * @hop_limit - Hop limit in GRH
+ * @traffic_class - Traffic class in GRH
+ * @gid - Remote GID in GRH
+ * @flow_label - Flow label in GRH
+ *
+ * All multi-byte quantities are stored in network (big endian) byte order.
+ */
+struct ib_user_mad {
+	__u8	data[256];
+	__u32	id;
+	__u32	status;
+	__u32	timeout_ms;
+	__u32	qpn;
+	__u32   qkey;
+	__u16	lid;
+	__u8	sl;
+	__u8	path_bits;
+	__u8	grh_present;
+	__u8	gid_index;
+	__u8	hop_limit;
+	__u8	traffic_class;
+	__u8	gid[16];
+	__u32	flow_label;
+};
+
+/**
+ * ib_user_mad_reg_req - MAD registration request
+ * @id - Set by the kernel; used to identify agent in future requests.
+ * @qpn - Queue pair number; must be 0 or 1.
+ * @method_mask - The caller will receive unsolicited MADs for any method
+ *   where @method_mask = 1.
+ * @mgmt_class - Indicates which management class of MADs should be receive
+ *   by the caller.  This field is only required if the user wishes to
+ *   receive unsolicited MADs, otherwise it should be 0.
+ * @mgmt_class_version - Indicates which version of MADs for the given
+ *   management class to receive.
+ * @oui: Indicates IEEE OUI when mgmt_class is a vendor class
+ *   in the range from 0x30 to 0x4f. Otherwise not used.
+ */
+struct ib_user_mad_reg_req {
+	__u32	id;
+	__u32	method_mask[4];
+	__u8	qpn;
+	__u8	mgmt_class;
+	__u8	mgmt_class_version;
+	__u8    oui[3];
+};
+
+#define IB_IOCTL_MAGIC		0x1b
+
+#define IB_USER_MAD_REGISTER_AGENT	_IOWR(IB_IOCTL_MAGIC, 1, \
+					      struct ib_user_mad_reg_req)
+
+#define IB_USER_MAD_UNREGISTER_AGENT	_IOW(IB_IOCTL_MAGIC, 2, __u32)
+
+#endif /* IB_USER_MAD_H */
diff -Nru a/drivers/infiniband/include/ib_verbs.h b/drivers/infiniband/include/ib_verbs.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/include/ib_verbs.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,1249 @@
+/*
+ * Copyright (c) 2004 Mellanox Technologies Ltd.  All rights reserved.
+ * Copyright (c) 2004 Infinicon Corporation.  All rights reserved.
+ * Copyright (c) 2004 Intel Corporation.  All rights reserved.
+ * Copyright (c) 2004 Topspin Corporation.  All rights reserved.
+ * Copyright (c) 2004 Voltaire Corporation.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: ib_verbs.h 1349 2004-12-16 21:09:43Z roland $
+ */
+
+#if !defined(IB_VERBS_H)
+#define IB_VERBS_H
+
+#include <linux/types.h>
+#include <linux/device.h>
+#include <asm/atomic.h>
+
+union ib_gid {
+	u8	raw[16];
+	struct {
+		u64	subnet_prefix;
+		u64	interface_id;
+	} global;
+};
+
+enum ib_node_type {
+	IB_NODE_CA 	= 1,
+	IB_NODE_SWITCH,
+	IB_NODE_ROUTER
+};
+
+enum ib_device_cap_flags {
+	IB_DEVICE_RESIZE_MAX_WR		= 1,
+	IB_DEVICE_BAD_PKEY_CNTR		= (1<<1),
+	IB_DEVICE_BAD_QKEY_CNTR		= (1<<2),
+	IB_DEVICE_RAW_MULTI		= (1<<3),
+	IB_DEVICE_AUTO_PATH_MIG		= (1<<4),
+	IB_DEVICE_CHANGE_PHY_PORT	= (1<<5),
+	IB_DEVICE_UD_AV_PORT_ENFORCE	= (1<<6),
+	IB_DEVICE_CURR_QP_STATE_MOD	= (1<<7),
+	IB_DEVICE_SHUTDOWN_PORT		= (1<<8),
+	IB_DEVICE_INIT_TYPE		= (1<<9),
+	IB_DEVICE_PORT_ACTIVE_EVENT	= (1<<10),
+	IB_DEVICE_SYS_IMAGE_GUID	= (1<<11),
+	IB_DEVICE_RC_RNR_NAK_GEN	= (1<<12),
+	IB_DEVICE_SRQ_RESIZE		= (1<<13),
+	IB_DEVICE_N_NOTIFY_CQ		= (1<<14),
+	IB_DEVICE_RQ_SIG_TYPE		= (1<<15)
+};
+
+enum ib_atomic_cap {
+	IB_ATOMIC_NONE,
+	IB_ATOMIC_HCA,
+	IB_ATOMIC_GLOB
+};
+
+struct ib_device_attr {
+	u64			fw_ver;
+	u64			node_guid;
+	u64			sys_image_guid;
+	u64			max_mr_size;
+	u64			page_size_cap;
+	u32			vendor_id;
+	u32			vendor_part_id;
+	u32			hw_ver;
+	int			max_qp;
+	int			max_qp_wr;
+	int			device_cap_flags;
+	int			max_sge;
+	int			max_sge_rd;
+	int			max_cq;
+	int			max_cqe;
+	int			max_mr;
+	int			max_pd;
+	int			max_qp_rd_atom;
+	int			max_ee_rd_atom;
+	int			max_res_rd_atom;
+	int			max_qp_init_rd_atom;
+	int			max_ee_init_rd_atom;
+	enum ib_atomic_cap	atomic_cap;
+	int			max_ee;
+	int			max_rdd;
+	int			max_mw;
+	int			max_raw_ipv6_qp;
+	int			max_raw_ethy_qp;
+	int			max_mcast_grp;
+	int			max_mcast_qp_attach;
+	int			max_total_mcast_qp_attach;
+	int			max_ah;
+	int			max_fmr;
+	int			max_map_per_fmr;
+	int			max_srq;
+	int			max_srq_wr;
+	int			max_srq_sge;
+	u16			max_pkeys;
+	u8			local_ca_ack_delay;
+};
+
+enum ib_mtu {
+	IB_MTU_256  = 1,
+	IB_MTU_512  = 2,
+	IB_MTU_1024 = 3,
+	IB_MTU_2048 = 4,
+	IB_MTU_4096 = 5
+};
+
+static inline int ib_mtu_enum_to_int(enum ib_mtu mtu)
+{
+	switch (mtu) {
+	case IB_MTU_256:  return  256;
+	case IB_MTU_512:  return  512;
+	case IB_MTU_1024: return 1024;
+	case IB_MTU_2048: return 2048;
+	case IB_MTU_4096: return 4096;
+	default: 	  return -1;
+	}
+}
+
+enum ib_port_state {
+	IB_PORT_NOP		= 0,
+	IB_PORT_DOWN		= 1,
+	IB_PORT_INIT		= 2,
+	IB_PORT_ARMED		= 3,
+	IB_PORT_ACTIVE		= 4,
+	IB_PORT_ACTIVE_DEFER	= 5
+};
+
+enum ib_port_cap_flags {
+	IB_PORT_SM				= (1<<31),
+	IB_PORT_NOTICE_SUP			= (1<<30),
+	IB_PORT_TRAP_SUP			= (1<<29),
+	IB_PORT_AUTO_MIGR_SUP			= (1<<27),
+	IB_PORT_SL_MAP_SUP			= (1<<26),
+	IB_PORT_MKEY_NVRAM			= (1<<25),
+	IB_PORT_PKEY_NVRAM			= (1<<24),
+	IB_PORT_LED_INFO_SUP			= (1<<23),
+	IB_PORT_SM_DISABLED			= (1<<22),
+	IB_PORT_SYS_IMAGE_GUID_SUP		= (1<<21),
+	IB_PORT_PKEY_SW_EXT_PORT_TRAP_SUP	= (1<<20),
+	IB_PORT_CM_SUP				= (1<<16),
+	IB_PORT_SNMP_TUNNEL_SUP			= (1<<15),
+	IB_PORT_REINIT_SUP			= (1<<14),
+	IB_PORT_DEVICE_MGMT_SUP			= (1<<13),
+	IB_PORT_VENDOR_CLASS_SUP		= (1<<12),
+	IB_PORT_DR_NOTICE_SUP			= (1<<11),
+	IB_PORT_PORT_NOTICE_SUP			= (1<<10),
+	IB_PORT_BOOT_MGMT_SUP			= (1<<9)
+};
+
+enum ib_port_width {
+	IB_WIDTH_1X	= 1,
+	IB_WIDTH_4X	= 2,
+	IB_WIDTH_8X	= 4,
+	IB_WIDTH_12X	= 8
+};
+
+static inline int ib_width_enum_to_int(enum ib_port_width width)
+{
+	switch (width) {
+	case IB_WIDTH_1X:  return  1;
+	case IB_WIDTH_4X:  return  4;
+	case IB_WIDTH_8X:  return  8;
+	case IB_WIDTH_12X: return 12;
+	default: 	  return -1;
+	}
+}
+
+struct ib_port_attr {
+	enum ib_port_state	state;
+	enum ib_mtu		max_mtu;
+	enum ib_mtu		active_mtu;
+	int			gid_tbl_len;
+	u32			port_cap_flags;
+	u32			max_msg_sz;
+	u32			bad_pkey_cntr;
+	u32			qkey_viol_cntr;
+	u16			pkey_tbl_len;
+	u16			lid;
+	u16			sm_lid;
+	u8			lmc;
+	u8			max_vl_num;
+	u8			sm_sl;
+	u8			subnet_timeout;
+	u8			init_type_reply;
+	u8			active_width;
+	u8			active_speed;
+};
+
+enum ib_device_modify_flags {
+	IB_DEVICE_MODIFY_SYS_IMAGE_GUID	= 1
+};
+
+struct ib_device_modify {
+	u64	sys_image_guid;
+};
+
+enum ib_port_modify_flags {
+	IB_PORT_SHUTDOWN		= 1,
+	IB_PORT_INIT_TYPE		= (1<<2),
+	IB_PORT_RESET_QKEY_CNTR		= (1<<3)
+};
+
+struct ib_port_modify {
+	u32	set_port_cap_mask;
+	u32	clr_port_cap_mask;
+	u8	init_type;
+};
+
+enum ib_event_type {
+	IB_EVENT_CQ_ERR,
+	IB_EVENT_QP_FATAL,
+	IB_EVENT_QP_REQ_ERR,
+	IB_EVENT_QP_ACCESS_ERR,
+	IB_EVENT_COMM_EST,
+	IB_EVENT_SQ_DRAINED,
+	IB_EVENT_PATH_MIG,
+	IB_EVENT_PATH_MIG_ERR,
+	IB_EVENT_DEVICE_FATAL,
+	IB_EVENT_PORT_ACTIVE,
+	IB_EVENT_PORT_ERR,
+	IB_EVENT_LID_CHANGE,
+	IB_EVENT_PKEY_CHANGE,
+	IB_EVENT_SM_CHANGE
+};
+
+struct ib_event {
+	struct ib_device	*device;
+	union {
+		struct ib_cq	*cq;
+		struct ib_qp	*qp;
+		u8		port_num;
+	} element;
+	enum ib_event_type	event;
+};
+
+struct ib_event_handler {
+	struct ib_device *device;
+	void            (*handler)(struct ib_event_handler *, struct ib_event *);
+	struct list_head  list;
+};
+
+#define INIT_IB_EVENT_HANDLER(_ptr, _device, _handler)		\
+	do {							\
+		(_ptr)->device  = _device;			\
+		(_ptr)->handler = _handler;			\
+		INIT_LIST_HEAD(&(_ptr)->list);			\
+	} while (0)
+
+struct ib_global_route {
+	union ib_gid	dgid;
+	u32		flow_label;
+	u8		sgid_index;
+	u8		hop_limit;
+	u8		traffic_class;
+};
+
+enum {
+	IB_MULTICAST_QPN = 0xffffff
+};
+
+enum ib_ah_flags {
+	IB_AH_GRH	= 1
+};
+
+struct ib_ah_attr {
+	struct ib_global_route	grh;
+	u16			dlid;
+	u8			sl;
+	u8			src_path_bits;
+	u8			static_rate;
+	u8			ah_flags;
+	u8			port_num;
+};
+
+enum ib_wc_status {
+	IB_WC_SUCCESS,
+	IB_WC_LOC_LEN_ERR,
+	IB_WC_LOC_QP_OP_ERR,
+	IB_WC_LOC_EEC_OP_ERR,
+	IB_WC_LOC_PROT_ERR,
+	IB_WC_WR_FLUSH_ERR,
+	IB_WC_MW_BIND_ERR,
+	IB_WC_BAD_RESP_ERR,
+	IB_WC_LOC_ACCESS_ERR,
+	IB_WC_REM_INV_REQ_ERR,
+	IB_WC_REM_ACCESS_ERR,
+	IB_WC_REM_OP_ERR,
+	IB_WC_RETRY_EXC_ERR,
+	IB_WC_RNR_RETRY_EXC_ERR,
+	IB_WC_LOC_RDD_VIOL_ERR,
+	IB_WC_REM_INV_RD_REQ_ERR,
+	IB_WC_REM_ABORT_ERR,
+	IB_WC_INV_EECN_ERR,
+	IB_WC_INV_EEC_STATE_ERR,
+	IB_WC_FATAL_ERR,
+	IB_WC_RESP_TIMEOUT_ERR,
+	IB_WC_GENERAL_ERR
+};
+
+enum ib_wc_opcode {
+	IB_WC_SEND,
+	IB_WC_RDMA_WRITE,
+	IB_WC_RDMA_READ,
+	IB_WC_COMP_SWAP,
+	IB_WC_FETCH_ADD,
+	IB_WC_BIND_MW,
+/*
+ * Set value of IB_WC_RECV so consumers can test if a completion is a
+ * receive by testing (opcode & IB_WC_RECV).
+ */
+	IB_WC_RECV			= 1 << 7,
+	IB_WC_RECV_RDMA_WITH_IMM
+};
+
+enum ib_wc_flags {
+	IB_WC_GRH		= 1,
+	IB_WC_WITH_IMM		= (1<<1)
+};
+
+struct ib_wc {
+	u64			wr_id;
+	enum ib_wc_status	status;
+	enum ib_wc_opcode	opcode;
+	u32			vendor_err;
+	u32			byte_len;
+	__be32			imm_data;
+	u32			src_qp;
+	int			wc_flags;
+	u16			pkey_index;
+	u16			slid;
+	u8			sl;
+	u8			dlid_path_bits;
+	u8			port_num;	/* valid only for DR SMPs on switches */
+};
+
+enum ib_cq_notify {
+	IB_CQ_SOLICITED,
+	IB_CQ_NEXT_COMP
+};
+
+struct ib_qp_cap {
+	u32	max_send_wr;
+	u32	max_recv_wr;
+	u32	max_send_sge;
+	u32	max_recv_sge;
+	u32	max_inline_data;
+};
+
+enum ib_sig_type {
+	IB_SIGNAL_ALL_WR,
+	IB_SIGNAL_REQ_WR
+};
+
+enum ib_qp_type {
+	/*
+	 * IB_QPT_SMI and IB_QPT_GSI have to be the first two entries
+	 * here (and in that order) since the MAD layer uses them as
+	 * indices into a 2-entry table.
+	 */
+	IB_QPT_SMI,
+	IB_QPT_GSI,
+
+	IB_QPT_RC,
+	IB_QPT_UC,
+	IB_QPT_UD,
+	IB_QPT_RAW_IPV6,
+	IB_QPT_RAW_ETY
+};
+
+struct ib_qp_init_attr {
+	void                  (*event_handler)(struct ib_event *, void *);
+	void		       *qp_context;
+	struct ib_cq	       *send_cq;
+	struct ib_cq	       *recv_cq;
+	struct ib_srq	       *srq;
+	struct ib_qp_cap	cap;
+	enum ib_sig_type	sq_sig_type;
+	enum ib_sig_type	rq_sig_type;
+	enum ib_qp_type		qp_type;
+	u8			port_num; /* special QP types only */
+};
+
+enum ib_rnr_timeout {
+	IB_RNR_TIMER_655_36 =  0,
+	IB_RNR_TIMER_000_01 =  1,
+	IB_RNR_TIMER_000_02 =  2,
+	IB_RNR_TIMER_000_03 =  3,
+	IB_RNR_TIMER_000_04 =  4,
+	IB_RNR_TIMER_000_06 =  5,
+	IB_RNR_TIMER_000_08 =  6,
+	IB_RNR_TIMER_000_12 =  7,
+	IB_RNR_TIMER_000_16 =  8,
+	IB_RNR_TIMER_000_24 =  9,
+	IB_RNR_TIMER_000_32 = 10,
+	IB_RNR_TIMER_000_48 = 11,
+	IB_RNR_TIMER_000_64 = 12,
+	IB_RNR_TIMER_000_96 = 13,
+	IB_RNR_TIMER_001_28 = 14,
+	IB_RNR_TIMER_001_92 = 15,
+	IB_RNR_TIMER_002_56 = 16,
+	IB_RNR_TIMER_003_84 = 17,
+	IB_RNR_TIMER_005_12 = 18,
+	IB_RNR_TIMER_007_68 = 19,
+	IB_RNR_TIMER_010_24 = 20,
+	IB_RNR_TIMER_015_36 = 21,
+	IB_RNR_TIMER_020_48 = 22,
+	IB_RNR_TIMER_030_72 = 23,
+	IB_RNR_TIMER_040_96 = 24,
+	IB_RNR_TIMER_061_44 = 25,
+	IB_RNR_TIMER_081_92 = 26,
+	IB_RNR_TIMER_122_88 = 27,
+	IB_RNR_TIMER_163_84 = 28,
+	IB_RNR_TIMER_245_76 = 29,
+	IB_RNR_TIMER_327_68 = 30,
+	IB_RNR_TIMER_491_52 = 31
+};
+
+enum ib_qp_attr_mask {
+	IB_QP_STATE			= 1,
+	IB_QP_CUR_STATE			= (1<<1),
+	IB_QP_EN_SQD_ASYNC_NOTIFY	= (1<<2),
+	IB_QP_ACCESS_FLAGS		= (1<<3),
+	IB_QP_PKEY_INDEX		= (1<<4),
+	IB_QP_PORT			= (1<<5),
+	IB_QP_QKEY			= (1<<6),
+	IB_QP_AV			= (1<<7),
+	IB_QP_PATH_MTU			= (1<<8),
+	IB_QP_TIMEOUT			= (1<<9),
+	IB_QP_RETRY_CNT			= (1<<10),
+	IB_QP_RNR_RETRY			= (1<<11),
+	IB_QP_RQ_PSN			= (1<<12),
+	IB_QP_MAX_QP_RD_ATOMIC		= (1<<13),
+	IB_QP_ALT_PATH			= (1<<14),
+	IB_QP_MIN_RNR_TIMER		= (1<<15),
+	IB_QP_SQ_PSN			= (1<<16),
+	IB_QP_MAX_DEST_RD_ATOMIC	= (1<<17),
+	IB_QP_PATH_MIG_STATE		= (1<<18),
+	IB_QP_CAP			= (1<<19),
+	IB_QP_DEST_QPN			= (1<<20)
+};
+
+enum ib_qp_state {
+	IB_QPS_RESET,
+	IB_QPS_INIT,
+	IB_QPS_RTR,
+	IB_QPS_RTS,
+	IB_QPS_SQD,
+	IB_QPS_SQE,
+	IB_QPS_ERR
+};
+
+enum ib_mig_state {
+	IB_MIG_MIGRATED,
+	IB_MIG_REARM,
+	IB_MIG_ARMED
+};
+
+struct ib_qp_attr {
+	enum ib_qp_state	qp_state;
+	enum ib_qp_state	cur_qp_state;
+	enum ib_mtu		path_mtu;
+	enum ib_mig_state	path_mig_state;
+	u32			qkey;
+	u32			rq_psn;
+	u32			sq_psn;
+	u32			dest_qp_num;
+	int			qp_access_flags;
+	struct ib_qp_cap	cap;
+	struct ib_ah_attr	ah_attr;
+	struct ib_ah_attr	alt_ah_attr;
+	u16			pkey_index;
+	u16			alt_pkey_index;
+	u8			en_sqd_async_notify;
+	u8			sq_draining;
+	u8			max_rd_atomic;
+	u8			max_dest_rd_atomic;
+	u8			min_rnr_timer;
+	u8			port_num;
+	u8			timeout;
+	u8			retry_cnt;
+	u8			rnr_retry;
+	u8			alt_port_num;
+	u8			alt_timeout;
+};
+
+enum ib_wr_opcode {
+	IB_WR_RDMA_WRITE,
+	IB_WR_RDMA_WRITE_WITH_IMM,
+	IB_WR_SEND,
+	IB_WR_SEND_WITH_IMM,
+	IB_WR_RDMA_READ,
+	IB_WR_ATOMIC_CMP_AND_SWP,
+	IB_WR_ATOMIC_FETCH_AND_ADD
+};
+
+enum ib_send_flags {
+	IB_SEND_FENCE		= 1,
+	IB_SEND_SIGNALED	= (1<<1),
+	IB_SEND_SOLICITED	= (1<<2),
+	IB_SEND_INLINE		= (1<<3)
+};
+
+enum ib_recv_flags {
+	IB_RECV_SIGNALED	= 1
+};
+
+struct ib_sge {
+	u64	addr;
+	u32	length;
+	u32	lkey;
+};
+
+struct ib_send_wr {
+	struct ib_send_wr      *next;
+	u64			wr_id;
+	struct ib_sge	       *sg_list;
+	int			num_sge;
+	enum ib_wr_opcode	opcode;
+	int			send_flags;
+	u32			imm_data;
+	union {
+		struct {
+			u64	remote_addr;
+			u32	rkey;
+		} rdma;
+		struct {
+			u64	remote_addr;
+			u64	compare_add;
+			u64	swap;
+			u32	rkey;
+		} atomic;
+		struct {
+			struct ib_ah *ah;
+			struct ib_mad_hdr *mad_hdr;
+			u32	remote_qpn;
+			u32	remote_qkey;
+			int	timeout_ms; /* valid for MADs only */
+			u16	pkey_index; /* valid for GSI only */
+			u8	port_num;   /* valid for DR SMPs on switch only */
+		} ud;
+	} wr;
+};
+
+struct ib_recv_wr {
+	struct ib_recv_wr      *next;
+	u64			wr_id;
+	struct ib_sge	       *sg_list;
+	int			num_sge;
+	int			recv_flags;
+};
+
+enum ib_access_flags {
+	IB_ACCESS_LOCAL_WRITE	= 1,
+	IB_ACCESS_REMOTE_WRITE	= (1<<1),
+	IB_ACCESS_REMOTE_READ	= (1<<2),
+	IB_ACCESS_REMOTE_ATOMIC	= (1<<3),
+	IB_ACCESS_MW_BIND	= (1<<4)
+};
+
+struct ib_phys_buf {
+	u64      addr;
+	u64      size;
+};
+
+struct ib_mr_attr {
+	struct ib_pd	*pd;
+	u64		device_virt_addr;
+	u64		size;
+	int		mr_access_flags;
+	u32		lkey;
+	u32		rkey;
+};
+
+enum ib_mr_rereg_flags {
+	IB_MR_REREG_TRANS	= 1,
+	IB_MR_REREG_PD		= (1<<1),
+	IB_MR_REREG_ACCESS	= (1<<2)
+};
+
+struct ib_mw_bind {
+	struct ib_mr   *mr;
+	u64		wr_id;
+	u64		addr;
+	u32		length;
+	int		send_flags;
+	int		mw_access_flags;
+};
+
+struct ib_fmr_attr {
+	int	max_pages;
+	int	max_maps;
+	u8	page_size;
+};
+
+struct ib_pd {
+	struct ib_device *device;
+	atomic_t          usecnt; /* count all resources */
+};
+
+struct ib_ah {
+	struct ib_device	*device;
+	struct ib_pd		*pd;
+};
+
+typedef void (*ib_comp_handler)(struct ib_cq *cq, void *cq_context);
+
+struct ib_cq {
+	struct ib_device *device;
+	ib_comp_handler   comp_handler;
+	void             (*event_handler)(struct ib_event *, void *);
+	void *            cq_context;
+	int               cqe;
+	atomic_t          usecnt; /* count number of work queues */
+};
+
+struct ib_srq {
+	struct ib_device	*device;
+	struct ib_pd		*pd;
+	void			*srq_context;
+	atomic_t		usecnt;
+};
+
+struct ib_qp {
+	struct ib_device       *device;
+	struct ib_pd	       *pd;
+	struct ib_cq	       *send_cq;
+	struct ib_cq	       *recv_cq;
+	struct ib_srq	       *srq;
+	void                  (*event_handler)(struct ib_event *, void *);
+	void		       *qp_context;
+	u32			qp_num;
+};
+
+struct ib_mr {
+	struct ib_device *device;
+	struct ib_pd     *pd;
+	u32		  lkey;
+	u32		  rkey;
+	atomic_t          usecnt; /* count number of MWs */
+};
+
+struct ib_mw {
+	struct ib_device	*device;
+	struct ib_pd		*pd;
+	u32			rkey;
+};
+
+struct ib_fmr {
+	struct ib_device	*device;
+	struct ib_pd		*pd;
+	struct list_head	list;
+	u32			lkey;
+	u32			rkey;
+};
+
+struct ib_mad;
+
+enum ib_process_mad_flags {
+	IB_MAD_IGNORE_MKEY	= 1
+};
+
+enum ib_mad_result {
+	IB_MAD_RESULT_FAILURE  = 0,      /* (!SUCCESS is the important flag) */
+	IB_MAD_RESULT_SUCCESS  = 1 << 0, /* MAD was successfully processed   */
+	IB_MAD_RESULT_REPLY    = 1 << 1, /* Reply packet needs to be sent    */
+	IB_MAD_RESULT_CONSUMED = 1 << 2  /* Packet consumed: stop processing */
+};
+
+#define IB_DEVICE_NAME_MAX 64
+
+struct ib_cache {
+	rwlock_t                lock;
+	struct ib_event_handler event_handler;
+	struct ib_pkey_cache  **pkey_cache;
+	struct ib_gid_cache   **gid_cache;
+};
+
+struct ib_device {
+	struct device                *dma_device;
+
+	char                          name[IB_DEVICE_NAME_MAX];
+
+	struct list_head              event_handler_list;
+	spinlock_t                    event_handler_lock;
+
+	struct list_head              core_list;
+	struct list_head              client_data_list;
+	spinlock_t                    client_data_lock;
+
+	struct ib_cache               cache;
+
+	u32                           flags;
+
+	int		           (*query_device)(struct ib_device *device,
+						   struct ib_device_attr *device_attr);
+	int		           (*query_port)(struct ib_device *device,
+						 u8 port_num,
+						 struct ib_port_attr *port_attr);
+	int		           (*query_gid)(struct ib_device *device,
+						u8 port_num, int index,
+						union ib_gid *gid);
+	int		           (*query_pkey)(struct ib_device *device,
+						 u8 port_num, u16 index, u16 *pkey);
+	int		           (*modify_device)(struct ib_device *device,
+						    int device_modify_mask,
+						    struct ib_device_modify *device_modify);
+	int		           (*modify_port)(struct ib_device *device,
+						  u8 port_num, int port_modify_mask,
+						  struct ib_port_modify *port_modify);
+	struct ib_pd *             (*alloc_pd)(struct ib_device *device);
+	int                        (*dealloc_pd)(struct ib_pd *pd);
+	struct ib_ah *             (*create_ah)(struct ib_pd *pd,
+						struct ib_ah_attr *ah_attr);
+	int                        (*modify_ah)(struct ib_ah *ah,
+						struct ib_ah_attr *ah_attr);
+	int                        (*query_ah)(struct ib_ah *ah,
+					       struct ib_ah_attr *ah_attr);
+	int                        (*destroy_ah)(struct ib_ah *ah);
+	struct ib_qp *             (*create_qp)(struct ib_pd *pd,
+						struct ib_qp_init_attr *qp_init_attr);
+	int                        (*modify_qp)(struct ib_qp *qp,
+						struct ib_qp_attr *qp_attr,
+						int qp_attr_mask);
+	int                        (*query_qp)(struct ib_qp *qp,
+					       struct ib_qp_attr *qp_attr,
+					       int qp_attr_mask,
+					       struct ib_qp_init_attr *qp_init_attr);
+	int                        (*destroy_qp)(struct ib_qp *qp);
+	int                        (*post_send)(struct ib_qp *qp,
+						struct ib_send_wr *send_wr,
+						struct ib_send_wr **bad_send_wr);
+	int                        (*post_recv)(struct ib_qp *qp,
+						struct ib_recv_wr *recv_wr,
+						struct ib_recv_wr **bad_recv_wr);
+	struct ib_cq *             (*create_cq)(struct ib_device *device,
+						int cqe);
+	int                        (*destroy_cq)(struct ib_cq *cq);
+	int                        (*resize_cq)(struct ib_cq *cq, int *cqe);
+	int                        (*poll_cq)(struct ib_cq *cq, int num_entries,
+					      struct ib_wc *wc);
+	int                        (*peek_cq)(struct ib_cq *cq, int wc_cnt);
+	int                        (*req_notify_cq)(struct ib_cq *cq,
+						    enum ib_cq_notify cq_notify);
+	int                        (*req_ncomp_notif)(struct ib_cq *cq,
+						      int wc_cnt);
+	struct ib_mr *             (*get_dma_mr)(struct ib_pd *pd,
+						 int mr_access_flags);
+	struct ib_mr *             (*reg_phys_mr)(struct ib_pd *pd,
+						  struct ib_phys_buf *phys_buf_array,
+						  int num_phys_buf,
+						  int mr_access_flags,
+						  u64 *iova_start);
+	int                        (*query_mr)(struct ib_mr *mr,
+					       struct ib_mr_attr *mr_attr);
+	int                        (*dereg_mr)(struct ib_mr *mr);
+	int                        (*rereg_phys_mr)(struct ib_mr *mr,
+						    int mr_rereg_mask,
+						    struct ib_pd *pd,
+						    struct ib_phys_buf *phys_buf_array,
+						    int num_phys_buf,
+						    int mr_access_flags,
+						    u64 *iova_start);
+	struct ib_mw *             (*alloc_mw)(struct ib_pd *pd);
+	int                        (*bind_mw)(struct ib_qp *qp,
+					      struct ib_mw *mw,
+					      struct ib_mw_bind *mw_bind);
+	int                        (*dealloc_mw)(struct ib_mw *mw);
+	struct ib_fmr *	           (*alloc_fmr)(struct ib_pd *pd,
+						int mr_access_flags,
+						struct ib_fmr_attr *fmr_attr);
+	int		           (*map_phys_fmr)(struct ib_fmr *fmr,
+						   u64 *page_list, int list_len,
+						   u64 iova);
+	int		           (*unmap_fmr)(struct list_head *fmr_list);
+	int		           (*dealloc_fmr)(struct ib_fmr *fmr);
+	int                        (*attach_mcast)(struct ib_qp *qp,
+						   union ib_gid *gid,
+						   u16 lid);
+	int                        (*detach_mcast)(struct ib_qp *qp,
+						   union ib_gid *gid,
+						   u16 lid);
+	int                        (*process_mad)(struct ib_device *device,
+						  int process_mad_flags,
+						  u8 port_num,
+						  u16 source_lid,
+						  struct ib_mad *in_mad,
+						  struct ib_mad *out_mad);
+
+	struct class_device          class_dev;
+	struct kobject               ports_parent;
+	struct list_head             port_list;
+
+	enum {
+		IB_DEV_UNINITIALIZED,
+		IB_DEV_REGISTERED,
+		IB_DEV_UNREGISTERED
+	}                            reg_state;
+
+	u8                           node_type;
+	u8                           phys_port_cnt;
+};
+
+struct ib_client {
+	char  *name;
+	void (*add)   (struct ib_device *);
+	void (*remove)(struct ib_device *);
+
+	struct list_head list;
+};
+
+struct ib_device *ib_alloc_device(size_t size);
+void ib_dealloc_device(struct ib_device *device);
+
+int ib_register_device   (struct ib_device *device);
+void ib_unregister_device(struct ib_device *device);
+
+int ib_register_client   (struct ib_client *client);
+void ib_unregister_client(struct ib_client *client);
+
+void *ib_get_client_data(struct ib_device *device, struct ib_client *client);
+void  ib_set_client_data(struct ib_device *device, struct ib_client *client,
+			 void *data);
+
+int ib_register_event_handler  (struct ib_event_handler *event_handler);
+int ib_unregister_event_handler(struct ib_event_handler *event_handler);
+void ib_dispatch_event(struct ib_event *event);
+
+int ib_query_device(struct ib_device *device,
+		    struct ib_device_attr *device_attr);
+
+int ib_query_port(struct ib_device *device,
+		  u8 port_num, struct ib_port_attr *port_attr);
+
+int ib_query_gid(struct ib_device *device,
+		 u8 port_num, int index, union ib_gid *gid);
+
+int ib_query_pkey(struct ib_device *device,
+		  u8 port_num, u16 index, u16 *pkey);
+
+int ib_modify_device(struct ib_device *device,
+		     int device_modify_mask,
+		     struct ib_device_modify *device_modify);
+
+int ib_modify_port(struct ib_device *device,
+		   u8 port_num, int port_modify_mask,
+		   struct ib_port_modify *port_modify);
+
+/**
+ * ib_alloc_pd - Allocates an unused protection domain.
+ * @device: The device on which to allocate the protection domain.
+ *
+ * A protection domain object provides an association between QPs, shared
+ * receive queues, address handles, memory regions, and memory windows.
+ */
+struct ib_pd *ib_alloc_pd(struct ib_device *device);
+
+/**
+ * ib_dealloc_pd - Deallocates a protection domain.
+ * @pd: The protection domain to deallocate.
+ */
+int ib_dealloc_pd(struct ib_pd *pd);
+
+/**
+ * ib_create_ah - Creates an address handle for the given address vector.
+ * @pd: The protection domain associated with the address handle.
+ * @ah_attr: The attributes of the address vector.
+ *
+ * The address handle is used to reference a local or global destination
+ * in all UD QP post sends.
+ */
+struct ib_ah *ib_create_ah(struct ib_pd *pd, struct ib_ah_attr *ah_attr);
+
+/**
+ * ib_modify_ah - Modifies the address vector associated with an address
+ *   handle.
+ * @ah: The address handle to modify.
+ * @ah_attr: The new address vector attributes to associate with the
+ *   address handle.
+ */
+int ib_modify_ah(struct ib_ah *ah, struct ib_ah_attr *ah_attr);
+
+/**
+ * ib_query_ah - Queries the address vector associated with an address
+ *   handle.
+ * @ah: The address handle to query.
+ * @ah_attr: The address vector attributes associated with the address
+ *   handle.
+ */
+int ib_query_ah(struct ib_ah *ah, struct ib_ah_attr *ah_attr);
+
+/**
+ * ib_destroy_ah - Destroys an address handle.
+ * @ah: The address handle to destroy.
+ */
+int ib_destroy_ah(struct ib_ah *ah);
+
+/**
+ * ib_create_qp - Creates a QP associated with the specified protection
+ *   domain.
+ * @pd: The protection domain associated with the QP.
+ * @qp_init_attr: A list of initial attributes required to create the QP.
+ */
+struct ib_qp *ib_create_qp(struct ib_pd *pd,
+			   struct ib_qp_init_attr *qp_init_attr);
+
+/**
+ * ib_modify_qp - Modifies the attributes for the specified QP and then
+ *   transitions the QP to the given state.
+ * @qp: The QP to modify.
+ * @qp_attr: On input, specifies the QP attributes to modify.  On output,
+ *   the current values of selected QP attributes are returned.
+ * @qp_attr_mask: A bit-mask used to specify which attributes of the QP
+ *   are being modified.
+ */
+int ib_modify_qp(struct ib_qp *qp,
+		 struct ib_qp_attr *qp_attr,
+		 int qp_attr_mask);
+
+/**
+ * ib_query_qp - Returns the attribute list and current values for the
+ *   specified QP.
+ * @qp: The QP to query.
+ * @qp_attr: The attributes of the specified QP.
+ * @qp_attr_mask: A bit-mask used to select specific attributes to query.
+ * @qp_init_attr: Additional attributes of the selected QP.
+ *
+ * The qp_attr_mask may be used to limit the query to gathering only the
+ * selected attributes.
+ */
+int ib_query_qp(struct ib_qp *qp,
+		struct ib_qp_attr *qp_attr,
+		int qp_attr_mask,
+		struct ib_qp_init_attr *qp_init_attr);
+
+/**
+ * ib_destroy_qp - Destroys the specified QP.
+ * @qp: The QP to destroy.
+ */
+int ib_destroy_qp(struct ib_qp *qp);
+
+/**
+ * ib_post_send - Posts a list of work requests to the send queue of
+ *   the specified QP.
+ * @qp: The QP to post the work request on.
+ * @send_wr: A list of work requests to post on the send queue.
+ * @bad_send_wr: On an immediate failure, this parameter will reference
+ *   the work request that failed to be posted on the QP.
+ */
+static inline int ib_post_send(struct ib_qp *qp,
+			       struct ib_send_wr *send_wr,
+			       struct ib_send_wr **bad_send_wr)
+{
+	return qp->device->post_send(qp, send_wr, bad_send_wr);
+}
+
+/**
+ * ib_post_recv - Posts a list of work requests to the receive queue of
+ *   the specified QP.
+ * @qp: The QP to post the work request on.
+ * @recv_wr: A list of work requests to post on the receive queue.
+ * @bad_recv_wr: On an immediate failure, this parameter will reference
+ *   the work request that failed to be posted on the QP.
+ */
+static inline int ib_post_recv(struct ib_qp *qp,
+			       struct ib_recv_wr *recv_wr,
+			       struct ib_recv_wr **bad_recv_wr)
+{
+	return qp->device->post_recv(qp, recv_wr, bad_recv_wr);
+}
+
+/**
+ * ib_create_cq - Creates a CQ on the specified device.
+ * @device: The device on which to create the CQ.
+ * @comp_handler: A user-specified callback that is invoked when a
+ *   completion event occurs on the CQ.
+ * @event_handler: A user-specified callback that is invoked when an
+ *   asynchronous event not associated with a completion occurs on the CQ.
+ * @cq_context: Context associated with the CQ returned to the user via
+ *   the associated completion and event handlers.
+ * @cqe: The minimum size of the CQ.
+ *
+ * Users can examine the cq structure to determine the actual CQ size.
+ */
+struct ib_cq *ib_create_cq(struct ib_device *device,
+			   ib_comp_handler comp_handler,
+			   void (*event_handler)(struct ib_event *, void *),
+			   void *cq_context, int cqe);
+
+/**
+ * ib_resize_cq - Modifies the capacity of the CQ.
+ * @cq: The CQ to resize.
+ * @cqe: The minimum size of the CQ.
+ *
+ * Users can examine the cq structure to determine the actual CQ size.
+ */
+int ib_resize_cq(struct ib_cq *cq, int cqe);
+
+/**
+ * ib_destroy_cq - Destroys the specified CQ.
+ * @cq: The CQ to destroy.
+ */
+int ib_destroy_cq(struct ib_cq *cq);
+
+/**
+ * ib_poll_cq - poll a CQ for completion(s)
+ * @cq:the CQ being polled
+ * @num_entries:maximum number of completions to return
+ * @wc:array of at least @num_entries &struct ib_wc where completions
+ *   will be returned
+ *
+ * Poll a CQ for (possibly multiple) completions.  If the return value
+ * is < 0, an error occurred.  If the return value is >= 0, it is the
+ * number of completions returned.  If the return value is
+ * non-negative and < num_entries, then the CQ was emptied.
+ */
+static inline int ib_poll_cq(struct ib_cq *cq, int num_entries,
+			     struct ib_wc *wc)
+{
+	return cq->device->poll_cq(cq, num_entries, wc);
+}
+
+/**
+ * ib_peek_cq - Returns the number of unreaped completions currently
+ *   on the specified CQ.
+ * @cq: The CQ to peek.
+ * @wc_cnt: A minimum number of unreaped completions to check for.
+ *
+ * If the number of unreaped completions is greater than or equal to wc_cnt,
+ * this function returns wc_cnt, otherwise, it returns the actual number of
+ * unreaped completions.
+ */
+int ib_peek_cq(struct ib_cq *cq, int wc_cnt);
+
+/**
+ * ib_req_notify_cq - Request completion notification on a CQ.
+ * @cq: The CQ to generate an event for.
+ * @cq_notify: If set to %IB_CQ_SOLICITED, completion notification will
+ *   occur on the next solicited event. If set to %IB_CQ_NEXT_COMP,
+ *   notification will occur on the next completion.
+ */
+static inline int ib_req_notify_cq(struct ib_cq *cq,
+				   enum ib_cq_notify cq_notify)
+{
+	return cq->device->req_notify_cq(cq, cq_notify);
+}
+
+/**
+ * ib_req_ncomp_notif - Request completion notification when there are
+ *   at least the specified number of unreaped completions on the CQ.
+ * @cq: The CQ to generate an event for.
+ * @wc_cnt: The number of unreaped completions that should be on the
+ *   CQ before an event is generated.
+ */
+static inline int ib_req_ncomp_notif(struct ib_cq *cq, int wc_cnt)
+{
+	return cq->device->req_ncomp_notif ?
+		cq->device->req_ncomp_notif(cq, wc_cnt) :
+		-ENOSYS;
+}
+
+/**
+ * ib_get_dma_mr - Returns a memory region for system memory that is
+ *   usable for DMA.
+ * @pd: The protection domain associated with the memory region.
+ * @mr_access_flags: Specifies the memory access rights.
+ */
+struct ib_mr *ib_get_dma_mr(struct ib_pd *pd, int mr_access_flags);
+
+/**
+ * ib_reg_phys_mr - Prepares a virtually addressed memory region for use
+ *   by an HCA.
+ * @pd: The protection domain associated assigned to the registered region.
+ * @phys_buf_array: Specifies a list of physical buffers to use in the
+ *   memory region.
+ * @num_phys_buf: Specifies the size of the phys_buf_array.
+ * @mr_access_flags: Specifies the memory access rights.
+ * @iova_start: The offset of the region's starting I/O virtual address.
+ */
+struct ib_mr *ib_reg_phys_mr(struct ib_pd *pd,
+			     struct ib_phys_buf *phys_buf_array,
+			     int num_phys_buf,
+			     int mr_access_flags,
+			     u64 *iova_start);
+
+/**
+ * ib_rereg_phys_mr - Modifies the attributes of an existing memory region.
+ *   Conceptually, this call performs the functions deregister memory region
+ *   followed by register physical memory region.  Where possible,
+ *   resources are reused instead of deallocated and reallocated.
+ * @mr: The memory region to modify.
+ * @mr_rereg_mask: A bit-mask used to indicate which of the following
+ *   properties of the memory region are being modified.
+ * @pd: If %IB_MR_REREG_PD is set in mr_rereg_mask, this field specifies
+ *   the new protection domain to associated with the memory region,
+ *   otherwise, this parameter is ignored.
+ * @phys_buf_array: If %IB_MR_REREG_TRANS is set in mr_rereg_mask, this
+ *   field specifies a list of physical buffers to use in the new
+ *   translation, otherwise, this parameter is ignored.
+ * @num_phys_buf: If %IB_MR_REREG_TRANS is set in mr_rereg_mask, this
+ *   field specifies the size of the phys_buf_array, otherwise, this
+ *   parameter is ignored.
+ * @mr_access_flags: If %IB_MR_REREG_ACCESS is set in mr_rereg_mask, this
+ *   field specifies the new memory access rights, otherwise, this
+ *   parameter is ignored.
+ * @iova_start: The offset of the region's starting I/O virtual address.
+ */
+int ib_rereg_phys_mr(struct ib_mr *mr,
+		     int mr_rereg_mask,
+		     struct ib_pd *pd,
+		     struct ib_phys_buf *phys_buf_array,
+		     int num_phys_buf,
+		     int mr_access_flags,
+		     u64 *iova_start);
+
+/**
+ * ib_query_mr - Retrieves information about a specific memory region.
+ * @mr: The memory region to retrieve information about.
+ * @mr_attr: The attributes of the specified memory region.
+ */
+int ib_query_mr(struct ib_mr *mr, struct ib_mr_attr *mr_attr);
+
+/**
+ * ib_dereg_mr - Deregisters a memory region and removes it from the
+ *   HCA translation table.
+ * @mr: The memory region to deregister.
+ */
+int ib_dereg_mr(struct ib_mr *mr);
+
+/**
+ * ib_alloc_mw - Allocates a memory window.
+ * @pd: The protection domain associated with the memory window.
+ */
+struct ib_mw *ib_alloc_mw(struct ib_pd *pd);
+
+/**
+ * ib_bind_mw - Posts a work request to the send queue of the specified
+ *   QP, which binds the memory window to the given address range and
+ *   remote access attributes.
+ * @qp: QP to post the bind work request on.
+ * @mw: The memory window to bind.
+ * @mw_bind: Specifies information about the memory window, including
+ *   its address range, remote access rights, and associated memory region.
+ */
+static inline int ib_bind_mw(struct ib_qp *qp,
+			     struct ib_mw *mw,
+			     struct ib_mw_bind *mw_bind)
+{
+	/* XXX reference counting in corresponding MR? */
+	return mw->device->bind_mw ?
+		mw->device->bind_mw(qp, mw, mw_bind) :
+		-ENOSYS;
+}
+
+/**
+ * ib_dealloc_mw - Deallocates a memory window.
+ * @mw: The memory window to deallocate.
+ */
+int ib_dealloc_mw(struct ib_mw *mw);
+
+/**
+ * ib_alloc_fmr - Allocates a unmapped fast memory region.
+ * @pd: The protection domain associated with the unmapped region.
+ * @mr_access_flags: Specifies the memory access rights.
+ * @fmr_attr: Attributes of the unmapped region.
+ *
+ * A fast memory region must be mapped before it can be used as part of
+ * a work request.
+ */
+struct ib_fmr *ib_alloc_fmr(struct ib_pd *pd,
+			    int mr_access_flags,
+			    struct ib_fmr_attr *fmr_attr);
+
+/**
+ * ib_map_phys_fmr - Maps a list of physical pages to a fast memory region.
+ * @fmr: The fast memory region to associate with the pages.
+ * @page_list: An array of physical pages to map to the fast memory region.
+ * @list_len: The number of pages in page_list.
+ * @iova: The I/O virtual address to use with the mapped region.
+ */
+static inline int ib_map_phys_fmr(struct ib_fmr *fmr,
+				  u64 *page_list, int list_len,
+				  u64 iova)
+{
+	return fmr->device->map_phys_fmr(fmr, page_list, list_len, iova);
+}
+
+/**
+ * ib_unmap_fmr - Removes the mapping from a list of fast memory regions.
+ * @fmr_list: A linked list of fast memory regions to unmap.
+ */
+int ib_unmap_fmr(struct list_head *fmr_list);
+
+/**
+ * ib_dealloc_fmr - Deallocates a fast memory region.
+ * @fmr: The fast memory region to deallocate.
+ */
+int ib_dealloc_fmr(struct ib_fmr *fmr);
+
+/**
+ * ib_attach_mcast - Attaches the specified QP to a multicast group.
+ * @qp: QP to attach to the multicast group.  The QP must be type
+ *   IB_QPT_UD.
+ * @gid: Multicast group GID.
+ * @lid: Multicast group LID in host byte order.
+ *
+ * In order to send and receive multicast packets, subnet
+ * administration must have created the multicast group and configured
+ * the fabric appropriately.  The port associated with the specified
+ * QP must also be a member of the multicast group.
+ */
+int ib_attach_mcast(struct ib_qp *qp, union ib_gid *gid, u16 lid);
+
+/**
+ * ib_detach_mcast - Detaches the specified QP from a multicast group.
+ * @qp: QP to detach from the multicast group.
+ * @gid: Multicast group GID.
+ * @lid: Multicast group LID in host byte order.
+ */
+int ib_detach_mcast(struct ib_qp *qp, union ib_gid *gid, u16 lid);
+
+#endif /* IB_VERBS_H */
diff -Nru a/drivers/infiniband/ulp/ipoib/Kconfig b/drivers/infiniband/ulp/ipoib/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/ulp/ipoib/Kconfig	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,33 @@
+config INFINIBAND_IPOIB
+	tristate "IP-over-InfiniBand"
+	depends on INFINIBAND && NETDEVICES && INET
+	---help---
+	  Support for the IP-over-InfiniBand protocol (IPoIB). This
+	  transports IP packets over InfiniBand so you can use your IB
+	  device as a fancy NIC.
+
+	  The IPoIB protocol is defined by the IETF ipoib working
+	  group: <http://www.ietf.org/html.charters/ipoib-charter.html>.
+
+config INFINIBAND_IPOIB_DEBUG
+	bool "IP-over-InfiniBand debugging"
+	depends on INFINIBAND_IPOIB
+	---help---
+	  This option causes debugging code to be compiled into the
+	  IPoIB driver.  The output can be turned on via the
+	  debug_level and mcast_debug_level module parameters (which
+	  can also be set after the driver is loaded through sysfs).
+
+	  This option also creates an "ipoib_debugfs," which can be
+	  mounted to expose debugging information about IB multicast
+	  groups used by the IPoIB driver.
+
+config INFINIBAND_IPOIB_DEBUG_DATA
+	bool "IP-over-InfiniBand data path debugging"
+	depends on INFINIBAND_IPOIB_DEBUG
+	---help---
+	  This option compiles debugging code into the the data path
+	  of the IPoIB driver.  The output can be turned on via the
+	  data_debug_level module parameter; however, even with output
+	  turned off, this debugging code will have some performance
+	  impact.
diff -Nru a/drivers/infiniband/ulp/ipoib/Makefile b/drivers/infiniband/ulp/ipoib/Makefile
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/ulp/ipoib/Makefile	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,11 @@
+EXTRA_CFLAGS += -Idrivers/infiniband/include
+
+obj-$(CONFIG_INFINIBAND_IPOIB)			+= ib_ipoib.o
+
+ib_ipoib-y					:= ipoib_main.o \
+						   ipoib_ib.o \
+						   ipoib_multicast.o \
+						   ipoib_verbs.o \
+						   ipoib_vlan.o
+ib_ipoib-$(CONFIG_INFINIBAND_IPOIB_DEBUG)	+= ipoib_fs.o
+
diff -Nru a/drivers/infiniband/ulp/ipoib/ipoib.h b/drivers/infiniband/ulp/ipoib/ipoib.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/ulp/ipoib/ipoib.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,350 @@
+/*
+ * Copyright (c) 2004 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: ipoib.h 1358 2004-12-17 22:00:11Z roland $
+ */
+
+#ifndef _IPOIB_H
+#define _IPOIB_H
+
+#include <linux/list.h>
+#include <linux/skbuff.h>
+#include <linux/netdevice.h>
+#include <linux/workqueue.h>
+#include <linux/pci.h>
+#include <linux/config.h>
+#include <linux/kref.h>
+#include <linux/if_infiniband.h>
+
+#include <net/neighbour.h>
+
+#include <asm/atomic.h>
+#include <asm/semaphore.h>
+
+#include <ib_verbs.h>
+#include <ib_pack.h>
+#include <ib_sa.h>
+
+/* constants */
+
+enum {
+	IPOIB_PACKET_SIZE         = 2048,
+	IPOIB_BUF_SIZE 		  = IPOIB_PACKET_SIZE + IB_GRH_BYTES,
+
+	IPOIB_ENCAP_LEN 	  = 4,
+
+	IPOIB_RX_RING_SIZE 	  = 128,
+	IPOIB_TX_RING_SIZE 	  = 64,
+
+	IPOIB_NUM_WC 		  = 4,
+
+	IPOIB_MAX_PATH_REC_QUEUE  = 3,
+	IPOIB_MAX_MCAST_QUEUE     = 3,
+
+	IPOIB_FLAG_OPER_UP 	  = 0,
+	IPOIB_FLAG_ADMIN_UP 	  = 1,
+	IPOIB_PKEY_ASSIGNED 	  = 2,
+	IPOIB_PKEY_STOP 	  = 3,
+	IPOIB_FLAG_SUBINTERFACE   = 4,
+	IPOIB_MCAST_RUN 	  = 5,
+	IPOIB_STOP_REAPER         = 6,
+
+	IPOIB_MAX_BACKOFF_SECONDS = 16,
+
+	IPOIB_MCAST_FLAG_FOUND 	  = 0,	/* used in set_multicast_list */
+	IPOIB_MCAST_FLAG_SENDONLY = 1,
+	IPOIB_MCAST_FLAG_BUSY 	  = 2,	/* joining or already joined */
+	IPOIB_MCAST_FLAG_ATTACHED = 3,
+};
+
+/* structs */
+
+struct ipoib_header {
+	u16 proto;
+	u16 reserved;
+};
+
+struct ipoib_pseudoheader {
+	u8  hwaddr[INFINIBAND_ALEN];
+};
+
+struct ipoib_mcast;
+
+struct ipoib_buf {
+	struct sk_buff *skb;
+	DECLARE_PCI_UNMAP_ADDR(mapping)
+};
+
+/*
+ * Device private locking: tx_lock protects members used in TX fast
+ * path (and we use LLTX so upper layers don't do extra locking).
+ * lock protects everything else.  lock nests inside of tx_lock (ie
+ * tx_lock must be acquired first if needed).
+ */
+struct ipoib_dev_priv {
+	spinlock_t lock;
+
+	struct net_device *dev;
+
+	unsigned long flags;
+
+	struct semaphore mcast_mutex;
+	struct semaphore vlan_mutex;
+
+	struct rb_root  path_tree;
+	struct list_head path_list;
+
+	struct ipoib_mcast *broadcast;
+	struct list_head multicast_list;
+	struct rb_root multicast_tree;
+
+	struct work_struct pkey_task;
+	struct work_struct mcast_task;
+	struct work_struct flush_task;
+	struct work_struct restart_task;
+	struct work_struct ah_reap_task;
+
+	struct ib_device *ca;
+	u8            	  port;
+	u16           	  pkey;
+	struct ib_pd  	 *pd;
+	struct ib_mr  	 *mr;
+	struct ib_cq  	 *cq;
+	struct ib_qp  	 *qp;
+	u32           	  qkey;
+
+	union ib_gid local_gid;
+	u16          local_lid;
+
+	unsigned int admin_mtu;
+	unsigned int mcast_mtu;
+
+	struct ipoib_buf *rx_ring;
+
+	spinlock_t tx_lock;
+	struct ipoib_buf *tx_ring;
+	unsigned tx_head;
+	unsigned tx_tail;
+
+	struct ib_wc ibwc[IPOIB_NUM_WC];
+
+	struct list_head dead_ahs;
+
+	struct ib_event_handler event_handler;
+
+	struct net_device_stats stats;
+
+	struct net_device *parent;
+	struct list_head child_intfs;
+	struct list_head list;
+
+#ifdef CONFIG_INFINIBAND_IPOIB_DEBUG
+	struct list_head fs_list;
+	struct dentry *mcg_dentry;
+#endif
+};
+
+struct ipoib_ah {
+	struct net_device *dev;
+	struct ib_ah      *ah;
+	struct list_head   list;
+	struct kref        ref;
+	unsigned           last_send;
+};
+
+struct ipoib_path {
+	struct net_device    *dev;
+	struct ib_sa_path_rec pathrec;
+	struct ipoib_ah      *ah;
+	struct sk_buff_head   queue;
+
+	struct list_head      neigh_list;
+
+	int                   query_id;
+	struct ib_sa_query   *query;
+	struct completion     done;
+
+	struct rb_node        rb_node;
+	struct list_head      list;
+};
+
+struct ipoib_neigh {
+	struct ipoib_ah    *ah;
+	struct sk_buff_head queue;
+
+	struct neighbour   *neighbour;
+
+	struct list_head    list;
+};
+
+static inline struct ipoib_neigh **to_ipoib_neigh(struct neighbour *neigh)
+{
+	return (struct ipoib_neigh **) (neigh->ha + 24 -
+					(offsetof(struct neighbour, ha) & 4));
+}
+
+extern struct workqueue_struct *ipoib_workqueue;
+
+/* functions */
+
+void ipoib_ib_completion(struct ib_cq *cq, void *dev_ptr);
+
+struct ipoib_ah *ipoib_create_ah(struct net_device *dev,
+				 struct ib_pd *pd, struct ib_ah_attr *attr);
+void ipoib_free_ah(struct kref *kref);
+static inline void ipoib_put_ah(struct ipoib_ah *ah)
+{
+	kref_put(&ah->ref, ipoib_free_ah);
+}
+
+int ipoib_add_pkey_attr(struct net_device *dev);
+
+void ipoib_send(struct net_device *dev, struct sk_buff *skb,
+		struct ipoib_ah *address, u32 qpn);
+void ipoib_reap_ah(void *dev_ptr);
+
+void ipoib_flush_paths(struct net_device *dev);
+struct ipoib_dev_priv *ipoib_intf_alloc(const char *format);
+
+int ipoib_ib_dev_init(struct net_device *dev, struct ib_device *ca, int port);
+void ipoib_ib_dev_flush(void *dev);
+void ipoib_ib_dev_cleanup(struct net_device *dev);
+
+int ipoib_ib_dev_open(struct net_device *dev);
+int ipoib_ib_dev_up(struct net_device *dev);
+int ipoib_ib_dev_down(struct net_device *dev);
+int ipoib_ib_dev_stop(struct net_device *dev);
+
+int ipoib_dev_init(struct net_device *dev, struct ib_device *ca, int port);
+void ipoib_dev_cleanup(struct net_device *dev);
+
+void ipoib_mcast_join_task(void *dev_ptr);
+void ipoib_mcast_send(struct net_device *dev, union ib_gid *mgid,
+		      struct sk_buff *skb);
+
+void ipoib_mcast_restart_task(void *dev_ptr);
+int ipoib_mcast_start_thread(struct net_device *dev);
+int ipoib_mcast_stop_thread(struct net_device *dev);
+
+void ipoib_mcast_dev_down(struct net_device *dev);
+void ipoib_mcast_dev_flush(struct net_device *dev);
+
+struct ipoib_mcast_iter *ipoib_mcast_iter_init(struct net_device *dev);
+void ipoib_mcast_iter_free(struct ipoib_mcast_iter *iter);
+int ipoib_mcast_iter_next(struct ipoib_mcast_iter *iter);
+void ipoib_mcast_iter_read(struct ipoib_mcast_iter *iter,
+				  union ib_gid *gid,
+				  unsigned long *created,
+				  unsigned int *queuelen,
+				  unsigned int *complete,
+				  unsigned int *send_only);
+
+int ipoib_mcast_attach(struct net_device *dev, u16 mlid,
+		       union ib_gid *mgid);
+int ipoib_mcast_detach(struct net_device *dev, u16 mlid,
+		       union ib_gid *mgid);
+
+int ipoib_qp_create(struct net_device *dev);
+int ipoib_transport_dev_init(struct net_device *dev, struct ib_device *ca);
+void ipoib_transport_dev_cleanup(struct net_device *dev);
+
+void ipoib_event(struct ib_event_handler *handler,
+		 struct ib_event *record);
+
+int ipoib_vlan_add(struct net_device *pdev, unsigned short pkey);
+int ipoib_vlan_delete(struct net_device *pdev, unsigned short pkey);
+
+void ipoib_pkey_poll(void *dev);
+int ipoib_pkey_dev_delay_open(struct net_device *dev);
+
+#ifdef CONFIG_INFINIBAND_IPOIB_DEBUG
+int ipoib_create_debug_file(struct net_device *dev);
+void ipoib_delete_debug_file(struct net_device *dev);
+int ipoib_register_debugfs(void);
+void ipoib_unregister_debugfs(void);
+#else
+static inline int ipoib_create_debug_file(struct net_device *dev) { return 0; }
+static inline void ipoib_delete_debug_file(struct net_device *dev) { }
+static inline int ipoib_register_debugfs(void) { return 0; }
+static inline void ipoib_unregister_debugfs(void) { }
+#endif
+
+
+#define ipoib_printk(level, priv, format, arg...)	\
+	printk(level "%s: " format, ((struct ipoib_dev_priv *) priv)->dev->name , ## arg)
+#define ipoib_warn(priv, format, arg...)		\
+	ipoib_printk(KERN_WARNING, priv, format , ## arg)
+
+
+#ifdef CONFIG_INFINIBAND_IPOIB_DEBUG
+extern int debug_level;
+
+#define ipoib_dbg(priv, format, arg...)			\
+	do {					        \
+		if (debug_level > 0)			\
+			ipoib_printk(KERN_DEBUG, priv, format , ## arg); \
+	} while (0)
+#define ipoib_dbg_mcast(priv, format, arg...)		\
+	do {					        \
+		if (mcast_debug_level > 0)		\
+			ipoib_printk(KERN_DEBUG, priv, format , ## arg); \
+	} while (0)
+#else /* CONFIG_INFINIBAND_IPOIB_DEBUG */
+#define ipoib_dbg(priv, format, arg...)			\
+	do { (void) (priv); } while (0)
+#define ipoib_dbg_mcast(priv, format, arg...)		\
+	do { (void) (priv); } while (0)
+#endif /* CONFIG_INFINIBAND_IPOIB_DEBUG */
+
+#ifdef CONFIG_INFINIBAND_IPOIB_DEBUG_DATA
+#define ipoib_dbg_data(priv, format, arg...)		\
+	do {					        \
+		if (data_debug_level > 0)		\
+			ipoib_printk(KERN_DEBUG, priv, format , ## arg); \
+	} while (0)
+#else /* CONFIG_INFINIBAND_IPOIB_DEBUG_DATA */
+#define ipoib_dbg_data(priv, format, arg...)		\
+	do { (void) (priv); } while (0)
+#endif /* CONFIG_INFINIBAND_IPOIB_DEBUG_DATA */
+
+
+#define IPOIB_GID_FMT		"%x:%x:%x:%x:%x:%x:%x:%x"
+
+#define IPOIB_GID_ARG(gid)	be16_to_cpup((__be16 *) ((gid).raw +  0)), \
+				be16_to_cpup((__be16 *) ((gid).raw +  2)), \
+				be16_to_cpup((__be16 *) ((gid).raw +  4)), \
+				be16_to_cpup((__be16 *) ((gid).raw +  6)), \
+				be16_to_cpup((__be16 *) ((gid).raw +  8)), \
+				be16_to_cpup((__be16 *) ((gid).raw + 10)), \
+				be16_to_cpup((__be16 *) ((gid).raw + 12)), \
+				be16_to_cpup((__be16 *) ((gid).raw + 14))
+
+#endif /* _IPOIB_H */
diff -Nru a/drivers/infiniband/ulp/ipoib/ipoib_fs.c b/drivers/infiniband/ulp/ipoib/ipoib_fs.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/ulp/ipoib/ipoib_fs.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,287 @@
+/*
+ * Copyright (c) 2004 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: ipoib_fs.c 1389 2004-12-27 22:56:47Z roland $
+ */
+
+#include <linux/pagemap.h>
+#include <linux/seq_file.h>
+
+#include "ipoib.h"
+
+enum {
+	IPOIB_MAGIC = 0x49504942 /* "IPIB" */
+};
+
+static DECLARE_MUTEX(ipoib_fs_mutex);
+static struct dentry *ipoib_root;
+static struct super_block *ipoib_sb;
+static LIST_HEAD(ipoib_device_list);
+
+static void *ipoib_mcg_seq_start(struct seq_file *file, loff_t *pos)
+{
+	struct ipoib_mcast_iter *iter;
+	loff_t n = *pos;
+
+	iter = ipoib_mcast_iter_init(file->private);
+	if (!iter)
+		return NULL;
+
+	while (n--) {
+		if (ipoib_mcast_iter_next(iter)) {
+			ipoib_mcast_iter_free(iter);
+			return NULL;
+		}
+	}
+
+	return iter;
+}
+
+static void *ipoib_mcg_seq_next(struct seq_file *file, void *iter_ptr,
+				   loff_t *pos)
+{
+	struct ipoib_mcast_iter *iter = iter_ptr;
+
+	(*pos)++;
+
+	if (ipoib_mcast_iter_next(iter)) {
+		ipoib_mcast_iter_free(iter);
+		return NULL;
+	}
+
+	return iter;
+}
+
+static void ipoib_mcg_seq_stop(struct seq_file *file, void *iter_ptr)
+{
+	/* nothing for now */
+}
+
+static int ipoib_mcg_seq_show(struct seq_file *file, void *iter_ptr)
+{
+	struct ipoib_mcast_iter *iter = iter_ptr;
+	char gid_buf[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"];
+	union ib_gid mgid;
+	int i, n;
+	unsigned long created;
+	unsigned int queuelen, complete, send_only;
+
+	if (iter) {
+		ipoib_mcast_iter_read(iter, &mgid, &created, &queuelen,
+				      &complete, &send_only);
+
+		for (n = 0, i = 0; i < sizeof mgid / 2; ++i) {
+			n += sprintf(gid_buf + n, "%x",
+				     be16_to_cpu(((u16 *)mgid.raw)[i]));
+			if (i < sizeof mgid / 2 - 1)
+				gid_buf[n++] = ':';
+		}
+	}
+
+	seq_printf(file, "GID: %*s", -(1 + (int) sizeof gid_buf), gid_buf);
+
+	seq_printf(file,
+		   " created: %10ld queuelen: %4d complete: %d send_only: %d\n",
+		   created, queuelen, complete, send_only);
+
+	return 0;
+}
+
+static struct seq_operations ipoib_seq_ops = {
+	.start = ipoib_mcg_seq_start,
+	.next  = ipoib_mcg_seq_next,
+	.stop  = ipoib_mcg_seq_stop,
+	.show  = ipoib_mcg_seq_show,
+};
+
+static int ipoib_mcg_open(struct inode *inode, struct file *file)
+{
+	struct seq_file *seq;
+	int ret;
+
+	ret = seq_open(file, &ipoib_seq_ops);
+	if (ret)
+		return ret;
+
+	seq = file->private_data;
+	seq->private = inode->u.generic_ip;
+
+	return 0;
+}
+
+static struct file_operations ipoib_fops = {
+	.owner   = THIS_MODULE,
+	.open    = ipoib_mcg_open,
+	.read    = seq_read,
+	.llseek  = seq_lseek,
+	.release = seq_release
+};
+
+static struct inode *ipoib_get_inode(void)
+{
+	struct inode *inode = new_inode(ipoib_sb);
+
+	if (inode) {
+		inode->i_mode 	 = S_IFREG | S_IRUGO;
+		inode->i_uid 	 = 0;
+		inode->i_gid 	 = 0;
+		inode->i_blksize = PAGE_CACHE_SIZE;
+		inode->i_blocks  = 0;
+		inode->i_atime 	 = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+		inode->i_fop     = &ipoib_fops;
+	}
+
+	return inode;
+}
+
+static int __ipoib_create_debug_file(struct net_device *dev)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+	struct dentry *dentry;
+	struct inode *inode;
+	char name[IFNAMSIZ + sizeof "_mcg"];
+
+	snprintf(name, sizeof name, "%s_mcg", dev->name);
+
+	dentry = d_alloc_name(ipoib_root, name);
+	if (!dentry)
+		return -ENOMEM;
+
+	inode = ipoib_get_inode();
+	if (!inode) {
+		dput(dentry);
+		return -ENOMEM;
+	}
+
+	inode->u.generic_ip = dev;
+	priv->mcg_dentry = dentry;
+
+	d_add(dentry, inode);
+
+	return 0;
+}
+
+int ipoib_create_debug_file(struct net_device *dev)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+
+	down(&ipoib_fs_mutex);
+
+	list_add_tail(&priv->fs_list, &ipoib_device_list);
+
+	if (!ipoib_sb) {
+		up(&ipoib_fs_mutex);
+		return 0;
+	}
+
+	up(&ipoib_fs_mutex);
+
+	return __ipoib_create_debug_file(dev);
+}
+
+void ipoib_delete_debug_file(struct net_device *dev)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+
+	down(&ipoib_fs_mutex);
+	list_del(&priv->fs_list);
+	if (!ipoib_sb) {
+		up(&ipoib_fs_mutex);
+		return;
+	}
+	up(&ipoib_fs_mutex);
+
+	if (priv->mcg_dentry) {
+		d_drop(priv->mcg_dentry);
+		simple_unlink(ipoib_root->d_inode, priv->mcg_dentry);
+	}
+}
+
+static int ipoib_fill_super(struct super_block *sb, void *data, int silent)
+{
+	static struct tree_descr ipoib_files[] = {
+		{ "" }
+	};
+	struct ipoib_dev_priv *priv;
+	int ret;
+
+	ret = simple_fill_super(sb, IPOIB_MAGIC, ipoib_files);
+	if (ret)
+		return ret;
+
+	ipoib_root = sb->s_root;
+
+	down(&ipoib_fs_mutex);
+
+	ipoib_sb = sb;
+
+	list_for_each_entry(priv, &ipoib_device_list, fs_list) {
+		ret = __ipoib_create_debug_file(priv->dev);
+		if (ret)
+			break;
+	}
+
+	up(&ipoib_fs_mutex);
+
+	return ret;
+}
+
+static struct super_block *ipoib_get_sb(struct file_system_type *fs_type,
+	int flags, const char *dev_name, void *data)
+{
+	return get_sb_single(fs_type, flags, data, ipoib_fill_super);
+}
+
+static void ipoib_kill_sb(struct super_block *sb)
+{
+	down(&ipoib_fs_mutex);
+	ipoib_sb = NULL;
+	up(&ipoib_fs_mutex);
+
+	kill_litter_super(sb);
+}
+
+static struct file_system_type ipoib_fs_type = {
+	.owner		= THIS_MODULE,
+	.name		= "ipoib_debugfs",
+	.get_sb		= ipoib_get_sb,
+	.kill_sb	= ipoib_kill_sb,
+};
+
+int ipoib_register_debugfs(void)
+{
+	return register_filesystem(&ipoib_fs_type);
+}
+
+void ipoib_unregister_debugfs(void)
+{
+	unregister_filesystem(&ipoib_fs_type);
+}
diff -Nru a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,678 @@
+/*
+ * Copyright (c) 2004 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: ipoib_ib.c 1386 2004-12-27 16:23:17Z roland $
+ */
+
+#include <linux/delay.h>
+#include <linux/dma-mapping.h>
+
+#include <ib_cache.h>
+
+#include "ipoib.h"
+
+#ifdef CONFIG_INFINIBAND_IPOIB_DEBUG_DATA
+int data_debug_level;
+
+module_param(data_debug_level, int, 0644);
+MODULE_PARM_DESC(data_debug_level,
+		 "Enable data path debug tracing if > 0");
+#endif
+
+#define	IPOIB_OP_RECV	(1ul << 31)
+
+static DECLARE_MUTEX(pkey_sem);
+
+struct ipoib_ah *ipoib_create_ah(struct net_device *dev,
+				 struct ib_pd *pd, struct ib_ah_attr *attr)
+{
+	struct ipoib_ah *ah;
+
+	ah = kmalloc(sizeof *ah, GFP_KERNEL);
+	if (!ah)
+		return NULL;
+
+	ah->dev       = dev;
+	ah->last_send = 0;
+	kref_init(&ah->ref);
+
+	ah->ah = ib_create_ah(pd, attr);
+	if (IS_ERR(ah->ah)) {
+		kfree(ah);
+		ah = NULL;
+	} else
+		ipoib_dbg(netdev_priv(dev), "Created ah %p\n", ah->ah);
+
+	return ah;
+}
+
+void ipoib_free_ah(struct kref *kref)
+{
+	struct ipoib_ah *ah = container_of(kref, struct ipoib_ah, ref);
+	struct ipoib_dev_priv *priv = netdev_priv(ah->dev);
+
+	unsigned long flags;
+
+	if (ah->last_send <= priv->tx_tail) {
+		ipoib_dbg(priv, "Freeing ah %p\n", ah->ah);
+		ib_destroy_ah(ah->ah);
+		kfree(ah);
+	} else {
+		spin_lock_irqsave(&priv->lock, flags);
+		list_add_tail(&ah->list, &priv->dead_ahs);
+		spin_unlock_irqrestore(&priv->lock, flags);
+	}
+}
+
+static inline int ipoib_ib_receive(struct ipoib_dev_priv *priv,
+				   unsigned int wr_id,
+				   dma_addr_t addr)
+{
+	struct ib_sge list = {
+		.addr    = addr,
+		.length  = IPOIB_BUF_SIZE,
+		.lkey    = priv->mr->lkey,
+	};
+	struct ib_recv_wr param = {
+		.wr_id 	    = wr_id | IPOIB_OP_RECV,
+		.sg_list    = &list,
+		.num_sge    = 1,
+		.recv_flags = IB_RECV_SIGNALED
+	};
+	struct ib_recv_wr *bad_wr;
+
+	return ib_post_recv(priv->qp, &param, &bad_wr);
+}
+
+static int ipoib_ib_post_receive(struct net_device *dev, int id)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+	struct sk_buff *skb;
+	dma_addr_t addr;
+	int ret;
+
+	skb = dev_alloc_skb(IPOIB_BUF_SIZE + 4);
+	if (!skb) {
+		ipoib_warn(priv, "failed to allocate receive buffer\n");
+
+		priv->rx_ring[id].skb = NULL;
+		return -ENOMEM;
+	}
+	skb_reserve(skb, 4);	/* 16 byte align IP header */
+	priv->rx_ring[id].skb = skb;
+	addr = dma_map_single(priv->ca->dma_device,
+			      skb->data, IPOIB_BUF_SIZE,
+			      DMA_FROM_DEVICE);
+	pci_unmap_addr_set(&priv->rx_ring[id], mapping, addr);
+
+	ret = ipoib_ib_receive(priv, id, addr);
+	if (ret) {
+		ipoib_warn(priv, "ipoib_ib_receive failed for buf %d (%d)\n",
+			   id, ret);
+		priv->rx_ring[id].skb = NULL;
+	}
+
+	return ret;
+}
+
+static int ipoib_ib_post_receives(struct net_device *dev)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+	int i;
+
+	for (i = 0; i < IPOIB_RX_RING_SIZE; ++i) {
+		if (ipoib_ib_post_receive(dev, i)) {
+			ipoib_warn(priv, "ipoib_ib_post_receive failed for buf %d\n", i);
+			return -EIO;
+		}
+	}
+
+	return 0;
+}
+
+static void ipoib_ib_handle_wc(struct net_device *dev,
+			       struct ib_wc *wc)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+	unsigned int wr_id = wc->wr_id;
+
+	ipoib_dbg_data(priv, "called: id %d, op %d, status: %d\n",
+		       wr_id, wc->opcode, wc->status);
+
+	if (wr_id & IPOIB_OP_RECV) {
+		wr_id &= ~IPOIB_OP_RECV;
+
+		if (wr_id < IPOIB_RX_RING_SIZE) {
+			struct sk_buff *skb = priv->rx_ring[wr_id].skb;
+
+			priv->rx_ring[wr_id].skb = NULL;
+
+			dma_unmap_single(priv->ca->dma_device,
+					 pci_unmap_addr(&priv->rx_ring[wr_id],
+							mapping),
+					 IPOIB_BUF_SIZE,
+					 DMA_FROM_DEVICE);
+
+			if (wc->status != IB_WC_SUCCESS) {
+				if (wc->status != IB_WC_WR_FLUSH_ERR)
+					ipoib_warn(priv, "failed recv event "
+						   "(status=%d, wrid=%d vend_err %x)\n",
+						   wc->status, wr_id, wc->vendor_err);
+				dev_kfree_skb_any(skb);
+				return;
+			}
+
+			ipoib_dbg_data(priv, "received %d bytes, SLID 0x%04x\n",
+				       wc->byte_len, wc->slid);
+
+			skb_put(skb, wc->byte_len);
+			skb_pull(skb, IB_GRH_BYTES);
+
+			if (wc->slid != priv->local_lid ||
+			    wc->src_qp != priv->qp->qp_num) {
+				skb->protocol = ((struct ipoib_header *) skb->data)->proto;
+
+				skb_pull(skb, IPOIB_ENCAP_LEN);
+
+				dev->last_rx = jiffies;
+				++priv->stats.rx_packets;
+				priv->stats.rx_bytes += skb->len;
+
+				skb->dev = dev;
+				/* XXX get correct PACKET_ type here */
+				skb->pkt_type = PACKET_HOST;
+				netif_rx_ni(skb);
+			} else {
+				ipoib_dbg_data(priv, "dropping loopback packet\n");
+				dev_kfree_skb_any(skb);
+			}
+
+			/* repost receive */
+			if (ipoib_ib_post_receive(dev, wr_id))
+				ipoib_warn(priv, "ipoib_ib_post_receive failed "
+					   "for buf %d\n", wr_id);
+		} else
+			ipoib_warn(priv, "completion event with wrid %d\n",
+				   wr_id);
+
+	} else {
+		struct ipoib_buf *tx_req;
+		unsigned long flags;
+
+		if (wr_id >= IPOIB_TX_RING_SIZE) {
+			ipoib_warn(priv, "completion event with wrid %d (> %d)\n",
+				   wr_id, IPOIB_TX_RING_SIZE);
+			return;
+		}
+
+		ipoib_dbg_data(priv, "send complete, wrid %d\n", wr_id);
+
+		tx_req = &priv->tx_ring[wr_id];
+
+		dma_unmap_single(priv->ca->dma_device,
+				 pci_unmap_addr(tx_req, mapping),
+				 tx_req->skb->len,
+				 DMA_TO_DEVICE);
+
+		++priv->stats.tx_packets;
+		priv->stats.tx_bytes += tx_req->skb->len;
+
+		dev_kfree_skb_any(tx_req->skb);
+
+		spin_lock_irqsave(&priv->tx_lock, flags);
+		++priv->tx_tail;
+		if (netif_queue_stopped(dev) &&
+		    priv->tx_head - priv->tx_tail <= IPOIB_TX_RING_SIZE / 2)
+			netif_wake_queue(dev);
+		spin_unlock_irqrestore(&priv->tx_lock, flags);
+
+		if (wc->status != IB_WC_SUCCESS &&
+		    wc->status != IB_WC_WR_FLUSH_ERR)
+			ipoib_warn(priv, "failed send event "
+				   "(status=%d, wrid=%d vend_err %x)\n",
+				   wc->status, wr_id, wc->vendor_err);
+	}
+}
+
+void ipoib_ib_completion(struct ib_cq *cq, void *dev_ptr)
+{
+	struct net_device *dev = (struct net_device *) dev_ptr;
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+	int n, i;
+
+	ib_req_notify_cq(cq, IB_CQ_NEXT_COMP);
+	do {
+		n = ib_poll_cq(cq, IPOIB_NUM_WC, priv->ibwc);
+		for (i = 0; i < n; ++i)
+			ipoib_ib_handle_wc(dev, priv->ibwc + i);
+	} while (n == IPOIB_NUM_WC);
+}
+
+static inline int post_send(struct ipoib_dev_priv *priv,
+			    unsigned int wr_id,
+			    struct ib_ah *address, u32 qpn,
+			    dma_addr_t addr, int len)
+{
+	struct ib_sge list = {
+		.addr    = addr,
+		.length  = len,
+		.lkey    = priv->mr->lkey,
+	};
+	struct ib_send_wr param = {
+		.wr_id = wr_id,
+		.opcode = IB_WR_SEND,
+		.sg_list = &list,
+		.num_sge = 1,
+		.wr = {
+			.ud = {
+				 .remote_qpn = qpn,
+				 .remote_qkey = priv->qkey,
+				 .ah = address
+			 },
+		},
+		.send_flags = IB_SEND_SIGNALED,
+	};
+	struct ib_send_wr *bad_wr;
+
+	return ib_post_send(priv->qp, &param, &bad_wr);
+}
+
+void ipoib_send(struct net_device *dev, struct sk_buff *skb,
+		struct ipoib_ah *address, u32 qpn)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+	struct ipoib_buf *tx_req;
+	dma_addr_t addr;
+
+	if (skb->len > dev->mtu + INFINIBAND_ALEN) {
+		ipoib_warn(priv, "packet len %d (> %d) too long to send, dropping\n",
+			   skb->len, dev->mtu + INFINIBAND_ALEN);
+		++priv->stats.tx_dropped;
+		++priv->stats.tx_errors;
+		dev_kfree_skb_any(skb);
+		return;
+	}
+
+	ipoib_dbg_data(priv, "sending packet, length=%d address=%p qpn=0x%06x\n",
+		       skb->len, address, qpn);
+
+	/*
+	 * We put the skb into the tx_ring _before_ we call post_send()
+	 * because it's entirely possible that the completion handler will
+	 * run before we execute anything after the post_send().  That
+	 * means we have to make sure everything is properly recorded and
+	 * our state is consistent before we call post_send().
+	 */
+	tx_req = &priv->tx_ring[priv->tx_head & (IPOIB_TX_RING_SIZE - 1)];
+	tx_req->skb = skb;
+	addr = dma_map_single(priv->ca->dma_device, skb->data, skb->len,
+			      DMA_TO_DEVICE);
+	pci_unmap_addr_set(tx_req, mapping, addr);
+
+	if (unlikely(post_send(priv, priv->tx_head & (IPOIB_TX_RING_SIZE - 1),
+			       address->ah, qpn, addr, skb->len))) {
+		ipoib_warn(priv, "post_send failed\n");
+		++priv->stats.tx_errors;
+		dma_unmap_single(priv->ca->dma_device, addr, skb->len,
+				 DMA_TO_DEVICE);
+		dev_kfree_skb_any(skb);
+	} else {
+		dev->trans_start = jiffies;
+
+		address->last_send = priv->tx_head;
+		++priv->tx_head;
+
+		if (priv->tx_head - priv->tx_tail == IPOIB_TX_RING_SIZE) {
+			ipoib_dbg(priv, "TX ring full, stopping kernel net queue\n");
+			netif_stop_queue(dev);
+		}
+	}
+}
+
+void __ipoib_reap_ah(struct net_device *dev)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+	struct ipoib_ah *ah, *tah;
+	LIST_HEAD(remove_list);
+
+	spin_lock_irq(&priv->lock);
+	list_for_each_entry_safe(ah, tah, &priv->dead_ahs, list)
+		if (ah->last_send <= priv->tx_tail) {
+			list_del(&ah->list);
+			list_add_tail(&ah->list, &remove_list);
+		}
+	spin_unlock_irq(&priv->lock);
+
+	list_for_each_entry_safe(ah, tah, &remove_list, list) {
+		ipoib_dbg(priv, "Reaping ah %p\n", ah->ah);
+		ib_destroy_ah(ah->ah);
+		kfree(ah);
+	}
+}
+
+void ipoib_reap_ah(void *dev_ptr)
+{
+	struct net_device *dev = dev_ptr;
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+
+	__ipoib_reap_ah(dev);
+
+	if (!test_bit(IPOIB_STOP_REAPER, &priv->flags))
+		queue_delayed_work(ipoib_workqueue, &priv->ah_reap_task, HZ);
+}
+
+int ipoib_ib_dev_open(struct net_device *dev)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+	int ret;
+
+	ret = ipoib_qp_create(dev);
+	if (ret) {
+		ipoib_warn(priv, "ipoib_qp_create returned %d\n", ret);
+		return -1;
+	}
+
+	ret = ipoib_ib_post_receives(dev);
+	if (ret) {
+		ipoib_warn(priv, "ipoib_ib_post_receives returned %d\n", ret);
+		return -1;
+	}
+
+	clear_bit(IPOIB_STOP_REAPER, &priv->flags);
+	queue_delayed_work(ipoib_workqueue, &priv->ah_reap_task, HZ);
+
+	return 0;
+}
+
+int ipoib_ib_dev_up(struct net_device *dev)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+
+	set_bit(IPOIB_FLAG_OPER_UP, &priv->flags);
+
+	return ipoib_mcast_start_thread(dev);
+}
+
+int ipoib_ib_dev_down(struct net_device *dev)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+
+	ipoib_dbg(priv, "downing ib_dev\n");
+
+	clear_bit(IPOIB_FLAG_OPER_UP, &priv->flags);
+	netif_carrier_off(dev);
+
+	/* Shutdown the P_Key thread if still active */
+	if (!test_bit(IPOIB_PKEY_ASSIGNED, &priv->flags)) {
+		down(&pkey_sem);
+		set_bit(IPOIB_PKEY_STOP, &priv->flags);
+		cancel_delayed_work(&priv->pkey_task);
+		up(&pkey_sem);
+		flush_workqueue(ipoib_workqueue);
+	}
+
+	ipoib_mcast_stop_thread(dev);
+
+	/*
+	 * Flush the multicast groups first so we stop any multicast joins. The
+	 * completion thread may have already died and we may deadlock waiting
+	 * for the completion thread to finish some multicast joins.
+	 */
+	ipoib_mcast_dev_flush(dev);
+
+	/* Delete broadcast and local addresses since they will be recreated */
+	ipoib_mcast_dev_down(dev);
+
+	ipoib_flush_paths(dev);
+
+	return 0;
+}
+
+static int recvs_pending(struct net_device *dev)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+	int pending = 0;
+	int i;
+
+	for (i = 0; i < IPOIB_RX_RING_SIZE; ++i)
+		if (priv->rx_ring[i].skb)
+			++pending;
+
+	return pending;
+}
+
+int ipoib_ib_dev_stop(struct net_device *dev)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+	struct ib_qp_attr qp_attr;
+	int attr_mask;
+	unsigned long begin;
+	struct ipoib_buf *tx_req;
+	int i;
+
+	/* Kill the existing QP and allocate a new one */
+	qp_attr.qp_state = IB_QPS_ERR;
+	attr_mask        = IB_QP_STATE;
+	if (ib_modify_qp(priv->qp, &qp_attr, attr_mask))
+		ipoib_warn(priv, "Failed to modify QP to ERROR state\n");
+
+	/* Wait for all sends and receives to complete */
+	begin = jiffies;
+
+	while (priv->tx_head != priv->tx_tail || recvs_pending(dev)) {
+		if (time_after(jiffies, begin + 5 * HZ)) {
+			ipoib_warn(priv, "timing out; %d sends %d receives not completed\n",
+				   priv->tx_head - priv->tx_tail, recvs_pending(dev));
+
+			/*
+			 * assume the HW is wedged and just free up
+			 * all our pending work requests.
+			 */
+			while (priv->tx_tail < priv->tx_head) {
+				tx_req = &priv->tx_ring[priv->tx_tail &
+							(IPOIB_TX_RING_SIZE - 1)];
+				dma_unmap_single(priv->ca->dma_device,
+						 pci_unmap_addr(tx_req, mapping),
+						 tx_req->skb->len,
+						 DMA_TO_DEVICE);
+				dev_kfree_skb_any(tx_req->skb);
+				++priv->tx_tail;
+			}
+
+			for (i = 0; i < IPOIB_RX_RING_SIZE; ++i)
+				if (priv->rx_ring[i].skb) {
+					dma_unmap_single(priv->ca->dma_device,
+							 pci_unmap_addr(&priv->rx_ring[i],
+									mapping),
+							 IPOIB_BUF_SIZE,
+							 DMA_FROM_DEVICE);
+					dev_kfree_skb_any(priv->rx_ring[i].skb);
+					priv->rx_ring[i].skb = NULL;
+				}
+
+			goto timeout;
+		}
+
+		yield();
+	}
+
+	ipoib_dbg(priv, "All sends and receives done.\n");
+
+timeout:
+	qp_attr.qp_state = IB_QPS_RESET;
+	attr_mask        = IB_QP_STATE;
+	if (ib_modify_qp(priv->qp, &qp_attr, attr_mask))
+		ipoib_warn(priv, "Failed to modify QP to RESET state\n");
+
+	/* Wait for all AHs to be reaped */
+	set_bit(IPOIB_STOP_REAPER, &priv->flags);
+	cancel_delayed_work(&priv->ah_reap_task);
+	flush_workqueue(ipoib_workqueue);
+
+	begin = jiffies;
+
+	while (!list_empty(&priv->dead_ahs)) {
+		__ipoib_reap_ah(dev);
+
+		if (time_after(jiffies, begin + HZ)) {
+			ipoib_warn(priv, "timing out; will leak address handles\n");
+			break;
+		}
+
+		yield();
+	}
+
+	return 0;
+}
+
+int ipoib_ib_dev_init(struct net_device *dev, struct ib_device *ca, int port)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+
+	priv->ca = ca;
+	priv->port = port;
+	priv->qp = NULL;
+
+	if (ipoib_transport_dev_init(dev, ca)) {
+		printk(KERN_WARNING "%s: ipoib_transport_dev_init failed\n", ca->name);
+		return -ENODEV;
+	}
+
+	if (dev->flags & IFF_UP) {
+		if (ipoib_ib_dev_open(dev)) {
+			ipoib_transport_dev_cleanup(dev);
+			return -ENODEV;
+		}
+	}
+
+	return 0;
+}
+
+void ipoib_ib_dev_flush(void *_dev)
+{
+	struct net_device *dev = (struct net_device *)_dev;
+	struct ipoib_dev_priv *priv = netdev_priv(dev), *cpriv;
+
+	if (!test_bit(IPOIB_FLAG_ADMIN_UP, &priv->flags))
+		return;
+
+	ipoib_dbg(priv, "flushing\n");
+
+	ipoib_ib_dev_down(dev);
+
+	/*
+	 * The device could have been brought down between the start and when
+	 * we get here, don't bring it back up if it's not configured up
+	 */
+	if (test_bit(IPOIB_FLAG_ADMIN_UP, &priv->flags))
+		ipoib_ib_dev_up(dev);
+
+	/* Flush any child interfaces too */
+	list_for_each_entry(cpriv, &priv->child_intfs, list)
+		ipoib_ib_dev_flush(&cpriv->dev);
+}
+
+void ipoib_ib_dev_cleanup(struct net_device *dev)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+
+	ipoib_dbg(priv, "cleaning up ib_dev\n");
+
+	ipoib_mcast_stop_thread(dev);
+
+	/* Delete the broadcast address and the local address */
+	ipoib_mcast_dev_down(dev);
+
+	ipoib_transport_dev_cleanup(dev);
+}
+
+/*
+ * Delayed P_Key Assigment Interim Support
+ *
+ * The following is initial implementation of delayed P_Key assigment
+ * mechanism. It is using the same approach implemented for the multicast
+ * group join. The single goal of this implementation is to quickly address
+ * Bug #2507. This implementation will probably be removed when the P_Key
+ * change async notification is available.
+ */
+int ipoib_open(struct net_device *dev);
+
+static void ipoib_pkey_dev_check_presence(struct net_device *dev)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+	u16 pkey_index = 0;
+
+	if (ib_cached_pkey_find(priv->ca, priv->port, priv->pkey, &pkey_index))
+		clear_bit(IPOIB_PKEY_ASSIGNED, &priv->flags);
+	else
+		set_bit(IPOIB_PKEY_ASSIGNED, &priv->flags);
+}
+
+void ipoib_pkey_poll(void *dev_ptr)
+{
+	struct net_device *dev = dev_ptr;
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+
+	ipoib_pkey_dev_check_presence(dev);
+
+	if (test_bit(IPOIB_PKEY_ASSIGNED, &priv->flags))
+		ipoib_open(dev);
+	else {
+		down(&pkey_sem);
+		if (!test_bit(IPOIB_PKEY_STOP, &priv->flags))
+			queue_delayed_work(ipoib_workqueue,
+					   &priv->pkey_task,
+					   HZ);
+		up(&pkey_sem);
+	}
+}
+
+int ipoib_pkey_dev_delay_open(struct net_device *dev)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+
+	/* Look for the interface pkey value in the IB Port P_Key table and */
+	/* set the interface pkey assigment flag                            */
+	ipoib_pkey_dev_check_presence(dev);
+
+	/* P_Key value not assigned yet - start polling */
+	if (!test_bit(IPOIB_PKEY_ASSIGNED, &priv->flags)) {
+		down(&pkey_sem);
+		clear_bit(IPOIB_PKEY_STOP, &priv->flags);
+		queue_delayed_work(ipoib_workqueue,
+				   &priv->pkey_task,
+				   HZ);
+		up(&pkey_sem);
+		return 1;
+	}
+
+	return 0;
+}
diff -Nru a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,1079 @@
+/*
+ * Copyright (c) 2004 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: ipoib_main.c 1377 2004-12-23 19:57:12Z roland $
+ */
+
+#include "ipoib.h"
+
+#include <linux/version.h>
+#include <linux/module.h>
+
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/vmalloc.h>
+
+#include <linux/if_arp.h>	/* For ARPHRD_xxx */
+
+#include <linux/ip.h>
+#include <linux/in.h>
+
+MODULE_AUTHOR("Roland Dreier");
+MODULE_DESCRIPTION("IP-over-InfiniBand net driver");
+MODULE_LICENSE("Dual BSD/GPL");
+
+#ifdef CONFIG_INFINIBAND_IPOIB_DEBUG
+int debug_level;
+
+module_param(debug_level, int, 0644);
+MODULE_PARM_DESC(debug_level, "Enable debug tracing if > 0");
+#endif
+
+static const u8 ipv4_bcast_addr[] = {
+	0x00, 0xff, 0xff, 0xff,
+	0xff, 0x12, 0x40, 0x1b,	0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00,	0xff, 0xff, 0xff, 0xff
+};
+
+struct workqueue_struct *ipoib_workqueue;
+
+static void ipoib_add_one(struct ib_device *device);
+static void ipoib_remove_one(struct ib_device *device);
+
+static struct ib_client ipoib_client = {
+	.name   = "ipoib",
+	.add    = ipoib_add_one,
+	.remove = ipoib_remove_one
+};
+
+int ipoib_open(struct net_device *dev)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+
+	ipoib_dbg(priv, "bringing up interface\n");
+
+	set_bit(IPOIB_FLAG_ADMIN_UP, &priv->flags);
+
+	if (ipoib_pkey_dev_delay_open(dev))
+		return 0;
+
+	if (ipoib_ib_dev_open(dev))
+		return -EINVAL;
+
+	if (ipoib_ib_dev_up(dev))
+		return -EINVAL;
+
+	if (!test_bit(IPOIB_FLAG_SUBINTERFACE, &priv->flags)) {
+		struct ipoib_dev_priv *cpriv;
+
+		/* Bring up any child interfaces too */
+		down(&priv->vlan_mutex);
+		list_for_each_entry(cpriv, &priv->child_intfs, list) {
+			int flags;
+
+			flags = cpriv->dev->flags;
+			if (flags & IFF_UP)
+				continue;
+
+			dev_change_flags(cpriv->dev, flags | IFF_UP);
+		}
+		up(&priv->vlan_mutex);
+	}
+
+	netif_start_queue(dev);
+
+	return 0;
+}
+
+static int ipoib_stop(struct net_device *dev)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+
+	ipoib_dbg(priv, "stopping interface\n");
+
+	clear_bit(IPOIB_FLAG_ADMIN_UP, &priv->flags);
+
+	netif_stop_queue(dev);
+
+	ipoib_ib_dev_down(dev);
+	ipoib_ib_dev_stop(dev);
+
+	if (!test_bit(IPOIB_FLAG_SUBINTERFACE, &priv->flags)) {
+		struct ipoib_dev_priv *cpriv;
+
+		/* Bring down any child interfaces too */
+		down(&priv->vlan_mutex);
+		list_for_each_entry(cpriv, &priv->child_intfs, list) {
+			int flags;
+
+			flags = cpriv->dev->flags;
+			if (!(flags & IFF_UP))
+				continue;
+
+			dev_change_flags(cpriv->dev, flags & ~IFF_UP);
+		}
+		up(&priv->vlan_mutex);
+	}
+
+	return 0;
+}
+
+static int ipoib_change_mtu(struct net_device *dev, int new_mtu)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+
+	if (new_mtu > IPOIB_PACKET_SIZE - IPOIB_ENCAP_LEN)
+		return -EINVAL;
+
+	priv->admin_mtu = new_mtu;
+
+	dev->mtu = min(priv->mcast_mtu, priv->admin_mtu);
+
+	return 0;
+}
+
+static struct ipoib_path *__path_find(struct net_device *dev,
+				      union ib_gid *gid)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+	struct rb_node *n = priv->path_tree.rb_node;
+	struct ipoib_path *path;
+	int ret;
+
+	while (n) {
+		path = rb_entry(n, struct ipoib_path, rb_node);
+
+		ret = memcmp(gid->raw, path->pathrec.dgid.raw,
+			     sizeof (union ib_gid));
+
+		if (ret < 0)
+			n = n->rb_left;
+		else if (ret > 0)
+			n = n->rb_right;
+		else
+			return path;
+	}
+
+	return NULL;
+}
+
+static int __path_add(struct net_device *dev, struct ipoib_path *path)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+	struct rb_node **n = &priv->path_tree.rb_node;
+	struct rb_node *pn = NULL;
+	struct ipoib_path *tpath;
+	int ret;
+
+	while (*n) {
+		pn = *n;
+		tpath = rb_entry(pn, struct ipoib_path, rb_node);
+
+		ret = memcmp(path->pathrec.dgid.raw, tpath->pathrec.dgid.raw,
+			     sizeof (union ib_gid));
+		if (ret < 0)
+			n = &pn->rb_left;
+		else if (ret > 0)
+			n = &pn->rb_right;
+		else
+			return -EEXIST;
+	}
+
+	rb_link_node(&path->rb_node, pn, n);
+	rb_insert_color(&path->rb_node, &priv->path_tree);
+
+	list_add_tail(&path->list, &priv->path_list);
+
+	return 0;
+}
+
+static void __path_free(struct net_device *dev, struct ipoib_path *path)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+	struct ipoib_neigh *neigh, *tn;
+	struct sk_buff *skb;
+
+	while ((skb = __skb_dequeue(&path->queue)))
+		dev_kfree_skb_irq(skb);
+
+	list_for_each_entry_safe(neigh, tn, &path->neigh_list, list) {
+		if (neigh->ah)
+			ipoib_put_ah(neigh->ah);
+		*to_ipoib_neigh(neigh->neighbour) = NULL;
+		neigh->neighbour->ops->destructor = NULL;
+		kfree(neigh);
+	}
+
+	if (path->ah)
+		ipoib_put_ah(path->ah);
+
+	rb_erase(&path->rb_node, &priv->path_tree);
+	list_del(&path->list);
+	kfree(path);
+}
+
+void ipoib_flush_paths(struct net_device *dev)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+	struct ipoib_path *path, *tp;
+	LIST_HEAD(remove_list);
+	unsigned long flags;
+
+	spin_lock_irqsave(&priv->lock, flags);
+	list_splice(&priv->path_list, &remove_list);
+	INIT_LIST_HEAD(&priv->path_list);
+	spin_unlock_irqrestore(&priv->lock, flags);
+
+	list_for_each_entry_safe(path, tp, &remove_list, list) {
+		if (path->query)
+			ib_sa_cancel_query(path->query_id, path->query);
+		wait_for_completion(&path->done);
+		__path_free(dev, path);
+	}
+}
+
+static void path_rec_completion(int status,
+				struct ib_sa_path_rec *pathrec,
+				void *path_ptr)
+{
+	struct ipoib_path *path = path_ptr;
+	struct net_device *dev = path->dev;
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+	struct ipoib_ah *ah = NULL;
+	struct ipoib_neigh *neigh;
+	struct sk_buff_head skqueue;
+	struct sk_buff *skb;
+	unsigned long flags;
+
+	if (pathrec)
+		ipoib_dbg(priv, "PathRec LID 0x%04x for GID " IPOIB_GID_FMT "\n",
+			  be16_to_cpu(pathrec->dlid), IPOIB_GID_ARG(pathrec->dgid));
+	else
+		ipoib_dbg(priv, "PathRec status %d for GID " IPOIB_GID_FMT "\n",
+			  status, IPOIB_GID_ARG(path->pathrec.dgid));
+
+	skb_queue_head_init(&skqueue);
+
+	if (!status) {
+		/*
+		 * For now we set static_rate to 0.  This is not
+		 * really correct: we should look at the rate
+		 * component of the path member record, compare it
+		 * with the rate of our local port (calculated from
+		 * the active link speed and link width) and set an
+		 * inter-packet delay appropriately.
+		 */
+		struct ib_ah_attr av = {
+			.dlid 	       = be16_to_cpu(pathrec->dlid),
+			.sl 	       = pathrec->sl,
+			.static_rate   = 0,
+			.port_num      = priv->port
+		};
+
+		ah = ipoib_create_ah(dev, priv->pd, &av);
+	}
+
+	spin_lock_irqsave(&priv->lock, flags);
+
+	path->ah = ah;
+
+	if (ah) {
+		path->pathrec = *pathrec;
+
+		ipoib_dbg(priv, "created address handle %p for LID 0x%04x, SL %d\n",
+			  ah, be16_to_cpu(pathrec->dlid), pathrec->sl);
+
+		while ((skb = __skb_dequeue(&path->queue)))
+			__skb_queue_tail(&skqueue, skb);
+
+		list_for_each_entry(neigh, &path->neigh_list, list) {
+			kref_get(&path->ah->ref);
+			neigh->ah = path->ah;
+
+			while ((skb = __skb_dequeue(&neigh->queue)))
+				__skb_queue_tail(&skqueue, skb);
+		}
+	} else
+		path->query = NULL;
+
+	complete(&path->done);
+
+	spin_unlock_irqrestore(&priv->lock, flags);
+
+	while ((skb = __skb_dequeue(&skqueue))) {
+		skb->dev = dev;
+		if (dev_queue_xmit(skb))
+			ipoib_warn(priv, "dev_queue_xmit failed "
+				   "to requeue packet\n");
+	}
+}
+
+static struct ipoib_path *path_rec_create(struct net_device *dev,
+					  union ib_gid *gid)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+	struct ipoib_path *path;
+
+	path = kmalloc(sizeof *path, GFP_ATOMIC);
+	if (!path)
+		return NULL;
+
+	path->dev = dev;
+	path->pathrec.dlid = 0;
+
+	skb_queue_head_init(&path->queue);
+
+	INIT_LIST_HEAD(&path->neigh_list);
+	path->query = NULL;
+	init_completion(&path->done);
+
+	memcpy(path->pathrec.dgid.raw, gid->raw, sizeof (union ib_gid));
+	path->pathrec.sgid      = priv->local_gid;
+	path->pathrec.pkey      = cpu_to_be16(priv->pkey);
+	path->pathrec.numb_path = 1;
+
+	__path_add(dev, path);
+
+	return path;
+}
+
+static int path_rec_start(struct net_device *dev,
+			  struct ipoib_path *path)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+
+	ipoib_dbg(priv, "Start path record lookup for " IPOIB_GID_FMT "\n",
+		  IPOIB_GID_ARG(path->pathrec.dgid));
+
+	path->query_id =
+		ib_sa_path_rec_get(priv->ca, priv->port,
+				   &path->pathrec,
+				   IB_SA_PATH_REC_DGID		|
+				   IB_SA_PATH_REC_SGID		|
+				   IB_SA_PATH_REC_NUMB_PATH	|
+				   IB_SA_PATH_REC_PKEY,
+				   1000, GFP_ATOMIC,
+				   path_rec_completion,
+				   path, &path->query);
+	if (path->query_id < 0) {
+		ipoib_warn(priv, "ib_sa_path_rec_get failed\n");
+		path->query = NULL;
+		return path->query_id;
+	}
+
+	return 0;
+}
+
+static void neigh_add_path(struct sk_buff *skb, struct net_device *dev)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+	struct ipoib_path *path;
+	struct ipoib_neigh *neigh;
+
+	neigh = kmalloc(sizeof *neigh, GFP_ATOMIC);
+	if (!neigh) {
+		++priv->stats.tx_dropped;
+		dev_kfree_skb_any(skb);
+		return;
+	}
+
+	skb_queue_head_init(&neigh->queue);
+	neigh->neighbour = skb->dst->neighbour;
+	*to_ipoib_neigh(skb->dst->neighbour) = neigh;
+
+	/*
+	 * We can only be called from ipoib_start_xmit, so we're
+	 * inside tx_lock -- no need to save/restore flags.
+	 */
+	spin_lock(&priv->lock);
+
+	path = __path_find(dev, (union ib_gid *) (skb->dst->neighbour->ha + 4));
+	if (!path) {
+		path = path_rec_create(dev,
+				       (union ib_gid *) (skb->dst->neighbour->ha + 4));
+		if (!path)
+			goto err;
+	}
+
+	list_add_tail(&neigh->list, &path->neigh_list);
+
+	if (path->pathrec.dlid) {
+		kref_get(&path->ah->ref);
+		neigh->ah = path->ah;
+
+		ipoib_send(dev, skb, path->ah,
+			   be32_to_cpup((__be32 *) skb->dst->neighbour->ha));
+	} else {
+		neigh->ah  = NULL;
+		if (skb_queue_len(&neigh->queue) < IPOIB_MAX_PATH_REC_QUEUE) {
+			__skb_queue_tail(&neigh->queue, skb);
+		} else {
+			++priv->stats.tx_dropped;
+			dev_kfree_skb_any(skb);
+		}
+
+		if (!path->query && path_rec_start(dev, path))
+			goto err;
+	}
+
+	spin_unlock(&priv->lock);
+	return;
+
+err:
+	*to_ipoib_neigh(skb->dst->neighbour) = NULL;
+	list_del(&neigh->list);
+	kfree(neigh);
+	neigh->neighbour->ops->destructor = NULL;
+
+	++priv->stats.tx_dropped;
+	dev_kfree_skb_any(skb);
+
+	spin_unlock(&priv->lock);
+}
+
+static void path_lookup(struct sk_buff *skb, struct net_device *dev)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(skb->dev);
+
+	/* Look up path record for unicasts */
+	if (skb->dst->neighbour->ha[4] != 0xff) {
+		neigh_add_path(skb, dev);
+		return;
+	}
+
+	/* Add in the P_Key for multicasts */
+	skb->dst->neighbour->ha[8] = (priv->pkey >> 8) & 0xff;
+	skb->dst->neighbour->ha[9] = priv->pkey & 0xff;
+	ipoib_mcast_send(dev, (union ib_gid *) (skb->dst->neighbour->ha + 4), skb);
+}
+
+static void unicast_arp_send(struct sk_buff *skb, struct net_device *dev,
+			     struct ipoib_pseudoheader *phdr)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+	struct ipoib_path *path;
+
+	/*
+	 * We can only be called from ipoib_start_xmit, so we're
+	 * inside tx_lock -- no need to save/restore flags.
+	 */
+	spin_lock(&priv->lock);
+
+	path = __path_find(dev, (union ib_gid *) (phdr->hwaddr + 4));
+	if (!path) {
+		path = path_rec_create(dev,
+				       (union ib_gid *) (phdr->hwaddr + 4));
+		if (path) {
+			/* put pseudoheader back on for next time */
+			skb_push(skb, sizeof *phdr);
+			__skb_queue_tail(&path->queue, skb);
+
+			if (path_rec_start(dev, path))
+				__path_free(dev, path);
+		} else {
+			++priv->stats.tx_dropped;
+			dev_kfree_skb_any(skb);
+		}
+
+		spin_unlock(&priv->lock);
+		return;
+	}
+
+	if (path->pathrec.dlid) {
+		ipoib_dbg(priv, "Send unicast ARP to %04x\n",
+			  be16_to_cpu(path->pathrec.dlid));
+
+		ipoib_send(dev, skb, path->ah,
+			   be32_to_cpup((__be32 *) phdr->hwaddr));
+	} else if ((path->query || !path_rec_start(dev, path)) &&
+		   skb_queue_len(&path->queue) < IPOIB_MAX_PATH_REC_QUEUE) {
+		/* put pseudoheader back on for next time */
+		skb_push(skb, sizeof *phdr);
+		__skb_queue_tail(&path->queue, skb);
+	} else {
+		++priv->stats.tx_dropped;
+		dev_kfree_skb_any(skb);
+	}
+
+	spin_unlock(&priv->lock);
+}
+
+static int ipoib_start_xmit(struct sk_buff *skb, struct net_device *dev)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+	struct ipoib_neigh *neigh;
+	unsigned long flags;
+
+	local_irq_save(flags);
+	if (!spin_trylock(&priv->tx_lock)) {
+		local_irq_restore(flags);
+		return NETDEV_TX_LOCKED;
+	}
+
+	/*
+	 * Check if our queue is stopped.  Since we have the LLTX bit
+	 * set, we can't rely on netif_stop_queue() preventing our
+	 * xmit function from being called with a full queue.
+	 */
+	if (unlikely(netif_queue_stopped(dev))) {
+		spin_unlock_irqrestore(&priv->tx_lock, flags);
+		return NETDEV_TX_BUSY;
+	}
+
+	if (skb->dst && skb->dst->neighbour) {
+		if (unlikely(!*to_ipoib_neigh(skb->dst->neighbour))) {
+			path_lookup(skb, dev);
+			goto out;
+		}
+
+		neigh = *to_ipoib_neigh(skb->dst->neighbour);
+
+		if (likely(neigh->ah)) {
+			ipoib_send(dev, skb, neigh->ah,
+				   be32_to_cpup((__be32 *) skb->dst->neighbour->ha));
+			goto out;
+		}
+
+		if (skb_queue_len(&neigh->queue) < IPOIB_MAX_PATH_REC_QUEUE) {
+			spin_lock(&priv->lock);
+			__skb_queue_tail(&neigh->queue, skb);
+			spin_unlock(&priv->lock);
+		} else {
+			++priv->stats.tx_dropped;
+			dev_kfree_skb_any(skb);
+		}
+	} else {
+		struct ipoib_pseudoheader *phdr =
+			(struct ipoib_pseudoheader *) skb->data;
+		skb_pull(skb, sizeof *phdr);
+
+		if (phdr->hwaddr[4] == 0xff) {
+			/* Add in the P_Key for multicast*/
+			phdr->hwaddr[8] = (priv->pkey >> 8) & 0xff;
+			phdr->hwaddr[9] = priv->pkey & 0xff;
+
+			ipoib_mcast_send(dev, (union ib_gid *) (phdr->hwaddr + 4), skb);
+		} else {
+			/* unicast GID -- should be ARP reply */
+
+			if (be16_to_cpup((u16 *) skb->data) != ETH_P_ARP) {
+				ipoib_warn(priv, "Unicast, no %s: type %04x, QPN %06x "
+					   IPOIB_GID_FMT "\n",
+					   skb->dst ? "neigh" : "dst",
+					   be16_to_cpup((u16 *) skb->data),
+					   be32_to_cpup((u32 *) phdr->hwaddr),
+					   IPOIB_GID_ARG(*(union ib_gid *) (phdr->hwaddr + 4)));
+				dev_kfree_skb_any(skb);
+				++priv->stats.tx_dropped;
+				goto out;
+			}
+
+			unicast_arp_send(skb, dev, phdr);
+		}
+	}
+
+out:
+	spin_unlock_irqrestore(&priv->tx_lock, flags);
+
+	return NETDEV_TX_OK;
+}
+
+struct net_device_stats *ipoib_get_stats(struct net_device *dev)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+
+	return &priv->stats;
+}
+
+static void ipoib_timeout(struct net_device *dev)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+
+	ipoib_warn(priv, "transmit timeout: latency %ld\n",
+		   jiffies - dev->trans_start);
+	/* XXX reset QP, etc. */
+}
+
+static int ipoib_hard_header(struct sk_buff *skb,
+			     struct net_device *dev,
+			     unsigned short type,
+			     void *daddr, void *saddr, unsigned len)
+{
+	struct ipoib_header *header;
+
+	header = (struct ipoib_header *) skb_push(skb, sizeof *header);
+
+	header->proto = htons(type);
+	header->reserved = 0;
+
+	/*
+	 * If we don't have a neighbour structure, stuff the
+	 * destination address onto the front of the skb so we can
+	 * figure out where to send the packet later.
+	 */
+	if (!skb->dst || !skb->dst->neighbour) {
+		struct ipoib_pseudoheader *phdr =
+			(struct ipoib_pseudoheader *) skb_push(skb, sizeof *phdr);
+		memcpy(phdr->hwaddr, daddr, INFINIBAND_ALEN);
+	}
+
+	return 0;
+}
+
+static void ipoib_set_mcast_list(struct net_device *dev)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+
+	schedule_work(&priv->restart_task);
+}
+
+static void ipoib_neigh_destructor(struct neighbour *n)
+{
+	struct ipoib_neigh *neigh = *to_ipoib_neigh(n);
+	struct ipoib_dev_priv *priv = netdev_priv(n->dev);
+	unsigned long flags;
+
+	ipoib_dbg(priv,
+		  "neigh_destructor for %06x " IPOIB_GID_FMT "\n",
+		  be32_to_cpup((__be32 *) n->ha),
+		  IPOIB_GID_ARG(*((union ib_gid *) (n->ha + 4))));
+
+	spin_lock_irqsave(&priv->lock, flags);
+
+	if (neigh) {
+		if (neigh->ah)
+			ipoib_put_ah(neigh->ah);
+		list_del(&neigh->list);
+		*to_ipoib_neigh(n) = NULL;
+		kfree(neigh);
+	}
+
+	spin_unlock_irqrestore(&priv->lock, flags);
+}
+
+static int ipoib_neigh_setup(struct neighbour *neigh)
+{
+	/*
+	 * Is this kosher?  I can't find anybody in the kernel that
+	 * sets neigh->destructor, so we should be able to set it here
+	 * without trouble.
+	 */
+	neigh->ops->destructor = ipoib_neigh_destructor;
+
+	return 0;
+}
+
+static int ipoib_neigh_setup_dev(struct net_device *dev, struct neigh_parms *parms)
+{
+	parms->neigh_setup = ipoib_neigh_setup;
+
+	return 0;
+}
+
+int ipoib_dev_init(struct net_device *dev, struct ib_device *ca, int port)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+
+	/* Allocate RX/TX "rings" to hold queued skbs */
+
+	priv->rx_ring =	kmalloc(IPOIB_RX_RING_SIZE * sizeof (struct ipoib_buf),
+				GFP_KERNEL);
+	if (!priv->rx_ring) {
+		printk(KERN_WARNING "%s: failed to allocate RX ring (%d entries)\n",
+		       ca->name, IPOIB_RX_RING_SIZE);
+		goto out;
+	}
+	memset(priv->rx_ring, 0,
+	       IPOIB_RX_RING_SIZE * sizeof (struct ipoib_buf));
+
+	priv->tx_ring = kmalloc(IPOIB_TX_RING_SIZE * sizeof (struct ipoib_buf),
+				GFP_KERNEL);
+	if (!priv->tx_ring) {
+		printk(KERN_WARNING "%s: failed to allocate TX ring (%d entries)\n",
+		       ca->name, IPOIB_TX_RING_SIZE);
+		goto out_rx_ring_cleanup;
+	}
+	memset(priv->tx_ring, 0,
+	       IPOIB_TX_RING_SIZE * sizeof (struct ipoib_buf));
+
+	/* priv->tx_head & tx_tail are already 0 */
+
+	if (ipoib_ib_dev_init(dev, ca, port))
+		goto out_tx_ring_cleanup;
+
+	return 0;
+
+out_tx_ring_cleanup:
+	kfree(priv->tx_ring);
+
+out_rx_ring_cleanup:
+	kfree(priv->rx_ring);
+
+out:
+	return -ENOMEM;
+}
+
+void ipoib_dev_cleanup(struct net_device *dev)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev), *cpriv, *tcpriv;
+
+	ipoib_delete_debug_file(dev);
+
+	/* Delete any child interfaces first */
+	list_for_each_entry_safe(cpriv, tcpriv, &priv->child_intfs, list) {
+		unregister_netdev(cpriv->dev);
+		ipoib_dev_cleanup(cpriv->dev);
+		free_netdev(cpriv->dev);
+	}
+
+	ipoib_ib_dev_cleanup(dev);
+
+	if (priv->rx_ring) {
+		kfree(priv->rx_ring);
+		priv->rx_ring = NULL;
+	}
+
+	if (priv->tx_ring) {
+		kfree(priv->tx_ring);
+		priv->tx_ring = NULL;
+	}
+}
+
+static void ipoib_setup(struct net_device *dev)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+
+	dev->open 		 = ipoib_open;
+	dev->stop 		 = ipoib_stop;
+	dev->change_mtu 	 = ipoib_change_mtu;
+	dev->hard_start_xmit 	 = ipoib_start_xmit;
+	dev->get_stats 		 = ipoib_get_stats;
+	dev->tx_timeout 	 = ipoib_timeout;
+	dev->hard_header 	 = ipoib_hard_header;
+	dev->set_multicast_list  = ipoib_set_mcast_list;
+	dev->neigh_setup         = ipoib_neigh_setup_dev;
+
+	dev->watchdog_timeo 	 = HZ;
+
+	dev->rebuild_header 	 = NULL;
+	dev->set_mac_address 	 = NULL;
+	dev->header_cache_update = NULL;
+
+	dev->flags              |= IFF_BROADCAST | IFF_MULTICAST;
+
+	/*
+	 * We add in INFINIBAND_ALEN to allow for the destination
+	 * address "pseudoheader" for skbs without neighbour struct.
+	 */
+	dev->hard_header_len 	 = IPOIB_ENCAP_LEN + INFINIBAND_ALEN;
+	dev->addr_len 		 = INFINIBAND_ALEN;
+	dev->type 		 = ARPHRD_INFINIBAND;
+	dev->tx_queue_len 	 = IPOIB_TX_RING_SIZE * 2;
+	dev->features            = NETIF_F_VLAN_CHALLENGED | NETIF_F_LLTX;
+
+	/* MTU will be reset when mcast join happens */
+	dev->mtu 		 = IPOIB_PACKET_SIZE - IPOIB_ENCAP_LEN;
+	priv->mcast_mtu 	 = priv->admin_mtu = dev->mtu;
+
+	memcpy(dev->broadcast, ipv4_bcast_addr, INFINIBAND_ALEN);
+
+	netif_carrier_off(dev);
+
+	SET_MODULE_OWNER(dev);
+
+	priv->dev = dev;
+
+	spin_lock_init(&priv->lock);
+	spin_lock_init(&priv->tx_lock);
+
+	init_MUTEX(&priv->mcast_mutex);
+	init_MUTEX(&priv->vlan_mutex);
+
+	INIT_LIST_HEAD(&priv->path_list);
+	INIT_LIST_HEAD(&priv->child_intfs);
+	INIT_LIST_HEAD(&priv->dead_ahs);
+	INIT_LIST_HEAD(&priv->multicast_list);
+
+	INIT_WORK(&priv->pkey_task,    ipoib_pkey_poll,          priv->dev);
+	INIT_WORK(&priv->mcast_task,   ipoib_mcast_join_task,    priv->dev);
+	INIT_WORK(&priv->flush_task,   ipoib_ib_dev_flush,       priv->dev);
+	INIT_WORK(&priv->restart_task, ipoib_mcast_restart_task, priv->dev);
+	INIT_WORK(&priv->ah_reap_task, ipoib_reap_ah,            priv->dev);
+}
+
+struct ipoib_dev_priv *ipoib_intf_alloc(const char *name)
+{
+	struct net_device *dev;
+
+	dev = alloc_netdev((int) sizeof (struct ipoib_dev_priv), name,
+			   ipoib_setup);
+	if (!dev)
+		return NULL;
+
+	return netdev_priv(dev);
+}
+
+static ssize_t show_pkey(struct class_device *cdev, char *buf)
+{
+	struct ipoib_dev_priv *priv =
+		netdev_priv(container_of(cdev, struct net_device, class_dev));
+
+	return sprintf(buf, "0x%04x\n", priv->pkey);
+}
+static CLASS_DEVICE_ATTR(pkey, S_IRUGO, show_pkey, NULL);
+
+static ssize_t create_child(struct class_device *cdev,
+			    const char *buf, size_t count)
+{
+	int pkey;
+	int ret;
+
+	if (sscanf(buf, "%i", &pkey) != 1)
+		return -EINVAL;
+
+	if (pkey < 0 || pkey > 0xffff)
+		return -EINVAL;
+
+	ret = ipoib_vlan_add(container_of(cdev, struct net_device, class_dev),
+			     pkey);
+
+	return ret ? ret : count;
+}
+static CLASS_DEVICE_ATTR(create_child, S_IWUGO, NULL, create_child);
+
+static ssize_t delete_child(struct class_device *cdev,
+			    const char *buf, size_t count)
+{
+	int pkey;
+	int ret;
+
+	if (sscanf(buf, "%i", &pkey) != 1)
+		return -EINVAL;
+
+	if (pkey < 0 || pkey > 0xffff)
+		return -EINVAL;
+
+	ret = ipoib_vlan_delete(container_of(cdev, struct net_device, class_dev),
+				pkey);
+
+	return ret ? ret : count;
+
+}
+static CLASS_DEVICE_ATTR(delete_child, S_IWUGO, NULL, delete_child);
+
+int ipoib_add_pkey_attr(struct net_device *dev)
+{
+	return class_device_create_file(&dev->class_dev,
+					&class_device_attr_pkey);
+}
+
+static struct net_device *ipoib_add_port(const char *format,
+					 struct ib_device *hca, u8 port)
+{
+	struct ipoib_dev_priv *priv;
+	int result = -ENOMEM;
+
+	priv = ipoib_intf_alloc(format);
+	if (!priv)
+		goto alloc_mem_failed;
+
+	SET_NETDEV_DEV(priv->dev, hca->dma_device);
+
+	result = ib_query_pkey(hca, port, 0, &priv->pkey);
+	if (result) {
+		printk(KERN_WARNING "%s: ib_query_pkey port %d failed (ret = %d)\n",
+		       hca->name, port, result);
+		goto alloc_mem_failed;
+	}
+
+	priv->dev->broadcast[8] = priv->pkey >> 8;
+	priv->dev->broadcast[9] = priv->pkey & 0xff;
+
+	result = ib_query_gid(hca, port, 0, &priv->local_gid);
+	if (result) {
+		printk(KERN_WARNING "%s: ib_query_gid port %d failed (ret = %d)\n",
+		       hca->name, port, result);
+		goto alloc_mem_failed;
+	} else
+		memcpy(priv->dev->dev_addr + 4, priv->local_gid.raw, sizeof (union ib_gid));
+
+
+	result = ipoib_dev_init(priv->dev, hca, port);
+	if (result < 0) {
+		printk(KERN_WARNING "%s: failed to initialize port %d (ret = %d)\n",
+		       hca->name, port, result);
+		goto device_init_failed;
+	}
+
+	INIT_IB_EVENT_HANDLER(&priv->event_handler,
+			      priv->ca, ipoib_event);
+	result = ib_register_event_handler(&priv->event_handler);
+	if (result < 0) {
+		printk(KERN_WARNING "%s: ib_register_event_handler failed for "
+		       "port %d (ret = %d)\n",
+		       hca->name, port, result);
+		goto event_failed;
+	}
+
+	result = register_netdev(priv->dev);
+	if (result) {
+		printk(KERN_WARNING "%s: couldn't register ipoib port %d; error %d\n",
+		       hca->name, port, result);
+		goto register_failed;
+	}
+
+	if (ipoib_create_debug_file(priv->dev))
+		goto debug_failed;
+
+	if (ipoib_add_pkey_attr(priv->dev))
+		goto sysfs_failed;
+	if (class_device_create_file(&priv->dev->class_dev,
+				     &class_device_attr_create_child))
+		goto sysfs_failed;
+	if (class_device_create_file(&priv->dev->class_dev,
+				     &class_device_attr_delete_child))
+		goto sysfs_failed;
+
+	return priv->dev;
+
+sysfs_failed:
+	ipoib_delete_debug_file(priv->dev);
+
+debug_failed:
+	unregister_netdev(priv->dev);
+
+register_failed:
+	ib_unregister_event_handler(&priv->event_handler);
+
+event_failed:
+	ipoib_dev_cleanup(priv->dev);
+
+device_init_failed:
+	free_netdev(priv->dev);
+
+alloc_mem_failed:
+	return ERR_PTR(result);
+}
+
+static void ipoib_add_one(struct ib_device *device)
+{
+	struct list_head *dev_list;
+	struct net_device *dev;
+	struct ipoib_dev_priv *priv;
+	int s, e, p;
+
+	dev_list = kmalloc(sizeof *dev_list, GFP_KERNEL);
+	if (!dev_list)
+		return;
+
+	INIT_LIST_HEAD(dev_list);
+
+	if (device->node_type == IB_NODE_SWITCH) {
+		s = 0;
+		e = 0;
+	} else {
+		s = 1;
+		e = device->phys_port_cnt;
+	}
+
+	for (p = s; p <= e; ++p) {
+		dev = ipoib_add_port("ib%d", device, p);
+		if (!IS_ERR(dev)) {
+			priv = netdev_priv(dev);
+			list_add_tail(&priv->list, dev_list);
+		}
+	}
+
+	ib_set_client_data(device, &ipoib_client, dev_list);
+}
+
+static void ipoib_remove_one(struct ib_device *device)
+{
+	struct ipoib_dev_priv *priv, *tmp;
+	struct list_head *dev_list;
+
+	dev_list = ib_get_client_data(device, &ipoib_client);
+
+	list_for_each_entry_safe(priv, tmp, dev_list, list) {
+		ib_unregister_event_handler(&priv->event_handler);
+
+		unregister_netdev(priv->dev);
+		ipoib_dev_cleanup(priv->dev);
+		free_netdev(priv->dev);
+	}
+}
+
+static int __init ipoib_init_module(void)
+{
+	int ret;
+
+	ret = ipoib_register_debugfs();
+	if (ret)
+		return ret;
+
+	/*
+	 * We create our own workqueue mainly because we want to be
+	 * able to flush it when devices are being removed.  We can't
+	 * use schedule_work()/flush_scheduled_work() because both
+	 * unregister_netdev() and linkwatch_event take the rtnl lock,
+	 * so flush_scheduled_work() can deadlock during device
+	 * removal.
+	 */
+	ipoib_workqueue = create_singlethread_workqueue("ipoib");
+	if (!ipoib_workqueue) {
+		ret = -ENOMEM;
+		goto err_fs;
+	}
+
+	ret = ib_register_client(&ipoib_client);
+	if (ret)
+		goto err_wq;
+
+	return 0;
+
+err_fs:
+	ipoib_unregister_debugfs();
+
+err_wq:
+	destroy_workqueue(ipoib_workqueue);
+
+	return ret;
+}
+
+static void __exit ipoib_cleanup_module(void)
+{
+	ipoib_unregister_debugfs();
+	ib_unregister_client(&ipoib_client);
+	destroy_workqueue(ipoib_workqueue);
+}
+
+module_init(ipoib_init_module);
+module_exit(ipoib_cleanup_module);
diff -Nru a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,981 @@
+/*
+ * Copyright (c) 2004 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: ipoib_multicast.c 1362 2004-12-18 15:56:29Z roland $
+ */
+
+#include <linux/skbuff.h>
+#include <linux/rtnetlink.h>
+#include <linux/ip.h>
+#include <linux/in.h>
+#include <linux/igmp.h>
+#include <linux/inetdevice.h>
+#include <linux/delay.h>
+#include <linux/completion.h>
+
+#include "ipoib.h"
+
+#ifdef CONFIG_INFINIBAND_IPOIB_DEBUG
+int mcast_debug_level;
+
+module_param(mcast_debug_level, int, 0644);
+MODULE_PARM_DESC(mcast_debug_level,
+		 "Enable multicast debug tracing if > 0");
+#endif
+
+static DECLARE_MUTEX(mcast_mutex);
+
+/* Used for all multicast joins (broadcast, IPv4 mcast and IPv6 mcast) */
+struct ipoib_mcast {
+	struct ib_sa_mcmember_rec mcmember;
+	struct ipoib_ah          *ah;
+
+	struct rb_node    rb_node;
+	struct list_head  list;
+	struct completion done;
+
+	int                 query_id;
+	struct ib_sa_query *query;
+
+	unsigned long created;
+	unsigned long backoff;
+
+	unsigned long flags;
+	unsigned char logcount;
+
+	struct list_head  neigh_list;
+
+	struct sk_buff_head pkt_queue;
+
+	struct net_device *dev;
+};
+
+struct ipoib_mcast_iter {
+	struct net_device *dev;
+	union ib_gid       mgid;
+	unsigned long      created;
+	unsigned int       queuelen;
+	unsigned int       complete;
+	unsigned int       send_only;
+};
+
+static void ipoib_mcast_free(struct ipoib_mcast *mcast)
+{
+	struct net_device *dev = mcast->dev;
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+	struct ipoib_neigh *neigh, *tmp;
+	unsigned long flags;
+
+	ipoib_dbg_mcast(netdev_priv(dev),
+			"deleting multicast group " IPOIB_GID_FMT "\n",
+			IPOIB_GID_ARG(mcast->mcmember.mgid));
+
+	spin_lock_irqsave(&priv->lock, flags);
+
+	list_for_each_entry_safe(neigh, tmp, &mcast->neigh_list, list) {
+		ipoib_put_ah(neigh->ah);
+		*to_ipoib_neigh(neigh->neighbour) = NULL;
+		neigh->neighbour->ops->destructor = NULL;
+		kfree(neigh);
+	}
+
+	spin_unlock_irqrestore(&priv->lock, flags);
+
+	if (mcast->ah)
+		ipoib_put_ah(mcast->ah);
+
+	while (!skb_queue_empty(&mcast->pkt_queue)) {
+		struct sk_buff *skb = skb_dequeue(&mcast->pkt_queue);
+
+		skb->dev = dev;
+		dev_kfree_skb_any(skb);
+	}
+
+	kfree(mcast);
+}
+
+static struct ipoib_mcast *ipoib_mcast_alloc(struct net_device *dev,
+					     int can_sleep)
+{
+	struct ipoib_mcast *mcast;
+
+	mcast = kmalloc(sizeof (*mcast), can_sleep ? GFP_KERNEL : GFP_ATOMIC);
+	if (!mcast)
+		return NULL;
+
+	memset(mcast, 0, sizeof (*mcast));
+
+	init_completion(&mcast->done);
+
+	mcast->dev = dev;
+	mcast->created = jiffies;
+	mcast->backoff = HZ;
+	mcast->logcount = 0;
+
+	INIT_LIST_HEAD(&mcast->list);
+	INIT_LIST_HEAD(&mcast->neigh_list);
+	skb_queue_head_init(&mcast->pkt_queue);
+
+	mcast->ah    = NULL;
+	mcast->query = NULL;
+
+	return mcast;
+}
+
+static struct ipoib_mcast *__ipoib_mcast_find(struct net_device *dev, union ib_gid *mgid)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+	struct rb_node *n = priv->multicast_tree.rb_node;
+
+	while (n) {
+		struct ipoib_mcast *mcast;
+		int ret;
+
+		mcast = rb_entry(n, struct ipoib_mcast, rb_node);
+
+		ret = memcmp(mgid->raw, mcast->mcmember.mgid.raw,
+			     sizeof (union ib_gid));
+		if (ret < 0)
+			n = n->rb_left;
+		else if (ret > 0)
+			n = n->rb_right;
+		else
+			return mcast;
+	}
+
+	return NULL;
+}
+
+static int __ipoib_mcast_add(struct net_device *dev, struct ipoib_mcast *mcast)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+	struct rb_node **n = &priv->multicast_tree.rb_node, *pn = NULL;
+
+	while (*n) {
+		struct ipoib_mcast *tmcast;
+		int ret;
+
+		pn = *n;
+		tmcast = rb_entry(pn, struct ipoib_mcast, rb_node);
+
+		ret = memcmp(mcast->mcmember.mgid.raw, tmcast->mcmember.mgid.raw,
+			     sizeof (union ib_gid));
+		if (ret < 0)
+			n = &pn->rb_left;
+		else if (ret > 0)
+			n = &pn->rb_right;
+		else
+			return -EEXIST;
+	}
+
+	rb_link_node(&mcast->rb_node, pn, n);
+	rb_insert_color(&mcast->rb_node, &priv->multicast_tree);
+
+	return 0;
+}
+
+static int ipoib_mcast_join_finish(struct ipoib_mcast *mcast,
+				   struct ib_sa_mcmember_rec *mcmember)
+{
+	struct net_device *dev = mcast->dev;
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+	int ret;
+
+	mcast->mcmember = *mcmember;
+
+	/* Set the cached Q_Key before we attach if it's the broadcast group */
+	if (!memcmp(mcast->mcmember.mgid.raw, priv->dev->broadcast + 4,
+		    sizeof (union ib_gid)))
+		priv->qkey = be32_to_cpu(priv->broadcast->mcmember.qkey);
+
+	if (!test_bit(IPOIB_MCAST_FLAG_SENDONLY, &mcast->flags)) {
+		if (test_and_set_bit(IPOIB_MCAST_FLAG_ATTACHED, &mcast->flags)) {
+			ipoib_warn(priv, "multicast group " IPOIB_GID_FMT
+				   " already attached\n",
+				   IPOIB_GID_ARG(mcast->mcmember.mgid));
+
+			return 0;
+		}
+
+		ret = ipoib_mcast_attach(dev, be16_to_cpu(mcast->mcmember.mlid),
+					 &mcast->mcmember.mgid);
+		if (ret < 0) {
+			ipoib_warn(priv, "couldn't attach QP to multicast group "
+				   IPOIB_GID_FMT "\n",
+				   IPOIB_GID_ARG(mcast->mcmember.mgid));
+
+			clear_bit(IPOIB_MCAST_FLAG_ATTACHED, &mcast->flags);
+			return ret;
+		}
+	}
+
+	{
+		/*
+		 * For now we set static_rate to 0.  This is not
+		 * really correct: we should look at the rate
+		 * component of the MC member record, compare it with
+		 * the rate of our local port (calculated from the
+		 * active link speed and link width) and set an
+		 * inter-packet delay appropriately.
+		 */
+		struct ib_ah_attr av = {
+			.dlid	       = be16_to_cpu(mcast->mcmember.mlid),
+			.port_num      = priv->port,
+			.sl	       = mcast->mcmember.sl,
+			.static_rate   = 0,
+			.ah_flags      = IB_AH_GRH,
+			.grh	       = {
+				.flow_label    = be32_to_cpu(mcast->mcmember.flow_label),
+				.hop_limit     = mcast->mcmember.hop_limit,
+				.sgid_index    = 0,
+				.traffic_class = mcast->mcmember.traffic_class
+			}
+		};
+
+		av.grh.dgid = mcast->mcmember.mgid;
+
+		mcast->ah = ipoib_create_ah(dev, priv->pd, &av);
+		if (!mcast->ah) {
+			ipoib_warn(priv, "ib_address_create failed\n");
+		} else {
+			ipoib_dbg_mcast(priv, "MGID " IPOIB_GID_FMT
+					" AV %p, LID 0x%04x, SL %d\n",
+					IPOIB_GID_ARG(mcast->mcmember.mgid),
+					mcast->ah->ah,
+					be16_to_cpu(mcast->mcmember.mlid),
+					mcast->mcmember.sl);
+		}
+	}
+
+	/* actually send any queued packets */
+	while (!skb_queue_empty(&mcast->pkt_queue)) {
+		struct sk_buff *skb = skb_dequeue(&mcast->pkt_queue);
+
+		skb->dev = dev;
+
+		if (!skb->dst || !skb->dst->neighbour) {
+			/* put pseudoheader back on for next time */
+			skb_push(skb, sizeof (struct ipoib_pseudoheader));
+		}
+
+		if (dev_queue_xmit(skb))
+			ipoib_warn(priv, "dev_queue_xmit failed to requeue packet\n");
+	}
+
+	return 0;
+}
+
+static void
+ipoib_mcast_sendonly_join_complete(int status,
+				   struct ib_sa_mcmember_rec *mcmember,
+				   void *mcast_ptr)
+{
+	struct ipoib_mcast *mcast = mcast_ptr;
+	struct net_device *dev = mcast->dev;
+
+	if (!status)
+		ipoib_mcast_join_finish(mcast, mcmember);
+	else {
+		if (mcast->logcount++ < 20)
+			ipoib_dbg_mcast(netdev_priv(dev), "multicast join failed for "
+					IPOIB_GID_FMT ", status %d\n",
+					IPOIB_GID_ARG(mcast->mcmember.mgid), status);
+
+		/* Flush out any queued packets */
+		while (!skb_queue_empty(&mcast->pkt_queue)) {
+			struct sk_buff *skb = skb_dequeue(&mcast->pkt_queue);
+
+			skb->dev = dev;
+
+			dev_kfree_skb_any(skb);
+		}
+
+		/* Clear the busy flag so we try again */
+		clear_bit(IPOIB_MCAST_FLAG_BUSY, &mcast->flags);
+	}
+
+	complete(&mcast->done);
+}
+
+static int ipoib_mcast_sendonly_join(struct ipoib_mcast *mcast)
+{
+	struct net_device *dev = mcast->dev;
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+	struct ib_sa_mcmember_rec rec = {
+#if 0				/* Some SMs don't support send-only yet */
+		.join_state = 4
+#else
+		.join_state = 1
+#endif
+	};
+	int ret = 0;
+
+	if (!test_bit(IPOIB_FLAG_OPER_UP, &priv->flags)) {
+		ipoib_dbg_mcast(priv, "device shutting down, no multicast joins\n");
+		return -ENODEV;
+	}
+
+	if (test_and_set_bit(IPOIB_MCAST_FLAG_BUSY, &mcast->flags)) {
+		ipoib_dbg_mcast(priv, "multicast entry busy, skipping\n");
+		return -EBUSY;
+	}
+
+	rec.mgid     = mcast->mcmember.mgid;
+	rec.port_gid = priv->local_gid;
+	rec.pkey     = be16_to_cpu(priv->pkey);
+
+	ret = ib_sa_mcmember_rec_set(priv->ca, priv->port, &rec,
+				     IB_SA_MCMEMBER_REC_MGID		|
+				     IB_SA_MCMEMBER_REC_PORT_GID	|
+				     IB_SA_MCMEMBER_REC_PKEY		|
+				     IB_SA_MCMEMBER_REC_JOIN_STATE,
+				     1000, GFP_ATOMIC,
+				     ipoib_mcast_sendonly_join_complete,
+				     mcast, &mcast->query);
+	if (ret < 0) {
+		ipoib_warn(priv, "ib_sa_mcmember_rec_set failed (ret = %d)\n",
+			   ret);
+	} else {
+		ipoib_dbg_mcast(priv, "no multicast record for " IPOIB_GID_FMT
+				", starting join\n",
+				IPOIB_GID_ARG(mcast->mcmember.mgid));
+
+		mcast->query_id = ret;
+	}
+
+	return ret;
+}
+
+static void ipoib_mcast_join_complete(int status,
+				      struct ib_sa_mcmember_rec *mcmember,
+				      void *mcast_ptr)
+{
+	struct ipoib_mcast *mcast = mcast_ptr;
+	struct net_device *dev = mcast->dev;
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+
+	ipoib_dbg_mcast(priv, "join completion for " IPOIB_GID_FMT
+			" (status %d)\n",
+			IPOIB_GID_ARG(mcast->mcmember.mgid), status);
+
+	if (!status && !ipoib_mcast_join_finish(mcast, mcmember)) {
+		mcast->backoff = HZ;
+		down(&mcast_mutex);
+		if (test_bit(IPOIB_MCAST_RUN, &priv->flags))
+			queue_work(ipoib_workqueue, &priv->mcast_task);
+		up(&mcast_mutex);
+		complete(&mcast->done);
+		return;
+	}
+
+	if (status == -EINTR) {
+		complete(&mcast->done);
+		return;
+	}
+
+	if (status && mcast->logcount++ < 20) {
+		if (status == -ETIMEDOUT || status == -EINTR) {
+			ipoib_dbg_mcast(priv, "multicast join failed for " IPOIB_GID_FMT
+					", status %d\n",
+					IPOIB_GID_ARG(mcast->mcmember.mgid),
+					status);
+		} else {
+			ipoib_warn(priv, "multicast join failed for "
+				   IPOIB_GID_FMT ", status %d\n",
+				   IPOIB_GID_ARG(mcast->mcmember.mgid),
+				   status);
+		}
+	}
+
+	mcast->backoff *= 2;
+	if (mcast->backoff > IPOIB_MAX_BACKOFF_SECONDS)
+		mcast->backoff = IPOIB_MAX_BACKOFF_SECONDS;
+
+	mcast->query = NULL;
+
+	down(&mcast_mutex);
+	if (test_bit(IPOIB_MCAST_RUN, &priv->flags)) {
+		if (status == -ETIMEDOUT)
+			queue_work(ipoib_workqueue, &priv->mcast_task);
+		else
+			queue_delayed_work(ipoib_workqueue, &priv->mcast_task,
+					   mcast->backoff * HZ);
+	} else
+		complete(&mcast->done);
+	up(&mcast_mutex);
+
+	return;
+}
+
+static void ipoib_mcast_join(struct net_device *dev, struct ipoib_mcast *mcast,
+			     int create)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+	struct ib_sa_mcmember_rec rec = {
+		.join_state = 1
+	};
+	ib_sa_comp_mask comp_mask;
+	int ret = 0;
+
+	ipoib_dbg_mcast(priv, "joining MGID " IPOIB_GID_FMT "\n",
+			IPOIB_GID_ARG(mcast->mcmember.mgid));
+
+	rec.mgid     = mcast->mcmember.mgid;
+	rec.port_gid = priv->local_gid;
+	rec.pkey     = be16_to_cpu(priv->pkey);
+
+	comp_mask =
+		IB_SA_MCMEMBER_REC_MGID		|
+		IB_SA_MCMEMBER_REC_PORT_GID	|
+		IB_SA_MCMEMBER_REC_PKEY		|
+		IB_SA_MCMEMBER_REC_JOIN_STATE;
+
+	if (create) {
+		comp_mask |=
+			IB_SA_MCMEMBER_REC_QKEY		|
+			IB_SA_MCMEMBER_REC_SL		|
+			IB_SA_MCMEMBER_REC_FLOW_LABEL	|
+			IB_SA_MCMEMBER_REC_TRAFFIC_CLASS;
+
+		rec.qkey	  = priv->broadcast->mcmember.qkey;
+		rec.sl		  = priv->broadcast->mcmember.sl;
+		rec.flow_label	  = priv->broadcast->mcmember.flow_label;
+		rec.traffic_class = priv->broadcast->mcmember.traffic_class;
+	}
+
+	ret = ib_sa_mcmember_rec_set(priv->ca, priv->port, &rec, comp_mask,
+				     mcast->backoff * 1000, GFP_ATOMIC,
+				     ipoib_mcast_join_complete,
+				     mcast, &mcast->query);
+
+	if (ret < 0) {
+		ipoib_warn(priv, "ib_sa_mcmember_rec_set failed, status %d\n", ret);
+
+		mcast->backoff *= 2;
+		if (mcast->backoff > IPOIB_MAX_BACKOFF_SECONDS)
+			mcast->backoff = IPOIB_MAX_BACKOFF_SECONDS;
+
+		down(&mcast_mutex);
+		if (test_bit(IPOIB_MCAST_RUN, &priv->flags))
+			queue_delayed_work(ipoib_workqueue,
+					   &priv->mcast_task,
+					   mcast->backoff);
+		up(&mcast_mutex);
+	} else
+		mcast->query_id = ret;
+}
+
+void ipoib_mcast_join_task(void *dev_ptr)
+{
+	struct net_device *dev = dev_ptr;
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+
+	if (!test_bit(IPOIB_MCAST_RUN, &priv->flags))
+		return;
+
+	if (ib_query_gid(priv->ca, priv->port, 0, &priv->local_gid))
+		ipoib_warn(priv, "ib_gid_entry_get() failed\n");
+	else
+		memcpy(priv->dev->dev_addr + 4, priv->local_gid.raw, sizeof (union ib_gid));
+
+	if (!priv->broadcast) {
+		priv->broadcast = ipoib_mcast_alloc(dev, 1);
+		if (!priv->broadcast) {
+			ipoib_warn(priv, "failed to allocate broadcast group\n");
+			down(&mcast_mutex);
+			if (test_bit(IPOIB_MCAST_RUN, &priv->flags))
+				queue_delayed_work(ipoib_workqueue,
+						   &priv->mcast_task, HZ);
+			up(&mcast_mutex);
+			return;
+		}
+
+		memcpy(priv->broadcast->mcmember.mgid.raw, priv->dev->broadcast + 4,
+		       sizeof (union ib_gid));
+
+		spin_lock_irq(&priv->lock);
+		__ipoib_mcast_add(dev, priv->broadcast);
+		spin_unlock_irq(&priv->lock);
+	}
+
+	if (!test_bit(IPOIB_MCAST_FLAG_ATTACHED, &priv->broadcast->flags)) {
+		ipoib_mcast_join(dev, priv->broadcast, 0);
+		return;
+	}
+
+	while (1) {
+		struct ipoib_mcast *mcast = NULL;
+
+		spin_lock_irq(&priv->lock);
+		list_for_each_entry(mcast, &priv->multicast_list, list) {
+			if (!test_bit(IPOIB_MCAST_FLAG_SENDONLY, &mcast->flags)
+			    && !test_bit(IPOIB_MCAST_FLAG_BUSY, &mcast->flags)
+			    && !test_bit(IPOIB_MCAST_FLAG_ATTACHED, &mcast->flags)) {
+				/* Found the next unjoined group */
+				break;
+			}
+		}
+		spin_unlock_irq(&priv->lock);
+
+		if (&mcast->list == &priv->multicast_list) {
+			/* All done */
+			break;
+		}
+
+		ipoib_mcast_join(dev, mcast, 1);
+		return;
+	}
+
+	{
+		struct ib_port_attr attr;
+
+		if (!ib_query_port(priv->ca, priv->port, &attr))
+			priv->local_lid = attr.lid;
+		else
+			ipoib_warn(priv, "ib_query_port failed\n");
+	}
+
+	priv->mcast_mtu = ib_mtu_enum_to_int(priv->broadcast->mcmember.mtu) -
+		IPOIB_ENCAP_LEN;
+	dev->mtu = min(priv->mcast_mtu, priv->admin_mtu);
+
+	ipoib_dbg_mcast(priv, "successfully joined all multicast groups\n");
+
+	clear_bit(IPOIB_MCAST_RUN, &priv->flags);
+	netif_carrier_on(dev);
+}
+
+int ipoib_mcast_start_thread(struct net_device *dev)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+
+	ipoib_dbg_mcast(priv, "starting multicast thread\n");
+
+	down(&mcast_mutex);
+	if (!test_and_set_bit(IPOIB_MCAST_RUN, &priv->flags))
+		queue_work(ipoib_workqueue, &priv->mcast_task);
+	up(&mcast_mutex);
+
+	return 0;
+}
+
+int ipoib_mcast_stop_thread(struct net_device *dev)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+	struct ipoib_mcast *mcast;
+
+	ipoib_dbg_mcast(priv, "stopping multicast thread\n");
+
+	down(&mcast_mutex);
+	clear_bit(IPOIB_MCAST_RUN, &priv->flags);
+	cancel_delayed_work(&priv->mcast_task);
+	up(&mcast_mutex);
+
+	flush_workqueue(ipoib_workqueue);
+
+	if (priv->broadcast && priv->broadcast->query) {
+		ib_sa_cancel_query(priv->broadcast->query_id, priv->broadcast->query);
+		priv->broadcast->query = NULL;
+		ipoib_dbg_mcast(priv, "waiting for bcast\n");
+		wait_for_completion(&priv->broadcast->done);
+	}
+
+	list_for_each_entry(mcast, &priv->multicast_list, list) {
+		if (mcast->query) {
+			ib_sa_cancel_query(mcast->query_id, mcast->query);
+			mcast->query = NULL;
+			ipoib_dbg_mcast(priv, "waiting for MGID " IPOIB_GID_FMT "\n",
+					IPOIB_GID_ARG(mcast->mcmember.mgid));
+			wait_for_completion(&mcast->done);
+		}
+	}
+
+	return 0;
+}
+
+int ipoib_mcast_leave(struct net_device *dev, struct ipoib_mcast *mcast)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+	struct ib_sa_mcmember_rec rec = {
+		.join_state = 1
+	};
+	int ret = 0;
+
+	if (!test_and_clear_bit(IPOIB_MCAST_FLAG_ATTACHED, &mcast->flags))
+		return 0;
+
+	ipoib_dbg_mcast(priv, "leaving MGID " IPOIB_GID_FMT "\n",
+			IPOIB_GID_ARG(mcast->mcmember.mgid));
+
+	rec.mgid     = mcast->mcmember.mgid;
+	rec.port_gid = priv->local_gid;
+	rec.pkey     = be16_to_cpu(priv->pkey);
+
+	/* Remove ourselves from the multicast group */
+	ret = ipoib_mcast_detach(dev, be16_to_cpu(mcast->mcmember.mlid),
+				 &mcast->mcmember.mgid);
+	if (ret)
+		ipoib_warn(priv, "ipoib_mcast_detach failed (result = %d)\n", ret);
+
+	/*
+	 * Just make one shot at leaving and don't wait for a reply;
+	 * if we fail, too bad.
+	 */
+	ret = ib_sa_mcmember_rec_delete(priv->ca, priv->port, &rec,
+					IB_SA_MCMEMBER_REC_MGID		|
+					IB_SA_MCMEMBER_REC_PORT_GID	|
+					IB_SA_MCMEMBER_REC_PKEY		|
+					IB_SA_MCMEMBER_REC_JOIN_STATE,
+					0, GFP_ATOMIC, NULL,
+					mcast, &mcast->query);
+	if (ret < 0)
+		ipoib_warn(priv, "ib_sa_mcmember_rec_delete failed "
+			   "for leave (result = %d)\n", ret);
+
+	return 0;
+}
+
+void ipoib_mcast_send(struct net_device *dev, union ib_gid *mgid,
+		      struct sk_buff *skb)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+	struct ipoib_mcast *mcast;
+
+	/*
+	 * We can only be called from ipoib_start_xmit, so we're
+	 * inside tx_lock -- no need to save/restore flags.
+	 */
+	spin_lock(&priv->lock);
+
+	mcast = __ipoib_mcast_find(dev, mgid);
+	if (!mcast) {
+		/* Let's create a new send only group now */
+		ipoib_dbg_mcast(priv, "setting up send only multicast group for "
+				IPOIB_GID_FMT "\n", IPOIB_GID_ARG(*mgid));
+
+		mcast = ipoib_mcast_alloc(dev, 0);
+		if (!mcast) {
+			ipoib_warn(priv, "unable to allocate memory for "
+				   "multicast structure\n");
+			dev_kfree_skb_any(skb);
+			goto out;
+		}
+
+		set_bit(IPOIB_MCAST_FLAG_SENDONLY, &mcast->flags);
+		mcast->mcmember.mgid = *mgid;
+		__ipoib_mcast_add(dev, mcast);
+		list_add_tail(&mcast->list, &priv->multicast_list);
+	}
+
+	if (!mcast->ah) {
+		if (skb_queue_len(&mcast->pkt_queue) < IPOIB_MAX_MCAST_QUEUE)
+			skb_queue_tail(&mcast->pkt_queue, skb);
+		else
+			dev_kfree_skb_any(skb);
+
+		if (mcast->query)
+			ipoib_dbg_mcast(priv, "no address vector, "
+					"but multicast join already started\n");
+		else if (test_bit(IPOIB_MCAST_FLAG_SENDONLY, &mcast->flags))
+			ipoib_mcast_sendonly_join(mcast);
+
+		/*
+		 * If lookup completes between here and out:, don't
+		 * want to send packet twice.
+		 */
+		mcast = NULL;
+	}
+
+out:
+	if (mcast && mcast->ah) {
+		if (skb->dst            &&
+		    skb->dst->neighbour &&
+		    !*to_ipoib_neigh(skb->dst->neighbour)) {
+			struct ipoib_neigh *neigh = kmalloc(sizeof *neigh, GFP_ATOMIC);
+
+			if (neigh) {
+				kref_get(&mcast->ah->ref);
+				neigh->ah  	= mcast->ah;
+				neigh->neighbour = skb->dst->neighbour;
+				*to_ipoib_neigh(skb->dst->neighbour) = neigh;
+				list_add_tail(&neigh->list, &mcast->neigh_list);
+			}
+		}
+
+		ipoib_send(dev, skb, mcast->ah, IB_MULTICAST_QPN);
+	}
+
+	spin_unlock(&priv->lock);
+}
+
+void ipoib_mcast_dev_flush(struct net_device *dev)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+	LIST_HEAD(remove_list);
+	struct ipoib_mcast *mcast, *tmcast, *nmcast;
+	unsigned long flags;
+
+	ipoib_dbg_mcast(priv, "flushing multicast list\n");
+
+	spin_lock_irqsave(&priv->lock, flags);
+	list_for_each_entry_safe(mcast, tmcast, &priv->multicast_list, list) {
+		nmcast = ipoib_mcast_alloc(dev, 0);
+		if (nmcast) {
+			nmcast->flags =
+				mcast->flags & (1 << IPOIB_MCAST_FLAG_SENDONLY);
+
+			nmcast->mcmember.mgid = mcast->mcmember.mgid;
+
+			/* Add the new group in before the to-be-destroyed group */
+			list_add_tail(&nmcast->list, &mcast->list);
+			list_del_init(&mcast->list);
+
+			rb_replace_node(&mcast->rb_node, &nmcast->rb_node,
+					&priv->multicast_tree);
+
+			list_add_tail(&mcast->list, &remove_list);
+		} else {
+			ipoib_warn(priv, "could not reallocate multicast group "
+				   IPOIB_GID_FMT "\n",
+				   IPOIB_GID_ARG(mcast->mcmember.mgid));
+		}
+	}
+
+	if (priv->broadcast) {
+		nmcast = ipoib_mcast_alloc(dev, 0);
+		if (nmcast) {
+			nmcast->mcmember.mgid = priv->broadcast->mcmember.mgid;
+
+			rb_replace_node(&priv->broadcast->rb_node,
+					&nmcast->rb_node,
+					&priv->multicast_tree);
+
+			list_add_tail(&priv->broadcast->list, &remove_list);
+		}
+
+		priv->broadcast = nmcast;
+	}
+
+	spin_unlock_irqrestore(&priv->lock, flags);
+
+	list_for_each_entry(mcast, &remove_list, list) {
+		ipoib_mcast_leave(dev, mcast);
+		ipoib_mcast_free(mcast);
+	}
+}
+
+void ipoib_mcast_dev_down(struct net_device *dev)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+	unsigned long flags;
+
+	/* Delete broadcast since it will be recreated */
+	if (priv->broadcast) {
+		ipoib_dbg_mcast(priv, "deleting broadcast group\n");
+
+		spin_lock_irqsave(&priv->lock, flags);
+		rb_erase(&priv->broadcast->rb_node, &priv->multicast_tree);
+		spin_unlock_irqrestore(&priv->lock, flags);
+		ipoib_mcast_leave(dev, priv->broadcast);
+		ipoib_mcast_free(priv->broadcast);
+		priv->broadcast = NULL;
+	}
+}
+
+void ipoib_mcast_restart_task(void *dev_ptr)
+{
+	struct net_device *dev = dev_ptr;
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+	struct dev_mc_list *mclist;
+	struct ipoib_mcast *mcast, *tmcast;
+	LIST_HEAD(remove_list);
+	unsigned long flags;
+
+	ipoib_dbg_mcast(priv, "restarting multicast task\n");
+
+	ipoib_mcast_stop_thread(dev);
+
+	spin_lock_irqsave(&priv->lock, flags);
+
+	/*
+	 * Unfortunately, the networking core only gives us a list of all of
+	 * the multicast hardware addresses. We need to figure out which ones
+	 * are new and which ones have been removed
+	 */
+
+	/* Clear out the found flag */
+	list_for_each_entry(mcast, &priv->multicast_list, list)
+		clear_bit(IPOIB_MCAST_FLAG_FOUND, &mcast->flags);
+
+	/* Mark all of the entries that are found or don't exist */
+	for (mclist = dev->mc_list; mclist; mclist = mclist->next) {
+		union ib_gid mgid;
+
+		memcpy(mgid.raw, mclist->dmi_addr + 4, sizeof mgid);
+
+		/* Add in the P_Key */
+		mgid.raw[4] = (priv->pkey >> 8) & 0xff;
+		mgid.raw[5] = priv->pkey & 0xff;
+
+		mcast = __ipoib_mcast_find(dev, &mgid);
+		if (!mcast || test_bit(IPOIB_MCAST_FLAG_SENDONLY, &mcast->flags)) {
+			struct ipoib_mcast *nmcast;
+
+			/* Not found or send-only group, let's add a new entry */
+			ipoib_dbg_mcast(priv, "adding multicast entry for mgid "
+					IPOIB_GID_FMT "\n", IPOIB_GID_ARG(mgid));
+
+			nmcast = ipoib_mcast_alloc(dev, 0);
+			if (!nmcast) {
+				ipoib_warn(priv, "unable to allocate memory for multicast structure\n");
+				continue;
+			}
+
+			set_bit(IPOIB_MCAST_FLAG_FOUND, &nmcast->flags);
+
+			nmcast->mcmember.mgid = mgid;
+
+			if (mcast) {
+				/* Destroy the send only entry */
+				list_del(&mcast->list);
+				list_add_tail(&mcast->list, &remove_list);
+
+				rb_replace_node(&mcast->rb_node,
+						&nmcast->rb_node,
+						&priv->multicast_tree);
+			} else
+				__ipoib_mcast_add(dev, nmcast);
+
+			list_add_tail(&nmcast->list, &priv->multicast_list);
+		}
+
+		if (mcast)
+			set_bit(IPOIB_MCAST_FLAG_FOUND, &mcast->flags);
+	}
+
+	/* Remove all of the entries don't exist anymore */
+	list_for_each_entry_safe(mcast, tmcast, &priv->multicast_list, list) {
+		if (!test_bit(IPOIB_MCAST_FLAG_FOUND, &mcast->flags) &&
+		    !test_bit(IPOIB_MCAST_FLAG_SENDONLY, &mcast->flags)) {
+			ipoib_dbg_mcast(priv, "deleting multicast group " IPOIB_GID_FMT "\n",
+					IPOIB_GID_ARG(mcast->mcmember.mgid));
+
+			rb_erase(&mcast->rb_node, &priv->multicast_tree);
+
+			/* Move to the remove list */
+			list_del(&mcast->list);
+			list_add_tail(&mcast->list, &remove_list);
+		}
+	}
+	spin_unlock_irqrestore(&priv->lock, flags);
+
+	/* We have to cancel outside of the spinlock */
+	list_for_each_entry(mcast, &remove_list, list) {
+		ipoib_mcast_leave(mcast->dev, mcast);
+		ipoib_mcast_free(mcast);
+	}
+
+	if (test_bit(IPOIB_FLAG_ADMIN_UP, &priv->flags))
+		ipoib_mcast_start_thread(dev);
+}
+
+struct ipoib_mcast_iter *ipoib_mcast_iter_init(struct net_device *dev)
+{
+	struct ipoib_mcast_iter *iter;
+
+	iter = kmalloc(sizeof *iter, GFP_KERNEL);
+	if (!iter)
+		return NULL;
+
+	iter->dev = dev;
+	memset(iter->mgid.raw, 0, sizeof iter->mgid);
+
+	if (ipoib_mcast_iter_next(iter)) {
+		ipoib_mcast_iter_free(iter);
+		return NULL;
+	}
+
+	return iter;
+}
+
+void ipoib_mcast_iter_free(struct ipoib_mcast_iter *iter)
+{
+	kfree(iter);
+}
+
+int ipoib_mcast_iter_next(struct ipoib_mcast_iter *iter)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(iter->dev);
+	struct rb_node *n;
+	struct ipoib_mcast *mcast;
+	int ret = 1;
+
+	spin_lock_irq(&priv->lock);
+
+	n = rb_first(&priv->multicast_tree);
+
+	while (n) {
+		mcast = rb_entry(n, struct ipoib_mcast, rb_node);
+
+		if (memcmp(iter->mgid.raw, mcast->mcmember.mgid.raw,
+			   sizeof (union ib_gid)) < 0) {
+			iter->mgid      = mcast->mcmember.mgid;
+			iter->created   = mcast->created;
+			iter->queuelen  = skb_queue_len(&mcast->pkt_queue);
+			iter->complete  = !!mcast->ah;
+			iter->send_only = !!(mcast->flags & (1 << IPOIB_MCAST_FLAG_SENDONLY));
+
+			ret = 0;
+
+			break;
+		}
+
+		n = rb_next(n);
+	}
+
+	spin_unlock_irq(&priv->lock);
+
+	return ret;
+}
+
+void ipoib_mcast_iter_read(struct ipoib_mcast_iter *iter,
+			   union ib_gid *mgid,
+			   unsigned long *created,
+			   unsigned int *queuelen,
+			   unsigned int *complete,
+			   unsigned int *send_only)
+{
+	*mgid      = iter->mgid;
+	*created   = iter->created;
+	*queuelen  = iter->queuelen;
+	*complete  = iter->complete;
+	*send_only = iter->send_only;
+}
diff -Nru a/drivers/infiniband/ulp/ipoib/ipoib_verbs.c b/drivers/infiniband/ulp/ipoib/ipoib_verbs.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/ulp/ipoib/ipoib_verbs.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,254 @@
+/*
+ * Copyright (c) 2004 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: ipoib_verbs.c 1349 2004-12-16 21:09:43Z roland $
+ */
+
+#include <ib_cache.h>
+
+#include "ipoib.h"
+
+int ipoib_mcast_attach(struct net_device *dev, u16 mlid, union ib_gid *mgid)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+	struct ib_qp_attr *qp_attr;
+	int attr_mask;
+	int ret;
+	u16 pkey_index;
+
+	ret = -ENOMEM;
+	qp_attr = kmalloc(sizeof *qp_attr, GFP_KERNEL);
+	if (!qp_attr)
+		goto out;
+
+	if (ib_cached_pkey_find(priv->ca, priv->port, priv->pkey, &pkey_index)) {
+		clear_bit(IPOIB_PKEY_ASSIGNED, &priv->flags);
+		ret = -ENXIO;
+		goto out;
+	}
+	set_bit(IPOIB_PKEY_ASSIGNED, &priv->flags);
+
+	/* set correct QKey for QP */
+	qp_attr->qkey = priv->qkey;
+	attr_mask = IB_QP_QKEY;
+	ret = ib_modify_qp(priv->qp, qp_attr, attr_mask);
+	if (ret) {
+		ipoib_warn(priv, "failed to modify QP, ret = %d\n", ret);
+		goto out;
+	}
+
+	/* attach QP to multicast group */
+	down(&priv->mcast_mutex);
+	ret = ib_attach_mcast(priv->qp, mgid, mlid);
+	up(&priv->mcast_mutex);
+	if (ret)
+		ipoib_warn(priv, "failed to attach to multicast group, ret = %d\n", ret);
+
+out:
+	kfree(qp_attr);
+	return ret;
+}
+
+int ipoib_mcast_detach(struct net_device *dev, u16 mlid, union ib_gid *mgid)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+	int ret;
+
+	down(&priv->mcast_mutex);
+	ret = ib_detach_mcast(priv->qp, mgid, mlid);
+	up(&priv->mcast_mutex);
+	if (ret)
+		ipoib_warn(priv, "ib_detach_mcast failed (result = %d)\n", ret);
+
+	return ret;
+}
+
+int ipoib_qp_create(struct net_device *dev)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+	int ret;
+	u16 pkey_index;
+	struct ib_qp_attr qp_attr;
+	int attr_mask;
+
+	/*
+	 * Search through the port P_Key table for the requested pkey value.
+	 * The port has to be assigned to the respective IB partition in
+	 * advance.
+	 */
+	ret = ib_cached_pkey_find(priv->ca, priv->port, priv->pkey, &pkey_index);
+	if (ret) {
+		clear_bit(IPOIB_PKEY_ASSIGNED, &priv->flags);
+		return ret;
+	}
+	set_bit(IPOIB_PKEY_ASSIGNED, &priv->flags);
+
+	qp_attr.qp_state = IB_QPS_INIT;
+	qp_attr.qkey = 0;
+	qp_attr.port_num = priv->port;
+	qp_attr.pkey_index = pkey_index;
+	attr_mask =
+	    IB_QP_QKEY |
+	    IB_QP_PORT |
+	    IB_QP_PKEY_INDEX |
+	    IB_QP_STATE;
+	ret = ib_modify_qp(priv->qp, &qp_attr, attr_mask);
+	if (ret) {
+		ipoib_warn(priv, "failed to modify QP to init, ret = %d\n", ret);
+		goto out_fail;
+	}
+
+	qp_attr.qp_state = IB_QPS_RTR;
+	/* Can't set this in a INIT->RTR transition */
+	attr_mask &= ~IB_QP_PORT;
+	ret = ib_modify_qp(priv->qp, &qp_attr, attr_mask);
+	if (ret) {
+		ipoib_warn(priv, "failed to modify QP to RTR, ret = %d\n", ret);
+		goto out_fail;
+	}
+
+	qp_attr.qp_state = IB_QPS_RTS;
+	qp_attr.sq_psn = 0;
+	attr_mask |= IB_QP_SQ_PSN;
+	attr_mask &= ~IB_QP_PKEY_INDEX;
+	ret = ib_modify_qp(priv->qp, &qp_attr, attr_mask);
+	if (ret) {
+		ipoib_warn(priv, "failed to modify QP to RTS, ret = %d\n", ret);
+		goto out_fail;
+	}
+
+	return 0;
+
+out_fail:
+	ib_destroy_qp(priv->qp);
+	priv->qp = NULL;
+
+	return -EINVAL;
+}
+
+int ipoib_transport_dev_init(struct net_device *dev, struct ib_device *ca)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+	struct ib_qp_init_attr init_attr = {
+		.cap = {
+			.max_send_wr  = IPOIB_TX_RING_SIZE,
+			.max_recv_wr  = IPOIB_RX_RING_SIZE,
+			.max_send_sge = 1,
+			.max_recv_sge = 1
+		},
+		.sq_sig_type = IB_SIGNAL_ALL_WR,
+		.rq_sig_type = IB_SIGNAL_ALL_WR,
+		.qp_type     = IB_QPT_UD
+	};
+
+	priv->pd = ib_alloc_pd(priv->ca);
+	if (IS_ERR(priv->pd)) {
+		printk(KERN_WARNING "%s: failed to allocate PD\n", ca->name);
+		return -ENODEV;
+	}
+
+	priv->cq = ib_create_cq(priv->ca, ipoib_ib_completion, NULL, dev,
+				IPOIB_TX_RING_SIZE + IPOIB_RX_RING_SIZE + 1);
+	if (IS_ERR(priv->cq)) {
+		printk(KERN_WARNING "%s: failed to create CQ\n", ca->name);
+		goto out_free_pd;
+	}
+
+	if (ib_req_notify_cq(priv->cq, IB_CQ_NEXT_COMP))
+		goto out_free_cq;
+
+	priv->mr = ib_get_dma_mr(priv->pd, IB_ACCESS_LOCAL_WRITE);
+	if (IS_ERR(priv->mr)) {
+		printk(KERN_WARNING "%s: ib_reg_phys_mr failed\n", ca->name);
+		goto out_free_cq;
+	}
+
+	init_attr.send_cq = priv->cq;
+	init_attr.recv_cq = priv->cq,
+
+	priv->qp = ib_create_qp(priv->pd, &init_attr);
+	if (IS_ERR(priv->qp)) {
+		printk(KERN_WARNING "%s: failed to create QP\n", ca->name);
+		goto out_free_mr;
+	}
+
+	priv->dev->dev_addr[1] = (priv->qp->qp_num >> 16) & 0xff;
+	priv->dev->dev_addr[2] = (priv->qp->qp_num >>  8) & 0xff;
+	priv->dev->dev_addr[3] = (priv->qp->qp_num      ) & 0xff;
+
+	return 0;
+
+out_free_mr:
+	ib_dereg_mr(priv->mr);
+
+out_free_cq:
+	ib_destroy_cq(priv->cq);
+
+out_free_pd:
+	ib_dealloc_pd(priv->pd);
+	return -ENODEV;
+}
+
+void ipoib_transport_dev_cleanup(struct net_device *dev)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+
+	if (priv->qp) {
+		if (ib_destroy_qp(priv->qp))
+			ipoib_warn(priv, "ib_qp_destroy failed\n");
+
+		priv->qp = NULL;
+		clear_bit(IPOIB_PKEY_ASSIGNED, &priv->flags);
+	}
+
+	if (ib_dereg_mr(priv->mr))
+		ipoib_warn(priv, "ib_dereg_mr failed\n");
+
+	if (ib_destroy_cq(priv->cq))
+		ipoib_warn(priv, "ib_cq_destroy failed\n");
+
+	if (ib_dealloc_pd(priv->pd))
+		ipoib_warn(priv, "ib_dealloc_pd failed\n");
+}
+
+void ipoib_event(struct ib_event_handler *handler,
+		 struct ib_event *record)
+{
+	struct ipoib_dev_priv *priv =
+		container_of(handler, struct ipoib_dev_priv, event_handler);
+
+	if (record->event == IB_EVENT_PORT_ACTIVE ||
+	    record->event == IB_EVENT_LID_CHANGE  ||
+	    record->event == IB_EVENT_SM_CHANGE) {
+		ipoib_dbg(priv, "Port active event\n");
+		schedule_work(&priv->flush_task);
+	}
+}
diff -Nru a/drivers/infiniband/ulp/ipoib/ipoib_vlan.c b/drivers/infiniband/ulp/ipoib/ipoib_vlan.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/infiniband/ulp/ipoib/ipoib_vlan.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,177 @@
+/*
+ * Copyright (c) 2004 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: ipoib_vlan.c 1349 2004-12-16 21:09:43Z roland $
+ */
+
+#include <linux/version.h>
+#include <linux/module.h>
+
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/seq_file.h>
+
+#include <asm/uaccess.h>
+
+#include "ipoib.h"
+
+static ssize_t show_parent(struct class_device *class_dev, char *buf)
+{
+	struct net_device *dev =
+		container_of(class_dev, struct net_device, class_dev);
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+
+	return sprintf(buf, "%s\n", priv->parent->name);
+}
+static CLASS_DEVICE_ATTR(parent, S_IRUGO, show_parent, NULL);
+
+int ipoib_vlan_add(struct net_device *pdev, unsigned short pkey)
+{
+	struct ipoib_dev_priv *ppriv, *priv;
+	char intf_name[IFNAMSIZ];
+	int result;
+
+	if (!capable(CAP_NET_ADMIN))
+		return -EPERM;
+
+	ppriv = netdev_priv(pdev);
+
+	down(&ppriv->vlan_mutex);
+
+	/*
+	 * First ensure this isn't a duplicate. We check the parent device and
+	 * then all of the child interfaces to make sure the Pkey doesn't match.
+	 */
+	if (ppriv->pkey == pkey) {
+		result = -ENOTUNIQ;
+		goto err;
+	}
+
+	list_for_each_entry(priv, &ppriv->child_intfs, list) {
+		if (priv->pkey == pkey) {
+			result = -ENOTUNIQ;
+			goto err;
+		}
+	}
+
+	snprintf(intf_name, sizeof intf_name, "%s.%04x",
+		 ppriv->dev->name, pkey);
+	priv = ipoib_intf_alloc(intf_name);
+	if (!priv) {
+		result = -ENOMEM;
+		goto err;
+	}
+
+	set_bit(IPOIB_FLAG_SUBINTERFACE, &priv->flags);
+
+	priv->pkey = pkey;
+
+	memcpy(priv->dev->dev_addr, ppriv->dev->dev_addr, INFINIBAND_ALEN);
+	priv->dev->broadcast[8] = pkey >> 8;
+	priv->dev->broadcast[9] = pkey & 0xff;
+
+	result = ipoib_dev_init(priv->dev, ppriv->ca, ppriv->port);
+	if (result < 0) {
+		ipoib_warn(ppriv, "failed to initialize subinterface: "
+			   "device %s, port %d",
+			   ppriv->ca->name, ppriv->port);
+		goto device_init_failed;
+	}
+
+	result = register_netdev(priv->dev);
+	if (result) {
+		ipoib_warn(priv, "failed to initialize; error %i", result);
+		goto register_failed;
+	}
+
+	priv->parent = ppriv->dev;
+
+	if (ipoib_create_debug_file(priv->dev))
+		goto debug_failed;
+
+	if (ipoib_add_pkey_attr(priv->dev))
+		goto sysfs_failed;
+
+	if (class_device_create_file(&priv->dev->class_dev,
+				     &class_device_attr_parent))
+		goto sysfs_failed;
+
+	list_add_tail(&priv->list, &ppriv->child_intfs);
+
+	up(&ppriv->vlan_mutex);
+
+	return 0;
+
+sysfs_failed:
+	ipoib_delete_debug_file(priv->dev);
+
+debug_failed:
+	unregister_netdev(priv->dev);
+
+register_failed:
+	ipoib_dev_cleanup(priv->dev);
+
+device_init_failed:
+	free_netdev(priv->dev);
+
+err:
+	up(&ppriv->vlan_mutex);
+	return result;
+}
+
+int ipoib_vlan_delete(struct net_device *pdev, unsigned short pkey)
+{
+	struct ipoib_dev_priv *ppriv, *priv, *tpriv;
+	int ret = -ENOENT;
+
+	if (!capable(CAP_NET_ADMIN))
+		return -EPERM;
+
+	ppriv = netdev_priv(pdev);
+
+	down(&ppriv->vlan_mutex);
+	list_for_each_entry_safe(priv, tpriv, &ppriv->child_intfs, list) {
+		if (priv->pkey == pkey) {
+			unregister_netdev(priv->dev);
+			ipoib_dev_cleanup(priv->dev);
+
+			list_del(&priv->list);
+
+			kfree(priv);
+
+			ret = 0;
+			break;
+		}
+	}
+	up(&ppriv->vlan_mutex);
+
+	return ret;
+}
diff -Nru a/drivers/input/gameport/Kconfig b/drivers/input/gameport/Kconfig
--- a/drivers/input/gameport/Kconfig	2005-01-10 20:11:15 -08:00
+++ b/drivers/input/gameport/Kconfig	2005-01-10 20:11:15 -08:00
@@ -84,7 +84,7 @@
 	tristate "ForteMedia FM801 gameport support"
 	depends on GAMEPORT
 
-config GAMEPORT_CS461x
+config GAMEPORT_CS461X
 	tristate "Crystal SoundFusion gameport support"
 	depends on GAMEPORT
 
diff -Nru a/drivers/input/input.c b/drivers/input/input.c
--- a/drivers/input/input.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/input/input.c	2005-01-10 20:11:19 -08:00
@@ -17,7 +17,6 @@
 #include <linux/module.h>
 #include <linux/random.h>
 #include <linux/major.h>
-#include <linux/pm.h>
 #include <linux/proc_fs.h>
 #include <linux/kobject_uevent.h>
 #include <linux/interrupt.h>
@@ -67,9 +66,6 @@
 {
 	struct input_handle *handle;
 
-	if (dev->pm_dev)
-		pm_access(dev->pm_dev);
-
 	if (type > EV_MAX || !test_bit(type, dev->evbit))
 		return;
 
@@ -230,8 +226,6 @@
 
 int input_open_device(struct input_handle *handle)
 {
-	if (handle->dev->pm_dev)
-		pm_access(handle->dev->pm_dev);
 	handle->open++;
 	if (handle->dev->open)
 		return handle->dev->open(handle->dev);
@@ -249,8 +243,6 @@
 void input_close_device(struct input_handle *handle)
 {
 	input_release_device(handle);
-	if (handle->dev->pm_dev)
-		pm_dev_idle(handle->dev->pm_dev);
 	if (handle->dev->close)
 		handle->dev->close(handle->dev);
 	handle->open--;
@@ -467,9 +459,6 @@
 	struct list_head * node, * next;
 
 	if (!dev) return;
-
-	if (dev->pm_dev)
-		pm_unregister(dev->pm_dev);
 
 	del_timer_sync(&dev->timer);
 
diff -Nru a/drivers/input/joystick/gamecon.c b/drivers/input/joystick/gamecon.c
--- a/drivers/input/joystick/gamecon.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/input/joystick/gamecon.c	2005-01-10 20:11:23 -08:00
@@ -89,7 +89,7 @@
 static int gc_status_bit[] = { 0x40, 0x80, 0x20, 0x10, 0x08 };
 
 static char *gc_names[] = { NULL, "SNES pad", "NES pad", "NES FourPort", "Multisystem joystick",
-				"Multisystem 2-button joystick", "N64 controller", "PSX controller"
+				"Multisystem 2-button joystick", "N64 controller", "PSX controller",
 				"PSX DDR controller" };
 /*
  * N64 support.
@@ -271,7 +271,7 @@
 		udelay(gc_psx_delay);
 		read = parport_read_status(gc->pd->port) ^ 0x80;
 		for (j = 0; j < 5; j++)
-			data[j] |= (read & gc_status_bit[j] & gc->pads[GC_PSX]) ? (1 << i) : 0;
+			data[j] |= (read & gc_status_bit[j] & (gc->pads[GC_PSX] | gc->pads[GC_DDR])) ? (1 << i) : 0;
 		parport_write_data(gc->pd->port, cmd | GC_PSX_CLOCK | GC_PSX_POWER);
 		udelay(gc_psx_delay);
 	}
@@ -300,7 +300,7 @@
 	gc_psx_command(gc, 0, data2);							/* Dump status */
 
 	for (i =0; i < 5; i++)								/* Find the longest pad */
-		if((gc_status_bit[i] & gc->pads[GC_PSX]) && (GC_PSX_LEN(id[i]) > max_len))
+		if((gc_status_bit[i] & (gc->pads[GC_PSX] | gc->pads[GC_DDR])) && (GC_PSX_LEN(id[i]) > max_len))
 			max_len = GC_PSX_LEN(id[i]);
 
 	for (i = 0; i < max_len * 2; i++) {						/* Read in all the data */
diff -Nru a/drivers/input/joystick/iforce/iforce-main.c b/drivers/input/joystick/iforce/iforce-main.c
--- a/drivers/input/joystick/iforce/iforce-main.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/input/joystick/iforce/iforce-main.c	2005-01-10 20:11:18 -08:00
@@ -352,7 +352,21 @@
  * Input device fields.
  */
 
-	iforce->dev.id.bustype = BUS_USB;
+	switch (iforce->bus) {
+#ifdef CONFIG_JOYSTICK_IFORCE_USB
+	case IFORCE_USB:
+		iforce->dev.id.bustype = BUS_USB;
+		iforce->dev.dev = &iforce->usbdev->dev;
+		break;
+#endif
+#ifdef CONFIG_JOYSTICK_IFORCE_232
+	case IFORCE_232:
+		iforce->dev.id.bustype = BUS_RS232;
+		iforce->dev.dev = &iforce->serio->dev;
+		break;
+#endif
+	}
+
 	iforce->dev.private = iforce;
 	iforce->dev.name = "Unknown I-Force device";
 	iforce->dev.open = iforce_open;
diff -Nru a/drivers/input/joystick/magellan.c b/drivers/input/joystick/magellan.c
--- a/drivers/input/joystick/magellan.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/input/joystick/magellan.c	2005-01-10 20:11:15 -08:00
@@ -183,6 +183,7 @@
 	magellan->dev.id.vendor = SERIO_MAGELLAN;
 	magellan->dev.id.product = 0x0001;
 	magellan->dev.id.version = 0x0100;
+	magellan->dev.dev = &serio->dev;
 
 	serio->private = magellan;
 
diff -Nru a/drivers/input/joystick/spaceball.c b/drivers/input/joystick/spaceball.c
--- a/drivers/input/joystick/spaceball.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/input/joystick/spaceball.c	2005-01-10 20:11:16 -08:00
@@ -253,6 +253,7 @@
 	spaceball->dev.id.vendor = SERIO_SPACEBALL;
 	spaceball->dev.id.product = id;
 	spaceball->dev.id.version = 0x0100;
+	spaceball->dev.dev = &serio->dev;
 
 	serio->private = spaceball;
 
diff -Nru a/drivers/input/joystick/spaceorb.c b/drivers/input/joystick/spaceorb.c
--- a/drivers/input/joystick/spaceorb.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/input/joystick/spaceorb.c	2005-01-10 20:11:18 -08:00
@@ -200,6 +200,7 @@
 	spaceorb->dev.id.vendor = SERIO_SPACEORB;
 	spaceorb->dev.id.product = 0x0001;
 	spaceorb->dev.id.version = 0x0100;
+	spaceorb->dev.dev = &serio->dev;
 
 	serio->private = spaceorb;
 
diff -Nru a/drivers/input/joystick/stinger.c b/drivers/input/joystick/stinger.c
--- a/drivers/input/joystick/stinger.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/input/joystick/stinger.c	2005-01-10 20:11:15 -08:00
@@ -164,6 +164,7 @@
 	stinger->dev.id.vendor = SERIO_STINGER;
 	stinger->dev.id.product = 0x0001;
 	stinger->dev.id.version = 0x0100;
+	stinger->dev.dev = &serio->dev;
 
 	for (i = 0; i < 2; i++) {
 		stinger->dev.absmax[ABS_X+i] =  64;
diff -Nru a/drivers/input/joystick/twidjoy.c b/drivers/input/joystick/twidjoy.c
--- a/drivers/input/joystick/twidjoy.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/input/joystick/twidjoy.c	2005-01-10 20:11:16 -08:00
@@ -210,6 +210,7 @@
 	twidjoy->dev.id.vendor = SERIO_TWIDJOY;
 	twidjoy->dev.id.product = 0x0001;
 	twidjoy->dev.id.version = 0x0100;
+	twidjoy->dev.dev = &serio->dev;
 
 	twidjoy->dev.evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);
 
diff -Nru a/drivers/input/joystick/warrior.c b/drivers/input/joystick/warrior.c
--- a/drivers/input/joystick/warrior.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/input/joystick/warrior.c	2005-01-10 20:11:20 -08:00
@@ -168,6 +168,7 @@
 	warrior->dev.id.vendor = SERIO_WARRIOR;
 	warrior->dev.id.product = 0x0001;
 	warrior->dev.id.version = 0x0100;
+	warrior->dev.dev = &serio->dev;
 
 	for (i = 0; i < 2; i++) {
 		warrior->dev.absmax[ABS_X+i] = -64;
diff -Nru a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig
--- a/drivers/input/keyboard/Kconfig	2005-01-10 20:11:22 -08:00
+++ b/drivers/input/keyboard/Kconfig	2005-01-10 20:11:22 -08:00
@@ -16,6 +16,7 @@
 	default y
 	depends on INPUT && INPUT_KEYBOARD
 	select SERIO
+	select SERIO_LIBPS2
 	select SERIO_I8042 if PC
 	select SERIO_GSCPS2 if GSC
 	help
diff -Nru a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c
--- a/drivers/input/keyboard/atkbd.c	2005-01-10 20:11:24 -08:00
+++ b/drivers/input/keyboard/atkbd.c	2005-01-10 20:11:24 -08:00
@@ -26,6 +26,7 @@
 #include <linux/input.h>
 #include <linux/serio.h>
 #include <linux/workqueue.h>
+#include <linux/libps2.h>
 
 #define DRIVER_DESC	"AT and PS/2 keyboard driver"
 
@@ -170,36 +171,29 @@
 	{ ATKBD_SCR_CLICK, 0x60 },
 };
 
-#define ATKBD_FLAG_ACK		0	/* Waiting for ACK/NAK */
-#define ATKBD_FLAG_CMD		1	/* Waiting for command to finish */
-#define ATKBD_FLAG_CMD1		2	/* First byte of command response */
-#define ATKBD_FLAG_ENABLED	3	/* Waining for init to finish */
-
 /*
  * The atkbd control structure
  */
 
 struct atkbd {
 
+	struct ps2dev	ps2dev;
+
 	/* Written only during init */
 	char name[64];
 	char phys[32];
-	struct serio *serio;
 	struct input_dev dev;
 
-	unsigned char set;
 	unsigned short id;
 	unsigned char keycode[512];
+	unsigned char set;
 	unsigned char translated;
 	unsigned char extra;
 	unsigned char write;
-
-	/* Protected by FLAG_ACK */
-	unsigned char nak;
-
-	/* Protected by FLAG_CMD */
-	unsigned char cmdbuf[4];
-	unsigned char cmdcnt;
+	unsigned char softrepeat;
+	unsigned char softraw;
+	unsigned char scroll;
+	unsigned char enabled;
 
 	/* Accessed only from interrupt */
 	unsigned char emul;
@@ -208,24 +202,31 @@
 	unsigned char bat_xl;
 	unsigned int last;
 	unsigned long time;
-
-	/* Ensures that only one command is executing at a time */
-	struct semaphore cmd_sem;
-
-	/* Used to signal completion from interrupt handler */
-	wait_queue_head_t wait;
-
-	/* Flags */
-	unsigned long flags;
 };
 
-/* Work structure to schedule execution of a command */
-struct atkbd_work {
-	struct work_struct work;
-	struct atkbd *atkbd;
-	int command;
-	unsigned char param[0];
-};
+static ssize_t atkbd_attr_show_helper(struct device *dev, char *buf,
+				ssize_t (*handler)(struct atkbd *, char *));
+static ssize_t atkbd_attr_set_helper(struct device *dev, const char *buf, size_t count,
+				ssize_t (*handler)(struct atkbd *, const char *, size_t));
+#define ATKBD_DEFINE_ATTR(_name)						\
+static ssize_t atkbd_show_##_name(struct atkbd *, char *);			\
+static ssize_t atkbd_set_##_name(struct atkbd *, const char *, size_t);		\
+static ssize_t atkbd_do_show_##_name(struct device *d, char *b)			\
+{										\
+	return atkbd_attr_show_helper(d, b, atkbd_show_##_name);		\
+}										\
+static ssize_t atkbd_do_set_##_name(struct device *d, const char *b, size_t s)	\
+{										\
+	return atkbd_attr_set_helper(d, b, s, atkbd_set_##_name);		\
+}										\
+static struct device_attribute atkbd_attr_##_name = 				\
+	__ATTR(_name, S_IWUSR | S_IRUGO, atkbd_do_show_##_name, atkbd_do_set_##_name);
+
+ATKBD_DEFINE_ATTR(extra);
+ATKBD_DEFINE_ATTR(scroll);
+ATKBD_DEFINE_ATTR(set);
+ATKBD_DEFINE_ATTR(softrepeat);
+ATKBD_DEFINE_ATTR(softraw);
 
 
 static void atkbd_report_key(struct input_dev *dev, struct pt_regs *regs, int code, int value)
@@ -268,42 +269,15 @@
 		atkbd->resend = 0;
 #endif
 
-	if (test_bit(ATKBD_FLAG_ACK, &atkbd->flags)) {
-		switch (code) {
-			case ATKBD_RET_ACK:
-				atkbd->nak = 0;
-				if (atkbd->cmdcnt) {
-					set_bit(ATKBD_FLAG_CMD, &atkbd->flags);
-					set_bit(ATKBD_FLAG_CMD1, &atkbd->flags);
-				}
-				clear_bit(ATKBD_FLAG_ACK, &atkbd->flags);
-				wake_up_interruptible(&atkbd->wait);
-				break;
-			case ATKBD_RET_NAK:
-				atkbd->nak = 1;
-				clear_bit(ATKBD_FLAG_ACK, &atkbd->flags);
-				wake_up_interruptible(&atkbd->wait);
-				break;
-		}
-		goto out;
-	}
-
-	if (test_bit(ATKBD_FLAG_CMD, &atkbd->flags)) {
-
-		if (atkbd->cmdcnt)
-			atkbd->cmdbuf[--atkbd->cmdcnt] = code;
-
-		if (test_and_clear_bit(ATKBD_FLAG_CMD1, &atkbd->flags) && atkbd->cmdcnt)
-			wake_up_interruptible(&atkbd->wait);
+	if (unlikely(atkbd->ps2dev.flags & PS2_FLAG_ACK))
+		if  (ps2_handle_ack(&atkbd->ps2dev, data))
+			goto out;
 
-		if (!atkbd->cmdcnt) {
-			clear_bit(ATKBD_FLAG_CMD, &atkbd->flags);
-			wake_up_interruptible(&atkbd->wait);
-		}
-		goto out;
-	}
+	if (unlikely(atkbd->ps2dev.flags & PS2_FLAG_CMD))
+		if  (ps2_handle_response(&atkbd->ps2dev, data))
+			goto out;
 
-	if (!test_bit(ATKBD_FLAG_ENABLED, &atkbd->flags))
+	if (!atkbd->enabled)
 		goto out;
 
 	input_event(&atkbd->dev, EV_MSC, MSC_RAW, code);
@@ -326,8 +300,8 @@
 
 	switch (code) {
 		case ATKBD_RET_BAT:
-			clear_bit(ATKBD_FLAG_ENABLED, &atkbd->flags);
-			serio_rescan(atkbd->serio);
+			atkbd->enabled = 0;
+			serio_rescan(atkbd->ps2dev.serio);
 			goto out;
 		case ATKBD_RET_EMUL0:
 			atkbd->emul = 1;
@@ -396,7 +370,7 @@
 			break;
 		default:
 			value = atkbd->release ? 0 :
-				(1 + (!atkbd_softrepeat && test_bit(atkbd->keycode[code], atkbd->dev.key)));
+				(1 + (!atkbd->softrepeat && test_bit(atkbd->keycode[code], atkbd->dev.key)));
 
 			switch (value) { 	/* Workaround Toshiba laptop multiple keypress */
 				case 0:
@@ -427,151 +401,6 @@
 	return IRQ_HANDLED;
 }
 
-/*
- * atkbd_sendbyte() sends a byte to the keyboard, and waits for
- * acknowledge. It doesn't handle resends according to the keyboard
- * protocol specs, because if these are needed, the keyboard needs
- * replacement anyway, and they only make a mess in the protocol.
- *
- * atkbd_sendbyte() can only be called from a process context
- */
-
-static int atkbd_sendbyte(struct atkbd *atkbd, unsigned char byte)
-{
-#ifdef ATKBD_DEBUG
-	printk(KERN_DEBUG "atkbd.c: Sent: %02x\n", byte);
-#endif
-	atkbd->nak = 1;
-	set_bit(ATKBD_FLAG_ACK, &atkbd->flags);
-
-	if (serio_write(atkbd->serio, byte) == 0)
-		wait_event_interruptible_timeout(atkbd->wait,
-				!test_bit(ATKBD_FLAG_ACK, &atkbd->flags),
-				msecs_to_jiffies(200));
-
-	clear_bit(ATKBD_FLAG_ACK, &atkbd->flags);
-	return -atkbd->nak;
-}
-
-/*
- * atkbd_command() sends a command, and its parameters to the keyboard,
- * then waits for the response and puts it in the param array.
- *
- * atkbd_command() can only be called from a process context
- */
-
-static int atkbd_command(struct atkbd *atkbd, unsigned char *param, int command)
-{
-	int timeout;
-	int send = (command >> 12) & 0xf;
-	int receive = (command >> 8) & 0xf;
-	int rc = -1;
-	int i;
-
-	timeout = msecs_to_jiffies(command == ATKBD_CMD_RESET_BAT ? 4000 : 500);
-
-	down(&atkbd->cmd_sem);
-	clear_bit(ATKBD_FLAG_CMD, &atkbd->flags);
-
-	if (receive && param)
-		for (i = 0; i < receive; i++)
-			atkbd->cmdbuf[(receive - 1) - i] = param[i];
-
-	atkbd->cmdcnt = receive;
-
-	if (command & 0xff)
-		if (atkbd_sendbyte(atkbd, command & 0xff))
-			goto out;
-
-	for (i = 0; i < send; i++)
-		if (atkbd_sendbyte(atkbd, param[i]))
-			goto out;
-
-	timeout = wait_event_interruptible_timeout(atkbd->wait,
-				!test_bit(ATKBD_FLAG_CMD1, &atkbd->flags), timeout);
-
-	if (atkbd->cmdcnt && timeout > 0) {
-		if (command == ATKBD_CMD_RESET_BAT && jiffies_to_msecs(timeout) > 100)
-			timeout = msecs_to_jiffies(100);
-
-		if (command == ATKBD_CMD_GETID &&
-		    atkbd->cmdbuf[receive - 1] != 0xab && atkbd->cmdbuf[receive - 1] != 0xac) {
-			/*
-			 * Device behind the port is not a keyboard
-			 * so we don't need to wait for the 2nd byte
-			 * of ID response.
-			 */
-			clear_bit(ATKBD_FLAG_CMD, &atkbd->flags);
-			atkbd->cmdcnt = 0;
-		}
-
-		wait_event_interruptible_timeout(atkbd->wait,
-				!test_bit(ATKBD_FLAG_CMD, &atkbd->flags), timeout);
-	}
-
-	if (param)
-		for (i = 0; i < receive; i++)
-			param[i] = atkbd->cmdbuf[(receive - 1) - i];
-
-	if (atkbd->cmdcnt && (command != ATKBD_CMD_RESET_BAT || atkbd->cmdcnt != 1))
-		goto out;
-
-	rc = 0;
-
-out:
-	clear_bit(ATKBD_FLAG_CMD, &atkbd->flags);
-	clear_bit(ATKBD_FLAG_CMD1, &atkbd->flags);
-	up(&atkbd->cmd_sem);
-
-	return rc;
-}
-
-/*
- * atkbd_execute_scheduled_command() sends a command, previously scheduled by
- * atkbd_schedule_command(), to the keyboard.
- */
-
-static void atkbd_execute_scheduled_command(void *data)
-{
-	struct atkbd_work *atkbd_work = data;
-
-	atkbd_command(atkbd_work->atkbd, atkbd_work->param, atkbd_work->command);
-
-	kfree(atkbd_work);
-}
-
-/*
- * atkbd_schedule_command() allows to schedule delayed execution of a keyboard
- * command and can be used to issue a command from an interrupt or softirq
- * context.
- */
-
-static int atkbd_schedule_command(struct atkbd *atkbd, unsigned char *param, int command)
-{
-	struct atkbd_work *atkbd_work;
-	int send = (command >> 12) & 0xf;
-	int receive = (command >> 8) & 0xf;
-
-	if (!test_bit(ATKBD_FLAG_ENABLED, &atkbd->flags))
-		return -1;
-
-	if (!(atkbd_work = kmalloc(sizeof(struct atkbd_work) + max(send, receive), GFP_ATOMIC)))
-		return -1;
-
-	memset(atkbd_work, 0, sizeof(struct atkbd_work));
-	atkbd_work->atkbd = atkbd;
-	atkbd_work->command = command;
-	memcpy(atkbd_work->param, param, send);
-	INIT_WORK(&atkbd_work->work, atkbd_execute_scheduled_command, atkbd_work);
-
-	if (!schedule_work(&atkbd_work->work)) {
-		kfree(atkbd_work);
-		return -1;
-	}
-
-	return 0;
-}
-
 
 /*
  * Event callback from the input module. Events that change the state of
@@ -599,7 +428,7 @@
 			param[0] = (test_bit(LED_SCROLLL, dev->led) ? 1 : 0)
 			         | (test_bit(LED_NUML,    dev->led) ? 2 : 0)
 			         | (test_bit(LED_CAPSL,   dev->led) ? 4 : 0);
-		        atkbd_schedule_command(atkbd, param, ATKBD_CMD_SETLEDS);
+		        ps2_schedule_command(&atkbd->ps2dev, param, ATKBD_CMD_SETLEDS);
 
 			if (atkbd->extra) {
 				param[0] = 0;
@@ -608,7 +437,7 @@
 					 | (test_bit(LED_SUSPEND, dev->led) ? 0x04 : 0)
 				         | (test_bit(LED_MISC,    dev->led) ? 0x10 : 0)
 				         | (test_bit(LED_MUTE,    dev->led) ? 0x20 : 0);
-				atkbd_schedule_command(atkbd, param, ATKBD_CMD_EX_SETLEDS);
+				ps2_schedule_command(&atkbd->ps2dev, param, ATKBD_CMD_EX_SETLEDS);
 			}
 
 			return 0;
@@ -616,7 +445,7 @@
 
 		case EV_REP:
 
-			if (atkbd_softrepeat) return 0;
+			if (atkbd->softrepeat) return 0;
 
 			i = j = 0;
 			while (i < 32 && period[i] < dev->rep[REP_PERIOD]) i++;
@@ -624,7 +453,7 @@
 			dev->rep[REP_PERIOD] = period[i];
 			dev->rep[REP_DELAY] = delay[j];
 			param[0] = i | (j << 5);
-			atkbd_schedule_command(atkbd, param, ATKBD_CMD_SETREP);
+			ps2_schedule_command(&atkbd->ps2dev, param, ATKBD_CMD_SETREP);
 
 			return 0;
 	}
@@ -633,11 +462,36 @@
 }
 
 /*
+ * atkbd_enable() signals that interrupt handler is allowed to
+ * generate input events.
+ */
+
+static inline void atkbd_enable(struct atkbd *atkbd)
+{
+	serio_pause_rx(atkbd->ps2dev.serio);
+	atkbd->enabled = 1;
+	serio_continue_rx(atkbd->ps2dev.serio);
+}
+
+/*
+ * atkbd_disable() tells input handler that all incoming data except
+ * for ACKs and command response should be dropped.
+ */
+
+static inline void atkbd_disable(struct atkbd *atkbd)
+{
+	serio_pause_rx(atkbd->ps2dev.serio);
+	atkbd->enabled = 0;
+	serio_continue_rx(atkbd->ps2dev.serio);
+}
+
+/*
  * atkbd_probe() probes for an AT keyboard on a serio port.
  */
 
 static int atkbd_probe(struct atkbd *atkbd)
 {
+	struct ps2dev *ps2dev = &atkbd->ps2dev;
 	unsigned char param[2];
 
 /*
@@ -647,8 +501,8 @@
  */
 
 	if (atkbd_reset)
-		if (atkbd_command(atkbd, NULL, ATKBD_CMD_RESET_BAT))
-			printk(KERN_WARNING "atkbd.c: keyboard reset failed on %s\n", atkbd->serio->phys);
+		if (ps2_command(ps2dev, NULL, ATKBD_CMD_RESET_BAT))
+			printk(KERN_WARNING "atkbd.c: keyboard reset failed on %s\n", ps2dev->serio->phys);
 
 /*
  * Then we check the keyboard ID. We should get 0xab83 under normal conditions.
@@ -658,7 +512,7 @@
  */
 
 	param[0] = param[1] = 0xa5;	/* initialize with invalid values */
-	if (atkbd_command(atkbd, param, ATKBD_CMD_GETID)) {
+	if (ps2_command(ps2dev, param, ATKBD_CMD_GETID)) {
 
 /*
  * If the get ID command failed, we check if we can at least set the LEDs on
@@ -666,14 +520,17 @@
  * the LEDs off, which we want anyway.
  */
 		param[0] = 0;
-		if (atkbd_command(atkbd, param, ATKBD_CMD_SETLEDS))
+		if (ps2_command(ps2dev, param, ATKBD_CMD_SETLEDS))
 			return -1;
 		atkbd->id = 0xabba;
 		return 0;
 	}
 
-	if (param[0] != 0xab && param[0] != 0xac)
+	if (param[0] != 0xab && param[0] != 0xac &&	/* Regular and NCD Sun keyboards */
+	    param[0] != 0x2b && param[0] != 0x5d &&	/* Trust keyboard, raw and translated */
+	    param[0] != 0x60 && param[0] != 0x47)	/* NMB SGI keyboard, raw and translated */
 		return -1;
+
 	atkbd->id = (param[0] << 8) | param[1];
 
 	if (atkbd->id == 0xaca1 && atkbd->translated) {
@@ -686,15 +543,17 @@
 }
 
 /*
- * atkbd_set_3 checks if a keyboard has a working Set 3 support, and
+ * atkbd_select_set checks if a keyboard has a working Set 3 support, and
  * sets it into that. Unfortunately there are keyboards that can be switched
  * to Set 3, but don't work well in that (BTC Multimedia ...)
  */
 
-static int atkbd_set_3(struct atkbd *atkbd)
+static int atkbd_select_set(struct atkbd *atkbd, int target_set, int allow_extra)
 {
+	struct ps2dev *ps2dev = &atkbd->ps2dev;
 	unsigned char param[2];
 
+	atkbd->extra = 0;
 /*
  * For known special keyboards we can go ahead and set the correct set.
  * We check for NCD PS/2 Sun, NorthGate OmniKey 101 and
@@ -706,47 +565,48 @@
 
 	if (atkbd->id == 0xaca1) {
 		param[0] = 3;
-		atkbd_command(atkbd, param, ATKBD_CMD_SSCANSET);
+		ps2_command(ps2dev, param, ATKBD_CMD_SSCANSET);
 		return 3;
 	}
 
-	if (atkbd_extra) {
+	if (allow_extra) {
 		param[0] = 0x71;
-		if (!atkbd_command(atkbd, param, ATKBD_CMD_EX_ENABLE)) {
+		if (!ps2_command(ps2dev, param, ATKBD_CMD_EX_ENABLE)) {
 			atkbd->extra = 1;
 			return 2;
 		}
 	}
 
-	if (atkbd_set != 3)
+	if (target_set != 3)
 		return 2;
 
-	if (!atkbd_command(atkbd, param, ATKBD_CMD_OK_GETID)) {
+	if (!ps2_command(ps2dev, param, ATKBD_CMD_OK_GETID)) {
 		atkbd->id = param[0] << 8 | param[1];
 		return 2;
 	}
 
 	param[0] = 3;
-	if (atkbd_command(atkbd, param, ATKBD_CMD_SSCANSET))
+	if (ps2_command(ps2dev, param, ATKBD_CMD_SSCANSET))
 		return 2;
 
 	param[0] = 0;
-	if (atkbd_command(atkbd, param, ATKBD_CMD_GSCANSET))
+	if (ps2_command(ps2dev, param, ATKBD_CMD_GSCANSET))
 		return 2;
 
 	if (param[0] != 3) {
 		param[0] = 2;
-		if (atkbd_command(atkbd, param, ATKBD_CMD_SSCANSET))
+		if (ps2_command(ps2dev, param, ATKBD_CMD_SSCANSET))
 		return 2;
 	}
 
-	atkbd_command(atkbd, param, ATKBD_CMD_SETALL_MBR);
+	ps2_command(ps2dev, param, ATKBD_CMD_SETALL_MBR);
 
 	return 3;
 }
 
-static int atkbd_enable(struct atkbd *atkbd)
+static int atkbd_activate(struct atkbd *atkbd)
 {
+	struct ps2dev *ps2dev = &atkbd->ps2dev;
 	unsigned char param[1];
 
 /*
@@ -754,7 +614,7 @@
  */
 
 	param[0] = 0;
-	if (atkbd_command(atkbd, param, ATKBD_CMD_SETLEDS))
+	if (ps2_command(ps2dev, param, ATKBD_CMD_SETLEDS))
 		return -1;
 
 /*
@@ -762,16 +622,16 @@
  */
 
 	param[0] = 0;
-	if (atkbd_command(atkbd, param, ATKBD_CMD_SETREP))
+	if (ps2_command(ps2dev, param, ATKBD_CMD_SETREP))
 		return -1;
 
 /*
  * Enable the keyboard to receive keystrokes.
  */
 
-	if (atkbd_command(atkbd, NULL, ATKBD_CMD_ENABLE)) {
+	if (ps2_command(ps2dev, NULL, ATKBD_CMD_ENABLE)) {
 		printk(KERN_ERR "atkbd.c: Failed to enable keyboard on %s\n",
-			atkbd->serio->phys);
+			ps2dev->serio->phys);
 		return -1;
 	}
 
@@ -786,9 +646,10 @@
 static void atkbd_cleanup(struct serio *serio)
 {
 	struct atkbd *atkbd = serio->private;
-	atkbd_command(atkbd, NULL, ATKBD_CMD_RESET_BAT);
+	ps2_command(&atkbd->ps2dev, NULL, ATKBD_CMD_RESET_BAT);
 }
 
+
 /*
  * atkbd_disconnect() closes and frees.
  */
@@ -797,15 +658,109 @@
 {
 	struct atkbd *atkbd = serio->private;
 
-	clear_bit(ATKBD_FLAG_ENABLED, &atkbd->flags);
+	atkbd_disable(atkbd);
+
+	/* make sure we don't have a command in flight */
 	synchronize_kernel();
 	flush_scheduled_work();
 
+	device_remove_file(&serio->dev, &atkbd_attr_extra);
+	device_remove_file(&serio->dev, &atkbd_attr_scroll);
+	device_remove_file(&serio->dev, &atkbd_attr_set);
+	device_remove_file(&serio->dev, &atkbd_attr_softrepeat);
+	device_remove_file(&serio->dev, &atkbd_attr_softraw);
+
 	input_unregister_device(&atkbd->dev);
 	serio_close(serio);
 	kfree(atkbd);
 }
 
+
+/*
+ * atkbd_set_device_attrs() initializes keyboard's keycode table
+ * according to the selected scancode set
+ */
+
+static void atkbd_set_keycode_table(struct atkbd *atkbd)
+{
+	int i, j;
+
+	memset(atkbd->keycode, 0, sizeof(atkbd->keycode));
+
+	if (atkbd->translated) {
+		for (i = 0; i < 128; i++) {
+			atkbd->keycode[i] = atkbd_set2_keycode[atkbd_unxlate_table[i]];
+			atkbd->keycode[i | 0x80] = atkbd_set2_keycode[atkbd_unxlate_table[i] | 0x80];
+			if (atkbd->scroll)
+				for (j = 0; i < 5; i++) {
+					if (atkbd_unxlate_table[i] == atkbd_scroll_keys[j][1])
+						atkbd->keycode[i] = atkbd_scroll_keys[j][0];
+					if ((atkbd_unxlate_table[i] | 0x80) == atkbd_scroll_keys[j][1])
+						atkbd->keycode[i | 0x80] = atkbd_scroll_keys[j][0];
+				}
+		}
+	} else if (atkbd->set == 3) {
+		memcpy(atkbd->keycode, atkbd_set3_keycode, sizeof(atkbd->keycode));
+	} else {
+		memcpy(atkbd->keycode, atkbd_set2_keycode, sizeof(atkbd->keycode));
+
+		if (atkbd->scroll)
+			for (i = 0; i < 5; i++)
+				atkbd->keycode[atkbd_scroll_keys[i][1]] = atkbd_scroll_keys[i][0];
+	}
+}
+
+/*
+ * atkbd_set_device_attrs() sets up keyboard's input device structure
+ */
+
+static void atkbd_set_device_attrs(struct atkbd *atkbd)
+{
+	int i;
+
+	memset(&atkbd->dev, 0, sizeof(struct input_dev));
+
+	init_input_dev(&atkbd->dev);
+
+	atkbd->dev.name = atkbd->name;
+	atkbd->dev.phys = atkbd->phys;
+	atkbd->dev.id.bustype = BUS_I8042;
+	atkbd->dev.id.vendor = 0x0001;
+	atkbd->dev.id.product = atkbd->translated ? 1 : atkbd->set;
+	atkbd->dev.id.version = atkbd->id;
+	atkbd->dev.event = atkbd_event;
+	atkbd->dev.private = atkbd;
+	atkbd->dev.dev = &atkbd->ps2dev.serio->dev;
+
+	atkbd->dev.evbit[0] = BIT(EV_KEY) | BIT(EV_REP) | BIT(EV_MSC);
+
+	if (atkbd->write) {
+		atkbd->dev.evbit[0] |= BIT(EV_LED);
+		atkbd->dev.ledbit[0] = BIT(LED_NUML) | BIT(LED_CAPSL) | BIT(LED_SCROLLL);
+	}
+
+	if (atkbd->extra)
+		atkbd->dev.ledbit[0] |= BIT(LED_COMPOSE) | BIT(LED_SUSPEND) |
+					BIT(LED_SLEEP) | BIT(LED_MUTE) | BIT(LED_MISC);
+
+	if (!atkbd->softrepeat) {
+		atkbd->dev.rep[REP_DELAY] = 250;
+		atkbd->dev.rep[REP_PERIOD] = 33;
+	}
+
+	atkbd->dev.mscbit[0] = atkbd->softraw ? BIT(MSC_SCAN) : BIT(MSC_RAW) | BIT(MSC_SCAN);
+
+	if (atkbd->scroll) {
+		atkbd->dev.evbit[0] |= BIT(EV_REL);
+		atkbd->dev.relbit[0] = BIT(REL_WHEEL);
+		set_bit(BTN_MIDDLE, atkbd->dev.keybit);
+	}
+
+	for (i = 0; i < 512; i++)
+		if (atkbd->keycode[i] && atkbd->keycode[i] < ATKBD_SPECIAL)
+			set_bit(atkbd->keycode[i], atkbd->dev.keybit);
+}
+
 /*
  * atkbd_connect() is called when the serio module finds and interface
  * that isn't handled yet by an appropriate device driver. We check if
@@ -816,14 +771,12 @@
 static void atkbd_connect(struct serio *serio, struct serio_driver *drv)
 {
 	struct atkbd *atkbd;
-	int i;
 
 	if (!(atkbd = kmalloc(sizeof(struct atkbd), GFP_KERNEL)))
 		return;
 	memset(atkbd, 0, sizeof(struct atkbd));
 
-	init_MUTEX(&atkbd->cmd_sem);
-	init_waitqueue_head(&atkbd->wait);
+	ps2_init(&atkbd->ps2dev, serio);
 
 	switch (serio->type & SERIO_TYPE) {
 
@@ -841,31 +794,19 @@
 			return;
 	}
 
-	if (!atkbd->write)
-		atkbd_softrepeat = 1;
-	if (atkbd_softrepeat)
-		atkbd_softraw = 1;
-
-	if (atkbd->write) {
-		atkbd->dev.evbit[0] = BIT(EV_KEY) | BIT(EV_LED) | BIT(EV_REP) | BIT(EV_MSC);
-		atkbd->dev.ledbit[0] = BIT(LED_NUML) | BIT(LED_CAPSL) | BIT(LED_SCROLLL);
-	} else  atkbd->dev.evbit[0] = BIT(EV_KEY) | BIT(EV_REP) | BIT(EV_MSC);
-	atkbd->dev.mscbit[0] = atkbd_softraw ? BIT(MSC_SCAN) : BIT(MSC_RAW) | BIT(MSC_SCAN);
+	atkbd->softraw = atkbd_softraw;
+	atkbd->softrepeat = atkbd_softrepeat;
+	atkbd->scroll = atkbd_scroll;
 
-	if (!atkbd_softrepeat) {
-		atkbd->dev.rep[REP_DELAY] = 250;
-		atkbd->dev.rep[REP_PERIOD] = 33;
-	} else atkbd_softraw = 1;
+	if (!atkbd->write)
+		atkbd->softrepeat = 1;
 
-	atkbd->serio = serio;
-
-	init_input_dev(&atkbd->dev);
+	if (atkbd->softrepeat)
+		atkbd->softraw = 1;
 
 	atkbd->dev.keycode = atkbd->keycode;
 	atkbd->dev.keycodesize = sizeof(unsigned char);
 	atkbd->dev.keycodemax = ARRAY_SIZE(atkbd_set2_keycode);
-	atkbd->dev.event = atkbd_event;
-	atkbd->dev.private = atkbd;
 
 	serio->private = atkbd;
 
@@ -883,56 +824,34 @@
 			return;
 		}
 
-		atkbd->set = atkbd_set_3(atkbd);
-		atkbd_enable(atkbd);
+		atkbd->set = atkbd_select_set(atkbd, atkbd_set, atkbd_extra);
+		atkbd_activate(atkbd);
 
 	} else {
 		atkbd->set = 2;
 		atkbd->id = 0xab00;
 	}
 
-	if (atkbd->extra) {
-		atkbd->dev.ledbit[0] |= BIT(LED_COMPOSE) | BIT(LED_SUSPEND) | BIT(LED_SLEEP) | BIT(LED_MUTE) | BIT(LED_MISC);
+	if (atkbd->extra)
 		sprintf(atkbd->name, "AT Set 2 Extra keyboard");
-	} else
+	else
 		sprintf(atkbd->name, "AT %s Set %d keyboard",
 			atkbd->translated ? "Translated" : "Raw", atkbd->set);
 
 	sprintf(atkbd->phys, "%s/input0", serio->phys);
 
-	if (atkbd_scroll) {
-		for (i = 0; i < 5; i++)
-			atkbd_set2_keycode[atkbd_scroll_keys[i][1]] = atkbd_scroll_keys[i][0];
-		atkbd->dev.evbit[0] |= BIT(EV_REL);
-		atkbd->dev.relbit[0] = BIT(REL_WHEEL);
-		set_bit(BTN_MIDDLE, atkbd->dev.keybit);
-	}
-
-	if (atkbd->translated) {
-		for (i = 0; i < 128; i++) {
-			atkbd->keycode[i] = atkbd_set2_keycode[atkbd_unxlate_table[i]];
-			atkbd->keycode[i | 0x80] = atkbd_set2_keycode[atkbd_unxlate_table[i] | 0x80];
-		}
-	} else if (atkbd->set == 3) {
-		memcpy(atkbd->keycode, atkbd_set3_keycode, sizeof(atkbd->keycode));
-	} else {
-		memcpy(atkbd->keycode, atkbd_set2_keycode, sizeof(atkbd->keycode));
-	}
-
-	atkbd->dev.name = atkbd->name;
-	atkbd->dev.phys = atkbd->phys;
-	atkbd->dev.id.bustype = BUS_I8042;
-	atkbd->dev.id.vendor = 0x0001;
-	atkbd->dev.id.product = atkbd->translated ? 1 : atkbd->set;
-	atkbd->dev.id.version = atkbd->id;
-
-	for (i = 0; i < 512; i++)
-		if (atkbd->keycode[i] && atkbd->keycode[i] < ATKBD_SPECIAL)
-			set_bit(atkbd->keycode[i], atkbd->dev.keybit);
+	atkbd_set_keycode_table(atkbd);
+	atkbd_set_device_attrs(atkbd);
 
 	input_register_device(&atkbd->dev);
 
-	set_bit(ATKBD_FLAG_ENABLED, &atkbd->flags);
+	device_create_file(&serio->dev, &atkbd_attr_extra);
+	device_create_file(&serio->dev, &atkbd_attr_scroll);
+	device_create_file(&serio->dev, &atkbd_attr_set);
+	device_create_file(&serio->dev, &atkbd_attr_softrepeat);
+	device_create_file(&serio->dev, &atkbd_attr_softraw);
+
+	atkbd_enable(atkbd);
 
 	printk(KERN_INFO "input: %s on %s\n", atkbd->name, serio->phys);
 }
@@ -948,11 +867,13 @@
 	struct serio_driver *drv = serio->drv;
 	unsigned char param[1];
 
-	if (!drv) {
+	if (!atkbd || !drv) {
 		printk(KERN_DEBUG "atkbd: reconnect request, but serio is disconnected, ignoring...\n");
 		return -1;
 	}
 
+	atkbd_disable(atkbd);
+
 	if (atkbd->write) {
 		param[0] = (test_bit(LED_SCROLLL, atkbd->dev.led) ? 1 : 0)
 		         | (test_bit(LED_NUML,    atkbd->dev.led) ? 2 : 0)
@@ -960,16 +881,16 @@
 
 		if (atkbd_probe(atkbd))
 			return -1;
-		if (atkbd->set != atkbd_set_3(atkbd))
+		if (atkbd->set != atkbd_select_set(atkbd, atkbd->set, atkbd->extra))
 			return -1;
 
-		atkbd_enable(atkbd);
+		atkbd_activate(atkbd);
 
-		if (atkbd_command(atkbd, param, ATKBD_CMD_SETLEDS))
+		if (ps2_command(&atkbd->ps2dev, param, ATKBD_CMD_SETLEDS))
 			return -1;
 	}
 
-	set_bit(ATKBD_FLAG_ENABLED, &atkbd->flags);
+	atkbd_enable(atkbd);
 
 	return 0;
 }
@@ -985,6 +906,192 @@
 	.disconnect	= atkbd_disconnect,
 	.cleanup	= atkbd_cleanup,
 };
+
+static ssize_t atkbd_attr_show_helper(struct device *dev, char *buf,
+				ssize_t (*handler)(struct atkbd *, char *))
+{
+	struct serio *serio = to_serio_port(dev);
+	int retval;
+
+	retval = serio_pin_driver(serio);
+	if (retval)
+		return retval;
+
+	if (serio->drv != &atkbd_drv) {
+		retval = -ENODEV;
+		goto out;
+	}
+
+	retval = handler((struct atkbd *)serio->private, buf);
+
+out:
+	serio_unpin_driver(serio);
+	return retval;
+}
+
+static ssize_t atkbd_attr_set_helper(struct device *dev, const char *buf, size_t count,
+				ssize_t (*handler)(struct atkbd *, const char *, size_t))
+{
+	struct serio *serio = to_serio_port(dev);
+	struct atkbd *atkbd;
+	int retval;
+
+	retval = serio_pin_driver(serio);
+	if (retval)
+		return retval;
+
+	if (serio->drv != &atkbd_drv) {
+		retval = -ENODEV;
+		goto out;
+	}
+
+	atkbd = serio->private;
+	atkbd_disable(atkbd);
+	retval = handler(atkbd, buf, count);
+	atkbd_enable(atkbd);
+
+out:
+	serio_unpin_driver(serio);
+	return retval;
+}
+
+static ssize_t atkbd_show_extra(struct atkbd *atkbd, char *buf)
+{
+	return sprintf(buf, "%d\n", atkbd->extra ? 1 : 0);
+}
+
+static ssize_t atkbd_set_extra(struct atkbd *atkbd, const char *buf, size_t count)
+{
+	unsigned long value;
+	char *rest;
+
+	if (!atkbd->write)
+		return -EIO;
+
+	value = simple_strtoul(buf, &rest, 10);
+	if (*rest || value > 1)
+		return -EINVAL;
+
+	if (atkbd->extra != value) {
+		/* unregister device as it's properties will change */
+		input_unregister_device(&atkbd->dev);
+		atkbd->set = atkbd_select_set(atkbd, atkbd->set, value);
+		atkbd_activate(atkbd);
+		atkbd_set_device_attrs(atkbd);
+		input_register_device(&atkbd->dev);
+	}
+	return count;
+}
+
+static ssize_t atkbd_show_scroll(struct atkbd *atkbd, char *buf)
+{
+	return sprintf(buf, "%d\n", atkbd->scroll ? 1 : 0);
+}
+
+static ssize_t atkbd_set_scroll(struct atkbd *atkbd, const char *buf, size_t count)
+{
+	unsigned long value;
+	char *rest;
+
+	value = simple_strtoul(buf, &rest, 10);
+	if (*rest || value > 1)
+		return -EINVAL;
+
+	if (atkbd->scroll != value) {
+		/* unregister device as it's properties will change */
+		input_unregister_device(&atkbd->dev);
+		atkbd->scroll = value;
+		atkbd_set_keycode_table(atkbd);
+		atkbd_set_device_attrs(atkbd);
+		input_register_device(&atkbd->dev);
+	}
+	return count;
+}
+
+static ssize_t atkbd_show_set(struct atkbd *atkbd, char *buf)
+{
+	return sprintf(buf, "%d\n", atkbd->set);
+}
+
+static ssize_t atkbd_set_set(struct atkbd *atkbd, const char *buf, size_t count)
+{
+	unsigned long value;
+	char *rest;
+
+	if (!atkbd->write)
+		return -EIO;
+
+	value = simple_strtoul(buf, &rest, 10);
+	if (*rest || (value != 2 && value != 3))
+		return -EINVAL;
+
+	if (atkbd->set != value) {
+		/* unregister device as it's properties will change */
+		input_unregister_device(&atkbd->dev);
+		atkbd->set = atkbd_select_set(atkbd, value, atkbd->extra);
+		atkbd_activate(atkbd);
+		atkbd_set_keycode_table(atkbd);
+		atkbd_set_device_attrs(atkbd);
+		input_register_device(&atkbd->dev);
+	}
+	return count;
+}
+
+static ssize_t atkbd_show_softrepeat(struct atkbd *atkbd, char *buf)
+{
+	return sprintf(buf, "%d\n", atkbd->softrepeat ? 1 : 0);
+}
+
+static ssize_t atkbd_set_softrepeat(struct atkbd *atkbd, const char *buf, size_t count)
+{
+	unsigned long value;
+	char *rest;
+
+	if (!atkbd->write)
+		return -EIO;
+
+	value = simple_strtoul(buf, &rest, 10);
+	if (*rest || value > 1)
+		return -EINVAL;
+
+	if (atkbd->softrepeat != value) {
+		/* unregister device as it's properties will change */
+		input_unregister_device(&atkbd->dev);
+		atkbd->softrepeat = value;
+		if (atkbd->softrepeat)
+			atkbd->softraw = 1;
+		atkbd_set_device_attrs(atkbd);
+		input_register_device(&atkbd->dev);
+	}
+
+	return count;
+}
+
+
+static ssize_t atkbd_show_softraw(struct atkbd *atkbd, char *buf)
+{
+	return sprintf(buf, "%d\n", atkbd->softraw ? 1 : 0);
+}
+
+static ssize_t atkbd_set_softraw(struct atkbd *atkbd, const char *buf, size_t count)
+{
+	unsigned long value;
+	char *rest;
+
+	value = simple_strtoul(buf, &rest, 10);
+	if (*rest || value > 1)
+		return -EINVAL;
+
+	if (atkbd->softraw != value) {
+		/* unregister device as it's properties will change */
+		input_unregister_device(&atkbd->dev);
+		atkbd->softraw = value;
+		atkbd_set_device_attrs(atkbd);
+		input_register_device(&atkbd->dev);
+	}
+	return count;
+}
+
 
 int __init atkbd_init(void)
 {
diff -Nru a/drivers/input/keyboard/lkkbd.c b/drivers/input/keyboard/lkkbd.c
--- a/drivers/input/keyboard/lkkbd.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/input/keyboard/lkkbd.c	2005-01-10 20:11:16 -08:00
@@ -14,13 +14,13 @@
  * DISCLAIMER: This works for _me_. If you break anything by using the
  * information given below, I will _not_ be liable!
  *
- * RJ11 pinout:		To DB9:		Or DB25:
+ * RJ11 pinout:		To DE9:		Or DB25:
  * 	1 - RxD <---->	Pin 3 (TxD) <->	Pin 2 (TxD)
  * 	2 - GND <---->	Pin 5 (GND) <->	Pin 7 (GND)
  * 	4 - TxD <---->	Pin 2 (RxD) <->	Pin 3 (RxD)
- * 	3 - +12V (from HDD drive connector), DON'T connect to DB9 or DB25!!!
+ * 	3 - +12V (from HDD drive connector), DON'T connect to DE9 or DB25!!!
  *
- * Pin numbers for DB9 and DB25 are noted on the plug (quite small:). For
+ * Pin numbers for DE9 and DB25 are noted on the plug (quite small:). For
  * RJ11, it's like this:
  *
  *      __=__	Hold the plug in front of you, cable downwards,
@@ -685,6 +685,7 @@
 	lk->dev.id.vendor = SERIO_LKKBD;
 	lk->dev.id.product = 0;
 	lk->dev.id.version = 0x0100;
+	lk->dev.dev = &serio->dev;
 
 	input_register_device (&lk->dev);
 
diff -Nru a/drivers/input/keyboard/newtonkbd.c b/drivers/input/keyboard/newtonkbd.c
--- a/drivers/input/keyboard/newtonkbd.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/input/keyboard/newtonkbd.c	2005-01-10 20:11:23 -08:00
@@ -126,6 +126,7 @@
 	nkbd->dev.id.vendor = SERIO_NEWTON;
 	nkbd->dev.id.product = 0x0001;
 	nkbd->dev.id.version = 0x0100;
+	nkbd->dev.dev = &serio->dev;
 
 	input_register_device(&nkbd->dev);
 
diff -Nru a/drivers/input/keyboard/sunkbd.c b/drivers/input/keyboard/sunkbd.c
--- a/drivers/input/keyboard/sunkbd.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/input/keyboard/sunkbd.c	2005-01-10 20:11:15 -08:00
@@ -285,6 +285,7 @@
 	sunkbd->dev.id.vendor = SERIO_SUNKBD;
 	sunkbd->dev.id.product = sunkbd->type;
 	sunkbd->dev.id.version = 0x0100;
+	sunkbd->dev.dev = &serio->dev;
 
 	input_register_device(&sunkbd->dev);
 
diff -Nru a/drivers/input/keyboard/xtkbd.c b/drivers/input/keyboard/xtkbd.c
--- a/drivers/input/keyboard/xtkbd.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/input/keyboard/xtkbd.c	2005-01-10 20:11:19 -08:00
@@ -131,6 +131,7 @@
 	xtkbd->dev.id.vendor = 0x0001;
 	xtkbd->dev.id.product = 0x0001;
 	xtkbd->dev.id.version = 0x0100;
+	xtkbd->dev.dev = &serio->dev;
 
 	input_register_device(&xtkbd->dev);
 
diff -Nru a/drivers/input/mouse/Kconfig b/drivers/input/mouse/Kconfig
--- a/drivers/input/mouse/Kconfig	2005-01-10 20:11:21 -08:00
+++ b/drivers/input/mouse/Kconfig	2005-01-10 20:11:21 -08:00
@@ -16,6 +16,7 @@
 	default y
 	depends on INPUT && INPUT_MOUSE
 	select SERIO
+	select SERIO_LIBPS2
 	select SERIO_I8042 if PC
 	select SERIO_GSCPS2 if GSC
 	---help---
diff -Nru a/drivers/input/mouse/Makefile b/drivers/input/mouse/Makefile
--- a/drivers/input/mouse/Makefile	2005-01-10 20:11:17 -08:00
+++ b/drivers/input/mouse/Makefile	2005-01-10 20:11:17 -08:00
@@ -14,4 +14,4 @@
 obj-$(CONFIG_MOUSE_SERIAL)	+= sermouse.o
 obj-$(CONFIG_MOUSE_VSXXXAA)	+= vsxxxaa.o
 
-psmouse-objs  := psmouse-base.o logips2pp.o synaptics.o
+psmouse-objs  := psmouse-base.o alps.o logips2pp.o synaptics.o
diff -Nru a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/input/mouse/alps.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,424 @@
+/*
+ * ALPS touchpad PS/2 mouse driver
+ *
+ * Copyright (c) 2003 Neil Brown <neilb@cse.unsw.edu.au>
+ * Copyright (c) 2003 Peter Osterlund <petero2@telia.com>
+ * Copyright (c) 2004 Dmitry Torokhov <dtor@mail.ru>
+ *
+ * ALPS detection, tap switching and status querying info is taken from
+ * tpconfig utility (by C. Scott Ananian and Bruce Kall).
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published by
+ * the Free Software Foundation.
+ */
+
+#include <linux/input.h>
+#include <linux/serio.h>
+#include <linux/libps2.h>
+
+#include "psmouse.h"
+#include "alps.h"
+
+#undef DEBUG
+#ifdef DEBUG
+#define dbg(format, arg...) printk(KERN_INFO "alps.c: " format "\n", ## arg)
+#else
+#define dbg(format, arg...) do {} while (0)
+#endif
+
+#define ALPS_MODEL_GLIDEPOINT	1
+#define ALPS_MODEL_DUALPOINT	2
+
+struct alps_model_info {
+	unsigned char signature[3];
+	unsigned char model;
+} alps_model_data[] = {
+	{ { 0x33, 0x02, 0x0a },	ALPS_MODEL_GLIDEPOINT },
+	{ { 0x53, 0x02, 0x0a },	ALPS_MODEL_GLIDEPOINT },
+	{ { 0x53, 0x02, 0x14 },	ALPS_MODEL_GLIDEPOINT },
+	{ { 0x63, 0x02, 0x0a },	ALPS_MODEL_GLIDEPOINT },
+	{ { 0x63, 0x02, 0x14 },	ALPS_MODEL_GLIDEPOINT },
+	{ { 0x73, 0x02, 0x0a },	ALPS_MODEL_GLIDEPOINT },
+	{ { 0x73, 0x02, 0x14 },	ALPS_MODEL_GLIDEPOINT },
+	{ { 0x63, 0x02, 0x28 },	ALPS_MODEL_GLIDEPOINT },
+	{ { 0x63, 0x02, 0x3c },	ALPS_MODEL_GLIDEPOINT },
+	{ { 0x63, 0x02, 0x50 },	ALPS_MODEL_GLIDEPOINT },
+	{ { 0x63, 0x02, 0x64 },	ALPS_MODEL_GLIDEPOINT },
+	{ { 0x20, 0x02, 0x0e },	ALPS_MODEL_DUALPOINT },
+	{ { 0x22, 0x02, 0x0a },	ALPS_MODEL_DUALPOINT },
+	{ { 0x22, 0x02, 0x14 }, ALPS_MODEL_DUALPOINT },
+	{ { 0x63, 0x03, 0xc8 },	ALPS_MODEL_DUALPOINT },
+};
+
+/*
+ * ALPS abolute Mode
+ * byte 0:  1    1    1    1    1  mid0 rig0 lef0
+ * byte 1:  0   x6   x5   x4   x3   x2   x1   x0
+ * byte 2:  0   x10  x9   x8   x7  up1  fin  ges
+ * byte 3:  0   y9   y8   y7    1  mid1 rig1 lef1
+ * byte 4:  0   y6   y5   y4   y3   y2   y1   y0
+ * byte 5:  0   z6   z5   z4   z3   z2   z1   z0
+ *
+ * On a dualpoint, {mid,rig,lef}0 are the stick, 1 are the pad.
+ * We just 'or' them together for now.
+ *
+ * We used to send 'ges'tures as BTN_TOUCH but this made it impossible
+ * to disable tap events in the synaptics driver since the driver
+ * was unable to distinguish a gesture tap from an actual button click.
+ * A tap gesture now creates an emulated touch that the synaptics
+ * driver can interpret as a tap event, if MaxTapTime=0 and
+ * MaxTapMove=0 then the driver will ignore taps.
+ *
+ * The touchpad on an 'Acer Aspire' has 4 buttons:
+ *   left,right,up,down.
+ * This device always sets {mid,rig,lef}0 to 1 and
+ * reflects left,right,down,up in lef1,rig1,mid1,up1.
+ */
+
+static void alps_process_packet(struct psmouse *psmouse, struct pt_regs *regs)
+{
+	unsigned char *packet = psmouse->packet;
+	struct input_dev *dev = &psmouse->dev;
+	int x, y, z;
+	int left = 0, right = 0, middle = 0;
+
+	input_regs(dev, regs);
+
+	if ((packet[0] & 0xc8) == 0x08) {   /* 3-byte PS/2 packet */
+		x = packet[1];
+		if (packet[0] & 0x10)
+			x = x - 256;
+		y = packet[2];
+		if (packet[0] & 0x20)
+			y = y - 256;
+		left  = (packet[0]     ) & 1;
+		right = (packet[0] >> 1) & 1;
+
+		input_report_rel(dev, REL_X, x);
+		input_report_rel(dev, REL_Y, -y);
+		input_report_key(dev, BTN_A, left);
+		input_report_key(dev, BTN_B, right);
+		input_sync(dev);
+		return;
+	}
+
+	x = (packet[1] & 0x7f) | ((packet[2] & 0x78)<<(7-3));
+	y = (packet[4] & 0x7f) | ((packet[3] & 0x70)<<(7-4));
+	z = packet[5];
+
+	if (z == 127) {	/* DualPoint stick is relative, not absolute */
+		if (x > 383)
+			x = x - 768;
+		if (y > 255)
+			y = y - 512;
+		left  = packet[3] & 1;
+		right = (packet[3] >> 1) & 1;
+
+		input_report_rel(dev, REL_X, x);
+		input_report_rel(dev, REL_Y, -y);
+		input_report_key(dev, BTN_LEFT, left);
+		input_report_key(dev, BTN_RIGHT, right);
+		input_sync(dev);
+		return;
+	}
+
+	if (z > 30) input_report_key(dev, BTN_TOUCH, 1);
+	if (z < 25) input_report_key(dev, BTN_TOUCH, 0);
+
+	if (z > 0) {
+		input_report_abs(dev, ABS_X, x);
+		input_report_abs(dev, ABS_Y, y);
+	}
+	input_report_abs(dev, ABS_PRESSURE, z);
+	input_report_key(dev, BTN_TOOL_FINGER, z > 0);
+
+	left  |= (packet[2]     ) & 1;
+	left  |= (packet[3]     ) & 1;
+	right |= (packet[3] >> 1) & 1;
+	if (packet[0] == 0xff) {
+		int back    = (packet[3] >> 2) & 1;
+		int forward = (packet[2] >> 2) & 1;
+		if (back && forward) {
+			middle = 1;
+			back = 0;
+			forward = 0;
+		}
+		input_report_key(dev, BTN_BACK,    back);
+		input_report_key(dev, BTN_FORWARD, forward);
+	} else {
+		left   |= (packet[0]     ) & 1;
+		right  |= (packet[0] >> 1) & 1;
+		middle |= (packet[0] >> 2) & 1;
+		middle |= (packet[3] >> 2) & 1;
+	}
+
+	input_report_key(dev, BTN_LEFT, left);
+	input_report_key(dev, BTN_RIGHT, right);
+	input_report_key(dev, BTN_MIDDLE, middle);
+
+	input_sync(dev);
+}
+
+static psmouse_ret_t alps_process_byte(struct psmouse *psmouse, struct pt_regs *regs)
+{
+	if ((psmouse->packet[0] & 0xc8) == 0x08) { /* PS/2 packet */
+		if (psmouse->pktcnt == 3) {
+			alps_process_packet(psmouse, regs);
+			return PSMOUSE_FULL_PACKET;
+		}
+		return PSMOUSE_GOOD_DATA;
+	}
+
+	/* ALPS absolute mode packets start with 0b11111mrl */
+	if ((psmouse->packet[0] & 0xf8) != 0xf8)
+		return PSMOUSE_BAD_DATA;
+
+	/* Bytes 2 - 6 should have 0 in the highest bit */
+	if (psmouse->pktcnt > 1 && psmouse->pktcnt <= 6 &&
+	    (psmouse->packet[psmouse->pktcnt] & 0x80))
+		return PSMOUSE_BAD_DATA;
+
+	if (psmouse->pktcnt == 6) {
+		alps_process_packet(psmouse, regs);
+		return PSMOUSE_FULL_PACKET;
+	}
+
+	return PSMOUSE_GOOD_DATA;
+}
+
+int alps_get_model(struct psmouse *psmouse)
+{
+	struct ps2dev *ps2dev = &psmouse->ps2dev;
+	unsigned char param[4];
+	int i;
+
+	/*
+	 * First try "E6 report".
+	 * ALPS should return 0x00,0x00,0x0a or 0x00,0x00,0x64
+	 */
+	param[0] = 0;
+	if (ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES) ||
+	    ps2_command(ps2dev,  NULL, PSMOUSE_CMD_SETSCALE11) ||
+	    ps2_command(ps2dev,  NULL, PSMOUSE_CMD_SETSCALE11) ||
+	    ps2_command(ps2dev,  NULL, PSMOUSE_CMD_SETSCALE11))
+		return -1;
+
+	param[0] = param[1] = param[2] = 0xff;
+	if (ps2_command(ps2dev, param, PSMOUSE_CMD_GETINFO))
+		return -1;
+
+	dbg("E6 report: %2.2x %2.2x %2.2x", param[0], param[1], param[2]);
+
+	if (param[0] != 0x00 || param[1] != 0x00 || (param[2] != 0x0a && param[2] != 0x64))
+		return -1;
+
+	/* Now try "E7 report". ALPS should return 0x33 in byte 1 */
+	param[0] = 0;
+	if (ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES) ||
+	    ps2_command(ps2dev,  NULL, PSMOUSE_CMD_SETSCALE21) ||
+	    ps2_command(ps2dev,  NULL, PSMOUSE_CMD_SETSCALE21) ||
+	    ps2_command(ps2dev,  NULL, PSMOUSE_CMD_SETSCALE21))
+		return -1;
+
+	param[0] = param[1] = param[2] = 0xff;
+	if (ps2_command(ps2dev, param, PSMOUSE_CMD_GETINFO))
+		return -1;
+
+	dbg("E7 report: %2.2x %2.2x %2.2x", param[0], param[1], param[2]);
+
+	for (i = 0; i < ARRAY_SIZE(alps_model_data); i++)
+		if (!memcmp(param, alps_model_data[i].signature, sizeof(alps_model_data[i].signature)))
+			return alps_model_data[i].model;
+
+	return -1;
+}
+
+/*
+ * For DualPoint devices select the device that should respond to
+ * subsequent commands. It looks like glidepad is behind stickpointer,
+ * I'd thought it would be other way around...
+ */
+static int alps_passthrough_mode(struct psmouse *psmouse, int enable)
+{
+	struct ps2dev *ps2dev = &psmouse->ps2dev;
+	unsigned char param[3];
+	int cmd = enable ? PSMOUSE_CMD_SETSCALE21 : PSMOUSE_CMD_SETSCALE11;
+
+	if (ps2_command(ps2dev, NULL, cmd) ||
+	    ps2_command(ps2dev, NULL, cmd) ||
+	    ps2_command(ps2dev, NULL, cmd) ||
+	    ps2_command(ps2dev, NULL, PSMOUSE_CMD_DISABLE))
+		return -1;
+
+	/* we may get 3 more bytes, just ignore them */
+	ps2_command(ps2dev, param, 0x0300);
+
+	return 0;
+}
+
+static int alps_absolute_mode(struct psmouse *psmouse)
+{
+	struct ps2dev *ps2dev = &psmouse->ps2dev;
+
+	/* Try ALPS magic knock - 4 disable before enable */
+	if (ps2_command(ps2dev, NULL, PSMOUSE_CMD_DISABLE) ||
+	    ps2_command(ps2dev, NULL, PSMOUSE_CMD_DISABLE) ||
+	    ps2_command(ps2dev, NULL, PSMOUSE_CMD_DISABLE) ||
+	    ps2_command(ps2dev, NULL, PSMOUSE_CMD_DISABLE) ||
+	    ps2_command(ps2dev, NULL, PSMOUSE_CMD_ENABLE))
+		return -1;
+
+	/*
+	 * Switch mouse to poll (remote) mode so motion data will not
+	 * get in our way
+	 */
+	return ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_SETPOLL);
+}
+
+static int alps_get_status(struct psmouse *psmouse, char *param)
+{
+	struct ps2dev *ps2dev = &psmouse->ps2dev;
+
+	/* Get status: 0xF5 0xF5 0xF5 0xE9 */
+	if (ps2_command(ps2dev, NULL, PSMOUSE_CMD_DISABLE) ||
+	    ps2_command(ps2dev, NULL, PSMOUSE_CMD_DISABLE) ||
+	    ps2_command(ps2dev, NULL, PSMOUSE_CMD_DISABLE) ||
+	    ps2_command(ps2dev, param, PSMOUSE_CMD_GETINFO))
+		return -1;
+
+	dbg("Status: %2.2x %2.2x %2.2x", param[0], param[1], param[2]);
+
+	return 0;
+}
+
+/*
+ * Turn touchpad tapping on or off. The sequences are:
+ * 0xE9 0xF5 0xF5 0xF3 0x0A to enable,
+ * 0xE9 0xF5 0xF5 0xE8 0x00 to disable.
+ * My guess that 0xE9 (GetInfo) is here as a sync point.
+ * For models that also have stickpointer (DualPoints) its tapping
+ * is controlled separately (0xE6 0xE6 0xE6 0xF3 0x14|0x0A) but
+ * we don't fiddle with it.
+ */
+static int alps_tap_mode(struct psmouse *psmouse, int enable)
+{
+	struct ps2dev *ps2dev = &psmouse->ps2dev;
+	int cmd = enable ? PSMOUSE_CMD_SETRATE : PSMOUSE_CMD_SETRES;
+	unsigned char tap_arg = enable ? 0x0A : 0x00;
+	unsigned char param[4];
+
+	if (ps2_command(ps2dev, param, PSMOUSE_CMD_GETINFO) ||
+	    ps2_command(ps2dev, NULL, PSMOUSE_CMD_DISABLE) ||
+	    ps2_command(ps2dev, NULL, PSMOUSE_CMD_DISABLE) ||
+	    ps2_command(ps2dev, &tap_arg, cmd))
+		return -1;
+
+	if (alps_get_status(psmouse, param))
+		return -1;
+
+	return 0;
+}
+
+static int alps_reconnect(struct psmouse *psmouse)
+{
+	int model;
+	unsigned char param[4];
+
+	if ((model = alps_get_model(psmouse)) < 0)
+		return -1;
+
+	if (model == ALPS_MODEL_DUALPOINT && alps_passthrough_mode(psmouse, 1))
+		return -1;
+
+	if (alps_get_status(psmouse, param))
+		return -1;
+
+	if (param[0] & 0x04)
+		alps_tap_mode(psmouse, 0);
+
+	if (alps_absolute_mode(psmouse)) {
+		printk(KERN_ERR "alps.c: Failed to enable absolute mode\n");
+		return -1;
+	}
+
+	if (model == ALPS_MODEL_DUALPOINT && alps_passthrough_mode(psmouse, 0))
+		return -1;
+
+	return 0;
+}
+
+static void alps_disconnect(struct psmouse *psmouse)
+{
+	psmouse_reset(psmouse);
+}
+
+int alps_init(struct psmouse *psmouse)
+{
+	unsigned char param[4];
+	int model;
+
+	if ((model = alps_get_model(psmouse)) < 0)
+		return -1;
+
+	printk(KERN_INFO "ALPS Touchpad (%s) detected\n",
+		model == ALPS_MODEL_GLIDEPOINT ? "Glidepoint" : "Dualpoint");
+
+	if (model == ALPS_MODEL_DUALPOINT && alps_passthrough_mode(psmouse, 1))
+		return -1;
+
+	if (alps_get_status(psmouse, param)) {
+		printk(KERN_ERR "alps.c: touchpad status report request failed\n");
+		return -1;
+	}
+
+	if (param[0] & 0x04) {
+		printk(KERN_INFO "  Disabling hardware tapping\n");
+		if (alps_tap_mode(psmouse, 0))
+			printk(KERN_WARNING "alps.c: Failed to disable hardware tapping\n");
+	}
+
+	if (alps_absolute_mode(psmouse)) {
+		printk(KERN_ERR "alps.c: Failed to enable absolute mode\n");
+		return -1;
+	}
+
+	if (model == ALPS_MODEL_DUALPOINT && alps_passthrough_mode(psmouse, 0))
+		return -1;
+
+	psmouse->dev.evbit[LONG(EV_REL)] |= BIT(EV_REL);
+	psmouse->dev.relbit[LONG(REL_X)] |= BIT(REL_X);
+	psmouse->dev.relbit[LONG(REL_Y)] |= BIT(REL_Y);
+	psmouse->dev.keybit[LONG(BTN_A)] |= BIT(BTN_A);
+	psmouse->dev.keybit[LONG(BTN_B)] |= BIT(BTN_B);
+
+	psmouse->dev.evbit[LONG(EV_ABS)] |= BIT(EV_ABS);
+	input_set_abs_params(&psmouse->dev, ABS_X, 0, 1023, 0, 0);
+	input_set_abs_params(&psmouse->dev, ABS_Y, 0, 1023, 0, 0);
+	input_set_abs_params(&psmouse->dev, ABS_PRESSURE, 0, 127, 0, 0);
+
+	psmouse->dev.keybit[LONG(BTN_TOUCH)] |= BIT(BTN_TOUCH);
+	psmouse->dev.keybit[LONG(BTN_TOOL_FINGER)] |= BIT(BTN_TOOL_FINGER);
+	psmouse->dev.keybit[LONG(BTN_FORWARD)] |= BIT(BTN_FORWARD);
+	psmouse->dev.keybit[LONG(BTN_BACK)] |= BIT(BTN_BACK);
+
+	psmouse->protocol_handler = alps_process_byte;
+	psmouse->disconnect = alps_disconnect;
+	psmouse->reconnect = alps_reconnect;
+	psmouse->pktsize = 6;
+
+	return 0;
+}
+
+int alps_detect(struct psmouse *psmouse, int set_properties)
+{
+	if (alps_get_model(psmouse) < 0)
+		return -1;
+
+	if (set_properties) {
+		psmouse->vendor = "ALPS";
+		psmouse->name = "TouchPad";
+	}
+	return 0;
+}
+
diff -Nru a/drivers/input/mouse/alps.h b/drivers/input/mouse/alps.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/input/mouse/alps.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,17 @@
+/*
+ * ALPS touchpad PS/2 mouse driver
+ *
+ * Copyright (c) 2003 Peter Osterlund <petero2@telia.com>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published by
+ * the Free Software Foundation.
+ */
+
+#ifndef _ALPS_H
+#define _ALPS_H
+
+int alps_detect(struct psmouse *psmouse, int set_properties);
+int alps_init(struct psmouse *psmouse);
+
+#endif
diff -Nru a/drivers/input/mouse/logips2pp.c b/drivers/input/mouse/logips2pp.c
--- a/drivers/input/mouse/logips2pp.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/input/mouse/logips2pp.c	2005-01-10 20:11:20 -08:00
@@ -11,6 +11,7 @@
 
 #include <linux/input.h>
 #include <linux/serio.h>
+#include <linux/libps2.h>
 #include "psmouse.h"
 #include "logips2pp.h"
 
@@ -37,13 +38,23 @@
  * Process a PS2++ or PS2T++ packet.
  */
 
-void ps2pp_process_packet(struct psmouse *psmouse)
+static psmouse_ret_t ps2pp_process_byte(struct psmouse *psmouse, struct pt_regs *regs)
 {
 	struct input_dev *dev = &psmouse->dev;
-        unsigned char *packet = psmouse->packet;
+	unsigned char *packet = psmouse->packet;
+
+	if (psmouse->pktcnt < 3)
+		return PSMOUSE_GOOD_DATA;
+
+/*
+ * Full packet accumulated, process it
+ */
+
+	input_regs(dev, regs);
 
 	if ((packet[0] & 0x48) == 0x48 && (packet[1] & 0x02) == 0x02) {
 
+		/* Logitech extended packet */
 		switch ((packet[1] >> 4) | (packet[0] & 0x30)) {
 
 			case 0x0d: /* Mouse extra info */
@@ -78,11 +89,20 @@
 					(packet[1] >> 4) | (packet[0] & 0x30));
 #endif
 		}
-
-		packet[0] &= 0x0f;
-		packet[1] = 0;
-		packet[2] = 0;
+	} else {
+		/* Standard PS/2 motion data */
+		input_report_rel(dev, REL_X, packet[1] ? (int) packet[1] - (int) ((packet[0] << 4) & 0x100) : 0);
+		input_report_rel(dev, REL_Y, packet[2] ? (int) ((packet[0] << 3) & 0x100) - (int) packet[2] : 0);
 	}
+
+	input_report_key(dev, BTN_LEFT,    packet[0]       & 1);
+	input_report_key(dev, BTN_MIDDLE, (packet[0] >> 2) & 1);
+	input_report_key(dev, BTN_RIGHT,  (packet[0] >> 1) & 1);
+
+	input_sync(dev);
+
+	return PSMOUSE_FULL_PACKET;
+
 }
 
 /*
@@ -97,7 +117,7 @@
 	if (psmouse_sliced_command(psmouse, command))
 		return -1;
 
-	if (psmouse_command(psmouse, param, PSMOUSE_CMD_POLL))
+	if (ps2_command(&psmouse->ps2dev, param, PSMOUSE_CMD_POLL))
 		return -1;
 
 	return 0;
@@ -108,40 +128,73 @@
  * enabled if we do nothing to it. Of course I put this in because I want it
  * disabled :P
  * 1 - enabled (if previously disabled, also default)
- * 0/2 - disabled
+ * 0 - disabled
  */
 
-static void ps2pp_set_smartscroll(struct psmouse *psmouse)
+static void ps2pp_set_smartscroll(struct psmouse *psmouse, unsigned int smartscroll)
 {
+	struct ps2dev *ps2dev = &psmouse->ps2dev;
 	unsigned char param[4];
 
+	if (smartscroll > 1)
+		smartscroll = 1;
+
 	ps2pp_cmd(psmouse, param, 0x32);
 
 	param[0] = 0;
-	psmouse_command(psmouse, param, PSMOUSE_CMD_SETRES);
-	psmouse_command(psmouse, param, PSMOUSE_CMD_SETRES);
-	psmouse_command(psmouse, param, PSMOUSE_CMD_SETRES);
-
-	if (psmouse_smartscroll < 2) {
-		/* 0 - disabled, 1 - enabled */
-		param[0] = psmouse_smartscroll;
-		psmouse_command(psmouse, param, PSMOUSE_CMD_SETRES);
-	}
+	ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES);
+	ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES);
+	ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES);
+
+	param[0] = smartscroll;
+	ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES);
+}
+
+static ssize_t psmouse_attr_show_smartscroll(struct psmouse *psmouse, char *buf)
+{
+	return sprintf(buf, "%d\n", psmouse->smartscroll ? 1 : 0);
 }
 
+static ssize_t psmouse_attr_set_smartscroll(struct psmouse *psmouse, const char *buf, size_t count)
+{
+	unsigned long value;
+	char *rest;
+
+	value = simple_strtoul(buf, &rest, 10);
+	if (*rest || value > 1)
+		return -EINVAL;
+
+	ps2pp_set_smartscroll(psmouse, value);
+	psmouse->smartscroll = value;
+	return count;
+}
+
+PSMOUSE_DEFINE_ATTR(smartscroll);
+
 /*
  * Support 800 dpi resolution _only_ if the user wants it (there are good
  * reasons to not use it even if the mouse supports it, and of course there are
  * also good reasons to use it, let the user decide).
  */
 
-void ps2pp_set_800dpi(struct psmouse *psmouse)
+static void ps2pp_set_resolution(struct psmouse *psmouse, unsigned int resolution)
+{
+	if (resolution > 400) {
+		struct ps2dev *ps2dev = &psmouse->ps2dev;
+		unsigned char param = 3;
+
+		ps2_command(ps2dev, NULL, PSMOUSE_CMD_SETSCALE11);
+		ps2_command(ps2dev, NULL, PSMOUSE_CMD_SETSCALE11);
+		ps2_command(ps2dev, NULL, PSMOUSE_CMD_SETSCALE11);
+		ps2_command(ps2dev, &param, PSMOUSE_CMD_SETRES);
+		psmouse->resolution = 800;
+	} else
+		psmouse_set_resolution(psmouse, resolution);
+}
+
+static void ps2pp_disconnect(struct psmouse *psmouse)
 {
-	unsigned char param = 3;
-	psmouse_command(psmouse, NULL, PSMOUSE_CMD_SETSCALE11);
-	psmouse_command(psmouse, NULL, PSMOUSE_CMD_SETSCALE11);
-	psmouse_command(psmouse, NULL, PSMOUSE_CMD_SETSCALE11);
-	psmouse_command(psmouse, &param, PSMOUSE_CMD_SETRES);
+	device_remove_file(&psmouse->ps2dev.serio->dev, &psmouse_attr_smartscroll);
 }
 
 static struct ps2pp_info *get_model_info(unsigned char model)
@@ -238,23 +291,27 @@
 
 int ps2pp_init(struct psmouse *psmouse, int set_properties)
 {
+	struct ps2dev *ps2dev = &psmouse->ps2dev;
 	unsigned char param[4];
-	unsigned char protocol = PSMOUSE_PS2;
 	unsigned char model, buttons;
 	struct ps2pp_info *model_info;
+	int use_ps2pp = 0;
 
 	param[0] = 0;
-	psmouse_command(psmouse, param, PSMOUSE_CMD_SETRES);
-	psmouse_command(psmouse,  NULL, PSMOUSE_CMD_SETSCALE11);
-	psmouse_command(psmouse,  NULL, PSMOUSE_CMD_SETSCALE11);
-	psmouse_command(psmouse,  NULL, PSMOUSE_CMD_SETSCALE11);
+	ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES);
+	ps2_command(ps2dev,  NULL, PSMOUSE_CMD_SETSCALE11);
+	ps2_command(ps2dev,  NULL, PSMOUSE_CMD_SETSCALE11);
+	ps2_command(ps2dev,  NULL, PSMOUSE_CMD_SETSCALE11);
 	param[1] = 0;
-	psmouse_command(psmouse, param, PSMOUSE_CMD_GETINFO);
+	ps2_command(ps2dev, param, PSMOUSE_CMD_GETINFO);
 
-	if (param[1] != 0) {
-		model = ((param[0] >> 4) & 0x07) | ((param[0] << 3) & 0x78);
-		buttons = param[1];
-		model_info = get_model_info(model);
+	if (!param[1])
+		return -1;
+
+	model = ((param[0] >> 4) & 0x07) | ((param[0] << 3) & 0x78);
+	buttons = param[1];
+
+	if ((model_info = get_model_info(model)) != NULL) {
 
 /*
  * Do Logitech PS2++ / PS2T++ magic init.
@@ -263,21 +320,21 @@
 
 			/* Unprotect RAM */
 			param[0] = 0x11; param[1] = 0x04; param[2] = 0x68;
-			psmouse_command(psmouse, param, 0x30d1);
+			ps2_command(ps2dev, param, 0x30d1);
 			/* Enable features */
 			param[0] = 0x11; param[1] = 0x05; param[2] = 0x0b;
-			psmouse_command(psmouse, param, 0x30d1);
+			ps2_command(ps2dev, param, 0x30d1);
 			/* Enable PS2++ */
 			param[0] = 0x11; param[1] = 0x09; param[2] = 0xc3;
-			psmouse_command(psmouse, param, 0x30d1);
+			ps2_command(ps2dev, param, 0x30d1);
 
 			param[0] = 0;
-			if (!psmouse_command(psmouse, param, 0x13d1) &&
+			if (!ps2_command(ps2dev, param, 0x13d1) &&
 			    param[0] == 0x06 && param[1] == 0x00 && param[2] == 0x14) {
-				protocol = PSMOUSE_PS2TPP;
+				use_ps2pp = 1;
 			}
 
-		} else if (model_info != NULL) {
+		} else {
 
 			param[0] = param[1] = param[2] = 0;
 			ps2pp_cmd(psmouse, param, 0x39); /* Magic knock */
@@ -286,25 +343,37 @@
 			if ((param[0] & 0x78) == 0x48 &&
 			    (param[1] & 0xf3) == 0xc2 &&
 			    (param[2] & 0x03) == ((param[1] >> 2) & 3)) {
-				ps2pp_set_smartscroll(psmouse);
-				protocol = PSMOUSE_PS2PP;
+				ps2pp_set_smartscroll(psmouse, psmouse->smartscroll);
+				use_ps2pp = 1;
 			}
 		}
+	}
 
-		if (set_properties) {
-			psmouse->vendor = "Logitech";
-			psmouse->model = model;
-
-			if (buttons < 3)
-				clear_bit(BTN_MIDDLE, psmouse->dev.keybit);
-			if (buttons < 2)
-				clear_bit(BTN_RIGHT, psmouse->dev.keybit);
+	if (set_properties) {
+		psmouse->vendor = "Logitech";
+		psmouse->model = model;
+
+		if (use_ps2pp) {
+			psmouse->protocol_handler = ps2pp_process_byte;
+			psmouse->pktsize = 3;
+
+			if (model_info->kind != PS2PP_KIND_TP3) {
+				psmouse->set_resolution = ps2pp_set_resolution;
+				psmouse->disconnect = ps2pp_disconnect;
 
-			if (model_info)
-				ps2pp_set_model_properties(psmouse, model_info);
+				device_create_file(&psmouse->ps2dev.serio->dev, &psmouse_attr_smartscroll);
+			}
 		}
+
+		if (buttons < 3)
+			clear_bit(BTN_MIDDLE, psmouse->dev.keybit);
+		if (buttons < 2)
+			clear_bit(BTN_RIGHT, psmouse->dev.keybit);
+
+		if (model_info)
+			ps2pp_set_model_properties(psmouse, model_info);
 	}
 
-	return protocol;
+	return use_ps2pp ? 0 : -1;
 }
 
diff -Nru a/drivers/input/mouse/logips2pp.h b/drivers/input/mouse/logips2pp.h
--- a/drivers/input/mouse/logips2pp.h	2005-01-10 20:11:21 -08:00
+++ b/drivers/input/mouse/logips2pp.h	2005-01-10 20:11:21 -08:00
@@ -11,8 +11,6 @@
 #ifndef _LOGIPS2PP_H
 #define _LOGIPS2PP_H
 
-void ps2pp_process_packet(struct psmouse *psmouse);
-void ps2pp_set_800dpi(struct psmouse *psmouse);
 int ps2pp_init(struct psmouse *psmouse, int set_properties);
 
 #endif
diff -Nru a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c
--- a/drivers/input/mouse/psmouse-base.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/input/mouse/psmouse-base.c	2005-01-10 20:11:17 -08:00
@@ -2,6 +2,7 @@
  * PS/2 mouse driver
  *
  * Copyright (c) 1999-2002 Vojtech Pavlik
+ * Copyright (c) 2003-2004 Dmitry Torokhov
  */
 
 /*
@@ -18,9 +19,11 @@
 #include <linux/input.h>
 #include <linux/serio.h>
 #include <linux/init.h>
+#include <linux/libps2.h>
 #include "psmouse.h"
 #include "synaptics.h"
 #include "logips2pp.h"
+#include "alps.h"
 
 #define DRIVER_DESC	"PS/2 mouse driver"
 
@@ -33,15 +36,15 @@
 module_param_named(proto, psmouse_proto, charp, 0);
 MODULE_PARM_DESC(proto, "Highest protocol extension to probe (bare, imps, exps). Useful for KVM switches.");
 
-int psmouse_resolution = 200;
+static unsigned int psmouse_resolution = 200;
 module_param_named(resolution, psmouse_resolution, uint, 0);
 MODULE_PARM_DESC(resolution, "Resolution, in dpi.");
 
-unsigned int psmouse_rate = 100;
+static unsigned int psmouse_rate = 100;
 module_param_named(rate, psmouse_rate, uint, 0);
 MODULE_PARM_DESC(rate, "Report rate, in reports per second.");
 
-int psmouse_smartscroll = 1;
+static unsigned int psmouse_smartscroll = 1;
 module_param_named(smartscroll, psmouse_smartscroll, bool, 0);
 MODULE_PARM_DESC(smartscroll, "Logitech Smartscroll autorepeat, 1 = enabled (default), 0 = disabled.");
 
@@ -49,13 +52,17 @@
 module_param_named(resetafter, psmouse_resetafter, uint, 0);
 MODULE_PARM_DESC(resetafter, "Reset device after so many bad packets (0 = never).");
 
+PSMOUSE_DEFINE_ATTR(rate);
+PSMOUSE_DEFINE_ATTR(resolution);
+PSMOUSE_DEFINE_ATTR(resetafter);
+
 __obsolete_setup("psmouse_noext");
 __obsolete_setup("psmouse_resolution=");
 __obsolete_setup("psmouse_smartscroll=");
 __obsolete_setup("psmouse_resetafter=");
 __obsolete_setup("psmouse_rate=");
 
-static char *psmouse_protocols[] = { "None", "PS/2", "PS2++", "PS2T++", "GenPS/2", "ImPS/2", "ImExPS/2", "SynPS/2"};
+static char *psmouse_protocols[] = { "None", "PS/2", "PS2++", "ThinkPS/2", "GenPS/2", "ImPS/2", "ImExPS/2", "SynPS/2", "AlpsPS/2" };
 
 /*
  * psmouse_process_byte() analyzes the PS/2 data stream and reports
@@ -67,7 +74,7 @@
 	struct input_dev *dev = &psmouse->dev;
 	unsigned char *packet = psmouse->packet;
 
-	if (psmouse->pktcnt < 3 + (psmouse->type >= PSMOUSE_GENPS))
+	if (psmouse->pktcnt < psmouse->pktsize)
 		return PSMOUSE_GOOD_DATA;
 
 /*
@@ -77,13 +84,6 @@
 	input_regs(dev, regs);
 
 /*
- * The PS2++ protocol is a little bit complex
- */
-
-	if (psmouse->type == PSMOUSE_PS2PP || psmouse->type == PSMOUSE_PS2TPP)
-		ps2pp_process_packet(psmouse);
-
-/*
  * Scroll wheel on IntelliMice, scroll buttons on NetMice
  */
 
@@ -110,6 +110,15 @@
 	}
 
 /*
+ * Extra button on ThinkingMouse
+ */
+	if (psmouse->type == PSMOUSE_THINKPS) {
+		input_report_key(dev, BTN_EXTRA, (packet[0] >> 3) & 1);
+		/* Without this bit of weirdness moving up gives wildly high Y changes. */
+		packet[1] |= (packet[0] & 0x40) << 1;
+	}
+
+/*
  * Generic PS/2 Mouse
  */
 
@@ -144,63 +153,17 @@
 			printk(KERN_WARNING "psmouse.c: bad data from KBC -%s%s\n",
 				flags & SERIO_TIMEOUT ? " timeout" : "",
 				flags & SERIO_PARITY ? " bad parity" : "");
-		psmouse->nak = 1;
-		clear_bit(PSMOUSE_FLAG_ACK, &psmouse->flags);
-		clear_bit(PSMOUSE_FLAG_CMD,  &psmouse->flags);
-		wake_up_interruptible(&psmouse->wait);
+		ps2_cmd_aborted(&psmouse->ps2dev);
 		goto out;
 	}
 
-	if (test_bit(PSMOUSE_FLAG_ACK, &psmouse->flags)) {
-		switch (data) {
-			case PSMOUSE_RET_ACK:
-				psmouse->nak = 0;
-				break;
-
-			case PSMOUSE_RET_NAK:
-				psmouse->nak = 1;
-				break;
-
-			/*
-			 * Workaround for mice which don't ACK the Get ID command.
-			 * These are valid mouse IDs that we recognize.
-			 */
-			case 0x00:
-			case 0x03:
-			case 0x04:
-				if (test_bit(PSMOUSE_FLAG_WAITID, &psmouse->flags)) {
-					psmouse->nak = 0;
-					break;
-				}
-				/* Fall through */
-			default:
-				goto out;
-		}
-
-		if (!psmouse->nak && psmouse->cmdcnt) {
-			set_bit(PSMOUSE_FLAG_CMD, &psmouse->flags);
-			set_bit(PSMOUSE_FLAG_CMD1, &psmouse->flags);
-		}
-		clear_bit(PSMOUSE_FLAG_ACK, &psmouse->flags);
-		wake_up_interruptible(&psmouse->wait);
-
-		if (data == PSMOUSE_RET_ACK || data == PSMOUSE_RET_NAK)
+	if (unlikely(psmouse->ps2dev.flags & PS2_FLAG_ACK))
+		if  (ps2_handle_ack(&psmouse->ps2dev, data))
 			goto out;
-	}
 
-	if (test_bit(PSMOUSE_FLAG_CMD, &psmouse->flags)) {
-		if (psmouse->cmdcnt)
-			psmouse->cmdbuf[--psmouse->cmdcnt] = data;
-
-		if (test_and_clear_bit(PSMOUSE_FLAG_CMD1, &psmouse->flags) && psmouse->cmdcnt)
-			wake_up_interruptible(&psmouse->wait);
-
-		if (!psmouse->cmdcnt) {
-			clear_bit(PSMOUSE_FLAG_CMD, &psmouse->flags);
-			wake_up_interruptible(&psmouse->wait);
-		}
-		goto out;
-	}
+	if (unlikely(psmouse->ps2dev.flags & PS2_FLAG_CMD))
+		if  (ps2_handle_response(&psmouse->ps2dev, data))
+			goto out;
 
 	if (psmouse->state == PSMOUSE_INITIALIZING)
 		goto out;
@@ -243,10 +206,10 @@
 				psmouse->name, psmouse->phys, psmouse->pktcnt);
 			psmouse->pktcnt = 0;
 
-			if (++psmouse->out_of_sync == psmouse_resetafter) {
+			if (++psmouse->out_of_sync == psmouse->resetafter) {
 				psmouse->state = PSMOUSE_IGNORE;
 				printk(KERN_NOTICE "psmouse.c: issuing reconnect request\n");
-				serio_reconnect(psmouse->serio);
+				serio_reconnect(psmouse->ps2dev.serio);
 			}
 			break;
 
@@ -266,100 +229,6 @@
 	return IRQ_HANDLED;
 }
 
-/*
- * psmouse_sendbyte() sends a byte to the mouse, and waits for acknowledge.
- * It doesn't handle retransmission, though it could - because when there would
- * be need for retransmissions, the mouse has to be replaced anyway.
- *
- * psmouse_sendbyte() can only be called from a process context
- */
-
-static int psmouse_sendbyte(struct psmouse *psmouse, unsigned char byte)
-{
-	psmouse->nak = 1;
-	set_bit(PSMOUSE_FLAG_ACK, &psmouse->flags);
-
-	if (serio_write(psmouse->serio, byte) == 0)
-		wait_event_interruptible_timeout(psmouse->wait,
-				!test_bit(PSMOUSE_FLAG_ACK, &psmouse->flags),
-				msecs_to_jiffies(200));
-
-	clear_bit(PSMOUSE_FLAG_ACK, &psmouse->flags);
-	return -psmouse->nak;
-}
-
-/*
- * psmouse_command() sends a command and its parameters to the mouse,
- * then waits for the response and puts it in the param array.
- *
- * psmouse_command() can only be called from a process context
- */
-
-int psmouse_command(struct psmouse *psmouse, unsigned char *param, int command)
-{
-	int timeout;
-	int send = (command >> 12) & 0xf;
-	int receive = (command >> 8) & 0xf;
-	int rc = -1;
-	int i;
-
-	timeout = msecs_to_jiffies(command == PSMOUSE_CMD_RESET_BAT ? 4000 : 500);
-
-	clear_bit(PSMOUSE_FLAG_CMD, &psmouse->flags);
-	if (command == PSMOUSE_CMD_GETID)
-		set_bit(PSMOUSE_FLAG_WAITID, &psmouse->flags);
-
-	if (receive && param)
-		for (i = 0; i < receive; i++)
-			psmouse->cmdbuf[(receive - 1) - i] = param[i];
-
-	psmouse->cmdcnt = receive;
-
-	if (command & 0xff)
-		if (psmouse_sendbyte(psmouse, command & 0xff))
-			goto out;
-
-	for (i = 0; i < send; i++)
-		if (psmouse_sendbyte(psmouse, param[i]))
-			goto out;
-
-	timeout = wait_event_interruptible_timeout(psmouse->wait,
-				!test_bit(PSMOUSE_FLAG_CMD1, &psmouse->flags), timeout);
-
-	if (psmouse->cmdcnt && timeout > 0) {
-		if (command == PSMOUSE_CMD_RESET_BAT && jiffies_to_msecs(timeout) > 100)
-			timeout = msecs_to_jiffies(100);
-
-		if (command == PSMOUSE_CMD_GETID &&
-		    psmouse->cmdbuf[receive - 1] != 0xab && psmouse->cmdbuf[receive - 1] != 0xac) {
-			/*
-			 * Device behind the port is not a keyboard
-			 * so we don't need to wait for the 2nd byte
-			 * of ID response.
-			 */
-			clear_bit(PSMOUSE_FLAG_CMD, &psmouse->flags);
-			psmouse->cmdcnt = 0;
-		}
-
-		wait_event_interruptible_timeout(psmouse->wait,
-				!test_bit(PSMOUSE_FLAG_CMD, &psmouse->flags), timeout);
-	}
-
-	if (param)
-		for (i = 0; i < receive; i++)
-			param[i] = psmouse->cmdbuf[(receive - 1) - i];
-
-	if (psmouse->cmdcnt && (command != PSMOUSE_CMD_RESET_BAT || psmouse->cmdcnt != 1))
-		goto out;
-
-	rc = 0;
-
-out:
-	clear_bit(PSMOUSE_FLAG_CMD, &psmouse->flags);
-	clear_bit(PSMOUSE_FLAG_CMD1, &psmouse->flags);
-	clear_bit(PSMOUSE_FLAG_WAITID, &psmouse->flags);
-	return rc;
-}
 
 /*
  * psmouse_sliced_command() sends an extended PS/2 command to the mouse
@@ -372,12 +241,12 @@
 {
 	int i;
 
-	if (psmouse_command(psmouse, NULL, PSMOUSE_CMD_SETSCALE11))
+	if (ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_SETSCALE11))
 		return -1;
 
 	for (i = 6; i >= 0; i -= 2) {
 		unsigned char d = (command >> i) & 3;
-		if (psmouse_command(psmouse, &d, PSMOUSE_CMD_SETRES))
+		if (ps2_command(&psmouse->ps2dev, &d, PSMOUSE_CMD_SETRES))
 			return -1;
 	}
 
@@ -392,7 +261,7 @@
 {
 	unsigned char param[2];
 
-	if (psmouse_command(psmouse, param, PSMOUSE_CMD_RESET_BAT))
+	if (ps2_command(&psmouse->ps2dev, param, PSMOUSE_CMD_RESET_BAT))
 		return -1;
 
 	if (param[0] != PSMOUSE_RET_BAT && param[1] != PSMOUSE_RET_ID)
@@ -405,56 +274,138 @@
 /*
  * Genius NetMouse magic init.
  */
-static int genius_detect(struct psmouse *psmouse)
+static int genius_detect(struct psmouse *psmouse, int set_properties)
 {
+	struct ps2dev *ps2dev = &psmouse->ps2dev;
 	unsigned char param[4];
 
 	param[0] = 3;
-	psmouse_command(psmouse, param, PSMOUSE_CMD_SETRES);
-	psmouse_command(psmouse,  NULL, PSMOUSE_CMD_SETSCALE11);
-	psmouse_command(psmouse,  NULL, PSMOUSE_CMD_SETSCALE11);
-	psmouse_command(psmouse,  NULL, PSMOUSE_CMD_SETSCALE11);
-	psmouse_command(psmouse, param, PSMOUSE_CMD_GETINFO);
+	ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES);
+	ps2_command(ps2dev,  NULL, PSMOUSE_CMD_SETSCALE11);
+	ps2_command(ps2dev,  NULL, PSMOUSE_CMD_SETSCALE11);
+	ps2_command(ps2dev,  NULL, PSMOUSE_CMD_SETSCALE11);
+	ps2_command(ps2dev, param, PSMOUSE_CMD_GETINFO);
+
+	if (param[0] != 0x00 || param[1] != 0x33 || param[2] != 0x55)
+		return -1;
+
+	if (set_properties) {
+		set_bit(BTN_EXTRA, psmouse->dev.keybit);
+		set_bit(BTN_SIDE, psmouse->dev.keybit);
+		set_bit(REL_WHEEL, psmouse->dev.relbit);
+
+		psmouse->vendor = "Genius";
+		psmouse->name = "Wheel Mouse";
+		psmouse->pktsize = 4;
+	}
 
-	return param[0] == 0x00 && param[1] == 0x33 && param[2] == 0x55;
+	return 0;
 }
 
 /*
  * IntelliMouse magic init.
  */
-static int intellimouse_detect(struct psmouse *psmouse)
+static int intellimouse_detect(struct psmouse *psmouse, int set_properties)
 {
+	struct ps2dev *ps2dev = &psmouse->ps2dev;
 	unsigned char param[2];
 
 	param[0] = 200;
-	psmouse_command(psmouse, param, PSMOUSE_CMD_SETRATE);
+	ps2_command(ps2dev, param, PSMOUSE_CMD_SETRATE);
 	param[0] = 100;
-	psmouse_command(psmouse, param, PSMOUSE_CMD_SETRATE);
+	ps2_command(ps2dev, param, PSMOUSE_CMD_SETRATE);
 	param[0] =  80;
-	psmouse_command(psmouse, param, PSMOUSE_CMD_SETRATE);
-	psmouse_command(psmouse, param, PSMOUSE_CMD_GETID);
+	ps2_command(ps2dev, param, PSMOUSE_CMD_SETRATE);
+	ps2_command(ps2dev, param, PSMOUSE_CMD_GETID);
+
+	if (param[0] != 3)
+		return -1;
+
+	if (set_properties) {
+		set_bit(REL_WHEEL, psmouse->dev.relbit);
+
+		if (!psmouse->vendor) psmouse->vendor = "Generic";
+		if (!psmouse->name) psmouse->name = "Wheel Mouse";
+		psmouse->pktsize = 4;
+	}
 
-	return param[0] == 3;
+	return 0;
 }
 
 /*
  * Try IntelliMouse/Explorer magic init.
  */
-static int im_explorer_detect(struct psmouse *psmouse)
+static int im_explorer_detect(struct psmouse *psmouse, int set_properties)
 {
+	struct ps2dev *ps2dev = &psmouse->ps2dev;
 	unsigned char param[2];
 
-	intellimouse_detect(psmouse);
+	intellimouse_detect(psmouse, 0);
 
 	param[0] = 200;
-	psmouse_command(psmouse, param, PSMOUSE_CMD_SETRATE);
+	ps2_command(ps2dev, param, PSMOUSE_CMD_SETRATE);
 	param[0] = 200;
-	psmouse_command(psmouse, param, PSMOUSE_CMD_SETRATE);
+	ps2_command(ps2dev, param, PSMOUSE_CMD_SETRATE);
 	param[0] =  80;
-	psmouse_command(psmouse, param, PSMOUSE_CMD_SETRATE);
-	psmouse_command(psmouse, param, PSMOUSE_CMD_GETID);
+	ps2_command(ps2dev, param, PSMOUSE_CMD_SETRATE);
+	ps2_command(ps2dev, param, PSMOUSE_CMD_GETID);
+
+	if (param[0] != 4)
+		return -1;
+
+	if (set_properties) {
+		set_bit(REL_WHEEL, psmouse->dev.relbit);
+		set_bit(BTN_SIDE, psmouse->dev.keybit);
+		set_bit(BTN_EXTRA, psmouse->dev.keybit);
+
+		if (!psmouse->vendor) psmouse->vendor = "Generic";
+		if (!psmouse->name) psmouse->name = "Explorer Mouse";
+		psmouse->pktsize = 4;
+	}
 
-	return param[0] == 4;
+	return 0;
+}
+
+/*
+ * Kensington ThinkingMouse / ExpertMouse magic init.
+ */
+static int thinking_detect(struct psmouse *psmouse, int set_properties)
+{
+	struct ps2dev *ps2dev = &psmouse->ps2dev;
+	unsigned char param[2];
+	unsigned char seq[] = { 20, 60, 40, 20, 20, 60, 40, 20, 20, 0 };
+	int i;
+
+	param[0] = 10;
+	ps2_command(ps2dev, param, PSMOUSE_CMD_SETRATE);
+	param[0] = 0;
+	ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES);
+	for (i = 0; seq[i]; i++)
+		ps2_command(ps2dev, seq + i, PSMOUSE_CMD_SETRATE);
+	ps2_command(ps2dev, param, PSMOUSE_CMD_GETID);
+
+	if (param[0] != 2)
+		return -1;
+
+	if (set_properties) {
+		set_bit(BTN_EXTRA, psmouse->dev.keybit);
+
+		psmouse->vendor = "Kensington";
+		psmouse->name = "ThinkingMouse";
+	}
+
+	return 0;
+}
+
+/*
+ * Bare PS/2 protocol "detection". Always succeeds.
+ */
+static int ps2bare_detect(struct psmouse *psmouse, int set_properties)
+{
+	if (!psmouse->vendor) psmouse->vendor = "Generic";
+	if (!psmouse->name) psmouse->name = "Mouse";
+
+	return 0;
 }
 
 /*
@@ -468,16 +419,19 @@
 	int synaptics_hardware = 0;
 
 /*
+ * Try Kensington ThinkingMouse (we try first, because synaptics probe
+ * upsets the thinkingmouse).
+ */
+
+	if (max_proto > PSMOUSE_PS2 && thinking_detect(psmouse, set_properties) == 0)
+		return PSMOUSE_THINKPS;
+
+/*
  * Try Synaptics TouchPad
  */
-	if (max_proto > PSMOUSE_PS2 && synaptics_detect(psmouse)) {
+	if (max_proto > PSMOUSE_PS2 && synaptics_detect(psmouse, set_properties) == 0) {
 		synaptics_hardware = 1;
 
-		if (set_properties) {
-			psmouse->vendor = "Synaptics";
-			psmouse->name = "TouchPad";
-		}
-
 		if (max_proto > PSMOUSE_IMEX) {
 			if (!set_properties || synaptics_init(psmouse) == 0)
 				return PSMOUSE_SYNAPTICS;
@@ -494,53 +448,43 @@
 		synaptics_reset(psmouse);
 	}
 
-	if (max_proto > PSMOUSE_IMEX && genius_detect(psmouse)) {
+/*
+ * Try ALPS TouchPad
+ */
+	if (max_proto > PSMOUSE_IMEX && alps_detect(psmouse, set_properties) == 0) {
+		if (!set_properties || alps_init(psmouse) == 0)
+			return PSMOUSE_ALPS;
 
-		if (set_properties) {
-			set_bit(BTN_EXTRA, psmouse->dev.keybit);
-			set_bit(BTN_SIDE, psmouse->dev.keybit);
-			set_bit(REL_WHEEL, psmouse->dev.relbit);
-			psmouse->vendor = "Genius";
-			psmouse->name = "Wheel Mouse";
-		}
+/*
+ * Init failed, try basic relative protocols
+ */
+		max_proto = PSMOUSE_IMEX;
+	}
 
+	if (max_proto > PSMOUSE_IMEX && genius_detect(psmouse, set_properties) == 0)
 		return PSMOUSE_GENPS;
-	}
 
-	if (max_proto > PSMOUSE_IMEX) {
-		int type = ps2pp_init(psmouse, set_properties);
-		if (type > PSMOUSE_PS2)
-			return type;
-	}
+	if (max_proto > PSMOUSE_IMEX && ps2pp_init(psmouse, set_properties) == 0)
+		return PSMOUSE_PS2PP;
 
-	if (max_proto >= PSMOUSE_IMEX && im_explorer_detect(psmouse)) {
-
-		if (set_properties) {
-			set_bit(REL_WHEEL, psmouse->dev.relbit);
-			set_bit(BTN_SIDE, psmouse->dev.keybit);
-			set_bit(BTN_EXTRA, psmouse->dev.keybit);
-			if (!psmouse->name)
-				psmouse->name = "Explorer Mouse";
-		}
+/*
+ * Reset to defaults in case the device got confused by extended
+ * protocol probes.
+ */
+	ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_RESET_DIS);
 
+	if (max_proto >= PSMOUSE_IMEX && im_explorer_detect(psmouse, set_properties) == 0)
 		return PSMOUSE_IMEX;
-	}
-
-	if (max_proto >= PSMOUSE_IMPS && intellimouse_detect(psmouse)) {
-
-		if (set_properties) {
-			set_bit(REL_WHEEL, psmouse->dev.relbit);
-			if (!psmouse->name)
-				psmouse->name = "Wheel Mouse";
-		}
 
+	if (max_proto >= PSMOUSE_IMPS && intellimouse_detect(psmouse, set_properties) == 0)
 		return PSMOUSE_IMPS;
-	}
 
 /*
  * Okay, all failed, we have a standard mouse here. The number of the buttons
  * is still a question, though. We assume 3.
  */
+	ps2bare_detect(psmouse, set_properties);
+
 	if (synaptics_hardware) {
 /*
  * We detected Synaptics hardware but it did not respond to IMPS/2 probes.
@@ -549,7 +493,7 @@
  * extensions.
  */
 		psmouse_reset(psmouse);
-		psmouse_command(psmouse, NULL, PSMOUSE_CMD_RESET_DIS);
+		ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_RESET_DIS);
 	}
 
 	return PSMOUSE_PS2;
@@ -561,6 +505,7 @@
 
 static int psmouse_probe(struct psmouse *psmouse)
 {
+	struct ps2dev *ps2dev = &psmouse->ps2dev;
 	unsigned char param[2];
 
 /*
@@ -569,8 +514,7 @@
  */
 
 	param[0] = 0xa5;
-
-	if (psmouse_command(psmouse, param, PSMOUSE_CMD_GETID))
+	if (ps2_command(ps2dev, param, PSMOUSE_CMD_GETID))
 		return -1;
 
 	if (param[0] != 0x00 && param[0] != 0x03 && param[0] != 0x04)
@@ -580,8 +524,8 @@
  * Then we reset and disable the mouse so that it doesn't generate events.
  */
 
-	if (psmouse_command(psmouse, NULL, PSMOUSE_CMD_RESET_DIS))
-		printk(KERN_WARNING "psmouse.c: Failed to reset mouse on %s\n", psmouse->serio->phys);
+	if (ps2_command(ps2dev, NULL, PSMOUSE_CMD_RESET_DIS))
+		printk(KERN_WARNING "psmouse.c: Failed to reset mouse on %s\n", ps2dev->serio->phys);
 
 	return 0;
 }
@@ -590,38 +534,29 @@
  * Here we set the mouse resolution.
  */
 
-static void psmouse_set_resolution(struct psmouse *psmouse)
+void psmouse_set_resolution(struct psmouse *psmouse, unsigned int resolution)
 {
-	unsigned char param[1];
+	unsigned char params[] = { 0, 1, 2, 2, 3 };
 
-	if (psmouse->type == PSMOUSE_PS2PP && psmouse_resolution > 400) {
-		ps2pp_set_800dpi(psmouse);
-		return;
-	}
-
-	if (!psmouse_resolution || psmouse_resolution >= 200)
-		param[0] = 3;
-	else if (psmouse_resolution >= 100)
-		param[0] = 2;
-	else if (psmouse_resolution >= 50)
-		param[0] = 1;
-	else if (psmouse_resolution)
-		param[0] = 0;
+	if (resolution == 0 || resolution > 200)
+		resolution = 200;
 
-        psmouse_command(psmouse, param, PSMOUSE_CMD_SETRES);
+	ps2_command(&psmouse->ps2dev, &params[resolution / 50], PSMOUSE_CMD_SETRES);
+	psmouse->resolution = 25 << params[resolution / 50];
 }
 
 /*
  * Here we set the mouse report rate.
  */
 
-static void psmouse_set_rate(struct psmouse *psmouse)
+static void psmouse_set_rate(struct psmouse *psmouse, unsigned int rate)
 {
 	unsigned char rates[] = { 200, 100, 80, 60, 40, 20, 10, 0 };
 	int i = 0;
 
-	while (rates[i] > psmouse_rate) i++;
-	psmouse_command(psmouse, rates + i, PSMOUSE_CMD_SETRATE);
+	while (rates[i] > rate) i++;
+	ps2_command(&psmouse->ps2dev, &rates[i], PSMOUSE_CMD_SETRATE);
+	psmouse->rate = rates[i];
 }
 
 /*
@@ -630,23 +565,21 @@
 
 static void psmouse_initialize(struct psmouse *psmouse)
 {
-	unsigned char param[2];
-
 /*
- * We set the mouse report rate, resolution and scaling.
+ * We set the mouse into streaming mode.
  */
 
-	if (psmouse_max_proto != PSMOUSE_PS2) {
-		psmouse_set_rate(psmouse);
-		psmouse_set_resolution(psmouse);
-		psmouse_command(psmouse,  NULL, PSMOUSE_CMD_SETSCALE11);
-	}
+	ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_SETSTREAM);
 
 /*
- * We set the mouse into streaming mode.
+ * We set the mouse report rate, resolution and scaling.
  */
 
-	psmouse_command(psmouse, param, PSMOUSE_CMD_SETSTREAM);
+	if (psmouse_max_proto != PSMOUSE_PS2) {
+		psmouse->set_rate(psmouse, psmouse->rate);
+		psmouse->set_resolution(psmouse, psmouse->resolution);
+		ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_SETSCALE11);
+	}
 }
 
 /*
@@ -657,11 +590,11 @@
 
 static void psmouse_set_state(struct psmouse *psmouse, enum psmouse_state new_state)
 {
-	serio_pause_rx(psmouse->serio);
+	serio_pause_rx(psmouse->ps2dev.serio);
 	psmouse->state = new_state;
-	psmouse->pktcnt = psmouse->cmdcnt = psmouse->out_of_sync = 0;
-	psmouse->flags = 0;
-	serio_continue_rx(psmouse->serio);
+	psmouse->pktcnt = psmouse->out_of_sync = 0;
+	psmouse->ps2dev.flags = 0;
+	serio_continue_rx(psmouse->ps2dev.serio);
 }
 
 /*
@@ -670,8 +603,9 @@
 
 static void psmouse_activate(struct psmouse *psmouse)
 {
-	if (psmouse_command(psmouse, NULL, PSMOUSE_CMD_ENABLE))
-		printk(KERN_WARNING "psmouse.c: Failed to enable mouse on %s\n", psmouse->serio->phys);
+	if (ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_ENABLE))
+		printk(KERN_WARNING "psmouse.c: Failed to enable mouse on %s\n",
+			psmouse->ps2dev.serio->phys);
 
 	psmouse_set_state(psmouse, PSMOUSE_ACTIVATED);
 }
@@ -684,8 +618,9 @@
 
 static void psmouse_deactivate(struct psmouse *psmouse)
 {
-	if (psmouse_command(psmouse, NULL, PSMOUSE_CMD_DISABLE))
-		printk(KERN_WARNING "psmouse.c: Failed to deactivate mouse on %s\n", psmouse->serio->phys);
+	if (ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_DISABLE))
+		printk(KERN_WARNING "psmouse.c: Failed to deactivate mouse on %s\n",
+			psmouse->ps2dev.serio->phys);
 
 	psmouse_set_state(psmouse, PSMOUSE_CMD_MODE);
 }
@@ -710,6 +645,10 @@
 {
 	struct psmouse *psmouse, *parent;
 
+	device_remove_file(&serio->dev, &psmouse_attr_rate);
+	device_remove_file(&serio->dev, &psmouse_attr_resolution);
+	device_remove_file(&serio->dev, &psmouse_attr_resetafter);
+
 	psmouse = serio->private;
 	psmouse_set_state(psmouse, PSMOUSE_CMD_MODE);
 
@@ -755,13 +694,12 @@
 
 	memset(psmouse, 0, sizeof(struct psmouse));
 
-	init_waitqueue_head(&psmouse->wait);
-	init_input_dev(&psmouse->dev);
+	ps2_init(&psmouse->ps2dev, serio);
 	psmouse->dev.evbit[0] = BIT(EV_KEY) | BIT(EV_REL);
 	psmouse->dev.keybit[LONG(BTN_MOUSE)] = BIT(BTN_LEFT) | BIT(BTN_MIDDLE) | BIT(BTN_RIGHT);
 	psmouse->dev.relbit[0] = BIT(REL_X) | BIT(REL_Y);
-	psmouse->serio = serio;
 	psmouse->dev.private = psmouse;
+	psmouse->dev.dev = &serio->dev;
 	psmouse_set_state(psmouse, PSMOUSE_INITIALIZING);
 
 	serio->private = psmouse;
@@ -778,13 +716,16 @@
 		goto out;
 	}
 
+	psmouse->rate = psmouse_rate;
+	psmouse->resolution = psmouse_resolution;
+	psmouse->resetafter = psmouse_resetafter;
+	psmouse->smartscroll = psmouse_smartscroll;
+	psmouse->set_rate = psmouse_set_rate;
+	psmouse->set_resolution = psmouse_set_resolution;
+	psmouse->protocol_handler = psmouse_process_byte;
+	psmouse->pktsize = 3;
+
 	psmouse->type = psmouse_extensions(psmouse, psmouse_max_proto, 1);
-	if (!psmouse->vendor)
-		psmouse->vendor = "Generic";
-	if (!psmouse->name)
-		psmouse->name = "Mouse";
-	if (!psmouse->protocol_handler)
-		psmouse->protocol_handler = psmouse_process_byte;
 
 	sprintf(psmouse->devname, "%s %s %s",
 		psmouse_protocols[psmouse->type], psmouse->vendor, psmouse->name);
@@ -809,6 +750,10 @@
 	if (parent && parent->pt_activate)
 		parent->pt_activate(parent);
 
+	device_create_file(&serio->dev, &psmouse_attr_rate);
+	device_create_file(&serio->dev, &psmouse_attr_resolution);
+	device_create_file(&serio->dev, &psmouse_attr_resetafter);
+
 	if (serio->child) {
 		/*
 		 * Nothing to be done here, serio core will detect that
@@ -846,7 +791,7 @@
 	psmouse_set_state(psmouse, PSMOUSE_INITIALIZING);
 
 	if (psmouse->reconnect) {
-	       if (psmouse->reconnect(psmouse))
+		if (psmouse->reconnect(psmouse))
 			goto out;
 	} else if (psmouse_probe(psmouse) < 0 ||
 		   psmouse->type != psmouse_extensions(psmouse, psmouse_max_proto, 0))
@@ -885,6 +830,115 @@
 	.disconnect	= psmouse_disconnect,
 	.cleanup	= psmouse_cleanup,
 };
+
+ssize_t psmouse_attr_show_helper(struct device *dev, char *buf,
+				 ssize_t (*handler)(struct psmouse *, char *))
+{
+	struct serio *serio = to_serio_port(dev);
+	int retval;
+
+	retval = serio_pin_driver(serio);
+	if (retval)
+		return retval;
+
+	if (serio->drv != &psmouse_drv) {
+		retval = -ENODEV;
+		goto out;
+	}
+
+	retval = handler(serio->private, buf);
+
+out:
+	serio_unpin_driver(serio);
+	return retval;
+}
+
+ssize_t psmouse_attr_set_helper(struct device *dev, const char *buf, size_t count,
+				ssize_t (*handler)(struct psmouse *, const char *, size_t))
+{
+	struct serio *serio = to_serio_port(dev);
+	struct psmouse *psmouse = serio->private, *parent = NULL;
+	int retval;
+
+	retval = serio_pin_driver(serio);
+	if (retval)
+		return retval;
+
+	if (serio->drv != &psmouse_drv) {
+		retval = -ENODEV;
+		goto out;
+	}
+
+	if (serio->parent && (serio->type & SERIO_TYPE) == SERIO_PS_PSTHRU) {
+		parent = serio->parent->private;
+		psmouse_deactivate(parent);
+	}
+	psmouse_deactivate(psmouse);
+
+	retval = handler(psmouse, buf, count);
+
+	psmouse_activate(psmouse);
+	if (parent)
+		psmouse_activate(parent);
+
+out:
+	serio_unpin_driver(serio);
+	return retval;
+}
+
+static ssize_t psmouse_attr_show_rate(struct psmouse *psmouse, char *buf)
+{
+	return sprintf(buf, "%d\n", psmouse->rate);
+}
+
+static ssize_t psmouse_attr_set_rate(struct psmouse *psmouse, const char *buf, size_t count)
+{
+	unsigned long value;
+	char *rest;
+
+	value = simple_strtoul(buf, &rest, 10);
+	if (*rest)
+		return -EINVAL;
+
+	psmouse->set_rate(psmouse, value);
+	return count;
+}
+
+static ssize_t psmouse_attr_show_resolution(struct psmouse *psmouse, char *buf)
+{
+	return sprintf(buf, "%d\n", psmouse->resolution);
+}
+
+static ssize_t psmouse_attr_set_resolution(struct psmouse *psmouse, const char *buf, size_t count)
+{
+	unsigned long value;
+	char *rest;
+
+	value = simple_strtoul(buf, &rest, 10);
+	if (*rest)
+		return -EINVAL;
+
+	psmouse->set_resolution(psmouse, value);
+	return count;
+}
+
+static ssize_t psmouse_attr_show_resetafter(struct psmouse *psmouse, char *buf)
+{
+	return sprintf(buf, "%d\n", psmouse->resetafter);
+}
+
+static ssize_t psmouse_attr_set_resetafter(struct psmouse *psmouse, const char *buf, size_t count)
+{
+	unsigned long value;
+	char *rest;
+
+	value = simple_strtoul(buf, &rest, 10);
+	if (*rest)
+		return -EINVAL;
+
+	psmouse->resetafter = value;
+	return count;
+}
 
 static inline void psmouse_parse_proto(void)
 {
diff -Nru a/drivers/input/mouse/psmouse.h b/drivers/input/mouse/psmouse.h
--- a/drivers/input/mouse/psmouse.h	2005-01-10 20:11:22 -08:00
+++ b/drivers/input/mouse/psmouse.h	2005-01-10 20:11:22 -08:00
@@ -2,9 +2,11 @@
 #define _PSMOUSE_H
 
 #define PSMOUSE_CMD_SETSCALE11	0x00e6
+#define PSMOUSE_CMD_SETSCALE21	0x00e7
 #define PSMOUSE_CMD_SETRES	0x10e8
 #define PSMOUSE_CMD_GETINFO	0x03e9
 #define PSMOUSE_CMD_SETSTREAM	0x00ea
+#define PSMOUSE_CMD_SETPOLL	0x00f0
 #define PSMOUSE_CMD_POLL	0x03eb
 #define PSMOUSE_CMD_GETID	0x02f2
 #define PSMOUSE_CMD_SETRATE	0x10f3
@@ -18,11 +20,6 @@
 #define PSMOUSE_RET_ACK		0xfa
 #define PSMOUSE_RET_NAK		0xfe
 
-#define PSMOUSE_FLAG_ACK	0	/* Waiting for ACK/NAK */
-#define PSMOUSE_FLAG_CMD	1	/* Waiting for command to finish */
-#define PSMOUSE_FLAG_CMD1	2	/* Waiting for the first byte of command response */
-#define PSMOUSE_FLAG_WAITID	3	/* Command execiting is GET ID */
-
 enum psmouse_state {
 	PSMOUSE_IGNORE,
 	PSMOUSE_INITIALIZING,
@@ -40,28 +37,29 @@
 struct psmouse {
 	void *private;
 	struct input_dev dev;
-	struct serio *serio;
+	struct ps2dev ps2dev;
 	char *vendor;
 	char *name;
-	unsigned char cmdbuf[8];
 	unsigned char packet[8];
-	unsigned char cmdcnt;
 	unsigned char pktcnt;
+	unsigned char pktsize;
 	unsigned char type;
 	unsigned char model;
 	unsigned long last;
 	unsigned long out_of_sync;
 	enum psmouse_state state;
-	unsigned char nak;
-	char error;
 	char devname[64];
 	char phys[32];
-	unsigned long flags;
 
-	/* Used to signal completion from interrupt handler */
-	wait_queue_head_t wait;
+	unsigned int rate;
+	unsigned int resolution;
+	unsigned int resetafter;
+	unsigned int smartscroll;	/* Logitech only */
 
 	psmouse_ret_t (*protocol_handler)(struct psmouse *psmouse, struct pt_regs *regs);
+	void (*set_rate)(struct psmouse *psmouse, unsigned int rate);
+	void (*set_resolution)(struct psmouse *psmouse, unsigned int resolution);
+
 	int (*reconnect)(struct psmouse *psmouse);
 	void (*disconnect)(struct psmouse *psmouse);
 
@@ -69,19 +67,40 @@
 	void (*pt_deactivate)(struct psmouse *psmouse);
 };
 
-#define PSMOUSE_PS2		1
-#define PSMOUSE_PS2PP		2
-#define PSMOUSE_PS2TPP		3
-#define PSMOUSE_GENPS		4
-#define PSMOUSE_IMPS		5
-#define PSMOUSE_IMEX		6
-#define PSMOUSE_SYNAPTICS 	7
+enum psmouse_type {
+	PSMOUSE_NONE,
+	PSMOUSE_PS2,
+	PSMOUSE_PS2PP,
+	PSMOUSE_THINKPS,
+	PSMOUSE_GENPS,
+	PSMOUSE_IMPS,
+	PSMOUSE_IMEX,
+	PSMOUSE_SYNAPTICS,
+	PSMOUSE_ALPS,
+};
 
-int psmouse_command(struct psmouse *psmouse, unsigned char *param, int command);
 int psmouse_sliced_command(struct psmouse *psmouse, unsigned char command);
 int psmouse_reset(struct psmouse *psmouse);
+void psmouse_set_resolution(struct psmouse *psmouse, unsigned int resolution);
 
-extern int psmouse_smartscroll;
-extern unsigned int psmouse_rate;
+ssize_t psmouse_attr_show_helper(struct device *dev, char *buf,
+			ssize_t (*handler)(struct psmouse *, char *));
+ssize_t psmouse_attr_set_helper(struct device *dev, const char *buf, size_t count,
+			ssize_t (*handler)(struct psmouse *, const char *, size_t));
+
+#define PSMOUSE_DEFINE_ATTR(_name)						\
+static ssize_t psmouse_attr_show_##_name(struct psmouse *, char *);		\
+static ssize_t psmouse_attr_set_##_name(struct psmouse *, const char *, size_t);\
+static ssize_t psmouse_do_show_##_name(struct device *d, char *b)		\
+{										\
+	return psmouse_attr_show_helper(d, b, psmouse_attr_show_##_name);	\
+}										\
+static ssize_t psmouse_do_set_##_name(struct device *d, const char *b, size_t s)\
+{										\
+	return psmouse_attr_set_helper(d, b, s, psmouse_attr_set_##_name);	\
+}										\
+static struct device_attribute psmouse_attr_##_name = 				\
+	__ATTR(_name, S_IWUSR | S_IRUGO,					\
+		psmouse_do_show_##_name, psmouse_do_set_##_name);
 
 #endif /* _PSMOUSE_H */
diff -Nru a/drivers/input/mouse/sermouse.c b/drivers/input/mouse/sermouse.c
--- a/drivers/input/mouse/sermouse.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/input/mouse/sermouse.c	2005-01-10 20:11:21 -08:00
@@ -11,18 +11,18 @@
 /*
  * 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 
+ * 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
- * 
+ *
  * Should you need to contact me, the author, you can do so either by
  * e-mail - mail your message to <vojtech@ucw.cz>, or by paper mail:
  * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic
@@ -73,19 +73,19 @@
 
 		case 0:
 			if ((data & 0xf8) != 0x80) return;
-			input_report_key(dev, BTN_LEFT,   !(data & 4)); 
+			input_report_key(dev, BTN_LEFT,   !(data & 4));
 			input_report_key(dev, BTN_RIGHT,  !(data & 1));
 			input_report_key(dev, BTN_MIDDLE, !(data & 2));
 			break;
 
-		case 1: 
-		case 3: 
+		case 1:
+		case 3:
 			input_report_rel(dev, REL_X, data / 2);
 			input_report_rel(dev, REL_Y, -buf[1]);
 			buf[0] = data - data / 2;
 			break;
 
-		case 2: 
+		case 2:
 		case 4:
 			input_report_rel(dev, REL_X, buf[0]);
 			input_report_rel(dev, REL_Y, buf[1] - data);
@@ -145,7 +145,7 @@
 		case 3:
 
 			switch (sermouse->type) {
-			
+
 				case SERIO_MS:
 					 sermouse->type = SERIO_MP;
 
@@ -164,7 +164,7 @@
 					input_report_rel(dev, REL_WHEEL,  (data & 8) - (data & 7));
 					break;
 			}
-					
+
 			break;
 
 		case 4:
@@ -243,7 +243,7 @@
 {
 	struct sermouse *sermouse;
 	unsigned char c;
-	
+
 	if ((serio->type & SERIO_TYPE) != SERIO_RS232)
 		return;
 
@@ -280,6 +280,7 @@
 	sermouse->dev.id.vendor = sermouse->type;
 	sermouse->dev.id.product = c;
 	sermouse->dev.id.version = 0x0100;
+	sermouse->dev.dev = &serio->dev;
 
 	if (serio_open(serio, drv)) {
 		kfree(sermouse);
@@ -287,7 +288,7 @@
 	}
 
 	input_register_device(&sermouse->dev);
-	
+
 	printk(KERN_INFO "input: %s on %s\n", sermouse_protocols[sermouse->type], serio->phys);
 }
 
diff -Nru a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
--- a/drivers/input/mouse/synaptics.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/input/mouse/synaptics.c	2005-01-10 20:11:18 -08:00
@@ -26,6 +26,7 @@
 #include <linux/module.h>
 #include <linux/input.h>
 #include <linux/serio.h>
+#include <linux/libps2.h>
 #include "psmouse.h"
 #include "synaptics.h"
 
@@ -50,7 +51,7 @@
 {
 	if (psmouse_sliced_command(psmouse, c))
 		return -1;
-	if (psmouse_command(psmouse, param, PSMOUSE_CMD_GETINFO))
+	if (ps2_command(&psmouse->ps2dev, param, PSMOUSE_CMD_GETINFO))
 		return -1;
 	return 0;
 }
@@ -65,7 +66,7 @@
 	if (psmouse_sliced_command(psmouse, mode))
 		return -1;
 	param[0] = SYN_PS_SET_MODE2;
-	if (psmouse_command(psmouse, param, PSMOUSE_CMD_SETRATE))
+	if (ps2_command(&psmouse->ps2dev, param, PSMOUSE_CMD_SETRATE))
 		return -1;
 	return 0;
 }
@@ -192,23 +193,37 @@
 	return 0;
 }
 
-static int synaptics_set_mode(struct psmouse *psmouse, int mode)
+static int synaptics_set_absolute_mode(struct psmouse *psmouse)
 {
 	struct synaptics_data *priv = psmouse->private;
 
-	mode |= SYN_BIT_ABSOLUTE_MODE;
-	if (psmouse_rate >= 80)
-		mode |= SYN_BIT_HIGH_RATE;
+	priv->mode = SYN_BIT_ABSOLUTE_MODE;
 	if (SYN_ID_MAJOR(priv->identity) >= 4)
-		mode |= SYN_BIT_DISABLE_GESTURE;
+		priv->mode |= SYN_BIT_DISABLE_GESTURE;
 	if (SYN_CAP_EXTENDED(priv->capabilities))
-		mode |= SYN_BIT_W_MODE;
-	if (synaptics_mode_cmd(psmouse, mode))
+		priv->mode |= SYN_BIT_W_MODE;
+
+	if (synaptics_mode_cmd(psmouse, priv->mode))
 		return -1;
 
 	return 0;
 }
 
+static void synaptics_set_rate(struct psmouse *psmouse, unsigned int rate)
+{
+	struct synaptics_data *priv = psmouse->private;
+
+	if (rate >= 80) {
+		priv->mode |= SYN_BIT_HIGH_RATE;
+		psmouse->rate = 80;
+	} else {
+		priv->mode &= ~SYN_BIT_HIGH_RATE;
+		psmouse->rate = 40;
+	}
+
+	synaptics_mode_cmd(psmouse, priv->mode);
+}
+
 /*****************************************************************************
  *	Synaptics pass-through PS/2 port support
  ****************************************************************************/
@@ -219,7 +234,7 @@
 
 	if (psmouse_sliced_command(parent, c))
 		return -1;
-	if (psmouse_command(parent, &rate_param, PSMOUSE_CMD_SETRATE))
+	if (ps2_command(&parent->ps2dev, &rate_param, PSMOUSE_CMD_SETRATE))
 		return -1;
 	return 0;
 }
@@ -245,12 +260,18 @@
 
 static void synaptics_pt_activate(struct psmouse *psmouse)
 {
-	struct psmouse *child = psmouse->serio->child->private;
+	struct psmouse *child = psmouse->ps2dev.serio->child->private;
+	struct synaptics_data *priv = psmouse->private;
 
 	/* adjust the touchpad to child's choice of protocol */
-	if (child && child->type >= PSMOUSE_GENPS) {
-		if (synaptics_set_mode(psmouse, SYN_BIT_FOUR_BYTE_CLIENT))
-			printk(KERN_INFO "synaptics: failed to enable 4-byte guest protocol\n");
+	if (child) {
+		if (child->type >= PSMOUSE_GENPS)
+			priv->mode |= SYN_BIT_FOUR_BYTE_CLIENT;
+		else
+			priv->mode &= ~SYN_BIT_FOUR_BYTE_CLIENT;
+
+		if (synaptics_mode_cmd(psmouse, priv->mode))
+			printk(KERN_INFO "synaptics: failed to switch guest protocol\n");
 	}
 }
 
@@ -270,11 +291,11 @@
 	strlcpy(serio->name, "Synaptics pass-through", sizeof(serio->name));
 	strlcpy(serio->phys, "synaptics-pt/serio0", sizeof(serio->name));
 	serio->write = synaptics_pt_write;
-	serio->parent = psmouse->serio;
+	serio->parent = psmouse->ps2dev.serio;
 
 	psmouse->pt_activate = synaptics_pt_activate;
 
-	psmouse->serio->child = serio;
+	psmouse->ps2dev.serio->child = serio;
 }
 
 /*****************************************************************************
@@ -470,8 +491,8 @@
 			priv->pkt_type = synaptics_detect_pkt_type(psmouse);
 
 		if (SYN_CAP_PASS_THROUGH(priv->capabilities) && synaptics_is_pt_packet(psmouse->packet)) {
-			if (psmouse->serio->child)
-				synaptics_pass_pt_packet(psmouse->serio->child, psmouse->packet);
+			if (psmouse->ps2dev.serio->child)
+				synaptics_pass_pt_packet(psmouse->ps2dev.serio->child, psmouse->packet);
 		} else
 			synaptics_process_packet(psmouse);
 
@@ -537,7 +558,7 @@
 	struct synaptics_data *priv = psmouse->private;
 	struct synaptics_data old_priv = *priv;
 
-	if (!synaptics_detect(psmouse))
+	if (synaptics_detect(psmouse, 0))
 		return -1;
 
 	if (synaptics_query_hardware(psmouse)) {
@@ -551,7 +572,7 @@
 	    old_priv.ext_cap != priv->ext_cap)
 		return -1;
 
-	if (synaptics_set_mode(psmouse, 0)) {
+	if (synaptics_set_absolute_mode(psmouse)) {
 		printk(KERN_ERR "Unable to initialize Synaptics hardware.\n");
 		return -1;
 	}
@@ -559,19 +580,28 @@
 	return 0;
 }
 
-int synaptics_detect(struct psmouse *psmouse)
+int synaptics_detect(struct psmouse *psmouse, int set_properties)
 {
+	struct ps2dev *ps2dev = &psmouse->ps2dev;
 	unsigned char param[4];
 
 	param[0] = 0;
 
-	psmouse_command(psmouse, param, PSMOUSE_CMD_SETRES);
-	psmouse_command(psmouse, param, PSMOUSE_CMD_SETRES);
-	psmouse_command(psmouse, param, PSMOUSE_CMD_SETRES);
-	psmouse_command(psmouse, param, PSMOUSE_CMD_SETRES);
-	psmouse_command(psmouse, param, PSMOUSE_CMD_GETINFO);
+	ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES);
+	ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES);
+	ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES);
+	ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES);
+	ps2_command(ps2dev, param, PSMOUSE_CMD_GETINFO);
+
+	if (param[1] != 0x47)
+		return -1;
+
+	if (set_properties) {
+		psmouse->vendor = "Synaptics";
+		psmouse->name = "TouchPad";
+	}
 
-	return param[1] == 0x47;
+	return 0;
 }
 
 int synaptics_init(struct psmouse *psmouse)
@@ -588,7 +618,7 @@
 		goto init_fail;
 	}
 
-	if (synaptics_set_mode(psmouse, 0)) {
+	if (synaptics_set_absolute_mode(psmouse)) {
 		printk(KERN_ERR "Unable to initialize Synaptics hardware.\n");
 		goto init_fail;
 	}
@@ -602,8 +632,10 @@
 	set_input_params(&psmouse->dev, priv);
 
 	psmouse->protocol_handler = synaptics_process_byte;
+	psmouse->set_rate = synaptics_set_rate;
 	psmouse->disconnect = synaptics_disconnect;
 	psmouse->reconnect = synaptics_reconnect;
+	psmouse->pktsize = 6;
 
 	return 0;
 
diff -Nru a/drivers/input/mouse/synaptics.h b/drivers/input/mouse/synaptics.h
--- a/drivers/input/mouse/synaptics.h	2005-01-10 20:11:19 -08:00
+++ b/drivers/input/mouse/synaptics.h	2005-01-10 20:11:19 -08:00
@@ -9,7 +9,7 @@
 #ifndef _SYNAPTICS_H
 #define _SYNAPTICS_H
 
-extern int synaptics_detect(struct psmouse *psmouse);
+extern int synaptics_detect(struct psmouse *psmouse, int set_properties);
 extern int synaptics_init(struct psmouse *psmouse);
 extern void synaptics_reset(struct psmouse *psmouse);
 
@@ -104,6 +104,7 @@
 	/* Data for normal processing */
 	int old_w;				/* Previous w value */
 	unsigned char pkt_type;			/* packet type - old, new, etc */
+	unsigned char mode;			/* current mode byte */
 };
 
 #endif /* _SYNAPTICS_H */
diff -Nru a/drivers/input/mouse/vsxxxaa.c b/drivers/input/mouse/vsxxxaa.c
--- a/drivers/input/mouse/vsxxxaa.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/input/mouse/vsxxxaa.c	2005-01-10 20:11:23 -08:00
@@ -1,11 +1,14 @@
 /*
- * DEC VSXXX-AA and VSXXX-GA mouse driver.
+ * Driver for	DEC VSXXX-AA mouse (hockey-puck mouse, ball or two rollers)
+ * 		DEC VSXXX-GA mouse (rectangular mouse, with ball)
+ * 		DEC VSXXX-AB tablet (digitizer with hair cross or stylus)
  *
  * Copyright (C) 2003-2004 by Jan-Benedict Glaw <jbglaw@lug-owl.de>
  *
- * The packet format was taken from a patch to GPM which is (C) 2001
+ * The packet format was initially taken from a patch to GPM which is (C) 2001
  * by	Karsten Merker <merker@linuxtag.org>
  * and	Maciej W. Rozycki <macro@ds2.pg.gda.pl>
+ * Later on, I had access to the device's documentation (referenced below).
  */
 
 /*
@@ -25,7 +28,7 @@
  */
 
 /*
- * Building an adaptor to DB9 / DB25 RS232
+ * Building an adaptor to DE9 / DB25 RS232
  * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  *
  * DISCLAIMER: Use this description AT YOUR OWN RISK! I'll not pay for
@@ -42,8 +45,8 @@
  *  | 4 --- 3 |
  *   \  2 1  /
  *    -------
- * 
- *	DEC socket	DB9	DB25	Note
+ *
+ *	DEC socket	DE9	DB25	Note
  *	1 (GND)		5	7	-
  *	2 (RxD)		2	3	-
  *	3 (TxD)		3	2	-
@@ -82,7 +85,7 @@
 #include <linux/serio.h>
 #include <linux/init.h>
 
-#define DRIVER_DESC	"Serial DEC VSXXX-AA/GA mouse / DEC tablet driver"
+#define DRIVER_DESC "Driver for DEC VSXXX-AA and -GA mice and VSXXX-AB tablet"
 
 MODULE_AUTHOR ("Jan-Benedict Glaw <jbglaw@lug-owl.de>");
 MODULE_DESCRIPTION (DRIVER_DESC);
@@ -104,7 +107,7 @@
 #define VSXXXAA_PACKET_REL	0x80
 #define VSXXXAA_PACKET_ABS	0xc0
 #define VSXXXAA_PACKET_POR	0xa0
-#define MATCH_PACKET_TYPE(data, type)	(((data) & VSXXXAA_PACKET_MASK) == type)
+#define MATCH_PACKET_TYPE(data, type)	(((data) & VSXXXAA_PACKET_MASK) == (type))
 
 
 
@@ -150,7 +153,7 @@
 {
 	switch (mouse->type) {
 		case 0x02:
-			sprintf (mouse->name, "DEC VSXXX-AA/GA mouse");
+			sprintf (mouse->name, "DEC VSXXX-AA/-GA mouse");
 			break;
 
 		case 0x04:
@@ -158,7 +161,8 @@
 			break;
 
 		default:
-			sprintf (mouse->name, "unknown DEC pointer device");
+			sprintf (mouse->name, "unknown DEC pointer device "
+					"(type = 0x%02x)", mouse->type);
 			break;
 	}
 
@@ -336,13 +340,10 @@
 	 *
 	 * M: manufacturer location code
 	 * R: revision code
-	 * E: Error code. I'm not sure about these, but gpm's sources,
-	 *    which support this mouse, too, tell about them:
-	 *	E = [0x00 .. 0x1f]: no error, byte #3 is button state
-	 *	E = 0x3d: button error, byte #3 tells which one.
-	 *	E = <else>: other error
+	 * E: Error code. If it's in the range of 0x00..0x1f, only some
+	 *    minor problem occured. Errors >= 0x20 are considered bad
+	 *    and the device may not work properly...
 	 * D: <0010> == mouse, <0100> == tablet
-	 *
 	 */
 
 	mouse->version = buf[0] & 0x0f;
@@ -363,28 +364,32 @@
 	vsxxxaa_detection_done (mouse);
 
 	if (error <= 0x1f) {
-		/* No error. Report buttons */
+		/* No (serious) error. Report buttons */
 		input_regs (dev, regs);
 		input_report_key (dev, BTN_LEFT, left);
 		input_report_key (dev, BTN_MIDDLE, middle);
 		input_report_key (dev, BTN_RIGHT, right);
 		input_report_key (dev, BTN_TOUCH, 0);
 		input_sync (dev);
-	} else {
-		printk (KERN_ERR "Your %s on %s reports an undefined error, "
-				"please check it...\n", mouse->name,
-				mouse->phys);
+
+		if (error != 0)
+			printk (KERN_INFO "Your %s on %s reports error=0x%02x\n",
+					mouse->name, mouse->phys, error);
+
 	}
 
 	/*
 	 * If the mouse was hot-plugged, we need to force differential mode
 	 * now... However, give it a second to recover from it's reset.
 	 */
-	printk (KERN_NOTICE "%s on %s: Forceing standard packet format and "
-			"streaming mode\n", mouse->name, mouse->phys);
-	mouse->serio->write (mouse->serio, 'S');
+	printk (KERN_NOTICE "%s on %s: Forceing standard packet format, "
+			"incremental streaming mode and 72 samples/sec\n",
+			mouse->name, mouse->phys);
+	mouse->serio->write (mouse->serio, 'S');	/* Standard format */
+	mdelay (50);
+	mouse->serio->write (mouse->serio, 'R');	/* Incremental */
 	mdelay (50);
-	mouse->serio->write (mouse->serio, 'R');
+	mouse->serio->write (mouse->serio, 'L');	/* 72 samples/sec */
 }
 
 static void
@@ -519,11 +524,12 @@
 	mouse->dev.private = mouse;
 	serio->private = mouse;
 
-	sprintf (mouse->name, "DEC VSXXX-AA/GA mouse or VSXXX-AB digitizer");
+	sprintf (mouse->name, "DEC VSXXX-AA/-GA mouse or VSXXX-AB digitizer");
 	sprintf (mouse->phys, "%s/input0", serio->phys);
 	mouse->dev.name = mouse->name;
 	mouse->dev.phys = mouse->phys;
 	mouse->dev.id.bustype = BUS_RS232;
+	mouse->dev.dev = &serio->dev;
 	mouse->serio = serio;
 
 	if (serio_open (serio, drv)) {
diff -Nru a/drivers/input/mousedev.c b/drivers/input/mousedev.c
--- a/drivers/input/mousedev.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/input/mousedev.c	2005-01-10 20:11:22 -08:00
@@ -115,20 +115,26 @@
 #define fx(i)  (mousedev->old_x[(mousedev->pkt_count - (i)) & 03])
 #define fy(i)  (mousedev->old_y[(mousedev->pkt_count - (i)) & 03])
 
-static void mousedev_touchpad_event(struct mousedev *mousedev, unsigned int code, int value)
+static void mousedev_touchpad_event(struct input_dev *dev, struct mousedev *mousedev, unsigned int code, int value)
 {
+	int size;
+
 	if (mousedev->touch) {
 		switch (code) {
 			case ABS_X:
+				size = dev->absmax[ABS_X] - dev->absmin[ABS_X];
+				if (size == 0) size = xres;
 				fx(0) = value;
 				if (mousedev->pkt_count >= 2)
-					mousedev->packet.dx = ((fx(0) - fx(1)) / 2 + (fx(1) - fx(2)) / 2) / 8;
+					mousedev->packet.dx = ((fx(0) - fx(1)) / 2 + (fx(1) - fx(2)) / 2) * xres / (size * 2);
 				break;
 
 			case ABS_Y:
+				size = dev->absmax[ABS_Y] - dev->absmin[ABS_Y];
+				if (size == 0) size = yres;
 				fy(0) = value;
 				if (mousedev->pkt_count >= 2)
-					mousedev->packet.dy = -((fy(0) - fy(1)) / 2 + (fy(1) - fy(2)) / 2) / 8;
+					mousedev->packet.dy = -((fy(0) - fy(1)) / 2 + (fy(1) - fy(2)) / 2) * yres / (size * 2);
 				break;
 		}
 	}
@@ -279,7 +285,7 @@
 				return;
 
 			if (test_bit(BTN_TOOL_FINGER, handle->dev->keybit))
-				mousedev_touchpad_event(mousedev, code, value);
+				mousedev_touchpad_event(handle->dev, mousedev, code, value);
 			else
 				mousedev_abs_event(handle->dev, mousedev, code, value);
 
diff -Nru a/drivers/input/serio/Kconfig b/drivers/input/serio/Kconfig
--- a/drivers/input/serio/Kconfig	2005-01-10 20:11:19 -08:00
+++ b/drivers/input/serio/Kconfig	2005-01-10 20:11:19 -08:00
@@ -131,6 +131,16 @@
 	  To compile this driver as a module, choose M here: the
 	  module will be called maceps2.
 
+config SERIO_LIBPS2
+	tristate "PS/2 driver library" if EMBEDDED
+	depends on SERIO
+	help
+	  Say Y here if you are using a driver for device connected
+	  to a PS/2 port, such as PS/2 mouse or standard AT keyboard.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called libps2.
+
 config SERIO_RAW
 	tristate "Raw access to serio ports"
 	depends on SERIO
diff -Nru a/drivers/input/serio/Makefile b/drivers/input/serio/Makefile
--- a/drivers/input/serio/Makefile	2005-01-10 20:11:16 -08:00
+++ b/drivers/input/serio/Makefile	2005-01-10 20:11:16 -08:00
@@ -17,4 +17,5 @@
 obj-$(CONFIG_SERIO_GSCPS2)	+= gscps2.o
 obj-$(CONFIG_SERIO_PCIPS2)	+= pcips2.o
 obj-$(CONFIG_SERIO_MACEPS2)	+= maceps2.o
+obj-$(CONFIG_SERIO_LIBPS2)	+= libps2.o
 obj-$(CONFIG_SERIO_RAW)		+= serio_raw.o
diff -Nru a/drivers/input/serio/gscps2.c b/drivers/input/serio/gscps2.c
--- a/drivers/input/serio/gscps2.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/input/serio/gscps2.c	2005-01-10 20:11:23 -08:00
@@ -322,19 +322,6 @@
 	gscps2_enable(ps2port, DISABLE);
 }
 
-static struct serio gscps2_serio_port =
-{
-	.name =		"GSC PS/2",
-	.idbus =	BUS_GSC,
-	.idvendor =	PCI_VENDOR_ID_HP,
-	.idproduct =	0x0001,
-	.idversion =	0x0010,
-	.type =		SERIO_8042,
-	.write =	gscps2_write,
-	.open =		gscps2_open,
-	.close =	gscps2_close,
-};
-
 /**
  * gscps2_probe() - Probes PS2 devices
  * @return: success/error report
diff -Nru a/drivers/input/serio/i8042-io.h b/drivers/input/serio/i8042-io.h
--- a/drivers/input/serio/i8042-io.h	2005-01-10 20:11:15 -08:00
+++ b/drivers/input/serio/i8042-io.h	2005-01-10 20:11:15 -08:00
@@ -3,7 +3,7 @@
 
 /*
  * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 as published by 
+ * under the terms of the GNU General Public License version 2 as published by
  * the Free Software Foundation.
  */
 
@@ -22,9 +22,6 @@
 #ifdef __alpha__
 # define I8042_KBD_IRQ	1
 # define I8042_AUX_IRQ	(RTC_PORT(0) == 0x170 ? 9 : 12)	/* Jensen is special */
-#elif defined(__ia64__)
-# define I8042_KBD_IRQ isa_irq_to_vector(1)
-# define I8042_AUX_IRQ isa_irq_to_vector(12)
 #elif defined(__arm__)
 /* defined in include/asm-arm/arch-xxx/irqs.h */
 #include <asm/irq.h>
@@ -40,8 +37,8 @@
  * Register numbers.
  */
 
-#define I8042_COMMAND_REG	0x64	
-#define I8042_STATUS_REG	0x64	
+#define I8042_COMMAND_REG	0x64
+#define I8042_STATUS_REG	0x64
 #define I8042_DATA_REG		0x60
 
 static inline int i8042_read_data(void)
@@ -57,59 +54,25 @@
 static inline void i8042_write_data(int val)
 {
 	outb(val, I8042_DATA_REG);
-	return;
 }
 
 static inline void i8042_write_command(int val)
 {
 	outb(val, I8042_COMMAND_REG);
-	return;
 }
 
-#if defined(__i386__)
-
-#include <linux/dmi.h>
-
-static struct dmi_system_id __initdata i8042_dmi_table[] = {
-	{
-		.ident = "Compaq Proliant 8500",
-		.matches = {
-			DMI_MATCH(DMI_SYS_VENDOR, "Compaq"),
-			DMI_MATCH(DMI_PRODUCT_NAME , "ProLiant"),
-			DMI_MATCH(DMI_PRODUCT_VERSION, "8500"),
-		},
-	},
-	{
-		.ident = "Compaq Proliant DL760",
-		.matches = {
-			DMI_MATCH(DMI_SYS_VENDOR, "Compaq"),
-			DMI_MATCH(DMI_PRODUCT_NAME , "ProLiant"),
-			DMI_MATCH(DMI_PRODUCT_VERSION, "DL760"),
-		},
-	},
-	{ }
-};
-#endif
-
 static inline int i8042_platform_init(void)
 {
 /*
- * On ix86 platforms touching the i8042 data register region can do really
- * bad things. Because of this the region is always reserved on ix86 boxes.
+ * On some platforms touching the i8042 data register region can do really
+ * bad things. Because of this the region is always reserved on such boxes.
  */
-#if !defined(__i386__) && !defined(__sh__) && !defined(__alpha__) && !defined(__x86_64__) && !defined(__mips__) && !defined (CONFIG_PPC64)
+#if !defined(__sh__) && !defined(__alpha__) && !defined(__mips__) && !defined(CONFIG_PPC64)
 	if (!request_region(I8042_DATA_REG, 16, "i8042"))
 		return -1;
 #endif
 
-#if !defined(__i386__) && !defined(__x86_64__)
         i8042_reset = 1;
-#endif
-
-#if defined(__i386__)
-	if (dmi_check_system(i8042_dmi_table))
-		i8042_noloop = 1;
-#endif
 
 #if defined(CONFIG_PPC64)
 	if (check_legacy_ioport(I8042_DATA_REG))
@@ -122,7 +85,7 @@
 
 static inline void i8042_platform_exit(void)
 {
-#if !defined(__i386__) && !defined(__sh__) && !defined(__alpha__) && !defined(__x86_64__) && !defined(CONFIG_PPC64)
+#if !defined(__sh__) && !defined(__alpha__) && !defined(CONFIG_PPC64)
 	release_region(I8042_DATA_REG, 16);
 #endif
 }
diff -Nru a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/input/serio/i8042-x86ia64io.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,308 @@
+#ifndef _I8042_X86IA64IO_H
+#define _I8042_X86IA64IO_H
+
+/*
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published by
+ * the Free Software Foundation.
+ */
+
+/*
+ * Names.
+ */
+
+#define I8042_KBD_PHYS_DESC "isa0060/serio0"
+#define I8042_AUX_PHYS_DESC "isa0060/serio1"
+#define I8042_MUX_PHYS_DESC "isa0060/serio%d"
+
+/*
+ * IRQs.
+ */
+
+#if defined(__ia64__)
+# define I8042_MAP_IRQ(x)	isa_irq_to_vector((x))
+#else
+# define I8042_MAP_IRQ(x)	(x)
+#endif
+
+#define I8042_KBD_IRQ	i8042_kbd_irq
+#define I8042_AUX_IRQ	i8042_aux_irq
+
+static int i8042_kbd_irq;
+static int i8042_aux_irq;
+
+/*
+ * Register numbers.
+ */
+
+#define I8042_COMMAND_REG	i8042_command_reg
+#define I8042_STATUS_REG	i8042_command_reg
+#define I8042_DATA_REG		i8042_data_reg
+
+static int i8042_command_reg = 0x64;
+static int i8042_data_reg = 0x60;
+
+
+static inline int i8042_read_data(void)
+{
+	return inb(I8042_DATA_REG);
+}
+
+static inline int i8042_read_status(void)
+{
+	return inb(I8042_STATUS_REG);
+}
+
+static inline void i8042_write_data(int val)
+{
+	outb(val, I8042_DATA_REG);
+}
+
+static inline void i8042_write_command(int val)
+{
+	outb(val, I8042_COMMAND_REG);
+}
+
+#if defined(__i386__)
+
+#include <linux/dmi.h>
+
+static struct dmi_system_id __initdata i8042_dmi_table[] = {
+	{
+		.ident = "Compaq Proliant 8500",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Compaq"),
+			DMI_MATCH(DMI_PRODUCT_NAME , "ProLiant"),
+			DMI_MATCH(DMI_PRODUCT_VERSION, "8500"),
+		},
+	},
+	{
+		.ident = "Compaq Proliant DL760",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Compaq"),
+			DMI_MATCH(DMI_PRODUCT_NAME , "ProLiant"),
+			DMI_MATCH(DMI_PRODUCT_VERSION, "DL760"),
+		},
+	},
+	{ }
+};
+#endif
+
+#ifdef CONFIG_ACPI
+#include <linux/acpi.h>
+#include <acpi/acpi_bus.h>
+
+struct i8042_acpi_resources {
+	unsigned int port1;
+	unsigned int port2;
+	unsigned int irq;
+};
+
+static int i8042_acpi_kbd_registered;
+static int i8042_acpi_aux_registered;
+
+static acpi_status i8042_acpi_parse_resource(struct acpi_resource *res, void *data)
+{
+	struct i8042_acpi_resources *i8042_res = data;
+	struct acpi_resource_io *io;
+	struct acpi_resource_fixed_io *fixed_io;
+	struct acpi_resource_irq *irq;
+	struct acpi_resource_ext_irq *ext_irq;
+
+	switch (res->id) {
+		case ACPI_RSTYPE_IO:
+			io = &res->data.io;
+			if (io->range_length) {
+				if (!i8042_res->port1)
+					i8042_res->port1 = io->min_base_address;
+				else
+					i8042_res->port2 = io->min_base_address;
+			}
+			break;
+
+		case ACPI_RSTYPE_FIXED_IO:
+			fixed_io = &res->data.fixed_io;
+			if (fixed_io->range_length) {
+				if (!i8042_res->port1)
+					i8042_res->port1 = fixed_io->base_address;
+				else
+					i8042_res->port2 = fixed_io->base_address;
+			}
+			break;
+
+		case ACPI_RSTYPE_IRQ:
+			irq = &res->data.irq;
+			if (irq->number_of_interrupts > 0)
+				i8042_res->irq =
+					acpi_register_gsi(irq->interrupts[0],
+							  irq->edge_level,
+							  irq->active_high_low);
+			break;
+
+		case ACPI_RSTYPE_EXT_IRQ:
+			ext_irq = &res->data.extended_irq;
+			if (ext_irq->number_of_interrupts > 0)
+				i8042_res->irq =
+					acpi_register_gsi(ext_irq->interrupts[0],
+							  ext_irq->edge_level,
+							  ext_irq->active_high_low);
+			break;
+	}
+	return AE_OK;
+}
+
+static int i8042_acpi_kbd_add(struct acpi_device *device)
+{
+	struct i8042_acpi_resources kbd_res;
+	acpi_status status;
+
+	memset(&kbd_res, 0, sizeof(kbd_res));
+	status = acpi_walk_resources(device->handle, METHOD_NAME__CRS,
+				     i8042_acpi_parse_resource, &kbd_res);
+	if (ACPI_FAILURE(status))
+		return -ENODEV;
+
+	if (kbd_res.port1)
+		i8042_data_reg = kbd_res.port1;
+	else
+		printk(KERN_WARNING "ACPI: [%s] has no data port; default is 0x%x\n",
+			acpi_device_bid(device), i8042_data_reg);
+
+	if (kbd_res.port2)
+		i8042_command_reg = kbd_res.port2;
+	else
+		printk(KERN_WARNING "ACPI: [%s] has no command port; default is 0x%x\n",
+			acpi_device_bid(device), i8042_command_reg);
+
+	if (kbd_res.irq)
+		i8042_kbd_irq = kbd_res.irq;
+	else
+		printk(KERN_WARNING "ACPI: [%s] has no IRQ; default is %d\n",
+			acpi_device_bid(device), i8042_kbd_irq);
+
+	strncpy(acpi_device_name(device), "PS/2 Keyboard Controller",
+		sizeof(acpi_device_name(device)));
+	printk("ACPI: %s [%s] at I/O 0x%x, 0x%x, irq %d\n",
+		acpi_device_name(device), acpi_device_bid(device),
+		i8042_data_reg, i8042_command_reg, i8042_kbd_irq);
+
+	return 0;
+}
+
+static int i8042_acpi_aux_add(struct acpi_device *device)
+{
+	struct i8042_acpi_resources aux_res;
+	acpi_status status;
+
+	memset(&aux_res, 0, sizeof(aux_res));
+	status = acpi_walk_resources(device->handle, METHOD_NAME__CRS,
+				     i8042_acpi_parse_resource, &aux_res);
+	if (ACPI_FAILURE(status))
+		return -ENODEV;
+
+	if (aux_res.irq)
+		i8042_aux_irq = aux_res.irq;
+	else
+		printk(KERN_WARNING "ACPI: [%s] has no IRQ; default is %d\n",
+			acpi_device_bid(device), i8042_aux_irq);
+
+	strncpy(acpi_device_name(device), "PS/2 Mouse Controller",
+		sizeof(acpi_device_name(device)));
+	printk("ACPI: %s [%s] at irq %d\n",
+		acpi_device_name(device), acpi_device_bid(device), i8042_aux_irq);
+
+	return 0;
+}
+
+static struct acpi_driver i8042_acpi_kbd_driver = {
+	.name		= "i8042",
+	.ids		= "PNP0303,PNP030B",
+	.ops		= {
+		.add		= i8042_acpi_kbd_add,
+	},
+};
+
+static struct acpi_driver i8042_acpi_aux_driver = {
+	.name		= "i8042",
+	.ids		= "PNP0F13,SYN0801",
+	.ops		= {
+		.add		= i8042_acpi_aux_add,
+	},
+};
+
+static int i8042_acpi_init(void)
+{
+	int result;
+
+	if (acpi_disabled || i8042_noacpi) {
+		printk("i8042: ACPI detection disabled\n");
+		return 0;
+	}
+
+	result = acpi_bus_register_driver(&i8042_acpi_kbd_driver);
+	if (result < 0)
+		return result;
+
+	if (result == 0) {
+		acpi_bus_unregister_driver(&i8042_acpi_kbd_driver);
+		return -ENODEV;
+	}
+	i8042_acpi_kbd_registered = 1;
+
+	result = acpi_bus_register_driver(&i8042_acpi_aux_driver);
+	if (result >= 0)
+		i8042_acpi_aux_registered = 1;
+	if (result == 0)
+		i8042_noaux = 1;
+
+	return 0;
+}
+
+static void i8042_acpi_exit(void)
+{
+	if (i8042_acpi_kbd_registered)
+		acpi_bus_unregister_driver(&i8042_acpi_kbd_driver);
+
+	if (i8042_acpi_aux_registered)
+		acpi_bus_unregister_driver(&i8042_acpi_aux_driver);
+}
+#endif
+
+static inline int i8042_platform_init(void)
+{
+/*
+ * On ix86 platforms touching the i8042 data register region can do really
+ * bad things. Because of this the region is always reserved on ix86 boxes.
+ *
+ *	if (!request_region(I8042_DATA_REG, 16, "i8042"))
+ *		return -1;
+ */
+
+	i8042_kbd_irq = I8042_MAP_IRQ(1);
+	i8042_aux_irq = I8042_MAP_IRQ(12);
+
+#ifdef CONFIG_ACPI
+	if (i8042_acpi_init())
+		return -1;
+#endif
+
+#if defined(__ia64__)
+        i8042_reset = 1;
+#endif
+
+#if defined(__i386__)
+	if (dmi_check_system(i8042_dmi_table))
+		i8042_noloop = 1;
+#endif
+
+	return 0;
+}
+
+static inline void i8042_platform_exit(void)
+{
+#ifdef CONFIG_ACPI
+	i8042_acpi_exit();
+#endif
+}
+
+#endif /* _I8042_X86IA64IO_H */
diff -Nru a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
--- a/drivers/input/serio/i8042.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/input/serio/i8042.c	2005-01-10 20:11:16 -08:00
@@ -16,10 +16,7 @@
 #include <linux/interrupt.h>
 #include <linux/ioport.h>
 #include <linux/config.h>
-#include <linux/reboot.h>
 #include <linux/init.h>
-#include <linux/sysdev.h>
-#include <linux/pm.h>
 #include <linux/serio.h>
 #include <linux/err.h>
 
@@ -57,6 +54,19 @@
 module_param_named(noloop, i8042_noloop, bool, 0);
 MODULE_PARM_DESC(dumbkbd, "Disable the AUX Loopback command while probing for the AUX port");
 
+#ifdef CONFIG_ACPI
+static int i8042_noacpi;
+module_param_named(noacpi, i8042_noacpi, bool, 0);
+MODULE_PARM_DESC(noacpi, "Do not use ACPI to detect controller settings");
+#endif
+
+#define DEBUG
+#ifdef DEBUG
+static int i8042_debug;
+module_param_named(debug, i8042_debug, bool, 0600);
+MODULE_PARM_DESC(debug, "Turn i8042 debugging mode on and off");
+#endif
+
 __obsolete_setup("i8042_noaux");
 __obsolete_setup("i8042_nomux");
 __obsolete_setup("i8042_unlock");
@@ -64,7 +74,6 @@
 __obsolete_setup("i8042_direct");
 __obsolete_setup("i8042_dumbkbd");
 
-#undef DEBUG
 #include "i8042.h"
 
 spinlock_t i8042_lock = SPIN_LOCK_UNLOCKED;
@@ -101,7 +110,6 @@
 static unsigned char i8042_ctr;
 static unsigned char i8042_mux_open;
 static unsigned char i8042_mux_present;
-static struct pm_dev *i8042_pm_dev;
 static struct timer_list i8042_timer;
 static struct platform_device *i8042_platform_device;
 
@@ -852,10 +860,12 @@
  * Here we try to restore the original BIOS settings
  */
 
-static int i8042_controller_suspend(void)
+static int i8042_suspend(struct device *dev, u32 state, u32 level)
 {
-	del_timer_sync(&i8042_timer);
-	i8042_controller_reset();
+	if (level == SUSPEND_DISABLE) {
+		del_timer_sync(&i8042_timer);
+		i8042_controller_reset();
+	}
 
 	return 0;
 }
@@ -865,10 +875,13 @@
  * Here we try to reset everything back to a state in which suspended
  */
 
-static int i8042_controller_resume(void)
+static int i8042_resume(struct device *dev, u32 level)
 {
 	int i;
 
+	if (level != RESUME_ENABLE)
+		return 0;
+
 	if (i8042_controller_init()) {
 		printk(KERN_ERR "i8042: resume failed\n");
 		return -1;
@@ -901,42 +914,14 @@
 	panic_blink = i8042_panic_blink;
 
 	return 0;
-}
 
+}
 
 /*
  * We need to reset the 8042 back to original mode on system shutdown,
  * because otherwise BIOSes will be confused.
  */
 
-static int i8042_notify_sys(struct notifier_block *this, unsigned long code,
-        		    void *unused)
-{
-        if (code == SYS_DOWN || code == SYS_HALT)
-        	i8042_controller_cleanup();
-        return NOTIFY_DONE;
-}
-
-static struct notifier_block i8042_notifier =
-{
-        i8042_notify_sys,
-        NULL,
-        0
-};
-
-/*
- * Suspend/resume handlers for the new PM scheme (driver model)
- */
-static int i8042_suspend(struct device *dev, u32 state, u32 level)
-{
-	return level == SUSPEND_DISABLE ? i8042_controller_suspend() : 0;
-}
-
-static int i8042_resume(struct device *dev, u32 level)
-{
-	return level == RESUME_ENABLE ? i8042_controller_resume() : 0;
-}
-
 static void i8042_shutdown(struct device *dev)
 {
 	i8042_controller_cleanup();
@@ -950,22 +935,6 @@
 	.shutdown	= i8042_shutdown,
 };
 
-/*
- * Suspend/resume handler for the old PM scheme (APM)
- */
-static int i8042_pm_callback(struct pm_dev *dev, pm_request_t request, void *dummy)
-{
-	switch (request) {
-		case PM_SUSPEND:
-			return i8042_controller_suspend();
-
-		case PM_RESUME:
-			return i8042_controller_resume();
-	}
-
-	return 0;
-}
-
 static struct serio * __init i8042_allocate_kbd_port(void)
 {
 	struct serio *serio;
@@ -1080,21 +1049,12 @@
 
 	mod_timer(&i8042_timer, jiffies + I8042_POLL_PERIOD);
 
-	i8042_pm_dev = pm_register(PM_SYS_DEV, PM_SYS_UNKNOWN, i8042_pm_callback);
-
-	register_reboot_notifier(&i8042_notifier);
-
 	return 0;
 }
 
 void __exit i8042_exit(void)
 {
 	int i;
-
-	unregister_reboot_notifier(&i8042_notifier);
-
-	if (i8042_pm_dev)
-		pm_unregister(i8042_pm_dev);
 
 	i8042_controller_cleanup();
 
diff -Nru a/drivers/input/serio/i8042.h b/drivers/input/serio/i8042.h
--- a/drivers/input/serio/i8042.h	2005-01-10 20:11:21 -08:00
+++ b/drivers/input/serio/i8042.h	2005-01-10 20:11:21 -08:00
@@ -23,6 +23,8 @@
 #include "i8042-ppcio.h"
 #elif defined(CONFIG_SPARC32) || defined(CONFIG_SPARC64)
 #include "i8042-sparcio.h"
+#elif defined(CONFIG_X86) || defined(CONFIG_IA64)
+#include "i8042-x86ia64io.h"
 #else
 #include "i8042-io.h"
 #endif
@@ -117,8 +119,12 @@
 #ifdef DEBUG
 static unsigned long i8042_start;
 #define dbg_init() do { i8042_start = jiffies; } while (0)
-#define dbg(format, arg...) printk(KERN_DEBUG __FILE__ ": " format " [%d]\n" ,\
-	 ## arg, (int) (jiffies - i8042_start))
+#define dbg(format, arg...) 							\
+	do { 									\
+		if (i8042_debug)						\
+			printk(KERN_DEBUG __FILE__ ": " format " [%d]\n" ,	\
+	 			## arg, (int) (jiffies - i8042_start));		\
+	} while (0)
 #else
 #define dbg_init() do { } while (0)
 #define dbg(format, arg...) do {} while (0)
diff -Nru a/drivers/input/serio/libps2.c b/drivers/input/serio/libps2.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/input/serio/libps2.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,295 @@
+/*
+ * PS/2 driver library
+ *
+ * Copyright (c) 1999-2002 Vojtech Pavlik
+ * Copyright (c) 2004 Dmitry Torokhov
+ */
+
+/*
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published by
+ * the Free Software Foundation.
+ */
+
+#include <linux/delay.h>
+#include <linux/module.h>
+#include <linux/moduleparam.h>
+#include <linux/slab.h>
+#include <linux/interrupt.h>
+#include <linux/input.h>
+#include <linux/serio.h>
+#include <linux/init.h>
+#include <linux/libps2.h>
+
+#define DRIVER_DESC	"PS/2 driver library"
+
+MODULE_AUTHOR("Dmitry Torokhov <dtor@mail.ru>");
+MODULE_DESCRIPTION("PS/2 driver library");
+MODULE_LICENSE("GPL");
+
+EXPORT_SYMBOL(ps2_init);
+EXPORT_SYMBOL(ps2_sendbyte);
+EXPORT_SYMBOL(ps2_command);
+EXPORT_SYMBOL(ps2_schedule_command);
+EXPORT_SYMBOL(ps2_handle_ack);
+EXPORT_SYMBOL(ps2_handle_response);
+EXPORT_SYMBOL(ps2_cmd_aborted);
+
+/* Work structure to schedule execution of a command */
+struct ps2work {
+	struct work_struct work;
+	struct ps2dev *ps2dev;
+	int command;
+	unsigned char param[0];
+};
+
+
+/*
+ * ps2_sendbyte() sends a byte to the mouse, and waits for acknowledge.
+ * It doesn't handle retransmission, though it could - because when there would
+ * be need for retransmissions, the mouse has to be replaced anyway.
+ *
+ * ps2_sendbyte() can only be called from a process context
+ */
+
+int ps2_sendbyte(struct ps2dev *ps2dev, unsigned char byte, int timeout)
+{
+	serio_pause_rx(ps2dev->serio);
+	ps2dev->nak = 1;
+	ps2dev->flags |= PS2_FLAG_ACK;
+	serio_continue_rx(ps2dev->serio);
+
+	if (serio_write(ps2dev->serio, byte) == 0)
+		wait_event_interruptible_timeout(ps2dev->wait,
+					!(ps2dev->flags & PS2_FLAG_ACK),
+					msecs_to_jiffies(timeout));
+
+	serio_pause_rx(ps2dev->serio);
+	ps2dev->flags &= ~PS2_FLAG_ACK;
+	serio_continue_rx(ps2dev->serio);
+
+	return -ps2dev->nak;
+}
+
+/*
+ * ps2_command() sends a command and its parameters to the mouse,
+ * then waits for the response and puts it in the param array.
+ *
+ * ps2_command() can only be called from a process context
+ */
+
+int ps2_command(struct ps2dev *ps2dev, unsigned char *param, int command)
+{
+	int timeout;
+	int send = (command >> 12) & 0xf;
+	int receive = (command >> 8) & 0xf;
+	int rc = -1;
+	int i;
+
+	down(&ps2dev->cmd_sem);
+
+	serio_pause_rx(ps2dev->serio);
+	ps2dev->flags = command == PS2_CMD_GETID ? PS2_FLAG_WAITID : 0;
+	ps2dev->cmdcnt = receive;
+	if (receive && param)
+		for (i = 0; i < receive; i++)
+			ps2dev->cmdbuf[(receive - 1) - i] = param[i];
+	serio_continue_rx(ps2dev->serio);
+
+	/*
+	 * Some devices (Synaptics) peform the reset before
+	 * ACKing the reset command, and so it can take a long
+	 * time before the ACK arrrives.
+	 */
+	if (command & 0xff)
+		if (ps2_sendbyte(ps2dev, command & 0xff,
+			command == PS2_CMD_RESET_BAT ? 1000 : 200))
+			goto out;
+
+	for (i = 0; i < send; i++)
+		if (ps2_sendbyte(ps2dev, param[i], 200))
+			goto out;
+
+	/*
+	 * The reset command takes a long time to execute.
+	 */
+	timeout = msecs_to_jiffies(command == PS2_CMD_RESET_BAT ? 4000 : 500);
+
+	wait_event_interruptible_timeout(ps2dev->wait,
+		!(ps2dev->flags & PS2_FLAG_CMD1), timeout);
+
+	if (ps2dev->cmdcnt && timeout > 0) {
+
+		if (command == PS2_CMD_RESET_BAT && timeout > msecs_to_jiffies(100)) {
+			/*
+			 * Device has sent the first response byte
+			 * after a reset command, reset is thus done,
+			 * shorten the timeout. The next byte will come
+			 * soon (keyboard) or not at all (mouse).
+			 */
+			timeout = msecs_to_jiffies(100);
+		}
+
+		if (command == PS2_CMD_GETID &&
+		    ps2dev->cmdbuf[receive - 1] != 0xab && /* Regular keyboards */
+		    ps2dev->cmdbuf[receive - 1] != 0xac && /* NCD Sun keyboard */
+		    ps2dev->cmdbuf[receive - 1] != 0x2b && /* Trust keyboard, translated */
+		    ps2dev->cmdbuf[receive - 1] != 0x5d && /* Trust keyboard */
+		    ps2dev->cmdbuf[receive - 1] != 0x60 && /* NMB SGI keyboard, translated */
+		    ps2dev->cmdbuf[receive - 1] != 0x47) { /* NMB SGI keyboard */
+			/*
+			 * Device behind the port is not a keyboard
+			 * so we don't need to wait for the 2nd byte
+			 * of ID response.
+			 */
+			serio_pause_rx(ps2dev->serio);
+			ps2dev->flags = ps2dev->cmdcnt = 0;
+			serio_continue_rx(ps2dev->serio);
+		}
+
+		wait_event_interruptible_timeout(ps2dev->wait,
+				!(ps2dev->flags & PS2_FLAG_CMD), timeout);
+	}
+
+	if (param)
+		for (i = 0; i < receive; i++)
+			param[i] = ps2dev->cmdbuf[(receive - 1) - i];
+
+	if (ps2dev->cmdcnt && (command != PS2_CMD_RESET_BAT || ps2dev->cmdcnt != 1))
+		goto out;
+
+	rc = 0;
+
+out:
+	serio_pause_rx(ps2dev->serio);
+	ps2dev->flags = 0;
+	serio_continue_rx(ps2dev->serio);
+
+	up(&ps2dev->cmd_sem);
+	return rc;
+}
+
+/*
+ * ps2_execute_scheduled_command() sends a command, previously scheduled by
+ * ps2_schedule_command(), to a PS/2 device (keyboard, mouse, etc.)
+ */
+
+static void ps2_execute_scheduled_command(void *data)
+{
+	struct ps2work *ps2work = data;
+
+	ps2_command(ps2work->ps2dev, ps2work->param, ps2work->command);
+	kfree(ps2work);
+}
+
+/*
+ * ps2_schedule_command() allows to schedule delayed execution of a PS/2
+ * command and can be used to issue a command from an interrupt or softirq
+ * context.
+ */
+
+int ps2_schedule_command(struct ps2dev *ps2dev, unsigned char *param, int command)
+{
+	struct ps2work *ps2work;
+	int send = (command >> 12) & 0xf;
+	int receive = (command >> 8) & 0xf;
+
+	if (!(ps2work = kmalloc(sizeof(struct ps2work) + max(send, receive), GFP_ATOMIC)))
+		return -1;
+
+	memset(ps2work, 0, sizeof(struct ps2work));
+	ps2work->ps2dev = ps2dev;
+	ps2work->command = command;
+	memcpy(ps2work->param, param, send);
+	INIT_WORK(&ps2work->work, ps2_execute_scheduled_command, ps2work);
+
+	if (!schedule_work(&ps2work->work)) {
+		kfree(ps2work);
+		return -1;
+	}
+
+	return 0;
+}
+
+/*
+ * ps2_init() initializes ps2dev structure
+ */
+
+void ps2_init(struct ps2dev *ps2dev, struct serio *serio)
+{
+	init_MUTEX(&ps2dev->cmd_sem);
+	init_waitqueue_head(&ps2dev->wait);
+	ps2dev->serio = serio;
+}
+
+/*
+ * ps2_handle_ack()
+ */
+
+int ps2_handle_ack(struct ps2dev *ps2dev, unsigned char data)
+{
+	switch (data) {
+		case PS2_RET_ACK:
+			ps2dev->nak = 0;
+			break;
+
+		case PS2_RET_NAK:
+			ps2dev->nak = 1;
+			break;
+
+		/*
+		 * Workaround for mice which don't ACK the Get ID command.
+		 * These are valid mouse IDs that we recognize.
+		 */
+		case 0x00:
+		case 0x03:
+		case 0x04:
+			if (ps2dev->flags & PS2_FLAG_WAITID) {
+				ps2dev->nak = 0;
+				break;
+			}
+			/* Fall through */
+		default:
+			return 1;
+	}
+
+	if (!ps2dev->nak && ps2dev->cmdcnt)
+		ps2dev->flags |= PS2_FLAG_CMD | PS2_FLAG_CMD1;
+
+	ps2dev->flags &= ~PS2_FLAG_ACK;
+	wake_up_interruptible(&ps2dev->wait);
+
+	return data == PS2_RET_ACK || data == PS2_RET_NAK;
+}
+
+
+int ps2_handle_response(struct ps2dev *ps2dev, unsigned char data)
+{
+	if (ps2dev->cmdcnt)
+		ps2dev->cmdbuf[--ps2dev->cmdcnt] = data;
+
+	if (ps2dev->flags & PS2_FLAG_CMD1) {
+		ps2dev->flags &= ~PS2_FLAG_CMD1;
+		if (ps2dev->cmdcnt)
+			wake_up_interruptible(&ps2dev->wait);
+	}
+
+	if (!ps2dev->cmdcnt) {
+		ps2dev->flags &= ~PS2_FLAG_CMD;
+		wake_up_interruptible(&ps2dev->wait);
+	}
+
+	return 1;
+}
+
+void ps2_cmd_aborted(struct ps2dev *ps2dev)
+{
+	if (ps2dev->flags & PS2_FLAG_ACK)
+		ps2dev->nak = 1;
+
+	if (ps2dev->flags & (PS2_FLAG_ACK | PS2_FLAG_CMD))
+		wake_up_interruptible(&ps2dev->wait);
+
+	ps2dev->flags = 0;
+}
+
diff -Nru a/drivers/input/serio/maceps2.c b/drivers/input/serio/maceps2.c
--- a/drivers/input/serio/maceps2.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/input/serio/maceps2.c	2005-01-10 20:11:18 -08:00
@@ -90,7 +90,7 @@
 {
 	struct maceps2_data *data = (struct maceps2_data *)dev->port_data;
 
-	if (request_irq(data->irq, maceps2_interrupt, 0, "PS/2 port", dev)) {
+	if (request_irq(data->irq, maceps2_interrupt, 0, "PS2 port", dev)) {
 		printk(KERN_ERR "Could not allocate PS/2 IRQ\n");
 		return -EBUSY;
 	}
diff -Nru a/drivers/input/serio/parkbd.c b/drivers/input/serio/parkbd.c
--- a/drivers/input/serio/parkbd.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/input/serio/parkbd.c	2005-01-10 20:11:16 -08:00
@@ -37,15 +37,17 @@
 MODULE_DESCRIPTION("Parallel port to Keyboard port adapter driver");
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(parkbd, "1i");
-MODULE_PARM(parkbd_mode, "1i");
+static unsigned int parkbd_pp_no;
+module_param_named(port, parkbd_pp_no, int, 0);
+MODULE_PARM_DESC(port, "Parallel port the adapter is connected to (default is 0)");
+
+static unsigned int parkbd_mode = SERIO_8042;
+module_param_named(mode, parkbd_mode, uint, 0);
+MODULE_PARM_DESC(mode, "Mode of operation: XT = 0/AT = 1 (default)");
 
 #define PARKBD_CLOCK	0x01	/* Strobe & Ack */
 #define PARKBD_DATA	0x02	/* AutoFd & Busy */
 
-static int parkbd;
-static int parkbd_mode = SERIO_8042;
-
 static int parkbd_buffer;
 static int parkbd_counter;
 static unsigned long parkbd_last;
@@ -126,12 +128,7 @@
 {
 	struct parport *pp;
 
-	if (parkbd < 0) {
-		printk(KERN_ERR "parkbd: no port specified\n");
-		return -ENODEV;
-	}
-
-	pp = parport_find_number(parkbd);
+	pp = parport_find_number(parkbd_pp_no);
 
 	if (pp == NULL) {
 		printk(KERN_ERR "parkbd: no such parport\n");
diff -Nru a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c
--- a/drivers/input/serio/serio.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/input/serio/serio.c	2005-01-10 20:11:15 -08:00
@@ -321,6 +321,7 @@
 	try_module_get(THIS_MODULE);
 
 	spin_lock_init(&serio->lock);
+	init_MUTEX(&serio->drv_sem);
 	list_add_tail(&serio->node, &serio_list);
 	snprintf(serio->dev.bus_id, sizeof(serio->dev.bus_id), "serio%d", serio_no++);
 	serio->dev.bus = &serio_bus;
@@ -590,17 +591,22 @@
 	up(&serio_sem);
 }
 
-/* called from serio_driver->connect/disconnect methods under serio_sem */
-int serio_open(struct serio *serio, struct serio_driver *drv)
+static void serio_set_drv(struct serio *serio, struct serio_driver *drv)
 {
+	down(&serio->drv_sem);
 	serio_pause_rx(serio);
 	serio->drv = drv;
 	serio_continue_rx(serio);
+	up(&serio->drv_sem);
+}
+
+/* called from serio_driver->connect/disconnect methods under serio_sem */
+int serio_open(struct serio *serio, struct serio_driver *drv)
+{
+	serio_set_drv(serio, drv);
 
 	if (serio->open && serio->open(serio)) {
-		serio_pause_rx(serio);
-		serio->drv = NULL;
-		serio_continue_rx(serio);
+		serio_set_drv(serio, NULL);
 		return -1;
 	}
 	return 0;
@@ -612,9 +618,7 @@
 	if (serio->close)
 		serio->close(serio);
 
-	serio_pause_rx(serio);
-	serio->drv = NULL;
-	serio_continue_rx(serio);
+	serio_set_drv(serio, NULL);
 }
 
 irqreturn_t serio_interrupt(struct serio *serio,
diff -Nru a/drivers/input/touchscreen/h3600_ts_input.c b/drivers/input/touchscreen/h3600_ts_input.c
--- a/drivers/input/touchscreen/h3600_ts_input.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/input/touchscreen/h3600_ts_input.c	2005-01-10 20:11:22 -08:00
@@ -100,6 +100,7 @@
  */
 struct h3600_dev {
 	struct input_dev dev;
+	struct pm_dev *pm_dev;
 	struct serio *serio;
 	unsigned char event;	/* event ID from packet */
 	unsigned char chksum;
@@ -452,8 +453,8 @@
 
 	//h3600_flite_control(1, 25);     /* default brightness */
 #ifdef CONFIG_PM
-	ts->dev.pm_dev = pm_register(PM_ILLUMINATION_DEV, PM_SYS_LIGHT,
-					h3600ts_pm_callback);
+	ts->pm_dev = pm_register(PM_ILLUMINATION_DEV, PM_SYS_LIGHT,
+				h3600ts_pm_callback);
 	printk("registered pm callback\n");
 #endif
 	input_register_device(&ts->dev);
diff -Nru a/drivers/isdn/act2000/module.c b/drivers/isdn/act2000/module.c
--- a/drivers/isdn/act2000/module.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/isdn/act2000/module.c	2005-01-10 20:11:21 -08:00
@@ -40,10 +40,10 @@
 MODULE_PARM_DESC(membase, "Base port address of first card");
 MODULE_PARM_DESC(act_irq, "IRQ of first card");
 MODULE_PARM_DESC(act_id,  "ID-String of first card");
-MODULE_PARM(act_bus,  "i");
-MODULE_PARM(act_port, "i");
-MODULE_PARM(act_irq,  "i");
-MODULE_PARM(act_id,   "s");
+module_param(act_bus,  int, 0);
+module_param(act_port, int, 0);
+module_param(act_irq, int, 0);
+module_param(act_id, charp, 0);
 
 static int act2000_addcard(int, int, int, char *);
 
diff -Nru a/drivers/isdn/capi/capifs.c b/drivers/isdn/capi/capifs.c
--- a/drivers/isdn/capi/capifs.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/isdn/capi/capifs.c	2005-01-10 20:11:17 -08:00
@@ -93,6 +93,7 @@
 	s->s_blocksize_bits = 10;
 	s->s_magic = CAPIFS_SUPER_MAGIC;
 	s->s_op = &capifs_sops;
+	s->s_time_gran = 1;
 
 	inode = new_inode(s);
 	if (!inode)
diff -Nru a/drivers/isdn/hardware/avm/b1pcmcia.c b/drivers/isdn/hardware/avm/b1pcmcia.c
--- a/drivers/isdn/hardware/avm/b1pcmcia.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/isdn/hardware/avm/b1pcmcia.c	2005-01-10 20:11:15 -08:00
@@ -200,7 +200,6 @@
 {
 	char *p;
 	char rev[32];
-	int err;
 
 	if ((p = strchr(revision, ':')) != 0 && p[1]) {
 		strlcpy(rev, p + 2, 32);
diff -Nru a/drivers/isdn/hardware/eicon/divamnt.c b/drivers/isdn/hardware/eicon/divamnt.c
--- a/drivers/isdn/hardware/eicon/divamnt.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/isdn/hardware/eicon/divamnt.c	2005-01-10 20:11:19 -08:00
@@ -34,9 +34,9 @@
 MODULE_LICENSE("GPL");
 
 int buffer_length = 128;
-MODULE_PARM(buffer_length, "i");
+module_param(buffer_length, int, 0);
 unsigned long diva_dbg_mem = 0;
-MODULE_PARM(diva_dbg_mem, "l");
+module_param(diva_dbg_mem, ulong, 0);
 
 static char *DRIVERNAME =
     "Eicon DIVA - MAINT module (http://www.melware.net)";
diff -Nru a/drivers/isdn/hardware/eicon/divasmain.c b/drivers/isdn/hardware/eicon/divasmain.c
--- a/drivers/isdn/hardware/eicon/divasmain.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/isdn/hardware/eicon/divasmain.c	2005-01-10 20:11:16 -08:00
@@ -51,7 +51,7 @@
 MODULE_AUTHOR("Cytronics & Melware, Eicon Networks");
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(dbgmask, "i");
+module_param(dbgmask, int, 0);
 MODULE_PARM_DESC(dbgmask, "initial debug mask");
 
 static char *DRIVERNAME =
diff -Nru a/drivers/isdn/hisax/avma1_cs.c b/drivers/isdn/hisax/avma1_cs.c
--- a/drivers/isdn/hisax/avma1_cs.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/isdn/hisax/avma1_cs.c	2005-01-10 20:11:20 -08:00
@@ -41,7 +41,7 @@
 */
 #ifdef PCMCIA_DEBUG
 static int pc_debug = PCMCIA_DEBUG;
-MODULE_PARM(pc_debug, "i");
+module_param(pc_debug, int, 0);
 #define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args);
 static char *version =
 "avma1_cs.c 1.00 1998/01/23 10:00:00 (Carsten Paeth)";
@@ -57,8 +57,8 @@
 static int irq_list[11] = { -1 };
 static int isdnprot = 2;
 
-MODULE_PARM(irq_list, "1-11i");
-MODULE_PARM(isdnprot, "1-4i");
+module_param_array(irq_list, int, NULL, 0);
+module_param(isdnprot, int, 0);
 
 /*====================================================================*/
 
diff -Nru a/drivers/isdn/hisax/config.c b/drivers/isdn/hisax/config.c
--- a/drivers/isdn/hisax/config.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/isdn/hisax/config.c	2005-01-10 20:11:22 -08:00
@@ -354,20 +354,18 @@
 static int mem[HISAX_MAX_CARDS] __devinitdata = { 0, };
 static char *id = HiSaxID;
 
-#define PARM_PARA "1-" __MODULE_STRING(HISAX_MAX_CARDS) "i"
-
 MODULE_DESCRIPTION("ISDN4Linux: Driver for passive ISDN cards");
 MODULE_AUTHOR("Karsten Keil");
 MODULE_LICENSE("GPL");
-MODULE_PARM(type, PARM_PARA);
-MODULE_PARM(protocol, PARM_PARA);
-MODULE_PARM(io, PARM_PARA);
-MODULE_PARM(irq, PARM_PARA);
-MODULE_PARM(mem, PARM_PARA);
-MODULE_PARM(id, "s");
+module_param_array(type, int, NULL, 0);
+module_param_array(protocol, int, NULL, 0);
+module_param_array(io, int, NULL, 0);
+module_param_array(irq, int, NULL, 0);
+module_param_array(mem, int, NULL, 0);
+module_param(id, charp, 0);
 #ifdef IO0_IO1
-MODULE_PARM(io0, PARM_PARA);
-MODULE_PARM(io1, PARM_PARA);
+module_param_array(io0, int, NULL, 0);
+module_param_array(io1, int, NULL, 0);
 #endif
 #endif /* MODULE */
 
diff -Nru a/drivers/isdn/hisax/elsa_cs.c b/drivers/isdn/hisax/elsa_cs.c
--- a/drivers/isdn/hisax/elsa_cs.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/isdn/hisax/elsa_cs.c	2005-01-10 20:11:19 -08:00
@@ -69,7 +69,7 @@
 
 #ifdef PCMCIA_DEBUG
 static int pc_debug = PCMCIA_DEBUG;
-MODULE_PARM(pc_debug, "i");
+module_param(pc_debug, int, 0);
 #define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args);
 static char *version =
 "elsa_cs.c $Revision: 1.2.2.4 $ $Date: 2004/01/25 15:07:06 $ (K.Lichtenwalder)";
@@ -88,11 +88,11 @@
 /* Newer, simpler way of listing specific interrupts */
 static int irq_list[4] = { -1 };
 
-MODULE_PARM(irq_mask, "i");
-MODULE_PARM(irq_list, "1-4i");
+module_param(irq_mask, ulong, 0);
+module_param_array(irq_list, int, NULL, 0);
 
 static int protocol = 2;        /* EURO-ISDN Default */
-MODULE_PARM(protocol, "i");
+module_param(protocol, int, 0);
 
 /*====================================================================*/
 
diff -Nru a/drivers/isdn/hisax/hfc_usb.c b/drivers/isdn/hisax/hfc_usb.c
--- a/drivers/isdn/hisax/hfc_usb.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/isdn/hisax/hfc_usb.c	2005-01-10 20:11:17 -08:00
@@ -1360,9 +1360,10 @@
 //	usb_show_device_descriptor(&dev->descriptor);
 //	usb_show_interface_descriptor(&iface->desc);
 	vend_idx=0xffff;
-	for(i=0;vdata[i].vendor;i++)
-	{
-		if(dev->descriptor.idVendor==vdata[i].vendor && dev->descriptor.idProduct==vdata[i].prod_id) vend_idx=i;
+	for(i=0;vdata[i].vendor;i++) {
+		if (le16_to_cpu(dev->descriptor.idVendor) == vdata[i].vendor && 
+		    le16_to_cpu(dev->descriptor.idProduct) == vdata[i].prod_id)
+			vend_idx = i;
 	}
 	
 
@@ -1491,7 +1492,7 @@
 						case USB_ENDPOINT_XFER_INT:
 							context->fifos[cidx].pipe = usb_rcvintpipe(dev, ep->desc.bEndpointAddress);
 							context->fifos[cidx].usb_transfer_mode = USB_INT;
-							packet_size = ep->desc.wMaxPacketSize; // remember max packet size
+							packet_size = le16_to_cpu(ep->desc.wMaxPacketSize); // remember max packet size
 #ifdef VERBOSE_USB_DEBUG
 							printk (KERN_INFO "HFC-USB: Interrupt-In Endpoint found %d ms(idx:%d cidx:%d)!\n",
 								ep->desc.bInterval, idx, cidx);
@@ -1503,7 +1504,7 @@
 							else
 								context->fifos[cidx].pipe = usb_sndbulkpipe(dev, ep->desc.bEndpointAddress);
 							context->fifos[cidx].usb_transfer_mode = USB_BULK;
-							packet_size = ep->desc.wMaxPacketSize; // remember max packet size
+							packet_size = le16_to_cpu(ep->desc.wMaxPacketSize); // remember max packet size
 #ifdef VERBOSE_USB_DEBUG
 							printk (KERN_INFO "HFC-USB: Bulk Endpoint found (idx:%d cidx:%d)!\n",
 								idx, cidx);
@@ -1515,7 +1516,7 @@
 							else
 								context->fifos[cidx].pipe = usb_sndisocpipe(dev, ep->desc.bEndpointAddress);
 							context->fifos[cidx].usb_transfer_mode = USB_ISOC;
-							iso_packet_size = ep->desc.wMaxPacketSize; // remember max packet size
+							iso_packet_size = le16_to_cpu(ep->desc.wMaxPacketSize); // remember max packet size
 #ifdef VERBOSE_USB_DEBUG
 							printk (KERN_INFO "HFC-USB: ISO Endpoint found (idx:%d cidx:%d)!\n",
 								idx, cidx);
@@ -1528,7 +1529,7 @@
 					if (context->fifos[cidx].pipe) {
 						context->fifos[cidx].fifonum = cidx;
 						context->fifos[cidx].hfc = context;
-						context->fifos[cidx].usb_packet_maxlen = ep->desc.wMaxPacketSize;
+						context->fifos[cidx].usb_packet_maxlen = le16_to_cpu(ep->desc.wMaxPacketSize);
 						context->fifos[cidx].intervall = ep->desc.bInterval;
 						context->fifos[cidx].skbuff = NULL;
 #ifdef VERBOSE_USB_DEBUG
diff -Nru a/drivers/isdn/hisax/hisax_fcpcipnp.c b/drivers/isdn/hisax/hisax_fcpcipnp.c
--- a/drivers/isdn/hisax/hisax_fcpcipnp.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/isdn/hisax/hisax_fcpcipnp.c	2005-01-10 20:11:21 -08:00
@@ -45,8 +45,8 @@
 #ifdef CONFIG_HISAX_DEBUG
 static int debug = 0;
 /* static int hdlcfifosize = 32; */
-MODULE_PARM(debug, "i");
-/* MODULE_PARM(hdlcfifosize, "i"); */
+module_param(debug, int, 0);
+/* module_param(hdlcfifosize, int, 0); */
 #endif
 
 MODULE_AUTHOR("Kai Germaschewski <kai.germaschewski@gmx.de>/Karsten Keil <kkeil@suse.de>");
@@ -81,7 +81,7 @@
 #endif
 
 static int protocol = 2;       /* EURO-ISDN Default */
-MODULE_PARM(protocol, "i");
+module_param(protocol, int, 0);
 MODULE_LICENSE("GPL");
 
 // ----------------------------------------------------------------------
diff -Nru a/drivers/isdn/hisax/hisax_isac.c b/drivers/isdn/hisax/hisax_isac.c
--- a/drivers/isdn/hisax/hisax_isac.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/isdn/hisax/hisax_isac.c	2005-01-10 20:11:16 -08:00
@@ -32,7 +32,7 @@
 
 #ifdef CONFIG_HISAX_DEBUG
 static int debug = 1;
-MODULE_PARM(debug, "i");
+module_param(debug, int, 0);
 
 static char *ISACVer[] = {
   "2086/2186 V1.1", 
diff -Nru a/drivers/isdn/hisax/sedlbauer_cs.c b/drivers/isdn/hisax/sedlbauer_cs.c
--- a/drivers/isdn/hisax/sedlbauer_cs.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/isdn/hisax/sedlbauer_cs.c	2005-01-10 20:11:17 -08:00
@@ -69,7 +69,7 @@
 
 #ifdef PCMCIA_DEBUG
 static int pc_debug = PCMCIA_DEBUG;
-MODULE_PARM(pc_debug, "i");
+module_param(pc_debug, int, 0);
 #define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args); 
 static char *version =
 "sedlbauer_cs.c 1.1a 2001/01/28 15:04:04 (M.Niemann)";
@@ -88,11 +88,11 @@
 /* Newer, simpler way of listing specific interrupts */
 static int irq_list[4] = { -1 };
 
-MODULE_PARM(irq_mask, "i");
-MODULE_PARM(irq_list, "1-4i");
+module_param(irq_mask, int, 0);
+module_param_array(irq_list, int, NULL, 0);
 
 static int protocol = 2;        /* EURO-ISDN Default */
-MODULE_PARM(protocol, "i");
+module_param(protocol, int, 0);
 
 /*====================================================================*/
 
diff -Nru a/drivers/isdn/hisax/st5481_b.c b/drivers/isdn/hisax/st5481_b.c
--- a/drivers/isdn/hisax/st5481_b.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/isdn/hisax/st5481_b.c	2005-01-10 20:11:18 -08:00
@@ -274,7 +274,7 @@
 	endpoint = &altsetting->endpoint[EP_B1_OUT - 1 + bcs->channel * 2];
 
 	DBG(4,"endpoint address=%02x,packet size=%d",
-	    endpoint->desc.bEndpointAddress, endpoint->desc.wMaxPacketSize);
+	    endpoint->desc.bEndpointAddress, le16_to_cpu(endpoint->desc.wMaxPacketSize));
 
 	// Allocate memory for 8000bytes/sec + extra bytes if underrun
 	return st5481_setup_isocpipes(b_out->urb, dev, 
diff -Nru a/drivers/isdn/hisax/st5481_d.c b/drivers/isdn/hisax/st5481_d.c
--- a/drivers/isdn/hisax/st5481_d.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/isdn/hisax/st5481_d.c	2005-01-10 20:11:18 -08:00
@@ -669,7 +669,7 @@
 	endpoint = &altsetting->endpoint[EP_D_OUT-1];
 
 	DBG(2,"endpoint address=%02x,packet size=%d",
-	    endpoint->desc.bEndpointAddress, endpoint->desc.wMaxPacketSize);
+	    endpoint->desc.bEndpointAddress, le16_to_cpu(endpoint->desc.wMaxPacketSize));
 
 	return st5481_setup_isocpipes(d_out->urb, dev, 
 				      usb_sndisocpipe(dev, endpoint->desc.bEndpointAddress),
diff -Nru a/drivers/isdn/hisax/st5481_init.c b/drivers/isdn/hisax/st5481_init.c
--- a/drivers/isdn/hisax/st5481_init.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/isdn/hisax/st5481_init.c	2005-01-10 20:11:22 -08:00
@@ -37,14 +37,14 @@
 MODULE_LICENSE("GPL");
 
 static int protocol = 2;       /* EURO-ISDN Default */
-MODULE_PARM(protocol, "i");
+module_param(protocol, int, 0);
 
 static int number_of_leds = 2;       /* 2 LEDs on the adpater default */
-MODULE_PARM(number_of_leds, "i");
+module_param(number_of_leds, int, 0);
 
 #ifdef CONFIG_HISAX_DEBUG
 static int debug = 0x1;
-MODULE_PARM(debug, "i");
+module_param(debug, int, 0);
 int st5481_debug;
 #endif
 
@@ -67,7 +67,8 @@
 	int retval, i;
 
 	printk(KERN_INFO "st541: found adapter VendorId %04x, ProductId %04x, LEDs %d\n",
-	     dev->descriptor.idVendor, dev->descriptor.idProduct,
+	     le16_to_cpu(dev->descriptor.idVendor),
+	     le16_to_cpu(dev->descriptor.idProduct),
 	     number_of_leds);
 
 	adapter = kmalloc(sizeof(struct st5481_adapter), GFP_KERNEL);
diff -Nru a/drivers/isdn/hisax/st5481_usb.c b/drivers/isdn/hisax/st5481_usb.c
--- a/drivers/isdn/hisax/st5481_usb.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/isdn/hisax/st5481_usb.c	2005-01-10 20:11:20 -08:00
@@ -268,8 +268,8 @@
 	}
 
 	// The descriptor is wrong for some early samples of the ST5481 chip
-	altsetting->endpoint[3].desc.wMaxPacketSize = 32;
-	altsetting->endpoint[4].desc.wMaxPacketSize = 32;
+	altsetting->endpoint[3].desc.wMaxPacketSize = __constant_cpu_to_le16(32);
+	altsetting->endpoint[4].desc.wMaxPacketSize = __constant_cpu_to_le16(32);
 
 	// Use alternative setting 3 on interface 0 to have 2B+D
 	if ((status = usb_set_interface (dev, 0, 3)) < 0) {
diff -Nru a/drivers/isdn/hisax/teles_cs.c b/drivers/isdn/hisax/teles_cs.c
--- a/drivers/isdn/hisax/teles_cs.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/isdn/hisax/teles_cs.c	2005-01-10 20:11:22 -08:00
@@ -50,7 +50,7 @@
 
 #ifdef PCMCIA_DEBUG
 static int pc_debug = PCMCIA_DEBUG;
-MODULE_PARM(pc_debug, "i");
+module_param(pc_debug, int, 0);
 #define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args);
 static char *version =
 "teles_cs.c 2.10 2002/07/30 22:23:34 kkeil";
@@ -69,11 +69,11 @@
 /* Newer, simpler way of listing specific interrupts */
 static int irq_list[4] = { -1 };
 
-MODULE_PARM(irq_mask, "i");
-MODULE_PARM(irq_list, "1-4i");
+module_param(irq_mask, ulong, 0);
+module_param_array(irq_list, int, NULL, 0);
 
 static int protocol = 2;        /* EURO-ISDN Default */
-MODULE_PARM(protocol, "i");
+module_param(protocol, int, 0);
 
 /*====================================================================*/
 
diff -Nru a/drivers/isdn/icn/icn.c b/drivers/isdn/icn/icn.c
--- a/drivers/isdn/icn/icn.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/isdn/icn/icn.c	2005-01-10 20:11:23 -08:00
@@ -21,13 +21,13 @@
 MODULE_DESCRIPTION("ISDN4Linux: Driver for ICN active ISDN card");
 MODULE_AUTHOR("Fritz Elfert");
 MODULE_LICENSE("GPL");
-MODULE_PARM(portbase, "i");
+module_param(portbase, int, 0);
 MODULE_PARM_DESC(portbase, "Port address of first card");
-MODULE_PARM(membase, "l");
+module_param(membase, ulong, 0);
 MODULE_PARM_DESC(membase, "Shared memory address of all cards");
-MODULE_PARM(icn_id, "s");
+module_param(icn_id, charp, 0);
 MODULE_PARM_DESC(icn_id, "ID-String of first card");
-MODULE_PARM(icn_id2, "s");
+module_param(icn_id2, charp, 0);
 MODULE_PARM_DESC(icn_id2, "ID-String of first card, second S0 (4B only)");
 
 /*
diff -Nru a/drivers/isdn/pcbit/module.c b/drivers/isdn/pcbit/module.c
--- a/drivers/isdn/pcbit/module.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/isdn/pcbit/module.c	2005-01-10 20:11:20 -08:00
@@ -22,11 +22,12 @@
 MODULE_DESCRIPTION("ISDN4Linux: Driver for PCBIT-T card");
 MODULE_AUTHOR("Pedro Roque Marques");
 MODULE_LICENSE("GPL");
-MODULE_PARM(mem, "1-" __MODULE_STRING(MAX_PCBIT_CARDS) "i");
-MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_PCBIT_CARDS) "i");
 
 static int mem[MAX_PCBIT_CARDS];
 static int irq[MAX_PCBIT_CARDS];
+
+module_param_array(mem, int, NULL, 0);
+module_param_array(irq, int, NULL, 0);
 
 static int num_boards;
 struct pcbit_dev * dev_pcbit[MAX_PCBIT_CARDS];
diff -Nru a/drivers/isdn/sc/init.c b/drivers/isdn/sc/init.c
--- a/drivers/isdn/sc/init.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/isdn/sc/init.c	2005-01-10 20:11:21 -08:00
@@ -15,10 +15,6 @@
 MODULE_DESCRIPTION("ISDN4Linux: Driver for Spellcaster card");
 MODULE_AUTHOR("Spellcaster Telecommunications Inc.");
 MODULE_LICENSE("GPL");
-MODULE_PARM( io, "1-" __MODULE_STRING(MAX_CARDS) "i");
-MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_CARDS) "i");
-MODULE_PARM(ram, "1-" __MODULE_STRING(MAX_CARDS) "i");
-MODULE_PARM(do_reset, "i");
 
 board *sc_adapter[MAX_CARDS];
 int cinst;
@@ -33,6 +29,11 @@
 static unsigned char irq[] = {0,0,0,0};
 static unsigned long ram[] = {0,0,0,0};
 static int do_reset = 0;
+
+module_param_array(io, int, NULL, 0);
+module_param_array(irq, int, NULL, 0);
+module_param_array(ram, int, NULL, 0);
+module_param(do_reset, bool, 0);
 
 static int sup_irq[] = { 11, 10, 9, 5, 12, 14, 7, 3, 4, 6 };
 #define MAX_IRQS	10
diff -Nru a/drivers/isdn/tpam/tpam_main.c b/drivers/isdn/tpam/tpam_main.c
--- a/drivers/isdn/tpam/tpam_main.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/isdn/tpam/tpam_main.c	2005-01-10 20:11:21 -08:00
@@ -39,7 +39,7 @@
 MODULE_AUTHOR("Stelian Pop");
 MODULE_LICENSE("GPL");
 MODULE_PARM_DESC(id,"ID-String of the driver");
-MODULE_PARM(id,"s");
+module_param(id, charp, 0);
 
 /*
  * Finds a board by its driver ID.
@@ -105,7 +105,7 @@
 	memset((char *)card, 0, sizeof(tpam_card));
 
 	card->irq = dev->irq;
-	card->lock = SPIN_LOCK_UNLOCKED;
+	spin_lock_init(&card->lock);
 	sprintf(card->interface.id, "%s%d", id, cards_num);
 
 	/* request interrupt */
diff -Nru a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c
--- a/drivers/macintosh/via-pmu.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/macintosh/via-pmu.c	2005-01-10 20:11:22 -08:00
@@ -418,7 +418,7 @@
 	}
 
 	if (pmu_kind == PMU_KEYLARGO_BASED && gpio_irq != -1) {
-		if (request_irq(gpio_irq, gpio1_interrupt, 0, "GPIO1/ADB", (void *)0))
+		if (request_irq(gpio_irq, gpio1_interrupt, 0, "GPIO1 ADB", (void *)0))
 			printk(KERN_ERR "pmu: can't get irq %d (GPIO1)\n", gpio_irq);
 		gpio_irq_enabled = 1;
 	}
diff -Nru a/drivers/mca/mca-bus.c b/drivers/mca/mca-bus.c
--- a/drivers/mca/mca-bus.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/mca/mca-bus.c	2005-01-10 20:11:17 -08:00
@@ -34,7 +34,7 @@
 /* Very few machines have more than one MCA bus.  However, there are
  * those that do (Voyager 35xx/5xxx), so we do it this way for future
  * expansion.  None that I know have more than 2 */
-struct mca_bus *mca_root_busses[MAX_MCA_BUSSES];
+static struct mca_bus *mca_root_busses[MAX_MCA_BUSSES];
 
 #define MCA_DEVINFO(i,s) { .pos = i, .name = s }
 
diff -Nru a/drivers/mca/mca-legacy.c b/drivers/mca/mca-legacy.c
--- a/drivers/mca/mca-legacy.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/mca/mca-legacy.c	2005-01-10 20:11:23 -08:00
@@ -283,25 +283,6 @@
 EXPORT_SYMBOL(mca_set_adapter_name);
 
 /**
- *	mca_get_adapter_name - get the adapter description
- *	@slot:	slot to query
- *
- *	Return the adapter description if set. If it has not been
- *	set or the slot is out range then return NULL.
- */
-
-char *mca_get_adapter_name(int slot)
-{
-	struct mca_device *mca_dev = mca_find_device_by_slot(slot);
-
-	if(!mca_dev)
-		return NULL;
-
-	return mca_device_get_name(mca_dev);
-}
-EXPORT_SYMBOL(mca_get_adapter_name);
-
-/**
  *	mca_is_adapter_used - check if claimed by driver
  *	@slot:	slot to check
  *
@@ -365,43 +346,3 @@
 }
 EXPORT_SYMBOL(mca_mark_as_unused);
 
-/**
- *	mca_isadapter - check if the slot holds an adapter
- *	@slot:	slot to query
- *
- *	Returns zero if the slot does not hold an adapter, non zero if
- *	it does.
- */
-
-int mca_isadapter(int slot)
-{
-	struct mca_device *mca_dev = mca_find_device_by_slot(slot);
-	enum MCA_AdapterStatus status;
-
-	if(!mca_dev)
-		return 0;
-
-	status = mca_device_status(mca_dev);
-
-	return status == MCA_ADAPTER_NORMAL
-		|| status == MCA_ADAPTER_DISABLED;
-}
-EXPORT_SYMBOL(mca_isadapter);
-
-/**
- *	mca_isenabled - check if the slot holds an enabled adapter
- *	@slot:	slot to query
- *
- *	Returns a non zero value if the slot holds an enabled adapter
- *	and zero for any other case.
- */
-
-int mca_isenabled(int slot)
-{
-	struct mca_device *mca_dev = mca_find_device_by_slot(slot);
-
-	if(!mca_dev)
-		return 0;
-
-	return mca_device_status(mca_dev) == MCA_ADAPTER_NORMAL;
-}
diff -Nru a/drivers/mca/mca-proc.c b/drivers/mca/mca-proc.c
--- a/drivers/mca/mca-proc.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/mca/mca-proc.c	2005-01-10 20:11:21 -08:00
@@ -43,8 +43,8 @@
 	return len;
 }
 
-int get_mca_info(char *page, char **start, off_t off,
-		 int count, int *eof, void *data)
+static int get_mca_info(char *page, char **start, off_t off,
+			int count, int *eof, void *data)
 {
 	int i, len = 0;
 
diff -Nru a/drivers/md/Makefile b/drivers/md/Makefile
--- a/drivers/md/Makefile	2005-01-10 20:11:19 -08:00
+++ b/drivers/md/Makefile	2005-01-10 20:11:19 -08:00
@@ -9,6 +9,8 @@
 raid6-objs	:= raid6main.o raid6algos.o raid6recov.o raid6tables.o \
 		   raid6int1.o raid6int2.o raid6int4.o \
 		   raid6int8.o raid6int16.o raid6int32.o \
+		   raid6altivec1.o raid6altivec2.o raid6altivec4.o \
+		   raid6altivec8.o \
 		   raid6mmx.o raid6sse1.o raid6sse2.o
 hostprogs-y	:= mktables
 
@@ -36,6 +38,10 @@
       cmd_unroll = $(PERL) $(srctree)/$(src)/unroll.pl $(UNROLL) \
                    < $< > $@ || ( rm -f $@ && exit 1 )
 
+ifeq ($(CONFIG_ALTIVEC),y)
+altivec_flags := -maltivec -mabi=altivec
+endif
+
 targets += raid6int1.c
 $(obj)/raid6int1.c:   UNROLL := 1
 $(obj)/raid6int1.c:   $(src)/raid6int.uc $(src)/unroll.pl FORCE
@@ -64,6 +70,30 @@
 targets += raid6int32.c
 $(obj)/raid6int32.c:  UNROLL := 32
 $(obj)/raid6int32.c:  $(src)/raid6int.uc $(src)/unroll.pl FORCE
+	$(call if_changed,unroll)
+
+CFLAGS_raid6altivec1.o += $(altivec_flags)
+targets += raid6altivec1.c
+$(obj)/raid6altivec1.c:   UNROLL := 1
+$(obj)/raid6altivec1.c:   $(src)/raid6altivec.uc $(src)/unroll.pl FORCE
+	$(call if_changed,unroll)
+
+CFLAGS_raid6altivec2.o += $(altivec_flags)
+targets += raid6altivec2.c
+$(obj)/raid6altivec2.c:   UNROLL := 2
+$(obj)/raid6altivec2.c:   $(src)/raid6altivec.uc $(src)/unroll.pl FORCE
+	$(call if_changed,unroll)
+
+CFLAGS_raid6altivec4.o += $(altivec_flags)
+targets += raid6altivec4.c
+$(obj)/raid6altivec4.c:   UNROLL := 4
+$(obj)/raid6altivec4.c:   $(src)/raid6altivec.uc $(src)/unroll.pl FORCE
+	$(call if_changed,unroll)
+
+CFLAGS_raid6altivec8.o += $(altivec_flags)
+targets += raid6altivec8.c
+$(obj)/raid6altivec8.c:   UNROLL := 8
+$(obj)/raid6altivec8.c:   $(src)/raid6altivec.uc $(src)/unroll.pl FORCE
 	$(call if_changed,unroll)
 
 quiet_cmd_mktable = TABLE   $@
diff -Nru a/drivers/md/kcopyd.c b/drivers/md/kcopyd.c
--- a/drivers/md/kcopyd.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/md/kcopyd.c	2005-01-10 20:11:16 -08:00
@@ -649,7 +649,7 @@
 		return -ENOMEM;
 	}
 
-	kc->lock = SPIN_LOCK_UNLOCKED;
+	spin_lock_init(&kc->lock);
 	kc->pages = NULL;
 	kc->nr_pages = kc->nr_free_pages = 0;
 	r = client_alloc_pages(kc, nr_pages);
diff -Nru a/drivers/md/linear.c b/drivers/md/linear.c
--- a/drivers/md/linear.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/md/linear.c	2005-01-10 20:11:18 -08:00
@@ -31,7 +31,7 @@
  */
 static inline dev_info_t *which_dev(mddev_t *mddev, sector_t sector)
 {
-	struct linear_hash *hash;
+	dev_info_t *hash;
 	linear_conf_t *conf = mddev_to_conf(mddev);
 	sector_t block = sector >> 1;
 
@@ -39,12 +39,11 @@
 	 * sector_div(a,b) returns the remainer and sets a to a/b
 	 */
 	(void)sector_div(block, conf->smallest->size);
-	hash = conf->hash_table + block;
+	hash = conf->hash_table[block];
 
-	if ((sector>>1) >= (hash->dev0->size + hash->dev0->offset))
-		return hash->dev1;
-	else
-		return hash->dev0;
+	while ((sector>>1) >= (hash->size + hash->offset))
+		hash++;
+	return hash;
 }
 
 /**
@@ -114,7 +113,7 @@
 static int linear_run (mddev_t *mddev)
 {
 	linear_conf_t *conf;
-	struct linear_hash *table;
+	dev_info_t **table;
 	mdk_rdev_t *rdev;
 	int i, nb_zone, cnt;
 	sector_t start;
@@ -184,7 +183,7 @@
 		nb_zone = conf->nr_zones = sz + (round ? 1 : 0);
 	}
 			
-	conf->hash_table = kmalloc (sizeof (struct linear_hash) * nb_zone,
+	conf->hash_table = kmalloc (sizeof (dev_info_t*) * nb_zone,
 					GFP_KERNEL);
 	if (!conf->hash_table)
 		goto out;
@@ -198,9 +197,6 @@
 	for (i = 0; i < cnt; i++) {
 		dev_info_t *disk = conf->disks + i;
 
-		if (start > curr_offset)
-			table[-1].dev1 = disk;
-
 		disk->offset = curr_offset;
 		curr_offset += disk->size;
 
@@ -208,10 +204,8 @@
 		 * 'start' is the start of table
 		 */
 		while (start < curr_offset) {
-			table->dev0 = disk;
-			table->dev1 = NULL;
+			*table++ = disk;
 			start += conf->smallest->size;
-			table++;
 		}
 	}
 	if (table-conf->hash_table != nb_zone)
@@ -255,13 +249,6 @@
 
 	tmp_dev = which_dev(mddev, bio->bi_sector);
 	block = bio->bi_sector >> 1;
-  
-	if (unlikely(!tmp_dev)) {
-		printk("linear_make_request: hash->dev1==NULL for block %llu\n",
-			(unsigned long long)block);
-		bio_io_error(bio, bio->bi_size);
-		return 0;
-	}
     
 	if (unlikely(block >= (tmp_dev->size + tmp_dev->offset)
 		     || block < tmp_dev->offset)) {
@@ -306,17 +293,20 @@
 #ifdef MD_DEBUG
 	int j;
 	linear_conf_t *conf = mddev_to_conf(mddev);
+	sector_t s = 0;
   
 	seq_printf(seq, "      ");
 	for (j = 0; j < conf->nr_zones; j++)
 	{
 		char b[BDEVNAME_SIZE];
+		s += conf->smallest_size;
 		seq_printf(seq, "[%s",
-			   bdevname(conf->hash_table[j].dev0->rdev->bdev,b));
+			   bdevname(conf->hash_table[j][0].rdev->bdev,b));
 
-		if (conf->hash_table[j].dev1)
+		while (s > conf->hash_table[j][0].offset +
+		           conf->hash_table[j][0].size)
 			seq_printf(seq, "/%s] ",
-				   bdevname(conf->hash_table[j].dev1->rdev->bdev,b));
+				   bdevname(conf->hash_table[j][1].rdev->bdev,b));
 		else
 			seq_printf(seq, "] ");
 	}
diff -Nru a/drivers/md/multipath.c b/drivers/md/multipath.c
--- a/drivers/md/multipath.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/md/multipath.c	2005-01-10 20:11:18 -08:00
@@ -491,7 +491,7 @@
 	conf->raid_disks = mddev->raid_disks;
 	mddev->sb_dirty = 1;
 	conf->mddev = mddev;
-	conf->device_lock = SPIN_LOCK_UNLOCKED;
+	spin_lock_init(&conf->device_lock);
 	INIT_LIST_HEAD(&conf->retry_list);
 
 	if (!conf->working_disks) {
diff -Nru a/drivers/md/raid1.c b/drivers/md/raid1.c
--- a/drivers/md/raid1.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/md/raid1.c	2005-01-10 20:11:19 -08:00
@@ -1210,12 +1210,12 @@
 	}
 	conf->raid_disks = mddev->raid_disks;
 	conf->mddev = mddev;
-	conf->device_lock = SPIN_LOCK_UNLOCKED;
+	spin_lock_init(&conf->device_lock);
 	INIT_LIST_HEAD(&conf->retry_list);
 	if (conf->working_disks == 1)
 		mddev->recovery_cp = MaxSector;
 
-	conf->resync_lock = SPIN_LOCK_UNLOCKED;
+	spin_lock_init(&conf->resync_lock);
 	init_waitqueue_head(&conf->wait_idle);
 	init_waitqueue_head(&conf->wait_resume);
 
diff -Nru a/drivers/md/raid10.c b/drivers/md/raid10.c
--- a/drivers/md/raid10.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/md/raid10.c	2005-01-10 20:11:22 -08:00
@@ -1668,10 +1668,10 @@
 	}
 	conf->raid_disks = mddev->raid_disks;
 	conf->mddev = mddev;
-	conf->device_lock = SPIN_LOCK_UNLOCKED;
+	spin_lock_init(&conf->device_lock);
 	INIT_LIST_HEAD(&conf->retry_list);
 
-	conf->resync_lock = SPIN_LOCK_UNLOCKED;
+	spin_lock_init(&conf->resync_lock);
 	init_waitqueue_head(&conf->wait_idle);
 	init_waitqueue_head(&conf->wait_resume);
 
diff -Nru a/drivers/md/raid5.c b/drivers/md/raid5.c
--- a/drivers/md/raid5.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/md/raid5.c	2005-01-10 20:11:17 -08:00
@@ -302,7 +302,7 @@
 			return 1;
 		memset(sh, 0, sizeof(*sh) + (devs-1)*sizeof(struct r5dev));
 		sh->raid_conf = conf;
-		sh->lock = SPIN_LOCK_UNLOCKED;
+		spin_lock_init(&sh->lock);
 
 		if (grow_buffers(sh, conf->raid_disks)) {
 			shrink_buffers(sh, conf->raid_disks);
@@ -1566,7 +1566,7 @@
 		goto abort;
 	memset(conf->stripe_hashtbl, 0, HASH_PAGES * PAGE_SIZE);
 
-	conf->device_lock = SPIN_LOCK_UNLOCKED;
+	spin_lock_init(&conf->device_lock);
 	init_waitqueue_head(&conf->wait_for_stripe);
 	INIT_LIST_HEAD(&conf->handle_list);
 	INIT_LIST_HEAD(&conf->delayed_list);
diff -Nru a/drivers/md/raid6algos.c b/drivers/md/raid6algos.c
--- a/drivers/md/raid6algos.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/md/raid6algos.c	2005-01-10 20:11:23 -08:00
@@ -37,6 +37,10 @@
 extern const struct raid6_calls raid6_sse2x1;
 extern const struct raid6_calls raid6_sse2x2;
 extern const struct raid6_calls raid6_sse2x4;
+extern const struct raid6_calls raid6_altivec1;
+extern const struct raid6_calls raid6_altivec2;
+extern const struct raid6_calls raid6_altivec4;
+extern const struct raid6_calls raid6_altivec8;
 
 const struct raid6_calls * const raid6_algos[] = {
 	&raid6_intx1,
@@ -59,6 +63,12 @@
 	&raid6_sse2x1,
 	&raid6_sse2x2,
 	&raid6_sse2x4,
+#endif
+#ifdef CONFIG_ALTIVEC
+	&raid6_altivec1,
+	&raid6_altivec2,
+	&raid6_altivec4,
+	&raid6_altivec8,
 #endif
 	NULL
 };
diff -Nru a/drivers/md/raid6altivec.uc b/drivers/md/raid6altivec.uc
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/md/raid6altivec.uc	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,122 @@
+/* -*- linux-c -*- ------------------------------------------------------- *
+ *
+ *   Copyright 2002-2004 H. Peter Anvin - 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, Inc., 53 Temple Place Ste 330,
+ *   Bostom MA 02111-1307, USA; either version 2 of the License, or
+ *   (at your option) any later version; incorporated herein by reference.
+ *
+ * ----------------------------------------------------------------------- */
+
+/*
+ * raid6altivec$#.c
+ *
+ * $#-way unrolled portable integer math RAID-6 instruction set
+ *
+ * This file is postprocessed using unroll.pl
+ *
+ * <benh> hpa: in process,
+ * you can just "steal" the vec unit with enable_kernel_altivec() (but
+ * bracked this with preempt_disable/enable or in a lock)
+ */
+
+#include "raid6.h"
+
+#ifdef CONFIG_ALTIVEC
+
+#include <altivec.h>
+#include <asm/system.h>
+#include <asm/cputable.h>
+
+/*
+ * This is the C data type to use
+ */
+
+typedef vector unsigned char unative_t;
+
+#define NBYTES(x) ((vector unsigned char) {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x})
+#define NSIZE	sizeof(unative_t)
+
+/*
+ * The SHLBYTE() operation shifts each byte left by 1, *not*
+ * rolling over into the next byte
+ */
+static inline __attribute_const__ unative_t SHLBYTE(unative_t v)
+{
+	return vec_add(v,v);
+}
+
+/*
+ * The MASK() operation returns 0xFF in any byte for which the high
+ * bit is 1, 0x00 for any byte for which the high bit is 0.
+ */
+static inline __attribute_const__ unative_t MASK(unative_t v)
+{
+	unative_t zv = NBYTES(0);
+
+	/* vec_cmpgt returns a vector bool char; thus the need for the cast */
+	return (unative_t)vec_cmpgt(zv, v);
+}
+
+
+/* This is noinline to make damned sure that gcc doesn't move any of the
+   Altivec code around the enable/disable code */
+static void noinline
+raid6_altivec$#_gen_syndrome_real(int disks, size_t bytes, void **ptrs)
+{
+	u8 **dptr = (u8 **)ptrs;
+	u8 *p, *q;
+	int d, z, z0;
+
+	unative_t wd$$, wq$$, wp$$, w1$$, w2$$;
+	unative_t x1d = NBYTES(0x1d);
+
+	z0 = disks - 3;		/* Highest data disk */
+	p = dptr[z0+1];		/* XOR parity */
+	q = dptr[z0+2];		/* RS syndrome */
+
+	for ( d = 0 ; d < bytes ; d += NSIZE*$# ) {
+		wq$$ = wp$$ = *(unative_t *)&dptr[z0][d+$$*NSIZE];
+		for ( z = z0-1 ; z >= 0 ; z-- ) {
+			wd$$ = *(unative_t *)&dptr[z][d+$$*NSIZE];
+			wp$$ = vec_xor(wp$$, wd$$);
+			w2$$ = MASK(wq$$);
+			w1$$ = SHLBYTE(wq$$);
+			w2$$ = vec_and(w2$$, x1d);
+			w1$$ = vec_xor(w1$$, w2$$);
+			wq$$ = vec_xor(w1$$, wd$$);
+		}
+		*(unative_t *)&p[d+NSIZE*$$] = wp$$;
+		*(unative_t *)&q[d+NSIZE*$$] = wq$$;
+	}
+}
+
+static void raid6_altivec$#_gen_syndrome(int disks, size_t bytes, void **ptrs)
+{
+	preempt_disable();
+	enable_kernel_altivec();
+
+	raid6_altivec$#_gen_syndrome_real(disks, bytes, ptrs);
+
+	preempt_enable();
+}
+
+int raid6_have_altivec(void);
+#if $# == 1
+int raid6_have_altivec(void)
+{
+	/* This assumes either all CPUs have Altivec or none does */
+	return cur_cpu_spec->cpu_features & CPU_FTR_ALTIVEC;
+}
+#endif
+
+const struct raid6_calls raid6_altivec$# = {
+	raid6_altivec$#_gen_syndrome,
+	raid6_have_altivec,
+	"altivecx$#",
+	0
+};
+
+#endif /* CONFIG_ALTIVEC */
diff -Nru a/drivers/md/raid6main.c b/drivers/md/raid6main.c
--- a/drivers/md/raid6main.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/md/raid6main.c	2005-01-10 20:11:15 -08:00
@@ -321,7 +321,7 @@
 			return 1;
 		memset(sh, 0, sizeof(*sh) + (devs-1)*sizeof(struct r5dev));
 		sh->raid_conf = conf;
-		sh->lock = SPIN_LOCK_UNLOCKED;
+		spin_lock_init(&sh->lock);
 
 		if (grow_buffers(sh, conf->raid_disks)) {
 			shrink_buffers(sh, conf->raid_disks);
@@ -1730,7 +1730,7 @@
 		goto abort;
 	memset(conf->stripe_hashtbl, 0, HASH_PAGES * PAGE_SIZE);
 
-	conf->device_lock = SPIN_LOCK_UNLOCKED;
+	spin_lock_init(&conf->device_lock);
 	init_waitqueue_head(&conf->wait_for_stripe);
 	INIT_LIST_HEAD(&conf->handle_list);
 	INIT_LIST_HEAD(&conf->delayed_list);
diff -Nru a/drivers/media/common/saa7146_core.c b/drivers/media/common/saa7146_core.c
--- a/drivers/media/common/saa7146_core.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/media/common/saa7146_core.c	2005-01-10 20:11:21 -08:00
@@ -426,8 +426,8 @@
 	pci_set_drvdata(pci,dev);
 
         init_MUTEX(&dev->lock);
-	dev->int_slock = SPIN_LOCK_UNLOCKED;
-	dev->slock = SPIN_LOCK_UNLOCKED;
+	spin_lock_init(&dev->int_slock);
+	spin_lock_init(&dev->slock);
 
 	init_MUTEX(&dev->i2c_lock);
 
diff -Nru a/drivers/media/dvb/b2c2/b2c2-usb-core.c b/drivers/media/dvb/b2c2/b2c2-usb-core.c
--- a/drivers/media/dvb/b2c2/b2c2-usb-core.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/media/dvb/b2c2/b2c2-usb-core.c	2005-01-10 20:11:21 -08:00
@@ -370,7 +370,7 @@
 
 static int b2c2_init_usb(struct usb_b2c2_usb *b2c2)
 {
-	u16 frame_size = b2c2->uintf->cur_altsetting->endpoint[0].desc.wMaxPacketSize;
+	u16 frame_size = le16_to_cpu(b2c2->uintf->cur_altsetting->endpoint[0].desc.wMaxPacketSize);
 	int bufsize = B2C2_USB_NUM_ISO_URB * B2C2_USB_FRAMES_PER_ISO * frame_size,i,j,ret;
 	int buffer_offset = 0;
 
diff -Nru a/drivers/media/dvb/b2c2/skystar2.c b/drivers/media/dvb/b2c2/skystar2.c
--- a/drivers/media/dvb/b2c2/skystar2.c	2005-01-10 20:11:24 -08:00
+++ b/drivers/media/dvb/b2c2/skystar2.c	2005-01-10 20:11:24 -08:00
@@ -1979,7 +1979,7 @@
 		ctrl_enable_mac(adapter, 1);
 	}
 
-	adapter->lock = SPIN_LOCK_UNLOCKED;
+	spin_lock_init(&adapter->lock);
 
 	return 0;
 }
diff -Nru a/drivers/media/dvb/cinergyT2/cinergyT2.c b/drivers/media/dvb/cinergyT2/cinergyT2.c
--- a/drivers/media/dvb/cinergyT2/cinergyT2.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/media/dvb/cinergyT2/cinergyT2.c	2005-01-10 20:11:19 -08:00
@@ -541,7 +541,7 @@
 
 	switch (cmd) {
 	case FE_GET_INFO:
-		return copy_to_user((void*) arg, &cinergyt2_fe_info,
+		return copy_to_user((void __user*) arg, &cinergyt2_fe_info,
 				    sizeof(struct dvb_frontend_info));
 
 	case FE_READ_STATUS:
@@ -556,7 +556,7 @@
 		if (stat->lock_bits & (1 << 1))
 			status |= FE_HAS_VITERBI;
 
-		return copy_to_user((void *) arg, &status, sizeof(status));
+		return copy_to_user((void  __user*) arg, &status, sizeof(status));
 
 	case FE_READ_BER:
 		return put_user(le32_to_cpu(stat->viterbi_error_rate),
@@ -584,7 +584,7 @@
 		if ((file->f_flags & O_ACCMODE) == O_RDONLY)
 			return -EPERM;
 
-		if (copy_from_user(&p, (void *) arg, sizeof(p)))
+		if (copy_from_user(&p, (void  __user*) arg, sizeof(p)))
 			return -EFAULT;
 
 		if (down_interruptible(&cinergyt2->sem))
@@ -624,7 +624,7 @@
 		 *  for now we only fill the status field. the parameters
 		 *  are trivial to fill as soon FE_GET_FRONTEND is done.
 		 */
-		struct dvb_frontend_event *e = (void *) arg;
+		struct dvb_frontend_event __user *e = (void __user *) arg;
 		if (cinergyt2->pending_fe_events == 0) {
 			if (file->f_flags & O_NONBLOCK)
 				return -EWOULDBLOCK;
diff -Nru a/drivers/media/dvb/dibusb/dvb-dibusb.c b/drivers/media/dvb/dibusb/dvb-dibusb.c
--- a/drivers/media/dvb/dibusb/dvb-dibusb.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/media/dvb/dibusb/dvb-dibusb.c	2005-01-10 20:11:16 -08:00
@@ -602,8 +602,8 @@
 
 	if (dib->fe == NULL) {
 		printk("dvb-dibusb: A frontend driver was not found for device %04x/%04x\n",
-		       dib->udev->descriptor.idVendor,
-		       dib->udev->descriptor.idProduct);
+		       le16_to_cpu(dib->udev->descriptor.idVendor),
+		       le16_to_cpu(dib->udev->descriptor.idProduct));
 	} else {
 		if (dvb_register_frontend(dib->adapter, dib->fe)) {
 			printk("dvb-dibusb: Frontend registration failed!\n");
@@ -917,11 +917,11 @@
 	int ret = -ENOMEM,i,cold=0;
 
 	for (i = 0; i < DIBUSB_SUPPORTED_DEVICES; i++)
-		if (dibusb_devices[i].cold_product_id == udev->descriptor.idProduct ||
-			dibusb_devices[i].warm_product_id == udev->descriptor.idProduct) {
+		if (dibusb_devices[i].cold_product_id == le16_to_cpu(udev->descriptor.idProduct) ||
+			dibusb_devices[i].warm_product_id == le16_to_cpu(udev->descriptor.idProduct)) {
 			dibdev = &dibusb_devices[i];
 
-			cold = dibdev->cold_product_id == udev->descriptor.idProduct;
+			cold = dibdev->cold_product_id == le16_to_cpu(udev->descriptor.idProduct);
 
 			if (cold)
 				info("found a '%s' in cold state, will try to load a firmware",dibdev->name);
@@ -931,7 +931,7 @@
 
 	if (dibdev == NULL) {
 		err("something went very wrong, "
-				"unknown product ID: %.4x",udev->descriptor.idProduct);
+				"unknown product ID: %.4x",le16_to_cpu(udev->descriptor.idProduct));
 		return -ENODEV;
 	}
 
diff -Nru a/drivers/media/dvb/frontends/dib3000-common.h b/drivers/media/dvb/frontends/dib3000-common.h
--- a/drivers/media/dvb/frontends/dib3000-common.h	2005-01-10 20:11:17 -08:00
+++ b/drivers/media/dvb/frontends/dib3000-common.h	2005-01-10 20:11:17 -08:00
@@ -81,7 +81,7 @@
 
 #define wr_foreach(a,v) { int i; \
 	if (sizeof(a) != sizeof(v)) \
-		err("sizeof: %d %d is different",sizeof(a),sizeof(v));\
+		err("sizeof: %zd %zd is different",sizeof(a),sizeof(v));\
 	for (i=0; i < sizeof(a)/sizeof(u16); i++) \
 		wr(a[i],v[i]); \
 	}
diff -Nru a/drivers/media/dvb/frontends/tda80xx.c b/drivers/media/dvb/frontends/tda80xx.c
--- a/drivers/media/dvb/frontends/tda80xx.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/media/dvb/frontends/tda80xx.c	2005-01-10 20:11:21 -08:00
@@ -27,10 +27,10 @@
 #include <linux/spinlock.h>
 #include <linux/threads.h>
 #include <linux/interrupt.h>
-#include <linux/irq.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/slab.h>
+#include <asm/irq.h>
 #include <asm/div64.h>
 
 #include "dvb_frontend.h"
diff -Nru a/drivers/media/dvb/ttpci/av7110_hw.c b/drivers/media/dvb/ttpci/av7110_hw.c
--- a/drivers/media/dvb/ttpci/av7110_hw.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/media/dvb/ttpci/av7110_hw.c	2005-01-10 20:11:20 -08:00
@@ -655,21 +655,11 @@
 
 #ifdef CONFIG_DVB_AV7110_OSD
 
-static inline int ResetBlend(struct av7110 *av7110, u8 windownr)
-{
-	return av7110_fw_cmd(av7110, COMTYPE_OSD, SetNonBlend, 1, windownr);
-}
-
 static inline int SetColorBlend(struct av7110 *av7110, u8 windownr)
 {
 	return av7110_fw_cmd(av7110, COMTYPE_OSD, SetCBlend, 1, windownr);
 }
 
-static inline int SetWindowBlend(struct av7110 *av7110, u8 windownr, u8 blending)
-{
-	return av7110_fw_cmd(av7110, COMTYPE_OSD, SetWBlend, 2, windownr, blending);
-}
-
 static inline int SetBlend_(struct av7110 *av7110, u8 windownr,
 		     enum av7110_osd_palette_type colordepth, u16 index, u8 blending)
 {
@@ -684,11 +674,6 @@
 			     windownr, colordepth, index, colorhi, colorlo);
 }
 
-static inline int BringToTop(struct av7110 *av7110, u8 windownr)
-{
-	return av7110_fw_cmd(av7110, COMTYPE_OSD, WTop, 1, windownr);
-}
-
 static inline int SetFont(struct av7110 *av7110, u8 windownr, u8 fontsize,
 			  u16 colorfg, u16 colorbg)
 {
@@ -1034,7 +1019,7 @@
 			goto out;
 		} else {
 			int i, len = dc->x0-dc->color+1;
-			u8 __user *colors = (u8 *)dc->data;
+			u8 __user *colors = (u8 __user *)dc->data;
 			u8 r, g, b, blend;
 
 			for (i = 0; i<len; i++) {
diff -Nru a/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c b/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
--- a/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c	2005-01-10 20:11:23 -08:00
@@ -1348,7 +1348,7 @@
 
 static void frontend_init(struct ttusb* ttusb)
 {
-	switch(ttusb->dev->descriptor.idProduct) {
+	switch(le16_to_cpu(ttusb->dev->descriptor.idProduct)) {
 	case 0x1003: // Hauppauge/TT Nova-USB-S budget (stv0299/ALPS BSRU6(tsa5059)
 		// try the ALPS BSRU6 first
 		ttusb->fe = stv0299_attach(&alps_bsru6_config, &ttusb->i2c_adap);
@@ -1381,8 +1381,8 @@
 
 	if (ttusb->fe == NULL) {
 		printk("dvb-ttusb-budget: A frontend driver was not found for device %04x/%04x\n",
-		       ttusb->dev->descriptor.idVendor,
-		       ttusb->dev->descriptor.idProduct);
+		       le16_to_cpu(ttusb->dev->descriptor.idVendor),
+		       le16_to_cpu(ttusb->dev->descriptor.idProduct));
 	} else {
 		if (dvb_register_frontend(ttusb->adapter, ttusb->fe)) {
 			printk("dvb-ttusb-budget: Frontend registration failed!\n");
diff -Nru a/drivers/media/dvb/ttusb-dec/ttusb_dec.c b/drivers/media/dvb/ttusb-dec/ttusb_dec.c
--- a/drivers/media/dvb/ttusb-dec/ttusb_dec.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/media/dvb/ttusb-dec/ttusb_dec.c	2005-01-10 20:11:22 -08:00
@@ -1090,7 +1090,7 @@
 
 static void ttusb_dec_init_tasklet(struct ttusb_dec *dec)
 {
-	dec->urb_frame_list_lock = SPIN_LOCK_UNLOCKED;
+	spin_lock_init(&dec->urb_frame_list_lock);
 	INIT_LIST_HEAD(&dec->urb_frame_list);
 	tasklet_init(&dec->urb_tasklet, ttusb_dec_process_urb_frame_list,
 		     (unsigned long)dec);
@@ -1401,7 +1401,7 @@
 static void ttusb_dec_init_filters(struct ttusb_dec *dec)
 {
 	INIT_LIST_HEAD(&dec->filter_info_list);
-	dec->filter_info_list_lock = SPIN_LOCK_UNLOCKED;
+	spin_lock_init(&dec->filter_info_list_lock);
 }
 
 static void ttusb_dec_exit_filters(struct ttusb_dec *dec)
@@ -1447,7 +1447,7 @@
 
 	memset(dec, 0, sizeof(struct ttusb_dec));
 
-	switch (id->idProduct) {
+	switch (le16_to_cpu(id->idProduct)) {
 		case 0x1006:
 		ttusb_dec_set_model(dec, TTUSB_DEC3000S);
 			break;
@@ -1471,7 +1471,7 @@
 	ttusb_dec_init_dvb(dec);
 
 	dec->adapter->priv = dec;
-	switch (id->idProduct) {
+	switch (le16_to_cpu(id->idProduct)) {
 	case 0x1006:
 		dec->fe = ttusbdecfe_dvbs_attach(&fe_config);
 		break;
@@ -1484,8 +1484,8 @@
 
 	if (dec->fe == NULL) {
 		printk("dvb-ttusb-dec: A frontend driver was not found for device %04x/%04x\n",
-		       dec->udev->descriptor.idVendor,
-		       dec->udev->descriptor.idProduct);
+		       le16_to_cpu(dec->udev->descriptor.idVendor),
+		       le16_to_cpu(dec->udev->descriptor.idProduct));
 	} else {
 		if (dvb_register_frontend(dec->adapter, dec->fe)) {
 			printk("budget-ci: Frontend registration failed!\n");
diff -Nru a/drivers/media/radio/miropcm20-radio.c b/drivers/media/radio/miropcm20-radio.c
--- a/drivers/media/radio/miropcm20-radio.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/media/radio/miropcm20-radio.c	2005-01-10 20:11:17 -08:00
@@ -26,7 +26,7 @@
 #include "miropcm20-rds-core.h"
 
 static int radio_nr = -1;
-MODULE_PARM(radio_nr, "i");
+module_param(radio_nr, int, 0);
 
 struct pcm20_device {
 	unsigned long freq;
diff -Nru a/drivers/media/radio/radio-aimslab.c b/drivers/media/radio/radio-aimslab.c
--- a/drivers/media/radio/radio-aimslab.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/media/radio/radio-aimslab.c	2005-01-10 20:11:17 -08:00
@@ -130,7 +130,7 @@
  * and bit 4 (+16) is to keep the signal strength meter enabled
  */
 
-void send_0_byte(int port, struct rt_device *dev)
+static void send_0_byte(int port, struct rt_device *dev)
 {
 	if ((dev->curvol == 0) || (dev->muted)) {
 		outb_p(128+64+16+  1, port);   /* wr-enable + data low */
@@ -143,7 +143,7 @@
 	sleep_delay(1000); 
 }
 
-void send_1_byte(int port, struct rt_device *dev)
+static void send_1_byte(int port, struct rt_device *dev)
 {
 	if ((dev->curvol == 0) || (dev->muted)) {
 		outb_p(128+64+16+4  +1, port);   /* wr-enable+data high */
@@ -353,9 +353,9 @@
 MODULE_DESCRIPTION("A driver for the RadioTrack/RadioReveal radio card.");
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(io, "i");
+module_param(io, int, 0);
 MODULE_PARM_DESC(io, "I/O address of the RadioTrack card (0x20f or 0x30f)");
-MODULE_PARM(radio_nr, "i");
+module_param(radio_nr, int, 0);
 
 static void __exit cleanup_rtrack_module(void)
 {
diff -Nru a/drivers/media/radio/radio-aztech.c b/drivers/media/radio/radio-aztech.c
--- a/drivers/media/radio/radio-aztech.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/media/radio/radio-aztech.c	2005-01-10 20:11:23 -08:00
@@ -301,8 +301,8 @@
 MODULE_DESCRIPTION("A driver for the Aztech radio card.");
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(io, "i");
-MODULE_PARM(radio_nr, "i");
+module_param(io, int, 0);
+module_param(radio_nr, int, 0);
 MODULE_PARM_DESC(io, "I/O address of the Aztech card (0x350 or 0x358)");
 
 static void __exit aztech_cleanup(void)
diff -Nru a/drivers/media/radio/radio-cadet.c b/drivers/media/radio/radio-cadet.c
--- a/drivers/media/radio/radio-cadet.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/media/radio/radio-cadet.c	2005-01-10 20:11:18 -08:00
@@ -46,7 +46,7 @@
 static int tunestat=0;
 static int sigstrength=0;
 static wait_queue_head_t read_queue;
-struct timer_list tunertimer,rdstimer,readtimer;
+static struct timer_list readtimer;
 static __u8 rdsin=0,rdsout=0,rdsstat=0;
 static unsigned char rdsbuf[RDS_BUFFER];
 static spinlock_t cadet_io_lock;
@@ -280,7 +280,7 @@
 	spin_unlock(&cadet_io_lock);
 }  
 
-void cadet_handler(unsigned long data)
+static void cadet_handler(unsigned long data)
 {
 	/*
 	 * Service the RDS fifo
@@ -604,9 +604,9 @@
 MODULE_DESCRIPTION("A driver for the ADS Cadet AM/FM/RDS radio card.");
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(io, "i");
+module_param(io, int, 0);
 MODULE_PARM_DESC(io, "I/O address of Cadet card (0x330,0x332,0x334,0x336,0x338,0x33a,0x33c,0x33e)");
-MODULE_PARM(radio_nr, "i");
+module_param(radio_nr, int, 0);
 
 static void __exit cadet_cleanup_module(void)
 {
diff -Nru a/drivers/media/radio/radio-gemtek-pci.c b/drivers/media/radio/radio-gemtek-pci.c
--- a/drivers/media/radio/radio-gemtek-pci.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/media/radio/radio-gemtek-pci.c	2005-01-10 20:11:16 -08:00
@@ -294,7 +294,7 @@
 
 MODULE_DEVICE_TABLE( pci, gemtek_pci_id );
 
-static u8 mx = 1;
+static int mx = 1;
 
 static struct file_operations gemtek_pci_fops = {
 	.owner		= THIS_MODULE,
@@ -406,9 +406,9 @@
 MODULE_DESCRIPTION( "The video4linux driver for the Gemtek PCI Radio Card" );
 MODULE_LICENSE("GPL");
 
-MODULE_PARM( mx, "b" );
+module_param(mx, bool, 0);
 MODULE_PARM_DESC( mx, "single digit: 1 - turn off the turner upon module exit (default), 0 - do not" );
-MODULE_PARM( nr_radio, "i");
+module_param(nr_radio, int, 0);
 MODULE_PARM_DESC( nr_radio, "video4linux device number to use");
 
 module_init( gemtek_pci_init_module );
diff -Nru a/drivers/media/radio/radio-gemtek.c b/drivers/media/radio/radio-gemtek.c
--- a/drivers/media/radio/radio-gemtek.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/media/radio/radio-gemtek.c	2005-01-10 20:11:15 -08:00
@@ -127,7 +127,7 @@
 	return 0;
 }
 
-int gemtek_getsigstr(struct gemtek_device *dev)
+static int gemtek_getsigstr(struct gemtek_device *dev)
 {
 	spin_lock(&lock);
 	inb(io);
@@ -284,9 +284,9 @@
 MODULE_DESCRIPTION("A driver for the GemTek Radio Card");
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(io, "i");
+module_param(io, int, 0);
 MODULE_PARM_DESC(io, "I/O address of the GemTek card (0x20c, 0x30c, 0x24c or 0x34c (0x20c or 0x248 have been reported to work for the combined sound/radiocard)).");
-MODULE_PARM(radio_nr, "i");
+module_param(radio_nr, int, 0);
 
 static void __exit gemtek_cleanup(void)
 {
diff -Nru a/drivers/media/radio/radio-maestro.c b/drivers/media/radio/radio-maestro.c
--- a/drivers/media/radio/radio-maestro.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/media/radio/radio-maestro.c	2005-01-10 20:11:20 -08:00
@@ -62,7 +62,7 @@
 #define BITS2FREQ(x)	((x) * FREQ_STEP - FREQ_IF)
 
 static int radio_nr = -1;
-MODULE_PARM(radio_nr, "i");
+module_param(radio_nr, int, 0);
 
 static int radio_ioctl(struct inode *inode, struct file *file,
 		       unsigned int cmd, unsigned long arg);
@@ -256,12 +256,12 @@
 MODULE_DESCRIPTION("Radio driver for the Maestro PCI sound card radio.");
 MODULE_LICENSE("GPL");
 
-void __exit maestro_radio_exit(void)
+static void __exit maestro_radio_exit(void)
 {
 	video_unregister_device(&maestro_radio);
 }
 
-int __init maestro_radio_init(void)
+static int __init maestro_radio_init(void)
 {
 	register __u16 found=0;
 	struct pci_dev *pcidev = NULL;
diff -Nru a/drivers/media/radio/radio-maxiradio.c b/drivers/media/radio/radio-maxiradio.c
--- a/drivers/media/radio/radio-maxiradio.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/media/radio/radio-maxiradio.c	2005-01-10 20:11:22 -08:00
@@ -57,7 +57,7 @@
 static const int clk = 1, data = 2, wren = 4, mo_st = 8, power = 16 ;
 
 static int radio_nr = -1;
-MODULE_PARM(radio_nr, "i");
+module_param(radio_nr, int, 0);
 
 
 #define FREQ_LO		 50*16000
@@ -335,12 +335,12 @@
 	.remove		= __devexit_p(maxiradio_remove_one),
 };
 
-int __init maxiradio_radio_init(void)
+static int __init maxiradio_radio_init(void)
 {
 	return pci_module_init(&maxiradio_driver);
 }
 
-void __exit maxiradio_radio_exit(void)
+static void __exit maxiradio_radio_exit(void)
 {
 	pci_unregister_driver(&maxiradio_driver);
 }
diff -Nru a/drivers/media/radio/radio-rtrack2.c b/drivers/media/radio/radio-rtrack2.c
--- a/drivers/media/radio/radio-rtrack2.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/media/radio/radio-rtrack2.c	2005-01-10 20:11:20 -08:00
@@ -246,9 +246,9 @@
 MODULE_DESCRIPTION("A driver for the RadioTrack II radio card.");
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(io, "i");
+module_param(io, int, 0);
 MODULE_PARM_DESC(io, "I/O address of the RadioTrack card (0x20c or 0x30c)");
-MODULE_PARM(radio_nr, "i");
+module_param(radio_nr, int, 0);
 
 static void __exit rtrack2_cleanup_module(void)
 {
diff -Nru a/drivers/media/radio/radio-sf16fmi.c b/drivers/media/radio/radio-sf16fmi.c
--- a/drivers/media/radio/radio-sf16fmi.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/media/radio/radio-sf16fmi.c	2005-01-10 20:11:22 -08:00
@@ -312,9 +312,9 @@
 MODULE_DESCRIPTION("A driver for the SF16MI radio.");
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(io, "i");
+module_param(io, int, 0);
 MODULE_PARM_DESC(io, "I/O address of the SF16MI card (0x284 or 0x384)");
-MODULE_PARM(radio_nr, "i");
+module_param(radio_nr, int, 0);
 
 static void __exit fmi_cleanup_module(void)
 {
diff -Nru a/drivers/media/radio/radio-sf16fmr2.c b/drivers/media/radio/radio-sf16fmr2.c
--- a/drivers/media/radio/radio-sf16fmr2.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/media/radio/radio-sf16fmr2.c	2005-01-10 20:11:18 -08:00
@@ -408,9 +408,9 @@
 MODULE_DESCRIPTION("A driver for the SF16FMR2 radio.");
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(io, "i");
+module_param(io, int, 0);
 MODULE_PARM_DESC(io, "I/O address of the SF16FMR2 card (should be 0x384, if do not work try 0x284)");
-MODULE_PARM(radio_nr, "i");
+module_param(radio_nr, int, 0);
 
 static void __exit fmr2_cleanup_module(void)
 {
diff -Nru a/drivers/media/radio/radio-terratec.c b/drivers/media/radio/radio-terratec.c
--- a/drivers/media/radio/radio-terratec.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/media/radio/radio-terratec.c	2005-01-10 20:11:18 -08:00
@@ -175,7 +175,7 @@
   	return 0;
 }
 
-int tt_getsigstr(struct tt_device *dev)		/* TODO */
+static int tt_getsigstr(struct tt_device *dev)		/* TODO */
 {
 	if (inb(io) & 2)	/* bit set = no signal present	*/
 		return 0;
@@ -325,9 +325,9 @@
 MODULE_AUTHOR("R.OFFERMANNS & others");
 MODULE_DESCRIPTION("A driver for the TerraTec ActiveRadio Standalone radio card.");
 MODULE_LICENSE("GPL");
-MODULE_PARM(io, "i");
+module_param(io, int, 0);
 MODULE_PARM_DESC(io, "I/O address of the TerraTec ActiveRadio card (0x590 or 0x591)");
-MODULE_PARM(radio_nr, "i");
+module_param(radio_nr, int, 0);
 
 static void __exit terratec_cleanup_module(void)
 {
diff -Nru a/drivers/media/radio/radio-trust.c b/drivers/media/radio/radio-trust.c
--- a/drivers/media/radio/radio-trust.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/media/radio/radio-trust.c	2005-01-10 20:11:19 -08:00
@@ -306,9 +306,9 @@
 MODULE_DESCRIPTION("A driver for the Trust FM Radio card.");
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(io, "i");
+module_param(io, int, 0);
 MODULE_PARM_DESC(io, "I/O address of the Trust FM Radio card (0x350 or 0x358)");
-MODULE_PARM(radio_nr, "i");
+module_param(radio_nr, int, 0);
 
 static void __exit cleanup_trust_module(void)
 {
diff -Nru a/drivers/media/radio/radio-typhoon.c b/drivers/media/radio/radio-typhoon.c
--- a/drivers/media/radio/radio-typhoon.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/media/radio/radio-typhoon.c	2005-01-10 20:11:18 -08:00
@@ -305,17 +305,17 @@
 MODULE_DESCRIPTION("A driver for the Typhoon radio card (a.k.a. EcoRadio).");
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(io, "i");
-MODULE_PARM_DESC(io, "I/O address of the Typhoon card (0x316 or 0x336)");
-MODULE_PARM(mutefreq, "i");
-MODULE_PARM_DESC(mutefreq, "Frequency used when muting the card (in kHz)");
-MODULE_PARM(radio_nr, "i");
-
 static int io = -1;
 static int radio_nr = -1;
 
+module_param(io, int, 0);
+MODULE_PARM_DESC(io, "I/O address of the Typhoon card (0x316 or 0x336)");
+module_param(radio_nr, int, 0);
+
 #ifdef MODULE
 static unsigned long mutefreq = 0;
+module_param(mutefreq, int, 0);
+MODULE_PARM_DESC(mutefreq, "Frequency used when muting the card (in kHz)");
 #endif
 
 static int __init typhoon_init(void)
diff -Nru a/drivers/media/radio/radio-zoltrix.c b/drivers/media/radio/radio-zoltrix.c
--- a/drivers/media/radio/radio-zoltrix.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/media/radio/radio-zoltrix.c	2005-01-10 20:11:23 -08:00
@@ -169,7 +169,7 @@
 
 /* Get signal strength */
 
-int zol_getsigstr(struct zol_device *dev)
+static int zol_getsigstr(struct zol_device *dev)
 {
 	int a, b;
 
@@ -194,7 +194,7 @@
  	return (0);
 }
 
-int zol_is_stereo (struct zol_device *dev)
+static int zol_is_stereo (struct zol_device *dev)
 {
 	int x1, x2;
 
@@ -382,9 +382,9 @@
 MODULE_DESCRIPTION("A driver for the Zoltrix Radio Plus.");
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(io, "i");
+module_param(io, int, 0);
 MODULE_PARM_DESC(io, "I/O address of the Zoltrix Radio Plus (0x20c or 0x30c)");
-MODULE_PARM(radio_nr, "i");
+module_param(radio_nr, int, 0);
 
 static void __exit zoltrix_cleanup_module(void)
 {
diff -Nru a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig
--- a/drivers/media/video/Kconfig	2005-01-10 20:11:22 -08:00
+++ b/drivers/media/video/Kconfig	2005-01-10 20:11:22 -08:00
@@ -22,7 +22,7 @@
 	  <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.
+	  "I2C bit-banging interfaces" in the device drivers section.
 
 	  To compile this driver as a module, choose M here: the
 	  module will be called bttv.
diff -Nru a/drivers/media/video/adv7170.c b/drivers/media/video/adv7170.c
--- a/drivers/media/video/adv7170.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/media/video/adv7170.c	2005-01-10 20:11:22 -08:00
@@ -61,7 +61,7 @@
 #include <linux/video_encoder.h>
 
 static int debug = 0;
-MODULE_PARM(debug, "i");
+module_param(debug, int, 0);
 MODULE_PARM_DESC(debug, "Debug level (0-1)");
 
 #define dprintk(num, format, args...) \
diff -Nru a/drivers/media/video/adv7175.c b/drivers/media/video/adv7175.c
--- a/drivers/media/video/adv7175.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/media/video/adv7175.c	2005-01-10 20:11:22 -08:00
@@ -57,7 +57,7 @@
 #include <linux/video_encoder.h>
 
 static int debug = 0;
-MODULE_PARM(debug, "i");
+module_param(debug, int, 0);
 MODULE_PARM_DESC(debug, "Debug level (0-1)");
 
 #define dprintk(num, format, args...) \
diff -Nru a/drivers/media/video/bt819.c b/drivers/media/video/bt819.c
--- a/drivers/media/video/bt819.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/media/video/bt819.c	2005-01-10 20:11:16 -08:00
@@ -61,7 +61,7 @@
 #include <linux/video_decoder.h>
 
 static int debug = 0;
-MODULE_PARM(debug, "i");
+module_param(debug, int, 0);
 MODULE_PARM_DESC(debug, "Debug level (0-1)");
 
 #define dprintk(num, format, args...) \
@@ -95,7 +95,7 @@
 };
 
 /* for values, see the bt819 datasheet */
-struct timing timing_data[] = {
+static struct timing timing_data[] = {
 	{864 - 24, 20, 625 - 2, 1, 0x0504, 0x0000},
 	{858 - 24, 20, 525 - 2, 1, 0x00f8, 0x0000},
 };
diff -Nru a/drivers/media/video/bt856.c b/drivers/media/video/bt856.c
--- a/drivers/media/video/bt856.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/media/video/bt856.c	2005-01-10 20:11:15 -08:00
@@ -61,7 +61,7 @@
 #include <linux/video_encoder.h>
 
 static int debug = 0;
-MODULE_PARM(debug, "i");
+module_param(debug, int, 0);
 MODULE_PARM_DESC(debug, "Debug level (0-1)");
 
 #define dprintk(num, format, args...) \
diff -Nru a/drivers/media/video/bttv-cards.c b/drivers/media/video/bttv-cards.c
--- a/drivers/media/video/bttv-cards.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/media/video/bttv-cards.c	2005-01-10 20:11:19 -08:00
@@ -2158,7 +2158,7 @@
 	// .has_remote     = 1,
 }};
 
-const unsigned int bttv_num_tvcards = ARRAY_SIZE(bttv_tvcards);
+static const unsigned int bttv_num_tvcards = ARRAY_SIZE(bttv_tvcards);
 
 /* ----------------------------------------------------------------------- */
 
@@ -2327,10 +2327,10 @@
 	//todo: if(has_tda9874) btv->audio_hook = fv2000s_audio;
 }
 
-int miro_tunermap[] = { 0,6,2,3,   4,5,6,0,  3,0,4,5,  5,2,16,1,
-			14,2,17,1, 4,1,4,3,  1,2,16,1, 4,4,4,4 };
-int miro_fmtuner[]  = { 0,0,0,0,   0,0,0,0,  0,0,0,0,  0,0,0,1,
-			1,1,1,1,   1,1,1,0,  0,0,0,0,  0,1,0,0 };
+static int miro_tunermap[] = { 0,6,2,3,   4,5,6,0,  3,0,4,5,  5,2,16,1,
+			       14,2,17,1, 4,1,4,3,  1,2,16,1, 4,4,4,4 };
+static int miro_fmtuner[]  = { 0,0,0,0,   0,0,0,0,  0,0,0,0,  0,0,0,1,
+			       1,1,1,1,   1,1,1,0,  0,0,0,0,  0,1,0,0 };
 
 static void miro_pinnacle_gpio(struct bttv *btv)
 {
@@ -3072,7 +3072,7 @@
 /* ----------------------------------------------------------------------- */
 /* AVermedia specific stuff, from  bktr_card.c                             */
 
-int tuner_0_table[] = {
+static int tuner_0_table[] = {
         TUNER_PHILIPS_NTSC,  TUNER_PHILIPS_PAL /* PAL-BG*/,
         TUNER_PHILIPS_PAL,   TUNER_PHILIPS_PAL /* PAL-I*/,
         TUNER_PHILIPS_PAL,   TUNER_PHILIPS_PAL,
@@ -3087,7 +3087,7 @@
         PHILIPS_FR1236_SECAM, PHILIPS_FR1216_PAL};
 #endif
 
-int tuner_1_table[] = {
+static int tuner_1_table[] = {
         TUNER_TEMIC_NTSC,  TUNER_TEMIC_PAL,
 	TUNER_TEMIC_PAL,   TUNER_TEMIC_PAL,
 	TUNER_TEMIC_PAL,   TUNER_TEMIC_PAL,
@@ -3281,7 +3281,7 @@
  * Brutally hacked by Dan Sheridan <dan.sheridan@contact.org.uk> djs52 8/3/00
  */
 
-void bus_low(struct bttv *btv, int bit)
+static void bus_low(struct bttv *btv, int bit)
 {
 	if (btv->mbox_ior) {
 		gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
@@ -3298,7 +3298,7 @@
 	}
 }
 
-void bus_high(struct bttv *btv, int bit)
+static void bus_high(struct bttv *btv, int bit)
 {
 	if (btv->mbox_ior) {
 		gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
@@ -3315,7 +3315,7 @@
 	}
 }
 
-int bus_in(struct bttv *btv, int bit)
+static int bus_in(struct bttv *btv, int bit)
 {
 	if (btv->mbox_ior) {
 		gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
diff -Nru a/drivers/media/video/bttv-driver.c b/drivers/media/video/bttv-driver.c
--- a/drivers/media/video/bttv-driver.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/media/video/bttv-driver.c	2005-01-10 20:11:21 -08:00
@@ -313,12 +313,12 @@
 		.sram           = -1,
 	}
 };
-const unsigned int BTTV_TVNORMS = ARRAY_SIZE(bttv_tvnorms);
+static const unsigned int BTTV_TVNORMS = ARRAY_SIZE(bttv_tvnorms);
 
 /* ----------------------------------------------------------------------- */
 /* bttv format list
    packed pixel formats must come first */
-const struct bttv_format bttv_formats[] = {
+static const struct bttv_format bttv_formats[] = {
 	{
 		.name     = "8 bpp, gray",
 		.palette  = VIDEO_PALETTE_GREY,
@@ -470,7 +470,7 @@
 		.flags    = FORMAT_FLAGS_RAW,
 	}
 };
-const unsigned int BTTV_FORMATS = ARRAY_SIZE(bttv_formats);
+static const unsigned int BTTV_FORMATS = ARRAY_SIZE(bttv_formats);
 
 /* ----------------------------------------------------------------------- */
 
@@ -619,7 +619,7 @@
 	}
 
 };
-const int BTTV_CTLS = ARRAY_SIZE(bttv_ctls);
+static const int BTTV_CTLS = ARRAY_SIZE(bttv_ctls);
 
 /* ----------------------------------------------------------------------- */
 /* resource management                                                     */
@@ -755,7 +755,7 @@
 }
 
 /* used to switch between the bt848's analog/digital video capture modes */
-void bt848A_set_timing(struct bttv *btv)
+static void bt848A_set_timing(struct bttv *btv)
 {
 	int i, len;
 	int table_idx = bttv_tvnorms[btv->tvnorm].sram;
@@ -3030,7 +3030,7 @@
 	.minor    = -1,
 };
 
-struct video_device bttv_vbi_template =
+static struct video_device bttv_vbi_template =
 {
 	.name     = "bt848/878 vbi",
 	.type     = VID_TYPE_TUNER|VID_TYPE_TELETEXT,
@@ -3717,8 +3717,8 @@
 	/* initialize structs / fill in defaults */
         init_MUTEX(&btv->lock);
         init_MUTEX(&btv->reslock);
-        btv->s_lock    = SPIN_LOCK_UNLOCKED;
-        btv->gpio_lock = SPIN_LOCK_UNLOCKED;
+        spin_lock_init(&btv->s_lock);
+        spin_lock_init(&btv->gpio_lock);
         init_waitqueue_head(&btv->gpioq);
         init_waitqueue_head(&btv->i2c_queue);
         INIT_LIST_HEAD(&btv->c.subs);
@@ -3942,7 +3942,7 @@
 
 	/* save pci state */
 	pci_save_state(pci_dev);
-	if (0 != pci_set_power_state(pci_dev, state)) {
+	if (0 != pci_set_power_state(pci_dev, pci_choose_state(pci_dev, state))) {
 		pci_disable_device(pci_dev);
 		btv->state.disabled = 1;
 	}
@@ -3961,7 +3961,7 @@
 		pci_enable_device(pci_dev);
 		btv->state.disabled = 0;
 	}
-	pci_set_power_state(pci_dev, 0);
+	pci_set_power_state(pci_dev, PCI_D0);
 	pci_restore_state(pci_dev);
 
 	/* restore bt878 state */
diff -Nru a/drivers/media/video/bttv-i2c.c b/drivers/media/video/bttv-i2c.c
--- a/drivers/media/video/bttv-i2c.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/media/video/bttv-i2c.c	2005-01-10 20:11:16 -08:00
@@ -51,7 +51,7 @@
 /* ----------------------------------------------------------------------- */
 /* I2C functions - bitbanging adapter (software i2c)                       */
 
-void bttv_bit_setscl(void *data, int state)
+static void bttv_bit_setscl(void *data, int state)
 {
 	struct bttv *btv = (struct bttv*)data;
 
@@ -63,7 +63,7 @@
 	btread(BT848_I2C);
 }
 
-void bttv_bit_setsda(void *data, int state)
+static void bttv_bit_setsda(void *data, int state)
 {
 	struct bttv *btv = (struct bttv*)data;
 
@@ -244,7 +244,7 @@
        	return retval;
 }
 
-int bttv_i2c_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg msgs[], int num)
+static int bttv_i2c_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg msgs[], int num)
 {
 	struct bttv *btv = i2c_get_adapdata(i2c_adap);
 	int retval = 0;
diff -Nru a/drivers/media/video/bttv-risc.c b/drivers/media/video/bttv-risc.c
--- a/drivers/media/video/bttv-risc.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/media/video/bttv-risc.c	2005-01-10 20:11:19 -08:00
@@ -109,7 +109,7 @@
 	return 0;
 }
 
-int
+static int
 bttv_risc_planar(struct bttv *btv, struct btcx_riscmem *risc,
 		 struct scatterlist *sglist,
 		 unsigned int yoffset,  unsigned int ybpl,
@@ -227,7 +227,7 @@
 	return 0;
 }
 
-int
+static int
 bttv_risc_overlay(struct bttv *btv, struct btcx_riscmem *risc,
 		  const struct bttv_format *fmt, struct bttv_overlay *ov,
 		  int skip_even, int skip_odd)
@@ -315,7 +315,7 @@
 
 /* ---------------------------------------------------------- */
 
-void
+static void
 bttv_calc_geo(struct bttv *btv, struct bttv_geometry *geo,
 	      int width, int height, int interleaved, int norm)
 {
@@ -363,7 +363,7 @@
         }
 }
 
-void
+static void
 bttv_apply_geo(struct bttv *btv, struct bttv_geometry *geo, int odd)
 {
         int off = odd ? 0x80 : 0x00;
diff -Nru a/drivers/media/video/bttv.h b/drivers/media/video/bttv.h
--- a/drivers/media/video/bttv.h	2005-01-10 20:11:16 -08:00
+++ b/drivers/media/video/bttv.h	2005-01-10 20:11:16 -08:00
@@ -219,7 +219,6 @@
 };
 
 extern struct tvcard bttv_tvcards[];
-extern const unsigned int bttv_num_tvcards;
 
 /* identification / initialization of the card */
 extern void bttv_idcard(struct bttv *btv);
@@ -325,8 +324,6 @@
 /* ---------------------------------------------------------- */
 /* i2c                                                        */
 
-extern void bttv_bit_setscl(void *data, int state);
-extern void bttv_bit_setsda(void *data, int state);
 extern void bttv_call_i2c_clients(struct bttv *btv, unsigned int cmd, void *arg);
 extern int bttv_I2CRead(struct bttv *btv, unsigned char addr, char *probe_for);
 extern int bttv_I2CWrite(struct bttv *btv, unsigned char addr, unsigned char b1,
diff -Nru a/drivers/media/video/bttvp.h b/drivers/media/video/bttvp.h
--- a/drivers/media/video/bttvp.h	2005-01-10 20:11:24 -08:00
+++ b/drivers/media/video/bttvp.h	2005-01-10 20:11:24 -08:00
@@ -89,7 +89,6 @@
 	int   sram;
 };
 extern const struct bttv_tvnorm bttv_tvnorms[];
-extern const unsigned int BTTV_TVNORMS;
 
 struct bttv_format {
 	char *name;
@@ -101,8 +100,6 @@
 	int  flags;
 	int  hshift,vshift;   /* for planar modes   */
 };
-extern const struct bttv_format bttv_formats[];
-extern const unsigned int BTTV_FORMATS;
 
 /* ---------------------------------------------------------- */
 
@@ -173,22 +170,6 @@
 		     struct scatterlist *sglist,
 		     unsigned int offset, unsigned int bpl,
 		     unsigned int pitch, unsigned int lines);
-int bttv_risc_planar(struct bttv *btv, struct btcx_riscmem *risc,
-		     struct scatterlist *sglist,
-		     unsigned int yoffset,  unsigned int ybpl,
-		     unsigned int ypadding, unsigned int ylines,
-		     unsigned int uoffset,  unsigned int voffset,
-		     unsigned int hshift,   unsigned int vshift,
-		     unsigned int cpadding);
-int bttv_risc_overlay(struct bttv *btv, struct btcx_riscmem *risc,
-		      const struct bttv_format *fmt,
-		      struct bttv_overlay *ov,
-		      int skip_top, int skip_bottom);
-
-/* calculate / apply geometry settings */
-void bttv_calc_geo(struct bttv *btv, struct bttv_geometry *geo,
-		   int width, int height, int interleaved, int norm);
-void bttv_apply_geo(struct bttv *btv, struct bttv_geometry *geo, int top);
 
 /* control dma register + risc main loop */
 void bttv_set_dma(struct bttv *btv, int override);
diff -Nru a/drivers/media/video/bw-qcam.c b/drivers/media/video/bw-qcam.c
--- a/drivers/media/video/bw-qcam.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/media/video/bw-qcam.c	2005-01-10 20:11:17 -08:00
@@ -82,9 +82,9 @@
 static unsigned int yieldlines=4;  /* Yield after this many during capture */
 static int video_nr = -1;
 
-MODULE_PARM(maxpoll,"i");
-MODULE_PARM(yieldlines,"i");   
-MODULE_PARM(video_nr,"i");
+module_param(maxpoll, int, 0);
+module_param(yieldlines, int, 0);
+module_param(video_nr, int, 0);
 
 static inline int read_lpstatus(struct qcam_device *q)
 {
@@ -441,7 +441,7 @@
 /* Reset the QuickCam and program for brightness, contrast,
  * white-balance, and resolution. */
 
-void qc_set(struct qcam_device *q)
+static void qc_set(struct qcam_device *q)
 {
 	int val;
 	int val2;
@@ -591,7 +591,7 @@
  * n=2^(bit depth)-1.  Ask me for more details if you don't understand
  * this. */
 
-long qc_capture(struct qcam_device * q, char __user *buf, unsigned long len)
+static long qc_capture(struct qcam_device * q, char __user *buf, unsigned long len)
 {
 	int i, j, k, yield;
 	int bytes;
@@ -891,7 +891,7 @@
 static struct qcam_device *qcams[MAX_CAMS];
 static unsigned int num_cams = 0;
 
-int init_bwqcam(struct parport *port)
+static int init_bwqcam(struct parport *port)
 {
 	struct qcam_device *qcam;
 
@@ -934,7 +934,7 @@
 	return 0;
 }
 
-void close_bwqcam(struct qcam_device *qcam)
+static void close_bwqcam(struct qcam_device *qcam)
 {
 	video_unregister_device(&qcam->vdev);
 	parport_unregister_device(qcam->pdev);
@@ -946,7 +946,7 @@
  *       -- March 14, 1999  Billy Donahue <billy@escape.com> */
 #ifdef MODULE
 static char *parport[MAX_CAMS] = { NULL, };
-MODULE_PARM(parport, "1-" __MODULE_STRING(MAX_CAMS) "s");
+module_param_array(parport, charp, NULL, 0);
 #endif
 
 static int accept_bwqcam(struct parport *port)
diff -Nru a/drivers/media/video/c-qcam.c b/drivers/media/video/c-qcam.c
--- a/drivers/media/video/c-qcam.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/media/video/c-qcam.c	2005-01-10 20:11:18 -08:00
@@ -741,7 +741,7 @@
 static struct qcam_device *qcams[MAX_CAMS];
 static unsigned int num_cams = 0;
 
-int init_cqcam(struct parport *port)
+static int init_cqcam(struct parport *port)
 {
 	struct qcam_device *qcam;
 
@@ -798,7 +798,7 @@
 	return 0;
 }
 
-void close_cqcam(struct qcam_device *qcam)
+static void close_cqcam(struct qcam_device *qcam)
 {
 	video_unregister_device(&qcam->vdev);
 	parport_unregister_device(qcam->pdev);
@@ -842,13 +842,14 @@
 MODULE_DESCRIPTION(BANNER);
 MODULE_LICENSE("GPL");
 
+/* FIXME: parport=auto would never have worked, surely? --RR */
 MODULE_PARM_DESC(parport ,"parport=<auto|n[,n]...> for port detection method\n\
 probe=<0|1|2> for camera detection method\n\
 force_rgb=<0|1> for RGB data format (default BGR)");
-MODULE_PARM(parport, "1-" __MODULE_STRING(MAX_CAMS) "i");
-MODULE_PARM(probe, "i");
-MODULE_PARM(force_rgb, "i");
-MODULE_PARM(video_nr,"i");
+module_param_array(parport, int, NULL, 0);
+module_param(probe, int, 0);
+module_param(force_rgb, bool, 0);
+module_param(video_nr, int, 0);
 
 module_init(cqcam_init);
 module_exit(cqcam_cleanup);
diff -Nru a/drivers/media/video/cpia.c b/drivers/media/video/cpia.c
--- a/drivers/media/video/cpia.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/media/video/cpia.c	2005-01-10 20:11:21 -08:00
@@ -57,7 +57,7 @@
 static int video_nr = -1;
 
 #ifdef MODULE
-MODULE_PARM(video_nr,"i");
+module_param(video_nr, int, 0);
 MODULE_AUTHOR("Scott J. Bertin <sbertin@securenym.net> & Peter Pregler <Peter_Pregler@email.com> & Johannes Erdfelt <johannes@erdfeld.com>");
 MODULE_DESCRIPTION("V4L-driver for Vision CPiA based cameras");
 MODULE_LICENSE("GPL");
diff -Nru a/drivers/media/video/cpia_pp.c b/drivers/media/video/cpia_pp.c
--- a/drivers/media/video/cpia_pp.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/media/video/cpia_pp.c	2005-01-10 20:11:15 -08:00
@@ -71,7 +71,7 @@
 MODULE_DESCRIPTION("Parallel port driver for Vision CPiA based cameras");
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(parport, "1-" __MODULE_STRING(PARPORT_MAX) "s");
+module_param_array(parport, charp, NULL, 0);
 MODULE_PARM_DESC(parport, "'auto' or a list of parallel port numbers. Just like lp.");
 #else
 static int parport_nr[PARPORT_MAX] __initdata =
diff -Nru a/drivers/media/video/cx88/cx88-mpeg.c b/drivers/media/video/cx88/cx88-mpeg.c
--- a/drivers/media/video/cx88/cx88-mpeg.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/media/video/cx88/cx88-mpeg.c	2005-01-10 20:11:23 -08:00
@@ -343,7 +343,7 @@
 
 	/* initialize driver struct */
         init_MUTEX(&dev->lock);
-	dev->slock = SPIN_LOCK_UNLOCKED;
+	spin_lock_init(&dev->slock);
 
 	/* init dma queue */
 	INIT_LIST_HEAD(&dev->mpegq.active);
diff -Nru a/drivers/media/video/cx88/cx88-video.c b/drivers/media/video/cx88/cx88-video.c
--- a/drivers/media/video/cx88/cx88-video.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/media/video/cx88/cx88-video.c	2005-01-10 20:11:19 -08:00
@@ -2026,7 +2026,7 @@
 
 	/* initialize driver struct */
         init_MUTEX(&dev->lock);
-	dev->slock = SPIN_LOCK_UNLOCKED;
+	spin_lock_init(&dev->slock);
 	core->tvnorm = tvnorms;
 
 	/* init video dma queues */
diff -Nru a/drivers/media/video/dpc7146.c b/drivers/media/video/dpc7146.c
--- a/drivers/media/video/dpc7146.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/media/video/dpc7146.c	2005-01-10 20:11:18 -08:00
@@ -55,11 +55,10 @@
 #define DPC_BOARD_CAN_DO_VBI(dev)   (dev->revision != 0) 
 
 static int debug = 0;
-MODULE_PARM(debug,"i");
+module_param(debug, int, 0);
 MODULE_PARM_DESC(debug, "debug verbosity");
 
-/* global variables */
-int dpc_num = 0;
+static int dpc_num = 0;
 
 #define DPC_INPUTS	2
 static struct v4l2_input dpc_inputs[DPC_INPUTS] = {
@@ -379,7 +378,7 @@
 	.irq_func	= NULL,
 };	
 
-int __init dpc_init_module(void) 
+static int __init dpc_init_module(void)
 {
 	if( 0 != saa7146_register_extension(&extension)) {
 		DEB_S(("failed to register extension.\n"));
@@ -389,7 +388,7 @@
 	return 0;
 }
 
-void __exit dpc_cleanup_module(void) 
+static void __exit dpc_cleanup_module(void)
 {
 	saa7146_unregister_extension(&extension);
 }
diff -Nru a/drivers/media/video/hexium_gemini.c b/drivers/media/video/hexium_gemini.c
--- a/drivers/media/video/hexium_gemini.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/media/video/hexium_gemini.c	2005-01-10 20:11:17 -08:00
@@ -26,7 +26,7 @@
 #include <media/saa7146_vv.h>
 
 static int debug = 0;
-MODULE_PARM(debug, "i");
+module_param(debug, int, 0);
 MODULE_PARM_DESC(debug, "debug verbosity");
 
 /* global variables */
diff -Nru a/drivers/media/video/hexium_orion.c b/drivers/media/video/hexium_orion.c
--- a/drivers/media/video/hexium_orion.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/media/video/hexium_orion.c	2005-01-10 20:11:23 -08:00
@@ -26,7 +26,7 @@
 #include <media/saa7146_vv.h>
 
 static int debug = 0;
-MODULE_PARM(debug, "i");
+module_param(debug, int, 0);
 MODULE_PARM_DESC(debug, "debug verbosity");
 
 /* global variables */
@@ -499,7 +499,7 @@
 	.irq_func = NULL,
 };
 
-int __init hexium_init_module(void)
+static int __init hexium_init_module(void)
 {
 	if (0 != saa7146_register_extension(&extension)) {
 		DEB_S(("failed to register extension.\n"));
@@ -509,7 +509,7 @@
 	return 0;
 }
 
-void __exit hexium_cleanup_module(void)
+static void __exit hexium_cleanup_module(void)
 {
 	saa7146_unregister_extension(&extension);
 }
diff -Nru a/drivers/media/video/ir-kbd-i2c.c b/drivers/media/video/ir-kbd-i2c.c
--- a/drivers/media/video/ir-kbd-i2c.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/media/video/ir-kbd-i2c.c	2005-01-10 20:11:15 -08:00
@@ -155,16 +155,6 @@
 
 /* ----------------------------------------------------------------------- */
 
-static inline int reverse(int data, int bits)
-{
-	int i,c;
-
-	for (c=0,i=0; i<bits; i++) {
-		c |= (((data & (1<<i)) ? 1:0)) << (bits-1-i);
-	}
-	return c;
-}
-
 static int get_key_haup(struct IR *ir, u32 *ir_key, u32 *ir_raw)
 {
 	unsigned char buf[3];
diff -Nru a/drivers/media/video/meye.c b/drivers/media/video/meye.c
--- a/drivers/media/video/meye.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/media/video/meye.c	2005-01-10 20:11:19 -08:00
@@ -1829,14 +1829,14 @@
 		goto outvmalloc;
 	}
 
-	meye.grabq_lock = SPIN_LOCK_UNLOCKED;
+	spin_lock_init(&meye.grabq_lock);
 	meye.grabq = kfifo_alloc(sizeof(int) * MEYE_MAX_BUFNBRS, GFP_KERNEL,
 				 &meye.grabq_lock);
 	if (IS_ERR(meye.grabq)) {
 		printk(KERN_ERR "meye: fifo allocation failed\n");
 		goto outkfifoalloc1;
 	}
-	meye.doneq_lock = SPIN_LOCK_UNLOCKED;
+	spin_lock_init(&meye.doneq_lock);
 	meye.doneq = kfifo_alloc(sizeof(int) * MEYE_MAX_BUFNBRS, GFP_KERNEL,
 				 &meye.doneq_lock);
 	if (IS_ERR(meye.doneq)) {
diff -Nru a/drivers/media/video/msp3400.c b/drivers/media/video/msp3400.c
--- a/drivers/media/video/msp3400.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/media/video/msp3400.c	2005-01-10 20:11:20 -08:00
@@ -633,14 +633,6 @@
 	char *name;
 };
 
-struct REGISTER_DUMP d1[] = {
-	{ 0x007e, "autodetect" },
-	{ 0x0023, "C_AD_BITS " },
-	{ 0x0038, "ADD_BITS  " },
-	{ 0x003e, "CIB_BITS  " },
-	{ 0x0057, "ERROR_RATE" },
-};
-
 static int
 autodetect_stereo(struct i2c_client *client)
 {
diff -Nru a/drivers/media/video/mxb.c b/drivers/media/video/mxb.c
--- a/drivers/media/video/mxb.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/media/video/mxb.c	2005-01-10 20:11:16 -08:00
@@ -1012,7 +1012,7 @@
 	.irq_func	= NULL,
 };	
 
-int __init mxb_init_module(void) 
+static int __init mxb_init_module(void)
 {
 	if( 0 != saa7146_register_extension(&extension)) {
 		DEB_S(("failed to register extension.\n"));
@@ -1022,7 +1022,7 @@
 	return 0;
 }
 
-void __exit mxb_cleanup_module(void) 
+static void __exit mxb_cleanup_module(void)
 {
 	saa7146_unregister_extension(&extension);
 }
diff -Nru a/drivers/media/video/mxb.h b/drivers/media/video/mxb.h
--- a/drivers/media/video/mxb.h	2005-01-10 20:11:22 -08:00
+++ b/drivers/media/video/mxb.h	2005-01-10 20:11:22 -08:00
@@ -12,7 +12,7 @@
 
 /* these are the available audio sources, which can switched
    to the line- and cd-output individually */
-struct v4l2_audio mxb_audios[MXB_AUDIOS] = {
+static struct v4l2_audio mxb_audios[MXB_AUDIOS] = {
 	    {
 		.index	= 0,
 		.name	= "Tuner",
diff -Nru a/drivers/media/video/pms.c b/drivers/media/video/pms.c
--- a/drivers/media/video/pms.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/media/video/pms.c	2005-01-10 20:11:21 -08:00
@@ -896,7 +896,7 @@
 	.fops           = &pms_fops,
 };
 
-struct pms_device pms_device;
+static struct pms_device pms_device;
 
 
 /*
@@ -1036,9 +1036,9 @@
 	return video_register_device((struct video_device *)&pms_device, VFL_TYPE_GRABBER, video_nr);
 }
 
-MODULE_PARM(io_port,"i");
-MODULE_PARM(mem_base,"i");
-MODULE_PARM(video_nr,"i");
+module_param(io_port, int, 0);
+module_param(mem_base, int, 0);
+module_param(video_nr, int, 0);
 MODULE_LICENSE("GPL");
 
 
diff -Nru a/drivers/media/video/saa7110.c b/drivers/media/video/saa7110.c
--- a/drivers/media/video/saa7110.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/media/video/saa7110.c	2005-01-10 20:11:15 -08:00
@@ -46,7 +46,7 @@
 #include <linux/video_decoder.h>
 
 static int debug = 0;
-MODULE_PARM(debug, "i");
+module_param(debug, int, 0);
 MODULE_PARM_DESC(debug, "Debug level (0-1)");
 
 #define dprintk(num, format, args...) \
diff -Nru a/drivers/media/video/saa7114.c b/drivers/media/video/saa7114.c
--- a/drivers/media/video/saa7114.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/media/video/saa7114.c	2005-01-10 20:11:22 -08:00
@@ -63,7 +63,7 @@
 #include <linux/video_decoder.h>
 
 static int debug = 0;
-MODULE_PARM(debug, "i");
+module_param(debug, int, 0);
 MODULE_PARM_DESC(debug, "Debug level (0-1)");
 
 #define dprintk(num, format, args...) \
diff -Nru a/drivers/media/video/saa7134/saa7134-core.c b/drivers/media/video/saa7134/saa7134-core.c
--- a/drivers/media/video/saa7134/saa7134-core.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/media/video/saa7134/saa7134-core.c	2005-01-10 20:11:17 -08:00
@@ -225,7 +225,7 @@
 /* ------------------------------------------------------------------ */
 
 /* nr of (saa7134-)pages for the given buffer size */
-int saa7134_buffer_pages(int size)
+static int saa7134_buffer_pages(int size)
 {
 	size  = PAGE_ALIGN(size);
 	size += PAGE_SIZE; /* for non-page-aligned buffers */
@@ -630,7 +630,7 @@
 	saa_writel(SAA7134_IRQ1, 0);
 	saa_writel(SAA7134_IRQ2, 0);
         init_MUTEX(&dev->lock);
-	dev->slock = SPIN_LOCK_UNLOCKED;
+	spin_lock_init(&dev->slock);
 
 	saa7134_track_gpio(dev,"pre-init");
 	saa7134_video_init1(dev);
diff -Nru a/drivers/media/video/saa7134/saa7134-video.c b/drivers/media/video/saa7134/saa7134-video.c
--- a/drivers/media/video/saa7134/saa7134-video.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/media/video/saa7134/saa7134-video.c	2005-01-10 20:11:16 -08:00
@@ -1378,7 +1378,7 @@
 
 /* ------------------------------------------------------------------ */
 
-void saa7134_vbi_fmt(struct saa7134_dev *dev, struct v4l2_format *f)
+static void saa7134_vbi_fmt(struct saa7134_dev *dev, struct v4l2_format *f)
 {
 	struct saa7134_tvnorm *norm = dev->tvnorm;
 
@@ -1401,8 +1401,8 @@
 #endif
 }
 
-int saa7134_g_fmt(struct saa7134_dev *dev, struct saa7134_fh *fh,
-		  struct v4l2_format *f)
+static int saa7134_g_fmt(struct saa7134_dev *dev, struct saa7134_fh *fh,
+			 struct v4l2_format *f)
 {
 	switch (f->type) {
 	case V4L2_BUF_TYPE_VIDEO_CAPTURE:
@@ -1427,8 +1427,8 @@
 	}
 }
 
-int saa7134_try_fmt(struct saa7134_dev *dev, struct saa7134_fh *fh,
-		    struct v4l2_format *f)
+static int saa7134_try_fmt(struct saa7134_dev *dev, struct saa7134_fh *fh,
+			   struct v4l2_format *f)
 {
 	int err;
 
@@ -1492,8 +1492,8 @@
 	}
 }
 
-int saa7134_s_fmt(struct saa7134_dev *dev, struct saa7134_fh *fh,
-		  struct v4l2_format *f)
+static int saa7134_s_fmt(struct saa7134_dev *dev, struct saa7134_fh *fh,
+			 struct v4l2_format *f)
 {
 	unsigned long flags;
 	int err;
diff -Nru a/drivers/media/video/saa7185.c b/drivers/media/video/saa7185.c
--- a/drivers/media/video/saa7185.c	2005-01-10 20:11:24 -08:00
+++ b/drivers/media/video/saa7185.c	2005-01-10 20:11:24 -08:00
@@ -57,7 +57,7 @@
 #include <linux/video_encoder.h>
 
 static int debug = 0;
-MODULE_PARM(debug, "i");
+module_param(debug, int, 0);
 MODULE_PARM_DESC(debug, "Debug level (0-1)");
 
 #define dprintk(num, format, args...) \
diff -Nru a/drivers/media/video/stradis.c b/drivers/media/video/stradis.c
--- a/drivers/media/video/stradis.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/media/video/stradis.c	2005-01-10 20:11:22 -08:00
@@ -60,7 +60,7 @@
 static int saa_num = 0;		/* number of SAA7146s in use */
 
 static int video_nr = -1;
-MODULE_PARM(video_nr,"i");
+module_param(video_nr, int, 0);
 MODULE_LICENSE("GPL");
 
 
@@ -96,13 +96,6 @@
 #define debVideo	(NewCard ? nDebVideo : oDebVideo)
 #define debAudio	(NewCard ? nDebAudio : oDebAudio)
 #define debDMA		(NewCard ? nDebDMA : oDebDMA)
-
-#ifdef DEBUG
-int stradis_driver(void)	/* for the benefit of ksymoops */
-{
-	return 1;
-}
-#endif
 
 #ifdef USE_RESCUE_EEPROM_SDM275
 static unsigned char rescue_eeprom[64] = {
diff -Nru a/drivers/media/video/tda7432.c b/drivers/media/video/tda7432.c
--- a/drivers/media/video/tda7432.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/media/video/tda7432.c	2005-01-10 20:11:21 -08:00
@@ -60,13 +60,13 @@
 MODULE_DESCRIPTION("bttv driver for the tda7432 audio processor chip");
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(debug,"i");
-MODULE_PARM(loudness,"i");
+static int maxvol;
+static int loudness; /* disable loudness by default */
+static int debug;	 /* insmod parameter */
+module_param(debug, int, S_IRUGO | S_IWUSR);
+module_param(loudness, int, S_IRUGO);
 MODULE_PARM_DESC(maxvol,"Set maximium volume to +20db (0), default is 0db(1)");
-MODULE_PARM(maxvol,"i");
-static int maxvol = 0;
-static int loudness = 0; /* disable loudness by default */
-static int debug = 0;	 /* insmod parameter */
+module_param(maxvol, int, S_IRUGO | S_IWUSR);
 
 
 /* Address to scan (I2C address of this chip) */
diff -Nru a/drivers/media/video/tda9875.c b/drivers/media/video/tda9875.c
--- a/drivers/media/video/tda9875.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/media/video/tda9875.c	2005-01-10 20:11:18 -08:00
@@ -34,10 +34,10 @@
 #include <media/audiochip.h>
 #include <media/id.h>
 
-MODULE_PARM(debug,"i");
+static int debug; /* insmod parameter */
+module_param(debug, int, S_IRUGO | S_IWUSR);
 MODULE_LICENSE("GPL");
 
-static int debug = 0;	/* insmod parameter */
 
 /* Addresses to scan */
 static unsigned short normal_i2c[] =  {
diff -Nru a/drivers/media/video/tuner-3036.c b/drivers/media/video/tuner-3036.c
--- a/drivers/media/video/tuner-3036.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/media/video/tuner-3036.c	2005-01-10 20:11:18 -08:00
@@ -197,14 +197,14 @@
 	.name		= "SAB3036",
 };
 
-int __init
+static int __init
 tuner3036_init(void)
 {
 	i2c_add_driver(&i2c_driver_tuner);
 	return 0;
 }
 
-void __exit
+static void __exit
 tuner3036_exit(void)
 {
 	i2c_del_driver(&i2c_driver_tuner);
@@ -214,7 +214,7 @@
 MODULE_AUTHOR("Philip Blundell <philb@gnu.org>");
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(debug,"i");
+module_param(debug, int, 0);
 MODULE_PARM_DESC(debug,"Enable debugging output");
 
 module_init(tuner3036_init);
diff -Nru a/drivers/media/video/videocodec.c b/drivers/media/video/videocodec.c
--- a/drivers/media/video/videocodec.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/media/video/videocodec.c	2005-01-10 20:11:19 -08:00
@@ -46,7 +46,7 @@
 #include "videocodec.h"
 
 static int debug = 0;
-MODULE_PARM(debug, "i");
+module_param(debug, int, 0);
 MODULE_PARM_DESC(debug, "Debug level (0-4)");
 
 #define dprintk(num, format, args...) \
diff -Nru a/drivers/media/video/videocodec.h b/drivers/media/video/videocodec.h
--- a/drivers/media/video/videocodec.h	2005-01-10 20:11:18 -08:00
+++ b/drivers/media/video/videocodec.h	2005-01-10 20:11:18 -08:00
@@ -248,6 +248,17 @@
 	u16 Wt, Wa, HStart, HSyncStart, Ht, Ha, VStart;
 };
 
+struct jpeg_com_marker {
+	int len; /* number of usable bytes in data */
+	char data[60];
+};
+
+struct jpeg_app_marker {
+	int appn; /* number app segment */
+	int len; /* number of usable bytes in data */
+	char data[60];
+};
+
 struct videocodec {
 	struct module *owner;
 	/* -- filled in by slave device during register -- */
diff -Nru a/drivers/media/video/vpx3220.c b/drivers/media/video/vpx3220.c
--- a/drivers/media/video/vpx3220.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/media/video/vpx3220.c	2005-01-10 20:11:20 -08:00
@@ -41,7 +41,7 @@
 #define VPX3220_DEBUG	KERN_DEBUG "vpx3220: "
 
 static int debug = 0;
-MODULE_PARM(debug, "i");
+module_param(debug, int, 0);
 MODULE_PARM_DESC(debug, "Debug level (0-1)");
 
 #define dprintk(num, format, args...) \
diff -Nru a/drivers/media/video/w9966.c b/drivers/media/video/w9966.c
--- a/drivers/media/video/w9966.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/media/video/w9966.c	2005-01-10 20:11:17 -08:00
@@ -127,18 +127,18 @@
 #else
 static const char* pardev[] = {[0 ... W9966_MAXCAMS] = "aggressive"};
 #endif
-MODULE_PARM(pardev, "1-" __MODULE_STRING(W9966_MAXCAMS) "s");
+module_param_array(pardev, charp, NULL, 0);
 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\n\
 \tcam 1 to parport3 and search every parport for cam 2 etc...");
 
 static int parmode = 0;
-MODULE_PARM(parmode, "i");
+module_param(parmode, int, 0);
 MODULE_PARM_DESC(parmode, "parmode: transfer mode (0=auto, 1=ecp, 2=epp");
 
 static int video_nr = -1;
-MODULE_PARM(video_nr, "i");
+module_param(video_nr, int, 0);
 
 /*
  *	Private data
diff -Nru a/drivers/media/video/zoran_card.c b/drivers/media/video/zoran_card.c
--- a/drivers/media/video/zoran_card.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/media/video/zoran_card.c	2005-01-10 20:11:19 -08:00
@@ -58,18 +58,17 @@
 #define I2C_NAME(x) (x)->name
 
 extern const struct zoran_format zoran_formats[];
-extern const int zoran_num_formats;
 
 static int card[BUZ_MAX] = { -1, -1, -1, -1 };
-MODULE_PARM(card, "1-" __stringify(BUZ_MAX) "i");
+module_param_array(card, int, NULL, 0);
 MODULE_PARM_DESC(card, "The type of card");
 
 static int encoder[BUZ_MAX] = { -1, -1, -1, -1 };
-MODULE_PARM(encoder, "1-" __stringify(BUZ_MAX) "i");
+module_param_array(encoder, int, NULL, 0);
 MODULE_PARM_DESC(encoder, "i2c TV encoder");
 
 static int decoder[BUZ_MAX] = { -1, -1, -1, -1 };
-MODULE_PARM(decoder, "1-" __stringify(BUZ_MAX) "i");
+module_param_array(decoder, int, NULL, 0);
 MODULE_PARM_DESC(decoder, "i2c TV decoder");
 
 /*
@@ -81,23 +80,23 @@
  */
 
 static unsigned long vidmem = 0;	/* Video memory base address */
-MODULE_PARM(vidmem, "i");
+module_param(vidmem, ulong, 0);
 
 /*
    Default input and video norm at startup of the driver.
 */
 
 static int default_input = 0;	/* 0=Composite, 1=S-Video */
-MODULE_PARM(default_input, "i");
+module_param(default_input, int, 0);
 MODULE_PARM_DESC(default_input,
 		 "Default input (0=Composite, 1=S-Video, 2=Internal)");
 
 static int default_norm = 0;	/* 0=PAL, 1=NTSC 2=SECAM */
-MODULE_PARM(default_norm, "i");
+module_param(default_norm, int, 0);
 MODULE_PARM_DESC(default_norm, "Default norm (0=PAL, 1=NTSC, 2=SECAM)");
 
 static int video_nr = -1;	/* /dev/videoN, -1 for autodetect */
-MODULE_PARM(video_nr, "i");
+module_param(video_nr, int, 0);
 MODULE_PARM_DESC(video_nr, "video device number");
 
 /*
@@ -119,27 +118,27 @@
 
 int v4l_nbufs = 2;
 int v4l_bufsize = 128;		/* Everybody should be able to work with this setting */
-MODULE_PARM(v4l_nbufs, "i");
+module_param(v4l_nbufs, int, 0);
 MODULE_PARM_DESC(v4l_nbufs, "Maximum number of V4L buffers to use");
-MODULE_PARM(v4l_bufsize, "i");
+module_param(v4l_bufsize, int, 0);
 MODULE_PARM_DESC(v4l_bufsize, "Maximum size per V4L buffer (in kB)");
 
 int jpg_nbufs = 32;
 int jpg_bufsize = 512;		/* max size for 100% quality full-PAL frame */
-MODULE_PARM(jpg_nbufs, "i");
+module_param(jpg_nbufs, int, 0);
 MODULE_PARM_DESC(jpg_nbufs, "Maximum number of JPG buffers to use");
-MODULE_PARM(jpg_bufsize, "i");
+module_param(jpg_bufsize, int, 0);
 MODULE_PARM_DESC(jpg_bufsize, "Maximum size per JPG buffer (in kB)");
 
 int pass_through = 0;		/* 1=Pass through TV signal when device is not used */
 				/* 0=Show color bar when device is not used (LML33: only if lml33dpath=1) */
-MODULE_PARM(pass_through, "i");
+module_param(pass_through, int, 0);
 MODULE_PARM_DESC(pass_through,
 		 "Pass TV signal through to TV-out when idling");
 
 static int debug = 1;
 int *zr_debug = &debug;
-MODULE_PARM(debug, "i");
+module_param(debug, int, 0);
 MODULE_PARM_DESC(debug, "Debug level (0-4)");
 
 MODULE_DESCRIPTION("Zoran-36057/36067 JPEG codec driver");
diff -Nru a/drivers/media/video/zoran_device.c b/drivers/media/video/zoran_device.c
--- a/drivers/media/video/zoran_device.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/media/video/zoran_device.c	2005-01-10 20:11:19 -08:00
@@ -32,6 +32,7 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/vmalloc.h>
+#include <linux/byteorder/generic.h>
 
 #include <linux/interrupt.h>
 #include <linux/proc_fs.h>
@@ -57,7 +58,6 @@
 		   ZR36057_ISR_JPEGRepIRQ )
 
 extern const struct zoran_format zoran_formats[];
-extern const int zoran_num_formats;
 
 extern int *zr_debug;
 
@@ -76,10 +76,13 @@
 				 * load on Bt819 input, there will be
 				 * some image imperfections */
 
-MODULE_PARM(lml33dpath, "i");
+module_param(lml33dpath, bool, 0);
 MODULE_PARM_DESC(lml33dpath,
 		 "Use digital path capture mode (on LML33 cards)");
 
+static void
+zr36057_init_vfe (struct zoran *zr);
+
 /*
  * General Purpose I/O and Guest bus access
  */
@@ -758,7 +761,7 @@
 		zr->jpg_buffers.buffer[i].state = BUZ_STATE_USER;	/* nothing going on */
 	}
 	for (i = 0; i < BUZ_NUM_STAT_COM; i++) {
-		zr->stat_com[i] = 1;	/* mark as unavailable to zr36057 */
+		zr->stat_com[i] = cpu_to_le32(1);	/* mark as unavailable to zr36057 */
 	}
 }
 
@@ -1033,7 +1036,10 @@
 
 	switch (mode) {
 
-	case BUZ_MODE_MOTION_COMPRESS:
+	case BUZ_MODE_MOTION_COMPRESS: {
+		struct jpeg_app_marker app;
+		struct jpeg_com_marker com;
+
 		/* In motion compress mode, the decoder output must be enabled, and
 		 * the video bus direction set to input.
 		 */
@@ -1043,6 +1049,19 @@
 
 		/* Take the JPEG codec and the VFE out of sleep */
 		jpeg_codec_sleep(zr, 0);
+
+		/* set JPEG app/com marker */
+		app.appn = zr->jpg_settings.jpg_comp.APPn;
+		app.len = zr->jpg_settings.jpg_comp.APP_len;
+		memcpy(app.data, zr->jpg_settings.jpg_comp.APP_data, 60);
+		zr->codec->control(zr->codec, CODEC_S_JPEG_APP_DATA,
+				   sizeof(struct jpeg_app_marker), &app);
+
+		com.len = zr->jpg_settings.jpg_comp.COM_len;
+		memcpy(com.data, zr->jpg_settings.jpg_comp.COM_data, 60);
+		zr->codec->control(zr->codec, CODEC_S_JPEG_COM_DATA,
+				   sizeof(struct jpeg_com_marker), &com);
+
 		/* Setup the JPEG codec */
 		zr->codec->control(zr->codec, CODEC_S_JPEG_TDS_BYTE,
 				   sizeof(int), &field_size);
@@ -1066,6 +1085,7 @@
 		dprintk(2, KERN_INFO "%s: enable_jpg(MOTION_COMPRESS)\n",
 			ZR_DEVNAME(zr));
 		break;
+	}
 
 	case BUZ_MODE_MOTION_DECOMPRESS:
 		/* In motion decompression mode, the decoder output must be disabled, and
@@ -1146,20 +1166,20 @@
 			/* fill 1 stat_com entry */
 			i = (zr->jpg_dma_head -
 			     zr->jpg_err_shift) & BUZ_MASK_STAT_COM;
-			if (!(zr->stat_com[i] & 1))
+			if (!(zr->stat_com[i] & cpu_to_le32(1)))
 				break;
 			zr->stat_com[i] =
-			    zr->jpg_buffers.buffer[frame].frag_tab_bus;
+			    cpu_to_le32(zr->jpg_buffers.buffer[frame].frag_tab_bus);
 		} else {
 			/* fill 2 stat_com entries */
 			i = ((zr->jpg_dma_head -
 			      zr->jpg_err_shift) & 1) * 2;
-			if (!(zr->stat_com[i] & 1))
+			if (!(zr->stat_com[i] & cpu_to_le32(1)))
 				break;
 			zr->stat_com[i] =
-			    zr->jpg_buffers.buffer[frame].frag_tab_bus;
+			    cpu_to_le32(zr->jpg_buffers.buffer[frame].frag_tab_bus);
 			zr->stat_com[i + 1] =
-			    zr->jpg_buffers.buffer[frame].frag_tab_bus;
+			    cpu_to_le32(zr->jpg_buffers.buffer[frame].frag_tab_bus);
 		}
 		zr->jpg_buffers.buffer[frame].state = BUZ_STATE_DMA;
 		zr->jpg_dma_head++;
@@ -1196,7 +1216,7 @@
 			i = ((zr->jpg_dma_tail -
 			      zr->jpg_err_shift) & 1) * 2 + 1;
 
-		stat_com = zr->stat_com[i];
+		stat_com = le32_to_cpu(zr->stat_com[i]);
 
 		if ((stat_com & 1) == 0) {
 			return;
@@ -1292,7 +1312,7 @@
 					for (i = 0;
 					     i < zr->jpg_buffers.num_buffers;
 					     i++) {
-						if (zr->stat_com[j] ==
+						if (le32_to_cpu(zr->stat_com[j]) ==
 						    zr->jpg_buffers.
 						    buffer[i].
 						    frag_tab_bus) {
@@ -1304,7 +1324,6 @@
 				printk("\n");
 			}
 		}
-
 		/* Find an entry in stat_com and rotate contents */
 		{
 			int i;
@@ -1317,9 +1336,9 @@
 				      zr->jpg_err_shift) & 1) * 2;
 			if (zr->codec_mode == BUZ_MODE_MOTION_DECOMPRESS) {
 				/* Mimic zr36067 operation */
-				zr->stat_com[i] |= 1;
+				zr->stat_com[i] |= cpu_to_le32(1);
 				if (zr->jpg_settings.TmpDcm != 1)
-					zr->stat_com[i + 1] |= 1;
+					zr->stat_com[i + 1] |= cpu_to_le32(1);
 				/* Refill */
 				zoran_reap_stat_com(zr);
 				zoran_feed_stat_com(zr);
@@ -1338,12 +1357,17 @@
 				int j;
 				u32 bus_addr[BUZ_NUM_STAT_COM];
 
+				/* Here we are copying the stat_com array, which
+				 * is already in little endian format, so
+				 * no endian conversions here
+				 */
 				memcpy(bus_addr, zr->stat_com,
 				       sizeof(bus_addr));
 				for (j = 0; j < BUZ_NUM_STAT_COM; j++) {
 					zr->stat_com[j] =
 					    bus_addr[(i + j) &
 						     BUZ_MASK_STAT_COM];
+
 				}
 				zr->jpg_err_shift += i;
 				zr->jpg_err_shift &= BUZ_MASK_STAT_COM;
@@ -1547,7 +1571,7 @@
 						int i;
 						strcpy(sv, sc);
 						for (i = 0; i < 4; i++) {
-							if (zr->stat_com[i] & 1)
+							if (le32_to_cpu(zr->stat_com[i]) & 1)
 								sv[i] = '1';
 						}
 						sv[4] = 0;
@@ -1575,7 +1599,7 @@
 					       ZR_DEVNAME(zr), zr->jpg_seq_num);
 					for (i = 0; i < 4; i++) {
 						printk(" %08x",
-						       zr->stat_com[i]);
+						       le32_to_cpu(zr->stat_com[i]));
 					}
 					printk("\n");
 				}
@@ -1701,7 +1725,7 @@
  * initialize video front end
  */
 
-void
+static void
 zr36057_init_vfe (struct zoran *zr)
 {
 	u32 reg;
diff -Nru a/drivers/media/video/zoran_device.h b/drivers/media/video/zoran_device.h
--- a/drivers/media/video/zoran_device.h	2005-01-10 20:11:18 -08:00
+++ b/drivers/media/video/zoran_device.h	2005-01-10 20:11:18 -08:00
@@ -79,7 +79,6 @@
 				 int set_master);
 extern void zoran_init_hardware(struct zoran *zr);
 extern void zr36057_restart(struct zoran *zr);
-extern void zr36057_init_vfe(struct zoran *zr);
 
 /* i2c */
 extern int decoder_command(struct zoran *zr,
diff -Nru a/drivers/media/video/zoran_driver.c b/drivers/media/video/zoran_driver.c
--- a/drivers/media/video/zoran_driver.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/media/video/zoran_driver.c	2005-01-10 20:11:21 -08:00
@@ -52,6 +52,7 @@
 #include <linux/slab.h>
 #include <linux/pci.h>
 #include <linux/vmalloc.h>
+#include <linux/byteorder/generic.h>
 
 #include <linux/interrupt.h>
 #include <linux/i2c.h>
@@ -176,7 +177,7 @@
 			 ZORAN_FORMAT_COMPRESSED,
 	}
 };
-const int zoran_num_formats =
+static const int zoran_num_formats =
     (sizeof(zoran_formats) / sizeof(struct zoran_format));
 
 // RJ: Test only - want to test BUZ_USE_HIMEM even when CONFIG_BIGPHYS_AREA is defined
@@ -204,7 +205,7 @@
 extern int pass_through;
 
 static int lock_norm = 0;	/* 1=Don't change TV standard (norm) */
-MODULE_PARM(lock_norm, "i");
+module_param(lock_norm, int, 0);
 MODULE_PARM_DESC(lock_norm, "Users can't change norm");
 
 #ifdef HAVE_V4L2
@@ -516,6 +517,16 @@
  *       virtual addresses) and then again have to make a lot of efforts
  *       to get the physical address.
  *
+ *   Ben Capper:
+ *       On big-endian architectures (such as ppc) some extra steps
+ *       are needed. When reading and writing to the stat_com array
+ *       and fragment buffers, the device expects to see little-
+ *       endian values. The use of cpu_to_le32() and le32_to_cpu()
+ *       in this function (and one or two others in zoran_device.c)
+ *       ensure that these values are always stored in little-endian
+ *       form, regardless of architecture. The zr36057 does Very Bad
+ *       Things on big endian architectures if the stat_com array
+ *       and fragment buffers are not little-endian.
  */
 
 static int
@@ -569,9 +580,9 @@
 				return -ENOBUFS;
 			}
 			fh->jpg_buffers.buffer[i].frag_tab[0] =
-			    virt_to_bus((void *) mem);
+			    cpu_to_le32(virt_to_bus((void *) mem));
 			fh->jpg_buffers.buffer[i].frag_tab[1] =
-			    ((fh->jpg_buffers.buffer_size / 4) << 1) | 1;
+			    cpu_to_le32(((fh->jpg_buffers.buffer_size / 4) << 1) | 1);
 			for (off = 0; off < fh->jpg_buffers.buffer_size;
 			     off += PAGE_SIZE)
 				SetPageReserved(MAP_NR(mem + off));
@@ -591,14 +602,14 @@
 				}
 
 				fh->jpg_buffers.buffer[i].frag_tab[2 * j] =
-				    virt_to_bus((void *) mem);
+				    cpu_to_le32(virt_to_bus((void *) mem));
 				fh->jpg_buffers.buffer[i].frag_tab[2 * j +
 								   1] =
-				    (PAGE_SIZE / 4) << 1;
+				    cpu_to_le32((PAGE_SIZE / 4) << 1);
 				SetPageReserved(MAP_NR(mem));
 			}
 
-			fh->jpg_buffers.buffer[i].frag_tab[2 * j - 1] |= 1;
+			fh->jpg_buffers.buffer[i].frag_tab[2 * j - 1] |= cpu_to_le32(1);
 		}
 	}
 
@@ -631,13 +642,8 @@
 		//if (alloc_contig) {
 		if (fh->jpg_buffers.need_contiguous) {
 			if (fh->jpg_buffers.buffer[i].frag_tab[0]) {
-				mem =
-				    (unsigned char *) bus_to_virt(fh->
-								  jpg_buffers.
-								  buffer
-								  [i].
-								  frag_tab
-								  [0]);
+				mem = (unsigned char *) bus_to_virt(le32_to_cpu(
+					fh->jpg_buffers.buffer[i].frag_tab[0]));
 				for (off = 0;
 				     off < fh->jpg_buffers.buffer_size;
 				     off += PAGE_SIZE)
@@ -656,13 +662,16 @@
 					break;
 				ClearPageReserved(MAP_NR
 						  (bus_to_virt
-						   (fh->jpg_buffers.
-						    buffer[i].frag_tab[2 *
-								       j])));
+						   (le32_to_cpu
+						    (fh->jpg_buffers.
+						     buffer[i].frag_tab[2 *
+								       j]))));
 				free_page((unsigned long)
-					  bus_to_virt(fh->jpg_buffers.
+					  bus_to_virt
+					          (le32_to_cpu
+						   (fh->jpg_buffers.
 						      buffer[i].
-						      frag_tab[2 * j]));
+						      frag_tab[2 * j])));
 				fh->jpg_buffers.buffer[i].frag_tab[2 * j] =
 				    0;
 				fh->jpg_buffers.buffer[i].frag_tab[2 * j +
@@ -2005,6 +2014,8 @@
 {
 	struct zoran_fh *fh = file->private_data;
 	struct zoran *zr = fh->zr;
+	/* CAREFUL: used in multiple places here */
+	struct zoran_jpg_settings settings;
 
 	/* we might have older buffers lying around... We don't want
 	 * to wait, but we do want to try cleaning them up ASAP. So
@@ -2453,7 +2464,6 @@
 	case BUZIOC_S_PARAMS:
 	{
 		struct zoran_params *bparams = arg;
-		struct zoran_jpg_settings settings;
 		int res = 0;
 
 		dprintk(3, KERN_DEBUG "%s: BUZIOC_S_PARAMS\n", ZR_DEVNAME(zr));
@@ -2910,8 +2920,6 @@
 			}
 
 			if (fmt->fmt.pix.pixelformat == V4L2_PIX_FMT_MJPEG) {
-				struct zoran_jpg_settings settings;
-
 				down(&zr->resource_lock);
 
 				settings = fh->jpg_settings;
@@ -3974,7 +3982,8 @@
 	{
 		struct v4l2_crop *crop = arg;
 		int res = 0;
-		struct zoran_jpg_settings settings = fh->jpg_settings;
+
+		settings = fh->jpg_settings;
 
 		dprintk(3,
 			KERN_ERR
@@ -4056,9 +4065,10 @@
 	case VIDIOC_S_JPEGCOMP:
 	{
 		struct v4l2_jpegcompression *params = arg;
-		struct zoran_jpg_settings settings = fh->jpg_settings;
 		int res = 0;
 
+		settings = fh->jpg_settings;
+
 		dprintk(3,
 			KERN_DEBUG
 			"%s: VIDIOC_S_JPEGCOMP - quality=%d, APPN=%d, APP_len=%d, COM_len=%d\n",
@@ -4142,8 +4152,7 @@
 			down(&zr->resource_lock);
 
 			if (fmt->fmt.pix.pixelformat == V4L2_PIX_FMT_MJPEG) {
-				struct zoran_jpg_settings settings =
-				    fh->jpg_settings;
+				settings = fh->jpg_settings;
 
 				/* we actually need to set 'real' parameters now */
 				if ((fmt->fmt.pix.height * 2) >
@@ -4539,14 +4548,14 @@
 			     j < fh->jpg_buffers.buffer_size / PAGE_SIZE;
 			     j++) {
 				fraglen =
-				    (fh->jpg_buffers.buffer[i].
-				     frag_tab[2 * j + 1] & ~1) << 1;
+				    (le32_to_cpu(fh->jpg_buffers.buffer[i].
+				     frag_tab[2 * j + 1]) & ~1) << 1;
 				todo = size;
 				if (todo > fraglen)
 					todo = fraglen;
 				pos =
-				    (unsigned long) fh->jpg_buffers.
-				    buffer[i].frag_tab[2 * j];
+				    le32_to_cpu((unsigned long) fh->jpg_buffers.
+				    buffer[i].frag_tab[2 * j]);
 				/* should just be pos on i386 */
 				page = virt_to_phys(bus_to_virt(pos))
 								>> PAGE_SHIFT;
@@ -4563,8 +4572,8 @@
 				start += todo;
 				if (size == 0)
 					break;
-				if (fh->jpg_buffers.buffer[i].
-				    frag_tab[2 * j + 1] & 1)
+				if (le32_to_cpu(fh->jpg_buffers.buffer[i].
+				    frag_tab[2 * j + 1]) & 1)
 					break;	/* was last fragment */
 			}
 			fh->jpg_buffers.buffer[i].map = map;
@@ -4689,3 +4698,4 @@
 	.release = &zoran_vdev_release,
 	.minor = -1
 };
+
diff -Nru a/drivers/media/video/zr36016.c b/drivers/media/video/zr36016.c
--- a/drivers/media/video/zr36016.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/media/video/zr36016.c	2005-01-10 20:11:19 -08:00
@@ -61,7 +61,7 @@
 /* debugging is available via module parameter */
 
 static int debug = 0;
-MODULE_PARM(debug, "i");
+module_param(debug, int, 0);
 MODULE_PARM_DESC(debug, "Debug level (0-4)");
 
 #define dprintk(num, format, args...) \
diff -Nru a/drivers/media/video/zr36050.c b/drivers/media/video/zr36050.c
--- a/drivers/media/video/zr36050.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/media/video/zr36050.c	2005-01-10 20:11:19 -08:00
@@ -58,7 +58,7 @@
 /* debugging is available via module parameter */
 
 static int debug = 0;
-MODULE_PARM(debug, "i");
+module_param(debug, int, 0);
 MODULE_PARM_DESC(debug, "Debug level (0-4)");
 
 #define dprintk(num, format, args...) \
@@ -325,32 +325,6 @@
 	0xF9, 0xFA
 };
 
-static const char zr36050_app[0x40] = {
-	0xff, 0xe0,		//Marker: APP0
-	0x00, 0x3e,		//Length: 60+2
-	' ', 'A', 'V', 'I', '1', 0, 0, 0,	// 'AVI' field
-	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
-};
-
-static const char zr36050_com[0x40] = {
-	0xff, 0xfe,		//Marker: COM
-	0x00, 0x3e,		//Length: 60+2
-	' ', 'C', 'O', 'M', 0, 0, 0, 0,	// 'COM' field
-	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
-};
-
 /* jpeg baseline setup, this is just fixed in this driver (YUV pictures) */
 #define NO_OF_COMPONENTS          0x3	//Y,U,V
 #define BASELINE_PRECISION        0x8	//MCU size (?)
@@ -499,10 +473,18 @@
 				      sizeof(zr36050_dqt), zr36050_dqt);
 		sum += zr36050_pushit(ptr, ZR050_DHT_IDX,
 				      sizeof(zr36050_dht), zr36050_dht);
-		sum += zr36050_pushit(ptr, ZR050_APP_IDX,
-				      sizeof(zr36050_app), zr36050_app);
-		sum += zr36050_pushit(ptr, ZR050_COM_IDX,
-				      sizeof(zr36050_com), zr36050_com);
+		zr36050_write(ptr, ZR050_APP_IDX, 0xff);
+		zr36050_write(ptr, ZR050_APP_IDX + 1, 0xe0 + ptr->app.appn);
+		zr36050_write(ptr, ZR050_APP_IDX + 2, 0x00);
+		zr36050_write(ptr, ZR050_APP_IDX + 3, ptr->app.len + 2);
+		sum += zr36050_pushit(ptr, ZR050_APP_IDX + 4, 60,
+				      ptr->app.data) + 4;
+		zr36050_write(ptr, ZR050_COM_IDX, 0xff);
+		zr36050_write(ptr, ZR050_COM_IDX + 1, 0xfe);
+		zr36050_write(ptr, ZR050_COM_IDX + 2, 0x00);
+		zr36050_write(ptr, ZR050_COM_IDX + 3, ptr->com.len + 2);
+		sum += zr36050_pushit(ptr, ZR050_COM_IDX + 4, 60,
+				      ptr->com.data) + 4;
 
 		/* do the internal huffman table preload */
 		zr36050_write(ptr, ZR050_MARKERS_EN, ZR050_ME_DHTI);
@@ -553,8 +535,9 @@
 
 		/* this headers seem to deliver "valid AVI" jpeg frames */
 		zr36050_write(ptr, ZR050_MARKERS_EN,
-			      ZR050_ME_APP | ZR050_ME_DQT | ZR050_ME_DHT |
-			      ZR050_ME_COM);
+			      ZR050_ME_DQT | ZR050_ME_DHT |
+			      ((ptr->app.len > 0) ? ZR050_ME_APP : 0) |
+			      ((ptr->com.len > 0) ? ZR050_ME_COM : 0));
 	} else {
 		dprintk(2, "%s: EXPANSION SETUP\n", ptr->name);
 
@@ -733,6 +716,47 @@
 			return -EFAULT;
 		ptr->scalefact = *ival;
 		break;
+
+	case CODEC_G_JPEG_APP_DATA: {	/* get appn marker data */
+		struct jpeg_app_marker *app = data;
+
+		if (size != sizeof(struct jpeg_app_marker))
+			return -EFAULT;
+
+		*app = ptr->app;
+		break;
+	}
+
+	case CODEC_S_JPEG_APP_DATA: {	 /* set appn marker data */
+		struct jpeg_app_marker *app = data;
+
+		if (size != sizeof(struct jpeg_app_marker))
+			return -EFAULT;
+
+		ptr->app = *app;
+		break;
+	}
+
+	case CODEC_G_JPEG_COM_DATA: {	/* get comment marker data */
+		struct jpeg_com_marker *com = data;
+
+		if (size != sizeof(struct jpeg_com_marker))
+			return -EFAULT;
+
+		*com = ptr->com;
+		break;
+	}
+
+	case CODEC_S_JPEG_COM_DATA: {	/* set comment marker data */
+		struct jpeg_com_marker *com = data;
+
+		if (size != sizeof(struct jpeg_com_marker))
+			return -EFAULT;
+
+		ptr->com = *com;
+		break;
+	}
+
 	default:
 		return -EINVAL;
 	}
@@ -821,6 +845,12 @@
 	ptr->max_block_vol = 240;
 	ptr->scalefact = 0x100;
 	ptr->dri = 1;
+
+	/* no app/com marker by default */
+	ptr->app.appn = 0;
+	ptr->app.len = 0;
+	ptr->com.len = 0;
+
 	zr36050_init(ptr);
 
 	dprintk(1, KERN_INFO "%s: codec attached and running\n",
diff -Nru a/drivers/media/video/zr36050.h b/drivers/media/video/zr36050.h
--- a/drivers/media/video/zr36050.h	2005-01-10 20:11:17 -08:00
+++ b/drivers/media/video/zr36050.h	2005-01-10 20:11:17 -08:00
@@ -27,6 +27,8 @@
 #ifndef ZR36050_H
 #define ZR36050_H
 
+#include "videocodec.h"
+
 /* data stored for each zoran jpeg codec chip */
 struct zr36050 {
 	char name[32];
@@ -51,6 +53,10 @@
 	__u8 v_samp_ratio[8];
 	__u16 scalefact;
 	__u16 dri;
+
+	/* com/app marker */
+	struct jpeg_com_marker com;
+	struct jpeg_app_marker app;
 };
 
 /* zr36050 register addresses */
diff -Nru a/drivers/media/video/zr36060.c b/drivers/media/video/zr36060.c
--- a/drivers/media/video/zr36060.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/media/video/zr36060.c	2005-01-10 20:11:20 -08:00
@@ -56,12 +56,12 @@
 static int zr36060_codecs = 0;
 
 static int low_bitrate = 0;
-MODULE_PARM(low_bitrate, "i");
+module_param(low_bitrate, bool, 0);
 MODULE_PARM_DESC(low_bitrate, "Buz compatibility option, halves bitrate");
 
 /* debugging is available via module parameter */
 static int debug = 0;
-MODULE_PARM(debug, "i");
+module_param(debug, int, 0);
 MODULE_PARM_DESC(debug, "Debug level (0-4)");
 
 #define dprintk(num, format, args...) \
@@ -315,32 +315,6 @@
 	0xF9, 0xFA
 };
 
-static const char zr36060_app[0x40] = {
-	0xff, 0xe0,		//Marker: APP0
-	0x00, 0x07,		//Length: 7
-	' ', 'A', 'V', 'I', '1', 0, 0, 0,	// 'AVI' field
-	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
-};
-
-static const char zr36060_com[0x40] = {
-	0xff, 0xfe,		//Marker: COM
-	0x00, 0x06,		//Length: 6
-	' ', 'C', 'O', 'M', 0, 0, 0, 0,	// 'COM' field
-	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
-};
-
 /* jpeg baseline setup, this is just fixed in this driver (YUV pictures) */
 #define NO_OF_COMPONENTS          0x3	//Y,U,V
 #define BASELINE_PRECISION        0x8	//MCU size (?)
@@ -498,12 +472,18 @@
 		sum +=
 		    zr36060_pushit(ptr, ZR060_DHT_IDX, sizeof(zr36060_dht),
 				   zr36060_dht);
-		sum +=
-		    zr36060_pushit(ptr, ZR060_APP_IDX, sizeof(zr36060_app),
-				   zr36060_app);
-		sum +=
-		    zr36060_pushit(ptr, ZR060_COM_IDX, sizeof(zr36060_com),
-				   zr36060_com);
+		zr36060_write(ptr, ZR060_APP_IDX, 0xff);
+		zr36060_write(ptr, ZR060_APP_IDX + 1, 0xe0 + ptr->app.appn);
+		zr36060_write(ptr, ZR060_APP_IDX + 2, 0x00);
+		zr36060_write(ptr, ZR060_APP_IDX + 3, ptr->app.len + 2);
+		sum += zr36060_pushit(ptr, ZR060_APP_IDX + 4, 60,
+				      ptr->app.data) + 4;
+		zr36060_write(ptr, ZR060_COM_IDX, 0xff);
+		zr36060_write(ptr, ZR060_COM_IDX + 1, 0xfe);
+		zr36060_write(ptr, ZR060_COM_IDX + 2, 0x00);
+		zr36060_write(ptr, ZR060_COM_IDX + 3, ptr->com.len + 2);
+		sum += zr36060_pushit(ptr, ZR060_COM_IDX + 4, 60,
+				      ptr->com.data) + 4;
 
 		/* setup misc. data for compression (target code sizes) */
 
@@ -535,8 +515,9 @@
 
 		/* JPEG markers to be included in the compressed stream */
 		zr36060_write(ptr, ZR060_MER,
-			      ZR060_MER_App | ZR060_MER_Com | ZR060_MER_DQT
-			      | ZR060_MER_DHT);
+			      ZR060_MER_DQT | ZR060_MER_DHT |
+			      ((ptr->com.len > 0) ? ZR060_MER_Com : 0) |
+			      ((ptr->app.len > 0) ? ZR060_MER_App : 0));
 
 		/* Setup the Video Frontend */
 		/* Limit pixel range to 16..235 as per CCIR-601 */
@@ -841,6 +822,47 @@
 			return -EFAULT;
 		ptr->scalefact = *ival;
 		break;
+
+	case CODEC_G_JPEG_APP_DATA: {	/* get appn marker data */
+		struct jpeg_app_marker *app = data;
+
+		if (size != sizeof(struct jpeg_app_marker))
+			return -EFAULT;
+
+		*app = ptr->app;
+		break;
+	}
+
+	case CODEC_S_JPEG_APP_DATA: {	/* set appn marker data */
+		struct jpeg_app_marker *app = data;
+
+		if (size != sizeof(struct jpeg_app_marker))
+			return -EFAULT;
+
+		ptr->app = *app;
+		break;
+	}
+
+	case CODEC_G_JPEG_COM_DATA: {	/* get comment marker data */
+		struct jpeg_com_marker *com = data;
+
+		if (size != sizeof(struct jpeg_com_marker))
+			return -EFAULT;
+
+		*com = ptr->com;
+		break;
+	}
+
+	case CODEC_S_JPEG_COM_DATA: {	/* set comment marker data */
+		struct jpeg_com_marker *com = data;
+
+		if (size != sizeof(struct jpeg_com_marker))
+			return -EFAULT;
+
+		ptr->com = *com;
+		break;
+	}
+
 	default:
 		return -EINVAL;
 	}
@@ -930,6 +952,12 @@
 	ptr->max_block_vol = 240;	/* CHECKME, was 120 is 240 */
 	ptr->scalefact = 0x100;
 	ptr->dri = 1;		/* CHECKME, was 8 is 1 */
+
+	/* by default, no COM or APP markers - app should set those */
+	ptr->com.len = 0;
+	ptr->app.appn = 0;
+	ptr->app.len = 0;
+
 	zr36060_init(ptr);
 
 	dprintk(1, KERN_INFO "%s: codec attached and running\n",
diff -Nru a/drivers/media/video/zr36060.h b/drivers/media/video/zr36060.h
--- a/drivers/media/video/zr36060.h	2005-01-10 20:11:16 -08:00
+++ b/drivers/media/video/zr36060.h	2005-01-10 20:11:16 -08:00
@@ -27,6 +27,8 @@
 #ifndef ZR36060_H
 #define ZR36060_H
 
+#include "videocodec.h"
+
 /* data stored for each zoran jpeg codec chip */
 struct zr36060 {
 	char name[32];
@@ -51,6 +53,10 @@
 	__u8 v_samp_ratio[8];
 	__u16 scalefact;
 	__u16 dri;
+
+	/* app/com marker data */
+	struct jpeg_app_marker app;
+	struct jpeg_com_marker com;
 };
 
 /* ZR36060 register addresses */
diff -Nru a/drivers/media/video/zr36120.c b/drivers/media/video/zr36120.c
--- a/drivers/media/video/zr36120.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/media/video/zr36120.c	2005-01-10 20:11:19 -08:00
@@ -1950,7 +1950,7 @@
 	ztv->tuner_type = 0;
 	ztv->running = 0;
 	ztv->users = 0;
-	ztv->lock = RW_LOCK_UNLOCKED;
+	rwlock_init(&ztv->lock);
 	ztv->workqueue = 0;
 	ztv->fieldnr = 0;
 	ztv->lastfieldnr = 0;
diff -Nru a/drivers/message/fusion/mptlan.c b/drivers/message/fusion/mptlan.c
--- a/drivers/message/fusion/mptlan.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/message/fusion/mptlan.c	2005-01-10 20:11:19 -08:00
@@ -1401,8 +1401,8 @@
 			priv->max_buckets_out));
 
 	priv->bucketthresh = priv->max_buckets_out * 2 / 3;
-	priv->txfidx_lock = SPIN_LOCK_UNLOCKED;
-	priv->rxfidx_lock = SPIN_LOCK_UNLOCKED;
+	spin_lock_init(&priv->txfidx_lock);
+	spin_lock_init(&priv->rxfidx_lock);
 
 	memset(&priv->stats, 0, sizeof(priv->stats));
 
diff -Nru a/drivers/misc/ibmasm/ibmasmfs.c b/drivers/misc/ibmasm/ibmasmfs.c
--- a/drivers/misc/ibmasm/ibmasmfs.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/misc/ibmasm/ibmasmfs.c	2005-01-10 20:11:21 -08:00
@@ -131,6 +131,7 @@
 	sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
 	sb->s_magic = IBMASMFS_MAGIC;
 	sb->s_op = &ibmasmfs_s_ops;
+	sb->s_time_gran = 1;
 
 	root = ibmasmfs_make_inode (sb, S_IFDIR | 0500);
 	if (!root)
diff -Nru a/drivers/misc/ibmasm/module.c b/drivers/misc/ibmasm/module.c
--- a/drivers/misc/ibmasm/module.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/misc/ibmasm/module.c	2005-01-10 20:11:20 -08:00
@@ -57,7 +57,7 @@
 #include "remote.h"
 
 
-static int __init ibmasm_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
+static int __devinit ibmasm_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 {
 	int err, result = -ENOMEM;
 	struct service_processor *sp;
@@ -107,7 +107,7 @@
 		goto error_remote_queue;
 	}
 
-	sp->lock = SPIN_LOCK_UNLOCKED;
+	spin_lock_init(&sp->lock);
 	INIT_LIST_HEAD(&sp->command_queue);
 
 	result = request_irq(sp->irq, ibmasm_interrupt_handler, SA_SHIRQ, sp->devname, (void*)sp);
@@ -161,7 +161,7 @@
 	return result;
 }
 
-static void __exit ibmasm_remove_one(struct pci_dev *pdev)
+static void __devexit ibmasm_remove_one(struct pci_dev *pdev)
 {
 	struct service_processor *sp = (struct service_processor *)pci_get_drvdata(pdev);
 
diff -Nru a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
--- a/drivers/mmc/mmc.c	2005-01-10 20:11:24 -08:00
+++ b/drivers/mmc/mmc.c	2005-01-10 20:11:24 -08:00
@@ -301,14 +301,15 @@
 
 #define UNSTUFF_BITS(resp,start,size)					\
 	({								\
-		const u32 __mask = (1 << (size)) - 1;			\
+		const int __size = size;				\
+		const u32 __mask = (__size < 32 ? 1 << __size : 0) - 1;	\
 		const int __off = 3 - ((start) / 32);			\
 		const int __shft = (start) & 31;			\
 		u32 __res;						\
 									\
 		__res = resp[__off] >> __shft;				\
-		if ((size) + __shft >= 32)				\
-			__res |= resp[__off-1] << (32 - __shft);	\
+		if (__size + __shft > 32)				\
+			__res |= resp[__off-1] << ((32 - __shft) % 32);	\
 		__res & __mask;						\
 	})
 
diff -Nru a/drivers/mmc/mmc_block.c b/drivers/mmc/mmc_block.c
--- a/drivers/mmc/mmc_block.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/mmc/mmc_block.c	2005-01-10 20:11:23 -08:00
@@ -180,7 +180,6 @@
 
 		brq.cmd.arg = req->sector << 9;
 		brq.cmd.flags = MMC_RSP_R1;
-		brq.data.req = req;
 		brq.data.timeout_ns = card->csd.tacc_ns * 10;
 		brq.data.timeout_clks = card->csd.tacc_clks * 10;
 		brq.data.blksz_bits = md->block_bits;
diff -Nru a/drivers/mmc/mmci.c b/drivers/mmc/mmci.c
--- a/drivers/mmc/mmci.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/mmc/mmci.c	2005-01-10 20:11:21 -08:00
@@ -14,14 +14,15 @@
 #include <linux/ioport.h>
 #include <linux/device.h>
 #include <linux/interrupt.h>
-#include <linux/blkdev.h>
 #include <linux/delay.h>
 #include <linux/err.h>
+#include <linux/highmem.h>
 #include <linux/mmc/host.h>
 #include <linux/mmc/protocol.h>
 
 #include <asm/io.h>
 #include <asm/irq.h>
+#include <asm/scatterlist.h>
 #include <asm/hardware/amba.h>
 #include <asm/hardware/clock.h>
 #include <asm/mach/mmc.h>
diff -Nru a/drivers/mmc/pxamci.c b/drivers/mmc/pxamci.c
--- a/drivers/mmc/pxamci.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/mmc/pxamci.c	2005-01-10 20:11:20 -08:00
@@ -23,7 +23,6 @@
 #include <linux/device.h>
 #include <linux/delay.h>
 #include <linux/interrupt.h>
-#include <linux/blkdev.h>
 #include <linux/dma-mapping.h>
 #include <linux/mmc/host.h>
 #include <linux/mmc/protocol.h>
@@ -31,6 +30,7 @@
 #include <asm/dma.h>
 #include <asm/io.h>
 #include <asm/irq.h>
+#include <asm/scatterlist.h>
 #include <asm/sizes.h>
 
 #include <asm/arch/pxa-regs.h>
diff -Nru a/drivers/mmc/wbsd.c b/drivers/mmc/wbsd.c
--- a/drivers/mmc/wbsd.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/mmc/wbsd.c	2005-01-10 20:11:22 -08:00
@@ -16,13 +16,13 @@
 #include <linux/device.h>
 #include <linux/interrupt.h>
 #include <linux/delay.h>
-#include <linux/blkdev.h>
-
+#include <linux/highmem.h>
 #include <linux/mmc/host.h>
 #include <linux/mmc/protocol.h>
 
 #include <asm/io.h>
 #include <asm/dma.h>
+#include <asm/scatterlist.h>
 
 #include "wbsd.h"
 
@@ -33,7 +33,7 @@
 #define DBG(x...) \
 	printk(KERN_DEBUG DRIVER_NAME ": " x)
 #define DBGF(f, x...) \
-	printk(KERN_DEBUG DRIVER_NAME " [%s()]: " f, __func__, ##x)
+	printk(KERN_DEBUG DRIVER_NAME " [%s()]: " f, __func__ , ##x)
 #else
 #define DBG(x...)	do { } while (0)
 #define DBGF(x...)	do { } while (0)
@@ -205,8 +205,6 @@
 
 static inline void wbsd_init_sg(struct wbsd_host* host, struct mmc_data* data)
 {
-	struct request* req = data->req;
-	
 	/*
 	 * Get info. about SG list from data structure.
 	 */
diff -Nru a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig
--- a/drivers/mtd/Kconfig	2005-01-10 20:11:17 -08:00
+++ b/drivers/mtd/Kconfig	2005-01-10 20:11:17 -08:00
@@ -1,4 +1,4 @@
-# $Id: Kconfig,v 1.6 2004/08/09 13:19:42 dwmw2 Exp $
+# $Id: Kconfig,v 1.7 2004/11/22 11:33:56 ijc Exp $
 
 menu "Memory Technology Devices (MTD)"
 
@@ -54,8 +54,8 @@
 	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
+	  'images' in flash devices by putting a table one of the erase
+	  blocks on the device, similar to a partition table, which gives
 	  the offsets, lengths and names of all the images stored in the
 	  flash.
 
@@ -68,6 +68,23 @@
 	  SA1100 map driver (CONFIG_MTD_SA1100) has an option for this, for 
 	  example.
 
+config MTD_REDBOOT_DIRECTORY_BLOCK
+	int "Location of RedBoot partition table"
+	depends on MTD_REDBOOT_PARTS
+	default "-1"
+	---help---
+	  This option is the Linux counterpart to the
+	  CYGNUM_REDBOOT_FIS_DIRECTORY_BLOCK RedBoot compile time
+	  option.
+
+	  The option specifies which Flash sectors holds the RedBoot
+	  partition table.  A zero or positive value gives an absolete
+	  erase block number. A negative value specifies a number of
+	  sectors before the end of the device.
+	  
+	  For example "2" means block number 2, "-1" means the last
+	  block and "-2" means the penultimate block.
+	  
 config MTD_REDBOOT_PARTS_UNALLOCATED
 	bool "  Include unallocated flash regions"
 	depends on MTD_REDBOOT_PARTS
diff -Nru a/drivers/mtd/chips/Kconfig b/drivers/mtd/chips/Kconfig
--- a/drivers/mtd/chips/Kconfig	2005-01-10 20:11:17 -08:00
+++ b/drivers/mtd/chips/Kconfig	2005-01-10 20:11:17 -08:00
@@ -1,5 +1,5 @@
 # drivers/mtd/chips/Kconfig
-# $Id: Kconfig,v 1.9 2004/07/16 15:32:14 dwmw2 Exp $
+# $Id: Kconfig,v 1.13 2004/12/01 15:49:10 nico Exp $
 
 menu "RAM/ROM/Flash chip drivers"
 	depends on MTD!=n
@@ -7,6 +7,7 @@
 config MTD_CFI
 	tristate "Detect flash chips by Common Flash Interface (CFI) probe"
 	depends on MTD
+	select MTD_GEN_PROBE
 	help
 	  The Common Flash Interface specification was developed by Intel,
 	  AMD and other flash manufactures that provides a universal method
@@ -18,6 +19,7 @@
 config MTD_JEDECPROBE
 	tristate "Detect non-CFI AMD/JEDEC-compatible flash chips"
 	depends on MTD
+	select MTD_GEN_PROBE
 	help
 	  This option enables JEDEC-style probing of flash chips which are not
 	  compatible with the Common Flash Interface, but will use the common
@@ -29,8 +31,6 @@
 
 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"
@@ -158,6 +158,7 @@
 config MTD_CFI_INTELEXT
 	tristate "Support for Intel/Sharp flash chips"
 	depends on MTD_GEN_PROBE
+	select MTD_CFI_UTIL
 	help
 	  The Common Flash Interface defines a number of different command
 	  sets which a CFI-compliant chip may claim to implement. This code
@@ -167,6 +168,7 @@
 config MTD_CFI_AMDSTD
 	tristate "Support for AMD/Fujitsu flash chips"
 	depends on MTD_GEN_PROBE
+	select MTD_CFI_UTIL
 	help
 	  The Common Flash Interface defines a number of different command
 	  sets which a CFI-compliant chip may claim to implement. This code
@@ -197,6 +199,7 @@
 config MTD_CFI_STAA
 	tristate "Support for ST (Advanced Architecture) flash chips"
 	depends on MTD_GEN_PROBE
+	select MTD_CFI_UTIL
 	help
 	  The Common Flash Interface defines a number of different command
 	  sets which a CFI-compliant chip may claim to implement. This code
@@ -204,8 +207,6 @@
 
 config MTD_CFI_UTIL
 	tristate
-	default y if MTD_CFI_INTELEXT=y || MTD_CFI_AMDSTD=y || MTD_CFI_STAA=y
-	default m if MTD_CFI_INTELEXT=m || MTD_CFI_AMDSTD=m || MTD_CFI_STAA=m
 
 config MTD_RAM
 	tristate "Support for RAM chips in bus mapping"
@@ -271,6 +272,15 @@
 	  only called JEDEC because the JEDEC association
 	  <http://www.jedec.org/> distributes the identification codes for the
 	  chips.
+
+config MTD_XIP
+	bool "XIP aware MTD support"
+	depends on !SMP && MTD_CFI_INTELEXT && EXPERIMENTAL
+	default y if XIP_KERNEL
+	help
+	  This allows MTD support to work with flash memory which is also
+	  used for XIP purposes.  If you're not sure what this is all about
+	  then say N.
 
 endmenu
 
diff -Nru a/drivers/mtd/chips/amd_flash.c b/drivers/mtd/chips/amd_flash.c
--- a/drivers/mtd/chips/amd_flash.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/mtd/chips/amd_flash.c	2005-01-10 20:11:17 -08:00
@@ -3,7 +3,7 @@
  *
  * Author: Jonas Holmberg <jonas.holmberg@axis.com>
  *
- * $Id: amd_flash.c,v 1.25 2004/08/09 13:19:43 dwmw2 Exp $
+ * $Id: amd_flash.c,v 1.26 2004/11/20 12:49:04 dwmw2 Exp $
  *
  * Copyright (c) 2001 Axis Communications AB
  *
@@ -1122,7 +1122,7 @@
 	timeo = jiffies + (HZ * 20);
 
 	spin_unlock_bh(chip->mutex);
-	schedule_timeout(HZ);
+	msleep(1000);
 	spin_lock_bh(chip->mutex);
 	
 	while (flash_is_busy(map, adr, private->interleave)) {
diff -Nru a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c
--- a/drivers/mtd/chips/cfi_cmdset_0001.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/mtd/chips/cfi_cmdset_0001.c	2005-01-10 20:11:17 -08:00
@@ -4,9 +4,8 @@
  *
  * (C) 2000 Red Hat. GPL'd
  *
- * $Id: cfi_cmdset_0001.c,v 1.160 2004/11/01 06:02:24 nico Exp $
- * (+ suspend fix from v1.162)
- * (+ partition detection fix from v1.163)
+ * $Id: cfi_cmdset_0001.c,v 1.164 2004/11/16 18:29:00 dwmw2 Exp $
+ *
  * 
  * 10/10/2000	Nicolas Pitre <nico@cam.org>
  * 	- completely revamped method functions so they are aware and
@@ -30,6 +29,7 @@
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/interrupt.h>
+#include <linux/mtd/xip.h>
 #include <linux/mtd/map.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/compatmac.h>
@@ -37,6 +37,10 @@
 
 /* #define CMDSET0001_DISABLE_ERASE_SUSPEND_ON_WRITE */
 
+#ifdef CONFIG_MTD_XIP
+#define CMDSET0001_DISABLE_WRITE_SUSPEND
+#endif
+
 // debugging, turns off buffer write mode if set to 1
 #define FORCE_WORD_WRITE 0
 
@@ -147,6 +151,21 @@
 }
 #endif
 
+#ifdef CMDSET0001_DISABLE_WRITE_SUSPEND
+/* The XIP config appears to have problems using write suspend at the moment */ 
+static void fixup_no_write_suspend(struct mtd_info *mtd, void* param)
+{
+	struct map_info *map = mtd->priv;
+	struct cfi_private *cfi = map->fldrv_priv;
+	struct cfi_pri_intelext *cfip = cfi->cmdset_priv;
+
+	if (cfip && (cfip->FeatureSupport&4)) {
+		cfip->FeatureSupport &= ~4;
+		printk(KERN_WARNING "cfi_cmdset_0001: write suspend disabled\n");
+	}
+}
+#endif
+
 static void fixup_st_m28w320ct(struct mtd_info *mtd, void* param)
 {
 	struct map_info *map = mtd->priv;
@@ -189,6 +208,9 @@
 #ifdef CMDSET0001_DISABLE_ERASE_SUSPEND_ON_WRITE
 	{ CFI_MFR_ANY, CFI_ID_ANY, fixup_intel_strataflash, NULL }, 
 #endif
+#ifdef CMDSET0001_DISABLE_WRITE_SUSPEND
+	{ CFI_MFR_ANY, CFI_ID_ANY, fixup_no_write_suspend, NULL },
+#endif
 #if !FORCE_WORD_WRITE
 	{ CFI_MFR_ANY, CFI_ID_ANY, fixup_use_write_buffers, NULL },
 #endif
@@ -679,6 +701,14 @@
 		chip->state = FL_STATUS;
 		return 0;
 
+	case FL_XIP_WHILE_ERASING:
+		if (mode != FL_READY && mode != FL_POINT &&
+		    (mode != FL_WRITING || !cfip || !(cfip->SuspendCmdSupport&1)))
+			goto sleep;
+		chip->oldstate = chip->state;
+		chip->state = FL_READY;
+		return 0;
+
 	case FL_POINT:
 		/* Only if there's no operation suspended... */
 		if (mode == FL_READY && chip->oldstate == FL_READY)
@@ -746,6 +776,11 @@
 		chip->state = FL_ERASING;
 		break;
 
+	case FL_XIP_WHILE_ERASING:
+		chip->state = chip->oldstate;
+		chip->oldstate = FL_READY;
+		break;
+
 	case FL_READY:
 	case FL_STATUS:
 	case FL_JEDEC_QUERY:
@@ -758,6 +793,201 @@
 	wake_up(&chip->wq);
 }
 
+#ifdef CONFIG_MTD_XIP
+
+/*
+ * No interrupt what so ever can be serviced while the flash isn't in array
+ * mode.  This is ensured by the xip_disable() and xip_enable() functions
+ * enclosing any code path where the flash is known not to be in array mode.
+ * And within a XIP disabled code path, only functions marked with __xipram
+ * may be called and nothing else (it's a good thing to inspect generated
+ * assembly to make sure inline functions were actually inlined and that gcc
+ * didn't emit calls to its own support functions). Also configuring MTD CFI
+ * support to a single buswidth and a single interleave is also recommended.
+ * Note that not only IRQs are disabled but the preemption count is also
+ * increased to prevent other locking primitives (namely spin_unlock) from
+ * decrementing the preempt count to zero and scheduling the CPU away while
+ * not in array mode.
+ */
+
+static void xip_disable(struct map_info *map, struct flchip *chip,
+			unsigned long adr)
+{
+	/* TODO: chips with no XIP use should ignore and return */
+	(void) map_read(map, adr); /* ensure mmu mapping is up to date */
+	preempt_disable();
+	local_irq_disable();
+}
+
+static void __xipram xip_enable(struct map_info *map, struct flchip *chip,
+				unsigned long adr)
+{
+	struct cfi_private *cfi = map->fldrv_priv;
+	if (chip->state != FL_POINT && chip->state != FL_READY) {
+		map_write(map, CMD(0xff), adr);
+		chip->state = FL_READY;
+	}
+	(void) map_read(map, adr);
+	asm volatile (".rep 8; nop; .endr"); /* fill instruction prefetch */
+	local_irq_enable();
+	preempt_enable();
+}
+
+/*
+ * When a delay is required for the flash operation to complete, the
+ * xip_udelay() function is polling for both the given timeout and pending
+ * (but still masked) hardware interrupts.  Whenever there is an interrupt
+ * pending then the flash erase or write operation is suspended, array mode
+ * restored and interrupts unmasked.  Task scheduling might also happen at that
+ * point.  The CPU eventually returns from the interrupt or the call to
+ * schedule() and the suspended flash operation is resumed for the remaining
+ * of the delay period.
+ *
+ * Warning: this function _will_ fool interrupt latency tracing tools.
+ */
+
+static void __xipram xip_udelay(struct map_info *map, struct flchip *chip,
+				unsigned long adr, int usec)
+{
+	struct cfi_private *cfi = map->fldrv_priv;
+	struct cfi_pri_intelext *cfip = cfi->cmdset_priv;
+	map_word status, OK = CMD(0x80);
+	unsigned long suspended, start = xip_currtime();
+	flstate_t oldstate, newstate;
+
+	do {
+		cpu_relax();
+		if (xip_irqpending() && cfip &&
+		    ((chip->state == FL_ERASING && (cfip->FeatureSupport&2)) ||
+		     (chip->state == FL_WRITING && (cfip->FeatureSupport&4))) &&
+		    (cfi_interleave_is_1(cfi) || chip->oldstate == FL_READY)) {
+			/*
+			 * Let's suspend the erase or write operation when
+			 * supported.  Note that we currently don't try to
+			 * suspend interleaved chips if there is already
+			 * another operation suspended (imagine what happens
+			 * when one chip was already done with the current
+			 * operation while another chip suspended it, then
+			 * we resume the whole thing at once).  Yes, it
+			 * can happen!
+			 */
+			map_write(map, CMD(0xb0), adr);
+			map_write(map, CMD(0x70), adr);
+			usec -= xip_elapsed_since(start);
+			suspended = xip_currtime();
+			do {
+				if (xip_elapsed_since(suspended) > 100000) {
+					/*
+					 * The chip doesn't want to suspend
+					 * after waiting for 100 msecs.
+					 * This is a critical error but there
+					 * is not much we can do here.
+					 */
+					return;
+				}
+				status = map_read(map, adr);
+			} while (!map_word_andequal(map, status, OK, OK));
+
+			/* Suspend succeeded */
+			oldstate = chip->state;
+			if (oldstate == FL_ERASING) {
+				if (!map_word_bitsset(map, status, CMD(0x40)))
+					break;
+				newstate = FL_XIP_WHILE_ERASING;
+				chip->erase_suspended = 1;
+			} else {
+				if (!map_word_bitsset(map, status, CMD(0x04)))
+					break;
+				newstate = FL_XIP_WHILE_WRITING;
+				chip->write_suspended = 1;
+			}
+			chip->state = newstate;
+			map_write(map, CMD(0xff), adr);
+			(void) map_read(map, adr);
+			asm volatile (".rep 8; nop; .endr");
+			local_irq_enable();
+			preempt_enable();
+			asm volatile (".rep 8; nop; .endr");
+			cond_resched();
+
+			/*
+			 * We're back.  However someone else might have
+			 * decided to go write to the chip if we are in
+			 * a suspended erase state.  If so let's wait
+			 * until it's done.
+			 */
+			preempt_disable();
+			while (chip->state != newstate) {
+				DECLARE_WAITQUEUE(wait, current);
+				set_current_state(TASK_UNINTERRUPTIBLE);
+				add_wait_queue(&chip->wq, &wait);
+				preempt_enable();
+				schedule();
+				remove_wait_queue(&chip->wq, &wait);
+				preempt_disable();
+			}
+			/* Disallow XIP again */
+			local_irq_disable();
+
+			/* Resume the write or erase operation */
+			map_write(map, CMD(0xd0), adr);
+			map_write(map, CMD(0x70), adr);
+			chip->state = oldstate;
+			start = xip_currtime();
+		} else if (usec >= 1000000/HZ) {
+			/*
+			 * Try to save on CPU power when waiting delay
+			 * is at least a system timer tick period.
+			 * No need to be extremely accurate here.
+			 */
+			xip_cpu_idle();
+		}
+		status = map_read(map, adr);
+	} while (!map_word_andequal(map, status, OK, OK)
+		 && xip_elapsed_since(start) < usec);
+}
+
+#define UDELAY(map, chip, adr, usec)  xip_udelay(map, chip, adr, usec)
+
+/*
+ * The INVALIDATE_CACHED_RANGE() macro is normally used in parallel while
+ * the flash is actively programming or erasing since we have to poll for
+ * the operation to complete anyway.  We can't do that in a generic way with
+ * a XIP setup so do it before the actual flash operation in this case.
+ */
+#undef INVALIDATE_CACHED_RANGE
+#define INVALIDATE_CACHED_RANGE(x...)
+#define XIP_INVAL_CACHED_RANGE(map, from, size) \
+	do { if(map->inval_cache) map->inval_cache(map, from, size); } while(0)
+
+/*
+ * Extra notes:
+ *
+ * Activating this XIP support changes the way the code works a bit.  For
+ * example the code to suspend the current process when concurrent access
+ * happens is never executed because xip_udelay() will always return with the
+ * same chip state as it was entered with.  This is why there is no care for
+ * the presence of add_wait_queue() or schedule() calls from within a couple
+ * xip_disable()'d  areas of code, like in do_erase_oneblock for example.
+ * The queueing and scheduling are always happening within xip_udelay().
+ *
+ * Similarly, get_chip() and put_chip() just happen to always be executed
+ * with chip->state set to FL_READY (or FL_XIP_WHILE_*) where flash state
+ * is in array mode, therefore never executing many cases therein and not
+ * causing any problem with XIP.
+ */
+
+#else
+
+#define xip_disable(map, chip, adr)
+#define xip_enable(map, chip, adr)
+
+#define UDELAY(map, chip, adr, usec)  cfi_udelay(usec)
+
+#define XIP_INVAL_CACHED_RANGE(x...)
+
+#endif
+
 static int do_point_onechip (struct map_info *map, struct flchip *chip, loff_t adr, size_t len)
 {
 	unsigned long cmd_addr;
@@ -944,7 +1174,11 @@
 }
 
 #if 0
-static int cfi_intelext_read_prot_reg (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf, int base_offst, int reg_sz)
+static int __xipram cfi_intelext_read_prot_reg (struct mtd_info *mtd,
+						loff_t from, size_t len,
+						size_t *retlen,
+						u_char *buf,
+						int base_offst, int reg_sz)
 {
 	struct map_info *map = mtd->priv;
 	struct cfi_private *cfi = map->fldrv_priv;
@@ -973,6 +1207,8 @@
 			return (len-count)?:ret;
 		}
 
+		xip_disable(map, chip, chip->start);
+
 		if (chip->state != FL_JEDEC_QUERY) {
 			map_write(map, CMD(0x90), chip->start);
 			chip->state = FL_JEDEC_QUERY;
@@ -985,6 +1221,7 @@
 			count--;
 		}
 
+		xip_enable(map, chip, chip->start);
 		put_chip(map, chip, chip->start);
 		spin_unlock(chip->mutex);
 
@@ -1036,7 +1273,8 @@
 }
 #endif
 
-static int do_write_oneword(struct map_info *map, struct flchip *chip, unsigned long adr, map_word datum)
+static int __xipram do_write_oneword(struct map_info *map, struct flchip *chip,
+				     unsigned long adr, map_word datum)
 {
 	struct cfi_private *cfi = map->fldrv_priv;
 	map_word status, status_OK;
@@ -1055,14 +1293,16 @@
 		return ret;
 	}
 
+	XIP_INVAL_CACHED_RANGE(map, adr, map_bankwidth(map));
 	ENABLE_VPP(map);
+	xip_disable(map, chip, adr);
 	map_write(map, CMD(0x40), adr);
 	map_write(map, datum, adr);
 	chip->state = FL_WRITING;
 
 	spin_unlock(chip->mutex);
 	INVALIDATE_CACHED_RANGE(map, adr, map_bankwidth(map));
-	cfi_udelay(chip->word_write_time);
+	UDELAY(map, chip, adr, chip->word_write_time);
 	spin_lock(chip->mutex);
 
 	timeo = jiffies + (HZ/2);
@@ -1089,6 +1329,7 @@
 		/* OK Still waiting */
 		if (time_after(jiffies, timeo)) {
 			chip->state = FL_STATUS;
+			xip_enable(map, chip, adr);
 			printk(KERN_ERR "waiting for chip to be ready timed out in word write\n");
 			ret = -EIO;
 			goto out;
@@ -1097,7 +1338,7 @@
 		/* Latency issues. Drop the lock, wait a while and retry */
 		spin_unlock(chip->mutex);
 		z++;
-		cfi_udelay(1);
+		UDELAY(map, chip, adr, 1);
 		spin_lock(chip->mutex);
 	}
 	if (!z) {
@@ -1119,8 +1360,9 @@
 		map_write(map, CMD(0x70), adr);
 		ret = -EROFS;
 	}
- out:
-	put_chip(map, chip, adr);
+
+	xip_enable(map, chip, adr);
+ out:	put_chip(map, chip, adr);
 	spin_unlock(chip->mutex);
 
 	return ret;
@@ -1210,8 +1452,8 @@
 }
 
 
-static inline int do_write_buffer(struct map_info *map, struct flchip *chip, 
-				  unsigned long adr, const u_char *buf, int len)
+static int __xipram do_write_buffer(struct map_info *map, struct flchip *chip, 
+				    unsigned long adr, const u_char *buf, int len)
 {
 	struct cfi_private *cfi = map->fldrv_priv;
 	map_word status, status_OK;
@@ -1232,6 +1474,10 @@
 		return ret;
 	}
 
+	XIP_INVAL_CACHED_RANGE(map, adr, len);
+	ENABLE_VPP(map);
+	xip_disable(map, chip, cmd_adr);
+
 	/* §4.8 of the 28FxxxJ3A datasheet says "Any time SR.4 and/or SR.5 is set
 	   [...], the device will not accept any more Write to Buffer commands". 
 	   So we must check here and reset those bits if they're set. Otherwise
@@ -1240,12 +1486,13 @@
 		map_write(map, CMD(0x70), cmd_adr);
 	status = map_read(map, cmd_adr);
 	if (map_word_bitsset(map, status, CMD(0x30))) {
+		xip_enable(map, chip, cmd_adr);
 		printk(KERN_WARNING "SR.4 or SR.5 bits set in buffer write (status %lx). Clearing.\n", status.x[0]);
+		xip_disable(map, chip, cmd_adr);
 		map_write(map, CMD(0x50), cmd_adr);
 		map_write(map, CMD(0x70), cmd_adr);
 	}
 
-	ENABLE_VPP(map);
 	chip->state = FL_WRITING_TO_BUFFER;
 
 	z = 0;
@@ -1257,7 +1504,7 @@
 			break;
 
 		spin_unlock(chip->mutex);
-		cfi_udelay(1);
+		UDELAY(map, chip, cmd_adr, 1);
 		spin_lock(chip->mutex);
 
 		if (++z > 20) {
@@ -1269,6 +1516,7 @@
 			/* Odd. Clear status bits */
 			map_write(map, CMD(0x50), cmd_adr);
 			map_write(map, CMD(0x70), cmd_adr);
+			xip_enable(map, chip, cmd_adr);
 			printk(KERN_ERR "Chip not ready for buffer write. status = %lx, Xstatus = %lx\n",
 			       status.x[0], Xstatus.x[0]);
 			ret = -EIO;
@@ -1305,7 +1553,7 @@
 
 	spin_unlock(chip->mutex);
 	INVALIDATE_CACHED_RANGE(map, adr, len);
-	cfi_udelay(chip->buffer_write_time);
+	UDELAY(map, chip, cmd_adr, chip->buffer_write_time);
 	spin_lock(chip->mutex);
 
 	timeo = jiffies + (HZ/2);
@@ -1331,6 +1579,7 @@
 		/* OK Still waiting */
 		if (time_after(jiffies, timeo)) {
 			chip->state = FL_STATUS;
+			xip_enable(map, chip, cmd_adr);
 			printk(KERN_ERR "waiting for chip to be ready timed out in bufwrite\n");
 			ret = -EIO;
 			goto out;
@@ -1338,7 +1587,7 @@
 		
 		/* Latency issues. Drop the lock, wait a while and retry */
 		spin_unlock(chip->mutex);
-		cfi_udelay(1);
+		UDELAY(map, chip, cmd_adr, 1);
 		z++;
 		spin_lock(chip->mutex);
 	}
@@ -1362,8 +1611,8 @@
 		ret = -EROFS;
 	}
 
- out:
-	put_chip(map, chip, cmd_adr);
+	xip_enable(map, chip, cmd_adr);
+ out:	put_chip(map, chip, cmd_adr);
 	spin_unlock(chip->mutex);
 	return ret;
 }
@@ -1432,8 +1681,8 @@
 	return 0;
 }
 
-static int do_erase_oneblock(struct map_info *map, struct flchip *chip,
-			     unsigned long adr, int len, void *thunk)
+static int __xipram do_erase_oneblock(struct map_info *map, struct flchip *chip,
+				      unsigned long adr, int len, void *thunk)
 {
 	struct cfi_private *cfi = map->fldrv_priv;
 	map_word status, status_OK;
@@ -1455,7 +1704,10 @@
 		return ret;
 	}
 
+	XIP_INVAL_CACHED_RANGE(map, adr, len);
 	ENABLE_VPP(map);
+	xip_disable(map, chip, adr);
+
 	/* Clear the status register first */
 	map_write(map, CMD(0x50), adr);
 
@@ -1467,7 +1719,7 @@
 
 	spin_unlock(chip->mutex);
 	INVALIDATE_CACHED_RANGE(map, adr, len);
-	msleep(chip->erase_time / 2);
+	UDELAY(map, chip, adr, chip->erase_time*1000/2);
 	spin_lock(chip->mutex);
 
 	/* FIXME. Use a timer to check this, and return immediately. */
@@ -1505,6 +1757,7 @@
 			/* Clear status bits */
 			map_write(map, CMD(0x50), adr);
 			map_write(map, CMD(0x70), adr);
+			xip_enable(map, chip, adr);
 			printk(KERN_ERR "waiting for erase at %08lx to complete timed out. status = %lx, Xstatus = %lx.\n",
 			       adr, status.x[0], Xstatus.x[0]);
 			ret = -EIO;
@@ -1513,8 +1766,7 @@
 		
 		/* Latency issues. Drop the lock, wait a while and retry */
 		spin_unlock(chip->mutex);
-		set_current_state(TASK_UNINTERRUPTIBLE);
-		schedule_timeout(1);
+		UDELAY(map, chip, adr, 1000000/HZ);
 		spin_lock(chip->mutex);
 	}
 
@@ -1530,6 +1782,7 @@
 		/* Reset the error bits */
 		map_write(map, CMD(0x50), adr);
 		map_write(map, CMD(0x70), adr);
+		xip_enable(map, chip, adr);
 
 		chipstatus = status.x[0];
 		if (!map_word_equal(map, status, CMD(chipstatus))) {
@@ -1565,6 +1818,7 @@
 			ret = -EIO;
 		}
 	} else {
+		xip_enable(map, chip, adr);
 		ret = 0;
 	}
 
@@ -1632,15 +1886,19 @@
 }
 
 #ifdef DEBUG_LOCK_BITS
-static int do_printlockstatus_oneblock(struct map_info *map, struct flchip *chip,
-				       unsigned long adr, int len, void *thunk)
+static int __xipram do_printlockstatus_oneblock(struct map_info *map,
+						struct flchip *chip,
+						unsigned long adr,
+						int len, void *thunk)
 {
 	struct cfi_private *cfi = map->fldrv_priv;
 	int status, ofs_factor = cfi->interleave * cfi->device_type;
 
+	xip_disable(map, chip, adr+(2*ofs_factor));
 	cfi_send_gen_cmd(0x90, 0x55, 0, map, cfi, cfi->device_type, NULL);
 	chip->state = FL_JEDEC_QUERY;
 	status = cfi_read_query(map, adr+(2*ofs_factor));
+	xip_enable(map, chip, 0);
 	printk(KERN_DEBUG "block status register for 0x%08lx is %x\n",
 	       adr, status);
 	return 0;
@@ -1650,8 +1908,8 @@
 #define DO_XXLOCK_ONEBLOCK_LOCK		((void *) 1)
 #define DO_XXLOCK_ONEBLOCK_UNLOCK	((void *) 2)
 
-static int do_xxlock_oneblock(struct map_info *map, struct flchip *chip,
-			      unsigned long adr, int len, void *thunk)
+static int __xipram do_xxlock_oneblock(struct map_info *map, struct flchip *chip,
+				       unsigned long adr, int len, void *thunk)
 {
 	struct cfi_private *cfi = map->fldrv_priv;
 	map_word status, status_OK;
@@ -1671,8 +1929,9 @@
 	}
 
 	ENABLE_VPP(map);
+	xip_disable(map, chip, adr);
+	
 	map_write(map, CMD(0x60), adr);
-
 	if (thunk == DO_XXLOCK_ONEBLOCK_LOCK) {
 		map_write(map, CMD(0x01), adr);
 		chip->state = FL_LOCKING;
@@ -1683,7 +1942,7 @@
 		BUG();
 
 	spin_unlock(chip->mutex);
-	schedule_timeout(HZ);
+	UDELAY(map, chip, adr, 1000000/HZ);
 	spin_lock(chip->mutex);
 
 	/* FIXME. Use a timer to check this, and return immediately. */
@@ -1702,6 +1961,7 @@
 			map_write(map, CMD(0x70), adr);
 			chip->state = FL_STATUS;
 			Xstatus = map_read(map, adr);
+			xip_enable(map, chip, adr);
 			printk(KERN_ERR "waiting for unlock to complete timed out. status = %lx, Xstatus = %lx.\n",
 			       status.x[0], Xstatus.x[0]);
 			put_chip(map, chip, adr);
@@ -1711,12 +1971,13 @@
 		
 		/* Latency issues. Drop the lock, wait a while and retry */
 		spin_unlock(chip->mutex);
-		cfi_udelay(1);
+		UDELAY(map, chip, adr, 1);
 		spin_lock(chip->mutex);
 	}
 	
 	/* Done and happy. */
 	chip->state = FL_STATUS;
+	xip_enable(map, chip, adr);
 	put_chip(map, chip, adr);
 	spin_unlock(chip->mutex);
 	return 0;
@@ -1875,7 +2136,7 @@
 static char im_name_1[]="cfi_cmdset_0001";
 static char im_name_3[]="cfi_cmdset_0003";
 
-int __init cfi_intelext_init(void)
+static int __init cfi_intelext_init(void)
 {
 	inter_module_register(im_name_1, THIS_MODULE, &cfi_cmdset_0001);
 	inter_module_register(im_name_3, THIS_MODULE, &cfi_cmdset_0001);
diff -Nru a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c
--- a/drivers/mtd/chips/cfi_cmdset_0002.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c	2005-01-10 20:11:18 -08:00
@@ -13,7 +13,7 @@
  *
  * This code is GPL
  *
- * $Id: cfi_cmdset_0002.c,v 1.111 2004/11/16 18:29:00 dwmw2 Exp $
+ * $Id: cfi_cmdset_0002.c,v 1.114 2004/12/11 15:43:53 dedekind Exp $
  *
  */
 
@@ -707,7 +707,7 @@
 	 */
 	unsigned long uWriteTimeout = ( HZ / 1000 ) + 1;
 	int ret = 0;
-	map_word oldd, curd;
+	map_word oldd;
 	int retry_cnt = 0;
 
 	adr += chip->start;
@@ -764,23 +764,11 @@
 			continue;
 		}
 
-		/* Test to see if toggling has stopped. */
-		oldd = map_read(map, adr);
-		curd = map_read(map, adr);
-		if (map_word_equal(map, curd, oldd)) {
-			/* Do we have the correct value? */
-			if (map_word_equal(map, curd, datum)) {
-				goto op_done;
-			}
-			/* Nope something has gone wrong. */
-			break;
-		}
+		if (chip_ready(map, adr))
+			goto op_done;
 
-		if (time_after(jiffies, timeo)) {
-			printk(KERN_WARNING "MTD %s(): software timeout\n",
-				__func__ );
-			break;
-		}
+		if (time_after(jiffies, timeo))
+                        break;
 
 		/* Latency issues. Drop the lock, wait a while and retry */
 		cfi_spin_unlock(chip->mutex);
@@ -788,6 +776,8 @@
 		cfi_spin_lock(chip->mutex);
 	}
 
+	printk(KERN_WARNING "MTD %s(): software timeout\n", __func__);
+
 	/* reset on all failures. */
 	map_write( map, CMD(0xF0), chip->start );
 	/* FIXME - should have reset delay before continuing */
@@ -1173,8 +1163,7 @@
 	chip->in_progress_block_addr = adr;
 
 	cfi_spin_unlock(chip->mutex);
-	set_current_state(TASK_UNINTERRUPTIBLE);
-	schedule_timeout((chip->erase_time*HZ)/(2*1000));
+	msleep(chip->erase_time/2);
 	cfi_spin_lock(chip->mutex);
 
 	timeo = jiffies + (HZ*20);
@@ -1259,8 +1248,7 @@
 	chip->in_progress_block_addr = adr;
 	
 	cfi_spin_unlock(chip->mutex);
-	set_current_state(TASK_UNINTERRUPTIBLE);
-	schedule_timeout((chip->erase_time*HZ)/(2*1000));
+	msleep(chip->erase_time/2);
 	cfi_spin_lock(chip->mutex);
 
 	timeo = jiffies + (HZ*20);
diff -Nru a/drivers/mtd/chips/cfi_cmdset_0020.c b/drivers/mtd/chips/cfi_cmdset_0020.c
--- a/drivers/mtd/chips/cfi_cmdset_0020.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/mtd/chips/cfi_cmdset_0020.c	2005-01-10 20:11:18 -08:00
@@ -4,7 +4,7 @@
  *
  * (C) 2000 Red Hat. GPL'd
  *
- * $Id: cfi_cmdset_0020.c,v 1.16 2004/11/16 18:29:00 dwmw2 Exp $
+ * $Id: cfi_cmdset_0020.c,v 1.17 2004/11/20 12:49:04 dwmw2 Exp $
  * 
  * 10/10/2000	Nicolas Pitre <nico@cam.org>
  * 	- completely revamped method functions so they are aware and
@@ -788,7 +788,7 @@
 	chip->state = FL_ERASING;
 	
 	spin_unlock_bh(chip->mutex);
-	schedule_timeout(HZ);
+	msleep(1000);
 	spin_lock_bh(chip->mutex);
 
 	/* FIXME. Use a timer to check this, and return immediately. */
@@ -1087,7 +1087,7 @@
 	chip->state = FL_LOCKING;
 	
 	spin_unlock_bh(chip->mutex);
-	schedule_timeout(HZ);
+	msleep(1000);
 	spin_lock_bh(chip->mutex);
 
 	/* FIXME. Use a timer to check this, and return immediately. */
@@ -1236,7 +1236,7 @@
 	chip->state = FL_UNLOCKING;
 	
 	spin_unlock_bh(chip->mutex);
-	schedule_timeout(HZ);
+	msleep(1000);
 	spin_lock_bh(chip->mutex);
 
 	/* FIXME. Use a timer to check this, and return immediately. */
diff -Nru a/drivers/mtd/chips/cfi_probe.c b/drivers/mtd/chips/cfi_probe.c
--- a/drivers/mtd/chips/cfi_probe.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/mtd/chips/cfi_probe.c	2005-01-10 20:11:21 -08:00
@@ -1,7 +1,7 @@
 /* 
    Common Flash Interface probe code.
    (C) 2000 Red Hat. GPL'd.
-   $Id: cfi_probe.c,v 1.79 2004/10/20 23:04:01 dwmw2 Exp $
+   $Id: cfi_probe.c,v 1.83 2004/11/16 18:19:02 nico Exp $
 */
 
 #include <linux/config.h>
@@ -15,6 +15,7 @@
 #include <linux/slab.h>
 #include <linux/interrupt.h>
 
+#include <linux/mtd/xip.h>
 #include <linux/mtd/map.h>
 #include <linux/mtd/cfi.h>
 #include <linux/mtd/gen_probe.h>
@@ -31,11 +32,47 @@
 
 struct mtd_info *cfi_probe(struct map_info *map);
 
+#ifdef CONFIG_MTD_XIP
+
+/* only needed for short periods, so this is rather simple */
+#define xip_disable()	local_irq_disable()
+
+#define xip_allowed(base, map) \
+do { \
+	(void) map_read(map, base); \
+	asm volatile (".rep 8; nop; .endr"); \
+	local_irq_enable(); \
+} while (0)
+
+#define xip_enable(base, map, cfi) \
+do { \
+	cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL); \
+	cfi_send_gen_cmd(0xFF, 0, base, map, cfi, cfi->device_type, NULL); \
+	xip_allowed(base, map); \
+} while (0)
+
+#define xip_disable_qry(base, map, cfi) \
+do { \
+	xip_disable(); \
+	cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL); \
+	cfi_send_gen_cmd(0xFF, 0, base, map, cfi, cfi->device_type, NULL); \
+	cfi_send_gen_cmd(0x98, 0x55, base, map, cfi, cfi->device_type, NULL); \
+} while (0)
+
+#else
+
+#define xip_disable()			do { } while (0)
+#define xip_allowed(base, map)		do { } while (0)
+#define xip_enable(base, map, cfi)	do { } while (0)
+#define xip_disable_qry(base, map, cfi) do { } while (0)
+
+#endif
+
 /* check for QRY.
    in: interleave,type,mode
    ret: table index, <0 for error
  */
-static int qry_present(struct map_info *map, __u32 base,
+static int __xipram qry_present(struct map_info *map, __u32 base,
 				struct cfi_private *cfi)
 {
 	int osf = cfi->interleave * cfi->device_type;	// scale factor
@@ -59,11 +96,11 @@
 	if (!map_word_equal(map, qry[2], val[2]))
 		return 0;
 
-	return 1; 	// nothing found
+	return 1; 	// "QRY" found
 }
 
-static int cfi_probe_chip(struct map_info *map, __u32 base,
-			  unsigned long *chip_map, struct cfi_private *cfi)
+static int __xipram cfi_probe_chip(struct map_info *map, __u32 base,
+				   unsigned long *chip_map, struct cfi_private *cfi)
 {
 	int i;
 	
@@ -79,12 +116,16 @@
 			(unsigned long)base + 0x55, map->size -1);
 		return 0;
 	}
+
+	xip_disable();
 	cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL);
 	cfi_send_gen_cmd(0xFF, 0, base, map, cfi, cfi->device_type, NULL);
 	cfi_send_gen_cmd(0x98, 0x55, base, map, cfi, cfi->device_type, NULL);
 
-	if (!qry_present(map,base,cfi))
+	if (!qry_present(map,base,cfi)) {
+		xip_enable(base, map, cfi);
 		return 0;
+	}
 
 	if (!cfi->numchips) {
 		/* This is the first time we're called. Set up the CFI 
@@ -110,6 +151,7 @@
 
 			/* If the QRY marker goes away, it's an alias */
 			if (!qry_present(map, start, cfi)) {
+				xip_allowed(base, map);
 				printk(KERN_DEBUG "%s: Found an alias at 0x%x for the chip at 0x%lx\n",
 				       map->name, base, start);
 				return 0;
@@ -122,6 +164,7 @@
 			cfi_send_gen_cmd(0xFF, 0, start, map, cfi, cfi->device_type, NULL);
 			
 			if (qry_present(map, base, cfi)) {
+				xip_allowed(base, map);
 				printk(KERN_DEBUG "%s: Found an alias at 0x%x for the chip at 0x%lx\n",
 				       map->name, base, start);
 				return 0;
@@ -137,6 +180,7 @@
 	/* Put it back into Read Mode */
 	cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL);
 	cfi_send_gen_cmd(0xFF, 0, base, map, cfi, cfi->device_type, NULL);
+	xip_allowed(base, map);
 
 	printk(KERN_INFO "%s: Found %d x%d devices at 0x%x in %d-bit bank\n",
 	       map->name, cfi->interleave, cfi->device_type*8, base,
@@ -145,14 +189,15 @@
 	return 1;
 }
 
-static int cfi_chip_setup(struct map_info *map, 
-		   struct cfi_private *cfi)
+static int __xipram cfi_chip_setup(struct map_info *map, 
+				   struct cfi_private *cfi)
 {
 	int ofs_factor = cfi->interleave*cfi->device_type;
 	__u32 base = 0;
 	int num_erase_regions = cfi_read_query(map, base + (0x10 + 28)*ofs_factor);
 	int i;
 
+	xip_enable(base, map, cfi);
 #ifdef DEBUG_CFI
 	printk("Number of erase regions: %d\n", num_erase_regions);
 #endif
@@ -170,13 +215,33 @@
 	cfi->cfi_mode = CFI_MODE_CFI;
 	
 	/* Read the CFI info structure */
-	for (i=0; i<(sizeof(struct cfi_ident) + num_erase_regions * 4); i++) {
+	xip_disable_qry(base, map, cfi);
+	for (i=0; i<(sizeof(struct cfi_ident) + num_erase_regions * 4); i++)
 		((unsigned char *)cfi->cfiq)[i] = cfi_read_query(map,base + (0x10 + i)*ofs_factor);
-	}
-	
+
+	/* Note we put the device back into Read Mode BEFORE going into Auto
+	 * Select Mode, as some devices support nesting of modes, others
+	 * don't. This way should always work.
+	 * On cmdset 0001 the writes of 0xaa and 0x55 are not needed, and
+	 * so should be treated as nops or illegal (and so put the device
+	 * back into Read Mode, which is a nop in this case).
+	 */
+	cfi_send_gen_cmd(0xf0,     0, base, map, cfi, cfi->device_type, NULL);
+	cfi_send_gen_cmd(0xaa, 0x555, base, map, cfi, cfi->device_type, NULL);
+	cfi_send_gen_cmd(0x55, 0x2aa, base, map, cfi, cfi->device_type, NULL);
+	cfi_send_gen_cmd(0x90, 0x555, base, map, cfi, cfi->device_type, NULL);
+	cfi->mfr = cfi_read_query(map, base);
+	cfi->id = cfi_read_query(map, base + ofs_factor);    
+
+	/* Put it back into Read Mode */
+	cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL);
+	/* ... even if it's an Intel chip */
+	cfi_send_gen_cmd(0xFF, 0, base, map, cfi, cfi->device_type, NULL);
+	xip_allowed(base, map);
+
 	/* Do any necessary byteswapping */
 	cfi->cfiq->P_ID = le16_to_cpu(cfi->cfiq->P_ID);
-	
+
 	cfi->cfiq->P_ADR = le16_to_cpu(cfi->cfiq->P_ADR);
 	cfi->cfiq->A_ID = le16_to_cpu(cfi->cfiq->A_ID);
 	cfi->cfiq->A_ADR = le16_to_cpu(cfi->cfiq->A_ADR);
@@ -197,25 +262,6 @@
 		       (cfi->cfiq->EraseRegionInfo[i] & 0xffff) + 1);
 #endif
 	}
-
-	/* Note we put the device back into Read Mode BEFORE going into Auto
-	 * Select Mode, as some devices support nesting of modes, others
-	 * don't. This way should always work.
-	 * On cmdset 0001 the writes of 0xaa and 0x55 are not needed, and
-	 * so should be treated as nops or illegal (and so put the device
-	 * back into Read Mode, which is a nop in this case).
-	 */
-	cfi_send_gen_cmd(0xf0,     0, base, map, cfi, cfi->device_type, NULL);
-	cfi_send_gen_cmd(0xaa, 0x555, base, map, cfi, cfi->device_type, NULL);
-	cfi_send_gen_cmd(0x55, 0x2aa, base, map, cfi, cfi->device_type, NULL);
-	cfi_send_gen_cmd(0x90, 0x555, base, map, cfi, cfi->device_type, NULL);
-	cfi->mfr = cfi_read_query(map, base);
-	cfi->id = cfi_read_query(map, base + ofs_factor);    
-
-	/* Put it back into Read Mode */
-	cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL);
-	/* ... even if it's an Intel chip */
-	cfi_send_gen_cmd(0xFF, 0, base, map, cfi, cfi->device_type, NULL);
 
 	printk(KERN_INFO "%s: Found %d x%d devices at 0x%x in %d-bit bank\n",
 	       map->name, cfi->interleave, cfi->device_type*8, base,
diff -Nru a/drivers/mtd/chips/cfi_util.c b/drivers/mtd/chips/cfi_util.c
--- a/drivers/mtd/chips/cfi_util.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/mtd/chips/cfi_util.c	2005-01-10 20:11:20 -08:00
@@ -7,7 +7,7 @@
  *
  * This code is covered by the GPL.
  *
- * $Id: cfi_util.c,v 1.5 2004/08/12 06:40:23 eric Exp $
+ * $Id: cfi_util.c,v 1.8 2004/12/14 19:55:56 nico Exp $
  *
  */
 
@@ -22,13 +22,14 @@
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/interrupt.h>
+#include <linux/mtd/xip.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/map.h>
 #include <linux/mtd/cfi.h>
 #include <linux/mtd/compatmac.h>
 
 struct cfi_extquery *
-cfi_read_pri(struct map_info *map, __u16 adr, __u16 size, const char* name)
+__xipram cfi_read_pri(struct map_info *map, __u16 adr, __u16 size, const char* name)
 {
 	struct cfi_private *cfi = map->fldrv_priv;
 	__u32 base = 0; // cfi->chips[0].start;
@@ -40,21 +41,35 @@
 	if (!adr)
 		goto out;
 
-	/* Switch it into Query Mode */
-	cfi_send_gen_cmd(0x98, 0x55, base, map, cfi, cfi->device_type, NULL);
-
 	extp = kmalloc(size, GFP_KERNEL);
 	if (!extp) {
 		printk(KERN_ERR "Failed to allocate memory\n");
 		goto out;
 	}
-		
+
+#ifdef CONFIG_MTD_XIP
+	local_irq_disable();
+#endif
+
+	/* Switch it into Query Mode */
+	cfi_send_gen_cmd(0x98, 0x55, base, map, cfi, cfi->device_type, NULL);
+
 	/* Read in the Extended Query Table */
 	for (i=0; i<size; i++) {
 		((unsigned char *)extp)[i] = 
 			cfi_read_query(map, base+((adr+i)*ofs_factor));
 	}
 
+	/* Make sure it returns to read mode */
+	cfi_send_gen_cmd(0xf0, 0, base, map, cfi, cfi->device_type, NULL);
+	cfi_send_gen_cmd(0xff, 0, base, map, cfi, cfi->device_type, NULL);
+
+#ifdef CONFIG_MTD_XIP
+	(void) map_read(map, base);
+	asm volatile (".rep 8; nop; .endr");
+	local_irq_enable();
+#endif
+
 	if (extp->MajorVersion != '1' || 
 	    (extp->MinorVersion < '0' || extp->MinorVersion > '3')) {
 		printk(KERN_WARNING "  Unknown %s Extended Query "
@@ -62,15 +77,9 @@
 		       extp->MinorVersion);
 		kfree(extp);
 		extp = NULL;
-		goto out;
 	}
 
-out:
-	/* Make sure it's in read mode */
-	cfi_send_gen_cmd(0xf0, 0, base, map, cfi, cfi->device_type, NULL);
-	cfi_send_gen_cmd(0xff, 0, base, map, cfi, cfi->device_type, NULL);
-
-	return extp;
+ out:	return extp;
 }
 
 EXPORT_SYMBOL(cfi_read_pri);
@@ -156,7 +165,6 @@
 	i=first;
 
 	while(len) {
-		unsigned long chipmask;
 		int size = regions[i].erasesize;
 
 		ret = (*frob)(map, &cfi->chips[chipnum], adr, size, thunk);
@@ -165,10 +173,10 @@
 			return ret;
 
 		adr += size;
+		ofs += size;
 		len -= size;
 
-		chipmask = (1 << cfi->chipshift) - 1;
-		if ((adr & chipmask) == ((regions[i].offset + size * regions[i].numblocks) & chipmask))
+		if (ofs == regions[i].offset + size * regions[i].numblocks)
 			i++;
 
 		if (adr >> cfi->chipshift) {
diff -Nru a/drivers/mtd/chips/jedec.c b/drivers/mtd/chips/jedec.c
--- a/drivers/mtd/chips/jedec.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/mtd/chips/jedec.c	2005-01-10 20:11:20 -08:00
@@ -11,7 +11,7 @@
  * not going to guess how to send commands to them, plus I expect they will
  * all speak CFI..
  *
- * $Id: jedec.c,v 1.21 2004/08/09 13:19:43 dwmw2 Exp $
+ * $Id: jedec.c,v 1.22 2005/01/05 18:05:11 dwmw2 Exp $
  */
 
 #include <linux/init.h>
@@ -529,7 +529,7 @@
 static int jedec_read(struct mtd_info *mtd, loff_t from, size_t len, 
 		      size_t *retlen, u_char *buf)
 {
-   struct map_info *map = (struct map_info *)mtd->priv;
+   struct map_info *map = mtd->priv;
    
    map_copy_from(map, buf, from, len);
    *retlen = len;
@@ -541,8 +541,8 @@
 static int jedec_read_banked(struct mtd_info *mtd, loff_t from, size_t len, 
 			     size_t *retlen, u_char *buf)
 {
-   struct map_info *map = (struct map_info *)mtd->priv;
-   struct jedec_private *priv = (struct jedec_private *)map->fldrv_priv;
+   struct map_info *map = mtd->priv;
+   struct jedec_private *priv = map->fldrv_priv;
 
    *retlen = 0;
    while (len > 0)
@@ -593,8 +593,8 @@
    unsigned long NoTime = 0;
    unsigned long start = instr->addr, len = instr->len;
    unsigned int I;
-   struct map_info *map = (struct map_info *)mtd->priv;
-   struct jedec_private *priv = (struct jedec_private *)map->fldrv_priv;
+   struct map_info *map = mtd->priv;
+   struct jedec_private *priv = map->fldrv_priv;
 
    // Verify the arguments..
    if (start + len > mtd->size ||
@@ -800,8 +800,8 @@
    #define flread(x) map_read8(map,base+(off&((1<<chip->addrshift)-1))+((x)<<chip->addrshift))
    #define flwrite(v,x) map_write8(map,v,base+(off&((1<<chip->addrshift)-1))+((x)<<chip->addrshift))
    
-   struct map_info *map = (struct map_info *)mtd->priv;
-   struct jedec_private *priv = (struct jedec_private *)map->fldrv_priv;
+   struct map_info *map = mtd->priv;
+   struct jedec_private *priv = map->fldrv_priv;
    unsigned long base;
    unsigned long off;
    size_t save_len = len;
diff -Nru a/drivers/mtd/chips/jedec_probe.c b/drivers/mtd/chips/jedec_probe.c
--- a/drivers/mtd/chips/jedec_probe.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/mtd/chips/jedec_probe.c	2005-01-10 20:11:23 -08:00
@@ -1,7 +1,7 @@
 /* 
    Common Flash Interface probe code.
    (C) 2000 Red Hat. GPL'd.
-   $Id: jedec_probe.c,v 1.58 2004/11/16 18:29:00 dwmw2 Exp $
+   $Id: jedec_probe.c,v 1.61 2004/11/19 20:52:16 thayne Exp $
    See JEDEC (http://www.jedec.org/) standard JESD21C (section 3.5)
    for the standard this probe goes back to.
 
@@ -227,6 +227,11 @@
 	[MTD_UADDR_DONT_CARE] = {
 		.addr1 = 0x0000,      /* Doesn't matter which address */
 		.addr2 = 0x0000       /* is used - must be last entry */
+	},
+
+	[MTD_UADDR_UNNECESSARY] = {
+		.addr1 = 0x0000,
+		.addr2 = 0x0000
 	}
 };
 
@@ -514,15 +519,20 @@
 			ERASEINFO(0x10000,8),
 		}
 	}, {
-		mfr_id: MANUFACTURER_AMD,
-		dev_id: AM29F002T,
-		name: "AMD AM29F002T",
-		DevSize: SIZE_256KiB,
-		NumEraseRegions: 4,
-		regions: {ERASEINFO(0x10000,3),
-			  ERASEINFO(0x08000,1),
-			  ERASEINFO(0x02000,2),
-			  ERASEINFO(0x04000,1)
+		.mfr_id		= MANUFACTURER_AMD,
+		.dev_id		= AM29F002T,
+		.name		= "AMD AM29F002T",
+		.uaddr		= {
+			[0] = MTD_UADDR_0x0555_0x02AA /* x8 */
+		},
+		.DevSize	= SIZE_256KiB,
+		.CmdSet		= P_ID_AMD_STD,
+		.NumEraseRegions= 4,
+		.regions	= {
+			ERASEINFO(0x10000,3),
+			ERASEINFO(0x08000,1),
+			ERASEINFO(0x02000,2),
+			ERASEINFO(0x04000,1),
 		}
 	}, {
 		.mfr_id		= MANUFACTURER_ATMEL,
@@ -770,15 +780,20 @@
 			ERASEINFO(0x04000,1)
 		}
 	}, {
-		mfr_id: MANUFACTURER_HYUNDAI,
-		dev_id: HY29F002T,
-		name: "Hyundai HY29F002T",
-		DevSize: SIZE_256KiB,
-		NumEraseRegions: 4,
-		regions: {ERASEINFO(0x10000,3),
-			  ERASEINFO(0x08000,1),
-			  ERASEINFO(0x02000,2),
-			  ERASEINFO(0x04000,1)
+		.mfr_id		= MANUFACTURER_HYUNDAI,
+		.dev_id		= HY29F002T,
+		.name		= "Hyundai HY29F002T",
+		.uaddr		= {
+			[0] = MTD_UADDR_0x0555_0x02AA /* x8 */
+		},
+		.DevSize	= SIZE_256KiB,
+		.CmdSet		= P_ID_AMD_STD,
+		.NumEraseRegions= 4,
+		.regions	= {
+			ERASEINFO(0x10000,3),
+			ERASEINFO(0x08000,1),
+			ERASEINFO(0x02000,2),
+			ERASEINFO(0x04000,1),
 		}
 	}, {
 		.mfr_id		= MANUFACTURER_INTEL,
@@ -1177,15 +1192,20 @@
 			ERASEINFO(0x10000,7),
 		}
 	}, {
-		mfr_id: MANUFACTURER_MACRONIX,
-		dev_id: MX29F002T,
-		name: "Macronix MX29F002T",
-		DevSize: SIZE_256KiB,
-		NumEraseRegions: 4,
-		regions: {ERASEINFO(0x10000,3),
-			  ERASEINFO(0x08000,1),
-			  ERASEINFO(0x02000,2),
-			  ERASEINFO(0x04000,1)
+		.mfr_id		= MANUFACTURER_MACRONIX,
+		.dev_id		= MX29F002T,
+		.name		= "Macronix MX29F002T",
+		.uaddr		= {
+			[0] = MTD_UADDR_0x0555_0x02AA /* x8 */
+		},
+		.DevSize	= SIZE_256KiB,
+		.CmdSet		= P_ID_AMD_STD,
+		.NumEraseRegions= 4,
+		.regions	= {
+			ERASEINFO(0x10000,3),
+			ERASEINFO(0x08000,1),
+			ERASEINFO(0x02000,2),
+			ERASEINFO(0x04000,1),
 		}
 	}, {
 		.mfr_id		= MANUFACTURER_PMC,
@@ -1780,7 +1800,6 @@
 		return 0;
 	}
 
-	/* Mask out address bits which are smaller than the device type */
 	p_cfi->addr_unlock1 = unlock_addrs[uaddr].addr1;
 	p_cfi->addr_unlock2 = unlock_addrs[uaddr].addr2;
 
@@ -1923,7 +1942,6 @@
 		if (MTD_UADDR_UNNECESSARY == uaddr_idx)
 			return 0;
 
-		/* Mask out address bits which are smaller than the device type */
 		cfi->addr_unlock1 = unlock_addrs[uaddr_idx].addr1;
 		cfi->addr_unlock2 = unlock_addrs[uaddr_idx].addr2;
 	}
diff -Nru a/drivers/mtd/chips/map_ram.c b/drivers/mtd/chips/map_ram.c
--- a/drivers/mtd/chips/map_ram.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/mtd/chips/map_ram.c	2005-01-10 20:11:17 -08:00
@@ -1,7 +1,7 @@
 /*
  * Common code to handle map devices which are simple RAM
  * (C) 2000 Red Hat. GPL'd.
- * $Id: map_ram.c,v 1.21 2004/11/16 18:29:00 dwmw2 Exp $
+ * $Id: map_ram.c,v 1.22 2005/01/05 18:05:12 dwmw2 Exp $
  */
 
 #include <linux/module.h>
@@ -83,7 +83,7 @@
 
 static int mapram_read (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf)
 {
-	struct map_info *map = (struct map_info *)mtd->priv;
+	struct map_info *map = mtd->priv;
 
 	map_copy_from(map, buf, from, len);
 	*retlen = len;
@@ -92,7 +92,7 @@
 
 static int mapram_write (struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf)
 {
-	struct map_info *map = (struct map_info *)mtd->priv;
+	struct map_info *map = mtd->priv;
 
 	map_copy_to(map, to, buf, len);
 	*retlen = len;
@@ -103,7 +103,7 @@
 {
 	/* Yeah, it's inefficient. Who cares? It's faster than a _real_
 	   flash erase. */
-	struct map_info *map = (struct map_info *)mtd->priv;
+	struct map_info *map = mtd->priv;
 	map_word allff;
 	unsigned long i;
 
diff -Nru a/drivers/mtd/chips/map_rom.c b/drivers/mtd/chips/map_rom.c
--- a/drivers/mtd/chips/map_rom.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/mtd/chips/map_rom.c	2005-01-10 20:11:20 -08:00
@@ -1,7 +1,7 @@
 /*
  * Common code to handle map devices which are simple ROM
  * (C) 2000 Red Hat. GPL'd.
- * $Id: map_rom.c,v 1.22 2004/11/16 18:29:00 dwmw2 Exp $
+ * $Id: map_rom.c,v 1.23 2005/01/05 18:05:12 dwmw2 Exp $
  */
 
 #include <linux/module.h>
@@ -57,7 +57,7 @@
 
 static int maprom_read (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf)
 {
-	struct map_info *map = (struct map_info *)mtd->priv;
+	struct map_info *map = mtd->priv;
 
 	map_copy_from(map, buf, from, len);
 	*retlen = len;
diff -Nru a/drivers/mtd/cmdlinepart.c b/drivers/mtd/cmdlinepart.c
--- a/drivers/mtd/cmdlinepart.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/mtd/cmdlinepart.c	2005-01-10 20:11:21 -08:00
@@ -1,5 +1,5 @@
 /*
- * $Id: cmdlinepart.c,v 1.16 2004/11/16 18:28:59 dwmw2 Exp $
+ * $Id: cmdlinepart.c,v 1.17 2004/11/26 11:18:47 lavinen Exp $
  *
  * Read flash partition table from command line
  *
@@ -338,8 +338,10 @@
  * This is the handler for our kernel parameter, called from 
  * main.c::checksetup(). Note that we can not yet kmalloc() anything,
  * so we only save the commandline for later processing.
+ *
+ * This function needs to be visible for bootloaders.
  */
-static int mtdpart_setup(char *s)
+int mtdpart_setup(char *s)
 {
 	cmdline = s;
 	return 1;
diff -Nru a/drivers/mtd/devices/Kconfig b/drivers/mtd/devices/Kconfig
--- a/drivers/mtd/devices/Kconfig	2005-01-10 20:11:24 -08:00
+++ b/drivers/mtd/devices/Kconfig	2005-01-10 20:11:24 -08:00
@@ -1,5 +1,5 @@
 # drivers/mtd/maps/Kconfig
-# $Id: Kconfig,v 1.13 2004/10/01 21:47:13 gleixner Exp $
+# $Id: Kconfig,v 1.15 2004/12/22 17:51:15 joern Exp $
 
 menu "Self-contained MTD device drivers"
 	depends on MTD!=n
@@ -125,11 +125,22 @@
 	  Testing MTD users (eg JFFS2) on large media and media that might
 	  be removed during a write (using the floppy drive).
 
+config MTD_BLOCK2MTD
+	tristate "MTD using block device (rewrite)"
+	depends on MTD && EXPERIMENTAL
+	help
+	  This driver is basically the same at MTD_BLKMTD above, but
+	  experienced some interface changes plus serious speedups.  In
+	  the long term, it should replace MTD_BLKMTD.  Right now, you
+	  shouldn't entrust important data to it yet.
+
 comment "Disk-On-Chip Device Drivers"
 
 config MTD_DOC2000
 	tristate "M-Systems Disk-On-Chip 2000 and Millennium (DEPRECATED)"
 	depends on MTD
+	select MTD_DOCPROBE
+	select MTD_NAND_IDS
 	---help---
 	  This provides an MTD device driver for the M-Systems DiskOnChip
 	  2000 and Millennium devices.  Originally designed for the DiskOnChip
@@ -151,6 +162,8 @@
 config MTD_DOC2001
 	tristate "M-Systems Disk-On-Chip Millennium-only alternative driver (DEPRECATED)"
 	depends on MTD
+	select MTD_DOCPROBE
+	select MTD_NAND_IDS
 	---help---
 	  This provides an alternative MTD device driver for the M-Systems 
 	  DiskOnChip Millennium devices.  Use this if you have problems with
@@ -171,6 +184,8 @@
 config MTD_DOC2001PLUS
 	tristate "M-Systems Disk-On-Chip Millennium Plus"
 	depends on MTD
+	select MTD_DOCPROBE
+	select MTD_NAND_IDS
 	---help---
 	  This provides an MTD device driver for the M-Systems DiskOnChip
 	  Millennium Plus devices.
@@ -186,17 +201,10 @@
 
 config MTD_DOCPROBE
 	tristate
-	default m if MTD_DOC2001!=y && MTD_DOC2000!=y && MTD_DOC2001PLUS!=y && (MTD_DOC2001=m || MTD_DOC2000=m || MTD_DOC2001PLUS=m)
-	default y if MTD_DOC2001=y || MTD_DOC2000=y || MTD_DOC2001PLUS=y
-	help
-	  This isn't a real config option; it's derived.
+	select MTD_DOCECC
 
 config MTD_DOCECC
 	tristate
-	default m if MTD_DOCPROBE=m
-	default y if MTD_DOCPROBE=y
-	help
-	  This isn't a real config option; it's derived.
 
 config MTD_DOCPROBE_ADVANCED
 	bool "Advanced detection options for DiskOnChip"
diff -Nru a/drivers/mtd/devices/Makefile b/drivers/mtd/devices/Makefile
--- a/drivers/mtd/devices/Makefile	2005-01-10 20:11:15 -08:00
+++ b/drivers/mtd/devices/Makefile	2005-01-10 20:11:15 -08:00
@@ -1,7 +1,7 @@
 #
 # linux/drivers/devices/Makefile
 #
-# $Id: Makefile.common,v 1.6 2004/07/12 16:07:30 dwmw2 Exp $
+# $Id: Makefile.common,v 1.7 2004/12/22 17:51:15 joern Exp $
 
 #                       *** BIG UGLY NOTE ***
 #
@@ -22,3 +22,4 @@
 obj-$(CONFIG_MTD_MTDRAM)	+= mtdram.o
 obj-$(CONFIG_MTD_LART)		+= lart.o
 obj-$(CONFIG_MTD_BLKMTD)	+= blkmtd.o
+obj-$(CONFIG_MTD_BLOCK2MTD)	+= block2mtd.o
diff -Nru a/drivers/mtd/devices/blkmtd.c b/drivers/mtd/devices/blkmtd.c
--- a/drivers/mtd/devices/blkmtd.c	2005-01-10 20:11:24 -08:00
+++ b/drivers/mtd/devices/blkmtd.c	2005-01-10 20:11:24 -08:00
@@ -68,13 +68,13 @@
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Simon Evans <spse@secret.org.uk>");
 MODULE_DESCRIPTION("Emulate an MTD using a block device");
-MODULE_PARM(device, "1-4s");
+module_param_array(device, charp, NULL, 0);
 MODULE_PARM_DESC(device, "block device to use");
-MODULE_PARM(erasesz, "1-4i");
+module_param_array(erasesz, int, NULL, 0);
 MODULE_PARM_DESC(erasesz, "optional erase size to use in KiB. eg 4=4KiB.");
-MODULE_PARM(ro, "1-4i");
+module_param_array(ro, bool, NULL, 0);
 MODULE_PARM_DESC(ro, "1=Read only, writes and erases cause errors");
-MODULE_PARM(sync, "i");
+module_param(sync, bool, 0);
 MODULE_PARM_DESC(sync, "1=Synchronous writes");
 
 
@@ -661,7 +661,6 @@
 
 	memset(dev, 0, sizeof(struct blkmtd_dev));
 	dev->blkdev = bdev;
-	atomic_set(&(dev->blkdev->bd_inode->i_mapping->truncate_count), 0);
 	if(!readonly) {
 		init_MUTEX(&dev->wrbuf_mutex);
 	}
diff -Nru a/drivers/mtd/devices/block2mtd.c b/drivers/mtd/devices/block2mtd.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/mtd/devices/block2mtd.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,504 @@
+/*
+ * $Id: block2mtd.c,v 1.23 2005/01/05 17:05:46 dwmw2 Exp $
+ *
+ * blockmtd.c - use a block device as a fake MTD
+ *
+ * Author: Simon Evans <spse@secret.org.uk>
+ *
+ * Copyright (C) 2001,2002	Simon Evans
+ * Copyright (C) 2004		
+ * Copyright (C) 2004		JÃ¶rn Engel <joern@wh.fh-wedel.de>
+ *
+ * Licence: GPL
+ *
+ * How it works:
+ *	The driver uses raw/io to read/write the device and the page
+ *	cache to cache access. Writes update the page cache with the
+ *	new data and mark it dirty and add the page into a BIO which
+ *	is then written out.
+ *
+ *	It can be loaded Read-Only to prevent erases and writes to the
+ *	medium.
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/fs.h>
+#include <linux/blkdev.h>
+#include <linux/bio.h>
+#include <linux/pagemap.h>
+#include <linux/list.h>
+#include <linux/init.h>
+#include <linux/mtd/mtd.h>
+#include <linux/buffer_head.h>
+
+#define ERROR(fmt, args...) printk(KERN_ERR "blockmtd: " fmt "\n" , ## args)
+#define INFO(fmt, args...) printk(KERN_INFO "blockmtd: " fmt "\n" , ## args)
+
+
+/* Default erase size in K, always make it a multiple of PAGE_SIZE */
+#define VERSION "$Revision: 1.23 $"
+
+/* Info for the block device */
+struct blockmtd_dev {
+	struct list_head list;
+	struct block_device *blkdev;
+	struct mtd_info mtd;
+	struct semaphore write_mutex;
+};
+
+
+/* Static info about the MTD, used in cleanup_module */
+static LIST_HEAD(blkmtd_device_list);
+
+
+#define PAGE_READAHEAD 64
+void cache_readahead(struct address_space *mapping, int index)
+{
+	filler_t *filler = (filler_t*)mapping->a_ops->readpage;
+	int i, pagei;
+	unsigned ret = 0;
+	unsigned long end_index;
+	struct page *page;
+	LIST_HEAD(page_pool);
+	struct inode *inode = mapping->host;
+	loff_t isize = i_size_read(inode);
+
+	if (!isize) {
+		printk(KERN_INFO "iSize=0 in cache_readahead\n");
+		return;
+	}
+
+	end_index = ((isize - 1) >> PAGE_CACHE_SHIFT);
+
+	spin_lock_irq(&mapping->tree_lock);
+	for (i = 0; i < PAGE_READAHEAD; i++) {
+		pagei = index + i;
+		if (pagei > end_index) {
+			printk(KERN_INFO "Overrun end of disk in cache readahead\n");
+			break;
+		}
+		page = radix_tree_lookup(&mapping->page_tree, pagei);
+		if (page && (!i))
+			break;
+		if (page)
+			continue;
+		spin_unlock_irq(&mapping->tree_lock);
+		page = page_cache_alloc_cold(mapping);
+		spin_lock_irq(&mapping->tree_lock);
+		if (!page)
+			break;
+		page->index = pagei;
+		list_add(&page->lru, &page_pool);
+		ret++;
+	}
+	spin_unlock_irq(&mapping->tree_lock);
+	if (ret)
+		read_cache_pages(mapping, &page_pool, filler, NULL);
+}
+
+
+static struct page* page_readahead(struct address_space *mapping, int index)
+{
+	filler_t *filler = (filler_t*)mapping->a_ops->readpage;
+	cache_readahead(mapping, index);
+	return read_cache_page(mapping, index, filler, NULL);
+}
+
+
+/* erase a specified part of the device */
+static int _blockmtd_erase(struct blockmtd_dev *dev, loff_t to, size_t len)
+{
+	struct address_space *mapping = dev->blkdev->bd_inode->i_mapping;
+	struct page *page;
+	int index = to >> PAGE_SHIFT;	// page index
+	int pages = len >> PAGE_SHIFT;
+	u_long *p;
+	u_long *max;
+
+	while (pages) {
+		page = page_readahead(mapping, index);
+		if (!page)
+			return -ENOMEM;
+		if (IS_ERR(page))
+			return PTR_ERR(page);
+
+		max = (u_long*)page_address(page) + PAGE_SIZE;
+		for (p=(u_long*)page_address(page); p<max; p++) 
+			if (*p != -1UL) {
+				lock_page(page);
+				memset(page_address(page), 0xff, PAGE_SIZE);
+				set_page_dirty(page);
+				unlock_page(page);
+				break;
+			}
+
+		page_cache_release(page);
+		pages--;
+		index++;
+	}
+	return 0;
+}
+static int blockmtd_erase(struct mtd_info *mtd, struct erase_info *instr)
+{
+	struct blockmtd_dev *dev = mtd->priv;
+	size_t from = instr->addr;
+	size_t len = instr->len;
+	int err;
+
+	instr->state = MTD_ERASING;
+	down(&dev->write_mutex);
+	err = _blockmtd_erase(dev, from, len);
+	up(&dev->write_mutex);
+	if (err) {
+		ERROR("erase failed err = %d", err);
+		instr->state = MTD_ERASE_FAILED;
+	} else
+		instr->state = MTD_ERASE_DONE;
+
+	instr->state = MTD_ERASE_DONE;
+	mtd_erase_callback(instr);
+	return err;
+}
+
+
+static int blockmtd_read(struct mtd_info *mtd, loff_t from, size_t len,
+		size_t *retlen, u_char *buf)
+{
+	struct blockmtd_dev *dev = mtd->priv;
+	struct page *page;
+	int index = from >> PAGE_SHIFT;
+	int offset = from & (PAGE_SHIFT-1);
+	int cpylen;
+
+	if (from > mtd->size)
+		return -EINVAL;
+	if (from + len > mtd->size)
+		len = mtd->size - from;
+
+	if (retlen)
+		*retlen = 0;
+
+	while (len) {
+		if ((offset + len) > PAGE_SIZE)
+			cpylen = PAGE_SIZE - offset;	// multiple pages
+		else
+			cpylen = len;	// this page
+		len = len - cpylen;
+
+		//      Get page
+		page = page_readahead(dev->blkdev->bd_inode->i_mapping, index);
+		if (!page)
+			return -ENOMEM;
+		if (IS_ERR(page))
+			return PTR_ERR(page);
+
+		memcpy(buf, page_address(page) + offset, cpylen);
+		page_cache_release(page);
+
+		if (retlen)
+			*retlen += cpylen;
+		buf += cpylen;
+		offset = 0;
+		index++;
+	}
+	return 0;
+}
+
+
+/* write data to the underlying device */
+static int _blockmtd_write(struct blockmtd_dev *dev, const u_char *buf,
+		loff_t to, size_t len, size_t *retlen)
+{
+	struct page *page;
+	struct address_space *mapping = dev->blkdev->bd_inode->i_mapping;
+	int index = to >> PAGE_SHIFT;	// page index
+	int offset = to & ~PAGE_MASK;	// page offset
+	int cpylen;
+
+	if (retlen)
+		*retlen = 0;
+	while (len) {
+		if ((offset+len) > PAGE_SIZE) 
+			cpylen = PAGE_SIZE - offset;	// multiple pages
+		else
+			cpylen = len;			// this page
+		len = len - cpylen;
+
+		//	Get page
+		page = page_readahead(mapping, index);
+		if (!page)
+			return -ENOMEM;
+		if (IS_ERR(page))
+			return PTR_ERR(page);
+
+		if (memcmp(page_address(page)+offset, buf, cpylen)) {
+			lock_page(page);
+			memcpy(page_address(page) + offset, buf, cpylen);
+			set_page_dirty(page);
+			unlock_page(page);
+		}
+		page_cache_release(page);
+
+		if (retlen)
+			*retlen += cpylen;
+
+		buf += cpylen;
+		offset = 0;
+		index++;
+	}
+	return 0;
+}
+static int blockmtd_write(struct mtd_info *mtd, loff_t to, size_t len,
+		size_t *retlen, const u_char *buf)
+{
+	struct blockmtd_dev *dev = mtd->priv;
+	int err;
+
+	if (!len)
+		return 0;
+	if (to >= mtd->size)
+		return -ENOSPC;
+	if (to + len > mtd->size)
+		len = mtd->size - to;
+
+	down(&dev->write_mutex);
+	err = _blockmtd_write(dev, buf, to, len, retlen);
+	up(&dev->write_mutex);
+	if (err > 0)
+		err = 0;
+	return err;
+}
+
+
+/* sync the device - wait until the write queue is empty */
+static void blockmtd_sync(struct mtd_info *mtd)
+{
+	struct blockmtd_dev *dev = mtd->priv;
+	sync_blockdev(dev->blkdev);
+	return;
+}
+
+
+static void blockmtd_free_device(struct blockmtd_dev *dev)
+{
+	if (!dev)
+		return;
+
+	kfree(dev->mtd.name);
+
+	if (dev->blkdev) {
+		invalidate_inode_pages(dev->blkdev->bd_inode->i_mapping);
+		close_bdev_excl(dev->blkdev);
+	}
+
+	kfree(dev);
+}
+
+
+/* FIXME: ensure that mtd->size % erase_size == 0 */
+static struct blockmtd_dev *add_device(char *devname, int erase_size)
+{
+	struct block_device *bdev;
+	struct blockmtd_dev *dev;
+
+	if (!devname)
+		return NULL;
+
+	dev = kmalloc(sizeof(struct blockmtd_dev), GFP_KERNEL);
+	if (!dev)
+		return NULL;
+	memset(dev, 0, sizeof(*dev));
+
+	/* Get a handle on the device */
+	bdev = open_bdev_excl(devname, O_RDWR, NULL);
+	if (IS_ERR(bdev)) {
+		ERROR("error: cannot open device %s", devname);
+		goto devinit_err;
+	}
+	dev->blkdev = bdev;
+
+	if (MAJOR(bdev->bd_dev) == MTD_BLOCK_MAJOR) {
+		ERROR("attempting to use an MTD device as a block device");
+		goto devinit_err;
+	}
+
+	init_MUTEX(&dev->write_mutex);
+
+	/* Setup the MTD structure */
+	/* make the name contain the block device in */
+	dev->mtd.name = kmalloc(sizeof("blockmtd: ") + strlen(devname),
+			GFP_KERNEL);
+	if (!dev->mtd.name)
+		goto devinit_err;
+
+	sprintf(dev->mtd.name, "blockmtd: %s", devname);
+
+	dev->mtd.size = dev->blkdev->bd_inode->i_size & PAGE_MASK;
+	dev->mtd.erasesize = erase_size;
+	dev->mtd.type = MTD_RAM;
+	dev->mtd.flags = MTD_CAP_RAM;
+	dev->mtd.erase = blockmtd_erase;
+	dev->mtd.write = blockmtd_write;
+	dev->mtd.writev = default_mtd_writev;
+	dev->mtd.sync = blockmtd_sync;
+	dev->mtd.read = blockmtd_read;
+	dev->mtd.readv = default_mtd_readv;
+	dev->mtd.priv = dev;
+	dev->mtd.owner = THIS_MODULE;
+
+	if (add_mtd_device(&dev->mtd)) {
+		/* Device didnt get added, so free the entry */
+		goto devinit_err;
+	}
+	list_add(&dev->list, &blkmtd_device_list);
+	INFO("mtd%d: [%s] erase_size = %dKiB [%ld]", dev->mtd.index,
+			dev->mtd.name + strlen("blkmtd: "),
+			dev->mtd.erasesize >> 10, PAGE_SIZE);
+	return dev;
+
+devinit_err:
+	blockmtd_free_device(dev);
+	return NULL;
+}
+
+
+static int ustrtoul(const char *cp, char **endp, unsigned int base)
+{
+	unsigned long result = simple_strtoul(cp, endp, base);
+	switch (**endp) {
+	case 'G' :
+		result *= 1024;
+	case 'M':
+		result *= 1024;
+	case 'k':
+		result *= 1024;
+	/* By dwmw2 editorial decree, "ki", "Mi" or "Gi" are to be used. */
+		if ((*endp)[1] == 'i')
+			(*endp) += 2;
+	}
+	return result;
+}
+
+
+static int parse_num32(u32 *num32, const char *token)
+{
+	char *endp;
+	unsigned long n;
+
+	n = ustrtoul(token, &endp, 0);
+	if (*endp)
+		return -EINVAL;
+
+	*num32 = n;
+	return 0;
+}
+
+
+static int parse_name(char **pname, const char *token, size_t limit)
+{
+	size_t len;
+	char *name;
+
+	len = strlen(token) + 1;
+	if (len > limit)
+		return -ENOSPC;
+
+	name = kmalloc(len, GFP_KERNEL);
+	if (!name)
+		return -ENOMEM;
+
+	strcpy(name, token);
+
+	*pname = name;
+	return 0;
+}
+
+
+#define parse_err(fmt, args...) do {		\
+	ERROR("blockmtd: " fmt "\n", ## args);	\
+	return 0;				\
+} while (0)
+
+static int blockmtd_setup(const char *val, struct kernel_param *kp)
+{
+	char buf[80+12], *str=buf; /* 80 for device, 12 for erase size */
+	char *token[2];
+	char *name;
+	size_t erase_size = PAGE_SIZE;
+	int i, ret;
+
+	if (strnlen(val, sizeof(buf)) >= sizeof(buf))
+		parse_err("parameter too long");
+
+	strcpy(str, val);
+
+	for (i=0; i<2; i++)
+		token[i] = strsep(&str, ",");
+
+	{ /* people dislike typing "echo -n".  and it's simple enough */
+		char *newline = strrchr(token[1], '\n');
+		if (newline && !newline[1])
+			*newline = 0;
+	}
+
+	if (str)
+		parse_err("too many arguments");
+
+	if (!token[0])
+		parse_err("no argument");
+
+	ret = parse_name(&name, token[0], 80);
+	if (ret == -ENOMEM)
+		parse_err("out of memory");
+	if (ret == -ENOSPC)
+		parse_err("name too long");
+	if (ret)
+		return 0;
+
+	if (token[1]) {
+		ret = parse_num32(&erase_size, token[1]);
+		if (ret)
+			parse_err("illegal erase size");
+	}
+
+	add_device(name, erase_size);
+
+	return 0;
+}
+
+
+module_param_call(blockmtd, blockmtd_setup, NULL, NULL, 0200);
+MODULE_PARM_DESC(blockmtd, "Device to use. \"blockmtd=<dev>[,<erasesize>]\"");
+
+static int __init blockmtd_init(void)
+{
+	INFO("version " VERSION);
+	return 0;
+}
+
+
+static void __devexit blockmtd_exit(void)
+{
+	struct list_head *pos, *next;
+
+	/* Remove the MTD devices */
+	list_for_each_safe(pos, next, &blkmtd_device_list) {
+		struct blockmtd_dev *dev = list_entry(pos, typeof(*dev), list);
+		blockmtd_sync(&dev->mtd);
+		del_mtd_device(&dev->mtd);
+		INFO("mtd%d: [%s] removed", dev->mtd.index,
+				dev->mtd.name + strlen("blkmtd: "));
+		list_del(&dev->list);
+		blockmtd_free_device(dev);
+	}
+}
+
+
+module_init(blockmtd_init);
+module_exit(blockmtd_exit);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Simon Evans <spse@secret.org.uk> and others");
+MODULE_DESCRIPTION("Emulate an MTD using a block device");
diff -Nru a/drivers/mtd/devices/doc1000.c b/drivers/mtd/devices/doc1000.c
--- a/drivers/mtd/devices/doc1000.c	2005-01-10 20:11:20 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,594 +0,0 @@
-/*======================================================================
-
-  $Id: doc1000.c,v 1.15 2001/10/02 15:05:13 dwmw2 Exp $
-
-======================================================================*/
-
-
-#include <linux/config.h>
-#include <linux/module.h>
-#include <asm/uaccess.h>
-#include <linux/types.h>
-#include <linux/kernel.h>
-#include <linux/sched.h>
-#include <linux/ptrace.h>
-#include <linux/slab.h>
-#include <linux/string.h>
-#include <linux/timer.h>
-#include <linux/major.h>
-#include <linux/fs.h>
-#include <linux/ioctl.h>
-#include <asm/io.h>
-#include <asm/system.h>
-#include <stdarg.h>
-#include <linux/delay.h>
-#include <linux/init.h>
-
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/iflash.h>
-
-/* Parameters that can be set with 'insmod' */
-
-static u_long base              = 0xe0000;
-static int erase_timeout	= 10*HZ;	/* in ticks */
-static int retry_limit		= 4;		/* write retries */
-static u_long max_tries       	= 4096;		/* status polling */
-
-MODULE_PARM(base,"l");
-MODULE_PARM(erase_timeout, "i");
-MODULE_PARM(retry_limit, "i");
-MODULE_PARM(max_tries, "i");
-
-#define WINDOW_SIZE 0x2000
-#define WINDOW_MASK (WINDOW_SIZE - 1)
-#define PAGEREG_LO (WINDOW_SIZE)
-#define PAGEREG_HI (WINDOW_SIZE + 2)
-
-static struct mtd_info *mymtd;
-static struct timer_list flashcard_timer;
-
-#define MAX_CELLS		32
-#define MAX_FLASH_DEVICES       8
-
-/* A flash region is composed of one or more "cells", where we allow
-   simultaneous erases if they are in different cells */
-
-
-
-struct mypriv {
-	u_char *baseaddr;
-	u_short curpage;
-	u_char locked;
-	u_short numdevices;
-	u_char interleave;
-	struct erase_info *cur_erases;
-	wait_queue_head_t wq;
-	u_char devstat[MAX_FLASH_DEVICES];
-	u_long devshift;
-};
-
-
-static void flashcard_periodic(u_long data);
-static int flashcard_erase (struct mtd_info *mtd, struct erase_info *instr);
-static int flashcard_read (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf);
-static int flashcard_write (struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf);
-static void flashcard_sync (struct mtd_info *mtd);
-
-static inline void resume_erase(volatile u_char *addr);
-static inline int suspend_erase(volatile u_char *addr);
-static inline int byte_write (volatile u_char *addr, u_char byte);
-static inline int word_write (volatile u_char *addr, __u16 word);
-static inline int check_write(volatile u_char *addr);
-static inline void block_erase (volatile u_char *addr);
-static inline int check_erase(volatile u_char *addr);
-
-#ifdef CONFIG_SMP
-#warning This is definitely not SMP safe. Lock the paging mechanism.
-#endif
-
-static u_char *pagein(struct mtd_info *mtd, u_long addr)
-{
-  struct mypriv *priv=mtd->priv;
-  u_short page = addr >> 13;
-
-  priv->baseaddr[PAGEREG_LO] = page & 0xff;
-  priv->baseaddr[PAGEREG_HI] = page >> 8;
-  priv->curpage = page;
-  
-  return &priv->baseaddr[addr & WINDOW_MASK];
-}
-
-
-void flashcard_sync (struct mtd_info *mtd)
-{
-	struct mypriv *priv=mtd->priv;
-
-	flashcard_periodic((u_long) mtd);
-	printk("sync...");
-	if (priv->cur_erases)
-		interruptible_sleep_on(&priv->wq);
-	printk("Done.\n");
-}
-
-int flashcard_erase (struct mtd_info *mtd, struct erase_info *instr)
-{
-	u_char *pageaddr;
-	struct mypriv *priv=mtd->priv;
-	struct erase_info **tmp=&priv->cur_erases;
-	
-	if (instr->len != mtd->erasesize)
-		return -EINVAL;
-	if (instr->addr + instr->len > mtd->size)
-		return -EINVAL;
-
-	pageaddr=pagein(mtd,instr->addr);
-	instr->mtd = mtd;
-	instr->dev = instr->addr >> priv->devshift;
-	instr->cell = (instr->addr - (instr->dev << priv->devshift)) / mtd->erasesize;
-	instr->next = NULL;
-	instr->state = MTD_ERASE_PENDING;
-	
-	while (*tmp)
-	{
-		tmp = &((*tmp) -> next);
-	}
-	
-	*tmp = instr;
-	flashcard_periodic((u_long)mtd);
-	return 0;
-}
-
-
-int flashcard_read (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf)
-{
- 	u_char *pageaddr=pagein(mtd,from);
-	struct mypriv *priv=mtd->priv;
-	u_char device = from >> priv->devshift;
-	u_char cell = (int) (from - (device << priv->devshift)) / mtd->erasesize;
-	int ret = 0, timeron = 0;
-
-	if ((from & WINDOW_MASK) + len <= WINDOW_SIZE)
-		*retlen = len;
-	else
-		*retlen = WINDOW_SIZE - (from & WINDOW_MASK);
-
-	if (priv->devstat[device])
-	{
-		
-		/* There is an erase in progress or pending for this device. Stop it */
-		timeron = del_timer(&flashcard_timer);
-		
-		if (priv->cur_erases && priv->cur_erases->cell == cell) 
-			
-		{
-			/* The erase is on the current cell. Just return all 0xff */ 
-			add_timer(&flashcard_timer);
-			
-			
-			printk("Cell %d currently erasing. Setting to all 0xff\n",cell);
-			memset(buf, 0xff, *retlen);
-			return 0;
-		}
-		if (priv->devstat[device] == MTD_ERASING)
-		{
-			ret = suspend_erase(pageaddr);
-			priv->devstat[device] = MTD_ERASE_SUSPEND;
-		       
-			if (ret) 
-			{
-				printk("flashcard: failed to suspend erase\n");
-				add_timer (&flashcard_timer);
-				return ret;
-			}
-		}
-
-	}
-
-	writew(IF_READ_ARRAY, (u_long)pageaddr & ~1);
-	
-	ret = 0;
-	memcpy (buf, pageaddr, *retlen);
-	
-	writew(IF_READ_CSR, (u_long)pageaddr & ~1);
-	
-	
-	if (priv->devstat[device] & MTD_ERASE_SUSPEND)
-	{
-		resume_erase(pageaddr);
-		priv->devstat[device]=MTD_ERASING;
-	}
-
-
-	if (timeron) add_timer (&flashcard_timer);
-		
-	return ret;
-}
-
-
-int flashcard_write (struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf)
-{
-	struct mypriv *priv = (struct mypriv *)mtd->priv;
- 	u_char *endaddr, *startaddr;
-	register u_char *pageaddr;
-	u_char device = to >> priv->devshift;
-/*	jiffies_t oldj=jiffies;*/
-	int ret;
-
-	while (priv->devstat[device])
-	{
-		flashcard_sync(mtd);
-	}
-
-	if ((to & WINDOW_MASK) + len <= WINDOW_SIZE)
-		*retlen = len;
-	else
-		*retlen = WINDOW_SIZE - (to & WINDOW_MASK);
-	
-	pageaddr = pagein(mtd, to);
-	startaddr = (u_char *)((u_long) pageaddr & ~1);
-	endaddr = pageaddr+(*retlen);
-
-
-
-	/* Set up to read */
-	writew(IF_READ_CSR, startaddr);
-	
-	/* Make sure it's aligned by reading the first byte if necessary */
-	if (to & 1)
-	{
-		/* Unaligned access */
-
-		u_char cbuf;
-
-		cbuf = *buf;
-
-		if (!((u_long)pageaddr & 0xf))
-			schedule();
-			
-		ret = byte_write(pageaddr, cbuf);
-		if (ret) return ret;
-
-		pageaddr++; buf++;
-	}
-
-
-	for ( ; pageaddr + 1 < endaddr; buf += 2, pageaddr += 2)
-		{
-			/* if ((u_long)pageaddr & 0xf) schedule();*/
-			
-			ret = word_write(pageaddr, *(__u16 *)buf);
-			if (ret) 
-				return ret;
-		}
-	
-	if (pageaddr != endaddr)
-	{
-		/* One more byte to write at the end. */
-		u_char cbuf;
-
-		cbuf = *buf;
-
-		ret = byte_write(pageaddr, cbuf);
-
-		if (ret) return ret;
-	}
-
-	return check_write(startaddr);
-/*	printk("Time taken in flashcard_write: %lx jiffies\n",jiffies - oldj);*/
-}
-
-
-
-
-/*====================================================================*/
-
-static inline int byte_write (volatile u_char *addr, u_char byte)
-{
-	register u_char status;
-	register u_short i = 0;
-
-	do {
-		status = readb(addr);
-		if (status & CSR_WR_READY)
-		{
-			writeb(IF_WRITE & 0xff, addr);
-			writeb(byte, addr);
-			return 0;
-		}
-		i++;
-	} while(i < max_tries);
-
-		
-	printk(KERN_NOTICE "flashcard: byte_write timed out, status 0x%x\n",status);
-	return -EIO;
-}
-
-static inline int word_write (volatile u_char *addr, __u16 word)
-{
-	register u_short status;
-	register u_short i = 0;
-	
-	do {
-		status = readw(addr);
-		if ((status & CSR_WR_READY) == CSR_WR_READY)
-		{
-			writew(IF_WRITE, addr);
-			writew(word, addr);
-			return 0;
-		}
-		i++;
-	} while(i < max_tries);
-		
-	printk(KERN_NOTICE "flashcard: word_write timed out at %p, status 0x%x\n", addr, status);
-	return -EIO;
-}
-
-static inline void block_erase (volatile u_char *addr)
-{
-	writew(IF_BLOCK_ERASE, addr);
-	writew(IF_CONFIRM, addr);
-}
-
-
-static inline int check_erase(volatile u_char *addr)
-{
-	__u16 status;
-	
-/*	writew(IF_READ_CSR, addr);*/
-	status = readw(addr);
-	
-
-	if ((status & CSR_WR_READY) != CSR_WR_READY)
-		return -EBUSY;
-	
-	if (status & (CSR_ERA_ERR | CSR_VPP_LOW | CSR_WR_ERR)) 
-	{
-		printk(KERN_NOTICE "flashcard: erase failed, status 0x%x\n",
-		       status);
-		return -EIO;
-	}
-	
-	return 0;
-}
-
-static inline int suspend_erase(volatile u_char *addr)
-{
-	__u16 status;
-	u_long i = 0;
-	
-	writew(IF_ERASE_SUSPEND, addr);
-	writew(IF_READ_CSR, addr);
-	
-	do {
-		status = readw(addr);
-		if ((status & CSR_WR_READY) == CSR_WR_READY)
-			return 0;
-		i++;
-	} while(i < max_tries);
-
-	printk(KERN_NOTICE "flashcard: suspend_erase timed out, status 0x%x\n", status);
-	return -EIO;
-
-}
-
-static inline void resume_erase(volatile u_char *addr)
-{
-	__u16 status;
-	
-	writew(IF_READ_CSR, addr);
-	status = readw(addr);
-	
-	/* Only give resume signal if the erase is really suspended */
-	if (status & CSR_ERA_SUSPEND)
-		writew(IF_CONFIRM, addr);
-}
-
-static inline void reset_block(volatile u_char *addr)
-{
-	u_short i;
-	__u16 status;
-
-	writew(IF_CLEAR_CSR, addr);
-
-	for (i = 0; i < 100; i++) {
-		writew(IF_READ_CSR, addr);
-		status = readw(addr);
-		if (status != 0xffff) break;
-		udelay(1000);
-	}
-
-	writew(IF_READ_CSR, addr);
-}
-
-static inline int check_write(volatile u_char *addr)
-{
-	u_short status, i = 0;
-	
-	writew(IF_READ_CSR, addr);
-	
-	do {
-		status = readw(addr);
-		if (status & (CSR_WR_ERR | CSR_VPP_LOW))
-		{
-			printk(KERN_NOTICE "flashcard: write failure at %p, status 0x%x\n", addr, status);
-			reset_block(addr);
-			return -EIO;
-		}
-		if ((status & CSR_WR_READY) == CSR_WR_READY)
-			return 0;
-		i++;
-	} while (i < max_tries);
-
-	printk(KERN_NOTICE "flashcard: write timed out at %p, status 0x%x\n", addr, status);
-	return -EIO;
-}
-
-
-/*====================================================================*/
-
-
-
-static void flashcard_periodic(unsigned long data)
-{
-	register struct mtd_info *mtd = (struct mtd_info *)data;
-	register struct mypriv *priv = mtd->priv;
-	struct erase_info *erase = priv->cur_erases;
-	u_char *pageaddr;
-
-	del_timer (&flashcard_timer);
-
-	if (!erase)
-		return;
-
-	pageaddr = pagein(mtd, erase->addr);
-	
-	if (erase->state == MTD_ERASE_PENDING)
-	{
-		block_erase(pageaddr);
-		priv->devstat[erase->dev] = erase->state = MTD_ERASING;
-		erase->time = jiffies;
-		erase->retries = 0;
-	}
-	else if (erase->state == MTD_ERASING)
-	{
-		/* It's trying to erase. Check whether it's finished */
-
-		int ret = check_erase(pageaddr);
-
-		if (!ret)
-		{
-			/* It's finished OK */
-			priv->devstat[erase->dev] = 0;
-			priv->cur_erases = erase->next;
-			erase->state = MTD_ERASE_DONE;
-			if (erase->callback)
-				(*(erase->callback))(erase);
-			else
-				kfree(erase);
-		}
-		else if (ret == -EIO)
-		{
-			if (++erase->retries > retry_limit)
-			{
-				printk("Failed too many times. Giving up\n");
-				priv->cur_erases = erase->next;
-				priv->devstat[erase->dev] = 0;
-				erase->state = MTD_ERASE_FAILED;
-				if (erase->callback)
-					(*(erase->callback))(erase);
-				else
-					kfree(erase);
-			}
-			else
-				priv->devstat[erase->dev] = erase->state = MTD_ERASE_PENDING;
-		}
-		else if (erase->time + erase_timeout < jiffies)
-		{
-			printk("Flash erase timed out. The world is broken.\n");
-
-			/* Just ignore and hope it goes away. For a while, read ops will give the CSR
-			   and writes won't work. */
-
-			priv->cur_erases = erase->next;
-			priv->devstat[erase->dev] = 0;
-			erase->state = MTD_ERASE_FAILED;
-			if (erase->callback)
-					(*(erase->callback))(erase);
-				else
-					kfree(erase);
-		}
-	}
-
-	if (priv->cur_erases)
-	{
-		flashcard_timer.expires = jiffies + HZ;
-		add_timer (&flashcard_timer);
-	}
-	else 
-		wake_up_interruptible(&priv->wq);
-
-}
-
-int __init init_doc1000(void)
-{
-	struct mypriv *priv;
-
-	if (!base)
-	{
-		printk(KERN_NOTICE "flashcard: No start address for memory device.\n");
-		return -EINVAL;
-	}
-
-	mymtd  = kmalloc(sizeof(struct mtd_info), GFP_KERNEL);
-
-	if (!mymtd)
-	{
-		printk(KERN_NOTICE "physmem: Cannot allocate memory for new MTD device.\n");
-		return -ENOMEM;
-	}
-
-	memset(mymtd,0,sizeof(struct mtd_info));
-
-	mymtd->priv = (void *) kmalloc (sizeof(struct mypriv), GFP_KERNEL);
-	if (!mymtd->priv)
-	  {
-	    kfree(mymtd);
-	    printk(KERN_NOTICE "physmem: Cannot allocate memory for new MTD device's private data.\n");
-	    return -ENOMEM;
-	  }
-	
-
-
-
-	priv=mymtd->priv;
-	init_waitqueue_head(&priv->wq);
-
-	memset (priv,0,sizeof(struct mypriv));
-
-	priv->baseaddr = phys_to_virt(base);
-	priv->numdevices = 4;
-	
-	mymtd->name = "M-Systems DiskOnChip 1000";
-
-	mymtd->size = 0x100000;
-	mymtd->flags = MTD_CLEAR_BITS | MTD_ERASEABLE;
-        mymtd->erase = flashcard_erase;
-	mymtd->point = NULL;
-	mymtd->unpoint = NULL;
-	mymtd->read = flashcard_read;
-	mymtd->write = flashcard_write;
-
-	mymtd->sync = flashcard_sync;
-	mymtd->erasesize = 0x10000;
-	//	mymtd->interleave = 2;
-	priv->devshift =  24;
-	mymtd->type = MTD_NORFLASH;
-	
-	if (add_mtd_device(mymtd))
-	{
-		printk(KERN_NOTICE "MTD device registration failed!\n");
-		kfree(mymtd->priv);
-		kfree(mymtd);
-		return -EAGAIN;
-	}
-	
-	init_timer(&flashcard_timer);
-	flashcard_timer.function = flashcard_periodic;
-	flashcard_timer.data = (u_long)mymtd;
-	return 0;
-}
-
-static void __init cleanup_doc1000(void)
-{
-	kfree (mymtd->priv);
-	del_mtd_device(mymtd);
-	kfree(mymtd);
-}
-
-module_init(init_doc1000);
-module_exit(cleanup_doc1000);
-
-MODULE_LICENSE("GPL");
-MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org>");
-MODULE_DESCRIPTION("MTD driver for DiskOnChip 1000");
-
diff -Nru a/drivers/mtd/devices/doc2000.c b/drivers/mtd/devices/doc2000.c
--- a/drivers/mtd/devices/doc2000.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/mtd/devices/doc2000.c	2005-01-10 20:11:15 -08:00
@@ -4,7 +4,7 @@
  * (c) 1999 Machine Vision Holdings, Inc.
  * (c) 1999, 2000 David Woodhouse <dwmw2@infradead.org>
  *
- * $Id: doc2000.c,v 1.64 2004/11/16 18:29:01 dwmw2 Exp $
+ * $Id: doc2000.c,v 1.66 2005/01/05 18:05:12 dwmw2 Exp $
  */
 
 #include <linux/kernel.h>
@@ -527,26 +527,26 @@
  */
 static void DoC2k_init(struct mtd_info *mtd)
 {
-	struct DiskOnChip *this = (struct DiskOnChip *) mtd->priv;
+	struct DiskOnChip *this = mtd->priv;
 	struct DiskOnChip *old = NULL;
 	int maxchips;
 
 	/* We must avoid being called twice for the same device. */
 
 	if (doc2klist)
-		old = (struct DiskOnChip *) doc2klist->priv;
+		old = doc2klist->priv;
 
 	while (old) {
 		if (DoC2k_is_alias(old, this)) {
 			printk(KERN_NOTICE
 			       "Ignoring DiskOnChip 2000 at 0x%lX - already configured\n",
 			       this->physadr);
-			iounmap((void *) this->virtadr);
+			iounmap(this->virtadr);
 			kfree(mtd);
 			return;
 		}
 		if (old->nextdoc)
-			old = (struct DiskOnChip *) old->nextdoc->priv;
+			old = old->nextdoc->priv;
 		else
 			old = NULL;
 	}
@@ -573,7 +573,7 @@
 	default:
 		printk("Unknown ChipID 0x%02x\n", this->ChipID);
 		kfree(mtd);
-		iounmap((void *) this->virtadr);
+		iounmap(this->virtadr);
 		return;
 	}
 
@@ -612,7 +612,7 @@
 
 	if (!this->totlen) {
 		kfree(mtd);
-		iounmap((void *) this->virtadr);
+		iounmap(this->virtadr);
 	} else {
 		this->nextdoc = doc2klist;
 		doc2klist = mtd;
@@ -633,7 +633,7 @@
 static int doc_read_ecc(struct mtd_info *mtd, loff_t from, size_t len,
 			size_t * retlen, u_char * buf, u_char * eccbuf, struct nand_oobinfo *oobsel)
 {
-	struct DiskOnChip *this = (struct DiskOnChip *) mtd->priv;
+	struct DiskOnChip *this = mtd->priv;
 	void __iomem *docptr = this->virtadr;
 	struct Nand *mychip;
 	unsigned char syndrome[6];
@@ -790,7 +790,7 @@
 			 size_t * retlen, const u_char * buf,
 			 u_char * eccbuf, struct nand_oobinfo *oobsel)
 {
-	struct DiskOnChip *this = (struct DiskOnChip *) mtd->priv;
+	struct DiskOnChip *this = mtd->priv;
 	int di; /* Yes, DI is a hangover from when I was disassembling the binary driver */
 	void __iomem *docptr = this->virtadr;
 	volatile char dummy;
@@ -1033,7 +1033,7 @@
 static int doc_read_oob(struct mtd_info *mtd, loff_t ofs, size_t len,
 			size_t * retlen, u_char * buf)
 {
-	struct DiskOnChip *this = (struct DiskOnChip *) mtd->priv;
+	struct DiskOnChip *this = mtd->priv;
 	int len256 = 0, ret;
 	struct Nand *mychip;
 
@@ -1091,7 +1091,7 @@
 static int doc_write_oob_nolock(struct mtd_info *mtd, loff_t ofs, size_t len,
 				size_t * retlen, const u_char * buf)
 {
-	struct DiskOnChip *this = (struct DiskOnChip *) mtd->priv;
+	struct DiskOnChip *this = mtd->priv;
 	int len256 = 0;
 	void __iomem *docptr = this->virtadr;
 	struct Nand *mychip = &this->chips[ofs >> this->chipshift];
@@ -1194,7 +1194,7 @@
 static int doc_write_oob(struct mtd_info *mtd, loff_t ofs, size_t len,
  			 size_t * retlen, const u_char * buf)
 {
- 	struct DiskOnChip *this = (struct DiskOnChip *) mtd->priv;
+ 	struct DiskOnChip *this = mtd->priv;
  	int ret;
 
  	down(&this->lock);
@@ -1206,7 +1206,7 @@
 
 static int doc_erase(struct mtd_info *mtd, struct erase_info *instr)
 {
-	struct DiskOnChip *this = (struct DiskOnChip *) mtd->priv;
+	struct DiskOnChip *this = mtd->priv;
 	__u32 ofs = instr->addr;
 	__u32 len = instr->len;
 	volatile int dummy;
@@ -1288,12 +1288,12 @@
 	struct DiskOnChip *this;
 
 	while ((mtd = doc2klist)) {
-		this = (struct DiskOnChip *) mtd->priv;
+		this = mtd->priv;
 		doc2klist = this->nextdoc;
 
 		del_mtd_device(mtd);
 
-		iounmap((void *) this->virtadr);
+		iounmap(this->virtadr);
 		kfree(this->chips);
 		kfree(mtd);
 	}
diff -Nru a/drivers/mtd/devices/doc2001.c b/drivers/mtd/devices/doc2001.c
--- a/drivers/mtd/devices/doc2001.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/mtd/devices/doc2001.c	2005-01-10 20:11:17 -08:00
@@ -4,7 +4,7 @@
  * (c) 1999 Machine Vision Holdings, Inc.
  * (c) 1999, 2000 David Woodhouse <dwmw2@infradead.org>
  *
- * $Id: doc2001.c,v 1.46 2004/11/16 18:29:01 dwmw2 Exp $
+ * $Id: doc2001.c,v 1.48 2005/01/05 18:05:12 dwmw2 Exp $
  */
 
 #include <linux/kernel.h>
@@ -335,23 +335,23 @@
  */
 static void DoCMil_init(struct mtd_info *mtd)
 {
-	struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv;
+	struct DiskOnChip *this = mtd->priv;
 	struct DiskOnChip *old = NULL;
 
 	/* We must avoid being called twice for the same device. */
 	if (docmillist)
-		old = (struct DiskOnChip *)docmillist->priv;
+		old = docmillist->priv;
 
 	while (old) {
 		if (DoCMil_is_alias(this, old)) {
 			printk(KERN_NOTICE "Ignoring DiskOnChip Millennium at "
 			       "0x%lX - already configured\n", this->physadr);
-			iounmap((void *)this->virtadr);
+			iounmap(this->virtadr);
 			kfree(mtd);
 			return;
 		}
 		if (old->nextdoc)
-			old = (struct DiskOnChip *)old->nextdoc->priv;
+			old = old->nextdoc->priv;
 		else
 			old = NULL;
 	}
@@ -392,7 +392,7 @@
 
 	if (!this->totlen) {
 		kfree(mtd);
-		iounmap((void *)this->virtadr);
+		iounmap(this->virtadr);
 	} else {
 		this->nextdoc = docmillist;
 		docmillist = mtd;
@@ -416,7 +416,7 @@
 	int i, ret;
 	volatile char dummy;
 	unsigned char syndrome[6];
-	struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv;
+	struct DiskOnChip *this = mtd->priv;
 	void __iomem *docptr = this->virtadr;
 	struct Nand *mychip = &this->chips[from >> (this->chipshift)];
 
@@ -542,7 +542,7 @@
 {
 	int i,ret = 0;
 	volatile char dummy;
-	struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv;
+	struct DiskOnChip *this = mtd->priv;
 	void __iomem *docptr = this->virtadr;
 	struct Nand *mychip = &this->chips[to >> (this->chipshift)];
 
@@ -677,7 +677,7 @@
 	int i;
 #endif
 	volatile char dummy;
-	struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv;
+	struct DiskOnChip *this = mtd->priv;
 	void __iomem *docptr = this->virtadr;
 	struct Nand *mychip = &this->chips[ofs >> this->chipshift];
 
@@ -729,7 +729,7 @@
 #endif
 	volatile char dummy;
 	int ret = 0;
-	struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv;
+	struct DiskOnChip *this = mtd->priv;
 	void __iomem *docptr = this->virtadr;
 	struct Nand *mychip = &this->chips[ofs >> this->chipshift];
 
@@ -796,7 +796,7 @@
 int doc_erase (struct mtd_info *mtd, struct erase_info *instr)
 {
 	volatile char dummy;
-	struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv;
+	struct DiskOnChip *this = mtd->priv;
 	__u32 ofs = instr->addr;
 	__u32 len = instr->len;
 	void __iomem *docptr = this->virtadr;
@@ -868,12 +868,12 @@
 	struct DiskOnChip *this;
 
 	while ((mtd=docmillist)) {
-		this = (struct DiskOnChip *)mtd->priv;
+		this = mtd->priv;
 		docmillist = this->nextdoc;
 			
 		del_mtd_device(mtd);
 			
-		iounmap((void *)this->virtadr);
+		iounmap(this->virtadr);
 		kfree(this->chips);
 		kfree(mtd);
 	}
diff -Nru a/drivers/mtd/devices/doc2001plus.c b/drivers/mtd/devices/doc2001plus.c
--- a/drivers/mtd/devices/doc2001plus.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/mtd/devices/doc2001plus.c	2005-01-10 20:11:15 -08:00
@@ -6,7 +6,7 @@
  * (c) 1999 Machine Vision Holdings, Inc.
  * (c) 1999, 2000 David Woodhouse <dwmw2@infradead.org>
  *
- * $Id: doc2001plus.c,v 1.11 2004/11/16 18:29:01 dwmw2 Exp $
+ * $Id: doc2001plus.c,v 1.13 2005/01/05 18:05:12 dwmw2 Exp $
  *
  * Released under GPL
  */
@@ -190,7 +190,7 @@
    may not want it */
 static unsigned int DoC_GetDataOffset(struct mtd_info *mtd, loff_t *from)
 {
-	struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv;
+	struct DiskOnChip *this = mtd->priv;
 
 	if (this->interleave) {
 		unsigned int ofs = *from & 0x3ff;
@@ -458,24 +458,24 @@
  */
 static void DoCMilPlus_init(struct mtd_info *mtd)
 {
-	struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv;
+	struct DiskOnChip *this = mtd->priv;
 	struct DiskOnChip *old = NULL;
 
 	/* We must avoid being called twice for the same device. */
 	if (docmilpluslist)
-		old = (struct DiskOnChip *)docmilpluslist->priv;
+		old = docmilpluslist->priv;
 
 	while (old) {
 		if (DoCMilPlus_is_alias(this, old)) {
 			printk(KERN_NOTICE "Ignoring DiskOnChip Millennium "
 				"Plus at 0x%lX - already configured\n",
 				this->physadr);
-			iounmap((void *)this->virtadr);
+			iounmap(this->virtadr);
 			kfree(mtd);
 			return;
 		}
 		if (old->nextdoc)
-			old = (struct DiskOnChip *)old->nextdoc->priv;
+			old = old->nextdoc->priv;
 		else
 			old = NULL;
 	}
@@ -514,7 +514,7 @@
 
 	if (!this->totlen) {
 		kfree(mtd);
-		iounmap((void *)this->virtadr);
+		iounmap(this->virtadr);
 	} else {
 		this->nextdoc = docmilpluslist;
 		docmilpluslist = mtd;
@@ -530,7 +530,7 @@
 {
 	int i;
 	loff_t fofs;
-	struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv;
+	struct DiskOnChip *this = mtd->priv;
 	void __iomem * docptr = this->virtadr;
 	struct Nand *mychip = &this->chips[from >> (this->chipshift)];
 	unsigned char *bp, buf[1056];
@@ -615,7 +615,7 @@
 	volatile char dummy;
 	loff_t fofs;
 	unsigned char syndrome[6];
-	struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv;
+	struct DiskOnChip *this = mtd->priv;
 	void __iomem * docptr = this->virtadr;
 	struct Nand *mychip = &this->chips[from >> (this->chipshift)];
 
@@ -754,7 +754,7 @@
 	int i, before, ret = 0;
 	loff_t fto;
 	volatile char dummy;
-	struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv;
+	struct DiskOnChip *this = mtd->priv;
 	void __iomem * docptr = this->virtadr;
 	struct Nand *mychip = &this->chips[to >> (this->chipshift)];
 
@@ -880,7 +880,7 @@
 			size_t *retlen, u_char *buf)
 {
 	loff_t fofs, base;
-	struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv;
+	struct DiskOnChip *this = mtd->priv;
 	void __iomem * docptr = this->virtadr;
 	struct Nand *mychip = &this->chips[ofs >> this->chipshift];
 	size_t i, size, got, want;
@@ -958,7 +958,7 @@
 {
 	volatile char dummy;
 	loff_t fofs, base;
-	struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv;
+	struct DiskOnChip *this = mtd->priv;
 	void __iomem * docptr = this->virtadr;
 	struct Nand *mychip = &this->chips[ofs >> this->chipshift];
 	size_t i, size, got, want;
@@ -1058,7 +1058,7 @@
 int doc_erase(struct mtd_info *mtd, struct erase_info *instr)
 {
 	volatile char dummy;
-	struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv;
+	struct DiskOnChip *this = mtd->priv;
 	__u32 ofs = instr->addr;
 	__u32 len = instr->len;
 	void __iomem * docptr = this->virtadr;
@@ -1134,12 +1134,12 @@
 	struct DiskOnChip *this;
 
 	while ((mtd=docmilpluslist)) {
-		this = (struct DiskOnChip *)mtd->priv;
+		this = mtd->priv;
 		docmilpluslist = this->nextdoc;
 			
 		del_mtd_device(mtd);
 			
-		iounmap((void *)this->virtadr);
+		iounmap(this->virtadr);
 		kfree(this->chips);
 		kfree(mtd);
 	}
diff -Nru a/drivers/mtd/devices/docprobe.c b/drivers/mtd/devices/docprobe.c
--- a/drivers/mtd/devices/docprobe.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/mtd/devices/docprobe.c	2005-01-10 20:11:21 -08:00
@@ -4,7 +4,7 @@
 /* (C) 1999 Machine Vision Holdings, Inc.			*/
 /* (C) 1999-2003 David Woodhouse <dwmw2@infradead.org>		*/
 
-/* $Id: docprobe.c,v 1.43 2004/11/16 18:29:01 dwmw2 Exp $	*/
+/* $Id: docprobe.c,v 1.44 2005/01/05 12:40:36 dwmw2 Exp $	*/
 
 
 
@@ -62,7 +62,7 @@
 
 
 static unsigned long doc_config_location = CONFIG_MTD_DOCPROBE_ADDRESS;
-MODULE_PARM(doc_config_location, "l");
+module_param(doc_config_location, ulong, 0);
 MODULE_PARM_DESC(doc_config_location, "Physical memory address at which to probe for DiskOnChip");
 
 static unsigned long __initdata doc_locations[] = {
@@ -94,9 +94,9 @@
 
 /* doccheck: Probe a given memory window to see if there's a DiskOnChip present */
 
-static inline int __init doccheck(unsigned long potential, unsigned long physadr)
+static inline int __init doccheck(void __iomem *potential, unsigned long physadr)
 {
-	unsigned long window=potential;
+	void __iomem *window=potential;
 	unsigned char tmp, tmpb, tmpc, ChipID;
 #ifndef DOC_PASSIVE_PROBE
 	unsigned char tmp2;
@@ -233,7 +233,7 @@
 
 static void __init DoC_Probe(unsigned long physadr)
 {
-	unsigned long docptr;
+	void __iomem *docptr;
 	struct DiskOnChip *this;
 	struct mtd_info *mtd;
 	int ChipID;
@@ -243,7 +243,7 @@
 	char *im_modname = NULL;
 	void (*initroutine)(struct mtd_info *) = NULL;
 
-	docptr = (unsigned long)ioremap(physadr, DOC_IOREMAP_LEN);
+	docptr = ioremap(physadr, DOC_IOREMAP_LEN);
 	
 	if (!docptr)
 		return;
@@ -252,7 +252,7 @@
 		if (ChipID == DOC_ChipID_Doc2kTSOP) {
 			/* Remove this at your own peril. The hardware driver works but nothing prevents you from erasing bad blocks */
 			printk(KERN_NOTICE "Refusing to drive DiskOnChip 2000 TSOP until Bad Block Table is correctly supported by INFTL\n");
-			iounmap((void *)docptr);
+			iounmap(docptr);
 			return;
 		}
 		docfound = 1;
@@ -260,7 +260,7 @@
 
 		if (!mtd) {
 			printk(KERN_WARNING "Cannot allocate memory for data structures. Dropping.\n");
-			iounmap((void *)docptr);
+			iounmap(docptr);
 			return;
 		}
 		
@@ -270,7 +270,7 @@
 		memset((char *)this, 0, sizeof(struct DiskOnChip));
 
 		mtd->priv = this;
-		this->virtadr = (void __iomem *)docptr;
+		this->virtadr = docptr;
 		this->physadr = physadr;
 		this->ChipID = ChipID;
 		sprintf(namebuf, "with ChipID %2.2X", ChipID);
@@ -318,7 +318,7 @@
 		printk(KERN_NOTICE "Cannot find driver for DiskOnChip %s at 0x%lX\n", name, physadr);
 		kfree(mtd);
 	}
-	iounmap((void *)docptr);
+	iounmap(docptr);
 }
 
 
diff -Nru a/drivers/mtd/devices/ms02-nv.c b/drivers/mtd/devices/ms02-nv.c
--- a/drivers/mtd/devices/ms02-nv.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/mtd/devices/ms02-nv.c	2005-01-10 20:11:15 -08:00
@@ -6,7 +6,7 @@
  *	as published by the Free Software Foundation; either version
  *	2 of the License, or (at your option) any later version.
  *
- *	$Id: ms02-nv.c,v 1.7 2004/07/29 14:16:45 macro Exp $
+ *	$Id: ms02-nv.c,v 1.8 2005/01/05 18:05:12 dwmw2 Exp $
  */
 
 #include <linux/init.h>
@@ -59,7 +59,7 @@
 static int ms02nv_read(struct mtd_info *mtd, loff_t from,
 			size_t len, size_t *retlen, u_char *buf)
 {
-	struct ms02nv_private *mp = (struct ms02nv_private *)mtd->priv;
+	struct ms02nv_private *mp = mtd->priv;
 
 	if (from + len > mtd->size)
 		return -EINVAL;
@@ -73,7 +73,7 @@
 static int ms02nv_write(struct mtd_info *mtd, loff_t to,
 			size_t len, size_t *retlen, const u_char *buf)
 {
-	struct ms02nv_private *mp = (struct ms02nv_private *)mtd->priv;
+	struct ms02nv_private *mp = mtd->priv;
 
 	if (to + len > mtd->size)
 		return -EINVAL;
@@ -265,7 +265,7 @@
 static void __exit ms02nv_remove_one(void)
 {
 	struct mtd_info *mtd = root_ms02nv_mtd;
-	struct ms02nv_private *mp = (struct ms02nv_private *)mtd->priv;
+	struct ms02nv_private *mp = mtd->priv;
 
 	root_ms02nv_mtd = mp->next;
 
diff -Nru a/drivers/mtd/devices/mtdram.c b/drivers/mtd/devices/mtdram.c
--- a/drivers/mtd/devices/mtdram.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/mtd/devices/mtdram.c	2005-01-10 20:11:15 -08:00
@@ -1,6 +1,6 @@
 /*
  * mtdram - a test mtd device
- * $Id: mtdram.c,v 1.34 2004/11/16 18:29:01 dwmw2 Exp $
+ * $Id: mtdram.c,v 1.35 2005/01/05 18:05:12 dwmw2 Exp $
  * Author: Alexander Larsson <alex@cendio.se>
  *
  * Copyright (c) 1999 Alexander Larsson <alex@cendio.se>
@@ -29,9 +29,9 @@
 #ifdef MODULE
 static unsigned long total_size = CONFIG_MTDRAM_TOTAL_SIZE;
 static unsigned long erase_size = CONFIG_MTDRAM_ERASE_SIZE;
-MODULE_PARM(total_size,"l");
+module_param(total_size,ulong,0);
 MODULE_PARM_DESC(total_size, "Total device size in KiB");
-MODULE_PARM(erase_size,"l");
+module_param(erase_size,ulong,0);
 MODULE_PARM_DESC(erase_size, "Device erase block size in KiB");
 #define MTDRAM_TOTAL_SIZE (total_size * 1024)
 #define MTDRAM_ERASE_SIZE (erase_size * 1024)
@@ -158,7 +158,7 @@
   void *addr;
   int err;
   /* Allocate some memory */
-   mtd_info = (struct mtd_info *)kmalloc(sizeof(struct mtd_info), GFP_KERNEL);
+   mtd_info = kmalloc(sizeof(struct mtd_info), GFP_KERNEL);
    if (!mtd_info)
      return -ENOMEM;
    
@@ -191,7 +191,7 @@
   void *addr;
   int err;
   /* Allocate some memory */
-   mtd_info = (struct mtd_info *)kmalloc(sizeof(struct mtd_info), GFP_KERNEL);
+   mtd_info = kmalloc(sizeof(struct mtd_info), GFP_KERNEL);
    if (!mtd_info)
      return -ENOMEM;
 
diff -Nru a/drivers/mtd/devices/phram.c b/drivers/mtd/devices/phram.c
--- a/drivers/mtd/devices/phram.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/mtd/devices/phram.c	2005-01-10 20:11:23 -08:00
@@ -1,13 +1,8 @@
 /**
+ * $Id: phram.c,v 1.11 2005/01/05 18:05:13 dwmw2 Exp $
  *
- * $Id: phram.c,v 1.3 2004/11/16 18:29:01 dwmw2 Exp $
- *
- * Copyright (c) Jochen Schaeuble <psionic@psionic.de>
- * 07/2003	rewritten by Joern Engel <joern@wh.fh-wedel.de>
- *
- * DISCLAIMER:  This driver makes use of Rusty's excellent module code,
- * so it will not work for 2.4 without changes and it wont work for 2.4
- * as a module without major changes.  Oh well!
+ * Copyright (c) ????		Jochen Schäuble <psionic@psionic.de>
+ * Copyright (c) 2003-2004	Jörn Engel <joern@wh.fh-wedel.de>
  *
  * Usage:
  *
@@ -15,9 +10,12 @@
  *   phram=<name>,<start>,<len>
  * <name> may be up to 63 characters.
  * <start> and <len> can be octal, decimal or hexadecimal.  If followed
- * by "k", "M" or "G", the numbers will be interpreted as kilo, mega or
+ * by "ki", "Mi" or "Gi", the numbers will be interpreted as kilo, mega or
  * gigabytes.
  *
+ * Example:
+ *	phram=swap,64Mi,128Mi phram=test,900Mi,1Mi
+ *
  */
 
 #include <asm/io.h>
@@ -31,8 +29,8 @@
 #define ERROR(fmt, args...) printk(KERN_ERR "phram: " fmt , ## args)
 
 struct phram_mtd_list {
+	struct mtd_info mtd;
 	struct list_head list;
-	struct mtd_info *mtdinfo;
 };
 
 static LIST_HEAD(phram_list);
@@ -41,7 +39,7 @@
 
 static int phram_erase(struct mtd_info *mtd, struct erase_info *instr)
 {
-	u_char *start = (u_char *)mtd->priv;
+	u_char *start = mtd->priv;
 
 	if (instr->addr + instr->len > mtd->size)
 		return -EINVAL;
@@ -63,7 +61,7 @@
 static int phram_point(struct mtd_info *mtd, loff_t from, size_t len,
 		size_t *retlen, u_char **mtdbuf)
 {
-	u_char *start = (u_char *)mtd->priv;
+	u_char *start = mtd->priv;
 
 	if (from + len > mtd->size)
 		return -EINVAL;
@@ -80,7 +78,7 @@
 static int phram_read(struct mtd_info *mtd, loff_t from, size_t len,
 		size_t *retlen, u_char *buf)
 {
-	u_char *start = (u_char *)mtd->priv;
+	u_char *start = mtd->priv;
 
 	if (from + len > mtd->size)
 		return -EINVAL;
@@ -94,7 +92,7 @@
 static int phram_write(struct mtd_info *mtd, loff_t to, size_t len,
 		size_t *retlen, const u_char *buf)
 {
-	u_char *start = (u_char *)mtd->priv;
+	u_char *start = mtd->priv;
 
 	if (to + len > mtd->size)
 		return -EINVAL;
@@ -112,9 +110,8 @@
 	struct phram_mtd_list *this;
 
 	list_for_each_entry(this, &phram_list, list) {
-		del_mtd_device(this->mtdinfo);
-		iounmap(this->mtdinfo->priv);
-		kfree(this->mtdinfo);
+		del_mtd_device(&this->mtd);
+		iounmap(this->mtd.priv);
 		kfree(this);
 	}
 }
@@ -128,45 +125,39 @@
 	if (!new)
 		goto out0;
 
-	new->mtdinfo = kmalloc(sizeof(struct mtd_info), GFP_KERNEL);
-	if (!new->mtdinfo)
-		goto out1;
-	
-	memset(new->mtdinfo, 0, sizeof(struct mtd_info));
+	memset(new, 0, sizeof(*new));
 
 	ret = -EIO;
-	new->mtdinfo->priv = ioremap(start, len);
-	if (!new->mtdinfo->priv) {
+	new->mtd.priv = ioremap(start, len);
+	if (!new->mtd.priv) {
 		ERROR("ioremap failed\n");
-		goto out2;
+		goto out1;
 	}
 
 
-	new->mtdinfo->name = name;
-	new->mtdinfo->size = len;
-	new->mtdinfo->flags = MTD_CAP_RAM | MTD_ERASEABLE | MTD_VOLATILE;
-        new->mtdinfo->erase = phram_erase;
-	new->mtdinfo->point = phram_point;
-	new->mtdinfo->unpoint = phram_unpoint;
-	new->mtdinfo->read = phram_read;
-	new->mtdinfo->write = phram_write;
-	new->mtdinfo->owner = THIS_MODULE;
-	new->mtdinfo->type = MTD_RAM;
-	new->mtdinfo->erasesize = 0x0;
+	new->mtd.name = name;
+	new->mtd.size = len;
+	new->mtd.flags = MTD_CAP_RAM | MTD_ERASEABLE | MTD_VOLATILE;
+        new->mtd.erase = phram_erase;
+	new->mtd.point = phram_point;
+	new->mtd.unpoint = phram_unpoint;
+	new->mtd.read = phram_read;
+	new->mtd.write = phram_write;
+	new->mtd.owner = THIS_MODULE;
+	new->mtd.type = MTD_RAM;
+	new->mtd.erasesize = 0;
 
 	ret = -EAGAIN;
-	if (add_mtd_device(new->mtdinfo)) {
+	if (add_mtd_device(&new->mtd)) {
 		ERROR("Failed to register new device\n");
-		goto out3;
+		goto out2;
 	}
 
 	list_add_tail(&new->list, &phram_list);
 	return 0;	
 
-out3:
-	iounmap(new->mtdinfo->priv);
 out2:
-	kfree(new->mtdinfo);
+	iounmap(new->mtd.priv);
 out1:
 	kfree(new);
 out0:
@@ -184,7 +175,9 @@
 		result *= 1024;
 	case 'k':
 		result *= 1024;
-		endp++;
+	/* By dwmw2 editorial decree, "ki", "Mi" or "Gi" are to be used. */
+		if ((*endp)[1] == 'i')
+			(*endp) += 2;
 	}
 	return result;
 }
@@ -235,7 +228,7 @@
 	uint32_t len;
 	int i, ret;
 
-	if (strnlen(val, sizeof(str)) >= sizeof(str))
+	if (strnlen(val, sizeof(buf)) >= sizeof(buf))
 		parse_err("parameter too long\n");
 
 	strcpy(str, val);
@@ -271,78 +264,11 @@
 }
 
 module_param_call(phram, phram_setup, NULL, NULL, 000);
-MODULE_PARM_DESC(phram, "Memory region to map. \"map=<name>,<start><length>\"");
-
-/*
- * Just for compatibility with slram, this is horrible and should go someday.
- */
-static int __init slram_setup(const char *val, struct kernel_param *kp)
-{
-	char buf[256], *str = buf;
-
-	if (!val || !val[0])
-		parse_err("no arguments to \"slram=\"\n");
-
-	if (strnlen(val, sizeof(str)) >= sizeof(str))
-		parse_err("parameter too long\n");
-
-	strcpy(str, val);
-
-	while (str) {
-		char *token[3];
-		char *name;
-		uint32_t start;
-		uint32_t len;
-		int i, ret;
-
-		for (i=0; i<3; i++) {
-			token[i] = strsep(&str, ",");
-			if (token[i])
-				continue;
-			parse_err("wrong number of arguments to \"slram=\"\n");
-		}
-
-		/* name */
-		ret = parse_name(&name, token[0]);
-		if (ret == -ENOMEM)
-			parse_err("of memory\n");
-		if (ret == -ENOSPC)
-			parse_err("too long\n");
-		if (ret)
-			return 1;
-
-		/* start */
-		ret = parse_num32(&start, token[1]);
-		if (ret)
-			parse_err("illegal start address\n");
-
-		/* len */
-		if (token[2][0] == '+')
-			ret = parse_num32(&len, token[2] + 1);
-		else
-			ret = parse_num32(&len, token[2]);
-
-		if (ret)
-			parse_err("illegal device length\n");
-
-		if (token[2][0] != '+') {
-			if (len < start)
-				parse_err("end < start\n");
-			len -= start;
-		}
-
-		register_device(name, start, len);
-	}
-	return 1;
-}
-
-module_param_call(slram, slram_setup, NULL, NULL, 000);
-MODULE_PARM_DESC(slram, "List of memory regions to map. \"map=<name>,<start><length/end>\"");
+MODULE_PARM_DESC(phram,"Memory region to map. \"map=<name>,<start>,<length>\"");
 
 
 static int __init init_phram(void)
 {
-	printk(KERN_ERR "phram loaded\n");
 	return 0;
 }
 
diff -Nru a/drivers/mtd/devices/pmc551.c b/drivers/mtd/devices/pmc551.c
--- a/drivers/mtd/devices/pmc551.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/mtd/devices/pmc551.c	2005-01-10 20:11:21 -08:00
@@ -1,5 +1,5 @@
 /*
- * $Id: pmc551.c,v 1.29 2004/11/16 18:29:01 dwmw2 Exp $
+ * $Id: pmc551.c,v 1.30 2005/01/05 18:05:13 dwmw2 Exp $
  *
  * PMC551 PCI Mezzanine Ram Device
  *
@@ -113,7 +113,7 @@
 
 static int pmc551_erase (struct mtd_info *mtd, struct erase_info *instr)
 {
-        struct mypriv *priv = (struct mypriv *)mtd->priv;
+        struct mypriv *priv = mtd->priv;
         u32 soff_hi, soff_lo; /* start address offset hi/lo */
         u32 eoff_hi, eoff_lo; /* end address offset hi/lo */
         unsigned long end;
@@ -176,7 +176,7 @@
 
 static int pmc551_point (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char **mtdbuf)
 {
-        struct mypriv *priv = (struct mypriv *)mtd->priv;
+        struct mypriv *priv = mtd->priv;
         u32 soff_hi;
         u32 soff_lo;
 
@@ -217,7 +217,7 @@
 
 static int pmc551_read (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf)
 {
-        struct mypriv *priv = (struct mypriv *)mtd->priv;
+        struct mypriv *priv = mtd->priv;
         u32 soff_hi, soff_lo; /* start address offset hi/lo */
         u32 eoff_hi, eoff_lo; /* end address offset hi/lo */
         unsigned long end;
@@ -279,7 +279,7 @@
 
 static int pmc551_write (struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf)
 {
-        struct mypriv *priv = (struct mypriv *)mtd->priv;
+        struct mypriv *priv = mtd->priv;
         u32 soff_hi, soff_lo; /* start address offset hi/lo */
         u32 eoff_hi, eoff_lo; /* end address offset hi/lo */
         unsigned long end;
@@ -630,10 +630,6 @@
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Mark Ferrell <mferrell@mvista.com>");
 MODULE_DESCRIPTION(PMC551_VERSION);
-MODULE_PARM(msize, "i");
-MODULE_PARM_DESC(msize, "memory size in Megabytes [1 - 1024]");
-MODULE_PARM(asize, "i");
-MODULE_PARM_DESC(asize, "aperture size, must be <= memsize [1-1024]");
 
 /*
  * Stuff these outside the ifdef so as to not bust compiled in driver support
@@ -645,6 +641,11 @@
 static int asize=0;
 #endif
 
+module_param(msize, int, 0);
+MODULE_PARM_DESC(msize, "memory size in Megabytes [1 - 1024]");
+module_param(asize, int, 0);
+MODULE_PARM_DESC(asize, "aperture size, must be <= memsize [1-1024]");
+
 /*
  * PMC551 Card Initialization
  */
@@ -820,7 +821,7 @@
 	struct mypriv *priv;
 
 	while((mtd=pmc551list)) {
-		priv = (struct mypriv *)mtd->priv;
+		priv = mtd->priv;
 		pmc551list = priv->nextpmc551;
 		
 		if(priv->start) {
diff -Nru a/drivers/mtd/devices/slram.c b/drivers/mtd/devices/slram.c
--- a/drivers/mtd/devices/slram.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/mtd/devices/slram.c	2005-01-10 20:11:15 -08:00
@@ -1,6 +1,6 @@
 /*======================================================================
 
-  $Id: slram.c,v 1.32 2004/11/16 18:29:01 dwmw2 Exp $
+  $Id: slram.c,v 1.33 2005/01/05 18:05:13 dwmw2 Exp $
 
   This driver provides a method to access memory not used by the kernel
   itself (i.e. if the kernel commandline mem=xxx is used). To actually
@@ -66,13 +66,13 @@
 
 #ifdef MODULE
 static char *map[SLRAM_MAX_DEVICES_PARAMS];
+
+module_param_array(map, charp, NULL, 0);
+MODULE_PARM_DESC(map, "List of memory regions to map. \"map=<name>, <start>, <length / end>\"");
 #else
 static char *map;
 #endif
 
-MODULE_PARM(map, "3-" __MODULE_STRING(SLRAM_MAX_DEVICES_PARAMS) "s");
-MODULE_PARM_DESC(map, "List of memory regions to map. \"map=<name>, <start>, <length / end>\"");
-
 static slram_mtd_list_t *slram_mtdlist = NULL;
 
 static int slram_erase(struct mtd_info *, struct erase_info *);
@@ -106,7 +106,7 @@
 static int slram_point(struct mtd_info *mtd, loff_t from, size_t len,
 		size_t *retlen, u_char **mtdbuf)
 {
-	slram_priv_t *priv = (slram_priv_t *)mtd->priv;
+	slram_priv_t *priv = mtd->priv;
 
 	*mtdbuf = priv->start + from;
 	*retlen = len;
@@ -120,7 +120,7 @@
 static int slram_read(struct mtd_info *mtd, loff_t from, size_t len,
 		size_t *retlen, u_char *buf)
 {
-	slram_priv_t *priv = (slram_priv_t *)mtd->priv;
+	slram_priv_t *priv = mtd->priv;
 	
 	memcpy(buf, priv->start + from, len);
 
@@ -131,7 +131,7 @@
 static int slram_write(struct mtd_info *mtd, loff_t to, size_t len,
 		size_t *retlen, const u_char *buf)
 {
-	slram_priv_t *priv = (slram_priv_t *)mtd->priv;
+	slram_priv_t *priv = mtd->priv;
 
 	memcpy(priv->start + to, buf, len);
 
@@ -161,7 +161,7 @@
 	if ((*curmtd)->mtdinfo)	{
 		memset((char *)(*curmtd)->mtdinfo, 0, sizeof(struct mtd_info));
 		(*curmtd)->mtdinfo->priv =
-			(void *)kmalloc(sizeof(slram_priv_t), GFP_KERNEL);
+			kmalloc(sizeof(slram_priv_t), GFP_KERNEL);
 		
 		if (!(*curmtd)->mtdinfo->priv) {
 			kfree((*curmtd)->mtdinfo);
diff -Nru a/drivers/mtd/ftl.c b/drivers/mtd/ftl.c
--- a/drivers/mtd/ftl.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/mtd/ftl.c	2005-01-10 20:11:21 -08:00
@@ -80,7 +80,7 @@
 
 /* Parameters that can be set with 'insmod' */
 static int shuffle_freq = 50;
-MODULE_PARM(shuffle_freq, "i");
+module_param(shuffle_freq, int, 0);
 
 /*====================================================================*/
 
diff -Nru a/drivers/mtd/inftlmount.c b/drivers/mtd/inftlmount.c
--- a/drivers/mtd/inftlmount.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/mtd/inftlmount.c	2005-01-10 20:11:16 -08:00
@@ -8,7 +8,7 @@
  * Author: Fabrice Bellard (fabrice.bellard@netgem.com) 
  * Copyright (C) 2000 Netgem S.A.
  *
- * $Id: inftlmount.c,v 1.15 2004/11/05 21:55:55 kalev Exp $
+ * $Id: inftlmount.c,v 1.16 2004/11/22 13:50:53 kalev Exp $
  *
  * 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
@@ -41,7 +41,7 @@
 #include <linux/mtd/inftl.h>
 #include <linux/mtd/compatmac.h>
 
-char inftlmountrev[]="$Revision: 1.15 $";
+char inftlmountrev[]="$Revision: 1.16 $";
 
 /*
  * find_boot_record: Find the INFTL Media Header and its Spare copy which
@@ -389,8 +389,6 @@
 	struct erase_info *instr = &inftl->instr;
 	int physblock;
 
-	instr->mtd = inftl->mbd.mtd;
-
 	DEBUG(MTD_DEBUG_LEVEL3, "INFTL: INFTL_formatblock(inftl=%p,"
 		"block=%d)\n", inftl, block);
 
@@ -400,6 +398,7 @@
 	   _first_? */
 
 	/* Use async erase interface, test return code */
+	instr->mtd = inftl->mbd.mtd;
 	instr->addr = block * inftl->EraseSize;
 	instr->len = inftl->mbd.mtd->erasesize;
 	/* Erase one physical eraseblock at a time, even though the NAND api
diff -Nru a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig
--- a/drivers/mtd/maps/Kconfig	2005-01-10 20:11:23 -08:00
+++ b/drivers/mtd/maps/Kconfig	2005-01-10 20:11:23 -08:00
@@ -1,5 +1,5 @@
 # drivers/mtd/maps/Kconfig
-# $Id: Kconfig,v 1.37 2004/10/20 22:57:18 dwmw2 Exp $
+# $Id: Kconfig,v 1.42 2005/01/05 16:59:50 dwmw2 Exp $
 
 menu "Mapping drivers for chip access"
 	depends on MTD!=n
@@ -159,7 +159,7 @@
 
 config MTD_SCx200_DOCFLASH
 	tristate "Flash device mapped with DOCCS on NatSemi SCx200"
-	depends on X86 && MTD_CFI
+	depends on X86 && MTD_CFI && MTD_PARTITIONS
 	help
 	  Enable support for a flash chip mapped using the DOCCS signal on a
 	  National Semiconductor SCx200 processor.
@@ -373,9 +373,17 @@
 	  Arctic board. If you have one of these boards and would like to
 	  use the flash chips on it, say 'Y'.
 
+config MTD_WALNUT
+	tristate "Flash device mapped on IBM 405GP Walnut"
+	depends on MTD_JEDECPROBE && PPC32 && 40x && WALNUT
+	help
+	  This enables access routines for the flash chips on the IBM 405GP
+	  Walnut board. If you have one of these boards and would like to
+	  use the flash chips on it, say 'Y'.
+
 config MTD_EBONY
 	tristate "Flash devices mapped on IBM 440GP Ebony"
-	depends on MTD_CFI && PPC32 && 44x && EBONY
+	depends on MTD_JEDECPROBE && PPC32 && 44x && EBONY
 	help
 	  This enables access routines for the flash chips on the IBM 440GP
 	  Ebony board. If you have one of these boards and would like to
@@ -397,6 +405,14 @@
 	  Redwood board. If you have one of these boards and would like to
 	  use the flash chips on it, say 'Y'.
 
+config MTD_CHESTNUT
+	tristate "CFI Flash devices mapped on IBM 750FX or IBM 750GX Eval Boards"
+	depends on MTD_CFI && PPC32 && CHESTNUT && MTD_PARTITIONS
+	help
+	  This enables access routines for the flash chips on the IBM
+	  750FX and 750GX Eval Boards. If you have one of these boards and
+	  would like to use the flash chips on it, say 'Y'
+
 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_JEDECPROBE && MTD_PARTITIONS
@@ -644,6 +660,12 @@
 	int "Maximum size for BAST flash area (MiB)"
 	depends on MTD_BAST
 	default "4"
+
+config MTD_SHARP_SL
+	bool "ROM maped on Sharp SL Series"
+	depends on MTD && ARCH_PXA
+	help
+	  This enables access to the flash chip on the Sharp SL Series of PDAs.
 
 endmenu
 
diff -Nru a/drivers/mtd/maps/Makefile b/drivers/mtd/maps/Makefile
--- a/drivers/mtd/maps/Makefile	2005-01-10 20:11:15 -08:00
+++ b/drivers/mtd/maps/Makefile	2005-01-10 20:11:15 -08:00
@@ -1,7 +1,7 @@
 #
 # linux/drivers/maps/Makefile
 #
-# $Id: Makefile.common,v 1.19 2004/09/21 14:27:16 bjd Exp $
+# $Id: Makefile.common,v 1.23 2005/01/05 17:06:36 dwmw2 Exp $
 
 ifeq ($(CONFIG_MTD_COMPLEX_MAPPINGS),y)
 obj-$(CONFIG_MTD)		+= map_funcs.o
@@ -54,6 +54,7 @@
 obj-$(CONFIG_MTD_IMPA7)		+= impa7.o
 obj-$(CONFIG_MTD_FORTUNET)	+= fortunet.o
 obj-$(CONFIG_MTD_REDWOOD)	+= redwood.o
+obj-$(CONFIG_MTD_CHESTNUT)	+= chestnut.o
 obj-$(CONFIG_MTD_UCLINUX)	+= uclinux.o
 obj-$(CONFIG_MTD_NETtel)	+= nettel.o
 obj-$(CONFIG_MTD_SCB2_FLASH)	+= scb2_flash.o
@@ -61,6 +62,7 @@
 obj-$(CONFIG_MTD_OCOTEA)	+= ocotea.o
 obj-$(CONFIG_MTD_BEECH)		+= beech-mtd.o
 obj-$(CONFIG_MTD_ARCTIC)	+= arctic-mtd.o
+obj-$(CONFIG_MTD_WALNUT)        += walnut.o
 obj-$(CONFIG_MTD_H720X)		+= h720x-flash.o
 obj-$(CONFIG_MTD_SBC8240)	+= sbc8240.o
 obj-$(CONFIG_MTD_NOR_TOTO)	+= omap-toto-flash.o
@@ -69,3 +71,4 @@
 obj-$(CONFIG_MTD_IXP2000)	+= ixp2000.o
 obj-$(CONFIG_MTD_WRSBC8260)	+= wr_sbc82xx_flash.o
 obj-$(CONFIG_MTD_DMV182)	+= dmv182.o
+obj-$(CONFIG_MTD_SHARP_SL)	+= sharpsl-flash.o
diff -Nru a/drivers/mtd/maps/amd76xrom.c b/drivers/mtd/maps/amd76xrom.c
--- a/drivers/mtd/maps/amd76xrom.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/mtd/maps/amd76xrom.c	2005-01-10 20:11:17 -08:00
@@ -2,7 +2,7 @@
  * amd76xrom.c
  *
  * Normal mappings of chips in physical memory
- * $Id: amd76xrom.c,v 1.18 2004/11/16 18:29:02 dwmw2 Exp $
+ * $Id: amd76xrom.c,v 1.19 2004/11/28 09:40:39 dwmw2 Exp $
  */
 
 #include <linux/module.h>
diff -Nru a/drivers/mtd/maps/chestnut.c b/drivers/mtd/maps/chestnut.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/mtd/maps/chestnut.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,91 @@
+/*
+ * drivers/mtd/maps/chestnut.c
+ *
+ * $Id: chestnut.c,v 1.1 2005/01/05 16:59:50 dwmw2 Exp $
+ *
+ * Flash map driver for IBM Chestnut (750FXGX Eval)
+ *
+ * Chose not to enable 8 bit flash as it contains the firmware and board
+ * info.  Thus only the 32bit flash is supported.
+ *
+ * Author: <source@mvista.com>
+ *
+ * 2004 (c) MontaVista Software, Inc. This file is licensed under
+ * the terms of the GNU General Public License version 2. This program
+ * is licensed "as is" without any warranty of any kind, whether express
+ * or implied.
+ */
+
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/types.h>
+#include <linux/kernel.h>
+#include <asm/io.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/map.h>
+#include <linux/mtd/partitions.h>
+#include <platforms/chestnut.h>
+
+static struct map_info chestnut32_map = {
+   	.name 		= "User FS",
+   	.size 		= CHESTNUT_32BIT_SIZE,
+   	.bankwidth 	= 4,
+	.phys 		= CHESTNUT_32BIT_BASE,
+};
+
+static struct mtd_partition chestnut32_partitions[] = {
+	{
+		.name 	= "User FS",
+		.offset	= 0,
+		.size	= CHESTNUT_32BIT_SIZE,
+	}
+};
+
+static struct mtd_info *flash32;
+
+int __init init_chestnut(void)
+{
+	/* 32-bit FLASH */
+
+   	chestnut32_map.virt = ioremap(chestnut32_map.phys, chestnut32_map.size);
+
+   	if (!chestnut32_map.virt) {
+      		printk(KERN_NOTICE "Failed to ioremap 32-bit flash\n");
+		return -EIO;
+   	}
+
+	simple_map_init(&chestnut32_map);
+
+   	flash32 = do_map_probe("cfi_probe", &chestnut32_map);
+   	if (flash32) {
+   		flash32->owner = THIS_MODULE;
+   		add_mtd_partitions(flash32, chestnut32_partitions,
+					ARRAY_SIZE(chestnut32_partitions));
+   	} else {
+      		printk(KERN_NOTICE "map probe failed for 32-bit flash\n");
+		return -ENXIO;
+	}
+
+   	return 0;
+}
+
+static void __exit
+cleanup_chestnut(void)
+{
+   	if (flash32) {
+      		del_mtd_partitions(flash32);
+		map_destroy(flash32);
+   	}
+
+   	if (chestnut32_map.virt) {
+      		iounmap((void *)chestnut32_map.virt);
+	  	chestnut32_map.virt = 0;
+   	}
+}
+
+module_init(init_chestnut);
+module_exit(cleanup_chestnut);
+
+MODULE_DESCRIPTION("MTD map and partitions for IBM Chestnut (750fxgx Eval)");
+MODULE_AUTHOR("<source@mvista.com>");
+MODULE_LICENSE("GPL");
diff -Nru a/drivers/mtd/maps/dilnetpc.c b/drivers/mtd/maps/dilnetpc.c
--- a/drivers/mtd/maps/dilnetpc.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/mtd/maps/dilnetpc.c	2005-01-10 20:11:17 -08:00
@@ -14,7 +14,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: dilnetpc.c,v 1.16 2004/11/04 13:24:14 gleixner Exp $
+ * $Id: dilnetpc.c,v 1.17 2004/11/28 09:40:39 dwmw2 Exp $
  *
  * The DIL/Net PC is a tiny embedded PC board made by SSV Embedded Systems
  * featuring the AMD Elan SC410 processor. There are two variants of this
diff -Nru a/drivers/mtd/maps/ebony.c b/drivers/mtd/maps/ebony.c
--- a/drivers/mtd/maps/ebony.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/mtd/maps/ebony.c	2005-01-10 20:11:21 -08:00
@@ -1,5 +1,5 @@
 /*
- * $Id: ebony.c,v 1.13 2004/11/04 13:24:14 gleixner Exp $
+ * $Id: ebony.c,v 1.15 2004/12/09 18:39:54 holindho Exp $
  * 
  * Mapping for Ebony user flash
  *
@@ -103,7 +103,7 @@
 
 	simple_map_init(&ebony_small_map);
 
-	flash = do_map_probe("map_rom", &ebony_small_map);
+	flash = do_map_probe("jedec_probe", &ebony_small_map);
 	if (flash) {
 		flash->owner = THIS_MODULE;
 		add_mtd_partitions(flash, ebony_small_partitions,
@@ -124,7 +124,7 @@
 
 	simple_map_init(&ebony_large_map);
 
-	flash = do_map_probe("cfi_probe", &ebony_large_map);
+	flash = do_map_probe("jedec_probe", &ebony_large_map);
 	if (flash) {
 		flash->owner = THIS_MODULE;
 		add_mtd_partitions(flash, ebony_large_partitions,
diff -Nru a/drivers/mtd/maps/elan-104nc.c b/drivers/mtd/maps/elan-104nc.c
--- a/drivers/mtd/maps/elan-104nc.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/mtd/maps/elan-104nc.c	2005-01-10 20:11:19 -08:00
@@ -16,7 +16,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: elan-104nc.c,v 1.24 2004/11/16 18:29:02 dwmw2 Exp $
+   $Id: elan-104nc.c,v 1.25 2004/11/28 09:40:39 dwmw2 Exp $
 
 The ELAN-104NC has up to 8 Mibyte of Intel StrataFlash (28F320/28F640) in x16
 mode.  This drivers uses the CFI probe and Intel Extended Command Set drivers.
diff -Nru a/drivers/mtd/maps/ichxrom.c b/drivers/mtd/maps/ichxrom.c
--- a/drivers/mtd/maps/ichxrom.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/mtd/maps/ichxrom.c	2005-01-10 20:11:15 -08:00
@@ -2,7 +2,7 @@
  * ichxrom.c
  *
  * Normal mappings of chips in physical memory
- * $Id: ichxrom.c,v 1.15 2004/11/16 18:29:02 dwmw2 Exp $
+ * $Id: ichxrom.c,v 1.16 2004/11/28 09:40:39 dwmw2 Exp $
  */
 
 #include <linux/module.h>
diff -Nru a/drivers/mtd/maps/l440gx.c b/drivers/mtd/maps/l440gx.c
--- a/drivers/mtd/maps/l440gx.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/mtd/maps/l440gx.c	2005-01-10 20:11:21 -08:00
@@ -1,5 +1,5 @@
 /*
- * $Id: l440gx.c,v 1.16 2004/11/16 18:29:02 dwmw2 Exp $
+ * $Id: l440gx.c,v 1.17 2004/11/28 09:40:39 dwmw2 Exp $
  *
  * BIOS Flash chip on Intel 440GX board.
  *
diff -Nru a/drivers/mtd/maps/netsc520.c b/drivers/mtd/maps/netsc520.c
--- a/drivers/mtd/maps/netsc520.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/mtd/maps/netsc520.c	2005-01-10 20:11:21 -08:00
@@ -3,7 +3,7 @@
  * Copyright (C) 2001 Mark Langsdorf (mark.langsdorf@amd.com)
  *	based on sc520cdp.c by Sysgo Real-Time Solutions GmbH
  *
- * $Id: netsc520.c,v 1.12 2004/11/04 13:24:15 gleixner Exp $
+ * $Id: netsc520.c,v 1.13 2004/11/28 09:40:40 dwmw2 Exp $
  *
  * 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
diff -Nru a/drivers/mtd/maps/nettel.c b/drivers/mtd/maps/nettel.c
--- a/drivers/mtd/maps/nettel.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/mtd/maps/nettel.c	2005-01-10 20:11:17 -08:00
@@ -6,7 +6,7 @@
  *      (C) Copyright 2000-2001, Greg Ungerer (gerg@snapgear.com)
  *      (C) Copyright 2001-2002, SnapGear (www.snapgear.com)
  *
- *	$Id: nettel.c,v 1.8 2004/11/04 13:24:15 gleixner Exp $
+ *	$Id: nettel.c,v 1.10 2005/01/05 17:11:29 dwmw2 Exp $
  */
 
 /****************************************************************************/
@@ -332,8 +332,8 @@
 
 		/* Destroy useless AMD MTD mapping */
 		amd_mtd = NULL;
-		iounmap((void *) nettel_amd_map.virt);
-		nettel_amd_map.virt = (unsigned long) NULL;
+		iounmap(nettel_amd_map.virt);
+		nettel_amd_map.virt = NULL;
 #else
 		/* Only AMD flash supported */
 		return(-ENXIO);
@@ -357,8 +357,7 @@
 	/* Probe for the the size of the first Intel flash */
 	nettel_intel_map.size = maxsize;
 	nettel_intel_map.phys = intel0addr;
-	nettel_intel_map.virt = (unsigned long)
-		ioremap_nocache(intel0addr, maxsize);
+	nettel_intel_map.virt = ioremap_nocache(intel0addr, maxsize);
 	if (!nettel_intel_map.virt) {
 		printk("SNAPGEAR: failed to ioremap() ROMCS1\n");
 		return(-EIO);
@@ -366,8 +365,8 @@
 	simple_map_init(&nettel_intel_map);
 
 	intel_mtd = do_map_probe("cfi_probe", &nettel_intel_map);
-	if (! intel_mtd) {
-		iounmap((void *) nettel_intel_map.virt);
+	if (!intel_mtd) {
+		iounmap(nettel_intel_map.virt);
 		return(-ENXIO);
 	}
 
@@ -388,11 +387,10 @@
 	/* Delete the old map and probe again to do both chips */
 	map_destroy(intel_mtd);
 	intel_mtd = NULL;
-	iounmap((void *) nettel_intel_map.virt);
+	iounmap(nettel_intel_map.virt);
 
 	nettel_intel_map.size = maxsize;
-	nettel_intel_map.virt = (unsigned long)
-		ioremap_nocache(intel0addr, maxsize);
+	nettel_intel_map.virt = ioremap_nocache(intel0addr, maxsize);
 	if (!nettel_intel_map.virt) {
 		printk("SNAPGEAR: failed to ioremap() ROMCS1/2\n");
 		return(-EIO);
@@ -480,7 +478,7 @@
 		map_destroy(intel_mtd);
 	}
 	if (nettel_intel_map.virt) {
-		iounmap((void *)nettel_intel_map.virt);
+		iounmap(nettel_intel_map.virt);
 		nettel_intel_map.virt = 0;
 	}
 #endif
diff -Nru a/drivers/mtd/maps/ocelot.c b/drivers/mtd/maps/ocelot.c
--- a/drivers/mtd/maps/ocelot.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/mtd/maps/ocelot.c	2005-01-10 20:11:23 -08:00
@@ -1,5 +1,5 @@
 /*
- * $Id: ocelot.c,v 1.15 2004/11/04 13:24:15 gleixner Exp $
+ * $Id: ocelot.c,v 1.16 2005/01/05 18:05:13 dwmw2 Exp $
  *
  * Flash on Momenco Ocelot
  */
@@ -28,7 +28,7 @@
 
 static void ocelot_ram_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf)
 {
-        struct map_info *map = (struct map_info *)mtd->priv;
+        struct map_info *map = mtd->priv;
 	size_t done = 0;
 
 	/* If we use memcpy, it does word-wide writes. Even though we told the 
diff -Nru a/drivers/mtd/maps/pci.c b/drivers/mtd/maps/pci.c
--- a/drivers/mtd/maps/pci.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/mtd/maps/pci.c	2005-01-10 20:11:18 -08:00
@@ -7,7 +7,7 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  *
- *  $Id: pci.c,v 1.8 2004/07/12 22:38:29 dwmw2 Exp $
+ *  $Id: pci.c,v 1.9 2004/11/28 09:40:40 dwmw2 Exp $
  * 
  * Generic PCI memory map driver.  We support the following boards:
  *  - Intel IQ80310 ATU.
diff -Nru a/drivers/mtd/maps/physmap.c b/drivers/mtd/maps/physmap.c
--- a/drivers/mtd/maps/physmap.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/mtd/maps/physmap.c	2005-01-10 20:11:20 -08:00
@@ -1,5 +1,5 @@
 /*
- * $Id: physmap.c,v 1.36 2004/11/04 13:24:15 gleixner Exp $
+ * $Id: physmap.c,v 1.37 2004/11/28 09:40:40 dwmw2 Exp $
  *
  * Normal mappings of chips in physical memory
  *
diff -Nru a/drivers/mtd/maps/sbc_gxx.c b/drivers/mtd/maps/sbc_gxx.c
--- a/drivers/mtd/maps/sbc_gxx.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/mtd/maps/sbc_gxx.c	2005-01-10 20:11:20 -08:00
@@ -17,7 +17,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: sbc_gxx.c,v 1.32 2004/11/16 18:29:02 dwmw2 Exp $
+   $Id: sbc_gxx.c,v 1.33 2004/11/28 09:40:40 dwmw2 Exp $
 
 The SBC-MediaGX / SBC-GXx has up to 16 MiB of 
 Intel StrataFlash (28F320/28F640) in x8 mode.  
diff -Nru a/drivers/mtd/maps/sc520cdp.c b/drivers/mtd/maps/sc520cdp.c
--- a/drivers/mtd/maps/sc520cdp.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/mtd/maps/sc520cdp.c	2005-01-10 20:11:22 -08:00
@@ -16,7 +16,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: sc520cdp.c,v 1.18 2004/11/04 13:24:15 gleixner Exp $
+ * $Id: sc520cdp.c,v 1.21 2004/12/13 10:27:08 dedekind Exp $
  *
  *
  * The SC520CDP is an evaluation board for the Elan SC520 processor available
diff -Nru a/drivers/mtd/maps/scb2_flash.c b/drivers/mtd/maps/scb2_flash.c
--- a/drivers/mtd/maps/scb2_flash.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/mtd/maps/scb2_flash.c	2005-01-10 20:11:19 -08:00
@@ -1,6 +1,6 @@
 /*
  * MTD map driver for BIOS Flash on Intel SCB2 boards
- * $Id: scb2_flash.c,v 1.10 2004/11/16 18:29:02 dwmw2 Exp $
+ * $Id: scb2_flash.c,v 1.11 2004/11/28 09:40:40 dwmw2 Exp $
  * Copyright (C) 2002 Sun Microsystems, Inc.
  * Tim Hockin <thockin@sun.com>
  *
diff -Nru a/drivers/mtd/maps/scx200_docflash.c b/drivers/mtd/maps/scx200_docflash.c
--- a/drivers/mtd/maps/scx200_docflash.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/mtd/maps/scx200_docflash.c	2005-01-10 20:11:21 -08:00
@@ -2,7 +2,7 @@
 
    Copyright (c) 2001,2002 Christer Weinigel <wingel@nano-system.com>
 
-   $Id: scx200_docflash.c,v 1.9 2004/11/16 18:29:02 dwmw2 Exp $ 
+   $Id: scx200_docflash.c,v 1.10 2004/11/28 09:40:40 dwmw2 Exp $ 
 
    National Semiconductor SCx200 flash mapped with DOCCS
 */
@@ -29,19 +29,19 @@
 /* Set this to one if you want to partition the flash */
 #define PARTITION 1
 
-MODULE_PARM(probe, "i");
-MODULE_PARM_DESC(probe, "Probe for a BIOS mapping");
-MODULE_PARM(size, "i");
-MODULE_PARM_DESC(size, "Size of the flash mapping");
-MODULE_PARM(width, "i");
-MODULE_PARM_DESC(width, "Data width of the flash mapping (8/16)");
-MODULE_PARM(flashtype, "s");
-MODULE_PARM_DESC(flashtype, "Type of MTD probe to do");
-
 static int probe = 0;		/* Don't autoprobe */
 static unsigned size = 0x1000000; /* 16 MiB the whole ISA address space */
 static unsigned width = 8;	/* Default to 8 bits wide */
 static char *flashtype = "cfi_probe";
+
+module_param(probe, int, 0);
+MODULE_PARM_DESC(probe, "Probe for a BIOS mapping");
+module_param(size, int, 0);
+MODULE_PARM_DESC(size, "Size of the flash mapping");
+module_param(width, int, 0);
+MODULE_PARM_DESC(width, "Data width of the flash mapping (8/16)");
+module_param(flashtype, charp, 0);
+MODULE_PARM_DESC(flashtype, "Type of MTD probe to do");
 
 static struct resource docmem = {
 	.flags = IORESOURCE_MEM,
diff -Nru a/drivers/mtd/maps/sharpsl-flash.c b/drivers/mtd/maps/sharpsl-flash.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/mtd/maps/sharpsl-flash.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,101 @@
+/*
+ * sharpsl-flash.c
+ * 
+ * Copyright (C) 2001 Lineo Japan, Inc.
+ * Copyright (C) 2002  SHARP
+ *
+ * $Id: sharpsl-flash.c,v 1.2 2004/11/24 20:38:06 rpurdie Exp $
+ *
+ * based on rpxlite.c,v 1.15 2001/10/02 15:05:14 dwmw2 Exp
+ *          Handle mapping of the flash on the RPX Lite and CLLF boards
+ *
+ * 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.
+ *
+ */
+
+#include <linux/module.h>
+#include <linux/types.h>
+#include <linux/kernel.h>
+#include <asm/io.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/map.h>
+#include <linux/mtd/partitions.h>
+
+#define WINDOW_ADDR 0x00000000
+#define WINDOW_SIZE 0x01000000
+#define BANK_WIDTH 2
+
+static struct mtd_info *mymtd;
+
+struct map_info sharpsl_map = {
+	.name = "sharpsl-flash",
+	.size = WINDOW_SIZE,
+	.bankwidth = BANK_WIDTH,
+	.phys = WINDOW_ADDR
+};
+
+static struct mtd_partition sharpsl_partitions[1] = {
+	{
+		name:		"Filesystem",
+		size:		0x006d0000,
+		offset:		0x00120000
+	}
+};
+
+#define NB_OF(x)  (sizeof(x)/sizeof(x[0]))
+
+int __init init_sharpsl(void)
+{
+	struct mtd_partition *parts;
+	int nb_parts = 0;
+	char *part_type = "static";
+
+	printk(KERN_NOTICE "Sharp SL series flash device: %x at %x\n", WINDOW_SIZE, WINDOW_ADDR);
+	sharpsl_map.virt = ioremap(WINDOW_ADDR, WINDOW_SIZE);
+	if (!sharpsl_map.virt) {
+		printk("Failed to ioremap\n");
+		return -EIO;
+	}
+	mymtd = do_map_probe("map_rom", &sharpsl_map);
+	if (!mymtd) {
+		iounmap(sharpsl_map.virt);
+		return -ENXIO;
+	}
+
+	mymtd->owner = THIS_MODULE;
+
+	parts = sharpsl_partitions;
+	nb_parts = NB_OF(sharpsl_partitions);
+
+	printk(KERN_NOTICE "Using %s partision definition\n", part_type);
+	add_mtd_partitions(mymtd, parts, nb_parts);
+
+	return 0;
+}
+
+static void __exit cleanup_sharpsl(void)
+{
+	if (mymtd) {
+		del_mtd_partitions(mymtd);
+		map_destroy(mymtd);
+	}
+	if (sharpsl_map.virt) {
+		iounmap(sharpsl_map.virt);
+		sharpsl_map.virt = 0;
+	}
+}
+
+module_init(init_sharpsl);
+module_exit(cleanup_sharpsl);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("SHARP (Original: Arnold Christensen <AKC@pel.dk>)");
+MODULE_DESCRIPTION("MTD map driver for SHARP SL series");
diff -Nru a/drivers/mtd/maps/ts5500_flash.c b/drivers/mtd/maps/ts5500_flash.c
--- a/drivers/mtd/maps/ts5500_flash.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/mtd/maps/ts5500_flash.c	2005-01-10 20:11:22 -08:00
@@ -25,7 +25,7 @@
  * - If you have created your own jffs file system and the bios overwrites 
  *   it during boot, try disabling Drive A: and B: in the boot order.
  *
- * $Id: ts5500_flash.c,v 1.1 2004/09/20 15:33:26 sean Exp $
+ * $Id: ts5500_flash.c,v 1.2 2004/11/28 09:40:40 dwmw2 Exp $
  */
 
 #include <linux/config.h>
diff -Nru a/drivers/mtd/maps/uclinux.c b/drivers/mtd/maps/uclinux.c
--- a/drivers/mtd/maps/uclinux.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/mtd/maps/uclinux.c	2005-01-10 20:11:22 -08:00
@@ -5,7 +5,7 @@
  *
  *	(C) Copyright 2002, Greg Ungerer (gerg@snapgear.com)
  *
- * 	$Id: uclinux.c,v 1.9 2004/11/04 13:24:15 gleixner Exp $
+ * 	$Id: uclinux.c,v 1.10 2005/01/05 18:05:13 dwmw2 Exp $
  */
 
 /****************************************************************************/
@@ -47,7 +47,7 @@
 int uclinux_point(struct mtd_info *mtd, loff_t from, size_t len,
 	size_t *retlen, u_char **mtdbuf)
 {
-	struct map_info *map = (struct map_info *) mtd->priv;
+	struct map_info *map = mtd->priv;
 	*mtdbuf = (u_char *) (map->virt + ((int) from));
 	*retlen = len;
 	return(0);
@@ -81,7 +81,7 @@
 	mtd = do_map_probe("map_ram", mapp);
 	if (!mtd) {
 		printk("uclinux[mtd]: failed to find a mapping?\n");
-		iounmap((void *) mapp->virt);
+		iounmap(mapp->virt);
 		return(-ENXIO);
 	}
 		
diff -Nru a/drivers/mtd/maps/walnut.c b/drivers/mtd/maps/walnut.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/mtd/maps/walnut.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,122 @@
+/*
+ * $Id: walnut.c,v 1.2 2004/12/10 12:07:42 holindho Exp $
+ * 
+ * Mapping for Walnut flash
+ * (used ebony.c as a "framework")
+ * 
+ * Heikki Lindholm <holindho@infradead.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/module.h>
+#include <linux/types.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/map.h>
+#include <linux/mtd/partitions.h>
+#include <linux/config.h>
+#include <linux/version.h>
+#include <asm/io.h>
+#include <asm/ibm4xx.h>
+#include <platforms/4xx/walnut.h>
+
+/* these should be in platforms/4xx/walnut.h ? */
+#define WALNUT_FLASH_ONBD_N(x)		(x & 0x02)
+#define WALNUT_FLASH_SRAM_SEL(x)	(x & 0x01)
+#define WALNUT_FLASH_LOW		0xFFF00000
+#define WALNUT_FLASH_HIGH		0xFFF80000
+#define WALNUT_FLASH_SIZE		0x80000
+
+static struct mtd_info *flash;
+
+static struct map_info walnut_map = {
+	.name =		"Walnut flash",
+	.size =		WALNUT_FLASH_SIZE,
+	.bankwidth =	1,
+};
+
+/* Actually, OpenBIOS is the last 128 KiB of the flash - better
+ * partitioning could be made */
+static struct mtd_partition walnut_partitions[] = {
+	{
+		.name =   "OpenBIOS",
+		.offset = 0x0,
+		.size =   WALNUT_FLASH_SIZE,
+		/*.mask_flags = MTD_WRITEABLE, */ /* force read-only */		
+	}
+};
+
+int __init init_walnut(void)
+{
+	u8 fpga_brds1;
+	void *fpga_brds1_adr;
+	void *fpga_status_adr;
+	unsigned long flash_base;
+
+	/* this should already be mapped (platform/4xx/walnut.c) */
+	fpga_status_adr = ioremap(WALNUT_FPGA_BASE, 8);
+	if (!fpga_status_adr)
+		return -ENOMEM;
+
+	fpga_brds1_adr = fpga_status_adr+5;
+	fpga_brds1 = readb(fpga_brds1_adr);
+	/* iounmap(fpga_status_adr); */
+
+	if (WALNUT_FLASH_ONBD_N(fpga_brds1)) {
+		printk("The on-board flash is disabled (U79 sw 5)!");
+		return -EIO;
+	}
+	if (WALNUT_FLASH_SRAM_SEL(fpga_brds1)) 
+		flash_base = WALNUT_FLASH_LOW;
+	else
+		flash_base = WALNUT_FLASH_HIGH;
+	
+	walnut_map.phys = flash_base;
+	walnut_map.virt =
+		(void __iomem *)ioremap(flash_base, walnut_map.size);
+
+	if (!walnut_map.virt) {
+		printk("Failed to ioremap flash.\n");
+		return -EIO;
+	}
+
+	simple_map_init(&walnut_map);
+
+	flash = do_map_probe("jedec_probe", &walnut_map);
+	if (flash) {
+		flash->owner = THIS_MODULE;
+		add_mtd_partitions(flash, walnut_partitions,
+					ARRAY_SIZE(walnut_partitions));
+	} else {
+		printk("map probe failed for flash\n");
+		return -ENXIO;
+	}
+
+	return 0;
+}
+
+static void __exit cleanup_walnut(void)
+{
+	if (flash) {
+		del_mtd_partitions(flash);
+		map_destroy(flash);
+	}
+
+	if (walnut_map.virt) {
+		iounmap((void *)walnut_map.virt);
+		walnut_map.virt = 0;
+	}
+}
+
+module_init(init_walnut);
+module_exit(cleanup_walnut);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Heikki Lindholm <holindho@infradead.org>");
+MODULE_DESCRIPTION("MTD map and partitions for IBM 405GP Walnut boards");
diff -Nru a/drivers/mtd/mtdblock.c b/drivers/mtd/mtdblock.c
--- a/drivers/mtd/mtdblock.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/mtd/mtdblock.c	2005-01-10 20:11:18 -08:00
@@ -1,7 +1,7 @@
 /* 
  * Direct MTD block device access
  *
- * $Id: mtdblock.c,v 1.65 2004/11/16 18:28:59 dwmw2 Exp $
+ * $Id: mtdblock.c,v 1.66 2004/11/25 13:52:52 joern Exp $
  *
  * (C) 2000-2003 Nicolas Pitre <nico@cam.org>
  * (C) 1999-2003 David Woodhouse <dwmw2@infradead.org>
@@ -248,7 +248,7 @@
 			      unsigned long block, char *buf)
 {
 	struct mtdblk_dev *mtdblk = mtdblks[dev->devnum];
-	if (unlikely(!mtdblk->cache_data)) {
+	if (unlikely(!mtdblk->cache_data && mtdblk->cache_size)) {
 		mtdblk->cache_data = vmalloc(mtdblk->mtd->erasesize);
 		if (!mtdblk->cache_data)
 			return -EINTR;
diff -Nru a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c
--- a/drivers/mtd/mtdchar.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/mtd/mtdchar.c	2005-01-10 20:11:20 -08:00
@@ -1,5 +1,5 @@
 /*
- * $Id: mtdchar.c,v 1.65 2004/09/23 23:45:47 gleixner Exp $
+ * $Id: mtdchar.c,v 1.66 2005/01/05 18:05:11 dwmw2 Exp $
  *
  * Character-device access to raw MTD devices.
  *
@@ -61,7 +61,7 @@
 
 static loff_t mtd_lseek (struct file *file, loff_t offset, int orig)
 {
-	struct mtd_info *mtd=(struct mtd_info *)file->private_data;
+	struct mtd_info *mtd = file->private_data;
 
 	switch (orig) {
 	case 0:
@@ -134,7 +134,7 @@
 
 	DEBUG(MTD_DEBUG_LEVEL0, "MTD_close\n");
 
-	mtd = (struct mtd_info *)file->private_data;
+	mtd = file->private_data;
 	
 	if (mtd->sync)
 		mtd->sync(mtd);
@@ -151,7 +151,7 @@
 
 static ssize_t mtd_read(struct file *file, char __user *buf, size_t count,loff_t *ppos)
 {
-	struct mtd_info *mtd = (struct mtd_info *)file->private_data;
+	struct mtd_info *mtd = file->private_data;
 	size_t retlen=0;
 	size_t total_retlen=0;
 	int ret=0;
@@ -210,7 +210,7 @@
 
 static ssize_t mtd_write(struct file *file, const char __user *buf, size_t count,loff_t *ppos)
 {
-	struct mtd_info *mtd = (struct mtd_info *)file->private_data;
+	struct mtd_info *mtd = file->private_data;
 	char *kbuf;
 	size_t retlen;
 	size_t total_retlen=0;
@@ -276,7 +276,7 @@
 static int mtd_ioctl(struct inode *inode, struct file *file,
 		     u_int cmd, u_long arg)
 {
-	struct mtd_info *mtd = (struct mtd_info *)file->private_data;
+	struct mtd_info *mtd = file->private_data;
 	void __user *argp = (void __user *)arg;
 	int ret = 0;
 	u_long size;
diff -Nru a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
--- a/drivers/mtd/nand/Kconfig	2005-01-10 20:11:21 -08:00
+++ b/drivers/mtd/nand/Kconfig	2005-01-10 20:11:21 -08:00
@@ -1,5 +1,5 @@
 # drivers/mtd/nand/Kconfig
-# $Id: Kconfig,v 1.22 2004/10/05 22:11:46 gleixner Exp $
+# $Id: Kconfig,v 1.26 2005/01/05 12:42:24 dwmw2 Exp $
 
 menu "NAND Flash Device Drivers"
 	depends on MTD!=n
@@ -7,6 +7,7 @@
 config MTD_NAND
 	tristate "NAND Device Support"
 	depends on MTD
+	select MTD_NAND_IDS
 	help
 	  This enables support for accessing all type of NAND flash
 	  devices. For further information see
@@ -56,8 +57,6 @@
 
 config MTD_NAND_IDS
 	tristate
-	default y if MTD_NAND = y || MTD_DOC2000 = y || MTD_DOC2001 = y || MTD_DOC2001PLUS = y
-	default m if MTD_NAND = m || MTD_DOC2000 = m || MTD_DOC2001 = m || MTD_DOC2001PLUS = m
 
 config MTD_NAND_TX4925NDFMC
 	tristate "SmartMedia Card on Toshiba RBTX4925 reference board"
@@ -192,4 +191,17 @@
 	  Even if you leave this disabled, you can enable BBT writes at module
 	  load time (assuming you build diskonchip as a module) with the module
 	  parameter "inftl_bbt_write=1".
+	  
+ config MTD_NAND_SHARPSL
+ 	bool "Support for NAND Flash on Sharp SL Series (C7xx + others)"
+ 	depends on MTD_NAND	&& ARCH_PXA
+ 
+ config MTD_NAND_NANDSIM
+ 	bool "Support for NAND Flash Simulator"
+ 	depends on MTD_NAND && MTD_PARTITIONS
+
+	help
+	  The simulator may simulate verious NAND flash chips for the
+	  MTD nand layer.
+ 
 endmenu
diff -Nru a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile
--- a/drivers/mtd/nand/Makefile	2005-01-10 20:11:15 -08:00
+++ b/drivers/mtd/nand/Makefile	2005-01-10 20:11:15 -08:00
@@ -1,7 +1,7 @@
 #
 # linux/drivers/nand/Makefile
 #
-# $Id: Makefile.common,v 1.13 2004/09/28 22:04:23 bjd Exp $
+# $Id: Makefile.common,v 1.15 2004/11/26 12:28:22 dedekind Exp $
 
 obj-$(CONFIG_MTD_NAND)			+= nand.o nand_ecc.o
 obj-$(CONFIG_MTD_NAND_IDS)		+= nand_ids.o
@@ -18,5 +18,7 @@
 obj-$(CONFIG_MTD_NAND_DISKONCHIP)	+= diskonchip.o
 obj-$(CONFIG_MTD_NAND_H1900)		+= h1910.o
 obj-$(CONFIG_MTD_NAND_RTC_FROM4)	+= rtc_from4.o
+obj-$(CONFIG_MTD_NAND_SHARPSL)		+= sharpsl.o
+obj-$(CONFIG_MTD_NAND_NANDSIM)		+= nandsim.o
 
 nand-objs = nand_base.o nand_bbt.o
diff -Nru a/drivers/mtd/nand/diskonchip.c b/drivers/mtd/nand/diskonchip.c
--- a/drivers/mtd/nand/diskonchip.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/mtd/nand/diskonchip.c	2005-01-10 20:11:17 -08:00
@@ -16,7 +16,7 @@
  *  
  * Interface to generic NAND code for M-Systems DiskOnChip devices
  *
- * $Id: diskonchip.c,v 1.42 2004/11/16 18:29:03 dwmw2 Exp $
+ * $Id: diskonchip.c,v 1.45 2005/01/05 18:05:14 dwmw2 Exp $
  */
 
 #include <linux/kernel.h>
@@ -24,6 +24,7 @@
 #include <linux/sched.h>
 #include <linux/delay.h>
 #include <linux/rslib.h>
+#include <linux/moduleparam.h>
 #include <asm/io.h>
 
 #include <linux/mtd/mtd.h>
@@ -308,7 +309,7 @@
 static void doc2000_write_byte(struct mtd_info *mtd, u_char datum)
 {
 	struct nand_chip *this = mtd->priv;
-	struct doc_priv *doc = (void *)this->priv;
+	struct doc_priv *doc = this->priv;
         void __iomem *docptr = doc->virtadr;
 
 	if(debug)printk("write_byte %02x\n", datum);
@@ -319,7 +320,7 @@
 static u_char doc2000_read_byte(struct mtd_info *mtd)
 {
 	struct nand_chip *this = mtd->priv;
-	struct doc_priv *doc = (void *)this->priv;
+	struct doc_priv *doc = this->priv;
         void __iomem *docptr = doc->virtadr;
 	u_char ret;
 
@@ -334,7 +335,7 @@
 			     const u_char *buf, int len)
 {
 	struct nand_chip *this = mtd->priv;
-	struct doc_priv *doc = (void *)this->priv;
+	struct doc_priv *doc = this->priv;
         void __iomem *docptr = doc->virtadr;
 	int i;
 	if (debug)printk("writebuf of %d bytes: ", len);
@@ -350,7 +351,7 @@
 			    u_char *buf, int len)
 {
 	struct nand_chip *this = mtd->priv;
-	struct doc_priv *doc = (void *)this->priv;
+	struct doc_priv *doc = this->priv;
         void __iomem *docptr = doc->virtadr;
  	int i;
 
@@ -365,7 +366,7 @@
 			    u_char *buf, int len)
 {
 	struct nand_chip *this = mtd->priv;
-	struct doc_priv *doc = (void *)this->priv;
+	struct doc_priv *doc = this->priv;
         void __iomem *docptr = doc->virtadr;
  	int i;
 
@@ -386,7 +387,7 @@
 			      const u_char *buf, int len)
 {
 	struct nand_chip *this = mtd->priv;
-	struct doc_priv *doc = (void *)this->priv;
+	struct doc_priv *doc = this->priv;
         void __iomem *docptr = doc->virtadr;
 	int i;
 
@@ -399,7 +400,7 @@
 static uint16_t __init doc200x_ident_chip(struct mtd_info *mtd, int nr)
 {
 	struct nand_chip *this = mtd->priv;
-	struct doc_priv *doc = (void *)this->priv;
+	struct doc_priv *doc = this->priv;
 	uint16_t ret;
 
 	doc200x_select_chip(mtd, nr);
@@ -441,7 +442,7 @@
 static void __init doc2000_count_chips(struct mtd_info *mtd)
 {
 	struct nand_chip *this = mtd->priv;
-	struct doc_priv *doc = (void *)this->priv;
+	struct doc_priv *doc = this->priv;
 	uint16_t mfrid;
 	int i;
 
@@ -462,7 +463,7 @@
 
 static int doc200x_wait(struct mtd_info *mtd, struct nand_chip *this, int state)
 {
-	struct doc_priv *doc = (void *)this->priv;
+	struct doc_priv *doc = this->priv;
 
 	int status;
 	
@@ -477,7 +478,7 @@
 static void doc2001_write_byte(struct mtd_info *mtd, u_char datum)
 {
 	struct nand_chip *this = mtd->priv;
-	struct doc_priv *doc = (void *)this->priv;
+	struct doc_priv *doc = this->priv;
         void __iomem *docptr = doc->virtadr;
 
 	WriteDOC(datum, docptr, CDSNSlowIO);
@@ -488,7 +489,7 @@
 static u_char doc2001_read_byte(struct mtd_info *mtd)
 {
 	struct nand_chip *this = mtd->priv;
-	struct doc_priv *doc = (void *)this->priv;
+	struct doc_priv *doc = this->priv;
         void __iomem *docptr = doc->virtadr;
 
 	//ReadDOC(docptr, CDSNSlowIO);
@@ -503,7 +504,7 @@
 			     const u_char *buf, int len)
 {
 	struct nand_chip *this = mtd->priv;
-	struct doc_priv *doc = (void *)this->priv;
+	struct doc_priv *doc = this->priv;
         void __iomem *docptr = doc->virtadr;
 	int i;
 
@@ -517,7 +518,7 @@
 			    u_char *buf, int len)
 {
 	struct nand_chip *this = mtd->priv;
-	struct doc_priv *doc = (void *)this->priv;
+	struct doc_priv *doc = this->priv;
         void __iomem *docptr = doc->virtadr;
 	int i;
 
@@ -535,7 +536,7 @@
 			     const u_char *buf, int len)
 {
 	struct nand_chip *this = mtd->priv;
-	struct doc_priv *doc = (void *)this->priv;
+	struct doc_priv *doc = this->priv;
         void __iomem *docptr = doc->virtadr;
 	int i;
 
@@ -555,7 +556,7 @@
 static u_char doc2001plus_read_byte(struct mtd_info *mtd)
 {
 	struct nand_chip *this = mtd->priv;
-	struct doc_priv *doc = (void *)this->priv;
+	struct doc_priv *doc = this->priv;
         void __iomem *docptr = doc->virtadr;
 	u_char ret;
 
@@ -570,7 +571,7 @@
 			     const u_char *buf, int len)
 {
 	struct nand_chip *this = mtd->priv;
-	struct doc_priv *doc = (void *)this->priv;
+	struct doc_priv *doc = this->priv;
         void __iomem *docptr = doc->virtadr;
 	int i;
 
@@ -587,7 +588,7 @@
 			    u_char *buf, int len)
 {
 	struct nand_chip *this = mtd->priv;
-	struct doc_priv *doc = (void *)this->priv;
+	struct doc_priv *doc = this->priv;
         void __iomem *docptr = doc->virtadr;
 	int i;
 
@@ -617,7 +618,7 @@
 			     const u_char *buf, int len)
 {
 	struct nand_chip *this = mtd->priv;
-	struct doc_priv *doc = (void *)this->priv;
+	struct doc_priv *doc = this->priv;
         void __iomem *docptr = doc->virtadr;
 	int i;
 
@@ -643,7 +644,7 @@
 static void doc2001plus_select_chip(struct mtd_info *mtd, int chip)
 {
 	struct nand_chip *this = mtd->priv;
-	struct doc_priv *doc = (void *)this->priv;
+	struct doc_priv *doc = this->priv;
         void __iomem *docptr = doc->virtadr;
 	int floor = 0;
 
@@ -669,7 +670,7 @@
 static void doc200x_select_chip(struct mtd_info *mtd, int chip)
 {
 	struct nand_chip *this = mtd->priv;
-	struct doc_priv *doc = (void *)this->priv;
+	struct doc_priv *doc = this->priv;
         void __iomem *docptr = doc->virtadr;
 	int floor = 0;
 
@@ -696,7 +697,7 @@
 static void doc200x_hwcontrol(struct mtd_info *mtd, int cmd)
 {
 	struct nand_chip *this = mtd->priv;
-	struct doc_priv *doc = (void *)this->priv;
+	struct doc_priv *doc = this->priv;
         void __iomem *docptr = doc->virtadr;
 
 	switch(cmd) {
@@ -734,7 +735,7 @@
 static void doc2001plus_command (struct mtd_info *mtd, unsigned command, int column, int page_addr)
 {
 	struct nand_chip *this = mtd->priv;
-	struct doc_priv *doc = (void *)this->priv;
+	struct doc_priv *doc = this->priv;
         void __iomem *docptr = doc->virtadr;
 
 	/*
@@ -838,7 +839,7 @@
 static int doc200x_dev_ready(struct mtd_info *mtd)
 {
 	struct nand_chip *this = mtd->priv;
-	struct doc_priv *doc = (void *)this->priv;
+	struct doc_priv *doc = this->priv;
         void __iomem *docptr = doc->virtadr;
 
 	if (DoC_is_MillenniumPlus(doc)) {
@@ -876,7 +877,7 @@
 static void doc200x_enable_hwecc(struct mtd_info *mtd, int mode)
 {
 	struct nand_chip *this = mtd->priv;
-	struct doc_priv *doc = (void *)this->priv;
+	struct doc_priv *doc = this->priv;
         void __iomem *docptr = doc->virtadr;
 
 	/* Prime the ECC engine */
@@ -895,7 +896,7 @@
 static void doc2001plus_enable_hwecc(struct mtd_info *mtd, int mode)
 {
 	struct nand_chip *this = mtd->priv;
-	struct doc_priv *doc = (void *)this->priv;
+	struct doc_priv *doc = this->priv;
         void __iomem *docptr = doc->virtadr;
 
 	/* Prime the ECC engine */
@@ -916,7 +917,7 @@
 				 unsigned char *ecc_code)
 {
 	struct nand_chip *this = mtd->priv;
-	struct doc_priv *doc = (void *)this->priv;
+	struct doc_priv *doc = this->priv;
         void __iomem *docptr = doc->virtadr;
 	int i;
 	int emptymatch = 1;
@@ -974,7 +975,7 @@
 {
 	int i, ret = 0;
 	struct nand_chip *this = mtd->priv;
-	struct doc_priv *doc = (void *)this->priv;
+	struct doc_priv *doc = this->priv;
         void __iomem *docptr = doc->virtadr;
 	volatile u_char dummy;
 	int emptymatch = 1;
@@ -1062,7 +1063,7 @@
 				     const char *id, int findmirror)
 {
 	struct nand_chip *this = mtd->priv;
-	struct doc_priv *doc = (void *)this->priv;
+	struct doc_priv *doc = this->priv;
 	unsigned offs, end = (MAX_MEDIAHEADER_SCAN << this->phys_erase_shift);
 	int ret;
 	size_t retlen;
@@ -1105,7 +1106,7 @@
 				struct mtd_partition *parts)
 {
 	struct nand_chip *this = mtd->priv;
-	struct doc_priv *doc = (void *)this->priv;
+	struct doc_priv *doc = this->priv;
 	int ret = 0;
 	u_char *buf;
 	struct NFTLMediaHeader *mh;
@@ -1201,7 +1202,7 @@
 				 struct mtd_partition *parts)
 {
 	struct nand_chip *this = mtd->priv;
-	struct doc_priv *doc = (void *)this->priv;
+	struct doc_priv *doc = this->priv;
 	int ret = 0;
 	u_char *buf;
 	struct INFTLMediaHeader *mh;
@@ -1326,7 +1327,7 @@
 {
 	int ret, numparts;
 	struct nand_chip *this = mtd->priv;
-	struct doc_priv *doc = (void *)this->priv;
+	struct doc_priv *doc = this->priv;
 	struct mtd_partition parts[2];
 
 	memset((char *) parts, 0, sizeof(parts));
@@ -1365,7 +1366,7 @@
 {
 	int ret, numparts;
 	struct nand_chip *this = mtd->priv;
-	struct doc_priv *doc = (void *)this->priv;
+	struct doc_priv *doc = this->priv;
 	struct mtd_partition parts[5];
 
 	if (this->numchips > doc->chips_per_floor) {
@@ -1424,7 +1425,7 @@
 static inline int __init doc2000_init(struct mtd_info *mtd)
 {
 	struct nand_chip *this = mtd->priv;
-	struct doc_priv *doc = (void *)this->priv;
+	struct doc_priv *doc = this->priv;
 
 	this->write_byte = doc2000_write_byte;
 	this->read_byte = doc2000_read_byte;
@@ -1442,7 +1443,7 @@
 static inline int __init doc2001_init(struct mtd_info *mtd)
 {
 	struct nand_chip *this = mtd->priv;
-	struct doc_priv *doc = (void *)this->priv;
+	struct doc_priv *doc = this->priv;
 
 	this->write_byte = doc2001_write_byte;
 	this->read_byte = doc2001_read_byte;
@@ -1474,7 +1475,7 @@
 static inline int __init doc2001plus_init(struct mtd_info *mtd)
 {
 	struct nand_chip *this = mtd->priv;
-	struct doc_priv *doc = (void *)this->priv;
+	struct doc_priv *doc = this->priv;
 
 	this->write_byte = NULL;
 	this->read_byte = doc2001plus_read_byte;
@@ -1596,7 +1597,7 @@
 		unsigned char oldval;
 		unsigned char newval;
 		nand = mtd->priv;
-		doc = (void *)nand->priv;
+		doc = nand->priv;
 		/* Use the alias resolution register to determine if this is
 		   in fact the same DOC aliased to a new address.  If writes
 		   to one chip's alias resolution register change the value on
@@ -1645,10 +1646,10 @@
 	nand->bbt_td		= (struct nand_bbt_descr *) (doc + 1);
 	nand->bbt_md		= nand->bbt_td + 1;
 
-	mtd->priv		= (void *) nand;
+	mtd->priv		= nand;
 	mtd->owner		= THIS_MODULE;
 
-	nand->priv		= (void *) doc;
+	nand->priv		= doc;
 	nand->select_chip	= doc200x_select_chip;
 	nand->hwcontrol		= doc200x_hwcontrol;
 	nand->dev_ready		= doc200x_dev_ready;
@@ -1699,7 +1700,7 @@
 	   actually a DiskOnChip.  */
 	WriteDOC(save_control, virtadr, DOCControl);
 fail:
-	iounmap((void *)virtadr);
+	iounmap(virtadr);
 	return ret;
 }
 
@@ -1711,11 +1712,11 @@
 
 	for (mtd = doclist; mtd; mtd = nextmtd) {
 		nand = mtd->priv;
-		doc = (void *)nand->priv;
+		doc = nand->priv;
 
 		nextmtd = doc->nextdoc;
 		nand_release(mtd);
-		iounmap((void *)doc->virtadr);
+		iounmap(doc->virtadr);
 		kfree(mtd);
 	}
 }
diff -Nru a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
--- a/drivers/mtd/nand/nand_base.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/mtd/nand/nand_base.c	2005-01-10 20:11:23 -08:00
@@ -41,7 +41,7 @@
  *	The AG-AND chips have nice features for speed improvement,
  *	which are not supported yet. Read / program 4 pages in one go.
  *
- * $Id: nand_base.c,v 1.121 2004/10/06 19:53:11 gleixner Exp $
+ * $Id: nand_base.c,v 1.126 2004/12/13 11:22:25 lavinen Exp $
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -810,7 +810,7 @@
 	u_char *oob_buf,  struct nand_oobinfo *oobsel, int cached)
 {
 	int 	i, status;
-	u_char	ecc_code[8];
+	u_char	ecc_code[32];
 	int	eccmode = oobsel->useecc ? this->eccmode : NAND_ECC_NONE;
 	int  	*oob_config = oobsel->eccpos;
 	int	datidx = 0, eccidx = 0, eccsteps = this->eccsteps;
@@ -840,18 +840,8 @@
 		}
 		this->write_buf(mtd, this->data_poi, mtd->oobblock);
 		break;
-		
-	/* Hardware ecc 8 byte / 512 byte data */	
-	case NAND_ECC_HW8_512:	
-		eccbytes += 2;
-	/* Hardware ecc 6 byte / 512 byte data */	
-	case NAND_ECC_HW6_512:	
-		eccbytes += 3;
-	/* Hardware ecc 3 byte / 256 data */	
-	/* Hardware ecc 3 byte / 512 byte data */	
-	case NAND_ECC_HW3_256:		
-	case NAND_ECC_HW3_512:
-		eccbytes += 3;
+	default:
+		eccbytes = this->eccbytes;
 		for (; eccsteps; eccsteps--) {
 			/* enable hardware ecc logic for write */
 			this->enable_hwecc(mtd, NAND_ECC_WRITE);
@@ -864,14 +854,9 @@
 			 * the data bytes (words) */
 			if (this->options & NAND_HWECC_SYNDROME)
 				this->write_buf(mtd, ecc_code, eccbytes);
-
 			datidx += this->eccsize;
 		}
 		break;
-
-	default:
-		printk (KERN_WARNING "Invalid NAND_ECC_MODE %d\n", this->eccmode);
-		BUG();	
 	}
 										
 	/* Write out OOB data */
@@ -1051,7 +1036,7 @@
         int eccmode, eccsteps;
 	int	*oob_config, datidx;
 	int	blockcheck = (1 << (this->phys_erase_shift - this->page_shift)) - 1;
-	int	eccbytes = 3;
+	int	eccbytes;
 	int	compareecc = 1;
 	int	oobreadlen;
 
@@ -1092,19 +1077,9 @@
 
 	end = mtd->oobblock;
 	ecc = this->eccsize;
-	switch (eccmode) {
-	case NAND_ECC_HW6_512: /* Hardware ECC 6 byte / 512 byte data  */
-		eccbytes = 6;
-		break;						
-	case NAND_ECC_HW8_512: /* Hardware ECC 8 byte / 512 byte data  */
-		eccbytes = 8;
-		break;
-	case NAND_ECC_NONE:
-		compareecc = 0;
-		break;						
-	}	 
-
-	if (this->options & NAND_HWECC_SYNDROME)
+	eccbytes = this->eccbytes;
+	
+	if ((eccmode == NAND_ECC_NONE) || (this->options & NAND_HWECC_SYNDROME))
 		compareecc = 0;
 
 	oobreadlen = mtd->oobsize;
@@ -1164,13 +1139,10 @@
 			for (i = 0, datidx = 0; eccsteps; eccsteps--, i+=3, datidx += ecc) 
 				this->calculate_ecc(mtd, &data_poi[datidx], &ecc_calc[i]);
 			break;	
-			
-		case NAND_ECC_HW3_256: /* Hardware ECC 3 byte /256 byte data */
-		case NAND_ECC_HW3_512: /* Hardware ECC 3 byte /512 byte data */	
-		case NAND_ECC_HW6_512: /* Hardware ECC 6 byte / 512 byte data  */
-		case NAND_ECC_HW8_512: /* Hardware ECC 8 byte / 512 byte data  */
+
+		default:
 			for (i = 0, datidx = 0; eccsteps; eccsteps--, i+=eccbytes, datidx += ecc) {
-				this->enable_hwecc(mtd, NAND_ECC_READ);	
+				this->enable_hwecc(mtd, NAND_ECC_READ);
 				this->read_buf(mtd, &data_poi[datidx], ecc);
 
 				/* HW ecc with syndrome calculation must read the
@@ -1193,10 +1165,6 @@
 				}	
 			}
 			break;						
-
-		default:
-			printk (KERN_WARNING "Invalid NAND_ECC_MODE %d\n", this->eccmode);
-			BUG();	
 		}
 
 		/* read oobdata */
@@ -2433,8 +2401,19 @@
 	 * fallback to software ECC 
 	*/
 	this->eccsize = 256;	/* set default eccsize */	
+	this->eccbytes = 3;
 
 	switch (this->eccmode) {
+	case NAND_ECC_HW12_2048:
+		if (mtd->oobblock < 2048) {
+			printk(KERN_WARNING "2048 byte HW ECC not possible on %d byte page size, fallback to SW ECC\n",
+			       mtd->oobblock);
+			this->eccmode = NAND_ECC_SOFT;
+			this->calculate_ecc = nand_calculate_ecc;
+			this->correct_data = nand_correct_data;
+		} else
+			this->eccsize = 2048;
+		break;
 
 	case NAND_ECC_HW3_512: 
 	case NAND_ECC_HW6_512: 
@@ -2444,16 +2423,13 @@
 			this->eccmode = NAND_ECC_SOFT;
 			this->calculate_ecc = nand_calculate_ecc;
 			this->correct_data = nand_correct_data;
-			break;		
 		} else 
-			this->eccsize = 512; /* set eccsize to 512 and fall through for function check */
-
+			this->eccsize = 512; /* set eccsize to 512 */
+		break;
+			
 	case NAND_ECC_HW3_256:
-		if (this->calculate_ecc && this->correct_data && this->enable_hwecc)
-			break;
-		printk (KERN_WARNING "No ECC functions supplied, Hardware ECC not possible\n");
-		BUG();	
-
+		break;
+		
 	case NAND_ECC_NONE: 
 		printk (KERN_WARNING "NAND_ECC_NONE selected by board driver. This is not recommended !!\n");
 		this->eccmode = NAND_ECC_NONE;
@@ -2468,11 +2444,32 @@
 		printk (KERN_WARNING "Invalid NAND_ECC_MODE %d\n", this->eccmode);
 		BUG();	
 	}	
-	
+
+	/* Check hardware ecc function availability and adjust number of ecc bytes per 
+	 * calculation step
+	*/
+	switch (this->eccmode) {
+	case NAND_ECC_HW12_2048:
+		this->eccbytes += 4;
+	case NAND_ECC_HW8_512: 
+		this->eccbytes += 2;
+	case NAND_ECC_HW6_512: 
+		this->eccbytes += 3;
+	case NAND_ECC_HW3_512: 
+	case NAND_ECC_HW3_256:
+		if (this->calculate_ecc && this->correct_data && this->enable_hwecc)
+			break;
+		printk (KERN_WARNING "No ECC functions supplied, Hardware ECC not possible\n");
+		BUG();	
+	}
+		
 	mtd->eccsize = this->eccsize;
 	
 	/* Set the number of read / write steps for one page to ensure ECC generation */
 	switch (this->eccmode) {
+	case NAND_ECC_HW12_2048:
+		this->eccsteps = mtd->oobblock / 2048;
+		break;
 	case NAND_ECC_HW3_512:
 	case NAND_ECC_HW6_512:
 	case NAND_ECC_HW8_512:
diff -Nru a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c
--- a/drivers/mtd/nand/nand_bbt.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/mtd/nand/nand_bbt.c	2005-01-10 20:11:19 -08:00
@@ -6,7 +6,7 @@
  *   
  *  Copyright (C) 2004 Thomas Gleixner (tglx@linutronix.de)
  *
- * $Id: nand_bbt.c,v 1.26 2004/10/05 13:50:20 gleixner Exp $
+ * $Id: nand_bbt.c,v 1.28 2004/11/13 10:19:09 gleixner Exp $
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -1001,25 +1001,27 @@
 		return nand_scan_bbt (mtd, &agand_flashbased);
 	}
 	
+	
 	/* Is a flash based bad block table requested ? */
 	if (this->options & NAND_USE_FLASH_BBT) {
 		/* Use the default pattern descriptors */	
 		if (!this->bbt_td) {	
 			this->bbt_td = &bbt_main_descr;
 			this->bbt_md = &bbt_mirror_descr;
-		}	
-		if (mtd->oobblock > 512)
-			return nand_scan_bbt (mtd, &largepage_flashbased);
-		else	
-			return nand_scan_bbt (mtd, &smallpage_flashbased);			
+		}
+		if (!this->badblock_pattern) {
+			this->badblock_pattern = (mtd->oobblock > 512) ?
+				&largepage_flashbased : &smallpage_flashbased;
+		}
 	} else {
 		this->bbt_td = NULL;
 		this->bbt_md = NULL;
-		if (mtd->oobblock > 512)
-			return nand_scan_bbt (mtd, &largepage_memorybased);
-		else
-			return nand_scan_bbt (mtd, &smallpage_memorybased);
+		if (!this->badblock_pattern) {
+			this->badblock_pattern = (mtd->oobblock > 512) ?
+				&largepage_memorybased : &smallpage_memorybased;
+		}
 	}
+	return nand_scan_bbt (mtd, this->badblock_pattern);
 }
 
 /**
diff -Nru a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/mtd/nand/nandsim.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,1613 @@
+/*
+ * NAND flash simulator.
+ *
+ * Author: Artem B. Bityuckiy <dedekind@oktetlabs.ru>, <dedekind@infradead.org>
+ *
+ * Copyright (C) 2004 Nokia Corporation 
+ *
+ * Note: NS means "NAND Simulator".
+ * Note: Input means input TO flash chip, output means output FROM chip.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2, 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
+ *
+ * $Id: nandsim.c,v 1.7 2004/12/06 11:53:06 dedekind Exp $
+ */
+
+#include <linux/config.h>
+#include <linux/init.h>
+#include <linux/types.h>
+#include <linux/module.h>
+#include <linux/moduleparam.h>
+#include <linux/vmalloc.h>
+#include <linux/slab.h>
+#include <linux/errno.h>
+#include <linux/string.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/nand.h>
+#include <linux/mtd/partitions.h>
+#include <linux/delay.h>
+#ifdef CONFIG_NS_ABS_POS
+#include <asm/io.h>
+#endif
+
+
+/* Default simulator parameters values */
+#if !defined(CONFIG_NANDSIM_FIRST_ID_BYTE)  || \
+    !defined(CONFIG_NANDSIM_SECOND_ID_BYTE) || \
+    !defined(CONFIG_NANDSIM_THIRD_ID_BYTE)  || \
+    !defined(CONFIG_NANDSIM_FOURTH_ID_BYTE)
+#define CONFIG_NANDSIM_FIRST_ID_BYTE  0x98
+#define CONFIG_NANDSIM_SECOND_ID_BYTE 0x39
+#define CONFIG_NANDSIM_THIRD_ID_BYTE  0xFF /* No byte */
+#define CONFIG_NANDSIM_FOURTH_ID_BYTE 0xFF /* No byte */
+#endif
+
+#ifndef CONFIG_NANDSIM_ACCESS_DELAY
+#define CONFIG_NANDSIM_ACCESS_DELAY 25
+#endif
+#ifndef CONFIG_NANDSIM_PROGRAMM_DELAY
+#define CONFIG_NANDSIM_PROGRAMM_DELAY 200
+#endif
+#ifndef CONFIG_NANDSIM_ERASE_DELAY
+#define CONFIG_NANDSIM_ERASE_DELAY 2
+#endif
+#ifndef CONFIG_NANDSIM_OUTPUT_CYCLE
+#define CONFIG_NANDSIM_OUTPUT_CYCLE 40
+#endif
+#ifndef CONFIG_NANDSIM_INPUT_CYCLE
+#define CONFIG_NANDSIM_INPUT_CYCLE  50
+#endif
+#ifndef CONFIG_NANDSIM_BUS_WIDTH
+#define CONFIG_NANDSIM_BUS_WIDTH  8
+#endif
+#ifndef CONFIG_NANDSIM_DO_DELAYS
+#define CONFIG_NANDSIM_DO_DELAYS  0
+#endif
+#ifndef CONFIG_NANDSIM_LOG
+#define CONFIG_NANDSIM_LOG        0
+#endif
+#ifndef CONFIG_NANDSIM_DBG
+#define CONFIG_NANDSIM_DBG        0
+#endif
+
+static uint first_id_byte  = CONFIG_NANDSIM_FIRST_ID_BYTE;
+static uint second_id_byte = CONFIG_NANDSIM_SECOND_ID_BYTE;
+static uint third_id_byte  = CONFIG_NANDSIM_THIRD_ID_BYTE;
+static uint fourth_id_byte = CONFIG_NANDSIM_FOURTH_ID_BYTE;
+static uint access_delay   = CONFIG_NANDSIM_ACCESS_DELAY;
+static uint programm_delay = CONFIG_NANDSIM_PROGRAMM_DELAY;
+static uint erase_delay    = CONFIG_NANDSIM_ERASE_DELAY;
+static uint output_cycle   = CONFIG_NANDSIM_OUTPUT_CYCLE;
+static uint input_cycle    = CONFIG_NANDSIM_INPUT_CYCLE;
+static uint bus_width      = CONFIG_NANDSIM_BUS_WIDTH;
+static uint do_delays      = CONFIG_NANDSIM_DO_DELAYS;
+static uint log            = CONFIG_NANDSIM_LOG;
+static uint dbg            = CONFIG_NANDSIM_DBG;
+
+module_param(first_id_byte,  uint, 0400);
+module_param(second_id_byte, uint, 0400);
+module_param(third_id_byte,  uint, 0400);
+module_param(fourth_id_byte, uint, 0400);
+module_param(access_delay,   uint, 0400);
+module_param(programm_delay, uint, 0400);
+module_param(erase_delay,    uint, 0400);
+module_param(output_cycle,   uint, 0400);
+module_param(input_cycle,    uint, 0400);
+module_param(bus_width,      uint, 0400);
+module_param(do_delays,      uint, 0400);
+module_param(log,            uint, 0400);
+module_param(dbg,            uint, 0400);
+
+MODULE_PARM_DESC(first_id_byte,  "The fist byte returned by NAND Flash 'read ID' command (manufaturer ID)");
+MODULE_PARM_DESC(second_id_byte, "The second byte returned by NAND Flash 'read ID' command (chip ID)");
+MODULE_PARM_DESC(third_id_byte,  "The third byte returned by NAND Flash 'read ID' command");
+MODULE_PARM_DESC(fourth_id_byte, "The fourth byte returned by NAND Flash 'read ID' command");
+MODULE_PARM_DESC(access_delay,   "Initial page access delay (microiseconds)");
+MODULE_PARM_DESC(programm_delay, "Page programm delay (microseconds");
+MODULE_PARM_DESC(erase_delay,    "Sector erase delay (milliseconds)");
+MODULE_PARM_DESC(output_cycle,   "Word output (from flash) time (nanodeconds)");
+MODULE_PARM_DESC(input_cycle,    "Word input (to flash) time (nanodeconds)");
+MODULE_PARM_DESC(bus_width,      "Chip's bus width (8- or 16-bit)");
+MODULE_PARM_DESC(do_delays,      "Simulate NAND delays using busy-waits if not zero");
+MODULE_PARM_DESC(log,            "Perform logging if not zero");
+MODULE_PARM_DESC(dbg,            "Output debug information if not zero");
+
+/* The largest possible page size */
+#define NS_LARGEST_PAGE_SIZE	2048
+	
+/* The prefix for simulator output */
+#define NS_OUTPUT_PREFIX "[nandsim]"
+
+/* Simulator's output macros (logging, debugging, warning, error) */
+#define NS_LOG(args...) \
+	do { if (log) printk(KERN_DEBUG NS_OUTPUT_PREFIX " log: " args); } while(0)
+#define NS_DBG(args...) \
+	do { if (dbg) printk(KERN_DEBUG NS_OUTPUT_PREFIX " debug: " args); } while(0)
+#define NS_WARN(args...) \
+	do { printk(KERN_WARNING NS_OUTPUT_PREFIX " warnig: " args); } while(0)
+#define NS_ERR(args...) \
+	do { printk(KERN_ERR NS_OUTPUT_PREFIX " errorr: " args); } while(0)
+
+/* Busy-wait delay macros (microseconds, milliseconds) */
+#define NS_UDELAY(us) \
+        do { if (do_delays) udelay(us); } while(0)
+#define NS_MDELAY(us) \
+        do { if (do_delays) mdelay(us); } while(0)
+	
+/* Is the nandsim structure initialized ? */
+#define NS_IS_INITIALIZED(ns) ((ns)->geom.totsz != 0)
+
+/* Good operation completion status */
+#define NS_STATUS_OK(ns) (NAND_STATUS_READY | (NAND_STATUS_WP * ((ns)->lines.wp == 0)))
+
+/* Operation failed completion status */
+#define NS_STATUS_FAILED(ns) (NAND_STATUS_FAIL | NS_STATUS_OK(ns)) 
+
+/* Calculate the page offset in flash RAM image by (row, column) address */
+#define NS_RAW_OFFSET(ns) \
+	(((ns)->regs.row << (ns)->geom.pgshift) + ((ns)->regs.row * (ns)->geom.oobsz) + (ns)->regs.column)
+	
+/* Calculate the OOB offset in flash RAM image by (row, column) address */
+#define NS_RAW_OFFSET_OOB(ns) (NS_RAW_OFFSET(ns) + ns->geom.pgsz)
+
+/* After a command is input, the simulator goes to one of the following states */
+#define STATE_CMD_READ0        0x00000001 /* read data from the beginning of page */
+#define STATE_CMD_READ1        0x00000002 /* read data from the second half of page */
+#define STATE_CMD_READSTART      0x00000003 /* read data second command (large page devices) */
+#define STATE_CMD_PAGEPROG     0x00000004 /* start page programm */
+#define STATE_CMD_READOOB      0x00000005 /* read OOB area */
+#define STATE_CMD_ERASE1       0x00000006 /* sector erase first command */
+#define STATE_CMD_STATUS       0x00000007 /* read status */
+#define STATE_CMD_STATUS_M     0x00000008 /* read multi-plane status (isn't implemented) */
+#define STATE_CMD_SEQIN        0x00000009 /* sequential data imput */
+#define STATE_CMD_READID       0x0000000A /* read ID */
+#define STATE_CMD_ERASE2       0x0000000B /* sector erase second command */
+#define STATE_CMD_RESET        0x0000000C /* reset */
+#define STATE_CMD_MASK         0x0000000F /* command states mask */
+
+/* After an addres is input, the simulator goes to one of these states */
+#define STATE_ADDR_PAGE        0x00000010 /* full (row, column) address is accepted */
+#define STATE_ADDR_SEC         0x00000020 /* sector address was accepted */
+#define STATE_ADDR_ZERO        0x00000030 /* one byte zero address was accepted */
+#define STATE_ADDR_MASK        0x00000030 /* address states mask */
+
+/* Durind data input/output the simulator is in these states */
+#define STATE_DATAIN           0x00000100 /* waiting for data input */
+#define STATE_DATAIN_MASK      0x00000100 /* data input states mask */
+
+#define STATE_DATAOUT          0x00001000 /* waiting for page data output */
+#define STATE_DATAOUT_ID       0x00002000 /* waiting for ID bytes output */
+#define STATE_DATAOUT_STATUS   0x00003000 /* waiting for status output */
+#define STATE_DATAOUT_STATUS_M 0x00004000 /* waiting for multi-plane status output */
+#define STATE_DATAOUT_MASK     0x00007000 /* data output states mask */
+
+/* Previous operation is done, ready to accept new requests */
+#define STATE_READY            0x00000000
+
+/* This state is used to mark that the next state isn't known yet */
+#define STATE_UNKNOWN          0x10000000
+
+/* Simulator's actions bit masks */
+#define ACTION_CPY       0x00100000 /* copy page/OOB to the internal buffer */
+#define ACTION_PRGPAGE   0x00200000 /* programm the internal buffer to flash */
+#define ACTION_SECERASE  0x00300000 /* erase sector */
+#define ACTION_ZEROOFF   0x00400000 /* don't add any offset to address */
+#define ACTION_HALFOFF   0x00500000 /* add to address half of page */
+#define ACTION_OOBOFF    0x00600000 /* add to address OOB offset */
+#define ACTION_MASK      0x00700000 /* action mask */
+
+#define NS_OPER_NUM      12 /* Number of operations supported by the simulator */
+#define NS_OPER_STATES   6  /* Maximum number of states in operation */
+
+#define OPT_ANY          0xFFFFFFFF /* any chip supports this operation */
+#define OPT_PAGE256      0x00000001 /* 256-byte  page chips */
+#define OPT_PAGE512      0x00000002 /* 512-byte  page chips */
+#define OPT_PAGE2048     0x00000008 /* 2048-byte page chips */
+#define OPT_SMARTMEDIA   0x00000010 /* SmartMedia technology chips */
+#define OPT_AUTOINCR     0x00000020 /* page number auto inctimentation is possible */
+#define OPT_PAGE512_8BIT 0x00000040 /* 512-byte page chips with 8-bit bus width */
+#define OPT_LARGEPAGE    (OPT_PAGE2048) /* 2048-byte page chips */
+#define OPT_SMALLPAGE    (OPT_PAGE256  | OPT_PAGE512)  /* 256 and 512-byte page chips */
+
+/* Remove action bits ftom state */
+#define NS_STATE(x) ((x) & ~ACTION_MASK)
+	
+/* 
+ * Maximum previous states which need to be saved. Currently saving is
+ * only needed for page programm operation with preceeded read command
+ * (which is only valid for 512-byte pages).
+ */
+#define NS_MAX_PREVSTATES 1
+
+/* 
+ * The structure which describes all the internal simulator data.
+ */
+struct nandsim {
+	struct mtd_partition part;
+
+	uint busw;              /* flash chip bus width (8 or 16) */
+	u_char ids[4];          /* chip's ID bytes */
+	uint32_t options;       /* chip's characteristic bits */
+	uint32_t state;         /* current chip state */
+	uint32_t nxstate;       /* next expected state */
+	
+	uint32_t *op;           /* current operation, NULL operations isn't known yet  */
+	uint32_t pstates[NS_MAX_PREVSTATES]; /* previous states */
+	uint16_t npstates;      /* number of previous states saved */
+	uint16_t stateidx;      /* current state index */
+
+	/* The simulated NAND flash image */
+	union flash_media {
+		u_char *byte;
+		uint16_t    *word;
+	} mem;
+
+	/* Internal buffer of page + OOB size bytes */
+	union internal_buffer {
+		u_char *byte;    /* for byte access */
+		uint16_t *word;  /* for 16-bit word access */
+	} buf;
+
+	/* NAND flash "geometry" */
+	struct nandsin_geometry {
+		uint32_t totsz;     /* total flash size, bytes */
+		uint32_t secsz;     /* flash sector (erase block) size, bytes */
+		uint pgsz;          /* NAND flash page size, bytes */
+		uint oobsz;         /* page OOB area size, bytes */
+		uint32_t totszoob;  /* total flash size including OOB, bytes */
+		uint pgszoob;       /* page size including OOB , bytes*/
+		uint secszoob;      /* sector size including OOB, bytes */
+		uint pgnum;         /* total number of pages */
+		uint pgsec;         /* number of pages per sector */
+		uint secshift;      /* bits number in sector size */
+		uint pgshift;       /* bits number in page size */
+		uint oobshift;      /* bits number in OOB size */
+		uint pgaddrbytes;   /* bytes per page address */
+		uint secaddrbytes;  /* bytes per sector address */
+		uint idbytes;       /* the number ID bytes that this chip outputs */
+	} geom;
+
+	/* NAND flash internal registers */
+	struct nandsim_regs {
+		unsigned command; /* the command register */
+		u_char   status;  /* the status register */
+		uint     row;     /* the page number */
+		uint     column;  /* the offset within page */
+		uint     count;   /* internal counter */
+		uint     num;     /* number of bytes which must be processed */
+		uint     off;     /* fixed page offset */
+	} regs;
+
+	/* NAND flash lines state */
+        struct ns_lines_status {
+                int ce;  /* chip Enable */
+                int cle; /* command Latch Enable */
+                int ale; /* address Latch Enable */
+                int wp;  /* write Protect */
+        } lines;
+};
+
+/*
+ * Operations array. To perform any operation the simulator must pass
+ * through the correspondent states chain.
+ */
+static struct nandsim_operations {
+	uint32_t reqopts;  /* options which are required to perform the operation */
+	uint32_t states[NS_OPER_STATES]; /* operation's states */
+} ops[NS_OPER_NUM] = {
+	/* Read page + OOB from the beginning */
+	{OPT_SMALLPAGE, {STATE_CMD_READ0 | ACTION_ZEROOFF, STATE_ADDR_PAGE | ACTION_CPY,
+			STATE_DATAOUT, STATE_READY}},
+	/* Read page + OOB from the second half */
+	{OPT_PAGE512_8BIT, {STATE_CMD_READ1 | ACTION_HALFOFF, STATE_ADDR_PAGE | ACTION_CPY,
+			STATE_DATAOUT, STATE_READY}},
+	/* Read OOB */
+	{OPT_SMALLPAGE, {STATE_CMD_READOOB | ACTION_OOBOFF, STATE_ADDR_PAGE | ACTION_CPY,
+			STATE_DATAOUT, STATE_READY}},
+	/* Programm page starting from the beginning */
+	{OPT_ANY, {STATE_CMD_SEQIN, STATE_ADDR_PAGE, STATE_DATAIN,
+			STATE_CMD_PAGEPROG | ACTION_PRGPAGE, STATE_READY}},
+	/* Programm page starting from the beginning */
+	{OPT_SMALLPAGE, {STATE_CMD_READ0, STATE_CMD_SEQIN | ACTION_ZEROOFF, STATE_ADDR_PAGE,
+			      STATE_DATAIN, STATE_CMD_PAGEPROG | ACTION_PRGPAGE, STATE_READY}},
+	/* Programm page starting from the second half */
+	{OPT_PAGE512, {STATE_CMD_READ1, STATE_CMD_SEQIN | ACTION_HALFOFF, STATE_ADDR_PAGE,
+			      STATE_DATAIN, STATE_CMD_PAGEPROG | ACTION_PRGPAGE, STATE_READY}},
+	/* Programm OOB */
+	{OPT_SMALLPAGE, {STATE_CMD_READOOB, STATE_CMD_SEQIN | ACTION_OOBOFF, STATE_ADDR_PAGE,
+			      STATE_DATAIN, STATE_CMD_PAGEPROG | ACTION_PRGPAGE, STATE_READY}},
+	/* Erase sector */
+	{OPT_ANY, {STATE_CMD_ERASE1, STATE_ADDR_SEC, STATE_CMD_ERASE2 | ACTION_SECERASE, STATE_READY}},
+	/* Read status */
+	{OPT_ANY, {STATE_CMD_STATUS, STATE_DATAOUT_STATUS, STATE_READY}},
+	/* Read multi-plane status */
+	{OPT_SMARTMEDIA, {STATE_CMD_STATUS_M, STATE_DATAOUT_STATUS_M, STATE_READY}},
+	/* Read ID */
+	{OPT_ANY, {STATE_CMD_READID, STATE_ADDR_ZERO, STATE_DATAOUT_ID, STATE_READY}},
+	/* Large page devices read page */
+	{OPT_LARGEPAGE, {STATE_CMD_READ0, STATE_ADDR_PAGE, STATE_CMD_READSTART | ACTION_CPY,
+			       STATE_DATAOUT, STATE_READY}}
+};
+
+/* MTD structure for NAND controller */
+static struct mtd_info *nsmtd;
+
+static u_char ns_verify_buf[NS_LARGEST_PAGE_SIZE];
+
+/*
+ * Initialize the nandsim structure.
+ *
+ * RETURNS: 0 if success, -ERRNO if failure.
+ */
+static int
+init_nandsim(struct mtd_info *mtd)
+{
+	struct nand_chip *chip = (struct nand_chip *)mtd->priv;
+	struct nandsim   *ns   = (struct nandsim *)(chip->priv);
+	int i;
+
+	if (NS_IS_INITIALIZED(ns)) {
+		NS_ERR("init_nandsim: nandsim is already initialized\n");
+		return -EIO;
+	}
+
+	/* Force mtd to not do delays */
+	chip->chip_delay = 0;
+
+	/* Initialize the NAND flash parameters */
+	ns->busw = chip->options & NAND_BUSWIDTH_16 ? 16 : 8;
+	ns->geom.totsz    = mtd->size;
+	ns->geom.pgsz     = mtd->oobblock;
+	ns->geom.oobsz    = mtd->oobsize;
+	ns->geom.secsz    = mtd->erasesize;
+	ns->geom.pgszoob  = ns->geom.pgsz + ns->geom.oobsz;
+	ns->geom.pgnum    = ns->geom.totsz / ns->geom.pgsz;
+	ns->geom.totszoob = ns->geom.totsz + ns->geom.pgnum * ns->geom.oobsz;
+	ns->geom.secshift = ffs(ns->geom.secsz) - 1;
+	ns->geom.pgshift  = chip->page_shift;
+	ns->geom.oobshift = ffs(ns->geom.oobsz) - 1;
+	ns->geom.pgsec    = ns->geom.secsz / ns->geom.pgsz;
+	ns->geom.secszoob = ns->geom.secsz + ns->geom.oobsz * ns->geom.pgsec;
+	ns->options = 0;
+
+	if (ns->geom.pgsz == 256) {
+		ns->options |= OPT_PAGE256;
+	}
+	else if (ns->geom.pgsz == 512) {
+		ns->options |= (OPT_PAGE512 | OPT_AUTOINCR);
+		if (ns->busw == 8)
+			ns->options |= OPT_PAGE512_8BIT;
+	} else if (ns->geom.pgsz == 2048) {
+		ns->options |= OPT_PAGE2048;
+	} else {
+		NS_ERR("init_nandsim: unknown page size %u\n", ns->geom.pgsz);
+		return -EIO;
+	}
+
+	if (ns->options & OPT_SMALLPAGE) {
+		if (ns->geom.totsz < (64 << 20)) {
+			ns->geom.pgaddrbytes  = 3;
+			ns->geom.secaddrbytes = 2;
+		} else {
+			ns->geom.pgaddrbytes  = 4;
+			ns->geom.secaddrbytes = 3;
+		}
+	} else {
+		if (ns->geom.totsz <= (128 << 20)) {
+			ns->geom.pgaddrbytes  = 5;
+			ns->geom.secaddrbytes = 2;
+		} else {
+			ns->geom.pgaddrbytes  = 5;
+			ns->geom.secaddrbytes = 3;
+		}
+	}
+	
+	/* Detect how many ID bytes the NAND chip outputs */
+        for (i = 0; nand_flash_ids[i].name != NULL; i++) {
+                if (second_id_byte != nand_flash_ids[i].id)
+                        continue;
+		if (!(nand_flash_ids[i].options & NAND_NO_AUTOINCR))
+			ns->options |= OPT_AUTOINCR;
+	}
+
+	if (ns->busw == 16)
+		NS_WARN("16-bit flashes support wasn't tested\n");
+
+	printk("flash size: %u MiB\n",          ns->geom.totsz >> 20);
+	printk("page size: %u bytes\n",         ns->geom.pgsz);
+	printk("OOB area size: %u bytes\n",     ns->geom.oobsz);
+	printk("sector size: %u KiB\n",         ns->geom.secsz >> 10);
+	printk("pages number: %u\n",            ns->geom.pgnum);
+	printk("pages per sector: %u\n",        ns->geom.pgsec);
+	printk("bus width: %u\n",               ns->busw);
+	printk("bits in sector size: %u\n",     ns->geom.secshift);
+	printk("bits in page size: %u\n",       ns->geom.pgshift);
+	printk("bits in OOB size: %u\n",        ns->geom.oobshift);
+	printk("flash size with OOB: %u KiB\n", ns->geom.totszoob >> 10);
+	printk("page address bytes: %u\n",      ns->geom.pgaddrbytes);
+	printk("sector address bytes: %u\n",    ns->geom.secaddrbytes);
+	printk("options: %#x\n",                ns->options);
+
+	/* Map / allocate and initialize the flash image */
+#ifdef CONFIG_NS_ABS_POS
+	ns->mem.byte = ioremap(CONFIG_NS_ABS_POS, ns->geom.totszoob);
+	if (!ns->mem.byte) {
+		NS_ERR("init_nandsim: failed to map the NAND flash image at address %p\n", 
+			(void *)CONFIG_NS_ABS_POS);
+		return -ENOMEM;
+	}
+#else
+	ns->mem.byte = vmalloc(ns->geom.totszoob);
+	if (!ns->mem.byte) {
+		NS_ERR("init_nandsim: unable to allocate %u bytes for flash image\n",
+			ns->geom.totszoob);
+		return -ENOMEM;
+	}
+	memset(ns->mem.byte, 0xFF, ns->geom.totszoob);
+#endif
+
+	/* Allocate / initialize the internal buffer */
+	ns->buf.byte = kmalloc(ns->geom.pgszoob, GFP_KERNEL);
+	if (!ns->buf.byte) {
+		NS_ERR("init_nandsim: unable to allocate %u bytes for the internal buffer\n",
+			ns->geom.pgszoob);
+		goto error;
+	}
+	memset(ns->buf.byte, 0xFF, ns->geom.pgszoob);
+
+	/* Fill the partition_info structure */
+	ns->part.name   = "NAND simulator partition";
+	ns->part.offset = 0;
+	ns->part.size   = ns->geom.totsz;
+
+	return 0;
+
+error:
+#ifdef CONFIG_NS_ABS_POS
+	iounmap(ns->mem.byte);
+#else
+	vfree(ns->mem.byte);
+#endif
+
+	return -ENOMEM;
+}
+
+/*
+ * Free the nandsim structure.
+ */
+static void
+free_nandsim(struct nandsim *ns)
+{
+	kfree(ns->buf.byte);
+
+#ifdef CONFIG_NS_ABS_POS
+	iounmap(ns->mem.byte);
+#else
+	vfree(ns->mem.byte);
+#endif
+
+	return;
+}
+
+/*
+ * Returns the string representation of 'state' state.
+ */
+static char *
+get_state_name(uint32_t state)
+{
+	switch (NS_STATE(state)) {
+		case STATE_CMD_READ0:
+			return "STATE_CMD_READ0";
+		case STATE_CMD_READ1:
+			return "STATE_CMD_READ1";
+		case STATE_CMD_PAGEPROG:
+			return "STATE_CMD_PAGEPROG";
+		case STATE_CMD_READOOB:
+			return "STATE_CMD_READOOB";
+		case STATE_CMD_READSTART:
+			return "STATE_CMD_READSTART";
+		case STATE_CMD_ERASE1:
+			return "STATE_CMD_ERASE1";
+		case STATE_CMD_STATUS:
+			return "STATE_CMD_STATUS";
+		case STATE_CMD_STATUS_M:
+			return "STATE_CMD_STATUS_M";
+		case STATE_CMD_SEQIN:
+			return "STATE_CMD_SEQIN";
+		case STATE_CMD_READID:
+			return "STATE_CMD_READID";
+		case STATE_CMD_ERASE2:
+			return "STATE_CMD_ERASE2";
+		case STATE_CMD_RESET:
+			return "STATE_CMD_RESET";
+		case STATE_ADDR_PAGE:
+			return "STATE_ADDR_PAGE";
+		case STATE_ADDR_SEC:
+			return "STATE_ADDR_SEC";
+		case STATE_ADDR_ZERO:
+			return "STATE_ADDR_ZERO";
+		case STATE_DATAIN:
+			return "STATE_DATAIN";
+		case STATE_DATAOUT:
+			return "STATE_DATAOUT";
+		case STATE_DATAOUT_ID:
+			return "STATE_DATAOUT_ID";
+		case STATE_DATAOUT_STATUS:
+			return "STATE_DATAOUT_STATUS";
+		case STATE_DATAOUT_STATUS_M:
+			return "STATE_DATAOUT_STATUS_M";
+		case STATE_READY:
+			return "STATE_READY";
+		case STATE_UNKNOWN:
+			return "STATE_UNKNOWN";
+	}
+
+	NS_ERR("get_state_name: unknown state, BUG\n");
+	return NULL;
+}
+
+/*
+ * Check if command is valid.
+ *
+ * RETURNS: 1 if wrong command, 0 if right.
+ */
+static int
+check_command(int cmd)
+{
+	switch (cmd) {
+		
+	case NAND_CMD_READ0:
+	case NAND_CMD_READSTART:
+	case NAND_CMD_PAGEPROG:
+	case NAND_CMD_READOOB:
+	case NAND_CMD_ERASE1:
+	case NAND_CMD_STATUS:
+	case NAND_CMD_SEQIN:
+	case NAND_CMD_READID:
+	case NAND_CMD_ERASE2:
+	case NAND_CMD_RESET:
+	case NAND_CMD_READ1:
+		return 0;
+		
+	case NAND_CMD_STATUS_MULTI:
+	default:
+		return 1;
+	}
+}
+
+/*
+ * Returns state after command is accepted by command number.
+ */
+static uint32_t
+get_state_by_command(unsigned command)
+{
+	switch (command) {
+		case NAND_CMD_READ0:
+			return STATE_CMD_READ0;
+		case NAND_CMD_READ1:
+			return STATE_CMD_READ1;
+		case NAND_CMD_PAGEPROG:
+			return STATE_CMD_PAGEPROG;
+		case NAND_CMD_READSTART:
+			return STATE_CMD_READSTART;
+		case NAND_CMD_READOOB:
+			return STATE_CMD_READOOB;
+		case NAND_CMD_ERASE1:
+			return STATE_CMD_ERASE1;
+		case NAND_CMD_STATUS:
+			return STATE_CMD_STATUS;
+		case NAND_CMD_STATUS_MULTI:
+			return STATE_CMD_STATUS_M;
+		case NAND_CMD_SEQIN:
+			return STATE_CMD_SEQIN;
+		case NAND_CMD_READID:
+			return STATE_CMD_READID;
+		case NAND_CMD_ERASE2:
+			return STATE_CMD_ERASE2;
+		case NAND_CMD_RESET:
+			return STATE_CMD_RESET;
+	}
+
+	NS_ERR("get_state_by_command: unknown command, BUG\n");
+	return 0;
+}
+
+/*
+ * Move an address byte to the correspondent internal register.
+ */
+static inline void
+accept_addr_byte(struct nandsim *ns, u_char bt)
+{
+	uint byte = (uint)bt;
+	
+	if (ns->regs.count < (ns->geom.pgaddrbytes - ns->geom.secaddrbytes))
+		ns->regs.column |= (byte << 8 * ns->regs.count);
+	else {
+		ns->regs.row |= (byte << 8 * (ns->regs.count -
+						ns->geom.pgaddrbytes +
+						ns->geom.secaddrbytes));
+	}
+
+	return;
+}
+		
+/*
+ * Switch to STATE_READY state.
+ */
+static inline void 
+switch_to_ready_state(struct nandsim *ns, u_char status)
+{
+	NS_DBG("switch_to_ready_state: switch to %s state\n", get_state_name(STATE_READY));
+
+	ns->state       = STATE_READY;
+	ns->nxstate     = STATE_UNKNOWN;
+	ns->op          = NULL;
+	ns->npstates    = 0;
+	ns->stateidx    = 0;
+	ns->regs.num    = 0;
+	ns->regs.count  = 0;
+	ns->regs.off    = 0;
+	ns->regs.row    = 0;
+	ns->regs.column = 0;
+	ns->regs.status = status;
+}
+
+/*
+ * If the operation isn't known yet, try to find it in the global array
+ * of supported operations.
+ *
+ * Operation can be unknown because of the following.
+ *   1. New command was accepted and this is the firs call to find the
+ *      correspondent states chain. In this case ns->npstates = 0;
+ *   2. There is several operations which begin with the same command(s)
+ *      (for example program from the second half and read from the
+ *      second half operations both begin with the READ1 command). In this
+ *      case the ns->pstates[] array contains previous states.
+ * 
+ * Thus, the function tries to find operation containing the following
+ * states (if the 'flag' parameter is 0):
+ *    ns->pstates[0], ... ns->pstates[ns->npstates], ns->state
+ *
+ * If (one and only one) matching operation is found, it is accepted (
+ * ns->ops, ns->state, ns->nxstate are initialized, ns->npstate is
+ * zeroed).
+ * 
+ * If there are several maches, the current state is pushed to the
+ * ns->pstates.
+ *
+ * The operation can be unknown only while commands are input to the chip.
+ * As soon as address command is accepted, the operation must be known.
+ * In such situation the function is called with 'flag' != 0, and the
+ * operation is searched using the following pattern:
+ *     ns->pstates[0], ... ns->pstates[ns->npstates], <address input>
+ * 
+ * It is supposed that this pattern must either match one operation on
+ * none. There can't be ambiguity in that case.
+ *
+ * If no matches found, the functions does the following:
+ *   1. if there are saved states present, try to ignore them and search
+ *      again only using the last command. If nothing was found, switch
+ *      to the STATE_READY state.
+ *   2. if there are no saved states, switch to the STATE_READY state.
+ *
+ * RETURNS: -2 - no matched operations found.
+ *          -1 - several matches.
+ *           0 - operation is found.
+ */
+static int
+find_operation(struct nandsim *ns, uint32_t flag)
+{
+	int opsfound = 0;
+	int i, j, idx = 0;
+	
+	for (i = 0; i < NS_OPER_NUM; i++) {
+
+		int found = 1;
+	
+		if (!(ns->options & ops[i].reqopts))
+			/* Ignore operations we can't perform */
+			continue;
+			
+		if (flag) {
+			if (!(ops[i].states[ns->npstates] & STATE_ADDR_MASK))
+				continue;
+		} else {
+			if (NS_STATE(ns->state) != NS_STATE(ops[i].states[ns->npstates]))
+				continue;
+		}
+
+		for (j = 0; j < ns->npstates; j++) 
+			if (NS_STATE(ops[i].states[j]) != NS_STATE(ns->pstates[j])
+				&& (ns->options & ops[idx].reqopts)) {
+				found = 0;
+				break;
+			}
+
+		if (found) {
+			idx = i;
+			opsfound += 1;
+		}
+	}
+
+	if (opsfound == 1) {
+		/* Exact match */
+		ns->op = &ops[idx].states[0];
+		if (flag) {
+			/* 
+			 * In this case the find_operation function was
+			 * called when address has just began input. But it isn't
+			 * yet fully input and the current state must
+			 * not be one of STATE_ADDR_*, but the STATE_ADDR_*
+			 * state must be the next state (ns->nxstate).
+			 */
+			ns->stateidx = ns->npstates - 1;
+		} else {
+			ns->stateidx = ns->npstates;
+		}
+		ns->npstates = 0;
+		ns->state = ns->op[ns->stateidx];
+		ns->nxstate = ns->op[ns->stateidx + 1];
+		NS_DBG("find_operation: operation found, index: %d, state: %s, nxstate %s\n",
+				idx, get_state_name(ns->state), get_state_name(ns->nxstate));
+		return 0;
+	}
+	
+	if (opsfound == 0) {
+		/* Nothing was found. Try to ignore previous commands (if any) and search again */
+		if (ns->npstates != 0) {
+			NS_DBG("find_operation: no operation found, try again with state %s\n",
+					get_state_name(ns->state));
+			ns->npstates = 0;
+			return find_operation(ns, 0);
+
+		}
+		NS_DBG("find_operation: no operations found\n");
+		switch_to_ready_state(ns, NS_STATUS_FAILED(ns));
+		return -2;
+	}
+	
+	if (flag) {
+		/* This shouldn't happen */
+		NS_DBG("find_operation: BUG, operation must be known if address is input\n");
+		return -2;
+	}
+	
+	NS_DBG("find_operation: there is still ambiguity\n");
+
+	ns->pstates[ns->npstates++] = ns->state;
+
+	return -1;
+}
+
+/*
+ * If state has any action bit, perform this action.
+ *
+ * RETURNS: 0 if success, -1 if error.
+ */
+static int
+do_state_action(struct nandsim *ns, uint32_t action)
+{
+	int i, num;
+	int busdiv = ns->busw == 8 ? 1 : 2;
+
+	action &= ACTION_MASK;
+	
+	/* Check that page address input is correct */
+	if (action != ACTION_SECERASE && ns->regs.row >= ns->geom.pgnum) {
+		NS_WARN("do_state_action: wrong page number (%#x)\n", ns->regs.row);
+		return -1;
+	}
+
+	switch (action) {
+
+	case ACTION_CPY:
+		/*
+		 * Copy page data to the internal buffer.
+		 */
+
+		/* Column shouldn't be very large */
+		if (ns->regs.column >= (ns->geom.pgszoob - ns->regs.off)) {
+			NS_ERR("do_state_action: column number is too large\n");
+			break;
+		}
+		num = ns->geom.pgszoob - ns->regs.off - ns->regs.column;
+		memcpy(ns->buf.byte, ns->mem.byte + NS_RAW_OFFSET(ns) + ns->regs.off, num);
+
+		NS_DBG("do_state_action: (ACTION_CPY:) copy %d bytes to int buf, raw offset %d\n",
+			num, NS_RAW_OFFSET(ns) + ns->regs.off);
+		
+		if (ns->regs.off == 0)
+			NS_LOG("read page %d\n", ns->regs.row);
+		else if (ns->regs.off < ns->geom.pgsz)
+			NS_LOG("read page %d (second half)\n", ns->regs.row);
+		else
+			NS_LOG("read OOB of page %d\n", ns->regs.row);
+		
+		NS_UDELAY(access_delay);
+		NS_UDELAY(input_cycle * ns->geom.pgsz / 1000 / busdiv);
+
+		break;
+
+	case ACTION_SECERASE:
+		/*
+		 * Erase sector.
+		 */
+		
+		if (ns->lines.wp) {
+			NS_ERR("do_state_action: device is write-protected, ignore sector erase\n");
+			return -1;
+		}
+		
+		if (ns->regs.row >= ns->geom.pgnum - ns->geom.pgsec
+			|| (ns->regs.row & ~(ns->geom.secsz - 1))) {
+			NS_ERR("do_state_action: wrong sector address (%#x)\n", ns->regs.row);
+			return -1;
+		}
+		
+		ns->regs.row = (ns->regs.row <<
+				8 * (ns->geom.pgaddrbytes - ns->geom.secaddrbytes)) | ns->regs.column;
+		ns->regs.column = 0;
+		
+		NS_DBG("do_state_action: erase sector at address %#x, off = %d\n",
+				ns->regs.row, NS_RAW_OFFSET(ns));
+		NS_LOG("erase sector %d\n", ns->regs.row >> (ns->geom.secshift - ns->geom.pgshift));
+
+		memset(ns->mem.byte + NS_RAW_OFFSET(ns), 0xFF, ns->geom.secszoob);
+		
+		NS_MDELAY(erase_delay);
+		
+		break;
+
+	case ACTION_PRGPAGE:
+		/*
+		 * Programm page - move internal buffer data to the page.
+		 */
+
+		if (ns->lines.wp) {
+			NS_WARN("do_state_action: device is write-protected, programm\n");
+			return -1;
+		}
+
+		num = ns->geom.pgszoob - ns->regs.off - ns->regs.column;
+		if (num != ns->regs.count) {
+			NS_ERR("do_state_action: too few bytes were input (%d instead of %d)\n",
+					ns->regs.count, num);
+			return -1;
+		}
+
+		for (i = 0; i < num; i++)
+			ns->mem.byte[NS_RAW_OFFSET(ns) + ns->regs.off + i] &= ns->buf.byte[i];
+
+		NS_DBG("do_state_action: copy %d bytes from int buf to (%#x, %#x), raw off = %d\n",
+			num, ns->regs.row, ns->regs.column, NS_RAW_OFFSET(ns) + ns->regs.off);
+		NS_LOG("programm page %d\n", ns->regs.row);
+		
+		NS_UDELAY(programm_delay);
+		NS_UDELAY(output_cycle * ns->geom.pgsz / 1000 / busdiv);
+		
+		break;
+	
+	case ACTION_ZEROOFF:
+		NS_DBG("do_state_action: set internal offset to 0\n");
+		ns->regs.off = 0;
+		break;
+
+	case ACTION_HALFOFF:
+		if (!(ns->options & OPT_PAGE512_8BIT)) {
+			NS_ERR("do_state_action: BUG! can't skip half of page for non-512"
+				"byte page size 8x chips\n");
+			return -1;
+		}
+		NS_DBG("do_state_action: set internal offset to %d\n", ns->geom.pgsz/2);
+		ns->regs.off = ns->geom.pgsz/2;
+		break;
+
+	case ACTION_OOBOFF:
+		NS_DBG("do_state_action: set internal offset to %d\n", ns->geom.pgsz);
+		ns->regs.off = ns->geom.pgsz;
+		break;
+		
+	default:
+		NS_DBG("do_state_action: BUG! unknown action\n");
+	}
+
+	return 0;
+}
+
+/*
+ * Switch simulator's state.
+ */
+static void
+switch_state(struct nandsim *ns)
+{
+	if (ns->op) {
+		/*
+		 * The current operation have already been identified.
+		 * Just follow the states chain.
+		 */
+		
+		ns->stateidx += 1;
+		ns->state = ns->nxstate;
+		ns->nxstate = ns->op[ns->stateidx + 1];
+
+		NS_DBG("switch_state: operation is known, switch to the next state, "
+			"state: %s, nxstate: %s\n",
+			get_state_name(ns->state), get_state_name(ns->nxstate));
+
+		/* See, whether we need to do some action */
+		if ((ns->state & ACTION_MASK) && do_state_action(ns, ns->state) < 0) {
+			switch_to_ready_state(ns, NS_STATUS_FAILED(ns));
+			return;
+		}
+		
+	} else {
+		/*
+		 * We don't yet know which operation we perform.
+		 * Try to identify it.
+		 */
+
+		/*  
+		 *  The only event causing the switch_state function to
+		 *  be called with yet unknown operation is new command.
+		 */
+		ns->state = get_state_by_command(ns->regs.command);
+
+		NS_DBG("switch_state: operation is unknown, try to find it\n");
+
+		if (find_operation(ns, 0) != 0)
+			return;
+
+		if ((ns->state & ACTION_MASK) && do_state_action(ns, ns->state) < 0) {
+			switch_to_ready_state(ns, NS_STATUS_FAILED(ns));
+			return;
+		}
+	}
+
+	/* For 16x devices column means the page offset in words */
+	if ((ns->nxstate & STATE_ADDR_MASK) && ns->busw == 16) {
+		NS_DBG("switch_state: double the column number for 16x device\n");
+		ns->regs.column <<= 1;
+	}
+
+	if (NS_STATE(ns->nxstate) == STATE_READY) {
+		/*
+		 * The current state is the last. Return to STATE_READY
+		 */
+
+		u_char status = NS_STATUS_OK(ns);
+		
+		/* In case of data states, see if all bytes were input/output */
+		if ((ns->state & (STATE_DATAIN_MASK | STATE_DATAOUT_MASK))
+			&& ns->regs.count != ns->regs.num) {
+			NS_WARN("switch_state: not all bytes were processed, %d left\n",
+					ns->regs.num - ns->regs.count);
+			status = NS_STATUS_FAILED(ns);
+		}
+				
+		NS_DBG("switch_state: operation complete, switch to STATE_READY state\n");
+
+		switch_to_ready_state(ns, status);
+
+		return;
+	} else if (ns->nxstate & (STATE_DATAIN_MASK | STATE_DATAOUT_MASK)) {
+		/* 
+		 * If the next state is data input/output, switch to it now
+		 */
+		
+		ns->state      = ns->nxstate;
+		ns->nxstate    = ns->op[++ns->stateidx + 1];
+		ns->regs.num   = ns->regs.count = 0;
+
+		NS_DBG("switch_state: the next state is data I/O, switch, "
+			"state: %s, nxstate: %s\n",
+			get_state_name(ns->state), get_state_name(ns->nxstate));
+
+		/*
+		 * Set the internal register to the count of bytes which
+		 * are expected to be input or output
+		 */
+		switch (NS_STATE(ns->state)) {
+			case STATE_DATAIN:
+			case STATE_DATAOUT:
+				ns->regs.num = ns->geom.pgszoob - ns->regs.off - ns->regs.column;
+				break;
+				
+			case STATE_DATAOUT_ID:
+				ns->regs.num = ns->geom.idbytes;
+				break;
+				
+			case STATE_DATAOUT_STATUS:
+			case STATE_DATAOUT_STATUS_M:
+				ns->regs.count = ns->regs.num = 0;
+				break;
+				
+			default:
+				NS_ERR("switch_state: BUG! unknown data state\n");
+		}
+
+	} else if (ns->nxstate & STATE_ADDR_MASK) {
+		/*
+		 * If the next state is address input, set the internal
+		 * register to the number of expected address bytes
+		 */
+
+		ns->regs.count = 0;
+		
+		switch (NS_STATE(ns->nxstate)) {
+			case STATE_ADDR_PAGE:
+				ns->regs.num = ns->geom.pgaddrbytes;
+		
+				break;
+			case STATE_ADDR_SEC:
+				ns->regs.num = ns->geom.secaddrbytes;
+				break;
+	
+			case STATE_ADDR_ZERO:
+				ns->regs.num = 1;
+				break;
+
+			default:
+				NS_ERR("switch_state: BUG! unknown address state\n");
+		}
+	} else {
+		/* 
+		 * Just reset internal counters.
+		 */
+
+		ns->regs.num = 0;
+		ns->regs.count = 0;
+	}
+}
+
+static void
+ns_hwcontrol(struct mtd_info *mtd, int cmd)
+{
+	struct nandsim *ns = (struct nandsim *)((struct nand_chip *)mtd->priv)->priv;
+
+	switch (cmd) {
+
+	/* set CLE line high */
+	case NAND_CTL_SETCLE:
+		NS_DBG("ns_hwcontrol: start command latch cycles\n");
+		ns->lines.cle  = 1;
+		break;
+
+	/* set CLE line low */
+	case NAND_CTL_CLRCLE:
+		NS_DBG("ns_hwcontrol: stop command latch cycles\n");
+		ns->lines.cle  = 0;
+		break;
+
+	/* set ALE line high */
+	case NAND_CTL_SETALE:
+		NS_DBG("ns_hwcontrol: start address latch cycles\n");
+		ns->lines.ale   = 1;
+		break;
+
+	/* set ALE line low */
+	case NAND_CTL_CLRALE:
+		NS_DBG("ns_hwcontrol: stop address latch cycles\n");
+		ns->lines.ale  = 0;
+		break;
+
+	/* set WP line high */
+	case NAND_CTL_SETWP:
+		NS_DBG("ns_hwcontrol: enable write protection\n");
+		ns->lines.wp = 1;
+		break;
+
+	/* set WP line low */
+	case NAND_CTL_CLRWP:
+		NS_DBG("ns_hwcontrol: disable write protection\n");
+		ns->lines.wp = 0;
+		break;
+
+	/* set CE line low */
+	case NAND_CTL_SETNCE:
+		NS_DBG("ns_hwcontrol: enable chip\n");
+		ns->lines.ce = 1;
+		break;
+
+	/* set CE line high */
+	case NAND_CTL_CLRNCE:
+		NS_DBG("ns_hwcontrol: disable chip\n");
+		ns->lines.ce = 0;
+		break;
+
+	default:
+		NS_ERR("hwcontrol: unknown command\n");
+        }
+
+	return;
+}
+
+static u_char
+ns_nand_read_byte(struct mtd_info *mtd)
+{
+        struct nandsim *ns = (struct nandsim *)((struct nand_chip *)mtd->priv)->priv;
+	u_char outb = 0x00;
+
+	/* Sanity and correctness checks */
+	if (!ns->lines.ce) {
+		NS_ERR("read_byte: chip is disabled, return %#x\n", (uint)outb);
+		return outb;
+	}
+	if (ns->lines.ale || ns->lines.cle) {
+		NS_ERR("read_byte: ALE or CLE pin is high, return %#x\n", (uint)outb);
+		return outb;
+	}
+	if (!(ns->state & STATE_DATAOUT_MASK)) {
+		NS_WARN("read_byte: unexpected data output cycle, state is %s "
+			"return %#x\n", get_state_name(ns->state), (uint)outb);
+		return outb;
+	}
+
+	/* Status register may be read as many times as it is wanted */
+	if (NS_STATE(ns->state) == STATE_DATAOUT_STATUS) {
+		NS_DBG("read_byte: return %#x status\n", ns->regs.status);
+		return ns->regs.status;
+	}
+
+	/* Check if there is any data in the internal buffer which may be read */
+	if (ns->regs.count == ns->regs.num) {
+		NS_WARN("read_byte: no more data to output, return %#x\n", (uint)outb);
+		return outb;
+	}
+
+	switch (NS_STATE(ns->state)) {
+		case STATE_DATAOUT:
+			if (ns->busw == 8) {
+				outb = ns->buf.byte[ns->regs.count];
+				ns->regs.count += 1;
+			} else {
+				outb = (u_char)cpu_to_le16(ns->buf.word[ns->regs.count >> 1]);
+				ns->regs.count += 2;
+			}
+			break;
+		case STATE_DATAOUT_ID:
+			NS_DBG("read_byte: read ID byte %d, total = %d\n", ns->regs.count, ns->regs.num);
+			outb = ns->ids[ns->regs.count];
+			ns->regs.count += 1;
+			break;
+		default:
+			BUG();
+	}
+	
+	if (ns->regs.count == ns->regs.num) {
+		NS_DBG("read_byte: all bytes were read\n");
+
+		/*
+		 * The OPT_AUTOINCR allows to read next conseqitive pages without
+		 * new read operation cycle.
+		 */
+		if ((ns->options & OPT_AUTOINCR) && NS_STATE(ns->state) == STATE_DATAOUT) {
+			ns->regs.count = 0;
+			if (ns->regs.row + 1 < ns->geom.pgnum)
+				ns->regs.row += 1;
+			NS_DBG("read_byte: switch to the next page (%#x)\n", ns->regs.row);
+			do_state_action(ns, ACTION_CPY);
+		}
+		else if (NS_STATE(ns->nxstate) == STATE_READY)
+			switch_state(ns);
+		
+	}
+	
+	return outb;
+}
+
+static void
+ns_nand_write_byte(struct mtd_info *mtd, u_char byte)
+{
+        struct nandsim *ns = (struct nandsim *)((struct nand_chip *)mtd->priv)->priv;
+	
+	/* Sanity and correctness checks */
+	if (!ns->lines.ce) {
+		NS_ERR("write_byte: chip is disabled, ignore write\n");
+		return;
+	}
+	if (ns->lines.ale && ns->lines.cle) {
+		NS_ERR("write_byte: ALE and CLE pins are high simultaneously, ignore write\n");
+		return;
+	}
+			
+	if (ns->lines.cle == 1) {
+		/*
+		 * The byte written is a command.
+		 */
+
+		if (byte == NAND_CMD_RESET) {
+			NS_LOG("reset chip\n");
+			switch_to_ready_state(ns, NS_STATUS_OK(ns));
+			return;
+		}
+
+		/* 
+		 * Chip might still be in STATE_DATAOUT
+		 * (if OPT_AUTOINCR feature is supported), STATE_DATAOUT_STATUS or
+		 * STATE_DATAOUT_STATUS_M state. If so, switch state.
+		 */
+		if (NS_STATE(ns->state) == STATE_DATAOUT_STATUS
+			|| NS_STATE(ns->state) == STATE_DATAOUT_STATUS_M
+			|| ((ns->options & OPT_AUTOINCR) && NS_STATE(ns->state) == STATE_DATAOUT))
+			switch_state(ns);
+
+		/* Check if chip is expecting command */
+		if (NS_STATE(ns->nxstate) != STATE_UNKNOWN && !(ns->nxstate & STATE_CMD_MASK)) {
+			/*
+			 * We are in situation when something else (not command)
+			 * was expected but command was input. In this case ignore
+			 * previous command(s)/state(s) and accept the last one.
+			 */
+			NS_WARN("write_byte: command (%#x) wasn't expected, expected state is %s, "
+				"ignore previous states\n", (uint)byte, get_state_name(ns->nxstate));
+			switch_to_ready_state(ns, NS_STATUS_FAILED(ns));
+		}
+		
+		/* Check that the command byte is correct */
+		if (check_command(byte)) {
+			NS_ERR("write_byte: unknown command %#x\n", (uint)byte);
+			return;
+		}
+		
+		NS_DBG("command byte corresponding to %s state accepted\n",
+			get_state_name(get_state_by_command(byte)));
+		ns->regs.command = byte;
+		switch_state(ns);
+
+	} else if (ns->lines.ale == 1) {
+		/*
+		 * The byte written is an address.
+		 */
+
+		if (NS_STATE(ns->nxstate) == STATE_UNKNOWN) {
+
+			NS_DBG("write_byte: operation isn't known yet, identify it\n");
+
+			if (find_operation(ns, 1) < 0)
+				return;
+			
+			if ((ns->state & ACTION_MASK) && do_state_action(ns, ns->state) < 0) {
+				switch_to_ready_state(ns, NS_STATUS_FAILED(ns));
+				return;
+			}
+				
+			ns->regs.count = 0;
+			switch (NS_STATE(ns->nxstate)) {
+				case STATE_ADDR_PAGE:
+					ns->regs.num = ns->geom.pgaddrbytes;
+					break;
+				case STATE_ADDR_SEC:
+					ns->regs.num = ns->geom.secaddrbytes;
+					break;
+				case STATE_ADDR_ZERO:
+					ns->regs.num = 1;
+					break;
+				default:
+					BUG();
+			}
+		}
+
+		/* Check that chip is expecting address */
+		if (!(ns->nxstate & STATE_ADDR_MASK)) {
+			NS_ERR("write_byte: address (%#x) isn't expected, expected state is %s, "
+				"switch to STATE_READY\n", (uint)byte, get_state_name(ns->nxstate));
+			switch_to_ready_state(ns, NS_STATUS_FAILED(ns));
+			return;
+		}
+		
+		/* Check if this is expected byte */
+		if (ns->regs.count == ns->regs.num) {
+			NS_ERR("write_byte: no more address bytes expected\n");
+			switch_to_ready_state(ns, NS_STATUS_FAILED(ns));
+			return;
+		}
+
+		accept_addr_byte(ns, byte);
+
+		ns->regs.count += 1;
+
+		NS_DBG("write_byte: address byte %#x was accepted (%d bytes input, %d expected)\n",
+				(uint)byte, ns->regs.count, ns->regs.num);
+
+		if (ns->regs.count == ns->regs.num) {
+			NS_DBG("address (%#x, %#x) is accepted\n", ns->regs.row, ns->regs.column);
+			switch_state(ns);
+		}
+		
+	} else {
+		/*
+		 * The byte written is an input data.
+		 */
+		
+		/* Check that chip is expecting data input */
+		if (!(ns->state & STATE_DATAIN_MASK)) {
+			NS_ERR("write_byte: data input (%#x) isn't expected, state is %s, "
+				"switch to %s\n", (uint)byte,
+				get_state_name(ns->state), get_state_name(STATE_READY));
+			switch_to_ready_state(ns, NS_STATUS_FAILED(ns));
+			return;
+		}
+
+		/* Check if this is expected byte */
+		if (ns->regs.count == ns->regs.num) {
+			NS_WARN("write_byte: %u input bytes has already been accepted, ignore write\n",
+					ns->regs.num);
+			return;
+		}
+
+		if (ns->busw == 8) {
+			ns->buf.byte[ns->regs.count] = byte;
+			ns->regs.count += 1;
+		} else {
+			ns->buf.word[ns->regs.count >> 1] = cpu_to_le16((uint16_t)byte);
+			ns->regs.count += 2;
+		}
+	}
+
+	return;
+}
+
+static int
+ns_device_ready(struct mtd_info *mtd)
+{
+	NS_DBG("device_ready\n");
+	return 1;
+}
+
+static uint16_t
+ns_nand_read_word(struct mtd_info *mtd)
+{
+	struct nand_chip *chip = (struct nand_chip *)mtd->priv;
+
+	NS_DBG("read_word\n");
+	
+	return chip->read_byte(mtd) | (chip->read_byte(mtd) << 8);
+}
+
+static void
+ns_nand_write_word(struct mtd_info *mtd, uint16_t word)
+{
+	struct nand_chip *chip = (struct nand_chip *)mtd->priv;
+	
+	NS_DBG("write_word\n");
+	
+	chip->write_byte(mtd, word & 0xFF);
+	chip->write_byte(mtd, word >> 8);
+}
+
+static void 
+ns_nand_write_buf(struct mtd_info *mtd, const u_char *buf, int len)
+{
+        struct nandsim *ns = (struct nandsim *)((struct nand_chip *)mtd->priv)->priv;
+
+	/* Check that chip is expecting data input */
+	if (!(ns->state & STATE_DATAIN_MASK)) {
+		NS_ERR("write_buf: data input isn't expected, state is %s, "
+			"switch to STATE_READY\n", get_state_name(ns->state));
+		switch_to_ready_state(ns, NS_STATUS_FAILED(ns));
+		return;
+	}
+
+	/* Check if these are expected bytes */
+	if (ns->regs.count + len > ns->regs.num) {
+		NS_ERR("write_buf: too many input bytes\n");
+		switch_to_ready_state(ns, NS_STATUS_FAILED(ns));
+		return;
+	}
+
+	memcpy(ns->buf.byte + ns->regs.count, buf, len);
+	ns->regs.count += len;
+	
+	if (ns->regs.count == ns->regs.num) {
+		NS_DBG("write_buf: %d bytes were written\n", ns->regs.count);
+	}
+}
+
+static void 
+ns_nand_read_buf(struct mtd_info *mtd, u_char *buf, int len)
+{
+        struct nandsim *ns = (struct nandsim *)((struct nand_chip *)mtd->priv)->priv;
+
+	/* Sanity and correctness checks */
+	if (!ns->lines.ce) {
+		NS_ERR("read_buf: chip is disabled\n");
+		return;
+	}
+	if (ns->lines.ale || ns->lines.cle) {
+		NS_ERR("read_buf: ALE or CLE pin is high\n");
+		return;
+	}
+	if (!(ns->state & STATE_DATAOUT_MASK)) {
+		NS_WARN("read_buf: unexpected data output cycle, current state is %s\n",
+			get_state_name(ns->state));
+		return;
+	}
+
+	if (NS_STATE(ns->state) != STATE_DATAOUT) {
+		int i;
+
+		for (i = 0; i < len; i++)
+			buf[i] = ((struct nand_chip *)mtd->priv)->read_byte(mtd);
+
+		return;
+	}
+
+	/* Check if these are expected bytes */
+	if (ns->regs.count + len > ns->regs.num) {
+		NS_ERR("read_buf: too many bytes to read\n");
+		switch_to_ready_state(ns, NS_STATUS_FAILED(ns));
+		return;
+	}
+
+	memcpy(buf, ns->buf.byte + ns->regs.count, len);
+	ns->regs.count += len;
+	
+	if (ns->regs.count == ns->regs.num) {
+		if ((ns->options & OPT_AUTOINCR) && NS_STATE(ns->state) == STATE_DATAOUT) {
+			ns->regs.count = 0;
+			if (ns->regs.row + 1 < ns->geom.pgnum)
+				ns->regs.row += 1;
+			NS_DBG("read_buf: switch to the next page (%#x)\n", ns->regs.row);
+			do_state_action(ns, ACTION_CPY);
+		}
+		else if (NS_STATE(ns->nxstate) == STATE_READY)
+			switch_state(ns);
+	}
+	
+	return;
+}
+
+static int 
+ns_nand_verify_buf(struct mtd_info *mtd, const u_char *buf, int len)
+{
+	ns_nand_read_buf(mtd, (u_char *)&ns_verify_buf[0], len);
+
+	if (!memcmp(buf, &ns_verify_buf[0], len)) {
+		NS_DBG("verify_buf: the buffer is OK\n");
+		return 0;
+	} else {
+		NS_DBG("verify_buf: the buffer is wrong\n");
+		return -EFAULT;
+	}
+}
+
+/*
+ * Having only NAND chip IDs we call nand_scan which detects NAND flash
+ * parameters and then calls scan_bbt in order to scan/find/build the
+ * NAND flash bad block table. But since at that moment the NAND flash
+ * image isn't allocated in the simulator, errors arise. To avoid this
+ * we redefine the scan_bbt callback and initialize the nandsim structure
+ * before the flash media scanning.
+ */
+int ns_scan_bbt(struct mtd_info *mtd)
+{ 
+	struct nand_chip *chip = (struct nand_chip *)mtd->priv;
+	struct nandsim   *ns   = (struct nandsim *)(chip->priv);
+	int retval;
+
+	if (!NS_IS_INITIALIZED(ns))
+		if ((retval = init_nandsim(mtd)) != 0) {
+			NS_ERR("scan_bbt: can't initialize the nandsim structure\n");
+			return retval;
+		}
+	if ((retval = nand_default_bbt(mtd)) != 0) {
+		free_nandsim(ns);
+		return retval;
+	}
+
+	return 0;
+}
+
+/*
+ * Module initialization function
+ */
+int __init ns_init_module(void)
+{
+	struct nand_chip *chip;
+	struct nandsim *nand;
+	int retval = -ENOMEM;
+
+	if (bus_width != 8 && bus_width != 16) {
+		NS_ERR("wrong bus width (%d), use only 8 or 16\n", bus_width);
+		return -EINVAL;
+	}
+	
+	/* Allocate and initialize mtd_info, nand_chip and nandsim structures */
+	nsmtd = kmalloc(sizeof(struct mtd_info) + sizeof(struct nand_chip)
+				+ sizeof(struct nandsim), GFP_KERNEL);
+	if (!nsmtd) {
+		NS_ERR("unable to allocate core structures.\n");
+		return -ENOMEM;
+	}
+	memset(nsmtd, 0, sizeof(struct mtd_info) + sizeof(struct nand_chip) +
+			sizeof(struct nandsim));
+	chip        = (struct nand_chip *)(nsmtd + 1);
+        nsmtd->priv = (void *)chip;
+	nand        = (struct nandsim *)(chip + 1);
+	chip->priv  = (void *)nand;	
+
+	/*
+	 * Register simulator's callbacks.
+	 */
+	chip->hwcontrol  = ns_hwcontrol;
+	chip->read_byte  = ns_nand_read_byte;
+	chip->dev_ready  = ns_device_ready;
+	chip->scan_bbt   = ns_scan_bbt;
+	chip->write_byte = ns_nand_write_byte;
+	chip->write_buf  = ns_nand_write_buf;
+	chip->read_buf   = ns_nand_read_buf;
+	chip->verify_buf = ns_nand_verify_buf;
+	chip->write_word = ns_nand_write_word;
+	chip->read_word  = ns_nand_read_word;
+	chip->eccmode    = NAND_ECC_SOFT;
+
+	/* 
+	 * Perform minimum nandsim structure initialization to handle
+	 * the initial ID read command correctly 
+	 */
+	if (third_id_byte != 0xFF || fourth_id_byte != 0xFF)
+		nand->geom.idbytes = 4;
+	else
+		nand->geom.idbytes = 2;
+	nand->regs.status = NS_STATUS_OK(nand);
+	nand->nxstate = STATE_UNKNOWN;
+	nand->options |= OPT_PAGE256; /* temporary value */
+	nand->ids[0] = first_id_byte;
+	nand->ids[1] = second_id_byte;
+	nand->ids[2] = third_id_byte;
+	nand->ids[3] = fourth_id_byte;
+	if (bus_width == 16) {
+		nand->busw = 16;
+		chip->options |= NAND_BUSWIDTH_16;
+	}
+
+	if ((retval = nand_scan(nsmtd, 1)) != 0) {
+		NS_ERR("can't register NAND Simulator\n");
+		if (retval > 0)
+			retval = -ENXIO;
+		goto error;
+	}
+
+	/* Register NAND as one big partition */
+	add_mtd_partitions(nsmtd, &nand->part, 1);
+
+        return 0;
+
+error:
+	kfree(nsmtd);
+
+	return retval;
+}
+
+module_init(ns_init_module);
+
+/*
+ * Module clean-up function
+ */
+static void __exit ns_cleanup_module(void)
+{
+	struct nandsim *ns = (struct nandsim *)(((struct nand_chip *)nsmtd->priv)->priv);
+
+	free_nandsim(ns);    /* Free nandsim private resources */
+	nand_release(nsmtd); /* Unregisterd drived */
+	kfree(nsmtd);        /* Free other structures */
+}
+
+module_exit(ns_cleanup_module);
+
+MODULE_LICENSE ("GPL");
+MODULE_AUTHOR ("Artem B. Bityuckiy");
+MODULE_DESCRIPTION ("The NAND flash simulator");
+
diff -Nru a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c
--- a/drivers/mtd/nand/s3c2410.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/mtd/nand/s3c2410.c	2005-01-10 20:11:20 -08:00
@@ -11,7 +11,7 @@
  *	28-Sep-2004  BJD  Fixed ECC placement for Hardware mode
  *	12-Oct-2004  BJD  Fixed errors in use of platform data
  *
- * $Id: s3c2410.c,v 1.5 2004/10/12 10:10:15 bjd Exp $
+ * $Id: s3c2410.c,v 1.7 2005/01/05 18:05:14 dwmw2 Exp $
  *
  * 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
@@ -117,12 +117,12 @@
 
 static struct s3c2410_nand_info *to_nand_info(struct device *dev)
 {
-	return (struct s3c2410_nand_info *)dev_get_drvdata(dev);
+	return dev_get_drvdata(dev);
 }
 
 static struct s3c2410_platform_nand *to_nand_plat(struct device *dev)
 {
-	return (struct s3c2410_platform_nand *)dev->platform_data;
+	return dev->platform_data;
 }
 
 /* timing calculations */
@@ -167,7 +167,7 @@
 	if (plat != NULL) {
 		tacls = s3c2410_nand_calc_rate(plat->tacls, clkrate, 8);
 		twrph0 = s3c2410_nand_calc_rate(plat->twrph0, clkrate, 8);
-		twrph1 = s3c2410_nand_calc_rate(plat->twrph0, clkrate, 8);
+		twrph1 = s3c2410_nand_calc_rate(plat->twrph1, clkrate, 8);
 	} else {
 		/* default timings */
 		tacls = 8;
@@ -205,7 +205,7 @@
 	struct nand_chip *this = mtd->priv;
 	unsigned long cur;
 
-	nmtd = (struct s3c2410_nand_mtd *)this->priv;
+	nmtd = this->priv;
 	info = nmtd->info;
 
 	cur = readl(info->regs + S3C2410_NFCONF);
@@ -424,14 +424,14 @@
 
 static void s3c2410_nand_read_buf(struct mtd_info *mtd, u_char *buf, int len)
 {
-	struct nand_chip *this = (struct nand_chip *)mtd->priv;
+	struct nand_chip *this = mtd->priv;
 	readsb(this->IO_ADDR_R, buf, len);
 }
 
 static void s3c2410_nand_write_buf(struct mtd_info *mtd,
 				   const u_char *buf, int len)
 {
-	struct nand_chip *this = (struct nand_chip *)mtd->priv;
+	struct nand_chip *this = mtd->priv;
 	writesb(this->IO_ADDR_W, buf, len);
 }
 
diff -Nru a/drivers/mtd/nand/sharpsl.c b/drivers/mtd/nand/sharpsl.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/mtd/nand/sharpsl.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,260 @@
+/*
+ * drivers/mtd/nand/sharpsl.c
+ *
+ *  Copyright (C) 2004 Richard Purdie
+ *
+ *  $Id: sharpsl.c,v 1.3 2005/01/03 14:53:50 rpurdie Exp $
+ *
+ *  Based on Sharp's NAND driver sharp_sl.c
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+
+#include <linux/genhd.h>
+#include <linux/slab.h>
+#include <linux/module.h>
+#include <linux/delay.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/nand.h>
+#include <linux/mtd/nand_ecc.h>
+#include <linux/mtd/partitions.h>
+#include <linux/interrupt.h>
+#include <asm/io.h>
+#include <asm/hardware.h>
+#include <asm/mach-types.h>
+
+static void __iomem *sharpsl_io_base;
+static int sharpsl_phys_base = 0x0C000000;
+
+/* register offset */
+#define ECCLPLB	 	sharpsl_io_base+0x00	/* line parity 7 - 0 bit */
+#define ECCLPUB	 	sharpsl_io_base+0x04	/* line parity 15 - 8 bit */
+#define ECCCP	   	sharpsl_io_base+0x08	/* column parity 5 - 0 bit */
+#define ECCCNTR	 	sharpsl_io_base+0x0C	/* ECC byte counter */
+#define ECCCLRR	 	sharpsl_io_base+0x10	/* cleare ECC */
+#define FLASHIO	 	sharpsl_io_base+0x14	/* Flash I/O */
+#define FLASHCTL	sharpsl_io_base+0x18	/* Flash Control */
+
+/* Flash control bit */
+#define FLRYBY		(1 << 5)
+#define FLCE1		(1 << 4)
+#define FLWP		(1 << 3)
+#define FLALE		(1 << 2)
+#define FLCLE		(1 << 1)
+#define FLCE0		(1 << 0)
+
+
+/*
+ * MTD structure for SharpSL
+ */
+static struct mtd_info *sharpsl_mtd = NULL;
+
+/*
+ * Define partitions for flash device
+ */
+#define DEFAULT_NUM_PARTITIONS 3
+
+static int nr_partitions;
+static struct mtd_partition sharpsl_nand_default_partition_info[] = {
+	{
+	.name = "System Area",
+	.offset = 0,
+	.size = 7 * 1024 * 1024,
+	},
+	{
+	.name = "Root Filesystem",
+	.offset = 7 * 1024 * 1024,
+	.size = 30 * 1024 * 1024,
+	},
+	{
+	.name = "Home Filesystem",
+	.offset = MTDPART_OFS_APPEND ,
+	.size = MTDPART_SIZ_FULL ,
+	},
+};
+
+/* 
+ *	hardware specific access to control-lines
+ */
+static void
+sharpsl_nand_hwcontrol(struct mtd_info* mtd, int cmd)
+{
+	switch (cmd) {
+	case NAND_CTL_SETCLE: 
+		writeb(readb(FLASHCTL) | FLCLE, FLASHCTL);
+		break;
+	case NAND_CTL_CLRCLE:
+		writeb(readb(FLASHCTL) & ~FLCLE, FLASHCTL);
+		break;
+
+	case NAND_CTL_SETALE:
+		writeb(readb(FLASHCTL) | FLALE, FLASHCTL);
+		break;
+	case NAND_CTL_CLRALE:
+		writeb(readb(FLASHCTL) & ~FLALE, FLASHCTL);
+		break;
+
+	case NAND_CTL_SETNCE: 
+		writeb(readb(FLASHCTL) & ~(FLCE0|FLCE1), FLASHCTL);
+		break;
+	case NAND_CTL_CLRNCE: 
+		writeb(readb(FLASHCTL) | (FLCE0|FLCE1), FLASHCTL);
+		break;
+	}
+}
+
+static uint8_t scan_ff_pattern[] = { 0xff, 0xff };
+
+static struct nand_bbt_descr sharpsl_bbt = {
+	.options = 0,
+	.offs = 4,
+	.len = 2,
+	.pattern = scan_ff_pattern
+};
+
+static int
+sharpsl_nand_dev_ready(struct mtd_info* mtd)
+{
+	return !((readb(FLASHCTL) & FLRYBY) == 0);
+}
+
+static void
+sharpsl_nand_enable_hwecc(struct mtd_info* mtd, int mode)
+{
+	writeb(0 ,ECCCLRR);
+}
+
+static int
+sharpsl_nand_calculate_ecc(struct mtd_info* mtd, const u_char* dat,
+				u_char* ecc_code)
+{
+	ecc_code[0] = ~readb(ECCLPUB);
+	ecc_code[1] = ~readb(ECCLPLB);
+	ecc_code[2] = (~readb(ECCCP) << 2) | 0x03;
+	return readb(ECCCNTR) != 0;
+}
+
+
+#ifdef CONFIG_MTD_PARTITIONS
+const char *part_probes[] = { "cmdlinepart", NULL };
+#endif
+
+
+/*
+ * Main initialization routine
+ */
+int __init
+sharpsl_nand_init(void)
+{
+	struct nand_chip *this;
+	struct mtd_partition* sharpsl_partition_info;
+	int err = 0;
+
+	/* Allocate memory for MTD device structure and private data */
+	sharpsl_mtd = kmalloc(sizeof(struct mtd_info) + sizeof(struct nand_chip),
+				GFP_KERNEL);
+	if (!sharpsl_mtd) {
+		printk ("Unable to allocate SharpSL NAND MTD device structure.\n");
+		return -ENOMEM;
+	}
+	
+	/* map physical adress */
+	sharpsl_io_base = ioremap(sharpsl_phys_base, 0x1000);
+	if(!sharpsl_io_base){
+		printk("ioremap to access Sharp SL NAND chip failed\n");
+		kfree(sharpsl_mtd);
+		return -EIO;
+	}
+	
+	/* Get pointer to private data */
+	this = (struct nand_chip *) (&sharpsl_mtd[1]);
+
+	/* Initialize structures */
+	memset((char *) sharpsl_mtd, 0, sizeof(struct mtd_info));
+	memset((char *) this, 0, sizeof(struct nand_chip));
+
+	/* Link the private data with the MTD structure */
+	sharpsl_mtd->priv = this;
+
+	/*
+	 * PXA initialize
+	 */
+	writeb(readb(FLASHCTL) | FLWP, FLASHCTL);
+
+	/* Set address of NAND IO lines */
+	this->IO_ADDR_R = FLASHIO;
+	this->IO_ADDR_W = FLASHIO;
+	/* Set address of hardware control function */
+	this->hwcontrol = sharpsl_nand_hwcontrol;
+	this->dev_ready = sharpsl_nand_dev_ready;
+	/* 15 us command delay time */
+	this->chip_delay = 15;
+	/* set eccmode using hardware ECC */
+	this->eccmode = NAND_ECC_HW3_256;
+	this->enable_hwecc = sharpsl_nand_enable_hwecc;
+	this->calculate_ecc = sharpsl_nand_calculate_ecc;
+	this->correct_data = nand_correct_data;
+	this->badblock_pattern = &sharpsl_bbt;
+
+	/* Scan to find existence of the device */
+	err=nand_scan(sharpsl_mtd,1);
+	if (err) {
+		iounmap(sharpsl_io_base);
+		kfree(sharpsl_mtd);
+		return err;
+	}
+
+	/* Register the partitions */
+	sharpsl_mtd->name = "sharpsl-nand";
+	nr_partitions = parse_mtd_partitions(sharpsl_mtd, part_probes,
+						&sharpsl_partition_info, 0);
+						 
+	if (nr_partitions <= 0) {
+		nr_partitions = DEFAULT_NUM_PARTITIONS;
+		sharpsl_partition_info = sharpsl_nand_default_partition_info;
+		if (machine_is_poodle()) {
+			sharpsl_partition_info[1].size=22 * 1024 * 1024;
+		} else if (machine_is_corgi() || machine_is_shepherd()) {
+			sharpsl_partition_info[1].size=25 * 1024 * 1024;
+		} else if (machine_is_husky()) {
+			sharpsl_partition_info[1].size=53 * 1024 * 1024;
+		} 		
+	}
+
+	if (machine_is_husky()) {
+		/* Need to use small eraseblock size for backward compatibility */
+		sharpsl_mtd->flags |= MTD_NO_VIRTBLOCKS;
+	}
+
+	add_mtd_partitions(sharpsl_mtd, sharpsl_partition_info, nr_partitions);
+
+	/* Return happy */
+	return 0;
+}
+module_init(sharpsl_nand_init);
+
+/*
+ * Clean up routine
+ */
+#ifdef MODULE
+static void __exit sharpsl_nand_cleanup(void)
+{
+	struct nand_chip *this = (struct nand_chip *) &sharpsl_mtd[1];
+
+	/* Release resources, unregister device */
+	nand_release(sharpsl_mtd);
+
+	iounmap(sharpsl_io_base);
+
+	/* Free the MTD device structure */
+	kfree(sharpsl_mtd);
+}
+module_exit(sharpsl_nand_cleanup);
+#endif
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Richard Purdie <rpurdie@rpsys.net>");
+MODULE_DESCRIPTION("Device specific logic for NAND flash on Sharp SL-C7xx Series");
diff -Nru a/drivers/mtd/nftlmount.c b/drivers/mtd/nftlmount.c
--- a/drivers/mtd/nftlmount.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/mtd/nftlmount.c	2005-01-10 20:11:20 -08:00
@@ -4,7 +4,7 @@
  * Author: Fabrice Bellard (fabrice.bellard@netgem.com) 
  * Copyright (C) 2000 Netgem S.A.
  *
- * $Id: nftlmount.c,v 1.39 2004/11/05 22:51:41 kalev Exp $
+ * $Id: nftlmount.c,v 1.40 2004/11/22 14:38:29 kalev Exp $
  *
  * 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
@@ -31,7 +31,7 @@
 
 #define SECTORSIZE 512
 
-char nftlmountrev[]="$Revision: 1.39 $";
+char nftlmountrev[]="$Revision: 1.40 $";
 
 /* find_boot_record: Find the NFTL Media Header and its Spare copy which contains the
  *	various device information of the NFTL partition and Bad Unit Table. Update
@@ -302,8 +302,6 @@
 	struct nftl_uci1 uci;
 	struct erase_info *instr = &nftl->instr;
 
-	instr->mtd = nftl->mbd.mtd;
-
 	/* Read the Unit Control Information #1 for Wear-Leveling */
 	if (MTD_READOOB(nftl->mbd.mtd, block * nftl->EraseSize + SECTORSIZE + 8,
 			8, &retlen, (char *)&uci) < 0)
@@ -320,6 +318,7 @@
 	memset(instr, 0, sizeof(struct erase_info));
 
 	/* XXX: use async erase interface, XXX: test return code */
+	instr->mtd = nftl->mbd.mtd;
 	instr->addr = block * nftl->EraseSize;
 	instr->len = nftl->EraseSize;
 	MTD_ERASE(nftl->mbd.mtd, instr);
diff -Nru a/drivers/mtd/redboot.c b/drivers/mtd/redboot.c
--- a/drivers/mtd/redboot.c	2005-01-10 20:11:24 -08:00
+++ b/drivers/mtd/redboot.c	2005-01-10 20:11:24 -08:00
@@ -1,5 +1,5 @@
 /*
- * $Id: redboot.c,v 1.15 2004/08/10 07:55:16 dwmw2 Exp $
+ * $Id: redboot.c,v 1.17 2004/11/22 11:33:56 ijc Exp $
  *
  * Parse RedBoot-style Flash Image System (FIS) tables and
  * produce a Linux partition array to match.
@@ -30,6 +30,9 @@
 	struct fis_list *next;
 };
 
+static int directory = CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK;
+module_param(directory, int, 0);
+
 static inline int redboot_checksum(struct fis_image_desc *img)
 {
 	/* RedBoot doesn't actually write the desc_cksum field yet AFAICT */
@@ -50,6 +53,8 @@
 	char *nullname;
 	int namelen = 0;
 	int nulllen = 0;
+	int numslots;
+	unsigned long offset;
 #ifdef CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED
 	static char nullstring[] = "unallocated";
 #endif
@@ -59,8 +64,15 @@
 	if (!buf)
 		return -ENOMEM;
 
-	/* Read the start of the last erase block */
-	ret = master->read(master, master->size - master->erasesize,
+	if ( directory < 0 )
+		offset = master->size + directory*master->erasesize;
+	else
+		offset = directory*master->erasesize;
+
+	printk(KERN_NOTICE "Searching for RedBoot partition table in %s at offset 0x%lx\n",
+	       master->name, offset);
+
+	ret = master->read(master, offset,
 			   master->erasesize, &retlen, (void *)buf);
 
 	if (ret)
@@ -71,12 +83,16 @@
 		goto out;
 	}
 
-	/* RedBoot image could appear in any of the first three slots */
-	for (i = 0; i < 3; i++) {
-		if (!memcmp(buf[i].name, "RedBoot", 8))
+	numslots = (master->erasesize / sizeof(struct fis_image_desc));
+	for (i = 0; i < numslots; i++) {
+		if (buf[i].name[0] == 0xff) {
+			i = numslots;
+			break;
+		}
+		if (!memcmp(buf[i].name, "FIS directory", 14))
 			break;
 	}
-	if (i == 3) {
+	if (i == numslots) {
 		/* Didn't find it */
 		printk(KERN_NOTICE "No RedBoot partition table detected in %s\n",
 		       master->name);
@@ -84,7 +100,7 @@
 		goto out;
 	}
 
-	for (i = 0; i < master->erasesize / sizeof(struct fis_image_desc); i++) {
+	for (i = 0; i < numslots; i++) {
 		struct fis_list *new_fl, **prev;
 
 		if (buf[i].name[0] == 0xff)
diff -Nru a/drivers/net/3c501.c b/drivers/net/3c501.c
--- a/drivers/net/3c501.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/net/3c501.c	2005-01-10 20:11:15 -08:00
@@ -892,8 +892,8 @@
 
 static struct net_device *dev_3c501;
 
-MODULE_PARM(io, "i");
-MODULE_PARM(irq, "i");
+module_param(io, int, 0);
+module_param(irq, int, 0);
 MODULE_PARM_DESC(io, "EtherLink I/O base address");
 MODULE_PARM_DESC(irq, "EtherLink IRQ number");
 
diff -Nru a/drivers/net/3c503.c b/drivers/net/3c503.c
--- a/drivers/net/3c503.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/net/3c503.c	2005-01-10 20:11:21 -08:00
@@ -673,9 +673,9 @@
 static int io[MAX_EL2_CARDS];
 static int irq[MAX_EL2_CARDS];
 static int xcvr[MAX_EL2_CARDS];	/* choose int. or ext. xcvr */
-MODULE_PARM(io, "1-" __MODULE_STRING(MAX_EL2_CARDS) "i");
-MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_EL2_CARDS) "i");
-MODULE_PARM(xcvr, "1-" __MODULE_STRING(MAX_EL2_CARDS) "i");
+module_param_array(io, int, NULL, 0);
+module_param_array(irq, int, NULL, 0);
+module_param_array(xcvr, int, NULL, 0);
 MODULE_PARM_DESC(io, "I/O base address(es)");
 MODULE_PARM_DESC(irq, "IRQ number(s) (assigned)");
 MODULE_PARM_DESC(xcvr, "transceiver(s) (0=internal, 1=external)");
diff -Nru a/drivers/net/3c505.c b/drivers/net/3c505.c
--- a/drivers/net/3c505.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/net/3c505.c	2005-01-10 20:11:23 -08:00
@@ -228,16 +228,6 @@
 	outb(val, base_addr + PORT_COMMAND);
 }
 
-static inline unsigned int inw_data(unsigned int base_addr)
-{
-	return inw(base_addr + PORT_DATA);
-}
-
-static inline void outw_data(unsigned int val, unsigned int base_addr)
-{
-	outw(val, base_addr + PORT_DATA);
-}
-
 static inline unsigned int backlog_next(unsigned int n)
 {
 	return (n + 1) % BACKLOG_SIZE;
@@ -1638,9 +1628,9 @@
 static int io[ELP_MAX_CARDS];
 static int irq[ELP_MAX_CARDS];
 static int dma[ELP_MAX_CARDS];
-MODULE_PARM(io, "1-" __MODULE_STRING(ELP_MAX_CARDS) "i");
-MODULE_PARM(irq, "1-" __MODULE_STRING(ELP_MAX_CARDS) "i");
-MODULE_PARM(dma, "1-" __MODULE_STRING(ELP_MAX_CARDS) "i");
+module_param_array(io, int, NULL, 0);
+module_param_array(irq, int, NULL, 0);
+module_param_array(dma, int, NULL, 0);
 MODULE_PARM_DESC(io, "EtherLink Plus I/O base address(es)");
 MODULE_PARM_DESC(irq, "EtherLink Plus IRQ number(s) (assigned)");
 MODULE_PARM_DESC(dma, "EtherLink Plus DMA channel(s)");
diff -Nru a/drivers/net/3c507.c b/drivers/net/3c507.c
--- a/drivers/net/3c507.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/net/3c507.c	2005-01-10 20:11:21 -08:00
@@ -127,6 +127,7 @@
 	ushort tx_reap;
 	ushort tx_pkts_in_ring;
 	spinlock_t lock;
+	void __iomem *base;
 };
 
 /*
@@ -348,6 +349,7 @@
 	return dev;
 out1:
 	free_irq(dev->irq, dev);
+	iounmap(((struct net_local *)netdev_priv(dev))->base);
 	release_region(dev->base_addr, EL16_IO_EXTENT);
 out:
 	free_netdev(dev);
@@ -395,7 +397,7 @@
 
 	irqval = request_irq(irq, &el16_interrupt, 0, DRV_NAME, dev);
 	if (irqval) {
-		printk ("unable to get IRQ %d (irqval=%d).\n", irq, irqval);
+		printk(KERN_ERR "3c507: unable to get IRQ %d (irqval=%d).\n", irq, irqval);
 		retval = -EAGAIN;
 		goto out;
 	}
@@ -445,6 +447,12 @@
 	lp = netdev_priv(dev);
  	memset(lp, 0, sizeof(*lp));
 	spin_lock_init(&lp->lock);
+	lp->base = ioremap(dev->mem_start, RX_BUF_END);
+	if (!lp->base) {
+		printk(KERN_ERR "3c507: unable to remap memory\n");
+		retval = -EAGAIN;
+		goto out1;
+	}
 
  	dev->open = el16_open;
  	dev->stop = el16_close;
@@ -455,6 +463,8 @@
 	dev->ethtool_ops = &netdev_ethtool_ops;
  	dev->flags &= ~IFF_MULTICAST;	/* Multicast doesn't work */
 	return 0;
+out1:
+	free_irq(dev->irq, dev);
 out:
 	release_region(ioaddr, EL16_IO_EXTENT);
 	return retval;
@@ -474,11 +484,11 @@
 {
 	struct net_local *lp = netdev_priv(dev);
 	int ioaddr = dev->base_addr;
-	unsigned long shmem = dev->mem_start;
+	void __iomem *shmem = lp->base;
 
 	if (net_debug > 1)
 		printk ("%s: transmit timed out, %s?  ", dev->name,
-			isa_readw (shmem + iSCB_STATUS) & 0x8000 ? "IRQ conflict" :
+			readw(shmem + iSCB_STATUS) & 0x8000 ? "IRQ conflict" :
 			"network cable problem");
 	/* Try to restart the adaptor. */
 	if (lp->last_restart == lp->stats.tx_packets) {
@@ -491,7 +501,7 @@
 		/* Issue the channel attention signal and hope it "gets better". */
 		if (net_debug > 1)
 			printk ("Kicking board.\n");
-		isa_writew (0xf000 | CUC_START | RX_START, shmem + iSCB_CMD);
+		writew(0xf000 | CUC_START | RX_START, shmem + iSCB_CMD);
 		outb (0, ioaddr + SIGNAL_CA);	/* Issue channel-attn. */
 		lp->last_restart = lp->stats.tx_packets;
 	}
@@ -539,7 +549,7 @@
 	struct net_local *lp;
 	int ioaddr, status, boguscount = 0;
 	ushort ack_cmd = 0;
-	unsigned long shmem;
+	void __iomem *shmem;
 
 	if (dev == NULL) {
 		printk ("net_interrupt(): irq %d for unknown device.\n", irq);
@@ -548,11 +558,11 @@
 
 	ioaddr = dev->base_addr;
 	lp = netdev_priv(dev);
-	shmem = dev->mem_start;
+	shmem = lp->base;
 
 	spin_lock(&lp->lock);
 
-	status = isa_readw(shmem+iSCB_STATUS);
+	status = readw(shmem+iSCB_STATUS);
 
 	if (net_debug > 4) {
 		printk("%s: 3c507 interrupt, status %4.4x.\n", dev->name, status);
@@ -563,7 +573,7 @@
 
 	/* Reap the Tx packet buffers. */
 	while (lp->tx_pkts_in_ring) {
-	  unsigned short tx_status = isa_readw(shmem+lp->tx_reap);
+	  unsigned short tx_status = readw(shmem+lp->tx_reap);
 	  if (!(tx_status & 0x8000)) {
 		if (net_debug > 5) 
 			printk("Tx command incomplete (%#x).\n", lp->tx_reap);
@@ -619,11 +629,11 @@
 			printk("%s: Rx unit stopped, status %04x, restarting.\n",
 				   dev->name, status);
 		init_rx_bufs(dev);
-		isa_writew(RX_BUF_START,shmem+iSCB_RFA);
+		writew(RX_BUF_START,shmem+iSCB_RFA);
 		ack_cmd |= RX_START;
 	}
 
-	isa_writew(ack_cmd,shmem+iSCB_CMD);
+	writew(ack_cmd,shmem+iSCB_CMD);
 	outb(0, ioaddr + SIGNAL_CA);			/* Issue channel-attn. */
 
 	/* Clear the latched interrupt. */
@@ -637,13 +647,14 @@
 
 static int el16_close(struct net_device *dev)
 {
+	struct net_local *lp = netdev_priv(dev);
 	int ioaddr = dev->base_addr;
-	unsigned long shmem = dev->mem_start;
+	void __iomem *shmem = lp->base;
 
 	netif_stop_queue(dev);
 
 	/* Flush the Tx and disable Rx. */
-	isa_writew(RX_SUSPEND | CUC_SUSPEND,shmem+iSCB_CMD);
+	writew(RX_SUSPEND | CUC_SUSPEND,shmem+iSCB_CMD);
 	outb(0, ioaddr + SIGNAL_CA);
 
 	/* Disable the 82586's input to the interrupt line. */
@@ -671,7 +682,7 @@
 static void init_rx_bufs(struct net_device *dev)
 {
 	struct net_local *lp = netdev_priv(dev);
-	unsigned long write_ptr;
+	void __iomem *write_ptr;
 	unsigned short SCB_base = SCB_BASE;
 
 	int cur_rxbuf = lp->rx_head = RX_BUF_START;
@@ -679,26 +690,26 @@
 	/* Initialize each Rx frame + data buffer. */
 	do {	/* While there is room for one more. */
 
-	  write_ptr = dev->mem_start + cur_rxbuf;
+		write_ptr = lp->base + cur_rxbuf;
 
-		isa_writew(0x0000,write_ptr);			/* Status */
-		isa_writew(0x0000,write_ptr+=2);			/* Command */
-		isa_writew(cur_rxbuf + RX_BUF_SIZE,write_ptr+=2);	/* Link */
-		isa_writew(cur_rxbuf + 22,write_ptr+=2);		/* Buffer offset */
-		isa_writew(0x0000,write_ptr+=2);			/* Pad for dest addr. */
-		isa_writew(0x0000,write_ptr+=2);
-		isa_writew(0x0000,write_ptr+=2);
-		isa_writew(0x0000,write_ptr+=2);			/* Pad for source addr. */
-		isa_writew(0x0000,write_ptr+=2);
-		isa_writew(0x0000,write_ptr+=2);
-		isa_writew(0x0000,write_ptr+=2);			/* Pad for protocol. */
-
-		isa_writew(0x0000,write_ptr+=2);			/* Buffer: Actual count */
-		isa_writew(-1,write_ptr+=2);			/* Buffer: Next (none). */
-		isa_writew(cur_rxbuf + 0x20 + SCB_base,write_ptr+=2);/* Buffer: Address low */
-		isa_writew(0x0000,write_ptr+=2);
+		writew(0x0000,write_ptr);			/* Status */
+		writew(0x0000,write_ptr+=2);			/* Command */
+		writew(cur_rxbuf + RX_BUF_SIZE,write_ptr+=2);	/* Link */
+		writew(cur_rxbuf + 22,write_ptr+=2);		/* Buffer offset */
+		writew(0x0000,write_ptr+=2);			/* Pad for dest addr. */
+		writew(0x0000,write_ptr+=2);
+		writew(0x0000,write_ptr+=2);
+		writew(0x0000,write_ptr+=2);			/* Pad for source addr. */
+		writew(0x0000,write_ptr+=2);
+		writew(0x0000,write_ptr+=2);
+		writew(0x0000,write_ptr+=2);			/* Pad for protocol. */
+
+		writew(0x0000,write_ptr+=2);			/* Buffer: Actual count */
+		writew(-1,write_ptr+=2);			/* Buffer: Next (none). */
+		writew(cur_rxbuf + 0x20 + SCB_base,write_ptr+=2);/* Buffer: Address low */
+		writew(0x0000,write_ptr+=2);
 		/* Finally, the number of bytes in the buffer. */
-		isa_writew(0x8000 + RX_BUF_SIZE-0x20,write_ptr+=2);
+		writew(0x8000 + RX_BUF_SIZE-0x20,write_ptr+=2);
 
 		lp->rx_tail = cur_rxbuf;
 		cur_rxbuf += RX_BUF_SIZE;
@@ -706,16 +717,16 @@
 
 	/* Terminate the list by setting the EOL bit, and wrap the pointer to make
 	   the list a ring. */
-	write_ptr = dev->mem_start + lp->rx_tail + 2;
-	isa_writew(0xC000,write_ptr);				/* Command, mark as last. */
-	isa_writew(lp->rx_head,write_ptr+2);			/* Link */
+	write_ptr = lp->base + lp->rx_tail + 2;
+	writew(0xC000,write_ptr);				/* Command, mark as last. */
+	writew(lp->rx_head,write_ptr+2);			/* Link */
 }
 
 static void init_82586_mem(struct net_device *dev)
 {
 	struct net_local *lp = netdev_priv(dev);
 	short ioaddr = dev->base_addr;
-	unsigned long shmem = dev->mem_start;
+	void __iomem *shmem = lp->base;
 
 	/* Enable loopback to protect the wire while starting up,
 	   and hold the 586 in reset during the memory initialization. */
@@ -726,13 +737,13 @@
 	init_words[7] = SCB_BASE;
 
 	/* Write the words at 0xfff6 (address-aliased to 0xfffff6). */
-	isa_memcpy_toio(dev->mem_end-10, init_words, 10);
+	memcpy_toio(lp->base + RX_BUF_END - 10, init_words, 10);
 
 	/* Write the words at 0x0000. */
-	isa_memcpy_toio(dev->mem_start, init_words + 5, sizeof(init_words) - 10);
+	memcpy_toio(lp->base, init_words + 5, sizeof(init_words) - 10);
 
 	/* Fill in the station address. */
-	isa_memcpy_toio(dev->mem_start+SA_OFFSET, dev->dev_addr,
+	memcpy_toio(lp->base+SA_OFFSET, dev->dev_addr,
 		   sizeof(dev->dev_addr));
 
 	/* The Tx-block list is written as needed.  We just set up the values. */
@@ -750,11 +761,11 @@
 
 	{
 		int boguscnt = 50;
-		while (isa_readw(shmem+iSCB_STATUS) == 0)
+		while (readw(shmem+iSCB_STATUS) == 0)
 			if (--boguscnt == 0) {
 				printk("%s: i82586 initialization timed out with status %04x,"
 					   "cmd %04x.\n", dev->name,
-					   isa_readw(shmem+iSCB_STATUS), isa_readw(shmem+iSCB_CMD));
+					   readw(shmem+iSCB_STATUS), readw(shmem+iSCB_CMD));
 				break;
 			}
 		/* Issue channel-attn -- the 82586 won't start. */
@@ -765,7 +776,7 @@
 	outb(0x84, ioaddr + MISC_CTRL);
 	if (net_debug > 4)
 		printk("%s: Initialized 82586, status %04x.\n", dev->name,
-			   isa_readw(shmem+iSCB_STATUS));
+			   readw(shmem+iSCB_STATUS));
 	return;
 }
 
@@ -774,33 +785,33 @@
 	struct net_local *lp = netdev_priv(dev);
 	short ioaddr = dev->base_addr;
 	ushort tx_block = lp->tx_head;
-	unsigned long write_ptr = dev->mem_start + tx_block;
+	void __iomem *write_ptr = lp->base + tx_block;
 	static char padding[ETH_ZLEN];
 
 	/* Set the write pointer to the Tx block, and put out the header. */
-	isa_writew(0x0000,write_ptr);			/* Tx status */
-	isa_writew(CMD_INTR|CmdTx,write_ptr+=2);		/* Tx command */
-	isa_writew(tx_block+16,write_ptr+=2);		/* Next command is a NoOp. */
-	isa_writew(tx_block+8,write_ptr+=2);			/* Data Buffer offset. */
+	writew(0x0000,write_ptr);			/* Tx status */
+	writew(CMD_INTR|CmdTx,write_ptr+=2);		/* Tx command */
+	writew(tx_block+16,write_ptr+=2);		/* Next command is a NoOp. */
+	writew(tx_block+8,write_ptr+=2);			/* Data Buffer offset. */
 
 	/* Output the data buffer descriptor. */
-	isa_writew((pad + length) | 0x8000,write_ptr+=2);		/* Byte count parameter. */
-	isa_writew(-1,write_ptr+=2);			/* No next data buffer. */
-	isa_writew(tx_block+22+SCB_BASE,write_ptr+=2);	/* Buffer follows the NoOp command. */
-	isa_writew(0x0000,write_ptr+=2);			/* Buffer address high bits (always zero). */
+	writew((pad + length) | 0x8000,write_ptr+=2);		/* Byte count parameter. */
+	writew(-1,write_ptr+=2);			/* No next data buffer. */
+	writew(tx_block+22+SCB_BASE,write_ptr+=2);	/* Buffer follows the NoOp command. */
+	writew(0x0000,write_ptr+=2);			/* Buffer address high bits (always zero). */
 
 	/* Output the Loop-back NoOp command. */
-	isa_writew(0x0000,write_ptr+=2);			/* Tx status */
-	isa_writew(CmdNOp,write_ptr+=2);			/* Tx command */
-	isa_writew(tx_block+16,write_ptr+=2);		/* Next is myself. */
+	writew(0x0000,write_ptr+=2);			/* Tx status */
+	writew(CmdNOp,write_ptr+=2);			/* Tx command */
+	writew(tx_block+16,write_ptr+=2);		/* Next is myself. */
 
 	/* Output the packet at the write pointer. */
-	isa_memcpy_toio(write_ptr+2, buf, length);
+	memcpy_toio(write_ptr+2, buf, length);
 	if (pad)
-		isa_memcpy_toio(write_ptr+length+2, padding, pad);
+		memcpy_toio(write_ptr+length+2, padding, pad);
 
 	/* Set the old command link pointing to this send packet. */
-	isa_writew(tx_block,dev->mem_start + lp->tx_cmd_link);
+	writew(tx_block,lp->base + lp->tx_cmd_link);
 	lp->tx_cmd_link = tx_block + 20;
 
 	/* Set the next free tx region. */
@@ -821,19 +832,19 @@
 static void el16_rx(struct net_device *dev)
 {
 	struct net_local *lp = netdev_priv(dev);
-	unsigned long shmem = dev->mem_start;
+	void __iomem *shmem = lp->base;
 	ushort rx_head = lp->rx_head;
 	ushort rx_tail = lp->rx_tail;
 	ushort boguscount = 10;
 	short frame_status;
 
-	while ((frame_status = isa_readw(shmem+rx_head)) < 0) {   /* Command complete */
-		unsigned long read_frame = dev->mem_start + rx_head;
-		ushort rfd_cmd = isa_readw(read_frame+2);
-		ushort next_rx_frame = isa_readw(read_frame+4);
-		ushort data_buffer_addr = isa_readw(read_frame+6);
-		unsigned long data_frame = dev->mem_start + data_buffer_addr;
-		ushort pkt_len = isa_readw(data_frame);
+	while ((frame_status = readw(shmem+rx_head)) < 0) {   /* Command complete */
+		void __iomem *read_frame = lp->base + rx_head;
+		ushort rfd_cmd = readw(read_frame+2);
+		ushort next_rx_frame = readw(read_frame+4);
+		ushort data_buffer_addr = readw(read_frame+6);
+		void __iomem *data_frame = lp->base + data_buffer_addr;
+		ushort pkt_len = readw(data_frame);
 
 		if (rfd_cmd != 0 || data_buffer_addr != rx_head + 22
 			|| (pkt_len & 0xC000) != 0xC000) {
@@ -865,7 +876,7 @@
 			skb->dev = dev;
 
 			/* 'skb->data' points to the start of sk_buff data area. */
-			isa_memcpy_fromio(skb_put(skb,pkt_len), data_frame + 10, pkt_len);
+			memcpy_fromio(skb_put(skb,pkt_len), data_frame + 10, pkt_len);
 
 			skb->protocol=eth_type_trans(skb,dev);
 			netif_rx(skb);
@@ -875,10 +886,10 @@
 		}
 
 		/* Clear the status word and set End-of-List on the rx frame. */
-		isa_writew(0,read_frame);
-		isa_writew(0xC000,read_frame+2);
+		writew(0,read_frame);
+		writew(0xC000,read_frame+2);
 		/* Clear the end-of-list on the prev. RFD. */
-		isa_writew(0x0000,dev->mem_start + rx_tail + 2);
+		writew(0x0000,lp->base + rx_tail + 2);
 
 		rx_tail = rx_head;
 		rx_head = next_rx_frame;
@@ -916,8 +927,8 @@
 
 #ifdef MODULE
 static struct net_device *dev_3c507;
-MODULE_PARM(io, "i");
-MODULE_PARM(irq, "i");
+module_param(io, int, 0);
+module_param(irq, int, 0);
 MODULE_PARM_DESC(io, "EtherLink16 I/O base address");
 MODULE_PARM_DESC(irq, "(ignored)");
 
@@ -935,6 +946,7 @@
 	struct net_device *dev = dev_3c507;
 	unregister_netdev(dev);
 	free_irq(dev->irq, dev);
+	iounmap(((struct net_local *)netdev_priv(dev))->base);
 	release_region(dev->base_addr, EL16_IO_EXTENT);
 	free_netdev(dev);
 }
diff -Nru a/drivers/net/3c509.c b/drivers/net/3c509.c
--- a/drivers/net/3c509.c	2005-01-10 20:11:24 -08:00
+++ b/drivers/net/3c509.c	2005-01-10 20:11:24 -08:00
@@ -209,6 +209,9 @@
 #if defined(CONFIG_EISA) || defined(CONFIG_MCA)
 static int el3_device_remove (struct device *device);
 #endif
+#ifdef CONFIG_NET_POLL_CONTROLLER
+static void el3_poll_controller(struct net_device *dev);
+#endif
 
 #ifdef CONFIG_EISA
 struct eisa_device_id el3_eisa_ids[] = {
@@ -321,6 +324,9 @@
 	dev->set_multicast_list = &set_multicast_list;
 	dev->tx_timeout = el3_tx_timeout;
 	dev->watchdog_timeo = TX_TIMEOUT;
+#ifdef CONFIG_NET_POLL_CONTROLLER
+	dev->poll_controller = el3_poll_controller;
+#endif
 	SET_ETHTOOL_OPS(dev, &ethtool_ops);
 
 	err = register_netdev(dev);
@@ -999,6 +1005,19 @@
 }
 
 
+#ifdef CONFIG_NET_POLL_CONTROLLER
+/*
+ * Polling receive - used by netconsole and other diagnostic tools
+ * to allow network i/o with interrupts disabled.
+ */
+static void el3_poll_controller(struct net_device *dev)
+{
+	disable_irq(dev->irq);
+	el3_interrupt(dev->irq, dev, NULL);
+	enable_irq(dev->irq);
+}
+#endif
+
 static struct net_device_stats *
 el3_get_stats(struct net_device *dev)
 {
@@ -1535,16 +1554,16 @@
 static int irq[] = {-1, -1, -1, -1, -1, -1, -1, -1};
 static int xcvr[] = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1};
 
-MODULE_PARM(debug,"i");
-MODULE_PARM(irq,"1-8i");
-MODULE_PARM(xcvr,"1-12i");
-MODULE_PARM(max_interrupt_work, "i");
+module_param(debug,int, 0);
+module_param_array(irq, int, NULL, 0);
+module_param_array(xcvr, int, NULL, 0);
+module_param(max_interrupt_work, int, 0);
 MODULE_PARM_DESC(debug, "debug level (0-6)");
 MODULE_PARM_DESC(irq, "IRQ number(s) (assigned)");
 MODULE_PARM_DESC(xcvr,"transceiver(s) (0=internal, 1=external)");
 MODULE_PARM_DESC(max_interrupt_work, "maximum events handled per interrupt");
 #if defined(__ISAPNP__)
-MODULE_PARM(nopnp, "i");
+module_param(nopnp, int, 0);
 MODULE_PARM_DESC(nopnp, "disable ISA PnP support (0-1)");
 MODULE_DEVICE_TABLE(isapnp, el3_isapnp_adapters);
 #endif	/* __ISAPNP__ */
diff -Nru a/drivers/net/3c515.c b/drivers/net/3c515.c
--- a/drivers/net/3c515.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/net/3c515.c	2005-01-10 20:11:16 -08:00
@@ -87,15 +87,6 @@
 MODULE_DESCRIPTION("3Com 3c515 Corkscrew driver");
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(debug, "i");
-MODULE_PARM(options, "1-" __MODULE_STRING(MAX_UNITS) "i");
-MODULE_PARM(rx_copybreak, "i");
-MODULE_PARM(max_interrupt_work, "i");
-MODULE_PARM_DESC(debug, "3c515 debug level (0-6)");
-MODULE_PARM_DESC(options, "3c515: Bits 0-2: media type, bit 3: full duplex, bit 4: bus mastering");
-MODULE_PARM_DESC(rx_copybreak, "3c515 copy breakpoint for copy-only-tiny-frames");
-MODULE_PARM_DESC(max_interrupt_work, "3c515 maximum events handled per interrupt");
-
 /* "Knobs" for adjusting internal parameters. */
 /* Put out somewhat more debugging messages. (0 - no msg, 1 minimal msgs). */
 #define DRIVER_DEBUG 1
@@ -409,6 +400,16 @@
 
 #ifdef MODULE
 static int debug = -1;
+
+module_param(debug, int, 0);
+module_param_array(options, int, NULL, 0);
+module_param(rx_copybreak, int, 0);
+module_param(max_interrupt_work, int, 0);
+MODULE_PARM_DESC(debug, "3c515 debug level (0-6)");
+MODULE_PARM_DESC(options, "3c515: Bits 0-2: media type, bit 3: full duplex, bit 4: bus mastering");
+MODULE_PARM_DESC(rx_copybreak, "3c515 copy breakpoint for copy-only-tiny-frames");
+MODULE_PARM_DESC(max_interrupt_work, "3c515 maximum events handled per interrupt");
+
 /* A list of all installed Vortex devices, for removing the driver module. */
 /* we will need locking (and refcounting) if we ever use it for more */
 static LIST_HEAD(root_corkscrew_dev);
diff -Nru a/drivers/net/3c523.c b/drivers/net/3c523.c
--- a/drivers/net/3c523.c	2005-01-10 20:11:24 -08:00
+++ b/drivers/net/3c523.c	2005-01-10 20:11:24 -08:00
@@ -1271,8 +1271,8 @@
 static struct net_device *dev_elmc[MAX_3C523_CARDS];
 static int irq[MAX_3C523_CARDS];
 static int io[MAX_3C523_CARDS];
-MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_3C523_CARDS) "i");
-MODULE_PARM(io, "1-" __MODULE_STRING(MAX_3C523_CARDS) "i");
+module_param_array(irq, int, NULL, 0);
+module_param_array(io, int, NULL, 0);
 MODULE_PARM_DESC(io, "EtherLink/MC I/O base address(es)");
 MODULE_PARM_DESC(irq, "EtherLink/MC IRQ number(s)");
 
diff -Nru a/drivers/net/3c59x.c b/drivers/net/3c59x.c
--- a/drivers/net/3c59x.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/net/3c59x.c	2005-01-10 20:11:15 -08:00
@@ -277,37 +277,8 @@
 MODULE_DESCRIPTION("3Com 3c59x/3c9xx ethernet driver "
 					DRV_VERSION " " DRV_RELDATE);
 MODULE_LICENSE("GPL");
+MODULE_VERSION(DRV_VERSION);
 
-MODULE_PARM(debug, "i");
-MODULE_PARM(global_options, "i");
-MODULE_PARM(options, "1-" __MODULE_STRING(8) "i");
-MODULE_PARM(global_full_duplex, "i");
-MODULE_PARM(full_duplex, "1-" __MODULE_STRING(8) "i");
-MODULE_PARM(hw_checksums, "1-" __MODULE_STRING(8) "i");
-MODULE_PARM(flow_ctrl, "1-" __MODULE_STRING(8) "i");
-MODULE_PARM(global_enable_wol, "i");
-MODULE_PARM(enable_wol, "1-" __MODULE_STRING(8) "i");
-MODULE_PARM(rx_copybreak, "i");
-MODULE_PARM(max_interrupt_work, "i");
-MODULE_PARM(compaq_ioaddr, "i");
-MODULE_PARM(compaq_irq, "i");
-MODULE_PARM(compaq_device_id, "i");
-MODULE_PARM(watchdog, "i");
-MODULE_PARM_DESC(debug, "3c59x debug level (0-6)");
-MODULE_PARM_DESC(options, "3c59x: Bits 0-3: media type, bit 4: bus mastering, bit 9: full duplex");
-MODULE_PARM_DESC(global_options, "3c59x: same as options, but applies to all NICs if options is unset");
-MODULE_PARM_DESC(full_duplex, "3c59x full duplex setting(s) (1)");
-MODULE_PARM_DESC(global_full_duplex, "3c59x: same as full_duplex, but applies to all NICs if options is unset");
-MODULE_PARM_DESC(hw_checksums, "3c59x Hardware checksum checking by adapter(s) (0-1)");
-MODULE_PARM_DESC(flow_ctrl, "3c59x 802.3x flow control usage (PAUSE only) (0-1)");
-MODULE_PARM_DESC(enable_wol, "3c59x: Turn on Wake-on-LAN for adapter(s) (0-1)");
-MODULE_PARM_DESC(global_enable_wol, "3c59x: same as enable_wol, but applies to all NICs if options is unset");
-MODULE_PARM_DESC(rx_copybreak, "3c59x copy breakpoint for copy-only-tiny-frames");
-MODULE_PARM_DESC(max_interrupt_work, "3c59x maximum events handled per interrupt");
-MODULE_PARM_DESC(compaq_ioaddr, "3c59x PCI I/O base address (Compaq BIOS problem workaround)");
-MODULE_PARM_DESC(compaq_irq, "3c59x PCI IRQ number (Compaq BIOS problem workaround)");
-MODULE_PARM_DESC(compaq_device_id, "3c59x PCI device ID (Compaq BIOS problem workaround)");
-MODULE_PARM_DESC(watchdog, "3c59x transmit timeout in milliseconds");
 
 /* Operational parameter that usually are not changed. */
 
@@ -930,6 +901,37 @@
 
 static int vortex_cards_found;
 
+module_param(debug, int, 0);
+module_param(global_options, int, 0);
+module_param_array(options, int, NULL, 0);
+module_param(global_full_duplex, int, 0);
+module_param_array(full_duplex, int, NULL, 0);
+module_param_array(hw_checksums, int, NULL, 0);
+module_param_array(flow_ctrl, int, NULL, 0);
+module_param(global_enable_wol, int, 0);
+module_param_array(enable_wol, int, NULL, 0);
+module_param(rx_copybreak, int, 0);
+module_param(max_interrupt_work, int, 0);
+module_param(compaq_ioaddr, int, 0);
+module_param(compaq_irq, int, 0);
+module_param(compaq_device_id, int, 0);
+module_param(watchdog, int, 0);
+MODULE_PARM_DESC(debug, "3c59x debug level (0-6)");
+MODULE_PARM_DESC(options, "3c59x: Bits 0-3: media type, bit 4: bus mastering, bit 9: full duplex");
+MODULE_PARM_DESC(global_options, "3c59x: same as options, but applies to all NICs if options is unset");
+MODULE_PARM_DESC(full_duplex, "3c59x full duplex setting(s) (1)");
+MODULE_PARM_DESC(global_full_duplex, "3c59x: same as full_duplex, but applies to all NICs if options is unset");
+MODULE_PARM_DESC(hw_checksums, "3c59x Hardware checksum checking by adapter(s) (0-1)");
+MODULE_PARM_DESC(flow_ctrl, "3c59x 802.3x flow control usage (PAUSE only) (0-1)");
+MODULE_PARM_DESC(enable_wol, "3c59x: Turn on Wake-on-LAN for adapter(s) (0-1)");
+MODULE_PARM_DESC(global_enable_wol, "3c59x: same as enable_wol, but applies to all NICs if options is unset");
+MODULE_PARM_DESC(rx_copybreak, "3c59x copy breakpoint for copy-only-tiny-frames");
+MODULE_PARM_DESC(max_interrupt_work, "3c59x maximum events handled per interrupt");
+MODULE_PARM_DESC(compaq_ioaddr, "3c59x PCI I/O base address (Compaq BIOS problem workaround)");
+MODULE_PARM_DESC(compaq_irq, "3c59x PCI IRQ number (Compaq BIOS problem workaround)");
+MODULE_PARM_DESC(compaq_device_id, "3c59x PCI device ID (Compaq BIOS problem workaround)");
+MODULE_PARM_DESC(watchdog, "3c59x transmit timeout in milliseconds");
+
 #ifdef CONFIG_NET_POLL_CONTROLLER
 static void poll_vortex(struct net_device *dev)
 {
@@ -1549,7 +1551,7 @@
 	int i;
 
 	if (VORTEX_PCI(vp) && vp->enable_wol) {
-		pci_set_power_state(VORTEX_PCI(vp), 0);	/* Go active */
+		pci_set_power_state(VORTEX_PCI(vp), PCI_D0);	/* Go active */
 		pci_restore_state(VORTEX_PCI(vp));
 	}
 
@@ -2941,7 +2943,7 @@
 	/* The kernel core really should have pci_get_power_state() */
 
 	if(state != 0)
-		pci_set_power_state(VORTEX_PCI(vp), 0);
+		pci_set_power_state(VORTEX_PCI(vp), PCI_D0);
 	err = vortex_do_ioctl(dev, rq, cmd);
 	if(state != 0)
 		pci_set_power_state(VORTEX_PCI(vp), state);
@@ -3140,7 +3142,7 @@
 
 	/* Change the power state to D3; RxEnable doesn't take effect. */
 	pci_enable_wake(VORTEX_PCI(vp), 0, 1);
-	pci_set_power_state(VORTEX_PCI(vp), 3);
+	pci_set_power_state(VORTEX_PCI(vp), PCI_D3hot);
 }
 
 
@@ -3163,7 +3165,7 @@
 	unregister_netdev(dev);
 
 	if (VORTEX_PCI(vp) && vp->enable_wol) {
-		pci_set_power_state(VORTEX_PCI(vp), 0);	/* Go active */
+		pci_set_power_state(VORTEX_PCI(vp), PCI_D0);	/* Go active */
 		if (vp->pm_state_valid)
 			pci_restore_state(VORTEX_PCI(vp));
 	}
diff -Nru a/drivers/net/8139cp.c b/drivers/net/8139cp.c
--- a/drivers/net/8139cp.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/net/8139cp.c	2005-01-10 20:11:18 -08:00
@@ -398,6 +398,8 @@
 static struct pci_device_id cp_pci_tbl[] = {
 	{ PCI_VENDOR_ID_REALTEK, PCI_DEVICE_ID_REALTEK_8139,
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, },
+	{ PCI_VENDOR_ID_TTTECH, PCI_DEVICE_ID_TTTECH_MC322,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, },
 	{ },
 };
 MODULE_DEVICE_TABLE(pci, cp_pci_tbl);
@@ -1623,7 +1625,7 @@
 static void cp_set_d3_state (struct cp_private *cp)
 {
 	pci_enable_wake (cp->pdev, 0, 1); /* Enable PME# generation */
-	pci_set_power_state (cp->pdev, 3);
+	pci_set_power_state (cp->pdev, PCI_D3hot);
 }
 
 static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
@@ -1813,7 +1815,7 @@
 		BUG();
 	unregister_netdev(dev);
 	iounmap(cp->regs);
-	if (cp->wol_enabled) pci_set_power_state (pdev, 0);
+	if (cp->wol_enabled) pci_set_power_state (pdev, PCI_D0);
 	pci_release_regions(pdev);
 	pci_clear_mwi(pdev);
 	pci_disable_device(pdev);
@@ -1863,7 +1865,7 @@
 	netif_device_attach (dev);
 	
 	if (cp->pdev && cp->wol_enabled) {
-		pci_set_power_state (cp->pdev, 0);
+		pci_set_power_state (cp->pdev, PCI_D0);
 		pci_restore_state (cp->pdev);
 	}
 	
diff -Nru a/drivers/net/8139too.c b/drivers/net/8139too.c
--- a/drivers/net/8139too.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/net/8139too.c	2005-01-10 20:11:15 -08:00
@@ -598,6 +598,7 @@
 MODULE_AUTHOR ("Jeff Garzik <jgarzik@pobox.com>");
 MODULE_DESCRIPTION ("RealTek RTL-8139 Fast Ethernet driver");
 MODULE_LICENSE("GPL");
+MODULE_VERSION(DRV_VERSION);
 
 module_param(multicast_filter_limit, int, 0);
 module_param_array(media, int, NULL, 0);
@@ -2607,7 +2608,7 @@
 
 	spin_unlock_irqrestore (&tp->lock, flags);
 
-	pci_set_power_state (pdev, 3);
+	pci_set_power_state (pdev, PCI_D3hot);
 
 	return 0;
 }
@@ -2620,7 +2621,7 @@
 	pci_restore_state (pdev);
 	if (!netif_running (dev))
 		return 0;
-	pci_set_power_state (pdev, 0);
+	pci_set_power_state (pdev, PCI_D0);
 	rtl8139_init_ring (dev);
 	rtl8139_hw_start (dev);
 	netif_device_attach (dev);
diff -Nru a/drivers/net/82596.c b/drivers/net/82596.c
--- a/drivers/net/82596.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/net/82596.c	2005-01-10 20:11:21 -08:00
@@ -150,7 +150,7 @@
 MODULE_DESCRIPTION("i82596 driver");
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(i596_debug, "i");
+module_param(i596_debug, int, 0);
 MODULE_PARM_DESC(i596_debug, "i82596 debug mask");
 
 
@@ -1572,13 +1572,13 @@
 static struct net_device *dev_82596;
 
 #ifdef ENABLE_APRICOT
-MODULE_PARM(irq, "i");
+module_param(irq, int, 0);
 MODULE_PARM_DESC(irq, "Apricot IRQ number");
 #endif
 
-MODULE_PARM(debug, "i");
-MODULE_PARM_DESC(debug, "i82596 debug mask");
 static int debug = -1;
+module_param(debug, int, 0);
+MODULE_PARM_DESC(debug, "i82596 debug mask");
 
 int init_module(void)
 {
diff -Nru a/drivers/net/8390.c b/drivers/net/8390.c
--- a/drivers/net/8390.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/net/8390.c	2005-01-10 20:11:16 -08:00
@@ -43,6 +43,7 @@
   Paul Gortmaker	: Separate out Tx timeout code from Tx path.
   Paul Gortmaker	: Remove old unused single Tx buffer code.
   Hayato Fujiwara	: Add m32r support.
+  Paul Gortmaker	: use skb_padto() instead of stack scratch area
 
   Sources:
   The National Semiconductor LAN Databook, and the 3Com 3c503 databook.
@@ -272,11 +273,15 @@
 {
 	long e8390_base = dev->base_addr;
 	struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
-	int length, send_length, output_page;
+	int send_length = skb->len, output_page;
 	unsigned long flags;
-	char scratch[ETH_ZLEN];
 
-	length = skb->len;
+	if (skb->len < ETH_ZLEN) {
+		skb = skb_padto(skb, ETH_ZLEN);
+		if (skb == NULL)
+			return 0;
+		send_length = ETH_ZLEN;
+	}
 
 	/* Mask interrupts from the ethercard. 
 	   SMP: We have to grab the lock here otherwise the IRQ handler
@@ -298,8 +303,6 @@
 	
 	ei_local->irqlock = 1;
 
-	send_length = ETH_ZLEN < length ? length : ETH_ZLEN;
-    
 	/*
 	 * We have two Tx slots available for use. Find the first free
 	 * slot, and then perform some sanity checks. With two Tx bufs,
@@ -344,13 +347,7 @@
 	 * trigger the send later, upon receiving a Tx done interrupt.
 	 */
 	 
-	if (length == send_length)
-		ei_block_output(dev, length, skb->data, output_page);
-	else {
-		memset(scratch, 0, ETH_ZLEN);
-		memcpy(scratch, skb->data, skb->len);
-		ei_block_output(dev, ETH_ZLEN, scratch, output_page);
-	}
+	ei_block_output(dev, send_length, skb->data, output_page);
 		
 	if (! ei_local->txing) 
 	{
@@ -1114,7 +1111,6 @@
 #ifdef CONFIG_NET_POLL_CONTROLLER
 EXPORT_SYMBOL(ei_poll);
 #endif
-EXPORT_SYMBOL(ei_tx_timeout);
 EXPORT_SYMBOL(NS8390_init);
 EXPORT_SYMBOL(__alloc_ei_netdev);
 
diff -Nru a/drivers/net/8390.h b/drivers/net/8390.h
--- a/drivers/net/8390.h	2005-01-10 20:11:21 -08:00
+++ b/drivers/net/8390.h	2005-01-10 20:11:21 -08:00
@@ -52,6 +52,7 @@
 	void (*block_input)(struct net_device *, int, struct sk_buff *, int);
 	unsigned long rmem_start;
 	unsigned long rmem_end;
+	void __iomem *mem;
 	unsigned char mcfilter[8];
 	unsigned open:1;
 	unsigned word16:1;  		/* We have the 16-bit (vs 8-bit) version of the card. */
diff -Nru a/drivers/net/Kconfig b/drivers/net/Kconfig
--- a/drivers/net/Kconfig	2005-01-10 20:11:22 -08:00
+++ b/drivers/net/Kconfig	2005-01-10 20:11:22 -08:00
@@ -1179,37 +1179,38 @@
 	  be called ibmveth.
 
 config IBM_EMAC
-       tristate "IBM PPC4xx EMAC driver support"
-       depends on 4xx
-       ---help---
-       This driver supports the IBM PPC4xx EMAC family of on-chip
-       Ethernet controllers.
+	tristate "IBM PPC4xx EMAC driver support"
+	depends on 4xx
+	select CRC32
+	---help---
+	  This driver supports the IBM PPC4xx EMAC family of on-chip
+	  Ethernet controllers.
 
 config IBM_EMAC_ERRMSG
-       bool "Verbose error messages"
-       depends on IBM_EMAC
+	bool "Verbose error messages"
+	depends on IBM_EMAC
 
 config IBM_EMAC_RXB
-       int "Number of receive buffers"
-       depends on IBM_EMAC
-       default "128" if IBM_EMAC4
-       default "64"
+	int "Number of receive buffers"
+	depends on IBM_EMAC
+	default "128" if IBM_EMAC4
+	default "64"
 
 config IBM_EMAC_TXB
-       int "Number of transmit buffers"
-       depends on IBM_EMAC
-       default "128" if IBM_EMAC4
-       default "8"
+	int "Number of transmit buffers"
+	depends on IBM_EMAC
+	default "128" if IBM_EMAC4
+	default "8"
 
 config IBM_EMAC_FGAP
-       int "Frame gap"
-       depends on IBM_EMAC
-       default "8"
+	int "Frame gap"
+	depends on IBM_EMAC
+	default "8"
 
 config IBM_EMAC_SKBRES
-       int "Skb reserve amount"
-       depends on IBM_EMAC
-       default "0"
+	int "Skb reserve amount"
+	depends on IBM_EMAC
+	default "0"
 
 config NET_PCI
 	bool "EISA, VLB, PCI and on board controllers"
@@ -1398,16 +1399,6 @@
 	  will be called eepro100.
 
 
-config EEPRO100_PIO
-	bool "Use PIO instead of MMIO" if !X86_VISWS
-	depends on EEPRO100
-	default y if X86_VISWS
-	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 E100
 	tristate "Intel(R) PRO/100+ support"
 	depends on NET_PCI && PCI
@@ -1979,6 +1970,15 @@
 
 	  If in doubt, say N.
 
+config R8169_VLAN
+	bool "VLAN support"
+	depends on R8169 && VLAN_8021Q
+	---help---
+	  Say Y here for the r8169 driver to support the functions required
+	  by the kernel 802.1Q code.
+	  
+	  If in doubt, say Y.
+
 config SK98LIN
 	tristate "Marvell Yukon Chipset / SysKonnect SK-98xx Support"
 	depends on PCI
@@ -2190,6 +2190,17 @@
 	  information.
 
 	  If in doubt, say N.
+
+config 2BUFF_MODE
+	bool "Use 2 Buffer Mode on Rx side."
+	depends on S2IO
+	---help---
+	On enabling the 2 buffer mode, the received frame will be
+	split into 2 parts before being DMA'ed to the hosts memory.
+	The parts are the ethernet header and ethernet payload. 
+	This is useful on systems where DMA'ing to to unaligned 
+	physical memory loactions comes with a heavy price.
+	If not sure please say N.
 
 endmenu
 
diff -Nru a/drivers/net/Makefile b/drivers/net/Makefile
--- a/drivers/net/Makefile	2005-01-10 20:11:17 -08:00
+++ b/drivers/net/Makefile	2005-01-10 20:11:17 -08:00
@@ -66,7 +66,7 @@
 
 obj-$(CONFIG_SUNDANCE) += sundance.o
 obj-$(CONFIG_HAMACHI) += hamachi.o
-obj-$(CONFIG_NET) += Space.o net_init.o loopback.o
+obj-$(CONFIG_NET) += Space.o loopback.o
 obj-$(CONFIG_SEEQ8005) += seeq8005.o
 obj-$(CONFIG_ETHERTAP) += ethertap.o
 obj-$(CONFIG_NET_SB1000) += sb1000.o
diff -Nru a/drivers/net/ac3200.c b/drivers/net/ac3200.c
--- a/drivers/net/ac3200.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/net/ac3200.c	2005-01-10 20:11:20 -08:00
@@ -128,8 +128,7 @@
 	/* Someday free_irq may be in ac_close_card() */
 	free_irq(dev->irq, dev);
 	release_region(dev->base_addr, AC_IO_EXTENT);
-	if (ei_status.reg0)
-		iounmap((void *)dev->mem_start);
+	iounmap(ei_status.mem);
 }
 
 #ifndef MODULE
@@ -237,32 +236,22 @@
 	/*
 	 *  BEWARE!! Some dain-bramaged EISA SCUs will allow you to put
 	 *  the card mem within the region covered by `normal' RAM  !!!
+	 *
+	 *  ioremap() will fail in that case.
 	 */
-	if (dev->mem_start > 1024*1024) {	/* phys addr > 1MB */
-		if (dev->mem_start < virt_to_phys(high_memory)) {
-			printk(KERN_CRIT "ac3200.c: Card RAM overlaps with normal memory!!!\n");
-			printk(KERN_CRIT "ac3200.c: Use EISA SCU to set card memory below 1MB,\n");
-			printk(KERN_CRIT "ac3200.c: or to an address above 0x%lx.\n", virt_to_phys(high_memory));
-			printk(KERN_CRIT "ac3200.c: Driver NOT installed.\n");
-			retval = -EINVAL;
-			goto out1;
-		}
-		dev->mem_start = (unsigned long)ioremap(dev->mem_start, AC_STOP_PG*0x100);
-		if (dev->mem_start == 0) {
-			printk(KERN_ERR "ac3200.c: Unable to remap card memory above 1MB !!\n");
-			printk(KERN_ERR "ac3200.c: Try using EISA SCU to set memory below 1MB.\n");
-			printk(KERN_ERR "ac3200.c: Driver NOT installed.\n");
-			retval = -EINVAL;
-			goto out1;
-		}
-		ei_status.reg0 = 1;	/* Use as remap flag */
-		printk("ac3200.c: remapped %dkB card memory to virtual address %#lx\n",
-				AC_STOP_PG/4, dev->mem_start);
-	}
-
-	ei_status.rmem_start = dev->mem_start + TX_PAGES*256;
-	dev->mem_end = ei_status.rmem_end = dev->mem_start
-		+ (AC_STOP_PG - AC_START_PG)*256;
+	ei_status.mem = ioremap(dev->mem_start, AC_STOP_PG*0x100);
+	if (!ei_status.mem) {
+		printk(KERN_ERR "ac3200.c: Unable to remap card memory above 1MB !!\n");
+		printk(KERN_ERR "ac3200.c: Try using EISA SCU to set memory below 1MB.\n");
+		printk(KERN_ERR "ac3200.c: Driver NOT installed.\n");
+		retval = -EINVAL;
+		goto out1;
+	}
+	printk("ac3200.c: remapped %dkB card memory to virtual address %p\n",
+			AC_STOP_PG/4, ei_status.mem);
+
+	dev->mem_start = (unsigned long)ei_status.mem;
+	dev->mem_end = dev->mem_start + (AC_STOP_PG - AC_START_PG)*256;
 
 	ei_status.name = "AC3200";
 	ei_status.tx_start_page = AC_START_PG;
@@ -324,8 +313,8 @@
 static void
 ac_get_8390_hdr(struct net_device *dev, struct e8390_pkt_hdr *hdr, int ring_page)
 {
-	unsigned long hdr_start = dev->mem_start + ((ring_page - AC_START_PG)<<8);
-	isa_memcpy_fromio(hdr, hdr_start, sizeof(struct e8390_pkt_hdr));
+	void __iomem *hdr_start = ei_status.mem + ((ring_page - AC_START_PG)<<8);
+	memcpy_fromio(hdr, hdr_start, sizeof(struct e8390_pkt_hdr));
 }
 
 /*  Block input and output are easy on shared memory ethercards, the only
@@ -334,26 +323,27 @@
 static void ac_block_input(struct net_device *dev, int count, struct sk_buff *skb,
 						  int ring_offset)
 {
-	unsigned long xfer_start = dev->mem_start + ring_offset - (AC_START_PG<<8);
+	void __iomem *start = ei_status.mem + ring_offset - AC_START_PG*256;
 
-	if (xfer_start + count > ei_status.rmem_end) {
+	if (ring_offset + count > AC_STOP_PG*256) {
 		/* We must wrap the input move. */
-		int semi_count = ei_status.rmem_end - xfer_start;
-		isa_memcpy_fromio(skb->data, xfer_start, semi_count);
+		int semi_count = AC_STOP_PG*256 - ring_offset;
+		memcpy_fromio(skb->data, start, semi_count);
 		count -= semi_count;
-		isa_memcpy_fromio(skb->data + semi_count, ei_status.rmem_start, count);
+		memcpy_fromio(skb->data + semi_count,
+				ei_status.mem + TX_PAGES*256, count);
 	} else {
 		/* Packet is in one chunk -- we can copy + cksum. */
-		isa_eth_io_copy_and_sum(skb, xfer_start, count, 0);
+		eth_io_copy_and_sum(skb, start, count, 0);
 	}
 }
 
 static void ac_block_output(struct net_device *dev, int count,
 							const unsigned char *buf, int start_page)
 {
-	unsigned long shmem = dev->mem_start + ((start_page - AC_START_PG)<<8);
+	void __iomem *shmem = ei_status.mem + ((start_page - AC_START_PG)<<8);
 
-	isa_memcpy_toio(shmem, buf, count);
+	memcpy_toio(shmem, buf, count);
 }
 
 static int ac_close_card(struct net_device *dev)
@@ -377,9 +367,9 @@
 static int io[MAX_AC32_CARDS];
 static int irq[MAX_AC32_CARDS];
 static int mem[MAX_AC32_CARDS];
-MODULE_PARM(io, "1-" __MODULE_STRING(MAX_AC32_CARDS) "i");
-MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_AC32_CARDS) "i");
-MODULE_PARM(mem, "1-" __MODULE_STRING(MAX_AC32_CARDS) "i");
+module_param_array(io, int, NULL, 0);
+module_param_array(irq, int, NULL, 0);
+module_param_array(mem, int, NULL, 0);
 MODULE_PARM_DESC(io, "I/O base address(es)");
 MODULE_PARM_DESC(irq, "IRQ number(s)");
 MODULE_PARM_DESC(mem, "Memory base address(es)");
diff -Nru a/drivers/net/amd8111e.c b/drivers/net/amd8111e.c
--- a/drivers/net/amd8111e.c	2005-01-10 20:11:24 -08:00
+++ b/drivers/net/amd8111e.c	2005-01-10 20:11:24 -08:00
@@ -105,11 +105,11 @@
 MODULE_AUTHOR("Advanced Micro Devices, Inc.");
 MODULE_DESCRIPTION ("AMD8111 based 10/100 Ethernet Controller. Driver Version 3.0.3");
 MODULE_LICENSE("GPL");
-MODULE_PARM(speed_duplex, "1-" __MODULE_STRING (MAX_UNITS) "i");
+module_param_array(speed_duplex, int, NULL, 0);
 MODULE_PARM_DESC(speed_duplex, "Set device speed and duplex modes, 0: Auto Negotitate, 1: 10Mbps Half Duplex, 2: 10Mbps Full Duplex, 3: 100Mbps Half Duplex, 4: 100Mbps Full Duplex");
-MODULE_PARM(coalesce, "1-" __MODULE_STRING(MAX_UNITS) "i");
+module_param_array(coalesce, bool, NULL, 0);
 MODULE_PARM_DESC(coalesce, "Enable or Disable interrupt coalescing, 1: Enable, 0: Disable");
-MODULE_PARM(dynamic_ipg, "1-" __MODULE_STRING(MAX_UNITS) "i");
+module_param_array(dynamic_ipg, bool, NULL, 0);
 MODULE_PARM_DESC(dynamic_ipg, "Enable or Disable dynamic IPG, 1: Enable, 0: Disable");
 
 static struct pci_device_id amd8111e_pci_tbl[] = {
@@ -1826,17 +1826,17 @@
 		if(lp->options & OPTION_WAKE_PHY_ENABLE)
 			amd8111e_enable_link_change(lp);	
 		
-		pci_enable_wake(pci_dev, 3, 1);
-		pci_enable_wake(pci_dev, 4, 1); /* D3 cold */
+		pci_enable_wake(pci_dev, PCI_D3hot, 1);
+		pci_enable_wake(pci_dev, PCI_D3cold, 1);
 
 	}
 	else{		
-		pci_enable_wake(pci_dev, 3, 0);
-		pci_enable_wake(pci_dev, 4, 0); /* 4 == D3 cold */
+		pci_enable_wake(pci_dev, PCI_D3hot, 0);
+		pci_enable_wake(pci_dev, PCI_D3cold, 0);
 	}
 	
 	pci_save_state(pci_dev);
-	pci_set_power_state(pci_dev, 3);
+	pci_set_power_state(pci_dev, PCI_D3hot);
 
 	return 0;
 }
@@ -1848,11 +1848,11 @@
 	if (!netif_running(dev))
 		return 0;
 
-	pci_set_power_state(pci_dev, 0);
+	pci_set_power_state(pci_dev, PCI_D0);
 	pci_restore_state(pci_dev);
 
-	pci_enable_wake(pci_dev, 3, 0);
-	pci_enable_wake(pci_dev, 4, 0); /* D3 cold */
+	pci_enable_wake(pci_dev, PCI_D3hot, 0);
+	pci_enable_wake(pci_dev, PCI_D3cold, 0); /* D3 cold */
 
 	netif_device_attach(dev);
 
diff -Nru a/drivers/net/appletalk/cops.c b/drivers/net/appletalk/cops.c
--- a/drivers/net/appletalk/cops.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/net/appletalk/cops.c	2005-01-10 20:11:19 -08:00
@@ -1027,9 +1027,9 @@
 static struct net_device *cops_dev;
 
 MODULE_LICENSE("GPL");
-MODULE_PARM(io, "i");
-MODULE_PARM(irq, "i");
-MODULE_PARM(board_type, "i");
+module_param(io, int, 0);
+module_param(irq, int, 0);
+module_param(board_type, int, 0);
 
 int init_module(void)
 {
diff -Nru a/drivers/net/appletalk/ipddp.c b/drivers/net/appletalk/ipddp.c
--- a/drivers/net/appletalk/ipddp.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/net/appletalk/ipddp.c	2005-01-10 20:11:16 -08:00
@@ -289,7 +289,7 @@
 static struct net_device *dev_ipddp;
 
 MODULE_LICENSE("GPL");
-MODULE_PARM(ipddp_mode, "i");
+module_param(ipddp_mode, int, 0);
 
 static int __init ipddp_init_module(void)
 {
diff -Nru a/drivers/net/appletalk/ltpc.c b/drivers/net/appletalk/ltpc.c
--- a/drivers/net/appletalk/ltpc.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/net/appletalk/ltpc.c	2005-01-10 20:11:17 -08:00
@@ -1257,10 +1257,10 @@
 #ifdef MODULE
 
 MODULE_LICENSE("GPL");
-MODULE_PARM(debug, "i");
-MODULE_PARM(io, "i");
-MODULE_PARM(irq, "i");
-MODULE_PARM(dma, "i");
+module_param(debug, int, 0);
+module_param(io, int, 0);
+module_param(irq, int, 0);
+module_param(dma, int, 0);
 
 
 int __init init_module(void)
diff -Nru a/drivers/net/arcnet/Kconfig b/drivers/net/arcnet/Kconfig
--- a/drivers/net/arcnet/Kconfig	2005-01-10 20:11:22 -08:00
+++ b/drivers/net/arcnet/Kconfig	2005-01-10 20:11:22 -08:00
@@ -59,6 +59,25 @@
 	  to work unless talking to a copy of the same Linux arcnet driver,
 	  but perhaps marginally faster in that case.
 
+config ARCNET_CAP
+	tristate "Enable CAP mode packet interface"
+	depends on ARCNET
+	help
+	  ARCnet "cap mode" packet encapsulation. Used to get the hardware
+          acknowledge back to userspace. After the initial protocol byte every
+          packet is stuffed with an extra 4 byte "cookie" which doesn't
+          actually appear on the network. After transmit the driver will send
+          back a packet with protocol byte 0 containing the status of the
+          transmition:
+             0=no hardware acknowledge
+             1=excessive nak
+             2=transmition accepted by the reciever hardware
+
+          Received packets are also stuffed with the extra 4 bytes but it will
+          be random data.
+
+          Cap only listens to protocol 1-8.
+
 config ARCNET_COM90xx
 	tristate "ARCnet COM90xx (normal) chipset driver"
 	depends on ARCNET
diff -Nru a/drivers/net/arcnet/Makefile b/drivers/net/arcnet/Makefile
--- a/drivers/net/arcnet/Makefile	2005-01-10 20:11:21 -08:00
+++ b/drivers/net/arcnet/Makefile	2005-01-10 20:11:21 -08:00
@@ -5,6 +5,7 @@
 obj-$(CONFIG_ARCNET_1201) += rfc1201.o
 obj-$(CONFIG_ARCNET_1051) += rfc1051.o
 obj-$(CONFIG_ARCNET_RAW) += arc-rawmode.o
+obj-$(CONFIG_ARCNET_CAP) += capmode.o
 obj-$(CONFIG_ARCNET_COM90xx) += com90xx.o
 obj-$(CONFIG_ARCNET_COM90xxIO) += com90io.o
 obj-$(CONFIG_ARCNET_RIM_I) += arc-rimi.o
diff -Nru a/drivers/net/arcnet/arc-rawmode.c b/drivers/net/arcnet/arc-rawmode.c
--- a/drivers/net/arcnet/arc-rawmode.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/net/arcnet/arc-rawmode.c	2005-01-10 20:11:22 -08:00
@@ -42,7 +42,6 @@
 static int prepare_tx(struct net_device *dev, struct archdr *pkt, int length,
 		      int bufnum);
 
-
 struct ArcProto rawmode_proto =
 {
 	.suffix		= 'r',
@@ -50,6 +49,8 @@
 	.rx		= rx,
 	.build_header	= build_header,
 	.prepare_tx	= prepare_tx,
+	.continue_tx    = NULL,
+	.ack_tx         = NULL
 };
 
 
@@ -121,7 +122,8 @@
 
 	BUGLVL(D_SKB) arcnet_dump_skb(dev, skb, "rx");
 
-	skb->protocol = 0;
+	skb->protocol = __constant_htons(ETH_P_ARCNET);
+;
 	netif_rx(skb);
 	dev->last_rx = jiffies;
 }
@@ -189,6 +191,9 @@
 		hard->offset[1] = ofs = 512 - length - 3;
 	} else
 		hard->offset[0] = ofs = 256 - length;
+
+	BUGMSG(D_DURING, "prepare_tx: length=%d ofs=%d\n",
+	       length,ofs);
 
 	lp->hw.copy_to_card(dev, bufnum, 0, hard, ARC_HDR_SIZE);
 	lp->hw.copy_to_card(dev, bufnum, ofs, &pkt->soft, length);
diff -Nru a/drivers/net/arcnet/arcnet.c b/drivers/net/arcnet/arcnet.c
--- a/drivers/net/arcnet/arcnet.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/net/arcnet/arcnet.c	2005-01-10 20:11:20 -08:00
@@ -53,7 +53,6 @@
 #include <linux/init.h>
 #include <linux/arcdevice.h>
 
-
 /* "do nothing" functions for protocol drivers */
 static void null_rx(struct net_device *dev, int bufnum,
 		    struct archdr *pkthdr, int length);
@@ -69,25 +68,28 @@
  * arc_proto_default instead.  It also must not be NULL; if you would like
  * to set it to NULL, set it to &arc_proto_null instead.
  */
-struct ArcProto *arc_proto_map[256], *arc_proto_default, *arc_bcast_proto;
+ struct ArcProto *arc_proto_map[256], *arc_proto_default,
+   *arc_bcast_proto, *arc_raw_proto;
 
 struct ArcProto arc_proto_null =
 {
 	.suffix		= '?',
 	.mtu		= XMTU,
+	.is_ip          = 0,
 	.rx		= null_rx,
 	.build_header	= null_build_header,
 	.prepare_tx	= null_prepare_tx,
+	.continue_tx    = NULL,
+	.ack_tx         = NULL
 };
 
-static spinlock_t arcnet_lock = SPIN_LOCK_UNLOCKED;
-
 /* Exported function prototypes */
 int arcnet_debug = ARCNET_DEBUG;
 
 EXPORT_SYMBOL(arc_proto_map);
 EXPORT_SYMBOL(arc_proto_default);
 EXPORT_SYMBOL(arc_bcast_proto);
+EXPORT_SYMBOL(arc_raw_proto);
 EXPORT_SYMBOL(arc_proto_null);
 EXPORT_SYMBOL(arcnet_unregister_proto);
 EXPORT_SYMBOL(arcnet_debug);
@@ -108,7 +110,7 @@
 static int go_tx(struct net_device *dev);
 
 static int debug = ARCNET_DEBUG;
-MODULE_PARM(debug, "i");
+module_param(debug, int, 0);
 MODULE_LICENSE("GPL");
 
 static int __init arcnet_init(void)
@@ -131,7 +133,7 @@
 #endif
 
 	/* initialize the protocol map */
-	arc_proto_default = arc_bcast_proto = &arc_proto_null;
+	arc_raw_proto = arc_proto_default = arc_bcast_proto = &arc_proto_null;
 	for (count = 0; count < 256; count++)
 		arc_proto_map[count] = arc_proto_default;
 
@@ -155,7 +157,8 @@
  * Dump the contents of an sk_buff
  */
 #if ARCNET_DEBUG_MAX & D_SKB
-void arcnet_dump_skb(struct net_device *dev, struct sk_buff *skb, char *desc)
+void arcnet_dump_skb(struct net_device *dev,
+		     struct sk_buff *skb, char *desc)
 {
 	int i;
 
@@ -176,18 +179,22 @@
  * Dump the contents of an ARCnet buffer
  */
 #if (ARCNET_DEBUG_MAX & (D_RX | D_TX))
-void arcnet_dump_packet(struct net_device *dev, int bufnum, char *desc)
+void arcnet_dump_packet(struct net_device *dev, int bufnum, char *desc,
+			int take_arcnet_lock)
 {
 	struct arcnet_local *lp = (struct arcnet_local *) dev->priv;
 	int i, length;
-	unsigned long flags;
+	unsigned long flags = 0;
 	static uint8_t buf[512];
 
 	/* hw.copy_from_card expects IRQ context so take the IRQ lock
 	   to keep it single threaded */
-	spin_lock_irqsave(&arcnet_lock, flags);
+	if(take_arcnet_lock)
+		spin_lock_irqsave(&lp->lock, flags);
+
 	lp->hw.copy_from_card(dev, bufnum, 0, buf, 512);
-	spin_unlock_irqrestore(&arcnet_lock, flags);
+	if(take_arcnet_lock)
+		spin_unlock_irqrestore(&lp->lock, flags);
 
 	/* if the offset[0] byte is nonzero, this is a 256-byte packet */
 	length = (buf[2] ? 256 : 512);
@@ -219,6 +226,8 @@
 		arc_proto_default = &arc_proto_null;
 	if (arc_bcast_proto == proto)
 		arc_bcast_proto = arc_proto_default;
+	if (arc_raw_proto == proto)
+		arc_raw_proto = arc_proto_default;
 
 	for (count = 0; count < 256; count++) {
 		if (arc_proto_map[count] == proto)
@@ -261,8 +270,11 @@
 	struct arcnet_local *lp = (struct arcnet_local *) dev->priv;
 	int buf = -1, i;
 
-	if (!atomic_dec_and_test(&lp->buf_lock))	/* already in this function */
-		BUGMSG(D_NORMAL, "get_arcbuf: overlap (%d)!\n", lp->buf_lock.counter);
+	if (!atomic_dec_and_test(&lp->buf_lock)) {
+		/* already in this function */
+		BUGMSG(D_NORMAL, "get_arcbuf: overlap (%d)!\n",
+		       lp->buf_lock.counter);
+	}
 	else {			/* we can continue */
 		if (lp->next_buf >= 5)
 			lp->next_buf -= 5;
@@ -312,7 +324,7 @@
 	dev->mtu = choose_mtu();
 
 	dev->addr_len = ARCNET_ALEN;
-	dev->tx_queue_len = 30;
+	dev->tx_queue_len = 100;
 	dev->broadcast[0] = 0x00;	/* for us, broadcasts are address 0 */
 	dev->watchdog_timeo = TX_TIMEOUT;
 
@@ -334,8 +346,16 @@
 
 struct net_device *alloc_arcdev(char *name)
 {
-	return alloc_netdev(sizeof(struct arcnet_local),
-			    name && *name ? name : "arc%d", arcdev_setup);
+	struct net_device *dev;
+
+	dev = alloc_netdev(sizeof(struct arcnet_local),
+			   name && *name ? name : "arc%d", arcdev_setup);
+	if(dev) {
+		struct arcnet_local *lp = (struct arcnet_local *) dev->priv;
+		lp->lock = SPIN_LOCK_UNLOCKED;
+	}
+
+	return dev;
 }
 
 /*
@@ -351,6 +371,8 @@
 	struct arcnet_local *lp = (struct arcnet_local *) dev->priv;
 	int count, newmtu, error;
 
+	BUGMSG(D_INIT,"opened.");
+
 	if (!try_module_get(lp->hw.owner))
 		return -ENODEV;
 
@@ -377,6 +399,8 @@
 	if (newmtu < dev->mtu)
 		dev->mtu = newmtu;
 
+	BUGMSG(D_INIT, "arcnet_open: mtu: %d.\n", dev->mtu);
+
 	/* autodetect the encapsulation for each host. */
 	memset(lp->default_proto, 0, sizeof(lp->default_proto));
 
@@ -390,6 +414,7 @@
 
 	/* initialize buffers */
 	atomic_set(&lp->buf_lock, 1);
+
 	lp->next_buf = lp->first_free_buf = 0;
 	release_arcbuf(dev, 0);
 	release_arcbuf(dev, 1);
@@ -411,17 +436,24 @@
 		BUGMSG(D_NORMAL, "WARNING!  Station address FF may confuse "
 		       "DOS networking programs!\n");
 
-	if (ASTATUS() & RESETflag)
+	BUGMSG(D_DEBUG, "%s: %d: %s\n",__FILE__,__LINE__,__FUNCTION__);
+	if (ASTATUS() & RESETflag) {
+	  	BUGMSG(D_DEBUG, "%s: %d: %s\n",__FILE__,__LINE__,__FUNCTION__);
 		ACOMMAND(CFLAGScmd | RESETclear);
+	}
+
 
+	BUGMSG(D_DEBUG, "%s: %d: %s\n",__FILE__,__LINE__,__FUNCTION__);
 	/* make sure we're ready to receive IRQ's. */
 	AINTMASK(0);
 	udelay(1);		/* give it time to set the mask before
 				 * we reset it again. (may not even be
 				 * necessary)
 				 */
+	BUGMSG(D_DEBUG, "%s: %d: %s\n",__FILE__,__LINE__,__FUNCTION__);
 	lp->intmask = NORXflag | RECONflag;
 	AINTMASK(lp->intmask);
+	BUGMSG(D_DEBUG, "%s: %d: %s\n",__FILE__,__LINE__,__FUNCTION__);
 
 	netif_start_queue(dev);
 
@@ -467,32 +499,41 @@
 	       daddr ? *(uint8_t *) daddr : -1,
 	       type, type, len);
 
-	if (len != skb->len)
+	if (skb->len!=0 && len != skb->len)
 		BUGMSG(D_NORMAL, "arcnet_header: Yikes!  skb->len(%d) != len(%d)!\n",
 		       skb->len, len);
 
-	/*
-	 * if the dest addr isn't provided, we can't choose an encapsulation!
-	 * Store the packet type (eg. ETH_P_IP) for now, and we'll push on a
-	 * real header when we do rebuild_header. 
-	 */
-	if (!daddr) {
+
+  	/* Type is host order - ? */
+  	if(type == ETH_P_ARCNET) {
+  		proto = arc_raw_proto;
+  		BUGMSG(D_DEBUG, "arc_raw_proto used. proto='%c'\n",proto->suffix);
+  		_daddr = daddr ? *(uint8_t *) daddr : 0;
+  	}
+	else if (!daddr) {
+		/*
+		 * if the dest addr isn't provided, we can't choose an encapsulation!
+		 * Store the packet type (eg. ETH_P_IP) for now, and we'll push on a
+		 * real header when we do rebuild_header.
+		 */
 		*(uint16_t *) skb_push(skb, 2) = type;
 		if (skb->nh.raw - skb->mac.raw != 2)
 			BUGMSG(D_NORMAL, "arcnet_header: Yikes!  diff (%d) is not 2!\n",
 			       (int)(skb->nh.raw - skb->mac.raw));
 		return -2;	/* return error -- can't transmit yet! */
 	}
-	/* otherwise, we can just add the header as usual. */
-	_daddr = *(uint8_t *) daddr;
-	proto_num = lp->default_proto[_daddr];
-	proto = arc_proto_map[proto_num];
-	BUGMSG(D_DURING, "building header for %02Xh using protocol '%c'\n",
-	       proto_num, proto->suffix);
-	if (proto == &arc_proto_null && arc_bcast_proto != proto) {
-		BUGMSG(D_DURING, "actually, let's use '%c' instead.\n",
-		       arc_bcast_proto->suffix);
-		proto = arc_bcast_proto;
+	else {
+		/* otherwise, we can just add the header as usual. */
+		_daddr = *(uint8_t *) daddr;
+		proto_num = lp->default_proto[_daddr];
+		proto = arc_proto_map[proto_num];
+		BUGMSG(D_DURING, "building header for %02Xh using protocol '%c'\n",
+		       proto_num, proto->suffix);
+		if (proto == &arc_proto_null && arc_bcast_proto != proto) {
+			BUGMSG(D_DURING, "actually, let's use '%c' instead.\n",
+			       arc_bcast_proto->suffix);
+			proto = arc_bcast_proto;
+		}
 	}
 	return proto->build_header(skb, dev, type, _daddr);
 }
@@ -519,6 +560,7 @@
 		return 0;
 	}
 	type = *(uint16_t *) skb_pull(skb, 2);
+	BUGMSG(D_DURING, "rebuild header for protocol %Xh\n", type);
 
 	if (type == ETH_P_IP) {
 #ifdef CONFIG_INET
@@ -555,10 +597,12 @@
 	struct arc_rfc1201 *soft;
 	struct ArcProto *proto;
 	int txbuf;
+	unsigned long flags;
+	int freeskb = 0;
 
 	BUGMSG(D_DURING,
-	       "transmit requested (status=%Xh, txbufs=%d/%d, len=%d)\n",
-	       ASTATUS(), lp->cur_tx, lp->next_tx, skb->len);
+	       "transmit requested (status=%Xh, txbufs=%d/%d, len=%d, protocol %x)\n",
+	       ASTATUS(), lp->cur_tx, lp->next_tx, skb->len,skb->protocol);
 
 	pkt = (struct archdr *) skb->data;
 	soft = &pkt->soft.rfc1201;
@@ -578,38 +622,49 @@
 	/* We're busy transmitting a packet... */
 	netif_stop_queue(dev);
 
+	spin_lock_irqsave(&lp->lock, flags);
 	AINTMASK(0);
 
 	txbuf = get_arcbuf(dev);
 	if (txbuf != -1) {
-		if (proto->prepare_tx(dev, pkt, skb->len, txbuf)) {
-			/* done right away */
+		if (proto->prepare_tx(dev, pkt, skb->len, txbuf) &&
+		    !proto->ack_tx) {
+			/* done right away and we don't want to acknowledge
+			   the package later - forget about it now */
 			lp->stats.tx_bytes += skb->len;
-			dev_kfree_skb(skb);
+			freeskb = 1;
 		} else {
 			/* do it the 'split' way */
 			lp->outgoing.proto = proto;
 			lp->outgoing.skb = skb;
 			lp->outgoing.pkt = pkt;
 
-			if (!proto->continue_tx)
-				BUGMSG(D_NORMAL, "bug! prep_tx==0, but no continue_tx!\n");
-			else if (proto->continue_tx(dev, txbuf)) {
-				BUGMSG(D_NORMAL,
-				       "bug! continue_tx finished the first time! "
-				       "(proto='%c')\n", proto->suffix);
+			if (proto->continue_tx &&
+			    proto->continue_tx(dev, txbuf)) {
+			  BUGMSG(D_NORMAL,
+				 "bug! continue_tx finished the first time! "
+				 "(proto='%c')\n", proto->suffix);
 			}
 		}
 
 		lp->next_tx = txbuf;
-	} else
-		dev_kfree_skb(skb);
+	} else {
+		freeskb = 1;
+	}
 
+	BUGMSG(D_DEBUG, "%s: %d: %s, status: %x\n",__FILE__,__LINE__,__FUNCTION__,ASTATUS());
 	/* make sure we didn't ignore a TX IRQ while we were in here */
 	AINTMASK(0);
-	lp->intmask |= TXFREEflag;
+
+	BUGMSG(D_DEBUG, "%s: %d: %s\n",__FILE__,__LINE__,__FUNCTION__);
+	lp->intmask |= TXFREEflag|EXCNAKflag;
 	AINTMASK(lp->intmask);
+	BUGMSG(D_DEBUG, "%s: %d: %s, status: %x\n",__FILE__,__LINE__,__FUNCTION__,ASTATUS());
 
+	spin_unlock_irqrestore(&lp->lock, flags);
+	if (freeskb) {
+		dev_kfree_skb(skb);
+	}
 	return 0;		/* no need to try again */
 }
 
@@ -628,7 +683,7 @@
 	if (lp->cur_tx != -1 || lp->next_tx == -1)
 		return 0;
 
-	BUGLVL(D_TX) arcnet_dump_packet(dev, lp->next_tx, "go_tx");
+	BUGLVL(D_TX) arcnet_dump_packet(dev, lp->next_tx, "go_tx", 0);
 
 	lp->cur_tx = lp->next_tx;
 	lp->next_tx = -1;
@@ -640,7 +695,8 @@
 	lp->stats.tx_packets++;
 	lp->lasttrans_dest = lp->lastload_dest;
 	lp->lastload_dest = 0;
-	lp->intmask |= TXFREEflag;
+	lp->excnak_pending = 0;
+	lp->intmask |= TXFREEflag|EXCNAKflag;
 
 	return 1;
 }
@@ -654,7 +710,7 @@
 	int status = ASTATUS();
 	char *msg;
 
-	spin_lock_irqsave(&arcnet_lock, flags);
+	spin_lock_irqsave(&lp->lock, flags);
 	if (status & TXFREEflag) {	/* transmit _DID_ finish */
 		msg = " - missed IRQ?";
 	} else {
@@ -665,12 +721,12 @@
 	}
 	lp->stats.tx_errors++;
 
-	/* make sure we didn't miss a TX IRQ */
+	/* make sure we didn't miss a TX or a EXC NAK IRQ */
 	AINTMASK(0);
-	lp->intmask |= TXFREEflag;
+	lp->intmask |= TXFREEflag|EXCNAKflag;
 	AINTMASK(lp->intmask);
 	
-	spin_unlock_irqrestore(&arcnet_lock, flags);
+	spin_unlock_irqrestore(&lp->lock, flags);
 
 	if (jiffies - lp->last_timeout > 10*HZ) {
 		BUGMSG(D_EXTRA, "tx timed out%s (status=%Xh, intmask=%Xh, dest=%02Xh)\n",
@@ -692,18 +748,19 @@
 {
 	struct net_device *dev = dev_id;
 	struct arcnet_local *lp;
-	int recbuf, status, didsomething, boguscount;
+	int recbuf, status, diagstatus, didsomething, boguscount;
+	int retval = IRQ_NONE;
 
 	BUGMSG(D_DURING, "\n");
 
 	BUGMSG(D_DURING, "in arcnet_interrupt\n");
-
-	spin_lock(&arcnet_lock);
 	
 	lp = (struct arcnet_local *) dev->priv;
 	if (!lp)
 		BUG();
 		
+	spin_lock(&lp->lock);
+
 	/*
 	 * RESET flag was enabled - if device is not running, we must clear it right
 	 * away (but nothing else).
@@ -712,7 +769,7 @@
 		if (ASTATUS() & RESETflag)
 			ACOMMAND(CFLAGScmd | RESETclear);
 		AINTMASK(0);
-		spin_unlock(&arcnet_lock);
+		spin_unlock(&lp->lock);
 		return IRQ_HANDLED;
 	}
 
@@ -722,6 +779,10 @@
 	boguscount = 5;
 	do {
 		status = ASTATUS();
+                diagstatus = (status >> 8) & 0xFF;
+
+		BUGMSG(D_DEBUG, "%s: %d: %s: status=%x\n",
+			__FILE__,__LINE__,__FUNCTION__,status);
 		didsomething = 0;
 
 		/*
@@ -761,24 +822,55 @@
 			}
 			didsomething++;
 		}
+
+		if((diagstatus & EXCNAKflag)) {
+			BUGMSG(D_DURING, "EXCNAK IRQ (diagstat=%Xh)\n",
+			       diagstatus);
+
+                        ACOMMAND(NOTXcmd);      /* disable transmit */
+                        lp->excnak_pending = 1;
+
+                        ACOMMAND(EXCNAKclear);
+			lp->intmask &= ~(EXCNAKflag);
+                        didsomething++;
+                }
+
+
 		/* a transmit finished, and we're interested in it. */
 		if ((status & lp->intmask & TXFREEflag) || lp->timed_out) {
-			lp->intmask &= ~TXFREEflag;
+			lp->intmask &= ~(TXFREEflag|EXCNAKflag);
 
 			BUGMSG(D_DURING, "TX IRQ (stat=%Xh)\n", status);
 
-			if (lp->cur_tx != -1 && !(status & TXACKflag) && !lp->timed_out) {
-				if (lp->lasttrans_dest != 0) {
-					BUGMSG(D_EXTRA, "transmit was not acknowledged! "
-					    "(status=%Xh, dest=%02Xh)\n",
-					     status, lp->lasttrans_dest);
-					lp->stats.tx_errors++;
-					lp->stats.tx_carrier_errors++;
-				} else {
-					BUGMSG(D_DURING,
-					       "broadcast was not acknowledged; that's normal "
-					    "(status=%Xh, dest=%02Xh)\n",
-					     status, lp->lasttrans_dest);
+			if (lp->cur_tx != -1 && !lp->timed_out) {
+				if(!(status & TXACKflag)) {
+					if (lp->lasttrans_dest != 0) {
+						BUGMSG(D_EXTRA,
+						       "transmit was not acknowledged! "
+						       "(status=%Xh, dest=%02Xh)\n",
+						       status, lp->lasttrans_dest);
+						lp->stats.tx_errors++;
+						lp->stats.tx_carrier_errors++;
+					} else {
+						BUGMSG(D_DURING,
+						       "broadcast was not acknowledged; that's normal "
+						       "(status=%Xh, dest=%02Xh)\n",
+						       status, lp->lasttrans_dest);
+					}
+				}
+
+				if (lp->outgoing.proto &&
+				    lp->outgoing.proto->ack_tx) {
+				  int ackstatus;
+				  if(status & TXACKflag)
+                                    ackstatus=2;
+                                  else if(lp->excnak_pending)
+                                    ackstatus=1;
+                                  else
+                                    ackstatus=0;
+
+                                  lp->outgoing.proto
+                                    ->ack_tx(dev, ackstatus);
 				}
 			}
 			if (lp->cur_tx != -1)
@@ -798,8 +890,11 @@
 					if (lp->outgoing.proto->continue_tx(dev, txbuf)) {
 						/* that was the last segment */
 						lp->stats.tx_bytes += lp->outgoing.skb->len;
-						dev_kfree_skb_irq(lp->outgoing.skb);
-						lp->outgoing.proto = NULL;
+						if(!lp->outgoing.proto->ack_tx)
+						  {
+						    dev_kfree_skb_irq(lp->outgoing.skb);
+						    lp->outgoing.proto = NULL;
+						  }
 					}
 					lp->next_tx = txbuf;
 				}
@@ -810,7 +905,7 @@
 		}
 		/* now process the received packet, if any */
 		if (recbuf != -1) {
-			BUGLVL(D_RX) arcnet_dump_packet(dev, recbuf, "rx irq");
+			BUGLVL(D_RX) arcnet_dump_packet(dev, recbuf, "rx irq", 0);
 
 			arcnet_rx(dev, recbuf);
 			release_arcbuf(dev, recbuf);
@@ -868,6 +963,10 @@
 
 			BUGMSG(D_DURING, "not recon: clearing counters anyway.\n");
 		}
+
+		if(didsomething) {
+			retval |= IRQ_HANDLED;
+		}
 	}
 	while (--boguscount && didsomething);
 
@@ -880,8 +979,8 @@
 	udelay(1);
 	AINTMASK(lp->intmask);
 	
-	spin_unlock(&arcnet_lock);
-	return IRQ_RETVAL(didsomething);
+	spin_unlock(&lp->lock);
+	return retval;
 }
 
 
@@ -908,7 +1007,7 @@
 	}
 
 	/* get the full header, if possible */
-	if (sizeof(pkt.soft) < length)
+	if (sizeof(pkt.soft) <= length)
 		lp->hw.copy_from_card(dev, bufnum, ofs, soft, sizeof(pkt.soft));
 	else {
 		memset(&pkt.soft, 0, sizeof(pkt.soft));
@@ -923,7 +1022,7 @@
 	lp->stats.rx_bytes += length + ARC_HDR_SIZE;
 
 	/* call the right receiver for the protocol */
-	if (arc_proto_map[soft->proto] != &arc_proto_null) {
+	if (arc_proto_map[soft->proto]->is_ip) {
 		BUGLVL(D_PROTO) {
 			struct ArcProto
 			*oldp = arc_proto_map[lp->default_proto[pkt.hard.source]],
diff -Nru a/drivers/net/arcnet/capmode.c b/drivers/net/arcnet/capmode.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/net/arcnet/capmode.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,296 @@
+/*
+ * Linux ARCnet driver - "cap mode" packet encapsulation.
+ * It adds sequence numbers to packets for communicating between a user space
+ * application and the driver. After a transmit it sends a packet with protocol
+ * byte 0 back up to the userspace containing the sequence number of the packet
+ * plus the transmit-status on the ArcNet.
+ *
+ * Written 2002-4 by Esben Nielsen, Vestas Wind Systems A/S
+ * Derived from arc-rawmode.c by Avery Pennarun.
+ * arc-rawmode was in turned based on skeleton.c, see below.
+ *
+ * **********************
+ *
+ * The original copyright of skeleton.c was as follows:
+ *
+ * skeleton.c Written 1993 by Donald Becker.
+ * Copyright 1993 United States Government as represented by the
+ * Director, National Security Agency.  This software may only be used
+ * and distributed according to the terms of the GNU General Public License as
+ * modified by SRC, incorporated herein by reference.
+ *
+ * **********************
+ *
+ * For more details, see drivers/net/arcnet.c
+ *
+ * **********************
+ */
+
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/if_arp.h>
+#include <net/arp.h>
+#include <linux/netdevice.h>
+#include <linux/skbuff.h>
+#include <linux/arcdevice.h>
+
+#define VERSION "arcnet: cap mode (`c') encapsulation support loaded.\n"
+
+
+static void rx(struct net_device *dev, int bufnum,
+	       struct archdr *pkthdr, int length);
+static int build_header(struct sk_buff *skb,
+			struct net_device *dev,
+			unsigned short type,
+			uint8_t daddr);
+static int prepare_tx(struct net_device *dev, struct archdr *pkt, int length,
+		      int bufnum);
+static int ack_tx(struct net_device *dev, int acked);
+
+
+struct ArcProto capmode_proto =
+{
+	'r',
+	XMTU,
+	0,
+       	rx,
+	build_header,
+	prepare_tx,
+	NULL,
+	ack_tx
+};
+
+
+void arcnet_cap_init(void)
+{
+	int count;
+
+	for (count = 1; count <= 8; count++)
+		if (arc_proto_map[count] == arc_proto_default)
+			arc_proto_map[count] = &capmode_proto;
+
+	/* for cap mode, we only set the bcast proto if there's no better one */
+	if (arc_bcast_proto == arc_proto_default)
+		arc_bcast_proto = &capmode_proto;
+
+	arc_proto_default = &capmode_proto;
+	arc_raw_proto = &capmode_proto;
+}
+
+
+#ifdef MODULE
+
+int __init init_module(void)
+{
+	printk(VERSION);
+	arcnet_cap_init();
+	return 0;
+}
+
+void cleanup_module(void)
+{
+	arcnet_unregister_proto(&capmode_proto);
+}
+
+MODULE_LICENSE("GPL");
+#endif				/* MODULE */
+
+
+
+/* packet receiver */
+static void rx(struct net_device *dev, int bufnum,
+	       struct archdr *pkthdr, int length)
+{
+	struct arcnet_local *lp = (struct arcnet_local *) dev->priv;
+	struct sk_buff *skb;
+	struct archdr *pkt = pkthdr;
+	char *pktbuf, *pkthdrbuf;
+	int ofs;
+
+	BUGMSG(D_DURING, "it's a raw(cap) packet (length=%d)\n", length);
+
+	if (length >= MinTU)
+		ofs = 512 - length;
+	else
+		ofs = 256 - length;
+
+	skb = alloc_skb(length + ARC_HDR_SIZE + sizeof(int), GFP_ATOMIC);
+	if (skb == NULL) {
+		BUGMSG(D_NORMAL, "Memory squeeze, dropping packet.\n");
+		lp->stats.rx_dropped++;
+		return;
+	}
+	skb_put(skb, length + ARC_HDR_SIZE + sizeof(int));
+	skb->dev = dev;
+
+	pkt = (struct archdr *) skb->data;
+
+	skb->mac.raw = skb->data;
+	skb_pull(skb, ARC_HDR_SIZE);
+
+	/* up to sizeof(pkt->soft) has already been copied from the card */
+	/* squeeze in an int for the cap encapsulation */
+
+	/* use these variables to be sure we count in bytes, not in
+	   sizeof(struct archdr) */
+	pktbuf=(char*)pkt;
+	pkthdrbuf=(char*)pkthdr;
+	memcpy(pktbuf, pkthdrbuf, ARC_HDR_SIZE+sizeof(pkt->soft.cap.proto));
+	memcpy(pktbuf+ARC_HDR_SIZE+sizeof(pkt->soft.cap.proto)+sizeof(int),
+	       pkthdrbuf+ARC_HDR_SIZE+sizeof(pkt->soft.cap.proto),
+	       sizeof(struct archdr)-ARC_HDR_SIZE-sizeof(pkt->soft.cap.proto));
+
+	if (length > sizeof(pkt->soft))
+		lp->hw.copy_from_card(dev, bufnum, ofs + sizeof(pkt->soft),
+				      pkt->soft.raw + sizeof(pkt->soft)
+				      + sizeof(int),
+				      length - sizeof(pkt->soft));
+
+	BUGLVL(D_SKB) arcnet_dump_skb(dev, skb, "rx");
+
+	skb->protocol = __constant_htons(ETH_P_ARCNET);
+;
+	netif_rx(skb);
+	dev->last_rx = jiffies;
+}
+
+
+/*
+ * Create the ARCnet hard/soft headers for cap mode.
+ * There aren't any soft headers in cap mode - not even the protocol id.
+ */
+static int build_header(struct sk_buff *skb,
+			struct net_device *dev,
+			unsigned short type,
+			uint8_t daddr)
+{
+	int hdr_size = ARC_HDR_SIZE;
+	struct archdr *pkt = (struct archdr *) skb_push(skb, hdr_size);
+
+	BUGMSG(D_PROTO, "Preparing header for cap packet %x.\n",
+	       *((int*)&pkt->soft.cap.cookie[0]));
+	/*
+	 * Set the source hardware address.
+	 *
+	 * This is pretty pointless for most purposes, but it can help in
+	 * debugging.  ARCnet does not allow us to change the source address in
+	 * the actual packet sent)
+	 */
+	pkt->hard.source = *dev->dev_addr;
+
+	/* see linux/net/ethernet/eth.c to see where I got the following */
+
+	if (dev->flags & (IFF_LOOPBACK | IFF_NOARP)) {
+		/*
+		 * FIXME: fill in the last byte of the dest ipaddr here to better
+		 * comply with RFC1051 in "noarp" mode.
+		 */
+		pkt->hard.dest = 0;
+		return hdr_size;
+	}
+	/* otherwise, just fill it in and go! */
+	pkt->hard.dest = daddr;
+
+	return hdr_size;	/* success */
+}
+
+
+static int prepare_tx(struct net_device *dev, struct archdr *pkt, int length,
+		      int bufnum)
+{
+	struct arcnet_local *lp = (struct arcnet_local *) dev->priv;
+	struct arc_hardware *hard = &pkt->hard;
+	int ofs;
+
+
+	/* hard header is not included in packet length */
+	length -= ARC_HDR_SIZE;
+	/* And neither is the cookie field */
+	length -= sizeof(int);
+
+	BUGMSG(D_DURING, "prepare_tx: txbufs=%d/%d/%d\n",
+	       lp->next_tx, lp->cur_tx, bufnum);
+
+	BUGMSG(D_PROTO, "Sending for cap packet %x.\n",
+	       *((int*)&pkt->soft.cap.cookie[0]));
+
+	if (length > XMTU) {
+		/* should never happen! other people already check for this. */
+		BUGMSG(D_NORMAL, "Bug!  prepare_tx with size %d (> %d)\n",
+		       length, XMTU);
+		length = XMTU;
+	}
+	if (length > MinTU) {
+		hard->offset[0] = 0;
+		hard->offset[1] = ofs = 512 - length;
+	} else if (length > MTU) {
+		hard->offset[0] = 0;
+		hard->offset[1] = ofs = 512 - length - 3;
+	} else
+		hard->offset[0] = ofs = 256 - length;
+
+	BUGMSG(D_DURING, "prepare_tx: length=%d ofs=%d\n",
+	       length,ofs);
+
+	// Copy the arcnet-header + the protocol byte down:
+	lp->hw.copy_to_card(dev, bufnum, 0, hard, ARC_HDR_SIZE);
+	lp->hw.copy_to_card(dev, bufnum, ofs, &pkt->soft.cap.proto,
+			    sizeof(pkt->soft.cap.proto));
+
+	// Skip the extra integer we have written into it as a cookie
+	// but write the rest of the message:
+	lp->hw.copy_to_card(dev, bufnum, ofs+1,
+			    ((unsigned char*)&pkt->soft.cap.mes),length-1);
+
+	lp->lastload_dest = hard->dest;
+
+	return 1;		/* done */
+}
+
+
+static int ack_tx(struct net_device *dev, int acked)
+{
+  struct arcnet_local *lp = (struct arcnet_local *) dev->priv;
+  struct sk_buff *ackskb;
+  struct archdr *ackpkt;
+  int length=sizeof(struct arc_cap);
+
+  BUGMSG(D_DURING, "capmode: ack_tx: protocol: %x: result: %d\n",
+	 lp->outgoing.skb->protocol, acked);
+
+  BUGLVL(D_SKB) arcnet_dump_skb(dev, lp->outgoing.skb, "ack_tx");
+
+  /* Now alloc a skb to send back up through the layers: */
+  ackskb = alloc_skb(length + ARC_HDR_SIZE , GFP_ATOMIC);
+  if (ackskb == NULL) {
+	  BUGMSG(D_NORMAL, "Memory squeeze, can't acknowledge.\n");
+	  goto free_outskb;
+  }
+
+  skb_put(ackskb, length + ARC_HDR_SIZE );
+  ackskb->dev = dev;
+
+  ackpkt = (struct archdr *) ackskb->data;
+
+  ackskb->mac.raw = ackskb->data;
+  /* skb_pull(ackskb, ARC_HDR_SIZE); */
+
+
+  memcpy(ackpkt, lp->outgoing.skb->data, ARC_HDR_SIZE+sizeof(struct arc_cap));
+  ackpkt->soft.cap.proto=0; /* using protocol 0 for acknowledge */
+  ackpkt->soft.cap.mes.ack=acked;
+
+  BUGMSG(D_PROTO, "Ackknowledge for cap packet %x.\n",
+	 *((int*)&ackpkt->soft.cap.cookie[0]));
+
+  ackskb->protocol = __constant_htons(ETH_P_ARCNET);
+
+  BUGLVL(D_SKB) arcnet_dump_skb(dev, ackskb, "ack_tx_recv");
+  netif_rx(ackskb);
+
+ free_outskb:
+  dev_kfree_skb_irq(lp->outgoing.skb);
+  lp->outgoing.proto = NULL; /* We are always finished when in this protocol */
+
+  return 0;
+}
diff -Nru a/drivers/net/arcnet/com20020-isa.c b/drivers/net/arcnet/com20020-isa.c
--- a/drivers/net/arcnet/com20020-isa.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/net/arcnet/com20020-isa.c	2005-01-10 20:11:16 -08:00
@@ -41,7 +41,6 @@
 
 #include <asm/io.h>
 
-
 #define VERSION "arcnet: COM20020 ISA support (by David Woodhouse et al.)\n"
 
 
diff -Nru a/drivers/net/arcnet/com20020.c b/drivers/net/arcnet/com20020.c
--- a/drivers/net/arcnet/com20020.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/net/arcnet/com20020.c	2005-01-10 20:11:17 -08:00
@@ -117,7 +117,7 @@
 	lp->config = 0x21 | (lp->timeout << 3) | (lp->backplane << 2);
 	/* set node ID to 0x42 (but transmitter is disabled, so it's okay) */
 	SETCONF;
-	outb(0x42, ioaddr + 7);
+	outb(0x42, ioaddr + BUS_ALIGN*7);
 
 	status = ASTATUS();
 
@@ -129,7 +129,7 @@
 
 	/* Enable TX */
 	outb(0x39, _CONFIG);
-	outb(inb(ioaddr + 8), ioaddr + 7);
+	outb(inb(ioaddr + BUS_ALIGN*8), ioaddr + BUS_ALIGN*7);
 
 	ACOMMAND(CFLAGScmd | RESETclear | CONFIGclear);
 
@@ -173,7 +173,7 @@
 	dev->set_multicast_list = com20020_set_mc_list;
 
 	if (!dev->dev_addr[0])
-		dev->dev_addr[0] = inb(ioaddr + 8);	/* FIXME: do this some other way! */
+		dev->dev_addr[0] = inb(ioaddr + BUS_ALIGN*8);	/* FIXME: do this some other way! */
 
 	SET_SUBADR(SUB_SETUP1);
 	outb(lp->setup, _XREG);
@@ -188,7 +188,6 @@
 		outb(0x18, _COMMAND);
 	}
 
-
 	lp->config = 0x20 | (lp->timeout << 3) | (lp->backplane << 2) | 1;
 	/* Default 0x38 + register: Node ID */
 	SETCONF;
@@ -235,15 +234,19 @@
 static int com20020_reset(struct net_device *dev, int really_reset)
 {
 	struct arcnet_local *lp = (struct arcnet_local *) dev->priv;
-	short ioaddr = dev->base_addr;
+	u_int ioaddr = dev->base_addr;
 	u_char inbyte;
 
+	BUGMSG(D_DEBUG, "%s: %d: %s: dev: %p, lp: %p, dev->name: %s\n",
+		__FILE__,__LINE__,__FUNCTION__,dev,lp,dev->name);
 	BUGMSG(D_INIT, "Resetting %s (status=%02Xh)\n",
 	       dev->name, ASTATUS());
 
+	BUGMSG(D_DEBUG, "%s: %d: %s\n",__FILE__,__LINE__,__FUNCTION__);
 	lp->config = TXENcfg | (lp->timeout << 3) | (lp->backplane << 2);
 	/* power-up defaults */
 	SETCONF;
+	BUGMSG(D_DEBUG, "%s: %d: %s\n",__FILE__,__LINE__,__FUNCTION__);
 
 	if (really_reset) {
 		/* reset the card */
@@ -251,17 +254,22 @@
 		mdelay(RESETtime * 2);	/* COM20020 seems to be slower sometimes */
 	}
 	/* clear flags & end reset */
+	BUGMSG(D_DEBUG, "%s: %d: %s\n",__FILE__,__LINE__,__FUNCTION__);
 	ACOMMAND(CFLAGScmd | RESETclear | CONFIGclear);
 
 	/* verify that the ARCnet signature byte is present */
+	BUGMSG(D_DEBUG, "%s: %d: %s\n",__FILE__,__LINE__,__FUNCTION__);
 
 	com20020_copy_from_card(dev, 0, 0, &inbyte, 1);
+	BUGMSG(D_DEBUG, "%s: %d: %s\n",__FILE__,__LINE__,__FUNCTION__);
 	if (inbyte != TESTvalue) {
+		BUGMSG(D_DEBUG, "%s: %d: %s\n",__FILE__,__LINE__,__FUNCTION__);
 		BUGMSG(D_NORMAL, "reset failed: TESTvalue not present.\n");
 		return 1;
 	}
 	/* enable extended (512-byte) packets */
 	ACOMMAND(CONFIGcmd | EXTconf);
+	BUGMSG(D_DEBUG, "%s: %d: %s\n",__FILE__,__LINE__,__FUNCTION__);
 
 	/* done!  return success. */
 	return 0;
@@ -270,22 +278,24 @@
 
 static void com20020_setmask(struct net_device *dev, int mask)
 {
-	short ioaddr = dev->base_addr;
+	u_int ioaddr = dev->base_addr;
+	BUGMSG(D_DURING, "Setting mask to %x at %x\n",mask,ioaddr);
 	AINTMASK(mask);
 }
 
 
 static void com20020_command(struct net_device *dev, int cmd)
 {
-	short ioaddr = dev->base_addr;
+	u_int ioaddr = dev->base_addr;
 	ACOMMAND(cmd);
 }
 
 
 static int com20020_status(struct net_device *dev)
 {
-	short ioaddr = dev->base_addr;
-	return ASTATUS();
+	u_int ioaddr = dev->base_addr;
+
+	return ASTATUS() + (ADIAGSTATUS()<<8);
 }
 
 static void com20020_close(struct net_device *dev)
diff -Nru a/drivers/net/arcnet/rfc1051.c b/drivers/net/arcnet/rfc1051.c
--- a/drivers/net/arcnet/rfc1051.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/net/arcnet/rfc1051.c	2005-01-10 20:11:20 -08:00
@@ -47,9 +47,12 @@
 {
 	.suffix		= 's',
 	.mtu		= XMTU - RFC1051_HDR_SIZE,
+	.is_ip          = 1,
 	.rx		= rx,
 	.build_header	= build_header,
 	.prepare_tx	= prepare_tx,
+	.continue_tx    = NULL,
+	.ack_tx         = NULL
 };
 
 
diff -Nru a/drivers/net/arcnet/rfc1201.c b/drivers/net/arcnet/rfc1201.c
--- a/drivers/net/arcnet/rfc1201.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/net/arcnet/rfc1201.c	2005-01-10 20:11:19 -08:00
@@ -47,10 +47,12 @@
 {
 	.suffix		= 'a',
 	.mtu		= 1500,	/* could be more, but some receivers can't handle it... */
+	.is_ip          = 1,    /* This is for sending IP and ARP packages */
 	.rx		= rx,
 	.build_header	= build_header,
 	.prepare_tx	= prepare_tx,
 	.continue_tx	= continue_tx,
+	.ack_tx         = NULL
 };
 
 
diff -Nru a/drivers/net/at1700.c b/drivers/net/at1700.c
--- a/drivers/net/at1700.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/net/at1700.c	2005-01-10 20:11:18 -08:00
@@ -899,9 +899,9 @@
 #ifdef MODULE
 static struct net_device *dev_at1700;
 
-MODULE_PARM(io, "i");
-MODULE_PARM(irq, "i");
-MODULE_PARM(net_debug, "i");
+module_param(io, int, 0);
+module_param(irq, int, 0);
+module_param(net_debug, int, 0);
 MODULE_PARM_DESC(io, "AT1700/FMV18X I/O base address");
 MODULE_PARM_DESC(irq, "AT1700/FMV18X IRQ number");
 MODULE_PARM_DESC(net_debug, "AT1700/FMV18X debug level (0-6)");
diff -Nru a/drivers/net/atp.c b/drivers/net/atp.c
--- a/drivers/net/atp.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/net/atp.c	2005-01-10 20:11:23 -08:00
@@ -153,11 +153,11 @@
 MODULE_DESCRIPTION("RealTek RTL8002/8012 parallel port Ethernet driver");
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(max_interrupt_work, "i");
-MODULE_PARM(debug, "i");
-MODULE_PARM(io, "1-" __MODULE_STRING(NUM_UNITS) "i");
-MODULE_PARM(irq, "1-" __MODULE_STRING(NUM_UNITS) "i");
-MODULE_PARM(xcvr, "1-" __MODULE_STRING(NUM_UNITS) "i");
+module_param(max_interrupt_work, int, 0);
+module_param(debug, int, 0);
+module_param_array(io, int, NULL, 0);
+module_param_array(irq, int, NULL, 0);
+module_param_array(xcvr, int, NULL, 0);
 MODULE_PARM_DESC(max_interrupt_work, "ATP maximum events handled per interrupt");
 MODULE_PARM_DESC(debug, "ATP debug level (0-7)");
 MODULE_PARM_DESC(io, "ATP I/O base address(es)");
diff -Nru a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
--- a/drivers/net/bonding/bond_3ad.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/net/bonding/bond_3ad.c	2005-01-10 20:11:21 -08:00
@@ -130,7 +130,6 @@
 static u16 __get_link_speed(struct port *port);
 static u8 __get_duplex(struct port *port);
 static inline void __initialize_port_locks(struct port *port);
-static inline void __deinitialize_port_locks(struct port *port);
 //conversions
 static void __ntohs_lacpdu(struct lacpdu *lacpdu);
 static u16 __ad_timer_to_ticks(u16 timer_type, u16 Par);
@@ -443,15 +442,6 @@
 {
 	// make sure it isn't called twice
 	spin_lock_init(&(SLAVE_AD_INFO(port->slave).rx_machine_lock));
-}
-
-/**
- * __deinitialize_port_locks - deinitialize a port's RX machine spinlock
- * @port: the port we're looking at
- *
- */
-static inline void __deinitialize_port_locks(struct port *port)
-{
 }
 
 //conversions
diff -Nru a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
--- a/drivers/net/bonding/bond_main.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/net/bonding/bond_main.c	2005-01-10 20:11:22 -08:00
@@ -540,25 +540,25 @@
 static int arp_interval = BOND_LINK_ARP_INTERV;
 static char *arp_ip_target[BOND_MAX_ARP_TARGETS] = { NULL, };
 
-MODULE_PARM(max_bonds, "i");
+module_param(max_bonds, int, 0);
 MODULE_PARM_DESC(max_bonds, "Max number of bonded devices");
-MODULE_PARM(miimon, "i");
+module_param(miimon, int, 0);
 MODULE_PARM_DESC(miimon, "Link check interval in milliseconds");
-MODULE_PARM(updelay, "i");
+module_param(updelay, int, 0);
 MODULE_PARM_DESC(updelay, "Delay before considering link up, in milliseconds");
-MODULE_PARM(downdelay, "i");
+module_param(downdelay, int, 0);
 MODULE_PARM_DESC(downdelay, "Delay before considering link down, in milliseconds");
-MODULE_PARM(use_carrier, "i");
+module_param(use_carrier, int, 0);
 MODULE_PARM_DESC(use_carrier, "Use netif_carrier_ok (vs MII ioctls) in miimon; 0 for off, 1 for on (default)");
-MODULE_PARM(mode, "s");
+module_param(mode, charp, 0);
 MODULE_PARM_DESC(mode, "Mode of operation : 0 for round robin, 1 for active-backup, 2 for xor");
-MODULE_PARM(primary, "s");
+module_param(primary, charp, 0);
 MODULE_PARM_DESC(primary, "Primary network device to use");
-MODULE_PARM(lacp_rate, "s");
+module_param(lacp_rate, charp, 0);
 MODULE_PARM_DESC(lacp_rate, "LACPDU tx rate to request from 802.3ad partner (slow/fast)");
-MODULE_PARM(arp_interval, "i");
+module_param(arp_interval, int, 0);
 MODULE_PARM_DESC(arp_interval, "arp interval in milliseconds");
-MODULE_PARM(arp_ip_target, "1-" __MODULE_STRING(BOND_MAX_ARP_TARGETS) "s");
+module_param_array(arp_ip_target, charp, NULL, 0);
 MODULE_PARM_DESC(arp_ip_target, "arp targets in n.n.n.n form");
 
 /*----------------------------- Global variables ----------------------------*/
diff -Nru a/drivers/net/cs89x0.c b/drivers/net/cs89x0.c
--- a/drivers/net/cs89x0.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/net/cs89x0.c	2005-01-10 20:11:21 -08:00
@@ -1710,14 +1710,14 @@
 static int dma;
 static int dmasize=16;			/* or 64 */
 
-MODULE_PARM(io, "i");
-MODULE_PARM(irq, "i");
-MODULE_PARM(debug, "i");
-MODULE_PARM(media, "c8");
-MODULE_PARM(duplex, "i");
-MODULE_PARM(dma , "i");
-MODULE_PARM(dmasize , "i");
-MODULE_PARM(use_dma , "i");
+module_param(io, int, 0);
+module_param(irq, int, 0);
+module_param(debug, int, 0);
+module_param_string(media, media, sizeof(media), 0);
+module_param(duplex, int, 0);
+module_param(dma , int, 0);
+module_param(dmasize , int, 0);
+module_param(use_dma , int, 0);
 MODULE_PARM_DESC(io, "cs89x0 I/O base address");
 MODULE_PARM_DESC(irq, "cs89x0 IRQ number");
 #if DEBUGGING
diff -Nru a/drivers/net/de600.c b/drivers/net/de600.c
--- a/drivers/net/de600.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/net/de600.c	2005-01-10 20:11:23 -08:00
@@ -75,15 +75,15 @@
 #include "de600.h"
 
 static unsigned int de600_debug = DE600_DEBUG;
-MODULE_PARM(de600_debug, "i");
+module_param(de600_debug, int, 0);
 MODULE_PARM_DESC(de600_debug, "DE-600 debug level (0-2)");
 
 static unsigned int check_lost = 1;
-MODULE_PARM(check_lost, "i");
+module_param(check_lost, bool, 0);
 MODULE_PARM_DESC(check_lost, "If set then check for unplugged de600");
 
 static unsigned int delay_time = 10;
-MODULE_PARM(delay_time, "i");
+module_param(delay_time, int, 0);
 MODULE_PARM_DESC(delay_time, "DE-600 deley on I/O in microseconds");
 
 
diff -Nru a/drivers/net/de620.c b/drivers/net/de620.c
--- a/drivers/net/de620.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/net/de620.c	2005-01-10 20:11:19 -08:00
@@ -190,12 +190,12 @@
 
 static spinlock_t de620_lock;
 
-MODULE_PARM(bnc, "i");
-MODULE_PARM(utp, "i");
-MODULE_PARM(io, "i");
-MODULE_PARM(irq, "i");
-MODULE_PARM(clone, "i");
-MODULE_PARM(de620_debug, "i");
+module_param(bnc, int, 0);
+module_param(utp, int, 0);
+module_param(io, int, 0);
+module_param(irq, int, 0);
+module_param(clone, int, 0);
+module_param(de620_debug, int, 0);
 MODULE_PARM_DESC(bnc, "DE-620 set BNC medium (0-1)");
 MODULE_PARM_DESC(utp, "DE-620 set UTP medium (0-1)");
 MODULE_PARM_DESC(io, "DE-620 I/O base address,required");
diff -Nru a/drivers/net/depca.c b/drivers/net/depca.c
--- a/drivers/net/depca.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/net/depca.c	2005-01-10 20:11:19 -08:00
@@ -463,11 +463,11 @@
         } depca_bus;	        /* type of bus */
 	struct depca_init init_block;	/* Shadow Initialization block            */
 /* CPU address space fields */
-	struct depca_rx_desc *rx_ring;	/* Pointer to start of RX descriptor ring */
-	struct depca_tx_desc *tx_ring;	/* Pointer to start of TX descriptor ring */
-	void *rx_buff[NUM_RX_DESC];	/* CPU virt address of sh'd memory buffs  */
-	void *tx_buff[NUM_TX_DESC];	/* CPU virt address of sh'd memory buffs  */
-	void *sh_mem;		/* CPU mapped virt address of device RAM  */
+	struct depca_rx_desc __iomem *rx_ring;	/* Pointer to start of RX descriptor ring */
+	struct depca_tx_desc __iomem *tx_ring;	/* Pointer to start of TX descriptor ring */
+	void __iomem *rx_buff[NUM_RX_DESC];	/* CPU virt address of sh'd memory buffs  */
+	void __iomem *tx_buff[NUM_TX_DESC];	/* CPU virt address of sh'd memory buffs  */
+	void __iomem *sh_mem;	/* CPU mapped virt address of device RAM  */
 	u_long mem_start;	/* Bus address of device RAM (before remap) */
 	u_long mem_len;		/* device memory size */
 /* Device address space fields */
@@ -693,11 +693,11 @@
 
 	/* Tx & Rx descriptors (aligned to a quadword boundary) */
 	offset = (offset + DEPCA_ALIGN) & ~DEPCA_ALIGN;
-	lp->rx_ring = (struct depca_rx_desc *) (lp->sh_mem + offset);
+	lp->rx_ring = (struct depca_rx_desc __iomem *) (lp->sh_mem + offset);
 	lp->rx_ring_offset = offset;
 
 	offset += (sizeof(struct depca_rx_desc) * NUM_RX_DESC);
-	lp->tx_ring = (struct depca_tx_desc *) (lp->sh_mem + offset);
+	lp->tx_ring = (struct depca_tx_desc __iomem *) (lp->sh_mem + offset);
 	lp->tx_ring_offset = offset;
 
 	offset += (sizeof(struct depca_tx_desc) * NUM_TX_DESC);
@@ -1649,7 +1649,7 @@
 static int __init DepcaSignature(char *name, u_long base_addr)
 {
 	u_int i, j, k;
-	void *ptr;
+	void __iomem *ptr;
 	char tmpstr[16];
 	u_long prom_addr = base_addr + 0xc000;
 	u_long mem_addr = base_addr + 0x8000; /* 32KB */
@@ -1876,17 +1876,17 @@
 		printk("Descriptor addresses (CPU):\nRX: ");
 		for (i = 0; i < lp->rxRingMask; i++) {
 			if (i < 3) {
-				printk("0x%8.8lx ", (long) &lp->rx_ring[i].base);
+				printk("%p ", &lp->rx_ring[i].base);
 			}
 		}
-		printk("...0x%8.8lx\n", (long) &lp->rx_ring[i].base);
+		printk("...%p\n", &lp->rx_ring[i].base);
 		printk("TX: ");
 		for (i = 0; i < lp->txRingMask; i++) {
 			if (i < 3) {
-				printk("0x%8.8lx ", (long) &lp->tx_ring[i].base);
+				printk("%p ", &lp->tx_ring[i].base);
 			}
 		}
-		printk("...0x%8.8lx\n", (long) &lp->tx_ring[i].base);
+		printk("...%p\n", &lp->tx_ring[i].base);
 		printk("\nDescriptor buffers (Device):\nRX: ");
 		for (i = 0; i < lp->rxRingMask; i++) {
 			if (i < 3) {
diff -Nru a/drivers/net/dgrs.c b/drivers/net/dgrs.c
--- a/drivers/net/dgrs.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/net/dgrs.c	2005-01-10 20:11:16 -08:00
@@ -1534,14 +1534,14 @@
 static __u32	ipxnet = -1;
 static int	nicmode = -1;
 
-MODULE_PARM(debug, "i");
-MODULE_PARM(dma, "i");
-MODULE_PARM(hashexpire, "i");
-MODULE_PARM(spantree, "i");
-MODULE_PARM(ipaddr, "1-4i");
-MODULE_PARM(iptrap, "1-4i");
-MODULE_PARM(ipxnet, "i");
-MODULE_PARM(nicmode, "i");
+module_param(debug, int, 0);
+module_param(dma, int, 0);
+module_param(hashexpire, int, 0);
+module_param(spantree, int, 0);
+module_param_array(ipaddr, int, NULL, 0);
+module_param_array(iptrap, int, NULL, 0);
+module_param(ipxnet, int, 0);
+module_param(nicmode, int, 0);
 MODULE_PARM_DESC(debug, "Digi RightSwitch enable debugging (0-1)");
 MODULE_PARM_DESC(dma, "Digi RightSwitch enable BM DMA (0-1)");
 MODULE_PARM_DESC(nicmode, "Digi RightSwitch operating mode (1: switch, 2: multi-NIC)");
diff -Nru a/drivers/net/dl2k.c b/drivers/net/dl2k.c
--- a/drivers/net/dl2k.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/net/dl2k.c	2005-01-10 20:11:18 -08:00
@@ -72,16 +72,16 @@
 MODULE_AUTHOR ("Edward Peng");
 MODULE_DESCRIPTION ("D-Link DL2000-based Gigabit Ethernet Adapter");
 MODULE_LICENSE("GPL");
-MODULE_PARM (mtu, "1-" __MODULE_STRING (MAX_UNITS) "i");
-MODULE_PARM (media, "1-" __MODULE_STRING (MAX_UNITS) "s");
-MODULE_PARM (vlan, "1-" __MODULE_STRING (MAX_UNITS) "i");
-MODULE_PARM (jumbo, "1-" __MODULE_STRING (MAX_UNITS) "i");
-MODULE_PARM (tx_flow, "i");
-MODULE_PARM (rx_flow, "i");
-MODULE_PARM (copy_thresh, "i");
-MODULE_PARM (rx_coalesce, "i");	/* Rx frame count each interrupt */
-MODULE_PARM (rx_timeout, "i");	/* Rx DMA wait time in 64ns increments */
-MODULE_PARM (tx_coalesce, "i"); /* HW xmit count each TxDMAComplete */
+module_param_array(mtu, int, NULL, 0);
+module_param_array(media, charp, NULL, 0);
+module_param_array(vlan, int, NULL, 0);
+module_param_array(jumbo, int, NULL, 0);
+module_param(tx_flow, int, 0);
+module_param(rx_flow, int, 0);
+module_param(copy_thresh, int, 0);
+module_param(rx_coalesce, int, 0);	/* Rx frame count each interrupt */
+module_param(rx_timeout, int, 0);	/* Rx DMA wait time in 64ns increments */
+module_param(tx_coalesce, int, 0); /* HW xmit count each TxDMAComplete */
 
 
 /* Enable the default interrupts */
diff -Nru a/drivers/net/e100.c b/drivers/net/e100.c
--- a/drivers/net/e100.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/net/e100.c	2005-01-10 20:11:23 -08:00
@@ -155,7 +155,7 @@
 
 #define DRV_NAME		"e100"
 #define DRV_EXT		"-NAPI"
-#define DRV_VERSION		"3.2.3-k2"DRV_EXT
+#define DRV_VERSION		"3.3.6-k2"DRV_EXT
 #define DRV_DESCRIPTION		"Intel(R) PRO/100 Network Driver"
 #define DRV_COPYRIGHT		"Copyright(c) 1999-2004 Intel Corporation"
 #define PFX			DRV_NAME ": "
@@ -166,6 +166,7 @@
 MODULE_DESCRIPTION(DRV_DESCRIPTION);
 MODULE_AUTHOR(DRV_COPYRIGHT);
 MODULE_LICENSE("GPL");
+MODULE_VERSION(DRV_VERSION);
 
 static int debug = 3;
 module_param(debug, int, 0);
@@ -200,6 +201,7 @@
 	INTEL_8255X_ETHERNET_DEVICE(0x1055, 5),
 	INTEL_8255X_ETHERNET_DEVICE(0x1056, 5),
 	INTEL_8255X_ETHERNET_DEVICE(0x1057, 5),
+	INTEL_8255X_ETHERNET_DEVICE(0x1059, 0),
 	INTEL_8255X_ETHERNET_DEVICE(0x1064, 6),
 	INTEL_8255X_ETHERNET_DEVICE(0x1065, 6),
 	INTEL_8255X_ETHERNET_DEVICE(0x1066, 6),
@@ -208,7 +210,6 @@
 	INTEL_8255X_ETHERNET_DEVICE(0x1069, 6),
 	INTEL_8255X_ETHERNET_DEVICE(0x106A, 6),
 	INTEL_8255X_ETHERNET_DEVICE(0x106B, 6),
-	INTEL_8255X_ETHERNET_DEVICE(0x1059, 0),
 	INTEL_8255X_ETHERNET_DEVICE(0x1209, 0),
 	INTEL_8255X_ETHERNET_DEVICE(0x1229, 0),
 	INTEL_8255X_ETHERNET_DEVICE(0x2449, 2),
@@ -620,8 +621,7 @@
 	writel(selftest | dma_addr, &nic->csr->port);
 	e100_write_flush(nic);
 	/* Wait 10 msec for self-test to complete */
-	set_current_state(TASK_UNINTERRUPTIBLE);
-	schedule_timeout(HZ / 100 + 1);
+	msleep(10);
 
 	/* Interrupts are enabled after self-test */
 	e100_disable_irq(nic);
@@ -669,8 +669,7 @@
 			e100_write_flush(nic); udelay(4);
 		}
 		/* Wait 10 msec for cmd to complete */
-		set_current_state(TASK_UNINTERRUPTIBLE);
-		schedule_timeout(HZ / 100 + 1);
+		msleep(10);
 
 		/* Chip deselect */
 		writeb(0, &nic->csr->eeprom_ctrl_lo);
@@ -1759,8 +1758,7 @@
 	memset(skb->data, 0xFF, ETH_DATA_LEN);
 	e100_xmit_frame(skb, nic->netdev);
 
-	set_current_state(TASK_UNINTERRUPTIBLE);
-	schedule_timeout(HZ / 100 + 1);
+	msleep(10);
 
 	if(memcmp(nic->rx_to_clean->skb->data + sizeof(struct rfd),
 	   skb->data, ETH_DATA_LEN))
@@ -1846,8 +1844,7 @@
 			mdio_read(netdev, nic->mii.phy_id, i);
 	memset(nic->mem->dump_buf, 0, sizeof(nic->mem->dump_buf));
 	e100_exec_cb(nic, NULL, e100_dump);
-	set_current_state(TASK_UNINTERRUPTIBLE);
-	schedule_timeout(HZ / 100 + 1);
+	msleep(10);
 	memcpy(&buff[2 + E100_PHY_REGS], nic->mem->dump_buf,
 		sizeof(nic->mem->dump_buf));
 }
@@ -2026,8 +2023,7 @@
 	if(!data || data > (u32)(MAX_SCHEDULE_TIMEOUT / HZ))
 		data = (u32)(MAX_SCHEDULE_TIMEOUT / HZ);
 	mod_timer(&nic->blink_timer, jiffies);
-	set_current_state(TASK_INTERRUPTIBLE);
-	schedule_timeout(data * HZ);
+	msleep_interruptible(data * 1000);
 	del_timer_sync(&nic->blink_timer);
 	mdio_write(netdev, nic->mii.phy_id, MII_LED_CONTROL, 0);
 
@@ -2326,7 +2322,7 @@
 	pci_save_state(pdev);
 	pci_enable_wake(pdev, state, nic->flags & (wol_magic | e100_asf(nic)));
 	pci_disable_device(pdev);
-	pci_set_power_state(pdev, state);
+	pci_set_power_state(pdev, pci_choose_state(pdev, state));
 
 	return 0;
 }
@@ -2336,7 +2332,7 @@
 	struct net_device *netdev = pci_get_drvdata(pdev);
 	struct nic *nic = netdev_priv(netdev);
 
-	pci_set_power_state(pdev, 0);
+	pci_set_power_state(pdev, PCI_D0);
 	pci_restore_state(pdev);
 	e100_hw_init(nic);
 
diff -Nru a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c
--- a/drivers/net/e1000/e1000_ethtool.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/net/e1000/e1000_ethtool.c	2005-01-10 20:11:18 -08:00
@@ -776,7 +776,7 @@
 e1000_intr_test(struct e1000_adapter *adapter, uint64_t *data)
 {
 	struct net_device *netdev = adapter->netdev;
- 	uint32_t icr, mask, i=0, shared_int = TRUE;
+ 	uint32_t mask, i=0, shared_int = TRUE;
  	uint32_t irq = adapter->pdev->irq;
 
 	*data = 0;
@@ -784,7 +784,8 @@
 	/* Hook up test interrupt handler just for this test */
  	if(!request_irq(irq, &e1000_test_intr, 0, netdev->name, netdev)) {
  		shared_int = FALSE;
- 	} else if(request_irq(irq, &e1000_test_intr, SA_SHIRQ, netdev->name, netdev)){
+ 	} else if(request_irq(irq, &e1000_test_intr, SA_SHIRQ, 
+			netdev->name, netdev)){
 		*data = 1;
 		return -1;
 	}
@@ -793,21 +794,6 @@
 	E1000_WRITE_REG(&adapter->hw, IMC, 0xFFFFFFFF);
 	msec_delay(10);
 
-	/* Interrupts are disabled, so read interrupt cause
-	 * register (icr) twice to verify that there are no interrupts
-	 * pending.  icr is clear on read.
-	 */
-	icr = E1000_READ_REG(&adapter->hw, ICR);
-	icr = E1000_READ_REG(&adapter->hw, ICR);
-
-	if(icr != 0) {
-		/* if icr is non-zero, there is no point
-		 * running other interrupt tests.
-		 */
-		*data = 2;
-		i = 10;
-	}
-
 	/* Test each interrupt */
 	for(; i < 10; i++) {
 
@@ -856,8 +842,10 @@
 			 * test failed.
 			 */
 			adapter->test_icr = 0;
-			E1000_WRITE_REG(&adapter->hw, IMC, ~mask);
-			E1000_WRITE_REG(&adapter->hw, ICS, ~mask);
+			E1000_WRITE_REG(&adapter->hw, IMC, 
+					(~mask & 0x00007FFF));
+			E1000_WRITE_REG(&adapter->hw, ICS, 
+					(~mask & 0x00007FFF));
 			msec_delay(10);
 
 			if(adapter->test_icr) {
@@ -1336,10 +1324,17 @@
 
 	msec_delay(200);
 
-	pci_dma_sync_single_for_cpu(pdev, rxdr->buffer_info[0].dma,
-			    rxdr->buffer_info[0].length, PCI_DMA_FROMDEVICE);
+	i = 0;
+	do {
+		pci_dma_sync_single_for_cpu(pdev, rxdr->buffer_info[i].dma,
+					    rxdr->buffer_info[i].length,
+					    PCI_DMA_FROMDEVICE);
+
+		if (!e1000_check_lbtest_frame(rxdr->buffer_info[i++].skb, 1024))
+			return 0;
+	} while (i < 64);
 
-	return e1000_check_lbtest_frame(rxdr->buffer_info[0].skb, 1024);
+	return 13;
 }
 
 static int
@@ -1358,10 +1353,27 @@
 e1000_link_test(struct e1000_adapter *adapter, uint64_t *data)
 {
 	*data = 0;
-	e1000_check_for_link(&adapter->hw);
 
-	if(!(E1000_READ_REG(&adapter->hw, STATUS) & E1000_STATUS_LU)) {
-		*data = 1;
+	if (adapter->hw.media_type == e1000_media_type_internal_serdes) {
+		int i = 0;
+		adapter->hw.serdes_link_down = TRUE;
+
+		/* on some blade server designs link establishment */
+		/* could take as long as 2-3 minutes.              */
+		do {
+			e1000_check_for_link(&adapter->hw);
+			if (adapter->hw.serdes_link_down == FALSE)
+				return *data;
+			msec_delay(20);
+		} while (i++ < 3750);
+
+		*data = 1; 
+	} else {
+		e1000_check_for_link(&adapter->hw);
+
+		if(!(E1000_READ_REG(&adapter->hw, STATUS) & E1000_STATUS_LU)) {
+			*data = 1;
+		}
 	}
 	return *data;
 }
@@ -1490,6 +1502,8 @@
 	case E1000_DEV_ID_82543GC_COPPER:
 	case E1000_DEV_ID_82544EI_FIBER:
 	case E1000_DEV_ID_82546EB_QUAD_COPPER:
+	case E1000_DEV_ID_82545EM_FIBER:
+	case E1000_DEV_ID_82545EM_COPPER:
 		return wol->wolopts ? -EOPNOTSUPP : 0;
 
 	case E1000_DEV_ID_82546EB_FIBER:
@@ -1554,9 +1568,7 @@
 	e1000_setup_led(&adapter->hw);
 	mod_timer(&adapter->blink_timer, jiffies);
 
-	set_current_state(TASK_INTERRUPTIBLE);
-
-	schedule_timeout(data * HZ);
+	msleep_interruptible(data * 1000);
 	del_timer_sync(&adapter->blink_timer);
 	e1000_led_off(&adapter->hw);
 	clear_bit(E1000_LED_ON, &adapter->led_status);
diff -Nru a/drivers/net/e1000/e1000_hw.c b/drivers/net/e1000/e1000_hw.c
--- a/drivers/net/e1000/e1000_hw.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/net/e1000/e1000_hw.c	2005-01-10 20:11:23 -08:00
@@ -123,16 +123,31 @@
 static void
 e1000_phy_init_script(struct e1000_hw *hw)
 {
+    uint32_t ret_val;
+    uint16_t phy_saved_data;
+
     DEBUGFUNC("e1000_phy_init_script");
 
+
     if(hw->phy_init_script) {
         msec_delay(20);
 
+        /* Save off the current value of register 0x2F5B to be restored at
+         * the end of this routine. */
+        ret_val = e1000_read_phy_reg(hw, 0x2F5B, &phy_saved_data);
+
+        /* Disabled the PHY transmitter */
+        e1000_write_phy_reg(hw, 0x2F5B, 0x0003);
+
+        msec_delay(20);
+
         e1000_write_phy_reg(hw,0x0000,0x0140);
 
         msec_delay(5);
 
-        if(hw->mac_type == e1000_82541 || hw->mac_type == e1000_82547) {
+        switch(hw->mac_type) {
+        case e1000_82541:
+        case e1000_82547:
             e1000_write_phy_reg(hw, 0x1F95, 0x0001);
 
             e1000_write_phy_reg(hw, 0x1F71, 0xBD21);
@@ -150,12 +165,23 @@
             e1000_write_phy_reg(hw, 0x1F96, 0x003F);
 
             e1000_write_phy_reg(hw, 0x2010, 0x0008);
-        } else {
+            break;
+
+        case e1000_82541_rev_2:
+        case e1000_82547_rev_2:
             e1000_write_phy_reg(hw, 0x1F73, 0x0099);
+            break;
+        default:
+            break;
         }
 
         e1000_write_phy_reg(hw, 0x0000, 0x3300);
 
+        msec_delay(20);
+
+        /* Now enable the transmitter */
+        e1000_write_phy_reg(hw, 0x2F5B, phy_saved_data);
+
         if(hw->mac_type == e1000_82547) {
             uint16_t fused, fine, coarse;
 
@@ -244,6 +270,7 @@
     case E1000_DEV_ID_82546GB_COPPER:
     case E1000_DEV_ID_82546GB_FIBER:
     case E1000_DEV_ID_82546GB_SERDES:
+    case E1000_DEV_ID_82546GB_PCIE:
         hw->mac_type = e1000_82546_rev_3;
         break;
     case E1000_DEV_ID_82541EI:
@@ -967,7 +994,7 @@
 
             if((hw->mac_type == e1000_82541) || (hw->mac_type == e1000_82547)) {
                 hw->dsp_config_state = e1000_dsp_config_disabled;
-                /* Force MDI for IGP B-0 PHY */
+                /* Force MDI for earlier revs of the IGP PHY */
                 phy_data &= ~(IGP01E1000_PSCR_AUTO_MDIX |
                               IGP01E1000_PSCR_FORCE_MDI_MDIX);
                 hw->mdix = 1;
@@ -2111,7 +2138,7 @@
          * at gigabit speed, then TBI compatibility is not needed.  If we are
          * at gigabit speed, we turn on TBI compatibility.
          */
-	if(hw->tbi_compatibility_en) {
+        if(hw->tbi_compatibility_en) {
             uint16_t speed, duplex;
             e1000_get_speed_and_duplex(hw, &speed, &duplex);
             if(speed != SPEED_1000) {
@@ -2466,12 +2493,14 @@
 
     DEBUGFUNC("e1000_read_phy_reg");
 
+
     if(hw->phy_type == e1000_phy_igp &&
        (reg_addr > MAX_PHY_MULTI_PAGE_REG)) {
         ret_val = e1000_write_phy_reg_ex(hw, IGP01E1000_PHY_PAGE_SELECT,
                                          (uint16_t)reg_addr);
-        if(ret_val)
+        if(ret_val) {
             return ret_val;
+        }
     }
 
     ret_val = e1000_read_phy_reg_ex(hw, IGP01E1000_PHY_PAGE_SELECT & reg_addr,
@@ -2570,12 +2599,14 @@
 
     DEBUGFUNC("e1000_write_phy_reg");
 
+
     if(hw->phy_type == e1000_phy_igp &&
        (reg_addr > MAX_PHY_MULTI_PAGE_REG)) {
         ret_val = e1000_write_phy_reg_ex(hw, IGP01E1000_PHY_PAGE_SELECT,
                                          (uint16_t)reg_addr);
-        if(ret_val)
+        if(ret_val) {
             return ret_val;
+        }
     }
 
     ret_val = e1000_write_phy_reg_ex(hw, IGP01E1000_PHY_PAGE_SELECT & reg_addr,
@@ -3478,7 +3509,7 @@
     /* A check for invalid values:  offset too large, too many words, and not
      * enough words.
      */
-    if((offset > eeprom->word_size) || (words > eeprom->word_size - offset) ||
+    if((offset >= eeprom->word_size) || (words > eeprom->word_size - offset) ||
        (words == 0)) {
         DEBUGOUT("\"words\" parameter out of bounds\n");
         return -E1000_ERR_EEPROM;
@@ -3626,7 +3657,7 @@
     /* A check for invalid values:  offset too large, too many words, and not
      * enough words.
      */
-    if((offset > eeprom->word_size) || (words > eeprom->word_size - offset) ||
+    if((offset >= eeprom->word_size) || (words > eeprom->word_size - offset) ||
        (words == 0)) {
         DEBUGOUT("\"words\" parameter out of bounds\n");
         return -E1000_ERR_EEPROM;
@@ -4918,7 +4949,7 @@
                                    boolean_t link_up)
 {
     int32_t ret_val;
-    uint16_t phy_data, speed, duplex, i;
+    uint16_t phy_data, phy_saved_data, speed, duplex, i;
     uint16_t dsp_reg_array[IGP01E1000_PHY_CHANNEL_NUM] =
                                         {IGP01E1000_PHY_AGC_PARAM_A,
                                         IGP01E1000_PHY_AGC_PARAM_B,
@@ -4999,6 +5030,21 @@
         }
     } else {
         if(hw->dsp_config_state == e1000_dsp_config_activated) {
+            /* Save off the current value of register 0x2F5B to be restored at
+             * the end of the routines. */
+            ret_val = e1000_read_phy_reg(hw, 0x2F5B, &phy_saved_data);
+
+            if(ret_val)
+                return ret_val;
+
+            /* Disable the PHY transmitter */
+            ret_val = e1000_write_phy_reg(hw, 0x2F5B, 0x0003);
+
+            if(ret_val)
+                return ret_val;
+
+            msec_delay(20);
+
             ret_val = e1000_write_phy_reg(hw, 0x0000,
                                           IGP01E1000_IEEE_FORCE_GIGA);
             if(ret_val)
@@ -5021,10 +5067,33 @@
             if(ret_val)
                 return ret_val;
 
+            msec_delay(20);
+
+            /* Now enable the transmitter */
+            ret_val = e1000_write_phy_reg(hw, 0x2F5B, phy_saved_data);
+
+            if(ret_val)
+                return ret_val;
+
             hw->dsp_config_state = e1000_dsp_config_enabled;
         }
 
         if(hw->ffe_config_state == e1000_ffe_config_active) {
+            /* Save off the current value of register 0x2F5B to be restored at
+             * the end of the routines. */
+            ret_val = e1000_read_phy_reg(hw, 0x2F5B, &phy_saved_data);
+
+            if(ret_val)
+                return ret_val;
+
+            /* Disable the PHY transmitter */
+            ret_val = e1000_write_phy_reg(hw, 0x2F5B, 0x0003);
+
+            if(ret_val)
+                return ret_val;
+
+            msec_delay(20);
+
             ret_val = e1000_write_phy_reg(hw, 0x0000,
                                           IGP01E1000_IEEE_FORCE_GIGA);
             if(ret_val)
@@ -5038,6 +5107,15 @@
                                           IGP01E1000_IEEE_RESTART_AUTONEG);
             if(ret_val)
                 return ret_val;
+
+            msec_delay(20);
+
+            /* Now enable the transmitter */
+            ret_val = e1000_write_phy_reg(hw, 0x2F5B, phy_saved_data);
+
+            if(ret_val)
+                return ret_val;
+
             hw->ffe_config_state = e1000_ffe_config_enabled;
         }
     }
@@ -5126,14 +5204,29 @@
          * Dx states where the power conservation is most important.  During
          * driver activity we should enable SmartSpeed, so performance is
          * maintained. */
-        ret_val = e1000_read_phy_reg(hw, IGP01E1000_PHY_PORT_CONFIG, &phy_data);
-        if(ret_val)
-            return ret_val;
+        if (hw->smart_speed == e1000_smart_speed_on) {
+            ret_val = e1000_read_phy_reg(hw, IGP01E1000_PHY_PORT_CONFIG,
+                                         &phy_data);
+            if(ret_val)
+                return ret_val;
 
-        phy_data |= IGP01E1000_PSCFR_SMART_SPEED;
-        ret_val = e1000_write_phy_reg(hw, IGP01E1000_PHY_PORT_CONFIG, phy_data);
-        if(ret_val)
-            return ret_val;
+            phy_data |= IGP01E1000_PSCFR_SMART_SPEED;
+            ret_val = e1000_write_phy_reg(hw, IGP01E1000_PHY_PORT_CONFIG,
+                                          phy_data);
+            if(ret_val)
+                return ret_val;
+        } else if (hw->smart_speed == e1000_smart_speed_off) {
+            ret_val = e1000_read_phy_reg(hw, IGP01E1000_PHY_PORT_CONFIG,
+                                         &phy_data);
+	    if (ret_val)
+                return ret_val;
+
+            phy_data &= ~IGP01E1000_PSCFR_SMART_SPEED;
+            ret_val = e1000_write_phy_reg(hw, IGP01E1000_PHY_PORT_CONFIG,
+                                          phy_data);
+            if(ret_val)
+                return ret_val;
+        }
 
     } else if((hw->autoneg_advertised == AUTONEG_ADVERTISE_SPEED_DEFAULT) ||
               (hw->autoneg_advertised == AUTONEG_ADVERTISE_10_ALL ) ||
diff -Nru a/drivers/net/e1000/e1000_hw.h b/drivers/net/e1000/e1000_hw.h
--- a/drivers/net/e1000/e1000_hw.h	2005-01-10 20:11:22 -08:00
+++ b/drivers/net/e1000/e1000_hw.h	2005-01-10 20:11:22 -08:00
@@ -168,6 +168,12 @@
 } e1000_downshift;
 
 typedef enum {
+    e1000_smart_speed_default = 0,
+    e1000_smart_speed_on,
+    e1000_smart_speed_off
+} e1000_smart_speed;
+
+typedef enum {
     e1000_polarity_reversal_enabled = 0,
     e1000_polarity_reversal_disabled,
     e1000_polarity_reversal_undefined = 0xFF
@@ -361,6 +367,7 @@
 #define E1000_DEV_ID_82546GB_COPPER      0x1079
 #define E1000_DEV_ID_82546GB_FIBER       0x107A
 #define E1000_DEV_ID_82546GB_SERDES      0x107B
+#define E1000_DEV_ID_82546GB_PCIE        0x108A
 #define E1000_DEV_ID_82547EI             0x1019
 #define NODE_ADDRESS_SIZE 6
 #define ETH_LENGTH_OF_ADDRESS 6
@@ -1026,6 +1033,7 @@
     uint8_t perm_mac_addr[NODE_ADDRESS_SIZE];
     boolean_t disable_polarity_correction;
     boolean_t speed_downgraded;
+    e1000_smart_speed smart_speed;
     e1000_dsp_config dsp_config_state;
     boolean_t get_link_status;
     boolean_t serdes_link_down;
diff -Nru a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
--- a/drivers/net/e1000/e1000_main.c	2005-01-10 20:11:24 -08:00
+++ b/drivers/net/e1000/e1000_main.c	2005-01-10 20:11:24 -08:00
@@ -35,10 +35,19 @@
  * - More errlogging support from Jon Mason <jonmason@us.ibm.com>
  * - Fix TSO issues on PPC64 machines -- Jon Mason <jonmason@us.ibm.com>
  *
- * 5.3.11	6/4/04
- * - ethtool register dump reads MANC register conditionally.
- *
- * 5.3.10	6/1/04
+ * 5.6.5 	11/01/04
+ * - Enabling NETIF_F_SG without checksum offload is illegal - 
+     John Mason <jdmason@us.ibm.com>
+ * 5.6.3        10/26/04
+ * - Remove redundant initialization - Jamal Hadi
+ * - Reset buffer_info->dma in tx resource cleanup logic
+ * 5.6.2	10/12/04
+ * - Avoid filling tx_ring completely - shemminger@osdl.org
+ * - Replace schedule_timeout() with msleep()/msleep_interruptible() -
+ *   nacc@us.ibm.com
+ * - Sparse cleanup - shemminger@osdl.org
+ * - Fix tx resource cleanup logic
+ * - LLTX support - ak@suse.de and hadi@cyberus.ca
  */
 
 char e1000_driver_name[] = "e1000";
@@ -48,7 +57,7 @@
 #else
 #define DRIVERNAPI "-NAPI"
 #endif
-char e1000_driver_version[] = "5.5.4-k2"DRIVERNAPI;
+char e1000_driver_version[] = "5.6.10.1-k2"DRIVERNAPI;
 char e1000_copyright[] = "Copyright (c) 1999-2004 Intel Corporation.";
 
 /* e1000_pci_tbl - PCI Device ID Table
@@ -90,6 +99,7 @@
 	INTEL_E1000_ETHERNET_DEVICE(0x107A),
 	INTEL_E1000_ETHERNET_DEVICE(0x107B),
 	INTEL_E1000_ETHERNET_DEVICE(0x107C),
+	INTEL_E1000_ETHERNET_DEVICE(0x108A),
 	/* required last entry */
 	{0,}
 };
@@ -128,8 +138,6 @@
 static struct net_device_stats * e1000_get_stats(struct net_device *netdev);
 static int e1000_change_mtu(struct net_device *netdev, int new_mtu);
 static int e1000_set_mac(struct net_device *netdev, void *p);
-static void e1000_irq_disable(struct e1000_adapter *adapter);
-static void e1000_irq_enable(struct e1000_adapter *adapter);
 static irqreturn_t e1000_intr(int irq, void *data, struct pt_regs *regs);
 static boolean_t e1000_clean_tx_irq(struct e1000_adapter *adapter);
 #ifdef CONFIG_E1000_NAPI
@@ -146,9 +154,6 @@
 void set_ethtool_ops(struct net_device *netdev);
 static void e1000_enter_82542_rst(struct e1000_adapter *adapter);
 static void e1000_leave_82542_rst(struct e1000_adapter *adapter);
-static void e1000_rx_checksum(struct e1000_adapter *adapter,
-				struct e1000_rx_desc *rx_desc,
-				struct sk_buff *skb);
 static void e1000_tx_timeout(struct net_device *dev);
 static void e1000_tx_timeout_task(struct net_device *dev);
 static void e1000_smartspeed(struct e1000_adapter *adapter);
@@ -242,6 +247,33 @@
 
 module_exit(e1000_exit_module);
 
+/**
+ * e1000_irq_disable - Mask off interrupt generation on the NIC
+ * @adapter: board private structure
+ **/
+
+static inline void
+e1000_irq_disable(struct e1000_adapter *adapter)
+{
+	atomic_inc(&adapter->irq_sem);
+	E1000_WRITE_REG(&adapter->hw, IMC, ~0);
+	E1000_WRITE_FLUSH(&adapter->hw);
+	synchronize_irq(adapter->pdev->irq);
+}
+
+/**
+ * e1000_irq_enable - Enable default interrupt generation settings
+ * @adapter: board private structure
+ **/
+
+static inline void
+e1000_irq_enable(struct e1000_adapter *adapter)
+{
+	if(likely(atomic_dec_and_test(&adapter->irq_sem))) {
+		E1000_WRITE_REG(&adapter->hw, IMS, IMS_ENABLE_MASK);
+		E1000_WRITE_FLUSH(&adapter->hw);
+	}
+}
 
 int
 e1000_up(struct e1000_adapter *adapter)
@@ -475,8 +507,6 @@
 				   NETIF_F_HW_VLAN_TX |
 				   NETIF_F_HW_VLAN_RX |
 				   NETIF_F_HW_VLAN_FILTER;
-	} else {
-		netdev->features = NETIF_F_SG;
 	}
 
 #ifdef NETIF_F_TSO
@@ -1061,6 +1091,24 @@
 	adapter->tx_ring.desc = NULL;
 }
 
+static inline void
+e1000_unmap_and_free_tx_resource(struct e1000_adapter *adapter,
+			struct e1000_buffer *buffer_info)
+{
+	struct pci_dev *pdev = adapter->pdev;
+	if(buffer_info->dma) {
+		pci_unmap_page(pdev,
+			       buffer_info->dma,
+			       buffer_info->length,
+			       PCI_DMA_TODEVICE);
+		buffer_info->dma = 0;
+	}
+	if(buffer_info->skb) {
+		dev_kfree_skb_any(buffer_info->skb);
+		buffer_info->skb = NULL;
+	}
+}
+
 /**
  * e1000_clean_tx_ring - Free Tx Buffers
  * @adapter: board private structure
@@ -1071,7 +1119,6 @@
 {
 	struct e1000_desc_ring *tx_ring = &adapter->tx_ring;
 	struct e1000_buffer *buffer_info;
-	struct pci_dev *pdev = adapter->pdev;
 	unsigned long size;
 	unsigned int i;
 
@@ -1079,17 +1126,7 @@
 
 	for(i = 0; i < tx_ring->count; i++) {
 		buffer_info = &tx_ring->buffer_info[i];
-		if(buffer_info->skb) {
-
-			pci_unmap_page(pdev,
-				       buffer_info->dma,
-				       buffer_info->length,
-				       PCI_DMA_TODEVICE);
-
-			dev_kfree_skb(buffer_info->skb);
-
-			buffer_info->skb = NULL;
-		}
+		e1000_unmap_and_free_tx_resource(adapter, buffer_info);
 	}
 
 	size = sizeof(struct e1000_buffer) * tx_ring->count;
@@ -1762,7 +1799,6 @@
 	unsigned int mss = 0;
 	int count = 0;
 	unsigned int f;
-	nr_frags = skb_shinfo(skb)->nr_frags;
 	len -= skb->data_len;
 
 	if(unlikely(skb->len <= 0)) {
@@ -1811,7 +1847,7 @@
 
 	/* need: count + 2 desc gap to keep tail from touching
 	 * head, otherwise try next time */
-	if(E1000_DESC_UNUSED(&adapter->tx_ring) < count + 2) {
+	if(unlikely(E1000_DESC_UNUSED(&adapter->tx_ring) < count + 2)) {
 		netif_stop_queue(netdev);
 		spin_unlock_irqrestore(&adapter->tx_lock, flags);
 		return NETDEV_TX_BUSY;
@@ -1844,6 +1880,10 @@
 
 	netdev->trans_start = jiffies;
 
+	/* Make sure there is space in the ring for the next send. */
+	if(unlikely(E1000_DESC_UNUSED(&adapter->tx_ring) < MAX_SKB_FRAGS + 2))
+		netif_stop_queue(netdev);
+
 	spin_unlock_irqrestore(&adapter->tx_lock, flags);
 	return NETDEV_TX_OK;
 }
@@ -1904,9 +1944,9 @@
 	int max_frame = new_mtu + ENET_HEADER_SIZE + ETHERNET_FCS_SIZE;
 
 	if((max_frame < MINIMUM_ETHERNET_FRAME_SIZE) ||
-	   (max_frame > MAX_JUMBO_FRAME_SIZE)) {
-		DPRINTK(PROBE, ERR, "Invalid MTU setting\n");
-		return -EINVAL;
+		(max_frame > MAX_JUMBO_FRAME_SIZE)) {
+			DPRINTK(PROBE, ERR, "Invalid MTU setting\n");
+			return -EINVAL;
 	}
 
 	if(max_frame <= MAXIMUM_ETHERNET_FRAME_SIZE) {
@@ -2074,34 +2114,6 @@
 }
 
 /**
- * e1000_irq_disable - Mask off interrupt generation on the NIC
- * @adapter: board private structure
- **/
-
-static void
-e1000_irq_disable(struct e1000_adapter *adapter)
-{
-	atomic_inc(&adapter->irq_sem);
-	E1000_WRITE_REG(&adapter->hw, IMC, ~0);
-	E1000_WRITE_FLUSH(&adapter->hw);
-	synchronize_irq(adapter->pdev->irq);
-}
-
-/**
- * e1000_irq_enable - Enable default interrupt generation settings
- * @adapter: board private structure
- **/
-
-static void
-e1000_irq_enable(struct e1000_adapter *adapter)
-{
-	if(likely(atomic_dec_and_test(&adapter->irq_sem))) {
-		E1000_WRITE_REG(&adapter->hw, IMS, IMS_ENABLE_MASK);
-		E1000_WRITE_FLUSH(&adapter->hw);
-	}
-}
-
-/**
  * e1000_intr - Interrupt Handler
  * @irq: interrupt number
  * @data: pointer to a network interface device structure
@@ -2162,6 +2174,9 @@
 	int tx_cleaned;
 	int work_done = 0;
 	
+	if (!netif_carrier_ok(netdev))
+		goto quit_polling;
+
 	tx_cleaned = e1000_clean_tx_irq(adapter);
 	e1000_clean_rx_irq(adapter, &work_done, work_to_do);
 
@@ -2171,7 +2186,7 @@
 	/* if no Rx and Tx cleanup work was done, exit the polling mode */
 	if(!tx_cleaned || (work_done < work_to_do) || 
 				!netif_running(netdev)) {
-		netif_rx_complete(netdev);
+quit_polling:	netif_rx_complete(netdev);
 		e1000_irq_enable(adapter);
 		return 0;
 	}
@@ -2190,7 +2205,6 @@
 {
 	struct e1000_desc_ring *tx_ring = &adapter->tx_ring;
 	struct net_device *netdev = adapter->netdev;
-	struct pci_dev *pdev = adapter->pdev;
 	struct e1000_tx_desc *tx_desc, *eop_desc;
 	struct e1000_buffer *buffer_info;
 	unsigned int i, eop;
@@ -2205,19 +2219,7 @@
 			tx_desc = E1000_TX_DESC(*tx_ring, i);
 			buffer_info = &tx_ring->buffer_info[i];
 
-			if(likely(buffer_info->dma)) {
-				pci_unmap_page(pdev,
-					       buffer_info->dma,
-					       buffer_info->length,
-					       PCI_DMA_TODEVICE);
-				buffer_info->dma = 0;
-			}
-
-			if(buffer_info->skb) {
-				dev_kfree_skb_any(buffer_info->skb);
-				buffer_info->skb = NULL;
-			}
-
+			e1000_unmap_and_free_tx_resource(adapter, buffer_info);
 			tx_desc->buffer_addr = 0;
 			tx_desc->lower.data = 0;
 			tx_desc->upper.data = 0;
@@ -2244,6 +2246,41 @@
 }
 
 /**
+ * e1000_rx_checksum - Receive Checksum Offload for 82543
+ * @adapter: board private structure
+ * @rx_desc: receive descriptor
+ * @sk_buff: socket buffer with received data
+ **/
+
+static inline void
+e1000_rx_checksum(struct e1000_adapter *adapter,
+                  struct e1000_rx_desc *rx_desc,
+                  struct sk_buff *skb)
+{
+	/* 82543 or newer only */
+	if(unlikely((adapter->hw.mac_type < e1000_82543) ||
+	/* Ignore Checksum bit is set */
+	(rx_desc->status & E1000_RXD_STAT_IXSM) ||
+	/* TCP Checksum has not been calculated */
+	(!(rx_desc->status & E1000_RXD_STAT_TCPCS)))) {
+		skb->ip_summed = CHECKSUM_NONE;
+		return;
+	}
+
+	/* At this point we know the hardware did the TCP checksum */
+	/* now look at the TCP checksum error bit */
+	if(rx_desc->errors & E1000_RXD_ERR_TCPE) {
+		/* let the stack verify checksum errors */
+		skb->ip_summed = CHECKSUM_NONE;
+		adapter->hw_csum_err++;
+	} else {
+		/* TCP checksum is good */
+		skb->ip_summed = CHECKSUM_UNNECESSARY;
+		adapter->hw_csum_good++;
+	}
+}
+
+/**
  * e1000_clean_rx_irq - Send received data up the network stack
  * @adapter: board private structure
  **/
@@ -2291,7 +2328,7 @@
 		if(unlikely(!(rx_desc->status & E1000_RXD_STAT_EOP))) {
 			/* All receives must fit into a single buffer */
 			E1000_DBG("%s: Receive packet consumed multiple"
-				  " buffers\n", netdev->name);
+					" buffers\n", netdev->name);
 			dev_kfree_skb_irq(skb);
 			goto next_desc;
 		}
@@ -2376,8 +2413,8 @@
 	buffer_info = &rx_ring->buffer_info[i];
 
 	while(!buffer_info->skb) {
-
 		skb = dev_alloc_skb(adapter->rx_buffer_len + NET_IP_ALIGN);
+
 		if(unlikely(!skb)) {
 			/* Better luck next round */
 			break;
@@ -2585,41 +2622,6 @@
 		return -EOPNOTSUPP;
 	}
 	return E1000_SUCCESS;
-}
-
-/**
- * e1000_rx_checksum - Receive Checksum Offload for 82543
- * @adapter: board private structure
- * @rx_desc: receive descriptor
- * @sk_buff: socket buffer with received data
- **/
-
-static void
-e1000_rx_checksum(struct e1000_adapter *adapter,
-                  struct e1000_rx_desc *rx_desc,
-                  struct sk_buff *skb)
-{
-	/* 82543 or newer only */
-	if(unlikely((adapter->hw.mac_type < e1000_82543) ||
-	/* Ignore Checksum bit is set */
-	(rx_desc->status & E1000_RXD_STAT_IXSM) ||
-	/* TCP Checksum has not been calculated */
-	(!(rx_desc->status & E1000_RXD_STAT_TCPCS)))) {
-		skb->ip_summed = CHECKSUM_NONE;
-		return;
-	}
-
-	/* At this point we know the hardware did the TCP checksum */
-	/* now look at the TCP checksum error bit */
-	if(rx_desc->errors & E1000_RXD_ERR_TCPE) {
-		/* let the stack verify checksum errors */
-		skb->ip_summed = CHECKSUM_NONE;
-		adapter->hw_csum_err++;
-	} else {
-		/* TCP checksum is good */
-		skb->ip_summed = CHECKSUM_UNNECESSARY;
-		adapter->hw_csum_good++;
-	}
 }
 
 void
diff -Nru a/drivers/net/e1000/e1000_osdep.h b/drivers/net/e1000/e1000_osdep.h
--- a/drivers/net/e1000/e1000_osdep.h	2005-01-10 20:11:17 -08:00
+++ b/drivers/net/e1000/e1000_osdep.h	2005-01-10 20:11:17 -08:00
@@ -42,13 +42,8 @@
 #include <linux/sched.h>
 
 #ifndef msec_delay
-#define msec_delay(x)	do { if(in_interrupt()) { \
-				/* Don't mdelay in interrupt context! */ \
-	                	BUG(); \
-			} else { \
-				set_current_state(TASK_UNINTERRUPTIBLE); \
-				schedule_timeout((x * HZ)/1000 + 2); \
-			} } while(0)
+#define msec_delay(x) msleep(x)
+
 /* Some workarounds require millisecond delays and are run during interrupt
  * context.  Most notably, when establishing link, the phy may need tweaking
  * but cannot process phy register reads/writes faster than millisecond
diff -Nru a/drivers/net/e1000/e1000_param.c b/drivers/net/e1000/e1000_param.c
--- a/drivers/net/e1000/e1000_param.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/net/e1000/e1000_param.c	2005-01-10 20:11:21 -08:00
@@ -47,7 +47,7 @@
 #define E1000_PARAM(X, desc) \
 	static int __devinitdata X[E1000_MAX_NIC+1] = E1000_PARAM_INIT; \
 	static int num_##X = 0; \
-	module_param_array(X, int, &num_##X, 0); \
+	module_param_array_named(X, X, int, &num_##X, 0); \
 	MODULE_PARM_DESC(X, desc);
 
 /* Transmit Descriptor Count
@@ -470,9 +470,6 @@
 		if (num_InterruptThrottleRate > bd) {
 			adapter->itr = InterruptThrottleRate[bd];
 			switch(adapter->itr) {
-			case -1:
-				adapter->itr = 1;
-				break;
 			case 0:
 				DPRINTK(PROBE, INFO, "%s turned off\n", 
 					opt.name);
@@ -481,13 +478,14 @@
 				DPRINTK(PROBE, INFO, "%s set to dynamic mode\n", 
 					opt.name);
 				break;
+			case -1:
 			default:
 				e1000_validate_option(&adapter->itr, &opt, 
 					adapter);
 				break;
 			}
 		} else {
-			adapter->itr = 1;
+			adapter->itr = opt.def;
 		}
 	}
 
diff -Nru a/drivers/net/e2100.c b/drivers/net/e2100.c
--- a/drivers/net/e2100.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/net/e2100.c	2005-01-10 20:11:22 -08:00
@@ -72,7 +72,7 @@
 #define E21_SAPROM		0x10	/* Offset to station address data. */
 #define E21_IO_EXTENT	 0x20
 
-static inline void mem_on(short port, volatile char *mem_base,
+static inline void mem_on(short port, volatile char __iomem *mem_base,
 						  unsigned char start_page )
 {
 	/* This is a little weird: set the shared memory window by doing a
@@ -143,6 +143,7 @@
 static void cleanup_card(struct net_device *dev)
 {
 	/* NB: e21_close() handles free_irq */
+	iounmap(ei_status.mem);
 	release_region(dev->base_addr, E21_IO_EXTENT);
 }
 
@@ -257,6 +258,13 @@
 	if (dev->mem_start == 0)
 		dev->mem_start = 0xd0000;
 
+	ei_status.mem = ioremap(dev->mem_start, 2*1024);
+	if (!ei_status.mem) {
+		printk("unable to remap memory\n");
+		retval = -EAGAIN;
+		goto out;
+	}
+
 #ifdef notdef
 	/* These values are unused.  The E2100 has a 2K window into the packet
 	   buffer.  The window can be set to start on any page boundary. */
@@ -329,7 +337,7 @@
 {
 
 	short ioaddr = dev->base_addr;
-	char *shared_mem = (char *)dev->mem_start;
+	char __iomem *shared_mem = ei_status.mem;
 
 	mem_on(ioaddr, shared_mem, ring_page);
 
@@ -352,12 +360,12 @@
 e21_block_input(struct net_device *dev, int count, struct sk_buff *skb, int ring_offset)
 {
 	short ioaddr = dev->base_addr;
-	char *shared_mem = (char *)dev->mem_start;
+	char __iomem *shared_mem = ei_status.mem;
 
 	mem_on(ioaddr, shared_mem, (ring_offset>>8));
 
 	/* Packet is always in one chunk -- we can copy + cksum. */
-	eth_io_copy_and_sum(skb, dev->mem_start + (ring_offset & 0xff), count, 0);
+	eth_io_copy_and_sum(skb, ei_status.mem + (ring_offset & 0xff), count, 0);
 
 	mem_off(ioaddr);
 }
@@ -367,7 +375,7 @@
 				 int start_page)
 {
 	short ioaddr = dev->base_addr;
-	volatile char *shared_mem = (char *)dev->mem_start;
+	volatile char __iomem *shared_mem = ei_status.mem;
 
 	/* Set the shared memory window start by doing a read, with the low address
 	   bits specifying the starting page. */
@@ -413,10 +421,10 @@
 static int mem[MAX_E21_CARDS];
 static int xcvr[MAX_E21_CARDS];		/* choose int. or ext. xcvr */
 
-MODULE_PARM(io, "1-" __MODULE_STRING(MAX_E21_CARDS) "i");
-MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_E21_CARDS) "i");
-MODULE_PARM(mem, "1-" __MODULE_STRING(MAX_E21_CARDS) "i");
-MODULE_PARM(xcvr, "1-" __MODULE_STRING(MAX_E21_CARDS) "i");
+module_param_array(io, int, NULL, 0);
+module_param_array(irq, int, NULL, 0);
+module_param_array(mem, int, NULL, 0);
+module_param_array(xcvr, int, NULL, 0);
 MODULE_PARM_DESC(io, "I/O base address(es)");
 MODULE_PARM_DESC(irq, "IRQ number(s)");
 MODULE_PARM_DESC(mem, " memory base address(es)");
diff -Nru a/drivers/net/eepro100.c b/drivers/net/eepro100.c
--- a/drivers/net/eepro100.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/net/eepro100.c	2005-01-10 20:11:20 -08:00
@@ -114,11 +114,7 @@
 #include <linux/skbuff.h>
 #include <linux/ethtool.h>
 
-/* enable PIO instead of MMIO, if CONFIG_EEPRO100_PIO is selected */
-#ifdef CONFIG_EEPRO100_PIO
-#define USE_IO 1
-#endif
-
+static int use_io;
 static int debug = -1;
 #define DEBUG_DEFAULT		(NETIF_MSG_DRV		| \
 				 NETIF_MSG_HW		| \
@@ -130,17 +126,18 @@
 MODULE_AUTHOR("Maintainer: Andrey V. Savochkin <saw@saw.sw.com.sg>");
 MODULE_DESCRIPTION("Intel i82557/i82558/i82559 PCI EtherExpressPro driver");
 MODULE_LICENSE("GPL");
-MODULE_PARM(debug, "i");
-MODULE_PARM(options, "1-" __MODULE_STRING(8) "i");
-MODULE_PARM(full_duplex, "1-" __MODULE_STRING(8) "i");
-MODULE_PARM(congenb, "i");
-MODULE_PARM(txfifo, "i");
-MODULE_PARM(rxfifo, "i");
-MODULE_PARM(txdmacount, "i");
-MODULE_PARM(rxdmacount, "i");
-MODULE_PARM(rx_copybreak, "i");
-MODULE_PARM(max_interrupt_work, "i");
-MODULE_PARM(multicast_filter_limit, "i");
+module_param(use_io, int, 0);
+module_param(debug, int, 0);
+module_param_array(options, int, NULL, 0);
+module_param_array(full_duplex, int, NULL, 0);
+module_param(congenb, int, 0);
+module_param(txfifo, int, 0);
+module_param(rxfifo, int, 0);
+module_param(txdmacount, int, 0);
+module_param(rxdmacount, int, 0);
+module_param(rx_copybreak, int, 0);
+module_param(max_interrupt_work, int, 0);
+module_param(multicast_filter_limit, int, 0);
 MODULE_PARM_DESC(debug, "debug level (0-6)");
 MODULE_PARM_DESC(options, "Bits 0-3: transceiver type, bit 4: full duplex, bit 5: 100Mbps");
 MODULE_PARM_DESC(full_duplex, "full duplex setting(s) (1)");
@@ -289,39 +286,13 @@
 
 */
 
-static int speedo_found1(struct pci_dev *pdev, long ioaddr, int fnd_cnt, int acpi_idle_state);
+static int speedo_found1(struct pci_dev *pdev, void __iomem *ioaddr, int fnd_cnt, int acpi_idle_state);
 
 enum pci_flags_bit {
 	PCI_USES_IO=1, PCI_USES_MEM=2, PCI_USES_MASTER=4,
 	PCI_ADDR0=0x10<<0, PCI_ADDR1=0x10<<1, PCI_ADDR2=0x10<<2, PCI_ADDR3=0x10<<3,
 };
 
-static inline unsigned int io_inw(unsigned long port)
-{
-	return inw(port);
-}
-static inline void io_outw(unsigned int val, unsigned long port)
-{
-	outw(val, port);
-}
-
-#ifndef USE_IO
-/* Currently alpha headers define in/out macros.
-   Undefine them.  2000/03/30  SAW */
-#undef inb
-#undef inw
-#undef inl
-#undef outb
-#undef outw
-#undef outl
-#define inb readb
-#define inw readw
-#define inl readl
-#define outb writeb
-#define outw writew
-#define outl writel
-#endif
-
 /* Offsets to the various registers.
    All accesses need not be longword aligned. */
 enum speedo_offsets {
@@ -453,6 +424,7 @@
    Unfortunately, all the positions have been shifted since there.
    A new re-alignment is required.  2000/03/06  SAW */
 struct speedo_private {
+    void __iomem *regs;
 	struct TxFD	*tx_ring;		/* Commands (usually CmdTxPacket). */
 	struct RxFD *rx_ringp[RX_RING_SIZE];	/* Rx descriptor, used as ring. */
 	/* The addresses of a Tx/Rx-in-place packets/buffers. */
@@ -520,7 +492,7 @@
 static int eepro100_init_one(struct pci_dev *pdev,
 		const struct pci_device_id *ent);
 
-static int do_eeprom_cmd(long ioaddr, int cmd, int cmd_len);
+static int do_eeprom_cmd(void __iomem *ioaddr, int cmd, int cmd_len);
 static int mdio_read(struct net_device *dev, int phy_id, int location);
 static void mdio_write(struct net_device *dev, int phy_id, int location, int value);
 static int speedo_open(struct net_device *dev);
@@ -551,15 +523,16 @@
 
 /* How to wait for the command unit to accept a command.
    Typically this takes 0 ticks. */
-static inline unsigned char wait_for_cmd_done(struct net_device *dev)
+static inline unsigned char wait_for_cmd_done(struct net_device *dev,
+											  	struct speedo_private *sp)
 {
 	int wait = 1000;
-	long cmd_ioaddr = dev->base_addr + SCBCmd;
+	void __iomem *cmd_ioaddr = sp->regs + SCBCmd;
 	unsigned char r;
 
 	do  {
 		udelay(1);
-		r = inb(cmd_ioaddr);
+		r = ioread8(cmd_ioaddr);
 	} while(r && --wait >= 0);
 
 	if (wait < 0)
@@ -570,10 +543,11 @@
 static int __devinit eepro100_init_one (struct pci_dev *pdev,
 		const struct pci_device_id *ent)
 {
-	unsigned long ioaddr;
-	int irq;
+	void __iomem *ioaddr;
+	int irq, pci_bar;
 	int acpi_idle_state = 0, pm;
 	static int cards_found /* = 0 */;
+	unsigned long pci_base;
 
 #ifndef MODULE
 	/* when built-in, we only print version if device is found */
@@ -607,24 +581,17 @@
 	}
 
 	irq = pdev->irq;
-#ifdef USE_IO
-	ioaddr = pci_resource_start(pdev, 1);
+	pci_bar = use_io ? 1 : 0;
+	pci_base = pci_resource_start(pdev, pci_bar);
 	if (DEBUG & NETIF_MSG_PROBE)
-		printk("Found Intel i82557 PCI Speedo at I/O %#lx, IRQ %d.\n",
-			   ioaddr, irq);
-#else
-	ioaddr = (unsigned long)ioremap(pci_resource_start(pdev, 0),
-									pci_resource_len(pdev, 0));
+		printk("Found Intel i82557 PCI Speedo at %#lx, IRQ %d.\n",
+		       pci_base, irq);
+
+	ioaddr = pci_iomap(pdev, pci_bar, 0);
 	if (!ioaddr) {
-		printk (KERN_ERR "eepro100: cannot remap MMIO region %lx @ %lx\n",
-				pci_resource_len(pdev, 0), pci_resource_start(pdev, 0));
+		printk (KERN_ERR "eepro100: cannot remap IO\n");
 		goto err_out_free_mmio_region;
 	}
-	if (DEBUG & NETIF_MSG_PROBE)
-		printk("Found Intel i82557 PCI Speedo, MMIO at %#lx, IRQ %d.\n",
-			   pci_resource_start(pdev, 0), irq);
-#endif
-
 
 	if (speedo_found1(pdev, ioaddr, cards_found, acpi_idle_state) == 0)
 		cards_found++;
@@ -634,9 +601,7 @@
 	return 0;
 
 err_out_iounmap: ;
-#ifndef USE_IO
-	iounmap ((void *)ioaddr);
-#endif
+	pci_iounmap(pdev, ioaddr);
 err_out_free_mmio_region:
 	release_mem_region(pci_resource_start(pdev, 0), pci_resource_len(pdev, 0));
 err_out_free_pio_region:
@@ -663,7 +628,7 @@
 #endif
 
 static int __devinit speedo_found1(struct pci_dev *pdev,
-		long ioaddr, int card_idx, int acpi_idle_state)
+		void __iomem *ioaddr, int card_idx, int acpi_idle_state)
 {
 	struct net_device *dev;
 	struct speedo_private *sp;
@@ -706,14 +671,16 @@
 	   The size test is for 6 bit vs. 8 bit address serial EEPROMs.
 	*/
 	{
-		unsigned long iobase;
+		void __iomem *iobase;
 		int read_cmd, ee_size;
 		u16 sum;
 		int j;
 
 		/* Use IO only to avoid postponed writes and satisfy EEPROM timing
 		   requirements. */
-		iobase = pci_resource_start(pdev, 1);
+		iobase = pci_iomap(pdev, 1, pci_resource_len(pdev, 1));
+		if (!iobase)
+			goto err_free_unlock;
 		if ((do_eeprom_cmd(iobase, EE_READ_CMD << 24, 27) & 0xffe0000)
 			== 0xffe0000) {
 			ee_size = 0x100;
@@ -739,13 +706,15 @@
 		/* Don't  unregister_netdev(dev);  as the EEPro may actually be
 		   usable, especially if the MAC address is set later.
 		   On the other hand, it may be unusable if MDI data is corrupted. */
+
+		pci_iounmap(pdev, iobase);
 	}
 
 	/* Reset the chip: stop Tx and Rx processes and clear counters.
 	   This takes less than 10usec and will easily finish before the next
 	   action. */
-	outl(PortReset, ioaddr + SCBPort);
-	inl(ioaddr + SCBPort);
+	iowrite32(PortReset, ioaddr + SCBPort);
+	ioread32(ioaddr + SCBPort);
 	udelay(10);
 
 	if (eeprom[3] & 0x0100)
@@ -758,13 +727,12 @@
 	for (i = 0; i < 5; i++)
 		printk("%2.2X:", dev->dev_addr[i]);
 	printk("%2.2X, ", dev->dev_addr[i]);
-#ifdef USE_IO
-	printk("I/O at %#3lx, ", ioaddr);
-#endif
 	printk("IRQ %d.\n", pdev->irq);
 
-	/* we must initialize base_addr early, for mdio_{read,write} */
-	dev->base_addr = ioaddr;
+	sp = netdev_priv(dev);
+
+	/* we must initialize this early, for mdio_{read,write} */
+	sp->regs = ioaddr;
 
 #if 1 || defined(kernel_bloat)
 	/* OK, this is pure kernel bloat.  I don't like it when other drivers
@@ -811,7 +779,7 @@
 		self_test_results = (s32*) ((((long) tx_ring_space) + 15) & ~0xf);
 		self_test_results[0] = 0;
 		self_test_results[1] = -1;
-		outl(tx_ring_dma | PortSelfTest, ioaddr + SCBPort);
+		iowrite32(tx_ring_dma | PortSelfTest, ioaddr + SCBPort);
 		do {
 			udelay(10);
 		} while (self_test_results[1] == -1  &&  --boguscnt >= 0);
@@ -835,8 +803,8 @@
 	}
 #endif  /* kernel_bloat */
 
-	outl(PortReset, ioaddr + SCBPort);
-	inl(ioaddr + SCBPort);
+	iowrite32(PortReset, ioaddr + SCBPort);
+	ioread32(ioaddr + SCBPort);
 	udelay(10);
 
 	/* Return the chip to its original power state. */
@@ -847,7 +815,6 @@
 
 	dev->irq = pdev->irq;
 
-	sp = netdev_priv(dev);
 	sp->pdev = pdev;
 	sp->msg_enable = DEBUG;
 	sp->acpi_pwr = acpi_idle_state;
@@ -910,27 +877,27 @@
 	return -1;
 }
 
-static void do_slow_command(struct net_device *dev, int cmd)
+static void do_slow_command(struct net_device *dev, struct speedo_private *sp, int cmd)
 {
-	long cmd_ioaddr = dev->base_addr + SCBCmd;
+	void __iomem *cmd_ioaddr = sp->regs + SCBCmd;
 	int wait = 0;
 	do
-		if (inb(cmd_ioaddr) == 0) break;
+		if (ioread8(cmd_ioaddr) == 0) break;
 	while(++wait <= 200);
 	if (wait > 100)
 		printk(KERN_ERR "Command %4.4x never accepted (%d polls)!\n",
-		       inb(cmd_ioaddr), wait);
+		       ioread8(cmd_ioaddr), wait);
 
-	outb(cmd, cmd_ioaddr);
+	iowrite8(cmd, cmd_ioaddr);
 
 	for (wait = 0; wait <= 100; wait++)
-		if (inb(cmd_ioaddr) == 0) return;
+		if (ioread8(cmd_ioaddr) == 0) return;
 	for (; wait <= 20000; wait++)
-		if (inb(cmd_ioaddr) == 0) return;
+		if (ioread8(cmd_ioaddr) == 0) return;
 		else udelay(1);
 	printk(KERN_ERR "Command %4.4x was not accepted after %d polls!"
 	       "  Current status %8.8x.\n",
-	       cmd, wait, inl(dev->base_addr + SCBStatus));
+	       cmd, wait, ioread32(sp->regs + SCBStatus));
 }
 
 /* Serial EEPROM section.
@@ -952,35 +919,36 @@
    interval for serial EEPROM.  However, it looks like that there is an
    additional requirement dictating larger udelay's in the code below.
    2000/05/24  SAW */
-static int __devinit do_eeprom_cmd(long ioaddr, int cmd, int cmd_len)
+static int __devinit do_eeprom_cmd(void __iomem *ioaddr, int cmd, int cmd_len)
 {
 	unsigned retval = 0;
-	long ee_addr = ioaddr + SCBeeprom;
+	void __iomem *ee_addr = ioaddr + SCBeeprom;
 
-	io_outw(EE_ENB, ee_addr); udelay(2);
-	io_outw(EE_ENB | EE_SHIFT_CLK, ee_addr); udelay(2);
+	iowrite16(EE_ENB, ee_addr); udelay(2);
+	iowrite16(EE_ENB | EE_SHIFT_CLK, ee_addr); udelay(2);
 
 	/* Shift the command bits out. */
 	do {
 		short dataval = (cmd & (1 << cmd_len)) ? EE_WRITE_1 : EE_WRITE_0;
-		io_outw(dataval, ee_addr); udelay(2);
-		io_outw(dataval | EE_SHIFT_CLK, ee_addr); udelay(2);
-		retval = (retval << 1) | ((io_inw(ee_addr) & EE_DATA_READ) ? 1 : 0);
+		iowrite16(dataval, ee_addr); udelay(2);
+		iowrite16(dataval | EE_SHIFT_CLK, ee_addr); udelay(2);
+		retval = (retval << 1) | ((ioread16(ee_addr) & EE_DATA_READ) ? 1 : 0);
 	} while (--cmd_len >= 0);
-	io_outw(EE_ENB, ee_addr); udelay(2);
+	iowrite16(EE_ENB, ee_addr); udelay(2);
 
 	/* Terminate the EEPROM access. */
-	io_outw(EE_ENB & ~EE_CS, ee_addr);
+	iowrite16(EE_ENB & ~EE_CS, ee_addr);
 	return retval;
 }
 
 static int mdio_read(struct net_device *dev, int phy_id, int location)
 {
-	long ioaddr = dev->base_addr;
+	struct speedo_private *sp = netdev_priv(dev);
+	void __iomem *ioaddr = sp->regs;
 	int val, boguscnt = 64*10;		/* <64 usec. to complete, typ 27 ticks */
-	outl(0x08000000 | (location<<16) | (phy_id<<21), ioaddr + SCBCtrlMDI);
+	iowrite32(0x08000000 | (location<<16) | (phy_id<<21), ioaddr + SCBCtrlMDI);
 	do {
-		val = inl(ioaddr + SCBCtrlMDI);
+		val = ioread32(ioaddr + SCBCtrlMDI);
 		if (--boguscnt < 0) {
 			printk(KERN_ERR " mdio_read() timed out with val = %8.8x.\n", val);
 			break;
@@ -991,12 +959,13 @@
 
 static void mdio_write(struct net_device *dev, int phy_id, int location, int value)
 {
-	long ioaddr = dev->base_addr;
+	struct speedo_private *sp = netdev_priv(dev);
+	void __iomem *ioaddr = sp->regs;
 	int val, boguscnt = 64*10;		/* <64 usec. to complete, typ 27 ticks */
-	outl(0x04000000 | (location<<16) | (phy_id<<21) | value,
+	iowrite32(0x04000000 | (location<<16) | (phy_id<<21) | value,
 		 ioaddr + SCBCtrlMDI);
 	do {
-		val = inl(ioaddr + SCBCtrlMDI);
+		val = ioread32(ioaddr + SCBCtrlMDI);
 		if (--boguscnt < 0) {
 			printk(KERN_ERR" mdio_write() timed out with val = %8.8x.\n", val);
 			break;
@@ -1008,13 +977,13 @@
 speedo_open(struct net_device *dev)
 {
 	struct speedo_private *sp = netdev_priv(dev);
-	long ioaddr = dev->base_addr;
+	void __iomem *ioaddr = sp->regs;
 	int retval;
 
 	if (netif_msg_ifup(sp))
 		printk(KERN_DEBUG "%s: speedo_open() irq %d.\n", dev->name, dev->irq);
 
-	pci_set_power_state(sp->pdev, 0);
+	pci_set_power_state(sp->pdev, PCI_D0);
 
 	/* Set up the Tx queue early.. */
 	sp->cur_tx = 0;
@@ -1052,7 +1021,7 @@
 	speedo_init_rx_ring(dev);
 
 	/* Fire up the hardware. */
-	outw(SCBMaskAll, ioaddr + SCBCmd);
+	iowrite16(SCBMaskAll, ioaddr + SCBCmd);
 	speedo_resume(dev);
 
 	netdevice_start(dev);
@@ -1071,7 +1040,7 @@
 
 	if (netif_msg_ifup(sp)) {
 		printk(KERN_DEBUG "%s: Done speedo_open(), status %8.8x.\n",
-			   dev->name, inw(ioaddr + SCBStatus));
+			   dev->name, ioread16(ioaddr + SCBStatus));
 	}
 
 	/* Set the timer.  The timer serves a dual purpose:
@@ -1095,46 +1064,46 @@
 static void speedo_resume(struct net_device *dev)
 {
 	struct speedo_private *sp = netdev_priv(dev);
-	long ioaddr = dev->base_addr;
+	void __iomem *ioaddr = sp->regs;
 
 	/* Start with a Tx threshold of 256 (0x..20.... 8 byte units). */
 	sp->tx_threshold = 0x01208000;
 
 	/* Set the segment registers to '0'. */
-	if (wait_for_cmd_done(dev) != 0) {
-		outl(PortPartialReset, ioaddr + SCBPort);
+	if (wait_for_cmd_done(dev, sp) != 0) {
+		iowrite32(PortPartialReset, ioaddr + SCBPort);
 		udelay(10);
 	}
 
-        outl(0, ioaddr + SCBPointer);
-        inl(ioaddr + SCBPointer);			/* Flush to PCI. */
+        iowrite32(0, ioaddr + SCBPointer);
+        ioread32(ioaddr + SCBPointer);			/* Flush to PCI. */
         udelay(10);			/* Bogus, but it avoids the bug. */
 
         /* Note: these next two operations can take a while. */
-        do_slow_command(dev, RxAddrLoad);
-        do_slow_command(dev, CUCmdBase);
+        do_slow_command(dev, sp, RxAddrLoad);
+        do_slow_command(dev, sp, CUCmdBase);
 
 	/* Load the statistics block and rx ring addresses. */
-	outl(sp->lstats_dma, ioaddr + SCBPointer);
-	inl(ioaddr + SCBPointer);			/* Flush to PCI */
+	iowrite32(sp->lstats_dma, ioaddr + SCBPointer);
+	ioread32(ioaddr + SCBPointer);			/* Flush to PCI */
 
-	outb(CUStatsAddr, ioaddr + SCBCmd);
+	iowrite8(CUStatsAddr, ioaddr + SCBCmd);
 	sp->lstats->done_marker = 0;
-	wait_for_cmd_done(dev);
+	wait_for_cmd_done(dev, sp);
 
 	if (sp->rx_ringp[sp->cur_rx % RX_RING_SIZE] == NULL) {
 		if (netif_msg_rx_err(sp))
 			printk(KERN_DEBUG "%s: NULL cur_rx in speedo_resume().\n",
 					dev->name);
 	} else {
-		outl(sp->rx_ring_dma[sp->cur_rx % RX_RING_SIZE],
+		iowrite32(sp->rx_ring_dma[sp->cur_rx % RX_RING_SIZE],
 			 ioaddr + SCBPointer);
-		inl(ioaddr + SCBPointer);		/* Flush to PCI */
+		ioread32(ioaddr + SCBPointer);		/* Flush to PCI */
 	}
 
 	/* Note: RxStart should complete instantly. */
-	do_slow_command(dev, RxStart);
-	do_slow_command(dev, CUDumpStats);
+	do_slow_command(dev, sp, RxStart);
+	do_slow_command(dev, sp, CUDumpStats);
 
 	/* Fill the first command with our physical address. */
 	{
@@ -1153,11 +1122,11 @@
 	}
 
 	/* Start the chip's Tx process and unmask interrupts. */
-	outl(TX_RING_ELEM_DMA(sp, sp->dirty_tx % TX_RING_SIZE),
+	iowrite32(TX_RING_ELEM_DMA(sp, sp->dirty_tx % TX_RING_SIZE),
 		 ioaddr + SCBPointer);
 	/* We are not ACK-ing FCP and ER in the interrupt handler yet so they should
 	   remain masked --Dragan */
-	outw(CUStart | SCBMaskEarlyRx | SCBMaskFlowCtl, ioaddr + SCBCmd);
+	iowrite16(CUStart | SCBMaskEarlyRx | SCBMaskFlowCtl, ioaddr + SCBCmd);
 }
 
 /*
@@ -1176,29 +1145,29 @@
 {
 	struct speedo_private *sp = netdev_priv(dev);
 	struct RxFD *rfd;
-	long ioaddr;
+	void __iomem *ioaddr;
 
-	ioaddr = dev->base_addr;
-	if (wait_for_cmd_done(dev) != 0) {
+	ioaddr = sp->regs;
+	if (wait_for_cmd_done(dev, sp) != 0) {
 		printk("%s: previous command stalled\n", dev->name);
 		return;
 	}
 	/*
 	* Put the hardware into a known state.
 	*/
-	outb(RxAbort, ioaddr + SCBCmd);
+	iowrite8(RxAbort, ioaddr + SCBCmd);
 
 	rfd = sp->rx_ringp[sp->cur_rx % RX_RING_SIZE];
 
 	rfd->rx_buf_addr = 0xffffffff;
 
-	if (wait_for_cmd_done(dev) != 0) {
+	if (wait_for_cmd_done(dev, sp) != 0) {
 		printk("%s: RxAbort command stalled\n", dev->name);
 		return;
 	}
-	outl(sp->rx_ring_dma[sp->cur_rx % RX_RING_SIZE],
+	iowrite32(sp->rx_ring_dma[sp->cur_rx % RX_RING_SIZE],
 		ioaddr + SCBPointer);
-	outb(RxStart, ioaddr + SCBCmd);
+	iowrite8(RxStart, ioaddr + SCBCmd);
 }
 
 
@@ -1207,7 +1176,7 @@
 {
 	struct net_device *dev = (struct net_device *)data;
 	struct speedo_private *sp = netdev_priv(dev);
-	long ioaddr = dev->base_addr;
+	void __iomem *ioaddr = sp->regs;
 	int phy_num = sp->phy[0] & 0x1f;
 
 	/* We have MII and lost link beat. */
@@ -1230,7 +1199,7 @@
 	mii_check_link(&sp->mii_if);
 	if (netif_msg_timer(sp)) {
 		printk(KERN_DEBUG "%s: Media control tick, status %4.4x.\n",
-			   dev->name, inw(ioaddr + SCBStatus));
+			   dev->name, ioread16(ioaddr + SCBStatus));
 	}
 	if (sp->rx_mode < 0  ||
 		(sp->rx_bug  && jiffies - sp->last_rx_time > 2*HZ)) {
@@ -1277,7 +1246,7 @@
 
 #if 0
 	{
-		long ioaddr = dev->base_addr;
+		void __iomem *ioaddr = sp->regs;
 		int phy_num = sp->phy[0] & 0x1f;
 		for (i = 0; i < 16; i++) {
 			/* FIXME: what does it mean?  --SAW */
@@ -1398,14 +1367,14 @@
 static void speedo_tx_timeout(struct net_device *dev)
 {
 	struct speedo_private *sp = netdev_priv(dev);
-	long ioaddr = dev->base_addr;
-	int status = inw(ioaddr + SCBStatus);
+	void __iomem *ioaddr = sp->regs;
+	int status = ioread16(ioaddr + SCBStatus);
 	unsigned long flags;
 
 	if (netif_msg_tx_err(sp)) {
 		printk(KERN_WARNING "%s: Transmit timed out: status %4.4x "
 		   " %4.4x at %d/%d command %8.8x.\n",
-		   dev->name, status, inw(ioaddr + SCBCmd),
+		   dev->name, status, ioread16(ioaddr + SCBCmd),
 		   sp->dirty_tx, sp->cur_tx,
 		   sp->tx_ring[sp->dirty_tx % TX_RING_SIZE].status);
 
@@ -1417,9 +1386,9 @@
 		/* Only the command unit has stopped. */
 		printk(KERN_WARNING "%s: Trying to restart the transmitter...\n",
 			   dev->name);
-		outl(TX_RING_ELEM_DMA(sp, dirty_tx % TX_RING_SIZE]),
+		iowrite32(TX_RING_ELEM_DMA(sp, dirty_tx % TX_RING_SIZE]),
 			 ioaddr + SCBPointer);
-		outw(CUStart, ioaddr + SCBCmd);
+		iowrite16(CUStart, ioaddr + SCBCmd);
 		reset_mii(dev);
 	} else {
 #else
@@ -1427,12 +1396,12 @@
 #endif
 		del_timer_sync(&sp->timer);
 		/* Reset the Tx and Rx units. */
-		outl(PortReset, ioaddr + SCBPort);
+		iowrite32(PortReset, ioaddr + SCBPort);
 		/* We may get spurious interrupts here.  But I don't think that they
 		   may do much harm.  1999/12/09 SAW */
 		udelay(10);
 		/* Disable interrupts. */
-		outw(SCBMaskAll, ioaddr + SCBCmd);
+		iowrite16(SCBMaskAll, ioaddr + SCBCmd);
 		synchronize_irq(dev->irq);
 		speedo_tx_buffer_gc(dev);
 		/* Free as much as possible.
@@ -1460,7 +1429,7 @@
 speedo_start_xmit(struct sk_buff *skb, struct net_device *dev)
 {
 	struct speedo_private *sp = netdev_priv(dev);
-	long ioaddr = dev->base_addr;
+	void __iomem *ioaddr = sp->regs;
 	int entry;
 
 	/* Prevent interrupts from changing the Tx ring from underneath us. */
@@ -1499,18 +1468,18 @@
 	/* workaround for hardware bug on 10 mbit half duplex */
 
 	if ((sp->partner == 0) && (sp->chip_id == 1)) {
-		wait_for_cmd_done(dev);
-		outb(0 , ioaddr + SCBCmd);
+		wait_for_cmd_done(dev, sp);
+		iowrite8(0 , ioaddr + SCBCmd);
 		udelay(1);
 	}
 
 	/* Trigger the command unit resume. */
-	wait_for_cmd_done(dev);
+	wait_for_cmd_done(dev, sp);
 	clear_suspend(sp->last_cmd);
 	/* We want the time window between clearing suspend flag on the previous
 	   command and resuming CU to be as small as possible.
 	   Interrupts in between are very undesired.  --SAW */
-	outb(CUResume, ioaddr + SCBCmd);
+	iowrite8(CUResume, ioaddr + SCBCmd);
 	sp->last_cmd = (struct descriptor *)&sp->tx_ring[entry];
 
 	/* Leave room for set_rx_mode(). If there is no more space than reserved
@@ -1592,12 +1561,13 @@
 {
 	struct net_device *dev = (struct net_device *)dev_instance;
 	struct speedo_private *sp;
-	long ioaddr, boguscnt = max_interrupt_work;
+	void __iomem *ioaddr;
+	long boguscnt = max_interrupt_work;
 	unsigned short status;
 	unsigned int handled = 0;
 
-	ioaddr = dev->base_addr;
 	sp = netdev_priv(dev);
+	ioaddr = sp->regs;
 
 #ifndef final_version
 	/* A lock to prevent simultaneous entry on SMP machines. */
@@ -1610,11 +1580,11 @@
 #endif
 
 	do {
-		status = inw(ioaddr + SCBStatus);
+		status = ioread16(ioaddr + SCBStatus);
 		/* Acknowledge all of the current interrupt sources ASAP. */
 		/* Will change from 0xfc00 to 0xff00 when we start handling
 		   FCP and ER interrupts --Dragan */
-		outw(status & 0xfc00, ioaddr + SCBStatus);
+		iowrite16(status & 0xfc00, ioaddr + SCBStatus);
 
 		if (netif_msg_intr(sp))
 			printk(KERN_DEBUG "%s: interrupt  status=%#4.4x.\n",
@@ -1674,14 +1644,14 @@
 			/* Clear all interrupt sources. */
 			/* Will change from 0xfc00 to 0xff00 when we start handling
 			   FCP and ER interrupts --Dragan */
-			outw(0xfc00, ioaddr + SCBStatus);
+			iowrite16(0xfc00, ioaddr + SCBStatus);
 			break;
 		}
 	} while (1);
 
 	if (netif_msg_intr(sp))
 		printk(KERN_DEBUG "%s: exiting interrupt, status=%#4.4x.\n",
-			   dev->name, inw(ioaddr + SCBStatus));
+			   dev->name, ioread16(ioaddr + SCBStatus));
 
 	clear_bit(0, (void*)&sp->in_interrupt);
 	return IRQ_RETVAL(handled);
@@ -1900,8 +1870,8 @@
 static int
 speedo_close(struct net_device *dev)
 {
-	long ioaddr = dev->base_addr;
 	struct speedo_private *sp = netdev_priv(dev);
+	void __iomem *ioaddr = sp->regs;
 	int i;
 
 	netdevice_stop(dev);
@@ -1909,16 +1879,16 @@
 
 	if (netif_msg_ifdown(sp))
 		printk(KERN_DEBUG "%s: Shutting down ethercard, status was %4.4x.\n",
-			   dev->name, inw(ioaddr + SCBStatus));
+			   dev->name, ioread16(ioaddr + SCBStatus));
 
 	/* Shut off the media monitoring timer. */
 	del_timer_sync(&sp->timer);
 
-	outw(SCBMaskAll, ioaddr + SCBCmd);
+	iowrite16(SCBMaskAll, ioaddr + SCBCmd);
 
 	/* Shutting down the chip nicely fails to disable flow control. So.. */
-	outl(PortPartialReset, ioaddr + SCBPort);
-	inl(ioaddr + SCBPort); /* flush posted write */
+	iowrite32(PortPartialReset, ioaddr + SCBPort);
+	ioread32(ioaddr + SCBPort); /* flush posted write */
 	/*
 	 * The chip requires a 10 microsecond quiet period.  Wait here!
 	 */
@@ -1963,7 +1933,7 @@
 	if (netif_msg_ifdown(sp))
 		printk(KERN_DEBUG "%s: %d multicast blocks dropped.\n", dev->name, i);
 
-	pci_set_power_state(sp->pdev, 2);
+	pci_set_power_state(sp->pdev, PCI_D2);
 
 	return 0;
 }
@@ -1980,7 +1950,7 @@
 speedo_get_stats(struct net_device *dev)
 {
 	struct speedo_private *sp = netdev_priv(dev);
-	long ioaddr = dev->base_addr;
+	void __iomem *ioaddr = sp->regs;
 
 	/* Update only if the previous dump finished. */
 	if (sp->lstats->done_marker == le32_to_cpu(0xA007)) {
@@ -2001,8 +1971,8 @@
 			/* Take a spinlock to make wait_for_cmd_done and sending the
 			   command atomic.  --SAW */
 			spin_lock_irqsave(&sp->lock, flags);
-			wait_for_cmd_done(dev);
-			outb(CUDumpStats, ioaddr + SCBCmd);
+			wait_for_cmd_done(dev, sp);
+			iowrite8(CUDumpStats, ioaddr + SCBCmd);
 			spin_unlock_irqrestore(&sp->lock, flags);
 		}
 	}
@@ -2088,7 +2058,7 @@
 		   access from the timeout handler.
 		   They are currently serialized only with MDIO access from the
 		   timer routine.  2000/05/09 SAW */
-		saved_acpi = pci_set_power_state(sp->pdev, 0);
+		saved_acpi = pci_set_power_state(sp->pdev, PCI_D0);
 		t = del_timer_sync(&sp->timer);
 		data->val_out = mdio_read(dev, data->phy_id & 0x1f, data->reg_num & 0x1f);
 		if (t)
@@ -2099,7 +2069,7 @@
 	case SIOCSMIIREG:		/* Write MII PHY register. */
 		if (!capable(CAP_NET_ADMIN))
 			return -EPERM;
-		saved_acpi = pci_set_power_state(sp->pdev, 0);
+		saved_acpi = pci_set_power_state(sp->pdev, PCI_D0);
 		t = del_timer_sync(&sp->timer);
 		mdio_write(dev, data->phy_id, data->reg_num, data->val_in);
 		if (t)
@@ -2123,7 +2093,7 @@
 static void set_rx_mode(struct net_device *dev)
 {
 	struct speedo_private *sp = netdev_priv(dev);
-	long ioaddr = dev->base_addr;
+	void __iomem *ioaddr = sp->regs;
 	struct descriptor *last_cmd;
 	char new_rx_mode;
 	unsigned long flags;
@@ -2178,9 +2148,9 @@
 			config_cmd_data[8] = 0;
 		}
 		/* Trigger the command unit resume. */
-		wait_for_cmd_done(dev);
+		wait_for_cmd_done(dev, sp);
 		clear_suspend(last_cmd);
-		outb(CUResume, ioaddr + SCBCmd);
+		iowrite8(CUResume, ioaddr + SCBCmd);
 		if ((int)(sp->cur_tx - sp->dirty_tx) >= TX_QUEUE_LIMIT) {
 			netif_stop_queue(dev);
 			sp->tx_full = 1;
@@ -2215,10 +2185,10 @@
 			*setup_params++ = *eaddrs++;
 		}
 
-		wait_for_cmd_done(dev);
+		wait_for_cmd_done(dev, sp);
 		clear_suspend(last_cmd);
 		/* Immediately trigger the command unit resume. */
-		outb(CUResume, ioaddr + SCBCmd);
+		iowrite8(CUResume, ioaddr + SCBCmd);
 
 		if ((int)(sp->cur_tx - sp->dirty_tx) >= TX_QUEUE_LIMIT) {
 			netif_stop_queue(dev);
@@ -2291,10 +2261,10 @@
 		pci_dma_sync_single_for_device(sp->pdev, mc_blk->frame_dma,
 									   mc_blk->len, PCI_DMA_TODEVICE);
 
-		wait_for_cmd_done(dev);
+		wait_for_cmd_done(dev, sp);
 		clear_suspend(last_cmd);
 		/* Immediately trigger the command unit resume. */
-		outb(CUResume, ioaddr + SCBCmd);
+		iowrite8(CUResume, ioaddr + SCBCmd);
 
 		if ((int)(sp->cur_tx - sp->dirty_tx) >= TX_QUEUE_LIMIT) {
 			netif_stop_queue(dev);
@@ -2315,7 +2285,7 @@
 {
 	struct net_device *dev = pci_get_drvdata (pdev);
 	struct speedo_private *sp = netdev_priv(dev);
-	long ioaddr = dev->base_addr;
+	void __iomem *ioaddr = sp->regs;
 
 	pci_save_state(pdev);
 
@@ -2325,7 +2295,7 @@
 	del_timer_sync(&sp->timer);
 
 	netif_device_detach(dev);
-	outl(PortPartialReset, ioaddr + SCBPort);
+	iowrite32(PortPartialReset, ioaddr + SCBPort);
 	
 	/* XXX call pci_set_power_state ()? */
 	pci_disable_device(pdev);
@@ -2337,7 +2307,7 @@
 {
 	struct net_device *dev = pci_get_drvdata (pdev);
 	struct speedo_private *sp = netdev_priv(dev);
-	long ioaddr = dev->base_addr;
+	void __iomem *ioaddr = sp->regs;
 
 	pci_set_power_state(pdev, 0);
 	pci_restore_state(pdev);
@@ -2354,7 +2324,7 @@
 		  reinitialization;
 		- serialization with other driver calls.
 	   2000/03/08  SAW */
-	outw(SCBMaskAll, ioaddr + SCBCmd);
+	iowrite16(SCBMaskAll, ioaddr + SCBCmd);
 	speedo_resume(dev);
 	netif_device_attach(dev);
 	sp->rx_mode = -1;
@@ -2376,10 +2346,7 @@
 	release_region(pci_resource_start(pdev, 1), pci_resource_len(pdev, 1));
 	release_mem_region(pci_resource_start(pdev, 0), pci_resource_len(pdev, 0));
 
-#ifndef USE_IO
-	iounmap((char *)dev->base_addr);
-#endif
-
+	pci_iounmap(pdev, sp->regs);
 	pci_free_consistent(pdev, TX_RING_SIZE * sizeof(struct TxFD)
 								+ sizeof(struct speedo_stats),
 						sp->tx_ring, sp->tx_ring_dma);
diff -Nru a/drivers/net/eexpress.c b/drivers/net/eexpress.c
--- a/drivers/net/eexpress.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/net/eexpress.c	2005-01-10 20:11:15 -08:00
@@ -1691,8 +1691,8 @@
 static int irq[EEXP_MAX_CARDS];
 static int io[EEXP_MAX_CARDS];
 
-MODULE_PARM(io, "1-" __MODULE_STRING(EEXP_MAX_CARDS) "i");
-MODULE_PARM(irq, "1-" __MODULE_STRING(EEXP_MAX_CARDS) "i");
+module_param_array(io, int, NULL, 0);
+module_param_array(irq, int, NULL, 0);
 MODULE_PARM_DESC(io, "EtherExpress 16 I/O base address(es)");
 MODULE_PARM_DESC(irq, "EtherExpress 16 IRQ number(s)");
 MODULE_LICENSE("GPL");
diff -Nru a/drivers/net/epic100.c b/drivers/net/epic100.c
--- a/drivers/net/epic100.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/net/epic100.c	2005-01-10 20:11:18 -08:00
@@ -149,10 +149,10 @@
 MODULE_DESCRIPTION("SMC 83c170 EPIC series Ethernet driver");
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(debug, "i");
-MODULE_PARM(rx_copybreak, "i");
-MODULE_PARM(options, "1-" __MODULE_STRING(MAX_UNITS) "i");
-MODULE_PARM(full_duplex, "1-" __MODULE_STRING(MAX_UNITS) "i");
+module_param(debug, int, 0);
+module_param(rx_copybreak, int, 0);
+module_param_array(options, int, NULL, 0);
+module_param_array(full_duplex, int, NULL, 0);
 MODULE_PARM_DESC(debug, "EPIC/100 debug level (0-5)");
 MODULE_PARM_DESC(options, "EPIC/100: Bits 0-3: media type, bit 4: full duplex");
 MODULE_PARM_DESC(rx_copybreak, "EPIC/100 copy breakpoint for copy-only-tiny-frames");
diff -Nru a/drivers/net/es3210.c b/drivers/net/es3210.c
--- a/drivers/net/es3210.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/net/es3210.c	2005-01-10 20:11:21 -08:00
@@ -414,9 +414,9 @@
 static int irq[MAX_ES_CARDS];
 static int mem[MAX_ES_CARDS];
 
-MODULE_PARM(io, "1-" __MODULE_STRING(MAX_ES_CARDS) "i");
-MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_ES_CARDS) "i");
-MODULE_PARM(mem, "1-" __MODULE_STRING(MAX_ES_CARDS) "i");
+module_param_array(io, int, NULL, 0);
+module_param_array(irq, int, NULL, 0);
+module_param_array(mem, int, NULL, 0);
 MODULE_PARM_DESC(io, "I/O base address(es)");
 MODULE_PARM_DESC(irq, "IRQ number(s)");
 MODULE_PARM_DESC(mem, "memory base address(es)");
diff -Nru a/drivers/net/eth16i.c b/drivers/net/eth16i.c
--- a/drivers/net/eth16i.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/net/eth16i.c	2005-01-10 20:11:21 -08:00
@@ -1420,18 +1420,18 @@
 MODULE_LICENSE("GPL");
 
 
-MODULE_PARM(io, "1-" __MODULE_STRING(MAX_ETH16I_CARDS) "i");
+module_param_array(io, int, NULL, 0);
 MODULE_PARM_DESC(io, "eth16i I/O base address(es)");
 
 #if 0
-MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_ETH16I_CARDS) "i");
+module_param_array(irq, int, NULL, 0);
 MODULE_PARM_DESC(irq, "eth16i interrupt request number");
 #endif
 
-MODULE_PARM(mediatype, "1-" __MODULE_STRING(MAX_ETH16I_CARDS) "s");
+module_param_array(mediatype, charp, NULL, 0);
 MODULE_PARM_DESC(mediatype, "eth16i media type of interface(s) (bnc,tp,dix,auto,eprom)");
 
-MODULE_PARM(debug, "i");
+module_param(debug, int, 0);
 MODULE_PARM_DESC(debug, "eth16i debug level (0-6)");
 
 int init_module(void)
diff -Nru a/drivers/net/ewrk3.c b/drivers/net/ewrk3.c
--- a/drivers/net/ewrk3.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/net/ewrk3.c	2005-01-10 20:11:23 -08:00
@@ -202,7 +202,6 @@
 #define EWRK3_IOP_INC 0x20	/* I/O address increment */
 #define EWRK3_TOTAL_SIZE 0x20	/* required I/O address length */
 
-/* If you change this, remember to also change MODULE_PARM array limits */
 #ifndef MAX_NUM_EWRK3S
 #define MAX_NUM_EWRK3S 21
 #endif
@@ -1945,8 +1944,8 @@
 static int io[MAX_NUM_EWRK3S+1] = { 0x300, 0, };
 
 /* '21' below should really be 'MAX_NUM_EWRK3S' */
-MODULE_PARM(io, "0-21i");
-MODULE_PARM(irq, "0-21i");
+module_param_array(io, int, NULL, 0);
+module_param_array(irq, int, NULL, 0);
 MODULE_PARM_DESC(io, "EtherWORKS 3 I/O base address(es)");
 MODULE_PARM_DESC(irq, "EtherWORKS 3 IRQ number(s)");
 
diff -Nru a/drivers/net/fealnx.c b/drivers/net/fealnx.c
--- a/drivers/net/fealnx.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/net/fealnx.c	2005-01-10 20:11:21 -08:00
@@ -125,13 +125,13 @@
 MODULE_AUTHOR("Myson or whoever");
 MODULE_DESCRIPTION("Myson MTD-8xx 100/10M Ethernet PCI Adapter Driver");
 MODULE_LICENSE("GPL");
-MODULE_PARM(max_interrupt_work, "i");
+module_param(max_interrupt_work, int, 0);
 //MODULE_PARM(min_pci_latency, "i");
-MODULE_PARM(debug, "i");
-MODULE_PARM(rx_copybreak, "i");
-MODULE_PARM(multicast_filter_limit, "i");
-MODULE_PARM(options, "1-" __MODULE_STRING(MAX_UNITS) "i");
-MODULE_PARM(full_duplex, "1-" __MODULE_STRING(MAX_UNITS) "i");
+module_param(debug, int, 0);
+module_param(rx_copybreak, int, 0);
+module_param(multicast_filter_limit, int, 0);
+module_param_array(options, int, NULL, 0);
+module_param_array(full_duplex, int, NULL, 0);
 MODULE_PARM_DESC(max_interrupt_work, "fealnx maximum events handled per interrupt");
 MODULE_PARM_DESC(debug, "fealnx enable debugging (0-1)");
 MODULE_PARM_DESC(rx_copybreak, "fealnx copy breakpoint for copy-only-tiny-frames");
diff -Nru a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
--- a/drivers/net/forcedeth.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/net/forcedeth.c	2005-01-10 20:11:15 -08:00
@@ -79,6 +79,8 @@
  *	0.30: 25 Sep 2004: rx checksum support for nf 250 Gb. Add rx reset
  *			   into nv_close, otherwise reenabling for wol can
  *			   cause DMA to kfree'd memory.
+ *	0.31: 14 Nov 2004: ethtool support for getting/setting link
+ *	                   capabilities.
  *
  * Known bugs:
  * We suspect that on some hardware no TX done interrupts are generated.
@@ -90,7 +92,7 @@
  * DEV_NEED_TIMERIRQ will not harm you on sane hardware, only generating a few
  * superfluous timer interrupts from the nic.
  */
-#define FORCEDETH_VERSION		"0.30"
+#define FORCEDETH_VERSION		"0.31"
 #define DRV_NAME			"forcedeth"
 
 #include <linux/module.h>
@@ -210,6 +212,7 @@
 #define NVREG_LINKSPEED_10	1000
 #define NVREG_LINKSPEED_100	100
 #define NVREG_LINKSPEED_1000	50
+#define NVREG_LINKSPEED_MASK	(0xFFF)
 	NvRegUnknownSetupReg5 = 0x130,
 #define NVREG_UNKSETUP5_BIT31	(1<<31)
 	NvRegUnknownSetupReg3 = 0x13c,
@@ -441,6 +444,8 @@
 	int in_shutdown;
 	u32 linkspeed;
 	int duplex;
+	int autoneg;
+	int fixed_mode;
 	int phyaddr;
 	int wolenabled;
 	unsigned int phy_oui;
@@ -765,50 +770,6 @@
 	return &np->stats;
 }
 
-static void nv_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
-{
-	struct fe_priv *np = get_nvpriv(dev);
-	strcpy(info->driver, "forcedeth");
-	strcpy(info->version, FORCEDETH_VERSION);
-	strcpy(info->bus_info, pci_name(np->pci_dev));
-}
-
-static void nv_get_wol(struct net_device *dev, struct ethtool_wolinfo *wolinfo)
-{
-	struct fe_priv *np = get_nvpriv(dev);
-	wolinfo->supported = WAKE_MAGIC;
-
-	spin_lock_irq(&np->lock);
-	if (np->wolenabled)
-		wolinfo->wolopts = WAKE_MAGIC;
-	spin_unlock_irq(&np->lock);
-}
-
-static int nv_set_wol(struct net_device *dev, struct ethtool_wolinfo *wolinfo)
-{
-	struct fe_priv *np = get_nvpriv(dev);
-	u8 __iomem *base = get_hwbase(dev);
-
-	spin_lock_irq(&np->lock);
-	if (wolinfo->wolopts == 0) {
-		writel(0, base + NvRegWakeUpFlags);
-		np->wolenabled = 0;
-	}
-	if (wolinfo->wolopts & WAKE_MAGIC) {
-		writel(NVREG_WAKEUPFLAGS_ENABLE, base + NvRegWakeUpFlags);
-		np->wolenabled = 1;
-	}
-	spin_unlock_irq(&np->lock);
-	return 0;
-}
-
-static struct ethtool_ops ops = {
-	.get_drvinfo = nv_get_drvinfo,
-	.get_link = ethtool_op_get_link,
-	.get_wol = nv_get_wol,
-	.set_wol = nv_set_wol,
-};
-
 /*
  * nv_alloc_rx: fill rx ring entries.
  * Return 1 if the allocations for the skbs failed and the
@@ -1286,6 +1247,25 @@
 		goto set_speed;
 	}
 
+	if (np->autoneg == 0) {
+		dprintk(KERN_DEBUG "%s: nv_update_linkspeed: autoneg off, PHY set to 0x%04x.\n",
+				dev->name, np->fixed_mode);
+		if (np->fixed_mode & LPA_100FULL) {
+			newls = NVREG_LINKSPEED_FORCE|NVREG_LINKSPEED_100;
+			newdup = 1;
+		} else if (np->fixed_mode & LPA_100HALF) {
+			newls = NVREG_LINKSPEED_FORCE|NVREG_LINKSPEED_100;
+			newdup = 0;
+		} else if (np->fixed_mode & LPA_10FULL) {
+			newls = NVREG_LINKSPEED_FORCE|NVREG_LINKSPEED_10;
+			newdup = 1;
+		} else {
+			newls = NVREG_LINKSPEED_FORCE|NVREG_LINKSPEED_10;
+			newdup = 0;
+		}
+		retval = 1;
+		goto set_speed;
+	}
 	/* check auto negotiation is complete */
 	if (!(mii_status & BMSR_ANEGCOMPLETE)) {
 		/* still in autonegotiation - configure nic for 10 MBit HD and wait. */
@@ -1303,7 +1283,7 @@
 
 		if ((control_1000 & ADVERTISE_1000FULL) &&
 			(status_1000 & LPA_1000FULL)) {
-		dprintk(KERN_DEBUG "%s: nv_update_linkspeed: GBit ethernet detected.\n",
+			dprintk(KERN_DEBUG "%s: nv_update_linkspeed: GBit ethernet detected.\n",
 				dev->name);
 			newls = NVREG_LINKSPEED_FORCE|NVREG_LINKSPEED_1000;
 			newdup = 1;
@@ -1362,9 +1342,9 @@
 	phyreg &= ~(PHY_HALF|PHY_100|PHY_1000);
 	if (np->duplex == 0)
 		phyreg |= PHY_HALF;
-	if ((np->linkspeed & 0xFFF) == NVREG_LINKSPEED_100)
+	if ((np->linkspeed & NVREG_LINKSPEED_MASK) == NVREG_LINKSPEED_100)
 		phyreg |= PHY_100;
-	else if ((np->linkspeed & 0xFFF) == NVREG_LINKSPEED_1000)
+	else if ((np->linkspeed & NVREG_LINKSPEED_MASK) == NVREG_LINKSPEED_1000)
 		phyreg |= PHY_1000;
 	writel(phyreg, base + NvRegPhyInterface);
 
@@ -1500,6 +1480,227 @@
 	enable_irq(dev->irq);
 }
 
+static void nv_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
+{
+	struct fe_priv *np = get_nvpriv(dev);
+	strcpy(info->driver, "forcedeth");
+	strcpy(info->version, FORCEDETH_VERSION);
+	strcpy(info->bus_info, pci_name(np->pci_dev));
+}
+
+static void nv_get_wol(struct net_device *dev, struct ethtool_wolinfo *wolinfo)
+{
+	struct fe_priv *np = get_nvpriv(dev);
+	wolinfo->supported = WAKE_MAGIC;
+
+	spin_lock_irq(&np->lock);
+	if (np->wolenabled)
+		wolinfo->wolopts = WAKE_MAGIC;
+	spin_unlock_irq(&np->lock);
+}
+
+static int nv_set_wol(struct net_device *dev, struct ethtool_wolinfo *wolinfo)
+{
+	struct fe_priv *np = get_nvpriv(dev);
+	u8 __iomem *base = get_hwbase(dev);
+
+	spin_lock_irq(&np->lock);
+	if (wolinfo->wolopts == 0) {
+		writel(0, base + NvRegWakeUpFlags);
+		np->wolenabled = 0;
+	}
+	if (wolinfo->wolopts & WAKE_MAGIC) {
+		writel(NVREG_WAKEUPFLAGS_ENABLE, base + NvRegWakeUpFlags);
+		np->wolenabled = 1;
+	}
+	spin_unlock_irq(&np->lock);
+	return 0;
+}
+
+static int nv_get_settings(struct net_device *dev, struct ethtool_cmd *ecmd)
+{
+	struct fe_priv *np = netdev_priv(dev);
+	int adv;
+
+	spin_lock_irq(&np->lock);
+	ecmd->port = PORT_MII;
+	if (!netif_running(dev)) {
+		/* We do not track link speed / duplex setting if the
+		 * interface is disabled. Force a link check */
+		nv_update_linkspeed(dev);
+	}
+	switch(np->linkspeed & (NVREG_LINKSPEED_MASK)) {
+		case NVREG_LINKSPEED_10:
+			ecmd->speed = SPEED_10;
+			break;
+		case NVREG_LINKSPEED_100:
+			ecmd->speed = SPEED_100;
+			break;
+		case NVREG_LINKSPEED_1000:
+			ecmd->speed = SPEED_1000;
+			break;
+	}
+	ecmd->duplex = DUPLEX_HALF;
+	if (np->duplex)
+		ecmd->duplex = DUPLEX_FULL;
+
+	ecmd->autoneg = np->autoneg;
+
+	ecmd->advertising = ADVERTISED_MII;
+	if (np->autoneg) {
+		ecmd->advertising |= ADVERTISED_Autoneg;
+		adv = mii_rw(dev, np->phyaddr, MII_ADVERTISE, MII_READ);
+	} else {
+		adv = np->fixed_mode;
+	}
+	if (adv & ADVERTISE_10HALF)
+		ecmd->advertising |= ADVERTISED_10baseT_Half;
+	if (adv & ADVERTISE_10FULL)
+		ecmd->advertising |= ADVERTISED_10baseT_Full;
+	if (adv & ADVERTISE_100HALF)
+		ecmd->advertising |= ADVERTISED_100baseT_Half;
+	if (adv & ADVERTISE_100FULL)
+		ecmd->advertising |= ADVERTISED_100baseT_Full;
+	if (np->autoneg && np->gigabit == PHY_GIGABIT) {
+		adv = mii_rw(dev, np->phyaddr, MII_1000BT_CR, MII_READ);
+		if (adv & ADVERTISE_1000FULL)
+			ecmd->advertising |= ADVERTISED_1000baseT_Full;
+	}
+
+	ecmd->supported = (SUPPORTED_Autoneg |
+		SUPPORTED_10baseT_Half | SUPPORTED_10baseT_Full |
+		SUPPORTED_100baseT_Half | SUPPORTED_100baseT_Full |
+		SUPPORTED_MII);
+	if (np->gigabit == PHY_GIGABIT)
+		ecmd->supported |= SUPPORTED_1000baseT_Full;
+
+	ecmd->phy_address = np->phyaddr;
+	ecmd->transceiver = XCVR_EXTERNAL;
+
+	/* ignore maxtxpkt, maxrxpkt for now */
+	spin_unlock_irq(&np->lock);
+	return 0;
+}
+
+static int nv_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd)
+{
+	struct fe_priv *np = netdev_priv(dev);
+
+	if (ecmd->port != PORT_MII)
+		return -EINVAL;
+	if (ecmd->transceiver != XCVR_EXTERNAL)
+		return -EINVAL;
+	if (ecmd->phy_address != np->phyaddr) {
+		/* TODO: support switching between multiple phys. Should be
+		 * trivial, but not enabled due to lack of test hardware. */
+		return -EINVAL;
+	}
+	if (ecmd->autoneg == AUTONEG_ENABLE) {
+		u32 mask;
+
+		mask = ADVERTISED_10baseT_Half | ADVERTISED_10baseT_Full |
+			  ADVERTISED_100baseT_Half | ADVERTISED_100baseT_Full;
+		if (np->gigabit == PHY_GIGABIT)
+			mask |= ADVERTISED_1000baseT_Full;
+
+		if ((ecmd->advertising & mask) == 0)
+			return -EINVAL;
+
+	} else if (ecmd->autoneg == AUTONEG_DISABLE) {
+		/* Note: autonegotiation disable, speed 1000 intentionally
+		 * forbidden - noone should need that. */
+
+		if (ecmd->speed != SPEED_10 && ecmd->speed != SPEED_100)
+			return -EINVAL;
+		if (ecmd->duplex != DUPLEX_HALF && ecmd->duplex != DUPLEX_FULL)
+			return -EINVAL;
+	} else {
+		return -EINVAL;
+	}
+
+	spin_lock_irq(&np->lock);
+	if (ecmd->autoneg == AUTONEG_ENABLE) {
+		int adv, bmcr;
+
+		np->autoneg = 1;
+
+		/* advertise only what has been requested */
+		adv = mii_rw(dev, np->phyaddr, MII_ADVERTISE, MII_READ);
+		adv &= ~(ADVERTISE_ALL | ADVERTISE_100BASE4);
+		if (ecmd->advertising & ADVERTISED_10baseT_Half)
+			adv |= ADVERTISE_10HALF;
+		if (ecmd->advertising & ADVERTISED_10baseT_Full)
+			adv |= ADVERTISE_10FULL;
+		if (ecmd->advertising & ADVERTISED_100baseT_Half)
+			adv |= ADVERTISE_100HALF;
+		if (ecmd->advertising & ADVERTISED_100baseT_Full)
+			adv |= ADVERTISE_100FULL;
+		mii_rw(dev, np->phyaddr, MII_ADVERTISE, adv);
+
+		if (np->gigabit == PHY_GIGABIT) {
+			adv = mii_rw(dev, np->phyaddr, MII_1000BT_CR, MII_READ);
+			adv &= ~ADVERTISE_1000FULL;
+			if (ecmd->advertising & ADVERTISED_1000baseT_Full)
+				adv |= ADVERTISE_1000FULL;
+			mii_rw(dev, np->phyaddr, MII_1000BT_CR, adv);
+		}
+
+		bmcr = mii_rw(dev, np->phyaddr, MII_BMCR, MII_READ);
+		bmcr |= (BMCR_ANENABLE | BMCR_ANRESTART);
+		mii_rw(dev, np->phyaddr, MII_BMCR, bmcr);
+
+	} else {
+		int adv, bmcr;
+
+		np->autoneg = 0;
+
+		adv = mii_rw(dev, np->phyaddr, MII_ADVERTISE, MII_READ);
+		adv &= ~(ADVERTISE_ALL | ADVERTISE_100BASE4);
+		if (ecmd->speed == SPEED_10 && ecmd->duplex == DUPLEX_HALF)
+			adv |= ADVERTISE_10HALF;
+		if (ecmd->speed == SPEED_10 && ecmd->duplex == DUPLEX_FULL)
+			adv |= ADVERTISE_10FULL;
+		if (ecmd->speed == SPEED_100 && ecmd->duplex == DUPLEX_HALF)
+			adv |= ADVERTISE_100HALF;
+		if (ecmd->speed == SPEED_100 && ecmd->duplex == DUPLEX_FULL)
+			adv |= ADVERTISE_100FULL;
+		mii_rw(dev, np->phyaddr, MII_ADVERTISE, adv);
+		np->fixed_mode = adv;
+
+		if (np->gigabit == PHY_GIGABIT) {
+			adv = mii_rw(dev, np->phyaddr, MII_1000BT_CR, MII_READ);
+			adv &= ~ADVERTISE_1000FULL;
+			mii_rw(dev, np->phyaddr, MII_1000BT_CR, adv);
+		}
+
+		bmcr = mii_rw(dev, np->phyaddr, MII_BMCR, MII_READ);
+		bmcr |= ~(BMCR_ANENABLE|BMCR_SPEED100|BMCR_FULLDPLX);
+		if (adv & (ADVERTISE_10FULL|ADVERTISE_100FULL))
+			bmcr |= BMCR_FULLDPLX;
+		if (adv & (ADVERTISE_100HALF|ADVERTISE_100FULL))
+			bmcr |= BMCR_SPEED100;
+		mii_rw(dev, np->phyaddr, MII_BMCR, bmcr);
+
+		if (netif_running(dev)) {
+			/* Wait a bit and then reconfigure the nic. */
+			udelay(10);
+			nv_linkchange(dev);
+		}
+	}
+	spin_unlock_irq(&np->lock);
+
+	return 0;
+}
+
+static struct ethtool_ops ops = {
+	.get_drvinfo = nv_get_drvinfo,
+	.get_link = ethtool_op_get_link,
+	.get_wol = nv_get_wol,
+	.set_wol = nv_set_wol,
+	.get_settings = nv_get_settings,
+	.set_settings = nv_set_settings,
+};
+
 static int nv_open(struct net_device *dev)
 {
 	struct fe_priv *np = get_nvpriv(dev);
@@ -1550,9 +1751,6 @@
 		base + NvRegRingSizes);
 
 	/* 5) continue setup */
-	np->linkspeed = NVREG_LINKSPEED_FORCE|NVREG_LINKSPEED_10;
-	np->duplex = 0;
-
 	writel(np->linkspeed, base + NvRegLinkSpeed);
 	writel(NVREG_UNKSETUP3_VAL1, base + NvRegUnknownSetupReg3);
 	writel(np->desc_ver, base + NvRegTxRxControl);
@@ -1865,6 +2063,11 @@
 		/* reset it */
 		phy_init(dev);
 	}
+
+	/* set default link speed settings */
+	np->linkspeed = NVREG_LINKSPEED_FORCE|NVREG_LINKSPEED_10;
+	np->duplex = 0;
+	np->autoneg = 1;
 
 	err = register_netdev(dev);
 	if (err) {
diff -Nru a/drivers/net/gt96100eth.c b/drivers/net/gt96100eth.c
--- a/drivers/net/gt96100eth.c	2005-01-10 20:11:24 -08:00
+++ b/drivers/net/gt96100eth.c	2005-01-10 20:11:24 -08:00
@@ -187,10 +187,8 @@
 {
 	if (in_interrupt())
 		return;
-	else {
-		current->state = TASK_INTERRUPTIBLE;
-		schedule_timeout(ms*HZ/1000);
-	}
+	else
+		msleep_interruptible(ms);
 }
 
 static int
@@ -527,7 +525,7 @@
 
 	// wait for abort to complete
 	while (GT96100ETH_READ(gp, GT96100_ETH_SDMA_COMM) & abort_bits) {
-		// snooze for 20 msec and check again
+		// snooze for 1 msec and check again
 		gt96100_delay(1);
 	
 		if (--timedout == 0) {
diff -Nru a/drivers/net/hamachi.c b/drivers/net/hamachi.c
--- a/drivers/net/hamachi.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/net/hamachi.c	2005-01-10 20:11:23 -08:00
@@ -518,21 +518,21 @@
 MODULE_DESCRIPTION("Packet Engines 'Hamachi' GNIC-II Gigabit Ethernet driver");
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(max_interrupt_work, "i");
-MODULE_PARM(mtu, "i");
-MODULE_PARM(debug, "i");
-MODULE_PARM(min_rx_pkt, "i");
-MODULE_PARM(max_rx_gap, "i");
-MODULE_PARM(max_rx_latency, "i");
-MODULE_PARM(min_tx_pkt, "i");
-MODULE_PARM(max_tx_gap, "i");
-MODULE_PARM(max_tx_latency, "i");
-MODULE_PARM(rx_copybreak, "i");
-MODULE_PARM(rx_params, "1-" __MODULE_STRING(MAX_UNITS) "i");
-MODULE_PARM(tx_params, "1-" __MODULE_STRING(MAX_UNITS) "i");
-MODULE_PARM(options, "1-" __MODULE_STRING(MAX_UNITS) "i");
-MODULE_PARM(full_duplex, "1-" __MODULE_STRING(MAX_UNITS) "i");
-MODULE_PARM(force32, "i");
+module_param(max_interrupt_work, int, 0);
+module_param(mtu, int, 0);
+module_param(debug, int, 0);
+module_param(min_rx_pkt, int, 0);
+module_param(max_rx_gap, int, 0);
+module_param(max_rx_latency, int, 0);
+module_param(min_tx_pkt, int, 0);
+module_param(max_tx_gap, int, 0);
+module_param(max_tx_latency, int, 0);
+module_param(rx_copybreak, int, 0);
+module_param_array(rx_params, int, NULL, 0);
+module_param_array(tx_params, int, NULL, 0);
+module_param_array(options, int, NULL, 0);
+module_param_array(full_duplex, int, NULL, 0);
+module_param(force32, int, 0);
 MODULE_PARM_DESC(max_interrupt_work, "GNIC-II maximum events handled per interrupt");
 MODULE_PARM_DESC(mtu, "GNIC-II MTU (all boards)");
 MODULE_PARM_DESC(debug, "GNIC-II debug level (0-7)");
diff -Nru a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c
--- a/drivers/net/hamradio/6pack.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/net/hamradio/6pack.c	2005-01-10 20:11:16 -08:00
@@ -4,7 +4,7 @@
  *		kernel's AX.25 protocol layers.
  *
  * Authors:	Andreas Könsgen <ajk@iehk.rwth-aachen.de>
- *              Ralf Baechle DO1GRB <ralf@linux-mips.org>
+ *              Ralf Baechle DL5RB <ralf@linux-mips.org>
  *
  * Quite a lot of stuff "stolen" by Joerg Reuter from slip.c, written by
  *
@@ -119,11 +119,10 @@
 	unsigned char		status1;
 	unsigned char		status2;
 	unsigned char		tx_enable;
-	unsigned char		tnc_ok;
+	unsigned char		tnc_state;
 
 	struct timer_list	tx_t;
 	struct timer_list	resync_t;
-
 	atomic_t		refcnt;
 	struct semaphore	dead_sem;
 	spinlock_t		lock;
@@ -134,7 +133,6 @@
 static void sp_start_tx_timer(struct sixpack *);
 static void sixpack_decode(struct sixpack *, unsigned char[], int);
 static int encode_sixpack(unsigned char *, unsigned char *, int, unsigned char);
-static int sixpack_init(struct net_device *dev);
 
 /*
  * perform the persistence/slottime algorithm for CSMA access. If the
@@ -187,6 +185,11 @@
 		goto out_drop;
 	}
 
+	if (len > sp->mtu) {	/* sp->mtu = AX25_MTU = max. PACLEN = 256 */
+		msg = "oversized transmit packet!";
+		goto out_drop;
+	}
+
 	if (p[0] > 5) {
 		msg = "invalid KISS command";
 		goto out_drop;
@@ -249,8 +252,8 @@
 out_drop:
 	sp->stats.tx_dropped++;
 	netif_start_queue(sp->dev);
-	printk(KERN_DEBUG "%s: %s - dropped.\n", sp->dev->name, msg);
-	return;
+	if (net_ratelimit())
+		printk(KERN_DEBUG "%s: %s - dropped.\n", sp->dev->name, msg);
 }
 
 /* Encapsulate an IP datagram and kick it into a TTY queue. */
@@ -313,10 +316,20 @@
 	return &sp->stats;
 }
 
-static int sp_set_dev_mac_address(struct net_device *dev, void *addr)
+static int sp_set_mac_address(struct net_device *dev, void *addr)
 {
-	struct sockaddr *sa = addr;
-	memcpy(dev->dev_addr, sa->sa_data, AX25_ADDR_LEN);
+	struct sockaddr_ax25 *sa = addr;
+
+	if (sa->sax25_family != AF_AX25)
+		return -EINVAL;
+
+	if (!sa->sax25_ndigis)
+		return -EINVAL;
+
+	spin_lock_irq(&dev->xmit_lock);
+	memcpy(dev->dev_addr, &sa->sax25_call, AX25_ADDR_LEN);
+	spin_unlock_irq(&dev->xmit_lock);
+
 	return 0;
 }
 
@@ -337,7 +350,6 @@
 		{'L'<<1,'I'<<1,'N'<<1,'U'<<1,'X'<<1,' '<<1,'1'<<1};
 
 	/* Finish setting up the DEVICE info. */
-	dev->init		= sixpack_init;
 	dev->mtu		= SIXP_MTU;
 	dev->hard_start_xmit	= sp_xmit;
 	dev->open		= sp_open_dev;
@@ -345,7 +357,7 @@
 	dev->stop		= sp_close;
 	dev->hard_header	= sp_header;
 	dev->get_stats	        = sp_get_stats;
-	dev->set_mac_address    = sp_set_dev_mac_address;
+	dev->set_mac_address    = sp_set_mac_address;
 	dev->hard_header_len	= AX25_MAX_HEADER_LEN;
 	dev->addr_len		= AX25_ADDR_LEN;
 	dev->type		= ARPHRD_AX25;
@@ -359,51 +371,9 @@
 
 	SET_MODULE_OWNER(dev);
 
-	/* New-style flags. */
 	dev->flags		= 0;
 }
 
-/* Find a free 6pack channel, and link in this `tty' line. */
-static inline struct sixpack *sp_alloc(void)
-{
-	struct sixpack *sp = NULL;
-	struct net_device *dev = NULL;
-
-	dev = alloc_netdev(sizeof(struct sixpack), "sp%d", sp_setup);
-	if (!dev)
-		return NULL;
-
-	sp = netdev_priv(dev);
-	sp->dev = dev;
-
-	spin_lock_init(&sp->lock);
-
-	if (register_netdev(dev))
-		goto out_free;
-
-	return sp;
-
-out_free:
-	printk(KERN_WARNING "sp_alloc() - register_netdev() failure.\n");
-
-	free_netdev(dev);
-
-	return NULL;
-}
-
-/* Free a 6pack channel. */
-static inline void sp_free(struct sixpack *sp)
-{
-	void * tmp;
-
-	/* Free all 6pack frame buffers. */
-	if ((tmp = xchg(&sp->rbuff, NULL)) != NULL)
-		kfree(tmp);
-	if ((tmp = xchg(&sp->xbuff, NULL)) != NULL)
-		kfree(tmp);
-}
-
-
 /* Send one completely decapsulated IP datagram to the IP layer. */
 
 /*
@@ -482,6 +452,8 @@
 	struct sixpack *sp = sp_get(tty);
 	int actual;
 
+	if (!sp)
+		return;
 	if (sp->xleft <= 0)  {
 		/* Now serial buffer is almost free & we can start
 		 * transmission of another packet */
@@ -492,7 +464,7 @@
 		goto out;
 	}
 
-	if (sp->tx_enable == 1) {
+	if (sp->tx_enable) {
 		actual = tty->driver->write(tty, sp->xhead, sp->xleft);
 		sp->xleft -= actual;
 		sp->xhead += actual;
@@ -504,80 +476,6 @@
 
 /* ----------------------------------------------------------------------- */
 
-/* Open the low-level part of the 6pack channel. */
-static int sp_open(struct net_device *dev)
-{
-	struct sixpack *sp = netdev_priv(dev);
-	char *rbuff, *xbuff = NULL;
-	int err = -ENOBUFS;
-	unsigned long len;
-
-	/* !!! length of the buffers. MTU is IP MTU, not PACLEN!  */
-
-	len = dev->mtu * 2;
-
-	rbuff = kmalloc(len + 4, GFP_KERNEL);
-	if (rbuff == NULL)
-		goto err_exit;
-
-	xbuff = kmalloc(len + 4, GFP_KERNEL);
-	if (xbuff == NULL)
-		goto err_exit;
-
-	spin_lock_bh(&sp->lock);
-
-	if (sp->tty == NULL)
-		return -ENODEV;
-
-	/*
-	 * Allocate the 6pack frame buffers:
-	 *
-	 * rbuff	Receive buffer.
-	 * xbuff	Transmit buffer.
-	 */
-
-	rbuff = xchg(&sp->rbuff, rbuff);
-	xbuff = xchg(&sp->xbuff, xbuff);
-
-	sp->mtu	     = AX25_MTU + 73;
-	sp->buffsize = len;
-	sp->rcount   = 0;
-	sp->rx_count = 0;
-	sp->rx_count_cooked = 0;
-	sp->xleft    = 0;
-
-	sp->flags	= 0;		/* Clear ESCAPE & ERROR flags */
-
-	sp->duplex = 0;
-	sp->tx_delay    = SIXP_TXDELAY;
-	sp->persistence = SIXP_PERSIST;
-	sp->slottime    = SIXP_SLOTTIME;
-	sp->led_state   = 0x60;
-	sp->status      = 1;
-	sp->status1     = 1;
-	sp->status2     = 0;
-	sp->tnc_ok      = 0;
-	sp->tx_enable   = 0;
-
-	netif_start_queue(dev);
-
-	init_timer(&sp->tx_t);
-	init_timer(&sp->resync_t);
-
-	spin_unlock_bh(&sp->lock);
-
-	err = 0;
-
-err_exit:
-	if (xbuff)
-		kfree(xbuff);
-	if (rbuff)
-		kfree(rbuff);
-
-	return err;
-}
-
-
 static int sixpack_receive_room(struct tty_struct *tty)
 {
 	return 65536;  /* We can handle an infinite amount of data. :-) */
@@ -629,14 +527,45 @@
  * decode_prio_command
  */
 
+#define TNC_UNINITIALIZED	0
+#define TNC_UNSYNC_STARTUP	1
+#define TNC_UNSYNCED		2
+#define TNC_IN_SYNC		3
+
+static void __tnc_set_sync_state(struct sixpack *sp, int new_tnc_state)
+{
+	char *msg;
+
+	switch (new_tnc_state) {
+	default:			/* gcc oh piece-o-crap ... */
+	case TNC_UNSYNC_STARTUP:
+		msg = "Synchronizing with TNC";
+		break;
+	case TNC_UNSYNCED:
+		msg = "Lost synchronization with TNC\n";
+		break;
+	case TNC_IN_SYNC:
+		msg = "Found TNC";
+		break;
+	}
+
+	sp->tnc_state = new_tnc_state;
+	printk(KERN_INFO "%s: %s\n", sp->dev->name, msg);
+}
+
+static inline void tnc_set_sync_state(struct sixpack *sp, int new_tnc_state)
+{
+	int old_tnc_state = sp->tnc_state;
+
+	if (old_tnc_state != new_tnc_state)
+		__tnc_set_sync_state(sp, new_tnc_state);
+}
+
 static void resync_tnc(unsigned long channel)
 {
 	struct sixpack *sp = (struct sixpack *) channel;
-	struct net_device *dev = sp->dev;
 	static char resync_cmd = 0xe8;
 
-	printk(KERN_INFO "%s: resyncing TNC\n", dev->name);
-
 	/* clear any data that might have been received */
 
 	sp->rx_count = 0;
@@ -647,7 +576,6 @@
 	sp->status = 1;
 	sp->status1 = 1;
 	sp->status2 = 0;
-	sp->tnc_ok = 0;
 
 	/* resync the TNC */
 
@@ -659,9 +587,9 @@
 	/* Start resync timer again -- the TNC might be still absent */
 
 	del_timer(&sp->resync_t);
-	sp->resync_t.data = (unsigned long) sp;
-	sp->resync_t.function = resync_tnc;
-	sp->resync_t.expires = jiffies + SIXP_RESYNC_TIMEOUT;
+	sp->resync_t.data	= (unsigned long) sp;
+	sp->resync_t.function	= resync_tnc;
+	sp->resync_t.expires	= jiffies + SIXP_RESYNC_TIMEOUT;
 	add_timer(&sp->resync_t);
 }
 
@@ -669,6 +597,8 @@
 {
 	unsigned char inbyte = 0xe8;
 
+	tnc_set_sync_state(sp, TNC_UNSYNC_STARTUP);
+
 	sp->tty->driver->write(sp->tty, &inbyte, 1);
 
 	del_timer(&sp->resync_t);
@@ -689,31 +619,91 @@
  */
 static int sixpack_open(struct tty_struct *tty)
 {
+	char *rbuff = NULL, *xbuff = NULL;
+	struct net_device *dev;
 	struct sixpack *sp;
+	unsigned long len;
 	int err = 0;
 
 	if (!capable(CAP_NET_ADMIN))
 		return -EPERM;
 
-	sp = sp_alloc();
-	if (!sp) {
+	dev = alloc_netdev(sizeof(struct sixpack), "sp%d", sp_setup);
+	if (!dev) {
 		err = -ENOMEM;
 		goto out;
 	}
 
-	sp->tty = tty;
+	sp = netdev_priv(dev);
+	sp->dev = dev;
+
+	spin_lock_init(&sp->lock);
 	atomic_set(&sp->refcnt, 1);
 	init_MUTEX_LOCKED(&sp->dead_sem);
 
-	/* Perform the low-level 6pack initialization. */
-	if ((err = sp_open(sp->dev)))
-		goto out;
+	/* !!! length of the buffers. MTU is IP MTU, not PACLEN!  */
+
+	len = dev->mtu * 2;
+
+	rbuff = kmalloc(len + 4, GFP_KERNEL);
+	xbuff = kmalloc(len + 4, GFP_KERNEL);
+
+	if (rbuff == NULL || xbuff == NULL) {
+		err = -ENOBUFS;
+		goto out_free;
+	}
+
+	spin_lock_bh(&sp->lock);
+
+	sp->tty = tty;
+
+	sp->rbuff	= rbuff;
+	sp->xbuff	= xbuff;
+
+	sp->mtu		= AX25_MTU + 73;
+	sp->buffsize	= len;
+	sp->rcount	= 0;
+	sp->rx_count	= 0;
+	sp->rx_count_cooked = 0;
+	sp->xleft	= 0;
+
+	sp->flags	= 0;		/* Clear ESCAPE & ERROR flags */
+
+	sp->duplex	= 0;
+	sp->tx_delay    = SIXP_TXDELAY;
+	sp->persistence = SIXP_PERSIST;
+	sp->slottime    = SIXP_SLOTTIME;
+	sp->led_state   = 0x60;
+	sp->status      = 1;
+	sp->status1     = 1;
+	sp->status2     = 0;
+	sp->tx_enable   = 0;
+
+	netif_start_queue(dev);
+
+	init_timer(&sp->tx_t);
+	init_timer(&sp->resync_t);
+
+	spin_unlock_bh(&sp->lock);
 
 	/* Done.  We have linked the TTY line to a channel. */
 	tty->disc_data = sp;
 
+	/* Now we're ready to register. */
+	if (register_netdev(dev))
+		goto out_free;
+
 	tnc_init(sp);
 
+	return 0;
+
+out_free:
+	kfree(xbuff);
+	kfree(rbuff);
+
+	if (dev)
+		free_netdev(dev);
+
 out:
 	return err;
 }
@@ -727,7 +717,7 @@
  */
 static void sixpack_close(struct tty_struct *tty)
 {
-	struct sixpack *sp = (struct sixpack *) tty->disc_data;
+	struct sixpack *sp;
 
 	write_lock(&disc_data_lock);
 	sp = tty->disc_data;
@@ -743,16 +733,14 @@
 	if (!atomic_dec_and_test(&sp->refcnt))
 		down(&sp->dead_sem);
 
+	unregister_netdev(sp->dev);
+
 	del_timer(&sp->tx_t);
 	del_timer(&sp->resync_t);
 
-	sp_free(sp);
-	unregister_netdev(sp->dev);
-}
-
-static int sp_set_mac_address(struct net_device *dev, void __user *addr)
-{
-	return copy_from_user(dev->dev_addr, addr, AX25_ADDR_LEN) ? -EFAULT : 0;
+	/* Free all 6pack frame buffers. */
+	kfree(sp->rbuff);
+	kfree(sp->xbuff);
 }
 
 /* Perform I/O control on an active 6pack channel. */
@@ -760,6 +748,7 @@
 	unsigned int cmd, unsigned long arg)
 {
 	struct sixpack *sp = sp_get(tty);
+	struct net_device *dev = sp->dev;
 	unsigned int tmp, err;
 
 	if (!sp)
@@ -767,8 +756,8 @@
 
 	switch(cmd) {
 	case SIOCGIFNAME:
-		err = copy_to_user((void __user *) arg, sp->dev->name,
-		                   strlen(sp->dev->name) + 1) ? -EFAULT : 0;
+		err = copy_to_user((void *) arg, dev->name,
+		                   strlen(dev->name) + 1) ? -EFAULT : 0;
 		break;
 
 	case SIOCGIFENCAP:
@@ -782,16 +771,30 @@
 		}
 
 		sp->mode = tmp;
-		sp->dev->addr_len        = AX25_ADDR_LEN;	  /* sizeof an AX.25 addr */
-		sp->dev->hard_header_len = AX25_KISS_HEADER_LEN + AX25_MAX_HEADER_LEN + 3;
-		sp->dev->type            = ARPHRD_AX25;
+		dev->addr_len        = AX25_ADDR_LEN;
+		dev->hard_header_len = AX25_KISS_HEADER_LEN +
+		                       AX25_MAX_HEADER_LEN + 3;
+		dev->type            = ARPHRD_AX25;
 
 		err = 0;
 		break;
 
-	 case SIOCSIFHWADDR:
-		err = sp_set_mac_address(sp->dev, (void __user *) arg);
+	 case SIOCSIFHWADDR: {
+		char addr[AX25_ADDR_LEN];
+
+		if (copy_from_user(&addr,
+		                   (void __user *) arg, AX25_ADDR_LEN)) {
+			err = -EFAULT;
+			break;
+		}
+
+		spin_lock_irq(&dev->xmit_lock);
+		memcpy(dev->dev_addr, &addr, AX25_ADDR_LEN);
+		spin_unlock_irq(&dev->xmit_lock);
+
+		err = 0;
 		break;
+	}
 
 	/* Allow stty to read, but not set, the serial port */
 	case TCGETS:
@@ -800,7 +803,7 @@
 		break;
 
 	default:
-		return -ENOIOCTLCMD;
+		err = -ENOIOCTLCMD;
 	}
 
 	sp_put(sp);
@@ -808,7 +811,6 @@
 	return err;
 }
 
-/* Fill in our line protocol discipline */
 static struct tty_ldisc sp_ldisc = {
 	.owner		= THIS_MODULE,
 	.magic		= TTY_LDISC_MAGIC,
@@ -823,8 +825,10 @@
 
 /* Initialize 6pack control device -- register 6pack line discipline */
 
-static char msg_banner[]  __initdata = KERN_INFO "AX.25: 6pack driver, " SIXPACK_VERSION "\n";
-static char msg_regfail[] __initdata = KERN_ERR  "6pack: can't register line discipline (err = %d)\n";
+static char msg_banner[]  __initdata = KERN_INFO \
+	"AX.25: 6pack driver, " SIXPACK_VERSION "\n";
+static char msg_regfail[] __initdata = KERN_ERR  \
+	"6pack: can't register line discipline (err = %d)\n";
 
 static int __init sixpack_init_driver(void)
 {
@@ -839,7 +843,8 @@
 	return status;
 }
 
-static const char msg_unregfail[] __exitdata = KERN_ERR "6pack: can't unregister line discipline (err = %d)\n";
+static const char msg_unregfail[] __exitdata = KERN_ERR \
+	"6pack: can't unregister line discipline (err = %d)\n";
 
 static void __exit sixpack_exit_driver(void)
 {
@@ -849,22 +854,6 @@
 		printk(msg_unregfail, ret);
 }
 
-/* Initialize the 6pack driver.  Called by DDI. */
-static int sixpack_init(struct net_device *dev)
-{
-	struct sixpack *sp = netdev_priv(dev);
-
-	if (sp == NULL)		/* Allocation failed ?? */
-		return -ENODEV;
-
-	/* Set up the "6pack Control Block". (And clear statistics) */
-
-	memset(sp, 0, sizeof (struct sixpack));
-	sp->dev	   = dev;
-
-	return 0;
-}
-
 /* encode an AX.25 packet into 6pack */
 
 static int encode_sixpack(unsigned char *tx_buf, unsigned char *tx_buf_raw,
@@ -905,7 +894,7 @@
 
 /* decode 4 sixpack-encoded bytes into 3 data bytes */
 
-static void decode_data(unsigned char inbyte, struct sixpack *sp)
+static void decode_data(struct sixpack *sp, unsigned char inbyte)
 {
 	unsigned char *buf;
 
@@ -927,7 +916,7 @@
 
 /* identify and execute a 6pack priority command byte */
 
-static void decode_prio_command(unsigned char cmd, struct sixpack *sp)
+static void decode_prio_command(struct sixpack *sp, unsigned char cmd)
 {
 	unsigned char channel;
 	int actual;
@@ -971,11 +960,11 @@
         /* if the state byte has been received, the TNC is present,
            so the resync timer can be reset. */
 
-	if (sp->tnc_ok == 1) {
+	if (sp->tnc_state == TNC_IN_SYNC) {
 		del_timer(&sp->resync_t);
-		sp->resync_t.data = (unsigned long) sp;
-		sp->resync_t.function = resync_tnc;
-		sp->resync_t.expires = jiffies + SIXP_INIT_RESYNC_TIMEOUT;
+		sp->resync_t.data	= (unsigned long) sp;
+		sp->resync_t.function	= resync_tnc;
+		sp->resync_t.expires	= jiffies + SIXP_INIT_RESYNC_TIMEOUT;
 		add_timer(&sp->resync_t);
 	}
 
@@ -984,7 +973,7 @@
 
 /* identify and execute a standard 6pack command byte */
 
-static void decode_std_command(unsigned char cmd, struct sixpack *sp)
+static void decode_std_command(struct sixpack *sp, unsigned char cmd)
 {
 	unsigned char checksum = 0, rest = 0, channel;
 	short i;
@@ -1005,7 +994,7 @@
 			rest = sp->rx_count;
 			if (rest != 0)
 				 for (i = rest; i <= 3; i++)
-					decode_data(0, sp);
+					decode_data(sp, 0);
 			if (rest == 2)
 				sp->rx_count_cooked -= 2;
 			else if (rest == 3)
@@ -1033,7 +1022,7 @@
 /* decode a 6pack packet */
 
 static void
-sixpack_decode(struct sixpack *sp, unsigned char pre_rbuff[], int count)
+sixpack_decode(struct sixpack *sp, unsigned char *pre_rbuff, int count)
 {
 	unsigned char inbyte;
 	int count1;
@@ -1041,16 +1030,15 @@
 	for (count1 = 0; count1 < count; count1++) {
 		inbyte = pre_rbuff[count1];
 		if (inbyte == SIXP_FOUND_TNC) {
-			printk(KERN_INFO "6pack: TNC found.\n");
-			sp->tnc_ok = 1;
+			tnc_set_sync_state(sp, TNC_IN_SYNC);
 			del_timer(&sp->resync_t);
 		}
 		if ((inbyte & SIXP_PRIO_CMD_MASK) != 0)
-			decode_prio_command(inbyte, sp);
+			decode_prio_command(sp, inbyte);
 		else if ((inbyte & SIXP_STD_CMD_MASK) != 0)
-			decode_std_command(inbyte, sp);
+			decode_std_command(sp, inbyte);
 		else if ((sp->status & SIXP_RX_DCD_MASK) == SIXP_RX_DCD_MASK)
-			decode_data(inbyte, sp);
+			decode_data(sp, inbyte);
 	}
 }
 
diff -Nru a/drivers/net/hamradio/baycom_epp.c b/drivers/net/hamradio/baycom_epp.c
--- a/drivers/net/hamradio/baycom_epp.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/net/hamradio/baycom_epp.c	2005-01-10 20:11:23 -08:00
@@ -1294,9 +1294,9 @@
 static const char *mode[NR_PORTS] = { "", };
 static int iobase[NR_PORTS] = { 0x378, };
 
-MODULE_PARM(mode, "1-" __MODULE_STRING(NR_PORTS) "s");
+module_param_array(mode, charp, NULL, 0);
 MODULE_PARM_DESC(mode, "baycom operating mode");
-MODULE_PARM(iobase, "1-" __MODULE_STRING(NR_PORTS) "i");
+module_param_array(iobase, int, NULL, 0);
 MODULE_PARM_DESC(iobase, "baycom io base address");
 
 MODULE_AUTHOR("Thomas M. Sailer, sailer@ife.ee.ethz.ch, hb9jnx@hb9w.che.eu");
diff -Nru a/drivers/net/hamradio/baycom_par.c b/drivers/net/hamradio/baycom_par.c
--- a/drivers/net/hamradio/baycom_par.c	2005-01-10 20:11:24 -08:00
+++ b/drivers/net/hamradio/baycom_par.c	2005-01-10 20:11:24 -08:00
@@ -480,9 +480,9 @@
 static const char *mode[NR_PORTS] = { "picpar", };
 static int iobase[NR_PORTS] = { 0x378, };
 
-MODULE_PARM(mode, "1-" __MODULE_STRING(NR_PORTS) "s");
+module_param_array(mode, charp, NULL, 0);
 MODULE_PARM_DESC(mode, "baycom operating mode; eg. par96 or picpar");
-MODULE_PARM(iobase, "1-" __MODULE_STRING(NR_PORTS) "i");
+module_param_array(iobase, int, NULL, 0);
 MODULE_PARM_DESC(iobase, "baycom io base address");
 
 MODULE_AUTHOR("Thomas M. Sailer, sailer@ife.ee.ethz.ch, hb9jnx@hb9w.che.eu");
diff -Nru a/drivers/net/hamradio/baycom_ser_fdx.c b/drivers/net/hamradio/baycom_ser_fdx.c
--- a/drivers/net/hamradio/baycom_ser_fdx.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/net/hamradio/baycom_ser_fdx.c	2005-01-10 20:11:19 -08:00
@@ -599,13 +599,13 @@
 static int irq[NR_PORTS] = { 4, };
 static int baud[NR_PORTS] = { [0 ... NR_PORTS-1] = 1200 };
 
-MODULE_PARM(mode, "1-" __MODULE_STRING(NR_PORTS) "s");
+module_param_array(mode, charp, NULL, 0);
 MODULE_PARM_DESC(mode, "baycom operating mode; * for software DCD");
-MODULE_PARM(iobase, "1-" __MODULE_STRING(NR_PORTS) "i");
+module_param_array(iobase, int, NULL, 0);
 MODULE_PARM_DESC(iobase, "baycom io base address");
-MODULE_PARM(irq, "1-" __MODULE_STRING(NR_PORTS) "i");
+module_param_array(irq, int, NULL, 0);
 MODULE_PARM_DESC(irq, "baycom irq number");
-MODULE_PARM(baud, "1-" __MODULE_STRING(NR_PORTS) "i");
+module_param_array(baud, int, NULL, 0);
 MODULE_PARM_DESC(baud, "baycom baud rate (300 to 4800)");
 
 MODULE_AUTHOR("Thomas M. Sailer, sailer@ife.ee.ethz.ch, hb9jnx@hb9w.che.eu");
diff -Nru a/drivers/net/hamradio/baycom_ser_hdx.c b/drivers/net/hamradio/baycom_ser_hdx.c
--- a/drivers/net/hamradio/baycom_ser_hdx.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/net/hamradio/baycom_ser_hdx.c	2005-01-10 20:11:15 -08:00
@@ -638,11 +638,11 @@
 static int iobase[NR_PORTS] = { 0x3f8, };
 static int irq[NR_PORTS] = { 4, };
 
-MODULE_PARM(mode, "1-" __MODULE_STRING(NR_PORTS) "s");
+module_param_array(mode, charp, NULL, 0);
 MODULE_PARM_DESC(mode, "baycom operating mode; * for software DCD");
-MODULE_PARM(iobase, "1-" __MODULE_STRING(NR_PORTS) "i");
+module_param_array(iobase, int, NULL, 0);
 MODULE_PARM_DESC(iobase, "baycom io base address");
-MODULE_PARM(irq, "1-" __MODULE_STRING(NR_PORTS) "i");
+module_param_array(irq, int, NULL, 0);
 MODULE_PARM_DESC(irq, "baycom irq number");
 
 MODULE_AUTHOR("Thomas M. Sailer, sailer@ife.ee.ethz.ch, hb9jnx@hb9w.che.eu");
diff -Nru a/drivers/net/hp-plus.c b/drivers/net/hp-plus.c
--- a/drivers/net/hp-plus.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/net/hp-plus.c	2005-01-10 20:11:16 -08:00
@@ -437,8 +437,8 @@
 static int io[MAX_HPP_CARDS];
 static int irq[MAX_HPP_CARDS];
 
-MODULE_PARM(io, "1-" __MODULE_STRING(MAX_HPP_CARDS) "i");
-MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_HPP_CARDS) "i");
+module_param_array(io, int, NULL, 0);
+module_param_array(irq, int, NULL, 0);
 MODULE_PARM_DESC(io, "I/O port address(es)");
 MODULE_PARM_DESC(irq, "IRQ number(s); ignored if properly detected");
 MODULE_DESCRIPTION("HP PC-LAN+ ISA ethernet driver");
diff -Nru a/drivers/net/hp.c b/drivers/net/hp.c
--- a/drivers/net/hp.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/net/hp.c	2005-01-10 20:11:17 -08:00
@@ -406,8 +406,8 @@
 static int io[MAX_HP_CARDS];
 static int irq[MAX_HP_CARDS];
 
-MODULE_PARM(io, "1-" __MODULE_STRING(MAX_HP_CARDS) "i");
-MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_HP_CARDS) "i");
+module_param_array(io, int, NULL, 0);
+module_param_array(irq, int, NULL, 0);
 MODULE_PARM_DESC(io, "I/O base address(es)");
 MODULE_PARM_DESC(irq, "IRQ number(s) (assigned)");
 MODULE_DESCRIPTION("HP PC-LAN ISA ethernet driver");
diff -Nru a/drivers/net/hp100.c b/drivers/net/hp100.c
--- a/drivers/net/hp100.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/net/hp100.c	2005-01-10 20:11:18 -08:00
@@ -224,9 +224,9 @@
 static int hp100_priority_tx = HP100_DEFAULT_PRIORITY_TX;
 static int hp100_mode = 1;
 
-MODULE_PARM(hp100_rx_ratio, "1i");
-MODULE_PARM(hp100_priority_tx, "1i");
-MODULE_PARM(hp100_mode, "1i");
+module_param(hp100_rx_ratio, int, 0);
+module_param(hp100_priority_tx, int, 0);
+module_param(hp100_mode, int, 0);
 
 /*
  *  prototypes
@@ -280,8 +280,14 @@
  * address - Jean II */
 static inline dma_addr_t virt_to_whatever(struct net_device *dev, u32 * ptr)
 {
-	return ((u_long) ptr) +
-		((struct hp100_private *) (dev->priv))->whatever_offset;
+	struct hp100_private *lp = netdev_priv(dev);
+	return ((u_long) ptr) + lp->whatever_offset;
+}
+
+static inline u_int pdl_map_data(struct hp100_private *lp, void *data)
+{
+	return pci_map_single(lp->pci_dev, data, 
+			      MAX_ETHER_SIZE, PCI_DMA_FROMDEVICE);
 }
 
 /* TODO: This function should not really be needed in a good design... */
@@ -631,7 +637,7 @@
 	}
 
 	/* Initialise the "private" data structure for this card. */
-	lp = (struct hp100_private *) dev->priv;
+	lp = netdev_priv(dev);
 
 	spin_lock_init(&lp->lock);
 	strlcpy(lp->id, eid, HP100_SIG_LEN);
@@ -781,7 +787,7 @@
 static void hp100_hwinit(struct net_device *dev)
 {
 	int ioaddr = dev->base_addr;
-	struct hp100_private *lp = (struct hp100_private *) dev->priv;
+	struct hp100_private *lp = netdev_priv(dev);
 
 #ifdef HP100_DEBUG_B
 	hp100_outw(0x4202, TRACE);
@@ -875,7 +881,7 @@
 static void hp100_mmuinit(struct net_device *dev)
 {
 	int ioaddr = dev->base_addr;
-	struct hp100_private *lp = (struct hp100_private *) dev->priv;
+	struct hp100_private *lp = netdev_priv(dev);
 	int i;
 
 #ifdef HP100_DEBUG_B
@@ -1053,7 +1059,7 @@
 
 static int hp100_open(struct net_device *dev)
 {
-	struct hp100_private *lp = (struct hp100_private *) dev->priv;
+	struct hp100_private *lp = netdev_priv(dev);
 #ifdef HP100_DEBUG_B
 	int ioaddr = dev->base_addr;
 #endif
@@ -1093,7 +1099,7 @@
 static int hp100_close(struct net_device *dev)
 {
 	int ioaddr = dev->base_addr;
-	struct hp100_private *lp = (struct hp100_private *) dev->priv;
+	struct hp100_private *lp = netdev_priv(dev);
 
 #ifdef HP100_DEBUG_B
 	hp100_outw(0x4205, TRACE);
@@ -1126,7 +1132,7 @@
  */
 static void hp100_init_pdls(struct net_device *dev)
 {
-	struct hp100_private *lp = (struct hp100_private *) dev->priv;
+	struct hp100_private *lp = netdev_priv(dev);
 	hp100_ring_t *ringptr;
 	u_int *pageptr;		/* Warning : increment by 4 - Jean II */
 	int i;
@@ -1273,7 +1279,8 @@
 		/* Conversion to new PCI API : map skbuf data to PCI bus.
 		 * Doc says it's OK for EISA as well - Jean II */
 		ringptr->pdl[0] = 0x00020000;	/* Write PDH */
-		ringptr->pdl[3] = ((u_int) pci_map_single(((struct hp100_private *) (dev->priv))->pci_dev, ringptr->skb->data, MAX_ETHER_SIZE, PCI_DMA_FROMDEVICE));
+		ringptr->pdl[3] = pdl_map_data(netdev_priv(dev), 
+					       ringptr->skb->data);
 		ringptr->pdl[4] = MAX_ETHER_SIZE;	/* Length of Data */
 
 #ifdef HP100_DEBUG_BM
@@ -1310,7 +1317,7 @@
 {
 	int ioaddr = dev->base_addr;
 
-	struct hp100_private *lp = (struct hp100_private *) dev->priv;
+	struct hp100_private *lp = netdev_priv(dev);
 	hp100_ring_t *ringptr;
 
 #ifdef HP100_DEBUG_B
@@ -1351,7 +1358,7 @@
 static void hp100_BM_shutdown(struct net_device *dev)
 {
 	int ioaddr = dev->base_addr;
-	struct hp100_private *lp = (struct hp100_private *) dev->priv;
+	struct hp100_private *lp = netdev_priv(dev);
 	unsigned long time;
 
 #ifdef HP100_DEBUG_B
@@ -1432,7 +1439,7 @@
 
 static int hp100_check_lan(struct net_device *dev)
 {
-	struct hp100_private *lp = (struct hp100_private *) dev->priv;
+	struct hp100_private *lp = netdev_priv(dev);
 
 	if (lp->lan_type < 0) {	/* no LAN type detected yet? */
 		hp100_stop_interface(dev);
@@ -1458,7 +1465,7 @@
 	unsigned long flags;
 	int i, ok_flag;
 	int ioaddr = dev->base_addr;
-	struct hp100_private *lp = (struct hp100_private *) dev->priv;
+	struct hp100_private *lp = netdev_priv(dev);
 	hp100_ring_t *ringptr;
 
 #ifdef HP100_DEBUG_B
@@ -1576,7 +1583,7 @@
  */
 static void hp100_clean_txring(struct net_device *dev)
 {
-	struct hp100_private *lp = (struct hp100_private *) dev->priv;
+	struct hp100_private *lp = netdev_priv(dev);
 	int ioaddr = dev->base_addr;
 	int donecount;
 
@@ -1615,7 +1622,7 @@
 	int i, ok_flag;
 	int ioaddr = dev->base_addr;
 	u_short val;
-	struct hp100_private *lp = (struct hp100_private *) dev->priv;
+	struct hp100_private *lp = netdev_priv(dev);
 
 #ifdef HP100_DEBUG_B
 	hp100_outw(0x4212, TRACE);
@@ -1755,7 +1762,7 @@
 {
 	int packets, pkt_len;
 	int ioaddr = dev->base_addr;
-	struct hp100_private *lp = (struct hp100_private *) dev->priv;
+	struct hp100_private *lp = netdev_priv(dev);
 	u_int header;
 	struct sk_buff *skb;
 
@@ -1864,7 +1871,7 @@
 static void hp100_rx_bm(struct net_device *dev)
 {
 	int ioaddr = dev->base_addr;
-	struct hp100_private *lp = (struct hp100_private *) dev->priv;
+	struct hp100_private *lp = netdev_priv(dev);
 	hp100_ring_t *ptr;
 	u_int header;
 	int pkt_len;
@@ -1973,7 +1980,7 @@
 {
 	unsigned long flags;
 	int ioaddr = dev->base_addr;
-	struct hp100_private *lp = (struct hp100_private *) dev->priv;
+	struct hp100_private *lp = netdev_priv(dev);
 
 #ifdef HP100_DEBUG_B
 	hp100_outw(0x4215, TRACE);
@@ -1991,7 +1998,7 @@
 {
 	int ioaddr = dev->base_addr;
 	u_short val;
-	struct hp100_private *lp = (struct hp100_private *) dev->priv;
+	struct hp100_private *lp = netdev_priv(dev);
 
 #ifdef HP100_DEBUG_B
 	hp100_outw(0x4216, TRACE);
@@ -2017,7 +2024,7 @@
 #ifdef HP100_DEBUG_B
 	int ioaddr = dev->base_addr;
 #endif
-	struct hp100_private *lp = (struct hp100_private *) dev->priv;
+	struct hp100_private *lp = netdev_priv(dev);
 
 #ifdef HP100_DEBUG_B
 	int ioaddr = dev->base_addr;
@@ -2061,7 +2068,7 @@
 {
 	unsigned long flags;
 	int ioaddr = dev->base_addr;
-	struct hp100_private *lp = (struct hp100_private *) dev->priv;
+	struct hp100_private *lp = netdev_priv(dev);
 
 #ifdef HP100_DEBUG_B
 	hp100_outw(0x4218, TRACE);
@@ -2191,7 +2198,7 @@
 static irqreturn_t hp100_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
 	struct net_device *dev = (struct net_device *) dev_id;
-	struct hp100_private *lp = (struct hp100_private *) dev->priv;
+	struct hp100_private *lp = netdev_priv(dev);
 
 	int ioaddr;
 	u_int val;
@@ -2322,7 +2329,7 @@
 {
 	unsigned long flags;
 	int ioaddr = dev->base_addr;
-	struct hp100_private *lp = (struct hp100_private *) dev->priv;
+	struct hp100_private *lp = netdev_priv(dev);
 
 #ifdef HP100_DEBUG_B
 	hp100_outw(0x4220, TRACE);
@@ -2381,7 +2388,7 @@
 
 static void hp100_stop_interface(struct net_device *dev)
 {
-	struct hp100_private *lp = (struct hp100_private *) dev->priv;
+	struct hp100_private *lp = netdev_priv(dev);
 	int ioaddr = dev->base_addr;
 	u_int val;
 
@@ -2442,7 +2449,7 @@
 {
 	int ioaddr = dev->base_addr;
 	u_short val_VG, val_10;
-	struct hp100_private *lp = (struct hp100_private *) dev->priv;
+	struct hp100_private *lp = netdev_priv(dev);
 
 #ifdef HP100_DEBUG_B
 	hp100_outw(0x4223, TRACE);
@@ -2488,7 +2495,7 @@
 
 static int hp100_down_vg_link(struct net_device *dev)
 {
-	struct hp100_private *lp = (struct hp100_private *) dev->priv;
+	struct hp100_private *lp = netdev_priv(dev);
 	int ioaddr = dev->base_addr;
 	unsigned long time;
 	long savelan, newlan;
@@ -2604,7 +2611,7 @@
 static int hp100_login_to_vg_hub(struct net_device *dev, u_short force_relogin)
 {
 	int ioaddr = dev->base_addr;
-	struct hp100_private *lp = (struct hp100_private *) dev->priv;
+	struct hp100_private *lp = netdev_priv(dev);
 	u_short val = 0;
 	unsigned long time;
 	int startst;
@@ -2775,7 +2782,7 @@
 static void hp100_cascade_reset(struct net_device *dev, u_short enable)
 {
 	int ioaddr = dev->base_addr;
-	struct hp100_private *lp = (struct hp100_private *) dev->priv;
+	struct hp100_private *lp = netdev_priv(dev);
 
 #ifdef HP100_DEBUG_B
 	hp100_outw(0x4226, TRACE);
@@ -2836,7 +2843,7 @@
 
 static void cleanup_dev(struct net_device *d)
 {
-	struct hp100_private *p = (struct hp100_private *) d->priv;
+	struct hp100_private *p = netdev_priv(d);
 
 	unregister_netdev(d);
 	release_region(d->base_addr, HP100_REGION_SIZE);
@@ -2998,7 +3005,7 @@
 #define HP100_DEVICES 5
 /* Parameters set by insmod */
 static int hp100_port[HP100_DEVICES] = { 0, [1 ... (HP100_DEVICES-1)] = -1 };
-MODULE_PARM(hp100_port, "1-" __MODULE_STRING(HP100_DEVICES) "i");
+module_param_array(hp100_port, int, NULL, 0);
 
 /* List of devices */
 static struct net_device *hp100_devlist[HP100_DEVICES];
diff -Nru a/drivers/net/ibmlana.c b/drivers/net/ibmlana.c
--- a/drivers/net/ibmlana.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/net/ibmlana.c	2005-01-10 20:11:17 -08:00
@@ -1020,8 +1020,8 @@
 static int irq;
 static int io;
 
-MODULE_PARM(irq, "i");
-MODULE_PARM(io, "i");
+module_param(irq, int, 0);
+module_param(io, int, 0);
 MODULE_PARM_DESC(irq, "IBM LAN/A IRQ number");
 MODULE_PARM_DESC(io, "IBM LAN/A I/O base address");
 MODULE_LICENSE("GPL");
diff -Nru a/drivers/net/irda/ali-ircc.c b/drivers/net/irda/ali-ircc.c
--- a/drivers/net/irda/ali-ircc.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/net/irda/ali-ircc.c	2005-01-10 20:11:18 -08:00
@@ -2264,11 +2264,11 @@
 MODULE_LICENSE("GPL");
 
 
-MODULE_PARM(io,  "1-4i");
+module_param_array(io, int, NULL, 0);
 MODULE_PARM_DESC(io, "Base I/O addresses");
-MODULE_PARM(irq, "1-4i");
+module_param_array(irq, int, NULL, 0);
 MODULE_PARM_DESC(irq, "IRQ lines");
-MODULE_PARM(dma, "1-4i");
+module_param_array(dma, int, NULL, 0);
 MODULE_PARM_DESC(dma, "DMA channels");
 
 module_init(ali_ircc_init);
diff -Nru a/drivers/net/irda/donauboe.c b/drivers/net/irda/donauboe.c
--- a/drivers/net/irda/donauboe.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/net/irda/donauboe.c	2005-01-10 20:11:18 -08:00
@@ -1493,11 +1493,11 @@
 MODULE_AUTHOR("James McKenzie <james@fishsoup.dhs.org>");
 MODULE_LICENSE("GPL");
 
-MODULE_PARM (max_baud, "i");
+module_param (max_baud, int, 0);
 MODULE_PARM_DESC(max_baud, "Maximum baud rate");
 
 #ifdef USE_PROBE
-MODULE_PARM (do_probe, "i");
+module_param (do_probe, bool, 0);
 MODULE_PARM_DESC(do_probe, "Enable/disable chip probing and self-test");
 #endif
 
diff -Nru a/drivers/net/irda/irda-usb.c b/drivers/net/irda/irda-usb.c
--- a/drivers/net/irda/irda-usb.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/net/irda/irda-usb.c	2005-01-10 20:11:19 -08:00
@@ -1220,7 +1220,7 @@
 		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;
+		psize = le16_to_cpu(endpoint[i].desc.wMaxPacketSize);
 
 		/* Is it a bulk endpoint ??? */
 		if(attr == USB_ENDPOINT_XFER_BULK) {
@@ -1360,8 +1360,8 @@
 	 * Jean II */
 
 	MESSAGE("IRDA-USB found at address %d, Vendor: %x, Product: %x\n",
-		dev->devnum, dev->descriptor.idVendor,
-		dev->descriptor.idProduct);
+		dev->devnum, le16_to_cpu(dev->descriptor.idVendor),
+		le16_to_cpu(dev->descriptor.idProduct));
 
 	net = alloc_irdadev(sizeof(*self));
 	if (!net) 
diff -Nru a/drivers/net/irda/irtty-sir.c b/drivers/net/irda/irtty-sir.c
--- a/drivers/net/irda/irtty-sir.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/net/irda/irtty-sir.c	2005-01-10 20:11:15 -08:00
@@ -39,10 +39,10 @@
 #include "sir-dev.h"
 #include "irtty-sir.h"
 
-MODULE_PARM(qos_mtt_bits, "i");
-MODULE_PARM_DESC(qos_mtt_bits, "Minimum Turn Time");
-
 static int qos_mtt_bits = 0x03;      /* 5 ms or more */
+
+module_param(qos_mtt_bits, int, 0);
+MODULE_PARM_DESC(qos_mtt_bits, "Minimum Turn Time");
 
 /* ------------------------------------------------------- */
 
diff -Nru a/drivers/net/irda/nsc-ircc.c b/drivers/net/irda/nsc-ircc.c
--- a/drivers/net/irda/nsc-ircc.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/net/irda/nsc-ircc.c	2005-01-10 20:11:15 -08:00
@@ -2206,15 +2206,15 @@
 MODULE_LICENSE("GPL");
 
 
-MODULE_PARM(qos_mtt_bits, "i");
+module_param(qos_mtt_bits, int, 0);
 MODULE_PARM_DESC(qos_mtt_bits, "Minimum Turn Time");
-MODULE_PARM(io,  "1-4i");
+module_param_array(io, int, NULL, 0);
 MODULE_PARM_DESC(io, "Base I/O addresses");
-MODULE_PARM(irq, "1-4i");
+module_param_array(irq, int, NULL, 0);
 MODULE_PARM_DESC(irq, "IRQ lines");
-MODULE_PARM(dma, "1-4i");
+module_param_array(dma, int, NULL, 0);
 MODULE_PARM_DESC(dma, "DMA channels");
-MODULE_PARM(dongle_id, "i");
+module_param(dongle_id, int, 0);
 MODULE_PARM_DESC(dongle_id, "Type-id of used dongle");
 
 module_init(nsc_ircc_init);
diff -Nru a/drivers/net/irda/smsc-ircc2.c b/drivers/net/irda/smsc-ircc2.c
--- a/drivers/net/irda/smsc-ircc2.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/net/irda/smsc-ircc2.c	2005-01-10 20:11:20 -08:00
@@ -2378,15 +2378,15 @@
 MODULE_DESCRIPTION("SMC IrCC SIR/FIR controller driver");
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(ircc_dma, "1i");
+module_param(ircc_dma, int, 0);
 MODULE_PARM_DESC(ircc_dma, "DMA channel");
-MODULE_PARM(ircc_irq, "1i");
+module_param(ircc_irq, int, 0);
 MODULE_PARM_DESC(ircc_irq, "IRQ line");
-MODULE_PARM(ircc_fir, "1-4i");
+module_param(ircc_fir, int, 0);
 MODULE_PARM_DESC(ircc_fir, "FIR Base Address");
-MODULE_PARM(ircc_sir, "1-4i");
+module_param(ircc_sir, int, 0);
 MODULE_PARM_DESC(ircc_sir, "SIR Base Address");
-MODULE_PARM(ircc_cfg, "1-4i");
+module_param(ircc_cfg, int, 0);
 MODULE_PARM_DESC(ircc_cfg, "Configuration register base address");
-MODULE_PARM(ircc_transceiver, "1i");
+module_param(ircc_transceiver, int, 0);
 MODULE_PARM_DESC(ircc_transceiver, "Transceiver type");
diff -Nru a/drivers/net/irda/stir4200.c b/drivers/net/irda/stir4200.c
--- a/drivers/net/irda/stir4200.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/net/irda/stir4200.c	2005-01-10 20:11:17 -08:00
@@ -1072,8 +1072,8 @@
 
 	printk(KERN_INFO "SigmaTel STIr4200 IRDA/USB found at address %d, "
 		"Vendor: %x, Product: %x\n",
-	       dev->devnum, dev->descriptor.idVendor,
-	       dev->descriptor.idProduct);
+	       dev->devnum, le16_to_cpu(dev->descriptor.idVendor),
+	       le16_to_cpu(dev->descriptor.idProduct));
 
 	/* Initialize QoS for this device */
 	irda_init_max_qos_capabilies(&stir->qos);
diff -Nru a/drivers/net/irda/tekram-sir.c b/drivers/net/irda/tekram-sir.c
--- a/drivers/net/irda/tekram-sir.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/net/irda/tekram-sir.c	2005-01-10 20:11:17 -08:00
@@ -32,9 +32,9 @@
 
 #include "sir-dev.h"
 
-MODULE_PARM(tekram_delay, "i");
-MODULE_PARM_DESC(tekram_delay, "tekram dongle write complete delay");
 static int tekram_delay = 150;		/* default is 150 ms */
+module_param(tekram_delay, int, 0);
+MODULE_PARM_DESC(tekram_delay, "tekram dongle write complete delay");
 
 static int tekram_open(struct sir_dev *);
 static int tekram_close(struct sir_dev *);
diff -Nru a/drivers/net/irda/via-ircc.c b/drivers/net/irda/via-ircc.c
--- a/drivers/net/irda/via-ircc.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/net/irda/via-ircc.c	2005-01-10 20:11:15 -08:00
@@ -73,7 +73,7 @@
 static int dongle_id = 0;	/* default: probe */
 
 /* We can't guess the type of connected dongle, user *must* supply it. */
-MODULE_PARM(dongle_id, "i");
+module_param(dongle_id, int, 0);
 
 /* FIXME : we should not need this, because instances should be automatically
  * managed by the PCI layer. Especially that we seem to only be using the
diff -Nru a/drivers/net/irda/vlsi_ir.c b/drivers/net/irda/vlsi_ir.c
--- a/drivers/net/irda/vlsi_ir.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/net/irda/vlsi_ir.c	2005-01-10 20:11:15 -08:00
@@ -83,9 +83,9 @@
  *		3: external 40MHz XCLK (HP OB-800)
  */
 
-MODULE_PARM(clksrc, "i");
-MODULE_PARM_DESC(clksrc, "clock input source selection");
 static int clksrc = 0;			/* default is 0(auto) */
+module_param(clksrc, int, 0);
+MODULE_PARM_DESC(clksrc, "clock input source selection");
 
 /*	ringsize: size of the tx and rx descriptor rings
  *		independent for tx and rx
@@ -95,9 +95,9 @@
  *		there should be no gain when using rings larger than 8
  */
 
-MODULE_PARM(ringsize, "1-2i");
-MODULE_PARM_DESC(ringsize, "TX, RX ring descriptor size");
 static int ringsize[] = {8,8};		/* default is tx=8 / rx=8 */
+module_param_array(ringsize, int, NULL, 0);
+MODULE_PARM_DESC(ringsize, "TX, RX ring descriptor size");
 
 /*	sirpulse: tuning of the SIR pulse width within IrPHY 1.3 limits
  *		0: very short, 1.5us (exception: 6us at 2.4 kbaud)
@@ -108,9 +108,9 @@
  *		pulse width saves more than 90% of the transmitted IR power.
  */
 
-MODULE_PARM(sirpulse, "i");
-MODULE_PARM_DESC(sirpulse, "SIR pulse width tuning");
 static int sirpulse = 1;		/* default is 3/16 bittime */
+module_param(sirpulse, int, 0);
+MODULE_PARM_DESC(sirpulse, "SIR pulse width tuning");
 
 /*	qos_mtt_bits: encoded min-turn-time value we require the peer device
  *		 to use before transmitting to us. "Type 1" (per-station)
@@ -119,9 +119,9 @@
  *		 pretty common HP HDLS-1100 requires 1 msec - so lets use this.
  */
 
-MODULE_PARM(qos_mtt_bits, "i");
-MODULE_PARM_DESC(qos_mtt_bits, "IrLAP bitfield representing min-turn-time");
 static int qos_mtt_bits = 0x07;		/* default is 1 ms or more */
+module_param(qos_mtt_bits, int, 0);
+MODULE_PARM_DESC(qos_mtt_bits, "IrLAP bitfield representing min-turn-time");
 
 /********************************************************/
 
diff -Nru a/drivers/net/irda/w83977af_ir.c b/drivers/net/irda/w83977af_ir.c
--- a/drivers/net/irda/w83977af_ir.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/net/irda/w83977af_ir.c	2005-01-10 20:11:18 -08:00
@@ -1355,11 +1355,11 @@
 MODULE_LICENSE("GPL");
 
 
-MODULE_PARM(qos_mtt_bits, "i");
+module_param(qos_mtt_bits, int, 0);
 MODULE_PARM_DESC(qos_mtt_bits, "Mimimum Turn Time");
-MODULE_PARM(io, "1-4i");
+module_param_array(io, int, NULL, 0);
 MODULE_PARM_DESC(io, "Base I/O addresses");
-MODULE_PARM(irq, "1-4i");
+module_param_array(irq, int, NULL, 0);
 MODULE_PARM_DESC(irq, "IRQ lines");
 
 /*
diff -Nru a/drivers/net/ixgb/ixgb_param.c b/drivers/net/ixgb/ixgb_param.c
--- a/drivers/net/ixgb/ixgb_param.c	2005-01-10 20:11:24 -08:00
+++ b/drivers/net/ixgb/ixgb_param.c	2005-01-10 20:11:24 -08:00
@@ -56,8 +56,8 @@
  */
 
 #define IXGB_PARAM(X, S) \
-static const int __devinitdata X[IXGB_MAX_NIC + 1] = IXGB_PARAM_INIT; \
-MODULE_PARM(X, "1-" __MODULE_STRING(IXGB_MAX_NIC) "i"); \
+static int __devinitdata X[IXGB_MAX_NIC + 1] = IXGB_PARAM_INIT; \
+module_param_array(X, int, NULL, 0); \
 MODULE_PARM_DESC(X, S);
 
 /* Transmit Descriptor Count
diff -Nru a/drivers/net/lance.c b/drivers/net/lance.c
--- a/drivers/net/lance.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/net/lance.c	2005-01-10 20:11:16 -08:00
@@ -327,10 +327,10 @@
 static int dma[MAX_CARDS];
 static int irq[MAX_CARDS];
 
-MODULE_PARM(io, "1-" __MODULE_STRING(MAX_CARDS) "i");
-MODULE_PARM(dma, "1-" __MODULE_STRING(MAX_CARDS) "i");
-MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_CARDS) "i");
-MODULE_PARM(lance_debug, "i");
+module_param_array(io, int, NULL, 0);
+module_param_array(dma, int, NULL, 0);
+module_param_array(irq, int, NULL, 0);
+module_param(lance_debug, int, 0);
 MODULE_PARM_DESC(io, "LANCE/PCnet I/O base address(es),required");
 MODULE_PARM_DESC(dma, "LANCE/PCnet ISA DMA channel (ignored for some devices)");
 MODULE_PARM_DESC(irq, "LANCE/PCnet IRQ number (ignored for some devices)");
diff -Nru a/drivers/net/lne390.c b/drivers/net/lne390.c
--- a/drivers/net/lne390.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/net/lne390.c	2005-01-10 20:11:22 -08:00
@@ -149,8 +149,7 @@
 {
 	free_irq(dev->irq, dev);
 	release_region(dev->base_addr, LNE390_IO_EXTENT);
-	if (ei_status.reg0)
-		iounmap((void *)dev->mem_start);
+	iounmap(ei_status.mem);
 }
 
 #ifndef MODULE
@@ -257,32 +256,22 @@
 	/*
 	   BEWARE!! Some dain-bramaged EISA SCUs will allow you to put
 	   the card mem within the region covered by `normal' RAM  !!!
+
+	   ioremap() will fail in that case.
 	*/
-	if (dev->mem_start > 1024*1024) {	/* phys addr > 1MB */
-		if (dev->mem_start < virt_to_phys(high_memory)) {
-			printk(KERN_CRIT "lne390.c: Card RAM overlaps with normal memory!!!\n");
-			printk(KERN_CRIT "lne390.c: Use EISA SCU to set card memory below 1MB,\n");
-			printk(KERN_CRIT "lne390.c: or to an address above 0x%lx.\n", virt_to_phys(high_memory));
-			printk(KERN_CRIT "lne390.c: Driver NOT installed.\n");
-			ret = -EINVAL;
-			goto cleanup;
-		}
-		dev->mem_start = (unsigned long)ioremap(dev->mem_start, LNE390_STOP_PG*0x100);
-		if (dev->mem_start == 0) {
-			printk(KERN_ERR "lne390.c: Unable to remap card memory above 1MB !!\n");
-			printk(KERN_ERR "lne390.c: Try using EISA SCU to set memory below 1MB.\n");
-			printk(KERN_ERR "lne390.c: Driver NOT installed.\n");
-			ret = -EAGAIN;
-			goto cleanup;
-		}
-		ei_status.reg0 = 1;	/* Use as remap flag */
-		printk("lne390.c: remapped %dkB card memory to virtual address %#lx\n",
-				LNE390_STOP_PG/4, dev->mem_start);
+	ei_status.mem = ioremap(dev->mem_start, LNE390_STOP_PG*0x100);
+	if (!ei_status.mem) {
+		printk(KERN_ERR "lne390.c: Unable to remap card memory above 1MB !!\n");
+		printk(KERN_ERR "lne390.c: Try using EISA SCU to set memory below 1MB.\n");
+		printk(KERN_ERR "lne390.c: Driver NOT installed.\n");
+		ret = -EAGAIN;
+		goto cleanup;
 	}
+	printk("lne390.c: remapped %dkB card memory to virtual address %p\n",
+			LNE390_STOP_PG/4, ei_status.mem);
 
-	dev->mem_end = ei_status.rmem_end = dev->mem_start
-		+ (LNE390_STOP_PG - LNE390_START_PG)*256;
-	ei_status.rmem_start = dev->mem_start + TX_PAGES*256;
+	dev->mem_start = (unsigned long)ei_status.mem;
+	dev->mem_end = dev->mem_start + (LNE390_STOP_PG - LNE390_START_PG)*256;
 
 	/* The 8390 offset is zero for the LNE390 */
 	dev->base_addr = ioaddr;
@@ -352,8 +341,8 @@
 static void
 lne390_get_8390_hdr(struct net_device *dev, struct e8390_pkt_hdr *hdr, int ring_page)
 {
-	unsigned long hdr_start = dev->mem_start + ((ring_page - LNE390_START_PG)<<8);
-	isa_memcpy_fromio(hdr, hdr_start, sizeof(struct e8390_pkt_hdr));
+	void __iomem *hdr_start = ei_status.mem + ((ring_page - LNE390_START_PG)<<8);
+	memcpy_fromio(hdr, hdr_start, sizeof(struct e8390_pkt_hdr));
 	hdr->count = (hdr->count + 3) & ~3;     /* Round up allocation. */
 }
 
@@ -366,27 +355,28 @@
 static void lne390_block_input(struct net_device *dev, int count, struct sk_buff *skb,
 						  int ring_offset)
 {
-	unsigned long xfer_start = dev->mem_start + ring_offset - (LNE390_START_PG<<8);
+	void __iomem *xfer_start = ei_status.mem + ring_offset - (LNE390_START_PG<<8);
 
-	if (xfer_start + count > ei_status.rmem_end) {
+	if (ring_offset + count > (LNE390_STOP_PG<<8)) {
 		/* Packet wraps over end of ring buffer. */
-		int semi_count = ei_status.rmem_end - xfer_start;
-		isa_memcpy_fromio(skb->data, xfer_start, semi_count);
+		int semi_count = (LNE390_STOP_PG<<8) - ring_offset;
+		memcpy_fromio(skb->data, xfer_start, semi_count);
 		count -= semi_count;
-		isa_memcpy_fromio(skb->data + semi_count, ei_status.rmem_start, count);
+		memcpy_fromio(skb->data + semi_count,
+			ei_status.mem + (TX_PAGES<<8), count);
 	} else {
 		/* Packet is in one chunk. */
-		isa_memcpy_fromio(skb->data, xfer_start, count);
+		memcpy_fromio(skb->data, xfer_start, count);
 	}
 }
 
 static void lne390_block_output(struct net_device *dev, int count,
 				const unsigned char *buf, int start_page)
 {
-	unsigned long shmem = dev->mem_start + ((start_page - LNE390_START_PG)<<8);
+	void __iomem *shmem = ei_status.mem + ((start_page - LNE390_START_PG)<<8);
 
 	count = (count + 3) & ~3;     /* Round up to doubleword */
-	isa_memcpy_toio(shmem, buf, count);
+	memcpy_toio(shmem, buf, count);
 }
 
 static int lne390_open(struct net_device *dev)
@@ -412,9 +402,9 @@
 static int irq[MAX_LNE_CARDS];
 static int mem[MAX_LNE_CARDS];
 
-MODULE_PARM(io, "1-" __MODULE_STRING(MAX_LNE_CARDS) "i");
-MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_LNE_CARDS) "i");
-MODULE_PARM(mem, "1-" __MODULE_STRING(MAX_LNE_CARDS) "i");
+module_param_array(io, int, NULL, 0);
+module_param_array(irq, int, NULL, 0);
+module_param_array(mem, int, NULL, 0);
 MODULE_PARM_DESC(io, "I/O base address(es)");
 MODULE_PARM_DESC(irq, "IRQ number(s)");
 MODULE_PARM_DESC(mem, "memory base address(es)");
diff -Nru a/drivers/net/lp486e.c b/drivers/net/lp486e.c
--- a/drivers/net/lp486e.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/net/lp486e.c	2005-01-10 20:11:17 -08:00
@@ -1302,18 +1302,18 @@
 MODULE_DESCRIPTION("Intel Panther onboard i82596 driver");
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(debug, "i");
-//MODULE_PARM(max_interrupt_work, "i");
-//MODULE_PARM(reverse_probe, "i");
-//MODULE_PARM(rx_copybreak, "i");
-MODULE_PARM(options, "1-" __MODULE_STRING(MAX_UNITS) "i");
-MODULE_PARM(full_duplex, "1-" __MODULE_STRING(MAX_UNITS) "i");
-
 static struct net_device *dev_lp486e;
 static int full_duplex;
 static int options;
 static int io = IOADDR;
 static int irq = IRQ;
+
+module_param(debug, int, 0);
+//module_param(max_interrupt_work, int, 0);
+//module_param(reverse_probe, int, 0);
+//module_param(rx_copybreak, int, 0);
+module_param(options, int, 0);
+module_param(full_duplex, int, 0);
 
 static int __init lp486e_init_module(void) {
 	int err;
diff -Nru a/drivers/net/mace.c b/drivers/net/mace.c
--- a/drivers/net/mace.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/net/mace.c	2005-01-10 20:11:17 -08:00
@@ -40,10 +40,10 @@
 #define TX_DMA_ERR	0x80
 
 struct mace_data {
-    volatile struct mace *mace;
-    volatile struct dbdma_regs *tx_dma;
+    volatile struct mace __iomem *mace;
+    volatile struct dbdma_regs __iomem *tx_dma;
     int tx_dma_intr;
-    volatile struct dbdma_regs *rx_dma;
+    volatile struct dbdma_regs __iomem *rx_dma;
     int rx_dma_intr;
     volatile struct dbdma_cmd *tx_cmds;	/* xmit dma command list */
     volatile struct dbdma_cmd *rx_cmds;	/* recv dma command list */
@@ -88,7 +88,7 @@
 static irqreturn_t mace_rxdma_intr(int irq, void *dev_id, struct pt_regs *regs);
 static void mace_set_timeout(struct net_device *dev);
 static void mace_tx_timeout(unsigned long data);
-static inline void dbdma_reset(volatile struct dbdma_regs *dma);
+static inline void dbdma_reset(volatile struct dbdma_regs __iomem *dma);
 static inline void mace_clean_rings(struct mace_data *mp);
 static void __mace_set_address(struct net_device *dev, void *addr);
 
@@ -164,7 +164,7 @@
 	macio_set_drvdata(mdev, dev);
 
 	dev->base_addr = macio_resource_start(mdev, 0);
-	mp->mace = (volatile struct mace *)ioremap(dev->base_addr, 0x1000);
+	mp->mace = ioremap(dev->base_addr, 0x1000);
 	if (mp->mace == NULL) {
 		printk(KERN_ERR "MACE: can't map IO resources !\n");
 		rc = -ENOMEM;
@@ -183,8 +183,7 @@
 	mp = (struct mace_data *) dev->priv;
 	mp->maccc = ENXMT | ENRCV;
 
-	mp->tx_dma = (volatile struct dbdma_regs *)
-		ioremap(macio_resource_start(mdev, 1), 0x1000);
+	mp->tx_dma = ioremap(macio_resource_start(mdev, 1), 0x1000);
 	if (mp->tx_dma == NULL) {
 		printk(KERN_ERR "MACE: can't map TX DMA resources !\n");
 		rc = -ENOMEM;
@@ -192,8 +191,7 @@
 	}
 	mp->tx_dma_intr = macio_irq(mdev, 1);
 
-	mp->rx_dma = (volatile struct dbdma_regs *)
-		ioremap(macio_resource_start(mdev, 2), 0x1000);
+	mp->rx_dma = ioremap(macio_resource_start(mdev, 2), 0x1000);
 	if (mp->rx_dma == NULL) {
 		printk(KERN_ERR "MACE: can't map RX DMA resources !\n");
 		rc = -ENOMEM;
@@ -275,11 +273,11 @@
  err_free_irq:
 	free_irq(macio_irq(mdev, 0), dev);
  err_unmap_rx_dma:
-	iounmap((void*)mp->rx_dma);
+	iounmap(mp->rx_dma);
  err_unmap_tx_dma:
-	iounmap((void*)mp->tx_dma);
+	iounmap(mp->tx_dma);
  err_unmap_io:
-	iounmap((void*)mp->mace);
+	iounmap(mp->mace);
  err_free:
 	free_netdev(dev);
  err_release:
@@ -305,9 +303,9 @@
 	free_irq(mp->tx_dma_intr, dev);
 	free_irq(mp->rx_dma_intr, dev);
 
-	iounmap((void*)mp->rx_dma);
-	iounmap((void*)mp->tx_dma);
-	iounmap((void*)mp->mace);
+	iounmap(mp->rx_dma);
+	iounmap(mp->tx_dma);
+	iounmap(mp->mace);
 
 	free_netdev(dev);
 
@@ -316,7 +314,7 @@
 	return 0;
 }
 
-static void dbdma_reset(volatile struct dbdma_regs *dma)
+static void dbdma_reset(volatile struct dbdma_regs __iomem *dma)
 {
     int i;
 
@@ -334,7 +332,7 @@
 static void mace_reset(struct net_device *dev)
 {
     struct mace_data *mp = (struct mace_data *) dev->priv;
-    volatile struct mace *mb = mp->mace;
+    volatile struct mace __iomem *mb = mp->mace;
     int i;
 
     /* soft-reset the chip */
@@ -389,7 +387,7 @@
 static void __mace_set_address(struct net_device *dev, void *addr)
 {
     struct mace_data *mp = (struct mace_data *) dev->priv;
-    volatile struct mace *mb = mp->mace;
+    volatile struct mace __iomem *mb = mp->mace;
     unsigned char *p = addr;
     int i;
 
@@ -410,7 +408,7 @@
 static int mace_set_address(struct net_device *dev, void *addr)
 {
     struct mace_data *mp = (struct mace_data *) dev->priv;
-    volatile struct mace *mb = mp->mace;
+    volatile struct mace __iomem *mb = mp->mace;
     unsigned long flags;
 
     spin_lock_irqsave(&mp->lock, flags);
@@ -445,9 +443,9 @@
 static int mace_open(struct net_device *dev)
 {
     struct mace_data *mp = (struct mace_data *) dev->priv;
-    volatile struct mace *mb = mp->mace;
-    volatile struct dbdma_regs *rd = mp->rx_dma;
-    volatile struct dbdma_regs *td = mp->tx_dma;
+    volatile struct mace __iomem *mb = mp->mace;
+    volatile struct dbdma_regs __iomem *rd = mp->rx_dma;
+    volatile struct dbdma_regs __iomem *td = mp->tx_dma;
     volatile struct dbdma_cmd *cp;
     int i;
     struct sk_buff *skb;
@@ -515,9 +513,9 @@
 static int mace_close(struct net_device *dev)
 {
     struct mace_data *mp = (struct mace_data *) dev->priv;
-    volatile struct mace *mb = mp->mace;
-    volatile struct dbdma_regs *rd = mp->rx_dma;
-    volatile struct dbdma_regs *td = mp->tx_dma;
+    volatile struct mace __iomem *mb = mp->mace;
+    volatile struct dbdma_regs __iomem *rd = mp->rx_dma;
+    volatile struct dbdma_regs __iomem *td = mp->tx_dma;
 
     /* disable rx and tx */
     out_8(&mb->maccc, 0);
@@ -548,7 +546,7 @@
 static int mace_xmit_start(struct sk_buff *skb, struct net_device *dev)
 {
     struct mace_data *mp = (struct mace_data *) dev->priv;
-    volatile struct dbdma_regs *td = mp->tx_dma;
+    volatile struct dbdma_regs __iomem *td = mp->tx_dma;
     volatile struct dbdma_cmd *cp, *np;
     unsigned long flags;
     int fill, next, len;
@@ -610,7 +608,7 @@
 static void mace_set_multicast(struct net_device *dev)
 {
     struct mace_data *mp = (struct mace_data *) dev->priv;
-    volatile struct mace *mb = mp->mace;
+    volatile struct mace __iomem *mb = mp->mace;
     int i, j;
     u32 crc;
     unsigned long flags;
@@ -662,7 +660,7 @@
 
 static void mace_handle_misc_intrs(struct mace_data *mp, int intr)
 {
-    volatile struct mace *mb = mp->mace;
+    volatile struct mace __iomem *mb = mp->mace;
     static int mace_babbles, mace_jabbers;
 
     if (intr & MPCO)
@@ -685,8 +683,8 @@
 {
     struct net_device *dev = (struct net_device *) dev_id;
     struct mace_data *mp = (struct mace_data *) dev->priv;
-    volatile struct mace *mb = mp->mace;
-    volatile struct dbdma_regs *td = mp->tx_dma;
+    volatile struct mace __iomem *mb = mp->mace;
+    volatile struct dbdma_regs __iomem *td = mp->tx_dma;
     volatile struct dbdma_cmd *cp;
     int intr, fs, i, stat, x;
     int xcount, dstat;
@@ -831,9 +829,9 @@
 {
     struct net_device *dev = (struct net_device *) data;
     struct mace_data *mp = (struct mace_data *) dev->priv;
-    volatile struct mace *mb = mp->mace;
-    volatile struct dbdma_regs *td = mp->tx_dma;
-    volatile struct dbdma_regs *rd = mp->rx_dma;
+    volatile struct mace __iomem *mb = mp->mace;
+    volatile struct dbdma_regs __iomem *td = mp->tx_dma;
+    volatile struct dbdma_regs __iomem *rd = mp->rx_dma;
     volatile struct dbdma_cmd *cp;
     unsigned long flags;
     int i;
@@ -902,7 +900,7 @@
 {
     struct net_device *dev = (struct net_device *) dev_id;
     struct mace_data *mp = (struct mace_data *) dev->priv;
-    volatile struct dbdma_regs *rd = mp->rx_dma;
+    volatile struct dbdma_regs __iomem *rd = mp->rx_dma;
     volatile struct dbdma_cmd *cp, *np;
     int i, nb, stat, next;
     struct sk_buff *skb;
diff -Nru a/drivers/net/natsemi.c b/drivers/net/natsemi.c
--- a/drivers/net/natsemi.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/net/natsemi.c	2005-01-10 20:11:16 -08:00
@@ -251,12 +251,12 @@
 MODULE_DESCRIPTION("National Semiconductor DP8381x series PCI Ethernet driver");
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(max_interrupt_work, "i");
-MODULE_PARM(mtu, "i");
-MODULE_PARM(debug, "i");
-MODULE_PARM(rx_copybreak, "i");
-MODULE_PARM(options, "1-" __MODULE_STRING(MAX_UNITS) "i");
-MODULE_PARM(full_duplex, "1-" __MODULE_STRING(MAX_UNITS) "i");
+module_param(max_interrupt_work, int, 0);
+module_param(mtu, int, 0);
+module_param(debug, int, 0);
+module_param(rx_copybreak, int, 0);
+module_param_array(options, int, NULL, 0);
+module_param_array(full_duplex, int, NULL, 0);
 MODULE_PARM_DESC(max_interrupt_work, 
 	"DP8381x maximum events handled per interrupt");
 MODULE_PARM_DESC(mtu, "DP8381x MTU (all boards)");
diff -Nru a/drivers/net/ne.c b/drivers/net/ne.c
--- a/drivers/net/ne.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/net/ne.c	2005-01-10 20:11:18 -08:00
@@ -800,9 +800,9 @@
 static int irq[MAX_NE_CARDS];
 static int bad[MAX_NE_CARDS];	/* 0xbad = bad sig or no reset ack */
 
-MODULE_PARM(io, "1-" __MODULE_STRING(MAX_NE_CARDS) "i");
-MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_NE_CARDS) "i");
-MODULE_PARM(bad, "1-" __MODULE_STRING(MAX_NE_CARDS) "i");
+module_param_array(io, int, NULL, 0);
+module_param_array(irq, int, NULL, 0);
+module_param_array(bad, int, NULL, 0);
 MODULE_PARM_DESC(io, "I/O base address(es),required");
 MODULE_PARM_DESC(irq, "IRQ number(s)");
 MODULE_PARM_DESC(bad, "Accept card(s) with bad signatures");
diff -Nru a/drivers/net/ne2.c b/drivers/net/ne2.c
--- a/drivers/net/ne2.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/net/ne2.c	2005-01-10 20:11:23 -08:00
@@ -776,9 +776,9 @@
 static int bad[MAX_NE_CARDS];	/* 0xbad = bad sig or no reset ack */
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(io, "1-" __MODULE_STRING(MAX_NE_CARDS) "i");
-MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_NE_CARDS) "i");
-MODULE_PARM(bad, "1-" __MODULE_STRING(MAX_NE_CARDS) "i");
+module_param_array(io, int, NULL, 0);
+module_param_array(irq, int, NULL, 0);
+module_param_array(bad, int, NULL, 0);
 MODULE_PARM_DESC(io, "(ignored)");
 MODULE_PARM_DESC(irq, "(ignored)");
 MODULE_PARM_DESC(bad, "(ignored)");
diff -Nru a/drivers/net/ne2k-pci.c b/drivers/net/ne2k-pci.c
--- a/drivers/net/ne2k-pci.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/net/ne2k-pci.c	2005-01-10 20:11:17 -08:00
@@ -77,9 +77,9 @@
 MODULE_DESCRIPTION("PCI NE2000 clone driver");
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(debug, "i");
-MODULE_PARM(options, "1-" __MODULE_STRING(MAX_UNITS) "i");
-MODULE_PARM(full_duplex, "1-" __MODULE_STRING(MAX_UNITS) "i");
+module_param(debug, int, 0);
+module_param_array(options, int, NULL, 0);
+module_param_array(full_duplex, int, NULL, 0);
 MODULE_PARM_DESC(debug, "debug level (1-2)");
 MODULE_PARM_DESC(options, "Bit 5: full duplex");
 MODULE_PARM_DESC(full_duplex, "full duplex setting(s) (1)");
diff -Nru a/drivers/net/ne3210.c b/drivers/net/ne3210.c
--- a/drivers/net/ne3210.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/net/ne3210.c	2005-01-10 20:11:18 -08:00
@@ -174,18 +174,17 @@
 	printk("%dkB memory at physical address %#lx\n",
 	       NE3210_STOP_PG/4, phys_mem);
 
-	dev->mem_start = (unsigned long)ioremap(phys_mem, NE3210_STOP_PG*0x100);
-	if (dev->mem_start == 0) {
+	ei_status.mem = ioremap(phys_mem, NE3210_STOP_PG*0x100);
+	if (!ei_status.mem) {
 		printk(KERN_ERR "ne3210.c: Unable to remap card memory !!\n");
 		printk(KERN_ERR "ne3210.c: Driver NOT installed.\n");
 		retval = -EAGAIN;
 		goto out4;
 	}
-	printk("ne3210.c: remapped %dkB card memory to virtual address %#lx\n",
-	       NE3210_STOP_PG/4, dev->mem_start);
-	dev->mem_end = ei_status.rmem_end = dev->mem_start
-		+ (NE3210_STOP_PG - NE3210_START_PG)*256;
-	ei_status.rmem_start = dev->mem_start + TX_PAGES*256;
+	printk("ne3210.c: remapped %dkB card memory to virtual address %p\n",
+	       NE3210_STOP_PG/4, ei_status.mem);
+	dev->mem_start = (unsigned long)ei_status.mem;
+	dev->mem_end = dev->mem_start + (NE3210_STOP_PG - NE3210_START_PG)*256;
 
 	/* The 8390 offset is zero for the NE3210 */
 	dev->base_addr = ioaddr;
@@ -219,7 +218,7 @@
 	return 0;
 
  out5:
-	iounmap((void *)dev->mem_start);
+	iounmap(ei_status.mem);
  out4:
 	release_mem_region (phys_mem, NE3210_STOP_PG*0x100);
  out3:
@@ -240,7 +239,7 @@
 	unsigned long       ioaddr = to_eisa_device (device)->base_addr;
 
 	unregister_netdev (dev);
-	iounmap((void *)dev->mem_start);
+	iounmap(ei_status.mem);
 	release_mem_region (ei_status.priv, NE3210_STOP_PG*0x100);
 	free_irq (dev->irq, dev);
 	release_region (ioaddr + NE3210_CFG1, NE3210_CFG_EXTENT);
@@ -288,7 +287,7 @@
 static void
 ne3210_get_8390_hdr(struct net_device *dev, struct e8390_pkt_hdr *hdr, int ring_page)
 {
-	unsigned long hdr_start = dev->mem_start + ((ring_page - NE3210_START_PG)<<8);
+	void __iomem *hdr_start = ei_status.mem + ((ring_page - NE3210_START_PG)<<8);
 	memcpy_fromio(hdr, hdr_start, sizeof(struct e8390_pkt_hdr));
 	hdr->count = (hdr->count + 3) & ~3;     /* Round up allocation. */
 }
@@ -302,24 +301,25 @@
 static void ne3210_block_input(struct net_device *dev, int count, struct sk_buff *skb,
 						  int ring_offset)
 {
-	unsigned long xfer_start = dev->mem_start + ring_offset - (NE3210_START_PG<<8);
+	void __iomem *start = ei_status.mem + ring_offset - NE3210_START_PG*256;
 
-	if (xfer_start + count > ei_status.rmem_end) {
+	if (ring_offset + count > NE3210_STOP_PG*256) {
 		/* Packet wraps over end of ring buffer. */
-		int semi_count = ei_status.rmem_end - xfer_start;
-		memcpy_fromio(skb->data, xfer_start, semi_count);
+		int semi_count = NE3210_STOP_PG*256 - ring_offset;
+		memcpy_fromio(skb->data, start, semi_count);
 		count -= semi_count;
-		memcpy_fromio(skb->data + semi_count, ei_status.rmem_start, count);
+		memcpy_fromio(skb->data + semi_count,
+				ei_status.mem + TX_PAGES*256, count);
 	} else {
 		/* Packet is in one chunk. */
-		memcpy_fromio(skb->data, xfer_start, count);
+		memcpy_fromio(skb->data, start, count);
 	}
 }
 
 static void ne3210_block_output(struct net_device *dev, int count,
 				const unsigned char *buf, int start_page)
 {
-	unsigned long shmem = dev->mem_start + ((start_page - NE3210_START_PG)<<8);
+	void __iomem *shmem = ei_status.mem + ((start_page - NE3210_START_PG)<<8);
 
 	count = (count + 3) & ~3;     /* Round up to doubleword */
 	memcpy_toio(shmem, buf, count);
diff -Nru a/drivers/net/net_init.c b/drivers/net/net_init.c
--- a/drivers/net/net_init.c	2005-01-10 20:11:16 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,152 +0,0 @@
-/* net_init.c: Initialization for network devices. */
-/*
-	Written 1993,1994,1995 by Donald Becker.
-
-	The author may be reached as becker@scyld.com, or C/O
-	Scyld Computing Corporation
-	410 Severn Ave., Suite 210
-	Annapolis MD 21403
-
-	This file contains the initialization for the "pl14+" style ethernet
-	drivers.  It should eventually replace most of drivers/net/Space.c.
-	It's primary advantage is that it's able to allocate low-memory buffers.
-	A secondary advantage is that the dangerous NE*000 netcards can reserve
-	their I/O port region before the SCSI probes start.
-
-	Modifications/additions by Bjorn Ekwall <bj0rn@blox.se>:
-		ethdev_index[MAX_ETH_CARDS]
-		register_netdev() / unregister_netdev()
-		
-	Modifications by Wolfgang Walter
-		Use dev_close cleanly so we always shut things down tidily.
-		
-	Changed 29/10/95, Alan Cox to pass sockaddr's around for mac addresses.
-	
-	14/06/96 - Paul Gortmaker:	Add generic eth_change_mtu() function. 
-	24/09/96 - Paul Norton: Add token-ring variants of the netdev functions. 
-	
-	08/11/99 - Alan Cox: Got fed up of the mess in this file and cleaned it
-			up. We now share common code and have regularised name
-			allocation setups. Abolished the 16 card limits.
-	03/19/2000 - jgarzik and Urban Widmark: init_etherdev 32-byte align
-	03/21/2001 - jgarzik: alloc_etherdev and friends
-
-*/
-
-#include <linux/config.h>
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/types.h>
-#include <linux/fs.h>
-#include <linux/slab.h>
-#include <linux/if_ether.h>
-#include <linux/string.h>
-#include <linux/netdevice.h>
-#include <linux/etherdevice.h>
-#include <linux/fddidevice.h>
-#include <linux/hippidevice.h>
-#include <linux/trdevice.h>
-#include <linux/fcdevice.h>
-#include <linux/if_arp.h>
-#include <linux/if_ltalk.h>
-#include <linux/rtnetlink.h>
-#include <net/neighbour.h>
-
-/* The network devices currently exist only in the socket namespace, so these
-   entries are unused.  The only ones that make sense are
-    open	start the ethercard
-    close	stop  the ethercard
-    ioctl	To get statistics, perhaps set the interface port (AUI, BNC, etc.)
-   One can also imagine getting raw packets using
-    read & write
-   but this is probably better handled by a raw packet socket.
-
-   Given that almost all of these functions are handled in the current
-   socket-based scheme, putting ethercard devices in /dev/ seems pointless.
-   
-   [Removed all support for /dev network devices. When someone adds
-    streams then by magic we get them, but otherwise they are un-needed
-	and a space waste]
-*/
-
-
-struct net_device *alloc_netdev(int sizeof_priv, const char *mask,
-				       void (*setup)(struct net_device *))
-{
-	void *p;
-	struct net_device *dev;
-	int alloc_size;
-
-	/* ensure 32-byte alignment of both the device and private area */
-
-	alloc_size = (sizeof(struct net_device) + NETDEV_ALIGN_CONST)
-			& ~NETDEV_ALIGN_CONST;
-	alloc_size += sizeof_priv + NETDEV_ALIGN_CONST;
-
-	p = kmalloc (alloc_size, GFP_KERNEL);
-	if (!p) {
-		printk(KERN_ERR "alloc_dev: Unable to allocate device.\n");
-		return NULL;
-	}
-
-	memset(p, 0, alloc_size);
-
-	dev = (struct net_device *)(((long)p + NETDEV_ALIGN_CONST)
-				& ~NETDEV_ALIGN_CONST);
-	dev->padded = (char *)dev - (char *)p;
-
-	if (sizeof_priv)
-		dev->priv = netdev_priv(dev);
-
-	setup(dev);
-	strcpy(dev->name, mask);
-
-	return dev;
-}
-EXPORT_SYMBOL(alloc_netdev);
-
-int register_netdev(struct net_device *dev)
-{
-	int err;
-
-	rtnl_lock();
-
-	/*
-	 *	If the name is a format string the caller wants us to
-	 *	do a name allocation
-	 */
-	 
-	if (strchr(dev->name, '%'))
-	{
-		err = dev_alloc_name(dev, dev->name);
-		if (err < 0)
-			goto out;
-	}
-	
-	/*
-	 *	Back compatibility hook. Kill this one in 2.5
-	 */
-	
-	if (dev->name[0]==0 || dev->name[0]==' ')
-	{
-		err = dev_alloc_name(dev, "eth%d");
-		if (err < 0)
-			goto out;
-	}
-
-	err = register_netdevice(dev);
-
-out:
-	rtnl_unlock();
-	return err;
-}
-
-void unregister_netdev(struct net_device *dev)
-{
-	rtnl_lock();
-	unregister_netdevice(dev);
-	rtnl_unlock();
-}
-
-EXPORT_SYMBOL(register_netdev);
-EXPORT_SYMBOL(unregister_netdev);
diff -Nru a/drivers/net/ni52.c b/drivers/net/ni52.c
--- a/drivers/net/ni52.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/net/ni52.c	2005-01-10 20:11:20 -08:00
@@ -1314,10 +1314,10 @@
 #ifdef MODULE
 static struct net_device *dev_ni52;
 
-MODULE_PARM(io, "i");
-MODULE_PARM(irq, "i");
-MODULE_PARM(memstart, "l");
-MODULE_PARM(memend, "l");
+module_param(io, int, 0);
+module_param(irq, int, 0);
+module_param(memstart, long, 0);
+module_param(memend, long, 0);
 MODULE_PARM_DESC(io, "NI5210 I/O base address,required");
 MODULE_PARM_DESC(irq, "NI5210 IRQ number,required");
 MODULE_PARM_DESC(memstart, "NI5210 memory base address,required");
diff -Nru a/drivers/net/ni65.c b/drivers/net/ni65.c
--- a/drivers/net/ni65.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/net/ni65.c	2005-01-10 20:11:17 -08:00
@@ -1250,9 +1250,9 @@
 #ifdef MODULE
 static struct net_device *dev_ni65;
 
-MODULE_PARM(irq, "i");
-MODULE_PARM(io, "i");
-MODULE_PARM(dma, "i");
+module_param(irq, int, 0);
+module_param(io, int, 0);
+module_param(dma, int, 0);
 MODULE_PARM_DESC(irq, "ni6510 IRQ number (ignored for some cards)");
 MODULE_PARM_DESC(io, "ni6510 I/O base address");
 MODULE_PARM_DESC(dma, "ni6510 ISA DMA channel (ignored for some cards)");
diff -Nru a/drivers/net/pci-skeleton.c b/drivers/net/pci-skeleton.c
--- a/drivers/net/pci-skeleton.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/net/pci-skeleton.c	2005-01-10 20:11:15 -08:00
@@ -1921,7 +1921,7 @@
 	spin_unlock_irqrestore (&tp->lock, flags);
 
 	pci_save_state (pdev);
-	pci_set_power_state (pdev, 3);
+	pci_set_power_state (pdev, PCI_D3hot);
 
 	return 0;
 }
@@ -1934,7 +1934,7 @@
 
 	if (!netif_running(dev))
 		return 0;
-	pci_set_power_state (pdev, 0);
+	pci_set_power_state (pdev, PCI_D0);
 	pci_restore_state (pdev);
 	netif_device_attach (dev);
 	netdrv_hw_start (dev);
diff -Nru a/drivers/net/pcmcia/3c574_cs.c b/drivers/net/pcmcia/3c574_cs.c
--- a/drivers/net/pcmcia/3c574_cs.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/net/pcmcia/3c574_cs.c	2005-01-10 20:11:17 -08:00
@@ -107,12 +107,12 @@
 MODULE_DESCRIPTION("3Com 3c574 series PCMCIA ethernet driver");
 MODULE_LICENSE("GPL");
 
-#define INT_MODULE_PARM(n, v) static int n = v; MODULE_PARM(n, "i")
+#define INT_MODULE_PARM(n, v) static int n = v; module_param(n, int, 0)
 
 /* Now-standard PC card module parameters. */
 INT_MODULE_PARM(irq_mask, 0xdeb8);
 static int irq_list[4] = { -1 };
-MODULE_PARM(irq_list, "1-4i");
+module_param_array(irq_list, int, NULL, 0);
 
 /* Maximum events (Rx packets, etc.) to handle at each interrupt. */
 INT_MODULE_PARM(max_interrupt_work, 32);
diff -Nru a/drivers/net/pcmcia/3c589_cs.c b/drivers/net/pcmcia/3c589_cs.c
--- a/drivers/net/pcmcia/3c589_cs.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/net/pcmcia/3c589_cs.c	2005-01-10 20:11:22 -08:00
@@ -126,7 +126,7 @@
 MODULE_DESCRIPTION("3Com 3c589 series PCMCIA ethernet driver");
 MODULE_LICENSE("GPL");
 
-#define INT_MODULE_PARM(n, v) static int n = v; MODULE_PARM(n, "i")
+#define INT_MODULE_PARM(n, v) static int n = v; module_param(n, int, 0)
 
 /* Special hook for setting if_port when module is loaded */
 INT_MODULE_PARM(if_port, 0);
@@ -134,7 +134,7 @@
 /* Bit map of interrupts to choose from */
 INT_MODULE_PARM(irq_mask, 0xdeb8);
 static int irq_list[4] = { -1 };
-MODULE_PARM(irq_list, "1-4i");
+module_param_array(irq_list, int, NULL, 0);
 
 #ifdef PCMCIA_DEBUG
 INT_MODULE_PARM(pc_debug, PCMCIA_DEBUG);
diff -Nru a/drivers/net/pcmcia/Kconfig b/drivers/net/pcmcia/Kconfig
--- a/drivers/net/pcmcia/Kconfig	2005-01-10 20:11:24 -08:00
+++ b/drivers/net/pcmcia/Kconfig	2005-01-10 20:11:24 -08:00
@@ -3,7 +3,7 @@
 #
 
 menu "PCMCIA network device support"
-	depends on NETDEVICES && HOTPLUG && PCMCIA!=n
+	depends on NETDEVICES && PCMCIA!=n
 
 config NET_PCMCIA
 	bool "PCMCIA network device support"
diff -Nru a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c
--- a/drivers/net/pcmcia/axnet_cs.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/net/pcmcia/axnet_cs.c	2005-01-10 20:11:19 -08:00
@@ -73,12 +73,12 @@
 MODULE_DESCRIPTION("Asix AX88190 PCMCIA ethernet driver");
 MODULE_LICENSE("GPL");
 
-#define INT_MODULE_PARM(n, v) static int n = v; MODULE_PARM(n, "i")
+#define INT_MODULE_PARM(n, v) static int n = v; module_param(n, int, 0)
 
 /* Bit map of interrupts to choose from */
 INT_MODULE_PARM(irq_mask,	0xdeb8);
 static int irq_list[4] = { -1 };
-MODULE_PARM(irq_list, "1-4i");
+module_param_array(irq_list, int, NULL, 0);
 
 #ifdef PCMCIA_DEBUG
 INT_MODULE_PARM(pc_debug, PCMCIA_DEBUG);
diff -Nru a/drivers/net/pcmcia/com20020_cs.c b/drivers/net/pcmcia/com20020_cs.c
--- a/drivers/net/pcmcia/com20020_cs.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/net/pcmcia/com20020_cs.c	2005-01-10 20:11:19 -08:00
@@ -57,7 +57,7 @@
 #ifdef PCMCIA_DEBUG
 
 static int pc_debug = PCMCIA_DEBUG;
-MODULE_PARM(pc_debug, "i");
+module_param(pc_debug, int, 0);
 #define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args)
 
 static void regdump(struct net_device *dev)
@@ -109,18 +109,18 @@
 static int clockp;
 static int clockm;
 
-MODULE_PARM(node, "i");
-MODULE_PARM(timeout, "i");
-MODULE_PARM(backplane, "i");
-MODULE_PARM(clockp, "i");
-MODULE_PARM(clockm, "i");
+module_param(node, int, 0);
+module_param(timeout, int, 0);
+module_param(backplane, int, 0);
+module_param(clockp, int, 0);
+module_param(clockm, int, 0);
 
 /* Bit map of interrupts to choose from */
 static u_int irq_mask = 0xdeb8;
 static int irq_list[4] = { -1 };
 
-MODULE_PARM(irq_mask, "i");
-MODULE_PARM(irq_list, "1-4i");
+module_param(irq_mask, int, 0);
+module_param_array(irq_list, int, NULL, 0);
 MODULE_LICENSE("GPL");
 
 /*====================================================================*/
diff -Nru a/drivers/net/pcmcia/fmvj18x_cs.c b/drivers/net/pcmcia/fmvj18x_cs.c
--- a/drivers/net/pcmcia/fmvj18x_cs.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/net/pcmcia/fmvj18x_cs.c	2005-01-10 20:11:20 -08:00
@@ -67,13 +67,13 @@
 MODULE_DESCRIPTION("fmvj18x and compatible PCMCIA ethernet driver");
 MODULE_LICENSE("GPL");
 
-#define INT_MODULE_PARM(n, v) static int n = v; MODULE_PARM(n, "i")
+#define INT_MODULE_PARM(n, v) static int n = v; module_param(n, int, 0)
 
 /* Bit map of interrupts to choose from */
 /* This means pick from 15, 14, 12, 11, 10, 9, 7, 5, 4, and 3 */
 INT_MODULE_PARM(irq_mask, 0xdeb8);
 static int irq_list[4] = { -1 };
-MODULE_PARM(irq_list, "1-4i");
+module_param_array(irq_list, int, NULL, 0);
 
 /* SRAM configuration */
 /* 0:4KB*2 TX buffer   else:8KB*2 TX buffer */
@@ -623,7 +623,7 @@
 {
     win_req_t req;
     memreq_t mem;
-    u_char *base;
+    u_char __iomem *base;
     int i, j;
 
     /* Allocate a small memory window */
@@ -676,7 +676,7 @@
 {
     win_req_t req;
     memreq_t mem;
-    u_char *base;
+    u_char __iomem *base;
     int i, j;
     struct net_device *dev = link->priv;
     ioaddr_t ioaddr;
diff -Nru a/drivers/net/pcmcia/ibmtr_cs.c b/drivers/net/pcmcia/ibmtr_cs.c
--- a/drivers/net/pcmcia/ibmtr_cs.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/net/pcmcia/ibmtr_cs.c	2005-01-10 20:11:19 -08:00
@@ -72,7 +72,7 @@
 
 #ifdef PCMCIA_DEBUG
 static int pc_debug = PCMCIA_DEBUG;
-MODULE_PARM(pc_debug, "i");
+module_param(pc_debug, int, 0);
 #define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args)
 static char *version =
 "ibmtr_cs.c 1.10   1996/01/06 05:19:00 (Steve Kipisz)\n"
@@ -102,12 +102,12 @@
 /* Ringspeed 4,16 */
 static int ringspeed = 16;
 
-MODULE_PARM(irq_mask, "i");
-MODULE_PARM(irq_list, "1-4i");
-MODULE_PARM(mmiobase, "i");
-MODULE_PARM(srambase, "i");
-MODULE_PARM(sramsize, "i");
-MODULE_PARM(ringspeed, "i");
+module_param(irq_mask, int, 0);
+module_param_array(irq_list, int, NULL, 0);
+module_param(mmiobase, ulong, 0);
+module_param(srambase, ulong, 0);
+module_param(sramsize, ulong, 0);
+module_param(ringspeed, int, 0);
 MODULE_LICENSE("GPL");
 
 /*====================================================================*/
diff -Nru a/drivers/net/pcmcia/nmclan_cs.c b/drivers/net/pcmcia/nmclan_cs.c
--- a/drivers/net/pcmcia/nmclan_cs.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/net/pcmcia/nmclan_cs.c	2005-01-10 20:11:16 -08:00
@@ -405,10 +405,10 @@
 MODULE_DESCRIPTION("New Media PCMCIA ethernet driver");
 MODULE_LICENSE("GPL");
 
-#define INT_MODULE_PARM(n, v) static int n = v; MODULE_PARM(n, "i")
+#define INT_MODULE_PARM(n, v) static int n = v; module_param(n, int, 0)
 
 static int irq_list[4] = { -1 };
-MODULE_PARM(irq_list, "1-4i");
+module_param_array(irq_list, int, NULL, 0);
 
 /* 0=auto, 1=10baseT, 2 = 10base2, default=auto */
 INT_MODULE_PARM(if_port, 0);
diff -Nru a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c
--- a/drivers/net/pcmcia/pcnet_cs.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/net/pcmcia/pcnet_cs.c	2005-01-10 20:11:22 -08:00
@@ -71,7 +71,7 @@
 
 #ifdef PCMCIA_DEBUG
 static int pc_debug = PCMCIA_DEBUG;
-MODULE_PARM(pc_debug, "i");
+module_param(pc_debug, int, 0);
 #define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args)
 static char *version =
 "pcnet_cs.c 1.153 2003/11/09 18:53:09 (David Hinds)";
@@ -87,12 +87,12 @@
 MODULE_DESCRIPTION("NE2000 compatible PCMCIA ethernet driver");
 MODULE_LICENSE("GPL");
 
-#define INT_MODULE_PARM(n, v) static int n = v; MODULE_PARM(n, "i")
+#define INT_MODULE_PARM(n, v) static int n = v; module_param(n, int, 0)
 
 /* Bit map of interrupts to choose from */
 INT_MODULE_PARM(irq_mask,	0xdeb8);
 static int irq_list[4] = { -1 };
-MODULE_PARM(irq_list, "1-4i");
+module_param_array(irq_list, int, NULL, 0);
 
 INT_MODULE_PARM(if_port,	1);	/* Transceiver type */
 INT_MODULE_PARM(use_big_buf,	1);	/* use 64K packet buffer? */
@@ -104,7 +104,7 @@
 
 /* Ugh!  Let the user hardwire the hardware address for queer cards */
 static int hw_addr[6] = { 0, /* ... */ };
-MODULE_PARM(hw_addr, "6i");
+module_param_array(hw_addr, int, NULL, 0);
 
 /*====================================================================*/
 
@@ -227,7 +227,7 @@
     dev_link_t		link;
     dev_node_t		node;
     u_int		flags;
-    caddr_t		base;
+    void		__iomem *base;
     struct timer_list	watchdog;
     int			stale, fast_poll;
     u_char		phy_id;
@@ -352,7 +352,7 @@
     struct net_device *dev = link->priv;
     win_req_t req;
     memreq_t mem;
-    u_char *base, *virt;
+    u_char __iomem *base, *virt;
     int i, j;
 
     /* Allocate a small memory window */
@@ -1491,9 +1491,10 @@
 
 /*====================================================================*/
 
-static void copyin(u_char *dest, u_char *src, int c)
+static void copyin(void *dest, void __iomem *src, int c)
 {
-    u_short *d = (u_short *)dest, *s = (u_short *)src;
+    u_short *d = dest;
+    u_short __iomem *s = src;
     int odd;
 
     if (c <= 0)
@@ -1508,9 +1509,10 @@
 	*((u_char *)d) = readw(s) & 0xff;
 }
 
-static void copyout(u_char *dest, const u_char *src, int c)
+static void copyout(void __iomem *dest, const void *src, int c)
 {
-    u_short *d = (u_short *)dest, *s = (u_short *)src;
+    u_short __iomem *d = dest;
+    const u_short *s = src;
     int odd;
 
     if (c <= 0)
@@ -1531,10 +1533,11 @@
 			       struct e8390_pkt_hdr *hdr,
 			       int ring_page)
 {
-    void *xfer_start = (void *)(ei_status.rmem_start + (ring_page << 8)
-				- (ei_status.rx_start_page << 8));
+    void __iomem *xfer_start = ei_status.mem + (TX_PAGES<<8)
+				+ (ring_page << 8)
+				- (ei_status.rx_start_page << 8);
     
-    copyin((void *)hdr, xfer_start, sizeof(struct e8390_pkt_hdr));
+    copyin(hdr, xfer_start, sizeof(struct e8390_pkt_hdr));
     /* Fix for big endian systems */
     hdr->count = le16_to_cpu(hdr->count);
 }
@@ -1544,17 +1547,17 @@
 static void shmem_block_input(struct net_device *dev, int count,
 			      struct sk_buff *skb, int ring_offset)
 {
-    void *xfer_start = (void *)(ei_status.rmem_start + ring_offset
-				- (ei_status.rx_start_page << 8));
+    void __iomem *xfer_start = ei_status.mem + (TX_PAGES<<8)
+				+ ring_offset
+				- (ei_status.rx_start_page << 8);
     char *buf = skb->data;
     
-    if (xfer_start + count > (void *)ei_status.rmem_end) {
+    if (xfer_start + count > (void __iomem *)ei_status.rmem_end) {
 	/* We must wrap the input move. */
-	int semi_count = (void*)ei_status.rmem_end - xfer_start;
+	int semi_count = (void __iomem *)ei_status.rmem_end - xfer_start;
 	copyin(buf, xfer_start, semi_count);
 	buf += semi_count;
-	ring_offset = ei_status.rx_start_page << 8;
-	xfer_start = (void *)ei_status.rmem_start;
+	xfer_start = ei_status.mem + (TX_PAGES<<8);
 	count -= semi_count;
     }
     copyin(buf, xfer_start, count);
@@ -1565,7 +1568,7 @@
 static void shmem_block_output(struct net_device *dev, int count,
 			       const u_char *buf, const int start_page)
 {
-    void *shmem = (void *)dev->mem_start + (start_page << 8);
+    void __iomem *shmem = ei_status.mem + (start_page << 8);
     shmem -= ei_status.tx_start_page << 8;
     copyout(shmem, buf, count);
 }
@@ -1617,8 +1620,8 @@
 	goto failed;
     }
     
-    dev->mem_start = (u_long)info->base + offset;
-    ei_status.rmem_start = dev->mem_start + (TX_PAGES<<8);
+    ei_status.mem = info->base + offset;
+    dev->mem_start = (u_long)ei_status.mem;
     dev->mem_end = ei_status.rmem_end = (u_long)info->base + req.Size;
 
     ei_status.tx_start_page = start_pg;
diff -Nru a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c
--- a/drivers/net/pcmcia/smc91c92_cs.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/net/pcmcia/smc91c92_cs.c	2005-01-10 20:11:20 -08:00
@@ -66,7 +66,7 @@
 MODULE_DESCRIPTION("SMC 91c92 series PCMCIA ethernet driver");
 MODULE_LICENSE("GPL");
 
-#define INT_MODULE_PARM(n, v) static int n = v; MODULE_PARM(n, "i")
+#define INT_MODULE_PARM(n, v) static int n = v; module_param(n, int, 0)
 
 /*
   Transceiver/media type.
@@ -79,7 +79,7 @@
 /* Bit map of interrupts to choose from. */
 INT_MODULE_PARM(irq_mask, 0xdeb8);
 static int irq_list[4] = { -1 };
-MODULE_PARM(irq_list, "1-4i");
+module_param_array(irq_list, int, NULL, 0);
 
 #ifdef PCMCIA_DEBUG
 INT_MODULE_PARM(pc_debug, PCMCIA_DEBUG);
@@ -120,7 +120,7 @@
     dev_node_t			node;
     struct sk_buff		*saved_skb;
     int				packets_waiting;
-    caddr_t			base;
+    void			__iomem *base;
     u_short			cfg;
     struct timer_list		media;
     int				watchdog, tx_err;
diff -Nru a/drivers/net/pcmcia/xirc2ps_cs.c b/drivers/net/pcmcia/xirc2ps_cs.c
--- a/drivers/net/pcmcia/xirc2ps_cs.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/net/pcmcia/xirc2ps_cs.c	2005-01-10 20:11:18 -08:00
@@ -220,7 +220,7 @@
  */
 #ifdef PCMCIA_DEBUG
 static int pc_debug = PCMCIA_DEBUG;
-MODULE_PARM(pc_debug, "i");
+module_param(pc_debug, int, 0);
 #define DEBUG(n, args...) if (pc_debug>(n)) printk(KDBG_XIRC args)
 #else
 #define DEBUG(n, args...)
@@ -255,10 +255,10 @@
 MODULE_DESCRIPTION("Xircom PCMCIA ethernet driver");
 MODULE_LICENSE("Dual MPL/GPL");
 
-#define INT_MODULE_PARM(n, v) static int n = v; MODULE_PARM(n, "i")
+#define INT_MODULE_PARM(n, v) static int n = v; module_param(n, int, 0)
 
 static int irq_list[4] = { -1 };
-MODULE_PARM(irq_list, "1-4i");
+module_param_array(irq_list, int, NULL, 0);
 INT_MODULE_PARM(irq_mask,	0xdeb8);
 INT_MODULE_PARM(if_port,	0);
 INT_MODULE_PARM(full_duplex,	0);
@@ -365,7 +365,7 @@
     int dingo;	 /* a CEM56 type card */
     int new_mii; /* has full 10baseT/100baseT MII */
     int modem;	 /* is a multi function card (i.e with a modem) */
-    caddr_t dingo_ccr; /* only used for CEM56 cards */
+    void __iomem *dingo_ccr; /* only used for CEM56 cards */
     unsigned last_ptr_value; /* last packets transmitted value */
     const char *manf_str;
 } local_info_t;
diff -Nru a/drivers/net/plip.c b/drivers/net/plip.c
--- a/drivers/net/plip.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/net/plip.c	2005-01-10 20:11:23 -08:00
@@ -1242,8 +1242,8 @@
 static int parport[PLIP_MAX] = { [0 ... PLIP_MAX-1] = -1 };
 static int timid;
 
-MODULE_PARM(parport, "1-" __MODULE_STRING(PLIP_MAX) "i");
-MODULE_PARM(timid, "1i");
+module_param_array(parport, int, NULL, 0);
+module_param(timid, int, 0);
 MODULE_PARM_DESC(parport, "List of parport device numbers to use by plip");
 
 static struct net_device *dev_plip[PLIP_MAX] = { NULL, };
diff -Nru a/drivers/net/ppp_async.c b/drivers/net/ppp_async.c
--- a/drivers/net/ppp_async.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/net/ppp_async.c	2005-01-10 20:11:21 -08:00
@@ -84,7 +84,7 @@
 #define SC_RCV_BITS	(SC_RCV_B7_1|SC_RCV_B7_0|SC_RCV_ODDP|SC_RCV_EVNP)
 
 static int flag_time = HZ;
-MODULE_PARM(flag_time, "i");
+module_param(flag_time, int, 0);
 MODULE_PARM_DESC(flag_time, "ppp_async: interval between flagged packets (in clock ticks)");
 MODULE_LICENSE("GPL");
 MODULE_ALIAS_LDISC(N_PPP);
diff -Nru a/drivers/net/r8169.c b/drivers/net/r8169.c
--- a/drivers/net/r8169.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/net/r8169.c	2005-01-10 20:11:19 -08:00
@@ -6,6 +6,7 @@
  History:
  Feb  4 2002	- created initially by ShuChen <shuchen@realtek.com.tw>.
  May 20 2002	- Add link status force-mode and TBI mode support.
+        2004	- Massive updates. See kernel SCM system for details.
 =========================================================================
   1. [DEPRECATED: use ethtool instead] The media can be forced in 5 modes.
 	 Command: 'insmod r8169 media = SET_MEDIA'
@@ -33,24 +34,35 @@
 	- Copy mc_filter setup code from 8139cp
 	  (includes an optimization, and avoids set_bit use)
 
+VERSION 1.6LK	<2004/04/14>
+
+	- Merge of Realtek's version 1.6
+	- Conversion to DMA API
+	- Suspend/resume
+	- Endianness
+	- Misc Rx/Tx bugs
 */
 
 #include <linux/module.h>
+#include <linux/moduleparam.h>
 #include <linux/pci.h>
 #include <linux/netdevice.h>
 #include <linux/etherdevice.h>
 #include <linux/delay.h>
 #include <linux/ethtool.h>
 #include <linux/mii.h>
+#include <linux/if_vlan.h>
 #include <linux/crc32.h>
+#include <linux/in.h>
+#include <linux/ip.h>
+#include <linux/tcp.h>
 #include <linux/init.h>
 #include <linux/dma-mapping.h>
 
 #include <asm/io.h>
 
-#define RTL8169_VERSION "1.2"
+#define RTL8169_VERSION "1.6LK"
 #define MODULENAME "r8169"
-#define RTL8169_DRIVER_NAME   MODULENAME " Gigabit Ethernet driver " RTL8169_VERSION
 #define PFX MODULENAME ": "
 
 #ifdef RTL8169_DEBUG
@@ -65,17 +77,23 @@
 #define dprintk(fmt, args...)	do {} while (0)
 #endif /* RTL8169_DEBUG */
 
+#define TX_BUFFS_AVAIL(tp) \
+	(tp->dirty_tx + NUM_TX_DESC - tp->cur_tx - 1)
+
 #ifdef CONFIG_R8169_NAPI
 #define rtl8169_rx_skb			netif_receive_skb
+#define rtl8169_rx_hwaccel_skb		vlan_hwaccel_rx
 #define rtl8169_rx_quota(count, quota)	min(count, quota)
 #else
 #define rtl8169_rx_skb			netif_rx
+#define rtl8169_rx_hwaccel_skb		vlan_hwaccel_receive_skb
 #define rtl8169_rx_quota(count, quota)	count
 #endif
 
 /* media options */
 #define MAX_UNITS 8
 static int media[MAX_UNITS] = { -1, -1, -1, -1, -1, -1, -1, -1 };
+static int num_media = 0;
 
 /* Maximum events (Rx packets, etc.) to handle at each interrupt. */
 static int max_interrupt_work = 20;
@@ -87,18 +105,17 @@
 /* MAC address length*/
 #define MAC_ADDR_LEN	6
 
-/* max supported gigabit ethernet frame size -- must be at least (dev->mtu+14+4).*/
-#define MAX_ETH_FRAME_SIZE	1536
-
 #define TX_FIFO_THRESH 256	/* In bytes */
 
 #define RX_FIFO_THRESH	7	/* 7 means NO threshold, Rx buffer level before first PCI xfer.  */
 #define RX_DMA_BURST	6	/* Maximum PCI burst, '6' is 1024 */
 #define TX_DMA_BURST	6	/* Maximum PCI burst, '6' is 1024 */
 #define EarlyTxThld 	0x3F	/* 0x3F means NO early transmit */
-#define RxPacketMaxSize	0x0800	/* Maximum size supported is 16K-1 */
+#define RxPacketMaxSize	0x3FE8	/* 16K - 1 - ETH_HLEN - VLAN - CRC... */
+#define SafeMtu		0x1c20	/* ... actually life sucks beyond ~7k */
 #define InterFrameGap	0x03	/* 3 means InterFrameGap = the shortest one */
 
+#define R8169_REGS_SIZE		256
 #define R8169_NAPI_WEIGHT	64
 #define NUM_TX_DESC	64	/* Number of Tx descriptor registers */
 #define NUM_RX_DESC	256	/* Number of Rx descriptor registers */
@@ -106,7 +123,6 @@
 #define R8169_TX_RING_BYTES	(NUM_TX_DESC * sizeof(struct TxDesc))
 #define R8169_RX_RING_BYTES	(NUM_RX_DESC * sizeof(struct RxDesc))
 
-#define RTL_MIN_IO_SIZE 0x80
 #define RTL8169_TX_TIMEOUT	(6*HZ)
 #define RTL8169_PHY_TIMEOUT	(10*HZ)
 
@@ -122,7 +138,8 @@
 	RTL_GIGA_MAC_VER_B = 0x00,
 	/* RTL_GIGA_MAC_VER_C = 0x03, */
 	RTL_GIGA_MAC_VER_D = 0x01,
-	RTL_GIGA_MAC_VER_E = 0x02
+	RTL_GIGA_MAC_VER_E = 0x02,
+	RTL_GIGA_MAC_VER_X = 0x04	/* Greater than RTL_GIGA_MAC_VER_E */
 };
 
 enum phy_version {
@@ -305,28 +322,57 @@
 };
 
 enum _DescStatusBit {
-	OWNbit = 0x80000000,
-	EORbit = 0x40000000,
-	FSbit = 0x20000000,
-	LSbit = 0x10000000,
+	DescOwn		= (1 << 31), /* Descriptor is owned by NIC */
+	RingEnd		= (1 << 30), /* End of descriptor ring */
+	FirstFrag	= (1 << 29), /* First segment of a packet */
+	LastFrag	= (1 << 28), /* Final segment of a packet */
+
+	/* Tx private */
+	LargeSend	= (1 << 27), /* TCP Large Send Offload (TSO) */
+	MSSShift	= 16,        /* MSS value position */
+	MSSMask		= 0xfff,     /* MSS value + LargeSend bit: 12 bits */
+	IPCS		= (1 << 18), /* Calculate IP checksum */
+	UDPCS		= (1 << 17), /* Calculate UDP/IP checksum */
+	TCPCS		= (1 << 16), /* Calculate TCP/IP checksum */
+	TxVlanTag	= (1 << 17), /* Add VLAN tag */
+
+	/* Rx private */
+	PID1		= (1 << 18), /* Protocol ID bit 1/2 */
+	PID0		= (1 << 17), /* Protocol ID bit 2/2 */
+
+#define RxProtoUDP	(PID1)
+#define RxProtoTCP	(PID0)
+#define RxProtoIP	(PID1 | PID0)
+#define RxProtoMask	RxProtoIP
+
+	IPFail		= (1 << 16), /* IP checksum failed */
+	UDPFail		= (1 << 15), /* UDP/IP checksum failed */
+	TCPFail		= (1 << 14), /* TCP/IP checksum failed */
+	RxVlanTag	= (1 << 16), /* VLAN tag available */
 };
 
 #define RsvdMask	0x3fffc000
 
 struct TxDesc {
-	u32 status;
-	u32 vlan_tag;
+	u32 opts1;
+	u32 opts2;
 	u64 addr;
 };
 
 struct RxDesc {
-	u32 status;
-	u32 vlan_tag;
+	u32 opts1;
+	u32 opts2;
 	u64 addr;
 };
 
+struct ring_info {
+	struct sk_buff	*skb;
+	u32		len;
+	u8		__pad[sizeof(void *) - sizeof(u32)];
+};
+
 struct rtl8169_private {
-	void *mmio_addr;		/* memory map physical address */
+	void __iomem *mmio_addr;	/* memory map physical address */
 	struct pci_dev *pci_dev;	/* Index of PCI device  */
 	struct net_device_stats stats;	/* statistics of net device */
 	spinlock_t lock;		/* spin lock flag */
@@ -342,27 +388,32 @@
 	dma_addr_t TxPhyAddr;
 	dma_addr_t RxPhyAddr;
 	struct sk_buff *Rx_skbuff[NUM_RX_DESC];	/* Rx data buffers */
-	struct sk_buff *Tx_skbuff[NUM_TX_DESC];	/* Tx data buffers */
+	struct ring_info tx_skb[NUM_TX_DESC];	/* Tx data buffers */
+	unsigned rx_buf_sz;
 	struct timer_list timer;
 	u16 cp_cmd;
 	u16 intr_mask;
 	int phy_auto_nego_reg;
 	int phy_1000_ctrl_reg;
-
+#ifdef CONFIG_R8169_VLAN
+	struct vlan_group *vlgrp;
+#endif
 	int (*set_speed)(struct net_device *, u8 autoneg, u16 speed, u8 duplex);
 	void (*get_settings)(struct net_device *, struct ethtool_cmd *);
-	void (*phy_reset_enable)(void *);
-	unsigned int (*phy_reset_pending)(void *);
-	unsigned int (*link_ok)(void *);
+	void (*phy_reset_enable)(void __iomem *);
+	unsigned int (*phy_reset_pending)(void __iomem *);
+	unsigned int (*link_ok)(void __iomem *);
+	struct work_struct task;
 };
 
 MODULE_AUTHOR("Realtek");
 MODULE_DESCRIPTION("RealTek RTL-8169 Gigabit Ethernet driver");
-MODULE_PARM(media, "1-" __MODULE_STRING(MAX_UNITS) "i");
-MODULE_PARM(rx_copybreak, "i");
-MODULE_PARM(use_dac, "i");
+module_param_array(media, int, &num_media, 0);
+module_param(rx_copybreak, int, 0);
+module_param(use_dac, int, 0);
 MODULE_PARM_DESC(use_dac, "Enable PCI DAC. Unsafe on 32 bit PCI slot.");
 MODULE_LICENSE("GPL");
+MODULE_VERSION(RTL8169_VERSION);
 
 static int rtl8169_open(struct net_device *dev);
 static int rtl8169_start_xmit(struct sk_buff *skb, struct net_device *dev);
@@ -374,6 +425,11 @@
 static void rtl8169_set_rx_mode(struct net_device *dev);
 static void rtl8169_tx_timeout(struct net_device *dev);
 static struct net_device_stats *rtl8169_get_stats(struct net_device *netdev);
+static int rtl8169_rx_interrupt(struct net_device *, struct rtl8169_private *,
+				void __iomem *);
+static int rtl8169_change_mtu(struct net_device *netdev, int new_mtu);
+static void rtl8169_down(struct net_device *dev);
+
 #ifdef CONFIG_R8169_NAPI
 static int rtl8169_poll(struct net_device *dev, int *budget);
 #endif
@@ -390,7 +446,7 @@
 #define PHY_Cap_100_Half_Or_Less PHY_Cap_100_Half | PHY_Cap_10_Full_Or_Less
 #define PHY_Cap_100_Full_Or_Less PHY_Cap_100_Full | PHY_Cap_100_Half_Or_Less
 
-static void mdio_write(void *ioaddr, int RegAddr, int value)
+static void mdio_write(void __iomem *ioaddr, int RegAddr, int value)
 {
 	int i;
 
@@ -405,7 +461,7 @@
 	}
 }
 
-static int mdio_read(void *ioaddr, int RegAddr)
+static int mdio_read(void __iomem *ioaddr, int RegAddr)
 {
 	int i, value = -1;
 
@@ -423,32 +479,32 @@
 	return value;
 }
 
-static unsigned int rtl8169_tbi_reset_pending(void *ioaddr)
+static unsigned int rtl8169_tbi_reset_pending(void __iomem *ioaddr)
 {
 	return RTL_R32(TBICSR) & TBIReset;
 }
 
-static unsigned int rtl8169_xmii_reset_pending(void *ioaddr)
+static unsigned int rtl8169_xmii_reset_pending(void __iomem *ioaddr)
 {
 	return mdio_read(ioaddr, 0) & 0x8000;
 }
 
-static unsigned int rtl8169_tbi_link_ok(void *ioaddr)
+static unsigned int rtl8169_tbi_link_ok(void __iomem *ioaddr)
 {
 	return RTL_R32(TBICSR) & TBILinkOk;
 }
 
-static unsigned int rtl8169_xmii_link_ok(void *ioaddr)
+static unsigned int rtl8169_xmii_link_ok(void __iomem *ioaddr)
 {
 	return RTL_R8(PHYstatus) & LinkStatus;
 }
 
-static void rtl8169_tbi_reset_enable(void *ioaddr)
+static void rtl8169_tbi_reset_enable(void __iomem *ioaddr)
 {
 	RTL_W32(TBICSR, RTL_R32(TBICSR) | TBIReset);
 }
 
-static void rtl8169_xmii_reset_enable(void *ioaddr)
+static void rtl8169_xmii_reset_enable(void __iomem *ioaddr)
 {
 	unsigned int val;
 
@@ -457,7 +513,7 @@
 }
 
 static void rtl8169_check_link_status(struct net_device *dev,
-				      struct rtl8169_private *tp, void *ioaddr)
+				      struct rtl8169_private *tp, void __iomem *ioaddr)
 {
 	unsigned long flags;
 
@@ -507,16 +563,21 @@
 {
 	struct rtl8169_private *tp = netdev_priv(dev);
 
-	strcpy(info->driver, RTL8169_DRIVER_NAME);
-	strcpy(info->version, RTL8169_VERSION );
+	strcpy(info->driver, MODULENAME);
+	strcpy(info->version, RTL8169_VERSION);
 	strcpy(info->bus_info, pci_name(tp->pci_dev));
 }
 
+static int rtl8169_get_regs_len(struct net_device *dev)
+{
+	return R8169_REGS_SIZE;
+}
+
 static int rtl8169_set_speed_tbi(struct net_device *dev,
 				 u8 autoneg, u16 speed, u8 duplex)
 {
 	struct rtl8169_private *tp = netdev_priv(dev);
-	void *ioaddr = tp->mmio_addr;
+	void __iomem *ioaddr = tp->mmio_addr;
 	int ret = 0;
 	u32 reg;
 
@@ -540,7 +601,7 @@
 				  u8 autoneg, u16 speed, u8 duplex)
 {
 	struct rtl8169_private *tp = netdev_priv(dev);
-	void *ioaddr = tp->mmio_addr;
+	void __iomem *ioaddr = tp->mmio_addr;
 	int auto_nego, giga_ctrl;
 
 	auto_nego = mdio_read(ioaddr, PHY_AUTO_NEGO_REG);
@@ -602,10 +663,108 @@
 	return ret;
 }
 
+static u32 rtl8169_get_rx_csum(struct net_device *dev)
+{
+	struct rtl8169_private *tp = netdev_priv(dev);
+
+	return tp->cp_cmd & RxChkSum;
+}
+
+static int rtl8169_set_rx_csum(struct net_device *dev, u32 data)
+{
+	struct rtl8169_private *tp = netdev_priv(dev);
+	void __iomem *ioaddr = tp->mmio_addr;
+	unsigned long flags;
+
+	spin_lock_irqsave(&tp->lock, flags);
+
+	if (data)
+		tp->cp_cmd |= RxChkSum;
+	else
+		tp->cp_cmd &= ~RxChkSum;
+
+	RTL_W16(CPlusCmd, tp->cp_cmd);
+	RTL_R16(CPlusCmd);
+
+	spin_unlock_irqrestore(&tp->lock, flags);
+
+	return 0;
+}
+
+#ifdef CONFIG_R8169_VLAN
+
+static inline u32 rtl8169_tx_vlan_tag(struct rtl8169_private *tp,
+				      struct sk_buff *skb)
+{
+	return (tp->vlgrp && vlan_tx_tag_present(skb)) ?
+		TxVlanTag | cpu_to_be16(vlan_tx_tag_get(skb)) : 0x00;
+}
+
+static void rtl8169_vlan_rx_register(struct net_device *dev,
+				     struct vlan_group *grp)
+{
+	struct rtl8169_private *tp = netdev_priv(dev);
+	void __iomem *ioaddr = tp->mmio_addr;
+	unsigned long flags;
+
+	spin_lock_irqsave(&tp->lock, flags);
+	tp->vlgrp = grp;
+	if (tp->vlgrp)
+		tp->cp_cmd |= RxVlan;
+	else
+		tp->cp_cmd &= ~RxVlan;
+	RTL_W16(CPlusCmd, tp->cp_cmd);
+	RTL_R16(CPlusCmd);
+	spin_unlock_irqrestore(&tp->lock, flags);
+}
+
+static void rtl8169_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid)
+{
+	struct rtl8169_private *tp = netdev_priv(dev);
+	unsigned long flags;
+
+	spin_lock_irqsave(&tp->lock, flags);
+	if (tp->vlgrp)
+		tp->vlgrp->vlan_devices[vid] = NULL;
+	spin_unlock_irqrestore(&tp->lock, flags);
+}
+
+static int rtl8169_rx_vlan_skb(struct rtl8169_private *tp, struct RxDesc *desc,
+			       struct sk_buff *skb)
+{
+	u32 opts2 = desc->opts2;
+	int ret;
+
+	if (tp->vlgrp && (opts2 & RxVlanTag)) {
+		rtl8169_rx_hwaccel_skb(skb, tp->vlgrp,
+				       be16_to_cpu(opts2 & 0xffff));
+		ret = 0;
+	} else
+		ret = -1;
+	desc->opts2 = 0;
+	return ret;
+}
+
+#else /* !CONFIG_R8169_VLAN */
+
+static inline u32 rtl8169_tx_vlan_tag(struct rtl8169_private *tp,
+				      struct sk_buff *skb)
+{
+	return 0;
+}
+
+static int rtl8169_rx_vlan_skb(struct rtl8169_private *tp, struct RxDesc *desc,
+			       struct sk_buff *skb)
+{
+	return -1;
+}
+
+#endif
+
 static void rtl8169_gset_tbi(struct net_device *dev, struct ethtool_cmd *cmd)
 {
 	struct rtl8169_private *tp = netdev_priv(dev);
-	void *ioaddr = tp->mmio_addr;
+	void __iomem *ioaddr = tp->mmio_addr;
 	u32 status;
 
 	cmd->supported =
@@ -624,7 +783,7 @@
 static void rtl8169_gset_xmii(struct net_device *dev, struct ethtool_cmd *cmd)
 {
 	struct rtl8169_private *tp = netdev_priv(dev);
-	void *ioaddr = tp->mmio_addr;
+	void __iomem *ioaddr = tp->mmio_addr;
 	u8 status;
 
 	cmd->supported = SUPPORTED_10baseT_Half |
@@ -675,15 +834,38 @@
 	return 0;
 }
 
+static void rtl8169_get_regs(struct net_device *dev, struct ethtool_regs *regs,
+			     void *p)
+{
+        struct rtl8169_private *tp = netdev_priv(dev);
+        unsigned long flags;
+
+        if (regs->len > R8169_REGS_SIZE)
+        	regs->len = R8169_REGS_SIZE;
+
+        spin_lock_irqsave(&tp->lock, flags);
+        memcpy_fromio(p, tp->mmio_addr, regs->len);
+        spin_unlock_irqrestore(&tp->lock, flags);
+}
 
 static struct ethtool_ops rtl8169_ethtool_ops = {
 	.get_drvinfo		= rtl8169_get_drvinfo,
+	.get_regs_len		= rtl8169_get_regs_len,
 	.get_link		= ethtool_op_get_link,
 	.get_settings		= rtl8169_get_settings,
 	.set_settings		= rtl8169_set_settings,
+	.get_rx_csum		= rtl8169_get_rx_csum,
+	.set_rx_csum		= rtl8169_set_rx_csum,
+	.get_tx_csum		= ethtool_op_get_tx_csum,
+	.set_tx_csum		= ethtool_op_set_tx_csum,
+	.get_sg			= ethtool_op_get_sg,
+	.set_sg			= ethtool_op_set_sg,
+	.get_tso		= ethtool_op_get_tso,
+	.set_tso		= ethtool_op_set_tso,
+	.get_regs		= rtl8169_get_regs,
 };
 
-static void rtl8169_write_gmii_reg_bit(void *ioaddr, int reg, int bitnum,
+static void rtl8169_write_gmii_reg_bit(void __iomem *ioaddr, int reg, int bitnum,
 				       int bitval)
 {
 	int val;
@@ -694,12 +876,13 @@
 	mdio_write(ioaddr, reg, val & 0xffff); 
 }
 
-static void rtl8169_get_mac_version(struct rtl8169_private *tp, void *ioaddr)
+static void rtl8169_get_mac_version(struct rtl8169_private *tp, void __iomem *ioaddr)
 {
 	const struct {
 		u32 mask;
 		int mac_version;
 	} mac_info[] = {
+		{ 0x1 << 28,	RTL_GIGA_MAC_VER_X },
 		{ 0x1 << 26,	RTL_GIGA_MAC_VER_E },
 		{ 0x1 << 23,	RTL_GIGA_MAC_VER_D }, 
 		{ 0x00000000,	RTL_GIGA_MAC_VER_B } /* Catch-all */
@@ -734,7 +917,7 @@
 	dprintk("mac_version == Unknown\n");
 }
 
-static void rtl8169_get_phy_version(struct rtl8169_private *tp, void *ioaddr)
+static void rtl8169_get_phy_version(struct rtl8169_private *tp, void __iomem *ioaddr)
 {
 	const struct {
 		u16 mask;
@@ -780,7 +963,7 @@
 static void rtl8169_hw_phy_config(struct net_device *dev)
 {
 	struct rtl8169_private *tp = netdev_priv(dev);
-	void *ioaddr = tp->mmio_addr;
+	void __iomem *ioaddr = tp->mmio_addr;
 	struct {
 		u16 regs[5]; /* Beware of bit-sign propagation */
 	} phy_magic[5] = { {
@@ -850,7 +1033,7 @@
 	struct net_device *dev = (struct net_device *)__opaque;
 	struct rtl8169_private *tp = netdev_priv(dev);
 	struct timer_list *timer = &tp->timer;
-	void *ioaddr = tp->mmio_addr;
+	void __iomem *ioaddr = tp->mmio_addr;
 	unsigned long timeout = RTL8169_PHY_TIMEOUT;
 
 	assert(tp->mac_version > RTL_GIGA_MAC_VER_B);
@@ -911,41 +1094,65 @@
 	add_timer(timer);
 }
 
+#ifdef CONFIG_NET_POLL_CONTROLLER
+/*
+ * Polling 'interrupt' - used by things like netconsole to send skbs
+ * without having to re-enable interrupts. It's not called while
+ * the interrupt routine is executing.
+ */
+static void rtl8169_netpoll(struct net_device *dev)
+{
+	struct rtl8169_private *tp = netdev_priv(dev);
+	struct pci_dev *pdev = tp->pci_dev;
+
+	disable_irq(pdev->irq);
+	rtl8169_interrupt(pdev->irq, dev, NULL);
+	enable_irq(pdev->irq);
+}
+#endif
+
+static void rtl8169_release_board(struct pci_dev *pdev, struct net_device *dev,
+				  void __iomem *ioaddr)
+{
+	iounmap(ioaddr);
+	pci_release_regions(pdev);
+	pci_disable_device(pdev);
+	free_netdev(dev);
+}
+
 static int __devinit
 rtl8169_init_board(struct pci_dev *pdev, struct net_device **dev_out,
-		   void **ioaddr_out)
+		   void __iomem **ioaddr_out)
 {
-	void *ioaddr = NULL;
+	void __iomem *ioaddr;
 	struct net_device *dev;
 	struct rtl8169_private *tp;
-	unsigned long mmio_start, mmio_end, mmio_flags, mmio_len;
-	int rc, i, acpi_idle_state = 0, pm_cap;
+	int rc = -ENOMEM, i, acpi_idle_state = 0, pm_cap;
 
-
-	assert(pdev != NULL);
 	assert(ioaddr_out != NULL);
 
-	*ioaddr_out = NULL;
-	*dev_out = NULL;
-
 	// dev zeroed in alloc_etherdev 
 	dev = alloc_etherdev(sizeof (*tp));
 	if (dev == NULL) {
 		printk(KERN_ERR PFX "unable to alloc new ethernet\n");
-		return -ENOMEM;
+		goto err_out;
 	}
 
 	SET_MODULE_OWNER(dev);
 	SET_NETDEV_DEV(dev, &pdev->dev);
-	tp = dev->priv;
+	tp = netdev_priv(dev);
 
 	// enable device (incl. PCI PM wakeup and hotplug setup)
 	rc = pci_enable_device(pdev);
 	if (rc) {
 		printk(KERN_ERR PFX "%s: enable failure\n", pdev->slot_name);
-		goto err_out;
+		goto err_out_free_dev;
 	}
 
+	rc = pci_set_mwi(pdev);
+	if (rc < 0)
+		goto err_out_disable;
+
 	/* save power state before pci_enable_device overwrites it */
 	pm_cap = pci_find_capability(pdev, PCI_CAP_ID_PM);
 	if (pm_cap) {
@@ -956,41 +1163,37 @@
 	} else {
 		printk(KERN_ERR PFX
 		       "Cannot find PowerManagement capability, aborting.\n");
-		goto err_out_free_res;
+		goto err_out_mwi;
 	}
 
-	mmio_start = pci_resource_start(pdev, 1);
-	mmio_end = pci_resource_end(pdev, 1);
-	mmio_flags = pci_resource_flags(pdev, 1);
-	mmio_len = pci_resource_len(pdev, 1);
-
 	// make sure PCI base addr 1 is MMIO
-	if (!(mmio_flags & IORESOURCE_MEM)) {
+	if (!(pci_resource_flags(pdev, 1) & IORESOURCE_MEM)) {
 		printk(KERN_ERR PFX
 		       "region #1 not an MMIO resource, aborting\n");
 		rc = -ENODEV;
-		goto err_out_disable;
+		goto err_out_mwi;
 	}
 	// check for weird/broken PCI region reporting
-	if (mmio_len < RTL_MIN_IO_SIZE) {
+	if (pci_resource_len(pdev, 1) < R8169_REGS_SIZE) {
 		printk(KERN_ERR PFX "Invalid PCI region size(s), aborting\n");
 		rc = -ENODEV;
-		goto err_out_disable;
+		goto err_out_mwi;
 	}
 
 	rc = pci_request_regions(pdev, MODULENAME);
 	if (rc) {
 		printk(KERN_ERR PFX "%s: could not request regions.\n",
 		       pdev->slot_name);
-		goto err_out_disable;
+		goto err_out_mwi;
 	}
 
 	tp->cp_cmd = PCIMulRW | RxChkSum;
 
 	if ((sizeof(dma_addr_t) > 4) &&
-	    !pci_set_dma_mask(pdev, DMA_64BIT_MASK) && use_dac)
+	    !pci_set_dma_mask(pdev, DMA_64BIT_MASK) && use_dac) {
 		tp->cp_cmd |= PCIDAC;
-	else {
+		dev->features |= NETIF_F_HIGHDMA;
+	} else {
 		rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
 		if (rc < 0) {
 			printk(KERN_ERR PFX "DMA configuration failed.\n");
@@ -998,12 +1201,10 @@
 		}
 	}
 
-
-	// enable PCI bus-mastering
 	pci_set_master(pdev);
 
 	// ioremap MMIO region 
-	ioaddr = ioremap(mmio_start, mmio_len);
+	ioaddr = ioremap(pci_resource_start(pdev, 1), R8169_REGS_SIZE);
 	if (ioaddr == NULL) {
 		printk(KERN_ERR PFX "cannot remap MMIO, aborting\n");
 		rc = -EIO;
@@ -1042,25 +1243,32 @@
 
 	*ioaddr_out = ioaddr;
 	*dev_out = dev;
-	return 0;
+out:
+	return rc;
 
 err_out_free_res:
 	pci_release_regions(pdev);
 
+err_out_mwi:
+	pci_clear_mwi(pdev);
+
 err_out_disable:
 	pci_disable_device(pdev);
 
-err_out:
+err_out_free_dev:
 	free_netdev(dev);
-	return rc;
+err_out:
+	*ioaddr_out = NULL;
+	*dev_out = NULL;
+	goto out;
 }
 
 static int __devinit
 rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 {
 	struct net_device *dev = NULL;
-	struct rtl8169_private *tp = NULL;
-	void *ioaddr = NULL;
+	struct rtl8169_private *tp;
+	void __iomem *ioaddr = NULL;
 	static int board_idx = -1;
 	static int printed_version = 0;
 	u8 autoneg, duplex;
@@ -1073,7 +1281,8 @@
 	board_idx++;
 
 	if (!printed_version) {
-		printk(KERN_INFO RTL8169_DRIVER_NAME " loaded\n");
+		printk(KERN_INFO "%s Gigabit Ethernet driver %s loaded\n",
+		       MODULENAME, RTL8169_VERSION);
 		printed_version = 1;
 	}
 
@@ -1081,10 +1290,8 @@
 	if (rc)
 		return rc;
 
-	tp = dev->priv;
+	tp = netdev_priv(dev);
 	assert(ioaddr != NULL);
-	assert(dev != NULL);
-	assert(tp != NULL);
 
 	if (RTL_R8(PHYstatus) & TBI_Enable) {
 		tp->set_speed = rtl8169_set_speed_tbi;
@@ -1109,18 +1316,31 @@
 	dev->open = rtl8169_open;
 	dev->hard_start_xmit = rtl8169_start_xmit;
 	dev->get_stats = rtl8169_get_stats;
-	dev->ethtool_ops = &rtl8169_ethtool_ops;
+	SET_ETHTOOL_OPS(dev, &rtl8169_ethtool_ops);
 	dev->stop = rtl8169_close;
 	dev->tx_timeout = rtl8169_tx_timeout;
 	dev->set_multicast_list = rtl8169_set_rx_mode;
 	dev->watchdog_timeo = RTL8169_TX_TIMEOUT;
 	dev->irq = pdev->irq;
 	dev->base_addr = (unsigned long) ioaddr;
+	dev->change_mtu = rtl8169_change_mtu;
+
 #ifdef CONFIG_R8169_NAPI
 	dev->poll = rtl8169_poll;
 	dev->weight = R8169_NAPI_WEIGHT;
 	printk(KERN_INFO PFX "NAPI enabled\n");
 #endif
+
+#ifdef CONFIG_R8169_VLAN
+	dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
+	dev->vlan_rx_register = rtl8169_vlan_rx_register;
+	dev->vlan_rx_kill_vid = rtl8169_vlan_rx_kill_vid;
+#endif
+
+#ifdef CONFIG_NET_POLL_CONTROLLER
+	dev->poll_controller = rtl8169_netpoll;
+#endif
+
 	tp->intr_mask = 0xffff;
 	tp->pci_dev = pdev;
 	tp->mmio_addr = ioaddr;
@@ -1129,10 +1349,7 @@
 
 	rc = register_netdev(dev);
 	if (rc) {
-		iounmap(ioaddr);
-		pci_release_regions(pdev);
-		pci_disable_device(pdev);
-		free_netdev(dev);
+		rtl8169_release_board(pdev, dev, ioaddr);
 		return rc;
 	}
 
@@ -1188,11 +1405,7 @@
 	assert(tp != NULL);
 
 	unregister_netdev(dev);
-	iounmap(tp->mmio_addr);
-	pci_release_regions(pdev);
-
-	pci_disable_device(pdev);
-	free_netdev(dev);
+	rtl8169_release_board(pdev, dev, tp->mmio_addr);
 	pci_set_drvdata(pdev, NULL);
 }
 
@@ -1202,7 +1415,7 @@
 {
 	struct net_device *dev = pci_get_drvdata(pdev);
 	struct rtl8169_private *tp = netdev_priv(dev);
-	void *ioaddr = tp->mmio_addr;
+	void __iomem *ioaddr = tp->mmio_addr;
 	unsigned long flags;
 
 	if (!netif_running(dev))
@@ -1239,13 +1452,22 @@
                                                                                 
 #endif /* CONFIG_PM */
 
-static int
-rtl8169_open(struct net_device *dev)
+static void rtl8169_set_rxbufsize(struct rtl8169_private *tp,
+				  struct net_device *dev)
+{
+	unsigned int mtu = dev->mtu;
+
+	tp->rx_buf_sz = (mtu > RX_BUF_SIZE) ? mtu + ETH_HLEN + 8 : RX_BUF_SIZE;
+}
+
+static int rtl8169_open(struct net_device *dev)
 {
 	struct rtl8169_private *tp = netdev_priv(dev);
 	struct pci_dev *pdev = tp->pci_dev;
 	int retval;
 
+	rtl8169_set_rxbufsize(tp, dev);
+
 	retval =
 	    request_irq(dev->irq, rtl8169_interrupt, SA_SHIRQ, dev->name, dev);
 	if (retval < 0)
@@ -1271,6 +1493,8 @@
 	if (retval < 0)
 		goto err_free_rx;
 
+	INIT_WORK(&tp->task, NULL, dev);
+
 	rtl8169_hw_start(dev);
 
 	rtl8169_request_timer(dev);
@@ -1290,11 +1514,23 @@
 	goto out;
 }
 
+static void rtl8169_hw_reset(void __iomem *ioaddr)
+{
+	/* Disable interrupts */
+	RTL_W16(IntrMask, 0x0000);
+
+	/* Reset the chipset */
+	RTL_W8(ChipCmd, CmdReset);
+
+	/* PCI commit */
+	RTL_R8(ChipCmd);
+}
+
 static void
 rtl8169_hw_start(struct net_device *dev)
 {
 	struct rtl8169_private *tp = netdev_priv(dev);
-	void *ioaddr = tp->mmio_addr;
+	void __iomem *ioaddr = tp->mmio_addr;
 	u32 i;
 
 	/* Soft reset the chip. */
@@ -1311,8 +1547,8 @@
 	RTL_W8(ChipCmd, CmdTxEnb | CmdRxEnb);
 	RTL_W8(EarlyTxThres, EarlyTxThld);
 
-	// For gigabit rtl8169
-	RTL_W16(RxMaxSize, RxPacketMaxSize);
+	// For gigabit rtl8169, MTU + header + CRC + VLAN
+	RTL_W16(RxMaxSize, tp->rx_buf_sz);
 
 	// Set Rx Config register
 	i = rtl8169_rx_config |
@@ -1333,8 +1569,6 @@
 		RTL_W16(CPlusCmd, tp->cp_cmd);
 	}
 
-	tp->cur_rx = 0;
-
 	RTL_W32(TxDescStartAddrLow, ((u64) tp->TxPhyAddr & DMA_32BIT_MASK));
 	RTL_W32(TxDescStartAddrHigh, ((u64) tp->TxPhyAddr >> 32));
 	RTL_W32(RxDescAddrLow, ((u64) tp->RxPhyAddr & DMA_32BIT_MASK));
@@ -1355,52 +1589,85 @@
 	netif_start_queue(dev);
 }
 
+static int rtl8169_change_mtu(struct net_device *dev, int new_mtu)
+{
+	struct rtl8169_private *tp = netdev_priv(dev);
+	int ret = 0;
+
+	if (new_mtu < ETH_ZLEN || new_mtu > SafeMtu)
+		return -EINVAL;
+
+	dev->mtu = new_mtu;
+
+	if (!netif_running(dev))
+		goto out;
+
+	rtl8169_down(dev);
+
+	rtl8169_set_rxbufsize(tp, dev);
+
+	ret = rtl8169_init_ring(dev);
+	if (ret < 0)
+		goto out;
+
+	rtl8169_hw_start(dev);
+
+	netif_poll_enable(dev);
+
+	rtl8169_request_timer(dev);
+
+out:
+	return ret;
+}
+
 static inline void rtl8169_make_unusable_by_asic(struct RxDesc *desc)
 {
 	desc->addr = 0x0badbadbadbadbadull;
-	desc->status &= ~cpu_to_le32(OWNbit | RsvdMask);
+	desc->opts1 &= ~cpu_to_le32(DescOwn | RsvdMask);
 }
 
-static void rtl8169_free_rx_skb(struct pci_dev *pdev, struct sk_buff **sk_buff,
-				struct RxDesc *desc)
+static void rtl8169_free_rx_skb(struct rtl8169_private *tp,
+				struct sk_buff **sk_buff, struct RxDesc *desc)
 {
-	pci_unmap_single(pdev, le64_to_cpu(desc->addr), RX_BUF_SIZE,
+	struct pci_dev *pdev = tp->pci_dev;
+
+	pci_unmap_single(pdev, le64_to_cpu(desc->addr), tp->rx_buf_sz,
 			 PCI_DMA_FROMDEVICE);
 	dev_kfree_skb(*sk_buff);
 	*sk_buff = NULL;
 	rtl8169_make_unusable_by_asic(desc);
 }
 
-static inline void rtl8169_return_to_asic(struct RxDesc *desc)
+static inline void rtl8169_return_to_asic(struct RxDesc *desc, int rx_buf_sz)
 {
-	desc->status |= cpu_to_le32(OWNbit + RX_BUF_SIZE);
+	desc->opts1 |= cpu_to_le32(DescOwn + rx_buf_sz);
 }
 
-static inline void rtl8169_give_to_asic(struct RxDesc *desc, dma_addr_t mapping)
+static inline void rtl8169_give_to_asic(struct RxDesc *desc, dma_addr_t mapping,
+					int rx_buf_sz)
 {
 	desc->addr = cpu_to_le64(mapping);
-	desc->status |= cpu_to_le32(OWNbit + RX_BUF_SIZE);
+	desc->opts1 |= cpu_to_le32(DescOwn + rx_buf_sz);
 }
 
-static int rtl8169_alloc_rx_skb(struct pci_dev *pdev, struct net_device *dev,
-				struct sk_buff **sk_buff, struct RxDesc *desc)
+static int rtl8169_alloc_rx_skb(struct pci_dev *pdev, struct sk_buff **sk_buff,
+				struct RxDesc *desc, int rx_buf_sz)
 {
 	struct sk_buff *skb;
 	dma_addr_t mapping;
 	int ret = 0;
 
-	skb = dev_alloc_skb(RX_BUF_SIZE);
+	skb = dev_alloc_skb(rx_buf_sz);
 	if (!skb)
 		goto err_out;
 
-	skb->dev = dev;
 	skb_reserve(skb, 2);
 	*sk_buff = skb;
 
-	mapping = pci_map_single(pdev, skb->tail, RX_BUF_SIZE,
+	mapping = pci_map_single(pdev, skb->tail, rx_buf_sz,
 				 PCI_DMA_FROMDEVICE);
 
-	rtl8169_give_to_asic(desc, mapping);
+	rtl8169_give_to_asic(desc, mapping, rx_buf_sz);
 
 out:
 	return ret;
@@ -1417,7 +1684,7 @@
 
 	for (i = 0; i < NUM_RX_DESC; i++) {
 		if (tp->Rx_skbuff[i]) {
-			rtl8169_free_rx_skb(tp->pci_dev, tp->Rx_skbuff + i,
+			rtl8169_free_rx_skb(tp, tp->Rx_skbuff + i,
 					    tp->RxDescArray + i);
 		}
 	}
@@ -1434,8 +1701,8 @@
 		if (tp->Rx_skbuff[i])
 			continue;
 			
-		ret = rtl8169_alloc_rx_skb(tp->pci_dev, dev, tp->Rx_skbuff + i,
-					   tp->RxDescArray + i);
+		ret = rtl8169_alloc_rx_skb(tp->pci_dev, tp->Rx_skbuff + i,
+					   tp->RxDescArray + i, tp->rx_buf_sz);
 		if (ret < 0)
 			break;
 	}
@@ -1444,19 +1711,21 @@
 
 static inline void rtl8169_mark_as_last_descriptor(struct RxDesc *desc)
 {
-	desc->status |= cpu_to_le32(EORbit);
+	desc->opts1 |= cpu_to_le32(RingEnd);
+}
+
+static void rtl8169_init_ring_indexes(struct rtl8169_private *tp)
+{
+	tp->dirty_tx = tp->dirty_rx = tp->cur_tx = tp->cur_rx = 0;
 }
 
 static int rtl8169_init_ring(struct net_device *dev)
 {
 	struct rtl8169_private *tp = netdev_priv(dev);
 
-	tp->cur_rx = tp->dirty_rx = 0;
-	tp->cur_tx = tp->dirty_tx = 0;
-	memset(tp->TxDescArray, 0x0, NUM_TX_DESC * sizeof (struct TxDesc));
-	memset(tp->RxDescArray, 0x0, NUM_RX_DESC * sizeof (struct RxDesc));
+	rtl8169_init_ring_indexes(tp);
 
-	memset(tp->Tx_skbuff, 0x0, NUM_TX_DESC * sizeof(struct sk_buff *));
+	memset(tp->tx_skb, 0x0, NUM_TX_DESC * sizeof(struct ring_info));
 	memset(tp->Rx_skbuff, 0x0, NUM_RX_DESC * sizeof(struct sk_buff *));
 
 	if (rtl8169_rx_fill(tp, dev, 0, NUM_RX_DESC) != NUM_RX_DESC)
@@ -1471,123 +1740,302 @@
 	return -ENOMEM;
 }
 
-static void rtl8169_unmap_tx_skb(struct pci_dev *pdev, struct sk_buff **sk_buff,
+static void rtl8169_unmap_tx_skb(struct pci_dev *pdev, struct ring_info *tx_skb,
 				 struct TxDesc *desc)
 {
-	u32 len = sk_buff[0]->len;
+	unsigned int len = tx_skb->len;
 
-	pci_unmap_single(pdev, le64_to_cpu(desc->addr),
-			 len < ETH_ZLEN ? ETH_ZLEN : len, PCI_DMA_TODEVICE);
+	pci_unmap_single(pdev, le64_to_cpu(desc->addr), len, PCI_DMA_TODEVICE);
+	desc->opts1 = 0x00;
+	desc->opts2 = 0x00;
 	desc->addr = 0x00;
-	*sk_buff = NULL;
+	tx_skb->len = 0;
 }
 
-static void
-rtl8169_tx_clear(struct rtl8169_private *tp)
+static void rtl8169_tx_clear(struct rtl8169_private *tp)
 {
-	int i;
+	unsigned int i;
 
-	tp->cur_tx = 0;
-	for (i = 0; i < NUM_TX_DESC; i++) {
-		struct sk_buff *skb = tp->Tx_skbuff[i];
+	for (i = tp->dirty_tx; i < tp->dirty_tx + NUM_TX_DESC; i++) {
+		unsigned int entry = i % NUM_TX_DESC;
+		struct ring_info *tx_skb = tp->tx_skb + entry;
+		unsigned int len = tx_skb->len;
 
-		if (skb) {
-			rtl8169_unmap_tx_skb(tp->pci_dev, tp->Tx_skbuff + i,
-					     tp->TxDescArray + i);
-			dev_kfree_skb(skb);
+		if (len) {
+			struct sk_buff *skb = tx_skb->skb;
+
+			rtl8169_unmap_tx_skb(tp->pci_dev, tx_skb,
+					     tp->TxDescArray + entry);
+			if (skb) {
+				dev_kfree_skb(skb);
+				tx_skb->skb = NULL;
+			}
 			tp->stats.tx_dropped++;
 		}
 	}
+	tp->cur_tx = tp->dirty_tx = 0;
 }
 
-static void
-rtl8169_tx_timeout(struct net_device *dev)
+static void rtl8169_schedule_work(struct net_device *dev, void (*task)(void *))
 {
 	struct rtl8169_private *tp = netdev_priv(dev);
-	void *ioaddr = tp->mmio_addr;
-	u8 tmp8;
 
-	printk(KERN_INFO "%s: TX Timeout\n", dev->name);
-	/* disable Tx, if not already */
-	tmp8 = RTL_R8(ChipCmd);
-	if (tmp8 & CmdTxEnb)
-		RTL_W8(ChipCmd, tmp8 & ~CmdTxEnb);
+	PREPARE_WORK(&tp->task, task, dev);
+	schedule_delayed_work(&tp->task, 4);
+}
+
+static void rtl8169_wait_for_quiescence(struct net_device *dev)
+{
+	struct rtl8169_private *tp = netdev_priv(dev);
+	void __iomem *ioaddr = tp->mmio_addr;
+
+	synchronize_irq(dev->irq);
+
+	/* Wait for any pending NAPI task to complete */
+	netif_poll_disable(dev);
 
-	/* Disable interrupts by clearing the interrupt mask. */
 	RTL_W16(IntrMask, 0x0000);
 
-	/* Stop a shared interrupt from scavenging while we are. */
-	spin_lock_irq(&tp->lock);
-	rtl8169_tx_clear(tp);
-	spin_unlock_irq(&tp->lock);
+	RTL_W16(IntrStatus, 0xffff);
 
-	/* ...and finally, reset everything */
-	rtl8169_hw_start(dev);
+	netif_poll_enable(dev);
+}
+
+static void rtl8169_reinit_task(void *_data)
+{
+	struct net_device *dev = _data;
+	int ret;
 
-	netif_wake_queue(dev);
+	if (netif_running(dev)) {
+		rtl8169_wait_for_quiescence(dev);
+		rtl8169_close(dev);
+	}
+
+	ret = rtl8169_open(dev);
+	if (unlikely(ret < 0)) {
+		if (net_ratelimit()) {
+			printk(PFX KERN_ERR "%s: reinit failure (status = %d)."
+			       " Rescheduling.\n", dev->name, ret);
+		}
+		rtl8169_schedule_work(dev, rtl8169_reinit_task);
+	}
 }
 
-static int
-rtl8169_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static void rtl8169_reset_task(void *_data)
 {
+	struct net_device *dev = _data;
 	struct rtl8169_private *tp = netdev_priv(dev);
-	void *ioaddr = tp->mmio_addr;
-	unsigned int entry = tp->cur_tx % NUM_TX_DESC;
-	u32 len = skb->len;
-
-	if (unlikely(skb->len < ETH_ZLEN)) {
-		skb = skb_padto(skb, ETH_ZLEN);
-		if (!skb)
-			goto err_update_stats;
-		len = ETH_ZLEN;
+
+	if (!netif_running(dev))
+		return;
+
+	rtl8169_wait_for_quiescence(dev);
+
+	rtl8169_rx_interrupt(dev, tp, tp->mmio_addr);
+	rtl8169_tx_clear(tp);
+
+	if (tp->dirty_rx == tp->cur_rx) {
+		rtl8169_init_ring_indexes(tp);
+		rtl8169_hw_start(dev);
+		netif_wake_queue(dev);
+	} else {
+		if (net_ratelimit()) {
+			printk(PFX KERN_EMERG "%s: Rx buffers shortage\n",
+			       dev->name);
+		}
+		rtl8169_schedule_work(dev, rtl8169_reset_task);
 	}
-	
-	if (!(le32_to_cpu(tp->TxDescArray[entry].status) & OWNbit)) {
+}
+
+static void rtl8169_tx_timeout(struct net_device *dev)
+{
+	struct rtl8169_private *tp = netdev_priv(dev);
+
+	rtl8169_hw_reset(tp->mmio_addr);
+
+	/* Let's wait a bit while any (async) irq lands on */
+	rtl8169_schedule_work(dev, rtl8169_reset_task);
+}
+
+static int rtl8169_xmit_frags(struct rtl8169_private *tp, struct sk_buff *skb,
+			      u32 opts1)
+{
+	struct skb_shared_info *info = skb_shinfo(skb);
+	unsigned int cur_frag, entry;
+	struct TxDesc *txd;
+
+	entry = tp->cur_tx;
+	for (cur_frag = 0; cur_frag < info->nr_frags; cur_frag++) {
+		skb_frag_t *frag = info->frags + cur_frag;
 		dma_addr_t mapping;
-		u32 status;
+		u32 status, len;
+		void *addr;
 
-		mapping = pci_map_single(tp->pci_dev, skb->data, len,
-					 PCI_DMA_TODEVICE);
+		entry = (entry + 1) % NUM_TX_DESC;
 
-		tp->Tx_skbuff[entry] = skb;
-		tp->TxDescArray[entry].addr = cpu_to_le64(mapping);
+		txd = tp->TxDescArray + entry;
+		len = frag->size;
+		addr = ((void *) page_address(frag->page)) + frag->page_offset;
+		mapping = pci_map_single(tp->pci_dev, addr, len, PCI_DMA_TODEVICE);
 
-		/* anti gcc 2.95.3 bugware */
-		status = OWNbit | FSbit | LSbit | len |
-			 (EORbit * !((entry + 1) % NUM_TX_DESC));
-		tp->TxDescArray[entry].status = cpu_to_le32(status);
-			
-		RTL_W8(TxPoll, 0x40);	//set polling bit
+		/* anti gcc 2.95.3 bugware (sic) */
+		status = opts1 | len | (RingEnd * !((entry + 1) % NUM_TX_DESC));
 
-		dev->trans_start = jiffies;
+		txd->opts1 = cpu_to_le32(status);
+		txd->addr = cpu_to_le64(mapping);
 
-		tp->cur_tx++;
-		smp_wmb();
-	} else
-		goto err_drop;
+		tp->tx_skb[entry].len = len;
+	}
 
-	if ((tp->cur_tx - NUM_TX_DESC) == tp->dirty_tx) {
-		u32 dirty = tp->dirty_tx;
+	if (cur_frag) {
+		tp->tx_skb[entry].skb = skb;
+		txd->opts1 |= cpu_to_le32(LastFrag);
+	}
+
+	return cur_frag;
+}
+
+static inline u32 rtl8169_tso_csum(struct sk_buff *skb, struct net_device *dev)
+{
+	if (dev->features & NETIF_F_TSO) {
+		u32 mss = skb_shinfo(skb)->tso_size;
+
+		if (mss)
+			return LargeSend | ((mss & MSSMask) << MSSShift);
+	}
+	if (skb->ip_summed == CHECKSUM_HW) {
+		const struct iphdr *ip = skb->nh.iph;
+
+		if (ip->protocol == IPPROTO_TCP)
+			return IPCS | TCPCS;
+		else if (ip->protocol == IPPROTO_UDP)
+			return IPCS | UDPCS;
+		WARN_ON(1);	/* we need a WARN() */
+	}
+	return 0;
+}
+
+static int rtl8169_start_xmit(struct sk_buff *skb, struct net_device *dev)
+{
+	struct rtl8169_private *tp = netdev_priv(dev);
+	unsigned int frags, entry = tp->cur_tx % NUM_TX_DESC;
+	struct TxDesc *txd = tp->TxDescArray + entry;
+	void __iomem *ioaddr = tp->mmio_addr;
+	dma_addr_t mapping;
+	u32 status, len;
+	u32 opts1;
+	int ret = 0;
 	
+	if (unlikely(TX_BUFFS_AVAIL(tp) < skb_shinfo(skb)->nr_frags)) {
+		printk(KERN_ERR PFX "%s: BUG! Tx Ring full when queue awake!\n",
+		       dev->name);
+		goto err_stop;
+	}
+
+	if (unlikely(le32_to_cpu(txd->opts1) & DescOwn))
+		goto err_stop;
+
+	opts1 = DescOwn | rtl8169_tso_csum(skb, dev);
+
+	frags = rtl8169_xmit_frags(tp, skb, opts1);
+	if (frags) {
+		len = skb_headlen(skb);
+		opts1 |= FirstFrag;
+	} else {
+		len = skb->len;
+
+		if (unlikely(len < ETH_ZLEN)) {
+			skb = skb_padto(skb, ETH_ZLEN);
+			if (!skb)
+				goto err_update_stats;
+			len = ETH_ZLEN;
+		}
+
+		opts1 |= FirstFrag | LastFrag;
+		tp->tx_skb[entry].skb = skb;
+	}
+
+	mapping = pci_map_single(tp->pci_dev, skb->data, len, PCI_DMA_TODEVICE);
+
+	tp->tx_skb[entry].len = len;
+	txd->addr = cpu_to_le64(mapping);
+	txd->opts2 = cpu_to_le32(rtl8169_tx_vlan_tag(tp, skb));
+
+	wmb();
+
+	/* anti gcc 2.95.3 bugware (sic) */
+	status = opts1 | len | (RingEnd * !((entry + 1) % NUM_TX_DESC));
+	txd->opts1 = cpu_to_le32(status);
+
+	dev->trans_start = jiffies;
+
+	tp->cur_tx += frags + 1;
+
+	smp_wmb();
+
+	RTL_W8(TxPoll, 0x40);	//set polling bit
+
+	if (TX_BUFFS_AVAIL(tp) < MAX_SKB_FRAGS) {
 		netif_stop_queue(dev);
 		smp_rmb();
-		if (dirty != tp->dirty_tx)
+		if (TX_BUFFS_AVAIL(tp) >= MAX_SKB_FRAGS)
 			netif_wake_queue(dev);
 	}
 
 out:
-	return 0;
+	return ret;
 
-err_drop:
-	dev_kfree_skb(skb);
+err_stop:
+	netif_stop_queue(dev);
+	ret = 1;
 err_update_stats:
 	tp->stats.tx_dropped++;
 	goto out;
 }
 
+static void rtl8169_pcierr_interrupt(struct net_device *dev)
+{
+	struct rtl8169_private *tp = netdev_priv(dev);
+	struct pci_dev *pdev = tp->pci_dev;
+	void __iomem *ioaddr = tp->mmio_addr;
+	u16 pci_status, pci_cmd;
+
+	pci_read_config_word(pdev, PCI_COMMAND, &pci_cmd);
+	pci_read_config_word(pdev, PCI_STATUS, &pci_status);
+
+	printk(KERN_ERR PFX "%s: PCI error (cmd = 0x%04x, status = 0x%04x).\n",
+	       dev->name, pci_cmd, pci_status);
+
+	/*
+	 * The recovery sequence below admits a very elaborated explanation:
+	 * - it seems to work;
+	 * - I did not see what else could be done.
+	 *
+	 * Feel free to adjust to your needs.
+	 */
+	pci_write_config_word(pdev, PCI_COMMAND,
+			      pci_cmd | PCI_COMMAND_SERR | PCI_COMMAND_PARITY);
+
+	pci_write_config_word(pdev, PCI_STATUS,
+		pci_status & (PCI_STATUS_DETECTED_PARITY |
+		PCI_STATUS_SIG_SYSTEM_ERROR | PCI_STATUS_REC_MASTER_ABORT |
+		PCI_STATUS_REC_TARGET_ABORT | PCI_STATUS_SIG_TARGET_ABORT));
+
+	/* The infamous DAC f*ckup only happens at boot time */
+	if ((tp->cp_cmd & PCIDAC) && !tp->dirty_rx && !tp->cur_rx) {
+		printk(KERN_INFO PFX "%s: disabling PCI DAC.\n", dev->name);
+		tp->cp_cmd &= ~PCIDAC;
+		RTL_W16(CPlusCmd, tp->cp_cmd);
+		dev->features &= ~NETIF_F_HIGHDMA;
+		rtl8169_schedule_work(dev, rtl8169_reinit_task);
+	}
+
+	rtl8169_hw_reset(ioaddr);
+}
+
 static void
 rtl8169_tx_interrupt(struct net_device *dev, struct rtl8169_private *tp,
-		     void *ioaddr)
+		     void __iomem *ioaddr)
 {
 	unsigned int dirty_tx, tx_left;
 
@@ -1601,22 +2049,24 @@
 
 	while (tx_left > 0) {
 		unsigned int entry = dirty_tx % NUM_TX_DESC;
-		struct sk_buff *skb = tp->Tx_skbuff[entry];
+		struct ring_info *tx_skb = tp->tx_skb + entry;
+		u32 len = tx_skb->len;
 		u32 status;
 
 		rmb();
-		status = le32_to_cpu(tp->TxDescArray[entry].status);
-		if (status & OWNbit)
+		status = le32_to_cpu(tp->TxDescArray[entry].opts1);
+		if (status & DescOwn)
 			break;
 
-		/* FIXME: is it really accurate for TxErr ? */
-		tp->stats.tx_bytes += skb->len >= ETH_ZLEN ?
-				      skb->len : ETH_ZLEN;
+		tp->stats.tx_bytes += len;
 		tp->stats.tx_packets++;
-		rtl8169_unmap_tx_skb(tp->pci_dev, tp->Tx_skbuff + entry,
-				     tp->TxDescArray + entry);
-		dev_kfree_skb_irq(skb);
-		tp->Tx_skbuff[entry] = NULL;
+
+		rtl8169_unmap_tx_skb(tp->pci_dev, tx_skb, tp->TxDescArray + entry);
+
+		if (status & LastFrag) {
+			dev_kfree_skb_irq(tx_skb->skb);
+			tx_skb->skb = NULL;
+		}
 		dirty_tx++;
 		tx_left--;
 	}
@@ -1624,14 +2074,28 @@
 	if (tp->dirty_tx != dirty_tx) {
 		tp->dirty_tx = dirty_tx;
 		smp_wmb();
-		if (netif_queue_stopped(dev))
+		if (netif_queue_stopped(dev) &&
+		    (TX_BUFFS_AVAIL(tp) >= MAX_SKB_FRAGS)) {
 			netif_wake_queue(dev);
+		}
 	}
 }
 
+static inline void rtl8169_rx_csum(struct sk_buff *skb, struct RxDesc *desc)
+{
+	u32 opts1 = desc->opts1;
+	u32 status = opts1 & RxProtoMask;
+
+	if (((status == RxProtoTCP) && !(opts1 & TCPFail)) ||
+	    ((status == RxProtoUDP) && !(opts1 & UDPFail)) ||
+	    ((status == RxProtoIP) && !(opts1 & IPFail)))
+		skb->ip_summed = CHECKSUM_UNNECESSARY;
+	else
+		skb->ip_summed = CHECKSUM_NONE;
+}
+
 static inline int rtl8169_try_rx_copy(struct sk_buff **sk_buff, int pkt_size,
-				      struct RxDesc *desc,
-				      struct net_device *dev)
+				      struct RxDesc *desc, int rx_buf_sz)
 {
 	int ret = -1;
 
@@ -1640,11 +2104,10 @@
 
 		skb = dev_alloc_skb(pkt_size + 2);
 		if (skb) {
-			skb->dev = dev;
 			skb_reserve(skb, 2);
 			eth_copy_and_sum(skb, sk_buff[0]->tail, pkt_size, 0);
 			*sk_buff = skb;
-			rtl8169_return_to_asic(desc);
+			rtl8169_return_to_asic(desc, rx_buf_sz);
 			ret = 0;
 		}
 	}
@@ -1653,7 +2116,7 @@
 
 static int
 rtl8169_rx_interrupt(struct net_device *dev, struct rtl8169_private *tp,
-		     void *ioaddr)
+		     void __iomem *ioaddr)
 {
 	unsigned int cur_rx, rx_left, count;
 	int delta;
@@ -1671,9 +2134,9 @@
 		u32 status;
 
 		rmb();
-		status = le32_to_cpu(tp->RxDescArray[entry].status);
+		status = le32_to_cpu(tp->RxDescArray[entry].opts1);
 
-		if (status & OWNbit)
+		if (status & DescOwn)
 			break;
 		if (status & RxRES) {
 			printk(KERN_INFO "%s: Rx ERROR!!!\n", dev->name);
@@ -1689,22 +2152,27 @@
 			void (*pci_action)(struct pci_dev *, dma_addr_t,
 				size_t, int) = pci_dma_sync_single_for_device;
 
-
+			rtl8169_rx_csum(skb, desc);
+			
 			pci_dma_sync_single_for_cpu(tp->pci_dev,
-				le64_to_cpu(desc->addr), RX_BUF_SIZE,
+				le64_to_cpu(desc->addr), tp->rx_buf_sz,
 				PCI_DMA_FROMDEVICE);
 
-			if (rtl8169_try_rx_copy(&skb, pkt_size, desc, dev)) {
+			if (rtl8169_try_rx_copy(&skb, pkt_size, desc,
+						tp->rx_buf_sz)) {
 				pci_action = pci_unmap_single;
 				tp->Rx_skbuff[entry] = NULL;
 			}
 
 			pci_action(tp->pci_dev, le64_to_cpu(desc->addr),
-				   RX_BUF_SIZE, PCI_DMA_FROMDEVICE);
+				   tp->rx_buf_sz, PCI_DMA_FROMDEVICE);
 
+			skb->dev = dev;
 			skb_put(skb, pkt_size);
 			skb->protocol = eth_type_trans(skb, dev);
-			rtl8169_rx_skb(skb);
+
+			if (rtl8169_rx_vlan_skb(tp, desc, skb) < 0)
+				rtl8169_rx_skb(skb);
 
 			dev->last_rx = jiffies;
 			tp->stats.rx_bytes += pkt_size;
@@ -1745,10 +2213,13 @@
 	struct net_device *dev = (struct net_device *) dev_instance;
 	struct rtl8169_private *tp = netdev_priv(dev);
 	int boguscnt = max_interrupt_work;
-	void *ioaddr = tp->mmio_addr;
+	void __iomem *ioaddr = tp->mmio_addr;
 	int status = 0;
 	int handled = 0;
 
+	if (unlikely(!netif_running(dev)))
+		goto out;
+
 	do {
 		status = RTL_R16(IntrStatus);
 
@@ -1766,11 +2237,7 @@
 			break;
 
 		if (unlikely(status & SYSErr)) {
-			printk(KERN_ERR PFX "%s: PCI error (status: 0x%04x)."
-			       " Device disabled.\n", dev->name, status);
-			RTL_W8(ChipCmd, 0x00);
-			RTL_W16(IntrMask, 0x0000);
-			RTL_R16(IntrMask);
+			rtl8169_pcierr_interrupt(dev);
 			break;
 		}
 
@@ -1784,7 +2251,7 @@
 		if (likely(netif_rx_schedule_prep(dev)))
 			__netif_rx_schedule(dev);
 		else {
-			printk(KERN_INFO "%s: interrupt %x taken in poll\n",
+			printk(KERN_INFO "%s: interrupt %04x taken in poll\n",
 			       dev->name, status);	
 		}
 		break;
@@ -1807,6 +2274,7 @@
 		/* Clear all interrupt sources. */
 		RTL_W16(IntrStatus, 0xffff);
 	}
+out:
 	return IRQ_RETVAL(handled);
 }
 
@@ -1815,7 +2283,7 @@
 {
 	unsigned int work_done, work_to_do = min(*budget, dev->quota);
 	struct rtl8169_private *tp = netdev_priv(dev);
-	void *ioaddr = tp->mmio_addr;
+	void __iomem *ioaddr = tp->mmio_addr;
 
 	work_done = rtl8169_rx_interrupt(dev, tp, ioaddr);
 	rtl8169_tx_interrupt(dev, tp, ioaddr);
@@ -1840,16 +2308,16 @@
 }
 #endif
 
-static int
-rtl8169_close(struct net_device *dev)
+static void rtl8169_down(struct net_device *dev)
 {
 	struct rtl8169_private *tp = netdev_priv(dev);
-	struct pci_dev *pdev = tp->pci_dev;
-	void *ioaddr = tp->mmio_addr;
+	void __iomem *ioaddr = tp->mmio_addr;
+
+	rtl8169_delete_timer(dev);
 
 	netif_stop_queue(dev);
 
-	rtl8169_delete_timer(dev);
+	flush_scheduled_work();
 
 	spin_lock_irq(&tp->lock);
 
@@ -1866,11 +2334,26 @@
 	spin_unlock_irq(&tp->lock);
 
 	synchronize_irq(dev->irq);
-	free_irq(dev->irq, dev);
+
+	netif_poll_disable(dev);
+
+	/* Give a racing hard_start_xmit a few cycles to complete. */
+	set_current_state(TASK_UNINTERRUPTIBLE);
+	schedule_timeout(1);
 
 	rtl8169_tx_clear(tp);
 
 	rtl8169_rx_clear(tp);
+}
+
+static int rtl8169_close(struct net_device *dev)
+{
+	struct rtl8169_private *tp = netdev_priv(dev);
+	struct pci_dev *pdev = tp->pci_dev;
+
+	rtl8169_down(dev);
+
+	free_irq(dev->irq, dev);
 
 	pci_free_consistent(pdev, R8169_RX_RING_BYTES, tp->RxDescArray,
 			    tp->RxPhyAddr);
@@ -1886,7 +2369,7 @@
 rtl8169_set_rx_mode(struct net_device *dev)
 {
 	struct rtl8169_private *tp = netdev_priv(dev);
-	void *ioaddr = tp->mmio_addr;
+	void __iomem *ioaddr = tp->mmio_addr;
 	unsigned long flags;
 	u32 mc_filter[2];	/* Multicast hash filter */
 	int i, rx_mode;
@@ -1938,7 +2421,7 @@
 static struct net_device_stats *rtl8169_get_stats(struct net_device *dev)
 {
 	struct rtl8169_private *tp = netdev_priv(dev);
-	void *ioaddr = tp->mmio_addr;
+	void __iomem *ioaddr = tp->mmio_addr;
 	unsigned long flags;
 
 	if (netif_running(dev)) {
diff -Nru a/drivers/net/s2io-regs.h b/drivers/net/s2io-regs.h
--- a/drivers/net/s2io-regs.h	2005-01-10 20:11:19 -08:00
+++ b/drivers/net/s2io-regs.h	2005-01-10 20:11:19 -08:00
@@ -289,6 +289,8 @@
 	u64 tda_err_alarm;
 
 	u64 pcc_err_reg;
+#define PCC_FB_ECC_DB_ERR		vBIT(0xFF, 16, 8)
+
 	u64 pcc_err_mask;
 	u64 pcc_err_alarm;
 
@@ -512,6 +514,7 @@
 #define RX_PA_CFG_IGNORE_FRM_ERR           BIT(1)
 #define RX_PA_CFG_IGNORE_SNAP_OUI          BIT(2)
 #define RX_PA_CFG_IGNORE_LLC_CTRL          BIT(3)
+#define RX_PA_CFG_IGNORE_L2_ERR            BIT(6)
 
 	u8 unused12[0x700 - 0x1D8];
 
diff -Nru a/drivers/net/s2io.c b/drivers/net/s2io.c
--- a/drivers/net/s2io.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/net/s2io.c	2005-01-10 20:11:20 -08:00
@@ -26,17 +26,13 @@
  *			  	
  * The module loadable parameters that are supported by the driver and a brief
  * explaination of all the variables.
- * ring_num : This can be used to program the number of receive rings used 
+ * rx_ring_num : This can be used to program the number of receive rings used 
  * in the driver.  					
- * frame_len: This is an array of size 8. Using this we can set the maximum 
- * size of the received frame that can be steered into the corrsponding 
- * receive ring.
- * ring_len: This defines the number of descriptors each ring can have. This 
+ * rx_ring_len: This defines the number of descriptors each ring can have. This 
  * is also an array of size 8.
- * fifo_num: This defines the number of Tx FIFOs thats used int the driver.
- * fifo_len: This too is an array of 8. Each element defines the number of 
+ * tx_fifo_num: This defines the number of Tx FIFOs thats used int the driver.
+ * tx_fifo_len: This too is an array of 8. Each element defines the number of 
  * Tx descriptors that can be associated with each corresponding FIFO.
- * latency_timer: This input is programmed into the Latency timer register
  * in PCI Configuration space.
  ************************************************************************/
 
@@ -69,21 +65,30 @@
 
 /* S2io Driver name & version. */
 static char s2io_driver_name[] = "s2io";
-static char s2io_driver_version[] = "Version 1.0";
+static char s2io_driver_version[] = "Version 1.7.5.1";
+
+/* 
+ * Cards with following subsystem_id have a link state indication
+ * problem, 600B, 600C, 600D, 640B, 640C and 640D.
+ * macro below identifies these cards given the subsystem_id.
+ */
+#define CARDS_WITH_FAULTY_LINK_INDICATORS(subid) \
+		(((subid >= 0x600B) && (subid <= 0x600D)) || \
+		 ((subid >= 0x640B) && (subid <= 0x640D))) ? 1 : 0
 
 #define LINK_IS_UP(val64) (!(val64 & (ADAPTER_STATUS_RMAC_REMOTE_FAULT | \
 				      ADAPTER_STATUS_RMAC_LOCAL_FAULT)))
-#define TASKLET_IN_USE test_and_set_bit(0, \
-				(unsigned long *)(&sp->tasklet_status))
+#define TASKLET_IN_USE test_and_set_bit(0, (&sp->tasklet_status))
 #define PANIC	1
 #define LOW	2
 static inline int rx_buffer_level(nic_t * sp, int rxb_size, int ring)
 {
 	int level = 0;
-	if ((sp->pkt_cnt[ring] - rxb_size) > 128) {
+	if ((sp->pkt_cnt[ring] - rxb_size) > 16) {
 		level = LOW;
-		if (rxb_size < sp->pkt_cnt[ring] / 8)
+		if ((sp->pkt_cnt[ring] - rxb_size) < MAX_RXDS_PER_BLOCK) {
 			level = PANIC;
+		}
 	}
 
 	return level;
@@ -99,45 +104,45 @@
 };
 
 static char ethtool_stats_keys[][ETH_GSTRING_LEN] = {
-	"tmac_frms",
-	"tmac_data_octets",
-	"tmac_drop_frms",
-	"tmac_mcst_frms",
-	"tmac_bcst_frms",
-	"tmac_pause_ctrl_frms",
-	"tmac_any_err_frms",
-	"tmac_vld_ip_octets",
-	"tmac_vld_ip",
-	"tmac_drop_ip",
-	"tmac_icmp",
-	"tmac_rst_tcp",
-	"tmac_tcp",
-	"tmac_udp",
-	"rmac_vld_frms",
-	"rmac_data_octets",
-	"rmac_fcs_err_frms",
-	"rmac_drop_frms",
-	"rmac_vld_mcst_frms",
-	"rmac_vld_bcst_frms",
-	"rmac_in_rng_len_err_frms",
-	"rmac_long_frms",
-	"rmac_pause_ctrl_frms",
-	"rmac_discarded_frms",
-	"rmac_usized_frms",
-	"rmac_osized_frms",
-	"rmac_frag_frms",
-	"rmac_jabber_frms",
-	"rmac_ip",
-	"rmac_ip_octets",
-	"rmac_hdr_err_ip",
-	"rmac_drop_ip",
-	"rmac_icmp",
-	"rmac_tcp",
-	"rmac_udp",
-	"rmac_err_drp_udp",
-	"rmac_pause_cnt",
-	"rmac_accepted_ip",
-	"rmac_err_tcp",
+	{"tmac_frms"},
+	{"tmac_data_octets"},
+	{"tmac_drop_frms"},
+	{"tmac_mcst_frms"},
+	{"tmac_bcst_frms"},
+	{"tmac_pause_ctrl_frms"},
+	{"tmac_any_err_frms"},
+	{"tmac_vld_ip_octets"},
+	{"tmac_vld_ip"},
+	{"tmac_drop_ip"},
+	{"tmac_icmp"},
+	{"tmac_rst_tcp"},
+	{"tmac_tcp"},
+	{"tmac_udp"},
+	{"rmac_vld_frms"},
+	{"rmac_data_octets"},
+	{"rmac_fcs_err_frms"},
+	{"rmac_drop_frms"},
+	{"rmac_vld_mcst_frms"},
+	{"rmac_vld_bcst_frms"},
+	{"rmac_in_rng_len_err_frms"},
+	{"rmac_long_frms"},
+	{"rmac_pause_ctrl_frms"},
+	{"rmac_discarded_frms"},
+	{"rmac_usized_frms"},
+	{"rmac_osized_frms"},
+	{"rmac_frag_frms"},
+	{"rmac_jabber_frms"},
+	{"rmac_ip"},
+	{"rmac_ip_octets"},
+	{"rmac_hdr_err_ip"},
+	{"rmac_drop_ip"},
+	{"rmac_icmp"},
+	{"rmac_tcp"},
+	{"rmac_udp"},
+	{"rmac_err_drp_udp"},
+	{"rmac_pause_cnt"},
+	{"rmac_accepted_ip"},
+	{"rmac_err_tcp"},
 };
 
 #define S2IO_STAT_LEN sizeof(ethtool_stats_keys)/ ETH_GSTRING_LEN
@@ -147,7 +152,8 @@
 #define S2IO_STRINGS_LEN	S2IO_TEST_LEN * ETH_GSTRING_LEN
 
 
-/* Constants to be programmed into the Xena's registers to configure
+/* 
+ * Constants to be programmed into the Xena's registers, to configure
  * the XAUI.
  */
 
@@ -188,7 +194,9 @@
 	END_SIGN
 };
 
-/* Constants for Fixing the MacAddress problem seen mostly on
+
+/* 
+ * Constants for Fixing the MacAddress problem seen mostly on
  * Alpha machines.
  */
 static u64 fix_mac[] = {
@@ -209,16 +217,23 @@
 	END_SIGN
 };
 
-
 /* Module Loadable parameters. */
-static u32 ring_num;
-static u32 frame_len[MAX_RX_RINGS];
-static u32 ring_len[MAX_RX_RINGS];
-static u32 fifo_num;
-static u32 fifo_len[MAX_TX_FIFOS];
-static u32 rx_prio;
-static u32 tx_prio;
-static u8 latency_timer = 0;
+static unsigned int tx_fifo_num = 1;
+static unsigned int tx_fifo_len[MAX_TX_FIFOS] =
+    {[0 ...(MAX_TX_FIFOS - 1)] = 0 };
+static unsigned int rx_ring_num = 1;
+static unsigned int rx_ring_sz[MAX_RX_RINGS] =
+    {[0 ...(MAX_RX_RINGS - 1)] = 0 };
+static unsigned int Stats_refresh_time = 4;
+static unsigned int rmac_pause_time = 65535;
+static unsigned int mc_pause_threshold_q0q3 = 187;
+static unsigned int mc_pause_threshold_q4q7 = 187;
+static unsigned int shared_splits;
+static unsigned int tmac_util_period = 5;
+static unsigned int rmac_util_period = 5;
+#ifndef CONFIG_S2IO_NAPI
+static unsigned int indicate_max_pkts;
+#endif
 
 /* 
  * S2IO device table.
@@ -241,24 +256,30 @@
       .remove = __devexit_p(s2io_rem_nic),
 };
 
-/*  
- *  Input Arguments: 
- *  Device private variable.
- *  Return Value: 
- *  SUCCESS on success and an appropriate -ve value on failure.
- *  Description: 
- *  The function allocates the all memory areas shared 
- *  between the NIC and the driver. This includes Tx descriptors, 
- *  Rx descriptors and the statistics block.
+/* A simplifier macro used both by init and free shared_mem Fns(). */
+#define TXD_MEM_PAGE_CNT(len, per_each) ((len+per_each - 1) / per_each)
+
+/**
+ * init_shared_mem - Allocation and Initialization of Memory
+ * @nic: Device private variable.
+ * Description: The function allocates all the memory areas shared 
+ * between the NIC and the driver. This includes Tx descriptors, 
+ * Rx descriptors and the statistics block.
  */
-static int initSharedMem(struct s2io_nic *nic)
+
+static int init_shared_mem(struct s2io_nic *nic)
 {
 	u32 size;
 	void *tmp_v_addr, *tmp_v_addr_next;
 	dma_addr_t tmp_p_addr, tmp_p_addr_next;
 	RxD_block_t *pre_rxd_blk = NULL;
 	int i, j, blk_cnt;
+	int lst_size, lst_per_page;
 	struct net_device *dev = nic->dev;
+#ifdef CONFIG_2BUFF_MODE
+	u64 tmp;
+	buffAdd_t *ba;
+#endif
 
 	mac_info_t *mac_control;
 	struct config_param *config;
@@ -269,8 +290,8 @@
 
 	/* Allocation and initialization of TXDLs in FIOFs */
 	size = 0;
-	for (i = 0; i < config->TxFIFONum; i++) {
-		size += config->TxCfg[i].FifoLen;
+	for (i = 0; i < config->tx_fifo_num; i++) {
+		size += config->tx_cfg[i].fifo_len;
 	}
 	if (size > MAX_AVAILABLE_TXDS) {
 		DBG_PRINT(ERR_DBG, "%s: Total number of Tx FIFOs ",
@@ -279,77 +300,96 @@
 		DBG_PRINT(ERR_DBG, "that can be used\n");
 		return FAILURE;
 	}
-	size *= (sizeof(TxD_t) * config->MaxTxDs);
 
-	mac_control->txd_list_mem = pci_alloc_consistent
-	    (nic->pdev, size, &mac_control->txd_list_mem_phy);
-	if (!mac_control->txd_list_mem) {
-		return -ENOMEM;
-	}
-	mac_control->txd_list_mem_sz = size;
-
-	tmp_v_addr = mac_control->txd_list_mem;
-	tmp_p_addr = mac_control->txd_list_mem_phy;
-	memset(tmp_v_addr, 0, size);
+	lst_size = (sizeof(TxD_t) * config->max_txds);
+	lst_per_page = PAGE_SIZE / lst_size;
 
-	DBG_PRINT(INIT_DBG, "%s:List Mem PHY: 0x%llx\n", dev->name,
-		  (unsigned long long) tmp_p_addr);
-
-	for (i = 0; i < config->TxFIFONum; i++) {
-		mac_control->txdl_start_phy[i] = tmp_p_addr;
-		mac_control->txdl_start[i] = (TxD_t *) tmp_v_addr;
+	for (i = 0; i < config->tx_fifo_num; i++) {
+		int fifo_len = config->tx_cfg[i].fifo_len;
+		int list_holder_size = fifo_len * sizeof(list_info_hold_t);
+		nic->list_info[i] = kmalloc(list_holder_size, GFP_KERNEL);
+		if (!nic->list_info[i]) {
+			DBG_PRINT(ERR_DBG,
+				  "Malloc failed for list_info\n");
+			return -ENOMEM;
+		}
+		memset(nic->list_info[i], 0, list_holder_size);
+	}
+	for (i = 0; i < config->tx_fifo_num; i++) {
+		int page_num = TXD_MEM_PAGE_CNT(config->tx_cfg[i].fifo_len,
+						lst_per_page);
 		mac_control->tx_curr_put_info[i].offset = 0;
 		mac_control->tx_curr_put_info[i].fifo_len =
-		    config->TxCfg[i].FifoLen - 1;
+		    config->tx_cfg[i].fifo_len - 1;
 		mac_control->tx_curr_get_info[i].offset = 0;
 		mac_control->tx_curr_get_info[i].fifo_len =
-		    config->TxCfg[i].FifoLen - 1;
-
-		tmp_p_addr +=
-		    (config->TxCfg[i].FifoLen * (sizeof(TxD_t)) *
-		     config->MaxTxDs);
-		tmp_v_addr +=
-		    (config->TxCfg[i].FifoLen * (sizeof(TxD_t)) *
-		     config->MaxTxDs);
+		    config->tx_cfg[i].fifo_len - 1;
+		for (j = 0; j < page_num; j++) {
+			int k = 0;
+			dma_addr_t tmp_p;
+			void *tmp_v;
+			tmp_v = pci_alloc_consistent(nic->pdev,
+						     PAGE_SIZE, &tmp_p);
+			if (!tmp_v) {
+				DBG_PRINT(ERR_DBG,
+					  "pci_alloc_consistent ");
+				DBG_PRINT(ERR_DBG, "failed for TxDL\n");
+				return -ENOMEM;
+			}
+			while (k < lst_per_page) {
+				int l = (j * lst_per_page) + k;
+				if (l == config->tx_cfg[i].fifo_len)
+					goto end_txd_alloc;
+				nic->list_info[i][l].list_virt_addr =
+				    tmp_v + (k * lst_size);
+				nic->list_info[i][l].list_phy_addr =
+				    tmp_p + (k * lst_size);
+				k++;
+			}
+		}
 	}
+      end_txd_alloc:
 
 	/* Allocation and initialization of RXDs in Rings */
 	size = 0;
-	for (i = 0; i < config->RxRingNum; i++) {
-		if (config->RxCfg[i].NumRxd % (MAX_RXDS_PER_BLOCK + 1)) {
+	for (i = 0; i < config->rx_ring_num; i++) {
+		if (config->rx_cfg[i].num_rxd % (MAX_RXDS_PER_BLOCK + 1)) {
 			DBG_PRINT(ERR_DBG, "%s: RxD count of ", dev->name);
 			DBG_PRINT(ERR_DBG, "Ring%d is not a multiple of ",
 				  i);
 			DBG_PRINT(ERR_DBG, "RxDs per Block");
 			return FAILURE;
 		}
-		size += config->RxCfg[i].NumRxd;
+		size += config->rx_cfg[i].num_rxd;
 		nic->block_count[i] =
-		    config->RxCfg[i].NumRxd / (MAX_RXDS_PER_BLOCK + 1);
+		    config->rx_cfg[i].num_rxd / (MAX_RXDS_PER_BLOCK + 1);
 		nic->pkt_cnt[i] =
-		    config->RxCfg[i].NumRxd - nic->block_count[i];
+		    config->rx_cfg[i].num_rxd - nic->block_count[i];
 	}
-	size = (size * (sizeof(RxD_t)));
-	mac_control->rxd_ring_mem_sz = size;
 
-	for (i = 0; i < config->RxRingNum; i++) {
+	for (i = 0; i < config->rx_ring_num; i++) {
 		mac_control->rx_curr_get_info[i].block_index = 0;
 		mac_control->rx_curr_get_info[i].offset = 0;
 		mac_control->rx_curr_get_info[i].ring_len =
-		    config->RxCfg[i].NumRxd - 1;
+		    config->rx_cfg[i].num_rxd - 1;
 		mac_control->rx_curr_put_info[i].block_index = 0;
 		mac_control->rx_curr_put_info[i].offset = 0;
 		mac_control->rx_curr_put_info[i].ring_len =
-		    config->RxCfg[i].NumRxd - 1;
+		    config->rx_cfg[i].num_rxd - 1;
 		blk_cnt =
-		    config->RxCfg[i].NumRxd / (MAX_RXDS_PER_BLOCK + 1);
+		    config->rx_cfg[i].num_rxd / (MAX_RXDS_PER_BLOCK + 1);
 		/*  Allocating all the Rx blocks */
 		for (j = 0; j < blk_cnt; j++) {
+#ifndef CONFIG_2BUFF_MODE
 			size = (MAX_RXDS_PER_BLOCK + 1) * (sizeof(RxD_t));
+#else
+			size = SIZE_OF_BLOCK;
+#endif
 			tmp_v_addr = pci_alloc_consistent(nic->pdev, size,
 							  &tmp_p_addr);
 			if (tmp_v_addr == NULL) {
-				/* In case of failure, freeSharedMem() 
+				/*
+				 * In case of failure, free_shared_mem() 
 				 * is called, which should free any 
 				 * memory that was alloced till the 
 				 * failure happened.
@@ -377,20 +417,68 @@
 			pre_rxd_blk->reserved_1 = END_OF_BLOCK;	/* last RxD 
 								 * marker.
 								 */
+#ifndef	CONFIG_2BUFF_MODE
 			pre_rxd_blk->reserved_2_pNext_RxD_block =
 			    (unsigned long) tmp_v_addr_next;
+#endif
 			pre_rxd_blk->pNext_RxD_Blk_physical =
 			    (u64) tmp_p_addr_next;
 		}
 	}
 
+#ifdef CONFIG_2BUFF_MODE
+	/* 
+	 * Allocation of Storages for buffer addresses in 2BUFF mode
+	 * and the buffers as well.
+	 */
+	for (i = 0; i < config->rx_ring_num; i++) {
+		blk_cnt =
+		    config->rx_cfg[i].num_rxd / (MAX_RXDS_PER_BLOCK + 1);
+		nic->ba[i] = kmalloc((sizeof(buffAdd_t *) * blk_cnt),
+				     GFP_KERNEL);
+		if (!nic->ba[i])
+			return -ENOMEM;
+		for (j = 0; j < blk_cnt; j++) {
+			int k = 0;
+			nic->ba[i][j] = kmalloc((sizeof(buffAdd_t) *
+						 (MAX_RXDS_PER_BLOCK + 1)),
+						GFP_KERNEL);
+			if (!nic->ba[i][j])
+				return -ENOMEM;
+			while (k != MAX_RXDS_PER_BLOCK) {
+				ba = &nic->ba[i][j][k];
+
+				ba->ba_0_org = (void *) kmalloc
+				    (BUF0_LEN + ALIGN_SIZE, GFP_KERNEL);
+				if (!ba->ba_0_org)
+					return -ENOMEM;
+				tmp = (u64) ba->ba_0_org;
+				tmp += ALIGN_SIZE;
+				tmp &= ~((u64) ALIGN_SIZE);
+				ba->ba_0 = (void *) tmp;
+
+				ba->ba_1_org = (void *) kmalloc
+				    (BUF1_LEN + ALIGN_SIZE, GFP_KERNEL);
+				if (!ba->ba_1_org)
+					return -ENOMEM;
+				tmp = (u64) ba->ba_1_org;
+				tmp += ALIGN_SIZE;
+				tmp &= ~((u64) ALIGN_SIZE);
+				ba->ba_1 = (void *) tmp;
+				k++;
+			}
+		}
+	}
+#endif
+
 	/* Allocation and initialization of Statistics block */
 	size = sizeof(StatInfo_t);
 	mac_control->stats_mem = pci_alloc_consistent
 	    (nic->pdev, size, &mac_control->stats_mem_phy);
 
 	if (!mac_control->stats_mem) {
-		/* In case of failure, freeSharedMem() is called, which 
+		/* 
+		 * In case of failure, free_shared_mem() is called, which 
 		 * should free any memory that was alloced till the 
 		 * failure happened.
 		 */
@@ -399,7 +487,7 @@
 	mac_control->stats_mem_sz = size;
 
 	tmp_v_addr = mac_control->stats_mem;
-	mac_control->StatsInfo = (StatInfo_t *) tmp_v_addr;
+	mac_control->stats_info = (StatInfo_t *) tmp_v_addr;
 	memset(tmp_v_addr, 0, size);
 
 	DBG_PRINT(INIT_DBG, "%s:Ring Mem PHY: 0x%llx\n", dev->name,
@@ -408,22 +496,21 @@
 	return SUCCESS;
 }
 
-/*  
- *  Input Arguments: 
- *  Device peivate variable.
- *  Return Value: 
- *  NONE
- *  Description: 
- *  This function is to free all memory locations allocated by
- *  the initSharedMem() function and return it to the kernel.
+/**  
+ * free_shared_mem - Free the allocated Memory 
+ * @nic:  Device private variable.
+ * Description: This function is to free all memory locations allocated by
+ * the init_shared_mem() function and return it to the kernel.
  */
-static void freeSharedMem(struct s2io_nic *nic)
+
+static void free_shared_mem(struct s2io_nic *nic)
 {
 	int i, j, blk_cnt, size;
 	void *tmp_v_addr;
 	dma_addr_t tmp_p_addr;
 	mac_info_t *mac_control;
 	struct config_param *config;
+	int lst_size, lst_per_page;
 
 
 	if (!nic)
@@ -432,15 +519,31 @@
 	mac_control = &nic->mac_control;
 	config = &nic->config;
 
-	if (mac_control->txd_list_mem) {
-		pci_free_consistent(nic->pdev,
-				    mac_control->txd_list_mem_sz,
-				    mac_control->txd_list_mem,
-				    mac_control->txd_list_mem_phy);
+	lst_size = (sizeof(TxD_t) * config->max_txds);
+	lst_per_page = PAGE_SIZE / lst_size;
+
+	for (i = 0; i < config->tx_fifo_num; i++) {
+		int page_num = TXD_MEM_PAGE_CNT(config->tx_cfg[i].fifo_len,
+						lst_per_page);
+		for (j = 0; j < page_num; j++) {
+			int mem_blks = (j * lst_per_page);
+			if (!nic->list_info[i][mem_blks].list_virt_addr)
+				break;
+			pci_free_consistent(nic->pdev, PAGE_SIZE,
+					    nic->list_info[i][mem_blks].
+					    list_virt_addr,
+					    nic->list_info[i][mem_blks].
+					    list_phy_addr);
+		}
+		kfree(nic->list_info[i]);
 	}
 
+#ifndef CONFIG_2BUFF_MODE
 	size = (MAX_RXDS_PER_BLOCK + 1) * (sizeof(RxD_t));
-	for (i = 0; i < config->RxRingNum; i++) {
+#else
+	size = SIZE_OF_BLOCK;
+#endif
+	for (i = 0; i < config->rx_ring_num; i++) {
 		blk_cnt = nic->block_count[i];
 		for (j = 0; j < blk_cnt; j++) {
 			tmp_v_addr = nic->rx_blocks[i][j].block_virt_addr;
@@ -452,6 +555,28 @@
 		}
 	}
 
+#ifdef CONFIG_2BUFF_MODE
+	/* Freeing buffer storage addresses in 2BUFF mode. */
+	for (i = 0; i < config->rx_ring_num; i++) {
+		blk_cnt =
+		    config->rx_cfg[i].num_rxd / (MAX_RXDS_PER_BLOCK + 1);
+		for (j = 0; j < blk_cnt; j++) {
+			int k = 0;
+			if (!nic->ba[i][j])
+				continue;
+			while (k != MAX_RXDS_PER_BLOCK) {
+				buffAdd_t *ba = &nic->ba[i][j][k];
+				kfree(ba->ba_0_org);
+				kfree(ba->ba_1_org);
+				k++;
+			}
+			kfree(nic->ba[i][j]);
+		}
+		if (nic->ba[i])
+			kfree(nic->ba[i]);
+	}
+#endif
+
 	if (mac_control->stats_mem) {
 		pci_free_consistent(nic->pdev,
 				    mac_control->stats_mem_sz,
@@ -460,16 +585,16 @@
 	}
 }
 
-/*  
- *  Input Arguments: 
- *  device peivate variable
- *  Return Value: 
- *  SUCCESS on success and '-1' on failure (endian settings incorrect).
- *  Description: 
- *  The function sequentially configures every block 
+/**  
+ *  init_nic - Initialization of hardware 
+ *  @nic: device peivate variable
+ *  Description: The function sequentially configures every block 
  *  of the H/W from their reset values. 
+ *  Return Value:  SUCCESS on success and 
+ *  '-1' on failure (endian settings incorrect).
  */
-static int initNic(struct s2io_nic *nic)
+
+static int init_nic(struct s2io_nic *nic)
 {
 	XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0;
 	struct net_device *dev = nic->dev;
@@ -485,11 +610,13 @@
 	mac_control = &nic->mac_control;
 	config = &nic->config;
 
-	/*  Set proper endian settings and verify the same by 
-	 *  reading the PIF Feed-back register.
+	/* 
+	 * Set proper endian settings and verify the same by 
+	 * reading the PIF Feed-back register.
 	 */
 #ifdef  __BIG_ENDIAN
-	/* The device by default set to a big endian format, so 
+	/*
+	 * The device by default set to a big endian format, so 
 	 * a big endian driver need not set anything.
 	 */
 	writeq(0xffffffffffffffffULL, &bar0->swapper_ctrl);
@@ -510,7 +637,8 @@
 		 SWAPPER_CTRL_STATS_FE | SWAPPER_CTRL_STATS_SE);
 	writeq(val64, &bar0->swapper_ctrl);
 #else
-	/* Initially we enable all bits to make it accessible by 
+	/* 
+	 * Initially we enable all bits to make it accessible by 
 	 * the driver, then we selectively enable only those bits 
 	 * that we want to set.
 	 */
@@ -537,8 +665,9 @@
 	writeq(val64, &bar0->swapper_ctrl);
 #endif
 
-	/* Verifying if endian settings are accurate by reading 
-	 * a feedback register.
+	/* 
+	 * Verifying if endian settings are accurate by 
+	 * reading a feedback register.
 	 */
 	val64 = readq(&bar0->pif_rd_swapper_fb);
 	if (val64 != 0x0123456789ABCDEFULL) {
@@ -559,10 +688,13 @@
 	schedule_timeout(HZ / 2);
 
 	/*  Enable Receiving broadcasts */
+	add = (void *) &bar0->mac_cfg;
 	val64 = readq(&bar0->mac_cfg);
 	val64 |= MAC_RMAC_BCAST_ENABLE;
 	writeq(RMAC_CFG_KEY(0x4C0D), &bar0->rmac_cfg_key);
-	writeq(val64, &bar0->mac_cfg);
+	writel((u32) val64, add);
+	writeq(RMAC_CFG_KEY(0x4C0D), &bar0->rmac_cfg_key);
+	writel((u32) (val64 >> 32), (add + 4));
 
 	/* Read registers in all blocks */
 	val64 = readq(&bar0->mac_int_mask);
@@ -573,8 +705,9 @@
 	val64 = dev->mtu;
 	writeq(vBIT(val64, 2, 14), &bar0->rmac_max_pyld_len);
 
-	/* Configuring the XAUI Interface of Xena. 
-	 *****************************************
+	/* 
+	 * Configuring the XAUI Interface of Xena. 
+	 * ***************************************
 	 * To Configure the Xena's XAUI, one has to write a series 
 	 * of 64 bit values into two registers in a particular 
 	 * sequence. Hence a macro 'SWITCH_SIGN' has been defined 
@@ -593,8 +726,8 @@
 				dtx_cnt++;
 				goto mdio_cfg;
 			}
-			writeq(default_dtx_cfg[dtx_cnt],
-			       &bar0->dtx_control);
+			SPECIAL_REG_WRITE(default_dtx_cfg[dtx_cnt],
+					  &bar0->dtx_control, UF);
 			val64 = readq(&bar0->dtx_control);
 			dtx_cnt++;
 		}
@@ -604,8 +737,8 @@
 				mdio_cnt++;
 				goto dtx_cfg;
 			}
-			writeq(default_mdio_cfg[mdio_cnt],
-			       &bar0->mdio_control);
+			SPECIAL_REG_WRITE(default_mdio_cfg[mdio_cnt],
+					  &bar0->mdio_control, UF);
 			val64 = readq(&bar0->mdio_control);
 			mdio_cnt++;
 		}
@@ -625,13 +758,13 @@
 	writeq(val64, &bar0->tx_fifo_partition_3);
 
 
-	for (i = 0, j = 0; i < config->TxFIFONum; i++) {
+	for (i = 0, j = 0; i < config->tx_fifo_num; i++) {
 		val64 |=
-		    vBIT(config->TxCfg[i].FifoLen - 1, ((i * 32) + 19),
-			 13) | vBIT(config->TxCfg[i].FifoPriority,
+		    vBIT(config->tx_cfg[i].fifo_len - 1, ((i * 32) + 19),
+			 13) | vBIT(config->tx_cfg[i].fifo_priority,
 				    ((i * 32) + 5), 3);
 
-		if (i == (config->TxFIFONum - 1)) {
+		if (i == (config->tx_fifo_num - 1)) {
 			if (i % 2 == 0)
 				i++;
 		}
@@ -675,56 +808,59 @@
 
 	/* Rx DMA intialization. */
 	val64 = 0;
-	for (i = 0; i < config->RxRingNum; i++) {
+	for (i = 0; i < config->rx_ring_num; i++) {
 		val64 |=
-		    vBIT(config->RxCfg[i].RingPriority, (5 + (i * 8)), 3);
+		    vBIT(config->rx_cfg[i].ring_priority, (5 + (i * 8)),
+			 3);
 	}
 	writeq(val64, &bar0->rx_queue_priority);
 
-	/* Allocating equal share of memory to all the configured 
-	 * Rings.
+	/* 
+	 * Allocating equal share of memory to all the 
+	 * configured Rings.
 	 */
 	val64 = 0;
-	for (i = 0; i < config->RxRingNum; i++) {
+	for (i = 0; i < config->rx_ring_num; i++) {
 		switch (i) {
 		case 0:
-			mem_share = (64 / config->RxRingNum +
-				     64 % config->RxRingNum);
+			mem_share = (64 / config->rx_ring_num +
+				     64 % config->rx_ring_num);
 			val64 |= RX_QUEUE_CFG_Q0_SZ(mem_share);
 			continue;
 		case 1:
-			mem_share = (64 / config->RxRingNum);
+			mem_share = (64 / config->rx_ring_num);
 			val64 |= RX_QUEUE_CFG_Q1_SZ(mem_share);
 			continue;
 		case 2:
-			mem_share = (64 / config->RxRingNum);
+			mem_share = (64 / config->rx_ring_num);
 			val64 |= RX_QUEUE_CFG_Q2_SZ(mem_share);
 			continue;
 		case 3:
-			mem_share = (64 / config->RxRingNum);
+			mem_share = (64 / config->rx_ring_num);
 			val64 |= RX_QUEUE_CFG_Q3_SZ(mem_share);
 			continue;
 		case 4:
-			mem_share = (64 / config->RxRingNum);
+			mem_share = (64 / config->rx_ring_num);
 			val64 |= RX_QUEUE_CFG_Q4_SZ(mem_share);
 			continue;
 		case 5:
-			mem_share = (64 / config->RxRingNum);
+			mem_share = (64 / config->rx_ring_num);
 			val64 |= RX_QUEUE_CFG_Q5_SZ(mem_share);
 			continue;
 		case 6:
-			mem_share = (64 / config->RxRingNum);
+			mem_share = (64 / config->rx_ring_num);
 			val64 |= RX_QUEUE_CFG_Q6_SZ(mem_share);
 			continue;
 		case 7:
-			mem_share = (64 / config->RxRingNum);
+			mem_share = (64 / config->rx_ring_num);
 			val64 |= RX_QUEUE_CFG_Q7_SZ(mem_share);
 			continue;
 		}
 	}
 	writeq(val64, &bar0->rx_queue_cfg);
 
-	/* Initializing the Tx round robin registers to 0.
+	/* 
+	 * Initializing the Tx round robin registers to 0.
 	 * Filling Tx and Rx round robin registers as per the 
 	 * number of FIFOs and Rings is still TODO.
 	 */
@@ -734,20 +870,13 @@
 	writeq(0, &bar0->tx_w_round_robin_3);
 	writeq(0, &bar0->tx_w_round_robin_4);
 
-	/* Disable Rx steering. Hard coding all packets be steered to
+	/* 
+	 * TODO
+	 * Disable Rx steering. Hard coding all packets be steered to
 	 * Queue 0 for now. 
-	 * TODO*/
-	if (rx_prio) {
-		u64 def = 0x8000000000000000ULL, tmp;
-		for (i = 0; i < MAX_RX_RINGS; i++) {
-			tmp = (u64) (def >> (i % config->RxRingNum));
-			val64 |= (u64) (tmp >> (i * 8));
-		}
-		writeq(val64, &bar0->rts_qos_steering);
-	} else {
-		val64 = 0x8080808080808080ULL;
-		writeq(val64, &bar0->rts_qos_steering);
-	}
+	 */
+	val64 = 0x8080808080808080ULL;
+	writeq(val64, &bar0->rts_qos_steering);
 
 	/* UDP Fix */
 	val64 = 0;
@@ -760,34 +889,40 @@
 
 	/* Enable statistics */
 	writeq(mac_control->stats_mem_phy, &bar0->stat_addr);
-	val64 = SET_UPDT_PERIOD(8) | STAT_CFG_STAT_RO | STAT_CFG_STAT_EN;
+	val64 = SET_UPDT_PERIOD(Stats_refresh_time) |
+	    STAT_CFG_STAT_RO | STAT_CFG_STAT_EN;
 	writeq(val64, &bar0->stat_cfg);
 
-	/* Initializing the sampling rate for the device to calculate the
+	/* 
+	 * Initializing the sampling rate for the device to calculate the
 	 * bandwidth utilization.
 	 */
-	val64 = MAC_TX_LINK_UTIL_VAL(0x5) | MAC_RX_LINK_UTIL_VAL(0x5);
+	val64 = MAC_TX_LINK_UTIL_VAL(tmac_util_period) |
+	    MAC_RX_LINK_UTIL_VAL(rmac_util_period);
 	writeq(val64, &bar0->mac_link_util);
 
 
-	/* Initializing the Transmit and Receive Traffic Interrupt 
+	/* 
+	 * Initializing the Transmit and Receive Traffic Interrupt 
 	 * Scheme.
 	 */
 	/* TTI Initialization */
 	val64 = TTI_DATA1_MEM_TX_TIMER_VAL(0xFFF) |
-	    TTI_DATA1_MEM_TX_URNG_A(0xA) | TTI_DATA1_MEM_TX_URNG_B(0x10) |
+	    TTI_DATA1_MEM_TX_URNG_A(0xA) |
+	    TTI_DATA1_MEM_TX_URNG_B(0x10) |
 	    TTI_DATA1_MEM_TX_URNG_C(0x30) | TTI_DATA1_MEM_TX_TIMER_AC_EN;
 	writeq(val64, &bar0->tti_data1_mem);
 
-	val64 =
-	    TTI_DATA2_MEM_TX_UFC_A(0x10) | TTI_DATA2_MEM_TX_UFC_B(0x20) |
+	val64 = TTI_DATA2_MEM_TX_UFC_A(0x10) |
+	    TTI_DATA2_MEM_TX_UFC_B(0x20) |
 	    TTI_DATA2_MEM_TX_UFC_C(0x40) | TTI_DATA2_MEM_TX_UFC_D(0x80);
 	writeq(val64, &bar0->tti_data2_mem);
 
 	val64 = TTI_CMD_MEM_WE | TTI_CMD_MEM_STROBE_NEW_CMD;
 	writeq(val64, &bar0->tti_command_mem);
 
-	/* Once the operation completes, the Strobe bit of the command
+	/* 
+	 * Once the operation completes, the Strobe bit of the command
 	 * register will be reset. We poll for this particular condition
 	 * We wait for a maximum of 500ms for the operation to complete,
 	 * if it's not complete by then we return error.
@@ -810,18 +945,22 @@
 
 	/* RTI Initialization */
 	val64 = RTI_DATA1_MEM_RX_TIMER_VAL(0xFFF) |
-	    RTI_DATA1_MEM_RX_URNG_A(0xA) | RTI_DATA1_MEM_RX_URNG_B(0x10) |
+	    RTI_DATA1_MEM_RX_URNG_A(0xA) |
+	    RTI_DATA1_MEM_RX_URNG_B(0x10) |
 	    RTI_DATA1_MEM_RX_URNG_C(0x30) | RTI_DATA1_MEM_RX_TIMER_AC_EN;
+
 	writeq(val64, &bar0->rti_data1_mem);
 
-	val64 = RTI_DATA2_MEM_RX_UFC_A(0x1) | RTI_DATA2_MEM_RX_UFC_B(0x2) |
+	val64 = RTI_DATA2_MEM_RX_UFC_A(0x1) |
+	    RTI_DATA2_MEM_RX_UFC_B(0x2) |
 	    RTI_DATA2_MEM_RX_UFC_C(0x40) | RTI_DATA2_MEM_RX_UFC_D(0x80);
 	writeq(val64, &bar0->rti_data2_mem);
 
 	val64 = RTI_CMD_MEM_WE | RTI_CMD_MEM_STROBE_NEW_CMD;
 	writeq(val64, &bar0->rti_command_mem);
 
-	/* Once the operation completes, the Strobe bit of the command
+	/* 
+	 * Once the operation completes, the Strobe bit of the command
 	 * register will be reset. We poll for this particular condition
 	 * We wait for a maximum of 500ms for the operation to complete,
 	 * if it's not complete by then we return error.
@@ -842,7 +981,8 @@
 		schedule_timeout(HZ / 20);
 	}
 
-	/* Initializing proper values as Pause threshold into all 
+	/* 
+	 * Initializing proper values as Pause threshold into all 
 	 * the 8 Queues on Rx side.
 	 */
 	writeq(0xffbbffbbffbbffbbULL, &bar0->mc_pause_thresh_q0q3);
@@ -858,22 +998,62 @@
 	writel((u32) (val64 >> 32), (add + 4));
 	val64 = readq(&bar0->mac_cfg);
 
+	/* 
+	 * Set the time value to be inserted in the pause frame 
+	 * generated by xena.
+	 */
+	val64 = readq(&bar0->rmac_pause_cfg);
+	val64 &= ~(RMAC_PAUSE_HG_PTIME(0xffff));
+	val64 |= RMAC_PAUSE_HG_PTIME(nic->mac_control.rmac_pause_time);
+	writeq(val64, &bar0->rmac_pause_cfg);
+
+	/* 
+	 * Set the Threshold Limit for Generating the pause frame
+	 * If the amount of data in any Queue exceeds ratio of
+	 * (mac_control.mc_pause_threshold_q0q3 or q4q7)/256
+	 * pause frame is generated
+	 */
+	val64 = 0;
+	for (i = 0; i < 4; i++) {
+		val64 |=
+		    (((u64) 0xFF00 | nic->mac_control.
+		      mc_pause_threshold_q0q3)
+		     << (i * 2 * 8));
+	}
+	writeq(val64, &bar0->mc_pause_thresh_q0q3);
+
+	val64 = 0;
+	for (i = 0; i < 4; i++) {
+		val64 |=
+		    (((u64) 0xFF00 | nic->mac_control.
+		      mc_pause_threshold_q4q7)
+		     << (i * 2 * 8));
+	}
+	writeq(val64, &bar0->mc_pause_thresh_q4q7);
+
+	/* 
+	 * TxDMA will stop Read request if the number of read split has 
+	 * exceeded the limit pointed by shared_splits
+	 */
+	val64 = readq(&bar0->pic_control);
+	val64 |= PIC_CNTL_SHARED_SPLITS(shared_splits);
+	writeq(val64, &bar0->pic_control);
+
 	return SUCCESS;
 }
 
-/*  
- *  Input Arguments: 
- *  device private variable,
- *  A mask indicating which Intr block must be modified and,
- *  A flag indicating whether to enable or disable the Intrs.
- *  Return Value: 
- *  NONE.
- *  Description: 
- *  This function will either disable or enable the interrupts 
+/**  
+ *  en_dis_able_nic_intrs - Enable or Disable the interrupts 
+ *  @nic: device private variable,
+ *  @mask: A mask indicating which Intr block must be modified and,
+ *  @flag: A flag indicating whether to enable or disable the Intrs.
+ *  Description: This function will either disable or enable the interrupts
  *  depending on the flag argument. The mask argument can be used to 
  *  enable/disable any Intr block. 
+ *  Return Value: NONE.
  */
-static void en_dis_able_NicIntrs(struct s2io_nic *nic, u16 mask, int flag)
+
+static void en_dis_able_nic_intrs(struct s2io_nic *nic, u16 mask, int flag)
 {
 	XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0;
 	register u64 val64 = 0, temp64 = 0;
@@ -887,15 +1067,20 @@
 			temp64 = readq(&bar0->general_int_mask);
 			temp64 &= ~((u64) val64);
 			writeq(temp64, &bar0->general_int_mask);
-			/*  Disabled all PCIX, Flash, MDIO, IIC and GPIO
-			 *  interrupts for now. 
-			 * TODO */
+			/*  
+			 * Disabled all PCIX, Flash, MDIO, IIC and GPIO
+			 * interrupts for now. 
+			 * TODO 
+			 */
 			writeq(DISABLE_ALL_INTRS, &bar0->pic_int_mask);
-			/*  No MSI Support is available presently, so TTI and
+			/* 
+			 * No MSI Support is available presently, so TTI and
 			 * RTI interrupts are also disabled.
 			 */
 		} else if (flag == DISABLE_INTRS) {
-			/*  Disable PIC Intrs in the general intr mask register 
+			/*  
+			 * Disable PIC Intrs in the general 
+			 * intr mask register 
 			 */
 			writeq(DISABLE_ALL_INTRS, &bar0->pic_int_mask);
 			temp64 = readq(&bar0->general_int_mask);
@@ -907,24 +1092,34 @@
 	/*  DMA Interrupts */
 	/*  Enabling/Disabling Tx DMA interrupts */
 	if (mask & TX_DMA_INTR) {
-		/*  Enable TxDMA Intrs in the general intr mask register */
+		/* Enable TxDMA Intrs in the general intr mask register */
 		val64 = TXDMA_INT_M;
 		if (flag == ENABLE_INTRS) {
 			temp64 = readq(&bar0->general_int_mask);
 			temp64 &= ~((u64) val64);
 			writeq(temp64, &bar0->general_int_mask);
-			/* Disable all interrupts other than PFC interrupt in 
-			 * DMA level.
+			/* 
+			 * Keep all interrupts other than PFC interrupt 
+			 * and PCC interrupt disabled in DMA level.
 			 */
-			val64 = DISABLE_ALL_INTRS & (~TXDMA_PFC_INT_M);
+			val64 = DISABLE_ALL_INTRS & ~(TXDMA_PFC_INT_M |
+						      TXDMA_PCC_INT_M);
 			writeq(val64, &bar0->txdma_int_mask);
-			/* Enable only the MISC error 1 interrupt in PFC block 
+			/* 
+			 * Enable only the MISC error 1 interrupt in PFC block 
 			 */
 			val64 = DISABLE_ALL_INTRS & (~PFC_MISC_ERR_1);
 			writeq(val64, &bar0->pfc_err_mask);
+			/* 
+			 * Enable only the FB_ECC error interrupt in PCC block 
+			 */
+			val64 = DISABLE_ALL_INTRS & (~PCC_FB_ECC_ERR);
+			writeq(val64, &bar0->pcc_err_mask);
 		} else if (flag == DISABLE_INTRS) {
-			/*  Disable TxDMA Intrs in the general intr mask 
-			 *  register */
+			/* 
+			 * Disable TxDMA Intrs in the general intr mask 
+			 * register 
+			 */
 			writeq(DISABLE_ALL_INTRS, &bar0->txdma_int_mask);
 			writeq(DISABLE_ALL_INTRS, &bar0->pfc_err_mask);
 			temp64 = readq(&bar0->general_int_mask);
@@ -941,12 +1136,16 @@
 			temp64 = readq(&bar0->general_int_mask);
 			temp64 &= ~((u64) val64);
 			writeq(temp64, &bar0->general_int_mask);
-			/* All RxDMA block interrupts are disabled for now 
-			 * TODO */
+			/* 
+			 * All RxDMA block interrupts are disabled for now 
+			 * TODO 
+			 */
 			writeq(DISABLE_ALL_INTRS, &bar0->rxdma_int_mask);
 		} else if (flag == DISABLE_INTRS) {
-			/*  Disable RxDMA Intrs in the general intr mask 
-			 *  register */
+			/*  
+			 * Disable RxDMA Intrs in the general intr mask 
+			 * register 
+			 */
 			writeq(DISABLE_ALL_INTRS, &bar0->rxdma_int_mask);
 			temp64 = readq(&bar0->general_int_mask);
 			val64 |= temp64;
@@ -962,9 +1161,11 @@
 			temp64 = readq(&bar0->general_int_mask);
 			temp64 &= ~((u64) val64);
 			writeq(temp64, &bar0->general_int_mask);
-			/* All MAC block error interrupts are disabled for now 
+			/* 
+			 * All MAC block error interrupts are disabled for now 
 			 * except the link status change interrupt.
-			 * TODO*/
+			 * TODO
+			 */
 			val64 = MAC_INT_STATUS_RMAC_INT;
 			temp64 = readq(&bar0->mac_int_mask);
 			temp64 &= ~((u64) val64);
@@ -974,7 +1175,8 @@
 			val64 &= ~((u64) RMAC_LINK_STATE_CHANGE_INT);
 			writeq(val64, &bar0->mac_rmac_err_mask);
 		} else if (flag == DISABLE_INTRS) {
-			/*  Disable MAC Intrs in the general intr mask register 
+			/*  
+			 * Disable MAC Intrs in the general intr mask register 
 			 */
 			writeq(DISABLE_ALL_INTRS, &bar0->mac_int_mask);
 			writeq(DISABLE_ALL_INTRS,
@@ -993,11 +1195,14 @@
 			temp64 = readq(&bar0->general_int_mask);
 			temp64 &= ~((u64) val64);
 			writeq(temp64, &bar0->general_int_mask);
-			/* All XGXS block error interrupts are disabled for now
-			 *  TODO */
+			/* 
+			 * All XGXS block error interrupts are disabled for now
+			 * TODO 
+			 */
 			writeq(DISABLE_ALL_INTRS, &bar0->xgxs_int_mask);
 		} else if (flag == DISABLE_INTRS) {
-			/*  Disable MC Intrs in the general intr mask register 
+			/*  
+			 * Disable MC Intrs in the general intr mask register 
 			 */
 			writeq(DISABLE_ALL_INTRS, &bar0->xgxs_int_mask);
 			temp64 = readq(&bar0->general_int_mask);
@@ -1013,11 +1218,14 @@
 			temp64 = readq(&bar0->general_int_mask);
 			temp64 &= ~((u64) val64);
 			writeq(temp64, &bar0->general_int_mask);
-			/* All MC block error interrupts are disabled for now
-			 * TODO */
+			/* 
+			 * All MC block error interrupts are disabled for now
+			 * TODO 
+			 */
 			writeq(DISABLE_ALL_INTRS, &bar0->mc_int_mask);
 		} else if (flag == DISABLE_INTRS) {
-			/*  Disable MC Intrs in the general intr mask register
+			/*
+			 * Disable MC Intrs in the general intr mask register
 			 */
 			writeq(DISABLE_ALL_INTRS, &bar0->mc_int_mask);
 			temp64 = readq(&bar0->general_int_mask);
@@ -1034,15 +1242,15 @@
 			temp64 = readq(&bar0->general_int_mask);
 			temp64 &= ~((u64) val64);
 			writeq(temp64, &bar0->general_int_mask);
-			/* Enable all the Tx side interrupts */
-			writeq(0x0, &bar0->tx_traffic_mask);	/* '0' Enables 
-								 * all 64 TX 
-								 * interrupt 
-								 * levels.
-								 */
+			/* 
+			 * Enable all the Tx side interrupts
+			 * writing 0 Enables all 64 TX interrupt levels 
+			 */
+			writeq(0x0, &bar0->tx_traffic_mask);
 		} else if (flag == DISABLE_INTRS) {
-			/*  Disable Tx Traffic Intrs in the general intr mask 
-			 *  register.
+			/* 
+			 * Disable Tx Traffic Intrs in the general intr mask 
+			 * register.
 			 */
 			writeq(DISABLE_ALL_INTRS, &bar0->tx_traffic_mask);
 			temp64 = readq(&bar0->general_int_mask);
@@ -1058,14 +1266,12 @@
 			temp64 = readq(&bar0->general_int_mask);
 			temp64 &= ~((u64) val64);
 			writeq(temp64, &bar0->general_int_mask);
-			writeq(0x0, &bar0->rx_traffic_mask);	/* '0' Enables 
-								 * all 8 RX 
-								 * interrupt 
-								 * levels.
-								 */
+			/* writing 0 Enables all 8 RX interrupt levels */
+			writeq(0x0, &bar0->rx_traffic_mask);
 		} else if (flag == DISABLE_INTRS) {
-			/*  Disable Rx Traffic Intrs in the general intr mask 
-			 *  register.
+			/*  
+			 * Disable Rx Traffic Intrs in the general intr mask 
+			 * register.
 			 */
 			writeq(DISABLE_ALL_INTRS, &bar0->rx_traffic_mask);
 			temp64 = readq(&bar0->general_int_mask);
@@ -1075,17 +1281,19 @@
 	}
 }
 
-/*  
- *  Input Arguments: 
- *   val64 - Value read from adapter status register.
- *   flag - indicates if the adapter enable bit was ever written once before.
- *  Return Value: 
- *   void.
- *  Description: 
- *   Returns whether the H/W is ready to go or not. Depending on whether 
- *   adapter enable bit was written or not the comparison differs and the 
- *   calling function passes the input argument flag to indicate this.
+/**  
+ *  verify_xena_quiescence - Checks whether the H/W is ready 
+ *  @val64 :  Value read from adapter status register.
+ *  @flag : indicates if the adapter enable bit was ever written once
+ *  before.
+ *  Description: Returns whether the H/W is ready to go or not. Depending
+ *  on whether adapter enable bit was written or not the comparison 
+ *  differs and the calling function passes the input argument flag to
+ *  indicate this.
+ *  Return: 1 If xena is quiescence 
+ *          0 If Xena is not quiescence
  */
+
 static int verify_xena_quiescence(u64 val64, int flag)
 {
 	int ret = 0;
@@ -1122,11 +1330,15 @@
 	return ret;
 }
 
-/* 
+/**
+ * fix_mac_address -  Fix for Mac addr problem on Alpha platforms
+ * @sp: Pointer to device specifc structure
+ * Description : 
  * New procedure to clear mac address reading  problems on Alpha platforms
  *
  */
-void FixMacAddress(nic_t * sp)
+
+void fix_mac_address(nic_t * sp)
 {
 	XENA_dev_config_t *bar0 = (XENA_dev_config_t *) sp->bar0;
 	u64 val64;
@@ -1138,19 +1350,20 @@
 	}
 }
 
-/*  
- *  Input Arguments: 
- *  device private variable.
- *  Return Value: 
- *  SUCCESS on success and -1 on failure.
+/**
+ *  start_nic - Turns the device on   
+ *  @nic : device private variable.
  *  Description: 
- *  This function actually turns the device on. Before this 
- *  function is called, all Registers are configured from their reset states 
+ *  This function actually turns the device on. Before this  function is 
+ *  called,all Registers are configured from their reset states 
  *  and shared memory is allocated but the NIC is still quiescent. On 
  *  calling this function, the device interrupts are cleared and the NIC is
  *  literally switched on by writing into the adapter control register.
+ *  Return Value: 
+ *  SUCCESS on success and -1 on failure.
  */
-static int startNic(struct s2io_nic *nic)
+
+static int start_nic(struct s2io_nic *nic)
 {
 	XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0;
 	struct net_device *dev = nic->dev;
@@ -1164,22 +1377,34 @@
 	config = &nic->config;
 
 	/*  PRC Initialization and configuration */
-	for (i = 0; i < config->RxRingNum; i++) {
+	for (i = 0; i < config->rx_ring_num; i++) {
 		writeq((u64) nic->rx_blocks[i][0].block_dma_addr,
 		       &bar0->prc_rxd0_n[i]);
 
 		val64 = readq(&bar0->prc_ctrl_n[i]);
+#ifndef CONFIG_2BUFF_MODE
 		val64 |= PRC_CTRL_RC_ENABLED;
+#else
+		val64 |= PRC_CTRL_RC_ENABLED | PRC_CTRL_RING_MODE_3;
+#endif
 		writeq(val64, &bar0->prc_ctrl_n[i]);
 	}
 
-	/* Enabling MC-RLDRAM. After enabling the device, we timeout
+#ifdef CONFIG_2BUFF_MODE
+	/* Enabling 2 buffer mode by writing into Rx_pa_cfg reg. */
+	val64 = readq(&bar0->rx_pa_cfg);
+	val64 |= RX_PA_CFG_IGNORE_L2_ERR;
+	writeq(val64, &bar0->rx_pa_cfg);
+#endif
+
+	/* 
+	 * Enabling MC-RLDRAM. After enabling the device, we timeout
 	 * for around 100ms, which is approximately the time required
 	 * for the device to be ready for operation.
 	 */
 	val64 = readq(&bar0->mc_rldram_mrs);
 	val64 |= MC_RLDRAM_QUEUE_SIZE_ENABLE | MC_RLDRAM_MRS_ENABLE;
-	writeq(val64, &bar0->mc_rldram_mrs);
+	SPECIAL_REG_WRITE(val64, &bar0->mc_rldram_mrs, UF);
 	val64 = readq(&bar0->mc_rldram_mrs);
 
 	set_current_state(TASK_UNINTERRUPTIBLE);
@@ -1190,14 +1415,16 @@
 	val64 &= ~ADAPTER_ECC_EN;
 	writeq(val64, &bar0->adapter_control);
 
-	/* Clearing any possible Link state change interrupts that 
+	/* 
+	 * Clearing any possible Link state change interrupts that 
 	 * could have popped up just before Enabling the card.
 	 */
 	val64 = readq(&bar0->mac_rmac_err_reg);
 	if (val64)
 		writeq(val64, &bar0->mac_rmac_err_reg);
 
-	/* Verify if the device is ready to be enabled, if so enable 
+	/* 
+	 * Verify if the device is ready to be enabled, if so enable 
 	 * it.
 	 */
 	val64 = readq(&bar0->adapter_status);
@@ -1211,9 +1438,10 @@
 	/*  Enable select interrupts */
 	interruptible = TX_TRAFFIC_INTR | RX_TRAFFIC_INTR | TX_MAC_INTR |
 	    RX_MAC_INTR;
-	en_dis_able_NicIntrs(nic, interruptible, ENABLE_INTRS);
+	en_dis_able_nic_intrs(nic, interruptible, ENABLE_INTRS);
 
-	/* With some switches, link might be already up at this point.
+	/* 
+	 * With some switches, link might be already up at this point.
 	 * Because of this weird behavior, when we enable laser, 
 	 * we may not get link. We need to handle this. We cannot 
 	 * figure out which switch is misbehaving. So we are forced to 
@@ -1236,86 +1464,84 @@
 	}
 
 	/* 
+	 * Don't see link state interrupts on certain switches, so 
+	 * directly scheduling a link state task from here.
+	 */
+	schedule_work(&nic->set_link_task);
+
+	/* 
 	 * Here we are performing soft reset on XGXS to 
 	 * force link down. Since link is already up, we will get
 	 * link state change interrupt after this reset
 	 */
-	writeq(0x8007051500000000ULL, &bar0->dtx_control);
+	SPECIAL_REG_WRITE(0x80010515001E0000ULL, &bar0->dtx_control, UF);
 	val64 = readq(&bar0->dtx_control);
-	writeq(0x80070515000000E0ULL, &bar0->dtx_control);
+	udelay(50);
+	SPECIAL_REG_WRITE(0x80010515001E00E0ULL, &bar0->dtx_control, UF);
 	val64 = readq(&bar0->dtx_control);
-	writeq(0x80070515001F00E4ULL, &bar0->dtx_control);
+	udelay(50);
+	SPECIAL_REG_WRITE(0x80070515001F00E4ULL, &bar0->dtx_control, UF);
 	val64 = readq(&bar0->dtx_control);
+	udelay(50);
 
 	return SUCCESS;
 }
 
-/*  
- *  Input Arguments: 
- *   nic - device private variable.
- *  Return Value: 
- *   void.
+/** 
+ *  free_tx_buffers - Free all queued Tx buffers 
+ *  @nic : device private variable.
  *  Description: 
- *   Free all queued Tx buffers.
- */
-void freeTxBuffers(struct s2io_nic *nic)
+ *  Free all queued Tx buffers.
+ *  Return Value: void 
+*/
+
+void free_tx_buffers(struct s2io_nic *nic)
 {
 	struct net_device *dev = nic->dev;
 	struct sk_buff *skb;
 	TxD_t *txdp;
 	int i, j;
-#if DEBUG_ON
-	int cnt = 0;
-#endif
 	mac_info_t *mac_control;
 	struct config_param *config;
+	int cnt = 0;
 
 	mac_control = &nic->mac_control;
 	config = &nic->config;
 
-	for (i = 0; i < config->TxFIFONum; i++) {
-		for (j = 0; j < config->TxCfg[i].FifoLen - 1; j++) {
-			txdp = mac_control->txdl_start[i] +
-			    (config->MaxTxDs * j);
-
-			if (!(txdp->Control_1 & TXD_LIST_OWN_XENA)) {
-				/* If owned by host, ignore */
-				continue;
-			}
+	for (i = 0; i < config->tx_fifo_num; i++) {
+		for (j = 0; j < config->tx_cfg[i].fifo_len - 1; j++) {
+			txdp = (TxD_t *) nic->list_info[i][j].
+			    list_virt_addr;
 			skb =
 			    (struct sk_buff *) ((unsigned long) txdp->
 						Host_Control);
 			if (skb == NULL) {
-				DBG_PRINT(ERR_DBG, "%s: NULL skb ",
-					  dev->name);
-				DBG_PRINT(ERR_DBG, "in Tx Int\n");
-				return;
+				memset(txdp, 0, sizeof(TxD_t));
+				continue;
 			}
-#if DEBUG_ON
-			cnt++;
-#endif
 			dev_kfree_skb(skb);
 			memset(txdp, 0, sizeof(TxD_t));
+			cnt++;
 		}
-#if DEBUG_ON
 		DBG_PRINT(INTR_DBG,
 			  "%s:forcibly freeing %d skbs on FIFO%d\n",
 			  dev->name, cnt, i);
-#endif
+		mac_control->tx_curr_get_info[i].offset = 0;
+		mac_control->tx_curr_put_info[i].offset = 0;
 	}
 }
 
-/*  
- *  Input Arguments: 
- *   nic - device private variable.
- *  Return Value: 
+/**  
+ *   stop_nic -  To stop the nic  
+ *   @nic ; device private variable.
+ *   Description: 
+ *   This function does exactly the opposite of what the start_nic() 
+ *   function does. This function is called to stop the device.
+ *   Return Value:
  *   void.
- *  Description: 
- *   This function does exactly the opposite of what the startNic() 
- *   function does. This function is called to stop 
- *   the device.
  */
-static void stopNic(struct s2io_nic *nic)
+
+static void stop_nic(struct s2io_nic *nic)
 {
 	XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0;
 	register u64 val64 = 0;
@@ -1326,24 +1552,23 @@
 	mac_control = &nic->mac_control;
 	config = &nic->config;
 
-/*  Disable all interrupts */
+	/*  Disable all interrupts */
 	interruptible = TX_TRAFFIC_INTR | RX_TRAFFIC_INTR | TX_MAC_INTR |
 	    RX_MAC_INTR;
-	en_dis_able_NicIntrs(nic, interruptible, DISABLE_INTRS);
+	en_dis_able_nic_intrs(nic, interruptible, DISABLE_INTRS);
 
-/*  Disable PRCs */
-	for (i = 0; i < config->RxRingNum; i++) {
+	/*  Disable PRCs */
+	for (i = 0; i < config->rx_ring_num; i++) {
 		val64 = readq(&bar0->prc_ctrl_n[i]);
 		val64 &= ~((u64) PRC_CTRL_RC_ENABLED);
 		writeq(val64, &bar0->prc_ctrl_n[i]);
 	}
 }
 
-/*  
- *  Input Arguments: 
- *  device private variable
- *  Return Value: 
- *  SUCCESS on success or an appropriate -ve value on failure.
+/**  
+ *  fill_rx_buffers - Allocates the Rx side skbs 
+ *  @nic:  device private variable
+ *  @ring_no: ring number 
  *  Description: 
  *  The function allocates Rx side skbs and puts the physical
  *  address of these buffers into the RxD buffer pointers, so that the NIC
@@ -1354,9 +1579,13 @@
  *  3. Five buffer modes.
  *  Each mode defines how many fragments the received frame will be split 
  *  up into by the NIC. The frame is split into L3 header, L4 Header, 
- *  L4 payload in three buffer mode and in 5 buffer mode, L4 payload itself 
- *  is split into 3 fragments. As of now only single buffer mode is supported.
+ *  L4 payload in three buffer mode and in 5 buffer mode, L4 payload itself
+ *  is split into 3 fragments. As of now only single buffer mode is
+ *  supported.
+ *   Return Value:
+ *  SUCCESS on success or an appropriate -ve value on failure.
  */
+
 int fill_rx_buffers(struct s2io_nic *nic, int ring_no)
 {
 	struct net_device *dev = nic->dev;
@@ -1369,19 +1598,22 @@
 	    atomic_read(&nic->rx_bufs_left[ring_no]);
 	mac_info_t *mac_control;
 	struct config_param *config;
+#ifdef CONFIG_2BUFF_MODE
+	RxD_t *rxdpnext;
+	int nextblk;
+	u64 tmp;
+	buffAdd_t *ba;
+	dma_addr_t rxdpphys;
+#endif
+#ifndef CONFIG_S2IO_NAPI
+	unsigned long flags;
+#endif
 
 	mac_control = &nic->mac_control;
 	config = &nic->config;
 
-	if (frame_len[ring_no]) {
-		if (frame_len[ring_no] > dev->mtu)
-			dev->mtu = frame_len[ring_no];
-		size = frame_len[ring_no] + HEADER_ETHERNET_II_802_3_SIZE +
-		    HEADER_802_2_SIZE + HEADER_SNAP_SIZE;
-	} else {
-		size = dev->mtu + HEADER_ETHERNET_II_802_3_SIZE +
-		    HEADER_802_2_SIZE + HEADER_SNAP_SIZE;
-	}
+	size = dev->mtu + HEADER_ETHERNET_II_802_3_SIZE +
+	    HEADER_802_2_SIZE + HEADER_SNAP_SIZE;
 
 	while (alloc_tab < alloc_cnt) {
 		block_no = mac_control->rx_curr_put_info[ring_no].
@@ -1390,8 +1622,13 @@
 		    block_index;
 		off = mac_control->rx_curr_put_info[ring_no].offset;
 		off1 = mac_control->rx_curr_get_info[ring_no].offset;
+#ifndef CONFIG_2BUFF_MODE
 		offset = block_no * (MAX_RXDS_PER_BLOCK + 1) + off;
 		offset1 = block_no1 * (MAX_RXDS_PER_BLOCK + 1) + off1;
+#else
+		offset = block_no * (MAX_RXDS_PER_BLOCK) + off;
+		offset1 = block_no1 * (MAX_RXDS_PER_BLOCK) + off1;
+#endif
 
 		rxdp = nic->rx_blocks[ring_no][block_no].
 		    block_virt_addr + off;
@@ -1400,7 +1637,7 @@
 			DBG_PRINT(INTR_DBG, " info equated\n");
 			goto end;
 		}
-
+#ifndef	CONFIG_2BUFF_MODE
 		if (rxdp->Control_1 == END_OF_BLOCK) {
 			mac_control->rx_curr_put_info[ring_no].
 			    block_index++;
@@ -1412,25 +1649,86 @@
 			off %= (MAX_RXDS_PER_BLOCK + 1);
 			mac_control->rx_curr_put_info[ring_no].offset =
 			    off;
-			/*rxdp = nic->rx_blocks[ring_no][block_no].
-			   block_virt_addr + off; */
 			rxdp = (RxD_t *) ((unsigned long) rxdp->Control_2);
 			DBG_PRINT(INTR_DBG, "%s: Next block at: %p\n",
 				  dev->name, rxdp);
 		}
+#ifndef CONFIG_S2IO_NAPI
+		spin_lock_irqsave(&nic->put_lock, flags);
+		nic->put_pos[ring_no] =
+		    (block_no * (MAX_RXDS_PER_BLOCK + 1)) + off;
+		spin_unlock_irqrestore(&nic->put_lock, flags);
+#endif
+#else
+		if (rxdp->Host_Control == END_OF_BLOCK) {
+			mac_control->rx_curr_put_info[ring_no].
+			    block_index++;
+			mac_control->rx_curr_put_info[ring_no].
+			    block_index %= nic->block_count[ring_no];
+			block_no = mac_control->rx_curr_put_info
+			    [ring_no].block_index;
+			off = 0;
+			DBG_PRINT(INTR_DBG, "%s: block%d at: 0x%llx\n",
+				  dev->name, block_no,
+				  (unsigned long long) rxdp->Control_1);
+			mac_control->rx_curr_put_info[ring_no].offset =
+			    off;
+			rxdp = nic->rx_blocks[ring_no][block_no].
+			    block_virt_addr;
+		}
+#ifndef CONFIG_S2IO_NAPI
+		spin_lock_irqsave(&nic->put_lock, flags);
+		nic->put_pos[ring_no] = (block_no *
+					 (MAX_RXDS_PER_BLOCK + 1)) + off;
+		spin_unlock_irqrestore(&nic->put_lock, flags);
+#endif
+#endif
 
-		if (rxdp->Control_1 & RXD_OWN_XENA) {
+#ifndef	CONFIG_2BUFF_MODE
+		if (rxdp->Control_1 & RXD_OWN_XENA)
+#else
+		if (rxdp->Control_2 & BIT(0))
+#endif
+		{
 			mac_control->rx_curr_put_info[ring_no].
 			    offset = off;
 			goto end;
 		}
+#ifdef	CONFIG_2BUFF_MODE
+		/* 
+		 * RxDs Spanning cache lines will be replenished only 
+		 * if the succeeding RxD is also owned by Host. It 
+		 * will always be the ((8*i)+3) and ((8*i)+6) 
+		 * descriptors for the 48 byte descriptor. The offending 
+		 * decsriptor is of-course the 3rd descriptor.
+		 */
+		rxdpphys = nic->rx_blocks[ring_no][block_no].
+		    block_dma_addr + (off * sizeof(RxD_t));
+		if (((u64) (rxdpphys)) % 128 > 80) {
+			rxdpnext = nic->rx_blocks[ring_no][block_no].
+			    block_virt_addr + (off + 1);
+			if (rxdpnext->Host_Control == END_OF_BLOCK) {
+				nextblk = (block_no + 1) %
+				    (nic->block_count[ring_no]);
+				rxdpnext = nic->rx_blocks[ring_no]
+				    [nextblk].block_virt_addr;
+			}
+			if (rxdpnext->Control_2 & BIT(0))
+				goto end;
+		}
+#endif
 
+#ifndef	CONFIG_2BUFF_MODE
 		skb = dev_alloc_skb(size + NET_IP_ALIGN);
+#else
+		skb = dev_alloc_skb(dev->mtu + ALIGN_SIZE + BUF0_LEN + 4);
+#endif
 		if (!skb) {
 			DBG_PRINT(ERR_DBG, "%s: Out of ", dev->name);
 			DBG_PRINT(ERR_DBG, "memory to allocate SKBs\n");
 			return -ENOMEM;
 		}
+#ifndef	CONFIG_2BUFF_MODE
 		skb_reserve(skb, NET_IP_ALIGN);
 		memset(rxdp, 0, sizeof(RxD_t));
 		rxdp->Buffer0_ptr = pci_map_single
@@ -1442,6 +1740,35 @@
 		off++;
 		off %= (MAX_RXDS_PER_BLOCK + 1);
 		mac_control->rx_curr_put_info[ring_no].offset = off;
+#else
+		ba = &nic->ba[ring_no][block_no][off];
+		skb_reserve(skb, BUF0_LEN);
+		tmp = (u64) skb->data;
+		tmp += ALIGN_SIZE;
+		tmp &= ~ALIGN_SIZE;
+		skb->data = (void *) tmp;
+		skb->tail = (void *) tmp;
+
+		memset(rxdp, 0, sizeof(RxD_t));
+		rxdp->Buffer2_ptr = pci_map_single
+		    (nic->pdev, skb->data, dev->mtu + BUF0_LEN + 4,
+		     PCI_DMA_FROMDEVICE);
+		rxdp->Buffer0_ptr =
+		    pci_map_single(nic->pdev, ba->ba_0, BUF0_LEN,
+				   PCI_DMA_FROMDEVICE);
+		rxdp->Buffer1_ptr =
+		    pci_map_single(nic->pdev, ba->ba_1, BUF1_LEN,
+				   PCI_DMA_FROMDEVICE);
+
+		rxdp->Control_2 = SET_BUFFER2_SIZE(dev->mtu + 4);
+		rxdp->Control_2 |= SET_BUFFER0_SIZE(BUF0_LEN);
+		rxdp->Control_2 |= SET_BUFFER1_SIZE(1);	/* dummy. */
+		rxdp->Control_2 |= BIT(0);	/* Set Buffer_Empty bit. */
+		rxdp->Host_Control = (u64) ((unsigned long) (skb));
+		rxdp->Control_1 |= RXD_OWN_XENA;
+		off++;
+		mac_control->rx_curr_put_info[ring_no].offset = off;
+#endif
 		atomic_inc(&nic->rx_bufs_left[ring_no]);
 		alloc_tab++;
 	}
@@ -1450,15 +1777,16 @@
 	return SUCCESS;
 }
 
-/*  
- *  Input Arguments: 
- *  device private variable.
- *  Return Value: 
- *  NONE.
+/**
+ *  free_rx_buffers - Frees all Rx buffers   
+ *  @sp: device private variable.
  *  Description: 
  *  This function will free all Rx buffers allocated by host.
+ *  Return Value:
+ *  NONE.
  */
-static void freeRxBuffers(struct s2io_nic *sp)
+
+static void free_rx_buffers(struct s2io_nic *sp)
 {
 	struct net_device *dev = sp->dev;
 	int i, j, blk = 0, off, buf_cnt = 0;
@@ -1466,15 +1794,19 @@
 	struct sk_buff *skb;
 	mac_info_t *mac_control;
 	struct config_param *config;
+#ifdef CONFIG_2BUFF_MODE
+	buffAdd_t *ba;
+#endif
 
 	mac_control = &sp->mac_control;
 	config = &sp->config;
 
-	for (i = 0; i < config->RxRingNum; i++) {
-		for (j = 0, blk = 0; j < config->RxCfg[i].NumRxd; j++) {
+	for (i = 0; i < config->rx_ring_num; i++) {
+		for (j = 0, blk = 0; j < config->rx_cfg[i].num_rxd; j++) {
 			off = j % (MAX_RXDS_PER_BLOCK + 1);
 			rxdp = sp->rx_blocks[i][blk].block_virt_addr + off;
 
+#ifndef CONFIG_2BUFF_MODE
 			if (rxdp->Control_1 == END_OF_BLOCK) {
 				rxdp =
 				    (RxD_t *) ((unsigned long) rxdp->
@@ -1482,11 +1814,23 @@
 				j++;
 				blk++;
 			}
+#else
+			if (rxdp->Host_Control == END_OF_BLOCK) {
+				blk++;
+				continue;
+			}
+#endif
+
+			if (!(rxdp->Control_1 & RXD_OWN_XENA)) {
+				memset(rxdp, 0, sizeof(RxD_t));
+				continue;
+			}
 
 			skb =
 			    (struct sk_buff *) ((unsigned long) rxdp->
 						Host_Control);
 			if (skb) {
+#ifndef CONFIG_2BUFF_MODE
 				pci_unmap_single(sp->pdev, (dma_addr_t)
 						 rxdp->Buffer0_ptr,
 						 dev->mtu +
@@ -1494,6 +1838,21 @@
 						 + HEADER_802_2_SIZE +
 						 HEADER_SNAP_SIZE,
 						 PCI_DMA_FROMDEVICE);
+#else
+				ba = &sp->ba[i][blk][off];
+				pci_unmap_single(sp->pdev, (dma_addr_t)
+						 rxdp->Buffer0_ptr,
+						 BUF0_LEN,
+						 PCI_DMA_FROMDEVICE);
+				pci_unmap_single(sp->pdev, (dma_addr_t)
+						 rxdp->Buffer1_ptr,
+						 BUF1_LEN,
+						 PCI_DMA_FROMDEVICE);
+				pci_unmap_single(sp->pdev, (dma_addr_t)
+						 rxdp->Buffer2_ptr,
+						 dev->mtu + BUF0_LEN + 4,
+						 PCI_DMA_FROMDEVICE);
+#endif
 				dev_kfree_skb(skb);
 				atomic_dec(&sp->rx_bufs_left[i]);
 				buf_cnt++;
@@ -1510,18 +1869,19 @@
 	}
 }
 
-/*
- *  Input Argument: 
- *   dev - pointer to the device structure.
- *   budget - The number of packets that were budgeted to be processed during
- *   one pass through the 'Poll" function.
- *  Return value:
- *   0 on success and 1 if there are No Rx packets to be processed.
- *  Description:
- *   Comes into picture only if NAPI support has been incorporated. It does
- *   the same thing that rxIntrHandler does, but not in a interrupt context
- *   also It will process only a given number of packets.
+/**
+ * s2io_poll - Rx interrupt handler for NAPI support
+ * @dev : pointer to the device structure.
+ * @budget : The number of packets that were budgeted to be processed 
+ * during  one pass through the 'Poll" function.
+ * Description:
+ * Comes into picture only if NAPI support has been incorporated. It does
+ * the same thing that rx_intr_handler does, but not in a interrupt context
+ * also It will process only a given number of packets.
+ * Return value:
+ * 0 on success and 1 if there are No Rx packets to be processed.
  */
+
 #ifdef CONFIG_S2IO_NAPI
 static int s2io_poll(struct net_device *dev, int *budget)
 {
@@ -1529,13 +1889,18 @@
 	XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0;
 	int pkts_to_process = *budget, pkt_cnt = 0;
 	register u64 val64 = 0;
-	rx_curr_get_info_t offset_info;
-	int i, block_no;
+	rx_curr_get_info_t get_info, put_info;
+	int i, get_block, put_block, get_offset, put_offset, ring_bufs;
+#ifndef CONFIG_2BUFF_MODE
 	u16 val16, cksum;
+#endif
 	struct sk_buff *skb;
 	RxD_t *rxdp;
 	mac_info_t *mac_control;
 	struct config_param *config;
+#ifdef CONFIG_2BUFF_MODE
+	buffAdd_t *ba;
+#endif
 
 	mac_control = &nic->mac_control;
 	config = &nic->config;
@@ -1546,30 +1911,42 @@
 	val64 = readq(&bar0->rx_traffic_int);
 	writeq(val64, &bar0->rx_traffic_int);
 
-	for (i = 0; i < config->RxRingNum; i++) {
-		if (--pkts_to_process < 0) {
-			goto no_rx;
-		}
-		offset_info = mac_control->rx_curr_get_info[i];
-		block_no = offset_info.block_index;
-		rxdp = nic->rx_blocks[i][block_no].block_virt_addr +
-		    offset_info.offset;
-		while (!(rxdp->Control_1 & RXD_OWN_XENA)) {
+	for (i = 0; i < config->rx_ring_num; i++) {
+		get_info = mac_control->rx_curr_get_info[i];
+		get_block = get_info.block_index;
+		put_info = mac_control->rx_curr_put_info[i];
+		put_block = put_info.block_index;
+		ring_bufs = config->rx_cfg[i].num_rxd;
+		rxdp = nic->rx_blocks[i][get_block].block_virt_addr +
+		    get_info.offset;
+#ifndef	CONFIG_2BUFF_MODE
+		get_offset = (get_block * (MAX_RXDS_PER_BLOCK + 1)) +
+		    get_info.offset;
+		put_offset = (put_block * (MAX_RXDS_PER_BLOCK + 1)) +
+		    put_info.offset;
+		while ((!(rxdp->Control_1 & RXD_OWN_XENA)) &&
+		       (((get_offset + 1) % ring_bufs) != put_offset)) {
+			if (--pkts_to_process < 0) {
+				goto no_rx;
+			}
 			if (rxdp->Control_1 == END_OF_BLOCK) {
 				rxdp =
 				    (RxD_t *) ((unsigned long) rxdp->
 					       Control_2);
-				offset_info.offset++;
-				offset_info.offset %=
+				get_info.offset++;
+				get_info.offset %=
 				    (MAX_RXDS_PER_BLOCK + 1);
-				block_no++;
-				block_no %= nic->block_count[i];
+				get_block++;
+				get_block %= nic->block_count[i];
 				mac_control->rx_curr_get_info[i].
-				    offset = offset_info.offset;
+				    offset = get_info.offset;
 				mac_control->rx_curr_get_info[i].
-				    block_index = block_no;
+				    block_index = get_block;
 				continue;
 			}
+			get_offset =
+			    (get_block * (MAX_RXDS_PER_BLOCK + 1)) +
+			    get_info.offset;
 			skb =
 			    (struct sk_buff *) ((unsigned long) rxdp->
 						Host_Control);
@@ -1577,7 +1954,7 @@
 				DBG_PRINT(ERR_DBG, "%s: The skb is ",
 					  dev->name);
 				DBG_PRINT(ERR_DBG, "Null in Rx Intr\n");
-				return 0;
+				goto no_rx;
 			}
 			val64 = RXD_GET_BUFFER0_SIZE(rxdp->Control_2);
 			val16 = (u16) (val64 >> 48);
@@ -1589,97 +1966,184 @@
 					 HEADER_802_2_SIZE +
 					 HEADER_SNAP_SIZE,
 					 PCI_DMA_FROMDEVICE);
-			rxOsmHandler(nic, val16, rxdp, i);
+			rx_osm_handler(nic, val16, rxdp, i);
 			pkt_cnt++;
-			offset_info.offset++;
-			offset_info.offset %= (MAX_RXDS_PER_BLOCK + 1);
+			get_info.offset++;
+			get_info.offset %= (MAX_RXDS_PER_BLOCK + 1);
 			rxdp =
-			    nic->rx_blocks[i][block_no].block_virt_addr +
-			    offset_info.offset;
+			    nic->rx_blocks[i][get_block].block_virt_addr +
+			    get_info.offset;
 			mac_control->rx_curr_get_info[i].offset =
-			    offset_info.offset;
+			    get_info.offset;
 		}
+#else
+		get_offset = (get_block * (MAX_RXDS_PER_BLOCK + 1)) +
+		    get_info.offset;
+		put_offset = (put_block * (MAX_RXDS_PER_BLOCK + 1)) +
+		    put_info.offset;
+		while (((!(rxdp->Control_1 & RXD_OWN_XENA)) &&
+			!(rxdp->Control_2 & BIT(0))) &&
+		       (((get_offset + 1) % ring_bufs) != put_offset)) {
+			if (--pkts_to_process < 0) {
+				goto no_rx;
+			}
+			skb = (struct sk_buff *) ((unsigned long)
+						  rxdp->Host_Control);
+			if (skb == NULL) {
+				DBG_PRINT(ERR_DBG, "%s: The skb is ",
+					  dev->name);
+				DBG_PRINT(ERR_DBG, "Null in Rx Intr\n");
+				goto no_rx;
+			}
+
+			pci_unmap_single(nic->pdev, (dma_addr_t)
+					 rxdp->Buffer0_ptr,
+					 BUF0_LEN, PCI_DMA_FROMDEVICE);
+			pci_unmap_single(nic->pdev, (dma_addr_t)
+					 rxdp->Buffer1_ptr,
+					 BUF1_LEN, PCI_DMA_FROMDEVICE);
+			pci_unmap_single(nic->pdev, (dma_addr_t)
+					 rxdp->Buffer2_ptr,
+					 dev->mtu + BUF0_LEN + 4,
+					 PCI_DMA_FROMDEVICE);
+			ba = &nic->ba[i][get_block][get_info.offset];
+
+			rx_osm_handler(nic, rxdp, i, ba);
+
+			get_info.offset++;
+			mac_control->rx_curr_get_info[i].offset =
+			    get_info.offset;
+			rxdp =
+			    nic->rx_blocks[i][get_block].block_virt_addr +
+			    get_info.offset;
+
+			if (get_info.offset &&
+			    (!(get_info.offset % MAX_RXDS_PER_BLOCK))) {
+				get_info.offset = 0;
+				mac_control->rx_curr_get_info[i].
+				    offset = get_info.offset;
+				get_block++;
+				get_block %= nic->block_count[i];
+				mac_control->rx_curr_get_info[i].
+				    block_index = get_block;
+				rxdp =
+				    nic->rx_blocks[i][get_block].
+				    block_virt_addr;
+			}
+			get_offset =
+			    (get_block * (MAX_RXDS_PER_BLOCK + 1)) +
+			    get_info.offset;
+			pkt_cnt++;
+		}
+#endif
 	}
 	if (!pkt_cnt)
 		pkt_cnt = 1;
 
-	for (i = 0; i < config->RxRingNum; i++)
-		fill_rx_buffers(nic, i);
-
 	dev->quota -= pkt_cnt;
 	*budget -= pkt_cnt;
 	netif_rx_complete(dev);
 
-/* Re enable the Rx interrupts. */
-	en_dis_able_NicIntrs(nic, RX_TRAFFIC_INTR, ENABLE_INTRS);
+	for (i = 0; i < config->rx_ring_num; i++) {
+		if (fill_rx_buffers(nic, i) == -ENOMEM) {
+			DBG_PRINT(ERR_DBG, "%s:Out of memory", dev->name);
+			DBG_PRINT(ERR_DBG, " in Rx Poll!!\n");
+			break;
+		}
+	}
+	/* Re enable the Rx interrupts. */
+	en_dis_able_nic_intrs(nic, RX_TRAFFIC_INTR, ENABLE_INTRS);
 	return 0;
 
       no_rx:
-	for (i = 0; i < config->RxRingNum; i++)
-		fill_rx_buffers(nic, i);
 	dev->quota -= pkt_cnt;
 	*budget -= pkt_cnt;
+
+	for (i = 0; i < config->rx_ring_num; i++) {
+		if (fill_rx_buffers(nic, i) == -ENOMEM) {
+			DBG_PRINT(ERR_DBG, "%s:Out of memory", dev->name);
+			DBG_PRINT(ERR_DBG, " in Rx Poll!!\n");
+			break;
+		}
+	}
 	return 1;
 }
 #else
-/*  
- *  Input Arguments: 
- *  device private variable.
- *  Return Value: 
- *  NONE.
+/**  
+ *  rx_intr_handler - Rx interrupt handler
+ *  @nic: device private variable.
  *  Description: 
- * If the interrupt is because of a received frame or if the 
- *  receive ring contains fresh as yet un-processed frames, this function is
+ *  If the interrupt is because of a received frame or if the 
+ *  receive ring contains fresh as yet un-processed frames,this function is
  *  called. It picks out the RxD at which place the last Rx processing had 
  *  stopped and sends the skb to the OSM's Rx handler and then increments 
  *  the offset.
+ *  Return Value:
+ *  NONE.
  */
-static void rxIntrHandler(struct s2io_nic *nic)
+
+static void rx_intr_handler(struct s2io_nic *nic)
 {
 	struct net_device *dev = (struct net_device *) nic->dev;
 	XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0;
-	rx_curr_get_info_t offset_info;
+	rx_curr_get_info_t get_info, put_info;
 	RxD_t *rxdp;
 	struct sk_buff *skb;
+#ifndef CONFIG_2BUFF_MODE
 	u16 val16, cksum;
+#endif
 	register u64 val64 = 0;
-	int i, block_no;
+	int get_block, get_offset, put_block, put_offset, ring_bufs;
+	int i, pkt_cnt = 0;
 	mac_info_t *mac_control;
 	struct config_param *config;
+#ifdef CONFIG_2BUFF_MODE
+	buffAdd_t *ba;
+#endif
 
 	mac_control = &nic->mac_control;
 	config = &nic->config;
 
-#if DEBUG_ON
-	nic->rxint_cnt++;
-#endif
-
-/* rx_traffic_int reg is an R1 register, hence we read and write back 
- * the samevalue in the register to clear it.
- */
+	/* 
+	 * rx_traffic_int reg is an R1 register, hence we read and write back 
+	 * the samevalue in the register to clear it.
+	 */
 	val64 = readq(&bar0->rx_traffic_int);
 	writeq(val64, &bar0->rx_traffic_int);
 
-	for (i = 0; i < config->RxRingNum; i++) {
-		offset_info = mac_control->rx_curr_get_info[i];
-		block_no = offset_info.block_index;
-		rxdp = nic->rx_blocks[i][block_no].block_virt_addr +
-		    offset_info.offset;
-		while (!(rxdp->Control_1 & RXD_OWN_XENA)) {
+	for (i = 0; i < config->rx_ring_num; i++) {
+		get_info = mac_control->rx_curr_get_info[i];
+		get_block = get_info.block_index;
+		put_info = mac_control->rx_curr_put_info[i];
+		put_block = put_info.block_index;
+		ring_bufs = config->rx_cfg[i].num_rxd;
+		rxdp = nic->rx_blocks[i][get_block].block_virt_addr +
+		    get_info.offset;
+#ifndef	CONFIG_2BUFF_MODE
+		get_offset = (get_block * (MAX_RXDS_PER_BLOCK + 1)) +
+		    get_info.offset;
+		spin_lock(&nic->put_lock);
+		put_offset = nic->put_pos[i];
+		spin_unlock(&nic->put_lock);
+		while ((!(rxdp->Control_1 & RXD_OWN_XENA)) &&
+		       (((get_offset + 1) % ring_bufs) != put_offset)) {
 			if (rxdp->Control_1 == END_OF_BLOCK) {
 				rxdp = (RxD_t *) ((unsigned long)
 						  rxdp->Control_2);
-				offset_info.offset++;
-				offset_info.offset %=
+				get_info.offset++;
+				get_info.offset %=
 				    (MAX_RXDS_PER_BLOCK + 1);
-				block_no++;
-				block_no %= nic->block_count[i];
+				get_block++;
+				get_block %= nic->block_count[i];
 				mac_control->rx_curr_get_info[i].
-				    offset = offset_info.offset;
+				    offset = get_info.offset;
 				mac_control->rx_curr_get_info[i].
-				    block_index = block_no;
+				    block_index = get_block;
 				continue;
 			}
+			get_offset =
+			    (get_block * (MAX_RXDS_PER_BLOCK + 1)) +
+			    get_info.offset;
 			skb = (struct sk_buff *) ((unsigned long)
 						  rxdp->Host_Control);
 			if (skb == NULL) {
@@ -1698,35 +2162,102 @@
 					 HEADER_802_2_SIZE +
 					 HEADER_SNAP_SIZE,
 					 PCI_DMA_FROMDEVICE);
-			rxOsmHandler(nic, val16, rxdp, i);
-			offset_info.offset++;
-			offset_info.offset %= (MAX_RXDS_PER_BLOCK + 1);
+			rx_osm_handler(nic, val16, rxdp, i);
+			get_info.offset++;
+			get_info.offset %= (MAX_RXDS_PER_BLOCK + 1);
 			rxdp =
-			    nic->rx_blocks[i][block_no].block_virt_addr +
-			    offset_info.offset;
+			    nic->rx_blocks[i][get_block].block_virt_addr +
+			    get_info.offset;
+			mac_control->rx_curr_get_info[i].offset =
+			    get_info.offset;
+			pkt_cnt++;
+			if ((indicate_max_pkts)
+			    && (pkt_cnt > indicate_max_pkts))
+				break;
+		}
+#else
+		get_offset = (get_block * (MAX_RXDS_PER_BLOCK + 1)) +
+		    get_info.offset;
+		spin_lock(&nic->put_lock);
+		put_offset = nic->put_pos[i];
+		spin_unlock(&nic->put_lock);
+		while (((!(rxdp->Control_1 & RXD_OWN_XENA)) &&
+			!(rxdp->Control_2 & BIT(0))) &&
+		       (((get_offset + 1) % ring_bufs) != put_offset)) {
+			skb = (struct sk_buff *) ((unsigned long)
+						  rxdp->Host_Control);
+			if (skb == NULL) {
+				DBG_PRINT(ERR_DBG, "%s: The skb is ",
+					  dev->name);
+				DBG_PRINT(ERR_DBG, "Null in Rx Intr\n");
+				return;
+			}
+
+			pci_unmap_single(nic->pdev, (dma_addr_t)
+					 rxdp->Buffer0_ptr,
+					 BUF0_LEN, PCI_DMA_FROMDEVICE);
+			pci_unmap_single(nic->pdev, (dma_addr_t)
+					 rxdp->Buffer1_ptr,
+					 BUF1_LEN, PCI_DMA_FROMDEVICE);
+			pci_unmap_single(nic->pdev, (dma_addr_t)
+					 rxdp->Buffer2_ptr,
+					 dev->mtu + BUF0_LEN + 4,
+					 PCI_DMA_FROMDEVICE);
+			ba = &nic->ba[i][get_block][get_info.offset];
+
+			rx_osm_handler(nic, rxdp, i, ba);
+
+			get_info.offset++;
 			mac_control->rx_curr_get_info[i].offset =
-			    offset_info.offset;
+			    get_info.offset;
+			rxdp =
+			    nic->rx_blocks[i][get_block].block_virt_addr +
+			    get_info.offset;
+
+			if (get_info.offset &&
+			    (!(get_info.offset % MAX_RXDS_PER_BLOCK))) {
+				get_info.offset = 0;
+				mac_control->rx_curr_get_info[i].
+				    offset = get_info.offset;
+				get_block++;
+				get_block %= nic->block_count[i];
+				mac_control->rx_curr_get_info[i].
+				    block_index = get_block;
+				rxdp =
+				    nic->rx_blocks[i][get_block].
+				    block_virt_addr;
+			}
+			get_offset =
+			    (get_block * (MAX_RXDS_PER_BLOCK + 1)) +
+			    get_info.offset;
+			pkt_cnt++;
+			if ((indicate_max_pkts)
+			    && (pkt_cnt > indicate_max_pkts))
+				break;
 		}
+#endif
+		if ((indicate_max_pkts) && (pkt_cnt > indicate_max_pkts))
+			break;
 	}
 }
 #endif
-
-/*  
- *  Input Arguments: 
- *  device private variable
- *  Return Value: 
- *  NONE
+/**  
+ *  tx_intr_handler - Transmit interrupt handler
+ *  @nic : device private variable
  *  Description: 
  *  If an interrupt was raised to indicate DMA complete of the 
- *  Tx packet, this function is called. It identifies the last TxD whose buffer
- *  was freed and frees all skbs whose data have already DMA'ed into the NICs
- *  internal memory.
+ *  Tx packet, this function is called. It identifies the last TxD 
+ *  whose buffer was freed and frees all skbs whose data have already 
+ *  DMA'ed into the NICs internal memory.
+ *  Return Value:
+ *  NONE
  */
-static void txIntrHandler(struct s2io_nic *nic)
+
+static void tx_intr_handler(struct s2io_nic *nic)
 {
 	XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0;
 	struct net_device *dev = (struct net_device *) nic->dev;
-	tx_curr_get_info_t offset_info, offset_info1;
+	tx_curr_get_info_t get_info, put_info;
 	struct sk_buff *skb;
 	TxD_t *txdlp;
 	register u64 val64 = 0;
@@ -1734,27 +2265,24 @@
 	u16 j, frg_cnt;
 	mac_info_t *mac_control;
 	struct config_param *config;
-#if DEBUG_ON
-	int cnt = 0;
-	nic->txint_cnt++;
-#endif
 
 	mac_control = &nic->mac_control;
 	config = &nic->config;
 
-	/* tx_traffic_int reg is an R1 register, hence we read and write 
+	/* 
+	 * tx_traffic_int reg is an R1 register, hence we read and write 
 	 * back the samevalue in the register to clear it.
 	 */
 	val64 = readq(&bar0->tx_traffic_int);
 	writeq(val64, &bar0->tx_traffic_int);
 
-	for (i = 0; i < config->TxFIFONum; i++) {
-		offset_info = mac_control->tx_curr_get_info[i];
-		offset_info1 = mac_control->tx_curr_put_info[i];
-		txdlp = mac_control->txdl_start[i] +
-		    (config->MaxTxDs * offset_info.offset);
+	for (i = 0; i < config->tx_fifo_num; i++) {
+		get_info = mac_control->tx_curr_get_info[i];
+		put_info = mac_control->tx_curr_put_info[i];
+		txdlp = (TxD_t *) nic->list_info[i][get_info.offset].
+		    list_virt_addr;
 		while ((!(txdlp->Control_1 & TXD_LIST_OWN_XENA)) &&
-		       (offset_info.offset != offset_info1.offset) &&
+		       (get_info.offset != put_info.offset) &&
 		       (txdlp->Host_Control)) {
 			/* Check for TxD errors */
 			if (txdlp->Control_1 & TXD_T_CODE) {
@@ -1797,28 +2325,20 @@
 				txdlp = temp;
 			}
 			memset(txdlp, 0,
-			       (sizeof(TxD_t) * config->MaxTxDs));
+			       (sizeof(TxD_t) * config->max_txds));
 
 			/* Updating the statistics block */
 			nic->stats.tx_packets++;
 			nic->stats.tx_bytes += skb->len;
-#if DEBUG_ON
-			nic->txpkt_bytes += skb->len;
-			cnt++;
-#endif
 			dev_kfree_skb_irq(skb);
 
-			offset_info.offset++;
-			offset_info.offset %= offset_info.fifo_len + 1;
-			txdlp = mac_control->txdl_start[i] +
-			    (config->MaxTxDs * offset_info.offset);
+			get_info.offset++;
+			get_info.offset %= get_info.fifo_len + 1;
+			txdlp = (TxD_t *) nic->list_info[i]
+			    [get_info.offset].list_virt_addr;
 			mac_control->tx_curr_get_info[i].offset =
-			    offset_info.offset;
+			    get_info.offset;
 		}
-#if DEBUG_ON
-		DBG_PRINT(INTR_DBG, "%s: freed %d Tx Pkts\n", dev->name,
-			  cnt);
-#endif
 	}
 
 	spin_lock(&nic->tx_lock);
@@ -1827,67 +2347,79 @@
 	spin_unlock(&nic->tx_lock);
 }
 
-/*  
- *  Input Arguments: 
- *  device private variable
- *  Return Value: 
+/**  
+ *  alarm_intr_handler - Alarm Interrrupt handler
+ *  @nic: device private variable
+ *  Description: If the interrupt was neither because of Rx packet or Tx 
+ *  complete, this function is called. If the interrupt was to indicate
+ *  a loss of link, the OSM link status handler is invoked for any other 
+ *  alarm interrupt the block that raised the interrupt is displayed 
+ *  and a H/W reset is issued.
+ *  Return Value:
  *  NONE
- *  Description: 
- *  If the interrupt was neither because of Rx packet or Tx 
- *  complete, this function is called. If the interrupt was to indicate a loss
- *  of link, the OSM link status handler is invoked for any other alarm 
- *  interrupt the block that raised the interrupt is displayed and a H/W reset 
- *  is issued.
- */
-static void alarmIntrHandler(struct s2io_nic *nic)
+*/
+
+static void alarm_intr_handler(struct s2io_nic *nic)
 {
 	struct net_device *dev = (struct net_device *) nic->dev;
 	XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0;
 	register u64 val64 = 0, err_reg = 0;
 
-
 	/* Handling link status change error Intr */
 	err_reg = readq(&bar0->mac_rmac_err_reg);
+	writeq(err_reg, &bar0->mac_rmac_err_reg);
 	if (err_reg & RMAC_LINK_STATE_CHANGE_INT) {
 		schedule_work(&nic->set_link_task);
 	}
 
-	/* Handling SERR errors by stopping device Xmit queue and forcing 
-	 * a H/W reset.
-	 */
+	/* In case of a serious error, the device will be Reset. */
 	val64 = readq(&bar0->serr_source);
 	if (val64 & SERR_SOURCE_ANY) {
 		DBG_PRINT(ERR_DBG, "%s: Device indicates ", dev->name);
 		DBG_PRINT(ERR_DBG, "serious error!!\n");
 		netif_stop_queue(dev);
+		schedule_work(&nic->rst_timer_task);
+	}
+
+	/*
+	 * Also as mentioned in the latest Errata sheets if the PCC_FB_ECC
+	 * Error occurs, the adapter will be recycled by disabling the
+	 * adapter enable bit and enabling it again after the device 
+	 * becomes Quiescent.
+	 */
+	val64 = readq(&bar0->pcc_err_reg);
+	writeq(val64, &bar0->pcc_err_reg);
+	if (val64 & PCC_FB_ECC_DB_ERR) {
+		u64 ac = readq(&bar0->adapter_control);
+		ac &= ~(ADAPTER_CNTL_EN);
+		writeq(ac, &bar0->adapter_control);
+		ac = readq(&bar0->adapter_control);
+		schedule_work(&nic->set_link_task);
 	}
-/* Other type of interrupts are not being handled now,  TODO*/
+
+	/* Other type of interrupts are not being handled now,  TODO */
 }
 
-/*
- *  Input Argument: 
- *  sp - private member of the device structure, which is a pointer to the 
- *   	s2io_nic structure.
+/** 
+ *  wait_for_cmd_complete - waits for a command to complete.
+ *  @sp : private member of the device structure, which is a pointer to the 
+ *  s2io_nic structure.
+ *  Description: Function that waits for a command to Write into RMAC 
+ *  ADDR DATA registers to be completed and returns either success or 
+ *  error depending on whether the command was complete or not. 
  *  Return value:
  *   SUCCESS on success and FAILURE on failure.
- *  Description:
- *   Function that waits for a command to Write into RMAC ADDR DATA registers 
- *   to be completed and returns either success or error depending on whether 
- *   the command was complete or not. 
  */
-int waitForCmdComplete(nic_t * sp)
+
+int wait_for_cmd_complete(nic_t * sp)
 {
 	XENA_dev_config_t *bar0 = (XENA_dev_config_t *) sp->bar0;
 	int ret = FAILURE, cnt = 0;
 	u64 val64;
 
 	while (TRUE) {
-		val64 =
-		    RMAC_ADDR_CMD_MEM_RD | RMAC_ADDR_CMD_MEM_STROBE_NEW_CMD
-		    | RMAC_ADDR_CMD_MEM_OFFSET(0);
-		writeq(val64, &bar0->rmac_addr_cmd_mem);
 		val64 = readq(&bar0->rmac_addr_cmd_mem);
-		if (!val64) {
+		if (!(val64 & RMAC_ADDR_CMD_MEM_STROBE_CMD_EXECUTING)) {
 			ret = SUCCESS;
 			break;
 		}
@@ -1900,17 +2432,16 @@
 	return ret;
 }
 
-/*
- *  Input Argument: 
- *  sp - private member of the device structure, which is a pointer to the 
- *   	s2io_nic structure.
+/** 
+ *  s2io_reset - Resets the card. 
+ *  @sp : private member of the device structure.
+ *  Description: Function to Reset the card. This function then also
+ *  restores the previously saved PCI configuration space registers as 
+ *  the card reset also resets the configuration space.
  *  Return value:
- *   void.
- *  Description:
- *   Function to Reset the card. This function then also restores the previously
- *   saved PCI configuration space registers as the card reset also resets the
- *   Configration space.
+ *  void.
  */
+
 void s2io_reset(nic_t * sp)
 {
 	XENA_dev_config_t *bar0 = (XENA_dev_config_t *) sp->bar0;
@@ -1920,7 +2451,8 @@
 	val64 = SW_RESET_ALL;
 	writeq(val64, &bar0->sw_reset);
 
-	/* At this stage, if the PCI write is indeed completed, the 
+	/* 
+	 * At this stage, if the PCI write is indeed completed, the 
 	 * card is reset and so is the PCI Config space of the device. 
 	 * So a read cannot be issued at this stage on any of the 
 	 * registers to ensure the write into "sw_reset" register
@@ -1954,29 +2486,31 @@
 	sp->device_enabled_once = FALSE;
 }
 
-/*
- *  Input Argument: 
- *  sp - private member of the device structure, which is a pointer to the 
- *   	s2io_nic structure.
+/**
+ *  s2io_set_swapper - to set the swapper controle on the card 
+ *  @sp : private member of the device structure, 
+ *  pointer to the s2io_nic structure.
+ *  Description: Function to set the swapper control on the card 
+ *  correctly depending on the 'endianness' of the system.
  *  Return value:
  *  SUCCESS on success and FAILURE on failure.
- *  Description:
- * Function to set the swapper control on the card correctly depending on the
- * 'endianness' of the system.
  */
+
 int s2io_set_swapper(nic_t * sp)
 {
 	struct net_device *dev = sp->dev;
 	XENA_dev_config_t *bar0 = (XENA_dev_config_t *) sp->bar0;
 	u64 val64;
 
-/*  Set proper endian settings and verify the same by reading the PIF 
- *  Feed-back register.
- */
+	/* 
+	 * Set proper endian settings and verify the same by reading
+	 * the PIF Feed-back register.
+	 */
 #ifdef  __BIG_ENDIAN
-/* The device by default set to a big endian format, so a big endian 
- * driver need not set anything.
- */
+	/* 
+	 * The device by default set to a big endian format, so a 
+	 * big endian driver need not set anything.
+	 */
 	writeq(0xffffffffffffffffULL, &bar0->swapper_ctrl);
 	val64 = (SWAPPER_CTRL_PIF_R_FE |
 		 SWAPPER_CTRL_PIF_R_SE |
@@ -1995,9 +2529,11 @@
 		 SWAPPER_CTRL_STATS_FE | SWAPPER_CTRL_STATS_SE);
 	writeq(val64, &bar0->swapper_ctrl);
 #else
-/* Initially we enable all bits to make it accessible by the driver,
- * then we selectively enable only those bits that we want to set.
- */
+	/* 
+	 * Initially we enable all bits to make it accessible by the
+	 * driver, then we selectively enable only those bits that 
+	 * we want to set.
+	 */
 	writeq(0xffffffffffffffffULL, &bar0->swapper_ctrl);
 	val64 = (SWAPPER_CTRL_PIF_R_FE |
 		 SWAPPER_CTRL_PIF_R_SE |
@@ -2021,9 +2557,10 @@
 	writeq(val64, &bar0->swapper_ctrl);
 #endif
 
-/*  Verifying if endian settings are accurate by reading a feedback
- *  register.
- */
+	/* 
+	 * Verifying if endian settings are accurate by reading a 
+	 * feedback register.
+	 */
 	val64 = readq(&bar0->pif_rd_swapper_fb);
 	if (val64 != 0x0123456789ABCDEFULL) {
 		/* Endian settings are incorrect, calls for another dekko. */
@@ -2041,177 +2578,101 @@
  * Functions defined below concern the OS part of the driver *
  * ********************************************************* */
 
-/*
- *  Input Argument: 
- *  dev - pointer to the device structure.
- *  Return value:
- *  '0' on success and an appropriate (-)ve integer as defined in errno.h
- *   file on failure.
+/**  
+ *  s2io_open - open entry point of the driver
+ *  @dev : pointer to the device structure.
  *  Description:
  *  This function is the open entry point of the driver. It mainly calls a
  *  function to allocate Rx buffers and inserts them into the buffer
  *  descriptors and then enables the Rx part of the NIC. 
+ *  Return value:
+ *  0 on success and an appropriate (-)ve integer as defined in errno.h
+ *   file on failure.
  */
+
 int s2io_open(struct net_device *dev)
 {
 	nic_t *sp = dev->priv;
-	int i, ret = 0, err = 0;
-	mac_info_t *mac_control;
-	struct config_param *config;
-
+	int err = 0;
 
-/* Make sure you have link off by default every time Nic is initialized*/
+	/* 
+	 * Make sure you have link off by default every time 
+	 * Nic is initialized
+	 */
 	netif_carrier_off(dev);
 	sp->last_link_state = LINK_DOWN;
 
-/*  Initialize the H/W I/O registers */
-	if (initNic(sp) != 0) {
+	/* Initialize H/W and enable interrupts */
+	if (s2io_card_up(sp)) {
 		DBG_PRINT(ERR_DBG, "%s: H/W initialization failed\n",
 			  dev->name);
 		return -ENODEV;
 	}
 
-/*  After proper initialization of H/W, register ISR */
-	err =
-	    request_irq((int) sp->irq, s2io_isr, SA_SHIRQ, sp->name, dev);
+	/* After proper initialization of H/W, register ISR */
+	err = request_irq((int) sp->irq, s2io_isr, SA_SHIRQ,
+			  sp->name, dev);
 	if (err) {
 		s2io_reset(sp);
 		DBG_PRINT(ERR_DBG, "%s: ISR registration failed\n",
 			  dev->name);
 		return err;
 	}
+
 	if (s2io_set_mac_addr(dev, dev->dev_addr) == FAILURE) {
 		DBG_PRINT(ERR_DBG, "Set Mac Address Failed\n");
 		s2io_reset(sp);
 		return -ENODEV;
 	}
 
-
-/*  Setting its receive mode */
-	s2io_set_multicast(dev);
-
-/*  Initializing the Rx buffers. For now we are considering only 1 Rx ring
- * and initializing buffers into 1016 RxDs or 8 Rx blocks
- */
-	mac_control = &sp->mac_control;
-	config = &sp->config;
-
-	for (i = 0; i < config->RxRingNum; i++) {
-		if ((ret = fill_rx_buffers(sp, i))) {
-			DBG_PRINT(ERR_DBG, "%s: Out of memory in Open\n",
-				  dev->name);
-			s2io_reset(sp);
-			free_irq(dev->irq, dev);
-			freeRxBuffers(sp);
-			return -ENOMEM;
-		}
-		DBG_PRINT(INFO_DBG, "Buf in ring:%d is %d:\n", i,
-			  atomic_read(&sp->rx_bufs_left[i]));
-	}
-
-/*  Enable tasklet for the device */
-	tasklet_init(&sp->task, s2io_tasklet, (unsigned long) dev);
-
-/*  Enable Rx Traffic and interrupts on the NIC */
-	if (startNic(sp)) {
-		DBG_PRINT(ERR_DBG, "%s: Starting NIC failed\n", dev->name);
-		tasklet_kill(&sp->task);
-		s2io_reset(sp);
-		free_irq(dev->irq, dev);
-		freeRxBuffers(sp);
-		return -ENODEV;
-	}
-
-	sp->device_close_flag = FALSE;	/* Device is up and running. */
 	netif_start_queue(dev);
-
 	return 0;
 }
 
-/*
- *  Input Argument/s: 
- *  dev - device pointer.
- *  Return value:
- *  '0' on success and an appropriate (-)ve integer as defined in errno.h
- *  file on failure.
+/**
+ *  s2io_close -close entry point of the driver
+ *  @dev : device pointer.
  *  Description:
  *  This is the stop entry point of the driver. It needs to undo exactly
- *  whatever was done by the open entry point, thus it's usually referred to
- *  as the close function. Among other things this function mainly stops the
+ *  whatever was done by the open entry point,thus it's usually referred to
+ *  as the close function.Among other things this function mainly stops the
  *  Rx side of the NIC and frees all the Rx buffers in the Rx rings.
+ *  Return value:
+ *  0 on success and an appropriate (-)ve integer as defined in errno.h
+ *  file on failure.
  */
+
 int s2io_close(struct net_device *dev)
 {
 	nic_t *sp = dev->priv;
-	XENA_dev_config_t *bar0 = (XENA_dev_config_t *) sp->bar0;
-	register u64 val64 = 0;
-	u16 cnt = 0;
 
-	spin_lock(&sp->isr_lock);
+	flush_scheduled_work();
 	netif_stop_queue(dev);
+	/* Reset card, kill tasklet and free Tx and Rx buffers. */
+	s2io_card_down(sp);
 
-/* disable Tx and Rx traffic on the NIC */
-	stopNic(sp);
-
-	spin_unlock(&sp->isr_lock);
-
-/* If the device tasklet is running, wait till its done before killing it */
-	while (atomic_read(&(sp->tasklet_status))) {
-		set_current_state(TASK_UNINTERRUPTIBLE);
-		schedule_timeout(HZ / 10);
-	}
-	tasklet_kill(&sp->task);
-
-/* Check if the device is Quiescent and then Reset the NIC */
-	do {
-		val64 = readq(&bar0->adapter_status);
-		if (verify_xena_quiescence(val64, sp->device_enabled_once)) {
-			break;
-		}
-
-		set_current_state(TASK_UNINTERRUPTIBLE);
-		schedule_timeout(HZ / 20);
-		cnt++;
-		if (cnt == 10) {
-			DBG_PRINT(ERR_DBG,
-				  "s2io_close:Device not Quiescent ");
-			DBG_PRINT(ERR_DBG, "adaper status reads 0x%llx\n",
-				  (unsigned long long) val64);
-			break;
-		}
-	} while (1);
-	s2io_reset(sp);
-
-/*  Free the Registered IRQ */
 	free_irq(dev->irq, dev);
-
-/* Free all Tx Buffers waiting for transmission */
-	freeTxBuffers(sp);
-
-/*  Free all Rx buffers allocated by host */
-	freeRxBuffers(sp);
-
 	sp->device_close_flag = TRUE;	/* Device is shut down. */
-
 	return 0;
 }
 
-/*
- *  Input Argument/s: 
- *  skb - the socket buffer containing the Tx data.
- *  dev - device pointer.
- *  Return value:
- *  '0' on success & 1 on failure. 
- *  NOTE: when device cant queue the pkt, just the trans_start variable will
- *  not be upadted.
- *  Description:
+/**
+ *  s2io_xmit - Tx entry point of te driver
+ *  @skb : the socket buffer containing the Tx data.
+ *  @dev : device pointer.
+ *  Description :
  *  This function is the Tx entry point of the driver. S2IO NIC supports
  *  certain protocol assist features on Tx side, namely  CSO, S/G, LSO.
+ *  NOTE: when device cant queue the pkt,just the trans_start variable will
+ *  not be upadted.
+ *  Return value:
+ *  0 on success & 1 on failure.
  */
+
 int s2io_xmit(struct sk_buff *skb, struct net_device *dev)
 {
 	nic_t *sp = dev->priv;
-	u16 off, txd_len, frg_cnt, frg_len, i, queue, off1, queue_len;
+	u16 frg_cnt, frg_len, i, queue, queue_len, put_off, get_off;
 	register u64 val64;
 	TxD_t *txdp;
 	TxFIFO_element_t *tx_fifo;
@@ -2221,36 +2682,35 @@
 #endif
 	mac_info_t *mac_control;
 	struct config_param *config;
+	XENA_dev_config_t *bar0 = (XENA_dev_config_t *) sp->bar0;
 
 	mac_control = &sp->mac_control;
 	config = &sp->config;
 
 	DBG_PRINT(TX_DBG, "%s: In S2IO Tx routine\n", dev->name);
-
 	spin_lock_irqsave(&sp->tx_lock, flags);
-	queue = 0;
-	/* Multi FIFO Tx is disabled for now. */
-	if (!queue && tx_prio) {
-		u8 x = (skb->data)[5];
-		queue = x % config->TxFIFONum;
-	}
 
+	if (atomic_read(&sp->card_state) == CARD_DOWN) {
+		DBG_PRINT(ERR_DBG, "%s: Card going down for reset\n",
+			  dev->name);
+		spin_unlock_irqrestore(&sp->tx_lock, flags);
+		return 1;
+	}
 
-	off = (u16) mac_control->tx_curr_put_info[queue].offset;
-	off1 = (u16) mac_control->tx_curr_get_info[queue].offset;
-	txd_len = mac_control->txdl_len;
-	txdp = mac_control->txdl_start[queue] + (config->MaxTxDs * off);
+	queue = 0;
+	put_off = (u16) mac_control->tx_curr_put_info[queue].offset;
+	get_off = (u16) mac_control->tx_curr_get_info[queue].offset;
+	txdp = (TxD_t *) sp->list_info[queue][put_off].list_virt_addr;
 
 	queue_len = mac_control->tx_curr_put_info[queue].fifo_len + 1;
 	/* Avoid "put" pointer going beyond "get" pointer */
-	if (txdp->Host_Control || (((off + 1) % queue_len) == off1)) {
+	if (txdp->Host_Control || (((put_off + 1) % queue_len) == get_off)) {
 		DBG_PRINT(ERR_DBG, "Error in xmit, No free TXDs.\n");
 		netif_stop_queue(dev);
 		dev_kfree_skb(skb);
 		spin_unlock_irqrestore(&sp->tx_lock, flags);
 		return 0;
 	}
-
 #ifdef NETIF_F_TSO
 	mss = skb_shinfo(skb)->tso_size;
 	if (mss) {
@@ -2271,7 +2731,7 @@
 		     TXD_TX_CKO_UDP_EN);
 	}
 
-	txdp->Control_2 |= config->TxIntrType;
+	txdp->Control_2 |= config->tx_intr_type;
 
 	txdp->Control_1 |= (TXD_BUFFER0_SIZE(frg_len) |
 			    TXD_GATHER_CODE_FIRST);
@@ -2289,8 +2749,7 @@
 	txdp->Control_1 |= TXD_GATHER_CODE_LAST;
 
 	tx_fifo = mac_control->tx_FIFO_start[queue];
-	val64 = (mac_control->txdl_start_phy[queue] +
-		 (sizeof(TxD_t) * txd_len * off));
+	val64 = sp->list_info[queue][put_off].list_phy_addr;
 	writeq(val64, &tx_fifo->TxDL_Pointer);
 
 	val64 = (TX_FIFO_LAST_TXD_NUM(frg_cnt) | TX_FIFO_FIRST_LIST |
@@ -2301,15 +2760,18 @@
 #endif
 	writeq(val64, &tx_fifo->List_Control);
 
-	off++;
-	off %= mac_control->tx_curr_put_info[queue].fifo_len + 1;
-	mac_control->tx_curr_put_info[queue].offset = off;
+	/* Perform a PCI read to flush previous writes */
+	val64 = readq(&bar0->general_int_status);
+
+	put_off++;
+	put_off %= mac_control->tx_curr_put_info[queue].fifo_len + 1;
+	mac_control->tx_curr_put_info[queue].offset = put_off;
 
 	/* Avoid "put" pointer going beyond "get" pointer */
-	if (((off + 1) % queue_len) == off1) {
-		DBG_PRINT(TX_DBG, 
-		  "No free TxDs for xmit, Put: 0x%x Get:0x%x\n",
-		  off, off1);
+	if (((put_off + 1) % queue_len) == get_off) {
+		DBG_PRINT(TX_DBG,
+			  "No free TxDs for xmit, Put: 0x%x Get:0x%x\n",
+			  put_off, get_off);
 		netif_stop_queue(dev);
 	}
 
@@ -2319,36 +2781,37 @@
 	return 0;
 }
 
-/*
- *  Input Argument/s: 
- *  irq: the irq of the device.
- *  dev_id: a void pointer to the dev structure of the NIC.
- *  ptregs: pointer to the registers pushed on the stack.
+/**
+ *  s2io_isr - ISR handler of the device .
+ *  @irq: the irq of the device.
+ *  @dev_id: a void pointer to the dev structure of the NIC.
+ *  @pt_regs: pointer to the registers pushed on the stack.
+ *  Description:  This function is the ISR handler of the device. It 
+ *  identifies the reason for the interrupt and calls the relevant 
+ *  service routines. As a contongency measure, this ISR allocates the 
+ *  recv buffers, if their numbers are below the panic value which is
+ *  presently set to 25% of the original number of rcv buffers allocated.
  *  Return value:
- *  void.
- *  Description:
- *  This function is the ISR handler of the device. It identifies the reason 
- *  for the interrupt and calls the relevant service routines.
- *  As a contongency measure, this ISR allocates the recv buffers, if their 
- *  numbers are below the panic value which is presently set to 25% of the
- *  original number of rcv buffers allocated.
+ *   IRQ_HANDLED: will be returned if IRQ was handled by this routine 
+ *   IRQ_NONE: will be returned if interrupt is not from our device
  */
-
 static irqreturn_t s2io_isr(int irq, void *dev_id, struct pt_regs *regs)
 {
 	struct net_device *dev = (struct net_device *) dev_id;
 	nic_t *sp = dev->priv;
 	XENA_dev_config_t *bar0 = (XENA_dev_config_t *) sp->bar0;
-	u64 reason = 0, general_mask = 0;
+#ifndef CONFIG_S2IO_NAPI
+	int i, ret;
+#endif
+	u64 reason = 0;
 	mac_info_t *mac_control;
 	struct config_param *config;
 
 	mac_control = &sp->mac_control;
 	config = &sp->config;
 
-	spin_lock(&sp->isr_lock);
-
-	/* Identify the cause for interrupt and call the appropriate
+	/* 
+	 * Identify the cause for interrupt and call the appropriate
 	 * interrupt handler. Causes for the interrupt could be;
 	 * 1. Rx of packet.
 	 * 2. Tx complete.
@@ -2359,101 +2822,73 @@
 
 	if (!reason) {
 		/* The interrupt was not raised by Xena. */
-		spin_unlock(&sp->isr_lock);
 		return IRQ_NONE;
 	}
-	/* Mask the interrupts on the NIC */
-	general_mask = readq(&bar0->general_int_mask);
-	writeq(0xFFFFFFFFFFFFFFFFULL, &bar0->general_int_mask);
-
-#if DEBUG_ON
-	sp->int_cnt++;
-#endif
 
 	/* If Intr is because of Tx Traffic */
 	if (reason & GEN_INTR_TXTRAFFIC) {
-		txIntrHandler(sp);
+		tx_intr_handler(sp);
 	}
 
 	/* If Intr is because of an error */
 	if (reason & (GEN_ERROR_INTR))
-		alarmIntrHandler(sp);
+		alarm_intr_handler(sp);
 
 #ifdef CONFIG_S2IO_NAPI
 	if (reason & GEN_INTR_RXTRAFFIC) {
 		if (netif_rx_schedule_prep(dev)) {
-			en_dis_able_NicIntrs(sp, RX_TRAFFIC_INTR,
-					     DISABLE_INTRS);
-			/* We retake the snap shot of the general interrupt 
-			 * register.
-			 */
-			general_mask = readq(&bar0->general_int_mask);
+			en_dis_able_nic_intrs(sp, RX_TRAFFIC_INTR,
+					      DISABLE_INTRS);
 			__netif_rx_schedule(dev);
 		}
 	}
 #else
 	/* If Intr is because of Rx Traffic */
 	if (reason & GEN_INTR_RXTRAFFIC) {
-		rxIntrHandler(sp);
+		rx_intr_handler(sp);
 	}
 #endif
 
-/* If the Rx buffer count is below the panic threshold then reallocate the
- * buffers from the interrupt handler itself, else schedule a tasklet to 
- * reallocate the buffers.
- */
-#if 1
-	{
-	int i;
-
-	for (i = 0; i < config->RxRingNum; i++) {
+	/* 
+	 * If the Rx buffer count is below the panic threshold then 
+	 * reallocate the buffers from the interrupt handler itself, 
+	 * else schedule a tasklet to reallocate the buffers.
+	 */
+#ifndef CONFIG_S2IO_NAPI
+	for (i = 0; i < config->rx_ring_num; i++) {
 		int rxb_size = atomic_read(&sp->rx_bufs_left[i]);
 		int level = rx_buffer_level(sp, rxb_size, i);
 
 		if ((level == PANIC) && (!TASKLET_IN_USE)) {
-			int ret;
-
-			DBG_PRINT(ERR_DBG, "%s: Rx BD hit ", dev->name);
-			DBG_PRINT(ERR_DBG, "PANIC levels\n");
+			DBG_PRINT(INTR_DBG, "%s: Rx BD hit ", dev->name);
+			DBG_PRINT(INTR_DBG, "PANIC levels\n");
 			if ((ret = fill_rx_buffers(sp, i)) == -ENOMEM) {
 				DBG_PRINT(ERR_DBG, "%s:Out of memory",
 					  dev->name);
 				DBG_PRINT(ERR_DBG, " in ISR!!\n");
-				writeq(general_mask,
-				       &bar0->general_int_mask);
-				spin_unlock(&sp->isr_lock);
+				clear_bit(0, (&sp->tasklet_status));
 				return IRQ_HANDLED;
 			}
-			clear_bit(0,
-				  (unsigned long *) (&sp->tasklet_status));
-		} else if ((level == LOW)
-			   && (!atomic_read(&sp->tasklet_status))) {
+			clear_bit(0, (&sp->tasklet_status));
+		} else if (level == LOW) {
 			tasklet_schedule(&sp->task);
 		}
-
 	}
-
-	}
-#else
-	tasklet_schedule(&sp->task);
 #endif
 
-	/* Unmask all the previously enabled interrupts on the NIC */
-	writeq(general_mask, &bar0->general_int_mask);
-
-	spin_unlock(&sp->isr_lock);
 	return IRQ_HANDLED;
 }
 
-/*
- *  Input Argument/s: 
- *  dev - pointer to the device structure.
- *  Return value:
- *  pointer to the updated net_device_stats structure.
+/**
+ *  s2io_get_stats - Updates the device statistics structure. 
+ *  @dev : pointer to the device structure.
  *  Description:
  *  This function updates the device statistics structure in the s2io_nic 
  *  structure and returns a pointer to the same.
+ *  Return value:
+ *  pointer to the updated net_device_stats structure.
  */
+
 struct net_device_stats *s2io_get_stats(struct net_device *dev)
 {
 	nic_t *sp = dev->priv;
@@ -2463,27 +2898,28 @@
 	mac_control = &sp->mac_control;
 	config = &sp->config;
 
-	sp->stats.tx_errors = mac_control->StatsInfo->tmac_any_err_frms;
-	sp->stats.rx_errors = mac_control->StatsInfo->rmac_drop_frms;
-	sp->stats.multicast = mac_control->StatsInfo->rmac_vld_mcst_frms;
+	sp->stats.tx_errors = mac_control->stats_info->tmac_any_err_frms;
+	sp->stats.rx_errors = mac_control->stats_info->rmac_drop_frms;
+	sp->stats.multicast = mac_control->stats_info->rmac_vld_mcst_frms;
 	sp->stats.rx_length_errors =
-	    mac_control->StatsInfo->rmac_long_frms;
+	    mac_control->stats_info->rmac_long_frms;
 
 	return (&sp->stats);
 }
 
-/*
- *  Input Argument/s: 
- *  dev - pointer to the device structure
- *  Return value:
- *  void.
+/**
+ *  s2io_set_multicast - entry point for multicast address enable/disable.
+ *  @dev : pointer to the device structure
  *  Description:
  *  This function is a driver entry point which gets called by the kernel 
  *  whenever multicast addresses must be enabled/disabled. This also gets 
  *  called to set/reset promiscuous mode. Depending on the deivce flag, we
  *  determine, if multicast address must be enabled or if promiscuous mode
  *  is to be disabled etc.
+ *  Return value:
+ *  void.
  */
+
 static void s2io_set_multicast(struct net_device *dev)
 {
 	int i, j, prev_cnt;
@@ -2506,7 +2942,7 @@
 		    RMAC_ADDR_CMD_MEM_OFFSET(MAC_MC_ALL_MC_ADDR_OFFSET);
 		writeq(val64, &bar0->rmac_addr_cmd_mem);
 		/* Wait till command completes */
-		waitForCmdComplete(sp);
+		wait_for_cmd_complete(sp);
 
 		sp->m_cast_flg = 1;
 		sp->all_multi_pos = MAC_MC_ALL_MC_ADDR_OFFSET;
@@ -2519,7 +2955,7 @@
 		    RMAC_ADDR_CMD_MEM_OFFSET(sp->all_multi_pos);
 		writeq(val64, &bar0->rmac_addr_cmd_mem);
 		/* Wait till command completes */
-		waitForCmdComplete(sp);
+		wait_for_cmd_complete(sp);
 
 		sp->m_cast_flg = 0;
 		sp->all_multi_pos = 0;
@@ -2582,7 +3018,7 @@
 			writeq(val64, &bar0->rmac_addr_cmd_mem);
 
 			/* Wait for command completes */
-			if (waitForCmdComplete(sp)) {
+			if (wait_for_cmd_complete(sp)) {
 				DBG_PRINT(ERR_DBG, "%s: Adding ",
 					  dev->name);
 				DBG_PRINT(ERR_DBG, "Multicasts failed\n");
@@ -2609,7 +3045,7 @@
 			writeq(val64, &bar0->rmac_addr_cmd_mem);
 
 			/* Wait for command completes */
-			if (waitForCmdComplete(sp)) {
+			if (wait_for_cmd_complete(sp)) {
 				DBG_PRINT(ERR_DBG, "%s: Adding ",
 					  dev->name);
 				DBG_PRINT(ERR_DBG, "Multicasts failed\n");
@@ -2619,17 +3055,16 @@
 	}
 }
 
-/*
- *  Input Argument/s: 
- *  dev - pointer to the device structure.
- *  new_mac - a uchar pointer to the new mac address which is to be set.
- *  Return value:
- *  SUCCESS on success and an appropriate (-)ve integer as defined in errno.h
- *  file on failure.
- *  Description:
- *  This procedure will program the Xframe to receive frames with new
- *  Mac Address
+/**
+ *  s2io_set_mac_addr - Programs the Xframe mac address 
+ *  @dev : pointer to the device structure.
+ *  @addr: a uchar pointer to the new mac address which is to be set.
+ *  Description : This procedure will program the Xframe to receive 
+ *  frames with new Mac Address
+ *  Return value: SUCCESS on success and an appropriate (-)ve integer 
+ *  as defined in errno.h file on failure.
  */
+
 int s2io_set_mac_addr(struct net_device *dev, u8 * addr)
 {
 	nic_t *sp = dev->priv;
@@ -2655,7 +3090,7 @@
 	    RMAC_ADDR_CMD_MEM_OFFSET(0);
 	writeq(val64, &bar0->rmac_addr_cmd_mem);
 	/* Wait till command completes */
-	if (waitForCmdComplete(sp)) {
+	if (wait_for_cmd_complete(sp)) {
 		DBG_PRINT(ERR_DBG, "%s: set_mac_addr failed\n", dev->name);
 		return FAILURE;
 	}
@@ -2663,18 +3098,18 @@
 	return SUCCESS;
 }
 
-/*
- * Input Argument/s: 
- *  sp - private member of the device structure, which is a pointer to the 
- *   	s2io_nic structure.
- *  info - pointer to the structure with parameters given by ethtool to set
- *  link information.
- * Return value:
- *  0 on success.
+/**
+ * s2io_ethtool_sset - Sets different link parameters. 
+ * @sp : private member of the device structure, which is a pointer to the  * s2io_nic structure.
+ * @info: pointer to the structure with parameters given by ethtool to set
+ * link information.
  * Description:
- *  The function sets different link parameters provided by the user onto 
- *  the NIC.
- */
+ * The function sets different link parameters provided by the user onto 
+ * the NIC.
+ * Return value:
+ * 0 on success.
+*/
+
 static int s2io_ethtool_sset(struct net_device *dev,
 			     struct ethtool_cmd *info)
 {
@@ -2690,17 +3125,18 @@
 	return 0;
 }
 
-/*
- * Input Argument/s: 
- *  sp - private member of the device structure, which is a pointer to the 
- *   	s2io_nic structure.
- *  info - pointer to the structure with parameters given by ethtool to return
- *  link information.
- * Return value:
- *  void
+/**
+ * s2io_ethtol_gset - Return link specific information. 
+ * @sp : private member of the device structure, pointer to the
+ *      s2io_nic structure.
+ * @info : pointer to the structure with parameters given by ethtool
+ * to return link information.
  * Description:
- *  Returns link specefic information like speed, duplex etc.. to ethtool.
+ * Returns link specific information like speed, duplex etc.. to ethtool.
+ * Return value :
+ * return 0 on success.
  */
+
 int s2io_ethtool_gset(struct net_device *dev, struct ethtool_cmd *info)
 {
 	nic_t *sp = dev->priv;
@@ -2721,17 +3157,18 @@
 	return 0;
 }
 
-/*
- * Input Argument/s: 
- *  sp - private member of the device structure, which is a pointer to the 
- *   	s2io_nic structure.
- *  info - pointer to the structure with parameters given by ethtool to return
- *  driver information.
+/**
+ * s2io_ethtool_gdrvinfo - Returns driver specific information. 
+ * @sp : private member of the device structure, which is a pointer to the 
+ * s2io_nic structure.
+ * @info : pointer to the structure with parameters given by ethtool to
+ * return driver information.
+ * Description:
+ * Returns driver specefic information like name, version etc.. to ethtool.
  * Return value:
  *  void
- * Description:
- *  Returns driver specefic information like name, version etc.. to ethtool.
  */
+
 static void s2io_ethtool_gdrvinfo(struct net_device *dev,
 				  struct ethtool_drvinfo *info)
 {
@@ -2748,19 +3185,20 @@
 	info->n_stats = S2IO_STAT_LEN;
 }
 
-/*
- * Input Argument/s: 
- *  sp - private member of the device structure, which is a pointer to the 
- *   	s2io_nic structure.
- *  regs - pointer to the structure with parameters given by ethtool for 
+/**
+ *  s2io_ethtool_gregs - dumps the entire space of Xfame into the buffer.
+ *  @sp: private member of the device structure, which is a pointer to the 
+ *  s2io_nic structure.
+ *  @regs : pointer to the structure with parameters given by ethtool for 
  *  dumping the registers.
- *  reg_space - The input argumnet into which all the registers are dumped.
- * Return value:
- *  void
- * Description:
- *  Dumps the entire register space of xFrame NIC into the user given buffer 
- *  area.
- */
+ *  @reg_space: The input argumnet into which all the registers are dumped.
+ *  Description:
+ *  Dumps the entire register space of xFrame NIC into the user given
+ *  buffer area.
+ * Return value :
+ * void .
+*/
+
 static void s2io_ethtool_gregs(struct net_device *dev,
 			       struct ethtool_regs *regs, void *space)
 {
@@ -2778,17 +3216,15 @@
 	}
 }
 
-/*
- * Input Argument/s: 
- *  data - address of the private member of the device structure, which 
+/**
+ *  s2io_phy_id  - timer function that alternates adapter LED.
+ *  @data : address of the private member of the device structure, which 
  *  is a pointer to the s2io_nic structure, provided as an u32.
- * Return value:
- *  void
- * Description:
- *  This is actually the timer function that alternates the adapter LED bit
- *  of the adapter control bit to set/reset every time on invocation.
- *  The timer is set for 1/2 a second, hence tha NIC blinks once every second.
- */
+ * Description: This is actually the timer function that alternates the 
+ * adapter LED bit of the adapter control bit to set/reset every time on 
+ * invocation. The timer is set for 1/2 a second, hence tha NIC blinks 
+ *  once every second.
+*/
 static void s2io_phy_id(unsigned long data)
 {
 	nic_t *sp = (nic_t *) data;
@@ -2810,28 +3246,30 @@
 	mod_timer(&sp->id_timer, jiffies + HZ / 2);
 }
 
-/*
- * Input Argument/s: 
- *  sp - private member of the device structure, which is a pointer to the 
- *   	s2io_nic structure.
- *  id - pointer to the structure with identification parameters given by 
- *  ethtool.
+/**
+ * s2io_ethtool_idnic - To physically identify the nic on the system.
+ * @sp : private member of the device structure, which is a pointer to the
+ * s2io_nic structure.
+ * @id : pointer to the structure with identification parameters given by 
+ * ethtool.
+ * Description: Used to physically identify the NIC on the system.
+ * The Link LED will blink for a time specified by the user for 
+ * identification.
+ * NOTE: The Link has to be Up to be able to blink the LED. Hence 
+ * identification is possible only if it's link is up.
  * Return value:
- *  int , returns '0' on success
- * Description:
- *  Used to physically identify the NIC on the system. The Link LED will blink
- *  for a time specified by the user for identification.
- *  NOTE: The Link has to be Up to be able to blink the LED. Hence 
- *  identification is possible only if it's link is up.
+ * int , returns 0 on success
  */
+
 static int s2io_ethtool_idnic(struct net_device *dev, u32 data)
 {
-	u64 val64 = 0;
+	u64 val64 = 0, last_gpio_ctrl_val;
 	nic_t *sp = dev->priv;
 	XENA_dev_config_t *bar0 = (XENA_dev_config_t *) sp->bar0;
 	u16 subid;
 
 	subid = sp->pdev->subsystem_device;
+	last_gpio_ctrl_val = readq(&bar0->gpio_control);
 	if ((subid & 0xFF) < 0x07) {
 		val64 = readq(&bar0->adapter_control);
 		if (!(val64 & ADAPTER_CNTL_EN)) {
@@ -2853,18 +3291,22 @@
 		schedule_timeout(MAX_SCHEDULE_TIMEOUT);
 	del_timer_sync(&sp->id_timer);
 
+	if (CARDS_WITH_FAULTY_LINK_INDICATORS(subid)) {
+		writeq(last_gpio_ctrl_val, &bar0->gpio_control);
+		last_gpio_ctrl_val = readq(&bar0->gpio_control);
+	}
+
 	return 0;
 }
 
-/*
- * Input Argument/s: 
- *  sp - private member of the device structure, which is a pointer to the 
- *   	s2io_nic structure.
- *  ep - pointer to the structure with pause parameters given by ethtool.
+/**
+ * s2io_ethtool_getpause_data -Pause frame frame generation and reception.
+ * @sp : private member of the device structure, which is a pointer to the  * s2io_nic structure.
+ * @ep : pointer to the structure with pause parameters given by ethtool.
+ * Description:
+ * Returns the Pause frame generation and reception capability of the NIC.
  * Return value:
  *  void
- * Description:
- *  Returns the Pause frame generation and reception capability of the NIC.
  */
 static void s2io_ethtool_getpause_data(struct net_device *dev,
 				       struct ethtool_pauseparam *ep)
@@ -2881,17 +3323,18 @@
 	ep->autoneg = FALSE;
 }
 
-/*
- * Input Argument/s: 
- * sp - private member of the device structure, which is a pointer to the 
- *   	s2io_nic structure.
- * ep - pointer to the structure with pause parameters given by ethtool.
- * Return value:
- * int, returns '0' on Success
+/**
+ * s2io_ethtool_setpause_data -  set/reset pause frame generation.
+ * @sp : private member of the device structure, which is a pointer to the 
+ *      s2io_nic structure.
+ * @ep : pointer to the structure with pause parameters given by ethtool.
  * Description:
- * It can be used to set or reset Pause frame generation or reception support 
- * of the NIC.
+ * It can be used to set or reset Pause frame generation or reception
+ * support of the NIC.
+ * Return value:
+ * int, returns 0 on Success
  */
+
 int s2io_ethtool_setpause_data(struct net_device *dev,
 			       struct ethtool_pauseparam *ep)
 {
@@ -2912,35 +3355,40 @@
 	return 0;
 }
 
-/*
- * Input Argument/s: 
- *  sp - private member of the device structure, which is a pointer to the 
- *   	s2io_nic structure.
- *  off - offset at which the data must be written
- * Return value:
- *  -1 on failure and the value read from the Eeprom if successful.
+/**
+ * read_eeprom - reads 4 bytes of data from user given offset.
+ * @sp : private member of the device structure, which is a pointer to the 
+ *      s2io_nic structure.
+ * @off : offset at which the data must be written
+ * @data : Its an output parameter where the data read at the given
+ * 	offset is stored.
  * Description:
- *  Will read 4 bytes of data from the user given offset and return the 
- *  read data.
+ * Will read 4 bytes of data from the user given offset and return the 
+ * read data.
  * NOTE: Will allow to read only part of the EEPROM visible through the
- * 	 I2C bus.
+ *   I2C bus.
+ * Return value:
+ *  -1 on failure and 0 on success.
  */
+
 #define S2IO_DEV_ID		5
-static u32 readEeprom(nic_t * sp, int off)
+static int read_eeprom(nic_t * sp, int off, u32 * data)
 {
-	u32 data = -1, exit_cnt = 0;
+	int ret = -1;
+	u32 exit_cnt = 0;
 	u64 val64;
 	XENA_dev_config_t *bar0 = (XENA_dev_config_t *) sp->bar0;
 
 	val64 = I2C_CONTROL_DEV_ID(S2IO_DEV_ID) | I2C_CONTROL_ADDR(off) |
 	    I2C_CONTROL_BYTE_CNT(0x3) | I2C_CONTROL_READ |
 	    I2C_CONTROL_CNTL_START;
-	writeq(val64, &bar0->i2c_control);
+	SPECIAL_REG_WRITE(val64, &bar0->i2c_control, LF);
 
 	while (exit_cnt < 5) {
 		val64 = readq(&bar0->i2c_control);
 		if (I2C_CONTROL_CNTL_END(val64)) {
-			data = I2C_CONTROL_GET_DATA(val64);
+			*data = I2C_CONTROL_GET_DATA(val64);
+			ret = 0;
 			break;
 		}
 		set_current_state(TASK_UNINTERRUPTIBLE);
@@ -2948,24 +3396,25 @@
 		exit_cnt++;
 	}
 
-	return data;
+	return ret;
 }
 
-/*
- * Input Argument/s: 
- *  sp - private member of the device structure, which is a pointer to the 
- *   	s2io_nic structure.
- *  off - offset at which the data must be written
- *  data - The data that is to be written
- *  cnt - Number of bytes of the data that are actually to be written into 
+/**
+ *  write_eeprom - actually writes the relevant part of the data value.
+ *  @sp : private member of the device structure, which is a pointer to the
+ *       s2io_nic structure.
+ *  @off : offset at which the data must be written
+ *  @data : The data that is to be written
+ *  @cnt : Number of bytes of the data that are actually to be written into 
  *  the Eeprom. (max of 3)
- * Return value:
- *  '0' on success, -1 on failure.
  * Description:
  *  Actually writes the relevant part of the data value into the Eeprom
  *  through the I2C bus.
+ * Return value:
+ *  0 on success, -1 on failure.
  */
-static int writeEeprom(nic_t * sp, int off, u32 data, int cnt)
+
+static int write_eeprom(nic_t * sp, int off, u32 data, int cnt)
 {
 	int exit_cnt = 0, ret = -1;
 	u64 val64;
@@ -2974,7 +3423,7 @@
 	val64 = I2C_CONTROL_DEV_ID(S2IO_DEV_ID) | I2C_CONTROL_ADDR(off) |
 	    I2C_CONTROL_BYTE_CNT(cnt) | I2C_CONTROL_SET_DATA(data) |
 	    I2C_CONTROL_CNTL_START;
-	writeq(val64, &bar0->i2c_control);
+	SPECIAL_REG_WRITE(val64, &bar0->i2c_control, LF);
 
 	while (exit_cnt < 5) {
 		val64 = readq(&bar0->i2c_control);
@@ -2991,39 +3440,19 @@
 	return ret;
 }
 
-/* 
- * A helper function used to invert the 4 byte u32 data field
- * byte by byte. This will be used by the Read Eeprom function
- * for display purposes.
- */
-u32 inv(u32 data)
-{
-	static u32 ret = 0;
-
-	if (data) {
-		u8 c = data;
-		ret = ((ret << 8) + c);
-		data >>= 8;
-		inv(data);
-	}
-
-	return ret;
-}
-
-/*
- * Input Argument/s: 
- *  sp - private member of the device structure, which is a pointer to the 
- *   	s2io_nic structure.
- *  eeprom - pointer to the user level structure provided by ethtool, 
- *   containing all relevant information.
- *  data_buf - user defined value to be written into Eeprom.
- * Return value:
- *  int  '0' on success
- * Description:
- *  Reads the values stored in the Eeprom at given offset for a given length.
- *  Stores these values int the input argument data buffer 'data_buf' and
- *  returns these to the caller (ethtool.)
+/**
+ *  s2io_ethtool_geeprom  - reads the value stored in the Eeprom.
+ *  @sp : private member of the device structure, which is a pointer to the *       s2io_nic structure.
+ *  @eeprom : pointer to the user level structure provided by ethtool, 
+ *  containing all relevant information.
+ *  @data_buf : user defined value to be written into Eeprom.
+ *  Description: Reads the values stored in the Eeprom at given offset
+ *  for a given length. Stores these values int the input argument data
+ *  buffer 'data_buf' and returns these to the caller (ethtool.)
+ *  Return value:
+ *  int  0 on success
  */
+
 int s2io_ethtool_geeprom(struct net_device *dev,
 			 struct ethtool_eeprom *eeprom, u8 * data_buf)
 {
@@ -3036,30 +3465,30 @@
 		eeprom->len = XENA_EEPROM_SPACE - eeprom->offset;
 
 	for (i = 0; i < eeprom->len; i += 4) {
-		data = readEeprom(sp, eeprom->offset + i);
-		if (data < 0) {
+		if (read_eeprom(sp, (eeprom->offset + i), &data)) {
 			DBG_PRINT(ERR_DBG, "Read of EEPROM failed\n");
 			return -EFAULT;
 		}
-		valid = inv(data);
+		valid = INV(data);
 		memcpy((data_buf + i), &valid, 4);
 	}
 	return 0;
 }
 
-/*
- * Input Argument/s: 
- *  sp - private member of the device structure, which is a pointer to the 
- *   	s2io_nic structure.
- *  eeprom - pointer to the user level structure provided by ethtool, 
- *   containing all relevant information.
- *  data_buf - user defined value to be written into Eeprom.
- * Return value:
- *  '0' on success, -EFAULT on failure.
- * Description:
+/**
+ *  s2io_ethtool_seeprom - tries to write the user provided value in Eeprom
+ *  @sp : private member of the device structure, which is a pointer to the
+ *  s2io_nic structure.
+ *  @eeprom : pointer to the user level structure provided by ethtool, 
+ *  containing all relevant information.
+ *  @data_buf ; user defined value to be written into Eeprom.
+ *  Description:
  *  Tries to write the user provided value in the Eeprom, at the offset
  *  given by the user.
+ *  Return value:
+ *  0 on success, -EFAULT on failure.
  */
+
 static int s2io_ethtool_seeprom(struct net_device *dev,
 				struct ethtool_eeprom *eeprom,
 				u8 * data_buf)
@@ -3083,7 +3512,7 @@
 		} else
 			valid = data;
 
-		if (writeEeprom(sp, (eeprom->offset + cnt), valid, 0)) {
+		if (write_eeprom(sp, (eeprom->offset + cnt), valid, 0)) {
 			DBG_PRINT(ERR_DBG,
 				  "ETHTOOL_WRITE_EEPROM Err: Cannot ");
 			DBG_PRINT(ERR_DBG,
@@ -3097,19 +3526,20 @@
 	return 0;
 }
 
-/*
- * Input Argument/s: 
- *  sp - private member of the device structure, which is a pointer to the 
- *   	s2io_nic structure.
- *  data - variable that returns the result of each of the test conducted by 
- *  	the driver.
- * Return value:
- *  '0' on success.
+/**
+ * s2io_register_test - reads and writes into all clock domains. 
+ * @sp : private member of the device structure, which is a pointer to the 
+ * s2io_nic structure.
+ * @data : variable that returns the result of each of the test conducted b
+ * by the driver.
  * Description:
- *  Read and write into all clock domains. The NIC has 3 clock domains,
- *  see that registers in all the three regions are accessible.
+ * Read and write into all clock domains. The NIC has 3 clock domains,
+ * see that registers in all the three regions are accessible.
+ * Return value:
+ * 0 on success.
  */
-static int s2io_registerTest(nic_t * sp, uint64_t * data)
+
+static int s2io_register_test(nic_t * sp, uint64_t * data)
 {
 	XENA_dev_config_t *bar0 = (XENA_dev_config_t *) sp->bar0;
 	u64 val64 = 0;
@@ -3159,88 +3589,91 @@
 	return 0;
 }
 
-/*
- * Input Argument/s: 
- *  sp - private member of the device structure, which is a pointer to the 
- *   	s2io_nic structure.
- *  data - variable that returns the result of each of the test conducted by 
- *  	the driver.
- * Return value:
- *  '0' on success.
+/**
+ * s2io_eeprom_test - to verify that EEprom in the xena can be programmed. 
+ * @sp : private member of the device structure, which is a pointer to the
+ * s2io_nic structure.
+ * @data:variable that returns the result of each of the test conducted by
+ * the driver.
  * Description:
- *  Verify that EEPROM in the xena can be programmed using I2C_CONTROL 
- *  register.
+ * Verify that EEPROM in the xena can be programmed using I2C_CONTROL 
+ * register.
+ * Return value:
+ * 0 on success.
  */
-static int s2io_eepromTest(nic_t * sp, uint64_t * data)
+
+static int s2io_eeprom_test(nic_t * sp, uint64_t * data)
 {
-	int fail = 0, ret_data;
+	int fail = 0;
+	u32 ret_data;
 
 	/* Test Write Error at offset 0 */
-	if (!writeEeprom(sp, 0, 0, 3))
+	if (!write_eeprom(sp, 0, 0, 3))
 		fail = 1;
 
 	/* Test Write at offset 4f0 */
-	if (writeEeprom(sp, 0x4F0, 0x01234567, 3))
+	if (write_eeprom(sp, 0x4F0, 0x01234567, 3))
 		fail = 1;
-	if ((ret_data = readEeprom(sp, 0x4f0)) < 0)
+	if (read_eeprom(sp, 0x4F0, &ret_data))
 		fail = 1;
 
 	if (ret_data != 0x01234567)
 		fail = 1;
 
 	/* Reset the EEPROM data go FFFF */
-	writeEeprom(sp, 0x4F0, 0xFFFFFFFF, 3);
+	write_eeprom(sp, 0x4F0, 0xFFFFFFFF, 3);
 
 	/* Test Write Request Error at offset 0x7c */
-	if (!writeEeprom(sp, 0x07C, 0, 3))
+	if (!write_eeprom(sp, 0x07C, 0, 3))
 		fail = 1;
 
 	/* Test Write Request at offset 0x7fc */
-	if (writeEeprom(sp, 0x7FC, 0x01234567, 3))
+	if (write_eeprom(sp, 0x7FC, 0x01234567, 3))
 		fail = 1;
-	if ((ret_data = readEeprom(sp, 0x7FC)) < 0)
+	if (read_eeprom(sp, 0x7FC, &ret_data))
 		fail = 1;
 
 	if (ret_data != 0x01234567)
 		fail = 1;
 
 	/* Reset the EEPROM data go FFFF */
-	writeEeprom(sp, 0x7FC, 0xFFFFFFFF, 3);
+	write_eeprom(sp, 0x7FC, 0xFFFFFFFF, 3);
 
 	/* Test Write Error at offset 0x80 */
-	if (!writeEeprom(sp, 0x080, 0, 3))
+	if (!write_eeprom(sp, 0x080, 0, 3))
 		fail = 1;
 
 	/* Test Write Error at offset 0xfc */
-	if (!writeEeprom(sp, 0x0FC, 0, 3))
+	if (!write_eeprom(sp, 0x0FC, 0, 3))
 		fail = 1;
 
 	/* Test Write Error at offset 0x100 */
-	if (!writeEeprom(sp, 0x100, 0, 3))
+	if (!write_eeprom(sp, 0x100, 0, 3))
 		fail = 1;
 
 	/* Test Write Error at offset 4ec */
-	if (!writeEeprom(sp, 0x4EC, 0, 3))
+	if (!write_eeprom(sp, 0x4EC, 0, 3))
 		fail = 1;
 
 	*data = fail;
 	return 0;
 }
 
-/*
- * Input Argument/s: 
- *  sp - private member of the device structure, which is a pointer to the 
- *   	s2io_nic structure.
- *  data - variable that returns the result of each of the test conducted by 
- *  	the driver.
- * Return value:
- *  '0' on success and -1 on failure.
+/**
+ * s2io_bist_test - invokes the MemBist test of the card .
+ * @sp : private member of the device structure, which is a pointer to the 
+ * s2io_nic structure.
+ * @data:variable that returns the result of each of the test conducted by 
+ * the driver.
  * Description:
- *  This invokes the MemBist test of the card. We give around
- *  2 secs time for the Test to complete. If it's still not complete
- *  within this peiod, we consider that the test failed. 
+ * This invokes the MemBist test of the card. We give around
+ * 2 secs time for the Test to complete. If it's still not complete
+ * within this peiod, we consider that the test failed. 
+ * Return value:
+ * 0 on success and -1 on failure.
  */
-static int s2io_bistTest(nic_t * sp, uint64_t * data)
+
+static int s2io_bist_test(nic_t * sp, uint64_t * data)
 {
 	u8 bist = 0;
 	int cnt = 0, ret = -1;
@@ -3264,19 +3697,20 @@
 	return ret;
 }
 
-/*
- * Input Argument/s: 
- *  sp - private member of the device structure, which is a pointer to the 
- *   	s2io_nic structure.
- *  data - variable that returns the result of each of the test conducted by 
- *  	the driver.
- * Return value:
- *  '0' on success.
+/**
+ * s2io-link_test - verifies the link state of the nic  
+ * @sp ; private member of the device structure, which is a pointer to the 
+ * s2io_nic structure.
+ * @data: variable that returns the result of each of the test conducted by
+ * the driver.
  * Description:
- *  The function verifies the link state of the NIC and updates the input 
- *  argument 'data' appropriately.
+ * The function verifies the link state of the NIC and updates the input 
+ * argument 'data' appropriately.
+ * Return value:
+ * 0 on success.
  */
-static int s2io_linkTest(nic_t * sp, uint64_t * data)
+
+static int s2io_link_test(nic_t * sp, uint64_t * data)
 {
 	XENA_dev_config_t *bar0 = (XENA_dev_config_t *) sp->bar0;
 	u64 val64;
@@ -3288,19 +3722,20 @@
 	return 0;
 }
 
-/*
- * Input Argument/s: 
- *  sp - private member of the device structure, which is a pointer to the 
- *   	s2io_nic structure.
- *  data - variable that returns the result of each of the test conducted by 
- *  	the driver.
- * Return value:
- *  '0' on success.
+/**
+ * s2io_rldram_test - offline test for access to the RldRam chip on the NIC 
+ * @sp - private member of the device structure, which is a pointer to the  
+ * s2io_nic structure.
+ * @data - variable that returns the result of each of the test 
+ * conducted by the driver.
  * Description:
  *  This is one of the offline test that tests the read and write 
  *  access to the RldRam chip on the NIC.
+ * Return value:
+ *  0 on success.
  */
-static int s2io_rldramTest(nic_t * sp, uint64_t * data)
+
+static int s2io_rldram_test(nic_t * sp, uint64_t * data)
 {
 	XENA_dev_config_t *bar0 = (XENA_dev_config_t *) sp->bar0;
 	u64 val64;
@@ -3316,10 +3751,10 @@
 
 	val64 = readq(&bar0->mc_rldram_mrs);
 	val64 |= MC_RLDRAM_QUEUE_SIZE_ENABLE;
-	writeq(val64, &bar0->mc_rldram_mrs);
+	SPECIAL_REG_WRITE(val64, &bar0->mc_rldram_mrs, UF);
 
 	val64 |= MC_RLDRAM_MRS_ENABLE;
-	writeq(val64, &bar0->mc_rldram_mrs);
+	SPECIAL_REG_WRITE(val64, &bar0->mc_rldram_mrs, UF);
 
 	while (iteration < 2) {
 		val64 = 0x55555555aaaa0000ULL;
@@ -3395,20 +3830,21 @@
 	return 0;
 }
 
-/*
- * Input Argument/s: 
- *  sp - private member of the device structure, which is a pointer to the 
- *   	s2io_nic structure.
- *  ethtest - pointer to a ethtool command specific structure that will be
- *  	returned to the user.
- *  data - variable that returns the result of each of the test conducted by 
- *  	the driver.
- * Return value:
- *  SUCCESS on success and an appropriate -1 on failure.
+/**
+ *  s2io_ethtool_test - conducts 6 tsets to determine the health of card.
+ *  @sp : private member of the device structure, which is a pointer to the
+ *  s2io_nic structure.
+ *  @ethtest : pointer to a ethtool command specific structure that will be
+ *  returned to the user.
+ *  @data : variable that returns the result of each of the test 
+ * conducted by the driver.
  * Description:
  *  This function conducts 6 tests ( 4 offline and 2 online) to determine
- *  	the health of the card.
+ *  the health of the card.
+ * Return value:
+ *  void
  */
+
 static void s2io_ethtool_test(struct net_device *dev,
 			      struct ethtool_test *ethtest,
 			      uint64_t * data)
@@ -3424,22 +3860,22 @@
 		} else
 			s2io_set_swapper(sp);
 
-		if (s2io_registerTest(sp, &data[0]))
+		if (s2io_register_test(sp, &data[0]))
 			ethtest->flags |= ETH_TEST_FL_FAILED;
 
 		s2io_reset(sp);
 		s2io_set_swapper(sp);
 
-		if (s2io_rldramTest(sp, &data[3]))
+		if (s2io_rldram_test(sp, &data[3]))
 			ethtest->flags |= ETH_TEST_FL_FAILED;
 
 		s2io_reset(sp);
 		s2io_set_swapper(sp);
 
-		if (s2io_eepromTest(sp, &data[1]))
+		if (s2io_eeprom_test(sp, &data[1]))
 			ethtest->flags |= ETH_TEST_FL_FAILED;
 
-		if (s2io_bistTest(sp, &data[4]))
+		if (s2io_bist_test(sp, &data[4]))
 			ethtest->flags |= ETH_TEST_FL_FAILED;
 
 		if (orig_state)
@@ -3459,7 +3895,7 @@
 			data[4] = -1;
 		}
 
-		if (s2io_linkTest(sp, &data[2]))
+		if (s2io_link_test(sp, &data[2]))
 			ethtest->flags |= ETH_TEST_FL_FAILED;
 
 		data[0] = 0;
@@ -3475,7 +3911,7 @@
 {
 	int i = 0;
 	nic_t *sp = dev->priv;
-	StatInfo_t *stat_info = sp->mac_control.StatsInfo;
+	StatInfo_t *stat_info = sp->mac_control.stats_info;
 
 	tmp_stats[i++] = stat_info->tmac_frms;
 	tmp_stats[i++] = stat_info->tmac_data_octets;
@@ -3567,6 +4003,17 @@
 	return (S2IO_STAT_LEN);
 }
 
+int s2io_ethtool_op_set_tx_csum(struct net_device *dev, u32 data)
+{
+	if (data)
+		dev->features |= NETIF_F_IP_CSUM;
+	else
+		dev->features &= ~NETIF_F_IP_CSUM;
+
+	return 0;
+}
+
+
 static struct ethtool_ops netdev_ethtool_ops = {
 	.get_settings = s2io_ethtool_gset,
 	.set_settings = s2io_ethtool_sset,
@@ -3582,7 +4029,7 @@
 	.get_rx_csum = s2io_ethtool_get_rx_csum,
 	.set_rx_csum = s2io_ethtool_set_rx_csum,
 	.get_tx_csum = ethtool_op_get_tx_csum,
-	.set_tx_csum = ethtool_op_set_tx_csum,
+	.set_tx_csum = s2io_ethtool_op_set_tx_csum,
 	.get_sg = ethtool_op_get_sg,
 	.set_sg = ethtool_op_set_sg,
 #ifdef NETIF_F_TSO
@@ -3597,36 +4044,37 @@
 	.get_ethtool_stats = s2io_get_ethtool_stats
 };
 
-/*
- *  Input Argument/s: 
- *  dev -   Device pointer.
- *  ifr -   An IOCTL specefic structure, that can contain a pointer to
- *      a proprietary structure used to pass information to the driver.
- *  cmd -   This is used to distinguish between the different commands that
- *      can be passed to the IOCTL functions.
- *  Return value:
- *  '0' on success and an appropriate (-)ve integer as defined in errno.h
- *  file on failure.
+/**
+ *  s2io_ioctl - Entry point for the Ioctl 
+ *  @dev :  Device pointer.
+ *  @ifr :  An IOCTL specefic structure, that can contain a pointer to
+ *  a proprietary structure used to pass information to the driver.
+ *  @cmd :  This is used to distinguish between the different commands that
+ *  can be passed to the IOCTL functions.
  *  Description:
  *  This function has support for ethtool, adding multiple MAC addresses on 
  *  the NIC and some DBG commands for the util tool.
+ *  Return value:
+ *  Currently the IOCTL supports no operations, hence by default this
+ *  function returns OP NOT SUPPORTED value.
  */
+
 int s2io_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 {
 	return -EOPNOTSUPP;
 }
 
-/*
- *  Input Argument/s: 
- *   dev - device pointer.
- *   new_mtu - the new MTU size for the device.
+/**
+ *  s2io_change_mtu - entry point to change MTU size for the device.
+ *   @dev : device pointer.
+ *   @new_mtu : the new MTU size for the device.
+ *   Description: A driver entry point to change MTU size for the device.
+ *   Before changing the MTU the device must be stopped.
  *  Return value:
- *   '0' on success and an appropriate (-)ve integer as defined in errno.h
+ *   0 on success and an appropriate (-)ve integer as defined in errno.h
  *   file on failure.
- *  Description:
- *   A driver entry point to change MTU size for the device. Before changing
- *   the MTU the device must be stopped.
  */
+
 int s2io_change_mtu(struct net_device *dev, int new_mtu)
 {
 	nic_t *sp = dev->priv;
@@ -3645,7 +4093,7 @@
 		return -EPERM;
 	}
 
-/* Set the new MTU into the PYLD register of the NIC */
+	/* Set the new MTU into the PYLD register of the NIC */
 	val64 = new_mtu;
 	writeq(vBIT(val64, 2, 14), &bar0->rmac_max_pyld_len);
 
@@ -3654,18 +4102,19 @@
 	return 0;
 }
 
-/*
- *  Input Argument/s: 
- *  dev_adr - address of the device structure in dma_addr_t format.
- *  Return value:
- *  void.
+/**
+ *  s2io_tasklet - Bottom half of the ISR.
+ *  @dev_adr : address of the device structure in dma_addr_t format.
  *  Description:
  *  This is the tasklet or the bottom half of the ISR. This is
  *  an extension of the ISR which is scheduled by the scheduler to be run 
  *  when the load on the CPU is low. All low priority tasks of the ISR can
  *  be pushed into the tasklet. For now the tasklet is used only to 
  *  replenish the Rx buffers in the Rx buffer descriptors.
+ *  Return value:
+ *  void.
  */
+
 static void s2io_tasklet(unsigned long dev_addr)
 {
 	struct net_device *dev = (struct net_device *) dev_addr;
@@ -3678,37 +4127,46 @@
 	config = &sp->config;
 
 	if (!TASKLET_IN_USE) {
-		for (i = 0; i < config->RxRingNum; i++) {
+		for (i = 0; i < config->rx_ring_num; i++) {
 			ret = fill_rx_buffers(sp, i);
 			if (ret == -ENOMEM) {
 				DBG_PRINT(ERR_DBG, "%s: Out of ",
 					  dev->name);
 				DBG_PRINT(ERR_DBG, "memory in tasklet\n");
-				return;
+				break;
 			} else if (ret == -EFILL) {
 				DBG_PRINT(ERR_DBG,
 					  "%s: Rx Ring %d is full\n",
 					  dev->name, i);
-				return;
+				break;
 			}
 		}
-		clear_bit(0, (unsigned long *) (&sp->tasklet_status));
+		clear_bit(0, (&sp->tasklet_status));
 	}
 }
 
-
-/*
- * Description:
- * 
+/**
+ * s2io_set_link - Set the LInk status
+ * @data: long pointer to device private structue
+ * Description: Sets the link status for the adapter
  */
+
 static void s2io_set_link(unsigned long data)
 {
 	nic_t *nic = (nic_t *) data;
 	struct net_device *dev = nic->dev;
 	XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0;
-	register u64 val64, err_reg;
+	register u64 val64;
+	u16 subid;
 
-	/* Allow a small delay for the NICs self initiated 
+	if (test_and_set_bit(0, &(nic->link_state))) {
+		/* The card is being reset, no point doing anything */
+		return;
+	}
+
+	subid = nic->pdev->subsystem_device;
+	/* 
+	 * Allow a small delay for the NICs self initiated 
 	 * cleanup to complete.
 	 */
 	set_current_state(TASK_UNINTERRUPTIBLE);
@@ -3716,16 +4174,19 @@
 
 	val64 = readq(&bar0->adapter_status);
 	if (verify_xena_quiescence(val64, nic->device_enabled_once)) {
-		/* Acknowledge interrupt and clear the R1 register */
-		err_reg = readq(&bar0->mac_rmac_err_reg);
-		writeq(err_reg, &bar0->mac_rmac_err_reg);
-
 		if (LINK_IS_UP(val64)) {
 			val64 = readq(&bar0->adapter_control);
 			val64 |= ADAPTER_CNTL_EN;
 			writeq(val64, &bar0->adapter_control);
-			val64 |= ADAPTER_LED_ON;
-			writeq(val64, &bar0->adapter_control);
+			if (CARDS_WITH_FAULTY_LINK_INDICATORS(subid)) {
+				val64 = readq(&bar0->gpio_control);
+				val64 |= GPIO_CTRL_GPIO_0;
+				writeq(val64, &bar0->gpio_control);
+				val64 = readq(&bar0->gpio_control);
+			} else {
+				val64 |= ADAPTER_LED_ON;
+				writeq(val64, &bar0->adapter_control);
+			}
 			val64 = readq(&bar0->adapter_status);
 			if (!LINK_IS_UP(val64)) {
 				DBG_PRINT(ERR_DBG, "%s:", dev->name);
@@ -3739,6 +4200,12 @@
 			}
 			s2io_link(nic, LINK_UP);
 		} else {
+			if (CARDS_WITH_FAULTY_LINK_INDICATORS(subid)) {
+				val64 = readq(&bar0->gpio_control);
+				val64 &= ~GPIO_CTRL_GPIO_0;
+				writeq(val64, &bar0->gpio_control);
+				val64 = readq(&bar0->gpio_control);
+			}
 			s2io_link(nic, LINK_DOWN);
 		}
 	} else {		/* NIC is not Quiescent. */
@@ -3746,39 +4213,149 @@
 		DBG_PRINT(ERR_DBG, "device is not Quiescent\n");
 		netif_stop_queue(dev);
 	}
+	clear_bit(0, &(nic->link_state));
 }
 
-/*
+static void s2io_card_down(nic_t * sp)
+{
+	int cnt = 0;
+	XENA_dev_config_t *bar0 = (XENA_dev_config_t *) sp->bar0;
+	unsigned long flags;
+	register u64 val64 = 0;
+
+	/* If s2io_set_link task is executing, wait till it completes. */
+	while (test_and_set_bit(0, &(sp->link_state))) {
+		set_current_state(TASK_UNINTERRUPTIBLE);
+		schedule_timeout(HZ / 20);
+	}
+	atomic_set(&sp->card_state, CARD_DOWN);
+
+	/* disable Tx and Rx traffic on the NIC */
+	stop_nic(sp);
+
+	/* Kill tasklet. */
+	tasklet_kill(&sp->task);
+
+	/* Check if the device is Quiescent and then Reset the NIC */
+	do {
+		val64 = readq(&bar0->adapter_status);
+		if (verify_xena_quiescence(val64, sp->device_enabled_once)) {
+			break;
+		}
+
+		set_current_state(TASK_UNINTERRUPTIBLE);
+		schedule_timeout(HZ / 20);
+		cnt++;
+		if (cnt == 10) {
+			DBG_PRINT(ERR_DBG,
+				  "s2io_close:Device not Quiescent ");
+			DBG_PRINT(ERR_DBG, "adaper status reads 0x%llx\n",
+				  (unsigned long long) val64);
+			break;
+		}
+	} while (1);
+	spin_lock_irqsave(&sp->tx_lock, flags);
+	s2io_reset(sp);
+
+	/* Free all unused Tx and Rx buffers */
+	free_tx_buffers(sp);
+	free_rx_buffers(sp);
+
+	spin_unlock_irqrestore(&sp->tx_lock, flags);
+	clear_bit(0, &(sp->link_state));
+}
+
+static int s2io_card_up(nic_t * sp)
+{
+	int i, ret;
+	mac_info_t *mac_control;
+	struct config_param *config;
+	struct net_device *dev = (struct net_device *) sp->dev;
+
+	/* Initialize the H/W I/O registers */
+	if (init_nic(sp) != 0) {
+		DBG_PRINT(ERR_DBG, "%s: H/W initialization failed\n",
+			  dev->name);
+		return -ENODEV;
+	}
+
+	/* 
+	 * Initializing the Rx buffers. For now we are considering only 1 
+	 * Rx ring and initializing buffers into 30 Rx blocks
+	 */
+	mac_control = &sp->mac_control;
+	config = &sp->config;
+
+	for (i = 0; i < config->rx_ring_num; i++) {
+		if ((ret = fill_rx_buffers(sp, i))) {
+			DBG_PRINT(ERR_DBG, "%s: Out of memory in Open\n",
+				  dev->name);
+			s2io_reset(sp);
+			free_rx_buffers(sp);
+			return -ENOMEM;
+		}
+		DBG_PRINT(INFO_DBG, "Buf in ring:%d is %d:\n", i,
+			  atomic_read(&sp->rx_bufs_left[i]));
+	}
+
+	/* Setting its receive mode */
+	s2io_set_multicast(dev);
+
+	/* Enable tasklet for the device */
+	tasklet_init(&sp->task, s2io_tasklet, (unsigned long) dev);
+
+	/* Enable Rx Traffic and interrupts on the NIC */
+	if (start_nic(sp)) {
+		DBG_PRINT(ERR_DBG, "%s: Starting NIC failed\n", dev->name);
+		tasklet_kill(&sp->task);
+		s2io_reset(sp);
+		free_irq(dev->irq, dev);
+		free_rx_buffers(sp);
+		return -ENODEV;
+	}
+
+	atomic_set(&sp->card_state, CARD_UP);
+	return 0;
+}
+
+/** 
+ * s2io_restart_nic - Resets the NIC.
+ * @data : long pointer to the device private structure
  * Description:
  * This function is scheduled to be run by the s2io_tx_watchdog
  * function after 0.5 secs to reset the NIC. The idea is to reduce 
  * the run time of the watch dog routine which is run holding a
  * spin lock.
  */
+
 static void s2io_restart_nic(unsigned long data)
 {
 	struct net_device *dev = (struct net_device *) data;
 	nic_t *sp = dev->priv;
 
-	s2io_close(dev);
-	sp->device_close_flag = TRUE;
-	s2io_open(dev);
-	DBG_PRINT(ERR_DBG,
-		  "%s: was reset by Tx watchdog timer.\n", dev->name);
+	s2io_card_down(sp);
+	if (s2io_card_up(sp)) {
+		DBG_PRINT(ERR_DBG, "%s: Device bring up failed\n",
+			  dev->name);
+	}
+	netif_wake_queue(dev);
+	DBG_PRINT(ERR_DBG, "%s: was reset by Tx watchdog timer\n",
+		  dev->name);
 }
 
-/*
- *  Input Argument/s: 
- *  dev - device pointer.
- *  Return value:
- *  void
+/** 
+ *  s2io_tx_watchdog - Watchdog for transmit side. 
+ *  @dev : Pointer to net device structure
  *  Description:
  *  This function is triggered if the Tx Queue is stopped
  *  for a pre-defined amount of time when the Interface is still up.
  *  If the Interface is jammed in such a situation, the hardware is
  *  reset (by s2io_close) and restarted again (by s2io_open) to
  *  overcome any problem that might have been caused in the hardware.
+ *  Return value:
+ *  void
  */
+
 static void s2io_tx_watchdog(struct net_device *dev)
 {
 	nic_t *sp = dev->priv;
@@ -3788,36 +4365,45 @@
 	}
 }
 
-/*
- *  Input Argument/s: 
- *   sp - private member of the device structure, which is a pointer to the 
- *   s2io_nic structure.
- *   skb - the socket buffer pointer.
- *   len - length of the packet
- *   cksum - FCS checksum of the frame.
- *  ring_no - the ring from which this RxD was extracted.
- *  Return value:
- *   SUCCESS on success and -1 on failure.
- *  Description: 
- *   This function is called by the Tx interrupt serivce routine to perform 
+/**
+ *   rx_osm_handler - To perform some OS related operations on SKB.
+ *   @sp: private member of the device structure,pointer to s2io_nic structure.
+ *   @skb : the socket buffer pointer.
+ *   @len : length of the packet
+ *   @cksum : FCS checksum of the frame.
+ *   @ring_no : the ring from which this RxD was extracted.
+ *   Description: 
+ *   This function is called by the Tx interrupt serivce routine to perform
  *   some OS related operations on the SKB before passing it to the upper
  *   layers. It mainly checks if the checksum is OK, if so adds it to the
  *   SKBs cksum variable, increments the Rx packet count and passes the SKB
  *   to the upper layer. If the checksum is wrong, it increments the Rx
  *   packet error count, frees the SKB and returns error.
+ *   Return value:
+ *   SUCCESS on success and -1 on failure.
  */
-static int rxOsmHandler(nic_t * sp, u16 len, RxD_t * rxdp, int ring_no)
+#ifndef CONFIG_2BUFF_MODE
+static int rx_osm_handler(nic_t * sp, u16 len, RxD_t * rxdp, int ring_no)
+#else
+static int rx_osm_handler(nic_t * sp, RxD_t * rxdp, int ring_no,
+			  buffAdd_t * ba)
+#endif
 {
 	struct net_device *dev = (struct net_device *) sp->dev;
 	struct sk_buff *skb =
 	    (struct sk_buff *) ((unsigned long) rxdp->Host_Control);
 	u16 l3_csum, l4_csum;
+#ifdef CONFIG_2BUFF_MODE
+	int buf0_len, buf2_len;
+	unsigned char *buff;
+#endif
 
 	l3_csum = RXD_GET_L3_CKSUM(rxdp->Control_1);
 	if ((rxdp->Control_1 & TCP_OR_UDP_FRAME) && (sp->rx_csum)) {
 		l4_csum = RXD_GET_L4_CKSUM(rxdp->Control_1);
 		if ((l3_csum == L3_CKSUM_OK) && (l4_csum == L4_CKSUM_OK)) {
-			/* NIC verifies if the Checksum of the received
+			/* 
+			 * NIC verifies if the Checksum of the received
 			 * frame is Ok or not and accordingly returns
 			 * a flag in the RxD.
 			 */
@@ -3833,9 +4419,26 @@
 		skb->ip_summed = CHECKSUM_NONE;
 	}
 
+	if (rxdp->Control_1 & RXD_T_CODE) {
+		unsigned long long err = rxdp->Control_1 & RXD_T_CODE;
+		DBG_PRINT(ERR_DBG, "%s: Rx error Value: 0x%llx\n",
+			  dev->name, err);
+	}
+#ifdef CONFIG_2BUFF_MODE
+	buf0_len = RXD_GET_BUFFER0_SIZE(rxdp->Control_2);
+	buf2_len = RXD_GET_BUFFER2_SIZE(rxdp->Control_2);
+#endif
+
 	skb->dev = dev;
+#ifndef CONFIG_2BUFF_MODE
 	skb_put(skb, len);
 	skb->protocol = eth_type_trans(skb, dev);
+#else
+	buff = skb_push(skb, buf0_len);
+	memcpy(buff, ba->ba_0, buf0_len);
+	skb_put(skb, buf2_len);
+	skb->protocol = eth_type_trans(skb, dev);
+#endif
 
 #ifdef CONFIG_S2IO_NAPI
 	netif_receive_skb(skb);
@@ -3844,50 +4447,32 @@
 #endif
 
 	dev->last_rx = jiffies;
-#if DEBUG_ON
-	sp->rxpkt_cnt++;
-#endif
 	sp->rx_pkt_count++;
 	sp->stats.rx_packets++;
+#ifndef CONFIG_2BUFF_MODE
 	sp->stats.rx_bytes += len;
-	sp->rxpkt_bytes += len;
+#else
+	sp->stats.rx_bytes += buf0_len + buf2_len;
+#endif
 
 	atomic_dec(&sp->rx_bufs_left[ring_no]);
 	rxdp->Host_Control = 0;
 	return SUCCESS;
 }
 
-int check_for_txSpace(nic_t * sp)
-{
-	u32 put_off, get_off, queue_len;
-	int ret = TRUE, i;
-
-	for (i = 0; i < sp->config.TxFIFONum; i++) {
-		queue_len = sp->mac_control.tx_curr_put_info[i].fifo_len
-		    + 1;
-		put_off = sp->mac_control.tx_curr_put_info[i].offset;
-		get_off = sp->mac_control.tx_curr_get_info[i].offset;
-		if (((put_off + 1) % queue_len) == get_off) {
-			ret = FALSE;
-			break;
-		}
-	}
-
-	return ret;
-}
+/**
+ *  s2io_link - stops/starts the Tx queue.
+ *  @sp : private member of the device structure, which is a pointer to the
+ *  s2io_nic structure.
+ *  @link : inidicates whether link is UP/DOWN.
+ *  Description:
+ *  This function stops/starts the Tx queue depending on whether the link
+ *  status of the NIC is is down or up. This is called by the Alarm 
+ *  interrupt handler whenever a link change interrupt comes up. 
+ *  Return value:
+ *  void.
+ */
 
-/*
-*  Input Argument/s: 
-*   sp - private member of the device structure, which is a pointer to the 
-*   s2io_nic structure.
-*   link - inidicates whether link is UP/DOWN.
-*  Return value:
-*   void.
-*  Description:
-*   This function stops/starts the Tx queue depending on whether the link
-*   status of the NIC is is down or up. This is called by the Alarm interrupt 
-*  handler whenever a link change interrupt comes up. 
-*/
 void s2io_link(nic_t * sp, int link)
 {
 	struct net_device *dev = (struct net_device *) sp->dev;
@@ -3896,29 +4481,23 @@
 		if (link == LINK_DOWN) {
 			DBG_PRINT(ERR_DBG, "%s: Link down\n", dev->name);
 			netif_carrier_off(dev);
-			netif_stop_queue(dev);
 		} else {
 			DBG_PRINT(ERR_DBG, "%s: Link Up\n", dev->name);
 			netif_carrier_on(dev);
-			if (check_for_txSpace(sp) == TRUE) {
-				/* Don't wake the queue, if we know there
-				 * are no free TxDs available.
-				 */
-				netif_wake_queue(dev);
-			}
 		}
 	}
 	sp->last_link_state = link;
 }
 
-/*
-*  Input Argument/s: 
-*   pdev - structure containing the PCI related information of the device.
-*  Return value:
-*   returns the revision ID of the device.
-*  Description:
-*   Function to identify the Revision ID of xena.
-*/
+/**
+ *  get_xena_rev_id - to identify revision ID of xena. 
+ *  @pdev : PCI Dev structure
+ *  Description:
+ *  Function to identify the Revision ID of xena.
+ *  Return value:
+ *  returns the revision ID of the device.
+ */
+
 int get_xena_rev_id(struct pci_dev *pdev)
 {
 	u8 id = 0;
@@ -3927,21 +4506,22 @@
 	return id;
 }
 
-/*
-*  Input Argument/s: 
-*   sp - private member of the device structure, which is a pointer to the 
-*   s2io_nic structure.
-*  Return value:
-*   void
-*  Description:
-*   This function initializes a few of the PCI and PCI-X configuration registers
-*   with recommended values.
-*/
+/**
+ *  s2io_init_pci -Initialization of PCI and PCI-X configuration registers . 
+ *  @sp : private member of the device structure, which is a pointer to the 
+ *  s2io_nic structure.
+ *  Description:
+ *  This function initializes a few of the PCI and PCI-X configuration registers
+ *  with recommended values.
+ *  Return value:
+ *  void
+ */
+
 static void s2io_init_pci(nic_t * sp)
 {
 	u16 pci_cmd = 0;
 
-/* Enable Data Parity Error Recovery in PCI-X command register. */
+	/* Enable Data Parity Error Recovery in PCI-X command register. */
 	pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER,
 			     &(sp->pcix_cmd));
 	pci_write_config_word(sp->pdev, PCIX_COMMAND_REGISTER,
@@ -3949,63 +4529,64 @@
 	pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER,
 			     &(sp->pcix_cmd));
 
-/* Set the PErr Response bit in PCI command register. */
+	/* Set the PErr Response bit in PCI command register. */
 	pci_read_config_word(sp->pdev, PCI_COMMAND, &pci_cmd);
 	pci_write_config_word(sp->pdev, PCI_COMMAND,
 			      (pci_cmd | PCI_COMMAND_PARITY));
 	pci_read_config_word(sp->pdev, PCI_COMMAND, &pci_cmd);
 
-/* Set user specified value in Latency Timer */
-	if (latency_timer) {
-		pci_write_config_byte(sp->pdev, PCI_LATENCY_TIMER,
-				      latency_timer);
-		pci_read_config_byte(sp->pdev, PCI_LATENCY_TIMER,
-				     &latency_timer);
-	}
-
-/* Set MMRB count to 4096 in PCI-X Command register. */
-	pci_write_config_word(sp->pdev, PCIX_COMMAND_REGISTER,
-			      (sp->pcix_cmd | 0x0C));
+	/* Set MMRB count to 1024 in PCI-X Command register. */
+	sp->pcix_cmd &= 0xFFF3;
+	pci_write_config_word(sp->pdev, PCIX_COMMAND_REGISTER, (sp->pcix_cmd | (0x1 << 2)));	/* MMRBC 1K */
 	pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER,
 			     &(sp->pcix_cmd));
 
-/* Setting Maximum outstanding splits to two for now. */
-	sp->pcix_cmd &= 0xFF1F;
+	/*  Setting Maximum outstanding splits based on system type. */
+	sp->pcix_cmd &= 0xFF8F;
 
-	sp->pcix_cmd |=
-	    XENA_MAX_OUTSTANDING_SPLITS(XENA_TWO_SPLIT_TRANSACTION);
+	sp->pcix_cmd |= XENA_MAX_OUTSTANDING_SPLITS(0x1);	/* 2 splits. */
+	pci_write_config_word(sp->pdev, PCIX_COMMAND_REGISTER,
+			      sp->pcix_cmd);
+	pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER,
+			     &(sp->pcix_cmd));
+	/* Forcibly disabling relaxed ordering capability of the card. */
+	sp->pcix_cmd &= 0xfffd;
 	pci_write_config_word(sp->pdev, PCIX_COMMAND_REGISTER,
 			      sp->pcix_cmd);
 	pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER,
 			     &(sp->pcix_cmd));
-
 }
 
 MODULE_AUTHOR("Raghavendra Koushik <raghavendra.koushik@s2io.com>");
 MODULE_LICENSE("GPL");
-module_param(ring_num, uint, 0);
-module_param_array(frame_len, uint, NULL, 0);
-module_param_array(ring_len, uint, NULL, 0);
-module_param(fifo_num, uint, 0);
-module_param_array(fifo_len, uint, NULL, 0);
-module_param(rx_prio, uint, 0);
-module_param(tx_prio, uint, 0);
-module_param(latency_timer, byte, 0);
-
-/*
-*  Input Argument/s: 
-*   pdev - structure containing the PCI related information of the device.
-*   pre -  the List of PCI devices supported by the driver listed in s2io_tbl.
-*  Return value:
-*   returns '0' on success and negative on failure.
-*  Description:
-*  The function initializes an adapter identified by the pci_dec structure.
-*  All OS related initialization including memory and device structure and 
-*  initlaization of the device private variable is done. Also the swapper 
-*  control register is initialized to enable read and write into the I/O 
-*  registers of the device.
-*  
-*/
+module_param(tx_fifo_num, int, 0);
+module_param_array(tx_fifo_len, int, NULL, 0);
+module_param(rx_ring_num, int, 0);
+module_param_array(rx_ring_sz, int, NULL, 0);
+module_param(Stats_refresh_time, int, 0);
+module_param(rmac_pause_time, int, 0);
+module_param(mc_pause_threshold_q0q3, int, 0);
+module_param(mc_pause_threshold_q4q7, int, 0);
+module_param(shared_splits, int, 0);
+module_param(tmac_util_period, int, 0);
+module_param(rmac_util_period, int, 0);
+#ifndef CONFIG_S2IO_NAPI
+module_param(indicate_max_pkts, int, 0);
+#endif
+/**
+ *  s2io_init_nic - Initialization of the adapter . 
+ *  @pdev : structure containing the PCI related information of the device.
+ *  @pre: List of PCI devices supported by the driver listed in s2io_tbl.
+ *  Description:
+ *  The function initializes an adapter identified by the pci_dec structure.
+ *  All OS related initialization including memory and device structure and 
+ *  initlaization of the device private variable is done. Also the swapper 
+ *  control register is initialized to enable read and write into the I/O 
+ *  registers of the device.
+ *  Return value:
+ *  returns 0 on success and negative on failure.
+ */
+
 static int __devinit
 s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre)
 {
@@ -4022,6 +4603,9 @@
 	struct config_param *config;
 
 
+	DBG_PRINT(ERR_DBG, "Loading S2IO driver with %s\n",
+		s2io_driver_version);
+
 	if ((ret = pci_enable_device(pdev))) {
 		DBG_PRINT(ERR_DBG,
 			  "s2io_init_nic: pci_enable_device failed\n");
@@ -4031,6 +4615,7 @@
 	if (!pci_set_dma_mask(pdev, 0xffffffffffffffffULL)) {
 		DBG_PRINT(INIT_DBG, "s2io_init_nic: Using 64bit DMA\n");
 		dma_flag = TRUE;
+
 		if (pci_set_consistent_dma_mask
 		    (pdev, 0xffffffffffffffffULL)) {
 			DBG_PRINT(ERR_DBG,
@@ -4080,7 +4665,8 @@
 	/* Initialize some PCI/PCI-X fields of the NIC. */
 	s2io_init_pci(sp);
 
-	/* Setting the device configuration parameters.
+	/* 
+	 * Setting the device configuration parameters.
 	 * Most of these parameters can be specified by the user during 
 	 * module insertion as they are module loadable parameters. If 
 	 * these parameters are not not specified during load time, they 
@@ -4090,88 +4676,54 @@
 	config = &sp->config;
 
 	/* Tx side parameters. */
-	config->TxFIFONum = fifo_num ? fifo_num : 1;
-
-	if (!fifo_len[0] && (fifo_num > 1)) {
-		printk(KERN_ERR "Fifo Lens not specified for all FIFOs\n");
-		goto init_failed;
-	}
-
-	if (fifo_len[0]) {
-		int cnt;
-
-		for (cnt = 0; fifo_len[cnt]; cnt++);
-		if (fifo_num) {
-			if (cnt < fifo_num) {
-				printk(KERN_ERR
-				       "Fifo Lens not specified for ");
-				printk(KERN_ERR "all FIFOs\n");
-				goto init_failed;
-			}
-		}
-		for (cnt = 0; cnt < config->TxFIFONum; cnt++) {
-			config->TxCfg[cnt].FifoLen = fifo_len[cnt];
-			config->TxCfg[cnt].FifoPriority = cnt;
-		}
-	} else {
-		config->TxCfg[0].FifoLen = DEFAULT_FIFO_LEN;
-		config->TxCfg[0].FifoPriority = 0;
+	tx_fifo_len[0] = DEFAULT_FIFO_LEN;	/* Default value. */
+	config->tx_fifo_num = tx_fifo_num;
+	for (i = 0; i < MAX_TX_FIFOS; i++) {
+		config->tx_cfg[i].fifo_len = tx_fifo_len[i];
+		config->tx_cfg[i].fifo_priority = i;
 	}
 
-	config->TxIntrType = TXD_INT_TYPE_UTILZ;
-	for (i = 0; i < config->TxFIFONum; i++) {
-		if (config->TxCfg[i].FifoLen < 65) {
-			config->TxIntrType = TXD_INT_TYPE_PER_LIST;
+	config->tx_intr_type = TXD_INT_TYPE_UTILZ;
+	for (i = 0; i < config->tx_fifo_num; i++) {
+		config->tx_cfg[i].f_no_snoop =
+		    (NO_SNOOP_TXD | NO_SNOOP_TXD_BUFFER);
+		if (config->tx_cfg[i].fifo_len < 65) {
+			config->tx_intr_type = TXD_INT_TYPE_PER_LIST;
 			break;
 		}
 	}
-
-	config->TxCfg[0].fNoSnoop = (NO_SNOOP_TXD | NO_SNOOP_TXD_BUFFER);
-	config->MaxTxDs = MAX_SKB_FRAGS;
-	config->TxFlow = TRUE;
+	config->max_txds = MAX_SKB_FRAGS;
 
 	/* Rx side parameters. */
-	config->RxRingNum = ring_num ? ring_num : 1;
-
-	if (ring_len[0]) {
-		int cnt;
-		for (cnt = 0; cnt < config->RxRingNum; cnt++) {
-			config->RxCfg[cnt].NumRxd = ring_len[cnt];
-			config->RxCfg[cnt].RingPriority = cnt;
-		}
-	} else {
-		int id;
-		if ((id = get_xena_rev_id(pdev)) == 1) {
-			config->RxCfg[0].NumRxd = LARGE_RXD_CNT;
+	rx_ring_sz[0] = SMALL_BLK_CNT;	/* Default value. */
+	config->rx_ring_num = rx_ring_num;
+	for (i = 0; i < MAX_RX_RINGS; i++) {
+		config->rx_cfg[i].num_rxd = rx_ring_sz[i] *
+		    (MAX_RXDS_PER_BLOCK + 1);
+		config->rx_cfg[i].ring_priority = i;
+	}
 
-		} else {
-			config->RxCfg[0].NumRxd = SMALL_RXD_CNT;
-		}
-		config->RxCfg[0].RingPriority = 0;
+	for (i = 0; i < rx_ring_num; i++) {
+		config->rx_cfg[i].ring_org = RING_ORG_BUFF1;
+		config->rx_cfg[i].f_no_snoop =
+		    (NO_SNOOP_RXD | NO_SNOOP_RXD_BUFFER);
 	}
-	config->RxCfg[0].RingOrg = RING_ORG_BUFF1;
-	config->RxCfg[0].RxdThresh = DEFAULT_RXD_THRESHOLD;
-	config->RxCfg[0].fNoSnoop = (NO_SNOOP_RXD | NO_SNOOP_RXD_BUFFER);
-	config->RxCfg[0].RxD_BackOff_Interval = TBD;
-	config->RxFlow = TRUE;
-
-	/* Miscellaneous parameters. */
-	config->RxVLANEnable = TRUE;
-	config->MTU = MAX_MTU_VLAN;
-	config->JumboEnable = FALSE;
 
 	/*  Setting Mac Control parameters */
-	mac_control->txdl_len = MAX_SKB_FRAGS;
-	mac_control->rmac_pause_time = 0;
+	mac_control->rmac_pause_time = rmac_pause_time;
+	mac_control->mc_pause_threshold_q0q3 = mc_pause_threshold_q0q3;
+	mac_control->mc_pause_threshold_q4q7 = mc_pause_threshold_q4q7;
+
 
 	/* Initialize Ring buffer parameters. */
-	for (i = 0; i < config->RxRingNum; i++)
+	for (i = 0; i < config->rx_ring_num; i++)
 		atomic_set(&sp->rx_bufs_left[i], 0);
 
 	/*  initialize the shared memory used by the NIC and the host */
-	if (initSharedMem(sp)) {
+	if (init_shared_mem(sp)) {
 		DBG_PRINT(ERR_DBG, "%s: Memory allocation failed\n",
 			  dev->name);
+		ret = -ENOMEM;
 		goto mem_alloc_failed;
 	}
 
@@ -4180,6 +4732,7 @@
 	if (!sp->bar0) {
 		DBG_PRINT(ERR_DBG, "%s: S2IO: cannot remap io mem1\n",
 			  dev->name);
+		ret = -ENOMEM;
 		goto bar0_remap_failed;
 	}
 
@@ -4188,6 +4741,7 @@
 	if (!sp->bar1) {
 		DBG_PRINT(ERR_DBG, "%s: S2IO: cannot remap io mem2\n",
 			  dev->name);
+		ret = -ENOMEM;
 		goto bar1_remap_failed;
 	}
 
@@ -4209,14 +4763,13 @@
 	dev->do_ioctl = &s2io_ioctl;
 	dev->change_mtu = &s2io_change_mtu;
 	SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops);
-
 	/*
 	 * will use eth_mac_addr() for  dev->set_mac_address
 	 * mac address will be set every time dev->open() is called
 	 */
 #ifdef CONFIG_S2IO_NAPI
 	dev->poll = s2io_poll;
-	dev->weight = 128;	/* For now. */
+	dev->weight = 90;
 #endif
 
 	dev->features |= NETIF_F_SG | NETIF_F_IP_CSUM;
@@ -4233,77 +4786,84 @@
 	INIT_WORK(&sp->set_link_task,
 		  (void (*)(void *)) s2io_set_link, sp);
 
-	if (register_netdev(dev)) {
-		DBG_PRINT(ERR_DBG, "Device registration failed\n");
-		goto register_failed;
-	}
-
 	pci_save_state(sp->pdev);
 
 	/* Setting swapper control on the NIC, for proper reset operation */
 	if (s2io_set_swapper(sp)) {
 		DBG_PRINT(ERR_DBG, "%s:swapper settings are wrong\n",
 			  dev->name);
+		ret = -EAGAIN;
 		goto set_swap_failed;
 	}
 
 	/* Fix for all "FFs" MAC address problems observed on Alpha platforms */
-	FixMacAddress(sp);
+	fix_mac_address(sp);
 	s2io_reset(sp);
 
-	/* Setting swapper control on the NIC, so the MAC address can be read.
+	/*
+	 * Setting swapper control on the NIC, so the MAC address can be read.
 	 */
 	if (s2io_set_swapper(sp)) {
 		DBG_PRINT(ERR_DBG,
 			  "%s: S2IO: swapper settings are wrong\n",
 			  dev->name);
+		ret = -EAGAIN;
 		goto set_swap_failed;
 	}
 
-	/*  MAC address initialization.
-	 *  For now only one mac address will be read and used.
+	/*  
+	 * MAC address initialization.
+	 * For now only one mac address will be read and used.
 	 */
 	bar0 = (XENA_dev_config_t *) sp->bar0;
 	val64 = RMAC_ADDR_CMD_MEM_RD | RMAC_ADDR_CMD_MEM_STROBE_NEW_CMD |
 	    RMAC_ADDR_CMD_MEM_OFFSET(0 + MAC_MAC_ADDR_START_OFFSET);
 	writeq(val64, &bar0->rmac_addr_cmd_mem);
-	waitForCmdComplete(sp);
+	wait_for_cmd_complete(sp);
 
 	tmp64 = readq(&bar0->rmac_addr_data0_mem);
 	mac_down = (u32) tmp64;
 	mac_up = (u32) (tmp64 >> 32);
 
-	memset(sp->defMacAddr[0].mac_addr, 0, sizeof(ETH_ALEN));
+	memset(sp->def_mac_addr[0].mac_addr, 0, sizeof(ETH_ALEN));
 
-	sp->defMacAddr[0].mac_addr[3] = (u8) (mac_up);
-	sp->defMacAddr[0].mac_addr[2] = (u8) (mac_up >> 8);
-	sp->defMacAddr[0].mac_addr[1] = (u8) (mac_up >> 16);
-	sp->defMacAddr[0].mac_addr[0] = (u8) (mac_up >> 24);
-	sp->defMacAddr[0].mac_addr[5] = (u8) (mac_down >> 16);
-	sp->defMacAddr[0].mac_addr[4] = (u8) (mac_down >> 24);
+	sp->def_mac_addr[0].mac_addr[3] = (u8) (mac_up);
+	sp->def_mac_addr[0].mac_addr[2] = (u8) (mac_up >> 8);
+	sp->def_mac_addr[0].mac_addr[1] = (u8) (mac_up >> 16);
+	sp->def_mac_addr[0].mac_addr[0] = (u8) (mac_up >> 24);
+	sp->def_mac_addr[0].mac_addr[5] = (u8) (mac_down >> 16);
+	sp->def_mac_addr[0].mac_addr[4] = (u8) (mac_down >> 24);
 
 	DBG_PRINT(INIT_DBG,
 		  "DEFAULT MAC ADDR:0x%02x-%02x-%02x-%02x-%02x-%02x\n",
-		  sp->defMacAddr[0].mac_addr[0],
-		  sp->defMacAddr[0].mac_addr[1],
-		  sp->defMacAddr[0].mac_addr[2],
-		  sp->defMacAddr[0].mac_addr[3],
-		  sp->defMacAddr[0].mac_addr[4],
-		  sp->defMacAddr[0].mac_addr[5]);
+		  sp->def_mac_addr[0].mac_addr[0],
+		  sp->def_mac_addr[0].mac_addr[1],
+		  sp->def_mac_addr[0].mac_addr[2],
+		  sp->def_mac_addr[0].mac_addr[3],
+		  sp->def_mac_addr[0].mac_addr[4],
+		  sp->def_mac_addr[0].mac_addr[5]);
 
 	/*  Set the factory defined MAC address initially   */
 	dev->addr_len = ETH_ALEN;
-	memcpy(dev->dev_addr, sp->defMacAddr, ETH_ALEN);
+	memcpy(dev->dev_addr, sp->def_mac_addr, ETH_ALEN);
 
-	/*  Initialize the tasklet status flag */
-	atomic_set(&(sp->tasklet_status), 0);
+	/*
+	 * Initialize the tasklet status and link state flags 
+	 * and the card statte parameter
+	 */
+	atomic_set(&(sp->card_state), 0);
+	sp->tasklet_status = 0;
+	sp->link_state = 0;
 
 
 	/* Initialize spinlocks */
-	spin_lock_init(&sp->isr_lock);
 	spin_lock_init(&sp->tx_lock);
+#ifndef CONFIG_S2IO_NAPI
+	spin_lock_init(&sp->put_lock);
+#endif
 
-	/* SXE-002: Configure link and activity LED to init state 
+	/* 
+	 * SXE-002: Configure link and activity LED to init state 
 	 * on driver load. 
 	 */
 	subid = sp->pdev->subsystem_device;
@@ -4316,45 +4876,49 @@
 		val64 = readq(&bar0->gpio_control);
 	}
 
-	/* Make Link state as off at this point, when the Link change 
+	sp->rx_csum = 1;	/* Rx chksum verify enabled by default */
+
+	if (register_netdev(dev)) {
+		DBG_PRINT(ERR_DBG, "Device registration failed\n");
+		ret = -ENODEV;
+		goto register_failed;
+	}
+
+	/* 
+	 * Make Link state as off at this point, when the Link change 
 	 * interrupt comes the state will be automatically changed to 
 	 * the right state.
 	 */
 	netif_carrier_off(dev);
 	sp->last_link_state = LINK_DOWN;
 
-	sp->rx_csum = 1;	/* Rx chksum verify enabled by default */
-
 	return 0;
 
-      set_swap_failed:
-	unregister_netdev(dev);
       register_failed:
+      set_swap_failed:
 	iounmap(sp->bar1);
       bar1_remap_failed:
 	iounmap(sp->bar0);
       bar0_remap_failed:
       mem_alloc_failed:
-	freeSharedMem(sp);
-      init_failed:
+	free_shared_mem(sp);
 	pci_disable_device(pdev);
 	pci_release_regions(pdev);
 	pci_set_drvdata(pdev, NULL);
 	free_netdev(dev);
 
-	return -ENODEV;
+	return ret;
 }
 
-/*
-*  Input Argument/s: 
-*   pdev - structure containing the PCI related information of the device.
-*  Return value:
-*  void
-*  Description:
-*  This function is called by the Pci subsystem to release a PCI device 
-*  and free up all resource held up by the device. This could be in response 
-*  to a Hot plug event or when the driver is to be removed from memory.
-*/
+/**
+ * s2io_rem_nic - Free the PCI device 
+ * @pdev: structure containing the PCI related information of the device.
+ * Description: This function is called by the Pci subsystem to release a 
+ * PCI device and free up all resource held up by the device. This could
+ * be in response to a Hot plug event or when the driver is to be removed 
+ * from memory.
+ */
+
 static void __devexit s2io_rem_nic(struct pci_dev *pdev)
 {
 	struct net_device *dev =
@@ -4365,23 +4929,35 @@
 		DBG_PRINT(ERR_DBG, "Driver Data is NULL!!\n");
 		return;
 	}
+
 	sp = dev->priv;
-	freeSharedMem(sp);
+	unregister_netdev(dev);
+
+	free_shared_mem(sp);
 	iounmap(sp->bar0);
 	iounmap(sp->bar1);
 	pci_disable_device(pdev);
 	pci_release_regions(pdev);
 	pci_set_drvdata(pdev, NULL);
 
-	unregister_netdev(dev);
-
 	free_netdev(dev);
 }
 
+/**
+ * s2io_starter - Entry point for the driver
+ * Description: This function is the entry point for the driver. It verifies
+ * the module loadable parameters and initializes PCI configuration space.
+ */
+
 int __init s2io_starter(void)
 {
 	return pci_module_init(&s2io_driver);
 }
+
+/**
+ * s2io_closer - Cleanup routine for the driver 
+ * Description: This function is the cleanup routine for the driver. It unregist * ers the driver.
+ */
 
 void s2io_closer(void)
 {
diff -Nru a/drivers/net/s2io.h b/drivers/net/s2io.h
--- a/drivers/net/s2io.h	2005-01-10 20:11:17 -08:00
+++ b/drivers/net/s2io.h	2005-01-10 20:11:17 -08:00
@@ -16,6 +16,7 @@
 #define TBD 0
 #define BIT(loc)		(0x8000000000000000ULL >> (loc))
 #define vBIT(val, loc, sz)	(((u64)val) << (64-loc-sz))
+#define INV(d)  ((d&0xff)<<24) | (((d>>8)&0xff)<<16) | (((d>>16)&0xff)<<8)| ((d>>24)&0xff)
 
 #ifndef BOOL
 #define BOOL    int
@@ -52,8 +53,6 @@
 /*
  * Debug related variables.
  */
-#define DEBUG_ON TRUE
-
 /* different debug levels. */
 #define	ERR_DBG		0
 #define	INIT_DBG	1
@@ -62,7 +61,7 @@
 #define	INTR_DBG	4
 
 /* Global variable that defines the present debug level of the driver. */
-int debug_level = ERR_DBG;	/* Default level. */
+static int debug_level = ERR_DBG;	/* Default level. */
 
 /* DEBUG message print. */
 #define DBG_PRINT(dbg_level, args...)  if(!(debug_level<dbg_level)) printk(args)
@@ -312,7 +311,7 @@
 /* Maintains Per FIFO related information. */
 typedef struct tx_fifo_config {
 #define	MAX_AVAILABLE_TXDS	8192
-	u32 FifoLen;		/* specifies len of FIFO upto 8192, ie no of TxDLs */
+	u32 fifo_len;		/* specifies len of FIFO upto 8192, ie no of TxDLs */
 /* Priority definition */
 #define TX_FIFO_PRI_0               0	/*Highest */
 #define TX_FIFO_PRI_1               1
@@ -322,9 +321,9 @@
 #define TX_FIFO_PRI_5               5
 #define TX_FIFO_PRI_6               6
 #define TX_FIFO_PRI_7               7	/*lowest */
-	u8 FifoPriority;	/* specifies pointer level for FIFO */
+	u8 fifo_priority;	/* specifies pointer level for FIFO */
 	/* user should not set twos fifos with same pri */
-	u8 fNoSnoop;
+	u8 f_no_snoop;
 #define NO_SNOOP_TXD                0x01
 #define NO_SNOOP_TXD_BUFFER          0x02
 } tx_fifo_config_t;
@@ -332,7 +331,7 @@
 
 /* Maintains per Ring related information */
 typedef struct rx_ring_config {
-	u32 NumRxd;		/*No of RxDs per Rx Ring */
+	u32 num_rxd;		/*No of RxDs per Rx Ring */
 #define RX_RING_PRI_0               0	/* highest */
 #define RX_RING_PRI_1               1
 #define RX_RING_PRI_2               2
@@ -342,70 +341,37 @@
 #define RX_RING_PRI_6               6
 #define RX_RING_PRI_7               7	/* lowest */
 
-	u8 RingPriority;	/*Specifies service priority of ring */
+	u8 ring_priority;	/*Specifies service priority of ring */
 	/* OSM should not set any two rings with same priority */
-	u8 RingOrg;		/*Organization of ring */
-#define RING_ORG_BUFF1           0x01
-#define RX_RING_ORG_BUFF3           0x03
-#define RX_RING_ORG_BUFF5           0x05
-
-/* In case of 3 buffer recv. mode, size of three buffers is expected as.. */
-#define BUFF_SZ_1                   22	/* ethernet header */
-#define BUFF_SZ_2                   (64+64)	/* max. IP+TCP header size */
-#define BUFF_SZ_3                   (1500-20-20)	/* TCP payload */
-#define BUFF_SZ_3_JUMBO             (9600-20-20)	/* Jumbo TCP payload */
-
-	u32 RxdThresh;		/*No of used Rxds NIC can store before transfer to host */
-#define DEFAULT_RXD_THRESHOLD       0x1	/* TODO */
-	u8 fNoSnoop;
+	u8 ring_org;		/*Organization of ring */
+#define RING_ORG_BUFF1		0x01
+#define RX_RING_ORG_BUFF3	0x03
+#define RX_RING_ORG_BUFF5	0x05
+
+	u8 f_no_snoop;
 #define NO_SNOOP_RXD                0x01
 #define NO_SNOOP_RXD_BUFFER         0x02
-	u32 RxD_BackOff_Interval;
-#define RXD_BACKOFF_INTERVAL_DEF        0x0
-#define RXD_BACKOFF_INTERVAL_MIN        0x0
-#define RXD_BACKOFF_INTERVAL_MAX        0x0
 } rx_ring_config_t;
 
 /* This structure provides contains values of the tunable parameters 
  * of the H/W 
  */
 struct config_param {
-
 /* Tx Side */
-	u32 TxFIFONum;		/*Number of Tx FIFOs */
+	u32 tx_fifo_num;	/*Number of Tx FIFOs */
 #define MAX_TX_FIFOS 8
 
-	tx_fifo_config_t TxCfg[MAX_TX_FIFOS];	/*Per-Tx FIFO config */
-	u32 MaxTxDs;		/*Max no. of Tx buffer descriptor per TxDL */
-	BOOL TxVLANEnable;	/*TRUE: Insert VLAN ID, FALSE: Don't insert */
-#define TX_REQ_TIMEOUT_DEFAULT          0x0
-#define TX_REQ_TIMEOUT_MIN              0x0
-#define TX_REQ_TIMEOUT_MAX              0x0
-	u32 TxReqTimeOut;
-	BOOL TxFlow;		/*Tx flow control enable */
-	BOOL RxFlow;
-	BOOL OverrideTxServiceState;	/* TRUE: Overide, FALSE: Do not override 
-					   Use the new priority information
-					   of service state. It is not recommended
-					   to change but OSM can opt to do so */
-#define MAX_SERVICE_STATES  36
-	u8 TxServiceState[MAX_SERVICE_STATES];
-	/* Array element represent 'priority' 
-	 * and array index represents
-	 *  'Service state' e.g. 
-	 *  TxServiceState[3]=7; it means 
-	 *  Service state 3 is associated 
-	 *  with priority 7 of a Tx FIFO */
-	u64 TxIntrType;		/* Specifies if Tx Intr is UTILZ or PER_LIST type. */
+	tx_fifo_config_t tx_cfg[MAX_TX_FIFOS];	/*Per-Tx FIFO config */
+	u32 max_txds;		/*Max no. of Tx buffer descriptor per TxDL */
+	u64 tx_intr_type;
+	/* Specifies if Tx Intr is UTILZ or PER_LIST type. */
 
 /* Rx Side */
-	u32 RxRingNum;		/*Number of receive rings */
+	u32 rx_ring_num;	/*Number of receive rings */
 #define MAX_RX_RINGS 8
 #define MAX_RX_BLOCKS_PER_RING  150
 
-	rx_ring_config_t RxCfg[MAX_RX_RINGS];	/*Per-Rx Ring config */
-	BOOL RxVLANEnable;	/*TRUE: Strip off VLAN tag from the frame,
-				   FALSE: Don't strip off VLAN tag */
+	rx_ring_config_t rx_cfg[MAX_RX_RINGS];	/*Per-Rx Ring config */
 
 #define HEADER_ETHERNET_II_802_3_SIZE 14
 #define HEADER_802_2_SIZE              3
@@ -419,23 +385,6 @@
 #define MAX_PYLD_JUMBO              9600
 #define MAX_MTU_JUMBO               (MAX_PYLD_JUMBO+18)
 #define MAX_MTU_JUMBO_VLAN          (MAX_PYLD_JUMBO+22)
-	u32 MTU;		/*Maximum Payload */
-	BOOL JumboEnable;	/*Enable Jumbo frames recv/send */
-	BOOL OverrideRxServiceState;	/* TRUE: Overide, FALSE: Do not override 
-					   Use the new priority information
-					   of service state. It is not recommended
-					   to change but OSM can opt to do so */
-#define MAX_SERVICE_STATES  36
-	u8 RxServiceState[MAX_SERVICE_STATES];
-	/* Array element represent 'priority' 
-	 * and array index represents 
-	 * 'Service state'e.g. 
-	 * RxServiceState[3]=7; it means 
-	 * Service state 3 is associated 
-	 * with priority 7 of a Rx FIFO */
-	BOOL StatAutoRefresh;	/* When true, StatRefreshTime have valid value */
-	u32 StatRefreshTime;	/*Time for refreshing statistics */
-#define     STAT_TRSF_PER_1_SECOND      0x208D5
 };
 
 /* Structure representing MAC Addrs */
@@ -491,6 +440,12 @@
 	u64 Host_Control;	/* reserved for host */
 } TxD_t;
 
+/* Structure to hold the phy and virt addr of every TxDL. */
+typedef struct list_info_hold {
+	dma_addr_t list_phy_addr;
+	void *list_virt_addr;
+} list_info_hold_t;
+
 /* Rx descriptor structure */
 typedef struct _RxD_t {
 	u64 Host_Control;	/* reserved for host */
@@ -507,36 +462,80 @@
 #define RXD_GET_L4_CKSUM(val)   ((u16)(val) & 0xFFFF)
 
 	u64 Control_2;
+#ifndef CONFIG_2BUFF_MODE
 #define MASK_BUFFER0_SIZE       vBIT(0xFFFF,0,16)
 #define SET_BUFFER0_SIZE(val)   vBIT(val,0,16)
+#else
+#define MASK_BUFFER0_SIZE       vBIT(0xFF,0,16)
+#define MASK_BUFFER1_SIZE       vBIT(0xFFFF,16,16)
+#define MASK_BUFFER2_SIZE       vBIT(0xFFFF,32,16)
+#define SET_BUFFER0_SIZE(val)   vBIT(val,8,8)
+#define SET_BUFFER1_SIZE(val)   vBIT(val,16,16)
+#define SET_BUFFER2_SIZE(val)   vBIT(val,32,16)
+#endif
+
 #define MASK_VLAN_TAG           vBIT(0xFFFF,48,16)
 #define SET_VLAN_TAG(val)       vBIT(val,48,16)
 #define SET_NUM_TAG(val)       vBIT(val,16,32)
 
+#ifndef CONFIG_2BUFF_MODE
 #define RXD_GET_BUFFER0_SIZE(Control_2) (u64)((Control_2 & vBIT(0xFFFF,0,16)))
-/*    
-#define TXD_GET_BUFFER1_SIZE(Control_2) (u16)((Control_2 & MASK_BUFFER1_SIZE) >> (63-31))  
-#define TXD_GET_BUFFER2_SIZE(Control_2) (u16)((Control_2 & MASK_BUFFER2_SIZE) >> (63-47))  
-*/
+#else
+#define RXD_GET_BUFFER0_SIZE(Control_2) (u8)((Control_2 & MASK_BUFFER0_SIZE) \
+							>> 48)
+#define RXD_GET_BUFFER1_SIZE(Control_2) (u16)((Control_2 & MASK_BUFFER1_SIZE) \
+							>> 32)
+#define RXD_GET_BUFFER2_SIZE(Control_2) (u16)((Control_2 & MASK_BUFFER2_SIZE) \
+							>> 16)
+#define BUF0_LEN	40
+#define BUF1_LEN	1
+#endif
+
 	u64 Buffer0_ptr;
+#ifdef CONFIG_2BUFF_MODE
+	u64 Buffer1_ptr;
+	u64 Buffer2_ptr;
+#endif
 } RxD_t;
 
-
 /* Structure that represents the Rx descriptor block which contains 
  * 128 Rx descriptors.
  */
+#ifndef CONFIG_2BUFF_MODE
 typedef struct _RxD_block {
 #define MAX_RXDS_PER_BLOCK             127
 	RxD_t rxd[MAX_RXDS_PER_BLOCK];
 
 	u64 reserved_0;
 #define END_OF_BLOCK    0xFEFFFFFFFFFFFFFFULL
-	u64 reserved_1;		/* 0xFEFFFFFFFFFFFFFF to mark last Rxd in this blk */
-	u64 reserved_2_pNext_RxD_block;	/*@ Logical ptr to next */
-	u64 pNext_RxD_Blk_physical;	/* Buff0_ptr.
-					   In a 32 bit arch the upper 32 bits 
-					   should be 0 */
+	u64 reserved_1;		/* 0xFEFFFFFFFFFFFFFF to mark last 
+				 * Rxd in this blk */
+	u64 reserved_2_pNext_RxD_block;	/* Logical ptr to next */
+	u64 pNext_RxD_Blk_physical;	/* Buff0_ptr.In a 32 bit arch
+					 * the upper 32 bits should 
+					 * be 0 */
 } RxD_block_t;
+#else
+typedef struct _RxD_block {
+#define MAX_RXDS_PER_BLOCK             85
+	RxD_t rxd[MAX_RXDS_PER_BLOCK];
+
+#define END_OF_BLOCK    0xFEFFFFFFFFFFFFFFULL
+	u64 reserved_1;		/* 0xFEFFFFFFFFFFFFFF to mark last Rxd 
+				 * in this blk */
+	u64 pNext_RxD_Blk_physical;	/* Phy ponter to next blk. */
+} RxD_block_t;
+#define SIZE_OF_BLOCK	4096
+
+/* Structure to hold virtual addresses of Buf0 and Buf1 in 
+ * 2buf mode. */
+typedef struct bufAdd {
+	void *ba_0_org;
+	void *ba_1_org;
+	void *ba_0;
+	void *ba_1;
+} buffAdd_t;
+#endif
 
 /* Structure which stores all the MAC control parameters */
 
@@ -568,10 +567,6 @@
  */
 typedef struct mac_info {
 /* rx side stuff */
-	u32 rxd_ring_mem_sz;
-	RxD_t *RxRing[MAX_RX_RINGS];	/* Logical Rx ring pointers */
-	dma_addr_t RxRing_Phy[MAX_RX_RINGS];
-
 	/* Put pointer info which indictes which RxD has to be replenished 
 	 * with a new buffer.
 	 */
@@ -583,41 +578,21 @@
 	rx_curr_get_info_t rx_curr_get_info[MAX_RX_RINGS];
 
 	u16 rmac_pause_time;
-
-	/* this will be used in receive function, this decides which ring would
-	   be processed first. eg: ring with priority value 0 (highest) should
-	   be processed first. 
-	   first 3 LSB bits represent ring number which should be processed 
-	   first, similarly next 3 bits represent next ring to be processed.
-	   eg: value of _rx_ring_pri_map = 0x0000 003A means 
-	   ring #2 would be processed first and #7 would be processed next
-	 */
-	u32 _rx_ring_pri_map;
+	u16 mc_pause_threshold_q0q3;
+	u16 mc_pause_threshold_q4q7;
 
 /* tx side stuff */
-	void *txd_list_mem;	/* orignal pointer to allocated mem */
-	dma_addr_t txd_list_mem_phy;
-	u32 txd_list_mem_sz;
-
 	/* logical pointer of start of each Tx FIFO */
 	TxFIFO_element_t *tx_FIFO_start[MAX_TX_FIFOS];
 
-	/* logical pointer of start of TxDL which corresponds to each Tx FIFO */
-	TxD_t *txdl_start[MAX_TX_FIFOS];
-
-	/* Same as txdl_start but phy addr */
-	dma_addr_t txdl_start_phy[MAX_TX_FIFOS];
-
 /* Current offset within tx_FIFO_start, where driver would write new Tx frame*/
 	tx_curr_put_info_t tx_curr_put_info[MAX_TX_FIFOS];
 	tx_curr_get_info_t tx_curr_get_info[MAX_TX_FIFOS];
 
-	u16 txdl_len;		/* length of a TxDL, same for all */
-
 	void *stats_mem;	/* orignal pointer to allocated mem */
 	dma_addr_t stats_mem_phy;	/* Physical address of the stat block */
 	u32 stats_mem_sz;
-	StatInfo_t *StatsInfo;	/* Logical address of the stat block */
+	StatInfo_t *stats_info;	/* Logical address of the stat block */
 } mac_info_t;
 
 /* structure representing the user defined MAC addresses */
@@ -632,13 +607,20 @@
 	dma_addr_t block_dma_addr;
 } rx_block_info_t;
 
+/* Default Tunable parameters of the NIC. */
+#define DEFAULT_FIFO_LEN 4096
+#define SMALL_RXD_CNT	30 * (MAX_RXDS_PER_BLOCK+1)
+#define LARGE_RXD_CNT	100 * (MAX_RXDS_PER_BLOCK+1)
+#define SMALL_BLK_CNT	30
+#define LARGE_BLK_CNT	100
+
 /* Structure representing one instance of the NIC */
 typedef struct s2io_nic {
 #define MAX_MAC_SUPPORTED   16
 #define MAX_SUPPORTED_MULTICASTS MAX_MAC_SUPPORTED
 
-	macaddr_t defMacAddr[MAX_MAC_SUPPORTED];
-	macaddr_t preMacAddr[MAX_MAC_SUPPORTED];
+	macaddr_t def_mac_addr[MAX_MAC_SUPPORTED];
+	macaddr_t pre_mac_addr[MAX_MAC_SUPPORTED];
 
 	struct net_device_stats stats;
 	caddr_t bar0;
@@ -651,7 +633,7 @@
 
 	char name[32];
 	struct tasklet_struct task;
-	atomic_t tasklet_status;
+	volatile unsigned long tasklet_status;
 	struct timer_list timer;
 	struct net_device *dev;
 	struct pci_dev *pdev;
@@ -670,8 +652,10 @@
 	u32 irq;
 	atomic_t rx_bufs_left[MAX_RX_RINGS];
 
-	spinlock_t isr_lock;
 	spinlock_t tx_lock;
+#ifndef CONFIG_S2IO_NAPI
+	spinlock_t put_lock;
+#endif
 
 #define PROMISC     1
 #define ALL_MULTI   2
@@ -690,23 +674,22 @@
 	u16 tx_err_count;
 	u16 rx_err_count;
 
-#if DEBUG_ON
-	u64 rxpkt_bytes;
-	u64 txpkt_bytes;
-	int int_cnt;
-	int rxint_cnt;
-	int txint_cnt;
-	u64 rxpkt_cnt;
+#ifndef CONFIG_S2IO_NAPI
+	/* Index to the absolute position of the put pointer of Rx ring. */
+	int put_pos[MAX_RX_RINGS];
 #endif
 
-	/*  Place holders for the virtual and physical addresses of 
+	/*
+	 *  Place holders for the virtual and physical addresses of 
 	 *  all the Rx Blocks
 	 */
-	struct rx_block_info
-	 rx_blocks[MAX_RX_RINGS][MAX_RX_BLOCKS_PER_RING];
+	rx_block_info_t rx_blocks[MAX_RX_RINGS][MAX_RX_BLOCKS_PER_RING];
 	int block_count[MAX_RX_RINGS];
 	int pkt_cnt[MAX_RX_RINGS];
 
+	/* Place holder of all the TX List's Phy and Virt addresses. */
+	list_info_hold_t *list_info[MAX_TX_FIFOS];
+
 	/*  Id timer, used to blink NIC to physically identify NIC. */
 	struct timer_list id_timer;
 
@@ -736,24 +719,29 @@
 	u16 last_link_state;
 #define	LINK_DOWN	1
 #define	LINK_UP		2
+
+#ifdef CONFIG_2BUFF_MODE
+	/* Buffer Address store. */
+	buffAdd_t **ba[MAX_RX_RINGS];
+#endif
+	int task_flag;
+#define CARD_DOWN 1
+#define CARD_UP 2
+	atomic_t card_state;
+	volatile unsigned long link_state;
 } nic_t;
 
 #define RESET_ERROR 1;
 #define CMD_ERROR   2;
 
-/* Default Tunable parameters of the NIC. */
-#define DEFAULT_FIFO_LEN 4096
-#define SMALL_RXD_CNT	40 * (MAX_RXDS_PER_BLOCK+1)
-#define LARGE_RXD_CNT	100 * (MAX_RXDS_PER_BLOCK+1)
-
 /*  OS related system calls */
 #ifndef readq
 static inline u64 readq(void *addr)
 {
 	u64 ret = 0;
 	ret = readl(addr + 4);
-	ret <<= 32;
-	ret |= readl(addr);
+	(u64) ret <<= 32;
+	(u64) ret |= readl(addr);
 
 	return ret;
 }
@@ -765,6 +753,27 @@
 	writel((u32) (val), addr);
 	writel((u32) (val >> 32), (addr + 4));
 }
+
+/* In 32 bit modes, some registers have to be written in a 
+ * particular order to expect correct hardware operation. The
+ * macro SPECIAL_REG_WRITE is used to perform such ordered 
+ * writes. Defines UF (Upper First) and LF (Lower First) will 
+ * be used to specify the required write order.
+ */
+#define UF	1
+#define LF	2
+static inline void SPECIAL_REG_WRITE(u64 val, void *addr, int order)
+{
+	if (order == LF) {
+		writel((u32) (val), addr);
+		writel((u32) (val >> 32), (addr + 4));
+	} else {
+		writel((u32) (val >> 32), (addr + 4));
+		writel((u32) (val), addr);
+	}
+}
+#else
+#define SPECIAL_REG_WRITE(val, addr, dummy) writeq(val, addr)
 #endif
 
 /*  Interrupt related values of Xena */
@@ -815,30 +824,41 @@
 
 /*  DMA level Inressupts */
 #define TXDMA_PFC_INT_M     BIT(0)
-    /*  PFC block interrupts */
+#define TXDMA_PCC_INT_M     BIT(2)
+
+/*  PFC block interrupts */
 #define PFC_MISC_ERR_1      BIT(0)	/* Interrupt to indicate FIFO full */
 
+/* PCC block interrupts. */
+#define	PCC_FB_ECC_ERR	   vBIT(0xff, 16, 8)	/* Interrupt to indicate
+						   PCC_FB_ECC Error. */
+
 /*
  * Prototype declaration.
  */
 static int __devinit s2io_init_nic(struct pci_dev *pdev,
 				   const struct pci_device_id *pre);
 static void __devexit s2io_rem_nic(struct pci_dev *pdev);
-static int initSharedMem(struct s2io_nic *sp);
-static void freeSharedMem(struct s2io_nic *sp);
-static int initNic(struct s2io_nic *nic);
+static int init_shared_mem(struct s2io_nic *sp);
+static void free_shared_mem(struct s2io_nic *sp);
+static int init_nic(struct s2io_nic *nic);
 #ifndef CONFIG_S2IO_NAPI
-static void rxIntrHandler(struct s2io_nic *sp);
+static void rx_intr_handler(struct s2io_nic *sp);
 #endif
-static void txIntrHandler(struct s2io_nic *sp);
-static void alarmIntrHandler(struct s2io_nic *sp);
+static void tx_intr_handler(struct s2io_nic *sp);
+static void alarm_intr_handler(struct s2io_nic *sp);
 
 static int s2io_starter(void);
 void s2io_closer(void);
 static void s2io_tx_watchdog(struct net_device *dev);
 static void s2io_tasklet(unsigned long dev_addr);
 static void s2io_set_multicast(struct net_device *dev);
-static int rxOsmHandler(nic_t * sp, u16 len, RxD_t * rxdp, int ring_no);
+#ifndef CONFIG_2BUFF_MODE
+static int rx_osm_handler(nic_t * sp, u16 len, RxD_t * rxdp, int ring_no);
+#else
+static int rx_osm_handler(nic_t * sp, RxD_t * rxdp, int ring_no,
+			  buffAdd_t * ba);
+#endif
 void s2io_link(nic_t * sp, int link);
 void s2io_reset(nic_t * sp);
 #ifdef CONFIG_S2IO_NAPI
@@ -849,5 +869,8 @@
 static irqreturn_t s2io_isr(int irq, void *dev_id, struct pt_regs *regs);
 static int verify_xena_quiescence(u64 val64, int flag);
 static struct ethtool_ops netdev_ethtool_ops;
+static void s2io_set_link(unsigned long data);
+static void s2io_card_down(nic_t * nic);
+static int s2io_card_up(nic_t * nic);
 
 #endif				/* _S2IO_H */
diff -Nru a/drivers/net/seeq8005.c b/drivers/net/seeq8005.c
--- a/drivers/net/seeq8005.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/net/seeq8005.c	2005-01-10 20:11:21 -08:00
@@ -737,8 +737,8 @@
 
 static struct net_device *dev_seeq;
 MODULE_LICENSE("GPL");
-MODULE_PARM(io, "i");
-MODULE_PARM(irq, "i");
+module_param(io, int, 0);
+module_param(irq, int, 0);
 MODULE_PARM_DESC(io, "SEEQ 8005 I/O base address");
 MODULE_PARM_DESC(irq, "SEEQ 8005 IRQ number");
 
diff -Nru a/drivers/net/shaper.c b/drivers/net/shaper.c
--- a/drivers/net/shaper.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/net/shaper.c	2005-01-10 20:11:21 -08:00
@@ -674,7 +674,7 @@
 static int shapers = 1;
 #ifdef MODULE
 
-MODULE_PARM(shapers, "i");
+module_param(shapers, int, 0);
 MODULE_PARM_DESC(shapers, "Traffic shaper: maximum number of shapers");
 
 #else /* MODULE */
diff -Nru a/drivers/net/sis900.c b/drivers/net/sis900.c
--- a/drivers/net/sis900.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/net/sis900.c	2005-01-10 20:11:18 -08:00
@@ -48,6 +48,7 @@
 */
 
 #include <linux/module.h>
+#include <linux/moduleparam.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
 #include <linux/timer.h>
@@ -120,6 +121,7 @@
 } mii_chip_table[] = {
 	{ "SiS 900 Internal MII PHY", 		0x001d, 0x8000, LAN },
 	{ "SiS 7014 Physical Layer Solution", 	0x0016, 0xf830, LAN },
+	{ "Altimata AC101LF PHY",               0x0022, 0x5520, LAN },
 	{ "AMD 79C901 10BASE-T PHY",  		0x0000, 0x6B70, LAN },
 	{ "AMD 79C901 HomePNA PHY",		0x0000, 0x6B90, HOME},
 	{ "ICS LAN PHY",			0x0015, 0xF440, LAN },
@@ -178,9 +180,9 @@
 MODULE_DESCRIPTION("SiS 900 PCI Fast Ethernet driver");
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(multicast_filter_limit, "i");
-MODULE_PARM(max_interrupt_work, "i");
-MODULE_PARM(debug, "i");
+module_param(multicast_filter_limit, int, 0444);
+module_param(max_interrupt_work, int, 0444);
+module_param(debug, int, 0444);
 MODULE_PARM_DESC(multicast_filter_limit, "SiS 900/7016 maximum number of filtered multicast addresses");
 MODULE_PARM_DESC(max_interrupt_work, "SiS 900/7016 maximum events handled per interrupt");
 MODULE_PARM_DESC(debug, "SiS 900/7016 debug level (2-4)");
@@ -2238,7 +2240,7 @@
 	/* Stop the chip's Tx and Rx Status Machine */
 	outl(RxDIS | TxDIS | inl(ioaddr + cr), ioaddr + cr);
 
-	pci_set_power_state(pci_dev, 3);
+	pci_set_power_state(pci_dev, PCI_D3hot);
 	pci_save_state(pci_dev);
 
 	return 0;
@@ -2253,7 +2255,7 @@
 	if(!netif_running(net_dev))
 		return 0;
 	pci_restore_state(pci_dev);
-	pci_set_power_state(pci_dev, 0);
+	pci_set_power_state(pci_dev, PCI_D0);
 
 	sis900_init_rxfilter(net_dev);
 
diff -Nru a/drivers/net/sk98lin/Makefile b/drivers/net/sk98lin/Makefile
--- a/drivers/net/sk98lin/Makefile	2005-01-10 20:11:15 -08:00
+++ b/drivers/net/sk98lin/Makefile	2005-01-10 20:11:15 -08:00
@@ -13,6 +13,7 @@
 obj-$(CONFIG_SK98LIN) += sk98lin.o
 sk98lin-objs    :=	\
 		skge.o		\
+		skethtool.o	\
 		skdim.o		\
 		skaddr.o	\
 		skgehwt.o	\
diff -Nru a/drivers/net/sk98lin/h/skdrv2nd.h b/drivers/net/sk98lin/h/skdrv2nd.h
--- a/drivers/net/sk98lin/h/skdrv2nd.h	2005-01-10 20:11:23 -08:00
+++ b/drivers/net/sk98lin/h/skdrv2nd.h	2005-01-10 20:11:23 -08:00
@@ -266,7 +266,6 @@
 typedef struct s_DevNet DEV_NET;
 
 struct s_DevNet {
-	struct			proc_dir_entry *proc;
 	int             PortNr;
 	int             NetNr;
 	int             Mtu;
@@ -383,6 +382,8 @@
 	SK_CSUM		Csum;		/* for checksum module */
 	SK_RLMT		Rlmt;		/* for rlmt module */
 	spinlock_t	SlowPathLock;	/* Normal IRQ lock */
+	struct timer_list BlinkTimer;	/* for LED blinking */
+	int		LedsOn;
 	SK_PNMI_STRUCT_DATA PnmiStruct;	/* structure to get all Pnmi-Data */
 	int			RlmtMode;	/* link check mode to set */
 	int			RlmtNets;	/* Number of nets */
@@ -395,7 +396,7 @@
 	SK_U32		PciDevId;	/* pci device id */
 	struct SK_NET_DEVICE	*dev[2];	/* pointer to device struct */
 	char		Name[30];	/* driver name */
-	struct SK_NET_DEVICE	*Next;		/* link all devices (for clearing) */
+
 	int		RxBufSize;	/* length of receive buffers */
         struct net_device_stats stats;	/* linux 'netstat -i' statistics */
 	int		Index;		/* internal board index number */
diff -Nru a/drivers/net/sk98lin/skaddr.c b/drivers/net/sk98lin/skaddr.c
--- a/drivers/net/sk98lin/skaddr.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/net/sk98lin/skaddr.c	2005-01-10 20:11:20 -08:00
@@ -79,7 +79,7 @@
 
 /* 64-bit hash values with all bits set. */
 
-SK_U16	OnesHash[4] = {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF};
+static const SK_U16	OnesHash[4] = {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF};
 
 /* local variables ************************************************************/
 
diff -Nru a/drivers/net/sk98lin/skethtool.c b/drivers/net/sk98lin/skethtool.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/net/sk98lin/skethtool.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,555 @@
+/******************************************************************************
+ *
+ * Name:        skethtool.c
+ * Project:     GEnesis, PCI Gigabit Ethernet Adapter
+ * Version:     $Revision: 1.7 $
+ * Date:        $Date: 2004/09/29 13:32:07 $
+ * Purpose:     All functions regarding ethtool handling
+ *
+ ******************************************************************************/
+
+/******************************************************************************
+ *
+ *	(C)Copyright 1998-2002 SysKonnect GmbH.
+ *	(C)Copyright 2002-2004 Marvell.
+ *
+ *	Driver for Marvell Yukon/2 chipset and SysKonnect Gigabit Ethernet 
+ *      Server Adapters.
+ *
+ *	Author: Ralph Roesler (rroesler@syskonnect.de)
+ *	        Mirko Lindner (mlindner@syskonnect.de)
+ *
+ *	Address all question to: linux@syskonnect.de
+ *
+ *	The technical manual for the adapters is available from SysKonnect's
+ *	web pages: www.syskonnect.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.
+ *
+ *	The information in this file is provided "AS IS" without warranty.
+ *
+ *****************************************************************************/
+
+#include "h/skdrv1st.h"
+#include "h/skdrv2nd.h"
+#include "h/skversion.h"
+
+#include <linux/ethtool.h>
+#include <linux/timer.h>
+#include <linux/delay.h>
+
+/******************************************************************************
+ *
+ * Defines
+ *
+ *****************************************************************************/
+
+#define SUPP_COPPER_ALL (SUPPORTED_10baseT_Half  | SUPPORTED_10baseT_Full  | \
+                         SUPPORTED_100baseT_Half | SUPPORTED_100baseT_Full | \
+                         SUPPORTED_1000baseT_Half| SUPPORTED_1000baseT_Full| \
+                         SUPPORTED_TP)
+
+#define ADV_COPPER_ALL  (ADVERTISED_10baseT_Half  | ADVERTISED_10baseT_Full  | \
+                         ADVERTISED_100baseT_Half | ADVERTISED_100baseT_Full | \
+                         ADVERTISED_1000baseT_Half| ADVERTISED_1000baseT_Full| \
+                         ADVERTISED_TP)
+
+#define SUPP_FIBRE_ALL  (SUPPORTED_1000baseT_Full | \
+                         SUPPORTED_FIBRE          | \
+                         SUPPORTED_Autoneg)
+
+#define ADV_FIBRE_ALL   (ADVERTISED_1000baseT_Full | \
+                         ADVERTISED_FIBRE          | \
+                         ADVERTISED_Autoneg)
+
+
+/******************************************************************************
+ *
+ * Local Functions
+ *
+ *****************************************************************************/
+
+/*****************************************************************************
+ *
+ * 	getSettings - retrieves the current settings of the selected adapter
+ *
+ * Description:
+ *	The current configuration of the selected adapter is returned.
+ *	This configuration involves a)speed, b)duplex and c)autoneg plus
+ *	a number of other variables.
+ *
+ * Returns:    always 0
+ *
+ */
+static int getSettings(struct net_device *dev, struct ethtool_cmd *ecmd)
+{
+	const DEV_NET *pNet = netdev_priv(dev);
+	int port = pNet->PortNr;
+	const SK_AC *pAC = pNet->pAC;
+	const SK_GEPORT *pPort = &pAC->GIni.GP[port];
+
+	static int DuplexAutoNegConfMap[9][3]= {
+		{ -1                     , -1         , -1              },
+		{ 0                      , -1         , -1              },
+		{ SK_LMODE_HALF          , DUPLEX_HALF, AUTONEG_DISABLE },
+		{ SK_LMODE_FULL          , DUPLEX_FULL, AUTONEG_DISABLE },
+		{ SK_LMODE_AUTOHALF      , DUPLEX_HALF, AUTONEG_ENABLE  },
+		{ SK_LMODE_AUTOFULL      , DUPLEX_FULL, AUTONEG_ENABLE  },
+		{ SK_LMODE_AUTOBOTH      , DUPLEX_FULL, AUTONEG_ENABLE  },
+		{ SK_LMODE_AUTOSENSE     , -1         , -1              },
+		{ SK_LMODE_INDETERMINATED, -1         , -1              }
+	};
+	static int SpeedConfMap[6][2] = {
+		{ 0                       , -1         },
+		{ SK_LSPEED_AUTO          , -1         },
+		{ SK_LSPEED_10MBPS        , SPEED_10   },
+		{ SK_LSPEED_100MBPS       , SPEED_100  },
+		{ SK_LSPEED_1000MBPS      , SPEED_1000 },
+		{ SK_LSPEED_INDETERMINATED, -1         }
+	};
+	static int AdvSpeedMap[6][2] = {
+		{ 0                       , -1         },
+		{ SK_LSPEED_AUTO          , -1         },
+		{ SK_LSPEED_10MBPS        , ADVERTISED_10baseT_Half   | ADVERTISED_10baseT_Full },
+		{ SK_LSPEED_100MBPS       , ADVERTISED_100baseT_Half  | ADVERTISED_100baseT_Full },
+		{ SK_LSPEED_1000MBPS      , ADVERTISED_1000baseT_Half | ADVERTISED_1000baseT_Full},
+		{ SK_LSPEED_INDETERMINATED, -1         }
+	};
+
+	ecmd->phy_address = port;
+	ecmd->speed       = SpeedConfMap[pPort->PLinkSpeedUsed][1];
+	ecmd->duplex      = DuplexAutoNegConfMap[pPort->PLinkModeStatus][1];
+	ecmd->autoneg     = DuplexAutoNegConfMap[pPort->PLinkModeStatus][2];
+	ecmd->transceiver = XCVR_INTERNAL;
+
+	if (pAC->GIni.GICopperType) {
+		ecmd->port        = PORT_TP;
+		ecmd->supported   = (SUPP_COPPER_ALL|SUPPORTED_Autoneg);
+		if (pAC->GIni.GIGenesis) {
+			ecmd->supported &= ~(SUPPORTED_10baseT_Half);
+			ecmd->supported &= ~(SUPPORTED_10baseT_Full);
+			ecmd->supported &= ~(SUPPORTED_100baseT_Half);
+			ecmd->supported &= ~(SUPPORTED_100baseT_Full);
+		} else {
+			if (pAC->GIni.GIChipId == CHIP_ID_YUKON) {
+				ecmd->supported &= ~(SUPPORTED_1000baseT_Half);
+			} 
+#ifdef CHIP_ID_YUKON_FE
+			if (pAC->GIni.GIChipId == CHIP_ID_YUKON_FE) {
+				ecmd->supported &= ~(SUPPORTED_1000baseT_Half);
+				ecmd->supported &= ~(SUPPORTED_1000baseT_Full);
+			}
+#endif
+		}
+		if (pAC->GIni.GP[0].PLinkSpeed != SK_LSPEED_AUTO) {
+			ecmd->advertising = AdvSpeedMap[pPort->PLinkSpeed][1];
+			if (pAC->GIni.GIChipId == CHIP_ID_YUKON) {
+				ecmd->advertising &= ~(SUPPORTED_1000baseT_Half);
+			} 
+		} else {
+			ecmd->advertising = ecmd->supported;
+		}
+
+		if (ecmd->autoneg == AUTONEG_ENABLE) 
+			ecmd->advertising |= ADVERTISED_Autoneg;
+	} else {
+		ecmd->port        = PORT_FIBRE;
+		ecmd->supported   = SUPP_FIBRE_ALL;
+		ecmd->advertising = ADV_FIBRE_ALL;
+	}
+	return 0;
+}
+
+/*
+ * MIB infrastructure uses instance value starting at 1
+ * based on board and port.
+ */
+static inline u32 pnmiInstance(const DEV_NET *pNet)
+{
+	return 1 + (pNet->pAC->RlmtNets == 2) + pNet->PortNr;
+}
+
+/*****************************************************************************
+ *
+ *	setSettings - configures the settings of a selected adapter
+ *
+ * Description:
+ *	Possible settings that may be altered are a)speed, b)duplex or 
+ *	c)autonegotiation.
+ *
+ * Returns:
+ *	0:	everything fine, no error
+ *	<0:	the return value is the error code of the failure 
+ */
+static int setSettings(struct net_device *dev, struct ethtool_cmd *ecmd)
+{
+	DEV_NET *pNet = netdev_priv(dev);
+	SK_AC *pAC = pNet->pAC;
+	u32 instance;
+	char buf[4];
+	int len = 1;
+
+	if (ecmd->speed != SPEED_10 && ecmd->speed != SPEED_100 
+	    && ecmd->speed != SPEED_1000)
+		return -EINVAL;
+
+	if (ecmd->duplex != DUPLEX_HALF && ecmd->duplex != DUPLEX_FULL)
+		return -EINVAL;
+
+	if (ecmd->autoneg != AUTONEG_DISABLE && ecmd->autoneg != AUTONEG_ENABLE)
+		return -EINVAL;
+
+	if (ecmd->autoneg == AUTONEG_DISABLE)
+		*buf = (ecmd->duplex == DUPLEX_FULL) 
+			? SK_LMODE_FULL : SK_LMODE_HALF;
+	else
+		*buf = (ecmd->duplex == DUPLEX_FULL) 
+			? SK_LMODE_AUTOFULL : SK_LMODE_AUTOHALF;
+	
+	instance = pnmiInstance(pNet);
+	if (SkPnmiSetVar(pAC, pAC->IoBase, OID_SKGE_LINK_MODE, 
+			   &buf, &len, instance, pNet->NetNr) != SK_PNMI_ERR_OK)
+		return -EINVAL;
+
+	switch(ecmd->speed) {
+	case SPEED_1000:
+		*buf = SK_LSPEED_1000MBPS;
+		break;
+	case SPEED_100:
+		*buf = SK_LSPEED_100MBPS;
+		break;
+	case SPEED_10:
+		*buf = SK_LSPEED_10MBPS;
+	}
+
+	if (SkPnmiSetVar(pAC, pAC->IoBase, OID_SKGE_SPEED_MODE, 
+			 &buf, &len, instance, pNet->NetNr) != SK_PNMI_ERR_OK)
+		return -EINVAL;
+
+	return 0;
+}
+
+/*****************************************************************************
+ *
+ * 	getDriverInfo - returns generic driver and adapter information
+ *
+ * Description:
+ *	Generic driver information is returned via this function, such as
+ *	the name of the driver, its version and and firmware version.
+ *	In addition to this, the location of the selected adapter is 
+ *	returned as a bus info string (e.g. '01:05.0').
+ *	
+ * Returns:	N/A
+ *
+ */
+static void getDriverInfo(struct net_device *dev, struct ethtool_drvinfo *info)
+{
+	const DEV_NET	*pNet = netdev_priv(dev);
+	const SK_AC *pAC = pNet->pAC;
+	char vers[32];
+
+	snprintf(vers, sizeof(vers)-1, VER_STRING "(v%d.%d)",
+		(pAC->GIni.GIPciHwRev >> 4) & 0xf, pAC->GIni.GIPciHwRev & 0xf);
+
+	strlcpy(info->driver, DRIVER_FILE_NAME, sizeof(info->driver));
+	strcpy(info->version, vers);
+	strcpy(info->fw_version, "N/A");
+	strlcpy(info->bus_info, pAC->PciDev->slot_name, ETHTOOL_BUSINFO_LEN);
+}
+
+/*
+ * Ethtool statistics support.
+ */
+static const char StringsStats[][ETH_GSTRING_LEN] = {
+	"rx_packets",	"tx_packets",
+	"rx_bytes",	"tx_bytes",
+	"rx_errors",	"tx_errors",	
+	"rx_dropped",	"tx_dropped",
+	"multicasts",	"collisions",	
+	"rx_length_errors",		"rx_buffer_overflow_errors",
+	"rx_crc_errors",		"rx_frame_errors",
+	"rx_too_short_errors",		"rx_too_long_errors",
+	"rx_carrier_extension_errors",	"rx_symbol_errors",
+	"rx_llc_mac_size_errors",	"rx_carrier_errors",	
+	"rx_jabber_errors",		"rx_missed_errors",
+	"tx_abort_collision_errors",	"tx_carrier_errors",
+	"tx_buffer_underrun_errors",	"tx_heartbeat_errors",
+	"tx_window_errors",
+};
+
+static int getStatsCount(struct net_device *dev)
+{
+	return ARRAY_SIZE(StringsStats);
+}
+
+static void getStrings(struct net_device *dev, u32 stringset, u8 *data)
+{
+	switch(stringset) {
+	case ETH_SS_STATS:
+		memcpy(data, *StringsStats, sizeof(StringsStats));
+		break;
+	}
+}
+
+static void getEthtoolStats(struct net_device *dev,
+			    struct ethtool_stats *stats, u64 *data)
+{
+	const DEV_NET	*pNet = netdev_priv(dev);
+	const SK_AC *pAC = pNet->pAC;
+	const SK_PNMI_STRUCT_DATA *pPnmiStruct = &pAC->PnmiStruct;
+
+	*data++ = pPnmiStruct->Stat[0].StatRxOkCts;
+	*data++ = pPnmiStruct->Stat[0].StatTxOkCts;
+	*data++ = pPnmiStruct->Stat[0].StatRxOctetsOkCts;
+	*data++ = pPnmiStruct->Stat[0].StatTxOctetsOkCts;
+	*data++ = pPnmiStruct->InErrorsCts;
+	*data++ = pPnmiStruct->Stat[0].StatTxSingleCollisionCts;
+	*data++ = pPnmiStruct->RxNoBufCts;
+	*data++ = pPnmiStruct->TxNoBufCts;
+	*data++ = pPnmiStruct->Stat[0].StatRxMulticastOkCts;
+	*data++ = pPnmiStruct->Stat[0].StatTxSingleCollisionCts;
+	*data++ = pPnmiStruct->Stat[0].StatRxRuntCts;
+	*data++ = pPnmiStruct->Stat[0].StatRxFifoOverflowCts;
+	*data++ = pPnmiStruct->Stat[0].StatRxFcsCts;
+	*data++ = pPnmiStruct->Stat[0].StatRxFramingCts;
+	*data++ = pPnmiStruct->Stat[0].StatRxShortsCts;
+	*data++ = pPnmiStruct->Stat[0].StatRxTooLongCts;
+	*data++ = pPnmiStruct->Stat[0].StatRxCextCts;
+	*data++ = pPnmiStruct->Stat[0].StatRxSymbolCts;
+	*data++ = pPnmiStruct->Stat[0].StatRxIRLengthCts;
+	*data++ = pPnmiStruct->Stat[0].StatRxCarrierCts;
+	*data++ = pPnmiStruct->Stat[0].StatRxJabberCts;
+	*data++ = pPnmiStruct->Stat[0].StatRxMissedCts;
+	*data++ = pAC->stats.tx_aborted_errors;
+	*data++ = pPnmiStruct->Stat[0].StatTxCarrierCts;
+	*data++ = pPnmiStruct->Stat[0].StatTxFifoUnderrunCts;
+	*data++ = pPnmiStruct->Stat[0].StatTxCarrierCts;
+	*data++ = pAC->stats.tx_window_errors;
+}
+
+
+/*****************************************************************************
+ *
+ * 	toggleLeds - Changes the LED state of an adapter
+ *
+ * Description:
+ *	This function changes the current state of all LEDs of an adapter so
+ *	that it can be located by a user. 
+ *
+ * Returns:	N/A
+ *
+ */
+static void toggleLeds(DEV_NET *pNet, int on)
+{
+	SK_AC *pAC = pNet->pAC;
+	int port = pNet->PortNr;
+	void __iomem *io = pAC->IoBase;
+
+	if (pAC->GIni.GIGenesis) {
+		SK_OUT8(io, MR_ADDR(port,LNK_LED_REG), 
+			on ? SK_LNK_ON : SK_LNK_OFF);
+		SkGeYellowLED(pAC, io, 
+			      on ? (LED_ON >> 1) : (LED_OFF >> 1));
+		SkGeXmitLED(pAC, io, MR_ADDR(port,RX_LED_INI),
+			    on ? SK_LED_TST : SK_LED_DIS);
+
+		if (pAC->GIni.GP[port].PhyType == SK_PHY_BCOM)
+			SkXmPhyWrite(pAC, io, port, PHY_BCOM_P_EXT_CTRL, 
+				     on ? PHY_B_PEC_LED_ON : PHY_B_PEC_LED_OFF);
+		else if (pAC->GIni.GP[port].PhyType == SK_PHY_LONE)
+			SkXmPhyWrite(pAC, io, port, PHY_LONE_LED_CFG,
+				     on ? 0x0800 : PHY_L_LC_LEDT);
+		else
+			SkGeXmitLED(pAC, io, MR_ADDR(port,TX_LED_INI),
+				    on ? SK_LED_TST : SK_LED_DIS);
+	} else {
+		const u16 YukLedOn = (PHY_M_LED_MO_DUP(MO_LED_ON)  |
+				      PHY_M_LED_MO_10(MO_LED_ON)   |
+				      PHY_M_LED_MO_100(MO_LED_ON)  |
+				      PHY_M_LED_MO_1000(MO_LED_ON) | 
+				      PHY_M_LED_MO_RX(MO_LED_ON));
+		const u16  YukLedOff = (PHY_M_LED_MO_DUP(MO_LED_OFF)  |
+					PHY_M_LED_MO_10(MO_LED_OFF)   |
+					PHY_M_LED_MO_100(MO_LED_OFF)  |
+					PHY_M_LED_MO_1000(MO_LED_OFF) | 
+					PHY_M_LED_MO_RX(MO_LED_OFF));
+	
+
+		SkGmPhyWrite(pAC,io,port,PHY_MARV_LED_CTRL,0);
+		SkGmPhyWrite(pAC,io,port,PHY_MARV_LED_OVER, 
+			     on ? YukLedOn : YukLedOff);
+	}
+}
+
+/*****************************************************************************
+ *
+ * 	skGeBlinkTimer - Changes the LED state of an adapter
+ *
+ * Description:
+ *	This function changes the current state of all LEDs of an adapter so
+ *	that it can be located by a user. If the requested time interval for
+ *	this test has elapsed, this function cleans up everything that was 
+ *	temporarily setup during the locate NIC test. This involves of course
+ *	also closing or opening any adapter so that the initial board state 
+ *	is recovered.
+ *
+ * Returns:	N/A
+ *
+ */
+void SkGeBlinkTimer(unsigned long data)
+{
+	struct net_device *dev = (struct net_device *) data;
+	DEV_NET *pNet = netdev_priv(dev);
+	SK_AC *pAC = pNet->pAC;
+
+	toggleLeds(pNet, pAC->LedsOn);
+
+	pAC->LedsOn = !pAC->LedsOn;
+	mod_timer(&pAC->BlinkTimer, jiffies + HZ/4);
+}
+
+/*****************************************************************************
+ *
+ * 	locateDevice - start the locate NIC feature of the elected adapter 
+ *
+ * Description:
+ *	This function is used if the user want to locate a particular NIC.
+ *	All LEDs are regularly switched on and off, so the NIC can easily
+ *	be identified.
+ *
+ * Returns:	
+ *	==0:	everything fine, no error, locateNIC test was started
+ *	!=0:	one locateNIC test runs already
+ *
+ */
+static int locateDevice(struct net_device *dev, u32 data)
+{
+	DEV_NET *pNet = netdev_priv(dev);
+	SK_AC *pAC = pNet->pAC;
+
+	if(!data || data > (u32)(MAX_SCHEDULE_TIMEOUT / HZ))
+		data = (u32)(MAX_SCHEDULE_TIMEOUT / HZ);
+
+	/* start blinking */
+	pAC->LedsOn = 0;
+	mod_timer(&pAC->BlinkTimer, jiffies);
+	msleep_interruptible(data * 1000);
+
+	set_current_state(TASK_INTERRUPTIBLE);
+	schedule_timeout(data * HZ);
+	del_timer_sync(&pAC->BlinkTimer);
+	toggleLeds(pNet, 0);
+
+	return 0;
+}
+
+/*****************************************************************************
+ *
+ * 	getPauseParams - retrieves the pause parameters
+ *
+ * Description:
+ *	All current pause parameters of a selected adapter are placed 
+ *	in the passed ethtool_pauseparam structure and are returned.
+ *
+ * Returns:	N/A
+ *
+ */
+static void getPauseParams(struct net_device *dev, struct ethtool_pauseparam *epause) 
+{
+	DEV_NET	*pNet = netdev_priv(dev);
+	SK_AC *pAC = pNet->pAC;
+	SK_GEPORT *pPort = &pAC->GIni.GP[pNet->PortNr];
+
+	epause->rx_pause = (pPort->PFlowCtrlMode == SK_FLOW_MODE_SYMMETRIC) ||
+		  (pPort->PFlowCtrlMode == SK_FLOW_MODE_SYM_OR_REM);
+
+	epause->tx_pause = epause->rx_pause || (pPort->PFlowCtrlMode == SK_FLOW_MODE_LOC_SEND);
+	epause->autoneg = epause->rx_pause || epause->tx_pause;
+}
+
+/*****************************************************************************
+ *
+ *	setPauseParams - configures the pause parameters of an adapter
+ *
+ * Description:
+ *	This function sets the Rx or Tx pause parameters 
+ *
+ * Returns:
+ *	==0:	everything fine, no error
+ *	!=0:	the return value is the error code of the failure 
+ */
+static int setPauseParams(struct net_device *dev , struct ethtool_pauseparam *epause)
+{
+	DEV_NET	*pNet = netdev_priv(dev);
+	SK_AC *pAC = pNet->pAC;
+	SK_GEPORT *pPort = &pAC->GIni.GP[pNet->PortNr];
+	u32	instance = pnmiInstance(pNet);
+	struct ethtool_pauseparam old;
+	u8	oldspeed = pPort->PLinkSpeedUsed;
+	char	buf[4];
+	int	len = 1;
+	int ret;
+
+	/*
+	** we have to determine the current settings to see if 
+	** the operator requested any modification of the flow 
+	** control parameters...
+	*/
+	getPauseParams(dev, &old);
+
+	/*
+	** perform modifications regarding the changes 
+	** requested by the operator
+	*/
+	if (epause->autoneg != old.autoneg) 
+		*buf = epause->autoneg ? SK_FLOW_MODE_NONE : SK_FLOW_MODE_SYMMETRIC;
+	else {
+		if (epause->rx_pause && epause->tx_pause) 
+			*buf = SK_FLOW_MODE_SYMMETRIC;
+		else if (epause->rx_pause && !epause->tx_pause)
+			*buf =  SK_FLOW_MODE_SYM_OR_REM;
+		else if (!epause->rx_pause && epause->tx_pause)
+			*buf =  SK_FLOW_MODE_LOC_SEND;
+		else
+			*buf = SK_FLOW_MODE_NONE;
+	}
+
+	ret = SkPnmiSetVar(pAC, pAC->IoBase, OID_SKGE_FLOWCTRL_MODE,
+			 &buf, &len, instance, pNet->NetNr);
+
+	if (ret != SK_PNMI_ERR_OK) {
+		SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_CTRL,
+			   ("ethtool (sk98lin): error changing rx/tx pause (%i)\n", ret));
+		goto err;
+	}
+
+	/*
+	** It may be that autoneg has been disabled! Therefore
+	** set the speed to the previously used value...
+	*/
+	if (!epause->autoneg) {
+		len = 1;
+		ret = SkPnmiSetVar(pAC, pAC->IoBase, OID_SKGE_SPEED_MODE, 
+				   &oldspeed, &len, instance, pNet->NetNr);
+		if (ret != SK_PNMI_ERR_OK) 
+			SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_CTRL,
+				   ("ethtool (sk98lin): error setting speed (%i)\n", ret));
+	}
+ err:
+        return ret ? -EIO : 0;
+}
+
+struct ethtool_ops SkGeEthtoolOps = {
+	.get_settings		= getSettings,
+	.set_settings		= setSettings,
+	.get_drvinfo		= getDriverInfo,
+	.get_strings		= getStrings,
+	.get_stats_count	= getStatsCount,
+	.get_ethtool_stats	= getEthtoolStats,
+	.phys_id		= locateDevice,
+	.get_pauseparam		= getPauseParams,
+	.set_pauseparam		= setPauseParams,
+};
diff -Nru a/drivers/net/sk98lin/skge.c b/drivers/net/sk98lin/skge.c
--- a/drivers/net/sk98lin/skge.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/net/sk98lin/skge.c	2005-01-10 20:11:16 -08:00
@@ -109,6 +109,7 @@
 #include	"h/skversion.h"
 
 #include	<linux/module.h>
+#include	<linux/moduleparam.h>
 #include	<linux/init.h>
 #include 	<linux/proc_fs.h>
 
@@ -233,17 +234,33 @@
  * Extern Function Prototypes
  *
  ******************************************************************************/
-
-#ifdef CONFIG_PROC_FS
-static const char 	SK_Root_Dir_entry[] = "sk98lin";
+static const char 	SKRootName[] = "sk98lin";
 static struct		proc_dir_entry *pSkRootDir;
 extern struct	file_operations sk_proc_fops;
-#endif
+
+static inline void SkGeProcCreate(struct net_device *dev)
+{
+	struct proc_dir_entry *pe;
+
+	if (pSkRootDir && 
+	    (pe = create_proc_entry(dev->name, S_IRUGO, pSkRootDir))) {
+		pe->proc_fops = &sk_proc_fops;
+		pe->data = dev;
+		pe->owner = THIS_MODULE;
+	}
+}
+ 
+static inline void SkGeProcRemove(struct net_device *dev)
+{
+	if (pSkRootDir)
+		remove_proc_entry(dev->name, pSkRootDir);
+}
 
 extern void SkDimEnableModerationIfNeeded(SK_AC *pAC);	
 extern void SkDimDisplayModerationSettings(SK_AC *pAC);
 extern void SkDimStartModerationTimer(SK_AC *pAC);
 extern void SkDimModerate(SK_AC *pAC);
+extern void SkGeBlinkTimer(unsigned long data);
 
 #ifdef DEBUG
 static void	DumpMsg(struct sk_buff*, char*);
@@ -252,8 +269,8 @@
 #endif
 
 /* global variables *********************************************************/
-struct SK_NET_DEVICE *SkGeRootDev = NULL;
 static SK_BOOL DoPrintInterfaceChange = SK_TRUE;
+extern  struct ethtool_ops SkGeEthtoolOps;
 
 /* local variables **********************************************************/
 static uintptr_t TxQueueAddr[SK_MAX_MACS][2] = {{0x680, 0x600},{0x780, 0x700}};
@@ -337,22 +354,20 @@
 DEV_NET		*pNet;
 SK_AC		*pAC;
 
-	if (dev->priv) {
-		pNet = (DEV_NET*) dev->priv;
-		pAC = pNet->pAC;
-		AllocFlag = pAC->AllocFlag;
-		if (pAC->PciDev) {
-			pci_release_regions(pAC->PciDev);
-		}
-		if (AllocFlag & SK_ALLOC_IRQ) {
-			free_irq(dev->irq, dev);
-		}
-		if (pAC->IoBase) {
-			iounmap(pAC->IoBase);
-		}
-		if (pAC->pDescrMem) {
-			BoardFreeMem(pAC);
-		}
+	pNet = netdev_priv(dev);
+	pAC = pNet->pAC;
+	AllocFlag = pAC->AllocFlag;
+	if (pAC->PciDev) {
+		pci_release_regions(pAC->PciDev);
+	}
+	if (AllocFlag & SK_ALLOC_IRQ) {
+		free_irq(dev->irq, dev);
+	}
+	if (pAC->IoBase) {
+		iounmap(pAC->IoBase);
+	}
+	if (pAC->pDescrMem) {
+		BoardFreeMem(pAC);
 	}
 	
 } /* FreeResources */
@@ -360,26 +375,6 @@
 MODULE_AUTHOR("Mirko Lindner <mlindner@syskonnect.de>");
 MODULE_DESCRIPTION("SysKonnect SK-NET Gigabit Ethernet SK-98xx driver");
 MODULE_LICENSE("GPL");
-MODULE_PARM(Speed_A,    "1-" __MODULE_STRING(SK_MAX_CARD_PARAM) "s");
-MODULE_PARM(Speed_B,    "1-" __MODULE_STRING(SK_MAX_CARD_PARAM) "s");
-MODULE_PARM(AutoNeg_A,  "1-" __MODULE_STRING(SK_MAX_CARD_PARAM) "s");
-MODULE_PARM(AutoNeg_B,  "1-" __MODULE_STRING(SK_MAX_CARD_PARAM) "s");
-MODULE_PARM(DupCap_A,   "1-" __MODULE_STRING(SK_MAX_CARD_PARAM) "s");
-MODULE_PARM(DupCap_B,   "1-" __MODULE_STRING(SK_MAX_CARD_PARAM) "s");
-MODULE_PARM(FlowCtrl_A, "1-" __MODULE_STRING(SK_MAX_CARD_PARAM) "s");
-MODULE_PARM(FlowCtrl_B, "1-" __MODULE_STRING(SK_MAX_CARD_PARAM) "s");
-MODULE_PARM(Role_A,	"1-" __MODULE_STRING(SK_MAX_CARD_PARAM) "s");
-MODULE_PARM(Role_B,	"1-" __MODULE_STRING(SK_MAX_CARD_PARAM) "s");
-MODULE_PARM(ConType,	"1-" __MODULE_STRING(SK_MAX_CARD_PARAM) "s");
-MODULE_PARM(PrefPort,   "1-" __MODULE_STRING(SK_MAX_CARD_PARAM) "s");
-MODULE_PARM(RlmtMode,   "1-" __MODULE_STRING(SK_MAX_CARD_PARAM) "s");
-/* used for interrupt moderation */
-MODULE_PARM(IntsPerSec,     "1-" __MODULE_STRING(SK_MAX_CARD_PARAM) "i");
-MODULE_PARM(Moderation,     "1-" __MODULE_STRING(SK_MAX_CARD_PARAM) "s");
-MODULE_PARM(Stats,          "1-" __MODULE_STRING(SK_MAX_CARD_PARAM) "s");
-MODULE_PARM(ModerationMask, "1-" __MODULE_STRING(SK_MAX_CARD_PARAM) "s");
-MODULE_PARM(AutoSizing,     "1-" __MODULE_STRING(SK_MAX_CARD_PARAM) "s");
-
 
 #ifdef LINK_SPEED_A
 static char *Speed_A[SK_MAX_CARD_PARAM] = LINK_SPEED;
@@ -465,6 +460,26 @@
 static char *AutoSizing[SK_MAX_CARD_PARAM];
 static char *Stats[SK_MAX_CARD_PARAM];
 
+module_param_array(Speed_A, charp, NULL, 0);
+module_param_array(Speed_B, charp, NULL, 0);
+module_param_array(AutoNeg_A, charp, NULL, 0);
+module_param_array(AutoNeg_B, charp, NULL, 0);
+module_param_array(DupCap_A, charp, NULL, 0);
+module_param_array(DupCap_B, charp, NULL, 0);
+module_param_array(FlowCtrl_A, charp, NULL, 0);
+module_param_array(FlowCtrl_B, charp, NULL, 0);
+module_param_array(Role_A, charp, NULL, 0);
+module_param_array(Role_B, charp, NULL, 0);
+module_param_array(ConType, charp, NULL, 0);
+module_param_array(PrefPort, charp, NULL, 0);
+module_param_array(RlmtMode, charp, NULL, 0);
+/* used for interrupt moderation */
+module_param_array(IntsPerSec, int, NULL, 0);
+module_param_array(Moderation, charp, NULL, 0);
+module_param_array(Stats, charp, NULL, 0);
+module_param_array(ModerationMask, charp, NULL, 0);
+module_param_array(AutoSizing, charp, NULL, 0);
+
 /*****************************************************************************
  *
  * 	SkGeBoardInit - do level 0 and 1 initialization
@@ -503,6 +518,11 @@
 	}
 	spin_lock_init(&pAC->SlowPathLock);
 
+	/* setup phy_id blink timer */
+	pAC->BlinkTimer.function = SkGeBlinkTimer;
+	pAC->BlinkTimer.data = (unsigned long) dev;
+	init_timer(&pAC->BlinkTimer);
+
 	/* level 0 init common modules here */
 	
 	spin_lock_irqsave(&pAC->SlowPathLock, Flags);
@@ -601,12 +621,6 @@
 		return(-EAGAIN);
 	}
 
-	/*
-	 * Register the device here
-	 */
-	pAC->Next = SkGeRootDev;
-	SkGeRootDev = dev;
-
 	return (0);
 } /* SkGeBoardInit */
 
@@ -887,7 +901,7 @@
 SK_AC		*pAC;
 SK_U32		IntSrc;		/* interrupts source register contents */	
 
-	pNet = (DEV_NET*) dev->priv;
+	pNet = netdev_priv(dev);
 	pAC = pNet->pAC;
 	
 	/*
@@ -1036,7 +1050,7 @@
 SK_AC		*pAC;
 SK_U32		IntSrc;		/* interrupts source register contents */	
 
-	pNet = (DEV_NET*) dev->priv;
+	pNet = netdev_priv(dev);
 	pAC = pNet->pAC;
 	
 	/*
@@ -1126,6 +1140,24 @@
 		return SkIsrRetHandled;
 } /* SkGeIsrOnePort */
 
+#ifdef CONFIG_NET_POLL_CONTROLLER
+/****************************************************************************
+ *
+ * 	SkGePollController - polling receive, for netconsole
+ *
+ * Description:
+ *	Polling receive - used by netconsole and other diagnostic tools
+ *	to allow network i/o with interrupts disabled.
+ *
+ * Returns: N/A
+ */
+static void SkGePollController(struct net_device *dev)
+{
+	disable_irq(dev->irq);
+	SkGeIsr(dev->irq, dev, NULL);
+	enable_irq(dev->irq);
+}
+#endif
 
 /****************************************************************************
  *
@@ -1152,7 +1184,7 @@
 	int				i;
 	SK_EVPARA		EvPara;		/* an event parameter union */
 
-	pNet = (DEV_NET*) dev->priv;
+	pNet = netdev_priv(dev);
 	pAC = pNet->pAC;
 	
 	SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY,
@@ -1166,10 +1198,6 @@
 	}
 #endif
 
-	if (!try_module_get(THIS_MODULE)) {
-		return (-1);	/* increase of usage count not possible */
-	}
-
 	/* Set blink mode */
 	if ((pAC->PciDev->vendor == 0x1186) || (pAC->PciDev->vendor == 0x11ab ))
 		pAC->GIni.GILedBlinkCtrl = OEM_CONFIG_VALUE;
@@ -1177,7 +1205,6 @@
 	if (pAC->BoardLevel == SK_INIT_DATA) {
 		/* level 1 init common modules here */
 		if (SkGeInit(pAC, pAC->IoBase, SK_INIT_IO) != 0) {
-			module_put(THIS_MODULE); /* decrease usage count */
 			printk("%s: HWInit (1) failed.\n", pAC->dev[pNet->PortNr]->name);
 			return (-1);
 		}
@@ -1193,7 +1220,6 @@
 	if (pAC->BoardLevel != SK_INIT_RUN) {
 		/* tschilling: Level 2 init modules here, check return value. */
 		if (SkGeInit(pAC, pAC->IoBase, SK_INIT_RUN) != 0) {
-			module_put(THIS_MODULE); /* decrease usage count */
 			printk("%s: HWInit (2) failed.\n", pAC->dev[pNet->PortNr]->name);
 			return (-1);
 		}
@@ -1279,19 +1305,18 @@
 	SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY,
 		("SkGeClose: pAC=0x%lX ", (unsigned long)pAC));
 
-	pNet = (DEV_NET*) dev->priv;
+	pNet = netdev_priv(dev);
 	pAC = pNet->pAC;
 
 #ifdef SK_DIAG_SUPPORT
 	if (pAC->DiagModeActive == DIAG_ACTIVE) {
 		if (pAC->DiagFlowCtrl == SK_FALSE) {
-			module_put(THIS_MODULE);
 			/* 
 			** notify that the interface which has been closed
 			** by operator interaction must not be started up 
 			** again when the DIAG has finished. 
 			*/
-			newPtrNet = (DEV_NET *) pAC->dev[0]->priv;
+			newPtrNet = netdev_priv(pAC->dev[0]);
 			if (newPtrNet == pNet) {
 				pAC->WasIfUp[0] = SK_FALSE;
 			} else {
@@ -1376,7 +1401,6 @@
 	pAC->MaxPorts--;
 	pNet->Up = 0;
 
-	module_put(THIS_MODULE);
 	return (0);
 } /* SkGeClose */
 
@@ -1402,7 +1426,7 @@
 SK_AC		*pAC;
 int			Rc;	/* return code of XmitFrame */
 
-	pNet = (DEV_NET*) dev->priv;
+	pNet = netdev_priv(dev);
 	pAC = pNet->pAC;
 
 	if ((!skb_shinfo(skb)->nr_frags) ||
@@ -2498,7 +2522,7 @@
 static int SkGeSetMacAddr(struct SK_NET_DEVICE *dev, void *p)
 {
 
-DEV_NET *pNet = (DEV_NET*) dev->priv;
+DEV_NET *pNet = netdev_priv(dev);
 SK_AC	*pAC = pNet->pAC;
 
 struct sockaddr	*addr = p;
@@ -2555,7 +2579,7 @@
 	SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY,
 		("SkGeSetRxMode starts now... "));
 
-	pNet = (DEV_NET*) dev->priv;
+	pNet = netdev_priv(dev);
 	pAC = pNet->pAC;
 	if (pAC->RlmtNets == 1)
 		PortIdx = pAC->ActivePort;
@@ -2627,7 +2651,7 @@
 	SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY,
 		("SkGeChangeMtu starts now...\n"));
 
-	pNet = (DEV_NET*) dev->priv;
+	pNet = netdev_priv(dev);
 	pAC  = pNet->pAC;
 
 	if ((NewMtu < 68) || (NewMtu > SK_JUMBO_MTU)) {
@@ -2649,7 +2673,7 @@
 #endif
 
 	pNet->Mtu = NewMtu;
-	pOtherNet = (DEV_NET*)pAC->dev[1 - pNet->NetNr]->priv;
+	pOtherNet = netdev_priv(pAC->dev[1 - pNet->NetNr]);
 	if ((pOtherNet->Mtu>1500) && (NewMtu<=1500) && (pOtherNet->Up==1)) {
 		return(0);
 	}
@@ -2855,7 +2879,7 @@
  */
 static struct net_device_stats *SkGeStats(struct SK_NET_DEVICE *dev)
 {
-DEV_NET *pNet = (DEV_NET*) dev->priv;
+DEV_NET *pNet = netdev_priv(dev);
 SK_AC	*pAC = pNet->pAC;
 SK_PNMI_STRUCT_DATA *pPnmiStruct;       /* structure for all Pnmi-Data */
 SK_PNMI_STAT    *pPnmiStat;             /* pointer to virtual XMAC stat. data */
@@ -2953,7 +2977,7 @@
 	SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY,
 		("SkGeIoctl starts now...\n"));
 
-	pNet = (DEV_NET*) dev->priv;
+	pNet = netdev_priv(dev);
 	pAC = pNet->pAC;
 	
 	if(copy_from_user(&Ioctl, rq->ifr_data, sizeof(SK_GE_IOCTL))) {
@@ -4539,11 +4563,8 @@
 int SkDrvEnterDiagMode(
 SK_AC   *pAc)   /* pointer to adapter context */
 {
-	SK_AC   *pAC  = NULL;
-	DEV_NET *pNet = NULL;
-
-	pNet = (DEV_NET *) pAc->dev[0]->priv;
-	pAC = pNet->pAC;
+	DEV_NET *pNet = netdev_priv(pAc->dev[0]);
+	SK_AC   *pAC  = pNet->pAC;
 
 	SK_MEMCPY(&(pAc->PnmiBackup), &(pAc->PnmiStruct), 
 			sizeof(SK_PNMI_STRUCT_DATA));
@@ -4558,8 +4579,8 @@
 		} else {
 			pAC->WasIfUp[0] = SK_FALSE;
 		}
-		if (pNet != (DEV_NET *) pAc->dev[1]->priv) {
-			pNet = (DEV_NET *) pAc->dev[1]->priv;
+		if (pNet != netdev_priv(pAC->dev[1])) {
+			pNet = netdev_priv(pAC->dev[1]);
 			if (pNet->Up) {
 				pAC->WasIfUp[1] = SK_TRUE;
 				pAC->DiagFlowCtrl = SK_TRUE; /* for SkGeClose */
@@ -4681,20 +4702,11 @@
 
 	dev = pAC->dev[devNbr];
 
-	/*
-	** Function SkGeClose() uses MOD_DEC_USE_COUNT (2.2/2.4)
-	** or module_put() (2.6) to decrease the number of users for
-	** a device, but if a device is to be put under control of 
-	** the DIAG, that count is OK already and does not need to 
-	** be adapted! Hence the opposite MOD_INC_USE_COUNT or 
-	** try_module_get() needs to be used again to correct that.
+	/* On Linux 2.6 the network driver does NOT mess with reference
+	** counts.  The driver MUST be able to be unloaded at any time
+	** due to the possibility of hotplug.
 	*/
-	if (!try_module_get(THIS_MODULE)) {
-		return (-1);
-	}
-
 	if (SkGeClose(dev) != 0) {
-		module_put(THIS_MODULE);
 		return (-1);
 	}
 	return (0);
@@ -4723,17 +4735,6 @@
 
 	if (SkGeOpen(dev) != 0) {
 		return (-1);
-	} else {
-		/*
-		** Function SkGeOpen() uses MOD_INC_USE_COUNT (2.2/2.4) 
-		** or try_module_get() (2.6) to increase the number of 
-		** users for a device, but if a device was just under 
-		** control of the DIAG, that count is OK already and 
-		** does not need to be adapted! Hence the opposite 
-		** MOD_DEC_USE_COUNT or module_put() needs to be used 
-		** again to correct that.
-		*/
-		module_put(THIS_MODULE);
 	}
 
 	/*
@@ -4904,9 +4905,6 @@
 	SK_AC			*pAC;
 	DEV_NET			*pNet = NULL;
 	struct net_device	*dev = NULL;
-#ifdef CONFIG_PROC_FS
-	struct proc_dir_entry	*pProcFile;
-#endif
 	static int boards_found = 0;
 	int error = -ENODEV;
 
@@ -4925,7 +4923,7 @@
 		goto out_disable_device;
 	}
 
-	pNet = dev->priv;
+	pNet = netdev_priv(dev);
 	pNet->pAC = kmalloc(sizeof(SK_AC), GFP_KERNEL);
 	if (!pNet->pAC) {
 		printk(KERN_ERR "Unable to allocate adapter "
@@ -4960,8 +4958,12 @@
 	dev->set_mac_address =	&SkGeSetMacAddr;
 	dev->do_ioctl =		&SkGeIoctl;
 	dev->change_mtu =	&SkGeChangeMtu;
+#ifdef CONFIG_NET_POLL_CONTROLLER
+	dev->poll_controller =	&SkGePollController;
+#endif
 	dev->flags &= 		~IFF_RUNNING;
 	SET_NETDEV_DEV(dev, &pdev->dev);
+	SET_ETHTOOL_OPS(dev, &SkGeEthtoolOps);
 
 #ifdef SK_ZEROCOPY
 #ifdef USE_SK_TX_CHECKSUM
@@ -5002,14 +5004,7 @@
 
 	memcpy(&dev->dev_addr, &pAC->Addr.Net[0].CurrentMacAddress, 6);
 
-#ifdef CONFIG_PROC_FS
-	pProcFile = create_proc_entry(dev->name, S_IRUGO, pSkRootDir);
-	if (pProcFile) {
-		pProcFile->proc_fops = &sk_proc_fops;
-		pProcFile->data = dev;
-		pProcFile->owner = THIS_MODULE;
-	}
-#endif
+	SkGeProcCreate(dev);
 
 	pNet->PortNr = 0;
 	pNet->NetNr  = 0;
@@ -5025,7 +5020,7 @@
 		}
 
 		pAC->dev[1]   = dev;
-		pNet          = dev->priv;
+		pNet          = netdev_priv(dev);
 		pNet->PortNr  = 1;
 		pNet->NetNr   = 1;
 		pNet->pAC     = pAC;
@@ -5041,6 +5036,8 @@
 		dev->do_ioctl           = &SkGeIoctl;
 		dev->change_mtu         = &SkGeChangeMtu;
 		dev->flags             &= ~IFF_RUNNING;
+		SET_NETDEV_DEV(dev, &pdev->dev);
+		SET_ETHTOOL_OPS(dev, &SkGeEthtoolOps);
 
 #ifdef SK_ZEROCOPY
 #ifdef USE_SK_TX_CHECKSUM
@@ -5056,16 +5053,7 @@
 			free_netdev(dev);
 			pAC->dev[1] = pAC->dev[0];
 		} else {
-#ifdef CONFIG_PROC_FS
-			pProcFile = create_proc_entry(dev->name, S_IRUGO,
-					pSkRootDir);
-			if (pProcFile) {
-				pProcFile->proc_fops = &sk_proc_fops;
-				pProcFile->data = dev;
-				pProcFile->owner = THIS_MODULE;
-			}
-#endif
-
+			SkGeProcCreate(dev);
 			memcpy(&dev->dev_addr,
 					&pAC->Addr.Net[1].CurrentMacAddress, 6);
 	
@@ -5101,19 +5089,14 @@
 static void __devexit skge_remove_one(struct pci_dev *pdev)
 {
 	struct net_device *dev = pci_get_drvdata(pdev);
-	DEV_NET *pNet = (DEV_NET *) dev->priv;
+	DEV_NET *pNet = netdev_priv(dev);
 	SK_AC *pAC = pNet->pAC;
-	int have_second_mac = 0;
-
-	if ((pAC->GIni.GIMacsFound == 2) && pAC->RlmtNets == 2)
-		have_second_mac = 1;
+	struct net_device *otherdev = pAC->dev[1];
 
-	remove_proc_entry(dev->name, pSkRootDir);
+	SkGeProcRemove(dev);
 	unregister_netdev(dev);
-	if (have_second_mac) {
-		remove_proc_entry(pAC->dev[1]->name, pSkRootDir);
-		unregister_netdev(pAC->dev[1]);
-	}
+	if (otherdev != dev)
+		SkGeProcRemove(otherdev);
 
 	SkGeYellowLED(pAC, pAC->IoBase, 0);
 
@@ -5146,8 +5129,8 @@
 
 	FreeResources(dev);
 	free_netdev(dev);
-	if (have_second_mac)
-		free_netdev(pAC->dev[1]);
+	if (otherdev != dev)
+		free_netdev(otherdev);
 	kfree(pAC);
 }
 
@@ -5180,34 +5163,21 @@
 {
 	int error;
 
-#ifdef CONFIG_PROC_FS
-	memcpy(&SK_Root_Dir_entry, BOOT_STRING, sizeof(SK_Root_Dir_entry) - 1);
-
-	pSkRootDir = proc_mkdir(SK_Root_Dir_entry, proc_net);
-	if (!pSkRootDir) {
-		printk(KERN_WARNING "Unable to create /proc/net/%s",
-				SK_Root_Dir_entry);
-		return -ENOMEM;
-	}
-	pSkRootDir->owner = THIS_MODULE;
-#endif
-
-	error = pci_module_init(&skge_driver);
-	if (error) {
-#ifdef CONFIG_PROC_FS
-		remove_proc_entry(pSkRootDir->name, proc_net);
-#endif
-	}
-
+	pSkRootDir = proc_mkdir(SKRootName, proc_net);
+	if (pSkRootDir) 
+		pSkRootDir->owner = THIS_MODULE;
+	
+	error = pci_register_driver(&skge_driver);
+	if (error)
+		proc_net_remove(SKRootName);
 	return error;
 }
 
 static void __exit skge_exit(void)
 {
-	 pci_unregister_driver(&skge_driver);
-#ifdef CONFIG_PROC_FS
-	remove_proc_entry(pSkRootDir->name, proc_net);
-#endif
+	pci_unregister_driver(&skge_driver);
+	proc_net_remove(SKRootName);
+
 }
 
 module_init(skge_init);
diff -Nru a/drivers/net/sk98lin/skproc.c b/drivers/net/sk98lin/skproc.c
--- a/drivers/net/sk98lin/skproc.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/net/sk98lin/skproc.c	2005-01-10 20:11:16 -08:00
@@ -31,13 +31,9 @@
 #include "h/skdrv2nd.h"
 #include "h/skversion.h"
 
-extern struct SK_NET_DEVICE *SkGeRootDev;
-static int sk_proc_print(void *writePtr, char *format, ...);
-static void sk_gen_browse(void *buffer);
-int len;
-
 static int sk_seq_show(struct seq_file *seq, void *v);
 static int sk_proc_open(struct inode *inode, struct file *file);
+
 struct file_operations sk_proc_fops = {
 	.owner		= THIS_MODULE,
 	.open		= sk_proc_open,
@@ -45,315 +41,206 @@
 	.llseek		= seq_lseek,
 	.release	= single_release,
 };
-struct net_device *currDev = NULL;
+
 
 /*****************************************************************************
  *
- * 	sk_gen_browse -generic  print "summaries" entry 
+ *      sk_seq_show - show proc information of a particular adapter
  *
  * Description:
  *  This function fills the proc entry with statistic data about 
- *  the ethernet device.
+ *  the ethernet device. It invokes the generic sk_gen_browse() to
+ *  print out all items one per one.
  *  
- * Returns: -
- *	
+ * Returns: 0
+ *      
  */
-static void sk_gen_browse(void *buffer)
+static int sk_seq_show(struct seq_file *seq, void *v)
 {
-	struct SK_NET_DEVICE	*SkgeProcDev = SkGeRootDev;
-	struct SK_NET_DEVICE	*next;
-	SK_PNMI_STRUCT_DATA 	*pPnmiStruct;
-	SK_PNMI_STAT		*pPnmiStat;
+	struct net_device *dev = seq->private;
+	DEV_NET			*pNet = netdev_priv(dev);
+	SK_AC			*pAC = pNet->pAC;
+	SK_PNMI_STRUCT_DATA 	*pPnmiStruct = &pAC->PnmiStruct;
 	unsigned long		Flags;	
 	unsigned int		Size;
-	DEV_NET			*pNet;
-	SK_AC			*pAC;
 	char			sens_msg[50];
-	int			MaxSecurityCount = 0;
 	int 			t;
 	int 			i;
 
-	while (SkgeProcDev) {
-		MaxSecurityCount++;
-		if (MaxSecurityCount > 100) {
-			printk("Max limit for sk_proc_read security counter!\n");
-			return;
-		}
-		pNet = (DEV_NET*) SkgeProcDev->priv;
-		pAC = pNet->pAC;
-		next = pAC->Next;
-		pPnmiStruct = &pAC->PnmiStruct;
-		/* NetIndex in GetStruct is now required, zero is only dummy */
-
-		for (t=pAC->GIni.GIMacsFound; t > 0; t--) {
-			if ((pAC->GIni.GIMacsFound == 2) && pAC->RlmtNets == 1)
-				t--;
+	/* NetIndex in GetStruct is now required, zero is only dummy */
+	for (t=pAC->GIni.GIMacsFound; t > 0; t--) {
+		if ((pAC->GIni.GIMacsFound == 2) && pAC->RlmtNets == 1)
+			t--;
 
-			spin_lock_irqsave(&pAC->SlowPathLock, Flags);
-			Size = SK_PNMI_STRUCT_SIZE;
+		spin_lock_irqsave(&pAC->SlowPathLock, Flags);
+		Size = SK_PNMI_STRUCT_SIZE;
 #ifdef SK_DIAG_SUPPORT
-			if (pAC->BoardLevel == SK_INIT_DATA) {
-				SK_MEMCPY(&(pAC->PnmiStruct), &(pAC->PnmiBackup), sizeof(SK_PNMI_STRUCT_DATA));
-				if (pAC->DiagModeActive == DIAG_NOTACTIVE) {
-					pAC->Pnmi.DiagAttached = SK_DIAG_IDLE;
-				}
-			} else {
-				SkPnmiGetStruct(pAC, pAC->IoBase, pPnmiStruct, &Size, t-1);
+		if (pAC->BoardLevel == SK_INIT_DATA) {
+			SK_MEMCPY(&(pAC->PnmiStruct), &(pAC->PnmiBackup), sizeof(SK_PNMI_STRUCT_DATA));
+			if (pAC->DiagModeActive == DIAG_NOTACTIVE) {
+				pAC->Pnmi.DiagAttached = SK_DIAG_IDLE;
 			}
+		} else {
+			SkPnmiGetStruct(pAC, pAC->IoBase, pPnmiStruct, &Size, t-1);
+		}
 #else
-			SkPnmiGetStruct(pAC, pAC->IoBase, 
+		SkPnmiGetStruct(pAC, pAC->IoBase, 
 				pPnmiStruct, &Size, t-1);
 #endif
-			spin_unlock_irqrestore(&pAC->SlowPathLock, Flags);
+		spin_unlock_irqrestore(&pAC->SlowPathLock, Flags);
 	
-			if (strcmp(pAC->dev[t-1]->name, currDev->name) == 0) {
-				pPnmiStat = &pPnmiStruct->Stat[0];
-				len = sk_proc_print(buffer, 
-					"\nDetailed statistic for device %s\n",
-					pAC->dev[t-1]->name);
-				len += sk_proc_print(buffer,
-					"=======================================\n");
+		if (pAC->dev[t-1] == dev) {
+			SK_PNMI_STAT	*pPnmiStat = &pPnmiStruct->Stat[0];
+
+			seq_printf(seq, "\nDetailed statistic for device %s\n",
+				      pAC->dev[t-1]->name);
+			seq_printf(seq, "=======================================\n");
 	
-				/* Board statistics */
-				len += sk_proc_print(buffer, 
-					"\nBoard statistics\n\n");
-				len += sk_proc_print(buffer,
-					"Active Port                    %c\n",
-					'A' + pAC->Rlmt.Net[t-1].Port[pAC->Rlmt.
-					Net[t-1].PrefPort]->PortNumber);
-				len += sk_proc_print(buffer,
-					"Preferred Port                 %c\n",
-					'A' + pAC->Rlmt.Net[t-1].Port[pAC->Rlmt.
-					Net[t-1].PrefPort]->PortNumber);
-
-				len += sk_proc_print(buffer,
-					"Bus speed (MHz)                %d\n",
-					pPnmiStruct->BusSpeed);
-
-				len += sk_proc_print(buffer,
-					"Bus width (Bit)                %d\n",
-					pPnmiStruct->BusWidth);
-				len += sk_proc_print(buffer,
-					"Driver version                 %s\n",
-					VER_STRING);
-				len += sk_proc_print(buffer,
-					"Hardware revision              v%d.%d\n",
-					(pAC->GIni.GIPciHwRev >> 4) & 0x0F,
-					pAC->GIni.GIPciHwRev & 0x0F);
-
-				/* Print sensor informations */
-				for (i=0; i < pAC->I2c.MaxSens; i ++) {
-					/* Check type */
-					switch (pAC->I2c.SenTable[i].SenType) {
-					case 1:
-						strcpy(sens_msg, pAC->I2c.SenTable[i].SenDesc);
-						strcat(sens_msg, " (C)");
-						len += sk_proc_print(buffer,
-							"%-25s      %d.%02d\n",
-							sens_msg,
-							pAC->I2c.SenTable[i].SenValue / 10,
-							pAC->I2c.SenTable[i].SenValue % 10);
-
-						strcpy(sens_msg, pAC->I2c.SenTable[i].SenDesc);
-						strcat(sens_msg, " (F)");
-						len += sk_proc_print(buffer,
-							"%-25s      %d.%02d\n",
-							sens_msg,
-							((((pAC->I2c.SenTable[i].SenValue)
-							*10)*9)/5 + 3200)/100,
-							((((pAC->I2c.SenTable[i].SenValue)
-							*10)*9)/5 + 3200) % 10);
-						break;
-					case 2:
-						strcpy(sens_msg, pAC->I2c.SenTable[i].SenDesc);
-						strcat(sens_msg, " (V)");
-						len += sk_proc_print(buffer,
-							"%-25s      %d.%03d\n",
-							sens_msg,
-							pAC->I2c.SenTable[i].SenValue / 1000,
-							pAC->I2c.SenTable[i].SenValue % 1000);
-						break;
-					case 3:
-						strcpy(sens_msg, pAC->I2c.SenTable[i].SenDesc);
-						strcat(sens_msg, " (rpm)");
-						len += sk_proc_print(buffer,
-							"%-25s      %d\n",
-							sens_msg,
-							pAC->I2c.SenTable[i].SenValue);
-						break;
-					default:
-						break;
-					}
+			/* Board statistics */
+			seq_printf(seq, "\nBoard statistics\n\n");
+			seq_printf(seq, "Active Port                    %c\n",
+				      'A' + pAC->Rlmt.Net[t-1].Port[pAC->Rlmt.
+								    Net[t-1].PrefPort]->PortNumber);
+			seq_printf(seq, "Preferred Port                 %c\n",
+				      'A' + pAC->Rlmt.Net[t-1].Port[pAC->Rlmt.
+								    Net[t-1].PrefPort]->PortNumber);
+
+			seq_printf(seq, "Bus speed (MHz)                %d\n",
+				      pPnmiStruct->BusSpeed);
+
+			seq_printf(seq, "Bus width (Bit)                %d\n",
+				      pPnmiStruct->BusWidth);
+			seq_printf(seq, "Driver version                 %s\n",
+				      VER_STRING);
+			seq_printf(seq, "Hardware revision              v%d.%d\n",
+				      (pAC->GIni.GIPciHwRev >> 4) & 0x0F,
+				      pAC->GIni.GIPciHwRev & 0x0F);
+
+			/* Print sensor informations */
+			for (i=0; i < pAC->I2c.MaxSens; i ++) {
+				/* Check type */
+				switch (pAC->I2c.SenTable[i].SenType) {
+				case 1:
+					strcpy(sens_msg, pAC->I2c.SenTable[i].SenDesc);
+					strcat(sens_msg, " (C)");
+					seq_printf(seq, "%-25s      %d.%02d\n",
+						      sens_msg,
+						      pAC->I2c.SenTable[i].SenValue / 10,
+						      pAC->I2c.SenTable[i].SenValue % 10);
+
+					strcpy(sens_msg, pAC->I2c.SenTable[i].SenDesc);
+					strcat(sens_msg, " (F)");
+					seq_printf(seq, "%-25s      %d.%02d\n",
+						      sens_msg,
+						      ((((pAC->I2c.SenTable[i].SenValue)
+							 *10)*9)/5 + 3200)/100,
+						      ((((pAC->I2c.SenTable[i].SenValue)
+							 *10)*9)/5 + 3200) % 10);
+					break;
+				case 2:
+					strcpy(sens_msg, pAC->I2c.SenTable[i].SenDesc);
+					strcat(sens_msg, " (V)");
+					seq_printf(seq, "%-25s      %d.%03d\n",
+						      sens_msg,
+						      pAC->I2c.SenTable[i].SenValue / 1000,
+						      pAC->I2c.SenTable[i].SenValue % 1000);
+					break;
+				case 3:
+					strcpy(sens_msg, pAC->I2c.SenTable[i].SenDesc);
+					strcat(sens_msg, " (rpm)");
+					seq_printf(seq, "%-25s      %d\n",
+						      sens_msg,
+						      pAC->I2c.SenTable[i].SenValue);
+					break;
+				default:
+					break;
 				}
+			}
 				
-				/*Receive statistics */
-				len += sk_proc_print(buffer, 
-				"\nReceive statistics\n\n");
-
-				len += sk_proc_print(buffer,
-					"Received bytes                 %Lu\n",
-					(unsigned long long) pPnmiStat->StatRxOctetsOkCts);
-				len += sk_proc_print(buffer,
-					"Received packets               %Lu\n",
-					(unsigned long long) pPnmiStat->StatRxOkCts);
+			/*Receive statistics */
+			seq_printf(seq, "\nReceive statistics\n\n");
+
+			seq_printf(seq, "Received bytes                 %Lu\n",
+				      (unsigned long long) pPnmiStat->StatRxOctetsOkCts);
+			seq_printf(seq, "Received packets               %Lu\n",
+				      (unsigned long long) pPnmiStat->StatRxOkCts);
 #if 0
-				if (pAC->GIni.GP[0].PhyType == SK_PHY_XMAC && 
-					pAC->HWRevision < 12) {
-					pPnmiStruct->InErrorsCts = pPnmiStruct->InErrorsCts - 
-						pPnmiStat->StatRxShortsCts;
-					pPnmiStat->StatRxShortsCts = 0;
-				}
+			if (pAC->GIni.GP[0].PhyType == SK_PHY_XMAC && 
+			    pAC->HWRevision < 12) {
+				pPnmiStruct->InErrorsCts = pPnmiStruct->InErrorsCts - 
+					pPnmiStat->StatRxShortsCts;
+				pPnmiStat->StatRxShortsCts = 0;
+			}
 #endif
-				if (pNet->Mtu > 1500) 
-					pPnmiStruct->InErrorsCts = pPnmiStruct->InErrorsCts -
-						pPnmiStat->StatRxTooLongCts;
-
-				len += sk_proc_print(buffer,
-					"Receive errors                 %Lu\n",
-					(unsigned long long) pPnmiStruct->InErrorsCts);
-				len += sk_proc_print(buffer,
-					"Receive dropped                %Lu\n",
-					(unsigned long long) pPnmiStruct->RxNoBufCts);
-				len += sk_proc_print(buffer,
-					"Received multicast             %Lu\n",
-					(unsigned long long) pPnmiStat->StatRxMulticastOkCts);
-				len += sk_proc_print(buffer,
-					"Receive error types\n");
-				len += sk_proc_print(buffer,
-					"   length                      %Lu\n",
-					(unsigned long long) pPnmiStat->StatRxRuntCts);
-				len += sk_proc_print(buffer,
-					"   buffer overflow             %Lu\n",
-					(unsigned long long) pPnmiStat->StatRxFifoOverflowCts);
-				len += sk_proc_print(buffer,
-					"   bad crc                     %Lu\n",
-					(unsigned long long) pPnmiStat->StatRxFcsCts);
-				len += sk_proc_print(buffer,
-					"   framing                     %Lu\n",
-					(unsigned long long) pPnmiStat->StatRxFramingCts);
-				len += sk_proc_print(buffer,
-					"   missed frames               %Lu\n",
-					(unsigned long long) pPnmiStat->StatRxMissedCts);
-
-				if (pNet->Mtu > 1500)
-					pPnmiStat->StatRxTooLongCts = 0;
-
-				len += sk_proc_print(buffer,
-					"   too long                    %Lu\n",
-					(unsigned long long) pPnmiStat->StatRxTooLongCts);					
-				len += sk_proc_print(buffer,
-					"   carrier extension           %Lu\n",
-					(unsigned long long) pPnmiStat->StatRxCextCts);				
-				len += sk_proc_print(buffer,
-					"   too short                   %Lu\n",
-					(unsigned long long) pPnmiStat->StatRxShortsCts);				
-				len += sk_proc_print(buffer,
-					"   symbol                      %Lu\n",
-					(unsigned long long) pPnmiStat->StatRxSymbolCts);				
-				len += sk_proc_print(buffer,
-					"   LLC MAC size                %Lu\n",
-					(unsigned long long) pPnmiStat->StatRxIRLengthCts);				
-				len += sk_proc_print(buffer,
-					"   carrier event               %Lu\n",
-					(unsigned long long) pPnmiStat->StatRxCarrierCts);				
-				len += sk_proc_print(buffer,
-					"   jabber                      %Lu\n",
-					(unsigned long long) pPnmiStat->StatRxJabberCts);				
-
-
-				/*Transmit statistics */
-				len += sk_proc_print(buffer, 
-				"\nTransmit statistics\n\n");
+			if (dev->mtu > 1500)
+				pPnmiStruct->InErrorsCts = pPnmiStruct->InErrorsCts -
+					pPnmiStat->StatRxTooLongCts;
+
+			seq_printf(seq, "Receive errors                 %Lu\n",
+				      (unsigned long long) pPnmiStruct->InErrorsCts);
+			seq_printf(seq, "Receive dropped                %Lu\n",
+				      (unsigned long long) pPnmiStruct->RxNoBufCts);
+			seq_printf(seq, "Received multicast             %Lu\n",
+				      (unsigned long long) pPnmiStat->StatRxMulticastOkCts);
+			seq_printf(seq, "Receive error types\n");
+			seq_printf(seq, "   length                      %Lu\n",
+				      (unsigned long long) pPnmiStat->StatRxRuntCts);
+			seq_printf(seq, "   buffer overflow             %Lu\n",
+				      (unsigned long long) pPnmiStat->StatRxFifoOverflowCts);
+			seq_printf(seq, "   bad crc                     %Lu\n",
+				      (unsigned long long) pPnmiStat->StatRxFcsCts);
+			seq_printf(seq, "   framing                     %Lu\n",
+				      (unsigned long long) pPnmiStat->StatRxFramingCts);
+			seq_printf(seq, "   missed frames               %Lu\n",
+				      (unsigned long long) pPnmiStat->StatRxMissedCts);
+
+			if (dev->mtu > 1500)
+				pPnmiStat->StatRxTooLongCts = 0;
+
+			seq_printf(seq, "   too long                    %Lu\n",
+				      (unsigned long long) pPnmiStat->StatRxTooLongCts);					
+			seq_printf(seq, "   carrier extension           %Lu\n",
+				      (unsigned long long) pPnmiStat->StatRxCextCts);				
+			seq_printf(seq, "   too short                   %Lu\n",
+				      (unsigned long long) pPnmiStat->StatRxShortsCts);				
+			seq_printf(seq, "   symbol                      %Lu\n",
+				      (unsigned long long) pPnmiStat->StatRxSymbolCts);				
+			seq_printf(seq, "   LLC MAC size                %Lu\n",
+				      (unsigned long long) pPnmiStat->StatRxIRLengthCts);				
+			seq_printf(seq, "   carrier event               %Lu\n",
+				      (unsigned long long) pPnmiStat->StatRxCarrierCts);				
+			seq_printf(seq, "   jabber                      %Lu\n",
+				      (unsigned long long) pPnmiStat->StatRxJabberCts);				
+
+
+			/*Transmit statistics */
+			seq_printf(seq, "\nTransmit statistics\n\n");
 				
-				len += sk_proc_print(buffer,
-					"Transmited bytes               %Lu\n",
-					(unsigned long long) pPnmiStat->StatTxOctetsOkCts);
-				len += sk_proc_print(buffer,
-					"Transmited packets             %Lu\n",
-					(unsigned long long) pPnmiStat->StatTxOkCts);
-				len += sk_proc_print(buffer,
-					"Transmit errors                %Lu\n",
-					(unsigned long long) pPnmiStat->StatTxSingleCollisionCts);
-				len += sk_proc_print(buffer,
-					"Transmit dropped               %Lu\n",
-					(unsigned long long) pPnmiStruct->TxNoBufCts);
-				len += sk_proc_print(buffer,
-					"Transmit collisions            %Lu\n",
-					(unsigned long long) pPnmiStat->StatTxSingleCollisionCts);
-				len += sk_proc_print(buffer,
-					"Transmit error types\n");
-				len += sk_proc_print(buffer,
-					"   excessive collision         %ld\n",
-					pAC->stats.tx_aborted_errors);
-				len += sk_proc_print(buffer,
-					"   carrier                     %Lu\n",
-					(unsigned long long) pPnmiStat->StatTxCarrierCts);
-				len += sk_proc_print(buffer,
-					"   fifo underrun               %Lu\n",
-					(unsigned long long) pPnmiStat->StatTxFifoUnderrunCts);
-				len += sk_proc_print(buffer,
-					"   heartbeat                   %Lu\n",
-					(unsigned long long) pPnmiStat->StatTxCarrierCts);
-				len += sk_proc_print(buffer,
-					"   window                      %ld\n",
-					pAC->stats.tx_window_errors);
+			seq_printf(seq, "Transmited bytes               %Lu\n",
+				      (unsigned long long) pPnmiStat->StatTxOctetsOkCts);
+			seq_printf(seq, "Transmited packets             %Lu\n",
+				      (unsigned long long) pPnmiStat->StatTxOkCts);
+			seq_printf(seq, "Transmit errors                %Lu\n",
+				      (unsigned long long) pPnmiStat->StatTxSingleCollisionCts);
+			seq_printf(seq, "Transmit dropped               %Lu\n",
+				      (unsigned long long) pPnmiStruct->TxNoBufCts);
+			seq_printf(seq, "Transmit collisions            %Lu\n",
+				      (unsigned long long) pPnmiStat->StatTxSingleCollisionCts);
+			seq_printf(seq, "Transmit error types\n");
+			seq_printf(seq, "   excessive collision         %ld\n",
+				      pAC->stats.tx_aborted_errors);
+			seq_printf(seq, "   carrier                     %Lu\n",
+				      (unsigned long long) pPnmiStat->StatTxCarrierCts);
+			seq_printf(seq, "   fifo underrun               %Lu\n",
+				      (unsigned long long) pPnmiStat->StatTxFifoUnderrunCts);
+			seq_printf(seq, "   heartbeat                   %Lu\n",
+				      (unsigned long long) pPnmiStat->StatTxCarrierCts);
+			seq_printf(seq, "   window                      %ld\n",
+				      pAC->stats.tx_window_errors);
 				
-			} /* if (strcmp(pACname, currDeviceName) == 0) */
 		}
-		SkgeProcDev = next;
 	}
-}
-
-/*****************************************************************************
- *
- *      sk_proc_print -generic line print  
- *
- * Description:
- *  This function fills the proc entry with statistic data about 
- *  the ethernet device.
- *  
- * Returns: number of bytes written
- *      
- */ 
-static int sk_proc_print(void *writePtr, char *format, ...)
-{   
-#define MAX_LEN_SINGLE_LINE 256
-	char     str[MAX_LEN_SINGLE_LINE];
-	va_list  a_start;
-	int      lenght = 0;
-
-	struct seq_file *seq = (struct seq_file *) writePtr;
-
-	SK_MEMSET(str, 0, MAX_LEN_SINGLE_LINE);
-
-	va_start(a_start, format);
-	vsprintf(str, format, a_start);
-	va_end(a_start);
-
-	lenght = strlen(str);
-
-	seq_printf(seq, str);
-	return lenght;
-}
-
-/*****************************************************************************
- *
- *      sk_seq_show - show proc information of a particular adapter
- *
- * Description:
- *  This function fills the proc entry with statistic data about 
- *  the ethernet device. It invokes the generic sk_gen_browse() to
- *  print out all items one per one.
- *  
- * Returns: number of bytes written
- *      
- */
-static int sk_seq_show(struct seq_file *seq, void *v)
-{
-    void *castedBuffer = (void *) seq;
-    currDev = seq->private;
-    sk_gen_browse(castedBuffer);
-    return 0;
+	return 0;
 }
 
 /*****************************************************************************
diff -Nru a/drivers/net/skfp/h/fplustm.h b/drivers/net/skfp/h/fplustm.h
--- a/drivers/net/skfp/h/fplustm.h	2005-01-10 20:11:16 -08:00
+++ b/drivers/net/skfp/h/fplustm.h	2005-01-10 20:11:16 -08:00
@@ -21,11 +21,7 @@
 #define _FPLUS_
 
 #ifndef	HW_PTR
-#ifdef	MEM_MAPPED_IO
-#define	HW_PTR	u_long
-#else
-#define	HW_PTR	u_short
-#endif
+#define	HW_PTR	void __iomem *
 #endif
 
 /*
diff -Nru a/drivers/net/skfp/h/targethw.h b/drivers/net/skfp/h/targethw.h
--- a/drivers/net/skfp/h/targethw.h	2005-01-10 20:11:21 -08:00
+++ b/drivers/net/skfp/h/targethw.h	2005-01-10 20:11:21 -08:00
@@ -33,11 +33,7 @@
 #endif
 
 #ifndef	HW_PTR
-#ifdef  MEM_MAPPED_IO
-#define HW_PTR  u_long
-#else
-#define HW_PTR  u_short
-#endif
+#define HW_PTR  void __iomem *
 #endif
 
 #ifdef MULT_OEM
diff -Nru a/drivers/net/skfp/h/targetos.h b/drivers/net/skfp/h/targetos.h
--- a/drivers/net/skfp/h/targetos.h	2005-01-10 20:11:17 -08:00
+++ b/drivers/net/skfp/h/targetos.h	2005-01-10 20:11:17 -08:00
@@ -53,7 +53,7 @@
 // is redefined by linux, but we need our definition
 #undef ADDR
 #ifdef MEM_MAPPED_IO
-#define	ADDR(a) (char far *) smc->hw.iop+(a)
+#define	ADDR(a) (smc->hw.iop+(a))
 #else
 #define	ADDR(a) (((a)>>7) ? (outp(smc->hw.iop+B0_RAP,(a)>>7), (smc->hw.iop+( ((a)&0x7F) | ((a)>>7 ? 0x80:0)) )) : (smc->hw.iop+(((a)&0x7F)|((a)>>7 ? 0x80:0))))
 #endif
diff -Nru a/drivers/net/skfp/h/types.h b/drivers/net/skfp/h/types.h
--- a/drivers/net/skfp/h/types.h	2005-01-10 20:11:19 -08:00
+++ b/drivers/net/skfp/h/types.h	2005-01-10 20:11:19 -08:00
@@ -29,20 +29,11 @@
 #define _far
 #endif
 
-#ifndef MEM_MAPPED_IO // "normal" IO
-#define inp(p)  inb(p)
-#define inpw(p)	inw(p)
-#define inpd(p) inl(p)
-#define outp(p,c)  outb(c,p)
-#define outpw(p,s) outw(s,p)
-#define outpd(p,l) outl(l,p)
-#else // memory mapped io
-#define inp(a)		readb(a)
-#define inpw(a)		readw(a)
-#define inpd(a)		readl(a)
-#define outp(a,v)	writeb(v, a)	
-#define outpw(a,v)	writew(v, a)	
-#define outpd(a,v)	writel(v, a)	
-#endif
+#define inp(p)  ioread8(p)
+#define inpw(p)	ioread16(p)
+#define inpd(p) ioread32(p)
+#define outp(p,c)  iowrite8(c,p)
+#define outpw(p,s) iowrite16(s,p)
+#define outpd(p,l) iowrite32(l,p)
 
 #endif	/* _TYPES_ */
diff -Nru a/drivers/net/skfp/skfddi.c b/drivers/net/skfp/skfddi.c
--- a/drivers/net/skfp/skfddi.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/net/skfp/skfddi.c	2005-01-10 20:11:16 -08:00
@@ -206,6 +206,7 @@
 	struct net_device *dev;
 	struct s_smc *smc;	/* board pointer */
 	unsigned long port, len;
+	void __iomem *mem;
 	int err;
 
 	PRINTK(KERN_INFO "entering skfp_init_one\n");
@@ -263,16 +264,16 @@
 	}
 
 #ifdef MEM_MAPPED_IO
-	dev->base_addr = (unsigned long) ioremap(port, len);
-	if (!dev->base_addr) {
-		printk(KERN_ERR "skfp:  Unable to map MEMORY register, "
+	mem = ioremap(port, len);
+#else
+	mem =ioport_map(port, len);
+#endif
+	if (!mem) {
+		printk(KERN_ERR "skfp:  Unable to map register, "
 				"FDDI adapter will be disabled.\n");
 		err = -EIO;
 		goto err_out3;
 	}
-#else
-	dev->base_addr = port;
-#endif
 
 	dev->irq = pdev->irq;
 	dev->get_stats = &skfp_ctl_get_stats;
@@ -296,9 +297,12 @@
 	smc->os.MaxFrameSize = MAX_FRAME_SIZE;
 	smc->os.dev = dev;
 	smc->hw.slot = -1;
+	smc->hw.iop = mem;
 	smc->os.ResetRequested = FALSE;
 	skb_queue_head_init(&smc->os.SendSkbQueue);
 
+	dev->base_addr = (unsigned long)mem;
+
 	err = skfp_driver_init(dev);
 	if (err)
 		goto err_out4;
@@ -328,7 +332,9 @@
 			    smc->os.LocalRxBuffer, smc->os.LocalRxBufferDMA);
 err_out4:
 #ifdef MEM_MAPPED_IO
-	iounmap((void *) dev->base_addr);
+	iounmap(smc->hw.iop);
+#else
+	ioport_unmap(smc->hw.iop);
 #endif
 err_out3:
 	free_netdev(dev);
@@ -363,7 +369,9 @@
 		lp->os.LocalRxBuffer = NULL;
 	}
 #ifdef MEM_MAPPED_IO
-	iounmap((void *) p->base_addr);
+	iounmap(lp->hw.iop);
+#else
+	ioport_unmap(lp->hw.iop);
 #endif
 	pci_release_regions(pdev);
 	free_netdev(p);
@@ -406,7 +414,6 @@
 
 	// set the io address in private structures
 	bp->base_addr = dev->base_addr;
-	smc->hw.iop = dev->base_addr;
 
 	// Get the interrupt level from the PCI Configuration Table
 	smc->hw.irq = dev->irq;
diff -Nru a/drivers/net/skfp/smt.c b/drivers/net/skfp/smt.c
--- a/drivers/net/skfp/smt.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/net/skfp/smt.c	2005-01-10 20:11:21 -08:00
@@ -135,13 +135,6 @@
 		*(short *)(&smc->mib.m[MAC0].fddiMACSMTAddress.a[4])) ;
 }
 
-static inline int is_zero(const struct fddi_addr *addr)
-{
-	return(*(short *)(&addr->a[0]) == 0 &&
-	       *(short *)(&addr->a[2]) == 0 &&
-	       *(short *)(&addr->a[4]) == 0 ) ;
-}
-
 static inline int is_broadcast(const struct fddi_addr *addr)
 {
 	return(*(u_short *)(&addr->a[0]) == 0xffff &&
diff -Nru a/drivers/net/smc-mca.c b/drivers/net/smc-mca.c
--- a/drivers/net/smc-mca.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/net/smc-mca.c	2005-01-10 20:11:16 -08:00
@@ -95,8 +95,8 @@
 static int ultra_irq[MAX_ULTRAMCA_CARDS];
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(ultra_io, "1-" __MODULE_STRING(MAX_ULTRAMCA_CARDS) "i");
-MODULE_PARM(ultra_irq, "1-" __MODULE_STRING(MAX_ULTRAMCA_CARDS) "i");
+module_param_array(ultra_io, int, NULL, 0);
+module_param_array(ultra_irq, int, NULL, 0);
 MODULE_PARM_DESC(ultra_io, "SMC Ultra/EtherEZ MCA I/O base address(es)");
 MODULE_PARM_DESC(ultra_irq, "SMC Ultra/EtherEZ MCA IRQ number(s)");
 
diff -Nru a/drivers/net/smc-ultra.c b/drivers/net/smc-ultra.c
--- a/drivers/net/smc-ultra.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/net/smc-ultra.c	2005-01-10 20:11:16 -08:00
@@ -553,8 +553,8 @@
 static int io[MAX_ULTRA_CARDS];
 static int irq[MAX_ULTRA_CARDS];
 
-MODULE_PARM(io, "1-" __MODULE_STRING(MAX_ULTRA_CARDS) "i");
-MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_ULTRA_CARDS) "i");
+module_param_array(io, int, NULL, 0);
+module_param_array(irq, int, NULL, 0);
 MODULE_PARM_DESC(io, "I/O base address(es)");
 MODULE_PARM_DESC(irq, "IRQ number(s) (assigned)");
 MODULE_DESCRIPTION("SMC Ultra/EtherEZ ISA/PnP Ethernet driver");
diff -Nru a/drivers/net/smc9194.c b/drivers/net/smc9194.c
--- a/drivers/net/smc9194.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/net/smc9194.c	2005-01-10 20:11:21 -08:00
@@ -1600,9 +1600,9 @@
 static struct net_device *devSMC9194;
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(io, "i");
-MODULE_PARM(irq, "i");
-MODULE_PARM(ifport, "i");
+module_param(io, int, 0);
+module_param(irq, int, 0);
+module_param(ifport, int, 0);
 MODULE_PARM_DESC(io, "SMC 99194 I/O base address");
 MODULE_PARM_DESC(irq, "SMC 99194 IRQ number");
 MODULE_PARM_DESC(ifport, "SMC 99194 interface port (0-default, 1-TP, 2-AUI)");
diff -Nru a/drivers/net/starfire.c b/drivers/net/starfire.c
--- a/drivers/net/starfire.c	2005-01-10 20:11:24 -08:00
+++ b/drivers/net/starfire.c	2005-01-10 20:11:24 -08:00
@@ -372,15 +372,15 @@
 MODULE_DESCRIPTION("Adaptec Starfire Ethernet driver");
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(max_interrupt_work, "i");
-MODULE_PARM(mtu, "i");
-MODULE_PARM(debug, "i");
-MODULE_PARM(rx_copybreak, "i");
-MODULE_PARM(intr_latency, "i");
-MODULE_PARM(small_frames, "i");
-MODULE_PARM(options, "1-" __MODULE_STRING(MAX_UNITS) "i");
-MODULE_PARM(full_duplex, "1-" __MODULE_STRING(MAX_UNITS) "i");
-MODULE_PARM(enable_hw_cksum, "i");
+module_param(max_interrupt_work, int, 0);
+module_param(mtu, int, 0);
+module_param(debug, int, 0);
+module_param(rx_copybreak, int, 0);
+module_param(intr_latency, int, 0);
+module_param(small_frames, int, 0);
+module_param_array(options, int, NULL, 0);
+module_param_array(full_duplex, int, NULL, 0);
+module_param(enable_hw_cksum, int, 0);
 MODULE_PARM_DESC(max_interrupt_work, "Maximum events handled per interrupt");
 MODULE_PARM_DESC(mtu, "MTU (all boards)");
 MODULE_PARM_DESC(debug, "Debug level (0-6)");
@@ -776,6 +776,7 @@
 	struct mii_if_info mii_if;		/* MII lib hooks/info */
 	int phy_cnt;			/* MII device addresses. */
 	unsigned char phys[PHY_CNT];	/* MII device addresses. */
+	void __iomem *base;
 };
 
 
@@ -846,6 +847,7 @@
 	struct net_device *dev;
 	static int card_idx = -1;
 	long ioaddr;
+	void __iomem *base;
 	int drv_flags, io_size;
 	int boguscnt;
 
@@ -884,14 +886,12 @@
 	}
 
 	/* ioremap is borken in Linux-2.2.x/sparc64 */
-#if !defined(CONFIG_SPARC64) || LINUX_VERSION_CODE > 0x20300
-	ioaddr = (long) ioremap(ioaddr, io_size);
-	if (!ioaddr) {
+	base = ioremap(ioaddr, io_size);
+	if (!base) {
 		printk(KERN_ERR DRV_NAME " %d: cannot remap %#x @ %#lx, aborting\n",
 			card_idx, io_size, ioaddr);
 		goto err_out_free_res;
 	}
-#endif /* !CONFIG_SPARC64 || Linux 2.3.0+ */
 
 	pci_set_master(pdev);
 
@@ -918,27 +918,27 @@
 
 	/* Serial EEPROM reads are hidden by the hardware. */
 	for (i = 0; i < 6; i++)
-		dev->dev_addr[i] = readb(ioaddr + EEPROMCtrl + 20 - i);
+		dev->dev_addr[i] = readb(base + EEPROMCtrl + 20 - i);
 
 #if ! defined(final_version) /* Dump the EEPROM contents during development. */
 	if (debug > 4)
 		for (i = 0; i < 0x20; i++)
 			printk("%2.2x%s",
-			       (unsigned int)readb(ioaddr + EEPROMCtrl + i),
+			       (unsigned int)readb(base + EEPROMCtrl + i),
 			       i % 16 != 15 ? " " : "\n");
 #endif
 
 	/* Issue soft reset */
-	writel(MiiSoftReset, ioaddr + TxMode);
+	writel(MiiSoftReset, base + TxMode);
 	udelay(1000);
-	writel(0, ioaddr + TxMode);
+	writel(0, base + TxMode);
 
 	/* Reset the chip to erase previous misconfiguration. */
-	writel(1, ioaddr + PCIDeviceConfig);
+	writel(1, base + PCIDeviceConfig);
 	boguscnt = 1000;
 	while (--boguscnt > 0) {
 		udelay(10);
-		if ((readl(ioaddr + PCIDeviceConfig) & 1) == 0)
+		if ((readl(base + PCIDeviceConfig) & 1) == 0)
 			break;
 	}
 	if (boguscnt == 0)
@@ -946,10 +946,11 @@
 	/* wait a little longer */
 	udelay(1000);
 
-	dev->base_addr = ioaddr;
+	dev->base_addr = (unsigned long)base;
 	dev->irq = irq;
 
 	np = netdev_priv(dev);
+	np->base = base;
 	spin_lock_init(&np->lock);
 	pci_set_drvdata(pdev, dev);
 
@@ -1021,8 +1022,8 @@
 	if (register_netdev(dev))
 		goto err_out_cleardev;
 
-	printk(KERN_INFO "%s: %s at %#lx, ",
-		   dev->name, netdrv_tbl[chip_idx].name, ioaddr);
+	printk(KERN_INFO "%s: %s at %p, ",
+		   dev->name, netdrv_tbl[chip_idx].name, base);
 	for (i = 0; i < 5; i++)
 		printk("%2.2x:", dev->dev_addr[i]);
 	printk("%2.2x, IRQ %d.\n", dev->dev_addr[i], irq);
@@ -1065,7 +1066,7 @@
 
 err_out_cleardev:
 	pci_set_drvdata(pdev, NULL);
-	iounmap((void *)ioaddr);
+	iounmap(base);
 err_out_free_res:
 	pci_release_regions (pdev);
 err_out_free_netdev:
@@ -1077,7 +1078,8 @@
 /* Read the MII Management Data I/O (MDIO) interfaces. */
 static int mdio_read(struct net_device *dev, int phy_id, int location)
 {
-	long mdio_addr = dev->base_addr + MIICtrl + (phy_id<<7) + (location<<2);
+	struct netdev_private *np = netdev_priv(dev);
+	void __iomem *mdio_addr = np->base + MIICtrl + (phy_id<<7) + (location<<2);
 	int result, boguscnt=1000;
 	/* ??? Should we add a busy-wait here? */
 	do
@@ -1093,7 +1095,8 @@
 
 static void mdio_write(struct net_device *dev, int phy_id, int location, int value)
 {
-	long mdio_addr = dev->base_addr + MIICtrl + (phy_id<<7) + (location<<2);
+	struct netdev_private *np = netdev_priv(dev);
+	void __iomem *mdio_addr = np->base + MIICtrl + (phy_id<<7) + (location<<2);
 	writel(value, mdio_addr);
 	/* The busy-wait will occur before a read. */
 }
@@ -1102,7 +1105,7 @@
 static int netdev_open(struct net_device *dev)
 {
 	struct netdev_private *np = netdev_priv(dev);
-	long ioaddr = dev->base_addr;
+	void __iomem *ioaddr = np->base;
 	int i, retval;
 	size_t tx_done_q_size, rx_done_q_size, tx_ring_size, rx_ring_size;
 
@@ -1191,7 +1194,7 @@
 	writew(0, ioaddr + PerfFilterTable + 8);
 	for (i = 1; i < 16; i++) {
 		u16 *eaddrs = (u16 *)dev->dev_addr;
-		long setup_frm = ioaddr + PerfFilterTable + i * 16;
+		void __iomem *setup_frm = ioaddr + PerfFilterTable + i * 16;
 		writew(cpu_to_be16(eaddrs[2]), setup_frm); setup_frm += 4;
 		writew(cpu_to_be16(eaddrs[1]), setup_frm); setup_frm += 4;
 		writew(cpu_to_be16(eaddrs[0]), setup_frm); setup_frm += 8;
@@ -1295,7 +1298,7 @@
 static void tx_timeout(struct net_device *dev)
 {
 	struct netdev_private *np = netdev_priv(dev);
-	long ioaddr = dev->base_addr;
+	void __iomem *ioaddr = np->base;
 	int old_debug;
 
 	printk(KERN_WARNING "%s: Transmit timed out, status %#8.8x, "
@@ -1343,7 +1346,7 @@
 		/* Grrr, we cannot offset to correctly align the IP header. */
 		np->rx_ring[i].rxaddr = cpu_to_dma(np->rx_info[i].mapping | RxDescValid);
 	}
-	writew(i - 1, dev->base_addr + RxDescQIdx);
+	writew(i - 1, np->base + RxDescQIdx);
 	np->dirty_rx = (unsigned int)(i - RX_RING_SIZE);
 
 	/* Clear the remainder of the Rx buffer ring. */
@@ -1464,7 +1467,7 @@
 	wmb();
 
 	/* Update the producer index. */
-	writel(entry * (sizeof(starfire_tx_desc) / 8), dev->base_addr + TxProducerIdx);
+	writel(entry * (sizeof(starfire_tx_desc) / 8), np->base + TxProducerIdx);
 
 	/* 4 is arbitrary, but should be ok */
 	if ((np->cur_tx - np->dirty_tx) + 4 > TX_RING_SIZE)
@@ -1481,16 +1484,13 @@
 static irqreturn_t intr_handler(int irq, void *dev_instance, struct pt_regs *rgs)
 {
 	struct net_device *dev = dev_instance;
-	struct netdev_private *np;
-	long ioaddr;
+	struct netdev_private *np = netdev_priv(dev);
+	void __iomem *ioaddr = np->base;
 	int boguscnt = max_interrupt_work;
 	int consumer;
 	int tx_status;
 	int handled = 0;
 
-	ioaddr = dev->base_addr;
-	np = netdev_priv(dev);
-
 	do {
 		u32 intr_status = readl(ioaddr + IntrClear);
 
@@ -1697,7 +1697,7 @@
 		desc->status = 0;
 		np->rx_done = (np->rx_done + 1) % DONE_Q_SIZE;
 	}
-	writew(np->rx_done, dev->base_addr + CompletionQConsumerIdx);
+	writew(np->rx_done, np->base + CompletionQConsumerIdx);
 
  out:
 	refill_rx_ring(dev);
@@ -1712,7 +1712,8 @@
 static int netdev_poll(struct net_device *dev, int *budget)
 {
 	u32 intr_status;
-	long ioaddr = dev->base_addr;
+	struct netdev_private *np = netdev_priv(dev);
+	void __iomem *ioaddr = np->base;
 	int retcode = 0, quota = dev->quota;
 
 	do {
@@ -1766,14 +1767,14 @@
 			np->rx_ring[entry].rxaddr |= cpu_to_dma(RxDescEndRing);
 	}
 	if (entry >= 0)
-		writew(entry, dev->base_addr + RxDescQIdx);
+		writew(entry, np->base + RxDescQIdx);
 }
 
 
 static void netdev_media_change(struct net_device *dev)
 {
 	struct netdev_private *np = netdev_priv(dev);
-	long ioaddr = dev->base_addr;
+	void __iomem *ioaddr = np->base;
 	u16 reg0, reg1, reg4, reg5;
 	u32 new_tx_mode;
 	u32 new_intr_timer_ctrl;
@@ -1852,7 +1853,7 @@
 	/* Came close to underrunning the Tx FIFO, increase threshold. */
 	if (intr_status & IntrTxDataLow) {
 		if (np->tx_threshold <= PKT_BUF_SZ / 16) {
-			writel(++np->tx_threshold, dev->base_addr + TxThreshold);
+			writel(++np->tx_threshold, np->base + TxThreshold);
 			printk(KERN_NOTICE "%s: PCI bus congestion, increasing Tx FIFO threshold to %d bytes\n",
 			       dev->name, np->tx_threshold * 16);
 		} else
@@ -1874,8 +1875,8 @@
 
 static struct net_device_stats *get_stats(struct net_device *dev)
 {
-	long ioaddr = dev->base_addr;
 	struct netdev_private *np = netdev_priv(dev);
+	void __iomem *ioaddr = np->base;
 
 	/* This adapter architecture needs no SMP locks. */
 	np->stats.tx_bytes = readl(ioaddr + 0x57010);
@@ -1904,17 +1905,17 @@
 */
 static void set_rx_mode(struct net_device *dev)
 {
-	long ioaddr = dev->base_addr;
+	struct netdev_private *np = netdev_priv(dev);
+	void __iomem *ioaddr = np->base;
 	u32 rx_mode = MinVLANPrio;
 	struct dev_mc_list *mclist;
 	int i;
 #ifdef VLAN_SUPPORT
-	struct netdev_private *np = netdev_priv(dev);
 
 	rx_mode |= VlanMode;
 	if (np->vlgrp) {
 		int vlan_count = 0;
-		long filter_addr = ioaddr + HashTable + 8;
+		void __iomem *filter_addr = ioaddr + HashTable + 8;
 		for (i = 0; i < VLAN_VID_MASK; i++) {
 			if (np->vlgrp->vlan_devices[i]) {
 				if (vlan_count >= 32)
@@ -1943,7 +1944,7 @@
 		rx_mode |= AcceptBroadcast|AcceptAllMulticast|PerfectFilter;
 	} else if (dev->mc_count <= 14) {
 		/* Use the 16 element perfect filter, skip first two entries. */
-		long filter_addr = ioaddr + PerfFilterTable + 2 * 16;
+		void __iomem *filter_addr = ioaddr + PerfFilterTable + 2 * 16;
 		u16 *eaddrs;
 		for (i = 2, mclist = dev->mc_list; mclist && i < dev->mc_count + 2;
 		     i++, mclist = mclist->next) {
@@ -1961,7 +1962,7 @@
 		rx_mode |= AcceptBroadcast|PerfectFilter;
 	} else {
 		/* Must use a multicast hash table. */
-		long filter_addr;
+		void __iomem *filter_addr;
 		u16 *eaddrs;
 		u16 mc_filter[32] __attribute__ ((aligned(sizeof(long))));	/* Multicast hash filter */
 
@@ -2077,8 +2078,8 @@
 
 static int netdev_close(struct net_device *dev)
 {
-	long ioaddr = dev->base_addr;
 	struct netdev_private *np = netdev_priv(dev);
+	void __iomem *ioaddr = np->base;
 	int i;
 
 	netif_stop_queue(dev);
@@ -2159,10 +2160,10 @@
 
 
 	/* XXX: add wakeup code -- requires firmware for MagicPacket */
-	pci_set_power_state(pdev, 3);	/* go to sleep in D3 mode */
+	pci_set_power_state(pdev, PCI_D3hot);	/* go to sleep in D3 mode */
 	pci_disable_device(pdev);
 
-	iounmap((char *)dev->base_addr);
+	iounmap(np->base);
 	pci_release_regions(pdev);
 
 	pci_set_drvdata(pdev, NULL);
diff -Nru a/drivers/net/sundance.c b/drivers/net/sundance.c
--- a/drivers/net/sundance.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/net/sundance.c	2005-01-10 20:11:20 -08:00
@@ -188,10 +188,10 @@
 MODULE_DESCRIPTION("Sundance Alta Ethernet driver");
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(debug, "i");
-MODULE_PARM(rx_copybreak, "i");
-MODULE_PARM(media, "1-" __MODULE_STRING(MAX_UNITS) "s");
-MODULE_PARM(flowctrl, "i");
+module_param(debug, int, 0);
+module_param(rx_copybreak, int, 0);
+module_param_array(media, charp, NULL, 0);
+module_param(flowctrl, int, 0);
 MODULE_PARM_DESC(debug, "Sundance Alta debug level (0-5)");
 MODULE_PARM_DESC(rx_copybreak, "Sundance Alta copy breakpoint for copy-only-tiny-frames");
 MODULE_PARM_DESC(flowctrl, "Sundance Alta flow control [0|1]");
@@ -305,20 +305,6 @@
 
 /* This driver was written to use PCI memory space, however x86-oriented
    hardware often uses I/O space accesses. */
-#ifdef USE_IO_OPS
-#undef readb
-#undef readw
-#undef readl
-#undef writeb
-#undef writew
-#undef writel
-#define readb inb
-#define readw inw
-#define readl inl
-#define writeb outb
-#define writew outw
-#define writel outl
-#endif
 
 /* Offsets to the device registers.
    Unlike software-only systems, device drivers interact with complex hardware.
@@ -480,6 +466,7 @@
 	int mii_preamble_required;
 	unsigned char phys[MII_CNT];		/* MII device addresses, only first one used. */
 	struct pci_dev *pci_dev;
+	void __iomem *base;
 	unsigned char pci_rev_id;
 };
 
@@ -490,7 +477,7 @@
 			LinkChange)
 
 static int  change_mtu(struct net_device *dev, int new_mtu);
-static int  eeprom_read(long ioaddr, int location);
+static int  eeprom_read(void __iomem *ioaddr, int location);
 static int  mdio_read(struct net_device *dev, int phy_id, int location);
 static void mdio_write(struct net_device *dev, int phy_id, int location, int value);
 static int  netdev_open(struct net_device *dev);
@@ -522,10 +509,15 @@
 	int chip_idx = ent->driver_data;
 	int irq;
 	int i;
-	long ioaddr;
+	void __iomem *ioaddr;
 	u16 mii_ctl;
 	void *ring_space;
 	dma_addr_t ring_dma;
+#ifdef USE_IO_OPS
+	int bar = 0;
+#else
+	int bar = 1;
+#endif
 
 
 /* when built into the kernel, we only print version if device is found */
@@ -550,23 +542,19 @@
 	if (pci_request_regions(pdev, DRV_NAME))
 		goto err_out_netdev;
 
-#ifdef USE_IO_OPS
-	ioaddr = pci_resource_start(pdev, 0);
-#else
-	ioaddr = pci_resource_start(pdev, 1);
-	ioaddr = (long) ioremap (ioaddr, netdev_io_size);
+	ioaddr = pci_iomap(pdev, bar, netdev_io_size);
 	if (!ioaddr)
 		goto err_out_res;
-#endif
 
 	for (i = 0; i < 3; i++)
 		((u16 *)dev->dev_addr)[i] =
 			le16_to_cpu(eeprom_read(ioaddr, i + EEPROM_SA_OFFSET));
 
-	dev->base_addr = ioaddr;
+	dev->base_addr = (unsigned long)ioaddr;
 	dev->irq = irq;
 
 	np = netdev_priv(dev);
+	np->base = ioaddr;
 	np->pci_dev = pdev;
 	np->chip_id = chip_idx;
 	np->msg_enable = (1 << debug) - 1;
@@ -611,7 +599,7 @@
 	if (i)
 		goto err_out_unmap_rx;
 
-	printk(KERN_INFO "%s: %s at 0x%lx, ",
+	printk(KERN_INFO "%s: %s at %p, ",
 		   dev->name, pci_id_tbl[chip_idx].name, ioaddr);
 	for (i = 0; i < 5; i++)
 			printk("%2.2x:", dev->dev_addr[i]);
@@ -637,7 +625,7 @@
 
 		if (phy_idx == 0) {
 			printk(KERN_INFO "%s: No MII transceiver found, aborting.  ASIC status %x\n",
-				   dev->name, readl(ioaddr + ASICCtrl));
+				   dev->name, ioread32(ioaddr + ASICCtrl));
 			goto err_out_unregister;
 		}
 
@@ -674,7 +662,7 @@
 	}
 
 	/* Fibre PHY? */
-	if (readl (ioaddr + ASICCtrl) & 0x80) {
+	if (ioread32 (ioaddr + ASICCtrl) & 0x80) {
 		/* Default 100Mbps Full */
 		if (np->an_enable) {
 			np->speed = 100;
@@ -703,10 +691,10 @@
 	/* Perhaps move the reset here? */
 	/* Reset the chip to erase previous misconfiguration. */
 	if (netif_msg_hw(np))
-		printk("ASIC Control is %x.\n", readl(ioaddr + ASICCtrl));
-	writew(0x007f, ioaddr + ASICCtrl + 2);
+		printk("ASIC Control is %x.\n", ioread32(ioaddr + ASICCtrl));
+	iowrite16(0x007f, ioaddr + ASICCtrl + 2);
 	if (netif_msg_hw(np))
-		printk("ASIC Control is now %x.\n", readl(ioaddr + ASICCtrl));
+		printk("ASIC Control is now %x.\n", ioread32(ioaddr + ASICCtrl));
 
 	card_idx++;
 	return 0;
@@ -719,10 +707,8 @@
         pci_free_consistent(pdev, TX_TOTAL_SIZE, np->tx_ring, np->tx_ring_dma);
 err_out_cleardev:
 	pci_set_drvdata(pdev, NULL);
-#ifndef USE_IO_OPS
-	iounmap((void *)ioaddr);
+	pci_iounmap(pdev, ioaddr);
 err_out_res:
-#endif
 	pci_release_regions(pdev);
 err_out_netdev:
 	free_netdev (dev);
@@ -739,16 +725,16 @@
 	return 0;
 }
 
-#define eeprom_delay(ee_addr)	readl(ee_addr)
+#define eeprom_delay(ee_addr)	ioread32(ee_addr)
 /* Read the EEPROM and MII Management Data I/O (MDIO) interfaces. */
-static int __devinit eeprom_read(long ioaddr, int location)
+static int __devinit eeprom_read(void __iomem *ioaddr, int location)
 {
 	int boguscnt = 10000;		/* Typical 1900 ticks. */
-	writew(0x0200 | (location & 0xff), ioaddr + EECtrl);
+	iowrite16(0x0200 | (location & 0xff), ioaddr + EECtrl);
 	do {
 		eeprom_delay(ioaddr + EECtrl);
-		if (! (readw(ioaddr + EECtrl) & 0x8000)) {
-			return readw(ioaddr + EEData);
+		if (! (ioread16(ioaddr + EECtrl) & 0x8000)) {
+			return ioread16(ioaddr + EEData);
 		}
 	} while (--boguscnt > 0);
 	return 0;
@@ -761,7 +747,7 @@
 
 	The maximum data clock rate is 2.5 Mhz.  The minimum timing is usually
 	met by back-to-back 33Mhz PCI cycles. */
-#define mdio_delay() readb(mdio_addr)
+#define mdio_delay() ioread8(mdio_addr)
 
 enum mii_reg_bits {
 	MDIO_ShiftClk=0x0001, MDIO_Data=0x0002, MDIO_EnbOutput=0x0004,
@@ -772,15 +758,15 @@
 
 /* Generate the preamble required for initial synchronization and
    a few older transceivers. */
-static void mdio_sync(long mdio_addr)
+static void mdio_sync(void __iomem *mdio_addr)
 {
 	int bits = 32;
 
 	/* Establish sync by sending at least 32 logic ones. */
 	while (--bits >= 0) {
-		writeb(MDIO_WRITE1, mdio_addr);
+		iowrite8(MDIO_WRITE1, mdio_addr);
 		mdio_delay();
-		writeb(MDIO_WRITE1 | MDIO_ShiftClk, mdio_addr);
+		iowrite8(MDIO_WRITE1 | MDIO_ShiftClk, mdio_addr);
 		mdio_delay();
 	}
 }
@@ -788,7 +774,7 @@
 static int mdio_read(struct net_device *dev, int phy_id, int location)
 {
 	struct netdev_private *np = netdev_priv(dev);
-	long mdio_addr = dev->base_addr + MIICtrl;
+	void __iomem *mdio_addr = np->base + MIICtrl;
 	int mii_cmd = (0xf6 << 10) | (phy_id << 5) | location;
 	int i, retval = 0;
 
@@ -799,17 +785,17 @@
 	for (i = 15; i >= 0; i--) {
 		int dataval = (mii_cmd & (1 << i)) ? MDIO_WRITE1 : MDIO_WRITE0;
 
-		writeb(dataval, mdio_addr);
+		iowrite8(dataval, mdio_addr);
 		mdio_delay();
-		writeb(dataval | MDIO_ShiftClk, mdio_addr);
+		iowrite8(dataval | MDIO_ShiftClk, mdio_addr);
 		mdio_delay();
 	}
 	/* Read the two transition, 16 data, and wire-idle bits. */
 	for (i = 19; i > 0; i--) {
-		writeb(MDIO_EnbIn, mdio_addr);
+		iowrite8(MDIO_EnbIn, mdio_addr);
 		mdio_delay();
-		retval = (retval << 1) | ((readb(mdio_addr) & MDIO_Data) ? 1 : 0);
-		writeb(MDIO_EnbIn | MDIO_ShiftClk, mdio_addr);
+		retval = (retval << 1) | ((ioread8(mdio_addr) & MDIO_Data) ? 1 : 0);
+		iowrite8(MDIO_EnbIn | MDIO_ShiftClk, mdio_addr);
 		mdio_delay();
 	}
 	return (retval>>1) & 0xffff;
@@ -818,7 +804,7 @@
 static void mdio_write(struct net_device *dev, int phy_id, int location, int value)
 {
 	struct netdev_private *np = netdev_priv(dev);
-	long mdio_addr = dev->base_addr + MIICtrl;
+	void __iomem *mdio_addr = np->base + MIICtrl;
 	int mii_cmd = (0x5002 << 16) | (phy_id << 23) | (location<<18) | value;
 	int i;
 
@@ -829,16 +815,16 @@
 	for (i = 31; i >= 0; i--) {
 		int dataval = (mii_cmd & (1 << i)) ? MDIO_WRITE1 : MDIO_WRITE0;
 
-		writeb(dataval, mdio_addr);
+		iowrite8(dataval, mdio_addr);
 		mdio_delay();
-		writeb(dataval | MDIO_ShiftClk, mdio_addr);
+		iowrite8(dataval | MDIO_ShiftClk, mdio_addr);
 		mdio_delay();
 	}
 	/* Clear out extra bits. */
 	for (i = 2; i > 0; i--) {
-		writeb(MDIO_EnbIn, mdio_addr);
+		iowrite8(MDIO_EnbIn, mdio_addr);
 		mdio_delay();
-		writeb(MDIO_EnbIn | MDIO_ShiftClk, mdio_addr);
+		iowrite8(MDIO_EnbIn | MDIO_ShiftClk, mdio_addr);
 		mdio_delay();
 	}
 	return;
@@ -847,7 +833,7 @@
 static int netdev_open(struct net_device *dev)
 {
 	struct netdev_private *np = netdev_priv(dev);
-	long ioaddr = dev->base_addr;
+	void __iomem *ioaddr = np->base;
 	int i;
 
 	/* Do we need to reset the chip??? */
@@ -861,18 +847,18 @@
 			   dev->name, dev->irq);
 	init_ring(dev);
 
-	writel(np->rx_ring_dma, ioaddr + RxListPtr);
+	iowrite32(np->rx_ring_dma, ioaddr + RxListPtr);
 	/* The Tx list pointer is written as packets are queued. */
 
 	/* Initialize other registers. */
 	__set_mac_addr(dev);
 #if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
-	writew(dev->mtu + 18, ioaddr + MaxFrameSize);
+	iowrite16(dev->mtu + 18, ioaddr + MaxFrameSize);
 #else
-	writew(dev->mtu + 14, ioaddr + MaxFrameSize);
+	iowrite16(dev->mtu + 14, ioaddr + MaxFrameSize);
 #endif
 	if (dev->mtu > 2047)
-		writel(readl(ioaddr + ASICCtrl) | 0x0C, ioaddr + ASICCtrl);
+		iowrite32(ioread32(ioaddr + ASICCtrl) | 0x0C, ioaddr + ASICCtrl);
 
 	/* Configure the PCI bus bursts and FIFO thresholds. */
 
@@ -882,24 +868,24 @@
 	spin_lock_init(&np->mcastlock);
 
 	set_rx_mode(dev);
-	writew(0, ioaddr + IntrEnable);
-	writew(0, ioaddr + DownCounter);
+	iowrite16(0, ioaddr + IntrEnable);
+	iowrite16(0, ioaddr + DownCounter);
 	/* Set the chip to poll every N*320nsec. */
-	writeb(100, ioaddr + RxDMAPollPeriod);
-	writeb(127, ioaddr + TxDMAPollPeriod);
+	iowrite8(100, ioaddr + RxDMAPollPeriod);
+	iowrite8(127, ioaddr + TxDMAPollPeriod);
 	/* Fix DFE-580TX packet drop issue */
 	if (np->pci_rev_id >= 0x14)
-		writeb(0x01, ioaddr + DebugCtrl1);
+		iowrite8(0x01, ioaddr + DebugCtrl1);
 	netif_start_queue(dev);
 
-	writew (StatsEnable | RxEnable | TxEnable, ioaddr + MACCtrl1);
+	iowrite16 (StatsEnable | RxEnable | TxEnable, ioaddr + MACCtrl1);
 
 	if (netif_msg_ifup(np))
 		printk(KERN_DEBUG "%s: Done netdev_open(), status: Rx %x Tx %x "
 			   "MAC Control %x, %4.4x %4.4x.\n",
-			   dev->name, readl(ioaddr + RxStatus), readb(ioaddr + TxStatus),
-			   readl(ioaddr + MACCtrl0),
-			   readw(ioaddr + MACCtrl1), readw(ioaddr + MACCtrl0));
+			   dev->name, ioread32(ioaddr + RxStatus), ioread8(ioaddr + TxStatus),
+			   ioread32(ioaddr + MACCtrl0),
+			   ioread16(ioaddr + MACCtrl1), ioread16(ioaddr + MACCtrl0));
 
 	/* Set the timer to check for link beat. */
 	init_timer(&np->timer);
@@ -909,7 +895,7 @@
 	add_timer(&np->timer);
 
 	/* Enable interrupts by setting the interrupt mask. */
-	writew(DEFAULT_INTR, ioaddr + IntrEnable);
+	iowrite16(DEFAULT_INTR, ioaddr + IntrEnable);
 
 	return 0;
 }
@@ -917,7 +903,7 @@
 static void check_duplex(struct net_device *dev)
 {
 	struct netdev_private *np = netdev_priv(dev);
-	long ioaddr = dev->base_addr;
+	void __iomem *ioaddr = np->base;
 	int mii_lpa = mdio_read(dev, np->phys[0], MII_LPA);
 	int negotiated = mii_lpa & np->mii_if.advertising;
 	int duplex;
@@ -925,7 +911,7 @@
 	/* Force media */
 	if (!np->an_enable || mii_lpa == 0xffff) {
 		if (np->mii_if.full_duplex)
-			writew (readw (ioaddr + MACCtrl0) | EnbFullDuplex,
+			iowrite16 (ioread16 (ioaddr + MACCtrl0) | EnbFullDuplex,
 				ioaddr + MACCtrl0);
 		return;
 	}
@@ -938,7 +924,7 @@
 			printk(KERN_INFO "%s: Setting %s-duplex based on MII #%d "
 				   "negotiated capability %4.4x.\n", dev->name,
 				   duplex ? "full" : "half", np->phys[0], negotiated);
-		writew(readw(ioaddr + MACCtrl0) | duplex ? 0x20 : 0, ioaddr + MACCtrl0);
+		iowrite16(ioread16(ioaddr + MACCtrl0) | duplex ? 0x20 : 0, ioaddr + MACCtrl0);
 	}
 }
 
@@ -946,14 +932,14 @@
 {
 	struct net_device *dev = (struct net_device *)data;
 	struct netdev_private *np = netdev_priv(dev);
-	long ioaddr = dev->base_addr;
+	void __iomem *ioaddr = np->base;
 	int next_tick = 10*HZ;
 
 	if (netif_msg_timer(np)) {
 		printk(KERN_DEBUG "%s: Media selection timer tick, intr status %4.4x, "
 			   "Tx %x Rx %x.\n",
-			   dev->name, readw(ioaddr + IntrEnable),
-			   readb(ioaddr + TxStatus), readl(ioaddr + RxStatus));
+			   dev->name, ioread16(ioaddr + IntrEnable),
+			   ioread8(ioaddr + TxStatus), ioread32(ioaddr + RxStatus));
 	}
 	check_duplex(dev);
 	np->timer.expires = jiffies + next_tick;
@@ -963,16 +949,16 @@
 static void tx_timeout(struct net_device *dev)
 {
 	struct netdev_private *np = netdev_priv(dev);
-	long ioaddr = dev->base_addr;
+	void __iomem *ioaddr = np->base;
 	unsigned long flag;
 	
 	netif_stop_queue(dev);
 	tasklet_disable(&np->tx_tasklet);
-	writew(0, ioaddr + IntrEnable);
+	iowrite16(0, ioaddr + IntrEnable);
 	printk(KERN_WARNING "%s: Transmit timed out, TxStatus %2.2x "
 		   "TxFrameId %2.2x,"
-		   " resetting...\n", dev->name, readb(ioaddr + TxStatus),
-		   readb(ioaddr + TxFrameId));
+		   " resetting...\n", dev->name, ioread8(ioaddr + TxStatus),
+		   ioread8(ioaddr + TxFrameId));
 
 	{
 		int i;
@@ -986,7 +972,7 @@
 				le32_to_cpu(np->tx_ring[i].frag[0].length));
 		}
 		printk(KERN_DEBUG "TxListPtr=%08x netif_queue_stopped=%d\n", 
-			readl(dev->base_addr + TxListPtr), 
+			ioread32(np->base + TxListPtr), 
 			netif_queue_stopped(dev));
 		printk(KERN_DEBUG "cur_tx=%d(%02x) dirty_tx=%d(%02x)\n", 
 			np->cur_tx, np->cur_tx % TX_RING_SIZE,
@@ -1007,7 +993,7 @@
 	if (np->cur_tx - np->dirty_tx < TX_QUEUE_LEN - 4) {
 		netif_wake_queue(dev);
 	}
-	writew(DEFAULT_INTR, ioaddr + IntrEnable);
+	iowrite16(DEFAULT_INTR, ioaddr + IntrEnable);
 	tasklet_enable(&np->tx_tasklet);
 }
 
@@ -1076,9 +1062,9 @@
 	/* Indicate the latest descriptor of tx ring */
 	txdesc->status |= cpu_to_le32(DescIntrOnTx);
 
-	if (readl (dev->base_addr + TxListPtr) == 0)
-		writel (np->tx_ring_dma + head * sizeof(struct netdev_desc),
-			dev->base_addr + TxListPtr);
+	if (ioread32 (np->base + TxListPtr) == 0)
+		iowrite32 (np->tx_ring_dma + head * sizeof(struct netdev_desc),
+			np->base + TxListPtr);
 	return;
 }
 
@@ -1128,17 +1114,17 @@
 reset_tx (struct net_device *dev)
 {
 	struct netdev_private *np = netdev_priv(dev);
-	long ioaddr = dev->base_addr;
+	void __iomem *ioaddr = np->base;
 	struct sk_buff *skb;
 	int i;
 	int irq = in_interrupt();
 	
 	/* Reset tx logic, TxListPtr will be cleaned */
-	writew (TxDisable, ioaddr + MACCtrl1);
-	writew (TxReset | DMAReset | FIFOReset | NetworkReset,
+	iowrite16 (TxDisable, ioaddr + MACCtrl1);
+	iowrite16 (TxReset | DMAReset | FIFOReset | NetworkReset,
 			ioaddr + ASICCtrl + 2);
 	for (i=50; i > 0; i--) {
-		if ((readw(ioaddr + ASICCtrl + 2) & ResetBusy) == 0)
+		if ((ioread16(ioaddr + ASICCtrl + 2) & ResetBusy) == 0)
 			break;
 		mdelay(1);
 	}
@@ -1159,7 +1145,7 @@
 	}
 	np->cur_tx = np->dirty_tx = 0;
 	np->cur_task = 0;
-	writew (StatsEnable | RxEnable | TxEnable, ioaddr + MACCtrl1);
+	iowrite16 (StatsEnable | RxEnable | TxEnable, ioaddr + MACCtrl1);
 	return 0;
 }
 
@@ -1168,19 +1154,17 @@
 static irqreturn_t intr_handler(int irq, void *dev_instance, struct pt_regs *rgs)
 {
 	struct net_device *dev = (struct net_device *)dev_instance;
-	struct netdev_private *np;
-	long ioaddr;
+	struct netdev_private *np = netdev_priv(dev);
+	void __iomem *ioaddr = np->base;
 	int hw_frame_id;
 	int tx_cnt;
 	int tx_status;
 	int handled = 0;
 
-	ioaddr = dev->base_addr;
-	np = netdev_priv(dev);
 
 	do {
-		int intr_status = readw(ioaddr + IntrStatus);
-		writew(intr_status, ioaddr + IntrStatus);
+		int intr_status = ioread16(ioaddr + IntrStatus);
+		iowrite16(intr_status, ioaddr + IntrStatus);
 
 		if (netif_msg_intr(np))
 			printk(KERN_DEBUG "%s: Interrupt, status %4.4x.\n",
@@ -1192,14 +1176,14 @@
 		handled = 1;
 
 		if (intr_status & (IntrRxDMADone)) {
-			writew(DEFAULT_INTR & ~(IntrRxDone|IntrRxDMADone),
+			iowrite16(DEFAULT_INTR & ~(IntrRxDone|IntrRxDMADone),
 					ioaddr + IntrEnable);
 			if (np->budget < 0)
 				np->budget = RX_BUDGET;
 			tasklet_schedule(&np->rx_tasklet);
 		}
 		if (intr_status & (IntrTxDone | IntrDrvRqst)) {
-			tx_status = readw (ioaddr + TxStatus);
+			tx_status = ioread16 (ioaddr + TxStatus);
 			for (tx_cnt=32; tx_status & 0x80; --tx_cnt) {
 				if (netif_msg_tx_done(np))
 					printk
@@ -1221,18 +1205,18 @@
 						spin_unlock(&np->lock);
 					}
 					if (tx_status & 0x1e)	/* Restart the Tx. */
-						writew (TxEnable,
+						iowrite16 (TxEnable,
 							ioaddr + MACCtrl1);
 				}
 				/* Yup, this is a documentation bug.  It cost me *hours*. */
-				writew (0, ioaddr + TxStatus);
-				tx_status = readw (ioaddr + TxStatus);
+				iowrite16 (0, ioaddr + TxStatus);
+				tx_status = ioread16 (ioaddr + TxStatus);
 				if (tx_cnt < 0)
 					break;
 			}
 			hw_frame_id = (tx_status >> 8) & 0xff;
 		} else 	{
-			hw_frame_id = readb(ioaddr + TxFrameId);
+			hw_frame_id = ioread8(ioaddr + TxFrameId);
 		}
 			
 		if (np->pci_rev_id >= 0x14) {	
@@ -1293,8 +1277,8 @@
 	} while (0);
 	if (netif_msg_intr(np))
 		printk(KERN_DEBUG "%s: exiting interrupt, status=%#4.4x.\n",
-			   dev->name, readw(ioaddr + IntrStatus));
-	writel(5000, ioaddr + DownCounter);
+			   dev->name, ioread16(ioaddr + IntrStatus));
+	iowrite32(5000, ioaddr + DownCounter);
 	return IRQ_RETVAL(handled);
 }
 
@@ -1304,7 +1288,7 @@
 	struct netdev_private *np = netdev_priv(dev);
 	int entry = np->cur_rx % RX_RING_SIZE;
 	int boguscnt = np->budget;
-	long ioaddr = dev->base_addr;
+	void __iomem *ioaddr = np->base;
 	int received = 0;
 
 	/* If EOP is set on the next entry, it's a new packet. Send it up. */
@@ -1381,7 +1365,7 @@
 	np->cur_rx = entry;
 	refill_rx (dev);
 	np->budget -= received;
-	writew(DEFAULT_INTR, ioaddr + IntrEnable);
+	iowrite16(DEFAULT_INTR, ioaddr + IntrEnable);
 	return;
 
 not_done:
@@ -1428,8 +1412,8 @@
 }
 static void netdev_error(struct net_device *dev, int intr_status)
 {
-	long ioaddr = dev->base_addr;
 	struct netdev_private *np = netdev_priv(dev);
+	void __iomem *ioaddr = np->base;
 	u16 mii_ctl, mii_advertise, mii_lpa;
 	int speed;
 
@@ -1465,9 +1449,9 @@
 		}
 		check_duplex (dev);
 		if (np->flowctrl && np->mii_if.full_duplex) {
-			writew(readw(ioaddr + MulticastFilter1+2) | 0x0200,
+			iowrite16(ioread16(ioaddr + MulticastFilter1+2) | 0x0200,
 				ioaddr + MulticastFilter1+2);
-			writew(readw(ioaddr + MACCtrl0) | EnbFlowCtrl,
+			iowrite16(ioread16(ioaddr + MACCtrl0) | EnbFlowCtrl,
 				ioaddr + MACCtrl0);
 		}
 	}
@@ -1484,35 +1468,35 @@
 static struct net_device_stats *get_stats(struct net_device *dev)
 {
 	struct netdev_private *np = netdev_priv(dev);
-	long ioaddr = dev->base_addr;
+	void __iomem *ioaddr = np->base;
 	int i;
 
 	/* We should lock this segment of code for SMP eventually, although
 	   the vulnerability window is very small and statistics are
 	   non-critical. */
 	/* The chip only need report frame silently dropped. */
-	np->stats.rx_missed_errors	+= readb(ioaddr + RxMissed);
-	np->stats.tx_packets += readw(ioaddr + TxFramesOK);
-	np->stats.rx_packets += readw(ioaddr + RxFramesOK);
-	np->stats.collisions += readb(ioaddr + StatsLateColl);
-	np->stats.collisions += readb(ioaddr + StatsMultiColl);
-	np->stats.collisions += readb(ioaddr + StatsOneColl);
-	np->stats.tx_carrier_errors += readb(ioaddr + StatsCarrierError);
-	readb(ioaddr + StatsTxDefer);
+	np->stats.rx_missed_errors	+= ioread8(ioaddr + RxMissed);
+	np->stats.tx_packets += ioread16(ioaddr + TxFramesOK);
+	np->stats.rx_packets += ioread16(ioaddr + RxFramesOK);
+	np->stats.collisions += ioread8(ioaddr + StatsLateColl);
+	np->stats.collisions += ioread8(ioaddr + StatsMultiColl);
+	np->stats.collisions += ioread8(ioaddr + StatsOneColl);
+	np->stats.tx_carrier_errors += ioread8(ioaddr + StatsCarrierError);
+	ioread8(ioaddr + StatsTxDefer);
 	for (i = StatsTxDefer; i <= StatsMcastRx; i++)
-		readb(ioaddr + i);
-	np->stats.tx_bytes += readw(ioaddr + TxOctetsLow);
-	np->stats.tx_bytes += readw(ioaddr + TxOctetsHigh) << 16;
-	np->stats.rx_bytes += readw(ioaddr + RxOctetsLow);
-	np->stats.rx_bytes += readw(ioaddr + RxOctetsHigh) << 16;
+		ioread8(ioaddr + i);
+	np->stats.tx_bytes += ioread16(ioaddr + TxOctetsLow);
+	np->stats.tx_bytes += ioread16(ioaddr + TxOctetsHigh) << 16;
+	np->stats.rx_bytes += ioread16(ioaddr + RxOctetsLow);
+	np->stats.rx_bytes += ioread16(ioaddr + RxOctetsHigh) << 16;
 
 	return &np->stats;
 }
 
 static void set_rx_mode(struct net_device *dev)
 {
-	long ioaddr = dev->base_addr;
 	struct netdev_private *np = netdev_priv(dev);
+	void __iomem *ioaddr = np->base;
 	u16 mc_filter[4];			/* Multicast hash filter */
 	u32 rx_mode;
 	int i;
@@ -1542,27 +1526,28 @@
 		}
 		rx_mode = AcceptBroadcast | AcceptMultiHash | AcceptMyPhys;
 	} else {
-		writeb(AcceptBroadcast | AcceptMyPhys, ioaddr + RxMode);
+		iowrite8(AcceptBroadcast | AcceptMyPhys, ioaddr + RxMode);
 		return;
 	}
 	if (np->mii_if.full_duplex && np->flowctrl)
 		mc_filter[3] |= 0x0200;
 
 	for (i = 0; i < 4; i++)
-		writew(mc_filter[i], ioaddr + MulticastFilter0 + i*2);
-	writeb(rx_mode, ioaddr + RxMode);
+		iowrite16(mc_filter[i], ioaddr + MulticastFilter0 + i*2);
+	iowrite8(rx_mode, ioaddr + RxMode);
 }
 
 static int __set_mac_addr(struct net_device *dev)
 {
+	struct netdev_private *np = netdev_priv(dev);
 	u16 addr16;
 
 	addr16 = (dev->dev_addr[0] | (dev->dev_addr[1] << 8));
-	writew(addr16, dev->base_addr + StationAddr);
+	iowrite16(addr16, np->base + StationAddr);
 	addr16 = (dev->dev_addr[2] | (dev->dev_addr[3] << 8));
-	writew(addr16, dev->base_addr + StationAddr+2);
+	iowrite16(addr16, np->base + StationAddr+2);
 	addr16 = (dev->dev_addr[4] | (dev->dev_addr[5] << 8));
-	writew(addr16, dev->base_addr + StationAddr+4);
+	iowrite16(addr16, np->base + StationAddr+4);
 	return 0;
 }
 
@@ -1638,9 +1623,9 @@
 static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 {
 	struct netdev_private *np = netdev_priv(dev);
+	void __iomem *ioaddr = np->base;
 	int rc;
 	int i;
-	long ioaddr = dev->base_addr;
 
 	if (!netif_running(dev))
 		return -EINVAL;
@@ -1661,14 +1646,14 @@
 				le32_to_cpu(np->tx_ring[i].frag[0].length));
 		}
 		printk(KERN_DEBUG "TxListPtr=%08x netif_queue_stopped=%d\n", 
-			readl(dev->base_addr + TxListPtr), 
+			ioread32(np->base + TxListPtr), 
 			netif_queue_stopped(dev));
 		printk(KERN_DEBUG "cur_tx=%d(%02x) dirty_tx=%d(%02x)\n", 
 			np->cur_tx, np->cur_tx % TX_RING_SIZE,
 			np->dirty_tx, np->dirty_tx % TX_RING_SIZE);
 		printk(KERN_DEBUG "cur_rx=%d dirty_rx=%d\n", np->cur_rx, np->dirty_rx);
 		printk(KERN_DEBUG "cur_task=%d\n", np->cur_task);
-		printk(KERN_DEBUG "TxStatus=%04x\n", readw(ioaddr + TxStatus));
+		printk(KERN_DEBUG "TxStatus=%04x\n", ioread16(ioaddr + TxStatus));
 			return 0;
 	}
 				
@@ -1678,8 +1663,8 @@
 
 static int netdev_close(struct net_device *dev)
 {
-	long ioaddr = dev->base_addr;
 	struct netdev_private *np = netdev_priv(dev);
+	void __iomem *ioaddr = np->base;
 	struct sk_buff *skb;
 	int i;
 
@@ -1688,17 +1673,17 @@
 	if (netif_msg_ifdown(np)) {
 		printk(KERN_DEBUG "%s: Shutting down ethercard, status was Tx %2.2x "
 			   "Rx %4.4x Int %2.2x.\n",
-			   dev->name, readb(ioaddr + TxStatus),
-			   readl(ioaddr + RxStatus), readw(ioaddr + IntrStatus));
+			   dev->name, ioread8(ioaddr + TxStatus),
+			   ioread32(ioaddr + RxStatus), ioread16(ioaddr + IntrStatus));
 		printk(KERN_DEBUG "%s: Queue pointers were Tx %d / %d,  Rx %d / %d.\n",
 			   dev->name, np->cur_tx, np->dirty_tx, np->cur_rx, np->dirty_rx);
 	}
 
 	/* Disable interrupts by clearing the interrupt mask. */
-	writew(0x0000, ioaddr + IntrEnable);
+	iowrite16(0x0000, ioaddr + IntrEnable);
 
 	/* Stop the chip's Tx and Rx processes. */
-	writew(TxDisable | RxDisable | StatsDisable, ioaddr + MACCtrl1);
+	iowrite16(TxDisable | RxDisable | StatsDisable, ioaddr + MACCtrl1);
 
 	/* Wait and kill tasklet */
 	tasklet_kill(&np->rx_tasklet);
@@ -1765,10 +1750,8 @@
 			np->rx_ring_dma);
 	        pci_free_consistent(pdev, TX_TOTAL_SIZE, np->tx_ring,
 			np->tx_ring_dma);
+		pci_iounmap(pdev, np->base);
 		pci_release_regions(pdev);
-#ifndef USE_IO_OPS
-		iounmap((char *)(dev->base_addr));
-#endif
 		free_netdev(dev);
 		pci_set_drvdata(pdev, NULL);
 	}
diff -Nru a/drivers/net/sunhme.c b/drivers/net/sunhme.c
--- a/drivers/net/sunhme.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/net/sunhme.c	2005-01-10 20:11:18 -08:00
@@ -73,7 +73,7 @@
 static int macaddr[6];
 
 /* accept MAC address of the form macaddr=0x08,0x00,0x20,0x30,0x40,0x50 */
-MODULE_PARM(macaddr, "6i");
+module_param_array(macaddr, int, NULL, 0);
 MODULE_PARM_DESC(macaddr, "Happy Meal MAC address to set");
 MODULE_LICENSE("GPL");
 
diff -Nru a/drivers/net/tg3.c b/drivers/net/tg3.c
--- a/drivers/net/tg3.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/net/tg3.c	2005-01-10 20:11:19 -08:00
@@ -60,8 +60,8 @@
 
 #define DRV_MODULE_NAME		"tg3"
 #define PFX DRV_MODULE_NAME	": "
-#define DRV_MODULE_VERSION	"3.14"
-#define DRV_MODULE_RELDATE	"November 15, 2004"
+#define DRV_MODULE_VERSION	"3.15"
+#define DRV_MODULE_RELDATE	"January 6, 2005"
 
 #define TG3_DEF_MAC_MODE	0
 #define TG3_DEF_RX_MODE		0
@@ -493,7 +493,8 @@
 static int tg3_readphy(struct tg3 *tp, int reg, u32 *val)
 {
 	u32 frame_val;
-	int loops, ret;
+	unsigned int loops;
+	int ret;
 
 	if ((tp->mi_mode & MAC_MI_MODE_AUTO_POLL) != 0) {
 		tw32_f(MAC_MI_MODE,
@@ -501,7 +502,7 @@
 		udelay(80);
 	}
 
-	*val = 0xffffffff;
+	*val = 0x0;
 
 	frame_val  = ((PHY_ADDR << MI_COM_PHY_ADDR_SHIFT) &
 		      MI_COM_PHY_ADDR_MASK);
@@ -512,7 +513,7 @@
 	tw32_f(MAC_MI_COM, frame_val);
 
 	loops = PHY_BUSY_LOOPS;
-	while (loops-- > 0) {
+	while (loops != 0) {
 		udelay(10);
 		frame_val = tr32(MAC_MI_COM);
 
@@ -521,10 +522,11 @@
 			frame_val = tr32(MAC_MI_COM);
 			break;
 		}
+		loops -= 1;
 	}
 
 	ret = -EBUSY;
-	if (loops > 0) {
+	if (loops != 0) {
 		*val = frame_val & MI_COM_DATA_MASK;
 		ret = 0;
 	}
@@ -540,7 +542,8 @@
 static int tg3_writephy(struct tg3 *tp, int reg, u32 val)
 {
 	u32 frame_val;
-	int loops, ret;
+	unsigned int loops;
+	int ret;
 
 	if ((tp->mi_mode & MAC_MI_MODE_AUTO_POLL) != 0) {
 		tw32_f(MAC_MI_MODE,
@@ -558,7 +561,7 @@
 	tw32_f(MAC_MI_COM, frame_val);
 
 	loops = PHY_BUSY_LOOPS;
-	while (loops-- > 0) {
+	while (loops != 0) {
 		udelay(10);
 		frame_val = tr32(MAC_MI_COM);
 		if ((frame_val & MI_COM_BUSY) == 0) {
@@ -566,10 +569,11 @@
 			frame_val = tr32(MAC_MI_COM);
 			break;
 		}
+		loops -= 1;
 	}
 
 	ret = -EBUSY;
-	if (loops > 0)
+	if (loops != 0)
 		ret = 0;
 
 	if ((tp->mi_mode & MAC_MI_MODE_AUTO_POLL) != 0) {
diff -Nru a/drivers/net/tlan.c b/drivers/net/tlan.c
--- a/drivers/net/tlan.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/net/tlan.c	2005-01-10 20:11:16 -08:00
@@ -198,16 +198,6 @@
 MODULE_DESCRIPTION("Driver for TI ThunderLAN based ethernet PCI adapters");
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(aui, "1-" __MODULE_STRING(MAX_TLAN_BOARDS) "i");
-MODULE_PARM(duplex, "1-" __MODULE_STRING(MAX_TLAN_BOARDS) "i");
-MODULE_PARM(speed, "1-" __MODULE_STRING(MAX_TLAN_BOARDS) "i");
-MODULE_PARM(debug, "i");
-MODULE_PARM(bbuf, "i");
-MODULE_PARM_DESC(aui, "ThunderLAN use AUI port(s) (0-1)");
-MODULE_PARM_DESC(duplex, "ThunderLAN duplex setting(s) (0-default, 1-half, 2-full)");
-MODULE_PARM_DESC(speed, "ThunderLAN port speen setting(s) (0,10,100)");
-MODULE_PARM_DESC(debug, "ThunderLAN debug mask");
-MODULE_PARM_DESC(bbuf, "ThunderLAN use big buffer (0-1)");
 
 /* Define this to enable Link beat monitoring */
 #undef MONITOR
@@ -223,13 +213,11 @@
 static  int tlan_have_pci;
 static  int tlan_have_eisa;
 
-const char *media[] = {
+static const char *media[] = {
 	"10BaseT-HD ", "10BaseT-FD ","100baseTx-HD ", 
 	"100baseTx-FD", "100baseT4", NULL
 };
 
-int media_map[] = { 0x0020, 0x0040, 0x0080, 0x0100, 0x0200,};
-
 static struct board {
 	const char	*deviceLabel;
 	u32	   	flags;
@@ -382,7 +370,7 @@
 static inline void
 TLan_SetTimer( struct net_device *dev, u32 ticks, u32 type )
 {
-	TLanPrivateInfo *priv = dev->priv;
+	TLanPrivateInfo *priv = netdev_priv(dev);
 	unsigned long flags = 0;
 	
 	if (!in_irq())
@@ -438,7 +426,7 @@
 static void __devexit tlan_remove_one( struct pci_dev *pdev)
 {
 	struct net_device *dev = pci_get_drvdata( pdev );
-	TLanPrivateInfo	*priv = dev->priv;
+	TLanPrivateInfo	*priv = netdev_priv(dev);
 	
 	unregister_netdev( dev );
 
@@ -557,7 +545,7 @@
 	SET_MODULE_OWNER(dev);
 	SET_NETDEV_DEV(dev, &pdev->dev);
 	
-	priv = dev->priv;
+	priv = netdev_priv(dev);
 
 	priv->pciDev = pdev;
 	
@@ -693,7 +681,7 @@
 	
 	while( tlan_have_eisa ) {
 		dev = TLan_Eisa_Devices;
-		priv = dev->priv;
+		priv = netdev_priv(dev);
 		if (priv->dmaStorage) {
 			pci_free_consistent(priv->pciDev, priv->dmaSize, priv->dmaStorage, priv->dmaStorageDMA );
 		}
@@ -854,7 +842,7 @@
 	int		i;
 	TLanPrivateInfo	*priv;
 
-	priv = dev->priv;
+	priv = netdev_priv(dev);
 	
 	if ( bbuf ) {
 		dma_size = ( TLAN_NUM_RX_LISTS + TLAN_NUM_TX_LISTS )
@@ -937,7 +925,7 @@
 
 static int TLan_Open( struct net_device *dev )
 {
-	TLanPrivateInfo	*priv = dev->priv;
+	TLanPrivateInfo	*priv = netdev_priv(dev);
 	int		err;
 	
 	priv->tlanRev = TLan_DioRead8( dev->base_addr, TLAN_DEF_REVISION );
@@ -983,7 +971,7 @@
 
 static int TLan_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 {
-	TLanPrivateInfo *priv = dev->priv;
+	TLanPrivateInfo *priv = netdev_priv(dev);
 	struct mii_ioctl_data *data = if_mii(rq);
 	u32 phy   = priv->phy[priv->phyNum];
 	
@@ -1062,7 +1050,7 @@
 
 static int TLan_StartTx( struct sk_buff *skb, struct net_device *dev )
 {
-	TLanPrivateInfo *priv = dev->priv;
+	TLanPrivateInfo *priv = netdev_priv(dev);
 	TLanList	*tail_list;
 	dma_addr_t	tail_list_phys;
 	u8		*tail_buffer;
@@ -1170,7 +1158,7 @@
 	TLanPrivateInfo *priv;
 
 	dev = dev_id;
-	priv = dev->priv;
+	priv = netdev_priv(dev);
 
 	spin_lock(&priv->lock);
 
@@ -1211,7 +1199,7 @@
 
 static int TLan_Close(struct net_device *dev)
 {
-	TLanPrivateInfo *priv = dev->priv;
+	TLanPrivateInfo *priv = netdev_priv(dev);
 
 	netif_stop_queue(dev);
 	priv->neg_be_verbose = 0;
@@ -1251,7 +1239,7 @@
 
 static struct net_device_stats *TLan_GetStats( struct net_device *dev )
 {
-	TLanPrivateInfo	*priv = dev->priv;
+	TLanPrivateInfo	*priv = netdev_priv(dev);
 	int i;
 
 	/* Should only read stats if open ? */
@@ -1270,7 +1258,7 @@
 			TLan_PrintList( priv->txList + i, "TX", i );
 	}
 	
-	return ( &( (TLanPrivateInfo *) dev->priv )->stats );
+	return ( &( (TLanPrivateInfo *) netdev_priv(dev) )->stats );
 
 } /* TLan_GetStats */
 
@@ -1405,7 +1393,7 @@
 
 u32 TLan_HandleTxEOF( struct net_device *dev, u16 host_int )
 {
-	TLanPrivateInfo	*priv = dev->priv;
+	TLanPrivateInfo	*priv = netdev_priv(dev);
 	int		eoc = 0;
 	TLanList	*head_list;
 	dma_addr_t	head_list_phys;
@@ -1527,7 +1515,7 @@
 
 u32 TLan_HandleRxEOF( struct net_device *dev, u16 host_int )
 {
-	TLanPrivateInfo	*priv = dev->priv;
+	TLanPrivateInfo	*priv = netdev_priv(dev);
 	u32		ack = 0;
 	int		eoc = 0;
 	u8		*head_buffer;
@@ -1694,7 +1682,7 @@
 
 u32 TLan_HandleTxEOC( struct net_device *dev, u16 host_int )
 {
-	TLanPrivateInfo	*priv = dev->priv;
+	TLanPrivateInfo	*priv = netdev_priv(dev);
 	TLanList		*head_list;
 	dma_addr_t		head_list_phys;
 	u32			ack = 1;
@@ -1742,7 +1730,7 @@
 
 u32 TLan_HandleStatusCheck( struct net_device *dev, u16 host_int )
 {	
-	TLanPrivateInfo	*priv = dev->priv;
+	TLanPrivateInfo	*priv = netdev_priv(dev);
 	u32		ack;
 	u32		error;
 	u8		net_sts;
@@ -1817,7 +1805,7 @@
 
 u32 TLan_HandleRxEOC( struct net_device *dev, u16 host_int )
 {
-	TLanPrivateInfo	*priv = dev->priv;
+	TLanPrivateInfo	*priv = netdev_priv(dev);
 	dma_addr_t	head_list_phys;
 	u32		ack = 1;
 
@@ -1878,7 +1866,7 @@
 void TLan_Timer( unsigned long data )
 {
 	struct net_device	*dev = (struct net_device *) data;
-	TLanPrivateInfo	*priv = dev->priv;
+	TLanPrivateInfo	*priv = netdev_priv(dev);
 	u32		elapsed;
 	unsigned long	flags = 0;
 
@@ -1958,7 +1946,7 @@
 
 void TLan_ResetLists( struct net_device *dev )
 {
-	TLanPrivateInfo *priv = dev->priv;
+	TLanPrivateInfo *priv = netdev_priv(dev);
 	int		i;
 	TLanList	*list;
 	dma_addr_t	list_phys;
@@ -2018,7 +2006,7 @@
 
 void TLan_FreeLists( struct net_device *dev )
 {
-	TLanPrivateInfo *priv = dev->priv;
+	TLanPrivateInfo *priv = netdev_priv(dev);
 	int		i;
 	TLanList	*list;
 	struct sk_buff	*skb;
@@ -2138,7 +2126,7 @@
 
 void TLan_ReadAndClearStats( struct net_device *dev, int record )
 {
-	TLanPrivateInfo	*priv = dev->priv;
+	TLanPrivateInfo	*priv = netdev_priv(dev);
 	u32		tx_good, tx_under;
 	u32		rx_good, rx_over;
 	u32		def_tx, crc, code;
@@ -2214,7 +2202,7 @@
 void
 TLan_ResetAdapter( struct net_device *dev )
 {
-	TLanPrivateInfo	*priv = dev->priv;
+	TLanPrivateInfo	*priv = netdev_priv(dev);
 	int		i;
 	u32		addr;
 	u32		data;
@@ -2300,7 +2288,7 @@
 void
 TLan_FinishReset( struct net_device *dev )
 {
-	TLanPrivateInfo	*priv = dev->priv;
+	TLanPrivateInfo	*priv = netdev_priv(dev);
 	u8		data;
 	u32		phy;
 	u8		sio;
@@ -2464,7 +2452,7 @@
 
 void TLan_PhyPrint( struct net_device *dev )
 {
-	TLanPrivateInfo *priv = dev->priv;
+	TLanPrivateInfo *priv = netdev_priv(dev);
 	u16 i, data0, data1, data2, data3, phy;
 
 	phy = priv->phy[priv->phyNum];
@@ -2513,7 +2501,7 @@
 
 void TLan_PhyDetect( struct net_device *dev )
 {
-	TLanPrivateInfo *priv = dev->priv;
+	TLanPrivateInfo *priv = netdev_priv(dev);
 	u16		control;
 	u16		hi;
 	u16		lo;
@@ -2560,7 +2548,7 @@
 
 void TLan_PhyPowerDown( struct net_device *dev )
 {
-	TLanPrivateInfo	*priv = dev->priv;
+	TLanPrivateInfo	*priv = netdev_priv(dev);
 	u16		value;
 
 	TLAN_DBG( TLAN_DEBUG_GNRL, "%s: Powering down PHY(s).\n", dev->name );
@@ -2585,7 +2573,7 @@
 
 void TLan_PhyPowerUp( struct net_device *dev )
 {
-	TLanPrivateInfo	*priv = dev->priv;
+	TLanPrivateInfo	*priv = netdev_priv(dev);
 	u16		value;
 
 	TLAN_DBG( TLAN_DEBUG_GNRL, "%s: Powering up PHY.\n", dev->name );
@@ -2606,7 +2594,7 @@
 
 void TLan_PhyReset( struct net_device *dev )
 {
-	TLanPrivateInfo	*priv = dev->priv;
+	TLanPrivateInfo	*priv = netdev_priv(dev);
 	u16		phy;
 	u16		value;
 
@@ -2634,7 +2622,7 @@
 
 void TLan_PhyStartLink( struct net_device *dev )
 {
-	TLanPrivateInfo	*priv = dev->priv;
+	TLanPrivateInfo	*priv = netdev_priv(dev);
 	u16		ability;
 	u16		control;
 	u16		data;
@@ -2721,7 +2709,7 @@
 
 void TLan_PhyFinishAutoNeg( struct net_device *dev )
 {
-	TLanPrivateInfo	*priv = dev->priv;
+	TLanPrivateInfo	*priv = netdev_priv(dev);
 	u16		an_adv;
 	u16		an_lpa;
 	u16		data;
@@ -2805,7 +2793,7 @@
 
 void TLan_PhyMonitor( struct net_device *dev )
 {
-	TLanPrivateInfo *priv = dev->priv;
+	TLanPrivateInfo *priv = netdev_priv(dev);
 	u16     phy;
 	u16     phy_status;
 
@@ -2882,7 +2870,7 @@
  	u32	i;
 	int	err;
 	int	minten;
-	TLanPrivateInfo *priv = dev->priv;
+	TLanPrivateInfo *priv = netdev_priv(dev);
 	unsigned long flags = 0;
 
 	err = FALSE;
@@ -3051,7 +3039,7 @@
 	u16	sio;
 	int	minten;
 	unsigned long flags = 0;
-	TLanPrivateInfo *priv = dev->priv;
+	TLanPrivateInfo *priv = netdev_priv(dev);
 
 	outw(TLAN_NET_SIO, dev->base_addr + TLAN_DIO_ADR);
 	sio = dev->base_addr + TLAN_DIO_DATA + TLAN_NET_SIO;
@@ -3278,7 +3266,7 @@
 int TLan_EeReadByte( struct net_device *dev, u8 ee_addr, u8 *data )
 {
 	int err;
-	TLanPrivateInfo *priv = dev->priv;
+	TLanPrivateInfo *priv = netdev_priv(dev);
 	unsigned long flags = 0;
 	int ret=0;
 
diff -Nru a/drivers/net/tlan.h b/drivers/net/tlan.h
--- a/drivers/net/tlan.h	2005-01-10 20:11:22 -08:00
+++ b/drivers/net/tlan.h	2005-01-10 20:11:22 -08:00
@@ -443,7 +443,7 @@
 
 /* Routines to access internal registers. */
 
-inline u8 TLan_DioRead8(u16 base_addr, u16 internal_addr)
+static inline u8 TLan_DioRead8(u16 base_addr, u16 internal_addr)
 {
 	outw(internal_addr, base_addr + TLAN_DIO_ADR);
 	return (inb((base_addr + TLAN_DIO_DATA) + (internal_addr & 0x3)));
@@ -453,7 +453,7 @@
 
 
 
-inline u16 TLan_DioRead16(u16 base_addr, u16 internal_addr)
+static inline u16 TLan_DioRead16(u16 base_addr, u16 internal_addr)
 {
 	outw(internal_addr, base_addr + TLAN_DIO_ADR);
 	return (inw((base_addr + TLAN_DIO_DATA) + (internal_addr & 0x2)));
@@ -463,7 +463,7 @@
 
 
 
-inline u32 TLan_DioRead32(u16 base_addr, u16 internal_addr)
+static inline u32 TLan_DioRead32(u16 base_addr, u16 internal_addr)
 {
 	outw(internal_addr, base_addr + TLAN_DIO_ADR);
 	return (inl(base_addr + TLAN_DIO_DATA));
@@ -473,7 +473,7 @@
 
 
 
-inline void TLan_DioWrite8(u16 base_addr, u16 internal_addr, u8 data)
+static inline void TLan_DioWrite8(u16 base_addr, u16 internal_addr, u8 data)
 {
 	outw(internal_addr, base_addr + TLAN_DIO_ADR);
 	outb(data, base_addr + TLAN_DIO_DATA + (internal_addr & 0x3));
@@ -483,7 +483,7 @@
 
 
 
-inline void TLan_DioWrite16(u16 base_addr, u16 internal_addr, u16 data)
+static inline void TLan_DioWrite16(u16 base_addr, u16 internal_addr, u16 data)
 {
 	outw(internal_addr, base_addr + TLAN_DIO_ADR);
 	outw(data, base_addr + TLAN_DIO_DATA + (internal_addr & 0x2));
@@ -493,46 +493,38 @@
 
 
 
-inline void TLan_DioWrite32(u16 base_addr, u16 internal_addr, u32 data)
+static inline void TLan_DioWrite32(u16 base_addr, u16 internal_addr, u32 data)
 {
 	outw(internal_addr, base_addr + TLAN_DIO_ADR);
 	outl(data, base_addr + TLAN_DIO_DATA + (internal_addr & 0x2));
 
 }
 
-
-
-#if 0
-inline void TLan_ClearBit(u8 bit, u16 port)
-{
-	outb_p(inb_p(port) & ~bit, port);
-}
-
-
-
-
-inline int TLan_GetBit(u8 bit, u16 port)
-{
-	return ((int) (inb_p(port) & bit));
-}
-
-
-
-
-inline void TLan_SetBit(u8 bit, u16 port)
-{
-	outb_p(inb_p(port) | bit, port);
-}
-#endif
-
 #define TLan_ClearBit( bit, port )	outb_p(inb_p(port) & ~bit, port)
 #define TLan_GetBit( bit, port )	((int) (inb_p(port) & bit))
 #define TLan_SetBit( bit, port )	outb_p(inb_p(port) | bit, port)
 
-#ifdef I_LIKE_A_FAST_HASH_FUNCTION
-/* given 6 bytes, view them as 8 6-bit numbers and return the XOR of those */
-/* the code below is about seven times as fast as the original code */
-inline u32 TLan_HashFunc( u8 *a )
+/*
+ * given 6 bytes, view them as 8 6-bit numbers and return the XOR of those 
+ * the code below is about seven times as fast as the original code 
+ *
+ * The original code was:
+ *
+ * u32	xor( u32 a, u32 b ) {	return ( ( a && ! b ) || ( ! a && b ) ); }
+ *
+ * #define XOR8( a, b, c, d, e, f, g, h )	\
+ * 	xor( a, xor( b, xor( c, xor( d, xor( e, xor( f, xor( g, h ) ) ) ) ) ) )
+ * #define DA( a, bit )		( ( (u8) a[bit/8] ) & ( (u8) ( 1 << bit%8 ) ) )
+ *
+ * 	hash  = XOR8( DA(a,0), DA(a, 6), DA(a,12), DA(a,18), DA(a,24), DA(a,30), DA(a,36), DA(a,42) );
+ * 	hash |= XOR8( DA(a,1), DA(a, 7), DA(a,13), DA(a,19), DA(a,25), DA(a,31), DA(a,37), DA(a,43) ) << 1;
+ * 	hash |= XOR8( DA(a,2), DA(a, 8), DA(a,14), DA(a,20), DA(a,26), DA(a,32), DA(a,38), DA(a,44) ) << 2;
+ * 	hash |= XOR8( DA(a,3), DA(a, 9), DA(a,15), DA(a,21), DA(a,27), DA(a,33), DA(a,39), DA(a,45) ) << 3;
+ * 	hash |= XOR8( DA(a,4), DA(a,10), DA(a,16), DA(a,22), DA(a,28), DA(a,34), DA(a,40), DA(a,46) ) << 4;
+ * 	hash |= XOR8( DA(a,5), DA(a,11), DA(a,17), DA(a,23), DA(a,29), DA(a,35), DA(a,41), DA(a,47) ) << 5;
+ *
+ */
+static inline u32 TLan_HashFunc( const u8 *a )
 {
         u8     hash;
 
@@ -545,30 +537,4 @@
 
         return (hash & 077);
 }
-
-#else /* original code */
-
-inline	u32	xor( u32 a, u32 b )
-{
-	return ( ( a && ! b ) || ( ! a && b ) );
-}
-#define XOR8( a, b, c, d, e, f, g, h )	xor( a, xor( b, xor( c, xor( d, xor( e, xor( f, xor( g, h ) ) ) ) ) ) )
-#define DA( a, bit )					( ( (u8) a[bit/8] ) & ( (u8) ( 1 << bit%8 ) ) )
-
-inline u32 TLan_HashFunc( u8 *a )
-{
-	u32	hash;
-
-	hash  = XOR8( DA(a,0), DA(a, 6), DA(a,12), DA(a,18), DA(a,24), DA(a,30), DA(a,36), DA(a,42) );
-	hash |= XOR8( DA(a,1), DA(a, 7), DA(a,13), DA(a,19), DA(a,25), DA(a,31), DA(a,37), DA(a,43) ) << 1;
-	hash |= XOR8( DA(a,2), DA(a, 8), DA(a,14), DA(a,20), DA(a,26), DA(a,32), DA(a,38), DA(a,44) ) << 2;
-	hash |= XOR8( DA(a,3), DA(a, 9), DA(a,15), DA(a,21), DA(a,27), DA(a,33), DA(a,39), DA(a,45) ) << 3;
-	hash |= XOR8( DA(a,4), DA(a,10), DA(a,16), DA(a,22), DA(a,28), DA(a,34), DA(a,40), DA(a,46) ) << 4;
-	hash |= XOR8( DA(a,5), DA(a,11), DA(a,17), DA(a,23), DA(a,29), DA(a,35), DA(a,41), DA(a,47) ) << 5;
-
-	return hash;
-
-} 
-
-#endif /* I_LIKE_A_FAST_HASH_FUNCTION */
 #endif
diff -Nru a/drivers/net/tokenring/3c359.c b/drivers/net/tokenring/3c359.c
--- a/drivers/net/tokenring/3c359.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/net/tokenring/3c359.c	2005-01-10 20:11:23 -08:00
@@ -94,20 +94,20 @@
 
 static int ringspeed[XL_MAX_ADAPTERS] = {0,} ;
 
-MODULE_PARM(ringspeed, "1-" __MODULE_STRING(XL_MAX_ADAPTERS) "i");
+module_param_array(ringspeed, int, NULL, 0);
 MODULE_PARM_DESC(ringspeed,"3c359: Ringspeed selection - 4,16 or 0") ; 
 
 /* Packet buffer size */
 
 static int pkt_buf_sz[XL_MAX_ADAPTERS] = {0,} ;
  
-MODULE_PARM(pkt_buf_sz, "1-" __MODULE_STRING(XL_MAX_ADAPTERS) "i") ; 
+module_param_array(pkt_buf_sz, int, NULL, 0) ;
 MODULE_PARM_DESC(pkt_buf_sz,"3c359: Initial buffer size") ; 
 /* Message Level */
 
 static int message_level[XL_MAX_ADAPTERS] = {0,} ; 
 
-MODULE_PARM(message_level, "1-" __MODULE_STRING(XL_MAX_ADAPTERS) "i") ; 
+module_param_array(message_level, int, NULL, 0) ;
 MODULE_PARM_DESC(message_level, "3c359: Level of reported messages \n") ; 
 /* 
  *	This is a real nasty way of doing this, but otherwise you
@@ -159,7 +159,7 @@
 
 	struct xl_private *xl_priv = (struct xl_private *)dev->priv ; 
 	struct xl_tx_desc *txd ; 
-	u8 *xl_mmio = xl_priv->xl_mmio ; 
+	u8 __iomem *xl_mmio = xl_priv->xl_mmio ; 
 	int i ; 
 
 	printk("tx_ring_head: %d, tx_ring_tail: %d, free_ent: %d \n",xl_priv->tx_ring_head, 
@@ -182,7 +182,7 @@
 
 	struct xl_private *xl_priv = (struct xl_private *)dev->priv ; 
 	struct xl_rx_desc *rxd ; 
-	u8 *xl_mmio = xl_priv->xl_mmio ; 
+	u8 __iomem *xl_mmio = xl_priv->xl_mmio ; 
 	int i ; 
 
 	printk("rx_ring_tail: %d \n", xl_priv->rx_ring_tail) ; 
@@ -215,7 +215,7 @@
 static u16 xl_ee_read(struct net_device *dev, int ee_addr)
 { 
     	struct xl_private *xl_priv = (struct xl_private *)dev->priv ;
-	u8 *xl_mmio = xl_priv->xl_mmio ; 
+	u8 __iomem *xl_mmio = xl_priv->xl_mmio ; 
 
 	/* Wait for EEProm to not be busy */
 	writel(IO_WORD_READ | EECONTROL, xl_mmio + MMIO_MAC_ACCESS_CMD) ; 
@@ -247,7 +247,7 @@
 static void  xl_ee_write(struct net_device *dev, int ee_addr, u16 ee_value) 
 {
     	struct xl_private *xl_priv = (struct xl_private *)dev->priv ;
-	u8 *xl_mmio = xl_priv->xl_mmio ; 
+	u8 __iomem *xl_mmio = xl_priv->xl_mmio ; 
 
 	/* Wait for EEProm to not be busy */
 	writel(IO_WORD_READ | EECONTROL, xl_mmio + MMIO_MAC_ACCESS_CMD) ; 
@@ -386,7 +386,7 @@
 static int xl_hw_reset(struct net_device *dev) 
 { 
     	struct xl_private *xl_priv = (struct xl_private *)dev->priv ;
-	u8 *xl_mmio = xl_priv->xl_mmio ; 
+	u8 __iomem *xl_mmio = xl_priv->xl_mmio ; 
 	unsigned long t ; 
 	u16 i ; 
     	u16 result_16 ; 
@@ -569,7 +569,7 @@
 static int xl_open(struct net_device *dev) 
 {
 	struct xl_private *xl_priv=(struct xl_private *)dev->priv;
-	u8 * xl_mmio = xl_priv->xl_mmio ; 
+	u8 __iomem *xl_mmio = xl_priv->xl_mmio ; 
 	u8 i ; 
 	u16 hwaddr[3] ; /* Should be u8[6] but we get word return values */
 	int open_err ;
@@ -727,7 +727,7 @@
 static int xl_open_hw(struct net_device *dev) 
 { 
 	struct xl_private *xl_priv=(struct xl_private *)dev->priv;
-	u8 * xl_mmio = xl_priv->xl_mmio ; 
+	u8 __iomem *xl_mmio = xl_priv->xl_mmio ; 
 	u16 vsoff ;
 	char ver_str[33];  
 	int open_err ; 
@@ -891,7 +891,7 @@
 static void xl_rx(struct net_device *dev)
 {
 	struct xl_private *xl_priv=(struct xl_private *)dev->priv;
-	u8 * xl_mmio = xl_priv->xl_mmio ; 
+	u8 __iomem * xl_mmio = xl_priv->xl_mmio ; 
 	struct sk_buff *skb, *skb2 ; 
 	int frame_length = 0, copy_len = 0  ; 	
 	int temp_ring_loc ;  
@@ -999,7 +999,7 @@
 static void xl_reset(struct net_device *dev) 
 {
 	struct xl_private *xl_priv=(struct xl_private *)dev->priv;
-	u8 * xl_mmio = xl_priv->xl_mmio ; 
+	u8 __iomem * xl_mmio = xl_priv->xl_mmio ; 
 	unsigned long t; 
 
 	writew( GLOBAL_RESET, xl_mmio + MMIO_COMMAND ) ; 
@@ -1046,7 +1046,7 @@
 {
 	struct net_device *dev = (struct net_device *)dev_id;
  	struct xl_private *xl_priv =(struct xl_private *)dev->priv;
-	u8 * xl_mmio = xl_priv->xl_mmio ; 
+	u8 __iomem * xl_mmio = xl_priv->xl_mmio ; 
 	u16 intstatus, macstatus  ;
 
 	if (!dev) { 
@@ -1234,7 +1234,7 @@
 static void xl_dn_comp(struct net_device *dev) 
 {
 	struct xl_private *xl_priv=(struct xl_private *)dev->priv;
-	u8 * xl_mmio = xl_priv->xl_mmio ; 
+	u8 __iomem * xl_mmio = xl_priv->xl_mmio ; 
 	struct xl_tx_desc *txd ; 
 
 
@@ -1270,7 +1270,7 @@
 static int xl_close(struct net_device *dev) 
 {
 	struct xl_private *xl_priv = (struct xl_private *) dev->priv ; 
-	u8 * xl_mmio = xl_priv->xl_mmio ; 
+	u8 __iomem * xl_mmio = xl_priv->xl_mmio ; 
 	unsigned long t ; 
 
 	netif_stop_queue(dev) ; 
@@ -1409,7 +1409,7 @@
 static void xl_srb_bh(struct net_device *dev) 
 { 
 	struct xl_private *xl_priv = (struct xl_private *) dev->priv ; 
-	u8 * xl_mmio = xl_priv->xl_mmio ; 
+	u8 __iomem * xl_mmio = xl_priv->xl_mmio ; 
 	u8 srb_cmd, ret_code ; 
 	int i ; 
 
@@ -1506,7 +1506,7 @@
 static void xl_arb_cmd(struct net_device *dev)
 {
 	struct xl_private *xl_priv = (struct xl_private *) dev->priv;
-	u8 * xl_mmio = xl_priv->xl_mmio ; 
+	u8 __iomem * xl_mmio = xl_priv->xl_mmio ; 
 	u8 arb_cmd ; 
 	u16 lan_status, lan_status_diff ; 
 
@@ -1634,7 +1634,7 @@
 static void xl_asb_cmd(struct net_device *dev)
 {
 	struct xl_private *xl_priv = (struct xl_private *) dev->priv ; 
-	u8 * xl_mmio = xl_priv->xl_mmio ; 
+	u8 __iomem * xl_mmio = xl_priv->xl_mmio ; 
 
 	if (xl_priv->asb_queued == 1) 
 		writel(ACK_INTERRUPT | LATCH_ACK | ASBFACK, xl_mmio + MMIO_COMMAND) ; 
@@ -1665,7 +1665,7 @@
 static void xl_asb_bh(struct net_device *dev) 
 {
 	struct xl_private *xl_priv = (struct xl_private *) dev->priv ; 
-	u8 * xl_mmio = xl_priv->xl_mmio ; 
+	u8 __iomem * xl_mmio = xl_priv->xl_mmio ; 
 	u8 ret_code ; 
 
 	writel(MMIO_BYTE_READ | 0xd0000 | xl_priv->asb | 2, xl_mmio + MMIO_MAC_ACCESS_CMD) ; 
@@ -1693,7 +1693,7 @@
 static void xl_srb_cmd(struct net_device *dev, int srb_cmd) 
 {
 	struct xl_private *xl_priv = (struct xl_private *) dev->priv ; 
-	u8 * xl_mmio = xl_priv->xl_mmio ; 
+	u8 __iomem * xl_mmio = xl_priv->xl_mmio ; 
 
 	switch (srb_cmd) { 
 	case READ_LOG:
@@ -1750,7 +1750,7 @@
 static void xl_wait_misr_flags(struct net_device *dev) 
 {
 	struct xl_private *xl_priv = (struct xl_private *) dev->priv ; 
-	u8 * xl_mmio = xl_priv->xl_mmio ; 
+	u8 __iomem * xl_mmio = xl_priv->xl_mmio ; 
 	
 	int i  ; 
 	
diff -Nru a/drivers/net/tokenring/3c359.h b/drivers/net/tokenring/3c359.h
--- a/drivers/net/tokenring/3c359.h	2005-01-10 20:11:17 -08:00
+++ b/drivers/net/tokenring/3c359.h	2005-01-10 20:11:17 -08:00
@@ -263,7 +263,7 @@
 	u16 arb;
 	u16 asb;
 
-	u8 *xl_mmio;
+	u8 __iomem *xl_mmio;
 	char *xl_card_name;
 	struct pci_dev *pdev ; 
 	
diff -Nru a/drivers/net/tokenring/Kconfig b/drivers/net/tokenring/Kconfig
--- a/drivers/net/tokenring/Kconfig	2005-01-10 20:11:17 -08:00
+++ b/drivers/net/tokenring/Kconfig	2005-01-10 20:11:17 -08:00
@@ -84,7 +84,7 @@
 
 config TMS380TR
 	tristate "Generic TMS380 Token Ring ISA/PCI adapter support"
-	depends on TR && (PCI || ISA) && HOTPLUG
+	depends on TR && (PCI || ISA)
 	select FW_LOADER
 	---help---
 	  This driver provides generic support for token ring adapters
diff -Nru a/drivers/net/tokenring/ibmtr.c b/drivers/net/tokenring/ibmtr.c
--- a/drivers/net/tokenring/ibmtr.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/net/tokenring/ibmtr.c	2005-01-10 20:11:20 -08:00
@@ -1945,9 +1945,9 @@
 
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(io, "1-" __MODULE_STRING(IBMTR_MAX_ADAPTERS) "i");
-MODULE_PARM(irq, "1-" __MODULE_STRING(IBMTR_MAX_ADAPTERS) "i");
-MODULE_PARM(mem, "1-" __MODULE_STRING(IBMTR_MAX_ADAPTERS) "i");
+module_param_array(io, int, NULL, 0);
+module_param_array(irq, int, NULL, 0);
+module_param_array(mem, int, NULL, 0);
 
 static int __init ibmtr_init(void)
 {
diff -Nru a/drivers/net/tokenring/lanstreamer.c b/drivers/net/tokenring/lanstreamer.c
--- a/drivers/net/tokenring/lanstreamer.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/net/tokenring/lanstreamer.c	2005-01-10 20:11:23 -08:00
@@ -182,20 +182,19 @@
 
 static int ringspeed[STREAMER_MAX_ADAPTERS] = { 0, };
 
-MODULE_PARM(ringspeed, "1-" __MODULE_STRING(STREAMER_MAX_ADAPTERS) "i");
+module_param_array(ringspeed, int, NULL, 0);
 
 /* Packet buffer size */
 
 static int pkt_buf_sz[STREAMER_MAX_ADAPTERS] = { 0, };
 
-MODULE_PARM(pkt_buf_sz, "1-" __MODULE_STRING(STREAMER_MAX_ADAPTERS) "i");
+module_param_array(pkt_buf_sz, int, NULL, 0);
 
 /* Message Level */
 
 static int message_level[STREAMER_MAX_ADAPTERS] = { 1, };
 
-MODULE_PARM(message_level,
-	    "1-" __MODULE_STRING(STREAMER_MAX_ADAPTERS) "i");
+module_param_array(message_level, int, NULL, 0);
 
 #if STREAMER_IOCTL
 static int streamer_ioctl(struct net_device *, struct ifreq *, int);
@@ -443,7 +442,7 @@
 static int streamer_reset(struct net_device *dev)
 {
 	struct streamer_private *streamer_priv;
-	__u8 *streamer_mmio;
+	__u8 __iomem *streamer_mmio;
 	unsigned long t;
 	unsigned int uaa_addr;
 	struct sk_buff *skb = NULL;
@@ -591,7 +590,7 @@
 static int streamer_open(struct net_device *dev)
 {
 	struct streamer_private *streamer_priv = (struct streamer_private *) dev->priv;
-	__u8 *streamer_mmio = streamer_priv->streamer_mmio;
+	__u8 __iomem *streamer_mmio = streamer_priv->streamer_mmio;
 	unsigned long flags;
 	char open_error[255];
 	int i, open_finished = 1;
@@ -908,7 +907,7 @@
 {
 	struct streamer_private *streamer_priv =
 	    (struct streamer_private *) dev->priv;
-	__u8 *streamer_mmio = streamer_priv->streamer_mmio;
+	__u8 __iomem *streamer_mmio = streamer_priv->streamer_mmio;
 	struct streamer_rx_desc *rx_desc;
 	int rx_ring_last_received, length, frame_length, buffer_cnt = 0;
 	struct sk_buff *skb, *skb2;
@@ -1035,7 +1034,7 @@
 	struct net_device *dev = (struct net_device *) dev_id;
 	struct streamer_private *streamer_priv =
 	    (struct streamer_private *) dev->priv;
-	__u8 *streamer_mmio = streamer_priv->streamer_mmio;
+	__u8 __iomem *streamer_mmio = streamer_priv->streamer_mmio;
 	__u16 sisr;
 	__u16 misr;
 	u8 max_intr = MAX_INTR;
@@ -1158,7 +1157,7 @@
 {
 	struct streamer_private *streamer_priv =
 	    (struct streamer_private *) dev->priv;
-	__u8 *streamer_mmio = streamer_priv->streamer_mmio;
+	__u8 __iomem *streamer_mmio = streamer_priv->streamer_mmio;
 	unsigned long flags ;
 
 	spin_lock_irqsave(&streamer_priv->streamer_lock, flags);
@@ -1209,7 +1208,7 @@
 {
 	struct streamer_private *streamer_priv =
 	    (struct streamer_private *) dev->priv;
-	__u8 *streamer_mmio = streamer_priv->streamer_mmio;
+	__u8 __iomem *streamer_mmio = streamer_priv->streamer_mmio;
 	unsigned long flags;
 	int i;
 
@@ -1275,7 +1274,7 @@
 {
 	struct streamer_private *streamer_priv =
 	    (struct streamer_private *) dev->priv;
-	__u8 *streamer_mmio = streamer_priv->streamer_mmio;
+	__u8 __iomem *streamer_mmio = streamer_priv->streamer_mmio;
 	__u8 options = 0;
 	struct dev_mc_list *dmi;
 	unsigned char dev_mc_address[5];
@@ -1334,7 +1333,7 @@
 static void streamer_srb_bh(struct net_device *dev)
 {
 	struct streamer_private *streamer_priv = (struct streamer_private *) dev->priv;
-	__u8 *streamer_mmio = streamer_priv->streamer_mmio;
+	__u8 __iomem *streamer_mmio = streamer_priv->streamer_mmio;
 	__u16 srb_word;
 
 	writew(streamer_priv->srb, streamer_mmio + LAPA);
@@ -1531,7 +1530,7 @@
 {
 	struct streamer_private *streamer_priv =
 	    (struct streamer_private *) dev->priv;
-	__u8 *streamer_mmio = streamer_priv->streamer_mmio;
+	__u8 __iomem *streamer_mmio = streamer_priv->streamer_mmio;
 	__u8 header_len;
 	__u16 frame_len, buffer_len;
 	struct sk_buff *mac_frame;
@@ -1747,7 +1746,7 @@
 {
 	struct streamer_private *streamer_priv =
 	    (struct streamer_private *) dev->priv;
-	__u8 *streamer_mmio = streamer_priv->streamer_mmio;
+	__u8 __iomem *streamer_mmio = streamer_priv->streamer_mmio;
 
 	if (streamer_priv->asb_queued == 1) 
 	{
@@ -1855,7 +1854,7 @@
 {
 	struct streamer_private *streamer_priv =
 	    (struct streamer_private *) dev->priv;
-	__u8 *streamer_mmio = streamer_priv->streamer_mmio;
+	__u8 __iomem *streamer_mmio = streamer_priv->streamer_mmio;
 	struct streamer_adapter_addr_table sat;
 	struct streamer_parameters_table spt;
 	int size = 0;
@@ -1939,7 +1938,7 @@
 {
         int i;
 	struct streamer_private *streamer_priv = (struct streamer_private *) dev->priv;
-	u8 *streamer_mmio = streamer_priv->streamer_mmio;
+	u8 __iomem *streamer_mmio = streamer_priv->streamer_mmio;
 
 	switch(cmd) {
 	case IOCTL_SISR_MASK:
diff -Nru a/drivers/net/tokenring/lanstreamer.h b/drivers/net/tokenring/lanstreamer.h
--- a/drivers/net/tokenring/lanstreamer.h	2005-01-10 20:11:17 -08:00
+++ b/drivers/net/tokenring/lanstreamer.h	2005-01-10 20:11:17 -08:00
@@ -293,7 +293,7 @@
 
         struct streamer_private *next;
         struct pci_dev *pci_dev;
-	__u8 *streamer_mmio;
+	__u8 __iomem *streamer_mmio;
         char *streamer_card_name;
  
         spinlock_t streamer_lock;
diff -Nru a/drivers/net/tokenring/olympic.c b/drivers/net/tokenring/olympic.c
--- a/drivers/net/tokenring/olympic.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/net/tokenring/olympic.c	2005-01-10 20:11:21 -08:00
@@ -150,17 +150,17 @@
  */
 
 static int ringspeed[OLYMPIC_MAX_ADAPTERS] = {0,} ;
-MODULE_PARM(ringspeed, "1-" __MODULE_STRING(OLYMPIC_MAX_ADAPTERS) "i");
+module_param_array(ringspeed, int, NULL, 0);
 
 /* Packet buffer size */
 
 static int pkt_buf_sz[OLYMPIC_MAX_ADAPTERS] = {0,} ;
-MODULE_PARM(pkt_buf_sz, "1-" __MODULE_STRING(OLYMPIC_MAX_ADAPTERS) "i") ; 
+module_param_array(pkt_buf_sz, int, NULL, 0) ;
 
 /* Message Level */
 
 static int message_level[OLYMPIC_MAX_ADAPTERS] = {0,} ; 
-MODULE_PARM(message_level, "1-" __MODULE_STRING(OLYMPIC_MAX_ADAPTERS) "i") ; 
+module_param_array(message_level, int, NULL, 0) ;
 
 /* Change network_monitor to receive mac frames through the arb channel.
  * Will also create a /proc/net/olympic_tr%d entry, where %d is the tr
@@ -169,7 +169,7 @@
  * i.e. it will give you the source address of beaconers on the ring 
  */
 static int network_monitor[OLYMPIC_MAX_ADAPTERS] = {0,};
-MODULE_PARM(network_monitor, "1-" __MODULE_STRING(OLYMPIC_MAX_ADAPTERS) "i");
+module_param_array(network_monitor, int, NULL, 0);
 
 static struct pci_device_id olympic_pci_tbl[] = {
 	{PCI_VENDOR_ID_IBM,PCI_DEVICE_ID_IBM_TR_WAKE,PCI_ANY_ID,PCI_ANY_ID,},
@@ -438,8 +438,8 @@
 	struct olympic_private *olympic_priv=(struct olympic_private *)dev->priv;
 	u8 __iomem *olympic_mmio=olympic_priv->olympic_mmio,*init_srb;
 	unsigned long flags, t;
-	char open_error[255] ; 
 	int i, open_finished = 1 ;
+	u8 resp, err;
 
 	DECLARE_WAITQUEUE(wait,current) ; 
 
@@ -540,52 +540,48 @@
                  * timed out.
 		 */
 
-		if(readb(init_srb+2)== OLYMPIC_CLEAR_RET_CODE) {
+		switch (resp = readb(init_srb+2)) {
+		case OLYMPIC_CLEAR_RET_CODE:
 			printk(KERN_WARNING "%s: Adapter Open time out or error.\n", dev->name) ; 
-			return -EIO ; 
-		}	
+			goto out;
+		case 0:
+			open_finished = 1;
+			break;
+		case 0x07:
+			if (!olympic_priv->olympic_ring_speed && open_finished) { /* Autosense , first time around */
+				printk(KERN_WARNING "%s: Retrying at different ring speed \n", dev->name); 
+				open_finished = 0 ;  
+				continue;
+			}
 
-		if(readb(init_srb+2)!=0) {
-			if (readb(init_srb+2) == 0x07) {  
-				if (!olympic_priv->olympic_ring_speed && open_finished) { /* Autosense , first time around */
-					printk(KERN_WARNING "%s: Retrying at different ring speed \n", dev->name); 
-					open_finished = 0 ;  
-				} else {
-
-					strcpy(open_error, open_maj_error[(readb(init_srb+7) & 0xf0) >> 4]) ; 
-					strcat(open_error," - ") ; 
-					strcat(open_error, open_min_error[(readb(init_srb+7) & 0x0f)]) ;
-
-					if (!olympic_priv->olympic_ring_speed && ((readb(init_srb+7) & 0x0f) == 0x0d)) { 
-						printk(KERN_WARNING "%s: Tried to autosense ring speed with no monitors present\n",dev->name);
-						printk(KERN_WARNING "%s: Please try again with a specified ring speed \n",dev->name);
-						free_irq(dev->irq, dev);
-						return -EIO ;
-					}
-
-					printk(KERN_WARNING "%s: %s\n",dev->name,open_error);
-					free_irq(dev->irq,dev) ; 
-					return -EIO ; 
- 
-				}	/* if autosense && open_finished */
-			} else if (init_srb[2] == 0x32) {
-				printk(KERN_WARNING "%s: Invalid LAA: %02x:%02x:%02x:%02x:%02x:%02x\n",
-					dev->name, 
-					olympic_priv->olympic_laa[0],
-					olympic_priv->olympic_laa[1],
-					olympic_priv->olympic_laa[2],
-					olympic_priv->olympic_laa[3],
-					olympic_priv->olympic_laa[4],
-					olympic_priv->olympic_laa[5]) ; 
-				free_irq(dev->irq,dev) ; 
-				return -EIO ; 
-			} else {  
-				printk(KERN_WARNING "%s: Bad OPEN response: %x\n", dev->name,init_srb[2]);
-				free_irq(dev->irq, dev);
-				return -EIO;
-			} 
-		} else 
-			open_finished = 1 ; 
+			err = readb(init_srb+7);
+
+			if (!olympic_priv->olympic_ring_speed && ((err & 0x0f) == 0x0d)) { 
+				printk(KERN_WARNING "%s: Tried to autosense ring speed with no monitors present\n",dev->name);
+				printk(KERN_WARNING "%s: Please try again with a specified ring speed \n",dev->name);
+			} else {
+				printk(KERN_WARNING "%s: %s - %s\n", dev->name,
+					open_maj_error[(err & 0xf0) >> 4],
+					open_min_error[(err & 0x0f)]);
+			}
+			goto out;
+
+		case 0x32:
+			printk(KERN_WARNING "%s: Invalid LAA: %02x:%02x:%02x:%02x:%02x:%02x\n",
+				dev->name, 
+				olympic_priv->olympic_laa[0],
+				olympic_priv->olympic_laa[1],
+				olympic_priv->olympic_laa[2],
+				olympic_priv->olympic_laa[3],
+				olympic_priv->olympic_laa[4],
+				olympic_priv->olympic_laa[5]) ; 
+			goto out;
+
+		default:
+			printk(KERN_WARNING "%s: Bad OPEN response: %x\n", dev->name, resp);
+			goto out;
+
+		}
 	} while (!(open_finished)) ; /* Will only loop if ring speed mismatch re-open attempted && autosense is on */	
 
 	if (readb(init_srb+18) & (1<<3)) 
@@ -634,8 +630,7 @@
 
 	if (i==0) {
 		printk(KERN_WARNING "%s: Not enough memory to allocate rx buffers. Adapter disabled\n",dev->name);
-		free_irq(dev->irq, dev);
-		return -EIO;
+		goto out;
 	}
 
 	olympic_priv->rx_ring_dma_addr = pci_map_single(olympic_priv->pdev,olympic_priv->olympic_rx_ring, 
@@ -737,7 +732,10 @@
 	
 	netif_start_queue(dev);
 	return 0;
-	
+
+out:
+	free_irq(dev->irq, dev);
+	return -EIO;
 }	
 
 /*
diff -Nru a/drivers/net/tokenring/proteon.c b/drivers/net/tokenring/proteon.c
--- a/drivers/net/tokenring/proteon.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/net/tokenring/proteon.c	2005-01-10 20:11:22 -08:00
@@ -362,9 +362,9 @@
 
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(io, "1-" __MODULE_STRING(ISATR_MAX_ADAPTERS) "i");
-MODULE_PARM(irq, "1-" __MODULE_STRING(ISATR_MAX_ADAPTERS) "i");
-MODULE_PARM(dma, "1-" __MODULE_STRING(ISATR_MAX_ADAPTERS) "i");
+module_param_array(io, int, NULL, 0);
+module_param_array(irq, int, NULL, 0);
+module_param_array(dma, int, NULL, 0);
 
 static struct net_device *proteon_dev[ISATR_MAX_ADAPTERS];
 
diff -Nru a/drivers/net/tokenring/skisa.c b/drivers/net/tokenring/skisa.c
--- a/drivers/net/tokenring/skisa.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/net/tokenring/skisa.c	2005-01-10 20:11:16 -08:00
@@ -371,9 +371,9 @@
 
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(io, "1-" __MODULE_STRING(ISATR_MAX_ADAPTERS) "i");
-MODULE_PARM(irq, "1-" __MODULE_STRING(ISATR_MAX_ADAPTERS) "i");
-MODULE_PARM(dma, "1-" __MODULE_STRING(ISATR_MAX_ADAPTERS) "i");
+module_param_array(io, int, NULL, 0);
+module_param_array(irq, int, NULL, 0);
+module_param_array(dma, int, NULL, 0);
 
 static struct net_device *sk_isa_dev[ISATR_MAX_ADAPTERS];
 
diff -Nru a/drivers/net/tokenring/smctr.c b/drivers/net/tokenring/smctr.c
--- a/drivers/net/tokenring/smctr.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/net/tokenring/smctr.c	2005-01-10 20:11:19 -08:00
@@ -5663,9 +5663,9 @@
 
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(io, "1-" __MODULE_STRING(SMCTR_MAX_ADAPTERS) "i");
-MODULE_PARM(irq, "1-" __MODULE_STRING(SMCTR_MAX_ADAPTERS) "i");
-MODULE_PARM(ringspeed, "i");
+module_param_array(io, int, NULL, 0);
+module_param_array(irq, int, NULL, 0);
+module_param(ringspeed, int, 0);
 
 static struct net_device *setup_card(int n)
 {
diff -Nru a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c
--- a/drivers/net/tulip/de2104x.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/net/tulip/de2104x.c	2005-01-10 20:11:21 -08:00
@@ -56,9 +56,10 @@
 MODULE_AUTHOR("Jeff Garzik <jgarzik@pobox.com>");
 MODULE_DESCRIPTION("Intel/Digital 21040/1 series PCI Ethernet driver");
 MODULE_LICENSE("GPL");
+MODULE_VERSION(DRV_VERSION);
 
 static int debug = -1;
-MODULE_PARM (debug, "i");
+module_param (debug, int, 0);
 MODULE_PARM_DESC (debug, "de2104x bitmapped message enable number");
 
 /* Set the copy breakpoint for the copy-only-tiny-buffer Rx structure. */
@@ -69,7 +70,7 @@
 #else
 static int rx_copybreak = 100;
 #endif
-MODULE_PARM (rx_copybreak, "i");
+module_param (rx_copybreak, int, 0);
 MODULE_PARM_DESC (rx_copybreak, "de2104x Breakpoint at which Rx packets are copied");
 
 #define PFX			DRV_NAME ": "
diff -Nru a/drivers/net/tulip/dmfe.c b/drivers/net/tulip/dmfe.c
--- a/drivers/net/tulip/dmfe.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/net/tulip/dmfe.c	2005-01-10 20:11:22 -08:00
@@ -1987,16 +1987,17 @@
 MODULE_AUTHOR("Sten Wang, sten_wang@davicom.com.tw");
 MODULE_DESCRIPTION("Davicom DM910X fast ethernet driver");
 MODULE_LICENSE("GPL");
+MODULE_VERSION(DRV_VERSION);
 
-MODULE_PARM(debug, "i");
-MODULE_PARM(mode, "i");
-MODULE_PARM(cr6set, "i");
-MODULE_PARM(chkmode, "i");
-MODULE_PARM(HPNA_mode, "i");
-MODULE_PARM(HPNA_rx_cmd, "i");
-MODULE_PARM(HPNA_tx_cmd, "i");
-MODULE_PARM(HPNA_NoiseFloor, "i");
-MODULE_PARM(SF_mode, "i");
+module_param(debug, int, 0);
+module_param(mode, byte, 0);
+module_param(cr6set, int, 0);
+module_param(chkmode, byte, 0);
+module_param(HPNA_mode, byte, 0);
+module_param(HPNA_rx_cmd, byte, 0);
+module_param(HPNA_tx_cmd, byte, 0);
+module_param(HPNA_NoiseFloor, byte, 0);
+module_param(SF_mode, byte, 0);
 MODULE_PARM_DESC(debug, "Davicom DM9xxx enable debugging (0-1)");
 MODULE_PARM_DESC(mode, "Davicom DM9xxx: Bit 0: 10/100Mbps, bit 2: duplex, bit 8: HomePNA");
 MODULE_PARM_DESC(SF_mode, "Davicom DM9xxx special function (bit 0: VLAN, bit 1 Flow Control, bit 2: TX pause packet)");
diff -Nru a/drivers/net/tulip/media.c b/drivers/net/tulip/media.c
--- a/drivers/net/tulip/media.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/net/tulip/media.c	2005-01-10 20:11:17 -08:00
@@ -81,6 +81,25 @@
 		return retval & 0xffff;
 	}
 
+	if(tp->chip_id == ULI526X && tp->revision >= 0x40) {
+		int value;
+		int i = 1000;
+		
+		value = ioread32(ioaddr + CSR9);
+		iowrite32(value & 0xFFEFFFFF, ioaddr + CSR9);
+		
+		value = (phy_id << 21) | (location << 16) | 0x80000000;
+		iowrite32(value, ioaddr + CSR10);
+		
+		while(--i > 0) {
+			mdio_delay();
+			if(ioread32(ioaddr + CSR10) & 0x10000000)
+				break;
+		}
+		retval = ioread32(ioaddr + CSR10);
+		spin_unlock_irqrestore(&tp->mii_lock, flags);
+		return retval & 0xFFFF;
+	}
 	/* Establish sync by sending at least 32 logic ones. */
 	for (i = 32; i >= 0; i--) {
 		iowrite32(MDIO_ENB | MDIO_DATA_WRITE1, mdio_addr);
@@ -140,7 +159,23 @@
 		spin_unlock_irqrestore(&tp->mii_lock, flags);
 		return;
 	}
-
+	if (tp->chip_id == ULI526X && tp->revision >= 0x40) {
+		int value;
+		int i = 1000;
+		
+		value = ioread32(ioaddr + CSR9);
+		iowrite32(value & 0xFFEFFFFF, ioaddr + CSR9);
+		
+		value = (phy_id << 21) | (location << 16) | 0x40000000 | (val & 0xFFFF);
+		iowrite32(value, ioaddr + CSR10);
+		
+		while(--i > 0) {
+			if (ioread32(ioaddr + CSR10) & 0x10000000)
+				break;
+		}
+		spin_unlock_irqrestore(&tp->mii_lock, flags);
+	}
+		
 	/* Establish sync by sending 32 logic ones. */
 	for (i = 32; i >= 0; i--) {
 		iowrite32(MDIO_ENB | MDIO_DATA_WRITE1, mdio_addr);
diff -Nru a/drivers/net/tulip/timer.c b/drivers/net/tulip/timer.c
--- a/drivers/net/tulip/timer.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/net/tulip/timer.c	2005-01-10 20:11:15 -08:00
@@ -39,6 +39,7 @@
 	case MX98713:
 	case COMPEX9881:
 	case DM910X:
+	case ULI526X:
 	default: {
 		struct medialeaf *mleaf;
 		unsigned char *p;
diff -Nru a/drivers/net/tulip/tulip.h b/drivers/net/tulip/tulip.h
--- a/drivers/net/tulip/tulip.h	2005-01-10 20:11:22 -08:00
+++ b/drivers/net/tulip/tulip.h	2005-01-10 20:11:22 -08:00
@@ -88,6 +88,7 @@
 	I21145,
 	DM910X,
 	CONEXANT,
+	ULI526X
 };
 
 
@@ -481,8 +482,11 @@
 
 static inline void tulip_restart_rxtx(struct tulip_private *tp)
 {
-	tulip_stop_rxtx(tp);
-	udelay(5);
+	if(!(tp->chip_id == ULI526X && 
+		(tp->revision == 0x40 || tp->revision == 0x50))) {
+		tulip_stop_rxtx(tp);
+		udelay(5);
+	}
 	tulip_start_rxtx(tp);
 }
 
diff -Nru a/drivers/net/tulip/tulip_core.c b/drivers/net/tulip/tulip_core.c
--- a/drivers/net/tulip/tulip_core.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/net/tulip/tulip_core.c	2005-01-10 20:11:20 -08:00
@@ -88,9 +88,9 @@
 	ToDo: Non-Intel setting could be better.
 */
 
-#if defined(__alpha__) || defined(__ia64__) || defined(__x86_64__)
+#if defined(__alpha__) || defined(__ia64__)
 static int csr0 = 0x01A00000 | 0xE000;
-#elif defined(__i386__) || defined(__powerpc__)
+#elif defined(__i386__) || defined(__powerpc__) || defined(__x86_64__)
 static int csr0 = 0x01A00000 | 0x8000;
 #elif defined(__sparc__) || defined(__hppa__)
 /* The UltraSparc PCI controllers will disconnect at every 64-byte
@@ -115,12 +115,13 @@
 MODULE_AUTHOR("The Linux Kernel Team");
 MODULE_DESCRIPTION("Digital 21*4* Tulip ethernet driver");
 MODULE_LICENSE("GPL");
-MODULE_PARM(tulip_debug, "i");
-MODULE_PARM(max_interrupt_work, "i");
-MODULE_PARM(rx_copybreak, "i");
-MODULE_PARM(csr0, "i");
-MODULE_PARM(options, "1-" __MODULE_STRING(MAX_UNITS) "i");
-MODULE_PARM(full_duplex, "1-" __MODULE_STRING(MAX_UNITS) "i");
+MODULE_VERSION(DRV_VERSION);
+module_param(tulip_debug, int, 0);
+module_param(max_interrupt_work, int, 0);
+module_param(rx_copybreak, int, 0);
+module_param(csr0, int, 0);
+module_param_array(options, int, NULL, 0);
+module_param_array(full_duplex, int, NULL, 0);
 
 #define PFX DRV_NAME ": "
 
@@ -197,6 +198,10 @@
   /* RS7112 */
   { "Conexant LANfinity", 256, 0x0001ebef,
 	HAS_MII | HAS_ACPI, tulip_timer },
+
+   /* ULi526X */
+   { "ULi M5261/M5263", 128, 0x0001ebef,
+        HAS_MII | HAS_MEDIA_TABLE | CSR12_IN_SROM | HAS_ACPI, tulip_timer },
 };
 
 
@@ -228,12 +233,14 @@
 	{ 0x1113, 0x9511, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET },
 	{ 0x1186, 0x1541, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET },
 	{ 0x1186, 0x1561, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET },
+	{ 0x1186, 0x1591, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET },
 	{ 0x14f1, 0x1803, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CONEXANT },
 	{ 0x1626, 0x8410, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET },
 	{ 0x1737, 0xAB09, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET },
 	{ 0x1737, 0xAB08, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET },
 	{ 0x17B3, 0xAB08, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET },
- 	{ 0x10b9, 0x5261, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DM910X },	/* ALi 1563 integrated ethernet */
+ 	{ 0x10b9, 0x5261, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ULI526X },	/* ALi 1563 integrated ethernet */
+ 	{ 0x10b9, 0x5263, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ULI526X },	/* ALi 1563 integrated ethernet */
 	{ 0x10b7, 0x9300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET }, /* 3Com 3CSOHO100B-TX */
 	{ } /* terminate list */
 };
@@ -514,7 +521,7 @@
 				   dev->name);
 	} else if (tp->chip_id == DC21140 || tp->chip_id == DC21142
 			   || tp->chip_id == MX98713 || tp->chip_id == COMPEX9881
-			   || tp->chip_id == DM910X) {
+			   || tp->chip_id == DM910X || tp->chip_id == ULI526X) {
 		printk(KERN_WARNING "%s: 21140 transmit timed out, status %8.8x, "
 			   "SIA %8.8x %8.8x %8.8x %8.8x, resetting...\n",
 			   dev->name, ioread32(ioaddr + CSR5), ioread32(ioaddr + CSR12),
@@ -1215,6 +1222,22 @@
 }
 #endif
 
+/*
+ *	Chips that have the MRM/reserved bit quirk and the burst quirk. That
+ *	is the DM910X and the on chip ULi devices
+ */
+ 
+static int tulip_uli_dm_quirk(struct pci_dev *pdev)
+{
+	if (pdev->vendor == 0x1282 && pdev->device == 0x9102)
+		return 1;
+	if (pdev->vendor == 0x10b9 && pdev->device == 0x5261)
+		return 1;
+	if (pdev->vendor == 0x10b9 && pdev->device == 0x5263)
+		return 1;
+	return 0;
+}
+
 static int __devinit tulip_init_one (struct pci_dev *pdev,
 				     const struct pci_device_id *ent)
 {
@@ -1303,17 +1326,12 @@
 		csr0 &= ~0xfff10000; /* zero reserved bits 31:20, 16 */
 
 	/* DM9102A has troubles with MRM & clear reserved bits 24:22, 20, 16, 7:1 */
-	if ((pdev->vendor == 0x1282 && pdev->device == 0x9102)
-		|| (pdev->vendor == 0x10b9 && pdev->device == 0x5261))
+	if (tulip_uli_dm_quirk(pdev)) {
 		csr0 &= ~0x01f100ff;
-
 #if defined(__sparc__)
-        /* DM9102A needs 32-dword alignment/burst length on sparc - chip bug? */
-	if ((pdev->vendor == 0x1282 && pdev->device == 0x9102)
-		|| (pdev->vendor == 0x10b9 && pdev->device == 0x5261))
                 csr0 = (csr0 & ~0xff00) | 0xe000;
 #endif
-
+	}
 	/*
 	 *	And back to business
 	 */
@@ -1658,6 +1676,7 @@
 	switch (chip_idx) {
 	case DC21140:
 	case DM910X:
+	case ULI526X:
 	default:
 		if (tp->mtable)
 			iowrite32(tp->mtable->csr12dir | 0x100, ioaddr + CSR12);
diff -Nru a/drivers/net/tulip/winbond-840.c b/drivers/net/tulip/winbond-840.c
--- a/drivers/net/tulip/winbond-840.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/net/tulip/winbond-840.c	2005-01-10 20:11:17 -08:00
@@ -144,13 +144,14 @@
 MODULE_AUTHOR("Donald Becker <becker@scyld.com>");
 MODULE_DESCRIPTION("Winbond W89c840 Ethernet driver");
 MODULE_LICENSE("GPL");
+MODULE_VERSION(DRV_VERSION);
 
-MODULE_PARM(max_interrupt_work, "i");
-MODULE_PARM(debug, "i");
-MODULE_PARM(rx_copybreak, "i");
-MODULE_PARM(multicast_filter_limit, "i");
-MODULE_PARM(options, "1-" __MODULE_STRING(MAX_UNITS) "i");
-MODULE_PARM(full_duplex, "1-" __MODULE_STRING(MAX_UNITS) "i");
+module_param(max_interrupt_work, int, 0);
+module_param(debug, int, 0);
+module_param(rx_copybreak, int, 0);
+module_param(multicast_filter_limit, int, 0);
+module_param_array(options, int, NULL, 0);
+module_param_array(full_duplex, int, NULL, 0);
 MODULE_PARM_DESC(max_interrupt_work, "winbond-840 maximum events handled per interrupt");
 MODULE_PARM_DESC(debug, "winbond-840 debug level (0-6)");
 MODULE_PARM_DESC(rx_copybreak, "winbond-840 copy breakpoint for copy-only-tiny-frames");
diff -Nru a/drivers/net/tulip/xircom_tulip_cb.c b/drivers/net/tulip/xircom_tulip_cb.c
--- a/drivers/net/tulip/xircom_tulip_cb.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/net/tulip/xircom_tulip_cb.c	2005-01-10 20:11:16 -08:00
@@ -33,6 +33,13 @@
 
 /* A few user-configurable values. */
 
+#define xircom_debug debug
+#ifdef XIRCOM_DEBUG
+static int xircom_debug = XIRCOM_DEBUG;
+#else
+static int xircom_debug = 1;
+#endif
+
 /* Maximum events (Rx packets, etc.) to handle at each interrupt. */
 static int max_interrupt_work = 25;
 
@@ -93,6 +100,7 @@
 
 #include <linux/config.h>
 #include <linux/module.h>
+#include <linux/moduleparam.h>
 #include <linux/kernel.h>
 #include <linux/pci.h>
 #include <linux/netdevice.h>
@@ -116,22 +124,17 @@
 MODULE_AUTHOR("Donald Becker <becker@scyld.com>");
 MODULE_DESCRIPTION("Xircom CBE-100 ethernet driver");
 MODULE_LICENSE("GPL v2");
+MODULE_VERSION(DRV_VERSION);
 
-MODULE_PARM(debug, "i");
-MODULE_PARM(max_interrupt_work, "i");
-MODULE_PARM(rx_copybreak, "i");
-MODULE_PARM(csr0, "i");
-MODULE_PARM(options, "1-" __MODULE_STRING(MAX_UNITS) "i");
-MODULE_PARM(full_duplex, "1-" __MODULE_STRING(MAX_UNITS) "i");
+module_param(debug, int, 0);
+module_param(max_interrupt_work, int, 0);
+module_param(rx_copybreak, int, 0);
+module_param(csr0, int, 0);
 
-#define RUN_AT(x) (jiffies + (x))
+module_param_array(options, int, NULL, 0);
+module_param_array(full_duplex, int, NULL, 0);
 
-#define xircom_debug debug
-#ifdef XIRCOM_DEBUG
-static int xircom_debug = XIRCOM_DEBUG;
-#else
-static int xircom_debug = 1;
-#endif
+#define RUN_AT(x) (jiffies + (x))
 
 /*
 				Theory of Operation
diff -Nru a/drivers/net/tun.c b/drivers/net/tun.c
--- a/drivers/net/tun.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/net/tun.c	2005-01-10 20:11:18 -08:00
@@ -41,6 +41,7 @@
 #include <linux/if_arp.h>
 #include <linux/if_ether.h>
 #include <linux/if_tun.h>
+#include <linux/crc32.h>
 
 #include <asm/system.h>
 #include <asm/uaccess.h>
@@ -104,11 +105,42 @@
 	return 0;
 }
 
-static void tun_net_mclist(struct net_device *dev)
+/** Add the specified Ethernet address to this multicast filter. */
+static void
+add_multi(u32* filter, const u8* addr)
 {
-	/* Nothing to do for multicast filters. 
-	 * We always accept all frames. */
-	return;
+	int bit_nr = ether_crc(ETH_ALEN, addr) >> 26;
+	filter[bit_nr >> 5] |= 1 << (bit_nr & 31);
+}
+
+/** Remove the specified Ethernet addres from this multicast filter. */
+static void
+del_multi(u32* filter, const u8* addr)
+{
+	int bit_nr = ether_crc(ETH_ALEN, addr) >> 26;
+	filter[bit_nr >> 5] &= ~(1 << (bit_nr & 31));
+}
+
+/** Update the list of multicast groups to which the network device belongs.
+ * This list is used to filter packets being sent from the character device to
+ * the network device. */
+static void
+tun_net_mclist(struct net_device *dev)
+{
+	struct tun_struct *tun = netdev_priv(dev);
+	const struct dev_mc_list *mclist;
+	int i;
+	DBG(KERN_DEBUG "%s: tun_net_mclist: mc_count %d\n",
+			dev->name, dev->mc_count);
+	memset(tun->chr_filter, 0, sizeof tun->chr_filter);
+	for (i = 0, mclist = dev->mc_list; i < dev->mc_count && mclist != NULL;
+			i++, mclist = mclist->next) {
+		add_multi(tun->net_filter, mclist->dmi_addr);
+		DBG(KERN_DEBUG "%s: tun_net_mclist: %x:%x:%x:%x:%x:%x\n",
+				dev->name,
+				mclist->dmi_addr[0], mclist->dmi_addr[1], mclist->dmi_addr[2],
+				mclist->dmi_addr[3], mclist->dmi_addr[4], mclist->dmi_addr[5]);
+	}
 }
 
 static struct net_device_stats *tun_net_stats(struct net_device *dev)
@@ -301,6 +333,10 @@
 
 	add_wait_queue(&tun->read_wait, &wait);
 	while (len) {
+		const u8 ones[ ETH_ALEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
+		u8 addr[ ETH_ALEN];
+		int bit_nr;
+
 		current->state = TASK_INTERRUPTIBLE;
 
 		/* Read frames from the queue */
@@ -320,10 +356,37 @@
 		}
 		netif_start_queue(tun->dev);
 
-		ret = tun_put_user(tun, skb, (struct iovec *) iv, len);
-
-		kfree_skb(skb);
-		break;
+		/** Decide whether to accept this packet. This code is designed to
+		 * behave identically to an Ethernet interface. Accept the packet if
+		 * - we are promiscuous.
+		 * - the packet is addressed to us.
+		 * - the packet is broadcast.
+		 * - the packet is multicast and
+		 *   - we are multicast promiscous.
+		 *   - we belong to the multicast group.
+		 */
+		memcpy(addr, skb->data, min(sizeof addr, skb->len));
+		bit_nr = ether_crc(sizeof addr, addr) >> 26;
+		if ((tun->if_flags & IFF_PROMISC) ||
+				memcmp(addr, tun->dev_addr, sizeof addr) == 0 ||
+				memcmp(addr, ones, sizeof addr) == 0 ||
+				(((addr[0] == 1 && addr[1] == 0 && addr[2] == 0x5e) ||
+				  (addr[0] == 0x33 && addr[1] == 0x33)) &&
+				 ((tun->if_flags & IFF_ALLMULTI) ||
+				  (tun->chr_filter[bit_nr >> 5] & (1 << (bit_nr & 31)))))) {
+			DBG(KERN_DEBUG "%s: tun_chr_readv: accepted: %x:%x:%x:%x:%x:%x\n",
+					tun->dev->name, addr[0], addr[1], addr[2],
+					addr[3], addr[4], addr[5]);
+			ret = tun_put_user(tun, skb, (struct iovec *) iv, len);
+			kfree_skb(skb);
+			break;
+		} else {
+			DBG(KERN_DEBUG "%s: tun_chr_readv: rejected: %x:%x:%x:%x:%x:%x\n",
+					tun->dev->name, addr[0], addr[1], addr[2],
+					addr[3], addr[4], addr[5]);
+			kfree_skb(skb);
+			continue;
+		}
 	}
 
 	current->state = TASK_RUNNING;
@@ -417,6 +480,12 @@
 		tun = netdev_priv(dev);
 		tun->dev = dev;
 		tun->flags = flags;
+		/* Be promiscuous by default to maintain previous behaviour. */
+		tun->if_flags = IFF_PROMISC;
+		/* Generate random Ethernet address. */
+		*(u16 *)tun->dev_addr = htons(0x00FF);
+		get_random_bytes(tun->dev_addr + sizeof(u16), 4);
+		memset(tun->chr_filter, 0, sizeof tun->chr_filter);
 
 		tun_net_init(dev);
 
@@ -457,13 +526,16 @@
 			 unsigned int cmd, unsigned long arg)
 {
 	struct tun_struct *tun = file->private_data;
+	void __user* argp = (void __user*)arg;
+	struct ifreq ifr;
+
+	if (cmd == TUNSETIFF || _IOC_TYPE(cmd) == 0x89)
+		if (copy_from_user(&ifr, argp, sizeof ifr))
+			return -EFAULT;
 
 	if (cmd == TUNSETIFF && !tun) {
-		struct ifreq ifr;
 		int err;
 
-		if (copy_from_user(&ifr, (void __user *)arg, sizeof(ifr)))
-			return -EFAULT;
 		ifr.ifr_name[IFNAMSIZ-1] = '\0';
 
 		rtnl_lock();
@@ -473,7 +545,7 @@
 		if (err)
 			return err;
 
-		if (copy_to_user((void __user *)arg, &ifr, sizeof(ifr)))
+		if (copy_to_user(argp, &ifr, sizeof(ifr)))
 			return -EFAULT;
 		return 0;
 	}
@@ -518,6 +590,61 @@
 		tun->debug = arg;
 		break;
 #endif
+
+	case SIOCGIFFLAGS:
+		ifr.ifr_flags = tun->if_flags;
+		if (copy_to_user( argp, &ifr, sizeof ifr))
+			return -EFAULT;
+		return 0;
+
+	case SIOCSIFFLAGS:
+		/** Set the character device's interface flags. Currently only
+		 * IFF_PROMISC and IFF_ALLMULTI are used. */
+		tun->if_flags = ifr.ifr_flags;
+		DBG(KERN_INFO "%s: interface flags 0x%lx\n",
+				tun->dev->name, tun->if_flags);
+		return 0;
+
+	case SIOCGIFHWADDR:
+		memcpy(ifr.ifr_hwaddr.sa_data, tun->dev_addr,
+				min(sizeof ifr.ifr_hwaddr.sa_data, sizeof tun->dev_addr));
+		if (copy_to_user( argp, &ifr, sizeof ifr))
+			return -EFAULT;
+		return 0;
+
+	case SIOCSIFHWADDR:
+		/** Set the character device's hardware address. This is used when
+		 * filtering packets being sent from the network device to the character
+		 * device. */
+		memcpy(tun->dev_addr, ifr.ifr_hwaddr.sa_data,
+				min(sizeof ifr.ifr_hwaddr.sa_data, sizeof tun->dev_addr));
+		DBG(KERN_DEBUG "%s: set hardware address: %x:%x:%x:%x:%x:%x\n",
+				tun->dev->name,
+				tun->dev_addr[0], tun->dev_addr[1], tun->dev_addr[2],
+				tun->dev_addr[3], tun->dev_addr[4], tun->dev_addr[5]);
+		return 0;
+
+	case SIOCADDMULTI:
+		/** Add the specified group to the character device's multicast filter
+		 * list. */
+		add_multi(tun->chr_filter, ifr.ifr_hwaddr.sa_data);
+		DBG(KERN_DEBUG "%s: add multi: %x:%x:%x:%x:%x:%x\n",
+				tun->dev->name,
+				(u8)ifr.ifr_hwaddr.sa_data[0], (u8)ifr.ifr_hwaddr.sa_data[1],
+				(u8)ifr.ifr_hwaddr.sa_data[2], (u8)ifr.ifr_hwaddr.sa_data[3],
+				(u8)ifr.ifr_hwaddr.sa_data[4], (u8)ifr.ifr_hwaddr.sa_data[5]);
+		return 0;
+
+	case SIOCDELMULTI:
+		/** Remove the specified group from the character device's multicast
+		 * filter list. */
+		del_multi(tun->chr_filter, ifr.ifr_hwaddr.sa_data);
+		DBG(KERN_DEBUG "%s: del multi: %x:%x:%x:%x:%x:%x\n",
+				tun->dev->name,
+				(u8)ifr.ifr_hwaddr.sa_data[0], (u8)ifr.ifr_hwaddr.sa_data[1],
+				(u8)ifr.ifr_hwaddr.sa_data[2], (u8)ifr.ifr_hwaddr.sa_data[3],
+				(u8)ifr.ifr_hwaddr.sa_data[4], (u8)ifr.ifr_hwaddr.sa_data[5]);
+		return 0;
 
 	default:
 		return -EINVAL;
diff -Nru a/drivers/net/typhoon.c b/drivers/net/typhoon.c
--- a/drivers/net/typhoon.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/net/typhoon.c	2005-01-10 20:11:20 -08:00
@@ -1687,8 +1687,7 @@
 		skb = rxb->skb;
 		dma_addr = rxb->dma_addr;
 
-		rxaddr += sizeof(struct rx_desc);
-		rxaddr %= RX_ENTRIES * sizeof(struct rx_desc);
+		typhoon_inc_rx_index(&rxaddr, 1);
 
 		if(rx->flags & TYPHOON_RX_ERROR) {
 			typhoon_recycle_rx_skb(tp, idx);
@@ -1890,7 +1889,7 @@
 
 	pci_enable_wake(tp->pdev, state, 1);
 	pci_disable_device(pdev);
-	return pci_set_power_state(pdev, state);
+	return pci_set_power_state(pdev, pci_choose_state(pdev, state));
 }
 
 static int
@@ -1899,7 +1898,7 @@
 	struct pci_dev *pdev = tp->pdev;
 	void __iomem *ioaddr = tp->ioaddr;
 
-	pci_set_power_state(pdev, 0);
+	pci_set_power_state(pdev, PCI_D0);
 	pci_restore_state(pdev);
 
 	/* Post 2.x.x versions of the Sleep Image require a reset before
@@ -2553,7 +2552,7 @@
 	struct typhoon *tp = netdev_priv(dev);
 
 	unregister_netdev(dev);
-	pci_set_power_state(pdev, 0);
+	pci_set_power_state(pdev, PCI_D0);
 	pci_restore_state(pdev);
 	typhoon_reset(tp->ioaddr, NoWait);
 	iounmap(tp->ioaddr);
diff -Nru a/drivers/net/via-rhine.c b/drivers/net/via-rhine.c
--- a/drivers/net/via-rhine.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/net/via-rhine.c	2005-01-10 20:11:23 -08:00
@@ -177,6 +177,7 @@
 #define PKT_BUF_SZ	1536	/* Size of each temporary Rx buffer.*/
 
 #include <linux/module.h>
+#include <linux/moduleparam.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
 #include <linux/timer.h>
@@ -208,27 +209,15 @@
 #ifdef CONFIG_VIA_RHINE_MMIO
 #define USE_MMIO
 #else
-#undef readb
-#undef readw
-#undef readl
-#undef writeb
-#undef writew
-#undef writel
-#define readb inb
-#define readw inw
-#define readl inl
-#define writeb outb
-#define writew outw
-#define writel outl
 #endif
 
 MODULE_AUTHOR("Donald Becker <becker@scyld.com>");
 MODULE_DESCRIPTION("VIA Rhine PCI Fast Ethernet driver");
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(max_interrupt_work, "i");
-MODULE_PARM(debug, "i");
-MODULE_PARM(rx_copybreak, "i");
+module_param(max_interrupt_work, int, 0);
+module_param(debug, int, 0);
+module_param(rx_copybreak, int, 0);
 MODULE_PARM_DESC(max_interrupt_work, "VIA Rhine maximum events handled per interrupt");
 MODULE_PARM_DESC(debug, "VIA Rhine debug level (0-7)");
 MODULE_PARM_DESC(rx_copybreak, "VIA Rhine copy breakpoint for copy-only-tiny-frames");
@@ -363,7 +352,7 @@
  */
 
 /* Beware of PCI posted writes */
-#define IOSYNC	do { readb(dev->base_addr + StationAddr); } while (0)
+#define IOSYNC	do { ioread8(ioaddr + StationAddr); } while (0)
 
 static struct pci_device_id rhine_pci_tbl[] =
 {
@@ -500,6 +489,7 @@
 	u8 tx_thresh, rx_thresh;
 
 	struct mii_if_info mii_if;
+	void __iomem *base;
 };
 
 static int  mdio_read(struct net_device *dev, int phy_id, int location);
@@ -529,14 +519,14 @@
 
 static inline u32 get_intr_status(struct net_device *dev)
 {
-	long ioaddr = dev->base_addr;
 	struct rhine_private *rp = netdev_priv(dev);
+	void __iomem *ioaddr = rp->base;
 	u32 intr_status;
 
-	intr_status = readw(ioaddr + IntrStatus);
+	intr_status = ioread16(ioaddr + IntrStatus);
 	/* On Rhine-II, Bit 3 indicates Tx descriptor write-back race. */
 	if (rp->quirks & rqStatusWBRace)
-		intr_status |= readb(ioaddr + IntrStatus2) << 16;
+		intr_status |= ioread8(ioaddr + IntrStatus2) << 16;
 	return intr_status;
 }
 
@@ -546,32 +536,32 @@
  */
 static void rhine_power_init(struct net_device *dev)
 {
-	long ioaddr = dev->base_addr;
 	struct rhine_private *rp = netdev_priv(dev);
+	void __iomem *ioaddr = rp->base;
 	u16 wolstat;
 
 	if (rp->quirks & rqWOL) {
 		/* Make sure chip is in power state D0 */
-		writeb(readb(ioaddr + StickyHW) & 0xFC, ioaddr + StickyHW);
+		iowrite8(ioread8(ioaddr + StickyHW) & 0xFC, ioaddr + StickyHW);
 
 		/* Disable "force PME-enable" */
-		writeb(0x80, ioaddr + WOLcgClr);
+		iowrite8(0x80, ioaddr + WOLcgClr);
 
 		/* Clear power-event config bits (WOL) */
-		writeb(0xFF, ioaddr + WOLcrClr);
+		iowrite8(0xFF, ioaddr + WOLcrClr);
 		/* More recent cards can manage two additional patterns */
 		if (rp->quirks & rq6patterns)
-			writeb(0x03, ioaddr + WOLcrClr1);
+			iowrite8(0x03, ioaddr + WOLcrClr1);
 
 		/* Save power-event status bits */
-		wolstat = readb(ioaddr + PwrcsrSet);
+		wolstat = ioread8(ioaddr + PwrcsrSet);
 		if (rp->quirks & rq6patterns)
-			wolstat |= (readb(ioaddr + PwrcsrSet1) & 0x03) << 8;
+			wolstat |= (ioread8(ioaddr + PwrcsrSet1) & 0x03) << 8;
 
 		/* Clear power-event status bits */
-		writeb(0xFF, ioaddr + PwrcsrClr);
+		iowrite8(0xFF, ioaddr + PwrcsrClr);
 		if (rp->quirks & rq6patterns)
-			writeb(0x03, ioaddr + PwrcsrClr1);
+			iowrite8(0x03, ioaddr + PwrcsrClr1);
 
 		if (wolstat) {
 			char *reason;
@@ -602,27 +592,27 @@
 
 static void rhine_chip_reset(struct net_device *dev)
 {
-	long ioaddr = dev->base_addr;
 	struct rhine_private *rp = netdev_priv(dev);
+	void __iomem *ioaddr = rp->base;
 
-	writeb(Cmd1Reset, ioaddr + ChipCmd1);
+	iowrite8(Cmd1Reset, ioaddr + ChipCmd1);
 	IOSYNC;
 
-	if (readb(ioaddr + ChipCmd1) & Cmd1Reset) {
+	if (ioread8(ioaddr + ChipCmd1) & Cmd1Reset) {
 		printk(KERN_INFO "%s: Reset not complete yet. "
 			"Trying harder.\n", DRV_NAME);
 
 		/* Force reset */
 		if (rp->quirks & rqForceReset)
-			writeb(0x40, ioaddr + MiscCmd);
+			iowrite8(0x40, ioaddr + MiscCmd);
 
 		/* Reset can take somewhat longer (rare) */
-		RHINE_WAIT_FOR(!(readb(ioaddr + ChipCmd1) & Cmd1Reset));
+		RHINE_WAIT_FOR(!(ioread8(ioaddr + ChipCmd1) & Cmd1Reset));
 	}
 
 	if (debug > 1)
 		printk(KERN_INFO "%s: Reset %s.\n", dev->name,
-			(readb(ioaddr + ChipCmd1) & Cmd1Reset) ?
+			(ioread8(ioaddr + ChipCmd1) & Cmd1Reset) ?
 			"failed" : "succeeded");
 }
 
@@ -647,8 +637,8 @@
  */
 static void __devinit rhine_reload_eeprom(long pioaddr, struct net_device *dev)
 {
-	long ioaddr = dev->base_addr;
 	struct rhine_private *rp = netdev_priv(dev);
+	void __iomem *ioaddr = rp->base;
 
 	outb(0x20, pioaddr + MACRegEEcsr);
 	RHINE_WAIT_FOR(!(inb(pioaddr + MACRegEEcsr) & 0x20));
@@ -664,7 +654,7 @@
 
 	/* Turn off EEPROM-controlled wake-up (magic packet) */
 	if (rp->quirks & rqWOL)
-		writeb(readb(ioaddr + ConfigA) & 0xFE, ioaddr + ConfigA);
+		iowrite8(ioread8(ioaddr + ConfigA) & 0xFC, ioaddr + ConfigA);
 
 }
 
@@ -702,9 +692,14 @@
 	u32 quirks;
 	long pioaddr;
 	long memaddr;
-	long ioaddr;
+	void __iomem *ioaddr;
 	int io_size, phy_id;
 	const char *name;
+#ifdef USE_MMIO
+	int bar = 1;
+#else
+	int bar = 0;
+#endif
 
 /* when built into the kernel, we only print version if device is found */
 #ifndef MODULE
@@ -783,10 +778,7 @@
 	if (rc)
 		goto err_out_free_netdev;
 
-#ifdef USE_MMIO
-	enable_mmio(pioaddr, quirks);
-
-	ioaddr = (long) ioremap(memaddr, io_size);
+	ioaddr = pci_iomap(pdev, bar, io_size);
 	if (!ioaddr) {
 		rc = -EIO;
 		printk(KERN_ERR "ioremap failed for device %s, region 0x%X "
@@ -794,6 +786,9 @@
 		goto err_out_free_res;
 	}
 
+#ifdef USE_MMIO
+	enable_mmio(pioaddr, quirks);
+
 	/* Check that selected MMIO registers match the PIO ones */
 	i = 0;
 	while (mmio_verify_registers[i]) {
@@ -807,18 +802,17 @@
 			goto err_out_unmap;
 		}
 	}
-#else
-	ioaddr = pioaddr;
 #endif /* USE_MMIO */
 
-	dev->base_addr = ioaddr;
+	dev->base_addr = (unsigned long)ioaddr;
+	rp->base = ioaddr;
 
 	/* Get chip registers into a sane state */
 	rhine_power_init(dev);
 	rhine_hw_init(dev, pioaddr);
 
 	for (i = 0; i < 6; i++)
-		dev->dev_addr[i] = readb(ioaddr + StationAddr + i);
+		dev->dev_addr[i] = ioread8(ioaddr + StationAddr + i);
 
 	if (!is_valid_ether_addr(dev->dev_addr)) {
 		rc = -EIO;
@@ -828,7 +822,7 @@
 
 	/* For Rhine-I/II, phy_id is loaded from EEPROM */
 	if (!phy_id)
-		phy_id = readb(ioaddr + 0x6C);
+		phy_id = ioread8(ioaddr + 0x6C);
 
 	dev->irq = pdev->irq;
 
@@ -865,7 +859,7 @@
 #ifdef USE_MMIO
 		memaddr
 #else
-		ioaddr
+		(long)ioaddr
 #endif
 		 );
 
@@ -901,10 +895,8 @@
 	return 0;
 
 err_out_unmap:
-#ifdef USE_MMIO
-	iounmap((void *)ioaddr);
+	pci_iounmap(pdev, ioaddr);
 err_out_free_res:
-#endif
 	pci_release_regions(pdev);
 err_out_free_netdev:
 	free_netdev(dev);
@@ -947,7 +939,7 @@
 	return 0;
 }
 
-void free_ring(struct net_device* dev)
+static void free_ring(struct net_device* dev)
 {
 	struct rhine_private *rp = netdev_priv(dev);
 
@@ -1071,102 +1063,102 @@
 static void rhine_check_media(struct net_device *dev, unsigned int init_media)
 {
 	struct rhine_private *rp = netdev_priv(dev);
-	long ioaddr = dev->base_addr;
+	void __iomem *ioaddr = rp->base;
 
 	mii_check_media(&rp->mii_if, debug, init_media);
 
 	if (rp->mii_if.full_duplex)
-	    writeb(readb(ioaddr + ChipCmd1) | Cmd1FDuplex,
+	    iowrite8(ioread8(ioaddr + ChipCmd1) | Cmd1FDuplex,
 		   ioaddr + ChipCmd1);
 	else
-	    writeb(readb(ioaddr + ChipCmd1) & ~Cmd1FDuplex,
+	    iowrite8(ioread8(ioaddr + ChipCmd1) & ~Cmd1FDuplex,
 		   ioaddr + ChipCmd1);
 }
 
 static void init_registers(struct net_device *dev)
 {
 	struct rhine_private *rp = netdev_priv(dev);
-	long ioaddr = dev->base_addr;
+	void __iomem *ioaddr = rp->base;
 	int i;
 
 	for (i = 0; i < 6; i++)
-		writeb(dev->dev_addr[i], ioaddr + StationAddr + i);
+		iowrite8(dev->dev_addr[i], ioaddr + StationAddr + i);
 
 	/* Initialize other registers. */
-	writew(0x0006, ioaddr + PCIBusConfig);	/* Tune configuration??? */
+	iowrite16(0x0006, ioaddr + PCIBusConfig);	/* Tune configuration??? */
 	/* Configure initial FIFO thresholds. */
-	writeb(0x20, ioaddr + TxConfig);
+	iowrite8(0x20, ioaddr + TxConfig);
 	rp->tx_thresh = 0x20;
 	rp->rx_thresh = 0x60;		/* Written in rhine_set_rx_mode(). */
 
-	writel(rp->rx_ring_dma, ioaddr + RxRingPtr);
-	writel(rp->tx_ring_dma, ioaddr + TxRingPtr);
+	iowrite32(rp->rx_ring_dma, ioaddr + RxRingPtr);
+	iowrite32(rp->tx_ring_dma, ioaddr + TxRingPtr);
 
 	rhine_set_rx_mode(dev);
 
 	/* Enable interrupts by setting the interrupt mask. */
-	writew(IntrRxDone | IntrRxErr | IntrRxEmpty| IntrRxOverflow |
+	iowrite16(IntrRxDone | IntrRxErr | IntrRxEmpty| IntrRxOverflow |
 	       IntrRxDropped | IntrRxNoBuf | IntrTxAborted |
 	       IntrTxDone | IntrTxError | IntrTxUnderrun |
 	       IntrPCIErr | IntrStatsMax | IntrLinkChange,
 	       ioaddr + IntrEnable);
 
-	writew(CmdStart | CmdTxOn | CmdRxOn | (Cmd1NoTxPoll << 8),
+	iowrite16(CmdStart | CmdTxOn | CmdRxOn | (Cmd1NoTxPoll << 8),
 	       ioaddr + ChipCmd);
 	rhine_check_media(dev, 1);
 }
 
 /* Enable MII link status auto-polling (required for IntrLinkChange) */
-static void rhine_enable_linkmon(long ioaddr)
+static void rhine_enable_linkmon(void __iomem *ioaddr)
 {
-	writeb(0, ioaddr + MIICmd);
-	writeb(MII_BMSR, ioaddr + MIIRegAddr);
-	writeb(0x80, ioaddr + MIICmd);
+	iowrite8(0, ioaddr + MIICmd);
+	iowrite8(MII_BMSR, ioaddr + MIIRegAddr);
+	iowrite8(0x80, ioaddr + MIICmd);
 
-	RHINE_WAIT_FOR((readb(ioaddr + MIIRegAddr) & 0x20));
+	RHINE_WAIT_FOR((ioread8(ioaddr + MIIRegAddr) & 0x20));
 
-	writeb(MII_BMSR | 0x40, ioaddr + MIIRegAddr);
+	iowrite8(MII_BMSR | 0x40, ioaddr + MIIRegAddr);
 }
 
 /* Disable MII link status auto-polling (required for MDIO access) */
-static void rhine_disable_linkmon(long ioaddr, u32 quirks)
+static void rhine_disable_linkmon(void __iomem *ioaddr, u32 quirks)
 {
-	writeb(0, ioaddr + MIICmd);
+	iowrite8(0, ioaddr + MIICmd);
 
 	if (quirks & rqRhineI) {
-		writeb(0x01, ioaddr + MIIRegAddr);	// MII_BMSR
+		iowrite8(0x01, ioaddr + MIIRegAddr);	// MII_BMSR
 
 		/* Can be called from ISR. Evil. */
 		mdelay(1);
 
 		/* 0x80 must be set immediately before turning it off */
-		writeb(0x80, ioaddr + MIICmd);
+		iowrite8(0x80, ioaddr + MIICmd);
 
-		RHINE_WAIT_FOR(readb(ioaddr + MIIRegAddr) & 0x20);
+		RHINE_WAIT_FOR(ioread8(ioaddr + MIIRegAddr) & 0x20);
 
 		/* Heh. Now clear 0x80 again. */
-		writeb(0, ioaddr + MIICmd);
+		iowrite8(0, ioaddr + MIICmd);
 	}
 	else
-		RHINE_WAIT_FOR(readb(ioaddr + MIIRegAddr) & 0x80);
+		RHINE_WAIT_FOR(ioread8(ioaddr + MIIRegAddr) & 0x80);
 }
 
 /* Read and write over the MII Management Data I/O (MDIO) interface. */
 
 static int mdio_read(struct net_device *dev, int phy_id, int regnum)
 {
-	long ioaddr = dev->base_addr;
 	struct rhine_private *rp = netdev_priv(dev);
+	void __iomem *ioaddr = rp->base;
 	int result;
 
 	rhine_disable_linkmon(ioaddr, rp->quirks);
 
 	/* rhine_disable_linkmon already cleared MIICmd */
-	writeb(phy_id, ioaddr + MIIPhyAddr);
-	writeb(regnum, ioaddr + MIIRegAddr);
-	writeb(0x40, ioaddr + MIICmd);		/* Trigger read */
-	RHINE_WAIT_FOR(!(readb(ioaddr + MIICmd) & 0x40));
-	result = readw(ioaddr + MIIData);
+	iowrite8(phy_id, ioaddr + MIIPhyAddr);
+	iowrite8(regnum, ioaddr + MIIRegAddr);
+	iowrite8(0x40, ioaddr + MIICmd);		/* Trigger read */
+	RHINE_WAIT_FOR(!(ioread8(ioaddr + MIICmd) & 0x40));
+	result = ioread16(ioaddr + MIIData);
 
 	rhine_enable_linkmon(ioaddr);
 	return result;
@@ -1175,16 +1167,16 @@
 static void mdio_write(struct net_device *dev, int phy_id, int regnum, int value)
 {
 	struct rhine_private *rp = netdev_priv(dev);
-	long ioaddr = dev->base_addr;
+	void __iomem *ioaddr = rp->base;
 
 	rhine_disable_linkmon(ioaddr, rp->quirks);
 
 	/* rhine_disable_linkmon already cleared MIICmd */
-	writeb(phy_id, ioaddr + MIIPhyAddr);
-	writeb(regnum, ioaddr + MIIRegAddr);
-	writew(value, ioaddr + MIIData);
-	writeb(0x20, ioaddr + MIICmd);		/* Trigger write */
-	RHINE_WAIT_FOR(!(readb(ioaddr + MIICmd) & 0x20));
+	iowrite8(phy_id, ioaddr + MIIPhyAddr);
+	iowrite8(regnum, ioaddr + MIIRegAddr);
+	iowrite16(value, ioaddr + MIIData);
+	iowrite8(0x20, ioaddr + MIICmd);		/* Trigger write */
+	RHINE_WAIT_FOR(!(ioread8(ioaddr + MIICmd) & 0x20));
 
 	rhine_enable_linkmon(ioaddr);
 }
@@ -1192,7 +1184,7 @@
 static int rhine_open(struct net_device *dev)
 {
 	struct rhine_private *rp = netdev_priv(dev);
-	long ioaddr = dev->base_addr;
+	void __iomem *ioaddr = rp->base;
 	int rc;
 
 	rc = request_irq(rp->pdev->irq, &rhine_interrupt, SA_SHIRQ, dev->name,
@@ -1214,7 +1206,7 @@
 	if (debug > 2)
 		printk(KERN_DEBUG "%s: Done rhine_open(), status %4.4x "
 		       "MII status: %4.4x.\n",
-		       dev->name, readw(ioaddr + ChipCmd),
+		       dev->name, ioread16(ioaddr + ChipCmd),
 		       mdio_read(dev, rp->mii_if.phy_id, MII_BMSR));
 
 	netif_start_queue(dev);
@@ -1225,11 +1217,11 @@
 static void rhine_tx_timeout(struct net_device *dev)
 {
 	struct rhine_private *rp = netdev_priv(dev);
-	long ioaddr = dev->base_addr;
+	void __iomem *ioaddr = rp->base;
 
 	printk(KERN_WARNING "%s: Transmit timed out, status %4.4x, PHY status "
 	       "%4.4x, resetting...\n",
-	       dev->name, readw(ioaddr + IntrStatus),
+	       dev->name, ioread16(ioaddr + IntrStatus),
 	       mdio_read(dev, rp->mii_if.phy_id, MII_BMSR));
 
 	/* protect against concurrent rx interrupts */
@@ -1258,7 +1250,7 @@
 static int rhine_start_tx(struct sk_buff *skb, struct net_device *dev)
 {
 	struct rhine_private *rp = netdev_priv(dev);
-	long ioaddr = dev->base_addr;
+	void __iomem *ioaddr = rp->base;
 	unsigned entry;
 
 	/* Caution: the write order is important here, set the field
@@ -1276,7 +1268,7 @@
 	rp->tx_skbuff[entry] = skb;
 
 	if ((rp->quirks & rqRhineI) &&
-	    (((long)skb->data & 3) || skb_shinfo(skb)->nr_frags != 0 || skb->ip_summed == CHECKSUM_HW)) {
+	    (((unsigned long)skb->data & 3) || skb_shinfo(skb)->nr_frags != 0 || skb->ip_summed == CHECKSUM_HW)) {
 		/* Must use alignment buffer. */
 		if (skb->len > PKT_BUF_SZ) {
 			/* packet too long, drop it */
@@ -1311,7 +1303,7 @@
 	/* Non-x86 Todo: explicitly flush cache lines here. */
 
 	/* Wake the potentially-idle transmit channel */
-	writeb(readb(ioaddr + ChipCmd1) | Cmd1TxDemand,
+	iowrite8(ioread8(ioaddr + ChipCmd1) | Cmd1TxDemand,
 	       ioaddr + ChipCmd1);
 	IOSYNC;
 
@@ -1334,20 +1326,19 @@
 static irqreturn_t rhine_interrupt(int irq, void *dev_instance, struct pt_regs *rgs)
 {
 	struct net_device *dev = dev_instance;
-	long ioaddr;
+	struct rhine_private *rp = netdev_priv(dev);
+	void __iomem *ioaddr = rp->base;
 	u32 intr_status;
 	int boguscnt = max_interrupt_work;
 	int handled = 0;
 
-	ioaddr = dev->base_addr;
-
 	while ((intr_status = get_intr_status(dev))) {
 		handled = 1;
 
 		/* Acknowledge all of the current interrupt sources ASAP. */
 		if (intr_status & IntrTxDescRace)
-			writeb(0x08, ioaddr + IntrStatus2);
-		writew(intr_status & 0xffff, ioaddr + IntrStatus);
+			iowrite8(0x08, ioaddr + IntrStatus2);
+		iowrite16(intr_status & 0xffff, ioaddr + IntrStatus);
 		IOSYNC;
 
 		if (debug > 4)
@@ -1361,9 +1352,9 @@
 		if (intr_status & (IntrTxErrSummary | IntrTxDone)) {
 			if (intr_status & IntrTxErrSummary) {
 				/* Avoid scavenging before Tx engine turned off */
-				RHINE_WAIT_FOR(!(readb(ioaddr+ChipCmd) & CmdTxOn));
+				RHINE_WAIT_FOR(!(ioread8(ioaddr+ChipCmd) & CmdTxOn));
 				if (debug > 2 &&
-				    readb(ioaddr+ChipCmd) & CmdTxOn)
+				    ioread8(ioaddr+ChipCmd) & CmdTxOn)
 					printk(KERN_WARNING "%s: "
 					       "rhine_interrupt() Tx engine"
 					       "still on.\n", dev->name);
@@ -1387,7 +1378,7 @@
 
 	if (debug > 3)
 		printk(KERN_DEBUG "%s: exiting interrupt, status=%8.8x.\n",
-		       dev->name, readw(ioaddr + IntrStatus));
+		       dev->name, ioread16(ioaddr + IntrStatus));
 	return IRQ_RETVAL(handled);
 }
 
@@ -1582,16 +1573,16 @@
  * these, for others the counters are set to 1 when written to and
  * instead cleared when read. So we clear them both ways ...
  */
-static inline void clear_tally_counters(const long ioaddr)
+static inline void clear_tally_counters(void __iomem *ioaddr)
 {
-	writel(0, ioaddr + RxMissed);
-	readw(ioaddr + RxCRCErrs);
-	readw(ioaddr + RxMissed);
+	iowrite32(0, ioaddr + RxMissed);
+	ioread16(ioaddr + RxCRCErrs);
+	ioread16(ioaddr + RxMissed);
 }
 
 static void rhine_restart_tx(struct net_device *dev) {
 	struct rhine_private *rp = netdev_priv(dev);
-	long ioaddr = dev->base_addr;
+	void __iomem *ioaddr = rp->base;
 	int entry = rp->dirty_tx % TX_RING_SIZE;
 	u32 intr_status;
 
@@ -1604,12 +1595,12 @@
 	if ((intr_status & IntrTxErrSummary) == 0) {
 
 		/* We know better than the chip where it should continue. */
-		writel(rp->tx_ring_dma + entry * sizeof(struct tx_desc),
+		iowrite32(rp->tx_ring_dma + entry * sizeof(struct tx_desc),
 		       ioaddr + TxRingPtr);
 
-		writeb(readb(ioaddr + ChipCmd) | CmdTxOn,
+		iowrite8(ioread8(ioaddr + ChipCmd) | CmdTxOn,
 		       ioaddr + ChipCmd);
-		writeb(readb(ioaddr + ChipCmd1) | Cmd1TxDemand,
+		iowrite8(ioread8(ioaddr + ChipCmd1) | Cmd1TxDemand,
 		       ioaddr + ChipCmd1);
 		IOSYNC;
 	}
@@ -1626,15 +1617,15 @@
 static void rhine_error(struct net_device *dev, int intr_status)
 {
 	struct rhine_private *rp = netdev_priv(dev);
-	long ioaddr = dev->base_addr;
+	void __iomem *ioaddr = rp->base;
 
 	spin_lock(&rp->lock);
 
 	if (intr_status & IntrLinkChange)
 		rhine_check_media(dev, 0);
 	if (intr_status & IntrStatsMax) {
-		rp->stats.rx_crc_errors += readw(ioaddr + RxCRCErrs);
-		rp->stats.rx_missed_errors += readw(ioaddr + RxMissed);
+		rp->stats.rx_crc_errors += ioread16(ioaddr + RxCRCErrs);
+		rp->stats.rx_missed_errors += ioread16(ioaddr + RxMissed);
 		clear_tally_counters(ioaddr);
 	}
 	if (intr_status & IntrTxAborted) {
@@ -1644,7 +1635,7 @@
 	}
 	if (intr_status & IntrTxUnderrun) {
 		if (rp->tx_thresh < 0xE0)
-			writeb(rp->tx_thresh += 0x20, ioaddr + TxConfig);
+			iowrite8(rp->tx_thresh += 0x20, ioaddr + TxConfig);
 		if (debug > 1)
 			printk(KERN_INFO "%s: Transmitter underrun, Tx "
 			       "threshold now %2.2x.\n",
@@ -1659,7 +1650,7 @@
 	    (intr_status & (IntrTxAborted |
 	     IntrTxUnderrun | IntrTxDescRace)) == 0) {
 		if (rp->tx_thresh < 0xE0) {
-			writeb(rp->tx_thresh += 0x20, ioaddr + TxConfig);
+			iowrite8(rp->tx_thresh += 0x20, ioaddr + TxConfig);
 		}
 		if (debug > 1)
 			printk(KERN_INFO "%s: Unspecified error. Tx "
@@ -1684,12 +1675,12 @@
 static struct net_device_stats *rhine_get_stats(struct net_device *dev)
 {
 	struct rhine_private *rp = netdev_priv(dev);
-	long ioaddr = dev->base_addr;
+	void __iomem *ioaddr = rp->base;
 	unsigned long flags;
 
 	spin_lock_irqsave(&rp->lock, flags);
-	rp->stats.rx_crc_errors += readw(ioaddr + RxCRCErrs);
-	rp->stats.rx_missed_errors += readw(ioaddr + RxMissed);
+	rp->stats.rx_crc_errors += ioread16(ioaddr + RxCRCErrs);
+	rp->stats.rx_missed_errors += ioread16(ioaddr + RxMissed);
 	clear_tally_counters(ioaddr);
 	spin_unlock_irqrestore(&rp->lock, flags);
 
@@ -1699,7 +1690,7 @@
 static void rhine_set_rx_mode(struct net_device *dev)
 {
 	struct rhine_private *rp = netdev_priv(dev);
-	long ioaddr = dev->base_addr;
+	void __iomem *ioaddr = rp->base;
 	u32 mc_filter[2];	/* Multicast hash filter */
 	u8 rx_mode;		/* Note: 0x02=accept runt, 0x01=accept errs */
 
@@ -1708,13 +1699,13 @@
 		printk(KERN_NOTICE "%s: Promiscuous mode enabled.\n",
 		       dev->name);
 		rx_mode = 0x1C;
-		writel(0xffffffff, ioaddr + MulticastFilter0);
-		writel(0xffffffff, ioaddr + MulticastFilter1);
+		iowrite32(0xffffffff, ioaddr + MulticastFilter0);
+		iowrite32(0xffffffff, ioaddr + MulticastFilter1);
 	} else if ((dev->mc_count > multicast_filter_limit)
 		   || (dev->flags & IFF_ALLMULTI)) {
 		/* Too many to match, or accept all multicasts. */
-		writel(0xffffffff, ioaddr + MulticastFilter0);
-		writel(0xffffffff, ioaddr + MulticastFilter1);
+		iowrite32(0xffffffff, ioaddr + MulticastFilter0);
+		iowrite32(0xffffffff, ioaddr + MulticastFilter1);
 		rx_mode = 0x0C;
 	} else {
 		struct dev_mc_list *mclist;
@@ -1726,11 +1717,11 @@
 
 			mc_filter[bit_nr >> 5] |= 1 << (bit_nr & 31);
 		}
-		writel(mc_filter[0], ioaddr + MulticastFilter0);
-		writel(mc_filter[1], ioaddr + MulticastFilter1);
+		iowrite32(mc_filter[0], ioaddr + MulticastFilter0);
+		iowrite32(mc_filter[1], ioaddr + MulticastFilter1);
 		rx_mode = 0x0C;
 	}
-	writeb(rp->rx_thresh | rx_mode, ioaddr + RxConfig);
+	iowrite8(rp->rx_thresh | rx_mode, ioaddr + RxConfig);
 }
 
 static void netdev_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
@@ -1854,8 +1845,8 @@
 
 static int rhine_close(struct net_device *dev)
 {
-	long ioaddr = dev->base_addr;
 	struct rhine_private *rp = netdev_priv(dev);
+	void __iomem *ioaddr = rp->base;
 
 	spin_lock_irq(&rp->lock);
 
@@ -1864,16 +1855,16 @@
 	if (debug > 1)
 		printk(KERN_DEBUG "%s: Shutting down ethercard, "
 		       "status was %4.4x.\n",
-		       dev->name, readw(ioaddr + ChipCmd));
+		       dev->name, ioread16(ioaddr + ChipCmd));
 
 	/* Switch to loopback mode to avoid hardware races. */
-	writeb(rp->tx_thresh | 0x02, ioaddr + TxConfig);
+	iowrite8(rp->tx_thresh | 0x02, ioaddr + TxConfig);
 
 	/* Disable interrupts by clearing the interrupt mask. */
-	writew(0x0000, ioaddr + IntrEnable);
+	iowrite16(0x0000, ioaddr + IntrEnable);
 
 	/* Stop the chip's Tx and Rx processes. */
-	writew(CmdStop, ioaddr + ChipCmd);
+	iowrite16(CmdStop, ioaddr + ChipCmd);
 
 	spin_unlock_irq(&rp->lock);
 
@@ -1889,15 +1880,13 @@
 static void __devexit rhine_remove_one(struct pci_dev *pdev)
 {
 	struct net_device *dev = pci_get_drvdata(pdev);
+	struct rhine_private *rp = netdev_priv(dev);
 
 	unregister_netdev(dev);
 
+	pci_iounmap(pdev, rp->base);
 	pci_release_regions(pdev);
 
-#ifdef USE_MMIO
-	iounmap((char *)(dev->base_addr));
-#endif
-
 	free_netdev(dev);
 	pci_disable_device(pdev);
 	pci_set_drvdata(pdev, NULL);
@@ -1908,33 +1897,40 @@
 	struct pci_dev *pdev = to_pci_dev(gendev);
 	struct net_device *dev = pci_get_drvdata(pdev);
 	struct rhine_private *rp = netdev_priv(dev);
-
-	long ioaddr = dev->base_addr;
+	void __iomem *ioaddr = rp->base;
 
 	rhine_power_init(dev);
 
 	/* Make sure we use pattern 0, 1 and not 4, 5 */
 	if (rp->quirks & rq6patterns)
-		writeb(0x04, ioaddr + 0xA7);
+		iowrite8(0x04, ioaddr + 0xA7);
 
-	if (rp->wolopts & WAKE_MAGIC)
-		writeb(WOLmagic, ioaddr + WOLcrSet);
+	if (rp->wolopts & WAKE_MAGIC) {
+		iowrite8(WOLmagic, ioaddr + WOLcrSet);
+		/*
+		 * Turn EEPROM-controlled wake-up back on -- some hardware may
+		 * not cooperate otherwise.
+		 */
+		iowrite8(ioread8(ioaddr + ConfigA) | 0x03, ioaddr + ConfigA);
+	}
 
 	if (rp->wolopts & (WAKE_BCAST|WAKE_MCAST))
-		writeb(WOLbmcast, ioaddr + WOLcgSet);
+		iowrite8(WOLbmcast, ioaddr + WOLcgSet);
 
 	if (rp->wolopts & WAKE_PHY)
-		writeb(WOLlnkon | WOLlnkoff, ioaddr + WOLcrSet);
+		iowrite8(WOLlnkon | WOLlnkoff, ioaddr + WOLcrSet);
 
 	if (rp->wolopts & WAKE_UCAST)
-		writeb(WOLucast, ioaddr + WOLcrSet);
+		iowrite8(WOLucast, ioaddr + WOLcrSet);
 
-	/* Enable legacy WOL (for old motherboards) */
-	writeb(0x01, ioaddr + PwcfgSet);
-	writeb(readb(ioaddr + StickyHW) | 0x04, ioaddr + StickyHW);
+	if (rp->wolopts) {
+		/* Enable legacy WOL (for old motherboards) */
+		iowrite8(0x01, ioaddr + PwcfgSet);
+		iowrite8(ioread8(ioaddr + StickyHW) | 0x04, ioaddr + StickyHW);
+	}
 
 	/* Hit power state D3 (sleep) */
-	writeb(readb(ioaddr + StickyHW) | 0x03, ioaddr + StickyHW);
+	iowrite8(ioread8(ioaddr + StickyHW) | 0x03, ioaddr + StickyHW);
 
 	/* TODO: Check use of pci_enable_wake() */
 
@@ -1974,7 +1970,7 @@
         if (request_irq(dev->irq, rhine_interrupt, SA_SHIRQ, dev->name, dev))
 		printk(KERN_ERR "via-rhine %s: request_irq failed\n", dev->name);
 
-	ret = pci_set_power_state(pdev, 0);
+	ret = pci_set_power_state(pdev, PCI_D0);
 	if (debug > 1)
 		printk(KERN_INFO "%s: Entering power state D0 %s (%d).\n",
 			dev->name, ret ? "failed" : "succeeded", ret);
diff -Nru a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c
--- a/drivers/net/via-velocity.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/net/via-velocity.c	2005-01-10 20:11:21 -08:00
@@ -100,8 +100,8 @@
 MODULE_DESCRIPTION("VIA Networking Velocity Family Gigabit Ethernet Adapter Driver");
 
 #define VELOCITY_PARAM(N,D) \
-        static const int N[MAX_UNITS]=OPTION_DEFAULT;\
-        MODULE_PARM(N, "1-" __MODULE_STRING(MAX_UNITS) "i");\
+        static int N[MAX_UNITS]=OPTION_DEFAULT;\
+	module_param_array(N, int, NULL, 0); \
         MODULE_PARM_DESC(N, D);
 
 #define RX_DESC_MIN     64
@@ -229,7 +229,7 @@
 VELOCITY_PARAM(int_works, "Number of packets per interrupt services");
 
 static int rx_copybreak = 200;
-MODULE_PARM(rx_copybreak, "i");
+module_param(rx_copybreak, int, 0644);
 MODULE_PARM_DESC(rx_copybreak, "Copy breakpoint for copy-only-tiny-frames");
 
 static void velocity_init_info(struct pci_dev *pdev, struct velocity_info *vptr, struct velocity_info_tbl *info);
@@ -804,7 +804,7 @@
 	
 	/* and leave the chip powered down */
 	
-	pci_set_power_state(pdev, 3);
+	pci_set_power_state(pdev, PCI_D3hot);
 #ifdef CONFIG_PM
 	{
 		unsigned long flags;
@@ -1742,7 +1742,7 @@
 		goto err_free_rd_ring;
 	
 	/* Ensure chip is running */	
-	pci_set_power_state(vptr->pdev, 0);
+	pci_set_power_state(vptr->pdev, PCI_D0);
 	
 	velocity_init_registers(vptr, VELOCITY_INIT_COLD);
 
@@ -1750,7 +1750,7 @@
 			  dev->name, dev);
 	if (ret < 0) {
 		/* Power down the chip */
-		pci_set_power_state(vptr->pdev, 3);
+		pci_set_power_state(vptr->pdev, PCI_D3hot);
 		goto err_free_td_ring;
 	}
 
@@ -1868,7 +1868,7 @@
 		free_irq(dev->irq, dev);
 		
 	/* Power down the chip */
-	pci_set_power_state(vptr->pdev, 3);
+	pci_set_power_state(vptr->pdev, PCI_D3hot);
 	
 	/* Free the resources */
 	velocity_free_td_ring(vptr);
@@ -2194,8 +2194,8 @@
 	/* If we are asked for information and the device is power
 	   saving then we need to bring the device back up to talk to it */
 	   	
-	if(!netif_running(dev))
-		pci_set_power_state(vptr->pdev, 0);
+	if (!netif_running(dev))
+		pci_set_power_state(vptr->pdev, PCI_D0);
 		
 	switch (cmd) {
 	case SIOCGMIIPHY:	/* Get address of MII PHY in use. */
@@ -2207,8 +2207,8 @@
 	default:
 		ret = -EOPNOTSUPP;
 	}
-	if(!netif_running(dev))
-		pci_set_power_state(vptr->pdev, 3);
+	if (!netif_running(dev))
+		pci_set_power_state(vptr->pdev, PCI_D3hot);
 		
 		
 	return ret;
@@ -2818,8 +2818,8 @@
 static int velocity_ethtool_up(struct net_device *dev)
 {
 	struct velocity_info *vptr = dev->priv;
-	if(!netif_running(dev))
-		pci_set_power_state(vptr->pdev, 0);
+	if (!netif_running(dev))
+		pci_set_power_state(vptr->pdev, PCI_D0);
 	return 0;
 }	
 
@@ -2834,8 +2834,8 @@
 static void velocity_ethtool_down(struct net_device *dev)
 {
 	struct velocity_info *vptr = dev->priv;
-	if(!netif_running(dev))
-		pci_set_power_state(vptr->pdev, 3);
+	if (!netif_running(dev))
+		pci_set_power_state(vptr->pdev, PCI_D3hot);
 }
 
 static int velocity_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
@@ -3229,15 +3229,15 @@
 		velocity_shutdown(vptr);
 		velocity_set_wol(vptr);
 		pci_enable_wake(pdev, 3, 1);
-		pci_set_power_state(pdev, 3);
+		pci_set_power_state(pdev, PCI_D3hot);
 	} else {
 		velocity_save_context(vptr, &vptr->context);
 		velocity_shutdown(vptr);
 		pci_disable_device(pdev);
-		pci_set_power_state(pdev, state);
+		pci_set_power_state(pdev, pci_choose_state(pdev, state));
 	}
 #else
-	pci_set_power_state(pdev, state);
+	pci_set_power_state(pdev, pci_choose_state(pdev, state));
 #endif
 	spin_unlock_irqrestore(&vptr->lock, flags);
 	return 0;
@@ -3252,7 +3252,7 @@
 	if(!netif_running(vptr->dev))
 		return 0;
 
-	pci_set_power_state(pdev, 0);
+	pci_set_power_state(pdev, PCI_D0);
 	pci_enable_wake(pdev, 0, 0);
 	pci_restore_state(pdev);
 
diff -Nru a/drivers/net/via-velocity.h b/drivers/net/via-velocity.h
--- a/drivers/net/via-velocity.h	2005-01-10 20:11:23 -08:00
+++ b/drivers/net/via-velocity.h	2005-01-10 20:11:23 -08:00
@@ -291,10 +291,10 @@
 	dma_addr_t buf_dma;
 };
 
-enum {
+enum  velocity_owner {
 	OWNED_BY_HOST = 0,
 	OWNED_BY_NIC = 1
-} velocity_owner;
+};
 
 
 /*
diff -Nru a/drivers/net/wan/c101.c b/drivers/net/wan/c101.c
--- a/drivers/net/wan/c101.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/net/wan/c101.c	2005-01-10 20:11:21 -08:00
@@ -113,9 +113,6 @@
 }
 
 
-#define close_windows(card) {} /* no hardware support */
-
-
 #include "hd6457x.c"
 
 
diff -Nru a/drivers/net/wan/cosa.c b/drivers/net/wan/cosa.c
--- a/drivers/net/wan/cosa.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/net/wan/cosa.c	2005-01-10 20:11:15 -08:00
@@ -238,11 +238,11 @@
 static struct class_simple *cosa_class;
 
 #ifdef MODULE
-MODULE_PARM(io, "1-" __MODULE_STRING(MAX_CARDS) "i");
+module_param_array(io, int, NULL, 0);
 MODULE_PARM_DESC(io, "The I/O bases of the COSA or SRP cards");
-MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_CARDS) "i");
+module_param_array(irq, int, NULL, 0);
 MODULE_PARM_DESC(irq, "The IRQ lines of the COSA or SRP cards");
-MODULE_PARM(dma, "1-" __MODULE_STRING(MAX_CARDS) "i");
+module_param_array(dma, int, NULL, 0);
 MODULE_PARM_DESC(dma, "The DMA channels of the COSA or SRP cards");
 
 MODULE_AUTHOR("Jan \"Yenya\" Kasprzak, <kas@fi.muni.cz>");
@@ -642,11 +642,11 @@
 		return;
 	}
 	chan->pppdev.dev = d;
-	sppp_attach(&chan->pppdev);
 	d->base_addr = chan->cosa->datareg;
 	d->irq = chan->cosa->irq;
 	d->dma = chan->cosa->dma;
 	d->priv = chan;
+	sppp_attach(&chan->pppdev);
 	if (register_netdev(d)) {
 		printk(KERN_WARNING "%s: register_netdev failed.\n", d->name);
 		sppp_detach(d);
diff -Nru a/drivers/net/wan/cosa.h b/drivers/net/wan/cosa.h
--- a/drivers/net/wan/cosa.h	2005-01-10 20:11:24 -08:00
+++ b/drivers/net/wan/cosa.h	2005-01-10 20:11:24 -08:00
@@ -76,10 +76,16 @@
 #define COSAIOSTRT	_IOW('C',0xf1, int)
 
 /* Read the block from the device memory */
-#define COSAIORMEM	_IOWR('C',0xf2, struct cosa_download)
+#define COSAIORMEM	_IOWR('C',0xf2, struct cosa_download *)
+	/* actually the struct cosa_download itself; this is to keep
+	 * the ioctl number same as in 2.4 in order to keep the user-space
+	 * utils compatible. */
 
 /* Write the block to the device memory (i.e. download the microcode) */
-#define COSAIODOWNLD	_IOW('C',0xf2, struct cosa_download)
+#define COSAIODOWNLD	_IOW('C',0xf2, struct cosa_download *)
+	/* actually the struct cosa_download itself; this is to keep
+	 * the ioctl number same as in 2.4 in order to keep the user-space
+	 * utils compatible. */
 
 /* Read the device type (one of "srp", "cosa", and "cosa8" for now) */
 #define COSAIORTYPE	_IOR('C',0xf3, char *)
diff -Nru a/drivers/net/wan/cycx_main.c b/drivers/net/wan/cycx_main.c
--- a/drivers/net/wan/cycx_main.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/net/wan/cycx_main.c	2005-01-10 20:11:19 -08:00
@@ -57,7 +57,7 @@
 MODULE_AUTHOR("Arnaldo Carvalho de Melo");
 MODULE_DESCRIPTION("Cyclom 2X Sync Card Driver.");
 MODULE_LICENSE("GPL");
-MODULE_PARM(cycx_debug, "i");
+module_param(cycx_debug, int, 0);
 MODULE_PARM_DESC(cycx_debug, "cyclomx debug level");
 
 /* Defines & Macros */
diff -Nru a/drivers/net/wan/dscc4.c b/drivers/net/wan/dscc4.c
--- a/drivers/net/wan/dscc4.c	2005-01-10 20:11:24 -08:00
+++ b/drivers/net/wan/dscc4.c	2005-01-10 20:11:24 -08:00
@@ -125,9 +125,9 @@
 MODULE_AUTHOR("Maintainer: Francois Romieu <romieu@cogenit.fr>");
 MODULE_DESCRIPTION("Siemens PEB20534 PCI Controler");
 MODULE_LICENSE("GPL");
-MODULE_PARM(debug,"i");
+module_param(debug, int, 0);
 MODULE_PARM_DESC(debug,"Enable/disable extra messages");
-MODULE_PARM(quartz,"i");
+module_param(quartz, int, 0);
 MODULE_PARM_DESC(quartz,"If present, on-board quartz frequency (Hz)");
 
 /* Structures */
diff -Nru a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c
--- a/drivers/net/wan/farsync.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/net/wan/farsync.c	2005-01-10 20:11:21 -08:00
@@ -33,11 +33,6 @@
  */
 MODULE_AUTHOR("R.J.Dunlop <bob.dunlop@farsite.co.uk>");
 MODULE_DESCRIPTION("FarSync T-Series WAN driver. FarSite Communications Ltd.");
-MODULE_PARM(fst_txq_low, "i");
-MODULE_PARM(fst_txq_high, "i");
-MODULE_PARM(fst_max_reads, "i");
-MODULE_PARM(fst_excluded_cards, "i");
-MODULE_PARM(fst_excluded_list, "0-32i");
 MODULE_LICENSE("GPL");
 
 /*      Driver configuration and global parameters
@@ -84,6 +79,12 @@
 int fst_max_reads = 7;
 int fst_excluded_cards = 0;
 int fst_excluded_list[FST_MAX_CARDS];
+
+module_param(fst_txq_low, int, 0);
+module_param(fst_txq_high, int, 0);
+module_param(fst_max_reads, int, 0);
+module_param(fst_excluded_cards, int, 0);
+module_param_array(fst_excluded_list, int, NULL, 0);
 
 /*      Card shared memory layout
  *      =========================
diff -Nru a/drivers/net/wan/hostess_sv11.c b/drivers/net/wan/hostess_sv11.c
--- a/drivers/net/wan/hostess_sv11.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/net/wan/hostess_sv11.c	2005-01-10 20:11:21 -08:00
@@ -263,7 +263,7 @@
 	/* We want a fast IRQ for this device. Actually we'd like an even faster
 	   IRQ ;) - This is one driver RtLinux is made for */
 	   
-	if(request_irq(irq, &z8530_interrupt, SA_INTERRUPT, "Hostess SV/11", dev)<0)
+	if(request_irq(irq, &z8530_interrupt, SA_INTERRUPT, "Hostess SV11", dev)<0)
 	{
 		printk(KERN_WARNING "hostess: IRQ %d already in use.\n", irq);
 		goto fail1;
@@ -388,11 +388,11 @@
 static int io=0x200;
 static int irq=9;
 
-MODULE_PARM(io,"i");
+module_param(io, int, 0);
 MODULE_PARM_DESC(io, "The I/O base of the Comtrol Hostess SV11 card");
-MODULE_PARM(dma,"i");
+module_param(dma, int, 0);
 MODULE_PARM_DESC(dma, "Set this to 1 to use DMA1/DMA3 for TX/RX");
-MODULE_PARM(irq,"i");
+module_param(irq, int, 0);
 MODULE_PARM_DESC(irq, "The interrupt line setting for the Comtrol Hostess SV11 card");
 
 MODULE_AUTHOR("Alan Cox");
diff -Nru a/drivers/net/wan/n2.c b/drivers/net/wan/n2.c
--- a/drivers/net/wan/n2.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/net/wan/n2.c	2005-01-10 20:11:17 -08:00
@@ -159,11 +159,6 @@
 }
 
 
-static __inline__ void close_windows(card_t *card)
-{
-	outb(inb(card->io + N2_PCR) & ~PCR_ENWIN, card->io + N2_PCR);
-}
-
 
 #include "hd6457x.c"
 
diff -Nru a/drivers/net/wan/pc300_drv.c b/drivers/net/wan/pc300_drv.c
--- a/drivers/net/wan/pc300_drv.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/net/wan/pc300_drv.c	2005-01-10 20:11:22 -08:00
@@ -1776,7 +1776,7 @@
 	pc300_t *card = (pc300_t *) chan->card;
 	struct net_device_stats *stats = hdlc_stats(dev);
 	int ch = chan->channel;
-	uclong flags;
+	unsigned long flags;
 	ucchar ilar;
 
 	stats->tx_errors++;
@@ -1804,7 +1804,7 @@
 	pc300_t *card = (pc300_t *) chan->card;
 	struct net_device_stats *stats = hdlc_stats(dev);
 	int ch = chan->channel;
-	uclong flags;
+	unsigned long flags;
 #ifdef PC300_DEBUG_TX
 	int i;
 #endif
@@ -2407,7 +2407,7 @@
 {
 	ucchar ilar;
 	void __iomem *scabase = card->hw.scabase;
-	uclong flags;
+	unsigned long flags;
 
 	tx_dma_buf_check(card, ch);
 	rx_dma_buf_check(card, ch);
@@ -2499,7 +2499,7 @@
 {
 	pc300ch_t *chan = &card->chan[ch];
 	falc_t *pfalc = (falc_t *) & chan->falc;
-	uclong flags;
+	unsigned long flags;
 
 	CPC_LOCK(card, flags);
 	printk("CH%d:   %s %s  %d channels\n",
@@ -3179,7 +3179,7 @@
 	pc300dev_t *d = (pc300dev_t *) dev->priv;
 	pc300ch_t *chan = (pc300ch_t *) d->chan;
 	pc300_t *card = (pc300_t *) chan->card;
-	uclong flags;
+	unsigned long flags;
 
 #ifdef	PC300_DEBUG_OTHER
 	printk("pc300: cpc_close");
diff -Nru a/drivers/net/wan/sbni.c b/drivers/net/wan/sbni.c
--- a/drivers/net/wan/sbni.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/net/wan/sbni.c	2005-01-10 20:11:18 -08:00
@@ -1485,14 +1485,12 @@
 
 
 #ifdef MODULE
-
-MODULE_PARM(	io,	"1-" __MODULE_STRING( SBNI_MAX_NUM_CARDS ) "i" );
-MODULE_PARM(	irq,	"1-" __MODULE_STRING( SBNI_MAX_NUM_CARDS ) "i" );
-MODULE_PARM(	baud,	"1-" __MODULE_STRING( SBNI_MAX_NUM_CARDS ) "i" );
-MODULE_PARM(	rxl,	"1-" __MODULE_STRING( SBNI_MAX_NUM_CARDS ) "i" );
-MODULE_PARM(	mac,	"1-" __MODULE_STRING( SBNI_MAX_NUM_CARDS ) "i" );
-
-MODULE_PARM(	skip_pci_probe,	"i" );
+module_param_array(io, int, NULL, 0);
+module_param_array(irq, int, NULL, 0);
+module_param_array(baud, int, NULL, 0);
+module_param_array(rxl, int, NULL, 0);
+module_param_array(mac, int, NULL, 0);
+module_param(skip_pci_probe, bool, 0);
 
 MODULE_LICENSE("GPL");
 
diff -Nru a/drivers/net/wan/sdla.c b/drivers/net/wan/sdla.c
--- a/drivers/net/wan/sdla.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/net/wan/sdla.c	2005-01-10 20:11:23 -08:00
@@ -1306,6 +1306,8 @@
 
 		case SDLA_WRITEMEM:
 		case SDLA_READMEM:
+			if(!capable(CAP_SYS_RAWIO))
+				return -EPERM;
 			return(sdla_xfer(dev, ifr->ifr_data, cmd == SDLA_READMEM));
 
 		case SDLA_START:
diff -Nru a/drivers/net/wan/sealevel.c b/drivers/net/wan/sealevel.c
--- a/drivers/net/wan/sealevel.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/net/wan/sealevel.c	2005-01-10 20:11:20 -08:00
@@ -431,15 +431,15 @@
 static int irq=5;
 static int slow=0;
 
-MODULE_PARM(io,"i");
+module_param(io, int, 0);
 MODULE_PARM_DESC(io, "The I/O base of the Sealevel card");
-MODULE_PARM(txdma,"i");
+module_param(txdma, int, 0);
 MODULE_PARM_DESC(txdma, "Transmit DMA channel");
-MODULE_PARM(rxdma,"i");
+module_param(rxdma, int, 0);
 MODULE_PARM_DESC(rxdma, "Receive DMA channel");
-MODULE_PARM(irq,"i");
+module_param(irq, int, 0);
 MODULE_PARM_DESC(irq, "The interrupt line setting for the SeaLevel card");
-MODULE_PARM(slow,"i");
+module_param(slow, bool, 0);
 MODULE_PARM_DESC(slow, "Set this for an older Sealevel card such as the 4012");
 
 MODULE_AUTHOR("Alan Cox");
diff -Nru a/drivers/net/wan/syncppp.c b/drivers/net/wan/syncppp.c
--- a/drivers/net/wan/syncppp.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/net/wan/syncppp.c	2005-01-10 20:11:17 -08:00
@@ -1483,6 +1483,6 @@
 
 module_init(sync_ppp_init);
 module_exit(sync_ppp_cleanup);
-MODULE_PARM(debug,"1i");
+module_param(debug, int, 0);
 MODULE_LICENSE("GPL");
 
diff -Nru a/drivers/net/wan/x25_asy.c b/drivers/net/wan/x25_asy.c
--- a/drivers/net/wan/x25_asy.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/net/wan/x25_asy.c	2005-01-10 20:11:17 -08:00
@@ -39,7 +39,7 @@
 static struct net_device **x25_asy_devs;
 static int x25_asy_maxdev = SL_NRUNIT;
 
-MODULE_PARM(x25_asy_maxdev, "i");
+module_param(x25_asy_maxdev, int, 0);
 MODULE_LICENSE("GPL");
 
 static int x25_asy_esc(unsigned char *p, unsigned char *d, int len);
diff -Nru a/drivers/net/wd.c b/drivers/net/wd.c
--- a/drivers/net/wd.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/net/wd.c	2005-01-10 20:11:16 -08:00
@@ -487,10 +487,10 @@
 static int mem[MAX_WD_CARDS];
 static int mem_end[MAX_WD_CARDS];	/* for non std. mem size */
 
-MODULE_PARM(io, "1-" __MODULE_STRING(MAX_WD_CARDS) "i");
-MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_WD_CARDS) "i");
-MODULE_PARM(mem, "1-" __MODULE_STRING(MAX_WD_CARDS) "i");
-MODULE_PARM(mem_end, "1-" __MODULE_STRING(MAX_WD_CARDS) "i");
+module_param_array(io, int, NULL, 0);
+module_param_array(irq, int, NULL, 0);
+module_param_array(mem, int, NULL, 0);
+module_param_array(mem_end, int, NULL, 0);
 MODULE_PARM_DESC(io, "I/O base address(es)");
 MODULE_PARM_DESC(irq, "IRQ number(s) (ignored for PureData boards)");
 MODULE_PARM_DESC(mem, "memory base address(es)(ignored for PureData boards)");
diff -Nru a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig
--- a/drivers/net/wireless/Kconfig	2005-01-10 20:11:17 -08:00
+++ b/drivers/net/wireless/Kconfig	2005-01-10 20:11:17 -08:00
@@ -311,7 +311,7 @@
 	depends on NET_RADIO && PCI
 config PRISM54
 	tristate 'Intersil Prism GT/Duette/Indigo PCI/Cardbus' 
-	depends on PCI && NET_RADIO && EXPERIMENTAL && HOTPLUG
+	depends on PCI && NET_RADIO && EXPERIMENTAL
 	select FW_LOADER
 	---help---
 	  Enable PCI and Cardbus support for the following chipset based cards:
diff -Nru a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
--- a/drivers/net/wireless/airo.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/net/wireless/airo.c	2005-01-10 20:11:16 -08:00
@@ -246,36 +246,36 @@
 		   for PCMCIA when used with airo_cs.");
 MODULE_LICENSE("Dual BSD/GPL");
 MODULE_SUPPORTED_DEVICE("Aironet 4500, 4800 and Cisco 340/350");
-MODULE_PARM(io,"1-4i");
-MODULE_PARM(irq,"1-4i");
-MODULE_PARM(basic_rate,"i");
-MODULE_PARM(rates,"1-8i");
-MODULE_PARM(ssids,"1-3s");
-MODULE_PARM(auto_wep,"i");
+module_param_array(io, int, NULL, 0);
+module_param_array(irq, int, NULL, 0);
+module_param(basic_rate, int, 0);
+module_param_array(rates, int, NULL, 0);
+module_param_array(ssids, charp, NULL, 0);
+module_param(auto_wep, int, 0);
 MODULE_PARM_DESC(auto_wep, "If non-zero, the driver will keep looping through \
 the authentication options until an association is made.  The value of \
 auto_wep is number of the wep keys to check.  A value of 2 will try using \
 the key at index 0 and index 1.");
-MODULE_PARM(aux_bap,"i");
+module_param(aux_bap, int, 0);
 MODULE_PARM_DESC(aux_bap, "If non-zero, the driver will switch into a mode \
 than seems to work better for older cards with some older buses.  Before \
 switching it checks that the switch is needed.");
-MODULE_PARM(maxencrypt, "i");
+module_param(maxencrypt, int, 0);
 MODULE_PARM_DESC(maxencrypt, "The maximum speed that the card can do \
 encryption.  Units are in 512kbs.  Zero (default) means there is no limit. \
 Older cards used to be limited to 2mbs (4).");
-MODULE_PARM(adhoc, "i");
+module_param(adhoc, int, 0);
 MODULE_PARM_DESC(adhoc, "If non-zero, the card will start in adhoc mode.");
-MODULE_PARM(probe, "i");
+module_param(probe, int, 0);
 MODULE_PARM_DESC(probe, "If zero, the driver won't start the card.");
 
-MODULE_PARM(proc_uid, "i");
+module_param(proc_uid, int, 0);
 MODULE_PARM_DESC(proc_uid, "The uid that the /proc files will belong to.");
-MODULE_PARM(proc_gid, "i");
+module_param(proc_gid, int, 0);
 MODULE_PARM_DESC(proc_gid, "The gid that the /proc files will belong to.");
-MODULE_PARM(airo_perm, "i");
+module_param(airo_perm, int, 0);
 MODULE_PARM_DESC(airo_perm, "The permission bits of /proc/[driver/]aironet.");
-MODULE_PARM(proc_perm, "i");
+module_param(proc_perm, int, 0);
 MODULE_PARM_DESC(proc_perm, "The permission bits of the files in /proc");
 
 /* This is a kind of sloppy hack to get this information to OUT4500 and
@@ -970,7 +970,7 @@
  * Host receive descriptor
  */
 typedef struct {
-	unsigned char *card_ram_off;	     /* offset into card memory of the
+	unsigned char __iomem *card_ram_off; /* offset into card memory of the
 						desc */
 	RxFid         rx_desc;		     /* card receive descriptor */
 	char          *virtual_host_addr;    /* virtual address of host receive
@@ -982,7 +982,7 @@
  * Host transmit descriptor
  */
 typedef struct {
-	unsigned char *card_ram_off;	     /* offset into card memory of the
+	unsigned char __iomem *card_ram_off;	     /* offset into card memory of the
 						desc */
 	TxFid         tx_desc;		     /* card transmit descriptor */
 	char          *virtual_host_addr;    /* virtual address of host receive
@@ -994,7 +994,7 @@
  * Host RID descriptor
  */
 typedef struct {
-	unsigned char *card_ram_off;      /* offset into card memory of the
+	unsigned char __iomem *card_ram_off;      /* offset into card memory of the
 					     descriptor */
 	Rid           rid_desc;		  /* card RID descriptor */
 	char          *virtual_host_addr; /* virtual address of host receive
@@ -1203,8 +1203,8 @@
 	unsigned long ridbus; // phys addr of config_desc
 	struct sk_buff_head txq;// tx queue used by mpi350 code
 	struct pci_dev          *pci;
-	unsigned char		*pcimem;
-	unsigned char		*pciaux;
+	unsigned char		__iomem *pcimem;
+	unsigned char		__iomem *pciaux;
 	unsigned char		*shared;
 	dma_addr_t		shared_dma;
 	int			power;
@@ -2029,8 +2029,8 @@
 		memcpy(sendbuf, buffer, len);
 	}
 
-	memcpy((char *)ai->txfids[0].card_ram_off,
-		(char *)&ai->txfids[0].tx_desc, sizeof(TxFid));
+	memcpy_toio(ai->txfids[0].card_ram_off,
+		&ai->txfids[0].tx_desc, sizeof(TxFid));
 
 	OUT4500(ai, EVACK, 8);
 
@@ -2460,7 +2460,7 @@
 	}
 
 	for (i=0; i<MPI_MAX_FIDS; i++) {
-		memcpy(ai->rxfids[i].card_ram_off,
+		memcpy_toio(ai->rxfids[i].card_ram_off,
 			&ai->rxfids[i].rx_desc, sizeof(RxFid));
 	}
 
@@ -2476,7 +2476,7 @@
 
 	for (i=0; i<MPI_MAX_FIDS; i++) {
 		ai->txfids[i].tx_desc.valid = 1;
-		memcpy((char *)ai->txfids[i].card_ram_off,
+		memcpy_toio(ai->txfids[i].card_ram_off,
 			&ai->txfids[i].tx_desc, sizeof(TxFid));
 	}
 	ai->txfids[i-1].tx_desc.eoc = 1; /* Last descriptor has EOC set */
@@ -2501,8 +2501,8 @@
 		return rc;
 	}
 
-	memcpy((char *)ai->config_desc.card_ram_off,
-		(char *)&ai->config_desc.rid_desc, sizeof(Rid));
+	memcpy_toio(ai->config_desc.card_ram_off,
+		&ai->config_desc.rid_desc, sizeof(Rid));
 
 	return rc;
 }
@@ -2520,7 +2520,7 @@
 	int rc = -1;
 	int i;
 	unsigned char *busaddroff,*vpackoff;
-	unsigned char *pciaddroff;
+	unsigned char __iomem *pciaddroff;
 
 	mem_start = pci_resource_start(pci, 1);
 	mem_len = pci_resource_len(pci, 1);
@@ -3441,7 +3441,7 @@
 	MICBuffer micbuf;
 #endif
 
-	memcpy ((char *)&rxd, ai->rxfids[0].card_ram_off, sizeof(rxd));
+	memcpy_fromio(&rxd, ai->rxfids[0].card_ram_off, sizeof(rxd));
 	/* Make sure we got something */
 	if (rxd.rdy && rxd.valid == 0) {
 		len = rxd.len + 12;
@@ -3504,7 +3504,7 @@
 		rxd.valid = 1;
 		rxd.rdy = 0;
 		rxd.len = PKTSIZE;
-		memcpy (ai->rxfids[0].card_ram_off, (char *)&rxd, sizeof(rxd));
+		memcpy_toio(ai->rxfids[0].card_ram_off, &rxd, sizeof(rxd));
 	}
 }
 
@@ -3526,7 +3526,7 @@
 	u16 *buffer;
 	char *ptr = ai->rxfids[0].virtual_host_addr+4;
 
-	memcpy ((char *)&rxd, ai->rxfids[0].card_ram_off, sizeof(rxd));
+	memcpy_fromio(&rxd, ai->rxfids[0].card_ram_off, sizeof(rxd));
 	memcpy ((char *)&hdr, ptr, sizeof(hdr));
 	ptr += sizeof(hdr);
 	/* Bad CRC. Ignore packet */
@@ -3610,7 +3610,7 @@
 		rxd.valid = 1;
 		rxd.rdy = 0;
 		rxd.len = PKTSIZE;
-		memcpy (ai->rxfids[0].card_ram_off, (char *)&rxd, sizeof(rxd));
+		memcpy_toio(ai->rxfids[0].card_ram_off, &rxd, sizeof(rxd));
 	}
 }
 
@@ -3990,8 +3990,8 @@
 		cmd.cmd = CMD_ACCESS;
 		cmd.parm0 = rid;
 
-		memcpy((char *)ai->config_desc.card_ram_off,
-			(char *)&ai->config_desc.rid_desc, sizeof(Rid));
+		memcpy_toio(ai->config_desc.card_ram_off,
+			&ai->config_desc.rid_desc, sizeof(Rid));
 
 		rc = issuecommand(ai, &cmd, &rsp);
 
@@ -4062,8 +4062,8 @@
 		cmd.cmd = CMD_WRITERID;
 		cmd.parm0 = rid;
 
-		memcpy((char *)ai->config_desc.card_ram_off,
-			(char *)&ai->config_desc.rid_desc, sizeof(Rid));
+		memcpy_toio(ai->config_desc.card_ram_off,
+			&ai->config_desc.rid_desc, sizeof(Rid));
 
 		if (len < 4 || len > 2047) {
 			printk(KERN_ERR "%s: len=%d\n",__FUNCTION__,len);
@@ -7591,7 +7591,7 @@
 
 	/* Write stuff */
 	if (test_bit(FLAG_MPI,&ai->flags))
-		memcpy(ai->pciaux + 0x8000, ai->flash, FLASHSIZE);
+		memcpy_toio(ai->pciaux + 0x8000, ai->flash, FLASHSIZE);
 	else {
 		OUT4500(ai,AUXPAGE,0x100);
 		OUT4500(ai,AUXOFF,0);
diff -Nru a/drivers/net/wireless/airo_cs.c b/drivers/net/wireless/airo_cs.c
--- a/drivers/net/wireless/airo_cs.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/net/wireless/airo_cs.c	2005-01-10 20:11:21 -08:00
@@ -52,7 +52,7 @@
 */
 #ifdef PCMCIA_DEBUG
 static int pc_debug = PCMCIA_DEBUG;
-MODULE_PARM(pc_debug, "i");
+module_param(pc_debug, int, 0);
 static char *version = "$Revision: 1.2 $";
 #define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args);
 #else
@@ -75,8 +75,8 @@
 		   with the airo module.");
 MODULE_LICENSE("Dual BSD/GPL");
 MODULE_SUPPORTED_DEVICE("Aironet 4500, 4800 and Cisco 340 PCMCIA cards");
-MODULE_PARM(irq_mask, "i");
-MODULE_PARM(irq_list, "1-4i");
+module_param(irq_mask, int, 0);
+module_param_array(irq_list, int, NULL, 0);
 
 /*====================================================================*/
 
diff -Nru a/drivers/net/wireless/arlan-main.c b/drivers/net/wireless/arlan-main.c
--- a/drivers/net/wireless/arlan-main.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/net/wireless/arlan-main.c	2005-01-10 20:11:20 -08:00
@@ -39,35 +39,32 @@
 static int irq = irqUNKNOWN;
 static int txScrambled = 1;
 static int mdebug;
-#endif
 
-MODULE_PARM(irq, "i");
-MODULE_PARM(mem, "i");
-MODULE_PARM(arlan_debug, "i");
-MODULE_PARM(testMemory, "i");
-MODULE_PARM(spreadingCode, "i");
-MODULE_PARM(channelNumber, "i");
-MODULE_PARM(channelSet, "i");
-MODULE_PARM(systemId, "i");
-MODULE_PARM(registrationMode, "i");
-MODULE_PARM(radioNodeId, "i");
-MODULE_PARM(SID, "i");
-MODULE_PARM(txScrambled, "i");
-MODULE_PARM(keyStart, "i");
-MODULE_PARM(mdebug, "i");
-MODULE_PARM(tx_delay_ms, "i");
-MODULE_PARM(retries, "i");
-MODULE_PARM(async, "i");
-MODULE_PARM(tx_queue_len, "i");
-MODULE_PARM(arlan_entry_debug, "i");
-MODULE_PARM(arlan_exit_debug, "i");
-MODULE_PARM(arlan_entry_and_exit_debug, "i");
-MODULE_PARM(arlan_EEPROM_bad, "i");
+module_param(irq, int, 0);
+module_param(mdebug, int, 0);
+module_param(testMemory, int, 0);
+module_param(arlan_entry_debug, int, 0);
+module_param(arlan_exit_debug, int, 0);
+module_param(txScrambled, int, 0);
 MODULE_PARM_DESC(irq, "(unused)");
-MODULE_PARM_DESC(mem, "Arlan memory address for single device probing");
-MODULE_PARM_DESC(arlan_debug, "Arlan debug enable (0-1)");
 MODULE_PARM_DESC(testMemory, "(unused)");
 MODULE_PARM_DESC(mdebug, "Arlan multicast debugging (0-1)");
+#endif
+
+module_param(arlan_debug, int, 0);
+module_param(spreadingCode, int, 0);
+module_param(channelNumber, int, 0);
+module_param(channelSet, int, 0);
+module_param(systemId, int, 0);
+module_param(registrationMode, int, 0);
+module_param(radioNodeId, int, 0);
+module_param(SID, int, 0);
+module_param(keyStart, int, 0);
+module_param(tx_delay_ms, int, 0);
+module_param(retries, int, 0);
+module_param(tx_queue_len, int, 0);
+module_param(arlan_EEPROM_bad, int, 0);
+MODULE_PARM_DESC(arlan_debug, "Arlan debug enable (0-1)");
 MODULE_PARM_DESC(retries, "Arlan maximum packet retransmisions");
 #ifdef ARLAN_ENTRY_EXIT_DEBUGGING
 MODULE_PARM_DESC(arlan_entry_debug, "Arlan driver function entry debugging");
@@ -129,7 +126,7 @@
 
 static inline int arlan_drop_tx(struct net_device *dev)
 {
-	struct arlan_private *priv = dev->priv;
+	struct arlan_private *priv = netdev_priv(dev);
 
 	priv->stats.tx_errors++;
 	if (priv->Conf->tx_delay_ms)
@@ -152,8 +149,8 @@
 
 int arlan_command(struct net_device *dev, int command_p)
 {
-	struct arlan_private *priv = dev->priv;
-	volatile struct arlan_shmem *arlan = priv->card;
+	struct arlan_private *priv = netdev_priv(dev);
+	volatile struct arlan_shmem __iomem *arlan = priv->card;
 	struct arlan_conf_stru *conf = priv->Conf;
 	int udelayed = 0;
 	int i = 0;
@@ -368,7 +365,7 @@
 		if (!registrationBad(dev))
 		{
 			setInterruptEnable(dev);
-			memset_io((void *) arlan->commandParameter, 0, 0xf);
+			memset_io(arlan->commandParameter, 0, 0xf);
 			WRITESHMB(arlan->commandByte, ARLAN_COM_INT | ARLAN_COM_RX_ENABLE);
 			WRITESHMB(arlan->commandParameter[0], conf->rxParameter);
 			arlan_interrupt_lancpu(dev);
@@ -398,9 +395,9 @@
 					   priv->last_rx_int_ack_time + us2ticks(conf->rx_tweak2)))
 			{
 				setInterruptEnable(dev);
-				memset_io((void *) arlan->commandParameter, 0, 0xf);
+				memset_io(arlan->commandParameter, 0, 0xf);
 				WRITESHMB(arlan->commandByte, ARLAN_COM_TX_ENABLE | ARLAN_COM_INT);
-				memcpy_toio((void *) arlan->commandParameter, &TXLAST(dev), 14);
+				memcpy_toio(arlan->commandParameter, &TXLAST(dev), 14);
 //				for ( i=1 ; i < 15 ; i++) printk("%02x:",READSHMB(arlan->commandParameter[i]));
 				priv->tx_last_sent = jiffies;
 				arlan_interrupt_lancpu(dev);
@@ -481,7 +478,7 @@
 
 static inline void arlan_command_process(struct net_device *dev)
 {
-	struct arlan_private *priv = dev->priv;
+	struct arlan_private *priv = netdev_priv(dev);
 
 	int times = 0;
 	while (priv->waiting_command_mask && times < 8)
@@ -502,7 +499,7 @@
 
 static inline void arlan_retransmit_now(struct net_device *dev)
 {
-	struct arlan_private *priv = dev->priv;
+	struct arlan_private *priv = netdev_priv(dev);
 
 
 	ARLAN_DEBUG_ENTRY("arlan_retransmit_now");
@@ -540,7 +537,7 @@
 static void arlan_registration_timer(unsigned long data)
 {
 	struct net_device *dev = (struct net_device *) data;
-	struct arlan_private *priv = dev->priv;
+	struct arlan_private *priv = netdev_priv(dev);
 	int bh_mark_needed = 0;
 	int next_tick = 1;
 	long lostTime = ((long)jiffies - (long)priv->registrationLastSeen)
@@ -633,7 +630,7 @@
 
 static void arlan_print_registers(struct net_device *dev, int line)
 {
-	struct arlan_private *priv = dev->priv;
+	struct arlan_private *priv = netdev_priv(dev);
 	volatile struct arlan_shmem *arlan = priv->card;
 
 	u_char hostcpuLock, lancpuLock, controlRegister, cntrlRegImage,
@@ -663,8 +660,8 @@
 {
 	int i;
 
-	struct arlan_private *priv = dev->priv;
-	volatile struct arlan_shmem *arlan = priv->card;
+	struct arlan_private *priv = netdev_priv(dev);
+	volatile struct arlan_shmem __iomem *arlan = priv->card;
 	struct arlan_conf_stru *conf = priv->Conf;
 
 	int tailStarts = 0x800;
@@ -673,9 +670,9 @@
 
 	ARLAN_DEBUG_ENTRY("arlan_hw_tx");
 	if (TXHEAD(dev).offset)
-		headEnds = (((TXHEAD(dev).offset + TXHEAD(dev).length - (((int) arlan->txBuffer) - ((int) arlan))) / 64) + 1) * 64;
+		headEnds = (((TXHEAD(dev).offset + TXHEAD(dev).length - offsetof(struct arlan_shmem, txBuffer)) / 64) + 1) * 64;
 	if (TXTAIL(dev).offset)
-		tailStarts = 0x800 - (((TXTAIL(dev).offset - (((int) arlan->txBuffer) - ((int) arlan))) / 64) + 2) * 64;
+		tailStarts = 0x800 - (((TXTAIL(dev).offset - offsetof(struct arlan_shmem, txBuffer)) / 64) + 2) * 64;
 
 
 	if (!TXHEAD(dev).offset && length < tailStarts)
@@ -684,7 +681,7 @@
 			printk(KERN_ERR "TXHEAD insert, tailStart %d\n", tailStarts);
 
 		TXHEAD(dev).offset =
-			(((int) arlan->txBuffer) - ((int) arlan));
+			offsetof(struct arlan_shmem, txBuffer);
 		TXHEAD(dev).length = length - ARLAN_FAKE_HDR_LEN;
 		for (i = 0; i < 6; i++)
 			TXHEAD(dev).dest[i] = buf[i];
@@ -692,7 +689,7 @@
 		TXHEAD(dev).retries = conf->txRetries;	/* 0 is use default */
 		TXHEAD(dev).routing = conf->txRouting;
 		TXHEAD(dev).scrambled = conf->txScrambled;
-		memcpy_toio(((char *) arlan + TXHEAD(dev).offset), buf + ARLAN_FAKE_HDR_LEN, TXHEAD(dev).length);
+		memcpy_toio((char __iomem *)arlan + TXHEAD(dev).offset, buf + ARLAN_FAKE_HDR_LEN, TXHEAD(dev).length);
 	}
 	else if (!TXTAIL(dev).offset && length < (0x800 - headEnds))
 	{
@@ -700,7 +697,7 @@
 			printk(KERN_ERR "TXTAIL insert, headEnd %d\n", headEnds);
 
 		TXTAIL(dev).offset =
-			(((int) arlan->txBuffer) - ((int) arlan)) + 0x800 - (length / 64 + 2) * 64;
+			offsetof(struct arlan_shmem, txBuffer) + 0x800 - (length / 64 + 2) * 64;
 		TXTAIL(dev).length = length - ARLAN_FAKE_HDR_LEN;
 		for (i = 0; i < 6; i++)
 			TXTAIL(dev).dest[i] = buf[i];
@@ -708,7 +705,7 @@
 		TXTAIL(dev).retries = conf->txRetries;
 		TXTAIL(dev).routing = conf->txRouting;
 		TXTAIL(dev).scrambled = conf->txScrambled;
-		memcpy_toio(((char *) arlan + TXTAIL(dev).offset), buf + ARLAN_FAKE_HDR_LEN, TXTAIL(dev).length);
+		memcpy_toio(((char __iomem *)arlan + TXTAIL(dev).offset), buf + ARLAN_FAKE_HDR_LEN, TXTAIL(dev).length);
 	}
 	else
 	{
@@ -764,8 +761,8 @@
 
 static int arlan_hw_config(struct net_device *dev)
 {
-	struct arlan_private *priv = dev->priv;
-	volatile struct arlan_shmem *arlan = priv->card;
+	struct arlan_private *priv = netdev_priv(dev);
+	volatile struct arlan_shmem __iomem *arlan = priv->card;
 	struct arlan_conf_stru *conf = priv->Conf;
 
 	ARLAN_DEBUG_ENTRY("arlan_hw_config");
@@ -847,8 +844,8 @@
 static int arlan_read_card_configuration(struct net_device *dev)
 {
 	u_char tlx415;
-	struct arlan_private *priv = dev->priv;
-	volatile struct arlan_shmem *arlan = priv->card;
+	struct arlan_private *priv = netdev_priv(dev);
+	volatile struct arlan_shmem __iomem *arlan = priv->card;
 	struct arlan_conf_stru *conf = priv->Conf;
 
 	ARLAN_DEBUG_ENTRY("arlan_read_card_configuration");
@@ -972,7 +969,7 @@
 static int __init arlan_check_fingerprint(unsigned long memaddr)
 {
 	static const char probeText[] = "TELESYSTEM SLW INC.    ARLAN \0";
-	volatile struct arlan_shmem *arlan = (struct arlan_shmem *) memaddr;
+	volatile struct arlan_shmem __iomem *arlan = (struct arlan_shmem *) memaddr;
 	unsigned long paddr = virt_to_phys((void *) memaddr);
 	char tempBuf[49];
 
@@ -1000,7 +997,7 @@
 
 static int arlan_change_mtu(struct net_device *dev, int new_mtu)
 {
-	struct arlan_private *priv = dev->priv;
+	struct arlan_private *priv = netdev_priv(dev);
 	struct arlan_conf_stru *conf = priv->Conf;
 
 	ARLAN_DEBUG_ENTRY("arlan_change_mtu");
@@ -1040,7 +1037,7 @@
 
 static int __init arlan_setup_device(struct net_device *dev, int num)
 {
-	struct arlan_private *ap = dev->priv;
+	struct arlan_private *ap = netdev_priv(dev);
 	int err;
 
 	ARLAN_DEBUG_ENTRY("arlan_setup_device");
@@ -1081,7 +1078,7 @@
 static int __init arlan_probe_here(struct net_device *dev, 
 				   unsigned long memaddr)
 {
-	struct arlan_private *ap = dev->priv;
+	struct arlan_private *ap = netdev_priv(dev);
 
 	ARLAN_DEBUG_ENTRY("arlan_probe_here");
 
@@ -1110,8 +1107,8 @@
 
 static int arlan_open(struct net_device *dev)
 {
-	struct arlan_private *priv = dev->priv;
-	volatile struct arlan_shmem *arlan = priv->card;
+	struct arlan_private *priv = netdev_priv(dev);
+	volatile struct arlan_shmem __iomem *arlan = priv->card;
 	int ret = 0;
 
 	ARLAN_DEBUG_ENTRY("arlan_open");
@@ -1208,7 +1205,7 @@
 
 static inline int DoNotReTransmitCrap(struct net_device *dev)
 {
-	struct arlan_private *priv = dev->priv;
+	struct arlan_private *priv = netdev_priv(dev);
 
 	if (TXLAST(dev).length < priv->Conf->ReTransmitPacketMaxSize)
 		return 1;
@@ -1218,7 +1215,7 @@
 
 static inline int DoNotWaitReTransmitCrap(struct net_device *dev)
 {
-	struct arlan_private *priv = dev->priv;
+	struct arlan_private *priv = netdev_priv(dev);
 
 	if (TXLAST(dev).length < priv->Conf->waitReTransmitPacketMaxSize)
 		return 1;
@@ -1227,7 +1224,7 @@
 
 static inline void arlan_queue_retransmit(struct net_device *dev)
 {
-	struct arlan_private *priv = dev->priv;
+	struct arlan_private *priv = netdev_priv(dev);
 
 	ARLAN_DEBUG_ENTRY("arlan_queue_retransmit");
 
@@ -1242,7 +1239,7 @@
 
 static inline void RetryOrFail(struct net_device *dev)
 {
-	struct arlan_private *priv = dev->priv;
+	struct arlan_private *priv = netdev_priv(dev);
 
 	ARLAN_DEBUG_ENTRY("RetryOrFail");
 
@@ -1263,7 +1260,7 @@
 
 static void arlan_tx_done_interrupt(struct net_device *dev, int status)
 {
-	struct arlan_private *priv = dev->priv;
+	struct arlan_private *priv = netdev_priv(dev);
 
 	ARLAN_DEBUG_ENTRY("arlan_tx_done_interrupt");
 
@@ -1405,8 +1402,8 @@
 	char *skbtmp;
 	int i = 0;
 
-	struct arlan_private *priv = dev->priv;
-	volatile struct arlan_shmem *arlan = priv->card;
+	struct arlan_private *priv = netdev_priv(dev);
+	volatile struct arlan_shmem __iomem *arlan = priv->card;
 	struct arlan_conf_stru *conf = priv->Conf;
 
 
@@ -1509,7 +1506,7 @@
 			skb->dev = dev;
 			skbtmp = skb_put(skb, pkt_len);
 
-			memcpy_fromio(skbtmp + ARLAN_FAKE_HDR_LEN, ((char *) arlan) + rxOffset, pkt_len - ARLAN_FAKE_HDR_LEN);
+			memcpy_fromio(skbtmp + ARLAN_FAKE_HDR_LEN, ((char __iomem *) arlan) + rxOffset, pkt_len - ARLAN_FAKE_HDR_LEN);
 			memcpy_fromio(skbtmp, arlan->ultimateDestAddress, 6);
 			memcpy_fromio(skbtmp + 6, arlan->rxSrc, 6);
 			WRITESHMB(arlan->rxStatus, 0x00);
@@ -1557,8 +1554,8 @@
 
 static void arlan_process_interrupt(struct net_device *dev)
 {
-	struct arlan_private *priv = dev->priv;
-	volatile struct arlan_shmem *arlan = priv->card;
+	struct arlan_private *priv = netdev_priv(dev);
+	volatile struct arlan_shmem __iomem *arlan = priv->card;
 	u_char rxStatus = READSHMB(arlan->rxStatus);
 	u_char txStatus = READSHMB(arlan->txStatus);
 	u_short rxOffset = READSHMS(arlan->rxOffset);
@@ -1660,8 +1657,8 @@
 static irqreturn_t arlan_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
 	struct net_device *dev = dev_id;
-	struct arlan_private *priv = dev->priv;
-	volatile struct arlan_shmem *arlan = priv->card;
+	struct arlan_private *priv = netdev_priv(dev);
+	volatile struct arlan_shmem __iomem *arlan = priv->card;
 	u_char rxStatus = READSHMB(arlan->rxStatus);
 	u_char txStatus = READSHMB(arlan->txStatus);
 
@@ -1683,7 +1680,7 @@
 
 static int arlan_close(struct net_device *dev)
 {
-	struct arlan_private *priv = dev->priv;
+	struct arlan_private *priv = netdev_priv(dev);
 
 	ARLAN_DEBUG_ENTRY("arlan_close");
 
@@ -1717,8 +1714,8 @@
 
 static struct net_device_stats *arlan_statistics(struct net_device *dev)
 {
-	struct arlan_private *priv = dev->priv;
-	volatile struct arlan_shmem *arlan = priv->card;
+	struct arlan_private *priv = netdev_priv(dev);
+	volatile struct arlan_shmem __iomem *arlan = priv->card;
 
 
 	ARLAN_DEBUG_ENTRY("arlan_statistics");
@@ -1747,8 +1744,8 @@
 
 static void arlan_set_multicast(struct net_device *dev)
 {
-	struct arlan_private *priv = dev->priv;
-	volatile struct arlan_shmem *arlan = priv->card;
+	struct arlan_private *priv = netdev_priv(dev);
+	volatile struct arlan_shmem __iomem *arlan = priv->card;
 	struct arlan_conf_stru *conf = priv->Conf;
 	int board_conf_needed = 0;
 
diff -Nru a/drivers/net/wireless/arlan-proc.c b/drivers/net/wireless/arlan-proc.c
--- a/drivers/net/wireless/arlan-proc.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/net/wireless/arlan-proc.c	2005-01-10 20:11:19 -08:00
@@ -58,7 +58,8 @@
 static const char *arlan_diagnostic_info_string(struct net_device *dev)
 {
 
-	volatile struct arlan_shmem *arlan = ((struct arlan_private *) dev->priv)->card;
+	struct arlan_private *priv = netdev_priv(dev);
+	volatile struct arlan_shmem __iomem *arlan = priv->card;
 	u_char diagnosticInfo;
 
 	READSHM(diagnosticInfo, arlan->diagnosticInfo, u_char);
@@ -113,7 +114,8 @@
 static const char *arlan_hardware_type_string(struct net_device *dev)
 {
 	u_char hardwareType;
-	volatile struct arlan_shmem *arlan = ((struct arlan_private *) dev->priv)->card;
+	struct arlan_private *priv = netdev_priv(dev);
+	volatile struct arlan_shmem __iomem *arlan = priv->card;
 
 	READSHM(hardwareType, arlan->hardwareType, u_char);
 	switch (hardwareType)
@@ -189,7 +191,8 @@
 	u_char diagnosticInfo;
 	u_short diagnosticOffset;
 	u_char hardwareType;
-	volatile struct arlan_shmem *arlan = ((struct arlan_private *) dev->priv)->card;
+	struct arlan_private *priv = netdev_priv(dev);
+	volatile struct arlan_shmem __iomem *arlan = priv->card;
 
 	//  ARLAN_DEBUG_ENTRY("arlan_print_diagnostic_info");
 
@@ -254,7 +257,8 @@
 	int i;
 	int memlen = sizeof(struct arlan_shmem) - 0xF;	/* avoid control register */
 	volatile char *arlan_mem = (char *) (dev->mem_start);
-	volatile struct arlan_shmem *arlan = ((struct arlan_private *) dev->priv)->card;
+	struct arlan_private *priv = netdev_priv(dev);
+	volatile struct arlan_shmem __iomem *arlan = priv->card;
 	char pattern;
 
 	ptr = NULL;
@@ -319,7 +323,8 @@
 static int arlan_setup_card_by_book(struct net_device *dev)
 {
 	u_char irqLevel, configuredStatusFlag;
-	volatile struct arlan_shmem *arlan = ((struct arlan_private *) dev->priv)->card;
+	struct arlan_private *priv = netdev_priv(dev);
+	volatile struct arlan_shmem __iomem *arlan = priv->card;
 
 //	ARLAN_DEBUG_ENTRY("arlan_setup_card");
 
diff -Nru a/drivers/net/wireless/arlan.h b/drivers/net/wireless/arlan.h
--- a/drivers/net/wireless/arlan.h	2005-01-10 20:11:19 -08:00
+++ b/drivers/net/wireless/arlan.h	2005-01-10 20:11:19 -08:00
@@ -332,7 +332,7 @@
 /* Information that need to be kept for each board. */
 struct arlan_private {
       struct net_device_stats stats;
-      struct arlan_shmem * card;
+      struct arlan_shmem __iomem * card;
       struct arlan_shmem * conf;
 
       struct arlan_conf_stru * Conf;	     
@@ -403,14 +403,12 @@
 #define ARLAN_COM_INT                 0x80
 
 
-#define TXLAST(dev) (((struct arlan_private *)dev->priv)->txRing[((struct arlan_private *)dev->priv)->txLast])
-#define TXHEAD(dev) (((struct arlan_private *)dev->priv)->txRing[0])
-#define TXTAIL(dev) (((struct arlan_private *)dev->priv)->txRing[1])
-
-#define TXBuffStart(dev) \
- ((int)(((struct arlan_private *)dev->priv)->card)->txBuffer) - ((int)(((struct arlan_private *)dev->priv)->card) )
-#define TXBuffEnd(dev) \
- ((int)(((struct arlan_private *)dev->priv)->card)->rxBuffer) - ((int)(((struct arlan_private *)dev->priv)->card)
+#define TXLAST(dev) (((struct arlan_private *)netdev_priv(dev))->txRing[((struct arlan_private *)netdev_priv(dev))->txLast])
+#define TXHEAD(dev) (((struct arlan_private *)netdev_priv(dev))->txRing[0])
+#define TXTAIL(dev) (((struct arlan_private *)netdev_priv(dev))->txRing[1])
+
+#define TXBuffStart(dev) offsetof(struct arlan_shmem, txBuffer)
+#define TXBuffEnd(dev) offsetof(struct arlan_shmem, xxBuffer)
  
 #define READSHM(to,from,atype) {\
 	atype tmp;\
@@ -451,16 +449,16 @@
 
 
 #define registrationBad(dev)\
-   ( (   READSHMB(((struct arlan_private *)dev->priv)->card->registrationMode)    > 0) && \
-     (   READSHMB(((struct arlan_private *)dev->priv)->card->registrationStatus) == 0)    )
+   ( (   READSHMB(((struct arlan_private *)netdev_priv(dev))->card->registrationMode)    > 0) && \
+     (   READSHMB(((struct arlan_private *)netdev_priv(dev))->card->registrationStatus) == 0)    )
 
 
 #define readControlRegister(dev)\
- 	READSHMB(((struct arlan_private *)dev->priv)->card->cntrlRegImage)
+ 	READSHMB(((struct arlan_private *)netdev_priv(dev))->card->cntrlRegImage)
 
 #define writeControlRegister(dev, v){\
-   WRITESHMB(((struct arlan_private *)dev->priv)->card->cntrlRegImage	,((v) &0xF) );\
-   WRITESHMB(((struct arlan_private *)dev->priv)->card->controlRegister	,(v) 	);}
+   WRITESHMB(((struct arlan_private *)netdev_priv(dev))->card->cntrlRegImage	,((v) &0xF) );\
+   WRITESHMB(((struct arlan_private *)netdev_priv(dev))->card->controlRegister	,(v) 	);}
 
 
 #define arlan_interrupt_lancpu(dev) {\
diff -Nru a/drivers/net/wireless/atmel_cs.c b/drivers/net/wireless/atmel_cs.c
--- a/drivers/net/wireless/atmel_cs.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/net/wireless/atmel_cs.c	2005-01-10 20:11:19 -08:00
@@ -65,7 +65,7 @@
 */
 #ifdef PCMCIA_DEBUG
 static int pc_debug = PCMCIA_DEBUG;
-MODULE_PARM(pc_debug, "i");
+module_param(pc_debug, int, 0);
 static char *version = "$Revision: 1.2 $";
 #define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args);
 #else
@@ -86,8 +86,8 @@
 MODULE_DESCRIPTION("Support for Atmel at76c50x 802.11 wireless ethernet cards.");
 MODULE_LICENSE("GPL");
 MODULE_SUPPORTED_DEVICE("Atmel at76c50x PCMCIA cards");
-MODULE_PARM(irq_mask, "i");
-MODULE_PARM(irq_list, "1-4i");
+module_param(irq_mask, int, 0);
+module_param_array(irq_list, int, NULL, 0);
 
 /*====================================================================*/
 
diff -Nru a/drivers/net/wireless/netwave_cs.c b/drivers/net/wireless/netwave_cs.c
--- a/drivers/net/wireless/netwave_cs.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/net/wireless/netwave_cs.c	2005-01-10 20:11:22 -08:00
@@ -161,7 +161,7 @@
 
 #ifdef PCMCIA_DEBUG
 static int pc_debug = PCMCIA_DEBUG;
-MODULE_PARM(pc_debug, "i");
+module_param(pc_debug, int, 0);
 #define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args)
 static char *version =
 "netwave_cs.c 0.3.0 Thu Jul 17 14:36:02 1997 (John Markus Bjørndalen)\n";
@@ -195,11 +195,11 @@
 static u_int irq_mask = 0xdeb8;
 static int irq_list[4] = { -1 };
 
-MODULE_PARM(domain, "i");
-MODULE_PARM(scramble_key, "i");
-MODULE_PARM(mem_speed, "i");
-MODULE_PARM(irq_mask, "i");
-MODULE_PARM(irq_list, "1-4i");
+module_param(domain, int, 0);
+module_param(scramble_key, int, 0);
+module_param(mem_speed, int, 0);
+module_param(irq_mask, int, 0);
+module_param_array(irq_list, int, NULL, 0);
 
 /*====================================================================*/
 
@@ -213,7 +213,7 @@
 static void netwave_detach(dev_link_t *);    /* Destroy instance */
 
 /* Hardware configuration */
-static void netwave_doreset(ioaddr_t iobase, u_char* ramBase);
+static void netwave_doreset(ioaddr_t iobase, u_char __iomem *ramBase);
 static void netwave_reset(struct net_device *dev);
 
 /* Misc device stuff */
@@ -321,7 +321,7 @@
     dev_link_t link;
     spinlock_t	spinlock;	/* Serialize access to the hardware (SMP) */
     dev_node_t node;
-    u_char     *ramBase;
+    u_char     __iomem *ramBase;
     int        timeoutCounter;
     int        lastExec;
     struct timer_list      watchdog;	/* To avoid blocking state */
@@ -340,12 +340,12 @@
  * The Netwave card is little-endian, so won't work for big endian
  * systems.
  */
-static inline unsigned short get_uint16(u_char* staddr) 
+static inline unsigned short get_uint16(u_char __iomem *staddr) 
 {
     return readw(staddr); /* Return only 16 bits */
 }
 
-static inline short get_int16(u_char* staddr)
+static inline short get_int16(u_char __iomem * staddr)
 {
     return readw(staddr);
 }
@@ -362,7 +362,7 @@
 }
 
 #ifdef WIRELESS_EXT
-static void netwave_snapshot(netwave_private *priv, u_char *ramBase, 
+static void netwave_snapshot(netwave_private *priv, u_char __iomem *ramBase, 
 			     ioaddr_t iobase) { 
     u_short resultBuffer;
 
@@ -397,8 +397,8 @@
 {	
     unsigned long flags;
     ioaddr_t iobase = dev->base_addr;
-    netwave_private *priv = (netwave_private *) dev->priv;
-    u_char *ramBase = priv->ramBase;
+    netwave_private *priv = netdev_priv(dev);
+    u_char __iomem *ramBase = priv->ramBase;
     struct iw_statistics* wstats;
 	
     wstats = &priv->iw_stats;
@@ -446,7 +446,7 @@
     dev = alloc_etherdev(sizeof(netwave_private));
     if (!dev)
 	return NULL;
-    priv = dev->priv;
+    priv = netdev_priv(dev);
     link = &priv->link;
     link->priv = dev;
 
@@ -589,8 +589,8 @@
 {
 	unsigned long flags;
 	ioaddr_t iobase = dev->base_addr;
-	netwave_private *priv = (netwave_private *) dev->priv;
-	u_char *ramBase = priv->ramBase;
+	netwave_private *priv = netdev_priv(dev);
+	u_char __iomem *ramBase = priv->ramBase;
 
 	/* Disable interrupts & save flags */
 	spin_lock_irqsave(&priv->spinlock, flags);
@@ -647,8 +647,8 @@
 {
 	unsigned long flags;
 	ioaddr_t iobase = dev->base_addr;
-	netwave_private *priv = (netwave_private *) dev->priv;
-	u_char *ramBase = priv->ramBase;
+	netwave_private *priv = netdev_priv(dev);
+	u_char __iomem *ramBase = priv->ramBase;
 
 	/* Disable interrupts & save flags */
 	spin_lock_irqsave(&priv->spinlock, flags);
@@ -763,8 +763,8 @@
 {
 	unsigned long flags;
 	ioaddr_t iobase = dev->base_addr;
-	netwave_private *priv = (netwave_private *) dev->priv;
-	u_char *ramBase = priv->ramBase;
+	netwave_private *priv = netdev_priv(dev);
+	u_char __iomem *ramBase = priv->ramBase;
 
 	/* Disable interrupts & save flags */
 	spin_lock_irqsave(&priv->spinlock, flags);
@@ -996,14 +996,14 @@
 static void netwave_pcmcia_config(dev_link_t *link) {
     client_handle_t handle = link->handle;
     struct net_device *dev = link->priv;
-    netwave_private *priv = dev->priv;
+    netwave_private *priv = netdev_priv(dev);
     tuple_t tuple;
     cisparse_t parse;
     int i, j, last_ret, last_fn;
     u_char buf[64];
     win_req_t req;
     memreq_t mem;
-    u_char *ramBase = NULL;
+    u_char __iomem *ramBase = NULL;
 
     DEBUG(0, "netwave_pcmcia_config(0x%p)\n", link);
 
@@ -1069,7 +1069,7 @@
 
     /* Store base address of the common window frame */
     ramBase = ioremap(req.Base, 0x8000);
-    ((netwave_private*)dev->priv)->ramBase = ramBase;
+    priv->ramBase = ramBase;
 
     dev->irq = link->irq.AssignedIRQ;
     dev->base_addr = link->io.BasePort1;
@@ -1118,7 +1118,7 @@
 static void netwave_release(dev_link_t *link)
 {
     struct net_device *dev = link->priv;
-    netwave_private *priv = dev->priv;
+    netwave_private *priv = netdev_priv(dev);
 
     DEBUG(0, "netwave_release(0x%p)\n", link);
 
@@ -1149,7 +1149,8 @@
  *
  */
 static int netwave_event(event_t event, int priority,
-			 event_callback_args_t *args) {
+			 event_callback_args_t *args)
+{
     dev_link_t *link = args->client_data;
     struct net_device *dev = link->priv;
 	
@@ -1202,7 +1203,8 @@
  *
  *    Proper hardware reset of the card.
  */
-static void netwave_doreset(ioaddr_t ioBase, u_char* ramBase) {
+static void netwave_doreset(ioaddr_t ioBase, u_char __iomem *ramBase)
+{
     /* Reset card */
     wait_WOC(ioBase);
     outb(0x80, ioBase + NETWAVE_REG_PMR);
@@ -1217,8 +1219,8 @@
  */
 static void netwave_reset(struct net_device *dev) {
     /* u_char state; */
-    netwave_private *priv = (netwave_private*) dev->priv;
-    u_char *ramBase = priv->ramBase;
+    netwave_private *priv = netdev_priv(dev);
+    u_char __iomem *ramBase = priv->ramBase;
     ioaddr_t iobase = dev->base_addr;
 
     DEBUG(0, "netwave_reset: Done with hardware reset\n");
@@ -1298,8 +1300,8 @@
                  DataOffset;
     int tmpcount; 
 	
-    netwave_private *priv = (netwave_private *) dev->priv;
-    u_char* ramBase = priv->ramBase;
+    netwave_private *priv = netdev_priv(dev);
+    u_char __iomem * ramBase = priv->ramBase;
     ioaddr_t iobase = dev->base_addr;
 
     /* Disable interrupts & save flags */
@@ -1390,11 +1392,12 @@
  *	     ready to transmit another packet.
  *	  3. A command has completed execution.
  */
-static irqreturn_t netwave_interrupt(int irq, void* dev_id, struct pt_regs *regs) {
+static irqreturn_t netwave_interrupt(int irq, void* dev_id, struct pt_regs *regs)
+{
     ioaddr_t iobase;
-    u_char *ramBase;
+    u_char __iomem *ramBase;
     struct net_device *dev = (struct net_device *)dev_id;
-    struct netwave_private *priv = dev->priv;
+    struct netwave_private *priv = netdev_priv(dev);
     dev_link_t *link = &priv->link;
     int i;
     
@@ -1524,7 +1527,7 @@
 } /* netwave_watchdog */
 
 static struct net_device_stats *netwave_get_stats(struct net_device *dev) {
-    netwave_private *priv = (netwave_private*)dev->priv;
+    netwave_private *priv = netdev_priv(dev);
 
     update_stats(dev);
 
@@ -1547,7 +1550,7 @@
 
 static void update_stats(struct net_device *dev) {
     //unsigned long flags;
-/*     netwave_private *priv = (netwave_private*) dev->priv; */
+/*     netwave_private *priv = netdev_priv(dev); */
 
     //spin_lock_irqsave(&priv->spinlock, flags);
 
@@ -1557,9 +1560,10 @@
     //spin_unlock_irqrestore(&priv->spinlock, flags);
 }
 
-static int netwave_rx(struct net_device *dev) {
-    netwave_private *priv = (netwave_private*)(dev->priv);
-    u_char *ramBase = priv->ramBase;
+static int netwave_rx(struct net_device *dev)
+{
+    netwave_private *priv = netdev_priv(dev);
+    u_char __iomem *ramBase = priv->ramBase;
     ioaddr_t iobase = dev->base_addr;
     u_char rxStatus;
     struct sk_buff *skb = NULL;
@@ -1647,7 +1651,7 @@
 }
 
 static int netwave_open(struct net_device *dev) {
-    netwave_private *priv = dev->priv;
+    netwave_private *priv = netdev_priv(dev);
     dev_link_t *link = &priv->link;
 
     DEBUG(1, "netwave_open: starting.\n");
@@ -1664,7 +1668,7 @@
 }
 
 static int netwave_close(struct net_device *dev) {
-    netwave_private *priv = (netwave_private *)dev->priv;
+    netwave_private *priv = netdev_priv(dev);
     dev_link_t *link = &priv->link;
 
     DEBUG(1, "netwave_close: finishing.\n");
@@ -1709,7 +1713,8 @@
 static void set_multicast_list(struct net_device *dev)
 {
     ioaddr_t iobase = dev->base_addr;
-    u_char* ramBase = ((netwave_private*) dev->priv)->ramBase;
+    netwave_private *priv = netdev_priv(dev);
+    u_char __iomem * ramBase = priv->ramBase;
     u_char  rcvMode = 0;
    
 #ifdef PCMCIA_DEBUG
diff -Nru a/drivers/net/wireless/orinoco.c b/drivers/net/wireless/orinoco.c
--- a/drivers/net/wireless/orinoco.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/net/wireless/orinoco.c	2005-01-10 20:11:23 -08:00
@@ -461,12 +461,12 @@
 /* Level of debugging. Used in the macros in orinoco.h */
 #ifdef ORINOCO_DEBUG
 int orinoco_debug = ORINOCO_DEBUG;
-MODULE_PARM(orinoco_debug, "i");
+module_param(orinoco_debug, int, 0);
 EXPORT_SYMBOL(orinoco_debug);
 #endif
 
 static int suppress_linkstatus; /* = 0 */
-MODULE_PARM(suppress_linkstatus, "i");
+module_param(suppress_linkstatus, bool, 0);
 
 /********************************************************************/
 /* Compile time configuration and compatibility stuff               */
diff -Nru a/drivers/net/wireless/orinoco_cs.c b/drivers/net/wireless/orinoco_cs.c
--- a/drivers/net/wireless/orinoco_cs.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/net/wireless/orinoco_cs.c	2005-01-10 20:11:22 -08:00
@@ -64,9 +64,9 @@
  * don't have any CIS entry for it. This workaround it... */
 static int ignore_cis_vcc; /* = 0 */
 
-MODULE_PARM(irq_mask, "i");
-MODULE_PARM(irq_list, "1-4i");
-MODULE_PARM(ignore_cis_vcc, "i");
+module_param(irq_mask, int, 0);
+module_param_array(irq_list, int, NULL, 0);
+module_param(ignore_cis_vcc, int, 0);
 
 /********************************************************************/
 /* Magic constants						    */
diff -Nru a/drivers/net/wireless/prism54/isl_ioctl.c b/drivers/net/wireless/prism54/isl_ioctl.c
--- a/drivers/net/wireless/prism54/isl_ioctl.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/net/wireless/prism54/isl_ioctl.c	2005-01-10 20:11:17 -08:00
@@ -1524,31 +1524,35 @@
 		     const struct obj_mlme *mlme, int error)
 {
 	union iwreq_data wrqu;
+	char *memptr;
 
-	wrqu.data.pointer = kmalloc(IW_CUSTOM_MAX, GFP_KERNEL);
-	if (!wrqu.data.pointer)
+	memptr = kmalloc(IW_CUSTOM_MAX, GFP_KERNEL);
+	if (!memptr)
 		return;
+	wrqu.data.pointer = memptr;
 	wrqu.data.length = 0;
-	format_event(priv, wrqu.data.pointer, str, mlme, &wrqu.data.length,
+	format_event(priv, memptr, str, mlme, &wrqu.data.length,
 		     error);
-	wireless_send_event(priv->ndev, IWEVCUSTOM, &wrqu, wrqu.data.pointer);
-	kfree(wrqu.data.pointer);
+	wireless_send_event(priv->ndev, IWEVCUSTOM, &wrqu, memptr);
+	kfree(memptr);
 }
 
 static void
 send_simple_event(islpci_private *priv, const char *str)
 {
 	union iwreq_data wrqu;
+	char *memptr;
 	int n = strlen(str);
 
-	wrqu.data.pointer = kmalloc(IW_CUSTOM_MAX, GFP_KERNEL);
-	if (!wrqu.data.pointer)
+	memptr = kmalloc(IW_CUSTOM_MAX, GFP_KERNEL);
+	if (!memptr)
 		return;
 	BUG_ON(n > IW_CUSTOM_MAX);
+	wrqu.data.pointer = memptr;
 	wrqu.data.length = n;
-	strcpy(wrqu.data.pointer, str);
-	wireless_send_event(priv->ndev, IWEVCUSTOM, &wrqu, wrqu.data.pointer);
-	kfree(wrqu.data.pointer);
+	strcpy(memptr, str);
+	wireless_send_event(priv->ndev, IWEVCUSTOM, &wrqu, memptr);
+	kfree(memptr);
 }
 
 static void
diff -Nru a/drivers/net/wireless/prism54/islpci_dev.c b/drivers/net/wireless/prism54/islpci_dev.c
--- a/drivers/net/wireless/prism54/islpci_dev.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/net/wireless/prism54/islpci_dev.c	2005-01-10 20:11:15 -08:00
@@ -419,7 +419,7 @@
 	 * currently in progress by emptying the TX and RX queues. */
 
 	/* wait until interrupts have finished executing on other CPUs */
-	prism54_synchronize_irq(priv->pdev->irq);
+	synchronize_irq(priv->pdev->irq);
 
 	reg = readl(device_base + ISL38XX_CTRL_STAT_REG);
 	reg &= ~(ISL38XX_CTRL_STAT_RESET | ISL38XX_CTRL_STAT_RAMBOOT);
diff -Nru a/drivers/net/wireless/prism54/islpci_hotplug.c b/drivers/net/wireless/prism54/islpci_hotplug.c
--- a/drivers/net/wireless/prism54/islpci_hotplug.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/net/wireless/prism54/islpci_hotplug.c	2005-01-10 20:11:19 -08:00
@@ -292,6 +292,8 @@
 	islpci_private *priv = ndev ? netdev_priv(ndev) : NULL;
 	BUG_ON(!priv);
 
+	pci_enable_device(pdev);
+
 	printk(KERN_NOTICE "%s: got resume request\n", ndev->name);
 
 	pci_restore_state(pdev);
diff -Nru a/drivers/net/wireless/prism54/prismcompat.h b/drivers/net/wireless/prism54/prismcompat.h
--- a/drivers/net/wireless/prism54/prismcompat.h	2005-01-10 20:11:18 -08:00
+++ b/drivers/net/wireless/prism54/prismcompat.h	2005-01-10 20:11:18 -08:00
@@ -34,11 +34,9 @@
 #include <linux/workqueue.h>
 #include <linux/compiler.h>
 
-#if !defined(CONFIG_FW_LOADER) && !defined(CONFIG_FW_LOADER_MODULE)
-#error Firmware Loading is not configured in the kernel !
+#ifndef __iomem
+#define __iomem
 #endif
-
-#define prism54_synchronize_irq(irq) synchronize_irq(irq)
 
 #define PRISM_FW_PDEV		&priv->pdev->dev
 
diff -Nru a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c
--- a/drivers/net/wireless/ray_cs.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/net/wireless/ray_cs.c	2005-01-10 20:11:18 -08:00
@@ -84,7 +84,7 @@
 #ifdef PCMCIA_DEBUG
 static int ray_debug;
 static int pc_debug = PCMCIA_DEBUG;
-MODULE_PARM(pc_debug, "i");
+module_param(pc_debug, int, 0);
 /* #define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args); */
 #define DEBUG(n, args...) if (pc_debug>(n)) printk(args);
 #else
@@ -155,10 +155,6 @@
 static void start_net(u_long local);
 /* void start_net(ray_dev_t *local); */
 
-/* Create symbol table for registering with kernel in init_module */
-EXPORT_SYMBOL(ray_dev_ioctl);
-EXPORT_SYMBOL(ray_rx);
-
 /*===========================================================================*/
 /* Parameters that can be set with 'insmod' */
 /* Bit map of interrupts to choose from */
@@ -226,18 +222,18 @@
 MODULE_DESCRIPTION("Raylink/WebGear wireless LAN driver");
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(irq_mask,"i");
-MODULE_PARM(net_type,"i");
-MODULE_PARM(hop_dwell,"i");
-MODULE_PARM(beacon_period,"i");
-MODULE_PARM(psm,"i");
-MODULE_PARM(essid,"s");
-MODULE_PARM(translate,"i");
-MODULE_PARM(country,"i");
-MODULE_PARM(sniffer,"i");
-MODULE_PARM(bc,"i");
-MODULE_PARM(phy_addr,"s");
-MODULE_PARM(ray_mem_speed, "i");
+module_param(irq_mask, ulong, 0);
+module_param(net_type, int, 0);
+module_param(hop_dwell, int, 0);
+module_param(beacon_period, int, 0);
+module_param(psm, int, 0);
+module_param(essid, charp, 0);
+module_param(translate, int, 0);
+module_param(country, int, 0);
+module_param(sniffer, int, 0);
+module_param(bc, int, 0);
+module_param(phy_addr, charp, 0);
+module_param(ray_mem_speed, int, 0);
 
 static UCHAR b5_default_startup_parms[] = {
     0,   0,                         /* Adhoc station */
diff -Nru a/drivers/net/wireless/wavelan.c b/drivers/net/wireless/wavelan.c
--- a/drivers/net/wireless/wavelan.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/net/wireless/wavelan.c	2005-01-10 20:11:22 -08:00
@@ -4344,7 +4344,8 @@
 		struct net_device *dev = alloc_etherdev(sizeof(net_local));
 		if (!dev)
 			break;
-		memcpy(dev->name, name[i], IFNAMSIZ);	/* Copy name */
+		if (name[i])
+			strcpy(dev->name, name[i]);	/* Copy name */
 		dev->base_addr = io[i];
 		dev->irq = irq[i];
 
diff -Nru a/drivers/net/wireless/wavelan.p.h b/drivers/net/wireless/wavelan.p.h
--- a/drivers/net/wireless/wavelan.p.h	2005-01-10 20:11:21 -08:00
+++ b/drivers/net/wireless/wavelan.p.h	2005-01-10 20:11:21 -08:00
@@ -703,10 +703,11 @@
 /* Parameters set by insmod */
 static int	io[4];
 static int	irq[4];
-static char	name[4][IFNAMSIZ];
-MODULE_PARM(io, "1-4i");
-MODULE_PARM(irq, "1-4i");
-MODULE_PARM(name, "1-4c" __MODULE_STRING(IFNAMSIZ));
+static char	*name[4];
+module_param_array(io, int, NULL, 0);
+module_param_array(irq, int, NULL, 0);
+module_param_array(name, charp, NULL, 0);
+
 MODULE_PARM_DESC(io, "WaveLAN I/O base address(es),required");
 MODULE_PARM_DESC(irq, "WaveLAN IRQ number(s)");
 MODULE_PARM_DESC(name, "WaveLAN interface neme(s)");
diff -Nru a/drivers/net/wireless/wavelan_cs.c b/drivers/net/wireless/wavelan_cs.c
--- a/drivers/net/wireless/wavelan_cs.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/net/wireless/wavelan_cs.c	2005-01-10 20:11:19 -08:00
@@ -136,7 +136,8 @@
 	 u_char *	b,	/* buffer to fill */
 	 int		n)	/* size to read */
 {
-  u_char *	ptr = ((u_char *)dev->mem_start) + PSA_ADDR + (o << 1);
+  net_local *lp = netdev_priv(dev);
+  u_char __iomem *ptr = lp->mem + PSA_ADDR + (o << 1);
 
   while(n-- > 0)
     {
@@ -160,12 +161,13 @@
 	  u_char *	b,	/* Buffer in memory */
 	  int		n)	/* Length of buffer */
 {
-  u_char *	ptr = ((u_char *) dev->mem_start) + PSA_ADDR + (o << 1);
+  net_local *lp = netdev_priv(dev);
+  u_char __iomem *ptr = lp->mem + PSA_ADDR + (o << 1);
   int		count = 0;
   ioaddr_t	base = dev->base_addr;
   /* As there seem to have no flag PSA_BUSY as in the ISA model, we are
    * oblige to verify this address to know when the PSA is ready... */
-  volatile u_char *	verify = ((u_char *) dev->mem_start) + PSA_ADDR +
+  volatile u_char __iomem *verify = lp->mem + PSA_ADDR +
     (psaoff(0, psa_comp_number) << 1);
 
   /* Authorize writting to PSA */
@@ -950,7 +952,7 @@
 		  OP0_DIAGNOSE, SR0_DIAGNOSE_PASSED))
     ret = TRUE;
 
-#ifdef DEBUG_CONFIG_ERROR
+#ifdef DEBUG_CONFIG_ERRORS
   printk(KERN_INFO "wavelan_cs: i82593 Self Test failed!\n");
 #endif
   return(ret);
@@ -3463,7 +3465,7 @@
   /* If there was a problem */
   if(spin <= 0)
     {
-#ifdef DEBUG_CONFIG_ERROR
+#ifdef DEBUG_CONFIG_ERRORS
       printk(KERN_INFO "%s: wv_ru_stop(): The chip doesn't want to stop...\n",
 	     dev->name);
 #endif
@@ -3948,17 +3950,16 @@
 static inline int
 wv_pcmcia_config(dev_link_t *	link)
 {
-  client_handle_t	handle;
+  client_handle_t	handle = link->handle;
   tuple_t		tuple;
   cisparse_t		parse;
-  struct net_device *	dev;
+  struct net_device *	dev = (struct net_device *) link->priv;
   int			i;
   u_char		buf[64];
   win_req_t		req;
   memreq_t		mem;
+  net_local *		lp = netdev_priv(dev);
 
-  handle = link->handle;
-  dev = (struct net_device *) link->priv;
 
 #ifdef DEBUG_CONFIG_TRACE
   printk(KERN_DEBUG "->wv_pcmcia_config(0x%p)\n", link);
@@ -4045,7 +4046,8 @@
 	  break;
 	}
 
-      dev->mem_start = (u_long)ioremap(req.Base, req.Size);
+      lp->mem = ioremap(req.Base, req.Size);
+      dev->mem_start = (u_long)lp->mem;
       dev->mem_end = dev->mem_start + req.Size;
 
       mem.CardOffset = 0; mem.Page = 0;
@@ -4062,8 +4064,8 @@
       netif_start_queue(dev);
 
 #ifdef DEBUG_CONFIG_INFO
-      printk(KERN_DEBUG "wv_pcmcia_config: MEMSTART 0x%x IRQ %d IOPORT 0x%x\n",
-	     (u_int) dev->mem_start, dev->irq, (u_int) dev->base_addr);
+      printk(KERN_DEBUG "wv_pcmcia_config: MEMSTART %p IRQ %d IOPORT 0x%x\n",
+	     lp->mem, dev->irq, (u_int) dev->base_addr);
 #endif
 
       i = register_netdev(dev);
@@ -4104,13 +4106,14 @@
 wv_pcmcia_release(dev_link_t *link)
 {
   struct net_device *	dev = (struct net_device *) link->priv;
+  net_local *		lp = netdev_priv(dev);
 
 #ifdef DEBUG_CONFIG_TRACE
   printk(KERN_DEBUG "%s: -> wv_pcmcia_release(0x%p)\n", dev->name, link);
 #endif
 
   /* Don't bother checking to see if these succeed or not */
-  iounmap((u_char *)dev->mem_start);
+  iounmap(lp->mem);
   pcmcia_release_window(link->win);
   pcmcia_release_configuration(link->handle);
   pcmcia_release_io(link->handle, &link->io);
diff -Nru a/drivers/net/wireless/wavelan_cs.p.h b/drivers/net/wireless/wavelan_cs.p.h
--- a/drivers/net/wireless/wavelan_cs.p.h	2005-01-10 20:11:21 -08:00
+++ b/drivers/net/wireless/wavelan_cs.p.h	2005-01-10 20:11:21 -08:00
@@ -645,6 +645,7 @@
   int			cell_search;		/* Searching for new cell? */
   struct timer_list	cell_timer;		/* Garbage collection */
 #endif	/* WAVELAN_ROAMING */
+  void __iomem *mem;
 };
 
 /**************************** PROTOTYPES ****************************/
@@ -803,14 +804,14 @@
 static int	mem_speed = 0;
 
 /* New module interface */
-MODULE_PARM(irq_mask, "i");
-MODULE_PARM(irq_list, "1-4i");
-MODULE_PARM(mem_speed, "i");
+module_param(irq_mask, int, 0);
+module_param_array(irq_list, int, NULL, 0);
+module_param(mem_speed, int, 0);
 
 #ifdef WAVELAN_ROAMING		/* Conditional compile, see above in options */
 /* Enable roaming mode ? No ! Please keep this to 0 */
 static int	do_roaming = 0;
-MODULE_PARM(do_roaming, "i");
+module_param(do_roaming, bool, 0);
 #endif	/* WAVELAN_ROAMING */
 
 MODULE_LICENSE("GPL");
diff -Nru a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c
--- a/drivers/net/wireless/wl3501_cs.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/net/wireless/wl3501_cs.c	2005-01-10 20:11:15 -08:00
@@ -79,7 +79,7 @@
 #define PCMCIA_DEBUG 0
 #ifdef PCMCIA_DEBUG
 static int pc_debug = PCMCIA_DEBUG;
-MODULE_PARM(pc_debug, "i");
+module_param(pc_debug, int, 0);
 #define dprintk(n, format, args...) \
 	{ if (pc_debug > (n)) \
 		printk(KERN_INFO "%s: " format "\n", __FUNCTION__ , ##args); }
@@ -2279,8 +2279,8 @@
 module_init(wl3501_init_module);
 module_exit(wl3501_exit_module);
 
-MODULE_PARM(wl3501_irq_mask, "i");
-MODULE_PARM(wl3501_irq_list, "1-4i");
+module_param(wl3501_irq_mask, int, 0);
+module_param_array(wl3501_irq_list, int, NULL, 0);
 MODULE_AUTHOR("Fox Chen <mhchen@golf.ccl.itri.org.tw>, "
 	      "Arnaldo Carvalho de Melo <acme@conectiva.com.br>,"
 	      "Gustavo Niemeyer <niemeyer@conectiva.com>");
diff -Nru a/drivers/net/yellowfin.c b/drivers/net/yellowfin.c
--- a/drivers/net/yellowfin.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/net/yellowfin.c	2005-01-10 20:11:18 -08:00
@@ -140,13 +140,13 @@
 MODULE_DESCRIPTION("Packet Engines Yellowfin G-NIC Gigabit Ethernet driver");
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(max_interrupt_work, "i");
-MODULE_PARM(mtu, "i");
-MODULE_PARM(debug, "i");
-MODULE_PARM(rx_copybreak, "i");
-MODULE_PARM(options, "1-" __MODULE_STRING(MAX_UNITS) "i");
-MODULE_PARM(full_duplex, "1-" __MODULE_STRING(MAX_UNITS) "i");
-MODULE_PARM(gx_fix, "i");
+module_param(max_interrupt_work, int, 0);
+module_param(mtu, int, 0);
+module_param(debug, int, 0);
+module_param(rx_copybreak, int, 0);
+module_param_array(options, int, NULL, 0);
+module_param_array(full_duplex, int, NULL, 0);
+module_param(gx_fix, int, 0);
 MODULE_PARM_DESC(max_interrupt_work, "G-NIC maximum events handled per interrupt");
 MODULE_PARM_DESC(mtu, "G-NIC MTU (all boards)");
 MODULE_PARM_DESC(debug, "G-NIC debug level (0-7)");
diff -Nru a/drivers/net/znet.c b/drivers/net/znet.c
--- a/drivers/net/znet.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/net/znet.c	2005-01-10 20:11:15 -08:00
@@ -113,7 +113,7 @@
 #define ZNET_DEBUG 1
 #endif
 static unsigned int znet_debug = ZNET_DEBUG;
-MODULE_PARM (znet_debug, "i");
+module_param (znet_debug, int, 0);
 MODULE_PARM_DESC (znet_debug, "ZNet debug level");
 MODULE_LICENSE("GPL");
 
diff -Nru a/drivers/oprofile/buffer_sync.c b/drivers/oprofile/buffer_sync.c
--- a/drivers/oprofile/buffer_sync.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/oprofile/buffer_sync.c	2005-01-10 20:11:17 -08:00
@@ -46,7 +46,7 @@
  */
 static int task_free_notify(struct notifier_block * self, unsigned long val, void * data)
 {
-	struct task_struct * task = (struct task_struct *)data;
+	struct task_struct * task = data;
 	spin_lock(&task_mortuary);
 	list_add(&task->tasks, &dying_tasks);
 	spin_unlock(&task_mortuary);
@@ -62,7 +62,7 @@
 	/* To avoid latency problems, we only process the current CPU,
 	 * hoping that most samples for the task are on this CPU
 	 */
-	sync_buffer(smp_processor_id());
+	sync_buffer(_smp_processor_id());
   	return 0;
 }
 
@@ -86,7 +86,7 @@
 		/* To avoid latency problems, we only process the current CPU,
 		 * hoping that most samples for the task are on this CPU
 		 */
-		sync_buffer(smp_processor_id());
+		sync_buffer(_smp_processor_id());
 		return 0;
 	}
 
@@ -296,6 +296,13 @@
 }
 
  
+static void add_trace_begin(void)
+{
+	add_event_entry(ESCAPE_CODE);
+	add_event_entry(TRACE_BEGIN_CODE);
+}
+
+
 static void add_sample_entry(unsigned long offset, unsigned long event)
 {
 	add_event_entry(offset);
@@ -303,7 +310,7 @@
 }
 
 
-static void add_us_sample(struct mm_struct * mm, struct op_sample * s)
+static int add_us_sample(struct mm_struct * mm, struct op_sample * s)
 {
 	unsigned long cookie;
 	off_t offset;
@@ -312,7 +319,7 @@
  
 	if (!cookie) {
 		atomic_inc(&oprofile_stats.sample_lost_no_mapping);
-		return;
+		return 0;
 	}
 
 	if (cookie != last_cookie) {
@@ -321,6 +328,8 @@
 	}
 
 	add_sample_entry(offset, s->event);
+
+	return 1;
 }
 
  
@@ -328,15 +337,18 @@
  * sample is converted into a persistent dentry/offset pair
  * for later lookup from userspace.
  */
-static void add_sample(struct mm_struct * mm, struct op_sample * s, int in_kernel)
+static int
+add_sample(struct mm_struct * mm, struct op_sample * s, int in_kernel)
 {
 	if (in_kernel) {
 		add_sample_entry(s->eip, s->event);
+		return 1;
 	} else if (mm) {
-		add_us_sample(mm, s);
+		return add_us_sample(mm, s);
 	} else {
 		atomic_inc(&oprofile_stats.sample_lost_no_mm);
 	}
+	return 0;
 }
  
 
@@ -358,9 +370,9 @@
 }
 
 
-static inline int is_ctx_switch(unsigned long val)
+static inline int is_code(unsigned long val)
 {
-	return val == ~0UL;
+	return val == ESCAPE_CODE;
 }
  
 
@@ -397,7 +409,7 @@
 
 	rmb();
 
-	if (new_tail < (b->buffer_size))
+	if (new_tail < b->buffer_size)
 		b->tail_pos = new_tail;
 	else
 		b->tail_pos = 0;
@@ -454,6 +466,17 @@
 }
 
 
+/* FIXME: this is not sufficient if we implement syscall barrier backtrace
+ * traversal, the code switch to sb_sample_start at first kernel enter/exit
+ * switch so we need a fifth state and some special handling in sync_buffer()
+ */
+typedef enum {
+	sb_bt_ignore = -2,
+	sb_buffer_start,
+	sb_bt_start,
+	sb_sample_start,
+} sync_buffer_state;
+
 /* Sync one of the CPU's buffers into the global event buffer.
  * Here we need to go through each batch of samples punctuated
  * by context switch notes, taking the task's mmap_sem and doing
@@ -468,6 +491,7 @@
 	unsigned long cookie = 0;
 	int in_kernel = 1;
 	unsigned int i;
+	sync_buffer_state state = sb_buffer_start;
 	unsigned long available;
 
 	down(&buffer_sem);
@@ -478,14 +502,19 @@
 
 	available = get_slots(cpu_buf);
 
-	for (i=0; i < available; ++i) {
+	for (i = 0; i < available; ++i) {
 		struct op_sample * s = &cpu_buf->buffer[cpu_buf->tail_pos];
  
-		if (is_ctx_switch(s->eip)) {
-			if (s->event <= 1) {
+		if (is_code(s->eip)) {
+			if (s->event <= CPU_IS_KERNEL) {
 				/* kernel/userspace switch */
 				in_kernel = s->event;
+				if (state == sb_buffer_start)
+					state = sb_sample_start;
 				add_kernel_ctx_switch(s->event);
+			} else if (s->event == CPU_TRACE_BEGIN) {
+				state = sb_bt_start;
+				add_trace_begin();
 			} else {
 				struct mm_struct * oldmm = mm;
 
@@ -499,7 +528,13 @@
 				add_user_ctx_switch(new, cookie);
 			}
 		} else {
-			add_sample(mm, s, in_kernel);
+			if (state >= sb_bt_start &&
+			    !add_sample(mm, s, in_kernel)) {
+				if (state == sb_bt_start) {
+					state = sb_bt_ignore;
+					atomic_inc(&oprofile_stats.bt_lost_no_mapping);
+				}
+			}
 		}
 
 		increment_tail(cpu_buf);
diff -Nru a/drivers/oprofile/cpu_buffer.c b/drivers/oprofile/cpu_buffer.c
--- a/drivers/oprofile/cpu_buffer.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/oprofile/cpu_buffer.c	2005-01-10 20:11:15 -08:00
@@ -18,9 +18,11 @@
  */
 
 #include <linux/sched.h>
+#include <linux/oprofile.h>
 #include <linux/vmalloc.h>
 #include <linux/errno.h>
  
+#include "event_buffer.h"
 #include "cpu_buffer.h"
 #include "buffer_sync.h"
 #include "oprof.h"
@@ -32,13 +34,12 @@
 #define DEFAULT_TIMER_EXPIRE (HZ / 10)
 int work_enabled;
 
-static void __free_cpu_buffers(int num)
+void free_cpu_buffers(void)
 {
 	int i;
  
 	for_each_online_cpu(i) {
-		if (cpu_buffer[i].buffer)
-			vfree(cpu_buffer[i].buffer);
+		vfree(cpu_buffer[i].buffer);
 	}
 }
  
@@ -58,6 +59,7 @@
  
 		b->last_task = NULL;
 		b->last_is_kernel = -1;
+		b->tracing = 0;
 		b->buffer_size = buffer_size;
 		b->tail_pos = 0;
 		b->head_pos = 0;
@@ -69,17 +71,11 @@
 	return 0;
 
 fail:
-	__free_cpu_buffers(i);
+	free_cpu_buffers();
 	return -ENOMEM;
 }
  
 
-void free_cpu_buffers(void)
-{
-	__free_cpu_buffers(NR_CPUS);
-}
-
-
 void start_cpu_work(void)
 {
 	int i;
@@ -114,6 +110,18 @@
 }
 
 
+/* Resets the cpu buffer to a sane state. */
+void cpu_buffer_reset(struct oprofile_cpu_buffer * cpu_buf)
+{
+	/* reset these to invalid values; the next sample
+	 * collected will populate the buffer with proper
+	 * values to initialize the buffer
+	 */
+	cpu_buf->last_is_kernel = -1;
+	cpu_buf->last_task = NULL;
+}
+
+
 /* compute number of available slots in cpu_buffer queue */
 static unsigned long nr_available_slots(struct oprofile_cpu_buffer const * b)
 {
@@ -135,74 +143,148 @@
 	 * increment is visible */
 	wmb();
 
-	if (new_head < (b->buffer_size))
+	if (new_head < b->buffer_size)
 		b->head_pos = new_head;
 	else
 		b->head_pos = 0;
 }
 
 
+
+
+inline static void
+add_sample(struct oprofile_cpu_buffer * cpu_buf,
+           unsigned long pc, unsigned long event)
+{
+	struct op_sample * entry = &cpu_buf->buffer[cpu_buf->head_pos];
+	entry->eip = pc;
+	entry->event = event;
+	increment_head(cpu_buf);
+}
+
+
+inline static void
+add_code(struct oprofile_cpu_buffer * buffer, unsigned long value)
+{
+	add_sample(buffer, ESCAPE_CODE, value);
+}
+
+
 /* This must be safe from any context. It's safe writing here
  * because of the head/tail separation of the writer and reader
  * of the CPU buffer.
  *
  * is_kernel is needed because on some architectures you cannot
  * tell if you are in kernel or user space simply by looking at
- * eip. We tag this in the buffer by generating kernel enter/exit
+ * pc. We tag this in the buffer by generating kernel enter/exit
  * events whenever is_kernel changes
  */
-void oprofile_add_sample(unsigned long eip, unsigned int is_kernel, 
-	unsigned long event, int cpu)
+static int log_sample(struct oprofile_cpu_buffer * cpu_buf, unsigned long pc,
+		      int is_kernel, unsigned long event)
 {
-	struct oprofile_cpu_buffer * cpu_buf = &cpu_buffer[cpu];
 	struct task_struct * task;
 
-	is_kernel = !!is_kernel;
-
 	cpu_buf->sample_received++;
- 
 
 	if (nr_available_slots(cpu_buf) < 3) {
 		cpu_buf->sample_lost_overflow++;
-		return;
+		return 0;
 	}
 
+	is_kernel = !!is_kernel;
+
 	task = current;
 
 	/* notice a switch from user->kernel or vice versa */
 	if (cpu_buf->last_is_kernel != is_kernel) {
 		cpu_buf->last_is_kernel = is_kernel;
-		cpu_buf->buffer[cpu_buf->head_pos].eip = ~0UL;
-		cpu_buf->buffer[cpu_buf->head_pos].event = is_kernel;
-		increment_head(cpu_buf);
+		add_code(cpu_buf, is_kernel);
 	}
 
 	/* notice a task switch */
 	if (cpu_buf->last_task != task) {
 		cpu_buf->last_task = task;
-		cpu_buf->buffer[cpu_buf->head_pos].eip = ~0UL;
-		cpu_buf->buffer[cpu_buf->head_pos].event = (unsigned long)task;
-		increment_head(cpu_buf);
+		add_code(cpu_buf, (unsigned long)task);
 	}
  
-	cpu_buf->buffer[cpu_buf->head_pos].eip = eip;
-	cpu_buf->buffer[cpu_buf->head_pos].event = event;
-	increment_head(cpu_buf);
+	add_sample(cpu_buf, pc, event);
+	return 1;
 }
 
+static int oprofile_begin_trace(struct oprofile_cpu_buffer * cpu_buf)
+{
+	if (nr_available_slots(cpu_buf) < 4) {
+		cpu_buf->sample_lost_overflow++;
+		return 0;
+	}
 
-/* Resets the cpu buffer to a sane state. */
-void cpu_buffer_reset(struct oprofile_cpu_buffer * cpu_buf)
+	add_code(cpu_buf, CPU_TRACE_BEGIN);
+	cpu_buf->tracing = 1;
+	return 1;
+}
+
+
+static void oprofile_end_trace(struct oprofile_cpu_buffer * cpu_buf)
 {
-	/* reset these to invalid values; the next sample
-	 * collected will populate the buffer with proper
-	 * values to initialize the buffer
-	 */
-	cpu_buf->last_is_kernel = -1;
-	cpu_buf->last_task = NULL;
+	cpu_buf->tracing = 0;
+}
+
+
+void oprofile_add_sample(struct pt_regs * const regs, unsigned long event)
+{
+	struct oprofile_cpu_buffer * cpu_buf = &cpu_buffer[smp_processor_id()];
+	unsigned long pc = instruction_pointer(regs);
+	int is_kernel = !user_mode(regs);
+
+	if (!backtrace_depth) {
+		log_sample(cpu_buf, pc, is_kernel, event);
+		return;
+	}
+
+	if (!oprofile_begin_trace(cpu_buf))
+		return;
+
+	/* if log_sample() fail we can't backtrace since we lost the source
+	 * of this event */
+	if (log_sample(cpu_buf, pc, is_kernel, event))
+		oprofile_ops.backtrace(regs, backtrace_depth);
+	oprofile_end_trace(cpu_buf);
 }
 
 
+void oprofile_add_pc(unsigned long pc, int is_kernel, unsigned long event)
+{
+	struct oprofile_cpu_buffer * cpu_buf = &cpu_buffer[smp_processor_id()];
+	log_sample(cpu_buf, pc, is_kernel, event);
+}
+
+
+void oprofile_add_trace(unsigned long pc)
+{
+	struct oprofile_cpu_buffer * cpu_buf = &cpu_buffer[smp_processor_id()];
+
+	if (!cpu_buf->tracing)
+		return;
+
+	if (nr_available_slots(cpu_buf) < 1) {
+		cpu_buf->tracing = 0;
+		cpu_buf->sample_lost_overflow++;
+		return;
+	}
+
+	/* broken frame can give an eip with the same value as an escape code,
+	 * abort the trace if we get it */
+	if (pc == ESCAPE_CODE) {
+		cpu_buf->tracing = 0;
+		cpu_buf->backtrace_aborted++;
+		return;
+	}
+
+	add_sample(cpu_buf, pc, 0);
+}
+
+
+
 /*
  * This serves to avoid cpu buffer overflow, and makes sure
  * the task mortuary progresses
@@ -212,7 +294,7 @@
  */
 static void wq_sync_buffer(void * data)
 {
-	struct oprofile_cpu_buffer * b = (struct oprofile_cpu_buffer *)data;
+	struct oprofile_cpu_buffer * b = data;
 	if (b->cpu != smp_processor_id()) {
 		printk("WQ on CPU%d, prefer CPU%d\n",
 		       smp_processor_id(), b->cpu);
diff -Nru a/drivers/oprofile/cpu_buffer.h b/drivers/oprofile/cpu_buffer.h
--- a/drivers/oprofile/cpu_buffer.h	2005-01-10 20:11:24 -08:00
+++ b/drivers/oprofile/cpu_buffer.h	2005-01-10 20:11:24 -08:00
@@ -37,9 +37,11 @@
 	unsigned long buffer_size;
 	struct task_struct * last_task;
 	int last_is_kernel;
+	int tracing;
 	struct op_sample * buffer;
 	unsigned long sample_received;
 	unsigned long sample_lost_overflow;
+	unsigned long backtrace_aborted;
 	int cpu;
 	struct work_struct work;
 } ____cacheline_aligned;
@@ -47,5 +49,9 @@
 extern struct oprofile_cpu_buffer cpu_buffer[];
 
 void cpu_buffer_reset(struct oprofile_cpu_buffer * cpu_buf);
+
+/* transient events for the CPU buffer -> event buffer */
+#define CPU_IS_KERNEL 1
+#define CPU_TRACE_BEGIN 2
 
 #endif /* OPROFILE_CPU_BUFFER_H */
diff -Nru a/drivers/oprofile/event_buffer.h b/drivers/oprofile/event_buffer.h
--- a/drivers/oprofile/event_buffer.h	2005-01-10 20:11:16 -08:00
+++ b/drivers/oprofile/event_buffer.h	2005-01-10 20:11:16 -08:00
@@ -32,6 +32,8 @@
 #define KERNEL_EXIT_SWITCH_CODE		5
 #define MODULE_LOADED_CODE		6
 #define CTX_TGID_CODE			7
+#define TRACE_BEGIN_CODE		8
+#define TRACE_END_CODE			9
  
 /* add data to the event buffer */
 void add_event_entry(unsigned long data);
diff -Nru a/drivers/oprofile/oprof.c b/drivers/oprofile/oprof.c
--- a/drivers/oprofile/oprof.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/oprofile/oprof.c	2005-01-10 20:11:17 -08:00
@@ -20,8 +20,10 @@
 #include "buffer_sync.h"
 #include "oprofile_stats.h"
  
-struct oprofile_operations * oprofile_ops;
+struct oprofile_operations oprofile_ops;
+
 unsigned long oprofile_started;
+unsigned long backtrace_depth;
 static unsigned long is_setup;
 static DECLARE_MUTEX(start_sem);
 
@@ -43,7 +45,7 @@
 	if ((err = alloc_event_buffer()))
 		goto out1;
  
-	if (oprofile_ops->setup && (err = oprofile_ops->setup()))
+	if (oprofile_ops.setup && (err = oprofile_ops.setup()))
 		goto out2;
  
 	/* Note even though this starts part of the
@@ -59,8 +61,8 @@
 	return 0;
  
 out3:
-	if (oprofile_ops->shutdown)
-		oprofile_ops->shutdown();
+	if (oprofile_ops.shutdown)
+		oprofile_ops.shutdown();
 out2:
 	free_event_buffer();
 out1:
@@ -88,7 +90,7 @@
  
 	oprofile_reset_stats();
 
-	if ((err = oprofile_ops->start()))
+	if ((err = oprofile_ops.start()))
 		goto out;
 
 	oprofile_started = 1;
@@ -104,7 +106,7 @@
 	down(&start_sem);
 	if (!oprofile_started)
 		goto out;
-	oprofile_ops->stop();
+	oprofile_ops.stop();
 	oprofile_started = 0;
 	/* wake up the daemon to read what remains */
 	wake_up_buffer_waiter();
@@ -117,8 +119,8 @@
 {
 	down(&start_sem);
 	sync_stop();
-	if (oprofile_ops->shutdown)
-		oprofile_ops->shutdown(); 
+	if (oprofile_ops.shutdown)
+		oprofile_ops.shutdown();
 	is_setup = 0;
 	free_event_buffer();
 	free_cpu_buffers();
@@ -126,38 +128,45 @@
 }
 
 
-extern void timer_init(struct oprofile_operations ** ops);
+int oprofile_set_backtrace(unsigned long val)
+{
+	int err = 0;
 
+	down(&start_sem);
 
-static int __init oprofile_init(void)
-{
-	/* Architecture must fill in the interrupt ops and the
-	 * logical CPU type, or we can fall back to the timer
-	 * interrupt profiler.
-	 */
-	int err = oprofile_arch_init(&oprofile_ops);
+	if (oprofile_started) {
+		err = -EBUSY;
+		goto out;
+	}
 
-	if (err == -ENODEV || timer) {
-		timer_init(&oprofile_ops);
-		err = 0;
-	} else if (err) {
+	if (!oprofile_ops.backtrace) {
+		err = -EINVAL;
 		goto out;
 	}
 
-	if (!oprofile_ops->cpu_type) {
-		printk(KERN_ERR "oprofile: cpu_type not set !\n");
-		err = -EFAULT;
-	} else {
-		err = oprofilefs_register();
+	backtrace_depth = val;
+
+out:
+	up(&start_sem);
+	return err;
+}
+
+static int __init oprofile_init(void)
+{
+	int err = 0;
+
+	oprofile_arch_init(&oprofile_ops);
+
+	if (timer) {
+		printk(KERN_INFO "oprofile: using timer interrupt.\n");
+		oprofile_timer_init(&oprofile_ops);
 	}
- 
+
+	err = oprofilefs_register();
 	if (err)
-		goto out_exit;
-out:
+		oprofile_arch_exit();
+
 	return err;
-out_exit:
-	oprofile_arch_exit();
-	goto out;
 }
 
 
diff -Nru a/drivers/oprofile/oprof.h b/drivers/oprofile/oprof.h
--- a/drivers/oprofile/oprof.h	2005-01-10 20:11:16 -08:00
+++ b/drivers/oprofile/oprof.h	2005-01-10 20:11:16 -08:00
@@ -24,12 +24,16 @@
 extern unsigned long fs_buffer_size;
 extern unsigned long fs_cpu_buffer_size;
 extern unsigned long fs_buffer_watershed;
-extern struct oprofile_operations * oprofile_ops;
+extern struct oprofile_operations oprofile_ops;
 extern unsigned long oprofile_started;
+extern unsigned long backtrace_depth;
  
 struct super_block;
 struct dentry;
 
 void oprofile_create_files(struct super_block * sb, struct dentry * root);
+void oprofile_timer_init(struct oprofile_operations * ops);
+
+int oprofile_set_backtrace(unsigned long depth);
  
 #endif /* OPROF_H */
diff -Nru a/drivers/oprofile/oprofile_files.c b/drivers/oprofile/oprofile_files.c
--- a/drivers/oprofile/oprofile_files.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/oprofile/oprofile_files.c	2005-01-10 20:11:19 -08:00
@@ -18,6 +18,37 @@
 unsigned long fs_cpu_buffer_size = 8192;
 unsigned long fs_buffer_watershed = 32768; /* FIXME: tune */
 
+static ssize_t depth_read(struct file * file, char * buf, size_t count, loff_t * offset)
+{
+	return oprofilefs_ulong_to_user(backtrace_depth, buf, count, offset);
+}
+
+
+static ssize_t depth_write(struct file * file, char const * buf, size_t count, loff_t * offset)
+{
+	unsigned long val;
+	int retval;
+
+	if (*offset)
+		return -EINVAL;
+
+	retval = oprofilefs_ulong_from_user(&val, buf, count);
+	if (retval)
+		return retval;
+
+	retval = oprofile_set_backtrace(val);
+
+	if (retval)
+		return retval;
+	return count;
+}
+
+
+static struct file_operations depth_fops = {
+	.read		= depth_read,
+	.write		= depth_write
+};
+
  
 static ssize_t pointer_size_read(struct file * file, char __user * buf, size_t count, loff_t * offset)
 {
@@ -32,7 +63,7 @@
 
 static ssize_t cpu_type_read(struct file * file, char __user * buf, size_t count, loff_t * offset)
 {
-	return oprofilefs_str_to_user(oprofile_ops->cpu_type, buf, count, offset);
+	return oprofilefs_str_to_user(oprofile_ops.cpu_type, buf, count, offset);
 }
  
  
@@ -47,7 +78,7 @@
 }
 
 
-static ssize_t enable_write(struct file *file, char const __user * buf, size_t count, loff_t * offset)
+static ssize_t enable_write(struct file * file, char const __user * buf, size_t count, loff_t * offset)
 {
 	unsigned long val;
 	int retval;
@@ -76,7 +107,7 @@
 };
 
 
-static ssize_t dump_write(struct file *file, char const __user * buf, size_t count, loff_t * offset)
+static ssize_t dump_write(struct file * file, char const __user * buf, size_t count, loff_t * offset)
 {
 	wake_up_buffer_waiter();
 	return count;
@@ -96,8 +127,9 @@
 	oprofilefs_create_ulong(sb, root, "buffer_watershed", &fs_buffer_watershed);
 	oprofilefs_create_ulong(sb, root, "cpu_buffer_size", &fs_cpu_buffer_size);
 	oprofilefs_create_file(sb, root, "cpu_type", &cpu_type_fops); 
+	oprofilefs_create_file(sb, root, "backtrace_depth", &depth_fops);
 	oprofilefs_create_file(sb, root, "pointer_size", &pointer_size_fops);
 	oprofile_create_stats_files(sb, root);
-	if (oprofile_ops->create_files)
-		oprofile_ops->create_files(sb, root);
+	if (oprofile_ops.create_files)
+		oprofile_ops.create_files(sb, root);
 }
diff -Nru a/drivers/oprofile/oprofile_stats.c b/drivers/oprofile/oprofile_stats.c
--- a/drivers/oprofile/oprofile_stats.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/oprofile/oprofile_stats.c	2005-01-10 20:11:20 -08:00
@@ -59,6 +59,8 @@
 			&cpu_buf->sample_received);
 		oprofilefs_create_ro_ulong(sb, cpudir, "sample_lost_overflow",
 			&cpu_buf->sample_lost_overflow);
+		oprofilefs_create_ro_ulong(sb, cpudir, "backtrace_aborted",
+			&cpu_buf->backtrace_aborted);
 	}
  
 	oprofilefs_create_ro_atomic(sb, dir, "sample_lost_no_mm",
@@ -67,4 +69,6 @@
 		&oprofile_stats.sample_lost_no_mapping);
 	oprofilefs_create_ro_atomic(sb, dir, "event_lost_overflow",
 		&oprofile_stats.event_lost_overflow);
+	oprofilefs_create_ro_atomic(sb, dir, "bt_lost_no_mapping",
+		&oprofile_stats.bt_lost_no_mapping);
 }
diff -Nru a/drivers/oprofile/oprofile_stats.h b/drivers/oprofile/oprofile_stats.h
--- a/drivers/oprofile/oprofile_stats.h	2005-01-10 20:11:23 -08:00
+++ b/drivers/oprofile/oprofile_stats.h	2005-01-10 20:11:23 -08:00
@@ -15,6 +15,7 @@
 struct oprofile_stat_struct {
 	atomic_t sample_lost_no_mm;
 	atomic_t sample_lost_no_mapping;
+	atomic_t bt_lost_no_mapping;
 	atomic_t event_lost_overflow;
 };
 
diff -Nru a/drivers/oprofile/oprofilefs.c b/drivers/oprofile/oprofilefs.c
--- a/drivers/oprofile/oprofilefs.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/oprofile/oprofilefs.c	2005-01-10 20:11:18 -08:00
@@ -250,6 +250,7 @@
 	sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
 	sb->s_magic = OPROFILEFS_MAGIC;
 	sb->s_op = &s_ops;
+	sb->s_time_gran = 1;
 
 	root_inode = oprofilefs_get_inode(sb, S_IFDIR | 0755);
 	if (!root_inode)
diff -Nru a/drivers/oprofile/timer_int.c b/drivers/oprofile/timer_int.c
--- a/drivers/oprofile/timer_int.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/oprofile/timer_int.c	2005-01-10 20:11:18 -08:00
@@ -14,13 +14,12 @@
 #include <linux/profile.h>
 #include <linux/init.h>
 #include <asm/ptrace.h>
- 
+
+#include "oprof.h"
+
 static int timer_notify(struct pt_regs *regs)
 {
-	int cpu = smp_processor_id();
-	unsigned long eip = profile_pc(regs);
- 
-	oprofile_add_sample(eip, !user_mode(regs), 0, cpu);
+ 	oprofile_add_sample(regs, 0);
 	return 0;
 }
 
@@ -36,15 +35,12 @@
 }
 
 
-static struct oprofile_operations timer_ops = {
-	.start	= timer_start,
-	.stop	= timer_stop,
-	.cpu_type = "timer"
-};
-
- 
-void __init timer_init(struct oprofile_operations ** ops)
+void __init oprofile_timer_init(struct oprofile_operations * ops)
 {
-	*ops = &timer_ops;
-	printk(KERN_INFO "oprofile: using timer interrupt.\n");
+	ops->create_files = NULL;
+	ops->setup = NULL;
+	ops->shutdown = NULL;
+	ops->start = timer_start;
+	ops->stop = timer_stop;
+	ops->cpu_type = "timer";
 }
diff -Nru a/drivers/parport/Kconfig b/drivers/parport/Kconfig
--- a/drivers/parport/Kconfig	2005-01-10 20:11:22 -08:00
+++ b/drivers/parport/Kconfig	2005-01-10 20:11:22 -08:00
@@ -83,7 +83,7 @@
 
 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)
+	depends on PARPORT!=n && (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.
diff -Nru a/drivers/parport/parport_cs.c b/drivers/parport/parport_cs.c
--- a/drivers/parport/parport_cs.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/parport/parport_cs.c	2005-01-10 20:11:23 -08:00
@@ -64,12 +64,12 @@
 MODULE_DESCRIPTION("PCMCIA parallel port card driver");
 MODULE_LICENSE("Dual MPL/GPL");
 
-#define INT_MODULE_PARM(n, v) static int n = v; MODULE_PARM(n, "i")
+#define INT_MODULE_PARM(n, v) static int n = v; module_param(n, int, 0)
 
 /* Bit map of interrupts to choose from */
 INT_MODULE_PARM(irq_mask, 0xdeb8);
 static int irq_list[4] = { -1 };
-MODULE_PARM(irq_list, "1-4i");
+module_param_array(irq_list, int, NULL, 0);
 
 INT_MODULE_PARM(epp_mode, 1);
 
diff -Nru a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c
--- a/drivers/parport/parport_pc.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/parport/parport_pc.c	2005-01-10 20:11:22 -08:00
@@ -193,6 +193,7 @@
 
 #ifdef CONFIG_PARPORT_1284
 /* Find FIFO lossage; FIFO is reset */
+#if 0
 static int get_fifo_residue (struct parport *p)
 {
 	int residue;
@@ -233,6 +234,7 @@
 	DPRINTK (KERN_DEBUG "*** get_fifo_residue: done residue collecting (ecr = 0x%2.2x)\n", inb (ECONTROL (p)));
 	return residue;
 }
+#endif  /*  0 */
 #endif /* IEEE 1284 support */
 #endif /* FIFO support */
 
@@ -273,7 +275,7 @@
 	return IRQ_HANDLED;
 }
 
-void parport_pc_init_state(struct pardevice *dev, struct parport_state *s)
+static void parport_pc_init_state(struct pardevice *dev, struct parport_state *s)
 {
 	s->u.pc.ctr = 0xc;
 	if (dev->irq_func &&
@@ -285,7 +287,7 @@
 			     * D.Gruszka VScom */
 }
 
-void parport_pc_save_state(struct parport *p, struct parport_state *s)
+static void parport_pc_save_state(struct parport *p, struct parport_state *s)
 {
 	const struct parport_pc_private *priv = p->physport->private_data;
 	s->u.pc.ctr = priv->ctr;
@@ -293,7 +295,7 @@
 		s->u.pc.ecr = inb (ECONTROL (p));
 }
 
-void parport_pc_restore_state(struct parport *p, struct parport_state *s)
+static void parport_pc_restore_state(struct parport *p, struct parport_state *s)
 {
 	struct parport_pc_private *priv = p->physport->private_data;
 	register unsigned char c = s->u.pc.ctr & priv->ctr_writable;
@@ -732,9 +734,9 @@
 }
 
 /* Parallel Port FIFO mode (ECP chipsets) */
-size_t parport_pc_compat_write_block_pio (struct parport *port,
-					  const void *buf, size_t length,
-					  int flags)
+static size_t parport_pc_compat_write_block_pio (struct parport *port,
+						 const void *buf, size_t length,
+						 int flags)
 {
 	size_t written;
 	int r;
@@ -809,9 +811,9 @@
 
 /* ECP */
 #ifdef CONFIG_PARPORT_1284
-size_t parport_pc_ecp_write_block_pio (struct parport *port,
-				       const void *buf, size_t length,
-				       int flags)
+static size_t parport_pc_ecp_write_block_pio (struct parport *port,
+					      const void *buf, size_t length,
+					      int flags)
 {
 	size_t written;
 	int r;
@@ -924,8 +926,10 @@
 	return written;
 }
 
-size_t parport_pc_ecp_read_block_pio (struct parport *port,
-				      void *buf, size_t length, int flags)
+#if 0
+static size_t parport_pc_ecp_read_block_pio (struct parport *port,
+					     void *buf, size_t length,
+					     int flags)
 {
 	size_t left = length;
 	size_t fifofull;
@@ -1143,7 +1147,7 @@
 dump_parport_state ("fwd idle", port);
 	return length - left;
 }
-
+#endif  /*  0  */
 #endif /* IEEE 1284 support */
 #endif /* Allowed to use FIFO/DMA */
 
@@ -1156,7 +1160,7 @@
 
 /* GCC is not inlining extern inline function later overwriten to non-inline,
    so we use outlined_ variants here.  */
-struct parport_operations parport_pc_ops = 
+static struct parport_operations parport_pc_ops =
 {
 	.write_data	= parport_pc_write_data,
 	.read_data	= parport_pc_read_data,
@@ -3176,7 +3180,6 @@
 #ifdef MODULE
 static const char *irq[PARPORT_PC_MAX_PORTS];
 static const char *dma[PARPORT_PC_MAX_PORTS];
-static char *init_mode;
 
 MODULE_PARM_DESC(io, "Base I/O address (SPP regs)");
 module_param_array(io, int, NULL, 0);
@@ -3192,8 +3195,9 @@
 module_param(verbose_probing, int, 0644);
 #endif
 #ifdef CONFIG_PCI
+static char *init_mode;
 MODULE_PARM_DESC(init_mode, "Initialise mode for VIA VT8231 port (spp, ps2, epp, ecp or ecpepp)");
-MODULE_PARM(init_mode, "s");
+module_param(init_mode, charp, 0);
 #endif
 
 static int __init parse_parport_params(void)
diff -Nru a/drivers/parport/probe.c b/drivers/parport/probe.c
--- a/drivers/parport/probe.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/parport/probe.c	2005-01-10 20:11:17 -08:00
@@ -164,8 +164,16 @@
 		if (retval != 2) goto end_id;
 
 		idlen = (length[0] << 8) + length[1] - 2;
-		if (idlen < len)
+		/*
+		 * Check if the caller-allocated buffer is large enough
+		 * otherwise bail out or there will be an at least off by one.
+		 */
+		if (idlen + 1 < len)
 			len = idlen;
+		else {
+			retval = -EINVAL;
+			goto out;
+		}
 		retval = parport_read (dev->port, buffer, len);
 
 		if (retval != len)
@@ -205,11 +213,12 @@
 		buffer[len] = '\0';
 		parport_negotiate (dev->port, IEEE1284_MODE_COMPAT);
 	}
-	parport_release (dev);
 
 	if (retval > 2)
 		parse_data (dev->port, dev->daisy, buffer);
 
+out:
+	parport_release (dev);
 	parport_close (dev);
 	return retval;
 }
diff -Nru a/drivers/parport/share.c b/drivers/parport/share.c
--- a/drivers/parport/share.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/parport/share.c	2005-01-10 20:11:19 -08:00
@@ -306,7 +306,7 @@
 	tmp->ops = ops;
 	tmp->physport = tmp;
 	memset (tmp->probe_info, 0, 5 * sizeof (struct parport_device_info));
-	tmp->cad_lock = RW_LOCK_UNLOCKED;
+	rwlock_init(&tmp->cad_lock);
 	spin_lock_init(&tmp->waitlist_lock);
 	spin_lock_init(&tmp->pardevice_lock);
 	tmp->ieee1284.mode = IEEE1284_MODE_COMPAT;
diff -Nru a/drivers/pci/hotplug/Kconfig b/drivers/pci/hotplug/Kconfig
--- a/drivers/pci/hotplug/Kconfig	2005-01-10 20:11:24 -08:00
+++ b/drivers/pci/hotplug/Kconfig	2005-01-10 20:11:24 -08:00
@@ -3,11 +3,11 @@
 #
 
 menu "PCI Hotplug Support"
-	depends on HOTPLUG
 
 config HOTPLUG_PCI
 	tristate "Support for PCI Hotplug (EXPERIMENTAL)"
 	depends on PCI && EXPERIMENTAL
+	select HOTPLUG
 	---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
diff -Nru a/drivers/pci/hotplug/acpiphp_ibm.c b/drivers/pci/hotplug/acpiphp_ibm.c
--- a/drivers/pci/hotplug/acpiphp_ibm.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/pci/hotplug/acpiphp_ibm.c	2005-01-10 20:11:21 -08:00
@@ -47,7 +47,7 @@
 MODULE_DESCRIPTION(DRIVER_DESC);
 MODULE_LICENSE("GPL");
 MODULE_VERSION(DRIVER_VERSION);
-module_param(debug, bool, 644);
+module_param(debug, bool, 0644);
 MODULE_PARM_DESC(debug, " Debugging mode enabled or not");
 #define MY_NAME "acpiphp_ibm"
 
diff -Nru a/drivers/pci/hotplug/cpci_hotplug_pci.c b/drivers/pci/hotplug/cpci_hotplug_pci.c
--- a/drivers/pci/hotplug/cpci_hotplug_pci.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/pci/hotplug/cpci_hotplug_pci.c	2005-01-10 20:11:20 -08:00
@@ -32,7 +32,7 @@
 #include "pci_hotplug.h"
 #include "cpci_hotplug.h"
 
-#if !defined(CONFIG_HOTPLUG_CPCI_MODULE)
+#if !defined(MODULE)
 #define MY_NAME	"cpci_hotplug"
 #else
 #define MY_NAME	THIS_MODULE->name
diff -Nru a/drivers/pci/hotplug/cpcihp_generic.c b/drivers/pci/hotplug/cpcihp_generic.c
--- a/drivers/pci/hotplug/cpcihp_generic.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/pci/hotplug/cpcihp_generic.c	2005-01-10 20:11:19 -08:00
@@ -45,7 +45,7 @@
 #define DRIVER_AUTHOR	"Scott Murray <scottm@somanetworks.com>"
 #define DRIVER_DESC	"Generic port I/O CompactPCI Hot Plug Driver"
 
-#if !defined(CONFIG_HOTPLUG_CPCI_GENERIC_MODULE)
+#if !defined(MODULE)
 #define MY_NAME	"cpcihp_generic"
 #else
 #define MY_NAME	THIS_MODULE->name
diff -Nru a/drivers/pci/hotplug/cpqphp_pci.c b/drivers/pci/hotplug/cpqphp_pci.c
--- a/drivers/pci/hotplug/cpqphp_pci.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/pci/hotplug/cpqphp_pci.c	2005-01-10 20:11:22 -08:00
@@ -151,18 +151,29 @@
  */
 int cpqhp_set_irq (u8 bus_num, u8 dev_num, u8 int_pin, u8 irq_num)
 {
-	int rc;
-	u16 temp_word;
-	struct pci_dev fakedev;
-	struct pci_bus fakebus;
+	int rc = 0;
 
 	if (cpqhp_legacy_mode) {
-		fakedev.devfn = dev_num << 3;
-		fakedev.bus = &fakebus;
-		fakebus.number = bus_num;
+		struct pci_dev *fakedev;
+		struct pci_bus *fakebus;
+		u16 temp_word;
+
+		fakedev = kmalloc(sizeof(*fakedev), GFP_KERNEL);
+		fakebus = kmalloc(sizeof(*fakebus), GFP_KERNEL);
+		if (!fakedev || !fakebus) {
+			kfree(fakedev);
+			kfree(fakebus);
+			return -ENOMEM;
+		}
+
+		fakedev->devfn = dev_num << 3;
+		fakedev->bus = fakebus;
+		fakebus->number = bus_num;
 		dbg("%s: dev %d, bus %d, pin %d, num %d\n",
 		    __FUNCTION__, dev_num, bus_num, int_pin, irq_num);
-		rc = pcibios_set_irq_routing(&fakedev, int_pin - 0x0a, irq_num);
+		rc = pcibios_set_irq_routing(fakedev, int_pin - 0x0a, irq_num);
+		kfree(fakedev);
+		kfree(fakebus);
 		dbg("%s: rc %d\n", __FUNCTION__, rc);
 		if (!rc)
 			return !rc;
@@ -176,9 +187,10 @@
 		// This should only be for x86 as it sets the Edge Level Control Register
 		outb((u8) (temp_word & 0xFF), 0x4d0);
 		outb((u8) ((temp_word & 0xFF00) >> 8), 0x4d1);
+		rc = 0;
 	}
 
-	return 0;
+	return rc;
 }
 
 
diff -Nru a/drivers/pci/hotplug/fakephp.c b/drivers/pci/hotplug/fakephp.c
--- a/drivers/pci/hotplug/fakephp.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/pci/hotplug/fakephp.c	2005-01-10 20:11:20 -08:00
@@ -40,7 +40,7 @@
 #include "pci_hotplug.h"
 #include "../pci.h"
 
-#if !defined(CONFIG_HOTPLUG_PCI_FAKE_MODULE)
+#if !defined(MODULE)
 	#define MY_NAME	"fakephp"
 #else
 	#define MY_NAME	THIS_MODULE->name
diff -Nru a/drivers/pci/hotplug/ibmphp.h b/drivers/pci/hotplug/ibmphp.h
--- a/drivers/pci/hotplug/ibmphp.h	2005-01-10 20:11:16 -08:00
+++ b/drivers/pci/hotplug/ibmphp.h	2005-01-10 20:11:16 -08:00
@@ -34,7 +34,7 @@
 
 extern int ibmphp_debug;
 
-#if !defined(CONFIG_HOTPLUG_PCI_IBM_MODULE)
+#if !defined(MODULE)
 	#define MY_NAME "ibmphpd"
 #else
 	#define MY_NAME THIS_MODULE->name
diff -Nru a/drivers/pci/hotplug/ibmphp_core.c b/drivers/pci/hotplug/ibmphp_core.c
--- a/drivers/pci/hotplug/ibmphp_core.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/pci/hotplug/ibmphp_core.c	2005-01-10 20:11:23 -08:00
@@ -59,7 +59,8 @@
 struct pci_bus *ibmphp_pci_bus;
 static int max_slots;
 
-static int irqs[16];    /* PIC mode IRQ's we're using so far (in case MPS tables don't provide default info for empty slots */
+static int irqs[16];    /* PIC mode IRQ's we're using so far (in case MPS
+			 * tables don't provide default info for empty slots */
 
 static int init_flag;
 
@@ -71,36 +72,40 @@
 	return get_max_adapter_speed_1 (hs, value, 1);
 }
 */
-static inline int get_cur_bus_info (struct slot **sl) 
+static inline int get_cur_bus_info(struct slot **sl) 
 {
 	int rc = 1;
 	struct slot * slot_cur = *sl;
 
-	debug ("options = %x\n", slot_cur->ctrl->options);
-	debug ("revision = %x\n", slot_cur->ctrl->revision);	
+	debug("options = %x\n", slot_cur->ctrl->options);
+	debug("revision = %x\n", slot_cur->ctrl->revision);	
 
-	if (READ_BUS_STATUS (slot_cur->ctrl)) 
-		rc = ibmphp_hpc_readslot (slot_cur, READ_BUSSTATUS, NULL);
+	if (READ_BUS_STATUS(slot_cur->ctrl)) 
+		rc = ibmphp_hpc_readslot(slot_cur, READ_BUSSTATUS, NULL);
 	
 	if (rc) 
 		return rc;
 	  
-	slot_cur->bus_on->current_speed = CURRENT_BUS_SPEED (slot_cur->busstatus);
-	if (READ_BUS_MODE (slot_cur->ctrl))
-		slot_cur->bus_on->current_bus_mode = CURRENT_BUS_MODE (slot_cur->busstatus);
+	slot_cur->bus_on->current_speed = CURRENT_BUS_SPEED(slot_cur->busstatus);
+	if (READ_BUS_MODE(slot_cur->ctrl))
+		slot_cur->bus_on->current_bus_mode =
+				CURRENT_BUS_MODE(slot_cur->busstatus);
 	else
 		slot_cur->bus_on->current_bus_mode = 0xFF;
 
-	debug ("busstatus = %x, bus_speed = %x, bus_mode = %x\n", slot_cur->busstatus, slot_cur->bus_on->current_speed, slot_cur->bus_on->current_bus_mode);
+	debug("busstatus = %x, bus_speed = %x, bus_mode = %x\n",
+			slot_cur->busstatus,
+			slot_cur->bus_on->current_speed,
+			slot_cur->bus_on->current_bus_mode);
 	
 	*sl = slot_cur;
 	return 0;
 }
 
-static inline int slot_update (struct slot **sl)
+static inline int slot_update(struct slot **sl)
 {
 	int rc;
- 	rc = ibmphp_hpc_readslot (*sl, READ_ALLSTAT, NULL);
+ 	rc = ibmphp_hpc_readslot(*sl, READ_ALLSTAT, NULL);
 	if (rc) 
 		return rc;
 	if (!init_flag)
@@ -114,10 +119,10 @@
 	struct list_head * tmp;
 	u8 slot_count = 0;
 
-	list_for_each (tmp, &ibmphp_slot_head) {
-		slot_cur = list_entry (tmp, struct slot, ibm_slot_list);
+	list_for_each(tmp, &ibmphp_slot_head) {
+		slot_cur = list_entry(tmp, struct slot, ibm_slot_list);
 		/* sometimes the hot-pluggable slots start with 4 (not always from 1) */
-		slot_count = max (slot_count, slot_cur->number);
+		slot_count = max(slot_count, slot_cur->number);
 	}
 	return slot_count;
 }
@@ -128,46 +133,61 @@
  * Parameters: struct slot
  * Returns 0 or errors
  */
-int ibmphp_init_devno (struct slot **cur_slot)
+int ibmphp_init_devno(struct slot **cur_slot)
 {
 	struct irq_routing_table *rtable;
 	int len;
 	int loop;
 	int i;
 
-	rtable = pcibios_get_irq_routing_table ();
+	rtable = pcibios_get_irq_routing_table();
 	if (!rtable) {
-		err ("no BIOS routing table...\n");
+		err("no BIOS routing table...\n");
 		return -ENOMEM;
 	}
 
-	len = (rtable->size - sizeof (struct irq_routing_table)) / sizeof (struct irq_info);
+	len = (rtable->size - sizeof(struct irq_routing_table)) /
+			sizeof(struct irq_info);
 
 	if (!len)
 		return -1;
 	for (loop = 0; loop < len; loop++) {
 		if ((*cur_slot)->number == rtable->slots[loop].slot) {
 		if ((*cur_slot)->bus == rtable->slots[loop].bus) {
-			(*cur_slot)->device = PCI_SLOT (rtable->slots[loop].devfn);
+			(*cur_slot)->device = PCI_SLOT(rtable->slots[loop].devfn);
 			for (i = 0; i < 4; i++)
-				(*cur_slot)->irq[i] = IO_APIC_get_PCI_irq_vector ((int) (*cur_slot)->bus, (int) (*cur_slot)->device, i);
+				(*cur_slot)->irq[i] = IO_APIC_get_PCI_irq_vector((int) (*cur_slot)->bus,
+						(int) (*cur_slot)->device, i);
 
-				debug ("(*cur_slot)->irq[0] = %x\n", (*cur_slot)->irq[0]);
-				debug ("(*cur_slot)->irq[1] = %x\n", (*cur_slot)->irq[1]);
-				debug ("(*cur_slot)->irq[2] = %x\n", (*cur_slot)->irq[2]);
-				debug ("(*cur_slot)->irq[3] = %x\n", (*cur_slot)->irq[3]);
-
-				debug ("rtable->exlusive_irqs = %x\n", rtable->exclusive_irqs);
-				debug ("rtable->slots[loop].irq[0].bitmap = %x\n", rtable->slots[loop].irq[0].bitmap);
-				debug ("rtable->slots[loop].irq[1].bitmap = %x\n", rtable->slots[loop].irq[1].bitmap);
-				debug ("rtable->slots[loop].irq[2].bitmap = %x\n", rtable->slots[loop].irq[2].bitmap);
-				debug ("rtable->slots[loop].irq[3].bitmap = %x\n", rtable->slots[loop].irq[3].bitmap);
-
-				debug ("rtable->slots[loop].irq[0].link= %x\n", rtable->slots[loop].irq[0].link);
-				debug ("rtable->slots[loop].irq[1].link = %x\n", rtable->slots[loop].irq[1].link);
-				debug ("rtable->slots[loop].irq[2].link = %x\n", rtable->slots[loop].irq[2].link);
-				debug ("rtable->slots[loop].irq[3].link = %x\n", rtable->slots[loop].irq[3].link);
-				debug ("end of init_devno\n");
+				debug("(*cur_slot)->irq[0] = %x\n",
+						(*cur_slot)->irq[0]);
+				debug("(*cur_slot)->irq[1] = %x\n",
+						(*cur_slot)->irq[1]);
+				debug("(*cur_slot)->irq[2] = %x\n",
+						(*cur_slot)->irq[2]);
+				debug("(*cur_slot)->irq[3] = %x\n",
+						(*cur_slot)->irq[3]);
+
+				debug("rtable->exlusive_irqs = %x\n",
+					rtable->exclusive_irqs);
+				debug("rtable->slots[loop].irq[0].bitmap = %x\n",
+					rtable->slots[loop].irq[0].bitmap);
+				debug("rtable->slots[loop].irq[1].bitmap = %x\n",
+					rtable->slots[loop].irq[1].bitmap);
+				debug("rtable->slots[loop].irq[2].bitmap = %x\n",
+					rtable->slots[loop].irq[2].bitmap);
+				debug("rtable->slots[loop].irq[3].bitmap = %x\n",
+					rtable->slots[loop].irq[3].bitmap);
+
+				debug("rtable->slots[loop].irq[0].link = %x\n",
+					rtable->slots[loop].irq[0].link);
+				debug("rtable->slots[loop].irq[1].link = %x\n",
+					rtable->slots[loop].irq[1].link);
+				debug("rtable->slots[loop].irq[2].link = %x\n",
+					rtable->slots[loop].irq[2].link);
+				debug("rtable->slots[loop].irq[3].link = %x\n",
+					rtable->slots[loop].irq[3].link);
+				debug("end of init_devno\n");
 				return 0;
 			}
 		}
@@ -176,49 +196,50 @@
 	return -1;
 }
 
-static inline int power_on (struct slot *slot_cur)
+static inline int power_on(struct slot *slot_cur)
 {
 	u8 cmd = HPC_SLOT_ON;
 	int retval;
 
-	retval = ibmphp_hpc_writeslot (slot_cur, cmd);
+	retval = ibmphp_hpc_writeslot(slot_cur, cmd);
 	if (retval) {
-		err ("power on failed\n");
+		err("power on failed\n");
 		return retval;
 	}
-	if (CTLR_RESULT (slot_cur->ctrl->status)) {
-		err ("command not completed successfully in power_on\n");
+	if (CTLR_RESULT(slot_cur->ctrl->status)) {
+		err("command not completed successfully in power_on\n");
 		return -EIO;
 	}
 	msleep(3000);	/* For ServeRAID cards, and some 66 PCI */
 	return 0;
 }
 
-static inline int power_off (struct slot *slot_cur)
+static inline int power_off(struct slot *slot_cur)
 {
 	u8 cmd = HPC_SLOT_OFF;
 	int retval;
 
-	retval = ibmphp_hpc_writeslot (slot_cur, cmd);
+	retval = ibmphp_hpc_writeslot(slot_cur, cmd);
 	if (retval) {
-		err ("power off failed\n");
+		err("power off failed\n");
 		return retval;
 	}
-	if (CTLR_RESULT (slot_cur->ctrl->status)) {
-		err ("command not completed successfully in power_off\n");
+	if (CTLR_RESULT(slot_cur->ctrl->status)) {
+		err("command not completed successfully in power_off\n");
 		retval = -EIO;
 	}
 	return retval;
 }
 
-static int set_attention_status (struct hotplug_slot *hotplug_slot, u8 value)
+static int set_attention_status(struct hotplug_slot *hotplug_slot, u8 value)
 {
 	int rc = 0;
 	struct slot *pslot;
 	u8 cmd;
 
-	debug ("set_attention_status - Entry hotplug_slot[%lx] value[%x]\n", (ulong) hotplug_slot, value);
-	ibmphp_lock_operations ();
+	debug("set_attention_status - Entry hotplug_slot[%lx] value[%x]\n",
+			(ulong) hotplug_slot, value);
+	ibmphp_lock_operations();
 	cmd = 0x00;     // avoid compiler warning
 
 	if (hotplug_slot) {
@@ -234,11 +255,12 @@
 			break;
 		default:
 			rc = -ENODEV;
-			err ("set_attention_status - Error : invalid input [%x]\n", value);
+			err("set_attention_status - Error : invalid input [%x]\n",
+					value);
 			break;
 		}
 		if (rc == 0) {
-			pslot = (struct slot *) hotplug_slot->private;
+			pslot = hotplug_slot->private;
 			if (pslot)
 				rc = ibmphp_hpc_writeslot(pslot, cmd);
 			else
@@ -247,101 +269,114 @@
 	} else	
 		rc = -ENODEV;
 
-	ibmphp_unlock_operations ();
+	ibmphp_unlock_operations();
 
-	debug ("set_attention_status - Exit rc[%d]\n", rc);
+	debug("set_attention_status - Exit rc[%d]\n", rc);
 	return rc;
 }
 
-static int get_attention_status (struct hotplug_slot *hotplug_slot, u8 * value)
+static int get_attention_status(struct hotplug_slot *hotplug_slot, u8 * value)
 {
 	int rc = -ENODEV;
 	struct slot *pslot;
 	struct slot myslot;
 
-	debug ("get_attention_status - Entry hotplug_slot[%lx] pvalue[%lx]\n", (ulong) hotplug_slot, (ulong) value);
+	debug("get_attention_status - Entry hotplug_slot[%lx] pvalue[%lx]\n",
+					(ulong) hotplug_slot, (ulong) value);
         
-	ibmphp_lock_operations ();
+	ibmphp_lock_operations();
 	if (hotplug_slot && value) {
-		pslot = (struct slot *) hotplug_slot->private;
+		pslot = hotplug_slot->private;
 		if (pslot) {
-			memcpy ((void *) &myslot, (void *) pslot, sizeof (struct slot));
-			rc = ibmphp_hpc_readslot(pslot, READ_SLOTSTATUS, &(myslot.status));
+			memcpy(&myslot, pslot, sizeof(struct slot));
+			rc = ibmphp_hpc_readslot(pslot, READ_SLOTSTATUS,
+						&(myslot.status));
 			if (!rc)
-				rc = ibmphp_hpc_readslot(pslot, READ_EXTSLOTSTATUS, &(myslot.ext_status));
+				rc = ibmphp_hpc_readslot(pslot,
+						READ_EXTSLOTSTATUS,
+						&(myslot.ext_status));
 			if (!rc)
-				*value = SLOT_ATTN (myslot.status, myslot.ext_status);
+				*value = SLOT_ATTN(myslot.status,
+						myslot.ext_status);
 		}
 	}
 
-	ibmphp_unlock_operations ();
+	ibmphp_unlock_operations();
 	debug("get_attention_status - Exit rc[%d] value[%x]\n", rc, *value);
 	return rc;
 }
 
-static int get_latch_status (struct hotplug_slot *hotplug_slot, u8 * value)
+static int get_latch_status(struct hotplug_slot *hotplug_slot, u8 * value)
 {
 	int rc = -ENODEV;
 	struct slot *pslot;
 	struct slot myslot;
 
-	debug ("get_latch_status - Entry hotplug_slot[%lx] pvalue[%lx]\n", (ulong) hotplug_slot, (ulong) value);
-	ibmphp_lock_operations ();
+	debug("get_latch_status - Entry hotplug_slot[%lx] pvalue[%lx]\n",
+					(ulong) hotplug_slot, (ulong) value);
+	ibmphp_lock_operations();
 	if (hotplug_slot && value) {
-		pslot = (struct slot *) hotplug_slot->private;
+		pslot = hotplug_slot->private;
 		if (pslot) {
-			memcpy ((void *) &myslot, (void *) pslot, sizeof (struct slot));
-			rc = ibmphp_hpc_readslot(pslot, READ_SLOTSTATUS, &(myslot.status));
+			memcpy(&myslot, pslot, sizeof(struct slot));
+			rc = ibmphp_hpc_readslot(pslot, READ_SLOTSTATUS,
+						&(myslot.status));
 			if (!rc)
-				*value = SLOT_LATCH (myslot.status);
+				*value = SLOT_LATCH(myslot.status);
 		}
 	}
 
-	ibmphp_unlock_operations ();
-	debug("get_latch_status - Exit rc[%d] rc[%x] value[%x]\n", rc, rc, *value);
+	ibmphp_unlock_operations();
+	debug("get_latch_status - Exit rc[%d] rc[%x] value[%x]\n",
+			rc, rc, *value);
 	return rc;
 }
 
 
-static int get_power_status (struct hotplug_slot *hotplug_slot, u8 * value)
+static int get_power_status(struct hotplug_slot *hotplug_slot, u8 * value)
 {
 	int rc = -ENODEV;
 	struct slot *pslot;
 	struct slot myslot;
 
-	debug ("get_power_status - Entry hotplug_slot[%lx] pvalue[%lx]\n", (ulong) hotplug_slot, (ulong) value);
-	ibmphp_lock_operations ();
+	debug("get_power_status - Entry hotplug_slot[%lx] pvalue[%lx]\n",
+					(ulong) hotplug_slot, (ulong) value);
+	ibmphp_lock_operations();
 	if (hotplug_slot && value) {
-		pslot = (struct slot *) hotplug_slot->private;
+		pslot = hotplug_slot->private;
 		if (pslot) {
-			memcpy ((void *) &myslot, (void *) pslot, sizeof (struct slot));
-			rc = ibmphp_hpc_readslot(pslot, READ_SLOTSTATUS, &(myslot.status));
+			memcpy(&myslot, pslot, sizeof(struct slot));
+			rc = ibmphp_hpc_readslot(pslot, READ_SLOTSTATUS,
+						&(myslot.status));
 			if (!rc)
-				*value = SLOT_PWRGD (myslot.status);
+				*value = SLOT_PWRGD(myslot.status);
 		}
 	}
 
-	ibmphp_unlock_operations ();
-	debug("get_power_status - Exit rc[%d] rc[%x] value[%x]\n", rc, rc, *value);
+	ibmphp_unlock_operations();
+	debug("get_power_status - Exit rc[%d] rc[%x] value[%x]\n",
+			rc, rc, *value);
 	return rc;
 }
 
-static int get_adapter_present (struct hotplug_slot *hotplug_slot, u8 * value)
+static int get_adapter_present(struct hotplug_slot *hotplug_slot, u8 * value)
 {
 	int rc = -ENODEV;
 	struct slot *pslot;
 	u8 present;
 	struct slot myslot;
 
-	debug ("get_adapter_status - Entry hotplug_slot[%lx] pvalue[%lx]\n", (ulong) hotplug_slot, (ulong) value);
-	ibmphp_lock_operations ();
+	debug("get_adapter_status - Entry hotplug_slot[%lx] pvalue[%lx]\n",
+					(ulong) hotplug_slot, (ulong) value);
+	ibmphp_lock_operations();
 	if (hotplug_slot && value) {
-		pslot = (struct slot *) hotplug_slot->private;
+		pslot = hotplug_slot->private;
 		if (pslot) {
-			memcpy ((void *) &myslot, (void *) pslot, sizeof (struct slot));
-			rc = ibmphp_hpc_readslot(pslot, READ_SLOTSTATUS, &(myslot.status));
+			memcpy(&myslot, pslot, sizeof(struct slot));
+			rc = ibmphp_hpc_readslot(pslot, READ_SLOTSTATUS,
+						&(myslot.status));
 			if (!rc) {
-				present = SLOT_PRESENT (myslot.status);
+				present = SLOT_PRESENT(myslot.status);
 				if (present == HPC_SLOT_EMPTY)
 					*value = 0;
 				else
@@ -350,24 +385,24 @@
 		}
 	}
 
-	ibmphp_unlock_operations ();
+	ibmphp_unlock_operations();
 	debug("get_adapter_present - Exit rc[%d] value[%x]\n", rc, *value);
 	return rc;
 }
 
-static int get_max_bus_speed (struct hotplug_slot *hotplug_slot, enum pci_bus_speed *value)
+static int get_max_bus_speed(struct hotplug_slot *hotplug_slot, enum pci_bus_speed *value)
 {
 	int rc = -ENODEV;
 	struct slot *pslot;
 	u8 mode = 0;
 
-	debug ("%s - Entry hotplug_slot[%p] pvalue[%p]\n", __FUNCTION__,
+	debug("%s - Entry hotplug_slot[%p] pvalue[%p]\n", __FUNCTION__,
 		hotplug_slot, value);
 
-	ibmphp_lock_operations ();
+	ibmphp_lock_operations();
 
 	if (hotplug_slot && value) {
-		pslot = (struct slot *) hotplug_slot->private;
+		pslot = hotplug_slot->private;
 		if (pslot) {
 			rc = 0;
 			mode = pslot->supported_bus_mode;
@@ -390,26 +425,26 @@
 		}
 	}
 
-	ibmphp_unlock_operations ();
-	debug ("%s - Exit rc[%d] value[%x]\n", __FUNCTION__, rc, *value);
+	ibmphp_unlock_operations();
+	debug("%s - Exit rc[%d] value[%x]\n", __FUNCTION__, rc, *value);
 	return rc;
 }
 
-static int get_cur_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)
 {
 	int rc = -ENODEV;
 	struct slot *pslot;
 	u8 mode = 0;
 
-	debug ("%s - Entry hotplug_slot[%p] pvalue[%p]\n", __FUNCTION__,
+	debug("%s - Entry hotplug_slot[%p] pvalue[%p]\n", __FUNCTION__,
 		hotplug_slot, value);
 
-	ibmphp_lock_operations ();
+	ibmphp_lock_operations();
 
 	if (hotplug_slot && value) {
-		pslot = (struct slot *) hotplug_slot->private;
+		pslot = hotplug_slot->private;
 		if (pslot) {
-			rc = get_cur_bus_info (&pslot);
+			rc = get_cur_bus_info(&pslot);
 			if (!rc) {
 				mode = pslot->bus_on->current_bus_mode;
 				*value = pslot->bus_on->current_speed;
@@ -436,121 +471,129 @@
 		}
 	}
 
-	ibmphp_unlock_operations ();
-	debug ("%s - Exit rc[%d] value[%x]\n", __FUNCTION__, rc, *value);
+	ibmphp_unlock_operations();
+	debug("%s - Exit rc[%d] value[%x]\n", __FUNCTION__, rc, *value);
 	return rc;
 }
+
 /*
-static int get_max_adapter_speed_1 (struct hotplug_slot *hotplug_slot, u8 * value, u8 flag)
+static int get_max_adapter_speed_1(struct hotplug_slot *hotplug_slot, u8 * value, u8 flag)
 {
 	int rc = -ENODEV;
 	struct slot *pslot;
 	struct slot myslot;
 
-	debug ("get_max_adapter_speed_1 - Entry hotplug_slot[%lx] pvalue[%lx]\n", (ulong)hotplug_slot, (ulong) value);
+	debug("get_max_adapter_speed_1 - Entry hotplug_slot[%lx] pvalue[%lx]\n",
+						(ulong)hotplug_slot, (ulong) value);
 
 	if (flag)
-		ibmphp_lock_operations ();
+		ibmphp_lock_operations();
 
 	if (hotplug_slot && value) {
-		pslot = (struct slot *) hotplug_slot->private;
+		pslot = hotplug_slot->private;
 		if (pslot) {
-			memcpy ((void *) &myslot, (void *) pslot, sizeof (struct slot));
-			rc = ibmphp_hpc_readslot(pslot, READ_SLOTSTATUS, &(myslot.status));
-
-			if (!(SLOT_LATCH (myslot.status)) && (SLOT_PRESENT (myslot.status))) {
-				rc = ibmphp_hpc_readslot(pslot, READ_EXTSLOTSTATUS, &(myslot.ext_status));
+			memcpy(&myslot, pslot, sizeof(struct slot));
+			rc = ibmphp_hpc_readslot(pslot, READ_SLOTSTATUS,
+						&(myslot.status));
+
+			if (!(SLOT_LATCH (myslot.status)) &&
+					(SLOT_PRESENT (myslot.status))) {
+				rc = ibmphp_hpc_readslot(pslot,
+						READ_EXTSLOTSTATUS,
+						&(myslot.ext_status));
 				if (!rc)
-					*value = SLOT_SPEED (myslot.ext_status);
+					*value = SLOT_SPEED(myslot.ext_status);
 			} else
 				*value = MAX_ADAPTER_NONE;
                 }
 	}
 
 	if (flag)
-		ibmphp_unlock_operations ();
+		ibmphp_unlock_operations();
 
 	debug("get_max_adapter_speed_1 - Exit rc[%d] value[%x]\n", rc, *value);
 	return rc;
 }
 
-static int get_bus_name (struct hotplug_slot *hotplug_slot, char * value)
+static int get_bus_name(struct hotplug_slot *hotplug_slot, char * value)
 {
 	int rc = -ENODEV;
 	struct slot *pslot = NULL;
 
-	debug ("get_bus_name - Entry hotplug_slot[%lx]\n", (ulong)hotplug_slot);
+	debug("get_bus_name - Entry hotplug_slot[%lx]\n", (ulong)hotplug_slot);
 
-	ibmphp_lock_operations ();
+	ibmphp_lock_operations();
 
 	if (hotplug_slot) {
-		pslot = (struct slot *) hotplug_slot->private;
+		pslot = hotplug_slot->private;
 		if (pslot) {
 			rc = 0;
-			snprintf (value, 100, "Bus %x", pslot->bus);
+			snprintf(value, 100, "Bus %x", pslot->bus);
 		}
 	} else
 		rc = -ENODEV;
 
-	ibmphp_unlock_operations ();
-	debug ("get_bus_name - Exit rc[%d] value[%x]\n", rc, *value);
+	ibmphp_unlock_operations();
+	debug("get_bus_name - Exit rc[%d] value[%x]\n", rc, *value);
 	return rc;
 }
 */
 
-/*******************************************************************************
+/****************************************************************************
  * This routine will initialize the ops data structure used in the validate
  * function. It will also power off empty slots that are powered on since BIOS
  * leaves those on, albeit disconnected
- ******************************************************************************/
-static int __init init_ops (void)
+ ****************************************************************************/
+static int __init init_ops(void)
 {
 	struct slot *slot_cur;
 	struct list_head *tmp;
 	int retval;
 	int rc;
 
-	list_for_each (tmp, &ibmphp_slot_head) {
-		slot_cur = list_entry (tmp, struct slot, ibm_slot_list);
+	list_for_each(tmp, &ibmphp_slot_head) {
+		slot_cur = list_entry(tmp, struct slot, ibm_slot_list);
 
 		if (!slot_cur)
 			return -ENODEV;
 
-		debug ("BEFORE GETTING SLOT STATUS, slot # %x\n", slot_cur->number);
+		debug("BEFORE GETTING SLOT STATUS, slot # %x\n",
+							slot_cur->number);
 		if (slot_cur->ctrl->revision == 0xFF) 
-			if (get_ctrl_revision (slot_cur, &slot_cur->ctrl->revision))
+			if (get_ctrl_revision(slot_cur,
+						&slot_cur->ctrl->revision))
 				return -1;
 
 		if (slot_cur->bus_on->current_speed == 0xFF) 
-			if (get_cur_bus_info (&slot_cur)) 
+			if (get_cur_bus_info(&slot_cur)) 
 				return -1;
 
 		if (slot_cur->ctrl->options == 0xFF)
-			if (get_hpc_options (slot_cur, &slot_cur->ctrl->options))
+			if (get_hpc_options(slot_cur, &slot_cur->ctrl->options))
 				return -1;
 
-		retval = slot_update (&slot_cur);
+		retval = slot_update(&slot_cur);
 		if (retval)
 			return retval;
 
-		debug ("status = %x\n", slot_cur->status);
-		debug ("ext_status = %x\n", slot_cur->ext_status);
-		debug ("SLOT_POWER = %x\n", SLOT_POWER (slot_cur->status));
-		debug ("SLOT_PRESENT = %x\n", SLOT_PRESENT (slot_cur->status));
-		debug ("SLOT_LATCH = %x\n", SLOT_LATCH (slot_cur->status));
-
-		if ((SLOT_PWRGD (slot_cur->status)) && 
-		    !(SLOT_PRESENT (slot_cur->status)) && 
-		    !(SLOT_LATCH (slot_cur->status))) {
-			debug ("BEFORE POWER OFF COMMAND\n");
-				rc = power_off (slot_cur);
+		debug("status = %x\n", slot_cur->status);
+		debug("ext_status = %x\n", slot_cur->ext_status);
+		debug("SLOT_POWER = %x\n", SLOT_POWER(slot_cur->status));
+		debug("SLOT_PRESENT = %x\n", SLOT_PRESENT(slot_cur->status));
+		debug("SLOT_LATCH = %x\n", SLOT_LATCH(slot_cur->status));
+
+		if ((SLOT_PWRGD(slot_cur->status)) && 
+		    !(SLOT_PRESENT(slot_cur->status)) && 
+		    !(SLOT_LATCH(slot_cur->status))) {
+			debug("BEFORE POWER OFF COMMAND\n");
+				rc = power_off(slot_cur);
 				if (rc)
 					return rc;
 
-	/*		retval = slot_update (&slot_cur);
+	/*		retval = slot_update(&slot_cur);
 	 *		if (retval)
 	 *			return retval;
-	 *		ibmphp_update_slot_info (slot_cur);
+	 *		ibmphp_update_slot_info(slot_cur);
 	 */
 		}
 	}
@@ -563,7 +606,7 @@
  * Parameters: slot, operation
  * Returns: 0 or error codes
  */
-static int validate (struct slot *slot_cur, int opn)
+static int validate(struct slot *slot_cur, int opn)
 {
 	int number;
 	int retval;
@@ -573,89 +616,91 @@
 	number = slot_cur->number;
 	if ((number > max_slots) || (number < 0))
 		return -EBADSLT;
-	debug ("slot_number in validate is %d\n", slot_cur->number);
+	debug("slot_number in validate is %d\n", slot_cur->number);
 
-	retval = slot_update (&slot_cur);
+	retval = slot_update(&slot_cur);
 	if (retval)
 		return retval;
 
 	switch (opn) {
 		case ENABLE:
-			if (!(SLOT_PWRGD (slot_cur->status)) && 
-			     (SLOT_PRESENT (slot_cur->status)) && 
-			     !(SLOT_LATCH (slot_cur->status)))
+			if (!(SLOT_PWRGD(slot_cur->status)) && 
+			     (SLOT_PRESENT(slot_cur->status)) && 
+			     !(SLOT_LATCH(slot_cur->status)))
 				return 0;
 			break;
 		case DISABLE:
-			if ((SLOT_PWRGD (slot_cur->status)) && 
-			    (SLOT_PRESENT (slot_cur->status)) &&
-			    !(SLOT_LATCH (slot_cur->status)))
+			if ((SLOT_PWRGD(slot_cur->status)) && 
+			    (SLOT_PRESENT(slot_cur->status)) &&
+			    !(SLOT_LATCH(slot_cur->status)))
 				return 0;
 			break;
 		default:
 			break;
 	}
-	err ("validate failed....\n");
+	err("validate failed....\n");
 	return -EINVAL;
 }
 
-/********************************************************************************
+/****************************************************************************
  * This routine is for updating the data structures in the hotplug core
  * Parameters: struct slot
  * Returns: 0 or error
- *******************************************************************************/
-int ibmphp_update_slot_info (struct slot *slot_cur)
+ ****************************************************************************/
+int ibmphp_update_slot_info(struct slot *slot_cur)
 {
 	struct hotplug_slot_info *info;
 	int rc;
 	u8 bus_speed;
 	u8 mode;
 
-	info = kmalloc (sizeof (struct hotplug_slot_info), GFP_KERNEL);
+	info = kmalloc(sizeof(struct hotplug_slot_info), GFP_KERNEL);
 	if (!info) {
-		err ("out of system memory\n");
+		err("out of system memory\n");
 		return -ENOMEM;
 	}
         
-	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);
-        if (!SLOT_PRESENT (slot_cur->status)) {
+	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);
+        if (!SLOT_PRESENT(slot_cur->status)) {
                 info->adapter_status = 0;
-//		info->max_adapter_speed_status = MAX_ADAPTER_NONE;
+/*		info->max_adapter_speed_status = MAX_ADAPTER_NONE; */
 	} else {
                 info->adapter_status = 1;
-//		get_max_adapter_speed_1 (slot_cur->hotplug_slot, &info->max_adapter_speed_status, 0);
+/*		get_max_adapter_speed_1(slot_cur->hotplug_slot,
+					&info->max_adapter_speed_status, 0); */
 	}
 
 	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) 
+		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;
-		else if (mode == BUS_MODE_PCI)
-			;
-		else
+			break;
+		default:
 			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 (slot_cur->hotplug_slot, info);
-	kfree (info);
+	rc = pci_hp_change_slot_info(slot_cur->hotplug_slot, info);
+	kfree(info);
 	return rc;
 }
 
@@ -665,17 +710,19 @@
  * is called from visit routines
  ******************************************************************************/
 
-static struct pci_func *ibm_slot_find (u8 busno, u8 device, u8 function)
+static struct pci_func *ibm_slot_find(u8 busno, u8 device, u8 function)
 {
 	struct pci_func *func_cur;
 	struct slot *slot_cur;
 	struct list_head * tmp;
-	list_for_each (tmp, &ibmphp_slot_head) {
-		slot_cur = list_entry (tmp, struct slot, ibm_slot_list);
+	list_for_each(tmp, &ibmphp_slot_head) {
+		slot_cur = list_entry(tmp, struct slot, ibm_slot_list);
 		if (slot_cur->func) {
 			func_cur = slot_cur->func;
 			while (func_cur) {
-				if ((func_cur->busno == busno) && (func_cur->device == device) && (func_cur->function == function))
+				if ((func_cur->busno == busno) &&
+						(func_cur->device == device) &&
+						(func_cur->function == function))
 					return func_cur;
 				func_cur = func_cur->next;
 			}
@@ -689,19 +736,19 @@
  * the pointers to pci_func, bus, hotplug_slot, controller,
  * and deregistering from the hotplug core
  *************************************************************/
-static void free_slots (void)
+static void free_slots(void)
 {
 	struct slot *slot_cur;
 	struct list_head * tmp;
 	struct list_head * next;
 
-	debug ("%s -- enter\n", __FUNCTION__);
+	debug("%s -- enter\n", __FUNCTION__);
 
-	list_for_each_safe (tmp, next, &ibmphp_slot_head) {
-		slot_cur = list_entry (tmp, struct slot, ibm_slot_list);
-		pci_hp_deregister (slot_cur->hotplug_slot);
+	list_for_each_safe(tmp, next, &ibmphp_slot_head) {
+		slot_cur = list_entry(tmp, struct slot, ibm_slot_list);
+		pci_hp_deregister(slot_cur->hotplug_slot);
 	}
-	debug ("%s -- exit\n", __FUNCTION__);
+	debug("%s -- exit\n", __FUNCTION__);
 }
 
 static void ibm_unconfigure_device(struct pci_func *func)
@@ -710,7 +757,8 @@
 	u8 j;
 
 	debug("inside %s\n", __FUNCTION__);
-	debug("func->device = %x, func->function = %x\n", func->device, func->function);
+	debug("func->device = %x, func->function = %x\n",
+					func->device, func->function);
 	debug("func->device << 3 | 0x0  = %x\n", func->device << 3 | 0x0);
 
 	for (j = 0; j < 0x08; j++) {
@@ -725,25 +773,24 @@
  * getting bus entries, here we manually add those primary 
  * bus entries to kernel bus structure whenever apply
  */
-
-static u8 bus_structure_fixup (u8 busno)
+static u8 bus_structure_fixup(u8 busno)
 {
 	struct pci_bus *bus;
 	struct pci_dev *dev;
 	u16 l;
 
-	if (pci_find_bus(0, busno) || !(ibmphp_find_same_bus_num (busno)))
+	if (pci_find_bus(0, busno) || !(ibmphp_find_same_bus_num(busno)))
 		return 1;
 
-	bus = kmalloc (sizeof (*bus), GFP_KERNEL);
+	bus = kmalloc(sizeof(*bus), GFP_KERNEL);
 	if (!bus) {
-		err ("%s - out of memory\n", __FUNCTION__);
+		err("%s - out of memory\n", __FUNCTION__);
 		return 1;
 	}
-	dev = kmalloc (sizeof (*dev), GFP_KERNEL);
+	dev = kmalloc(sizeof(*dev), GFP_KERNEL);
 	if (!dev) {
-		kfree (bus);
-		err ("%s - out of memory\n", __FUNCTION__);
+		kfree(bus);
+		err("%s - out of memory\n", __FUNCTION__);
 		return 1;
 	}
 
@@ -751,50 +798,56 @@
 	bus->ops = ibmphp_pci_bus->ops;
 	dev->bus = bus;
 	for (dev->devfn = 0; dev->devfn < 256; dev->devfn += 8) {
-		if (!pci_read_config_word (dev, PCI_VENDOR_ID, &l) &&  l != 0x0000 && l != 0xffff) {
-			debug ("%s - Inside bus_struture_fixup()\n", __FUNCTION__);
-			pci_scan_bus (busno, ibmphp_pci_bus->ops, NULL);
+		if (!pci_read_config_word(dev, PCI_VENDOR_ID, &l) &&
+					(l != 0x0000) && (l != 0xffff)) {
+			debug("%s - Inside bus_struture_fixup()\n",
+							__FUNCTION__);
+			pci_scan_bus(busno, ibmphp_pci_bus->ops, NULL);
 			break;
 		}
 	}
 
-	kfree (dev);
-	kfree (bus);
+	kfree(dev);
+	kfree(bus);
 
 	return 0;
 }
 
-static int ibm_configure_device (struct pci_func *func)
+static int ibm_configure_device(struct pci_func *func)
 {
 	unsigned char bus;
 	struct pci_bus *child;
 	int num;
-	int flag = 0;	/* this is to make sure we don't double scan the bus, for bridged devices primarily */
+	int flag = 0;	/* this is to make sure we don't double scan the bus,
+					for bridged devices primarily */
 
-	if (!(bus_structure_fixup (func->busno)))
+	if (!(bus_structure_fixup(func->busno)))
 		flag = 1;
 	if (func->dev == NULL)
-		func->dev = pci_find_slot (func->busno, PCI_DEVFN(func->device, func->function));
+		func->dev = pci_find_slot(func->busno,
+				PCI_DEVFN(func->device, func->function));
 
 	if (func->dev == NULL) {
 		struct pci_bus *bus = pci_find_bus(0, func->busno);
 		if (!bus)
 			return 0;
 
-		num = pci_scan_slot(bus, PCI_DEVFN(func->device, func->function));
+		num = pci_scan_slot(bus,
+				PCI_DEVFN(func->device, func->function));
 		if (num)
 			pci_bus_add_devices(bus);
 
-		func->dev = pci_find_slot(func->busno, PCI_DEVFN(func->device, func->function));
+		func->dev = pci_find_slot(func->busno,
+				PCI_DEVFN(func->device, func->function));
 		if (func->dev == NULL) {
-			err ("ERROR... : pci_dev still NULL\n");
+			err("ERROR... : pci_dev still NULL\n");
 			return 0;
 		}
 	}
 	if (!(flag) && (func->dev->hdr_type == PCI_HEADER_TYPE_BRIDGE)) {
-		pci_read_config_byte (func->dev, PCI_SECONDARY_BUS, &bus);
-		child = (struct pci_bus *) pci_add_new_bus (func->dev->bus, (func->dev), bus);
-		pci_do_scan_bus (child);
+		pci_read_config_byte(func->dev, PCI_SECONDARY_BUS, &bus);
+		child = pci_add_new_bus(func->dev->bus, func->dev, bus);
+		pci_do_scan_bus(child);
 	}
 
 	return 0;
@@ -803,7 +856,7 @@
 /*******************************************************
  * Returns whether the bus is empty or not 
  *******************************************************/
-static int is_bus_empty (struct slot * slot_cur)
+static int is_bus_empty(struct slot * slot_cur)
 {
 	int rc;
 	struct slot * tmp_slot;
@@ -814,13 +867,14 @@
 			i++;
 			continue;
 		}
-		tmp_slot = ibmphp_get_slot_from_physical_num (i);
+		tmp_slot = ibmphp_get_slot_from_physical_num(i);
 		if (!tmp_slot)
 			return 0;
-		rc = slot_update (&tmp_slot);
+		rc = slot_update(&tmp_slot);
 		if (rc)
 			return 0;
-		if (SLOT_PRESENT (tmp_slot->status) && SLOT_PWRGD (tmp_slot->status))
+		if (SLOT_PRESENT(tmp_slot->status) &&
+					SLOT_PWRGD(tmp_slot->status))
 			return 0;
 		i++;
 	}
@@ -833,7 +887,7 @@
  * Parameters: slot
  * Returns: bus is set (0) or error code
  ***********************************************************/
-static int set_bus (struct slot * slot_cur)
+static int set_bus(struct slot * slot_cur)
 {
 	int rc;
 	u8 speed;
@@ -844,22 +898,23 @@
 	        { },
 	};	
 
-	debug ("%s - entry slot # %d\n", __FUNCTION__, slot_cur->number);
-	if (SET_BUS_STATUS (slot_cur->ctrl) && is_bus_empty (slot_cur)) {
-		rc = slot_update (&slot_cur);
+	debug("%s - entry slot # %d\n", __FUNCTION__, slot_cur->number);
+	if (SET_BUS_STATUS(slot_cur->ctrl) && is_bus_empty(slot_cur)) {
+		rc = slot_update(&slot_cur);
 		if (rc)
 			return rc;
-		speed = SLOT_SPEED (slot_cur->ext_status);
-		debug ("ext_status = %x, speed = %x\n", slot_cur->ext_status, speed);
+		speed = SLOT_SPEED(slot_cur->ext_status);
+		debug("ext_status = %x, speed = %x\n", slot_cur->ext_status, speed);
 		switch (speed) {
 		case HPC_SLOT_SPEED_33:
 			cmd = HPC_BUS_33CONVMODE;
 			break;
 		case HPC_SLOT_SPEED_66:
-			if (SLOT_PCIX (slot_cur->ext_status)) {
-				if ((slot_cur->supported_speed >= BUS_SPEED_66) && (slot_cur->supported_bus_mode == BUS_MODE_PCIX))
+			if (SLOT_PCIX(slot_cur->ext_status)) {
+				if ((slot_cur->supported_speed >= BUS_SPEED_66) &&
+						(slot_cur->supported_bus_mode == BUS_MODE_PCIX))
 					cmd = HPC_BUS_66PCIXMODE;
-				else if (!SLOT_BUS_MODE (slot_cur->ext_status))
+				else if (!SLOT_BUS_MODE(slot_cur->ext_status))
 					/* if max slot/bus capability is 66 pci
 					and there's no bus mode mismatch, then
 					the adapter supports 66 pci */ 
@@ -890,33 +945,35 @@
 			case BUS_SPEED_133:
 				/* This is to take care of the bug in CIOBX chip */
 				if (pci_dev_present(ciobx))
-					ibmphp_hpc_writeslot (slot_cur, HPC_BUS_100PCIXMODE);
+					ibmphp_hpc_writeslot(slot_cur,
+							HPC_BUS_100PCIXMODE);
 				cmd = HPC_BUS_133PCIXMODE;
 				break;
 			default:
-				err ("Wrong bus speed\n");
+				err("Wrong bus speed\n");
 				return -ENODEV;
 			}
 			break;
 		default:
-			err ("wrong slot speed\n");
+			err("wrong slot speed\n");
 			return -ENODEV;
 		}
-		debug ("setting bus speed for slot %d, cmd %x\n", slot_cur->number, cmd);
-		retval = ibmphp_hpc_writeslot (slot_cur, cmd);
+		debug("setting bus speed for slot %d, cmd %x\n",
+						slot_cur->number, cmd);
+		retval = ibmphp_hpc_writeslot(slot_cur, cmd);
 		if (retval) {
-			err ("setting bus speed failed\n");
+			err("setting bus speed failed\n");
 			return retval;
 		}
-		if (CTLR_RESULT (slot_cur->ctrl->status)) {
-			err ("command not completed successfully in set_bus\n");
+		if (CTLR_RESULT(slot_cur->ctrl->status)) {
+			err("command not completed successfully in set_bus\n");
 			return -EIO;
 		}
 	}
 	/* This is for x440, once Brandon fixes the firmware, 
 	will not need this delay */
 	msleep(1000);
-	debug ("%s -Exit\n", __FUNCTION__);
+	debug("%s -Exit\n", __FUNCTION__);
 	return 0;
 }
 
@@ -927,7 +984,7 @@
  * Parameters: slot
  * Returns: 0 = no limitations, -EINVAL = exceeded limitations on the bus
  */
-static int check_limitations (struct slot *slot_cur)
+static int check_limitations(struct slot *slot_cur)
 {
 	u8 i;
 	struct slot * tmp_slot;
@@ -935,13 +992,14 @@
 	u8 limitation = 0;
 
 	for (i = slot_cur->bus_on->slot_min; i <= slot_cur->bus_on->slot_max; i++) {
-		tmp_slot = ibmphp_get_slot_from_physical_num (i);
+		tmp_slot = ibmphp_get_slot_from_physical_num(i);
 		if (!tmp_slot)
 			return -ENODEV;
-		if ((SLOT_PWRGD (tmp_slot->status)) && !(SLOT_CONNECT (tmp_slot->status))) 
+		if ((SLOT_PWRGD(tmp_slot->status)) &&
+					!(SLOT_CONNECT(tmp_slot->status)))
 			count++;
 	}
-	get_cur_bus_info (&slot_cur);
+	get_cur_bus_info(&slot_cur);
 	switch (slot_cur->bus_on->current_speed) {
 	case BUS_SPEED_33:
 		limitation = slot_cur->bus_on->slots_at_33_conv;
@@ -965,17 +1023,17 @@
 	return 0;
 }
 
-static inline void print_card_capability (struct slot *slot_cur)
+static inline void print_card_capability(struct slot *slot_cur)
 {
-	info ("capability of the card is ");
+	info("capability of the card is ");
 	if ((slot_cur->ext_status & CARD_INFO) == PCIX133) 
-		info ("   133 MHz PCI-X\n");
+		info("   133 MHz PCI-X\n");
 	else if ((slot_cur->ext_status & CARD_INFO) == PCIX66)
-		info ("    66 MHz PCI-X\n");
+		info("    66 MHz PCI-X\n");
 	else if ((slot_cur->ext_status & CARD_INFO) == PCI66)
-		info ("    66 MHz PCI\n");
+		info("    66 MHz PCI\n");
 	else
-		info ("    33 MHz PCI\n");
+		info("    33 MHz PCI\n");
 
 }
 
@@ -984,118 +1042,128 @@
  * Parameters: hotplug_slot
  * Returns: 0 or failure codes
  */
-static int enable_slot (struct hotplug_slot *hs)
+static int enable_slot(struct hotplug_slot *hs)
 {
 	int rc, i, rcpr;
 	struct slot *slot_cur;
 	u8 function;
 	struct pci_func *tmp_func;
 
-	ibmphp_lock_operations ();
+	ibmphp_lock_operations();
 
-	debug ("ENABLING SLOT........\n");
-	slot_cur = (struct slot *) hs->private;
+	debug("ENABLING SLOT........\n");
+	slot_cur = hs->private;
 
-	if ((rc = validate (slot_cur, ENABLE))) {
-		err ("validate function failed\n");
+	if ((rc = validate(slot_cur, ENABLE))) {
+		err("validate function failed\n");
 		goto error_nopower;
 	}
 
-	attn_LED_blink (slot_cur);
+	attn_LED_blink(slot_cur);
 	
-	rc = set_bus (slot_cur);
+	rc = set_bus(slot_cur);
 	if (rc) {
-		err ("was not able to set the bus\n");
+		err("was not able to set the bus\n");
 		goto error_nopower;
 	}
 
 	/*-----------------debugging------------------------------*/
-	get_cur_bus_info (&slot_cur);
-	debug ("the current bus speed right after set_bus = %x\n", slot_cur->bus_on->current_speed); 
+	get_cur_bus_info(&slot_cur);
+	debug("the current bus speed right after set_bus = %x\n",
+					slot_cur->bus_on->current_speed);
 	/*----------------------------------------------------------*/
 
-	rc = check_limitations (slot_cur);
+	rc = check_limitations(slot_cur);
 	if (rc) {
-		err ("Adding this card exceeds the limitations of this bus.\n");
-		err ("(i.e., >1 133MHz cards running on same bus, or "
+		err("Adding this card exceeds the limitations of this bus.\n");
+		err("(i.e., >1 133MHz cards running on same bus, or "
 		     ">2 66 PCI cards running on same bus\n.");
-		err ("Try hot-adding into another bus\n");
+		err("Try hot-adding into another bus\n");
 		rc = -EINVAL;
 		goto error_nopower;
 	}
 
-	rc = power_on (slot_cur);
+	rc = power_on(slot_cur);
 
 	if (rc) {
-		err ("something wrong when powering up... please see below for details\n");
+		err("something wrong when powering up... please see below for details\n");
 		/* need to turn off before on, otherwise, blinking overwrites */
 		attn_off(slot_cur);
-		attn_on (slot_cur);
-		if (slot_update (&slot_cur)) {
-			attn_off (slot_cur);
-			attn_on (slot_cur);
+		attn_on(slot_cur);
+		if (slot_update(&slot_cur)) {
+			attn_off(slot_cur);
+			attn_on(slot_cur);
 			rc = -ENODEV;
 			goto exit;
 		}
 		/* Check to see the error of why it failed */
-		if ((SLOT_POWER (slot_cur->status)) && !(SLOT_PWRGD (slot_cur->status)))
-			err ("power fault occurred trying to power up\n");
-		else if (SLOT_BUS_SPEED (slot_cur->status)) {
-			err ("bus speed mismatch occurred.  please check current bus speed and card capability\n");
-			print_card_capability (slot_cur);
-		} else if (SLOT_BUS_MODE (slot_cur->ext_status)) {
-			err ("bus mode mismatch occurred.  please check current bus mode and card capability\n");
-			print_card_capability (slot_cur);
+		if ((SLOT_POWER(slot_cur->status)) &&
+					!(SLOT_PWRGD(slot_cur->status)))
+			err("power fault occurred trying to power up\n");
+		else if (SLOT_BUS_SPEED(slot_cur->status)) {
+			err("bus speed mismatch occurred.  please check "
+				"current bus speed and card capability\n");
+			print_card_capability(slot_cur);
+		} else if (SLOT_BUS_MODE(slot_cur->ext_status)) {
+			err("bus mode mismatch occurred.  please check "
+				"current bus mode and card capability\n");
+			print_card_capability(slot_cur);
 		}
-		ibmphp_update_slot_info (slot_cur);
+		ibmphp_update_slot_info(slot_cur);
 		goto exit;
 	}
-	debug ("after power_on\n");
+	debug("after power_on\n");
 	/*-----------------------debugging---------------------------*/
-	get_cur_bus_info (&slot_cur);
-	debug ("the current bus speed right after power_on = %x\n", slot_cur->bus_on->current_speed);
+	get_cur_bus_info(&slot_cur);
+	debug("the current bus speed right after power_on = %x\n",
+					slot_cur->bus_on->current_speed);
 	/*----------------------------------------------------------*/
 
-	rc = slot_update (&slot_cur);
+	rc = slot_update(&slot_cur);
 	if (rc)
 		goto error_power;
 	
 	rc = -EINVAL;
-	if (SLOT_POWER (slot_cur->status) && !(SLOT_PWRGD (slot_cur->status))) {
-		err ("power fault occurred trying to power up...\n");
+	if (SLOT_POWER(slot_cur->status) && !(SLOT_PWRGD(slot_cur->status))) {
+		err("power fault occurred trying to power up...\n");
 		goto error_power;
 	}
-	if (SLOT_POWER (slot_cur->status) && (SLOT_BUS_SPEED (slot_cur->status))) {
-		err ("bus speed mismatch occurred.  please check current bus speed and card capability\n");
-		print_card_capability (slot_cur);
+	if (SLOT_POWER(slot_cur->status) && (SLOT_BUS_SPEED(slot_cur->status))) {
+		err("bus speed mismatch occurred.  please check current bus "
+					"speed and card capability\n");
+		print_card_capability(slot_cur);
 		goto error_power;
 	} 
-	/* Don't think this case will happen after above checks... but just in case, for paranoia sake */
-	if (!(SLOT_POWER (slot_cur->status))) {
-		err ("power on failed...\n");
+	/* Don't think this case will happen after above checks...
+	 * but just in case, for paranoia sake */
+	if (!(SLOT_POWER(slot_cur->status))) {
+		err("power on failed...\n");
 		goto error_power;
 	}
 
-	slot_cur->func = (struct pci_func *) kmalloc (sizeof (struct pci_func), GFP_KERNEL);
+	slot_cur->func = kmalloc(sizeof(struct pci_func), GFP_KERNEL);
 	if (!slot_cur->func) {
 		/* We cannot do update_slot_info here, since no memory for
 		 * kmalloc n.e.ways, and update_slot_info allocates some */
-		err ("out of system memory\n");
+		err("out of system memory\n");
 		rc = -ENOMEM;
 		goto error_power;
 	}
-	memset (slot_cur->func, 0, sizeof (struct pci_func));
+	memset(slot_cur->func, 0, sizeof(struct pci_func));
 	slot_cur->func->busno = slot_cur->bus;
 	slot_cur->func->device = slot_cur->device;
 	for (i = 0; i < 4; i++)
 		slot_cur->func->irq[i] = slot_cur->irq[i];
 
-	debug ("b4 configure_card, slot_cur->bus = %x, slot_cur->device = %x\n", slot_cur->bus, slot_cur->device);
+	debug("b4 configure_card, slot_cur->bus = %x, slot_cur->device = %x\n",
+					slot_cur->bus, slot_cur->device);
 
-	if (ibmphp_configure_card (slot_cur->func, slot_cur->number)) {
-		err ("configure_card was unsuccessful...\n");
-		ibmphp_unconfigure_card (&slot_cur, 1); /* true because don't need to actually deallocate resources, just remove references */
-		debug ("after unconfigure_card\n");
+	if (ibmphp_configure_card(slot_cur->func, slot_cur->number)) {
+		err("configure_card was unsuccessful...\n");
+		/* true because don't need to actually deallocate resources,
+		 * just remove references */
+		ibmphp_unconfigure_card(&slot_cur, 1);
+		debug("after unconfigure_card\n");
 		slot_cur->func = NULL;
 		rc = -ENOMEM;
 		goto error_power;
@@ -1103,38 +1171,39 @@
 
 	function = 0x00;
 	do {
-		tmp_func = ibm_slot_find (slot_cur->bus, slot_cur->func->device, function++);
+		tmp_func = ibm_slot_find(slot_cur->bus, slot_cur->func->device,
+							function++);
 		if (tmp_func && !(tmp_func->dev))
-			ibm_configure_device (tmp_func);
+			ibm_configure_device(tmp_func);
 	} while (tmp_func);
 
-	attn_off (slot_cur);
-	if (slot_update (&slot_cur)) {
+	attn_off(slot_cur);
+	if (slot_update(&slot_cur)) {
 		rc = -EFAULT;
 		goto exit;
 	}
-	ibmphp_print_test ();
-	rc = ibmphp_update_slot_info (slot_cur);
+	ibmphp_print_test();
+	rc = ibmphp_update_slot_info(slot_cur);
 exit:
 	ibmphp_unlock_operations(); 
 	return rc;
 
 error_nopower:
-	attn_off (slot_cur);	/* need to turn off if was blinking b4 */
-	attn_on (slot_cur);
+	attn_off(slot_cur);	/* need to turn off if was blinking b4 */
+	attn_on(slot_cur);
 error_cont:
-	rcpr = slot_update (&slot_cur);
+	rcpr = slot_update(&slot_cur);
 	if (rcpr) {
 		rc = rcpr;
 		goto exit;
 	}
-	ibmphp_update_slot_info (slot_cur);
+	ibmphp_update_slot_info(slot_cur);
 	goto exit;
 
 error_power:
-	attn_off (slot_cur);	/* need to turn off if was blinking b4 */
-	attn_on (slot_cur);
-	rcpr = power_off (slot_cur);
+	attn_off(slot_cur);	/* need to turn off if was blinking b4 */
+	attn_on(slot_cur);
+	rcpr = power_off(slot_cur);
 	if (rcpr) {
 		rc = rcpr;
 		goto exit;
@@ -1148,7 +1217,7 @@
 * OUTPUT: SUCCESS 0 ; FAILURE: UNCONFIGURE , VALIDATE         *
           DISABLE POWER ,                                    *
 **************************************************************/
-static int ibmphp_disable_slot (struct hotplug_slot *hotplug_slot)
+static int ibmphp_disable_slot(struct hotplug_slot *hotplug_slot)
 {
 	struct slot *slot = hotplug_slot->private;
 	int rc;
@@ -1159,12 +1228,12 @@
 	return rc;
 }
 
-int ibmphp_do_disable_slot (struct slot *slot_cur)
+int ibmphp_do_disable_slot(struct slot *slot_cur)
 {
 	int rc;
 	u8 flag;
 
-	debug ("DISABLING SLOT...\n"); 
+	debug("DISABLING SLOT...\n"); 
 		
 	if ((slot_cur == NULL) || (slot_cur->ctrl == NULL)) {
 		return -ENODEV;
@@ -1174,21 +1243,22 @@
 	slot_cur->flag = TRUE;
 
 	if (flag == TRUE) {
-		rc = validate (slot_cur, DISABLE);	/* checking if powered off already & valid slot # */
+		rc = validate(slot_cur, DISABLE);
+			/* checking if powered off already & valid slot # */
 		if (rc)
 			goto error;
 	}
-	attn_LED_blink (slot_cur);
+	attn_LED_blink(slot_cur);
 
 	if (slot_cur->func == NULL) {
 		/* We need this for fncs's that were there on bootup */
-		slot_cur->func = (struct pci_func *) kmalloc (sizeof (struct pci_func), GFP_KERNEL);
+		slot_cur->func = kmalloc(sizeof(struct pci_func), GFP_KERNEL);
 		if (!slot_cur->func) {
-			err ("out of system memory\n");
+			err("out of system memory\n");
 			rc = -ENOMEM;
 			goto error;
 		}
-		memset (slot_cur->func, 0, sizeof (struct pci_func));
+		memset(slot_cur->func, 0, sizeof(struct pci_func));
 		slot_cur->func->busno = slot_cur->bus;
 		slot_cur->func->device = slot_cur->device;
 	}
@@ -1202,42 +1272,42 @@
 	lists at least */
 
 	if (!flag) {
-		attn_off (slot_cur);
+		attn_off(slot_cur);
 		return 0;
 	}
 
-	rc = ibmphp_unconfigure_card (&slot_cur, 0);
+	rc = ibmphp_unconfigure_card(&slot_cur, 0);
 	slot_cur->func = NULL;
-	debug ("in disable_slot. after unconfigure_card\n");
+	debug("in disable_slot. after unconfigure_card\n");
 	if (rc) {
-		err ("could not unconfigure card.\n");
+		err("could not unconfigure card.\n");
 		goto error;
 	}
 
-	rc = ibmphp_hpc_writeslot (slot_cur, HPC_SLOT_OFF);
+	rc = ibmphp_hpc_writeslot(slot_cur, HPC_SLOT_OFF);
 	if (rc)
 		goto error;
 
-	attn_off (slot_cur);
-	rc = slot_update (&slot_cur);
+	attn_off(slot_cur);
+	rc = slot_update(&slot_cur);
 	if (rc)
 		goto exit;
 
-	rc = ibmphp_update_slot_info (slot_cur);
-	ibmphp_print_test ();
+	rc = ibmphp_update_slot_info(slot_cur);
+	ibmphp_print_test();
 exit:
 	return rc;
 
 error:
 	/*  Need to turn off if was blinking b4 */
-	attn_off (slot_cur);
-	attn_on (slot_cur);
-	if (slot_update (&slot_cur)) {
+	attn_off(slot_cur);
+	attn_on(slot_cur);
+	if (slot_update(&slot_cur)) {
 		rc = -EFAULT;
 		goto exit;
 	}
 	if (flag)		
-		ibmphp_update_slot_info (slot_cur);
+		ibmphp_update_slot_info(slot_cur);
 	goto exit;
 }
 
@@ -1258,22 +1328,22 @@
 */
 };
 
-static void ibmphp_unload (void)
+static void ibmphp_unload(void)
 {
-	free_slots ();
-	debug ("after slots\n");
-	ibmphp_free_resources ();
-	debug ("after resources\n");
-	ibmphp_free_bus_info_queue ();
-	debug ("after bus info\n");
-	ibmphp_free_ebda_hpc_queue ();
-	debug ("after ebda hpc\n");
-	ibmphp_free_ebda_pci_rsrc_queue ();
-	debug ("after ebda pci rsrc\n");
-	kfree (ibmphp_pci_bus);
+	free_slots();
+	debug("after slots\n");
+	ibmphp_free_resources();
+	debug("after resources\n");
+	ibmphp_free_bus_info_queue();
+	debug("after bus info\n");
+	ibmphp_free_ebda_hpc_queue();
+	debug("after ebda hpc\n");
+	ibmphp_free_ebda_pci_rsrc_queue();
+	debug("after ebda pci rsrc\n");
+	kfree(ibmphp_pci_bus);
 }
 
-static int __init ibmphp_init (void)
+static int __init ibmphp_init(void)
 {
 	struct pci_bus *bus;
 	int i = 0;
@@ -1281,50 +1351,50 @@
 
 	init_flag = 1;
 
-	info (DRIVER_DESC " version: " DRIVER_VERSION "\n");
+	info(DRIVER_DESC " version: " DRIVER_VERSION "\n");
 
-	ibmphp_pci_bus = kmalloc (sizeof (*ibmphp_pci_bus), GFP_KERNEL);
+	ibmphp_pci_bus = kmalloc(sizeof(*ibmphp_pci_bus), GFP_KERNEL);
 	if (!ibmphp_pci_bus) {
-		err ("out of memory\n");
+		err("out of memory\n");
 		rc = -ENOMEM;
 		goto exit;
 	}
 
 	bus = pci_find_bus(0, 0);
 	if (!bus) {
-		err ("Can't find the root pci bus, can not continue\n");
+		err("Can't find the root pci bus, can not continue\n");
 		rc = -ENODEV;
 		goto error;
 	}
-	memcpy (ibmphp_pci_bus, bus, sizeof (*ibmphp_pci_bus));
+	memcpy(ibmphp_pci_bus, bus, sizeof(*ibmphp_pci_bus));
 
 	ibmphp_debug = debug;
 
-	ibmphp_hpc_initvars ();
+	ibmphp_hpc_initvars();
 
 	for (i = 0; i < 16; i++)
 		irqs[i] = 0;
 
-	if ((rc = ibmphp_access_ebda ()))
+	if ((rc = ibmphp_access_ebda()))
 		goto error;
-	debug ("after ibmphp_access_ebda ()\n");
+	debug("after ibmphp_access_ebda()\n");
 
-	if ((rc = ibmphp_rsrc_init ()))
+	if ((rc = ibmphp_rsrc_init()))
 		goto error;
-	debug ("AFTER Resource & EBDA INITIALIZATIONS\n");
+	debug("AFTER Resource & EBDA INITIALIZATIONS\n");
 
-	max_slots = get_max_slots ();
+	max_slots = get_max_slots();
 	
-	if ((rc = ibmphp_register_pci ()))
+	if ((rc = ibmphp_register_pci()))
 		goto error;
 
-	if (init_ops ()) {
+	if (init_ops()) {
 		rc = -ENODEV;
 		goto error;
 	}
 
-	ibmphp_print_test ();
-	if ((rc = ibmphp_hpc_start_poll_thread ())) {
+	ibmphp_print_test();
+	if ((rc = ibmphp_hpc_start_poll_thread())) {
 		goto error;
 	}
 
@@ -1336,17 +1406,17 @@
 	return rc;
 
 error:
-	ibmphp_unload ();
+	ibmphp_unload();
 	goto exit;
 }
 
-static void __exit ibmphp_exit (void)
+static void __exit ibmphp_exit(void)
 {
-	ibmphp_hpc_stop_poll_thread ();
-	debug ("after polling\n");
-	ibmphp_unload ();
-	debug ("done\n");
+	ibmphp_hpc_stop_poll_thread();
+	debug("after polling\n");
+	ibmphp_unload();
+	debug("done\n");
 }
 
-module_init (ibmphp_init);
-module_exit (ibmphp_exit);
+module_init(ibmphp_init);
+module_exit(ibmphp_exit);
diff -Nru a/drivers/pci/hotplug/ibmphp_pci.c b/drivers/pci/hotplug/ibmphp_pci.c
--- a/drivers/pci/hotplug/ibmphp_pci.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/pci/hotplug/ibmphp_pci.c	2005-01-10 20:11:15 -08:00
@@ -164,7 +164,7 @@
 						cleanup_count = 6;
 						goto error;
 					}
-					newfunc = (struct pci_func *) kmalloc (sizeof (struct pci_func), GFP_KERNEL);
+					newfunc = kmalloc(sizeof(*newfunc), GFP_KERNEL);
 					if (!newfunc) {
 						err ("out of system memory\n");
 						return -ENOMEM;
@@ -203,7 +203,7 @@
 					flag = FALSE;
 					for (i = 0; i < 32; i++) {
 						if (func->devices[i]) {
-							newfunc = (struct pci_func *) kmalloc (sizeof (struct pci_func), GFP_KERNEL);
+							newfunc = kmalloc(sizeof(*newfunc), GFP_KERNEL);
 							if (!newfunc) {
 								err ("out of system memory\n");
 								return -ENOMEM;
@@ -232,7 +232,7 @@
 						}
 					}
 
-					newfunc = (struct pci_func *) kmalloc (sizeof (struct pci_func), GFP_KERNEL);
+					newfunc = kmalloc(sizeof(*newfunc), GFP_KERNEL);
 					if (!newfunc) {
 						err ("out of system memory\n");
 						return -ENOMEM;
@@ -279,7 +279,7 @@
 					for (i = 0; i < 32; i++) {
 						if (func->devices[i]) {
 							debug ("inside for loop, device is %x\n", i);
-							newfunc = (struct pci_func *) kmalloc (sizeof (struct pci_func), GFP_KERNEL);
+							newfunc = kmalloc(sizeof(*newfunc), GFP_KERNEL);
 							if (!newfunc) {
 								err (" out of system memory\n");
 								return -ENOMEM;
@@ -414,7 +414,7 @@
 			memset (io[count], 0, sizeof (struct resource_node));
 			io[count]->type = IO;
 			io[count]->busno = func->busno;
-			io[count]->devfunc = ((func->device << 3) | (func->function & 0x7));
+			io[count]->devfunc = PCI_DEVFN(func->device, func->function);
 			io[count]->len = len[count];
 			if (ibmphp_check_resource(io[count], 0) == 0) {
 				ibmphp_add_resource (io[count]);
@@ -452,14 +452,15 @@
 				memset (pfmem[count], 0, sizeof (struct resource_node));
 				pfmem[count]->type = PFMEM;
 				pfmem[count]->busno = func->busno;
-				pfmem[count]->devfunc = ((func->device << 3) | (func->function & 0x7));
+				pfmem[count]->devfunc = PCI_DEVFN(func->device,
+							func->function);
 				pfmem[count]->len = len[count];
 				pfmem[count]->fromMem = FALSE;
 				if (ibmphp_check_resource (pfmem[count], 0) == 0) {
 					ibmphp_add_resource (pfmem[count]);
 					func->pfmem[count] = pfmem[count];
 				} else {
-					mem_tmp = kmalloc (sizeof (struct resource_node), GFP_KERNEL);
+					mem_tmp = kmalloc(sizeof(*mem_tmp), GFP_KERNEL);
 					if (!mem_tmp) {
 						err ("out of system memory\n");
 						kfree (pfmem[count]);
@@ -519,7 +520,8 @@
 				memset (mem[count], 0, sizeof (struct resource_node));
 				mem[count]->type = MEM;
 				mem[count]->busno = func->busno;
-				mem[count]->devfunc = ((func->device << 3) | (func->function & 0x7));
+				mem[count]->devfunc = PCI_DEVFN(func->device,
+							func->function);
 				mem[count]->len = len[count];
 				if (ibmphp_check_resource (mem[count], 0) == 0) {
 					ibmphp_add_resource (mem[count]);
@@ -685,7 +687,8 @@
 			memset (bus_io[count], 0, sizeof (struct resource_node));
 			bus_io[count]->type = IO;
 			bus_io[count]->busno = func->busno;
-			bus_io[count]->devfunc = ((func->device << 3) | (func->function & 0x7));
+			bus_io[count]->devfunc = PCI_DEVFN(func->device,
+							func->function);
 			bus_io[count]->len = len[count];
 			if (ibmphp_check_resource (bus_io[count], 0) == 0) {
 				ibmphp_add_resource (bus_io[count]);
@@ -717,14 +720,15 @@
 				memset (bus_pfmem[count], 0, sizeof (struct resource_node));
 				bus_pfmem[count]->type = PFMEM;
 				bus_pfmem[count]->busno = func->busno;
-				bus_pfmem[count]->devfunc = ((func->device << 3) | (func->function & 0x7));
+				bus_pfmem[count]->devfunc = PCI_DEVFN(func->device,
+							func->function);
 				bus_pfmem[count]->len = len[count];
 				bus_pfmem[count]->fromMem = FALSE;
 				if (ibmphp_check_resource (bus_pfmem[count], 0) == 0) {
 					ibmphp_add_resource (bus_pfmem[count]);
 					func->pfmem[count] = bus_pfmem[count];
 				} else {
-					mem_tmp = kmalloc (sizeof (struct resource_node), GFP_KERNEL);
+					mem_tmp = kmalloc(sizeof(*mem_tmp), GFP_KERNEL);
 					if (!mem_tmp) {
 						err ("out of system memory\n");
 						retval = -ENOMEM;
@@ -775,7 +779,8 @@
 				memset (bus_mem[count], 0, sizeof (struct resource_node));
 				bus_mem[count]->type = MEM;
 				bus_mem[count]->busno = func->busno;
-				bus_mem[count]->devfunc = ((func->device << 3) | (func->function & 0x7));
+				bus_mem[count]->devfunc = PCI_DEVFN(func->device,
+							func->function);
 				bus_mem[count]->len = len[count];
 				if (ibmphp_check_resource (bus_mem[count], 0) == 0) {
 					ibmphp_add_resource (bus_mem[count]);
@@ -836,7 +841,7 @@
 		flag_io = TRUE;
 	} else {
 		debug ("it wants %x IO behind the bridge\n", amount_needed->io);
-		io = kmalloc (sizeof (struct resource_node), GFP_KERNEL);
+		io = kmalloc(sizeof(*io), GFP_KERNEL);
 		
 		if (!io) {
 			err ("out of system memory\n");
@@ -846,7 +851,7 @@
 		memset (io, 0, sizeof (struct resource_node));
 		io->type = IO;
 		io->busno = func->busno;
-		io->devfunc = ((func->device << 3) | (func->function & 0x7));
+		io->devfunc = PCI_DEVFN(func->device, func->function);
 		io->len = amount_needed->io;
 		if (ibmphp_check_resource (io, 1) == 0) {
 			debug ("were we able to add io\n");
@@ -860,7 +865,7 @@
 		flag_mem = TRUE;
 	} else {
 		debug ("it wants %x memory behind the bridge\n", amount_needed->mem);
-		mem = kmalloc (sizeof (struct resource_node), GFP_KERNEL);
+		mem = kmalloc(sizeof(*mem), GFP_KERNEL);
 		if (!mem) {
 			err ("out of system memory\n");
 			retval = -ENOMEM;
@@ -869,7 +874,7 @@
 		memset (mem, 0, sizeof (struct resource_node));
 		mem->type = MEM;
 		mem->busno = func->busno;
-		mem->devfunc = ((func->device << 3) | (func->function & 0x7));
+		mem->devfunc = PCI_DEVFN(func->device, func->function);
 		mem->len = amount_needed->mem;
 		if (ibmphp_check_resource (mem, 1) == 0) {
 			ibmphp_add_resource (mem);
@@ -883,7 +888,7 @@
 		flag_pfmem = TRUE;
 	} else {
 		debug ("it wants %x pfmemory behind the bridge\n", amount_needed->pfmem);
-		pfmem = kmalloc (sizeof (struct resource_node), GFP_KERNEL);
+		pfmem = kmalloc(sizeof(*pfmem), GFP_KERNEL);
 		if (!pfmem) {
 			err ("out of system memory\n");
 			retval = -ENOMEM;
@@ -892,14 +897,14 @@
 		memset (pfmem, 0, sizeof (struct resource_node));
 		pfmem->type = PFMEM;
 		pfmem->busno = func->busno;
-		pfmem->devfunc = ((func->device << 3) | (func->function & 0x7));
+		pfmem->devfunc = PCI_DEVFN(func->device, func->function);
 		pfmem->len = amount_needed->pfmem;
 		pfmem->fromMem = FALSE;
 		if (ibmphp_check_resource (pfmem, 1) == 0) {
 			ibmphp_add_resource (pfmem);
 			flag_pfmem = TRUE;
 		} else {
-			mem_tmp = kmalloc (sizeof (struct resource_node), GFP_KERNEL);
+			mem_tmp = kmalloc(sizeof(*mem_tmp), GFP_KERNEL);
 			if (!mem_tmp) {
 				err ("out of system memory\n");
 				retval = -ENOMEM;
@@ -931,7 +936,7 @@
 		 */
 		bus = ibmphp_find_res_bus (sec_number);
 		if (!bus) {
-			bus = kmalloc (sizeof (struct bus_node), GFP_KERNEL);
+			bus = kmalloc(sizeof(*bus), GFP_KERNEL);
 			if (!bus) {
 				err ("out of system memory\n");
 				retval = -ENOMEM;
@@ -1057,8 +1062,7 @@
 	}
 
 error:
-	if (amount_needed)
-		kfree (amount_needed);
+	kfree(amount_needed);
 	if (pfmem)
 		ibmphp_remove_resource (pfmem);
 	if (io)
@@ -1107,7 +1111,7 @@
 	};
 	struct res_needed *amount;
 
-	amount = kmalloc (sizeof (struct res_needed), GFP_KERNEL);
+	amount = kmalloc(sizeof(*amount), GFP_KERNEL);
 	if (amount == NULL)
 		return NULL;
 	memset (amount, 0, sizeof (struct res_needed));
@@ -1680,7 +1684,7 @@
 		list_add (&bus->bus_list, &cur_bus->bus_list);
 	}
 	if (io) {
-		io_range = kmalloc (sizeof (struct range_node), GFP_KERNEL);
+		io_range = kmalloc(sizeof(*io_range), GFP_KERNEL);
 		if (!io_range) {
 			err ("out of system memory\n");
 			return -ENOMEM;
@@ -1693,7 +1697,7 @@
 		bus->rangeIO = io_range;
 	}
 	if (mem) {
-		mem_range = kmalloc (sizeof (struct range_node), GFP_KERNEL);
+		mem_range = kmalloc(sizeof(*mem_range), GFP_KERNEL);
 		if (!mem_range) {
 			err ("out of system memory\n");
 			return -ENOMEM;
@@ -1706,7 +1710,7 @@
 		bus->rangeMem = mem_range;
 	}
 	if (pfmem) {
-		pfmem_range = kmalloc (sizeof (struct range_node), GFP_KERNEL);
+		pfmem_range = kmalloc(sizeof(*pfmem_range), GFP_KERNEL);
 		if (!pfmem_range) {	
 			err ("out of system memory\n");
 			return -ENOMEM;
diff -Nru a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c
--- a/drivers/pci/hotplug/pciehp_core.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/pci/hotplug/pciehp_core.c	2005-01-10 20:11:23 -08:00
@@ -33,7 +33,6 @@
 #include <linux/kernel.h>
 #include <linux/types.h>
 #include <linux/proc_fs.h>
-#include <linux/miscdevice.h>
 #include <linux/slab.h>
 #include <linux/workqueue.h>
 #include <linux/pci.h>
diff -Nru a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c
--- a/drivers/pci/hotplug/pciehp_hpc.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/pci/hotplug/pciehp_hpc.c	2005-01-10 20:11:20 -08:00
@@ -237,7 +237,7 @@
 static spinlock_t hpc_event_lock;
 
 DEFINE_DBG_BUFFER		/* Debug string buffer for entire HPC defined here */
-static struct php_ctlr_state_s *php_ctlr_list_head = 0;	/* HPC state linked list */
+static struct php_ctlr_state_s *php_ctlr_list_head; /* HPC state linked list */
 static int ctlr_seq_num = 0;	/* Controller sequence # */
 static spinlock_t list_lock;
 
diff -Nru a/drivers/pci/hotplug/rpaphp_pci.c b/drivers/pci/hotplug/rpaphp_pci.c
--- a/drivers/pci/hotplug/rpaphp_pci.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/pci/hotplug/rpaphp_pci.c	2005-01-10 20:11:15 -08:00
@@ -25,6 +25,7 @@
 #include <linux/pci.h>
 #include <asm/pci-bridge.h>
 #include <asm/rtas.h>
+#include <asm/machdep.h>
 #include "../pci.h"		/* for pci_add_new_bus */
 
 #include "rpaphp.h"
@@ -168,6 +169,9 @@
 		if (list_empty(&dev->global_list)) {
 			int i;
 			
+			/* Need to setup IOMMU tables */
+			ppc_md.iommu_dev_setup(dev);
+
 			if(fix_bus)
 				pcibios_fixup_device_resources(dev, bus);
 			pci_read_irq_line(dev);
diff -Nru a/drivers/pci/hotplug/shpchp.h b/drivers/pci/hotplug/shpchp.h
--- a/drivers/pci/hotplug/shpchp.h	2005-01-10 20:11:21 -08:00
+++ b/drivers/pci/hotplug/shpchp.h	2005-01-10 20:11:21 -08:00
@@ -36,7 +36,7 @@
 #include <asm/io.h>		
 #include "pci_hotplug.h"
 
-#if !defined(CONFIG_HOTPLUG_PCI_SHPC_MODULE)
+#if !defined(MODULE)
 	#define MY_NAME	"shpchp"
 #else
 	#define MY_NAME	THIS_MODULE->name
diff -Nru a/drivers/pci/hotplug/shpchp_core.c b/drivers/pci/hotplug/shpchp_core.c
--- a/drivers/pci/hotplug/shpchp_core.c	2005-01-10 20:11:24 -08:00
+++ b/drivers/pci/hotplug/shpchp_core.c	2005-01-10 20:11:24 -08:00
@@ -33,7 +33,6 @@
 #include <linux/kernel.h>
 #include <linux/types.h>
 #include <linux/proc_fs.h>
-#include <linux/miscdevice.h>
 #include <linux/slab.h>
 #include <linux/workqueue.h>
 #include <linux/pci.h>
diff -Nru a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
--- a/drivers/pci/pci-sysfs.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/pci/pci-sysfs.c	2005-01-10 20:11:19 -08:00
@@ -20,6 +20,7 @@
 #include <linux/pci.h>
 #include <linux/stat.h>
 #include <linux/topology.h>
+#include <linux/mm.h>
 
 #include "pci.h"
 
@@ -178,6 +179,164 @@
 	return count;
 }
 
+#ifdef HAVE_PCI_LEGACY
+/**
+ * pci_read_legacy_io - read byte(s) from legacy I/O port space
+ * @kobj: kobject corresponding to file to read from
+ * @buf: buffer to store results
+ * @off: offset into legacy I/O port space
+ * @count: number of bytes to read
+ *
+ * Reads 1, 2, or 4 bytes from legacy I/O port space using an arch specific
+ * callback routine (pci_legacy_read).
+ */
+ssize_t
+pci_read_legacy_io(struct kobject *kobj, char *buf, loff_t off, size_t count)
+{
+        struct pci_bus *bus = to_pci_bus(container_of(kobj,
+                                                      struct class_device,
+						      kobj));
+
+        /* Only support 1, 2 or 4 byte accesses */
+        if (count != 1 && count != 2 && count != 4)
+                return -EINVAL;
+
+        return pci_legacy_read(bus, off, (u32 *)buf, count);
+}
+
+/**
+ * pci_write_legacy_io - write byte(s) to legacy I/O port space
+ * @kobj: kobject corresponding to file to read from
+ * @buf: buffer containing value to be written
+ * @off: offset into legacy I/O port space
+ * @count: number of bytes to write
+ *
+ * Writes 1, 2, or 4 bytes from legacy I/O port space using an arch specific
+ * callback routine (pci_legacy_write).
+ */
+ssize_t
+pci_write_legacy_io(struct kobject *kobj, char *buf, loff_t off, size_t count)
+{
+        struct pci_bus *bus = to_pci_bus(container_of(kobj,
+						      struct class_device,
+						      kobj));
+        /* Only support 1, 2 or 4 byte accesses */
+        if (count != 1 && count != 2 && count != 4)
+                return -EINVAL;
+
+        return pci_legacy_write(bus, off, *(u32 *)buf, count);
+}
+
+/**
+ * pci_mmap_legacy_mem - map legacy PCI memory into user memory space
+ * @kobj: kobject corresponding to device to be mapped
+ * @attr: struct bin_attribute for this file
+ * @vma: struct vm_area_struct passed to mmap
+ *
+ * Uses an arch specific callback, pci_mmap_legacy_page_range, to mmap
+ * legacy memory space (first meg of bus space) into application virtual
+ * memory space.
+ */
+int
+pci_mmap_legacy_mem(struct kobject *kobj, struct bin_attribute *attr,
+                    struct vm_area_struct *vma)
+{
+        struct pci_bus *bus = to_pci_bus(container_of(kobj,
+                                                      struct class_device,
+						      kobj));
+
+        return pci_mmap_legacy_page_range(bus, vma);
+}
+#endif /* HAVE_PCI_LEGACY */
+
+#ifdef HAVE_PCI_MMAP
+/**
+ * pci_mmap_resource - map a PCI resource into user memory space
+ * @kobj: kobject for mapping
+ * @attr: struct bin_attribute for the file being mapped
+ * @vma: struct vm_area_struct passed into the mmap
+ *
+ * Use the regular PCI mapping routines to map a PCI resource into userspace.
+ * FIXME: write combining?  maybe automatic for prefetchable regions?
+ */
+static int
+pci_mmap_resource(struct kobject *kobj, struct bin_attribute *attr,
+		  struct vm_area_struct *vma)
+{
+	struct pci_dev *pdev = to_pci_dev(container_of(kobj,
+						       struct device, kobj));
+	struct resource *res = (struct resource *)attr->private;
+	enum pci_mmap_state mmap_type;
+
+	vma->vm_pgoff += res->start >> PAGE_SHIFT;
+	mmap_type = res->flags & IORESOURCE_MEM ? pci_mmap_mem : pci_mmap_io;
+
+	return pci_mmap_page_range(pdev, vma, mmap_type, 0);
+}
+
+/**
+ * pci_create_resource_files - create resource files in sysfs for @dev
+ * @dev: dev in question
+ *
+ * Walk the resources in @dev creating files for each resource available.
+ */
+static void
+pci_create_resource_files(struct pci_dev *pdev)
+{
+	int i;
+
+	/* Expose the PCI resources from this device as files */
+	for (i = 0; i < PCI_ROM_RESOURCE; i++) {
+		struct bin_attribute *res_attr;
+
+		/* skip empty resources */
+		if (!pci_resource_len(pdev, i))
+			continue;
+
+		res_attr = kmalloc(sizeof(*res_attr) + 10, GFP_ATOMIC);
+		if (res_attr) {
+			memset(res_attr, 0, sizeof(*res_attr) + 10);
+			pdev->res_attr[i] = res_attr;
+			/* Allocated above after the res_attr struct */
+			res_attr->attr.name = (char *)(res_attr + 1);
+			sprintf(res_attr->attr.name, "resource%d", i);
+			res_attr->size = pci_resource_len(pdev, i);
+			res_attr->attr.mode = S_IRUSR | S_IWUSR;
+			res_attr->attr.owner = THIS_MODULE;
+			res_attr->mmap = pci_mmap_resource;
+			res_attr->private = &pdev->resource[i];
+			sysfs_create_bin_file(&pdev->dev.kobj, res_attr);
+		}
+	}
+}
+
+/**
+ * pci_remove_resource_files - cleanup resource files
+ * @dev: dev to cleanup
+ *
+ * If we created resource files for @dev, remove them from sysfs and
+ * free their resources.
+ */
+static void
+pci_remove_resource_files(struct pci_dev *pdev)
+{
+	int i;
+
+	for (i = 0; i < PCI_ROM_RESOURCE; i++) {
+		struct bin_attribute *res_attr;
+
+		res_attr = pdev->res_attr[i];
+		if (res_attr) {
+			sysfs_remove_bin_file(&pdev->dev.kobj, res_attr);
+			kfree(res_attr);
+		}
+	}
+}
+#else /* !HAVE_PCI_MMAP */
+static inline void pci_create_resource_files(struct pci_dev *dev) { return; }
+static inline void pci_remove_resource_files(struct pci_dev *dev) { return; }
+#endif /* HAVE_PCI_MMAP */
+
 /**
  * pci_write_rom - used to enable access to the PCI ROM display
  * @kobj: kernel object handle
@@ -269,6 +428,8 @@
 	else
 		sysfs_create_bin_file(&pdev->dev.kobj, &pcie_config_attr);
 
+	pci_create_resource_files(pdev);
+
 	/* If the device has a ROM, try to expose it in sysfs. */
 	if (pci_resource_len(pdev, PCI_ROM_RESOURCE)) {
 		struct bin_attribute *rom_attr;
@@ -303,6 +464,8 @@
 		sysfs_remove_bin_file(&pdev->dev.kobj, &pci_config_attr);
 	else
 		sysfs_remove_bin_file(&pdev->dev.kobj, &pcie_config_attr);
+
+	pci_remove_resource_files(pdev);
 
 	if (pci_resource_len(pdev, PCI_ROM_RESOURCE)) {
 		if (pdev->rom_attr) {
diff -Nru a/drivers/pci/pci.c b/drivers/pci/pci.c
--- a/drivers/pci/pci.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/pci/pci.c	2005-01-10 20:11:17 -08:00
@@ -229,7 +229,7 @@
 /**
  * pci_set_power_state - Set the power state of a PCI device
  * @dev: PCI device to be suspended
- * @state: Power state we're entering
+ * @state: PCI power state (D0, D1, D2, D3hot, D3cold) we're entering
  *
  * Transition a device to a new power state, using the Power Management 
  * Capabilities in the device's config space.
@@ -242,19 +242,20 @@
  */
 
 int
-pci_set_power_state(struct pci_dev *dev, int state)
+pci_set_power_state(struct pci_dev *dev, pci_power_t state)
 {
 	int pm;
-	u16 pmcsr;
+	u16 pmcsr, pmc;
 
 	/* bound the state we're entering */
-	if (state > 3) state = 3;
+	if (state > PCI_D3hot)
+		state = PCI_D3hot;
 
 	/* Validate current state:
 	 * Can enter D0 from any state, but if we can only go deeper 
 	 * to sleep if we're already in a low power state
 	 */
-	if (state > 0 && dev->current_state > state)
+	if (state != PCI_D0 && dev->current_state > state)
 		return -EINVAL;
 	else if (dev->current_state == state) 
 		return 0;        /* we're already there */
@@ -263,21 +264,30 @@
 	pm = pci_find_capability(dev, PCI_CAP_ID_PM);
 	
 	/* abort if the device doesn't support PM capabilities */
-	if (!pm) return -EIO; 
+	if (!pm)
+		return -EIO; 
+
+	pci_read_config_word(dev,pm + PCI_PM_PMC,&pmc);
+	if ((pmc & PCI_PM_CAP_VER_MASK) != 2) {
+		printk(KERN_WARNING
+		       "PCI: %s has unsupported PM cap regs version (%u)\n",
+		       dev->slot_name, pmc & PCI_PM_CAP_VER_MASK);
+		return -EIO;
+	}
 
 	/* check if this device supports the desired state */
-	if (state == 1 || state == 2) {
-		u16 pmc;
-		pci_read_config_word(dev,pm + PCI_PM_PMC,&pmc);
-		if (state == 1 && !(pmc & PCI_PM_CAP_D1)) return -EIO;
-		else if (state == 2 && !(pmc & PCI_PM_CAP_D2)) return -EIO;
+	if (state == PCI_D1 || state == PCI_D2) {
+		if (state == PCI_D1 && !(pmc & PCI_PM_CAP_D1))
+			return -EIO;
+		else if (state == PCI_D2 && !(pmc & PCI_PM_CAP_D2))
+			return -EIO;
 	}
 
 	/* If we're in D3, force entire word to 0.
 	 * This doesn't affect PME_Status, disables PME_En, and
 	 * sets PowerState to 0.
 	 */
-	if (dev->current_state >= 3)
+	if (dev->current_state >= PCI_D3hot)
 		pmcsr = 0;
 	else {
 		pci_read_config_word(dev, pm + PCI_PM_CTRL, &pmcsr);
@@ -290,9 +300,9 @@
 
 	/* Mandatory power management transition delays */
 	/* see PCI PM 1.1 5.6.1 table 18 */
-	if(state == 3 || dev->current_state == 3)
+	if (state == PCI_D3hot || dev->current_state == PCI_D3hot)
 		msleep(10);
-	else if(state == 2 || dev->current_state == 2)
+	else if (state == PCI_D2 || dev->current_state == PCI_D2)
 		udelay(200);
 	dev->current_state = state;
 
@@ -300,6 +310,31 @@
 }
 
 /**
+ * pci_choose_state - Choose the power state of a PCI device
+ * @dev: PCI device to be suspended
+ * @state: target sleep state for the whole system
+ *
+ * Returns PCI power state suitable for given device and given system
+ * message.
+ */
+
+pci_power_t pci_choose_state(struct pci_dev *dev, u32 state)
+{
+	if (!pci_find_capability(dev, PCI_CAP_ID_PM))
+		return PCI_D0;
+
+	switch (state) {
+	case 0:	return PCI_D0;
+	case 2: return PCI_D2;
+	case 3: return PCI_D3hot;
+	default: BUG();
+	}
+	return PCI_D0;
+}
+
+EXPORT_SYMBOL(pci_choose_state);
+
+/**
  * pci_save_state - save the PCI configuration space of a device before suspending
  * @dev: - PCI device that we're dealing with
  * @buffer: - buffer to hold config space context
@@ -348,7 +383,7 @@
 {
 	int err;
 
-	pci_set_power_state(dev, 0);
+	pci_set_power_state(dev, PCI_D0);
 	if ((err = pcibios_enable_device(dev, bars)) < 0)
 		return err;
 	return 0;
@@ -422,7 +457,7 @@
  * 0 if operation is successful.
  * 
  */
-int pci_enable_wake(struct pci_dev *dev, u32 state, int enable)
+int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable)
 {
 	int pm;
 	u16 value;
diff -Nru a/drivers/pci/probe.c b/drivers/pci/probe.c
--- a/drivers/pci/probe.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/pci/probe.c	2005-01-10 20:11:21 -08:00
@@ -2,6 +2,7 @@
  * probe.c - PCI detection and setup code
  */
 
+#include <linux/delay.h>
 #include <linux/init.h>
 #include <linux/pci.h>
 #include <linux/slab.h>
@@ -27,12 +28,77 @@
 
 LIST_HEAD(pci_devices);
 
+#ifdef HAVE_PCI_LEGACY
+/**
+ * pci_create_legacy_files - create legacy I/O port and memory files
+ * @b: bus to create files under
+ *
+ * Some platforms allow access to legacy I/O port and ISA memory space on
+ * a per-bus basis.  This routine creates the files and ties them into
+ * their associated read, write and mmap files from pci-sysfs.c
+ */
+static void pci_create_legacy_files(struct pci_bus *b)
+{
+	b->legacy_io = kmalloc(sizeof(struct bin_attribute) * 2,
+			       GFP_ATOMIC);
+	if (b->legacy_io) {
+		memset(b->legacy_io, 0, sizeof(struct bin_attribute) * 2);
+		b->legacy_io->attr.name = "legacy_io";
+		b->legacy_io->size = 0xffff;
+		b->legacy_io->attr.mode = S_IRUSR | S_IWUSR;
+		b->legacy_io->attr.owner = THIS_MODULE;
+		b->legacy_io->read = pci_read_legacy_io;
+		b->legacy_io->write = pci_write_legacy_io;
+		class_device_create_bin_file(&b->class_dev, b->legacy_io);
+
+		/* Allocated above after the legacy_io struct */
+		b->legacy_mem = b->legacy_io + 1;
+		b->legacy_mem->attr.name = "legacy_mem";
+		b->legacy_mem->size = 1024*1024;
+		b->legacy_mem->attr.mode = S_IRUSR | S_IWUSR;
+		b->legacy_mem->attr.owner = THIS_MODULE;
+		b->legacy_mem->mmap = pci_mmap_legacy_mem;
+		class_device_create_bin_file(&b->class_dev, b->legacy_mem);
+	}
+}
+
+static void pci_remove_legacy_files(struct pci_bus *b)
+{
+	class_device_remove_bin_file(&b->class_dev, b->legacy_io);
+	class_device_remove_bin_file(&b->class_dev, b->legacy_mem);
+	kfree(b->legacy_io); /* both are allocated here */
+}
+#else /* !HAVE_PCI_LEGACY */
+static inline void pci_create_legacy_files(struct pci_bus *bus) { return; }
+static inline void pci_remove_legacy_files(struct pci_bus *bus) { return; }
+#endif /* HAVE_PCI_LEGACY */
+
+/*
+ * PCI Bus Class Devices
+ */
+static ssize_t pci_bus_show_cpuaffinity(struct class_device *class_dev, char *buf)
+{
+	cpumask_t cpumask = pcibus_to_cpumask((to_pci_bus(class_dev))->number);
+	int ret;
+
+	ret = cpumask_scnprintf(buf, PAGE_SIZE, cpumask);
+	if (ret < PAGE_SIZE)
+		buf[ret++] = '\n';
+	return ret;
+}
+static CLASS_DEVICE_ATTR(cpuaffinity, S_IRUGO, pci_bus_show_cpuaffinity, NULL);
+
 /*
  * PCI Bus Class
  */
 static void release_pcibus_dev(struct class_device *class_dev)
 {
 	struct pci_bus *pci_bus = to_pci_bus(class_dev);
+
+	pci_remove_legacy_files(pci_bus);
+	class_device_remove_file(&pci_bus->class_dev,
+				 &class_device_attr_cpuaffinity);
+	sysfs_remove_link(&pci_bus->class_dev.kobj, "bridge");
 	if (pci_bus->bridge)
 		put_device(pci_bus->bridge);
 	kfree(pci_bus);
@@ -50,21 +116,6 @@
 postcore_initcall(pcibus_class_init);
 
 /*
- * PCI Bus Class Devices
- */
-static ssize_t pci_bus_show_cpuaffinity(struct class_device *class_dev, char *buf)
-{
-	cpumask_t cpumask = pcibus_to_cpumask((to_pci_bus(class_dev))->number);
-	int ret;
-
-	ret = cpumask_scnprintf(buf, PAGE_SIZE, cpumask);
-	if (ret < PAGE_SIZE)
-		buf[ret++] = '\n';
-	return ret;
-}
-static CLASS_DEVICE_ATTR(cpuaffinity, S_IRUGO, pci_bus_show_cpuaffinity, NULL);
-
-/*
  * Translate the low bits of the PCI base
  * to the resource type
  */
@@ -336,6 +387,22 @@
 	return child;
 }
 
+static void pci_enable_crs(struct pci_dev *dev)
+{
+	u16 cap, rpctl;
+	int rpcap = pci_find_capability(dev, PCI_CAP_ID_EXP);
+	if (!rpcap)
+		return;
+
+	pci_read_config_word(dev, rpcap + PCI_CAP_FLAGS, &cap);
+	if (((cap & PCI_EXP_FLAGS_TYPE) >> 4) != PCI_EXP_TYPE_ROOT_PORT)
+		return;
+
+	pci_read_config_word(dev, rpcap + PCI_EXP_RTCTL, &rpctl);
+	rpctl |= PCI_EXP_RTCTL_CRSSVE;
+	pci_write_config_word(dev, rpcap + PCI_EXP_RTCTL, rpctl);
+}
+
 unsigned int __devinit pci_scan_child_bus(struct pci_bus *bus);
 
 /*
@@ -366,6 +433,8 @@
 	pci_write_config_word(dev, PCI_BRIDGE_CONTROL,
 			      bctl & ~PCI_BRIDGE_CTL_MASTER_ABORT);
 
+	pci_enable_crs(dev);
+
 	if ((buses & 0xffff00) && !pcibios_assign_all_busses() && !is_cardbus) {
 		unsigned int cmax, busnr;
 		/*
@@ -375,6 +444,17 @@
 		if (pass)
 			return max;
 		busnr = (buses >> 8) & 0xFF;
+
+		/*
+		 * If we already got to this bus through a different bridge,
+		 * ignore it.  This can happen with the i450NX chipset.
+		 */
+		if (pci_find_bus(pci_domain_nr(bus), busnr)) {
+			printk(KERN_INFO "PCI: Bus %04x:%02x already known\n",
+					pci_domain_nr(bus), busnr);
+			return max;
+		}
+
 		child = pci_alloc_child_bus(bus, dev, busnr);
 		if (!child)
 			return max;
@@ -490,6 +570,7 @@
 
 	/* Early fixups, before probing the BARs */
 	pci_fixup_device(pci_fixup_early, dev);
+	class = dev->class >> 8;
 
 	switch (dev->hdr_type) {		    /* header type */
 	case PCI_HEADER_TYPE_NORMAL:		    /* standard header */
@@ -602,9 +683,7 @@
 	struct pci_dev *dev;
 	u32 l;
 	u8 hdr_type;
-
-	if (pci_bus_read_config_byte(bus, devfn, PCI_HEADER_TYPE, &hdr_type))
-		return NULL;
+	int delay = 1;
 
 	if (pci_bus_read_config_dword(bus, devfn, PCI_VENDOR_ID, &l))
 		return NULL;
@@ -614,6 +693,25 @@
 	    l == 0x0000ffff || l == 0xffff0000)
 		return NULL;
 
+	/* Configuration request Retry Status */
+	while (l == 0xffff0001) {
+		msleep(delay);
+		delay *= 2;
+		if (pci_bus_read_config_dword(bus, devfn, PCI_VENDOR_ID, &l))
+			return NULL;
+		/* Card hasn't responded in 60 seconds?  Must be stuck. */
+		if (delay > 60 * 1000) {
+			printk(KERN_WARNING "Device %04x:%02x:%02x.%d not "
+					"responding\n", pci_domain_nr(bus),
+					bus->number, PCI_SLOT(devfn),
+					PCI_FUNC(devfn));
+			return NULL;
+		}
+	}
+
+	if (pci_bus_read_config_byte(bus, devfn, PCI_HEADER_TYPE, &hdr_type))
+		return NULL;
+
 	dev = kmalloc(sizeof(struct pci_dev), GFP_KERNEL);
 	if (!dev)
 		return NULL;
@@ -785,7 +883,7 @@
 
 	if (pci_find_bus(pci_domain_nr(b), bus)) {
 		/* If we already got to this bus through a different bridge, ignore it */
-		DBG("PCI: Bus %02x already known\n", bus);
+		DBG("PCI: Bus %04:%02x already known\n", pci_domain_nr(b), bus);
 		goto err_out;
 	}
 	list_add_tail(&b->node, &pci_root_buses);
@@ -807,6 +905,9 @@
 	error = class_device_create_file(&b->class_dev, &class_device_attr_cpuaffinity);
 	if (error)
 		goto class_dev_create_file_err;
+
+	/* Create legacy_io and legacy_mem files for this bus */
+	pci_create_legacy_files(b);
 
 	error = sysfs_create_link(&b->class_dev.kobj, &b->bridge->kobj, "bridge");
 	if (error)
diff -Nru a/drivers/pci/quirks.c b/drivers/pci/quirks.c
--- a/drivers/pci/quirks.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/pci/quirks.c	2005-01-10 20:11:15 -08:00
@@ -479,26 +479,6 @@
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_82C586_3,	quirk_via_acpi );
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_82C686_4,	quirk_via_acpi );
 
-static void quirk_via_irqpic(struct pci_dev *dev)
-{
-	u8 irq, new_irq = dev->irq & 0xf;
-
-	pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq);
-
-	if (new_irq != irq) {
-		printk(KERN_INFO "PCI: Via IRQ fixup for %s, from %d to %d\n",
-		       pci_name(dev), irq, new_irq);
-
-		udelay(15);
-		pci_write_config_byte(dev, PCI_INTERRUPT_LINE, new_irq);
-	}
-}
-DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_82C586_2,	quirk_via_irqpic );
-DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_82C686_5,	quirk_via_irqpic );
-DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_82C686_6,	quirk_via_irqpic );
-DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_8233_5,	quirk_via_irqpic );
-
-
 /*
  * PIIX3 USB: We have to disable USB interrupts that are
  * hardwired to PIRQD# and may be shared with an
@@ -691,12 +671,14 @@
 /*
  *	VIA northbridges care about PCI_INTERRUPT_LINE
  */
-int interrupt_line_quirk;
+int via_interrupt_line_quirk;
 
 static void __devinit quirk_via_bridge(struct pci_dev *pdev)
 {
-	if(pdev->devfn == 0)
-		interrupt_line_quirk = 1;
+	if(pdev->devfn == 0) {
+		printk(KERN_INFO "PCI: Via IRQ fixup\n");
+		via_interrupt_line_quirk = 1;
+	}
 }
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA,	PCI_ANY_ID,                     quirk_via_bridge );
 
@@ -717,6 +699,26 @@
 }
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB5IDE, quirk_svwks_csb5ide );
 
+/*
+ *	Intel 82801CAM ICH3-M datasheet says IDE modes must be the same
+ */
+static void __init quirk_ide_samemode(struct pci_dev *pdev)
+{
+	u8 prog;
+
+	pci_read_config_byte(pdev, PCI_CLASS_PROG, &prog);
+
+	if (((prog & 1) && !(prog & 4)) || ((prog & 4) && !(prog & 1))) {
+		printk(KERN_INFO "PCI: IDE mode mismatch; forcing legacy mode\n");
+		prog &= ~5;
+		pdev->class &= ~5;
+		pci_write_config_byte(pdev, PCI_CLASS_PROG, prog);
+		/* need to re-assign BARs for compat mode */
+		quirk_ide_bases(pdev);
+	}
+}
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_10, quirk_ide_samemode);
+
 /* This was originally an Alpha specific thing, but it really fits here.
  * The i82375 PCI/EISA bridge appears as non-classified. Fix that.
  */
@@ -1162,6 +1164,10 @@
 	case 0x2653:
 		ich = 6;
 		break;
+	case 0x27c0:
+	case 0x27c4:
+		ich = 7;
+		break;
 	default:
 		/* we do not handle this PCI device */
 		return;
@@ -1181,7 +1187,7 @@
 		else
 			return;			/* not in combined mode */
 	} else {
-		WARN_ON(ich != 6);
+		WARN_ON((ich != 6) && (ich != 7));
 		tmp &= 0x3;  /* interesting bits 1:0 */
 		if (tmp & (1 << 0))
 			comb = (1 << 2);	/* PATA port 0, SATA port 1 */
@@ -1237,6 +1243,8 @@
 	}
 }
 
+extern struct pci_fixup __start_pci_fixups_early[];
+extern struct pci_fixup __end_pci_fixups_early[];
 extern struct pci_fixup __start_pci_fixups_header[];
 extern struct pci_fixup __end_pci_fixups_header[];
 extern struct pci_fixup __start_pci_fixups_final[];
@@ -1250,6 +1258,11 @@
 	struct pci_fixup *start, *end;
 
 	switch(pass) {
+	case pci_fixup_early:
+		start = __start_pci_fixups_early;
+		end = __end_pci_fixups_early;
+		break;
+
 	case pci_fixup_header:
 		start = __start_pci_fixups_header;
 		end = __end_pci_fixups_header;
diff -Nru a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
--- a/drivers/pci/setup-bus.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/pci/setup-bus.c	2005-01-10 20:11:23 -08:00
@@ -57,8 +57,13 @@
 	list_for_each_entry(dev, &bus->devices, bus_list) {
 		u16 class = dev->class >> 8;
 
-		if (class == PCI_CLASS_DISPLAY_VGA
-				|| class == PCI_CLASS_NOT_DEFINED_VGA)
+		/* Don't touch classless devices and host bridges.  */
+		if (class == PCI_CLASS_NOT_DEFINED ||
+		    class == PCI_CLASS_BRIDGE_HOST)
+			continue;
+
+		if (class == PCI_CLASS_DISPLAY_VGA ||
+		    class == PCI_CLASS_NOT_DEFINED_VGA)
 			bus->bridge_ctl |= PCI_BRIDGE_CTL_VGA;
 
 		pdev_sort_resources(dev, &head);
diff -Nru a/drivers/pci/setup-irq.c b/drivers/pci/setup-irq.c
--- a/drivers/pci/setup-irq.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/pci/setup-irq.c	2005-01-10 20:11:18 -08:00
@@ -53,7 +53,8 @@
 		irq = 0;
 	dev->irq = irq;
 
-	DBGC((KERN_ERR "PCI fixup irq: (%s) got %d\n", dev->dev.name, dev->irq));
+	DBGC((KERN_ERR "PCI fixup irq: (%s) got %d\n", 
+		dev->dev.kobj.name, dev->irq));
 
 	/* Always tell the device, so the driver knows what is
 	   the real IRQ to use; the device does not use it. */
diff -Nru a/drivers/pcmcia/Kconfig b/drivers/pcmcia/Kconfig
--- a/drivers/pcmcia/Kconfig	2005-01-10 20:11:21 -08:00
+++ b/drivers/pcmcia/Kconfig	2005-01-10 20:11:21 -08:00
@@ -6,10 +6,10 @@
 #
 
 menu "PCCARD (PCMCIA/CardBus) support"
-	depends on HOTPLUG
 
 config PCCARD
 	tristate "PCCard (PCMCIA/CardBus) support"
+	select HOTPLUG
 	---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,
diff -Nru a/drivers/pnp/isapnp/core.c b/drivers/pnp/isapnp/core.c
--- a/drivers/pnp/isapnp/core.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/pnp/isapnp/core.c	2005-01-10 20:11:19 -08:00
@@ -58,13 +58,13 @@
 
 MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>");
 MODULE_DESCRIPTION("Generic ISA Plug & Play support");
-MODULE_PARM(isapnp_disable, "i");
+module_param(isapnp_disable, int, 0);
 MODULE_PARM_DESC(isapnp_disable, "ISA Plug & Play disable");
-MODULE_PARM(isapnp_rdp, "i");
+module_param(isapnp_rdp, int, 0);
 MODULE_PARM_DESC(isapnp_rdp, "ISA Plug & Play read data port");
-MODULE_PARM(isapnp_reset, "i");
+module_param(isapnp_reset, int, 0);
 MODULE_PARM_DESC(isapnp_reset, "ISA Plug & Play reset all cards");
-MODULE_PARM(isapnp_verbose, "i");
+module_param(isapnp_verbose, int, 0);
 MODULE_PARM_DESC(isapnp_verbose, "ISA Plug & Play verbose mode");
 MODULE_LICENSE("GPL");
 
diff -Nru a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c
--- a/drivers/pnp/pnpacpi/core.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/pnp/pnpacpi/core.c	2005-01-10 20:11:19 -08:00
@@ -236,6 +236,8 @@
 
 	if (!acpi_bus_get_device(handle, &device))
 		pnpacpi_add_device(device);
+	else
+		return AE_CTRL_DEPTH;
 	return AE_OK;
 }
 
@@ -247,9 +249,7 @@
 	}
 	pnp_info("PnP ACPI init");
 	pnp_register_protocol(&pnpacpi_protocol);
-	acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
-			ACPI_UINT32_MAX, pnpacpi_add_device_handler,
-			NULL, NULL);
+	acpi_get_devices(NULL, pnpacpi_add_device_handler, NULL, NULL);
 	pnp_info("PnP ACPI: found %d devices", num);
 	return 0;
 }
diff -Nru a/drivers/s390/block/dasd_devmap.c b/drivers/s390/block/dasd_devmap.c
--- a/drivers/s390/block/dasd_devmap.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/s390/block/dasd_devmap.c	2005-01-10 20:11:19 -08:00
@@ -11,7 +11,7 @@
  * functions may not be called from interrupt context. In particular
  * dasd_get_device is a no-no from interrupt context.
  *
- * $Revision: 1.34 $
+ * $Revision: 1.35 $
  */
 
 #include <linux/config.h>
@@ -553,6 +553,8 @@
 
 	/* First remove device pointer from devmap. */
 	devmap = dasd_find_busid(device->cdev->dev.bus_id);
+	if (IS_ERR(devmap))
+		BUG();
 	spin_lock(&dasd_devmap_lock);
 	if (devmap->device != device) {
 		spin_unlock(&dasd_devmap_lock);
@@ -626,8 +628,8 @@
 	struct dasd_devmap *devmap;
 	int ro_flag;
 
-	devmap = dev->driver_data;
-	if (devmap)
+	devmap = dasd_find_busid(dev->bus_id);
+	if (!IS_ERR(devmap))
 		ro_flag = (devmap->features & DASD_FEATURE_READONLY) != 0;
 	else
 		ro_flag = (DASD_FEATURE_DEFAULT & DASD_FEATURE_READONLY) != 0;
@@ -641,6 +643,8 @@
 	int ro_flag;
 
 	devmap = dasd_devmap_from_cdev(to_ccwdev(dev));
+	if (IS_ERR(devmap))
+		return PTR_ERR(devmap);
 	ro_flag = buf[0] == '1';
 	spin_lock(&dasd_devmap_lock);
 	if (ro_flag)
@@ -665,15 +669,14 @@
  * use_diag controls whether the driver should use diag rather than ssch
  * to talk to the device
  */
-/* TODO: Implement */
 static ssize_t 
 dasd_use_diag_show(struct device *dev, char *buf)
 {
 	struct dasd_devmap *devmap;
 	int use_diag;
 
-	devmap = dev->driver_data;
-	if (devmap)
+	devmap = dasd_find_busid(dev->bus_id);
+	if (!IS_ERR(devmap))
 		use_diag = (devmap->features & DASD_FEATURE_USEDIAG) != 0;
 	else
 		use_diag = (DASD_FEATURE_DEFAULT & DASD_FEATURE_USEDIAG) != 0;
@@ -684,21 +687,25 @@
 dasd_use_diag_store(struct device *dev, const char *buf, size_t count)
 {
 	struct dasd_devmap *devmap;
+	ssize_t rc;
 	int use_diag;
 
 	devmap = dasd_devmap_from_cdev(to_ccwdev(dev));
+	if (IS_ERR(devmap))
+		return PTR_ERR(devmap);
 	use_diag = buf[0] == '1';
 	spin_lock(&dasd_devmap_lock);
 	/* Changing diag discipline flag is only allowed in offline state. */
+	rc = count;
 	if (!devmap->device) {
 		if (use_diag)
 			devmap->features |= DASD_FEATURE_USEDIAG;
 		else
 			devmap->features &= ~DASD_FEATURE_USEDIAG;
 	} else
-		count = -EPERM;
+		rc = -EPERM;
 	spin_unlock(&dasd_devmap_lock);
-	return count;
+	return rc;
 }
 
 static
diff -Nru a/drivers/s390/block/dasd_diag.c b/drivers/s390/block/dasd_diag.c
--- a/drivers/s390/block/dasd_diag.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/s390/block/dasd_diag.c	2005-01-10 20:11:15 -08:00
@@ -6,7 +6,7 @@
  * Bugreports.to..: <Linux390@de.ibm.com>
  * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000
  *
- * $Revision: 1.39 $
+ * $Revision: 1.40 $
  */
 
 #include <linux/config.h>
@@ -274,6 +274,7 @@
 			"No memory to allocate initialization request");
 		return -ENOMEM;
 	}
+	/* try all sizes - needed for ECKD devices */
 	for (bsize = 512; bsize <= PAGE_SIZE; bsize <<= 1) {
 		mdsk_init_io(device, bsize, 0, 64);
 		memset(&bio, 0, sizeof (struct dasd_diag_bio));
@@ -291,8 +292,9 @@
 			break;
 		mdsk_term_io(device);
 	}
-	if (bsize <= PAGE_SIZE && label[3] == bsize &&
-	    label[0] == 0xc3d4e2f1) {
+	if (bsize <= PAGE_SIZE && label[0] == 0xc3d4e2f1) {
+		/* get formatted blocksize from label block */
+		bsize = (int) label[3];
 		device->blocks = label[7];
 		device->bp_block = bsize;
 		device->s2b_shift = 0;	/* bits to shift 512 to get a block */
@@ -305,8 +307,12 @@
 			    (device->blocks << device->s2b_shift) >> 1);
 		rc = 0;
 	} else {
-		DEV_MESSAGE(KERN_WARNING, device, "%s",
-			    "volume has incompatible disk layout");
+		if (bsize > PAGE_SIZE)
+			DEV_MESSAGE(KERN_WARNING, device, "%s",
+				    "DIAG access failed");
+		else
+			DEV_MESSAGE(KERN_WARNING, device, "%s",
+				    "volume is not CMS formatted");
 		rc = -EMEDIUMTYPE;
 	}
 	free_page((long) label);
diff -Nru a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c
--- a/drivers/s390/block/dasd_eckd.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/s390/block/dasd_eckd.c	2005-01-10 20:11:15 -08:00
@@ -7,7 +7,7 @@
  * Bugreports.to..: <Linux390@de.ibm.com>
  * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000
  *
- * $Revision: 1.65 $
+ * $Revision: 1.66 $
  */
 
 #include <linux/config.h>
@@ -1192,10 +1192,10 @@
 
 	cqr = dasd_smalloc_request(dasd_eckd_discipline.name,
 				   1, 32, device);
-	if (cqr == NULL) {
+	if (IS_ERR(cqr)) {
 		MESSAGE(KERN_WARNING, "%s",
-			"No memory to allocate initialization request");
-		return -ENOMEM;
+			"Could not allocate initialization request");
+		return PTR_ERR(cqr);
 	}
 	cqr->cpaddr->cmd_code = DASD_ECKD_CCW_RELEASE;
         cqr->cpaddr->flags |= CCW_FLAG_SLI;
@@ -1236,10 +1236,10 @@
 
 	cqr = dasd_smalloc_request(dasd_eckd_discipline.name,
 				   1, 32, device);
-	if (cqr == NULL) {
+	if (IS_ERR(cqr)) {
 		MESSAGE(KERN_WARNING, "%s",
-			"No memory to allocate initialization request");
-		return -ENOMEM;
+			"Could not allocate initialization request");
+		return PTR_ERR(cqr);
 	}
 	cqr->cpaddr->cmd_code = DASD_ECKD_CCW_RESERVE;
         cqr->cpaddr->flags |= CCW_FLAG_SLI;
@@ -1279,10 +1279,10 @@
 
 	cqr = dasd_smalloc_request(dasd_eckd_discipline.name,
 				   1, 32, device);
-	if (cqr == NULL) {
+	if (IS_ERR(cqr)) {
 		MESSAGE(KERN_WARNING, "%s",
-			"No memory to allocate initialization request");
-		return -ENOMEM;
+			"Could not allocate initialization request");
+		return PTR_ERR(cqr);
 	}
 	cqr->cpaddr->cmd_code = DASD_ECKD_CCW_SLCK;
         cqr->cpaddr->flags |= CCW_FLAG_SLI;
@@ -1323,10 +1323,10 @@
 				   (sizeof (struct dasd_psf_prssd_data) +
 				    sizeof (struct dasd_rssd_perf_stats_t)),
 				   device);
-	if (cqr == NULL) {
+	if (IS_ERR(cqr)) {
 		MESSAGE(KERN_WARNING, "%s",
-			"No memory to allocate initialization request");
-		return -ENOMEM;
+			"Could not allocate initialization request");
+		return PTR_ERR(cqr);
 	}
 	cqr->device = device;
 	cqr->retries = 0;
diff -Nru a/drivers/s390/block/dasd_proc.c b/drivers/s390/block/dasd_proc.c
--- a/drivers/s390/block/dasd_proc.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/s390/block/dasd_proc.c	2005-01-10 20:11:17 -08:00
@@ -9,7 +9,7 @@
  *
  * /proc interface for the dasd driver.
  *
- * $Revision: 1.27 $
+ * $Revision: 1.29 $
  */
 
 #include <linux/config.h>
@@ -248,6 +248,8 @@
 	if (user_len > 65536)
 		user_len = 65536;
 	buffer = dasd_get_user_string(user_buf, user_len);
+	if (IS_ERR(buffer))
+		return PTR_ERR(buffer);
 	MESSAGE(KERN_INFO, "/proc/dasd/statictics: '%s'", buffer);
 
 	/* check for valid verbs */
@@ -258,20 +260,20 @@
 		if (strcmp(str, "on") == 0) {
 			/* switch on statistics profiling */
 			dasd_profile_level = DASD_PROFILE_ON;
-			MESSAGE(KERN_INFO, "%s", "Statictics switched on");
+			MESSAGE(KERN_INFO, "%s", "Statistics switched on");
 		} else if (strcmp(str, "off") == 0) {
 			/* switch off and reset statistics profiling */
 			memset(&dasd_global_profile,
 			       0, sizeof (struct dasd_profile_info_t));
 			dasd_profile_level = DASD_PROFILE_OFF;
-			MESSAGE(KERN_INFO, "%s", "Statictics switched off");
+			MESSAGE(KERN_INFO, "%s", "Statistics switched off");
 		} else
 			goto out_error;
 	} else if (strncmp(str, "reset", 5) == 0) {
 		/* reset the statistics */
 		memset(&dasd_global_profile, 0,
 		       sizeof (struct dasd_profile_info_t));
-		MESSAGE(KERN_INFO, "%s", "Statictics reset");
+		MESSAGE(KERN_INFO, "%s", "Statistics reset");
 	} else
 		goto out_error;
 	kfree(buffer);
diff -Nru a/drivers/s390/char/Makefile b/drivers/s390/char/Makefile
--- a/drivers/s390/char/Makefile	2005-01-10 20:11:18 -08:00
+++ b/drivers/s390/char/Makefile	2005-01-10 20:11:18 -08:00
@@ -11,7 +11,7 @@
 
 obj-$(CONFIG_TN3215) += con3215.o
 
-obj-$(CONFIG_SCLP) += sclp.o sclp_rw.o
+obj-$(CONFIG_SCLP) += sclp.o sclp_rw.o sclp_quiesce.o
 obj-$(CONFIG_SCLP_TTY) += sclp_tty.o
 obj-$(CONFIG_SCLP_CONSOLE) += sclp_con.o
 obj-$(CONFIG_SCLP_VT220_TTY) += sclp_vt220.o
diff -Nru a/drivers/s390/char/con3270.c b/drivers/s390/char/con3270.c
--- a/drivers/s390/char/con3270.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/s390/char/con3270.c	2005-01-10 20:11:16 -08:00
@@ -73,10 +73,12 @@
 con3270_set_timer(struct con3270 *cp, int expires)
 {
 	if (expires == 0) {
-		del_timer(&cp->timer);
+		if (timer_pending(&cp->timer))
+			del_timer(&cp->timer);
 		return;
 	}
-	if (mod_timer(&cp->timer, jiffies + expires))
+	if (timer_pending(&cp->timer) &&
+	    mod_timer(&cp->timer, jiffies + expires))
 		return;
 	cp->timer.function = (void (*)(unsigned long)) con3270_update;
 	cp->timer.data = (unsigned long) cp;
diff -Nru a/drivers/s390/char/sclp.c b/drivers/s390/char/sclp.c
--- a/drivers/s390/char/sclp.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/s390/char/sclp.c	2005-01-10 20:11:20 -08:00
@@ -8,82 +8,99 @@
  *		 Martin Schwidefsky <schwidefsky@de.ibm.com>
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
-#include <linux/kmod.h>
-#include <linux/bootmem.h>
 #include <linux/err.h>
-#include <linux/ptrace.h>
-#include <linux/slab.h>
 #include <linux/spinlock.h>
 #include <linux/interrupt.h>
 #include <linux/timer.h>
-#include <linux/init.h>
-#include <linux/cpumask.h>
 #include <linux/reboot.h>
+#include <linux/jiffies.h>
+#include <asm/types.h>
 #include <asm/s390_ext.h>
-#include <asm/processor.h>
 
 #include "sclp.h"
 
-#define SCLP_CORE_PRINT_HEADER "sclp low level driver: "
+#define SCLP_HEADER		"sclp: "
 
 /* Structure for register_early_external_interrupt. */
 static ext_int_info_t ext_int_info_hwc;
 
-/* spinlock to protect global variables of sclp_core */
-static spinlock_t sclp_lock;
+/* Lock to protect internal data consistency. */
+static spinlock_t sclp_lock = SPIN_LOCK_UNLOCKED;
 
-/* Mask of valid sclp events */
+/* Mask of events that we can receive from the sclp interface. */
 static sccb_mask_t sclp_receive_mask;
+
+/* Mask of events that we can send to the sclp interface. */
 static sccb_mask_t sclp_send_mask;
 
-/* List of registered event types */
+/* List of registered event listeners and senders. */
 static struct list_head sclp_reg_list;
 
-/* sccb queue */
+/* List of queued requests. */
 static struct list_head sclp_req_queue;
 
-/* sccb for unconditional read */
+/* Data for read and and init requests. */
 static struct sclp_req sclp_read_req;
+static struct sclp_req sclp_init_req;
 static char sclp_read_sccb[PAGE_SIZE] __attribute__((__aligned__(PAGE_SIZE)));
-/* sccb for write mask sccb */
 static char sclp_init_sccb[PAGE_SIZE] __attribute__((__aligned__(PAGE_SIZE)));
 
-/* Timer for init mask retries. */
-static struct timer_list retry_timer;
+/* Timer for request retries. */
+static struct timer_list sclp_request_timer;
 
-/* Timer for busy retries. */
-static struct timer_list sclp_busy_timer;
+/* Internal state: is the driver initialized? */
+static volatile enum sclp_init_state_t {
+	sclp_init_state_uninitialized,
+	sclp_init_state_initializing,
+	sclp_init_state_initialized
+} sclp_init_state = sclp_init_state_uninitialized;
+
+/* Internal state: is a request active at the sclp? */
+static volatile enum sclp_running_state_t {
+	sclp_running_state_idle,
+	sclp_running_state_running
+} sclp_running_state = sclp_running_state_idle;
+
+/* Internal state: is a read request pending? */
+static volatile enum sclp_reading_state_t {
+	sclp_reading_state_idle,
+	sclp_reading_state_reading
+} sclp_reading_state = sclp_reading_state_idle;
+
+/* Internal state: is the driver currently serving requests? */
+static volatile enum sclp_activation_state_t {
+	sclp_activation_state_active,
+	sclp_activation_state_deactivating,
+	sclp_activation_state_inactive,
+	sclp_activation_state_activating
+} sclp_activation_state = sclp_activation_state_active;
+
+/* Internal state: is an init mask request pending? */
+static volatile enum sclp_mask_state_t {
+	sclp_mask_state_idle,
+	sclp_mask_state_initializing
+} sclp_mask_state = sclp_mask_state_idle;
+
+/* Maximum retry counts */
+#define SCLP_INIT_RETRY		3
+#define SCLP_MASK_RETRY		3
+#define SCLP_REQUEST_RETRY	3
+
+/* Timeout intervals in seconds.*/
+#define SCLP_BUSY_INTERVAL	2
+#define SCLP_RETRY_INTERVAL	5
+
+static void sclp_process_queue(void);
+static int sclp_init_mask(int calculate);
+static int sclp_init(void);
 
-static volatile unsigned long sclp_status = 0;
-/* some status flags */
-#define SCLP_INIT		0
-#define SCLP_RUNNING		1
-#define SCLP_READING		2
-#define SCLP_SHUTDOWN		3
-
-#define SCLP_INIT_POLL_INTERVAL	1
-#define SCLP_BUSY_POLL_INTERVAL	1
-
-#define SCLP_COMMAND_INITIATED	0
-#define SCLP_BUSY		2
-#define SCLP_NOT_OPERATIONAL	3
-
-/*
- * assembler instruction for Service Call
- */
+/* Perform service call. Return 0 on success, non-zero otherwise. */
 static int
-__service_call(sclp_cmdw_t command, void *sccb)
+service_call(sclp_cmdw_t command, void *sccb)
 {
 	int cc;
 
-	/*
-	 *  Mnemonic:	SERVC	Rx, Ry	[RRE]
-	 *
-	 *  Rx: SCLP command word
-	 *  Ry: address of SCCB
-	 */
 	__asm__ __volatile__(
 		"   .insn rre,0xb2200000,%1,%2\n"  /* servc %1,%2 */
 		"   ipm	  %0\n"
@@ -91,61 +108,94 @@
 		: "=&d" (cc)
 		: "d" (command), "a" (__pa(sccb))
 		: "cc", "memory" );
-	/*
-	 * cc == 0:   Service Call succesful initiated
-	 * cc == 2:   SCLP busy, new Service Call not initiated,
-	 *	      new SCCB unchanged
-	 * cc == 3:   SCLP function not operational
-	 */
-	if (cc == SCLP_NOT_OPERATIONAL)
+	if (cc == 3)
 		return -EIO;
-	if (cc == SCLP_BUSY)
+	if (cc == 2)
 		return -EBUSY;
 	return 0;
 }
 
+/* Request timeout handler. Restart the request queue. If DATA is non-zero,
+ * force restart of running request. */
+static void
+sclp_request_timeout(unsigned long data)
+{
+	unsigned long flags;
+
+	if (data) {
+		spin_lock_irqsave(&sclp_lock, flags);
+		sclp_running_state = sclp_running_state_idle;
+		spin_unlock_irqrestore(&sclp_lock, flags);
+	}
+	sclp_process_queue();
+}
+
+/* Set up request retry timer. Called while sclp_lock is locked. */
+static inline void
+__sclp_set_request_timer(unsigned long time, void (*function)(unsigned long),
+			 unsigned long data)
+{
+	del_timer(&sclp_request_timer);
+	sclp_request_timer.function = function;
+	sclp_request_timer.data = data;
+	sclp_request_timer.expires = jiffies + time;
+	add_timer(&sclp_request_timer);
+}
+
+/* Try to start a request. Return zero if the request was successfully
+ * started or if it will be started at a later time. Return non-zero otherwise.
+ * Called while sclp_lock is locked. */
+static int
+__sclp_start_request(struct sclp_req *req)
+{
+	int rc;
+
+	if (sclp_running_state != sclp_running_state_idle)
+		return 0;
+	del_timer(&sclp_request_timer);
+	if (req->start_count <= SCLP_REQUEST_RETRY) {
+		rc = service_call(req->command, req->sccb);
+		req->start_count++;
+	} else
+		rc = -EIO;
+	if (rc == 0) {
+		/* Sucessfully started request */
+		req->status = SCLP_REQ_RUNNING;
+		sclp_running_state = sclp_running_state_running;
+		__sclp_set_request_timer(SCLP_RETRY_INTERVAL * HZ,
+					 sclp_request_timeout, 1);
+		return 0;
+	} else if (rc == -EBUSY) {
+		/* Try again later */
+		__sclp_set_request_timer(SCLP_BUSY_INTERVAL * HZ,
+					 sclp_request_timeout, 0);
+		return 0;
+	}
+	/* Request failed */
+	req->status = SCLP_REQ_FAILED;
+	return rc;
+}
+
+/* Try to start queued requests. */
 static void
-sclp_start_request(void)
+sclp_process_queue(void)
 {
 	struct sclp_req *req;
 	int rc;
 	unsigned long flags;
 
 	spin_lock_irqsave(&sclp_lock, flags);
-	/* quick exit if sclp is already in use */
-	if (test_bit(SCLP_RUNNING, &sclp_status)) {
+	if (sclp_running_state != sclp_running_state_idle) {
 		spin_unlock_irqrestore(&sclp_lock, flags);
 		return;
 	}
-	/* Try to start requests from the request queue. */
+	del_timer(&sclp_request_timer);
 	while (!list_empty(&sclp_req_queue)) {
 		req = list_entry(sclp_req_queue.next, struct sclp_req, list);
-		rc = __service_call(req->command, req->sccb);
-		if (rc == 0) {
-			/* Sucessfully started request. */
-			req->status = SCLP_REQ_RUNNING;
-			/* Request active. Set running indication. */
-			set_bit(SCLP_RUNNING, &sclp_status);
-			break;
-		}
-		if (rc == -EBUSY) {
-			/**
-			 * SCLP is busy but no request is running.
-			 * Try again later.
-			 */
-			if (!timer_pending(&sclp_busy_timer) ||
-			    !mod_timer(&sclp_busy_timer,
-				       jiffies + SCLP_BUSY_POLL_INTERVAL*HZ)) {
-				sclp_busy_timer.function =
-					(void *) sclp_start_request;
-				sclp_busy_timer.expires =
-					jiffies + SCLP_BUSY_POLL_INTERVAL*HZ;
-				add_timer(&sclp_busy_timer);
-			}
+		rc = __sclp_start_request(req);
+		if (rc == 0)
 			break;
-		}
 		/* Request failed. */
-		req->status = SCLP_REQ_FAILED;
 		list_del(&req->list);
 		if (req->callback) {
 			spin_unlock_irqrestore(&sclp_lock, flags);
@@ -156,265 +206,258 @@
 	spin_unlock_irqrestore(&sclp_lock, flags);
 }
 
+/* Queue a new request. Return zero on success, non-zero otherwise. */
+int
+sclp_add_request(struct sclp_req *req)
+{
+	unsigned long flags;
+	int rc;
+
+	spin_lock_irqsave(&sclp_lock, flags);
+	if ((sclp_init_state != sclp_init_state_initialized ||
+	     sclp_activation_state != sclp_activation_state_active) &&
+	    req != &sclp_init_req) {
+		spin_unlock_irqrestore(&sclp_lock, flags);
+		return -EIO;
+	}
+	req->status = SCLP_REQ_QUEUED;
+	req->start_count = 0;
+	list_add_tail(&req->list, &sclp_req_queue);
+	rc = 0;
+	/* Start if request is first in list */
+	if (req->list.prev == &sclp_req_queue) {
+		rc = __sclp_start_request(req);
+		if (rc)
+			list_del(&req->list);
+	}
+	spin_unlock_irqrestore(&sclp_lock, flags);
+	return rc;
+}
+
+EXPORT_SYMBOL(sclp_add_request);
+
+/* Dispatch events found in request buffer to registered listeners. Return 0
+ * if all events were dispatched, non-zero otherwise. */
 static int
-sclp_process_evbufs(struct sccb_header *sccb)
+sclp_dispatch_evbufs(struct sccb_header *sccb)
 {
-	int result;
 	unsigned long flags;
 	struct evbuf_header *evbuf;
 	struct list_head *l;
-	struct sclp_register *t;
+	struct sclp_register *reg;
+	int offset;
+	int rc;
 
 	spin_lock_irqsave(&sclp_lock, flags);
-	evbuf = (struct evbuf_header *) (sccb + 1);
-	result = 0;
-	while ((addr_t) evbuf < (addr_t) sccb + sccb->length) {
-		/* check registered event */
-		t = NULL;
+	rc = 0;
+	for (offset = sizeof(struct sccb_header); offset < sccb->length;
+	     offset += evbuf->length) {
+		/* Search for event handler */
+		evbuf = (struct evbuf_header *) ((addr_t) sccb + offset);
+		reg = NULL;
 		list_for_each(l, &sclp_reg_list) {
-			t = list_entry(l, struct sclp_register, list);
-			if (t->receive_mask & (1 << (32 - evbuf->type))) {
-				if (t->receiver_fn != NULL) {
-					spin_unlock_irqrestore(&sclp_lock,
-							       flags);
-					t->receiver_fn(evbuf);
-					spin_lock_irqsave(&sclp_lock, flags);
-				}
+			reg = list_entry(l, struct sclp_register, list);
+			if (reg->receive_mask & (1 << (32 - evbuf->type)))
 				break;
-			}
 			else
-				t = NULL;
+				reg = NULL;
 		}
-		/* Check for unrequested event buffer */
-		if (t == NULL)
-			result = -ENOSYS;
-		evbuf = (struct evbuf_header *)
-				((addr_t) evbuf + evbuf->length);
+		if (reg && reg->receiver_fn) {
+			spin_unlock_irqrestore(&sclp_lock, flags);
+			reg->receiver_fn(evbuf);
+			spin_lock_irqsave(&sclp_lock, flags);
+		} else if (reg == NULL)
+			rc = -ENOSYS;
 	}
 	spin_unlock_irqrestore(&sclp_lock, flags);
-	return result;
+	return rc;
 }
 
-char *
-sclp_error_message(u16 rc)
-{
-	static struct {
-		u16 code; char *msg;
-	} sclp_errors[] = {
-		{ 0x0000, "No response code stored (machine malfunction)" },
-		{ 0x0020, "Normal Completion" },
-		{ 0x0040, "SCLP equipment check" },
-		{ 0x0100, "SCCB boundary violation" },
-		{ 0x01f0, "Invalid command" },
-		{ 0x0220, "Normal Completion; suppressed buffers pending" },
-		{ 0x0300, "Insufficient SCCB length" },
-		{ 0x0340, "Contained SCLP equipment check" },
-		{ 0x05f0, "Target resource in improper state" },
-		{ 0x40f0, "Invalid function code/not installed" },
-		{ 0x60f0, "No buffers stored" },
-		{ 0x62f0, "No buffers stored; suppressed buffers pending" },
-		{ 0x70f0, "Invalid selection mask" },
-		{ 0x71f0, "Event buffer exceeds available space" },
-		{ 0x72f0, "Inconsistent lengths" },
-		{ 0x73f0, "Event buffer syntax error" }
-	};
-	int i;
-	for (i = 0; i < sizeof(sclp_errors)/sizeof(sclp_errors[0]); i++)
-		if (rc == sclp_errors[i].code)
-			return sclp_errors[i].msg;
-	return "Invalid response code";
-}
-
-/*
- * postprocessing of unconditional read service call
- */
+/* Read event data request callback. */
 static void
-sclp_unconditional_read_cb(struct sclp_req *read_req, void *data)
+sclp_read_cb(struct sclp_req *req, void *data)
 {
+	unsigned long flags;
 	struct sccb_header *sccb;
 
-	sccb = read_req->sccb;
-	if (sccb->response_code == 0x0020 ||
-	    sccb->response_code == 0x0220) {
-		if (sclp_process_evbufs(sccb) != 0)
-			printk(KERN_WARNING SCLP_CORE_PRINT_HEADER
-			       "unconditional read: "
-			       "unrequested event buffer received.\n");
-	}
-
-	if (sccb->response_code != 0x0020)
-		printk(KERN_WARNING SCLP_CORE_PRINT_HEADER
-		       "unconditional read: %s (response code=0x%x).\n",
-		       sclp_error_message(sccb->response_code),
-		       sccb->response_code);
-
-	clear_bit(SCLP_READING, &sclp_status);
-}
-
-/*
- * Function to queue Read Event Data/Unconditional Read
- */
-static void
-__sclp_unconditional_read(void)
+	sccb = (struct sccb_header *) req->sccb;
+	if (req->status == SCLP_REQ_DONE && (sccb->response_code == 0x20 ||
+	    sccb->response_code == 0x220))
+		sclp_dispatch_evbufs(sccb);
+	spin_lock_irqsave(&sclp_lock, flags);
+	sclp_reading_state = sclp_reading_state_idle;
+	spin_unlock_irqrestore(&sclp_lock, flags);
+}
+
+/* Prepare read event data request. Called while sclp_lock is locked. */
+static inline void
+__sclp_make_read_req(void)
 {
 	struct sccb_header *sccb;
-	struct sclp_req *read_req;
 
-	/*
-	 * Don't try to initiate Unconditional Read if we are not able to
-	 * receive anything
-	 */
-	if (sclp_receive_mask == 0)
-		return;
-	/* Don't try reading if a read is already outstanding */
-	if (test_and_set_bit(SCLP_READING, &sclp_status))
-		return;
-	/* Initialize read sccb */
 	sccb = (struct sccb_header *) sclp_read_sccb;
 	clear_page(sccb);
+	memset(&sclp_read_req, 0, sizeof(struct sclp_req));
+	sclp_read_req.command = SCLP_CMDW_READDATA;
+	sclp_read_req.status = SCLP_REQ_QUEUED;
+	sclp_read_req.start_count = 0;
+	sclp_read_req.callback = sclp_read_cb;
+	sclp_read_req.sccb = sccb;
 	sccb->length = PAGE_SIZE;
-	sccb->function_code = 0;	/* unconditional read */
-	sccb->control_mask[2] = 0x80;	/* variable length response */
-	/* Initialize request structure */
-	read_req = &sclp_read_req;
-	read_req->command = SCLP_CMDW_READDATA;
-	read_req->status = SCLP_REQ_QUEUED;
-	read_req->callback = sclp_unconditional_read_cb;
-	read_req->sccb = sccb;
-	/* Add read request to the head of queue */
-	list_add(&read_req->list, &sclp_req_queue);
-}
-
-/* Bit masks to interpret external interruption parameter contents. */
-#define EXT_INT_SCCB_MASK		0xfffffff8
-#define EXT_INT_STATECHANGE_PENDING	0x00000002
-#define EXT_INT_EVBUF_PENDING		0x00000001
-
-/*
- * Handler for service-signal external interruptions
- */
+	sccb->function_code = 0;
+	sccb->control_mask[2] = 0x80;
+}
+
+/* Search request list for request with matching sccb. Return request if found,
+ * NULL otherwise. Called while sclp_lock is locked. */
+static inline struct sclp_req *
+__sclp_find_req(u32 sccb)
+{
+	struct list_head *l;
+	struct sclp_req *req;
+
+	list_for_each(l, &sclp_req_queue) {
+		req = list_entry(l, struct sclp_req, list);
+		if (sccb == (u32) (addr_t) req->sccb)
+				return req;
+	}
+	return NULL;
+}
+
+/* Handler for external interruption. Perform request post-processing.
+ * Prepare read event data request if necessary. Start processing of next
+ * request on queue. */
 static void
 sclp_interrupt_handler(struct pt_regs *regs, __u16 code)
 {
-	u32 ext_int_param, finished_sccb, evbuf_pending;
-	struct list_head *l;
-	struct sclp_req *req, *tmp;
+	struct sclp_req *req;
+	u32 finished_sccb;
+	u32 evbuf_pending;
 
 	spin_lock(&sclp_lock);
-	/*
-	 * Only process interrupt if sclp is initialized.
-	 * This avoids strange effects for a pending request
-	 * from before the last re-ipl.
-	 */
-	if (!test_bit(SCLP_INIT, &sclp_status)) {
-		/* Now clear the running bit */
-		clear_bit(SCLP_RUNNING, &sclp_status);
-		spin_unlock(&sclp_lock);
-		return;
-	}
-	ext_int_param = S390_lowcore.ext_params;
-	finished_sccb = ext_int_param & EXT_INT_SCCB_MASK;
-	evbuf_pending = ext_int_param & (EXT_INT_EVBUF_PENDING |
-					 EXT_INT_STATECHANGE_PENDING);
-	req = NULL;
-	if (finished_sccb != 0U) {
-		list_for_each(l, &sclp_req_queue) {
-			tmp = list_entry(l, struct sclp_req, list);
-			if (finished_sccb == (u32)(addr_t) tmp->sccb) {
-				list_del(&tmp->list);
-				req = tmp;
-				break;
+	finished_sccb = S390_lowcore.ext_params & 0xfffffff8;
+	evbuf_pending = S390_lowcore.ext_params & 0x3;
+	if (finished_sccb) {
+		req = __sclp_find_req(finished_sccb);
+		if (req) {
+			/* Request post-processing */
+			list_del(&req->list);
+			req->status = SCLP_REQ_DONE;
+			if (req->callback) {
+				spin_unlock(&sclp_lock);
+				req->callback(req, req->callback_data);
+				spin_lock(&sclp_lock);
 			}
 		}
+		sclp_running_state = sclp_running_state_idle;
 	}
-	spin_unlock(&sclp_lock);
-	/* Perform callback */
-	if (req != NULL) {
-		req->status = SCLP_REQ_DONE;
-		if (req->callback != NULL)
-			req->callback(req, req->callback_data);
+	if (evbuf_pending && sclp_receive_mask != 0 &&
+	    sclp_reading_state == sclp_reading_state_idle &&
+	    sclp_activation_state == sclp_activation_state_active ) {
+		sclp_reading_state = sclp_reading_state_reading;
+		__sclp_make_read_req();
+		/* Add request to head of queue */
+		list_add(&sclp_read_req.list, &sclp_req_queue);
 	}
-	spin_lock(&sclp_lock);
-	/* Head queue a read sccb if an event buffer is pending */
-	if (evbuf_pending)
-		__sclp_unconditional_read();
-	/* Now clear the running bit if SCLP indicated a finished SCCB */
-	if (finished_sccb != 0U)
-		clear_bit(SCLP_RUNNING, &sclp_status);
 	spin_unlock(&sclp_lock);
-	/* and start next request on the queue */
-	sclp_start_request();
+	sclp_process_queue();
+}
+
+/* Return current Time-Of-Day clock. */
+static inline u64
+sclp_get_clock(void)
+{
+	u64 result;
+
+	asm volatile ("STCK 0(%1)" : "=m" (result) : "a" (&(result)) : "cc");
+	return result;
+}
+
+/* Convert interval in jiffies to TOD ticks. */
+static inline u64
+sclp_tod_from_jiffies(unsigned long jiffies)
+{
+	return (u64) (jiffies / HZ) << 32;
 }
 
-/*
- * Wait synchronously for external interrupt of sclp. We may not receive
- * any other external interrupt, so we disable all other external interrupts
- * in control register 0.
- */
+/* Wait until a currently running request finished. Note: while this function
+ * is running, no timers are served on the calling CPU. */
 void
 sclp_sync_wait(void)
 {
 	unsigned long psw_mask;
 	unsigned long cr0, cr0_sync;
+	u64 timeout;
 
-	/* Prevent BH from executing. */
+	/* We'll be disabling timer interrupts, so we need a custom timeout
+	 * mechanism */
+	timeout = 0;
+	if (timer_pending(&sclp_request_timer)) {
+		/* Get timeout TOD value */
+		timeout = sclp_get_clock() +
+			  sclp_tod_from_jiffies(sclp_request_timer.expires -
+						jiffies);
+	}
+	/* Prevent bottom half from executing once we force interrupts open */
 	local_bh_disable();
-	/*
-	 * save cr0
-	 * enable service signal external interruption (cr0.22)
-	 * disable cr0.20-21, cr0.25, cr0.27, cr0.30-31
-	 * don't touch any other bit in cr0
-	 */
+	/* Enable service-signal interruption, disable timer interrupts */
 	__ctl_store(cr0, 0, 0);
 	cr0_sync = cr0;
 	cr0_sync |= 0x00000200;
 	cr0_sync &= 0xFFFFF3AC;
 	__ctl_load(cr0_sync, 0, 0);
-
-	/* enable external interruptions (PSW-mask.7) */
 	asm volatile ("STOSM 0(%1),0x01"
 		      : "=m" (psw_mask) : "a" (&psw_mask) : "memory");
-
-	/* wait until ISR signals receipt of interrupt */
-	while (test_bit(SCLP_RUNNING, &sclp_status)) {
+	/* Loop until driver state indicates finished request */
+	while (sclp_running_state != sclp_running_state_idle) {
+		/* Check for expired request timer */
+		if (timer_pending(&sclp_request_timer) &&
+		    sclp_get_clock() > timeout &&
+		    del_timer(&sclp_request_timer))
+			sclp_request_timer.function(sclp_request_timer.data);
 		barrier();
 		cpu_relax();
 	}
-
-	/* disable external interruptions */
+	/* Restore interrupt settings */
 	asm volatile ("SSM 0(%0)"
 		      : : "a" (&psw_mask) : "memory");
-
-	/* restore cr0 */
 	__ctl_load(cr0, 0, 0);
 	__local_bh_enable();
 }
 
-/*
- * Queue an SCLP request. Request will immediately be processed if queue is
- * empty.
- */
-void
-sclp_add_request(struct sclp_req *req)
+EXPORT_SYMBOL(sclp_sync_wait);
+
+/* Dispatch changes in send and receive mask to registered listeners. */
+static inline void
+sclp_dispatch_state_change(void)
 {
+	struct list_head *l;
+	struct sclp_register *reg;
 	unsigned long flags;
+	sccb_mask_t receive_mask;
+	sccb_mask_t send_mask;
 
-	if (!test_bit(SCLP_INIT, &sclp_status)) {
-		req->status = SCLP_REQ_FAILED;
-		if (req->callback != NULL)
-			req->callback(req, req->callback_data);
-		return;
-	}
-	spin_lock_irqsave(&sclp_lock, flags);
-	/* queue the request */
-	req->status = SCLP_REQ_QUEUED;
-	list_add_tail(&req->list, &sclp_req_queue);
-	spin_unlock_irqrestore(&sclp_lock, flags);
-	/* try to start the first request on the queue */
-	sclp_start_request();
+	do {
+		spin_lock_irqsave(&sclp_lock, flags);
+		reg = NULL;
+		list_for_each(l, &sclp_reg_list) {
+			reg = list_entry(l, struct sclp_register, list);
+			receive_mask = reg->receive_mask & sclp_receive_mask;
+			send_mask = reg->send_mask & sclp_send_mask;
+			if (reg->sclp_receive_mask != receive_mask ||
+			    reg->sclp_send_mask != send_mask) {
+				reg->sclp_receive_mask = receive_mask;
+				reg->sclp_send_mask = send_mask;
+				break;
+			} else
+				reg = NULL;
+		}
+		spin_unlock_irqrestore(&sclp_lock, flags);
+		if (reg && reg->state_change_fn)
+			reg->state_change_fn(reg);
+	} while (reg);
 }
 
-/* state change notification */
 struct sclp_statechangebuf {
 	struct evbuf_header	header;
 	u8		validity_sclp_active_facility_mask : 1;
@@ -429,148 +472,126 @@
 	u32		read_data_function_mask;
 } __attribute__((packed));
 
-static inline void
-__sclp_notify_state_change(void)
-{
-	struct list_head *l;
-	struct sclp_register *t;
-	sccb_mask_t receive_mask, send_mask;
-
-	list_for_each(l, &sclp_reg_list) {
-		t = list_entry(l, struct sclp_register, list);
-		receive_mask = t->receive_mask & sclp_receive_mask;
-		send_mask = t->send_mask & sclp_send_mask;
-		if (t->sclp_receive_mask != receive_mask ||
-		    t->sclp_send_mask != send_mask) {
-			t->sclp_receive_mask = receive_mask;
-			t->sclp_send_mask = send_mask;
-			if (t->state_change_fn != NULL)
-				t->state_change_fn(t);
-		}
-	}
-}
 
+/* State change event callback. Inform listeners of changes. */
 static void
-sclp_state_change(struct evbuf_header *evbuf)
+sclp_state_change_cb(struct evbuf_header *evbuf)
 {
 	unsigned long flags;
 	struct sclp_statechangebuf *scbuf;
 
-	spin_lock_irqsave(&sclp_lock, flags);
 	scbuf = (struct sclp_statechangebuf *) evbuf;
-
-	if (scbuf->validity_sclp_receive_mask) {
-		if (scbuf->mask_length != sizeof(sccb_mask_t))
-			printk(KERN_WARNING SCLP_CORE_PRINT_HEADER
-			       "state change event with mask length %i\n",
-			       scbuf->mask_length);
-		else
-			/* set new receive mask */
-			sclp_receive_mask = scbuf->sclp_receive_mask;
-	}
-
-	if (scbuf->validity_sclp_send_mask) {
-		if (scbuf->mask_length != sizeof(sccb_mask_t))
-			printk(KERN_WARNING SCLP_CORE_PRINT_HEADER
-			       "state change event with mask length %i\n",
-			       scbuf->mask_length);
-		else
-			/* set new send mask */
-			sclp_send_mask = scbuf->sclp_send_mask;
-	}
-
-	__sclp_notify_state_change();
+	if (scbuf->mask_length != sizeof(sccb_mask_t))
+		return;
+	spin_lock_irqsave(&sclp_lock, flags);
+	if (scbuf->validity_sclp_receive_mask)
+		sclp_receive_mask = scbuf->sclp_receive_mask;
+	if (scbuf->validity_sclp_send_mask)
+		sclp_send_mask = scbuf->sclp_send_mask;
 	spin_unlock_irqrestore(&sclp_lock, flags);
+	sclp_dispatch_state_change();
 }
 
 static struct sclp_register sclp_state_change_event = {
 	.receive_mask = EvTyp_StateChange_Mask,
-	.receiver_fn = sclp_state_change
+	.receiver_fn = sclp_state_change_cb
 };
 
-
-/*
- * SCLP quiesce event handler
- */
-#ifdef CONFIG_SMP
-static void
-do_load_quiesce_psw(void * __unused)
+/* Calculate receive and send mask of currently registered listeners.
+ * Called while sclp_lock is locked. */
+static inline void
+__sclp_get_mask(sccb_mask_t *receive_mask, sccb_mask_t *send_mask)
 {
-	static atomic_t cpuid = ATOMIC_INIT(-1);
-	psw_t quiesce_psw;
-	__u32 status;
-	int i;
-
-	if (atomic_compare_and_swap(-1, smp_processor_id(), &cpuid))
-		signal_processor(smp_processor_id(), sigp_stop);
-	/* Wait for all other cpus to enter stopped state */
-	i = 1;
-	while (i < NR_CPUS) {
-		if (!cpu_online(i)) {
-			i++;
-			continue;
-		}
-		switch (signal_processor_ps(&status, 0, i, sigp_sense)) {
-		case sigp_order_code_accepted:
-		case sigp_status_stored:
-			/* Check for stopped and check stop state */
-			if (status & 0x50)
-				i++;
-			break;
-		case sigp_busy:
-			break;
-		case sigp_not_operational:
-			i++;
-			break;
-		}
+	struct list_head *l;
+	struct sclp_register *t;
+
+	*receive_mask = 0;
+	*send_mask = 0;
+	list_for_each(l, &sclp_reg_list) {
+		t = list_entry(l, struct sclp_register, list);
+		*receive_mask |= t->receive_mask;
+		*send_mask |= t->send_mask;
 	}
-	/* Quiesce the last cpu with the special psw */
-	quiesce_psw.mask = PSW_BASE_BITS | PSW_MASK_WAIT;
-	quiesce_psw.addr = 0xfff;
-	__load_psw(quiesce_psw);
 }
 
-static void
-do_machine_quiesce(void)
+/* Register event listener. Return 0 on success, non-zero otherwise. */
+int
+sclp_register(struct sclp_register *reg)
 {
-	on_each_cpu(do_load_quiesce_psw, NULL, 0, 0);
+	unsigned long flags;
+	sccb_mask_t receive_mask;
+	sccb_mask_t send_mask;
+	int rc;
+
+	rc = sclp_init();
+	if (rc)
+		return rc;
+	spin_lock_irqsave(&sclp_lock, flags);
+	/* Check event mask for collisions */
+	__sclp_get_mask(&receive_mask, &send_mask);
+	if (reg->receive_mask & receive_mask || reg->send_mask & send_mask) {
+		spin_unlock_irqrestore(&sclp_lock, flags);
+		return -EBUSY;
+	}
+	/* Trigger initial state change callback */
+	reg->sclp_receive_mask = 0;
+	reg->sclp_send_mask = 0;
+	list_add(&reg->list, &sclp_reg_list);
+	spin_unlock_irqrestore(&sclp_lock, flags);
+	rc = sclp_init_mask(1);
+	if (rc) {
+		spin_lock_irqsave(&sclp_lock, flags);
+		list_del(&reg->list);
+		spin_unlock_irqrestore(&sclp_lock, flags);
+	}
+	return rc;
 }
-#else
-static void
-do_machine_quiesce(void)
+
+EXPORT_SYMBOL(sclp_register);
+
+/* Unregister event listener. */
+void
+sclp_unregister(struct sclp_register *reg)
 {
-	psw_t quiesce_psw;
+	unsigned long flags;
 
-	quiesce_psw.mask = PSW_BASE_BITS | PSW_MASK_WAIT;
-	quiesce_psw.addr = 0xfff;
-	__load_psw(quiesce_psw);
+	spin_lock_irqsave(&sclp_lock, flags);
+	list_del(&reg->list);
+	spin_unlock_irqrestore(&sclp_lock, flags);
+	sclp_init_mask(1);
 }
-#endif
 
-extern void ctrl_alt_del(void);
+EXPORT_SYMBOL(sclp_unregister);
 
-static void
-sclp_quiesce(struct evbuf_header *evbuf)
+/* Remove event buffers which are marked processed. Return the number of
+ * remaining event buffers. */
+int
+sclp_remove_processed(struct sccb_header *sccb)
 {
-	/*
-	 * We got a "shutdown" request.
-	 * Add a call to an appropriate "shutdown" routine here. This
-	 * routine should set all PSWs to 'disabled-wait', 'stopped'
-	 * or 'check-stopped' - except 1 PSW which needs to carry a
-	 * special bit pattern called 'quiesce PSW'.
-	 */
-	_machine_restart = (void *) do_machine_quiesce;
-	_machine_halt = do_machine_quiesce;
-	_machine_power_off = do_machine_quiesce;
-	ctrl_alt_del();
-}
-
-static struct sclp_register sclp_quiesce_event = {
-	.receive_mask = EvTyp_SigQuiesce_Mask,
-	.receiver_fn = sclp_quiesce
-};
+	struct evbuf_header *evbuf;
+	int unprocessed;
+	u16 remaining;
+
+	evbuf = (struct evbuf_header *) (sccb + 1);
+	unprocessed = 0;
+	remaining = sccb->length - sizeof(struct sccb_header);
+	while (remaining > 0) {
+		remaining -= evbuf->length;
+		if (evbuf->flags & 0x80) {
+			sccb->length -= evbuf->length;
+			memcpy(evbuf, (void *) ((addr_t) evbuf + evbuf->length),
+			       remaining);
+		} else {
+			unprocessed++;
+			evbuf = (struct evbuf_header *)
+					((addr_t) evbuf + evbuf->length);
+		}
+	}
+	return unprocessed;
+}
+
+EXPORT_SYMBOL(sclp_remove_processed);
 
-/* initialisation of SCLP */
 struct init_sccb {
 	struct sccb_header header;
 	u16 _reserved;
@@ -581,273 +602,314 @@
 	sccb_mask_t sclp_receive_mask;
 } __attribute__((packed));
 
-static void sclp_init_mask_retry(unsigned long);
-
-static int
-sclp_init_mask(void)
+/* Prepare init mask request. Called while sclp_lock is locked. */
+static inline void
+__sclp_make_init_req(u32 receive_mask, u32 send_mask)
 {
-	unsigned long flags;
 	struct init_sccb *sccb;
-	struct sclp_req *req;
-	struct list_head *l;
-	struct sclp_register *t;
-	int rc;
 
 	sccb = (struct init_sccb *) sclp_init_sccb;
-	/* stick the request structure to the end of the init sccb page */
-	req = (struct sclp_req *) ((addr_t) sccb + PAGE_SIZE) - 1;
-
-	/* SCLP setup concerning receiving and sending Event Buffers */
-	req->command = SCLP_CMDW_WRITEMASK;
-	req->status = SCLP_REQ_QUEUED;
-	req->callback = NULL;
-	req->sccb = sccb;
-	/* setup sccb for writemask command */
-	memset(sccb, 0, sizeof(struct init_sccb));
+	clear_page(sccb);
+	memset(&sclp_init_req, 0, sizeof(struct sclp_req));
+	sclp_init_req.command = SCLP_CMDW_WRITEMASK;
+	sclp_init_req.status = SCLP_REQ_FILLED;
+	sclp_init_req.start_count = 0;
+	sclp_init_req.callback = NULL;
+	sclp_init_req.callback_data = NULL;
+	sclp_init_req.sccb = sccb;
 	sccb->header.length = sizeof(struct init_sccb);
 	sccb->mask_length = sizeof(sccb_mask_t);
-	/* copy in the sccb mask of the registered event types */
-	spin_lock_irqsave(&sclp_lock, flags);
-	if (!test_bit(SCLP_SHUTDOWN, &sclp_status)) {
-		list_for_each(l, &sclp_reg_list) {
-			t = list_entry(l, struct sclp_register, list);
-			sccb->receive_mask |= t->receive_mask;
-			sccb->send_mask |= t->send_mask;
-		}
-	}
+	sccb->receive_mask = receive_mask;
+	sccb->send_mask = send_mask;
 	sccb->sclp_receive_mask = 0;
 	sccb->sclp_send_mask = 0;
-	if (test_bit(SCLP_INIT, &sclp_status)) {
-		/* add request to sclp queue */
-		list_add_tail(&req->list, &sclp_req_queue);
-		spin_unlock_irqrestore(&sclp_lock, flags);
-		/* and start if SCLP is idle */
-		sclp_start_request();
-		/* now wait for completion */
-		while (req->status != SCLP_REQ_DONE &&
-		       req->status != SCLP_REQ_FAILED)
+}
+
+/* Start init mask request. If calculate is non-zero, calculate the mask as
+ * requested by registered listeners. Use zero mask otherwise. Return 0 on
+ * success, non-zero otherwise. */
+static int
+sclp_init_mask(int calculate)
+{
+	unsigned long flags;
+	struct init_sccb *sccb = (struct init_sccb *) sclp_init_sccb;
+	sccb_mask_t receive_mask;
+	sccb_mask_t send_mask;
+	int retry;
+	int rc;
+	unsigned long wait;
+
+	spin_lock_irqsave(&sclp_lock, flags);
+	/* Check if interface is in appropriate state */
+	if (sclp_mask_state != sclp_mask_state_idle) {
+		spin_unlock_irqrestore(&sclp_lock, flags);
+		return -EBUSY;
+	}
+	if (sclp_activation_state == sclp_activation_state_inactive) {
+		spin_unlock_irqrestore(&sclp_lock, flags);
+		return -EINVAL;
+	}
+	sclp_mask_state = sclp_mask_state_initializing;
+	/* Determine mask */
+	if (calculate)
+		__sclp_get_mask(&receive_mask, &send_mask);
+	else {
+		receive_mask = 0;
+		send_mask = 0;
+	}
+	rc = -EIO;
+	for (retry = 0; retry <= SCLP_MASK_RETRY; retry++) {
+		/* Prepare request */
+		__sclp_make_init_req(receive_mask, send_mask);
+		spin_unlock_irqrestore(&sclp_lock, flags);
+		if (sclp_add_request(&sclp_init_req)) {
+			/* Try again later */
+			wait = jiffies + SCLP_BUSY_INTERVAL * HZ;
+			while (time_before(jiffies, wait))
+				sclp_sync_wait();
+			spin_lock_irqsave(&sclp_lock, flags);
+			continue;
+		}
+		while (sclp_init_req.status != SCLP_REQ_DONE &&
+		       sclp_init_req.status != SCLP_REQ_FAILED)
 			sclp_sync_wait();
 		spin_lock_irqsave(&sclp_lock, flags);
-	} else {
-		/*
-		 * Special case for the very first write mask command.
-		 * The interrupt handler is not removing request from
-		 * the request queue and doesn't call callbacks yet
-		 * because there might be an pending old interrupt
-		 * after a Re-IPL. We have to receive and ignore it.
-		 */
-		do {
-			rc = __service_call(req->command, req->sccb);
-			if (rc == 0)
-				set_bit(SCLP_RUNNING, &sclp_status);
+		if (sclp_init_req.status == SCLP_REQ_DONE &&
+		    sccb->header.response_code == 0x20) {
+			/* Successful request */
+			if (calculate) {
+				sclp_receive_mask = sccb->sclp_receive_mask;
+				sclp_send_mask = sccb->sclp_send_mask;
+			} else {
+				sclp_receive_mask = 0;
+				sclp_send_mask = 0;
+			}
 			spin_unlock_irqrestore(&sclp_lock, flags);
-			if (rc == -EIO)
-				return -ENOSYS;
-			sclp_sync_wait();
+			sclp_dispatch_state_change();
 			spin_lock_irqsave(&sclp_lock, flags);
-		} while (rc == -EBUSY);
-	}
-	if (sccb->header.response_code != 0x0020) {
-		/* WRITEMASK failed - we cannot rely on receiving a state
-		   change event, so initially, polling is the only alternative
-		   for us to ever become operational. */
-		if (!test_bit(SCLP_SHUTDOWN, &sclp_status) &&
-		    (!timer_pending(&retry_timer) ||
-		     !mod_timer(&retry_timer,
-			       jiffies + SCLP_INIT_POLL_INTERVAL*HZ))) {
-			retry_timer.function = sclp_init_mask_retry;
-			retry_timer.data = 0;
-			retry_timer.expires = jiffies +
-				SCLP_INIT_POLL_INTERVAL*HZ;
-			add_timer(&retry_timer);
+			rc = 0;
+			break;
 		}
-	} else {
-		sclp_receive_mask = sccb->sclp_receive_mask;
-		sclp_send_mask = sccb->sclp_send_mask;
-		__sclp_notify_state_change();
 	}
+	sclp_mask_state = sclp_mask_state_idle;
 	spin_unlock_irqrestore(&sclp_lock, flags);
-	return 0;
-}
-
-static void
-sclp_init_mask_retry(unsigned long data) 
-{
-	sclp_init_mask();
+	return rc;
 }
 
-/* Reboot event handler - reset send and receive mask to prevent pending SCLP
- * events from interfering with rebooted system. */
-static int
-sclp_reboot_event(struct notifier_block *this, unsigned long event, void *ptr)
+/* Deactivate SCLP interface. On success, new requests will be rejected,
+ * events will no longer be dispatched. Return 0 on success, non-zero
+ * otherwise. */
+int
+sclp_deactivate(void)
 {
 	unsigned long flags;
+	int rc;
 
-	/* Note: need spinlock to maintain atomicity when accessing global
-         * variables. */
 	spin_lock_irqsave(&sclp_lock, flags);
-	set_bit(SCLP_SHUTDOWN, &sclp_status);
+	/* Deactivate can only be called when active */
+	if (sclp_activation_state != sclp_activation_state_active) {
+		spin_unlock_irqrestore(&sclp_lock, flags);
+		return -EINVAL;
+	}
+	sclp_activation_state = sclp_activation_state_deactivating;
 	spin_unlock_irqrestore(&sclp_lock, flags);
-	sclp_init_mask();
-	return NOTIFY_DONE;
+	rc = sclp_init_mask(0);
+	spin_lock_irqsave(&sclp_lock, flags);
+	if (rc == 0)
+		sclp_activation_state = sclp_activation_state_inactive;
+	else
+		sclp_activation_state = sclp_activation_state_active;
+	spin_unlock_irqrestore(&sclp_lock, flags);
+	return rc;
 }
 
-static struct notifier_block sclp_reboot_notifier = {
-	.notifier_call = sclp_reboot_event
-};
+EXPORT_SYMBOL(sclp_deactivate);
 
-/*
- * sclp setup function. Called early (no kmalloc!) from sclp_console_init().
- */
-static int
-sclp_init(void)
+/* Reactivate SCLP interface after sclp_deactivate. On success, new
+ * requests will be accepted, events will be dispatched again. Return 0 on
+ * success, non-zero otherwise. */
+int
+sclp_reactivate(void)
 {
+	unsigned long flags;
 	int rc;
 
-	if (test_bit(SCLP_INIT, &sclp_status))
-		/* Already initialized. */
-		return 0;
-
-	spin_lock_init(&sclp_lock);
-	INIT_LIST_HEAD(&sclp_req_queue);
-
-	/* init event list */
-	INIT_LIST_HEAD(&sclp_reg_list);
-	list_add(&sclp_state_change_event.list, &sclp_reg_list);
-	list_add(&sclp_quiesce_event.list, &sclp_reg_list);
-
-	rc = register_reboot_notifier(&sclp_reboot_notifier);
-	if (rc)
-		return rc;
+	spin_lock_irqsave(&sclp_lock, flags);
+	/* Reactivate can only be called when inactive */
+	if (sclp_activation_state != sclp_activation_state_inactive) {
+		spin_unlock_irqrestore(&sclp_lock, flags);
+		return -EINVAL;
+	}
+	sclp_activation_state = sclp_activation_state_activating;
+	spin_unlock_irqrestore(&sclp_lock, flags);
+	rc = sclp_init_mask(1);
+	spin_lock_irqsave(&sclp_lock, flags);
+	if (rc == 0)
+		sclp_activation_state = sclp_activation_state_active;
+	else
+		sclp_activation_state = sclp_activation_state_inactive;
+	spin_unlock_irqrestore(&sclp_lock, flags);
+	return rc;
+}
 
-	/*
-	 * request the 0x2401 external interrupt
-	 * The sclp driver is initialized early (before kmalloc works). We
-	 * need to use register_early_external_interrupt.
-	 */
-	if (register_early_external_interrupt(0x2401, sclp_interrupt_handler,
-					      &ext_int_info_hwc) != 0)
-		return -EBUSY;
+EXPORT_SYMBOL(sclp_reactivate);
 
-	/* enable service-signal external interruptions,
-	 * Control Register 0 bit 22 := 1
-	 * (besides PSW bit 7 must be set to 1 sometimes for external
-	 * interruptions)
-	 */
-	ctl_set_bit(0, 9);
+/* Handler for external interruption used during initialization. Modify
+ * request state to done. */
+static void
+sclp_check_handler(struct pt_regs *regs, __u16 code)
+{
+	u32 finished_sccb;
 
-	init_timer(&retry_timer);
-	init_timer(&sclp_busy_timer);
-	/* do the initial write event mask */
-	rc = sclp_init_mask();
-	if (rc == 0) {
-		/* Ok, now everything is setup right. */
-		set_bit(SCLP_INIT, &sclp_status);
-		return 0;
+	finished_sccb = S390_lowcore.ext_params & 0xfffffff8;
+	/* Is this the interrupt we are waiting for? */
+	if (finished_sccb == 0)
+		return;
+	if (finished_sccb != (u32) (addr_t) sclp_init_sccb) {
+		printk(KERN_WARNING SCLP_HEADER "unsolicited interrupt "
+		       "for buffer at 0x%x\n", finished_sccb);
+		return;
 	}
-
-	/* The sclp_init_mask failed. SCLP is broken, unregister and exit. */
-	ctl_clear_bit(0,9);
-	unregister_early_external_interrupt(0x2401, sclp_interrupt_handler,
-					    &ext_int_info_hwc);
-
-	return rc;
+	spin_lock(&sclp_lock);
+	if (sclp_running_state == sclp_running_state_running) {
+		sclp_init_req.status = SCLP_REQ_DONE;
+		sclp_running_state = sclp_running_state_idle;
+	}
+	spin_unlock(&sclp_lock);
 }
 
-/*
- * Register the SCLP event listener identified by REG. Return 0 on success.
- * Some error codes and their meaning:
- *
- *  -ENODEV = SCLP interface is not supported on this machine
- *   -EBUSY = there is already a listener registered for the requested
- *            event type
- *     -EIO = SCLP interface is currently not operational
- */
-int
-sclp_register(struct sclp_register *reg)
+/* Initial init mask request timed out. Modify request state to failed. */
+static void
+sclp_check_timeout(unsigned long data)
 {
 	unsigned long flags;
-	struct list_head *l;
-	struct sclp_register *t;
-
-	if (!MACHINE_HAS_SCLP)
-		return -ENODEV;
 
-	if (!test_bit(SCLP_INIT, &sclp_status))
-		sclp_init();
 	spin_lock_irqsave(&sclp_lock, flags);
-	/* check already registered event masks for collisions */
-	list_for_each(l, &sclp_reg_list) {
-		t = list_entry(l, struct sclp_register, list);
-		if (t->receive_mask & reg->receive_mask ||
-		    t->send_mask & reg->send_mask) {
-			spin_unlock_irqrestore(&sclp_lock, flags);
-			return -EBUSY;
-		}
+	if (sclp_running_state == sclp_running_state_running) {
+		sclp_init_req.status = SCLP_REQ_FAILED;
+		sclp_running_state = sclp_running_state_idle;
 	}
-	/*
-	 * set present mask to 0 to trigger state change
-	 * callback in sclp_init_mask
-	 */
-	reg->sclp_receive_mask = 0;
-	reg->sclp_send_mask = 0;
-	list_add(&reg->list, &sclp_reg_list);
 	spin_unlock_irqrestore(&sclp_lock, flags);
-	sclp_init_mask();
-	return 0;
 }
 
-/*
- * Unregister the SCLP event listener identified by REG.
- */
-void
-sclp_unregister(struct sclp_register *reg)
+/* Perform a check of the SCLP interface. Return zero if the interface is
+ * available and there are no pending requests from a previous instance.
+ * Return non-zero otherwise. */
+static int
+sclp_check_interface(void)
 {
+	struct init_sccb *sccb;
 	unsigned long flags;
+	int retry;
+	int rc;
 
 	spin_lock_irqsave(&sclp_lock, flags);
-	list_del(&reg->list);
+	/* Prepare init mask command */
+	rc = register_early_external_interrupt(0x2401, sclp_check_handler,
+					       &ext_int_info_hwc);
+	if (rc) {
+		spin_unlock_irqrestore(&sclp_lock, flags);
+		return rc;
+	}
+	for (retry = 0; retry <= SCLP_INIT_RETRY; retry++) {
+		__sclp_make_init_req(0, 0);
+		sccb = (struct init_sccb *) sclp_init_req.sccb;
+		rc = service_call(sclp_init_req.command, sccb);
+		if (rc == -EIO)
+			break;
+		sclp_init_req.status = SCLP_REQ_RUNNING;
+		sclp_running_state = sclp_running_state_running;
+		__sclp_set_request_timer(SCLP_RETRY_INTERVAL * HZ,
+					 sclp_check_timeout, 0);
+		spin_unlock_irqrestore(&sclp_lock, flags);
+		/* Enable service-signal interruption - needs to happen
+		 * with IRQs enabled. */
+		ctl_set_bit(0, 9);
+		/* Wait for signal from interrupt or timeout */
+		sclp_sync_wait();
+		/* Disable service-signal interruption - needs to happen
+		 * with IRQs enabled. */
+		ctl_clear_bit(0,9);
+		spin_lock_irqsave(&sclp_lock, flags);
+		del_timer(&sclp_request_timer);
+		if (sclp_init_req.status == SCLP_REQ_DONE &&
+		    sccb->header.response_code == 0x20) {
+			rc = 0;
+			break;
+		} else
+			rc = -EBUSY;
+	}
+	unregister_early_external_interrupt(0x2401, sclp_check_handler,
+					    &ext_int_info_hwc);
 	spin_unlock_irqrestore(&sclp_lock, flags);
-	sclp_init_mask();
+	return rc;
+}
+
+/* Reboot event handler. Reset send and receive mask to prevent pending SCLP
+ * events from interfering with rebooted system. */
+static int
+sclp_reboot_event(struct notifier_block *this, unsigned long event, void *ptr)
+{
+	sclp_deactivate();
+	return NOTIFY_DONE;
 }
 
-#define	SCLP_EVBUF_PROCESSED	0x80
+static struct notifier_block sclp_reboot_notifier = {
+	.notifier_call = sclp_reboot_event
+};
 
-/*
- * Traverse array of event buffers contained in SCCB and remove all buffers
- * with a set "processed" flag. Return the number of unprocessed buffers.
- */
-int
-sclp_remove_processed(struct sccb_header *sccb)
+/* Initialize SCLP driver. Return zero if driver is operational, non-zero
+ * otherwise. */
+static int
+sclp_init(void)
 {
-	struct evbuf_header *evbuf;
-	int unprocessed;
-	u16 remaining;
+	unsigned long flags;
+	int rc;
 
-	evbuf = (struct evbuf_header *) (sccb + 1);
-	unprocessed = 0;
-	remaining = sccb->length - sizeof(struct sccb_header);
-	while (remaining > 0) {
-		remaining -= evbuf->length;
-		if (evbuf->flags & SCLP_EVBUF_PROCESSED) {
-			sccb->length -= evbuf->length;
-			memcpy((void *) evbuf,
-			       (void *) ((addr_t) evbuf + evbuf->length),
-			       remaining);
-		} else {
-			unprocessed++;
-			evbuf = (struct evbuf_header *)
-					((addr_t) evbuf + evbuf->length);
-		}
+	if (!MACHINE_HAS_SCLP)
+		return -ENODEV;
+	spin_lock_irqsave(&sclp_lock, flags);
+	/* Check for previous or running initialization */
+	if (sclp_init_state != sclp_init_state_uninitialized) {
+		spin_unlock_irqrestore(&sclp_lock, flags);
+		return 0;
 	}
-
-	return unprocessed;
+	sclp_init_state = sclp_init_state_initializing;
+	/* Set up variables */
+	INIT_LIST_HEAD(&sclp_req_queue);
+	INIT_LIST_HEAD(&sclp_reg_list);
+	list_add(&sclp_state_change_event.list, &sclp_reg_list);
+	init_timer(&sclp_request_timer);
+	/* Check interface */
+	spin_unlock_irqrestore(&sclp_lock, flags);
+	rc = sclp_check_interface();
+	spin_lock_irqsave(&sclp_lock, flags);
+	if (rc) {
+		sclp_init_state = sclp_init_state_uninitialized;
+		spin_unlock_irqrestore(&sclp_lock, flags);
+		return rc;
+	}
+	/* Register reboot handler */
+	rc = register_reboot_notifier(&sclp_reboot_notifier);
+	if (rc) {
+		sclp_init_state = sclp_init_state_uninitialized;
+		spin_unlock_irqrestore(&sclp_lock, flags);
+		return rc;
+	}
+	/* Register interrupt handler */
+	rc = register_early_external_interrupt(0x2401, sclp_interrupt_handler,
+					       &ext_int_info_hwc);
+	if (rc) {
+		unregister_reboot_notifier(&sclp_reboot_notifier);
+		sclp_init_state = sclp_init_state_uninitialized;
+		spin_unlock_irqrestore(&sclp_lock, flags);
+		return rc;
+	}
+	sclp_init_state = sclp_init_state_initialized;
+	spin_unlock_irqrestore(&sclp_lock, flags);
+	/* Enable service-signal external interruption - needs to happen with
+	 * IRQs enabled. */
+	ctl_set_bit(0, 9);
+	sclp_init_mask(1);
+	return 0;
 }
-
-module_init(sclp_init);
-
-EXPORT_SYMBOL(sclp_add_request);
-EXPORT_SYMBOL(sclp_sync_wait);
-EXPORT_SYMBOL(sclp_register);
-EXPORT_SYMBOL(sclp_unregister);
-EXPORT_SYMBOL(sclp_error_message);
diff -Nru a/drivers/s390/char/sclp.h b/drivers/s390/char/sclp.h
--- a/drivers/s390/char/sclp.h	2005-01-10 20:11:16 -08:00
+++ b/drivers/s390/char/sclp.h	2005-01-10 20:11:16 -08:00
@@ -95,6 +95,7 @@
 	sclp_cmdw_t command;		/* sclp command to execute */
 	void	*sccb;			/* pointer to the sccb to execute */
 	char	status;			/* status of this request */
+	int     start_count;		/* number of SVCs done for this req */
 	/* Callback that is called after reaching final status. */
 	void (*callback)(struct sclp_req *, void *data);
 	void *callback_data;
@@ -123,12 +124,13 @@
 };
 
 /* externals from sclp.c */
-void sclp_add_request(struct sclp_req *req);
+int sclp_add_request(struct sclp_req *req);
 void sclp_sync_wait(void);
 int sclp_register(struct sclp_register *reg);
 void sclp_unregister(struct sclp_register *reg);
-char *sclp_error_message(u16 response_code);
 int sclp_remove_processed(struct sccb_header *sccb);
+int sclp_deactivate(void);
+int sclp_reactivate(void);
 
 /* useful inlines */
 
diff -Nru a/drivers/s390/char/sclp_con.c b/drivers/s390/char/sclp_con.c
--- a/drivers/s390/char/sclp_con.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/s390/char/sclp_con.c	2005-01-10 20:11:19 -08:00
@@ -49,25 +49,22 @@
 sclp_conbuf_callback(struct sclp_buffer *buffer, int rc)
 {
 	unsigned long flags;
-	struct sclp_buffer *next;
 	void *page;
 
-	/* Ignore return code - because console-writes aren't critical,
-	   we do without a sophisticated error recovery mechanism.  */
-	page = sclp_unmake_buffer(buffer);
-	spin_lock_irqsave(&sclp_con_lock, flags);
-	/* Remove buffer from outqueue */
-	list_del(&buffer->list);
-	sclp_con_buffer_count--;
-	list_add_tail((struct list_head *) page, &sclp_con_pages);
-	/* Check if there is a pending buffer on the out queue. */
-	next = NULL;
-	if (!list_empty(&sclp_con_outqueue))
-		next = list_entry(sclp_con_outqueue.next,
-				  struct sclp_buffer, list);
-	spin_unlock_irqrestore(&sclp_con_lock, flags);
-	if (next != NULL)
-		sclp_emit_buffer(next, sclp_conbuf_callback);
+	do {
+		page = sclp_unmake_buffer(buffer);
+		spin_lock_irqsave(&sclp_con_lock, flags);
+		/* Remove buffer from outqueue */
+		list_del(&buffer->list);
+		sclp_con_buffer_count--;
+		list_add_tail((struct list_head *) page, &sclp_con_pages);
+		/* Check if there is a pending buffer on the out queue. */
+		buffer = NULL;
+		if (!list_empty(&sclp_con_outqueue))
+			buffer = list_entry(sclp_con_outqueue.next,
+					    struct sclp_buffer, list);
+		spin_unlock_irqrestore(&sclp_con_lock, flags);
+	} while (buffer && sclp_emit_buffer(buffer, sclp_conbuf_callback));
 }
 
 static inline void
@@ -76,6 +73,7 @@
 	struct sclp_buffer* buffer;
 	unsigned long flags;
 	int count;
+	int rc;
 
 	spin_lock_irqsave(&sclp_con_lock, flags);
 	buffer = sclp_conbuf;
@@ -87,8 +85,11 @@
 	list_add_tail(&buffer->list, &sclp_con_outqueue);
 	count = sclp_con_buffer_count++;
 	spin_unlock_irqrestore(&sclp_con_lock, flags);
-	if (count == 0)
-		sclp_emit_buffer(buffer, sclp_conbuf_callback);
+	if (count)
+		return;
+	rc = sclp_emit_buffer(buffer, sclp_conbuf_callback);
+	if (rc)
+		sclp_conbuf_callback(buffer, rc);
 }
 
 /*
diff -Nru a/drivers/s390/char/sclp_cpi.c b/drivers/s390/char/sclp_cpi.c
--- a/drivers/s390/char/sclp_cpi.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/s390/char/sclp_cpi.c	2005-01-10 20:11:19 -08:00
@@ -196,18 +196,20 @@
 	rc = sclp_register(&sclp_cpi_event);
 	if (rc) {
 		/* could not register sclp event. Die. */
-		printk("cpi: could not register to hardware console.\n");
+		printk(KERN_WARNING "cpi: could not register to hardware "
+		       "console.\n");
 		return -EINVAL;
 	}
 	if (!(sclp_cpi_event.sclp_send_mask & EvTyp_CtlProgIdent_Mask)) {
-		printk("cpi: no control program identification support\n");
+		printk(KERN_WARNING "cpi: no control program identification "
+		       "support\n");
 		sclp_unregister(&sclp_cpi_event);
 		return -ENOTSUPP;
 	}
 
 	req = cpi_prepare_req();
 	if (IS_ERR(req)) {
-		printk("cpi: couldn't allocate request\n");
+		printk(KERN_WARNING "cpi: couldn't allocate request\n");
 		sclp_unregister(&sclp_cpi_event);
 		return PTR_ERR(req);
 	}
@@ -216,13 +218,20 @@
 	sema_init(&sem, 0);
 	req->callback_data = &sem;
 	/* Add request to sclp queue */
-	sclp_add_request(req);
+	rc = sclp_add_request(req);
+	if (rc) {
+		printk(KERN_WARNING "cpi: could not start request\n");
+		cpi_free_req(req);
+		sclp_unregister(&sclp_cpi_event);
+		return rc;
+	}
 	/* make "insmod" sleep until callback arrives */
 	down(&sem);
 
 	rc = ((struct cpi_sccb *) req->sccb)->header.response_code;
 	if (rc != 0x0020) {
-		printk("cpi: failed with response code 0x%x\n", rc);
+		printk(KERN_WARNING "cpi: failed with response code 0x%x\n",
+		       rc);
 		rc = -ECOMM;
 	} else
 		rc = 0;
diff -Nru a/drivers/s390/char/sclp_quiesce.c b/drivers/s390/char/sclp_quiesce.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/s390/char/sclp_quiesce.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,114 @@
+/*
+ *  drivers/s390/char/sclp_quiesce.c
+ *     signal quiesce handler
+ *
+ *  (C) Copyright IBM Corp. 1999,2004
+ *  Author(s): Martin Schwidefsky <schwidefsky@de.ibm.com>
+ *             Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
+ */
+
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/types.h>
+#include <linux/cpumask.h>
+#include <linux/smp.h>
+#include <linux/init.h>
+#include <asm/atomic.h>
+#include <asm/ptrace.h>
+#include <asm/sigp.h>
+
+#include "sclp.h"
+
+
+#ifdef CONFIG_SMP
+/* Signal completion of shutdown process. All CPUs except the first to enter
+ * this function: go to stopped state. First CPU: wait until all other
+ * CPUs are in stopped or check stop state. Afterwards, load special PSW
+ * to indicate completion. */
+static void
+do_load_quiesce_psw(void * __unused)
+{
+	static atomic_t cpuid = ATOMIC_INIT(-1);
+	psw_t quiesce_psw;
+	__u32 status;
+	int i;
+
+	if (atomic_compare_and_swap(-1, smp_processor_id(), &cpuid))
+		signal_processor(smp_processor_id(), sigp_stop);
+	/* Wait for all other cpus to enter stopped state */
+	i = 1;
+	while (i < NR_CPUS) {
+		if (!cpu_online(i)) {
+			i++;
+			continue;
+		}
+		switch (signal_processor_ps(&status, 0, i, sigp_sense)) {
+		case sigp_order_code_accepted:
+		case sigp_status_stored:
+			/* Check for stopped and check stop state */
+			if (status & 0x50)
+				i++;
+			break;
+		case sigp_busy:
+			break;
+		case sigp_not_operational:
+			i++;
+			break;
+		}
+	}
+	/* Quiesce the last cpu with the special psw */
+	quiesce_psw.mask = PSW_BASE_BITS | PSW_MASK_WAIT;
+	quiesce_psw.addr = 0xfff;
+	__load_psw(quiesce_psw);
+}
+
+/* Shutdown handler. Perform shutdown function on all CPUs. */
+static void
+do_machine_quiesce(void)
+{
+	on_each_cpu(do_load_quiesce_psw, NULL, 0, 0);
+}
+#else
+/* Shutdown handler. Signal completion of shutdown by loading special PSW. */
+static void
+do_machine_quiesce(void)
+{
+	psw_t quiesce_psw;
+
+	quiesce_psw.mask = PSW_BASE_BITS | PSW_MASK_WAIT;
+	quiesce_psw.addr = 0xfff;
+	__load_psw(quiesce_psw);
+}
+#endif
+
+extern void ctrl_alt_del(void);
+
+/* Handler for quiesce event. Start shutdown procedure. */
+static void
+sclp_quiesce_handler(struct evbuf_header *evbuf)
+{
+	_machine_restart = (void *) do_machine_quiesce;
+	_machine_halt = do_machine_quiesce;
+	_machine_power_off = do_machine_quiesce;
+	ctrl_alt_del();
+}
+
+static struct sclp_register sclp_quiesce_event = {
+	.receive_mask = EvTyp_SigQuiesce_Mask,
+	.receiver_fn = sclp_quiesce_handler
+};
+
+/* Initialize quiesce driver. */
+static int __init
+sclp_quiesce_init(void)
+{
+	int rc;
+
+	rc = sclp_register(&sclp_quiesce_event);
+	if (rc)
+		printk(KERN_WARNING "sclp: could not register quiesce handler "
+		       "(rc=%d)\n", rc);
+	return rc;
+}
+
+module_init(sclp_quiesce_init);
diff -Nru a/drivers/s390/char/sclp_rw.c b/drivers/s390/char/sclp_rw.c
--- a/drivers/s390/char/sclp_rw.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/s390/char/sclp_rw.c	2005-01-10 20:11:18 -08:00
@@ -54,7 +54,6 @@
 	buffer = ((struct sclp_buffer *) ((addr_t) sccb + PAGE_SIZE)) - 1;
 	buffer->sccb = sccb;
 	buffer->retry_count = 0;
-	init_timer(&buffer->retry_timer);
 	buffer->mto_number = 0;
 	buffer->mto_char_sum = 0;
 	buffer->current_line = NULL;
@@ -365,17 +364,7 @@
 	return rc;
 }
 
-static void
-sclp_buffer_retry(unsigned long data)
-{
-	struct sclp_buffer *buffer = (struct sclp_buffer *) data;
-	buffer->request.status = SCLP_REQ_FILLED;
-	buffer->sccb->header.response_code = 0x0000;
-	sclp_add_request(&buffer->request);
-}
-
-#define SCLP_BUFFER_MAX_RETRY		5
-#define	SCLP_BUFFER_RETRY_INTERVAL	2
+#define SCLP_BUFFER_MAX_RETRY		1
 
 /*
  * second half of Write Event Data-function that has to be done after
@@ -404,7 +393,7 @@
 		break;
 
 	case 0x0340: /* Contained SCLP equipment check */
-		if (buffer->retry_count++ > SCLP_BUFFER_MAX_RETRY) {
+		if (++buffer->retry_count > SCLP_BUFFER_MAX_RETRY) {
 			rc = -EIO;
 			break;
 		}
@@ -413,26 +402,26 @@
 			/* not all buffers were processed */
 			sccb->header.response_code = 0x0000;
 			buffer->request.status = SCLP_REQ_FILLED;
-			sclp_add_request(request);
-			return;
-		}
-		rc = 0;
+			rc = sclp_add_request(request);
+			if (rc == 0)
+				return;
+		} else
+			rc = 0;
 		break;
 
 	case 0x0040: /* SCLP equipment check */
 	case 0x05f0: /* Target resource in improper state */
-		if (buffer->retry_count++ > SCLP_BUFFER_MAX_RETRY) {
+		if (++buffer->retry_count > SCLP_BUFFER_MAX_RETRY) {
 			rc = -EIO;
 			break;
 		}
-		/* wait some time, then retry request */
-		buffer->retry_timer.function = sclp_buffer_retry;
-		buffer->retry_timer.data = (unsigned long) buffer;
-		buffer->retry_timer.expires = jiffies +
-						SCLP_BUFFER_RETRY_INTERVAL*HZ;
-		add_timer(&buffer->retry_timer);
-		return;
-
+		/* retry request */
+		sccb->header.response_code = 0x0000;
+		buffer->request.status = SCLP_REQ_FILLED;
+		rc = sclp_add_request(request);
+		if (rc == 0)
+			return;
+		break;
 	default:
 		if (sccb->header.response_code == 0x71f0)
 			rc = -ENOMEM;
@@ -446,9 +435,10 @@
 
 /*
  * Setup the request structure in the struct sclp_buffer to do SCLP Write
- * Event Data and pass the request to the core SCLP loop.
+ * Event Data and pass the request to the core SCLP loop. Return zero on
+ * success, non-zero otherwise.
  */
-void
+int
 sclp_emit_buffer(struct sclp_buffer *buffer,
 		 void (*callback)(struct sclp_buffer *, int))
 {
@@ -459,11 +449,8 @@
 		sclp_finalize_mto(buffer);
 
 	/* Are there messages in the output buffer ? */
-	if (buffer->mto_number == 0) {
-		if (callback != NULL)
-			callback(buffer, 0);
-		return;
-	}
+	if (buffer->mto_number == 0)
+		return -EIO;
 
 	sccb = buffer->sccb;
 	if (sclp_rw_event.sclp_send_mask & EvTyp_Msg_Mask)
@@ -472,16 +459,13 @@
 	else if (sclp_rw_event.sclp_send_mask & EvTyp_PMsgCmd_Mask)
 		/* Use write priority message */
 		sccb->msg_buf.header.type = EvTyp_PMsgCmd;
-	else {
-		if (callback != NULL)
-			callback(buffer, -ENOSYS);
-		return;
-	}
+	else
+		return -ENOSYS;
 	buffer->request.command = SCLP_CMDW_WRITEDATA;
 	buffer->request.status = SCLP_REQ_FILLED;
 	buffer->request.callback = sclp_writedata_callback;
 	buffer->request.callback_data = buffer;
 	buffer->request.sccb = sccb;
 	buffer->callback = callback;
-	sclp_add_request(&buffer->request);
+	return sclp_add_request(&buffer->request);
 }
diff -Nru a/drivers/s390/char/sclp_rw.h b/drivers/s390/char/sclp_rw.h
--- a/drivers/s390/char/sclp_rw.h	2005-01-10 20:11:24 -08:00
+++ b/drivers/s390/char/sclp_rw.h	2005-01-10 20:11:24 -08:00
@@ -12,7 +12,6 @@
 #define __SCLP_RW_H__
 
 #include <linux/list.h>
-#include <linux/timer.h>
 
 struct mto {
 	u16 length;
@@ -74,7 +73,6 @@
 	char *current_line;
 	int current_length;
 	int retry_count;
-	struct timer_list retry_timer;
 	/* output format settings */
 	unsigned short columns;
 	unsigned short htab;
@@ -90,7 +88,7 @@
 void *sclp_unmake_buffer(struct sclp_buffer *);
 int sclp_buffer_space(struct sclp_buffer *);
 int sclp_write(struct sclp_buffer *buffer, const unsigned char *, int);
-void sclp_emit_buffer(struct sclp_buffer *,void (*)(struct sclp_buffer *,int));
+int sclp_emit_buffer(struct sclp_buffer *,void (*)(struct sclp_buffer *,int));
 void sclp_set_columns(struct sclp_buffer *, unsigned short);
 void sclp_set_htab(struct sclp_buffer *, unsigned short);
 int sclp_chars_in_buffer(struct sclp_buffer *);
diff -Nru a/drivers/s390/char/sclp_tty.c b/drivers/s390/char/sclp_tty.c
--- a/drivers/s390/char/sclp_tty.c	2005-01-10 20:11:24 -08:00
+++ b/drivers/s390/char/sclp_tty.c	2005-01-10 20:11:24 -08:00
@@ -255,25 +255,22 @@
 sclp_ttybuf_callback(struct sclp_buffer *buffer, int rc)
 {
 	unsigned long flags;
-	struct sclp_buffer *next;
 	void *page;
 
-	/* Ignore return code - because tty-writes aren't critical,
-	   we do without a sophisticated error recovery mechanism.  */
-	page = sclp_unmake_buffer(buffer);
-	spin_lock_irqsave(&sclp_tty_lock, flags);
-	/* Remove buffer from outqueue */
-	list_del(&buffer->list);
-	sclp_tty_buffer_count--;
-	list_add_tail((struct list_head *) page, &sclp_tty_pages);
-	/* Check if there is a pending buffer on the out queue. */
-	next = NULL;
-	if (!list_empty(&sclp_tty_outqueue))
-		next = list_entry(sclp_tty_outqueue.next,
-				  struct sclp_buffer, list);
-	spin_unlock_irqrestore(&sclp_tty_lock, flags);
-	if (next != NULL)
-		sclp_emit_buffer(next, sclp_ttybuf_callback);
+	do {
+		page = sclp_unmake_buffer(buffer);
+		spin_lock_irqsave(&sclp_tty_lock, flags);
+		/* Remove buffer from outqueue */
+		list_del(&buffer->list);
+		sclp_tty_buffer_count--;
+		list_add_tail((struct list_head *) page, &sclp_tty_pages);
+		/* Check if there is a pending buffer on the out queue. */
+		buffer = NULL;
+		if (!list_empty(&sclp_tty_outqueue))
+			buffer = list_entry(sclp_tty_outqueue.next,
+					    struct sclp_buffer, list);
+		spin_unlock_irqrestore(&sclp_tty_lock, flags);
+	} while (buffer && sclp_emit_buffer(buffer, sclp_ttybuf_callback));
 	wake_up(&sclp_tty_waitq);
 	/* check if the tty needs a wake up call */
 	if (sclp_tty != NULL) {
@@ -286,14 +283,17 @@
 {
 	unsigned long flags;
 	int count;
+	int rc;
 
 	spin_lock_irqsave(&sclp_tty_lock, flags);
 	list_add_tail(&buffer->list, &sclp_tty_outqueue);
 	count = sclp_tty_buffer_count++;
 	spin_unlock_irqrestore(&sclp_tty_lock, flags);
-
-	if (count == 0)
-		sclp_emit_buffer(buffer, sclp_ttybuf_callback);
+	if (count)
+		return;
+	rc = sclp_emit_buffer(buffer, sclp_ttybuf_callback);
+	if (rc)
+		sclp_ttybuf_callback(buffer, rc);
 }
 
 /*
diff -Nru a/drivers/s390/char/sclp_vt220.c b/drivers/s390/char/sclp_vt220.c
--- a/drivers/s390/char/sclp_vt220.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/s390/char/sclp_vt220.c	2005-01-10 20:11:17 -08:00
@@ -42,7 +42,6 @@
 	struct list_head list;
 	struct sclp_req sclp_req;
 	int retry_count;
-	struct timer_list retry_timer;
 };
 
 /* VT220 SCCB */
@@ -96,7 +95,7 @@
 static int sclp_vt220_flush_later;
 
 static void sclp_vt220_receiver_fn(struct evbuf_header *evbuf);
-static void __sclp_vt220_emit(struct sclp_vt220_request *request);
+static int __sclp_vt220_emit(struct sclp_vt220_request *request);
 static void sclp_vt220_emit_current(void);
 
 /* Registration structure for our interest in SCLP event buffers */
@@ -116,25 +115,24 @@
 sclp_vt220_process_queue(struct sclp_vt220_request *request)
 {
 	unsigned long flags;
-	struct sclp_vt220_request *next;
 	void *page;
 
-	/* Put buffer back to list of empty buffers */
-	page = request->sclp_req.sccb;
-	spin_lock_irqsave(&sclp_vt220_lock, flags);
-	/* Move request from outqueue to empty queue */
-	list_del(&request->list);
-	sclp_vt220_outqueue_count--;
-	list_add_tail((struct list_head *) page, &sclp_vt220_empty);
-	/* Check if there is a pending buffer on the out queue. */
-	next = NULL;
-	if (!list_empty(&sclp_vt220_outqueue))
-		next = list_entry(sclp_vt220_outqueue.next,
-				  struct sclp_vt220_request, list);
-	spin_unlock_irqrestore(&sclp_vt220_lock, flags);
-	if (next != NULL)
-		__sclp_vt220_emit(next);
-	else if (sclp_vt220_flush_later)
+	do {
+		/* Put buffer back to list of empty buffers */
+		page = request->sclp_req.sccb;
+		spin_lock_irqsave(&sclp_vt220_lock, flags);
+		/* Move request from outqueue to empty queue */
+		list_del(&request->list);
+		sclp_vt220_outqueue_count--;
+		list_add_tail((struct list_head *) page, &sclp_vt220_empty);
+		/* Check if there is a pending buffer on the out queue. */
+		request = NULL;
+		if (!list_empty(&sclp_vt220_outqueue))
+			request = list_entry(sclp_vt220_outqueue.next,
+					     struct sclp_vt220_request, list);
+		spin_unlock_irqrestore(&sclp_vt220_lock, flags);
+	} while (request && __sclp_vt220_emit(request));
+	if (request == NULL && sclp_vt220_flush_later)
 		sclp_vt220_emit_current();
 	wake_up(&sclp_vt220_waitq);
 	/* Check if the tty needs a wake up call */
@@ -143,25 +141,7 @@
 	}
 }
 
-/*
- * Retry sclp write request after waiting some time for an sclp equipment
- * check to pass.
- */
-static void
-sclp_vt220_retry(unsigned long data)
-{
-	struct sclp_vt220_request *request;
-	struct sclp_vt220_sccb *sccb;
-
-	request = (struct sclp_vt220_request *) data;
-	request->sclp_req.status = SCLP_REQ_FILLED;
-	sccb = (struct sclp_vt220_sccb *) request->sclp_req.sccb;
-	sccb->header.response_code = 0x0000;
-	sclp_add_request(&request->sclp_req);
-}
-
-#define SCLP_BUFFER_MAX_RETRY		5
-#define	SCLP_BUFFER_RETRY_INTERVAL	2
+#define SCLP_BUFFER_MAX_RETRY		1
 
 /*
  * Callback through which the result of a write request is reported by the
@@ -189,29 +169,26 @@
 		break;
 
 	case 0x0340: /* Contained SCLP equipment check */
-		if (vt220_request->retry_count++ > SCLP_BUFFER_MAX_RETRY)
+		if (++vt220_request->retry_count > SCLP_BUFFER_MAX_RETRY)
 			break;
 		/* Remove processed buffers and requeue rest */
 		if (sclp_remove_processed((struct sccb_header *) sccb) > 0) {
 			/* Not all buffers were processed */
 			sccb->header.response_code = 0x0000;
 			vt220_request->sclp_req.status = SCLP_REQ_FILLED;
-			sclp_add_request(request);
-			return;
+			if (sclp_add_request(request) == 0)
+				return;
 		}
 		break;
 
 	case 0x0040: /* SCLP equipment check */
-		if (vt220_request->retry_count++ > SCLP_BUFFER_MAX_RETRY)
+		if (++vt220_request->retry_count > SCLP_BUFFER_MAX_RETRY)
 			break;
-		/* Wait some time, then retry request */
-		vt220_request->retry_timer.function = sclp_vt220_retry;
-		vt220_request->retry_timer.data =
-			(unsigned long) vt220_request;
-		vt220_request->retry_timer.expires =
-			jiffies + SCLP_BUFFER_RETRY_INTERVAL*HZ;
-		add_timer(&vt220_request->retry_timer);
-		return;
+		sccb->header.response_code = 0x0000;
+		vt220_request->sclp_req.status = SCLP_REQ_FILLED;
+		if (sclp_add_request(request) == 0)
+			return;
+		break;
 
 	default:
 		break;
@@ -220,22 +197,22 @@
 }
 
 /*
- * Emit vt220 request buffer to SCLP.
+ * Emit vt220 request buffer to SCLP. Return zero on success, non-zero
+ * otherwise.
  */
-static void
+static int
 __sclp_vt220_emit(struct sclp_vt220_request *request)
 {
 	if (!(sclp_vt220_register.sclp_send_mask & EvTyp_VT220Msg_Mask)) {
 		request->sclp_req.status = SCLP_REQ_FAILED;
-		sclp_vt220_callback(&request->sclp_req, (void *) request);
-		return;
+		return -EIO;
 	}
 	request->sclp_req.command = SCLP_CMDW_WRITEDATA;
 	request->sclp_req.status = SCLP_REQ_FILLED;
 	request->sclp_req.callback = sclp_vt220_callback;
 	request->sclp_req.callback_data = (void *) request;
 
-	sclp_add_request(&request->sclp_req);
+	return sclp_add_request(&request->sclp_req);
 }
 
 /*
@@ -253,12 +230,12 @@
 	spin_unlock_irqrestore(&sclp_vt220_lock, flags);
 	/* Emit only the first buffer immediately - callback takes care of
 	 * the rest */
-	if (count == 0)
-		__sclp_vt220_emit(request);
+	if (count == 0 && __sclp_vt220_emit(request))
+		sclp_vt220_process_queue(request);
 }
 
 /*
- * Queue and emit current request.
+ * Queue and emit current request. Return zero on success, non-zero otherwise.
  */
 static void
 sclp_vt220_emit_current(void)
@@ -300,7 +277,6 @@
 	/* Place request structure at end of page */
 	request = ((struct sclp_vt220_request *)
 			((addr_t) page + PAGE_SIZE)) - 1;
-	init_timer(&request->retry_timer);
 	request->retry_count = 0;
 	request->sclp_req.sccb = page;
 	/* SCCB goes at start of page */
diff -Nru a/drivers/s390/char/tape_core.c b/drivers/s390/char/tape_core.c
--- a/drivers/s390/char/tape_core.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/s390/char/tape_core.c	2005-01-10 20:11:17 -08:00
@@ -349,6 +349,11 @@
 
 	/* Let the discipline have a go at the device. */
 	device->discipline = discipline;
+	if (!try_module_get(discipline->owner)) {
+		PRINT_ERR("Cannot get module. Module gone.\n");
+		return -EINVAL;
+	}
+
 	rc = discipline->setup_device(device);
 	if (rc)
 		goto out;
@@ -377,6 +382,7 @@
 out_minor:
 	tape_remove_minor(device);
 out:
+	module_put(discipline->owner);
 	return rc;
 }
 
@@ -386,6 +392,7 @@
 	tapeblock_cleanup_device(device);
 	tapechar_cleanup_device(device);
 	device->discipline->cleanup_device(device);
+	module_put(device->discipline->owner);
 	tape_remove_minor(device);
 	tape_med_state_set(device, MS_UNKNOWN);
 }
@@ -1184,7 +1191,7 @@
 #ifdef DBF_LIKE_HELL
 	debug_set_level(TAPE_DBF_AREA, 6);
 #endif
-	DBF_EVENT(3, "tape init: ($Revision: 1.50 $)\n");
+	DBF_EVENT(3, "tape init: ($Revision: 1.51 $)\n");
 	tape_proc_init();
 	tapechar_init ();
 	tapeblock_init ();
@@ -1209,7 +1216,7 @@
 MODULE_AUTHOR("(C) 2001 IBM Deutschland Entwicklung GmbH by Carsten Otte and "
 	      "Michael Holzheu (cotte@de.ibm.com,holzheu@de.ibm.com)");
 MODULE_DESCRIPTION("Linux on zSeries channel attached "
-		   "tape device driver ($Revision: 1.50 $)");
+		   "tape device driver ($Revision: 1.51 $)");
 MODULE_LICENSE("GPL");
 
 module_init(tape_init);
diff -Nru a/drivers/s390/char/tty3270.c b/drivers/s390/char/tty3270.c
--- a/drivers/s390/char/tty3270.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/s390/char/tty3270.c	2005-01-10 20:11:17 -08:00
@@ -124,11 +124,12 @@
 tty3270_set_timer(struct tty3270 *tp, int expires)
 {
 	if (expires == 0) {
-		if (del_timer(&tp->timer))
+		if (timer_pending(&tp->timer) && del_timer(&tp->timer))
 			raw3270_put_view(&tp->view);
 		return;
 	}
-	if (mod_timer(&tp->timer, jiffies + expires))
+	if (timer_pending(&tp->timer) &&
+	    mod_timer(&tp->timer, jiffies + expires))
 		return;
 	raw3270_get_view(&tp->view);
 	tp->timer.function = (void (*)(unsigned long)) tty3270_update;
diff -Nru a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c
--- a/drivers/s390/cio/cio.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/s390/cio/cio.c	2005-01-10 20:11:23 -08:00
@@ -1,7 +1,7 @@
 /*
  *  drivers/s390/cio/cio.c
  *   S/390 common I/O routines -- low level i/o calls
- *   $Revision: 1.128 $
+ *   $Revision: 1.130 $
  *
  *    Copyright (C) 1999-2002 IBM Deutschland Entwicklung GmbH,
  *			      IBM Corporation
@@ -813,9 +813,10 @@
 }
 
 extern void do_reipl(unsigned long devno);
-/* Make sure all subchannels are quiet before we re-ipl an lpar. */
+
+/* Clear all subchannels. */
 void
-reipl(unsigned long devno)
+clear_all_subchannels(void)
 {
 	unsigned int schid;
 
@@ -823,7 +824,7 @@
 	for (schid=0;schid<=highest_subchannel;schid++) {
 		struct schib schib;
 		if (stsch(schid, &schib))
-			goto out;
+			break; /* break out of the loop */
 		if (!schib.pmcw.ena)
 			continue;
 		switch(__disable_subchannel_easy(schid, &schib)) {
@@ -832,11 +833,17 @@
 			break;
 		default: /* -EBUSY */
 			if (__clear_subchannel_easy(schid))
-				break; /* give up... */
+				break; /* give up... jump out of switch */
 			stsch(schid, &schib);
 			__disable_subchannel_easy(schid, &schib);
 		}
 	}
-out:
+}
+
+/* Make sure all subchannels are quiet before we re-ipl an lpar. */
+void
+reipl(unsigned long devno)
+{
+	clear_all_subchannels();
 	do_reipl(devno);
 }
diff -Nru a/drivers/s390/cio/qdio.c b/drivers/s390/cio/qdio.c
--- a/drivers/s390/cio/qdio.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/s390/cio/qdio.c	2005-01-10 20:11:20 -08:00
@@ -56,7 +56,7 @@
 #include "ioasm.h"
 #include "chsc.h"
 
-#define VERSION_QDIO_C "$Revision: 1.93 $"
+#define VERSION_QDIO_C "$Revision: 1.94 $"
 
 /****************** MODULE PARAMETER VARIABLES ********************/
 MODULE_AUTHOR("Utz Bacher <utz.bacher@de.ibm.com>");
@@ -2319,6 +2319,15 @@
 	}
 	if (rc == -ENODEV) {
 		/* No need to wait for device no longer present. */
+		qdio_set_state(irq_ptr, QDIO_IRQ_STATE_INACTIVE);
+		spin_unlock_irqrestore(get_ccwdev_lock(cdev), flags);
+	} else if (((void *)cdev->handler != (void *)qdio_handler) && rc == 0) {
+		/*
+		 * Whoever put another handler there, has to cope with the
+		 * interrupt theirself. Might happen if qdio_shutdown was
+		 * called on already shutdown queues, but this shouldn't have
+		 * bad side effects.
+		 */
 		qdio_set_state(irq_ptr, QDIO_IRQ_STATE_INACTIVE);
 		spin_unlock_irqrestore(get_ccwdev_lock(cdev), flags);
 	} else if (rc == 0) {
diff -Nru a/drivers/s390/net/ctcmain.c b/drivers/s390/net/ctcmain.c
--- a/drivers/s390/net/ctcmain.c	2005-01-10 20:11:24 -08:00
+++ b/drivers/s390/net/ctcmain.c	2005-01-10 20:11:24 -08:00
@@ -1,5 +1,5 @@
 /*
- * $Id: ctcmain.c,v 1.65 2004/10/27 09:12:48 mschwide Exp $
+ * $Id: ctcmain.c,v 1.68 2004/12/27 09:25:27 heicarst Exp $
  *
  * CTC / ESCON network driver
  *
@@ -36,7 +36,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * RELEASE-TAG: CTC/ESCON network driver $Revision: 1.65 $
+ * RELEASE-TAG: CTC/ESCON network driver $Revision: 1.68 $
  *
  */
 
@@ -320,7 +320,7 @@
 print_banner(void)
 {
 	static int printed = 0;
-	char vbuf[] = "$Revision: 1.65 $";
+	char vbuf[] = "$Revision: 1.68 $";
 	char *version = vbuf;
 
 	if (printed)
@@ -1939,6 +1939,7 @@
 			   ch_fsm, CH_FSM_LEN, GFP_KERNEL);
 	if (ch->fsm == NULL) {
 		ctc_pr_warn("ctc: Could not create FSM in add_channel\n");
+		kfree(ch->ccw);
 		kfree(ch);
 		return -1;
 	}
@@ -1947,6 +1948,7 @@
 					      GFP_KERNEL)) == NULL) {
 		ctc_pr_warn("ctc: Out of memory in add_channel\n");
 		kfree_fsm(ch->fsm);
+		kfree(ch->ccw);
 		kfree(ch);
 		return -1;
 	}
@@ -1959,6 +1961,7 @@
 			"using old entry\n", (*c)->id);
 		kfree(ch->irb);
 		kfree_fsm(ch->fsm);
+		kfree(ch->ccw);
 		kfree(ch);
 		return 0;
 	}
@@ -2710,7 +2713,7 @@
 	struct net_device *ndev;
 	int bs1;
 
-	DBF_TEXT(trace, 5, __FUNCTION__);
+	DBF_TEXT(trace, 3, __FUNCTION__);
 	priv = dev->driver_data;
 	if (!priv)
 		return -ENODEV;
@@ -2835,7 +2838,7 @@
 static int
 ctc_add_attributes(struct device *dev)
 {
-	device_create_file(dev, &dev_attr_buffer);
+//	device_create_file(dev, &dev_attr_buffer);
 	device_create_file(dev, &dev_attr_loglevel);
 	device_create_file(dev, &dev_attr_stats);
 	return 0;
@@ -2846,7 +2849,7 @@
 {
 	device_remove_file(dev, &dev_attr_stats);
 	device_remove_file(dev, &dev_attr_loglevel);
-	device_remove_file(dev, &dev_attr_buffer);
+//	device_remove_file(dev, &dev_attr_buffer);
 }
 
 
@@ -2988,6 +2991,7 @@
 static struct attribute *ctc_attr[] = {
 	&dev_attr_protocol.attr,
 	&dev_attr_type.attr,
+	&dev_attr_buffer.attr,
 	NULL,
 };
 
diff -Nru a/drivers/s390/net/qeth.h b/drivers/s390/net/qeth.h
--- a/drivers/s390/net/qeth.h	2005-01-10 20:11:15 -08:00
+++ b/drivers/s390/net/qeth.h	2005-01-10 20:11:15 -08:00
@@ -24,7 +24,7 @@
 
 #include "qeth_mpc.h"
 
-#define VERSION_QETH_H 		"$Revision: 1.124 $"
+#define VERSION_QETH_H 		"$Revision: 1.129 $"
 
 #ifdef CONFIG_QETH_IPV6
 #define QETH_VERSION_IPV6 	":IPv6"
@@ -669,7 +669,6 @@
 #define QETH_BROADCAST_WITHOUT_ECHO 2
 
 struct qeth_card_info {
-	char if_name[IF_NAME_LEN];
 	unsigned short unit_addr2;
 	unsigned short cula;
 	unsigned short chpid;
@@ -775,6 +774,8 @@
 
 /*some helper functions*/
 
+#define QETH_CARD_IFNAME(card) (((card)->dev)? (card)->dev->name : "")
+
 inline static __u8
 qeth_get_ipa_adp_type(enum qeth_link_types link_type)
 {
@@ -1069,4 +1070,9 @@
 
 extern int
 qeth_realloc_buffer_pool(struct qeth_card *, int);
+
+extern int
+qeth_fake_header(struct sk_buff *skb, struct net_device *dev,
+                 unsigned short type, void *daddr, void *saddr,
+		 unsigned len);
 #endif /* __QETH_H__ */
diff -Nru a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c
--- a/drivers/s390/net/qeth_main.c	2005-01-10 20:11:24 -08:00
+++ b/drivers/s390/net/qeth_main.c	2005-01-10 20:11:24 -08:00
@@ -1,6 +1,6 @@
 /*
  *
- * linux/drivers/s390/net/qeth_main.c ($Revision: 1.170 $)
+ * linux/drivers/s390/net/qeth_main.c ($Revision: 1.181 $)
  *
  * Linux on zSeries OSA Express and HiperSockets support
  *
@@ -12,7 +12,7 @@
  *			  Frank Pavlic (pavlic@de.ibm.com) and
  *		 	  Thomas Spatzier <tspat@de.ibm.com>
  *
- *    $Revision: 1.170 $	 $Date: 2004/11/17 09:54:06 $
+ *    $Revision: 1.181 $	 $Date: 2004/12/27 07:36:40 $
  *
  * 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
@@ -78,7 +78,7 @@
 #include "qeth_mpc.h"
 #include "qeth_fs.h"
 
-#define VERSION_QETH_C "$Revision: 1.170 $"
+#define VERSION_QETH_C "$Revision: 1.181 $"
 static const char *version = "qeth S/390 OSA-Express driver";
 
 /**
@@ -1311,6 +1311,7 @@
 	if (channel->state != CH_STATE_UP){
 		rc = -ETIME;
 		QETH_DBF_TEXT_(setup, 2, "3err%d", rc);
+		qeth_clear_cmd_buffers(channel);
 	} else
 		rc = 0;
 	return rc;
@@ -1377,6 +1378,7 @@
 	if (channel->state != CH_STATE_ACTIVATING) {
 		PRINT_WARN("qeth: IDX activate timed out!\n");
 		QETH_DBF_TEXT_(setup, 2, "2err%d", -ETIME);
+		qeth_clear_cmd_buffers(channel);
 		return -ETIME;
 	}
 	return qeth_idx_activate_get_answer(channel,idx_reply_cb);
@@ -1601,7 +1603,7 @@
 					   "there is a network problem or "
 					   "someone pulled the cable or "
 					   "disabled the port.\n",
-					   card->info.if_name,
+					   QETH_CARD_IFNAME(card),
 					   card->info.chpid);
 				card->lan_online = 0;
 				netif_carrier_off(card->dev);
@@ -1610,7 +1612,7 @@
 				PRINT_INFO("Link reestablished on %s "
 					   "(CHPID 0x%X). Scheduling "
 					   "IP address reset.\n",
-					   card->info.if_name,
+					   QETH_CARD_IFNAME(card),
 					   card->info.chpid);
 				card->lan_online = 1;
 				netif_carrier_on(card->dev);
@@ -1622,7 +1624,7 @@
 			case IPA_CMD_UNREGISTER_LOCAL_ADDR:
 				PRINT_WARN("probably problem on %s: "
 					   "received IPA command 0x%X\n",
-					   card->info.if_name,
+					   QETH_CARD_IFNAME(card),
 					   cmd->hdr.command);
 				break;
 			default:
@@ -2139,7 +2141,7 @@
 no_mem:
 	if (net_ratelimit()){
 		PRINT_WARN("No memory for packet received on %s.\n",
-			   card->info.if_name);
+			   QETH_CARD_IFNAME(card));
 		QETH_DBF_TEXT(trace,2,"noskbmem");
 		QETH_DBF_TEXT_(trace,2,"%s",CARD_BUS_ID(card));
 	}
@@ -3641,7 +3643,7 @@
 		if (!new_skb) {
 			PRINT_ERR("qeth_prepare_skb: could "
 				  "not realloc headroom for qeth_hdr "
-				  "on interface %s", card->info.if_name);
+				  "on interface %s", QETH_CARD_IFNAME(card));
 			return -ENOMEM;
 		}
 		*skb = new_skb;
@@ -3678,7 +3680,7 @@
 	      QETH_IP_HEADER_SIZE) & (~(PAGE_SIZE - 1)))) {
 		PRINT_ERR("qeth_prepare_skb: misaligned "
 			  "packet on interface %s. Discarded.",
-			  card->info.if_name);
+			  QETH_CARD_IFNAME(card));
 		return -EINVAL;
 	}
 	return 0;
@@ -4185,7 +4187,7 @@
 		return -EOPNOTSUPP;
 	if (!qeth_is_supported(card,IPA_ARP_PROCESSING)) {
 		PRINT_WARN("ARP processing not supported "
-			   "on %s!\n", card->info.if_name);
+			   "on %s!\n", QETH_CARD_IFNAME(card));
 		return -EOPNOTSUPP;
 	}
 	rc = qeth_send_simple_setassparms(card, IPA_ARP_PROCESSING,
@@ -4195,7 +4197,7 @@
 		tmp = rc;
 		PRINT_WARN("Could not set number of ARP entries on %s: "
 			   "%s (0x%x/%d)\n",
-			   card->info.if_name, qeth_arp_get_error_cause(&rc),
+			   QETH_CARD_IFNAME(card), qeth_arp_get_error_cause(&rc),
 			   tmp, tmp);
 	}
 	return rc;
@@ -4368,7 +4370,7 @@
 	if (!qeth_is_supported(card,/*IPA_QUERY_ARP_ADDR_INFO*/
 			       IPA_ARP_PROCESSING)) {
 		PRINT_WARN("ARP processing not supported "
-			   "on %s!\n", card->info.if_name);
+			   "on %s!\n", QETH_CARD_IFNAME(card));
 		return -EOPNOTSUPP;
 	}
 	/* get size of userspace buffer and mask_bits -> 6 bytes */
@@ -4389,7 +4391,7 @@
 		tmp = rc;
 		PRINT_WARN("Error while querying ARP cache on %s: %s "
 			   "(0x%x/%d)\n",
-			   card->info.if_name, qeth_arp_get_error_cause(&rc),
+			   QETH_CARD_IFNAME(card), qeth_arp_get_error_cause(&rc),
 			   tmp, tmp);
 		copy_to_user(udata, qinfo.udata, 4);
 	} else {
@@ -4503,9 +4505,11 @@
 
 	if (card->info.guestlan)
 		return -EOPNOTSUPP;
-	if (!qeth_adp_supported(card,IPA_SETADP_SET_SNMP_CONTROL)) {
+
+	if ((!qeth_adp_supported(card,IPA_SETADP_SET_SNMP_CONTROL)) &&
+	    (!card->options.layer2) ) {
 		PRINT_WARN("SNMP Query MIBS not supported "
-			   "on %s!\n", card->info.if_name);
+			   "on %s!\n", QETH_CARD_IFNAME(card));
 		return -EOPNOTSUPP;
 	}
 	/* skip 4 bytes (data_len struct member) to get req_len */
@@ -4537,7 +4541,7 @@
 				    qeth_snmp_command_cb, (void *)&qinfo);
 	if (rc)
 		PRINT_WARN("SNMP command failed on %s: (0x%x)\n",
-			   card->info.if_name, rc);
+			   QETH_CARD_IFNAME(card), rc);
 	 else
 		copy_to_user(udata, qinfo.udata, qinfo.udata_len);
 
@@ -4577,7 +4581,7 @@
 		return -EOPNOTSUPP;
 	if (!qeth_is_supported(card,IPA_ARP_PROCESSING)) {
 		PRINT_WARN("ARP processing not supported "
-			   "on %s!\n", card->info.if_name);
+			   "on %s!\n", QETH_CARD_IFNAME(card));
 		return -EOPNOTSUPP;
 	}
 
@@ -4594,7 +4598,7 @@
 		qeth_ipaddr4_to_string((u8 *)entry->ipaddr, buf);
 		PRINT_WARN("Could not add ARP entry for address %s on %s: "
 			   "%s (0x%x/%d)\n",
-			   buf, card->info.if_name,
+			   buf, QETH_CARD_IFNAME(card),
 			   qeth_arp_get_error_cause(&rc), tmp, tmp);
 	}
 	return rc;
@@ -4620,7 +4624,7 @@
 		return -EOPNOTSUPP;
 	if (!qeth_is_supported(card,IPA_ARP_PROCESSING)) {
 		PRINT_WARN("ARP processing not supported "
-			   "on %s!\n", card->info.if_name);
+			   "on %s!\n", QETH_CARD_IFNAME(card));
 		return -EOPNOTSUPP;
 	}
 	memcpy(buf, entry, 12);
@@ -4637,7 +4641,7 @@
 		qeth_ipaddr4_to_string((u8 *)entry->ipaddr, buf);
 		PRINT_WARN("Could not delete ARP entry for address %s on %s: "
 			   "%s (0x%x/%d)\n",
-			   buf, card->info.if_name,
+			   buf, QETH_CARD_IFNAME(card),
 			   qeth_arp_get_error_cause(&rc), tmp, tmp);
 	}
 	return rc;
@@ -4661,7 +4665,7 @@
 		return -EOPNOTSUPP;
 	if (!qeth_is_supported(card,IPA_ARP_PROCESSING)) {
 		PRINT_WARN("ARP processing not supported "
-			   "on %s!\n", card->info.if_name);
+			   "on %s!\n", QETH_CARD_IFNAME(card));
 		return -EOPNOTSUPP;
 	}
 	rc = qeth_send_simple_setassparms(card, IPA_ARP_PROCESSING,
@@ -4669,7 +4673,7 @@
 	if (rc){
 		tmp = rc;
 		PRINT_WARN("Could not flush ARP cache on %s: %s (0x%x/%d)\n",
-			   card->info.if_name, qeth_arp_get_error_cause(&rc),
+			   QETH_CARD_IFNAME(card), qeth_arp_get_error_cause(&rc),
 			   tmp, tmp);
 	}
 	return rc;
@@ -4940,7 +4944,7 @@
 	rc = qeth_send_ipa_cmd(card, iob, NULL, NULL);
         if (rc) {
                 PRINT_ERR("Error in processing VLAN %i on %s: 0x%x. "
-			  "Continuing\n",i, card->info.if_name, rc);
+			  "Continuing\n",i, QETH_CARD_IFNAME(card), rc);
 		QETH_DBF_TEXT_(trace, 2, "L2VL%4x", ipacmd);
 		QETH_DBF_TEXT_(trace, 2, "L2%s", CARD_BUS_ID(card));
 		QETH_DBF_TEXT_(trace, 2, "err%d", rc);
@@ -5423,7 +5427,7 @@
 			  "%02x:%02x:%02x:%02x:%02x:%02x on %s: %x\n",
 			  addr->mac[0],addr->mac[1],addr->mac[2],
 			  addr->mac[3],addr->mac[4],addr->mac[5],
-			  card->info.if_name,rc);
+			  QETH_CARD_IFNAME(card),rc);
 	return rc;
 }
 
@@ -5445,7 +5449,7 @@
 			  "%02x:%02x:%02x:%02x:%02x:%02x on %s: %x\n",
 			  addr->mac[0],addr->mac[1],addr->mac[2],
 			  addr->mac[3],addr->mac[4],addr->mac[5],
-			  card->info.if_name,rc);
+			  QETH_CARD_IFNAME(card),rc);
 	return rc;
 
 }
@@ -5543,6 +5547,14 @@
 	return qeth_layer3_deregister_addr_entry(card, addr);
 }
 
+int
+qeth_fake_header(struct sk_buff *skb, struct net_device *dev,
+		     unsigned short type, void *daddr, void *saddr,
+		     unsigned len)
+{
+	return QETH_FAKE_LL_LEN;
+}
+
 static int
 qeth_netdev_init(struct net_device *dev)
 {
@@ -5584,6 +5596,10 @@
 	dev->hard_header_parse = NULL;
 	dev->set_mac_address = qeth_layer2_set_mac_address;
 	dev->flags |= qeth_get_netdev_flags(card);
+	if (card->options.fake_ll)
+		dev->hard_header = qeth_fake_header;
+	else
+		dev->hard_header = NULL;
 	if ((card->options.fake_broadcast) ||
 	    (card->info.broadcast_capable))
 		dev->flags |= IFF_BROADCAST;
@@ -6094,7 +6110,7 @@
 
 	if (!qeth_is_supported(card,IPA_ARP_PROCESSING)) {
 		PRINT_WARN("ARP processing not supported "
-			   "on %s!\n", card->info.if_name);
+			   "on %s!\n", QETH_CARD_IFNAME(card));
 		return 0;
 	}
 	rc = qeth_send_simple_setassparms(card,IPA_ARP_PROCESSING,
@@ -6102,7 +6118,7 @@
 	if (rc) {
 		PRINT_WARN("Could not start ARP processing "
 			   "assist on %s: 0x%x\n",
-			   card->info.if_name, rc);
+			   QETH_CARD_IFNAME(card), rc);
 	}
 	return rc;
 }
@@ -6116,7 +6132,7 @@
 
 	if (!qeth_is_supported(card, IPA_IP_FRAGMENTATION)) {
 		PRINT_INFO("Hardware IP fragmentation not supported on %s\n",
-			   card->info.if_name);
+			   QETH_CARD_IFNAME(card));
 		return  -EOPNOTSUPP;
 	}
 
@@ -6125,7 +6141,7 @@
 	if (rc) {
 		PRINT_WARN("Could not start Hardware IP fragmentation "
 			   "assist on %s: 0x%x\n",
-			   card->info.if_name, rc);
+			   QETH_CARD_IFNAME(card), rc);
 	} else
 		PRINT_INFO("Hardware IP fragmentation enabled \n");
 	return rc;
@@ -6143,7 +6159,7 @@
 
 	if (!qeth_is_supported(card, IPA_SOURCE_MAC)) {
 		PRINT_INFO("Inbound source address not "
-			   "supported on %s\n", card->info.if_name);
+			   "supported on %s\n", QETH_CARD_IFNAME(card));
 		return -EOPNOTSUPP;
 	}
 
@@ -6152,7 +6168,7 @@
 	if (rc)
 		PRINT_WARN("Could not start inbound source "
 			   "assist on %s: 0x%x\n",
-			   card->info.if_name, rc);
+			   QETH_CARD_IFNAME(card), rc);
 	return rc;
 }
 
@@ -6165,7 +6181,7 @@
 
 #ifdef CONFIG_QETH_VLAN
 	if (!qeth_is_supported(card, IPA_FULL_VLAN)) {
-		PRINT_WARN("VLAN not supported on %s\n", card->info.if_name);
+		PRINT_WARN("VLAN not supported on %s\n", QETH_CARD_IFNAME(card));
 		return -EOPNOTSUPP;
 	}
 
@@ -6174,7 +6190,7 @@
 	if (rc) {
 		PRINT_WARN("Could not start vlan "
 			   "assist on %s: 0x%x\n",
-			   card->info.if_name, rc);
+			   QETH_CARD_IFNAME(card), rc);
 	} else {
 		PRINT_INFO("VLAN enabled \n");
 		card->dev->features |=
@@ -6195,7 +6211,7 @@
 
 	if (!qeth_is_supported(card, IPA_MULTICASTING)) {
 		PRINT_WARN("Multicast not supported on %s\n",
-			   card->info.if_name);
+			   QETH_CARD_IFNAME(card));
 		return -EOPNOTSUPP;
 	}
 
@@ -6204,7 +6220,7 @@
 	if (rc) {
 		PRINT_WARN("Could not start multicast "
 			   "assist on %s: rc=%i\n",
-			   card->info.if_name, rc);
+			   QETH_CARD_IFNAME(card), rc);
 	} else {
 		PRINT_INFO("Multicast enabled\n");
 		card->dev->flags |= IFF_MULTICAST;
@@ -6224,14 +6240,14 @@
 	rc = qeth_send_startlan(card, QETH_PROT_IPV6);
 	if (rc) {
 		PRINT_ERR("IPv6 startlan failed on %s\n",
-			  card->info.if_name);
+			  QETH_CARD_IFNAME(card));
 		return rc;
 	}
 	netif_wake_queue(card->dev);
 	rc = qeth_query_ipassists(card,QETH_PROT_IPV6);
 	if (rc) {
 		PRINT_ERR("IPv6 query ipassist failed on %s\n",
-			  card->info.if_name);
+			  QETH_CARD_IFNAME(card));
 		return rc;
 	}
 	rc = qeth_send_simple_setassparms(card, IPA_IPV6,
@@ -6239,7 +6255,7 @@
 	if (rc) {
 		PRINT_WARN("IPv6 start assist (version 4) failed "
 			   "on %s: 0x%x\n",
-			   card->info.if_name, rc);
+			   QETH_CARD_IFNAME(card), rc);
 		return rc;
 	}
 	rc = qeth_send_simple_setassparms_ipv6(card, IPA_IPV6,
@@ -6247,7 +6263,7 @@
 	if (rc) {
 		PRINT_WARN("IPV6 start assist (version 6) failed  "
 			   "on %s: 0x%x\n",
-			   card->info.if_name, rc);
+			   QETH_CARD_IFNAME(card), rc);
 		return rc;
 	}
 	rc = qeth_send_simple_setassparms_ipv6(card, IPA_PASSTHRU,
@@ -6255,7 +6271,7 @@
 	if (rc) {
 		PRINT_WARN("Could not enable passthrough "
 			   "on %s: 0x%x\n",
-			   card->info.if_name, rc);
+			   QETH_CARD_IFNAME(card), rc);
 		return rc;
 	}
 	PRINT_INFO("IPV6 enabled \n");
@@ -6273,7 +6289,7 @@
 
 	if (!qeth_is_supported(card, IPA_IPV6)) {
 		PRINT_WARN("IPv6 not supported on %s\n",
-			   card->info.if_name);
+			   QETH_CARD_IFNAME(card));
 		return 0;
 	}
 	rc = qeth_softsetup_ipv6(card);
@@ -6290,7 +6306,7 @@
 	card->info.broadcast_capable = 0;
 	if (!qeth_is_supported(card, IPA_FILTERING)) {
 		PRINT_WARN("Broadcast not supported on %s\n",
-			   card->info.if_name);
+			   QETH_CARD_IFNAME(card));
 		rc = -EOPNOTSUPP;
 		goto out;
 	}
@@ -6299,7 +6315,7 @@
 	if (rc) {
 		PRINT_WARN("Could not enable broadcasting filtering "
 			   "on %s: 0x%x\n",
-			   card->info.if_name, rc);
+			   QETH_CARD_IFNAME(card), rc);
 		goto out;
 	}
 
@@ -6307,7 +6323,7 @@
 					  IPA_CMD_ASS_CONFIGURE, 1);
 	if (rc) {
 		PRINT_WARN("Could not set up broadcast filtering on %s: 0x%x\n",
-			   card->info.if_name, rc);
+			   QETH_CARD_IFNAME(card), rc);
 		goto out;
 	}
 	card->info.broadcast_capable = QETH_BROADCAST_WITH_ECHO;
@@ -6316,7 +6332,7 @@
 					  IPA_CMD_ASS_ENABLE, 1);
 	if (rc) {
 		PRINT_WARN("Could not set up broadcast echo filtering on "
-			   "%s: 0x%x\n", card->info.if_name, rc);
+			   "%s: 0x%x\n", QETH_CARD_IFNAME(card), rc);
 		goto out;
 	}
 	card->info.broadcast_capable = QETH_BROADCAST_WITHOUT_ECHO;
@@ -6338,7 +6354,7 @@
 	if (rc) {
 		PRINT_WARN("Starting Inbound HW Checksumming failed on %s: "
 			   "0x%x,\ncontinuing using Inbound SW Checksumming\n",
-			   card->info.if_name, rc);
+			   QETH_CARD_IFNAME(card), rc);
 		return rc;
 	}
 	rc = qeth_send_simple_setassparms(card, IPA_INBOUND_CHECKSUM,
@@ -6347,7 +6363,7 @@
 	if (rc) {
 		PRINT_WARN("Enabling Inbound HW Checksumming failed on %s: "
 			   "0x%x,\ncontinuing using Inbound SW Checksumming\n",
-			   card->info.if_name, rc);
+			   QETH_CARD_IFNAME(card), rc);
 		return rc;
 	}
 	return 0;
@@ -6362,19 +6378,19 @@
 
 	if (card->options.checksum_type == NO_CHECKSUMMING) {
 		PRINT_WARN("Using no checksumming on %s.\n",
-			   card->info.if_name);
+			   QETH_CARD_IFNAME(card));
 		return 0;
 	}
 	if (card->options.checksum_type == SW_CHECKSUMMING) {
 		PRINT_WARN("Using SW checksumming on %s.\n",
-			   card->info.if_name);
+			   QETH_CARD_IFNAME(card));
 		return 0;
 	}
 	if (!qeth_is_supported(card, IPA_INBOUND_CHECKSUM)) {
 		PRINT_WARN("Inbound HW Checksumming not "
 			   "supported on %s,\ncontinuing "
 			   "using Inbound SW Checksumming\n",
-			   card->info.if_name);
+			   QETH_CARD_IFNAME(card));
 		card->options.checksum_type = SW_CHECKSUMMING;
 		return 0;
 	}
@@ -6496,7 +6512,7 @@
  		card->options.route4.type = NO_ROUTER;
 		PRINT_WARN("Error (0x%04x) while setting routing type on %s. "
 			   "Type set to 'no router'.\n",
-			   rc, card->info.if_name);
+			   rc, QETH_CARD_IFNAME(card));
 	}
 	return rc;
 }
@@ -6523,7 +6539,7 @@
 	 	card->options.route6.type = NO_ROUTER;
 		PRINT_WARN("Error (0x%04x) while setting routing type on %s. "
 			   "Type set to 'no router'.\n",
-			   rc, card->info.if_name);
+			   rc, QETH_CARD_IFNAME(card));
 	}
 #endif
 	return rc;
@@ -6879,18 +6895,12 @@
 static int
 qeth_register_netdev(struct qeth_card *card)
 {
-	int rc;
-
 	QETH_DBF_TEXT(setup, 3, "regnetd");
 	if (card->dev->reg_state != NETREG_UNINITIALIZED)
 		return 0;
 	/* sysfs magic */
 	SET_NETDEV_DEV(card->dev, &card->gdev->dev);
-	rc = register_netdev(card->dev);
-	if (!rc)
-		strcpy(card->info.if_name, card->dev->name);
-
-	return rc;
+	return register_netdev(card->dev);
 }
 
 static void
diff -Nru a/drivers/s390/net/qeth_proc.c b/drivers/s390/net/qeth_proc.c
--- a/drivers/s390/net/qeth_proc.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/s390/net/qeth_proc.c	2005-01-10 20:11:19 -08:00
@@ -1,6 +1,6 @@
 /*
  *
- * linux/drivers/s390/net/qeth_fs.c ($Revision: 1.10 $)
+ * linux/drivers/s390/net/qeth_fs.c ($Revision: 1.13 $)
  *
  * Linux on zSeries OSA Express and HiperSockets support
  * This file contains code related to procfs.
@@ -21,7 +21,7 @@
 #include "qeth_mpc.h"
 #include "qeth_fs.h"
 
-const char *VERSION_QETH_PROC_C = "$Revision: 1.10 $";
+const char *VERSION_QETH_PROC_C = "$Revision: 1.13 $";
 
 /***** /proc/qeth *****/
 #define QETH_PROCFILE_NAME "qeth"
@@ -133,7 +133,7 @@
 				CARD_WDEV_ID(card),
 				CARD_DDEV_ID(card),
 				card->info.chpid,
-				card->info.if_name,
+				QETH_CARD_IFNAME(card),
 				qeth_get_cardname_short(card),
 				card->info.portno);
 		if (card->lan_online)
@@ -222,7 +222,7 @@
 			CARD_RDEV_ID(card),
 			CARD_WDEV_ID(card),
 			CARD_DDEV_ID(card),
-			card->info.if_name
+			QETH_CARD_IFNAME(card)
 		  );
 	seq_printf(s, "  Skb's/buffers received                 : %li/%i\n"
 		      "  Skb's/buffers sent                     : %li/%i\n\n",
diff -Nru a/drivers/s390/net/qeth_sys.c b/drivers/s390/net/qeth_sys.c
--- a/drivers/s390/net/qeth_sys.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/s390/net/qeth_sys.c	2005-01-10 20:11:19 -08:00
@@ -1,6 +1,6 @@
 /*
  *
- * linux/drivers/s390/net/qeth_sys.c ($Revision: 1.40 $)
+ * linux/drivers/s390/net/qeth_sys.c ($Revision: 1.48 $)
  *
  * Linux on zSeries OSA Express and HiperSockets support
  * This file contains code related to sysfs.
@@ -20,7 +20,7 @@
 #include "qeth_mpc.h"
 #include "qeth_fs.h"
 
-const char *VERSION_QETH_SYS_C = "$Revision: 1.40 $";
+const char *VERSION_QETH_SYS_C = "$Revision: 1.48 $";
 
 /*****************************************************************************/
 /*                                                                           */
@@ -75,8 +75,7 @@
 	struct qeth_card *card = dev->driver_data;
 	if (!card)
 		return -EINVAL;
-
-	return sprintf(buf, "%s\n", card->info.if_name);
+	return sprintf(buf, "%s\n", QETH_CARD_IFNAME(card));
 }
 
 static DEVICE_ATTR(if_name, 0444, qeth_dev_if_name_show, NULL);
@@ -440,7 +439,7 @@
 	if (!qeth_is_supported(card, IPA_IPV6)){
 		PRINT_WARN("IPv6 not supported for interface %s.\n"
 			   "Routing status no changed.\n",
-			   card->info.if_name);
+			   QETH_CARD_IFNAME(card));
 		return -ENOTSUPP;
 	}
 
@@ -515,8 +514,15 @@
 		return -EPERM;
 
 	i = simple_strtoul(buf, &tmp, 16);
-	if ((i == 0) || (i == 1))
+	if ((i == 0) || (i == 1)) {
 		card->options.fake_ll = i;
+		if (card->dev) {
+			if (i)
+  				card->dev->hard_header = qeth_fake_header;
+			else
+				card->dev->hard_header = NULL;
+		}
+	}
 	else {
 		PRINT_WARN("fake_ll: write 0 or 1 to this file!\n");
 		return -EINVAL;
@@ -715,8 +721,9 @@
 	if (!card)
 		return -EINVAL;
 
-	if ((card->state != CARD_STATE_DOWN) &&
-	    (card->state != CARD_STATE_RECOVER))
+	if (((card->state != CARD_STATE_DOWN) &&
+	     (card->state != CARD_STATE_RECOVER)) ||
+	    (card->info.type != QETH_CARD_TYPE_OSAE))
 		return -EPERM;
 
 	i = simple_strtoul(buf, &tmp, 16);
diff -Nru a/drivers/sbus/char/rtc.c b/drivers/sbus/char/rtc.c
--- a/drivers/sbus/char/rtc.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/sbus/char/rtc.c	2005-01-10 20:11:17 -08:00
@@ -20,6 +20,7 @@
 #include <linux/poll.h>
 #include <linux/init.h>
 #include <linux/smp_lock.h>
+#include <asm/io.h>
 #include <asm/mostek.h>
 #include <asm/system.h>
 #include <asm/uaccess.h>
@@ -30,7 +31,7 @@
 /* Retrieve the current date and time from the real time clock. */
 static void get_rtc_time(struct rtc_time *t)
 {
-	unsigned long regs = mstk48t02_regs;
+	void * __iomem regs = mstk48t02_regs;
 	u8 tmp;
 
 	spin_lock_irq(&mostek_lock);
@@ -57,7 +58,7 @@
 /* Set the current date and time inthe real time clock. */
 void set_rtc_time(struct rtc_time *t)
 {
-	unsigned long regs = mstk48t02_regs;
+	void * __iomem regs = mstk48t02_regs;
 	u8 tmp;
 
 	spin_lock_irq(&mostek_lock);
diff -Nru a/drivers/sbus/sbus.c b/drivers/sbus/sbus.c
--- a/drivers/sbus/sbus.c	2005-01-10 20:11:24 -08:00
+++ b/drivers/sbus/sbus.c	2005-01-10 20:11:24 -08:00
@@ -217,6 +217,8 @@
  * prom_sbus_ranges_init(), with all sun4d stuff cut away.
  * Ask DaveM what is going on here, how is sun4d supposed to work... XXX
  */
+/* added back sun4d patch from Thomas Bogendoerfer - should be OK (crn) */
+
 static void __init sbus_bus_ranges_init(int parent_node, struct sbus_bus *sbus)
 {
 	int len;
@@ -229,6 +231,18 @@
 		return;
 	}
 	sbus->num_sbus_ranges = len / sizeof(struct linux_prom_ranges);
+	if (sparc_cpu_model == sun4d) {
+		struct linux_prom_ranges iounit_ranges[PROMREG_MAX];
+		int num_iounit_ranges;
+
+	len = prom_getproperty(parent_node, "ranges",
+				(char *) iounit_ranges,
+				sizeof (iounit_ranges));
+		if (len != -1) {
+			num_iounit_ranges = (len/sizeof(struct linux_prom_ranges));
+			prom_adjust_ranges (sbus->sbus_ranges, sbus->num_sbus_ranges, iounit_ranges, num_iounit_ranges);
+		}
+	}
 }
 
 static void __init __apply_ranges_to_regs(struct linux_prom_ranges *ranges,
diff -Nru a/drivers/scsi/53c700.c b/drivers/scsi/53c700.c
--- a/drivers/scsi/53c700.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/scsi/53c700.c	2005-01-10 20:11:16 -08:00
@@ -176,6 +176,8 @@
 STATIC void NCR_700_chip_reset(struct Scsi_Host *host);
 STATIC int NCR_700_slave_configure(struct scsi_device *SDpnt);
 STATIC void NCR_700_slave_destroy(struct scsi_device *SDpnt);
+static int NCR_700_change_queue_depth(struct scsi_device *SDpnt, int depth);
+static int NCR_700_change_queue_type(struct scsi_device *SDpnt, int depth);
 
 STATIC struct device_attribute *NCR_700_dev_attrs[];
 
@@ -338,6 +340,8 @@
 	tpnt->use_clustering = ENABLE_CLUSTERING;
 	tpnt->slave_configure = NCR_700_slave_configure;
 	tpnt->slave_destroy = NCR_700_slave_destroy;
+	tpnt->change_queue_depth = NCR_700_change_queue_depth;
+	tpnt->change_queue_type = NCR_700_change_queue_type;
 	
 	if(tpnt->name == NULL)
 		tpnt->name = "53c700";
@@ -924,10 +928,11 @@
 				spi_offset(SCp->device->sdev_target) = 0;
 			NCR_700_set_flag(SCp->device, NCR_700_DEV_NEGOTIATED_SYNC);
 			NCR_700_clear_flag(SCp->device, NCR_700_DEV_BEGIN_SYNC_NEGOTIATION);
-		} else if(SCp != NULL && NCR_700_is_flag_set(SCp->device, NCR_700_DEV_BEGIN_TAG_QUEUEING)) {
+		} else if(SCp != NULL && NCR_700_get_tag_neg_state(SCp->device) == NCR_700_DURING_TAG_NEGOTIATION) {
 			/* rejected our first simple tag message */
 			printk(KERN_WARNING "scsi%d (%d:%d) Rejected first tag queue attempt, turning off tag queueing\n", host->host_no, pun, lun);
-			NCR_700_clear_flag(SCp->device, NCR_700_DEV_BEGIN_TAG_QUEUEING);
+			/* we're done negotiating */
+			NCR_700_set_tag_neg_state(SCp->device, NCR_700_FINISHED_TAG_NEGOTIATION);
 			hostdata->tag_negotiated &= ~(1<<SCp->device->id);
 			SCp->device->tagged_supported = 0;
 			scsi_deactivate_tcq(SCp->device, host->cmd_per_lun);
@@ -989,8 +994,11 @@
 	if(dsps == A_GOOD_STATUS_AFTER_STATUS) {
 		DEBUG(("  COMMAND COMPLETE, status=%02x\n",
 		       hostdata->status[0]));
-		/* OK, if TCQ still on, we know it works */
-		NCR_700_clear_flag(SCp->device, NCR_700_DEV_BEGIN_TAG_QUEUEING);
+		/* OK, if TCQ still under negotiation, we now know it works */
+		if (NCR_700_get_tag_neg_state(SCp->device) == NCR_700_DURING_TAG_NEGOTIATION)
+			NCR_700_set_tag_neg_state(SCp->device,
+						  NCR_700_FINISHED_TAG_NEGOTIATION);
+			
 		/* check for contingent allegiance contitions */
 		if(status_byte(hostdata->status[0]) == CHECK_CONDITION ||
 		   status_byte(hostdata->status[0]) == COMMAND_TERMINATED) {
@@ -1811,23 +1819,12 @@
 	printk("53c700: scsi%d, command ", SCp->device->host->host_no);
 	scsi_print_command(SCp);
 #endif
-	if(SCp->device->tagged_supported && !SCp->device->simple_tags
-	   && (hostdata->tag_negotiated &(1<<SCp->device->id)) == 0
-	   && NCR_700_is_flag_clear(SCp->device, NCR_700_DEV_BEGIN_TAG_QUEUEING)) {
-		/* upper layer has indicated tags are supported.  We don't
-		 * necessarily believe it yet.
-		 *
-		 * NOTE: There is a danger here: the mid layer supports
-		 * tag queuing per LUN.  We only support it per PUN because
-		 * of potential reselection issues */
-		scsi_activate_tcq(SCp->device, NCR_700_DEFAULT_TAGS);
-	}
-
 	if(blk_rq_tagged(SCp->request)
-	   && (hostdata->tag_negotiated &(1<<SCp->device->id)) == 0) {
-		printk(KERN_INFO "scsi%d: (%d:%d) Enabling Tag Command Queuing\n", SCp->device->host->host_no, SCp->device->id, SCp->device->lun);
+	   && (hostdata->tag_negotiated &(1<<SCp->device->id)) == 0
+	   && NCR_700_get_tag_neg_state(SCp->device) == NCR_700_START_TAG_NEGOTIATION) {
+		printk(KERN_ERR "scsi%d: (%d:%d) Enabling Tag Command Queuing\n", SCp->device->host->host_no, SCp->device->id, SCp->device->lun);
 		hostdata->tag_negotiated |= (1<<SCp->device->id);
-		NCR_700_set_flag(SCp->device, NCR_700_DEV_BEGIN_TAG_QUEUEING);
+		NCR_700_set_tag_neg_state(SCp->device, NCR_700_DURING_TAG_NEGOTIATION);
 	}
 
 	/* here we may have to process an untagged command.  The gate
@@ -1842,7 +1839,8 @@
 		hostdata->tag_negotiated &= ~(1<<SCp->device->id);
 	}
 
-	if((hostdata->tag_negotiated &(1<<SCp->device->id))) {
+	if((hostdata->tag_negotiated &(1<<SCp->device->id))
+	   && scsi_get_tag_type(SCp->device)) {
 		slot->tag = SCp->request->tag;
 		DEBUG(("53c700 %d:%d:%d, sending out tag %d, slot %p\n",
 		       SCp->device->host->host_no, SCp->device->id, SCp->device->lun, slot->tag,
@@ -2080,7 +2078,9 @@
 
 	/* to do here: allocate memory; build a queue_full list */
 	if(SDp->tagged_supported) {
-		/* do TCQ stuff here */
+		scsi_set_tag_type(SDp, MSG_ORDERED_TAG);
+		scsi_activate_tcq(SDp, NCR_700_DEFAULT_TAGS);
+		NCR_700_set_tag_neg_state(SDp, NCR_700_START_TAG_NEGOTIATION);
 	} else {
 		/* initialise to default depth */
 		scsi_adjust_queue_depth(SDp, 0, SDp->host->cmd_per_lun);
@@ -2102,18 +2102,48 @@
 	/* to do here: deallocate memory */
 }
 
-static ssize_t
-NCR_700_store_queue_depth(struct device *dev, const char *buf, size_t count)
+static int
+NCR_700_change_queue_depth(struct scsi_device *SDp, int depth)
 {
-	int depth;
+	if (depth > NCR_700_MAX_TAGS)
+		depth = NCR_700_MAX_TAGS;
 
-	struct scsi_device *SDp = to_scsi_device(dev);
-	depth = simple_strtoul(buf, NULL, 0);
-	if(depth > NCR_700_MAX_TAGS)
-		return -EINVAL;
-	scsi_adjust_queue_depth(SDp, MSG_ORDERED_TAG, depth);
+	scsi_adjust_queue_depth(SDp, scsi_get_tag_type(SDp), depth);
+	return depth;
+}
 
-	return count;
+static int NCR_700_change_queue_type(struct scsi_device *SDp, int tag_type)
+{
+	int change_tag = ((tag_type ==0 &&  scsi_get_tag_type(SDp) != 0)
+			  || (tag_type != 0 && scsi_get_tag_type(SDp) == 0));
+	struct NCR_700_Host_Parameters *hostdata = 
+		(struct NCR_700_Host_Parameters *)SDp->host->hostdata[0];
+
+	scsi_set_tag_type(SDp, tag_type);
+
+	/* We have a global (per target) flag to track whether TCQ is
+	 * enabled, so we'll be turning it off for the entire target here.
+	 * our tag algorithm will fail if we mix tagged and untagged commands,
+	 * so quiesce the device before doing this */
+	if (change_tag)
+		scsi_target_quiesce(SDp->sdev_target);
+
+	if (!tag_type) {
+		/* shift back to the default unqueued number of commands
+		 * (the user can still raise this) */
+		scsi_deactivate_tcq(SDp, SDp->host->cmd_per_lun);
+		hostdata->tag_negotiated &= ~(1 << SDp->id);
+	} else {
+		/* Here, we cleared the negotiation flag above, so this
+		 * will force the driver to renegotiate */
+		scsi_activate_tcq(SDp, SDp->queue_depth);
+		if (change_tag)
+			NCR_700_set_tag_neg_state(SDp, NCR_700_START_TAG_NEGOTIATION);
+	}
+	if (change_tag)
+		scsi_target_resume(SDp->sdev_target);
+
+	return tag_type;
 }
 
 static ssize_t
@@ -2124,14 +2154,6 @@
 	return snprintf(buf, 20, "%d\n", NCR_700_get_depth(SDp));
 }
 
-static struct device_attribute NCR_700_queue_depth_attr = {
-	.attr = {
-		.name = 	"queue_depth",
-		.mode =		S_IWUSR,
-	},
-	.store = NCR_700_store_queue_depth,
-};
-
 static struct device_attribute NCR_700_active_tags_attr = {
 	.attr = {
 		.name =		"active_tags",
@@ -2141,7 +2163,6 @@
 };
 
 STATIC struct device_attribute *NCR_700_dev_attrs[] = {
-	&NCR_700_queue_depth_attr,
 	&NCR_700_active_tags_attr,
 	NULL,
 };
diff -Nru a/drivers/scsi/53c700.h b/drivers/scsi/53c700.h
--- a/drivers/scsi/53c700.h	2005-01-10 20:11:16 -08:00
+++ b/drivers/scsi/53c700.h	2005-01-10 20:11:16 -08:00
@@ -102,7 +102,6 @@
  * 18 device supports tag queueing */
 #define NCR_700_DEV_NEGOTIATED_SYNC	(1<<16)
 #define NCR_700_DEV_BEGIN_SYNC_NEGOTIATION	(1<<17)
-#define NCR_700_DEV_BEGIN_TAG_QUEUEING	(1<<18)
 #define NCR_700_DEV_PRINT_SYNC_NEGOTIATION (1<<19)
 
 static inline void
@@ -138,6 +137,27 @@
 NCR_700_clear_flag(struct scsi_device *SDp, __u32 flag)
 {
 	spi_flags(SDp->sdev_target) &= ~flag;
+}
+
+enum NCR_700_tag_neg_state {
+	NCR_700_START_TAG_NEGOTIATION = 0,
+	NCR_700_DURING_TAG_NEGOTIATION = 1,
+	NCR_700_FINISHED_TAG_NEGOTIATION = 2,
+};
+
+static inline enum NCR_700_tag_neg_state
+NCR_700_get_tag_neg_state(struct scsi_device *SDp)
+{
+	return (enum NCR_700_tag_neg_state)((spi_flags(SDp->sdev_target)>>20) & 0x3);
+}
+
+static inline void
+NCR_700_set_tag_neg_state(struct scsi_device *SDp,
+			  enum NCR_700_tag_neg_state state)
+{
+	/* clear the slot */
+	spi_flags(SDp->sdev_target) &= ~(0x3 << 20);
+	spi_flags(SDp->sdev_target) |= ((__u32)state) << 20;
 }
 
 struct NCR_700_command_slot {
diff -Nru a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
--- a/drivers/scsi/Kconfig	2005-01-10 20:11:22 -08:00
+++ b/drivers/scsi/Kconfig	2005-01-10 20:11:22 -08:00
@@ -203,6 +203,14 @@
 	  each attached FiberChannel device to sysfs, say Y.
 	  Otherwise, say N.
 
+config SCSI_ISCSI_ATTRS
+	tristate "iSCSI Transport Attributes"
+	depends on SCSI
+	help
+	  If you wish to export transport-specific information about
+	  each attached iSCSI device to sysfs, say Y.
+	  Otherwise, say N.
+
 endmenu
 
 menu "SCSI low-level drivers"
diff -Nru a/drivers/scsi/Makefile b/drivers/scsi/Makefile
--- a/drivers/scsi/Makefile	2005-01-10 20:11:21 -08:00
+++ b/drivers/scsi/Makefile	2005-01-10 20:11:21 -08:00
@@ -28,7 +28,7 @@
 # --------------------------
 obj-$(CONFIG_SCSI_SPI_ATTRS)	+= scsi_transport_spi.o
 obj-$(CONFIG_SCSI_FC_ATTRS) 	+= scsi_transport_fc.o
-
+obj-$(CONFIG_SCSI_ISCSI_ATTRS)	+= scsi_transport_iscsi.o
 
 obj-$(CONFIG_SCSI_AMIGA7XX)	+= amiga7xx.o	53c7xx.o
 obj-$(CONFIG_A3000_SCSI)	+= a3000.o	wd33c93.o
@@ -143,7 +143,7 @@
 
 scsi_mod-y			+= scsi.o hosts.o scsi_ioctl.o constants.o \
 				   scsicam.o scsi_error.o scsi_lib.o \
-				   scsi_scan.o scsi_syms.o scsi_sysfs.o \
+				   scsi_scan.o scsi_sysfs.o \
 				   scsi_devinfo.o
 scsi_mod-$(CONFIG_SYSCTL)	+= scsi_sysctl.o
 scsi_mod-$(CONFIG_SCSI_PROC_FS)	+= scsi_proc.o
diff -Nru a/drivers/scsi/NCR53C9x.c b/drivers/scsi/NCR53C9x.c
--- a/drivers/scsi/NCR53C9x.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/scsi/NCR53C9x.c	2005-01-10 20:11:17 -08:00
@@ -100,7 +100,7 @@
 irqreturn_t esp_intr(int irq, void *dev_id, struct pt_regs *pregs);
 
 /* Debugging routines */
-struct esp_cmdstrings {
+static struct esp_cmdstrings {
 	unchar cmdchar;
 	char *text;
 } esp_cmd_strings[] = {
@@ -505,7 +505,7 @@
 }
 
 /* This places the ESP into a known state at boot time. */
-void esp_bootup_reset(struct NCR_ESP *esp, struct ESP_regs *eregs)
+static void esp_bootup_reset(struct NCR_ESP *esp, struct ESP_regs *eregs)
 {
 	volatile unchar trash;
 
@@ -1269,17 +1269,6 @@
 		esp_exec_cmd(esp);
 
 	return 0;
-}
-
-/* Only queuing supported in this ESP driver. */
-int esp_command(Scsi_Cmnd *SCpnt)
-{
-#ifdef DEBUG_ESP
-	struct NCR_ESP *esp = (struct NCR_ESP *) SCpnt->device->host->hostdata;
-#endif
-
-	ESPLOG(("esp%d: esp_command() called...\n", esp->esp_id));
-	return -1;
 }
 
 /* Dump driver state. */
diff -Nru a/drivers/scsi/NCR53C9x.h b/drivers/scsi/NCR53C9x.h
--- a/drivers/scsi/NCR53C9x.h	2005-01-10 20:11:17 -08:00
+++ b/drivers/scsi/NCR53C9x.h	2005-01-10 20:11:17 -08:00
@@ -660,7 +660,6 @@
 extern irqreturn_t esp_intr(int, void *, struct pt_regs *);
 extern const char *esp_info(struct Scsi_Host *);
 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 *);
 extern int esp_proc_info(struct Scsi_Host *shost, char *buffer, char **start, off_t offset, int length,
diff -Nru a/drivers/scsi/NCR_D700.c b/drivers/scsi/NCR_D700.c
--- a/drivers/scsi/NCR_D700.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/scsi/NCR_D700.c	2005-01-10 20:11:16 -08:00
@@ -111,7 +111,7 @@
 MODULE_AUTHOR("James Bottomley");
 MODULE_DESCRIPTION("NCR Dual700 SCSI Driver");
 MODULE_LICENSE("GPL");
-MODULE_PARM(NCR_D700, "s");
+module_param(NCR_D700, charp, 0);
 
 static __u8 __initdata id_array[2*(MCA_MAX_SLOT_NR + 1)] =
 	{ [0 ... 2*(MCA_MAX_SLOT_NR + 1)-1] = 7 };
diff -Nru a/drivers/scsi/aacraid/README b/drivers/scsi/aacraid/README
--- a/drivers/scsi/aacraid/README	2005-01-10 20:11:16 -08:00
+++ b/drivers/scsi/aacraid/README	2005-01-10 20:11:16 -08:00
@@ -42,7 +42,7 @@
 Christoph Hellwig <hch@infradead.org>	(updates for new-style PCI probing and SCSI host registration,
 					 small cleanups/fixes)
 Matt Domsch <matt_domsch@dell.com>	(revision ioctl, adapter messages)
-Deanna Bonds <deanna_bonds@adaptec.com> (non-DASD support, PAE fibs and 64 bit, added new adaptec controllers
+Deanna Bonds                            (non-DASD support, PAE fibs and 64 bit, added new adaptec controllers
 					 added new ioctls, changed scsi interface to use new error handler,
 					 increased the number of fibs and outstanding commands to a container)
 
diff -Nru a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c
--- a/drivers/scsi/aacraid/aachba.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/scsi/aacraid/aachba.c	2005-01-10 20:11:18 -08:00
@@ -146,17 +146,17 @@
  *	Non dasd selection is handled entirely in aachba now
  */	
  
-MODULE_PARM(nondasd, "i");
-MODULE_PARM_DESC(nondasd, "Control scanning of hba for nondasd devices. 0=off, 1=on");
-MODULE_PARM(dacmode, "i");
-MODULE_PARM_DESC(dacmode, "Control whether dma addressing is using 64 bit DAC. 0=off, 1=on");
-MODULE_PARM(commit, "i");
-MODULE_PARM_DESC(commit, "Control whether a COMMIT_CONFIG is issued to the adapter for foreign arrays.\nThis is typically needed in systems that do not have a BIOS. 0=off, 1=on");
-
 static int nondasd = -1;
 static int dacmode = -1;
 
 static int commit = -1;
+
+module_param(nondasd, int, 0);
+MODULE_PARM_DESC(nondasd, "Control scanning of hba for nondasd devices. 0=off, 1=on");
+module_param(dacmode, int, 0);
+MODULE_PARM_DESC(dacmode, "Control whether dma addressing is using 64 bit DAC. 0=off, 1=on");
+module_param(commit, int, 0);
+MODULE_PARM_DESC(commit, "Control whether a COMMIT_CONFIG is issued to the adapter for foreign arrays.\nThis is typically needed in systems that do not have a BIOS. 0=off, 1=on");
 
 /**
  *	aac_get_config_status	-	check the adapter configuration
diff -Nru a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h
--- a/drivers/scsi/aacraid/aacraid.h	2005-01-10 20:11:17 -08:00
+++ b/drivers/scsi/aacraid/aacraid.h	2005-01-10 20:11:17 -08:00
@@ -444,7 +444,24 @@
  * dma mask such that fib memory will be allocated where the
  * adapter firmware can get to it.
  */
-#define AAC_QUIRK_31BIT	1
+#define AAC_QUIRK_31BIT	0x0001
+
+/*
+ * Some adapter firmware, when the raid card's cache is turned off, can not
+ * split up scatter gathers in order to deal with the limits of the
+ * underlying CHIM. This limit is 34 scatter gather elements.
+ */
+#define AAC_QUIRK_34SG	0x0002
+
+/*
+ * This adapter is a slave (no Firmware)
+ */
+#define AAC_QUIRK_SLAVE 0x0004
+
+/*
+ * This adapter is a master.
+ */
+#define AAC_QUIRK_MASTER 0x0008
 
 /*
  *	The adapter interface specs all queues to be located in the same
diff -Nru a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
--- a/drivers/scsi/aacraid/linit.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/scsi/aacraid/linit.c	2005-01-10 20:11:18 -08:00
@@ -98,31 +98,35 @@
 	{ 0x9005, 0x0285, 0x9005, 0x028b, 0, 0, 19 }, /* ASR-2025ZCR SCSI SO-DIMM PCI-X ZCR (Terminator) */
 	{ 0x9005, 0x0286, 0x9005, 0x028c, 0, 0, 20 }, /* ASR-2230S + ASR-2230SLP PCI-X (Lancer) */
 	{ 0x9005, 0x0286, 0x9005, 0x028d, 0, 0, 21 }, /* ASR-2130S (Lancer) */
-	{ 0x9005, 0x0286, 0x9005, 0x0800, 0, 0, 22 }, /* Jupiter Platform */
-	{ 0x9005, 0x0285, 0x9005, 0x028e, 0, 0, 23 }, /* ASR-2020SA SATA PCI-X ZCR (Skyhawk) */
-	{ 0x9005, 0x0285, 0x9005, 0x028f, 0, 0, 24 }, /* ASR-2025SA SATA SO-DIMM PCI-X ZCR (Terminator) */
-	{ 0x9005, 0x0285, 0x9005, 0x0290, 0, 0, 25 }, /* AAR-2410SA PCI SATA 4ch (Jaguar II) */
-	{ 0x9005, 0x0285, 0x1028, 0x0291, 0, 0, 26 }, /* CERC SATA RAID 2 PCI SATA 6ch (DellCorsair) */
-	{ 0x9005, 0x0285, 0x9005, 0x0292, 0, 0, 27 }, /* AAR-2810SA PCI SATA 8ch (Corsair-8) */
-	{ 0x9005, 0x0285, 0x9005, 0x0293, 0, 0, 28 }, /* AAR-21610SA PCI SATA 16ch (Corsair-16) */
-	{ 0x9005, 0x0285, 0x9005, 0x0294, 0, 0, 29 }, /* ESD SO-DIMM PCI-X SATA ZCR (Prowler) */
-	{ 0x9005, 0x0285, 0x0E11, 0x0295, 0, 0, 30 }, /* AAR-2610SA PCI SATA 6ch */
-	{ 0x9005, 0x0285, 0x9005, 0x0296, 0, 0, 31 }, /* ASR-2240S */
-	{ 0x9005, 0x0285, 0x9005, 0x0296, 0, 0, 32 }, /* ASR-4005SAS */
-	{ 0x9005, 0x0285, 0x9005, 0x0296, 0, 0, 33 }, /* ASR-4000SAS */
-	{ 0x9005, 0x0285, 0x9005, 0x0296, 0, 0, 34 }, /* ASR-4800SAS */
-	{ 0x9005, 0x0285, 0x9005, 0x0296, 0, 0, 35 }, /* ASR-4805SAS */
-
-	{ 0x9005, 0x0285, 0x1028, 0x0287, 0, 0, 36 }, /* Perc 320/DC*/
-	{ 0x1011, 0x0046, 0x9005, 0x0365, 0, 0, 37 }, /* Adaptec 5400S (Mustang)*/
-	{ 0x1011, 0x0046, 0x9005, 0x0364, 0, 0, 38 }, /* Adaptec 5400S (Mustang)*/
-	{ 0x1011, 0x0046, 0x9005, 0x1364, 0, 0, 39 }, /* Dell PERC2/QC */
-	{ 0x1011, 0x0046, 0x103c, 0x10c2, 0, 0, 40 }, /* HP NetRAID-4M */
-
-	{ 0x9005, 0x0285, 0x1028, PCI_ANY_ID, 0, 0, 41 }, /* Dell Catchall */
-	{ 0x9005, 0x0285, 0x17aa, PCI_ANY_ID, 0, 0, 42 }, /* Legend Catchall */
-	{ 0x9005, 0x0285, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 43 }, /* Adaptec Catch All */
-	{ 0x9005, 0x0286, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 44 }, /* Adaptec Rocket Catch All */
+	{ 0x9005, 0x0286, 0x9005, 0x029b, 0, 0, 22 }, /* AAR-2820SA (Intruder) */
+	{ 0x9005, 0x0286, 0x9005, 0x029c, 0, 0, 23 }, /* AAR-2620SA (Intruder) */
+	{ 0x9005, 0x0286, 0x9005, 0x029d, 0, 0, 24 }, /* AAR-2420SA (Intruder) */
+	{ 0x9005, 0x0286, 0x9005, 0x0800, 0, 0, 25 }, /* Callisto Jupiter Platform */
+	{ 0x9005, 0x0285, 0x9005, 0x028e, 0, 0, 26 }, /* ASR-2020SA SATA PCI-X ZCR (Skyhawk) */
+	{ 0x9005, 0x0285, 0x9005, 0x028f, 0, 0, 27 }, /* ASR-2025SA SATA SO-DIMM PCI-X ZCR (Terminator) */
+	{ 0x9005, 0x0285, 0x9005, 0x0290, 0, 0, 28 }, /* AAR-2410SA PCI SATA 4ch (Jaguar II) */
+	{ 0x9005, 0x0285, 0x1028, 0x0291, 0, 0, 29 }, /* CERC SATA RAID 2 PCI SATA 6ch (DellCorsair) */
+	{ 0x9005, 0x0285, 0x9005, 0x0292, 0, 0, 30 }, /* AAR-2810SA PCI SATA 8ch (Corsair-8) */
+	{ 0x9005, 0x0285, 0x9005, 0x0293, 0, 0, 31 }, /* AAR-21610SA PCI SATA 16ch (Corsair-16) */
+	{ 0x9005, 0x0285, 0x9005, 0x0294, 0, 0, 32 }, /* ESD SO-DIMM PCI-X SATA ZCR (Prowler) */
+	{ 0x9005, 0x0285, 0x103C, 0x3227, 0, 0, 33 }, /* AAR-2610SA PCI SATA 6ch */
+	{ 0x9005, 0x0285, 0x9005, 0x0296, 0, 0, 34 }, /* ASR-2240S (SabreExpress) */
+	{ 0x9005, 0x0285, 0x9005, 0x0297, 0, 0, 35 }, /* ASR-4005SAS */
+	{ 0x9005, 0x0285, 0x1014, 0x02F2, 0, 0, 36 }, /* IBM 8i (AvonPark) */
+	{ 0x9005, 0x0285, 0x9005, 0x0298, 0, 0, 37 }, /* ASR-4000SAS (BlackBird) */
+	{ 0x9005, 0x0285, 0x9005, 0x0299, 0, 0, 38 }, /* ASR-4800SAS (Marauder-X) */
+	{ 0x9005, 0x0285, 0x9005, 0x029A, 0, 0, 39 }, /* ASR-4805SAS (Marauder-E) */
+
+	{ 0x9005, 0x0285, 0x1028, 0x0287, 0, 0, 40 }, /* Perc 320/DC*/
+	{ 0x1011, 0x0046, 0x9005, 0x0365, 0, 0, 41 }, /* Adaptec 5400S (Mustang)*/
+	{ 0x1011, 0x0046, 0x9005, 0x0364, 0, 0, 42 }, /* Adaptec 5400S (Mustang)*/
+	{ 0x1011, 0x0046, 0x9005, 0x1364, 0, 0, 43 }, /* Dell PERC2/QC */
+	{ 0x1011, 0x0046, 0x103c, 0x10c2, 0, 0, 44 }, /* HP NetRAID-4M */
+
+	{ 0x9005, 0x0285, 0x1028, PCI_ANY_ID, 0, 0, 45 }, /* Dell Catchall */
+	{ 0x9005, 0x0285, 0x17aa, PCI_ANY_ID, 0, 0, 46 }, /* Legend Catchall */
+	{ 0x9005, 0x0285, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 47 }, /* Adaptec Catch All */
+	{ 0x9005, 0x0286, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 48 }, /* Adaptec Rocket Catch All */
 	{ 0,}
 };
 MODULE_DEVICE_TABLE(pci, aac_pci_tbl);
@@ -133,22 +137,22 @@
  * for the card.  At that time we can remove the channels from here
  */
 static struct aac_driver_ident aac_drivers[] = {
-	{ aac_rx_init, "percraid", "DELL    ", "PERCRAID        ", 2, AAC_QUIRK_31BIT }, /* PERC 2/Si (Iguana/PERC2Si) */
-	{ aac_rx_init, "percraid", "DELL    ", "PERCRAID        ", 2, AAC_QUIRK_31BIT }, /* PERC 3/Di (Opal/PERC3Di) */
-	{ aac_rx_init, "percraid", "DELL    ", "PERCRAID        ", 2, AAC_QUIRK_31BIT }, /* PERC 3/Si (SlimFast/PERC3Si */
-	{ aac_rx_init, "percraid", "DELL    ", "PERCRAID        ", 2, AAC_QUIRK_31BIT }, /* PERC 3/Di (Iguana FlipChip/PERC3DiF */
-	{ aac_rx_init, "percraid", "DELL    ", "PERCRAID        ", 2, AAC_QUIRK_31BIT }, /* PERC 3/Di (Viper/PERC3DiV) */
-	{ aac_rx_init, "percraid", "DELL    ", "PERCRAID        ", 2, AAC_QUIRK_31BIT }, /* PERC 3/Di (Lexus/PERC3DiL) */
-	{ aac_rx_init, "percraid", "DELL    ", "PERCRAID        ", 1, AAC_QUIRK_31BIT }, /* PERC 3/Di (Jaguar/PERC3DiJ) */
-	{ aac_rx_init, "percraid", "DELL    ", "PERCRAID        ", 2, AAC_QUIRK_31BIT }, /* PERC 3/Di (Dagger/PERC3DiD) */
-	{ aac_rx_init, "percraid", "DELL    ", "PERCRAID        ", 2, AAC_QUIRK_31BIT }, /* PERC 3/Di (Boxster/PERC3DiB) */
-	{ aac_rx_init, "aacraid",  "ADAPTEC ", "catapult        ", 2, AAC_QUIRK_31BIT }, /* catapult */
-	{ aac_rx_init, "aacraid",  "ADAPTEC ", "tomcat          ", 2, AAC_QUIRK_31BIT }, /* tomcat */
-	{ aac_rx_init, "aacraid",  "ADAPTEC ", "Adaptec 2120S   ", 1, AAC_QUIRK_31BIT }, /* Adaptec 2120S (Crusader) */
-	{ aac_rx_init, "aacraid",  "ADAPTEC ", "Adaptec 2200S   ", 2, AAC_QUIRK_31BIT }, /* Adaptec 2200S (Vulcan) */
-	{ aac_rx_init, "aacraid",  "ADAPTEC ", "Adaptec 2200S   ", 2, AAC_QUIRK_31BIT }, /* Adaptec 2200S (Vulcan-2m) */
-	{ aac_rx_init, "aacraid",  "Legend  ", "Legend S220     ", 1, AAC_QUIRK_31BIT }, /* Legend S220 (Legend Crusader) */
-	{ aac_rx_init, "aacraid",  "Legend  ", "Legend S230     ", 2, AAC_QUIRK_31BIT }, /* Legend S230 (Legend Vulcan) */
+	{ aac_rx_init, "percraid", "DELL    ", "PERCRAID        ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG }, /* PERC 2/Si (Iguana/PERC2Si) */
+	{ aac_rx_init, "percraid", "DELL    ", "PERCRAID        ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG }, /* PERC 3/Di (Opal/PERC3Di) */
+	{ aac_rx_init, "percraid", "DELL    ", "PERCRAID        ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG }, /* PERC 3/Si (SlimFast/PERC3Si */
+	{ aac_rx_init, "percraid", "DELL    ", "PERCRAID        ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG }, /* PERC 3/Di (Iguana FlipChip/PERC3DiF */
+	{ aac_rx_init, "percraid", "DELL    ", "PERCRAID        ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG }, /* PERC 3/Di (Viper/PERC3DiV) */
+	{ aac_rx_init, "percraid", "DELL    ", "PERCRAID        ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG }, /* PERC 3/Di (Lexus/PERC3DiL) */
+	{ aac_rx_init, "percraid", "DELL    ", "PERCRAID        ", 1, AAC_QUIRK_31BIT | AAC_QUIRK_34SG }, /* PERC 3/Di (Jaguar/PERC3DiJ) */
+	{ aac_rx_init, "percraid", "DELL    ", "PERCRAID        ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG }, /* PERC 3/Di (Dagger/PERC3DiD) */
+	{ aac_rx_init, "percraid", "DELL    ", "PERCRAID        ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG }, /* PERC 3/Di (Boxster/PERC3DiB) */
+	{ aac_rx_init, "aacraid",  "ADAPTEC ", "catapult        ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG }, /* catapult */
+	{ aac_rx_init, "aacraid",  "ADAPTEC ", "tomcat          ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG }, /* tomcat */
+	{ aac_rx_init, "aacraid",  "ADAPTEC ", "Adaptec 2120S   ", 1, AAC_QUIRK_31BIT | AAC_QUIRK_34SG }, /* Adaptec 2120S (Crusader) */
+	{ aac_rx_init, "aacraid",  "ADAPTEC ", "Adaptec 2200S   ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG }, /* Adaptec 2200S (Vulcan) */
+	{ aac_rx_init, "aacraid",  "ADAPTEC ", "Adaptec 2200S   ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG }, /* Adaptec 2200S (Vulcan-2m) */
+	{ aac_rx_init, "aacraid",  "Legend  ", "Legend S220     ", 1, AAC_QUIRK_31BIT | AAC_QUIRK_34SG }, /* Legend S220 (Legend Crusader) */
+	{ aac_rx_init, "aacraid",  "Legend  ", "Legend S230     ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG }, /* Legend S230 (Legend Vulcan) */
 
 	{ aac_rx_init, "aacraid",  "ADAPTEC ", "Adaptec 3230S   ", 2 }, /* Adaptec 3230S (Harrier) */
 	{ aac_rx_init, "aacraid",  "ADAPTEC ", "Adaptec 3240S   ", 2 }, /* Adaptec 3240S (Tornado) */
@@ -156,30 +160,34 @@
 	{ aac_rx_init, "aacraid",  "ADAPTEC ", "ASR-2025ZCR     ", 2 }, /* ASR-2025ZCR SCSI SO-DIMM PCI-X ZCR (Terminator) */
 	{ aac_rkt_init, "aacraid",  "ADAPTEC ", "ASR-2230S PCI-X ", 2 }, /* ASR-2230S + ASR-2230SLP PCI-X (Lancer) */
 	{ aac_rkt_init, "aacraid",  "ADAPTEC ", "ASR-2130S PCI-X ", 1 }, /* ASR-2130S (Lancer) */
-	{ aac_rkt_init, "aacraid",  "ADAPTEC ", "Callisto        ", 2 }, /* Jupiter Platform */
+	{ aac_rkt_init, "aacraid",  "ADAPTEC ", "AAR-2820SA      ", 1 }, /* AAR-2820SA (Intruder) */
+	{ aac_rkt_init, "aacraid",  "ADAPTEC ", "AAR-2620SA      ", 1 }, /* AAR-2620SA (Intruder) */
+	{ aac_rkt_init, "aacraid",  "ADAPTEC ", "AAR-2420SA      ", 1 }, /* AAR-2420SA (Intruder) */
+	{ aac_rkt_init, "aacraid",  "ADAPTEC ", "Callisto        ", 2, AAC_QUIRK_MASTER }, /* Jupiter Platform */
 	{ aac_rx_init, "aacraid",  "ADAPTEC ", "ASR-2020SA       ", 1 }, /* ASR-2020SA SATA PCI-X ZCR (Skyhawk) */
 	{ aac_rx_init, "aacraid",  "ADAPTEC ", "ASR-2025SA       ", 1 }, /* ASR-2025SA SATA SO-DIMM PCI-X ZCR (Terminator) */
 	{ aac_rx_init, "aacraid",  "ADAPTEC ", "AAR-2410SA SATA ", 1 }, /* AAR-2410SA PCI SATA 4ch (Jaguar II) */
 	{ aac_rx_init, "aacraid",  "DELL    ", "CERC SR2        ", 1 }, /* CERC SATA RAID 2 PCI SATA 6ch (DellCorsair) */
 	{ aac_rx_init, "aacraid",  "ADAPTEC ", "AAR-2810SA SATA ", 1 }, /* AAR-2810SA PCI SATA 8ch (Corsair-8) */
 	{ aac_rx_init, "aacraid",  "ADAPTEC ", "AAR-21610SA SATA", 1 }, /* AAR-21610SA PCI SATA 16ch (Corsair-16) */
-	{ aac_rx_init, "aacraid",  "ADAPTEC ", "SO-DIMM SATA ZCR", 1 }, /* ESD SO-DIMM PCI-X SATA ZCR (Prowler) */
+	{ aac_rx_init, "aacraid",  "ADAPTEC ", "ASR-2026ZCR     ", 1 }, /* ESD SO-DIMM PCI-X SATA ZCR (Prowler) */
 	{ aac_rx_init, "aacraid",  "ADAPTEC ", "AAR-2610SA      ", 1 }, /* SATA 6Ch (Bearcat) */
-	{ aac_rx_init, "aacraid",  "ADAPTEC ", "ASR-2240S       ", 1 }, /* ASR-2240S */
+	{ aac_rx_init, "aacraid",  "ADAPTEC ", "ASR-2240S       ", 1 }, /* ASR-2240S (SabreExpress) */
 	{ aac_rx_init, "aacraid",  "ADAPTEC ", "ASR-4005SAS     ", 1 }, /* ASR-4005SAS */
-	{ aac_rx_init, "aacraid",  "ADAPTEC ", "ASR-4000SAS     ", 1 }, /* ASR-4000SAS */
-	{ aac_rx_init, "aacraid",  "ADAPTEC ", "ASR-4800SAS     ", 1 }, /* ASR-4800SAS */
-	{ aac_rx_init, "aacraid",  "ADAPTEC ", "ASR-4805SAS     ", 1 }, /* ASR-4805SAS */
-
-	{ aac_rx_init, "percraid", "DELL    ", "PERC 320/DC     ", 2, AAC_QUIRK_31BIT }, /* Perc 320/DC*/
-	{ aac_sa_init, "aacraid",  "ADAPTEC ", "Adaptec 5400S   ", 4 }, /* Adaptec 5400S (Mustang)*/
-	{ aac_sa_init, "aacraid",  "ADAPTEC ", "AAC-364         ", 4 }, /* Adaptec 5400S (Mustang)*/
-	{ aac_sa_init, "percraid", "DELL    ", "PERCRAID        ", 4, AAC_QUIRK_31BIT }, /* Dell PERC2/QC */
-	{ aac_sa_init, "hpnraid",  "HP      ", "NetRAID         ", 4 }, /* HP NetRAID-4M */
-
-	{ aac_rx_init, "aacraid",  "DELL    ", "RAID            ", 2, AAC_QUIRK_31BIT }, /* Dell Catchall */
-	{ aac_rx_init, "aacraid",  "Legend  ", "RAID            ", 2, AAC_QUIRK_31BIT }, /* Legend Catchall */
-	{ aac_rx_init, "aacraid",  "ADAPTEC ", "RAID            ", 2, AAC_QUIRK_31BIT }, /* Adaptec Catch All */
+	{ aac_rx_init, "aacraid",  "IBM     ", "ServeRAID 8i    ", 1 }, /* IBM 8i (AvonPark) */
+	{ aac_rx_init, "aacraid",  "ADAPTEC ", "ASR-4000SAS     ", 1 }, /* ASR-4000SAS (BlackBird & AvonPark) */
+	{ aac_rx_init, "aacraid",  "ADAPTEC ", "ASR-4800SAS     ", 1 }, /* ASR-4800SAS (Marauder-X) */
+	{ aac_rx_init, "aacraid",  "ADAPTEC ", "ASR-4805SAS     ", 1 }, /* ASR-4805SAS (Marauder-E) */
+
+	{ aac_rx_init, "percraid", "DELL    ", "PERC 320/DC     ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG }, /* Perc 320/DC*/
+	{ aac_sa_init, "aacraid",  "ADAPTEC ", "Adaptec 5400S   ", 4, AAC_QUIRK_34SG }, /* Adaptec 5400S (Mustang)*/
+	{ aac_sa_init, "aacraid",  "ADAPTEC ", "AAC-364         ", 4, AAC_QUIRK_34SG }, /* Adaptec 5400S (Mustang)*/
+	{ aac_sa_init, "percraid", "DELL    ", "PERCRAID        ", 4, AAC_QUIRK_31BIT | AAC_QUIRK_34SG }, /* Dell PERC2/QC */
+	{ aac_sa_init, "hpnraid",  "HP      ", "NetRAID         ", 4, AAC_QUIRK_34SG }, /* HP NetRAID-4M */
+
+	{ aac_rx_init, "aacraid",  "DELL    ", "RAID            ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG }, /* Dell Catchall */
+	{ aac_rx_init, "aacraid",  "Legend  ", "RAID            ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG }, /* Legend Catchall */
+	{ aac_rx_init, "aacraid",  "ADAPTEC ", "RAID            ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG }, /* Adaptec Catch All */
 	{ aac_rkt_init, "aacraid", "ADAPTEC ", "RAID            ", 2 } /* Adaptec Rocket Catch All */
 };
 
@@ -350,7 +358,7 @@
 }
 
 /**
- *	aac_queuedepth		-	compute queue depths
+ *	aac_slave_configure		-	compute queue depths
  *	@sdev:	SCSI device we are considering
  *
  *	Selects queue depths for each target device based on the host adapter's
diff -Nru a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c
--- a/drivers/scsi/advansys.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/scsi/advansys.c	2005-01-10 20:11:17 -08:00
@@ -4322,12 +4322,12 @@
     int                 ioport = 0;
     int                 share_irq = FALSE;
     int                 iolen = 0;
+    struct device	*dev = NULL;
 #ifdef CONFIG_PCI
     int                 pci_init_search = 0;
     struct pci_dev      *pci_devicep[ASC_NUM_BOARD_SUPPORTED];
     int                 pci_card_cnt_max = 0;
     int                 pci_card_cnt = 0;
-    struct device	*dev = NULL;
     struct pci_dev      *pci_devp = NULL;
     int                 pci_device_id_cnt = 0;
     unsigned int        pci_device_id[ASC_PCI_DEVICE_ID_CNT] = {
@@ -8944,7 +8944,7 @@
 #ifdef CONFIG_PCI
     pci_write_config_byte(to_pci_dev(asc_dvc->cfg->dev), offset, byte_data);
 #else /* CONFIG_PCI */
-    return 0;
+    return;
 #endif /* CONFIG_PCI */
 }
 
@@ -12014,13 +12014,13 @@
     PortAddr            iop_base;
     ushort              cfg_msw;
     ushort              warn_code;
-    ushort              pci_device_id;
+    ushort              pci_device_id = 0;
 
     iop_base = asc_dvc->iop_base;
+#ifdef CONFIG_PCI
     if (asc_dvc->cfg->dev)
         pci_device_id = to_pci_dev(asc_dvc->cfg->dev)->device;
-    else
-	pci_device_id = 0;
+#endif
     warn_code = 0;
     cfg_msw = AscGetChipCfgMsw(iop_base);
     if ((cfg_msw & ASC_CFG_MSW_CLR_MASK) != 0) {
diff -Nru a/drivers/scsi/aha152x.c b/drivers/scsi/aha152x.c
--- a/drivers/scsi/aha152x.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/scsi/aha152x.c	2005-01-10 20:11:16 -08:00
@@ -353,58 +353,58 @@
 
 #if !defined(PCMCIA)
 #if defined(MODULE)
-MODULE_PARM(io, "1-2i");
-MODULE_PARM_DESC(io,"base io address of controller");
 static int io[] = {0, 0};
+module_param_array(io, int, NULL, 0);
+MODULE_PARM_DESC(io,"base io address of controller");
 
-MODULE_PARM(irq, "1-2i");
-MODULE_PARM_DESC(irq,"interrupt for controller");
 static int irq[] = {0, 0};
+module_param_array(irq, int, NULL, 0);
+MODULE_PARM_DESC(irq,"interrupt for controller");
 
-MODULE_PARM(scsiid, "1-2i");
-MODULE_PARM_DESC(scsiid,"scsi id of controller");
 static int scsiid[] = {7, 7};
+module_param_array(scsiid, int, NULL, 0);
+MODULE_PARM_DESC(scsiid,"scsi id of controller");
 
-MODULE_PARM(reconnect, "1-2i");
-MODULE_PARM_DESC(reconnect,"allow targets to disconnect");
 static int reconnect[] = {1, 1};
+module_param_array(reconnect, int, NULL, 0);
+MODULE_PARM_DESC(reconnect,"allow targets to disconnect");
 
-MODULE_PARM(parity, "1-2i");
-MODULE_PARM_DESC(parity,"use scsi parity");
 static int parity[] = {1, 1};
+module_param_array(parity, int, NULL, 0);
+MODULE_PARM_DESC(parity,"use scsi parity");
 
-MODULE_PARM(sync, "1-2i");
-MODULE_PARM_DESC(sync,"use synchronous transfers");
 static int sync[] = {1, 1};
+module_param_array(sync, int, NULL, 0);
+MODULE_PARM_DESC(sync,"use synchronous transfers");
 
-MODULE_PARM(delay, "1-2i");
-MODULE_PARM_DESC(delay,"scsi reset delay");
 static int delay[] = {DELAY_DEFAULT, DELAY_DEFAULT};
+module_param_array(delay, int, NULL, 0);
+MODULE_PARM_DESC(delay,"scsi reset delay");
 
-MODULE_PARM(exttrans, "1-2i");
-MODULE_PARM_DESC(exttrans,"use extended translation");
 static int exttrans[] = {0, 0};
+module_param_array(exttrans, int, NULL, 0);
+MODULE_PARM_DESC(exttrans,"use extended translation");
 
 #if !defined(AHA152X_DEBUG)
-MODULE_PARM(aha152x, "1-8i");
-MODULE_PARM_DESC(aha152x, "parameters for first controller");
 static int aha152x[] = {0, 11, 7, 1, 1, 0, DELAY_DEFAULT, 0};
+module_param_array(aha152x, int, NULL, 0);
+MODULE_PARM_DESC(aha152x, "parameters for first controller");
 
-MODULE_PARM(aha152x1, "1-8i");
-MODULE_PARM_DESC(aha152x1, "parameters for second controller");
 static int aha152x1[] = {0, 11, 7, 1, 1, 0, DELAY_DEFAULT, 0};
+module_param_array(aha152x1, int, NULL, 0);
+MODULE_PARM_DESC(aha152x1, "parameters for second controller");
 #else
-MODULE_PARM(debug, "1-2i");
-MODULE_PARM_DESC(debug, "flags for driver debugging");
 static int debug[] = {DEBUG_DEFAULT, DEBUG_DEFAULT};
+module_param_array(debug, int, NULL, 0);
+MODULE_PARM_DESC(debug, "flags for driver debugging");
 
-MODULE_PARM(aha152x, "1-9i");
-MODULE_PARM_DESC(aha152x, "parameters for first controller");
 static int aha152x[]   = {0, 11, 7, 1, 1, 1, DELAY_DEFAULT, 0, DEBUG_DEFAULT};
+module_param_array(aha152x, int, NULL, 0);
+MODULE_PARM_DESC(aha152x, "parameters for first controller");
 
-MODULE_PARM(aha152x1, "1-9i");
-MODULE_PARM_DESC(aha152x1, "parameters for second controller");
 static int aha152x1[]  = {0, 11, 7, 1, 1, 1, DELAY_DEFAULT, 0, DEBUG_DEFAULT};
+module_param_array(aha152x1, int, NULL, 0);
+MODULE_PARM_DESC(aha152x1, "parameters for second controller");
 #endif /* !defined(AHA152X_DEBUG) */
 #endif /* MODULE */
 
diff -Nru a/drivers/scsi/aha1542.c b/drivers/scsi/aha1542.c
--- a/drivers/scsi/aha1542.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/scsi/aha1542.c	2005-01-10 20:11:19 -08:00
@@ -131,8 +131,8 @@
 #if defined(MODULE)
 static int isapnp = 0;
 static int aha1542[] = {0x330, 11, 4, -1};
-MODULE_PARM(aha1542, "1-4i");
-MODULE_PARM(isapnp, "i");
+module_param_array(aha1542, int, NULL, 0);
+module_param(isapnp, bool, 0);
 
 static struct isapnp_device_id id_table[] __initdata = {
 	{
diff -Nru a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c
--- a/drivers/scsi/ahci.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/scsi/ahci.c	2005-01-10 20:11:17 -08:00
@@ -239,9 +239,13 @@
 
 static struct pci_device_id ahci_pci_tbl[] = {
 	{ PCI_VENDOR_ID_INTEL, 0x2652, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
-	  board_ahci },
+	  board_ahci }, /* ICH6 */
 	{ PCI_VENDOR_ID_INTEL, 0x2653, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
-	  board_ahci },
+	  board_ahci }, /* ICH6M */
+	{ PCI_VENDOR_ID_INTEL, 0x27c1, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+	  board_ahci }, /* ICH7 */
+	{ PCI_VENDOR_ID_INTEL, 0x27c5, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+	  board_ahci }, /* ICH7M */
 	{ }	/* terminate list */
 };
 
@@ -507,15 +511,6 @@
 		return;
 
 	ahci_fill_sg(qc);
-}
-
-static inline void ahci_dma_complete (struct ata_port *ap,
-                                     struct ata_queued_cmd *qc,
-				     int have_err)
-{
-	/* get drive status; clear intr; complete txn */
-	ata_qc_complete(ata_qc_from_tag(ap, ap->active_tag),
-			have_err ? ATA_ERR : 0);
 }
 
 static void ahci_intr_error(struct ata_port *ap, u32 irq_stat)
diff -Nru a/drivers/scsi/aic7xxx/aic79xx_osm.c b/drivers/scsi/aic7xxx/aic79xx_osm.c
--- a/drivers/scsi/aic7xxx/aic79xx_osm.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/scsi/aic7xxx/aic79xx_osm.c	2005-01-10 20:11:19 -08:00
@@ -407,18 +407,12 @@
  * Module information and settable options.
  */
 static char *aic79xx = NULL;
-/*
- * Just in case someone uses commas to separate items on the insmod
- * command line, we define a dummy buffer here to avoid having insmod
- * write wild stuff into our code segment
- */
-static char dummy_buffer[60] = "Please don't trounce on me insmod!!\n";
 
 MODULE_AUTHOR("Maintainer: Justin T. Gibbs <gibbs@scsiguy.com>");
 MODULE_DESCRIPTION("Adaptec Aic790X U320 SCSI Host Bus Adapter driver");
 MODULE_LICENSE("Dual BSD/GPL");
 MODULE_VERSION(AIC79XX_DRIVER_VERSION);
-MODULE_PARM(aic79xx, "s");
+module_param(aic79xx, charp, 0);
 MODULE_PARM_DESC(aic79xx,
 "period delimited, options string.\n"
 "	verbose			Enable verbose/diagnostic logging\n"
@@ -549,10 +543,6 @@
 static __inline void ahd_linux_run_device_queues(struct ahd_softc *ahd);
 static __inline void ahd_linux_unmap_scb(struct ahd_softc*, struct scb*);
 
-static __inline int ahd_linux_map_seg(struct ahd_softc *ahd, struct scb *scb,
-		 		      struct ahd_dma_seg *sg,
-				      dma_addr_t addr, bus_size_t len);
-
 static __inline void
 ahd_schedule_completeq(struct ahd_softc *ahd)
 {
@@ -711,28 +701,6 @@
 	}
 }
 
-static __inline int
-ahd_linux_map_seg(struct ahd_softc *ahd, struct scb *scb,
-		  struct ahd_dma_seg *sg, dma_addr_t addr, bus_size_t len)
-{
-	int	 consumed;
-
-	if ((scb->sg_count + 1) > AHD_NSEG)
-		panic("Too few segs for dma mapping.  "
-		      "Increase AHD_NSEG\n");
-
-	consumed = 1;
-	sg->addr = ahd_htole32(addr & 0xFFFFFFFF);
-	scb->platform_data->xfer_len += len;
-
-	if (sizeof(dma_addr_t) > 4
-	 && (ahd->flags & AHD_39BIT_ADDRESSING) != 0)
-		len |= (addr >> 8) & AHD_SG_HIGH_ADDR_MASK;
-
-	sg->len = ahd_htole32(len);
-	return (consumed);
-}
-
 /******************************** Macros **************************************/
 #define BUILD_SCSIID(ahd, cmd)						\
 	((((cmd)->device->id << TID_SHIFT) & TID) | (ahd)->our_id)
@@ -861,12 +829,6 @@
 	 */
 	if (aic79xx)
 		aic79xx_setup(aic79xx);
-	if (dummy_buffer[0] != 'P')
-		printk(KERN_WARNING
-"aic79xx: Please read the file /usr/src/linux/drivers/scsi/README.aic79xx\n"
-"aic79xx: to see the proper way to specify options to the aic79xx module\n"
-"aic79xx: Specifically, don't use any commas when passing arguments to\n"
-"aic79xx: insmod or else it might trash certain memory areas.\n");
 #endif
 
 	template->proc_name = "aic79xx";
diff -Nru a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c
--- a/drivers/scsi/aic7xxx/aic7xxx_osm.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c	2005-01-10 20:11:16 -08:00
@@ -427,12 +427,6 @@
  * Module information and settable options.
  */
 static char *aic7xxx = NULL;
-/*
- * Just in case someone uses commas to separate items on the insmod
- * command line, we define a dummy buffer here to avoid having insmod
- * write wild stuff into our code segment
- */
-static char dummy_buffer[60] = "Please don't trounce on me insmod!!\n";
 
 MODULE_AUTHOR("Maintainer: Justin T. Gibbs <gibbs@scsiguy.com>");
 MODULE_DESCRIPTION("Adaptec Aic77XX/78XX SCSI Host Bus Adapter driver");
@@ -850,12 +844,6 @@
 	 */
 	if (aic7xxx)
 		aic7xxx_setup(aic7xxx);
-	if (dummy_buffer[0] != 'P')
-		printk(KERN_WARNING
-"aic7xxx: Please read the file /usr/src/linux/drivers/scsi/README.aic7xxx\n"
-"aic7xxx: to see the proper way to specify options to the aic7xxx module\n"
-"aic7xxx: Specifically, don't use any commas when passing arguments to\n"
-"aic7xxx: insmod or else it might trash certain memory areas.\n");
 
 	template->proc_name = "aic7xxx";
 
diff -Nru a/drivers/scsi/aic7xxx_old/aic7xxx_proc.c b/drivers/scsi/aic7xxx_old/aic7xxx_proc.c
--- a/drivers/scsi/aic7xxx_old/aic7xxx_proc.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/scsi/aic7xxx_old/aic7xxx_proc.c	2005-01-10 20:11:22 -08:00
@@ -64,7 +64,7 @@
  * Description:
  *   Set parameters for the driver from the /proc filesystem.
  *-F*************************************************************************/
-int
+static int
 aic7xxx_set_info(char *buffer, int length, struct Scsi_Host *HBAptr)
 {
   proc_debug("aic7xxx_set_info(): %s\n", buffer);
diff -Nru a/drivers/scsi/aic7xxx_old.c b/drivers/scsi/aic7xxx_old.c
--- a/drivers/scsi/aic7xxx_old.c	2005-01-10 20:11:24 -08:00
+++ b/drivers/scsi/aic7xxx_old.c	2005-01-10 20:11:24 -08:00
@@ -1838,7 +1838,7 @@
  * Description:
  *   Return a string describing the driver.
  *-F*************************************************************************/
-const char *
+static const char *
 aic7xxx_info(struct Scsi_Host *dooh)
 {
   static char buffer[256];
diff -Nru a/drivers/scsi/ata_piix.c b/drivers/scsi/ata_piix.c
--- a/drivers/scsi/ata_piix.c	2005-01-10 20:11:24 -08:00
+++ b/drivers/scsi/ata_piix.c	2005-01-10 20:11:24 -08:00
@@ -60,6 +60,7 @@
 	piix4_pata		= 2,
 	ich6_sata		= 3,
 	ich6_sata_rm		= 4,
+	ich7_sata		= 5,
 };
 
 static int piix_init_one (struct pci_dev *pdev,
@@ -90,6 +91,8 @@
 	{ 0x8086, 0x2651, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata },
 	{ 0x8086, 0x2652, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_rm },
 	{ 0x8086, 0x2653, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_rm },
+	{ 0x8086, 0x27c0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich7_sata },
+	{ 0x8086, 0x27c4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich7_sata },
 
 	{ }	/* terminate list */
 };
@@ -226,6 +229,18 @@
 	},
 
 	/* ich6_sata_rm */
+	{
+		.sht		= &piix_sht,
+		.host_flags	= ATA_FLAG_SATA | ATA_FLAG_SRST |
+				  PIIX_FLAG_COMBINED | PIIX_FLAG_CHECKINTR |
+				  ATA_FLAG_SLAVE_POSS | PIIX_FLAG_AHCI,
+		.pio_mask	= 0x1f,	/* pio0-4 */
+		.mwdma_mask	= 0x07, /* mwdma0-2 */
+		.udma_mask	= 0x7f,	/* udma0-6 */
+		.port_ops	= &piix_sata_ops,
+	},
+
+	/* ich7_sata */
 	{
 		.sht		= &piix_sht,
 		.host_flags	= ATA_FLAG_SATA | ATA_FLAG_SRST |
diff -Nru a/drivers/scsi/constants.c b/drivers/scsi/constants.c
--- a/drivers/scsi/constants.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/scsi/constants.c	2005-01-10 20:11:21 -08:00
@@ -4,6 +4,7 @@
  * Additions for SCSI 2 and Linux 2.2.x by D. Gilbert (990422)
  * Additions for SCSI 3+ (SPC-3 T10/1416-D Rev 07 3 May 2002)
  *   by D. Gilbert and aeb (20020609)
+ * Additions for SPC-3 T10/1416-D Rev 21 22 Sept 2004, D. Gilbert 20041025
  */
 
 #include <linux/config.h>
@@ -15,96 +16,78 @@
 #include <scsi/scsi_device.h>
 #include <scsi/scsi_host.h>
 #include <scsi/scsi_request.h>
+#include <scsi/scsi_eh.h>
 
 
-#define CONST_COMMAND   0x01
-#define CONST_STATUS    0x02
-#define CONST_SENSE     0x04
-#define CONST_XSENSE    0x08
-#define CONST_CMND      0x10
-#define CONST_MSG       0x20
-#define CONST_HOST	0x40
-#define CONST_DRIVER	0x80
 
-static const char unknown[] = "UNKNOWN";
+/* Commands with service actions that change the command name */
+#define MAINTENANCE_IN 0xa3
+#define MAINTENANCE_OUT 0xa4
+#define SERVICE_ACTION_IN_12 0xab
+#define SERVICE_ACTION_OUT_12 0xa9
+#define SERVICE_ACTION_IN_16 0x9e
+#define SERVICE_ACTION_OUT_16 0x9f
+#define VARIABLE_LENGTH_CMD 0x7f
 
-#ifdef CONFIG_SCSI_CONSTANTS
-#ifdef CONSTANTS
-#undef CONSTANTS
-#endif
-#define CONSTANTS (CONST_COMMAND | CONST_STATUS | CONST_SENSE | CONST_XSENSE \
-		   | CONST_CMND | CONST_MSG | CONST_HOST | CONST_DRIVER)
-#else
-#define CONSTANTS 0
-#endif
-
-#if (CONSTANTS & CONST_COMMAND)
-static const char * group_0_commands[] = {
-/* 00-03 */ "Test Unit Ready", "Rezero Unit", unknown, "Request Sense",
-/* 04-07 */ "Format Unit", "Read Block Limits", unknown, "Reasssign Blocks",
-/* 08-0d */ "Read (6)", unknown, "Write (6)", "Seek (6)", unknown, unknown,
-/* 0e-12 */ unknown, "Read Reverse", "Write Filemarks", "Space", "Inquiry",  
-/* 13-16 */ "Verify", "Recover Buffered Data", "Mode Select", "Reserve",
-/* 17-1b */ "Release", "Copy", "Erase", "Mode Sense", "Start/Stop Unit",
-/* 1c-1d */ "Receive Diagnostic", "Send Diagnostic", 
-/* 1e-1f */ "Prevent/Allow Medium Removal", unknown,
-};
 
 
-static const char *group_1_commands[] = {
-/* 20-22 */  unknown, unknown, unknown,
-/* 23-28 */ unknown, "Define window parameters", "Read Capacity", 
-            unknown, unknown, "Read (10)", 
-/* 29-2d */ "Read Generation", "Write (10)", "Seek (10)", "Erase", 
+#ifdef CONFIG_SCSI_CONSTANTS
+static const char * cdb_byte0_names[] = {
+/* 00-03 */ "Test Unit Ready", "Rezero Unit/Rewind", NULL, "Request Sense",
+/* 04-07 */ "Format Unit/Medium", "Read Block Limits", NULL,
+	    "Reasssign Blocks",
+/* 08-0d */ "Read (6)", NULL, "Write (6)", "Seek (6)", NULL, NULL,
+/* 0e-12 */ NULL, "Read Reverse", "Write Filemarks", "Space", "Inquiry",  
+/* 13-16 */ "Verify (6)", "Recover Buffered Data", "Mode Select (6)",
+	    "Reserve (6)",
+/* 17-1a */ "Release (6)", "Copy", "Erase", "Mode Sense (6)", 
+/* 1b-1d */ "Start/Stop Unit", "Receive Diagnostic", "Send Diagnostic", 
+/* 1e-1f */ "Prevent/Allow Medium Removal", NULL,
+/* 20-22 */  NULL, NULL, NULL,
+/* 23-28 */ "Read Format Capacities", "Set Window",
+	    "Read Capacity (10)", NULL, NULL, "Read (10)", 
+/* 29-2d */ "Read Generation", "Write (10)", "Seek (10)", "Erase (10)", 
             "Read updated block", 
-/* 2e-31 */ "Write Verify","Verify", "Search High", "Search Equal", 
-/* 32-34 */ "Search Low", "Set Limits", "Prefetch or Read Position", 
-/* 35-37 */ "Synchronize Cache","Lock/Unlock Cache", "Read Defect Data", 
+/* 2e-31 */ "Write Verify (10)", "Verify (10)", "Search High", "Search Equal", 
+/* 32-34 */ "Search Low", "Set Limits", "Prefetch/Read Position", 
+/* 35-37 */ "Synchronize Cache (10)", "Lock/Unlock Cache (10)",
+	    "Read Defect Data(10)", 
 /* 38-3c */ "Medium Scan", "Compare", "Copy Verify", "Write Buffer", 
             "Read Buffer", 
-/* 3d-3f */ "Update Block", "Read Long",  "Write Long",
-};
-
-
-static const char *group_2_commands[] = {
-/* 40-41 */ "Change Definition", "Write Same",
-/* 42-48 */ "Read sub-channel", "Read TOC", "Read header",
+/* 3d-3f */ "Update Block", "Read Long (10)",  "Write Long (10)",
+/* 40-41 */ "Change Definition", "Write Same (10)",
+/* 42-48 */ "Read sub-channel", "Read TOC/PMA/ATIP", "Read density support",
             "Play audio (10)", "Get configuration", "Play audio msf",
             "Play audio track/index",
 /* 49-4f */ "Play track relative (10)", "Get event status notification",
             "Pause/resume", "Log Select", "Log Sense", "Stop play/scan",
-            unknown,
+            NULL,
 /* 50-55 */ "Xdwrite", "Xpwrite, Read disk info", "Xdread, Read track info",
-            "Reserve track", "Send OPC onfo", "Mode Select (10)",
+            "Reserve track", "Send OPC info", "Mode Select (10)",
 /* 56-5b */ "Reserve (10)", "Release (10)", "Repair track", "Read master cue",
             "Mode Sense (10)", "Close track/session",
 /* 5c-5f */ "Read buffer capacity", "Send cue sheet", "Persistent reserve in",
             "Persistent reserve out",
-};
-
-
-/* The following are 16 byte commands in group 4 */
-static const char *group_4_commands[] = {
+/* 60-67 */ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+/* 68-6f */ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+/* 70-77 */ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+/* 78-7f */ NULL, NULL, NULL, NULL, NULL, NULL, NULL, "Variable length",
 /* 80-84 */ "Xdwrite (16)", "Rebuild (16)", "Regenerate (16)", "Extended copy",
             "Receive copy results",
 /* 85-89 */ "Memory Export In (16)", "Access control in", "Access control out",
             "Read (16)", "Memory Export Out (16)",
-/* 8a-8f */ "Write (16)", unknown, "Read attributes", "Write attributes",
+/* 8a-8f */ "Write (16)", NULL, "Read attributes", "Write attributes",
             "Write and verify (16)", "Verify (16)",
 /* 90-94 */ "Pre-fetch (16)", "Synchronize cache (16)",
-            "Lock/unlock cache (16)", "Write same (16)", unknown,
-/* 95-99 */ unknown, unknown, unknown, unknown, unknown,
-/* 9a-9f */ unknown, unknown, unknown, unknown, "Service action in",
-            "Service action out",
-};
-
-/* The following are 12 byte commands in group 5 */
-static const char *group_5_commands[] = {
-/* a0-a5 */ "Report luns", "Blank", "Send event", "Maintenance (in)",
-            "Maintenance (out)", "Move medium/play audio(12)",
+            "Lock/unlock cache (16)", "Write same (16)", NULL,
+/* 95-99 */ NULL, NULL, NULL, NULL, NULL,
+/* 9a-9f */ NULL, NULL, NULL, NULL, "Service action in (16)",
+            "Service action out (16)",
+/* a0-a5 */ "Report luns", "Blank", "Send event", "Maintenance in",
+            "Maintenance out", "Move medium/play audio(12)",
 /* a6-a9 */ "Exchange medium", "Move medium attached", "Read(12)",
             "Play track relative(12)",
-/* aa-ae */ "Write(12)", unknown, "Erase(12), Get Performance",
+/* aa-ae */ "Write(12)", NULL, "Erase(12), Get Performance",
             "Read DVD structure", "Write and verify(12)",
 /* af-b1 */ "Verify(12)", "Search data high(12)", "Search data equal(12)",
 /* b2-b4 */ "Search data low(12)", "Set limits(12)",
@@ -112,57 +95,279 @@
 /* b5-b6 */ "Request volume element address", "Send volume tag, set streaming",
 /* b7-b9 */ "Read defect data(12)", "Read element status", "Read CD msf",
 /* ba-bc */ "Redundancy group (in), Scan",
-            "Redundancy group (out), Set cd-rom speed", "Spare (in), Play cd",
-/* bd-bf */ "Spare (out), Mechanism status", "Volume set (in), Read cd",
-            "Volume set (out), Send DVD structure",
+            "Redundancy group (out), Set cd-rom speed", "Spare in, Play cd",
+/* bd-bf */ "Spare out, Mechanism status", "Volume set in, Read cd",
+            "Volume set out, Send DVD structure",
+};
+
+struct value_name_pair {
+	int value;
+	const char * name;
+};
+
+static const struct value_name_pair maint_in_arr[] = {
+	{0x5, "Report device identifier"},
+	{0xa, "Report target port groups"},
+	{0xb, "Report aliases"},
+	{0xc, "Report supported operation codes"},
+	{0xd, "Report supported task management functions"},
+	{0xe, "Report priority"},
+};
+#define MAINT_IN_SZ \
+        (int)(sizeof(maint_in_arr) / sizeof(maint_in_arr[0]))
+
+static const struct value_name_pair maint_out_arr[] = {
+	{0x6, "Set device identifier"},
+	{0xa, "Set target port groups"},
+	{0xb, "Change aliases"},
+	{0xe, "Set priority"},
 };
+#define MAINT_OUT_SZ \
+        (int)(sizeof(maint_out_arr) / sizeof(maint_out_arr[0]))
 
+static const struct value_name_pair serv_in12_arr[] = {
+	{0x1, "Read media serial number"},
+};
+#define SERV_IN12_SZ  \
+        (int)(sizeof(serv_in12_arr) / sizeof(serv_in12_arr[0]))
 
+static const struct value_name_pair serv_out12_arr[] = {
+	{-1, "dummy entry"},
+};
+#define SERV_OUT12_SZ \
+        (int)(sizeof(serv_out12_arr) / sizeof(serv_in12_arr[0]))
 
-#define group(opcode) (((opcode) >> 5) & 7)
+static const struct value_name_pair serv_in16_arr[] = {
+	{0x10, "Read capacity(16)"},
+	{0x11, "Read long(16)"},
+};
+#define SERV_IN16_SZ  \
+        (int)(sizeof(serv_in16_arr) / sizeof(serv_in16_arr[0]))
 
-#define RESERVED_GROUP  0
-#define VENDOR_GROUP    1
+static const struct value_name_pair serv_out16_arr[] = {
+	{0x11, "Write long(16)"},
+	{0x1f, "Notify data transfer device(16)"},
+};
+#define SERV_OUT16_SZ \
+        (int)(sizeof(serv_out16_arr) / sizeof(serv_in16_arr[0]))
 
-static const char **commands[] = {
-    group_0_commands, group_1_commands, group_2_commands, 
-    (const char **) RESERVED_GROUP, group_4_commands, 
-    group_5_commands, (const char **) VENDOR_GROUP, 
-    (const char **) VENDOR_GROUP
+static const struct value_name_pair variable_length_arr[] = {
+	{0x1, "Rebuild(32)"},
+	{0x2, "Regenerate(32)"},
+	{0x3, "Xdread(32)"},
+	{0x4, "Xdwrite(32)"},
+	{0x5, "Xdwrite extended(32)"},
+	{0x6, "Xpwrite(32)"},
+	{0x7, "Xdwriteread(32)"},
+	{0x8, "Xdwrite extended(64)"},
+	{0x9, "Read(32)"},
+	{0xa, "Verify(32)"},
+	{0xb, "Write(32)"},
+	{0xc, "Write an verify(32)"},
+	{0xd, "Write same(32)"},
+	{0x8801, "Format OSD"},
+	{0x8802, "Create (osd)"},
+	{0x8803, "List (osd)"},
+	{0x8805, "Read (osd)"},
+	{0x8806, "Write (osd)"},
+	{0x8807, "Append (osd)"},
+	{0x8808, "Flush (osd)"},
+	{0x880a, "Remove (osd)"},
+	{0x880b, "Create partition (osd)"},
+	{0x880c, "Remove partition (osd)"},
+	{0x880e, "Get attributes (osd)"},
+	{0x880f, "Set attributes (osd)"},
+	{0x8812, "Create and write (osd)"},
+	{0x8815, "Create collection (osd)"},
+	{0x8816, "Remove collection (osd)"},
+	{0x8817, "List collection (osd)"},
+	{0x8818, "Set key (osd)"},
+	{0x8819, "Set master key (osd)"},
+	{0x881a, "Flush collection (osd)"},
+	{0x881b, "Flush partition (osd)"},
+	{0x881c, "Flush OSD"},
+	{0x8f7e, "Perform SCSI command (osd)"},
+	{0x8f7f, "Perform task management function (osd)"},
 };
+#define VARIABLE_LENGTH_SZ \
+        (int)(sizeof(variable_length_arr) / sizeof(variable_length_arr[0]))
 
-static const char reserved[] = "RESERVED";
-static const char vendor[] = "VENDOR SPECIFIC";
+static const char * get_sa_name(const struct value_name_pair * arr,
+			        int arr_sz, int service_action)
+{
+	int k;
 
-static void print_opcode(int opcode) {
-    const char **table = commands[ group(opcode) ];
-    switch ((unsigned long) table) {
-    case RESERVED_GROUP:
-	printk("%s(0x%02x) ", reserved, opcode); 
-	break;
-    case VENDOR_GROUP:
-	printk("%s(0x%02x) ", vendor, opcode); 
-	break;
-    default:
-	if (table[opcode & 0x1f] != unknown)
-	    printk("%s ",table[opcode & 0x1f]);
-	else
-	    printk("%s(0x%02x) ", unknown, opcode);
-	break;
-    }
+	for (k = 0; k < arr_sz; ++k, ++arr) {
+		if (service_action == arr->value)
+			break;
+	}
+	return (k < arr_sz) ? arr->name : NULL;
 }
-#else /* CONST & CONST_COMMAND */
-static void print_opcode(int opcode) {
-    printk("0x%02x ", opcode);
+
+/* attempt to guess cdb length if cdb_len==0 . No trailing linefeed. */
+static void print_opcode_name(unsigned char * cdbp, int cdb_len,
+			      int start_of_line)
+{
+	int sa, len, cdb0;
+	const char * name;
+	const char * leadin = start_of_line ? KERN_INFO : "";
+
+	cdb0 = cdbp[0];
+	switch(cdb0) {
+	case VARIABLE_LENGTH_CMD:
+		len = cdbp[7] + 8;
+		if (len < 10) {
+			printk("%sshort variable length command, "
+			       "len=%d ext_len=%d", leadin, len, cdb_len);
+			break;
+		}
+		sa = (cdbp[8] << 8) + cdbp[9];
+		name = get_sa_name(maint_in_arr, MAINT_IN_SZ, sa);
+		if (name) {
+			printk("%s%s", leadin, name);
+			if ((cdb_len > 0) && (len != cdb_len))
+				printk(", in_cdb_len=%d, ext_len=%d",
+				       len, cdb_len);
+		} else {
+			printk("%scdb[0]=0x%x, sa=0x%x", leadin, cdb0, sa);
+			if ((cdb_len > 0) && (len != cdb_len))
+				printk(", in_cdb_len=%d, ext_len=%d",
+				       len, cdb_len);
+		}
+		break;
+	case MAINTENANCE_IN:
+		sa = cdbp[1] & 0x1f;
+		name = get_sa_name(maint_in_arr, MAINT_IN_SZ, sa);
+		if (name)
+			printk("%s%s", leadin, name);
+		else
+			printk("%scdb[0]=0x%x, sa=0x%x", leadin, cdb0, sa);
+		break;
+	case MAINTENANCE_OUT:
+		sa = cdbp[1] & 0x1f;
+		name = get_sa_name(maint_out_arr, MAINT_OUT_SZ, sa);
+		if (name)
+			printk("%s%s", leadin, name);
+		else
+			printk("%scdb[0]=0x%x, sa=0x%x", leadin, cdb0, sa);
+		break;
+	case SERVICE_ACTION_IN_12:
+		sa = cdbp[1] & 0x1f;
+		name = get_sa_name(serv_in12_arr, SERV_IN12_SZ, sa);
+		if (name)
+			printk("%s%s", leadin, name);
+		else
+			printk("%scdb[0]=0x%x, sa=0x%x", leadin, cdb0, sa);
+		break;
+	case SERVICE_ACTION_OUT_12:
+		sa = cdbp[1] & 0x1f;
+		name = get_sa_name(serv_out12_arr, SERV_OUT12_SZ, sa);
+		if (name)
+			printk("%s%s", leadin, name);
+		else
+			printk("%scdb[0]=0x%x, sa=0x%x", leadin, cdb0, sa);
+		break;
+	case SERVICE_ACTION_IN_16:
+		sa = cdbp[1] & 0x1f;
+		name = get_sa_name(serv_in16_arr, SERV_IN16_SZ, sa);
+		if (name)
+			printk("%s%s", leadin, name);
+		else
+			printk("%scdb[0]=0x%x, sa=0x%x", leadin, cdb0, sa);
+		break;
+	case SERVICE_ACTION_OUT_16:
+		sa = cdbp[1] & 0x1f;
+		name = get_sa_name(serv_out16_arr, SERV_OUT16_SZ, sa);
+		if (name)
+			printk("%s%s", leadin, name);
+		else
+			printk("%scdb[0]=0x%x, sa=0x%x", leadin, cdb0, sa);
+		break;
+	default:
+		if (cdb0 < 0xc0) {
+			name = cdb_byte0_names[cdb0];
+			if (name)
+				printk("%s%s", leadin, name);
+			else
+				printk("%scdb[0]=0x%x (reserved)",
+				       leadin, cdb0);
+		} else
+			printk("%scdb[0]=0x%x (vendor)", leadin, cdb0);
+		break;
+	}
+}
+
+#else /* ifndef CONFIG_SCSI_CONSTANTS */
+
+static void print_opcode_name(unsigned char * cdbp, int cdb_len,
+			      int start_of_line)
+{
+	int sa, len, cdb0;
+	const char * leadin = start_of_line ? KERN_INFO : "";
+
+	cdb0 = cdbp[0];
+	switch(cdb0) {
+	case VARIABLE_LENGTH_CMD:
+		len = cdbp[7] + 8;
+		if (len < 10) {
+			printk("%sshort opcode=0x%x command, len=%d "
+			       "ext_len=%d", leadin, cdb0, len, cdb_len);
+			break;
+		}
+		sa = (cdbp[8] << 8) + cdbp[9];
+		printk("%scdb[0]=0x%x, sa=0x%x", leadin, cdb0, sa);
+		if (len != cdb_len)
+			printk(", in_cdb_len=%d, ext_len=%d", len, cdb_len);
+		break;
+	case MAINTENANCE_IN:
+	case MAINTENANCE_OUT:
+	case SERVICE_ACTION_IN_12:
+	case SERVICE_ACTION_OUT_12:
+	case SERVICE_ACTION_IN_16:
+	case SERVICE_ACTION_OUT_16:
+		sa = cdbp[1] & 0x1f;
+		printk("%scdb[0]=0x%x, sa=0x%x", leadin, cdb0, sa);
+		break;
+	default:
+		if (cdb0 < 0xc0)
+			printk("%scdb[0]=0x%x", leadin, cdb0);
+		else
+			printk("%scdb[0]=0x%x (vendor)", leadin, cdb0);
+		break;
+	}
 }
 #endif  
 
-void __scsi_print_command (unsigned char *command) {
-    int i,s;
-    print_opcode(command[0]);
-    for ( i = 1, s = COMMAND_SIZE(command[0]); i < s; ++i) 
-	printk("%02x ", command[i]);
-    printk("\n");
+void __scsi_print_command(unsigned char *command)
+{
+	int k, len;
+
+	print_opcode_name(command, 0, 1);
+	if (VARIABLE_LENGTH_CMD == command[0])
+		len = command[7] + 8;
+	else
+		len = COMMAND_SIZE(command[0]);
+	/* print out all bytes in cdb */
+	for (k = 0; k < len; ++k) 
+		printk(" %02x", command[k]);
+	printk("\n");
+}
+EXPORT_SYMBOL(__scsi_print_command);
+
+/* This function (perhaps with the addition of peripheral device type)
+ * is more approriate than __scsi_print_command(). Perhaps that static
+ * can be dropped later if it replaces the __scsi_print_command version.
+ */
+static void scsi_print_cdb(unsigned char *cdb, int cdb_len, int start_of_line)
+{
+	int k;
+
+	print_opcode_name(cdb, cdb_len, start_of_line);
+	/* print out all bytes in cdb */
+	printk(":");
+	for (k = 0; k < cdb_len; ++k) 
+		printk(" %02x", cdb[k]);
+	printk("\n");
 }
 
 /**
@@ -177,7 +382,7 @@
  **/
 void
 scsi_print_status(unsigned char scsi_status) {
-#if (CONSTANTS & CONST_STATUS)
+#ifdef CONFIG_SCSI_CONSTANTS
 	const char * ccp;
 
 	switch (scsi_status) {
@@ -194,13 +399,14 @@
 	case 0x40: ccp = "Task Aborted"; break;
 	default:   ccp = "Unknown status";
 	}
-	printk("%s", ccp);
+	printk(KERN_INFO "%s", ccp);
 #else
-	printk("0x%0x", scsi_status);
+	printk(KERN_INFO "0x%0x", scsi_status);
 #endif
 }
+EXPORT_SYMBOL(scsi_print_status);
 
-#if (CONSTANTS & CONST_XSENSE)
+#ifdef CONFIG_SCSI_CONSTANTS
 
 struct error_info {
 	unsigned short code12;	/* 0x0302 looks better than 0x03,0x02 */
@@ -253,6 +459,8 @@
 	{0x040C, "Logical unit not accessible, target port in unavailable "
 	 "state"},
 	{0x0410, "Logical unit not ready, auxiliary memory not accessible"},
+	{0x0411, "Logical unit not ready, notify (enable spinup) required"},
+	{0x0412, "Logical unit not ready, offline"},
 
 	{0x0500, "Logical unit does not respond to selection"},
 
@@ -300,7 +508,14 @@
 	{0x0D04, "Copy target device data underrun"},
 	{0x0D05, "Copy target device data overrun"},
 
+	{0x0E00, "Invalid information unit"},
+	{0x0E01, "Information unit too short"},
+	{0x0E02, "Information unit too long"},
+
 	{0x1000, "Id CRC or ECC error"},
+	{0x1001, "Data block guard check failed"},
+	{0x1002, "Data block application tag check failed"},
+	{0x1003, "Data block reference tag check failed"},
 
 	{0x1100, "Unrecovered read error"},
 	{0x1101, "Read retries exhausted"},
@@ -407,8 +622,10 @@
 
 	{0x2400, "Invalid field in cdb"},
 	{0x2401, "CDB decryption error"},
-	{0x2402, "Obsolete"},
-	{0x2403, "Obsolete"},
+	{0x2404, "Security audit value frozen"},
+	{0x2405, "Security working key frozen"},
+	{0x2406, "Nonce not unique"},
+	{0x2407, "Nonce timestamp out of range"},
 
 	{0x2500, "Logical unit not supported"},
 
@@ -426,6 +643,8 @@
 	{0x260B, "Inline data length exceeded"},
 	{0x260C, "Invalid operation for copy source or destination"},
 	{0x260D, "Copy segment granularity violation"},
+	{0x260E, "Invalid parameter while port is enabled"},
+	{0x260F, "Invalid data-out buffer integrity"},
 
 	{0x2700, "Write protected"},
 	{0x2701, "Hardware write protected"},
@@ -455,6 +674,8 @@
 	{0x2A05, "Registrations preempted"},
 	{0x2A06, "Asymmetric access state changed"},
 	{0x2A07, "Implicit asymmetric access state transition failed"},
+	{0x2A08, "Priority changed"},
+	{0x2A09, "Capacity data has changed"},
 
 	{0x2B00, "Copy cannot execute since host cannot disconnect"},
 
@@ -468,6 +689,8 @@
 	{0x2C07, "Previous busy status"},
 	{0x2C08, "Previous task set full status"},
 	{0x2C09, "Previous reservation conflict status"},
+	{0x2C0A, "Partition or collection contains user objects"},
+	{0x2C0B, "Not reserved"},
 
 	{0x2D00, "Overwrite error on update in place"},
 
@@ -485,6 +708,8 @@
 	{0x3007, "Cleaning failure"},
 	{0x3008, "Cannot write - application code mismatch"},
 	{0x3009, "Current session not fixated for append"},
+	{0x300A, "Cleaning request rejected"},
+	{0x300C, "WORM medium, overwrite attempted"},
 	{0x3010, "Medium not formatted"},
 
 	{0x3100, "Medium format corrupted"},
@@ -503,6 +728,7 @@
 	{0x3502, "Enclosure services unavailable"},
 	{0x3503, "Enclosure services transfer failure"},
 	{0x3504, "Enclosure services transfer refused"},
+	{0x3505, "Enclosure services checksum error"},
 
 	{0x3600, "Ribbon, ink, or toner failure"},
 
@@ -543,6 +769,7 @@
 	{0x3B14, "Medium magazine locked"},
 	{0x3B15, "Medium magazine unlocked"},
 	{0x3B16, "Mechanical positioning or changer error"},
+	{0x3B17, "Read past end of user object"},
 
 	{0x3D00, "Invalid bits in identify message"},
 
@@ -570,14 +797,12 @@
 	{0x3F0F, "Echo buffer overwritten"},
 	{0x3F10, "Medium loadable"},
 	{0x3F11, "Medium auxiliary memory accessible"},
-
-#if 0
-	{0x40NN, "Ram failure"},
-	{0x40NN, "Diagnostic failure on component nn"},
-	{0x41NN, "Data path failure"},
-	{0x42NN, "Power-on or self-test failure"},
-#endif
-
+/*
+ *	{0x40NN, "Ram failure"},
+ *	{0x40NN, "Diagnostic failure on component nn"},
+ *	{0x41NN, "Data path failure"},
+ *	{0x42NN, "Power-on or self-test failure"},
+ */
 	{0x4300, "Message error"},
 
 	{0x4400, "Internal target failure"},
@@ -592,6 +817,7 @@
 	{0x4703, "Information unit CRC error detected"},
 	{0x4704, "Asynchronous information protection error detected"},
 	{0x4705, "Protocol service CRC error"},
+	{0x477f, "Some commands cleared by iSCSI Protocol event"},
 
 	{0x4800, "Initiator detected error message received"},
 
@@ -600,13 +826,17 @@
 	{0x4A00, "Command phase error"},
 
 	{0x4B00, "Data phase error"},
+	{0x4B01, "Invalid target port transfer tag received"},
+	{0x4B02, "Too much write data"},
+	{0x4B03, "Ack/nak timeout"},
+	{0x4B04, "Nak received"},
+	{0x4B05, "Data offset error"},
+	{0x4B06, "Initiator response timeout"},
 
 	{0x4C00, "Logical unit failed self-configuration"},
-
-#if 0
-	{0x4DNN, "Tagged overlapped commands (nn = queue tag)"},
-#endif
-
+/*
+ *	{0x4DNN, "Tagged overlapped commands (nn = queue tag)"},
+ */
 	{0x4E00, "Overlapped commands attempted"},
 
 	{0x5000, "Write append error"},
@@ -631,6 +861,7 @@
 	{0x5504, "Insufficient registration resources"},
 	{0x5505, "Insufficient access control resources"},
 	{0x5506, "Auxiliary memory out of space"},
+	{0x5507, "Quota error"},
 
 	{0x5700, "Unable to recover table-of-contents"},
 
@@ -806,11 +1037,9 @@
 	{0x6F03, "Read of scrambled sector without authentication"},
 	{0x6F04, "Media region code is mismatched to logical unit region"},
 	{0x6F05, "Drive region must be permanent/region reset count error"},
-
-#if 0
-	{0x70NN, "Decompression exception short algorithm id of nn"},
-#endif
-
+/*
+ *	{0x70NN, "Decompression exception short algorithm id of nn"},
+ */
 	{0x7100, "Decompression exception long algorithm id"},
 
 	{0x7200, "Session fixation error"},
@@ -845,9 +1074,7 @@
 	{0x70,0x00,0xff,"Decompression exception short algorithm id of %x"},
 	{0, 0, 0, NULL}
 };
-#endif
 
-#if (CONSTANTS & CONST_SENSE)
 /* description of the sense key values */
 static const char *snstext[] = {
 	"No Sense",	    /* 0: There is no sense information */
@@ -858,11 +1085,11 @@
 	"Hardware Error",   /* 4: Controller or device failure */
 	"Illegal Request",  /* 5: Error in request */
 	"Unit Attention",   /* 6: Removable medium was changed, or
-				  the target has been reset */
+				  the target has been reset, or ... */
 	"Data Protect",	    /* 7: Access to the data is blocked */
 	"Blank Check",	    /* 8: Reached unexpected written or unwritten
 				  region of the medium */
-	"Vendor Specific",  /* 9: Vendor specific */
+	"Vendor Specific(9)",
 	"Copy Aborted",	    /* A: COPY or COMPARE was aborted */
 	"Aborted Command",  /* B: The target aborted the command */
 	"Equal",	    /* C: A SEARCH DATA command found data equal */
@@ -875,20 +1102,21 @@
 /* Get sense key string or NULL if not available */
 const char *
 scsi_sense_key_string(unsigned char key) {
-#if (CONSTANTS & CONST_SENSE)
+#ifdef CONFIG_SCSI_CONSTANTS
 	if (key <= 0xE)
 		return snstext[key];
 #endif
 	return NULL;
 }
+EXPORT_SYMBOL(scsi_sense_key_string);
 
 /*
- * Get extended sense key string or NULL if not available.
- * This string may contain a %x and must be printed with ascq as arg.
+ * Get additional sense code string or NULL if not available.
+ * This string may contain a "%x" and should be printed with ascq as arg.
  */
 const char *
 scsi_extd_sense_format(unsigned char asc, unsigned char ascq) {
-#if (CONSTANTS & CONST_XSENSE)
+#ifdef CONFIG_SCSI_CONSTANTS
 	int i;
 	unsigned short code = ((asc << 8) | ascq);
 
@@ -903,18 +1131,27 @@
 #endif
 	return NULL;
 }
+EXPORT_SYMBOL(scsi_extd_sense_format);
 
-/* Print extended sense information */
+/* Print extended sense information; no leadin, no linefeed */
 static void
-scsi_show_extd_sense(unsigned char asc, unsigned char ascq) {
+scsi_show_extd_sense(unsigned char asc, unsigned char ascq)
+{
 	const char *extd_sense_fmt = scsi_extd_sense_format(asc, ascq);
 
 	if (extd_sense_fmt) {
-		printk("Additional sense: ");
-		printk(extd_sense_fmt, ascq);
-		printk("\n");
+		if (strstr(extd_sense_fmt, "%x")) {
+			printk("Additional sense: ");
+			printk(extd_sense_fmt, ascq);
+		} else
+			printk("Additional sense: %s", extd_sense_fmt);
 	} else {
-		printk("ASC=%2x ASCQ=%2x\n", asc, ascq);
+		if (asc >= 0x80)
+			printk("<<vendor>> ASC=0x%x ASCQ=0x%x", asc, ascq);
+		if (ascq >= 0x80)
+			printk("ASC=0x%x <<vendor>> ASCQ=0x%x", asc, ascq);
+		else
+			printk("ASC=0x%x ASCQ=0x%x", asc, ascq);
 	}
 }
 
@@ -922,112 +1159,117 @@
 static void
 print_sense_internal(const char *devclass, 
 		     const unsigned char *sense_buffer,
+		     int sense_len,
 		     struct request *req)
 {
-	int s, sense_class, valid, code, info;
-	const char *error = NULL;
-	unsigned char asc, ascq;
+	int k, num, res;
+	unsigned int info;
+	const char *error;
 	const char *sense_txt;
 	const char *name = req->rq_disk ? req->rq_disk->disk_name : devclass;
+	struct scsi_sense_hdr ssh;
     
-	sense_class = (sense_buffer[0] >> 4) & 0x07;
-	code = sense_buffer[0] & 0xf;
-	valid = sense_buffer[0] & 0x80;
-    
-	if (sense_class == 7) {	/* extended sense data */
-		s = sense_buffer[7] + 8;
-		if (s > SCSI_SENSE_BUFFERSIZE)
-			s = SCSI_SENSE_BUFFERSIZE;
-	
-		info = ((sense_buffer[3] << 24) | (sense_buffer[4] << 16) |
-			(sense_buffer[5] << 8) | sense_buffer[6]);
-		if (info || valid) {
-			printk("Info fld=0x%x", info);
-			if (!valid)	/* info data not according to standard */
-				printk(" (nonstd)");
-			printk(", ");
-		}
-		if (sense_buffer[2] & 0x80)
-			printk( "FMK ");	/* current command has read a filemark */
-		if (sense_buffer[2] & 0x40)
-			printk( "EOM ");	/* end-of-medium condition exists */
-		if (sense_buffer[2] & 0x20)
-			printk( "ILI ");	/* incorrect block length requested */
-	
-		switch (code) {
-		case 0x0:
-			error = "Current";	/* error concerns current command */
-			break;
-		case 0x1:
-			error = "Deferred";	/* error concerns some earlier command */
-			/* e.g., an earlier write to disk cache succeeded, but
-			   now the disk discovers that it cannot write the data */
-			break;
-		default:
-			error = "Invalid";
+	res = scsi_normalize_sense(sense_buffer, sense_len, &ssh);
+	if (0 == res) {
+		/* this may be SCSI-1 sense data */
+		num = (sense_len < 32) ? sense_len : 32;
+		printk(KERN_INFO "Unrecognized sense data (in hex):");
+		for (k = 0; k < num; ++k) {
+			if (0 == (k % 16)) {
+				printk("\n");
+				printk(KERN_INFO "        ");
+			}
+			printk("%02x ", sense_buffer[k]);
 		}
+		printk("\n");
+		return;
+	}
 
-		printk("%s ", error);
+	/* An example of deferred is when an earlier write to disk cache
+	 * succeeded, but now the disk discovers that it cannot write the
+	 * data to the magnetic media.
+	 */
+	error = scsi_sense_is_deferred(&ssh) ? 
+			"<<DEFERRED>>" : "Current";
+	printk(KERN_INFO "%s: %s", name, error);
+	if (ssh.response_code >= 0x72)
+		printk(" [descriptor]");
+
+	sense_txt = scsi_sense_key_string(ssh.sense_key);
+	if (sense_txt)
+		printk(": sense key: %s\n", sense_txt);
+	else
+		printk(": sense key=0x%x\n", ssh.sense_key);
+	printk(KERN_INFO "    ");
+	scsi_show_extd_sense(ssh.asc, ssh.ascq);
+	printk("\n");
 
-		sense_txt = scsi_sense_key_string(sense_buffer[2]);
-		if (sense_txt)
-			printk("%s: sense key %s\n", name, sense_txt);
-		else
-			printk("%s: sense = %2x %2x\n", name,
-			       sense_buffer[0], sense_buffer[2]);
+	if (ssh.response_code < 0x72) {
+		/* only decode extras for "fixed" format now */
+		char buff[80];
+		int blen, fixed_valid;
 
-		asc = ascq = 0;
-		if (sense_buffer[7] + 7 >= 13) {
-			asc = sense_buffer[12];
-			ascq = sense_buffer[13];
+		fixed_valid = sense_buffer[0] & 0x80;
+		info = ((sense_buffer[3] << 24) | (sense_buffer[4] << 16) |
+			(sense_buffer[5] << 8) | sense_buffer[6]);
+		res = 0;
+		memset(buff, 0, sizeof(buff));
+		blen = sizeof(buff) - 1;
+		if (fixed_valid)
+			res += snprintf(buff + res, blen - res,
+					"Info fld=0x%x", info);
+		if (sense_buffer[2] & 0x80) {
+			/* current command has read a filemark */
+			if (res > 0)
+				res += snprintf(buff + res, blen - res, ", ");
+			res += snprintf(buff + res, blen - res, "FMK");
 		}
-		if (asc || ascq)
-			scsi_show_extd_sense(asc, ascq);
-
-	} else {	/* non-extended sense data */
-
-		/*
-		 * Standard says:
-		 *    sense_buffer[0] & 0200 : address valid
-		 *    sense_buffer[0] & 0177 : vendor-specific error code
-		 *    sense_buffer[1] & 0340 : vendor-specific
-		 *    sense_buffer[1..3] : 21-bit logical block address
-		 */
-
-		sense_txt = scsi_sense_key_string(sense_buffer[0]);
-		if (sense_txt)
-			printk("%s: old sense key %s\n", name, sense_txt);
-		else
-			printk("%s: sense = %2x %2x\n", name,
-			       sense_buffer[0], sense_buffer[2]);
-
-		printk("Non-extended sense class %d code 0x%0x\n",
-		       sense_class, code);
-		s = 4;
-	}
-    
-#if !(CONSTANTS & CONST_SENSE)
-	{
-		int i;
-	printk("Raw sense data:");
-	for (i = 0; i < s; ++i) 
-		printk("0x%02x ", sense_buffer[i]);
-	printk("\n");
+		if (sense_buffer[2] & 0x40) {
+			/* end-of-medium condition exists */
+			if (res > 0)
+				res += snprintf(buff + res, blen - res, ", ");
+			res += snprintf(buff + res, blen - res, "EOM");
+		}
+		if (sense_buffer[2] & 0x20) {
+			/* incorrect block length requested */
+			if (res > 0)
+				res += snprintf(buff + res, blen - res, ", ");
+			res += snprintf(buff + res, blen - res, "ILI");
+		}
+		if (res > 0)
+			printk(KERN_INFO "%s\n", buff);
+	} else if (ssh.additional_length > 0) {
+		/* descriptor format with sense descriptors */
+		num = 8 + ssh.additional_length;
+		num = (sense_len < num) ? sense_len : num;
+		printk(KERN_INFO "Descriptor sense data with sense "
+		       "descriptors (in hex):");
+		for (k = 0; k < num; ++k) {
+			if (0 == (k % 16)) {
+				printk("\n");
+				printk(KERN_INFO "        ");
+			}
+			printk("%02x ", sense_buffer[k]);
+		}
+		printk("\n");
 	}
-#endif
 }
 
 void scsi_print_sense(const char *devclass, struct scsi_cmnd *cmd)
 {
-	print_sense_internal(devclass, cmd->sense_buffer, cmd->request);
+	print_sense_internal(devclass, cmd->sense_buffer,
+			     SCSI_SENSE_BUFFERSIZE, cmd->request);
 }
+EXPORT_SYMBOL(scsi_print_sense);
 
 void scsi_print_req_sense(const char *devclass, struct scsi_request *sreq)
 {
-	print_sense_internal(devclass, sreq->sr_sense_buffer, sreq->sr_request);
+	print_sense_internal(devclass, sreq->sr_sense_buffer,
+			     SCSI_SENSE_BUFFERSIZE, sreq->sr_request);
 }
+EXPORT_SYMBOL(scsi_print_req_sense);
 
-#if (CONSTANTS & CONST_MSG) 
+#ifdef CONFIG_SCSI_CONSTANTS
 static const char *one_byte_msgs[] = {
 /* 0x00 */ "Command Complete", NULL, "Save Pointers",
 /* 0x03 */ "Restore Pointers", "Disconnect", "Initiator Error", 
@@ -1036,161 +1278,167 @@
 /* 0x0c */ "Bus device reset", "Abort Tag", "Clear Queue", 
 /* 0x0f */ "Initiate Recovery", "Release Recovery"
 };
-
 #define NO_ONE_BYTE_MSGS (sizeof(one_byte_msgs)  / sizeof (const char *))
 
 static const char *two_byte_msgs[] = {
 /* 0x20 */ "Simple Queue Tag", "Head of Queue Tag", "Ordered Queue Tag"
 /* 0x23 */ "Ignore Wide Residue"
 };
-
 #define NO_TWO_BYTE_MSGS (sizeof(two_byte_msgs)  / sizeof (const char *))
 
 static const char *extended_msgs[] = {
 /* 0x00 */ "Modify Data Pointer", "Synchronous Data Transfer Request",
 /* 0x02 */ "SCSI-I Extended Identify", "Wide Data Transfer Request"
 };
-
 #define NO_EXTENDED_MSGS (sizeof(two_byte_msgs)  / sizeof (const char *))
-#endif /* (CONSTANTS & CONST_MSG) */
 
-int scsi_print_msg (const unsigned char *msg) {
-    int len = 0, i;
-    if (msg[0] == EXTENDED_MESSAGE) {
-	len = 3 + msg[1];
-#if (CONSTANTS & CONST_MSG)
-	if (msg[2] < NO_EXTENDED_MSGS)
-	    printk ("%s ", extended_msgs[msg[2]]); 
-	else 
-	    printk ("Extended Message, reserved code (0x%02x) ", (int) msg[2]);
-	switch (msg[2]) {
-	case EXTENDED_MODIFY_DATA_POINTER:
-	    printk("pointer = %d", (int) (msg[3] << 24) | (msg[4] << 16) | 
-		   (msg[5] << 8) | msg[6]);
-	    break;
-	case EXTENDED_SDTR:
-	    printk("period = %d ns, offset = %d", (int) msg[3] * 4, (int) 
-		   msg[4]);
-	    break;
-	case EXTENDED_WDTR:
-	    printk("width = 2^%d bytes", msg[3]);
-	    break;
-	default:
-	    for (i = 2; i < len; ++i) 
-		printk("%02x ", msg[i]);
-	}
-#else
-	for (i = 0; i < len; ++i)
-	    printk("%02x ", msg[i]);
-#endif
+
+int scsi_print_msg (const unsigned char *msg)
+{
+	int len = 0, i;
+	if (msg[0] == EXTENDED_MESSAGE) {
+		len = 3 + msg[1];
+		if (msg[2] < NO_EXTENDED_MSGS)
+			printk ("%s ", extended_msgs[msg[2]]); 
+		else 
+			printk ("Extended Message, reserved code (0x%02x) ",
+				(int) msg[2]);
+		switch (msg[2]) {
+		case EXTENDED_MODIFY_DATA_POINTER:
+			printk("pointer = %d", (int) (msg[3] << 24) |
+				(msg[4] << 16) | (msg[5] << 8) | msg[6]);
+			break;
+		case EXTENDED_SDTR:
+			printk("period = %d ns, offset = %d",
+				(int) msg[3] * 4, (int) msg[4]);
+			break;
+		case EXTENDED_WDTR:
+			printk("width = 2^%d bytes", msg[3]);
+			break;
+		default:
+		for (i = 2; i < len; ++i) 
+			printk("%02x ", msg[i]);
+		}
 	/* Identify */
-    } else if (msg[0] & 0x80) {
-#if (CONSTANTS & CONST_MSG)
-	printk("Identify disconnect %sallowed %s %d ",
-	       (msg[0] & 0x40) ? "" : "not ",
-	       (msg[0] & 0x20) ? "target routine" : "lun",
-	       msg[0] & 0x7);
-#else
-	printk("%02x ", msg[0]);
-#endif
-	len = 1;
+	} else if (msg[0] & 0x80) {
+		printk("Identify disconnect %sallowed %s %d ",
+			(msg[0] & 0x40) ? "" : "not ",
+			(msg[0] & 0x20) ? "target routine" : "lun",
+			msg[0] & 0x7);
+		len = 1;
 	/* Normal One byte */
-    } else if (msg[0] < 0x1f) {
-#if (CONSTANTS & CONST_MSG)
-	if (msg[0] < NO_ONE_BYTE_MSGS)
-	    printk(one_byte_msgs[msg[0]]);
-	else
-	    printk("reserved (%02x) ", msg[0]);
-#else
-	printk("%02x ", msg[0]);
-#endif
-	len = 1;
+	} else if (msg[0] < 0x1f) {
+		if (msg[0] < NO_ONE_BYTE_MSGS)
+			printk(one_byte_msgs[msg[0]]);
+		else
+			printk("reserved (%02x) ", msg[0]);
+		len = 1;
 	/* Two byte */
-    } else if (msg[0] <= 0x2f) {
-#if (CONSTANTS & CONST_MSG)
-	if ((msg[0] - 0x20) < NO_TWO_BYTE_MSGS)
-	    printk("%s %02x ", two_byte_msgs[msg[0] - 0x20], 
-		   msg[1]);
-	else 
-	    printk("reserved two byte (%02x %02x) ", 
-		   msg[0], msg[1]);
-#else
-	printk("%02x %02x", msg[0], msg[1]);
-#endif
-	len = 2;
-    } else 
-#if (CONSTANTS & CONST_MSG)
-	printk(reserved);
-#else
-    printk("%02x ", msg[0]);
-#endif
-    return len;
+	} else if (msg[0] <= 0x2f) {
+		if ((msg[0] - 0x20) < NO_TWO_BYTE_MSGS)
+			printk("%s %02x ", two_byte_msgs[msg[0] - 0x20], 
+				msg[1]);
+		else 
+			printk("reserved two byte (%02x %02x) ", 
+				msg[0], msg[1]);
+		len = 2;
+	} else 
+		printk("reserved");
+	return len;
 }
+EXPORT_SYMBOL(scsi_print_msg);
 
-void scsi_print_command(struct scsi_cmnd *cmd) {
-    printk("scsi%d : destination target %d, lun %d\n", 
-	   cmd->device->host->host_no, 
-	   cmd->device->id, 
-	   cmd->device->lun);
-    printk("        command = ");
-    __scsi_print_command(cmd->cmnd);
+#else  /* ifndef CONFIG_SCSI_CONSTANTS */
+
+int scsi_print_msg (const unsigned char *msg)
+{
+	int len = 0, i;
+
+	if (msg[0] == EXTENDED_MESSAGE) {
+		len = 3 + msg[1];
+		for (i = 0; i < len; ++i)
+			printk("%02x ", msg[i]);
+	/* Identify */
+	} else if (msg[0] & 0x80) {
+		printk("%02x ", msg[0]);
+		len = 1;
+	/* Normal One byte */
+	} else if (msg[0] < 0x1f) {
+		printk("%02x ", msg[0]);
+		len = 1;
+	/* Two byte */
+	} else if (msg[0] <= 0x2f) {
+		printk("%02x %02x", msg[0], msg[1]);
+		len = 2;
+	} else 
+		printk("%02x ", msg[0]);
+	return len;
+}
+EXPORT_SYMBOL(scsi_print_msg);
+#endif /* ! CONFIG_SCSI_CONSTANTS */
+
+void scsi_print_command(struct scsi_cmnd *cmd)
+{
+	/* Assume appended output (i.e. not at start of line) */
+	printk("scsi%d : destination target %d, lun %d\n", 
+		cmd->device->host->host_no, 
+		cmd->device->id, 
+		cmd->device->lun);
+	printk(KERN_INFO "        command: ");
+	scsi_print_cdb(cmd->cmnd, cmd->cmd_len, 0);
 }
+EXPORT_SYMBOL(scsi_print_command);
+
+#ifdef CONFIG_SCSI_CONSTANTS
 
-#if (CONSTANTS & CONST_HOST)
 static const char * hostbyte_table[]={
 "DID_OK", "DID_NO_CONNECT", "DID_BUS_BUSY", "DID_TIME_OUT", "DID_BAD_TARGET", 
 "DID_ABORT", "DID_PARITY", "DID_ERROR", "DID_RESET", "DID_BAD_INTR",
-"DID_PASSTHROUGH", "DID_SOFT_ERROR", "DID_IMM_RETRY", NULL};
+"DID_PASSTHROUGH", "DID_SOFT_ERROR", "DID_IMM_RETRY"};
+#define NUM_HOSTBYTE_STRS (sizeof(hostbyte_table) / sizeof(const char *))
 
 void scsi_print_hostbyte(int scsiresult)
-{   static int maxcode=0;
-    int i;
-   
-    if(!maxcode) {
-	for(i=0;hostbyte_table[i];i++) ;
-	maxcode=i-1;
-    }
-    printk("Hostbyte=0x%02x",host_byte(scsiresult));
-    if(host_byte(scsiresult)>maxcode) {
-	printk("is invalid "); 
-	return;
-    }
-    printk("(%s) ",hostbyte_table[host_byte(scsiresult)]);
+{
+	int hb = host_byte(scsiresult);
+
+	printk("Hostbyte=0x%02x", hb);
+	if (hb < NUM_HOSTBYTE_STRS)
+		printk("(%s) ", hostbyte_table[hb]);
+	else
+		printk("is invalid "); 
 }
 #else
 void scsi_print_hostbyte(int scsiresult)
-{   printk("Hostbyte=0x%02x ",host_byte(scsiresult));
+{
+	printk("Hostbyte=0x%02x ", host_byte(scsiresult));
 }
 #endif
 
-#if (CONSTANTS & CONST_DRIVER)
+#ifdef CONFIG_SCSI_CONSTANTS
+
 static const char * driverbyte_table[]={
 "DRIVER_OK", "DRIVER_BUSY", "DRIVER_SOFT",  "DRIVER_MEDIA", "DRIVER_ERROR", 
-"DRIVER_INVALID", "DRIVER_TIMEOUT", "DRIVER_HARD",NULL };
+"DRIVER_INVALID", "DRIVER_TIMEOUT", "DRIVER_HARD", "DRIVER_SENSE"};
+#define NUM_DRIVERBYTE_STRS (sizeof(driverbyte_table) / sizeof(const char *))
 
 static const char * driversuggest_table[]={"SUGGEST_OK",
 "SUGGEST_RETRY", "SUGGEST_ABORT", "SUGGEST_REMAP", "SUGGEST_DIE",
-unknown,unknown,unknown, "SUGGEST_SENSE",NULL};
-
+"SUGGEST_5", "SUGGEST_6", "SUGGEST_7", "SUGGEST_SENSE"};
+#define NUM_SUGGEST_STRS (sizeof(driversuggest_table) / sizeof(const char *))
 
 void scsi_print_driverbyte(int scsiresult)
-{   static int driver_max=0,suggest_max=0;
-    int i,dr=driver_byte(scsiresult)&DRIVER_MASK, 
-	su=(driver_byte(scsiresult)&SUGGEST_MASK)>>4;
-
-    if(!driver_max) {
-        for(i=0;driverbyte_table[i];i++) ;
-        driver_max=i;
-	for(i=0;driversuggest_table[i];i++) ;
-	suggest_max=i;
-    }
-    printk("Driverbyte=0x%02x",driver_byte(scsiresult));
-    printk("(%s,%s) ",
-	dr<driver_max  ? driverbyte_table[dr]:"invalid",
-	su<suggest_max ? driversuggest_table[su]:"invalid");
+{
+	int dr = (driver_byte(scsiresult) & DRIVER_MASK);
+	int su = ((driver_byte(scsiresult) & SUGGEST_MASK) >> 4);
+
+	printk("Driverbyte=0x%02x ", driver_byte(scsiresult));
+	printk("(%s,%s) ",
+	       (dr < NUM_DRIVERBYTE_STRS ? driverbyte_table[dr] : "invalid"),
+	       (su < NUM_SUGGEST_STRS ? driversuggest_table[su] : "invalid"));
 }
 #else
 void scsi_print_driverbyte(int scsiresult)
-{   printk("Driverbyte=0x%02x ",driver_byte(scsiresult));
+{
+	printk("Driverbyte=0x%02x ", driver_byte(scsiresult));
 }
 #endif
diff -Nru a/drivers/scsi/dpt/dpti_ioctl.h b/drivers/scsi/dpt/dpti_ioctl.h
--- a/drivers/scsi/dpt/dpti_ioctl.h	2005-01-10 20:11:18 -08:00
+++ b/drivers/scsi/dpt/dpti_ioctl.h	2005-01-10 20:11:18 -08:00
@@ -3,7 +3,6 @@
                              -------------------
     begin                : Thu Sep 7 2000
     copyright            : (C) 2001 by Adaptec
-    email                : deanna_bonds@adaptec.com
 
     See Documentation/scsi/dpti.txt for history, notes, license info
     and credits
diff -Nru a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c
--- a/drivers/scsi/dpt_i2o.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/scsi/dpt_i2o.c	2005-01-10 20:11:21 -08:00
@@ -3,7 +3,6 @@
                              -------------------
     begin                : Thu Sep 7 2000
     copyright            : (C) 2000 by Adaptec
-    email                : deanna_bonds@adaptec.com
 
 			   July 30, 2001 First version being submitted
 			   for inclusion in the kernel.  V2.4
diff -Nru a/drivers/scsi/dpti.h b/drivers/scsi/dpti.h
--- a/drivers/scsi/dpti.h	2005-01-10 20:11:15 -08:00
+++ b/drivers/scsi/dpti.h	2005-01-10 20:11:15 -08:00
@@ -3,7 +3,6 @@
                              -------------------
     begin                : Thu Sep 7 2000
     copyright            : (C) 2001 by Adaptec
-    email                : deanna_bonds@adaptec.com
 
     See Documentation/scsi/dpti.txt for history, notes, license info
     and credits
diff -Nru a/drivers/scsi/eata.c b/drivers/scsi/eata.c
--- a/drivers/scsi/eata.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/scsi/eata.c	2005-01-10 20:11:22 -08:00
@@ -505,28 +505,29 @@
 static int eata2x_detect(struct scsi_host_template *);
 static int eata2x_release(struct Scsi_Host *);
 static int eata2x_queuecommand(struct scsi_cmnd *,
-		void (*done)(struct scsi_cmnd *));
+			       void (*done) (struct scsi_cmnd *));
 static int eata2x_eh_abort(struct scsi_cmnd *);
 static int eata2x_eh_host_reset(struct scsi_cmnd *);
 static int eata2x_bios_param(struct scsi_device *, struct block_device *,
-                             sector_t, int *);
+			     sector_t, int *);
 static int eata2x_slave_configure(struct scsi_device *);
 
 static struct scsi_host_template driver_template = {
-                .name                    = "EATA/DMA 2.0x rev. 8.10.00 ",
-                .detect                  = eata2x_detect,
-                .release                 = eata2x_release,
-                .queuecommand            = eata2x_queuecommand,
-                .eh_abort_handler        = eata2x_eh_abort,
-                .eh_device_reset_handler = NULL,
-                .eh_bus_reset_handler    = NULL,
-                .eh_host_reset_handler   = eata2x_eh_host_reset,
-                .bios_param              = eata2x_bios_param,
-                .slave_configure         = eata2x_slave_configure,
-                .this_id                 = 7,
-                .unchecked_isa_dma       = 1,
-                .use_clustering          = ENABLE_CLUSTERING
-                };
+	.name = "EATA/DMA 2.0x rev. 8.10.00 ",
+	.detect = eata2x_detect,
+	.release = eata2x_release,
+	.queuecommand = eata2x_queuecommand,
+	.eh_abort_handler = eata2x_eh_abort,
+	.eh_device_reset_handler = NULL,
+	.eh_bus_reset_handler = NULL,
+	.eh_host_reset_handler = eata2x_eh_host_reset,
+	.bios_param = eata2x_bios_param,
+	.slave_configure = eata2x_slave_configure,
+	.this_id = 7,
+	.unchecked_isa_dma = 1,
+	.use_clustering = ENABLE_CLUSTERING
+};
+
 #if !defined(__BIG_ENDIAN_BITFIELD) && !defined(__LITTLE_ENDIAN_BITFIELD)
 #error "Adjust your <asm/byteorder.h> defines"
 #endif
@@ -618,188 +619,224 @@
 
 /* Board info structure */
 struct eata_info {
-   u_int32_t data_len;  /* Number of valid bytes after this field */
-   u_int32_t sign;      /* ASCII "EATA" signature */
+	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;
+	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 */
-           tarsup:1,    /* Target Mode Supported */
-           trnxfr:1,    /* Truncate Transfer Cmd NOT Necessary */
-           morsup:1,    /* More Supported */
-           dmasup:1,    /* DMA Supported */
-           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 */
-   u_int32_t sp_len;    /* Number of valid bytes in sp */
-   ushort queue_size;   /* Max number of cp that can be queued */
-   ushort unused;
-   ushort scatt_size;   /* Max number of entries in scatter/gather table */
+	unchar		: 4,	/* unused low nibble */
+	 	version	: 4;	/* EATA version, should be 0x1 */
+	unchar ocsena	: 1,	/* Overlap Command Support Enabled */
+	       tarsup	: 1,	/* Target Mode Supported */
+	       trnxfr	: 1,	/* Truncate Transfer Cmd NOT Necessary */
+	       morsup	: 1,	/* More Supported */
+	       dmasup	: 1,	/* DMA Supported */
+	       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 */
+	u_int32_t sp_len;	/* Number of valid bytes in sp */
+	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;
+	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 */
-             drqx:2;    /* DRQ Index (0=DMA0, 1=DMA7, 2=DMA6, 3=DMA5) */
-   unchar  sync;        /* 1 if scsi target id 7...0 is running sync scsi */
-
-   /* Structure extension defined in EATA 2.0B */
-   unchar  isaena:1,    /* ISA i/o addressing is disabled/enabled */
-         forcaddr:1,    /* Port address has been forced */
-         large_sg:1,    /* 1 if large SG lists are supported */
-             res1:1,
-                 :4;
-   unchar  max_id:5,    /* Max SCSI target ID number */
-         max_chan:3;    /* Max SCSI channel number on this board */
-
-   /* Structure extension defined in EATA 2.0C */
-   unchar   max_lun;    /* Max SCSI LUN number */
-   unchar        :4,
-               m1:1,    /* This is a PCI with an M1 chip installed */
-          idquest:1,    /* RAIDNUM returned is questionable */
-              pci:1,    /* This board is PCI */
-             eisa:1;    /* This board is EISA */
+	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 */
+	       drqx	: 2;	/* DRQ Index (0=DMA0, 1=DMA7, 2=DMA6, 3=DMA5) */
+	unchar sync;		/* 1 if scsi target id 7...0 is running sync scsi */
+
+	/* Structure extension defined in EATA 2.0B */
+	unchar isaena	: 1,	/* ISA i/o addressing is disabled/enabled */
+	       forcaddr	: 1,	/* Port address has been forced */
+	       large_sg	: 1,	/* 1 if large SG lists are supported */
+	       res1	: 1,
+	       		: 4;
+	unchar max_id	: 5,	/* Max SCSI target ID number */
+	       max_chan	: 3;	/* Max SCSI channel number on this board */
+
+	/* Structure extension defined in EATA 2.0C */
+	unchar max_lun;		/* Max SCSI LUN number */
+	unchar
+			: 4,
+	       m1	: 1,	/* This is a PCI with an M1 chip installed */
+	       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;
+	unchar raidnum;		/* Uniquely identifies this HBA in a system */
+	unchar notused;
 
-   ushort ipad[247];
-   };
+	ushort ipad[247];
+};
 
 /* Board config structure */
 struct eata_config {
-   ushort len;          /* Number of bytes following this field */
+	ushort len;		/* Number of bytes following this field */
 
 #if defined(__BIG_ENDIAN_BITFIELD)
-   unchar     :4, tarena:1, mdpena:1, ocena:1, edis:1;
+	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;
+	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];
-   };
+	unchar cpad[511];
+};
 
 /* Returned status packet structure */
 struct mssp {
-
 #if defined(__BIG_ENDIAN_BITFIELD)
-   unchar            eoc:1, adapter_status:7;
+	unchar eoc	: 1,
+	       adapter_status : 7;
 #else
-   unchar adapter_status:7,    /* State related to current command */
-                     eoc:1;    /* End Of Command (1 = command completed) */
+	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 */
-   u_int32_t cpp_index;        /* Index of address set in cp */
-   char mess[12];
-   };
+	unchar target_status;	/* SCSI status received after data transfer */
+	unchar unused[2];
+	u_int32_t inv_res_len;	/* Number of bytes not transferred */
+	u_int32_t cpp_index;	/* Index of address set in cp */
+	char mess[12];
+};
 
 struct sg_list {
-   unsigned int address;                /* Segment Address */
-   unsigned int num_bytes;              /* Segment Length */
-   };
+	unsigned int address;	/* Segment Address */
+	unsigned int num_bytes;	/* Segment Length */
+};
 
 /* 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;
+	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 */
-               sg:1,     /* Use Scatter/Gather */
-                 :1,
-           interp:1,     /* The controller interprets cp, not the target */
-             dout:1,     /* Direction of Transfer is Out (Host to Target) */
-              din:1;     /* Direction of Transfer is In (Target to Host) */
-   unchar sense_len;     /* Request Sense Length */
-   unchar unused[3];
-   unchar  fwnest:1,     /* Send command to a component of an Array Group */
-                 :7;
-   unchar phsunit:1,     /* Send to Target Physical Unit (bypass RAID) */
-              iat:1,     /* Inhibit Address Translation */
-            hbaci:1,     /* Inhibit HBA Caching for this command */
-                 :5;
-   unchar  target:5,     /* SCSI target ID */
-          channel:3;     /* SCSI channel number */
-   unchar     lun:5,     /* SCSI logical unit number */
-           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 */
-   u_int32_t cpp_index;  /* Index of address to be returned in sp */
-   u_int32_t data_address; /* If sg=0 Data Address, if sg=1 sglist address */
-   u_int32_t sp_dma_addr;  /* Address where sp is DMA'ed when cp completes */
-   u_int32_t sense_addr; /* Address where Sense Data is DMA'ed on error */
-
-   /* Additional fields begin here. */
-   struct scsi_cmnd *SCpnt;
-
-   /* All the cp structure is zero filled by queuecommand except the
-      following CP_TAIL_SIZE bytes, initialized by detect */
-   dma_addr_t cp_dma_addr; /* dma handle for this cp structure */
-   struct sg_list *sglist; /* pointer to the allocated SG list */
-   };
+	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 */
+	       sg	:1,	/* Use Scatter/Gather */
+	       		:1,
+	       interp	:1,	/* The controller interprets cp, not the target */
+	       dout	:1,	/* Direction of Transfer is Out (Host to Target) */
+	       din	:1;	/* Direction of Transfer is In (Target to Host) */
+	unchar sense_len;	/* Request Sense Length */
+	unchar unused[3];
+	unchar fwnest	: 1,	/* Send command to a component of an Array Group */
+			: 7;
+	unchar phsunit	: 1,	/* Send to Target Physical Unit (bypass RAID) */
+	       iat	: 1,	/* Inhibit Address Translation */
+	       hbaci	: 1,	/* Inhibit HBA Caching for this command */
+	       		: 5;
+	unchar target	: 5,	/* SCSI target ID */
+	       channel	: 3;	/* SCSI channel number */
+	unchar lun	: 5,	/* SCSI logical unit number */
+	       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 */
+	u_int32_t cpp_index;	/* Index of address to be returned in sp */
+	u_int32_t data_address;	/* If sg=0 Data Address, if sg=1 sglist address */
+	u_int32_t sp_dma_addr;	/* Address where sp is DMA'ed when cp completes */
+	u_int32_t sense_addr;	/* Address where Sense Data is DMA'ed on error */
+
+	/* Additional fields begin here. */
+	struct scsi_cmnd *SCpnt;
+
+	/* All the cp structure is zero filled by queuecommand except the
+	   following CP_TAIL_SIZE bytes, initialized by detect */
+	dma_addr_t cp_dma_addr;	/* dma handle for this cp structure */
+	struct sg_list *sglist;	/* pointer to the allocated SG list */
+};
 
 #define CP_TAIL_SIZE (sizeof(struct sglist *) + sizeof(dma_addr_t))
 
 struct hostdata {
-   struct mscp cp[MAX_MAILBOXES];       /* Mailboxes for this board */
-   unsigned int cp_stat[MAX_MAILBOXES]; /* FREE, IN_USE, LOCKED, IN_RESET */
-   unsigned int last_cp_used;           /* Index of last mailbox used */
-   unsigned int iocount;                /* Total i/o done for this board */
-   int board_number;                    /* Number of this board */
-   char board_name[16];                 /* Name of this board */
-   int in_reset;                        /* True if board is doing a reset */
-   int target_to[MAX_TARGET][MAX_CHANNEL]; /* N. of timeout errors on target */
-   int target_redo[MAX_TARGET][MAX_CHANNEL]; /* If 1 redo i/o on target */
-   unsigned int retries;                /* Number of internal retries */
-   unsigned long last_retried_pid;      /* Pid of last retried command */
-   unsigned char subversion;            /* Bus type, either ISA or EISA/PCI */
-   unsigned char protocol_rev;          /* EATA 2.0 rev., 'A' or 'B' or 'C' */
-   unsigned char is_pci;                /* 1 is bus type is PCI */
-   struct pci_dev *pdev;                /* pdev for PCI bus, NULL otherwise */
-   struct mssp *sp_cpu_addr;            /* cpu addr for DMA buffer sp */
-   dma_addr_t sp_dma_addr;              /* dma handle for DMA buffer sp */
-   struct mssp sp;                      /* Local copy of sp buffer */
-   };
+	struct mscp cp[MAX_MAILBOXES];	/* Mailboxes for this board */
+	unsigned int cp_stat[MAX_MAILBOXES];	/* FREE, IN_USE, LOCKED, IN_RESET */
+	unsigned int last_cp_used;	/* Index of last mailbox used */
+	unsigned int iocount;	/* Total i/o done for this board */
+	int board_number;	/* Number of this board */
+	char board_name[16];	/* Name of this board */
+	int in_reset;		/* True if board is doing a reset */
+	int target_to[MAX_TARGET][MAX_CHANNEL];	/* N. of timeout errors on target */
+	int target_redo[MAX_TARGET][MAX_CHANNEL];	/* If 1 redo i/o on target */
+	unsigned int retries;	/* Number of internal retries */
+	unsigned long last_retried_pid;	/* Pid of last retried command */
+	unsigned char subversion;	/* Bus type, either ISA or EISA/PCI */
+	unsigned char protocol_rev;	/* EATA 2.0 rev., 'A' or 'B' or 'C' */
+	unsigned char is_pci;	/* 1 is bus type is PCI */
+	struct pci_dev *pdev;	/* pdev for PCI bus, NULL otherwise */
+	struct mssp *sp_cpu_addr;	/* cpu addr for DMA buffer sp */
+	dma_addr_t sp_dma_addr;	/* dma handle for DMA buffer sp */
+	struct mssp sp;		/* Local copy of sp buffer */
+};
 
-static struct Scsi_Host *sh[MAX_BOARDS + 1];
+static struct Scsi_Host *sh[MAX_BOARDS];
 static const char *driver_name = "EATA";
 static char sha[MAX_BOARDS];
 static spinlock_t driver_lock = SPIN_LOCK_UNLOCKED;
@@ -809,30 +846,27 @@
 
 static unsigned long io_port[] = {
 
-   /* Space for MAX_INT_PARAM ports usable while loading as a module */
-   SKIP,    SKIP,   SKIP,   SKIP,   SKIP,   SKIP,   SKIP,   SKIP,
-   SKIP,    SKIP,
-
-   /* First ISA */
-   0x1f0,
-
-   /* Space for MAX_PCI ports possibly reported by PCI_BIOS */
-   SKIP,    SKIP,   SKIP,   SKIP,   SKIP,   SKIP,   SKIP,   SKIP,
-   SKIP,    SKIP,   SKIP,   SKIP,   SKIP,   SKIP,   SKIP,   SKIP,
-
-   /* MAX_EISA ports */
-   0x1c88, 0x2c88, 0x3c88, 0x4c88, 0x5c88, 0x6c88, 0x7c88, 0x8c88,
-   0x9c88, 0xac88, 0xbc88, 0xcc88, 0xdc88, 0xec88, 0xfc88,
-
-   /* Other (MAX_ISA - 1) ports */
-   0x170,  0x230,  0x330,
-
-   /* End of list */
-   0x0
-   };
-
-#define HD(board) ((struct hostdata *) &sh[board]->hostdata)
-#define BN(board) (HD(board)->board_name)
+	/* Space for MAX_INT_PARAM ports usable while loading as a module */
+	SKIP, SKIP, SKIP, SKIP, SKIP, SKIP, SKIP, SKIP,
+	SKIP, SKIP,
+
+	/* First ISA */
+	0x1f0,
+
+	/* Space for MAX_PCI ports possibly reported by PCI_BIOS */
+	SKIP, SKIP, SKIP, SKIP, SKIP, SKIP, SKIP, SKIP,
+	SKIP, SKIP, SKIP, SKIP, SKIP, SKIP, SKIP, SKIP,
+
+	/* MAX_EISA ports */
+	0x1c88, 0x2c88, 0x3c88, 0x4c88, 0x5c88, 0x6c88, 0x7c88, 0x8c88,
+	0x9c88, 0xac88, 0xbc88, 0xcc88, 0xdc88, 0xec88, 0xfc88,
+
+	/* Other (MAX_ISA - 1) ports */
+	0x170, 0x230, 0x330,
+
+	/* End of list */
+	0x0
+};
 
 /* Device is Big Endian */
 #define H2DEV(x)   cpu_to_be32(x)
@@ -844,7 +878,8 @@
 #define REG2H(x)   le16_to_cpu(x)
 
 static irqreturn_t do_interrupt_handler(int, void *, struct pt_regs *);
-static void flush_dev(struct scsi_device *, unsigned long, unsigned int, unsigned int);
+static void flush_dev(struct scsi_device *, unsigned long, struct hostdata *,
+		      unsigned int);
 static int do_trace = 0;
 static int setup_done = 0;
 static int link_statistics;
@@ -896,1531 +931,1691 @@
 #include <linux/moduleparam.h>
 
 module_param_string(eata, boot_options, MAX_BOOT_OPTIONS_SIZE, 0);
-MODULE_PARM_DESC(eata, " equivalent to the \"eata=...\" kernel boot option." \
-"            Example: modprobe eata \"eata=0x7410,0x230,lc:y,tm:0,mq:4,ep:n\"");
+MODULE_PARM_DESC(eata, " equivalent to the \"eata=...\" kernel boot option."
+		 "            Example: modprobe eata \"eata=0x7410,0x230,lc:y,tm:0,mq:4,ep:n\"");
 MODULE_AUTHOR("Dario Ballabio");
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("EATA/DMA SCSI Driver");
 
 #endif
 
-static int eata2x_slave_configure(struct scsi_device *dev) {
-   int j, tqd, utqd;
-   char *tag_suffix, *link_suffix;
-   struct Scsi_Host *host = dev->host;
-
-   j = ((struct hostdata *) host->hostdata)->board_number;
-
-   utqd = MAX_CMD_PER_LUN;
-   tqd = max_queue_depth;
-
-   if (TLDEV(dev->type) && dev->tagged_supported)
-
-      if (tag_mode == TAG_SIMPLE) {
-         scsi_adjust_queue_depth(dev, MSG_SIMPLE_TAG, tqd);
-         tag_suffix = ", simple tags";
-         }
-      else if (tag_mode == TAG_ORDERED) {
-         scsi_adjust_queue_depth(dev, MSG_ORDERED_TAG, tqd);
-         tag_suffix = ", ordered tags";
-         }
-      else {
-         scsi_adjust_queue_depth(dev, 0, tqd);
-         tag_suffix = ", no tags";
-         }
-
-   else if (TLDEV(dev->type) && linked_comm) {
-      scsi_adjust_queue_depth(dev, 0, tqd);
-      tag_suffix = ", untagged";
-      }
-
-   else {
-      scsi_adjust_queue_depth(dev, 0, utqd);
-      tag_suffix = "";
-      }
-
-   if (TLDEV(dev->type) && linked_comm && dev->queue_depth > 2)
-      link_suffix = ", sorted";
-   else if (TLDEV(dev->type))
-      link_suffix = ", unsorted";
-   else
-      link_suffix = "";
-
-   printk("%s: scsi%d, channel %d, id %d, lun %d, cmds/lun %d%s%s.\n",
-          BN(j), host->host_no, dev->channel, dev->id, dev->lun,
-          dev->queue_depth, link_suffix, tag_suffix);
-
-   return 0;
-}
-
-static int wait_on_busy(unsigned long iobase, unsigned int loop) {
-
-   while (inb(iobase + REG_AUX_STATUS) & ABSY_ASSERTED) {
-      udelay(1L);
-      if (--loop == 0) return 1;
-      }
-
-   return 0;
-}
-
-static int do_dma(unsigned long iobase, unsigned long addr, unchar cmd) {
-   unsigned char *byaddr;
-   unsigned long devaddr;
+static int eata2x_slave_configure(struct scsi_device *dev)
+{
+	int tqd, utqd;
+	char *tag_suffix, *link_suffix;
+	struct Scsi_Host *shost = dev->host;
+	struct hostdata *ha = (struct hostdata *)shost->hostdata;
+
+	utqd = MAX_CMD_PER_LUN;
+	tqd = max_queue_depth;
+
+	if (TLDEV(dev->type) && dev->tagged_supported) {
+		if (tag_mode == TAG_SIMPLE) {
+			scsi_adjust_queue_depth(dev, MSG_SIMPLE_TAG, tqd);
+			tag_suffix = ", simple tags";
+		} else if (tag_mode == TAG_ORDERED) {
+			scsi_adjust_queue_depth(dev, MSG_ORDERED_TAG, tqd);
+			tag_suffix = ", ordered tags";
+		} else {
+			scsi_adjust_queue_depth(dev, 0, tqd);
+			tag_suffix = ", no tags";
+		}
+	} else if (TLDEV(dev->type) && linked_comm) {
+		scsi_adjust_queue_depth(dev, 0, tqd);
+		tag_suffix = ", untagged";
+	} else {
+		scsi_adjust_queue_depth(dev, 0, utqd);
+		tag_suffix = "";
+	}
+
+	if (TLDEV(dev->type) && linked_comm && dev->queue_depth > 2)
+		link_suffix = ", sorted";
+	else if (TLDEV(dev->type))
+		link_suffix = ", unsorted";
+	else
+		link_suffix = "";
+
+	printk("%s: scsi%d, channel %d, id %d, lun %d, cmds/lun %d%s%s.\n",
+	       ha->board_name, shost->host_no, dev->channel, dev->id, dev->lun,
+	       dev->queue_depth, link_suffix, tag_suffix);
+
+	return 0;
+}
+
+static int wait_on_busy(unsigned long iobase, unsigned int loop)
+{
+	while (inb(iobase + REG_AUX_STATUS) & ABSY_ASSERTED) {
+		udelay(1L);
+		if (--loop == 0)
+			return 1;
+	}
+	return 0;
+}
+
+static 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 1;
+
+	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);
+	return 0;
+}
+
+static int read_pio(unsigned long iobase, ushort * start, ushort * end)
+{
+	unsigned int loop = MAXLOOP;
+	ushort *p;
+
+	for (p = start; p <= end; p++) {
+		while (!(inb(iobase + REG_STATUS) & DRQ_ASSERTED)) {
+			udelay(1L);
+			if (--loop == 0)
+				return 1;
+		}
+		loop = MAXLOOP;
+		*p = REG2H(inw(iobase));
+	}
 
-   if (wait_on_busy(iobase, (addr ? MAXLOOP * 100 : MAXLOOP))) return 1;
-
-   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);
-   return 0;
+	return 0;
 }
 
-static int read_pio(unsigned long iobase, ushort *start, ushort *end) {
-   unsigned int loop = MAXLOOP;
-   ushort *p;
-
-   for (p = start; p <= end; p++) {
-
-      while (!(inb(iobase + REG_STATUS) & DRQ_ASSERTED)) {
-         udelay(1L);
-         if (--loop == 0) return 1;
-         }
-
-      loop = MAXLOOP;
-      *p = REG2H(inw(iobase));
-      }
-
-   return 0;
-}
-
-static struct pci_dev *get_pci_dev(unsigned long port_base) {
-
+static struct pci_dev *get_pci_dev(unsigned long port_base)
+{
 #if defined(CONFIG_PCI)
+	unsigned int addr;
+	struct pci_dev *dev = NULL;
 
-   unsigned int addr;
-   struct pci_dev *dev = NULL;
-
-   while((dev = pci_get_class(PCI_CLASS_STORAGE_SCSI << 8, dev))) {
-      addr = pci_resource_start (dev, 0);
+	while ((dev = pci_get_class(PCI_CLASS_STORAGE_SCSI << 8, dev))) {
+		addr = pci_resource_start(dev, 0);
 
 #if defined(DEBUG_PCI_DETECT)
-      printk("%s: get_pci_dev, bus %d, devfn 0x%x, addr 0x%x.\n",
-             driver_name, dev->bus->number, dev->devfn, addr);
+		printk("%s: get_pci_dev, bus %d, devfn 0x%x, addr 0x%x.\n",
+		       driver_name, dev->bus->number, dev->devfn, addr);
 #endif
 
-      /* we are in so much trouble for a pci hotplug system with this driver
-       * anyway, so doing this at least lets people unload the driver and not
-       * cause memory problems, but in general this is a bad thing to do (this
-       * driver needs to be converted to the proper PCI api someday... */
-      pci_dev_put(dev);
-      if (addr + PCI_BASE_ADDRESS_0 == port_base) return dev;
-      }
-
-#endif /* end CONFIG_PCI */
-
-   return NULL;
+		/* we are in so much trouble for a pci hotplug system with this driver
+		 * anyway, so doing this at least lets people unload the driver and not
+		 * cause memory problems, but in general this is a bad thing to do (this
+		 * driver needs to be converted to the proper PCI api someday... */
+		pci_dev_put(dev);
+		if (addr + PCI_BASE_ADDRESS_0 == port_base)
+			return dev;
+	}
+#endif				/* end CONFIG_PCI */
+	return NULL;
 }
 
-static void enable_pci_ports(void) {
-
+static void enable_pci_ports(void)
+{
 #if defined(CONFIG_PCI)
+	struct pci_dev *dev = NULL;
 
-   struct pci_dev *dev = NULL;
-
-   while((dev = pci_get_class(PCI_CLASS_STORAGE_SCSI << 8, dev))) {
-
+	while ((dev = pci_get_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);
+		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 int port_detect \
-      (unsigned long port_base, unsigned int j, struct scsi_host_template *tpnt) {
-   unsigned char irq, dma_channel, subversion, i, is_pci = 0;
-   unsigned char protocol_rev;
-   struct eata_info info;
-   char *bus_type, dma_name[16];
-   struct pci_dev *pdev;
-
-   /* Allowed DMA channels for ISA (0 indicates reserved) */
-   unsigned char dma_channel_table[4] = { 5, 6, 7, 0 };
+		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 int port_detect(unsigned long port_base, unsigned int j,
+		struct scsi_host_template *tpnt)
+{
+	unsigned char irq, dma_channel, subversion, i, is_pci = 0;
+	unsigned char protocol_rev;
+	struct eata_info info;
+	char *bus_type, dma_name[16];
+	struct pci_dev *pdev;
+	/* Allowed DMA channels for ISA (0 indicates reserved) */
+	unsigned char dma_channel_table[4] = { 5, 6, 7, 0 };
+	struct Scsi_Host *shost;
+	struct hostdata *ha;
+	char name[16];
 
-   char name[16];
+	sprintf(name, "%s%d", driver_name, j);
 
-   sprintf(name, "%s%d", driver_name, j);
-
-   if (!request_region(port_base, REGION_SIZE, driver_name)) {
+	if (!request_region(port_base, REGION_SIZE, driver_name)) {
 #if defined(DEBUG_DETECT)
-      printk("%s: address 0x%03lx in use, skipping probe.\n", name, port_base);
+		printk("%s: address 0x%03lx in use, skipping probe.\n", name,
+		       port_base);
 #endif
-      goto fail;
-      }
+		goto fail;
+	}
 
-   spin_lock_irq(&driver_lock);
+	spin_lock_irq(&driver_lock);
 
-   if (do_dma(port_base, 0, READ_CONFIG_PIO)) {
+	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);
+		printk("%s: detect, do_dma failed at 0x%03lx.\n", name,
+		       port_base);
 #endif
-      goto freelock;
-      }
+		goto freelock;
+	}
 
-   /* Read the info structure */
-   if (read_pio(port_base, (ushort *)&info, (ushort *)&info.ipad[0])) {
+	/* 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);
+		printk("%s: detect, read_pio failed at 0x%03lx.\n", name,
+		       port_base);
 #endif
-      goto freelock;
-      }
+		goto freelock;
+	}
 
-   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);
+	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_SIG_BE) {
+	/* Check the controller "EATA" signature */
+	if (info.sign != EATA_SIG_BE) {
 #if defined(DEBUG_DETECT)
-      printk("%s: signature 0x%04x discarded.\n", name, info.sign);
+		printk("%s: signature 0x%04x discarded.\n", name, info.sign);
 #endif
-      goto freelock;
-      }
-
-   if (info.data_len < EATA_2_0A_SIZE) {
-      printk("%s: config structure size (%d bytes) too short, detaching.\n",
-             name, info.data_len);
-      goto freelock;
-      }
-   else if (info.data_len == EATA_2_0A_SIZE)
-      protocol_rev = 'A';
-   else if (info.data_len == EATA_2_0B_SIZE)
-      protocol_rev = 'B';
-   else
-      protocol_rev = 'C';
-
-   if (protocol_rev != 'A' && info.forcaddr) {
-      printk("%s: warning, port address has been forced.\n", name);
-      bus_type = "PCI";
-      is_pci = 1;
-      subversion = ESA;
-      }
-   else if (port_base > MAX_EISA_ADDR || (protocol_rev == 'C' && info.pci)) {
-      bus_type = "PCI";
-      is_pci = 1;
-      subversion = ESA;
-      }
-   else if (port_base >= MIN_EISA_ADDR || (protocol_rev == 'C' && info.eisa)) {
-      bus_type = "EISA";
-      subversion = ESA;
-      }
-   else if (protocol_rev == 'C' && !info.eisa && !info.pci) {
-      bus_type = "ISA";
-      subversion = ISA;
-      }
-   else if (port_base > MAX_ISA_ADDR) {
-      bus_type = "PCI";
-      is_pci = 1;
-      subversion = ESA;
-      }
-   else {
-      bus_type = "ISA";
-      subversion = ISA;
-      }
-
-   if (!info.haaval || info.ata) {
-      printk("%s: address 0x%03lx, unusable %s board (%d%d), detaching.\n",
-             name, port_base, bus_type, info.haaval, info.ata);
-      goto freelock;
-      }
-
-   if (info.drqvld) {
-
-      if (subversion ==  ESA)
-         printk("%s: warning, weird %s board using DMA.\n", name, bus_type);
-
-      subversion = ISA;
-      dma_channel = dma_channel_table[3 - info.drqx];
-      }
-   else {
-
-      if (subversion ==  ISA)
-         printk("%s: warning, weird %s board not using DMA.\n", name, bus_type);
-
-      subversion = ESA;
-      dma_channel = NO_DMA;
-      }
-
-   if (!info.dmasup)
-      printk("%s: warning, DMA protocol support not asserted.\n", name);
-
-   irq = info.irq;
-
-   if (subversion == ESA && !info.irq_tr)
-      printk("%s: warning, LEVEL triggering is suggested for IRQ %u.\n",
-             name, irq);
-
-   if (is_pci) {
-      pdev = get_pci_dev(port_base);
-      if (!pdev)
-         printk("%s: warning, failed to get pci_dev structure.\n", name);
-      }
-   else
-      pdev = NULL;
-
-   if (pdev && (irq != pdev->irq)) {
-      printk("%s: IRQ %u mapped to IO-APIC IRQ %u.\n", name, irq, pdev->irq);
-      irq = pdev->irq;
-      }
-
-   /* Board detected, allocate its IRQ */
-   if (request_irq(irq, do_interrupt_handler,
-             SA_INTERRUPT | ((subversion == ESA) ? SA_SHIRQ : 0),
-             driver_name, (void *) &sha[j])) {
-      printk("%s: unable to allocate IRQ %u, detaching.\n", name, irq);
-      goto freelock;
-      }
-
-   if (subversion == ISA && request_dma(dma_channel, driver_name)) {
-      printk("%s: unable to allocate DMA channel %u, detaching.\n",
-             name, dma_channel);
-      goto freeirq;
-      }
+		goto freelock;
+	}
 
+	if (info.data_len < EATA_2_0A_SIZE) {
+		printk
+		    ("%s: config structure size (%d bytes) too short, detaching.\n",
+		     name, info.data_len);
+		goto freelock;
+	} else if (info.data_len == EATA_2_0A_SIZE)
+		protocol_rev = 'A';
+	else if (info.data_len == EATA_2_0B_SIZE)
+		protocol_rev = 'B';
+	else
+		protocol_rev = 'C';
+
+	if (protocol_rev != 'A' && info.forcaddr) {
+		printk("%s: warning, port address has been forced.\n", name);
+		bus_type = "PCI";
+		is_pci = 1;
+		subversion = ESA;
+	} else if (port_base > MAX_EISA_ADDR
+		   || (protocol_rev == 'C' && info.pci)) {
+		bus_type = "PCI";
+		is_pci = 1;
+		subversion = ESA;
+	} else if (port_base >= MIN_EISA_ADDR
+		   || (protocol_rev == 'C' && info.eisa)) {
+		bus_type = "EISA";
+		subversion = ESA;
+	} else if (protocol_rev == 'C' && !info.eisa && !info.pci) {
+		bus_type = "ISA";
+		subversion = ISA;
+	} else if (port_base > MAX_ISA_ADDR) {
+		bus_type = "PCI";
+		is_pci = 1;
+		subversion = ESA;
+	} else {
+		bus_type = "ISA";
+		subversion = ISA;
+	}
+
+	if (!info.haaval || info.ata) {
+		printk
+		    ("%s: address 0x%03lx, unusable %s board (%d%d), detaching.\n",
+		     name, port_base, bus_type, info.haaval, info.ata);
+		goto freelock;
+	}
+
+	if (info.drqvld) {
+		if (subversion == ESA)
+			printk("%s: warning, weird %s board using DMA.\n", name,
+			       bus_type);
+
+		subversion = ISA;
+		dma_channel = dma_channel_table[3 - info.drqx];
+	} else {
+		if (subversion == ISA)
+			printk("%s: warning, weird %s board not using DMA.\n",
+			       name, bus_type);
+
+		subversion = ESA;
+		dma_channel = NO_DMA;
+	}
+
+	if (!info.dmasup)
+		printk("%s: warning, DMA protocol support not asserted.\n",
+		       name);
+
+	irq = info.irq;
+
+	if (subversion == ESA && !info.irq_tr)
+		printk
+		    ("%s: warning, LEVEL triggering is suggested for IRQ %u.\n",
+		     name, irq);
+
+	if (is_pci) {
+		pdev = get_pci_dev(port_base);
+		if (!pdev)
+			printk
+			    ("%s: warning, failed to get pci_dev structure.\n",
+			     name);
+	} else
+		pdev = NULL;
+
+	if (pdev && (irq != pdev->irq)) {
+		printk("%s: IRQ %u mapped to IO-APIC IRQ %u.\n", name, irq,
+		       pdev->irq);
+		irq = pdev->irq;
+	}
+
+	/* Board detected, allocate its IRQ */
+	if (request_irq(irq, do_interrupt_handler,
+			SA_INTERRUPT | ((subversion == ESA) ? SA_SHIRQ : 0),
+			driver_name, (void *)&sha[j])) {
+		printk("%s: unable to allocate IRQ %u, detaching.\n", name,
+		       irq);
+		goto freelock;
+	}
+
+	if (subversion == ISA && request_dma(dma_channel, driver_name)) {
+		printk("%s: unable to allocate DMA channel %u, detaching.\n",
+		       name, dma_channel);
+		goto freeirq;
+	}
 #if defined(FORCE_CONFIG)
-   {
-   struct eata_config *cf;
-   dma_addr_t cf_dma_addr;
-
-   cf = pci_alloc_consistent(pdev, sizeof(struct eata_config), &cf_dma_addr);
-
-   if (!cf) {
-      printk("%s: config, pci_alloc_consistent failed, detaching.\n", name);
-      goto freedma;
-      }
-
-   /* Set board configuration */
-   memset((char *)cf, 0, sizeof(struct eata_config));
-   cf->len = (ushort) H2DEV16((ushort)510);
-   cf->ocena = 1;
-
-   if (do_dma(port_base, cf_dma_addr, SET_CONFIG_DMA)) {
-      printk("%s: busy timeout sending configuration, detaching.\n", name);
-      pci_free_consistent(pdev, sizeof(struct eata_config), cf, cf_dma_addr);
-      goto freedma;
-      }
-
-   }
-#endif
-
-   spin_unlock_irq(&driver_lock);
-   sh[j] = scsi_register(tpnt, sizeof(struct hostdata));
-   spin_lock_irq(&driver_lock);
-
-   if (sh[j] == NULL) {
-      printk("%s: unable to register host, detaching.\n", name);
-      goto freedma;
-      }
-
-   sh[j]->io_port = port_base;
-   sh[j]->unique_id = port_base;
-   sh[j]->n_io_port = REGION_SIZE;
-   sh[j]->dma_channel = dma_channel;
-   sh[j]->irq = irq;
-   sh[j]->sg_tablesize = (ushort) info.scatt_size;
-   sh[j]->this_id = (ushort) info.host_addr[3];
-   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;
-   HD(j)->protocol_rev = protocol_rev;
-   HD(j)->is_pci = is_pci;
-   HD(j)->pdev = pdev;
-   HD(j)->board_number = j;
-
-   if (HD(j)->subversion == ESA)
-      sh[j]->unchecked_isa_dma = 0;
-   else {
-      unsigned long flags;
-      sh[j]->unchecked_isa_dma = 1;
-
-      flags=claim_dma_lock();
-      disable_dma(dma_channel);
-      clear_dma_ff(dma_channel);
-      set_dma_mode(dma_channel, DMA_MODE_CASCADE);
-      enable_dma(dma_channel);
-      release_dma_lock(flags);
-
-      }
-
-   strcpy(BN(j), name);
-
-   /* DPT PM2012 does not allow to detect sg_tablesize correctly */
-   if (sh[j]->sg_tablesize > MAX_SGLIST || sh[j]->sg_tablesize < 2) {
-      printk("%s: detect, wrong n. of SG lists %d, fixed.\n",
-             BN(j), sh[j]->sg_tablesize);
-      sh[j]->sg_tablesize = MAX_SGLIST;
-      }
-
-   /* DPT PM2012 does not allow to detect can_queue correctly */
-   if (sh[j]->can_queue > MAX_MAILBOXES || sh[j]->can_queue  < 2) {
-      printk("%s: detect, wrong n. of mbox %d, fixed.\n",
-             BN(j), sh[j]->can_queue);
-      sh[j]->can_queue = MAX_MAILBOXES;
-      }
-
-   if (protocol_rev != 'A') {
-
-      if (info.max_chan > 0 && info.max_chan < MAX_CHANNEL)
-         sh[j]->max_channel = info.max_chan;
-
-      if (info.max_id > 7 && info.max_id < MAX_TARGET)
-         sh[j]->max_id = info.max_id + 1;
-
-      if (info.large_sg && sh[j]->sg_tablesize == MAX_SGLIST)
-         sh[j]->sg_tablesize = MAX_LARGE_SGLIST;
-      }
-
-   if (protocol_rev == 'C') {
-
-      if (info.max_lun > 7 && info.max_lun < MAX_LUN)
-         sh[j]->max_lun = info.max_lun + 1;
-      }
-
-   if (dma_channel == NO_DMA) sprintf(dma_name, "%s", "BMST");
-   else                       sprintf(dma_name, "DMA %u", dma_channel);
-
-   spin_unlock_irq(&driver_lock);
-
-   for (i = 0; i < sh[j]->can_queue; i++)
-      HD(j)->cp[i].cp_dma_addr = pci_map_single(HD(j)->pdev,
-            &HD(j)->cp[i], sizeof(struct mscp), PCI_DMA_BIDIRECTIONAL);
-
-   for (i = 0; i < sh[j]->can_queue; i++)
-      if (! ((&HD(j)->cp[i])->sglist = kmalloc(
-            sh[j]->sg_tablesize * sizeof(struct sg_list),
-            (sh[j]->unchecked_isa_dma ? GFP_DMA : 0) | GFP_ATOMIC))) {
-         printk("%s: kmalloc SGlist failed, mbox %d, detaching.\n", BN(j), i);
-         goto release;
-         }
-
-   if (! (HD(j)->sp_cpu_addr = pci_alloc_consistent(HD(j)->pdev,
-         sizeof(struct mssp), &HD(j)->sp_dma_addr))) {
-      printk("%s: pci_alloc_consistent failed, detaching.\n", BN(j));
-      goto release;
-      }
-
-   if (max_queue_depth > MAX_TAGGED_CMD_PER_LUN)
-       max_queue_depth = MAX_TAGGED_CMD_PER_LUN;
-
-   if (max_queue_depth < MAX_CMD_PER_LUN) max_queue_depth = MAX_CMD_PER_LUN;
-
-   if (tag_mode != TAG_DISABLED && tag_mode != TAG_SIMPLE)
-      tag_mode = TAG_ORDERED;
-
-   if (j == 0) {
-      printk("EATA/DMA 2.0x: Copyright (C) 1994-2003 Dario Ballabio.\n");
-      printk("%s config options -> tm:%d, lc:%c, mq:%d, rs:%c, et:%c, "\
-             "ip:%c, ep:%c, pp:%c.\n", driver_name, tag_mode,
-             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",
-          BN(j), HD(j)->protocol_rev, bus_type, (unsigned long)sh[j]->io_port,
-          sh[j]->irq, dma_name, sh[j]->sg_tablesize, sh[j]->can_queue);
-
-   if (sh[j]->max_id > 8 || sh[j]->max_lun > 8)
-      printk("%s: wide SCSI support enabled, max_id %u, max_lun %u.\n",
-             BN(j), sh[j]->max_id, sh[j]->max_lun);
-
-   for (i = 0; i <= sh[j]->max_channel; i++)
-      printk("%s: SCSI channel %u enabled, host target ID %d.\n",
-             BN(j), i, info.host_addr[3 - i]);
+	{
+		struct eata_config *cf;
+		dma_addr_t cf_dma_addr;
+
+		cf = pci_alloc_consistent(pdev, sizeof(struct eata_config),
+					  &cf_dma_addr);
+
+		if (!cf) {
+			printk
+			    ("%s: config, pci_alloc_consistent failed, detaching.\n",
+			     name);
+			goto freedma;
+		}
+
+		/* Set board configuration */
+		memset((char *)cf, 0, sizeof(struct eata_config));
+		cf->len = (ushort) H2DEV16((ushort) 510);
+		cf->ocena = 1;
+
+		if (do_dma(port_base, cf_dma_addr, SET_CONFIG_DMA)) {
+			printk
+			    ("%s: busy timeout sending configuration, detaching.\n",
+			     name);
+			pci_free_consistent(pdev, sizeof(struct eata_config),
+					    cf, cf_dma_addr);
+			goto freedma;
+		}
+
+	}
+#endif
+
+	spin_unlock_irq(&driver_lock);
+	sh[j] = shost = scsi_register(tpnt, sizeof(struct hostdata));
+	spin_lock_irq(&driver_lock);
+
+	if (shost == NULL) {
+		printk("%s: unable to register host, detaching.\n", name);
+		goto freedma;
+	}
+
+	shost->io_port = port_base;
+	shost->unique_id = port_base;
+	shost->n_io_port = REGION_SIZE;
+	shost->dma_channel = dma_channel;
+	shost->irq = irq;
+	shost->sg_tablesize = (ushort) info.scatt_size;
+	shost->this_id = (ushort) info.host_addr[3];
+	shost->can_queue = (ushort) info.queue_size;
+	shost->cmd_per_lun = MAX_CMD_PER_LUN;
+
+	ha = (struct hostdata *)shost->hostdata;
+	
+	memset(ha, 0, sizeof(struct hostdata));
+	ha->subversion = subversion;
+	ha->protocol_rev = protocol_rev;
+	ha->is_pci = is_pci;
+	ha->pdev = pdev;
+	ha->board_number = j;
+
+	if (ha->subversion == ESA)
+		shost->unchecked_isa_dma = 0;
+	else {
+		unsigned long flags;
+		shost->unchecked_isa_dma = 1;
+
+		flags = claim_dma_lock();
+		disable_dma(dma_channel);
+		clear_dma_ff(dma_channel);
+		set_dma_mode(dma_channel, DMA_MODE_CASCADE);
+		enable_dma(dma_channel);
+		release_dma_lock(flags);
+
+	}
+
+	strcpy(ha->board_name, name);
+
+	/* DPT PM2012 does not allow to detect sg_tablesize correctly */
+	if (shost->sg_tablesize > MAX_SGLIST || shost->sg_tablesize < 2) {
+		printk("%s: detect, wrong n. of SG lists %d, fixed.\n",
+		       ha->board_name, shost->sg_tablesize);
+		shost->sg_tablesize = MAX_SGLIST;
+	}
+
+	/* DPT PM2012 does not allow to detect can_queue correctly */
+	if (shost->can_queue > MAX_MAILBOXES || shost->can_queue < 2) {
+		printk("%s: detect, wrong n. of mbox %d, fixed.\n",
+		       ha->board_name, shost->can_queue);
+		shost->can_queue = MAX_MAILBOXES;
+	}
+
+	if (protocol_rev != 'A') {
+		if (info.max_chan > 0 && info.max_chan < MAX_CHANNEL)
+			shost->max_channel = info.max_chan;
+
+		if (info.max_id > 7 && info.max_id < MAX_TARGET)
+			shost->max_id = info.max_id + 1;
+
+		if (info.large_sg && shost->sg_tablesize == MAX_SGLIST)
+			shost->sg_tablesize = MAX_LARGE_SGLIST;
+	}
+
+	if (protocol_rev == 'C') {
+		if (info.max_lun > 7 && info.max_lun < MAX_LUN)
+			shost->max_lun = info.max_lun + 1;
+	}
+
+	if (dma_channel == NO_DMA)
+		sprintf(dma_name, "%s", "BMST");
+	else
+		sprintf(dma_name, "DMA %u", dma_channel);
+
+	spin_unlock_irq(&driver_lock);
+
+	for (i = 0; i < shost->can_queue; i++)
+		ha->cp[i].cp_dma_addr = pci_map_single(ha->pdev,
+							  &ha->cp[i],
+							  sizeof(struct mscp),
+							  PCI_DMA_BIDIRECTIONAL);
+
+	for (i = 0; i < shost->can_queue; i++) {
+		size_t sz = shost->sg_tablesize *sizeof(struct sg_list);
+		unsigned int gfp_mask = (shost->unchecked_isa_dma ? GFP_DMA : 0) | GFP_ATOMIC;
+		ha->cp[i].sglist = kmalloc(sz, gfp_mask);
+		if (!ha->cp[i].sglist) {
+			printk
+			    ("%s: kmalloc SGlist failed, mbox %d, detaching.\n",
+			     ha->board_name, i);
+			goto release;
+		}
+	}
+
+	if (!(ha->sp_cpu_addr = pci_alloc_consistent(ha->pdev,
+							sizeof(struct mssp),
+							&ha->sp_dma_addr))) {
+		printk("%s: pci_alloc_consistent failed, detaching.\n", ha->board_name);
+		goto release;
+	}
+
+	if (max_queue_depth > MAX_TAGGED_CMD_PER_LUN)
+		max_queue_depth = MAX_TAGGED_CMD_PER_LUN;
+
+	if (max_queue_depth < MAX_CMD_PER_LUN)
+		max_queue_depth = MAX_CMD_PER_LUN;
+
+	if (tag_mode != TAG_DISABLED && tag_mode != TAG_SIMPLE)
+		tag_mode = TAG_ORDERED;
+
+	if (j == 0) {
+		printk
+		    ("EATA/DMA 2.0x: Copyright (C) 1994-2003 Dario Ballabio.\n");
+		printk
+		    ("%s config options -> tm:%d, lc:%c, mq:%d, rs:%c, et:%c, "
+		     "ip:%c, ep:%c, pp:%c.\n", driver_name, tag_mode,
+		     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",
+	       ha->board_name, ha->protocol_rev, bus_type,
+	       (unsigned long)shost->io_port, shost->irq, dma_name,
+	       shost->sg_tablesize, shost->can_queue);
+
+	if (shost->max_id > 8 || shost->max_lun > 8)
+		printk
+		    ("%s: wide SCSI support enabled, max_id %u, max_lun %u.\n",
+		     ha->board_name, shost->max_id, shost->max_lun);
+
+	for (i = 0; i <= shost->max_channel; i++)
+		printk("%s: SCSI channel %u enabled, host target ID %d.\n",
+		       ha->board_name, i, info.host_addr[3 - i]);
 
 #if defined(DEBUG_DETECT)
-   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, 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, "\
-             "large_sg %u, res1 %u.\n", name, info.isaena, info.forcaddr,
-             info.max_id, info.max_chan, info.large_sg, info.res1);
-
-   if (protocol_rev == 'C')
-      printk("%s: max_lun %u, m1 %u, idquest %u, pci %u, eisa %u, "\
-             "raidnum %u.\n", name, info.max_lun, info.m1, info.idquest,
-             info.pci, info.eisa, info.raidnum);
-#endif
-
-   if (HD(j)->pdev) {
-      pci_set_master(HD(j)->pdev);
-      if (pci_set_dma_mask(HD(j)->pdev, 0xffffffff))
-         printk("%s: warning, pci_set_dma_mask failed.\n", BN(j));
-      }
-
-   return 1;
-
-freedma:
-   if (subversion == ISA) free_dma(dma_channel);
-freeirq:
-   free_irq(irq, &sha[j]);
-freelock:
-   spin_unlock_irq(&driver_lock);
-   release_region(port_base, REGION_SIZE);
-fail:
-   return 0;
-
-release:
-   eata2x_release(sh[j]);
-   return 0;
-}
-
-static void internal_setup(char *str, int *ints) {
-   int i, argc = ints[0];
-   char *cur = str, *pc;
-
-   if (argc > 0) {
-
-      if (argc > MAX_INT_PARAM) argc = MAX_INT_PARAM;
-
-      for (i = 0; i < argc; i++) io_port[i] = ints[i + 1];
-
-      io_port[i] = 0;
-      setup_done = 1;
-      }
-
-   while (cur && (pc = strchr(cur, ':'))) {
-      int val = 0, c = *++pc;
-
-      if (c == 'n' || c == 'N') val = 0;
-      else if (c == 'y' || c == 'Y') val = 1;
-      else val = (int) simple_strtoul(pc, NULL, 0);
-
-      if (!strncmp(cur, "lc:", 3)) linked_comm = val;
-      else if (!strncmp(cur, "tm:", 3)) tag_mode = val;
-      else if (!strncmp(cur, "tc:", 3)) tag_mode = val;
-      else if (!strncmp(cur, "mq:", 3))  max_queue_depth = val;
-      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;
-      }
-
-   return;
-}
-
-static int option_setup(char *str) {
-   int ints[MAX_INT_PARAM];
-   char *cur = str;
-   int i = 1;
-
-   while (cur && isdigit(*cur) && i <= MAX_INT_PARAM) {
-      ints[i++] = simple_strtoul(cur, NULL, 0);
-
-      if ((cur = strchr(cur, ',')) != NULL) cur++;
-   }
-
-   ints[0] = i - 1;
-   internal_setup(cur, ints);
-   return 1;
+	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, 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, "
+		       "large_sg %u, res1 %u.\n", name, info.isaena,
+		       info.forcaddr, info.max_id, info.max_chan, info.large_sg,
+		       info.res1);
+
+	if (protocol_rev == 'C')
+		printk("%s: max_lun %u, m1 %u, idquest %u, pci %u, eisa %u, "
+		       "raidnum %u.\n", name, info.max_lun, info.m1,
+		       info.idquest, info.pci, info.eisa, info.raidnum);
+#endif
+
+	if (ha->pdev) {
+		pci_set_master(ha->pdev);
+		if (pci_set_dma_mask(ha->pdev, 0xffffffff))
+			printk("%s: warning, pci_set_dma_mask failed.\n",
+			       ha->board_name);
+	}
+
+	return 1;
+
+      freedma:
+	if (subversion == ISA)
+		free_dma(dma_channel);
+      freeirq:
+	free_irq(irq, &sha[j]);
+      freelock:
+	spin_unlock_irq(&driver_lock);
+	release_region(port_base, REGION_SIZE);
+      fail:
+	return 0;
+
+      release:
+	eata2x_release(shost);
+	return 0;
+}
+
+static void internal_setup(char *str, int *ints)
+{
+	int i, argc = ints[0];
+	char *cur = str, *pc;
+
+	if (argc > 0) {
+		if (argc > MAX_INT_PARAM)
+			argc = MAX_INT_PARAM;
+
+		for (i = 0; i < argc; i++)
+			io_port[i] = ints[i + 1];
+
+		io_port[i] = 0;
+		setup_done = 1;
+	}
+
+	while (cur && (pc = strchr(cur, ':'))) {
+		int val = 0, c = *++pc;
+
+		if (c == 'n' || c == 'N')
+			val = 0;
+		else if (c == 'y' || c == 'Y')
+			val = 1;
+		else
+			val = (int)simple_strtoul(pc, NULL, 0);
+
+		if (!strncmp(cur, "lc:", 3))
+			linked_comm = val;
+		else if (!strncmp(cur, "tm:", 3))
+			tag_mode = val;
+		else if (!strncmp(cur, "tc:", 3))
+			tag_mode = val;
+		else if (!strncmp(cur, "mq:", 3))
+			max_queue_depth = val;
+		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;
+	}
+
+	return;
+}
+
+static int option_setup(char *str)
+{
+	int ints[MAX_INT_PARAM];
+	char *cur = str;
+	int i = 1;
+
+	while (cur && isdigit(*cur) && i <= MAX_INT_PARAM) {
+		ints[i++] = simple_strtoul(cur, NULL, 0);
+
+		if ((cur = strchr(cur, ',')) != NULL)
+			cur++;
+	}
+
+	ints[0] = i - 1;
+	internal_setup(cur, ints);
+	return 1;
 }
 
-static void add_pci_ports(void) {
-
+static void add_pci_ports(void)
+{
 #if defined(CONFIG_PCI)
+	unsigned int addr, k;
+	struct pci_dev *dev = NULL;
 
-   unsigned int addr, k;
-
-   struct pci_dev *dev = NULL;
-
-   for (k = 0; k < MAX_PCI; k++) {
-
-      if (!(dev = pci_get_class(PCI_CLASS_STORAGE_SCSI << 8, dev))) break;
+	for (k = 0; k < MAX_PCI; k++) {
 
-      if (pci_enable_device (dev)) {
+		if (!(dev = pci_get_class(PCI_CLASS_STORAGE_SCSI << 8, dev)))
+			break;
 
+		if (pci_enable_device(dev)) {
 #if defined(DEBUG_PCI_DETECT)
-         printk("%s: detect, bus %d, devfn 0x%x, pci_enable_device failed.\n",
-                driver_name, dev->bus->number, dev->devfn);
+			printk
+			    ("%s: detect, bus %d, devfn 0x%x, pci_enable_device failed.\n",
+			     driver_name, dev->bus->number, dev->devfn);
 #endif
 
-         continue;
-         }
+			continue;
+		}
 
-      addr = pci_resource_start (dev, 0);
+		addr = pci_resource_start(dev, 0);
 
 #if defined(DEBUG_PCI_DETECT)
-      printk("%s: detect, seq. %d, bus %d, devfn 0x%x, addr 0x%x.\n",
-             driver_name, k, dev->bus->number, dev->devfn, addr);
+		printk("%s: detect, seq. %d, bus %d, devfn 0x%x, addr 0x%x.\n",
+		       driver_name, k, dev->bus->number, dev->devfn, addr);
 #endif
 
-      /* Order addresses according to rev_scan value */
-      io_port[MAX_INT_PARAM + (rev_scan ? (MAX_PCI - k) : (1 + k))] =
-             addr + PCI_BASE_ADDRESS_0;
-      }
+		/* Order addresses according to rev_scan value */
+		io_port[MAX_INT_PARAM + (rev_scan ? (MAX_PCI - k) : (1 + k))] =
+		    addr + PCI_BASE_ADDRESS_0;
+	}
 
-   pci_dev_put(dev);
-#endif /* end CONFIG_PCI */
-
-   return;
+	pci_dev_put(dev);
+#endif				/* end CONFIG_PCI */
 }
 
-static int eata2x_detect(struct scsi_host_template *tpnt) {
-   unsigned int j = 0, k;
+static int eata2x_detect(struct scsi_host_template *tpnt)
+{
+	unsigned int j = 0, k;
 
-   tpnt->proc_name = "eata2x";
+	tpnt->proc_name = "eata2x";
 
-   if(strlen(boot_options)) option_setup(boot_options);
+	if (strlen(boot_options))
+		option_setup(boot_options);
 
 #if defined(MODULE)
-   /* io_port could have been modified when loading as a module */
-   if(io_port[0] != SKIP) {
-      setup_done = 1;
-      io_port[MAX_INT_PARAM] = 0;
-      }
-#endif
-
-   for (k = 0; k < MAX_BOARDS + 1; k++) sh[k] = NULL;
-
-   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++) {
-
-      if (io_port[k] == SKIP) continue;
-
-      if (j < MAX_BOARDS && port_detect(io_port[k], j, tpnt)) j++;
-      }
-
-   num_boards = j;
-   return j;
-}
-
-static void map_dma(unsigned int i, unsigned int j) {
-   unsigned int k, count, pci_dir;
-   struct scatterlist *sgpnt;
-   struct mscp *cpp;
-   struct scsi_cmnd *SCpnt;
-
-   cpp = &HD(j)->cp[i]; SCpnt = cpp->SCpnt;
-   pci_dir = SCpnt->sc_data_direction;
-
-   if (SCpnt->sense_buffer)
-      cpp->sense_addr = H2DEV(pci_map_single(HD(j)->pdev, SCpnt->sense_buffer,
-                           sizeof SCpnt->sense_buffer, PCI_DMA_FROMDEVICE));
-
-   cpp->sense_len = sizeof SCpnt->sense_buffer;
-
-   if (!SCpnt->use_sg) {
+	/* io_port could have been modified when loading as a module */
+	if (io_port[0] != SKIP) {
+		setup_done = 1;
+		io_port[MAX_INT_PARAM] = 0;
+	}
+#endif
+
+	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++) {
+
+		if (io_port[k] == SKIP)
+			continue;
+
+		if (j < MAX_BOARDS && port_detect(io_port[k], j, tpnt))
+			j++;
+	}
+
+	num_boards = j;
+	return j;
+}
+
+static void map_dma(unsigned int i, struct hostdata *ha)
+{
+	unsigned int k, count, pci_dir;
+	struct scatterlist *sgpnt;
+	struct mscp *cpp;
+	struct scsi_cmnd *SCpnt;
+
+	cpp = &ha->cp[i];
+	SCpnt = cpp->SCpnt;
+	pci_dir = SCpnt->sc_data_direction;
+
+	if (SCpnt->sense_buffer)
+		cpp->sense_addr =
+		    H2DEV(pci_map_single(ha->pdev, SCpnt->sense_buffer,
+			   sizeof SCpnt->sense_buffer, PCI_DMA_FROMDEVICE));
+
+	cpp->sense_len = sizeof SCpnt->sense_buffer;
+
+	if (!SCpnt->use_sg) {
+
+		/* If we get here with PCI_DMA_NONE, pci_map_single triggers a BUG() */
+		if (!SCpnt->request_bufflen)
+			pci_dir = PCI_DMA_BIDIRECTIONAL;
+
+		if (SCpnt->request_buffer)
+			cpp->data_address = H2DEV(pci_map_single(ha->pdev,
+								 SCpnt->
+								 request_buffer,
+								 SCpnt->
+								 request_bufflen,
+								 pci_dir));
+
+		cpp->data_len = H2DEV(SCpnt->request_bufflen);
+		return;
+	}
+
+	sgpnt = (struct scatterlist *)SCpnt->request_buffer;
+	count = pci_map_sg(ha->pdev, sgpnt, SCpnt->use_sg, pci_dir);
+
+	for (k = 0; k < count; k++) {
+		cpp->sglist[k].address = H2DEV(sg_dma_address(&sgpnt[k]));
+		cpp->sglist[k].num_bytes = H2DEV(sg_dma_len(&sgpnt[k]));
+	}
+
+	cpp->sg = 1;
+	cpp->data_address = H2DEV(pci_map_single(ha->pdev, cpp->sglist,
+						 SCpnt->use_sg *
+						 sizeof(struct sg_list),
+						 pci_dir));
+	cpp->data_len = H2DEV((SCpnt->use_sg * sizeof(struct sg_list)));
+}
+
+static void unmap_dma(unsigned int i, struct hostdata *ha)
+{
+	unsigned int pci_dir;
+	struct mscp *cpp;
+	struct scsi_cmnd *SCpnt;
+
+	cpp = &ha->cp[i];
+	SCpnt = cpp->SCpnt;
+	pci_dir = SCpnt->sc_data_direction;
+
+	if (DEV2H(cpp->sense_addr))
+		pci_unmap_single(ha->pdev, DEV2H(cpp->sense_addr),
+				 DEV2H(cpp->sense_len), PCI_DMA_FROMDEVICE);
+
+	if (SCpnt->use_sg)
+		pci_unmap_sg(ha->pdev, SCpnt->request_buffer, SCpnt->use_sg,
+			     pci_dir);
+
+	if (!DEV2H(cpp->data_len))
+		pci_dir = PCI_DMA_BIDIRECTIONAL;
+
+	if (DEV2H(cpp->data_address))
+		pci_unmap_single(ha->pdev, DEV2H(cpp->data_address),
+				 DEV2H(cpp->data_len), pci_dir);
+}
+
+static void sync_dma(unsigned int i, struct hostdata *ha)
+{
+	unsigned int pci_dir;
+	struct mscp *cpp;
+	struct scsi_cmnd *SCpnt;
+
+	cpp = &ha->cp[i];
+	SCpnt = cpp->SCpnt;
+	pci_dir = SCpnt->sc_data_direction;
+
+	if (DEV2H(cpp->sense_addr))
+		pci_dma_sync_single_for_cpu(ha->pdev, DEV2H(cpp->sense_addr),
+					    DEV2H(cpp->sense_len),
+					    PCI_DMA_FROMDEVICE);
+
+	if (SCpnt->use_sg)
+		pci_dma_sync_sg_for_cpu(ha->pdev, SCpnt->request_buffer,
+					SCpnt->use_sg, pci_dir);
+
+	if (!DEV2H(cpp->data_len))
+		pci_dir = PCI_DMA_BIDIRECTIONAL;
+
+	if (DEV2H(cpp->data_address))
+		pci_dma_sync_single_for_cpu(ha->pdev,
+					    DEV2H(cpp->data_address),
+					    DEV2H(cpp->data_len), pci_dir);
+}
+
+static void scsi_to_dev_dir(unsigned int i, struct hostdata *ha)
+{
+	unsigned int k;
+
+	static const unsigned char data_out_cmds[] = {
+		0x0a, 0x2a, 0x15, 0x55, 0x04, 0x07, 0x18, 0x1d, 0x24, 0x2e,
+		0x30, 0x31, 0x32, 0x38, 0x39, 0x3a, 0x3b, 0x3d, 0x3f, 0x40,
+		0x41, 0x4c, 0xaa, 0xae, 0xb0, 0xb1, 0xb2, 0xb6, 0xea, 0x1b, 0x5d
+	};
+
+	static const unsigned char data_none_cmds[] = {
+		0x01, 0x0b, 0x10, 0x11, 0x13, 0x16, 0x17, 0x19, 0x2b, 0x1e,
+		0x2c, 0xac, 0x2f, 0xaf, 0x33, 0xb3, 0x35, 0x36, 0x45, 0x47,
+		0x48, 0x49, 0xa9, 0x4b, 0xa5, 0xa6, 0xb5, 0x00
+	};
+
+	struct mscp *cpp;
+	struct scsi_cmnd *SCpnt;
+
+	cpp = &ha->cp[i];
+	SCpnt = cpp->SCpnt;
+
+	if (SCpnt->sc_data_direction == DMA_FROM_DEVICE) {
+		cpp->din = 1;
+		cpp->dout = 0;
+		return;
+	} else if (SCpnt->sc_data_direction == DMA_TO_DEVICE) {
+		cpp->din = 0;
+		cpp->dout = 1;
+		return;
+	} else if (SCpnt->sc_data_direction == DMA_NONE) {
+		cpp->din = 0;
+		cpp->dout = 0;
+		return;
+	}
+
+	if (SCpnt->sc_data_direction != DMA_BIDIRECTIONAL)
+		panic("%s: qcomm, invalid SCpnt->sc_data_direction.\n",
+				ha->board_name);
+
+	for (k = 0; k < ARRAY_SIZE(data_out_cmds); k++)
+		if (SCpnt->cmnd[0] == data_out_cmds[k]) {
+			cpp->dout = 1;
+			break;
+		}
+
+	if ((cpp->din = !cpp->dout))
+		for (k = 0; k < ARRAY_SIZE(data_none_cmds); k++)
+			if (SCpnt->cmnd[0] == data_none_cmds[k]) {
+				cpp->din = 0;
+				break;
+			}
+
+}
+
+static int eata2x_queuecommand(struct scsi_cmnd *SCpnt,
+			       void (*done) (struct scsi_cmnd *))
+{
+	struct Scsi_Host *shost = SCpnt->device->host;
+	struct hostdata *ha = (struct hostdata *)shost->hostdata;
+	unsigned int i, k;
+	struct mscp *cpp;
+
+	if (SCpnt->host_scribble)
+		panic("%s: qcomm, pid %ld, SCpnt %p already active.\n",
+		      ha->board_name, SCpnt->pid, SCpnt);
+
+	/* i is the mailbox number, look for the first free mailbox
+	   starting from last_cp_used */
+	i = ha->last_cp_used + 1;
+
+	for (k = 0; k < shost->can_queue; k++, i++) {
+		if (i >= shost->can_queue)
+			i = 0;
+		if (ha->cp_stat[i] == FREE) {
+			ha->last_cp_used = i;
+			break;
+		}
+	}
+
+	if (k == shost->can_queue) {
+		printk("%s: qcomm, no free mailbox.\n", ha->board_name);
+		return 1;
+	}
+
+	/* Set pointer to control packet structure */
+	cpp = &ha->cp[i];
+
+	memset(cpp, 0, sizeof(struct mscp) - CP_TAIL_SIZE);
+
+	/* Set pointer to status packet structure, Big Endian format */
+	cpp->sp_dma_addr = H2DEV(ha->sp_dma_addr);
+
+	SCpnt->scsi_done = done;
+	cpp->cpp_index = i;
+	SCpnt->host_scribble = (unsigned char *)&cpp->cpp_index;
+
+	if (do_trace)
+		printk("%s: qcomm, mbox %d, target %d.%d:%d, pid %ld.\n",
+		       ha->board_name, i, SCpnt->device->channel, SCpnt->device->id,
+		       SCpnt->device->lun, SCpnt->pid);
 
-      /* If we get here with PCI_DMA_NONE, pci_map_single triggers a BUG() */
-      if (!SCpnt->request_bufflen) pci_dir = PCI_DMA_BIDIRECTIONAL;
-
-      if (SCpnt->request_buffer)
-         cpp->data_address = H2DEV(pci_map_single(HD(j)->pdev,
-                  SCpnt->request_buffer, SCpnt->request_bufflen, pci_dir));
-
-      cpp->data_len = H2DEV(SCpnt->request_bufflen);
-      return;
-      }
-
-   sgpnt = (struct scatterlist *) SCpnt->request_buffer;
-   count = pci_map_sg(HD(j)->pdev, sgpnt, SCpnt->use_sg, pci_dir);
-
-   for (k = 0; k < count; k++) {
-      cpp->sglist[k].address = H2DEV(sg_dma_address(&sgpnt[k]));
-      cpp->sglist[k].num_bytes = H2DEV(sg_dma_len(&sgpnt[k]));
-      }
-
-   cpp->sg = 1;
-   cpp->data_address = H2DEV(pci_map_single(HD(j)->pdev, cpp->sglist,
-                             SCpnt->use_sg * sizeof(struct sg_list), pci_dir));
-   cpp->data_len = H2DEV((SCpnt->use_sg * sizeof(struct sg_list)));
-}
-
-static void unmap_dma(unsigned int i, unsigned int j) {
-   unsigned int pci_dir;
-   struct mscp *cpp;
-   struct scsi_cmnd *SCpnt;
-
-   cpp = &HD(j)->cp[i]; SCpnt = cpp->SCpnt;
-   pci_dir = SCpnt->sc_data_direction;
-
-   if (DEV2H(cpp->sense_addr))
-      pci_unmap_single(HD(j)->pdev, DEV2H(cpp->sense_addr),
-                       DEV2H(cpp->sense_len), PCI_DMA_FROMDEVICE);
-
-   if (SCpnt->use_sg)
-      pci_unmap_sg(HD(j)->pdev, SCpnt->request_buffer, SCpnt->use_sg, pci_dir);
-
-   if (!DEV2H(cpp->data_len)) pci_dir = PCI_DMA_BIDIRECTIONAL;
-
-   if (DEV2H(cpp->data_address))
-      pci_unmap_single(HD(j)->pdev, DEV2H(cpp->data_address),
-                       DEV2H(cpp->data_len), pci_dir);
-}
-
-static void sync_dma(unsigned int i, unsigned int j) {
-   unsigned int pci_dir;
-   struct mscp *cpp;
-   struct scsi_cmnd *SCpnt;
-
-   cpp = &HD(j)->cp[i]; SCpnt = cpp->SCpnt;
-   pci_dir = SCpnt->sc_data_direction;
-
-   if (DEV2H(cpp->sense_addr))
-      pci_dma_sync_single_for_cpu(HD(j)->pdev, DEV2H(cpp->sense_addr),
-                          DEV2H(cpp->sense_len), PCI_DMA_FROMDEVICE);
-
-   if (SCpnt->use_sg)
-      pci_dma_sync_sg_for_cpu(HD(j)->pdev, SCpnt->request_buffer,
-                         SCpnt->use_sg, pci_dir);
-
-   if (!DEV2H(cpp->data_len)) pci_dir = PCI_DMA_BIDIRECTIONAL;
-
-   if (DEV2H(cpp->data_address))
-      pci_dma_sync_single_for_cpu(HD(j)->pdev, DEV2H(cpp->data_address),
-                       DEV2H(cpp->data_len), pci_dir);
-}
-
-static void scsi_to_dev_dir(unsigned int i, unsigned int j) {
-   unsigned int k;
-
-   static const unsigned char data_out_cmds[] = {
-      0x0a, 0x2a, 0x15, 0x55, 0x04, 0x07, 0x18, 0x1d, 0x24, 0x2e,
-      0x30, 0x31, 0x32, 0x38, 0x39, 0x3a, 0x3b, 0x3d, 0x3f, 0x40,
-      0x41, 0x4c, 0xaa, 0xae, 0xb0, 0xb1, 0xb2, 0xb6, 0xea, 0x1b, 0x5d
-      };
-
-   static const unsigned char data_none_cmds[] = {
-      0x01, 0x0b, 0x10, 0x11, 0x13, 0x16, 0x17, 0x19, 0x2b, 0x1e,
-      0x2c, 0xac, 0x2f, 0xaf, 0x33, 0xb3, 0x35, 0x36, 0x45, 0x47,
-      0x48, 0x49, 0xa9, 0x4b, 0xa5, 0xa6, 0xb5, 0x00
-      };
-
-   struct mscp *cpp;
-   struct scsi_cmnd *SCpnt;
-
-   cpp = &HD(j)->cp[i]; SCpnt = cpp->SCpnt;
-
-   if (SCpnt->sc_data_direction == DMA_FROM_DEVICE) {
-      cpp->din  = 1;
-      cpp->dout = 0;
-      return;
-      }
-   else if (SCpnt->sc_data_direction == DMA_TO_DEVICE) {
-      cpp->din  = 0;
-      cpp->dout = 1;
-      return;
-      }
-   else if (SCpnt->sc_data_direction == DMA_NONE) {
-      cpp->din  = 0;
-      cpp->dout = 0;
-      return;
-      }
-
-   if (SCpnt->sc_data_direction != DMA_BIDIRECTIONAL)
-      panic("%s: qcomm, invalid SCpnt->sc_data_direction.\n", BN(j));
-
-   for (k = 0; k < ARRAY_SIZE(data_out_cmds); k++)
-      if (SCpnt->cmnd[0] == data_out_cmds[k]) {
-         cpp->dout = 1;
-         break;
-         }
-
-   if ((cpp->din = !cpp->dout))
-      for (k = 0; k < ARRAY_SIZE(data_none_cmds); k++)
-         if (SCpnt->cmnd[0] == data_none_cmds[k]) {
-            cpp->din = 0;
-            break;
-            }
-
-}
-
-static int eata2x_queuecommand(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *)) {
-   unsigned int i, j, k;
-   struct mscp *cpp;
-
-   /* j is the board number */
-   j = ((struct hostdata *) SCpnt->device->host->hostdata)->board_number;
-
-   if (SCpnt->host_scribble)
-      panic("%s: qcomm, pid %ld, SCpnt %p already active.\n",
-            BN(j), SCpnt->pid, SCpnt);
-
-   /* i is the mailbox number, look for the first free mailbox
-      starting from last_cp_used */
-   i = HD(j)->last_cp_used + 1;
-
-   for (k = 0; k < sh[j]->can_queue; k++, i++) {
-
-      if (i >= sh[j]->can_queue) i = 0;
-
-      if (HD(j)->cp_stat[i] == FREE) {
-         HD(j)->last_cp_used = i;
-         break;
-         }
-      }
-
-   if (k == sh[j]->can_queue) {
-      printk("%s: qcomm, no free mailbox.\n", BN(j));
-      return 1;
-      }
-
-   /* Set pointer to control packet structure */
-   cpp = &HD(j)->cp[i];
-
-   memset(cpp, 0, sizeof(struct mscp) - CP_TAIL_SIZE);
-
-   /* Set pointer to status packet structure, Big Endian format */
-   cpp->sp_dma_addr = H2DEV(HD(j)->sp_dma_addr);
-
-   SCpnt->scsi_done = done;
-   cpp->cpp_index = i;
-   SCpnt->host_scribble = (unsigned char *) &cpp->cpp_index;
-
-   if (do_trace) printk("%s: qcomm, mbox %d, target %d.%d:%d, pid %ld.\n",
-                        BN(j), i, SCpnt->device->channel, SCpnt->device->id,
-                        SCpnt->device->lun, SCpnt->pid);
-
-   cpp->reqsen = 1;
-   cpp->dispri = 1;
+	cpp->reqsen = 1;
+	cpp->dispri = 1;
 #if 0
-   if (SCpnt->device->type == TYPE_TAPE) cpp->hbaci = 1;
+	if (SCpnt->device->type == TYPE_TAPE)
+		cpp->hbaci = 1;
 #endif
-   cpp->one = 1;
-   cpp->channel = SCpnt->device->channel;
-   cpp->target = SCpnt->device->id;
-   cpp->lun = SCpnt->device->lun;
-   cpp->SCpnt = SCpnt;
-   memcpy(cpp->cdb, SCpnt->cmnd, SCpnt->cmd_len);
-
-   /* Use data transfer direction SCpnt->sc_data_direction */
-   scsi_to_dev_dir(i, j);
-
-   /* Map DMA buffers and SG list */
-   map_dma(i, j);
-
-   if (linked_comm && SCpnt->device->queue_depth > 2
-                                     && TLDEV(SCpnt->device->type)) {
-      HD(j)->cp_stat[i] = READY;
-      flush_dev(SCpnt->device, SCpnt->request->sector, j, 0);
-      return 0;
-      }
-
-   /* Send control packet to the board */
-   if (do_dma(sh[j]->io_port, cpp->cp_dma_addr, SEND_CP_DMA)) {
-      unmap_dma(i, j);
-      SCpnt->host_scribble = NULL;
-      printk("%s: qcomm, target %d.%d:%d, pid %ld, adapter busy.\n",
-             BN(j), SCpnt->device->channel, SCpnt->device->id, SCpnt->device->lun, SCpnt->pid);
-      return 1;
-      }
-
-   HD(j)->cp_stat[i] = IN_USE;
-   return 0;
-}
-
-static int eata2x_eh_abort(struct scsi_cmnd *SCarg) {
-   unsigned int i, j;
-
-   j = ((struct hostdata *) SCarg->device->host->hostdata)->board_number;
-
-   if (SCarg->host_scribble == NULL) {
-      printk("%s: abort, target %d.%d:%d, pid %ld inactive.\n",
-             BN(j), SCarg->device->channel, SCarg->device->id, SCarg->device->lun, SCarg->pid);
-      return SUCCESS;
-      }
-
-   i = *(unsigned int *)SCarg->host_scribble;
-   printk("%s: abort, mbox %d, target %d.%d:%d, pid %ld.\n",
-          BN(j), i, SCarg->device->channel, SCarg->device->id, SCarg->device->lun, SCarg->pid);
-
-   if (i >= sh[j]->can_queue)
-      panic("%s: abort, invalid SCarg->host_scribble.\n", BN(j));
-
-   if (wait_on_busy(sh[j]->io_port, MAXLOOP)) {
-      printk("%s: abort, timeout error.\n", BN(j));
-      return FAILED;
-      }
-
-   if (HD(j)->cp_stat[i] == FREE) {
-      printk("%s: abort, mbox %d is free.\n", BN(j), i);
-      return SUCCESS;
-      }
-
-   if (HD(j)->cp_stat[i] == IN_USE) {
-      printk("%s: abort, mbox %d is in use.\n", BN(j), i);
-
-      if (SCarg != HD(j)->cp[i].SCpnt)
-         panic("%s: abort, mbox %d, SCarg %p, cp SCpnt %p.\n",
-               BN(j), i, SCarg, HD(j)->cp[i].SCpnt);
-
-      if (inb(sh[j]->io_port + REG_AUX_STATUS) & IRQ_ASSERTED)
-         printk("%s: abort, mbox %d, interrupt pending.\n", BN(j), i);
-
-      if (SCarg->eh_state == SCSI_STATE_TIMEOUT) {
-         unmap_dma(i, j);
-         SCarg->host_scribble = NULL;
-         HD(j)->cp_stat[i] = FREE;
-         printk("%s, abort, mbox %d, eh_state timeout, pid %ld.\n",
-                BN(j), i, SCarg->pid);
-         return SUCCESS;
-         }
-
-      return FAILED;
-      }
-
-   if (HD(j)->cp_stat[i] == IN_RESET) {
-      printk("%s: abort, mbox %d is in reset.\n", BN(j), i);
-      return FAILED;
-      }
-
-   if (HD(j)->cp_stat[i] == LOCKED) {
-      printk("%s: abort, mbox %d is locked.\n", BN(j), i);
-      return SUCCESS;
-      }
-
-   if (HD(j)->cp_stat[i] == READY || HD(j)->cp_stat[i] == ABORTING) {
-      unmap_dma(i, j);
-      SCarg->result = DID_ABORT << 16;
-      SCarg->host_scribble = NULL;
-      HD(j)->cp_stat[i] = FREE;
-      printk("%s, abort, mbox %d ready, DID_ABORT, pid %ld done.\n",
-             BN(j), i, SCarg->pid);
-      SCarg->scsi_done(SCarg);
-      return SUCCESS;
-      }
-
-   panic("%s: abort, mbox %d, invalid cp_stat.\n", BN(j), i);
-}
-
-static int eata2x_eh_host_reset(struct scsi_cmnd *SCarg) {
-   unsigned int i, j, time, k, c, limit = 0;
-   int arg_done = 0;
-   struct scsi_cmnd *SCpnt;
-
-   j = ((struct hostdata *) SCarg->device->host->hostdata)->board_number;
-   printk("%s: reset, enter, target %d.%d:%d, pid %ld.\n",
-          BN(j), SCarg->device->channel, SCarg->device->id, SCarg->device->lun, SCarg->pid);
-
-   if (SCarg->host_scribble == NULL)
-      printk("%s: reset, pid %ld inactive.\n", BN(j), SCarg->pid);
-
-   if (HD(j)->in_reset) {
-      printk("%s: reset, exit, already in reset.\n", BN(j));
-      return FAILED;
-      }
-
-   if (wait_on_busy(sh[j]->io_port, MAXLOOP)) {
-      printk("%s: reset, exit, timeout error.\n", BN(j));
-      return FAILED;
-      }
-
-   HD(j)->retries = 0;
-
-   for (c = 0; c <= sh[j]->max_channel; c++)
-      for (k = 0; k < sh[j]->max_id; k++) {
-         HD(j)->target_redo[k][c] = 1;
-         HD(j)->target_to[k][c] = 0;
-         }
-
-   for (i = 0; i < sh[j]->can_queue; i++) {
-
-      if (HD(j)->cp_stat[i] == FREE) continue;
-
-      if (HD(j)->cp_stat[i] == LOCKED) {
-         HD(j)->cp_stat[i] = FREE;
-         printk("%s: reset, locked mbox %d forced free.\n", BN(j), i);
-         continue;
-         }
-
-      if (!(SCpnt = HD(j)->cp[i].SCpnt))
-         panic("%s: reset, mbox %d, SCpnt == NULL.\n", BN(j), i);
-
-      if (HD(j)->cp_stat[i] == READY || HD(j)->cp_stat[i] == ABORTING) {
-         HD(j)->cp_stat[i] = ABORTING;
-         printk("%s: reset, mbox %d aborting, pid %ld.\n",
-                BN(j), i, SCpnt->pid);
-         }
-
-      else {
-         HD(j)->cp_stat[i] = IN_RESET;
-         printk("%s: reset, mbox %d in reset, pid %ld.\n",
-                BN(j), i, SCpnt->pid);
-         }
-
-      if (SCpnt->host_scribble == NULL)
-         panic("%s: reset, mbox %d, garbled SCpnt.\n", BN(j), i);
-
-      if (*(unsigned int *)SCpnt->host_scribble != i)
-         panic("%s: reset, mbox %d, index mismatch.\n", BN(j), i);
-
-      if (SCpnt->scsi_done == NULL)
-         panic("%s: reset, mbox %d, SCpnt->scsi_done == NULL.\n", BN(j), i);
-
-      if (SCpnt == SCarg) arg_done = 1;
-      }
-
-   if (do_dma(sh[j]->io_port, 0, RESET_PIO)) {
-      printk("%s: reset, cannot reset, timeout error.\n", BN(j));
-      return FAILED;
-      }
+	cpp->one = 1;
+	cpp->channel = SCpnt->device->channel;
+	cpp->target = SCpnt->device->id;
+	cpp->lun = SCpnt->device->lun;
+	cpp->SCpnt = SCpnt;
+	memcpy(cpp->cdb, SCpnt->cmnd, SCpnt->cmd_len);
+
+	/* Use data transfer direction SCpnt->sc_data_direction */
+	scsi_to_dev_dir(i, ha);
+
+	/* Map DMA buffers and SG list */
+	map_dma(i, ha);
+
+	if (linked_comm && SCpnt->device->queue_depth > 2
+	    && TLDEV(SCpnt->device->type)) {
+		ha->cp_stat[i] = READY;
+		flush_dev(SCpnt->device, SCpnt->request->sector, ha, 0);
+		return 0;
+	}
+
+	/* Send control packet to the board */
+	if (do_dma(shost->io_port, cpp->cp_dma_addr, SEND_CP_DMA)) {
+		unmap_dma(i, ha);
+		SCpnt->host_scribble = NULL;
+		printk("%s: qcomm, target %d.%d:%d, pid %ld, adapter busy.\n",
+		       ha->board_name, SCpnt->device->channel, SCpnt->device->id,
+		       SCpnt->device->lun, SCpnt->pid);
+		return 1;
+	}
+
+	ha->cp_stat[i] = IN_USE;
+	return 0;
+}
+
+static int eata2x_eh_abort(struct scsi_cmnd *SCarg)
+{
+	struct Scsi_Host *shost = SCarg->device->host;
+	struct hostdata *ha = (struct hostdata *)shost->hostdata;
+	unsigned int i;
+
+	if (SCarg->host_scribble == NULL) {
+		printk("%s: abort, target %d.%d:%d, pid %ld inactive.\n",
+		       ha->board_name, SCarg->device->channel, SCarg->device->id,
+		       SCarg->device->lun, SCarg->pid);
+		return SUCCESS;
+	}
+
+	i = *(unsigned int *)SCarg->host_scribble;
+	printk("%s: abort, mbox %d, target %d.%d:%d, pid %ld.\n",
+	       ha->board_name, i, SCarg->device->channel, SCarg->device->id,
+	       SCarg->device->lun, SCarg->pid);
+
+	if (i >= shost->can_queue)
+		panic("%s: abort, invalid SCarg->host_scribble.\n", ha->board_name);
+
+	if (wait_on_busy(shost->io_port, MAXLOOP)) {
+		printk("%s: abort, timeout error.\n", ha->board_name);
+		return FAILED;
+	}
+
+	if (ha->cp_stat[i] == FREE) {
+		printk("%s: abort, mbox %d is free.\n", ha->board_name, i);
+		return SUCCESS;
+	}
+
+	if (ha->cp_stat[i] == IN_USE) {
+		printk("%s: abort, mbox %d is in use.\n", ha->board_name, i);
+
+		if (SCarg != ha->cp[i].SCpnt)
+			panic("%s: abort, mbox %d, SCarg %p, cp SCpnt %p.\n",
+			      ha->board_name, i, SCarg, ha->cp[i].SCpnt);
+
+		if (inb(shost->io_port + REG_AUX_STATUS) & IRQ_ASSERTED)
+			printk("%s: abort, mbox %d, interrupt pending.\n",
+			       ha->board_name, i);
+
+		if (SCarg->eh_state == SCSI_STATE_TIMEOUT) {
+			unmap_dma(i, ha);
+			SCarg->host_scribble = NULL;
+			ha->cp_stat[i] = FREE;
+			printk
+			    ("%s, abort, mbox %d, eh_state timeout, pid %ld.\n",
+			     ha->board_name, i, SCarg->pid);
+			return SUCCESS;
+		}
+
+		return FAILED;
+	}
+
+	if (ha->cp_stat[i] == IN_RESET) {
+		printk("%s: abort, mbox %d is in reset.\n", ha->board_name, i);
+		return FAILED;
+	}
+
+	if (ha->cp_stat[i] == LOCKED) {
+		printk("%s: abort, mbox %d is locked.\n", ha->board_name, i);
+		return SUCCESS;
+	}
+
+	if (ha->cp_stat[i] == READY || ha->cp_stat[i] == ABORTING) {
+		unmap_dma(i, ha);
+		SCarg->result = DID_ABORT << 16;
+		SCarg->host_scribble = NULL;
+		ha->cp_stat[i] = FREE;
+		printk("%s, abort, mbox %d ready, DID_ABORT, pid %ld done.\n",
+		       ha->board_name, i, SCarg->pid);
+		SCarg->scsi_done(SCarg);
+		return SUCCESS;
+	}
+
+	panic("%s: abort, mbox %d, invalid cp_stat.\n", ha->board_name, i);
+}
+
+static int eata2x_eh_host_reset(struct scsi_cmnd *SCarg)
+{
+	unsigned int i, time, k, c, limit = 0;
+	int arg_done = 0;
+	struct scsi_cmnd *SCpnt;
+	struct Scsi_Host *shost = SCarg->device->host;
+	struct hostdata *ha = (struct hostdata *)shost->hostdata;
+
+	printk("%s: reset, enter, target %d.%d:%d, pid %ld.\n",
+	       ha->board_name, SCarg->device->channel, SCarg->device->id,
+	       SCarg->device->lun, SCarg->pid);
+
+	if (SCarg->host_scribble == NULL)
+		printk("%s: reset, pid %ld inactive.\n", ha->board_name, SCarg->pid);
+
+	if (ha->in_reset) {
+		printk("%s: reset, exit, already in reset.\n", ha->board_name);
+		return FAILED;
+	}
+
+	if (wait_on_busy(shost->io_port, MAXLOOP)) {
+		printk("%s: reset, exit, timeout error.\n", ha->board_name);
+		return FAILED;
+	}
+
+	ha->retries = 0;
+
+	for (c = 0; c <= shost->max_channel; c++)
+		for (k = 0; k < shost->max_id; k++) {
+			ha->target_redo[k][c] = 1;
+			ha->target_to[k][c] = 0;
+		}
+
+	for (i = 0; i < shost->can_queue; i++) {
+
+		if (ha->cp_stat[i] == FREE)
+			continue;
+
+		if (ha->cp_stat[i] == LOCKED) {
+			ha->cp_stat[i] = FREE;
+			printk("%s: reset, locked mbox %d forced free.\n",
+			       ha->board_name, i);
+			continue;
+		}
+
+		if (!(SCpnt = ha->cp[i].SCpnt))
+			panic("%s: reset, mbox %d, SCpnt == NULL.\n", ha->board_name, i);
+
+		if (ha->cp_stat[i] == READY || ha->cp_stat[i] == ABORTING) {
+			ha->cp_stat[i] = ABORTING;
+			printk("%s: reset, mbox %d aborting, pid %ld.\n",
+			       ha->board_name, i, SCpnt->pid);
+		}
+
+		else {
+			ha->cp_stat[i] = IN_RESET;
+			printk("%s: reset, mbox %d in reset, pid %ld.\n",
+			       ha->board_name, i, SCpnt->pid);
+		}
+
+		if (SCpnt->host_scribble == NULL)
+			panic("%s: reset, mbox %d, garbled SCpnt.\n", ha->board_name, i);
+
+		if (*(unsigned int *)SCpnt->host_scribble != i)
+			panic("%s: reset, mbox %d, index mismatch.\n", ha->board_name, i);
+
+		if (SCpnt->scsi_done == NULL)
+			panic("%s: reset, mbox %d, SCpnt->scsi_done == NULL.\n",
+			      ha->board_name, i);
+
+		if (SCpnt == SCarg)
+			arg_done = 1;
+	}
+
+	if (do_dma(shost->io_port, 0, RESET_PIO)) {
+		printk("%s: reset, cannot reset, timeout error.\n", ha->board_name);
+		return FAILED;
+	}
 
-   printk("%s: reset, board reset done, enabling interrupts.\n", BN(j));
+	printk("%s: reset, board reset done, enabling interrupts.\n", ha->board_name);
 
 #if defined(DEBUG_RESET)
-   do_trace = 1;
+	do_trace = 1;
 #endif
 
-   HD(j)->in_reset = 1;
+	ha->in_reset = 1;
 
-   spin_unlock_irq(sh[j]->host_lock);
-   time = jiffies;
-   while ((jiffies - time) < (10 * HZ) && limit++ < 200000) udelay(100L);
-   spin_lock_irq(sh[j]->host_lock);
+	spin_unlock_irq(shost->host_lock);
+	time = jiffies;
+	while ((jiffies - time) < (10 * HZ) && limit++ < 200000)
+		udelay(100L);
+	spin_lock_irq(shost->host_lock);
 
-   printk("%s: reset, interrupts disabled, loops %d.\n", BN(j), limit);
+	printk("%s: reset, interrupts disabled, loops %d.\n", ha->board_name, limit);
 
-   for (i = 0; i < sh[j]->can_queue; i++) {
+	for (i = 0; i < shost->can_queue; i++) {
 
-      if (HD(j)->cp_stat[i] == IN_RESET) {
-         SCpnt = HD(j)->cp[i].SCpnt;
-         unmap_dma(i, j);
-         SCpnt->result = DID_RESET << 16;
-         SCpnt->host_scribble = NULL;
+		if (ha->cp_stat[i] == IN_RESET) {
+			SCpnt = ha->cp[i].SCpnt;
+			unmap_dma(i, ha);
+			SCpnt->result = DID_RESET << 16;
+			SCpnt->host_scribble = NULL;
 
-         /* This mailbox is still waiting for its interrupt */
-         HD(j)->cp_stat[i] = LOCKED;
+			/* This mailbox is still waiting for its interrupt */
+			ha->cp_stat[i] = LOCKED;
 
-         printk("%s, reset, mbox %d locked, DID_RESET, pid %ld done.\n",
-                BN(j), i, SCpnt->pid);
-         }
+			printk
+			    ("%s, reset, mbox %d locked, DID_RESET, pid %ld done.\n",
+			     ha->board_name, i, SCpnt->pid);
+		}
 
-      else if (HD(j)->cp_stat[i] == ABORTING) {
-         SCpnt = HD(j)->cp[i].SCpnt;
-         unmap_dma(i, j);
-         SCpnt->result = DID_RESET << 16;
-         SCpnt->host_scribble = NULL;
+		else if (ha->cp_stat[i] == ABORTING) {
+			SCpnt = ha->cp[i].SCpnt;
+			unmap_dma(i, ha);
+			SCpnt->result = DID_RESET << 16;
+			SCpnt->host_scribble = NULL;
 
-         /* This mailbox was never queued to the adapter */
-         HD(j)->cp_stat[i] = FREE;
+			/* This mailbox was never queued to the adapter */
+			ha->cp_stat[i] = FREE;
 
-         printk("%s, reset, mbox %d aborting, DID_RESET, pid %ld done.\n",
-                BN(j), i, SCpnt->pid);
-         }
+			printk
+			    ("%s, reset, mbox %d aborting, DID_RESET, pid %ld done.\n",
+			     ha->board_name, i, SCpnt->pid);
+		}
 
-      else
+		else
+			/* Any other mailbox has already been set free by interrupt */
+			continue;
 
-         /* Any other mailbox has already been set free by interrupt */
-         continue;
+		SCpnt->scsi_done(SCpnt);
+	}
 
-      SCpnt->scsi_done(SCpnt);
-      }
+	ha->in_reset = 0;
+	do_trace = 0;
 
-   HD(j)->in_reset = 0;
-   do_trace = 0;
+	if (arg_done)
+		printk("%s: reset, exit, pid %ld done.\n", ha->board_name, SCarg->pid);
+	else
+		printk("%s: reset, exit.\n", ha->board_name);
 
-   if (arg_done) printk("%s: reset, exit, pid %ld done.\n", BN(j), SCarg->pid);
-   else          printk("%s: reset, exit.\n", BN(j));
-
-   return SUCCESS;
+	return SUCCESS;
 }
 
 int eata2x_bios_param(struct scsi_device *sdev, struct block_device *bdev,
-                      sector_t capacity, int *dkinfo) {
-   unsigned int size = capacity;
-
-   if (ext_tran || (scsicam_bios_param(bdev, capacity, dkinfo) < 0)) {
-      dkinfo[0] = 255;
-      dkinfo[1] = 63;
-      dkinfo[2] = size / (dkinfo[0] * dkinfo[1]);
-      }
-
+		      sector_t capacity, int *dkinfo)
+{
+	unsigned int size = capacity;
+
+	if (ext_tran || (scsicam_bios_param(bdev, capacity, dkinfo) < 0)) {
+		dkinfo[0] = 255;
+		dkinfo[1] = 63;
+		dkinfo[2] = size / (dkinfo[0] * dkinfo[1]);
+	}
 #if defined (DEBUG_GEOMETRY)
-   printk ("%s: bios_param, head=%d, sec=%d, cyl=%d.\n", driver_name,
-           dkinfo[0], dkinfo[1], dkinfo[2]);
+	printk("%s: bios_param, head=%d, sec=%d, cyl=%d.\n", driver_name,
+	       dkinfo[0], dkinfo[1], dkinfo[2]);
 #endif
 
-   return 0;
+	return 0;
 }
 
 static void sort(unsigned long sk[], unsigned int da[], unsigned int n,
-                 unsigned int rev) {
-   unsigned int i, j, k, y;
-   unsigned long x;
-
-   for (i = 0; i < n - 1; i++) {
-      k = i;
-
-      for (j = k + 1; j < n; j++)
-         if (rev) {
-            if (sk[j] > sk[k]) k = j;
-            }
-         else {
-            if (sk[j] < sk[k]) k = j;
-            }
-
-      if (k != i) {
-         x = sk[k]; sk[k] = sk[i]; sk[i] = x;
-         y = da[k]; da[k] = da[i]; da[i] = y;
-         }
-      }
-
-   return;
-   }
-
-static int reorder(unsigned int j, unsigned long cursec,
-                 unsigned int ihdlr, unsigned int il[], unsigned int n_ready) {
-   struct scsi_cmnd *SCpnt;
-   struct mscp *cpp;
-   unsigned int k, n;
-   unsigned int rev = 0, s = 1, r = 1;
-   unsigned int input_only = 1, overlap = 0;
-   unsigned long sl[n_ready], pl[n_ready], ll[n_ready];
-   unsigned long maxsec = 0, minsec = ULONG_MAX, seek = 0, iseek = 0;
-   unsigned long ioseek = 0;
-
-   static unsigned int flushcount = 0, batchcount = 0, sortcount = 0;
-   static unsigned int readycount = 0, ovlcount = 0, inputcount = 0;
-   static unsigned int readysorted = 0, revcount = 0;
-   static unsigned long seeksorted = 0, seeknosort = 0;
-
-   if (link_statistics && !(++flushcount % link_statistics))
-      printk("fc %d bc %d ic %d oc %d rc %d rs %d sc %d re %d"\
-             " av %ldK as %ldK.\n", flushcount, batchcount, inputcount,
-             ovlcount, readycount, readysorted, sortcount, revcount,
-             seeknosort / (readycount + 1),
-             seeksorted / (readycount + 1));
-
-   if (n_ready <= 1) return 0;
-
-   for (n = 0; n < n_ready; n++) {
-      k = il[n]; cpp = &HD(j)->cp[k]; SCpnt = cpp->SCpnt;
-
-      if (!cpp->din) input_only = 0;
-
-      if (SCpnt->request->sector < minsec) minsec = SCpnt->request->sector;
-      if (SCpnt->request->sector > maxsec) maxsec = SCpnt->request->sector;
-
-      sl[n] = SCpnt->request->sector;
-      ioseek += SCpnt->request->nr_sectors;
-
-      if (!n) continue;
-
-      if (sl[n] < sl[n - 1]) s = 0;
-      if (sl[n] > sl[n - 1]) r = 0;
-
-      if (link_statistics) {
-         if (sl[n] > sl[n - 1])
-            seek += sl[n] - sl[n - 1];
-         else
-            seek += sl[n - 1] - sl[n];
-         }
-
-      }
-
-   if (link_statistics) {
-      if (cursec > sl[0]) seek += cursec - sl[0]; else seek += sl[0] - cursec;
-      }
-
-   if (cursec > ((maxsec + minsec) / 2)) rev = 1;
-
-   if (ioseek > ((maxsec - minsec) / 2)) rev = 0;
-
-   if (!((rev && r) || (!rev && s))) sort(sl, il, n_ready, rev);
-
-   if (!input_only) for (n = 0; n < n_ready; n++) {
-      k = il[n]; cpp = &HD(j)->cp[k]; SCpnt = cpp->SCpnt;
-      ll[n] = SCpnt->request->nr_sectors; pl[n] = SCpnt->pid;
-
-      if (!n) continue;
-
-      if ((sl[n] == sl[n - 1]) || (!rev && ((sl[n - 1] + ll[n - 1]) > sl[n]))
-          || (rev && ((sl[n] + ll[n]) > sl[n - 1]))) overlap = 1;
-      }
-
-   if (overlap) sort(pl, il, n_ready, 0);
-
-   if (link_statistics) {
-      if (cursec > sl[0]) iseek = cursec - sl[0]; else iseek = sl[0] - cursec;
-      batchcount++; readycount += n_ready; seeknosort += seek / 1024;
-      if (input_only) inputcount++;
-      if (overlap) { ovlcount++; seeksorted += iseek / 1024; }
-      else seeksorted += (iseek + maxsec - minsec) / 1024;
-      if (rev && !r)     {  revcount++; readysorted += n_ready; }
-      if (!rev && !s)    { sortcount++; readysorted += n_ready; }
-      }
-
+		 unsigned int rev)
+{
+	unsigned int i, j, k, y;
+	unsigned long x;
+
+	for (i = 0; i < n - 1; i++) {
+		k = i;
+
+		for (j = k + 1; j < n; j++)
+			if (rev) {
+				if (sk[j] > sk[k])
+					k = j;
+			} else {
+				if (sk[j] < sk[k])
+					k = j;
+			}
+
+		if (k != i) {
+			x = sk[k];
+			sk[k] = sk[i];
+			sk[i] = x;
+			y = da[k];
+			da[k] = da[i];
+			da[i] = y;
+		}
+	}
+
+	return;
+}
+
+static int reorder(struct hostdata *ha, unsigned long cursec,
+		   unsigned int ihdlr, unsigned int il[], unsigned int n_ready)
+{
+	struct scsi_cmnd *SCpnt;
+	struct mscp *cpp;
+	unsigned int k, n;
+	unsigned int rev = 0, s = 1, r = 1;
+	unsigned int input_only = 1, overlap = 0;
+	unsigned long sl[n_ready], pl[n_ready], ll[n_ready];
+	unsigned long maxsec = 0, minsec = ULONG_MAX, seek = 0, iseek = 0;
+	unsigned long ioseek = 0;
+
+	static unsigned int flushcount = 0, batchcount = 0, sortcount = 0;
+	static unsigned int readycount = 0, ovlcount = 0, inputcount = 0;
+	static unsigned int readysorted = 0, revcount = 0;
+	static unsigned long seeksorted = 0, seeknosort = 0;
+
+	if (link_statistics && !(++flushcount % link_statistics))
+		printk("fc %d bc %d ic %d oc %d rc %d rs %d sc %d re %d"
+		       " av %ldK as %ldK.\n", flushcount, batchcount,
+		       inputcount, ovlcount, readycount, readysorted, sortcount,
+		       revcount, seeknosort / (readycount + 1),
+		       seeksorted / (readycount + 1));
+
+	if (n_ready <= 1)
+		return 0;
+
+	for (n = 0; n < n_ready; n++) {
+		k = il[n];
+		cpp = &ha->cp[k];
+		SCpnt = cpp->SCpnt;
+
+		if (!cpp->din)
+			input_only = 0;
+
+		if (SCpnt->request->sector < minsec)
+			minsec = SCpnt->request->sector;
+		if (SCpnt->request->sector > maxsec)
+			maxsec = SCpnt->request->sector;
+
+		sl[n] = SCpnt->request->sector;
+		ioseek += SCpnt->request->nr_sectors;
+
+		if (!n)
+			continue;
+
+		if (sl[n] < sl[n - 1])
+			s = 0;
+		if (sl[n] > sl[n - 1])
+			r = 0;
+
+		if (link_statistics) {
+			if (sl[n] > sl[n - 1])
+				seek += sl[n] - sl[n - 1];
+			else
+				seek += sl[n - 1] - sl[n];
+		}
+
+	}
+
+	if (link_statistics) {
+		if (cursec > sl[0])
+			seek += cursec - sl[0];
+		else
+			seek += sl[0] - cursec;
+	}
+
+	if (cursec > ((maxsec + minsec) / 2))
+		rev = 1;
+
+	if (ioseek > ((maxsec - minsec) / 2))
+		rev = 0;
+
+	if (!((rev && r) || (!rev && s)))
+		sort(sl, il, n_ready, rev);
+
+	if (!input_only)
+		for (n = 0; n < n_ready; n++) {
+			k = il[n];
+			cpp = &ha->cp[k];
+			SCpnt = cpp->SCpnt;
+			ll[n] = SCpnt->request->nr_sectors;
+			pl[n] = SCpnt->pid;
+
+			if (!n)
+				continue;
+
+			if ((sl[n] == sl[n - 1])
+			    || (!rev && ((sl[n - 1] + ll[n - 1]) > sl[n]))
+			    || (rev && ((sl[n] + ll[n]) > sl[n - 1])))
+				overlap = 1;
+		}
+
+	if (overlap)
+		sort(pl, il, n_ready, 0);
+
+	if (link_statistics) {
+		if (cursec > sl[0])
+			iseek = cursec - sl[0];
+		else
+			iseek = sl[0] - cursec;
+		batchcount++;
+		readycount += n_ready;
+		seeknosort += seek / 1024;
+		if (input_only)
+			inputcount++;
+		if (overlap) {
+			ovlcount++;
+			seeksorted += iseek / 1024;
+		} else
+			seeksorted += (iseek + maxsec - minsec) / 1024;
+		if (rev && !r) {
+			revcount++;
+			readysorted += n_ready;
+		}
+		if (!rev && !s) {
+			sortcount++;
+			readysorted += n_ready;
+		}
+	}
 #if defined(DEBUG_LINKED_COMMANDS)
-   if (link_statistics && (overlap || !(flushcount % link_statistics)))
-      for (n = 0; n < n_ready; n++) {
-         k = il[n]; cpp = &HD(j)->cp[k]; SCpnt = cpp->SCpnt;
-         printk("%s %d.%d:%d pid %ld mb %d fc %d nr %d sec %ld ns %ld"\
-                " cur %ld s:%c r:%c rev:%c in:%c ov:%c xd %d.\n",
-                (ihdlr ? "ihdlr" : "qcomm"), SCpnt->device->channel, SCpnt->device->id,
-                SCpnt->device->lun, SCpnt->pid, k, flushcount, n_ready,
-                SCpnt->request->sector, SCpnt->request->nr_sectors, cursec,
-                YESNO(s), YESNO(r), YESNO(rev), YESNO(input_only),
-                YESNO(overlap), cpp->din);
-         }
-#endif
-   return overlap;
-}
-
-static void flush_dev(struct scsi_device *dev, unsigned long cursec, unsigned int j,
-                      unsigned int ihdlr) {
-   struct scsi_cmnd *SCpnt;
-   struct mscp *cpp;
-   unsigned int k, n, n_ready = 0, il[MAX_MAILBOXES];
-
-   for (k = 0; k < sh[j]->can_queue; k++) {
+	if (link_statistics && (overlap || !(flushcount % link_statistics)))
+		for (n = 0; n < n_ready; n++) {
+			k = il[n];
+			cpp = &ha->cp[k];
+			SCpnt = cpp->SCpnt;
+			printk
+			    ("%s %d.%d:%d pid %ld mb %d fc %d nr %d sec %ld ns %ld"
+			     " cur %ld s:%c r:%c rev:%c in:%c ov:%c xd %d.\n",
+			     (ihdlr ? "ihdlr" : "qcomm"),
+			     SCpnt->device->channel, SCpnt->device->id,
+			     SCpnt->device->lun, SCpnt->pid, k, flushcount,
+			     n_ready, SCpnt->request->sector,
+			     SCpnt->request->nr_sectors, cursec, YESNO(s),
+			     YESNO(r), YESNO(rev), YESNO(input_only),
+			     YESNO(overlap), cpp->din);
+		}
+#endif
+	return overlap;
+}
+
+static void flush_dev(struct scsi_device *dev, unsigned long cursec,
+		      struct hostdata *ha, unsigned int ihdlr)
+{
+	struct scsi_cmnd *SCpnt;
+	struct mscp *cpp;
+	unsigned int k, n, n_ready = 0, il[MAX_MAILBOXES];
+
+	for (k = 0; k < dev->host->can_queue; k++) {
+
+		if (ha->cp_stat[k] != READY && ha->cp_stat[k] != IN_USE)
+			continue;
+
+		cpp = &ha->cp[k];
+		SCpnt = cpp->SCpnt;
+
+		if (SCpnt->device != dev)
+			continue;
+
+		if (ha->cp_stat[k] == IN_USE)
+			return;
+
+		il[n_ready++] = k;
+	}
+
+	if (reorder(ha, cursec, ihdlr, il, n_ready))
+		n_ready = 1;
+
+	for (n = 0; n < n_ready; n++) {
+		k = il[n];
+		cpp = &ha->cp[k];
+		SCpnt = cpp->SCpnt;
+
+		if (do_dma(dev->host->io_port, cpp->cp_dma_addr, SEND_CP_DMA)) {
+			printk
+			    ("%s: %s, target %d.%d:%d, pid %ld, mbox %d, adapter"
+			     " busy, will abort.\n", ha->board_name,
+			     (ihdlr ? "ihdlr" : "qcomm"),
+			     SCpnt->device->channel, SCpnt->device->id,
+			     SCpnt->device->lun, SCpnt->pid, k);
+			ha->cp_stat[k] = ABORTING;
+			continue;
+		}
+
+		ha->cp_stat[k] = IN_USE;
+	}
+}
+
+static irqreturn_t ihdlr(int irq, struct Scsi_Host *shost)
+{
+	struct scsi_cmnd *SCpnt;
+	unsigned int i, k, c, status, tstatus, reg;
+	struct mssp *spp;
+	struct mscp *cpp;
+	struct hostdata *ha = (struct hostdata *)shost->hostdata;
+
+	if (shost->irq != irq)
+		panic("%s: ihdlr, irq %d, shost->irq %d.\n", ha->board_name, irq,
+		      shost->irq);
+
+	/* Check if this board need to be serviced */
+	if (!(inb(shost->io_port + REG_AUX_STATUS) & IRQ_ASSERTED))
+		goto none;
+
+	ha->iocount++;
+
+	if (do_trace)
+		printk("%s: ihdlr, enter, irq %d, count %d.\n", ha->board_name, irq,
+		       ha->iocount);
+
+	/* Check if this board is still busy */
+	if (wait_on_busy(shost->io_port, 20 * MAXLOOP)) {
+		reg = inb(shost->io_port + REG_STATUS);
+		printk
+		    ("%s: ihdlr, busy timeout error,  irq %d, reg 0x%x, count %d.\n",
+		     ha->board_name, irq, reg, ha->iocount);
+		goto none;
+	}
+
+	spp = &ha->sp;
 
-      if (HD(j)->cp_stat[k] != READY && HD(j)->cp_stat[k] != IN_USE) continue;
-
-      cpp = &HD(j)->cp[k]; SCpnt = cpp->SCpnt;
-
-      if (SCpnt->device != dev) continue;
-
-      if (HD(j)->cp_stat[k] == IN_USE) return;
-
-      il[n_ready++] = k;
-      }
-
-   if (reorder(j, cursec, ihdlr, il, n_ready)) n_ready = 1;
-
-   for (n = 0; n < n_ready; n++) {
-      k = il[n]; cpp = &HD(j)->cp[k]; SCpnt = cpp->SCpnt;
-
-      if (do_dma(sh[j]->io_port, cpp->cp_dma_addr, SEND_CP_DMA)) {
-         printk("%s: %s, target %d.%d:%d, pid %ld, mbox %d, adapter"\
-                " busy, will abort.\n", BN(j), (ihdlr ? "ihdlr" : "qcomm"),
-                SCpnt->device->channel, SCpnt->device->id, SCpnt->device->lun, SCpnt->pid, k);
-         HD(j)->cp_stat[k] = ABORTING;
-         continue;
-         }
-
-      HD(j)->cp_stat[k] = IN_USE;
-      }
-
-}
+	/* Make a local copy just before clearing the interrupt indication */
+	memcpy(spp, ha->sp_cpu_addr, sizeof(struct mssp));
 
-static irqreturn_t ihdlr(int irq, unsigned int j) {
-   struct scsi_cmnd *SCpnt;
-   unsigned int i, k, c, status, tstatus, reg;
-   struct mssp *spp;
-   struct mscp *cpp;
+	/* Clear the completion flag and cp pointer on the dynamic copy of sp */
+	memset(ha->sp_cpu_addr, 0, sizeof(struct mssp));
 
-   if (sh[j]->irq != irq)
-       panic("%s: ihdlr, irq %d, sh[j]->irq %d.\n", BN(j), irq, sh[j]->irq);
-
-   /* Check if this board need to be serviced */
-   if (!(inb(sh[j]->io_port + REG_AUX_STATUS) & IRQ_ASSERTED)) goto none;
-
-   HD(j)->iocount++;
-
-   if (do_trace) printk("%s: ihdlr, enter, irq %d, count %d.\n", BN(j), irq,
-                        HD(j)->iocount);
-
-   /* Check if this board is still busy */
-   if (wait_on_busy(sh[j]->io_port, 20 * MAXLOOP)) {
-      reg = inb(sh[j]->io_port + REG_STATUS);
-      printk("%s: ihdlr, busy timeout error,  irq %d, reg 0x%x, count %d.\n",
-             BN(j), irq, reg, HD(j)->iocount);
-      goto none;
-      }
-
-   spp  = &HD(j)->sp;
-
-   /* Make a local copy just before clearing the interrupt indication */
-   memcpy(spp, HD(j)->sp_cpu_addr, sizeof(struct mssp));
-
-   /* Clear the completion flag and cp pointer on the dynamic copy of sp */
-   memset(HD(j)->sp_cpu_addr, 0, sizeof(struct mssp));
-
-   /* Read the status register to clear the interrupt indication */
-   reg = inb(sh[j]->io_port + REG_STATUS);
+	/* Read the status register to clear the interrupt indication */
+	reg = inb(shost->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 == 0 && HD(j)->iocount > 1)
-      printk("%s: ihdlr, spp->eoc == 0, irq %d, reg 0x%x, count %d.\n",
-             BN(j), irq, reg, HD(j)->iocount);
-   if (spp->cpp_index < 0 || spp->cpp_index >= sh[j]->can_queue)
-      printk("%s: ihdlr, bad spp->cpp_index %d, irq %d, reg 0x%x, count %d.\n",
-             BN(j), spp->cpp_index, irq, reg, HD(j)->iocount);
-   if (spp->eoc == 0 || spp->cpp_index < 0
-                         || spp->cpp_index >= sh[j]->can_queue) goto handled;
+	{
+		unsigned char *bytesp;
+		int cnt;
+		bytesp = (unsigned char *)spp;
+		if (ha->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 == 0 && ha->iocount > 1)
+		printk
+		    ("%s: ihdlr, spp->eoc == 0, irq %d, reg 0x%x, count %d.\n",
+		     ha->board_name, irq, reg, ha->iocount);
+	if (spp->cpp_index < 0 || spp->cpp_index >= shost->can_queue)
+		printk
+		    ("%s: ihdlr, bad spp->cpp_index %d, irq %d, reg 0x%x, count %d.\n",
+		     ha->board_name, spp->cpp_index, irq, reg, ha->iocount);
+	if (spp->eoc == 0 || spp->cpp_index < 0
+	    || spp->cpp_index >= shost->can_queue)
+		goto handled;
 
-   /* Find the mailbox to be serviced on this board */
-   i = spp->cpp_index;
+	/* Find the mailbox to be serviced on this board */
+	i = spp->cpp_index;
 
-   cpp = &(HD(j)->cp[i]);
+	cpp = &(ha->cp[i]);
 
 #if defined(DEBUG_GENERATE_ABORTS)
-   if ((HD(j)->iocount > 500) && ((HD(j)->iocount % 500) < 3)) goto handled;
+	if ((ha->iocount > 500) && ((ha->iocount % 500) < 3))
+		goto handled;
 #endif
 
-   if (HD(j)->cp_stat[i] == IGNORE) {
-      HD(j)->cp_stat[i] = FREE;
-      goto handled;
-      }
-   else if (HD(j)->cp_stat[i] == LOCKED) {
-      HD(j)->cp_stat[i] = FREE;
-      printk("%s: ihdlr, mbox %d unlocked, count %d.\n", BN(j), i,
-             HD(j)->iocount);
-      goto handled;
-      }
-   else if (HD(j)->cp_stat[i] == FREE) {
-      printk("%s: ihdlr, mbox %d is free, count %d.\n", BN(j), i,
-             HD(j)->iocount);
-      goto handled;
-      }
-   else if (HD(j)->cp_stat[i] == IN_RESET)
-      printk("%s: ihdlr, mbox %d is in reset.\n", BN(j), i);
-   else if (HD(j)->cp_stat[i] != IN_USE)
-      panic("%s: ihdlr, mbox %d, invalid cp_stat: %d.\n",
-            BN(j), i, HD(j)->cp_stat[i]);
-
-   HD(j)->cp_stat[i] = FREE;
-   SCpnt = cpp->SCpnt;
-
-   if (SCpnt == NULL) panic("%s: ihdlr, mbox %d, SCpnt == NULL.\n", BN(j), i);
-
-   if (SCpnt->host_scribble == NULL)
-      panic("%s: ihdlr, mbox %d, pid %ld, SCpnt %p garbled.\n", BN(j), i,
-            SCpnt->pid, SCpnt);
-
-   if (*(unsigned int *)SCpnt->host_scribble != i)
-      panic("%s: ihdlr, mbox %d, pid %ld, index mismatch %d.\n",
-            BN(j), i, SCpnt->pid, *(unsigned int *)SCpnt->host_scribble);
-
-   sync_dma(i, j);
-
-   if (linked_comm && SCpnt->device->queue_depth > 2
-                                     && TLDEV(SCpnt->device->type))
-      flush_dev(SCpnt->device, SCpnt->request->sector, j, 1);
+	if (ha->cp_stat[i] == IGNORE) {
+		ha->cp_stat[i] = FREE;
+		goto handled;
+	} else if (ha->cp_stat[i] == LOCKED) {
+		ha->cp_stat[i] = FREE;
+		printk("%s: ihdlr, mbox %d unlocked, count %d.\n", ha->board_name, i,
+		       ha->iocount);
+		goto handled;
+	} else if (ha->cp_stat[i] == FREE) {
+		printk("%s: ihdlr, mbox %d is free, count %d.\n", ha->board_name, i,
+		       ha->iocount);
+		goto handled;
+	} else if (ha->cp_stat[i] == IN_RESET)
+		printk("%s: ihdlr, mbox %d is in reset.\n", ha->board_name, i);
+	else if (ha->cp_stat[i] != IN_USE)
+		panic("%s: ihdlr, mbox %d, invalid cp_stat: %d.\n",
+		      ha->board_name, i, ha->cp_stat[i]);
+
+	ha->cp_stat[i] = FREE;
+	SCpnt = cpp->SCpnt;
+
+	if (SCpnt == NULL)
+		panic("%s: ihdlr, mbox %d, SCpnt == NULL.\n", ha->board_name, i);
+
+	if (SCpnt->host_scribble == NULL)
+		panic("%s: ihdlr, mbox %d, pid %ld, SCpnt %p garbled.\n", ha->board_name,
+		      i, SCpnt->pid, SCpnt);
+
+	if (*(unsigned int *)SCpnt->host_scribble != i)
+		panic("%s: ihdlr, mbox %d, pid %ld, index mismatch %d.\n",
+		      ha->board_name, i, SCpnt->pid,
+		      *(unsigned int *)SCpnt->host_scribble);
+
+	sync_dma(i, ha);
+
+	if (linked_comm && SCpnt->device->queue_depth > 2
+	    && TLDEV(SCpnt->device->type))
+		flush_dev(SCpnt->device, SCpnt->request->sector, ha, 1);
 
-   tstatus = status_byte(spp->target_status);
+	tstatus = status_byte(spp->target_status);
 
 #if defined(DEBUG_GENERATE_ERRORS)
-   if ((HD(j)->iocount > 500) && ((HD(j)->iocount % 200) < 2))
-                                           spp->adapter_status = 0x01;
+	if ((ha->iocount > 500) && ((ha->iocount % 200) < 2))
+		spp->adapter_status = 0x01;
 #endif
 
-   switch (spp->adapter_status) {
-      case ASOK:     /* status OK */
+	switch (spp->adapter_status) {
+	case ASOK:		/* status OK */
 
-         /* Forces a reset if a disk drive keeps returning BUSY */
-         if (tstatus == BUSY && SCpnt->device->type != TYPE_TAPE)
-            status = DID_ERROR << 16;
-
-         /* If there was a bus reset, redo operation on each target */
-         else if (tstatus != GOOD && SCpnt->device->type == TYPE_DISK
-                  && HD(j)->target_redo[SCpnt->device->id][SCpnt->device->channel])
-            status = DID_BUS_BUSY << 16;
-
-         /* Works around a flaw in scsi.c */
-         else if (tstatus == CHECK_CONDITION
-                  && SCpnt->device->type == TYPE_DISK
-                  && (SCpnt->sense_buffer[2] & 0xf) == RECOVERED_ERROR)
-            status = DID_BUS_BUSY << 16;
-
-         else
-            status = DID_OK << 16;
-
-         if (tstatus == GOOD)
-            HD(j)->target_redo[SCpnt->device->id][SCpnt->device->channel] = 0;
-
-         if (spp->target_status && SCpnt->device->type == TYPE_DISK &&
-             (!(tstatus == CHECK_CONDITION && HD(j)->iocount <= 1000 &&
-               (SCpnt->sense_buffer[2] & 0xf) == NOT_READY)))
-            printk("%s: ihdlr, target %d.%d:%d, pid %ld, "\
-                   "target_status 0x%x, sense key 0x%x.\n", BN(j),
-                   SCpnt->device->channel, SCpnt->device->id, SCpnt->device->lun,
-                   SCpnt->pid, spp->target_status,
-                   SCpnt->sense_buffer[2]);
-
-         HD(j)->target_to[SCpnt->device->id][SCpnt->device->channel] = 0;
-
-         if (HD(j)->last_retried_pid == SCpnt->pid) HD(j)->retries = 0;
-
-         break;
-      case ASST:     /* Selection Time Out */
-      case 0x02:     /* Command Time Out   */
-
-         if (HD(j)->target_to[SCpnt->device->id][SCpnt->device->channel] > 1)
-            status = DID_ERROR << 16;
-         else {
-            status = DID_TIME_OUT << 16;
-            HD(j)->target_to[SCpnt->device->id][SCpnt->device->channel]++;
-            }
-
-         break;
-
-      /* Perform a limited number of internal retries */
-      case 0x03:     /* SCSI Bus Reset Received */
-      case 0x04:     /* Initial Controller Power-up */
-
-         for (c = 0; c <= sh[j]->max_channel; c++)
-            for (k = 0; k < sh[j]->max_id; k++)
-               HD(j)->target_redo[k][c] = 1;
+		/* Forces a reset if a disk drive keeps returning BUSY */
+		if (tstatus == BUSY && SCpnt->device->type != TYPE_TAPE)
+			status = DID_ERROR << 16;
+
+		/* If there was a bus reset, redo operation on each target */
+		else if (tstatus != GOOD && SCpnt->device->type == TYPE_DISK
+			 && ha->target_redo[SCpnt->device->id][SCpnt->
+								  device->
+								  channel])
+			status = DID_BUS_BUSY << 16;
+
+		/* Works around a flaw in scsi.c */
+		else if (tstatus == CHECK_CONDITION
+			 && SCpnt->device->type == TYPE_DISK
+			 && (SCpnt->sense_buffer[2] & 0xf) == RECOVERED_ERROR)
+			status = DID_BUS_BUSY << 16;
+
+		else
+			status = DID_OK << 16;
+
+		if (tstatus == GOOD)
+			ha->target_redo[SCpnt->device->id][SCpnt->device->
+							      channel] = 0;
+
+		if (spp->target_status && SCpnt->device->type == TYPE_DISK &&
+		    (!(tstatus == CHECK_CONDITION && ha->iocount <= 1000 &&
+		       (SCpnt->sense_buffer[2] & 0xf) == NOT_READY)))
+			printk("%s: ihdlr, target %d.%d:%d, pid %ld, "
+			       "target_status 0x%x, sense key 0x%x.\n",
+			       ha->board_name,
+			       SCpnt->device->channel, SCpnt->device->id,
+			       SCpnt->device->lun, SCpnt->pid,
+			       spp->target_status, SCpnt->sense_buffer[2]);
+
+		ha->target_to[SCpnt->device->id][SCpnt->device->channel] = 0;
+
+		if (ha->last_retried_pid == SCpnt->pid)
+			ha->retries = 0;
+
+		break;
+	case ASST:		/* Selection Time Out */
+	case 0x02:		/* Command Time Out   */
+
+		if (ha->target_to[SCpnt->device->id][SCpnt->device->channel] > 1)
+			status = DID_ERROR << 16;
+		else {
+			status = DID_TIME_OUT << 16;
+			ha->target_to[SCpnt->device->id][SCpnt->device->
+							    channel]++;
+		}
+
+		break;
+
+		/* Perform a limited number of internal retries */
+	case 0x03:		/* SCSI Bus Reset Received */
+	case 0x04:		/* Initial Controller Power-up */
+
+		for (c = 0; c <= shost->max_channel; c++)
+			for (k = 0; k < shost->max_id; k++)
+				ha->target_redo[k][c] = 1;
 
-         if (SCpnt->device->type != TYPE_TAPE
-             && HD(j)->retries < MAX_INTERNAL_RETRIES) {
+		if (SCpnt->device->type != TYPE_TAPE
+		    && ha->retries < MAX_INTERNAL_RETRIES) {
 
 #if defined(DID_SOFT_ERROR)
-            status = DID_SOFT_ERROR << 16;
+			status = DID_SOFT_ERROR << 16;
 #else
-            status = DID_BUS_BUSY << 16;
+			status = DID_BUS_BUSY << 16;
 #endif
 
-            HD(j)->retries++;
-            HD(j)->last_retried_pid = SCpnt->pid;
-            }
-         else
-            status = DID_ERROR << 16;
-
-         break;
-      case 0x05:     /* Unexpected Bus Phase */
-      case 0x06:     /* Unexpected Bus Free */
-      case 0x07:     /* Bus Parity Error */
-      case 0x08:     /* SCSI Hung */
-      case 0x09:     /* Unexpected Message Reject */
-      case 0x0a:     /* SCSI Bus Reset Stuck */
-      case 0x0b:     /* Auto Request-Sense Failed */
-      case 0x0c:     /* Controller Ram Parity Error */
-      default:
-         status = DID_ERROR << 16;
-         break;
-      }
+			ha->retries++;
+			ha->last_retried_pid = SCpnt->pid;
+		} else
+			status = DID_ERROR << 16;
+
+		break;
+	case 0x05:		/* Unexpected Bus Phase */
+	case 0x06:		/* Unexpected Bus Free */
+	case 0x07:		/* Bus Parity Error */
+	case 0x08:		/* SCSI Hung */
+	case 0x09:		/* Unexpected Message Reject */
+	case 0x0a:		/* SCSI Bus Reset Stuck */
+	case 0x0b:		/* Auto Request-Sense Failed */
+	case 0x0c:		/* Controller Ram Parity Error */
+	default:
+		status = DID_ERROR << 16;
+		break;
+	}
 
-   SCpnt->result = status | spp->target_status;
+	SCpnt->result = status | spp->target_status;
 
 #if defined(DEBUG_INTERRUPT)
-   if (SCpnt->result || do_trace)
+	if (SCpnt->result || do_trace)
 #else
-   if ((spp->adapter_status != ASOK && HD(j)->iocount >  1000) ||
-       (spp->adapter_status != ASOK &&
-        spp->adapter_status != ASST && HD(j)->iocount <= 1000) ||
-        do_trace || msg_byte(spp->target_status))
-#endif
-      printk("%s: ihdlr, mbox %2d, err 0x%x:%x,"\
-             " target %d.%d:%d, pid %ld, reg 0x%x, count %d.\n",
-             BN(j), i, spp->adapter_status, spp->target_status,
-             SCpnt->device->channel, SCpnt->device->id, SCpnt->device->lun, SCpnt->pid,
-             reg, HD(j)->iocount);
-
-   unmap_dma(i, j);
-
-   /* Set the command state to inactive */
-   SCpnt->host_scribble = NULL;
-
-   SCpnt->scsi_done(SCpnt);
-
-   if (do_trace) printk("%s: ihdlr, exit, irq %d, count %d.\n", BN(j), irq,
-                        HD(j)->iocount);
-
-handled:
-   return IRQ_HANDLED;
-none:
-   return IRQ_NONE;
+	if ((spp->adapter_status != ASOK && ha->iocount > 1000) ||
+	    (spp->adapter_status != ASOK &&
+	     spp->adapter_status != ASST && ha->iocount <= 1000) ||
+	    do_trace || msg_byte(spp->target_status))
+#endif
+		printk("%s: ihdlr, mbox %2d, err 0x%x:%x,"
+		       " target %d.%d:%d, pid %ld, reg 0x%x, count %d.\n",
+		       ha->board_name, i, spp->adapter_status, spp->target_status,
+		       SCpnt->device->channel, SCpnt->device->id,
+		       SCpnt->device->lun, SCpnt->pid, reg, ha->iocount);
+
+	unmap_dma(i, ha);
+
+	/* Set the command state to inactive */
+	SCpnt->host_scribble = NULL;
+
+	SCpnt->scsi_done(SCpnt);
+
+	if (do_trace)
+		printk("%s: ihdlr, exit, irq %d, count %d.\n", ha->board_name,
+				irq, ha->iocount);
+
+      handled:
+	return IRQ_HANDLED;
+      none:
+	return IRQ_NONE;
 }
 
 static irqreturn_t do_interrupt_handler(int irq, void *shap,
-                                        struct pt_regs *regs) {
-   unsigned int j;
-   unsigned long spin_flags;
-   irqreturn_t ret;
-
-   /* Check if the interrupt must be processed by this handler */
-   if ((j = (unsigned int)((char *)shap - sha)) >= num_boards) return IRQ_NONE;
-
-   spin_lock_irqsave(sh[j]->host_lock, spin_flags);
-   ret = ihdlr(irq, j);
-   spin_unlock_irqrestore(sh[j]->host_lock, spin_flags);
-   return ret;
-}
-
-static int eata2x_release(struct Scsi_Host *shpnt) {
-   unsigned int i, j;
-
-   for (j = 0; sh[j] != NULL && sh[j] != shpnt; j++);
-
-   if (sh[j] == NULL) panic("%s: release, invalid Scsi_Host pointer.\n",
-                            driver_name);
-
-   for (i = 0; i < sh[j]->can_queue; i++)
-      if ((&HD(j)->cp[i])->sglist) kfree((&HD(j)->cp[i])->sglist);
-
-   for (i = 0; i < sh[j]->can_queue; i++)
-      pci_unmap_single(HD(j)->pdev, HD(j)->cp[i].cp_dma_addr,
-                     sizeof(struct mscp), PCI_DMA_BIDIRECTIONAL);
-
-   if (HD(j)->sp_cpu_addr)
-      pci_free_consistent(HD(j)->pdev, sizeof(struct mssp),
-                          HD(j)->sp_cpu_addr, HD(j)->sp_dma_addr);
-
-   free_irq(sh[j]->irq, &sha[j]);
-
-   if (sh[j]->dma_channel != NO_DMA) free_dma(sh[j]->dma_channel);
-
-   release_region(sh[j]->io_port, sh[j]->n_io_port);
-   scsi_unregister(sh[j]);
-   return 0;
+					struct pt_regs *regs)
+{
+	struct Scsi_Host *shost;
+	unsigned int j;
+	unsigned long spin_flags;
+	irqreturn_t ret;
+
+	/* Check if the interrupt must be processed by this handler */
+	if ((j = (unsigned int)((char *)shap - sha)) >= num_boards)
+		return IRQ_NONE;
+	shost = sh[j];
+
+	spin_lock_irqsave(shost->host_lock, spin_flags);
+	ret = ihdlr(irq, shost);
+	spin_unlock_irqrestore(shost->host_lock, spin_flags);
+	return ret;
+}
+
+static int eata2x_release(struct Scsi_Host *shost)
+{
+	struct hostdata *ha = (struct hostdata *)shost->hostdata;
+	unsigned int i;
+
+	for (i = 0; i < shost->can_queue; i++)
+		if ((&ha->cp[i])->sglist)
+			kfree((&ha->cp[i])->sglist);
+
+	for (i = 0; i < shost->can_queue; i++)
+		pci_unmap_single(ha->pdev, ha->cp[i].cp_dma_addr,
+				 sizeof(struct mscp), PCI_DMA_BIDIRECTIONAL);
+
+	if (ha->sp_cpu_addr)
+		pci_free_consistent(ha->pdev, sizeof(struct mssp),
+				    ha->sp_cpu_addr, ha->sp_dma_addr);
+
+	free_irq(shost->irq, &sha[ha->board_number]);
+
+	if (shost->dma_channel != NO_DMA)
+		free_dma(shost->dma_channel);
+
+	release_region(shost->io_port, shost->n_io_port);
+	scsi_unregister(shost);
+	return 0;
 }
 
 #include "scsi_module.c"
 
 #ifndef MODULE
 __setup("eata=", option_setup);
-#endif /* end MODULE */
+#endif				/* end MODULE */
diff -Nru a/drivers/scsi/fdomain.c b/drivers/scsi/fdomain.c
--- a/drivers/scsi/fdomain.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/scsi/fdomain.c	2005-01-10 20:11:21 -08:00
@@ -409,7 +409,7 @@
 /* Allow insmod parameters to be like LILO parameters.  For example:
    insmod fdomain fdomain=0x140,11 */
 static char * fdomain = NULL;
-MODULE_PARM(fdomain, "s");
+module_param(fdomain, charp, 0);
 
 static unsigned long addresses[] = {
    0xc8000,
diff -Nru a/drivers/scsi/g_NCR5380.c b/drivers/scsi/g_NCR5380.c
--- a/drivers/scsi/g_NCR5380.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/scsi/g_NCR5380.c	2005-01-10 20:11:17 -08:00
@@ -920,13 +920,13 @@
 #include <linux/module.h>
 #include "scsi_module.c"
 
-MODULE_PARM(ncr_irq, "i");
-MODULE_PARM(ncr_dma, "i");
-MODULE_PARM(ncr_addr, "i");
-MODULE_PARM(ncr_5380, "i");
-MODULE_PARM(ncr_53c400, "i");
-MODULE_PARM(ncr_53c400a, "i");
-MODULE_PARM(dtc_3181e, "i");
+module_param(ncr_irq, int, 0);
+module_param(ncr_dma, int, 0);
+module_param(ncr_addr, int, 0);
+module_param(ncr_5380, int, 0);
+module_param(ncr_53c400, int, 0);
+module_param(ncr_53c400a, int, 0);
+module_param(dtc_3181e, int, 0);
 MODULE_LICENSE("GPL");
 
 
diff -Nru a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c
--- a/drivers/scsi/gdth.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/scsi/gdth.c	2005-01-10 20:11:20 -08:00
@@ -676,18 +676,18 @@
 
 #ifdef MODULE
 /* parameters for modprobe/insmod */
-MODULE_PARM(irq, "i");
-MODULE_PARM(disable, "i");
-MODULE_PARM(reserve_mode, "i");
-MODULE_PARM(reserve_list, "4-" __MODULE_STRING(MAX_RES_ARGS) "i");
-MODULE_PARM(reverse_scan, "i");
-MODULE_PARM(hdr_channel, "i");
-MODULE_PARM(max_ids, "i");
-MODULE_PARM(rescan, "i");
-MODULE_PARM(virt_ctr, "i");
-MODULE_PARM(shared_access, "i");
-MODULE_PARM(probe_eisa_isa, "i");
-MODULE_PARM(force_dma32, "i");
+module_param(irq, int, 0);
+module_param(disable, int, 0);
+module_param(reserve_mode, int, 0);
+module_param_array(reserve_list, int, NULL, 0);
+module_param(reverse_scan, int, 0);
+module_param(hdr_channel, int, 0);
+module_param(max_ids, int, 0);
+module_param(rescan, int, 0);
+module_param(virt_ctr, int, 0);
+module_param(shared_access, int, 0);
+module_param(probe_eisa_isa, int, 0);
+module_param(force_dma32, int, 0);
 MODULE_AUTHOR("Achim Leubner");
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,11)
 MODULE_LICENSE("GPL");
diff -Nru a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c
--- a/drivers/scsi/hosts.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/scsi/hosts.c	2005-01-10 20:11:16 -08:00
@@ -79,11 +79,18 @@
 
 	set_bit(SHOST_DEL, &shost->shost_state);
 
+	if (shost->transportt->host_destroy)
+		shost->transportt->host_destroy(shost);
 	class_device_unregister(&shost->shost_classdev);
-	if (shost->transport_classdev.class)
-		class_device_unregister(&shost->transport_classdev);
+	if (shost->transport_classdev.class) {
+		if (shost->transportt->host_statistics)
+			sysfs_remove_group(&shost->transport_classdev.kobj,
+				shost->transportt->host_statistics);
+ 		class_device_unregister(&shost->transport_classdev);
+	}
 	device_del(&shost->shost_gendev);
 }
+EXPORT_SYMBOL(scsi_remove_host);
 
 /**
  * scsi_add_host - add a scsi host
@@ -133,11 +140,14 @@
 
 	error = scsi_sysfs_add_host(shost);
 	if (error)
-		goto out_del_classdev;
+		goto out_destroy_host;
 
 	scsi_proc_host_add(shost);
 	return error;
 
+ out_destroy_host:
+	if (shost->transportt->host_destroy)
+		shost->transportt->host_destroy(shost);
  out_del_classdev:
 	class_device_del(&shost->shost_classdev);
  out_del_gendev:
@@ -145,6 +155,7 @@
  out:
 	return error;
 }
+EXPORT_SYMBOL(scsi_add_host);
 
 static void scsi_host_dev_release(struct device *dev)
 {
@@ -301,6 +312,7 @@
 	kfree(shost);
 	return NULL;
 }
+EXPORT_SYMBOL(scsi_host_alloc);
 
 struct Scsi_Host *scsi_register(struct scsi_host_template *sht, int privsize)
 {
@@ -316,12 +328,14 @@
 		list_add_tail(&shost->sht_legacy_list, &sht->legacy_hosts);
 	return shost;
 }
+EXPORT_SYMBOL(scsi_register);
 
 void scsi_unregister(struct Scsi_Host *shost)
 {
 	list_del(&shost->sht_legacy_list);
 	scsi_host_put(shost);
 }
+EXPORT_SYMBOL(scsi_unregister);
 
 /**
  * scsi_host_lookup - get a reference to a Scsi_Host by host no
@@ -349,6 +363,7 @@
 
 	return shost;
 }
+EXPORT_SYMBOL(scsi_host_lookup);
 
 /**
  * scsi_host_get - inc a Scsi_Host ref count
@@ -361,6 +376,7 @@
 		return NULL;
 	return shost;
 }
+EXPORT_SYMBOL(scsi_host_get);
 
 /**
  * scsi_host_put - dec a Scsi_Host ref count
@@ -370,6 +386,7 @@
 {
 	put_device(&shost->shost_gendev);
 }
+EXPORT_SYMBOL(scsi_host_put);
 
 int scsi_init_hosts(void)
 {
diff -Nru a/drivers/scsi/ibmmca.c b/drivers/scsi/ibmmca.c
--- a/drivers/scsi/ibmmca.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/scsi/ibmmca.c	2005-01-10 20:11:16 -08:00
@@ -292,7 +292,7 @@
 #define INTEGRATED_SCSI          101
 
 /* List of possible IBM-SCSI-adapters */
-struct subsys_list_struct subsys_list[] = {
+static struct subsys_list_struct subsys_list[] = {
 	{0x8efc, "IBM SCSI-2 F/W Adapter"},	/* special = 0 */
 	{0x8efd, "IBM 7568 Industrial Computer SCSI Adapter w/Cache"},	/* special = 1 */
 	{0x8ef8, "IBM Expansion Unit SCSI Controller"},	/* special = 2 */
@@ -451,13 +451,16 @@
    (that is kernel version 2.1.x) */
 #if defined(MODULE)
 static char *boot_options = NULL;
-MODULE_PARM(boot_options, "s");
-MODULE_PARM(io_port, "1-" __MODULE_STRING(IM_MAX_HOSTS) "i");
-MODULE_PARM(scsi_id, "1-" __MODULE_STRING(IM_MAX_HOSTS) "i");
+module_param(boot_options, charp, 0);
+module_param_array(io_port, int, NULL, 0);
+module_param_array(scsi_id, int, NULL, 0);
+
+#if 0 /* FIXME: No longer exist? --RR */
 MODULE_PARM(display, "1i");
 MODULE_PARM(adisplay, "1i");
 MODULE_PARM(normal, "1i");
 MODULE_PARM(ansi, "1i");
+#endif
 #endif
 /*counter of concurrent disk read/writes, to turn on/off disk led */
 static int disk_rw_in_progress = 0;
diff -Nru a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c
--- a/drivers/scsi/ibmvscsi/ibmvscsi.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/scsi/ibmvscsi/ibmvscsi.c	2005-01-10 20:11:17 -08:00
@@ -69,6 +69,7 @@
 #include <linux/module.h>
 #include <linux/moduleparam.h>
 #include <linux/dma-mapping.h>
+#include <linux/delay.h>
 #include <asm/vio.h>
 #include <scsi/scsi.h>
 #include <scsi/scsi_cmnd.h>
@@ -1327,8 +1328,7 @@
 		     time_before(jiffies, wait_switch) &&
 		     atomic_read(&hostdata->request_limit) < 0;) {
 
-			set_current_state(TASK_UNINTERRUPTIBLE);
-			schedule_timeout(HZ / 100);
+			msleep(10);
 		}
 
 		/* if we now have a valid request_limit, initiate a scan */
diff -Nru a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c
--- a/drivers/scsi/ide-scsi.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/scsi/ide-scsi.c	2005-01-10 20:11:20 -08:00
@@ -301,23 +301,9 @@
 	return ide_do_drive_cmd(drive, rq, ide_preempt);
 }
 
-ide_startstop_t idescsi_atapi_error (ide_drive_t *drive, const char *msg, byte stat)
+static ide_startstop_t
+idescsi_atapi_error(ide_drive_t *drive, struct request *rq, u8 stat, u8 err)
 {
-	struct request *rq;
-	byte err;
-
-	err = ide_dump_atapi_status(drive, msg, stat);
-
-	if (drive == NULL || (rq = HWGROUP(drive)->rq) == NULL)
-		return ide_stopped;
-
-	/* retry only "normal" I/O: */
-	if (rq->flags & (REQ_DRIVE_CMD | REQ_DRIVE_TASK | REQ_DRIVE_TASKFILE)) {
-		rq->errors = 1;
-		ide_end_drive_cmd(drive, stat, err);
-		return ide_stopped;
-	}
-
 	if (HWIF(drive)->INB(IDE_STATUS_REG) & (BUSY_STAT|DRQ_STAT))
 		/* force an abort */
 		HWIF(drive)->OUTB(WIN_IDLEIMMEDIATE,IDE_COMMAND_REG);
@@ -327,20 +313,9 @@
 	return ide_stopped;
 }
 
-ide_startstop_t idescsi_atapi_abort (ide_drive_t *drive, const char *msg)
+static ide_startstop_t
+idescsi_atapi_abort(ide_drive_t *drive, struct request *rq)
 {
-	struct request *rq;
-
-	if (drive == NULL || (rq = HWGROUP(drive)->rq) == NULL)
-	       return ide_stopped;
-
-	/* retry only "normal" I/O: */
-	if (rq->flags & (REQ_DRIVE_CMD | REQ_DRIVE_TASK | REQ_DRIVE_TASKFILE)) {
-		rq->errors = 1;
-		ide_end_drive_cmd(drive, BUSY_STAT, 0);
-		return ide_stopped;
-	}
-
 #if IDESCSI_DEBUG_LOG
 	printk(KERN_WARNING "idescsi_atapi_abort called for %lu\n",
 			((idescsi_pc_t *) rq->special)->scsi_cmd->serial_number);
diff -Nru a/drivers/scsi/in2000.c b/drivers/scsi/in2000.c
--- a/drivers/scsi/in2000.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/scsi/in2000.c	2005-01-10 20:11:21 -08:00
@@ -186,7 +186,7 @@
 /* filled in by 'insmod' */
 static char *setup_strings;
 
-MODULE_PARM(setup_strings, "s");
+module_param(setup_strings, charp, 0);
 
 static inline uchar read_3393(struct IN2000_hostdata *hostdata, uchar reg_num)
 {
diff -Nru a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
--- a/drivers/scsi/ipr.c	2005-01-10 20:11:24 -08:00
+++ b/drivers/scsi/ipr.c	2005-01-10 20:11:24 -08:00
@@ -312,6 +312,8 @@
 	"9041: Array protection temporarily suspended"},
 	{0x066B0200, 0, 1,
 	"9030: Array no longer protected due to missing or failed disk unit"},
+	{0x066B8200, 0, 1,
+	"9042: Corrupt array parity detected on specified device"},
 	{0x07270000, 0, 0,
 	"Failure due to other device"},
 	{0x07278000, 0, 1,
@@ -542,7 +544,7 @@
 		return -EIO;
 	}
 
-	if (pci_read_config_word(ioa_cfg->pdev, pcix_cmd_reg,
+	if (pci_read_config_word(ioa_cfg->pdev, pcix_cmd_reg + PCI_X_CMD,
 				 &ioa_cfg->saved_pcix_cmd_reg) != PCIBIOS_SUCCESSFUL) {
 		dev_err(&ioa_cfg->pdev->dev, "Failed to save PCI-X command register\n");
 		return -EIO;
@@ -564,7 +566,7 @@
 	int pcix_cmd_reg = pci_find_capability(ioa_cfg->pdev, PCI_CAP_ID_PCIX);
 
 	if (pcix_cmd_reg) {
-		if (pci_write_config_word(ioa_cfg->pdev, pcix_cmd_reg,
+		if (pci_write_config_word(ioa_cfg->pdev, pcix_cmd_reg + PCI_X_CMD,
 					  ioa_cfg->saved_pcix_cmd_reg) != PCIBIOS_SUCCESSFUL) {
 			dev_err(&ioa_cfg->pdev->dev, "Failed to setup PCI-X command register\n");
 			return -EIO;
@@ -3904,7 +3906,8 @@
 		ioarcb->cmd_pkt.flags_lo |= ipr_get_task_attributes(scsi_cmd);
 	}
 
-	if (!ipr_is_gscsi(res) && scsi_cmd->cmnd[0] >= 0xC0)
+	if (scsi_cmd->cmnd[0] >= 0xC0 &&
+	    (!ipr_is_gscsi(res) || scsi_cmd->cmnd[0] == IPR_QUERY_RSRC_STATE))
 		ioarcb->cmd_pkt.request_type = IPR_RQTYPE_IOACMD;
 
 	if (ipr_is_ioa_resource(res) && scsi_cmd->cmnd[0] == MODE_SELECT)
diff -Nru a/drivers/scsi/ipr.h b/drivers/scsi/ipr.h
--- a/drivers/scsi/ipr.h	2005-01-10 20:11:17 -08:00
+++ b/drivers/scsi/ipr.h	2005-01-10 20:11:17 -08:00
@@ -32,15 +32,12 @@
 #include <linux/kref.h>
 #include <scsi/scsi.h>
 #include <scsi/scsi_cmnd.h>
-#ifdef CONFIG_KDB
-#include <linux/kdb.h>
-#endif
 
 /*
  * Literals
  */
-#define IPR_DRIVER_VERSION "2.0.11"
-#define IPR_DRIVER_DATE "(August 3, 2004)"
+#define IPR_DRIVER_VERSION "2.0.12"
+#define IPR_DRIVER_DATE "(December 14, 2004)"
 
 /*
  * IPR_DBG_TRACE: Setting this to 1 will turn on some general function tracing
@@ -146,6 +143,7 @@
 /*
  * Adapter Commands
  */
+#define IPR_QUERY_RSRC_STATE				0xC2
 #define IPR_RESET_DEVICE				0xC3
 #define	IPR_RESET_TYPE_SELECT				0x80
 #define	IPR_LUN_RESET					0x40
@@ -1059,20 +1057,20 @@
 };
 
 struct ipr_software_inq_lid_info {
-    u32  load_id;
-    u32  timestamp[3];
+	u32 load_id;
+	u32 timestamp[3];
 }__attribute__((packed, aligned (4)));
 
 struct ipr_ucode_image_header {
-    u32 header_length;
-    u32 lid_table_offset;
-    u8 major_release;
-    u8 card_type;
-    u8 minor_release[2];
-    u8 reserved[20];
-    char eyecatcher[16];
-    u32 num_lids;
-    struct ipr_software_inq_lid_info lid[1];
+	u32 header_length;
+	u32 lid_table_offset;
+	u8 major_release;
+	u8 card_type;
+	u8 minor_release[2];
+	u8 reserved[20];
+	char eyecatcher[16];
+	u32 num_lids;
+	struct ipr_software_inq_lid_info lid[1];
 }__attribute__((packed, aligned (4)));
 
 /*
@@ -1082,18 +1080,6 @@
 #define IPR_DBG_CMD(CMD) do { CMD; } while (0)
 #else
 #define IPR_DBG_CMD(CMD)
-#endif
-
-#define ipr_breakpoint_data KERN_ERR IPR_NAME\
-": %s: %s: Line: %d ioa_cfg: %p\n", __FILE__, \
-__FUNCTION__, __LINE__, ioa_cfg
-
-#if defined(CONFIG_KDB) && !defined(CONFIG_PPC_ISERIES)
-#define ipr_breakpoint {printk(ipr_breakpoint_data); KDB_ENTER();}
-#define ipr_breakpoint_or_die {printk(ipr_breakpoint_data); KDB_ENTER();}
-#else
-#define ipr_breakpoint
-#define ipr_breakpoint_or_die panic(ipr_breakpoint_data)
 #endif
 
 #ifdef CONFIG_SCSI_IPR_TRACE
diff -Nru a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
--- a/drivers/scsi/libata-core.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/scsi/libata-core.c	2005-01-10 20:11:15 -08:00
@@ -28,6 +28,7 @@
 #include <linux/pci.h>
 #include <linux/init.h>
 #include <linux/list.h>
+#include <linux/mm.h>
 #include <linux/highmem.h>
 #include <linux/spinlock.h>
 #include <linux/blkdev.h>
@@ -1919,7 +1920,24 @@
 	if (idx)
 		ap->prd[idx - 1].flags_len |= cpu_to_le32(ATA_PRD_EOT);
 }
+/**
+ *	ata_check_atapi_dma - Check whether ATAPI DMA can be supported
+ *	@qc: Metadata associated with taskfile to check
+ *
+ *	LOCKING:
+ *	RETURNS: 0 when ATAPI DMA can be used
+ *               nonzero otherwise
+ */
+int ata_check_atapi_dma(struct ata_queued_cmd *qc)
+{
+	struct ata_port *ap = qc->ap;
+	int rc = 0; /* Assume ATAPI DMA is OK by default */
+
+	if (ap->ops->check_atapi_dma)
+		rc = ap->ops->check_atapi_dma(qc);
 
+	return rc;
+}
 /**
  *	ata_qc_prep - Prepare taskfile for submission
  *	@qc: Metadata associated with taskfile to be prepared
@@ -2369,6 +2387,9 @@
 	unsigned long timeout = 0;
 
 	switch (ap->pio_task_state) {
+	case PIO_ST_IDLE:
+		return;
+
 	case PIO_ST:
 		ata_pio_block(ap);
 		break;
@@ -2385,18 +2406,14 @@
 	case PIO_ST_TMOUT:
 	case PIO_ST_ERR:
 		ata_pio_error(ap);
-		break;
+		return;
 	}
 
-	if ((ap->pio_task_state != PIO_ST_IDLE) &&
-	    (ap->pio_task_state != PIO_ST_TMOUT) &&
-	    (ap->pio_task_state != PIO_ST_ERR)) {
-		if (timeout)
-			queue_delayed_work(ata_wq, &ap->pio_task,
-					   timeout);
-		else
-			queue_work(ata_wq, &ap->pio_task);
-	}
+	if (timeout)
+		queue_delayed_work(ata_wq, &ap->pio_task,
+				   timeout);
+	else
+		queue_work(ata_wq, &ap->pio_task);
 }
 
 static void atapi_request_sense(struct ata_port *ap, struct ata_device *dev,
@@ -2405,7 +2422,6 @@
 	DECLARE_COMPLETION(wait);
 	struct ata_queued_cmd *qc;
 	unsigned long flags;
-	int using_pio = dev->flags & ATA_DFLAG_PIO;
 	int rc;
 
 	DPRINTK("ATAPI request sense\n");
@@ -2426,16 +2442,10 @@
 	qc->tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE;
 	qc->tf.command = ATA_CMD_PACKET;
 
-	if (using_pio) {
-		qc->tf.protocol = ATA_PROT_ATAPI;
-		qc->tf.lbam = (8 * 1024) & 0xff;
-		qc->tf.lbah = (8 * 1024) >> 8;
-
-		qc->nbytes = SCSI_SENSE_BUFFERSIZE;
-	} else {
-		qc->tf.protocol = ATA_PROT_ATAPI_DMA;
-		qc->tf.feature |= ATAPI_PKT_DMA;
-	}
+	qc->tf.protocol = ATA_PROT_ATAPI;
+	qc->tf.lbam = (8 * 1024) & 0xff;
+	qc->tf.lbah = (8 * 1024) >> 8;
+	qc->nbytes = SCSI_SENSE_BUFFERSIZE;
 
 	qc->waiting = &wait;
 	qc->complete_fn = ata_qc_complete_noop;
diff -Nru a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c
--- a/drivers/scsi/libata-scsi.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/scsi/libata-scsi.c	2005-01-10 20:11:18 -08:00
@@ -1294,6 +1294,11 @@
 	int using_pio = (dev->flags & ATA_DFLAG_PIO);
 	int nodata = (cmd->sc_data_direction == SCSI_DATA_NONE);
 
+	if (!using_pio)
+		/* Check whether ATAPI DMA is safe */
+		if (ata_check_atapi_dma(qc))
+			using_pio = 1;
+
 	memcpy(&qc->cdb, scsicmd, qc->ap->cdb_len);
 
 	qc->complete_fn = atapi_qc_complete;
diff -Nru a/drivers/scsi/libata.h b/drivers/scsi/libata.h
--- a/drivers/scsi/libata.h	2005-01-10 20:11:17 -08:00
+++ b/drivers/scsi/libata.h	2005-01-10 20:11:17 -08:00
@@ -38,6 +38,7 @@
 extern struct ata_queued_cmd *ata_qc_new_init(struct ata_port *ap,
 				      struct ata_device *dev);
 extern int ata_qc_issue(struct ata_queued_cmd *qc);
+extern int ata_check_atapi_dma(struct ata_queued_cmd *qc);
 extern void ata_dev_select(struct ata_port *ap, unsigned int device,
                            unsigned int wait, unsigned int can_sleep);
 extern void ata_tf_to_host_nolock(struct ata_port *ap, struct ata_taskfile *tf);
diff -Nru a/drivers/scsi/mca_53c9x.c b/drivers/scsi/mca_53c9x.c
--- a/drivers/scsi/mca_53c9x.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/scsi/mca_53c9x.c	2005-01-10 20:11:17 -08:00
@@ -103,7 +103,7 @@
 static struct ESP_regs eregs;
 
 /***************************************************************** Detection */
-int mca_esp_detect(Scsi_Host_Template *tpnt)
+static int mca_esp_detect(Scsi_Host_Template *tpnt)
 {
 	struct NCR_ESP *esp;
 	static int io_port_by_pos[] = MCA_53C9X_IO_PORTS;
@@ -283,7 +283,7 @@
 
 /******************************************************************* Release */
 
-int mca_esp_release(struct Scsi_Host *host)
+static int mca_esp_release(struct Scsi_Host *host)
 {
 	struct NCR_ESP *esp = (struct NCR_ESP *)host->hostdata;
 	unsigned char tmp_byte;
diff -Nru a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c
--- a/drivers/scsi/megaraid.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/scsi/megaraid.c	2005-01-10 20:11:15 -08:00
@@ -5109,11 +5109,11 @@
 	 */
 	unregister_chrdev(major, "megadev");
 
+	pci_unregister_driver(&megaraid_pci_driver);
+
 #ifdef CONFIG_PROC_FS
 	remove_proc_entry("megaraid", &proc_root);
 #endif
-
-	pci_unregister_driver(&megaraid_pci_driver);
 }
 
 module_init(megaraid_init);
diff -Nru a/drivers/scsi/nsp32.c b/drivers/scsi/nsp32.c
--- a/drivers/scsi/nsp32.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/scsi/nsp32.c	2005-01-10 20:11:18 -08:00
@@ -60,17 +60,17 @@
  * Module parameters
  */
 static int       trans_mode = 0;	/* default: BIOS */
-MODULE_PARM     (trans_mode, "i");
+module_param     (trans_mode, int, 0);
 MODULE_PARM_DESC(trans_mode, "transfer mode (0: BIOS(default) 1: Async 2: Ultra20M");
 #define ASYNC_MODE    1
 #define ULTRA20M_MODE 2
 
 static int       auto_param = 0;	/* default: ON */
-MODULE_PARM     (auto_param, "i");
+module_param     (auto_param, bool, 0);
 MODULE_PARM_DESC(auto_param, "AutoParameter mode (0: ON(default) 1: OFF)");
 
 static int       disc_priv  = 1;	/* default: OFF */
-MODULE_PARM     (disc_priv,  "i");
+module_param     (disc_priv, bool, 0);
 MODULE_PARM_DESC(disc_priv,  "disconnection privilege mode (0: ON 1: OFF(default))");
 
 MODULE_AUTHOR("YOKOTA Hiroshi <yokota@netlab.is.tsukuba.ac.jp>, GOTO Masanori <gotom@debian.or.jp>");
diff -Nru a/drivers/scsi/pcmcia/aha152x_stub.c b/drivers/scsi/pcmcia/aha152x_stub.c
--- a/drivers/scsi/pcmcia/aha152x_stub.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/scsi/pcmcia/aha152x_stub.c	2005-01-10 20:11:22 -08:00
@@ -82,14 +82,14 @@
 static int reset_delay = 100;
 static int ext_trans = 0;
 
-MODULE_PARM(irq_mask, "i");
-MODULE_PARM(irq_list, "1-4i");
-MODULE_PARM(host_id, "i");
-MODULE_PARM(reconnect, "i");
-MODULE_PARM(parity, "i");
-MODULE_PARM(synchronous, "i");
-MODULE_PARM(reset_delay, "i");
-MODULE_PARM(ext_trans, "i");
+module_param(irq_mask, int, 0);
+module_param_array(irq_list, int, NULL, 0);
+module_param(host_id, int, 0);
+module_param(reconnect, int, 0);
+module_param(parity, int, 0);
+module_param(synchronous, int, 0);
+module_param(reset_delay, int, 0);
+module_param(ext_trans, int, 0);
 
 MODULE_LICENSE("Dual MPL/GPL");
 
diff -Nru a/drivers/scsi/pcmcia/fdomain_stub.c b/drivers/scsi/pcmcia/fdomain_stub.c
--- a/drivers/scsi/pcmcia/fdomain_stub.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/scsi/pcmcia/fdomain_stub.c	2005-01-10 20:11:20 -08:00
@@ -63,13 +63,13 @@
 
 /* Bit map of interrupts to choose from */
 static int irq_mask = 0xdeb8;
-MODULE_PARM(irq_mask, "i");
+module_param(irq_mask, int, 0);
 static int irq_list[4] = { -1 };
-MODULE_PARM(irq_list, "1-4i");
+module_param_array(irq_list, int, NULL, 0);
 
 #ifdef PCMCIA_DEBUG
 static int pc_debug = PCMCIA_DEBUG;
-MODULE_PARM(pc_debug, "i");
+module_param(pc_debug, int, 0);
 #define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args)
 static char *version =
 "fdomain_cs.c 1.47 2001/10/13 00:08:52 (David Hinds)";
diff -Nru a/drivers/scsi/pcmcia/nsp_cs.c b/drivers/scsi/pcmcia/nsp_cs.c
--- a/drivers/scsi/pcmcia/nsp_cs.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/scsi/pcmcia/nsp_cs.c	2005-01-10 20:11:23 -08:00
@@ -73,20 +73,20 @@
 /* Parameters that can be set with 'insmod' */
 
 static unsigned int irq_mask = 0xffff;
-MODULE_PARM     (irq_mask, "i");
+module_param(irq_mask, int, 0);
 MODULE_PARM_DESC(irq_mask, "IRQ mask bits (default: 0xffff)");
 
 static int       irq_list[4] = { -1 };
-MODULE_PARM     (irq_list, "1-4i");
+module_param_array(irq_list, int, NULL, 0);
 MODULE_PARM_DESC(irq_list, "Use specified IRQ number. (default: auto select)");
 
 static int       nsp_burst_mode = BURST_MEM32;
-MODULE_PARM     (nsp_burst_mode, "i");
+module_param(nsp_burst_mode, int, 0);
 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_param(free_ports, bool, 0);
 MODULE_PARM_DESC(free_ports, "Release IO ports after configuration? (default: 0 (=no))");
 
 /* /usr/src/linux/drivers/scsi/hosts.h */
diff -Nru a/drivers/scsi/pcmcia/qlogic_stub.c b/drivers/scsi/pcmcia/qlogic_stub.c
--- a/drivers/scsi/pcmcia/qlogic_stub.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/scsi/pcmcia/qlogic_stub.c	2005-01-10 20:11:19 -08:00
@@ -99,8 +99,8 @@
 static unsigned int irq_mask = 0xdeb8;
 static int irq_list[4] = { -1 };
 
-MODULE_PARM(irq_mask, "i");
-MODULE_PARM(irq_list, "1-4i");
+module_param(irq_mask, int, 0);
+module_param_array(irq_list, int, NULL, 0);
 
 /*====================================================================*/
 
diff -Nru a/drivers/scsi/qla2xxx/Kconfig b/drivers/scsi/qla2xxx/Kconfig
--- a/drivers/scsi/qla2xxx/Kconfig	2005-01-10 20:11:23 -08:00
+++ b/drivers/scsi/qla2xxx/Kconfig	2005-01-10 20:11:23 -08:00
@@ -22,7 +22,7 @@
 	depends on SCSI_QLA2XXX
         select SCSI_FC_ATTRS
 	---help---
-	This driver supports the QLogic 2300 (ISP2300, and ISP2312) host
+	This driver supports the QLogic 2300 (ISP2300 and ISP2312) host
 	adapter family.
 
 config SCSI_QLA2322
@@ -33,15 +33,9 @@
 	This driver supports the QLogic 2322 (ISP2322) host adapter family.
 
 config SCSI_QLA6312
-	tristate "QLogic ISP6312 host adapter family support"
+	tristate "QLogic ISP63xx host adapter family support"
 	depends on SCSI_QLA2XXX
         select SCSI_FC_ATTRS
 	---help---
-	This driver supports the QLogic 6312 (ISP6312) host adapter family.
-
-config SCSI_QLA6322
-	tristate "QLogic ISP6322 host adapter family support"
-	depends on SCSI_QLA2XXX
-        select SCSI_FC_ATTRS
-	---help---
-	This driver supports the QLogic 6322 (ISP6322) host adapter family.
+	This driver supports the QLogic 63xx (ISP6312 and ISP6322) host
+	adapter family.
diff -Nru a/drivers/scsi/qla2xxx/Makefile b/drivers/scsi/qla2xxx/Makefile
--- a/drivers/scsi/qla2xxx/Makefile	2005-01-10 20:11:15 -08:00
+++ b/drivers/scsi/qla2xxx/Makefile	2005-01-10 20:11:15 -08:00
@@ -8,11 +8,9 @@
 qla2300-y := ql2300.o ql2300_fw.o
 qla2322-y := ql2322.o ql2322_fw.o
 qla6312-y := ql6312.o ql6312_fw.o
-qla6322-y := ql6322.o ql6322_fw.o
 
 obj-$(CONFIG_SCSI_QLA21XX) += qla2xxx.o qla2100.o
 obj-$(CONFIG_SCSI_QLA22XX) += qla2xxx.o qla2200.o
 obj-$(CONFIG_SCSI_QLA2300) += qla2xxx.o qla2300.o
 obj-$(CONFIG_SCSI_QLA2322) += qla2xxx.o qla2322.o
 obj-$(CONFIG_SCSI_QLA6312) += qla2xxx.o qla6312.o
-obj-$(CONFIG_SCSI_QLA6322) += qla2xxx.o qla6322.o
diff -Nru a/drivers/scsi/qla2xxx/ql2300.c b/drivers/scsi/qla2xxx/ql2300.c
--- a/drivers/scsi/qla2xxx/ql2300.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/scsi/qla2xxx/ql2300.c	2005-01-10 20:11:23 -08:00
@@ -98,6 +98,6 @@
 module_exit(qla2300_exit);
 
 MODULE_AUTHOR("QLogic Corporation");
-MODULE_DESCRIPTION("QLogic ISP2300 FC-SCSI Host Bus Adapter driver");
+MODULE_DESCRIPTION("QLogic ISP23xx FC-SCSI Host Bus Adapter driver");
 MODULE_LICENSE("GPL");
 MODULE_VERSION(QLA2XXX_VERSION);
diff -Nru a/drivers/scsi/qla2xxx/ql2300_fw.c b/drivers/scsi/qla2xxx/ql2300_fw.c
--- a/drivers/scsi/qla2xxx/ql2300_fw.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/scsi/qla2xxx/ql2300_fw.c	2005-01-10 20:11:18 -08:00
@@ -1,8 +1,8 @@
-/**************************************************************************
+/******************************************************************************
  *                  QLOGIC LINUX SOFTWARE
  *
  * QLogic ISP2x00 device driver for Linux 2.6.x
- * Copyright (C) 2003-2004 QLogic Corporation
+ * Copyright (C) 2003 QLogic Corporation
  * (www.qlogic.com)
  *
  * This program is free software; you can redistribute it and/or modify it
@@ -15,10 +15,10 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  *
- *************************************************************************/
+ ******************************************************************************/
 
 /*
- *	Firmware Version 3.03.02 (16:50 Aug 10, 2004)
+ *	Firmware Version 3.03.08 (10:02 Nov 12, 2004)
  */
 
 #ifdef UNIQUE_FW_NAME
@@ -28,15 +28,15 @@
 #endif
 
 #ifdef UNIQUE_FW_NAME
-unsigned char fw2300ipx_version_str[] = {3, 3, 2};
+unsigned char fw2300ipx_version_str[] = {3, 3, 8};
 #else
-unsigned char firmware_version[] = {3, 3, 2};
+unsigned char firmware_version[] = {3, 3, 8};
 #endif
 
 #ifdef UNIQUE_FW_NAME
-#define fw2300ipx_VERSION_STRING "3.03.02"
+#define fw2300ipx_VERSION_STRING "3.03.08"
 #else
-#define FW_VERSION_STRING "3.03.02"
+#define FW_VERSION_STRING "3.03.08"
 #endif
 
 #ifdef UNIQUE_FW_NAME
@@ -50,12 +50,12 @@
 #else
 unsigned short risc_code01[] = { 
 #endif
-	0x0470, 0x0000, 0x0000, 0xea02, 0x0000, 0x0003, 0x0003, 0x0002,
+	0x0470, 0x0000, 0x0000, 0xeb57, 0x0000, 0x0003, 0x0003, 0x0008,
 	0x0137, 0x2043, 0x4f50, 0x5952, 0x4947, 0x4854, 0x2032, 0x3030,
 	0x3120, 0x514c, 0x4f47, 0x4943, 0x2043, 0x4f52, 0x504f, 0x5241,
 	0x5449, 0x4f4e, 0x2049, 0x5350, 0x3233, 0x3030, 0x2046, 0x6972,
 	0x6d77, 0x6172, 0x6520, 0x2056, 0x6572, 0x7369, 0x6f6e, 0x2030,
-	0x332e, 0x3033, 0x2e30, 0x3220, 0x2020, 0x2020, 0x2400, 0x20a9,
+	0x332e, 0x3033, 0x2e30, 0x3820, 0x2020, 0x2020, 0x2400, 0x20a9,
 	0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2200, 0x20a9, 0x000f,
 	0x2001, 0x0000, 0x400f, 0x2091, 0x2400, 0x20a9, 0x000f, 0x2001,
 	0x0000, 0x400f, 0x2091, 0x2600, 0x20a9, 0x000f, 0x2001, 0x0000,
@@ -64,175 +64,175 @@
 	0x2c00, 0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2e00,
 	0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2000, 0x2001,
 	0x0000, 0x20c1, 0x0004, 0x20c9, 0x1bff, 0x2059, 0x0000, 0x2b78,
-	0x7883, 0x0004, 0x2089, 0x2d36, 0x2051, 0x1800, 0x2a70, 0x20e1,
+	0x7883, 0x0004, 0x2089, 0x2d88, 0x2051, 0x1800, 0x2a70, 0x20e1,
 	0x0001, 0x20e9, 0x0001, 0x2009, 0x0000, 0x080c, 0x0e51, 0x2029,
 	0x4d00, 0x2031, 0xffff, 0x2039, 0x4cd0, 0x2021, 0x0200, 0x20e9,
 	0x0001, 0x20a1, 0x0000, 0x20a9, 0x0800, 0x900e, 0x4104, 0x20e9,
 	0x0001, 0x20a1, 0x1000, 0x900e, 0x2001, 0x0cc0, 0x9084, 0x0fff,
 	0x20a8, 0x4104, 0x2001, 0x0000, 0x9086, 0x0000, 0x0120, 0x21a8,
 	0x4104, 0x8001, 0x1de0, 0x756e, 0x7672, 0x776a, 0x7476, 0x747a,
-	0x00e6, 0x2071, 0x1ac7, 0x2472, 0x00ee, 0x20a1, 0x1cd0, 0x7170,
+	0x00e6, 0x2071, 0x1aca, 0x2472, 0x00ee, 0x20a1, 0x1cd0, 0x7170,
 	0x810d, 0x810d, 0x810d, 0x810d, 0x918c, 0x000f, 0x2001, 0x0001,
 	0x9112, 0x900e, 0x21a8, 0x4104, 0x8211, 0x1de0, 0x7170, 0x3400,
 	0x8001, 0x9102, 0x0120, 0x0218, 0x20a8, 0x900e, 0x4104, 0x2009,
 	0x1800, 0x810d, 0x810d, 0x810d, 0x810d, 0x810d, 0x918c, 0x001f,
 	0x2001, 0x0001, 0x9112, 0x20e9, 0x0001, 0x20a1, 0x0800, 0x900e,
 	0x20a9, 0x0800, 0x4104, 0x8211, 0x1dd8, 0x080c, 0x0f17, 0x080c,
-	0x603b, 0x080c, 0xadf5, 0x080c, 0x10ce, 0x080c, 0x12ed, 0x080c,
-	0x1bb1, 0x080c, 0x0d69, 0x080c, 0x1053, 0x080c, 0x3432, 0x080c,
-	0x76ad, 0x080c, 0x69ad, 0x080c, 0x86fc, 0x080c, 0x8430, 0x080c,
-	0x2485, 0x080c, 0x8fa0, 0x080c, 0x7d78, 0x080c, 0x22be, 0x080c,
-	0x23f2, 0x080c, 0x247a, 0x2091, 0x3009, 0x7883, 0x0000, 0x1004,
+	0x60bb, 0x080c, 0xaed9, 0x080c, 0x10ce, 0x080c, 0x12ed, 0x080c,
+	0x1be2, 0x080c, 0x0d69, 0x080c, 0x1053, 0x080c, 0x3484, 0x080c,
+	0x7738, 0x080c, 0x6a30, 0x080c, 0x87b3, 0x080c, 0x84e7, 0x080c,
+	0x24b6, 0x080c, 0x9057, 0x080c, 0x7e03, 0x080c, 0x22ef, 0x080c,
+	0x2423, 0x080c, 0x24ab, 0x2091, 0x3009, 0x7883, 0x0000, 0x1004,
 	0x091f, 0x7880, 0x9086, 0x0002, 0x1190, 0x7883, 0x4000, 0x7837,
 	0x4000, 0x7833, 0x0010, 0x0e04, 0x0913, 0x2091, 0x5000, 0x2091,
 	0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x119b, 0x2071,
 	0x1800, 0x7003, 0x0000, 0x2071, 0x1800, 0x7000, 0x908e, 0x0003,
-	0x1178, 0x080c, 0x4be3, 0x080c, 0x3459, 0x080c, 0x771e, 0x080c,
-	0x6ede, 0x080c, 0x87da, 0x080c, 0x8459, 0x080c, 0x2ca0, 0x0c58,
+	0x1178, 0x080c, 0x4c44, 0x080c, 0x34ab, 0x080c, 0x77a9, 0x080c,
+	0x6f61, 0x080c, 0x8896, 0x080c, 0x8510, 0x080c, 0x2cf2, 0x0c58,
 	0x000b, 0x0c78, 0x0944, 0x0945, 0x0ae7, 0x0942, 0x0bae, 0x0d68,
 	0x0d68, 0x0d68, 0x080c, 0x0dd5, 0x0005, 0x0126, 0x00f6, 0x2091,
-	0x8000, 0x7000, 0x9086, 0x0001, 0x1904, 0x0aba, 0x080c, 0x56f1,
+	0x8000, 0x7000, 0x9086, 0x0001, 0x1904, 0x0aba, 0x080c, 0x576c,
 	0x1130, 0x0026, 0x2011, 0x0080, 0x080c, 0x0edf, 0x002e, 0x080c,
-	0x73b3, 0x0150, 0x080c, 0x73d6, 0x15a0, 0x2079, 0x0100, 0x7828,
-	0x9085, 0x1800, 0x782a, 0x0468, 0x080c, 0x72e5, 0x7000, 0x9086,
+	0x743e, 0x0150, 0x080c, 0x7461, 0x15a0, 0x2079, 0x0100, 0x7828,
+	0x9085, 0x1800, 0x782a, 0x0468, 0x080c, 0x736a, 0x7000, 0x9086,
 	0x0001, 0x1904, 0x0aba, 0x7098, 0x9086, 0x0028, 0x1904, 0x0aba,
-	0x080c, 0x8428, 0x080c, 0x841a, 0x2001, 0x0161, 0x2003, 0x0001,
+	0x080c, 0x84d0, 0x080c, 0x84c2, 0x2001, 0x0161, 0x2003, 0x0001,
 	0x2079, 0x0100, 0x7827, 0xffff, 0x7a28, 0x9295, 0x5e2f, 0x7a2a,
-	0x2011, 0x7249, 0x080c, 0x84f9, 0x2011, 0x723c, 0x080c, 0x85d3,
-	0x2011, 0x5e96, 0x080c, 0x84f9, 0x2011, 0x8030, 0x901e, 0x7396,
-	0x04d0, 0x080c, 0x5743, 0x2079, 0x0100, 0x7844, 0x9005, 0x1904,
-	0x0aba, 0x2011, 0x5e96, 0x080c, 0x84f9, 0x2011, 0x7249, 0x080c,
-	0x84f9, 0x2011, 0x723c, 0x080c, 0x85d3, 0x2001, 0x0265, 0x2001,
+	0x2011, 0x72ce, 0x080c, 0x85b0, 0x2011, 0x72c1, 0x080c, 0x868a,
+	0x2011, 0x5f16, 0x080c, 0x85b0, 0x2011, 0x8030, 0x901e, 0x7396,
+	0x04d0, 0x080c, 0x57c3, 0x2079, 0x0100, 0x7844, 0x9005, 0x1904,
+	0x0aba, 0x2011, 0x5f16, 0x080c, 0x85b0, 0x2011, 0x72ce, 0x080c,
+	0x85b0, 0x2011, 0x72c1, 0x080c, 0x868a, 0x2001, 0x0265, 0x2001,
 	0x0205, 0x2003, 0x0000, 0x7840, 0x9084, 0xfffb, 0x7842, 0x2001,
 	0x19a5, 0x2004, 0x9005, 0x1140, 0x00c6, 0x2061, 0x0100, 0x080c,
-	0x5fe3, 0x00ce, 0x0804, 0x0aba, 0x780f, 0x006b, 0x7a28, 0x080c,
-	0x73bb, 0x0118, 0x9295, 0x5e2f, 0x0010, 0x9295, 0x402f, 0x7a2a,
+	0x6063, 0x00ce, 0x0804, 0x0aba, 0x780f, 0x006b, 0x7a28, 0x080c,
+	0x7446, 0x0118, 0x9295, 0x5e2f, 0x0010, 0x9295, 0x402f, 0x7a2a,
 	0x2011, 0x8010, 0x73d8, 0x2001, 0x19a6, 0x2003, 0x0001, 0x080c,
-	0x2b66, 0x080c, 0x4b1e, 0x7248, 0xc284, 0x724a, 0x2001, 0x180c,
-	0x200c, 0xc1ac, 0xc1cc, 0x2102, 0x080c, 0xa52f, 0x2011, 0x0004,
-	0x080c, 0xcb6a, 0x080c, 0x6839, 0x080c, 0x73b3, 0x1120, 0x080c,
-	0x2baa, 0x02e0, 0x0400, 0x080c, 0x5fea, 0x0140, 0x7097, 0x0001,
-	0x70d3, 0x0000, 0x080c, 0x5910, 0x0804, 0x0aba, 0x080c, 0x56e2,
+	0x2b97, 0x080c, 0x4b7f, 0x7248, 0xc284, 0x724a, 0x2001, 0x180c,
+	0x200c, 0xc1ac, 0xc1cc, 0x2102, 0x080c, 0xa613, 0x2011, 0x0004,
+	0x080c, 0xcc96, 0x080c, 0x68bc, 0x080c, 0x743e, 0x1120, 0x080c,
+	0x2bdb, 0x02e0, 0x0400, 0x080c, 0x606a, 0x0140, 0x7097, 0x0001,
+	0x70d3, 0x0000, 0x080c, 0x5990, 0x0804, 0x0aba, 0x080c, 0x575d,
 	0xd094, 0x0188, 0x2011, 0x180c, 0x2204, 0xc0cd, 0x2012, 0x080c,
-	0x56e6, 0xd0d4, 0x1118, 0x080c, 0x2baa, 0x1270, 0x2011, 0x180c,
-	0x2204, 0xc0bc, 0x00a8, 0x080c, 0x56e6, 0xd0d4, 0x1db8, 0x2011,
+	0x5761, 0xd0d4, 0x1118, 0x080c, 0x2bdb, 0x1270, 0x2011, 0x180c,
+	0x2204, 0xc0bc, 0x00a8, 0x080c, 0x5761, 0xd0d4, 0x1db8, 0x2011,
 	0x180c, 0x2204, 0xc0bd, 0x0060, 0x2011, 0x180c, 0x2204, 0xc0bd,
-	0x2012, 0x080c, 0x6981, 0x1128, 0xd0a4, 0x0118, 0x2204, 0xc0fd,
-	0x2012, 0x080c, 0x6947, 0x0120, 0x7a0c, 0xc2b4, 0x7a0e, 0x00a8,
-	0x707f, 0x0000, 0x080c, 0x73b3, 0x1130, 0x70b0, 0x9005, 0x1168,
-	0x080c, 0xcfab, 0x0050, 0x080c, 0xcfab, 0x70dc, 0xd09c, 0x1128,
-	0x70b0, 0x9005, 0x0110, 0x080c, 0x5fc0, 0x70e7, 0x0000, 0x70e3,
-	0x0000, 0x70a7, 0x0000, 0x080c, 0x2bb2, 0x0228, 0x2011, 0x0101,
-	0x2204, 0xc0c4, 0x2012, 0x72dc, 0x080c, 0x73b3, 0x1178, 0x9016,
-	0x0016, 0x080c, 0x2963, 0x2019, 0x196c, 0x211a, 0x001e, 0x705f,
+	0x2012, 0x080c, 0x6a04, 0x1128, 0xd0a4, 0x0118, 0x2204, 0xc0fd,
+	0x2012, 0x080c, 0x69ca, 0x0120, 0x7a0c, 0xc2b4, 0x7a0e, 0x00a8,
+	0x707f, 0x0000, 0x080c, 0x743e, 0x1130, 0x70b0, 0x9005, 0x1168,
+	0x080c, 0xd0d9, 0x0050, 0x080c, 0xd0d9, 0x70dc, 0xd09c, 0x1128,
+	0x70b0, 0x9005, 0x0110, 0x080c, 0x6040, 0x70e7, 0x0000, 0x70e3,
+	0x0000, 0x70a7, 0x0000, 0x080c, 0x2be3, 0x0228, 0x2011, 0x0101,
+	0x2204, 0xc0c4, 0x2012, 0x72dc, 0x080c, 0x743e, 0x1178, 0x9016,
+	0x0016, 0x080c, 0x2994, 0x2019, 0x196c, 0x211a, 0x001e, 0x705f,
 	0xffff, 0x7063, 0x00ef, 0x7083, 0x0000, 0x0020, 0x2019, 0x196c,
 	0x201b, 0x0000, 0x2079, 0x1847, 0x7804, 0xd0ac, 0x0108, 0xc295,
-	0x72de, 0x080c, 0x73b3, 0x0118, 0x9296, 0x0004, 0x0548, 0x2011,
-	0x0001, 0x080c, 0xcb6a, 0x70ab, 0x0000, 0x70af, 0xffff, 0x7003,
+	0x72de, 0x080c, 0x743e, 0x0118, 0x9296, 0x0004, 0x0548, 0x2011,
+	0x0001, 0x080c, 0xcc96, 0x70ab, 0x0000, 0x70af, 0xffff, 0x7003,
 	0x0002, 0x2079, 0x0100, 0x7827, 0x0003, 0x7828, 0x9085, 0x0003,
-	0x782a, 0x00fe, 0x080c, 0x2fa3, 0x2011, 0x0005, 0x080c, 0xa63e,
-	0x080c, 0x96a6, 0x080c, 0x73b3, 0x0148, 0x00c6, 0x2061, 0x0100,
-	0x0016, 0x080c, 0x2963, 0x61e2, 0x001e, 0x00ce, 0x012e, 0x0420,
+	0x782a, 0x00fe, 0x080c, 0x2ff5, 0x2011, 0x0005, 0x080c, 0xa722,
+	0x080c, 0x9763, 0x080c, 0x743e, 0x0148, 0x00c6, 0x2061, 0x0100,
+	0x0016, 0x080c, 0x2994, 0x61e2, 0x001e, 0x00ce, 0x012e, 0x0420,
 	0x70ab, 0x0000, 0x70af, 0xffff, 0x7003, 0x0002, 0x00f6, 0x2079,
 	0x0100, 0x7827, 0x0003, 0x7828, 0x9085, 0x0003, 0x782a, 0x00fe,
-	0x2011, 0x0005, 0x080c, 0xa63e, 0x080c, 0x96a6, 0x080c, 0x73b3,
-	0x0148, 0x00c6, 0x2061, 0x0100, 0x0016, 0x080c, 0x2963, 0x61e2,
+	0x2011, 0x0005, 0x080c, 0xa722, 0x080c, 0x9763, 0x080c, 0x743e,
+	0x0148, 0x00c6, 0x2061, 0x0100, 0x0016, 0x080c, 0x2994, 0x61e2,
 	0x001e, 0x00ce, 0x00fe, 0x012e, 0x0005, 0x00c6, 0x00b6, 0x080c,
-	0x73b3, 0x1118, 0x20a9, 0x0800, 0x0010, 0x20a9, 0x0782, 0x080c,
-	0x73b3, 0x1110, 0x900e, 0x0010, 0x2009, 0x007e, 0x86ff, 0x0138,
+	0x743e, 0x1118, 0x20a9, 0x0800, 0x0010, 0x20a9, 0x0782, 0x080c,
+	0x743e, 0x1110, 0x900e, 0x0010, 0x2009, 0x007e, 0x86ff, 0x0138,
 	0x9180, 0x1000, 0x2004, 0x905d, 0x0110, 0xb800, 0xd0bc, 0x090c,
-	0x32c8, 0x8108, 0x1f04, 0x0ace, 0x707f, 0x0000, 0x7080, 0x9084,
+	0x331a, 0x8108, 0x1f04, 0x0ace, 0x707f, 0x0000, 0x7080, 0x9084,
 	0x00ff, 0x7082, 0x70b3, 0x0000, 0x00be, 0x00ce, 0x0005, 0x00b6,
 	0x0126, 0x2091, 0x8000, 0x7000, 0x9086, 0x0002, 0x1904, 0x0bab,
-	0x70ac, 0x9086, 0xffff, 0x0130, 0x080c, 0x2fa3, 0x080c, 0x96a6,
+	0x70ac, 0x9086, 0xffff, 0x0130, 0x080c, 0x2ff5, 0x080c, 0x9763,
 	0x0804, 0x0bab, 0x70dc, 0xd0ac, 0x1110, 0xd09c, 0x0558, 0xd084,
 	0x0548, 0x0006, 0x2001, 0x0103, 0x2003, 0x002b, 0x000e, 0xd08c,
-	0x0508, 0x080c, 0x332b, 0x11d0, 0x70e0, 0x9086, 0xffff, 0x01b0,
-	0x080c, 0x3138, 0x080c, 0x96a6, 0x70dc, 0xd094, 0x1904, 0x0bab,
-	0x2011, 0x0001, 0x080c, 0xd25a, 0x0110, 0x2011, 0x0003, 0x901e,
-	0x080c, 0x3172, 0x080c, 0x96a6, 0x0804, 0x0bab, 0x70e4, 0x9005,
+	0x0508, 0x080c, 0x337d, 0x11d0, 0x70e0, 0x9086, 0xffff, 0x01b0,
+	0x080c, 0x318a, 0x080c, 0x9763, 0x70dc, 0xd094, 0x1904, 0x0bab,
+	0x2011, 0x0001, 0x080c, 0xd388, 0x0110, 0x2011, 0x0003, 0x901e,
+	0x080c, 0x31c4, 0x080c, 0x9763, 0x0804, 0x0bab, 0x70e4, 0x9005,
 	0x1904, 0x0bab, 0x70a8, 0x9005, 0x1904, 0x0bab, 0x70dc, 0xd0a4,
-	0x0118, 0xd0b4, 0x0904, 0x0bab, 0x080c, 0x6947, 0x1904, 0x0bab,
-	0x080c, 0x699a, 0x1904, 0x0bab, 0x080c, 0x6981, 0x01c0, 0x0156,
-	0x00c6, 0x20a9, 0x007f, 0x900e, 0x0016, 0x080c, 0x6616, 0x1118,
+	0x0118, 0xd0b4, 0x0904, 0x0bab, 0x080c, 0x69ca, 0x1904, 0x0bab,
+	0x080c, 0x6a1d, 0x1904, 0x0bab, 0x080c, 0x6a04, 0x01c0, 0x0156,
+	0x00c6, 0x20a9, 0x007f, 0x900e, 0x0016, 0x080c, 0x6699, 0x1118,
 	0xb800, 0xd0ec, 0x1138, 0x001e, 0x8108, 0x1f04, 0x0b44, 0x00ce,
 	0x015e, 0x0028, 0x001e, 0x00ce, 0x015e, 0x0804, 0x0bab, 0x0006,
 	0x2001, 0x0103, 0x2003, 0x002b, 0x000e, 0x2011, 0x19b2, 0x080c,
 	0x0f87, 0x2011, 0x19cc, 0x080c, 0x0f87, 0x7030, 0xc08c, 0x7032,
-	0x7003, 0x0003, 0x70af, 0xffff, 0x080c, 0x56f1, 0x1130, 0x0026,
-	0x2011, 0x0040, 0x080c, 0x0edf, 0x002e, 0x9006, 0x080c, 0x27f7,
-	0x080c, 0x332b, 0x0118, 0x080c, 0x4cbb, 0x0050, 0x0036, 0x0046,
-	0x2019, 0xffff, 0x2021, 0x0006, 0x080c, 0x4cd5, 0x004e, 0x003e,
-	0x00f6, 0x2079, 0x0100, 0x080c, 0x73d6, 0x0150, 0x080c, 0x73b3,
+	0x7003, 0x0003, 0x70af, 0xffff, 0x080c, 0x576c, 0x1130, 0x0026,
+	0x2011, 0x0040, 0x080c, 0x0edf, 0x002e, 0x9006, 0x080c, 0x2828,
+	0x080c, 0x337d, 0x0118, 0x080c, 0x4d1c, 0x0050, 0x0036, 0x0046,
+	0x2019, 0xffff, 0x2021, 0x0006, 0x080c, 0x4d36, 0x004e, 0x003e,
+	0x00f6, 0x2079, 0x0100, 0x080c, 0x7461, 0x0150, 0x080c, 0x743e,
 	0x7828, 0x0118, 0x9084, 0xe1ff, 0x0010, 0x9084, 0xffdf, 0x782a,
 	0x00fe, 0x2001, 0x19e7, 0x2004, 0x9086, 0x0005, 0x1120, 0x2011,
-	0x0000, 0x080c, 0xa63e, 0x2011, 0x0000, 0x080c, 0xa648, 0x080c,
-	0x96a6, 0x080c, 0x97d4, 0x012e, 0x00be, 0x0005, 0x0016, 0x0046,
+	0x0000, 0x080c, 0xa722, 0x2011, 0x0000, 0x080c, 0xa72c, 0x080c,
+	0x9763, 0x080c, 0x9891, 0x012e, 0x00be, 0x0005, 0x0016, 0x0046,
 	0x00f6, 0x0126, 0x2091, 0x8000, 0x2079, 0x0100, 0x7904, 0x918c,
-	0xfffd, 0x7906, 0x2009, 0x00f7, 0x080c, 0x5fa9, 0x7940, 0x918c,
+	0xfffd, 0x7906, 0x2009, 0x00f7, 0x080c, 0x6029, 0x7940, 0x918c,
 	0x0010, 0x7942, 0x7924, 0xd1b4, 0x0110, 0x7827, 0x0040, 0xd19c,
 	0x0110, 0x7827, 0x0008, 0x0006, 0x0036, 0x0156, 0x7954, 0xd1ac,
 	0x1904, 0x0c3b, 0x2001, 0x19a6, 0x2004, 0x9005, 0x1518, 0x080c,
-	0x2c2d, 0x1148, 0x2001, 0x0001, 0x080c, 0x2b95, 0x2001, 0x0001,
-	0x080c, 0x2b78, 0x00b8, 0x080c, 0x2c35, 0x1138, 0x9006, 0x080c,
-	0x2b95, 0x9006, 0x080c, 0x2b78, 0x0068, 0x080c, 0x2c3d, 0x1d50,
-	0x2001, 0x1997, 0x2004, 0xd0fc, 0x0108, 0x0020, 0x080c, 0x298f,
-	0x0804, 0x0d1a, 0x080c, 0x73c4, 0x0148, 0x080c, 0x73d6, 0x1118,
-	0x080c, 0x76a8, 0x0050, 0x080c, 0x73bb, 0x0dd0, 0x080c, 0x76a3,
-	0x080c, 0x7699, 0x080c, 0x72e5, 0x0058, 0x080c, 0x73b3, 0x0140,
-	0x2009, 0x00f8, 0x080c, 0x5fa9, 0x7843, 0x0090, 0x7843, 0x0010,
-	0x20a9, 0x09c4, 0x7820, 0xd09c, 0x1138, 0x080c, 0x73b3, 0x0138,
+	0x2c5e, 0x1148, 0x2001, 0x0001, 0x080c, 0x2bc6, 0x2001, 0x0001,
+	0x080c, 0x2ba9, 0x00b8, 0x080c, 0x2c66, 0x1138, 0x9006, 0x080c,
+	0x2bc6, 0x9006, 0x080c, 0x2ba9, 0x0068, 0x080c, 0x2c6e, 0x1d50,
+	0x2001, 0x1997, 0x2004, 0xd0fc, 0x0108, 0x0020, 0x080c, 0x29c0,
+	0x0804, 0x0d1a, 0x080c, 0x744f, 0x0148, 0x080c, 0x7461, 0x1118,
+	0x080c, 0x7733, 0x0050, 0x080c, 0x7446, 0x0dd0, 0x080c, 0x772e,
+	0x080c, 0x7724, 0x080c, 0x736a, 0x0058, 0x080c, 0x743e, 0x0140,
+	0x2009, 0x00f8, 0x080c, 0x6029, 0x7843, 0x0090, 0x7843, 0x0010,
+	0x20a9, 0x09c4, 0x7820, 0xd09c, 0x1138, 0x080c, 0x743e, 0x0138,
 	0x7824, 0xd0ac, 0x1904, 0x0d1f, 0x1f04, 0x0c1a, 0x0070, 0x7824,
-	0x080c, 0x73cd, 0x0118, 0xd0ac, 0x1904, 0x0d1f, 0x9084, 0x1800,
+	0x080c, 0x7458, 0x0118, 0xd0ac, 0x1904, 0x0d1f, 0x9084, 0x1800,
 	0x0d98, 0x7003, 0x0001, 0x0804, 0x0d1f, 0x2001, 0x0001, 0x080c,
-	0x27f7, 0x0804, 0x0d32, 0x2001, 0x19a6, 0x2004, 0x9005, 0x1518,
-	0x080c, 0x2c2d, 0x1148, 0x2001, 0x0001, 0x080c, 0x2b95, 0x2001,
-	0x0001, 0x080c, 0x2b78, 0x00b8, 0x080c, 0x2c35, 0x1138, 0x9006,
-	0x080c, 0x2b95, 0x9006, 0x080c, 0x2b78, 0x0068, 0x080c, 0x2c3d,
+	0x2828, 0x0804, 0x0d32, 0x2001, 0x19a6, 0x2004, 0x9005, 0x1518,
+	0x080c, 0x2c5e, 0x1148, 0x2001, 0x0001, 0x080c, 0x2bc6, 0x2001,
+	0x0001, 0x080c, 0x2ba9, 0x00b8, 0x080c, 0x2c66, 0x1138, 0x9006,
+	0x080c, 0x2bc6, 0x9006, 0x080c, 0x2ba9, 0x0068, 0x080c, 0x2c6e,
 	0x1d50, 0x2001, 0x1997, 0x2004, 0xd0fc, 0x0108, 0x0020, 0x080c,
-	0x298f, 0x0804, 0x0d1a, 0x7850, 0x9085, 0x0040, 0x7852, 0x7938,
-	0x7850, 0x9084, 0xfbcf, 0x7852, 0x080c, 0x2c45, 0x9085, 0x2000,
-	0x7852, 0x793a, 0x20a9, 0x0046, 0x1d04, 0x0c74, 0x080c, 0x85b3,
+	0x29c0, 0x0804, 0x0d1a, 0x7850, 0x9085, 0x0040, 0x7852, 0x7938,
+	0x7850, 0x9084, 0xfbcf, 0x7852, 0x080c, 0x2c76, 0x9085, 0x2000,
+	0x7852, 0x793a, 0x20a9, 0x0046, 0x1d04, 0x0c74, 0x080c, 0x866a,
 	0x1f04, 0x0c74, 0x7850, 0x9085, 0x0400, 0x9084, 0xdfbf, 0x7852,
-	0x793a, 0x080c, 0x73c4, 0x0148, 0x080c, 0x73d6, 0x1118, 0x080c,
-	0x76a8, 0x0050, 0x080c, 0x73bb, 0x0dd0, 0x080c, 0x76a3, 0x080c,
-	0x7699, 0x080c, 0x72e5, 0x0020, 0x2009, 0x00f8, 0x080c, 0x5fa9,
+	0x793a, 0x080c, 0x744f, 0x0148, 0x080c, 0x7461, 0x1118, 0x080c,
+	0x7733, 0x0050, 0x080c, 0x7446, 0x0dd0, 0x080c, 0x772e, 0x080c,
+	0x7724, 0x080c, 0x736a, 0x0020, 0x2009, 0x00f8, 0x080c, 0x6029,
 	0x20a9, 0x0028, 0xa001, 0x1f04, 0x0c9a, 0x7850, 0x9085, 0x1400,
-	0x7852, 0x080c, 0x73b3, 0x0120, 0x7843, 0x0090, 0x7843, 0x0010,
-	0x2021, 0xe678, 0x2019, 0xea60, 0x0d0c, 0x85b3, 0x7820, 0xd09c,
-	0x1580, 0x080c, 0x73b3, 0x0904, 0x0cff, 0x7824, 0xd0ac, 0x1904,
-	0x0d1f, 0x080c, 0x73d6, 0x1528, 0x0046, 0x2021, 0x0320, 0x8421,
-	0x1df0, 0x004e, 0x7827, 0x1800, 0x080c, 0x2c45, 0x7824, 0x9084,
+	0x7852, 0x080c, 0x743e, 0x0120, 0x7843, 0x0090, 0x7843, 0x0010,
+	0x2021, 0xe678, 0x2019, 0xea60, 0x0d0c, 0x866a, 0x7820, 0xd09c,
+	0x1580, 0x080c, 0x743e, 0x0904, 0x0cff, 0x7824, 0xd0ac, 0x1904,
+	0x0d1f, 0x080c, 0x7461, 0x1528, 0x0046, 0x2021, 0x0320, 0x8421,
+	0x1df0, 0x004e, 0x7827, 0x1800, 0x080c, 0x2c76, 0x7824, 0x9084,
 	0x1800, 0x1160, 0x9484, 0x0fff, 0x1138, 0x2001, 0x1810, 0x2004,
 	0xd0fc, 0x0110, 0x080c, 0x0d45, 0x8421, 0x1158, 0x1d04, 0x0cda,
-	0x080c, 0x85b3, 0x080c, 0x76a3, 0x080c, 0x7699, 0x7003, 0x0001,
-	0x04f0, 0x8319, 0x1948, 0x1d04, 0x0ce7, 0x080c, 0x85b3, 0x2009,
+	0x080c, 0x866a, 0x080c, 0x772e, 0x080c, 0x7724, 0x7003, 0x0001,
+	0x04f0, 0x8319, 0x1948, 0x1d04, 0x0ce7, 0x080c, 0x866a, 0x2009,
 	0x199a, 0x2104, 0x9005, 0x0118, 0x8001, 0x200a, 0x1178, 0x200b,
-	0x000a, 0x7827, 0x0048, 0x20a9, 0x0002, 0x080c, 0x2c26, 0x7924,
-	0x080c, 0x2c45, 0xd19c, 0x0110, 0x080c, 0x2b66, 0x00d8, 0x080c,
-	0x73c4, 0x1140, 0x94a2, 0x03e8, 0x1128, 0x080c, 0x738b, 0x7003,
-	0x0001, 0x00a8, 0x7827, 0x1800, 0x080c, 0x2c45, 0x7824, 0x080c,
-	0x73cd, 0x0110, 0xd0ac, 0x1158, 0x9084, 0x1800, 0x0950, 0x7003,
-	0x0001, 0x0028, 0x2001, 0x0001, 0x080c, 0x27f7, 0x0078, 0x2009,
+	0x000a, 0x7827, 0x0048, 0x20a9, 0x0002, 0x080c, 0x2c57, 0x7924,
+	0x080c, 0x2c76, 0xd19c, 0x0110, 0x080c, 0x2b97, 0x00d8, 0x080c,
+	0x744f, 0x1140, 0x94a2, 0x03e8, 0x1128, 0x080c, 0x7416, 0x7003,
+	0x0001, 0x00a8, 0x7827, 0x1800, 0x080c, 0x2c76, 0x7824, 0x080c,
+	0x7458, 0x0110, 0xd0ac, 0x1158, 0x9084, 0x1800, 0x0950, 0x7003,
+	0x0001, 0x0028, 0x2001, 0x0001, 0x080c, 0x2828, 0x0078, 0x2009,
 	0x180c, 0x210c, 0xd19c, 0x1120, 0x7904, 0x918d, 0x0002, 0x7906,
 	0x7827, 0x0048, 0x7828, 0x9085, 0x0028, 0x782a, 0x7850, 0x9085,
 	0x0400, 0x7852, 0x2001, 0x19a6, 0x2003, 0x0000, 0x9006, 0x78f2,
-	0x015e, 0x003e, 0x000e, 0x080c, 0x56f1, 0x1110, 0x080c, 0x0e62,
+	0x015e, 0x003e, 0x000e, 0x080c, 0x576c, 0x1110, 0x080c, 0x0e62,
 	0x012e, 0x00fe, 0x004e, 0x001e, 0x0005, 0x0006, 0x0016, 0x0036,
 	0x0046, 0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x0156, 0x0069,
-	0x0d0c, 0x85b3, 0x015e, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be,
+	0x0d0c, 0x866a, 0x015e, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be,
 	0x004e, 0x003e, 0x001e, 0x000e, 0x0005, 0x00e6, 0x2071, 0x189e,
-	0x7004, 0x9086, 0x0001, 0x1110, 0x080c, 0x3459, 0x00ee, 0x0005,
+	0x7004, 0x9086, 0x0001, 0x1110, 0x080c, 0x34ab, 0x00ee, 0x0005,
 	0x0005, 0x2a70, 0x2061, 0x19aa, 0x2063, 0x0003, 0x6007, 0x0003,
-	0x600b, 0x0002, 0x600f, 0x0137, 0x2001, 0x197b, 0x900e, 0x2102,
+	0x600b, 0x0008, 0x600f, 0x0137, 0x2001, 0x197b, 0x900e, 0x2102,
 	0x7196, 0x2001, 0x0100, 0x2004, 0x9082, 0x0002, 0x0218, 0x705f,
 	0xffff, 0x0008, 0x715e, 0x7067, 0xffff, 0x717e, 0x7182, 0x080c,
-	0xcfab, 0x2061, 0x196b, 0x6003, 0x0909, 0x6106, 0x600b, 0x8800,
+	0xd0d9, 0x2061, 0x196b, 0x6003, 0x0909, 0x6106, 0x600b, 0x8800,
 	0x600f, 0x0200, 0x6013, 0x00ff, 0x6017, 0x001f, 0x611a, 0x601f,
 	0x07d0, 0x2061, 0x1973, 0x6003, 0x8000, 0x6106, 0x610a, 0x600f,
 	0x0200, 0x6013, 0x00ff, 0x6116, 0x601b, 0x0001, 0x611e, 0x2061,
 	0x1988, 0x6003, 0x514c, 0x6007, 0x4f47, 0x600b, 0x4943, 0x600f,
-	0x2020, 0x2001, 0x182c, 0x2102, 0x0005, 0x9016, 0x080c, 0x6616,
+	0x2020, 0x2001, 0x182c, 0x2102, 0x0005, 0x9016, 0x080c, 0x6699,
 	0x1178, 0xb804, 0x90c4, 0x00ff, 0x98c6, 0x0006, 0x0128, 0x90c4,
 	0xff00, 0x98c6, 0x0600, 0x1120, 0x9186, 0x0080, 0x0108, 0x8210,
 	0x8108, 0x9186, 0x0800, 0x1d50, 0x2208, 0x0005, 0x2091, 0x8000,
@@ -240,22 +240,22 @@
 	0x0dd7, 0x0006, 0x0016, 0x2001, 0x8002, 0x0006, 0x2079, 0x0000,
 	0x000e, 0x7882, 0x7836, 0x001e, 0x798e, 0x000e, 0x788a, 0x000e,
 	0x7886, 0x3900, 0x789a, 0x7833, 0x0012, 0x2091, 0x5000, 0x0156,
-	0x00d6, 0x0036, 0x0026, 0x2079, 0x0300, 0x2069, 0x1aa1, 0x7a08,
-	0x226a, 0x2069, 0x1aa2, 0x7a18, 0x226a, 0x8d68, 0x7a1c, 0x226a,
-	0x782c, 0x2019, 0x1aaf, 0x201a, 0x2019, 0x1ab2, 0x9016, 0x7808,
-	0xd09c, 0x0168, 0x7820, 0x201a, 0x8210, 0x8318, 0x9386, 0x1ac7,
+	0x00d6, 0x0036, 0x0026, 0x2079, 0x0300, 0x2069, 0x1aa4, 0x7a08,
+	0x226a, 0x2069, 0x1aa5, 0x7a18, 0x226a, 0x8d68, 0x7a1c, 0x226a,
+	0x782c, 0x2019, 0x1ab2, 0x201a, 0x2019, 0x1ab5, 0x9016, 0x7808,
+	0xd09c, 0x0168, 0x7820, 0x201a, 0x8210, 0x8318, 0x9386, 0x1aca,
 	0x0108, 0x0ca8, 0x7808, 0xd09c, 0x0110, 0x2011, 0xdead, 0x2019,
-	0x1ab0, 0x782c, 0x201a, 0x8318, 0x221a, 0x7803, 0x0000, 0x2069,
-	0x1a81, 0x901e, 0x20a9, 0x0020, 0x7b26, 0x7a28, 0x226a, 0x8d68,
+	0x1ab3, 0x782c, 0x201a, 0x8318, 0x221a, 0x7803, 0x0000, 0x2069,
+	0x1a84, 0x901e, 0x20a9, 0x0020, 0x7b26, 0x7a28, 0x226a, 0x8d68,
 	0x8318, 0x1f04, 0x0e24, 0x002e, 0x003e, 0x00de, 0x015e, 0x2079,
 	0x1800, 0x7803, 0x0005, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004,
 	0xd084, 0x0180, 0x2001, 0x1a18, 0x2004, 0x9005, 0x0128, 0x2001,
 	0x008b, 0x2004, 0xd0fc, 0x0dd8, 0x2001, 0x008a, 0x2003, 0x0002,
-	0x2003, 0x1001, 0x080c, 0x56f1, 0x1110, 0x080c, 0x0e99, 0x0cd0,
+	0x2003, 0x1001, 0x080c, 0x576c, 0x1110, 0x080c, 0x0e99, 0x0cd0,
 	0x0005, 0x918c, 0x03ff, 0x2001, 0x0003, 0x2004, 0x9084, 0x0600,
 	0x1118, 0x918d, 0x2800, 0x0010, 0x918d, 0x2000, 0x2001, 0x017f,
 	0x2102, 0x0005, 0x00f6, 0x0006, 0x2079, 0x1827, 0x2f04, 0x8000,
-	0x207a, 0x080c, 0x2c3d, 0x1150, 0x0006, 0x2001, 0x1997, 0x2004,
+	0x207a, 0x080c, 0x2c6e, 0x1150, 0x0006, 0x2001, 0x1997, 0x2004,
 	0xd0fc, 0x000e, 0x1118, 0x9082, 0x7530, 0x0010, 0x9082, 0x000f,
 	0x0258, 0x9006, 0x207a, 0x2079, 0x182a, 0x2f04, 0x9084, 0x0001,
 	0x9086, 0x0001, 0x207a, 0x0090, 0x2079, 0x182a, 0x2f7c, 0x8fff,
@@ -266,8 +266,8 @@
 	0x080c, 0x0f00, 0x0c80, 0x7038, 0xd0b4, 0x1128, 0x0026, 0x2011,
 	0x0040, 0x0469, 0x002e, 0x0005, 0x7038, 0xd0b4, 0x1128, 0x0026,
 	0x2011, 0x0080, 0x0421, 0x002e, 0x0005, 0x0026, 0x70ef, 0x0000,
-	0x0459, 0x1148, 0x080c, 0x2c3d, 0x1118, 0x2011, 0x8484, 0x0058,
-	0x2011, 0x8282, 0x0040, 0x080c, 0x2c3d, 0x1118, 0x2011, 0xcdc5,
+	0x0459, 0x1148, 0x080c, 0x2c6e, 0x1118, 0x2011, 0x8484, 0x0058,
+	0x2011, 0x8282, 0x0040, 0x080c, 0x2c6e, 0x1118, 0x2011, 0xcdc5,
 	0x0010, 0x2011, 0xcac2, 0x00e9, 0x002e, 0x0005, 0xd0b4, 0x0130,
 	0x0006, 0x3b00, 0x9084, 0xff3f, 0x20d8, 0x000e, 0x0005, 0x0016,
 	0x3b08, 0x3a00, 0x9104, 0x918d, 0x00c0, 0x21d8, 0x9084, 0xff3f,
@@ -315,7 +315,7 @@
 	0x0cd8, 0x00e6, 0x0126, 0x2091, 0x8000, 0x0016, 0x890e, 0x810e,
 	0x810f, 0x9184, 0x003f, 0xa862, 0x9184, 0xffc0, 0xa85e, 0x001e,
 	0x0020, 0x00e6, 0x0126, 0x2091, 0x8000, 0x2071, 0x1800, 0x702c,
-	0xa802, 0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2, 0x080c, 0x841a,
+	0xa802, 0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2, 0x080c, 0x84c2,
 	0x012e, 0x00ee, 0x0005, 0x2071, 0x1800, 0x9026, 0x2009, 0x0000,
 	0x2049, 0x0400, 0x2900, 0x702e, 0x8940, 0x2800, 0xa802, 0xa95e,
 	0xa863, 0x0001, 0x8420, 0x9886, 0x0440, 0x0120, 0x2848, 0x9188,
@@ -380,15 +380,15 @@
 	0x080c, 0x1108, 0x0005, 0x00de, 0x009e, 0x080c, 0x1108, 0x0005,
 	0xa8a8, 0xd08c, 0x0005, 0x0096, 0xa0a0, 0x904d, 0x090c, 0x0dd5,
 	0xa06c, 0x908e, 0x0100, 0x0130, 0xa87b, 0x0030, 0xa883, 0x0000,
-	0xa897, 0x4002, 0x080c, 0x6c88, 0xa09f, 0x0000, 0xa0a3, 0x0000,
+	0xa897, 0x4002, 0x080c, 0x6d0b, 0xa09f, 0x0000, 0xa0a3, 0x0000,
 	0x2848, 0x080c, 0x1031, 0x009e, 0x0005, 0x00a6, 0xa0a0, 0x904d,
 	0x090c, 0x0dd5, 0xa06c, 0x908e, 0x0100, 0x0128, 0xa87b, 0x0001,
 	0xa883, 0x0000, 0x00c0, 0xa80c, 0x2050, 0xb004, 0x9005, 0x0198,
 	0xa80e, 0x2050, 0x8006, 0x8006, 0x8007, 0x908c, 0x003f, 0x9084,
 	0xffc0, 0x9080, 0x0002, 0xa076, 0xa172, 0xb000, 0xa07a, 0x2810,
 	0x080c, 0x10e9, 0x00e8, 0xa97c, 0xa894, 0x0016, 0x0006, 0x080c,
-	0x6c88, 0x000e, 0x001e, 0xd1fc, 0x1138, 0xd1f4, 0x0128, 0x00c6,
-	0x2060, 0x080c, 0xae5f, 0x00ce, 0x7008, 0x2048, 0xa89f, 0x0000,
+	0x6d0b, 0x000e, 0x001e, 0xd1fc, 0x1138, 0xd1f4, 0x0128, 0x00c6,
+	0x2060, 0x080c, 0xaf43, 0x00ce, 0x7008, 0x2048, 0xa89f, 0x0000,
 	0xa8a3, 0x0000, 0x080c, 0x1031, 0x7007, 0x0000, 0x080c, 0x1108,
 	0x00ae, 0x0005, 0x0126, 0x2091, 0x8000, 0x782b, 0x1001, 0x7007,
 	0x0005, 0x7000, 0xc094, 0x7002, 0x012e, 0x0005, 0x0096, 0x2001,
@@ -397,47 +397,47 @@
 	0x8000, 0x782b, 0x0041, 0x7007, 0x0003, 0x7000, 0xc084, 0x7002,
 	0x2900, 0x700a, 0x012e, 0x009e, 0x0005, 0x20e1, 0x0000, 0x2099,
 	0x0088, 0x782b, 0x0040, 0x0096, 0x2001, 0x192e, 0x204c, 0xaa7c,
-	0x009e, 0x080c, 0x8a12, 0x2009, 0x188c, 0x2104, 0x9084, 0xfffc,
-	0x200a, 0x080c, 0x8885, 0x7007, 0x0000, 0x080c, 0x1119, 0x0005,
+	0x009e, 0x080c, 0x8ad0, 0x2009, 0x188c, 0x2104, 0x9084, 0xfffc,
+	0x200a, 0x080c, 0x8939, 0x7007, 0x0000, 0x080c, 0x1119, 0x0005,
 	0x7007, 0x0000, 0x080c, 0x1119, 0x0005, 0x0126, 0x2091, 0x2200,
 	0x2079, 0x0300, 0x2071, 0x1a61, 0x7003, 0x0000, 0x78bf, 0x00f6,
 	0x781b, 0x4800, 0x00c1, 0x7803, 0x0003, 0x780f, 0x0000, 0x20a9,
-	0x03d0, 0x2061, 0xea53, 0x2c0d, 0x7912, 0xe104, 0x9ce0, 0x0002,
+	0x03d0, 0x2061, 0xeba8, 0x2c0d, 0x7912, 0xe104, 0x9ce0, 0x0002,
 	0x7916, 0x1f04, 0x1303, 0x7807, 0x0007, 0x7803, 0x0000, 0x7803,
 	0x0001, 0x012e, 0x0005, 0x00c6, 0x7803, 0x0000, 0x7808, 0xd09c,
 	0x0120, 0x7820, 0x080c, 0x1362, 0x0cc8, 0x2001, 0x1a62, 0x2003,
 	0x0000, 0x78ab, 0x0004, 0x78ac, 0xd0ac, 0x1de8, 0x78ab, 0x0002,
 	0x7807, 0x0007, 0x7827, 0x0030, 0x782b, 0x0400, 0x7827, 0x0031,
-	0x782b, 0x1a81, 0x781f, 0xff00, 0x781b, 0xb700, 0x2001, 0x0200,
-	0x2004, 0xd0dc, 0x0110, 0x781f, 0x0303, 0x2061, 0x1a81, 0x602f,
+	0x782b, 0x1a84, 0x781f, 0xff00, 0x781b, 0xb700, 0x2001, 0x0200,
+	0x2004, 0xd0dc, 0x0110, 0x781f, 0x0303, 0x2061, 0x1a84, 0x602f,
 	0x1cd0, 0x2001, 0x181a, 0x2004, 0x9082, 0x1cd0, 0x6032, 0x603b,
-	0x209d, 0x2001, 0x3332, 0xd0fc, 0x190c, 0x0dd5, 0x2001, 0x0003,
-	0x2004, 0xd0d4, 0x1118, 0x783f, 0x3332, 0x0020, 0x9084, 0xc000,
-	0x783f, 0xb332, 0x604f, 0x193c, 0x2001, 0x1927, 0x2004, 0x6042,
+	0x20ce, 0x2001, 0x3384, 0xd0fc, 0x190c, 0x0dd5, 0x2001, 0x0003,
+	0x2004, 0xd0d4, 0x1118, 0x783f, 0x3384, 0x0020, 0x9084, 0xc000,
+	0x783f, 0xb384, 0x604f, 0x193c, 0x2001, 0x1927, 0x2004, 0x6042,
 	0x00ce, 0x0005, 0x9086, 0x000d, 0x11d0, 0x7808, 0xd09c, 0x01b8,
-	0x7820, 0x0026, 0x2010, 0x080c, 0xcb48, 0x0180, 0x2260, 0x6000,
+	0x7820, 0x0026, 0x2010, 0x080c, 0xcc74, 0x0180, 0x2260, 0x6000,
 	0x9086, 0x0004, 0x1158, 0x0016, 0x6120, 0x9186, 0x0009, 0x0108,
-	0x0020, 0x2009, 0x004c, 0x080c, 0xaeda, 0x001e, 0x002e, 0x0005,
+	0x0020, 0x2009, 0x004c, 0x080c, 0xafbe, 0x001e, 0x002e, 0x0005,
 	0x0126, 0x2091, 0x2200, 0x7908, 0x9184, 0x0070, 0x190c, 0x0dce,
 	0xd19c, 0x0158, 0x7820, 0x908c, 0xf000, 0x15e8, 0x908a, 0x0024,
 	0x1a0c, 0x0dd5, 0x0023, 0x012e, 0x0005, 0x012e, 0x0005, 0x13bb,
 	0x13bb, 0x13d2, 0x13d7, 0x13db, 0x13e0, 0x1408, 0x140c, 0x141a,
-	0x141e, 0x13bb, 0x14eb, 0x14ef, 0x1554, 0x155b, 0x13bb, 0x155c,
-	0x155d, 0x1568, 0x156f, 0x13bb, 0x13bb, 0x13bb, 0x13bb, 0x13bb,
+	0x141e, 0x13bb, 0x14eb, 0x14ef, 0x1561, 0x1568, 0x13bb, 0x1569,
+	0x156a, 0x1575, 0x157c, 0x13bb, 0x13bb, 0x13bb, 0x13bb, 0x13bb,
 	0x13bb, 0x13bb, 0x13e2, 0x13bb, 0x13bb, 0x13bb, 0x13bb, 0x13bb,
 	0x13bb, 0x13bf, 0x13bd, 0x080c, 0x0dd5, 0x080c, 0x0dce, 0x080c,
-	0x157a, 0x2009, 0x1a7a, 0x2104, 0x8000, 0x200a, 0x080c, 0x7e4c,
-	0x080c, 0x1abb, 0x0005, 0x2009, 0x0048, 0x2060, 0x080c, 0xaeda,
+	0x1587, 0x2009, 0x1a7a, 0x2104, 0x8000, 0x200a, 0x080c, 0x7ed7,
+	0x080c, 0x1aec, 0x0005, 0x2009, 0x0048, 0x2060, 0x080c, 0xafbe,
 	0x012e, 0x0005, 0x7004, 0xc085, 0xc0b5, 0x7006, 0x0005, 0x7004,
-	0xc085, 0x7006, 0x0005, 0x080c, 0x157a, 0x080c, 0x16bd, 0x0005,
-	0x080c, 0x0dd5, 0x080c, 0x157a, 0x2060, 0x6014, 0x0096, 0x2048,
-	0xa83b, 0xffff, 0x009e, 0x2009, 0x0048, 0x080c, 0xaeda, 0x2001,
+	0xc085, 0x7006, 0x0005, 0x080c, 0x1587, 0x080c, 0x16e7, 0x0005,
+	0x080c, 0x0dd5, 0x080c, 0x1587, 0x2060, 0x6014, 0x0096, 0x2048,
+	0xa83b, 0xffff, 0x009e, 0x2009, 0x0048, 0x080c, 0xafbe, 0x2001,
 	0x015d, 0x2003, 0x0000, 0x2009, 0x03e8, 0x8109, 0x0160, 0x2001,
 	0x0201, 0x2004, 0x9005, 0x0dc8, 0x2001, 0x0218, 0x2004, 0xd0ec,
-	0x1110, 0x080c, 0x157f, 0x2001, 0x0307, 0x2003, 0x8000, 0x0005,
-	0x7004, 0xc095, 0x7006, 0x0005, 0x080c, 0x157a, 0x2060, 0x6014,
+	0x1110, 0x080c, 0x158c, 0x2001, 0x0307, 0x2003, 0x8000, 0x0005,
+	0x7004, 0xc095, 0x7006, 0x0005, 0x080c, 0x1587, 0x2060, 0x6014,
 	0x0096, 0x2048, 0xa83b, 0xffff, 0x009e, 0x2009, 0x0048, 0x080c,
-	0xaeda, 0x0005, 0x080c, 0x157a, 0x080c, 0x0dd5, 0x080c, 0x157a,
+	0xafbe, 0x0005, 0x080c, 0x1587, 0x080c, 0x0dd5, 0x080c, 0x1587,
 	0x080c, 0x14d6, 0x7827, 0x0018, 0x79ac, 0xd1dc, 0x0904, 0x1487,
 	0x7827, 0x0015, 0x7828, 0x782b, 0x0000, 0x9065, 0x0140, 0x2001,
 	0x020d, 0x2003, 0x0050, 0x2003, 0x0020, 0x0804, 0x148d, 0x7004,
@@ -446,2151 +446,2167 @@
 	0x2003, 0x0020, 0x0804, 0x14bb, 0x78ab, 0x0004, 0x7803, 0x0001,
 	0x080c, 0x14ef, 0x0005, 0x7827, 0x0018, 0xa001, 0x7828, 0x7827,
 	0x0011, 0xa001, 0x7928, 0x9106, 0x0110, 0x79ac, 0x08e0, 0x00e6,
-	0x2071, 0x0200, 0x702c, 0xd0c4, 0x0140, 0x00ee, 0x080c, 0x1abb,
+	0x2071, 0x0200, 0x702c, 0xd0c4, 0x0140, 0x00ee, 0x080c, 0x1aec,
 	0x080c, 0x1313, 0x7803, 0x0001, 0x0005, 0x7037, 0x0001, 0xa001,
 	0x7150, 0x00ee, 0x918c, 0xff00, 0x9186, 0x0500, 0x0110, 0x79ac,
 	0x0810, 0x7004, 0xc09d, 0x7006, 0x78ab, 0x0004, 0x7803, 0x0001,
 	0x080c, 0x14ef, 0x2001, 0x020d, 0x2003, 0x0020, 0x0005, 0x7828,
 	0x782b, 0x0000, 0x9065, 0x090c, 0x0dd5, 0x6014, 0x2048, 0x78ab,
-	0x0004, 0x918c, 0x0700, 0x01a8, 0x080c, 0x7e4c, 0x080c, 0x1abb,
-	0x080c, 0xcb5a, 0x0158, 0xa9ac, 0xa936, 0xa9b0, 0xa93a, 0xa83f,
-	0xffff, 0xa843, 0xffff, 0xa880, 0xc0bd, 0xa882, 0x080c, 0xc77b,
+	0x0004, 0x918c, 0x0700, 0x01a8, 0x080c, 0x7ed7, 0x080c, 0x1aec,
+	0x080c, 0xcc86, 0x0158, 0xa9ac, 0xa936, 0xa9b0, 0xa93a, 0xa83f,
+	0xffff, 0xa843, 0xffff, 0xa880, 0xc0bd, 0xa882, 0x080c, 0xc8a5,
 	0x0005, 0x6020, 0x9086, 0x0009, 0x1128, 0x2009, 0x004c, 0x080c,
-	0xaeda, 0x0048, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc,
-	0x6024, 0x190c, 0xcf44, 0x2029, 0x00c8, 0x8529, 0x0128, 0x2001,
-	0x0201, 0x2004, 0x9005, 0x0dc8, 0x7dbc, 0x080c, 0xe9fc, 0xd5a4,
-	0x1118, 0x080c, 0x157f, 0x0005, 0x080c, 0x7e4c, 0x080c, 0x1abb,
+	0xafbe, 0x0048, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc,
+	0x6024, 0x190c, 0xd072, 0x2029, 0x00c8, 0x8529, 0x0128, 0x2001,
+	0x0201, 0x2004, 0x9005, 0x0dc8, 0x7dbc, 0x080c, 0xeb51, 0xd5a4,
+	0x1118, 0x080c, 0x158c, 0x0005, 0x080c, 0x7ed7, 0x080c, 0x1aec,
 	0x0005, 0x781f, 0x0300, 0x7803, 0x0001, 0x0005, 0x0016, 0x0066,
 	0x0076, 0x00f6, 0x2079, 0x0300, 0x7908, 0x918c, 0x0007, 0x9186,
-	0x0003, 0x0120, 0x2001, 0x0016, 0x080c, 0x15f0, 0x00fe, 0x007e,
+	0x0003, 0x0120, 0x2001, 0x0016, 0x080c, 0x15fd, 0x00fe, 0x007e,
 	0x006e, 0x001e, 0x0005, 0x7004, 0xc09d, 0x7006, 0x0005, 0x7104,
-	0x9184, 0x0004, 0x190c, 0x0dd5, 0xd184, 0x1189, 0xd19c, 0x0158,
-	0xc19c, 0x7106, 0x2001, 0x020d, 0x2003, 0x0050, 0x2003, 0x0020,
-	0x080c, 0x157f, 0x0005, 0x81ff, 0x190c, 0x0dd5, 0x0005, 0xc184,
-	0xd1b4, 0xc1b4, 0x7106, 0x0016, 0x00e6, 0x15f0, 0x2071, 0x0200,
-	0x080c, 0x16aa, 0x05c8, 0x6014, 0x9005, 0x05b0, 0x0096, 0x2048,
-	0xa864, 0x009e, 0x9084, 0x00ff, 0x908e, 0x0029, 0x0160, 0x908e,
-	0x0048, 0x1550, 0x601c, 0xd084, 0x11e0, 0x00f6, 0x2c78, 0x080c,
-	0x1727, 0x00fe, 0x00b0, 0x00f6, 0x2c78, 0x080c, 0x18ae, 0x00fe,
-	0x2009, 0x01f4, 0x8109, 0x0168, 0x2001, 0x0201, 0x2004, 0x9005,
-	0x0dc8, 0x2001, 0x0218, 0x2004, 0xd0ec, 0x1118, 0x080c, 0x157f,
-	0x0040, 0x2001, 0x020d, 0x2003, 0x0020, 0x080c, 0x1313, 0x7803,
-	0x0001, 0x00ee, 0x001e, 0x0005, 0x2001, 0x020d, 0x2003, 0x0050,
-	0x2003, 0x0020, 0x0461, 0x0ca8, 0x0429, 0x2060, 0x2009, 0x0053,
-	0x080c, 0xaeda, 0x0005, 0x0005, 0x0005, 0x00e1, 0x2008, 0x00d1,
-	0x0006, 0x7004, 0xc09d, 0x7006, 0x000e, 0x080c, 0x8d71, 0x0005,
-	0x0089, 0x9005, 0x0118, 0x080c, 0x8972, 0x0cd0, 0x0005, 0x2001,
-	0x0036, 0x2009, 0x1820, 0x210c, 0x2011, 0x181f, 0x2214, 0x080c,
-	0x15f0, 0x0005, 0x7808, 0xd09c, 0x0de8, 0x7820, 0x0005, 0x080c,
-	0x14d6, 0x00d6, 0x2069, 0x0200, 0x2009, 0x01f4, 0x8109, 0x0510,
-	0x6804, 0x9005, 0x0dd8, 0x2001, 0x015d, 0x2003, 0x0000, 0x79bc,
-	0xd1a4, 0x1528, 0x79b8, 0x918c, 0x0fff, 0x0180, 0x9182, 0x0841,
-	0x1268, 0x9188, 0x0007, 0x918c, 0x0ff8, 0x810c, 0x810c, 0x810c,
-	0x080c, 0x15e2, 0x6827, 0x0001, 0x8109, 0x1dd0, 0x04d9, 0x6827,
-	0x0002, 0x04c1, 0x6804, 0x9005, 0x1130, 0x682c, 0xd0e4, 0x1500,
-	0x6804, 0x9005, 0x0de8, 0x79b8, 0xd1ec, 0x1130, 0x08c0, 0x080c,
-	0x7e4c, 0x080c, 0x1abb, 0x0090, 0x7827, 0x0015, 0x782b, 0x0000,
-	0x7827, 0x0018, 0x782b, 0x0000, 0x2001, 0x020d, 0x2003, 0x0020,
-	0x2001, 0x0307, 0x2003, 0x0300, 0x7803, 0x0001, 0x00de, 0x0005,
-	0x682c, 0x9084, 0x5400, 0x9086, 0x5400, 0x0d30, 0x7827, 0x0015,
-	0x782b, 0x0000, 0x7803, 0x0001, 0x6800, 0x9085, 0x1800, 0x6802,
-	0x00de, 0x0005, 0x6824, 0x9084, 0x0003, 0x1de0, 0x0005, 0x2001,
-	0x0030, 0x2c08, 0x621c, 0x0021, 0x7830, 0x9086, 0x0041, 0x0005,
-	0x00f6, 0x2079, 0x0300, 0x0006, 0x7808, 0xd09c, 0x0140, 0x0016,
-	0x0026, 0x00c6, 0x080c, 0x1380, 0x00ce, 0x002e, 0x001e, 0x000e,
-	0x0006, 0x7832, 0x7936, 0x7a3a, 0x781b, 0x8080, 0x0059, 0x1118,
-	0x000e, 0x00fe, 0x0005, 0x000e, 0x792c, 0x3900, 0x8000, 0x2004,
-	0x080c, 0x0dd5, 0x2009, 0x180c, 0x2104, 0xc0f4, 0x200a, 0x2009,
-	0xff00, 0x8109, 0x0904, 0x166e, 0x7a18, 0x9284, 0x0030, 0x0904,
-	0x1669, 0x9284, 0x0048, 0x9086, 0x0008, 0x1904, 0x1669, 0x2001,
-	0x0109, 0x2004, 0xd08c, 0x01f0, 0x0006, 0x01c6, 0x01d6, 0x0136,
-	0x0146, 0x0156, 0x0126, 0x2091, 0x2800, 0x00f6, 0x0026, 0x0016,
-	0x2009, 0x1a7c, 0x2104, 0x8000, 0x0208, 0x200a, 0x080c, 0x90aa,
-	0x001e, 0x002e, 0x00fe, 0x012e, 0x015e, 0x014e, 0x013e, 0x01de,
-	0x01ce, 0x000e, 0x2001, 0x009b, 0x2004, 0xd0fc, 0x01d0, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x00f6, 0x0016,
-	0x2009, 0x1a7d, 0x2104, 0x8000, 0x0208, 0x200a, 0x080c, 0x1ec1,
-	0x001e, 0x00fe, 0x015e, 0x014e, 0x013e, 0x01de, 0x01ce, 0x012e,
-	0x000e, 0x7818, 0xd0bc, 0x1904, 0x1619, 0x0005, 0x2001, 0x180c,
-	0x2004, 0xd0f4, 0x1528, 0x7a18, 0x9284, 0x0030, 0x0508, 0x9284,
-	0x0048, 0x9086, 0x0008, 0x11e0, 0x2001, 0x19f5, 0x2004, 0x9005,
-	0x01b8, 0x2001, 0x1a65, 0x2004, 0x9086, 0x0000, 0x0188, 0x2009,
-	0x1a7b, 0x2104, 0x8000, 0x0208, 0x200a, 0x080c, 0xa30d, 0x2009,
-	0x180c, 0x2104, 0xc0f5, 0x200a, 0x2009, 0xff00, 0x0804, 0x1619,
-	0x9085, 0x0001, 0x0005, 0x7832, 0x7936, 0x7a3a, 0x781b, 0x8080,
-	0x080c, 0x1612, 0x1108, 0x0005, 0x792c, 0x3900, 0x8000, 0x2004,
-	0x080c, 0x0dd5, 0x7037, 0x0001, 0x7150, 0x7037, 0x0002, 0x7050,
-	0x2060, 0xd1bc, 0x1110, 0x7054, 0x2060, 0x918c, 0xff00, 0x9186,
-	0x0500, 0x0110, 0x9085, 0x0001, 0x0005, 0x00e6, 0x0016, 0x2071,
-	0x0200, 0x0c41, 0x6124, 0xd1dc, 0x01f8, 0x701c, 0xd08c, 0x0904,
-	0x171c, 0x7017, 0x0000, 0x2001, 0x0264, 0x2004, 0xd0bc, 0x0904,
-	0x171c, 0x2001, 0x0268, 0x00c6, 0x2064, 0x6104, 0x6038, 0x00ce,
-	0x918e, 0x0039, 0x1904, 0x171c, 0x9c06, 0x15f0, 0x0126, 0x2091,
-	0x2600, 0x080c, 0x7d93, 0x012e, 0x7358, 0x745c, 0x6014, 0x905d,
-	0x0598, 0x2b48, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc,
-	0x190c, 0xcf1f, 0xab42, 0xac3e, 0x2001, 0x1869, 0x2004, 0xd0b4,
-	0x1170, 0x601c, 0xd0e4, 0x1158, 0x6010, 0x00b6, 0x2058, 0xb800,
-	0x00be, 0xd0bc, 0x1120, 0xa83b, 0x7fff, 0xa837, 0xffff, 0x080c,
-	0x20bd, 0x1190, 0x080c, 0x1909, 0x2a00, 0xa816, 0x0130, 0x2800,
-	0xa80e, 0x2c05, 0xa80a, 0x2c00, 0xa812, 0x7037, 0x0020, 0x781f,
-	0x0300, 0x001e, 0x00ee, 0x0005, 0x7037, 0x0050, 0x7037, 0x0020,
-	0x001e, 0x00ee, 0x080c, 0x157f, 0x0005, 0x080c, 0x0dd5, 0x2ff0,
-	0x0126, 0x2091, 0x2200, 0x00c6, 0x3e60, 0x6014, 0x2048, 0x2940,
-	0x903e, 0x2730, 0xa864, 0x2068, 0xa81a, 0x9d84, 0x000f, 0x9088,
-	0x209d, 0x2165, 0x0002, 0x1752, 0x17c0, 0x1752, 0x1752, 0x1756,
-	0x17a1, 0x1752, 0x1776, 0x174b, 0x17b7, 0x1752, 0x1752, 0x175b,
-	0x18ac, 0x178a, 0x1780, 0xa964, 0x918c, 0x00ff, 0x918e, 0x0048,
-	0x0904, 0x17b7, 0x9085, 0x0001, 0x0804, 0x18a3, 0xa87c, 0xd0ac,
-	0x0dc8, 0x0804, 0x17c7, 0xa87c, 0xd0ac, 0x0da0, 0x0804, 0x1832,
-	0xa898, 0x901d, 0x1108, 0xab9c, 0x9016, 0xaab2, 0xaa3e, 0xaa42,
-	0x3e00, 0x9080, 0x0008, 0x2004, 0x9080, 0x8f38, 0x2005, 0x9005,
-	0x090c, 0x0dd5, 0x2004, 0xa8ae, 0x0804, 0x188b, 0xa87c, 0xd0bc,
-	0x09c8, 0xa890, 0xa842, 0xa88c, 0xa83e, 0xa888, 0x0804, 0x17c7,
-	0xa87c, 0xd0bc, 0x0978, 0xa890, 0xa842, 0xa88c, 0xa83e, 0xa888,
-	0x0804, 0x1832, 0xa87c, 0xd0bc, 0x0928, 0xa890, 0xa842, 0xa88c,
-	0xa83e, 0xa804, 0x9045, 0x090c, 0x0dd5, 0xa164, 0xa91a, 0x91ec,
-	0x000f, 0x9d80, 0x209d, 0x2065, 0xa888, 0xd19c, 0x1904, 0x1832,
-	0x0430, 0xa87c, 0xd0ac, 0x0904, 0x1752, 0xa804, 0x9045, 0x090c,
-	0x0dd5, 0xa164, 0xa91a, 0x91ec, 0x000f, 0x9d80, 0x209d, 0x2065,
-	0x9006, 0xa842, 0xa83e, 0xd19c, 0x1904, 0x1832, 0x0080, 0xa87c,
-	0xd0ac, 0x0904, 0x1752, 0x9006, 0xa842, 0xa83e, 0x0804, 0x1832,
-	0xa87c, 0xd0ac, 0x0904, 0x1752, 0x9006, 0xa842, 0xa83e, 0x2c05,
-	0x908a, 0x0036, 0x1a0c, 0x0dd5, 0x9082, 0x001b, 0x0002, 0x17ea,
-	0x17ea, 0x17ec, 0x17ea, 0x17ea, 0x17ea, 0x17f6, 0x17ea, 0x17ea,
-	0x17ea, 0x1800, 0x17ea, 0x17ea, 0x17ea, 0x180a, 0x17ea, 0x17ea,
-	0x17ea, 0x1814, 0x17ea, 0x17ea, 0x17ea, 0x181e, 0x17ea, 0x17ea,
-	0x17ea, 0x1828, 0x080c, 0x0dd5, 0xa574, 0xa478, 0x9d86, 0x0024,
-	0x0904, 0x1760, 0xa37c, 0xa280, 0x0804, 0x188b, 0xa584, 0xa488,
-	0x9d86, 0x0024, 0x0904, 0x1760, 0xa38c, 0xa290, 0x0804, 0x188b,
-	0xa594, 0xa498, 0x9d86, 0x0024, 0x0904, 0x1760, 0xa39c, 0xa2a0,
-	0x0804, 0x188b, 0xa5a4, 0xa4a8, 0x9d86, 0x0024, 0x0904, 0x1760,
-	0xa3ac, 0xa2b0, 0x0804, 0x188b, 0xa5b4, 0xa4b8, 0x9d86, 0x0024,
-	0x0904, 0x1760, 0xa3bc, 0xa2c0, 0x0804, 0x188b, 0xa5c4, 0xa4c8,
-	0x9d86, 0x0024, 0x0904, 0x1760, 0xa3cc, 0xa2d0, 0x0804, 0x188b,
-	0xa5d4, 0xa4d8, 0x9d86, 0x0024, 0x0904, 0x1760, 0xa3dc, 0xa2e0,
-	0x0804, 0x188b, 0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0dd5, 0x9082,
-	0x001b, 0x0002, 0x1855, 0x1853, 0x1853, 0x1853, 0x1853, 0x1853,
-	0x1860, 0x1853, 0x1853, 0x1853, 0x1853, 0x1853, 0x186b, 0x1853,
-	0x1853, 0x1853, 0x1853, 0x1853, 0x1876, 0x1853, 0x1853, 0x1853,
-	0x1853, 0x1853, 0x1881, 0x080c, 0x0dd5, 0xa56c, 0xa470, 0xa774,
-	0xa678, 0x9d86, 0x002c, 0x0904, 0x1760, 0xa37c, 0xa280, 0x0458,
-	0xa584, 0xa488, 0xa78c, 0xa690, 0x9d86, 0x002c, 0x0904, 0x1760,
-	0xa394, 0xa298, 0x0400, 0xa59c, 0xa4a0, 0xa7a4, 0xa6a8, 0x9d86,
-	0x002c, 0x0904, 0x1760, 0xa3ac, 0xa2b0, 0x00a8, 0xa5b4, 0xa4b8,
-	0xa7bc, 0xa6c0, 0x9d86, 0x002c, 0x0904, 0x1760, 0xa3c4, 0xa2c8,
-	0x0050, 0xa5cc, 0xa4d0, 0xa7d4, 0xa6d8, 0x9d86, 0x002c, 0x0904,
-	0x1760, 0xa3dc, 0xa2e0, 0xab2e, 0xaa32, 0xad1e, 0xac22, 0xaf26,
-	0xae2a, 0xa988, 0x8c60, 0x2c1d, 0xa8ac, 0xaab0, 0xa836, 0xaa3a,
-	0x8109, 0xa916, 0x1158, 0x3e60, 0x601c, 0xc085, 0x601e, 0xa87c,
-	0xc0dd, 0xa87e, 0x9006, 0x00ce, 0x012e, 0x0005, 0x2800, 0xa80e,
-	0xab0a, 0x2c00, 0xa812, 0x0c78, 0x0804, 0x1752, 0x2ff0, 0x0126,
-	0x2091, 0x2200, 0x00c6, 0x3e60, 0x6014, 0x2048, 0x2940, 0xa80e,
-	0x2061, 0x2098, 0xa813, 0x2098, 0x2c05, 0xa80a, 0xa964, 0xa91a,
+	0x9184, 0x0004, 0x190c, 0x0dd5, 0xd184, 0x11b1, 0xd19c, 0x0180,
+	0xc19c, 0x7106, 0x0016, 0x080c, 0x16ca, 0x001e, 0x0148, 0x2001,
+	0x020d, 0x2003, 0x0050, 0x2003, 0x0020, 0x080c, 0x158c, 0x0005,
+	0x81ff, 0x190c, 0x0dd5, 0x0005, 0x2100, 0xc184, 0xc1b4, 0x7106,
+	0xd0b4, 0x0016, 0x00e6, 0x1904, 0x1556, 0x2071, 0x0200, 0x080c,
+	0x16b7, 0x05e0, 0x080c, 0x16ca, 0x05b0, 0x6014, 0x9005, 0x05b0,
+	0x0096, 0x2048, 0xa864, 0x009e, 0x9084, 0x00ff, 0x908e, 0x0029,
+	0x0160, 0x908e, 0x0048, 0x1550, 0x601c, 0xd084, 0x11e0, 0x00f6,
+	0x2c78, 0x080c, 0x1754, 0x00fe, 0x00b0, 0x00f6, 0x2c78, 0x080c,
+	0x18dd, 0x00fe, 0x2009, 0x01f4, 0x8109, 0x0168, 0x2001, 0x0201,
+	0x2004, 0x9005, 0x0dc8, 0x2001, 0x0218, 0x2004, 0xd0ec, 0x1118,
+	0x080c, 0x158c, 0x0040, 0x2001, 0x020d, 0x2003, 0x0020, 0x080c,
+	0x1313, 0x7803, 0x0001, 0x00ee, 0x001e, 0x0005, 0x080c, 0x16ca,
+	0x0dd0, 0x2001, 0x020d, 0x2003, 0x0050, 0x2003, 0x0020, 0x0461,
+	0x0c90, 0x0429, 0x2060, 0x2009, 0x0053, 0x080c, 0xafbe, 0x0005,
+	0x0005, 0x0005, 0x00e1, 0x2008, 0x00d1, 0x0006, 0x7004, 0xc09d,
+	0x7006, 0x000e, 0x080c, 0x8e21, 0x0005, 0x0089, 0x9005, 0x0118,
+	0x080c, 0x8a28, 0x0cd0, 0x0005, 0x2001, 0x0036, 0x2009, 0x1820,
+	0x210c, 0x2011, 0x181f, 0x2214, 0x080c, 0x15fd, 0x0005, 0x7808,
+	0xd09c, 0x0de8, 0x7820, 0x0005, 0x080c, 0x14d6, 0x00d6, 0x2069,
+	0x0200, 0x2009, 0x01f4, 0x8109, 0x0510, 0x6804, 0x9005, 0x0dd8,
+	0x2001, 0x015d, 0x2003, 0x0000, 0x79bc, 0xd1a4, 0x1528, 0x79b8,
+	0x918c, 0x0fff, 0x0180, 0x9182, 0x0841, 0x1268, 0x9188, 0x0007,
+	0x918c, 0x0ff8, 0x810c, 0x810c, 0x810c, 0x080c, 0x15ef, 0x6827,
+	0x0001, 0x8109, 0x1dd0, 0x04d9, 0x6827, 0x0002, 0x04c1, 0x6804,
+	0x9005, 0x1130, 0x682c, 0xd0e4, 0x1500, 0x6804, 0x9005, 0x0de8,
+	0x79b8, 0xd1ec, 0x1130, 0x08c0, 0x080c, 0x7ed7, 0x080c, 0x1aec,
+	0x0090, 0x7827, 0x0015, 0x782b, 0x0000, 0x7827, 0x0018, 0x782b,
+	0x0000, 0x2001, 0x020d, 0x2003, 0x0020, 0x2001, 0x0307, 0x2003,
+	0x0300, 0x7803, 0x0001, 0x00de, 0x0005, 0x682c, 0x9084, 0x5400,
+	0x9086, 0x5400, 0x0d30, 0x7827, 0x0015, 0x782b, 0x0000, 0x7803,
+	0x0001, 0x6800, 0x9085, 0x1800, 0x6802, 0x00de, 0x0005, 0x6824,
+	0x9084, 0x0003, 0x1de0, 0x0005, 0x2001, 0x0030, 0x2c08, 0x621c,
+	0x0021, 0x7830, 0x9086, 0x0041, 0x0005, 0x00f6, 0x2079, 0x0300,
+	0x0006, 0x7808, 0xd09c, 0x0140, 0x0016, 0x0026, 0x00c6, 0x080c,
+	0x1380, 0x00ce, 0x002e, 0x001e, 0x000e, 0x0006, 0x7832, 0x7936,
+	0x7a3a, 0x781b, 0x8080, 0x0059, 0x1118, 0x000e, 0x00fe, 0x0005,
+	0x000e, 0x792c, 0x3900, 0x8000, 0x2004, 0x080c, 0x0dd5, 0x2009,
+	0x180c, 0x2104, 0xc0f4, 0x200a, 0x2009, 0xff00, 0x8109, 0x0904,
+	0x167b, 0x7a18, 0x9284, 0x0030, 0x0904, 0x1676, 0x9284, 0x0048,
+	0x9086, 0x0008, 0x1904, 0x1676, 0x2001, 0x0109, 0x2004, 0xd08c,
+	0x01f0, 0x0006, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x0126,
+	0x2091, 0x2800, 0x00f6, 0x0026, 0x0016, 0x2009, 0x1a7d, 0x2104,
+	0x8000, 0x0208, 0x200a, 0x080c, 0x9163, 0x001e, 0x002e, 0x00fe,
+	0x012e, 0x015e, 0x014e, 0x013e, 0x01de, 0x01ce, 0x000e, 0x2001,
+	0x009b, 0x2004, 0xd0fc, 0x01d0, 0x0006, 0x0126, 0x01c6, 0x01d6,
+	0x0136, 0x0146, 0x0156, 0x00f6, 0x0016, 0x2009, 0x1a7e, 0x2104,
+	0x8000, 0x0208, 0x200a, 0x080c, 0x1ef2, 0x001e, 0x00fe, 0x015e,
+	0x014e, 0x013e, 0x01de, 0x01ce, 0x012e, 0x000e, 0x7818, 0xd0bc,
+	0x1904, 0x1626, 0x0005, 0x2001, 0x180c, 0x2004, 0xd0f4, 0x1528,
+	0x7a18, 0x9284, 0x0030, 0x0508, 0x9284, 0x0048, 0x9086, 0x0008,
+	0x11e0, 0x2001, 0x19f5, 0x2004, 0x9005, 0x01b8, 0x2001, 0x1a65,
+	0x2004, 0x9086, 0x0000, 0x0188, 0x2009, 0x1a7c, 0x2104, 0x8000,
+	0x0208, 0x200a, 0x080c, 0xa3d4, 0x2009, 0x180c, 0x2104, 0xc0f5,
+	0x200a, 0x2009, 0xff00, 0x0804, 0x1626, 0x9085, 0x0001, 0x0005,
+	0x7832, 0x7936, 0x7a3a, 0x781b, 0x8080, 0x080c, 0x161f, 0x1108,
+	0x0005, 0x792c, 0x3900, 0x8000, 0x2004, 0x080c, 0x0dd5, 0x7037,
+	0x0001, 0x7150, 0x7037, 0x0002, 0x7050, 0x2060, 0xd1bc, 0x1110,
+	0x7054, 0x2060, 0x918c, 0xff00, 0x9186, 0x0500, 0x0110, 0x9085,
+	0x0001, 0x0005, 0x0006, 0x0046, 0x00e6, 0x2071, 0x0200, 0x7037,
+	0x0002, 0x7058, 0x9084, 0xff00, 0x8007, 0x9086, 0x00bc, 0x1158,
+	0x2021, 0x1a7b, 0x2404, 0x8000, 0x0208, 0x2022, 0x080c, 0x7ed7,
+	0x080c, 0x1aec, 0x9006, 0x00ee, 0x004e, 0x000e, 0x0005, 0x0c11,
+	0x1108, 0x0005, 0x00e6, 0x0016, 0x2071, 0x0200, 0x0841, 0x6124,
+	0xd1dc, 0x01f8, 0x701c, 0xd08c, 0x0904, 0x1749, 0x7017, 0x0000,
+	0x2001, 0x0264, 0x2004, 0xd0bc, 0x0904, 0x1749, 0x2001, 0x0268,
+	0x00c6, 0x2064, 0x6104, 0x6038, 0x00ce, 0x918e, 0x0039, 0x1904,
+	0x1749, 0x9c06, 0x15f0, 0x0126, 0x2091, 0x2600, 0x080c, 0x7e1e,
+	0x012e, 0x7358, 0x745c, 0x6014, 0x905d, 0x0598, 0x2b48, 0x6010,
+	0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x190c, 0xd04d, 0xab42,
+	0xac3e, 0x2001, 0x1869, 0x2004, 0xd0b4, 0x1170, 0x601c, 0xd0e4,
+	0x1158, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x1120,
+	0xa83b, 0x7fff, 0xa837, 0xffff, 0x080c, 0x20ee, 0x1190, 0x080c,
+	0x193a, 0x2a00, 0xa816, 0x0130, 0x2800, 0xa80e, 0x2c05, 0xa80a,
+	0x2c00, 0xa812, 0x7037, 0x0020, 0x781f, 0x0300, 0x001e, 0x00ee,
+	0x0005, 0x7037, 0x0050, 0x7037, 0x0020, 0x001e, 0x00ee, 0x080c,
+	0x158c, 0x0005, 0x080c, 0x0dd5, 0x2ff0, 0x0126, 0x2091, 0x2200,
+	0x0016, 0x00c6, 0x3e60, 0x6014, 0x2048, 0x2940, 0x903e, 0x2730,
+	0xa864, 0x2068, 0xa81a, 0x9d84, 0x000f, 0x9088, 0x20ce, 0x2165,
+	0x0002, 0x1780, 0x17ee, 0x1780, 0x1780, 0x1784, 0x17cf, 0x1780,
+	0x17a4, 0x1779, 0x17e5, 0x1780, 0x1780, 0x1789, 0x18db, 0x17b8,
+	0x17ae, 0xa964, 0x918c, 0x00ff, 0x918e, 0x0048, 0x0904, 0x17e5,
+	0x9085, 0x0001, 0x0804, 0x18d1, 0xa87c, 0xd0ac, 0x0dc8, 0x0804,
+	0x17f5, 0xa87c, 0xd0ac, 0x0da0, 0x0804, 0x1860, 0xa898, 0x901d,
+	0x1108, 0xab9c, 0x9016, 0xaab2, 0xaa3e, 0xaa42, 0x3e00, 0x9080,
+	0x0008, 0x2004, 0x9080, 0x8fef, 0x2005, 0x9005, 0x090c, 0x0dd5,
+	0x2004, 0xa8ae, 0x0804, 0x18b9, 0xa87c, 0xd0bc, 0x09c8, 0xa890,
+	0xa842, 0xa88c, 0xa83e, 0xa888, 0x0804, 0x17f5, 0xa87c, 0xd0bc,
+	0x0978, 0xa890, 0xa842, 0xa88c, 0xa83e, 0xa888, 0x0804, 0x1860,
+	0xa87c, 0xd0bc, 0x0928, 0xa890, 0xa842, 0xa88c, 0xa83e, 0xa804,
+	0x9045, 0x090c, 0x0dd5, 0xa164, 0xa91a, 0x91ec, 0x000f, 0x9d80,
+	0x20ce, 0x2065, 0xa888, 0xd19c, 0x1904, 0x1860, 0x0430, 0xa87c,
+	0xd0ac, 0x0904, 0x1780, 0xa804, 0x9045, 0x090c, 0x0dd5, 0xa164,
+	0xa91a, 0x91ec, 0x000f, 0x9d80, 0x20ce, 0x2065, 0x9006, 0xa842,
+	0xa83e, 0xd19c, 0x1904, 0x1860, 0x0080, 0xa87c, 0xd0ac, 0x0904,
+	0x1780, 0x9006, 0xa842, 0xa83e, 0x0804, 0x1860, 0xa87c, 0xd0ac,
+	0x0904, 0x1780, 0x9006, 0xa842, 0xa83e, 0x2c05, 0x908a, 0x0036,
+	0x1a0c, 0x0dd5, 0x9082, 0x001b, 0x0002, 0x1818, 0x1818, 0x181a,
+	0x1818, 0x1818, 0x1818, 0x1824, 0x1818, 0x1818, 0x1818, 0x182e,
+	0x1818, 0x1818, 0x1818, 0x1838, 0x1818, 0x1818, 0x1818, 0x1842,
+	0x1818, 0x1818, 0x1818, 0x184c, 0x1818, 0x1818, 0x1818, 0x1856,
+	0x080c, 0x0dd5, 0xa574, 0xa478, 0x9d86, 0x0024, 0x0904, 0x178e,
+	0xa37c, 0xa280, 0x0804, 0x18b9, 0xa584, 0xa488, 0x9d86, 0x0024,
+	0x0904, 0x178e, 0xa38c, 0xa290, 0x0804, 0x18b9, 0xa594, 0xa498,
+	0x9d86, 0x0024, 0x0904, 0x178e, 0xa39c, 0xa2a0, 0x0804, 0x18b9,
+	0xa5a4, 0xa4a8, 0x9d86, 0x0024, 0x0904, 0x178e, 0xa3ac, 0xa2b0,
+	0x0804, 0x18b9, 0xa5b4, 0xa4b8, 0x9d86, 0x0024, 0x0904, 0x178e,
+	0xa3bc, 0xa2c0, 0x0804, 0x18b9, 0xa5c4, 0xa4c8, 0x9d86, 0x0024,
+	0x0904, 0x178e, 0xa3cc, 0xa2d0, 0x0804, 0x18b9, 0xa5d4, 0xa4d8,
+	0x9d86, 0x0024, 0x0904, 0x178e, 0xa3dc, 0xa2e0, 0x0804, 0x18b9,
+	0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0dd5, 0x9082, 0x001b, 0x0002,
+	0x1883, 0x1881, 0x1881, 0x1881, 0x1881, 0x1881, 0x188e, 0x1881,
+	0x1881, 0x1881, 0x1881, 0x1881, 0x1899, 0x1881, 0x1881, 0x1881,
+	0x1881, 0x1881, 0x18a4, 0x1881, 0x1881, 0x1881, 0x1881, 0x1881,
+	0x18af, 0x080c, 0x0dd5, 0xa56c, 0xa470, 0xa774, 0xa678, 0x9d86,
+	0x002c, 0x0904, 0x178e, 0xa37c, 0xa280, 0x0458, 0xa584, 0xa488,
+	0xa78c, 0xa690, 0x9d86, 0x002c, 0x0904, 0x178e, 0xa394, 0xa298,
+	0x0400, 0xa59c, 0xa4a0, 0xa7a4, 0xa6a8, 0x9d86, 0x002c, 0x0904,
+	0x178e, 0xa3ac, 0xa2b0, 0x00a8, 0xa5b4, 0xa4b8, 0xa7bc, 0xa6c0,
+	0x9d86, 0x002c, 0x0904, 0x178e, 0xa3c4, 0xa2c8, 0x0050, 0xa5cc,
+	0xa4d0, 0xa7d4, 0xa6d8, 0x9d86, 0x002c, 0x0904, 0x178e, 0xa3dc,
+	0xa2e0, 0xab2e, 0xaa32, 0xad1e, 0xac22, 0xaf26, 0xae2a, 0xa988,
+	0x8c60, 0x2c1d, 0xa8ac, 0xaab0, 0xa836, 0xaa3a, 0x8109, 0xa916,
+	0x1160, 0x3e60, 0x601c, 0xc085, 0x601e, 0xa87c, 0xc0dd, 0xa87e,
+	0x9006, 0x00ce, 0x001e, 0x012e, 0x0005, 0x2800, 0xa80e, 0xab0a,
+	0x2c00, 0xa812, 0x0c70, 0x0804, 0x1780, 0x2ff0, 0x0126, 0x2091,
+	0x2200, 0x0016, 0x00c6, 0x3e60, 0x6014, 0x2048, 0x2940, 0xa80e,
+	0x2061, 0x20c9, 0xa813, 0x20c9, 0x2c05, 0xa80a, 0xa964, 0xa91a,
 	0xa87c, 0xd0ac, 0x090c, 0x0dd5, 0x9006, 0xa842, 0xa83e, 0x2c05,
 	0x908a, 0x0034, 0x1a0c, 0x0dd5, 0xadcc, 0xacd0, 0xafd4, 0xaed8,
 	0xabdc, 0xaae0, 0xab2e, 0xaa32, 0xad1e, 0xac22, 0xaf26, 0xae2a,
 	0xa8ac, 0xaab0, 0xa836, 0xaa3a, 0xa988, 0xa864, 0x9084, 0x00ff,
-	0x9086, 0x0008, 0x1120, 0x8109, 0xa916, 0x0128, 0x0078, 0x918a,
-	0x0002, 0xa916, 0x1158, 0x3e60, 0x601c, 0xc085, 0x601e, 0xa87c,
-	0xc0dd, 0xa87e, 0x9006, 0x00ce, 0x012e, 0x0005, 0xa804, 0x9045,
-	0x090c, 0x0dd5, 0xa80e, 0xa064, 0xa81a, 0x9084, 0x000f, 0x9080,
-	0x209d, 0x2015, 0x82ff, 0x090c, 0x0dd5, 0xaa12, 0x2205, 0xa80a,
-	0x0c10, 0x903e, 0x2730, 0xa880, 0xd0fc, 0x1190, 0x2d00, 0x0002,
-	0x1a33, 0x1960, 0x1960, 0x1a33, 0x1960, 0x1a2d, 0x1a33, 0x1960,
-	0x19d0, 0x19d0, 0x19d0, 0x1a33, 0x19d0, 0x1a33, 0x1a2a, 0x19d0,
-	0xc0fc, 0xa882, 0xab2c, 0xaa30, 0xad1c, 0xac20, 0xdd9c, 0x0904,
-	0x1a35, 0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0dd5, 0x9082, 0x001b,
-	0x0002, 0x194c, 0x194a, 0x194a, 0x194a, 0x194a, 0x194a, 0x1950,
-	0x194a, 0x194a, 0x194a, 0x194a, 0x194a, 0x1954, 0x194a, 0x194a,
-	0x194a, 0x194a, 0x194a, 0x1958, 0x194a, 0x194a, 0x194a, 0x194a,
-	0x194a, 0x195c, 0x080c, 0x0dd5, 0xa774, 0xa678, 0x0804, 0x1a35,
-	0xa78c, 0xa690, 0x0804, 0x1a35, 0xa7a4, 0xa6a8, 0x0804, 0x1a35,
-	0xa7bc, 0xa6c0, 0x0804, 0x1a35, 0xa7d4, 0xa6d8, 0x0804, 0x1a35,
-	0xa898, 0x901d, 0x1108, 0xab9c, 0x9016, 0x2c05, 0x908a, 0x0036,
-	0x1a0c, 0x0dd5, 0x9082, 0x001b, 0x0002, 0x1988, 0x1988, 0x198a,
-	0x1988, 0x1988, 0x1988, 0x1994, 0x1988, 0x1988, 0x1988, 0x199e,
-	0x1988, 0x1988, 0x1988, 0x19a8, 0x1988, 0x1988, 0x1988, 0x19b2,
-	0x1988, 0x1988, 0x1988, 0x19bc, 0x1988, 0x1988, 0x1988, 0x19c6,
-	0x080c, 0x0dd5, 0xa574, 0xa478, 0x9d86, 0x0004, 0x0904, 0x1a35,
-	0xa37c, 0xa280, 0x0804, 0x1a35, 0xa584, 0xa488, 0x9d86, 0x0004,
-	0x0904, 0x1a35, 0xa38c, 0xa290, 0x0804, 0x1a35, 0xa594, 0xa498,
-	0x9d86, 0x0004, 0x0904, 0x1a35, 0xa39c, 0xa2a0, 0x0804, 0x1a35,
-	0xa5a4, 0xa4a8, 0x9d86, 0x0004, 0x0904, 0x1a35, 0xa3ac, 0xa2b0,
-	0x0804, 0x1a35, 0xa5b4, 0xa4b8, 0x9d86, 0x0004, 0x0904, 0x1a35,
-	0xa3bc, 0xa2c0, 0x0804, 0x1a35, 0xa5c4, 0xa4c8, 0x9d86, 0x0004,
-	0x0904, 0x1a35, 0xa3cc, 0xa2d0, 0x0804, 0x1a35, 0xa5d4, 0xa4d8,
-	0x9d86, 0x0004, 0x0904, 0x1a35, 0xa3dc, 0xa2e0, 0x0804, 0x1a35,
-	0xa898, 0x901d, 0x1108, 0xab9c, 0x9016, 0x2c05, 0x908a, 0x0034,
-	0x1a0c, 0x0dd5, 0x9082, 0x001b, 0x0002, 0x19f8, 0x19f6, 0x19f6,
-	0x19f6, 0x19f6, 0x19f6, 0x1a02, 0x19f6, 0x19f6, 0x19f6, 0x19f6,
-	0x19f6, 0x1a0c, 0x19f6, 0x19f6, 0x19f6, 0x19f6, 0x19f6, 0x1a16,
-	0x19f6, 0x19f6, 0x19f6, 0x19f6, 0x19f6, 0x1a20, 0x080c, 0x0dd5,
-	0xa56c, 0xa470, 0xa774, 0xa678, 0x9d86, 0x000c, 0x05b0, 0xa37c,
-	0xa280, 0x0498, 0xa584, 0xa488, 0xa78c, 0xa690, 0x9d86, 0x000c,
-	0x0560, 0xa394, 0xa298, 0x0448, 0xa59c, 0xa4a0, 0xa7a4, 0xa6a8,
-	0x9d86, 0x000c, 0x0510, 0xa3ac, 0xa2b0, 0x00f8, 0xa5b4, 0xa4b8,
-	0xa7bc, 0xa6c0, 0x9d86, 0x000c, 0x01c0, 0xa3c4, 0xa2c8, 0x00a8,
-	0xa5cc, 0xa4d0, 0xa7d4, 0xa6d8, 0x9d86, 0x000c, 0x0170, 0xa3dc,
-	0xa2e0, 0x0058, 0x9d86, 0x000e, 0x1130, 0x080c, 0x2055, 0x1904,
-	0x1909, 0x900e, 0x0050, 0x080c, 0x0dd5, 0xab2e, 0xaa32, 0xad1e,
-	0xac22, 0xaf26, 0xae2a, 0x080c, 0x2055, 0x0005, 0x6014, 0x2048,
-	0x6118, 0x810c, 0x810c, 0x810c, 0x81ff, 0x1118, 0xa887, 0x0001,
-	0x0008, 0xa986, 0x601b, 0x0002, 0xa874, 0x9084, 0x00ff, 0x9084,
-	0x0008, 0x0150, 0x00e9, 0x6000, 0x9086, 0x0004, 0x1120, 0x2009,
-	0x0048, 0x080c, 0xaeda, 0x0005, 0xa974, 0xd1dc, 0x1108, 0x0005,
-	0xa934, 0xa88c, 0x9106, 0x1158, 0xa938, 0xa890, 0x9106, 0x1138,
-	0x601c, 0xc084, 0x601e, 0x2009, 0x0048, 0x0804, 0xaeda, 0x0005,
-	0x0126, 0x00c6, 0x2091, 0x2200, 0x00ce, 0x7908, 0x918c, 0x0007,
-	0x9186, 0x0000, 0x05b0, 0x9186, 0x0003, 0x0598, 0x6020, 0x6023,
-	0x0000, 0x0006, 0x2031, 0x0008, 0x00c6, 0x781f, 0x0808, 0x7808,
-	0xd09c, 0x0120, 0x080c, 0x1380, 0x8631, 0x1db8, 0x00ce, 0x781f,
-	0x0800, 0x2031, 0x0168, 0x00c6, 0x7808, 0xd09c, 0x190c, 0x1380,
-	0x00ce, 0x2001, 0x0038, 0x080c, 0x1b43, 0x7930, 0x9186, 0x0040,
-	0x0160, 0x9186, 0x0042, 0x190c, 0x0dd5, 0x2001, 0x001e, 0x8001,
-	0x1df0, 0x8631, 0x1d40, 0x080c, 0x1b52, 0x000e, 0x6022, 0x012e,
-	0x0005, 0x080c, 0x1b3f, 0x7827, 0x0015, 0x7828, 0x9c06, 0x1db8,
-	0x782b, 0x0000, 0x0ca0, 0x00f6, 0x2079, 0x0300, 0x7803, 0x0000,
-	0x78ab, 0x0004, 0x00fe, 0x080c, 0x73b3, 0x1188, 0x2001, 0x0138,
-	0x2003, 0x0000, 0x2001, 0x0160, 0x2003, 0x0000, 0x2011, 0x012c,
-	0xa001, 0xa001, 0x8211, 0x1de0, 0x0059, 0x0804, 0x7463, 0x0479,
-	0x0039, 0x2001, 0x0160, 0x2502, 0x2001, 0x0138, 0x2202, 0x0005,
-	0x00e6, 0x2071, 0x0200, 0x080c, 0x2c51, 0x2009, 0x003c, 0x080c,
-	0x23df, 0x2001, 0x015d, 0x2003, 0x0000, 0x7000, 0x9084, 0x003c,
-	0x1de0, 0x080c, 0x841a, 0x70a0, 0x70a2, 0x7098, 0x709a, 0x709c,
-	0x709e, 0x2001, 0x020d, 0x2003, 0x0020, 0x00f6, 0x2079, 0x0300,
-	0x080c, 0x1313, 0x7803, 0x0001, 0x00fe, 0x00ee, 0x0005, 0x2001,
-	0x0138, 0x2014, 0x2003, 0x0000, 0x2001, 0x0160, 0x202c, 0x2003,
-	0x0000, 0x080c, 0x73b3, 0x1108, 0x0005, 0x2021, 0x0260, 0x2001,
-	0x0141, 0x201c, 0xd3dc, 0x1168, 0x2001, 0x0109, 0x201c, 0x939c,
-	0x0048, 0x1160, 0x2001, 0x0111, 0x201c, 0x83ff, 0x1110, 0x8421,
-	0x1d70, 0x2001, 0x015d, 0x2003, 0x0000, 0x0005, 0x0046, 0x2021,
-	0x0019, 0x2003, 0x0048, 0xa001, 0xa001, 0x201c, 0x939c, 0x0048,
-	0x0120, 0x8421, 0x1db0, 0x004e, 0x0c60, 0x004e, 0x0c40, 0x601c,
-	0xc084, 0x601e, 0x0005, 0x2c08, 0x621c, 0x080c, 0x15f0, 0x7930,
-	0x0005, 0x2c08, 0x621c, 0x080c, 0x169b, 0x7930, 0x0005, 0x8001,
-	0x1df0, 0x0005, 0x2031, 0x0005, 0x781c, 0x9084, 0x0007, 0x0170,
-	0x2001, 0x0038, 0x0c41, 0x9186, 0x0040, 0x0904, 0x1bb0, 0x2001,
-	0x001e, 0x0c69, 0x8631, 0x1d80, 0x080c, 0x0dd5, 0x781f, 0x0202,
-	0x2001, 0x015d, 0x2003, 0x0000, 0x2001, 0x0b10, 0x0c01, 0x781c,
-	0xd084, 0x0110, 0x0861, 0x04e0, 0x2001, 0x0030, 0x0891, 0x9186,
-	0x0040, 0x0568, 0x781c, 0xd084, 0x1da8, 0x781f, 0x0101, 0x2001,
-	0x0014, 0x0869, 0x2001, 0x0037, 0x0821, 0x9186, 0x0040, 0x0140,
-	0x2001, 0x0030, 0x080c, 0x1b49, 0x9186, 0x0040, 0x190c, 0x0dd5,
-	0x00d6, 0x2069, 0x0200, 0x692c, 0xd1f4, 0x1170, 0xd1c4, 0x0160,
-	0xd19c, 0x0130, 0x6800, 0x9085, 0x1800, 0x6802, 0x00de, 0x0080,
-	0x6908, 0x9184, 0x0007, 0x1db0, 0x00de, 0x781f, 0x0100, 0x791c,
-	0x9184, 0x0007, 0x090c, 0x0dd5, 0xa001, 0xa001, 0x781f, 0x0200,
-	0x0005, 0x0126, 0x2091, 0x2400, 0x2071, 0x1a65, 0x2079, 0x0090,
-	0x012e, 0x0005, 0x9280, 0x0005, 0x2004, 0x2048, 0xa97c, 0xd1dc,
-	0x1904, 0x1c52, 0xa964, 0x9184, 0x0007, 0x0002, 0x1bce, 0x1c3d,
-	0x1be5, 0x1be7, 0x1be5, 0x1c25, 0x1c05, 0x1bf4, 0x918c, 0x00ff,
-	0x9186, 0x0008, 0x1170, 0xa87c, 0xd0b4, 0x0904, 0x1e7c, 0x9006,
-	0xa842, 0xa83e, 0xa988, 0x2900, 0xa85a, 0xa813, 0x2098, 0x0804,
-	0x1c4e, 0x9186, 0x0048, 0x0904, 0x1c3d, 0x080c, 0x0dd5, 0x9184,
-	0x00ff, 0x9086, 0x0013, 0x0904, 0x1c3d, 0x9184, 0x00ff, 0x9086,
-	0x001b, 0x0904, 0x1c3d, 0x0c88, 0xa87c, 0xd0b4, 0x0904, 0x1e7c,
+	0x9086, 0x0008, 0x1120, 0x8109, 0xa916, 0x0128, 0x0080, 0x918a,
+	0x0002, 0xa916, 0x1160, 0x3e60, 0x601c, 0xc085, 0x601e, 0xa87c,
+	0xc0dd, 0xa87e, 0x9006, 0x00ce, 0x001e, 0x012e, 0x0005, 0xa804,
+	0x9045, 0x090c, 0x0dd5, 0xa80e, 0xa064, 0xa81a, 0x9084, 0x000f,
+	0x9080, 0x20ce, 0x2015, 0x82ff, 0x090c, 0x0dd5, 0xaa12, 0x2205,
+	0xa80a, 0x0c08, 0x903e, 0x2730, 0xa880, 0xd0fc, 0x1190, 0x2d00,
+	0x0002, 0x1a64, 0x1991, 0x1991, 0x1a64, 0x1991, 0x1a5e, 0x1a64,
+	0x1991, 0x1a01, 0x1a01, 0x1a01, 0x1a64, 0x1a01, 0x1a64, 0x1a5b,
+	0x1a01, 0xc0fc, 0xa882, 0xab2c, 0xaa30, 0xad1c, 0xac20, 0xdd9c,
+	0x0904, 0x1a66, 0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0dd5, 0x9082,
+	0x001b, 0x0002, 0x197d, 0x197b, 0x197b, 0x197b, 0x197b, 0x197b,
+	0x1981, 0x197b, 0x197b, 0x197b, 0x197b, 0x197b, 0x1985, 0x197b,
+	0x197b, 0x197b, 0x197b, 0x197b, 0x1989, 0x197b, 0x197b, 0x197b,
+	0x197b, 0x197b, 0x198d, 0x080c, 0x0dd5, 0xa774, 0xa678, 0x0804,
+	0x1a66, 0xa78c, 0xa690, 0x0804, 0x1a66, 0xa7a4, 0xa6a8, 0x0804,
+	0x1a66, 0xa7bc, 0xa6c0, 0x0804, 0x1a66, 0xa7d4, 0xa6d8, 0x0804,
+	0x1a66, 0xa898, 0x901d, 0x1108, 0xab9c, 0x9016, 0x2c05, 0x908a,
+	0x0036, 0x1a0c, 0x0dd5, 0x9082, 0x001b, 0x0002, 0x19b9, 0x19b9,
+	0x19bb, 0x19b9, 0x19b9, 0x19b9, 0x19c5, 0x19b9, 0x19b9, 0x19b9,
+	0x19cf, 0x19b9, 0x19b9, 0x19b9, 0x19d9, 0x19b9, 0x19b9, 0x19b9,
+	0x19e3, 0x19b9, 0x19b9, 0x19b9, 0x19ed, 0x19b9, 0x19b9, 0x19b9,
+	0x19f7, 0x080c, 0x0dd5, 0xa574, 0xa478, 0x9d86, 0x0004, 0x0904,
+	0x1a66, 0xa37c, 0xa280, 0x0804, 0x1a66, 0xa584, 0xa488, 0x9d86,
+	0x0004, 0x0904, 0x1a66, 0xa38c, 0xa290, 0x0804, 0x1a66, 0xa594,
+	0xa498, 0x9d86, 0x0004, 0x0904, 0x1a66, 0xa39c, 0xa2a0, 0x0804,
+	0x1a66, 0xa5a4, 0xa4a8, 0x9d86, 0x0004, 0x0904, 0x1a66, 0xa3ac,
+	0xa2b0, 0x0804, 0x1a66, 0xa5b4, 0xa4b8, 0x9d86, 0x0004, 0x0904,
+	0x1a66, 0xa3bc, 0xa2c0, 0x0804, 0x1a66, 0xa5c4, 0xa4c8, 0x9d86,
+	0x0004, 0x0904, 0x1a66, 0xa3cc, 0xa2d0, 0x0804, 0x1a66, 0xa5d4,
+	0xa4d8, 0x9d86, 0x0004, 0x0904, 0x1a66, 0xa3dc, 0xa2e0, 0x0804,
+	0x1a66, 0xa898, 0x901d, 0x1108, 0xab9c, 0x9016, 0x2c05, 0x908a,
+	0x0034, 0x1a0c, 0x0dd5, 0x9082, 0x001b, 0x0002, 0x1a29, 0x1a27,
+	0x1a27, 0x1a27, 0x1a27, 0x1a27, 0x1a33, 0x1a27, 0x1a27, 0x1a27,
+	0x1a27, 0x1a27, 0x1a3d, 0x1a27, 0x1a27, 0x1a27, 0x1a27, 0x1a27,
+	0x1a47, 0x1a27, 0x1a27, 0x1a27, 0x1a27, 0x1a27, 0x1a51, 0x080c,
+	0x0dd5, 0xa56c, 0xa470, 0xa774, 0xa678, 0x9d86, 0x000c, 0x05b0,
+	0xa37c, 0xa280, 0x0498, 0xa584, 0xa488, 0xa78c, 0xa690, 0x9d86,
+	0x000c, 0x0560, 0xa394, 0xa298, 0x0448, 0xa59c, 0xa4a0, 0xa7a4,
+	0xa6a8, 0x9d86, 0x000c, 0x0510, 0xa3ac, 0xa2b0, 0x00f8, 0xa5b4,
+	0xa4b8, 0xa7bc, 0xa6c0, 0x9d86, 0x000c, 0x01c0, 0xa3c4, 0xa2c8,
+	0x00a8, 0xa5cc, 0xa4d0, 0xa7d4, 0xa6d8, 0x9d86, 0x000c, 0x0170,
+	0xa3dc, 0xa2e0, 0x0058, 0x9d86, 0x000e, 0x1130, 0x080c, 0x2086,
+	0x1904, 0x193a, 0x900e, 0x0050, 0x080c, 0x0dd5, 0xab2e, 0xaa32,
+	0xad1e, 0xac22, 0xaf26, 0xae2a, 0x080c, 0x2086, 0x0005, 0x6014,
+	0x2048, 0x6118, 0x810c, 0x810c, 0x810c, 0x81ff, 0x1118, 0xa887,
+	0x0001, 0x0008, 0xa986, 0x601b, 0x0002, 0xa874, 0x9084, 0x00ff,
+	0x9084, 0x0008, 0x0150, 0x00e9, 0x6000, 0x9086, 0x0004, 0x1120,
+	0x2009, 0x0048, 0x080c, 0xafbe, 0x0005, 0xa974, 0xd1dc, 0x1108,
+	0x0005, 0xa934, 0xa88c, 0x9106, 0x1158, 0xa938, 0xa890, 0x9106,
+	0x1138, 0x601c, 0xc084, 0x601e, 0x2009, 0x0048, 0x0804, 0xafbe,
+	0x0005, 0x0126, 0x00c6, 0x2091, 0x2200, 0x00ce, 0x7908, 0x918c,
+	0x0007, 0x9186, 0x0000, 0x05b0, 0x9186, 0x0003, 0x0598, 0x6020,
+	0x6023, 0x0000, 0x0006, 0x2031, 0x0008, 0x00c6, 0x781f, 0x0808,
+	0x7808, 0xd09c, 0x0120, 0x080c, 0x1380, 0x8631, 0x1db8, 0x00ce,
+	0x781f, 0x0800, 0x2031, 0x0168, 0x00c6, 0x7808, 0xd09c, 0x190c,
+	0x1380, 0x00ce, 0x2001, 0x0038, 0x080c, 0x1b74, 0x7930, 0x9186,
+	0x0040, 0x0160, 0x9186, 0x0042, 0x190c, 0x0dd5, 0x2001, 0x001e,
+	0x8001, 0x1df0, 0x8631, 0x1d40, 0x080c, 0x1b83, 0x000e, 0x6022,
+	0x012e, 0x0005, 0x080c, 0x1b70, 0x7827, 0x0015, 0x7828, 0x9c06,
+	0x1db8, 0x782b, 0x0000, 0x0ca0, 0x00f6, 0x2079, 0x0300, 0x7803,
+	0x0000, 0x78ab, 0x0004, 0x00fe, 0x080c, 0x743e, 0x1188, 0x2001,
+	0x0138, 0x2003, 0x0000, 0x2001, 0x0160, 0x2003, 0x0000, 0x2011,
+	0x012c, 0xa001, 0xa001, 0x8211, 0x1de0, 0x0059, 0x0804, 0x74ee,
+	0x0479, 0x0039, 0x2001, 0x0160, 0x2502, 0x2001, 0x0138, 0x2202,
+	0x0005, 0x00e6, 0x2071, 0x0200, 0x080c, 0x2c82, 0x2009, 0x003c,
+	0x080c, 0x2410, 0x2001, 0x015d, 0x2003, 0x0000, 0x7000, 0x9084,
+	0x003c, 0x1de0, 0x080c, 0x84c2, 0x70a0, 0x70a2, 0x7098, 0x709a,
+	0x709c, 0x709e, 0x2001, 0x020d, 0x2003, 0x0020, 0x00f6, 0x2079,
+	0x0300, 0x080c, 0x1313, 0x7803, 0x0001, 0x00fe, 0x00ee, 0x0005,
+	0x2001, 0x0138, 0x2014, 0x2003, 0x0000, 0x2001, 0x0160, 0x202c,
+	0x2003, 0x0000, 0x080c, 0x743e, 0x1108, 0x0005, 0x2021, 0x0260,
+	0x2001, 0x0141, 0x201c, 0xd3dc, 0x1168, 0x2001, 0x0109, 0x201c,
+	0x939c, 0x0048, 0x1160, 0x2001, 0x0111, 0x201c, 0x83ff, 0x1110,
+	0x8421, 0x1d70, 0x2001, 0x015d, 0x2003, 0x0000, 0x0005, 0x0046,
+	0x2021, 0x0019, 0x2003, 0x0048, 0xa001, 0xa001, 0x201c, 0x939c,
+	0x0048, 0x0120, 0x8421, 0x1db0, 0x004e, 0x0c60, 0x004e, 0x0c40,
+	0x601c, 0xc084, 0x601e, 0x0005, 0x2c08, 0x621c, 0x080c, 0x15fd,
+	0x7930, 0x0005, 0x2c08, 0x621c, 0x080c, 0x16a8, 0x7930, 0x0005,
+	0x8001, 0x1df0, 0x0005, 0x2031, 0x0064, 0x781c, 0x9084, 0x0007,
+	0x0170, 0x2001, 0x0038, 0x0c41, 0x9186, 0x0040, 0x0904, 0x1be1,
+	0x2001, 0x001e, 0x0c69, 0x8631, 0x1d80, 0x080c, 0x0dd5, 0x781f,
+	0x0202, 0x2001, 0x015d, 0x2003, 0x0000, 0x2001, 0x0dac, 0x0c01,
+	0x781c, 0xd084, 0x0110, 0x0861, 0x04e0, 0x2001, 0x0030, 0x0891,
+	0x9186, 0x0040, 0x0568, 0x781c, 0xd084, 0x1da8, 0x781f, 0x0101,
+	0x2001, 0x0014, 0x0869, 0x2001, 0x0037, 0x0821, 0x9186, 0x0040,
+	0x0140, 0x2001, 0x0030, 0x080c, 0x1b7a, 0x9186, 0x0040, 0x190c,
+	0x0dd5, 0x00d6, 0x2069, 0x0200, 0x692c, 0xd1f4, 0x1170, 0xd1c4,
+	0x0160, 0xd19c, 0x0130, 0x6800, 0x9085, 0x1800, 0x6802, 0x00de,
+	0x0080, 0x6908, 0x9184, 0x0007, 0x1db0, 0x00de, 0x781f, 0x0100,
+	0x791c, 0x9184, 0x0007, 0x090c, 0x0dd5, 0xa001, 0xa001, 0x781f,
+	0x0200, 0x0005, 0x0126, 0x2091, 0x2400, 0x2071, 0x1a65, 0x2079,
+	0x0090, 0x012e, 0x0005, 0x9280, 0x0005, 0x2004, 0x2048, 0xa97c,
+	0xd1dc, 0x1904, 0x1c83, 0xa964, 0x9184, 0x0007, 0x0002, 0x1bff,
+	0x1c6e, 0x1c16, 0x1c18, 0x1c16, 0x1c56, 0x1c36, 0x1c25, 0x918c,
+	0x00ff, 0x9186, 0x0008, 0x1170, 0xa87c, 0xd0b4, 0x0904, 0x1ead,
+	0x9006, 0xa842, 0xa83e, 0xa988, 0x2900, 0xa85a, 0xa813, 0x20c9,
+	0x0804, 0x1c7f, 0x9186, 0x0048, 0x0904, 0x1c6e, 0x080c, 0x0dd5,
+	0x9184, 0x00ff, 0x9086, 0x0013, 0x0904, 0x1c6e, 0x9184, 0x00ff,
+	0x9086, 0x001b, 0x0904, 0x1c6e, 0x0c88, 0xa87c, 0xd0b4, 0x0904,
+	0x1ead, 0xa890, 0xa842, 0xa83a, 0xa88c, 0xa83e, 0xa836, 0xa8ac,
+	0xa846, 0xa8b0, 0xa84a, 0xa988, 0x0804, 0x1c76, 0xa864, 0x9084,
+	0x00ff, 0x9086, 0x001e, 0x19d0, 0xa87c, 0xd0b4, 0x0904, 0x1ead,
 	0xa890, 0xa842, 0xa83a, 0xa88c, 0xa83e, 0xa836, 0xa8ac, 0xa846,
-	0xa8b0, 0xa84a, 0xa988, 0x0804, 0x1c45, 0xa864, 0x9084, 0x00ff,
-	0x9086, 0x001e, 0x19d0, 0xa87c, 0xd0b4, 0x0904, 0x1e7c, 0xa890,
-	0xa842, 0xa83a, 0xa88c, 0xa83e, 0xa836, 0xa8ac, 0xa846, 0xa8b0,
-	0xa84a, 0xa804, 0xa85a, 0x2040, 0xa064, 0x9084, 0x000f, 0x9080,
-	0x209d, 0x2005, 0xa812, 0xa988, 0x0448, 0x918c, 0x00ff, 0x9186,
-	0x0015, 0x1540, 0xa87c, 0xd0b4, 0x0904, 0x1e7c, 0xa804, 0xa85a,
-	0x2040, 0xa064, 0x9084, 0x000f, 0x9080, 0x209d, 0x2005, 0xa812,
-	0xa988, 0x9006, 0xa842, 0xa83e, 0x0088, 0xa87c, 0xd0b4, 0x0904,
-	0x1e7c, 0xa988, 0x9006, 0xa842, 0xa83e, 0x2900, 0xa85a, 0xa864,
-	0x9084, 0x000f, 0x9080, 0x209d, 0x2005, 0xa812, 0xa916, 0xa87c,
-	0xc0dd, 0xa87e, 0x0005, 0x00f6, 0x2079, 0x0090, 0x782c, 0xd0fc,
-	0x190c, 0x1ec1, 0x00e6, 0x2071, 0x1a65, 0x7000, 0x9005, 0x1904,
-	0x1cbb, 0x7206, 0x9280, 0x0005, 0x204c, 0x9280, 0x0004, 0x2004,
-	0x782b, 0x0004, 0x00f6, 0x2079, 0x0200, 0x7803, 0x0040, 0x00fe,
-	0x00b6, 0x2058, 0xb86c, 0x7836, 0xb890, 0x00be, 0x00f6, 0x2079,
-	0x0200, 0x7803, 0x0040, 0xa001, 0xa001, 0xa001, 0xa001, 0xa001,
-	0xa001, 0x781a, 0x2079, 0x0100, 0x8004, 0x78d6, 0x00fe, 0xa814,
-	0x2050, 0xa858, 0x2040, 0xa810, 0x2060, 0xa064, 0x90ec, 0x000f,
-	0xa944, 0x791a, 0x7116, 0xa848, 0x781e, 0x701a, 0x9006, 0x700e,
-	0x7012, 0x7004, 0xa940, 0xa838, 0x9106, 0x1500, 0xa93c, 0xa834,
-	0x9106, 0x11e0, 0x0006, 0x0016, 0xa938, 0xa834, 0x9105, 0x0118,
-	0x001e, 0x000e, 0x0098, 0x001e, 0x000e, 0x8aff, 0x01c8, 0x0126,
-	0x2091, 0x8000, 0x2009, 0x0306, 0x200b, 0x0808, 0x00d9, 0x0108,
-	0x00c9, 0x012e, 0x9006, 0x00ee, 0x00fe, 0x0005, 0x0036, 0x0046,
-	0xab38, 0xac34, 0x080c, 0x20bd, 0x004e, 0x003e, 0x0d30, 0x0c98,
-	0x9085, 0x0001, 0x0c80, 0x2009, 0x0306, 0x200b, 0x4800, 0x7027,
-	0x0000, 0x0005, 0x0076, 0x0066, 0x0056, 0x0046, 0x0036, 0x0026,
-	0x8aff, 0x0904, 0x1e75, 0x700c, 0x7214, 0x923a, 0x7010, 0x7218,
-	0x9203, 0x0a04, 0x1e74, 0x9705, 0x0904, 0x1e74, 0x903e, 0x2730,
-	0xa880, 0xd0fc, 0x1190, 0x2d00, 0x0002, 0x1dfe, 0x1d3d, 0x1d3d,
-	0x1dfe, 0x1dfe, 0x1ddb, 0x1dfe, 0x1d3d, 0x1de2, 0x1d8c, 0x1d8c,
-	0x1dfe, 0x1dfe, 0x1dfe, 0x1dd5, 0x1d8c, 0xc0fc, 0xa882, 0xab2c,
-	0xaa30, 0xad1c, 0xac20, 0xdd9c, 0x0904, 0x1e0b, 0x2c05, 0x908a,
-	0x0034, 0x1a0c, 0x0dd5, 0x9082, 0x001b, 0x0002, 0x1d29, 0x1d27,
-	0x1d27, 0x1d27, 0x1d27, 0x1d27, 0x1d2d, 0x1d27, 0x1d27, 0x1d27,
-	0x1d27, 0x1d27, 0x1d31, 0x1d27, 0x1d27, 0x1d27, 0x1d27, 0x1d27,
-	0x1d35, 0x1d27, 0x1d27, 0x1d27, 0x1d27, 0x1d27, 0x1d39, 0x080c,
-	0x0dd5, 0xa774, 0xa678, 0x0804, 0x1e0b, 0xa78c, 0xa690, 0x0804,
-	0x1e0b, 0xa7a4, 0xa6a8, 0x0804, 0x1e0b, 0xa7bc, 0xa6c0, 0x0804,
-	0x1e0b, 0xa7d4, 0xa6d8, 0x0804, 0x1e0b, 0x2c05, 0x908a, 0x0036,
-	0x1a0c, 0x0dd5, 0x9082, 0x001b, 0x0002, 0x1d60, 0x1d60, 0x1d62,
-	0x1d60, 0x1d60, 0x1d60, 0x1d68, 0x1d60, 0x1d60, 0x1d60, 0x1d6e,
-	0x1d60, 0x1d60, 0x1d60, 0x1d74, 0x1d60, 0x1d60, 0x1d60, 0x1d7a,
-	0x1d60, 0x1d60, 0x1d60, 0x1d80, 0x1d60, 0x1d60, 0x1d60, 0x1d86,
-	0x080c, 0x0dd5, 0xa574, 0xa478, 0xa37c, 0xa280, 0x0804, 0x1e0b,
-	0xa584, 0xa488, 0xa38c, 0xa290, 0x0804, 0x1e0b, 0xa594, 0xa498,
-	0xa39c, 0xa2a0, 0x0804, 0x1e0b, 0xa5a4, 0xa4a8, 0xa3ac, 0xa2b0,
-	0x0804, 0x1e0b, 0xa5b4, 0xa4b8, 0xa3bc, 0xa2c0, 0x0804, 0x1e0b,
-	0xa5c4, 0xa4c8, 0xa3cc, 0xa2d0, 0x0804, 0x1e0b, 0xa5d4, 0xa4d8,
-	0xa3dc, 0xa2e0, 0x0804, 0x1e0b, 0x2c05, 0x908a, 0x0034, 0x1a0c,
-	0x0dd5, 0x9082, 0x001b, 0x0002, 0x1daf, 0x1dad, 0x1dad, 0x1dad,
-	0x1dad, 0x1dad, 0x1db7, 0x1dad, 0x1dad, 0x1dad, 0x1dad, 0x1dad,
-	0x1dbf, 0x1dad, 0x1dad, 0x1dad, 0x1dad, 0x1dad, 0x1dc7, 0x1dad,
-	0x1dad, 0x1dad, 0x1dad, 0x1dad, 0x1dce, 0x080c, 0x0dd5, 0xa56c,
-	0xa470, 0xa774, 0xa678, 0xa37c, 0xa280, 0x0804, 0x1e0b, 0xa584,
-	0xa488, 0xa78c, 0xa690, 0xa394, 0xa298, 0x0804, 0x1e0b, 0xa59c,
-	0xa4a0, 0xa7a4, 0xa6a8, 0xa3ac, 0xa2b0, 0x0804, 0x1e0b, 0xa5b4,
-	0xa4b8, 0xa7bc, 0xa6c0, 0xa3c4, 0xa2c8, 0x04e8, 0xa5cc, 0xa4d0,
-	0xa7d4, 0xa6d8, 0xa3dc, 0xa2e0, 0x04b0, 0xa864, 0x9084, 0x00ff,
-	0x9086, 0x001e, 0x1518, 0x080c, 0x2055, 0x1904, 0x1cd8, 0x900e,
-	0x0804, 0x1e75, 0xab64, 0x939c, 0x00ff, 0x9386, 0x0048, 0x1180,
-	0x00c6, 0x7004, 0x2060, 0x6004, 0x9086, 0x0043, 0x00ce, 0x0904,
-	0x1d8c, 0xab9c, 0x9016, 0xad8c, 0xac90, 0xaf94, 0xae98, 0x0098,
-	0x9386, 0x0008, 0x0904, 0x1d8c, 0x080c, 0x0dd5, 0xa964, 0x918c,
-	0x00ff, 0x9186, 0x0013, 0x0904, 0x1d3d, 0x9186, 0x001b, 0x0904,
-	0x1d8c, 0x080c, 0x0dd5, 0x2009, 0x030f, 0x2104, 0xd0fc, 0x0530,
-	0x0066, 0x2009, 0x0306, 0x2104, 0x9084, 0x0030, 0x15c8, 0x2031,
-	0x1000, 0x200b, 0x4000, 0x2600, 0x9302, 0x928b, 0x0000, 0xa82e,
-	0xa932, 0x0278, 0x9105, 0x0168, 0x2011, 0x0000, 0x2618, 0x2600,
-	0x9500, 0xa81e, 0x9481, 0x0000, 0xa822, 0xa880, 0xc0fd, 0xa882,
-	0x0020, 0xa82f, 0x0000, 0xa833, 0x0000, 0x006e, 0x7b12, 0x7a16,
-	0x7d02, 0x7c06, 0x7f0a, 0x7e0e, 0x782b, 0x0001, 0x7000, 0x8000,
-	0x7002, 0xa83c, 0x9300, 0xa83e, 0xa840, 0x9201, 0xa842, 0x700c,
-	0x9300, 0x700e, 0x7010, 0x9201, 0x7012, 0x080c, 0x2055, 0x0428,
-	0x2031, 0x0080, 0x9584, 0x007f, 0x0108, 0x9632, 0x7124, 0x7000,
-	0x9086, 0x0000, 0x1198, 0xc185, 0x7126, 0x2009, 0x0306, 0x2104,
-	0xd0b4, 0x1904, 0x1e1b, 0x200b, 0x4040, 0x2009, 0x1a7e, 0x2104,
-	0x8000, 0x0a04, 0x1e1b, 0x200a, 0x0804, 0x1e1b, 0xc18d, 0x7126,
-	0xd184, 0x1d58, 0x0804, 0x1e1b, 0x9006, 0x002e, 0x003e, 0x004e,
-	0x005e, 0x006e, 0x007e, 0x0005, 0x080c, 0x0dd5, 0x0026, 0x2001,
-	0x0105, 0x2003, 0x0010, 0x782b, 0x0004, 0x7003, 0x0000, 0x7004,
-	0x0016, 0x080c, 0x1ccb, 0x001e, 0x2060, 0x6014, 0x2048, 0x080c,
-	0xcb5a, 0x0118, 0xa880, 0xc0bd, 0xa882, 0x6020, 0x9086, 0x0006,
-	0x1180, 0x2061, 0x0100, 0x62c8, 0x2001, 0x00fa, 0x8001, 0x1df0,
-	0x60c8, 0x9206, 0x1dc0, 0x60c4, 0xa89a, 0x60c8, 0xa896, 0x7004,
-	0x2060, 0x00c6, 0x080c, 0xc77b, 0x00ce, 0x2001, 0x19f5, 0x2004,
-	0x9c06, 0x1160, 0x2009, 0x0040, 0x080c, 0x23df, 0x080c, 0xa7b7,
-	0x2011, 0x0000, 0x080c, 0xa648, 0x080c, 0x97d4, 0x002e, 0x0804,
-	0x2005, 0x0126, 0x2091, 0x2400, 0xa858, 0x2040, 0x792c, 0x782b,
-	0x0002, 0x9184, 0x0700, 0x1904, 0x1e7e, 0x7000, 0x0002, 0x2005,
-	0x1ed3, 0x1f53, 0x2003, 0x8001, 0x7002, 0x7027, 0x0000, 0xd19c,
-	0x1158, 0x8aff, 0x0904, 0x1f20, 0x080c, 0x1cd2, 0x0904, 0x2005,
-	0x080c, 0x1cd2, 0x0804, 0x2005, 0x782b, 0x0004, 0xd194, 0x0148,
-	0xa880, 0xc0fc, 0xa882, 0x8aff, 0x1518, 0xa87c, 0xc0f5, 0xa87e,
-	0x00f8, 0x0026, 0x0036, 0xab3c, 0xaa40, 0x0016, 0x7910, 0xa82c,
-	0x9100, 0xa82e, 0x7914, 0xa830, 0x9101, 0xa832, 0x001e, 0x7810,
-	0x931a, 0x7814, 0x9213, 0x7800, 0xa81e, 0x7804, 0xa822, 0xab3e,
-	0xaa42, 0x003e, 0x002e, 0x080c, 0x2070, 0xa880, 0xc0fd, 0xa882,
-	0x2a00, 0xa816, 0x2800, 0xa85a, 0x2c00, 0xa812, 0x7003, 0x0000,
-	0x2009, 0x0306, 0x200b, 0x4800, 0x7027, 0x0000, 0x0804, 0x2005,
-	0x00f6, 0x0026, 0x781c, 0x0006, 0x7818, 0x0006, 0x2079, 0x0100,
-	0x7a14, 0x9284, 0x1984, 0x9085, 0x0012, 0x7816, 0x0036, 0x2019,
-	0x1000, 0x8319, 0x090c, 0x0dd5, 0x7820, 0xd0bc, 0x1dd0, 0x003e,
-	0x79c8, 0x000e, 0x9102, 0x001e, 0x0006, 0x0016, 0x79c4, 0x000e,
-	0x9103, 0x78c6, 0x000e, 0x78ca, 0x9284, 0x1984, 0x9085, 0x0012,
-	0x7816, 0x002e, 0x00fe, 0x782b, 0x0008, 0x7003, 0x0000, 0x080c,
-	0x1ccb, 0x0804, 0x2005, 0x8001, 0x7002, 0x7024, 0x8004, 0x7026,
-	0xd194, 0x0170, 0x782c, 0xd0fc, 0x1904, 0x1ec6, 0xd19c, 0x1904,
-	0x2001, 0x8aff, 0x0904, 0x2005, 0x080c, 0x1cd2, 0x0804, 0x2005,
-	0x0026, 0x0036, 0xab3c, 0xaa40, 0x080c, 0x2070, 0xdd9c, 0x1904,
-	0x1fc0, 0x2c05, 0x908a, 0x0036, 0x1a0c, 0x0dd5, 0x9082, 0x001b,
-	0x0002, 0x1f94, 0x1f94, 0x1f96, 0x1f94, 0x1f94, 0x1f94, 0x1f9c,
-	0x1f94, 0x1f94, 0x1f94, 0x1fa2, 0x1f94, 0x1f94, 0x1f94, 0x1fa8,
-	0x1f94, 0x1f94, 0x1f94, 0x1fae, 0x1f94, 0x1f94, 0x1f94, 0x1fb4,
-	0x1f94, 0x1f94, 0x1f94, 0x1fba, 0x080c, 0x0dd5, 0xa07c, 0x931a,
-	0xa080, 0x9213, 0x0804, 0x1ef5, 0xa08c, 0x931a, 0xa090, 0x9213,
-	0x0804, 0x1ef5, 0xa09c, 0x931a, 0xa0a0, 0x9213, 0x0804, 0x1ef5,
-	0xa0ac, 0x931a, 0xa0b0, 0x9213, 0x0804, 0x1ef5, 0xa0bc, 0x931a,
-	0xa0c0, 0x9213, 0x0804, 0x1ef5, 0xa0cc, 0x931a, 0xa0d0, 0x9213,
-	0x0804, 0x1ef5, 0xa0dc, 0x931a, 0xa0e0, 0x9213, 0x0804, 0x1ef5,
-	0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0dd5, 0x9082, 0x001b, 0x0002,
-	0x1fe3, 0x1fe1, 0x1fe1, 0x1fe1, 0x1fe1, 0x1fe1, 0x1fe9, 0x1fe1,
-	0x1fe1, 0x1fe1, 0x1fe1, 0x1fe1, 0x1fef, 0x1fe1, 0x1fe1, 0x1fe1,
-	0x1fe1, 0x1fe1, 0x1ff5, 0x1fe1, 0x1fe1, 0x1fe1, 0x1fe1, 0x1fe1,
-	0x1ffb, 0x080c, 0x0dd5, 0xa07c, 0x931a, 0xa080, 0x9213, 0x0804,
-	0x1ef5, 0xa094, 0x931a, 0xa098, 0x9213, 0x0804, 0x1ef5, 0xa0ac,
-	0x931a, 0xa0b0, 0x9213, 0x0804, 0x1ef5, 0xa0c4, 0x931a, 0xa0c8,
-	0x9213, 0x0804, 0x1ef5, 0xa0dc, 0x931a, 0xa0e0, 0x9213, 0x0804,
-	0x1ef5, 0x0804, 0x1ef1, 0x080c, 0x0dd5, 0x012e, 0x0005, 0x00f6,
-	0x00e6, 0x2071, 0x1a65, 0x7000, 0x9086, 0x0000, 0x0904, 0x2050,
-	0x2079, 0x0090, 0x2009, 0x0207, 0x210c, 0xd194, 0x01b8, 0x2009,
-	0x020c, 0x210c, 0x9184, 0x0003, 0x0188, 0x080c, 0xea45, 0x2001,
-	0x0133, 0x2004, 0x9005, 0x090c, 0x0dd5, 0x0016, 0x2009, 0x0040,
-	0x080c, 0x23df, 0x001e, 0x2001, 0x020c, 0x2102, 0x2009, 0x0206,
-	0x2104, 0x2009, 0x0203, 0x210c, 0x9106, 0x1120, 0x2009, 0x0040,
-	0x080c, 0x23df, 0x782c, 0xd0fc, 0x09a8, 0x080c, 0x1ec1, 0x7000,
-	0x9086, 0x0000, 0x1978, 0x782b, 0x0004, 0x782c, 0xd0ac, 0x1de8,
-	0x2009, 0x0040, 0x080c, 0x23df, 0x782b, 0x0002, 0x7003, 0x0000,
-	0x080c, 0x1ccb, 0x00ee, 0x00fe, 0x0005, 0xa880, 0xd0fc, 0x11a8,
-	0x8c60, 0x2c05, 0x9005, 0x0110, 0x8a51, 0x0005, 0xa004, 0x9005,
-	0x0168, 0xa85a, 0x2040, 0xa064, 0x9084, 0x000f, 0x9080, 0x209d,
-	0x2065, 0x8cff, 0x090c, 0x0dd5, 0x8a51, 0x0005, 0x2050, 0x0005,
-	0xa880, 0xd0fc, 0x11b8, 0x8a50, 0x8c61, 0x2c05, 0x9005, 0x1190,
-	0x2800, 0x9906, 0x0120, 0xa000, 0x9005, 0x1108, 0x2900, 0x2040,
-	0xa85a, 0xa064, 0x9084, 0x000f, 0x9080, 0x20ad, 0x2065, 0x8cff,
-	0x090c, 0x0dd5, 0x0005, 0x0000, 0x001d, 0x0021, 0x0025, 0x0029,
-	0x002d, 0x0031, 0x0035, 0x0000, 0x001b, 0x0021, 0x0027, 0x002d,
-	0x0033, 0x0000, 0x0000, 0x0023, 0x0000, 0x0000, 0x2090, 0x208c,
-	0x2090, 0x2090, 0x209a, 0x0000, 0x2090, 0x2097, 0x2097, 0x2094,
-	0x2097, 0x2097, 0x0000, 0x209a, 0x2097, 0x0000, 0x2092, 0x2092,
-	0x0000, 0x2092, 0x209a, 0x0000, 0x2092, 0x2098, 0x2098, 0x2098,
-	0x0000, 0x2098, 0x0000, 0x209a, 0x2098, 0x00c6, 0x00d6, 0x0086,
-	0xab42, 0xac3e, 0xa888, 0x9055, 0x0904, 0x229c, 0x2940, 0xa064,
-	0x90ec, 0x000f, 0x9084, 0x00ff, 0x9086, 0x0008, 0x1118, 0x2061,
-	0x2098, 0x00d0, 0x9de0, 0x209d, 0x9d86, 0x0007, 0x0130, 0x9d86,
-	0x000e, 0x0118, 0x9d86, 0x000f, 0x1120, 0xa08c, 0x9422, 0xa090,
-	0x931b, 0x2c05, 0x9065, 0x1140, 0x0310, 0x0804, 0x229c, 0xa004,
-	0x9045, 0x0904, 0x229c, 0x08d8, 0x2c05, 0x9005, 0x0904, 0x2184,
-	0xdd9c, 0x1904, 0x2140, 0x908a, 0x0036, 0x1a0c, 0x0dd5, 0x9082,
-	0x001b, 0x0002, 0x2115, 0x2115, 0x2117, 0x2115, 0x2115, 0x2115,
-	0x211d, 0x2115, 0x2115, 0x2115, 0x2123, 0x2115, 0x2115, 0x2115,
-	0x2129, 0x2115, 0x2115, 0x2115, 0x212f, 0x2115, 0x2115, 0x2115,
-	0x2135, 0x2115, 0x2115, 0x2115, 0x213b, 0x080c, 0x0dd5, 0xa07c,
-	0x9422, 0xa080, 0x931b, 0x0804, 0x217a, 0xa08c, 0x9422, 0xa090,
-	0x931b, 0x0804, 0x217a, 0xa09c, 0x9422, 0xa0a0, 0x931b, 0x0804,
-	0x217a, 0xa0ac, 0x9422, 0xa0b0, 0x931b, 0x0804, 0x217a, 0xa0bc,
-	0x9422, 0xa0c0, 0x931b, 0x0804, 0x217a, 0xa0cc, 0x9422, 0xa0d0,
-	0x931b, 0x0804, 0x217a, 0xa0dc, 0x9422, 0xa0e0, 0x931b, 0x04d0,
-	0x908a, 0x0034, 0x1a0c, 0x0dd5, 0x9082, 0x001b, 0x0002, 0x2162,
-	0x2160, 0x2160, 0x2160, 0x2160, 0x2160, 0x2167, 0x2160, 0x2160,
-	0x2160, 0x2160, 0x2160, 0x216c, 0x2160, 0x2160, 0x2160, 0x2160,
-	0x2160, 0x2171, 0x2160, 0x2160, 0x2160, 0x2160, 0x2160, 0x2176,
-	0x080c, 0x0dd5, 0xa07c, 0x9422, 0xa080, 0x931b, 0x0098, 0xa094,
-	0x9422, 0xa098, 0x931b, 0x0070, 0xa0ac, 0x9422, 0xa0b0, 0x931b,
-	0x0048, 0xa0c4, 0x9422, 0xa0c8, 0x931b, 0x0020, 0xa0dc, 0x9422,
-	0xa0e0, 0x931b, 0x0630, 0x2300, 0x9405, 0x0160, 0x8a51, 0x0904,
-	0x229c, 0x8c60, 0x0804, 0x20ec, 0xa004, 0x9045, 0x0904, 0x229c,
-	0x0804, 0x20c7, 0x8a51, 0x0904, 0x229c, 0x8c60, 0x2c05, 0x9005,
-	0x1158, 0xa004, 0x9045, 0x0904, 0x229c, 0xa064, 0x90ec, 0x000f,
-	0x9de0, 0x209d, 0x2c05, 0x2060, 0xa880, 0xc0fc, 0xa882, 0x0804,
-	0x2291, 0x2c05, 0x8422, 0x8420, 0x831a, 0x9399, 0x0000, 0xac2e,
-	0xab32, 0xdd9c, 0x1904, 0x222e, 0x9082, 0x001b, 0x0002, 0x21ca,
-	0x21ca, 0x21cc, 0x21ca, 0x21ca, 0x21ca, 0x21da, 0x21ca, 0x21ca,
-	0x21ca, 0x21e8, 0x21ca, 0x21ca, 0x21ca, 0x21f6, 0x21ca, 0x21ca,
-	0x21ca, 0x2204, 0x21ca, 0x21ca, 0x21ca, 0x2212, 0x21ca, 0x21ca,
-	0x21ca, 0x2220, 0x080c, 0x0dd5, 0xa17c, 0x2400, 0x9122, 0xa180,
-	0x2300, 0x911b, 0x0a0c, 0x0dd5, 0xa074, 0x9420, 0xa078, 0x9319,
-	0x0804, 0x228c, 0xa18c, 0x2400, 0x9122, 0xa190, 0x2300, 0x911b,
-	0x0a0c, 0x0dd5, 0xa084, 0x9420, 0xa088, 0x9319, 0x0804, 0x228c,
-	0xa19c, 0x2400, 0x9122, 0xa1a0, 0x2300, 0x911b, 0x0a0c, 0x0dd5,
-	0xa094, 0x9420, 0xa098, 0x9319, 0x0804, 0x228c, 0xa1ac, 0x2400,
-	0x9122, 0xa1b0, 0x2300, 0x911b, 0x0a0c, 0x0dd5, 0xa0a4, 0x9420,
-	0xa0a8, 0x9319, 0x0804, 0x228c, 0xa1bc, 0x2400, 0x9122, 0xa1c0,
+	0xa8b0, 0xa84a, 0xa804, 0xa85a, 0x2040, 0xa064, 0x9084, 0x000f,
+	0x9080, 0x20ce, 0x2005, 0xa812, 0xa988, 0x0448, 0x918c, 0x00ff,
+	0x9186, 0x0015, 0x1540, 0xa87c, 0xd0b4, 0x0904, 0x1ead, 0xa804,
+	0xa85a, 0x2040, 0xa064, 0x9084, 0x000f, 0x9080, 0x20ce, 0x2005,
+	0xa812, 0xa988, 0x9006, 0xa842, 0xa83e, 0x0088, 0xa87c, 0xd0b4,
+	0x0904, 0x1ead, 0xa988, 0x9006, 0xa842, 0xa83e, 0x2900, 0xa85a,
+	0xa864, 0x9084, 0x000f, 0x9080, 0x20ce, 0x2005, 0xa812, 0xa916,
+	0xa87c, 0xc0dd, 0xa87e, 0x0005, 0x00f6, 0x2079, 0x0090, 0x782c,
+	0xd0fc, 0x190c, 0x1ef2, 0x00e6, 0x2071, 0x1a65, 0x7000, 0x9005,
+	0x1904, 0x1cec, 0x7206, 0x9280, 0x0005, 0x204c, 0x9280, 0x0004,
+	0x2004, 0x782b, 0x0004, 0x00f6, 0x2079, 0x0200, 0x7803, 0x0040,
+	0x00fe, 0x00b6, 0x2058, 0xb86c, 0x7836, 0xb890, 0x00be, 0x00f6,
+	0x2079, 0x0200, 0x7803, 0x0040, 0xa001, 0xa001, 0xa001, 0xa001,
+	0xa001, 0xa001, 0x781a, 0x2079, 0x0100, 0x8004, 0x78d6, 0x00fe,
+	0xa814, 0x2050, 0xa858, 0x2040, 0xa810, 0x2060, 0xa064, 0x90ec,
+	0x000f, 0xa944, 0x791a, 0x7116, 0xa848, 0x781e, 0x701a, 0x9006,
+	0x700e, 0x7012, 0x7004, 0xa940, 0xa838, 0x9106, 0x1500, 0xa93c,
+	0xa834, 0x9106, 0x11e0, 0x0006, 0x0016, 0xa938, 0xa834, 0x9105,
+	0x0118, 0x001e, 0x000e, 0x0098, 0x001e, 0x000e, 0x8aff, 0x01c8,
+	0x0126, 0x2091, 0x8000, 0x2009, 0x0306, 0x200b, 0x0808, 0x00d9,
+	0x0108, 0x00c9, 0x012e, 0x9006, 0x00ee, 0x00fe, 0x0005, 0x0036,
+	0x0046, 0xab38, 0xac34, 0x080c, 0x20ee, 0x004e, 0x003e, 0x0d30,
+	0x0c98, 0x9085, 0x0001, 0x0c80, 0x2009, 0x0306, 0x200b, 0x4800,
+	0x7027, 0x0000, 0x0005, 0x0076, 0x0066, 0x0056, 0x0046, 0x0036,
+	0x0026, 0x8aff, 0x0904, 0x1ea6, 0x700c, 0x7214, 0x923a, 0x7010,
+	0x7218, 0x9203, 0x0a04, 0x1ea5, 0x9705, 0x0904, 0x1ea5, 0x903e,
+	0x2730, 0xa880, 0xd0fc, 0x1190, 0x2d00, 0x0002, 0x1e2f, 0x1d6e,
+	0x1d6e, 0x1e2f, 0x1e2f, 0x1e0c, 0x1e2f, 0x1d6e, 0x1e13, 0x1dbd,
+	0x1dbd, 0x1e2f, 0x1e2f, 0x1e2f, 0x1e06, 0x1dbd, 0xc0fc, 0xa882,
+	0xab2c, 0xaa30, 0xad1c, 0xac20, 0xdd9c, 0x0904, 0x1e3c, 0x2c05,
+	0x908a, 0x0034, 0x1a0c, 0x0dd5, 0x9082, 0x001b, 0x0002, 0x1d5a,
+	0x1d58, 0x1d58, 0x1d58, 0x1d58, 0x1d58, 0x1d5e, 0x1d58, 0x1d58,
+	0x1d58, 0x1d58, 0x1d58, 0x1d62, 0x1d58, 0x1d58, 0x1d58, 0x1d58,
+	0x1d58, 0x1d66, 0x1d58, 0x1d58, 0x1d58, 0x1d58, 0x1d58, 0x1d6a,
+	0x080c, 0x0dd5, 0xa774, 0xa678, 0x0804, 0x1e3c, 0xa78c, 0xa690,
+	0x0804, 0x1e3c, 0xa7a4, 0xa6a8, 0x0804, 0x1e3c, 0xa7bc, 0xa6c0,
+	0x0804, 0x1e3c, 0xa7d4, 0xa6d8, 0x0804, 0x1e3c, 0x2c05, 0x908a,
+	0x0036, 0x1a0c, 0x0dd5, 0x9082, 0x001b, 0x0002, 0x1d91, 0x1d91,
+	0x1d93, 0x1d91, 0x1d91, 0x1d91, 0x1d99, 0x1d91, 0x1d91, 0x1d91,
+	0x1d9f, 0x1d91, 0x1d91, 0x1d91, 0x1da5, 0x1d91, 0x1d91, 0x1d91,
+	0x1dab, 0x1d91, 0x1d91, 0x1d91, 0x1db1, 0x1d91, 0x1d91, 0x1d91,
+	0x1db7, 0x080c, 0x0dd5, 0xa574, 0xa478, 0xa37c, 0xa280, 0x0804,
+	0x1e3c, 0xa584, 0xa488, 0xa38c, 0xa290, 0x0804, 0x1e3c, 0xa594,
+	0xa498, 0xa39c, 0xa2a0, 0x0804, 0x1e3c, 0xa5a4, 0xa4a8, 0xa3ac,
+	0xa2b0, 0x0804, 0x1e3c, 0xa5b4, 0xa4b8, 0xa3bc, 0xa2c0, 0x0804,
+	0x1e3c, 0xa5c4, 0xa4c8, 0xa3cc, 0xa2d0, 0x0804, 0x1e3c, 0xa5d4,
+	0xa4d8, 0xa3dc, 0xa2e0, 0x0804, 0x1e3c, 0x2c05, 0x908a, 0x0034,
+	0x1a0c, 0x0dd5, 0x9082, 0x001b, 0x0002, 0x1de0, 0x1dde, 0x1dde,
+	0x1dde, 0x1dde, 0x1dde, 0x1de8, 0x1dde, 0x1dde, 0x1dde, 0x1dde,
+	0x1dde, 0x1df0, 0x1dde, 0x1dde, 0x1dde, 0x1dde, 0x1dde, 0x1df8,
+	0x1dde, 0x1dde, 0x1dde, 0x1dde, 0x1dde, 0x1dff, 0x080c, 0x0dd5,
+	0xa56c, 0xa470, 0xa774, 0xa678, 0xa37c, 0xa280, 0x0804, 0x1e3c,
+	0xa584, 0xa488, 0xa78c, 0xa690, 0xa394, 0xa298, 0x0804, 0x1e3c,
+	0xa59c, 0xa4a0, 0xa7a4, 0xa6a8, 0xa3ac, 0xa2b0, 0x0804, 0x1e3c,
+	0xa5b4, 0xa4b8, 0xa7bc, 0xa6c0, 0xa3c4, 0xa2c8, 0x04e8, 0xa5cc,
+	0xa4d0, 0xa7d4, 0xa6d8, 0xa3dc, 0xa2e0, 0x04b0, 0xa864, 0x9084,
+	0x00ff, 0x9086, 0x001e, 0x1518, 0x080c, 0x2086, 0x1904, 0x1d09,
+	0x900e, 0x0804, 0x1ea6, 0xab64, 0x939c, 0x00ff, 0x9386, 0x0048,
+	0x1180, 0x00c6, 0x7004, 0x2060, 0x6004, 0x9086, 0x0043, 0x00ce,
+	0x0904, 0x1dbd, 0xab9c, 0x9016, 0xad8c, 0xac90, 0xaf94, 0xae98,
+	0x0098, 0x9386, 0x0008, 0x0904, 0x1dbd, 0x080c, 0x0dd5, 0xa964,
+	0x918c, 0x00ff, 0x9186, 0x0013, 0x0904, 0x1d6e, 0x9186, 0x001b,
+	0x0904, 0x1dbd, 0x080c, 0x0dd5, 0x2009, 0x030f, 0x2104, 0xd0fc,
+	0x0530, 0x0066, 0x2009, 0x0306, 0x2104, 0x9084, 0x0030, 0x15c8,
+	0x2031, 0x1000, 0x200b, 0x4000, 0x2600, 0x9302, 0x928b, 0x0000,
+	0xa82e, 0xa932, 0x0278, 0x9105, 0x0168, 0x2011, 0x0000, 0x2618,
+	0x2600, 0x9500, 0xa81e, 0x9481, 0x0000, 0xa822, 0xa880, 0xc0fd,
+	0xa882, 0x0020, 0xa82f, 0x0000, 0xa833, 0x0000, 0x006e, 0x7b12,
+	0x7a16, 0x7d02, 0x7c06, 0x7f0a, 0x7e0e, 0x782b, 0x0001, 0x7000,
+	0x8000, 0x7002, 0xa83c, 0x9300, 0xa83e, 0xa840, 0x9201, 0xa842,
+	0x700c, 0x9300, 0x700e, 0x7010, 0x9201, 0x7012, 0x080c, 0x2086,
+	0x0428, 0x2031, 0x0080, 0x9584, 0x007f, 0x0108, 0x9632, 0x7124,
+	0x7000, 0x9086, 0x0000, 0x1198, 0xc185, 0x7126, 0x2009, 0x0306,
+	0x2104, 0xd0b4, 0x1904, 0x1e4c, 0x200b, 0x4040, 0x2009, 0x1a7f,
+	0x2104, 0x8000, 0x0a04, 0x1e4c, 0x200a, 0x0804, 0x1e4c, 0xc18d,
+	0x7126, 0xd184, 0x1d58, 0x0804, 0x1e4c, 0x9006, 0x002e, 0x003e,
+	0x004e, 0x005e, 0x006e, 0x007e, 0x0005, 0x080c, 0x0dd5, 0x0026,
+	0x2001, 0x0105, 0x2003, 0x0010, 0x782b, 0x0004, 0x7003, 0x0000,
+	0x7004, 0x0016, 0x080c, 0x1cfc, 0x001e, 0x2060, 0x6014, 0x2048,
+	0x080c, 0xcc86, 0x0118, 0xa880, 0xc0bd, 0xa882, 0x6020, 0x9086,
+	0x0006, 0x1180, 0x2061, 0x0100, 0x62c8, 0x2001, 0x00fa, 0x8001,
+	0x1df0, 0x60c8, 0x9206, 0x1dc0, 0x60c4, 0xa89a, 0x60c8, 0xa896,
+	0x7004, 0x2060, 0x00c6, 0x080c, 0xc8a5, 0x00ce, 0x2001, 0x19f5,
+	0x2004, 0x9c06, 0x1160, 0x2009, 0x0040, 0x080c, 0x2410, 0x080c,
+	0xa89b, 0x2011, 0x0000, 0x080c, 0xa72c, 0x080c, 0x9891, 0x002e,
+	0x0804, 0x2036, 0x0126, 0x2091, 0x2400, 0xa858, 0x2040, 0x792c,
+	0x782b, 0x0002, 0x9184, 0x0700, 0x1904, 0x1eaf, 0x7000, 0x0002,
+	0x2036, 0x1f04, 0x1f84, 0x2034, 0x8001, 0x7002, 0x7027, 0x0000,
+	0xd19c, 0x1158, 0x8aff, 0x0904, 0x1f51, 0x080c, 0x1d03, 0x0904,
+	0x2036, 0x080c, 0x1d03, 0x0804, 0x2036, 0x782b, 0x0004, 0xd194,
+	0x0148, 0xa880, 0xc0fc, 0xa882, 0x8aff, 0x1518, 0xa87c, 0xc0f5,
+	0xa87e, 0x00f8, 0x0026, 0x0036, 0xab3c, 0xaa40, 0x0016, 0x7910,
+	0xa82c, 0x9100, 0xa82e, 0x7914, 0xa830, 0x9101, 0xa832, 0x001e,
+	0x7810, 0x931a, 0x7814, 0x9213, 0x7800, 0xa81e, 0x7804, 0xa822,
+	0xab3e, 0xaa42, 0x003e, 0x002e, 0x080c, 0x20a1, 0xa880, 0xc0fd,
+	0xa882, 0x2a00, 0xa816, 0x2800, 0xa85a, 0x2c00, 0xa812, 0x7003,
+	0x0000, 0x2009, 0x0306, 0x200b, 0x4800, 0x7027, 0x0000, 0x0804,
+	0x2036, 0x00f6, 0x0026, 0x781c, 0x0006, 0x7818, 0x0006, 0x2079,
+	0x0100, 0x7a14, 0x9284, 0x1984, 0x9085, 0x0012, 0x7816, 0x0036,
+	0x2019, 0x1000, 0x8319, 0x090c, 0x0dd5, 0x7820, 0xd0bc, 0x1dd0,
+	0x003e, 0x79c8, 0x000e, 0x9102, 0x001e, 0x0006, 0x0016, 0x79c4,
+	0x000e, 0x9103, 0x78c6, 0x000e, 0x78ca, 0x9284, 0x1984, 0x9085,
+	0x0012, 0x7816, 0x002e, 0x00fe, 0x782b, 0x0008, 0x7003, 0x0000,
+	0x080c, 0x1cfc, 0x0804, 0x2036, 0x8001, 0x7002, 0x7024, 0x8004,
+	0x7026, 0xd194, 0x0170, 0x782c, 0xd0fc, 0x1904, 0x1ef7, 0xd19c,
+	0x1904, 0x2032, 0x8aff, 0x0904, 0x2036, 0x080c, 0x1d03, 0x0804,
+	0x2036, 0x0026, 0x0036, 0xab3c, 0xaa40, 0x080c, 0x20a1, 0xdd9c,
+	0x1904, 0x1ff1, 0x2c05, 0x908a, 0x0036, 0x1a0c, 0x0dd5, 0x9082,
+	0x001b, 0x0002, 0x1fc5, 0x1fc5, 0x1fc7, 0x1fc5, 0x1fc5, 0x1fc5,
+	0x1fcd, 0x1fc5, 0x1fc5, 0x1fc5, 0x1fd3, 0x1fc5, 0x1fc5, 0x1fc5,
+	0x1fd9, 0x1fc5, 0x1fc5, 0x1fc5, 0x1fdf, 0x1fc5, 0x1fc5, 0x1fc5,
+	0x1fe5, 0x1fc5, 0x1fc5, 0x1fc5, 0x1feb, 0x080c, 0x0dd5, 0xa07c,
+	0x931a, 0xa080, 0x9213, 0x0804, 0x1f26, 0xa08c, 0x931a, 0xa090,
+	0x9213, 0x0804, 0x1f26, 0xa09c, 0x931a, 0xa0a0, 0x9213, 0x0804,
+	0x1f26, 0xa0ac, 0x931a, 0xa0b0, 0x9213, 0x0804, 0x1f26, 0xa0bc,
+	0x931a, 0xa0c0, 0x9213, 0x0804, 0x1f26, 0xa0cc, 0x931a, 0xa0d0,
+	0x9213, 0x0804, 0x1f26, 0xa0dc, 0x931a, 0xa0e0, 0x9213, 0x0804,
+	0x1f26, 0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0dd5, 0x9082, 0x001b,
+	0x0002, 0x2014, 0x2012, 0x2012, 0x2012, 0x2012, 0x2012, 0x201a,
+	0x2012, 0x2012, 0x2012, 0x2012, 0x2012, 0x2020, 0x2012, 0x2012,
+	0x2012, 0x2012, 0x2012, 0x2026, 0x2012, 0x2012, 0x2012, 0x2012,
+	0x2012, 0x202c, 0x080c, 0x0dd5, 0xa07c, 0x931a, 0xa080, 0x9213,
+	0x0804, 0x1f26, 0xa094, 0x931a, 0xa098, 0x9213, 0x0804, 0x1f26,
+	0xa0ac, 0x931a, 0xa0b0, 0x9213, 0x0804, 0x1f26, 0xa0c4, 0x931a,
+	0xa0c8, 0x9213, 0x0804, 0x1f26, 0xa0dc, 0x931a, 0xa0e0, 0x9213,
+	0x0804, 0x1f26, 0x0804, 0x1f22, 0x080c, 0x0dd5, 0x012e, 0x0005,
+	0x00f6, 0x00e6, 0x2071, 0x1a65, 0x7000, 0x9086, 0x0000, 0x0904,
+	0x2081, 0x2079, 0x0090, 0x2009, 0x0207, 0x210c, 0xd194, 0x01b8,
+	0x2009, 0x020c, 0x210c, 0x9184, 0x0003, 0x0188, 0x080c, 0xeb9a,
+	0x2001, 0x0133, 0x2004, 0x9005, 0x090c, 0x0dd5, 0x0016, 0x2009,
+	0x0040, 0x080c, 0x2410, 0x001e, 0x2001, 0x020c, 0x2102, 0x2009,
+	0x0206, 0x2104, 0x2009, 0x0203, 0x210c, 0x9106, 0x1120, 0x2009,
+	0x0040, 0x080c, 0x2410, 0x782c, 0xd0fc, 0x09a8, 0x080c, 0x1ef2,
+	0x7000, 0x9086, 0x0000, 0x1978, 0x782b, 0x0004, 0x782c, 0xd0ac,
+	0x1de8, 0x2009, 0x0040, 0x080c, 0x2410, 0x782b, 0x0002, 0x7003,
+	0x0000, 0x080c, 0x1cfc, 0x00ee, 0x00fe, 0x0005, 0xa880, 0xd0fc,
+	0x11a8, 0x8c60, 0x2c05, 0x9005, 0x0110, 0x8a51, 0x0005, 0xa004,
+	0x9005, 0x0168, 0xa85a, 0x2040, 0xa064, 0x9084, 0x000f, 0x9080,
+	0x20ce, 0x2065, 0x8cff, 0x090c, 0x0dd5, 0x8a51, 0x0005, 0x2050,
+	0x0005, 0xa880, 0xd0fc, 0x11b8, 0x8a50, 0x8c61, 0x2c05, 0x9005,
+	0x1190, 0x2800, 0x9906, 0x0120, 0xa000, 0x9005, 0x1108, 0x2900,
+	0x2040, 0xa85a, 0xa064, 0x9084, 0x000f, 0x9080, 0x20de, 0x2065,
+	0x8cff, 0x090c, 0x0dd5, 0x0005, 0x0000, 0x001d, 0x0021, 0x0025,
+	0x0029, 0x002d, 0x0031, 0x0035, 0x0000, 0x001b, 0x0021, 0x0027,
+	0x002d, 0x0033, 0x0000, 0x0000, 0x0023, 0x0000, 0x0000, 0x20c1,
+	0x20bd, 0x20c1, 0x20c1, 0x20cb, 0x0000, 0x20c1, 0x20c8, 0x20c8,
+	0x20c5, 0x20c8, 0x20c8, 0x0000, 0x20cb, 0x20c8, 0x0000, 0x20c3,
+	0x20c3, 0x0000, 0x20c3, 0x20cb, 0x0000, 0x20c3, 0x20c9, 0x20c9,
+	0x20c9, 0x0000, 0x20c9, 0x0000, 0x20cb, 0x20c9, 0x00c6, 0x00d6,
+	0x0086, 0xab42, 0xac3e, 0xa888, 0x9055, 0x0904, 0x22cd, 0x2940,
+	0xa064, 0x90ec, 0x000f, 0x9084, 0x00ff, 0x9086, 0x0008, 0x1118,
+	0x2061, 0x20c9, 0x00d0, 0x9de0, 0x20ce, 0x9d86, 0x0007, 0x0130,
+	0x9d86, 0x000e, 0x0118, 0x9d86, 0x000f, 0x1120, 0xa08c, 0x9422,
+	0xa090, 0x931b, 0x2c05, 0x9065, 0x1140, 0x0310, 0x0804, 0x22cd,
+	0xa004, 0x9045, 0x0904, 0x22cd, 0x08d8, 0x2c05, 0x9005, 0x0904,
+	0x21b5, 0xdd9c, 0x1904, 0x2171, 0x908a, 0x0036, 0x1a0c, 0x0dd5,
+	0x9082, 0x001b, 0x0002, 0x2146, 0x2146, 0x2148, 0x2146, 0x2146,
+	0x2146, 0x214e, 0x2146, 0x2146, 0x2146, 0x2154, 0x2146, 0x2146,
+	0x2146, 0x215a, 0x2146, 0x2146, 0x2146, 0x2160, 0x2146, 0x2146,
+	0x2146, 0x2166, 0x2146, 0x2146, 0x2146, 0x216c, 0x080c, 0x0dd5,
+	0xa07c, 0x9422, 0xa080, 0x931b, 0x0804, 0x21ab, 0xa08c, 0x9422,
+	0xa090, 0x931b, 0x0804, 0x21ab, 0xa09c, 0x9422, 0xa0a0, 0x931b,
+	0x0804, 0x21ab, 0xa0ac, 0x9422, 0xa0b0, 0x931b, 0x0804, 0x21ab,
+	0xa0bc, 0x9422, 0xa0c0, 0x931b, 0x0804, 0x21ab, 0xa0cc, 0x9422,
+	0xa0d0, 0x931b, 0x0804, 0x21ab, 0xa0dc, 0x9422, 0xa0e0, 0x931b,
+	0x04d0, 0x908a, 0x0034, 0x1a0c, 0x0dd5, 0x9082, 0x001b, 0x0002,
+	0x2193, 0x2191, 0x2191, 0x2191, 0x2191, 0x2191, 0x2198, 0x2191,
+	0x2191, 0x2191, 0x2191, 0x2191, 0x219d, 0x2191, 0x2191, 0x2191,
+	0x2191, 0x2191, 0x21a2, 0x2191, 0x2191, 0x2191, 0x2191, 0x2191,
+	0x21a7, 0x080c, 0x0dd5, 0xa07c, 0x9422, 0xa080, 0x931b, 0x0098,
+	0xa094, 0x9422, 0xa098, 0x931b, 0x0070, 0xa0ac, 0x9422, 0xa0b0,
+	0x931b, 0x0048, 0xa0c4, 0x9422, 0xa0c8, 0x931b, 0x0020, 0xa0dc,
+	0x9422, 0xa0e0, 0x931b, 0x0630, 0x2300, 0x9405, 0x0160, 0x8a51,
+	0x0904, 0x22cd, 0x8c60, 0x0804, 0x211d, 0xa004, 0x9045, 0x0904,
+	0x22cd, 0x0804, 0x20f8, 0x8a51, 0x0904, 0x22cd, 0x8c60, 0x2c05,
+	0x9005, 0x1158, 0xa004, 0x9045, 0x0904, 0x22cd, 0xa064, 0x90ec,
+	0x000f, 0x9de0, 0x20ce, 0x2c05, 0x2060, 0xa880, 0xc0fc, 0xa882,
+	0x0804, 0x22c2, 0x2c05, 0x8422, 0x8420, 0x831a, 0x9399, 0x0000,
+	0xac2e, 0xab32, 0xdd9c, 0x1904, 0x225f, 0x9082, 0x001b, 0x0002,
+	0x21fb, 0x21fb, 0x21fd, 0x21fb, 0x21fb, 0x21fb, 0x220b, 0x21fb,
+	0x21fb, 0x21fb, 0x2219, 0x21fb, 0x21fb, 0x21fb, 0x2227, 0x21fb,
+	0x21fb, 0x21fb, 0x2235, 0x21fb, 0x21fb, 0x21fb, 0x2243, 0x21fb,
+	0x21fb, 0x21fb, 0x2251, 0x080c, 0x0dd5, 0xa17c, 0x2400, 0x9122,
+	0xa180, 0x2300, 0x911b, 0x0a0c, 0x0dd5, 0xa074, 0x9420, 0xa078,
+	0x9319, 0x0804, 0x22bd, 0xa18c, 0x2400, 0x9122, 0xa190, 0x2300,
+	0x911b, 0x0a0c, 0x0dd5, 0xa084, 0x9420, 0xa088, 0x9319, 0x0804,
+	0x22bd, 0xa19c, 0x2400, 0x9122, 0xa1a0, 0x2300, 0x911b, 0x0a0c,
+	0x0dd5, 0xa094, 0x9420, 0xa098, 0x9319, 0x0804, 0x22bd, 0xa1ac,
+	0x2400, 0x9122, 0xa1b0, 0x2300, 0x911b, 0x0a0c, 0x0dd5, 0xa0a4,
+	0x9420, 0xa0a8, 0x9319, 0x0804, 0x22bd, 0xa1bc, 0x2400, 0x9122,
+	0xa1c0, 0x2300, 0x911b, 0x0a0c, 0x0dd5, 0xa0b4, 0x9420, 0xa0b8,
+	0x9319, 0x0804, 0x22bd, 0xa1cc, 0x2400, 0x9122, 0xa1d0, 0x2300,
+	0x911b, 0x0a0c, 0x0dd5, 0xa0c4, 0x9420, 0xa0c8, 0x9319, 0x0804,
+	0x22bd, 0xa1dc, 0x2400, 0x9122, 0xa1e0, 0x2300, 0x911b, 0x0a0c,
+	0x0dd5, 0xa0d4, 0x9420, 0xa0d8, 0x9319, 0x0804, 0x22bd, 0x9082,
+	0x001b, 0x0002, 0x227d, 0x227b, 0x227b, 0x227b, 0x227b, 0x227b,
+	0x228a, 0x227b, 0x227b, 0x227b, 0x227b, 0x227b, 0x2297, 0x227b,
+	0x227b, 0x227b, 0x227b, 0x227b, 0x22a4, 0x227b, 0x227b, 0x227b,
+	0x227b, 0x227b, 0x22b1, 0x080c, 0x0dd5, 0xa17c, 0x2400, 0x9122,
+	0xa180, 0x2300, 0x911b, 0x0a0c, 0x0dd5, 0xa06c, 0x9420, 0xa070,
+	0x9319, 0x0498, 0xa194, 0x2400, 0x9122, 0xa198, 0x2300, 0x911b,
+	0x0a0c, 0x0dd5, 0xa084, 0x9420, 0xa088, 0x9319, 0x0430, 0xa1ac,
+	0x2400, 0x9122, 0xa1b0, 0x2300, 0x911b, 0x0a0c, 0x0dd5, 0xa09c,
+	0x9420, 0xa0a0, 0x9319, 0x00c8, 0xa1c4, 0x2400, 0x9122, 0xa1c8,
 	0x2300, 0x911b, 0x0a0c, 0x0dd5, 0xa0b4, 0x9420, 0xa0b8, 0x9319,
-	0x0804, 0x228c, 0xa1cc, 0x2400, 0x9122, 0xa1d0, 0x2300, 0x911b,
-	0x0a0c, 0x0dd5, 0xa0c4, 0x9420, 0xa0c8, 0x9319, 0x0804, 0x228c,
-	0xa1dc, 0x2400, 0x9122, 0xa1e0, 0x2300, 0x911b, 0x0a0c, 0x0dd5,
-	0xa0d4, 0x9420, 0xa0d8, 0x9319, 0x0804, 0x228c, 0x9082, 0x001b,
-	0x0002, 0x224c, 0x224a, 0x224a, 0x224a, 0x224a, 0x224a, 0x2259,
-	0x224a, 0x224a, 0x224a, 0x224a, 0x224a, 0x2266, 0x224a, 0x224a,
-	0x224a, 0x224a, 0x224a, 0x2273, 0x224a, 0x224a, 0x224a, 0x224a,
-	0x224a, 0x2280, 0x080c, 0x0dd5, 0xa17c, 0x2400, 0x9122, 0xa180,
-	0x2300, 0x911b, 0x0a0c, 0x0dd5, 0xa06c, 0x9420, 0xa070, 0x9319,
-	0x0498, 0xa194, 0x2400, 0x9122, 0xa198, 0x2300, 0x911b, 0x0a0c,
-	0x0dd5, 0xa084, 0x9420, 0xa088, 0x9319, 0x0430, 0xa1ac, 0x2400,
-	0x9122, 0xa1b0, 0x2300, 0x911b, 0x0a0c, 0x0dd5, 0xa09c, 0x9420,
-	0xa0a0, 0x9319, 0x00c8, 0xa1c4, 0x2400, 0x9122, 0xa1c8, 0x2300,
-	0x911b, 0x0a0c, 0x0dd5, 0xa0b4, 0x9420, 0xa0b8, 0x9319, 0x0060,
-	0xa1dc, 0x2400, 0x9122, 0xa1e0, 0x2300, 0x911b, 0x0a0c, 0x0dd5,
-	0xa0cc, 0x9420, 0xa0d0, 0x9319, 0xac1e, 0xab22, 0xa880, 0xc0fd,
-	0xa882, 0x2800, 0xa85a, 0x2c00, 0xa812, 0x2a00, 0xa816, 0x000e,
-	0x000e, 0x000e, 0x9006, 0x0028, 0x008e, 0x00de, 0x00ce, 0x9085,
-	0x0001, 0x0005, 0x2001, 0x0005, 0x2004, 0xd0bc, 0x190c, 0x0dce,
-	0x9084, 0x0007, 0x0002, 0x22bd, 0x1ec1, 0x22bd, 0x22b3, 0x22b6,
-	0x22b9, 0x22b6, 0x22b9, 0x080c, 0x1ec1, 0x0005, 0x080c, 0x11a3,
-	0x0005, 0x080c, 0x1ec1, 0x080c, 0x11a3, 0x0005, 0x0126, 0x2091,
-	0x2600, 0x2079, 0x0200, 0x2071, 0x0260, 0x2069, 0x1800, 0x7817,
-	0x0000, 0x789b, 0x0814, 0x78a3, 0x0406, 0x789f, 0x0410, 0x2009,
-	0x013b, 0x200b, 0x0400, 0x781b, 0x0002, 0x783b, 0x001f, 0x7837,
-	0x0020, 0x7803, 0x1600, 0x012e, 0x0005, 0x2091, 0x2600, 0x781c,
-	0xd0a4, 0x190c, 0x23dc, 0x7900, 0xd1dc, 0x1118, 0x9084, 0x0006,
-	0x001a, 0x9084, 0x000e, 0x0002, 0x2304, 0x22fc, 0x7d93, 0x22fc,
-	0x22fe, 0x22fe, 0x22fe, 0x22fe, 0x7d79, 0x22fc, 0x2300, 0x22fc,
-	0x22fe, 0x22fc, 0x22fe, 0x22fc, 0x080c, 0x0dd5, 0x0031, 0x0020,
-	0x080c, 0x7d79, 0x080c, 0x7d93, 0x0005, 0x0006, 0x0016, 0x0026,
-	0x080c, 0xea45, 0x7930, 0x9184, 0x0003, 0x01c0, 0x2001, 0x19f5,
-	0x2004, 0x9005, 0x0170, 0x2001, 0x0133, 0x2004, 0x9005, 0x090c,
-	0x0dd5, 0x00c6, 0x2001, 0x19f5, 0x2064, 0x080c, 0xc77b, 0x00ce,
-	0x00f8, 0x2009, 0x0040, 0x080c, 0x23df, 0x00d0, 0x9184, 0x0014,
-	0x01a0, 0x6a00, 0x9286, 0x0003, 0x0160, 0x080c, 0x73b3, 0x1138,
-	0x080c, 0x7699, 0x080c, 0x602d, 0x080c, 0x72e5, 0x0010, 0x080c,
-	0x5eec, 0x080c, 0x7e42, 0x0041, 0x0018, 0x9184, 0x9540, 0x1dc8,
-	0x002e, 0x001e, 0x000e, 0x0005, 0x00e6, 0x0036, 0x0046, 0x0056,
-	0x2071, 0x1a61, 0x080c, 0x1abb, 0x005e, 0x004e, 0x003e, 0x00ee,
-	0x0005, 0x0126, 0x2091, 0x2e00, 0x2071, 0x1800, 0x7128, 0x2001,
-	0x196e, 0x2102, 0x2001, 0x1976, 0x2102, 0x2001, 0x013b, 0x2102,
-	0x2079, 0x0200, 0x2001, 0x0201, 0x789e, 0x78a3, 0x0200, 0x9198,
-	0x0007, 0x831c, 0x831c, 0x831c, 0x9398, 0x0005, 0x2320, 0x9182,
-	0x0204, 0x1230, 0x2011, 0x0008, 0x8423, 0x8423, 0x8423, 0x0488,
-	0x9182, 0x024c, 0x1240, 0x2011, 0x0007, 0x8403, 0x8003, 0x9400,
-	0x9400, 0x9420, 0x0430, 0x9182, 0x02bc, 0x1238, 0x2011, 0x0006,
-	0x8403, 0x8003, 0x9400, 0x9420, 0x00e0, 0x9182, 0x034c, 0x1230,
-	0x2011, 0x0005, 0x8403, 0x8003, 0x9420, 0x0098, 0x9182, 0x042c,
-	0x1228, 0x2011, 0x0004, 0x8423, 0x8423, 0x0058, 0x9182, 0x059c,
-	0x1228, 0x2011, 0x0003, 0x8403, 0x9420, 0x0018, 0x2011, 0x0002,
-	0x8423, 0x9482, 0x0228, 0x8002, 0x8020, 0x8301, 0x9402, 0x0110,
-	0x0208, 0x8321, 0x8217, 0x8203, 0x9405, 0x789a, 0x012e, 0x0005,
-	0x0006, 0x00d6, 0x2069, 0x0200, 0x6814, 0x9084, 0xffc0, 0x910d,
-	0x6916, 0x00de, 0x000e, 0x0005, 0x00d6, 0x2069, 0x0200, 0x9005,
-	0x6810, 0x0110, 0xc0a5, 0x0008, 0xc0a4, 0x6812, 0x00de, 0x0005,
-	0x0006, 0x00d6, 0x2069, 0x0200, 0x6810, 0x9084, 0xfff8, 0x910d,
-	0x6912, 0x00de, 0x000e, 0x0005, 0x7938, 0x080c, 0x0dce, 0x00f6,
-	0x2079, 0x0200, 0x7902, 0xa001, 0xa001, 0xa001, 0xa001, 0xa001,
-	0xa001, 0x7902, 0xa001, 0xa001, 0xa001, 0xa001, 0xa001, 0xa001,
-	0x00fe, 0x0005, 0x0126, 0x2091, 0x2800, 0x2061, 0x0100, 0x2071,
-	0x1800, 0x2009, 0x0000, 0x080c, 0x2c4b, 0x080c, 0x2b66, 0x6054,
-	0x8004, 0x8004, 0x8004, 0x8004, 0x9084, 0x000c, 0x6150, 0x918c,
-	0xfff3, 0x9105, 0x6052, 0x6050, 0x9084, 0xb17f, 0x9085, 0x2000,
-	0x6052, 0x2009, 0x199c, 0x2011, 0x199d, 0x6358, 0x939c, 0x38f0,
-	0x2320, 0x080c, 0x2baa, 0x1238, 0x939d, 0x4003, 0x94a5, 0x8603,
-	0x230a, 0x2412, 0x0030, 0x939d, 0x0203, 0x94a5, 0x8603, 0x230a,
-	0x2412, 0x9006, 0x080c, 0x2b95, 0x9006, 0x080c, 0x2b78, 0x20a9,
-	0x0012, 0x1d04, 0x2431, 0x2091, 0x6000, 0x1f04, 0x2431, 0x602f,
-	0x0100, 0x602f, 0x0000, 0x6050, 0x9085, 0x0400, 0x9084, 0xdfff,
-	0x6052, 0x6024, 0x6026, 0x080c, 0x2884, 0x2009, 0x00ef, 0x6132,
-	0x6136, 0x080c, 0x2894, 0x60e7, 0x0000, 0x61ea, 0x60e3, 0x0008,
-	0x604b, 0xf7f7, 0x6043, 0x0000, 0x602f, 0x0080, 0x602f, 0x0000,
-	0x6007, 0x349f, 0x60bb, 0x0000, 0x20a9, 0x0018, 0x60bf, 0x0000,
-	0x1f04, 0x245e, 0x60bb, 0x0000, 0x60bf, 0x0108, 0x60bf, 0x0012,
-	0x60bf, 0x0405, 0x60bf, 0x0014, 0x60bf, 0x0320, 0x60bf, 0x0018,
-	0x601b, 0x00f0, 0x601f, 0x001e, 0x600f, 0x006b, 0x602b, 0x402f,
-	0x012e, 0x0005, 0x00f6, 0x2079, 0x0140, 0x78c3, 0x0080, 0x78c3,
-	0x0083, 0x78c3, 0x0000, 0x00fe, 0x0005, 0x2001, 0x1835, 0x2003,
-	0x0000, 0x2001, 0x1834, 0x2003, 0x0001, 0x0005, 0x0126, 0x2091,
-	0x2800, 0x0006, 0x0016, 0x0026, 0x6124, 0x0066, 0x2031, 0x1837,
-	0x2634, 0x96b4, 0x0028, 0x006e, 0x1138, 0x6020, 0xd1bc, 0x0120,
-	0xd0bc, 0x1168, 0xd0b4, 0x1198, 0x9184, 0x5e2c, 0x1118, 0x9184,
-	0x0007, 0x00aa, 0x9195, 0x0004, 0x9284, 0x0007, 0x0082, 0x0016,
-	0x2001, 0x188b, 0x200c, 0xd184, 0x001e, 0x0d70, 0x0c98, 0x0016,
-	0x2001, 0x188b, 0x200c, 0xd194, 0x001e, 0x0d30, 0x0c58, 0x24e1,
-	0x24c7, 0x24ca, 0x24cd, 0x24d2, 0x24d4, 0x24d8, 0x24dc, 0x080c,
-	0x8fdd, 0x00b8, 0x080c, 0x90aa, 0x00a0, 0x080c, 0x90aa, 0x080c,
-	0x8fdd, 0x0078, 0x0099, 0x0068, 0x080c, 0x8fdd, 0x0079, 0x0048,
-	0x080c, 0x90aa, 0x0059, 0x0028, 0x080c, 0x90aa, 0x080c, 0x8fdd,
-	0x0029, 0x002e, 0x001e, 0x000e, 0x012e, 0x0005, 0x00a6, 0x6124,
-	0x6028, 0xd09c, 0x0118, 0xd19c, 0x1904, 0x2749, 0xd1f4, 0x190c,
-	0x0dce, 0x080c, 0x73b3, 0x0904, 0x253c, 0x080c, 0xd25a, 0x1120,
-	0x7000, 0x9086, 0x0003, 0x0570, 0x6024, 0x9084, 0x1800, 0x0550,
-	0x080c, 0x73d6, 0x0118, 0x080c, 0x73c4, 0x1520, 0x6027, 0x0020,
-	0x6043, 0x0000, 0x080c, 0xd25a, 0x0168, 0x080c, 0x73d6, 0x1150,
-	0x2001, 0x19a6, 0x2003, 0x0001, 0x6027, 0x1800, 0x080c, 0x7249,
-	0x0804, 0x274c, 0x70a4, 0x9005, 0x1150, 0x70a7, 0x0001, 0x00d6,
-	0x2069, 0x0140, 0x080c, 0x740a, 0x00de, 0x1904, 0x274c, 0x080c,
-	0x76a3, 0x0428, 0x080c, 0x73d6, 0x1590, 0x6024, 0x9084, 0x1800,
-	0x1108, 0x0468, 0x080c, 0x76a3, 0x080c, 0x7699, 0x080c, 0x602d,
-	0x080c, 0x72e5, 0x0804, 0x2749, 0xd1ac, 0x1508, 0x6024, 0xd0dc,
-	0x1170, 0xd0e4, 0x1178, 0xd0d4, 0x1190, 0xd0cc, 0x0130, 0x7098,
-	0x9086, 0x0028, 0x1110, 0x080c, 0x7586, 0x0804, 0x2749, 0x080c,
-	0x769e, 0x0048, 0x2001, 0x197c, 0x2003, 0x0002, 0x0020, 0x080c,
-	0x74eb, 0x0804, 0x2749, 0x080c, 0x7621, 0x0804, 0x2749, 0x6220,
-	0xd1bc, 0x0138, 0xd2bc, 0x1904, 0x27bc, 0xd2b4, 0x1904, 0x27cf,
-	0x0000, 0xd1ac, 0x0904, 0x265e, 0x0036, 0x6328, 0xc3bc, 0x632a,
-	0x003e, 0x080c, 0x73b3, 0x11c0, 0x6027, 0x0020, 0x0006, 0x0026,
-	0x0036, 0x080c, 0x73cd, 0x1158, 0x080c, 0x7699, 0x080c, 0x602d,
-	0x080c, 0x72e5, 0x003e, 0x002e, 0x000e, 0x00ae, 0x0005, 0x003e,
-	0x002e, 0x000e, 0x080c, 0x738b, 0x0016, 0x0046, 0x00c6, 0x644c,
-	0x9486, 0xf0f0, 0x1138, 0x2061, 0x0100, 0x644a, 0x6043, 0x0090,
-	0x6043, 0x0010, 0x74da, 0x948c, 0xff00, 0x7038, 0xd084, 0x0178,
-	0x9186, 0xf800, 0x1160, 0x7048, 0xd084, 0x1148, 0xc085, 0x704a,
-	0x0036, 0x2418, 0x2011, 0x8016, 0x080c, 0x4b1e, 0x003e, 0x080c,
-	0xd253, 0x1904, 0x263b, 0x9196, 0xff00, 0x05a8, 0x7060, 0x9084,
-	0x00ff, 0x810f, 0x81ff, 0x0110, 0x9116, 0x0568, 0x7130, 0xd184,
-	0x1550, 0x080c, 0x3326, 0x0128, 0xc18d, 0x7132, 0x080c, 0x6981,
-	0x1510, 0x6240, 0x9294, 0x0010, 0x0130, 0x6248, 0x9294, 0xff00,
-	0x9296, 0xff00, 0x01c0, 0x7030, 0xd08c, 0x0904, 0x263b, 0x7038,
-	0xd08c, 0x1140, 0x2001, 0x180c, 0x200c, 0xd1ac, 0x1904, 0x263b,
-	0xc1ad, 0x2102, 0x0036, 0x73d8, 0x2011, 0x8013, 0x080c, 0x4b1e,
-	0x003e, 0x0804, 0x263b, 0x7038, 0xd08c, 0x1140, 0x2001, 0x180c,
-	0x200c, 0xd1ac, 0x1904, 0x263b, 0xc1ad, 0x2102, 0x0036, 0x73d8,
-	0x2011, 0x8013, 0x080c, 0x4b1e, 0x003e, 0x7130, 0xc185, 0x7132,
-	0x2011, 0x1848, 0x220c, 0xd1a4, 0x01f0, 0x0016, 0x2009, 0x0001,
-	0x2011, 0x0100, 0x080c, 0x86e3, 0x2019, 0x000e, 0x00c6, 0x2061,
-	0x0000, 0x080c, 0xe55d, 0x00ce, 0x9484, 0x00ff, 0x9080, 0x3332,
-	0x200d, 0x918c, 0xff00, 0x810f, 0x2120, 0x9006, 0x2009, 0x000e,
-	0x080c, 0xe5e9, 0x001e, 0x0016, 0x2009, 0x0002, 0x2019, 0x0004,
-	0x080c, 0x3197, 0x001e, 0x0078, 0x0156, 0x00b6, 0x20a9, 0x007f,
-	0x900e, 0x080c, 0x6616, 0x1110, 0x080c, 0x6047, 0x8108, 0x1f04,
-	0x2631, 0x00be, 0x015e, 0x00ce, 0x004e, 0x080c, 0xadd0, 0x60e3,
-	0x0000, 0x001e, 0x2001, 0x1800, 0x2014, 0x9296, 0x0004, 0x1170,
-	0xd19c, 0x11a0, 0x2011, 0x180c, 0x2214, 0xd29c, 0x1120, 0x6204,
-	0x9295, 0x0002, 0x6206, 0x6228, 0xc29d, 0x622a, 0x2003, 0x0001,
-	0x2001, 0x1826, 0x2003, 0x0000, 0x6027, 0x0020, 0xd194, 0x0904,
-	0x2749, 0x0016, 0x6220, 0xd2b4, 0x0904, 0x26e6, 0x080c, 0x857f,
-	0x080c, 0xa28f, 0x6027, 0x0004, 0x00f6, 0x2019, 0x19ef, 0x2304,
-	0x907d, 0x0904, 0x26b5, 0x7804, 0x9086, 0x0032, 0x15f0, 0x00d6,
-	0x00c6, 0x00e6, 0x0096, 0x2069, 0x0140, 0x782c, 0x685e, 0x7808,
-	0x685a, 0x6043, 0x0002, 0x2001, 0x0003, 0x8001, 0x1df0, 0x6043,
-	0x0000, 0x2001, 0x003c, 0x8001, 0x1df0, 0x080c, 0x2d0c, 0x2001,
-	0x001e, 0x8001, 0x0240, 0x20a9, 0x0009, 0x080c, 0x2c26, 0x6904,
-	0xd1dc, 0x1140, 0x0cb0, 0x2001, 0x0100, 0x080c, 0x2cfc, 0x9006,
-	0x080c, 0x2cfc, 0x080c, 0x959a, 0x080c, 0x96a6, 0x7814, 0x2048,
-	0xa867, 0x0103, 0x2f60, 0x080c, 0xae5f, 0x009e, 0x00ee, 0x00ce,
-	0x00de, 0x00fe, 0x001e, 0x00ae, 0x0005, 0x00fe, 0x00d6, 0x2069,
-	0x0140, 0x6804, 0x9084, 0x4000, 0x0110, 0x080c, 0x2d0c, 0x00de,
-	0x00c6, 0x2061, 0x19e6, 0x6028, 0x080c, 0xd25a, 0x0120, 0x909a,
-	0x0003, 0x1258, 0x0018, 0x909a, 0x00c8, 0x1238, 0x8000, 0x602a,
-	0x00ce, 0x080c, 0xa26b, 0x0804, 0x2748, 0x2061, 0x0100, 0x62c0,
-	0x080c, 0xac56, 0x2019, 0x19ef, 0x2304, 0x9065, 0x0120, 0x2009,
-	0x0027, 0x080c, 0xaeda, 0x00ce, 0x0804, 0x2748, 0xd2bc, 0x0904,
-	0x272f, 0x080c, 0x858c, 0x6014, 0x9084, 0x1984, 0x9085, 0x0010,
-	0x6016, 0x6027, 0x0004, 0x00d6, 0x2069, 0x0140, 0x6804, 0x9084,
-	0x4000, 0x0110, 0x080c, 0x2d0c, 0x00de, 0x00c6, 0x2061, 0x19e6,
-	0x6044, 0x080c, 0xd25a, 0x0120, 0x909a, 0x0003, 0x1658, 0x0018,
-	0x909a, 0x00c8, 0x1638, 0x8000, 0x6046, 0x603c, 0x00ce, 0x9005,
-	0x05b8, 0x2009, 0x07d0, 0x080c, 0x8584, 0x9080, 0x0008, 0x2004,
-	0x9086, 0x0006, 0x1138, 0x6114, 0x918c, 0x1984, 0x918d, 0x0012,
-	0x6116, 0x0430, 0x9080, 0x0008, 0x2004, 0x9086, 0x0009, 0x0d98,
-	0x6114, 0x918c, 0x1984, 0x918d, 0x0016, 0x6116, 0x00c8, 0x6027,
-	0x0004, 0x00b0, 0x0036, 0x2019, 0x0001, 0x080c, 0xa5c8, 0x003e,
-	0x2019, 0x19f5, 0x2304, 0x9065, 0x0150, 0x2009, 0x004f, 0x6020,
-	0x9086, 0x0009, 0x1110, 0x2009, 0x004f, 0x080c, 0xaeda, 0x00ce,
-	0x001e, 0xd19c, 0x0904, 0x27b7, 0x7038, 0xd0ac, 0x1904, 0x2790,
-	0x0016, 0x0156, 0x6027, 0x0008, 0x6050, 0x9085, 0x0040, 0x6052,
-	0x6050, 0x9084, 0xfbcf, 0x6052, 0x080c, 0x2c45, 0x9085, 0x2000,
-	0x6052, 0x20a9, 0x0012, 0x1d04, 0x2763, 0x080c, 0x85b3, 0x1f04,
-	0x2763, 0x6050, 0x9085, 0x0400, 0x9084, 0xdfbf, 0x6052, 0x20a9,
-	0x0028, 0xa001, 0x1f04, 0x2771, 0x6150, 0x9185, 0x1400, 0x6052,
-	0x20a9, 0x0366, 0x1d04, 0x277a, 0x080c, 0x85b3, 0x6020, 0xd09c,
-	0x1130, 0x015e, 0x6152, 0x001e, 0x6027, 0x0008, 0x0480, 0x080c,
-	0x2c0d, 0x1f04, 0x277a, 0x015e, 0x6152, 0x001e, 0x6027, 0x0008,
-	0x0016, 0x6028, 0xc09c, 0x602a, 0x080c, 0xadd0, 0x60e3, 0x0000,
-	0x080c, 0xea24, 0x080c, 0xea3f, 0x080c, 0x56e6, 0xd0fc, 0x1138,
-	0x080c, 0xd253, 0x1120, 0x9085, 0x0001, 0x080c, 0x73fa, 0x9006,
-	0x080c, 0x2cfc, 0x2009, 0x0002, 0x080c, 0x2c4b, 0x2001, 0x1800,
-	0x2003, 0x0004, 0x6027, 0x0008, 0x080c, 0x0bae, 0x001e, 0x918c,
-	0xffd0, 0x6126, 0x00ae, 0x0005, 0x0016, 0x2001, 0x188b, 0x200c,
-	0xd184, 0x001e, 0x0904, 0x2569, 0x0016, 0x2009, 0x27c8, 0x00d0,
-	0x2001, 0x188b, 0x200c, 0xc184, 0x2102, 0x001e, 0x0c40, 0x0016,
-	0x2001, 0x188b, 0x200c, 0xd194, 0x001e, 0x0904, 0x2569, 0x0016,
-	0x2009, 0x27db, 0x0038, 0x2001, 0x188b, 0x200c, 0xc194, 0x2102,
-	0x001e, 0x08a8, 0x6028, 0xc0bc, 0x602a, 0x2001, 0x0156, 0x2003,
-	0xbc91, 0x8000, 0x2003, 0xffff, 0x6043, 0x0001, 0x080c, 0x2c45,
-	0x6027, 0x0080, 0x6017, 0x0000, 0x6043, 0x0000, 0x0817, 0x0006,
-	0x0016, 0x0026, 0x0036, 0x00e6, 0x00f6, 0x0126, 0x2091, 0x8000,
-	0x2071, 0x1800, 0x71d0, 0x70d2, 0x9116, 0x05e8, 0x81ff, 0x01a0,
-	0x2009, 0x0000, 0x080c, 0x2c4b, 0x2011, 0x8011, 0x2019, 0x010e,
-	0x231c, 0x939e, 0x0007, 0x1118, 0x2019, 0x0001, 0x0010, 0x2019,
-	0x0000, 0x080c, 0x4b1e, 0x0438, 0x2001, 0x19a7, 0x200c, 0x81ff,
-	0x1140, 0x2001, 0x0109, 0x2004, 0xd0b4, 0x0118, 0x2019, 0x0003,
-	0x0008, 0x2118, 0x2011, 0x8012, 0x080c, 0x4b1e, 0x080c, 0x56e6,
-	0xd0fc, 0x1188, 0x080c, 0xd253, 0x1170, 0x00c6, 0x080c, 0x28df,
-	0x080c, 0xa52f, 0x2061, 0x0100, 0x2019, 0x0028, 0x2009, 0x0002,
-	0x080c, 0x3197, 0x00ce, 0x012e, 0x00fe, 0x00ee, 0x003e, 0x002e,
-	0x001e, 0x000e, 0x0005, 0x2028, 0x918c, 0x00ff, 0x2130, 0x9094,
-	0xff00, 0x11f0, 0x2011, 0x1837, 0x2214, 0xd2ac, 0x11c8, 0x81ff,
-	0x01e8, 0x2011, 0x181f, 0x2204, 0x9106, 0x1190, 0x2011, 0x1820,
-	0x2214, 0x9294, 0xff00, 0x9584, 0xff00, 0x9206, 0x1148, 0x2011,
-	0x1820, 0x2214, 0x9294, 0x00ff, 0x9584, 0x00ff, 0x9206, 0x1120,
-	0x2500, 0x080c, 0x80b4, 0x0048, 0x9584, 0x00ff, 0x9080, 0x3332,
-	0x200d, 0x918c, 0xff00, 0x810f, 0x9006, 0x0005, 0x9080, 0x3332,
-	0x200d, 0x918c, 0x00ff, 0x0005, 0x00d6, 0x2069, 0x0140, 0x2001,
-	0x1818, 0x2003, 0x00ef, 0x20a9, 0x0010, 0x9006, 0x6852, 0x6856,
-	0x1f04, 0x288f, 0x00de, 0x0005, 0x0006, 0x00d6, 0x0026, 0x2069,
-	0x0140, 0x2001, 0x1818, 0x2102, 0x8114, 0x8214, 0x8214, 0x8214,
-	0x20a9, 0x0010, 0x6853, 0x0000, 0x9006, 0x82ff, 0x1128, 0x9184,
-	0x000f, 0x9080, 0xf1f1, 0x2005, 0x6856, 0x8211, 0x1f04, 0x28a4,
-	0x002e, 0x00de, 0x000e, 0x0005, 0x00c6, 0x2061, 0x1800, 0x6030,
-	0x0110, 0xc09d, 0x0008, 0xc09c, 0x6032, 0x00ce, 0x0005, 0x0156,
-	0x00d6, 0x0026, 0x0016, 0x0006, 0x2069, 0x0140, 0x6980, 0x9116,
-	0x0180, 0x9112, 0x1230, 0x8212, 0x8210, 0x22a8, 0x2001, 0x0402,
-	0x0018, 0x22a8, 0x2001, 0x0404, 0x680e, 0x1f04, 0x28d4, 0x680f,
-	0x0000, 0x000e, 0x001e, 0x002e, 0x00de, 0x015e, 0x0005, 0x080c,
-	0x56e2, 0xd0c4, 0x0150, 0xd0a4, 0x0140, 0x9006, 0x0046, 0x2020,
-	0x2009, 0x002e, 0x080c, 0xe5e9, 0x004e, 0x0005, 0x00f6, 0x0016,
-	0x0026, 0x2079, 0x0140, 0x78c4, 0xd0dc, 0x0904, 0x294b, 0x080c,
-	0x2baa, 0x0660, 0x9084, 0x0700, 0x908e, 0x0600, 0x1120, 0x2011,
-	0x4000, 0x900e, 0x0458, 0x908e, 0x0500, 0x1120, 0x2011, 0x8000,
-	0x900e, 0x0420, 0x908e, 0x0400, 0x1120, 0x9016, 0x2009, 0x0001,
-	0x00e8, 0x908e, 0x0300, 0x1120, 0x9016, 0x2009, 0x0002, 0x00b0,
-	0x908e, 0x0200, 0x1120, 0x9016, 0x2009, 0x0004, 0x0078, 0x908e,
-	0x0100, 0x1548, 0x9016, 0x2009, 0x0008, 0x0040, 0x9084, 0x0700,
-	0x908e, 0x0300, 0x1500, 0x2011, 0x0030, 0x0058, 0x2300, 0x9080,
-	0x0020, 0x2018, 0x080c, 0x8f70, 0x928c, 0xff00, 0x0110, 0x2011,
-	0x00ff, 0x2200, 0x8007, 0x9085, 0x004c, 0x78c2, 0x2009, 0x0138,
-	0x220a, 0x080c, 0x73b3, 0x1118, 0x2009, 0x196c, 0x220a, 0x002e,
-	0x001e, 0x00fe, 0x0005, 0x78c3, 0x0000, 0x0cc8, 0x0126, 0x2091,
-	0x2800, 0x0006, 0x0016, 0x0026, 0x2001, 0x0170, 0x200c, 0x8000,
-	0x2014, 0x9184, 0x0003, 0x0110, 0x080c, 0x0dce, 0x002e, 0x001e,
-	0x000e, 0x012e, 0x0005, 0x2001, 0x0171, 0x2004, 0xd0dc, 0x0168,
-	0x2001, 0x0170, 0x200c, 0x918c, 0x00ff, 0x918e, 0x004c, 0x1128,
-	0x200c, 0x918c, 0xff00, 0x810f, 0x0005, 0x900e, 0x2001, 0x0227,
-	0x2004, 0x8007, 0x9084, 0x00ff, 0x8004, 0x9108, 0x2001, 0x0226,
-	0x2004, 0x8007, 0x9084, 0x00ff, 0x8004, 0x9108, 0x0005, 0x0018,
-	0x000c, 0x0018, 0x0020, 0x1000, 0x0800, 0x1000, 0x1800, 0x0156,
-	0x0006, 0x0016, 0x0026, 0x00e6, 0x2001, 0x198f, 0x2004, 0x908a,
-	0x0007, 0x1a0c, 0x0dd5, 0x0033, 0x00ee, 0x002e, 0x001e, 0x000e,
-	0x015e, 0x0005, 0x29a9, 0x29c7, 0x29eb, 0x29ed, 0x2a16, 0x2a18,
-	0x2a1a, 0x2001, 0x0001, 0x080c, 0x27f7, 0x080c, 0x2c08, 0x2001,
-	0x1991, 0x2003, 0x0000, 0x7828, 0x9084, 0xe1d7, 0x782a, 0x9006,
-	0x20a9, 0x0009, 0x080c, 0x2bc6, 0x2001, 0x198f, 0x2003, 0x0006,
-	0x2009, 0x001e, 0x2011, 0x2a1b, 0x080c, 0x8591, 0x0005, 0x2009,
-	0x1994, 0x200b, 0x0000, 0x2001, 0x1999, 0x2003, 0x0036, 0x2001,
-	0x1998, 0x2003, 0x002a, 0x2001, 0x1991, 0x2003, 0x0001, 0x9006,
-	0x080c, 0x2b78, 0x2001, 0xffff, 0x20a9, 0x0009, 0x080c, 0x2bc6,
-	0x2001, 0x198f, 0x2003, 0x0006, 0x2009, 0x001e, 0x2011, 0x2a1b,
-	0x080c, 0x8591, 0x0005, 0x080c, 0x0dd5, 0x2001, 0x1999, 0x2003,
-	0x0036, 0x2001, 0x1991, 0x2003, 0x0003, 0x7a38, 0x9294, 0x0005,
+	0x0060, 0xa1dc, 0x2400, 0x9122, 0xa1e0, 0x2300, 0x911b, 0x0a0c,
+	0x0dd5, 0xa0cc, 0x9420, 0xa0d0, 0x9319, 0xac1e, 0xab22, 0xa880,
+	0xc0fd, 0xa882, 0x2800, 0xa85a, 0x2c00, 0xa812, 0x2a00, 0xa816,
+	0x000e, 0x000e, 0x000e, 0x9006, 0x0028, 0x008e, 0x00de, 0x00ce,
+	0x9085, 0x0001, 0x0005, 0x2001, 0x0005, 0x2004, 0xd0bc, 0x190c,
+	0x0dce, 0x9084, 0x0007, 0x0002, 0x22ee, 0x1ef2, 0x22ee, 0x22e4,
+	0x22e7, 0x22ea, 0x22e7, 0x22ea, 0x080c, 0x1ef2, 0x0005, 0x080c,
+	0x11a3, 0x0005, 0x080c, 0x1ef2, 0x080c, 0x11a3, 0x0005, 0x0126,
+	0x2091, 0x2600, 0x2079, 0x0200, 0x2071, 0x0260, 0x2069, 0x1800,
+	0x7817, 0x0000, 0x789b, 0x0814, 0x78a3, 0x0406, 0x789f, 0x0410,
+	0x2009, 0x013b, 0x200b, 0x0400, 0x781b, 0x0002, 0x783b, 0x001f,
+	0x7837, 0x0020, 0x7803, 0x1600, 0x012e, 0x0005, 0x2091, 0x2600,
+	0x781c, 0xd0a4, 0x190c, 0x240d, 0x7900, 0xd1dc, 0x1118, 0x9084,
+	0x0006, 0x001a, 0x9084, 0x000e, 0x0002, 0x2335, 0x232d, 0x7e1e,
+	0x232d, 0x232f, 0x232f, 0x232f, 0x232f, 0x7e04, 0x232d, 0x2331,
+	0x232d, 0x232f, 0x232d, 0x232f, 0x232d, 0x080c, 0x0dd5, 0x0031,
+	0x0020, 0x080c, 0x7e04, 0x080c, 0x7e1e, 0x0005, 0x0006, 0x0016,
+	0x0026, 0x080c, 0xeb9a, 0x7930, 0x9184, 0x0003, 0x01c0, 0x2001,
+	0x19f5, 0x2004, 0x9005, 0x0170, 0x2001, 0x0133, 0x2004, 0x9005,
+	0x090c, 0x0dd5, 0x00c6, 0x2001, 0x19f5, 0x2064, 0x080c, 0xc8a5,
+	0x00ce, 0x00f8, 0x2009, 0x0040, 0x080c, 0x2410, 0x00d0, 0x9184,
+	0x0014, 0x01a0, 0x6a00, 0x9286, 0x0003, 0x0160, 0x080c, 0x743e,
+	0x1138, 0x080c, 0x7724, 0x080c, 0x60ad, 0x080c, 0x736a, 0x0010,
+	0x080c, 0x5f6c, 0x080c, 0x7ecd, 0x0041, 0x0018, 0x9184, 0x9540,
+	0x1dc8, 0x002e, 0x001e, 0x000e, 0x0005, 0x00e6, 0x0036, 0x0046,
+	0x0056, 0x2071, 0x1a61, 0x080c, 0x1aec, 0x005e, 0x004e, 0x003e,
+	0x00ee, 0x0005, 0x0126, 0x2091, 0x2e00, 0x2071, 0x1800, 0x7128,
+	0x2001, 0x196e, 0x2102, 0x2001, 0x1976, 0x2102, 0x2001, 0x013b,
+	0x2102, 0x2079, 0x0200, 0x2001, 0x0201, 0x789e, 0x78a3, 0x0200,
+	0x9198, 0x0007, 0x831c, 0x831c, 0x831c, 0x9398, 0x0005, 0x2320,
+	0x9182, 0x0204, 0x1230, 0x2011, 0x0008, 0x8423, 0x8423, 0x8423,
+	0x0488, 0x9182, 0x024c, 0x1240, 0x2011, 0x0007, 0x8403, 0x8003,
+	0x9400, 0x9400, 0x9420, 0x0430, 0x9182, 0x02bc, 0x1238, 0x2011,
+	0x0006, 0x8403, 0x8003, 0x9400, 0x9420, 0x00e0, 0x9182, 0x034c,
+	0x1230, 0x2011, 0x0005, 0x8403, 0x8003, 0x9420, 0x0098, 0x9182,
+	0x042c, 0x1228, 0x2011, 0x0004, 0x8423, 0x8423, 0x0058, 0x9182,
+	0x059c, 0x1228, 0x2011, 0x0003, 0x8403, 0x9420, 0x0018, 0x2011,
+	0x0002, 0x8423, 0x9482, 0x0228, 0x8002, 0x8020, 0x8301, 0x9402,
+	0x0110, 0x0208, 0x8321, 0x8217, 0x8203, 0x9405, 0x789a, 0x012e,
+	0x0005, 0x0006, 0x00d6, 0x2069, 0x0200, 0x6814, 0x9084, 0xffc0,
+	0x910d, 0x6916, 0x00de, 0x000e, 0x0005, 0x00d6, 0x2069, 0x0200,
+	0x9005, 0x6810, 0x0110, 0xc0a5, 0x0008, 0xc0a4, 0x6812, 0x00de,
+	0x0005, 0x0006, 0x00d6, 0x2069, 0x0200, 0x6810, 0x9084, 0xfff8,
+	0x910d, 0x6912, 0x00de, 0x000e, 0x0005, 0x7938, 0x080c, 0x0dce,
+	0x00f6, 0x2079, 0x0200, 0x7902, 0xa001, 0xa001, 0xa001, 0xa001,
+	0xa001, 0xa001, 0x7902, 0xa001, 0xa001, 0xa001, 0xa001, 0xa001,
+	0xa001, 0x00fe, 0x0005, 0x0126, 0x2091, 0x2800, 0x2061, 0x0100,
+	0x2071, 0x1800, 0x2009, 0x0000, 0x080c, 0x2c7c, 0x080c, 0x2b97,
+	0x6054, 0x8004, 0x8004, 0x8004, 0x8004, 0x9084, 0x000c, 0x6150,
+	0x918c, 0xfff3, 0x9105, 0x6052, 0x6050, 0x9084, 0xb17f, 0x9085,
+	0x2000, 0x6052, 0x2009, 0x199c, 0x2011, 0x199d, 0x6358, 0x939c,
+	0x38f0, 0x2320, 0x080c, 0x2bdb, 0x1238, 0x939d, 0x4003, 0x94a5,
+	0x8603, 0x230a, 0x2412, 0x0030, 0x939d, 0x0203, 0x94a5, 0x8603,
+	0x230a, 0x2412, 0x9006, 0x080c, 0x2bc6, 0x9006, 0x080c, 0x2ba9,
+	0x20a9, 0x0012, 0x1d04, 0x2462, 0x2091, 0x6000, 0x1f04, 0x2462,
+	0x602f, 0x0100, 0x602f, 0x0000, 0x6050, 0x9085, 0x0400, 0x9084,
+	0xdfff, 0x6052, 0x6024, 0x6026, 0x080c, 0x28b5, 0x2009, 0x00ef,
+	0x6132, 0x6136, 0x080c, 0x28c5, 0x60e7, 0x0000, 0x61ea, 0x60e3,
+	0x0008, 0x604b, 0xf7f7, 0x6043, 0x0000, 0x602f, 0x0080, 0x602f,
+	0x0000, 0x6007, 0x349f, 0x60bb, 0x0000, 0x20a9, 0x0018, 0x60bf,
+	0x0000, 0x1f04, 0x248f, 0x60bb, 0x0000, 0x60bf, 0x0108, 0x60bf,
+	0x0012, 0x60bf, 0x0405, 0x60bf, 0x0014, 0x60bf, 0x0320, 0x60bf,
+	0x0018, 0x601b, 0x00f0, 0x601f, 0x001e, 0x600f, 0x006b, 0x602b,
+	0x402f, 0x012e, 0x0005, 0x00f6, 0x2079, 0x0140, 0x78c3, 0x0080,
+	0x78c3, 0x0083, 0x78c3, 0x0000, 0x00fe, 0x0005, 0x2001, 0x1835,
+	0x2003, 0x0000, 0x2001, 0x1834, 0x2003, 0x0001, 0x0005, 0x0126,
+	0x2091, 0x2800, 0x0006, 0x0016, 0x0026, 0x6124, 0x0066, 0x2031,
+	0x1837, 0x2634, 0x96b4, 0x0028, 0x006e, 0x1138, 0x6020, 0xd1bc,
+	0x0120, 0xd0bc, 0x1168, 0xd0b4, 0x1198, 0x9184, 0x5e2c, 0x1118,
+	0x9184, 0x0007, 0x00aa, 0x9195, 0x0004, 0x9284, 0x0007, 0x0082,
+	0x0016, 0x2001, 0x188b, 0x200c, 0xd184, 0x001e, 0x0d70, 0x0c98,
+	0x0016, 0x2001, 0x188b, 0x200c, 0xd194, 0x001e, 0x0d30, 0x0c58,
+	0x2512, 0x24f8, 0x24fb, 0x24fe, 0x2503, 0x2505, 0x2509, 0x250d,
+	0x080c, 0x9094, 0x00b8, 0x080c, 0x9163, 0x00a0, 0x080c, 0x9163,
+	0x080c, 0x9094, 0x0078, 0x0099, 0x0068, 0x080c, 0x9094, 0x0079,
+	0x0048, 0x080c, 0x9163, 0x0059, 0x0028, 0x080c, 0x9163, 0x080c,
+	0x9094, 0x0029, 0x002e, 0x001e, 0x000e, 0x012e, 0x0005, 0x00a6,
+	0x6124, 0x6028, 0xd09c, 0x0118, 0xd19c, 0x1904, 0x277a, 0xd1f4,
+	0x190c, 0x0dce, 0x080c, 0x743e, 0x0904, 0x256d, 0x080c, 0xd388,
+	0x1120, 0x7000, 0x9086, 0x0003, 0x0570, 0x6024, 0x9084, 0x1800,
+	0x0550, 0x080c, 0x7461, 0x0118, 0x080c, 0x744f, 0x1520, 0x6027,
+	0x0020, 0x6043, 0x0000, 0x080c, 0xd388, 0x0168, 0x080c, 0x7461,
+	0x1150, 0x2001, 0x19a6, 0x2003, 0x0001, 0x6027, 0x1800, 0x080c,
+	0x72ce, 0x0804, 0x277d, 0x70a4, 0x9005, 0x1150, 0x70a7, 0x0001,
+	0x00d6, 0x2069, 0x0140, 0x080c, 0x7495, 0x00de, 0x1904, 0x277d,
+	0x080c, 0x772e, 0x0428, 0x080c, 0x7461, 0x1590, 0x6024, 0x9084,
+	0x1800, 0x1108, 0x0468, 0x080c, 0x772e, 0x080c, 0x7724, 0x080c,
+	0x60ad, 0x080c, 0x736a, 0x0804, 0x277a, 0xd1ac, 0x1508, 0x6024,
+	0xd0dc, 0x1170, 0xd0e4, 0x1178, 0xd0d4, 0x1190, 0xd0cc, 0x0130,
+	0x7098, 0x9086, 0x0028, 0x1110, 0x080c, 0x7611, 0x0804, 0x277a,
+	0x080c, 0x7729, 0x0048, 0x2001, 0x197c, 0x2003, 0x0002, 0x0020,
+	0x080c, 0x7576, 0x0804, 0x277a, 0x080c, 0x76ac, 0x0804, 0x277a,
+	0x6220, 0xd1bc, 0x0138, 0xd2bc, 0x1904, 0x27ed, 0xd2b4, 0x1904,
+	0x2800, 0x0000, 0xd1ac, 0x0904, 0x268f, 0x0036, 0x6328, 0xc3bc,
+	0x632a, 0x003e, 0x080c, 0x743e, 0x11c0, 0x6027, 0x0020, 0x0006,
+	0x0026, 0x0036, 0x080c, 0x7458, 0x1158, 0x080c, 0x7724, 0x080c,
+	0x60ad, 0x080c, 0x736a, 0x003e, 0x002e, 0x000e, 0x00ae, 0x0005,
+	0x003e, 0x002e, 0x000e, 0x080c, 0x7416, 0x0016, 0x0046, 0x00c6,
+	0x644c, 0x9486, 0xf0f0, 0x1138, 0x2061, 0x0100, 0x644a, 0x6043,
+	0x0090, 0x6043, 0x0010, 0x74da, 0x948c, 0xff00, 0x7038, 0xd084,
+	0x0178, 0x9186, 0xf800, 0x1160, 0x7048, 0xd084, 0x1148, 0xc085,
+	0x704a, 0x0036, 0x2418, 0x2011, 0x8016, 0x080c, 0x4b7f, 0x003e,
+	0x080c, 0xd381, 0x1904, 0x266c, 0x9196, 0xff00, 0x05a8, 0x7060,
+	0x9084, 0x00ff, 0x810f, 0x81ff, 0x0110, 0x9116, 0x0568, 0x7130,
+	0xd184, 0x1550, 0x080c, 0x3378, 0x0128, 0xc18d, 0x7132, 0x080c,
+	0x6a04, 0x1510, 0x6240, 0x9294, 0x0010, 0x0130, 0x6248, 0x9294,
+	0xff00, 0x9296, 0xff00, 0x01c0, 0x7030, 0xd08c, 0x0904, 0x266c,
+	0x7038, 0xd08c, 0x1140, 0x2001, 0x180c, 0x200c, 0xd1ac, 0x1904,
+	0x266c, 0xc1ad, 0x2102, 0x0036, 0x73d8, 0x2011, 0x8013, 0x080c,
+	0x4b7f, 0x003e, 0x0804, 0x266c, 0x7038, 0xd08c, 0x1140, 0x2001,
+	0x180c, 0x200c, 0xd1ac, 0x1904, 0x266c, 0xc1ad, 0x2102, 0x0036,
+	0x73d8, 0x2011, 0x8013, 0x080c, 0x4b7f, 0x003e, 0x7130, 0xc185,
+	0x7132, 0x2011, 0x1848, 0x220c, 0xd1a4, 0x01f0, 0x0016, 0x2009,
+	0x0001, 0x2011, 0x0100, 0x080c, 0x879a, 0x2019, 0x000e, 0x00c6,
+	0x2061, 0x0000, 0x080c, 0xe6ae, 0x00ce, 0x9484, 0x00ff, 0x9080,
+	0x3384, 0x200d, 0x918c, 0xff00, 0x810f, 0x2120, 0x9006, 0x2009,
+	0x000e, 0x080c, 0xe73a, 0x001e, 0x0016, 0x2009, 0x0002, 0x2019,
+	0x0004, 0x080c, 0x31e9, 0x001e, 0x0078, 0x0156, 0x00b6, 0x20a9,
+	0x007f, 0x900e, 0x080c, 0x6699, 0x1110, 0x080c, 0x60c7, 0x8108,
+	0x1f04, 0x2662, 0x00be, 0x015e, 0x00ce, 0x004e, 0x080c, 0xaeb4,
+	0x60e3, 0x0000, 0x001e, 0x2001, 0x1800, 0x2014, 0x9296, 0x0004,
+	0x1170, 0xd19c, 0x11a0, 0x2011, 0x180c, 0x2214, 0xd29c, 0x1120,
+	0x6204, 0x9295, 0x0002, 0x6206, 0x6228, 0xc29d, 0x622a, 0x2003,
+	0x0001, 0x2001, 0x1826, 0x2003, 0x0000, 0x6027, 0x0020, 0xd194,
+	0x0904, 0x277a, 0x0016, 0x6220, 0xd2b4, 0x0904, 0x2717, 0x080c,
+	0x8636, 0x080c, 0xa356, 0x6027, 0x0004, 0x00f6, 0x2019, 0x19ef,
+	0x2304, 0x907d, 0x0904, 0x26e6, 0x7804, 0x9086, 0x0032, 0x15f0,
+	0x00d6, 0x00c6, 0x00e6, 0x0096, 0x2069, 0x0140, 0x782c, 0x685e,
+	0x7808, 0x685a, 0x6043, 0x0002, 0x2001, 0x0003, 0x8001, 0x1df0,
+	0x6043, 0x0000, 0x2001, 0x003c, 0x8001, 0x1df0, 0x080c, 0x2d5e,
+	0x2001, 0x001e, 0x8001, 0x0240, 0x20a9, 0x0009, 0x080c, 0x2c57,
+	0x6904, 0xd1dc, 0x1140, 0x0cb0, 0x2001, 0x0100, 0x080c, 0x2d4e,
+	0x9006, 0x080c, 0x2d4e, 0x080c, 0x9657, 0x080c, 0x9763, 0x7814,
+	0x2048, 0xa867, 0x0103, 0x2f60, 0x080c, 0xaf43, 0x009e, 0x00ee,
+	0x00ce, 0x00de, 0x00fe, 0x001e, 0x00ae, 0x0005, 0x00fe, 0x00d6,
+	0x2069, 0x0140, 0x6804, 0x9084, 0x4000, 0x0110, 0x080c, 0x2d5e,
+	0x00de, 0x00c6, 0x2061, 0x19e6, 0x6028, 0x080c, 0xd388, 0x0120,
+	0x909a, 0x0003, 0x1258, 0x0018, 0x909a, 0x00c8, 0x1238, 0x8000,
+	0x602a, 0x00ce, 0x080c, 0xa332, 0x0804, 0x2779, 0x2061, 0x0100,
+	0x62c0, 0x080c, 0xad3a, 0x2019, 0x19ef, 0x2304, 0x9065, 0x0120,
+	0x2009, 0x0027, 0x080c, 0xafbe, 0x00ce, 0x0804, 0x2779, 0xd2bc,
+	0x0904, 0x2760, 0x080c, 0x8643, 0x6014, 0x9084, 0x1984, 0x9085,
+	0x0010, 0x6016, 0x6027, 0x0004, 0x00d6, 0x2069, 0x0140, 0x6804,
+	0x9084, 0x4000, 0x0110, 0x080c, 0x2d5e, 0x00de, 0x00c6, 0x2061,
+	0x19e6, 0x6044, 0x080c, 0xd388, 0x0120, 0x909a, 0x0003, 0x1658,
+	0x0018, 0x909a, 0x00c8, 0x1638, 0x8000, 0x6046, 0x603c, 0x00ce,
+	0x9005, 0x05b8, 0x2009, 0x07d0, 0x080c, 0x863b, 0x9080, 0x0008,
+	0x2004, 0x9086, 0x0006, 0x1138, 0x6114, 0x918c, 0x1984, 0x918d,
+	0x0012, 0x6116, 0x0430, 0x9080, 0x0008, 0x2004, 0x9086, 0x0009,
+	0x0d98, 0x6114, 0x918c, 0x1984, 0x918d, 0x0016, 0x6116, 0x00c8,
+	0x6027, 0x0004, 0x00b0, 0x0036, 0x2019, 0x0001, 0x080c, 0xa6ac,
+	0x003e, 0x2019, 0x19f5, 0x2304, 0x9065, 0x0150, 0x2009, 0x004f,
+	0x6020, 0x9086, 0x0009, 0x1110, 0x2009, 0x004f, 0x080c, 0xafbe,
+	0x00ce, 0x001e, 0xd19c, 0x0904, 0x27e8, 0x7038, 0xd0ac, 0x1904,
+	0x27c1, 0x0016, 0x0156, 0x6027, 0x0008, 0x6050, 0x9085, 0x0040,
+	0x6052, 0x6050, 0x9084, 0xfbcf, 0x6052, 0x080c, 0x2c76, 0x9085,
+	0x2000, 0x6052, 0x20a9, 0x0012, 0x1d04, 0x2794, 0x080c, 0x866a,
+	0x1f04, 0x2794, 0x6050, 0x9085, 0x0400, 0x9084, 0xdfbf, 0x6052,
+	0x20a9, 0x0028, 0xa001, 0x1f04, 0x27a2, 0x6150, 0x9185, 0x1400,
+	0x6052, 0x20a9, 0x0366, 0x1d04, 0x27ab, 0x080c, 0x866a, 0x6020,
+	0xd09c, 0x1130, 0x015e, 0x6152, 0x001e, 0x6027, 0x0008, 0x0480,
+	0x080c, 0x2c3e, 0x1f04, 0x27ab, 0x015e, 0x6152, 0x001e, 0x6027,
+	0x0008, 0x0016, 0x6028, 0xc09c, 0x602a, 0x080c, 0xaeb4, 0x60e3,
+	0x0000, 0x080c, 0xeb79, 0x080c, 0xeb94, 0x080c, 0x5761, 0xd0fc,
+	0x1138, 0x080c, 0xd381, 0x1120, 0x9085, 0x0001, 0x080c, 0x7485,
+	0x9006, 0x080c, 0x2d4e, 0x2009, 0x0002, 0x080c, 0x2c7c, 0x2001,
+	0x1800, 0x2003, 0x0004, 0x6027, 0x0008, 0x080c, 0x0bae, 0x001e,
+	0x918c, 0xffd0, 0x6126, 0x00ae, 0x0005, 0x0016, 0x2001, 0x188b,
+	0x200c, 0xd184, 0x001e, 0x0904, 0x259a, 0x0016, 0x2009, 0x27f9,
+	0x00d0, 0x2001, 0x188b, 0x200c, 0xc184, 0x2102, 0x001e, 0x0c40,
+	0x0016, 0x2001, 0x188b, 0x200c, 0xd194, 0x001e, 0x0904, 0x259a,
+	0x0016, 0x2009, 0x280c, 0x0038, 0x2001, 0x188b, 0x200c, 0xc194,
+	0x2102, 0x001e, 0x08a8, 0x6028, 0xc0bc, 0x602a, 0x2001, 0x0156,
+	0x2003, 0xbc91, 0x8000, 0x2003, 0xffff, 0x6043, 0x0001, 0x080c,
+	0x2c76, 0x6027, 0x0080, 0x6017, 0x0000, 0x6043, 0x0000, 0x0817,
+	0x0006, 0x0016, 0x0026, 0x0036, 0x00e6, 0x00f6, 0x0126, 0x2091,
+	0x8000, 0x2071, 0x1800, 0x71d0, 0x70d2, 0x9116, 0x05e8, 0x81ff,
+	0x01a0, 0x2009, 0x0000, 0x080c, 0x2c7c, 0x2011, 0x8011, 0x2019,
+	0x010e, 0x231c, 0x939e, 0x0007, 0x1118, 0x2019, 0x0001, 0x0010,
+	0x2019, 0x0000, 0x080c, 0x4b7f, 0x0438, 0x2001, 0x19a7, 0x200c,
+	0x81ff, 0x1140, 0x2001, 0x0109, 0x2004, 0xd0b4, 0x0118, 0x2019,
+	0x0003, 0x0008, 0x2118, 0x2011, 0x8012, 0x080c, 0x4b7f, 0x080c,
+	0x5761, 0xd0fc, 0x1188, 0x080c, 0xd381, 0x1170, 0x00c6, 0x080c,
+	0x2910, 0x080c, 0xa613, 0x2061, 0x0100, 0x2019, 0x0028, 0x2009,
+	0x0002, 0x080c, 0x31e9, 0x00ce, 0x012e, 0x00fe, 0x00ee, 0x003e,
+	0x002e, 0x001e, 0x000e, 0x0005, 0x2028, 0x918c, 0x00ff, 0x2130,
+	0x9094, 0xff00, 0x11f0, 0x2011, 0x1837, 0x2214, 0xd2ac, 0x11c8,
+	0x81ff, 0x01e8, 0x2011, 0x181f, 0x2204, 0x9106, 0x1190, 0x2011,
+	0x1820, 0x2214, 0x9294, 0xff00, 0x9584, 0xff00, 0x9206, 0x1148,
+	0x2011, 0x1820, 0x2214, 0x9294, 0x00ff, 0x9584, 0x00ff, 0x9206,
+	0x1120, 0x2500, 0x080c, 0x8142, 0x0048, 0x9584, 0x00ff, 0x9080,
+	0x3384, 0x200d, 0x918c, 0xff00, 0x810f, 0x9006, 0x0005, 0x9080,
+	0x3384, 0x200d, 0x918c, 0x00ff, 0x0005, 0x00d6, 0x2069, 0x0140,
+	0x2001, 0x1818, 0x2003, 0x00ef, 0x20a9, 0x0010, 0x9006, 0x6852,
+	0x6856, 0x1f04, 0x28c0, 0x00de, 0x0005, 0x0006, 0x00d6, 0x0026,
+	0x2069, 0x0140, 0x2001, 0x1818, 0x2102, 0x8114, 0x8214, 0x8214,
+	0x8214, 0x20a9, 0x0010, 0x6853, 0x0000, 0x9006, 0x82ff, 0x1128,
+	0x9184, 0x000f, 0x9080, 0xf346, 0x2005, 0x6856, 0x8211, 0x1f04,
+	0x28d5, 0x002e, 0x00de, 0x000e, 0x0005, 0x00c6, 0x2061, 0x1800,
+	0x6030, 0x0110, 0xc09d, 0x0008, 0xc09c, 0x6032, 0x00ce, 0x0005,
+	0x0156, 0x00d6, 0x0026, 0x0016, 0x0006, 0x2069, 0x0140, 0x6980,
+	0x9116, 0x0180, 0x9112, 0x1230, 0x8212, 0x8210, 0x22a8, 0x2001,
+	0x0402, 0x0018, 0x22a8, 0x2001, 0x0404, 0x680e, 0x1f04, 0x2905,
+	0x680f, 0x0000, 0x000e, 0x001e, 0x002e, 0x00de, 0x015e, 0x0005,
+	0x080c, 0x575d, 0xd0c4, 0x0150, 0xd0a4, 0x0140, 0x9006, 0x0046,
+	0x2020, 0x2009, 0x002e, 0x080c, 0xe73a, 0x004e, 0x0005, 0x00f6,
+	0x0016, 0x0026, 0x2079, 0x0140, 0x78c4, 0xd0dc, 0x0904, 0x297c,
+	0x080c, 0x2bdb, 0x0660, 0x9084, 0x0700, 0x908e, 0x0600, 0x1120,
+	0x2011, 0x4000, 0x900e, 0x0458, 0x908e, 0x0500, 0x1120, 0x2011,
+	0x8000, 0x900e, 0x0420, 0x908e, 0x0400, 0x1120, 0x9016, 0x2009,
+	0x0001, 0x00e8, 0x908e, 0x0300, 0x1120, 0x9016, 0x2009, 0x0002,
+	0x00b0, 0x908e, 0x0200, 0x1120, 0x9016, 0x2009, 0x0004, 0x0078,
+	0x908e, 0x0100, 0x1548, 0x9016, 0x2009, 0x0008, 0x0040, 0x9084,
+	0x0700, 0x908e, 0x0300, 0x1500, 0x2011, 0x0030, 0x0058, 0x2300,
+	0x9080, 0x0020, 0x2018, 0x080c, 0x9027, 0x928c, 0xff00, 0x0110,
+	0x2011, 0x00ff, 0x2200, 0x8007, 0x9085, 0x004c, 0x78c2, 0x2009,
+	0x0138, 0x220a, 0x080c, 0x743e, 0x1118, 0x2009, 0x196c, 0x220a,
+	0x002e, 0x001e, 0x00fe, 0x0005, 0x78c3, 0x0000, 0x0cc8, 0x0126,
+	0x2091, 0x2800, 0x0006, 0x0016, 0x0026, 0x2001, 0x0170, 0x200c,
+	0x8000, 0x2014, 0x9184, 0x0003, 0x0110, 0x080c, 0x0dce, 0x002e,
+	0x001e, 0x000e, 0x012e, 0x0005, 0x2001, 0x0171, 0x2004, 0xd0dc,
+	0x0168, 0x2001, 0x0170, 0x200c, 0x918c, 0x00ff, 0x918e, 0x004c,
+	0x1128, 0x200c, 0x918c, 0xff00, 0x810f, 0x0005, 0x900e, 0x2001,
+	0x0227, 0x2004, 0x8007, 0x9084, 0x00ff, 0x8004, 0x9108, 0x2001,
+	0x0226, 0x2004, 0x8007, 0x9084, 0x00ff, 0x8004, 0x9108, 0x0005,
+	0x0018, 0x000c, 0x0018, 0x0020, 0x1000, 0x0800, 0x1000, 0x1800,
+	0x0156, 0x0006, 0x0016, 0x0026, 0x00e6, 0x2001, 0x198f, 0x2004,
+	0x908a, 0x0007, 0x1a0c, 0x0dd5, 0x0033, 0x00ee, 0x002e, 0x001e,
+	0x000e, 0x015e, 0x0005, 0x29da, 0x29f8, 0x2a1c, 0x2a1e, 0x2a47,
+	0x2a49, 0x2a4b, 0x2001, 0x0001, 0x080c, 0x2828, 0x080c, 0x2c39,
+	0x2001, 0x1991, 0x2003, 0x0000, 0x7828, 0x9084, 0xe1d7, 0x782a,
+	0x9006, 0x20a9, 0x0009, 0x080c, 0x2bf7, 0x2001, 0x198f, 0x2003,
+	0x0006, 0x2009, 0x001e, 0x2011, 0x2a4c, 0x080c, 0x8648, 0x0005,
+	0x2009, 0x1994, 0x200b, 0x0000, 0x2001, 0x1999, 0x2003, 0x0036,
+	0x2001, 0x1998, 0x2003, 0x002a, 0x2001, 0x1991, 0x2003, 0x0001,
+	0x9006, 0x080c, 0x2ba9, 0x2001, 0xffff, 0x20a9, 0x0009, 0x080c,
+	0x2bf7, 0x2001, 0x198f, 0x2003, 0x0006, 0x2009, 0x001e, 0x2011,
+	0x2a4c, 0x080c, 0x8648, 0x0005, 0x080c, 0x0dd5, 0x2001, 0x1999,
+	0x2003, 0x0036, 0x2001, 0x1991, 0x2003, 0x0003, 0x7a38, 0x9294,
+	0x0005, 0x9296, 0x0004, 0x0110, 0x9006, 0x0010, 0x2001, 0x0001,
+	0x080c, 0x2ba9, 0x2001, 0x1995, 0x2003, 0x0000, 0x2001, 0xffff,
+	0x20a9, 0x0009, 0x080c, 0x2bf7, 0x2001, 0x198f, 0x2003, 0x0006,
+	0x2009, 0x001e, 0x2011, 0x2a4c, 0x080c, 0x8648, 0x0005, 0x080c,
+	0x0dd5, 0x080c, 0x0dd5, 0x0005, 0x0006, 0x0016, 0x0026, 0x00e6,
+	0x00f6, 0x0156, 0x0126, 0x2091, 0x8000, 0x2079, 0x0100, 0x2001,
+	0x1991, 0x2004, 0x908a, 0x0007, 0x1a0c, 0x0dd5, 0x0043, 0x012e,
+	0x015e, 0x00fe, 0x00ee, 0x002e, 0x001e, 0x000e, 0x0005, 0x2a6e,
+	0x2a8e, 0x2ace, 0x2afe, 0x2b22, 0x2b32, 0x2b34, 0x080c, 0x2beb,
+	0x11b0, 0x7850, 0x9084, 0xefff, 0x7852, 0x2009, 0x1997, 0x2104,
+	0x7a38, 0x9294, 0x0005, 0x9296, 0x0004, 0x0110, 0xc08d, 0x0008,
+	0xc085, 0x200a, 0x2001, 0x198f, 0x2003, 0x0001, 0x0030, 0x080c,
+	0x2b58, 0x2001, 0xffff, 0x080c, 0x29e9, 0x0005, 0x080c, 0x2b36,
+	0x05e0, 0x2009, 0x1998, 0x2104, 0x8001, 0x200a, 0x080c, 0x2beb,
+	0x1178, 0x7850, 0x9084, 0xefff, 0x7852, 0x7a38, 0x9294, 0x0005,
+	0x9296, 0x0005, 0x0518, 0x2009, 0x1997, 0x2104, 0xc085, 0x200a,
+	0x2009, 0x1994, 0x2104, 0x8000, 0x200a, 0x9086, 0x0005, 0x0118,
+	0x080c, 0x2b3e, 0x00c0, 0x200b, 0x0000, 0x7a38, 0x9294, 0x0006,
 	0x9296, 0x0004, 0x0110, 0x9006, 0x0010, 0x2001, 0x0001, 0x080c,
-	0x2b78, 0x2001, 0x1995, 0x2003, 0x0000, 0x2001, 0xffff, 0x20a9,
-	0x0009, 0x080c, 0x2bc6, 0x2001, 0x198f, 0x2003, 0x0006, 0x2009,
-	0x001e, 0x2011, 0x2a1b, 0x080c, 0x8591, 0x0005, 0x080c, 0x0dd5,
-	0x080c, 0x0dd5, 0x0005, 0x0006, 0x0016, 0x0026, 0x00e6, 0x00f6,
-	0x0156, 0x0126, 0x2091, 0x8000, 0x2079, 0x0100, 0x2001, 0x1991,
-	0x2004, 0x908a, 0x0007, 0x1a0c, 0x0dd5, 0x0043, 0x012e, 0x015e,
-	0x00fe, 0x00ee, 0x002e, 0x001e, 0x000e, 0x0005, 0x2a3d, 0x2a5d,
-	0x2a9d, 0x2acd, 0x2af1, 0x2b01, 0x2b03, 0x080c, 0x2bba, 0x11b0,
-	0x7850, 0x9084, 0xefff, 0x7852, 0x2009, 0x1997, 0x2104, 0x7a38,
-	0x9294, 0x0005, 0x9296, 0x0004, 0x0110, 0xc08d, 0x0008, 0xc085,
-	0x200a, 0x2001, 0x198f, 0x2003, 0x0001, 0x0030, 0x080c, 0x2b27,
-	0x2001, 0xffff, 0x080c, 0x29b8, 0x0005, 0x080c, 0x2b05, 0x05e0,
-	0x2009, 0x1998, 0x2104, 0x8001, 0x200a, 0x080c, 0x2bba, 0x1178,
-	0x7850, 0x9084, 0xefff, 0x7852, 0x7a38, 0x9294, 0x0005, 0x9296,
-	0x0005, 0x0518, 0x2009, 0x1997, 0x2104, 0xc085, 0x200a, 0x2009,
-	0x1994, 0x2104, 0x8000, 0x200a, 0x9086, 0x0005, 0x0118, 0x080c,
-	0x2b0d, 0x00c0, 0x200b, 0x0000, 0x7a38, 0x9294, 0x0006, 0x9296,
-	0x0004, 0x0110, 0x9006, 0x0010, 0x2001, 0x0001, 0x080c, 0x2b95,
-	0x2001, 0x1991, 0x2003, 0x0002, 0x0028, 0x2001, 0x198f, 0x2003,
-	0x0003, 0x0010, 0x080c, 0x29da, 0x0005, 0x080c, 0x2b05, 0x0560,
-	0x2009, 0x1998, 0x2104, 0x8001, 0x200a, 0x080c, 0x2bba, 0x1168,
-	0x7850, 0x9084, 0xefff, 0x7852, 0x2001, 0x198f, 0x2003, 0x0003,
-	0x2001, 0x1990, 0x2003, 0x0000, 0x00b8, 0x2009, 0x1998, 0x2104,
-	0x9005, 0x1118, 0x080c, 0x2b4a, 0x0010, 0x080c, 0x2b1a, 0x080c,
-	0x2b0d, 0x2009, 0x1994, 0x200b, 0x0000, 0x2001, 0x1991, 0x2003,
-	0x0001, 0x080c, 0x29da, 0x0000, 0x0005, 0x04b9, 0x0508, 0x080c,
-	0x2bba, 0x11b8, 0x7850, 0x9084, 0xefff, 0x7852, 0x2009, 0x1995,
-	0x2104, 0x8000, 0x200a, 0x9086, 0x0007, 0x0108, 0x0078, 0x2001,
-	0x199a, 0x2003, 0x000a, 0x2009, 0x1997, 0x2104, 0xc0fd, 0x200a,
-	0x0038, 0x0419, 0x2001, 0x1991, 0x2003, 0x0004, 0x080c, 0x2a05,
-	0x0005, 0x0099, 0x0168, 0x080c, 0x2bba, 0x1138, 0x7850, 0x9084,
-	0xefff, 0x7852, 0x080c, 0x29f1, 0x0018, 0x0079, 0x080c, 0x2a05,
-	0x0005, 0x080c, 0x0dd5, 0x080c, 0x0dd5, 0x2009, 0x1999, 0x2104,
-	0x8001, 0x200a, 0x090c, 0x2b66, 0x0005, 0x7a38, 0x9294, 0x0005,
-	0x9296, 0x0005, 0x0110, 0x9006, 0x0010, 0x2001, 0x0001, 0x080c,
-	0x2b95, 0x0005, 0x7a38, 0x9294, 0x0006, 0x9296, 0x0006, 0x0110,
-	0x9006, 0x0010, 0x2001, 0x0001, 0x080c, 0x2b78, 0x0005, 0x2009,
-	0x1994, 0x2104, 0x8000, 0x200a, 0x9086, 0x0005, 0x0108, 0x0068,
-	0x200b, 0x0000, 0x7a38, 0x9294, 0x0006, 0x9296, 0x0006, 0x0110,
-	0x9006, 0x0010, 0x2001, 0x0001, 0x04d9, 0x7a38, 0x9294, 0x0005,
-	0x9296, 0x0005, 0x0110, 0x9006, 0x0010, 0x2001, 0x0001, 0x080c,
-	0x2b95, 0x0005, 0x0086, 0x2001, 0x1997, 0x2004, 0x9084, 0x7fff,
-	0x090c, 0x0dd5, 0x2009, 0x1996, 0x2144, 0x8846, 0x280a, 0x9844,
-	0x0dd8, 0xd08c, 0x1120, 0xd084, 0x1120, 0x080c, 0x0dd5, 0x9006,
-	0x0010, 0x2001, 0x0001, 0x00a1, 0x008e, 0x0005, 0x0006, 0x0156,
-	0x2001, 0x198f, 0x20a9, 0x0009, 0x2003, 0x0000, 0x8000, 0x1f04,
-	0x2b6c, 0x2001, 0x1996, 0x2003, 0x8000, 0x015e, 0x000e, 0x0005,
-	0x00f6, 0x2079, 0x0100, 0x9085, 0x0000, 0x0158, 0x7838, 0x9084,
-	0xfff9, 0x9085, 0x0004, 0x783a, 0x2009, 0x199c, 0x210c, 0x795a,
-	0x0050, 0x7838, 0x9084, 0xfffb, 0x9085, 0x0006, 0x783a, 0x2009,
-	0x199d, 0x210c, 0x795a, 0x00fe, 0x0005, 0x00f6, 0x2079, 0x0100,
-	0x9085, 0x0000, 0x0138, 0x7838, 0x9084, 0xfffa, 0x9085, 0x0004,
-	0x783a, 0x0030, 0x7838, 0x9084, 0xfffb, 0x9085, 0x0005, 0x783a,
-	0x00fe, 0x0005, 0x0006, 0x2001, 0x0100, 0x2004, 0x9082, 0x0007,
-	0x000e, 0x0005, 0x0006, 0x2001, 0x0100, 0x2004, 0x9082, 0x0009,
-	0x000e, 0x0005, 0x0156, 0x20a9, 0x0064, 0x7820, 0x080c, 0x2c45,
-	0xd09c, 0x1110, 0x1f04, 0x2bbd, 0x015e, 0x0005, 0x0126, 0x0016,
-	0x0006, 0x2091, 0x8000, 0x7850, 0x9085, 0x0040, 0x7852, 0x7850,
-	0x9084, 0xfbcf, 0x7852, 0x080c, 0x2c45, 0x9085, 0x2000, 0x7852,
-	0x000e, 0x2008, 0x9186, 0x0000, 0x1118, 0x783b, 0x0007, 0x0090,
-	0x9186, 0x0001, 0x1118, 0x783b, 0x0006, 0x0060, 0x9186, 0x0002,
-	0x1118, 0x783b, 0x0005, 0x0030, 0x9186, 0x0003, 0x1118, 0x783b,
-	0x0004, 0x0000, 0x0006, 0x1d04, 0x2bf3, 0x080c, 0x85b3, 0x1f04,
-	0x2bf3, 0x7850, 0x9085, 0x0400, 0x9084, 0xdfbf, 0x7852, 0x080c,
-	0x2c45, 0x9085, 0x1000, 0x7852, 0x000e, 0x001e, 0x012e, 0x0005,
-	0x7850, 0x9084, 0xffcf, 0x7852, 0x0005, 0x0006, 0x0156, 0x00f6,
-	0x2079, 0x0100, 0x20a9, 0x000a, 0x7854, 0xd0ac, 0x1130, 0x7820,
-	0xd0e4, 0x1140, 0x1f04, 0x2c17, 0x0028, 0x7854, 0xd08c, 0x1110,
-	0x1f04, 0x2c1d, 0x00fe, 0x015e, 0x000e, 0x0005, 0x1d04, 0x2c26,
-	0x080c, 0x85b3, 0x1f04, 0x2c26, 0x0005, 0x0006, 0x2001, 0x199b,
-	0x2004, 0x9086, 0x0000, 0x000e, 0x0005, 0x0006, 0x2001, 0x199b,
-	0x2004, 0x9086, 0x0001, 0x000e, 0x0005, 0x0006, 0x2001, 0x199b,
-	0x2004, 0x9086, 0x0002, 0x000e, 0x0005, 0xa001, 0xa001, 0xa001,
-	0xa001, 0xa001, 0x0005, 0x0006, 0x2001, 0x19a7, 0x2102, 0x000e,
-	0x0005, 0x2009, 0x0171, 0x2104, 0xd0dc, 0x0140, 0x2009, 0x0170,
-	0x2104, 0x200b, 0x0080, 0xa001, 0xa001, 0x200a, 0x0005, 0x0036,
-	0x0046, 0x2001, 0x0141, 0x200c, 0x918c, 0xff00, 0x9186, 0x2000,
-	0x0118, 0x9186, 0x0100, 0x1588, 0x2009, 0x00a2, 0x080c, 0x0e51,
-	0x2019, 0x0160, 0x2324, 0x2011, 0x0003, 0x2009, 0x0169, 0x2104,
-	0x9084, 0x0007, 0x210c, 0x918c, 0x0007, 0x910e, 0x1db0, 0x9086,
-	0x0003, 0x11b8, 0x2304, 0x9402, 0x02a0, 0x1d60, 0x8211, 0x1d68,
-	0x84ff, 0x0170, 0x2001, 0x0141, 0x200c, 0x918c, 0xff00, 0x9186,
-	0x0100, 0x0130, 0x2009, 0x180c, 0x2104, 0xc0dd, 0x200a, 0x0008,
-	0x0419, 0x2009, 0x0000, 0x080c, 0x0e51, 0x004e, 0x003e, 0x0005,
-	0x2001, 0x180c, 0x2004, 0xd0dc, 0x01b0, 0x2001, 0x0160, 0x2004,
-	0x9005, 0x0140, 0x2001, 0x0141, 0x2004, 0x9084, 0xff00, 0x9086,
-	0x0100, 0x1148, 0x0126, 0x2091, 0x8000, 0x0016, 0x0026, 0x0021,
-	0x002e, 0x001e, 0x012e, 0x0005, 0x00c6, 0x2061, 0x0100, 0x6014,
-	0x0006, 0x2001, 0x0161, 0x2003, 0x0000, 0x6017, 0x0018, 0xa001,
-	0xa001, 0x602f, 0x0008, 0x6104, 0x918e, 0x0010, 0x6106, 0x918e,
-	0x0010, 0x6106, 0x6017, 0x0040, 0x04b9, 0x001e, 0x9184, 0x0003,
-	0x01e0, 0x0036, 0x0016, 0x2019, 0x0141, 0x6124, 0x918c, 0x0028,
-	0x1120, 0x2304, 0x9084, 0x2800, 0x0dc0, 0x001e, 0x919c, 0xffe4,
-	0x9184, 0x0001, 0x0118, 0x9385, 0x0009, 0x6016, 0x9184, 0x0002,
-	0x0118, 0x9385, 0x0012, 0x6016, 0x003e, 0x2001, 0x180c, 0x200c,
-	0xc1dc, 0x2102, 0x00ce, 0x0005, 0x0016, 0x0026, 0x080c, 0x73cd,
-	0x0108, 0xc0bc, 0x2009, 0x0140, 0x2114, 0x9294, 0x0001, 0x9215,
+	0x2bc6, 0x2001, 0x1991, 0x2003, 0x0002, 0x0028, 0x2001, 0x198f,
+	0x2003, 0x0003, 0x0010, 0x080c, 0x2a0b, 0x0005, 0x080c, 0x2b36,
+	0x0560, 0x2009, 0x1998, 0x2104, 0x8001, 0x200a, 0x080c, 0x2beb,
+	0x1168, 0x7850, 0x9084, 0xefff, 0x7852, 0x2001, 0x198f, 0x2003,
+	0x0003, 0x2001, 0x1990, 0x2003, 0x0000, 0x00b8, 0x2009, 0x1998,
+	0x2104, 0x9005, 0x1118, 0x080c, 0x2b7b, 0x0010, 0x080c, 0x2b4b,
+	0x080c, 0x2b3e, 0x2009, 0x1994, 0x200b, 0x0000, 0x2001, 0x1991,
+	0x2003, 0x0001, 0x080c, 0x2a0b, 0x0000, 0x0005, 0x04b9, 0x0508,
+	0x080c, 0x2beb, 0x11b8, 0x7850, 0x9084, 0xefff, 0x7852, 0x2009,
+	0x1995, 0x2104, 0x8000, 0x200a, 0x9086, 0x0007, 0x0108, 0x0078,
+	0x2001, 0x199a, 0x2003, 0x000a, 0x2009, 0x1997, 0x2104, 0xc0fd,
+	0x200a, 0x0038, 0x0419, 0x2001, 0x1991, 0x2003, 0x0004, 0x080c,
+	0x2a36, 0x0005, 0x0099, 0x0168, 0x080c, 0x2beb, 0x1138, 0x7850,
+	0x9084, 0xefff, 0x7852, 0x080c, 0x2a22, 0x0018, 0x0079, 0x080c,
+	0x2a36, 0x0005, 0x080c, 0x0dd5, 0x080c, 0x0dd5, 0x2009, 0x1999,
+	0x2104, 0x8001, 0x200a, 0x090c, 0x2b97, 0x0005, 0x7a38, 0x9294,
+	0x0005, 0x9296, 0x0005, 0x0110, 0x9006, 0x0010, 0x2001, 0x0001,
+	0x080c, 0x2bc6, 0x0005, 0x7a38, 0x9294, 0x0006, 0x9296, 0x0006,
+	0x0110, 0x9006, 0x0010, 0x2001, 0x0001, 0x080c, 0x2ba9, 0x0005,
+	0x2009, 0x1994, 0x2104, 0x8000, 0x200a, 0x9086, 0x0005, 0x0108,
+	0x0068, 0x200b, 0x0000, 0x7a38, 0x9294, 0x0006, 0x9296, 0x0006,
+	0x0110, 0x9006, 0x0010, 0x2001, 0x0001, 0x04d9, 0x7a38, 0x9294,
+	0x0005, 0x9296, 0x0005, 0x0110, 0x9006, 0x0010, 0x2001, 0x0001,
+	0x080c, 0x2bc6, 0x0005, 0x0086, 0x2001, 0x1997, 0x2004, 0x9084,
+	0x7fff, 0x090c, 0x0dd5, 0x2009, 0x1996, 0x2144, 0x8846, 0x280a,
+	0x9844, 0x0dd8, 0xd08c, 0x1120, 0xd084, 0x1120, 0x080c, 0x0dd5,
+	0x9006, 0x0010, 0x2001, 0x0001, 0x00a1, 0x008e, 0x0005, 0x0006,
+	0x0156, 0x2001, 0x198f, 0x20a9, 0x0009, 0x2003, 0x0000, 0x8000,
+	0x1f04, 0x2b9d, 0x2001, 0x1996, 0x2003, 0x8000, 0x015e, 0x000e,
+	0x0005, 0x00f6, 0x2079, 0x0100, 0x9085, 0x0000, 0x0158, 0x7838,
+	0x9084, 0xfff9, 0x9085, 0x0004, 0x783a, 0x2009, 0x199c, 0x210c,
+	0x795a, 0x0050, 0x7838, 0x9084, 0xfffb, 0x9085, 0x0006, 0x783a,
+	0x2009, 0x199d, 0x210c, 0x795a, 0x00fe, 0x0005, 0x00f6, 0x2079,
+	0x0100, 0x9085, 0x0000, 0x0138, 0x7838, 0x9084, 0xfffa, 0x9085,
+	0x0004, 0x783a, 0x0030, 0x7838, 0x9084, 0xfffb, 0x9085, 0x0005,
+	0x783a, 0x00fe, 0x0005, 0x0006, 0x2001, 0x0100, 0x2004, 0x9082,
+	0x0007, 0x000e, 0x0005, 0x0006, 0x2001, 0x0100, 0x2004, 0x9082,
+	0x0009, 0x000e, 0x0005, 0x0156, 0x20a9, 0x0064, 0x7820, 0x080c,
+	0x2c76, 0xd09c, 0x1110, 0x1f04, 0x2bee, 0x015e, 0x0005, 0x0126,
+	0x0016, 0x0006, 0x2091, 0x8000, 0x7850, 0x9085, 0x0040, 0x7852,
+	0x7850, 0x9084, 0xfbcf, 0x7852, 0x080c, 0x2c76, 0x9085, 0x2000,
+	0x7852, 0x000e, 0x2008, 0x9186, 0x0000, 0x1118, 0x783b, 0x0007,
+	0x0090, 0x9186, 0x0001, 0x1118, 0x783b, 0x0006, 0x0060, 0x9186,
+	0x0002, 0x1118, 0x783b, 0x0005, 0x0030, 0x9186, 0x0003, 0x1118,
+	0x783b, 0x0004, 0x0000, 0x0006, 0x1d04, 0x2c24, 0x080c, 0x866a,
+	0x1f04, 0x2c24, 0x7850, 0x9085, 0x0400, 0x9084, 0xdfbf, 0x7852,
+	0x080c, 0x2c76, 0x9085, 0x1000, 0x7852, 0x000e, 0x001e, 0x012e,
+	0x0005, 0x7850, 0x9084, 0xffcf, 0x7852, 0x0005, 0x0006, 0x0156,
+	0x00f6, 0x2079, 0x0100, 0x20a9, 0x000a, 0x7854, 0xd0ac, 0x1130,
+	0x7820, 0xd0e4, 0x1140, 0x1f04, 0x2c48, 0x0028, 0x7854, 0xd08c,
+	0x1110, 0x1f04, 0x2c4e, 0x00fe, 0x015e, 0x000e, 0x0005, 0x1d04,
+	0x2c57, 0x080c, 0x866a, 0x1f04, 0x2c57, 0x0005, 0x0006, 0x2001,
+	0x199b, 0x2004, 0x9086, 0x0000, 0x000e, 0x0005, 0x0006, 0x2001,
+	0x199b, 0x2004, 0x9086, 0x0001, 0x000e, 0x0005, 0x0006, 0x2001,
+	0x199b, 0x2004, 0x9086, 0x0002, 0x000e, 0x0005, 0xa001, 0xa001,
+	0xa001, 0xa001, 0xa001, 0x0005, 0x0006, 0x2001, 0x19a7, 0x2102,
+	0x000e, 0x0005, 0x2009, 0x0171, 0x2104, 0xd0dc, 0x0140, 0x2009,
+	0x0170, 0x2104, 0x200b, 0x0080, 0xa001, 0xa001, 0x200a, 0x0005,
+	0x0036, 0x0046, 0x2001, 0x0141, 0x200c, 0x918c, 0xff00, 0x9186,
+	0x2100, 0x0140, 0x9186, 0x2000, 0x0170, 0x9186, 0x0100, 0x1904,
+	0x2cef, 0x0048, 0x0016, 0x2009, 0x1a82, 0x2104, 0x8000, 0x0208,
+	0x200a, 0x001e, 0x04f0, 0x2009, 0x00a2, 0x080c, 0x0e51, 0x2019,
+	0x0160, 0x2324, 0x2011, 0x0003, 0x2009, 0x0169, 0x2104, 0x9084,
+	0x0007, 0x210c, 0x918c, 0x0007, 0x910e, 0x1db0, 0x9086, 0x0003,
+	0x1548, 0x2304, 0x0066, 0x0076, 0x2031, 0x0002, 0x233c, 0x973e,
+	0x0148, 0x8631, 0x1dd8, 0x2031, 0x1a83, 0x263c, 0x8738, 0x0208,
+	0x2732, 0x2304, 0x007e, 0x006e, 0x9402, 0x02a0, 0x19d0, 0x8211,
+	0x19d8, 0x84ff, 0x0170, 0x2001, 0x0141, 0x200c, 0x918c, 0xff00,
+	0x9186, 0x0100, 0x0130, 0x2009, 0x180c, 0x2104, 0xc0dd, 0x200a,
+	0x0008, 0x0421, 0x2001, 0x1980, 0x200c, 0x080c, 0x0e51, 0x004e,
+	0x003e, 0x0005, 0x2001, 0x180c, 0x2004, 0xd0dc, 0x01b0, 0x2001,
+	0x0160, 0x2004, 0x9005, 0x0140, 0x2001, 0x0141, 0x2004, 0x9084,
+	0xff00, 0x9086, 0x0100, 0x1148, 0x0126, 0x2091, 0x8000, 0x0016,
+	0x0026, 0x0021, 0x002e, 0x001e, 0x012e, 0x0005, 0x00c6, 0x2061,
+	0x0100, 0x6014, 0x0006, 0x2001, 0x0161, 0x2003, 0x0000, 0x6017,
+	0x0018, 0xa001, 0xa001, 0x602f, 0x0008, 0x6104, 0x918e, 0x0010,
+	0x6106, 0x918e, 0x0010, 0x6106, 0x6017, 0x0040, 0x04b9, 0x001e,
+	0x9184, 0x0003, 0x01e0, 0x0036, 0x0016, 0x2019, 0x0141, 0x6124,
+	0x918c, 0x0028, 0x1120, 0x2304, 0x9084, 0x2800, 0x0dc0, 0x001e,
+	0x919c, 0xffe4, 0x9184, 0x0001, 0x0118, 0x9385, 0x0009, 0x6016,
+	0x9184, 0x0002, 0x0118, 0x9385, 0x0012, 0x6016, 0x003e, 0x2001,
+	0x180c, 0x200c, 0xc1dc, 0x2102, 0x00ce, 0x0005, 0x0016, 0x0026,
+	0x080c, 0x7458, 0x0108, 0xc0bc, 0x2009, 0x0140, 0x2114, 0x9294,
+	0x0001, 0x9215, 0x220a, 0x002e, 0x001e, 0x0005, 0x0016, 0x0026,
+	0x2009, 0x0140, 0x2114, 0x9294, 0x0001, 0x9285, 0x1000, 0x200a,
 	0x220a, 0x002e, 0x001e, 0x0005, 0x0016, 0x0026, 0x2009, 0x0140,
-	0x2114, 0x9294, 0x0001, 0x9285, 0x1000, 0x200a, 0x220a, 0x002e,
-	0x001e, 0x0005, 0x0016, 0x0026, 0x2009, 0x0140, 0x2114, 0x9294,
-	0x0001, 0x9215, 0x220a, 0x002e, 0x001e, 0x0005, 0x0006, 0x0016,
-	0x2009, 0x0140, 0x2104, 0x1128, 0x080c, 0x73cd, 0x0110, 0xc0bc,
-	0x0008, 0xc0bd, 0x200a, 0x001e, 0x000e, 0x0005, 0x2fa2, 0x2fa2,
-	0x2dc6, 0x2dc6, 0x2dd2, 0x2dd2, 0x2dde, 0x2dde, 0x2dec, 0x2dec,
-	0x2df8, 0x2df8, 0x2e06, 0x2e06, 0x2e14, 0x2e14, 0x2e26, 0x2e26,
-	0x2e32, 0x2e32, 0x2e40, 0x2e40, 0x2e5e, 0x2e5e, 0x2e7e, 0x2e7e,
-	0x2e4e, 0x2e4e, 0x2e6e, 0x2e6e, 0x2e8c, 0x2e8c, 0x2e24, 0x2e24,
-	0x2e24, 0x2e24, 0x2e24, 0x2e24, 0x2e24, 0x2e24, 0x2e24, 0x2e24,
-	0x2e24, 0x2e24, 0x2e24, 0x2e24, 0x2e24, 0x2e24, 0x2e24, 0x2e24,
-	0x2e24, 0x2e24, 0x2e24, 0x2e24, 0x2e24, 0x2e24, 0x2e24, 0x2e24,
-	0x2e24, 0x2e24, 0x2e24, 0x2e24, 0x2e24, 0x2e24, 0x2e9e, 0x2e9e,
-	0x2eaa, 0x2eaa, 0x2eb8, 0x2eb8, 0x2ec6, 0x2ec6, 0x2ed6, 0x2ed6,
-	0x2ee4, 0x2ee4, 0x2ef4, 0x2ef4, 0x2f04, 0x2f04, 0x2f16, 0x2f16,
-	0x2f24, 0x2f24, 0x2f34, 0x2f34, 0x2f56, 0x2f56, 0x2f78, 0x2f78,
-	0x2f44, 0x2f44, 0x2f67, 0x2f67, 0x2f87, 0x2f87, 0x2e24, 0x2e24,
-	0x2e24, 0x2e24, 0x2e24, 0x2e24, 0x2e24, 0x2e24, 0x2e24, 0x2e24,
-	0x2e24, 0x2e24, 0x2e24, 0x2e24, 0x2e24, 0x2e24, 0x2e24, 0x2e24,
-	0x2e24, 0x2e24, 0x2e24, 0x2e24, 0x2e24, 0x2e24, 0x2e24, 0x2e24,
-	0x2e24, 0x2e24, 0x2e24, 0x2e24, 0x2e24, 0x2e24, 0x2e24, 0x2e24,
-	0x2e24, 0x2e24, 0x2e24, 0x2e24, 0x2e24, 0x2e24, 0x2e24, 0x2e24,
-	0x2e24, 0x2e24, 0x2e24, 0x2e24, 0x2e24, 0x2e24, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x248e,
-	0x0804, 0x2f9a, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
-	0x0146, 0x0156, 0x080c, 0x22a2, 0x0804, 0x2f9a, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x22a2,
-	0x080c, 0x248e, 0x0804, 0x2f9a, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x22dd, 0x0804, 0x2f9a,
+	0x2114, 0x9294, 0x0001, 0x9215, 0x220a, 0x002e, 0x001e, 0x0005,
+	0x0006, 0x0016, 0x2009, 0x0140, 0x2104, 0x1128, 0x080c, 0x7458,
+	0x0110, 0xc0bc, 0x0008, 0xc0bd, 0x200a, 0x001e, 0x000e, 0x0005,
+	0x2ff4, 0x2ff4, 0x2e18, 0x2e18, 0x2e24, 0x2e24, 0x2e30, 0x2e30,
+	0x2e3e, 0x2e3e, 0x2e4a, 0x2e4a, 0x2e58, 0x2e58, 0x2e66, 0x2e66,
+	0x2e78, 0x2e78, 0x2e84, 0x2e84, 0x2e92, 0x2e92, 0x2eb0, 0x2eb0,
+	0x2ed0, 0x2ed0, 0x2ea0, 0x2ea0, 0x2ec0, 0x2ec0, 0x2ede, 0x2ede,
+	0x2e76, 0x2e76, 0x2e76, 0x2e76, 0x2e76, 0x2e76, 0x2e76, 0x2e76,
+	0x2e76, 0x2e76, 0x2e76, 0x2e76, 0x2e76, 0x2e76, 0x2e76, 0x2e76,
+	0x2e76, 0x2e76, 0x2e76, 0x2e76, 0x2e76, 0x2e76, 0x2e76, 0x2e76,
+	0x2e76, 0x2e76, 0x2e76, 0x2e76, 0x2e76, 0x2e76, 0x2e76, 0x2e76,
+	0x2ef0, 0x2ef0, 0x2efc, 0x2efc, 0x2f0a, 0x2f0a, 0x2f18, 0x2f18,
+	0x2f28, 0x2f28, 0x2f36, 0x2f36, 0x2f46, 0x2f46, 0x2f56, 0x2f56,
+	0x2f68, 0x2f68, 0x2f76, 0x2f76, 0x2f86, 0x2f86, 0x2fa8, 0x2fa8,
+	0x2fca, 0x2fca, 0x2f96, 0x2f96, 0x2fb9, 0x2fb9, 0x2fd9, 0x2fd9,
+	0x2e76, 0x2e76, 0x2e76, 0x2e76, 0x2e76, 0x2e76, 0x2e76, 0x2e76,
+	0x2e76, 0x2e76, 0x2e76, 0x2e76, 0x2e76, 0x2e76, 0x2e76, 0x2e76,
+	0x2e76, 0x2e76, 0x2e76, 0x2e76, 0x2e76, 0x2e76, 0x2e76, 0x2e76,
+	0x2e76, 0x2e76, 0x2e76, 0x2e76, 0x2e76, 0x2e76, 0x2e76, 0x2e76,
+	0x2e76, 0x2e76, 0x2e76, 0x2e76, 0x2e76, 0x2e76, 0x2e76, 0x2e76,
+	0x2e76, 0x2e76, 0x2e76, 0x2e76, 0x2e76, 0x2e76, 0x2e76, 0x2e76,
+	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
+	0x080c, 0x24bf, 0x0804, 0x2fec, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x22d3, 0x0804, 0x2fec,
+	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
+	0x080c, 0x22d3, 0x080c, 0x24bf, 0x0804, 0x2fec, 0x0106, 0x0006,
+	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x230e,
+	0x0804, 0x2fec, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
+	0x0146, 0x0156, 0x080c, 0x24bf, 0x080c, 0x230e, 0x0804, 0x2fec,
+	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
+	0x080c, 0x22d3, 0x080c, 0x230e, 0x0804, 0x2fec, 0x0106, 0x0006,
+	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x22d3,
+	0x080c, 0x24bf, 0x080c, 0x230e, 0x0804, 0x2fec, 0xa001, 0x0cf0,
+	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
+	0x080c, 0x1380, 0x0804, 0x2fec, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x24bf, 0x080c, 0x1380,
+	0x0804, 0x2fec, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
+	0x0146, 0x0156, 0x080c, 0x22d3, 0x080c, 0x1380, 0x0804, 0x2fec,
+	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
+	0x080c, 0x24bf, 0x080c, 0x1380, 0x080c, 0x230e, 0x0804, 0x2fec,
+	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
+	0x080c, 0x22d3, 0x080c, 0x24bf, 0x080c, 0x1380, 0x0804, 0x2fec,
+	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
+	0x080c, 0x22d3, 0x080c, 0x1380, 0x080c, 0x230e, 0x0804, 0x2fec,
+	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
+	0x080c, 0x1380, 0x080c, 0x230e, 0x0804, 0x2fec, 0x0106, 0x0006,
+	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x22d3,
+	0x080c, 0x24bf, 0x080c, 0x1380, 0x080c, 0x230e, 0x0804, 0x2fec,
+	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
+	0x080c, 0x297f, 0x0804, 0x2fec, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x297f, 0x080c, 0x24bf,
+	0x0804, 0x2fec, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
+	0x0146, 0x0156, 0x080c, 0x297f, 0x080c, 0x22d3, 0x0804, 0x2fec,
 	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
-	0x080c, 0x248e, 0x080c, 0x22dd, 0x0804, 0x2f9a, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x22a2,
-	0x080c, 0x22dd, 0x0804, 0x2f9a, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x22a2, 0x080c, 0x248e,
-	0x080c, 0x22dd, 0x0804, 0x2f9a, 0xa001, 0x0cf0, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x1380,
-	0x0804, 0x2f9a, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
-	0x0146, 0x0156, 0x080c, 0x248e, 0x080c, 0x1380, 0x0804, 0x2f9a,
+	0x080c, 0x297f, 0x080c, 0x22d3, 0x080c, 0x24bf, 0x0804, 0x2fec,
 	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
-	0x080c, 0x22a2, 0x080c, 0x1380, 0x0804, 0x2f9a, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x248e,
-	0x080c, 0x1380, 0x080c, 0x22dd, 0x0804, 0x2f9a, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x22a2,
-	0x080c, 0x248e, 0x080c, 0x1380, 0x0804, 0x2f9a, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x22a2,
-	0x080c, 0x1380, 0x080c, 0x22dd, 0x0804, 0x2f9a, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x1380,
-	0x080c, 0x22dd, 0x0804, 0x2f9a, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x22a2, 0x080c, 0x248e,
-	0x080c, 0x1380, 0x080c, 0x22dd, 0x0804, 0x2f9a, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x294e,
-	0x0804, 0x2f9a, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
-	0x0146, 0x0156, 0x080c, 0x294e, 0x080c, 0x248e, 0x0804, 0x2f9a,
+	0x080c, 0x297f, 0x080c, 0x230e, 0x0804, 0x2fec, 0x0106, 0x0006,
+	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x297f,
+	0x080c, 0x24bf, 0x080c, 0x230e, 0x0804, 0x2fec, 0x0106, 0x0006,
+	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x297f,
+	0x080c, 0x22d3, 0x080c, 0x230e, 0x0804, 0x2fec, 0x0106, 0x0006,
+	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x297f,
+	0x080c, 0x22d3, 0x080c, 0x24bf, 0x080c, 0x230e, 0x0804, 0x2fec,
 	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
-	0x080c, 0x294e, 0x080c, 0x22a2, 0x0804, 0x2f9a, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x294e,
-	0x080c, 0x22a2, 0x080c, 0x248e, 0x0804, 0x2f9a, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x294e,
-	0x080c, 0x22dd, 0x0804, 0x2f9a, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x294e, 0x080c, 0x248e,
-	0x080c, 0x22dd, 0x0804, 0x2f9a, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x294e, 0x080c, 0x22a2,
-	0x080c, 0x22dd, 0x0804, 0x2f9a, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x294e, 0x080c, 0x22a2,
-	0x080c, 0x248e, 0x080c, 0x22dd, 0x0804, 0x2f9a, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x294e,
-	0x080c, 0x1380, 0x0804, 0x2f9a, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x294e, 0x080c, 0x248e,
-	0x080c, 0x1380, 0x0804, 0x2f9a, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x294e, 0x080c, 0x22a2,
-	0x080c, 0x1380, 0x0804, 0x2f9a, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x294e, 0x080c, 0x248e,
-	0x080c, 0x1380, 0x080c, 0x22dd, 0x0804, 0x2f9a, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x294e,
-	0x080c, 0x22a2, 0x080c, 0x248e, 0x080c, 0x1380, 0x0498, 0x0106,
-	0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c,
-	0x294e, 0x080c, 0x22a2, 0x080c, 0x1380, 0x080c, 0x22dd, 0x0410,
+	0x080c, 0x297f, 0x080c, 0x1380, 0x0804, 0x2fec, 0x0106, 0x0006,
+	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x297f,
+	0x080c, 0x24bf, 0x080c, 0x1380, 0x0804, 0x2fec, 0x0106, 0x0006,
+	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x297f,
+	0x080c, 0x22d3, 0x080c, 0x1380, 0x0804, 0x2fec, 0x0106, 0x0006,
+	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x297f,
+	0x080c, 0x24bf, 0x080c, 0x1380, 0x080c, 0x230e, 0x0804, 0x2fec,
 	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
-	0x080c, 0x294e, 0x080c, 0x1380, 0x080c, 0x22dd, 0x0098, 0x0106,
-	0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c,
-	0x294e, 0x080c, 0x22a2, 0x080c, 0x248e, 0x080c, 0x1380, 0x080c,
-	0x22dd, 0x0000, 0x015e, 0x014e, 0x013e, 0x01de, 0x01ce, 0x012e,
-	0x000e, 0x010e, 0x000d, 0x00b6, 0x00c6, 0x0026, 0x0046, 0x9026,
-	0x080c, 0x6947, 0x1904, 0x30b3, 0x72dc, 0x2001, 0x197b, 0x2004,
-	0x9005, 0x1110, 0xd29c, 0x0148, 0xd284, 0x1138, 0xd2bc, 0x1904,
-	0x30b3, 0x080c, 0x30b8, 0x0804, 0x30b3, 0xd2cc, 0x1904, 0x30b3,
-	0x080c, 0x73b3, 0x1120, 0x70af, 0xffff, 0x0804, 0x30b3, 0xd294,
-	0x0120, 0x70af, 0xffff, 0x0804, 0x30b3, 0x080c, 0x3321, 0x0160,
-	0x080c, 0xd25a, 0x0128, 0x2001, 0x1818, 0x203c, 0x0804, 0x3040,
-	0x70af, 0xffff, 0x0804, 0x30b3, 0x2001, 0x1818, 0x203c, 0x7294,
-	0xd284, 0x0904, 0x3040, 0xd28c, 0x1904, 0x3040, 0x0036, 0x73ac,
-	0x938e, 0xffff, 0x1110, 0x2019, 0x0001, 0x8314, 0x92e0, 0x1c80,
-	0x2c04, 0x938c, 0x0001, 0x0120, 0x9084, 0xff00, 0x8007, 0x0010,
-	0x9084, 0x00ff, 0x970e, 0x05d0, 0x908e, 0x0000, 0x05b8, 0x908e,
-	0x00ff, 0x1150, 0x7230, 0xd284, 0x15b0, 0x7294, 0xc28d, 0x7296,
-	0x70af, 0xffff, 0x003e, 0x04a0, 0x900e, 0x080c, 0x284b, 0x080c,
-	0x65b5, 0x1538, 0x9006, 0xb8bb, 0x0520, 0xb8ac, 0x9005, 0x0148,
-	0x00c6, 0x2060, 0x080c, 0x8987, 0x00ce, 0x090c, 0x8d2d, 0xb8af,
-	0x0000, 0x080c, 0x6989, 0x1168, 0x7030, 0xd08c, 0x0130, 0xb800,
-	0xd0bc, 0x0138, 0x080c, 0x6836, 0x0120, 0x080c, 0x30d1, 0x0148,
-	0x0028, 0x080c, 0x3211, 0x080c, 0x30fd, 0x0118, 0x8318, 0x0804,
-	0x2fed, 0x73ae, 0x0010, 0x70af, 0xffff, 0x003e, 0x0804, 0x30b3,
-	0x9780, 0x3332, 0x203d, 0x97bc, 0xff00, 0x873f, 0x2041, 0x007e,
-	0x70ac, 0x9096, 0xffff, 0x1118, 0x900e, 0x28a8, 0x0050, 0x9812,
-	0x0220, 0x2008, 0x9802, 0x20a8, 0x0020, 0x70af, 0xffff, 0x0804,
-	0x30b3, 0x2700, 0x0156, 0x0016, 0x9106, 0x0904, 0x30a8, 0xc484,
-	0x080c, 0x6616, 0x0148, 0x080c, 0xd25a, 0x1904, 0x30a8, 0x080c,
-	0x65b5, 0x1904, 0x30b0, 0x0008, 0xc485, 0xb8bb, 0x0520, 0xb8ac,
-	0x9005, 0x0148, 0x00c6, 0x2060, 0x080c, 0x8987, 0x00ce, 0x090c,
-	0x8d2d, 0xb8af, 0x0000, 0x080c, 0x6989, 0x1130, 0x7030, 0xd08c,
-	0x01f8, 0xb800, 0xd0bc, 0x11e0, 0x7294, 0xd28c, 0x0180, 0x080c,
-	0x6989, 0x9082, 0x0006, 0x02e0, 0xd484, 0x1118, 0x080c, 0x65da,
-	0x0028, 0x080c, 0x329d, 0x01a0, 0x080c, 0x32c8, 0x0088, 0x080c,
-	0x3211, 0x080c, 0xd25a, 0x1160, 0x080c, 0x30fd, 0x0188, 0x0040,
-	0x080c, 0xd25a, 0x1118, 0x080c, 0x329d, 0x0110, 0x0451, 0x0140,
-	0x001e, 0x8108, 0x015e, 0x1f04, 0x3059, 0x70af, 0xffff, 0x0018,
-	0x001e, 0x015e, 0x71ae, 0x004e, 0x002e, 0x00ce, 0x00be, 0x0005,
-	0x00c6, 0x0016, 0x70af, 0x0001, 0x2009, 0x007e, 0x080c, 0x65b5,
-	0x1168, 0xb813, 0x00ff, 0xb817, 0xfffe, 0x080c, 0x3211, 0x04a9,
-	0x0128, 0x70dc, 0xc0bd, 0x70de, 0x080c, 0xcfab, 0x001e, 0x00ce,
-	0x0005, 0x0016, 0x0076, 0x00d6, 0x00c6, 0x2001, 0x184c, 0x2004,
-	0x9084, 0x00ff, 0xb842, 0x080c, 0xaead, 0x01d0, 0x2b00, 0x6012,
-	0x080c, 0xcfd4, 0x6023, 0x0001, 0x9006, 0x080c, 0x6552, 0x2001,
-	0x0000, 0x080c, 0x6566, 0x0126, 0x2091, 0x8000, 0x70a8, 0x8000,
-	0x70aa, 0x012e, 0x2009, 0x0004, 0x080c, 0xaeda, 0x9085, 0x0001,
-	0x00ce, 0x00de, 0x007e, 0x001e, 0x0005, 0x0016, 0x0076, 0x00d6,
-	0x00c6, 0x2001, 0x184c, 0x2004, 0x9084, 0x00ff, 0xb842, 0x080c,
-	0xaead, 0x0548, 0x2b00, 0x6012, 0xb800, 0xc0c4, 0xb802, 0xb8a0,
-	0x9086, 0x007e, 0x0140, 0xb804, 0x9084, 0x00ff, 0x9086, 0x0006,
-	0x1110, 0x080c, 0x31cc, 0x080c, 0xcfd4, 0x6023, 0x0001, 0x9006,
-	0x080c, 0x6552, 0x2001, 0x0002, 0x080c, 0x6566, 0x0126, 0x2091,
-	0x8000, 0x70a8, 0x8000, 0x70aa, 0x012e, 0x2009, 0x0002, 0x080c,
-	0xaeda, 0x9085, 0x0001, 0x00ce, 0x00de, 0x007e, 0x001e, 0x0005,
-	0x00b6, 0x00c6, 0x0026, 0x2009, 0x0080, 0x080c, 0x65b5, 0x1140,
-	0xb813, 0x00ff, 0xb817, 0xfffc, 0x0039, 0x0110, 0x70e3, 0xffff,
-	0x002e, 0x00ce, 0x00be, 0x0005, 0x0016, 0x0076, 0x00d6, 0x00c6,
-	0x080c, 0xae09, 0x01d0, 0x2b00, 0x6012, 0x080c, 0xcfd4, 0x6023,
-	0x0001, 0x9006, 0x080c, 0x6552, 0x2001, 0x0002, 0x080c, 0x6566,
-	0x0126, 0x2091, 0x8000, 0x70e4, 0x8000, 0x70e6, 0x012e, 0x2009,
-	0x0002, 0x080c, 0xaeda, 0x9085, 0x0001, 0x00ce, 0x00de, 0x007e,
-	0x001e, 0x0005, 0x00c6, 0x00d6, 0x0126, 0x2091, 0x8000, 0x2009,
-	0x007f, 0x080c, 0x65b5, 0x11b8, 0xb813, 0x00ff, 0xb817, 0xfffd,
-	0xb8cf, 0x0004, 0x080c, 0xae09, 0x0170, 0x2b00, 0x6012, 0x6316,
-	0x6023, 0x0001, 0x620a, 0x080c, 0xcfd4, 0x2009, 0x0022, 0x080c,
-	0xaeda, 0x9085, 0x0001, 0x012e, 0x00de, 0x00ce, 0x0005, 0x00e6,
-	0x00c6, 0x0066, 0x0036, 0x0026, 0x00b6, 0x21f0, 0x080c, 0x92a8,
-	0x080c, 0x9228, 0x080c, 0xac9d, 0x080c, 0xbd87, 0x3e08, 0x2130,
-	0x81ff, 0x0120, 0x20a9, 0x007e, 0x900e, 0x0018, 0x20a9, 0x007f,
-	0x900e, 0x0016, 0x080c, 0x6616, 0x1140, 0x9686, 0x0002, 0x1118,
-	0xb800, 0xd0bc, 0x1110, 0x080c, 0x6047, 0x001e, 0x8108, 0x1f04,
-	0x31b1, 0x9686, 0x0001, 0x190c, 0x32f5, 0x00be, 0x002e, 0x003e,
-	0x006e, 0x00ce, 0x00ee, 0x0005, 0x00e6, 0x00c6, 0x0046, 0x0036,
-	0x0026, 0x0016, 0x00b6, 0x6210, 0x2258, 0xbaa0, 0x0026, 0x2019,
-	0x0029, 0x080c, 0x929d, 0x0076, 0x2039, 0x0000, 0x080c, 0x9170,
-	0x2c08, 0x080c, 0xe326, 0x007e, 0x001e, 0xba10, 0xbb14, 0xbcc0,
-	0x080c, 0x6047, 0xba12, 0xbb16, 0xbcc2, 0x00be, 0x001e, 0x002e,
-	0x003e, 0x004e, 0x00ce, 0x00ee, 0x0005, 0x00e6, 0x0006, 0x00b6,
-	0x6010, 0x2058, 0xb8a0, 0x00be, 0x9086, 0x0080, 0x0150, 0x2071,
-	0x1800, 0x70a8, 0x9005, 0x0110, 0x8001, 0x70aa, 0x000e, 0x00ee,
-	0x0005, 0x2071, 0x1800, 0x70e4, 0x9005, 0x0dc0, 0x8001, 0x70e6,
-	0x0ca8, 0xb800, 0xc08c, 0xb802, 0x0005, 0x00f6, 0x00e6, 0x00c6,
-	0x00b6, 0x0046, 0x0036, 0x0026, 0x0016, 0x0156, 0x2178, 0x81ff,
-	0x1118, 0x20a9, 0x0001, 0x0078, 0x080c, 0x56e2, 0xd0c4, 0x0140,
-	0xd0a4, 0x0130, 0x9006, 0x2020, 0x2009, 0x002d, 0x080c, 0xe5e9,
-	0x20a9, 0x0800, 0x9016, 0x0026, 0x928e, 0x007e, 0x0904, 0x327c,
-	0x928e, 0x007f, 0x0904, 0x327c, 0x928e, 0x0080, 0x05e8, 0x9288,
-	0x1000, 0x210c, 0x81ff, 0x05c0, 0x8fff, 0x1148, 0x2001, 0x198d,
-	0x0006, 0x2003, 0x0001, 0x04f1, 0x000e, 0x2003, 0x0000, 0x00b6,
-	0x00c6, 0x2158, 0x2001, 0x0001, 0x080c, 0x6953, 0x00ce, 0x00be,
-	0x2019, 0x0029, 0x080c, 0x929d, 0x0076, 0x2039, 0x0000, 0x080c,
-	0x9170, 0x00b6, 0x00c6, 0x0026, 0x2158, 0xba04, 0x9294, 0x00ff,
-	0x9286, 0x0006, 0x1118, 0xb807, 0x0404, 0x0028, 0x2001, 0x0004,
-	0x8007, 0x9215, 0xba06, 0x002e, 0x00ce, 0x00be, 0x0016, 0x2c08,
-	0x080c, 0xe326, 0x001e, 0x007e, 0x002e, 0x8210, 0x1f04, 0x3233,
-	0x015e, 0x001e, 0x002e, 0x003e, 0x004e, 0x00be, 0x00ce, 0x00ee,
-	0x00fe, 0x0005, 0x0046, 0x0026, 0x0016, 0x080c, 0x56e2, 0xd0c4,
-	0x0140, 0xd0a4, 0x0130, 0x9006, 0x2220, 0x2009, 0x0029, 0x080c,
-	0xe5e9, 0x001e, 0x002e, 0x004e, 0x0005, 0x0016, 0x0026, 0x0036,
-	0x00c6, 0x7294, 0x82ff, 0x01e8, 0x080c, 0x6981, 0x11d0, 0x2100,
-	0x080c, 0x287e, 0x81ff, 0x01b8, 0x2019, 0x0001, 0x8314, 0x92e0,
-	0x1c80, 0x2c04, 0xd384, 0x0120, 0x9084, 0xff00, 0x8007, 0x0010,
-	0x9084, 0x00ff, 0x9116, 0x0138, 0x9096, 0x00ff, 0x0110, 0x8318,
-	0x0c68, 0x9085, 0x0001, 0x00ce, 0x003e, 0x002e, 0x001e, 0x0005,
-	0x0016, 0x00c6, 0x0126, 0x2091, 0x8000, 0x0036, 0x2019, 0x0029,
-	0x00a9, 0x003e, 0x9180, 0x1000, 0x2004, 0x9065, 0x0158, 0x0016,
-	0x00c6, 0x2061, 0x1aaf, 0x001e, 0x6112, 0x080c, 0x31cc, 0x001e,
-	0x080c, 0x65da, 0x012e, 0x00ce, 0x001e, 0x0005, 0x0016, 0x0026,
-	0x2110, 0x080c, 0xa7f8, 0x080c, 0xe952, 0x002e, 0x001e, 0x0005,
-	0x2001, 0x1837, 0x2004, 0xd0cc, 0x0005, 0x00c6, 0x00b6, 0x080c,
-	0x73b3, 0x1118, 0x20a9, 0x0800, 0x0010, 0x20a9, 0x0782, 0x080c,
-	0x73b3, 0x1110, 0x900e, 0x0010, 0x2009, 0x007e, 0x9180, 0x1000,
-	0x2004, 0x905d, 0x0130, 0x86ff, 0x0110, 0xb800, 0xd0bc, 0x090c,
-	0x65da, 0x8108, 0x1f04, 0x3306, 0x2061, 0x1800, 0x607f, 0x0000,
-	0x6080, 0x9084, 0x00ff, 0x6082, 0x60b3, 0x0000, 0x00be, 0x00ce,
-	0x0005, 0x2001, 0x1869, 0x2004, 0xd0bc, 0x0005, 0x2011, 0x1848,
-	0x2214, 0xd2ec, 0x0005, 0x0026, 0x2011, 0x1867, 0x2214, 0xd2dc,
-	0x002e, 0x0005, 0x7eef, 0x7de8, 0x7ce4, 0x80e2, 0x7be1, 0x80e0,
-	0x80dc, 0x80da, 0x7ad9, 0x80d6, 0x80d5, 0x80d4, 0x80d3, 0x80d2,
-	0x80d1, 0x79ce, 0x78cd, 0x80cc, 0x80cb, 0x80ca, 0x80c9, 0x80c7,
-	0x80c6, 0x77c5, 0x76c3, 0x80bc, 0x80ba, 0x75b9, 0x80b6, 0x74b5,
-	0x73b4, 0x72b3, 0x80b2, 0x80b1, 0x80ae, 0x71ad, 0x80ac, 0x70ab,
-	0x6faa, 0x6ea9, 0x80a7, 0x6da6, 0x6ca5, 0x6ba3, 0x6a9f, 0x699e,
-	0x689d, 0x809b, 0x8098, 0x6797, 0x6690, 0x658f, 0x6488, 0x6384,
-	0x6282, 0x8081, 0x8080, 0x617c, 0x607a, 0x8079, 0x5f76, 0x8075,
-	0x8074, 0x8073, 0x8072, 0x8071, 0x806e, 0x5e6d, 0x806c, 0x5d6b,
-	0x5c6a, 0x5b69, 0x8067, 0x5a66, 0x5965, 0x5863, 0x575c, 0x565a,
-	0x5559, 0x8056, 0x8055, 0x5454, 0x5353, 0x5252, 0x5151, 0x504e,
-	0x4f4d, 0x804c, 0x804b, 0x4e4a, 0x4d49, 0x8047, 0x4c46, 0x8045,
-	0x8043, 0x803c, 0x803a, 0x8039, 0x8036, 0x4b35, 0x8034, 0x4a33,
-	0x4932, 0x4831, 0x802e, 0x472d, 0x462c, 0x452b, 0x442a, 0x4329,
-	0x4227, 0x8026, 0x8025, 0x4123, 0x401f, 0x3f1e, 0x3e1d, 0x3d1b,
-	0x3c18, 0x8017, 0x8010, 0x3b0f, 0x3a08, 0x8004, 0x3902, 0x8001,
-	0x8000, 0x8000, 0x3800, 0x3700, 0x3600, 0x8000, 0x3500, 0x8000,
-	0x8000, 0x8000, 0x3400, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
-	0x8000, 0x3300, 0x3200, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
-	0x8000, 0x3100, 0x3000, 0x8000, 0x8000, 0x2f00, 0x8000, 0x2e00,
-	0x2d00, 0x2c00, 0x8000, 0x8000, 0x8000, 0x2b00, 0x8000, 0x2a00,
-	0x2900, 0x2800, 0x8000, 0x2700, 0x2600, 0x2500, 0x2400, 0x2300,
-	0x2200, 0x8000, 0x8000, 0x2100, 0x2000, 0x1f00, 0x1e00, 0x1d00,
-	0x1c00, 0x8000, 0x8000, 0x1b00, 0x1a00, 0x8000, 0x1900, 0x8000,
-	0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x1800, 0x8000, 0x1700,
-	0x1600, 0x1500, 0x8000, 0x1400, 0x1300, 0x1200, 0x1100, 0x1000,
-	0x0f00, 0x8000, 0x8000, 0x0e00, 0x0d00, 0x0c00, 0x0b00, 0x0a00,
-	0x0900, 0x8000, 0x8000, 0x0800, 0x0700, 0x8000, 0x0600, 0x8000,
-	0x8000, 0x8000, 0x0500, 0x0400, 0x0300, 0x8000, 0x0200, 0x8000,
-	0x8000, 0x8000, 0x0100, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
-	0x8000, 0x0000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
+	0x080c, 0x297f, 0x080c, 0x22d3, 0x080c, 0x24bf, 0x080c, 0x1380,
+	0x0498, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
+	0x0156, 0x080c, 0x297f, 0x080c, 0x22d3, 0x080c, 0x1380, 0x080c,
+	0x230e, 0x0410, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
+	0x0146, 0x0156, 0x080c, 0x297f, 0x080c, 0x1380, 0x080c, 0x230e,
+	0x0098, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
+	0x0156, 0x080c, 0x297f, 0x080c, 0x22d3, 0x080c, 0x24bf, 0x080c,
+	0x1380, 0x080c, 0x230e, 0x0000, 0x015e, 0x014e, 0x013e, 0x01de,
+	0x01ce, 0x012e, 0x000e, 0x010e, 0x000d, 0x00b6, 0x00c6, 0x0026,
+	0x0046, 0x9026, 0x080c, 0x69ca, 0x1904, 0x3105, 0x72dc, 0x2001,
+	0x197b, 0x2004, 0x9005, 0x1110, 0xd29c, 0x0148, 0xd284, 0x1138,
+	0xd2bc, 0x1904, 0x3105, 0x080c, 0x310a, 0x0804, 0x3105, 0xd2cc,
+	0x1904, 0x3105, 0x080c, 0x743e, 0x1120, 0x70af, 0xffff, 0x0804,
+	0x3105, 0xd294, 0x0120, 0x70af, 0xffff, 0x0804, 0x3105, 0x080c,
+	0x3373, 0x0160, 0x080c, 0xd388, 0x0128, 0x2001, 0x1818, 0x203c,
+	0x0804, 0x3092, 0x70af, 0xffff, 0x0804, 0x3105, 0x2001, 0x1818,
+	0x203c, 0x7294, 0xd284, 0x0904, 0x3092, 0xd28c, 0x1904, 0x3092,
+	0x0036, 0x73ac, 0x938e, 0xffff, 0x1110, 0x2019, 0x0001, 0x8314,
+	0x92e0, 0x1c80, 0x2c04, 0x938c, 0x0001, 0x0120, 0x9084, 0xff00,
+	0x8007, 0x0010, 0x9084, 0x00ff, 0x970e, 0x05d0, 0x908e, 0x0000,
+	0x05b8, 0x908e, 0x00ff, 0x1150, 0x7230, 0xd284, 0x15b0, 0x7294,
+	0xc28d, 0x7296, 0x70af, 0xffff, 0x003e, 0x04a0, 0x900e, 0x080c,
+	0x287c, 0x080c, 0x6638, 0x1538, 0x9006, 0xb8bb, 0x0520, 0xb8ac,
+	0x9005, 0x0148, 0x00c6, 0x2060, 0x080c, 0x8a3d, 0x00ce, 0x090c,
+	0x8dda, 0xb8af, 0x0000, 0x080c, 0x6a0c, 0x1168, 0x7030, 0xd08c,
+	0x0130, 0xb800, 0xd0bc, 0x0138, 0x080c, 0x68b9, 0x0120, 0x080c,
+	0x3123, 0x0148, 0x0028, 0x080c, 0x3263, 0x080c, 0x314f, 0x0118,
+	0x8318, 0x0804, 0x303f, 0x73ae, 0x0010, 0x70af, 0xffff, 0x003e,
+	0x0804, 0x3105, 0x9780, 0x3384, 0x203d, 0x97bc, 0xff00, 0x873f,
+	0x2041, 0x007e, 0x70ac, 0x9096, 0xffff, 0x1118, 0x900e, 0x28a8,
+	0x0050, 0x9812, 0x0220, 0x2008, 0x9802, 0x20a8, 0x0020, 0x70af,
+	0xffff, 0x0804, 0x3105, 0x2700, 0x0156, 0x0016, 0x9106, 0x0904,
+	0x30fa, 0xc484, 0x080c, 0x6699, 0x0148, 0x080c, 0xd388, 0x1904,
+	0x30fa, 0x080c, 0x6638, 0x1904, 0x3102, 0x0008, 0xc485, 0xb8bb,
+	0x0520, 0xb8ac, 0x9005, 0x0148, 0x00c6, 0x2060, 0x080c, 0x8a3d,
+	0x00ce, 0x090c, 0x8dda, 0xb8af, 0x0000, 0x080c, 0x6a0c, 0x1130,
+	0x7030, 0xd08c, 0x01f8, 0xb800, 0xd0bc, 0x11e0, 0x7294, 0xd28c,
+	0x0180, 0x080c, 0x6a0c, 0x9082, 0x0006, 0x02e0, 0xd484, 0x1118,
+	0x080c, 0x665d, 0x0028, 0x080c, 0x32ef, 0x01a0, 0x080c, 0x331a,
+	0x0088, 0x080c, 0x3263, 0x080c, 0xd388, 0x1160, 0x080c, 0x314f,
+	0x0188, 0x0040, 0x080c, 0xd388, 0x1118, 0x080c, 0x32ef, 0x0110,
+	0x0451, 0x0140, 0x001e, 0x8108, 0x015e, 0x1f04, 0x30ab, 0x70af,
+	0xffff, 0x0018, 0x001e, 0x015e, 0x71ae, 0x004e, 0x002e, 0x00ce,
+	0x00be, 0x0005, 0x00c6, 0x0016, 0x70af, 0x0001, 0x2009, 0x007e,
+	0x080c, 0x6638, 0x1168, 0xb813, 0x00ff, 0xb817, 0xfffe, 0x080c,
+	0x3263, 0x04a9, 0x0128, 0x70dc, 0xc0bd, 0x70de, 0x080c, 0xd0d9,
+	0x001e, 0x00ce, 0x0005, 0x0016, 0x0076, 0x00d6, 0x00c6, 0x2001,
+	0x184c, 0x2004, 0x9084, 0x00ff, 0xb842, 0x080c, 0xaf91, 0x01d0,
+	0x2b00, 0x6012, 0x080c, 0xd102, 0x6023, 0x0001, 0x9006, 0x080c,
+	0x65d5, 0x2001, 0x0000, 0x080c, 0x65e9, 0x0126, 0x2091, 0x8000,
+	0x70a8, 0x8000, 0x70aa, 0x012e, 0x2009, 0x0004, 0x080c, 0xafbe,
+	0x9085, 0x0001, 0x00ce, 0x00de, 0x007e, 0x001e, 0x0005, 0x0016,
+	0x0076, 0x00d6, 0x00c6, 0x2001, 0x184c, 0x2004, 0x9084, 0x00ff,
+	0xb842, 0x080c, 0xaf91, 0x0548, 0x2b00, 0x6012, 0xb800, 0xc0c4,
+	0xb802, 0xb8a0, 0x9086, 0x007e, 0x0140, 0xb804, 0x9084, 0x00ff,
+	0x9086, 0x0006, 0x1110, 0x080c, 0x321e, 0x080c, 0xd102, 0x6023,
+	0x0001, 0x9006, 0x080c, 0x65d5, 0x2001, 0x0002, 0x080c, 0x65e9,
+	0x0126, 0x2091, 0x8000, 0x70a8, 0x8000, 0x70aa, 0x012e, 0x2009,
+	0x0002, 0x080c, 0xafbe, 0x9085, 0x0001, 0x00ce, 0x00de, 0x007e,
+	0x001e, 0x0005, 0x00b6, 0x00c6, 0x0026, 0x2009, 0x0080, 0x080c,
+	0x6638, 0x1140, 0xb813, 0x00ff, 0xb817, 0xfffc, 0x0039, 0x0110,
+	0x70e3, 0xffff, 0x002e, 0x00ce, 0x00be, 0x0005, 0x0016, 0x0076,
+	0x00d6, 0x00c6, 0x080c, 0xaeed, 0x01d0, 0x2b00, 0x6012, 0x080c,
+	0xd102, 0x6023, 0x0001, 0x9006, 0x080c, 0x65d5, 0x2001, 0x0002,
+	0x080c, 0x65e9, 0x0126, 0x2091, 0x8000, 0x70e4, 0x8000, 0x70e6,
+	0x012e, 0x2009, 0x0002, 0x080c, 0xafbe, 0x9085, 0x0001, 0x00ce,
+	0x00de, 0x007e, 0x001e, 0x0005, 0x00c6, 0x00d6, 0x0126, 0x2091,
+	0x8000, 0x2009, 0x007f, 0x080c, 0x6638, 0x11b8, 0xb813, 0x00ff,
+	0xb817, 0xfffd, 0xb8cf, 0x0004, 0x080c, 0xaeed, 0x0170, 0x2b00,
+	0x6012, 0x6316, 0x6023, 0x0001, 0x620a, 0x080c, 0xd102, 0x2009,
+	0x0022, 0x080c, 0xafbe, 0x9085, 0x0001, 0x012e, 0x00de, 0x00ce,
+	0x0005, 0x00e6, 0x00c6, 0x0066, 0x0036, 0x0026, 0x00b6, 0x21f0,
+	0x080c, 0x9361, 0x080c, 0x92e1, 0x080c, 0xad81, 0x080c, 0xbe6b,
+	0x3e08, 0x2130, 0x81ff, 0x0120, 0x20a9, 0x007e, 0x900e, 0x0018,
+	0x20a9, 0x007f, 0x900e, 0x0016, 0x080c, 0x6699, 0x1140, 0x9686,
+	0x0002, 0x1118, 0xb800, 0xd0bc, 0x1110, 0x080c, 0x60c7, 0x001e,
+	0x8108, 0x1f04, 0x3203, 0x9686, 0x0001, 0x190c, 0x3347, 0x00be,
+	0x002e, 0x003e, 0x006e, 0x00ce, 0x00ee, 0x0005, 0x00e6, 0x00c6,
+	0x0046, 0x0036, 0x0026, 0x0016, 0x00b6, 0x6210, 0x2258, 0xbaa0,
+	0x0026, 0x2019, 0x0029, 0x080c, 0x9356, 0x0076, 0x2039, 0x0000,
+	0x080c, 0x9229, 0x2c08, 0x080c, 0xe477, 0x007e, 0x001e, 0xba10,
+	0xbb14, 0xbcc0, 0x080c, 0x60c7, 0xba12, 0xbb16, 0xbcc2, 0x00be,
+	0x001e, 0x002e, 0x003e, 0x004e, 0x00ce, 0x00ee, 0x0005, 0x00e6,
+	0x0006, 0x00b6, 0x6010, 0x2058, 0xb8a0, 0x00be, 0x9086, 0x0080,
+	0x0150, 0x2071, 0x1800, 0x70a8, 0x9005, 0x0110, 0x8001, 0x70aa,
+	0x000e, 0x00ee, 0x0005, 0x2071, 0x1800, 0x70e4, 0x9005, 0x0dc0,
+	0x8001, 0x70e6, 0x0ca8, 0xb800, 0xc08c, 0xb802, 0x0005, 0x00f6,
+	0x00e6, 0x00c6, 0x00b6, 0x0046, 0x0036, 0x0026, 0x0016, 0x0156,
+	0x2178, 0x81ff, 0x1118, 0x20a9, 0x0001, 0x0078, 0x080c, 0x575d,
+	0xd0c4, 0x0140, 0xd0a4, 0x0130, 0x9006, 0x2020, 0x2009, 0x002d,
+	0x080c, 0xe73a, 0x20a9, 0x0800, 0x9016, 0x0026, 0x928e, 0x007e,
+	0x0904, 0x32ce, 0x928e, 0x007f, 0x0904, 0x32ce, 0x928e, 0x0080,
+	0x05e8, 0x9288, 0x1000, 0x210c, 0x81ff, 0x05c0, 0x8fff, 0x1148,
+	0x2001, 0x198d, 0x0006, 0x2003, 0x0001, 0x04f1, 0x000e, 0x2003,
+	0x0000, 0x00b6, 0x00c6, 0x2158, 0x2001, 0x0001, 0x080c, 0x69d6,
+	0x00ce, 0x00be, 0x2019, 0x0029, 0x080c, 0x9356, 0x0076, 0x2039,
+	0x0000, 0x080c, 0x9229, 0x00b6, 0x00c6, 0x0026, 0x2158, 0xba04,
+	0x9294, 0x00ff, 0x9286, 0x0006, 0x1118, 0xb807, 0x0404, 0x0028,
+	0x2001, 0x0004, 0x8007, 0x9215, 0xba06, 0x002e, 0x00ce, 0x00be,
+	0x0016, 0x2c08, 0x080c, 0xe477, 0x001e, 0x007e, 0x002e, 0x8210,
+	0x1f04, 0x3285, 0x015e, 0x001e, 0x002e, 0x003e, 0x004e, 0x00be,
+	0x00ce, 0x00ee, 0x00fe, 0x0005, 0x0046, 0x0026, 0x0016, 0x080c,
+	0x575d, 0xd0c4, 0x0140, 0xd0a4, 0x0130, 0x9006, 0x2220, 0x2009,
+	0x0029, 0x080c, 0xe73a, 0x001e, 0x002e, 0x004e, 0x0005, 0x0016,
+	0x0026, 0x0036, 0x00c6, 0x7294, 0x82ff, 0x01e8, 0x080c, 0x6a04,
+	0x11d0, 0x2100, 0x080c, 0x28af, 0x81ff, 0x01b8, 0x2019, 0x0001,
+	0x8314, 0x92e0, 0x1c80, 0x2c04, 0xd384, 0x0120, 0x9084, 0xff00,
+	0x8007, 0x0010, 0x9084, 0x00ff, 0x9116, 0x0138, 0x9096, 0x00ff,
+	0x0110, 0x8318, 0x0c68, 0x9085, 0x0001, 0x00ce, 0x003e, 0x002e,
+	0x001e, 0x0005, 0x0016, 0x00c6, 0x0126, 0x2091, 0x8000, 0x0036,
+	0x2019, 0x0029, 0x00a9, 0x003e, 0x9180, 0x1000, 0x2004, 0x9065,
+	0x0158, 0x0016, 0x00c6, 0x2061, 0x1ab2, 0x001e, 0x6112, 0x080c,
+	0x321e, 0x001e, 0x080c, 0x665d, 0x012e, 0x00ce, 0x001e, 0x0005,
+	0x0016, 0x0026, 0x2110, 0x080c, 0xa8dc, 0x080c, 0xeaa3, 0x002e,
+	0x001e, 0x0005, 0x2001, 0x1837, 0x2004, 0xd0cc, 0x0005, 0x00c6,
+	0x00b6, 0x080c, 0x743e, 0x1118, 0x20a9, 0x0800, 0x0010, 0x20a9,
+	0x0782, 0x080c, 0x743e, 0x1110, 0x900e, 0x0010, 0x2009, 0x007e,
+	0x9180, 0x1000, 0x2004, 0x905d, 0x0130, 0x86ff, 0x0110, 0xb800,
+	0xd0bc, 0x090c, 0x665d, 0x8108, 0x1f04, 0x3358, 0x2061, 0x1800,
+	0x607f, 0x0000, 0x6080, 0x9084, 0x00ff, 0x6082, 0x60b3, 0x0000,
+	0x00be, 0x00ce, 0x0005, 0x2001, 0x1869, 0x2004, 0xd0bc, 0x0005,
+	0x2011, 0x1848, 0x2214, 0xd2ec, 0x0005, 0x0026, 0x2011, 0x1867,
+	0x2214, 0xd2dc, 0x002e, 0x0005, 0x7eef, 0x7de8, 0x7ce4, 0x80e2,
+	0x7be1, 0x80e0, 0x80dc, 0x80da, 0x7ad9, 0x80d6, 0x80d5, 0x80d4,
+	0x80d3, 0x80d2, 0x80d1, 0x79ce, 0x78cd, 0x80cc, 0x80cb, 0x80ca,
+	0x80c9, 0x80c7, 0x80c6, 0x77c5, 0x76c3, 0x80bc, 0x80ba, 0x75b9,
+	0x80b6, 0x74b5, 0x73b4, 0x72b3, 0x80b2, 0x80b1, 0x80ae, 0x71ad,
+	0x80ac, 0x70ab, 0x6faa, 0x6ea9, 0x80a7, 0x6da6, 0x6ca5, 0x6ba3,
+	0x6a9f, 0x699e, 0x689d, 0x809b, 0x8098, 0x6797, 0x6690, 0x658f,
+	0x6488, 0x6384, 0x6282, 0x8081, 0x8080, 0x617c, 0x607a, 0x8079,
+	0x5f76, 0x8075, 0x8074, 0x8073, 0x8072, 0x8071, 0x806e, 0x5e6d,
+	0x806c, 0x5d6b, 0x5c6a, 0x5b69, 0x8067, 0x5a66, 0x5965, 0x5863,
+	0x575c, 0x565a, 0x5559, 0x8056, 0x8055, 0x5454, 0x5353, 0x5252,
+	0x5151, 0x504e, 0x4f4d, 0x804c, 0x804b, 0x4e4a, 0x4d49, 0x8047,
+	0x4c46, 0x8045, 0x8043, 0x803c, 0x803a, 0x8039, 0x8036, 0x4b35,
+	0x8034, 0x4a33, 0x4932, 0x4831, 0x802e, 0x472d, 0x462c, 0x452b,
+	0x442a, 0x4329, 0x4227, 0x8026, 0x8025, 0x4123, 0x401f, 0x3f1e,
+	0x3e1d, 0x3d1b, 0x3c18, 0x8017, 0x8010, 0x3b0f, 0x3a08, 0x8004,
+	0x3902, 0x8001, 0x8000, 0x8000, 0x3800, 0x3700, 0x3600, 0x8000,
+	0x3500, 0x8000, 0x8000, 0x8000, 0x3400, 0x8000, 0x8000, 0x8000,
+	0x8000, 0x8000, 0x8000, 0x3300, 0x3200, 0x8000, 0x8000, 0x8000,
+	0x8000, 0x8000, 0x8000, 0x3100, 0x3000, 0x8000, 0x8000, 0x2f00,
+	0x8000, 0x2e00, 0x2d00, 0x2c00, 0x8000, 0x8000, 0x8000, 0x2b00,
+	0x8000, 0x2a00, 0x2900, 0x2800, 0x8000, 0x2700, 0x2600, 0x2500,
+	0x2400, 0x2300, 0x2200, 0x8000, 0x8000, 0x2100, 0x2000, 0x1f00,
+	0x1e00, 0x1d00, 0x1c00, 0x8000, 0x8000, 0x1b00, 0x1a00, 0x8000,
+	0x1900, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x1800,
+	0x8000, 0x1700, 0x1600, 0x1500, 0x8000, 0x1400, 0x1300, 0x1200,
+	0x1100, 0x1000, 0x0f00, 0x8000, 0x8000, 0x0e00, 0x0d00, 0x0c00,
+	0x0b00, 0x0a00, 0x0900, 0x8000, 0x8000, 0x0800, 0x0700, 0x8000,
+	0x0600, 0x8000, 0x8000, 0x8000, 0x0500, 0x0400, 0x0300, 0x8000,
+	0x0200, 0x8000, 0x8000, 0x8000, 0x0100, 0x8000, 0x8000, 0x8000,
+	0x8000, 0x8000, 0x8000, 0x0000, 0x8000, 0x8000, 0x8000, 0x8000,
 	0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
-	0x8000, 0x8000, 0x2071, 0x189e, 0x7003, 0x0002, 0x9006, 0x7016,
-	0x701a, 0x704a, 0x704e, 0x700e, 0x7042, 0x7046, 0x703b, 0x18ba,
-	0x703f, 0x18ba, 0x7007, 0x0001, 0x080c, 0x1018, 0x090c, 0x0dd5,
-	0x2900, 0x706a, 0xa867, 0x0002, 0xa8ab, 0xdcb0, 0x080c, 0x1018,
-	0x090c, 0x0dd5, 0x2900, 0x706e, 0xa867, 0x0002, 0xa8ab, 0xdcb0,
-	0x0005, 0x2071, 0x189e, 0x7004, 0x0002, 0x3461, 0x3462, 0x3475,
-	0x3489, 0x0005, 0x1004, 0x3472, 0x0e04, 0x3472, 0x2079, 0x0000,
-	0x0126, 0x2091, 0x8000, 0x700c, 0x9005, 0x1128, 0x700f, 0x0001,
-	0x012e, 0x0468, 0x0005, 0x012e, 0x0ce8, 0x2079, 0x0000, 0x2061,
-	0x18b8, 0x2c4c, 0xa86c, 0x908e, 0x0100, 0x0128, 0x9086, 0x0200,
-	0x0904, 0x355d, 0x0005, 0x7018, 0x2048, 0x2061, 0x1800, 0x701c,
-	0x0807, 0x7014, 0x2048, 0xa864, 0x9094, 0x00ff, 0x9296, 0x0029,
-	0x1120, 0xaa78, 0xd2fc, 0x0128, 0x0005, 0x9086, 0x0103, 0x0108,
-	0x0005, 0x2079, 0x0000, 0x2061, 0x1800, 0x701c, 0x0807, 0x2061,
-	0x1800, 0x7880, 0x908a, 0x0040, 0x1210, 0x61d0, 0x0042, 0x2100,
-	0x908a, 0x003f, 0x1a04, 0x355a, 0x61d0, 0x0804, 0x34ef, 0x3531,
-	0x3569, 0x355a, 0x3573, 0x357d, 0x3583, 0x3587, 0x3597, 0x359b,
-	0x35b1, 0x35b7, 0x35bd, 0x35c8, 0x35d3, 0x35e2, 0x35f1, 0x35ff,
-	0x3616, 0x3631, 0x355a, 0x36da, 0x3718, 0x37be, 0x37cf, 0x37f2,
-	0x355a, 0x355a, 0x355a, 0x382a, 0x3846, 0x384f, 0x387e, 0x3884,
-	0x355a, 0x38ca, 0x355a, 0x355a, 0x355a, 0x355a, 0x355a, 0x38d5,
-	0x38de, 0x38e6, 0x38e8, 0x355a, 0x355a, 0x355a, 0x355a, 0x355a,
-	0x355a, 0x3914, 0x355a, 0x355a, 0x355a, 0x355a, 0x355a, 0x3931,
-	0x3992, 0x355a, 0x355a, 0x355a, 0x355a, 0x355a, 0x355a, 0x0002,
-	0x39bc, 0x39bf, 0x3a1e, 0x3a37, 0x3a67, 0x3d05, 0x355a, 0x52bb,
-	0x355a, 0x355a, 0x355a, 0x355a, 0x355a, 0x355a, 0x355a, 0x355a,
-	0x35b1, 0x35b7, 0x4226, 0x5706, 0x4244, 0x534a, 0x539b, 0x549e,
-	0x355a, 0x5500, 0x553c, 0x556d, 0x5671, 0x559a, 0x55f1, 0x355a,
-	0x4248, 0x4409, 0x441f, 0x4444, 0x44a9, 0x451d, 0x453d, 0x45b4,
-	0x4610, 0x466c, 0x466f, 0x4694, 0x4730, 0x4796, 0x479e, 0x48d0,
-	0x4a48, 0x4a7c, 0x4ce0, 0x355a, 0x4cfe, 0x4da3, 0x4e85, 0x4edf,
-	0x355a, 0x4f94, 0x355a, 0x4ffa, 0x5015, 0x479e, 0x525b, 0x714c,
-	0x0000, 0x2021, 0x4000, 0x080c, 0x4afa, 0x0126, 0x2091, 0x8000,
-	0x0e04, 0x353b, 0x0010, 0x012e, 0x0cc0, 0x7c36, 0x9486, 0x4000,
-	0x0118, 0x7833, 0x0011, 0x0010, 0x7833, 0x0010, 0x7c82, 0x7986,
-	0x7a8a, 0x7b8e, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084,
-	0x190c, 0x119b, 0x7007, 0x0001, 0x2091, 0x5000, 0x700f, 0x0000,
-	0x012e, 0x0005, 0x2021, 0x4001, 0x08b0, 0x2021, 0x4002, 0x0898,
-	0x2021, 0x4003, 0x0880, 0x2021, 0x4005, 0x0868, 0x2021, 0x4006,
-	0x0850, 0x2039, 0x0001, 0x902e, 0x2520, 0x7b88, 0x7a8c, 0x7884,
-	0x7990, 0x0804, 0x4b07, 0x2039, 0x0001, 0x902e, 0x2520, 0x7b88,
-	0x7a8c, 0x7884, 0x7990, 0x0804, 0x4b0a, 0x7984, 0x7888, 0x2114,
-	0x200a, 0x0804, 0x3531, 0x7984, 0x2114, 0x0804, 0x3531, 0x20e1,
-	0x0000, 0x2099, 0x0021, 0x20e9, 0x0000, 0x20a1, 0x0021, 0x20a9,
-	0x001f, 0x4003, 0x7984, 0x7a88, 0x7b8c, 0x0804, 0x3531, 0x7884,
-	0x2060, 0x0804, 0x35e4, 0x2009, 0x0003, 0x2011, 0x0003, 0x2019,
-	0x0002, 0x789b, 0x0137, 0x7893, 0xffff, 0x2001, 0x188f, 0x2004,
-	0x9005, 0x0118, 0x7896, 0x0804, 0x3531, 0x7897, 0x0001, 0x0804,
-	0x3531, 0x2039, 0x0001, 0x7d98, 0x7c9c, 0x0804, 0x356d, 0x2039,
-	0x0001, 0x7d98, 0x7c9c, 0x0804, 0x3577, 0x79a0, 0x9182, 0x0040,
-	0x0210, 0x0804, 0x3566, 0x2138, 0x7d98, 0x7c9c, 0x0804, 0x356d,
-	0x79a0, 0x9182, 0x0040, 0x0210, 0x0804, 0x3566, 0x2138, 0x7d98,
-	0x7c9c, 0x0804, 0x3577, 0x79a0, 0x9182, 0x0040, 0x0210, 0x0804,
-	0x3566, 0x21e8, 0x7984, 0x7888, 0x20a9, 0x0001, 0x21a0, 0x4004,
-	0x0804, 0x3531, 0x2061, 0x0800, 0xe10c, 0x9006, 0x2c15, 0x9200,
-	0x8c60, 0x8109, 0x1dd8, 0x2010, 0x9005, 0x0904, 0x3531, 0x0804,
-	0x3560, 0x79a0, 0x9182, 0x0040, 0x0210, 0x0804, 0x3566, 0x21e0,
-	0x20a9, 0x0001, 0x7984, 0x2198, 0x4012, 0x0804, 0x3531, 0x2069,
-	0x1847, 0x7884, 0x7990, 0x911a, 0x1a04, 0x3566, 0x8019, 0x0904,
-	0x3566, 0x684a, 0x6942, 0x788c, 0x6852, 0x7888, 0x6856, 0x9006,
-	0x685a, 0x685e, 0x080c, 0x76ca, 0x0804, 0x3531, 0x2069, 0x1847,
-	0x7884, 0x7994, 0x911a, 0x1a04, 0x3566, 0x8019, 0x0904, 0x3566,
-	0x684e, 0x6946, 0x788c, 0x6862, 0x7888, 0x6866, 0x9006, 0x686a,
-	0x686e, 0x0126, 0x2091, 0x8000, 0x080c, 0x69ef, 0x012e, 0x0804,
-	0x3531, 0x902e, 0x2520, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804,
-	0x3563, 0x7984, 0x7b88, 0x7a8c, 0x20a9, 0x0005, 0x20e9, 0x0001,
-	0x20a1, 0x18a6, 0x4101, 0x080c, 0x4abe, 0x1120, 0x2009, 0x0002,
-	0x0804, 0x3563, 0x2009, 0x0020, 0xa85c, 0x9080, 0x0019, 0xaf60,
-	0x080c, 0x4b07, 0x701f, 0x3655, 0x0005, 0xa864, 0x2008, 0x9084,
-	0x00ff, 0x9096, 0x0011, 0x0168, 0x9096, 0x0019, 0x0150, 0x9096,
-	0x0015, 0x0138, 0x9096, 0x0048, 0x0120, 0x9096, 0x0029, 0x1904,
-	0x3563, 0x810f, 0x918c, 0x00ff, 0x0904, 0x3563, 0x7112, 0x7010,
-	0x8001, 0x0560, 0x7012, 0x080c, 0x4abe, 0x1120, 0x2009, 0x0002,
-	0x0804, 0x3563, 0x2009, 0x0020, 0x7068, 0x2040, 0xa28c, 0xa390,
-	0xa494, 0xa598, 0x9290, 0x0040, 0x9399, 0x0000, 0x94a1, 0x0000,
-	0x95a9, 0x0000, 0xa85c, 0x9080, 0x0019, 0xaf60, 0x080c, 0x4b07,
-	0x701f, 0x3693, 0x0005, 0xa864, 0x9084, 0x00ff, 0x9096, 0x0002,
-	0x0120, 0x9096, 0x000a, 0x1904, 0x3563, 0x0888, 0x7014, 0x2048,
-	0xa868, 0xc0fd, 0xa86a, 0xa864, 0x9084, 0x00ff, 0x9096, 0x0029,
-	0x1160, 0xc2fd, 0xaa7a, 0x080c, 0x619e, 0x0150, 0x0126, 0x2091,
-	0x8000, 0xa87a, 0xa982, 0x012e, 0x0050, 0x080c, 0x64cb, 0x1128,
-	0x7007, 0x0003, 0x701f, 0x36bf, 0x0005, 0x080c, 0x6ec7, 0x0126,
-	0x2091, 0x8000, 0x20a9, 0x0005, 0x20e1, 0x0001, 0x2099, 0x18a6,
-	0x400a, 0x2100, 0x9210, 0x9399, 0x0000, 0x94a1, 0x0000, 0x95a9,
-	0x0000, 0xa85c, 0x9080, 0x0019, 0x2009, 0x0020, 0x012e, 0xaf60,
-	0x0804, 0x4b0a, 0x2091, 0x8000, 0x7837, 0x4000, 0x7833, 0x0010,
-	0x7883, 0x4000, 0x7887, 0x4953, 0x788b, 0x5020, 0x788f, 0x2020,
-	0x2009, 0x017f, 0x2104, 0x7892, 0x3f00, 0x7896, 0x2061, 0x0100,
-	0x6200, 0x2061, 0x0200, 0x603c, 0x8007, 0x9205, 0x789a, 0x2009,
-	0x04fd, 0x2104, 0x789e, 0x2091, 0x5000, 0x2091, 0x4080, 0x2001,
-	0x0089, 0x2004, 0xd084, 0x0180, 0x2001, 0x1a18, 0x2004, 0x9005,
-	0x0128, 0x2001, 0x008b, 0x2004, 0xd0fc, 0x0dd8, 0x2001, 0x008a,
-	0x2003, 0x0002, 0x2003, 0x1001, 0x2071, 0x0080, 0x0804, 0x0427,
-	0x81ff, 0x1904, 0x3563, 0x7984, 0x080c, 0x6616, 0x1904, 0x3566,
-	0x7e98, 0x9684, 0x3fff, 0x9082, 0x4000, 0x1a04, 0x3566, 0x7c88,
-	0x7d8c, 0x080c, 0x6779, 0x080c, 0x6748, 0x0000, 0x1518, 0x2061,
+	0x8000, 0x8000, 0x8000, 0x8000, 0x2071, 0x189e, 0x7003, 0x0002,
+	0x9006, 0x7016, 0x701a, 0x704a, 0x704e, 0x700e, 0x7042, 0x7046,
+	0x703b, 0x18ba, 0x703f, 0x18ba, 0x7007, 0x0001, 0x080c, 0x1018,
+	0x090c, 0x0dd5, 0x2900, 0x706a, 0xa867, 0x0002, 0xa8ab, 0xdcb0,
+	0x080c, 0x1018, 0x090c, 0x0dd5, 0x2900, 0x706e, 0xa867, 0x0002,
+	0xa8ab, 0xdcb0, 0x0005, 0x2071, 0x189e, 0x7004, 0x0002, 0x34b3,
+	0x34b4, 0x34c7, 0x34db, 0x0005, 0x1004, 0x34c4, 0x0e04, 0x34c4,
+	0x2079, 0x0000, 0x0126, 0x2091, 0x8000, 0x700c, 0x9005, 0x1128,
+	0x700f, 0x0001, 0x012e, 0x0468, 0x0005, 0x012e, 0x0ce8, 0x2079,
+	0x0000, 0x2061, 0x18b8, 0x2c4c, 0xa86c, 0x908e, 0x0100, 0x0128,
+	0x9086, 0x0200, 0x0904, 0x35af, 0x0005, 0x7018, 0x2048, 0x2061,
+	0x1800, 0x701c, 0x0807, 0x7014, 0x2048, 0xa864, 0x9094, 0x00ff,
+	0x9296, 0x0029, 0x1120, 0xaa78, 0xd2fc, 0x0128, 0x0005, 0x9086,
+	0x0103, 0x0108, 0x0005, 0x2079, 0x0000, 0x2061, 0x1800, 0x701c,
+	0x0807, 0x2061, 0x1800, 0x7880, 0x908a, 0x0040, 0x1210, 0x61d0,
+	0x0042, 0x2100, 0x908a, 0x003f, 0x1a04, 0x35ac, 0x61d0, 0x0804,
+	0x3541, 0x3583, 0x35bb, 0x35ac, 0x35c5, 0x35cf, 0x35d5, 0x35d9,
+	0x35e9, 0x35ed, 0x3603, 0x3609, 0x360f, 0x361a, 0x3625, 0x3634,
+	0x3643, 0x3651, 0x3668, 0x3683, 0x35ac, 0x372c, 0x376a, 0x3810,
+	0x3821, 0x3844, 0x35ac, 0x35ac, 0x35ac, 0x387c, 0x3898, 0x38a1,
+	0x38d0, 0x38d6, 0x35ac, 0x391c, 0x35ac, 0x35ac, 0x35ac, 0x35ac,
+	0x35ac, 0x3927, 0x3930, 0x3938, 0x393a, 0x35ac, 0x35ac, 0x35ac,
+	0x35ac, 0x35ac, 0x35ac, 0x3966, 0x35ac, 0x35ac, 0x35ac, 0x35ac,
+	0x35ac, 0x3983, 0x39e4, 0x35ac, 0x35ac, 0x35ac, 0x35ac, 0x35ac,
+	0x35ac, 0x0002, 0x3a0e, 0x3a11, 0x3a70, 0x3a89, 0x3ab9, 0x3d57,
+	0x35ac, 0x5321, 0x35ac, 0x35ac, 0x35ac, 0x35ac, 0x35ac, 0x35ac,
+	0x35ac, 0x35ac, 0x3603, 0x3609, 0x4278, 0x5781, 0x4296, 0x53b0,
+	0x5401, 0x550c, 0x35ac, 0x556e, 0x55aa, 0x55db, 0x56e3, 0x5608,
+	0x5663, 0x35ac, 0x429a, 0x445b, 0x4471, 0x4496, 0x44fb, 0x456f,
+	0x458f, 0x4606, 0x4662, 0x46be, 0x46c1, 0x46e6, 0x4791, 0x47f7,
+	0x47ff, 0x4931, 0x4aa9, 0x4add, 0x4d41, 0x35ac, 0x4d5f, 0x4e05,
+	0x4ee7, 0x4f41, 0x35ac, 0x4ff8, 0x35ac, 0x5060, 0x507b, 0x47ff,
+	0x52c1, 0x714c, 0x0000, 0x2021, 0x4000, 0x080c, 0x4b5b, 0x0126,
+	0x2091, 0x8000, 0x0e04, 0x358d, 0x0010, 0x012e, 0x0cc0, 0x7c36,
+	0x9486, 0x4000, 0x0118, 0x7833, 0x0011, 0x0010, 0x7833, 0x0010,
+	0x7c82, 0x7986, 0x7a8a, 0x7b8e, 0x2091, 0x4080, 0x2001, 0x0089,
+	0x2004, 0xd084, 0x190c, 0x119b, 0x7007, 0x0001, 0x2091, 0x5000,
+	0x700f, 0x0000, 0x012e, 0x0005, 0x2021, 0x4001, 0x08b0, 0x2021,
+	0x4002, 0x0898, 0x2021, 0x4003, 0x0880, 0x2021, 0x4005, 0x0868,
+	0x2021, 0x4006, 0x0850, 0x2039, 0x0001, 0x902e, 0x2520, 0x7b88,
+	0x7a8c, 0x7884, 0x7990, 0x0804, 0x4b68, 0x2039, 0x0001, 0x902e,
+	0x2520, 0x7b88, 0x7a8c, 0x7884, 0x7990, 0x0804, 0x4b6b, 0x7984,
+	0x7888, 0x2114, 0x200a, 0x0804, 0x3583, 0x7984, 0x2114, 0x0804,
+	0x3583, 0x20e1, 0x0000, 0x2099, 0x0021, 0x20e9, 0x0000, 0x20a1,
+	0x0021, 0x20a9, 0x001f, 0x4003, 0x7984, 0x7a88, 0x7b8c, 0x0804,
+	0x3583, 0x7884, 0x2060, 0x0804, 0x3636, 0x2009, 0x0003, 0x2011,
+	0x0003, 0x2019, 0x0008, 0x789b, 0x0137, 0x7893, 0xffff, 0x2001,
+	0x188f, 0x2004, 0x9005, 0x0118, 0x7896, 0x0804, 0x3583, 0x7897,
+	0x0001, 0x0804, 0x3583, 0x2039, 0x0001, 0x7d98, 0x7c9c, 0x0804,
+	0x35bf, 0x2039, 0x0001, 0x7d98, 0x7c9c, 0x0804, 0x35c9, 0x79a0,
+	0x9182, 0x0040, 0x0210, 0x0804, 0x35b8, 0x2138, 0x7d98, 0x7c9c,
+	0x0804, 0x35bf, 0x79a0, 0x9182, 0x0040, 0x0210, 0x0804, 0x35b8,
+	0x2138, 0x7d98, 0x7c9c, 0x0804, 0x35c9, 0x79a0, 0x9182, 0x0040,
+	0x0210, 0x0804, 0x35b8, 0x21e8, 0x7984, 0x7888, 0x20a9, 0x0001,
+	0x21a0, 0x4004, 0x0804, 0x3583, 0x2061, 0x0800, 0xe10c, 0x9006,
+	0x2c15, 0x9200, 0x8c60, 0x8109, 0x1dd8, 0x2010, 0x9005, 0x0904,
+	0x3583, 0x0804, 0x35b2, 0x79a0, 0x9182, 0x0040, 0x0210, 0x0804,
+	0x35b8, 0x21e0, 0x20a9, 0x0001, 0x7984, 0x2198, 0x4012, 0x0804,
+	0x3583, 0x2069, 0x1847, 0x7884, 0x7990, 0x911a, 0x1a04, 0x35b8,
+	0x8019, 0x0904, 0x35b8, 0x684a, 0x6942, 0x788c, 0x6852, 0x7888,
+	0x6856, 0x9006, 0x685a, 0x685e, 0x080c, 0x7755, 0x0804, 0x3583,
+	0x2069, 0x1847, 0x7884, 0x7994, 0x911a, 0x1a04, 0x35b8, 0x8019,
+	0x0904, 0x35b8, 0x684e, 0x6946, 0x788c, 0x6862, 0x7888, 0x6866,
+	0x9006, 0x686a, 0x686e, 0x0126, 0x2091, 0x8000, 0x080c, 0x6a72,
+	0x012e, 0x0804, 0x3583, 0x902e, 0x2520, 0x81ff, 0x0120, 0x2009,
+	0x0001, 0x0804, 0x35b5, 0x7984, 0x7b88, 0x7a8c, 0x20a9, 0x0005,
+	0x20e9, 0x0001, 0x20a1, 0x18a6, 0x4101, 0x080c, 0x4b1f, 0x1120,
+	0x2009, 0x0002, 0x0804, 0x35b5, 0x2009, 0x0020, 0xa85c, 0x9080,
+	0x0019, 0xaf60, 0x080c, 0x4b68, 0x701f, 0x36a7, 0x0005, 0xa864,
+	0x2008, 0x9084, 0x00ff, 0x9096, 0x0011, 0x0168, 0x9096, 0x0019,
+	0x0150, 0x9096, 0x0015, 0x0138, 0x9096, 0x0048, 0x0120, 0x9096,
+	0x0029, 0x1904, 0x35b5, 0x810f, 0x918c, 0x00ff, 0x0904, 0x35b5,
+	0x7112, 0x7010, 0x8001, 0x0560, 0x7012, 0x080c, 0x4b1f, 0x1120,
+	0x2009, 0x0002, 0x0804, 0x35b5, 0x2009, 0x0020, 0x7068, 0x2040,
+	0xa28c, 0xa390, 0xa494, 0xa598, 0x9290, 0x0040, 0x9399, 0x0000,
+	0x94a1, 0x0000, 0x95a9, 0x0000, 0xa85c, 0x9080, 0x0019, 0xaf60,
+	0x080c, 0x4b68, 0x701f, 0x36e5, 0x0005, 0xa864, 0x9084, 0x00ff,
+	0x9096, 0x0002, 0x0120, 0x9096, 0x000a, 0x1904, 0x35b5, 0x0888,
+	0x7014, 0x2048, 0xa868, 0xc0fd, 0xa86a, 0xa864, 0x9084, 0x00ff,
+	0x9096, 0x0029, 0x1160, 0xc2fd, 0xaa7a, 0x080c, 0x621e, 0x0150,
+	0x0126, 0x2091, 0x8000, 0xa87a, 0xa982, 0x012e, 0x0050, 0x080c,
+	0x654e, 0x1128, 0x7007, 0x0003, 0x701f, 0x3711, 0x0005, 0x080c,
+	0x6f4a, 0x0126, 0x2091, 0x8000, 0x20a9, 0x0005, 0x20e1, 0x0001,
+	0x2099, 0x18a6, 0x400a, 0x2100, 0x9210, 0x9399, 0x0000, 0x94a1,
+	0x0000, 0x95a9, 0x0000, 0xa85c, 0x9080, 0x0019, 0x2009, 0x0020,
+	0x012e, 0xaf60, 0x0804, 0x4b6b, 0x2091, 0x8000, 0x7837, 0x4000,
+	0x7833, 0x0010, 0x7883, 0x4000, 0x7887, 0x4953, 0x788b, 0x5020,
+	0x788f, 0x2020, 0x2009, 0x017f, 0x2104, 0x7892, 0x3f00, 0x7896,
+	0x2061, 0x0100, 0x6200, 0x2061, 0x0200, 0x603c, 0x8007, 0x9205,
+	0x789a, 0x2009, 0x04fd, 0x2104, 0x789e, 0x2091, 0x5000, 0x2091,
+	0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x0180, 0x2001, 0x1a18,
+	0x2004, 0x9005, 0x0128, 0x2001, 0x008b, 0x2004, 0xd0fc, 0x0dd8,
+	0x2001, 0x008a, 0x2003, 0x0002, 0x2003, 0x1001, 0x2071, 0x0080,
+	0x0804, 0x0427, 0x81ff, 0x1904, 0x35b5, 0x7984, 0x080c, 0x6699,
+	0x1904, 0x35b8, 0x7e98, 0x9684, 0x3fff, 0x9082, 0x4000, 0x1a04,
+	0x35b8, 0x7c88, 0x7d8c, 0x080c, 0x67fc, 0x080c, 0x67cb, 0x0000,
+	0x1518, 0x2061, 0x1cd0, 0x0126, 0x2091, 0x8000, 0x6000, 0x9086,
+	0x0000, 0x0148, 0x6014, 0x904d, 0x0130, 0xa86c, 0x9406, 0x1118,
+	0xa870, 0x9506, 0x0150, 0x012e, 0x9ce0, 0x0018, 0x2001, 0x181a,
+	0x2004, 0x9c02, 0x1a04, 0x35b5, 0x0c30, 0x080c, 0xc8a5, 0x012e,
+	0x0904, 0x35b5, 0x0804, 0x3583, 0x900e, 0x2001, 0x0005, 0x080c,
+	0x6f4a, 0x0126, 0x2091, 0x8000, 0x080c, 0xcf82, 0x080c, 0x6d17,
+	0x012e, 0x0804, 0x3583, 0x00a6, 0x2950, 0xb198, 0x080c, 0x6699,
+	0x1904, 0x37fd, 0xb6a4, 0x9684, 0x3fff, 0x9082, 0x4000, 0x16e8,
+	0xb49c, 0xb5a0, 0x080c, 0x67fc, 0x080c, 0x67cb, 0x1520, 0x2061,
 	0x1cd0, 0x0126, 0x2091, 0x8000, 0x6000, 0x9086, 0x0000, 0x0148,
 	0x6014, 0x904d, 0x0130, 0xa86c, 0x9406, 0x1118, 0xa870, 0x9506,
-	0x0150, 0x012e, 0x9ce0, 0x0018, 0x2001, 0x181a, 0x2004, 0x9c02,
-	0x1a04, 0x3563, 0x0c30, 0x080c, 0xc77b, 0x012e, 0x0904, 0x3563,
-	0x0804, 0x3531, 0x900e, 0x2001, 0x0005, 0x080c, 0x6ec7, 0x0126,
-	0x2091, 0x8000, 0x080c, 0xce54, 0x080c, 0x6c94, 0x012e, 0x0804,
-	0x3531, 0x00a6, 0x2950, 0xb198, 0x080c, 0x6616, 0x1904, 0x37ab,
-	0xb6a4, 0x9684, 0x3fff, 0x9082, 0x4000, 0x16e8, 0xb49c, 0xb5a0,
-	0x080c, 0x6779, 0x080c, 0x6748, 0x1520, 0x2061, 0x1cd0, 0x0126,
-	0x2091, 0x8000, 0x6000, 0x9086, 0x0000, 0x0148, 0x6014, 0x904d,
-	0x0130, 0xa86c, 0x9406, 0x1118, 0xa870, 0x9506, 0x0158, 0x012e,
-	0x9ce0, 0x0018, 0x2001, 0x181a, 0x2004, 0x9c02, 0x2009, 0x000d,
-	0x12b0, 0x0c28, 0x080c, 0xc77b, 0x012e, 0x2009, 0x0003, 0x0178,
-	0x00e0, 0x900e, 0x2001, 0x0005, 0x080c, 0x6ec7, 0x0126, 0x2091,
-	0x8000, 0x080c, 0xce54, 0x080c, 0x6c88, 0x012e, 0x0070, 0xb097,
-	0x4005, 0xb19a, 0x0010, 0xb097, 0x4006, 0x900e, 0x9085, 0x0001,
-	0x2001, 0x0030, 0x2a48, 0x00ae, 0x0005, 0xb097, 0x4000, 0x9006,
-	0x918d, 0x0001, 0x2008, 0x2a48, 0x00ae, 0x0005, 0x81ff, 0x1904,
-	0x3563, 0x080c, 0x4ad5, 0x0904, 0x3566, 0x080c, 0x66dd, 0x0904,
-	0x3563, 0x080c, 0x677f, 0x0904, 0x3563, 0x0804, 0x4534, 0x81ff,
-	0x1904, 0x3563, 0x080c, 0x4af1, 0x0904, 0x3566, 0x080c, 0x680d,
-	0x0904, 0x3563, 0x2019, 0x0005, 0x79a8, 0x080c, 0x679a, 0x0904,
-	0x3563, 0x7888, 0x908a, 0x1000, 0x1a04, 0x3566, 0x8003, 0x800b,
-	0x810b, 0x9108, 0x080c, 0x8507, 0x7984, 0xd184, 0x1904, 0x3531,
-	0x0804, 0x4534, 0x0126, 0x2091, 0x8000, 0x81ff, 0x0118, 0x2009,
-	0x0001, 0x0450, 0x2029, 0x07ff, 0x645c, 0x2400, 0x9506, 0x01f8,
-	0x2508, 0x080c, 0x6616, 0x11d8, 0x080c, 0x680d, 0x1128, 0x2009,
-	0x0002, 0x62c0, 0x2518, 0x00c0, 0x2019, 0x0004, 0x900e, 0x080c,
-	0x679a, 0x1118, 0x2009, 0x0006, 0x0078, 0x7884, 0x908a, 0x1000,
-	0x1270, 0x8003, 0x800b, 0x810b, 0x9108, 0x080c, 0x8507, 0x8529,
-	0x1ae0, 0x012e, 0x0804, 0x3531, 0x012e, 0x0804, 0x3563, 0x012e,
-	0x0804, 0x3566, 0x080c, 0x4ad5, 0x0904, 0x3566, 0x080c, 0x66dd,
-	0x0904, 0x3563, 0xbaa0, 0x2019, 0x0005, 0x00c6, 0x9066, 0x080c,
-	0x929d, 0x0076, 0x903e, 0x080c, 0x9170, 0x900e, 0x080c, 0xe326,
-	0x007e, 0x00ce, 0x080c, 0x6779, 0x0804, 0x3531, 0x080c, 0x4ad5,
-	0x0904, 0x3566, 0x080c, 0x6779, 0x2208, 0x0804, 0x3531, 0x0156,
-	0x00d6, 0x00e6, 0x2069, 0x1910, 0x6810, 0x6914, 0x910a, 0x1208,
-	0x900e, 0x6816, 0x9016, 0x901e, 0x20a9, 0x007e, 0x2069, 0x1000,
-	0x2d04, 0x905d, 0x0118, 0xb84c, 0x0059, 0x9210, 0x8d68, 0x1f04,
-	0x3860, 0x2300, 0x9218, 0x00ee, 0x00de, 0x015e, 0x0804, 0x3531,
-	0x00f6, 0x0016, 0x907d, 0x0138, 0x9006, 0x8000, 0x2f0c, 0x81ff,
-	0x0110, 0x2178, 0x0cd0, 0x001e, 0x00fe, 0x0005, 0x2069, 0x1910,
-	0x6910, 0x62bc, 0x0804, 0x3531, 0x81ff, 0x0120, 0x2009, 0x0001,
-	0x0804, 0x3563, 0x0126, 0x2091, 0x8000, 0x080c, 0x56f6, 0x0128,
-	0x2009, 0x0007, 0x012e, 0x0804, 0x3563, 0x012e, 0x615c, 0x9190,
-	0x3332, 0x2215, 0x9294, 0x00ff, 0x637c, 0x83ff, 0x0108, 0x6280,
-	0x67dc, 0x97c4, 0x000a, 0x98c6, 0x000a, 0x1118, 0x2031, 0x0001,
-	0x00e8, 0x97c4, 0x0022, 0x98c6, 0x0022, 0x1118, 0x2031, 0x0003,
-	0x00a8, 0x97c4, 0x0012, 0x98c6, 0x0012, 0x1118, 0x2031, 0x0002,
-	0x0068, 0x080c, 0x73b3, 0x1118, 0x2031, 0x0004, 0x0038, 0xd79c,
-	0x0120, 0x2009, 0x0005, 0x0804, 0x3563, 0x9036, 0x7e9a, 0x7f9e,
-	0x0804, 0x3531, 0x614c, 0x6250, 0x2019, 0x1985, 0x231c, 0x2001,
-	0x1986, 0x2004, 0x789a, 0x0804, 0x3531, 0x0126, 0x2091, 0x8000,
-	0x6138, 0x623c, 0x6340, 0x012e, 0x0804, 0x3531, 0x080c, 0x4af1,
-	0x0904, 0x3566, 0xba44, 0xbb38, 0x0804, 0x3531, 0x080c, 0x0dd5,
-	0x080c, 0x4af1, 0x2110, 0x0904, 0x3566, 0xb804, 0x908c, 0x00ff,
-	0x918e, 0x0006, 0x0140, 0x9084, 0xff00, 0x9086, 0x0600, 0x2009,
-	0x0009, 0x1904, 0x3563, 0x0126, 0x2091, 0x8000, 0x2019, 0x0005,
-	0x00c6, 0x9066, 0x080c, 0xa7f8, 0x080c, 0x929d, 0x0076, 0x903e,
-	0x080c, 0x9170, 0x900e, 0x080c, 0xe326, 0x007e, 0x00ce, 0xb807,
-	0x0407, 0x012e, 0x0804, 0x3531, 0x614c, 0x6250, 0x7884, 0x604e,
-	0x7b88, 0x6352, 0x2069, 0x1847, 0x831f, 0x9305, 0x6816, 0x788c,
-	0x2069, 0x1985, 0x2d1c, 0x206a, 0x7e98, 0x9682, 0x0014, 0x1210,
-	0x2031, 0x07d0, 0x2069, 0x1986, 0x2d04, 0x266a, 0x789a, 0x0804,
-	0x3531, 0x0126, 0x2091, 0x8000, 0x7884, 0x603a, 0xd0c4, 0x01a8,
-	0x00d6, 0x78a8, 0x2009, 0x199c, 0x200a, 0x78ac, 0x2011, 0x199d,
-	0x2012, 0x2069, 0x0100, 0x6838, 0x9086, 0x0007, 0x1118, 0x2214,
-	0x6a5a, 0x0010, 0x210c, 0x695a, 0x00de, 0x7884, 0xd0b4, 0x0120,
-	0x3b00, 0x9084, 0xff3f, 0x20d8, 0x7888, 0x603e, 0x2011, 0x0114,
-	0x220c, 0x7888, 0xd08c, 0x0118, 0x918d, 0x0080, 0x0010, 0x918c,
-	0xff7f, 0x2112, 0x788c, 0x6042, 0x9084, 0x0020, 0x0130, 0x78b4,
-	0x6046, 0x9084, 0x0001, 0x090c, 0x4226, 0x6040, 0xd0cc, 0x0120,
-	0x78b0, 0x2011, 0x0114, 0x2012, 0x012e, 0x0804, 0x3531, 0x00f6,
-	0x2079, 0x1800, 0x7a38, 0xa898, 0x9084, 0xfebf, 0x9215, 0xa89c,
-	0x9084, 0xfebf, 0x8002, 0x9214, 0x7838, 0x9084, 0x0140, 0x9215,
-	0x7a3a, 0xa897, 0x4000, 0x900e, 0x9085, 0x0001, 0x2001, 0x0000,
-	0x00fe, 0x0005, 0x7898, 0x9005, 0x01a8, 0x7888, 0x9025, 0x0904,
-	0x3566, 0x788c, 0x902d, 0x0904, 0x3566, 0x900e, 0x080c, 0x6616,
-	0x1120, 0xba44, 0xbb38, 0xbc46, 0xbd3a, 0x9186, 0x07ff, 0x0190,
-	0x8108, 0x0ca0, 0x080c, 0x4af1, 0x0904, 0x3566, 0x7888, 0x900d,
-	0x0904, 0x3566, 0x788c, 0x9005, 0x0904, 0x3566, 0xba44, 0xb946,
-	0xbb38, 0xb83a, 0x0804, 0x3531, 0x2011, 0xbc09, 0x0010, 0x2011,
-	0xbc05, 0x080c, 0x56f6, 0x1904, 0x3563, 0x00c6, 0x2061, 0x0100,
-	0x7984, 0x9186, 0x00ff, 0x1130, 0x2001, 0x1818, 0x2004, 0x9085,
-	0xff00, 0x0088, 0x9182, 0x007f, 0x16e0, 0x9188, 0x3332, 0x210d,
-	0x918c, 0x00ff, 0x2001, 0x1818, 0x2004, 0x0026, 0x9116, 0x002e,
-	0x0580, 0x810f, 0x9105, 0x0126, 0x2091, 0x8000, 0x0006, 0x080c,
-	0xae09, 0x000e, 0x0510, 0x602e, 0x620a, 0x7984, 0x00b6, 0x080c,
-	0x65bb, 0x2b08, 0x00be, 0x1500, 0x6112, 0x6023, 0x0001, 0x080c,
-	0x4abe, 0x01d0, 0x9006, 0xa866, 0x7007, 0x0003, 0xa832, 0xa868,
-	0xc0fd, 0xa86a, 0x701f, 0x3a17, 0x2900, 0x6016, 0x2009, 0x0032,
-	0x080c, 0xaeda, 0x012e, 0x00ce, 0x0005, 0x012e, 0x00ce, 0x0804,
-	0x3563, 0x00ce, 0x0804, 0x3566, 0x080c, 0xae5f, 0x0cb0, 0xa830,
-	0x9086, 0x0100, 0x0904, 0x3563, 0x0804, 0x3531, 0x2061, 0x1a70,
-	0x0126, 0x2091, 0x8000, 0x6000, 0xd084, 0x0170, 0x6104, 0x6208,
-	0x2061, 0x1800, 0x6354, 0x6074, 0x789a, 0x60c0, 0x789e, 0x60bc,
-	0x78aa, 0x012e, 0x0804, 0x3531, 0x900e, 0x2110, 0x0c88, 0x81ff,
-	0x1904, 0x3563, 0x080c, 0x73b3, 0x0904, 0x3563, 0x0126, 0x2091,
-	0x8000, 0x6254, 0x6074, 0x9202, 0x0248, 0x9085, 0x0001, 0x080c,
-	0x28b4, 0x080c, 0x5910, 0x012e, 0x0804, 0x3531, 0x012e, 0x0804,
-	0x3566, 0x0006, 0x0016, 0x00c6, 0x00e6, 0x2001, 0x19a8, 0x2070,
-	0x2061, 0x1847, 0x6008, 0x2072, 0x900e, 0x2011, 0x1400, 0x080c,
-	0x8f70, 0x7206, 0x00ee, 0x00ce, 0x001e, 0x000e, 0x0005, 0x0126,
-	0x2091, 0x8000, 0x81ff, 0x0128, 0x012e, 0x2021, 0x400b, 0x0804,
-	0x3533, 0x7884, 0xd0fc, 0x0148, 0x2001, 0x002a, 0x2004, 0x9082,
-	0x00e1, 0x0288, 0x012e, 0x0804, 0x3566, 0x2001, 0x002a, 0x2004,
-	0x2069, 0x1847, 0x6908, 0x9102, 0x1230, 0x012e, 0x0804, 0x3566,
-	0x012e, 0x0804, 0x3563, 0x080c, 0xadc9, 0x0dd0, 0x7884, 0xd0fc,
-	0x0904, 0x3ae2, 0x00c6, 0x080c, 0x4abe, 0x00ce, 0x0d88, 0xa867,
-	0x0000, 0x7884, 0xa80a, 0x7898, 0xa80e, 0x789c, 0xa812, 0x2001,
-	0x002e, 0x2004, 0xa81a, 0x2001, 0x002f, 0x2004, 0xa81e, 0x2001,
-	0x0030, 0x2004, 0xa822, 0x2001, 0x0031, 0x2004, 0xa826, 0x2001,
-	0x0034, 0x2004, 0xa82a, 0x2001, 0x0035, 0x2004, 0xa82e, 0x2001,
-	0x002a, 0x2004, 0x9080, 0x0003, 0x9084, 0x00fc, 0x8004, 0xa816,
-	0x080c, 0x3c68, 0x0928, 0x7014, 0x2048, 0xad2c, 0xac28, 0xab1c,
-	0xaa18, 0xa930, 0xa808, 0xd0b4, 0x1120, 0x2029, 0x0000, 0x2021,
-	0x0000, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0,
-	0x9080, 0x001b, 0x080c, 0x4b07, 0x701f, 0x3ba5, 0x7023, 0x0001,
-	0x012e, 0x0005, 0x0046, 0x0086, 0x0096, 0x00a6, 0x00b6, 0x00c6,
-	0x00d6, 0x00e6, 0x00f6, 0x080c, 0x3a51, 0x2001, 0x199e, 0x2003,
-	0x0000, 0x2021, 0x000a, 0x2061, 0x0100, 0x6104, 0x0016, 0x60bb,
-	0x0000, 0x60bf, 0x32e1, 0x60bf, 0x0012, 0x080c, 0x3cd7, 0x080c,
-	0x3c96, 0x00f6, 0x00e6, 0x0086, 0x2940, 0x2071, 0x1a65, 0x2079,
-	0x0090, 0x00d6, 0x2069, 0x0000, 0x6884, 0xd0b4, 0x0140, 0x2001,
-	0x0035, 0x2004, 0x780e, 0x2001, 0x0034, 0x2004, 0x780a, 0x00de,
-	0x2011, 0x0001, 0x080c, 0x406a, 0x008e, 0x00ee, 0x00fe, 0x080c,
-	0x3f97, 0x080c, 0x3e9c, 0x05b8, 0x2001, 0x020b, 0x2004, 0x9084,
-	0x0140, 0x1db8, 0x080c, 0x40de, 0x00f6, 0x2079, 0x0300, 0x78bc,
-	0x00fe, 0x908c, 0x0070, 0x1560, 0x2071, 0x0200, 0x7037, 0x0000,
-	0x7050, 0x9084, 0xff00, 0x9086, 0x3200, 0x1510, 0x7037, 0x0001,
-	0x7050, 0x9084, 0xff00, 0x9086, 0xe100, 0x11d0, 0x7037, 0x0000,
-	0x7054, 0x7037, 0x0000, 0x715c, 0x9106, 0x1190, 0x2001, 0x1820,
-	0x2004, 0x9106, 0x1168, 0x00c6, 0x2061, 0x0100, 0x6024, 0x9084,
-	0x1e00, 0x00ce, 0x0138, 0x080c, 0x3ea6, 0x080c, 0x3c91, 0x0058,
-	0x080c, 0x3c91, 0x080c, 0x4002, 0x080c, 0x3f8d, 0x2001, 0x020b,
-	0x2004, 0xd0e4, 0x0dd8, 0x2001, 0x032a, 0x2003, 0x0004, 0x2061,
-	0x0100, 0x6027, 0x0002, 0x001e, 0x6106, 0x2011, 0x020d, 0x2013,
-	0x0020, 0x60bb, 0x0000, 0x60bf, 0x0108, 0x60bf, 0x0012, 0x2001,
-	0x0004, 0x200c, 0x918c, 0xfffd, 0x2102, 0x080c, 0x12ed, 0x2009,
-	0x0028, 0x080c, 0x23df, 0x2001, 0x0227, 0x200c, 0x2102, 0x00fe,
-	0x00ee, 0x00de, 0x00ce, 0x00be, 0x00ae, 0x009e, 0x008e, 0x004e,
-	0x2001, 0x199e, 0x2004, 0x9005, 0x1118, 0x012e, 0x0804, 0x3531,
-	0x012e, 0x2021, 0x400c, 0x0804, 0x3533, 0x0016, 0x0026, 0x0036,
-	0x0046, 0x0056, 0x0076, 0x0086, 0x0096, 0x00d6, 0x0156, 0x7014,
-	0x2048, 0x7020, 0x20a8, 0x8000, 0x7022, 0xa804, 0x9005, 0x0904,
-	0x3c01, 0x2048, 0x1f04, 0x3bb5, 0x7068, 0x2040, 0xa28c, 0xa390,
-	0xa494, 0xa598, 0xa930, 0xa808, 0xd0b4, 0x1120, 0x2029, 0x0000,
-	0x2021, 0x0000, 0x0096, 0x7014, 0x2048, 0xa864, 0x009e, 0x9086,
-	0x0103, 0x0170, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084,
-	0xffc0, 0x9080, 0x001b, 0x080c, 0x4b07, 0x701f, 0x3ba5, 0x00b0,
-	0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080,
-	0x001b, 0x21a8, 0x27e0, 0x2098, 0x27e8, 0x20a0, 0x0006, 0x080c,
-	0x0f7c, 0x000e, 0x080c, 0x4b0a, 0x701f, 0x3ba5, 0x015e, 0x00de,
+	0x0158, 0x012e, 0x9ce0, 0x0018, 0x2001, 0x181a, 0x2004, 0x9c02,
+	0x2009, 0x000d, 0x12b0, 0x0c28, 0x080c, 0xc8a5, 0x012e, 0x2009,
+	0x0003, 0x0178, 0x00e0, 0x900e, 0x2001, 0x0005, 0x080c, 0x6f4a,
+	0x0126, 0x2091, 0x8000, 0x080c, 0xcf82, 0x080c, 0x6d0b, 0x012e,
+	0x0070, 0xb097, 0x4005, 0xb19a, 0x0010, 0xb097, 0x4006, 0x900e,
+	0x9085, 0x0001, 0x2001, 0x0030, 0x2a48, 0x00ae, 0x0005, 0xb097,
+	0x4000, 0x9006, 0x918d, 0x0001, 0x2008, 0x2a48, 0x00ae, 0x0005,
+	0x81ff, 0x1904, 0x35b5, 0x080c, 0x4b36, 0x0904, 0x35b8, 0x080c,
+	0x6760, 0x0904, 0x35b5, 0x080c, 0x6802, 0x0904, 0x35b5, 0x0804,
+	0x4586, 0x81ff, 0x1904, 0x35b5, 0x080c, 0x4b52, 0x0904, 0x35b8,
+	0x080c, 0x6890, 0x0904, 0x35b5, 0x2019, 0x0005, 0x79a8, 0x080c,
+	0x681d, 0x0904, 0x35b5, 0x7888, 0x908a, 0x1000, 0x1a04, 0x35b8,
+	0x8003, 0x800b, 0x810b, 0x9108, 0x080c, 0x85be, 0x7984, 0xd184,
+	0x1904, 0x3583, 0x0804, 0x4586, 0x0126, 0x2091, 0x8000, 0x81ff,
+	0x0118, 0x2009, 0x0001, 0x0450, 0x2029, 0x07ff, 0x645c, 0x2400,
+	0x9506, 0x01f8, 0x2508, 0x080c, 0x6699, 0x11d8, 0x080c, 0x6890,
+	0x1128, 0x2009, 0x0002, 0x62c0, 0x2518, 0x00c0, 0x2019, 0x0004,
+	0x900e, 0x080c, 0x681d, 0x1118, 0x2009, 0x0006, 0x0078, 0x7884,
+	0x908a, 0x1000, 0x1270, 0x8003, 0x800b, 0x810b, 0x9108, 0x080c,
+	0x85be, 0x8529, 0x1ae0, 0x012e, 0x0804, 0x3583, 0x012e, 0x0804,
+	0x35b5, 0x012e, 0x0804, 0x35b8, 0x080c, 0x4b36, 0x0904, 0x35b8,
+	0x080c, 0x6760, 0x0904, 0x35b5, 0xbaa0, 0x2019, 0x0005, 0x00c6,
+	0x9066, 0x080c, 0x9356, 0x0076, 0x903e, 0x080c, 0x9229, 0x900e,
+	0x080c, 0xe477, 0x007e, 0x00ce, 0x080c, 0x67fc, 0x0804, 0x3583,
+	0x080c, 0x4b36, 0x0904, 0x35b8, 0x080c, 0x67fc, 0x2208, 0x0804,
+	0x3583, 0x0156, 0x00d6, 0x00e6, 0x2069, 0x1910, 0x6810, 0x6914,
+	0x910a, 0x1208, 0x900e, 0x6816, 0x9016, 0x901e, 0x20a9, 0x007e,
+	0x2069, 0x1000, 0x2d04, 0x905d, 0x0118, 0xb84c, 0x0059, 0x9210,
+	0x8d68, 0x1f04, 0x38b2, 0x2300, 0x9218, 0x00ee, 0x00de, 0x015e,
+	0x0804, 0x3583, 0x00f6, 0x0016, 0x907d, 0x0138, 0x9006, 0x8000,
+	0x2f0c, 0x81ff, 0x0110, 0x2178, 0x0cd0, 0x001e, 0x00fe, 0x0005,
+	0x2069, 0x1910, 0x6910, 0x62bc, 0x0804, 0x3583, 0x81ff, 0x0120,
+	0x2009, 0x0001, 0x0804, 0x35b5, 0x0126, 0x2091, 0x8000, 0x080c,
+	0x5771, 0x0128, 0x2009, 0x0007, 0x012e, 0x0804, 0x35b5, 0x012e,
+	0x615c, 0x9190, 0x3384, 0x2215, 0x9294, 0x00ff, 0x637c, 0x83ff,
+	0x0108, 0x6280, 0x67dc, 0x97c4, 0x000a, 0x98c6, 0x000a, 0x1118,
+	0x2031, 0x0001, 0x00e8, 0x97c4, 0x0022, 0x98c6, 0x0022, 0x1118,
+	0x2031, 0x0003, 0x00a8, 0x97c4, 0x0012, 0x98c6, 0x0012, 0x1118,
+	0x2031, 0x0002, 0x0068, 0x080c, 0x743e, 0x1118, 0x2031, 0x0004,
+	0x0038, 0xd79c, 0x0120, 0x2009, 0x0005, 0x0804, 0x35b5, 0x9036,
+	0x7e9a, 0x7f9e, 0x0804, 0x3583, 0x614c, 0x6250, 0x2019, 0x1985,
+	0x231c, 0x2001, 0x1986, 0x2004, 0x789a, 0x0804, 0x3583, 0x0126,
+	0x2091, 0x8000, 0x6138, 0x623c, 0x6340, 0x012e, 0x0804, 0x3583,
+	0x080c, 0x4b52, 0x0904, 0x35b8, 0xba44, 0xbb38, 0x0804, 0x3583,
+	0x080c, 0x0dd5, 0x080c, 0x4b52, 0x2110, 0x0904, 0x35b8, 0xb804,
+	0x908c, 0x00ff, 0x918e, 0x0006, 0x0140, 0x9084, 0xff00, 0x9086,
+	0x0600, 0x2009, 0x0009, 0x1904, 0x35b5, 0x0126, 0x2091, 0x8000,
+	0x2019, 0x0005, 0x00c6, 0x9066, 0x080c, 0xa8dc, 0x080c, 0x9356,
+	0x0076, 0x903e, 0x080c, 0x9229, 0x900e, 0x080c, 0xe477, 0x007e,
+	0x00ce, 0xb807, 0x0407, 0x012e, 0x0804, 0x3583, 0x614c, 0x6250,
+	0x7884, 0x604e, 0x7b88, 0x6352, 0x2069, 0x1847, 0x831f, 0x9305,
+	0x6816, 0x788c, 0x2069, 0x1985, 0x2d1c, 0x206a, 0x7e98, 0x9682,
+	0x0014, 0x1210, 0x2031, 0x07d0, 0x2069, 0x1986, 0x2d04, 0x266a,
+	0x789a, 0x0804, 0x3583, 0x0126, 0x2091, 0x8000, 0x7884, 0x603a,
+	0xd0c4, 0x01a8, 0x00d6, 0x78a8, 0x2009, 0x199c, 0x200a, 0x78ac,
+	0x2011, 0x199d, 0x2012, 0x2069, 0x0100, 0x6838, 0x9086, 0x0007,
+	0x1118, 0x2214, 0x6a5a, 0x0010, 0x210c, 0x695a, 0x00de, 0x7884,
+	0xd0b4, 0x0120, 0x3b00, 0x9084, 0xff3f, 0x20d8, 0x7888, 0x603e,
+	0x2011, 0x0114, 0x220c, 0x7888, 0xd08c, 0x0118, 0x918d, 0x0080,
+	0x0010, 0x918c, 0xff7f, 0x2112, 0x788c, 0x6042, 0x9084, 0x0020,
+	0x0130, 0x78b4, 0x6046, 0x9084, 0x0001, 0x090c, 0x4278, 0x6040,
+	0xd0cc, 0x0120, 0x78b0, 0x2011, 0x0114, 0x2012, 0x012e, 0x0804,
+	0x3583, 0x00f6, 0x2079, 0x1800, 0x7a38, 0xa898, 0x9084, 0xfebf,
+	0x9215, 0xa89c, 0x9084, 0xfebf, 0x8002, 0x9214, 0x7838, 0x9084,
+	0x0140, 0x9215, 0x7a3a, 0xa897, 0x4000, 0x900e, 0x9085, 0x0001,
+	0x2001, 0x0000, 0x00fe, 0x0005, 0x7898, 0x9005, 0x01a8, 0x7888,
+	0x9025, 0x0904, 0x35b8, 0x788c, 0x902d, 0x0904, 0x35b8, 0x900e,
+	0x080c, 0x6699, 0x1120, 0xba44, 0xbb38, 0xbc46, 0xbd3a, 0x9186,
+	0x07ff, 0x0190, 0x8108, 0x0ca0, 0x080c, 0x4b52, 0x0904, 0x35b8,
+	0x7888, 0x900d, 0x0904, 0x35b8, 0x788c, 0x9005, 0x0904, 0x35b8,
+	0xba44, 0xb946, 0xbb38, 0xb83a, 0x0804, 0x3583, 0x2011, 0xbc09,
+	0x0010, 0x2011, 0xbc05, 0x080c, 0x5771, 0x1904, 0x35b5, 0x00c6,
+	0x2061, 0x0100, 0x7984, 0x9186, 0x00ff, 0x1130, 0x2001, 0x1818,
+	0x2004, 0x9085, 0xff00, 0x0088, 0x9182, 0x007f, 0x16e0, 0x9188,
+	0x3384, 0x210d, 0x918c, 0x00ff, 0x2001, 0x1818, 0x2004, 0x0026,
+	0x9116, 0x002e, 0x0580, 0x810f, 0x9105, 0x0126, 0x2091, 0x8000,
+	0x0006, 0x080c, 0xaeed, 0x000e, 0x0510, 0x602e, 0x620a, 0x7984,
+	0x00b6, 0x080c, 0x663e, 0x2b08, 0x00be, 0x1500, 0x6112, 0x6023,
+	0x0001, 0x080c, 0x4b1f, 0x01d0, 0x9006, 0xa866, 0x7007, 0x0003,
+	0xa832, 0xa868, 0xc0fd, 0xa86a, 0x701f, 0x3a69, 0x2900, 0x6016,
+	0x2009, 0x0032, 0x080c, 0xafbe, 0x012e, 0x00ce, 0x0005, 0x012e,
+	0x00ce, 0x0804, 0x35b5, 0x00ce, 0x0804, 0x35b8, 0x080c, 0xaf43,
+	0x0cb0, 0xa830, 0x9086, 0x0100, 0x0904, 0x35b5, 0x0804, 0x3583,
+	0x2061, 0x1a70, 0x0126, 0x2091, 0x8000, 0x6000, 0xd084, 0x0170,
+	0x6104, 0x6208, 0x2061, 0x1800, 0x6354, 0x6074, 0x789a, 0x60c0,
+	0x789e, 0x60bc, 0x78aa, 0x012e, 0x0804, 0x3583, 0x900e, 0x2110,
+	0x0c88, 0x81ff, 0x1904, 0x35b5, 0x080c, 0x743e, 0x0904, 0x35b5,
+	0x0126, 0x2091, 0x8000, 0x6254, 0x6074, 0x9202, 0x0248, 0x9085,
+	0x0001, 0x080c, 0x28e5, 0x080c, 0x5990, 0x012e, 0x0804, 0x3583,
+	0x012e, 0x0804, 0x35b8, 0x0006, 0x0016, 0x00c6, 0x00e6, 0x2001,
+	0x19a8, 0x2070, 0x2061, 0x1847, 0x6008, 0x2072, 0x900e, 0x2011,
+	0x1400, 0x080c, 0x9027, 0x7206, 0x00ee, 0x00ce, 0x001e, 0x000e,
+	0x0005, 0x0126, 0x2091, 0x8000, 0x81ff, 0x0128, 0x012e, 0x2021,
+	0x400b, 0x0804, 0x3585, 0x7884, 0xd0fc, 0x0148, 0x2001, 0x002a,
+	0x2004, 0x9082, 0x00e1, 0x0288, 0x012e, 0x0804, 0x35b8, 0x2001,
+	0x002a, 0x2004, 0x2069, 0x1847, 0x6908, 0x9102, 0x1230, 0x012e,
+	0x0804, 0x35b8, 0x012e, 0x0804, 0x35b5, 0x080c, 0xaead, 0x0dd0,
+	0x7884, 0xd0fc, 0x0904, 0x3b34, 0x00c6, 0x080c, 0x4b1f, 0x00ce,
+	0x0d88, 0xa867, 0x0000, 0x7884, 0xa80a, 0x7898, 0xa80e, 0x789c,
+	0xa812, 0x2001, 0x002e, 0x2004, 0xa81a, 0x2001, 0x002f, 0x2004,
+	0xa81e, 0x2001, 0x0030, 0x2004, 0xa822, 0x2001, 0x0031, 0x2004,
+	0xa826, 0x2001, 0x0034, 0x2004, 0xa82a, 0x2001, 0x0035, 0x2004,
+	0xa82e, 0x2001, 0x002a, 0x2004, 0x9080, 0x0003, 0x9084, 0x00fc,
+	0x8004, 0xa816, 0x080c, 0x3cba, 0x0928, 0x7014, 0x2048, 0xad2c,
+	0xac28, 0xab1c, 0xaa18, 0xa930, 0xa808, 0xd0b4, 0x1120, 0x2029,
+	0x0000, 0x2021, 0x0000, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f,
+	0x9084, 0xffc0, 0x9080, 0x001b, 0x080c, 0x4b68, 0x701f, 0x3bf7,
+	0x7023, 0x0001, 0x012e, 0x0005, 0x0046, 0x0086, 0x0096, 0x00a6,
+	0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x080c, 0x3aa3, 0x2001,
+	0x199e, 0x2003, 0x0000, 0x2021, 0x000a, 0x2061, 0x0100, 0x6104,
+	0x0016, 0x60bb, 0x0000, 0x60bf, 0x32e1, 0x60bf, 0x0012, 0x080c,
+	0x3d29, 0x080c, 0x3ce8, 0x00f6, 0x00e6, 0x0086, 0x2940, 0x2071,
+	0x1a65, 0x2079, 0x0090, 0x00d6, 0x2069, 0x0000, 0x6884, 0xd0b4,
+	0x0140, 0x2001, 0x0035, 0x2004, 0x780e, 0x2001, 0x0034, 0x2004,
+	0x780a, 0x00de, 0x2011, 0x0001, 0x080c, 0x40bc, 0x008e, 0x00ee,
+	0x00fe, 0x080c, 0x3fe9, 0x080c, 0x3eee, 0x05b8, 0x2001, 0x020b,
+	0x2004, 0x9084, 0x0140, 0x1db8, 0x080c, 0x4130, 0x00f6, 0x2079,
+	0x0300, 0x78bc, 0x00fe, 0x908c, 0x0070, 0x1560, 0x2071, 0x0200,
+	0x7037, 0x0000, 0x7050, 0x9084, 0xff00, 0x9086, 0x3200, 0x1510,
+	0x7037, 0x0001, 0x7050, 0x9084, 0xff00, 0x9086, 0xe100, 0x11d0,
+	0x7037, 0x0000, 0x7054, 0x7037, 0x0000, 0x715c, 0x9106, 0x1190,
+	0x2001, 0x1820, 0x2004, 0x9106, 0x1168, 0x00c6, 0x2061, 0x0100,
+	0x6024, 0x9084, 0x1e00, 0x00ce, 0x0138, 0x080c, 0x3ef8, 0x080c,
+	0x3ce3, 0x0058, 0x080c, 0x3ce3, 0x080c, 0x4054, 0x080c, 0x3fdf,
+	0x2001, 0x020b, 0x2004, 0xd0e4, 0x0dd8, 0x2001, 0x032a, 0x2003,
+	0x0004, 0x2061, 0x0100, 0x6027, 0x0002, 0x001e, 0x6106, 0x2011,
+	0x020d, 0x2013, 0x0020, 0x60bb, 0x0000, 0x60bf, 0x0108, 0x60bf,
+	0x0012, 0x2001, 0x0004, 0x200c, 0x918c, 0xfffd, 0x2102, 0x080c,
+	0x12ed, 0x2009, 0x0028, 0x080c, 0x2410, 0x2001, 0x0227, 0x200c,
+	0x2102, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x00ae, 0x009e,
+	0x008e, 0x004e, 0x2001, 0x199e, 0x2004, 0x9005, 0x1118, 0x012e,
+	0x0804, 0x3583, 0x012e, 0x2021, 0x400c, 0x0804, 0x3585, 0x0016,
+	0x0026, 0x0036, 0x0046, 0x0056, 0x0076, 0x0086, 0x0096, 0x00d6,
+	0x0156, 0x7014, 0x2048, 0x7020, 0x20a8, 0x8000, 0x7022, 0xa804,
+	0x9005, 0x0904, 0x3c53, 0x2048, 0x1f04, 0x3c07, 0x7068, 0x2040,
+	0xa28c, 0xa390, 0xa494, 0xa598, 0xa930, 0xa808, 0xd0b4, 0x1120,
+	0x2029, 0x0000, 0x2021, 0x0000, 0x0096, 0x7014, 0x2048, 0xa864,
+	0x009e, 0x9086, 0x0103, 0x0170, 0x8906, 0x8006, 0x8007, 0x90bc,
+	0x003f, 0x9084, 0xffc0, 0x9080, 0x001b, 0x080c, 0x4b68, 0x701f,
+	0x3bf7, 0x00b0, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084,
+	0xffc0, 0x9080, 0x001b, 0x21a8, 0x27e0, 0x2098, 0x27e8, 0x20a0,
+	0x0006, 0x080c, 0x0f7c, 0x000e, 0x080c, 0x4b6b, 0x701f, 0x3bf7,
+	0x015e, 0x00de, 0x009e, 0x008e, 0x007e, 0x005e, 0x004e, 0x003e,
+	0x002e, 0x001e, 0x0005, 0x7014, 0x2048, 0xa864, 0x9086, 0x0103,
+	0x1118, 0x701f, 0x3cb8, 0x0450, 0x7014, 0x2048, 0xa868, 0xc0fd,
+	0xa86a, 0x2009, 0x007f, 0x080c, 0x6638, 0x0110, 0x9006, 0x0030,
+	0xb813, 0x00ff, 0xb817, 0xfffd, 0x080c, 0xd151, 0x015e, 0x00de,
 	0x009e, 0x008e, 0x007e, 0x005e, 0x004e, 0x003e, 0x002e, 0x001e,
-	0x0005, 0x7014, 0x2048, 0xa864, 0x9086, 0x0103, 0x1118, 0x701f,
-	0x3c66, 0x0450, 0x7014, 0x2048, 0xa868, 0xc0fd, 0xa86a, 0x2009,
-	0x007f, 0x080c, 0x65b5, 0x0110, 0x9006, 0x0030, 0xb813, 0x00ff,
-	0xb817, 0xfffd, 0x080c, 0xd023, 0x015e, 0x00de, 0x009e, 0x008e,
-	0x007e, 0x005e, 0x004e, 0x003e, 0x002e, 0x001e, 0x0904, 0x3563,
-	0x0016, 0x0026, 0x0036, 0x0046, 0x0056, 0x0076, 0x0086, 0x0096,
-	0x00d6, 0x0156, 0x701f, 0x3c38, 0x7007, 0x0003, 0x0804, 0x3bf6,
-	0xa830, 0x9086, 0x0100, 0x2021, 0x400c, 0x0904, 0x3533, 0x0076,
-	0xad10, 0xac0c, 0xab24, 0xaa20, 0xa930, 0xa808, 0xd0b4, 0x1120,
-	0x2029, 0x0000, 0x2021, 0x0000, 0x8906, 0x8006, 0x8007, 0x90bc,
-	0x003f, 0x9084, 0xffc0, 0x9080, 0x001b, 0x21a8, 0x27e0, 0x2098,
-	0x27e8, 0x20a0, 0x0006, 0x080c, 0x0f7c, 0x000e, 0x080c, 0x4b0a,
-	0x007e, 0x701f, 0x3ba5, 0x7023, 0x0001, 0x0005, 0x0804, 0x3531,
-	0x0156, 0x00c6, 0xa814, 0x908a, 0x001e, 0x0218, 0xa833, 0x001e,
-	0x0010, 0xa832, 0x0078, 0x81ff, 0x0168, 0x0016, 0x080c, 0x4abe,
-	0x001e, 0x0130, 0xa800, 0x2040, 0xa008, 0xa80a, 0x2100, 0x0c58,
-	0x9006, 0x0010, 0x9085, 0x0001, 0x00ce, 0x015e, 0x0005, 0x0006,
-	0x00f6, 0x2079, 0x0000, 0x7880, 0x9086, 0x0044, 0x00fe, 0x000e,
-	0x0005, 0x2001, 0x199e, 0x2003, 0x0001, 0x0005, 0x00f6, 0x00e6,
-	0x00c6, 0x2061, 0x0200, 0x2001, 0x19a9, 0x2004, 0x601a, 0x2061,
-	0x0100, 0x2001, 0x19a8, 0x2004, 0x60ce, 0x6104, 0xc1ac, 0x6106,
-	0x080c, 0x4abe, 0xa813, 0x0019, 0xa817, 0x0001, 0x2900, 0xa85a,
-	0x2001, 0x002e, 0x2004, 0xa866, 0x2001, 0x002f, 0x2004, 0xa86a,
-	0x2061, 0x0090, 0x2079, 0x0100, 0x2001, 0x19a8, 0x2004, 0x6036,
-	0x2009, 0x0040, 0x080c, 0x23df, 0x2001, 0x002a, 0x2004, 0x9084,
-	0xfff8, 0xa86e, 0x601a, 0xa873, 0x0000, 0x601f, 0x0000, 0x78ca,
-	0x9006, 0x600a, 0x600e, 0x00ce, 0x00ee, 0x00fe, 0x0005, 0x00e6,
-	0x080c, 0x4abe, 0x2940, 0xa013, 0x0019, 0xa017, 0x0001, 0x2800,
-	0xa05a, 0x2001, 0x0030, 0x2004, 0xa866, 0x2001, 0x0031, 0x2004,
-	0xa86a, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8, 0xa86e, 0xa873,
-	0x0000, 0x2001, 0x032a, 0x2003, 0x0004, 0x2001, 0x0300, 0x2003,
-	0x0000, 0x2001, 0x020d, 0x2003, 0x0000, 0x2001, 0x0004, 0x200c,
-	0x918d, 0x0002, 0x2102, 0x00ee, 0x0005, 0x0126, 0x2091, 0x8000,
-	0x81ff, 0x0148, 0x080c, 0x2c3d, 0x1130, 0x9006, 0x080c, 0x2b95,
-	0x9006, 0x080c, 0x2b78, 0x7884, 0x9084, 0x0007, 0x0002, 0x3d22,
-	0x3d2b, 0x3d34, 0x3d1f, 0x3d1f, 0x3d1f, 0x3d1f, 0x3d1f, 0x012e,
-	0x0804, 0x3566, 0x2009, 0x0114, 0x2104, 0x9085, 0x0800, 0x200a,
-	0x080c, 0x3ef0, 0x00c0, 0x2009, 0x0114, 0x2104, 0x9085, 0x4000,
-	0x200a, 0x080c, 0x3ef0, 0x0078, 0x080c, 0x73b3, 0x1128, 0x012e,
-	0x2009, 0x0016, 0x0804, 0x3563, 0x81ff, 0x0128, 0x012e, 0x2021,
-	0x400b, 0x0804, 0x3533, 0x0086, 0x0096, 0x00a6, 0x00b6, 0x00c6,
-	0x00d6, 0x00e6, 0x00f6, 0x080c, 0x3a51, 0x2009, 0x0101, 0x210c,
-	0x0016, 0x7ec8, 0x7dcc, 0x9006, 0x2068, 0x2060, 0x2058, 0x080c,
-	0x41b9, 0x080c, 0x4109, 0x903e, 0x2720, 0x00f6, 0x00e6, 0x0086,
-	0x2940, 0x2071, 0x1a65, 0x2079, 0x0090, 0x00d6, 0x2069, 0x0000,
-	0x6884, 0xd0b4, 0x0120, 0x68d4, 0x780e, 0x68d0, 0x780a, 0x00de,
-	0x2011, 0x0001, 0x080c, 0x406a, 0x080c, 0x2c45, 0x080c, 0x2c45,
-	0x080c, 0x2c45, 0x080c, 0x2c45, 0x080c, 0x406a, 0x008e, 0x00ee,
-	0x00fe, 0x080c, 0x3f97, 0x2009, 0x9c40, 0x8109, 0x11b0, 0x080c,
-	0x3ea6, 0x2001, 0x0004, 0x200c, 0x918c, 0xfffd, 0x2102, 0x001e,
-	0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x00ae, 0x009e, 0x008e,
-	0x2009, 0x0017, 0x080c, 0x3563, 0x0cf8, 0x2001, 0x020b, 0x2004,
-	0x9084, 0x0140, 0x1d10, 0x00f6, 0x2079, 0x0000, 0x7884, 0x00fe,
-	0xd0bc, 0x0178, 0x2001, 0x0201, 0x200c, 0x81ff, 0x0150, 0x080c,
-	0x3f75, 0x2d00, 0x9c05, 0x9b05, 0x0120, 0x080c, 0x3ea6, 0x0804,
-	0x3e53, 0x080c, 0x40de, 0x080c, 0x4002, 0x080c, 0x3f58, 0x080c,
-	0x3f8d, 0x00f6, 0x2079, 0x0100, 0x7824, 0xd0ac, 0x0130, 0x8b58,
-	0x080c, 0x3ea6, 0x00fe, 0x0804, 0x3e53, 0x00fe, 0x080c, 0x3e9c,
-	0x1150, 0x8d68, 0x2001, 0x0032, 0x2602, 0x2001, 0x0033, 0x2502,
-	0x080c, 0x3ea6, 0x0080, 0x87ff, 0x0138, 0x2001, 0x0201, 0x2004,
-	0x9005, 0x1908, 0x8739, 0x0038, 0x2001, 0x1a61, 0x2004, 0x9086,
-	0x0000, 0x1904, 0x3da3, 0x2001, 0x032f, 0x2003, 0x00f6, 0x8631,
-	0x1208, 0x8529, 0x2500, 0x9605, 0x0904, 0x3e53, 0x7884, 0xd0bc,
-	0x0128, 0x2d00, 0x9c05, 0x9b05, 0x1904, 0x3e53, 0xa013, 0x0019,
-	0x2001, 0x032a, 0x2003, 0x0004, 0x7884, 0xd0ac, 0x1148, 0x2001,
-	0x1a61, 0x2003, 0x0003, 0x2001, 0x032a, 0x2003, 0x0009, 0x0030,
-	0xa017, 0x0001, 0x78b4, 0x9005, 0x0108, 0xa016, 0x2800, 0xa05a,
-	0x2009, 0x0040, 0x080c, 0x23df, 0x2900, 0xa85a, 0xa813, 0x0019,
-	0x7884, 0xd0a4, 0x1180, 0xa817, 0x0000, 0x00c6, 0x20a9, 0x0004,
-	0x2061, 0x0090, 0x602b, 0x0008, 0x2001, 0x0203, 0x2004, 0x1f04,
-	0x3e2a, 0x00ce, 0x0030, 0xa817, 0x0001, 0x78b0, 0x9005, 0x0108,
-	0xa816, 0x00f6, 0x00c6, 0x2079, 0x0100, 0x2061, 0x0090, 0x7827,
-	0x0002, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8, 0x601a, 0x0006,
-	0x2001, 0x002b, 0x2004, 0x601e, 0x78c6, 0x000e, 0x78ca, 0x00ce,
-	0x00fe, 0x0804, 0x3d5d, 0x001e, 0x00c6, 0x2001, 0x032a, 0x2003,
-	0x0004, 0x2061, 0x0100, 0x6027, 0x0002, 0x6106, 0x2011, 0x020d,
-	0x2013, 0x0020, 0x2001, 0x0004, 0x200c, 0x918c, 0xfffd, 0x2102,
-	0x080c, 0x12ed, 0x7884, 0x9084, 0x0003, 0x9086, 0x0002, 0x01a0,
-	0x2009, 0x0028, 0x080c, 0x23df, 0x2001, 0x0227, 0x200c, 0x2102,
-	0x6050, 0x9084, 0xb7ef, 0x6052, 0x602f, 0x0000, 0x604b, 0xf7f7,
-	0x6043, 0x0090, 0x6043, 0x0010, 0x00ce, 0x2d08, 0x2c10, 0x2b18,
-	0x2b00, 0x9c05, 0x9d05, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be,
-	0x00ae, 0x009e, 0x008e, 0x1118, 0x012e, 0x0804, 0x3531, 0x012e,
-	0x2021, 0x400c, 0x0804, 0x3533, 0x9085, 0x0001, 0x1d04, 0x3ea5,
-	0x2091, 0x6000, 0x8420, 0x9486, 0x0064, 0x0005, 0x2001, 0x0105,
-	0x2003, 0x0010, 0x2001, 0x032a, 0x2003, 0x0004, 0x2001, 0x1a61,
-	0x2003, 0x0000, 0x0071, 0x2009, 0x0048, 0x080c, 0x23df, 0x2001,
-	0x0227, 0x2024, 0x2402, 0x2001, 0x0109, 0x2003, 0x4000, 0x9026,
-	0x0005, 0x00f6, 0x00e6, 0x2071, 0x1a65, 0x7000, 0x9086, 0x0000,
-	0x0520, 0x2079, 0x0090, 0x2009, 0x0206, 0x2104, 0x2009, 0x0203,
-	0x210c, 0x9106, 0x1120, 0x2009, 0x0040, 0x080c, 0x23df, 0x782c,
-	0xd0fc, 0x0d88, 0x080c, 0x40de, 0x7000, 0x9086, 0x0000, 0x1d58,
-	0x782b, 0x0004, 0x782c, 0xd0ac, 0x1de8, 0x2009, 0x0040, 0x080c,
-	0x23df, 0x782b, 0x0002, 0x7003, 0x0000, 0x00ee, 0x00fe, 0x0005,
-	0x00f6, 0x2079, 0x0100, 0x2001, 0x1818, 0x200c, 0x7932, 0x7936,
-	0x080c, 0x2894, 0x7850, 0x9084, 0xfbff, 0x9085, 0x0030, 0x7852,
-	0x2019, 0x01f4, 0x8319, 0x1df0, 0x9084, 0xffcf, 0x9085, 0x2000,
-	0x7852, 0x20a9, 0x0046, 0x1d04, 0x3f0b, 0x2091, 0x6000, 0x1f04,
-	0x3f0b, 0x7850, 0x9085, 0x0400, 0x9084, 0xdfff, 0x7852, 0x2001,
-	0x0021, 0x2004, 0x9084, 0x0003, 0x9086, 0x0001, 0x1120, 0x7850,
-	0x9084, 0xdfff, 0x7852, 0x784b, 0xf7f7, 0x7843, 0x0090, 0x7843,
-	0x0010, 0x20a9, 0x0028, 0xa001, 0x1f04, 0x3f2b, 0x7850, 0x9085,
-	0x1400, 0x7852, 0x2019, 0x61a8, 0x7854, 0xa001, 0xa001, 0xd08c,
-	0x1110, 0x8319, 0x1dc8, 0x7827, 0x0048, 0x7850, 0x9085, 0x0400,
-	0x7852, 0x7843, 0x0040, 0x2019, 0x01f4, 0xa001, 0xa001, 0x8319,
-	0x1de0, 0x2001, 0x0100, 0x080c, 0x2cfc, 0x7827, 0x0020, 0x7843,
-	0x0000, 0x9006, 0x080c, 0x2cfc, 0x7827, 0x0048, 0x00fe, 0x0005,
-	0x7884, 0xd0ac, 0x11c8, 0x00f6, 0x00e6, 0x2071, 0x1a61, 0x2079,
-	0x0320, 0x2001, 0x0201, 0x2004, 0x9005, 0x0160, 0x7000, 0x9086,
-	0x0000, 0x1140, 0x0051, 0xd0bc, 0x0108, 0x8738, 0x7003, 0x0003,
-	0x782b, 0x0019, 0x00ee, 0x00fe, 0x0005, 0x00f6, 0x2079, 0x0300,
-	0x78bc, 0x00fe, 0x908c, 0x0070, 0x0178, 0x2009, 0x0032, 0x260a,
-	0x2009, 0x0033, 0x250a, 0xd0b4, 0x0108, 0x8c60, 0xd0ac, 0x0108,
-	0x8d68, 0xd0a4, 0x0108, 0x8b58, 0x0005, 0x00f6, 0x2079, 0x0200,
-	0x781c, 0xd084, 0x0110, 0x7837, 0x0050, 0x00fe, 0x0005, 0x00e6,
-	0x2071, 0x0100, 0x2001, 0x19a9, 0x2004, 0x70e2, 0x080c, 0x3c87,
-	0x1188, 0x2001, 0x1820, 0x2004, 0x2009, 0x181f, 0x210c, 0x918c,
-	0x00ff, 0x706e, 0x716a, 0x7066, 0x918d, 0x3200, 0x7162, 0x7073,
-	0xe109, 0x0080, 0x702c, 0x9085, 0x0002, 0x702e, 0x2009, 0x1818,
-	0x210c, 0x716e, 0x7063, 0x0100, 0x7166, 0x719e, 0x706b, 0x0000,
-	0x7073, 0x0809, 0x7077, 0x0008, 0x7078, 0x9080, 0x0100, 0x707a,
-	0x7080, 0x8000, 0x7082, 0x7087, 0xaaaa, 0x9006, 0x708a, 0x708e,
-	0x707e, 0x70d6, 0x70ab, 0x0036, 0x70af, 0x95d5, 0x7014, 0x9084,
-	0x1984, 0x9085, 0x0092, 0x7016, 0x080c, 0x40de, 0x00f6, 0x2071,
-	0x1a61, 0x2079, 0x0320, 0x00d6, 0x2069, 0x0000, 0x6884, 0xd0b4,
-	0x0120, 0x689c, 0x780e, 0x6898, 0x780a, 0x00de, 0x2009, 0x03e8,
-	0x8109, 0x1df0, 0x792c, 0xd1fc, 0x0110, 0x782b, 0x0004, 0x2011,
-	0x0011, 0x080c, 0x406a, 0x2011, 0x0001, 0x080c, 0x406a, 0x00fe,
-	0x00ee, 0x0005, 0x00f6, 0x00e6, 0x2071, 0x1a61, 0x2079, 0x0320,
-	0x792c, 0xd1fc, 0x0904, 0x4067, 0x782b, 0x0002, 0x9026, 0xd19c,
-	0x1904, 0x4063, 0x7000, 0x0002, 0x4067, 0x4018, 0x4048, 0x4063,
-	0xd1bc, 0x1170, 0xd1dc, 0x1190, 0x8001, 0x7002, 0x2011, 0x0001,
-	0x080c, 0x406a, 0x0904, 0x4067, 0x080c, 0x406a, 0x0804, 0x4067,
-	0x00f6, 0x2079, 0x0300, 0x78bf, 0x0000, 0x00fe, 0x7810, 0x7914,
-	0x782b, 0x0004, 0x7812, 0x7916, 0x2001, 0x0201, 0x200c, 0x81ff,
-	0x0de8, 0x080c, 0x3f75, 0x2009, 0x0001, 0x00f6, 0x2079, 0x0300,
-	0x78b8, 0x00fe, 0xd0ec, 0x0110, 0x2009, 0x0011, 0x792a, 0x00f8,
-	0x8001, 0x7002, 0x9184, 0x0880, 0x1140, 0x782c, 0xd0fc, 0x1904,
-	0x400c, 0x2011, 0x0001, 0x00b1, 0x0090, 0xa010, 0x9092, 0x0004,
-	0x9086, 0x0015, 0x1120, 0xa000, 0xa05a, 0x2011, 0x0031, 0xa212,
-	0xd1dc, 0x1960, 0x0828, 0x782b, 0x0004, 0x7003, 0x0000, 0x00ee,
-	0x00fe, 0x0005, 0xa014, 0x9005, 0x0550, 0x8001, 0x0036, 0x0096,
-	0xa016, 0xa058, 0x2048, 0xa010, 0x2009, 0x0031, 0x911a, 0x831c,
-	0x831c, 0x938a, 0x0007, 0x1a0c, 0x0dd5, 0x9398, 0x4098, 0x231d,
-	0x083f, 0x9080, 0x0004, 0x7a2a, 0x7100, 0x8108, 0x7102, 0x009e,
-	0x003e, 0x908a, 0x0035, 0x1140, 0x0096, 0xa058, 0x2048, 0xa804,
-	0xa05a, 0x2001, 0x0019, 0x009e, 0xa012, 0x9085, 0x0001, 0x0005,
-	0x40d5, 0x40cc, 0x40c3, 0x40ba, 0x40b1, 0x40a8, 0x409f, 0xa964,
-	0x7902, 0xa968, 0x7906, 0xa96c, 0x7912, 0xa970, 0x7916, 0x0005,
-	0xa974, 0x7902, 0xa978, 0x7906, 0xa97c, 0x7912, 0xa980, 0x7916,
-	0x0005, 0xa984, 0x7902, 0xa988, 0x7906, 0xa98c, 0x7912, 0xa990,
-	0x7916, 0x0005, 0xa994, 0x7902, 0xa998, 0x7906, 0xa99c, 0x7912,
-	0xa9a0, 0x7916, 0x0005, 0xa9a4, 0x7902, 0xa9a8, 0x7906, 0xa9ac,
-	0x7912, 0xa9b0, 0x7916, 0x0005, 0xa9b4, 0x7902, 0xa9b8, 0x7906,
-	0xa9bc, 0x7912, 0xa9c0, 0x7916, 0x0005, 0xa9c4, 0x7902, 0xa9c8,
-	0x7906, 0xa9cc, 0x7912, 0xa9d0, 0x7916, 0x0005, 0x00f6, 0x00e6,
-	0x0086, 0x2071, 0x1a65, 0x2079, 0x0090, 0x792c, 0xd1fc, 0x01e8,
-	0x782b, 0x0002, 0x2940, 0x9026, 0x7000, 0x0002, 0x4105, 0x40f1,
-	0x40fc, 0x8001, 0x7002, 0xd19c, 0x1180, 0x2011, 0x0001, 0x080c,
-	0x406a, 0x190c, 0x406a, 0x0048, 0x8001, 0x7002, 0x782c, 0xd0fc,
-	0x1d38, 0x2011, 0x0001, 0x080c, 0x406a, 0x008e, 0x00ee, 0x00fe,
-	0x0005, 0x00f6, 0x00e6, 0x00c6, 0x0086, 0x2061, 0x0200, 0x2001,
-	0x19a9, 0x2004, 0x601a, 0x2061, 0x0100, 0x2001, 0x19a8, 0x2004,
-	0x60ce, 0x6104, 0xc1ac, 0x6106, 0x2001, 0x002c, 0x2004, 0x9005,
-	0x0520, 0x2038, 0x2001, 0x002e, 0x2024, 0x2001, 0x002f, 0x201c,
-	0x080c, 0x4abe, 0xa813, 0x0019, 0xaf16, 0x2900, 0xa85a, 0x978a,
-	0x0007, 0x0220, 0x2138, 0x2009, 0x0007, 0x0010, 0x2708, 0x903e,
-	0x0096, 0xa858, 0x2048, 0xa85c, 0x9080, 0x0019, 0x009e, 0x080c,
-	0x4181, 0x1d68, 0x2900, 0xa85a, 0x00d0, 0x080c, 0x4abe, 0xa813,
-	0x0019, 0xa817, 0x0001, 0x2900, 0xa85a, 0x2001, 0x002e, 0x2004,
-	0xa866, 0x2001, 0x002f, 0x2004, 0xa86a, 0x2001, 0x002a, 0x2004,
-	0x9084, 0xfff8, 0xa86e, 0x2001, 0x002b, 0x2004, 0xa872, 0x2061,
-	0x0090, 0x2079, 0x0100, 0x2001, 0x19a8, 0x2004, 0x6036, 0x2009,
-	0x0040, 0x080c, 0x23df, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8,
+	0x0904, 0x35b5, 0x0016, 0x0026, 0x0036, 0x0046, 0x0056, 0x0076,
+	0x0086, 0x0096, 0x00d6, 0x0156, 0x701f, 0x3c8a, 0x7007, 0x0003,
+	0x0804, 0x3c48, 0xa830, 0x9086, 0x0100, 0x2021, 0x400c, 0x0904,
+	0x3585, 0x0076, 0xad10, 0xac0c, 0xab24, 0xaa20, 0xa930, 0xa808,
+	0xd0b4, 0x1120, 0x2029, 0x0000, 0x2021, 0x0000, 0x8906, 0x8006,
+	0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x001b, 0x21a8,
+	0x27e0, 0x2098, 0x27e8, 0x20a0, 0x0006, 0x080c, 0x0f7c, 0x000e,
+	0x080c, 0x4b6b, 0x007e, 0x701f, 0x3bf7, 0x7023, 0x0001, 0x0005,
+	0x0804, 0x3583, 0x0156, 0x00c6, 0xa814, 0x908a, 0x001e, 0x0218,
+	0xa833, 0x001e, 0x0010, 0xa832, 0x0078, 0x81ff, 0x0168, 0x0016,
+	0x080c, 0x4b1f, 0x001e, 0x0130, 0xa800, 0x2040, 0xa008, 0xa80a,
+	0x2100, 0x0c58, 0x9006, 0x0010, 0x9085, 0x0001, 0x00ce, 0x015e,
+	0x0005, 0x0006, 0x00f6, 0x2079, 0x0000, 0x7880, 0x9086, 0x0044,
+	0x00fe, 0x000e, 0x0005, 0x2001, 0x199e, 0x2003, 0x0001, 0x0005,
+	0x00f6, 0x00e6, 0x00c6, 0x2061, 0x0200, 0x2001, 0x19a9, 0x2004,
+	0x601a, 0x2061, 0x0100, 0x2001, 0x19a8, 0x2004, 0x60ce, 0x6104,
+	0xc1ac, 0x6106, 0x080c, 0x4b1f, 0xa813, 0x0019, 0xa817, 0x0001,
+	0x2900, 0xa85a, 0x2001, 0x002e, 0x2004, 0xa866, 0x2001, 0x002f,
+	0x2004, 0xa86a, 0x2061, 0x0090, 0x2079, 0x0100, 0x2001, 0x19a8,
+	0x2004, 0x6036, 0x2009, 0x0040, 0x080c, 0x2410, 0x2001, 0x002a,
+	0x2004, 0x9084, 0xfff8, 0xa86e, 0x601a, 0xa873, 0x0000, 0x601f,
+	0x0000, 0x78ca, 0x9006, 0x600a, 0x600e, 0x00ce, 0x00ee, 0x00fe,
+	0x0005, 0x00e6, 0x080c, 0x4b1f, 0x2940, 0xa013, 0x0019, 0xa017,
+	0x0001, 0x2800, 0xa05a, 0x2001, 0x0030, 0x2004, 0xa866, 0x2001,
+	0x0031, 0x2004, 0xa86a, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8,
+	0xa86e, 0xa873, 0x0000, 0x2001, 0x032a, 0x2003, 0x0004, 0x2001,
+	0x0300, 0x2003, 0x0000, 0x2001, 0x020d, 0x2003, 0x0000, 0x2001,
+	0x0004, 0x200c, 0x918d, 0x0002, 0x2102, 0x00ee, 0x0005, 0x0126,
+	0x2091, 0x8000, 0x81ff, 0x0148, 0x080c, 0x2c6e, 0x1130, 0x9006,
+	0x080c, 0x2bc6, 0x9006, 0x080c, 0x2ba9, 0x7884, 0x9084, 0x0007,
+	0x0002, 0x3d74, 0x3d7d, 0x3d86, 0x3d71, 0x3d71, 0x3d71, 0x3d71,
+	0x3d71, 0x012e, 0x0804, 0x35b8, 0x2009, 0x0114, 0x2104, 0x9085,
+	0x0800, 0x200a, 0x080c, 0x3f42, 0x00c0, 0x2009, 0x0114, 0x2104,
+	0x9085, 0x4000, 0x200a, 0x080c, 0x3f42, 0x0078, 0x080c, 0x743e,
+	0x1128, 0x012e, 0x2009, 0x0016, 0x0804, 0x35b5, 0x81ff, 0x0128,
+	0x012e, 0x2021, 0x400b, 0x0804, 0x3585, 0x0086, 0x0096, 0x00a6,
+	0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x080c, 0x3aa3, 0x2009,
+	0x0101, 0x210c, 0x0016, 0x7ec8, 0x7dcc, 0x9006, 0x2068, 0x2060,
+	0x2058, 0x080c, 0x420b, 0x080c, 0x415b, 0x903e, 0x2720, 0x00f6,
+	0x00e6, 0x0086, 0x2940, 0x2071, 0x1a65, 0x2079, 0x0090, 0x00d6,
+	0x2069, 0x0000, 0x6884, 0xd0b4, 0x0120, 0x68d4, 0x780e, 0x68d0,
+	0x780a, 0x00de, 0x2011, 0x0001, 0x080c, 0x40bc, 0x080c, 0x2c76,
+	0x080c, 0x2c76, 0x080c, 0x2c76, 0x080c, 0x2c76, 0x080c, 0x40bc,
+	0x008e, 0x00ee, 0x00fe, 0x080c, 0x3fe9, 0x2009, 0x9c40, 0x8109,
+	0x11b0, 0x080c, 0x3ef8, 0x2001, 0x0004, 0x200c, 0x918c, 0xfffd,
+	0x2102, 0x001e, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x00ae,
+	0x009e, 0x008e, 0x2009, 0x0017, 0x080c, 0x35b5, 0x0cf8, 0x2001,
+	0x020b, 0x2004, 0x9084, 0x0140, 0x1d10, 0x00f6, 0x2079, 0x0000,
+	0x7884, 0x00fe, 0xd0bc, 0x0178, 0x2001, 0x0201, 0x200c, 0x81ff,
+	0x0150, 0x080c, 0x3fc7, 0x2d00, 0x9c05, 0x9b05, 0x0120, 0x080c,
+	0x3ef8, 0x0804, 0x3ea5, 0x080c, 0x4130, 0x080c, 0x4054, 0x080c,
+	0x3faa, 0x080c, 0x3fdf, 0x00f6, 0x2079, 0x0100, 0x7824, 0xd0ac,
+	0x0130, 0x8b58, 0x080c, 0x3ef8, 0x00fe, 0x0804, 0x3ea5, 0x00fe,
+	0x080c, 0x3eee, 0x1150, 0x8d68, 0x2001, 0x0032, 0x2602, 0x2001,
+	0x0033, 0x2502, 0x080c, 0x3ef8, 0x0080, 0x87ff, 0x0138, 0x2001,
+	0x0201, 0x2004, 0x9005, 0x1908, 0x8739, 0x0038, 0x2001, 0x1a61,
+	0x2004, 0x9086, 0x0000, 0x1904, 0x3df5, 0x2001, 0x032f, 0x2003,
+	0x00f6, 0x8631, 0x1208, 0x8529, 0x2500, 0x9605, 0x0904, 0x3ea5,
+	0x7884, 0xd0bc, 0x0128, 0x2d00, 0x9c05, 0x9b05, 0x1904, 0x3ea5,
+	0xa013, 0x0019, 0x2001, 0x032a, 0x2003, 0x0004, 0x7884, 0xd0ac,
+	0x1148, 0x2001, 0x1a61, 0x2003, 0x0003, 0x2001, 0x032a, 0x2003,
+	0x0009, 0x0030, 0xa017, 0x0001, 0x78b4, 0x9005, 0x0108, 0xa016,
+	0x2800, 0xa05a, 0x2009, 0x0040, 0x080c, 0x2410, 0x2900, 0xa85a,
+	0xa813, 0x0019, 0x7884, 0xd0a4, 0x1180, 0xa817, 0x0000, 0x00c6,
+	0x20a9, 0x0004, 0x2061, 0x0090, 0x602b, 0x0008, 0x2001, 0x0203,
+	0x2004, 0x1f04, 0x3e7c, 0x00ce, 0x0030, 0xa817, 0x0001, 0x78b0,
+	0x9005, 0x0108, 0xa816, 0x00f6, 0x00c6, 0x2079, 0x0100, 0x2061,
+	0x0090, 0x7827, 0x0002, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8,
 	0x601a, 0x0006, 0x2001, 0x002b, 0x2004, 0x601e, 0x78c6, 0x000e,
-	0x78ca, 0x9006, 0x600a, 0x600e, 0x008e, 0x00ce, 0x00ee, 0x00fe,
-	0x0005, 0x00e6, 0x2071, 0x0080, 0xaa60, 0x22e8, 0x20a0, 0x20e1,
-	0x0000, 0x2099, 0x0088, 0x702b, 0x0026, 0x7402, 0x7306, 0x9006,
-	0x700a, 0x700e, 0x810b, 0x810b, 0x21a8, 0x810b, 0x7112, 0x702b,
-	0x0041, 0x702c, 0xd0fc, 0x0de8, 0x702b, 0x0002, 0x702b, 0x0040,
-	0x4005, 0x7400, 0x7304, 0x87ff, 0x0190, 0x0086, 0x0096, 0x2940,
-	0x0086, 0x080c, 0x4abe, 0x008e, 0xa058, 0x00a6, 0x2050, 0x2900,
-	0xb006, 0xa05a, 0x00ae, 0x009e, 0x008e, 0x9085, 0x0001, 0x00ee,
-	0x0005, 0x00e6, 0x2001, 0x002d, 0x2004, 0x9005, 0x0528, 0x2038,
-	0x2001, 0x0030, 0x2024, 0x2001, 0x0031, 0x201c, 0x080c, 0x4abe,
-	0x2940, 0xa813, 0x0019, 0xaf16, 0x2900, 0xa85a, 0x978a, 0x0007,
-	0x0220, 0x2138, 0x2009, 0x0007, 0x0010, 0x2708, 0x903e, 0x0096,
-	0xa858, 0x2048, 0xa85c, 0x9080, 0x0019, 0x009e, 0x080c, 0x4181,
-	0x1d68, 0x2900, 0xa85a, 0x00d8, 0x080c, 0x4abe, 0x2940, 0xa013,
-	0x0019, 0xa017, 0x0001, 0x2800, 0xa05a, 0x2001, 0x0030, 0x2004,
-	0xa066, 0x2001, 0x0031, 0x2004, 0xa06a, 0x2001, 0x002a, 0x2004,
-	0x9084, 0xfff8, 0xa06e, 0x2001, 0x002b, 0x2004, 0xa072, 0x2001,
-	0x032a, 0x2003, 0x0004, 0x7884, 0xd0ac, 0x1180, 0x2001, 0x0101,
-	0x200c, 0x918d, 0x0200, 0x2102, 0xa017, 0x0000, 0x2001, 0x1a61,
-	0x2003, 0x0003, 0x2001, 0x032a, 0x2003, 0x0009, 0x2001, 0x0300,
-	0x2003, 0x0000, 0x2001, 0x020d, 0x2003, 0x0000, 0x2001, 0x0004,
-	0x200c, 0x918d, 0x0002, 0x2102, 0x00ee, 0x0005, 0x0126, 0x2091,
-	0x8000, 0x20a9, 0x0007, 0x20a1, 0x1840, 0x20e9, 0x0001, 0x9006,
-	0x4004, 0x20a9, 0x0014, 0x20a1, 0xffec, 0x20e9, 0x0000, 0x9006,
-	0x4004, 0x2009, 0x013c, 0x200a, 0x012e, 0x7880, 0x9086, 0x0052,
-	0x0108, 0x0005, 0x0804, 0x3531, 0x7d98, 0x7c9c, 0x0804, 0x3633,
-	0x080c, 0x73b3, 0x190c, 0x5ff2, 0x6040, 0x9084, 0x0020, 0x09b1,
-	0x2069, 0x1847, 0x2d00, 0x2009, 0x0030, 0x7a8c, 0x7b88, 0x7c9c,
-	0x7d98, 0x2039, 0x0001, 0x080c, 0x4b07, 0x701f, 0x4260, 0x0005,
-	0x080c, 0x56f1, 0x1130, 0x3b00, 0x3a08, 0xc194, 0xc095, 0x20d8,
-	0x21d0, 0x2069, 0x1847, 0x6800, 0x9005, 0x0904, 0x3566, 0x6804,
-	0xd0ac, 0x0118, 0xd0a4, 0x0904, 0x3566, 0xd094, 0x00c6, 0x2061,
-	0x0100, 0x6104, 0x0138, 0x6200, 0x9292, 0x0005, 0x0218, 0x918c,
-	0xffdf, 0x0010, 0x918d, 0x0020, 0x6106, 0x00ce, 0xd08c, 0x00c6,
-	0x2061, 0x0100, 0x6104, 0x0118, 0x918d, 0x0010, 0x0010, 0x918c,
-	0xffef, 0x6106, 0x00ce, 0xd084, 0x0158, 0x6a28, 0x928a, 0x007f,
-	0x1a04, 0x3566, 0x9288, 0x3332, 0x210d, 0x918c, 0x00ff, 0x6166,
-	0xd0dc, 0x0130, 0x6828, 0x908a, 0x007f, 0x1a04, 0x3566, 0x605e,
-	0x6888, 0x9084, 0x0030, 0x8004, 0x8004, 0x8004, 0x8004, 0x0006,
-	0x2009, 0x19b0, 0x9080, 0x2987, 0x2005, 0x200a, 0x000e, 0x2009,
-	0x19b1, 0x9080, 0x298b, 0x2005, 0x200a, 0x6808, 0x908a, 0x0100,
-	0x0a04, 0x3566, 0x908a, 0x0841, 0x1a04, 0x3566, 0x9084, 0x0007,
-	0x1904, 0x3566, 0x680c, 0x9005, 0x0904, 0x3566, 0x6810, 0x9005,
-	0x0904, 0x3566, 0x6848, 0x6940, 0x910a, 0x1a04, 0x3566, 0x8001,
-	0x0904, 0x3566, 0x684c, 0x6944, 0x910a, 0x1a04, 0x3566, 0x8001,
-	0x0904, 0x3566, 0x2009, 0x1980, 0x200b, 0x0000, 0x2001, 0x1869,
-	0x2004, 0xd0c4, 0x0140, 0x7884, 0x200a, 0x2009, 0x017f, 0x200a,
-	0x3b00, 0xc085, 0x20d8, 0x6814, 0x908c, 0x00ff, 0x614e, 0x8007,
-	0x9084, 0x00ff, 0x6052, 0x080c, 0x76ca, 0x080c, 0x69bb, 0x080c,
-	0x69ef, 0x6808, 0x602a, 0x080c, 0x2351, 0x2009, 0x0170, 0x200b,
-	0x0080, 0xa001, 0xa001, 0x200b, 0x0000, 0x0036, 0x6b08, 0x080c,
-	0x28ee, 0x003e, 0x6000, 0x9086, 0x0000, 0x1904, 0x43f7, 0x6818,
-	0x691c, 0x6a20, 0x6b24, 0x8007, 0x810f, 0x8217, 0x831f, 0x6016,
-	0x611a, 0x621e, 0x6322, 0x6c04, 0xd4f4, 0x0148, 0x6830, 0x6934,
-	0x6a38, 0x6b3c, 0x8007, 0x810f, 0x8217, 0x831f, 0x0010, 0x9084,
-	0xf0ff, 0x6006, 0x610a, 0x620e, 0x6312, 0x8007, 0x810f, 0x8217,
-	0x831f, 0x20a9, 0x0004, 0x20a1, 0x19b2, 0x20e9, 0x0001, 0x4001,
-	0x20a9, 0x0004, 0x20a1, 0x19cc, 0x20e9, 0x0001, 0x4001, 0x080c,
-	0x85f5, 0x00c6, 0x900e, 0x20a9, 0x0001, 0x6b70, 0xd384, 0x0510,
-	0x0068, 0x2009, 0x0100, 0x210c, 0x918e, 0x0008, 0x1110, 0x839d,
-	0x0010, 0x83f5, 0x3e18, 0x12b0, 0x3508, 0x8109, 0x080c, 0x7c81,
-	0x6878, 0x6016, 0x6874, 0x2008, 0x9084, 0xff00, 0x8007, 0x600a,
-	0x9184, 0x00ff, 0x6006, 0x8108, 0x1118, 0x6003, 0x0003, 0x0010,
-	0x6003, 0x0001, 0x1f04, 0x4351, 0x00ce, 0x00c6, 0x2061, 0x199b,
-	0x6a88, 0x9284, 0xc000, 0x2010, 0x9286, 0x0000, 0x1158, 0x2063,
-	0x0000, 0x2001, 0x0001, 0x080c, 0x2b95, 0x2001, 0x0001, 0x080c,
-	0x2b78, 0x0088, 0x9286, 0x4000, 0x1148, 0x2063, 0x0001, 0x9006,
-	0x080c, 0x2b95, 0x9006, 0x080c, 0x2b78, 0x0028, 0x9286, 0x8000,
-	0x1d30, 0x2063, 0x0002, 0x00ce, 0x6888, 0xd0ec, 0x0130, 0x2011,
-	0x0114, 0x2204, 0x9085, 0x0100, 0x2012, 0x6a80, 0x9284, 0x0030,
-	0x9086, 0x0030, 0x1128, 0x9294, 0xffcf, 0x9295, 0x0020, 0x6a82,
-	0x2001, 0x197b, 0x6a80, 0x9294, 0x0030, 0x928e, 0x0000, 0x0170,
-	0x928e, 0x0010, 0x0118, 0x928e, 0x0020, 0x0140, 0x2003, 0xaaaa,
-	0x080c, 0x2963, 0x2001, 0x196c, 0x2102, 0x0008, 0x2102, 0x00c6,
-	0x2061, 0x0100, 0x602f, 0x0040, 0x602f, 0x0000, 0x00ce, 0x080c,
-	0x73b3, 0x0128, 0x080c, 0x4fee, 0x0110, 0x080c, 0x28b4, 0x60d4,
-	0x9005, 0x01c0, 0x6003, 0x0001, 0x2009, 0x43df, 0x00e0, 0x080c,
-	0x73b3, 0x1168, 0x2011, 0x7249, 0x080c, 0x84f9, 0x2011, 0x723c,
-	0x080c, 0x85d3, 0x080c, 0x769e, 0x080c, 0x72e5, 0x0040, 0x080c,
-	0x5eec, 0x0028, 0x6003, 0x0004, 0x2009, 0x43f7, 0x0020, 0x080c,
-	0x68eb, 0x0804, 0x3531, 0x2001, 0x0170, 0x2004, 0x9084, 0x00ff,
-	0x9086, 0x004c, 0x1118, 0x2091, 0x30bd, 0x0817, 0x2091, 0x303d,
-	0x0817, 0x6000, 0x9086, 0x0000, 0x0904, 0x3563, 0x2069, 0x1847,
-	0x7890, 0x6842, 0x7894, 0x6846, 0x2d00, 0x2009, 0x0030, 0x7a8c,
-	0x7b88, 0x7c9c, 0x7d98, 0x2039, 0x0001, 0x0804, 0x4b0a, 0x9006,
-	0x080c, 0x28b4, 0x81ff, 0x1904, 0x3563, 0x080c, 0x73b3, 0x11b0,
-	0x080c, 0x7699, 0x080c, 0x602d, 0x080c, 0x3326, 0x0118, 0x6130,
-	0xc18d, 0x6132, 0x080c, 0xd25a, 0x0130, 0x080c, 0x73d6, 0x1118,
-	0x080c, 0x738b, 0x0038, 0x080c, 0x72e5, 0x0020, 0x080c, 0x5ff2,
-	0x080c, 0x5eec, 0x0804, 0x3531, 0x81ff, 0x1904, 0x3563, 0x080c,
-	0x73b3, 0x1110, 0x0804, 0x3563, 0x6194, 0x81ff, 0x01a8, 0x704f,
-	0x0000, 0x2001, 0x1c80, 0x2009, 0x0040, 0x7a8c, 0x7b88, 0x7c9c,
-	0x7d98, 0x0126, 0x2091, 0x8000, 0x2039, 0x0001, 0x080c, 0x4b0a,
-	0x701f, 0x352f, 0x012e, 0x0005, 0x704f, 0x0001, 0x00d6, 0x2069,
-	0x1c80, 0x20a9, 0x0040, 0x20e9, 0x0001, 0x20a1, 0x1c80, 0x2019,
-	0xffff, 0x4304, 0x655c, 0x9588, 0x3332, 0x210d, 0x918c, 0x00ff,
-	0x216a, 0x900e, 0x2011, 0x0002, 0x2100, 0x9506, 0x01a8, 0x080c,
-	0x6616, 0x1190, 0xb814, 0x821c, 0x0238, 0x9398, 0x1c80, 0x9085,
-	0xff00, 0x8007, 0x201a, 0x0038, 0x9398, 0x1c80, 0x2324, 0x94a4,
-	0xff00, 0x9405, 0x201a, 0x8210, 0x8108, 0x9182, 0x0080, 0x1208,
-	0x0c18, 0x8201, 0x8007, 0x2d0c, 0x9105, 0x206a, 0x00de, 0x20a9,
-	0x0040, 0x20a1, 0x1c80, 0x2099, 0x1c80, 0x080c, 0x5f7d, 0x0804,
-	0x4451, 0x080c, 0x4af1, 0x0904, 0x3566, 0x080c, 0x4abe, 0x1120,
-	0x2009, 0x0002, 0x0804, 0x3563, 0x080c, 0x56e2, 0xd0b4, 0x0558,
-	0x7884, 0x908e, 0x007e, 0x0538, 0x908e, 0x007f, 0x0520, 0x908e,
-	0x0080, 0x0508, 0x080c, 0x3321, 0x1148, 0xb800, 0xd08c, 0x11d8,
-	0xb804, 0x9084, 0x00ff, 0x9086, 0x0006, 0x11a8, 0xa867, 0x0000,
-	0xa868, 0xc0fd, 0xa86a, 0x080c, 0xcd23, 0x1120, 0x2009, 0x0003,
-	0x0804, 0x3563, 0x7007, 0x0003, 0x701f, 0x44df, 0x0005, 0x080c,
-	0x4af1, 0x0904, 0x3566, 0x20a9, 0x002b, 0xb8c4, 0x20e0, 0xb8c8,
-	0x2098, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0002, 0x20a0, 0x4003,
-	0x20a9, 0x0008, 0x9080, 0x0006, 0x20a0, 0xb8c4, 0x20e0, 0xb8c8,
-	0x9080, 0x0006, 0x2098, 0x080c, 0x0f7c, 0x0070, 0x20a9, 0x0004,
-	0xa85c, 0x9080, 0x000a, 0x20a0, 0xb8c4, 0x20e0, 0xb8c8, 0x9080,
-	0x000a, 0x2098, 0x080c, 0x0f7c, 0x8906, 0x8006, 0x8007, 0x90bc,
-	0x003f, 0x9084, 0xffc0, 0x9080, 0x0002, 0x2009, 0x002b, 0x7a8c,
-	0x7b88, 0x7c9c, 0x7d98, 0x0804, 0x4b0a, 0x81ff, 0x1904, 0x3563,
-	0x080c, 0x4ad5, 0x0904, 0x3566, 0x080c, 0x6788, 0x0904, 0x3563,
-	0x0058, 0xa878, 0x9005, 0x0120, 0x2009, 0x0004, 0x0804, 0x3563,
-	0xa974, 0xaa94, 0x0804, 0x3531, 0x080c, 0x56ea, 0x0904, 0x3531,
-	0x701f, 0x4529, 0x7007, 0x0003, 0x0005, 0x81ff, 0x1904, 0x3563,
-	0x7888, 0x908a, 0x1000, 0x1a04, 0x3566, 0x080c, 0x4af1, 0x0904,
-	0x3566, 0x080c, 0x6989, 0x0120, 0x080c, 0x6991, 0x1904, 0x3566,
-	0x080c, 0x680d, 0x0904, 0x3563, 0x2019, 0x0004, 0x900e, 0x080c,
-	0x679a, 0x0904, 0x3563, 0x7984, 0x7a88, 0x04c9, 0x08a8, 0xa89c,
-	0x908a, 0x1000, 0x12f8, 0x080c, 0x4aef, 0x01e0, 0x080c, 0x6989,
-	0x0118, 0x080c, 0x6991, 0x11b0, 0x080c, 0x680d, 0x2009, 0x0002,
-	0x0168, 0x2009, 0x0002, 0x2019, 0x0004, 0x080c, 0x679a, 0x2009,
-	0x0003, 0x0120, 0xa998, 0xaa9c, 0x00d1, 0x0060, 0xa897, 0x4005,
-	0xa99a, 0x0010, 0xa897, 0x4006, 0x900e, 0x9085, 0x0001, 0x2001,
-	0x0030, 0x0005, 0xa897, 0x4000, 0x080c, 0x56ea, 0x0110, 0x9006,
-	0x0018, 0x900e, 0x9085, 0x0001, 0x2001, 0x0000, 0x0005, 0x9186,
-	0x00ff, 0x0110, 0x0071, 0x0060, 0x2029, 0x007e, 0x2061, 0x1800,
-	0x645c, 0x2400, 0x9506, 0x0110, 0x2508, 0x0019, 0x8529, 0x1ec8,
-	0x0005, 0x080c, 0x6616, 0x1138, 0x2200, 0x8003, 0x800b, 0x810b,
-	0x9108, 0x080c, 0x8507, 0x0005, 0x81ff, 0x1904, 0x3563, 0x798c,
-	0x2001, 0x197f, 0x918c, 0x8000, 0x2102, 0x080c, 0x4ad5, 0x0904,
-	0x3566, 0x080c, 0x6989, 0x0120, 0x080c, 0x6991, 0x1904, 0x3566,
-	0x080c, 0x66dd, 0x0904, 0x3563, 0x080c, 0x6791, 0x0904, 0x3563,
-	0x2001, 0x197f, 0x2004, 0xd0fc, 0x1904, 0x3531, 0x0804, 0x4534,
-	0xa9a0, 0x2001, 0x197f, 0x918c, 0x8000, 0xc18d, 0x2102, 0x080c,
-	0x4ae2, 0x01a0, 0x080c, 0x6989, 0x0118, 0x080c, 0x6991, 0x1170,
-	0x080c, 0x66dd, 0x2009, 0x0002, 0x0128, 0x080c, 0x6791, 0x1170,
-	0x2009, 0x0003, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006,
-	0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x0005, 0xa897, 0x4000,
-	0x2001, 0x197f, 0x2004, 0xd0fc, 0x1128, 0x080c, 0x56ea, 0x0110,
-	0x9006, 0x0018, 0x900e, 0x9085, 0x0001, 0x2001, 0x0000, 0x0005,
-	0x81ff, 0x1904, 0x3563, 0x798c, 0x2001, 0x197e, 0x918c, 0x8000,
-	0x2102, 0x080c, 0x4ad5, 0x0904, 0x3566, 0x080c, 0x6989, 0x0120,
-	0x080c, 0x6991, 0x1904, 0x3566, 0x080c, 0x66dd, 0x0904, 0x3563,
-	0x080c, 0x677f, 0x0904, 0x3563, 0x2001, 0x197e, 0x2004, 0xd0fc,
-	0x1904, 0x3531, 0x0804, 0x4534, 0xa9a0, 0x2001, 0x197e, 0x918c,
-	0x8000, 0xc18d, 0x2102, 0x080c, 0x4ae2, 0x01a0, 0x080c, 0x6989,
-	0x0118, 0x080c, 0x6991, 0x1170, 0x080c, 0x66dd, 0x2009, 0x0002,
-	0x0128, 0x080c, 0x677f, 0x1170, 0x2009, 0x0003, 0xa897, 0x4005,
-	0xa99a, 0x0010, 0xa897, 0x4006, 0x900e, 0x9085, 0x0001, 0x2001,
-	0x0030, 0x0005, 0xa897, 0x4000, 0x2001, 0x197e, 0x2004, 0xd0fc,
-	0x1128, 0x080c, 0x56ea, 0x0110, 0x9006, 0x0018, 0x900e, 0x9085,
-	0x0001, 0x2001, 0x0000, 0x0005, 0x6100, 0x0804, 0x3531, 0x080c,
-	0x4af1, 0x0904, 0x3566, 0x080c, 0x56f6, 0x1904, 0x3563, 0x79a8,
-	0xd184, 0x1158, 0xb834, 0x8007, 0x789e, 0xb830, 0x8007, 0x789a,
-	0xbb2c, 0x831f, 0xba28, 0x8217, 0x0050, 0xb824, 0x8007, 0x789e,
-	0xb820, 0x8007, 0x789a, 0xbb1c, 0x831f, 0xba18, 0x8217, 0xb900,
-	0x918c, 0x0200, 0x0804, 0x3531, 0x78a8, 0x909c, 0x0003, 0xd0ac,
-	0x1150, 0xd0b4, 0x1140, 0x939a, 0x0003, 0x1a04, 0x3563, 0x625c,
-	0x7884, 0x9206, 0x15e8, 0x080c, 0x85df, 0x2001, 0xffec, 0x7a8c,
-	0x7b88, 0x7c9c, 0x7d98, 0x2039, 0x0000, 0x0006, 0x78a8, 0x9084,
-	0x0080, 0x11c8, 0x0006, 0x0036, 0x2001, 0x1a7e, 0x201c, 0x7b9a,
-	0x2003, 0x0000, 0x2001, 0x1a7f, 0x201c, 0x7b9e, 0x2003, 0x0000,
-	0x2001, 0x1a80, 0x201c, 0x7ba2, 0x2003, 0x0000, 0x003e, 0x000e,
-	0x000e, 0x0804, 0x4b0a, 0x000e, 0x2031, 0x0000, 0x2061, 0x18b8,
-	0x2c44, 0xa66a, 0xa17a, 0xa772, 0xa076, 0xa28e, 0xa392, 0xa496,
-	0xa59a, 0x080c, 0x10e9, 0x7007, 0x0002, 0x701f, 0x4700, 0x0005,
-	0x81ff, 0x1904, 0x3563, 0x080c, 0x4af1, 0x0904, 0x3566, 0x080c,
-	0x6989, 0x1904, 0x3563, 0x00c6, 0x080c, 0x4abe, 0x00ce, 0x0904,
-	0x3563, 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, 0x7ea8, 0x080c,
-	0xccc9, 0x0904, 0x3563, 0x7007, 0x0003, 0x701f, 0x471a, 0x0005,
-	0x080c, 0x4226, 0x0006, 0x0036, 0x2001, 0x1a7e, 0x201c, 0x7b9a,
-	0x2003, 0x0000, 0x2001, 0x1a7f, 0x201c, 0x7b9e, 0x2003, 0x0000,
-	0x2001, 0x1a80, 0x201c, 0x7ba2, 0x2003, 0x0000, 0x003e, 0x000e,
-	0x0804, 0x3531, 0xa830, 0x9086, 0x0100, 0x0904, 0x3563, 0x8906,
-	0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x001b,
-	0x2009, 0x000c, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x0804, 0x4b0a,
-	0x9006, 0x080c, 0x28b4, 0x78a8, 0x9084, 0x00ff, 0x9086, 0x00ff,
-	0x0118, 0x81ff, 0x1904, 0x3563, 0x080c, 0x73b3, 0x0110, 0x080c,
-	0x5ff2, 0x7888, 0x908a, 0x1000, 0x1a04, 0x3566, 0x7984, 0x9186,
-	0x00ff, 0x0138, 0x9182, 0x007f, 0x1a04, 0x3566, 0x2100, 0x080c,
-	0x287e, 0x0026, 0x00c6, 0x0126, 0x2091, 0x8000, 0x2061, 0x19f9,
-	0x601b, 0x0000, 0x601f, 0x0000, 0x6073, 0x0000, 0x6077, 0x0000,
-	0x080c, 0x73b3, 0x1158, 0x080c, 0x7699, 0x080c, 0x602d, 0x9085,
-	0x0001, 0x080c, 0x73fa, 0x080c, 0x72e5, 0x00d0, 0x080c, 0xadd0,
-	0x2061, 0x0100, 0x2001, 0x1818, 0x2004, 0x9084, 0x00ff, 0x810f,
-	0x9105, 0x604a, 0x6043, 0x0090, 0x6043, 0x0010, 0x2009, 0x1998,
-	0x200b, 0x0000, 0x2009, 0x002d, 0x2011, 0x5f18, 0x080c, 0x8591,
-	0x7984, 0x080c, 0x73b3, 0x1110, 0x2009, 0x00ff, 0x7a88, 0x080c,
-	0x4597, 0x012e, 0x00ce, 0x002e, 0x0804, 0x3531, 0x7984, 0x080c,
-	0x65b5, 0x2b08, 0x1904, 0x3566, 0x0804, 0x3531, 0x81ff, 0x0120,
-	0x2009, 0x0001, 0x0804, 0x3563, 0x60dc, 0xd0ac, 0x1130, 0xd09c,
-	0x1120, 0x2009, 0x0005, 0x0804, 0x3563, 0x080c, 0x4abe, 0x1120,
-	0x2009, 0x0002, 0x0804, 0x3563, 0x7984, 0x9192, 0x0021, 0x1a04,
-	0x3566, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0xa85c, 0x9080, 0x0019,
-	0x702a, 0xaf60, 0x7736, 0x080c, 0x4b07, 0x701f, 0x47ce, 0x7880,
-	0x9086, 0x006e, 0x0110, 0x701f, 0x51a0, 0x0005, 0x2009, 0x0080,
-	0x080c, 0x6616, 0x1118, 0x080c, 0x6989, 0x0120, 0x2021, 0x400a,
-	0x0804, 0x3533, 0x00d6, 0x0096, 0xa964, 0xaa6c, 0xab70, 0xac74,
-	0xad78, 0xae7c, 0xa884, 0x90be, 0x0100, 0x0904, 0x4867, 0x90be,
-	0x0112, 0x0904, 0x4867, 0x90be, 0x0113, 0x0904, 0x4867, 0x90be,
-	0x0114, 0x0904, 0x4867, 0x90be, 0x0117, 0x0904, 0x4867, 0x90be,
-	0x011a, 0x0904, 0x4867, 0x90be, 0x011c, 0x0904, 0x4867, 0x90be,
-	0x0121, 0x0904, 0x484e, 0x90be, 0x0131, 0x0904, 0x484e, 0x90be,
-	0x0171, 0x0904, 0x4867, 0x90be, 0x0173, 0x0904, 0x4867, 0x90be,
-	0x01a1, 0x1128, 0xa894, 0x8007, 0xa896, 0x0804, 0x4872, 0x90be,
-	0x0212, 0x0904, 0x485b, 0x90be, 0x0213, 0x05e8, 0x90be, 0x0214,
-	0x0500, 0x90be, 0x0217, 0x0188, 0x90be, 0x021a, 0x1120, 0xa89c,
-	0x8007, 0xa89e, 0x04e0, 0x90be, 0x021f, 0x05c8, 0x90be, 0x0300,
-	0x05b0, 0x009e, 0x00de, 0x0804, 0x3566, 0x7028, 0x9080, 0x0010,
-	0x2098, 0x20a0, 0x7034, 0x20e0, 0x20e8, 0x20a9, 0x0007, 0x080c,
-	0x48b0, 0x7028, 0x9080, 0x000e, 0x2098, 0x20a0, 0x7034, 0x20e0,
-	0x20e8, 0x20a9, 0x0001, 0x080c, 0x48b0, 0x00c8, 0x7028, 0x9080,
-	0x000c, 0x2098, 0x20a0, 0x7034, 0x20e0, 0x20e8, 0x20a9, 0x0001,
-	0x080c, 0x48bd, 0x00b8, 0x7028, 0x9080, 0x000e, 0x2098, 0x20a0,
-	0x7034, 0x20e0, 0x20e8, 0x20a9, 0x0001, 0x080c, 0x48bd, 0x7028,
+	0x78ca, 0x00ce, 0x00fe, 0x0804, 0x3daf, 0x001e, 0x00c6, 0x2001,
+	0x032a, 0x2003, 0x0004, 0x2061, 0x0100, 0x6027, 0x0002, 0x6106,
+	0x2011, 0x020d, 0x2013, 0x0020, 0x2001, 0x0004, 0x200c, 0x918c,
+	0xfffd, 0x2102, 0x080c, 0x12ed, 0x7884, 0x9084, 0x0003, 0x9086,
+	0x0002, 0x01a0, 0x2009, 0x0028, 0x080c, 0x2410, 0x2001, 0x0227,
+	0x200c, 0x2102, 0x6050, 0x9084, 0xb7ef, 0x6052, 0x602f, 0x0000,
+	0x604b, 0xf7f7, 0x6043, 0x0090, 0x6043, 0x0010, 0x00ce, 0x2d08,
+	0x2c10, 0x2b18, 0x2b00, 0x9c05, 0x9d05, 0x00fe, 0x00ee, 0x00de,
+	0x00ce, 0x00be, 0x00ae, 0x009e, 0x008e, 0x1118, 0x012e, 0x0804,
+	0x3583, 0x012e, 0x2021, 0x400c, 0x0804, 0x3585, 0x9085, 0x0001,
+	0x1d04, 0x3ef7, 0x2091, 0x6000, 0x8420, 0x9486, 0x0064, 0x0005,
+	0x2001, 0x0105, 0x2003, 0x0010, 0x2001, 0x032a, 0x2003, 0x0004,
+	0x2001, 0x1a61, 0x2003, 0x0000, 0x0071, 0x2009, 0x0048, 0x080c,
+	0x2410, 0x2001, 0x0227, 0x2024, 0x2402, 0x2001, 0x0109, 0x2003,
+	0x4000, 0x9026, 0x0005, 0x00f6, 0x00e6, 0x2071, 0x1a65, 0x7000,
+	0x9086, 0x0000, 0x0520, 0x2079, 0x0090, 0x2009, 0x0206, 0x2104,
+	0x2009, 0x0203, 0x210c, 0x9106, 0x1120, 0x2009, 0x0040, 0x080c,
+	0x2410, 0x782c, 0xd0fc, 0x0d88, 0x080c, 0x4130, 0x7000, 0x9086,
+	0x0000, 0x1d58, 0x782b, 0x0004, 0x782c, 0xd0ac, 0x1de8, 0x2009,
+	0x0040, 0x080c, 0x2410, 0x782b, 0x0002, 0x7003, 0x0000, 0x00ee,
+	0x00fe, 0x0005, 0x00f6, 0x2079, 0x0100, 0x2001, 0x1818, 0x200c,
+	0x7932, 0x7936, 0x080c, 0x28c5, 0x7850, 0x9084, 0xfbff, 0x9085,
+	0x0030, 0x7852, 0x2019, 0x01f4, 0x8319, 0x1df0, 0x9084, 0xffcf,
+	0x9085, 0x2000, 0x7852, 0x20a9, 0x0046, 0x1d04, 0x3f5d, 0x2091,
+	0x6000, 0x1f04, 0x3f5d, 0x7850, 0x9085, 0x0400, 0x9084, 0xdfff,
+	0x7852, 0x2001, 0x0021, 0x2004, 0x9084, 0x0003, 0x9086, 0x0001,
+	0x1120, 0x7850, 0x9084, 0xdfff, 0x7852, 0x784b, 0xf7f7, 0x7843,
+	0x0090, 0x7843, 0x0010, 0x20a9, 0x0028, 0xa001, 0x1f04, 0x3f7d,
+	0x7850, 0x9085, 0x1400, 0x7852, 0x2019, 0x61a8, 0x7854, 0xa001,
+	0xa001, 0xd08c, 0x1110, 0x8319, 0x1dc8, 0x7827, 0x0048, 0x7850,
+	0x9085, 0x0400, 0x7852, 0x7843, 0x0040, 0x2019, 0x01f4, 0xa001,
+	0xa001, 0x8319, 0x1de0, 0x2001, 0x0100, 0x080c, 0x2d4e, 0x7827,
+	0x0020, 0x7843, 0x0000, 0x9006, 0x080c, 0x2d4e, 0x7827, 0x0048,
+	0x00fe, 0x0005, 0x7884, 0xd0ac, 0x11c8, 0x00f6, 0x00e6, 0x2071,
+	0x1a61, 0x2079, 0x0320, 0x2001, 0x0201, 0x2004, 0x9005, 0x0160,
+	0x7000, 0x9086, 0x0000, 0x1140, 0x0051, 0xd0bc, 0x0108, 0x8738,
+	0x7003, 0x0003, 0x782b, 0x0019, 0x00ee, 0x00fe, 0x0005, 0x00f6,
+	0x2079, 0x0300, 0x78bc, 0x00fe, 0x908c, 0x0070, 0x0178, 0x2009,
+	0x0032, 0x260a, 0x2009, 0x0033, 0x250a, 0xd0b4, 0x0108, 0x8c60,
+	0xd0ac, 0x0108, 0x8d68, 0xd0a4, 0x0108, 0x8b58, 0x0005, 0x00f6,
+	0x2079, 0x0200, 0x781c, 0xd084, 0x0110, 0x7837, 0x0050, 0x00fe,
+	0x0005, 0x00e6, 0x2071, 0x0100, 0x2001, 0x19a9, 0x2004, 0x70e2,
+	0x080c, 0x3cd9, 0x1188, 0x2001, 0x1820, 0x2004, 0x2009, 0x181f,
+	0x210c, 0x918c, 0x00ff, 0x706e, 0x716a, 0x7066, 0x918d, 0x3200,
+	0x7162, 0x7073, 0xe109, 0x0080, 0x702c, 0x9085, 0x0002, 0x702e,
+	0x2009, 0x1818, 0x210c, 0x716e, 0x7063, 0x0100, 0x7166, 0x719e,
+	0x706b, 0x0000, 0x7073, 0x0809, 0x7077, 0x0008, 0x7078, 0x9080,
+	0x0100, 0x707a, 0x7080, 0x8000, 0x7082, 0x7087, 0xaaaa, 0x9006,
+	0x708a, 0x708e, 0x707e, 0x70d6, 0x70ab, 0x0036, 0x70af, 0x95d5,
+	0x7014, 0x9084, 0x1984, 0x9085, 0x0092, 0x7016, 0x080c, 0x4130,
+	0x00f6, 0x2071, 0x1a61, 0x2079, 0x0320, 0x00d6, 0x2069, 0x0000,
+	0x6884, 0xd0b4, 0x0120, 0x689c, 0x780e, 0x6898, 0x780a, 0x00de,
+	0x2009, 0x03e8, 0x8109, 0x1df0, 0x792c, 0xd1fc, 0x0110, 0x782b,
+	0x0004, 0x2011, 0x0011, 0x080c, 0x40bc, 0x2011, 0x0001, 0x080c,
+	0x40bc, 0x00fe, 0x00ee, 0x0005, 0x00f6, 0x00e6, 0x2071, 0x1a61,
+	0x2079, 0x0320, 0x792c, 0xd1fc, 0x0904, 0x40b9, 0x782b, 0x0002,
+	0x9026, 0xd19c, 0x1904, 0x40b5, 0x7000, 0x0002, 0x40b9, 0x406a,
+	0x409a, 0x40b5, 0xd1bc, 0x1170, 0xd1dc, 0x1190, 0x8001, 0x7002,
+	0x2011, 0x0001, 0x080c, 0x40bc, 0x0904, 0x40b9, 0x080c, 0x40bc,
+	0x0804, 0x40b9, 0x00f6, 0x2079, 0x0300, 0x78bf, 0x0000, 0x00fe,
+	0x7810, 0x7914, 0x782b, 0x0004, 0x7812, 0x7916, 0x2001, 0x0201,
+	0x200c, 0x81ff, 0x0de8, 0x080c, 0x3fc7, 0x2009, 0x0001, 0x00f6,
+	0x2079, 0x0300, 0x78b8, 0x00fe, 0xd0ec, 0x0110, 0x2009, 0x0011,
+	0x792a, 0x00f8, 0x8001, 0x7002, 0x9184, 0x0880, 0x1140, 0x782c,
+	0xd0fc, 0x1904, 0x405e, 0x2011, 0x0001, 0x00b1, 0x0090, 0xa010,
+	0x9092, 0x0004, 0x9086, 0x0015, 0x1120, 0xa000, 0xa05a, 0x2011,
+	0x0031, 0xa212, 0xd1dc, 0x1960, 0x0828, 0x782b, 0x0004, 0x7003,
+	0x0000, 0x00ee, 0x00fe, 0x0005, 0xa014, 0x9005, 0x0550, 0x8001,
+	0x0036, 0x0096, 0xa016, 0xa058, 0x2048, 0xa010, 0x2009, 0x0031,
+	0x911a, 0x831c, 0x831c, 0x938a, 0x0007, 0x1a0c, 0x0dd5, 0x9398,
+	0x40ea, 0x231d, 0x083f, 0x9080, 0x0004, 0x7a2a, 0x7100, 0x8108,
+	0x7102, 0x009e, 0x003e, 0x908a, 0x0035, 0x1140, 0x0096, 0xa058,
+	0x2048, 0xa804, 0xa05a, 0x2001, 0x0019, 0x009e, 0xa012, 0x9085,
+	0x0001, 0x0005, 0x4127, 0x411e, 0x4115, 0x410c, 0x4103, 0x40fa,
+	0x40f1, 0xa964, 0x7902, 0xa968, 0x7906, 0xa96c, 0x7912, 0xa970,
+	0x7916, 0x0005, 0xa974, 0x7902, 0xa978, 0x7906, 0xa97c, 0x7912,
+	0xa980, 0x7916, 0x0005, 0xa984, 0x7902, 0xa988, 0x7906, 0xa98c,
+	0x7912, 0xa990, 0x7916, 0x0005, 0xa994, 0x7902, 0xa998, 0x7906,
+	0xa99c, 0x7912, 0xa9a0, 0x7916, 0x0005, 0xa9a4, 0x7902, 0xa9a8,
+	0x7906, 0xa9ac, 0x7912, 0xa9b0, 0x7916, 0x0005, 0xa9b4, 0x7902,
+	0xa9b8, 0x7906, 0xa9bc, 0x7912, 0xa9c0, 0x7916, 0x0005, 0xa9c4,
+	0x7902, 0xa9c8, 0x7906, 0xa9cc, 0x7912, 0xa9d0, 0x7916, 0x0005,
+	0x00f6, 0x00e6, 0x0086, 0x2071, 0x1a65, 0x2079, 0x0090, 0x792c,
+	0xd1fc, 0x01e8, 0x782b, 0x0002, 0x2940, 0x9026, 0x7000, 0x0002,
+	0x4157, 0x4143, 0x414e, 0x8001, 0x7002, 0xd19c, 0x1180, 0x2011,
+	0x0001, 0x080c, 0x40bc, 0x190c, 0x40bc, 0x0048, 0x8001, 0x7002,
+	0x782c, 0xd0fc, 0x1d38, 0x2011, 0x0001, 0x080c, 0x40bc, 0x008e,
+	0x00ee, 0x00fe, 0x0005, 0x00f6, 0x00e6, 0x00c6, 0x0086, 0x2061,
+	0x0200, 0x2001, 0x19a9, 0x2004, 0x601a, 0x2061, 0x0100, 0x2001,
+	0x19a8, 0x2004, 0x60ce, 0x6104, 0xc1ac, 0x6106, 0x2001, 0x002c,
+	0x2004, 0x9005, 0x0520, 0x2038, 0x2001, 0x002e, 0x2024, 0x2001,
+	0x002f, 0x201c, 0x080c, 0x4b1f, 0xa813, 0x0019, 0xaf16, 0x2900,
+	0xa85a, 0x978a, 0x0007, 0x0220, 0x2138, 0x2009, 0x0007, 0x0010,
+	0x2708, 0x903e, 0x0096, 0xa858, 0x2048, 0xa85c, 0x9080, 0x0019,
+	0x009e, 0x080c, 0x41d3, 0x1d68, 0x2900, 0xa85a, 0x00d0, 0x080c,
+	0x4b1f, 0xa813, 0x0019, 0xa817, 0x0001, 0x2900, 0xa85a, 0x2001,
+	0x002e, 0x2004, 0xa866, 0x2001, 0x002f, 0x2004, 0xa86a, 0x2001,
+	0x002a, 0x2004, 0x9084, 0xfff8, 0xa86e, 0x2001, 0x002b, 0x2004,
+	0xa872, 0x2061, 0x0090, 0x2079, 0x0100, 0x2001, 0x19a8, 0x2004,
+	0x6036, 0x2009, 0x0040, 0x080c, 0x2410, 0x2001, 0x002a, 0x2004,
+	0x9084, 0xfff8, 0x601a, 0x0006, 0x2001, 0x002b, 0x2004, 0x601e,
+	0x78c6, 0x000e, 0x78ca, 0x9006, 0x600a, 0x600e, 0x008e, 0x00ce,
+	0x00ee, 0x00fe, 0x0005, 0x00e6, 0x2071, 0x0080, 0xaa60, 0x22e8,
+	0x20a0, 0x20e1, 0x0000, 0x2099, 0x0088, 0x702b, 0x0026, 0x7402,
+	0x7306, 0x9006, 0x700a, 0x700e, 0x810b, 0x810b, 0x21a8, 0x810b,
+	0x7112, 0x702b, 0x0041, 0x702c, 0xd0fc, 0x0de8, 0x702b, 0x0002,
+	0x702b, 0x0040, 0x4005, 0x7400, 0x7304, 0x87ff, 0x0190, 0x0086,
+	0x0096, 0x2940, 0x0086, 0x080c, 0x4b1f, 0x008e, 0xa058, 0x00a6,
+	0x2050, 0x2900, 0xb006, 0xa05a, 0x00ae, 0x009e, 0x008e, 0x9085,
+	0x0001, 0x00ee, 0x0005, 0x00e6, 0x2001, 0x002d, 0x2004, 0x9005,
+	0x0528, 0x2038, 0x2001, 0x0030, 0x2024, 0x2001, 0x0031, 0x201c,
+	0x080c, 0x4b1f, 0x2940, 0xa813, 0x0019, 0xaf16, 0x2900, 0xa85a,
+	0x978a, 0x0007, 0x0220, 0x2138, 0x2009, 0x0007, 0x0010, 0x2708,
+	0x903e, 0x0096, 0xa858, 0x2048, 0xa85c, 0x9080, 0x0019, 0x009e,
+	0x080c, 0x41d3, 0x1d68, 0x2900, 0xa85a, 0x00d8, 0x080c, 0x4b1f,
+	0x2940, 0xa013, 0x0019, 0xa017, 0x0001, 0x2800, 0xa05a, 0x2001,
+	0x0030, 0x2004, 0xa066, 0x2001, 0x0031, 0x2004, 0xa06a, 0x2001,
+	0x002a, 0x2004, 0x9084, 0xfff8, 0xa06e, 0x2001, 0x002b, 0x2004,
+	0xa072, 0x2001, 0x032a, 0x2003, 0x0004, 0x7884, 0xd0ac, 0x1180,
+	0x2001, 0x0101, 0x200c, 0x918d, 0x0200, 0x2102, 0xa017, 0x0000,
+	0x2001, 0x1a61, 0x2003, 0x0003, 0x2001, 0x032a, 0x2003, 0x0009,
+	0x2001, 0x0300, 0x2003, 0x0000, 0x2001, 0x020d, 0x2003, 0x0000,
+	0x2001, 0x0004, 0x200c, 0x918d, 0x0002, 0x2102, 0x00ee, 0x0005,
+	0x0126, 0x2091, 0x8000, 0x20a9, 0x0007, 0x20a1, 0x1840, 0x20e9,
+	0x0001, 0x9006, 0x4004, 0x20a9, 0x0014, 0x20a1, 0xffec, 0x20e9,
+	0x0000, 0x9006, 0x4004, 0x2009, 0x013c, 0x200a, 0x012e, 0x7880,
+	0x9086, 0x0052, 0x0108, 0x0005, 0x0804, 0x3583, 0x7d98, 0x7c9c,
+	0x0804, 0x3685, 0x080c, 0x743e, 0x190c, 0x6072, 0x6040, 0x9084,
+	0x0020, 0x09b1, 0x2069, 0x1847, 0x2d00, 0x2009, 0x0030, 0x7a8c,
+	0x7b88, 0x7c9c, 0x7d98, 0x2039, 0x0001, 0x080c, 0x4b68, 0x701f,
+	0x42b2, 0x0005, 0x080c, 0x576c, 0x1130, 0x3b00, 0x3a08, 0xc194,
+	0xc095, 0x20d8, 0x21d0, 0x2069, 0x1847, 0x6800, 0x9005, 0x0904,
+	0x35b8, 0x6804, 0xd0ac, 0x0118, 0xd0a4, 0x0904, 0x35b8, 0xd094,
+	0x00c6, 0x2061, 0x0100, 0x6104, 0x0138, 0x6200, 0x9292, 0x0005,
+	0x0218, 0x918c, 0xffdf, 0x0010, 0x918d, 0x0020, 0x6106, 0x00ce,
+	0xd08c, 0x00c6, 0x2061, 0x0100, 0x6104, 0x0118, 0x918d, 0x0010,
+	0x0010, 0x918c, 0xffef, 0x6106, 0x00ce, 0xd084, 0x0158, 0x6a28,
+	0x928a, 0x007f, 0x1a04, 0x35b8, 0x9288, 0x3384, 0x210d, 0x918c,
+	0x00ff, 0x6166, 0xd0dc, 0x0130, 0x6828, 0x908a, 0x007f, 0x1a04,
+	0x35b8, 0x605e, 0x6888, 0x9084, 0x0030, 0x8004, 0x8004, 0x8004,
+	0x8004, 0x0006, 0x2009, 0x19b0, 0x9080, 0x29b8, 0x2005, 0x200a,
+	0x000e, 0x2009, 0x19b1, 0x9080, 0x29bc, 0x2005, 0x200a, 0x6808,
+	0x908a, 0x0100, 0x0a04, 0x35b8, 0x908a, 0x0841, 0x1a04, 0x35b8,
+	0x9084, 0x0007, 0x1904, 0x35b8, 0x680c, 0x9005, 0x0904, 0x35b8,
+	0x6810, 0x9005, 0x0904, 0x35b8, 0x6848, 0x6940, 0x910a, 0x1a04,
+	0x35b8, 0x8001, 0x0904, 0x35b8, 0x684c, 0x6944, 0x910a, 0x1a04,
+	0x35b8, 0x8001, 0x0904, 0x35b8, 0x2009, 0x1980, 0x200b, 0x0000,
+	0x2001, 0x1869, 0x2004, 0xd0c4, 0x0140, 0x7884, 0x200a, 0x2009,
+	0x017f, 0x200a, 0x3b00, 0xc085, 0x20d8, 0x6814, 0x908c, 0x00ff,
+	0x614e, 0x8007, 0x9084, 0x00ff, 0x6052, 0x080c, 0x7755, 0x080c,
+	0x6a3e, 0x080c, 0x6a72, 0x6808, 0x602a, 0x080c, 0x2382, 0x2009,
+	0x0170, 0x200b, 0x0080, 0xa001, 0xa001, 0x200b, 0x0000, 0x0036,
+	0x6b08, 0x080c, 0x291f, 0x003e, 0x6000, 0x9086, 0x0000, 0x1904,
+	0x4449, 0x6818, 0x691c, 0x6a20, 0x6b24, 0x8007, 0x810f, 0x8217,
+	0x831f, 0x6016, 0x611a, 0x621e, 0x6322, 0x6c04, 0xd4f4, 0x0148,
+	0x6830, 0x6934, 0x6a38, 0x6b3c, 0x8007, 0x810f, 0x8217, 0x831f,
+	0x0010, 0x9084, 0xf0ff, 0x6006, 0x610a, 0x620e, 0x6312, 0x8007,
+	0x810f, 0x8217, 0x831f, 0x20a9, 0x0004, 0x20a1, 0x19b2, 0x20e9,
+	0x0001, 0x4001, 0x20a9, 0x0004, 0x20a1, 0x19cc, 0x20e9, 0x0001,
+	0x4001, 0x080c, 0x86ac, 0x00c6, 0x900e, 0x20a9, 0x0001, 0x6b70,
+	0xd384, 0x0510, 0x0068, 0x2009, 0x0100, 0x210c, 0x918e, 0x0008,
+	0x1110, 0x839d, 0x0010, 0x83f5, 0x3e18, 0x12b0, 0x3508, 0x8109,
+	0x080c, 0x7d0c, 0x6878, 0x6016, 0x6874, 0x2008, 0x9084, 0xff00,
+	0x8007, 0x600a, 0x9184, 0x00ff, 0x6006, 0x8108, 0x1118, 0x6003,
+	0x0003, 0x0010, 0x6003, 0x0001, 0x1f04, 0x43a3, 0x00ce, 0x00c6,
+	0x2061, 0x199b, 0x6a88, 0x9284, 0xc000, 0x2010, 0x9286, 0x0000,
+	0x1158, 0x2063, 0x0000, 0x2001, 0x0001, 0x080c, 0x2bc6, 0x2001,
+	0x0001, 0x080c, 0x2ba9, 0x0088, 0x9286, 0x4000, 0x1148, 0x2063,
+	0x0001, 0x9006, 0x080c, 0x2bc6, 0x9006, 0x080c, 0x2ba9, 0x0028,
+	0x9286, 0x8000, 0x1d30, 0x2063, 0x0002, 0x00ce, 0x6888, 0xd0ec,
+	0x0130, 0x2011, 0x0114, 0x2204, 0x9085, 0x0100, 0x2012, 0x6a80,
+	0x9284, 0x0030, 0x9086, 0x0030, 0x1128, 0x9294, 0xffcf, 0x9295,
+	0x0020, 0x6a82, 0x2001, 0x197b, 0x6a80, 0x9294, 0x0030, 0x928e,
+	0x0000, 0x0170, 0x928e, 0x0010, 0x0118, 0x928e, 0x0020, 0x0140,
+	0x2003, 0xaaaa, 0x080c, 0x2994, 0x2001, 0x196c, 0x2102, 0x0008,
+	0x2102, 0x00c6, 0x2061, 0x0100, 0x602f, 0x0040, 0x602f, 0x0000,
+	0x00ce, 0x080c, 0x743e, 0x0128, 0x080c, 0x5054, 0x0110, 0x080c,
+	0x28e5, 0x60d4, 0x9005, 0x01c0, 0x6003, 0x0001, 0x2009, 0x4431,
+	0x00e0, 0x080c, 0x743e, 0x1168, 0x2011, 0x72ce, 0x080c, 0x85b0,
+	0x2011, 0x72c1, 0x080c, 0x868a, 0x080c, 0x7729, 0x080c, 0x736a,
+	0x0040, 0x080c, 0x5f6c, 0x0028, 0x6003, 0x0004, 0x2009, 0x4449,
+	0x0020, 0x080c, 0x696e, 0x0804, 0x3583, 0x2001, 0x0170, 0x2004,
+	0x9084, 0x00ff, 0x9086, 0x004c, 0x1118, 0x2091, 0x30bd, 0x0817,
+	0x2091, 0x303d, 0x0817, 0x6000, 0x9086, 0x0000, 0x0904, 0x35b5,
+	0x2069, 0x1847, 0x7890, 0x6842, 0x7894, 0x6846, 0x2d00, 0x2009,
+	0x0030, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x2039, 0x0001, 0x0804,
+	0x4b6b, 0x9006, 0x080c, 0x28e5, 0x81ff, 0x1904, 0x35b5, 0x080c,
+	0x743e, 0x11b0, 0x080c, 0x7724, 0x080c, 0x60ad, 0x080c, 0x3378,
+	0x0118, 0x6130, 0xc18d, 0x6132, 0x080c, 0xd388, 0x0130, 0x080c,
+	0x7461, 0x1118, 0x080c, 0x7416, 0x0038, 0x080c, 0x736a, 0x0020,
+	0x080c, 0x6072, 0x080c, 0x5f6c, 0x0804, 0x3583, 0x81ff, 0x1904,
+	0x35b5, 0x080c, 0x743e, 0x1110, 0x0804, 0x35b5, 0x6194, 0x81ff,
+	0x01a8, 0x704f, 0x0000, 0x2001, 0x1c80, 0x2009, 0x0040, 0x7a8c,
+	0x7b88, 0x7c9c, 0x7d98, 0x0126, 0x2091, 0x8000, 0x2039, 0x0001,
+	0x080c, 0x4b6b, 0x701f, 0x3581, 0x012e, 0x0005, 0x704f, 0x0001,
+	0x00d6, 0x2069, 0x1c80, 0x20a9, 0x0040, 0x20e9, 0x0001, 0x20a1,
+	0x1c80, 0x2019, 0xffff, 0x4304, 0x655c, 0x9588, 0x3384, 0x210d,
+	0x918c, 0x00ff, 0x216a, 0x900e, 0x2011, 0x0002, 0x2100, 0x9506,
+	0x01a8, 0x080c, 0x6699, 0x1190, 0xb814, 0x821c, 0x0238, 0x9398,
+	0x1c80, 0x9085, 0xff00, 0x8007, 0x201a, 0x0038, 0x9398, 0x1c80,
+	0x2324, 0x94a4, 0xff00, 0x9405, 0x201a, 0x8210, 0x8108, 0x9182,
+	0x0080, 0x1208, 0x0c18, 0x8201, 0x8007, 0x2d0c, 0x9105, 0x206a,
+	0x00de, 0x20a9, 0x0040, 0x20a1, 0x1c80, 0x2099, 0x1c80, 0x080c,
+	0x5ffd, 0x0804, 0x44a3, 0x080c, 0x4b52, 0x0904, 0x35b8, 0x080c,
+	0x4b1f, 0x1120, 0x2009, 0x0002, 0x0804, 0x35b5, 0x080c, 0x575d,
+	0xd0b4, 0x0558, 0x7884, 0x908e, 0x007e, 0x0538, 0x908e, 0x007f,
+	0x0520, 0x908e, 0x0080, 0x0508, 0x080c, 0x3373, 0x1148, 0xb800,
+	0xd08c, 0x11d8, 0xb804, 0x9084, 0x00ff, 0x9086, 0x0006, 0x11a8,
+	0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, 0x080c, 0xce51, 0x1120,
+	0x2009, 0x0003, 0x0804, 0x35b5, 0x7007, 0x0003, 0x701f, 0x4531,
+	0x0005, 0x080c, 0x4b52, 0x0904, 0x35b8, 0x20a9, 0x002b, 0xb8c4,
+	0x20e0, 0xb8c8, 0x2098, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0002,
+	0x20a0, 0x4003, 0x20a9, 0x0008, 0x9080, 0x0006, 0x20a0, 0xb8c4,
+	0x20e0, 0xb8c8, 0x9080, 0x0006, 0x2098, 0x080c, 0x0f7c, 0x0070,
+	0x20a9, 0x0004, 0xa85c, 0x9080, 0x000a, 0x20a0, 0xb8c4, 0x20e0,
+	0xb8c8, 0x9080, 0x000a, 0x2098, 0x080c, 0x0f7c, 0x8906, 0x8006,
+	0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0002, 0x2009,
+	0x002b, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x0804, 0x4b6b, 0x81ff,
+	0x1904, 0x35b5, 0x080c, 0x4b36, 0x0904, 0x35b8, 0x080c, 0x680b,
+	0x0904, 0x35b5, 0x0058, 0xa878, 0x9005, 0x0120, 0x2009, 0x0004,
+	0x0804, 0x35b5, 0xa974, 0xaa94, 0x0804, 0x3583, 0x080c, 0x5765,
+	0x0904, 0x3583, 0x701f, 0x457b, 0x7007, 0x0003, 0x0005, 0x81ff,
+	0x1904, 0x35b5, 0x7888, 0x908a, 0x1000, 0x1a04, 0x35b8, 0x080c,
+	0x4b52, 0x0904, 0x35b8, 0x080c, 0x6a0c, 0x0120, 0x080c, 0x6a14,
+	0x1904, 0x35b8, 0x080c, 0x6890, 0x0904, 0x35b5, 0x2019, 0x0004,
+	0x900e, 0x080c, 0x681d, 0x0904, 0x35b5, 0x7984, 0x7a88, 0x04c9,
+	0x08a8, 0xa89c, 0x908a, 0x1000, 0x12f8, 0x080c, 0x4b50, 0x01e0,
+	0x080c, 0x6a0c, 0x0118, 0x080c, 0x6a14, 0x11b0, 0x080c, 0x6890,
+	0x2009, 0x0002, 0x0168, 0x2009, 0x0002, 0x2019, 0x0004, 0x080c,
+	0x681d, 0x2009, 0x0003, 0x0120, 0xa998, 0xaa9c, 0x00d1, 0x0060,
+	0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006, 0x900e, 0x9085,
+	0x0001, 0x2001, 0x0030, 0x0005, 0xa897, 0x4000, 0x080c, 0x5765,
+	0x0110, 0x9006, 0x0018, 0x900e, 0x9085, 0x0001, 0x2001, 0x0000,
+	0x0005, 0x9186, 0x00ff, 0x0110, 0x0071, 0x0060, 0x2029, 0x007e,
+	0x2061, 0x1800, 0x645c, 0x2400, 0x9506, 0x0110, 0x2508, 0x0019,
+	0x8529, 0x1ec8, 0x0005, 0x080c, 0x6699, 0x1138, 0x2200, 0x8003,
+	0x800b, 0x810b, 0x9108, 0x080c, 0x85be, 0x0005, 0x81ff, 0x1904,
+	0x35b5, 0x798c, 0x2001, 0x197f, 0x918c, 0x8000, 0x2102, 0x080c,
+	0x4b36, 0x0904, 0x35b8, 0x080c, 0x6a0c, 0x0120, 0x080c, 0x6a14,
+	0x1904, 0x35b8, 0x080c, 0x6760, 0x0904, 0x35b5, 0x080c, 0x6814,
+	0x0904, 0x35b5, 0x2001, 0x197f, 0x2004, 0xd0fc, 0x1904, 0x3583,
+	0x0804, 0x4586, 0xa9a0, 0x2001, 0x197f, 0x918c, 0x8000, 0xc18d,
+	0x2102, 0x080c, 0x4b43, 0x01a0, 0x080c, 0x6a0c, 0x0118, 0x080c,
+	0x6a14, 0x1170, 0x080c, 0x6760, 0x2009, 0x0002, 0x0128, 0x080c,
+	0x6814, 0x1170, 0x2009, 0x0003, 0xa897, 0x4005, 0xa99a, 0x0010,
+	0xa897, 0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x0005,
+	0xa897, 0x4000, 0x2001, 0x197f, 0x2004, 0xd0fc, 0x1128, 0x080c,
+	0x5765, 0x0110, 0x9006, 0x0018, 0x900e, 0x9085, 0x0001, 0x2001,
+	0x0000, 0x0005, 0x81ff, 0x1904, 0x35b5, 0x798c, 0x2001, 0x197e,
+	0x918c, 0x8000, 0x2102, 0x080c, 0x4b36, 0x0904, 0x35b8, 0x080c,
+	0x6a0c, 0x0120, 0x080c, 0x6a14, 0x1904, 0x35b8, 0x080c, 0x6760,
+	0x0904, 0x35b5, 0x080c, 0x6802, 0x0904, 0x35b5, 0x2001, 0x197e,
+	0x2004, 0xd0fc, 0x1904, 0x3583, 0x0804, 0x4586, 0xa9a0, 0x2001,
+	0x197e, 0x918c, 0x8000, 0xc18d, 0x2102, 0x080c, 0x4b43, 0x01a0,
+	0x080c, 0x6a0c, 0x0118, 0x080c, 0x6a14, 0x1170, 0x080c, 0x6760,
+	0x2009, 0x0002, 0x0128, 0x080c, 0x6802, 0x1170, 0x2009, 0x0003,
+	0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006, 0x900e, 0x9085,
+	0x0001, 0x2001, 0x0030, 0x0005, 0xa897, 0x4000, 0x2001, 0x197e,
+	0x2004, 0xd0fc, 0x1128, 0x080c, 0x5765, 0x0110, 0x9006, 0x0018,
+	0x900e, 0x9085, 0x0001, 0x2001, 0x0000, 0x0005, 0x6100, 0x0804,
+	0x3583, 0x080c, 0x4b52, 0x0904, 0x35b8, 0x080c, 0x5771, 0x1904,
+	0x35b5, 0x79a8, 0xd184, 0x1158, 0xb834, 0x8007, 0x789e, 0xb830,
+	0x8007, 0x789a, 0xbb2c, 0x831f, 0xba28, 0x8217, 0x0050, 0xb824,
+	0x8007, 0x789e, 0xb820, 0x8007, 0x789a, 0xbb1c, 0x831f, 0xba18,
+	0x8217, 0xb900, 0x918c, 0x0202, 0x0804, 0x3583, 0x78a8, 0x909c,
+	0x0003, 0xd0ac, 0x1158, 0xd0b4, 0x1148, 0x939a, 0x0003, 0x1a04,
+	0x35b5, 0x625c, 0x7884, 0x9206, 0x1904, 0x473b, 0x080c, 0x8696,
+	0x2001, 0xffec, 0x2009, 0x000c, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98,
+	0x2039, 0x0000, 0x0006, 0x78a8, 0x9084, 0x0080, 0x11f8, 0x0006,
+	0x0036, 0x2001, 0x1a7f, 0x201c, 0x7b9a, 0x2003, 0x0000, 0x2001,
+	0x1a80, 0x201c, 0x7b9e, 0x2003, 0x0000, 0x2001, 0x1a81, 0x201c,
+	0x7ba2, 0x2003, 0x0000, 0x2001, 0x1a7b, 0x201c, 0x7baa, 0x2003,
+	0x0000, 0x003e, 0x000e, 0x000e, 0x0804, 0x4b6b, 0x000e, 0x2031,
+	0x0000, 0x2061, 0x18b8, 0x2c44, 0xa66a, 0xa17a, 0xa772, 0xa076,
+	0xa28e, 0xa392, 0xa496, 0xa59a, 0x080c, 0x10e9, 0x7007, 0x0002,
+	0x701f, 0x475b, 0x0005, 0x81ff, 0x1904, 0x35b5, 0x080c, 0x4b52,
+	0x0904, 0x35b8, 0x080c, 0x6a0c, 0x1904, 0x35b5, 0x00c6, 0x080c,
+	0x4b1f, 0x00ce, 0x0904, 0x35b5, 0xa867, 0x0000, 0xa868, 0xc0fd,
+	0xa86a, 0x7ea8, 0x080c, 0xcdf7, 0x0904, 0x35b5, 0x7007, 0x0003,
+	0x701f, 0x477b, 0x0005, 0x080c, 0x4278, 0x0006, 0x0036, 0x2001,
+	0x1a7f, 0x201c, 0x7b9a, 0x2003, 0x0000, 0x2001, 0x1a80, 0x201c,
+	0x7b9e, 0x2003, 0x0000, 0x2001, 0x1a81, 0x201c, 0x7ba2, 0x2003,
+	0x0000, 0x2001, 0x1a7b, 0x201c, 0x7baa, 0x2003, 0x0000, 0x003e,
+	0x000e, 0x0804, 0x3583, 0xa830, 0x9086, 0x0100, 0x0904, 0x35b5,
+	0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080,
+	0x001b, 0x2009, 0x000c, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x0804,
+	0x4b6b, 0x9006, 0x080c, 0x28e5, 0x78a8, 0x9084, 0x00ff, 0x9086,
+	0x00ff, 0x0118, 0x81ff, 0x1904, 0x35b5, 0x080c, 0x743e, 0x0110,
+	0x080c, 0x6072, 0x7888, 0x908a, 0x1000, 0x1a04, 0x35b8, 0x7984,
+	0x9186, 0x00ff, 0x0138, 0x9182, 0x007f, 0x1a04, 0x35b8, 0x2100,
+	0x080c, 0x28af, 0x0026, 0x00c6, 0x0126, 0x2091, 0x8000, 0x2061,
+	0x19f9, 0x601b, 0x0000, 0x601f, 0x0000, 0x6073, 0x0000, 0x6077,
+	0x0000, 0x080c, 0x743e, 0x1158, 0x080c, 0x7724, 0x080c, 0x60ad,
+	0x9085, 0x0001, 0x080c, 0x7485, 0x080c, 0x736a, 0x00d0, 0x080c,
+	0xaeb4, 0x2061, 0x0100, 0x2001, 0x1818, 0x2004, 0x9084, 0x00ff,
+	0x810f, 0x9105, 0x604a, 0x6043, 0x0090, 0x6043, 0x0010, 0x2009,
+	0x1998, 0x200b, 0x0000, 0x2009, 0x002d, 0x2011, 0x5f98, 0x080c,
+	0x8648, 0x7984, 0x080c, 0x743e, 0x1110, 0x2009, 0x00ff, 0x7a88,
+	0x080c, 0x45e9, 0x012e, 0x00ce, 0x002e, 0x0804, 0x3583, 0x7984,
+	0x080c, 0x6638, 0x2b08, 0x1904, 0x35b8, 0x0804, 0x3583, 0x81ff,
+	0x0120, 0x2009, 0x0001, 0x0804, 0x35b5, 0x60dc, 0xd0ac, 0x1130,
+	0xd09c, 0x1120, 0x2009, 0x0005, 0x0804, 0x35b5, 0x080c, 0x4b1f,
+	0x1120, 0x2009, 0x0002, 0x0804, 0x35b5, 0x7984, 0x9192, 0x0021,
+	0x1a04, 0x35b8, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0xa85c, 0x9080,
+	0x0019, 0x702a, 0xaf60, 0x7736, 0x080c, 0x4b68, 0x701f, 0x482f,
+	0x7880, 0x9086, 0x006e, 0x0110, 0x701f, 0x5206, 0x0005, 0x2009,
+	0x0080, 0x080c, 0x6699, 0x1118, 0x080c, 0x6a0c, 0x0120, 0x2021,
+	0x400a, 0x0804, 0x3585, 0x00d6, 0x0096, 0xa964, 0xaa6c, 0xab70,
+	0xac74, 0xad78, 0xae7c, 0xa884, 0x90be, 0x0100, 0x0904, 0x48c8,
+	0x90be, 0x0112, 0x0904, 0x48c8, 0x90be, 0x0113, 0x0904, 0x48c8,
+	0x90be, 0x0114, 0x0904, 0x48c8, 0x90be, 0x0117, 0x0904, 0x48c8,
+	0x90be, 0x011a, 0x0904, 0x48c8, 0x90be, 0x011c, 0x0904, 0x48c8,
+	0x90be, 0x0121, 0x0904, 0x48af, 0x90be, 0x0131, 0x0904, 0x48af,
+	0x90be, 0x0171, 0x0904, 0x48c8, 0x90be, 0x0173, 0x0904, 0x48c8,
+	0x90be, 0x01a1, 0x1128, 0xa894, 0x8007, 0xa896, 0x0804, 0x48d3,
+	0x90be, 0x0212, 0x0904, 0x48bc, 0x90be, 0x0213, 0x05e8, 0x90be,
+	0x0214, 0x0500, 0x90be, 0x0217, 0x0188, 0x90be, 0x021a, 0x1120,
+	0xa89c, 0x8007, 0xa89e, 0x04e0, 0x90be, 0x021f, 0x05c8, 0x90be,
+	0x0300, 0x05b0, 0x009e, 0x00de, 0x0804, 0x35b8, 0x7028, 0x9080,
+	0x0010, 0x2098, 0x20a0, 0x7034, 0x20e0, 0x20e8, 0x20a9, 0x0007,
+	0x080c, 0x4911, 0x7028, 0x9080, 0x000e, 0x2098, 0x20a0, 0x7034,
+	0x20e0, 0x20e8, 0x20a9, 0x0001, 0x080c, 0x4911, 0x00c8, 0x7028,
 	0x9080, 0x000c, 0x2098, 0x20a0, 0x7034, 0x20e0, 0x20e8, 0x20a9,
-	0x0001, 0x04f1, 0x00c6, 0x080c, 0x4abe, 0x0550, 0xa868, 0xc0fd,
-	0xa86a, 0xa867, 0x0119, 0x9006, 0xa882, 0xa87f, 0x0020, 0xa88b,
-	0x0001, 0x810b, 0xa9ae, 0xa8b2, 0xaab6, 0xabba, 0xacbe, 0xadc2,
-	0xa9c6, 0xa8ca, 0x00ce, 0x009e, 0x00de, 0xa866, 0xa822, 0xa868,
-	0xc0fd, 0xa86a, 0xa804, 0x2048, 0x080c, 0xcce4, 0x1120, 0x2009,
-	0x0003, 0x0804, 0x3563, 0x7007, 0x0003, 0x701f, 0x48a7, 0x0005,
-	0x00ce, 0x009e, 0x00de, 0x2009, 0x0002, 0x0804, 0x3563, 0xa820,
-	0x9086, 0x8001, 0x1904, 0x3531, 0x2009, 0x0004, 0x0804, 0x3563,
-	0x0016, 0x0026, 0x3510, 0x20a9, 0x0002, 0x4002, 0x4104, 0x4004,
-	0x8211, 0x1dc8, 0x002e, 0x001e, 0x0005, 0x0016, 0x0026, 0x0036,
-	0x0046, 0x3520, 0x20a9, 0x0004, 0x4002, 0x4304, 0x4204, 0x4104,
-	0x4004, 0x8421, 0x1db8, 0x004e, 0x003e, 0x002e, 0x001e, 0x0005,
-	0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x3563, 0x60dc, 0xd0ac,
-	0x1130, 0xd09c, 0x1120, 0x2009, 0x0005, 0x0804, 0x3563, 0x7984,
-	0x78a8, 0x2040, 0x080c, 0xadc9, 0x1120, 0x9182, 0x007f, 0x0a04,
-	0x3566, 0x9186, 0x00ff, 0x0904, 0x3566, 0x9182, 0x0800, 0x1a04,
-	0x3566, 0x7a8c, 0x7b88, 0x607c, 0x9306, 0x1158, 0x6080, 0x924e,
-	0x0904, 0x3566, 0x080c, 0xadc9, 0x1120, 0x99cc, 0xff00, 0x0904,
-	0x3566, 0x0126, 0x2091, 0x8000, 0x080c, 0x49d1, 0x0904, 0x4951,
-	0x0086, 0x90c6, 0x4000, 0x008e, 0x1538, 0x00c6, 0x0006, 0x0036,
-	0xb818, 0xbb1c, 0x9305, 0xbb20, 0x9305, 0xbb24, 0x9305, 0xbb28,
-	0x9305, 0xbb2c, 0x9305, 0xbb30, 0x9305, 0xbb34, 0x9305, 0x003e,
-	0x0570, 0xd88c, 0x1128, 0x080c, 0x6989, 0x0110, 0xc89d, 0x0438,
-	0x900e, 0x080c, 0x6836, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108,
-	0xc18d, 0x000e, 0x00ce, 0x00b8, 0x90c6, 0x4007, 0x1110, 0x2408,
-	0x0090, 0x90c6, 0x4008, 0x1118, 0x2708, 0x2610, 0x0060, 0x90c6,
-	0x4009, 0x1108, 0x0040, 0x90c6, 0x4006, 0x1108, 0x0020, 0x2001,
-	0x4005, 0x2009, 0x000a, 0x2020, 0x012e, 0x0804, 0x3533, 0x000e,
-	0x00ce, 0x2b00, 0x7026, 0x0016, 0x00b6, 0x00c6, 0x00e6, 0x2c70,
-	0x080c, 0xaead, 0x0904, 0x49a6, 0x2b00, 0x6012, 0x080c, 0xcfd4,
-	0x2e58, 0x00ee, 0x00e6, 0x00c6, 0x080c, 0x4abe, 0x00ce, 0x2b70,
-	0x1158, 0x080c, 0xae5f, 0x00ee, 0x00ce, 0x00be, 0x001e, 0x012e,
-	0x2009, 0x0002, 0x0804, 0x3563, 0x900e, 0xa966, 0xa96a, 0x2900,
-	0x6016, 0xa932, 0xa868, 0xc0fd, 0xd88c, 0x0108, 0xc0f5, 0xa86a,
-	0xd89c, 0x1110, 0x080c, 0x31cc, 0x6023, 0x0001, 0x9006, 0x080c,
-	0x6552, 0xd89c, 0x0138, 0x2001, 0x0004, 0x080c, 0x6566, 0x2009,
-	0x0003, 0x0030, 0x2001, 0x0002, 0x080c, 0x6566, 0x2009, 0x0002,
-	0x080c, 0xaeda, 0x78a8, 0xd094, 0x0138, 0x00ee, 0x7024, 0x00e6,
-	0x2058, 0xb8cc, 0xc08d, 0xb8ce, 0x9085, 0x0001, 0x00ee, 0x00ce,
-	0x00be, 0x001e, 0x012e, 0x1120, 0x2009, 0x0003, 0x0804, 0x3563,
-	0x7007, 0x0003, 0x701f, 0x49b5, 0x0005, 0xa830, 0x9086, 0x0100,
-	0x7024, 0x2058, 0x1138, 0x2009, 0x0004, 0xba04, 0x9294, 0x00ff,
-	0x0804, 0x563f, 0x900e, 0xa868, 0xd0f4, 0x1904, 0x3531, 0x080c,
-	0x6836, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d, 0x0804,
-	0x3531, 0x00e6, 0x00d6, 0x0096, 0x83ff, 0x0904, 0x4a20, 0x902e,
-	0x080c, 0xadc9, 0x0130, 0x9026, 0x20a9, 0x0800, 0x2071, 0x1000,
-	0x0030, 0x2021, 0x007f, 0x20a9, 0x0781, 0x2071, 0x107f, 0x2e04,
-	0x9005, 0x11b8, 0x2100, 0x9406, 0x1904, 0x4a31, 0x2428, 0x94ce,
-	0x007f, 0x1120, 0x92ce, 0xfffd, 0x1558, 0x0030, 0x94ce, 0x0080,
-	0x1130, 0x92ce, 0xfffc, 0x1520, 0x93ce, 0x00ff, 0x1508, 0xc5fd,
-	0x0480, 0x2058, 0xbf10, 0x2700, 0x9306, 0x11e8, 0xbe14, 0x2600,
-	0x9206, 0x11c8, 0x2400, 0x9106, 0x1180, 0xd884, 0x0598, 0xd894,
-	0x1588, 0x080c, 0x6929, 0x1570, 0x2001, 0x4000, 0x0460, 0x080c,
-	0x6989, 0x1540, 0x2001, 0x4000, 0x0430, 0x2001, 0x4007, 0x0418,
-	0x2001, 0x4006, 0x0400, 0x2400, 0x9106, 0x1158, 0xbe14, 0x87ff,
-	0x1128, 0x86ff, 0x0918, 0x080c, 0xadc9, 0x1900, 0x2001, 0x4008,
-	0x0090, 0x8420, 0x8e70, 0x1f04, 0x49e7, 0x85ff, 0x1130, 0x2001,
-	0x4009, 0x0048, 0x2001, 0x0001, 0x0030, 0x080c, 0x65b5, 0x1dd0,
-	0xbb12, 0xba16, 0x9006, 0x9005, 0x009e, 0x00de, 0x00ee, 0x0005,
-	0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x3563, 0x080c, 0x4abe,
-	0x1120, 0x2009, 0x0002, 0x0804, 0x3563, 0xa867, 0x0000, 0xa868,
-	0xc0fd, 0xa86a, 0x7884, 0x9005, 0x0904, 0x3566, 0x9096, 0x00ff,
-	0x0120, 0x9092, 0x0004, 0x1a04, 0x3566, 0x2010, 0x2918, 0x080c,
-	0x3172, 0x1120, 0x2009, 0x0003, 0x0804, 0x3563, 0x7007, 0x0003,
-	0x701f, 0x4a73, 0x0005, 0xa830, 0x9086, 0x0100, 0x1904, 0x3531,
-	0x2009, 0x0004, 0x0804, 0x3563, 0x7984, 0x080c, 0xadc9, 0x1120,
-	0x9182, 0x007f, 0x0a04, 0x3566, 0x9186, 0x00ff, 0x0904, 0x3566,
-	0x9182, 0x0800, 0x1a04, 0x3566, 0x2001, 0x9000, 0x080c, 0x569a,
-	0x1904, 0x3563, 0x0804, 0x3531, 0xa998, 0x080c, 0xadc9, 0x1118,
-	0x9182, 0x007f, 0x0280, 0x9186, 0x00ff, 0x0168, 0x9182, 0x0800,
-	0x1250, 0x2001, 0x9000, 0x080c, 0x569a, 0x11a8, 0x0060, 0xa897,
-	0x4005, 0xa99a, 0x0010, 0xa897, 0x4006, 0x900e, 0x9085, 0x0001,
-	0x2001, 0x0030, 0x0005, 0xa897, 0x4000, 0x900e, 0x9085, 0x0001,
-	0x2001, 0x0000, 0x0005, 0x2009, 0x000a, 0x0c48, 0x080c, 0x0fff,
-	0x0198, 0x9006, 0xa802, 0x7014, 0x9005, 0x1120, 0x2900, 0x7016,
-	0x701a, 0x0040, 0x7018, 0xa802, 0x0086, 0x2040, 0x2900, 0xa006,
-	0x701a, 0x008e, 0x9085, 0x0001, 0x0005, 0x7984, 0x080c, 0x6616,
-	0x1130, 0x7e88, 0x9684, 0x3fff, 0x9082, 0x4000, 0x0208, 0x905e,
-	0x8bff, 0x0005, 0xa998, 0x080c, 0x6616, 0x1130, 0xae9c, 0x9684,
-	0x3fff, 0x9082, 0x4000, 0x0208, 0x905e, 0x8bff, 0x0005, 0xae98,
-	0x0008, 0x7e84, 0x2608, 0x080c, 0x6616, 0x1108, 0x0008, 0x905e,
-	0x8bff, 0x0005, 0x0016, 0x7114, 0x81ff, 0x0128, 0x2148, 0xa904,
-	0x080c, 0x1031, 0x0cc8, 0x7116, 0x711a, 0x001e, 0x0005, 0x2031,
-	0x0001, 0x0010, 0x2031, 0x0000, 0x2061, 0x18b8, 0x2c44, 0xa66a,
-	0xa17a, 0xa772, 0xa076, 0xa28e, 0xa392, 0xa496, 0xa59a, 0x080c,
-	0x10e9, 0x7007, 0x0002, 0x701f, 0x3531, 0x0005, 0x00f6, 0x0126,
-	0x2091, 0x8000, 0x2079, 0x0000, 0x2001, 0x18b0, 0x2004, 0x9005,
-	0x1190, 0x0e04, 0x4b3b, 0x7a36, 0x7833, 0x0012, 0x7a82, 0x7b86,
-	0x7c8a, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c,
-	0x119b, 0x0804, 0x4ba1, 0x0016, 0x0086, 0x0096, 0x00c6, 0x00e6,
-	0x2071, 0x189e, 0x7044, 0x9005, 0x1540, 0x7148, 0x9182, 0x0010,
-	0x0288, 0x7038, 0x2060, 0x080c, 0x0fff, 0x0904, 0x4b99, 0xa84b,
-	0x0000, 0x2900, 0x7046, 0x2001, 0x0002, 0x9080, 0x209d, 0x2005,
-	0xa846, 0x0098, 0x7038, 0x90e0, 0x0004, 0x2001, 0x18ba, 0x9c82,
-	0x18fa, 0x0210, 0x2061, 0x18ba, 0x2c00, 0x703a, 0x7148, 0x81ff,
-	0x1108, 0x703e, 0x8108, 0x714a, 0x0460, 0x7148, 0x8108, 0x714a,
-	0x7044, 0x2040, 0xa144, 0x2105, 0x0016, 0x908a, 0x0036, 0x1a0c,
-	0x0dd5, 0x2060, 0x001e, 0x8108, 0x2105, 0x9005, 0xa146, 0x1520,
-	0x080c, 0x0fff, 0x1130, 0x8109, 0xa946, 0x7148, 0x8109, 0x714a,
-	0x00d8, 0x9006, 0xa806, 0xa84a, 0xa046, 0x2800, 0xa802, 0x2900,
-	0xa006, 0x7046, 0x2001, 0x0002, 0x9080, 0x209d, 0x2005, 0xa846,
-	0x0058, 0x2262, 0x6306, 0x640a, 0x00ee, 0x00ce, 0x009e, 0x008e,
-	0x001e, 0x012e, 0x00fe, 0x0005, 0x2c00, 0x9082, 0x001b, 0x0002,
-	0x4bc3, 0x4bc3, 0x4bc5, 0x4bc3, 0x4bc3, 0x4bc3, 0x4bc9, 0x4bc3,
-	0x4bc3, 0x4bc3, 0x4bcd, 0x4bc3, 0x4bc3, 0x4bc3, 0x4bd1, 0x4bc3,
-	0x4bc3, 0x4bc3, 0x4bd5, 0x4bc3, 0x4bc3, 0x4bc3, 0x4bd9, 0x4bc3,
-	0x4bc3, 0x4bc3, 0x4bde, 0x080c, 0x0dd5, 0xa276, 0xa37a, 0xa47e,
-	0x0898, 0xa286, 0xa38a, 0xa48e, 0x0878, 0xa296, 0xa39a, 0xa49e,
-	0x0858, 0xa2a6, 0xa3aa, 0xa4ae, 0x0838, 0xa2b6, 0xa3ba, 0xa4be,
-	0x0818, 0xa2c6, 0xa3ca, 0xa4ce, 0x0804, 0x4b9c, 0xa2d6, 0xa3da,
-	0xa4de, 0x0804, 0x4b9c, 0x00e6, 0x2071, 0x189e, 0x7048, 0x9005,
-	0x0904, 0x4c75, 0x0126, 0x2091, 0x8000, 0x0e04, 0x4c74, 0x00f6,
-	0x2079, 0x0000, 0x00c6, 0x0096, 0x0086, 0x0076, 0x9006, 0x2038,
-	0x7040, 0x2048, 0x9005, 0x0500, 0xa948, 0x2105, 0x0016, 0x908a,
-	0x0036, 0x1a0c, 0x0dd5, 0x2060, 0x001e, 0x8108, 0x2105, 0x9005,
-	0xa94a, 0x1904, 0x4c77, 0xa804, 0x9005, 0x090c, 0x0dd5, 0x7042,
-	0x2938, 0x2040, 0xa003, 0x0000, 0x2001, 0x0002, 0x9080, 0x209d,
-	0x2005, 0xa04a, 0x0804, 0x4c77, 0x703c, 0x2060, 0x2c14, 0x6304,
-	0x6408, 0x650c, 0x2200, 0x7836, 0x7833, 0x0012, 0x7882, 0x2300,
-	0x7886, 0x2400, 0x788a, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004,
-	0xd084, 0x190c, 0x119b, 0x87ff, 0x0118, 0x2748, 0x080c, 0x1031,
-	0x7048, 0x8001, 0x704a, 0x9005, 0x1170, 0x7040, 0x2048, 0x9005,
-	0x0128, 0x080c, 0x1031, 0x9006, 0x7042, 0x7046, 0x703b, 0x18ba,
-	0x703f, 0x18ba, 0x0420, 0x7040, 0x9005, 0x1508, 0x7238, 0x2c00,
-	0x9206, 0x0148, 0x9c80, 0x0004, 0x90fa, 0x18fa, 0x0210, 0x2001,
-	0x18ba, 0x703e, 0x00a0, 0x9006, 0x703e, 0x703a, 0x7044, 0x9005,
-	0x090c, 0x0dd5, 0x2048, 0xa800, 0x9005, 0x1de0, 0x2900, 0x7042,
-	0x2001, 0x0002, 0x9080, 0x209d, 0x2005, 0xa84a, 0x0000, 0x007e,
-	0x008e, 0x009e, 0x00ce, 0x00fe, 0x012e, 0x00ee, 0x0005, 0x2c00,
-	0x9082, 0x001b, 0x0002, 0x4c96, 0x4c96, 0x4c98, 0x4c96, 0x4c96,
-	0x4c96, 0x4c9d, 0x4c96, 0x4c96, 0x4c96, 0x4ca2, 0x4c96, 0x4c96,
-	0x4c96, 0x4ca7, 0x4c96, 0x4c96, 0x4c96, 0x4cac, 0x4c96, 0x4c96,
-	0x4c96, 0x4cb1, 0x4c96, 0x4c96, 0x4c96, 0x4cb6, 0x080c, 0x0dd5,
-	0xaa74, 0xab78, 0xac7c, 0x0804, 0x4c22, 0xaa84, 0xab88, 0xac8c,
-	0x0804, 0x4c22, 0xaa94, 0xab98, 0xac9c, 0x0804, 0x4c22, 0xaaa4,
-	0xaba8, 0xacac, 0x0804, 0x4c22, 0xaab4, 0xabb8, 0xacbc, 0x0804,
-	0x4c22, 0xaac4, 0xabc8, 0xaccc, 0x0804, 0x4c22, 0xaad4, 0xabd8,
-	0xacdc, 0x0804, 0x4c22, 0x0016, 0x0026, 0x0036, 0x00b6, 0x00c6,
-	0x2009, 0x007e, 0x080c, 0x6616, 0x2019, 0x0001, 0xb85c, 0xd0ac,
-	0x0110, 0x2019, 0x0000, 0x2011, 0x801b, 0x080c, 0x4b1e, 0x00ce,
-	0x00be, 0x003e, 0x002e, 0x001e, 0x0005, 0x0026, 0x080c, 0x56e2,
-	0xd0c4, 0x0120, 0x2011, 0x8014, 0x080c, 0x4b1e, 0x002e, 0x0005,
-	0x81ff, 0x1904, 0x3563, 0x0126, 0x2091, 0x8000, 0x6030, 0xc08d,
-	0xc085, 0xc0ac, 0x6032, 0x080c, 0x73b3, 0x1158, 0x080c, 0x7699,
-	0x080c, 0x602d, 0x9085, 0x0001, 0x080c, 0x73fa, 0x080c, 0x72e5,
-	0x0010, 0x080c, 0x5eec, 0x012e, 0x0804, 0x3531, 0x81ff, 0x0120,
-	0x2009, 0x0001, 0x0804, 0x3563, 0x080c, 0x56f6, 0x0120, 0x2009,
-	0x0007, 0x0804, 0x3563, 0x080c, 0x6981, 0x0120, 0x2009, 0x0008,
-	0x0804, 0x3563, 0x7984, 0x080c, 0x65b5, 0x1904, 0x3566, 0x2b00,
-	0x7026, 0x080c, 0x6989, 0x7888, 0x1170, 0x9084, 0x0005, 0x1158,
-	0x900e, 0x080c, 0x6836, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108,
-	0xc18d, 0x0804, 0x3531, 0x080c, 0x4abe, 0x0904, 0x3563, 0x9006,
-	0xa866, 0xa832, 0xa868, 0xc0fd, 0xa86a, 0x080c, 0xcd82, 0x0904,
-	0x3563, 0x7888, 0xd094, 0x0118, 0xb8cc, 0xc08d, 0xb8ce, 0x7007,
-	0x0003, 0x701f, 0x4d90, 0x0005, 0x2061, 0x1800, 0x080c, 0x56f6,
-	0x2009, 0x0007, 0x1578, 0x080c, 0x6981, 0x0118, 0x2009, 0x0008,
-	0x0448, 0x080c, 0x3321, 0x0120, 0xa998, 0x080c, 0x65b5, 0x1530,
-	0x080c, 0x4aef, 0x0518, 0x080c, 0x6989, 0xa89c, 0x1168, 0x9084,
-	0x0005, 0x1150, 0x900e, 0x080c, 0x6836, 0x1108, 0xc185, 0xb800,
-	0xd0bc, 0x0108, 0xc18d, 0x00d0, 0xa868, 0xc0fc, 0xa86a, 0x080c,
-	0xcd82, 0x11e0, 0xa89c, 0xd094, 0x0118, 0xb8cc, 0xc08d, 0xb8ce,
-	0x2009, 0x0003, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006,
-	0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x0005, 0xa897, 0x4000,
-	0xa99a, 0x9006, 0x918d, 0x0001, 0x2008, 0x0005, 0x9006, 0x0005,
-	0xa830, 0x9086, 0x0100, 0x7024, 0x2058, 0x1110, 0x0804, 0x563f,
-	0x900e, 0x080c, 0x6836, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108,
-	0xc18d, 0x0804, 0x3531, 0x080c, 0x56f6, 0x0120, 0x2009, 0x0007,
-	0x0804, 0x3563, 0x7f84, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x080c,
-	0x4abe, 0x1120, 0x2009, 0x0002, 0x0804, 0x3563, 0x900e, 0x2130,
-	0x7126, 0x7132, 0xa860, 0x20e8, 0x7036, 0xa85c, 0x9080, 0x0005,
-	0x702a, 0x20a0, 0x080c, 0x6616, 0x1904, 0x4e32, 0x080c, 0x6989,
-	0x0138, 0x080c, 0x6991, 0x0120, 0x080c, 0x6929, 0x1904, 0x4e32,
-	0xd794, 0x1110, 0xd784, 0x01a8, 0xb8c4, 0x20e0, 0xb8c8, 0x9080,
-	0x0006, 0x2098, 0x3400, 0xd794, 0x0160, 0x20a9, 0x0008, 0x4003,
-	0x2098, 0x20a0, 0x3d00, 0x20e0, 0x20a9, 0x0002, 0x080c, 0x48bd,
-	0x0048, 0x20a9, 0x0004, 0x4003, 0x2098, 0x20a0, 0x3d00, 0x20e0,
-	0x080c, 0x48bd, 0x9186, 0x007e, 0x0170, 0x9186, 0x0080, 0x0158,
-	0x080c, 0x6989, 0x90c2, 0x0006, 0x1210, 0xc1fd, 0x0020, 0x080c,
-	0x6836, 0x1108, 0xc1fd, 0x4104, 0xc1fc, 0xd794, 0x0528, 0xb8c4,
-	0x20e0, 0xb8c8, 0x2060, 0x9c80, 0x0000, 0x2098, 0x20a9, 0x0002,
-	0x4003, 0x9c80, 0x0003, 0x2098, 0x20a9, 0x0001, 0x4005, 0x9c80,
-	0x0004, 0x2098, 0x3400, 0x20a9, 0x0002, 0x4003, 0x2098, 0x20a0,
-	0x3d00, 0x20e0, 0x080c, 0x48b0, 0x9c80, 0x0026, 0x2098, 0xb8c4,
-	0x20e0, 0x20a9, 0x0002, 0x4003, 0xd794, 0x0110, 0x96b0, 0x000b,
-	0x96b0, 0x0005, 0x8108, 0x080c, 0xadc9, 0x0118, 0x9186, 0x0800,
-	0x0040, 0xd78c, 0x0120, 0x9186, 0x0800, 0x0170, 0x0018, 0x9186,
-	0x007e, 0x0150, 0xd794, 0x0118, 0x9686, 0x0020, 0x0010, 0x9686,
-	0x0028, 0x0150, 0x0804, 0x4dc2, 0x86ff, 0x1120, 0x7124, 0x810b,
-	0x0804, 0x3531, 0x7033, 0x0001, 0x7122, 0x7024, 0x9600, 0x7026,
-	0x772e, 0x2061, 0x18b8, 0x2c44, 0xa06b, 0x0000, 0xa67a, 0x7034,
-	0xa072, 0x7028, 0xa076, 0xa28e, 0xa392, 0xa496, 0xa59a, 0x080c,
-	0x10e9, 0x7007, 0x0002, 0x701f, 0x4e6e, 0x0005, 0x7030, 0x9005,
-	0x1180, 0x7120, 0x7028, 0x20a0, 0x772c, 0x9036, 0x7034, 0x20e8,
-	0x2061, 0x18b8, 0x2c44, 0xa28c, 0xa390, 0xa494, 0xa598, 0x0804,
-	0x4dc2, 0x7124, 0x810b, 0x0804, 0x3531, 0x2029, 0x007e, 0x7984,
-	0x7a88, 0x7b8c, 0x7c98, 0x9184, 0xff00, 0x8007, 0x90e2, 0x0020,
-	0x0a04, 0x3566, 0x9502, 0x0a04, 0x3566, 0x9184, 0x00ff, 0x90e2,
-	0x0020, 0x0a04, 0x3566, 0x9502, 0x0a04, 0x3566, 0x9284, 0xff00,
-	0x8007, 0x90e2, 0x0020, 0x0a04, 0x3566, 0x9502, 0x0a04, 0x3566,
-	0x9284, 0x00ff, 0x90e2, 0x0020, 0x0a04, 0x3566, 0x9502, 0x0a04,
-	0x3566, 0x9384, 0xff00, 0x8007, 0x90e2, 0x0020, 0x0a04, 0x3566,
-	0x9502, 0x0a04, 0x3566, 0x9384, 0x00ff, 0x90e2, 0x0020, 0x0a04,
-	0x3566, 0x9502, 0x0a04, 0x3566, 0x9484, 0xff00, 0x8007, 0x90e2,
-	0x0020, 0x0a04, 0x3566, 0x9502, 0x0a04, 0x3566, 0x9484, 0x00ff,
-	0x90e2, 0x0020, 0x0a04, 0x3566, 0x9502, 0x0a04, 0x3566, 0x2061,
-	0x1988, 0x6102, 0x6206, 0x630a, 0x640e, 0x0804, 0x3531, 0x080c,
-	0x4abe, 0x0904, 0x3563, 0x2009, 0x0016, 0x7a8c, 0x7b88, 0x7c9c,
-	0x7d98, 0xa85c, 0x9080, 0x0019, 0xaf60, 0x080c, 0x4b07, 0x701f,
-	0x4ef2, 0x0005, 0x2001, 0x0138, 0x2003, 0x0000, 0x00e6, 0x2071,
-	0x0300, 0x701c, 0xd0a4, 0x1de8, 0x00ee, 0x20a9, 0x0016, 0x896e,
-	0x8d6e, 0x8d6f, 0x9d84, 0xffc0, 0x9080, 0x0019, 0x2098, 0x9d84,
-	0x003f, 0x20e0, 0x2069, 0x1877, 0x20e9, 0x0001, 0x2da0, 0x4003,
-	0x6800, 0x9005, 0x0904, 0x4f73, 0x6804, 0x2008, 0x918c, 0xfff8,
-	0x1904, 0x4f73, 0x680c, 0x9005, 0x0904, 0x4f73, 0x9082, 0xff01,
-	0x1a04, 0x4f73, 0x6810, 0x9082, 0x005c, 0x0a04, 0x4f73, 0x6824,
-	0x2008, 0x9082, 0x0008, 0x0a04, 0x4f73, 0x9182, 0x0400, 0x1a04,
-	0x4f73, 0x0056, 0x2029, 0x0000, 0x080c, 0x8b01, 0x005e, 0x6944,
-	0x6820, 0x9102, 0x06c0, 0x6820, 0x9082, 0x0019, 0x16a0, 0x6828,
-	0x6944, 0x810c, 0x9102, 0x0678, 0x6840, 0x9082, 0x000f, 0x1658,
-	0x080c, 0x1018, 0x2900, 0x0904, 0x4f8d, 0x684e, 0x00e6, 0x2071,
-	0x1930, 0x00b6, 0x2059, 0x0000, 0x080c, 0x89bd, 0x00be, 0x00ee,
-	0x0558, 0x080c, 0x8717, 0x080c, 0x875d, 0x11e0, 0x6857, 0x0000,
-	0x00c6, 0x2061, 0x0100, 0x6104, 0x918d, 0x2000, 0x6106, 0x6b10,
-	0x2061, 0x1a61, 0x630a, 0x00ce, 0x080c, 0x2963, 0x2001, 0x0138,
-	0x2102, 0x0804, 0x3531, 0x080c, 0x2963, 0x2001, 0x0138, 0x2102,
-	0x0804, 0x3566, 0x00e6, 0x2071, 0x1930, 0x080c, 0x8b92, 0x080c,
-	0x8ba1, 0x080c, 0x89ac, 0x00ee, 0x2001, 0x188a, 0x204c, 0x080c,
-	0x1031, 0x2001, 0x188a, 0x2003, 0x0000, 0x080c, 0x2963, 0x2001,
-	0x0138, 0x2102, 0x0804, 0x3563, 0x2001, 0x1924, 0x200c, 0x918e,
-	0x0000, 0x0904, 0x4fec, 0x080c, 0x89a7, 0x0904, 0x4fec, 0x2001,
-	0x0101, 0x200c, 0x918c, 0xdfff, 0x2102, 0x2001, 0x0138, 0x2003,
-	0x0000, 0x00e6, 0x2071, 0x0300, 0x701c, 0xd0a4, 0x1de8, 0x00ee,
-	0x080c, 0x89ac, 0x2001, 0x0035, 0x080c, 0x15f0, 0x00c6, 0x2061,
-	0x193c, 0x6004, 0x6100, 0x9106, 0x1de0, 0x00ce, 0x080c, 0x2963,
-	0x2001, 0x0138, 0x2102, 0x00e6, 0x00f6, 0x2071, 0x1923, 0x080c,
-	0x88e8, 0x0120, 0x2f00, 0x080c, 0x8972, 0x0cc8, 0x00fe, 0x00ee,
-	0x0126, 0x2091, 0x8000, 0x2001, 0x188a, 0x200c, 0x81ff, 0x0138,
-	0x2148, 0x080c, 0x1031, 0x2001, 0x188a, 0x2003, 0x0000, 0x2001,
-	0x183c, 0x2003, 0x0020, 0x00e6, 0x2071, 0x1930, 0x080c, 0x8b92,
-	0x080c, 0x8ba1, 0x00ee, 0x012e, 0x0804, 0x3531, 0x0006, 0x080c,
-	0x56e2, 0xd0cc, 0x000e, 0x0005, 0x0006, 0x080c, 0x56e6, 0xd0bc,
-	0x000e, 0x0005, 0x6174, 0x7a84, 0x6300, 0x82ff, 0x1118, 0x7986,
-	0x0804, 0x3531, 0x83ff, 0x1904, 0x3566, 0x2001, 0xfff0, 0x9200,
-	0x1a04, 0x3566, 0x2019, 0xffff, 0x6078, 0x9302, 0x9200, 0x0a04,
-	0x3566, 0x7986, 0x6276, 0x0804, 0x3531, 0x080c, 0x56f6, 0x1904,
-	0x3563, 0x7c88, 0x7d84, 0x7e98, 0x7f8c, 0x080c, 0x4abe, 0x0904,
-	0x3563, 0x900e, 0x901e, 0x7326, 0x7332, 0xa860, 0x20e8, 0x7036,
-	0xa85c, 0x9080, 0x0003, 0x702a, 0x20a0, 0x91d8, 0x1000, 0x2b5c,
-	0x8bff, 0x0178, 0x080c, 0x6989, 0x0118, 0x080c, 0x6991, 0x1148,
-	0x20a9, 0x0001, 0xb814, 0x4004, 0xb810, 0x4004, 0x4104, 0x9398,
-	0x0003, 0x8108, 0x9182, 0x0800, 0x0120, 0x9386, 0x003c, 0x0170,
-	0x0c20, 0x83ff, 0x1148, 0x7224, 0x900e, 0x2001, 0x0003, 0x080c,
-	0x8f70, 0x2208, 0x0804, 0x3531, 0x7033, 0x0001, 0x7122, 0x7024,
-	0x9300, 0x7026, 0x2061, 0x18b8, 0x2c44, 0xa06b, 0x0000, 0xa37a,
-	0x7028, 0xa076, 0x7034, 0xa072, 0xa48e, 0xa592, 0xa696, 0xa79a,
-	0x080c, 0x10e9, 0x7007, 0x0002, 0x701f, 0x506f, 0x0005, 0x7030,
-	0x9005, 0x1178, 0x7120, 0x7028, 0x20a0, 0x901e, 0x7034, 0x20e8,
-	0x2061, 0x18b8, 0x2c44, 0xa48c, 0xa590, 0xa694, 0xa798, 0x0804,
-	0x502d, 0x7224, 0x900e, 0x2001, 0x0003, 0x080c, 0x8f70, 0x2208,
-	0x0804, 0x3531, 0x00f6, 0x00e6, 0x080c, 0x56f6, 0x2009, 0x0007,
-	0x1904, 0x5102, 0x2071, 0x189e, 0x745c, 0x84ff, 0x2009, 0x000e,
-	0x1904, 0x5102, 0xac9c, 0xad98, 0xaea4, 0xafa0, 0x0096, 0x080c,
-	0x1018, 0x2009, 0x0002, 0x0904, 0x5102, 0x2900, 0x705e, 0x900e,
-	0x901e, 0x7356, 0x7362, 0xa860, 0x7066, 0xa85c, 0x9080, 0x0003,
-	0x705a, 0x20a0, 0x91d8, 0x1000, 0x2b5c, 0x8bff, 0x0178, 0x080c,
-	0x6989, 0x0118, 0x080c, 0x6991, 0x1148, 0xb814, 0x20a9, 0x0001,
+	0x0001, 0x080c, 0x491e, 0x00b8, 0x7028, 0x9080, 0x000e, 0x2098,
+	0x20a0, 0x7034, 0x20e0, 0x20e8, 0x20a9, 0x0001, 0x080c, 0x491e,
+	0x7028, 0x9080, 0x000c, 0x2098, 0x20a0, 0x7034, 0x20e0, 0x20e8,
+	0x20a9, 0x0001, 0x04f1, 0x00c6, 0x080c, 0x4b1f, 0x0550, 0xa868,
+	0xc0fd, 0xa86a, 0xa867, 0x0119, 0x9006, 0xa882, 0xa87f, 0x0020,
+	0xa88b, 0x0001, 0x810b, 0xa9ae, 0xa8b2, 0xaab6, 0xabba, 0xacbe,
+	0xadc2, 0xa9c6, 0xa8ca, 0x00ce, 0x009e, 0x00de, 0xa866, 0xa822,
+	0xa868, 0xc0fd, 0xa86a, 0xa804, 0x2048, 0x080c, 0xce12, 0x1120,
+	0x2009, 0x0003, 0x0804, 0x35b5, 0x7007, 0x0003, 0x701f, 0x4908,
+	0x0005, 0x00ce, 0x009e, 0x00de, 0x2009, 0x0002, 0x0804, 0x35b5,
+	0xa820, 0x9086, 0x8001, 0x1904, 0x3583, 0x2009, 0x0004, 0x0804,
+	0x35b5, 0x0016, 0x0026, 0x3510, 0x20a9, 0x0002, 0x4002, 0x4104,
+	0x4004, 0x8211, 0x1dc8, 0x002e, 0x001e, 0x0005, 0x0016, 0x0026,
+	0x0036, 0x0046, 0x3520, 0x20a9, 0x0004, 0x4002, 0x4304, 0x4204,
+	0x4104, 0x4004, 0x8421, 0x1db8, 0x004e, 0x003e, 0x002e, 0x001e,
+	0x0005, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x35b5, 0x60dc,
+	0xd0ac, 0x1130, 0xd09c, 0x1120, 0x2009, 0x0005, 0x0804, 0x35b5,
+	0x7984, 0x78a8, 0x2040, 0x080c, 0xaead, 0x1120, 0x9182, 0x007f,
+	0x0a04, 0x35b8, 0x9186, 0x00ff, 0x0904, 0x35b8, 0x9182, 0x0800,
+	0x1a04, 0x35b8, 0x7a8c, 0x7b88, 0x607c, 0x9306, 0x1158, 0x6080,
+	0x924e, 0x0904, 0x35b8, 0x080c, 0xaead, 0x1120, 0x99cc, 0xff00,
+	0x0904, 0x35b8, 0x0126, 0x2091, 0x8000, 0x080c, 0x4a32, 0x0904,
+	0x49b2, 0x0086, 0x90c6, 0x4000, 0x008e, 0x1538, 0x00c6, 0x0006,
+	0x0036, 0xb818, 0xbb1c, 0x9305, 0xbb20, 0x9305, 0xbb24, 0x9305,
+	0xbb28, 0x9305, 0xbb2c, 0x9305, 0xbb30, 0x9305, 0xbb34, 0x9305,
+	0x003e, 0x0570, 0xd88c, 0x1128, 0x080c, 0x6a0c, 0x0110, 0xc89d,
+	0x0438, 0x900e, 0x080c, 0x68b9, 0x1108, 0xc185, 0xb800, 0xd0bc,
+	0x0108, 0xc18d, 0x000e, 0x00ce, 0x00b8, 0x90c6, 0x4007, 0x1110,
+	0x2408, 0x0090, 0x90c6, 0x4008, 0x1118, 0x2708, 0x2610, 0x0060,
+	0x90c6, 0x4009, 0x1108, 0x0040, 0x90c6, 0x4006, 0x1108, 0x0020,
+	0x2001, 0x4005, 0x2009, 0x000a, 0x2020, 0x012e, 0x0804, 0x3585,
+	0x000e, 0x00ce, 0x2b00, 0x7026, 0x0016, 0x00b6, 0x00c6, 0x00e6,
+	0x2c70, 0x080c, 0xaf91, 0x0904, 0x4a07, 0x2b00, 0x6012, 0x080c,
+	0xd102, 0x2e58, 0x00ee, 0x00e6, 0x00c6, 0x080c, 0x4b1f, 0x00ce,
+	0x2b70, 0x1158, 0x080c, 0xaf43, 0x00ee, 0x00ce, 0x00be, 0x001e,
+	0x012e, 0x2009, 0x0002, 0x0804, 0x35b5, 0x900e, 0xa966, 0xa96a,
+	0x2900, 0x6016, 0xa932, 0xa868, 0xc0fd, 0xd88c, 0x0108, 0xc0f5,
+	0xa86a, 0xd89c, 0x1110, 0x080c, 0x321e, 0x6023, 0x0001, 0x9006,
+	0x080c, 0x65d5, 0xd89c, 0x0138, 0x2001, 0x0004, 0x080c, 0x65e9,
+	0x2009, 0x0003, 0x0030, 0x2001, 0x0002, 0x080c, 0x65e9, 0x2009,
+	0x0002, 0x080c, 0xafbe, 0x78a8, 0xd094, 0x0138, 0x00ee, 0x7024,
+	0x00e6, 0x2058, 0xb8cc, 0xc08d, 0xb8ce, 0x9085, 0x0001, 0x00ee,
+	0x00ce, 0x00be, 0x001e, 0x012e, 0x1120, 0x2009, 0x0003, 0x0804,
+	0x35b5, 0x7007, 0x0003, 0x701f, 0x4a16, 0x0005, 0xa830, 0x9086,
+	0x0100, 0x7024, 0x2058, 0x1138, 0x2009, 0x0004, 0xba04, 0x9294,
+	0x00ff, 0x0804, 0x56b1, 0x900e, 0xa868, 0xd0f4, 0x1904, 0x3583,
+	0x080c, 0x68b9, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d,
+	0x0804, 0x3583, 0x00e6, 0x00d6, 0x0096, 0x83ff, 0x0904, 0x4a81,
+	0x902e, 0x080c, 0xaead, 0x0130, 0x9026, 0x20a9, 0x0800, 0x2071,
+	0x1000, 0x0030, 0x2021, 0x007f, 0x20a9, 0x0781, 0x2071, 0x107f,
+	0x2e04, 0x9005, 0x11b8, 0x2100, 0x9406, 0x1904, 0x4a92, 0x2428,
+	0x94ce, 0x007f, 0x1120, 0x92ce, 0xfffd, 0x1558, 0x0030, 0x94ce,
+	0x0080, 0x1130, 0x92ce, 0xfffc, 0x1520, 0x93ce, 0x00ff, 0x1508,
+	0xc5fd, 0x0480, 0x2058, 0xbf10, 0x2700, 0x9306, 0x11e8, 0xbe14,
+	0x2600, 0x9206, 0x11c8, 0x2400, 0x9106, 0x1180, 0xd884, 0x0598,
+	0xd894, 0x1588, 0x080c, 0x69ac, 0x1570, 0x2001, 0x4000, 0x0460,
+	0x080c, 0x6a0c, 0x1540, 0x2001, 0x4000, 0x0430, 0x2001, 0x4007,
+	0x0418, 0x2001, 0x4006, 0x0400, 0x2400, 0x9106, 0x1158, 0xbe14,
+	0x87ff, 0x1128, 0x86ff, 0x0918, 0x080c, 0xaead, 0x1900, 0x2001,
+	0x4008, 0x0090, 0x8420, 0x8e70, 0x1f04, 0x4a48, 0x85ff, 0x1130,
+	0x2001, 0x4009, 0x0048, 0x2001, 0x0001, 0x0030, 0x080c, 0x6638,
+	0x1dd0, 0xbb12, 0xba16, 0x9006, 0x9005, 0x009e, 0x00de, 0x00ee,
+	0x0005, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x35b5, 0x080c,
+	0x4b1f, 0x1120, 0x2009, 0x0002, 0x0804, 0x35b5, 0xa867, 0x0000,
+	0xa868, 0xc0fd, 0xa86a, 0x7884, 0x9005, 0x0904, 0x35b8, 0x9096,
+	0x00ff, 0x0120, 0x9092, 0x0004, 0x1a04, 0x35b8, 0x2010, 0x2918,
+	0x080c, 0x31c4, 0x1120, 0x2009, 0x0003, 0x0804, 0x35b5, 0x7007,
+	0x0003, 0x701f, 0x4ad4, 0x0005, 0xa830, 0x9086, 0x0100, 0x1904,
+	0x3583, 0x2009, 0x0004, 0x0804, 0x35b5, 0x7984, 0x080c, 0xaead,
+	0x1120, 0x9182, 0x007f, 0x0a04, 0x35b8, 0x9186, 0x00ff, 0x0904,
+	0x35b8, 0x9182, 0x0800, 0x1a04, 0x35b8, 0x2001, 0x9400, 0x080c,
+	0x570c, 0x1904, 0x35b5, 0x0804, 0x3583, 0xa998, 0x080c, 0xaead,
+	0x1118, 0x9182, 0x007f, 0x0280, 0x9186, 0x00ff, 0x0168, 0x9182,
+	0x0800, 0x1250, 0x2001, 0x9400, 0x080c, 0x570c, 0x11a8, 0x0060,
+	0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006, 0x900e, 0x9085,
+	0x0001, 0x2001, 0x0030, 0x0005, 0xa897, 0x4000, 0x900e, 0x9085,
+	0x0001, 0x2001, 0x0000, 0x0005, 0x2009, 0x000a, 0x0c48, 0x080c,
+	0x0fff, 0x0198, 0x9006, 0xa802, 0x7014, 0x9005, 0x1120, 0x2900,
+	0x7016, 0x701a, 0x0040, 0x7018, 0xa802, 0x0086, 0x2040, 0x2900,
+	0xa006, 0x701a, 0x008e, 0x9085, 0x0001, 0x0005, 0x7984, 0x080c,
+	0x6699, 0x1130, 0x7e88, 0x9684, 0x3fff, 0x9082, 0x4000, 0x0208,
+	0x905e, 0x8bff, 0x0005, 0xa998, 0x080c, 0x6699, 0x1130, 0xae9c,
+	0x9684, 0x3fff, 0x9082, 0x4000, 0x0208, 0x905e, 0x8bff, 0x0005,
+	0xae98, 0x0008, 0x7e84, 0x2608, 0x080c, 0x6699, 0x1108, 0x0008,
+	0x905e, 0x8bff, 0x0005, 0x0016, 0x7114, 0x81ff, 0x0128, 0x2148,
+	0xa904, 0x080c, 0x1031, 0x0cc8, 0x7116, 0x711a, 0x001e, 0x0005,
+	0x2031, 0x0001, 0x0010, 0x2031, 0x0000, 0x2061, 0x18b8, 0x2c44,
+	0xa66a, 0xa17a, 0xa772, 0xa076, 0xa28e, 0xa392, 0xa496, 0xa59a,
+	0x080c, 0x10e9, 0x7007, 0x0002, 0x701f, 0x3583, 0x0005, 0x00f6,
+	0x0126, 0x2091, 0x8000, 0x2079, 0x0000, 0x2001, 0x18b0, 0x2004,
+	0x9005, 0x1190, 0x0e04, 0x4b9c, 0x7a36, 0x7833, 0x0012, 0x7a82,
+	0x7b86, 0x7c8a, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084,
+	0x190c, 0x119b, 0x0804, 0x4c02, 0x0016, 0x0086, 0x0096, 0x00c6,
+	0x00e6, 0x2071, 0x189e, 0x7044, 0x9005, 0x1540, 0x7148, 0x9182,
+	0x0010, 0x0288, 0x7038, 0x2060, 0x080c, 0x0fff, 0x0904, 0x4bfa,
+	0xa84b, 0x0000, 0x2900, 0x7046, 0x2001, 0x0002, 0x9080, 0x20ce,
+	0x2005, 0xa846, 0x0098, 0x7038, 0x90e0, 0x0004, 0x2001, 0x18ba,
+	0x9c82, 0x18fa, 0x0210, 0x2061, 0x18ba, 0x2c00, 0x703a, 0x7148,
+	0x81ff, 0x1108, 0x703e, 0x8108, 0x714a, 0x0460, 0x7148, 0x8108,
+	0x714a, 0x7044, 0x2040, 0xa144, 0x2105, 0x0016, 0x908a, 0x0036,
+	0x1a0c, 0x0dd5, 0x2060, 0x001e, 0x8108, 0x2105, 0x9005, 0xa146,
+	0x1520, 0x080c, 0x0fff, 0x1130, 0x8109, 0xa946, 0x7148, 0x8109,
+	0x714a, 0x00d8, 0x9006, 0xa806, 0xa84a, 0xa046, 0x2800, 0xa802,
+	0x2900, 0xa006, 0x7046, 0x2001, 0x0002, 0x9080, 0x20ce, 0x2005,
+	0xa846, 0x0058, 0x2262, 0x6306, 0x640a, 0x00ee, 0x00ce, 0x009e,
+	0x008e, 0x001e, 0x012e, 0x00fe, 0x0005, 0x2c00, 0x9082, 0x001b,
+	0x0002, 0x4c24, 0x4c24, 0x4c26, 0x4c24, 0x4c24, 0x4c24, 0x4c2a,
+	0x4c24, 0x4c24, 0x4c24, 0x4c2e, 0x4c24, 0x4c24, 0x4c24, 0x4c32,
+	0x4c24, 0x4c24, 0x4c24, 0x4c36, 0x4c24, 0x4c24, 0x4c24, 0x4c3a,
+	0x4c24, 0x4c24, 0x4c24, 0x4c3f, 0x080c, 0x0dd5, 0xa276, 0xa37a,
+	0xa47e, 0x0898, 0xa286, 0xa38a, 0xa48e, 0x0878, 0xa296, 0xa39a,
+	0xa49e, 0x0858, 0xa2a6, 0xa3aa, 0xa4ae, 0x0838, 0xa2b6, 0xa3ba,
+	0xa4be, 0x0818, 0xa2c6, 0xa3ca, 0xa4ce, 0x0804, 0x4bfd, 0xa2d6,
+	0xa3da, 0xa4de, 0x0804, 0x4bfd, 0x00e6, 0x2071, 0x189e, 0x7048,
+	0x9005, 0x0904, 0x4cd6, 0x0126, 0x2091, 0x8000, 0x0e04, 0x4cd5,
+	0x00f6, 0x2079, 0x0000, 0x00c6, 0x0096, 0x0086, 0x0076, 0x9006,
+	0x2038, 0x7040, 0x2048, 0x9005, 0x0500, 0xa948, 0x2105, 0x0016,
+	0x908a, 0x0036, 0x1a0c, 0x0dd5, 0x2060, 0x001e, 0x8108, 0x2105,
+	0x9005, 0xa94a, 0x1904, 0x4cd8, 0xa804, 0x9005, 0x090c, 0x0dd5,
+	0x7042, 0x2938, 0x2040, 0xa003, 0x0000, 0x2001, 0x0002, 0x9080,
+	0x20ce, 0x2005, 0xa04a, 0x0804, 0x4cd8, 0x703c, 0x2060, 0x2c14,
+	0x6304, 0x6408, 0x650c, 0x2200, 0x7836, 0x7833, 0x0012, 0x7882,
+	0x2300, 0x7886, 0x2400, 0x788a, 0x2091, 0x4080, 0x2001, 0x0089,
+	0x2004, 0xd084, 0x190c, 0x119b, 0x87ff, 0x0118, 0x2748, 0x080c,
+	0x1031, 0x7048, 0x8001, 0x704a, 0x9005, 0x1170, 0x7040, 0x2048,
+	0x9005, 0x0128, 0x080c, 0x1031, 0x9006, 0x7042, 0x7046, 0x703b,
+	0x18ba, 0x703f, 0x18ba, 0x0420, 0x7040, 0x9005, 0x1508, 0x7238,
+	0x2c00, 0x9206, 0x0148, 0x9c80, 0x0004, 0x90fa, 0x18fa, 0x0210,
+	0x2001, 0x18ba, 0x703e, 0x00a0, 0x9006, 0x703e, 0x703a, 0x7044,
+	0x9005, 0x090c, 0x0dd5, 0x2048, 0xa800, 0x9005, 0x1de0, 0x2900,
+	0x7042, 0x2001, 0x0002, 0x9080, 0x20ce, 0x2005, 0xa84a, 0x0000,
+	0x007e, 0x008e, 0x009e, 0x00ce, 0x00fe, 0x012e, 0x00ee, 0x0005,
+	0x2c00, 0x9082, 0x001b, 0x0002, 0x4cf7, 0x4cf7, 0x4cf9, 0x4cf7,
+	0x4cf7, 0x4cf7, 0x4cfe, 0x4cf7, 0x4cf7, 0x4cf7, 0x4d03, 0x4cf7,
+	0x4cf7, 0x4cf7, 0x4d08, 0x4cf7, 0x4cf7, 0x4cf7, 0x4d0d, 0x4cf7,
+	0x4cf7, 0x4cf7, 0x4d12, 0x4cf7, 0x4cf7, 0x4cf7, 0x4d17, 0x080c,
+	0x0dd5, 0xaa74, 0xab78, 0xac7c, 0x0804, 0x4c83, 0xaa84, 0xab88,
+	0xac8c, 0x0804, 0x4c83, 0xaa94, 0xab98, 0xac9c, 0x0804, 0x4c83,
+	0xaaa4, 0xaba8, 0xacac, 0x0804, 0x4c83, 0xaab4, 0xabb8, 0xacbc,
+	0x0804, 0x4c83, 0xaac4, 0xabc8, 0xaccc, 0x0804, 0x4c83, 0xaad4,
+	0xabd8, 0xacdc, 0x0804, 0x4c83, 0x0016, 0x0026, 0x0036, 0x00b6,
+	0x00c6, 0x2009, 0x007e, 0x080c, 0x6699, 0x2019, 0x0001, 0xb85c,
+	0xd0ac, 0x0110, 0x2019, 0x0000, 0x2011, 0x801b, 0x080c, 0x4b7f,
+	0x00ce, 0x00be, 0x003e, 0x002e, 0x001e, 0x0005, 0x0026, 0x080c,
+	0x575d, 0xd0c4, 0x0120, 0x2011, 0x8014, 0x080c, 0x4b7f, 0x002e,
+	0x0005, 0x81ff, 0x1904, 0x35b5, 0x0126, 0x2091, 0x8000, 0x6030,
+	0xc08d, 0xc085, 0xc0ac, 0x6032, 0x080c, 0x743e, 0x1158, 0x080c,
+	0x7724, 0x080c, 0x60ad, 0x9085, 0x0001, 0x080c, 0x7485, 0x080c,
+	0x736a, 0x0010, 0x080c, 0x5f6c, 0x012e, 0x0804, 0x3583, 0x81ff,
+	0x0120, 0x2009, 0x0001, 0x0804, 0x35b5, 0x080c, 0x5771, 0x0120,
+	0x2009, 0x0007, 0x0804, 0x35b5, 0x080c, 0x6a04, 0x0120, 0x2009,
+	0x0008, 0x0804, 0x35b5, 0x7984, 0x080c, 0x6638, 0x1904, 0x35b8,
+	0x080c, 0x4b52, 0x0904, 0x35b8, 0x2b00, 0x7026, 0x080c, 0x6a0c,
+	0x7888, 0x1170, 0x9084, 0x0005, 0x1158, 0x900e, 0x080c, 0x68b9,
+	0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d, 0x0804, 0x3583,
+	0x080c, 0x4b1f, 0x0904, 0x35b5, 0x9006, 0xa866, 0xa832, 0xa868,
+	0xc0fd, 0xa86a, 0x080c, 0xceb0, 0x0904, 0x35b5, 0x7888, 0xd094,
+	0x0118, 0xb8cc, 0xc08d, 0xb8ce, 0x7007, 0x0003, 0x701f, 0x4df2,
+	0x0005, 0x2061, 0x1800, 0x080c, 0x5771, 0x2009, 0x0007, 0x1560,
+	0x080c, 0x6a04, 0x0118, 0x2009, 0x0008, 0x0430, 0xa998, 0x080c,
+	0x6638, 0x1530, 0x080c, 0x4b50, 0x0518, 0x080c, 0x6a0c, 0xa89c,
+	0x1168, 0x9084, 0x0005, 0x1150, 0x900e, 0x080c, 0x68b9, 0x1108,
+	0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d, 0x00d0, 0xa868, 0xc0fc,
+	0xa86a, 0x080c, 0xceb0, 0x11e0, 0xa89c, 0xd094, 0x0118, 0xb8cc,
+	0xc08d, 0xb8ce, 0x2009, 0x0003, 0xa897, 0x4005, 0xa99a, 0x0010,
+	0xa897, 0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x0005,
+	0xa897, 0x4000, 0xa99a, 0x9006, 0x918d, 0x0001, 0x2008, 0x0005,
+	0x9006, 0x0005, 0xa830, 0x9086, 0x0100, 0x7024, 0x2058, 0x1110,
+	0x0804, 0x56b1, 0x900e, 0x080c, 0x68b9, 0x1108, 0xc185, 0xb800,
+	0xd0bc, 0x0108, 0xc18d, 0x0804, 0x3583, 0x080c, 0x5771, 0x0120,
+	0x2009, 0x0007, 0x0804, 0x35b5, 0x7f84, 0x7a8c, 0x7b88, 0x7c9c,
+	0x7d98, 0x080c, 0x4b1f, 0x1120, 0x2009, 0x0002, 0x0804, 0x35b5,
+	0x900e, 0x2130, 0x7126, 0x7132, 0xa860, 0x20e8, 0x7036, 0xa85c,
+	0x9080, 0x0005, 0x702a, 0x20a0, 0x080c, 0x6699, 0x1904, 0x4e94,
+	0x080c, 0x6a0c, 0x0138, 0x080c, 0x6a14, 0x0120, 0x080c, 0x69ac,
+	0x1904, 0x4e94, 0xd794, 0x1110, 0xd784, 0x01a8, 0xb8c4, 0x20e0,
+	0xb8c8, 0x9080, 0x0006, 0x2098, 0x3400, 0xd794, 0x0160, 0x20a9,
+	0x0008, 0x4003, 0x2098, 0x20a0, 0x3d00, 0x20e0, 0x20a9, 0x0002,
+	0x080c, 0x491e, 0x0048, 0x20a9, 0x0004, 0x4003, 0x2098, 0x20a0,
+	0x3d00, 0x20e0, 0x080c, 0x491e, 0x9186, 0x007e, 0x0170, 0x9186,
+	0x0080, 0x0158, 0x080c, 0x6a0c, 0x90c2, 0x0006, 0x1210, 0xc1fd,
+	0x0020, 0x080c, 0x68b9, 0x1108, 0xc1fd, 0x4104, 0xc1fc, 0xd794,
+	0x0528, 0xb8c4, 0x20e0, 0xb8c8, 0x2060, 0x9c80, 0x0000, 0x2098,
+	0x20a9, 0x0002, 0x4003, 0x9c80, 0x0003, 0x2098, 0x20a9, 0x0001,
+	0x4005, 0x9c80, 0x0004, 0x2098, 0x3400, 0x20a9, 0x0002, 0x4003,
+	0x2098, 0x20a0, 0x3d00, 0x20e0, 0x080c, 0x4911, 0x9c80, 0x0026,
+	0x2098, 0xb8c4, 0x20e0, 0x20a9, 0x0002, 0x4003, 0xd794, 0x0110,
+	0x96b0, 0x000b, 0x96b0, 0x0005, 0x8108, 0x080c, 0xaead, 0x0118,
+	0x9186, 0x0800, 0x0040, 0xd78c, 0x0120, 0x9186, 0x0800, 0x0170,
+	0x0018, 0x9186, 0x007e, 0x0150, 0xd794, 0x0118, 0x9686, 0x0020,
+	0x0010, 0x9686, 0x0028, 0x0150, 0x0804, 0x4e24, 0x86ff, 0x1120,
+	0x7124, 0x810b, 0x0804, 0x3583, 0x7033, 0x0001, 0x7122, 0x7024,
+	0x9600, 0x7026, 0x772e, 0x2061, 0x18b8, 0x2c44, 0xa06b, 0x0000,
+	0xa67a, 0x7034, 0xa072, 0x7028, 0xa076, 0xa28e, 0xa392, 0xa496,
+	0xa59a, 0x080c, 0x10e9, 0x7007, 0x0002, 0x701f, 0x4ed0, 0x0005,
+	0x7030, 0x9005, 0x1180, 0x7120, 0x7028, 0x20a0, 0x772c, 0x9036,
+	0x7034, 0x20e8, 0x2061, 0x18b8, 0x2c44, 0xa28c, 0xa390, 0xa494,
+	0xa598, 0x0804, 0x4e24, 0x7124, 0x810b, 0x0804, 0x3583, 0x2029,
+	0x007e, 0x7984, 0x7a88, 0x7b8c, 0x7c98, 0x9184, 0xff00, 0x8007,
+	0x90e2, 0x0020, 0x0a04, 0x35b8, 0x9502, 0x0a04, 0x35b8, 0x9184,
+	0x00ff, 0x90e2, 0x0020, 0x0a04, 0x35b8, 0x9502, 0x0a04, 0x35b8,
+	0x9284, 0xff00, 0x8007, 0x90e2, 0x0020, 0x0a04, 0x35b8, 0x9502,
+	0x0a04, 0x35b8, 0x9284, 0x00ff, 0x90e2, 0x0020, 0x0a04, 0x35b8,
+	0x9502, 0x0a04, 0x35b8, 0x9384, 0xff00, 0x8007, 0x90e2, 0x0020,
+	0x0a04, 0x35b8, 0x9502, 0x0a04, 0x35b8, 0x9384, 0x00ff, 0x90e2,
+	0x0020, 0x0a04, 0x35b8, 0x9502, 0x0a04, 0x35b8, 0x9484, 0xff00,
+	0x8007, 0x90e2, 0x0020, 0x0a04, 0x35b8, 0x9502, 0x0a04, 0x35b8,
+	0x9484, 0x00ff, 0x90e2, 0x0020, 0x0a04, 0x35b8, 0x9502, 0x0a04,
+	0x35b8, 0x2061, 0x1988, 0x6102, 0x6206, 0x630a, 0x640e, 0x0804,
+	0x3583, 0x080c, 0x4b1f, 0x0904, 0x35b5, 0x2009, 0x0016, 0x7a8c,
+	0x7b88, 0x7c9c, 0x7d98, 0xa85c, 0x9080, 0x0019, 0xaf60, 0x080c,
+	0x4b68, 0x701f, 0x4f54, 0x0005, 0x2001, 0x0138, 0x2003, 0x0000,
+	0x00e6, 0x2071, 0x0300, 0x701c, 0xd0a4, 0x1de8, 0x00ee, 0x20a9,
+	0x0016, 0x896e, 0x8d6e, 0x8d6f, 0x9d84, 0xffc0, 0x9080, 0x0019,
+	0x2098, 0x9d84, 0x003f, 0x20e0, 0x2069, 0x1877, 0x20e9, 0x0001,
+	0x2da0, 0x4003, 0x6800, 0x9005, 0x0904, 0x4fd5, 0x6804, 0x2008,
+	0x918c, 0xfff8, 0x1904, 0x4fd5, 0x680c, 0x9005, 0x0904, 0x4fd5,
+	0x9082, 0xff01, 0x1a04, 0x4fd5, 0x6810, 0x9082, 0x005c, 0x0a04,
+	0x4fd5, 0x6824, 0x2008, 0x9082, 0x0008, 0x0a04, 0x4fd5, 0x9182,
+	0x0400, 0x1a04, 0x4fd5, 0x0056, 0x2029, 0x0000, 0x080c, 0x8bbf,
+	0x005e, 0x6944, 0x6820, 0x9102, 0x06c0, 0x6820, 0x9082, 0x0019,
+	0x16a0, 0x6828, 0x6944, 0x810c, 0x9102, 0x0678, 0x6840, 0x9082,
+	0x000f, 0x1658, 0x080c, 0x1018, 0x2900, 0x0904, 0x4ff1, 0x684e,
+	0x00e6, 0x2071, 0x1930, 0x00b6, 0x2059, 0x0000, 0x080c, 0x8a7b,
+	0x00be, 0x00ee, 0x0568, 0x080c, 0x87ce, 0x080c, 0x8819, 0x11e0,
+	0x6857, 0x0000, 0x00c6, 0x2061, 0x0100, 0x6104, 0x918d, 0x2000,
+	0x6106, 0x6b10, 0x2061, 0x1a61, 0x630a, 0x00ce, 0x080c, 0x2994,
+	0x2001, 0x0138, 0x2102, 0x0804, 0x3583, 0x080c, 0x2994, 0x2001,
+	0x0138, 0x2102, 0x0804, 0x35b8, 0x080c, 0x8812, 0x00e6, 0x2071,
+	0x1930, 0x080c, 0x8c3f, 0x080c, 0x8c4e, 0x080c, 0x8a62, 0x00ee,
+	0x2001, 0x188a, 0x204c, 0x080c, 0x1031, 0x2001, 0x188a, 0x2003,
+	0x0000, 0x080c, 0x2994, 0x2001, 0x0138, 0x2102, 0x0804, 0x35b5,
+	0x2001, 0x1924, 0x200c, 0x918e, 0x0000, 0x0904, 0x5052, 0x080c,
+	0x8a5d, 0x0904, 0x5052, 0x2001, 0x0101, 0x200c, 0x918c, 0xdfff,
+	0x2102, 0x2001, 0x0138, 0x2003, 0x0000, 0x00e6, 0x2071, 0x0300,
+	0x701c, 0xd0a4, 0x1de8, 0x00ee, 0x080c, 0x8a62, 0x2001, 0x0035,
+	0x080c, 0x15fd, 0x00c6, 0x2061, 0x193c, 0x6004, 0x6100, 0x9106,
+	0x1de0, 0x00ce, 0x080c, 0x2994, 0x2001, 0x0138, 0x2102, 0x00e6,
+	0x00f6, 0x2071, 0x1923, 0x080c, 0x899c, 0x0120, 0x2f00, 0x080c,
+	0x8a28, 0x0cc8, 0x00fe, 0x00ee, 0x0126, 0x2091, 0x8000, 0x2001,
+	0x188a, 0x200c, 0x81ff, 0x0138, 0x2148, 0x080c, 0x1031, 0x2001,
+	0x188a, 0x2003, 0x0000, 0x2001, 0x183c, 0x2003, 0x0020, 0x080c,
+	0x8812, 0x00e6, 0x2071, 0x1930, 0x080c, 0x8c3f, 0x080c, 0x8c4e,
+	0x00ee, 0x012e, 0x0804, 0x3583, 0x0006, 0x080c, 0x575d, 0xd0cc,
+	0x000e, 0x0005, 0x0006, 0x080c, 0x5761, 0xd0bc, 0x000e, 0x0005,
+	0x6174, 0x7a84, 0x6300, 0x82ff, 0x1118, 0x7986, 0x0804, 0x3583,
+	0x83ff, 0x1904, 0x35b8, 0x2001, 0xfff0, 0x9200, 0x1a04, 0x35b8,
+	0x2019, 0xffff, 0x6078, 0x9302, 0x9200, 0x0a04, 0x35b8, 0x7986,
+	0x6276, 0x0804, 0x3583, 0x080c, 0x5771, 0x1904, 0x35b5, 0x7c88,
+	0x7d84, 0x7e98, 0x7f8c, 0x080c, 0x4b1f, 0x0904, 0x35b5, 0x900e,
+	0x901e, 0x7326, 0x7332, 0xa860, 0x20e8, 0x7036, 0xa85c, 0x9080,
+	0x0003, 0x702a, 0x20a0, 0x91d8, 0x1000, 0x2b5c, 0x8bff, 0x0178,
+	0x080c, 0x6a0c, 0x0118, 0x080c, 0x6a14, 0x1148, 0x20a9, 0x0001,
+	0xb814, 0x4004, 0xb810, 0x4004, 0x4104, 0x9398, 0x0003, 0x8108,
+	0x9182, 0x0800, 0x0120, 0x9386, 0x003c, 0x0170, 0x0c20, 0x83ff,
+	0x1148, 0x7224, 0x900e, 0x2001, 0x0003, 0x080c, 0x9027, 0x2208,
+	0x0804, 0x3583, 0x7033, 0x0001, 0x7122, 0x7024, 0x9300, 0x7026,
+	0x2061, 0x18b8, 0x2c44, 0xa06b, 0x0000, 0xa37a, 0x7028, 0xa076,
+	0x7034, 0xa072, 0xa48e, 0xa592, 0xa696, 0xa79a, 0x080c, 0x10e9,
+	0x7007, 0x0002, 0x701f, 0x50d5, 0x0005, 0x7030, 0x9005, 0x1178,
+	0x7120, 0x7028, 0x20a0, 0x901e, 0x7034, 0x20e8, 0x2061, 0x18b8,
+	0x2c44, 0xa48c, 0xa590, 0xa694, 0xa798, 0x0804, 0x5093, 0x7224,
+	0x900e, 0x2001, 0x0003, 0x080c, 0x9027, 0x2208, 0x0804, 0x3583,
+	0x00f6, 0x00e6, 0x080c, 0x5771, 0x2009, 0x0007, 0x1904, 0x5168,
+	0x2071, 0x189e, 0x745c, 0x84ff, 0x2009, 0x000e, 0x1904, 0x5168,
+	0xac9c, 0xad98, 0xaea4, 0xafa0, 0x0096, 0x080c, 0x1018, 0x2009,
+	0x0002, 0x0904, 0x5168, 0x2900, 0x705e, 0x900e, 0x901e, 0x7356,
+	0x7362, 0xa860, 0x7066, 0xa85c, 0x9080, 0x0003, 0x705a, 0x20a0,
+	0x91d8, 0x1000, 0x2b5c, 0x8bff, 0x0178, 0x080c, 0x6a0c, 0x0118,
+	0x080c, 0x6a14, 0x1148, 0xb814, 0x20a9, 0x0001, 0x4004, 0xb810,
+	0x4004, 0x4104, 0x9398, 0x0003, 0x8108, 0x9182, 0x0800, 0x0120,
+	0x9386, 0x003c, 0x01e8, 0x0c20, 0x83ff, 0x11c0, 0x7254, 0x900e,
+	0x2001, 0x0003, 0x080c, 0x9027, 0x2208, 0x009e, 0xa897, 0x4000,
+	0xa99a, 0x715c, 0x81ff, 0x090c, 0x0dd5, 0x2148, 0x080c, 0x1031,
+	0x9006, 0x705e, 0x918d, 0x0001, 0x2008, 0x0418, 0x7063, 0x0001,
+	0x7152, 0x7054, 0x9300, 0x7056, 0x2061, 0x18b9, 0x2c44, 0xa37a,
+	0x7058, 0xa076, 0x7064, 0xa072, 0xa48e, 0xa592, 0xa696, 0xa79a,
+	0xa09f, 0x5174, 0x000e, 0xa0a2, 0x080c, 0x10e9, 0x9006, 0x0048,
+	0x009e, 0xa897, 0x4005, 0xa99a, 0x900e, 0x9085, 0x0001, 0x2001,
+	0x0030, 0x00ee, 0x00fe, 0x0005, 0x00f6, 0xa0a0, 0x904d, 0x090c,
+	0x0dd5, 0x00e6, 0x2071, 0x189e, 0xa06c, 0x908e, 0x0100, 0x0138,
+	0xa87b, 0x0030, 0xa883, 0x0000, 0xa897, 0x4002, 0x00d8, 0x7060,
+	0x9005, 0x1158, 0x7150, 0x7058, 0x20a0, 0x901e, 0x7064, 0x20e8,
+	0xa48c, 0xa590, 0xa694, 0xa798, 0x0428, 0xa87b, 0x0000, 0xa883,
+	0x0000, 0xa897, 0x4000, 0x7254, 0x900e, 0x2001, 0x0003, 0x080c,
+	0x9027, 0xaa9a, 0x715c, 0x81ff, 0x090c, 0x0dd5, 0x2148, 0x080c,
+	0x1031, 0x705f, 0x0000, 0xa0a0, 0x2048, 0x0126, 0x2091, 0x8000,
+	0x080c, 0x6d17, 0x012e, 0xa09f, 0x0000, 0xa0a3, 0x0000, 0x00ee,
+	0x00fe, 0x0005, 0x91d8, 0x1000, 0x2b5c, 0x8bff, 0x0178, 0x080c,
+	0x6a0c, 0x0118, 0x080c, 0x6a14, 0x1148, 0xb814, 0x20a9, 0x0001,
 	0x4004, 0xb810, 0x4004, 0x4104, 0x9398, 0x0003, 0x8108, 0x9182,
-	0x0800, 0x0120, 0x9386, 0x003c, 0x01e8, 0x0c20, 0x83ff, 0x11c0,
-	0x7254, 0x900e, 0x2001, 0x0003, 0x080c, 0x8f70, 0x2208, 0x009e,
-	0xa897, 0x4000, 0xa99a, 0x715c, 0x81ff, 0x090c, 0x0dd5, 0x2148,
-	0x080c, 0x1031, 0x9006, 0x705e, 0x918d, 0x0001, 0x2008, 0x0418,
-	0x7063, 0x0001, 0x7152, 0x7054, 0x9300, 0x7056, 0x2061, 0x18b9,
-	0x2c44, 0xa37a, 0x7058, 0xa076, 0x7064, 0xa072, 0xa48e, 0xa592,
-	0xa696, 0xa79a, 0xa09f, 0x510e, 0x000e, 0xa0a2, 0x080c, 0x10e9,
-	0x9006, 0x0048, 0x009e, 0xa897, 0x4005, 0xa99a, 0x900e, 0x9085,
-	0x0001, 0x2001, 0x0030, 0x00ee, 0x00fe, 0x0005, 0x00f6, 0xa0a0,
-	0x904d, 0x090c, 0x0dd5, 0x00e6, 0x2071, 0x189e, 0xa06c, 0x908e,
-	0x0100, 0x0138, 0xa87b, 0x0030, 0xa883, 0x0000, 0xa897, 0x4002,
-	0x00d8, 0x7060, 0x9005, 0x1158, 0x7150, 0x7058, 0x20a0, 0x901e,
-	0x7064, 0x20e8, 0xa48c, 0xa590, 0xa694, 0xa798, 0x0428, 0xa87b,
-	0x0000, 0xa883, 0x0000, 0xa897, 0x4000, 0x7254, 0x900e, 0x2001,
-	0x0003, 0x080c, 0x8f70, 0xaa9a, 0x715c, 0x81ff, 0x090c, 0x0dd5,
-	0x2148, 0x080c, 0x1031, 0x705f, 0x0000, 0xa0a0, 0x2048, 0x0126,
-	0x2091, 0x8000, 0x080c, 0x6c94, 0x012e, 0xa09f, 0x0000, 0xa0a3,
-	0x0000, 0x00ee, 0x00fe, 0x0005, 0x91d8, 0x1000, 0x2b5c, 0x8bff,
-	0x0178, 0x080c, 0x6989, 0x0118, 0x080c, 0x6991, 0x1148, 0xb814,
-	0x20a9, 0x0001, 0x4004, 0xb810, 0x4004, 0x4104, 0x9398, 0x0003,
-	0x8108, 0x9182, 0x0800, 0x0120, 0x9386, 0x003c, 0x0518, 0x0c20,
-	0x83ff, 0x11f0, 0x7154, 0x810c, 0xa99a, 0xa897, 0x4000, 0x715c,
-	0x81ff, 0x090c, 0x0dd5, 0x2148, 0x080c, 0x1031, 0x9006, 0x705e,
-	0x918d, 0x0001, 0x2008, 0xa0a0, 0x2048, 0x0126, 0x2091, 0x8000,
-	0x080c, 0x6c94, 0x012e, 0xa09f, 0x0000, 0xa0a3, 0x0000, 0x0070,
-	0x7063, 0x0001, 0x7152, 0x7054, 0x9300, 0x7056, 0xa37a, 0xa48e,
-	0xa592, 0xa696, 0xa79a, 0x080c, 0x10e9, 0x9006, 0x00ee, 0x0005,
-	0x0096, 0xa88c, 0x90be, 0x7000, 0x0148, 0x90be, 0x7100, 0x0130,
-	0x90be, 0x7200, 0x0118, 0x009e, 0x0804, 0x3566, 0xa884, 0xa988,
-	0x080c, 0x284b, 0x1518, 0x080c, 0x65b5, 0x1500, 0x7126, 0xbe12,
-	0xbd16, 0xae7c, 0x080c, 0x4abe, 0x01c8, 0x080c, 0x4abe, 0x01b0,
-	0x009e, 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, 0xa823, 0x0000,
-	0xa804, 0x2048, 0x080c, 0xcd04, 0x1120, 0x2009, 0x0003, 0x0804,
-	0x3563, 0x7007, 0x0003, 0x701f, 0x51db, 0x0005, 0x009e, 0x2009,
-	0x0002, 0x0804, 0x3563, 0x7124, 0x080c, 0x32c8, 0xa820, 0x9086,
-	0x8001, 0x1120, 0x2009, 0x0004, 0x0804, 0x3563, 0x2900, 0x7022,
-	0xa804, 0x0096, 0x2048, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f,
-	0x9084, 0xffc0, 0x009e, 0x9080, 0x0002, 0x0076, 0x0006, 0x2098,
-	0x20a0, 0x27e0, 0x27e8, 0x20a9, 0x002a, 0x080c, 0x0f7c, 0xaa6c,
-	0xab70, 0xac74, 0xad78, 0x2061, 0x18b8, 0x2c44, 0xa06b, 0x0000,
-	0xae64, 0xaf8c, 0x97c6, 0x7000, 0x0118, 0x97c6, 0x7100, 0x1148,
-	0x96c2, 0x0004, 0x0600, 0x2009, 0x0004, 0x000e, 0x007e, 0x0804,
-	0x4b0a, 0x97c6, 0x7200, 0x11b8, 0x96c2, 0x0054, 0x02a0, 0x000e,
-	0x007e, 0x2061, 0x18b8, 0x2c44, 0xa076, 0xa772, 0xa07b, 0x002a,
-	0xa28e, 0xa392, 0xa496, 0xa59a, 0x080c, 0x10e9, 0x7007, 0x0002,
-	0x701f, 0x5237, 0x0005, 0x000e, 0x007e, 0x0804, 0x3566, 0x7020,
-	0x2048, 0xa804, 0x2048, 0xa804, 0x2048, 0x8906, 0x8006, 0x8007,
-	0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0002, 0x2098, 0x20a0,
-	0x27e0, 0x27e8, 0x20a9, 0x002a, 0x080c, 0x0f7c, 0x2100, 0x2238,
-	0x2061, 0x18b8, 0x2c44, 0xa28c, 0xa390, 0xa494, 0xa598, 0x2009,
-	0x002a, 0x0804, 0x4b0a, 0x81ff, 0x1904, 0x3563, 0x798c, 0x2001,
-	0x197d, 0x918c, 0x8000, 0x2102, 0x080c, 0x4ad5, 0x0904, 0x3566,
-	0x080c, 0x6989, 0x0120, 0x080c, 0x6991, 0x1904, 0x3566, 0x080c,
-	0x66dd, 0x0904, 0x3563, 0x0126, 0x2091, 0x8000, 0x080c, 0x67a3,
-	0x012e, 0x0904, 0x3563, 0x2001, 0x197d, 0x2004, 0xd0fc, 0x1904,
-	0x3531, 0x0804, 0x4534, 0xa9a0, 0x2001, 0x197d, 0x918c, 0x8000,
-	0xc18d, 0x2102, 0x080c, 0x4ae2, 0x01a0, 0x080c, 0x6989, 0x0118,
-	0x080c, 0x6991, 0x1170, 0x080c, 0x66dd, 0x2009, 0x0002, 0x0128,
-	0x080c, 0x67a3, 0x1170, 0x2009, 0x0003, 0xa897, 0x4005, 0xa99a,
-	0x0010, 0xa897, 0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030,
-	0x0005, 0xa897, 0x4000, 0x2001, 0x197d, 0x2004, 0xd0fc, 0x1128,
-	0x080c, 0x56ea, 0x0110, 0x9006, 0x0018, 0x900e, 0x9085, 0x0001,
-	0x2001, 0x0000, 0x0005, 0x78a8, 0xd08c, 0x1118, 0xd084, 0x0904,
-	0x44a9, 0x080c, 0x4af1, 0x0904, 0x3566, 0x080c, 0x4abe, 0x1120,
-	0x2009, 0x0002, 0x0804, 0x3563, 0x080c, 0x6989, 0x0130, 0x908e,
-	0x0004, 0x0118, 0x908e, 0x0005, 0x15a0, 0x78a8, 0xd08c, 0x0120,
-	0xb800, 0xc08c, 0xb802, 0x0028, 0x080c, 0x56e2, 0xd0b4, 0x0904,
-	0x44e3, 0x7884, 0x908e, 0x007e, 0x0904, 0x44e3, 0x908e, 0x007f,
-	0x0904, 0x44e3, 0x908e, 0x0080, 0x0904, 0x44e3, 0xb800, 0xd08c,
-	0x1904, 0x44e3, 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, 0x080c,
-	0xcd23, 0x1120, 0x2009, 0x0003, 0x0804, 0x3563, 0x7007, 0x0003,
-	0x701f, 0x5303, 0x0005, 0x080c, 0x4af1, 0x0904, 0x3566, 0x0804,
-	0x44e3, 0x080c, 0x3321, 0x0108, 0x0005, 0x2009, 0x1834, 0x210c,
-	0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x3563, 0x080c, 0x56f6,
-	0x0120, 0x2009, 0x0007, 0x0804, 0x3563, 0x080c, 0x6981, 0x0120,
-	0x2009, 0x0008, 0x0804, 0x3563, 0xb89c, 0xd0a4, 0x1118, 0xd0ac,
-	0x1904, 0x44e3, 0x9006, 0xa866, 0xa832, 0xa868, 0xc0fd, 0xa86a,
-	0x080c, 0xcd82, 0x1120, 0x2009, 0x0003, 0x0804, 0x3563, 0x7007,
-	0x0003, 0x701f, 0x533c, 0x0005, 0xa830, 0x9086, 0x0100, 0x1120,
-	0x2009, 0x0004, 0x0804, 0x563f, 0x080c, 0x4af1, 0x0904, 0x3566,
-	0x0804, 0x52d5, 0x81ff, 0x2009, 0x0001, 0x1904, 0x3563, 0x080c,
-	0x56f6, 0x2009, 0x0007, 0x1904, 0x3563, 0x080c, 0x6981, 0x0120,
-	0x2009, 0x0008, 0x0804, 0x3563, 0x080c, 0x4af1, 0x0904, 0x3566,
-	0x080c, 0x6989, 0x2009, 0x0009, 0x1904, 0x3563, 0x080c, 0x4abe,
-	0x2009, 0x0002, 0x0904, 0x3563, 0x9006, 0xa866, 0xa832, 0xa868,
-	0xc0fd, 0xa86a, 0x7988, 0x9194, 0xff00, 0x918c, 0x00ff, 0x9006,
-	0x82ff, 0x1128, 0xc0ed, 0xa952, 0x798c, 0xa956, 0x0038, 0x928e,
-	0x0100, 0x1904, 0x3566, 0xc0e5, 0xa952, 0xa956, 0xa83e, 0x080c,
-	0xcfd5, 0x2009, 0x0003, 0x0904, 0x3563, 0x7007, 0x0003, 0x701f,
-	0x5392, 0x0005, 0xa830, 0x9086, 0x0100, 0x2009, 0x0004, 0x0904,
-	0x3563, 0x0804, 0x3531, 0x7aa8, 0x9284, 0xc000, 0x0148, 0xd2ec,
-	0x01a0, 0x080c, 0x56f6, 0x1188, 0x2009, 0x0014, 0x0804, 0x3563,
-	0xd2dc, 0x1568, 0x81ff, 0x2009, 0x0001, 0x1904, 0x3563, 0x080c,
-	0x56f6, 0x2009, 0x0007, 0x1904, 0x3563, 0xd2f4, 0x0130, 0x9284,
-	0x5000, 0x080c, 0x56bd, 0x0804, 0x3531, 0xd2fc, 0x0158, 0x080c,
-	0x4af1, 0x0904, 0x3566, 0x7984, 0x9284, 0x9000, 0x080c, 0x569a,
-	0x0804, 0x3531, 0x080c, 0x4af1, 0x0904, 0x3566, 0xb804, 0x9084,
-	0x00ff, 0x9086, 0x0006, 0x2009, 0x0009, 0x1904, 0x547b, 0x080c,
-	0x4abe, 0x2009, 0x0002, 0x0904, 0x547b, 0xa85c, 0x9080, 0x001b,
+	0x0800, 0x0120, 0x9386, 0x003c, 0x0518, 0x0c20, 0x83ff, 0x11f0,
+	0x7154, 0x810c, 0xa99a, 0xa897, 0x4000, 0x715c, 0x81ff, 0x090c,
+	0x0dd5, 0x2148, 0x080c, 0x1031, 0x9006, 0x705e, 0x918d, 0x0001,
+	0x2008, 0xa0a0, 0x2048, 0x0126, 0x2091, 0x8000, 0x080c, 0x6d17,
+	0x012e, 0xa09f, 0x0000, 0xa0a3, 0x0000, 0x0070, 0x7063, 0x0001,
+	0x7152, 0x7054, 0x9300, 0x7056, 0xa37a, 0xa48e, 0xa592, 0xa696,
+	0xa79a, 0x080c, 0x10e9, 0x9006, 0x00ee, 0x0005, 0x0096, 0xa88c,
+	0x90be, 0x7000, 0x0148, 0x90be, 0x7100, 0x0130, 0x90be, 0x7200,
+	0x0118, 0x009e, 0x0804, 0x35b8, 0xa884, 0xa988, 0x080c, 0x287c,
+	0x1518, 0x080c, 0x6638, 0x1500, 0x7126, 0xbe12, 0xbd16, 0xae7c,
+	0x080c, 0x4b1f, 0x01c8, 0x080c, 0x4b1f, 0x01b0, 0x009e, 0xa867,
+	0x0000, 0xa868, 0xc0fd, 0xa86a, 0xa823, 0x0000, 0xa804, 0x2048,
+	0x080c, 0xce32, 0x1120, 0x2009, 0x0003, 0x0804, 0x35b5, 0x7007,
+	0x0003, 0x701f, 0x5241, 0x0005, 0x009e, 0x2009, 0x0002, 0x0804,
+	0x35b5, 0x7124, 0x080c, 0x331a, 0xa820, 0x9086, 0x8001, 0x1120,
+	0x2009, 0x0004, 0x0804, 0x35b5, 0x2900, 0x7022, 0xa804, 0x0096,
+	0x2048, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0,
+	0x009e, 0x9080, 0x0002, 0x0076, 0x0006, 0x2098, 0x20a0, 0x27e0,
+	0x27e8, 0x20a9, 0x002a, 0x080c, 0x0f7c, 0xaa6c, 0xab70, 0xac74,
+	0xad78, 0x2061, 0x18b8, 0x2c44, 0xa06b, 0x0000, 0xae64, 0xaf8c,
+	0x97c6, 0x7000, 0x0118, 0x97c6, 0x7100, 0x1148, 0x96c2, 0x0004,
+	0x0600, 0x2009, 0x0004, 0x000e, 0x007e, 0x0804, 0x4b6b, 0x97c6,
+	0x7200, 0x11b8, 0x96c2, 0x0054, 0x02a0, 0x000e, 0x007e, 0x2061,
+	0x18b8, 0x2c44, 0xa076, 0xa772, 0xa07b, 0x002a, 0xa28e, 0xa392,
+	0xa496, 0xa59a, 0x080c, 0x10e9, 0x7007, 0x0002, 0x701f, 0x529d,
+	0x0005, 0x000e, 0x007e, 0x0804, 0x35b8, 0x7020, 0x2048, 0xa804,
+	0x2048, 0xa804, 0x2048, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f,
+	0x9084, 0xffc0, 0x9080, 0x0002, 0x2098, 0x20a0, 0x27e0, 0x27e8,
+	0x20a9, 0x002a, 0x080c, 0x0f7c, 0x2100, 0x2238, 0x2061, 0x18b8,
+	0x2c44, 0xa28c, 0xa390, 0xa494, 0xa598, 0x2009, 0x002a, 0x0804,
+	0x4b6b, 0x81ff, 0x1904, 0x35b5, 0x798c, 0x2001, 0x197d, 0x918c,
+	0x8000, 0x2102, 0x080c, 0x4b36, 0x0904, 0x35b8, 0x080c, 0x6a0c,
+	0x0120, 0x080c, 0x6a14, 0x1904, 0x35b8, 0x080c, 0x6760, 0x0904,
+	0x35b5, 0x0126, 0x2091, 0x8000, 0x080c, 0x6826, 0x012e, 0x0904,
+	0x35b5, 0x2001, 0x197d, 0x2004, 0xd0fc, 0x1904, 0x3583, 0x0804,
+	0x4586, 0xa9a0, 0x2001, 0x197d, 0x918c, 0x8000, 0xc18d, 0x2102,
+	0x080c, 0x4b43, 0x01a0, 0x080c, 0x6a0c, 0x0118, 0x080c, 0x6a14,
+	0x1170, 0x080c, 0x6760, 0x2009, 0x0002, 0x0128, 0x080c, 0x6826,
+	0x1170, 0x2009, 0x0003, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897,
+	0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x0005, 0xa897,
+	0x4000, 0x2001, 0x197d, 0x2004, 0xd0fc, 0x1128, 0x080c, 0x5765,
+	0x0110, 0x9006, 0x0018, 0x900e, 0x9085, 0x0001, 0x2001, 0x0000,
+	0x0005, 0x78a8, 0xd08c, 0x1118, 0xd084, 0x0904, 0x44fb, 0x080c,
+	0x4b52, 0x0904, 0x35b8, 0x080c, 0x4b1f, 0x1120, 0x2009, 0x0002,
+	0x0804, 0x35b5, 0x080c, 0x6a0c, 0x0130, 0x908e, 0x0004, 0x0118,
+	0x908e, 0x0005, 0x15a0, 0x78a8, 0xd08c, 0x0120, 0xb800, 0xc08c,
+	0xb802, 0x0028, 0x080c, 0x575d, 0xd0b4, 0x0904, 0x4535, 0x7884,
+	0x908e, 0x007e, 0x0904, 0x4535, 0x908e, 0x007f, 0x0904, 0x4535,
+	0x908e, 0x0080, 0x0904, 0x4535, 0xb800, 0xd08c, 0x1904, 0x4535,
+	0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, 0x080c, 0xce51, 0x1120,
+	0x2009, 0x0003, 0x0804, 0x35b5, 0x7007, 0x0003, 0x701f, 0x5369,
+	0x0005, 0x080c, 0x4b52, 0x0904, 0x35b8, 0x0804, 0x4535, 0x080c,
+	0x3373, 0x0108, 0x0005, 0x2009, 0x1834, 0x210c, 0x81ff, 0x0120,
+	0x2009, 0x0001, 0x0804, 0x35b5, 0x080c, 0x5771, 0x0120, 0x2009,
+	0x0007, 0x0804, 0x35b5, 0x080c, 0x6a04, 0x0120, 0x2009, 0x0008,
+	0x0804, 0x35b5, 0xb89c, 0xd0a4, 0x1118, 0xd0ac, 0x1904, 0x4535,
+	0x9006, 0xa866, 0xa832, 0xa868, 0xc0fd, 0xa86a, 0x080c, 0xceb0,
+	0x1120, 0x2009, 0x0003, 0x0804, 0x35b5, 0x7007, 0x0003, 0x701f,
+	0x53a2, 0x0005, 0xa830, 0x9086, 0x0100, 0x1120, 0x2009, 0x0004,
+	0x0804, 0x56b1, 0x080c, 0x4b52, 0x0904, 0x35b8, 0x0804, 0x533b,
+	0x81ff, 0x2009, 0x0001, 0x1904, 0x35b5, 0x080c, 0x5771, 0x2009,
+	0x0007, 0x1904, 0x35b5, 0x080c, 0x6a04, 0x0120, 0x2009, 0x0008,
+	0x0804, 0x35b5, 0x080c, 0x4b52, 0x0904, 0x35b8, 0x080c, 0x6a0c,
+	0x2009, 0x0009, 0x1904, 0x35b5, 0x080c, 0x4b1f, 0x2009, 0x0002,
+	0x0904, 0x35b5, 0x9006, 0xa866, 0xa832, 0xa868, 0xc0fd, 0xa86a,
+	0x7988, 0x9194, 0xff00, 0x918c, 0x00ff, 0x9006, 0x82ff, 0x1128,
+	0xc0ed, 0xa952, 0x798c, 0xa956, 0x0038, 0x928e, 0x0100, 0x1904,
+	0x35b8, 0xc0e5, 0xa952, 0xa956, 0xa83e, 0x080c, 0xd103, 0x2009,
+	0x0003, 0x0904, 0x35b5, 0x7007, 0x0003, 0x701f, 0x53f8, 0x0005,
+	0xa830, 0x9086, 0x0100, 0x2009, 0x0004, 0x0904, 0x35b5, 0x0804,
+	0x3583, 0x7aa8, 0x9284, 0xc000, 0x0148, 0xd2ec, 0x01a0, 0x080c,
+	0x5771, 0x1188, 0x2009, 0x0014, 0x0804, 0x35b5, 0xd2dc, 0x1578,
+	0x81ff, 0x2009, 0x0001, 0x1904, 0x35b5, 0x080c, 0x5771, 0x2009,
+	0x0007, 0x1904, 0x35b5, 0xd2f4, 0x0138, 0x9284, 0x5000, 0xc0d5,
+	0x080c, 0x5737, 0x0804, 0x3583, 0xd2fc, 0x0160, 0x080c, 0x4b52,
+	0x0904, 0x35b8, 0x7984, 0x9284, 0x9000, 0xc0d5, 0x080c, 0x570c,
+	0x0804, 0x3583, 0x080c, 0x4b52, 0x0904, 0x35b8, 0xb804, 0x9084,
+	0x00ff, 0x9086, 0x0006, 0x2009, 0x0009, 0x1904, 0x54e7, 0x080c,
+	0x4b1f, 0x2009, 0x0002, 0x0904, 0x54e7, 0xa85c, 0x9080, 0x001b,
 	0xaf60, 0x2009, 0x0008, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x080c,
-	0x4b07, 0x701f, 0x53ec, 0x0005, 0xa86c, 0x9086, 0x0500, 0x1138,
+	0x4b68, 0x701f, 0x5454, 0x0005, 0xa86c, 0x9086, 0x0500, 0x1138,
 	0xa870, 0x9005, 0x1120, 0xa874, 0x9084, 0xff00, 0x0110, 0x1904,
-	0x3566, 0xa866, 0xa832, 0xa868, 0xc0fd, 0xa86a, 0x080c, 0x4af1,
-	0x1110, 0x0804, 0x3566, 0x2009, 0x0043, 0x080c, 0xd03d, 0x2009,
-	0x0003, 0x0904, 0x547b, 0x7007, 0x0003, 0x701f, 0x5410, 0x0005,
-	0xa830, 0x9086, 0x0100, 0x2009, 0x0004, 0x0904, 0x547b, 0x7984,
-	0x7aa8, 0x9284, 0x1000, 0x080c, 0x569a, 0x0804, 0x3531, 0x00c6,
-	0xaab0, 0x9284, 0xc000, 0x0140, 0xd2ec, 0x0168, 0x080c, 0x56f6,
-	0x1150, 0x2009, 0x0014, 0x04f0, 0x2061, 0x1800, 0x080c, 0x56f6,
-	0x2009, 0x0007, 0x15b8, 0xd2f4, 0x0128, 0x9284, 0x5000, 0x080c,
-	0x56bd, 0x0050, 0xd2fc, 0x0178, 0x080c, 0x4aef, 0x0588, 0xa998,
-	0x9284, 0x9000, 0x080c, 0x569a, 0xa87b, 0x0000, 0xa883, 0x0000,
-	0xa897, 0x4000, 0x0438, 0x080c, 0x4aef, 0x0510, 0x080c, 0x6989,
-	0x2009, 0x0009, 0x11b8, 0xa8c4, 0x9086, 0x0500, 0x11c8, 0xa8c8,
-	0x9005, 0x11b0, 0xa8cc, 0x9084, 0xff00, 0x1190, 0x080c, 0x4aef,
-	0x1108, 0x0070, 0x2009, 0x004b, 0x080c, 0xd03d, 0x2009, 0x0003,
-	0x0108, 0x0078, 0x0429, 0x19c0, 0xa897, 0x4005, 0xa99a, 0x0010,
-	0xa897, 0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x00ce,
-	0x0005, 0x9006, 0x0ce0, 0x7aa8, 0xd2dc, 0x0904, 0x3563, 0x0016,
-	0x7984, 0x9284, 0x1000, 0xc0fd, 0x080c, 0x569a, 0x001e, 0x1904,
-	0x3563, 0x0804, 0x3531, 0x00f6, 0x2d78, 0x0011, 0x00fe, 0x0005,
-	0xaab0, 0xd2dc, 0x0150, 0x0016, 0xa998, 0x9284, 0x1000, 0xc0fd,
-	0x080c, 0x569a, 0x001e, 0x9085, 0x0001, 0x0005, 0x81ff, 0x0120,
-	0x2009, 0x0001, 0x0804, 0x3563, 0x080c, 0x56f6, 0x0120, 0x2009,
-	0x0007, 0x0804, 0x3563, 0x7984, 0x7ea8, 0x96b4, 0x00ff, 0x080c,
-	0x6616, 0x1904, 0x3566, 0x9186, 0x007f, 0x0138, 0x080c, 0x6989,
-	0x0120, 0x2009, 0x0009, 0x0804, 0x3563, 0x080c, 0x4abe, 0x1120,
-	0x2009, 0x0002, 0x0804, 0x3563, 0xa867, 0x0000, 0xa868, 0xc0fd,
-	0xa86a, 0x2001, 0x0100, 0x8007, 0xa80a, 0x080c, 0xcd3d, 0x1120,
-	0x2009, 0x0003, 0x0804, 0x3563, 0x7007, 0x0003, 0x701f, 0x54d9,
-	0x0005, 0xa808, 0x8007, 0x9086, 0x0100, 0x1120, 0x2009, 0x0004,
-	0x0804, 0x3563, 0xa8e0, 0xa866, 0xa810, 0x8007, 0x9084, 0x00ff,
-	0x800c, 0xa814, 0x8007, 0x9084, 0x00ff, 0x8004, 0x9080, 0x0002,
-	0x9108, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0,
-	0x9080, 0x0004, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x0804, 0x4b0a,
-	0x080c, 0x4abe, 0x1120, 0x2009, 0x0002, 0x0804, 0x3563, 0x7984,
-	0x9194, 0xff00, 0x918c, 0x00ff, 0x8217, 0x82ff, 0x1118, 0x7023,
-	0x19b2, 0x0040, 0x92c6, 0x0001, 0x1118, 0x7023, 0x19cc, 0x0010,
-	0x0804, 0x3566, 0x2009, 0x001a, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98,
-	0xa85c, 0x9080, 0x0019, 0xaf60, 0x080c, 0x4b07, 0x701f, 0x5529,
-	0x0005, 0x2001, 0x182e, 0x2003, 0x0001, 0xa85c, 0x9080, 0x0019,
-	0x2098, 0xa860, 0x20e0, 0x20a9, 0x001a, 0x7020, 0x20a0, 0x20e9,
-	0x0001, 0x4003, 0x0804, 0x3531, 0x080c, 0x4abe, 0x1120, 0x2009,
-	0x0002, 0x0804, 0x3563, 0x7984, 0x9194, 0xff00, 0x918c, 0x00ff,
-	0x8217, 0x82ff, 0x1118, 0x2099, 0x19b2, 0x0040, 0x92c6, 0x0001,
-	0x1118, 0x2099, 0x19cc, 0x0010, 0x0804, 0x3566, 0xa85c, 0x9080,
-	0x0019, 0x20a0, 0xa860, 0x20e8, 0x20a9, 0x001a, 0x20e1, 0x0001,
-	0x4003, 0x2009, 0x001a, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0xa85c,
-	0x9080, 0x0019, 0xaf60, 0x0804, 0x4b0a, 0x7884, 0x908a, 0x1000,
-	0x1a04, 0x3566, 0x0126, 0x2091, 0x8000, 0x8003, 0x800b, 0x810b,
-	0x9108, 0x00c6, 0x2061, 0x19f9, 0x6142, 0x00ce, 0x012e, 0x0804,
-	0x3531, 0x00c6, 0x080c, 0x73b3, 0x1160, 0x080c, 0x7699, 0x080c,
-	0x602d, 0x9085, 0x0001, 0x080c, 0x73fa, 0x080c, 0x72e5, 0x080c,
-	0x0dd5, 0x2061, 0x1800, 0x6030, 0xc09d, 0x6032, 0x080c, 0x5eec,
-	0x00ce, 0x0005, 0x00c6, 0x2001, 0x1800, 0x2004, 0x908e, 0x0000,
-	0x0904, 0x3563, 0x7884, 0x9005, 0x0188, 0x7888, 0x2061, 0x199b,
-	0x2c0c, 0x2062, 0x080c, 0x2c2d, 0x01a0, 0x080c, 0x2c35, 0x0188,
-	0x080c, 0x2c3d, 0x0170, 0x2162, 0x0804, 0x3566, 0x2061, 0x0100,
-	0x6038, 0x9086, 0x0007, 0x1118, 0x2009, 0x0001, 0x0010, 0x2009,
-	0x0000, 0x7884, 0x9086, 0x0002, 0x1548, 0x2061, 0x0100, 0x6028,
-	0xc09c, 0x602a, 0x0026, 0x2011, 0x0003, 0x080c, 0xa63e, 0x2011,
-	0x0002, 0x080c, 0xa648, 0x002e, 0x080c, 0xa552, 0x0036, 0x901e,
-	0x080c, 0xa5c8, 0x003e, 0x60e3, 0x0000, 0x080c, 0xea24, 0x080c,
-	0xea3f, 0x9085, 0x0001, 0x080c, 0x73fa, 0x9006, 0x080c, 0x2cfc,
-	0x2001, 0x1800, 0x2003, 0x0004, 0x6027, 0x0008, 0x00ce, 0x0804,
-	0x3531, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x3563, 0x080c,
-	0x56f6, 0x0120, 0x2009, 0x0007, 0x0804, 0x3563, 0x7984, 0x7ea8,
-	0x96b4, 0x00ff, 0x080c, 0x6616, 0x1904, 0x3566, 0x9186, 0x007f,
-	0x0138, 0x080c, 0x6989, 0x0120, 0x2009, 0x0009, 0x0804, 0x3563,
-	0x080c, 0x4abe, 0x1120, 0x2009, 0x0002, 0x0804, 0x3563, 0xa867,
-	0x0000, 0xa868, 0xc0fd, 0xa86a, 0x080c, 0xcd40, 0x1120, 0x2009,
-	0x0003, 0x0804, 0x3563, 0x7007, 0x0003, 0x701f, 0x5628, 0x0005,
-	0xa830, 0x9086, 0x0100, 0x1120, 0x2009, 0x0004, 0x0804, 0x3563,
-	0xa8e0, 0xa866, 0xa834, 0x8007, 0x800c, 0xa85c, 0x9080, 0x000c,
-	0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0xaf60, 0x0804, 0x4b0a, 0xa898,
-	0x9086, 0x000d, 0x1904, 0x3563, 0x2021, 0x4005, 0x0126, 0x2091,
-	0x8000, 0x0e04, 0x564c, 0x0010, 0x012e, 0x0cc0, 0x7c36, 0x9486,
-	0x4000, 0x0118, 0x7833, 0x0011, 0x0010, 0x7833, 0x0010, 0x7883,
-	0x4005, 0xa998, 0x7986, 0xa9a4, 0x799a, 0xa9a8, 0x799e, 0x080c,
-	0x4afa, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c,
-	0x119b, 0x7007, 0x0001, 0x2091, 0x5000, 0x700f, 0x0000, 0x012e,
-	0x0005, 0x0126, 0x2091, 0x8000, 0x00c6, 0x2061, 0x19f9, 0x7984,
-	0x6152, 0x614e, 0x6057, 0x0000, 0x604b, 0x0009, 0x7898, 0x606a,
-	0x789c, 0x6066, 0x7888, 0x6062, 0x788c, 0x605e, 0x2001, 0x1a07,
-	0x2044, 0x2001, 0x1a0e, 0xa076, 0xa060, 0xa072, 0xa07b, 0x0001,
-	0xa07f, 0x0002, 0xa06b, 0x0000, 0xa09f, 0x0000, 0x00ce, 0x012e,
-	0x0804, 0x3531, 0x0126, 0x2091, 0x8000, 0x00b6, 0x00c6, 0x90e4,
-	0xc000, 0x0128, 0x0006, 0x080c, 0xcba7, 0x000e, 0x1198, 0xd0e4,
-	0x0160, 0x9180, 0x1000, 0x2004, 0x905d, 0x0160, 0x080c, 0x6047,
-	0x080c, 0xadc9, 0x0110, 0xb817, 0x0000, 0x9006, 0x00ce, 0x00be,
-	0x012e, 0x0005, 0x9085, 0x0001, 0x0cc8, 0x0126, 0x2091, 0x8000,
-	0x0156, 0x2010, 0x900e, 0x20a9, 0x0800, 0x0016, 0x9180, 0x1000,
-	0x2004, 0x9005, 0x0180, 0x9186, 0x007e, 0x0168, 0x9186, 0x007f,
-	0x0150, 0x9186, 0x0080, 0x0138, 0x9186, 0x00ff, 0x0120, 0x0026,
-	0x2200, 0x0801, 0x002e, 0x001e, 0x8108, 0x1f04, 0x56c5, 0x015e,
-	0x012e, 0x0005, 0x2001, 0x1848, 0x2004, 0x0005, 0x2001, 0x1867,
-	0x2004, 0x0005, 0x0006, 0x2001, 0x1810, 0x2004, 0xd0d4, 0x000e,
-	0x0005, 0x2001, 0x180e, 0x2004, 0xd0b4, 0x0005, 0x2001, 0x1800,
-	0x2004, 0x9086, 0x0003, 0x0005, 0x0016, 0x00e6, 0x2071, 0x189e,
-	0x7108, 0x910d, 0x710a, 0x00ee, 0x001e, 0x0005, 0x79a4, 0x9182,
-	0x0081, 0x1a04, 0x3566, 0x810c, 0x0016, 0x080c, 0x4abe, 0x080c,
-	0x0f07, 0x2100, 0x2238, 0x7d84, 0x7c88, 0x7b8c, 0x7a90, 0x001e,
-	0x080c, 0x4b07, 0x701f, 0x571d, 0x0005, 0x2079, 0x0000, 0x7d94,
+	0x35b8, 0xa866, 0xa832, 0xa868, 0xc0fd, 0xa86a, 0x080c, 0x4b52,
+	0x1110, 0x0804, 0x35b8, 0x2009, 0x0043, 0x080c, 0xd16b, 0x2009,
+	0x0003, 0x0904, 0x54e7, 0x7007, 0x0003, 0x701f, 0x5478, 0x0005,
+	0xa830, 0x9086, 0x0100, 0x2009, 0x0004, 0x0904, 0x54e7, 0x7984,
+	0x7aa8, 0x9284, 0x1000, 0xe085, 0x080c, 0x570c, 0x0804, 0x3583,
+	0x00c6, 0xaab0, 0x9284, 0xc000, 0x0148, 0xd2ec, 0x0170, 0x080c,
+	0x5771, 0x1158, 0x2009, 0x0014, 0x0804, 0x54d6, 0x2061, 0x1800,
+	0x080c, 0x5771, 0x2009, 0x0007, 0x15c8, 0xd2f4, 0x0130, 0x9284,
+	0x5000, 0xc0d5, 0x080c, 0x5737, 0x0058, 0xd2fc, 0x0180, 0x080c,
+	0x4b50, 0x0590, 0xa998, 0x9284, 0x9000, 0xc0d5, 0x080c, 0x570c,
+	0xa87b, 0x0000, 0xa883, 0x0000, 0xa897, 0x4000, 0x0438, 0x080c,
+	0x4b50, 0x0510, 0x080c, 0x6a0c, 0x2009, 0x0009, 0x11b8, 0xa8c4,
+	0x9086, 0x0500, 0x11c8, 0xa8c8, 0x9005, 0x11b0, 0xa8cc, 0x9084,
+	0xff00, 0x1190, 0x080c, 0x4b50, 0x1108, 0x0070, 0x2009, 0x004b,
+	0x080c, 0xd16b, 0x2009, 0x0003, 0x0108, 0x0078, 0x0431, 0x19c0,
+	0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006, 0x900e, 0x9085,
+	0x0001, 0x2001, 0x0030, 0x00ce, 0x0005, 0x9006, 0x0ce0, 0x7aa8,
+	0xd2dc, 0x0904, 0x35b5, 0x0016, 0x7984, 0x9284, 0x1000, 0xc0fd,
+	0x080c, 0x570c, 0x001e, 0x1904, 0x35b5, 0x0804, 0x3583, 0x00f6,
+	0x2d78, 0xaab0, 0x0021, 0x00fe, 0x0005, 0xaab0, 0xc2d5, 0xd2dc,
+	0x0150, 0x0016, 0xa998, 0x9284, 0x1400, 0xc0fd, 0x080c, 0x570c,
+	0x001e, 0x9085, 0x0001, 0x0005, 0x81ff, 0x0120, 0x2009, 0x0001,
+	0x0804, 0x35b5, 0x080c, 0x5771, 0x0120, 0x2009, 0x0007, 0x0804,
+	0x35b5, 0x7984, 0x7ea8, 0x96b4, 0x00ff, 0x080c, 0x6699, 0x1904,
+	0x35b8, 0x9186, 0x007f, 0x0138, 0x080c, 0x6a0c, 0x0120, 0x2009,
+	0x0009, 0x0804, 0x35b5, 0x080c, 0x4b1f, 0x1120, 0x2009, 0x0002,
+	0x0804, 0x35b5, 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, 0x2001,
+	0x0100, 0x8007, 0xa80a, 0x080c, 0xce6b, 0x1120, 0x2009, 0x0003,
+	0x0804, 0x35b5, 0x7007, 0x0003, 0x701f, 0x5547, 0x0005, 0xa808,
+	0x8007, 0x9086, 0x0100, 0x1120, 0x2009, 0x0004, 0x0804, 0x35b5,
+	0xa8e0, 0xa866, 0xa810, 0x8007, 0x9084, 0x00ff, 0x800c, 0xa814,
+	0x8007, 0x9084, 0x00ff, 0x8004, 0x9080, 0x0002, 0x9108, 0x8906,
+	0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0004,
+	0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x0804, 0x4b6b, 0x080c, 0x4b1f,
+	0x1120, 0x2009, 0x0002, 0x0804, 0x35b5, 0x7984, 0x9194, 0xff00,
+	0x918c, 0x00ff, 0x8217, 0x82ff, 0x1118, 0x7023, 0x19b2, 0x0040,
+	0x92c6, 0x0001, 0x1118, 0x7023, 0x19cc, 0x0010, 0x0804, 0x35b8,
+	0x2009, 0x001a, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0xa85c, 0x9080,
+	0x0019, 0xaf60, 0x080c, 0x4b68, 0x701f, 0x5597, 0x0005, 0x2001,
+	0x182e, 0x2003, 0x0001, 0xa85c, 0x9080, 0x0019, 0x2098, 0xa860,
+	0x20e0, 0x20a9, 0x001a, 0x7020, 0x20a0, 0x20e9, 0x0001, 0x4003,
+	0x0804, 0x3583, 0x080c, 0x4b1f, 0x1120, 0x2009, 0x0002, 0x0804,
+	0x35b5, 0x7984, 0x9194, 0xff00, 0x918c, 0x00ff, 0x8217, 0x82ff,
+	0x1118, 0x2099, 0x19b2, 0x0040, 0x92c6, 0x0001, 0x1118, 0x2099,
+	0x19cc, 0x0010, 0x0804, 0x35b8, 0xa85c, 0x9080, 0x0019, 0x20a0,
+	0xa860, 0x20e8, 0x20a9, 0x001a, 0x20e1, 0x0001, 0x4003, 0x2009,
+	0x001a, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0xa85c, 0x9080, 0x0019,
+	0xaf60, 0x0804, 0x4b6b, 0x7884, 0x908a, 0x1000, 0x1a04, 0x35b8,
+	0x0126, 0x2091, 0x8000, 0x8003, 0x800b, 0x810b, 0x9108, 0x00c6,
+	0x2061, 0x19f9, 0x6142, 0x00ce, 0x012e, 0x0804, 0x3583, 0x00c6,
+	0x080c, 0x743e, 0x1160, 0x080c, 0x7724, 0x080c, 0x60ad, 0x9085,
+	0x0001, 0x080c, 0x7485, 0x080c, 0x736a, 0x080c, 0x0dd5, 0x2061,
+	0x1800, 0x6030, 0xc09d, 0x6032, 0x080c, 0x5f6c, 0x00ce, 0x0005,
+	0x00c6, 0x2001, 0x1800, 0x2004, 0x908e, 0x0000, 0x0904, 0x35b5,
+	0x7884, 0x9005, 0x0188, 0x7888, 0x2061, 0x199b, 0x2c0c, 0x2062,
+	0x080c, 0x2c5e, 0x01a0, 0x080c, 0x2c66, 0x0188, 0x080c, 0x2c6e,
+	0x0170, 0x2162, 0x0804, 0x35b8, 0x2061, 0x0100, 0x6038, 0x9086,
+	0x0007, 0x1118, 0x2009, 0x0001, 0x0010, 0x2009, 0x0000, 0x7884,
+	0x9086, 0x0002, 0x1568, 0x2061, 0x0100, 0x6028, 0xc09c, 0x602a,
+	0x0026, 0x2011, 0x0003, 0x080c, 0xa722, 0x2011, 0x0002, 0x080c,
+	0xa72c, 0x002e, 0x080c, 0xa636, 0x0036, 0x901e, 0x080c, 0xa6ac,
+	0x003e, 0x60e3, 0x0000, 0x080c, 0xeb79, 0x080c, 0xeb94, 0x9085,
+	0x0001, 0x080c, 0x7485, 0x9006, 0x080c, 0x2d4e, 0x2001, 0x1800,
+	0x2003, 0x0004, 0x2001, 0x19a6, 0x2003, 0x0000, 0x6027, 0x0008,
+	0x00ce, 0x0804, 0x3583, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804,
+	0x35b5, 0x080c, 0x5771, 0x0120, 0x2009, 0x0007, 0x0804, 0x35b5,
+	0x7984, 0x7ea8, 0x96b4, 0x00ff, 0x080c, 0x6699, 0x1904, 0x35b8,
+	0x9186, 0x007f, 0x0138, 0x080c, 0x6a0c, 0x0120, 0x2009, 0x0009,
+	0x0804, 0x35b5, 0x080c, 0x4b1f, 0x1120, 0x2009, 0x0002, 0x0804,
+	0x35b5, 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, 0x080c, 0xce6e,
+	0x1120, 0x2009, 0x0003, 0x0804, 0x35b5, 0x7007, 0x0003, 0x701f,
+	0x569a, 0x0005, 0xa830, 0x9086, 0x0100, 0x1120, 0x2009, 0x0004,
+	0x0804, 0x35b5, 0xa8e0, 0xa866, 0xa834, 0x8007, 0x800c, 0xa85c,
+	0x9080, 0x000c, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0xaf60, 0x0804,
+	0x4b6b, 0xa898, 0x9086, 0x000d, 0x1904, 0x35b5, 0x2021, 0x4005,
+	0x0126, 0x2091, 0x8000, 0x0e04, 0x56be, 0x0010, 0x012e, 0x0cc0,
+	0x7c36, 0x9486, 0x4000, 0x0118, 0x7833, 0x0011, 0x0010, 0x7833,
+	0x0010, 0x7883, 0x4005, 0xa998, 0x7986, 0xa9a4, 0x799a, 0xa9a8,
+	0x799e, 0x080c, 0x4b5b, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004,
+	0xd084, 0x190c, 0x119b, 0x7007, 0x0001, 0x2091, 0x5000, 0x700f,
+	0x0000, 0x012e, 0x0005, 0x0126, 0x2091, 0x8000, 0x00c6, 0x2061,
+	0x19f9, 0x7984, 0x6152, 0x614e, 0x6057, 0x0000, 0x604b, 0x0009,
+	0x7898, 0x606a, 0x789c, 0x6066, 0x7888, 0x6062, 0x788c, 0x605e,
+	0x2001, 0x1a07, 0x2044, 0x2001, 0x1a0e, 0xa076, 0xa060, 0xa072,
+	0xa07b, 0x0001, 0xa07f, 0x0002, 0xa06b, 0x0000, 0xa09f, 0x0000,
+	0x00ce, 0x012e, 0x0804, 0x3583, 0x0126, 0x2091, 0x8000, 0x00b6,
+	0x00c6, 0x90e4, 0xc000, 0x0168, 0x0006, 0xd0d4, 0x0130, 0x0036,
+	0x2019, 0x0029, 0x080c, 0x3338, 0x003e, 0x080c, 0xccd3, 0x000e,
+	0x1198, 0xd0e4, 0x0160, 0x9180, 0x1000, 0x2004, 0x905d, 0x0160,
+	0x080c, 0x60c7, 0x080c, 0xaead, 0x0110, 0xb817, 0x0000, 0x9006,
+	0x00ce, 0x00be, 0x012e, 0x0005, 0x9085, 0x0001, 0x0cc8, 0x0126,
+	0x2091, 0x8000, 0x0156, 0x2010, 0x900e, 0x20a9, 0x0800, 0x0016,
+	0x9180, 0x1000, 0x2004, 0x9005, 0x0188, 0x9186, 0x007e, 0x0170,
+	0x9186, 0x007f, 0x0158, 0x9186, 0x0080, 0x0140, 0x9186, 0x00ff,
+	0x0128, 0x0026, 0x2200, 0x080c, 0x570c, 0x002e, 0x001e, 0x8108,
+	0x1f04, 0x573f, 0x015e, 0x012e, 0x0005, 0x2001, 0x1848, 0x2004,
+	0x0005, 0x2001, 0x1867, 0x2004, 0x0005, 0x0006, 0x2001, 0x1810,
+	0x2004, 0xd0d4, 0x000e, 0x0005, 0x2001, 0x180e, 0x2004, 0xd0b4,
+	0x0005, 0x2001, 0x1800, 0x2004, 0x9086, 0x0003, 0x0005, 0x0016,
+	0x00e6, 0x2071, 0x189e, 0x7108, 0x910d, 0x710a, 0x00ee, 0x001e,
+	0x0005, 0x79a4, 0x9182, 0x0081, 0x1a04, 0x35b8, 0x810c, 0x0016,
+	0x080c, 0x4b1f, 0x0170, 0x080c, 0x0f07, 0x2100, 0x2238, 0x7d84,
+	0x7c88, 0x7b8c, 0x7a90, 0x001e, 0x080c, 0x4b68, 0x701f, 0x579d,
+	0x0005, 0x2009, 0x0002, 0x0804, 0x35b5, 0x2079, 0x0000, 0x7d94,
 	0x7c98, 0x7ba8, 0x7aac, 0x79a4, 0x810c, 0x2061, 0x18b8, 0x2c44,
-	0xa770, 0xa074, 0x2071, 0x189e, 0x080c, 0x4b0a, 0x701f, 0x5731,
+	0xa770, 0xa074, 0x2071, 0x189e, 0x080c, 0x4b6b, 0x701f, 0x57b1,
 	0x0005, 0x2061, 0x18b8, 0x2c44, 0x0016, 0x0026, 0xa270, 0xa174,
 	0x080c, 0x0f0f, 0x002e, 0x001e, 0x080c, 0x0fbc, 0x9006, 0xa802,
-	0xa806, 0x0804, 0x3531, 0x0126, 0x0156, 0x0136, 0x0146, 0x01c6,
+	0xa806, 0x0804, 0x3583, 0x0126, 0x0156, 0x0136, 0x0146, 0x01c6,
 	0x01d6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x2061, 0x0100, 0x2069,
 	0x0200, 0x2071, 0x1800, 0x6044, 0xd0a4, 0x11e8, 0xd084, 0x0118,
-	0x080c, 0x58ec, 0x0068, 0xd08c, 0x0118, 0x080c, 0x57f5, 0x0040,
-	0xd094, 0x0118, 0x080c, 0x57c5, 0x0018, 0xd09c, 0x0108, 0x0099,
+	0x080c, 0x596c, 0x0068, 0xd08c, 0x0118, 0x080c, 0x5875, 0x0040,
+	0xd094, 0x0118, 0x080c, 0x5845, 0x0018, 0xd09c, 0x0108, 0x0099,
 	0x00fe, 0x00ee, 0x00de, 0x00ce, 0x01de, 0x01ce, 0x014e, 0x013e,
 	0x015e, 0x012e, 0x0005, 0x0016, 0x6128, 0xd19c, 0x1110, 0xc19d,
 	0x612a, 0x001e, 0x0c68, 0x0006, 0x7098, 0x9005, 0x000e, 0x0120,
@@ -2598,215 +2614,215 @@
 	0x6048, 0x9086, 0xf0f0, 0x0130, 0x624a, 0x6043, 0x0090, 0x6043,
 	0x0010, 0x0490, 0x9294, 0xff00, 0x9296, 0xf700, 0x0178, 0x7138,
 	0xd1a4, 0x1160, 0x6240, 0x9295, 0x0100, 0x6242, 0x9294, 0x0010,
-	0x0128, 0x2009, 0x00f7, 0x080c, 0x5fa9, 0x00f0, 0x6040, 0x9084,
+	0x0128, 0x2009, 0x00f7, 0x080c, 0x6029, 0x00f0, 0x6040, 0x9084,
 	0x0010, 0x9085, 0x0140, 0x6042, 0x6043, 0x0000, 0x7087, 0x0000,
 	0x70a3, 0x0001, 0x70c7, 0x0000, 0x70df, 0x0000, 0x2009, 0x1c80,
 	0x200b, 0x0000, 0x7097, 0x0000, 0x708b, 0x000f, 0x2009, 0x000f,
-	0x2011, 0x5e8f, 0x080c, 0x8591, 0x0005, 0x2001, 0x1869, 0x2004,
+	0x2011, 0x5f0f, 0x080c, 0x8648, 0x0005, 0x2001, 0x1869, 0x2004,
 	0xd08c, 0x0110, 0x705f, 0xffff, 0x7088, 0x9005, 0x1528, 0x2011,
-	0x5e8f, 0x080c, 0x84f9, 0x6040, 0x9094, 0x0010, 0x9285, 0x0020,
-	0x6042, 0x20a9, 0x00c8, 0x6044, 0xd08c, 0x1168, 0x1f04, 0x57db,
+	0x5f0f, 0x080c, 0x85b0, 0x6040, 0x9094, 0x0010, 0x9285, 0x0020,
+	0x6042, 0x20a9, 0x00c8, 0x6044, 0xd08c, 0x1168, 0x1f04, 0x585b,
 	0x6242, 0x709b, 0x0000, 0x6040, 0x9094, 0x0010, 0x9285, 0x0080,
 	0x6042, 0x6242, 0x0048, 0x6242, 0x709b, 0x0000, 0x708f, 0x0000,
-	0x9006, 0x080c, 0x6032, 0x0000, 0x0005, 0x708c, 0x908a, 0x0003,
-	0x1a0c, 0x0dd5, 0x000b, 0x0005, 0x57ff, 0x5850, 0x58eb, 0x00f6,
+	0x9006, 0x080c, 0x60b2, 0x0000, 0x0005, 0x708c, 0x908a, 0x0003,
+	0x1a0c, 0x0dd5, 0x000b, 0x0005, 0x587f, 0x58d0, 0x596b, 0x00f6,
 	0x0016, 0x6900, 0x918c, 0x0800, 0x708f, 0x0001, 0x2001, 0x015d,
 	0x2003, 0x0000, 0x6803, 0x00fc, 0x20a9, 0x0004, 0x6800, 0x9084,
-	0x00fc, 0x0120, 0x1f04, 0x580e, 0x080c, 0x0dd5, 0x68a0, 0x68a2,
+	0x00fc, 0x0120, 0x1f04, 0x588e, 0x080c, 0x0dd5, 0x68a0, 0x68a2,
 	0x689c, 0x689e, 0x6898, 0x689a, 0xa001, 0x918d, 0x1600, 0x6902,
-	0x001e, 0x6837, 0x0020, 0x080c, 0x600e, 0x2079, 0x1c00, 0x7833,
+	0x001e, 0x6837, 0x0020, 0x080c, 0x608e, 0x2079, 0x1c00, 0x7833,
 	0x1101, 0x7837, 0x0000, 0x20e1, 0x0001, 0x2099, 0x1805, 0x20e9,
-	0x0001, 0x20a1, 0x1c0e, 0x20a9, 0x0004, 0x4003, 0x080c, 0xab1a,
+	0x0001, 0x20a1, 0x1c0e, 0x20a9, 0x0004, 0x4003, 0x080c, 0xabfe,
 	0x20e1, 0x0001, 0x2099, 0x1c00, 0x20e9, 0x0000, 0x20a1, 0x0240,
 	0x20a9, 0x0014, 0x4003, 0x60c3, 0x000c, 0x600f, 0x0000, 0x080c,
-	0x5ec0, 0x00fe, 0x9006, 0x7092, 0x6043, 0x0008, 0x6042, 0x0005,
-	0x00f6, 0x7090, 0x7093, 0x0000, 0x9025, 0x0904, 0x58c8, 0x6020,
-	0xd0b4, 0x1904, 0x58c6, 0x71a0, 0x81ff, 0x0904, 0x58b4, 0x9486,
-	0x000c, 0x1904, 0x58c1, 0x9480, 0x0018, 0x8004, 0x20a8, 0x080c,
-	0x6007, 0x2011, 0x0260, 0x2019, 0x1c00, 0x220c, 0x2304, 0x9106,
-	0x11e8, 0x8210, 0x8318, 0x1f04, 0x586d, 0x6043, 0x0004, 0x2061,
+	0x5f40, 0x00fe, 0x9006, 0x7092, 0x6043, 0x0008, 0x6042, 0x0005,
+	0x00f6, 0x7090, 0x7093, 0x0000, 0x9025, 0x0904, 0x5948, 0x6020,
+	0xd0b4, 0x1904, 0x5946, 0x71a0, 0x81ff, 0x0904, 0x5934, 0x9486,
+	0x000c, 0x1904, 0x5941, 0x9480, 0x0018, 0x8004, 0x20a8, 0x080c,
+	0x6087, 0x2011, 0x0260, 0x2019, 0x1c00, 0x220c, 0x2304, 0x9106,
+	0x11e8, 0x8210, 0x8318, 0x1f04, 0x58ed, 0x6043, 0x0004, 0x2061,
 	0x0140, 0x605b, 0xbc94, 0x605f, 0xf0f0, 0x2061, 0x0100, 0x6043,
 	0x0006, 0x708f, 0x0002, 0x709b, 0x0002, 0x2009, 0x07d0, 0x2011,
-	0x5e96, 0x080c, 0x8591, 0x080c, 0x600e, 0x04c0, 0x080c, 0x6007,
+	0x5f16, 0x080c, 0x8648, 0x080c, 0x608e, 0x04c0, 0x080c, 0x6087,
 	0x2079, 0x0260, 0x7930, 0x918e, 0x1101, 0x1558, 0x7834, 0x9005,
 	0x1540, 0x7900, 0x918c, 0x00ff, 0x1118, 0x7804, 0x9005, 0x0190,
-	0x080c, 0x6007, 0x2011, 0x026e, 0x2019, 0x1805, 0x20a9, 0x0004,
+	0x080c, 0x6087, 0x2011, 0x026e, 0x2019, 0x1805, 0x20a9, 0x0004,
 	0x220c, 0x2304, 0x9102, 0x0230, 0x11a0, 0x8210, 0x8318, 0x1f04,
-	0x58a8, 0x0078, 0x70a3, 0x0000, 0x080c, 0x6007, 0x20e1, 0x0000,
+	0x5928, 0x0078, 0x70a3, 0x0000, 0x080c, 0x6087, 0x20e1, 0x0000,
 	0x2099, 0x0260, 0x20e9, 0x0001, 0x20a1, 0x1c00, 0x20a9, 0x0014,
 	0x4003, 0x6043, 0x0008, 0x6043, 0x0000, 0x0010, 0x00fe, 0x0005,
 	0x6040, 0x9085, 0x0100, 0x6042, 0x6020, 0xd0b4, 0x1db8, 0x080c,
-	0xab1a, 0x20e1, 0x0001, 0x2099, 0x1c00, 0x20e9, 0x0000, 0x20a1,
+	0xabfe, 0x20e1, 0x0001, 0x2099, 0x1c00, 0x20e9, 0x0000, 0x20a1,
 	0x0240, 0x20a9, 0x0014, 0x4003, 0x60c3, 0x000c, 0x2011, 0x19f0,
 	0x2013, 0x0000, 0x7093, 0x0000, 0x60a3, 0x0056, 0x60a7, 0x9575,
-	0x080c, 0xa286, 0x08d8, 0x0005, 0x7098, 0x908a, 0x001d, 0x1a0c,
-	0x0dd5, 0x000b, 0x0005, 0x591d, 0x5930, 0x5959, 0x5979, 0x599f,
-	0x59ce, 0x59f4, 0x5a2c, 0x5a52, 0x5a80, 0x5abb, 0x5af3, 0x5b11,
-	0x5b3c, 0x5b5e, 0x5b79, 0x5b83, 0x5bb7, 0x5bdd, 0x5c0c, 0x5c32,
-	0x5c6a, 0x5cae, 0x5ceb, 0x5d0c, 0x5d65, 0x5d87, 0x5db5, 0x5db5,
+	0x080c, 0xa34d, 0x08d8, 0x0005, 0x7098, 0x908a, 0x001d, 0x1a0c,
+	0x0dd5, 0x000b, 0x0005, 0x599d, 0x59b0, 0x59d9, 0x59f9, 0x5a1f,
+	0x5a4e, 0x5a74, 0x5aac, 0x5ad2, 0x5b00, 0x5b3b, 0x5b73, 0x5b91,
+	0x5bbc, 0x5bde, 0x5bf9, 0x5c03, 0x5c37, 0x5c5d, 0x5c8c, 0x5cb2,
+	0x5cea, 0x5d2e, 0x5d6b, 0x5d8c, 0x5de5, 0x5e07, 0x5e35, 0x5e35,
 	0x00c6, 0x2061, 0x1800, 0x6003, 0x0007, 0x2061, 0x0100, 0x6004,
 	0x9084, 0xfff9, 0x6006, 0x00ce, 0x0005, 0x2061, 0x0140, 0x605b,
 	0xbc94, 0x605f, 0xf0f0, 0x2061, 0x0100, 0x6043, 0x0002, 0x709b,
-	0x0001, 0x2009, 0x07d0, 0x2011, 0x5e96, 0x080c, 0x8591, 0x0005,
+	0x0001, 0x2009, 0x07d0, 0x2011, 0x5f16, 0x080c, 0x8648, 0x0005,
 	0x00f6, 0x7090, 0x9086, 0x0014, 0x1510, 0x6042, 0x6020, 0xd0b4,
-	0x11f0, 0x080c, 0x6007, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1102,
+	0x11f0, 0x080c, 0x6087, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1102,
 	0x11a0, 0x7834, 0x9005, 0x1188, 0x7a38, 0xd2fc, 0x0128, 0x70c4,
-	0x9005, 0x1110, 0x70c7, 0x0001, 0x2011, 0x5e96, 0x080c, 0x84f9,
-	0x709b, 0x0010, 0x080c, 0x5b83, 0x0010, 0x7093, 0x0000, 0x00fe,
-	0x0005, 0x00f6, 0x709b, 0x0003, 0x6043, 0x0004, 0x2011, 0x5e96,
-	0x080c, 0x84f9, 0x080c, 0x5f8b, 0x2079, 0x0240, 0x7833, 0x1102,
+	0x9005, 0x1110, 0x70c7, 0x0001, 0x2011, 0x5f16, 0x080c, 0x85b0,
+	0x709b, 0x0010, 0x080c, 0x5c03, 0x0010, 0x7093, 0x0000, 0x00fe,
+	0x0005, 0x00f6, 0x709b, 0x0003, 0x6043, 0x0004, 0x2011, 0x5f16,
+	0x080c, 0x85b0, 0x080c, 0x600b, 0x2079, 0x0240, 0x7833, 0x1102,
 	0x7837, 0x0000, 0x20a9, 0x0008, 0x9f88, 0x000e, 0x200b, 0x0000,
-	0x8108, 0x1f04, 0x596e, 0x60c3, 0x0014, 0x080c, 0x5ec0, 0x00fe,
-	0x0005, 0x00f6, 0x7090, 0x9005, 0x0500, 0x2011, 0x5e96, 0x080c,
-	0x84f9, 0x9086, 0x0014, 0x11b8, 0x080c, 0x6007, 0x2079, 0x0260,
+	0x8108, 0x1f04, 0x59ee, 0x60c3, 0x0014, 0x080c, 0x5f40, 0x00fe,
+	0x0005, 0x00f6, 0x7090, 0x9005, 0x0500, 0x2011, 0x5f16, 0x080c,
+	0x85b0, 0x9086, 0x0014, 0x11b8, 0x080c, 0x6087, 0x2079, 0x0260,
 	0x7a30, 0x9296, 0x1102, 0x1178, 0x7834, 0x9005, 0x1160, 0x7a38,
 	0xd2fc, 0x0128, 0x70c4, 0x9005, 0x1110, 0x70c7, 0x0001, 0x709b,
-	0x0004, 0x0029, 0x0010, 0x080c, 0x5fe3, 0x00fe, 0x0005, 0x00f6,
-	0x709b, 0x0005, 0x080c, 0x5f8b, 0x2079, 0x0240, 0x7833, 0x1103,
-	0x7837, 0x0000, 0x080c, 0x6007, 0x080c, 0x5fea, 0x1170, 0x7084,
+	0x0004, 0x0029, 0x0010, 0x080c, 0x6063, 0x00fe, 0x0005, 0x00f6,
+	0x709b, 0x0005, 0x080c, 0x600b, 0x2079, 0x0240, 0x7833, 0x1103,
+	0x7837, 0x0000, 0x080c, 0x6087, 0x080c, 0x606a, 0x1170, 0x7084,
 	0x9005, 0x1158, 0x715c, 0x9186, 0xffff, 0x0138, 0x2011, 0x0008,
-	0x080c, 0x5e43, 0x0168, 0x080c, 0x5fc0, 0x20a9, 0x0008, 0x20e1,
+	0x080c, 0x5ec3, 0x0168, 0x080c, 0x6040, 0x20a9, 0x0008, 0x20e1,
 	0x0000, 0x2099, 0x026e, 0x20e9, 0x0000, 0x20a1, 0x024e, 0x4003,
-	0x60c3, 0x0014, 0x080c, 0x5ec0, 0x00fe, 0x0005, 0x00f6, 0x7090,
-	0x9005, 0x0500, 0x2011, 0x5e96, 0x080c, 0x84f9, 0x9086, 0x0014,
-	0x11b8, 0x080c, 0x6007, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1103,
+	0x60c3, 0x0014, 0x080c, 0x5f40, 0x00fe, 0x0005, 0x00f6, 0x7090,
+	0x9005, 0x0500, 0x2011, 0x5f16, 0x080c, 0x85b0, 0x9086, 0x0014,
+	0x11b8, 0x080c, 0x6087, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1103,
 	0x1178, 0x7834, 0x9005, 0x1160, 0x7a38, 0xd2fc, 0x0128, 0x70c4,
 	0x9005, 0x1110, 0x70c7, 0x0001, 0x709b, 0x0006, 0x0029, 0x0010,
-	0x080c, 0x5fe3, 0x00fe, 0x0005, 0x00f6, 0x709b, 0x0007, 0x080c,
-	0x5f8b, 0x2079, 0x0240, 0x7833, 0x1104, 0x7837, 0x0000, 0x080c,
-	0x6007, 0x080c, 0x5fea, 0x11b8, 0x7084, 0x9005, 0x11a0, 0x7164,
-	0x9186, 0xffff, 0x0180, 0x9180, 0x3332, 0x200d, 0x918c, 0xff00,
-	0x810f, 0x2011, 0x0008, 0x080c, 0x5e43, 0x0180, 0x080c, 0x4ff4,
-	0x0110, 0x080c, 0x28b4, 0x20a9, 0x0008, 0x20e1, 0x0000, 0x2099,
+	0x080c, 0x6063, 0x00fe, 0x0005, 0x00f6, 0x709b, 0x0007, 0x080c,
+	0x600b, 0x2079, 0x0240, 0x7833, 0x1104, 0x7837, 0x0000, 0x080c,
+	0x6087, 0x080c, 0x606a, 0x11b8, 0x7084, 0x9005, 0x11a0, 0x7164,
+	0x9186, 0xffff, 0x0180, 0x9180, 0x3384, 0x200d, 0x918c, 0xff00,
+	0x810f, 0x2011, 0x0008, 0x080c, 0x5ec3, 0x0180, 0x080c, 0x505a,
+	0x0110, 0x080c, 0x28e5, 0x20a9, 0x0008, 0x20e1, 0x0000, 0x2099,
 	0x026e, 0x20e9, 0x0000, 0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014,
-	0x080c, 0x5ec0, 0x00fe, 0x0005, 0x00f6, 0x7090, 0x9005, 0x0500,
-	0x2011, 0x5e96, 0x080c, 0x84f9, 0x9086, 0x0014, 0x11b8, 0x080c,
-	0x6007, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1104, 0x1178, 0x7834,
+	0x080c, 0x5f40, 0x00fe, 0x0005, 0x00f6, 0x7090, 0x9005, 0x0500,
+	0x2011, 0x5f16, 0x080c, 0x85b0, 0x9086, 0x0014, 0x11b8, 0x080c,
+	0x6087, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1104, 0x1178, 0x7834,
 	0x9005, 0x1160, 0x7a38, 0xd2fc, 0x0128, 0x70c4, 0x9005, 0x1110,
-	0x70c7, 0x0001, 0x709b, 0x0008, 0x0029, 0x0010, 0x080c, 0x5fe3,
-	0x00fe, 0x0005, 0x00f6, 0x709b, 0x0009, 0x080c, 0x5f8b, 0x2079,
-	0x0240, 0x7833, 0x1105, 0x7837, 0x0100, 0x080c, 0x5fea, 0x1150,
-	0x7084, 0x9005, 0x1138, 0x080c, 0x5db6, 0x1188, 0x9085, 0x0001,
-	0x080c, 0x28b4, 0x20a9, 0x0008, 0x080c, 0x6007, 0x20e1, 0x0000,
+	0x70c7, 0x0001, 0x709b, 0x0008, 0x0029, 0x0010, 0x080c, 0x6063,
+	0x00fe, 0x0005, 0x00f6, 0x709b, 0x0009, 0x080c, 0x600b, 0x2079,
+	0x0240, 0x7833, 0x1105, 0x7837, 0x0100, 0x080c, 0x606a, 0x1150,
+	0x7084, 0x9005, 0x1138, 0x080c, 0x5e36, 0x1188, 0x9085, 0x0001,
+	0x080c, 0x28e5, 0x20a9, 0x0008, 0x080c, 0x6087, 0x20e1, 0x0000,
 	0x2099, 0x026e, 0x20e9, 0x0000, 0x20a1, 0x024e, 0x4003, 0x60c3,
-	0x0014, 0x080c, 0x5ec0, 0x0010, 0x080c, 0x5910, 0x00fe, 0x0005,
-	0x00f6, 0x7090, 0x9005, 0x05a8, 0x2011, 0x5e96, 0x080c, 0x84f9,
-	0x9086, 0x0014, 0x1560, 0x080c, 0x6007, 0x2079, 0x0260, 0x7a30,
+	0x0014, 0x080c, 0x5f40, 0x0010, 0x080c, 0x5990, 0x00fe, 0x0005,
+	0x00f6, 0x7090, 0x9005, 0x05a8, 0x2011, 0x5f16, 0x080c, 0x85b0,
+	0x9086, 0x0014, 0x1560, 0x080c, 0x6087, 0x2079, 0x0260, 0x7a30,
 	0x9296, 0x1105, 0x1520, 0x7834, 0x9084, 0x0100, 0x2011, 0x0100,
 	0x921e, 0x1160, 0x7a38, 0xd2fc, 0x0128, 0x70c4, 0x9005, 0x1110,
 	0x70c7, 0x0001, 0x709b, 0x000a, 0x00b1, 0x0098, 0x9005, 0x1178,
 	0x7a38, 0xd2fc, 0x0128, 0x70c4, 0x9005, 0x1110, 0x70c7, 0x0001,
-	0x7097, 0x0000, 0x709b, 0x000e, 0x080c, 0x5b5e, 0x0010, 0x080c,
-	0x5fe3, 0x00fe, 0x0005, 0x00f6, 0x709b, 0x000b, 0x2011, 0x1c0e,
+	0x7097, 0x0000, 0x709b, 0x000e, 0x080c, 0x5bde, 0x0010, 0x080c,
+	0x6063, 0x00fe, 0x0005, 0x00f6, 0x709b, 0x000b, 0x2011, 0x1c0e,
 	0x20e9, 0x0001, 0x22a0, 0x20a9, 0x0040, 0x2019, 0xffff, 0x4304,
-	0x080c, 0x5f8b, 0x2079, 0x0240, 0x7833, 0x1106, 0x7837, 0x0000,
-	0x080c, 0x5fea, 0x0118, 0x2013, 0x0000, 0x0020, 0x7060, 0x9085,
+	0x080c, 0x600b, 0x2079, 0x0240, 0x7833, 0x1106, 0x7837, 0x0000,
+	0x080c, 0x606a, 0x0118, 0x2013, 0x0000, 0x0020, 0x7060, 0x9085,
 	0x0100, 0x2012, 0x20a9, 0x0040, 0x2009, 0x024e, 0x2011, 0x1c0e,
 	0x220e, 0x8210, 0x8108, 0x9186, 0x0260, 0x1128, 0x6810, 0x8000,
-	0x6812, 0x2009, 0x0240, 0x1f04, 0x5ae0, 0x60c3, 0x0084, 0x080c,
-	0x5ec0, 0x00fe, 0x0005, 0x00f6, 0x7090, 0x9005, 0x01c0, 0x2011,
-	0x5e96, 0x080c, 0x84f9, 0x9086, 0x0084, 0x1178, 0x080c, 0x6007,
+	0x6812, 0x2009, 0x0240, 0x1f04, 0x5b60, 0x60c3, 0x0084, 0x080c,
+	0x5f40, 0x00fe, 0x0005, 0x00f6, 0x7090, 0x9005, 0x01c0, 0x2011,
+	0x5f16, 0x080c, 0x85b0, 0x9086, 0x0084, 0x1178, 0x080c, 0x6087,
 	0x2079, 0x0260, 0x7a30, 0x9296, 0x1106, 0x1138, 0x7834, 0x9005,
-	0x1120, 0x709b, 0x000c, 0x0029, 0x0010, 0x080c, 0x5fe3, 0x00fe,
-	0x0005, 0x00f6, 0x709b, 0x000d, 0x080c, 0x5f8b, 0x2079, 0x0240,
-	0x7833, 0x1107, 0x7837, 0x0000, 0x080c, 0x6007, 0x20a9, 0x0040,
+	0x1120, 0x709b, 0x000c, 0x0029, 0x0010, 0x080c, 0x6063, 0x00fe,
+	0x0005, 0x00f6, 0x709b, 0x000d, 0x080c, 0x600b, 0x2079, 0x0240,
+	0x7833, 0x1107, 0x7837, 0x0000, 0x080c, 0x6087, 0x20a9, 0x0040,
 	0x2011, 0x026e, 0x2009, 0x024e, 0x220e, 0x8210, 0x8108, 0x9186,
 	0x0260, 0x1150, 0x6810, 0x8000, 0x6812, 0x2009, 0x0240, 0x6814,
-	0x8000, 0x6816, 0x2011, 0x0260, 0x1f04, 0x5b24, 0x60c3, 0x0084,
-	0x080c, 0x5ec0, 0x00fe, 0x0005, 0x00f6, 0x7090, 0x9005, 0x01e0,
-	0x2011, 0x5e96, 0x080c, 0x84f9, 0x9086, 0x0084, 0x1198, 0x080c,
-	0x6007, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1107, 0x1158, 0x7834,
-	0x9005, 0x1140, 0x7097, 0x0001, 0x080c, 0x5f5d, 0x709b, 0x000e,
-	0x0029, 0x0010, 0x080c, 0x5fe3, 0x00fe, 0x0005, 0x918d, 0x0001,
-	0x080c, 0x6032, 0x709b, 0x000f, 0x7093, 0x0000, 0x2061, 0x0140,
+	0x8000, 0x6816, 0x2011, 0x0260, 0x1f04, 0x5ba4, 0x60c3, 0x0084,
+	0x080c, 0x5f40, 0x00fe, 0x0005, 0x00f6, 0x7090, 0x9005, 0x01e0,
+	0x2011, 0x5f16, 0x080c, 0x85b0, 0x9086, 0x0084, 0x1198, 0x080c,
+	0x6087, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1107, 0x1158, 0x7834,
+	0x9005, 0x1140, 0x7097, 0x0001, 0x080c, 0x5fdd, 0x709b, 0x000e,
+	0x0029, 0x0010, 0x080c, 0x6063, 0x00fe, 0x0005, 0x918d, 0x0001,
+	0x080c, 0x60b2, 0x709b, 0x000f, 0x7093, 0x0000, 0x2061, 0x0140,
 	0x605b, 0xbc85, 0x605f, 0xb5b5, 0x2061, 0x0100, 0x6043, 0x0005,
-	0x6043, 0x0004, 0x2009, 0x07d0, 0x2011, 0x5e96, 0x080c, 0x84ed,
-	0x0005, 0x7090, 0x9005, 0x0130, 0x2011, 0x5e96, 0x080c, 0x84f9,
-	0x709b, 0x0000, 0x0005, 0x709b, 0x0011, 0x080c, 0xab1a, 0x080c,
-	0x6007, 0x20e1, 0x0000, 0x2099, 0x0260, 0x20e9, 0x0000, 0x20a1,
+	0x6043, 0x0004, 0x2009, 0x07d0, 0x2011, 0x5f16, 0x080c, 0x85a4,
+	0x0005, 0x7090, 0x9005, 0x0130, 0x2011, 0x5f16, 0x080c, 0x85b0,
+	0x709b, 0x0000, 0x0005, 0x709b, 0x0011, 0x080c, 0xabfe, 0x080c,
+	0x6087, 0x20e1, 0x0000, 0x2099, 0x0260, 0x20e9, 0x0000, 0x20a1,
 	0x0240, 0x7490, 0x9480, 0x0018, 0x9080, 0x0007, 0x9084, 0x03f8,
-	0x8004, 0x20a8, 0x4003, 0x080c, 0x5fea, 0x11a0, 0x717c, 0x81ff,
-	0x0188, 0x900e, 0x7080, 0x9084, 0x00ff, 0x0160, 0x080c, 0x284b,
+	0x8004, 0x20a8, 0x4003, 0x080c, 0x606a, 0x11a0, 0x717c, 0x81ff,
+	0x0188, 0x900e, 0x7080, 0x9084, 0x00ff, 0x0160, 0x080c, 0x287c,
 	0x9186, 0x007e, 0x0138, 0x9186, 0x0080, 0x0120, 0x2011, 0x0008,
-	0x080c, 0x5e43, 0x60c3, 0x0014, 0x080c, 0x5ec0, 0x0005, 0x00f6,
-	0x7090, 0x9005, 0x0500, 0x2011, 0x5e96, 0x080c, 0x84f9, 0x9086,
-	0x0014, 0x11b8, 0x080c, 0x6007, 0x2079, 0x0260, 0x7a30, 0x9296,
+	0x080c, 0x5ec3, 0x60c3, 0x0014, 0x080c, 0x5f40, 0x0005, 0x00f6,
+	0x7090, 0x9005, 0x0500, 0x2011, 0x5f16, 0x080c, 0x85b0, 0x9086,
+	0x0014, 0x11b8, 0x080c, 0x6087, 0x2079, 0x0260, 0x7a30, 0x9296,
 	0x1103, 0x1178, 0x7834, 0x9005, 0x1160, 0x7a38, 0xd2fc, 0x0128,
 	0x70c4, 0x9005, 0x1110, 0x70c7, 0x0001, 0x709b, 0x0012, 0x0029,
 	0x0010, 0x7093, 0x0000, 0x00fe, 0x0005, 0x00f6, 0x709b, 0x0013,
-	0x080c, 0x5f99, 0x2079, 0x0240, 0x7833, 0x1103, 0x7837, 0x0000,
-	0x080c, 0x6007, 0x080c, 0x5fea, 0x1170, 0x7084, 0x9005, 0x1158,
-	0x715c, 0x9186, 0xffff, 0x0138, 0x2011, 0x0008, 0x080c, 0x5e43,
-	0x0168, 0x080c, 0x5fc0, 0x20a9, 0x0008, 0x20e1, 0x0000, 0x2099,
+	0x080c, 0x6019, 0x2079, 0x0240, 0x7833, 0x1103, 0x7837, 0x0000,
+	0x080c, 0x6087, 0x080c, 0x606a, 0x1170, 0x7084, 0x9005, 0x1158,
+	0x715c, 0x9186, 0xffff, 0x0138, 0x2011, 0x0008, 0x080c, 0x5ec3,
+	0x0168, 0x080c, 0x6040, 0x20a9, 0x0008, 0x20e1, 0x0000, 0x2099,
 	0x026e, 0x20e9, 0x0000, 0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014,
-	0x080c, 0x5ec0, 0x00fe, 0x0005, 0x00f6, 0x7090, 0x9005, 0x0500,
-	0x2011, 0x5e96, 0x080c, 0x84f9, 0x9086, 0x0014, 0x11b8, 0x080c,
-	0x6007, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1104, 0x1178, 0x7834,
+	0x080c, 0x5f40, 0x00fe, 0x0005, 0x00f6, 0x7090, 0x9005, 0x0500,
+	0x2011, 0x5f16, 0x080c, 0x85b0, 0x9086, 0x0014, 0x11b8, 0x080c,
+	0x6087, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1104, 0x1178, 0x7834,
 	0x9005, 0x1160, 0x7a38, 0xd2fc, 0x0128, 0x70c4, 0x9005, 0x1110,
 	0x70c7, 0x0001, 0x709b, 0x0014, 0x0029, 0x0010, 0x7093, 0x0000,
-	0x00fe, 0x0005, 0x00f6, 0x709b, 0x0015, 0x080c, 0x5f99, 0x2079,
-	0x0240, 0x7833, 0x1104, 0x7837, 0x0000, 0x080c, 0x6007, 0x080c,
-	0x5fea, 0x11b8, 0x7084, 0x9005, 0x11a0, 0x7164, 0x9186, 0xffff,
-	0x0180, 0x9180, 0x3332, 0x200d, 0x918c, 0xff00, 0x810f, 0x2011,
-	0x0008, 0x080c, 0x5e43, 0x0180, 0x080c, 0x4ff4, 0x0110, 0x080c,
-	0x28b4, 0x20a9, 0x0008, 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9,
-	0x0000, 0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014, 0x080c, 0x5ec0,
-	0x00fe, 0x0005, 0x00f6, 0x7090, 0x9005, 0x05f0, 0x2011, 0x5e96,
-	0x080c, 0x84f9, 0x9086, 0x0014, 0x15a8, 0x080c, 0x6007, 0x2079,
+	0x00fe, 0x0005, 0x00f6, 0x709b, 0x0015, 0x080c, 0x6019, 0x2079,
+	0x0240, 0x7833, 0x1104, 0x7837, 0x0000, 0x080c, 0x6087, 0x080c,
+	0x606a, 0x11b8, 0x7084, 0x9005, 0x11a0, 0x7164, 0x9186, 0xffff,
+	0x0180, 0x9180, 0x3384, 0x200d, 0x918c, 0xff00, 0x810f, 0x2011,
+	0x0008, 0x080c, 0x5ec3, 0x0180, 0x080c, 0x505a, 0x0110, 0x080c,
+	0x28e5, 0x20a9, 0x0008, 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9,
+	0x0000, 0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014, 0x080c, 0x5f40,
+	0x00fe, 0x0005, 0x00f6, 0x7090, 0x9005, 0x05f0, 0x2011, 0x5f16,
+	0x080c, 0x85b0, 0x9086, 0x0014, 0x15a8, 0x080c, 0x6087, 0x2079,
 	0x0260, 0x7a30, 0x9296, 0x1105, 0x1568, 0x7834, 0x9084, 0x0100,
-	0x2011, 0x0100, 0x921e, 0x1168, 0x9085, 0x0001, 0x080c, 0x6032,
+	0x2011, 0x0100, 0x921e, 0x1168, 0x9085, 0x0001, 0x080c, 0x60b2,
 	0x7a38, 0xd2fc, 0x0128, 0x70c4, 0x9005, 0x1110, 0x70c7, 0x0001,
 	0x0080, 0x9005, 0x11b8, 0x7a38, 0xd2fc, 0x0128, 0x70c4, 0x9005,
-	0x1110, 0x70c7, 0x0001, 0x9085, 0x0001, 0x080c, 0x6032, 0x7097,
+	0x1110, 0x70c7, 0x0001, 0x9085, 0x0001, 0x080c, 0x60b2, 0x7097,
 	0x0000, 0x7a38, 0xd2f4, 0x0110, 0x70df, 0x0008, 0x709b, 0x0016,
-	0x0029, 0x0010, 0x7093, 0x0000, 0x00fe, 0x0005, 0x080c, 0xab1a,
-	0x080c, 0x6007, 0x20e1, 0x0000, 0x2099, 0x0260, 0x20e9, 0x0000,
+	0x0029, 0x0010, 0x7093, 0x0000, 0x00fe, 0x0005, 0x080c, 0xabfe,
+	0x080c, 0x6087, 0x20e1, 0x0000, 0x2099, 0x0260, 0x20e9, 0x0000,
 	0x20a1, 0x0240, 0x20a9, 0x000e, 0x4003, 0x2011, 0x026d, 0x2204,
 	0x9084, 0x0100, 0x2011, 0x024d, 0x2012, 0x2011, 0x026e, 0x709b,
-	0x0017, 0x080c, 0x5fea, 0x1150, 0x7084, 0x9005, 0x1138, 0x080c,
-	0x5db6, 0x1188, 0x9085, 0x0001, 0x080c, 0x28b4, 0x20a9, 0x0008,
-	0x080c, 0x6007, 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9, 0x0000,
-	0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014, 0x080c, 0x5ec0, 0x0010,
-	0x080c, 0x5910, 0x0005, 0x00f6, 0x7090, 0x9005, 0x01d8, 0x2011,
-	0x5e96, 0x080c, 0x84f9, 0x9086, 0x0084, 0x1190, 0x080c, 0x6007,
+	0x0017, 0x080c, 0x606a, 0x1150, 0x7084, 0x9005, 0x1138, 0x080c,
+	0x5e36, 0x1188, 0x9085, 0x0001, 0x080c, 0x28e5, 0x20a9, 0x0008,
+	0x080c, 0x6087, 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9, 0x0000,
+	0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014, 0x080c, 0x5f40, 0x0010,
+	0x080c, 0x5990, 0x0005, 0x00f6, 0x7090, 0x9005, 0x01d8, 0x2011,
+	0x5f16, 0x080c, 0x85b0, 0x9086, 0x0084, 0x1190, 0x080c, 0x6087,
 	0x2079, 0x0260, 0x7a30, 0x9296, 0x1106, 0x1150, 0x7834, 0x9005,
-	0x1138, 0x9006, 0x080c, 0x6032, 0x709b, 0x0018, 0x0029, 0x0010,
+	0x1138, 0x9006, 0x080c, 0x60b2, 0x709b, 0x0018, 0x0029, 0x0010,
 	0x7093, 0x0000, 0x00fe, 0x0005, 0x00f6, 0x709b, 0x0019, 0x080c,
-	0x5f99, 0x2079, 0x0240, 0x7833, 0x1106, 0x7837, 0x0000, 0x080c,
-	0x6007, 0x2009, 0x026e, 0x2039, 0x1c0e, 0x20a9, 0x0040, 0x213e,
+	0x6019, 0x2079, 0x0240, 0x7833, 0x1106, 0x7837, 0x0000, 0x080c,
+	0x6087, 0x2009, 0x026e, 0x2039, 0x1c0e, 0x20a9, 0x0040, 0x213e,
 	0x8738, 0x8108, 0x9186, 0x0280, 0x1128, 0x6814, 0x8000, 0x6816,
-	0x2009, 0x0260, 0x1f04, 0x5d1f, 0x2039, 0x1c0e, 0x080c, 0x5fea,
+	0x2009, 0x0260, 0x1f04, 0x5d9f, 0x2039, 0x1c0e, 0x080c, 0x606a,
 	0x11e8, 0x2728, 0x2514, 0x8207, 0x9084, 0x00ff, 0x8000, 0x2018,
 	0x9294, 0x00ff, 0x8007, 0x9205, 0x202a, 0x7060, 0x2310, 0x8214,
 	0x92a0, 0x1c0e, 0x2414, 0x938c, 0x0001, 0x0118, 0x9294, 0xff00,
 	0x0018, 0x9294, 0x00ff, 0x8007, 0x9215, 0x2222, 0x20a9, 0x0040,
 	0x2009, 0x024e, 0x270e, 0x8738, 0x8108, 0x9186, 0x0260, 0x1128,
-	0x6810, 0x8000, 0x6812, 0x2009, 0x0240, 0x1f04, 0x5d52, 0x60c3,
-	0x0084, 0x080c, 0x5ec0, 0x00fe, 0x0005, 0x00f6, 0x7090, 0x9005,
-	0x01e0, 0x2011, 0x5e96, 0x080c, 0x84f9, 0x9086, 0x0084, 0x1198,
-	0x080c, 0x6007, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1107, 0x1158,
-	0x7834, 0x9005, 0x1140, 0x7097, 0x0001, 0x080c, 0x5f5d, 0x709b,
+	0x6810, 0x8000, 0x6812, 0x2009, 0x0240, 0x1f04, 0x5dd2, 0x60c3,
+	0x0084, 0x080c, 0x5f40, 0x00fe, 0x0005, 0x00f6, 0x7090, 0x9005,
+	0x01e0, 0x2011, 0x5f16, 0x080c, 0x85b0, 0x9086, 0x0084, 0x1198,
+	0x080c, 0x6087, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1107, 0x1158,
+	0x7834, 0x9005, 0x1140, 0x7097, 0x0001, 0x080c, 0x5fdd, 0x709b,
 	0x001a, 0x0029, 0x0010, 0x7093, 0x0000, 0x00fe, 0x0005, 0x9085,
-	0x0001, 0x080c, 0x6032, 0x709b, 0x001b, 0x080c, 0xab1a, 0x080c,
-	0x6007, 0x2011, 0x0260, 0x2009, 0x0240, 0x7490, 0x9480, 0x0018,
+	0x0001, 0x080c, 0x60b2, 0x709b, 0x001b, 0x080c, 0xabfe, 0x080c,
+	0x6087, 0x2011, 0x0260, 0x2009, 0x0240, 0x7490, 0x9480, 0x0018,
 	0x9080, 0x0007, 0x9084, 0x03f8, 0x8004, 0x20a8, 0x220e, 0x8210,
 	0x8108, 0x9186, 0x0260, 0x1150, 0x6810, 0x8000, 0x6812, 0x2009,
-	0x0240, 0x6814, 0x8000, 0x6816, 0x2011, 0x0260, 0x1f04, 0x5d9e,
-	0x60c3, 0x0084, 0x080c, 0x5ec0, 0x0005, 0x0005, 0x0086, 0x0096,
+	0x0240, 0x6814, 0x8000, 0x6816, 0x2011, 0x0260, 0x1f04, 0x5e1e,
+	0x60c3, 0x0084, 0x080c, 0x5f40, 0x0005, 0x0005, 0x0086, 0x0096,
 	0x2029, 0x1848, 0x252c, 0x20a9, 0x0008, 0x2041, 0x1c0e, 0x20e9,
-	0x0001, 0x28a0, 0x080c, 0x6007, 0x20e1, 0x0000, 0x2099, 0x026e,
+	0x0001, 0x28a0, 0x080c, 0x6087, 0x20e1, 0x0000, 0x2099, 0x026e,
 	0x4003, 0x20a9, 0x0008, 0x2011, 0x0007, 0xd5d4, 0x0108, 0x9016,
 	0x2800, 0x9200, 0x200c, 0x91a6, 0xffff, 0x1148, 0xd5d4, 0x0110,
-	0x8210, 0x0008, 0x8211, 0x1f04, 0x5dd0, 0x0804, 0x5e3f, 0x82ff,
+	0x8210, 0x0008, 0x8211, 0x1f04, 0x5e50, 0x0804, 0x5ebf, 0x82ff,
 	0x1160, 0xd5d4, 0x0120, 0x91a6, 0x3fff, 0x0d90, 0x0020, 0x91a6,
-	0x3fff, 0x0904, 0x5e3f, 0x918d, 0xc000, 0x20a9, 0x0010, 0x2019,
+	0x3fff, 0x0904, 0x5ebf, 0x918d, 0xc000, 0x20a9, 0x0010, 0x2019,
 	0x0001, 0xd5d4, 0x0110, 0x2019, 0x0010, 0x2120, 0xd5d4, 0x0110,
 	0x8423, 0x0008, 0x8424, 0x1240, 0xd5d4, 0x0110, 0x8319, 0x0008,
-	0x8318, 0x1f04, 0x5df6, 0x04d8, 0x23a8, 0x2021, 0x0001, 0x8426,
-	0x8425, 0x1f04, 0x5e08, 0x2328, 0x8529, 0x92be, 0x0007, 0x0158,
+	0x8318, 0x1f04, 0x5e76, 0x04d8, 0x23a8, 0x2021, 0x0001, 0x8426,
+	0x8425, 0x1f04, 0x5e88, 0x2328, 0x8529, 0x92be, 0x0007, 0x0158,
 	0x0006, 0x2039, 0x0007, 0x2200, 0x973a, 0x000e, 0x27a8, 0x95a8,
-	0x0010, 0x1f04, 0x5e17, 0x755e, 0x95c8, 0x3332, 0x292d, 0x95ac,
-	0x00ff, 0x7582, 0x6532, 0x6536, 0x0016, 0x2508, 0x080c, 0x2894,
+	0x0010, 0x1f04, 0x5e97, 0x755e, 0x95c8, 0x3384, 0x292d, 0x95ac,
+	0x00ff, 0x7582, 0x6532, 0x6536, 0x0016, 0x2508, 0x080c, 0x28c5,
 	0x001e, 0x60e7, 0x0000, 0x65ea, 0x2018, 0x2304, 0x9405, 0x201a,
 	0x7087, 0x0001, 0x20e9, 0x0000, 0x20a1, 0x024e, 0x20e1, 0x0001,
 	0x2898, 0x20a9, 0x0008, 0x4003, 0x9085, 0x0001, 0x0008, 0x9006,
@@ -2817,52 +2833,52 @@
 	0x8001, 0x0cd0, 0x2118, 0x84ff, 0x0120, 0x939a, 0x0010, 0x8421,
 	0x1de0, 0x2021, 0x0001, 0x83ff, 0x0118, 0x8423, 0x8319, 0x1de8,
 	0x9238, 0x2029, 0x026e, 0x9528, 0x2504, 0x942c, 0x11b8, 0x9405,
-	0x203a, 0x715e, 0x91a0, 0x3332, 0x242d, 0x95ac, 0x00ff, 0x7582,
-	0x6532, 0x6536, 0x0016, 0x2508, 0x080c, 0x2894, 0x001e, 0x60e7,
+	0x203a, 0x715e, 0x91a0, 0x3384, 0x242d, 0x95ac, 0x00ff, 0x7582,
+	0x6532, 0x6536, 0x0016, 0x2508, 0x080c, 0x28c5, 0x001e, 0x60e7,
 	0x0000, 0x65ea, 0x7087, 0x0001, 0x9084, 0x0000, 0x0005, 0x00e6,
 	0x2071, 0x1800, 0x708b, 0x0000, 0x00ee, 0x0005, 0x00e6, 0x00f6,
-	0x2079, 0x0100, 0x2071, 0x0140, 0x080c, 0x5f4c, 0x080c, 0xa28f,
-	0x7004, 0x9084, 0x4000, 0x0110, 0x080c, 0x2d0c, 0x0126, 0x2091,
+	0x2079, 0x0100, 0x2071, 0x0140, 0x080c, 0x5fcc, 0x080c, 0xa356,
+	0x7004, 0x9084, 0x4000, 0x0110, 0x080c, 0x2d5e, 0x0126, 0x2091,
 	0x8000, 0x2071, 0x1826, 0x2073, 0x0000, 0x7840, 0x0026, 0x0016,
-	0x2009, 0x00f7, 0x080c, 0x5fa9, 0x001e, 0x9094, 0x0010, 0x9285,
+	0x2009, 0x00f7, 0x080c, 0x6029, 0x001e, 0x9094, 0x0010, 0x9285,
 	0x0080, 0x7842, 0x7a42, 0x002e, 0x012e, 0x00fe, 0x00ee, 0x0005,
-	0x0126, 0x2091, 0x8000, 0x080c, 0x2bb2, 0x0228, 0x2011, 0x0101,
+	0x0126, 0x2091, 0x8000, 0x080c, 0x2be3, 0x0228, 0x2011, 0x0101,
 	0x2204, 0xc0c5, 0x2012, 0x2011, 0x19f0, 0x2013, 0x0000, 0x7093,
-	0x0000, 0x012e, 0x60a3, 0x0056, 0x60a7, 0x9575, 0x080c, 0xa286,
+	0x0000, 0x012e, 0x60a3, 0x0056, 0x60a7, 0x9575, 0x080c, 0xa34d,
 	0x6144, 0xd184, 0x0120, 0x7198, 0x918d, 0x2000, 0x0018, 0x718c,
 	0x918d, 0x1000, 0x2011, 0x1998, 0x2112, 0x2009, 0x07d0, 0x2011,
-	0x5e96, 0x080c, 0x8591, 0x0005, 0x0016, 0x0026, 0x00c6, 0x0126,
-	0x2091, 0x8000, 0x080c, 0xadd0, 0x2009, 0x00f7, 0x080c, 0x5fa9,
+	0x5f16, 0x080c, 0x8648, 0x0005, 0x0016, 0x0026, 0x00c6, 0x0126,
+	0x2091, 0x8000, 0x080c, 0xaeb4, 0x2009, 0x00f7, 0x080c, 0x6029,
 	0x2061, 0x19f9, 0x900e, 0x611a, 0x611e, 0x6172, 0x6176, 0x2061,
 	0x1800, 0x6003, 0x0001, 0x2061, 0x0100, 0x6043, 0x0090, 0x6043,
 	0x0010, 0x2009, 0x1998, 0x200b, 0x0000, 0x2009, 0x002d, 0x2011,
-	0x5f18, 0x080c, 0x84ed, 0x012e, 0x00ce, 0x002e, 0x001e, 0x0005,
+	0x5f98, 0x080c, 0x85a4, 0x012e, 0x00ce, 0x002e, 0x001e, 0x0005,
 	0x00e6, 0x0006, 0x0126, 0x2091, 0x8000, 0x0471, 0x2071, 0x0100,
-	0x080c, 0xa28f, 0x2071, 0x0140, 0x7004, 0x9084, 0x4000, 0x0110,
-	0x080c, 0x2d0c, 0x080c, 0x73bb, 0x0188, 0x080c, 0x73d6, 0x1170,
-	0x080c, 0x76a3, 0x0016, 0x080c, 0x2963, 0x2001, 0x196c, 0x2102,
-	0x001e, 0x080c, 0x769e, 0x080c, 0x72e5, 0x0050, 0x2009, 0x0001,
-	0x080c, 0x2c4b, 0x2001, 0x0001, 0x080c, 0x27f7, 0x080c, 0x5eec,
+	0x080c, 0xa356, 0x2071, 0x0140, 0x7004, 0x9084, 0x4000, 0x0110,
+	0x080c, 0x2d5e, 0x080c, 0x7446, 0x0188, 0x080c, 0x7461, 0x1170,
+	0x080c, 0x772e, 0x0016, 0x080c, 0x2994, 0x2001, 0x196c, 0x2102,
+	0x001e, 0x080c, 0x7729, 0x080c, 0x736a, 0x0050, 0x2009, 0x0001,
+	0x080c, 0x2c7c, 0x2001, 0x0001, 0x080c, 0x2828, 0x080c, 0x5f6c,
 	0x012e, 0x000e, 0x00ee, 0x0005, 0x2001, 0x180e, 0x2004, 0xd0bc,
 	0x0158, 0x0026, 0x0036, 0x2011, 0x8017, 0x2001, 0x1998, 0x201c,
-	0x080c, 0x4b1e, 0x003e, 0x002e, 0x0005, 0x20a9, 0x0012, 0x20e9,
-	0x0001, 0x20a1, 0x1c80, 0x080c, 0x6007, 0x20e9, 0x0000, 0x2099,
-	0x026e, 0x0099, 0x20a9, 0x0020, 0x080c, 0x6001, 0x2099, 0x0260,
-	0x20a1, 0x1c92, 0x0051, 0x20a9, 0x000e, 0x080c, 0x6004, 0x2099,
+	0x080c, 0x4b7f, 0x003e, 0x002e, 0x0005, 0x20a9, 0x0012, 0x20e9,
+	0x0001, 0x20a1, 0x1c80, 0x080c, 0x6087, 0x20e9, 0x0000, 0x2099,
+	0x026e, 0x0099, 0x20a9, 0x0020, 0x080c, 0x6081, 0x2099, 0x0260,
+	0x20a1, 0x1c92, 0x0051, 0x20a9, 0x000e, 0x080c, 0x6084, 0x2099,
 	0x0260, 0x20a1, 0x1cb2, 0x0009, 0x0005, 0x0016, 0x0026, 0x3410,
-	0x3308, 0x2104, 0x8007, 0x2012, 0x8108, 0x8210, 0x1f04, 0x5f81,
-	0x002e, 0x001e, 0x0005, 0x080c, 0xab1a, 0x20e1, 0x0001, 0x2099,
+	0x3308, 0x2104, 0x8007, 0x2012, 0x8108, 0x8210, 0x1f04, 0x6001,
+	0x002e, 0x001e, 0x0005, 0x080c, 0xabfe, 0x20e1, 0x0001, 0x2099,
 	0x1c00, 0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9, 0x000c, 0x4003,
-	0x0005, 0x080c, 0xab1a, 0x080c, 0x6007, 0x20e1, 0x0000, 0x2099,
+	0x0005, 0x080c, 0xabfe, 0x080c, 0x6087, 0x20e1, 0x0000, 0x2099,
 	0x0260, 0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9, 0x000c, 0x4003,
 	0x0005, 0x00c6, 0x0006, 0x2061, 0x0100, 0x810f, 0x2001, 0x1834,
 	0x2004, 0x9005, 0x1138, 0x2001, 0x1818, 0x2004, 0x9084, 0x00ff,
 	0x9105, 0x0010, 0x9185, 0x00f7, 0x604a, 0x000e, 0x00ce, 0x0005,
-	0x0016, 0x0046, 0x080c, 0x6985, 0x0158, 0x9006, 0x2020, 0x2009,
-	0x002a, 0x080c, 0xe5e9, 0x2001, 0x180c, 0x200c, 0xc195, 0x2102,
-	0x2019, 0x002a, 0x900e, 0x080c, 0x3197, 0x080c, 0xd25a, 0x0140,
-	0x0036, 0x2019, 0xffff, 0x2021, 0x0007, 0x080c, 0x4cd5, 0x003e,
-	0x004e, 0x001e, 0x0005, 0x080c, 0x5eec, 0x709b, 0x0000, 0x7093,
+	0x0016, 0x0046, 0x080c, 0x6a08, 0x0158, 0x9006, 0x2020, 0x2009,
+	0x002a, 0x080c, 0xe73a, 0x2001, 0x180c, 0x200c, 0xc195, 0x2102,
+	0x2019, 0x002a, 0x900e, 0x080c, 0x31e9, 0x080c, 0xd388, 0x0140,
+	0x0036, 0x2019, 0xffff, 0x2021, 0x0007, 0x080c, 0x4d36, 0x003e,
+	0x004e, 0x001e, 0x0005, 0x080c, 0x5f6c, 0x709b, 0x0000, 0x7093,
 	0x0000, 0x0005, 0x0006, 0x2001, 0x180c, 0x2004, 0xd09c, 0x0100,
 	0x000e, 0x0005, 0x0006, 0x0016, 0x0126, 0x2091, 0x8000, 0x2001,
 	0x0101, 0x200c, 0x918d, 0x0006, 0x2102, 0x012e, 0x001e, 0x000e,
@@ -2874,11 +2890,11 @@
 	0x01de, 0x014e, 0x015e, 0x00fe, 0x0005, 0x2001, 0x1800, 0x2003,
 	0x0001, 0x0005, 0x2001, 0x19a5, 0x0118, 0x2003, 0x0001, 0x0010,
 	0x2003, 0x0000, 0x0005, 0x0156, 0x20a9, 0x0800, 0x2009, 0x1000,
-	0x9006, 0x200a, 0x8108, 0x1f04, 0x6041, 0x015e, 0x0005, 0x00d6,
+	0x9006, 0x200a, 0x8108, 0x1f04, 0x60c1, 0x015e, 0x0005, 0x00d6,
 	0x0036, 0x0156, 0x0136, 0x0146, 0x2069, 0x1847, 0x9006, 0xb802,
-	0xb8ce, 0xb807, 0x0707, 0xb80a, 0xb80e, 0xb812, 0x9198, 0x3332,
+	0xb8ce, 0xb807, 0x0707, 0xb80a, 0xb80e, 0xb812, 0x9198, 0x3384,
 	0x231d, 0x939c, 0x00ff, 0xbb16, 0x0016, 0x0026, 0xb8c2, 0x080c,
-	0xadc9, 0x1120, 0x9192, 0x007e, 0x1208, 0xbbc2, 0x20a9, 0x0004,
+	0xaead, 0x1120, 0x9192, 0x007e, 0x1208, 0xbbc2, 0x20a9, 0x0004,
 	0xb8c4, 0x20e8, 0xb9c8, 0x9198, 0x0006, 0x9006, 0x23a0, 0x4004,
 	0x20a9, 0x0004, 0x9198, 0x000a, 0x23a0, 0x4004, 0x002e, 0x001e,
 	0xb83e, 0xb842, 0xb84e, 0xb852, 0xb856, 0xb85a, 0xb85e, 0xb862,
@@ -2888,17 +2904,17 @@
 	0x009e, 0x9006, 0xb84a, 0x6810, 0xb83a, 0x680c, 0xb846, 0xb8bb,
 	0x0520, 0xb8ac, 0x9005, 0x0198, 0x00c6, 0x2060, 0x9c82, 0x1cd0,
 	0x0a0c, 0x0dd5, 0x2001, 0x181a, 0x2004, 0x9c02, 0x1a0c, 0x0dd5,
-	0x080c, 0x8987, 0x00ce, 0x090c, 0x8d2d, 0xb8af, 0x0000, 0x6814,
+	0x080c, 0x8a3d, 0x00ce, 0x090c, 0x8dda, 0xb8af, 0x0000, 0x6814,
 	0x9084, 0x00ff, 0xb842, 0x014e, 0x013e, 0x015e, 0x003e, 0x00de,
 	0x0005, 0x0126, 0x2091, 0x8000, 0xa974, 0xae78, 0x9684, 0x3fff,
-	0x9082, 0x4000, 0x1a04, 0x612f, 0x9182, 0x0800, 0x1a04, 0x6133,
-	0x2001, 0x180c, 0x2004, 0x9084, 0x0003, 0x1904, 0x6139, 0x9188,
+	0x9082, 0x4000, 0x1a04, 0x61af, 0x9182, 0x0800, 0x1a04, 0x61b3,
+	0x2001, 0x180c, 0x2004, 0x9084, 0x0003, 0x1904, 0x61b9, 0x9188,
 	0x1000, 0x2104, 0x905d, 0x0518, 0xb804, 0x9084, 0x00ff, 0x908e,
-	0x0006, 0x1508, 0xb8a4, 0x900d, 0x1904, 0x614b, 0xb850, 0x900d,
-	0x1148, 0xa802, 0x2900, 0xb852, 0xb84e, 0x080c, 0x9115, 0x9006,
+	0x0006, 0x1508, 0xb8a4, 0x900d, 0x1904, 0x61cb, 0xb850, 0x900d,
+	0x1148, 0xa802, 0x2900, 0xb852, 0xb84e, 0x080c, 0x91ce, 0x9006,
 	0x012e, 0x0005, 0x00a6, 0x2150, 0x2900, 0xb002, 0xa803, 0x0000,
 	0x00ae, 0xb852, 0x0c90, 0x2001, 0x0005, 0x900e, 0x04b8, 0x2001,
-	0x0028, 0x900e, 0x0498, 0x9082, 0x0006, 0x1290, 0x080c, 0xadc9,
+	0x0028, 0x900e, 0x0498, 0x9082, 0x0006, 0x1290, 0x080c, 0xaead,
 	0x1160, 0xb8a0, 0x9084, 0xff80, 0x1140, 0xb900, 0xd1fc, 0x0990,
 	0x2001, 0x0029, 0x2009, 0x1000, 0x0408, 0x2001, 0x0028, 0x00a8,
 	0x2009, 0x180c, 0x210c, 0xd18c, 0x0118, 0x2001, 0x0004, 0x0068,
@@ -2906,3125 +2922,3138 @@
 	0xd1fc, 0x0118, 0x2009, 0x1000, 0x0048, 0x900e, 0x0038, 0x2001,
 	0x0029, 0x900e, 0x0018, 0x2001, 0x0029, 0x900e, 0x9005, 0x012e,
 	0x0005, 0x2001, 0x180c, 0x2004, 0xd084, 0x19d0, 0x9188, 0x1000,
-	0x2104, 0x905d, 0x09a8, 0x080c, 0x6989, 0x1990, 0xb800, 0xd0bc,
-	0x0978, 0x0804, 0x60e2, 0x080c, 0x67b2, 0x0904, 0x60fb, 0x0804,
-	0x60e6, 0x00b6, 0x00e6, 0x0126, 0x2091, 0x8000, 0xa874, 0x908e,
+	0x2104, 0x905d, 0x09a8, 0x080c, 0x6a0c, 0x1990, 0xb800, 0xd0bc,
+	0x0978, 0x0804, 0x6162, 0x080c, 0x6835, 0x0904, 0x617b, 0x0804,
+	0x6166, 0x00b6, 0x00e6, 0x0126, 0x2091, 0x8000, 0xa874, 0x908e,
 	0x00ff, 0x1120, 0x2001, 0x196a, 0x205c, 0x0060, 0xa974, 0x9182,
 	0x0800, 0x1690, 0x9188, 0x1000, 0x2104, 0x905d, 0x01d0, 0x080c,
-	0x6929, 0x11d0, 0x080c, 0xae09, 0x0570, 0x2b00, 0x6012, 0x2900,
+	0x69ac, 0x11d0, 0x080c, 0xaeed, 0x0570, 0x2b00, 0x6012, 0x2900,
 	0x6016, 0x6023, 0x0009, 0x600b, 0x0000, 0xa874, 0x908e, 0x00ff,
-	0x1110, 0x600b, 0x8000, 0x2009, 0x0043, 0x080c, 0xaeda, 0x9006,
+	0x1110, 0x600b, 0x8000, 0x2009, 0x0043, 0x080c, 0xafbe, 0x9006,
 	0x00b0, 0x2001, 0x0028, 0x0090, 0x2009, 0x180c, 0x210c, 0xd18c,
 	0x0118, 0x2001, 0x0004, 0x0038, 0xd184, 0x0118, 0x2001, 0x0004,
 	0x0010, 0x2001, 0x0029, 0x0010, 0x2001, 0x0029, 0x9005, 0x012e,
 	0x00ee, 0x00be, 0x0005, 0x2001, 0x002c, 0x0cc0, 0x00b6, 0x00e6,
-	0x0126, 0x2091, 0x8000, 0xa974, 0x9182, 0x0800, 0x1a04, 0x6219,
-	0x9188, 0x1000, 0x2104, 0x905d, 0x0904, 0x61f1, 0xb8a0, 0x9086,
-	0x007f, 0x0178, 0x080c, 0x6991, 0x0160, 0xa994, 0x81ff, 0x0130,
-	0x908e, 0x0004, 0x0130, 0x908e, 0x0005, 0x0118, 0x080c, 0x6989,
-	0x1598, 0xa87c, 0xd0fc, 0x01e0, 0xa894, 0x9005, 0x01c8, 0x2060,
-	0x0026, 0x2010, 0x080c, 0xcb48, 0x002e, 0x1120, 0x2001, 0x0008,
-	0x0804, 0x621b, 0x6020, 0x9086, 0x000a, 0x0120, 0x2001, 0x0008,
-	0x0804, 0x621b, 0x601a, 0x6003, 0x0008, 0x2900, 0x6016, 0x0058,
-	0x080c, 0xae09, 0x05e8, 0x2b00, 0x6012, 0x2900, 0x6016, 0x600b,
-	0xffff, 0x6023, 0x000a, 0x2009, 0x0003, 0x080c, 0xaeda, 0x9006,
-	0x0458, 0x2001, 0x0028, 0x0438, 0x9082, 0x0006, 0x1290, 0x080c,
-	0xadc9, 0x1160, 0xb8a0, 0x9084, 0xff80, 0x1140, 0xb900, 0xd1fc,
-	0x0900, 0x2001, 0x0029, 0x2009, 0x1000, 0x00a8, 0x2001, 0x0028,
-	0x0090, 0x2009, 0x180c, 0x210c, 0xd18c, 0x0118, 0x2001, 0x0004,
-	0x0050, 0xd184, 0x0118, 0x2001, 0x0004, 0x0028, 0x2001, 0x0029,
-	0x0010, 0x2001, 0x0029, 0x9005, 0x012e, 0x00ee, 0x00be, 0x0005,
-	0x2001, 0x002c, 0x0cc0, 0x00f6, 0x00b6, 0x0126, 0x2091, 0x8000,
-	0xa8e0, 0x9005, 0x1550, 0xa8dc, 0x9082, 0x0101, 0x1630, 0xa8c8,
-	0x9005, 0x1518, 0xa8c4, 0x9082, 0x0101, 0x12f8, 0xa974, 0x2079,
-	0x1800, 0x9182, 0x0800, 0x12e8, 0x7830, 0x9084, 0x0003, 0x1130,
-	0xaa98, 0xab94, 0xa878, 0x9084, 0x0007, 0x00ea, 0x7930, 0xd18c,
-	0x0118, 0x2001, 0x0004, 0x0038, 0xd184, 0x0118, 0x2001, 0x0004,
-	0x0010, 0x2001, 0x0029, 0x900e, 0x0038, 0x2001, 0x002c, 0x900e,
-	0x0018, 0x2001, 0x0029, 0x900e, 0x9006, 0x0008, 0x9005, 0x012e,
-	0x00be, 0x00fe, 0x0005, 0x62b0, 0x626b, 0x6282, 0x62b0, 0x62b0,
-	0x62b0, 0x62b0, 0x62b0, 0x2100, 0x9082, 0x007e, 0x1278, 0x080c,
-	0x65b5, 0x0148, 0x9046, 0xb810, 0x9306, 0x1904, 0x62b8, 0xb814,
-	0x9206, 0x15f0, 0x0028, 0xbb12, 0xba16, 0x0010, 0x080c, 0x49d1,
-	0x0150, 0x04b0, 0x080c, 0x6616, 0x1598, 0xb810, 0x9306, 0x1580,
-	0xb814, 0x9206, 0x1568, 0x080c, 0xae09, 0x0530, 0x2b00, 0x6012,
-	0x080c, 0xcfd4, 0x2900, 0x6016, 0x600b, 0xffff, 0x6023, 0x000a,
-	0xa878, 0x9086, 0x0001, 0x1170, 0x080c, 0x31cc, 0x9006, 0x080c,
-	0x6552, 0x2001, 0x0002, 0x080c, 0x6566, 0x2001, 0x0200, 0xb86e,
-	0xb893, 0x0002, 0x2009, 0x0003, 0x080c, 0xaeda, 0x9006, 0x0068,
-	0x2001, 0x0001, 0x900e, 0x0038, 0x2001, 0x002c, 0x900e, 0x0018,
-	0x2001, 0x0028, 0x900e, 0x9005, 0x0000, 0x012e, 0x00be, 0x00fe,
-	0x0005, 0x00b6, 0x00f6, 0x00e6, 0x0126, 0x2091, 0x8000, 0xa894,
-	0x90c6, 0x0015, 0x0904, 0x64a3, 0x90c6, 0x0056, 0x0904, 0x64a7,
-	0x90c6, 0x0066, 0x0904, 0x64ab, 0x90c6, 0x0067, 0x0904, 0x64af,
-	0x90c6, 0x0068, 0x0904, 0x64b3, 0x90c6, 0x0071, 0x0904, 0x64b7,
-	0x90c6, 0x0074, 0x0904, 0x64bb, 0x90c6, 0x007c, 0x0904, 0x64bf,
-	0x90c6, 0x007e, 0x0904, 0x64c3, 0x90c6, 0x0037, 0x0904, 0x64c7,
-	0x9016, 0x2079, 0x1800, 0xa974, 0x9186, 0x00ff, 0x0904, 0x649e,
-	0x9182, 0x0800, 0x1a04, 0x649e, 0x080c, 0x6616, 0x1198, 0xb804,
-	0x9084, 0x00ff, 0x9082, 0x0006, 0x1268, 0xa894, 0x90c6, 0x006f,
-	0x0148, 0x080c, 0xadc9, 0x1904, 0x6487, 0xb8a0, 0x9084, 0xff80,
-	0x1904, 0x6487, 0xa894, 0x90c6, 0x006f, 0x0158, 0x90c6, 0x005e,
-	0x0904, 0x63e7, 0x90c6, 0x0064, 0x0904, 0x6410, 0x2008, 0x0804,
-	0x63a9, 0xa998, 0xa8b0, 0x2040, 0x080c, 0xadc9, 0x1120, 0x9182,
-	0x007f, 0x0a04, 0x63a9, 0x9186, 0x00ff, 0x0904, 0x63a9, 0x9182,
-	0x0800, 0x1a04, 0x63a9, 0xaaa0, 0xab9c, 0x787c, 0x9306, 0x11a8,
-	0x7880, 0x0096, 0x924e, 0x1128, 0x2208, 0x2310, 0x009e, 0x0804,
-	0x63a9, 0x080c, 0xadc9, 0x1140, 0x99cc, 0xff00, 0x009e, 0x1128,
-	0x2208, 0x2310, 0x0804, 0x63a9, 0x009e, 0x080c, 0x49d1, 0x0904,
-	0x63b3, 0x900e, 0x9016, 0x90c6, 0x4000, 0x15e0, 0x0006, 0x080c,
-	0x6836, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d, 0x20a9,
-	0x0004, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0031, 0x20a0, 0xb8c4,
-	0x20e0, 0xb8c8, 0x9080, 0x0006, 0x2098, 0x080c, 0x0f7c, 0x20a9,
-	0x0004, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0035, 0x20a0, 0xb8c4,
-	0x20e0, 0xb8c8, 0x9080, 0x000a, 0x2098, 0x080c, 0x0f7c, 0xa8c4,
-	0xabc8, 0x9305, 0xabcc, 0x9305, 0xabd0, 0x9305, 0xabd4, 0x9305,
-	0xabd8, 0x9305, 0xabdc, 0x9305, 0xabe0, 0x9305, 0x9005, 0x0510,
-	0x000e, 0x00c8, 0x90c6, 0x4007, 0x1110, 0x2408, 0x00a0, 0x90c6,
-	0x4008, 0x1118, 0x2708, 0x2610, 0x0070, 0x90c6, 0x4009, 0x1108,
-	0x0050, 0x90c6, 0x4006, 0x0138, 0x2001, 0x4005, 0x2009, 0x000a,
-	0x0010, 0x2001, 0x4006, 0xa896, 0xa99a, 0xaa9e, 0x2001, 0x0030,
-	0x900e, 0x0478, 0x000e, 0x080c, 0xae09, 0x1130, 0x2001, 0x4005,
-	0x2009, 0x0003, 0x9016, 0x0c78, 0x2b00, 0x6012, 0x080c, 0xcfd4,
-	0x2900, 0x6016, 0x6023, 0x0001, 0xa868, 0xd88c, 0x0108, 0xc0f5,
-	0xa86a, 0x0126, 0x2091, 0x8000, 0x080c, 0x31cc, 0x012e, 0x9006,
-	0x080c, 0x6552, 0x2001, 0x0002, 0x080c, 0x6566, 0x2009, 0x0002,
-	0x080c, 0xaeda, 0xa8b0, 0xd094, 0x0118, 0xb8cc, 0xc08d, 0xb8ce,
-	0x9006, 0x9005, 0x012e, 0x00ee, 0x00fe, 0x00be, 0x0005, 0x080c,
-	0x56f6, 0x0118, 0x2009, 0x0007, 0x00f8, 0xa998, 0xaeb0, 0x080c,
-	0x6616, 0x1904, 0x63a4, 0x9186, 0x007f, 0x0130, 0x080c, 0x6989,
-	0x0118, 0x2009, 0x0009, 0x0080, 0x0096, 0x080c, 0x0fff, 0x1120,
-	0x009e, 0x2009, 0x0002, 0x0040, 0x2900, 0x009e, 0xa806, 0x080c,
-	0xcd40, 0x19b0, 0x2009, 0x0003, 0x2001, 0x4005, 0x0804, 0x63ab,
-	0xa998, 0xaeb0, 0x080c, 0x6616, 0x1904, 0x63a4, 0x0096, 0x080c,
-	0x0fff, 0x1128, 0x009e, 0x2009, 0x0002, 0x0804, 0x6464, 0x2900,
-	0x009e, 0xa806, 0x0096, 0x2048, 0x20a9, 0x002b, 0xb8c4, 0x20e0,
-	0xb8c8, 0x2098, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0002, 0x20a0,
-	0x4003, 0x20a9, 0x0008, 0x9080, 0x0006, 0x20a0, 0xbbc8, 0x9398,
-	0x0006, 0x2398, 0x080c, 0x0f7c, 0x009e, 0xa87b, 0x0000, 0xa883,
-	0x0000, 0xa897, 0x4000, 0xd684, 0x1168, 0x080c, 0x56e2, 0xd0b4,
-	0x1118, 0xa89b, 0x000b, 0x00e0, 0xb800, 0xd08c, 0x0118, 0xa89b,
-	0x000c, 0x00b0, 0x080c, 0x6989, 0x0118, 0xa89b, 0x0009, 0x0080,
-	0x080c, 0x56f6, 0x0118, 0xa89b, 0x0007, 0x0050, 0x080c, 0xcd23,
-	0x1904, 0x63e0, 0x2009, 0x0003, 0x2001, 0x4005, 0x0804, 0x63ab,
-	0xa87b, 0x0030, 0xa897, 0x4005, 0xa804, 0x8006, 0x8006, 0x8007,
-	0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0002, 0x2009, 0x002b,
-	0xaaa0, 0xab9c, 0xaca8, 0xada4, 0x2031, 0x0000, 0x2041, 0x1243,
-	0x080c, 0xb379, 0x1904, 0x63e0, 0x2009, 0x0002, 0x08e8, 0x2001,
-	0x0028, 0x900e, 0x0804, 0x63e1, 0x2009, 0x180c, 0x210c, 0xd18c,
-	0x0118, 0x2001, 0x0004, 0x0038, 0xd184, 0x0118, 0x2001, 0x0004,
-	0x0010, 0x2001, 0x0029, 0x900e, 0x0804, 0x63e1, 0x2001, 0x0029,
-	0x900e, 0x0804, 0x63e1, 0x080c, 0x3761, 0x0804, 0x63e2, 0x080c,
-	0x541f, 0x0804, 0x63e2, 0x080c, 0x455f, 0x0804, 0x63e2, 0x080c,
-	0x45d8, 0x0804, 0x63e2, 0x080c, 0x4634, 0x0804, 0x63e2, 0x080c,
-	0x4a94, 0x0804, 0x63e2, 0x080c, 0x4d44, 0x0804, 0x63e2, 0x080c,
-	0x508a, 0x0804, 0x63e2, 0x080c, 0x5283, 0x0804, 0x63e2, 0x080c,
-	0x3977, 0x0804, 0x63e2, 0x00b6, 0xa974, 0xae78, 0x9684, 0x3fff,
-	0x9082, 0x4000, 0x1618, 0x9182, 0x0800, 0x1268, 0x9188, 0x1000,
-	0x2104, 0x905d, 0x0140, 0x080c, 0x6989, 0x1148, 0x00e9, 0x080c,
-	0x6741, 0x9006, 0x00b0, 0x2001, 0x0028, 0x900e, 0x0090, 0x9082,
-	0x0006, 0x1240, 0xb900, 0xd1fc, 0x0d88, 0x2001, 0x0029, 0x2009,
-	0x1000, 0x0038, 0x2001, 0x0029, 0x900e, 0x0018, 0x2001, 0x0029,
-	0x900e, 0x9005, 0x00be, 0x0005, 0x0126, 0x2091, 0x8000, 0xb850,
-	0x900d, 0x0150, 0x2900, 0x0096, 0x2148, 0xa802, 0x009e, 0xa803,
-	0x0000, 0xb852, 0x012e, 0x0005, 0x2900, 0xb852, 0xb84e, 0xa803,
-	0x0000, 0x0cc0, 0x0126, 0x2091, 0x8000, 0xb84c, 0x9005, 0x0170,
-	0x00e6, 0x2071, 0x19e6, 0x7004, 0x9086, 0x0002, 0x0168, 0x00ee,
-	0xb84c, 0xa802, 0x2900, 0xb84e, 0x012e, 0x0005, 0x2900, 0xb852,
-	0xb84e, 0xa803, 0x0000, 0x0cc0, 0x701c, 0x9b06, 0x1d80, 0xb84c,
-	0x00a6, 0x2050, 0xb000, 0xa802, 0x2900, 0xb002, 0x00ae, 0x00ee,
-	0x012e, 0x0005, 0x0126, 0x2091, 0x8000, 0xb84c, 0x904d, 0x0130,
-	0xa800, 0x9005, 0x1108, 0xb852, 0xb84e, 0x9905, 0x012e, 0x0005,
+	0x0126, 0x2091, 0x8000, 0xa974, 0x9182, 0x0800, 0x1a04, 0x629c,
+	0x9188, 0x1000, 0x2104, 0x905d, 0x0904, 0x6274, 0xb8a0, 0x9086,
+	0x007f, 0x0190, 0xa87c, 0xd0fc, 0x1178, 0x080c, 0x6a14, 0x0160,
+	0xa994, 0x81ff, 0x0130, 0x908e, 0x0004, 0x0130, 0x908e, 0x0005,
+	0x0118, 0x080c, 0x6a0c, 0x1598, 0xa87c, 0xd0fc, 0x01e0, 0xa894,
+	0x9005, 0x01c8, 0x2060, 0x0026, 0x2010, 0x080c, 0xcc74, 0x002e,
+	0x1120, 0x2001, 0x0008, 0x0804, 0x629e, 0x6020, 0x9086, 0x000a,
+	0x0120, 0x2001, 0x0008, 0x0804, 0x629e, 0x601a, 0x6003, 0x0008,
+	0x2900, 0x6016, 0x0058, 0x080c, 0xaeed, 0x05e8, 0x2b00, 0x6012,
+	0x2900, 0x6016, 0x600b, 0xffff, 0x6023, 0x000a, 0x2009, 0x0003,
+	0x080c, 0xafbe, 0x9006, 0x0458, 0x2001, 0x0028, 0x0438, 0x9082,
+	0x0006, 0x1290, 0x080c, 0xaead, 0x1160, 0xb8a0, 0x9084, 0xff80,
+	0x1140, 0xb900, 0xd1fc, 0x0900, 0x2001, 0x0029, 0x2009, 0x1000,
+	0x00a8, 0x2001, 0x0028, 0x0090, 0x2009, 0x180c, 0x210c, 0xd18c,
+	0x0118, 0x2001, 0x0004, 0x0050, 0xd184, 0x0118, 0x2001, 0x0004,
+	0x0028, 0x2001, 0x0029, 0x0010, 0x2001, 0x0029, 0x9005, 0x012e,
+	0x00ee, 0x00be, 0x0005, 0x2001, 0x002c, 0x0cc0, 0x00f6, 0x00b6,
+	0x0126, 0x2091, 0x8000, 0xa8e0, 0x9005, 0x1550, 0xa8dc, 0x9082,
+	0x0101, 0x1630, 0xa8c8, 0x9005, 0x1518, 0xa8c4, 0x9082, 0x0101,
+	0x12f8, 0xa974, 0x2079, 0x1800, 0x9182, 0x0800, 0x12e8, 0x7830,
+	0x9084, 0x0003, 0x1130, 0xaa98, 0xab94, 0xa878, 0x9084, 0x0007,
+	0x00ea, 0x7930, 0xd18c, 0x0118, 0x2001, 0x0004, 0x0038, 0xd184,
+	0x0118, 0x2001, 0x0004, 0x0010, 0x2001, 0x0029, 0x900e, 0x0038,
+	0x2001, 0x002c, 0x900e, 0x0018, 0x2001, 0x0029, 0x900e, 0x9006,
+	0x0008, 0x9005, 0x012e, 0x00be, 0x00fe, 0x0005, 0x6333, 0x62ee,
+	0x6305, 0x6333, 0x6333, 0x6333, 0x6333, 0x6333, 0x2100, 0x9082,
+	0x007e, 0x1278, 0x080c, 0x6638, 0x0148, 0x9046, 0xb810, 0x9306,
+	0x1904, 0x633b, 0xb814, 0x9206, 0x15f0, 0x0028, 0xbb12, 0xba16,
+	0x0010, 0x080c, 0x4a32, 0x0150, 0x04b0, 0x080c, 0x6699, 0x1598,
+	0xb810, 0x9306, 0x1580, 0xb814, 0x9206, 0x1568, 0x080c, 0xaeed,
+	0x0530, 0x2b00, 0x6012, 0x080c, 0xd102, 0x2900, 0x6016, 0x600b,
+	0xffff, 0x6023, 0x000a, 0xa878, 0x9086, 0x0001, 0x1170, 0x080c,
+	0x321e, 0x9006, 0x080c, 0x65d5, 0x2001, 0x0002, 0x080c, 0x65e9,
+	0x2001, 0x0200, 0xb86e, 0xb893, 0x0002, 0x2009, 0x0003, 0x080c,
+	0xafbe, 0x9006, 0x0068, 0x2001, 0x0001, 0x900e, 0x0038, 0x2001,
+	0x002c, 0x900e, 0x0018, 0x2001, 0x0028, 0x900e, 0x9005, 0x0000,
+	0x012e, 0x00be, 0x00fe, 0x0005, 0x00b6, 0x00f6, 0x00e6, 0x0126,
+	0x2091, 0x8000, 0xa894, 0x90c6, 0x0015, 0x0904, 0x6526, 0x90c6,
+	0x0056, 0x0904, 0x652a, 0x90c6, 0x0066, 0x0904, 0x652e, 0x90c6,
+	0x0067, 0x0904, 0x6532, 0x90c6, 0x0068, 0x0904, 0x6536, 0x90c6,
+	0x0071, 0x0904, 0x653a, 0x90c6, 0x0074, 0x0904, 0x653e, 0x90c6,
+	0x007c, 0x0904, 0x6542, 0x90c6, 0x007e, 0x0904, 0x6546, 0x90c6,
+	0x0037, 0x0904, 0x654a, 0x9016, 0x2079, 0x1800, 0xa974, 0x9186,
+	0x00ff, 0x0904, 0x6521, 0x9182, 0x0800, 0x1a04, 0x6521, 0x080c,
+	0x6699, 0x1198, 0xb804, 0x9084, 0x00ff, 0x9082, 0x0006, 0x1268,
+	0xa894, 0x90c6, 0x006f, 0x0148, 0x080c, 0xaead, 0x1904, 0x650a,
+	0xb8a0, 0x9084, 0xff80, 0x1904, 0x650a, 0xa894, 0x90c6, 0x006f,
+	0x0158, 0x90c6, 0x005e, 0x0904, 0x646a, 0x90c6, 0x0064, 0x0904,
+	0x6493, 0x2008, 0x0804, 0x642c, 0xa998, 0xa8b0, 0x2040, 0x080c,
+	0xaead, 0x1120, 0x9182, 0x007f, 0x0a04, 0x642c, 0x9186, 0x00ff,
+	0x0904, 0x642c, 0x9182, 0x0800, 0x1a04, 0x642c, 0xaaa0, 0xab9c,
+	0x787c, 0x9306, 0x11a8, 0x7880, 0x0096, 0x924e, 0x1128, 0x2208,
+	0x2310, 0x009e, 0x0804, 0x642c, 0x080c, 0xaead, 0x1140, 0x99cc,
+	0xff00, 0x009e, 0x1128, 0x2208, 0x2310, 0x0804, 0x642c, 0x009e,
+	0x080c, 0x4a32, 0x0904, 0x6436, 0x900e, 0x9016, 0x90c6, 0x4000,
+	0x15e0, 0x0006, 0x080c, 0x68b9, 0x1108, 0xc185, 0xb800, 0xd0bc,
+	0x0108, 0xc18d, 0x20a9, 0x0004, 0xa860, 0x20e8, 0xa85c, 0x9080,
+	0x0031, 0x20a0, 0xb8c4, 0x20e0, 0xb8c8, 0x9080, 0x0006, 0x2098,
+	0x080c, 0x0f7c, 0x20a9, 0x0004, 0xa860, 0x20e8, 0xa85c, 0x9080,
+	0x0035, 0x20a0, 0xb8c4, 0x20e0, 0xb8c8, 0x9080, 0x000a, 0x2098,
+	0x080c, 0x0f7c, 0xa8c4, 0xabc8, 0x9305, 0xabcc, 0x9305, 0xabd0,
+	0x9305, 0xabd4, 0x9305, 0xabd8, 0x9305, 0xabdc, 0x9305, 0xabe0,
+	0x9305, 0x9005, 0x0510, 0x000e, 0x00c8, 0x90c6, 0x4007, 0x1110,
+	0x2408, 0x00a0, 0x90c6, 0x4008, 0x1118, 0x2708, 0x2610, 0x0070,
+	0x90c6, 0x4009, 0x1108, 0x0050, 0x90c6, 0x4006, 0x0138, 0x2001,
+	0x4005, 0x2009, 0x000a, 0x0010, 0x2001, 0x4006, 0xa896, 0xa99a,
+	0xaa9e, 0x2001, 0x0030, 0x900e, 0x0478, 0x000e, 0x080c, 0xaeed,
+	0x1130, 0x2001, 0x4005, 0x2009, 0x0003, 0x9016, 0x0c78, 0x2b00,
+	0x6012, 0x080c, 0xd102, 0x2900, 0x6016, 0x6023, 0x0001, 0xa868,
+	0xd88c, 0x0108, 0xc0f5, 0xa86a, 0x0126, 0x2091, 0x8000, 0x080c,
+	0x321e, 0x012e, 0x9006, 0x080c, 0x65d5, 0x2001, 0x0002, 0x080c,
+	0x65e9, 0x2009, 0x0002, 0x080c, 0xafbe, 0xa8b0, 0xd094, 0x0118,
+	0xb8cc, 0xc08d, 0xb8ce, 0x9006, 0x9005, 0x012e, 0x00ee, 0x00fe,
+	0x00be, 0x0005, 0x080c, 0x5771, 0x0118, 0x2009, 0x0007, 0x00f8,
+	0xa998, 0xaeb0, 0x080c, 0x6699, 0x1904, 0x6427, 0x9186, 0x007f,
+	0x0130, 0x080c, 0x6a0c, 0x0118, 0x2009, 0x0009, 0x0080, 0x0096,
+	0x080c, 0x0fff, 0x1120, 0x009e, 0x2009, 0x0002, 0x0040, 0x2900,
+	0x009e, 0xa806, 0x080c, 0xce6e, 0x19b0, 0x2009, 0x0003, 0x2001,
+	0x4005, 0x0804, 0x642e, 0xa998, 0xaeb0, 0x080c, 0x6699, 0x1904,
+	0x6427, 0x0096, 0x080c, 0x0fff, 0x1128, 0x009e, 0x2009, 0x0002,
+	0x0804, 0x64e7, 0x2900, 0x009e, 0xa806, 0x0096, 0x2048, 0x20a9,
+	0x002b, 0xb8c4, 0x20e0, 0xb8c8, 0x2098, 0xa860, 0x20e8, 0xa85c,
+	0x9080, 0x0002, 0x20a0, 0x4003, 0x20a9, 0x0008, 0x9080, 0x0006,
+	0x20a0, 0xbbc8, 0x9398, 0x0006, 0x2398, 0x080c, 0x0f7c, 0x009e,
+	0xa87b, 0x0000, 0xa883, 0x0000, 0xa897, 0x4000, 0xd684, 0x1168,
+	0x080c, 0x575d, 0xd0b4, 0x1118, 0xa89b, 0x000b, 0x00e0, 0xb800,
+	0xd08c, 0x0118, 0xa89b, 0x000c, 0x00b0, 0x080c, 0x6a0c, 0x0118,
+	0xa89b, 0x0009, 0x0080, 0x080c, 0x5771, 0x0118, 0xa89b, 0x0007,
+	0x0050, 0x080c, 0xce51, 0x1904, 0x6463, 0x2009, 0x0003, 0x2001,
+	0x4005, 0x0804, 0x642e, 0xa87b, 0x0030, 0xa897, 0x4005, 0xa804,
+	0x8006, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080,
+	0x0002, 0x2009, 0x002b, 0xaaa0, 0xab9c, 0xaca8, 0xada4, 0x2031,
+	0x0000, 0x2041, 0x1243, 0x080c, 0xb45d, 0x1904, 0x6463, 0x2009,
+	0x0002, 0x08e8, 0x2001, 0x0028, 0x900e, 0x0804, 0x6464, 0x2009,
+	0x180c, 0x210c, 0xd18c, 0x0118, 0x2001, 0x0004, 0x0038, 0xd184,
+	0x0118, 0x2001, 0x0004, 0x0010, 0x2001, 0x0029, 0x900e, 0x0804,
+	0x6464, 0x2001, 0x0029, 0x900e, 0x0804, 0x6464, 0x080c, 0x37b3,
+	0x0804, 0x6465, 0x080c, 0x5488, 0x0804, 0x6465, 0x080c, 0x45b1,
+	0x0804, 0x6465, 0x080c, 0x462a, 0x0804, 0x6465, 0x080c, 0x4686,
+	0x0804, 0x6465, 0x080c, 0x4af5, 0x0804, 0x6465, 0x080c, 0x4da9,
+	0x0804, 0x6465, 0x080c, 0x50f0, 0x0804, 0x6465, 0x080c, 0x52e9,
+	0x0804, 0x6465, 0x080c, 0x39c9, 0x0804, 0x6465, 0x00b6, 0xa974,
+	0xae78, 0x9684, 0x3fff, 0x9082, 0x4000, 0x1618, 0x9182, 0x0800,
+	0x1268, 0x9188, 0x1000, 0x2104, 0x905d, 0x0140, 0x080c, 0x6a0c,
+	0x1148, 0x00e9, 0x080c, 0x67c4, 0x9006, 0x00b0, 0x2001, 0x0028,
+	0x900e, 0x0090, 0x9082, 0x0006, 0x1240, 0xb900, 0xd1fc, 0x0d88,
+	0x2001, 0x0029, 0x2009, 0x1000, 0x0038, 0x2001, 0x0029, 0x900e,
+	0x0018, 0x2001, 0x0029, 0x900e, 0x9005, 0x00be, 0x0005, 0x0126,
+	0x2091, 0x8000, 0xb850, 0x900d, 0x0150, 0x2900, 0x0096, 0x2148,
+	0xa802, 0x009e, 0xa803, 0x0000, 0xb852, 0x012e, 0x0005, 0x2900,
+	0xb852, 0xb84e, 0xa803, 0x0000, 0x0cc0, 0x0126, 0x2091, 0x8000,
+	0xb84c, 0x9005, 0x0170, 0x00e6, 0x2071, 0x19e6, 0x7004, 0x9086,
+	0x0002, 0x0168, 0x00ee, 0xb84c, 0xa802, 0x2900, 0xb84e, 0x012e,
+	0x0005, 0x2900, 0xb852, 0xb84e, 0xa803, 0x0000, 0x0cc0, 0x701c,
+	0x9b06, 0x1d80, 0xb84c, 0x00a6, 0x2050, 0xb000, 0xa802, 0x2900,
+	0xb002, 0x00ae, 0x00ee, 0x012e, 0x0005, 0x0126, 0x2091, 0x8000,
 	0xb84c, 0x904d, 0x0130, 0xa800, 0x9005, 0x1108, 0xb852, 0xb84e,
-	0x9905, 0x0005, 0x00b6, 0x0126, 0x00c6, 0x0026, 0x2091, 0x8000,
-	0x6210, 0x2258, 0xba00, 0x9005, 0x0110, 0xc285, 0x0008, 0xc284,
-	0xba02, 0x002e, 0x00ce, 0x012e, 0x00be, 0x0005, 0x00b6, 0x0126,
-	0x00c6, 0x2091, 0x8000, 0x6210, 0x2258, 0xba04, 0x0006, 0x9086,
-	0x0006, 0x1170, 0xb89c, 0xd0ac, 0x0158, 0x080c, 0x6985, 0x0140,
-	0x9284, 0xff00, 0x8007, 0x9086, 0x0007, 0x1110, 0x2011, 0x0600,
-	0x000e, 0x9294, 0xff00, 0x9215, 0xba06, 0x0006, 0x9086, 0x0006,
-	0x1120, 0xba90, 0x82ff, 0x090c, 0x0dd5, 0x000e, 0x00ce, 0x012e,
-	0x00be, 0x0005, 0x00b6, 0x0126, 0x00c6, 0x2091, 0x8000, 0x6210,
-	0x2258, 0xba04, 0x0006, 0x9086, 0x0006, 0x1168, 0xb89c, 0xd0a4,
-	0x0150, 0x080c, 0x6981, 0x1138, 0x9284, 0x00ff, 0x9086, 0x0007,
-	0x1110, 0x2011, 0x0006, 0x000e, 0x9294, 0x00ff, 0x8007, 0x9215,
-	0xba06, 0x00ce, 0x012e, 0x00be, 0x0005, 0x9182, 0x0800, 0x0218,
-	0x9085, 0x0001, 0x0005, 0x00d6, 0x0026, 0x9190, 0x1000, 0x2204,
-	0x905d, 0x1188, 0x0096, 0x080c, 0x0fff, 0x2958, 0x009e, 0x0168,
-	0x2b00, 0x2012, 0xb85c, 0xb8ca, 0xb860, 0xb8c6, 0x9006, 0xb8a6,
-	0xb8ae, 0x080c, 0x6047, 0x9006, 0x0010, 0x9085, 0x0001, 0x002e,
-	0x00de, 0x0005, 0x00b6, 0x0096, 0x0126, 0x2091, 0x8000, 0x0026,
-	0x9182, 0x0800, 0x0218, 0x9085, 0x0001, 0x0458, 0x00d6, 0x9190,
-	0x1000, 0x2204, 0x905d, 0x0518, 0x2013, 0x0000, 0xb8a4, 0x904d,
-	0x0110, 0x080c, 0x1031, 0x00d6, 0x00c6, 0xb8bc, 0x2060, 0x8cff,
-	0x0168, 0x600c, 0x0006, 0x6014, 0x2048, 0x080c, 0xcb5a, 0x0110,
-	0x080c, 0x0fb1, 0x080c, 0xae5f, 0x00ce, 0x0c88, 0x00ce, 0x00de,
-	0x2b48, 0xb8c8, 0xb85e, 0xb8c4, 0xb862, 0x080c, 0x1041, 0x00de,
-	0x9006, 0x002e, 0x012e, 0x009e, 0x00be, 0x0005, 0x0016, 0x9182,
-	0x0800, 0x0218, 0x9085, 0x0001, 0x0030, 0x9188, 0x1000, 0x2104,
-	0x905d, 0x0dc0, 0x9006, 0x001e, 0x0005, 0x00d6, 0x0156, 0x0136,
-	0x0146, 0x9006, 0xb80a, 0xb80e, 0xb800, 0xc08c, 0xb802, 0x080c,
-	0x73b3, 0x1510, 0xb8a0, 0x9086, 0x007e, 0x0120, 0x080c, 0xadc9,
-	0x11d8, 0x0078, 0x7040, 0xd0e4, 0x01b8, 0x00c6, 0x2061, 0x1981,
-	0x7048, 0x2062, 0x704c, 0x6006, 0x7050, 0x600a, 0x7054, 0x600e,
-	0x00ce, 0x703c, 0x2069, 0x0140, 0x9005, 0x1110, 0x2001, 0x0001,
-	0x6886, 0x2069, 0x1800, 0x68b6, 0x7040, 0xb85e, 0x7048, 0xb862,
-	0x704c, 0xb866, 0x20e1, 0x0000, 0x2099, 0x0276, 0xb8c4, 0x20e8,
-	0xb8c8, 0x9088, 0x000a, 0x21a0, 0x20a9, 0x0004, 0x4003, 0x2099,
-	0x027a, 0x9088, 0x0006, 0x21a0, 0x20a9, 0x0004, 0x4003, 0x2069,
-	0x0200, 0x6817, 0x0001, 0x7040, 0xb86a, 0x7144, 0xb96e, 0x7048,
-	0xb872, 0x7050, 0xb876, 0x2069, 0x0200, 0x6817, 0x0000, 0xb8a0,
-	0x9086, 0x007e, 0x1110, 0x7144, 0xb96e, 0x9182, 0x0211, 0x1218,
-	0x2009, 0x0008, 0x0400, 0x9182, 0x0259, 0x1218, 0x2009, 0x0007,
-	0x00d0, 0x9182, 0x02c1, 0x1218, 0x2009, 0x0006, 0x00a0, 0x9182,
-	0x0349, 0x1218, 0x2009, 0x0005, 0x0070, 0x9182, 0x0421, 0x1218,
-	0x2009, 0x0004, 0x0040, 0x9182, 0x0581, 0x1218, 0x2009, 0x0003,
-	0x0010, 0x2009, 0x0002, 0xb992, 0x014e, 0x013e, 0x015e, 0x00de,
-	0x0005, 0x0016, 0x0026, 0x00e6, 0x2071, 0x0260, 0x7034, 0xb896,
-	0x703c, 0xb89a, 0x7054, 0xb89e, 0x0036, 0xbbcc, 0xc384, 0xba00,
-	0x2009, 0x1867, 0x210c, 0xd0bc, 0x0120, 0xd1ec, 0x0110, 0xc2ad,
-	0x0008, 0xc2ac, 0xd0c4, 0x0148, 0xd1e4, 0x0138, 0xc2bd, 0xd0cc,
-	0x0128, 0xd38c, 0x1108, 0xc385, 0x0008, 0xc2bc, 0xba02, 0xbbce,
-	0x003e, 0x00ee, 0x002e, 0x001e, 0x0005, 0x0096, 0x0126, 0x2091,
-	0x8000, 0xb8a4, 0x904d, 0x0578, 0xa900, 0x81ff, 0x15c0, 0xaa04,
-	0x9282, 0x0010, 0x16c8, 0x0136, 0x0146, 0x01c6, 0x01d6, 0x8906,
-	0x8006, 0x8007, 0x908c, 0x003f, 0x21e0, 0x9084, 0xffc0, 0x9080,
-	0x0004, 0x2098, 0x2009, 0x0010, 0x20a9, 0x0001, 0x4002, 0x9086,
-	0xffff, 0x0120, 0x8109, 0x1dd0, 0x080c, 0x0dd5, 0x3c00, 0x20e8,
-	0x3300, 0x8001, 0x20a0, 0x4604, 0x8210, 0xaa06, 0x01de, 0x01ce,
-	0x014e, 0x013e, 0x0060, 0x080c, 0x0fff, 0x0170, 0x2900, 0xb8a6,
-	0xa803, 0x0000, 0x080c, 0x67d2, 0xa807, 0x0001, 0xae12, 0x9085,
-	0x0001, 0x012e, 0x009e, 0x0005, 0x9006, 0x0cd8, 0x0126, 0x2091,
-	0x8000, 0x0096, 0xb8a4, 0x904d, 0x0188, 0xa800, 0x9005, 0x1150,
-	0x080c, 0x67e1, 0x1158, 0xa804, 0x908a, 0x0002, 0x0218, 0x8001,
-	0xa806, 0x0020, 0x080c, 0x1031, 0xb8a7, 0x0000, 0x009e, 0x012e,
-	0x0005, 0x0126, 0x2091, 0x8000, 0x080c, 0x9115, 0x012e, 0x0005,
-	0x901e, 0x0010, 0x2019, 0x0001, 0x900e, 0x0126, 0x2091, 0x8000,
-	0xb84c, 0x2048, 0xb800, 0xd0dc, 0x1170, 0x89ff, 0x0500, 0x83ff,
-	0x0120, 0xa878, 0x9606, 0x0158, 0x0030, 0xa86c, 0x9406, 0x1118,
-	0xa870, 0x9506, 0x0120, 0x2908, 0xa800, 0x2048, 0x0c70, 0x080c,
-	0xa67d, 0xaa00, 0xb84c, 0x9906, 0x1110, 0xba4e, 0x0020, 0x00a6,
-	0x2150, 0xb202, 0x00ae, 0x82ff, 0x1110, 0xb952, 0x89ff, 0x012e,
-	0x0005, 0x9016, 0x0489, 0x1110, 0x2011, 0x0001, 0x0005, 0x080c,
-	0x6836, 0x0128, 0x080c, 0xcc17, 0x0010, 0x9085, 0x0001, 0x0005,
-	0x080c, 0x6836, 0x0128, 0x080c, 0xcbbc, 0x0010, 0x9085, 0x0001,
-	0x0005, 0x080c, 0x6836, 0x0128, 0x080c, 0xcc14, 0x0010, 0x9085,
-	0x0001, 0x0005, 0x080c, 0x6836, 0x0128, 0x080c, 0xcbdb, 0x0010,
-	0x9085, 0x0001, 0x0005, 0x080c, 0x6836, 0x0128, 0x080c, 0xcc58,
-	0x0010, 0x9085, 0x0001, 0x0005, 0xb8a4, 0x900d, 0x1118, 0x9085,
-	0x0001, 0x0005, 0x0136, 0x01c6, 0xa800, 0x9005, 0x11b8, 0x890e,
-	0x810e, 0x810f, 0x9184, 0x003f, 0x20e0, 0x9184, 0xffc0, 0x9080,
-	0x0004, 0x2098, 0x20a9, 0x0001, 0x2009, 0x0010, 0x4002, 0x9606,
-	0x0128, 0x8109, 0x1dd8, 0x9085, 0x0001, 0x0008, 0x9006, 0x01ce,
-	0x013e, 0x0005, 0x0146, 0x01d6, 0xa860, 0x20e8, 0xa85c, 0x9080,
-	0x0004, 0x20a0, 0x20a9, 0x0010, 0x2009, 0xffff, 0x4104, 0x01de,
-	0x014e, 0x0136, 0x01c6, 0xa800, 0x9005, 0x11b8, 0x890e, 0x810e,
-	0x810f, 0x9184, 0x003f, 0x20e0, 0x9184, 0xffc0, 0x9080, 0x0004,
-	0x2098, 0x20a9, 0x0001, 0x2009, 0x0010, 0x4002, 0x9606, 0x0128,
-	0x8109, 0x1dd8, 0x9085, 0x0001, 0x0068, 0x0146, 0x01d6, 0x3300,
-	0x8001, 0x20a0, 0x3c00, 0x20e8, 0x2001, 0xffff, 0x4004, 0x01de,
-	0x014e, 0x9006, 0x01ce, 0x013e, 0x0005, 0x0096, 0x0126, 0x2091,
-	0x8000, 0xb8a4, 0x904d, 0x1128, 0x080c, 0x0fff, 0x0168, 0x2900,
-	0xb8a6, 0x080c, 0x67d2, 0xa803, 0x0001, 0xa807, 0x0000, 0x9085,
-	0x0001, 0x012e, 0x009e, 0x0005, 0x9006, 0x0cd8, 0x0096, 0x0126,
-	0x2091, 0x8000, 0xb8a4, 0x904d, 0x0130, 0xb8a7, 0x0000, 0x080c,
-	0x1031, 0x9085, 0x0001, 0x012e, 0x009e, 0x0005, 0xb89c, 0xd0a4,
-	0x0005, 0x00b6, 0x00f6, 0x080c, 0x73b3, 0x01b0, 0x71c4, 0x81ff,
-	0x1198, 0x71dc, 0xd19c, 0x0180, 0x2001, 0x007e, 0x9080, 0x1000,
-	0x2004, 0x905d, 0x0148, 0xb804, 0x9084, 0x00ff, 0x9086, 0x0006,
-	0x1118, 0xb800, 0xc0ed, 0xb802, 0x2079, 0x1847, 0x7804, 0xd0a4,
-	0x01d0, 0x0156, 0x20a9, 0x007f, 0x900e, 0x0016, 0x080c, 0x6616,
-	0x1168, 0xb804, 0x9084, 0xff00, 0x8007, 0x9096, 0x0004, 0x0118,
-	0x9086, 0x0006, 0x1118, 0xb800, 0xc0ed, 0xb802, 0x001e, 0x8108,
-	0x1f04, 0x685d, 0x015e, 0x080c, 0x6947, 0x0120, 0x2001, 0x1984,
-	0x200c, 0x0038, 0x2079, 0x1847, 0x7804, 0xd0a4, 0x0130, 0x2009,
-	0x07d0, 0x2011, 0x6888, 0x080c, 0x8591, 0x00fe, 0x00be, 0x0005,
-	0x00b6, 0x2011, 0x6888, 0x080c, 0x84f9, 0x080c, 0x6947, 0x01d8,
-	0x2001, 0x107e, 0x2004, 0x2058, 0xb900, 0xc1ec, 0xb902, 0x080c,
-	0x6985, 0x0130, 0x2009, 0x07d0, 0x2011, 0x6888, 0x080c, 0x8591,
-	0x00e6, 0x2071, 0x1800, 0x9006, 0x707e, 0x7060, 0x7082, 0x080c,
-	0x2fa3, 0x00ee, 0x04b0, 0x0156, 0x00c6, 0x20a9, 0x007f, 0x900e,
-	0x0016, 0x080c, 0x6616, 0x1538, 0xb800, 0xd0ec, 0x0520, 0x0046,
-	0xbaa0, 0x2220, 0x9006, 0x2009, 0x0029, 0x080c, 0xe5e9, 0xb800,
-	0xc0e5, 0xc0ec, 0xb802, 0x080c, 0x6981, 0x2001, 0x0707, 0x1128,
-	0xb804, 0x9084, 0x00ff, 0x9085, 0x0700, 0xb806, 0x2019, 0x0029,
-	0x080c, 0x929d, 0x0076, 0x903e, 0x080c, 0x9170, 0x900e, 0x080c,
-	0xe326, 0x007e, 0x004e, 0x001e, 0x8108, 0x1f04, 0x68b0, 0x00ce,
-	0x015e, 0x00be, 0x0005, 0x00b6, 0x6010, 0x2058, 0xb800, 0xc0ec,
-	0xb802, 0x00be, 0x0005, 0x00b6, 0x00c6, 0x0096, 0x080c, 0x1018,
-	0x090c, 0x0dd5, 0x2958, 0x009e, 0x2001, 0x196a, 0x2b02, 0x8b07,
-	0x8006, 0x8006, 0x908c, 0x003f, 0xb9c6, 0x908c, 0xffc0, 0xb9ca,
-	0xb8af, 0x0000, 0x2009, 0x00ff, 0x080c, 0x6047, 0xb807, 0x0006,
-	0xb813, 0x00ff, 0xb817, 0xffff, 0xb86f, 0x0200, 0xb86c, 0xb893,
-	0x0002, 0xb8bb, 0x0520, 0xb8a3, 0x00ff, 0xb8af, 0x0000, 0x00ce,
-	0x00be, 0x0005, 0x7810, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0ac,
-	0x0005, 0x6010, 0x00b6, 0x905d, 0x0108, 0xb800, 0x00be, 0xd0bc,
-	0x0005, 0x0006, 0x0016, 0x0026, 0xb804, 0x908c, 0x00ff, 0x9196,
-	0x0006, 0x0188, 0x9196, 0x0004, 0x0170, 0x9196, 0x0005, 0x0158,
-	0x908c, 0xff00, 0x810f, 0x9196, 0x0006, 0x0128, 0x9196, 0x0004,
-	0x0110, 0x9196, 0x0005, 0x002e, 0x001e, 0x000e, 0x0005, 0x00b6,
-	0x00f6, 0x2001, 0x107e, 0x2004, 0x905d, 0x0110, 0xb800, 0xd0ec,
-	0x00fe, 0x00be, 0x0005, 0x0126, 0x0026, 0x2091, 0x8000, 0x0006,
-	0xbaa0, 0x9290, 0x1000, 0x2204, 0x9b06, 0x190c, 0x0dd5, 0x000e,
-	0xba00, 0x9005, 0x0110, 0xc2fd, 0x0008, 0xc2fc, 0xba02, 0x002e,
-	0x012e, 0x0005, 0x2011, 0x1837, 0x2204, 0xd0cc, 0x0138, 0x2001,
-	0x1982, 0x200c, 0x2011, 0x6977, 0x080c, 0x8591, 0x0005, 0x2011,
-	0x6977, 0x080c, 0x84f9, 0x2011, 0x1837, 0x2204, 0xc0cc, 0x2012,
-	0x0005, 0x080c, 0x56e2, 0xd0ac, 0x0005, 0x080c, 0x56e2, 0xd0a4,
-	0x0005, 0x0016, 0xb904, 0x9184, 0x00ff, 0x908e, 0x0006, 0x001e,
-	0x0005, 0x0016, 0xb904, 0x9184, 0xff00, 0x8007, 0x908e, 0x0006,
-	0x001e, 0x0005, 0x00b6, 0x00f6, 0x080c, 0xd25a, 0x0158, 0x70dc,
-	0x9084, 0x0028, 0x0138, 0x2001, 0x107f, 0x2004, 0x905d, 0x0110,
-	0xb8cc, 0xd094, 0x00fe, 0x00be, 0x0005, 0x2071, 0x1910, 0x7003,
-	0x0001, 0x7007, 0x0000, 0x9006, 0x7012, 0x7016, 0x701a, 0x701e,
-	0x700a, 0x7046, 0x0005, 0x0016, 0x00e6, 0x2071, 0x1947, 0x900e,
-	0x710a, 0x080c, 0x56e2, 0xd0fc, 0x1140, 0x080c, 0x56e2, 0x900e,
-	0xd09c, 0x0108, 0x8108, 0x7102, 0x00f8, 0x2001, 0x1867, 0x200c,
-	0x9184, 0x0007, 0x0002, 0x69c5, 0x69c5, 0x69c5, 0x69c5, 0x69c5,
-	0x69db, 0x69e9, 0x69c5, 0x7003, 0x0003, 0x2009, 0x1868, 0x210c,
-	0x9184, 0xff00, 0x8007, 0x9005, 0x1110, 0x2001, 0x0002, 0x7006,
-	0x0018, 0x7003, 0x0005, 0x0c88, 0x00ee, 0x001e, 0x0005, 0x00e6,
-	0x2071, 0x0050, 0x684c, 0x9005, 0x1150, 0x00e6, 0x2071, 0x1910,
-	0x7028, 0xc085, 0x702a, 0x00ee, 0x9085, 0x0001, 0x0488, 0x6844,
-	0x9005, 0x0158, 0x080c, 0x770b, 0x6a60, 0x9200, 0x7002, 0x6864,
-	0x9101, 0x7006, 0x9006, 0x7012, 0x7016, 0x6860, 0x7002, 0x6864,
-	0x7006, 0x6868, 0x700a, 0x686c, 0x700e, 0x6844, 0x9005, 0x1110,
-	0x7012, 0x7016, 0x684c, 0x701a, 0x701c, 0x9085, 0x0040, 0x701e,
-	0x7037, 0x0019, 0x702b, 0x0001, 0x00e6, 0x2071, 0x1910, 0x7028,
-	0xc084, 0x702a, 0x7007, 0x0001, 0x700b, 0x0000, 0x00ee, 0x9006,
-	0x00ee, 0x0005, 0x00e6, 0x0026, 0x2071, 0x1947, 0x7000, 0x9015,
-	0x0904, 0x6c99, 0x9286, 0x0003, 0x0904, 0x6b2f, 0x9286, 0x0005,
-	0x0904, 0x6b2f, 0x2071, 0x1877, 0xa87c, 0x9005, 0x0904, 0x6a90,
-	0x7140, 0xa868, 0x9102, 0x0a04, 0x6c99, 0xa878, 0xd084, 0x15d8,
-	0xa853, 0x0019, 0x2001, 0x8023, 0xa84e, 0x2071, 0x1910, 0x701c,
-	0x9005, 0x1904, 0x6e2f, 0x0e04, 0x6e9d, 0x2071, 0x0000, 0xa850,
-	0x7032, 0xa84c, 0x7082, 0xa870, 0x7086, 0xa86c, 0x708a, 0xa880,
-	0x708e, 0x7036, 0x0146, 0x01d6, 0x0136, 0x01c6, 0x0156, 0x20e9,
-	0x0000, 0x20a1, 0x002a, 0xa868, 0x20a8, 0xa860, 0x20e0, 0xa85c,
-	0x9080, 0x0021, 0x2098, 0x4003, 0x015e, 0x01ce, 0x013e, 0x01de,
-	0x014e, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c,
-	0x119b, 0x0804, 0x6b12, 0xa853, 0x001b, 0x2001, 0x8027, 0x0820,
-	0x7004, 0xd08c, 0x1904, 0x6c99, 0xa853, 0x001a, 0x2001, 0x8024,
-	0x0804, 0x6a54, 0x00e6, 0x0026, 0x2071, 0x1947, 0x7000, 0x9015,
-	0x0904, 0x6c99, 0x9286, 0x0003, 0x0904, 0x6b2f, 0x9286, 0x0005,
-	0x0904, 0x6b2f, 0xa84f, 0x8022, 0xa853, 0x0018, 0x0804, 0x6af7,
-	0xa868, 0xd0fc, 0x11d8, 0x00e6, 0x0026, 0x2001, 0x1947, 0x2004,
-	0x9005, 0x0904, 0x6c99, 0xa87c, 0xd0bc, 0x1904, 0x6c99, 0xa978,
-	0xa874, 0x9105, 0x1904, 0x6c99, 0x2001, 0x1947, 0x2004, 0x0002,
-	0x6c99, 0x6af3, 0x6b2f, 0x6b2f, 0x6c99, 0x6b2f, 0x0005, 0xa868,
-	0xd0fc, 0x1500, 0x00e6, 0x0026, 0x2009, 0x1947, 0x210c, 0x81ff,
-	0x0904, 0x6c99, 0xa87c, 0xd0cc, 0x0904, 0x6c99, 0xa880, 0x9084,
-	0x00ff, 0x9086, 0x0001, 0x1904, 0x6c99, 0x9186, 0x0003, 0x0904,
-	0x6b2f, 0x9186, 0x0005, 0x0904, 0x6b2f, 0xa84f, 0x8021, 0xa853,
-	0x0017, 0x0028, 0x0005, 0xa84f, 0x8020, 0xa853, 0x0016, 0x2071,
-	0x1910, 0x701c, 0x9005, 0x1904, 0x6e2f, 0x0e04, 0x6e9d, 0x2071,
-	0x0000, 0xa84c, 0x7082, 0xa850, 0x7032, 0xa86c, 0x7086, 0x7036,
-	0xa870, 0x708a, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084,
-	0x190c, 0x119b, 0x2071, 0x1800, 0x2011, 0x0001, 0xa804, 0x900d,
-	0x702c, 0x1158, 0xa802, 0x2900, 0x702e, 0x70c0, 0x9200, 0x70c2,
-	0x080c, 0x841a, 0x002e, 0x00ee, 0x0005, 0x0096, 0x2148, 0xa904,
-	0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x009e, 0x0c58, 0xa84f,
-	0x0000, 0x00f6, 0x2079, 0x0050, 0x2071, 0x1910, 0xa803, 0x0000,
-	0x7010, 0x9005, 0x1904, 0x6c1e, 0x782c, 0x908c, 0x0780, 0x190c,
-	0x6fe9, 0x8004, 0x8004, 0x8004, 0x9084, 0x0003, 0x0002, 0x6b4d,
-	0x6c1e, 0x6b72, 0x6bb9, 0x080c, 0x0dd5, 0x2071, 0x1800, 0x2900,
-	0x7822, 0xa804, 0x900d, 0x1170, 0x2071, 0x19f9, 0x703c, 0x9005,
-	0x1328, 0x2001, 0x1948, 0x2004, 0x8005, 0x703e, 0x00fe, 0x002e,
-	0x00ee, 0x0005, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210,
-	0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c,
-	0x841a, 0x0c10, 0x2071, 0x1800, 0x2900, 0x7822, 0xa804, 0x900d,
-	0x1580, 0x7824, 0x00e6, 0x2071, 0x0040, 0x712c, 0xd19c, 0x1148,
-	0x2009, 0x1830, 0x210c, 0x918a, 0x0020, 0x0218, 0x7022, 0x00ee,
-	0x0058, 0x00ee, 0x2048, 0x702c, 0xa802, 0x2900, 0x702e, 0x70c0,
-	0x8000, 0x70c2, 0x080c, 0x841a, 0x782c, 0x9094, 0x0780, 0x190c,
-	0x6fe9, 0xd0a4, 0x19f0, 0x2071, 0x19f9, 0x703c, 0x9005, 0x1328,
-	0x2001, 0x1948, 0x2004, 0x8005, 0x703e, 0x00fe, 0x002e, 0x00ee,
-	0x0005, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900,
-	0x81ff, 0x1dc8, 0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c, 0x841a,
-	0x0800, 0x0096, 0x00e6, 0x7824, 0x2048, 0x2071, 0x1800, 0x702c,
-	0xa802, 0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2, 0x080c, 0x841a,
-	0x782c, 0x9094, 0x0780, 0x190c, 0x6fe9, 0xd0a4, 0x1d60, 0x00ee,
-	0x782c, 0x9094, 0x0780, 0x190c, 0x6fe9, 0xd09c, 0x11a0, 0x009e,
-	0x2900, 0x7822, 0xa804, 0x900d, 0x1560, 0x2071, 0x19f9, 0x703c,
-	0x9005, 0x1328, 0x2001, 0x1948, 0x2004, 0x8005, 0x703e, 0x00fe,
-	0x002e, 0x00ee, 0x0005, 0x009e, 0x2908, 0x7010, 0x8000, 0x7012,
-	0x7018, 0x904d, 0x711a, 0x0110, 0xa902, 0x0008, 0x711e, 0x2148,
-	0xa804, 0x900d, 0x1170, 0x2071, 0x19f9, 0x703c, 0x9005, 0x1328,
-	0x2001, 0x1948, 0x2004, 0x8005, 0x703e, 0x00fe, 0x002e, 0x00ee,
-	0x0005, 0x2071, 0x1800, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802,
-	0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70c0, 0x9200, 0x70c2,
-	0x080c, 0x841a, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x2908, 0x7010,
-	0x8000, 0x7012, 0x7018, 0x904d, 0x711a, 0x0110, 0xa902, 0x0008,
-	0x711e, 0x2148, 0xa804, 0x900d, 0x1904, 0x6c73, 0x782c, 0x9094,
-	0x0780, 0x190c, 0x6fe9, 0xd09c, 0x1198, 0x701c, 0x904d, 0x0180,
-	0x7010, 0x8001, 0x7012, 0x1108, 0x701a, 0xa800, 0x701e, 0x2900,
-	0x7822, 0x782c, 0x9094, 0x0780, 0x190c, 0x6fe9, 0xd09c, 0x0d68,
-	0x782c, 0x9094, 0x0780, 0x190c, 0x6fe9, 0xd0a4, 0x01b0, 0x00e6,
-	0x7824, 0x2048, 0x2071, 0x1800, 0x702c, 0xa802, 0x2900, 0x702e,
-	0x70c0, 0x8000, 0x70c2, 0x080c, 0x841a, 0x782c, 0x9094, 0x0780,
-	0x190c, 0x6fe9, 0xd0a4, 0x1d60, 0x00ee, 0x2071, 0x19f9, 0x703c,
-	0x9005, 0x1328, 0x2001, 0x1948, 0x2004, 0x8005, 0x703e, 0x00fe,
-	0x002e, 0x00ee, 0x0005, 0x00e6, 0x2071, 0x1800, 0x9016, 0x702c,
-	0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e,
-	0x70c0, 0x9200, 0x70c2, 0x080c, 0x841a, 0x00ee, 0x0804, 0x6c2e,
-	0xa868, 0xd0fc, 0x1560, 0x0096, 0xa804, 0xa807, 0x0000, 0x904d,
-	0x190c, 0x0fb1, 0x009e, 0x0018, 0xa868, 0xd0fc, 0x1500, 0x00e6,
-	0x0026, 0xa84f, 0x0000, 0x00f6, 0x2079, 0x0050, 0x2071, 0x1910,
-	0xa803, 0x0000, 0x7010, 0x9005, 0x1904, 0x6dad, 0x782c, 0x908c,
-	0x0780, 0x190c, 0x6fe9, 0x8004, 0x8004, 0x8004, 0x9084, 0x0003,
-	0x0002, 0x6cb8, 0x6dad, 0x6cd3, 0x6d40, 0x080c, 0x0dd5, 0x0005,
-	0x2071, 0x1800, 0x2900, 0x7822, 0xa804, 0x900d, 0x1120, 0x00fe,
-	0x002e, 0x00ee, 0x0005, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802,
-	0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70c0, 0x9200, 0x70c2,
-	0x080c, 0x841a, 0x0c60, 0x2071, 0x1800, 0x2900, 0x7822, 0xa804,
-	0x900d, 0x1904, 0x6d2f, 0x7830, 0x8007, 0x9084, 0x001f, 0x9082,
-	0x0001, 0x1220, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x7824, 0x00e6,
-	0x2071, 0x0040, 0x712c, 0xd19c, 0x1148, 0x2009, 0x1830, 0x210c,
-	0x918a, 0x0020, 0x0218, 0x7022, 0x00ee, 0x0058, 0x00ee, 0x2048,
-	0x702c, 0xa802, 0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2, 0x080c,
-	0x841a, 0x782c, 0x9094, 0x0780, 0x190c, 0x6fe9, 0xd0a4, 0x19f0,
-	0x0e04, 0x6d26, 0x7838, 0x7938, 0x910e, 0x1de0, 0x00d6, 0x2069,
-	0x0000, 0x6836, 0x6833, 0x0013, 0x00de, 0x2001, 0x1921, 0x200c,
-	0xc184, 0x2102, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084,
-	0x190c, 0x119b, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x2001, 0x1921,
-	0x200c, 0xc185, 0x2102, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x9016,
-	0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8,
-	0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c, 0x841a, 0x0804, 0x6ce6,
-	0x0096, 0x00e6, 0x7824, 0x2048, 0x2071, 0x1800, 0x702c, 0xa802,
-	0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2, 0x080c, 0x841a, 0x782c,
-	0x9094, 0x0780, 0x190c, 0x6fe9, 0xd0a4, 0x1d60, 0x00ee, 0x0e04,
-	0x6d80, 0x7838, 0x7938, 0x910e, 0x1de0, 0x00d6, 0x2069, 0x0000,
-	0x6836, 0x6833, 0x0013, 0x00de, 0x7044, 0xc084, 0x7046, 0x2091,
-	0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x119b, 0x782c,
-	0x9094, 0x0780, 0x190c, 0x6fe9, 0xd09c, 0x1170, 0x009e, 0x2900,
-	0x7822, 0xa804, 0x900d, 0x11e0, 0x00fe, 0x002e, 0x00ee, 0x0005,
-	0x7044, 0xc085, 0x7046, 0x0c58, 0x009e, 0x2908, 0x7010, 0x8000,
-	0x7012, 0x7018, 0x904d, 0x711a, 0x0110, 0xa902, 0x0008, 0x711e,
-	0x2148, 0xa804, 0x900d, 0x1120, 0x00fe, 0x002e, 0x00ee, 0x0005,
-	0x2071, 0x1800, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210,
-	0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c,
-	0x841a, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x2908, 0x7010, 0x8000,
-	0x7012, 0x7018, 0x904d, 0x711a, 0x0110, 0xa902, 0x0008, 0x711e,
-	0x2148, 0xa804, 0x900d, 0x1904, 0x6e1a, 0x782c, 0x9094, 0x0780,
-	0x190c, 0x6fe9, 0xd09c, 0x11b0, 0x701c, 0x904d, 0x0198, 0xa84c,
-	0x9005, 0x1180, 0x7010, 0x8001, 0x7012, 0x1108, 0x701a, 0xa800,
-	0x701e, 0x2900, 0x7822, 0x782c, 0x9094, 0x0780, 0x190c, 0x6fe9,
-	0xd09c, 0x0d50, 0x782c, 0x9094, 0x0780, 0x190c, 0x6fe9, 0xd0a4,
-	0x05a8, 0x00e6, 0x7824, 0x2048, 0x2071, 0x1800, 0x702c, 0xa802,
-	0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2, 0x080c, 0x841a, 0x782c,
-	0x9094, 0x0780, 0x190c, 0x6fe9, 0xd0a4, 0x1d60, 0x00ee, 0x0e04,
-	0x6e13, 0x7838, 0x7938, 0x910e, 0x1de0, 0x00d6, 0x2069, 0x0000,
-	0x6836, 0x6833, 0x0013, 0x00de, 0x7044, 0xc084, 0x7046, 0x2091,
-	0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x119b, 0x00fe,
-	0x002e, 0x00ee, 0x0005, 0x7044, 0xc085, 0x7046, 0x00fe, 0x002e,
-	0x00ee, 0x0005, 0x00e6, 0x2071, 0x1800, 0x9016, 0x702c, 0x2148,
-	0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70c0,
-	0x9200, 0x70c2, 0x080c, 0x841a, 0x00ee, 0x0804, 0x6dbd, 0x2071,
-	0x1910, 0xa803, 0x0000, 0x2908, 0x7010, 0x8000, 0x7012, 0x7018,
-	0x904d, 0x711a, 0x0110, 0xa902, 0x0008, 0x711e, 0x2148, 0xa804,
-	0x900d, 0x1128, 0x1e04, 0x6e5a, 0x002e, 0x00ee, 0x0005, 0x2071,
-	0x1800, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900,
-	0x81ff, 0x1dc8, 0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c, 0x841a,
-	0x0e04, 0x6e44, 0x2071, 0x1910, 0x701c, 0x2048, 0xa84c, 0x900d,
-	0x0d18, 0x2071, 0x0000, 0x7182, 0xa850, 0x7032, 0xa86c, 0x7086,
-	0x7036, 0xa870, 0x708a, 0xa850, 0x9082, 0x0019, 0x1278, 0x2091,
-	0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x119b, 0x2071,
-	0x1910, 0x080c, 0x6fd5, 0x002e, 0x00ee, 0x0005, 0xa850, 0x9082,
-	0x001c, 0x1e68, 0xa880, 0x708e, 0x7036, 0x0146, 0x01d6, 0x0136,
+	0x9905, 0x012e, 0x0005, 0xb84c, 0x904d, 0x0130, 0xa800, 0x9005,
+	0x1108, 0xb852, 0xb84e, 0x9905, 0x0005, 0x00b6, 0x0126, 0x00c6,
+	0x0026, 0x2091, 0x8000, 0x6210, 0x2258, 0xba00, 0x9005, 0x0110,
+	0xc285, 0x0008, 0xc284, 0xba02, 0x002e, 0x00ce, 0x012e, 0x00be,
+	0x0005, 0x00b6, 0x0126, 0x00c6, 0x2091, 0x8000, 0x6210, 0x2258,
+	0xba04, 0x0006, 0x9086, 0x0006, 0x1170, 0xb89c, 0xd0ac, 0x0158,
+	0x080c, 0x6a08, 0x0140, 0x9284, 0xff00, 0x8007, 0x9086, 0x0007,
+	0x1110, 0x2011, 0x0600, 0x000e, 0x9294, 0xff00, 0x9215, 0xba06,
+	0x0006, 0x9086, 0x0006, 0x1120, 0xba90, 0x82ff, 0x090c, 0x0dd5,
+	0x000e, 0x00ce, 0x012e, 0x00be, 0x0005, 0x00b6, 0x0126, 0x00c6,
+	0x2091, 0x8000, 0x6210, 0x2258, 0xba04, 0x0006, 0x9086, 0x0006,
+	0x1168, 0xb89c, 0xd0a4, 0x0150, 0x080c, 0x6a04, 0x1138, 0x9284,
+	0x00ff, 0x9086, 0x0007, 0x1110, 0x2011, 0x0006, 0x000e, 0x9294,
+	0x00ff, 0x8007, 0x9215, 0xba06, 0x00ce, 0x012e, 0x00be, 0x0005,
+	0x9182, 0x0800, 0x0218, 0x9085, 0x0001, 0x0005, 0x00d6, 0x0026,
+	0x9190, 0x1000, 0x2204, 0x905d, 0x1188, 0x0096, 0x080c, 0x0fff,
+	0x2958, 0x009e, 0x0168, 0x2b00, 0x2012, 0xb85c, 0xb8ca, 0xb860,
+	0xb8c6, 0x9006, 0xb8a6, 0xb8ae, 0x080c, 0x60c7, 0x9006, 0x0010,
+	0x9085, 0x0001, 0x002e, 0x00de, 0x0005, 0x00b6, 0x0096, 0x0126,
+	0x2091, 0x8000, 0x0026, 0x9182, 0x0800, 0x0218, 0x9085, 0x0001,
+	0x0458, 0x00d6, 0x9190, 0x1000, 0x2204, 0x905d, 0x0518, 0x2013,
+	0x0000, 0xb8a4, 0x904d, 0x0110, 0x080c, 0x1031, 0x00d6, 0x00c6,
+	0xb8bc, 0x2060, 0x8cff, 0x0168, 0x600c, 0x0006, 0x6014, 0x2048,
+	0x080c, 0xcc86, 0x0110, 0x080c, 0x0fb1, 0x080c, 0xaf43, 0x00ce,
+	0x0c88, 0x00ce, 0x00de, 0x2b48, 0xb8c8, 0xb85e, 0xb8c4, 0xb862,
+	0x080c, 0x1041, 0x00de, 0x9006, 0x002e, 0x012e, 0x009e, 0x00be,
+	0x0005, 0x0016, 0x9182, 0x0800, 0x0218, 0x9085, 0x0001, 0x0030,
+	0x9188, 0x1000, 0x2104, 0x905d, 0x0dc0, 0x9006, 0x001e, 0x0005,
+	0x00d6, 0x0156, 0x0136, 0x0146, 0x9006, 0xb80a, 0xb80e, 0xb800,
+	0xc08c, 0xb802, 0x080c, 0x743e, 0x1510, 0xb8a0, 0x9086, 0x007e,
+	0x0120, 0x080c, 0xaead, 0x11d8, 0x0078, 0x7040, 0xd0e4, 0x01b8,
+	0x00c6, 0x2061, 0x1981, 0x7048, 0x2062, 0x704c, 0x6006, 0x7050,
+	0x600a, 0x7054, 0x600e, 0x00ce, 0x703c, 0x2069, 0x0140, 0x9005,
+	0x1110, 0x2001, 0x0001, 0x6886, 0x2069, 0x1800, 0x68b6, 0x7040,
+	0xb85e, 0x7048, 0xb862, 0x704c, 0xb866, 0x20e1, 0x0000, 0x2099,
+	0x0276, 0xb8c4, 0x20e8, 0xb8c8, 0x9088, 0x000a, 0x21a0, 0x20a9,
+	0x0004, 0x4003, 0x2099, 0x027a, 0x9088, 0x0006, 0x21a0, 0x20a9,
+	0x0004, 0x4003, 0x2069, 0x0200, 0x6817, 0x0001, 0x7040, 0xb86a,
+	0x7144, 0xb96e, 0x7048, 0xb872, 0x7050, 0xb876, 0x2069, 0x0200,
+	0x6817, 0x0000, 0xb8a0, 0x9086, 0x007e, 0x1110, 0x7144, 0xb96e,
+	0x9182, 0x0211, 0x1218, 0x2009, 0x0008, 0x0400, 0x9182, 0x0259,
+	0x1218, 0x2009, 0x0007, 0x00d0, 0x9182, 0x02c1, 0x1218, 0x2009,
+	0x0006, 0x00a0, 0x9182, 0x0349, 0x1218, 0x2009, 0x0005, 0x0070,
+	0x9182, 0x0421, 0x1218, 0x2009, 0x0004, 0x0040, 0x9182, 0x0581,
+	0x1218, 0x2009, 0x0003, 0x0010, 0x2009, 0x0002, 0xb992, 0x014e,
+	0x013e, 0x015e, 0x00de, 0x0005, 0x0016, 0x0026, 0x00e6, 0x2071,
+	0x0260, 0x7034, 0xb896, 0x703c, 0xb89a, 0x7054, 0xb89e, 0x0036,
+	0xbbcc, 0xc384, 0xba00, 0x2009, 0x1867, 0x210c, 0xd0bc, 0x0120,
+	0xd1ec, 0x0110, 0xc2ad, 0x0008, 0xc2ac, 0xd0c4, 0x0148, 0xd1e4,
+	0x0138, 0xc2bd, 0xd0cc, 0x0128, 0xd38c, 0x1108, 0xc385, 0x0008,
+	0xc2bc, 0xba02, 0xbbce, 0x003e, 0x00ee, 0x002e, 0x001e, 0x0005,
+	0x0096, 0x0126, 0x2091, 0x8000, 0xb8a4, 0x904d, 0x0578, 0xa900,
+	0x81ff, 0x15c0, 0xaa04, 0x9282, 0x0010, 0x16c8, 0x0136, 0x0146,
+	0x01c6, 0x01d6, 0x8906, 0x8006, 0x8007, 0x908c, 0x003f, 0x21e0,
+	0x9084, 0xffc0, 0x9080, 0x0004, 0x2098, 0x2009, 0x0010, 0x20a9,
+	0x0001, 0x4002, 0x9086, 0xffff, 0x0120, 0x8109, 0x1dd0, 0x080c,
+	0x0dd5, 0x3c00, 0x20e8, 0x3300, 0x8001, 0x20a0, 0x4604, 0x8210,
+	0xaa06, 0x01de, 0x01ce, 0x014e, 0x013e, 0x0060, 0x080c, 0x0fff,
+	0x0170, 0x2900, 0xb8a6, 0xa803, 0x0000, 0x080c, 0x6855, 0xa807,
+	0x0001, 0xae12, 0x9085, 0x0001, 0x012e, 0x009e, 0x0005, 0x9006,
+	0x0cd8, 0x0126, 0x2091, 0x8000, 0x0096, 0xb8a4, 0x904d, 0x0188,
+	0xa800, 0x9005, 0x1150, 0x080c, 0x6864, 0x1158, 0xa804, 0x908a,
+	0x0002, 0x0218, 0x8001, 0xa806, 0x0020, 0x080c, 0x1031, 0xb8a7,
+	0x0000, 0x009e, 0x012e, 0x0005, 0x0126, 0x2091, 0x8000, 0x080c,
+	0x91ce, 0x012e, 0x0005, 0x901e, 0x0010, 0x2019, 0x0001, 0x900e,
+	0x0126, 0x2091, 0x8000, 0xb84c, 0x2048, 0xb800, 0xd0dc, 0x1170,
+	0x89ff, 0x0500, 0x83ff, 0x0120, 0xa878, 0x9606, 0x0158, 0x0030,
+	0xa86c, 0x9406, 0x1118, 0xa870, 0x9506, 0x0120, 0x2908, 0xa800,
+	0x2048, 0x0c70, 0x080c, 0xa761, 0xaa00, 0xb84c, 0x9906, 0x1110,
+	0xba4e, 0x0020, 0x00a6, 0x2150, 0xb202, 0x00ae, 0x82ff, 0x1110,
+	0xb952, 0x89ff, 0x012e, 0x0005, 0x9016, 0x0489, 0x1110, 0x2011,
+	0x0001, 0x0005, 0x080c, 0x68b9, 0x0128, 0x080c, 0xcd43, 0x0010,
+	0x9085, 0x0001, 0x0005, 0x080c, 0x68b9, 0x0128, 0x080c, 0xcce8,
+	0x0010, 0x9085, 0x0001, 0x0005, 0x080c, 0x68b9, 0x0128, 0x080c,
+	0xcd40, 0x0010, 0x9085, 0x0001, 0x0005, 0x080c, 0x68b9, 0x0128,
+	0x080c, 0xcd07, 0x0010, 0x9085, 0x0001, 0x0005, 0x080c, 0x68b9,
+	0x0128, 0x080c, 0xcd86, 0x0010, 0x9085, 0x0001, 0x0005, 0xb8a4,
+	0x900d, 0x1118, 0x9085, 0x0001, 0x0005, 0x0136, 0x01c6, 0xa800,
+	0x9005, 0x11b8, 0x890e, 0x810e, 0x810f, 0x9184, 0x003f, 0x20e0,
+	0x9184, 0xffc0, 0x9080, 0x0004, 0x2098, 0x20a9, 0x0001, 0x2009,
+	0x0010, 0x4002, 0x9606, 0x0128, 0x8109, 0x1dd8, 0x9085, 0x0001,
+	0x0008, 0x9006, 0x01ce, 0x013e, 0x0005, 0x0146, 0x01d6, 0xa860,
+	0x20e8, 0xa85c, 0x9080, 0x0004, 0x20a0, 0x20a9, 0x0010, 0x2009,
+	0xffff, 0x4104, 0x01de, 0x014e, 0x0136, 0x01c6, 0xa800, 0x9005,
+	0x11b8, 0x890e, 0x810e, 0x810f, 0x9184, 0x003f, 0x20e0, 0x9184,
+	0xffc0, 0x9080, 0x0004, 0x2098, 0x20a9, 0x0001, 0x2009, 0x0010,
+	0x4002, 0x9606, 0x0128, 0x8109, 0x1dd8, 0x9085, 0x0001, 0x0068,
+	0x0146, 0x01d6, 0x3300, 0x8001, 0x20a0, 0x3c00, 0x20e8, 0x2001,
+	0xffff, 0x4004, 0x01de, 0x014e, 0x9006, 0x01ce, 0x013e, 0x0005,
+	0x0096, 0x0126, 0x2091, 0x8000, 0xb8a4, 0x904d, 0x1128, 0x080c,
+	0x0fff, 0x0168, 0x2900, 0xb8a6, 0x080c, 0x6855, 0xa803, 0x0001,
+	0xa807, 0x0000, 0x9085, 0x0001, 0x012e, 0x009e, 0x0005, 0x9006,
+	0x0cd8, 0x0096, 0x0126, 0x2091, 0x8000, 0xb8a4, 0x904d, 0x0130,
+	0xb8a7, 0x0000, 0x080c, 0x1031, 0x9085, 0x0001, 0x012e, 0x009e,
+	0x0005, 0xb89c, 0xd0a4, 0x0005, 0x00b6, 0x00f6, 0x080c, 0x743e,
+	0x01b0, 0x71c4, 0x81ff, 0x1198, 0x71dc, 0xd19c, 0x0180, 0x2001,
+	0x007e, 0x9080, 0x1000, 0x2004, 0x905d, 0x0148, 0xb804, 0x9084,
+	0x00ff, 0x9086, 0x0006, 0x1118, 0xb800, 0xc0ed, 0xb802, 0x2079,
+	0x1847, 0x7804, 0xd0a4, 0x01d0, 0x0156, 0x20a9, 0x007f, 0x900e,
+	0x0016, 0x080c, 0x6699, 0x1168, 0xb804, 0x9084, 0xff00, 0x8007,
+	0x9096, 0x0004, 0x0118, 0x9086, 0x0006, 0x1118, 0xb800, 0xc0ed,
+	0xb802, 0x001e, 0x8108, 0x1f04, 0x68e0, 0x015e, 0x080c, 0x69ca,
+	0x0120, 0x2001, 0x1984, 0x200c, 0x0038, 0x2079, 0x1847, 0x7804,
+	0xd0a4, 0x0130, 0x2009, 0x07d0, 0x2011, 0x690b, 0x080c, 0x8648,
+	0x00fe, 0x00be, 0x0005, 0x00b6, 0x2011, 0x690b, 0x080c, 0x85b0,
+	0x080c, 0x69ca, 0x01d8, 0x2001, 0x107e, 0x2004, 0x2058, 0xb900,
+	0xc1ec, 0xb902, 0x080c, 0x6a08, 0x0130, 0x2009, 0x07d0, 0x2011,
+	0x690b, 0x080c, 0x8648, 0x00e6, 0x2071, 0x1800, 0x9006, 0x707e,
+	0x7060, 0x7082, 0x080c, 0x2ff5, 0x00ee, 0x04b0, 0x0156, 0x00c6,
+	0x20a9, 0x007f, 0x900e, 0x0016, 0x080c, 0x6699, 0x1538, 0xb800,
+	0xd0ec, 0x0520, 0x0046, 0xbaa0, 0x2220, 0x9006, 0x2009, 0x0029,
+	0x080c, 0xe73a, 0xb800, 0xc0e5, 0xc0ec, 0xb802, 0x080c, 0x6a04,
+	0x2001, 0x0707, 0x1128, 0xb804, 0x9084, 0x00ff, 0x9085, 0x0700,
+	0xb806, 0x2019, 0x0029, 0x080c, 0x9356, 0x0076, 0x903e, 0x080c,
+	0x9229, 0x900e, 0x080c, 0xe477, 0x007e, 0x004e, 0x001e, 0x8108,
+	0x1f04, 0x6933, 0x00ce, 0x015e, 0x00be, 0x0005, 0x00b6, 0x6010,
+	0x2058, 0xb800, 0xc0ec, 0xb802, 0x00be, 0x0005, 0x00b6, 0x00c6,
+	0x0096, 0x080c, 0x1018, 0x090c, 0x0dd5, 0x2958, 0x009e, 0x2001,
+	0x196a, 0x2b02, 0x8b07, 0x8006, 0x8006, 0x908c, 0x003f, 0xb9c6,
+	0x908c, 0xffc0, 0xb9ca, 0xb8af, 0x0000, 0x2009, 0x00ff, 0x080c,
+	0x60c7, 0xb807, 0x0006, 0xb813, 0x00ff, 0xb817, 0xffff, 0xb86f,
+	0x0200, 0xb86c, 0xb893, 0x0002, 0xb8bb, 0x0520, 0xb8a3, 0x00ff,
+	0xb8af, 0x0000, 0x00ce, 0x00be, 0x0005, 0x7810, 0x00b6, 0x2058,
+	0xb800, 0x00be, 0xd0ac, 0x0005, 0x6010, 0x00b6, 0x905d, 0x0108,
+	0xb800, 0x00be, 0xd0bc, 0x0005, 0x0006, 0x0016, 0x0026, 0xb804,
+	0x908c, 0x00ff, 0x9196, 0x0006, 0x0188, 0x9196, 0x0004, 0x0170,
+	0x9196, 0x0005, 0x0158, 0x908c, 0xff00, 0x810f, 0x9196, 0x0006,
+	0x0128, 0x9196, 0x0004, 0x0110, 0x9196, 0x0005, 0x002e, 0x001e,
+	0x000e, 0x0005, 0x00b6, 0x00f6, 0x2001, 0x107e, 0x2004, 0x905d,
+	0x0110, 0xb800, 0xd0ec, 0x00fe, 0x00be, 0x0005, 0x0126, 0x0026,
+	0x2091, 0x8000, 0x0006, 0xbaa0, 0x9290, 0x1000, 0x2204, 0x9b06,
+	0x190c, 0x0dd5, 0x000e, 0xba00, 0x9005, 0x0110, 0xc2fd, 0x0008,
+	0xc2fc, 0xba02, 0x002e, 0x012e, 0x0005, 0x2011, 0x1837, 0x2204,
+	0xd0cc, 0x0138, 0x2001, 0x1982, 0x200c, 0x2011, 0x69fa, 0x080c,
+	0x8648, 0x0005, 0x2011, 0x69fa, 0x080c, 0x85b0, 0x2011, 0x1837,
+	0x2204, 0xc0cc, 0x2012, 0x0005, 0x080c, 0x575d, 0xd0ac, 0x0005,
+	0x080c, 0x575d, 0xd0a4, 0x0005, 0x0016, 0xb904, 0x9184, 0x00ff,
+	0x908e, 0x0006, 0x001e, 0x0005, 0x0016, 0xb904, 0x9184, 0xff00,
+	0x8007, 0x908e, 0x0006, 0x001e, 0x0005, 0x00b6, 0x00f6, 0x080c,
+	0xd388, 0x0158, 0x70dc, 0x9084, 0x0028, 0x0138, 0x2001, 0x107f,
+	0x2004, 0x905d, 0x0110, 0xb8cc, 0xd094, 0x00fe, 0x00be, 0x0005,
+	0x2071, 0x1910, 0x7003, 0x0001, 0x7007, 0x0000, 0x9006, 0x7012,
+	0x7016, 0x701a, 0x701e, 0x700a, 0x7046, 0x0005, 0x0016, 0x00e6,
+	0x2071, 0x1947, 0x900e, 0x710a, 0x080c, 0x575d, 0xd0fc, 0x1140,
+	0x080c, 0x575d, 0x900e, 0xd09c, 0x0108, 0x8108, 0x7102, 0x00f8,
+	0x2001, 0x1867, 0x200c, 0x9184, 0x0007, 0x0002, 0x6a48, 0x6a48,
+	0x6a48, 0x6a48, 0x6a48, 0x6a5e, 0x6a6c, 0x6a48, 0x7003, 0x0003,
+	0x2009, 0x1868, 0x210c, 0x9184, 0xff00, 0x8007, 0x9005, 0x1110,
+	0x2001, 0x0002, 0x7006, 0x0018, 0x7003, 0x0005, 0x0c88, 0x00ee,
+	0x001e, 0x0005, 0x00e6, 0x2071, 0x0050, 0x684c, 0x9005, 0x1150,
+	0x00e6, 0x2071, 0x1910, 0x7028, 0xc085, 0x702a, 0x00ee, 0x9085,
+	0x0001, 0x0488, 0x6844, 0x9005, 0x0158, 0x080c, 0x7796, 0x6a60,
+	0x9200, 0x7002, 0x6864, 0x9101, 0x7006, 0x9006, 0x7012, 0x7016,
+	0x6860, 0x7002, 0x6864, 0x7006, 0x6868, 0x700a, 0x686c, 0x700e,
+	0x6844, 0x9005, 0x1110, 0x7012, 0x7016, 0x684c, 0x701a, 0x701c,
+	0x9085, 0x0040, 0x701e, 0x7037, 0x0019, 0x702b, 0x0001, 0x00e6,
+	0x2071, 0x1910, 0x7028, 0xc084, 0x702a, 0x7007, 0x0001, 0x700b,
+	0x0000, 0x00ee, 0x9006, 0x00ee, 0x0005, 0x00e6, 0x0026, 0x2071,
+	0x1947, 0x7000, 0x9015, 0x0904, 0x6d1c, 0x9286, 0x0003, 0x0904,
+	0x6bb2, 0x9286, 0x0005, 0x0904, 0x6bb2, 0x2071, 0x1877, 0xa87c,
+	0x9005, 0x0904, 0x6b13, 0x7140, 0xa868, 0x9102, 0x0a04, 0x6d1c,
+	0xa878, 0xd084, 0x15d8, 0xa853, 0x0019, 0x2001, 0x8023, 0xa84e,
+	0x2071, 0x1910, 0x701c, 0x9005, 0x1904, 0x6eb2, 0x0e04, 0x6f20,
+	0x2071, 0x0000, 0xa850, 0x7032, 0xa84c, 0x7082, 0xa870, 0x7086,
+	0xa86c, 0x708a, 0xa880, 0x708e, 0x7036, 0x0146, 0x01d6, 0x0136,
 	0x01c6, 0x0156, 0x20e9, 0x0000, 0x20a1, 0x002a, 0xa868, 0x20a8,
 	0xa860, 0x20e0, 0xa85c, 0x9080, 0x0021, 0x2098, 0x4003, 0x015e,
-	0x01ce, 0x013e, 0x01de, 0x014e, 0x0890, 0x2071, 0x1910, 0xa803,
-	0x0000, 0x2908, 0x7010, 0x8000, 0x7012, 0x7018, 0x904d, 0x711a,
-	0x0110, 0xa902, 0x0008, 0x711e, 0x2148, 0xa804, 0x900d, 0x1118,
-	0x002e, 0x00ee, 0x0005, 0x2071, 0x1800, 0x9016, 0x702c, 0x2148,
+	0x01ce, 0x013e, 0x01de, 0x014e, 0x2091, 0x4080, 0x2001, 0x0089,
+	0x2004, 0xd084, 0x190c, 0x119b, 0x0804, 0x6b95, 0xa853, 0x001b,
+	0x2001, 0x8027, 0x0820, 0x7004, 0xd08c, 0x1904, 0x6d1c, 0xa853,
+	0x001a, 0x2001, 0x8024, 0x0804, 0x6ad7, 0x00e6, 0x0026, 0x2071,
+	0x1947, 0x7000, 0x9015, 0x0904, 0x6d1c, 0x9286, 0x0003, 0x0904,
+	0x6bb2, 0x9286, 0x0005, 0x0904, 0x6bb2, 0xa84f, 0x8022, 0xa853,
+	0x0018, 0x0804, 0x6b7a, 0xa868, 0xd0fc, 0x11d8, 0x00e6, 0x0026,
+	0x2001, 0x1947, 0x2004, 0x9005, 0x0904, 0x6d1c, 0xa87c, 0xd0bc,
+	0x1904, 0x6d1c, 0xa978, 0xa874, 0x9105, 0x1904, 0x6d1c, 0x2001,
+	0x1947, 0x2004, 0x0002, 0x6d1c, 0x6b76, 0x6bb2, 0x6bb2, 0x6d1c,
+	0x6bb2, 0x0005, 0xa868, 0xd0fc, 0x1500, 0x00e6, 0x0026, 0x2009,
+	0x1947, 0x210c, 0x81ff, 0x0904, 0x6d1c, 0xa87c, 0xd0cc, 0x0904,
+	0x6d1c, 0xa880, 0x9084, 0x00ff, 0x9086, 0x0001, 0x1904, 0x6d1c,
+	0x9186, 0x0003, 0x0904, 0x6bb2, 0x9186, 0x0005, 0x0904, 0x6bb2,
+	0xa84f, 0x8021, 0xa853, 0x0017, 0x0028, 0x0005, 0xa84f, 0x8020,
+	0xa853, 0x0016, 0x2071, 0x1910, 0x701c, 0x9005, 0x1904, 0x6eb2,
+	0x0e04, 0x6f20, 0x2071, 0x0000, 0xa84c, 0x7082, 0xa850, 0x7032,
+	0xa86c, 0x7086, 0x7036, 0xa870, 0x708a, 0x2091, 0x4080, 0x2001,
+	0x0089, 0x2004, 0xd084, 0x190c, 0x119b, 0x2071, 0x1800, 0x2011,
+	0x0001, 0xa804, 0x900d, 0x702c, 0x1158, 0xa802, 0x2900, 0x702e,
+	0x70c0, 0x9200, 0x70c2, 0x080c, 0x84c2, 0x002e, 0x00ee, 0x0005,
+	0x0096, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8,
+	0x009e, 0x0c58, 0xa84f, 0x0000, 0x00f6, 0x2079, 0x0050, 0x2071,
+	0x1910, 0xa803, 0x0000, 0x7010, 0x9005, 0x1904, 0x6ca1, 0x782c,
+	0x908c, 0x0780, 0x190c, 0x706e, 0x8004, 0x8004, 0x8004, 0x9084,
+	0x0003, 0x0002, 0x6bd0, 0x6ca1, 0x6bf5, 0x6c3c, 0x080c, 0x0dd5,
+	0x2071, 0x1800, 0x2900, 0x7822, 0xa804, 0x900d, 0x1170, 0x2071,
+	0x19f9, 0x703c, 0x9005, 0x1328, 0x2001, 0x1948, 0x2004, 0x8005,
+	0x703e, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x9016, 0x702c, 0x2148,
 	0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70c0,
-	0x9200, 0x70c2, 0x080c, 0x841a, 0x002e, 0x00ee, 0x0005, 0x0006,
-	0xa87c, 0x0006, 0xa867, 0x0103, 0x20a9, 0x001c, 0xa860, 0x20e8,
-	0xa85c, 0x9080, 0x001d, 0x20a0, 0x9006, 0x4004, 0x000e, 0x9084,
-	0x00ff, 0xa87e, 0x000e, 0xa87a, 0xa982, 0x0005, 0x2071, 0x1910,
-	0x7004, 0x0002, 0x6ee8, 0x6ee9, 0x6fd4, 0x6ee9, 0x0dd5, 0x6fd4,
-	0x0005, 0x2001, 0x1947, 0x2004, 0x0002, 0x6ef3, 0x6ef3, 0x6f6d,
-	0x6f6e, 0x6ef3, 0x6f6e, 0x0126, 0x2091, 0x8000, 0x1e0c, 0x6ff4,
-	0x701c, 0x904d, 0x0508, 0xa84c, 0x9005, 0x0904, 0x6f3e, 0x0e04,
-	0x6f1c, 0xa94c, 0x2071, 0x0000, 0x7182, 0xa850, 0x7032, 0xa86c,
-	0x7086, 0x7036, 0xa870, 0x708a, 0xa850, 0x9082, 0x0019, 0x1278,
-	0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x119b,
-	0x2071, 0x1910, 0x080c, 0x6fd5, 0x012e, 0x0804, 0x6f6c, 0xa850,
-	0x9082, 0x001c, 0x1e68, 0xa880, 0x708e, 0x7036, 0x0146, 0x01d6,
-	0x0136, 0x01c6, 0x0156, 0x20e9, 0x0000, 0x20a1, 0x002a, 0xa868,
-	0x20a8, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x0021, 0x2098, 0x4003,
-	0x015e, 0x01ce, 0x013e, 0x01de, 0x014e, 0x0890, 0x2001, 0x005b,
-	0x2004, 0x9094, 0x0780, 0x190c, 0x6fe9, 0xd09c, 0x2071, 0x1910,
-	0x1510, 0x2071, 0x1910, 0x700f, 0x0001, 0xa964, 0x9184, 0x00ff,
-	0x9086, 0x0003, 0x1130, 0x810f, 0x918c, 0x00ff, 0x8101, 0x0108,
-	0x710e, 0x2900, 0x00d6, 0x2069, 0x0050, 0x6822, 0x00de, 0x2071,
-	0x1910, 0x701c, 0x2048, 0x7010, 0x8001, 0x7012, 0xa800, 0x701e,
-	0x9005, 0x1108, 0x701a, 0x012e, 0x0005, 0x0005, 0x00d6, 0x2008,
-	0x2069, 0x19f9, 0x683c, 0x9005, 0x0760, 0x0158, 0x9186, 0x0003,
-	0x0540, 0x2001, 0x1815, 0x2004, 0x2009, 0x1ac7, 0x210c, 0x9102,
-	0x1500, 0x0126, 0x2091, 0x8000, 0x2069, 0x0050, 0x693c, 0x6838,
-	0x9106, 0x0190, 0x0e04, 0x6fa0, 0x2069, 0x0000, 0x6837, 0x8040,
-	0x6833, 0x0012, 0x6883, 0x8040, 0x2091, 0x4080, 0x2001, 0x0089,
-	0x2004, 0xd084, 0x190c, 0x119b, 0x2069, 0x19f9, 0x683f, 0xffff,
-	0x012e, 0x00de, 0x0126, 0x2091, 0x8000, 0x1e0c, 0x7055, 0x701c,
-	0x904d, 0x0540, 0x2001, 0x005b, 0x2004, 0x9094, 0x0780, 0x15c9,
-	0xd09c, 0x1500, 0x2071, 0x1910, 0x700f, 0x0001, 0xa964, 0x9184,
-	0x00ff, 0x9086, 0x0003, 0x1130, 0x810f, 0x918c, 0x00ff, 0x8101,
-	0x0108, 0x710e, 0x2900, 0x00d6, 0x2069, 0x0050, 0x6822, 0x00de,
-	0x701c, 0x2048, 0x7010, 0x8001, 0x7012, 0xa800, 0x701e, 0x9005,
-	0x1108, 0x701a, 0x012e, 0x0005, 0x0005, 0x0126, 0x2091, 0x8000,
-	0x701c, 0x904d, 0x0160, 0x7010, 0x8001, 0x7012, 0xa800, 0x701e,
-	0x9005, 0x1108, 0x701a, 0x012e, 0x080c, 0x1031, 0x0005, 0x012e,
-	0x0005, 0x2091, 0x8000, 0x0e04, 0x6feb, 0x0006, 0x0016, 0x2001,
-	0x8004, 0x0006, 0x0804, 0x0dde, 0x0096, 0x00f6, 0x2079, 0x0050,
-	0x7044, 0xd084, 0x01c0, 0xc084, 0x7046, 0x7838, 0x7938, 0x910e,
-	0x1de0, 0x00d6, 0x2069, 0x0000, 0x6836, 0x6833, 0x0013, 0x00de,
-	0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x119b,
-	0x00fe, 0x009e, 0x0005, 0x782c, 0x9094, 0x0780, 0x1991, 0xd0a4,
-	0x0db8, 0x00e6, 0x2071, 0x1800, 0x7824, 0x00e6, 0x2071, 0x0040,
+	0x9200, 0x70c2, 0x080c, 0x84c2, 0x0c10, 0x2071, 0x1800, 0x2900,
+	0x7822, 0xa804, 0x900d, 0x1580, 0x7824, 0x00e6, 0x2071, 0x0040,
 	0x712c, 0xd19c, 0x1148, 0x2009, 0x1830, 0x210c, 0x918a, 0x0020,
 	0x0218, 0x7022, 0x00ee, 0x0058, 0x00ee, 0x2048, 0x702c, 0xa802,
-	0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2, 0x080c, 0x841a, 0x782c,
-	0x9094, 0x0780, 0x190c, 0x6fe9, 0xd0a4, 0x19f0, 0x7838, 0x7938,
-	0x910e, 0x1de0, 0x00d6, 0x2069, 0x0000, 0x6836, 0x6833, 0x0013,
-	0x00de, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c,
-	0x119b, 0x00ee, 0x00fe, 0x009e, 0x0005, 0x00f6, 0x2079, 0x0050,
-	0x7044, 0xd084, 0x01b8, 0xc084, 0x7046, 0x7838, 0x7938, 0x910e,
+	0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2, 0x080c, 0x84c2, 0x782c,
+	0x9094, 0x0780, 0x190c, 0x706e, 0xd0a4, 0x19f0, 0x2071, 0x19f9,
+	0x703c, 0x9005, 0x1328, 0x2001, 0x1948, 0x2004, 0x8005, 0x703e,
+	0x00fe, 0x002e, 0x00ee, 0x0005, 0x9016, 0x702c, 0x2148, 0xa904,
+	0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70c0, 0x9200,
+	0x70c2, 0x080c, 0x84c2, 0x0800, 0x0096, 0x00e6, 0x7824, 0x2048,
+	0x2071, 0x1800, 0x702c, 0xa802, 0x2900, 0x702e, 0x70c0, 0x8000,
+	0x70c2, 0x080c, 0x84c2, 0x782c, 0x9094, 0x0780, 0x190c, 0x706e,
+	0xd0a4, 0x1d60, 0x00ee, 0x782c, 0x9094, 0x0780, 0x190c, 0x706e,
+	0xd09c, 0x11a0, 0x009e, 0x2900, 0x7822, 0xa804, 0x900d, 0x1560,
+	0x2071, 0x19f9, 0x703c, 0x9005, 0x1328, 0x2001, 0x1948, 0x2004,
+	0x8005, 0x703e, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x009e, 0x2908,
+	0x7010, 0x8000, 0x7012, 0x7018, 0x904d, 0x711a, 0x0110, 0xa902,
+	0x0008, 0x711e, 0x2148, 0xa804, 0x900d, 0x1170, 0x2071, 0x19f9,
+	0x703c, 0x9005, 0x1328, 0x2001, 0x1948, 0x2004, 0x8005, 0x703e,
+	0x00fe, 0x002e, 0x00ee, 0x0005, 0x2071, 0x1800, 0x9016, 0x702c,
+	0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e,
+	0x70c0, 0x9200, 0x70c2, 0x080c, 0x84c2, 0x00fe, 0x002e, 0x00ee,
+	0x0005, 0x2908, 0x7010, 0x8000, 0x7012, 0x7018, 0x904d, 0x711a,
+	0x0110, 0xa902, 0x0008, 0x711e, 0x2148, 0xa804, 0x900d, 0x1904,
+	0x6cf6, 0x782c, 0x9094, 0x0780, 0x190c, 0x706e, 0xd09c, 0x1198,
+	0x701c, 0x904d, 0x0180, 0x7010, 0x8001, 0x7012, 0x1108, 0x701a,
+	0xa800, 0x701e, 0x2900, 0x7822, 0x782c, 0x9094, 0x0780, 0x190c,
+	0x706e, 0xd09c, 0x0d68, 0x782c, 0x9094, 0x0780, 0x190c, 0x706e,
+	0xd0a4, 0x01b0, 0x00e6, 0x7824, 0x2048, 0x2071, 0x1800, 0x702c,
+	0xa802, 0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2, 0x080c, 0x84c2,
+	0x782c, 0x9094, 0x0780, 0x190c, 0x706e, 0xd0a4, 0x1d60, 0x00ee,
+	0x2071, 0x19f9, 0x703c, 0x9005, 0x1328, 0x2001, 0x1948, 0x2004,
+	0x8005, 0x703e, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x00e6, 0x2071,
+	0x1800, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900,
+	0x81ff, 0x1dc8, 0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c, 0x84c2,
+	0x00ee, 0x0804, 0x6cb1, 0xa868, 0xd0fc, 0x1560, 0x0096, 0xa804,
+	0xa807, 0x0000, 0x904d, 0x190c, 0x0fb1, 0x009e, 0x0018, 0xa868,
+	0xd0fc, 0x1500, 0x00e6, 0x0026, 0xa84f, 0x0000, 0x00f6, 0x2079,
+	0x0050, 0x2071, 0x1910, 0xa803, 0x0000, 0x7010, 0x9005, 0x1904,
+	0x6e30, 0x782c, 0x908c, 0x0780, 0x190c, 0x706e, 0x8004, 0x8004,
+	0x8004, 0x9084, 0x0003, 0x0002, 0x6d3b, 0x6e30, 0x6d56, 0x6dc3,
+	0x080c, 0x0dd5, 0x0005, 0x2071, 0x1800, 0x2900, 0x7822, 0xa804,
+	0x900d, 0x1120, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x9016, 0x702c,
+	0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e,
+	0x70c0, 0x9200, 0x70c2, 0x080c, 0x84c2, 0x0c60, 0x2071, 0x1800,
+	0x2900, 0x7822, 0xa804, 0x900d, 0x1904, 0x6db2, 0x7830, 0x8007,
+	0x9084, 0x001f, 0x9082, 0x0001, 0x1220, 0x00fe, 0x002e, 0x00ee,
+	0x0005, 0x7824, 0x00e6, 0x2071, 0x0040, 0x712c, 0xd19c, 0x1148,
+	0x2009, 0x1830, 0x210c, 0x918a, 0x0020, 0x0218, 0x7022, 0x00ee,
+	0x0058, 0x00ee, 0x2048, 0x702c, 0xa802, 0x2900, 0x702e, 0x70c0,
+	0x8000, 0x70c2, 0x080c, 0x84c2, 0x782c, 0x9094, 0x0780, 0x190c,
+	0x706e, 0xd0a4, 0x19f0, 0x0e04, 0x6da9, 0x7838, 0x7938, 0x910e,
 	0x1de0, 0x00d6, 0x2069, 0x0000, 0x6836, 0x6833, 0x0013, 0x00de,
-	0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x119b,
-	0x00fe, 0x0005, 0x782c, 0x9094, 0x0780, 0x190c, 0x6fe9, 0xd0a4,
-	0x0db8, 0x00e6, 0x2071, 0x1800, 0x7824, 0x2048, 0x702c, 0xa802,
-	0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2, 0x080c, 0x841a, 0x782c,
-	0x9094, 0x0780, 0x190c, 0x6fe9, 0xd0a4, 0x1d70, 0x00d6, 0x2069,
-	0x0050, 0x693c, 0x2069, 0x1947, 0x6808, 0x690a, 0x2069, 0x19f9,
-	0x9102, 0x1118, 0x683c, 0x9005, 0x1328, 0x2001, 0x1948, 0x200c,
-	0x810d, 0x693e, 0x00de, 0x00ee, 0x00fe, 0x0005, 0x7098, 0x908a,
-	0x0029, 0x1a0c, 0x0dd5, 0x9082, 0x001d, 0x001b, 0x6027, 0x1e00,
-	0x0005, 0x717d, 0x7103, 0x711f, 0x7149, 0x716c, 0x71ac, 0x71be,
-	0x711f, 0x7194, 0x70be, 0x70ec, 0x70bd, 0x0005, 0x00d6, 0x2069,
-	0x0200, 0x6804, 0x9005, 0x1180, 0x6808, 0x9005, 0x1518, 0x709b,
-	0x0028, 0x2069, 0x198e, 0x2d04, 0x7002, 0x080c, 0x74eb, 0x6028,
-	0x9085, 0x0600, 0x602a, 0x00b0, 0x709b, 0x0028, 0x2069, 0x198e,
-	0x2d04, 0x7002, 0x6028, 0x9085, 0x0600, 0x602a, 0x00e6, 0x0036,
-	0x0046, 0x0056, 0x2071, 0x1a61, 0x080c, 0x1abb, 0x005e, 0x004e,
-	0x003e, 0x00ee, 0x00de, 0x0005, 0x00d6, 0x2069, 0x0200, 0x6804,
-	0x9005, 0x1178, 0x6808, 0x9005, 0x1160, 0x709b, 0x0028, 0x2069,
-	0x198e, 0x2d04, 0x7002, 0x080c, 0x7586, 0x6028, 0x9085, 0x0600,
-	0x602a, 0x00de, 0x0005, 0x0006, 0x2001, 0x0090, 0x080c, 0x2cfc,
-	0x000e, 0x6124, 0xd1e4, 0x1190, 0x080c, 0x722b, 0xd1d4, 0x1160,
-	0xd1dc, 0x1138, 0xd1cc, 0x0150, 0x709b, 0x0020, 0x080c, 0x722b,
-	0x0028, 0x709b, 0x001d, 0x0010, 0x709b, 0x001f, 0x0005, 0x2001,
-	0x0088, 0x080c, 0x2cfc, 0x6124, 0xd1cc, 0x11e8, 0xd1dc, 0x11c0,
-	0xd1e4, 0x1198, 0x9184, 0x1e00, 0x11d8, 0x080c, 0x1ae0, 0x60e3,
-	0x0001, 0x600c, 0xc0b4, 0x600e, 0x080c, 0x73df, 0x2001, 0x0080,
-	0x080c, 0x2cfc, 0x709b, 0x0028, 0x0058, 0x709b, 0x001e, 0x0040,
-	0x709b, 0x001d, 0x0028, 0x709b, 0x0020, 0x0010, 0x709b, 0x001f,
-	0x0005, 0x080c, 0x1ae0, 0x60e3, 0x0001, 0x600c, 0xc0b4, 0x600e,
-	0x080c, 0x73df, 0x2001, 0x0080, 0x080c, 0x2cfc, 0x6124, 0xd1d4,
-	0x1180, 0xd1dc, 0x1158, 0xd1e4, 0x1130, 0x9184, 0x1e00, 0x1158,
-	0x709b, 0x0028, 0x0040, 0x709b, 0x001e, 0x0028, 0x709b, 0x001d,
-	0x0010, 0x709b, 0x001f, 0x0005, 0x2001, 0x00a0, 0x080c, 0x2cfc,
-	0x6124, 0xd1dc, 0x1138, 0xd1e4, 0x0138, 0x080c, 0x1ae0, 0x709b,
-	0x001e, 0x0010, 0x709b, 0x001d, 0x0005, 0x080c, 0x72ae, 0x6124,
-	0xd1dc, 0x1188, 0x080c, 0x722b, 0x0016, 0x080c, 0x1ae0, 0x001e,
-	0xd1d4, 0x1128, 0xd1e4, 0x0138, 0x709b, 0x001e, 0x0020, 0x709b,
-	0x001f, 0x080c, 0x722b, 0x0005, 0x0006, 0x2001, 0x00a0, 0x080c,
-	0x2cfc, 0x000e, 0x6124, 0xd1d4, 0x1160, 0xd1cc, 0x1150, 0xd1dc,
-	0x1128, 0xd1e4, 0x0140, 0x709b, 0x001e, 0x0028, 0x709b, 0x001d,
-	0x0010, 0x709b, 0x0021, 0x0005, 0x080c, 0x72ae, 0x6124, 0xd1d4,
-	0x1150, 0xd1dc, 0x1128, 0xd1e4, 0x0140, 0x709b, 0x001e, 0x0028,
-	0x709b, 0x001d, 0x0010, 0x709b, 0x001f, 0x0005, 0x0006, 0x2001,
-	0x0090, 0x080c, 0x2cfc, 0x000e, 0x6124, 0xd1d4, 0x1178, 0xd1cc,
-	0x1150, 0xd1dc, 0x1128, 0xd1e4, 0x0158, 0x709b, 0x001e, 0x0040,
-	0x709b, 0x001d, 0x0028, 0x709b, 0x0020, 0x0010, 0x709b, 0x001f,
-	0x0005, 0x0016, 0x00c6, 0x00d6, 0x00e6, 0x0126, 0x2061, 0x0100,
-	0x2069, 0x0140, 0x2071, 0x1800, 0x2091, 0x8000, 0x080c, 0x73b3,
-	0x11d8, 0x2001, 0x180c, 0x200c, 0xd1b4, 0x01b0, 0xc1b4, 0x2102,
-	0x6027, 0x0200, 0x080c, 0x2c45, 0x6024, 0xd0cc, 0x0148, 0x2001,
-	0x00a0, 0x080c, 0x2cfc, 0x080c, 0x7699, 0x080c, 0x602d, 0x0428,
-	0x6028, 0xc0cd, 0x602a, 0x0408, 0x080c, 0x73cd, 0x0150, 0x080c,
-	0x73c4, 0x1138, 0x2001, 0x0001, 0x080c, 0x27f7, 0x080c, 0x738b,
-	0x00a0, 0x080c, 0x72ab, 0x0178, 0x2001, 0x0001, 0x080c, 0x27f7,
-	0x7098, 0x9086, 0x001e, 0x0120, 0x7098, 0x9086, 0x0022, 0x1118,
-	0x709b, 0x0025, 0x0010, 0x709b, 0x0021, 0x012e, 0x00ee, 0x00de,
-	0x00ce, 0x001e, 0x0005, 0x0026, 0x2011, 0x723c, 0x080c, 0x85d3,
-	0x002e, 0x0016, 0x0026, 0x2009, 0x0064, 0x2011, 0x723c, 0x080c,
-	0x85ca, 0x002e, 0x001e, 0x0005, 0x00e6, 0x00f6, 0x0016, 0x080c,
-	0xa28f, 0x2071, 0x1800, 0x080c, 0x71d9, 0x001e, 0x00fe, 0x00ee,
-	0x0005, 0x0016, 0x0026, 0x0036, 0x00c6, 0x00d6, 0x00e6, 0x00f6,
-	0x0126, 0x080c, 0xa28f, 0x2061, 0x0100, 0x2069, 0x0140, 0x2071,
-	0x1800, 0x2091, 0x8000, 0x6028, 0xc09c, 0x602a, 0x2011, 0x0003,
-	0x080c, 0xa63e, 0x2011, 0x0002, 0x080c, 0xa648, 0x080c, 0xa552,
-	0x080c, 0x857f, 0x0036, 0x901e, 0x080c, 0xa5c8, 0x003e, 0x60e3,
-	0x0000, 0x080c, 0xea24, 0x080c, 0xea3f, 0x2009, 0x0004, 0x080c,
-	0x2c4b, 0x080c, 0x2b66, 0x2001, 0x1800, 0x2003, 0x0004, 0x6027,
-	0x0008, 0x2011, 0x723c, 0x080c, 0x85d3, 0x080c, 0x73cd, 0x0118,
-	0x9006, 0x080c, 0x2cfc, 0x080c, 0x0bae, 0x2001, 0x0001, 0x080c,
-	0x27f7, 0x012e, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x003e, 0x002e,
-	0x001e, 0x0005, 0x0026, 0x00e6, 0x2011, 0x7249, 0x2071, 0x19f9,
-	0x701c, 0x9206, 0x1118, 0x7018, 0x9005, 0x0110, 0x9085, 0x0001,
-	0x00ee, 0x002e, 0x0005, 0x6020, 0xd09c, 0x0005, 0x6800, 0x9084,
-	0xfffe, 0x9086, 0x00c0, 0x0170, 0x2001, 0x00c0, 0x080c, 0x2cfc,
-	0x0156, 0x20a9, 0x002d, 0x1d04, 0x72bb, 0x2091, 0x6000, 0x1f04,
-	0x72bb, 0x015e, 0x0005, 0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100,
-	0x2069, 0x0140, 0x2071, 0x1800, 0x080c, 0x76a8, 0x2001, 0x196c,
-	0x2003, 0x0000, 0x9006, 0x709a, 0x60e2, 0x6886, 0x080c, 0x28bf,
-	0x9006, 0x080c, 0x2cfc, 0x080c, 0x5eec, 0x6027, 0xffff, 0x602b,
-	0x182f, 0x00ee, 0x00de, 0x00ce, 0x0005, 0x00c6, 0x00d6, 0x00e6,
-	0x2061, 0x0100, 0x2069, 0x0140, 0x2071, 0x1800, 0x2001, 0x197c,
-	0x200c, 0x9186, 0x0000, 0x0158, 0x9186, 0x0001, 0x0158, 0x9186,
-	0x0002, 0x0158, 0x9186, 0x0003, 0x0158, 0x0804, 0x737b, 0x709b,
-	0x0022, 0x0040, 0x709b, 0x0021, 0x0028, 0x709b, 0x0023, 0x0010,
-	0x709b, 0x0024, 0x60e3, 0x0000, 0x6887, 0x0001, 0x2001, 0x0001,
-	0x080c, 0x28bf, 0x0026, 0x080c, 0xadd0, 0x002e, 0x7000, 0x908e,
-	0x0004, 0x0118, 0x602b, 0x0028, 0x0010, 0x602b, 0x0020, 0x0156,
-	0x0126, 0x2091, 0x8000, 0x20a9, 0x0005, 0x6024, 0xd0ac, 0x0150,
-	0x012e, 0x015e, 0x080c, 0xd25a, 0x0118, 0x9006, 0x080c, 0x2d26,
-	0x0804, 0x7387, 0x6800, 0x9084, 0x00a1, 0xc0bd, 0x6802, 0x080c,
-	0x2c45, 0x6904, 0xd1d4, 0x1140, 0x2001, 0x0100, 0x080c, 0x2cfc,
-	0x1f04, 0x7325, 0x080c, 0x740a, 0x012e, 0x015e, 0x080c, 0x73c4,
-	0x01a8, 0x6044, 0x9005, 0x0168, 0x6050, 0x0006, 0x9085, 0x0020,
-	0x6052, 0x080c, 0x740a, 0x9006, 0x8001, 0x1df0, 0x000e, 0x6052,
-	0x0028, 0x6804, 0xd0d4, 0x1110, 0x080c, 0x740a, 0x080c, 0xd25a,
-	0x0118, 0x9006, 0x080c, 0x2d26, 0x0016, 0x0026, 0x7000, 0x908e,
-	0x0004, 0x0130, 0x2009, 0x00c8, 0x2011, 0x7249, 0x080c, 0x8591,
-	0x002e, 0x001e, 0x080c, 0x8411, 0x7034, 0xc085, 0x7036, 0x2001,
-	0x197c, 0x2003, 0x0004, 0x080c, 0x70a6, 0x080c, 0x73c4, 0x0138,
-	0x6804, 0xd0d4, 0x1120, 0xd0dc, 0x1100, 0x080c, 0x769e, 0x00ee,
-	0x00de, 0x00ce, 0x0005, 0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100,
-	0x2069, 0x0140, 0x2071, 0x1800, 0x080c, 0x8428, 0x080c, 0x841a,
-	0x080c, 0x76a8, 0x2001, 0x196c, 0x2003, 0x0000, 0x9006, 0x709a,
-	0x60e2, 0x6886, 0x080c, 0x28bf, 0x9006, 0x080c, 0x2cfc, 0x6043,
-	0x0090, 0x6043, 0x0010, 0x6027, 0xffff, 0x602b, 0x182f, 0x00ee,
-	0x00de, 0x00ce, 0x0005, 0x0006, 0x2001, 0x197b, 0x2004, 0x9086,
-	0xaaaa, 0x000e, 0x0005, 0x0006, 0x080c, 0x56e6, 0x9084, 0x0030,
-	0x9086, 0x0000, 0x000e, 0x0005, 0x0006, 0x080c, 0x56e6, 0x9084,
-	0x0030, 0x9086, 0x0030, 0x000e, 0x0005, 0x0006, 0x080c, 0x56e6,
-	0x9084, 0x0030, 0x9086, 0x0010, 0x000e, 0x0005, 0x0006, 0x080c,
-	0x56e6, 0x9084, 0x0030, 0x9086, 0x0020, 0x000e, 0x0005, 0x0036,
-	0x0016, 0x2001, 0x180c, 0x2004, 0x908c, 0x0013, 0x0180, 0x0020,
-	0x080c, 0x28df, 0x900e, 0x0028, 0x080c, 0x6981, 0x1dc8, 0x2009,
-	0x0002, 0x2019, 0x0028, 0x080c, 0x3197, 0x9006, 0x0019, 0x001e,
-	0x003e, 0x0005, 0x00e6, 0x2071, 0x180c, 0x2e04, 0x0130, 0x080c,
-	0xd253, 0x1128, 0x9085, 0x0010, 0x0010, 0x9084, 0xffef, 0x2072,
-	0x00ee, 0x0005, 0x6050, 0x0006, 0x60ec, 0x0006, 0x600c, 0x0006,
-	0x6004, 0x0006, 0x6028, 0x0006, 0x0016, 0x6138, 0x6050, 0x9084,
-	0xfbff, 0x9085, 0x2000, 0x6052, 0x613a, 0x20a9, 0x0012, 0x1d04,
-	0x741f, 0x2091, 0x6000, 0x1f04, 0x741f, 0x602f, 0x0100, 0x602f,
-	0x0000, 0x6050, 0x9085, 0x0400, 0x9084, 0xdfff, 0x6052, 0x613a,
-	0x001e, 0x602f, 0x0040, 0x602f, 0x0000, 0x000e, 0x602a, 0x000e,
-	0x6006, 0x000e, 0x600e, 0x000e, 0x60ee, 0x60e3, 0x0000, 0x6887,
-	0x0001, 0x2001, 0x0001, 0x080c, 0x28bf, 0x2001, 0x00a0, 0x0006,
-	0x080c, 0xd25a, 0x000e, 0x0130, 0x080c, 0x2d1a, 0x9006, 0x080c,
-	0x2d26, 0x0010, 0x080c, 0x2cfc, 0x000e, 0x6052, 0x6050, 0x0006,
-	0xc0e5, 0x6052, 0x00f6, 0x2079, 0x0100, 0x080c, 0x2bba, 0x00fe,
-	0x000e, 0x6052, 0x0005, 0x0156, 0x0016, 0x0026, 0x0036, 0x00c6,
-	0x00d6, 0x00e6, 0x2061, 0x0100, 0x2069, 0x0140, 0x2071, 0x1800,
-	0x6020, 0x9084, 0x0080, 0x0138, 0x2001, 0x180c, 0x200c, 0xc1c5,
-	0x2102, 0x0804, 0x74dd, 0x2001, 0x180c, 0x200c, 0xc1c4, 0x2102,
-	0x6028, 0x9084, 0xe1ff, 0x602a, 0x6027, 0x0200, 0x2001, 0x0090,
-	0x080c, 0x2cfc, 0x20a9, 0x0366, 0x6024, 0xd0cc, 0x1518, 0x1d04,
-	0x748c, 0x2091, 0x6000, 0x1f04, 0x748c, 0x2011, 0x0003, 0x080c,
-	0xa63e, 0x2011, 0x0002, 0x080c, 0xa648, 0x080c, 0xa552, 0x901e,
-	0x080c, 0xa5c8, 0x2001, 0x00a0, 0x080c, 0x2cfc, 0x080c, 0x7699,
-	0x080c, 0x602d, 0x080c, 0xd25a, 0x0110, 0x080c, 0x0d45, 0x9085,
-	0x0001, 0x0488, 0x080c, 0x1ae0, 0x60e3, 0x0000, 0x2001, 0x196c,
-	0x2004, 0x080c, 0x28bf, 0x60e2, 0x2001, 0x0080, 0x080c, 0x2cfc,
-	0x20a9, 0x0366, 0x6027, 0x1e00, 0x2009, 0x1e00, 0x080c, 0x2c45,
-	0x6024, 0x910c, 0x0138, 0x1d04, 0x74c2, 0x2091, 0x6000, 0x1f04,
-	0x74c2, 0x0818, 0x6028, 0x9085, 0x1e00, 0x602a, 0x70b4, 0x9005,
-	0x1118, 0x6887, 0x0001, 0x0008, 0x6886, 0x080c, 0xd25a, 0x0110,
-	0x080c, 0x0d45, 0x9006, 0x00ee, 0x00de, 0x00ce, 0x003e, 0x002e,
-	0x001e, 0x015e, 0x0005, 0x0156, 0x0016, 0x0026, 0x0036, 0x00c6,
-	0x00d6, 0x00e6, 0x2061, 0x0100, 0x2071, 0x1800, 0x7000, 0x9086,
-	0x0003, 0x1168, 0x2001, 0x020b, 0x2004, 0x9084, 0x5540, 0x9086,
-	0x5540, 0x1128, 0x2069, 0x1a78, 0x2d04, 0x8000, 0x206a, 0x2069,
-	0x0140, 0x6020, 0x9084, 0x00c0, 0x0120, 0x6884, 0x9005, 0x1904,
-	0x7550, 0x2001, 0x0088, 0x080c, 0x2cfc, 0x9006, 0x60e2, 0x6886,
-	0x080c, 0x28bf, 0x2069, 0x0200, 0x6804, 0x9005, 0x1118, 0x6808,
-	0x9005, 0x01c0, 0x6028, 0x9084, 0xfbff, 0x602a, 0x6027, 0x0400,
-	0x2069, 0x198e, 0x7000, 0x206a, 0x709b, 0x0026, 0x7003, 0x0001,
-	0x20a9, 0x0002, 0x1d04, 0x7532, 0x2091, 0x6000, 0x1f04, 0x7532,
-	0x0804, 0x757e, 0x2069, 0x0140, 0x20a9, 0x0384, 0x6027, 0x1e00,
-	0x2009, 0x1e00, 0x080c, 0x2c45, 0x6024, 0x910c, 0x0508, 0x9084,
-	0x1a00, 0x11f0, 0x1d04, 0x753e, 0x2091, 0x6000, 0x1f04, 0x753e,
-	0x2011, 0x0003, 0x080c, 0xa63e, 0x2011, 0x0002, 0x080c, 0xa648,
-	0x080c, 0xa552, 0x901e, 0x080c, 0xa5c8, 0x2001, 0x00a0, 0x080c,
-	0x2cfc, 0x080c, 0x7699, 0x080c, 0x602d, 0x9085, 0x0001, 0x00b0,
-	0x2001, 0x0080, 0x080c, 0x2cfc, 0x2069, 0x0140, 0x60e3, 0x0000,
-	0x70b4, 0x9005, 0x1118, 0x6887, 0x0001, 0x0008, 0x6886, 0x2001,
-	0x196c, 0x2004, 0x080c, 0x28bf, 0x60e2, 0x9006, 0x00ee, 0x00de,
+	0x2001, 0x1921, 0x200c, 0xc184, 0x2102, 0x2091, 0x4080, 0x2001,
+	0x0089, 0x2004, 0xd084, 0x190c, 0x119b, 0x00fe, 0x002e, 0x00ee,
+	0x0005, 0x2001, 0x1921, 0x200c, 0xc185, 0x2102, 0x00fe, 0x002e,
+	0x00ee, 0x0005, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210,
+	0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c,
+	0x84c2, 0x0804, 0x6d69, 0x0096, 0x00e6, 0x7824, 0x2048, 0x2071,
+	0x1800, 0x702c, 0xa802, 0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2,
+	0x080c, 0x84c2, 0x782c, 0x9094, 0x0780, 0x190c, 0x706e, 0xd0a4,
+	0x1d60, 0x00ee, 0x0e04, 0x6e03, 0x7838, 0x7938, 0x910e, 0x1de0,
+	0x00d6, 0x2069, 0x0000, 0x6836, 0x6833, 0x0013, 0x00de, 0x7044,
+	0xc084, 0x7046, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084,
+	0x190c, 0x119b, 0x782c, 0x9094, 0x0780, 0x190c, 0x706e, 0xd09c,
+	0x1170, 0x009e, 0x2900, 0x7822, 0xa804, 0x900d, 0x11e0, 0x00fe,
+	0x002e, 0x00ee, 0x0005, 0x7044, 0xc085, 0x7046, 0x0c58, 0x009e,
+	0x2908, 0x7010, 0x8000, 0x7012, 0x7018, 0x904d, 0x711a, 0x0110,
+	0xa902, 0x0008, 0x711e, 0x2148, 0xa804, 0x900d, 0x1120, 0x00fe,
+	0x002e, 0x00ee, 0x0005, 0x2071, 0x1800, 0x9016, 0x702c, 0x2148,
+	0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70c0,
+	0x9200, 0x70c2, 0x080c, 0x84c2, 0x00fe, 0x002e, 0x00ee, 0x0005,
+	0x2908, 0x7010, 0x8000, 0x7012, 0x7018, 0x904d, 0x711a, 0x0110,
+	0xa902, 0x0008, 0x711e, 0x2148, 0xa804, 0x900d, 0x1904, 0x6e9d,
+	0x782c, 0x9094, 0x0780, 0x190c, 0x706e, 0xd09c, 0x11b0, 0x701c,
+	0x904d, 0x0198, 0xa84c, 0x9005, 0x1180, 0x7010, 0x8001, 0x7012,
+	0x1108, 0x701a, 0xa800, 0x701e, 0x2900, 0x7822, 0x782c, 0x9094,
+	0x0780, 0x190c, 0x706e, 0xd09c, 0x0d50, 0x782c, 0x9094, 0x0780,
+	0x190c, 0x706e, 0xd0a4, 0x05a8, 0x00e6, 0x7824, 0x2048, 0x2071,
+	0x1800, 0x702c, 0xa802, 0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2,
+	0x080c, 0x84c2, 0x782c, 0x9094, 0x0780, 0x190c, 0x706e, 0xd0a4,
+	0x1d60, 0x00ee, 0x0e04, 0x6e96, 0x7838, 0x7938, 0x910e, 0x1de0,
+	0x00d6, 0x2069, 0x0000, 0x6836, 0x6833, 0x0013, 0x00de, 0x7044,
+	0xc084, 0x7046, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084,
+	0x190c, 0x119b, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x7044, 0xc085,
+	0x7046, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x00e6, 0x2071, 0x1800,
+	0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff,
+	0x1dc8, 0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c, 0x84c2, 0x00ee,
+	0x0804, 0x6e40, 0x2071, 0x1910, 0xa803, 0x0000, 0x2908, 0x7010,
+	0x8000, 0x7012, 0x7018, 0x904d, 0x711a, 0x0110, 0xa902, 0x0008,
+	0x711e, 0x2148, 0xa804, 0x900d, 0x1128, 0x1e04, 0x6edd, 0x002e,
+	0x00ee, 0x0005, 0x2071, 0x1800, 0x9016, 0x702c, 0x2148, 0xa904,
+	0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70c0, 0x9200,
+	0x70c2, 0x080c, 0x84c2, 0x0e04, 0x6ec7, 0x2071, 0x1910, 0x701c,
+	0x2048, 0xa84c, 0x900d, 0x0d18, 0x2071, 0x0000, 0x7182, 0xa850,
+	0x7032, 0xa86c, 0x7086, 0x7036, 0xa870, 0x708a, 0xa850, 0x9082,
+	0x0019, 0x1278, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084,
+	0x190c, 0x119b, 0x2071, 0x1910, 0x080c, 0x705a, 0x002e, 0x00ee,
+	0x0005, 0xa850, 0x9082, 0x001c, 0x1e68, 0xa880, 0x708e, 0x7036,
+	0x0146, 0x01d6, 0x0136, 0x01c6, 0x0156, 0x20e9, 0x0000, 0x20a1,
+	0x002a, 0xa868, 0x20a8, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x0021,
+	0x2098, 0x4003, 0x015e, 0x01ce, 0x013e, 0x01de, 0x014e, 0x0890,
+	0x2071, 0x1910, 0xa803, 0x0000, 0x2908, 0x7010, 0x8000, 0x7012,
+	0x7018, 0x904d, 0x711a, 0x0110, 0xa902, 0x0008, 0x711e, 0x2148,
+	0xa804, 0x900d, 0x1118, 0x002e, 0x00ee, 0x0005, 0x2071, 0x1800,
+	0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff,
+	0x1dc8, 0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c, 0x84c2, 0x002e,
+	0x00ee, 0x0005, 0x0006, 0xa87c, 0x0006, 0xa867, 0x0103, 0x20a9,
+	0x001c, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x001d, 0x20a0, 0x9006,
+	0x4004, 0x000e, 0x9084, 0x00ff, 0xa87e, 0x000e, 0xa87a, 0xa982,
+	0x0005, 0x2071, 0x1910, 0x7004, 0x0002, 0x6f6d, 0x6f6e, 0x7059,
+	0x6f6e, 0x6f6b, 0x7059, 0x080c, 0x0dd5, 0x0005, 0x2001, 0x1947,
+	0x2004, 0x0002, 0x6f78, 0x6f78, 0x6ff2, 0x6ff3, 0x6f78, 0x6ff3,
+	0x0126, 0x2091, 0x8000, 0x1e0c, 0x7079, 0x701c, 0x904d, 0x0508,
+	0xa84c, 0x9005, 0x0904, 0x6fc3, 0x0e04, 0x6fa1, 0xa94c, 0x2071,
+	0x0000, 0x7182, 0xa850, 0x7032, 0xa86c, 0x7086, 0x7036, 0xa870,
+	0x708a, 0xa850, 0x9082, 0x0019, 0x1278, 0x2091, 0x4080, 0x2001,
+	0x0089, 0x2004, 0xd084, 0x190c, 0x119b, 0x2071, 0x1910, 0x080c,
+	0x705a, 0x012e, 0x0804, 0x6ff1, 0xa850, 0x9082, 0x001c, 0x1e68,
+	0xa880, 0x708e, 0x7036, 0x0146, 0x01d6, 0x0136, 0x01c6, 0x0156,
+	0x20e9, 0x0000, 0x20a1, 0x002a, 0xa868, 0x20a8, 0xa860, 0x20e0,
+	0xa85c, 0x9080, 0x0021, 0x2098, 0x4003, 0x015e, 0x01ce, 0x013e,
+	0x01de, 0x014e, 0x0890, 0x2001, 0x005b, 0x2004, 0x9094, 0x0780,
+	0x190c, 0x706e, 0xd09c, 0x2071, 0x1910, 0x1510, 0x2071, 0x1910,
+	0x700f, 0x0001, 0xa964, 0x9184, 0x00ff, 0x9086, 0x0003, 0x1130,
+	0x810f, 0x918c, 0x00ff, 0x8101, 0x0108, 0x710e, 0x2900, 0x00d6,
+	0x2069, 0x0050, 0x6822, 0x00de, 0x2071, 0x1910, 0x701c, 0x2048,
+	0x7010, 0x8001, 0x7012, 0xa800, 0x701e, 0x9005, 0x1108, 0x701a,
+	0x012e, 0x0005, 0x0005, 0x00d6, 0x2008, 0x2069, 0x19f9, 0x683c,
+	0x9005, 0x0760, 0x0158, 0x9186, 0x0003, 0x0540, 0x2001, 0x1815,
+	0x2004, 0x2009, 0x1aca, 0x210c, 0x9102, 0x1500, 0x0126, 0x2091,
+	0x8000, 0x2069, 0x0050, 0x693c, 0x6838, 0x9106, 0x0190, 0x0e04,
+	0x7025, 0x2069, 0x0000, 0x6837, 0x8040, 0x6833, 0x0012, 0x6883,
+	0x8040, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c,
+	0x119b, 0x2069, 0x19f9, 0x683f, 0xffff, 0x012e, 0x00de, 0x0126,
+	0x2091, 0x8000, 0x1e0c, 0x70da, 0x701c, 0x904d, 0x0540, 0x2001,
+	0x005b, 0x2004, 0x9094, 0x0780, 0x15c9, 0xd09c, 0x1500, 0x2071,
+	0x1910, 0x700f, 0x0001, 0xa964, 0x9184, 0x00ff, 0x9086, 0x0003,
+	0x1130, 0x810f, 0x918c, 0x00ff, 0x8101, 0x0108, 0x710e, 0x2900,
+	0x00d6, 0x2069, 0x0050, 0x6822, 0x00de, 0x701c, 0x2048, 0x7010,
+	0x8001, 0x7012, 0xa800, 0x701e, 0x9005, 0x1108, 0x701a, 0x012e,
+	0x0005, 0x0005, 0x0126, 0x2091, 0x8000, 0x701c, 0x904d, 0x0160,
+	0x7010, 0x8001, 0x7012, 0xa800, 0x701e, 0x9005, 0x1108, 0x701a,
+	0x012e, 0x080c, 0x1031, 0x0005, 0x012e, 0x0005, 0x2091, 0x8000,
+	0x0e04, 0x7070, 0x0006, 0x0016, 0x2001, 0x8004, 0x0006, 0x0804,
+	0x0dde, 0x0096, 0x00f6, 0x2079, 0x0050, 0x7044, 0xd084, 0x01c0,
+	0xc084, 0x7046, 0x7838, 0x7938, 0x910e, 0x1de0, 0x00d6, 0x2069,
+	0x0000, 0x6836, 0x6833, 0x0013, 0x00de, 0x2091, 0x4080, 0x2001,
+	0x0089, 0x2004, 0xd084, 0x190c, 0x119b, 0x00fe, 0x009e, 0x0005,
+	0x782c, 0x9094, 0x0780, 0x1991, 0xd0a4, 0x0db8, 0x00e6, 0x2071,
+	0x1800, 0x7824, 0x00e6, 0x2071, 0x0040, 0x712c, 0xd19c, 0x1148,
+	0x2009, 0x1830, 0x210c, 0x918a, 0x0020, 0x0218, 0x7022, 0x00ee,
+	0x0058, 0x00ee, 0x2048, 0x702c, 0xa802, 0x2900, 0x702e, 0x70c0,
+	0x8000, 0x70c2, 0x080c, 0x84c2, 0x782c, 0x9094, 0x0780, 0x190c,
+	0x706e, 0xd0a4, 0x19f0, 0x7838, 0x7938, 0x910e, 0x1de0, 0x00d6,
+	0x2069, 0x0000, 0x6836, 0x6833, 0x0013, 0x00de, 0x2091, 0x4080,
+	0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x119b, 0x00ee, 0x00fe,
+	0x009e, 0x0005, 0x00f6, 0x2079, 0x0050, 0x7044, 0xd084, 0x01b8,
+	0xc084, 0x7046, 0x7838, 0x7938, 0x910e, 0x1de0, 0x00d6, 0x2069,
+	0x0000, 0x6836, 0x6833, 0x0013, 0x00de, 0x2091, 0x4080, 0x2001,
+	0x0089, 0x2004, 0xd084, 0x190c, 0x119b, 0x00fe, 0x0005, 0x782c,
+	0x9094, 0x0780, 0x190c, 0x706e, 0xd0a4, 0x0db8, 0x00e6, 0x2071,
+	0x1800, 0x7824, 0x2048, 0x702c, 0xa802, 0x2900, 0x702e, 0x70c0,
+	0x8000, 0x70c2, 0x080c, 0x84c2, 0x782c, 0x9094, 0x0780, 0x190c,
+	0x706e, 0xd0a4, 0x1d70, 0x00d6, 0x2069, 0x0050, 0x693c, 0x2069,
+	0x1947, 0x6808, 0x690a, 0x2069, 0x19f9, 0x9102, 0x1118, 0x683c,
+	0x9005, 0x1328, 0x2001, 0x1948, 0x200c, 0x810d, 0x693e, 0x00de,
+	0x00ee, 0x00fe, 0x0005, 0x7098, 0x908a, 0x0029, 0x1a0c, 0x0dd5,
+	0x9082, 0x001d, 0x001b, 0x6027, 0x1e00, 0x0005, 0x7202, 0x7188,
+	0x71a4, 0x71ce, 0x71f1, 0x7231, 0x7243, 0x71a4, 0x7219, 0x7143,
+	0x7171, 0x7142, 0x0005, 0x00d6, 0x2069, 0x0200, 0x6804, 0x9005,
+	0x1180, 0x6808, 0x9005, 0x1518, 0x709b, 0x0028, 0x2069, 0x198e,
+	0x2d04, 0x7002, 0x080c, 0x7576, 0x6028, 0x9085, 0x0600, 0x602a,
+	0x00b0, 0x709b, 0x0028, 0x2069, 0x198e, 0x2d04, 0x7002, 0x6028,
+	0x9085, 0x0600, 0x602a, 0x00e6, 0x0036, 0x0046, 0x0056, 0x2071,
+	0x1a61, 0x080c, 0x1aec, 0x005e, 0x004e, 0x003e, 0x00ee, 0x00de,
+	0x0005, 0x00d6, 0x2069, 0x0200, 0x6804, 0x9005, 0x1178, 0x6808,
+	0x9005, 0x1160, 0x709b, 0x0028, 0x2069, 0x198e, 0x2d04, 0x7002,
+	0x080c, 0x7611, 0x6028, 0x9085, 0x0600, 0x602a, 0x00de, 0x0005,
+	0x0006, 0x2001, 0x0090, 0x080c, 0x2d4e, 0x000e, 0x6124, 0xd1e4,
+	0x1190, 0x080c, 0x72b0, 0xd1d4, 0x1160, 0xd1dc, 0x1138, 0xd1cc,
+	0x0150, 0x709b, 0x0020, 0x080c, 0x72b0, 0x0028, 0x709b, 0x001d,
+	0x0010, 0x709b, 0x001f, 0x0005, 0x2001, 0x0088, 0x080c, 0x2d4e,
+	0x6124, 0xd1cc, 0x11e8, 0xd1dc, 0x11c0, 0xd1e4, 0x1198, 0x9184,
+	0x1e00, 0x11d8, 0x080c, 0x1b11, 0x60e3, 0x0001, 0x600c, 0xc0b4,
+	0x600e, 0x080c, 0x746a, 0x2001, 0x0080, 0x080c, 0x2d4e, 0x709b,
+	0x0028, 0x0058, 0x709b, 0x001e, 0x0040, 0x709b, 0x001d, 0x0028,
+	0x709b, 0x0020, 0x0010, 0x709b, 0x001f, 0x0005, 0x080c, 0x1b11,
+	0x60e3, 0x0001, 0x600c, 0xc0b4, 0x600e, 0x080c, 0x746a, 0x2001,
+	0x0080, 0x080c, 0x2d4e, 0x6124, 0xd1d4, 0x1180, 0xd1dc, 0x1158,
+	0xd1e4, 0x1130, 0x9184, 0x1e00, 0x1158, 0x709b, 0x0028, 0x0040,
+	0x709b, 0x001e, 0x0028, 0x709b, 0x001d, 0x0010, 0x709b, 0x001f,
+	0x0005, 0x2001, 0x00a0, 0x080c, 0x2d4e, 0x6124, 0xd1dc, 0x1138,
+	0xd1e4, 0x0138, 0x080c, 0x1b11, 0x709b, 0x001e, 0x0010, 0x709b,
+	0x001d, 0x0005, 0x080c, 0x7333, 0x6124, 0xd1dc, 0x1188, 0x080c,
+	0x72b0, 0x0016, 0x080c, 0x1b11, 0x001e, 0xd1d4, 0x1128, 0xd1e4,
+	0x0138, 0x709b, 0x001e, 0x0020, 0x709b, 0x001f, 0x080c, 0x72b0,
+	0x0005, 0x0006, 0x2001, 0x00a0, 0x080c, 0x2d4e, 0x000e, 0x6124,
+	0xd1d4, 0x1160, 0xd1cc, 0x1150, 0xd1dc, 0x1128, 0xd1e4, 0x0140,
+	0x709b, 0x001e, 0x0028, 0x709b, 0x001d, 0x0010, 0x709b, 0x0021,
+	0x0005, 0x080c, 0x7333, 0x6124, 0xd1d4, 0x1150, 0xd1dc, 0x1128,
+	0xd1e4, 0x0140, 0x709b, 0x001e, 0x0028, 0x709b, 0x001d, 0x0010,
+	0x709b, 0x001f, 0x0005, 0x0006, 0x2001, 0x0090, 0x080c, 0x2d4e,
+	0x000e, 0x6124, 0xd1d4, 0x1178, 0xd1cc, 0x1150, 0xd1dc, 0x1128,
+	0xd1e4, 0x0158, 0x709b, 0x001e, 0x0040, 0x709b, 0x001d, 0x0028,
+	0x709b, 0x0020, 0x0010, 0x709b, 0x001f, 0x0005, 0x0016, 0x00c6,
+	0x00d6, 0x00e6, 0x0126, 0x2061, 0x0100, 0x2069, 0x0140, 0x2071,
+	0x1800, 0x2091, 0x8000, 0x080c, 0x743e, 0x11d8, 0x2001, 0x180c,
+	0x200c, 0xd1b4, 0x01b0, 0xc1b4, 0x2102, 0x6027, 0x0200, 0x080c,
+	0x2c76, 0x6024, 0xd0cc, 0x0148, 0x2001, 0x00a0, 0x080c, 0x2d4e,
+	0x080c, 0x7724, 0x080c, 0x60ad, 0x0428, 0x6028, 0xc0cd, 0x602a,
+	0x0408, 0x080c, 0x7458, 0x0150, 0x080c, 0x744f, 0x1138, 0x2001,
+	0x0001, 0x080c, 0x2828, 0x080c, 0x7416, 0x00a0, 0x080c, 0x7330,
+	0x0178, 0x2001, 0x0001, 0x080c, 0x2828, 0x7098, 0x9086, 0x001e,
+	0x0120, 0x7098, 0x9086, 0x0022, 0x1118, 0x709b, 0x0025, 0x0010,
+	0x709b, 0x0021, 0x012e, 0x00ee, 0x00de, 0x00ce, 0x001e, 0x0005,
+	0x0026, 0x2011, 0x72c1, 0x080c, 0x868a, 0x002e, 0x0016, 0x0026,
+	0x2009, 0x0064, 0x2011, 0x72c1, 0x080c, 0x8681, 0x002e, 0x001e,
+	0x0005, 0x00e6, 0x00f6, 0x0016, 0x080c, 0xa356, 0x2071, 0x1800,
+	0x080c, 0x725e, 0x001e, 0x00fe, 0x00ee, 0x0005, 0x0016, 0x0026,
+	0x0036, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x0126, 0x080c, 0xa356,
+	0x2061, 0x0100, 0x2069, 0x0140, 0x2071, 0x1800, 0x2091, 0x8000,
+	0x6028, 0xc09c, 0x602a, 0x2011, 0x0003, 0x080c, 0xa722, 0x2011,
+	0x0002, 0x080c, 0xa72c, 0x080c, 0xa636, 0x080c, 0x8636, 0x0036,
+	0x901e, 0x080c, 0xa6ac, 0x003e, 0x60e3, 0x0000, 0x080c, 0xeb79,
+	0x080c, 0xeb94, 0x2009, 0x0004, 0x080c, 0x2c7c, 0x080c, 0x2b97,
+	0x2001, 0x1800, 0x2003, 0x0004, 0x6027, 0x0008, 0x2011, 0x72c1,
+	0x080c, 0x868a, 0x080c, 0x7458, 0x0118, 0x9006, 0x080c, 0x2d4e,
+	0x080c, 0x0bae, 0x2001, 0x0001, 0x080c, 0x2828, 0x012e, 0x00fe,
+	0x00ee, 0x00de, 0x00ce, 0x003e, 0x002e, 0x001e, 0x0005, 0x0026,
+	0x00e6, 0x2011, 0x72ce, 0x2071, 0x19f9, 0x701c, 0x9206, 0x1118,
+	0x7018, 0x9005, 0x0110, 0x9085, 0x0001, 0x00ee, 0x002e, 0x0005,
+	0x6020, 0xd09c, 0x0005, 0x6800, 0x9084, 0xfffe, 0x9086, 0x00c0,
+	0x0170, 0x2001, 0x00c0, 0x080c, 0x2d4e, 0x0156, 0x20a9, 0x002d,
+	0x1d04, 0x7340, 0x2091, 0x6000, 0x1f04, 0x7340, 0x015e, 0x0005,
+	0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100, 0x2069, 0x0140, 0x2071,
+	0x1800, 0x080c, 0x7733, 0x2001, 0x196c, 0x2003, 0x0000, 0x9006,
+	0x709a, 0x60e2, 0x6886, 0x080c, 0x28f0, 0x9006, 0x080c, 0x2d4e,
+	0x080c, 0x5f6c, 0x6027, 0xffff, 0x602b, 0x182f, 0x00ee, 0x00de,
+	0x00ce, 0x0005, 0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100, 0x2069,
+	0x0140, 0x2071, 0x1800, 0x2001, 0x197c, 0x200c, 0x9186, 0x0000,
+	0x0158, 0x9186, 0x0001, 0x0158, 0x9186, 0x0002, 0x0158, 0x9186,
+	0x0003, 0x0158, 0x0804, 0x7406, 0x709b, 0x0022, 0x0040, 0x709b,
+	0x0021, 0x0028, 0x709b, 0x0023, 0x0010, 0x709b, 0x0024, 0x60e3,
+	0x0000, 0x6887, 0x0001, 0x2001, 0x0001, 0x080c, 0x28f0, 0x0026,
+	0x080c, 0xaeb4, 0x002e, 0x7000, 0x908e, 0x0004, 0x0118, 0x602b,
+	0x0028, 0x0010, 0x602b, 0x0020, 0x0156, 0x0126, 0x2091, 0x8000,
+	0x20a9, 0x0005, 0x6024, 0xd0ac, 0x0150, 0x012e, 0x015e, 0x080c,
+	0xd388, 0x0118, 0x9006, 0x080c, 0x2d78, 0x0804, 0x7412, 0x6800,
+	0x9084, 0x00a1, 0xc0bd, 0x6802, 0x080c, 0x2c76, 0x6904, 0xd1d4,
+	0x1140, 0x2001, 0x0100, 0x080c, 0x2d4e, 0x1f04, 0x73aa, 0x080c,
+	0x7495, 0x012e, 0x015e, 0x080c, 0x744f, 0x01d8, 0x6044, 0x9005,
+	0x0198, 0x2011, 0x0114, 0x2204, 0x9085, 0x0100, 0x2012, 0x6050,
+	0x0006, 0x9085, 0x0020, 0x6052, 0x080c, 0x7495, 0x9006, 0x8001,
+	0x1df0, 0x000e, 0x6052, 0x0028, 0x6804, 0xd0d4, 0x1110, 0x080c,
+	0x7495, 0x080c, 0xd388, 0x0118, 0x9006, 0x080c, 0x2d78, 0x0016,
+	0x0026, 0x7000, 0x908e, 0x0004, 0x0130, 0x2009, 0x00c8, 0x2011,
+	0x72ce, 0x080c, 0x8648, 0x002e, 0x001e, 0x080c, 0x84b9, 0x7034,
+	0xc085, 0x7036, 0x2001, 0x197c, 0x2003, 0x0004, 0x080c, 0x712b,
+	0x080c, 0x744f, 0x0138, 0x6804, 0xd0d4, 0x1120, 0xd0dc, 0x1100,
+	0x080c, 0x7729, 0x00ee, 0x00de, 0x00ce, 0x0005, 0x00c6, 0x00d6,
+	0x00e6, 0x2061, 0x0100, 0x2069, 0x0140, 0x2071, 0x1800, 0x080c,
+	0x84d0, 0x080c, 0x84c2, 0x080c, 0x7733, 0x2001, 0x196c, 0x2003,
+	0x0000, 0x9006, 0x709a, 0x60e2, 0x6886, 0x080c, 0x28f0, 0x9006,
+	0x080c, 0x2d4e, 0x6043, 0x0090, 0x6043, 0x0010, 0x6027, 0xffff,
+	0x602b, 0x182f, 0x00ee, 0x00de, 0x00ce, 0x0005, 0x0006, 0x2001,
+	0x197b, 0x2004, 0x9086, 0xaaaa, 0x000e, 0x0005, 0x0006, 0x080c,
+	0x5761, 0x9084, 0x0030, 0x9086, 0x0000, 0x000e, 0x0005, 0x0006,
+	0x080c, 0x5761, 0x9084, 0x0030, 0x9086, 0x0030, 0x000e, 0x0005,
+	0x0006, 0x080c, 0x5761, 0x9084, 0x0030, 0x9086, 0x0010, 0x000e,
+	0x0005, 0x0006, 0x080c, 0x5761, 0x9084, 0x0030, 0x9086, 0x0020,
+	0x000e, 0x0005, 0x0036, 0x0016, 0x2001, 0x180c, 0x2004, 0x908c,
+	0x0013, 0x0180, 0x0020, 0x080c, 0x2910, 0x900e, 0x0028, 0x080c,
+	0x6a04, 0x1dc8, 0x2009, 0x0002, 0x2019, 0x0028, 0x080c, 0x31e9,
+	0x9006, 0x0019, 0x001e, 0x003e, 0x0005, 0x00e6, 0x2071, 0x180c,
+	0x2e04, 0x0130, 0x080c, 0xd381, 0x1128, 0x9085, 0x0010, 0x0010,
+	0x9084, 0xffef, 0x2072, 0x00ee, 0x0005, 0x6050, 0x0006, 0x60ec,
+	0x0006, 0x600c, 0x0006, 0x6004, 0x0006, 0x6028, 0x0006, 0x0016,
+	0x6138, 0x6050, 0x9084, 0xfbff, 0x9085, 0x2000, 0x6052, 0x613a,
+	0x20a9, 0x0012, 0x1d04, 0x74aa, 0x2091, 0x6000, 0x1f04, 0x74aa,
+	0x602f, 0x0100, 0x602f, 0x0000, 0x6050, 0x9085, 0x0400, 0x9084,
+	0xdfff, 0x6052, 0x613a, 0x001e, 0x602f, 0x0040, 0x602f, 0x0000,
+	0x000e, 0x602a, 0x000e, 0x6006, 0x000e, 0x600e, 0x000e, 0x60ee,
+	0x60e3, 0x0000, 0x6887, 0x0001, 0x2001, 0x0001, 0x080c, 0x28f0,
+	0x2001, 0x00a0, 0x0006, 0x080c, 0xd388, 0x000e, 0x0130, 0x080c,
+	0x2d6c, 0x9006, 0x080c, 0x2d78, 0x0010, 0x080c, 0x2d4e, 0x000e,
+	0x6052, 0x6050, 0x0006, 0xc0e5, 0x6052, 0x00f6, 0x2079, 0x0100,
+	0x080c, 0x2beb, 0x00fe, 0x000e, 0x6052, 0x0005, 0x0156, 0x0016,
+	0x0026, 0x0036, 0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100, 0x2069,
+	0x0140, 0x2071, 0x1800, 0x6020, 0x9084, 0x0080, 0x0138, 0x2001,
+	0x180c, 0x200c, 0xc1c5, 0x2102, 0x0804, 0x7568, 0x2001, 0x180c,
+	0x200c, 0xc1c4, 0x2102, 0x6028, 0x9084, 0xe1ff, 0x602a, 0x6027,
+	0x0200, 0x2001, 0x0090, 0x080c, 0x2d4e, 0x20a9, 0x0366, 0x6024,
+	0xd0cc, 0x1518, 0x1d04, 0x7517, 0x2091, 0x6000, 0x1f04, 0x7517,
+	0x2011, 0x0003, 0x080c, 0xa722, 0x2011, 0x0002, 0x080c, 0xa72c,
+	0x080c, 0xa636, 0x901e, 0x080c, 0xa6ac, 0x2001, 0x00a0, 0x080c,
+	0x2d4e, 0x080c, 0x7724, 0x080c, 0x60ad, 0x080c, 0xd388, 0x0110,
+	0x080c, 0x0d45, 0x9085, 0x0001, 0x0488, 0x080c, 0x1b11, 0x60e3,
+	0x0000, 0x2001, 0x196c, 0x2004, 0x080c, 0x28f0, 0x60e2, 0x2001,
+	0x0080, 0x080c, 0x2d4e, 0x20a9, 0x0366, 0x6027, 0x1e00, 0x2009,
+	0x1e00, 0x080c, 0x2c76, 0x6024, 0x910c, 0x0138, 0x1d04, 0x754d,
+	0x2091, 0x6000, 0x1f04, 0x754d, 0x0818, 0x6028, 0x9085, 0x1e00,
+	0x602a, 0x70b4, 0x9005, 0x1118, 0x6887, 0x0001, 0x0008, 0x6886,
+	0x080c, 0xd388, 0x0110, 0x080c, 0x0d45, 0x9006, 0x00ee, 0x00de,
 	0x00ce, 0x003e, 0x002e, 0x001e, 0x015e, 0x0005, 0x0156, 0x0016,
 	0x0026, 0x0036, 0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100, 0x2071,
-	0x1800, 0x6020, 0x9084, 0x00c0, 0x01c8, 0x2011, 0x0003, 0x080c,
-	0xa63e, 0x2011, 0x0002, 0x080c, 0xa648, 0x080c, 0xa552, 0x901e,
-	0x080c, 0xa5c8, 0x2069, 0x0140, 0x2001, 0x00a0, 0x080c, 0x2cfc,
-	0x080c, 0x7699, 0x080c, 0x602d, 0x0804, 0x7619, 0x2001, 0x180c,
-	0x200c, 0xd1b4, 0x1160, 0xc1b5, 0x2102, 0x080c, 0x7231, 0x2069,
-	0x0140, 0x2001, 0x0080, 0x080c, 0x2cfc, 0x60e3, 0x0000, 0x2069,
-	0x0200, 0x6804, 0x9005, 0x1118, 0x6808, 0x9005, 0x0180, 0x6028,
-	0x9084, 0xfdff, 0x602a, 0x6027, 0x0200, 0x2069, 0x198e, 0x7000,
-	0x206a, 0x709b, 0x0027, 0x7003, 0x0001, 0x0804, 0x7619, 0x6027,
-	0x1e00, 0x2009, 0x1e00, 0x080c, 0x2c45, 0x6024, 0x910c, 0x01c8,
-	0x9084, 0x1c00, 0x11b0, 0x1d04, 0x75d7, 0x0006, 0x0016, 0x00c6,
-	0x00d6, 0x00e6, 0x080c, 0x8459, 0x00ee, 0x00de, 0x00ce, 0x001e,
-	0x000e, 0x00e6, 0x2071, 0x19f9, 0x7070, 0x00ee, 0x9005, 0x19f8,
-	0x0400, 0x0026, 0x2011, 0x7249, 0x080c, 0x84f9, 0x2011, 0x723c,
-	0x080c, 0x85d3, 0x002e, 0x2069, 0x0140, 0x60e3, 0x0000, 0x70b4,
-	0x9005, 0x1118, 0x6887, 0x0001, 0x0008, 0x6886, 0x2001, 0x196c,
-	0x2004, 0x080c, 0x28bf, 0x60e2, 0x2001, 0x180c, 0x200c, 0xc1b4,
-	0x2102, 0x00ee, 0x00de, 0x00ce, 0x003e, 0x002e, 0x001e, 0x015e,
-	0x0005, 0x0156, 0x0016, 0x0026, 0x0036, 0x0046, 0x00c6, 0x00e6,
-	0x2061, 0x0100, 0x2071, 0x1800, 0x080c, 0xd253, 0x1904, 0x7687,
-	0x7130, 0xd184, 0x1170, 0x080c, 0x3326, 0x0138, 0xc18d, 0x7132,
-	0x2011, 0x1848, 0x2214, 0xd2ac, 0x1120, 0x7030, 0xd08c, 0x0904,
-	0x7687, 0x2011, 0x1848, 0x220c, 0xd1a4, 0x0538, 0x0016, 0x2019,
-	0x000e, 0x080c, 0xe55d, 0x0156, 0x00b6, 0x20a9, 0x007f, 0x900e,
-	0x9186, 0x007e, 0x01a0, 0x9186, 0x0080, 0x0188, 0x080c, 0x6616,
-	0x1170, 0x2120, 0x9006, 0x0016, 0x2009, 0x000e, 0x080c, 0xe5e9,
-	0x2009, 0x0001, 0x2011, 0x0100, 0x080c, 0x86e3, 0x001e, 0x8108,
-	0x1f04, 0x7650, 0x00be, 0x015e, 0x001e, 0xd1ac, 0x1148, 0x0016,
-	0x2009, 0x0002, 0x2019, 0x0004, 0x080c, 0x3197, 0x001e, 0x0078,
-	0x0156, 0x00b6, 0x20a9, 0x007f, 0x900e, 0x080c, 0x6616, 0x1110,
-	0x080c, 0x6047, 0x8108, 0x1f04, 0x767d, 0x00be, 0x015e, 0x080c,
-	0x1ae0, 0x080c, 0xadd0, 0x60e3, 0x0000, 0x080c, 0x602d, 0x080c,
-	0x72e5, 0x00ee, 0x00ce, 0x004e, 0x003e, 0x002e, 0x001e, 0x015e,
-	0x0005, 0x2001, 0x197c, 0x2003, 0x0001, 0x0005, 0x2001, 0x197c,
-	0x2003, 0x0000, 0x0005, 0x2001, 0x197b, 0x2003, 0xaaaa, 0x0005,
-	0x2001, 0x197b, 0x2003, 0x0000, 0x0005, 0x2071, 0x18fa, 0x7003,
-	0x0000, 0x7007, 0x0000, 0x080c, 0x1018, 0x090c, 0x0dd5, 0xa8ab,
-	0xdcb0, 0x2900, 0x704e, 0x080c, 0x1018, 0x090c, 0x0dd5, 0xa8ab,
-	0xdcb0, 0x2900, 0x7052, 0xa867, 0x0000, 0xa86b, 0x0001, 0xa89f,
-	0x0000, 0x0005, 0x00e6, 0x2071, 0x0040, 0x6848, 0x9005, 0x1118,
-	0x9085, 0x0001, 0x04b0, 0x6840, 0x9005, 0x0150, 0x04a1, 0x6a50,
-	0x9200, 0x7002, 0x6854, 0x9101, 0x7006, 0x9006, 0x7012, 0x7016,
-	0x6850, 0x7002, 0x6854, 0x7006, 0x6858, 0x700a, 0x685c, 0x700e,
-	0x6840, 0x9005, 0x1110, 0x7012, 0x7016, 0x6848, 0x701a, 0x701c,
-	0x9085, 0x0040, 0x701e, 0x2001, 0x0019, 0x7036, 0x702b, 0x0001,
-	0x2001, 0x0004, 0x200c, 0x918c, 0xfff7, 0x918d, 0x8000, 0x2102,
-	0x00d6, 0x2069, 0x18fa, 0x6807, 0x0001, 0x00de, 0x080c, 0x7c86,
-	0x9006, 0x00ee, 0x0005, 0x900e, 0x0156, 0x20a9, 0x0006, 0x8003,
-	0x2011, 0x0100, 0x2214, 0x9296, 0x0008, 0x1110, 0x818d, 0x0010,
-	0x81f5, 0x3e08, 0x1f04, 0x770f, 0x015e, 0x0005, 0x2079, 0x0040,
-	0x2071, 0x18fa, 0x7004, 0x0002, 0x772e, 0x772f, 0x7767, 0x77c2,
-	0x78d2, 0x772c, 0x772c, 0x78fc, 0x080c, 0x0dd5, 0x0005, 0x2079,
-	0x0040, 0x782c, 0x908c, 0x0780, 0x190c, 0x7d68, 0xd0a4, 0x01f8,
+	0x1800, 0x7000, 0x9086, 0x0003, 0x1168, 0x2001, 0x020b, 0x2004,
+	0x9084, 0x5540, 0x9086, 0x5540, 0x1128, 0x2069, 0x1a78, 0x2d04,
+	0x8000, 0x206a, 0x2069, 0x0140, 0x6020, 0x9084, 0x00c0, 0x0120,
+	0x6884, 0x9005, 0x1904, 0x75db, 0x2001, 0x0088, 0x080c, 0x2d4e,
+	0x9006, 0x60e2, 0x6886, 0x080c, 0x28f0, 0x2069, 0x0200, 0x6804,
+	0x9005, 0x1118, 0x6808, 0x9005, 0x01c0, 0x6028, 0x9084, 0xfbff,
+	0x602a, 0x6027, 0x0400, 0x2069, 0x198e, 0x7000, 0x206a, 0x709b,
+	0x0026, 0x7003, 0x0001, 0x20a9, 0x0002, 0x1d04, 0x75bd, 0x2091,
+	0x6000, 0x1f04, 0x75bd, 0x0804, 0x7609, 0x2069, 0x0140, 0x20a9,
+	0x0384, 0x6027, 0x1e00, 0x2009, 0x1e00, 0x080c, 0x2c76, 0x6024,
+	0x910c, 0x0508, 0x9084, 0x1a00, 0x11f0, 0x1d04, 0x75c9, 0x2091,
+	0x6000, 0x1f04, 0x75c9, 0x2011, 0x0003, 0x080c, 0xa722, 0x2011,
+	0x0002, 0x080c, 0xa72c, 0x080c, 0xa636, 0x901e, 0x080c, 0xa6ac,
+	0x2001, 0x00a0, 0x080c, 0x2d4e, 0x080c, 0x7724, 0x080c, 0x60ad,
+	0x9085, 0x0001, 0x00b0, 0x2001, 0x0080, 0x080c, 0x2d4e, 0x2069,
+	0x0140, 0x60e3, 0x0000, 0x70b4, 0x9005, 0x1118, 0x6887, 0x0001,
+	0x0008, 0x6886, 0x2001, 0x196c, 0x2004, 0x080c, 0x28f0, 0x60e2,
+	0x9006, 0x00ee, 0x00de, 0x00ce, 0x003e, 0x002e, 0x001e, 0x015e,
+	0x0005, 0x0156, 0x0016, 0x0026, 0x0036, 0x00c6, 0x00d6, 0x00e6,
+	0x2061, 0x0100, 0x2071, 0x1800, 0x6020, 0x9084, 0x00c0, 0x01c8,
+	0x2011, 0x0003, 0x080c, 0xa722, 0x2011, 0x0002, 0x080c, 0xa72c,
+	0x080c, 0xa636, 0x901e, 0x080c, 0xa6ac, 0x2069, 0x0140, 0x2001,
+	0x00a0, 0x080c, 0x2d4e, 0x080c, 0x7724, 0x080c, 0x60ad, 0x0804,
+	0x76a4, 0x2001, 0x180c, 0x200c, 0xd1b4, 0x1160, 0xc1b5, 0x2102,
+	0x080c, 0x72b6, 0x2069, 0x0140, 0x2001, 0x0080, 0x080c, 0x2d4e,
+	0x60e3, 0x0000, 0x2069, 0x0200, 0x6804, 0x9005, 0x1118, 0x6808,
+	0x9005, 0x0180, 0x6028, 0x9084, 0xfdff, 0x602a, 0x6027, 0x0200,
+	0x2069, 0x198e, 0x7000, 0x206a, 0x709b, 0x0027, 0x7003, 0x0001,
+	0x0804, 0x76a4, 0x6027, 0x1e00, 0x2009, 0x1e00, 0x080c, 0x2c76,
+	0x6024, 0x910c, 0x01c8, 0x9084, 0x1c00, 0x11b0, 0x1d04, 0x7662,
+	0x0006, 0x0016, 0x00c6, 0x00d6, 0x00e6, 0x080c, 0x8510, 0x00ee,
+	0x00de, 0x00ce, 0x001e, 0x000e, 0x00e6, 0x2071, 0x19f9, 0x7070,
+	0x00ee, 0x9005, 0x19f8, 0x0400, 0x0026, 0x2011, 0x72ce, 0x080c,
+	0x85b0, 0x2011, 0x72c1, 0x080c, 0x868a, 0x002e, 0x2069, 0x0140,
+	0x60e3, 0x0000, 0x70b4, 0x9005, 0x1118, 0x6887, 0x0001, 0x0008,
+	0x6886, 0x2001, 0x196c, 0x2004, 0x080c, 0x28f0, 0x60e2, 0x2001,
+	0x180c, 0x200c, 0xc1b4, 0x2102, 0x00ee, 0x00de, 0x00ce, 0x003e,
+	0x002e, 0x001e, 0x015e, 0x0005, 0x0156, 0x0016, 0x0026, 0x0036,
+	0x0046, 0x00c6, 0x00e6, 0x2061, 0x0100, 0x2071, 0x1800, 0x080c,
+	0xd381, 0x1904, 0x7712, 0x7130, 0xd184, 0x1170, 0x080c, 0x3378,
+	0x0138, 0xc18d, 0x7132, 0x2011, 0x1848, 0x2214, 0xd2ac, 0x1120,
+	0x7030, 0xd08c, 0x0904, 0x7712, 0x2011, 0x1848, 0x220c, 0xd1a4,
+	0x0538, 0x0016, 0x2019, 0x000e, 0x080c, 0xe6ae, 0x0156, 0x00b6,
+	0x20a9, 0x007f, 0x900e, 0x9186, 0x007e, 0x01a0, 0x9186, 0x0080,
+	0x0188, 0x080c, 0x6699, 0x1170, 0x2120, 0x9006, 0x0016, 0x2009,
+	0x000e, 0x080c, 0xe73a, 0x2009, 0x0001, 0x2011, 0x0100, 0x080c,
+	0x879a, 0x001e, 0x8108, 0x1f04, 0x76db, 0x00be, 0x015e, 0x001e,
+	0xd1ac, 0x1148, 0x0016, 0x2009, 0x0002, 0x2019, 0x0004, 0x080c,
+	0x31e9, 0x001e, 0x0078, 0x0156, 0x00b6, 0x20a9, 0x007f, 0x900e,
+	0x080c, 0x6699, 0x1110, 0x080c, 0x60c7, 0x8108, 0x1f04, 0x7708,
+	0x00be, 0x015e, 0x080c, 0x1b11, 0x080c, 0xaeb4, 0x60e3, 0x0000,
+	0x080c, 0x60ad, 0x080c, 0x736a, 0x00ee, 0x00ce, 0x004e, 0x003e,
+	0x002e, 0x001e, 0x015e, 0x0005, 0x2001, 0x197c, 0x2003, 0x0001,
+	0x0005, 0x2001, 0x197c, 0x2003, 0x0000, 0x0005, 0x2001, 0x197b,
+	0x2003, 0xaaaa, 0x0005, 0x2001, 0x197b, 0x2003, 0x0000, 0x0005,
+	0x2071, 0x18fa, 0x7003, 0x0000, 0x7007, 0x0000, 0x080c, 0x1018,
+	0x090c, 0x0dd5, 0xa8ab, 0xdcb0, 0x2900, 0x704e, 0x080c, 0x1018,
+	0x090c, 0x0dd5, 0xa8ab, 0xdcb0, 0x2900, 0x7052, 0xa867, 0x0000,
+	0xa86b, 0x0001, 0xa89f, 0x0000, 0x0005, 0x00e6, 0x2071, 0x0040,
+	0x6848, 0x9005, 0x1118, 0x9085, 0x0001, 0x04b0, 0x6840, 0x9005,
+	0x0150, 0x04a1, 0x6a50, 0x9200, 0x7002, 0x6854, 0x9101, 0x7006,
+	0x9006, 0x7012, 0x7016, 0x6850, 0x7002, 0x6854, 0x7006, 0x6858,
+	0x700a, 0x685c, 0x700e, 0x6840, 0x9005, 0x1110, 0x7012, 0x7016,
+	0x6848, 0x701a, 0x701c, 0x9085, 0x0040, 0x701e, 0x2001, 0x0019,
+	0x7036, 0x702b, 0x0001, 0x2001, 0x0004, 0x200c, 0x918c, 0xfff7,
+	0x918d, 0x8000, 0x2102, 0x00d6, 0x2069, 0x18fa, 0x6807, 0x0001,
+	0x00de, 0x080c, 0x7d11, 0x9006, 0x00ee, 0x0005, 0x900e, 0x0156,
+	0x20a9, 0x0006, 0x8003, 0x2011, 0x0100, 0x2214, 0x9296, 0x0008,
+	0x1110, 0x818d, 0x0010, 0x81f5, 0x3e08, 0x1f04, 0x779a, 0x015e,
+	0x0005, 0x2079, 0x0040, 0x2071, 0x18fa, 0x7004, 0x0002, 0x77b9,
+	0x77ba, 0x77f2, 0x784d, 0x795d, 0x77b7, 0x77b7, 0x7987, 0x080c,
+	0x0dd5, 0x0005, 0x2079, 0x0040, 0x782c, 0x908c, 0x0780, 0x190c,
+	0x7df3, 0xd0a4, 0x01f8, 0x7824, 0x2048, 0x9006, 0xa802, 0xa806,
+	0xa864, 0x9084, 0x00ff, 0x908a, 0x0040, 0x0610, 0x00c0, 0x2001,
+	0x1800, 0x200c, 0x9186, 0x0003, 0x1168, 0x7004, 0x0002, 0x77e2,
+	0x77bc, 0x77e2, 0x77e0, 0x77e2, 0x77e2, 0x77e2, 0x77e2, 0x77e2,
+	0x080c, 0x784d, 0x782c, 0xd09c, 0x090c, 0x7d11, 0x0005, 0x9082,
+	0x005a, 0x1218, 0x2100, 0x003b, 0x0c10, 0x080c, 0x7883, 0x0c90,
+	0x00e3, 0x08e8, 0x0005, 0x7883, 0x7883, 0x7883, 0x7883, 0x7883,
+	0x7883, 0x7883, 0x7883, 0x78a5, 0x7883, 0x7883, 0x7883, 0x7883,
+	0x7883, 0x7883, 0x7883, 0x7883, 0x7883, 0x7883, 0x7883, 0x7883,
+	0x7883, 0x7883, 0x7883, 0x7883, 0x7883, 0x7883, 0x7883, 0x788f,
+	0x7883, 0x7a78, 0x7883, 0x7883, 0x7883, 0x78a5, 0x7883, 0x788f,
+	0x7ab9, 0x7afa, 0x7b41, 0x7b55, 0x7883, 0x7883, 0x78a5, 0x788f,
+	0x78b9, 0x7883, 0x7931, 0x7c00, 0x7c1b, 0x7883, 0x78a5, 0x7883,
+	0x78b9, 0x7883, 0x7883, 0x7927, 0x7c1b, 0x7883, 0x7883, 0x7883,
+	0x7883, 0x7883, 0x7883, 0x7883, 0x7883, 0x7883, 0x78cd, 0x7883,
+	0x7883, 0x7883, 0x7883, 0x7883, 0x7883, 0x7883, 0x7883, 0x7883,
+	0x7d97, 0x7883, 0x7d41, 0x7883, 0x7d41, 0x7883, 0x78e2, 0x7883,
+	0x7883, 0x7883, 0x7883, 0x7883, 0x7883, 0x2079, 0x0040, 0x7004,
+	0x9086, 0x0003, 0x1198, 0x782c, 0x080c, 0x7d3a, 0xd0a4, 0x0170,
 	0x7824, 0x2048, 0x9006, 0xa802, 0xa806, 0xa864, 0x9084, 0x00ff,
-	0x908a, 0x0040, 0x0610, 0x00c0, 0x2001, 0x1800, 0x200c, 0x9186,
-	0x0003, 0x1168, 0x7004, 0x0002, 0x7757, 0x7731, 0x7757, 0x7755,
-	0x7757, 0x7757, 0x7757, 0x7757, 0x7757, 0x080c, 0x77c2, 0x782c,
-	0xd09c, 0x090c, 0x7c86, 0x0005, 0x9082, 0x005a, 0x1218, 0x2100,
-	0x003b, 0x0c10, 0x080c, 0x77f8, 0x0c90, 0x00e3, 0x08e8, 0x0005,
-	0x77f8, 0x77f8, 0x77f8, 0x77f8, 0x77f8, 0x77f8, 0x77f8, 0x77f8,
-	0x781a, 0x77f8, 0x77f8, 0x77f8, 0x77f8, 0x77f8, 0x77f8, 0x77f8,
-	0x77f8, 0x77f8, 0x77f8, 0x77f8, 0x77f8, 0x77f8, 0x77f8, 0x77f8,
-	0x77f8, 0x77f8, 0x77f8, 0x77f8, 0x7804, 0x77f8, 0x79ed, 0x77f8,
-	0x77f8, 0x77f8, 0x781a, 0x77f8, 0x7804, 0x7a2e, 0x7a6f, 0x7ab6,
-	0x7aca, 0x77f8, 0x77f8, 0x781a, 0x7804, 0x782e, 0x77f8, 0x78a6,
-	0x7b75, 0x7b90, 0x77f8, 0x781a, 0x77f8, 0x782e, 0x77f8, 0x77f8,
-	0x789c, 0x7b90, 0x77f8, 0x77f8, 0x77f8, 0x77f8, 0x77f8, 0x77f8,
-	0x77f8, 0x77f8, 0x77f8, 0x7842, 0x77f8, 0x77f8, 0x77f8, 0x77f8,
-	0x77f8, 0x77f8, 0x77f8, 0x77f8, 0x77f8, 0x7d0c, 0x77f8, 0x7cb6,
-	0x77f8, 0x7cb6, 0x77f8, 0x7857, 0x77f8, 0x77f8, 0x77f8, 0x77f8,
-	0x77f8, 0x77f8, 0x2079, 0x0040, 0x7004, 0x9086, 0x0003, 0x1198,
-	0x782c, 0x080c, 0x7caf, 0xd0a4, 0x0170, 0x7824, 0x2048, 0x9006,
-	0xa802, 0xa806, 0xa864, 0x9084, 0x00ff, 0x908a, 0x001a, 0x1210,
-	0x002b, 0x0c50, 0x00e9, 0x080c, 0x7c86, 0x0005, 0x77f8, 0x7804,
-	0x79d9, 0x77f8, 0x7804, 0x77f8, 0x7804, 0x7804, 0x77f8, 0x7804,
-	0x79d9, 0x7804, 0x7804, 0x7804, 0x7804, 0x7804, 0x77f8, 0x7804,
-	0x79d9, 0x77f8, 0x77f8, 0x7804, 0x77f8, 0x77f8, 0x77f8, 0x7804,
-	0x00e6, 0x2071, 0x18fa, 0x2009, 0x0400, 0x0071, 0x00ee, 0x0005,
-	0x2009, 0x1000, 0x0049, 0x0005, 0x2009, 0x2000, 0x0029, 0x0005,
-	0x2009, 0x0800, 0x0009, 0x0005, 0x7007, 0x0001, 0xa868, 0x9084,
-	0x00ff, 0x9105, 0xa86a, 0x0126, 0x2091, 0x8000, 0x080c, 0x6c94,
-	0x012e, 0x0005, 0xa864, 0x8007, 0x9084, 0x00ff, 0x0d08, 0x8001,
-	0x1120, 0x7007, 0x0001, 0x0804, 0x797b, 0x7007, 0x0003, 0x7012,
-	0x2900, 0x7016, 0x701a, 0x704b, 0x797b, 0x0005, 0xa864, 0x8007,
-	0x9084, 0x00ff, 0x0968, 0x8001, 0x1120, 0x7007, 0x0001, 0x0804,
-	0x7996, 0x7007, 0x0003, 0x7012, 0x2900, 0x7016, 0x701a, 0x704b,
-	0x7996, 0x0005, 0xa864, 0x8007, 0x9084, 0x00ff, 0x0904, 0x7800,
-	0x8001, 0x1120, 0x7007, 0x0001, 0x0804, 0x79b2, 0x7007, 0x0003,
-	0x7012, 0x2900, 0x7016, 0x701a, 0x704b, 0x79b2, 0x0005, 0xa864,
-	0x8007, 0x9084, 0x00ff, 0x9086, 0x0001, 0x1904, 0x7800, 0x7007,
-	0x0001, 0x2009, 0x1834, 0x210c, 0x81ff, 0x11a8, 0xa868, 0x9084,
-	0x00ff, 0xa86a, 0xa883, 0x0000, 0x080c, 0x62c1, 0x1108, 0x0005,
-	0x0126, 0x2091, 0x8000, 0xa867, 0x0139, 0xa87a, 0xa982, 0x080c,
-	0x6c94, 0x012e, 0x0ca0, 0xa994, 0x9186, 0x0071, 0x0d38, 0x9186,
-	0x0064, 0x0d20, 0x9186, 0x007c, 0x0d08, 0x9186, 0x0028, 0x09f0,
-	0x9186, 0x0038, 0x09d8, 0x9186, 0x0078, 0x09c0, 0x9186, 0x005f,
-	0x09a8, 0x9186, 0x0056, 0x0990, 0xa897, 0x4005, 0xa89b, 0x0001,
-	0x2001, 0x0030, 0x900e, 0x08a0, 0xa87c, 0x9084, 0x00c0, 0x9086,
-	0x00c0, 0x1120, 0x7007, 0x0001, 0x0804, 0x7ba7, 0x2900, 0x7016,
-	0x701a, 0x20a9, 0x0004, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x0030,
-	0x2098, 0x7050, 0x2040, 0xa060, 0x20e8, 0xa05c, 0x9080, 0x0023,
-	0x20a0, 0x4003, 0xa888, 0x7012, 0x9082, 0x0401, 0x1a04, 0x7808,
-	0xaab4, 0x928a, 0x0002, 0x1a04, 0x7808, 0x82ff, 0x1138, 0xa8b8,
-	0xa9bc, 0x9105, 0x0118, 0x2001, 0x7939, 0x0018, 0x9280, 0x792f,
-	0x2005, 0x7056, 0x7010, 0x9015, 0x0904, 0x791a, 0x080c, 0x1018,
-	0x1118, 0x7007, 0x0004, 0x0005, 0x2900, 0x7022, 0x7054, 0x2060,
-	0xe000, 0xa866, 0x7050, 0x2040, 0xa95c, 0xe004, 0x9100, 0xa076,
-	0xa860, 0xa072, 0xe008, 0x920a, 0x1210, 0x900e, 0x2200, 0x7112,
-	0xe20c, 0x8003, 0x800b, 0x9296, 0x0004, 0x0108, 0x9108, 0xa17a,
-	0x810b, 0xa17e, 0x080c, 0x10e9, 0xa06c, 0x908e, 0x0100, 0x0170,
-	0x9086, 0x0200, 0x0118, 0x7007, 0x0007, 0x0005, 0x7020, 0x2048,
-	0x080c, 0x1031, 0x7014, 0x2048, 0x0804, 0x7808, 0x7020, 0x2048,
-	0x7018, 0xa802, 0xa807, 0x0000, 0x2908, 0x2048, 0xa906, 0x711a,
-	0x0804, 0x78d2, 0x7014, 0x2048, 0x7007, 0x0001, 0xa8b4, 0x9005,
-	0x1128, 0xa8b8, 0xa9bc, 0x9105, 0x0108, 0x00b9, 0xa864, 0x9084,
-	0x00ff, 0x9086, 0x001e, 0x0904, 0x7ba7, 0x0804, 0x797b, 0x7931,
-	0x7935, 0x0002, 0x001d, 0x0007, 0x0004, 0x000a, 0x001b, 0x0005,
-	0x0006, 0x000a, 0x001d, 0x0005, 0x0004, 0x0076, 0x0066, 0xafb8,
-	0xaebc, 0xa804, 0x2050, 0xb0c0, 0xb0e2, 0xb0bc, 0xb0de, 0xb0b8,
-	0xb0d2, 0xb0b4, 0xb0ce, 0xb6da, 0xb7d6, 0xb0b0, 0xb0ca, 0xb0ac,
-	0xb0c6, 0xb0a8, 0xb0ba, 0xb0a4, 0xb0b6, 0xb6c2, 0xb7be, 0xb0a0,
-	0xb0b2, 0xb09c, 0xb0ae, 0xb098, 0xb0a2, 0xb094, 0xb09e, 0xb6aa,
-	0xb7a6, 0xb090, 0xb09a, 0xb08c, 0xb096, 0xb088, 0xb08a, 0xb084,
-	0xb086, 0xb692, 0xb78e, 0xb080, 0xb082, 0xb07c, 0xb07e, 0xb078,
-	0xb072, 0xb074, 0xb06e, 0xb67a, 0xb776, 0xb004, 0x9055, 0x1958,
-	0x006e, 0x007e, 0x0005, 0x2009, 0x1834, 0x210c, 0x81ff, 0x1178,
-	0x080c, 0x60c1, 0x1108, 0x0005, 0x080c, 0x6ec7, 0x0126, 0x2091,
-	0x8000, 0x080c, 0xce4e, 0x080c, 0x6c94, 0x012e, 0x0ca0, 0x080c,
-	0xd253, 0x1d70, 0x2001, 0x0028, 0x900e, 0x0c70, 0x2009, 0x1834,
-	0x210c, 0x81ff, 0x1188, 0xa888, 0x9005, 0x0188, 0xa883, 0x0000,
-	0x080c, 0x6151, 0x1108, 0x0005, 0xa87a, 0x0126, 0x2091, 0x8000,
-	0x080c, 0x6c94, 0x012e, 0x0cb8, 0x2001, 0x0028, 0x0ca8, 0x2001,
-	0x0000, 0x0c90, 0x2009, 0x1834, 0x210c, 0x81ff, 0x11d8, 0xa888,
-	0x9005, 0x01e0, 0xa883, 0x0000, 0xa87c, 0xd0f4, 0x0120, 0x080c,
-	0x6223, 0x1138, 0x0005, 0x9006, 0xa87a, 0x080c, 0x619e, 0x1108,
-	0x0005, 0x0126, 0x2091, 0x8000, 0xa87a, 0xa982, 0x080c, 0x6c94,
-	0x012e, 0x0cb0, 0x2001, 0x0028, 0x900e, 0x0c98, 0x2001, 0x0000,
-	0x0c80, 0x7018, 0xa802, 0x2908, 0x2048, 0xa906, 0x711a, 0x7010,
-	0x8001, 0x7012, 0x0118, 0x7007, 0x0003, 0x0030, 0x7014, 0x2048,
-	0x7007, 0x0001, 0x7048, 0x080f, 0x0005, 0x00b6, 0x7007, 0x0001,
-	0xa974, 0xa878, 0x9084, 0x00ff, 0x9096, 0x0004, 0x0540, 0x20a9,
-	0x0001, 0x9096, 0x0001, 0x0190, 0x900e, 0x20a9, 0x0800, 0x9096,
-	0x0002, 0x0160, 0x9005, 0x11d8, 0xa974, 0x080c, 0x6616, 0x11b8,
-	0x0066, 0xae80, 0x080c, 0x6726, 0x006e, 0x0088, 0x0046, 0x2011,
-	0x180c, 0x2224, 0xc484, 0x2412, 0x004e, 0x00c6, 0x080c, 0x6616,
-	0x1110, 0x080c, 0x6826, 0x8108, 0x1f04, 0x7a16, 0x00ce, 0xa87c,
-	0xd084, 0x1120, 0x080c, 0x1031, 0x00be, 0x0005, 0x0126, 0x2091,
-	0x8000, 0x080c, 0x6c94, 0x012e, 0x00be, 0x0005, 0x0126, 0x2091,
-	0x8000, 0x7007, 0x0001, 0x080c, 0x6985, 0x0580, 0x2061, 0x1a70,
-	0x6100, 0xd184, 0x0178, 0xa888, 0x9084, 0x00ff, 0x1550, 0x6000,
-	0xd084, 0x0520, 0x6004, 0x9005, 0x1538, 0x6003, 0x0000, 0x600b,
-	0x0000, 0x00c8, 0x2011, 0x0001, 0xa890, 0x9005, 0x1110, 0x2001,
-	0x001e, 0x8000, 0x6016, 0xa888, 0x9084, 0x00ff, 0x0178, 0x6006,
-	0xa888, 0x8007, 0x9084, 0x00ff, 0x0148, 0x600a, 0xa888, 0x8000,
-	0x1108, 0xc28d, 0x6202, 0x012e, 0x0804, 0x7c70, 0x012e, 0x0804,
-	0x7c6a, 0x012e, 0x0804, 0x7c64, 0x012e, 0x0804, 0x7c67, 0x0126,
-	0x2091, 0x8000, 0x7007, 0x0001, 0x080c, 0x6985, 0x05e0, 0x2061,
-	0x1a70, 0x6000, 0xd084, 0x05b8, 0x6204, 0x6308, 0xd08c, 0x1530,
-	0xac78, 0x9484, 0x0003, 0x0170, 0xa988, 0x918c, 0x00ff, 0x8001,
-	0x1120, 0x2100, 0x9210, 0x0620, 0x0028, 0x8001, 0x1508, 0x2100,
-	0x9212, 0x02f0, 0x9484, 0x000c, 0x0188, 0xa988, 0x810f, 0x918c,
-	0x00ff, 0x9082, 0x0004, 0x1120, 0x2100, 0x9318, 0x0288, 0x0030,
-	0x9082, 0x0004, 0x1168, 0x2100, 0x931a, 0x0250, 0xa890, 0x9005,
-	0x0110, 0x8000, 0x6016, 0x6206, 0x630a, 0x012e, 0x0804, 0x7c70,
-	0x012e, 0x0804, 0x7c6d, 0x012e, 0x0804, 0x7c6a, 0x0126, 0x2091,
-	0x8000, 0x7007, 0x0001, 0x2061, 0x1a70, 0x6300, 0xd38c, 0x1120,
-	0x6308, 0x8318, 0x0220, 0x630a, 0x012e, 0x0804, 0x7c7e, 0x012e,
-	0x0804, 0x7c6d, 0x00b6, 0x0126, 0x00c6, 0x2091, 0x8000, 0x7007,
-	0x0001, 0xa87c, 0xd0ac, 0x0148, 0x00c6, 0x2061, 0x1a70, 0x6000,
-	0x9084, 0xfcff, 0x6002, 0x00ce, 0x0440, 0xa888, 0x9005, 0x05d8,
-	0xa88c, 0x9065, 0x0598, 0x2001, 0x1834, 0x2004, 0x9005, 0x0118,
-	0x080c, 0xae90, 0x0068, 0x6017, 0xf400, 0x605b, 0x0000, 0xa97c,
-	0xd1a4, 0x0110, 0xa980, 0x615a, 0x2009, 0x0041, 0x080c, 0xaeda,
-	0xa988, 0x918c, 0xff00, 0x9186, 0x2000, 0x1138, 0x0026, 0x900e,
-	0x2011, 0xfdff, 0x080c, 0x86e3, 0x002e, 0xa87c, 0xd0c4, 0x0148,
-	0x2061, 0x1a70, 0x6000, 0xd08c, 0x1120, 0x6008, 0x8000, 0x0208,
-	0x600a, 0x00ce, 0x012e, 0x00be, 0x0804, 0x7c70, 0x00ce, 0x012e,
-	0x00be, 0x0804, 0x7c6a, 0xa984, 0x9186, 0x002e, 0x0d30, 0x9186,
-	0x002d, 0x0d18, 0x9186, 0x0045, 0x0510, 0x9186, 0x002a, 0x1130,
-	0x2001, 0x180c, 0x200c, 0xc194, 0x2102, 0x08b8, 0x9186, 0x0020,
-	0x0158, 0x9186, 0x0029, 0x1d10, 0xa974, 0x080c, 0x6616, 0x1968,
-	0xb800, 0xc0e4, 0xb802, 0x0848, 0xa88c, 0x9065, 0x09b8, 0x6007,
-	0x0024, 0x2001, 0x1985, 0x2004, 0x601a, 0x0804, 0x7b05, 0xa88c,
-	0x9065, 0x0960, 0x00e6, 0xa890, 0x9075, 0x2001, 0x1834, 0x2004,
-	0x9005, 0x0150, 0x080c, 0xae90, 0x8eff, 0x0118, 0x2e60, 0x080c,
-	0xae90, 0x00ee, 0x0804, 0x7b05, 0x6024, 0xc0dc, 0xc0d5, 0x6026,
-	0x2e60, 0x6007, 0x003a, 0xa8a0, 0x9005, 0x0130, 0x6007, 0x003b,
-	0xa8a4, 0x602e, 0xa8a8, 0x6016, 0x6003, 0x0001, 0x080c, 0x90f8,
-	0x080c, 0x96a6, 0x00ee, 0x0804, 0x7b05, 0x2061, 0x1a70, 0x6000,
-	0xd084, 0x0190, 0xd08c, 0x1904, 0x7c7e, 0x0126, 0x2091, 0x8000,
-	0x6204, 0x8210, 0x0220, 0x6206, 0x012e, 0x0804, 0x7c7e, 0x012e,
-	0xa883, 0x0016, 0x0804, 0x7c77, 0xa883, 0x0007, 0x0804, 0x7c77,
-	0xa864, 0x8007, 0x9084, 0x00ff, 0x0130, 0x8001, 0x1138, 0x7007,
-	0x0001, 0x0069, 0x0005, 0x080c, 0x7800, 0x0040, 0x7007, 0x0003,
-	0x7012, 0x2900, 0x7016, 0x701a, 0x704b, 0x7ba7, 0x0005, 0x00b6,
-	0x00e6, 0x0126, 0x2091, 0x8000, 0x903e, 0x2061, 0x1800, 0x61d0,
-	0x81ff, 0x1904, 0x7c29, 0x6130, 0xd194, 0x1904, 0x7c53, 0xa878,
-	0x2070, 0x9e82, 0x1cd0, 0x0a04, 0x7c1d, 0x6068, 0x9e02, 0x1a04,
-	0x7c1d, 0x7120, 0x9186, 0x0006, 0x1904, 0x7c0f, 0x7010, 0x905d,
-	0x0904, 0x7c29, 0xb800, 0xd0e4, 0x1904, 0x7c4d, 0x2061, 0x1a70,
-	0x6100, 0x9184, 0x0301, 0x9086, 0x0001, 0x15a0, 0x7024, 0xd0dc,
-	0x1904, 0x7c56, 0xa883, 0x0000, 0xa803, 0x0000, 0x2908, 0x7014,
-	0x9005, 0x1198, 0x7116, 0xa87c, 0xd0f4, 0x1904, 0x7c59, 0x080c,
-	0x56e2, 0xd09c, 0x1118, 0xa87c, 0xc0cc, 0xa87e, 0x2e60, 0x080c,
-	0x8603, 0x012e, 0x00ee, 0x00be, 0x0005, 0x2048, 0xa800, 0x9005,
-	0x1de0, 0xa902, 0x2148, 0xa87c, 0xd0f4, 0x1904, 0x7c59, 0x012e,
-	0x00ee, 0x00be, 0x0005, 0x012e, 0x00ee, 0xa883, 0x0006, 0x00be,
-	0x0804, 0x7c77, 0xd184, 0x0db8, 0xd1c4, 0x1190, 0x00a0, 0xa974,
-	0x080c, 0x6616, 0x15d0, 0xb800, 0xd0e4, 0x15b8, 0x7120, 0x9186,
-	0x0007, 0x1118, 0xa883, 0x0002, 0x0490, 0xa883, 0x0008, 0x0478,
-	0xa883, 0x000e, 0x0460, 0xa883, 0x0017, 0x0448, 0xa883, 0x0035,
-	0x0430, 0x080c, 0x56e6, 0xd0fc, 0x01e8, 0xa878, 0x2070, 0x9e82,
-	0x1cd0, 0x02c0, 0x6068, 0x9e02, 0x12a8, 0x7120, 0x9186, 0x0006,
-	0x1188, 0x7010, 0x905d, 0x0170, 0xb800, 0xd0bc, 0x0158, 0x2039,
-	0x0001, 0x7000, 0x9086, 0x0007, 0x1904, 0x7bb3, 0x7003, 0x0002,
-	0x0804, 0x7bb3, 0xa883, 0x0028, 0x0010, 0xa883, 0x0029, 0x012e,
-	0x00ee, 0x00be, 0x0420, 0xa883, 0x002a, 0x0cc8, 0xa883, 0x0045,
-	0x0cb0, 0x2e60, 0x2019, 0x0002, 0x601b, 0x0014, 0x080c, 0xe16f,
-	0x012e, 0x00ee, 0x00be, 0x0005, 0x2009, 0x003e, 0x0058, 0x2009,
-	0x0004, 0x0040, 0x2009, 0x0006, 0x0028, 0x2009, 0x0016, 0x0010,
-	0x2009, 0x0001, 0xa884, 0x9084, 0xff00, 0x9105, 0xa886, 0x0126,
-	0x2091, 0x8000, 0x080c, 0x6c94, 0x012e, 0x0005, 0x080c, 0x1031,
-	0x0005, 0x00d6, 0x080c, 0x85fa, 0x00de, 0x0005, 0x00d6, 0x00e6,
-	0x0126, 0x2091, 0x8000, 0x2071, 0x0040, 0x702c, 0xd084, 0x01d8,
-	0x908c, 0x0780, 0x190c, 0x7d68, 0xd09c, 0x11a8, 0x2071, 0x1800,
-	0x70c0, 0x90ea, 0x0020, 0x0278, 0x8001, 0x70c2, 0x702c, 0x2048,
-	0xa800, 0x702e, 0x9006, 0xa802, 0xa806, 0x2071, 0x0040, 0x2900,
-	0x7022, 0x702c, 0x0c28, 0x012e, 0x00ee, 0x00de, 0x0005, 0x0006,
-	0x9084, 0x0780, 0x190c, 0x7d68, 0x000e, 0x0005, 0xa898, 0x9084,
-	0x0003, 0x05a8, 0x080c, 0xae09, 0x05d8, 0x2900, 0x6016, 0xa864,
-	0x9084, 0x00ff, 0x9086, 0x0035, 0x1138, 0x6008, 0xc0fd, 0x600a,
-	0x2001, 0x196a, 0x2004, 0x0098, 0xa8a0, 0x9084, 0x00ff, 0xa99c,
-	0x918c, 0xff00, 0x9105, 0xa99c, 0x918c, 0x00ff, 0x080c, 0x284b,
-	0x1540, 0x00b6, 0x080c, 0x6616, 0x2b00, 0x00be, 0x1510, 0x6012,
-	0x6023, 0x0001, 0x2009, 0x0040, 0xa864, 0x9084, 0x00ff, 0x9086,
-	0x0035, 0x0110, 0x2009, 0x0041, 0x080c, 0xaeda, 0x0005, 0xa87b,
-	0x0101, 0x0126, 0x2091, 0x8000, 0x080c, 0x6c94, 0x012e, 0x0005,
-	0xa87b, 0x002c, 0x0126, 0x2091, 0x8000, 0x080c, 0x6c94, 0x012e,
-	0x0005, 0xa87b, 0x0028, 0x0126, 0x2091, 0x8000, 0x080c, 0x6c94,
-	0x012e, 0x080c, 0xae5f, 0x0005, 0x00d6, 0x00c6, 0x0036, 0x0026,
-	0x0016, 0x00b6, 0x7007, 0x0001, 0xaa74, 0x9282, 0x0004, 0x1a04,
-	0x7d59, 0xa97c, 0x9188, 0x1000, 0x2104, 0x905d, 0xb804, 0xd284,
-	0x0140, 0x05e8, 0x8007, 0x9084, 0x00ff, 0x9084, 0x0006, 0x1108,
-	0x04b0, 0x2b10, 0x080c, 0xae09, 0x1118, 0x080c, 0xaead, 0x05a8,
-	0x6212, 0xa874, 0x0002, 0x7d37, 0x7d3c, 0x7d3f, 0x7d45, 0x2019,
-	0x0002, 0x080c, 0xe55d, 0x0060, 0x080c, 0xe4f9, 0x0048, 0x2019,
-	0x0002, 0xa980, 0x080c, 0xe514, 0x0018, 0xa980, 0x080c, 0xe4f9,
-	0x080c, 0xae5f, 0xa887, 0x0000, 0x0126, 0x2091, 0x8000, 0x080c,
-	0x6c94, 0x012e, 0x00be, 0x001e, 0x002e, 0x003e, 0x00ce, 0x00de,
-	0x0005, 0xa887, 0x0006, 0x0c80, 0xa887, 0x0002, 0x0c68, 0xa887,
-	0x0005, 0x0c50, 0xa887, 0x0004, 0x0c38, 0xa887, 0x0007, 0x0c20,
-	0x2091, 0x8000, 0x0e04, 0x7d6a, 0x0006, 0x0016, 0x2001, 0x8003,
-	0x0006, 0x0804, 0x0dde, 0x2001, 0x1834, 0x2004, 0x9005, 0x0005,
-	0x0005, 0x00f6, 0x2079, 0x0300, 0x2001, 0x0200, 0x200c, 0xc1e5,
-	0xc1dc, 0x2102, 0x2009, 0x0218, 0x210c, 0xd1ec, 0x1120, 0x080c,
-	0x157f, 0x00fe, 0x0005, 0x2001, 0x020d, 0x2003, 0x0020, 0x781f,
-	0x0300, 0x00fe, 0x0005, 0x781c, 0xd08c, 0x0904, 0x7dea, 0x68c0,
-	0x90aa, 0x0005, 0x0a04, 0x8411, 0x7d44, 0x7c40, 0x9584, 0x00f6,
-	0x1510, 0x9484, 0x7000, 0x0140, 0x908a, 0x2000, 0x1260, 0x9584,
-	0x0700, 0x8007, 0x0804, 0x7df1, 0x7000, 0x9084, 0xff00, 0x9086,
-	0x8100, 0x0da8, 0x00b0, 0x9484, 0x0fff, 0x1130, 0x7000, 0x9084,
-	0xff00, 0x9086, 0x8100, 0x11c0, 0x080c, 0xe9fc, 0x080c, 0x82f6,
-	0x7817, 0x0140, 0x00a8, 0x9584, 0x0076, 0x1118, 0x080c, 0x8354,
-	0x19c0, 0xd5a4, 0x0148, 0x0046, 0x0056, 0x080c, 0x7e4c, 0x080c,
-	0x2344, 0x005e, 0x004e, 0x0020, 0x080c, 0xe9fc, 0x7817, 0x0140,
-	0x080c, 0x73b3, 0x0168, 0x2001, 0x0111, 0x2004, 0xd08c, 0x0140,
-	0x6893, 0x0000, 0x2001, 0x0110, 0x2003, 0x0008, 0x2003, 0x0000,
-	0x080c, 0x7e2d, 0x2001, 0x19ef, 0x2004, 0x9005, 0x090c, 0x96a6,
-	0x0005, 0x0002, 0x7e03, 0x8118, 0x7dfa, 0x7dfa, 0x7dfa, 0x7dfa,
-	0x7dfa, 0x7dfa, 0x7817, 0x0140, 0x2001, 0x19ef, 0x2004, 0x9005,
-	0x090c, 0x96a6, 0x0005, 0x7000, 0x908c, 0xff00, 0x9194, 0xf000,
-	0x810f, 0x9484, 0x0fff, 0x6892, 0x9286, 0x2000, 0x1150, 0x6800,
-	0x9086, 0x0001, 0x1118, 0x080c, 0x5743, 0x0070, 0x080c, 0x7e6c,
-	0x0058, 0x9286, 0x3000, 0x1118, 0x080c, 0x8053, 0x0028, 0x9286,
-	0x8000, 0x1110, 0x080c, 0x8226, 0x7817, 0x0140, 0x2001, 0x19ef,
-	0x2004, 0x9005, 0x090c, 0x96a6, 0x0005, 0x2001, 0x1810, 0x2004,
-	0xd08c, 0x0178, 0x2001, 0x1800, 0x2004, 0x9086, 0x0003, 0x1148,
-	0x0026, 0x0036, 0x2011, 0x8048, 0x2518, 0x080c, 0x4b1e, 0x003e,
-	0x002e, 0x0005, 0x0036, 0x0046, 0x0056, 0x00f6, 0x2079, 0x0200,
-	0x2019, 0xfffe, 0x7c30, 0x0050, 0x0036, 0x0046, 0x0056, 0x00f6,
-	0x2079, 0x0200, 0x7d44, 0x7c40, 0x2019, 0xffff, 0x2001, 0x1810,
-	0x2004, 0xd08c, 0x0160, 0x2001, 0x1800, 0x2004, 0x9086, 0x0003,
-	0x1130, 0x0026, 0x2011, 0x8048, 0x080c, 0x4b1e, 0x002e, 0x00fe,
-	0x005e, 0x004e, 0x003e, 0x0005, 0x00b6, 0x00c6, 0x7010, 0x9084,
-	0xff00, 0x8007, 0x9096, 0x0001, 0x0120, 0x9096, 0x0023, 0x1904,
-	0x8024, 0x9186, 0x0023, 0x15c0, 0x080c, 0x82bb, 0x0904, 0x8024,
-	0x6120, 0x9186, 0x0001, 0x0150, 0x9186, 0x0004, 0x0138, 0x9186,
-	0x0008, 0x0120, 0x9186, 0x000a, 0x1904, 0x8024, 0x7124, 0x610a,
-	0x7030, 0x908e, 0x0200, 0x1130, 0x2009, 0x0015, 0x080c, 0xaeda,
-	0x0804, 0x8024, 0x908e, 0x0214, 0x0118, 0x908e, 0x0210, 0x1130,
-	0x2009, 0x0015, 0x080c, 0xaeda, 0x0804, 0x8024, 0x908e, 0x0100,
-	0x1904, 0x8024, 0x7034, 0x9005, 0x1904, 0x8024, 0x2009, 0x0016,
-	0x080c, 0xaeda, 0x0804, 0x8024, 0x9186, 0x0022, 0x1904, 0x8024,
-	0x7030, 0x908e, 0x0300, 0x1580, 0x68dc, 0xd0a4, 0x0528, 0xc0b5,
-	0x68de, 0x7100, 0x918c, 0x00ff, 0x697e, 0x7004, 0x6882, 0x00f6,
-	0x2079, 0x0100, 0x79e6, 0x78ea, 0x0006, 0x9084, 0x00ff, 0x0016,
-	0x2008, 0x080c, 0x2894, 0x7932, 0x7936, 0x001e, 0x000e, 0x00fe,
-	0x080c, 0x284b, 0x695e, 0x703c, 0x00e6, 0x2071, 0x0140, 0x7086,
-	0x2071, 0x1800, 0x70b6, 0x00ee, 0x7034, 0x9005, 0x1904, 0x8024,
-	0x2009, 0x0017, 0x0804, 0x7fd4, 0x908e, 0x0400, 0x1190, 0x7034,
-	0x9005, 0x1904, 0x8024, 0x080c, 0x73b3, 0x0120, 0x2009, 0x001d,
-	0x0804, 0x7fd4, 0x68dc, 0xc0a5, 0x68de, 0x2009, 0x0030, 0x0804,
-	0x7fd4, 0x908e, 0x0500, 0x1140, 0x7034, 0x9005, 0x1904, 0x8024,
-	0x2009, 0x0018, 0x0804, 0x7fd4, 0x908e, 0x2010, 0x1120, 0x2009,
-	0x0019, 0x0804, 0x7fd4, 0x908e, 0x2110, 0x1120, 0x2009, 0x001a,
-	0x0804, 0x7fd4, 0x908e, 0x5200, 0x1140, 0x7034, 0x9005, 0x1904,
-	0x8024, 0x2009, 0x001b, 0x0804, 0x7fd4, 0x908e, 0x5000, 0x1140,
-	0x7034, 0x9005, 0x1904, 0x8024, 0x2009, 0x001c, 0x0804, 0x7fd4,
-	0x908e, 0x1300, 0x1120, 0x2009, 0x0034, 0x0804, 0x7fd4, 0x908e,
-	0x1200, 0x1140, 0x7034, 0x9005, 0x1904, 0x8024, 0x2009, 0x0024,
-	0x0804, 0x7fd4, 0x908c, 0xff00, 0x918e, 0x2400, 0x1170, 0x2009,
-	0x002d, 0x2001, 0x1810, 0x2004, 0xd09c, 0x0904, 0x7fd4, 0x080c,
-	0xd934, 0x1904, 0x8024, 0x0804, 0x7fd2, 0x908c, 0xff00, 0x918e,
-	0x5300, 0x1120, 0x2009, 0x002a, 0x0804, 0x7fd4, 0x908e, 0x0f00,
-	0x1120, 0x2009, 0x0020, 0x0804, 0x7fd4, 0x908e, 0x6104, 0x1530,
-	0x2029, 0x0205, 0x2011, 0x026d, 0x8208, 0x2204, 0x9082, 0x0004,
-	0x8004, 0x8004, 0x20a8, 0x2011, 0x8015, 0x211c, 0x8108, 0x0046,
-	0x2124, 0x080c, 0x4b1e, 0x004e, 0x8108, 0x0f04, 0x7f88, 0x9186,
-	0x0280, 0x1d88, 0x2504, 0x8000, 0x202a, 0x2009, 0x0260, 0x0c58,
-	0x202b, 0x0000, 0x2009, 0x0023, 0x0804, 0x7fd4, 0x908e, 0x6000,
-	0x1120, 0x2009, 0x003f, 0x0804, 0x7fd4, 0x908e, 0x5400, 0x1138,
-	0x080c, 0x83c1, 0x1904, 0x8024, 0x2009, 0x0046, 0x04a8, 0x908e,
-	0x5500, 0x1148, 0x080c, 0x83e9, 0x1118, 0x2009, 0x0041, 0x0460,
-	0x2009, 0x0042, 0x0448, 0x908e, 0x7800, 0x1118, 0x2009, 0x0045,
-	0x0418, 0x908e, 0x1000, 0x1118, 0x2009, 0x004e, 0x00e8, 0x908e,
-	0x6300, 0x1118, 0x2009, 0x004a, 0x00b8, 0x908c, 0xff00, 0x918e,
-	0x5600, 0x1118, 0x2009, 0x004f, 0x0078, 0x908c, 0xff00, 0x918e,
-	0x5700, 0x1118, 0x2009, 0x0050, 0x0038, 0x2009, 0x001d, 0x6838,
-	0xd0d4, 0x0110, 0x2009, 0x004c, 0x0016, 0x2011, 0x0263, 0x2204,
-	0x8211, 0x220c, 0x080c, 0x284b, 0x1904, 0x8027, 0x080c, 0x65b5,
-	0x1904, 0x8027, 0xbe12, 0xbd16, 0x001e, 0x0016, 0x080c, 0x73b3,
-	0x01c0, 0x68dc, 0xd08c, 0x1148, 0x7000, 0x9084, 0x00ff, 0x1188,
-	0x7004, 0x9084, 0xff00, 0x1168, 0x0040, 0x687c, 0x9606, 0x1148,
-	0x6880, 0x9506, 0x9084, 0xff00, 0x1120, 0x9584, 0x00ff, 0xb8c2,
-	0x0080, 0xb8c0, 0x9005, 0x1168, 0x9186, 0x0046, 0x1150, 0x687c,
-	0x9606, 0x1138, 0x6880, 0x9506, 0x9084, 0xff00, 0x1110, 0x001e,
-	0x0098, 0x080c, 0xae09, 0x01a8, 0x2b08, 0x6112, 0x6023, 0x0004,
-	0x7120, 0x610a, 0x001e, 0x9186, 0x004c, 0x1110, 0x6023, 0x000a,
-	0x0016, 0x001e, 0x080c, 0xaeda, 0x00ce, 0x00be, 0x0005, 0x001e,
-	0x0cd8, 0x2001, 0x180e, 0x2004, 0xd0ec, 0x0120, 0x2011, 0x8049,
-	0x080c, 0x4b1e, 0x080c, 0xaead, 0x0d90, 0x2b08, 0x6112, 0x6023,
-	0x0004, 0x7120, 0x610a, 0x001e, 0x0016, 0x9186, 0x0017, 0x0118,
-	0x9186, 0x0030, 0x1128, 0x6007, 0x0009, 0x6017, 0x2900, 0x0020,
-	0x6007, 0x0051, 0x6017, 0x0000, 0x602f, 0x0009, 0x6003, 0x0001,
-	0x080c, 0x9140, 0x08a0, 0x080c, 0x32f0, 0x1140, 0x7010, 0x9084,
-	0xff00, 0x8007, 0x908e, 0x0008, 0x1108, 0x0009, 0x0005, 0x00b6,
-	0x00c6, 0x0046, 0x7000, 0x908c, 0xff00, 0x810f, 0x9186, 0x0033,
-	0x11e8, 0x080c, 0x82bb, 0x0904, 0x80b0, 0x7124, 0x610a, 0x7030,
-	0x908e, 0x0200, 0x1140, 0x7034, 0x9005, 0x15d0, 0x2009, 0x0015,
-	0x080c, 0xaeda, 0x04a8, 0x908e, 0x0100, 0x1590, 0x7034, 0x9005,
-	0x1578, 0x2009, 0x0016, 0x080c, 0xaeda, 0x0450, 0x9186, 0x0032,
-	0x1538, 0x7030, 0x908e, 0x1400, 0x1518, 0x2009, 0x0038, 0x0016,
-	0x2011, 0x0263, 0x2204, 0x8211, 0x220c, 0x080c, 0x284b, 0x11b8,
-	0x080c, 0x65b5, 0x11a0, 0xbe12, 0xbd16, 0x080c, 0xae09, 0x0178,
-	0x2b08, 0x6112, 0x080c, 0xcfd4, 0x6023, 0x0004, 0x7120, 0x610a,
-	0x001e, 0x080c, 0xaeda, 0x080c, 0x96a6, 0x0010, 0x00ce, 0x001e,
-	0x004e, 0x00ce, 0x00be, 0x0005, 0x00b6, 0x0046, 0x00e6, 0x00d6,
-	0x2028, 0x2130, 0x9696, 0x00ff, 0x11b8, 0x9592, 0xfffc, 0x02a0,
-	0x9596, 0xfffd, 0x1120, 0x2009, 0x007f, 0x0804, 0x8112, 0x9596,
-	0xfffe, 0x1120, 0x2009, 0x007e, 0x0804, 0x8112, 0x9596, 0xfffc,
-	0x1118, 0x2009, 0x0080, 0x04f0, 0x2011, 0x0000, 0x2019, 0x1837,
-	0x231c, 0xd3ac, 0x0130, 0x9026, 0x20a9, 0x0800, 0x2071, 0x1000,
-	0x0030, 0x2021, 0x0081, 0x20a9, 0x077f, 0x2071, 0x1081, 0x2e1c,
-	0x93dd, 0x0000, 0x1140, 0x82ff, 0x11d0, 0x9496, 0x00ff, 0x01b8,
-	0x2410, 0xc2fd, 0x00a0, 0xbf10, 0x2600, 0x9706, 0xb814, 0x1120,
-	0x9546, 0x1110, 0x2408, 0x00b0, 0x9745, 0x1148, 0x94c6, 0x007e,
-	0x0130, 0x94c6, 0x007f, 0x0118, 0x94c6, 0x0080, 0x1d20, 0x8420,
-	0x8e70, 0x1f04, 0x80e7, 0x82ff, 0x1118, 0x9085, 0x0001, 0x0018,
-	0xc2fc, 0x2208, 0x9006, 0x00de, 0x00ee, 0x004e, 0x00be, 0x0005,
-	0x7000, 0x908c, 0xff00, 0x810f, 0x9184, 0x000f, 0x0002, 0x812f,
-	0x812f, 0x812f, 0x82cd, 0x812f, 0x8138, 0x8163, 0x81f1, 0x812f,
-	0x812f, 0x812f, 0x812f, 0x812f, 0x812f, 0x812f, 0x812f, 0x7817,
-	0x0140, 0x2001, 0x19ef, 0x2004, 0x9005, 0x090c, 0x96a6, 0x0005,
-	0x00b6, 0x7110, 0xd1bc, 0x01e8, 0x7120, 0x2160, 0x9c8c, 0x0007,
-	0x11c0, 0x9c8a, 0x1cd0, 0x02a8, 0x6868, 0x9c02, 0x1290, 0x7008,
+	0x908a, 0x001a, 0x1210, 0x002b, 0x0c50, 0x00e9, 0x080c, 0x7d11,
+	0x0005, 0x7883, 0x788f, 0x7a64, 0x7883, 0x788f, 0x7883, 0x788f,
+	0x788f, 0x7883, 0x788f, 0x7a64, 0x788f, 0x788f, 0x788f, 0x788f,
+	0x788f, 0x7883, 0x788f, 0x7a64, 0x7883, 0x7883, 0x788f, 0x7883,
+	0x7883, 0x7883, 0x788f, 0x00e6, 0x2071, 0x18fa, 0x2009, 0x0400,
+	0x0071, 0x00ee, 0x0005, 0x2009, 0x1000, 0x0049, 0x0005, 0x2009,
+	0x2000, 0x0029, 0x0005, 0x2009, 0x0800, 0x0009, 0x0005, 0x7007,
+	0x0001, 0xa868, 0x9084, 0x00ff, 0x9105, 0xa86a, 0x0126, 0x2091,
+	0x8000, 0x080c, 0x6d17, 0x012e, 0x0005, 0xa864, 0x8007, 0x9084,
+	0x00ff, 0x0d08, 0x8001, 0x1120, 0x7007, 0x0001, 0x0804, 0x7a06,
+	0x7007, 0x0003, 0x7012, 0x2900, 0x7016, 0x701a, 0x704b, 0x7a06,
+	0x0005, 0xa864, 0x8007, 0x9084, 0x00ff, 0x0968, 0x8001, 0x1120,
+	0x7007, 0x0001, 0x0804, 0x7a21, 0x7007, 0x0003, 0x7012, 0x2900,
+	0x7016, 0x701a, 0x704b, 0x7a21, 0x0005, 0xa864, 0x8007, 0x9084,
+	0x00ff, 0x0904, 0x788b, 0x8001, 0x1120, 0x7007, 0x0001, 0x0804,
+	0x7a3d, 0x7007, 0x0003, 0x7012, 0x2900, 0x7016, 0x701a, 0x704b,
+	0x7a3d, 0x0005, 0xa864, 0x8007, 0x9084, 0x00ff, 0x9086, 0x0001,
+	0x1904, 0x788b, 0x7007, 0x0001, 0x2009, 0x1834, 0x210c, 0x81ff,
+	0x11a8, 0xa868, 0x9084, 0x00ff, 0xa86a, 0xa883, 0x0000, 0x080c,
+	0x6344, 0x1108, 0x0005, 0x0126, 0x2091, 0x8000, 0xa867, 0x0139,
+	0xa87a, 0xa982, 0x080c, 0x6d17, 0x012e, 0x0ca0, 0xa994, 0x9186,
+	0x0071, 0x0d38, 0x9186, 0x0064, 0x0d20, 0x9186, 0x007c, 0x0d08,
+	0x9186, 0x0028, 0x09f0, 0x9186, 0x0038, 0x09d8, 0x9186, 0x0078,
+	0x09c0, 0x9186, 0x005f, 0x09a8, 0x9186, 0x0056, 0x0990, 0xa897,
+	0x4005, 0xa89b, 0x0001, 0x2001, 0x0030, 0x900e, 0x08a0, 0xa87c,
+	0x9084, 0x00c0, 0x9086, 0x00c0, 0x1120, 0x7007, 0x0001, 0x0804,
+	0x7c32, 0x2900, 0x7016, 0x701a, 0x20a9, 0x0004, 0xa860, 0x20e0,
+	0xa85c, 0x9080, 0x0030, 0x2098, 0x7050, 0x2040, 0xa060, 0x20e8,
+	0xa05c, 0x9080, 0x0023, 0x20a0, 0x4003, 0xa888, 0x7012, 0x9082,
+	0x0401, 0x1a04, 0x7893, 0xaab4, 0x928a, 0x0002, 0x1a04, 0x7893,
+	0x82ff, 0x1138, 0xa8b8, 0xa9bc, 0x9105, 0x0118, 0x2001, 0x79c4,
+	0x0018, 0x9280, 0x79ba, 0x2005, 0x7056, 0x7010, 0x9015, 0x0904,
+	0x79a5, 0x080c, 0x1018, 0x1118, 0x7007, 0x0004, 0x0005, 0x2900,
+	0x7022, 0x7054, 0x2060, 0xe000, 0xa866, 0x7050, 0x2040, 0xa95c,
+	0xe004, 0x9100, 0xa076, 0xa860, 0xa072, 0xe008, 0x920a, 0x1210,
+	0x900e, 0x2200, 0x7112, 0xe20c, 0x8003, 0x800b, 0x9296, 0x0004,
+	0x0108, 0x9108, 0xa17a, 0x810b, 0xa17e, 0x080c, 0x10e9, 0xa06c,
+	0x908e, 0x0100, 0x0170, 0x9086, 0x0200, 0x0118, 0x7007, 0x0007,
+	0x0005, 0x7020, 0x2048, 0x080c, 0x1031, 0x7014, 0x2048, 0x0804,
+	0x7893, 0x7020, 0x2048, 0x7018, 0xa802, 0xa807, 0x0000, 0x2908,
+	0x2048, 0xa906, 0x711a, 0x0804, 0x795d, 0x7014, 0x2048, 0x7007,
+	0x0001, 0xa8b4, 0x9005, 0x1128, 0xa8b8, 0xa9bc, 0x9105, 0x0108,
+	0x00b9, 0xa864, 0x9084, 0x00ff, 0x9086, 0x001e, 0x0904, 0x7c32,
+	0x0804, 0x7a06, 0x79bc, 0x79c0, 0x0002, 0x001d, 0x0007, 0x0004,
+	0x000a, 0x001b, 0x0005, 0x0006, 0x000a, 0x001d, 0x0005, 0x0004,
+	0x0076, 0x0066, 0xafb8, 0xaebc, 0xa804, 0x2050, 0xb0c0, 0xb0e2,
+	0xb0bc, 0xb0de, 0xb0b8, 0xb0d2, 0xb0b4, 0xb0ce, 0xb6da, 0xb7d6,
+	0xb0b0, 0xb0ca, 0xb0ac, 0xb0c6, 0xb0a8, 0xb0ba, 0xb0a4, 0xb0b6,
+	0xb6c2, 0xb7be, 0xb0a0, 0xb0b2, 0xb09c, 0xb0ae, 0xb098, 0xb0a2,
+	0xb094, 0xb09e, 0xb6aa, 0xb7a6, 0xb090, 0xb09a, 0xb08c, 0xb096,
+	0xb088, 0xb08a, 0xb084, 0xb086, 0xb692, 0xb78e, 0xb080, 0xb082,
+	0xb07c, 0xb07e, 0xb078, 0xb072, 0xb074, 0xb06e, 0xb67a, 0xb776,
+	0xb004, 0x9055, 0x1958, 0x006e, 0x007e, 0x0005, 0x2009, 0x1834,
+	0x210c, 0x81ff, 0x1178, 0x080c, 0x6141, 0x1108, 0x0005, 0x080c,
+	0x6f4a, 0x0126, 0x2091, 0x8000, 0x080c, 0xcf7c, 0x080c, 0x6d17,
+	0x012e, 0x0ca0, 0x080c, 0xd381, 0x1d70, 0x2001, 0x0028, 0x900e,
+	0x0c70, 0x2009, 0x1834, 0x210c, 0x81ff, 0x1188, 0xa888, 0x9005,
+	0x0188, 0xa883, 0x0000, 0x080c, 0x61d1, 0x1108, 0x0005, 0xa87a,
+	0x0126, 0x2091, 0x8000, 0x080c, 0x6d17, 0x012e, 0x0cb8, 0x2001,
+	0x0028, 0x0ca8, 0x2001, 0x0000, 0x0c90, 0x2009, 0x1834, 0x210c,
+	0x81ff, 0x11d8, 0xa888, 0x9005, 0x01e0, 0xa883, 0x0000, 0xa87c,
+	0xd0f4, 0x0120, 0x080c, 0x62a6, 0x1138, 0x0005, 0x9006, 0xa87a,
+	0x080c, 0x621e, 0x1108, 0x0005, 0x0126, 0x2091, 0x8000, 0xa87a,
+	0xa982, 0x080c, 0x6d17, 0x012e, 0x0cb0, 0x2001, 0x0028, 0x900e,
+	0x0c98, 0x2001, 0x0000, 0x0c80, 0x7018, 0xa802, 0x2908, 0x2048,
+	0xa906, 0x711a, 0x7010, 0x8001, 0x7012, 0x0118, 0x7007, 0x0003,
+	0x0030, 0x7014, 0x2048, 0x7007, 0x0001, 0x7048, 0x080f, 0x0005,
+	0x00b6, 0x7007, 0x0001, 0xa974, 0xa878, 0x9084, 0x00ff, 0x9096,
+	0x0004, 0x0540, 0x20a9, 0x0001, 0x9096, 0x0001, 0x0190, 0x900e,
+	0x20a9, 0x0800, 0x9096, 0x0002, 0x0160, 0x9005, 0x11d8, 0xa974,
+	0x080c, 0x6699, 0x11b8, 0x0066, 0xae80, 0x080c, 0x67a9, 0x006e,
+	0x0088, 0x0046, 0x2011, 0x180c, 0x2224, 0xc484, 0x2412, 0x004e,
+	0x00c6, 0x080c, 0x6699, 0x1110, 0x080c, 0x68a9, 0x8108, 0x1f04,
+	0x7aa1, 0x00ce, 0xa87c, 0xd084, 0x1120, 0x080c, 0x1031, 0x00be,
+	0x0005, 0x0126, 0x2091, 0x8000, 0x080c, 0x6d17, 0x012e, 0x00be,
+	0x0005, 0x0126, 0x2091, 0x8000, 0x7007, 0x0001, 0x080c, 0x6a08,
+	0x0580, 0x2061, 0x1a70, 0x6100, 0xd184, 0x0178, 0xa888, 0x9084,
+	0x00ff, 0x1550, 0x6000, 0xd084, 0x0520, 0x6004, 0x9005, 0x1538,
+	0x6003, 0x0000, 0x600b, 0x0000, 0x00c8, 0x2011, 0x0001, 0xa890,
+	0x9005, 0x1110, 0x2001, 0x001e, 0x8000, 0x6016, 0xa888, 0x9084,
+	0x00ff, 0x0178, 0x6006, 0xa888, 0x8007, 0x9084, 0x00ff, 0x0148,
+	0x600a, 0xa888, 0x8000, 0x1108, 0xc28d, 0x6202, 0x012e, 0x0804,
+	0x7cfb, 0x012e, 0x0804, 0x7cf5, 0x012e, 0x0804, 0x7cef, 0x012e,
+	0x0804, 0x7cf2, 0x0126, 0x2091, 0x8000, 0x7007, 0x0001, 0x080c,
+	0x6a08, 0x05e0, 0x2061, 0x1a70, 0x6000, 0xd084, 0x05b8, 0x6204,
+	0x6308, 0xd08c, 0x1530, 0xac78, 0x9484, 0x0003, 0x0170, 0xa988,
+	0x918c, 0x00ff, 0x8001, 0x1120, 0x2100, 0x9210, 0x0620, 0x0028,
+	0x8001, 0x1508, 0x2100, 0x9212, 0x02f0, 0x9484, 0x000c, 0x0188,
+	0xa988, 0x810f, 0x918c, 0x00ff, 0x9082, 0x0004, 0x1120, 0x2100,
+	0x9318, 0x0288, 0x0030, 0x9082, 0x0004, 0x1168, 0x2100, 0x931a,
+	0x0250, 0xa890, 0x9005, 0x0110, 0x8000, 0x6016, 0x6206, 0x630a,
+	0x012e, 0x0804, 0x7cfb, 0x012e, 0x0804, 0x7cf8, 0x012e, 0x0804,
+	0x7cf5, 0x0126, 0x2091, 0x8000, 0x7007, 0x0001, 0x2061, 0x1a70,
+	0x6300, 0xd38c, 0x1120, 0x6308, 0x8318, 0x0220, 0x630a, 0x012e,
+	0x0804, 0x7d09, 0x012e, 0x0804, 0x7cf8, 0x00b6, 0x0126, 0x00c6,
+	0x2091, 0x8000, 0x7007, 0x0001, 0xa87c, 0xd0ac, 0x0148, 0x00c6,
+	0x2061, 0x1a70, 0x6000, 0x9084, 0xfcff, 0x6002, 0x00ce, 0x0440,
+	0xa888, 0x9005, 0x05d8, 0xa88c, 0x9065, 0x0598, 0x2001, 0x1834,
+	0x2004, 0x9005, 0x0118, 0x080c, 0xaf74, 0x0068, 0x6017, 0xf400,
+	0x605b, 0x0000, 0xa97c, 0xd1a4, 0x0110, 0xa980, 0x615a, 0x2009,
+	0x0041, 0x080c, 0xafbe, 0xa988, 0x918c, 0xff00, 0x9186, 0x2000,
+	0x1138, 0x0026, 0x900e, 0x2011, 0xfdff, 0x080c, 0x879a, 0x002e,
+	0xa87c, 0xd0c4, 0x0148, 0x2061, 0x1a70, 0x6000, 0xd08c, 0x1120,
+	0x6008, 0x8000, 0x0208, 0x600a, 0x00ce, 0x012e, 0x00be, 0x0804,
+	0x7cfb, 0x00ce, 0x012e, 0x00be, 0x0804, 0x7cf5, 0xa984, 0x9186,
+	0x002e, 0x0d30, 0x9186, 0x002d, 0x0d18, 0x9186, 0x0045, 0x0510,
+	0x9186, 0x002a, 0x1130, 0x2001, 0x180c, 0x200c, 0xc194, 0x2102,
+	0x08b8, 0x9186, 0x0020, 0x0158, 0x9186, 0x0029, 0x1d10, 0xa974,
+	0x080c, 0x6699, 0x1968, 0xb800, 0xc0e4, 0xb802, 0x0848, 0xa88c,
+	0x9065, 0x09b8, 0x6007, 0x0024, 0x2001, 0x1985, 0x2004, 0x601a,
+	0x0804, 0x7b90, 0xa88c, 0x9065, 0x0960, 0x00e6, 0xa890, 0x9075,
+	0x2001, 0x1834, 0x2004, 0x9005, 0x0150, 0x080c, 0xaf74, 0x8eff,
+	0x0118, 0x2e60, 0x080c, 0xaf74, 0x00ee, 0x0804, 0x7b90, 0x6024,
+	0xc0dc, 0xc0d5, 0x6026, 0x2e60, 0x6007, 0x003a, 0xa8a0, 0x9005,
+	0x0130, 0x6007, 0x003b, 0xa8a4, 0x602e, 0xa8a8, 0x6016, 0x6003,
+	0x0001, 0x080c, 0x91b1, 0x080c, 0x9763, 0x00ee, 0x0804, 0x7b90,
+	0x2061, 0x1a70, 0x6000, 0xd084, 0x0190, 0xd08c, 0x1904, 0x7d09,
+	0x0126, 0x2091, 0x8000, 0x6204, 0x8210, 0x0220, 0x6206, 0x012e,
+	0x0804, 0x7d09, 0x012e, 0xa883, 0x0016, 0x0804, 0x7d02, 0xa883,
+	0x0007, 0x0804, 0x7d02, 0xa864, 0x8007, 0x9084, 0x00ff, 0x0130,
+	0x8001, 0x1138, 0x7007, 0x0001, 0x0069, 0x0005, 0x080c, 0x788b,
+	0x0040, 0x7007, 0x0003, 0x7012, 0x2900, 0x7016, 0x701a, 0x704b,
+	0x7c32, 0x0005, 0x00b6, 0x00e6, 0x0126, 0x2091, 0x8000, 0x903e,
+	0x2061, 0x1800, 0x61d0, 0x81ff, 0x1904, 0x7cb4, 0x6130, 0xd194,
+	0x1904, 0x7cde, 0xa878, 0x2070, 0x9e82, 0x1cd0, 0x0a04, 0x7ca8,
+	0x6068, 0x9e02, 0x1a04, 0x7ca8, 0x7120, 0x9186, 0x0006, 0x1904,
+	0x7c9a, 0x7010, 0x905d, 0x0904, 0x7cb4, 0xb800, 0xd0e4, 0x1904,
+	0x7cd8, 0x2061, 0x1a70, 0x6100, 0x9184, 0x0301, 0x9086, 0x0001,
+	0x15a0, 0x7024, 0xd0dc, 0x1904, 0x7ce1, 0xa883, 0x0000, 0xa803,
+	0x0000, 0x2908, 0x7014, 0x9005, 0x1198, 0x7116, 0xa87c, 0xd0f4,
+	0x1904, 0x7ce4, 0x080c, 0x575d, 0xd09c, 0x1118, 0xa87c, 0xc0cc,
+	0xa87e, 0x2e60, 0x080c, 0x86ba, 0x012e, 0x00ee, 0x00be, 0x0005,
+	0x2048, 0xa800, 0x9005, 0x1de0, 0xa902, 0x2148, 0xa87c, 0xd0f4,
+	0x1904, 0x7ce4, 0x012e, 0x00ee, 0x00be, 0x0005, 0x012e, 0x00ee,
+	0xa883, 0x0006, 0x00be, 0x0804, 0x7d02, 0xd184, 0x0db8, 0xd1c4,
+	0x1190, 0x00a0, 0xa974, 0x080c, 0x6699, 0x15d0, 0xb800, 0xd0e4,
+	0x15b8, 0x7120, 0x9186, 0x0007, 0x1118, 0xa883, 0x0002, 0x0490,
+	0xa883, 0x0008, 0x0478, 0xa883, 0x000e, 0x0460, 0xa883, 0x0017,
+	0x0448, 0xa883, 0x0035, 0x0430, 0x080c, 0x5761, 0xd0fc, 0x01e8,
+	0xa878, 0x2070, 0x9e82, 0x1cd0, 0x02c0, 0x6068, 0x9e02, 0x12a8,
+	0x7120, 0x9186, 0x0006, 0x1188, 0x7010, 0x905d, 0x0170, 0xb800,
+	0xd0bc, 0x0158, 0x2039, 0x0001, 0x7000, 0x9086, 0x0007, 0x1904,
+	0x7c3e, 0x7003, 0x0002, 0x0804, 0x7c3e, 0xa883, 0x0028, 0x0010,
+	0xa883, 0x0029, 0x012e, 0x00ee, 0x00be, 0x0420, 0xa883, 0x002a,
+	0x0cc8, 0xa883, 0x0045, 0x0cb0, 0x2e60, 0x2019, 0x0002, 0x601b,
+	0x0014, 0x080c, 0xe2c0, 0x012e, 0x00ee, 0x00be, 0x0005, 0x2009,
+	0x003e, 0x0058, 0x2009, 0x0004, 0x0040, 0x2009, 0x0006, 0x0028,
+	0x2009, 0x0016, 0x0010, 0x2009, 0x0001, 0xa884, 0x9084, 0xff00,
+	0x9105, 0xa886, 0x0126, 0x2091, 0x8000, 0x080c, 0x6d17, 0x012e,
+	0x0005, 0x080c, 0x1031, 0x0005, 0x00d6, 0x080c, 0x86b1, 0x00de,
+	0x0005, 0x00d6, 0x00e6, 0x0126, 0x2091, 0x8000, 0x2071, 0x0040,
+	0x702c, 0xd084, 0x01d8, 0x908c, 0x0780, 0x190c, 0x7df3, 0xd09c,
+	0x11a8, 0x2071, 0x1800, 0x70c0, 0x90ea, 0x0020, 0x0278, 0x8001,
+	0x70c2, 0x702c, 0x2048, 0xa800, 0x702e, 0x9006, 0xa802, 0xa806,
+	0x2071, 0x0040, 0x2900, 0x7022, 0x702c, 0x0c28, 0x012e, 0x00ee,
+	0x00de, 0x0005, 0x0006, 0x9084, 0x0780, 0x190c, 0x7df3, 0x000e,
+	0x0005, 0xa898, 0x9084, 0x0003, 0x05a8, 0x080c, 0xaeed, 0x05d8,
+	0x2900, 0x6016, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0035, 0x1138,
+	0x6008, 0xc0fd, 0x600a, 0x2001, 0x196a, 0x2004, 0x0098, 0xa8a0,
+	0x9084, 0x00ff, 0xa99c, 0x918c, 0xff00, 0x9105, 0xa99c, 0x918c,
+	0x00ff, 0x080c, 0x287c, 0x1540, 0x00b6, 0x080c, 0x6699, 0x2b00,
+	0x00be, 0x1510, 0x6012, 0x6023, 0x0001, 0x2009, 0x0040, 0xa864,
+	0x9084, 0x00ff, 0x9086, 0x0035, 0x0110, 0x2009, 0x0041, 0x080c,
+	0xafbe, 0x0005, 0xa87b, 0x0101, 0x0126, 0x2091, 0x8000, 0x080c,
+	0x6d17, 0x012e, 0x0005, 0xa87b, 0x002c, 0x0126, 0x2091, 0x8000,
+	0x080c, 0x6d17, 0x012e, 0x0005, 0xa87b, 0x0028, 0x0126, 0x2091,
+	0x8000, 0x080c, 0x6d17, 0x012e, 0x080c, 0xaf43, 0x0005, 0x00d6,
+	0x00c6, 0x0036, 0x0026, 0x0016, 0x00b6, 0x7007, 0x0001, 0xaa74,
+	0x9282, 0x0004, 0x1a04, 0x7de4, 0xa97c, 0x9188, 0x1000, 0x2104,
+	0x905d, 0xb804, 0xd284, 0x0140, 0x05e8, 0x8007, 0x9084, 0x00ff,
+	0x9084, 0x0006, 0x1108, 0x04b0, 0x2b10, 0x080c, 0xaeed, 0x1118,
+	0x080c, 0xaf91, 0x05a8, 0x6212, 0xa874, 0x0002, 0x7dc2, 0x7dc7,
+	0x7dca, 0x7dd0, 0x2019, 0x0002, 0x080c, 0xe6ae, 0x0060, 0x080c,
+	0xe64a, 0x0048, 0x2019, 0x0002, 0xa980, 0x080c, 0xe665, 0x0018,
+	0xa980, 0x080c, 0xe64a, 0x080c, 0xaf43, 0xa887, 0x0000, 0x0126,
+	0x2091, 0x8000, 0x080c, 0x6d17, 0x012e, 0x00be, 0x001e, 0x002e,
+	0x003e, 0x00ce, 0x00de, 0x0005, 0xa887, 0x0006, 0x0c80, 0xa887,
+	0x0002, 0x0c68, 0xa887, 0x0005, 0x0c50, 0xa887, 0x0004, 0x0c38,
+	0xa887, 0x0007, 0x0c20, 0x2091, 0x8000, 0x0e04, 0x7df5, 0x0006,
+	0x0016, 0x2001, 0x8003, 0x0006, 0x0804, 0x0dde, 0x2001, 0x1834,
+	0x2004, 0x9005, 0x0005, 0x0005, 0x00f6, 0x2079, 0x0300, 0x2001,
+	0x0200, 0x200c, 0xc1e5, 0xc1dc, 0x2102, 0x2009, 0x0218, 0x210c,
+	0xd1ec, 0x1120, 0x080c, 0x158c, 0x00fe, 0x0005, 0x2001, 0x020d,
+	0x2003, 0x0020, 0x781f, 0x0300, 0x00fe, 0x0005, 0x781c, 0xd08c,
+	0x0904, 0x7e75, 0x68c0, 0x90aa, 0x0005, 0x0a04, 0x84b9, 0x7d44,
+	0x7c40, 0x9584, 0x00f6, 0x1510, 0x9484, 0x7000, 0x0140, 0x908a,
+	0x2000, 0x1260, 0x9584, 0x0700, 0x8007, 0x0804, 0x7e7c, 0x7000,
+	0x9084, 0xff00, 0x9086, 0x8100, 0x0da8, 0x00b0, 0x9484, 0x0fff,
+	0x1130, 0x7000, 0x9084, 0xff00, 0x9086, 0x8100, 0x11c0, 0x080c,
+	0xeb51, 0x080c, 0x839e, 0x7817, 0x0140, 0x00a8, 0x9584, 0x0076,
+	0x1118, 0x080c, 0x83fc, 0x19c0, 0xd5a4, 0x0148, 0x0046, 0x0056,
+	0x080c, 0x7ed7, 0x080c, 0x2375, 0x005e, 0x004e, 0x0020, 0x080c,
+	0xeb51, 0x7817, 0x0140, 0x080c, 0x743e, 0x0168, 0x2001, 0x0111,
+	0x2004, 0xd08c, 0x0140, 0x6893, 0x0000, 0x2001, 0x0110, 0x2003,
+	0x0008, 0x2003, 0x0000, 0x080c, 0x7eb8, 0x2001, 0x19ef, 0x2004,
+	0x9005, 0x090c, 0x9763, 0x0005, 0x0002, 0x7e8e, 0x81a6, 0x7e85,
+	0x7e85, 0x7e85, 0x7e85, 0x7e85, 0x7e85, 0x7817, 0x0140, 0x2001,
+	0x19ef, 0x2004, 0x9005, 0x090c, 0x9763, 0x0005, 0x7000, 0x908c,
+	0xff00, 0x9194, 0xf000, 0x810f, 0x9484, 0x0fff, 0x6892, 0x9286,
+	0x2000, 0x1150, 0x6800, 0x9086, 0x0001, 0x1118, 0x080c, 0x57c3,
+	0x0070, 0x080c, 0x7ef7, 0x0058, 0x9286, 0x3000, 0x1118, 0x080c,
+	0x80de, 0x0028, 0x9286, 0x8000, 0x1110, 0x080c, 0x82c5, 0x7817,
+	0x0140, 0x2001, 0x19ef, 0x2004, 0x9005, 0x090c, 0x9763, 0x0005,
+	0x2001, 0x1810, 0x2004, 0xd08c, 0x0178, 0x2001, 0x1800, 0x2004,
+	0x9086, 0x0003, 0x1148, 0x0026, 0x0036, 0x2011, 0x8048, 0x2518,
+	0x080c, 0x4b7f, 0x003e, 0x002e, 0x0005, 0x0036, 0x0046, 0x0056,
+	0x00f6, 0x2079, 0x0200, 0x2019, 0xfffe, 0x7c30, 0x0050, 0x0036,
+	0x0046, 0x0056, 0x00f6, 0x2079, 0x0200, 0x7d44, 0x7c40, 0x2019,
+	0xffff, 0x2001, 0x1810, 0x2004, 0xd08c, 0x0160, 0x2001, 0x1800,
+	0x2004, 0x9086, 0x0003, 0x1130, 0x0026, 0x2011, 0x8048, 0x080c,
+	0x4b7f, 0x002e, 0x00fe, 0x005e, 0x004e, 0x003e, 0x0005, 0x00b6,
+	0x00c6, 0x7010, 0x9084, 0xff00, 0x8007, 0x9096, 0x0001, 0x0120,
+	0x9096, 0x0023, 0x1904, 0x80af, 0x9186, 0x0023, 0x15c0, 0x080c,
+	0x8363, 0x0904, 0x80af, 0x6120, 0x9186, 0x0001, 0x0150, 0x9186,
+	0x0004, 0x0138, 0x9186, 0x0008, 0x0120, 0x9186, 0x000a, 0x1904,
+	0x80af, 0x7124, 0x610a, 0x7030, 0x908e, 0x0200, 0x1130, 0x2009,
+	0x0015, 0x080c, 0xafbe, 0x0804, 0x80af, 0x908e, 0x0214, 0x0118,
+	0x908e, 0x0210, 0x1130, 0x2009, 0x0015, 0x080c, 0xafbe, 0x0804,
+	0x80af, 0x908e, 0x0100, 0x1904, 0x80af, 0x7034, 0x9005, 0x1904,
+	0x80af, 0x2009, 0x0016, 0x080c, 0xafbe, 0x0804, 0x80af, 0x9186,
+	0x0022, 0x1904, 0x80af, 0x7030, 0x908e, 0x0300, 0x1580, 0x68dc,
+	0xd0a4, 0x0528, 0xc0b5, 0x68de, 0x7100, 0x918c, 0x00ff, 0x697e,
+	0x7004, 0x6882, 0x00f6, 0x2079, 0x0100, 0x79e6, 0x78ea, 0x0006,
+	0x9084, 0x00ff, 0x0016, 0x2008, 0x080c, 0x28c5, 0x7932, 0x7936,
+	0x001e, 0x000e, 0x00fe, 0x080c, 0x287c, 0x695e, 0x703c, 0x00e6,
+	0x2071, 0x0140, 0x7086, 0x2071, 0x1800, 0x70b6, 0x00ee, 0x7034,
+	0x9005, 0x1904, 0x80af, 0x2009, 0x0017, 0x0804, 0x805f, 0x908e,
+	0x0400, 0x1190, 0x7034, 0x9005, 0x1904, 0x80af, 0x080c, 0x743e,
+	0x0120, 0x2009, 0x001d, 0x0804, 0x805f, 0x68dc, 0xc0a5, 0x68de,
+	0x2009, 0x0030, 0x0804, 0x805f, 0x908e, 0x0500, 0x1140, 0x7034,
+	0x9005, 0x1904, 0x80af, 0x2009, 0x0018, 0x0804, 0x805f, 0x908e,
+	0x2010, 0x1120, 0x2009, 0x0019, 0x0804, 0x805f, 0x908e, 0x2110,
+	0x1120, 0x2009, 0x001a, 0x0804, 0x805f, 0x908e, 0x5200, 0x1140,
+	0x7034, 0x9005, 0x1904, 0x80af, 0x2009, 0x001b, 0x0804, 0x805f,
+	0x908e, 0x5000, 0x1140, 0x7034, 0x9005, 0x1904, 0x80af, 0x2009,
+	0x001c, 0x0804, 0x805f, 0x908e, 0x1300, 0x1120, 0x2009, 0x0034,
+	0x0804, 0x805f, 0x908e, 0x1200, 0x1140, 0x7034, 0x9005, 0x1904,
+	0x80af, 0x2009, 0x0024, 0x0804, 0x805f, 0x908c, 0xff00, 0x918e,
+	0x2400, 0x1170, 0x2009, 0x002d, 0x2001, 0x1810, 0x2004, 0xd09c,
+	0x0904, 0x805f, 0x080c, 0xda85, 0x1904, 0x80af, 0x0804, 0x805d,
+	0x908c, 0xff00, 0x918e, 0x5300, 0x1120, 0x2009, 0x002a, 0x0804,
+	0x805f, 0x908e, 0x0f00, 0x1120, 0x2009, 0x0020, 0x0804, 0x805f,
+	0x908e, 0x6104, 0x1530, 0x2029, 0x0205, 0x2011, 0x026d, 0x8208,
+	0x2204, 0x9082, 0x0004, 0x8004, 0x8004, 0x20a8, 0x2011, 0x8015,
+	0x211c, 0x8108, 0x0046, 0x2124, 0x080c, 0x4b7f, 0x004e, 0x8108,
+	0x0f04, 0x8013, 0x9186, 0x0280, 0x1d88, 0x2504, 0x8000, 0x202a,
+	0x2009, 0x0260, 0x0c58, 0x202b, 0x0000, 0x2009, 0x0023, 0x0804,
+	0x805f, 0x908e, 0x6000, 0x1120, 0x2009, 0x003f, 0x0804, 0x805f,
+	0x908e, 0x5400, 0x1138, 0x080c, 0x8469, 0x1904, 0x80af, 0x2009,
+	0x0046, 0x04a8, 0x908e, 0x5500, 0x1148, 0x080c, 0x8491, 0x1118,
+	0x2009, 0x0041, 0x0460, 0x2009, 0x0042, 0x0448, 0x908e, 0x7800,
+	0x1118, 0x2009, 0x0045, 0x0418, 0x908e, 0x1000, 0x1118, 0x2009,
+	0x004e, 0x00e8, 0x908e, 0x6300, 0x1118, 0x2009, 0x004a, 0x00b8,
+	0x908c, 0xff00, 0x918e, 0x5600, 0x1118, 0x2009, 0x004f, 0x0078,
+	0x908c, 0xff00, 0x918e, 0x5700, 0x1118, 0x2009, 0x0050, 0x0038,
+	0x2009, 0x001d, 0x6838, 0xd0d4, 0x0110, 0x2009, 0x004c, 0x0016,
+	0x2011, 0x0263, 0x2204, 0x8211, 0x220c, 0x080c, 0x287c, 0x1904,
+	0x80b2, 0x080c, 0x6638, 0x1904, 0x80b2, 0xbe12, 0xbd16, 0x001e,
+	0x0016, 0x080c, 0x743e, 0x01c0, 0x68dc, 0xd08c, 0x1148, 0x7000,
+	0x9084, 0x00ff, 0x1188, 0x7004, 0x9084, 0xff00, 0x1168, 0x0040,
+	0x687c, 0x9606, 0x1148, 0x6880, 0x9506, 0x9084, 0xff00, 0x1120,
+	0x9584, 0x00ff, 0xb8c2, 0x0080, 0xb8c0, 0x9005, 0x1168, 0x9186,
+	0x0046, 0x1150, 0x687c, 0x9606, 0x1138, 0x6880, 0x9506, 0x9084,
+	0xff00, 0x1110, 0x001e, 0x0098, 0x080c, 0xaeed, 0x01a8, 0x2b08,
+	0x6112, 0x6023, 0x0004, 0x7120, 0x610a, 0x001e, 0x9186, 0x004c,
+	0x1110, 0x6023, 0x000a, 0x0016, 0x001e, 0x080c, 0xafbe, 0x00ce,
+	0x00be, 0x0005, 0x001e, 0x0cd8, 0x2001, 0x180e, 0x2004, 0xd0ec,
+	0x0120, 0x2011, 0x8049, 0x080c, 0x4b7f, 0x080c, 0xaf91, 0x0d90,
+	0x2b08, 0x6112, 0x6023, 0x0004, 0x7120, 0x610a, 0x001e, 0x0016,
+	0x9186, 0x0017, 0x0118, 0x9186, 0x0030, 0x1128, 0x6007, 0x0009,
+	0x6017, 0x2900, 0x0020, 0x6007, 0x0051, 0x6017, 0x0000, 0x602f,
+	0x0009, 0x6003, 0x0001, 0x080c, 0x91f9, 0x08a0, 0x080c, 0x84d8,
+	0x1158, 0x080c, 0x3342, 0x1140, 0x7010, 0x9084, 0xff00, 0x8007,
+	0x908e, 0x0008, 0x1108, 0x0009, 0x0005, 0x00b6, 0x00c6, 0x0046,
+	0x7000, 0x908c, 0xff00, 0x810f, 0x9186, 0x0033, 0x11e8, 0x080c,
+	0x8363, 0x0904, 0x813e, 0x7124, 0x610a, 0x7030, 0x908e, 0x0200,
+	0x1140, 0x7034, 0x9005, 0x15d0, 0x2009, 0x0015, 0x080c, 0xafbe,
+	0x04a8, 0x908e, 0x0100, 0x1590, 0x7034, 0x9005, 0x1578, 0x2009,
+	0x0016, 0x080c, 0xafbe, 0x0450, 0x9186, 0x0032, 0x1538, 0x7030,
+	0x908e, 0x1400, 0x1518, 0x2009, 0x0038, 0x0016, 0x2011, 0x0263,
+	0x2204, 0x8211, 0x220c, 0x080c, 0x287c, 0x11b8, 0x080c, 0x6638,
+	0x11a0, 0xbe12, 0xbd16, 0x080c, 0xaeed, 0x0178, 0x2b08, 0x6112,
+	0x080c, 0xd102, 0x6023, 0x0004, 0x7120, 0x610a, 0x001e, 0x080c,
+	0xafbe, 0x080c, 0x9763, 0x0010, 0x00ce, 0x001e, 0x004e, 0x00ce,
+	0x00be, 0x0005, 0x00b6, 0x0046, 0x00e6, 0x00d6, 0x2028, 0x2130,
+	0x9696, 0x00ff, 0x11b8, 0x9592, 0xfffc, 0x02a0, 0x9596, 0xfffd,
+	0x1120, 0x2009, 0x007f, 0x0804, 0x81a0, 0x9596, 0xfffe, 0x1120,
+	0x2009, 0x007e, 0x0804, 0x81a0, 0x9596, 0xfffc, 0x1118, 0x2009,
+	0x0080, 0x04f0, 0x2011, 0x0000, 0x2019, 0x1837, 0x231c, 0xd3ac,
+	0x0130, 0x9026, 0x20a9, 0x0800, 0x2071, 0x1000, 0x0030, 0x2021,
+	0x0081, 0x20a9, 0x077f, 0x2071, 0x1081, 0x2e1c, 0x93dd, 0x0000,
+	0x1140, 0x82ff, 0x11d0, 0x9496, 0x00ff, 0x01b8, 0x2410, 0xc2fd,
+	0x00a0, 0xbf10, 0x2600, 0x9706, 0xb814, 0x1120, 0x9546, 0x1110,
+	0x2408, 0x00b0, 0x9745, 0x1148, 0x94c6, 0x007e, 0x0130, 0x94c6,
+	0x007f, 0x0118, 0x94c6, 0x0080, 0x1d20, 0x8420, 0x8e70, 0x1f04,
+	0x8175, 0x82ff, 0x1118, 0x9085, 0x0001, 0x0018, 0xc2fc, 0x2208,
+	0x9006, 0x00de, 0x00ee, 0x004e, 0x00be, 0x0005, 0x2001, 0x1837,
+	0x200c, 0x9184, 0x0080, 0x0110, 0xd18c, 0x0138, 0x7000, 0x908c,
+	0xff00, 0x810f, 0x9184, 0x000f, 0x004a, 0x7817, 0x0140, 0x2001,
+	0x19ef, 0x2004, 0x9005, 0x090c, 0x9763, 0x0005, 0x81ce, 0x81ce,
+	0x81ce, 0x8375, 0x81ce, 0x81d7, 0x8202, 0x8290, 0x81ce, 0x81ce,
+	0x81ce, 0x81ce, 0x81ce, 0x81ce, 0x81ce, 0x81ce, 0x7817, 0x0140,
+	0x2001, 0x19ef, 0x2004, 0x9005, 0x090c, 0x9763, 0x0005, 0x00b6,
+	0x7110, 0xd1bc, 0x01e8, 0x7120, 0x2160, 0x9c8c, 0x0007, 0x11c0,
+	0x9c8a, 0x1cd0, 0x02a8, 0x6868, 0x9c02, 0x1290, 0x7008, 0x9084,
+	0x00ff, 0x6110, 0x2158, 0xb910, 0x9106, 0x1150, 0x700c, 0xb914,
+	0x9106, 0x1130, 0x7124, 0x610a, 0x2009, 0x0046, 0x080c, 0xafbe,
+	0x7817, 0x0140, 0x2001, 0x19ef, 0x2004, 0x9005, 0x090c, 0x9763,
+	0x00be, 0x0005, 0x00b6, 0x00c6, 0x9484, 0x0fff, 0x0904, 0x8266,
+	0x7110, 0xd1bc, 0x1904, 0x8266, 0x7108, 0x700c, 0x2028, 0x918c,
+	0x00ff, 0x2130, 0x9094, 0xff00, 0x15b0, 0x81ff, 0x15a0, 0x9080,
+	0x3384, 0x200d, 0x918c, 0xff00, 0x810f, 0x2001, 0x0080, 0x9106,
+	0x0904, 0x8266, 0x080c, 0x6638, 0x1904, 0x8266, 0xbe12, 0xbd16,
+	0xb800, 0xd0ec, 0x15d8, 0xba04, 0x9294, 0xff00, 0x9286, 0x0600,
+	0x11a0, 0x080c, 0xaeed, 0x05e8, 0x2b08, 0x7028, 0x6046, 0x702c,
+	0x604a, 0x6112, 0x6023, 0x0006, 0x7120, 0x610a, 0x7130, 0x6156,
+	0x2009, 0x0044, 0x080c, 0xdce5, 0x0408, 0x080c, 0x6a0c, 0x1138,
+	0xb807, 0x0606, 0x0c30, 0x190c, 0x8142, 0x11c0, 0x0898, 0x080c,
+	0xaeed, 0x2b08, 0x0198, 0x6112, 0x6023, 0x0004, 0x7120, 0x610a,
+	0x9286, 0x0400, 0x1118, 0x6007, 0x0005, 0x0010, 0x6007, 0x0001,
+	0x6003, 0x0001, 0x080c, 0x91f9, 0x080c, 0x9763, 0x7817, 0x0140,
+	0x2001, 0x19ef, 0x2004, 0x9005, 0x090c, 0x9763, 0x00ce, 0x00be,
+	0x0005, 0x2001, 0x180e, 0x2004, 0xd0ec, 0x0120, 0x2011, 0x8049,
+	0x080c, 0x4b7f, 0x080c, 0xaf91, 0x0d48, 0x2b08, 0x6112, 0x6023,
+	0x0006, 0x7120, 0x610a, 0x7130, 0x6156, 0x6017, 0xf300, 0x6003,
+	0x0001, 0x6007, 0x0041, 0x080c, 0x91b1, 0x080c, 0x9763, 0x08b0,
+	0x00b6, 0x7110, 0xd1bc, 0x01e8, 0x7020, 0x2060, 0x9c84, 0x0007,
+	0x11c0, 0x9c82, 0x1cd0, 0x02a8, 0x6868, 0x9c02, 0x1290, 0x7008,
 	0x9084, 0x00ff, 0x6110, 0x2158, 0xb910, 0x9106, 0x1150, 0x700c,
-	0xb914, 0x9106, 0x1130, 0x7124, 0x610a, 0x2009, 0x0046, 0x080c,
-	0xaeda, 0x7817, 0x0140, 0x2001, 0x19ef, 0x2004, 0x9005, 0x090c,
-	0x96a6, 0x00be, 0x0005, 0x00b6, 0x00c6, 0x9484, 0x0fff, 0x0904,
-	0x81c7, 0x7110, 0xd1bc, 0x1904, 0x81c7, 0x7108, 0x700c, 0x2028,
-	0x918c, 0x00ff, 0x2130, 0x9094, 0xff00, 0x15b0, 0x81ff, 0x15a0,
-	0x9080, 0x3332, 0x200d, 0x918c, 0xff00, 0x810f, 0x2001, 0x0080,
-	0x9106, 0x0904, 0x81c7, 0x080c, 0x65b5, 0x1904, 0x81c7, 0xbe12,
-	0xbd16, 0xb800, 0xd0ec, 0x15d8, 0xba04, 0x9294, 0xff00, 0x9286,
-	0x0600, 0x11a0, 0x080c, 0xae09, 0x05e8, 0x2b08, 0x7028, 0x604a,
-	0x702c, 0x6046, 0x6112, 0x6023, 0x0006, 0x7120, 0x610a, 0x7130,
-	0x6156, 0x2009, 0x0044, 0x080c, 0xdb94, 0x0408, 0x080c, 0x6989,
-	0x1138, 0xb807, 0x0606, 0x0c30, 0x190c, 0x80b4, 0x11c0, 0x0898,
-	0x080c, 0xae09, 0x2b08, 0x0198, 0x6112, 0x6023, 0x0004, 0x7120,
-	0x610a, 0x9286, 0x0400, 0x1118, 0x6007, 0x0005, 0x0010, 0x6007,
-	0x0001, 0x6003, 0x0001, 0x080c, 0x9140, 0x080c, 0x96a6, 0x7817,
-	0x0140, 0x2001, 0x19ef, 0x2004, 0x9005, 0x090c, 0x96a6, 0x00ce,
-	0x00be, 0x0005, 0x2001, 0x180e, 0x2004, 0xd0ec, 0x0120, 0x2011,
-	0x8049, 0x080c, 0x4b1e, 0x080c, 0xaead, 0x0d48, 0x2b08, 0x6112,
-	0x6023, 0x0006, 0x7120, 0x610a, 0x7130, 0x6156, 0x6017, 0xf300,
-	0x6003, 0x0001, 0x6007, 0x0041, 0x080c, 0x90f8, 0x080c, 0x96a6,
-	0x08b0, 0x00b6, 0x7110, 0xd1bc, 0x01e8, 0x7020, 0x2060, 0x9c84,
-	0x0007, 0x11c0, 0x9c82, 0x1cd0, 0x02a8, 0x6868, 0x9c02, 0x1290,
-	0x7008, 0x9084, 0x00ff, 0x6110, 0x2158, 0xb910, 0x9106, 0x1150,
-	0x700c, 0xb914, 0x9106, 0x1130, 0x7124, 0x610a, 0x2009, 0x0045,
-	0x080c, 0xaeda, 0x7817, 0x0140, 0x2001, 0x19ef, 0x2004, 0x9005,
-	0x090c, 0x96a6, 0x00be, 0x0005, 0x6120, 0x9186, 0x0002, 0x0128,
-	0x9186, 0x0005, 0x0110, 0x9085, 0x0001, 0x0005, 0x080c, 0x32f0,
-	0x1168, 0x7010, 0x9084, 0xff00, 0x8007, 0x9086, 0x0000, 0x1130,
-	0x9184, 0x000f, 0x908a, 0x0006, 0x1208, 0x000b, 0x0005, 0x823d,
-	0x823e, 0x823d, 0x823d, 0x829d, 0x82ac, 0x0005, 0x00b6, 0x7110,
-	0xd1bc, 0x0120, 0x702c, 0xd084, 0x0904, 0x829b, 0x700c, 0x7108,
-	0x080c, 0x284b, 0x1904, 0x829b, 0x080c, 0x65b5, 0x1904, 0x829b,
-	0xbe12, 0xbd16, 0x7110, 0xd1bc, 0x01d8, 0x080c, 0x6989, 0x0118,
-	0x9086, 0x0004, 0x1588, 0x00c6, 0x080c, 0x82bb, 0x00ce, 0x05d8,
-	0x080c, 0xae09, 0x2b08, 0x05b8, 0x6112, 0x080c, 0xcfd4, 0x6023,
-	0x0002, 0x7120, 0x610a, 0x2009, 0x0088, 0x080c, 0xaeda, 0x0458,
-	0x080c, 0x6989, 0x0148, 0x9086, 0x0004, 0x0130, 0x080c, 0x6991,
-	0x0118, 0x9086, 0x0004, 0x1180, 0x080c, 0xae09, 0x2b08, 0x01d8,
-	0x6112, 0x080c, 0xcfd4, 0x6023, 0x0005, 0x7120, 0x610a, 0x2009,
-	0x0088, 0x080c, 0xaeda, 0x0078, 0x080c, 0xae09, 0x2b08, 0x0158,
-	0x6112, 0x080c, 0xcfd4, 0x6023, 0x0004, 0x7120, 0x610a, 0x2009,
-	0x0001, 0x080c, 0xaeda, 0x00be, 0x0005, 0x7110, 0xd1bc, 0x0158,
-	0x00d1, 0x0148, 0x080c, 0x821c, 0x1130, 0x7124, 0x610a, 0x2009,
-	0x0089, 0x080c, 0xaeda, 0x0005, 0x7110, 0xd1bc, 0x0158, 0x0059,
-	0x0148, 0x080c, 0x821c, 0x1130, 0x7124, 0x610a, 0x2009, 0x008a,
-	0x080c, 0xaeda, 0x0005, 0x7020, 0x2060, 0x9c84, 0x0007, 0x1158,
+	0xb914, 0x9106, 0x1130, 0x7124, 0x610a, 0x2009, 0x0045, 0x080c,
+	0xafbe, 0x7817, 0x0140, 0x2001, 0x19ef, 0x2004, 0x9005, 0x090c,
+	0x9763, 0x00be, 0x0005, 0x6120, 0x9186, 0x0002, 0x0128, 0x9186,
+	0x0005, 0x0110, 0x9085, 0x0001, 0x0005, 0x080c, 0x84d8, 0x1180,
+	0x080c, 0x3342, 0x1168, 0x7010, 0x9084, 0xff00, 0x8007, 0x9086,
+	0x0000, 0x1130, 0x9184, 0x000f, 0x908a, 0x0006, 0x1208, 0x000b,
+	0x0005, 0x82df, 0x82e0, 0x82df, 0x82df, 0x8345, 0x8354, 0x0005,
+	0x00b6, 0x700c, 0x7108, 0x080c, 0x287c, 0x1904, 0x8343, 0x080c,
+	0x6638, 0x1904, 0x8343, 0xbe12, 0xbd16, 0x7110, 0xd1bc, 0x0540,
+	0x702c, 0xd084, 0x1120, 0xb800, 0xd0bc, 0x1904, 0x8343, 0x080c,
+	0x6a0c, 0x0148, 0x9086, 0x0004, 0x0130, 0x080c, 0x6a14, 0x0118,
+	0x9086, 0x0004, 0x1588, 0x00c6, 0x080c, 0x8363, 0x00ce, 0x05d8,
+	0x080c, 0xaeed, 0x2b08, 0x05b8, 0x6112, 0x080c, 0xd102, 0x6023,
+	0x0002, 0x7120, 0x610a, 0x2009, 0x0088, 0x080c, 0xafbe, 0x0458,
+	0x080c, 0x6a0c, 0x0148, 0x9086, 0x0004, 0x0130, 0x080c, 0x6a14,
+	0x0118, 0x9086, 0x0004, 0x1180, 0x080c, 0xaeed, 0x2b08, 0x01d8,
+	0x6112, 0x080c, 0xd102, 0x6023, 0x0005, 0x7120, 0x610a, 0x2009,
+	0x0088, 0x080c, 0xafbe, 0x0078, 0x080c, 0xaeed, 0x2b08, 0x0158,
+	0x6112, 0x080c, 0xd102, 0x6023, 0x0004, 0x7120, 0x610a, 0x2009,
+	0x0001, 0x080c, 0xafbe, 0x00be, 0x0005, 0x7110, 0xd1bc, 0x0158,
+	0x00d1, 0x0148, 0x080c, 0x82bb, 0x1130, 0x7124, 0x610a, 0x2009,
+	0x0089, 0x080c, 0xafbe, 0x0005, 0x7110, 0xd1bc, 0x0158, 0x0059,
+	0x0148, 0x080c, 0x82bb, 0x1130, 0x7124, 0x610a, 0x2009, 0x008a,
+	0x080c, 0xafbe, 0x0005, 0x7020, 0x2060, 0x9c84, 0x0007, 0x1158,
 	0x9c82, 0x1cd0, 0x0240, 0x2001, 0x181a, 0x2004, 0x9c02, 0x1218,
 	0x9085, 0x0001, 0x0005, 0x9006, 0x0ce8, 0x00b6, 0x7110, 0xd1bc,
 	0x11d8, 0x7024, 0x2060, 0x9c84, 0x0007, 0x11b0, 0x9c82, 0x1cd0,
 	0x0298, 0x6868, 0x9c02, 0x1280, 0x7008, 0x9084, 0x00ff, 0x6110,
 	0x2158, 0xb910, 0x9106, 0x1140, 0x700c, 0xb914, 0x9106, 0x1120,
-	0x2009, 0x0051, 0x080c, 0xaeda, 0x7817, 0x0140, 0x2001, 0x19ef,
-	0x2004, 0x9005, 0x090c, 0x96a6, 0x00be, 0x0005, 0x2031, 0x0105,
+	0x2009, 0x0051, 0x080c, 0xafbe, 0x7817, 0x0140, 0x2001, 0x19ef,
+	0x2004, 0x9005, 0x090c, 0x9763, 0x00be, 0x0005, 0x2031, 0x0105,
 	0x0069, 0x0005, 0x2031, 0x0206, 0x0049, 0x0005, 0x2031, 0x0207,
 	0x0029, 0x0005, 0x2031, 0x0213, 0x0009, 0x0005, 0x00c6, 0x0096,
 	0x00f6, 0x7000, 0x9084, 0xf000, 0x9086, 0xc000, 0x05d0, 0x080c,
-	0xae09, 0x05b8, 0x0066, 0x00c6, 0x0046, 0x2011, 0x0263, 0x2204,
-	0x8211, 0x220c, 0x080c, 0x284b, 0x15a0, 0x080c, 0x65b5, 0x1588,
-	0xbe12, 0xbd16, 0x2b00, 0x004e, 0x00ce, 0x6012, 0x080c, 0xcfd4,
+	0xaeed, 0x05b8, 0x0066, 0x00c6, 0x0046, 0x2011, 0x0263, 0x2204,
+	0x8211, 0x220c, 0x080c, 0x287c, 0x15a0, 0x080c, 0x6638, 0x1588,
+	0xbe12, 0xbd16, 0x2b00, 0x004e, 0x00ce, 0x6012, 0x080c, 0xd102,
 	0x080c, 0x0fff, 0x0510, 0x2900, 0x605a, 0x9006, 0xa802, 0xa866,
 	0xac6a, 0xa85c, 0x90f8, 0x001b, 0x20a9, 0x000e, 0xa860, 0x20e8,
 	0x20e1, 0x0000, 0x2fa0, 0x2e98, 0x4003, 0x006e, 0x6616, 0x6007,
-	0x003e, 0x6023, 0x0001, 0x6003, 0x0001, 0x080c, 0x9140, 0x080c,
-	0x96a6, 0x00fe, 0x009e, 0x00ce, 0x0005, 0x080c, 0xae5f, 0x006e,
+	0x003e, 0x6023, 0x0001, 0x6003, 0x0001, 0x080c, 0x91f9, 0x080c,
+	0x9763, 0x00fe, 0x009e, 0x00ce, 0x0005, 0x080c, 0xaf43, 0x006e,
 	0x0cc0, 0x004e, 0x00ce, 0x0cc8, 0x00c6, 0x7000, 0x908c, 0xff00,
-	0x9184, 0xf000, 0x810f, 0x9086, 0x2000, 0x1904, 0x83ab, 0x9186,
-	0x0022, 0x15f0, 0x2001, 0x0111, 0x2004, 0x9005, 0x1904, 0x83ad,
-	0x7030, 0x908e, 0x0400, 0x0904, 0x83ad, 0x908e, 0x6000, 0x05e8,
+	0x9184, 0xf000, 0x810f, 0x9086, 0x2000, 0x1904, 0x8453, 0x9186,
+	0x0022, 0x15f0, 0x2001, 0x0111, 0x2004, 0x9005, 0x1904, 0x8455,
+	0x7030, 0x908e, 0x0400, 0x0904, 0x8455, 0x908e, 0x6000, 0x05e8,
 	0x908e, 0x5400, 0x05d0, 0x908e, 0x0300, 0x11d8, 0x2009, 0x1837,
-	0x210c, 0xd18c, 0x1590, 0xd1a4, 0x1580, 0x080c, 0x6947, 0x0588,
+	0x210c, 0xd18c, 0x1590, 0xd1a4, 0x1580, 0x080c, 0x69ca, 0x0588,
 	0x68b0, 0x9084, 0x00ff, 0x7100, 0x918c, 0x00ff, 0x9106, 0x1518,
 	0x6880, 0x69b0, 0x918c, 0xff00, 0x9105, 0x7104, 0x9106, 0x11d8,
 	0x00e0, 0x2009, 0x0103, 0x210c, 0xd1b4, 0x11a8, 0x908e, 0x5200,
 	0x09e8, 0x908e, 0x0500, 0x09d0, 0x908e, 0x5000, 0x09b8, 0x0058,
-	0x9186, 0x0023, 0x1140, 0x080c, 0x82bb, 0x0128, 0x6004, 0x9086,
+	0x9186, 0x0023, 0x1140, 0x080c, 0x8363, 0x0128, 0x6004, 0x9086,
 	0x0002, 0x0118, 0x0000, 0x9006, 0x0010, 0x9085, 0x0001, 0x00ce,
 	0x0005, 0x7030, 0x908e, 0x0300, 0x0118, 0x908e, 0x5200, 0x1d98,
 	0x2001, 0x1837, 0x2004, 0x9084, 0x0009, 0x9086, 0x0008, 0x0d68,
 	0x0c50, 0x0156, 0x0046, 0x0016, 0x0036, 0x7038, 0x2020, 0x8427,
 	0x94a4, 0x0007, 0xd484, 0x0148, 0x20a9, 0x0004, 0x2019, 0x1805,
-	0x2011, 0x027a, 0x080c, 0xbe19, 0x1178, 0xd48c, 0x0148, 0x20a9,
-	0x0004, 0x2019, 0x1801, 0x2011, 0x027e, 0x080c, 0xbe19, 0x1120,
+	0x2011, 0x027a, 0x080c, 0xbefd, 0x1178, 0xd48c, 0x0148, 0x20a9,
+	0x0004, 0x2019, 0x1801, 0x2011, 0x027e, 0x080c, 0xbefd, 0x1120,
 	0xd494, 0x0110, 0x9085, 0x0001, 0x003e, 0x001e, 0x004e, 0x015e,
 	0x0005, 0x0156, 0x0046, 0x0016, 0x0036, 0x7038, 0x2020, 0x8427,
 	0x94a4, 0x0007, 0xd484, 0x0148, 0x20a9, 0x0004, 0x2019, 0x1805,
-	0x2011, 0x0272, 0x080c, 0xbe19, 0x1178, 0xd48c, 0x0148, 0x20a9,
-	0x0004, 0x2019, 0x1801, 0x2011, 0x0276, 0x080c, 0xbe19, 0x1120,
+	0x2011, 0x0272, 0x080c, 0xbefd, 0x1178, 0xd48c, 0x0148, 0x20a9,
+	0x0004, 0x2019, 0x1801, 0x2011, 0x0276, 0x080c, 0xbefd, 0x1120,
 	0xd494, 0x0110, 0x9085, 0x0001, 0x003e, 0x001e, 0x004e, 0x015e,
 	0x0005, 0x00f6, 0x2079, 0x0200, 0x7800, 0xc0e5, 0xc0cc, 0x7802,
 	0x00fe, 0x0005, 0x00f6, 0x2079, 0x1800, 0x7834, 0xd084, 0x1130,
 	0x2079, 0x0200, 0x7800, 0x9085, 0x1200, 0x7802, 0x00fe, 0x0005,
 	0x00e6, 0x2071, 0x1800, 0x7034, 0xc084, 0x7036, 0x00ee, 0x0005,
-	0x2071, 0x19f9, 0x7003, 0x0003, 0x700f, 0x0361, 0x9006, 0x701a,
-	0x7072, 0x7012, 0x7017, 0x1cd0, 0x7007, 0x0000, 0x7026, 0x702b,
-	0xa2a5, 0x7032, 0x7037, 0xa30d, 0x703f, 0xffff, 0x7042, 0x7047,
-	0x5581, 0x704a, 0x705b, 0x859a, 0x080c, 0x1018, 0x090c, 0x0dd5,
-	0x2900, 0x703a, 0xa867, 0x0003, 0xa86f, 0x0100, 0xa8ab, 0xdcb0,
-	0x0005, 0x2071, 0x19f9, 0x1d04, 0x84e8, 0x2091, 0x6000, 0x700c,
-	0x8001, 0x700e, 0x1530, 0x2001, 0x013c, 0x2004, 0x9005, 0x190c,
-	0x85df, 0x2001, 0x1869, 0x2004, 0xd0c4, 0x0158, 0x3a00, 0xd08c,
-	0x1140, 0x20d1, 0x0000, 0x20d1, 0x0001, 0x20d1, 0x0000, 0x080c,
-	0x0dd5, 0x700f, 0x0361, 0x7007, 0x0001, 0x0126, 0x2091, 0x8000,
-	0x7040, 0x900d, 0x0148, 0x8109, 0x7142, 0x1130, 0x7044, 0x080f,
-	0x0018, 0x0126, 0x2091, 0x8000, 0x7024, 0x900d, 0x0188, 0x7020,
-	0x8001, 0x7022, 0x1168, 0x7023, 0x0009, 0x8109, 0x7126, 0x9186,
-	0x03e8, 0x1110, 0x7028, 0x080f, 0x81ff, 0x1110, 0x7028, 0x080f,
-	0x7030, 0x900d, 0x0180, 0x702c, 0x8001, 0x702e, 0x1160, 0x702f,
-	0x0009, 0x8109, 0x7132, 0x0128, 0x9184, 0x007f, 0x090c, 0xa42a,
-	0x0010, 0x7034, 0x080f, 0x703c, 0x9005, 0x0118, 0x0310, 0x8001,
-	0x703e, 0x704c, 0x900d, 0x0168, 0x7048, 0x8001, 0x704a, 0x1148,
-	0x704b, 0x0009, 0x8109, 0x714e, 0x1120, 0x7150, 0x714e, 0x7058,
-	0x080f, 0x7018, 0x900d, 0x01d8, 0x0016, 0x7070, 0x900d, 0x0158,
-	0x706c, 0x8001, 0x706e, 0x1138, 0x706f, 0x0009, 0x8109, 0x7172,
-	0x1110, 0x7074, 0x080f, 0x001e, 0x7008, 0x8001, 0x700a, 0x1138,
-	0x700b, 0x0009, 0x8109, 0x711a, 0x1110, 0x701c, 0x080f, 0x012e,
-	0x7004, 0x0002, 0x8510, 0x8511, 0x852d, 0x00e6, 0x2071, 0x19f9,
-	0x7018, 0x9005, 0x1120, 0x711a, 0x721e, 0x700b, 0x0009, 0x00ee,
-	0x0005, 0x00e6, 0x0006, 0x2071, 0x19f9, 0x701c, 0x9206, 0x1120,
-	0x701a, 0x701e, 0x7072, 0x7076, 0x000e, 0x00ee, 0x0005, 0x00e6,
-	0x2071, 0x19f9, 0xb888, 0x9102, 0x0208, 0xb98a, 0x00ee, 0x0005,
-	0x0005, 0x00b6, 0x7110, 0x080c, 0x6616, 0x1168, 0xb888, 0x8001,
-	0x0250, 0xb88a, 0x1140, 0x0126, 0x2091, 0x8000, 0x0016, 0x080c,
-	0x96a6, 0x001e, 0x012e, 0x8108, 0x9182, 0x0800, 0x0218, 0x900e,
-	0x7007, 0x0002, 0x7112, 0x00be, 0x0005, 0x7014, 0x2060, 0x0126,
-	0x2091, 0x8000, 0x6040, 0x9005, 0x0128, 0x8001, 0x6042, 0x1110,
-	0x080c, 0xce65, 0x6018, 0x9005, 0x0558, 0x8001, 0x601a, 0x1540,
-	0x6120, 0x9186, 0x0003, 0x0148, 0x9186, 0x0006, 0x0130, 0x9186,
-	0x0009, 0x11e0, 0x611c, 0xd1c4, 0x1100, 0x080c, 0xcb5a, 0x01b0,
-	0x6014, 0x2048, 0xa884, 0x908a, 0x199a, 0x0280, 0x9082, 0x1999,
-	0xa886, 0x908a, 0x199a, 0x0210, 0x2001, 0x1999, 0x8003, 0x800b,
-	0x810b, 0x9108, 0x611a, 0xa87c, 0xd0e4, 0x0110, 0x080c, 0xc846,
-	0x012e, 0x9c88, 0x0018, 0x7116, 0x2001, 0x181a, 0x2004, 0x9102,
-	0x0220, 0x7017, 0x1cd0, 0x7007, 0x0000, 0x0005, 0x00e6, 0x2071,
-	0x19f9, 0x7027, 0x07d0, 0x7023, 0x0009, 0x00ee, 0x0005, 0x2001,
-	0x1a02, 0x2003, 0x0000, 0x0005, 0x00e6, 0x2071, 0x19f9, 0x7132,
-	0x702f, 0x0009, 0x00ee, 0x0005, 0x2011, 0x1a05, 0x2013, 0x0000,
-	0x0005, 0x00e6, 0x2071, 0x19f9, 0x711a, 0x721e, 0x700b, 0x0009,
-	0x00ee, 0x0005, 0x0086, 0x0026, 0x7054, 0x8000, 0x7056, 0x2001,
-	0x1a07, 0x2044, 0xa06c, 0x9086, 0x0000, 0x0150, 0x7068, 0xa09a,
-	0x7064, 0xa096, 0x7060, 0xa092, 0x705c, 0xa08e, 0x080c, 0x10e9,
-	0x002e, 0x008e, 0x0005, 0x0006, 0x0016, 0x0096, 0x00a6, 0x00b6,
-	0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x0156, 0x080c, 0x8459, 0x015e,
-	0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x00ae, 0x009e, 0x001e,
-	0x000e, 0x0005, 0x00e6, 0x2071, 0x19f9, 0x7172, 0x7276, 0x706f,
-	0x0009, 0x00ee, 0x0005, 0x00e6, 0x0006, 0x2071, 0x19f9, 0x7074,
-	0x9206, 0x1110, 0x7072, 0x7076, 0x000e, 0x00ee, 0x0005, 0x0016,
-	0x00c6, 0x2009, 0xfff4, 0x210d, 0x2061, 0x0100, 0x60f0, 0x9100,
-	0x60f3, 0x0000, 0x2009, 0xfff4, 0x200f, 0x1220, 0x8108, 0x2105,
-	0x8000, 0x200f, 0x00ce, 0x001e, 0x0005, 0x00c6, 0x2061, 0x1a70,
-	0x00ce, 0x0005, 0x9184, 0x000f, 0x8003, 0x8003, 0x8003, 0x9080,
-	0x1a70, 0x2060, 0x0005, 0xa884, 0x908a, 0x199a, 0x1638, 0x9005,
-	0x1150, 0x00c6, 0x2061, 0x1a70, 0x6014, 0x00ce, 0x9005, 0x1130,
-	0x2001, 0x001e, 0x0018, 0x908e, 0xffff, 0x01b0, 0x8003, 0x800b,
-	0x810b, 0x9108, 0x611a, 0xa87c, 0x908c, 0x00c0, 0x918e, 0x00c0,
-	0x0904, 0x868d, 0xd0b4, 0x1168, 0xd0bc, 0x1904, 0x8666, 0x2009,
-	0x0006, 0x080c, 0x86ba, 0x0005, 0x900e, 0x0c60, 0x2001, 0x1999,
-	0x08b0, 0xd0fc, 0x0160, 0x908c, 0x0003, 0x0120, 0x918e, 0x0003,
-	0x1904, 0x86b4, 0x908c, 0x2020, 0x918e, 0x2020, 0x01a8, 0x6024,
-	0xd0d4, 0x11e8, 0x2009, 0x1869, 0x2104, 0xd084, 0x1138, 0x87ff,
-	0x1120, 0x2009, 0x0043, 0x0804, 0xaeda, 0x0005, 0x87ff, 0x1de8,
-	0x2009, 0x0042, 0x0804, 0xaeda, 0x6110, 0x00b6, 0x2158, 0xb900,
-	0x00be, 0xd1ac, 0x0d20, 0x6024, 0xc0cd, 0x6026, 0x0c00, 0xc0d4,
-	0x6026, 0xa890, 0x602e, 0xa88c, 0x6032, 0x08e0, 0xd0fc, 0x0160,
-	0x908c, 0x0003, 0x0120, 0x918e, 0x0003, 0x1904, 0x86b4, 0x908c,
-	0x2020, 0x918e, 0x2020, 0x0170, 0x0076, 0x00f6, 0x2c78, 0x080c,
-	0x1727, 0x00fe, 0x007e, 0x87ff, 0x1120, 0x2009, 0x0042, 0x080c,
-	0xaeda, 0x0005, 0x6110, 0x00b6, 0x2158, 0xb900, 0x00be, 0xd1ac,
-	0x0d58, 0x6124, 0xc1cd, 0x6126, 0x0c38, 0xd0fc, 0x0188, 0x908c,
-	0x2020, 0x918e, 0x2020, 0x01a8, 0x9084, 0x0003, 0x908e, 0x0002,
-	0x0148, 0x87ff, 0x1120, 0x2009, 0x0041, 0x080c, 0xaeda, 0x0005,
-	0x00b9, 0x0ce8, 0x87ff, 0x1dd8, 0x2009, 0x0043, 0x080c, 0xaeda,
-	0x0cb0, 0x6110, 0x00b6, 0x2158, 0xb900, 0x00be, 0xd1ac, 0x0d20,
-	0x6124, 0xc1cd, 0x6126, 0x0c00, 0x2009, 0x0004, 0x0019, 0x0005,
-	0x2009, 0x0001, 0x0096, 0x080c, 0xcb5a, 0x0518, 0x6014, 0x2048,
-	0xa982, 0xa800, 0x6016, 0x9186, 0x0001, 0x1188, 0xa97c, 0x918c,
-	0x8100, 0x918e, 0x8100, 0x1158, 0x00c6, 0x2061, 0x1a70, 0x6200,
-	0xd28c, 0x1120, 0x6204, 0x8210, 0x0208, 0x6206, 0x00ce, 0x080c,
-	0x6acf, 0x6014, 0x904d, 0x0076, 0x2039, 0x0000, 0x190c, 0x8603,
-	0x007e, 0x009e, 0x0005, 0x0156, 0x00c6, 0x2061, 0x1a70, 0x6000,
-	0x81ff, 0x0110, 0x9205, 0x0008, 0x9204, 0x6002, 0x00ce, 0x015e,
-	0x0005, 0x6800, 0xd08c, 0x1138, 0x6808, 0x9005, 0x0120, 0x8001,
-	0x680a, 0x9085, 0x0001, 0x0005, 0x2071, 0x1923, 0x7003, 0x0006,
-	0x7007, 0x0000, 0x700f, 0x0000, 0x7013, 0x0001, 0x080c, 0x1018,
-	0x090c, 0x0dd5, 0xa867, 0x0006, 0xa86b, 0x0001, 0xa8ab, 0xdcb0,
-	0xa89f, 0x0000, 0x2900, 0x702e, 0x7033, 0x0000, 0x0005, 0x0096,
-	0x00e6, 0x2071, 0x1923, 0x702c, 0x2048, 0x6a2c, 0x721e, 0x6b30,
-	0x7322, 0x6834, 0x7026, 0xa896, 0x6838, 0x702a, 0xa89a, 0x6824,
-	0x7016, 0x683c, 0x701a, 0x2009, 0x0028, 0x200a, 0x9005, 0x0148,
-	0x900e, 0x9188, 0x000c, 0x8001, 0x1de0, 0x2100, 0x9210, 0x1208,
-	0x8318, 0xaa8e, 0xab92, 0x7010, 0xd084, 0x0178, 0xc084, 0x7007,
-	0x0001, 0x700f, 0x0000, 0x0006, 0x2009, 0x181d, 0x2104, 0x9082,
-	0x0007, 0x2009, 0x1ac7, 0x200a, 0x000e, 0xc095, 0x7012, 0x2008,
-	0x2001, 0x003b, 0x080c, 0x15f0, 0x9006, 0x2071, 0x193c, 0x7002,
-	0x7006, 0x702a, 0x00ee, 0x009e, 0x0005, 0x00e6, 0x0126, 0x0156,
-	0x2091, 0x8000, 0x2071, 0x1800, 0x7154, 0x2001, 0x0008, 0x910a,
-	0x0638, 0x2001, 0x187d, 0x20ac, 0x9006, 0x9080, 0x0008, 0x1f04,
-	0x876d, 0x71c0, 0x9102, 0x02e0, 0x2071, 0x1877, 0x20a9, 0x0007,
-	0x00c6, 0x080c, 0xae09, 0x6023, 0x0009, 0x6003, 0x0004, 0x601f,
-	0x0101, 0x0089, 0x0126, 0x2091, 0x8000, 0x080c, 0x88f3, 0x012e,
-	0x1f04, 0x8779, 0x9006, 0x00ce, 0x015e, 0x012e, 0x00ee, 0x0005,
-	0x9085, 0x0001, 0x0cc8, 0x00e6, 0x00b6, 0x0096, 0x0086, 0x0056,
-	0x0046, 0x0026, 0x7118, 0x720c, 0x7620, 0x7004, 0xd084, 0x1128,
-	0x2021, 0x0024, 0x2029, 0x0002, 0x0020, 0x2021, 0x002c, 0x2029,
-	0x000a, 0x080c, 0x0fff, 0x090c, 0x0dd5, 0x2900, 0x6016, 0x2058,
-	0xac66, 0x9006, 0xa802, 0xa806, 0xa86a, 0xa87a, 0xa8aa, 0xa887,
-	0x0005, 0xa87f, 0x0020, 0x7008, 0xa89a, 0x7010, 0xa89e, 0xae8a,
-	0xa8af, 0xffff, 0xa8b3, 0x0000, 0x8109, 0x0160, 0x080c, 0x0fff,
-	0x090c, 0x0dd5, 0xad66, 0x2b00, 0xa802, 0x2900, 0xb806, 0x2058,
-	0x8109, 0x1da0, 0x002e, 0x004e, 0x005e, 0x008e, 0x009e, 0x00be,
-	0x00ee, 0x0005, 0x2079, 0x0000, 0x2071, 0x1923, 0x7004, 0x004b,
-	0x700c, 0x0002, 0x87e5, 0x87de, 0x87de, 0x0005, 0x87ef, 0x8850,
-	0x8850, 0x8850, 0x8851, 0x8862, 0x8862, 0x700c, 0x0cba, 0x0126,
-	0x2091, 0x8000, 0x78a0, 0x79a0, 0x9106, 0x0128, 0x78a0, 0x79a0,
-	0x9106, 0x1904, 0x8843, 0x2001, 0x0005, 0x2004, 0xd0bc, 0x0130,
-	0x2011, 0x0004, 0x2204, 0xc0c5, 0x2012, 0x0ca8, 0x012e, 0x7018,
-	0x910a, 0x1130, 0x7030, 0x9005, 0x05a8, 0x080c, 0x8891, 0x0490,
+	0x0016, 0x2001, 0x1837, 0x200c, 0x9184, 0x0080, 0x0118, 0xd18c,
+	0x0118, 0x9006, 0x001e, 0x0005, 0x9085, 0x0001, 0x0cd8, 0x2071,
+	0x19f9, 0x7003, 0x0003, 0x700f, 0x0361, 0x9006, 0x701a, 0x7072,
+	0x7012, 0x7017, 0x1cd0, 0x7007, 0x0000, 0x7026, 0x702b, 0xa36c,
+	0x7032, 0x7037, 0xa3d4, 0x703f, 0xffff, 0x7042, 0x7047, 0x55ef,
+	0x704a, 0x705b, 0x8651, 0x080c, 0x1018, 0x090c, 0x0dd5, 0x2900,
+	0x703a, 0xa867, 0x0003, 0xa86f, 0x0100, 0xa8ab, 0xdcb0, 0x0005,
+	0x2071, 0x19f9, 0x1d04, 0x859f, 0x2091, 0x6000, 0x700c, 0x8001,
+	0x700e, 0x1530, 0x2001, 0x013c, 0x2004, 0x9005, 0x190c, 0x8696,
+	0x2001, 0x1869, 0x2004, 0xd0c4, 0x0158, 0x3a00, 0xd08c, 0x1140,
+	0x20d1, 0x0000, 0x20d1, 0x0001, 0x20d1, 0x0000, 0x080c, 0x0dd5,
+	0x700f, 0x0361, 0x7007, 0x0001, 0x0126, 0x2091, 0x8000, 0x7040,
+	0x900d, 0x0148, 0x8109, 0x7142, 0x1130, 0x7044, 0x080f, 0x0018,
+	0x0126, 0x2091, 0x8000, 0x7024, 0x900d, 0x0188, 0x7020, 0x8001,
+	0x7022, 0x1168, 0x7023, 0x0009, 0x8109, 0x7126, 0x9186, 0x03e8,
+	0x1110, 0x7028, 0x080f, 0x81ff, 0x1110, 0x7028, 0x080f, 0x7030,
+	0x900d, 0x0180, 0x702c, 0x8001, 0x702e, 0x1160, 0x702f, 0x0009,
+	0x8109, 0x7132, 0x0128, 0x9184, 0x007f, 0x090c, 0xa50e, 0x0010,
+	0x7034, 0x080f, 0x703c, 0x9005, 0x0118, 0x0310, 0x8001, 0x703e,
+	0x704c, 0x900d, 0x0168, 0x7048, 0x8001, 0x704a, 0x1148, 0x704b,
+	0x0009, 0x8109, 0x714e, 0x1120, 0x7150, 0x714e, 0x7058, 0x080f,
+	0x7018, 0x900d, 0x01d8, 0x0016, 0x7070, 0x900d, 0x0158, 0x706c,
+	0x8001, 0x706e, 0x1138, 0x706f, 0x0009, 0x8109, 0x7172, 0x1110,
+	0x7074, 0x080f, 0x001e, 0x7008, 0x8001, 0x700a, 0x1138, 0x700b,
+	0x0009, 0x8109, 0x711a, 0x1110, 0x701c, 0x080f, 0x012e, 0x7004,
+	0x0002, 0x85c7, 0x85c8, 0x85e4, 0x00e6, 0x2071, 0x19f9, 0x7018,
+	0x9005, 0x1120, 0x711a, 0x721e, 0x700b, 0x0009, 0x00ee, 0x0005,
+	0x00e6, 0x0006, 0x2071, 0x19f9, 0x701c, 0x9206, 0x1120, 0x701a,
+	0x701e, 0x7072, 0x7076, 0x000e, 0x00ee, 0x0005, 0x00e6, 0x2071,
+	0x19f9, 0xb888, 0x9102, 0x0208, 0xb98a, 0x00ee, 0x0005, 0x0005,
+	0x00b6, 0x7110, 0x080c, 0x6699, 0x1168, 0xb888, 0x8001, 0x0250,
+	0xb88a, 0x1140, 0x0126, 0x2091, 0x8000, 0x0016, 0x080c, 0x9763,
+	0x001e, 0x012e, 0x8108, 0x9182, 0x0800, 0x0218, 0x900e, 0x7007,
+	0x0002, 0x7112, 0x00be, 0x0005, 0x7014, 0x2060, 0x0126, 0x2091,
+	0x8000, 0x6040, 0x9005, 0x0128, 0x8001, 0x6042, 0x1110, 0x080c,
+	0xcf93, 0x6018, 0x9005, 0x0558, 0x8001, 0x601a, 0x1540, 0x6120,
+	0x9186, 0x0003, 0x0148, 0x9186, 0x0006, 0x0130, 0x9186, 0x0009,
+	0x11e0, 0x611c, 0xd1c4, 0x1100, 0x080c, 0xcc86, 0x01b0, 0x6014,
+	0x2048, 0xa884, 0x908a, 0x199a, 0x0280, 0x9082, 0x1999, 0xa886,
+	0x908a, 0x199a, 0x0210, 0x2001, 0x1999, 0x8003, 0x800b, 0x810b,
+	0x9108, 0x611a, 0xa87c, 0xd0e4, 0x0110, 0x080c, 0xc972, 0x012e,
+	0x9c88, 0x0018, 0x7116, 0x2001, 0x181a, 0x2004, 0x9102, 0x0220,
+	0x7017, 0x1cd0, 0x7007, 0x0000, 0x0005, 0x00e6, 0x2071, 0x19f9,
+	0x7027, 0x07d0, 0x7023, 0x0009, 0x00ee, 0x0005, 0x2001, 0x1a02,
+	0x2003, 0x0000, 0x0005, 0x00e6, 0x2071, 0x19f9, 0x7132, 0x702f,
+	0x0009, 0x00ee, 0x0005, 0x2011, 0x1a05, 0x2013, 0x0000, 0x0005,
+	0x00e6, 0x2071, 0x19f9, 0x711a, 0x721e, 0x700b, 0x0009, 0x00ee,
+	0x0005, 0x0086, 0x0026, 0x7054, 0x8000, 0x7056, 0x2001, 0x1a07,
+	0x2044, 0xa06c, 0x9086, 0x0000, 0x0150, 0x7068, 0xa09a, 0x7064,
+	0xa096, 0x7060, 0xa092, 0x705c, 0xa08e, 0x080c, 0x10e9, 0x002e,
+	0x008e, 0x0005, 0x0006, 0x0016, 0x0096, 0x00a6, 0x00b6, 0x00c6,
+	0x00d6, 0x00e6, 0x00f6, 0x0156, 0x080c, 0x8510, 0x015e, 0x00fe,
+	0x00ee, 0x00de, 0x00ce, 0x00be, 0x00ae, 0x009e, 0x001e, 0x000e,
+	0x0005, 0x00e6, 0x2071, 0x19f9, 0x7172, 0x7276, 0x706f, 0x0009,
+	0x00ee, 0x0005, 0x00e6, 0x0006, 0x2071, 0x19f9, 0x7074, 0x9206,
+	0x1110, 0x7072, 0x7076, 0x000e, 0x00ee, 0x0005, 0x0016, 0x00c6,
+	0x2009, 0xfff4, 0x210d, 0x2061, 0x0100, 0x60f0, 0x9100, 0x60f3,
+	0x0000, 0x2009, 0xfff4, 0x200f, 0x1220, 0x8108, 0x2105, 0x8000,
+	0x200f, 0x00ce, 0x001e, 0x0005, 0x00c6, 0x2061, 0x1a70, 0x00ce,
+	0x0005, 0x9184, 0x000f, 0x8003, 0x8003, 0x8003, 0x9080, 0x1a70,
+	0x2060, 0x0005, 0xa884, 0x908a, 0x199a, 0x1638, 0x9005, 0x1150,
+	0x00c6, 0x2061, 0x1a70, 0x6014, 0x00ce, 0x9005, 0x1130, 0x2001,
+	0x001e, 0x0018, 0x908e, 0xffff, 0x01b0, 0x8003, 0x800b, 0x810b,
+	0x9108, 0x611a, 0xa87c, 0x908c, 0x00c0, 0x918e, 0x00c0, 0x0904,
+	0x8744, 0xd0b4, 0x1168, 0xd0bc, 0x1904, 0x871d, 0x2009, 0x0006,
+	0x080c, 0x8771, 0x0005, 0x900e, 0x0c60, 0x2001, 0x1999, 0x08b0,
+	0xd0fc, 0x0160, 0x908c, 0x0003, 0x0120, 0x918e, 0x0003, 0x1904,
+	0x876b, 0x908c, 0x2020, 0x918e, 0x2020, 0x01a8, 0x6024, 0xd0d4,
+	0x11e8, 0x2009, 0x1869, 0x2104, 0xd084, 0x1138, 0x87ff, 0x1120,
+	0x2009, 0x0043, 0x0804, 0xafbe, 0x0005, 0x87ff, 0x1de8, 0x2009,
+	0x0042, 0x0804, 0xafbe, 0x6110, 0x00b6, 0x2158, 0xb900, 0x00be,
+	0xd1ac, 0x0d20, 0x6024, 0xc0cd, 0x6026, 0x0c00, 0xc0d4, 0x6026,
+	0xa890, 0x602e, 0xa88c, 0x6032, 0x08e0, 0xd0fc, 0x0160, 0x908c,
+	0x0003, 0x0120, 0x918e, 0x0003, 0x1904, 0x876b, 0x908c, 0x2020,
+	0x918e, 0x2020, 0x0170, 0x0076, 0x00f6, 0x2c78, 0x080c, 0x1754,
+	0x00fe, 0x007e, 0x87ff, 0x1120, 0x2009, 0x0042, 0x080c, 0xafbe,
+	0x0005, 0x6110, 0x00b6, 0x2158, 0xb900, 0x00be, 0xd1ac, 0x0d58,
+	0x6124, 0xc1cd, 0x6126, 0x0c38, 0xd0fc, 0x0188, 0x908c, 0x2020,
+	0x918e, 0x2020, 0x01a8, 0x9084, 0x0003, 0x908e, 0x0002, 0x0148,
+	0x87ff, 0x1120, 0x2009, 0x0041, 0x080c, 0xafbe, 0x0005, 0x00b9,
+	0x0ce8, 0x87ff, 0x1dd8, 0x2009, 0x0043, 0x080c, 0xafbe, 0x0cb0,
+	0x6110, 0x00b6, 0x2158, 0xb900, 0x00be, 0xd1ac, 0x0d20, 0x6124,
+	0xc1cd, 0x6126, 0x0c00, 0x2009, 0x0004, 0x0019, 0x0005, 0x2009,
+	0x0001, 0x0096, 0x080c, 0xcc86, 0x0518, 0x6014, 0x2048, 0xa982,
+	0xa800, 0x6016, 0x9186, 0x0001, 0x1188, 0xa97c, 0x918c, 0x8100,
+	0x918e, 0x8100, 0x1158, 0x00c6, 0x2061, 0x1a70, 0x6200, 0xd28c,
+	0x1120, 0x6204, 0x8210, 0x0208, 0x6206, 0x00ce, 0x080c, 0x6b52,
+	0x6014, 0x904d, 0x0076, 0x2039, 0x0000, 0x190c, 0x86ba, 0x007e,
+	0x009e, 0x0005, 0x0156, 0x00c6, 0x2061, 0x1a70, 0x6000, 0x81ff,
+	0x0110, 0x9205, 0x0008, 0x9204, 0x6002, 0x00ce, 0x015e, 0x0005,
+	0x6800, 0xd08c, 0x1138, 0x6808, 0x9005, 0x0120, 0x8001, 0x680a,
+	0x9085, 0x0001, 0x0005, 0x2071, 0x1923, 0x7003, 0x0006, 0x7007,
+	0x0000, 0x700f, 0x0000, 0x7013, 0x0001, 0x080c, 0x1018, 0x090c,
+	0x0dd5, 0xa867, 0x0006, 0xa86b, 0x0001, 0xa8ab, 0xdcb0, 0xa89f,
+	0x0000, 0x2900, 0x702e, 0x7033, 0x0000, 0x0005, 0x0096, 0x00e6,
+	0x2071, 0x1923, 0x702c, 0x2048, 0x6a2c, 0x721e, 0x6b30, 0x7322,
+	0x6834, 0x7026, 0xa896, 0x6838, 0x702a, 0xa89a, 0x6824, 0x7016,
+	0x683c, 0x701a, 0x2009, 0x0028, 0x200a, 0x9005, 0x0148, 0x900e,
+	0x9188, 0x000c, 0x8001, 0x1de0, 0x2100, 0x9210, 0x1208, 0x8318,
+	0xaa8e, 0xab92, 0x7010, 0xd084, 0x0168, 0xc084, 0x7007, 0x0001,
+	0x700f, 0x0000, 0x0006, 0x2009, 0x1aca, 0x2104, 0x9082, 0x0007,
+	0x200a, 0x000e, 0xc095, 0x7012, 0x2008, 0x2001, 0x003b, 0x080c,
+	0x15fd, 0x9006, 0x2071, 0x193c, 0x7002, 0x7006, 0x702a, 0x00ee,
+	0x009e, 0x0005, 0x2009, 0x1aca, 0x2104, 0x9080, 0x0007, 0x200a,
+	0x0005, 0x00e6, 0x0126, 0x0156, 0x2091, 0x8000, 0x2071, 0x1800,
+	0x7154, 0x2001, 0x0008, 0x910a, 0x0638, 0x2001, 0x187d, 0x20ac,
+	0x9006, 0x9080, 0x0008, 0x1f04, 0x8829, 0x71c0, 0x9102, 0x02e0,
+	0x2071, 0x1877, 0x20a9, 0x0007, 0x00c6, 0x080c, 0xaeed, 0x6023,
+	0x0009, 0x6003, 0x0004, 0x601f, 0x0101, 0x0089, 0x0126, 0x2091,
+	0x8000, 0x080c, 0x89a7, 0x012e, 0x1f04, 0x8835, 0x9006, 0x00ce,
+	0x015e, 0x012e, 0x00ee, 0x0005, 0x9085, 0x0001, 0x0cc8, 0x00e6,
+	0x00b6, 0x0096, 0x0086, 0x0056, 0x0046, 0x0026, 0x7118, 0x720c,
+	0x7620, 0x7004, 0xd084, 0x1128, 0x2021, 0x0024, 0x2029, 0x0002,
+	0x0020, 0x2021, 0x002c, 0x2029, 0x000a, 0x080c, 0x0fff, 0x090c,
+	0x0dd5, 0x2900, 0x6016, 0x2058, 0xac66, 0x9006, 0xa802, 0xa806,
+	0xa86a, 0xa87a, 0xa8aa, 0xa887, 0x0005, 0xa87f, 0x0020, 0x7008,
+	0xa89a, 0x7010, 0xa89e, 0xae8a, 0xa8af, 0xffff, 0xa8b3, 0x0000,
+	0x8109, 0x0160, 0x080c, 0x0fff, 0x090c, 0x0dd5, 0xad66, 0x2b00,
+	0xa802, 0x2900, 0xb806, 0x2058, 0x8109, 0x1da0, 0x002e, 0x004e,
+	0x005e, 0x008e, 0x009e, 0x00be, 0x00ee, 0x0005, 0x2079, 0x0000,
+	0x2071, 0x1923, 0x7004, 0x004b, 0x700c, 0x0002, 0x88a1, 0x889a,
+	0x889a, 0x0005, 0x88ab, 0x8901, 0x8901, 0x8901, 0x8902, 0x8913,
+	0x8913, 0x700c, 0x0cba, 0x0126, 0x2091, 0x8000, 0x78a0, 0x79a0,
+	0x9106, 0x1904, 0x88f3, 0x7814, 0xd0bc, 0x1904, 0x88fc, 0x012e,
+	0x7018, 0x910a, 0x1128, 0x7030, 0x9005, 0x1904, 0x8945, 0x0005,
 	0x1210, 0x7114, 0x910a, 0x9192, 0x000a, 0x0210, 0x2009, 0x000a,
 	0x2001, 0x1888, 0x2014, 0x2001, 0x1935, 0x2004, 0x9100, 0x9202,
-	0x0e48, 0x080c, 0x89dd, 0x2200, 0x9102, 0x0208, 0x2208, 0x0096,
-	0x702c, 0x2048, 0xa873, 0x0001, 0xa976, 0x080c, 0x8ae6, 0x2100,
+	0x0e50, 0x080c, 0x8a9b, 0x2200, 0x9102, 0x0208, 0x2208, 0x0096,
+	0x702c, 0x2048, 0xa873, 0x0001, 0xa976, 0x080c, 0x8ba4, 0x2100,
 	0xa87e, 0xa86f, 0x0000, 0x009e, 0x0126, 0x2091, 0x8000, 0x2009,
 	0x1a17, 0x2104, 0xc085, 0x200a, 0x700f, 0x0002, 0x012e, 0x080c,
-	0x1108, 0x1de8, 0x0005, 0x2001, 0x0005, 0x2004, 0xd0bc, 0x0130,
-	0x2011, 0x0004, 0x2204, 0xc0c5, 0x2012, 0x0ca8, 0x012e, 0x0005,
-	0x0005, 0x700c, 0x0002, 0x8856, 0x8859, 0x8858, 0x080c, 0x87ed,
-	0x0005, 0x8001, 0x700e, 0x0096, 0x702c, 0x2048, 0xa974, 0x009e,
-	0x0011, 0x0ca0, 0x0005, 0x0096, 0x702c, 0x2048, 0x7018, 0x9100,
-	0x7214, 0x921a, 0x1130, 0x701c, 0xa88e, 0x7020, 0xa892, 0x9006,
-	0x0068, 0x0006, 0x080c, 0x8ae6, 0x2100, 0xaa8c, 0x9210, 0xaa8e,
-	0x1220, 0xa890, 0x9081, 0x0000, 0xa892, 0x000e, 0x009e, 0x2f08,
-	0x9188, 0x0028, 0x200a, 0x701a, 0x0005, 0x00e6, 0x2071, 0x1923,
-	0x700c, 0x0002, 0x888f, 0x888f, 0x888d, 0x700f, 0x0001, 0x00ee,
-	0x0005, 0x0126, 0x2091, 0x8000, 0x7030, 0x9005, 0x0508, 0x2078,
-	0x7814, 0x2048, 0xae88, 0x00b6, 0x2059, 0x0000, 0x080c, 0x88fc,
-	0x00be, 0x01b0, 0x00e6, 0x2071, 0x193c, 0x080c, 0x8943, 0x00ee,
-	0x0178, 0x0096, 0x080c, 0x1018, 0x2900, 0x009e, 0x0148, 0xa8aa,
-	0x04b9, 0x0041, 0x2001, 0x1946, 0x2003, 0x0000, 0x012e, 0x08c8,
-	0x012e, 0x0005, 0x00d6, 0x00c6, 0x0086, 0x00a6, 0x2940, 0x2650,
-	0x2600, 0x9005, 0x0180, 0xa864, 0x9084, 0x000f, 0x2068, 0x9d88,
-	0x209d, 0x2165, 0x0056, 0x2029, 0x0000, 0x080c, 0x8a6b, 0x080c,
-	0x2055, 0x1dd8, 0x005e, 0x00ae, 0x2001, 0x187f, 0x2004, 0xa88a,
-	0x080c, 0x1727, 0x781f, 0x0101, 0x7813, 0x0000, 0x0126, 0x2091,
-	0x8000, 0x080c, 0x8952, 0x012e, 0x008e, 0x00ce, 0x00de, 0x0005,
-	0x7030, 0x9005, 0x0138, 0x2078, 0x780c, 0x7032, 0x2001, 0x1946,
-	0x2003, 0x0001, 0x0005, 0x00e6, 0x2071, 0x1923, 0x7030, 0x600e,
-	0x2c00, 0x7032, 0x00ee, 0x0005, 0x00d6, 0x00c6, 0x0026, 0x9b80,
-	0x8bc5, 0x2005, 0x906d, 0x090c, 0x0dd5, 0x9b80, 0x8bbd, 0x2005,
-	0x9065, 0x090c, 0x0dd5, 0x6114, 0x2600, 0x9102, 0x0248, 0x6828,
-	0x9102, 0x02f0, 0x9085, 0x0001, 0x002e, 0x00ce, 0x00de, 0x0005,
-	0x6804, 0xd094, 0x0148, 0x6854, 0xd084, 0x1178, 0xc085, 0x6856,
-	0x2011, 0x8026, 0x080c, 0x4b1e, 0x684c, 0x0096, 0x904d, 0x090c,
-	0x0dd5, 0xa804, 0x8000, 0xa806, 0x009e, 0x9006, 0x2030, 0x0c20,
-	0x6854, 0xd08c, 0x1d08, 0xc08d, 0x6856, 0x2011, 0x8025, 0x080c,
-	0x4b1e, 0x684c, 0x0096, 0x904d, 0x090c, 0x0dd5, 0xa800, 0x8000,
-	0xa802, 0x009e, 0x0888, 0x7000, 0x2019, 0x0008, 0x8319, 0x7104,
-	0x9102, 0x1118, 0x2300, 0x9005, 0x0020, 0x0210, 0x9302, 0x0008,
-	0x8002, 0x0005, 0x00d6, 0x7814, 0x9005, 0x090c, 0x0dd5, 0x781c,
-	0x9084, 0x0101, 0x9086, 0x0101, 0x190c, 0x0dd5, 0x2069, 0x193c,
-	0x6804, 0x9080, 0x193e, 0x2f08, 0x2102, 0x6904, 0x8108, 0x9182,
-	0x0008, 0x0208, 0x900e, 0x6906, 0x9180, 0x193e, 0x2003, 0x0000,
-	0x00de, 0x0005, 0x0096, 0x00c6, 0x2060, 0x6014, 0x2048, 0xa8a8,
-	0x0096, 0x2048, 0x9005, 0x190c, 0x1031, 0x009e, 0xa8ab, 0x0000,
-	0x080c, 0x0fb1, 0x080c, 0xae5f, 0x00ce, 0x009e, 0x0005, 0x6020,
-	0x9086, 0x0009, 0x1128, 0x601c, 0xd0c4, 0x0110, 0x9006, 0x0005,
-	0x9085, 0x0001, 0x0005, 0x6000, 0x9086, 0x0000, 0x0178, 0x6010,
-	0x9005, 0x0150, 0x00b6, 0x2058, 0x080c, 0x8cfa, 0x00be, 0x6013,
-	0x0000, 0x601b, 0x0000, 0x0010, 0x2c00, 0x0861, 0x0005, 0x2009,
-	0x1927, 0x210c, 0xd194, 0x0005, 0x00e6, 0x2071, 0x1923, 0x7110,
-	0xc194, 0xd19c, 0x1118, 0xc185, 0x7007, 0x0000, 0x7112, 0x2001,
-	0x003b, 0x080c, 0x15f0, 0x00ee, 0x0005, 0x0096, 0x00d6, 0x9006,
-	0x7006, 0x700e, 0x701a, 0x701e, 0x7022, 0x7016, 0x702a, 0x7026,
-	0x702f, 0x0000, 0x080c, 0x8b45, 0x0170, 0x080c, 0x8b7a, 0x0158,
-	0x2900, 0x7002, 0x700a, 0x701a, 0x7013, 0x0001, 0x701f, 0x000a,
-	0x00de, 0x009e, 0x0005, 0x900e, 0x0cd8, 0x00e6, 0x0096, 0x0086,
-	0x00d6, 0x00c6, 0x2071, 0x1930, 0x721c, 0x2100, 0x9202, 0x1618,
-	0x080c, 0x8b7a, 0x090c, 0x0dd5, 0x7018, 0x9005, 0x1160, 0x2900,
-	0x7002, 0x700a, 0x701a, 0x9006, 0x7006, 0x700e, 0xa806, 0xa802,
-	0x7012, 0x701e, 0x0038, 0x2040, 0xa806, 0x2900, 0xa002, 0x701a,
-	0xa803, 0x0000, 0x7010, 0x8000, 0x7012, 0x701c, 0x9080, 0x000a,
-	0x701e, 0x721c, 0x08d0, 0x721c, 0x00ce, 0x00de, 0x008e, 0x009e,
-	0x00ee, 0x0005, 0x0096, 0x0156, 0x0136, 0x0146, 0x00e6, 0x0126,
-	0x2091, 0x8000, 0x2071, 0x1930, 0x7300, 0x831f, 0x831e, 0x831e,
-	0x9384, 0x003f, 0x20e8, 0x939c, 0xffc0, 0x9398, 0x0003, 0x7104,
-	0x080c, 0x8ae6, 0x810c, 0x2100, 0x9318, 0x8003, 0x2228, 0x2021,
-	0x0078, 0x9402, 0x9532, 0x0208, 0x2028, 0x2500, 0x8004, 0x20a8,
-	0x23a0, 0xa001, 0xa001, 0x4005, 0x2508, 0x080c, 0x8aef, 0x2130,
-	0x7014, 0x9600, 0x7016, 0x2600, 0x711c, 0x9102, 0x701e, 0x7004,
-	0x9600, 0x2008, 0x9082, 0x000a, 0x1190, 0x7000, 0x2048, 0xa800,
-	0x9005, 0x1148, 0x2009, 0x0001, 0x0026, 0x080c, 0x89dd, 0x002e,
-	0x7000, 0x2048, 0xa800, 0x7002, 0x7007, 0x0000, 0x0008, 0x7106,
-	0x2500, 0x9212, 0x1904, 0x8a1c, 0x012e, 0x00ee, 0x014e, 0x013e,
-	0x015e, 0x009e, 0x0005, 0x0016, 0x0026, 0x00e6, 0x0126, 0x2091,
-	0x8000, 0x9580, 0x8bbd, 0x2005, 0x9075, 0x090c, 0x0dd5, 0x080c,
-	0x8ac1, 0x012e, 0x9580, 0x8bb9, 0x2005, 0x9075, 0x090c, 0x0dd5,
-	0x0156, 0x0136, 0x01c6, 0x0146, 0x01d6, 0x831f, 0x831e, 0x831e,
-	0x9384, 0x003f, 0x20e0, 0x9384, 0xffc0, 0x9100, 0x2098, 0xa860,
-	0x20e8, 0xa95c, 0x2c05, 0x9100, 0x20a0, 0x20a9, 0x0002, 0x4003,
-	0x2e0c, 0x2d00, 0x0002, 0x8aab, 0x8aab, 0x8aad, 0x8aab, 0x8aad,
-	0x8aab, 0x8aab, 0x8aab, 0x8aab, 0x8aab, 0x8ab3, 0x8aab, 0x8ab3,
-	0x8aab, 0x8aab, 0x8aab, 0x080c, 0x0dd5, 0x4104, 0x20a9, 0x0002,
-	0x4002, 0x4003, 0x0028, 0x20a9, 0x0002, 0x4003, 0x4104, 0x4003,
-	0x01de, 0x014e, 0x01ce, 0x013e, 0x015e, 0x00ee, 0x002e, 0x001e,
-	0x0005, 0x0096, 0x7014, 0x8001, 0x7016, 0x710c, 0x2110, 0x00f1,
-	0x810c, 0x9188, 0x0003, 0x7308, 0x8210, 0x9282, 0x000a, 0x1198,
-	0x7008, 0x2048, 0xa800, 0x9005, 0x0158, 0x0006, 0x080c, 0x8b89,
-	0x009e, 0xa807, 0x0000, 0x2900, 0x700a, 0x7010, 0x8001, 0x7012,
-	0x700f, 0x0000, 0x0008, 0x720e, 0x009e, 0x0005, 0x0006, 0x810b,
-	0x810b, 0x2100, 0x810b, 0x9100, 0x2008, 0x000e, 0x0005, 0x0006,
-	0x0026, 0x2100, 0x9005, 0x0158, 0x9092, 0x000c, 0x0240, 0x900e,
-	0x8108, 0x9082, 0x000c, 0x1de0, 0x002e, 0x000e, 0x0005, 0x900e,
-	0x0cd8, 0x2d00, 0x90b8, 0x0008, 0x690c, 0x6810, 0x2019, 0x0001,
-	0x2031, 0x8b2f, 0x9112, 0x0220, 0x0118, 0x8318, 0x2208, 0x0cd0,
-	0x6808, 0x9005, 0x0108, 0x8318, 0x233a, 0x6804, 0xd084, 0x2300,
-	0x2021, 0x0001, 0x1150, 0x9082, 0x0003, 0x0967, 0x0a67, 0x8420,
-	0x9082, 0x0007, 0x0967, 0x0a67, 0x0cd0, 0x9082, 0x0002, 0x0967,
-	0x0a67, 0x8420, 0x9082, 0x0005, 0x0967, 0x0a67, 0x0cd0, 0x6c1a,
-	0x2d00, 0x90b8, 0x0007, 0x00e6, 0x2071, 0x1800, 0x7128, 0x6810,
-	0x2019, 0x0001, 0x910a, 0x0118, 0x0210, 0x8318, 0x0cd8, 0x2031,
-	0x8b42, 0x0870, 0x6c16, 0x00ee, 0x0005, 0x0096, 0x0046, 0x0126,
-	0x2091, 0x8000, 0x2b00, 0x9080, 0x8bc1, 0x2005, 0x9005, 0x090c,
-	0x0dd5, 0x2004, 0x90a0, 0x000a, 0x080c, 0x1018, 0x01d0, 0x2900,
-	0x7026, 0xa803, 0x0000, 0xa807, 0x0000, 0x080c, 0x1018, 0x0188,
-	0x7024, 0xa802, 0xa807, 0x0000, 0x2900, 0x7026, 0x94a2, 0x000a,
-	0x0110, 0x0208, 0x0c90, 0x9085, 0x0001, 0x012e, 0x004e, 0x009e,
-	0x0005, 0x7024, 0x9005, 0x0dc8, 0x2048, 0xac00, 0x080c, 0x1031,
-	0x2400, 0x0cc0, 0x0126, 0x2091, 0x8000, 0x7024, 0x2048, 0x9005,
-	0x0130, 0xa800, 0x7026, 0xa803, 0x0000, 0xa807, 0x0000, 0x012e,
-	0x0005, 0x0126, 0x2091, 0x8000, 0x7024, 0xa802, 0x2900, 0x7026,
-	0x012e, 0x0005, 0x0096, 0x9e80, 0x0009, 0x2004, 0x9005, 0x0138,
-	0x2048, 0xa800, 0x0006, 0x080c, 0x1031, 0x000e, 0x0cb8, 0x009e,
-	0x0005, 0x0096, 0x7008, 0x9005, 0x0138, 0x2048, 0xa800, 0x0006,
-	0x080c, 0x1031, 0x000e, 0x0cb8, 0x9006, 0x7002, 0x700a, 0x7006,
-	0x700e, 0x701a, 0x701e, 0x7022, 0x702a, 0x7026, 0x702e, 0x009e,
-	0x0005, 0x1a63, 0x0000, 0x0000, 0x0000, 0x1930, 0x0000, 0x0000,
-	0x0000, 0x1888, 0x0000, 0x0000, 0x0000, 0x1877, 0x0000, 0x0000,
-	0x0000, 0x00e6, 0x00c6, 0x00b6, 0x00a6, 0xa8a8, 0x2040, 0x2071,
-	0x1877, 0x080c, 0x8ce5, 0xa067, 0x0023, 0x6010, 0x905d, 0x0904,
-	0x8cba, 0xb814, 0xa06e, 0xb910, 0xa172, 0xb9a0, 0xa176, 0x2001,
-	0x0003, 0xa07e, 0xa834, 0xa082, 0xa07b, 0x0000, 0xa898, 0x9005,
-	0x0118, 0xa078, 0xc085, 0xa07a, 0x2858, 0x2031, 0x0018, 0xa068,
-	0x908a, 0x0019, 0x1a0c, 0x0dd5, 0x2020, 0x2050, 0x2940, 0xa864,
-	0x90bc, 0x00ff, 0x908c, 0x000f, 0x91e0, 0x209d, 0x2c65, 0x9786,
-	0x0024, 0x2c05, 0x1590, 0x908a, 0x0036, 0x1a0c, 0x0dd5, 0x9082,
-	0x001b, 0x0002, 0x8c25, 0x8c25, 0x8c27, 0x8c25, 0x8c25, 0x8c25,
-	0x8c29, 0x8c25, 0x8c25, 0x8c25, 0x8c2b, 0x8c25, 0x8c25, 0x8c25,
-	0x8c2d, 0x8c25, 0x8c25, 0x8c25, 0x8c2f, 0x8c25, 0x8c25, 0x8c25,
-	0x8c31, 0x8c25, 0x8c25, 0x8c25, 0x8c33, 0x080c, 0x0dd5, 0xa180,
-	0x04b8, 0xa190, 0x04a8, 0xa1a0, 0x0498, 0xa1b0, 0x0488, 0xa1c0,
-	0x0478, 0xa1d0, 0x0468, 0xa1e0, 0x0458, 0x908a, 0x0034, 0x1a0c,
-	0x0dd5, 0x9082, 0x001b, 0x0002, 0x8c57, 0x8c55, 0x8c55, 0x8c55,
-	0x8c55, 0x8c55, 0x8c59, 0x8c55, 0x8c55, 0x8c55, 0x8c55, 0x8c55,
-	0x8c5b, 0x8c55, 0x8c55, 0x8c55, 0x8c55, 0x8c55, 0x8c5d, 0x8c55,
-	0x8c55, 0x8c55, 0x8c55, 0x8c55, 0x8c5f, 0x080c, 0x0dd5, 0xa180,
-	0x0038, 0xa198, 0x0028, 0xa1b0, 0x0018, 0xa1c8, 0x0008, 0xa1e0,
-	0x2600, 0x0002, 0x8c7b, 0x8c7d, 0x8c7f, 0x8c81, 0x8c83, 0x8c85,
-	0x8c87, 0x8c89, 0x8c8b, 0x8c8d, 0x8c8f, 0x8c91, 0x8c93, 0x8c95,
-	0x8c97, 0x8c99, 0x8c9b, 0x8c9d, 0x8c9f, 0x8ca1, 0x8ca3, 0x8ca5,
-	0x8ca7, 0x8ca9, 0x8cab, 0x080c, 0x0dd5, 0xb9e2, 0x0468, 0xb9de,
-	0x0458, 0xb9da, 0x0448, 0xb9d6, 0x0438, 0xb9d2, 0x0428, 0xb9ce,
-	0x0418, 0xb9ca, 0x0408, 0xb9c6, 0x00f8, 0xb9c2, 0x00e8, 0xb9be,
-	0x00d8, 0xb9ba, 0x00c8, 0xb9b6, 0x00b8, 0xb9b2, 0x00a8, 0xb9ae,
-	0x0098, 0xb9aa, 0x0088, 0xb9a6, 0x0078, 0xb9a2, 0x0068, 0xb99e,
-	0x0058, 0xb99a, 0x0048, 0xb996, 0x0038, 0xb992, 0x0028, 0xb98e,
-	0x0018, 0xb98a, 0x0008, 0xb986, 0x8631, 0x8421, 0x0130, 0x080c,
-	0x2055, 0x090c, 0x0dd5, 0x0804, 0x8bff, 0x00ae, 0x00be, 0x00ce,
-	0x00ee, 0x0005, 0xa86c, 0xa06e, 0xa870, 0xa072, 0xa077, 0x00ff,
-	0x9006, 0x0804, 0x8be1, 0x0006, 0x0016, 0x00b6, 0x6010, 0x2058,
-	0xb810, 0x9005, 0x01b0, 0x2001, 0x1924, 0x2004, 0x9005, 0x0188,
-	0x2001, 0x1800, 0x2004, 0x9086, 0x0003, 0x1158, 0x0036, 0x0046,
-	0xbba0, 0x2021, 0x0004, 0x2011, 0x8014, 0x080c, 0x4b1e, 0x004e,
-	0x003e, 0x00be, 0x001e, 0x000e, 0x0005, 0x9016, 0x710c, 0xa834,
-	0x910a, 0xa936, 0x7008, 0x9005, 0x0120, 0x8210, 0x910a, 0x0238,
-	0x0130, 0x7010, 0x8210, 0x910a, 0x0210, 0x0108, 0x0cd8, 0xaa8a,
-	0xa26a, 0x0005, 0x00f6, 0x00d6, 0x0036, 0x2079, 0x0300, 0x781b,
-	0x0200, 0x7818, 0xd094, 0x1dd8, 0x781b, 0x0202, 0xa001, 0xa001,
-	0x7818, 0xd094, 0x1da0, 0xb8ac, 0x9005, 0x01b8, 0x2068, 0x2079,
-	0x0000, 0x2c08, 0x911e, 0x1118, 0x680c, 0xb8ae, 0x0060, 0x9106,
-	0x0140, 0x2d00, 0x2078, 0x680c, 0x9005, 0x090c, 0x0dd5, 0x2068,
-	0x0cb0, 0x6b0c, 0x7b0e, 0x600f, 0x0000, 0x2079, 0x0300, 0x781b,
-	0x0200, 0x003e, 0x00de, 0x00fe, 0x0005, 0x00e6, 0x00d6, 0x0096,
-	0x00c6, 0x0036, 0x0126, 0x2091, 0x8000, 0x0156, 0x20a9, 0x01ff,
-	0x2071, 0x0300, 0x701b, 0x0200, 0x7018, 0xd094, 0x0110, 0x1f04,
-	0x8d3a, 0x701b, 0x0202, 0xa001, 0xa001, 0x7018, 0xd094, 0x1d90,
-	0xb8ac, 0x9005, 0x01d0, 0x2060, 0x600c, 0xb8ae, 0x6003, 0x0004,
+	0x1108, 0x1de8, 0x0005, 0x78a0, 0x79a0, 0x9106, 0x0904, 0x88b3,
+	0x080c, 0x8a73, 0x012e, 0x0005, 0x7810, 0xc0c5, 0x7812, 0x0804,
+	0x88b3, 0x0005, 0x700c, 0x0002, 0x8907, 0x890a, 0x8909, 0x080c,
+	0x88a9, 0x0005, 0x8001, 0x700e, 0x0096, 0x702c, 0x2048, 0xa974,
+	0x009e, 0x0011, 0x0ca0, 0x0005, 0x0096, 0x702c, 0x2048, 0x7018,
+	0x9100, 0x7214, 0x921a, 0x1130, 0x701c, 0xa88e, 0x7020, 0xa892,
+	0x9006, 0x0068, 0x0006, 0x080c, 0x8ba4, 0x2100, 0xaa8c, 0x9210,
+	0xaa8e, 0x1220, 0xa890, 0x9081, 0x0000, 0xa892, 0x000e, 0x009e,
+	0x0126, 0x2091, 0x8000, 0x78a2, 0x701a, 0x080c, 0x8a73, 0x012e,
+	0x0005, 0x00e6, 0x2071, 0x1923, 0x700c, 0x0002, 0x8943, 0x8943,
+	0x8941, 0x700f, 0x0001, 0x00ee, 0x0005, 0x0126, 0x2091, 0x8000,
+	0x7030, 0x9005, 0x0508, 0x2078, 0x7814, 0x2048, 0xae88, 0x00b6,
+	0x2059, 0x0000, 0x080c, 0x89b0, 0x00be, 0x01b0, 0x00e6, 0x2071,
+	0x193c, 0x080c, 0x89f7, 0x00ee, 0x0178, 0x0096, 0x080c, 0x1018,
+	0x2900, 0x009e, 0x0148, 0xa8aa, 0x04b9, 0x0041, 0x2001, 0x1946,
+	0x2003, 0x0000, 0x012e, 0x08c8, 0x012e, 0x0005, 0x00d6, 0x00c6,
+	0x0086, 0x00a6, 0x2940, 0x2650, 0x2600, 0x9005, 0x0180, 0xa864,
+	0x9084, 0x000f, 0x2068, 0x9d88, 0x20ce, 0x2165, 0x0056, 0x2029,
+	0x0000, 0x080c, 0x8b29, 0x080c, 0x2086, 0x1dd8, 0x005e, 0x00ae,
+	0x2001, 0x187f, 0x2004, 0xa88a, 0x080c, 0x1754, 0x781f, 0x0101,
+	0x7813, 0x0000, 0x0126, 0x2091, 0x8000, 0x080c, 0x8a06, 0x012e,
+	0x008e, 0x00ce, 0x00de, 0x0005, 0x7030, 0x9005, 0x0138, 0x2078,
+	0x780c, 0x7032, 0x2001, 0x1946, 0x2003, 0x0001, 0x0005, 0x00e6,
+	0x2071, 0x1923, 0x7030, 0x600e, 0x2c00, 0x7032, 0x00ee, 0x0005,
+	0x00d6, 0x00c6, 0x0026, 0x9b80, 0x8c72, 0x2005, 0x906d, 0x090c,
+	0x0dd5, 0x9b80, 0x8c6a, 0x2005, 0x9065, 0x090c, 0x0dd5, 0x6114,
+	0x2600, 0x9102, 0x0248, 0x6828, 0x9102, 0x02f0, 0x9085, 0x0001,
+	0x002e, 0x00ce, 0x00de, 0x0005, 0x6804, 0xd094, 0x0148, 0x6854,
+	0xd084, 0x1178, 0xc085, 0x6856, 0x2011, 0x8026, 0x080c, 0x4b7f,
+	0x684c, 0x0096, 0x904d, 0x090c, 0x0dd5, 0xa804, 0x8000, 0xa806,
+	0x009e, 0x9006, 0x2030, 0x0c20, 0x6854, 0xd08c, 0x1d08, 0xc08d,
+	0x6856, 0x2011, 0x8025, 0x080c, 0x4b7f, 0x684c, 0x0096, 0x904d,
+	0x090c, 0x0dd5, 0xa800, 0x8000, 0xa802, 0x009e, 0x0888, 0x7000,
+	0x2019, 0x0008, 0x8319, 0x7104, 0x9102, 0x1118, 0x2300, 0x9005,
+	0x0020, 0x0210, 0x9302, 0x0008, 0x8002, 0x0005, 0x00d6, 0x7814,
+	0x9005, 0x090c, 0x0dd5, 0x781c, 0x9084, 0x0101, 0x9086, 0x0101,
+	0x190c, 0x0dd5, 0x7827, 0x0000, 0x2069, 0x193c, 0x6804, 0x9080,
+	0x193e, 0x2f08, 0x2102, 0x6904, 0x8108, 0x9182, 0x0008, 0x0208,
+	0x900e, 0x6906, 0x9180, 0x193e, 0x2003, 0x0000, 0x00de, 0x0005,
+	0x0096, 0x00c6, 0x2060, 0x6014, 0x2048, 0xa8a8, 0x0096, 0x2048,
+	0x9005, 0x190c, 0x1031, 0x009e, 0xa8ab, 0x0000, 0x080c, 0x0fb1,
+	0x080c, 0xaf43, 0x00ce, 0x009e, 0x0005, 0x6020, 0x9086, 0x0009,
+	0x1128, 0x601c, 0xd0c4, 0x0110, 0x9006, 0x0005, 0x9085, 0x0001,
+	0x0005, 0x6000, 0x9086, 0x0000, 0x0178, 0x6010, 0x9005, 0x0150,
+	0x00b6, 0x2058, 0x080c, 0x8da7, 0x00be, 0x6013, 0x0000, 0x601b,
+	0x0000, 0x0010, 0x2c00, 0x0861, 0x0005, 0x2009, 0x1927, 0x210c,
+	0xd194, 0x0005, 0x00e6, 0x2071, 0x1923, 0x7110, 0xc194, 0xd19c,
+	0x1118, 0xc185, 0x7007, 0x0000, 0x7112, 0x2001, 0x003b, 0x080c,
+	0x15fd, 0x00ee, 0x0005, 0x7814, 0xd0bc, 0x1108, 0x0005, 0x7810,
+	0xc0c5, 0x7812, 0x0cc0, 0x0096, 0x00d6, 0x9006, 0x7006, 0x700e,
+	0x701a, 0x701e, 0x7022, 0x7016, 0x702a, 0x7026, 0x702f, 0x0000,
+	0x080c, 0x8bf2, 0x0170, 0x080c, 0x8c27, 0x0158, 0x2900, 0x7002,
+	0x700a, 0x701a, 0x7013, 0x0001, 0x701f, 0x000a, 0x00de, 0x009e,
+	0x0005, 0x900e, 0x0cd8, 0x00e6, 0x0096, 0x0086, 0x00d6, 0x00c6,
+	0x2071, 0x1930, 0x721c, 0x2100, 0x9202, 0x1618, 0x080c, 0x8c27,
+	0x090c, 0x0dd5, 0x7018, 0x9005, 0x1160, 0x2900, 0x7002, 0x700a,
+	0x701a, 0x9006, 0x7006, 0x700e, 0xa806, 0xa802, 0x7012, 0x701e,
+	0x0038, 0x2040, 0xa806, 0x2900, 0xa002, 0x701a, 0xa803, 0x0000,
+	0x7010, 0x8000, 0x7012, 0x701c, 0x9080, 0x000a, 0x701e, 0x721c,
+	0x08d0, 0x721c, 0x00ce, 0x00de, 0x008e, 0x009e, 0x00ee, 0x0005,
+	0x0096, 0x0156, 0x0136, 0x0146, 0x00e6, 0x0126, 0x2091, 0x8000,
+	0x2071, 0x1930, 0x7300, 0x831f, 0x831e, 0x831e, 0x9384, 0x003f,
+	0x20e8, 0x939c, 0xffc0, 0x9398, 0x0003, 0x7104, 0x080c, 0x8ba4,
+	0x810c, 0x2100, 0x9318, 0x8003, 0x2228, 0x2021, 0x0078, 0x9402,
+	0x9532, 0x0208, 0x2028, 0x2500, 0x8004, 0x20a8, 0x23a0, 0xa001,
+	0xa001, 0x4005, 0x2508, 0x080c, 0x8bad, 0x2130, 0x7014, 0x9600,
+	0x7016, 0x2600, 0x711c, 0x9102, 0x701e, 0x7004, 0x9600, 0x2008,
+	0x9082, 0x000a, 0x1190, 0x7000, 0x2048, 0xa800, 0x9005, 0x1148,
+	0x2009, 0x0001, 0x0026, 0x080c, 0x8a9b, 0x002e, 0x7000, 0x2048,
+	0xa800, 0x7002, 0x7007, 0x0000, 0x0008, 0x7106, 0x2500, 0x9212,
+	0x1904, 0x8ada, 0x012e, 0x00ee, 0x014e, 0x013e, 0x015e, 0x009e,
+	0x0005, 0x0016, 0x0026, 0x00e6, 0x0126, 0x2091, 0x8000, 0x9580,
+	0x8c6a, 0x2005, 0x9075, 0x090c, 0x0dd5, 0x080c, 0x8b7f, 0x012e,
+	0x9580, 0x8c66, 0x2005, 0x9075, 0x090c, 0x0dd5, 0x0156, 0x0136,
+	0x01c6, 0x0146, 0x01d6, 0x831f, 0x831e, 0x831e, 0x9384, 0x003f,
+	0x20e0, 0x9384, 0xffc0, 0x9100, 0x2098, 0xa860, 0x20e8, 0xa95c,
+	0x2c05, 0x9100, 0x20a0, 0x20a9, 0x0002, 0x4003, 0x2e0c, 0x2d00,
+	0x0002, 0x8b69, 0x8b69, 0x8b6b, 0x8b69, 0x8b6b, 0x8b69, 0x8b69,
+	0x8b69, 0x8b69, 0x8b69, 0x8b71, 0x8b69, 0x8b71, 0x8b69, 0x8b69,
+	0x8b69, 0x080c, 0x0dd5, 0x4104, 0x20a9, 0x0002, 0x4002, 0x4003,
+	0x0028, 0x20a9, 0x0002, 0x4003, 0x4104, 0x4003, 0x01de, 0x014e,
+	0x01ce, 0x013e, 0x015e, 0x00ee, 0x002e, 0x001e, 0x0005, 0x0096,
+	0x7014, 0x8001, 0x7016, 0x710c, 0x2110, 0x00f1, 0x810c, 0x9188,
+	0x0003, 0x7308, 0x8210, 0x9282, 0x000a, 0x1198, 0x7008, 0x2048,
+	0xa800, 0x9005, 0x0158, 0x0006, 0x080c, 0x8c36, 0x009e, 0xa807,
+	0x0000, 0x2900, 0x700a, 0x7010, 0x8001, 0x7012, 0x700f, 0x0000,
+	0x0008, 0x720e, 0x009e, 0x0005, 0x0006, 0x810b, 0x810b, 0x2100,
+	0x810b, 0x9100, 0x2008, 0x000e, 0x0005, 0x0006, 0x0026, 0x2100,
+	0x9005, 0x0158, 0x9092, 0x000c, 0x0240, 0x900e, 0x8108, 0x9082,
+	0x000c, 0x1de0, 0x002e, 0x000e, 0x0005, 0x900e, 0x0cd8, 0x2d00,
+	0x90b8, 0x0008, 0x2031, 0x8bf0, 0x901e, 0x6808, 0x9005, 0x0108,
+	0x8318, 0x690c, 0x910a, 0x0248, 0x0140, 0x8318, 0x6810, 0x9112,
+	0x0220, 0x0118, 0x8318, 0x2208, 0x0cd0, 0x233a, 0x6804, 0xd084,
+	0x2300, 0x2021, 0x0001, 0x1150, 0x9082, 0x0003, 0x0967, 0x0a67,
+	0x8420, 0x9082, 0x0007, 0x0967, 0x0a67, 0x0cd0, 0x9082, 0x0002,
+	0x0967, 0x0a67, 0x8420, 0x9082, 0x0005, 0x0967, 0x0a67, 0x0cd0,
+	0x6c1a, 0x0005, 0x0096, 0x0046, 0x0126, 0x2091, 0x8000, 0x2b00,
+	0x9080, 0x8c6e, 0x2005, 0x9005, 0x090c, 0x0dd5, 0x2004, 0x90a0,
+	0x000a, 0x080c, 0x1018, 0x01d0, 0x2900, 0x7026, 0xa803, 0x0000,
+	0xa807, 0x0000, 0x080c, 0x1018, 0x0188, 0x7024, 0xa802, 0xa807,
+	0x0000, 0x2900, 0x7026, 0x94a2, 0x000a, 0x0110, 0x0208, 0x0c90,
+	0x9085, 0x0001, 0x012e, 0x004e, 0x009e, 0x0005, 0x7024, 0x9005,
+	0x0dc8, 0x2048, 0xac00, 0x080c, 0x1031, 0x2400, 0x0cc0, 0x0126,
+	0x2091, 0x8000, 0x7024, 0x2048, 0x9005, 0x0130, 0xa800, 0x7026,
+	0xa803, 0x0000, 0xa807, 0x0000, 0x012e, 0x0005, 0x0126, 0x2091,
+	0x8000, 0x7024, 0xa802, 0x2900, 0x7026, 0x012e, 0x0005, 0x0096,
+	0x9e80, 0x0009, 0x2004, 0x9005, 0x0138, 0x2048, 0xa800, 0x0006,
+	0x080c, 0x1031, 0x000e, 0x0cb8, 0x009e, 0x0005, 0x0096, 0x7008,
+	0x9005, 0x0138, 0x2048, 0xa800, 0x0006, 0x080c, 0x1031, 0x000e,
+	0x0cb8, 0x9006, 0x7002, 0x700a, 0x7006, 0x700e, 0x701a, 0x701e,
+	0x7022, 0x702a, 0x7026, 0x702e, 0x009e, 0x0005, 0x1a63, 0x0000,
+	0x0000, 0x0000, 0x1930, 0x0000, 0x0000, 0x0000, 0x1888, 0x0000,
+	0x0000, 0x0000, 0x1877, 0x0000, 0x0000, 0x0000, 0x00e6, 0x00c6,
+	0x00b6, 0x00a6, 0xa8a8, 0x2040, 0x2071, 0x1877, 0x080c, 0x8d92,
+	0xa067, 0x0023, 0x6010, 0x905d, 0x0904, 0x8d67, 0xb814, 0xa06e,
+	0xb910, 0xa172, 0xb9a0, 0xa176, 0x2001, 0x0003, 0xa07e, 0xa834,
+	0xa082, 0xa07b, 0x0000, 0xa898, 0x9005, 0x0118, 0xa078, 0xc085,
+	0xa07a, 0x2858, 0x2031, 0x0018, 0xa068, 0x908a, 0x0019, 0x1a0c,
+	0x0dd5, 0x2020, 0x2050, 0x2940, 0xa864, 0x90bc, 0x00ff, 0x908c,
+	0x000f, 0x91e0, 0x20ce, 0x2c65, 0x9786, 0x0024, 0x2c05, 0x1590,
+	0x908a, 0x0036, 0x1a0c, 0x0dd5, 0x9082, 0x001b, 0x0002, 0x8cd2,
+	0x8cd2, 0x8cd4, 0x8cd2, 0x8cd2, 0x8cd2, 0x8cd6, 0x8cd2, 0x8cd2,
+	0x8cd2, 0x8cd8, 0x8cd2, 0x8cd2, 0x8cd2, 0x8cda, 0x8cd2, 0x8cd2,
+	0x8cd2, 0x8cdc, 0x8cd2, 0x8cd2, 0x8cd2, 0x8cde, 0x8cd2, 0x8cd2,
+	0x8cd2, 0x8ce0, 0x080c, 0x0dd5, 0xa180, 0x04b8, 0xa190, 0x04a8,
+	0xa1a0, 0x0498, 0xa1b0, 0x0488, 0xa1c0, 0x0478, 0xa1d0, 0x0468,
+	0xa1e0, 0x0458, 0x908a, 0x0034, 0x1a0c, 0x0dd5, 0x9082, 0x001b,
+	0x0002, 0x8d04, 0x8d02, 0x8d02, 0x8d02, 0x8d02, 0x8d02, 0x8d06,
+	0x8d02, 0x8d02, 0x8d02, 0x8d02, 0x8d02, 0x8d08, 0x8d02, 0x8d02,
+	0x8d02, 0x8d02, 0x8d02, 0x8d0a, 0x8d02, 0x8d02, 0x8d02, 0x8d02,
+	0x8d02, 0x8d0c, 0x080c, 0x0dd5, 0xa180, 0x0038, 0xa198, 0x0028,
+	0xa1b0, 0x0018, 0xa1c8, 0x0008, 0xa1e0, 0x2600, 0x0002, 0x8d28,
+	0x8d2a, 0x8d2c, 0x8d2e, 0x8d30, 0x8d32, 0x8d34, 0x8d36, 0x8d38,
+	0x8d3a, 0x8d3c, 0x8d3e, 0x8d40, 0x8d42, 0x8d44, 0x8d46, 0x8d48,
+	0x8d4a, 0x8d4c, 0x8d4e, 0x8d50, 0x8d52, 0x8d54, 0x8d56, 0x8d58,
+	0x080c, 0x0dd5, 0xb9e2, 0x0468, 0xb9de, 0x0458, 0xb9da, 0x0448,
+	0xb9d6, 0x0438, 0xb9d2, 0x0428, 0xb9ce, 0x0418, 0xb9ca, 0x0408,
+	0xb9c6, 0x00f8, 0xb9c2, 0x00e8, 0xb9be, 0x00d8, 0xb9ba, 0x00c8,
+	0xb9b6, 0x00b8, 0xb9b2, 0x00a8, 0xb9ae, 0x0098, 0xb9aa, 0x0088,
+	0xb9a6, 0x0078, 0xb9a2, 0x0068, 0xb99e, 0x0058, 0xb99a, 0x0048,
+	0xb996, 0x0038, 0xb992, 0x0028, 0xb98e, 0x0018, 0xb98a, 0x0008,
+	0xb986, 0x8631, 0x8421, 0x0130, 0x080c, 0x2086, 0x090c, 0x0dd5,
+	0x0804, 0x8cac, 0x00ae, 0x00be, 0x00ce, 0x00ee, 0x0005, 0xa86c,
+	0xa06e, 0xa870, 0xa072, 0xa077, 0x00ff, 0x9006, 0x0804, 0x8c8e,
+	0x0006, 0x0016, 0x00b6, 0x6010, 0x2058, 0xb810, 0x9005, 0x01b0,
+	0x2001, 0x1924, 0x2004, 0x9005, 0x0188, 0x2001, 0x1800, 0x2004,
+	0x9086, 0x0003, 0x1158, 0x0036, 0x0046, 0xbba0, 0x2021, 0x0004,
+	0x2011, 0x8014, 0x080c, 0x4b7f, 0x004e, 0x003e, 0x00be, 0x001e,
+	0x000e, 0x0005, 0x9016, 0x710c, 0xa834, 0x910a, 0xa936, 0x7008,
+	0x9005, 0x0120, 0x8210, 0x910a, 0x0238, 0x0130, 0x7010, 0x8210,
+	0x910a, 0x0210, 0x0108, 0x0cd8, 0xaa8a, 0xa26a, 0x0005, 0x00f6,
+	0x00d6, 0x0036, 0x2079, 0x0300, 0x781b, 0x0200, 0x7818, 0xd094,
+	0x1dd8, 0x781b, 0x0202, 0xa001, 0xa001, 0x7818, 0xd094, 0x1da0,
+	0xb8ac, 0x9005, 0x01b8, 0x2068, 0x2079, 0x0000, 0x2c08, 0x911e,
+	0x1118, 0x680c, 0xb8ae, 0x0060, 0x9106, 0x0140, 0x2d00, 0x2078,
+	0x680c, 0x9005, 0x090c, 0x0dd5, 0x2068, 0x0cb0, 0x6b0c, 0x7b0e,
+	0x600f, 0x0000, 0x2079, 0x0300, 0x781b, 0x0200, 0x003e, 0x00de,
+	0x00fe, 0x0005, 0x00e6, 0x00d6, 0x0096, 0x00c6, 0x0036, 0x0126,
+	0x2091, 0x8000, 0x0156, 0x20a9, 0x01ff, 0x2071, 0x0300, 0x701b,
+	0x0200, 0x7018, 0xd094, 0x0110, 0x1f04, 0x8de7, 0x701b, 0x0202,
+	0xa001, 0xa001, 0x7018, 0xd094, 0x1d90, 0xb8ac, 0x9005, 0x01e8,
+	0x2060, 0x600c, 0xb8ae, 0x6024, 0xc08d, 0x6026, 0x6003, 0x0004,
 	0x601b, 0x0000, 0x6013, 0x0000, 0x601f, 0x0101, 0x6014, 0x2048,
 	0xa88b, 0x0000, 0xa8a8, 0xa8ab, 0x0000, 0x904d, 0x090c, 0x0dd5,
-	0x080c, 0x1031, 0x080c, 0x88f3, 0x0c18, 0x2071, 0x0300, 0x701b,
+	0x080c, 0x1031, 0x080c, 0x89a7, 0x0c00, 0x2071, 0x0300, 0x701b,
 	0x0200, 0x015e, 0x012e, 0x003e, 0x00ce, 0x009e, 0x00de, 0x00ee,
-	0x0005, 0x00c6, 0x00b6, 0x0016, 0x0006, 0x0156, 0x080c, 0x284b,
-	0x015e, 0x11b0, 0x080c, 0x65b5, 0x190c, 0x0dd5, 0x000e, 0x001e,
-	0xb912, 0xb816, 0x080c, 0xae09, 0x0140, 0x2b00, 0x6012, 0x6023,
-	0x0001, 0x2009, 0x0001, 0x080c, 0xaeda, 0x00be, 0x00ce, 0x0005,
+	0x0005, 0x00c6, 0x00b6, 0x0016, 0x0006, 0x0156, 0x080c, 0x287c,
+	0x015e, 0x11b0, 0x080c, 0x6638, 0x190c, 0x0dd5, 0x000e, 0x001e,
+	0xb912, 0xb816, 0x080c, 0xaeed, 0x0140, 0x2b00, 0x6012, 0x6023,
+	0x0001, 0x2009, 0x0001, 0x080c, 0xafbe, 0x00be, 0x00ce, 0x0005,
 	0x000e, 0x001e, 0x0cd0, 0x0066, 0x6000, 0x90b2, 0x0016, 0x1a0c,
-	0x0dd5, 0x0013, 0x006e, 0x0005, 0x8dac, 0x8dac, 0x8dac, 0x8dae,
-	0x8dff, 0x8dac, 0x8dac, 0x8dac, 0x8e62, 0x8dac, 0x8e9f, 0x8dac,
-	0x8dac, 0x8dac, 0x8dac, 0x8dac, 0x080c, 0x0dd5, 0x9182, 0x0040,
-	0x0002, 0x8dc1, 0x8dc1, 0x8dc1, 0x8dc1, 0x8dc1, 0x8dc1, 0x8dc1,
-	0x8dc1, 0x8dc1, 0x8dc3, 0x8dd8, 0x8dc1, 0x8dc1, 0x8dc1, 0x8dc1,
-	0x8deb, 0x080c, 0x0dd5, 0x0096, 0x080c, 0x9656, 0x080c, 0x97d4,
+	0x0dd5, 0x0013, 0x006e, 0x0005, 0x8e5c, 0x8e5c, 0x8e5c, 0x8e5e,
+	0x8eaf, 0x8e5c, 0x8e5c, 0x8e5c, 0x8f16, 0x8e5c, 0x8f53, 0x8e5c,
+	0x8e5c, 0x8e5c, 0x8e5c, 0x8e5c, 0x080c, 0x0dd5, 0x9182, 0x0040,
+	0x0002, 0x8e71, 0x8e71, 0x8e71, 0x8e71, 0x8e71, 0x8e71, 0x8e71,
+	0x8e71, 0x8e71, 0x8e73, 0x8e88, 0x8e71, 0x8e71, 0x8e71, 0x8e71,
+	0x8e9b, 0x080c, 0x0dd5, 0x0096, 0x080c, 0x9713, 0x080c, 0x9891,
 	0x6114, 0x2148, 0xa87b, 0x0000, 0x6010, 0x00b6, 0x2058, 0xb8bb,
-	0x0500, 0x00be, 0x080c, 0x6a9a, 0x080c, 0xae5f, 0x009e, 0x0005,
-	0x080c, 0x9656, 0x00d6, 0x6114, 0x080c, 0xcb5a, 0x0130, 0x0096,
-	0x6114, 0x2148, 0x080c, 0x6c94, 0x009e, 0x00de, 0x080c, 0xae5f,
-	0x080c, 0x97d4, 0x0005, 0x080c, 0x9656, 0x080c, 0x31cc, 0x6114,
-	0x0096, 0x2148, 0x080c, 0xcb5a, 0x0120, 0xa87b, 0x0029, 0x080c,
-	0x6c94, 0x009e, 0x080c, 0xae5f, 0x080c, 0x97d4, 0x0005, 0x601b,
-	0x0000, 0x9182, 0x0040, 0x0096, 0x0002, 0x8e1a, 0x8e1a, 0x8e1a,
-	0x8e1a, 0x8e1a, 0x8e1a, 0x8e1a, 0x8e1a, 0x8e1c, 0x8e1a, 0x8e1a,
-	0x8e1a, 0x8e5e, 0x8e1a, 0x8e1a, 0x8e1a, 0x8e1a, 0x8e1a, 0x8e1a,
-	0x8e22, 0x8e1a, 0x080c, 0x0dd5, 0x6114, 0x2148, 0xa938, 0x918e,
-	0xffff, 0x05e0, 0x00e6, 0x6114, 0x2148, 0x080c, 0x8bc9, 0x0096,
-	0xa8a8, 0x2048, 0x080c, 0x6a32, 0x009e, 0xa8ab, 0x0000, 0x6010,
-	0x9005, 0x0128, 0x00b6, 0x2058, 0x080c, 0x8cfa, 0x00be, 0xae88,
-	0x00b6, 0x2059, 0x0000, 0x080c, 0x88fc, 0x00be, 0x01e0, 0x2071,
-	0x193c, 0x080c, 0x8943, 0x01b8, 0x9086, 0x0001, 0x1128, 0x2001,
-	0x1946, 0x2004, 0x9005, 0x1178, 0x0096, 0x080c, 0x0fff, 0x2900,
-	0x009e, 0x0148, 0xa8aa, 0x00f6, 0x2c78, 0x080c, 0x88ba, 0x00fe,
-	0x00ee, 0x009e, 0x0005, 0x080c, 0x88f3, 0x0cd0, 0x080c, 0x8f0c,
-	0x009e, 0x0005, 0x9182, 0x0040, 0x0096, 0x0002, 0x8e76, 0x8e76,
-	0x8e76, 0x8e78, 0x8e76, 0x8e76, 0x8e76, 0x8e9d, 0x8e76, 0x8e76,
-	0x8e76, 0x8e76, 0x8e76, 0x8e76, 0x8e76, 0x8e76, 0x080c, 0x0dd5,
-	0x6003, 0x0003, 0x6106, 0x6014, 0x2048, 0xa8ac, 0xa846, 0xa8b0,
-	0xa84a, 0xa837, 0x0000, 0xa83b, 0x0000, 0xa884, 0x9092, 0x199a,
-	0x0210, 0x2001, 0x1999, 0x8003, 0x8013, 0x8213, 0x9210, 0x621a,
-	0x2c10, 0x080c, 0x1bba, 0x080c, 0x915d, 0x0126, 0x2091, 0x8000,
-	0x080c, 0x97d4, 0x012e, 0x009e, 0x0005, 0x080c, 0x0dd5, 0x080c,
-	0x9656, 0x080c, 0x97d4, 0x6114, 0x2148, 0xa87b, 0x0000, 0x6010,
-	0x00b6, 0x2058, 0xb8bb, 0x0500, 0x00be, 0x080c, 0x6c94, 0x080c,
-	0xae5f, 0x009e, 0x0005, 0x6000, 0x908a, 0x0016, 0x1a0c, 0x0dd5,
-	0x0096, 0x0013, 0x009e, 0x0005, 0x8ecc, 0x8ecc, 0x8ecc, 0x8ece,
-	0x8edf, 0x8ecc, 0x8ecc, 0x8ecc, 0x8ecc, 0x8ecc, 0x8ecc, 0x8ecc,
-	0x8ecc, 0x8ecc, 0x8ecc, 0x8ecc, 0x080c, 0x0dd5, 0x080c, 0xa7b7,
-	0x6114, 0x2148, 0xa87b, 0x0006, 0x6010, 0x00b6, 0x2058, 0xb8bb,
-	0x0500, 0x00be, 0x080c, 0x6c94, 0x080c, 0xae5f, 0x0005, 0x0461,
-	0x0005, 0x6000, 0x908a, 0x0016, 0x1a0c, 0x0dd5, 0x0096, 0x0013,
-	0x009e, 0x0005, 0x8efa, 0x8efa, 0x8efa, 0x8efc, 0x8f0c, 0x8efa,
-	0x8efa, 0x8efa, 0x8efa, 0x8efa, 0x8efa, 0x8efa, 0x8efa, 0x8efa,
-	0x8efa, 0x8efa, 0x080c, 0x0dd5, 0x0036, 0x00e6, 0x2071, 0x19e6,
-	0x703c, 0x9c06, 0x1120, 0x2019, 0x0000, 0x080c, 0xa5c8, 0x080c,
-	0xa7b7, 0x00ee, 0x003e, 0x0005, 0x00f6, 0x00e6, 0x601b, 0x0000,
-	0x6014, 0x2048, 0x6010, 0x9005, 0x0128, 0x00b6, 0x2058, 0x080c,
-	0x8cfa, 0x00be, 0x2071, 0x193c, 0x080c, 0x8943, 0x0160, 0x2001,
-	0x187f, 0x2004, 0xa88a, 0x2031, 0x0000, 0x2c78, 0x080c, 0x88ba,
-	0x00ee, 0x00fe, 0x0005, 0x0096, 0xa88b, 0x0000, 0xa8a8, 0x2048,
-	0x080c, 0x1031, 0x009e, 0xa8ab, 0x0000, 0x080c, 0x88f3, 0x0c80,
+	0x0500, 0x00be, 0x080c, 0x6b1d, 0x080c, 0xaf43, 0x009e, 0x0005,
+	0x080c, 0x9713, 0x00d6, 0x6114, 0x080c, 0xcc86, 0x0130, 0x0096,
+	0x6114, 0x2148, 0x080c, 0x6d17, 0x009e, 0x00de, 0x080c, 0xaf43,
+	0x080c, 0x9891, 0x0005, 0x080c, 0x9713, 0x080c, 0x321e, 0x6114,
+	0x0096, 0x2148, 0x080c, 0xcc86, 0x0120, 0xa87b, 0x0029, 0x080c,
+	0x6d17, 0x009e, 0x080c, 0xaf43, 0x080c, 0x9891, 0x0005, 0x601b,
+	0x0000, 0x9182, 0x0040, 0x0096, 0x0002, 0x8eca, 0x8eca, 0x8eca,
+	0x8eca, 0x8eca, 0x8eca, 0x8eca, 0x8eca, 0x8ecc, 0x8eca, 0x8eca,
+	0x8eca, 0x8f12, 0x8eca, 0x8eca, 0x8eca, 0x8eca, 0x8eca, 0x8eca,
+	0x8ed3, 0x8eca, 0x080c, 0x0dd5, 0x6114, 0x2148, 0xa938, 0x918e,
+	0xffff, 0x0904, 0x8f12, 0x6024, 0xd08c, 0x15c0, 0x00e6, 0x6114,
+	0x2148, 0x080c, 0x8c76, 0x0096, 0xa8a8, 0x2048, 0x080c, 0x6ab5,
+	0x009e, 0xa8ab, 0x0000, 0x6010, 0x9005, 0x0128, 0x00b6, 0x2058,
+	0x080c, 0x8da7, 0x00be, 0xae88, 0x00b6, 0x2059, 0x0000, 0x080c,
+	0x89b0, 0x00be, 0x01e0, 0x2071, 0x193c, 0x080c, 0x89f7, 0x01b8,
+	0x9086, 0x0001, 0x1128, 0x2001, 0x1946, 0x2004, 0x9005, 0x1178,
+	0x0096, 0x080c, 0x0fff, 0x2900, 0x009e, 0x0148, 0xa8aa, 0x00f6,
+	0x2c78, 0x080c, 0x896e, 0x00fe, 0x00ee, 0x009e, 0x0005, 0x080c,
+	0x89a7, 0x0cd0, 0x080c, 0x8fc0, 0x009e, 0x0005, 0x9182, 0x0040,
+	0x0096, 0x0002, 0x8f2a, 0x8f2a, 0x8f2a, 0x8f2c, 0x8f2a, 0x8f2a,
+	0x8f2a, 0x8f51, 0x8f2a, 0x8f2a, 0x8f2a, 0x8f2a, 0x8f2a, 0x8f2a,
+	0x8f2a, 0x8f2a, 0x080c, 0x0dd5, 0x6003, 0x0003, 0x6106, 0x6014,
+	0x2048, 0xa8ac, 0xa846, 0xa8b0, 0xa84a, 0xa837, 0x0000, 0xa83b,
+	0x0000, 0xa884, 0x9092, 0x199a, 0x0210, 0x2001, 0x1999, 0x8003,
+	0x8013, 0x8213, 0x9210, 0x621a, 0x2c10, 0x080c, 0x1beb, 0x080c,
+	0x9216, 0x0126, 0x2091, 0x8000, 0x080c, 0x9891, 0x012e, 0x009e,
+	0x0005, 0x080c, 0x0dd5, 0x080c, 0x9713, 0x080c, 0x9891, 0x6114,
+	0x2148, 0xa87b, 0x0000, 0x6010, 0x00b6, 0x2058, 0xb8bb, 0x0500,
+	0x00be, 0x080c, 0x6d17, 0x080c, 0xaf43, 0x009e, 0x0005, 0x6000,
+	0x908a, 0x0016, 0x1a0c, 0x0dd5, 0x0096, 0x0013, 0x009e, 0x0005,
+	0x8f80, 0x8f80, 0x8f80, 0x8f82, 0x8f93, 0x8f80, 0x8f80, 0x8f80,
+	0x8f80, 0x8f80, 0x8f80, 0x8f80, 0x8f80, 0x8f80, 0x8f80, 0x8f80,
+	0x080c, 0x0dd5, 0x080c, 0xa89b, 0x6114, 0x2148, 0xa87b, 0x0006,
+	0x6010, 0x00b6, 0x2058, 0xb8bb, 0x0500, 0x00be, 0x080c, 0x6d17,
+	0x080c, 0xaf43, 0x0005, 0x0461, 0x0005, 0x6000, 0x908a, 0x0016,
+	0x1a0c, 0x0dd5, 0x0096, 0x0013, 0x009e, 0x0005, 0x8fae, 0x8fae,
+	0x8fae, 0x8fb0, 0x8fc0, 0x8fae, 0x8fae, 0x8fae, 0x8fae, 0x8fae,
+	0x8fae, 0x8fae, 0x8fae, 0x8fae, 0x8fae, 0x8fae, 0x080c, 0x0dd5,
+	0x0036, 0x00e6, 0x2071, 0x19e6, 0x703c, 0x9c06, 0x1120, 0x2019,
+	0x0000, 0x080c, 0xa6ac, 0x080c, 0xa89b, 0x00ee, 0x003e, 0x0005,
+	0x6024, 0xd08c, 0x11f0, 0x00f6, 0x00e6, 0x601b, 0x0000, 0x6014,
+	0x2048, 0x6010, 0x9005, 0x0128, 0x00b6, 0x2058, 0x080c, 0x8da7,
+	0x00be, 0x2071, 0x193c, 0x080c, 0x89f7, 0x0160, 0x2001, 0x187f,
+	0x2004, 0xa88a, 0x2031, 0x0000, 0x2c78, 0x080c, 0x896e, 0x00ee,
+	0x00fe, 0x0005, 0x0096, 0xa88b, 0x0000, 0xa8a8, 0x2048, 0x080c,
+	0x1031, 0x009e, 0xa8ab, 0x0000, 0x080c, 0x89a7, 0x0c80, 0x0000,
 	0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-	0x0000, 0x187a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-	0x0126, 0x2091, 0x8000, 0x0036, 0x0046, 0x20a9, 0x0010, 0x9006,
-	0x8004, 0x2019, 0x0100, 0x231c, 0x93a6, 0x0008, 0x1118, 0x8086,
-	0x818e, 0x0020, 0x80f6, 0x3e00, 0x81f6, 0x3e08, 0x1208, 0x9200,
-	0x1f04, 0x8f51, 0x93a6, 0x0008, 0x1118, 0x8086, 0x818e, 0x0020,
-	0x80f6, 0x3e00, 0x81f6, 0x3e08, 0x004e, 0x003e, 0x012e, 0x0005,
-	0x0126, 0x2091, 0x8000, 0x0076, 0x0156, 0x20a9, 0x0010, 0x9005,
-	0x0510, 0x911a, 0x1600, 0x8213, 0x2039, 0x0100, 0x273c, 0x97be,
-	0x0008, 0x1110, 0x818d, 0x0010, 0x81f5, 0x3e08, 0x0228, 0x911a,
-	0x1220, 0x1f04, 0x8f7b, 0x0028, 0x911a, 0x2308, 0x8210, 0x1f04,
-	0x8f7b, 0x0006, 0x3200, 0x9084, 0xefff, 0x2080, 0x000e, 0x015e,
-	0x007e, 0x012e, 0x0005, 0x0006, 0x3200, 0x9085, 0x1000, 0x0ca8,
-	0x0126, 0x2091, 0x2800, 0x2079, 0x19e6, 0x012e, 0x00d6, 0x2069,
-	0x19e6, 0x6803, 0x0005, 0x0156, 0x0146, 0x01d6, 0x20e9, 0x0000,
-	0x2069, 0x0200, 0x080c, 0xab1a, 0x0401, 0x080c, 0xab05, 0x00e9,
-	0x080c, 0xab08, 0x00d1, 0x080c, 0xab0b, 0x00b9, 0x080c, 0xab0e,
-	0x00a1, 0x080c, 0xab11, 0x0089, 0x080c, 0xab14, 0x0071, 0x080c,
-	0xab17, 0x0059, 0x01de, 0x014e, 0x015e, 0x2069, 0x0004, 0x2d04,
-	0x9085, 0x8001, 0x206a, 0x00de, 0x0005, 0x20a9, 0x0020, 0x20a1,
-	0x0240, 0x2001, 0x0000, 0x4004, 0x0005, 0x00c6, 0x6027, 0x0001,
-	0x7804, 0x9084, 0x0007, 0x0002, 0x8fee, 0x9012, 0x9051, 0x8ff4,
-	0x9012, 0x8fee, 0x8fec, 0x8fec, 0x080c, 0x0dd5, 0x080c, 0x857f,
-	0x080c, 0x96a6, 0x00ce, 0x0005, 0x62c0, 0x82ff, 0x1110, 0x00ce,
-	0x0005, 0x2011, 0x5e96, 0x080c, 0x84f9, 0x7828, 0x9092, 0x00c8,
-	0x1228, 0x8000, 0x782a, 0x080c, 0x5ed6, 0x0c88, 0x62c0, 0x080c,
-	0xac56, 0x080c, 0x5e96, 0x7807, 0x0003, 0x7827, 0x0000, 0x782b,
-	0x0000, 0x0c28, 0x080c, 0x857f, 0x6220, 0xd2a4, 0x0160, 0x782b,
-	0x0000, 0x7824, 0x9065, 0x090c, 0x0dd5, 0x2009, 0x0013, 0x080c,
-	0xaeda, 0x00ce, 0x0005, 0x00c6, 0x7824, 0x9065, 0x090c, 0x0dd5,
-	0x7828, 0x9092, 0xc350, 0x12c0, 0x8000, 0x782a, 0x00ce, 0x080c,
-	0x2bb2, 0x0278, 0x00c6, 0x7924, 0x2160, 0x6010, 0x906d, 0x090c,
-	0x0dd5, 0x7807, 0x0000, 0x7827, 0x0000, 0x00ce, 0x080c, 0x96a6,
-	0x0c00, 0x080c, 0xa26b, 0x08e8, 0x2011, 0x0130, 0x2214, 0x080c,
-	0xac56, 0x080c, 0xea39, 0x2009, 0x0014, 0x080c, 0xaeda, 0x00ce,
-	0x0880, 0x2001, 0x1a02, 0x2003, 0x0000, 0x62c0, 0x82ff, 0x1160,
+	0x187a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0126,
+	0x2091, 0x8000, 0x0036, 0x0046, 0x20a9, 0x0010, 0x9006, 0x8004,
+	0x2019, 0x0100, 0x231c, 0x93a6, 0x0008, 0x1118, 0x8086, 0x818e,
+	0x0020, 0x80f6, 0x3e00, 0x81f6, 0x3e08, 0x1208, 0x9200, 0x1f04,
+	0x9008, 0x93a6, 0x0008, 0x1118, 0x8086, 0x818e, 0x0020, 0x80f6,
+	0x3e00, 0x81f6, 0x3e08, 0x004e, 0x003e, 0x012e, 0x0005, 0x0126,
+	0x2091, 0x8000, 0x0076, 0x0156, 0x20a9, 0x0010, 0x9005, 0x0510,
+	0x911a, 0x1600, 0x8213, 0x2039, 0x0100, 0x273c, 0x97be, 0x0008,
+	0x1110, 0x818d, 0x0010, 0x81f5, 0x3e08, 0x0228, 0x911a, 0x1220,
+	0x1f04, 0x9032, 0x0028, 0x911a, 0x2308, 0x8210, 0x1f04, 0x9032,
+	0x0006, 0x3200, 0x9084, 0xefff, 0x2080, 0x000e, 0x015e, 0x007e,
+	0x012e, 0x0005, 0x0006, 0x3200, 0x9085, 0x1000, 0x0ca8, 0x0126,
+	0x2091, 0x2800, 0x2079, 0x19e6, 0x012e, 0x00d6, 0x2069, 0x19e6,
+	0x6803, 0x0005, 0x0156, 0x0146, 0x01d6, 0x20e9, 0x0000, 0x2069,
+	0x0200, 0x080c, 0xabfe, 0x0401, 0x080c, 0xabe9, 0x00e9, 0x080c,
+	0xabec, 0x00d1, 0x080c, 0xabef, 0x00b9, 0x080c, 0xabf2, 0x00a1,
+	0x080c, 0xabf5, 0x0089, 0x080c, 0xabf8, 0x0071, 0x080c, 0xabfb,
+	0x0059, 0x01de, 0x014e, 0x015e, 0x2069, 0x0004, 0x2d04, 0x9085,
+	0x8001, 0x206a, 0x00de, 0x0005, 0x20a9, 0x0020, 0x20a1, 0x0240,
+	0x2001, 0x0000, 0x4004, 0x0005, 0x00c6, 0x6027, 0x0001, 0x7804,
+	0x9084, 0x0007, 0x0002, 0x90a5, 0x90c9, 0x910a, 0x90ab, 0x90c9,
+	0x90a5, 0x90a3, 0x90a3, 0x080c, 0x0dd5, 0x080c, 0x8636, 0x080c,
+	0x9763, 0x00ce, 0x0005, 0x62c0, 0x82ff, 0x1110, 0x00ce, 0x0005,
+	0x2011, 0x5f16, 0x080c, 0x85b0, 0x7828, 0x9092, 0x00c8, 0x1228,
+	0x8000, 0x782a, 0x080c, 0x5f56, 0x0c88, 0x62c0, 0x080c, 0xad3a,
+	0x080c, 0x5f16, 0x7807, 0x0003, 0x7827, 0x0000, 0x782b, 0x0000,
+	0x0c28, 0x080c, 0x8636, 0x6220, 0xd2a4, 0x0170, 0xd2cc, 0x0160,
 	0x782b, 0x0000, 0x7824, 0x9065, 0x090c, 0x0dd5, 0x2009, 0x0013,
-	0x080c, 0xaf2c, 0x00ce, 0x0005, 0x00b6, 0x00c6, 0x00d6, 0x7824,
-	0x9005, 0x090c, 0x0dd5, 0x7828, 0x9092, 0xc350, 0x1648, 0x8000,
-	0x782a, 0x00de, 0x00ce, 0x00be, 0x080c, 0x2bb2, 0x02f0, 0x00b6,
-	0x00c6, 0x00d6, 0x781c, 0x905d, 0x090c, 0x0dd5, 0xb800, 0xc0dc,
-	0xb802, 0x7924, 0x2160, 0x080c, 0xae5f, 0xb93c, 0x81ff, 0x090c,
-	0x0dd5, 0x8109, 0xb93e, 0x7807, 0x0000, 0x7827, 0x0000, 0x00de,
-	0x00ce, 0x00be, 0x080c, 0x96a6, 0x0868, 0x080c, 0xa26b, 0x0850,
-	0x2011, 0x0130, 0x2214, 0x080c, 0xac56, 0x080c, 0xea39, 0x7824,
-	0x9065, 0x2009, 0x0014, 0x080c, 0xaeda, 0x00de, 0x00ce, 0x00be,
-	0x0804, 0x9062, 0x00c6, 0x2001, 0x009b, 0x2004, 0xd0fc, 0x190c,
-	0x1ec1, 0x6024, 0x6027, 0x0002, 0xd0f4, 0x15b8, 0x62c8, 0x60c4,
-	0x9205, 0x1170, 0x783c, 0x9065, 0x0130, 0x2009, 0x0049, 0x080c,
-	0xaeda, 0x00ce, 0x0005, 0x2011, 0x1a05, 0x2013, 0x0000, 0x0cc8,
-	0x793c, 0x81ff, 0x0dc0, 0x7944, 0x9192, 0x7530, 0x1628, 0x8108,
-	0x7946, 0x793c, 0x9188, 0x0008, 0x210c, 0x918e, 0x0006, 0x1138,
-	0x6014, 0x9084, 0x1984, 0x9085, 0x0012, 0x6016, 0x0c10, 0x793c,
-	0x9188, 0x0008, 0x210c, 0x918e, 0x0009, 0x0d90, 0x6014, 0x9084,
-	0x1984, 0x9085, 0x0016, 0x6016, 0x08a0, 0x793c, 0x2160, 0x2009,
-	0x004a, 0x080c, 0xaeda, 0x0868, 0x7848, 0xc085, 0x784a, 0x0848,
-	0x0006, 0x0016, 0x00c6, 0x0126, 0x2091, 0x8000, 0x600f, 0x0000,
-	0x2c08, 0x2061, 0x19e6, 0x6020, 0x8000, 0x6022, 0x6010, 0x9005,
-	0x0148, 0x9080, 0x0003, 0x2102, 0x6112, 0x012e, 0x00ce, 0x001e,
-	0x000e, 0x0005, 0x6116, 0x6112, 0x0cc0, 0x00d6, 0x2069, 0x19e6,
-	0xb800, 0xd0d4, 0x0168, 0x6820, 0x8000, 0x6822, 0x9086, 0x0001,
-	0x1110, 0x2b00, 0x681e, 0x00de, 0x0804, 0x96a6, 0x00de, 0x0005,
-	0xc0d5, 0xb802, 0x6818, 0x9005, 0x0168, 0xb856, 0xb85b, 0x0000,
-	0x0086, 0x0006, 0x2b00, 0x681a, 0x008e, 0xa05a, 0x008e, 0x2069,
-	0x19e6, 0x0c08, 0xb856, 0xb85a, 0x2b00, 0x681a, 0x681e, 0x08d8,
-	0x0006, 0x0016, 0x00c6, 0x0126, 0x2091, 0x8000, 0x600f, 0x0000,
-	0x2c08, 0x2061, 0x19e6, 0x6020, 0x8000, 0x6022, 0x6008, 0x9005,
-	0x0148, 0x9080, 0x0003, 0x2102, 0x610a, 0x012e, 0x00ce, 0x001e,
-	0x000e, 0x0005, 0x610e, 0x610a, 0x0cc0, 0x00c6, 0x600f, 0x0000,
-	0x2c08, 0x2061, 0x19e6, 0x6034, 0x9005, 0x0130, 0x9080, 0x0003,
-	0x2102, 0x6136, 0x00ce, 0x0005, 0x613a, 0x6136, 0x00ce, 0x0005,
-	0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x00b6, 0x0096, 0x0076, 0x0066,
-	0x0056, 0x0036, 0x0026, 0x0016, 0x0006, 0x0126, 0x902e, 0x2071,
-	0x19e6, 0x7638, 0x2660, 0x2678, 0x2091, 0x8000, 0x8cff, 0x0904,
-	0x91ec, 0x6010, 0x2058, 0xb8a0, 0x9206, 0x1904, 0x91e7, 0x87ff,
-	0x0120, 0x6054, 0x9106, 0x1904, 0x91e7, 0x703c, 0x9c06, 0x1178,
-	0x0036, 0x2019, 0x0001, 0x080c, 0xa5c8, 0x7033, 0x0000, 0x9006,
-	0x703e, 0x7042, 0x7046, 0x704a, 0x003e, 0x2029, 0x0001, 0x7038,
-	0x9c36, 0x1110, 0x660c, 0x763a, 0x7034, 0x9c36, 0x1140, 0x2c00,
-	0x9f36, 0x0118, 0x2f00, 0x7036, 0x0010, 0x7037, 0x0000, 0x660c,
-	0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f,
-	0x0000, 0x080c, 0xcb5a, 0x01f0, 0x6014, 0x2048, 0x6020, 0x9086,
-	0x0003, 0x15b8, 0x6004, 0x9086, 0x0040, 0x090c, 0xa7a7, 0xa867,
-	0x0103, 0xab7a, 0xa877, 0x0000, 0x0016, 0x0036, 0x0076, 0x080c,
-	0xce4e, 0x080c, 0xe943, 0x080c, 0x6c94, 0x007e, 0x003e, 0x001e,
-	0x080c, 0xcd43, 0x080c, 0xae90, 0x00ce, 0x0804, 0x9186, 0x2c78,
-	0x600c, 0x2060, 0x0804, 0x9186, 0x85ff, 0x0120, 0x0036, 0x080c,
-	0x97d4, 0x003e, 0x012e, 0x000e, 0x001e, 0x002e, 0x003e, 0x005e,
-	0x006e, 0x007e, 0x009e, 0x00be, 0x00ce, 0x00de, 0x00ee, 0x00fe,
-	0x0005, 0x6020, 0x9086, 0x0006, 0x1158, 0x0016, 0x0036, 0x0076,
-	0x080c, 0xe943, 0x080c, 0xe58c, 0x007e, 0x003e, 0x001e, 0x0890,
-	0x6020, 0x9086, 0x0009, 0x1168, 0xa87b, 0x0006, 0x0016, 0x0036,
-	0x0076, 0x080c, 0x6c94, 0x080c, 0xae5f, 0x007e, 0x003e, 0x001e,
-	0x0818, 0x6020, 0x9086, 0x000a, 0x0904, 0x91d1, 0x0804, 0x91ca,
-	0x0006, 0x0066, 0x0096, 0x00c6, 0x00d6, 0x00f6, 0x9036, 0x0126,
-	0x2091, 0x8000, 0x2079, 0x19e6, 0x7838, 0x9065, 0x0904, 0x927d,
-	0x600c, 0x0006, 0x600f, 0x0000, 0x783c, 0x9c06, 0x1168, 0x0036,
-	0x2019, 0x0001, 0x080c, 0xa5c8, 0x7833, 0x0000, 0x901e, 0x7b3e,
-	0x7b42, 0x7b46, 0x7b4a, 0x003e, 0x080c, 0xcb5a, 0x0548, 0x6014,
-	0x2048, 0x6020, 0x9086, 0x0003, 0x1590, 0x3e08, 0x918e, 0x0002,
-	0x1188, 0x6010, 0x9005, 0x0170, 0x00b6, 0x2058, 0xb800, 0x00be,
-	0xd0bc, 0x0140, 0x6040, 0x9005, 0x11a8, 0x2001, 0x1987, 0x2004,
-	0x6042, 0x0080, 0x6004, 0x9086, 0x0040, 0x090c, 0xa7a7, 0xa867,
-	0x0103, 0xab7a, 0xa877, 0x0000, 0x080c, 0x6c88, 0x080c, 0xcd43,
-	0x080c, 0xae90, 0x000e, 0x0804, 0x9235, 0x7e3a, 0x7e36, 0x012e,
-	0x00fe, 0x00de, 0x00ce, 0x009e, 0x006e, 0x000e, 0x0005, 0x6020,
-	0x9086, 0x0006, 0x1118, 0x080c, 0xe58c, 0x0c50, 0x6020, 0x9086,
-	0x0009, 0x1130, 0xab7a, 0x080c, 0x6c94, 0x080c, 0xae5f, 0x0c10,
-	0x6020, 0x9086, 0x000a, 0x09a8, 0x0868, 0x0016, 0x0026, 0x0086,
-	0x9046, 0x0099, 0x080c, 0x9386, 0x008e, 0x002e, 0x001e, 0x0005,
-	0x00f6, 0x0126, 0x2079, 0x19e6, 0x2091, 0x8000, 0x080c, 0x941d,
-	0x080c, 0x94ab, 0x012e, 0x00fe, 0x0005, 0x00b6, 0x0096, 0x00f6,
-	0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0016, 0x0006, 0x0126, 0x2091,
-	0x8000, 0x2071, 0x19e6, 0x7614, 0x2660, 0x2678, 0x8cff, 0x0904,
-	0x934b, 0x6010, 0x2058, 0xb8a0, 0x9206, 0x1904, 0x9346, 0x88ff,
-	0x0120, 0x6054, 0x9106, 0x1904, 0x9346, 0x7024, 0x9c06, 0x1558,
-	0x2069, 0x0100, 0x6820, 0xd0a4, 0x1508, 0x080c, 0x857f, 0x080c,
-	0xa28f, 0x68c3, 0x0000, 0x080c, 0xa7a7, 0x7027, 0x0000, 0x0036,
-	0x2069, 0x0140, 0x6b04, 0x9384, 0x1000, 0x0138, 0x2001, 0x0100,
-	0x080c, 0x2cfc, 0x9006, 0x080c, 0x2cfc, 0x2069, 0x0100, 0x6824,
-	0xd084, 0x0110, 0x6827, 0x0001, 0x003e, 0x0028, 0x6003, 0x0009,
-	0x630a, 0x0804, 0x9346, 0x7014, 0x9c36, 0x1110, 0x660c, 0x7616,
-	0x7010, 0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00, 0x7012,
-	0x0010, 0x7013, 0x0000, 0x660c, 0x0066, 0x2c00, 0x9f06, 0x0110,
-	0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000, 0x6014, 0x2048, 0x080c,
-	0xcb5a, 0x01e8, 0x6020, 0x9086, 0x0003, 0x1580, 0x080c, 0xcd60,
-	0x1118, 0x080c, 0xb821, 0x0098, 0xa867, 0x0103, 0xab7a, 0xa877,
-	0x0000, 0x0016, 0x0036, 0x0086, 0x080c, 0xce4e, 0x080c, 0xe943,
-	0x080c, 0x6c94, 0x008e, 0x003e, 0x001e, 0x080c, 0xcd43, 0x080c,
-	0xae90, 0x080c, 0xa67d, 0x00ce, 0x0804, 0x92c6, 0x2c78, 0x600c,
-	0x2060, 0x0804, 0x92c6, 0x012e, 0x000e, 0x001e, 0x006e, 0x00ce,
-	0x00de, 0x00ee, 0x00fe, 0x009e, 0x00be, 0x0005, 0x6020, 0x9086,
-	0x0006, 0x1158, 0x0016, 0x0036, 0x0086, 0x080c, 0xe943, 0x080c,
-	0xe58c, 0x008e, 0x003e, 0x001e, 0x08d0, 0x080c, 0xb821, 0x6020,
-	0x9086, 0x0002, 0x1160, 0x6004, 0x0006, 0x9086, 0x0085, 0x000e,
-	0x0904, 0x932c, 0x9086, 0x008b, 0x0904, 0x932c, 0x0840, 0x6020,
-	0x9086, 0x0005, 0x1920, 0x6004, 0x0006, 0x9086, 0x0085, 0x000e,
-	0x09c8, 0x9086, 0x008b, 0x09b0, 0x0804, 0x933f, 0x00b6, 0x00a6,
-	0x0096, 0x00c6, 0x0006, 0x0126, 0x2091, 0x8000, 0x9280, 0x1000,
-	0x2004, 0x905d, 0x0904, 0x9416, 0x00f6, 0x00e6, 0x00d6, 0x0066,
-	0x2071, 0x19e6, 0xbe54, 0x7018, 0x9b06, 0x1108, 0x761a, 0x701c,
-	0x9b06, 0x1130, 0x86ff, 0x1118, 0x7018, 0x701e, 0x0008, 0x761e,
-	0xb858, 0x904d, 0x0108, 0xae56, 0x96d5, 0x0000, 0x0110, 0x2900,
-	0xb05a, 0xb857, 0x0000, 0xb85b, 0x0000, 0xb800, 0xc0d4, 0xc0dc,
-	0xb802, 0x080c, 0x6548, 0x0904, 0x9412, 0x7624, 0x86ff, 0x0904,
-	0x9401, 0x9680, 0x0005, 0x2004, 0x9906, 0x15d8, 0x00d6, 0x2069,
-	0x0100, 0x68c0, 0x9005, 0x0560, 0x080c, 0x857f, 0x080c, 0xa28f,
-	0x68c3, 0x0000, 0x080c, 0xa7a7, 0x7027, 0x0000, 0x0036, 0x2069,
-	0x0140, 0x6b04, 0x9384, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c,
-	0x2cfc, 0x9006, 0x080c, 0x2cfc, 0x2069, 0x0100, 0x6824, 0xd084,
-	0x0110, 0x6827, 0x0001, 0x003e, 0x00de, 0x00c6, 0xb83c, 0x9005,
-	0x0110, 0x8001, 0xb83e, 0x2660, 0x080c, 0xae90, 0x00ce, 0x0048,
-	0x00de, 0x00c6, 0x2660, 0x6003, 0x0009, 0x630a, 0x00ce, 0x0804,
-	0x93b9, 0x89ff, 0x0158, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000,
-	0x080c, 0xce4e, 0x080c, 0xe943, 0x080c, 0x6c94, 0x080c, 0xa67d,
-	0x0804, 0x93b9, 0x006e, 0x00de, 0x00ee, 0x00fe, 0x012e, 0x000e,
-	0x00ce, 0x009e, 0x00ae, 0x00be, 0x0005, 0x0096, 0x0006, 0x0066,
-	0x00c6, 0x00d6, 0x9036, 0x7814, 0x9065, 0x0904, 0x947e, 0x600c,
-	0x0006, 0x600f, 0x0000, 0x7824, 0x9c06, 0x1570, 0x2069, 0x0100,
-	0x6820, 0xd0a4, 0x1508, 0x080c, 0x857f, 0x080c, 0xa28f, 0x68c3,
-	0x0000, 0x080c, 0xa7a7, 0x7827, 0x0000, 0x0036, 0x2069, 0x0140,
-	0x6b04, 0x9384, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2cfc,
-	0x9006, 0x080c, 0x2cfc, 0x2069, 0x0100, 0x6824, 0xd084, 0x0110,
-	0x6827, 0x0001, 0x003e, 0x0040, 0x080c, 0x6921, 0x1520, 0x6003,
-	0x0009, 0x630a, 0x2c30, 0x00f8, 0x6014, 0x2048, 0x080c, 0xcb58,
-	0x01b0, 0x6020, 0x9086, 0x0003, 0x1508, 0x080c, 0xcd60, 0x1118,
-	0x080c, 0xb821, 0x0060, 0x080c, 0x6921, 0x1168, 0xa867, 0x0103,
-	0xab7a, 0xa877, 0x0000, 0x080c, 0x6c94, 0x080c, 0xcd43, 0x080c,
-	0xae90, 0x080c, 0xa67d, 0x000e, 0x0804, 0x9424, 0x7e16, 0x7e12,
-	0x00de, 0x00ce, 0x006e, 0x000e, 0x009e, 0x0005, 0x6020, 0x9086,
-	0x0006, 0x1118, 0x080c, 0xe58c, 0x0c50, 0x080c, 0xb821, 0x6020,
-	0x9086, 0x0002, 0x1150, 0x6004, 0x0006, 0x9086, 0x0085, 0x000e,
-	0x0990, 0x9086, 0x008b, 0x0978, 0x08d0, 0x6020, 0x9086, 0x0005,
-	0x19b0, 0x6004, 0x0006, 0x9086, 0x0085, 0x000e, 0x0d18, 0x9086,
-	0x008b, 0x0d00, 0x0860, 0x0006, 0x0066, 0x0096, 0x00b6, 0x00c6,
-	0x00d6, 0x7818, 0x905d, 0x0904, 0x952b, 0xb854, 0x0006, 0x9006,
-	0xb856, 0xb85a, 0xb800, 0xc0d4, 0xc0dc, 0xb802, 0x080c, 0x6548,
-	0x0904, 0x9528, 0x7e24, 0x86ff, 0x0904, 0x951b, 0x9680, 0x0005,
-	0x2004, 0x9906, 0x1904, 0x951b, 0x00d6, 0x2069, 0x0100, 0x68c0,
-	0x9005, 0x0904, 0x9512, 0x080c, 0x857f, 0x080c, 0xa28f, 0x68c3,
-	0x0000, 0x080c, 0xa7a7, 0x7827, 0x0000, 0x0036, 0x2069, 0x0140,
-	0x6b04, 0x9384, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2cfc,
-	0x9006, 0x080c, 0x2cfc, 0x2069, 0x0100, 0x6824, 0xd084, 0x0110,
-	0x6827, 0x0001, 0x003e, 0x00de, 0x00c6, 0x3e08, 0x918e, 0x0002,
-	0x1168, 0xb800, 0xd0bc, 0x0150, 0x9680, 0x0010, 0x200c, 0x81ff,
-	0x1518, 0x2009, 0x1987, 0x210c, 0x2102, 0x00f0, 0xb83c, 0x9005,
-	0x0110, 0x8001, 0xb83e, 0x2660, 0x600f, 0x0000, 0x080c, 0xae90,
-	0x00ce, 0x0048, 0x00de, 0x00c6, 0x2660, 0x6003, 0x0009, 0x630a,
-	0x00ce, 0x0804, 0x94be, 0x89ff, 0x0138, 0xa867, 0x0103, 0xab7a,
-	0xa877, 0x0000, 0x080c, 0x6c94, 0x080c, 0xa67d, 0x0804, 0x94be,
-	0x000e, 0x0804, 0x94b2, 0x781e, 0x781a, 0x00de, 0x00ce, 0x00be,
-	0x009e, 0x006e, 0x000e, 0x0005, 0x00e6, 0x00d6, 0x0096, 0x0066,
-	0xb800, 0xd0dc, 0x01a0, 0xb84c, 0x904d, 0x0188, 0xa878, 0x9606,
-	0x1170, 0x2071, 0x19e6, 0x7024, 0x9035, 0x0148, 0x9080, 0x0005,
-	0x2004, 0x9906, 0x1120, 0xb800, 0xc0dc, 0xb802, 0x0029, 0x006e,
-	0x009e, 0x00de, 0x00ee, 0x0005, 0x00f6, 0x2079, 0x0100, 0x78c0,
-	0x9005, 0x1138, 0x00c6, 0x2660, 0x6003, 0x0009, 0x630a, 0x00ce,
-	0x04b8, 0x080c, 0xa28f, 0x78c3, 0x0000, 0x080c, 0xa7a7, 0x7027,
-	0x0000, 0x0036, 0x2079, 0x0140, 0x7b04, 0x9384, 0x1000, 0x0138,
-	0x2001, 0x0100, 0x080c, 0x2cfc, 0x9006, 0x080c, 0x2cfc, 0x2079,
-	0x0100, 0x7824, 0xd084, 0x0110, 0x7827, 0x0001, 0x080c, 0xa7a7,
-	0x003e, 0x080c, 0x6548, 0x00c6, 0xb83c, 0x9005, 0x0110, 0x8001,
-	0xb83e, 0x2660, 0x080c, 0xae5f, 0x00ce, 0xa867, 0x0103, 0xab7a,
-	0xa877, 0x0000, 0x080c, 0xce4e, 0x080c, 0x6c94, 0x080c, 0xa67d,
-	0x00fe, 0x0005, 0x00b6, 0x00e6, 0x00c6, 0x2011, 0x0101, 0x2204,
-	0xc0c4, 0x2012, 0x2001, 0x180c, 0x2014, 0xc2e4, 0x2202, 0x2071,
-	0x19e6, 0x7004, 0x9084, 0x0007, 0x0002, 0x95b7, 0x95bb, 0x95d9,
-	0x9602, 0x9640, 0x95b7, 0x95d2, 0x95b5, 0x080c, 0x0dd5, 0x00ce,
-	0x00ee, 0x00be, 0x0005, 0x7024, 0x9065, 0x0148, 0x7020, 0x8001,
-	0x7022, 0x600c, 0x9015, 0x0158, 0x7216, 0x600f, 0x0000, 0x7007,
-	0x0000, 0x7027, 0x0000, 0x00ce, 0x00ee, 0x00be, 0x0005, 0x7216,
-	0x7212, 0x0ca8, 0x7007, 0x0000, 0x7027, 0x0000, 0x7020, 0x9005,
-	0x0070, 0x6010, 0x2058, 0x080c, 0x6548, 0xb800, 0xc0dc, 0xb802,
-	0x7007, 0x0000, 0x7027, 0x0000, 0x7020, 0x8001, 0x7022, 0x1148,
-	0x2001, 0x180c, 0x2014, 0xd2ec, 0x1180, 0x00ce, 0x00ee, 0x00be,
-	0x0005, 0xb854, 0x9015, 0x0120, 0x721e, 0x080c, 0x96a6, 0x0ca8,
-	0x7218, 0x721e, 0x080c, 0x96a6, 0x0c80, 0xc2ec, 0x2202, 0x080c,
-	0x97d4, 0x0c58, 0x7024, 0x9065, 0x05b8, 0x700c, 0x9c06, 0x1160,
-	0x080c, 0xa67d, 0x600c, 0x9015, 0x0120, 0x720e, 0x600f, 0x0000,
-	0x0448, 0x720e, 0x720a, 0x0430, 0x7014, 0x9c06, 0x1160, 0x080c,
-	0xa67d, 0x600c, 0x9015, 0x0120, 0x7216, 0x600f, 0x0000, 0x00d0,
-	0x7216, 0x7212, 0x00b8, 0x6020, 0x9086, 0x0003, 0x1198, 0x6010,
-	0x2058, 0x080c, 0x6548, 0xb800, 0xc0dc, 0xb802, 0x080c, 0xa67d,
-	0x701c, 0x9065, 0x0138, 0xb854, 0x9015, 0x0110, 0x721e, 0x0010,
-	0x7218, 0x721e, 0x7027, 0x0000, 0x00ce, 0x00ee, 0x00be, 0x0005,
-	0x7024, 0x9065, 0x0140, 0x080c, 0xa67d, 0x600c, 0x9015, 0x0158,
-	0x720e, 0x600f, 0x0000, 0x080c, 0xa7a7, 0x7027, 0x0000, 0x00ce,
-	0x00ee, 0x00be, 0x0005, 0x720e, 0x720a, 0x0ca8, 0x00d6, 0x2069,
-	0x19e6, 0x6830, 0x9084, 0x0003, 0x0002, 0x9663, 0x9665, 0x9689,
-	0x9661, 0x080c, 0x0dd5, 0x00de, 0x0005, 0x00c6, 0x6840, 0x9086,
-	0x0001, 0x01b8, 0x683c, 0x9065, 0x0130, 0x600c, 0x9015, 0x0170,
-	0x6a3a, 0x600f, 0x0000, 0x6833, 0x0000, 0x683f, 0x0000, 0x2011,
-	0x1a05, 0x2013, 0x0000, 0x00ce, 0x00de, 0x0005, 0x683a, 0x6836,
-	0x0c90, 0x6843, 0x0000, 0x6838, 0x9065, 0x0d68, 0x6003, 0x0003,
-	0x0c50, 0x00c6, 0x9006, 0x6842, 0x6846, 0x684a, 0x683c, 0x9065,
-	0x0160, 0x600c, 0x9015, 0x0130, 0x6a3a, 0x600f, 0x0000, 0x683f,
-	0x0000, 0x0018, 0x683e, 0x683a, 0x6836, 0x00ce, 0x00de, 0x0005,
-	0x2001, 0x180c, 0x200c, 0xc1e5, 0x2102, 0x0005, 0x2001, 0x180c,
-	0x200c, 0xd1ec, 0x0120, 0xc1ec, 0x2102, 0x080c, 0x97d4, 0x2001,
-	0x19f2, 0x2004, 0x9086, 0x0001, 0x0d58, 0x00d6, 0x2069, 0x19e6,
-	0x6804, 0x9084, 0x0007, 0x0006, 0x9005, 0x11c8, 0x2001, 0x1837,
-	0x2004, 0x9084, 0x0028, 0x1198, 0x2001, 0x197b, 0x2004, 0x9086,
-	0xaaaa, 0x0168, 0x2001, 0x188b, 0x2004, 0xd08c, 0x1118, 0xd084,
-	0x1118, 0x0028, 0x080c, 0x97d4, 0x000e, 0x00de, 0x0005, 0x000e,
-	0x0002, 0x96e3, 0x97a2, 0x97a2, 0x97a2, 0x97a2, 0x97a4, 0x97a2,
-	0x96e1, 0x080c, 0x0dd5, 0x6820, 0x9005, 0x1110, 0x00de, 0x0005,
-	0x00c6, 0x680c, 0x9065, 0x0520, 0x6114, 0x0096, 0x2148, 0xa964,
-	0x009e, 0x918c, 0x00ff, 0x918e, 0x0035, 0x1180, 0x2009, 0x1837,
-	0x210c, 0x918c, 0x0028, 0x1150, 0x080c, 0x73b3, 0x0138, 0x0006,
-	0x2009, 0x188b, 0x2104, 0xc095, 0x200a, 0x000e, 0x6807, 0x0004,
-	0x6826, 0x682b, 0x0000, 0x080c, 0x987d, 0x00ce, 0x00de, 0x0005,
-	0x6814, 0x9065, 0x0150, 0x6807, 0x0001, 0x6826, 0x682b, 0x0000,
-	0x080c, 0x987d, 0x00ce, 0x00de, 0x0005, 0x00b6, 0x00e6, 0x6a1c,
-	0x92dd, 0x0000, 0x0904, 0x978c, 0xb84c, 0x900d, 0x0118, 0xb888,
-	0x9005, 0x01a0, 0xb854, 0x905d, 0x0120, 0x920e, 0x0904, 0x978c,
-	0x0028, 0x6818, 0x920e, 0x0904, 0x978c, 0x2058, 0xb84c, 0x900d,
-	0x0d88, 0xb888, 0x9005, 0x1d70, 0x2b00, 0x681e, 0xbb3c, 0xb838,
-	0x9302, 0x1e40, 0x080c, 0xae36, 0x0904, 0x978c, 0x8318, 0xbb3e,
-	0x6116, 0x2b10, 0x6212, 0x0096, 0x2148, 0xa880, 0x9084, 0x00ff,
-	0x605e, 0xa883, 0x0000, 0xa884, 0x009e, 0x908a, 0x199a, 0x0210,
-	0x2001, 0x1999, 0x8003, 0x801b, 0x831b, 0x9318, 0x631a, 0x6114,
-	0x0096, 0x2148, 0xa964, 0x009e, 0x918c, 0x00ff, 0x918e, 0x0048,
-	0x0538, 0x00f6, 0x2c78, 0x2061, 0x0100, 0xbac0, 0x629a, 0x2069,
-	0x0200, 0x2071, 0x0240, 0x080c, 0x9dca, 0x2069, 0x19e6, 0xbb00,
-	0xc3dd, 0xbb02, 0x6807, 0x0002, 0x2f18, 0x6b26, 0x682b, 0x0000,
-	0x7823, 0x0003, 0x7803, 0x0001, 0x7807, 0x0040, 0x00fe, 0x00ee,
-	0x00be, 0x00ce, 0x00de, 0x0005, 0x00ee, 0x00be, 0x00ce, 0x0cd0,
-	0x6807, 0x0006, 0x2c18, 0x6b26, 0x6820, 0x8001, 0x6822, 0x682b,
-	0x0000, 0x080c, 0x6548, 0x080c, 0xac76, 0x00ee, 0x00be, 0x00ce,
-	0x00de, 0x0005, 0x00de, 0x0005, 0x00c6, 0x680c, 0x9065, 0x0508,
-	0x6114, 0x0096, 0x2148, 0xa964, 0x009e, 0x918c, 0x00ff, 0x918e,
-	0x0035, 0x1180, 0x2009, 0x1837, 0x210c, 0x918c, 0x0028, 0x1150,
-	0x080c, 0x73b3, 0x0138, 0x0006, 0x2009, 0x188b, 0x2104, 0xc095,
-	0x200a, 0x000e, 0x6807, 0x0004, 0x6826, 0x682b, 0x0000, 0x080c,
-	0x987d, 0x00ce, 0x00de, 0x0005, 0x2001, 0x180c, 0x2014, 0xc2ed,
-	0x2202, 0x00de, 0x00fe, 0x0005, 0x00f6, 0x00d6, 0x2069, 0x19e6,
-	0x6830, 0x9086, 0x0000, 0x1570, 0x2001, 0x180c, 0x2014, 0xd2e4,
-	0x0130, 0xc2e4, 0x2202, 0x080c, 0x96b5, 0x2069, 0x19e6, 0x2001,
-	0x180c, 0x200c, 0xd1c4, 0x1508, 0x6838, 0x907d, 0x01d8, 0x6a04,
-	0x9296, 0x0000, 0x1904, 0x9871, 0x7920, 0x918e, 0x0009, 0x0568,
-	0x6833, 0x0001, 0x683e, 0x6847, 0x0000, 0x684b, 0x0000, 0x0126,
-	0x00f6, 0x2091, 0x2400, 0x002e, 0x080c, 0x1c53, 0x1158, 0x012e,
-	0x080c, 0xa0ec, 0x00de, 0x00fe, 0x0005, 0xc1c4, 0x2102, 0x080c,
-	0x7463, 0x08d0, 0x012e, 0x6843, 0x0000, 0x7803, 0x0002, 0x780c,
-	0x9015, 0x0140, 0x6a3a, 0x780f, 0x0000, 0x6833, 0x0000, 0x683f,
-	0x0000, 0x0c40, 0x683a, 0x6836, 0x0cc0, 0x7908, 0xd1fc, 0x1198,
+	0x080c, 0xafbe, 0x00ce, 0x0005, 0x00c6, 0x7824, 0x9065, 0x090c,
+	0x0dd5, 0x7828, 0x9092, 0xc350, 0x12c0, 0x8000, 0x782a, 0x00ce,
+	0x080c, 0x2be3, 0x0278, 0x00c6, 0x7924, 0x2160, 0x6010, 0x906d,
+	0x090c, 0x0dd5, 0x7807, 0x0000, 0x7827, 0x0000, 0x00ce, 0x080c,
+	0x9763, 0x0c00, 0x080c, 0xa332, 0x08e8, 0x2011, 0x0130, 0x2214,
+	0x080c, 0xad3a, 0x080c, 0xeb8e, 0x2009, 0x0014, 0x080c, 0xafbe,
+	0x00ce, 0x0880, 0x2001, 0x1a02, 0x2003, 0x0000, 0x62c0, 0x82ff,
+	0x1160, 0x782b, 0x0000, 0x7824, 0x9065, 0x090c, 0x0dd5, 0x2009,
+	0x0013, 0x080c, 0xb010, 0x00ce, 0x0005, 0x00b6, 0x00c6, 0x00d6,
+	0x7824, 0x9005, 0x090c, 0x0dd5, 0x7828, 0x9092, 0xc350, 0x1648,
+	0x8000, 0x782a, 0x00de, 0x00ce, 0x00be, 0x080c, 0x2be3, 0x02f0,
+	0x00b6, 0x00c6, 0x00d6, 0x781c, 0x905d, 0x090c, 0x0dd5, 0xb800,
+	0xc0dc, 0xb802, 0x7924, 0x2160, 0x080c, 0xaf43, 0xb93c, 0x81ff,
+	0x090c, 0x0dd5, 0x8109, 0xb93e, 0x7807, 0x0000, 0x7827, 0x0000,
+	0x00de, 0x00ce, 0x00be, 0x080c, 0x9763, 0x0868, 0x080c, 0xa332,
+	0x0850, 0x2011, 0x0130, 0x2214, 0x080c, 0xad3a, 0x080c, 0xeb8e,
+	0x7824, 0x9065, 0x2009, 0x0014, 0x080c, 0xafbe, 0x00de, 0x00ce,
+	0x00be, 0x0804, 0x911b, 0x00c6, 0x2001, 0x009b, 0x2004, 0xd0fc,
+	0x190c, 0x1ef2, 0x6024, 0x6027, 0x0002, 0xd0f4, 0x15b8, 0x62c8,
+	0x60c4, 0x9205, 0x1170, 0x783c, 0x9065, 0x0130, 0x2009, 0x0049,
+	0x080c, 0xafbe, 0x00ce, 0x0005, 0x2011, 0x1a05, 0x2013, 0x0000,
+	0x0cc8, 0x793c, 0x81ff, 0x0dc0, 0x7944, 0x9192, 0x7530, 0x1628,
+	0x8108, 0x7946, 0x793c, 0x9188, 0x0008, 0x210c, 0x918e, 0x0006,
+	0x1138, 0x6014, 0x9084, 0x1984, 0x9085, 0x0012, 0x6016, 0x0c10,
+	0x793c, 0x9188, 0x0008, 0x210c, 0x918e, 0x0009, 0x0d90, 0x6014,
+	0x9084, 0x1984, 0x9085, 0x0016, 0x6016, 0x08a0, 0x793c, 0x2160,
+	0x2009, 0x004a, 0x080c, 0xafbe, 0x0868, 0x7848, 0xc085, 0x784a,
+	0x0848, 0x0006, 0x0016, 0x00c6, 0x0126, 0x2091, 0x8000, 0x600f,
+	0x0000, 0x2c08, 0x2061, 0x19e6, 0x6020, 0x8000, 0x6022, 0x6010,
+	0x9005, 0x0148, 0x9080, 0x0003, 0x2102, 0x6112, 0x012e, 0x00ce,
+	0x001e, 0x000e, 0x0005, 0x6116, 0x6112, 0x0cc0, 0x00d6, 0x2069,
+	0x19e6, 0xb800, 0xd0d4, 0x0168, 0x6820, 0x8000, 0x6822, 0x9086,
+	0x0001, 0x1110, 0x2b00, 0x681e, 0x00de, 0x0804, 0x9763, 0x00de,
+	0x0005, 0xc0d5, 0xb802, 0x6818, 0x9005, 0x0168, 0xb856, 0xb85b,
+	0x0000, 0x0086, 0x0006, 0x2b00, 0x681a, 0x008e, 0xa05a, 0x008e,
+	0x2069, 0x19e6, 0x0c08, 0xb856, 0xb85a, 0x2b00, 0x681a, 0x681e,
+	0x08d8, 0x0006, 0x0016, 0x00c6, 0x0126, 0x2091, 0x8000, 0x600f,
+	0x0000, 0x2c08, 0x2061, 0x19e6, 0x6020, 0x8000, 0x6022, 0x6008,
+	0x9005, 0x0148, 0x9080, 0x0003, 0x2102, 0x610a, 0x012e, 0x00ce,
+	0x001e, 0x000e, 0x0005, 0x610e, 0x610a, 0x0cc0, 0x00c6, 0x600f,
+	0x0000, 0x2c08, 0x2061, 0x19e6, 0x6034, 0x9005, 0x0130, 0x9080,
+	0x0003, 0x2102, 0x6136, 0x00ce, 0x0005, 0x613a, 0x6136, 0x00ce,
+	0x0005, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x00b6, 0x0096, 0x0076,
+	0x0066, 0x0056, 0x0036, 0x0026, 0x0016, 0x0006, 0x0126, 0x902e,
+	0x2071, 0x19e6, 0x7638, 0x2660, 0x2678, 0x2091, 0x8000, 0x8cff,
+	0x0904, 0x92a5, 0x6010, 0x2058, 0xb8a0, 0x9206, 0x1904, 0x92a0,
+	0x87ff, 0x0120, 0x6054, 0x9106, 0x1904, 0x92a0, 0x703c, 0x9c06,
+	0x1178, 0x0036, 0x2019, 0x0001, 0x080c, 0xa6ac, 0x7033, 0x0000,
+	0x9006, 0x703e, 0x7042, 0x7046, 0x704a, 0x003e, 0x2029, 0x0001,
+	0x7038, 0x9c36, 0x1110, 0x660c, 0x763a, 0x7034, 0x9c36, 0x1140,
+	0x2c00, 0x9f36, 0x0118, 0x2f00, 0x7036, 0x0010, 0x7037, 0x0000,
+	0x660c, 0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678,
+	0x600f, 0x0000, 0x080c, 0xcc86, 0x01f0, 0x6014, 0x2048, 0x6020,
+	0x9086, 0x0003, 0x15b8, 0x6004, 0x9086, 0x0040, 0x090c, 0xa88b,
+	0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x0016, 0x0036, 0x0076,
+	0x080c, 0xcf7c, 0x080c, 0xea94, 0x080c, 0x6d17, 0x007e, 0x003e,
+	0x001e, 0x080c, 0xce71, 0x080c, 0xaf74, 0x00ce, 0x0804, 0x923f,
+	0x2c78, 0x600c, 0x2060, 0x0804, 0x923f, 0x85ff, 0x0120, 0x0036,
+	0x080c, 0x9891, 0x003e, 0x012e, 0x000e, 0x001e, 0x002e, 0x003e,
+	0x005e, 0x006e, 0x007e, 0x009e, 0x00be, 0x00ce, 0x00de, 0x00ee,
+	0x00fe, 0x0005, 0x6020, 0x9086, 0x0006, 0x1158, 0x0016, 0x0036,
+	0x0076, 0x080c, 0xea94, 0x080c, 0xe6dd, 0x007e, 0x003e, 0x001e,
+	0x0890, 0x6020, 0x9086, 0x0009, 0x1168, 0xa87b, 0x0006, 0x0016,
+	0x0036, 0x0076, 0x080c, 0x6d17, 0x080c, 0xaf43, 0x007e, 0x003e,
+	0x001e, 0x0818, 0x6020, 0x9086, 0x000a, 0x0904, 0x928a, 0x0804,
+	0x9283, 0x0006, 0x0066, 0x0096, 0x00c6, 0x00d6, 0x00f6, 0x9036,
+	0x0126, 0x2091, 0x8000, 0x2079, 0x19e6, 0x7838, 0x9065, 0x0904,
+	0x9336, 0x600c, 0x0006, 0x600f, 0x0000, 0x783c, 0x9c06, 0x1168,
+	0x0036, 0x2019, 0x0001, 0x080c, 0xa6ac, 0x7833, 0x0000, 0x901e,
+	0x7b3e, 0x7b42, 0x7b46, 0x7b4a, 0x003e, 0x080c, 0xcc86, 0x0548,
+	0x6014, 0x2048, 0x6020, 0x9086, 0x0003, 0x1590, 0x3e08, 0x918e,
+	0x0002, 0x1188, 0x6010, 0x9005, 0x0170, 0x00b6, 0x2058, 0xb800,
+	0x00be, 0xd0bc, 0x0140, 0x6040, 0x9005, 0x11a8, 0x2001, 0x1987,
+	0x2004, 0x6042, 0x0080, 0x6004, 0x9086, 0x0040, 0x090c, 0xa88b,
+	0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c, 0x6d0b, 0x080c,
+	0xce71, 0x080c, 0xaf74, 0x000e, 0x0804, 0x92ee, 0x7e3a, 0x7e36,
+	0x012e, 0x00fe, 0x00de, 0x00ce, 0x009e, 0x006e, 0x000e, 0x0005,
+	0x6020, 0x9086, 0x0006, 0x1118, 0x080c, 0xe6dd, 0x0c50, 0x6020,
+	0x9086, 0x0009, 0x1130, 0xab7a, 0x080c, 0x6d17, 0x080c, 0xaf43,
+	0x0c10, 0x6020, 0x9086, 0x000a, 0x09a8, 0x0868, 0x0016, 0x0026,
+	0x0086, 0x9046, 0x0099, 0x080c, 0x9441, 0x008e, 0x002e, 0x001e,
+	0x0005, 0x00f6, 0x0126, 0x2079, 0x19e6, 0x2091, 0x8000, 0x080c,
+	0x94d8, 0x080c, 0x9568, 0x012e, 0x00fe, 0x0005, 0x00b6, 0x0096,
+	0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0016, 0x0006, 0x0126,
+	0x2091, 0x8000, 0x2071, 0x19e6, 0x7614, 0x2660, 0x2678, 0x8cff,
+	0x0904, 0x9406, 0x6010, 0x2058, 0xb8a0, 0x9206, 0x1904, 0x9401,
+	0x88ff, 0x0120, 0x6054, 0x9106, 0x1904, 0x9401, 0x7024, 0x9c06,
+	0x1568, 0x2069, 0x0100, 0x6820, 0xd0a4, 0x0110, 0xd0cc, 0x1508,
+	0x080c, 0x8636, 0x080c, 0xa356, 0x68c3, 0x0000, 0x080c, 0xa88b,
+	0x7027, 0x0000, 0x0036, 0x2069, 0x0140, 0x6b04, 0x9384, 0x1000,
+	0x0138, 0x2001, 0x0100, 0x080c, 0x2d4e, 0x9006, 0x080c, 0x2d4e,
+	0x2069, 0x0100, 0x6824, 0xd084, 0x0110, 0x6827, 0x0001, 0x003e,
+	0x0028, 0x6003, 0x0009, 0x630a, 0x0804, 0x9401, 0x7014, 0x9c36,
+	0x1110, 0x660c, 0x7616, 0x7010, 0x9c36, 0x1140, 0x2c00, 0x9f36,
+	0x0118, 0x2f00, 0x7012, 0x0010, 0x7013, 0x0000, 0x660c, 0x0066,
+	0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000,
+	0x6014, 0x2048, 0x080c, 0xcc86, 0x01e8, 0x6020, 0x9086, 0x0003,
+	0x1580, 0x080c, 0xce8e, 0x1118, 0x080c, 0xb905, 0x0098, 0xa867,
+	0x0103, 0xab7a, 0xa877, 0x0000, 0x0016, 0x0036, 0x0086, 0x080c,
+	0xcf7c, 0x080c, 0xea94, 0x080c, 0x6d17, 0x008e, 0x003e, 0x001e,
+	0x080c, 0xce71, 0x080c, 0xaf74, 0x080c, 0xa761, 0x00ce, 0x0804,
+	0x937f, 0x2c78, 0x600c, 0x2060, 0x0804, 0x937f, 0x012e, 0x000e,
+	0x001e, 0x006e, 0x00ce, 0x00de, 0x00ee, 0x00fe, 0x009e, 0x00be,
+	0x0005, 0x6020, 0x9086, 0x0006, 0x1158, 0x0016, 0x0036, 0x0086,
+	0x080c, 0xea94, 0x080c, 0xe6dd, 0x008e, 0x003e, 0x001e, 0x08d0,
+	0x080c, 0xb905, 0x6020, 0x9086, 0x0002, 0x1160, 0x6004, 0x0006,
+	0x9086, 0x0085, 0x000e, 0x0904, 0x93e7, 0x9086, 0x008b, 0x0904,
+	0x93e7, 0x0840, 0x6020, 0x9086, 0x0005, 0x1920, 0x6004, 0x0006,
+	0x9086, 0x0085, 0x000e, 0x09c8, 0x9086, 0x008b, 0x09b0, 0x0804,
+	0x93fa, 0x00b6, 0x00a6, 0x0096, 0x00c6, 0x0006, 0x0126, 0x2091,
+	0x8000, 0x9280, 0x1000, 0x2004, 0x905d, 0x0904, 0x94d1, 0x00f6,
+	0x00e6, 0x00d6, 0x0066, 0x2071, 0x19e6, 0xbe54, 0x7018, 0x9b06,
+	0x1108, 0x761a, 0x701c, 0x9b06, 0x1130, 0x86ff, 0x1118, 0x7018,
+	0x701e, 0x0008, 0x761e, 0xb858, 0x904d, 0x0108, 0xae56, 0x96d5,
+	0x0000, 0x0110, 0x2900, 0xb05a, 0xb857, 0x0000, 0xb85b, 0x0000,
+	0xb800, 0xc0d4, 0xc0dc, 0xb802, 0x080c, 0x65cb, 0x0904, 0x94cd,
+	0x7624, 0x86ff, 0x0904, 0x94bc, 0x9680, 0x0005, 0x2004, 0x9906,
+	0x15d8, 0x00d6, 0x2069, 0x0100, 0x68c0, 0x9005, 0x0560, 0x080c,
+	0x8636, 0x080c, 0xa356, 0x68c3, 0x0000, 0x080c, 0xa88b, 0x7027,
+	0x0000, 0x0036, 0x2069, 0x0140, 0x6b04, 0x9384, 0x1000, 0x0138,
+	0x2001, 0x0100, 0x080c, 0x2d4e, 0x9006, 0x080c, 0x2d4e, 0x2069,
+	0x0100, 0x6824, 0xd084, 0x0110, 0x6827, 0x0001, 0x003e, 0x00de,
+	0x00c6, 0xb83c, 0x9005, 0x0110, 0x8001, 0xb83e, 0x2660, 0x080c,
+	0xaf74, 0x00ce, 0x0048, 0x00de, 0x00c6, 0x2660, 0x6003, 0x0009,
+	0x630a, 0x00ce, 0x0804, 0x9474, 0x89ff, 0x0158, 0xa867, 0x0103,
+	0xab7a, 0xa877, 0x0000, 0x080c, 0xcf7c, 0x080c, 0xea94, 0x080c,
+	0x6d17, 0x080c, 0xa761, 0x0804, 0x9474, 0x006e, 0x00de, 0x00ee,
+	0x00fe, 0x012e, 0x000e, 0x00ce, 0x009e, 0x00ae, 0x00be, 0x0005,
+	0x0096, 0x0006, 0x0066, 0x00c6, 0x00d6, 0x9036, 0x7814, 0x9065,
+	0x0904, 0x953b, 0x600c, 0x0006, 0x600f, 0x0000, 0x7824, 0x9c06,
+	0x1580, 0x2069, 0x0100, 0x6820, 0xd0a4, 0x0110, 0xd0cc, 0x1508,
+	0x080c, 0x8636, 0x080c, 0xa356, 0x68c3, 0x0000, 0x080c, 0xa88b,
+	0x7827, 0x0000, 0x0036, 0x2069, 0x0140, 0x6b04, 0x9384, 0x1000,
+	0x0138, 0x2001, 0x0100, 0x080c, 0x2d4e, 0x9006, 0x080c, 0x2d4e,
+	0x2069, 0x0100, 0x6824, 0xd084, 0x0110, 0x6827, 0x0001, 0x003e,
+	0x0040, 0x080c, 0x69a4, 0x1520, 0x6003, 0x0009, 0x630a, 0x2c30,
+	0x00f8, 0x6014, 0x2048, 0x080c, 0xcc84, 0x01b0, 0x6020, 0x9086,
+	0x0003, 0x1508, 0x080c, 0xce8e, 0x1118, 0x080c, 0xb905, 0x0060,
+	0x080c, 0x69a4, 0x1168, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000,
+	0x080c, 0x6d17, 0x080c, 0xce71, 0x080c, 0xaf74, 0x080c, 0xa761,
+	0x000e, 0x0804, 0x94df, 0x7e16, 0x7e12, 0x00de, 0x00ce, 0x006e,
+	0x000e, 0x009e, 0x0005, 0x6020, 0x9086, 0x0006, 0x1118, 0x080c,
+	0xe6dd, 0x0c50, 0x080c, 0xb905, 0x6020, 0x9086, 0x0002, 0x1150,
+	0x6004, 0x0006, 0x9086, 0x0085, 0x000e, 0x0990, 0x9086, 0x008b,
+	0x0978, 0x08d0, 0x6020, 0x9086, 0x0005, 0x19b0, 0x6004, 0x0006,
+	0x9086, 0x0085, 0x000e, 0x0d18, 0x9086, 0x008b, 0x0d00, 0x0860,
+	0x0006, 0x0066, 0x0096, 0x00b6, 0x00c6, 0x00d6, 0x7818, 0x905d,
+	0x0904, 0x95e8, 0xb854, 0x0006, 0x9006, 0xb856, 0xb85a, 0xb800,
+	0xc0d4, 0xc0dc, 0xb802, 0x080c, 0x65cb, 0x0904, 0x95e5, 0x7e24,
+	0x86ff, 0x0904, 0x95d8, 0x9680, 0x0005, 0x2004, 0x9906, 0x1904,
+	0x95d8, 0x00d6, 0x2069, 0x0100, 0x68c0, 0x9005, 0x0904, 0x95cf,
+	0x080c, 0x8636, 0x080c, 0xa356, 0x68c3, 0x0000, 0x080c, 0xa88b,
+	0x7827, 0x0000, 0x0036, 0x2069, 0x0140, 0x6b04, 0x9384, 0x1000,
+	0x0138, 0x2001, 0x0100, 0x080c, 0x2d4e, 0x9006, 0x080c, 0x2d4e,
+	0x2069, 0x0100, 0x6824, 0xd084, 0x0110, 0x6827, 0x0001, 0x003e,
+	0x00de, 0x00c6, 0x3e08, 0x918e, 0x0002, 0x1168, 0xb800, 0xd0bc,
+	0x0150, 0x9680, 0x0010, 0x200c, 0x81ff, 0x1518, 0x2009, 0x1987,
+	0x210c, 0x2102, 0x00f0, 0xb83c, 0x9005, 0x0110, 0x8001, 0xb83e,
+	0x2660, 0x600f, 0x0000, 0x080c, 0xaf74, 0x00ce, 0x0048, 0x00de,
+	0x00c6, 0x2660, 0x6003, 0x0009, 0x630a, 0x00ce, 0x0804, 0x957b,
+	0x89ff, 0x0138, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c,
+	0x6d17, 0x080c, 0xa761, 0x0804, 0x957b, 0x000e, 0x0804, 0x956f,
+	0x781e, 0x781a, 0x00de, 0x00ce, 0x00be, 0x009e, 0x006e, 0x000e,
+	0x0005, 0x00e6, 0x00d6, 0x0096, 0x0066, 0xb800, 0xd0dc, 0x01a0,
+	0xb84c, 0x904d, 0x0188, 0xa878, 0x9606, 0x1170, 0x2071, 0x19e6,
+	0x7024, 0x9035, 0x0148, 0x9080, 0x0005, 0x2004, 0x9906, 0x1120,
+	0xb800, 0xc0dc, 0xb802, 0x0029, 0x006e, 0x009e, 0x00de, 0x00ee,
+	0x0005, 0x00f6, 0x2079, 0x0100, 0x78c0, 0x9005, 0x1138, 0x00c6,
+	0x2660, 0x6003, 0x0009, 0x630a, 0x00ce, 0x04b8, 0x080c, 0xa356,
+	0x78c3, 0x0000, 0x080c, 0xa88b, 0x7027, 0x0000, 0x0036, 0x2079,
+	0x0140, 0x7b04, 0x9384, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c,
+	0x2d4e, 0x9006, 0x080c, 0x2d4e, 0x2079, 0x0100, 0x7824, 0xd084,
+	0x0110, 0x7827, 0x0001, 0x080c, 0xa88b, 0x003e, 0x080c, 0x65cb,
+	0x00c6, 0xb83c, 0x9005, 0x0110, 0x8001, 0xb83e, 0x2660, 0x080c,
+	0xaf43, 0x00ce, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c,
+	0xcf7c, 0x080c, 0x6d17, 0x080c, 0xa761, 0x00fe, 0x0005, 0x00b6,
+	0x00e6, 0x00c6, 0x2011, 0x0101, 0x2204, 0xc0c4, 0x2012, 0x2001,
+	0x180c, 0x2014, 0xc2e4, 0x2202, 0x2071, 0x19e6, 0x7004, 0x9084,
+	0x0007, 0x0002, 0x9674, 0x9678, 0x9696, 0x96bf, 0x96fd, 0x9674,
+	0x968f, 0x9672, 0x080c, 0x0dd5, 0x00ce, 0x00ee, 0x00be, 0x0005,
+	0x7024, 0x9065, 0x0148, 0x7020, 0x8001, 0x7022, 0x600c, 0x9015,
+	0x0158, 0x7216, 0x600f, 0x0000, 0x7007, 0x0000, 0x7027, 0x0000,
+	0x00ce, 0x00ee, 0x00be, 0x0005, 0x7216, 0x7212, 0x0ca8, 0x7007,
+	0x0000, 0x7027, 0x0000, 0x7020, 0x9005, 0x0070, 0x6010, 0x2058,
+	0x080c, 0x65cb, 0xb800, 0xc0dc, 0xb802, 0x7007, 0x0000, 0x7027,
+	0x0000, 0x7020, 0x8001, 0x7022, 0x1148, 0x2001, 0x180c, 0x2014,
+	0xd2ec, 0x1180, 0x00ce, 0x00ee, 0x00be, 0x0005, 0xb854, 0x9015,
+	0x0120, 0x721e, 0x080c, 0x9763, 0x0ca8, 0x7218, 0x721e, 0x080c,
+	0x9763, 0x0c80, 0xc2ec, 0x2202, 0x080c, 0x9891, 0x0c58, 0x7024,
+	0x9065, 0x05b8, 0x700c, 0x9c06, 0x1160, 0x080c, 0xa761, 0x600c,
+	0x9015, 0x0120, 0x720e, 0x600f, 0x0000, 0x0448, 0x720e, 0x720a,
+	0x0430, 0x7014, 0x9c06, 0x1160, 0x080c, 0xa761, 0x600c, 0x9015,
+	0x0120, 0x7216, 0x600f, 0x0000, 0x00d0, 0x7216, 0x7212, 0x00b8,
+	0x6020, 0x9086, 0x0003, 0x1198, 0x6010, 0x2058, 0x080c, 0x65cb,
+	0xb800, 0xc0dc, 0xb802, 0x080c, 0xa761, 0x701c, 0x9065, 0x0138,
+	0xb854, 0x9015, 0x0110, 0x721e, 0x0010, 0x7218, 0x721e, 0x7027,
+	0x0000, 0x00ce, 0x00ee, 0x00be, 0x0005, 0x7024, 0x9065, 0x0140,
+	0x080c, 0xa761, 0x600c, 0x9015, 0x0158, 0x720e, 0x600f, 0x0000,
+	0x080c, 0xa88b, 0x7027, 0x0000, 0x00ce, 0x00ee, 0x00be, 0x0005,
+	0x720e, 0x720a, 0x0ca8, 0x00d6, 0x2069, 0x19e6, 0x6830, 0x9084,
+	0x0003, 0x0002, 0x9720, 0x9722, 0x9746, 0x971e, 0x080c, 0x0dd5,
+	0x00de, 0x0005, 0x00c6, 0x6840, 0x9086, 0x0001, 0x01b8, 0x683c,
+	0x9065, 0x0130, 0x600c, 0x9015, 0x0170, 0x6a3a, 0x600f, 0x0000,
+	0x6833, 0x0000, 0x683f, 0x0000, 0x2011, 0x1a05, 0x2013, 0x0000,
+	0x00ce, 0x00de, 0x0005, 0x683a, 0x6836, 0x0c90, 0x6843, 0x0000,
+	0x6838, 0x9065, 0x0d68, 0x6003, 0x0003, 0x0c50, 0x00c6, 0x9006,
+	0x6842, 0x6846, 0x684a, 0x683c, 0x9065, 0x0160, 0x600c, 0x9015,
+	0x0130, 0x6a3a, 0x600f, 0x0000, 0x683f, 0x0000, 0x0018, 0x683e,
+	0x683a, 0x6836, 0x00ce, 0x00de, 0x0005, 0x2001, 0x180c, 0x200c,
+	0xc1e5, 0x2102, 0x0005, 0x2001, 0x180c, 0x200c, 0xd1ec, 0x0120,
+	0xc1ec, 0x2102, 0x080c, 0x9891, 0x2001, 0x19f2, 0x2004, 0x9086,
+	0x0001, 0x0d58, 0x00d6, 0x2069, 0x19e6, 0x6804, 0x9084, 0x0007,
+	0x0006, 0x9005, 0x11c8, 0x2001, 0x1837, 0x2004, 0x9084, 0x0028,
+	0x1198, 0x2001, 0x197b, 0x2004, 0x9086, 0xaaaa, 0x0168, 0x2001,
+	0x188b, 0x2004, 0xd08c, 0x1118, 0xd084, 0x1118, 0x0028, 0x080c,
+	0x9891, 0x000e, 0x00de, 0x0005, 0x000e, 0x0002, 0x97a0, 0x985f,
+	0x985f, 0x985f, 0x985f, 0x9861, 0x985f, 0x979e, 0x080c, 0x0dd5,
+	0x6820, 0x9005, 0x1110, 0x00de, 0x0005, 0x00c6, 0x680c, 0x9065,
+	0x0520, 0x6114, 0x0096, 0x2148, 0xa964, 0x009e, 0x918c, 0x00ff,
+	0x918e, 0x0035, 0x1180, 0x2009, 0x1837, 0x210c, 0x918c, 0x0028,
+	0x1150, 0x080c, 0x743e, 0x0138, 0x0006, 0x2009, 0x188b, 0x2104,
+	0xc095, 0x200a, 0x000e, 0x6807, 0x0004, 0x6826, 0x682b, 0x0000,
+	0x080c, 0x993a, 0x00ce, 0x00de, 0x0005, 0x6814, 0x9065, 0x0150,
+	0x6807, 0x0001, 0x6826, 0x682b, 0x0000, 0x080c, 0x993a, 0x00ce,
+	0x00de, 0x0005, 0x00b6, 0x00e6, 0x6a1c, 0x92dd, 0x0000, 0x0904,
+	0x9849, 0xb84c, 0x900d, 0x0118, 0xb888, 0x9005, 0x01a0, 0xb854,
+	0x905d, 0x0120, 0x920e, 0x0904, 0x9849, 0x0028, 0x6818, 0x920e,
+	0x0904, 0x9849, 0x2058, 0xb84c, 0x900d, 0x0d88, 0xb888, 0x9005,
+	0x1d70, 0x2b00, 0x681e, 0xbb3c, 0xb838, 0x9302, 0x1e40, 0x080c,
+	0xaf1a, 0x0904, 0x9849, 0x8318, 0xbb3e, 0x6116, 0x2b10, 0x6212,
+	0x0096, 0x2148, 0xa880, 0x9084, 0x00ff, 0x605e, 0xa883, 0x0000,
+	0xa884, 0x009e, 0x908a, 0x199a, 0x0210, 0x2001, 0x1999, 0x8003,
+	0x801b, 0x831b, 0x9318, 0x631a, 0x6114, 0x0096, 0x2148, 0xa964,
+	0x009e, 0x918c, 0x00ff, 0x918e, 0x0048, 0x0538, 0x00f6, 0x2c78,
+	0x2061, 0x0100, 0xbac0, 0x629a, 0x2069, 0x0200, 0x2071, 0x0240,
+	0x080c, 0x9e91, 0x2069, 0x19e6, 0xbb00, 0xc3dd, 0xbb02, 0x6807,
+	0x0002, 0x2f18, 0x6b26, 0x682b, 0x0000, 0x7823, 0x0003, 0x7803,
+	0x0001, 0x7807, 0x0040, 0x00fe, 0x00ee, 0x00be, 0x00ce, 0x00de,
+	0x0005, 0x00ee, 0x00be, 0x00ce, 0x0cd0, 0x6807, 0x0006, 0x2c18,
+	0x6b26, 0x6820, 0x8001, 0x6822, 0x682b, 0x0000, 0x080c, 0x65cb,
+	0x080c, 0xad5a, 0x00ee, 0x00be, 0x00ce, 0x00de, 0x0005, 0x00de,
+	0x0005, 0x00c6, 0x680c, 0x9065, 0x0508, 0x6114, 0x0096, 0x2148,
+	0xa964, 0x009e, 0x918c, 0x00ff, 0x918e, 0x0035, 0x1180, 0x2009,
+	0x1837, 0x210c, 0x918c, 0x0028, 0x1150, 0x080c, 0x743e, 0x0138,
+	0x0006, 0x2009, 0x188b, 0x2104, 0xc095, 0x200a, 0x000e, 0x6807,
+	0x0004, 0x6826, 0x682b, 0x0000, 0x080c, 0x993a, 0x00ce, 0x00de,
+	0x0005, 0x2001, 0x180c, 0x2014, 0xc2ed, 0x2202, 0x00de, 0x00fe,
+	0x0005, 0x00f6, 0x00d6, 0x2069, 0x19e6, 0x6830, 0x9086, 0x0000,
+	0x1570, 0x2001, 0x180c, 0x2014, 0xd2e4, 0x0130, 0xc2e4, 0x2202,
+	0x080c, 0x9772, 0x2069, 0x19e6, 0x2001, 0x180c, 0x200c, 0xd1c4,
+	0x1508, 0x6838, 0x907d, 0x01d8, 0x6a04, 0x9296, 0x0000, 0x1904,
+	0x992e, 0x7920, 0x918e, 0x0009, 0x0568, 0x6833, 0x0001, 0x683e,
+	0x6847, 0x0000, 0x684b, 0x0000, 0x0126, 0x00f6, 0x2091, 0x2400,
+	0x002e, 0x080c, 0x1c84, 0x1158, 0x012e, 0x080c, 0xa1b3, 0x00de,
+	0x00fe, 0x0005, 0xc1c4, 0x2102, 0x080c, 0x74ee, 0x08d0, 0x012e,
+	0x6843, 0x0000, 0x7803, 0x0002, 0x780c, 0x9015, 0x0140, 0x6a3a,
+	0x780f, 0x0000, 0x6833, 0x0000, 0x683f, 0x0000, 0x0c40, 0x683a,
+	0x6836, 0x0cc0, 0x7908, 0xd1fc, 0x1198, 0x6833, 0x0001, 0x683e,
+	0x6847, 0x0000, 0x684b, 0x0000, 0x0126, 0x00f6, 0x2091, 0x2400,
+	0x002e, 0x080c, 0x1c84, 0x19d8, 0x012e, 0x080c, 0xa134, 0x0878,
+	0x2001, 0x1837, 0x2004, 0x9084, 0x0028, 0x1188, 0x2001, 0x197b,
+	0x2004, 0x9086, 0xaaaa, 0x0158, 0x2001, 0x19e7, 0x2004, 0x9005,
+	0x11f0, 0x2001, 0x188b, 0x200c, 0xc185, 0xc18c, 0x2102, 0x2f00,
 	0x6833, 0x0001, 0x683e, 0x6847, 0x0000, 0x684b, 0x0000, 0x0126,
-	0x00f6, 0x2091, 0x2400, 0x002e, 0x080c, 0x1c53, 0x19d8, 0x012e,
-	0x080c, 0xa06d, 0x0878, 0x2001, 0x1837, 0x2004, 0x9084, 0x0028,
-	0x1188, 0x2001, 0x197b, 0x2004, 0x9086, 0xaaaa, 0x0158, 0x2001,
-	0x19e7, 0x2004, 0x9005, 0x11f0, 0x2001, 0x188b, 0x200c, 0xc185,
-	0xc18c, 0x2102, 0x2f00, 0x6833, 0x0001, 0x683e, 0x6847, 0x0000,
-	0x684b, 0x0000, 0x0126, 0x00f6, 0x2091, 0x2400, 0x002e, 0x080c,
-	0x1c53, 0x1904, 0x9812, 0x012e, 0x6a3c, 0x2278, 0x080c, 0x9ff7,
-	0x0804, 0x980a, 0x2011, 0x188b, 0x2204, 0xc08d, 0x2012, 0x0804,
-	0x980a, 0x6a04, 0x9296, 0x0006, 0x1904, 0x97cc, 0x6a30, 0x9296,
-	0x0000, 0x0904, 0x97f4, 0x0804, 0x97cc, 0x6020, 0x9084, 0x000f,
-	0x000b, 0x0005, 0x9891, 0x9896, 0x9d04, 0x9d93, 0x9896, 0x9d04,
-	0x9d93, 0x9891, 0x9896, 0x9891, 0x9891, 0x9891, 0x9891, 0x9891,
-	0x9891, 0x080c, 0x959a, 0x080c, 0x96a6, 0x0005, 0x00b6, 0x0156,
-	0x0136, 0x0146, 0x01c6, 0x01d6, 0x00c6, 0x00d6, 0x00e6, 0x00f6,
-	0x2069, 0x0200, 0x2071, 0x0240, 0x6004, 0x908a, 0x0053, 0x1a0c,
-	0x0dd5, 0x6110, 0x2158, 0xb9c0, 0x2c78, 0x2061, 0x0100, 0x619a,
-	0x908a, 0x0040, 0x1a04, 0x9902, 0x005b, 0x00fe, 0x00ee, 0x00de,
-	0x00ce, 0x01de, 0x01ce, 0x014e, 0x013e, 0x015e, 0x00be, 0x0005,
-	0x9a87, 0x9ac2, 0x9aeb, 0x9b93, 0x9bb5, 0x9bbb, 0x9bc8, 0x9bd0,
-	0x9bdc, 0x9be2, 0x9bf3, 0x9be2, 0x9c4b, 0x9bd0, 0x9c57, 0x9c5d,
-	0x9bdc, 0x9c5d, 0x9c69, 0x9900, 0x9900, 0x9900, 0x9900, 0x9900,
-	0x9900, 0x9900, 0x9900, 0x9900, 0x9900, 0x9900, 0xa47f, 0xa4a2,
-	0xa4b3, 0xa4d3, 0xa505, 0x9bc8, 0x9900, 0x9bc8, 0x9be2, 0x9900,
-	0x9aeb, 0x9b93, 0x9900, 0xa89e, 0x9be2, 0x9900, 0xa8ba, 0x9be2,
-	0x9900, 0x9bdc, 0x9a81, 0x9923, 0x9900, 0xa8d6, 0xa943, 0xaa1e,
-	0x9900, 0xaa2b, 0x9bc5, 0xaa56, 0x9900, 0xa50f, 0xaa83, 0x9900,
-	0x080c, 0x0dd5, 0x2100, 0x005b, 0x00fe, 0x00ee, 0x00de, 0x00ce,
-	0x01de, 0x01ce, 0x014e, 0x013e, 0x015e, 0x00be, 0x0005, 0xab1e,
-	0xabd0, 0x9921, 0x994a, 0x99f6, 0x9a01, 0x9921, 0x9bc8, 0x9921,
-	0x9a48, 0x9a54, 0x9965, 0x9921, 0x9980, 0x99b4, 0xad3d, 0xad82,
-	0x9be2, 0x080c, 0x0dd5, 0x00d6, 0x0096, 0x080c, 0x9c7c, 0x7003,
-	0x2414, 0x7007, 0x0018, 0x700b, 0x0800, 0x7814, 0x2048, 0xa83c,
-	0x700e, 0xa850, 0x7022, 0xa854, 0x7026, 0x60c3, 0x0018, 0x080c,
-	0xa263, 0x009e, 0x00de, 0x0005, 0x7810, 0x00b6, 0x2058, 0xb8a0,
-	0x00be, 0x080c, 0xadc9, 0x1118, 0x9084, 0xff80, 0x0110, 0x9085,
-	0x0001, 0x0005, 0x00d6, 0x0096, 0x080c, 0x9c7c, 0x7003, 0x0500,
-	0x7814, 0x2048, 0xa874, 0x700a, 0xa878, 0x700e, 0xa87c, 0x7012,
-	0xa880, 0x7016, 0xa884, 0x701a, 0xa888, 0x701e, 0x60c3, 0x0010,
-	0x080c, 0xa263, 0x009e, 0x00de, 0x0005, 0x00d6, 0x0096, 0x080c,
-	0x9c7c, 0x7003, 0x0500, 0x7814, 0x2048, 0xa8cc, 0x700a, 0xa8d0,
-	0x700e, 0xa8d4, 0x7012, 0xa8d8, 0x7016, 0xa8dc, 0x701a, 0xa8e0,
-	0x701e, 0x60c3, 0x0010, 0x080c, 0xa263, 0x009e, 0x00de, 0x0005,
-	0x00d6, 0x0096, 0x0126, 0x2091, 0x8000, 0x080c, 0x9c7c, 0x20e9,
-	0x0000, 0x2001, 0x19a2, 0x2003, 0x0000, 0x7814, 0x2048, 0xa814,
-	0x8003, 0x60c2, 0xa830, 0x20a8, 0xa860, 0x20e0, 0xa85c, 0x9080,
-	0x001b, 0x2098, 0x2001, 0x19a2, 0x0016, 0x200c, 0x2001, 0x0001,
-	0x080c, 0x23c4, 0x080c, 0xd896, 0x9006, 0x080c, 0x23c4, 0x001e,
-	0xa804, 0x9005, 0x0110, 0x2048, 0x0c28, 0x04d9, 0x080c, 0xa263,
-	0x012e, 0x009e, 0x00de, 0x0005, 0x00d6, 0x0096, 0x0126, 0x2091,
-	0x8000, 0x080c, 0x9cc7, 0x20e9, 0x0000, 0x2001, 0x19a2, 0x2003,
-	0x0000, 0x7814, 0x2048, 0xa86f, 0x0200, 0xa873, 0x0000, 0xa814,
-	0x8003, 0x60c2, 0xa830, 0x20a8, 0xa860, 0x20e0, 0xa85c, 0x9080,
-	0x001b, 0x2098, 0x2001, 0x19a2, 0x0016, 0x200c, 0x080c, 0xd896,
-	0x001e, 0xa804, 0x9005, 0x0110, 0x2048, 0x0c60, 0x0051, 0x7814,
-	0x2048, 0x080c, 0x0fb1, 0x080c, 0xa263, 0x012e, 0x009e, 0x00de,
-	0x0005, 0x60c0, 0x8004, 0x9084, 0x0003, 0x9005, 0x0130, 0x9082,
-	0x0004, 0x20a3, 0x0000, 0x8000, 0x1de0, 0x0005, 0x080c, 0x9c7c,
-	0x7003, 0x7800, 0x7808, 0x8007, 0x700a, 0x60c3, 0x0008, 0x0804,
-	0xa263, 0x00d6, 0x00e6, 0x080c, 0x9cc7, 0x7814, 0x9084, 0xff00,
-	0x2073, 0x0200, 0x8e70, 0x8e70, 0x9095, 0x0010, 0x2272, 0x8e70,
-	0x2073, 0x0034, 0x8e70, 0x2069, 0x1805, 0x20a9, 0x0004, 0x2d76,
-	0x8d68, 0x8e70, 0x1f04, 0x9a17, 0x2069, 0x1801, 0x20a9, 0x0004,
-	0x2d76, 0x8d68, 0x8e70, 0x1f04, 0x9a20, 0x2069, 0x19b2, 0x9086,
-	0xdf00, 0x0110, 0x2069, 0x19cc, 0x20a9, 0x001a, 0x9e86, 0x0260,
-	0x1148, 0x00c6, 0x2061, 0x0200, 0x6010, 0x8000, 0x6012, 0x00ce,
-	0x2071, 0x0240, 0x2d04, 0x8007, 0x2072, 0x8d68, 0x8e70, 0x1f04,
-	0x9a2e, 0x60c3, 0x004c, 0x080c, 0xa263, 0x00ee, 0x00de, 0x0005,
-	0x080c, 0x9c7c, 0x7003, 0x6300, 0x7007, 0x0028, 0x7808, 0x700e,
-	0x60c3, 0x0008, 0x0804, 0xa263, 0x00d6, 0x0026, 0x0016, 0x080c,
-	0x9cc7, 0x7003, 0x0200, 0x7814, 0x700e, 0x00e6, 0x9ef0, 0x0004,
-	0x2009, 0x0001, 0x2011, 0x000c, 0x2069, 0x1923, 0x6810, 0xd084,
-	0x1148, 0x2073, 0x0500, 0x8e70, 0x2073, 0x0000, 0x8e70, 0x8108,
-	0x9290, 0x0004, 0x2073, 0x0800, 0x8e70, 0x2073, 0x0000, 0x00ee,
-	0x7206, 0x710a, 0x62c2, 0x080c, 0xa263, 0x001e, 0x002e, 0x00de,
-	0x0005, 0x2001, 0x1818, 0x2004, 0x609a, 0x0804, 0xa263, 0x080c,
-	0x9c7c, 0x7003, 0x5200, 0x2069, 0x1847, 0x6804, 0xd084, 0x0130,
-	0x6828, 0x0016, 0x080c, 0x287e, 0x710e, 0x001e, 0x20a9, 0x0004,
-	0x20e1, 0x0001, 0x2099, 0x1805, 0x20e9, 0x0000, 0x20a1, 0x0250,
-	0x4003, 0x20a9, 0x0004, 0x2099, 0x1801, 0x20a1, 0x0254, 0x4003,
-	0x080c, 0xadc9, 0x1120, 0xb8a0, 0x9082, 0x007f, 0x0248, 0x2001,
-	0x181f, 0x2004, 0x7032, 0x2001, 0x1820, 0x2004, 0x7036, 0x0030,
-	0x2001, 0x1818, 0x2004, 0x9084, 0x00ff, 0x7036, 0x60c3, 0x001c,
-	0x0804, 0xa263, 0x080c, 0x9c7c, 0x7003, 0x0500, 0x080c, 0xadc9,
-	0x1120, 0xb8a0, 0x9082, 0x007f, 0x0248, 0x2001, 0x181f, 0x2004,
-	0x700a, 0x2001, 0x1820, 0x2004, 0x700e, 0x0030, 0x2001, 0x1818,
-	0x2004, 0x9084, 0x00ff, 0x700e, 0x20a9, 0x0004, 0x20e1, 0x0001,
-	0x2099, 0x1805, 0x20e9, 0x0000, 0x20a1, 0x0250, 0x4003, 0x60c3,
-	0x0010, 0x0804, 0xa263, 0x080c, 0x9c7c, 0x9006, 0x080c, 0x6953,
-	0xb8a0, 0x9086, 0x007e, 0x1130, 0x7003, 0x0400, 0x620c, 0xc2b4,
-	0x620e, 0x0058, 0x7814, 0x0096, 0x904d, 0x0120, 0x9006, 0xa89a,
-	0xa8a6, 0xa8aa, 0x009e, 0x7003, 0x0300, 0xb8a0, 0x9086, 0x007e,
-	0x1904, 0x9b5a, 0x00d6, 0x2069, 0x196b, 0x2001, 0x1837, 0x2004,
-	0xd0a4, 0x0188, 0x6800, 0x700a, 0x6808, 0x9084, 0x2000, 0x7012,
-	0x080c, 0xade0, 0x680c, 0x7016, 0x701f, 0x2710, 0x6818, 0x7022,
-	0x681c, 0x7026, 0x0090, 0x6800, 0x700a, 0x6804, 0x700e, 0x6808,
-	0x080c, 0x73b3, 0x1118, 0x9084, 0x37ff, 0x0010, 0x9084, 0x3fff,
-	0x7012, 0x080c, 0xade0, 0x680c, 0x7016, 0x00de, 0x20a9, 0x0004,
-	0x20e1, 0x0001, 0x2099, 0x1805, 0x20e9, 0x0000, 0x20a1, 0x0256,
-	0x4003, 0x20a9, 0x0004, 0x2099, 0x1801, 0x20a1, 0x025a, 0x4003,
-	0x00d6, 0x080c, 0xab05, 0x2069, 0x1973, 0x2071, 0x024e, 0x6800,
-	0xc0dd, 0x7002, 0x080c, 0x56e6, 0xd0e4, 0x0110, 0x680c, 0x700e,
-	0x00de, 0x04a8, 0x2001, 0x1837, 0x2004, 0xd0a4, 0x0170, 0x0016,
-	0x2001, 0x196c, 0x200c, 0x60e0, 0x9106, 0x0130, 0x2100, 0x60e3,
-	0x0000, 0x080c, 0x28bf, 0x61e2, 0x001e, 0x20e1, 0x0001, 0x2099,
-	0x196b, 0x20e9, 0x0000, 0x20a1, 0x024e, 0x20a9, 0x0008, 0x4003,
-	0x20a9, 0x0004, 0x2099, 0x1805, 0x20a1, 0x0256, 0x4003, 0x20a9,
-	0x0004, 0x2099, 0x1801, 0x20a1, 0x025a, 0x4003, 0x080c, 0xab05,
-	0x20a1, 0x024e, 0x20a9, 0x0008, 0x2099, 0x1973, 0x4003, 0x60c3,
-	0x0074, 0x0804, 0xa263, 0x080c, 0x9c7c, 0x7003, 0x2010, 0x7007,
-	0x0014, 0x700b, 0x0800, 0x700f, 0x2000, 0x9006, 0x00f6, 0x2079,
-	0x1847, 0x7904, 0x00fe, 0xd1ac, 0x1110, 0x9085, 0x0020, 0xd1a4,
-	0x0110, 0x9085, 0x0010, 0x9085, 0x0002, 0x00d6, 0x0804, 0x9c2c,
-	0x7026, 0x60c3, 0x0014, 0x0804, 0xa263, 0x080c, 0x9c7c, 0x7003,
-	0x5000, 0x0804, 0x9b05, 0x080c, 0x9c7c, 0x7003, 0x2110, 0x7007,
-	0x0014, 0x60c3, 0x0014, 0x0804, 0xa263, 0x080c, 0x9cbe, 0x0010,
-	0x080c, 0x9cc7, 0x7003, 0x0200, 0x60c3, 0x0004, 0x0804, 0xa263,
-	0x080c, 0x9cc7, 0x7003, 0x0100, 0x700b, 0x0003, 0x700f, 0x2a00,
-	0x60c3, 0x0008, 0x0804, 0xa263, 0x080c, 0x9cc7, 0x7003, 0x0200,
-	0x0804, 0x9b05, 0x080c, 0x9cc7, 0x7003, 0x0100, 0x782c, 0x9005,
-	0x0110, 0x700a, 0x0010, 0x700b, 0x0003, 0x7814, 0x700e, 0x60c3,
-	0x0008, 0x0804, 0xa263, 0x00d6, 0x080c, 0x9cc7, 0x7003, 0x0210,
-	0x7007, 0x0014, 0x700b, 0x0800, 0xb894, 0x9086, 0x0014, 0x1198,
-	0xb99c, 0x9184, 0x0030, 0x0190, 0xb998, 0x9184, 0xc000, 0x1140,
-	0xd1ec, 0x0118, 0x700f, 0x2100, 0x0058, 0x700f, 0x0100, 0x0040,
-	0x700f, 0x0400, 0x0028, 0x700f, 0x0700, 0x0010, 0x700f, 0x0800,
-	0x00f6, 0x2079, 0x1847, 0x7904, 0x00fe, 0xd1ac, 0x1110, 0x9085,
-	0x0020, 0xd1a4, 0x0110, 0x9085, 0x0010, 0x2009, 0x1869, 0x210c,
-	0xd184, 0x1110, 0x9085, 0x0002, 0x0026, 0x2009, 0x1867, 0x210c,
-	0xd1e4, 0x0150, 0xc0c5, 0xbacc, 0xd28c, 0x1108, 0xc0cd, 0x9094,
-	0x0030, 0x9296, 0x0010, 0x0140, 0xd1ec, 0x0130, 0x9094, 0x0030,
-	0x9296, 0x0010, 0x0108, 0xc0bd, 0x002e, 0x7026, 0x60c3, 0x0014,
-	0x00de, 0x0804, 0xa263, 0x080c, 0x9cc7, 0x7003, 0x0210, 0x7007,
-	0x0014, 0x700f, 0x0100, 0x60c3, 0x0014, 0x0804, 0xa263, 0x080c,
-	0x9cc7, 0x7003, 0x0200, 0x0804, 0x9a8b, 0x080c, 0x9cc7, 0x7003,
+	0x00f6, 0x2091, 0x2400, 0x002e, 0x080c, 0x1c84, 0x1904, 0x98cf,
+	0x012e, 0x6a3c, 0x2278, 0x080c, 0xa0be, 0x0804, 0x98c7, 0x2011,
+	0x188b, 0x2204, 0xc08d, 0x2012, 0x0804, 0x98c7, 0x6a04, 0x9296,
+	0x0006, 0x1904, 0x9889, 0x6a30, 0x9296, 0x0000, 0x0904, 0x98b1,
+	0x0804, 0x9889, 0x6020, 0x9084, 0x000f, 0x000b, 0x0005, 0x994e,
+	0x9953, 0x9dc1, 0x9e5a, 0x9953, 0x9dc1, 0x9e5a, 0x994e, 0x9953,
+	0x994e, 0x994e, 0x994e, 0x994e, 0x994e, 0x994e, 0x080c, 0x9657,
+	0x080c, 0x9763, 0x0005, 0x00b6, 0x0156, 0x0136, 0x0146, 0x01c6,
+	0x01d6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x2069, 0x0200, 0x2071,
+	0x0240, 0x6004, 0x908a, 0x0053, 0x1a0c, 0x0dd5, 0x6110, 0x2158,
+	0xb9c0, 0x2c78, 0x2061, 0x0100, 0x619a, 0x908a, 0x0040, 0x1a04,
+	0x99bf, 0x005b, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x01de, 0x01ce,
+	0x014e, 0x013e, 0x015e, 0x00be, 0x0005, 0x9b44, 0x9b7f, 0x9ba8,
+	0x9c50, 0x9c72, 0x9c78, 0x9c85, 0x9c8d, 0x9c99, 0x9c9f, 0x9cb0,
+	0x9c9f, 0x9d08, 0x9c8d, 0x9d14, 0x9d1a, 0x9c99, 0x9d1a, 0x9d26,
+	0x99bd, 0x99bd, 0x99bd, 0x99bd, 0x99bd, 0x99bd, 0x99bd, 0x99bd,
+	0x99bd, 0x99bd, 0x99bd, 0xa563, 0xa586, 0xa597, 0xa5b7, 0xa5e9,
+	0x9c85, 0x99bd, 0x9c85, 0x9c9f, 0x99bd, 0x9ba8, 0x9c50, 0x99bd,
+	0xa982, 0x9c9f, 0x99bd, 0xa99e, 0x9c9f, 0x99bd, 0x9c99, 0x9b3e,
+	0x99e0, 0x99bd, 0xa9ba, 0xaa27, 0xab02, 0x99bd, 0xab0f, 0x9c82,
+	0xab3a, 0x99bd, 0xa5f3, 0xab67, 0x99bd, 0x080c, 0x0dd5, 0x2100,
+	0x005b, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x01de, 0x01ce, 0x014e,
+	0x013e, 0x015e, 0x00be, 0x0005, 0xac02, 0xacb4, 0x99de, 0x9a07,
+	0x9ab3, 0x9abe, 0x99de, 0x9c85, 0x99de, 0x9b05, 0x9b11, 0x9a22,
+	0x99de, 0x9a3d, 0x9a71, 0xae21, 0xae66, 0x9c9f, 0x080c, 0x0dd5,
+	0x00d6, 0x0096, 0x080c, 0x9d39, 0x7003, 0x2414, 0x7007, 0x0018,
+	0x700b, 0x0800, 0x7814, 0x2048, 0xa83c, 0x700e, 0xa850, 0x7022,
+	0xa854, 0x7026, 0x60c3, 0x0018, 0x080c, 0xa32a, 0x009e, 0x00de,
+	0x0005, 0x7810, 0x00b6, 0x2058, 0xb8a0, 0x00be, 0x080c, 0xaead,
+	0x1118, 0x9084, 0xff80, 0x0110, 0x9085, 0x0001, 0x0005, 0x00d6,
+	0x0096, 0x080c, 0x9d39, 0x7003, 0x0500, 0x7814, 0x2048, 0xa874,
+	0x700a, 0xa878, 0x700e, 0xa87c, 0x7012, 0xa880, 0x7016, 0xa884,
+	0x701a, 0xa888, 0x701e, 0x60c3, 0x0010, 0x080c, 0xa32a, 0x009e,
+	0x00de, 0x0005, 0x00d6, 0x0096, 0x080c, 0x9d39, 0x7003, 0x0500,
+	0x7814, 0x2048, 0xa8cc, 0x700a, 0xa8d0, 0x700e, 0xa8d4, 0x7012,
+	0xa8d8, 0x7016, 0xa8dc, 0x701a, 0xa8e0, 0x701e, 0x60c3, 0x0010,
+	0x080c, 0xa32a, 0x009e, 0x00de, 0x0005, 0x00d6, 0x0096, 0x0126,
+	0x2091, 0x8000, 0x080c, 0x9d39, 0x20e9, 0x0000, 0x2001, 0x19a2,
+	0x2003, 0x0000, 0x7814, 0x2048, 0xa814, 0x8003, 0x60c2, 0xa830,
+	0x20a8, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x001b, 0x2098, 0x2001,
+	0x19a2, 0x0016, 0x200c, 0x2001, 0x0001, 0x080c, 0x23f5, 0x080c,
+	0xd9e7, 0x9006, 0x080c, 0x23f5, 0x001e, 0xa804, 0x9005, 0x0110,
+	0x2048, 0x0c28, 0x04d9, 0x080c, 0xa32a, 0x012e, 0x009e, 0x00de,
+	0x0005, 0x00d6, 0x0096, 0x0126, 0x2091, 0x8000, 0x080c, 0x9d84,
+	0x20e9, 0x0000, 0x2001, 0x19a2, 0x2003, 0x0000, 0x7814, 0x2048,
+	0xa86f, 0x0200, 0xa873, 0x0000, 0xa814, 0x8003, 0x60c2, 0xa830,
+	0x20a8, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x001b, 0x2098, 0x2001,
+	0x19a2, 0x0016, 0x200c, 0x080c, 0xd9e7, 0x001e, 0xa804, 0x9005,
+	0x0110, 0x2048, 0x0c60, 0x0051, 0x7814, 0x2048, 0x080c, 0x0fb1,
+	0x080c, 0xa32a, 0x012e, 0x009e, 0x00de, 0x0005, 0x60c0, 0x8004,
+	0x9084, 0x0003, 0x9005, 0x0130, 0x9082, 0x0004, 0x20a3, 0x0000,
+	0x8000, 0x1de0, 0x0005, 0x080c, 0x9d39, 0x7003, 0x7800, 0x7808,
+	0x8007, 0x700a, 0x60c3, 0x0008, 0x0804, 0xa32a, 0x00d6, 0x00e6,
+	0x080c, 0x9d84, 0x7814, 0x9084, 0xff00, 0x2073, 0x0200, 0x8e70,
+	0x8e70, 0x9095, 0x0010, 0x2272, 0x8e70, 0x2073, 0x0034, 0x8e70,
+	0x2069, 0x1805, 0x20a9, 0x0004, 0x2d76, 0x8d68, 0x8e70, 0x1f04,
+	0x9ad4, 0x2069, 0x1801, 0x20a9, 0x0004, 0x2d76, 0x8d68, 0x8e70,
+	0x1f04, 0x9add, 0x2069, 0x19b2, 0x9086, 0xdf00, 0x0110, 0x2069,
+	0x19cc, 0x20a9, 0x001a, 0x9e86, 0x0260, 0x1148, 0x00c6, 0x2061,
+	0x0200, 0x6010, 0x8000, 0x6012, 0x00ce, 0x2071, 0x0240, 0x2d04,
+	0x8007, 0x2072, 0x8d68, 0x8e70, 0x1f04, 0x9aeb, 0x60c3, 0x004c,
+	0x080c, 0xa32a, 0x00ee, 0x00de, 0x0005, 0x080c, 0x9d39, 0x7003,
+	0x6300, 0x7007, 0x0028, 0x7808, 0x700e, 0x60c3, 0x0008, 0x0804,
+	0xa32a, 0x00d6, 0x0026, 0x0016, 0x080c, 0x9d84, 0x7003, 0x0200,
+	0x7814, 0x700e, 0x00e6, 0x9ef0, 0x0004, 0x2009, 0x0001, 0x2011,
+	0x000c, 0x2069, 0x1923, 0x6810, 0xd084, 0x1148, 0x2073, 0x0500,
+	0x8e70, 0x2073, 0x0000, 0x8e70, 0x8108, 0x9290, 0x0004, 0x2073,
+	0x0800, 0x8e70, 0x2073, 0x0000, 0x00ee, 0x7206, 0x710a, 0x62c2,
+	0x080c, 0xa32a, 0x001e, 0x002e, 0x00de, 0x0005, 0x2001, 0x1818,
+	0x2004, 0x609a, 0x0804, 0xa32a, 0x080c, 0x9d39, 0x7003, 0x5200,
+	0x2069, 0x1847, 0x6804, 0xd084, 0x0130, 0x6828, 0x0016, 0x080c,
+	0x28af, 0x710e, 0x001e, 0x20a9, 0x0004, 0x20e1, 0x0001, 0x2099,
+	0x1805, 0x20e9, 0x0000, 0x20a1, 0x0250, 0x4003, 0x20a9, 0x0004,
+	0x2099, 0x1801, 0x20a1, 0x0254, 0x4003, 0x080c, 0xaead, 0x1120,
+	0xb8a0, 0x9082, 0x007f, 0x0248, 0x2001, 0x181f, 0x2004, 0x7032,
+	0x2001, 0x1820, 0x2004, 0x7036, 0x0030, 0x2001, 0x1818, 0x2004,
+	0x9084, 0x00ff, 0x7036, 0x60c3, 0x001c, 0x0804, 0xa32a, 0x080c,
+	0x9d39, 0x7003, 0x0500, 0x080c, 0xaead, 0x1120, 0xb8a0, 0x9082,
+	0x007f, 0x0248, 0x2001, 0x181f, 0x2004, 0x700a, 0x2001, 0x1820,
+	0x2004, 0x700e, 0x0030, 0x2001, 0x1818, 0x2004, 0x9084, 0x00ff,
+	0x700e, 0x20a9, 0x0004, 0x20e1, 0x0001, 0x2099, 0x1805, 0x20e9,
+	0x0000, 0x20a1, 0x0250, 0x4003, 0x60c3, 0x0010, 0x0804, 0xa32a,
+	0x080c, 0x9d39, 0x9006, 0x080c, 0x69d6, 0xb8a0, 0x9086, 0x007e,
+	0x1130, 0x7003, 0x0400, 0x620c, 0xc2b4, 0x620e, 0x0058, 0x7814,
+	0x0096, 0x904d, 0x0120, 0x9006, 0xa89a, 0xa8a6, 0xa8aa, 0x009e,
+	0x7003, 0x0300, 0xb8a0, 0x9086, 0x007e, 0x1904, 0x9c17, 0x00d6,
+	0x2069, 0x196b, 0x2001, 0x1837, 0x2004, 0xd0a4, 0x0188, 0x6800,
+	0x700a, 0x6808, 0x9084, 0x2000, 0x7012, 0x080c, 0xaec4, 0x680c,
+	0x7016, 0x701f, 0x2710, 0x6818, 0x7022, 0x681c, 0x7026, 0x0090,
+	0x6800, 0x700a, 0x6804, 0x700e, 0x6808, 0x080c, 0x743e, 0x1118,
+	0x9084, 0x37ff, 0x0010, 0x9084, 0x3fff, 0x7012, 0x080c, 0xaec4,
+	0x680c, 0x7016, 0x00de, 0x20a9, 0x0004, 0x20e1, 0x0001, 0x2099,
+	0x1805, 0x20e9, 0x0000, 0x20a1, 0x0256, 0x4003, 0x20a9, 0x0004,
+	0x2099, 0x1801, 0x20a1, 0x025a, 0x4003, 0x00d6, 0x080c, 0xabe9,
+	0x2069, 0x1973, 0x2071, 0x024e, 0x6800, 0xc0dd, 0x7002, 0x080c,
+	0x5761, 0xd0e4, 0x0110, 0x680c, 0x700e, 0x00de, 0x04a8, 0x2001,
+	0x1837, 0x2004, 0xd0a4, 0x0170, 0x0016, 0x2001, 0x196c, 0x200c,
+	0x60e0, 0x9106, 0x0130, 0x2100, 0x60e3, 0x0000, 0x080c, 0x28f0,
+	0x61e2, 0x001e, 0x20e1, 0x0001, 0x2099, 0x196b, 0x20e9, 0x0000,
+	0x20a1, 0x024e, 0x20a9, 0x0008, 0x4003, 0x20a9, 0x0004, 0x2099,
+	0x1805, 0x20a1, 0x0256, 0x4003, 0x20a9, 0x0004, 0x2099, 0x1801,
+	0x20a1, 0x025a, 0x4003, 0x080c, 0xabe9, 0x20a1, 0x024e, 0x20a9,
+	0x0008, 0x2099, 0x1973, 0x4003, 0x60c3, 0x0074, 0x0804, 0xa32a,
+	0x080c, 0x9d39, 0x7003, 0x2010, 0x7007, 0x0014, 0x700b, 0x0800,
+	0x700f, 0x2000, 0x9006, 0x00f6, 0x2079, 0x1847, 0x7904, 0x00fe,
+	0xd1ac, 0x1110, 0x9085, 0x0020, 0xd1a4, 0x0110, 0x9085, 0x0010,
+	0x9085, 0x0002, 0x00d6, 0x0804, 0x9ce9, 0x7026, 0x60c3, 0x0014,
+	0x0804, 0xa32a, 0x080c, 0x9d39, 0x7003, 0x5000, 0x0804, 0x9bc2,
+	0x080c, 0x9d39, 0x7003, 0x2110, 0x7007, 0x0014, 0x60c3, 0x0014,
+	0x0804, 0xa32a, 0x080c, 0x9d7b, 0x0010, 0x080c, 0x9d84, 0x7003,
+	0x0200, 0x60c3, 0x0004, 0x0804, 0xa32a, 0x080c, 0x9d84, 0x7003,
 	0x0100, 0x700b, 0x0003, 0x700f, 0x2a00, 0x60c3, 0x0008, 0x0804,
-	0xa263, 0x080c, 0x9cc7, 0x7003, 0x0100, 0x700b, 0x000b, 0x60c3,
-	0x0008, 0x0804, 0xa263, 0x0026, 0x00d6, 0x0036, 0x0046, 0x2019,
-	0x3200, 0x2021, 0x0800, 0x0040, 0x0026, 0x00d6, 0x0036, 0x0046,
-	0x2019, 0x2200, 0x2021, 0x0100, 0x080c, 0xab1a, 0xb810, 0x9305,
+	0xa32a, 0x080c, 0x9d84, 0x7003, 0x0200, 0x0804, 0x9bc2, 0x080c,
+	0x9d84, 0x7003, 0x0100, 0x782c, 0x9005, 0x0110, 0x700a, 0x0010,
+	0x700b, 0x0003, 0x7814, 0x700e, 0x60c3, 0x0008, 0x0804, 0xa32a,
+	0x00d6, 0x080c, 0x9d84, 0x7003, 0x0210, 0x7007, 0x0014, 0x700b,
+	0x0800, 0xb894, 0x9086, 0x0014, 0x1198, 0xb99c, 0x9184, 0x0030,
+	0x0190, 0xb998, 0x9184, 0xc000, 0x1140, 0xd1ec, 0x0118, 0x700f,
+	0x2100, 0x0058, 0x700f, 0x0100, 0x0040, 0x700f, 0x0400, 0x0028,
+	0x700f, 0x0700, 0x0010, 0x700f, 0x0800, 0x00f6, 0x2079, 0x1847,
+	0x7904, 0x00fe, 0xd1ac, 0x1110, 0x9085, 0x0020, 0xd1a4, 0x0110,
+	0x9085, 0x0010, 0x2009, 0x1869, 0x210c, 0xd184, 0x1110, 0x9085,
+	0x0002, 0x0026, 0x2009, 0x1867, 0x210c, 0xd1e4, 0x0150, 0xc0c5,
+	0xbacc, 0xd28c, 0x1108, 0xc0cd, 0x9094, 0x0030, 0x9296, 0x0010,
+	0x0140, 0xd1ec, 0x0130, 0x9094, 0x0030, 0x9296, 0x0010, 0x0108,
+	0xc0bd, 0x002e, 0x7026, 0x60c3, 0x0014, 0x00de, 0x0804, 0xa32a,
+	0x080c, 0x9d84, 0x7003, 0x0210, 0x7007, 0x0014, 0x700f, 0x0100,
+	0x60c3, 0x0014, 0x0804, 0xa32a, 0x080c, 0x9d84, 0x7003, 0x0200,
+	0x0804, 0x9b48, 0x080c, 0x9d84, 0x7003, 0x0100, 0x700b, 0x0003,
+	0x700f, 0x2a00, 0x60c3, 0x0008, 0x0804, 0xa32a, 0x080c, 0x9d84,
+	0x7003, 0x0100, 0x700b, 0x000b, 0x60c3, 0x0008, 0x0804, 0xa32a,
+	0x0026, 0x00d6, 0x0036, 0x0046, 0x2019, 0x3200, 0x2021, 0x0800,
+	0x0040, 0x0026, 0x00d6, 0x0036, 0x0046, 0x2019, 0x2200, 0x2021,
+	0x0100, 0x080c, 0xabfe, 0xb810, 0x9305, 0x7002, 0xb814, 0x7006,
+	0x2069, 0x1800, 0x687c, 0x700a, 0x6880, 0x700e, 0x9485, 0x0029,
+	0x7012, 0x004e, 0x003e, 0x00de, 0x080c, 0xa318, 0x721a, 0x9f95,
+	0x0000, 0x7222, 0x7027, 0xffff, 0x2071, 0x024c, 0x002e, 0x0005,
+	0x0026, 0x080c, 0xabfe, 0x7003, 0x02ff, 0x7007, 0xfffc, 0x00d6,
+	0x2069, 0x1800, 0x687c, 0x700a, 0x6880, 0x700e, 0x00de, 0x7013,
+	0x2029, 0x0c10, 0x7003, 0x0100, 0x7007, 0x0000, 0x700b, 0xfc02,
+	0x700f, 0x0000, 0x0005, 0x0026, 0x00d6, 0x0036, 0x0046, 0x2019,
+	0x3300, 0x2021, 0x0800, 0x0040, 0x0026, 0x00d6, 0x0036, 0x0046,
+	0x2019, 0x2300, 0x2021, 0x0100, 0x080c, 0xabfe, 0xb810, 0x9305,
+	0x7002, 0xb814, 0x7006, 0x2069, 0x1800, 0xb810, 0x9005, 0x1140,
+	0xb814, 0x9005, 0x1128, 0x700b, 0x00ff, 0x700f, 0xfffe, 0x0020,
+	0x687c, 0x700a, 0x6880, 0x700e, 0x0000, 0x9485, 0x0098, 0x7012,
+	0x004e, 0x003e, 0x00de, 0x080c, 0xa318, 0x721a, 0x7a08, 0x7222,
+	0x2f10, 0x7226, 0x2071, 0x024c, 0x002e, 0x0005, 0x080c, 0xa318,
+	0x721a, 0x7a08, 0x7222, 0x7814, 0x7026, 0x2071, 0x024c, 0x002e,
+	0x0005, 0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x2069, 0x0200,
+	0x2071, 0x0240, 0x6004, 0x908a, 0x0085, 0x0a0c, 0x0dd5, 0x908a,
+	0x0092, 0x1a0c, 0x0dd5, 0x6110, 0x2158, 0xb9c0, 0x2c78, 0x2061,
+	0x0100, 0x619a, 0x9082, 0x0085, 0x0033, 0x00fe, 0x00ee, 0x00de,
+	0x00ce, 0x00be, 0x0005, 0x9df2, 0x9e01, 0x9e0c, 0x9df0, 0x9df0,
+	0x9df0, 0x9df2, 0x9df0, 0x9df0, 0x9df0, 0x9df0, 0x9df0, 0x9df0,
+	0x080c, 0x0dd5, 0x0411, 0x60c3, 0x0000, 0x0026, 0x080c, 0x2be3,
+	0x0228, 0x2011, 0x0101, 0x2204, 0xc0c5, 0x2012, 0x002e, 0x0804,
+	0xa32a, 0x0431, 0x7808, 0x700a, 0x7814, 0x700e, 0x7017, 0xffff,
+	0x60c3, 0x000c, 0x0804, 0xa32a, 0x04a1, 0x7003, 0x0003, 0x7007,
+	0x0300, 0x60c3, 0x0004, 0x0804, 0xa32a, 0x0026, 0x080c, 0xabfe,
+	0xb810, 0x9085, 0x8100, 0x7002, 0xb814, 0x7006, 0x2069, 0x1800,
+	0x687c, 0x700a, 0x6880, 0x700e, 0x7013, 0x0009, 0x0804, 0x9d54,
+	0x0026, 0x080c, 0xabfe, 0xb810, 0x9085, 0x8400, 0x7002, 0xb814,
+	0x7006, 0x2069, 0x1800, 0x687c, 0x700a, 0x6880, 0x700e, 0x2001,
+	0x0099, 0x7a20, 0x9296, 0x0005, 0x0108, 0xc0bc, 0x7012, 0x0804,
+	0x9db6, 0x0026, 0x080c, 0xabfe, 0xb810, 0x9085, 0x8500, 0x7002,
+	0xb814, 0x7006, 0x2069, 0x1800, 0x687c, 0x700a, 0x6880, 0x700e,
+	0x2001, 0x0099, 0x7a20, 0x9296, 0x0005, 0x0108, 0xc0bc, 0x7012,
+	0x0804, 0x9db6, 0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x2c78,
+	0x2069, 0x0200, 0x2071, 0x0240, 0x7804, 0x908a, 0x0040, 0x0a0c,
+	0x0dd5, 0x908a, 0x0054, 0x1a0c, 0x0dd5, 0x7910, 0x2158, 0xb9c0,
+	0x2061, 0x0100, 0x619a, 0x9082, 0x0040, 0x0033, 0x00fe, 0x00ee,
+	0x00de, 0x00ce, 0x00be, 0x0005, 0x9e91, 0x9f4d, 0x9f20, 0xa06f,
+	0x9e8f, 0x9e8f, 0x9e8f, 0x9e8f, 0x9e8f, 0x9e8f, 0x9e8f, 0xa73e,
+	0xa746, 0xa74e, 0xa756, 0x9e8f, 0xab46, 0x9e8f, 0xa736, 0x080c,
+	0x0dd5, 0x0096, 0x780b, 0xffff, 0x080c, 0x9efc, 0x7914, 0x2148,
+	0xa978, 0x7956, 0xae64, 0x96b4, 0x00ff, 0x9686, 0x0008, 0x1148,
+	0xa8b4, 0x7032, 0xa8b8, 0x7036, 0xa8bc, 0x703a, 0xa8c0, 0x703e,
+	0x0008, 0x7132, 0xa97c, 0x9184, 0x000f, 0x1118, 0x2001, 0x0005,
+	0x0040, 0xd184, 0x0118, 0x2001, 0x0004, 0x0018, 0x9084, 0x0006,
+	0x8004, 0x2010, 0x785c, 0x9084, 0x00ff, 0x8007, 0x9205, 0x7042,
+	0xd1ac, 0x0158, 0x7047, 0x0002, 0x9686, 0x0008, 0x1118, 0x080c,
+	0x18dd, 0x0010, 0x080c, 0x1754, 0x0050, 0xd1b4, 0x0118, 0x7047,
+	0x0001, 0x0028, 0x7047, 0x0000, 0x9016, 0x2230, 0x0010, 0xaab0,
+	0xaeac, 0x726a, 0x766e, 0x20a9, 0x0008, 0x20e9, 0x0000, 0xa860,
+	0x20e0, 0xa85c, 0x9080, 0x0023, 0x2098, 0x20a1, 0x0252, 0x2069,
+	0x0200, 0x6813, 0x0018, 0x4003, 0x6813, 0x0008, 0x60c3, 0x0020,
+	0x6017, 0x0009, 0x2001, 0x1a02, 0x2003, 0x07d0, 0x2001, 0x1a01,
+	0x2003, 0x0009, 0x009e, 0x0005, 0x6813, 0x0008, 0xba8c, 0x8210,
+	0xb8cc, 0xd084, 0x0128, 0x7a4a, 0x7b14, 0x7b46, 0x722e, 0x732a,
+	0x9294, 0x00ff, 0xba8e, 0x8217, 0x721a, 0xba10, 0x9295, 0x0600,
+	0x7202, 0xba14, 0x7206, 0x2069, 0x1800, 0x6a7c, 0x720a, 0x6a80,
+	0x720e, 0x7013, 0x0829, 0x2f10, 0x7222, 0x7027, 0xffff, 0x0005,
+	0x00d6, 0x0096, 0x0081, 0x7814, 0x2048, 0xa890, 0x7002, 0xa88c,
+	0x7006, 0xa8b0, 0x700a, 0xa8ac, 0x700e, 0x60c3, 0x000c, 0x009e,
+	0x00de, 0x0804, 0xa32a, 0x6813, 0x0008, 0xb810, 0x9085, 0x0500,
 	0x7002, 0xb814, 0x7006, 0x2069, 0x1800, 0x687c, 0x700a, 0x6880,
-	0x700e, 0x9485, 0x0029, 0x7012, 0x004e, 0x003e, 0x00de, 0x080c,
-	0xa251, 0x721a, 0x9f95, 0x0000, 0x7222, 0x7027, 0xffff, 0x2071,
-	0x024c, 0x002e, 0x0005, 0x0026, 0x080c, 0xab1a, 0x7003, 0x02ff,
-	0x7007, 0xfffc, 0x00d6, 0x2069, 0x1800, 0x687c, 0x700a, 0x6880,
-	0x700e, 0x00de, 0x7013, 0x2029, 0x0c10, 0x7003, 0x0100, 0x7007,
-	0x0000, 0x700b, 0xfc02, 0x700f, 0x0000, 0x0005, 0x0026, 0x00d6,
-	0x0036, 0x0046, 0x2019, 0x3300, 0x2021, 0x0800, 0x0040, 0x0026,
-	0x00d6, 0x0036, 0x0046, 0x2019, 0x2300, 0x2021, 0x0100, 0x080c,
-	0xab1a, 0xb810, 0x9305, 0x7002, 0xb814, 0x7006, 0x2069, 0x1800,
-	0xb810, 0x9005, 0x1140, 0xb814, 0x9005, 0x1128, 0x700b, 0x00ff,
-	0x700f, 0xfffe, 0x0020, 0x687c, 0x700a, 0x6880, 0x700e, 0x0000,
-	0x9485, 0x0098, 0x7012, 0x004e, 0x003e, 0x00de, 0x080c, 0xa251,
-	0x721a, 0x7a08, 0x7222, 0x2f10, 0x7226, 0x2071, 0x024c, 0x002e,
-	0x0005, 0x080c, 0xa251, 0x721a, 0x7a08, 0x7222, 0x7814, 0x7026,
-	0x2071, 0x024c, 0x002e, 0x0005, 0x00b6, 0x00c6, 0x00d6, 0x00e6,
-	0x00f6, 0x2069, 0x0200, 0x2071, 0x0240, 0x6004, 0x908a, 0x0085,
-	0x0a0c, 0x0dd5, 0x908a, 0x0092, 0x1a0c, 0x0dd5, 0x6110, 0x2158,
-	0xb9c0, 0x2c78, 0x2061, 0x0100, 0x619a, 0x9082, 0x0085, 0x0033,
-	0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x0005, 0x9d35, 0x9d44,
-	0x9d4f, 0x9d33, 0x9d33, 0x9d33, 0x9d35, 0x9d33, 0x9d33, 0x9d33,
-	0x9d33, 0x9d33, 0x9d33, 0x080c, 0x0dd5, 0x0411, 0x60c3, 0x0000,
-	0x0026, 0x080c, 0x2bb2, 0x0228, 0x2011, 0x0101, 0x2204, 0xc0c5,
-	0x2012, 0x002e, 0x0804, 0xa263, 0x0431, 0x7808, 0x700a, 0x7814,
-	0x700e, 0x7017, 0xffff, 0x60c3, 0x000c, 0x0804, 0xa263, 0x0479,
-	0x7003, 0x0003, 0x7007, 0x0300, 0x60c3, 0x0004, 0x0804, 0xa263,
-	0x0026, 0x080c, 0xab1a, 0xb810, 0x9085, 0x8100, 0x7002, 0xb814,
-	0x7006, 0x2069, 0x1800, 0x687c, 0x700a, 0x6880, 0x700e, 0x7013,
-	0x0009, 0x0804, 0x9c97, 0x0026, 0x080c, 0xab1a, 0xb810, 0x9085,
-	0x8400, 0x7002, 0xb814, 0x7006, 0x2069, 0x1800, 0x687c, 0x700a,
-	0x6880, 0x700e, 0x2001, 0x0099, 0x7012, 0x0804, 0x9cf9, 0x0026,
-	0x080c, 0xab1a, 0xb810, 0x9085, 0x8500, 0x7002, 0xb814, 0x7006,
-	0x2069, 0x1800, 0x687c, 0x700a, 0x6880, 0x700e, 0x2001, 0x0099,
-	0x7012, 0x0804, 0x9cf9, 0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6,
-	0x2c78, 0x2069, 0x0200, 0x2071, 0x0240, 0x7804, 0x908a, 0x0040,
-	0x0a0c, 0x0dd5, 0x908a, 0x0054, 0x1a0c, 0x0dd5, 0x7910, 0x2158,
-	0xb9c0, 0x2061, 0x0100, 0x619a, 0x9082, 0x0040, 0x0033, 0x00fe,
-	0x00ee, 0x00de, 0x00ce, 0x00be, 0x0005, 0x9dca, 0x9e86, 0x9e59,
-	0x9fa8, 0x9dc8, 0x9dc8, 0x9dc8, 0x9dc8, 0x9dc8, 0x9dc8, 0x9dc8,
-	0xa65a, 0xa662, 0xa66a, 0xa672, 0x9dc8, 0xaa62, 0x9dc8, 0xa652,
-	0x080c, 0x0dd5, 0x0096, 0x780b, 0xffff, 0x080c, 0x9e35, 0x7914,
-	0x2148, 0xa978, 0x7956, 0xae64, 0x96b4, 0x00ff, 0x9686, 0x0008,
-	0x1148, 0xa8b4, 0x7032, 0xa8b8, 0x7036, 0xa8bc, 0x703a, 0xa8c0,
-	0x703e, 0x0008, 0x7132, 0xa97c, 0x9184, 0x000f, 0x1118, 0x2001,
-	0x0005, 0x0040, 0xd184, 0x0118, 0x2001, 0x0004, 0x0018, 0x9084,
-	0x0006, 0x8004, 0x2010, 0x785c, 0x9084, 0x00ff, 0x8007, 0x9205,
-	0x7042, 0xd1ac, 0x0158, 0x7047, 0x0002, 0x9686, 0x0008, 0x1118,
-	0x080c, 0x18ae, 0x0010, 0x080c, 0x1727, 0x0050, 0xd1b4, 0x0118,
-	0x7047, 0x0001, 0x0028, 0x7047, 0x0000, 0x9016, 0x2230, 0x0010,
-	0xaab0, 0xaeac, 0x726a, 0x766e, 0x20a9, 0x0008, 0x20e9, 0x0000,
-	0xa860, 0x20e0, 0xa85c, 0x9080, 0x0023, 0x2098, 0x20a1, 0x0252,
-	0x2069, 0x0200, 0x6813, 0x0018, 0x4003, 0x6813, 0x0008, 0x60c3,
-	0x0020, 0x6017, 0x0009, 0x2001, 0x1a02, 0x2003, 0x07d0, 0x2001,
-	0x1a01, 0x2003, 0x0009, 0x009e, 0x0005, 0x6813, 0x0008, 0xba8c,
-	0x8210, 0xb8cc, 0xd084, 0x0128, 0x7a46, 0x7b14, 0x7b4a, 0x722e,
-	0x732a, 0x9294, 0x00ff, 0xba8e, 0x8217, 0x721a, 0xba10, 0x9295,
-	0x0600, 0x7202, 0xba14, 0x7206, 0x2069, 0x1800, 0x6a7c, 0x720a,
-	0x6a80, 0x720e, 0x7013, 0x0829, 0x2f10, 0x7222, 0x7027, 0xffff,
-	0x0005, 0x00d6, 0x0096, 0x0081, 0x7814, 0x2048, 0xa890, 0x7002,
-	0xa88c, 0x7006, 0xa8b0, 0x700a, 0xa8ac, 0x700e, 0x60c3, 0x000c,
-	0x009e, 0x00de, 0x0804, 0xa263, 0x6813, 0x0008, 0xb810, 0x9085,
-	0x0500, 0x7002, 0xb814, 0x7006, 0x2069, 0x1800, 0x687c, 0x700a,
-	0x6880, 0x700e, 0x7013, 0x0889, 0x080c, 0xa251, 0x721a, 0x7a08,
-	0x7222, 0x2f10, 0x7226, 0x2071, 0x024c, 0x0005, 0x00d6, 0x0096,
-	0x080c, 0x9f86, 0x7814, 0x2048, 0x080c, 0xcb58, 0x1130, 0x7814,
-	0x9084, 0x0700, 0x8007, 0x0033, 0x0010, 0x9006, 0x001b, 0x009e,
-	0x00de, 0x0005, 0x9ea4, 0x9f0d, 0x9f1d, 0x9f43, 0x9f4f, 0x9f60,
-	0x9f68, 0x9ea2, 0x080c, 0x0dd5, 0x0016, 0x0036, 0xa97c, 0x918c,
-	0x0003, 0x0118, 0x9186, 0x0003, 0x1198, 0xaba8, 0x7824, 0xd0cc,
-	0x1168, 0x7316, 0xa898, 0x701a, 0xa894, 0x701e, 0x003e, 0x001e,
-	0x2001, 0x19b0, 0x2004, 0x60c2, 0x0804, 0xa263, 0xc3e5, 0x0c88,
-	0x9186, 0x0001, 0x190c, 0x0dd5, 0xaba8, 0x7824, 0xd0cc, 0x1904,
-	0x9f0a, 0x7316, 0xa898, 0x701a, 0xa894, 0x701e, 0xa8a4, 0x7026,
-	0xa8ac, 0x702e, 0x2009, 0x0018, 0x9384, 0x0300, 0x0570, 0xd3c4,
-	0x0110, 0xa8ac, 0x9108, 0xd3cc, 0x0110, 0xa8a4, 0x9108, 0x6810,
-	0x9085, 0x0010, 0x6812, 0x2011, 0x0258, 0x20e9, 0x0000, 0x22a0,
-	0x0156, 0x20a9, 0x0008, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x002c,
-	0x2098, 0x4003, 0x6810, 0x8000, 0x6812, 0x2011, 0x0240, 0x22a0,
-	0x20a9, 0x0005, 0x4003, 0x6810, 0xc084, 0x6812, 0x015e, 0x9184,
-	0x0003, 0x0118, 0x2019, 0x0245, 0x201a, 0x61c2, 0x003e, 0x001e,
-	0x0804, 0xa263, 0xc3e5, 0x0804, 0x9ec9, 0x2011, 0x0008, 0x2001,
-	0x180f, 0x2004, 0xd0a4, 0x0110, 0x2011, 0x0028, 0x7824, 0xd0cc,
-	0x1110, 0x7216, 0x0470, 0x0ce8, 0xc2e5, 0x2011, 0x0302, 0x0016,
-	0x782c, 0x701a, 0x7930, 0x711e, 0x9105, 0x0108, 0xc2dd, 0x001e,
-	0x7824, 0xd0cc, 0x0108, 0xc2e5, 0x7216, 0x7027, 0x0012, 0x702f,
-	0x0008, 0x7043, 0x7000, 0x7047, 0x0500, 0x704f, 0x000a, 0x2069,
-	0x0200, 0x6813, 0x0009, 0x2071, 0x0240, 0x700b, 0x2500, 0x60c3,
-	0x0032, 0x0804, 0xa263, 0x2011, 0x0028, 0x7824, 0xd0cc, 0x1128,
-	0x7216, 0x60c3, 0x0018, 0x0804, 0xa263, 0x0cd0, 0xc2e5, 0x2011,
-	0x0100, 0x7824, 0xd0cc, 0x0108, 0xc2e5, 0x7216, 0x702f, 0x0008,
-	0x7858, 0x9084, 0x00ff, 0x7036, 0x60c3, 0x0020, 0x0804, 0xa263,
-	0x2011, 0x0008, 0x7824, 0xd0cc, 0x0108, 0xc2e5, 0x7216, 0x0c08,
-	0x0036, 0x7b14, 0x9384, 0xff00, 0x7816, 0x9384, 0x00ff, 0x8001,
-	0x1138, 0x7824, 0xd0cc, 0x0108, 0xc2e5, 0x7216, 0x003e, 0x0888,
-	0x0046, 0x2021, 0x0800, 0x0006, 0x7824, 0xd0cc, 0x000e, 0x0108,
-	0xc4e5, 0x7416, 0x004e, 0x701e, 0x003e, 0x0818, 0x00d6, 0x6813,
-	0x0008, 0xb810, 0x9085, 0x0700, 0x7002, 0xb814, 0x7006, 0x2069,
-	0x1800, 0x687c, 0x700a, 0x6880, 0x700e, 0x7824, 0xd0cc, 0x1168,
-	0x7013, 0x0898, 0x080c, 0xa251, 0x721a, 0x7a08, 0x7222, 0x2f10,
-	0x7226, 0x2071, 0x024c, 0x00de, 0x0005, 0x7013, 0x0889, 0x0c90,
-	0x0016, 0x7814, 0x9084, 0x0700, 0x8007, 0x0013, 0x001e, 0x0005,
-	0x9fb8, 0x9fb8, 0x9fba, 0x9fb8, 0x9fb8, 0x9fb8, 0x9fd4, 0x9fb8,
-	0x080c, 0x0dd5, 0x7914, 0x918c, 0x08ff, 0x918d, 0xf600, 0x7916,
-	0x2009, 0x0003, 0x00b9, 0x2069, 0x1847, 0x6804, 0xd0bc, 0x0130,
-	0x682c, 0x9084, 0x00ff, 0x8007, 0x7032, 0x0010, 0x7033, 0x3f00,
-	0x60c3, 0x0001, 0x0804, 0xa263, 0x2009, 0x0003, 0x0019, 0x7033,
-	0x7f00, 0x0cb0, 0x0016, 0x080c, 0xab1a, 0x001e, 0xb810, 0x9085,
-	0x0100, 0x7002, 0xb814, 0x7006, 0x2069, 0x1800, 0x6a7c, 0x720a,
-	0x6a80, 0x720e, 0x7013, 0x0888, 0x918d, 0x0008, 0x7116, 0x080c,
-	0xa251, 0x721a, 0x7a08, 0x7222, 0x2f10, 0x7226, 0x0005, 0x00b6,
-	0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0056, 0x0046, 0x0036, 0x2061,
-	0x0100, 0x2071, 0x1800, 0x7160, 0x7810, 0x2058, 0x76dc, 0x96b4,
-	0x0028, 0x0110, 0x737c, 0x7480, 0x2500, 0x76dc, 0x96b4, 0x0028,
-	0x0140, 0x2001, 0x04ff, 0x6062, 0x6067, 0xffff, 0x636a, 0x646e,
-	0x0050, 0x2001, 0x00ff, 0x9085, 0x0400, 0x6062, 0x6067, 0xffff,
-	0x606b, 0x0000, 0x616e, 0xb8b8, 0x6073, 0x0530, 0x6077, 0x0008,
+	0x700e, 0x7013, 0x0889, 0x080c, 0xa318, 0x721a, 0x7a08, 0x7222,
+	0x2f10, 0x7226, 0x2071, 0x024c, 0x0005, 0x00d6, 0x0096, 0x080c,
+	0xa04d, 0x7814, 0x2048, 0x080c, 0xcc84, 0x1130, 0x7814, 0x9084,
+	0x0700, 0x8007, 0x0033, 0x0010, 0x9006, 0x001b, 0x009e, 0x00de,
+	0x0005, 0x9f6b, 0x9fd4, 0x9fe4, 0xa00a, 0xa016, 0xa027, 0xa02f,
+	0x9f69, 0x080c, 0x0dd5, 0x0016, 0x0036, 0xa97c, 0x918c, 0x0003,
+	0x0118, 0x9186, 0x0003, 0x1198, 0xaba8, 0x7824, 0xd0cc, 0x1168,
+	0x7316, 0xa898, 0x701a, 0xa894, 0x701e, 0x003e, 0x001e, 0x2001,
+	0x19b0, 0x2004, 0x60c2, 0x0804, 0xa32a, 0xc3e5, 0x0c88, 0x9186,
+	0x0001, 0x190c, 0x0dd5, 0xaba8, 0x7824, 0xd0cc, 0x1904, 0x9fd1,
+	0x7316, 0xa898, 0x701a, 0xa894, 0x701e, 0xa8a4, 0x7026, 0xa8ac,
+	0x702e, 0x2009, 0x0018, 0x9384, 0x0300, 0x0570, 0xd3c4, 0x0110,
+	0xa8ac, 0x9108, 0xd3cc, 0x0110, 0xa8a4, 0x9108, 0x6810, 0x9085,
+	0x0010, 0x6812, 0x2011, 0x0258, 0x20e9, 0x0000, 0x22a0, 0x0156,
+	0x20a9, 0x0008, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x002c, 0x2098,
+	0x4003, 0x6810, 0x8000, 0x6812, 0x2011, 0x0240, 0x22a0, 0x20a9,
+	0x0005, 0x4003, 0x6810, 0xc084, 0x6812, 0x015e, 0x9184, 0x0003,
+	0x0118, 0x2019, 0x0245, 0x201a, 0x61c2, 0x003e, 0x001e, 0x0804,
+	0xa32a, 0xc3e5, 0x0804, 0x9f90, 0x2011, 0x0008, 0x2001, 0x180f,
+	0x2004, 0xd0a4, 0x0110, 0x2011, 0x0028, 0x7824, 0xd0cc, 0x1110,
+	0x7216, 0x0470, 0x0ce8, 0xc2e5, 0x2011, 0x0302, 0x0016, 0x782c,
+	0x701a, 0x7930, 0x711e, 0x9105, 0x0108, 0xc2dd, 0x001e, 0x7824,
+	0xd0cc, 0x0108, 0xc2e5, 0x7216, 0x7027, 0x0012, 0x702f, 0x0008,
+	0x7043, 0x7000, 0x7047, 0x0500, 0x704f, 0x000a, 0x2069, 0x0200,
+	0x6813, 0x0009, 0x2071, 0x0240, 0x700b, 0x2500, 0x60c3, 0x0032,
+	0x0804, 0xa32a, 0x2011, 0x0028, 0x7824, 0xd0cc, 0x1128, 0x7216,
+	0x60c3, 0x0018, 0x0804, 0xa32a, 0x0cd0, 0xc2e5, 0x2011, 0x0100,
+	0x7824, 0xd0cc, 0x0108, 0xc2e5, 0x7216, 0x702f, 0x0008, 0x7858,
+	0x9084, 0x00ff, 0x7036, 0x60c3, 0x0020, 0x0804, 0xa32a, 0x2011,
+	0x0008, 0x7824, 0xd0cc, 0x0108, 0xc2e5, 0x7216, 0x0c08, 0x0036,
+	0x7b14, 0x9384, 0xff00, 0x7816, 0x9384, 0x00ff, 0x8001, 0x1138,
+	0x7824, 0xd0cc, 0x0108, 0xc2e5, 0x7216, 0x003e, 0x0888, 0x0046,
+	0x2021, 0x0800, 0x0006, 0x7824, 0xd0cc, 0x000e, 0x0108, 0xc4e5,
+	0x7416, 0x004e, 0x701e, 0x003e, 0x0818, 0x00d6, 0x6813, 0x0008,
+	0xb810, 0x9085, 0x0700, 0x7002, 0xb814, 0x7006, 0x2069, 0x1800,
+	0x687c, 0x700a, 0x6880, 0x700e, 0x7824, 0xd0cc, 0x1168, 0x7013,
+	0x0898, 0x080c, 0xa318, 0x721a, 0x7a08, 0x7222, 0x2f10, 0x7226,
+	0x2071, 0x024c, 0x00de, 0x0005, 0x7013, 0x0889, 0x0c90, 0x0016,
+	0x7814, 0x9084, 0x0700, 0x8007, 0x0013, 0x001e, 0x0005, 0xa07f,
+	0xa07f, 0xa081, 0xa07f, 0xa07f, 0xa07f, 0xa09b, 0xa07f, 0x080c,
+	0x0dd5, 0x7914, 0x918c, 0x08ff, 0x918d, 0xf600, 0x7916, 0x2009,
+	0x0003, 0x00b9, 0x2069, 0x1847, 0x6804, 0xd0bc, 0x0130, 0x682c,
+	0x9084, 0x00ff, 0x8007, 0x7032, 0x0010, 0x7033, 0x3f00, 0x60c3,
+	0x0001, 0x0804, 0xa32a, 0x2009, 0x0003, 0x0019, 0x7033, 0x7f00,
+	0x0cb0, 0x0016, 0x080c, 0xabfe, 0x001e, 0xb810, 0x9085, 0x0100,
+	0x7002, 0xb814, 0x7006, 0x2069, 0x1800, 0x6a7c, 0x720a, 0x6a80,
+	0x720e, 0x7013, 0x0888, 0x918d, 0x0008, 0x7116, 0x080c, 0xa318,
+	0x721a, 0x7a08, 0x7222, 0x2f10, 0x7226, 0x0005, 0x00b6, 0x00e6,
+	0x00d6, 0x00c6, 0x0066, 0x0056, 0x0046, 0x0036, 0x2061, 0x0100,
+	0x2071, 0x1800, 0x7160, 0x7810, 0x2058, 0x76dc, 0x96b4, 0x0028,
+	0x0110, 0x737c, 0x7480, 0x2500, 0x76dc, 0x96b4, 0x0028, 0x0140,
+	0x2001, 0x04ff, 0x6062, 0x6067, 0xffff, 0x636a, 0x646e, 0x0050,
+	0x2001, 0x00ff, 0x9085, 0x0400, 0x6062, 0x6067, 0xffff, 0x606b,
+	0x0000, 0x616e, 0xb8b8, 0x6073, 0x0530, 0x6077, 0x0008, 0xb88c,
+	0x8000, 0x9084, 0x00ff, 0xb88e, 0x8007, 0x9085, 0x0020, 0x607a,
+	0x607f, 0x0000, 0x2b00, 0x6082, 0x6087, 0xffff, 0x7814, 0x0096,
+	0x2048, 0xa838, 0x608a, 0xa834, 0x608e, 0xa848, 0x60c6, 0xa844,
+	0x60ca, 0x009e, 0xb86c, 0x60ce, 0x60ab, 0x0036, 0x60af, 0x95d5,
+	0x60d7, 0x0000, 0x2001, 0x1837, 0x2004, 0x9084, 0x0028, 0x0128,
+	0x609f, 0x0000, 0x2001, 0x0092, 0x0048, 0x6028, 0xc0bd, 0x602a,
+	0x609f, 0x00ff, 0x6027, 0xffff, 0x2001, 0x00b2, 0x6016, 0x2009,
+	0x07d0, 0x080c, 0x863b, 0x003e, 0x004e, 0x005e, 0x006e, 0x00ce,
+	0x00de, 0x00ee, 0x00be, 0x0005, 0x00b6, 0x00e6, 0x00d6, 0x00c6,
+	0x0066, 0x0056, 0x0046, 0x0036, 0x2061, 0x0100, 0x2071, 0x1800,
+	0x7160, 0x7810, 0x2058, 0xb8a0, 0x2028, 0x76dc, 0xd6ac, 0x1168,
+	0x9582, 0x007e, 0x1250, 0x2500, 0x9094, 0xff80, 0x1130, 0x9080,
+	0x3384, 0x2015, 0x9294, 0x00ff, 0x0020, 0xb910, 0xba14, 0x737c,
+	0x7480, 0x70dc, 0xd0ac, 0x1130, 0x9582, 0x007e, 0x1218, 0x9584,
+	0xff80, 0x0138, 0x9185, 0x0400, 0x6062, 0x6266, 0x636a, 0x646e,
+	0x0030, 0x6063, 0x0400, 0x6266, 0x606b, 0x0000, 0x616e, 0xb8b8,
+	0x6072, 0x6077, 0x0000, 0xb864, 0xd0a4, 0x0110, 0x6077, 0x0008,
 	0xb88c, 0x8000, 0x9084, 0x00ff, 0xb88e, 0x8007, 0x9085, 0x0020,
 	0x607a, 0x607f, 0x0000, 0x2b00, 0x6082, 0x6087, 0xffff, 0x7814,
 	0x0096, 0x2048, 0xa838, 0x608a, 0xa834, 0x608e, 0xa848, 0x60c6,
 	0xa844, 0x60ca, 0x009e, 0xb86c, 0x60ce, 0x60ab, 0x0036, 0x60af,
-	0x95d5, 0x60d7, 0x0000, 0x2001, 0x1837, 0x2004, 0x9084, 0x0028,
-	0x0128, 0x609f, 0x0000, 0x2001, 0x0092, 0x0048, 0x6028, 0xc0bd,
-	0x602a, 0x609f, 0x00ff, 0x6027, 0xffff, 0x2001, 0x00b2, 0x6016,
-	0x2009, 0x07d0, 0x080c, 0x8584, 0x003e, 0x004e, 0x005e, 0x006e,
-	0x00ce, 0x00de, 0x00ee, 0x00be, 0x0005, 0x00b6, 0x00e6, 0x00d6,
-	0x00c6, 0x0066, 0x0056, 0x0046, 0x0036, 0x2061, 0x0100, 0x2071,
-	0x1800, 0x7160, 0x7810, 0x2058, 0xb8a0, 0x2028, 0x76dc, 0xd6ac,
-	0x1168, 0x9582, 0x007e, 0x1250, 0x2500, 0x9094, 0xff80, 0x1130,
-	0x9080, 0x3332, 0x2015, 0x9294, 0x00ff, 0x0020, 0xb910, 0xba14,
-	0x737c, 0x7480, 0x70dc, 0xd0ac, 0x1130, 0x9582, 0x007e, 0x1218,
-	0x9584, 0xff80, 0x0138, 0x9185, 0x0400, 0x6062, 0x6266, 0x636a,
-	0x646e, 0x0030, 0x6063, 0x0400, 0x6266, 0x606b, 0x0000, 0x616e,
-	0xb8b8, 0x6072, 0x6077, 0x0000, 0xb864, 0xd0a4, 0x0110, 0x6077,
-	0x0008, 0xb88c, 0x8000, 0x9084, 0x00ff, 0xb88e, 0x8007, 0x9085,
-	0x0020, 0x607a, 0x607f, 0x0000, 0x2b00, 0x6082, 0x6087, 0xffff,
-	0x7814, 0x0096, 0x2048, 0xa838, 0x608a, 0xa834, 0x608e, 0xa848,
-	0x60c6, 0xa844, 0x60ca, 0x009e, 0xb86c, 0x60ce, 0x60ab, 0x0036,
-	0x60af, 0x95d5, 0x60d7, 0x0000, 0xbac0, 0x629e, 0x00f6, 0x2079,
-	0x0140, 0x7803, 0x0000, 0x00fe, 0x2009, 0x0092, 0x6116, 0x2009,
-	0x07d0, 0x080c, 0x8584, 0x003e, 0x004e, 0x005e, 0x006e, 0x00ce,
-	0x00de, 0x00ee, 0x00be, 0x0005, 0x00b6, 0x0096, 0x00e6, 0x00d6,
-	0x00c6, 0x0056, 0x0046, 0x0036, 0x2061, 0x0100, 0x2071, 0x1800,
-	0x7810, 0x2058, 0xb8a0, 0x2028, 0xb910, 0xba14, 0x737c, 0x7480,
-	0x7820, 0x90be, 0x0006, 0x0904, 0xa1c0, 0x90be, 0x000a, 0x1904,
-	0xa17c, 0xb8c0, 0x609e, 0x7814, 0x2048, 0xa87c, 0xd0fc, 0x0558,
-	0xaf90, 0x9784, 0xff00, 0x9105, 0x6062, 0x873f, 0x9784, 0xff00,
-	0x0006, 0x7814, 0x2048, 0xa878, 0xc0fc, 0x9005, 0x000e, 0x1160,
-	0xaf94, 0x87ff, 0x0198, 0x2039, 0x0098, 0x9705, 0x6072, 0x7808,
-	0x6082, 0x2f00, 0x6086, 0x0038, 0x9185, 0x2200, 0x6062, 0x6073,
-	0x0129, 0x6077, 0x0000, 0xb8c0, 0x609e, 0x0050, 0x2039, 0x0029,
-	0x9705, 0x6072, 0x0cc0, 0x9185, 0x0200, 0x6062, 0x6073, 0x2029,
-	0xa87c, 0xd0fc, 0x0118, 0xaf94, 0x87ff, 0x1120, 0x2f00, 0x6082,
-	0x7808, 0x6086, 0x6266, 0x636a, 0x646e, 0x6077, 0x0000, 0xb88c,
-	0x8000, 0x9084, 0x00ff, 0xb88e, 0x8007, 0x607a, 0x607f, 0x0000,
-	0xa838, 0x608a, 0xa834, 0x608e, 0xa848, 0x60c6, 0xa844, 0x60ca,
-	0xb86c, 0x60ce, 0x60af, 0x95d5, 0x60d7, 0x0000, 0x080c, 0xaaff,
-	0x2009, 0x07d0, 0x60c4, 0x9084, 0xfff0, 0x9005, 0x0110, 0x2009,
-	0x1b58, 0x080c, 0x8584, 0x003e, 0x004e, 0x005e, 0x00ce, 0x00de,
-	0x00ee, 0x009e, 0x00be, 0x0005, 0x7804, 0x9086, 0x0040, 0x0904,
-	0xa1fc, 0x9185, 0x0100, 0x6062, 0x6266, 0x636a, 0x646e, 0x6073,
-	0x0809, 0x6077, 0x0008, 0x60af, 0x95d5, 0x60d7, 0x0000, 0xb88c,
-	0x8000, 0x9084, 0x00ff, 0xb88e, 0x8007, 0x607a, 0x607f, 0x0000,
-	0x2f00, 0x6082, 0x7808, 0x6086, 0x7814, 0x2048, 0xa838, 0x608a,
-	0xa834, 0x608e, 0xa848, 0x60c6, 0xa844, 0x60ca, 0xb86c, 0x60ce,
-	0xbac0, 0x629e, 0x080c, 0xaaff, 0x2009, 0x07d0, 0x60c4, 0x9084,
-	0xfff0, 0x9005, 0x0110, 0x2009, 0x1b58, 0x080c, 0x8584, 0x003e,
-	0x004e, 0x005e, 0x00ce, 0x00de, 0x00ee, 0x009e, 0x00be, 0x0005,
-	0x7814, 0x2048, 0xa87c, 0x9084, 0x0003, 0x9086, 0x0002, 0x0904,
-	0xa218, 0x9185, 0x0100, 0x6062, 0x6266, 0x636a, 0x646e, 0x6073,
-	0x0880, 0x6077, 0x0008, 0xb88c, 0x8000, 0x9084, 0x00ff, 0xb88e,
-	0x8007, 0x607a, 0x7838, 0x607e, 0x2f00, 0x6086, 0x7808, 0x6082,
-	0xa890, 0x608a, 0xa88c, 0x608e, 0xa8b0, 0x60c6, 0xa8ac, 0x60ca,
-	0xa8ac, 0x7930, 0x9108, 0x7932, 0xa8b0, 0x792c, 0x9109, 0x792e,
-	0xb86c, 0x60ce, 0x60af, 0x95d5, 0x60d7, 0x0000, 0xbac0, 0x629e,
-	0x080c, 0xaadc, 0x0804, 0xa1ac, 0xb8cc, 0xd084, 0x0148, 0xb88c,
-	0x7814, 0x2048, 0xb88c, 0x7846, 0xa836, 0x2900, 0xa83a, 0xb04a,
-	0x9185, 0x0600, 0x6062, 0x6266, 0x636a, 0x646e, 0x6073, 0x0829,
-	0x6077, 0x0000, 0x60af, 0x9575, 0x60d7, 0x0000, 0x0804, 0xa18f,
-	0x9185, 0x0700, 0x6062, 0x6266, 0x636a, 0x646e, 0x7824, 0xd0cc,
-	0x7826, 0x0118, 0x6073, 0x0889, 0x0010, 0x6073, 0x0898, 0x6077,
-	0x0000, 0xb88c, 0x8000, 0x9084, 0x00ff, 0xb88e, 0x8007, 0x607a,
-	0x607f, 0x0000, 0x2f00, 0x6086, 0x7808, 0x6082, 0xa838, 0x608a,
-	0xa834, 0x608e, 0xa848, 0x60c6, 0xa844, 0x60ca, 0xb86c, 0x60ce,
-	0x60af, 0x95d5, 0x60d7, 0x0000, 0xbac0, 0x629e, 0x7824, 0xd0cc,
-	0x0120, 0x080c, 0xaaff, 0x0804, 0xa1ac, 0x080c, 0xaadc, 0x0804,
-	0xa1ac, 0x7a10, 0x00b6, 0x2258, 0xba8c, 0x8210, 0x9294, 0x00ff,
-	0xba8e, 0x00be, 0x8217, 0x0005, 0x00d6, 0x2069, 0x19e6, 0x6843,
-	0x0001, 0x00de, 0x0005, 0x60a3, 0x0056, 0x60a7, 0x9575, 0x00f1,
-	0x080c, 0x8576, 0x0005, 0x0016, 0x2001, 0x180c, 0x200c, 0x9184,
-	0x0600, 0x9086, 0x0600, 0x0128, 0x0089, 0x080c, 0x8576, 0x001e,
-	0x0005, 0xc1e5, 0x2001, 0x180c, 0x2102, 0x2001, 0x19e7, 0x2003,
-	0x0000, 0x2001, 0x19ef, 0x2003, 0x0000, 0x0c88, 0x0006, 0x6014,
-	0x9084, 0x1804, 0x9085, 0x0009, 0x6016, 0x000e, 0x0005, 0x0016,
-	0x00c6, 0x0006, 0x2061, 0x0100, 0x61a4, 0x60a7, 0x95f5, 0x6014,
-	0x9084, 0x1804, 0x9085, 0x0008, 0x6016, 0x000e, 0xa001, 0xa001,
-	0xa001, 0x61a6, 0x00ce, 0x001e, 0x0005, 0x00c6, 0x00d6, 0x0016,
-	0x0026, 0x2061, 0x0100, 0x2069, 0x0140, 0x080c, 0x73b3, 0x11c0,
-	0x2001, 0x1a02, 0x2004, 0x9005, 0x15d0, 0x080c, 0x7463, 0x1160,
-	0x2061, 0x0100, 0x6020, 0xd0b4, 0x1120, 0x6024, 0xd084, 0x090c,
-	0x0dd5, 0x080c, 0x8576, 0x0458, 0x00c6, 0x2061, 0x19e6, 0x00c8,
-	0x6904, 0x9194, 0x4000, 0x0540, 0x0811, 0x080c, 0x2d0c, 0x00c6,
-	0x2061, 0x19e6, 0x6128, 0x9192, 0x0008, 0x1258, 0x8108, 0x612a,
-	0x6124, 0x00ce, 0x81ff, 0x0198, 0x080c, 0x8576, 0x080c, 0xa286,
-	0x0070, 0x6124, 0x91e5, 0x0000, 0x0140, 0x080c, 0xea39, 0x080c,
-	0x857f, 0x2009, 0x0014, 0x080c, 0xaeda, 0x00ce, 0x0000, 0x002e,
-	0x001e, 0x00de, 0x00ce, 0x0005, 0x2001, 0x1a02, 0x2004, 0x9005,
-	0x1db0, 0x00c6, 0x2061, 0x19e6, 0x6128, 0x9192, 0x0003, 0x1e08,
-	0x8108, 0x612a, 0x00ce, 0x080c, 0x8576, 0x080c, 0x5eec, 0x2009,
-	0x1846, 0x2114, 0x8210, 0x220a, 0x0c10, 0x0096, 0x00c6, 0x00d6,
-	0x00e6, 0x0016, 0x0026, 0x080c, 0x858c, 0x2071, 0x19e6, 0x713c,
-	0x81ff, 0x0904, 0xa38f, 0x2061, 0x0100, 0x2069, 0x0140, 0x080c,
-	0x73b3, 0x11e0, 0x0036, 0x2019, 0x0002, 0x080c, 0xa5c8, 0x003e,
-	0x713c, 0x2160, 0x080c, 0xea39, 0x2009, 0x004a, 0x6220, 0x9296,
-	0x0009, 0x1130, 0x6114, 0x2148, 0xa87b, 0x0006, 0x2009, 0x004a,
-	0x080c, 0xaeda, 0x080c, 0x7463, 0x0804, 0xa38f, 0x080c, 0xa39b,
-	0x0904, 0xa38f, 0x6904, 0xd1f4, 0x0904, 0xa396, 0x080c, 0x2d0c,
-	0x00c6, 0x703c, 0x9065, 0x090c, 0x0dd5, 0x6020, 0x00ce, 0x9086,
-	0x0006, 0x1528, 0x61c8, 0x60c4, 0x9105, 0x1508, 0x2009, 0x180c,
-	0x2104, 0xd0d4, 0x01e0, 0x6214, 0x9294, 0x1800, 0x1128, 0x6224,
-	0x9294, 0x0002, 0x1560, 0x0030, 0xc0d4, 0x200a, 0xd0cc, 0x0110,
-	0x080c, 0x2c5f, 0x6014, 0x9084, 0xe7fd, 0x9085, 0x0010, 0x6016,
-	0x703c, 0x2060, 0x2009, 0x0049, 0x080c, 0xaeda, 0x00c0, 0x0036,
-	0x2019, 0x0001, 0x080c, 0xa5c8, 0x003e, 0x713c, 0x2160, 0x080c,
-	0xea39, 0x2009, 0x004a, 0x6220, 0x9296, 0x0009, 0x1130, 0x6114,
-	0x2148, 0xa87b, 0x0006, 0x2009, 0x004a, 0x080c, 0xaeda, 0x002e,
-	0x001e, 0x00ee, 0x00de, 0x00ce, 0x009e, 0x0005, 0xd1ec, 0x1904,
-	0xa346, 0x0804, 0xa348, 0x00d6, 0x00c6, 0x0096, 0x703c, 0x9065,
-	0x090c, 0x0dd5, 0x2001, 0x1837, 0x2004, 0xd09c, 0x1904, 0xa427,
-	0x2001, 0x0306, 0x200c, 0x9184, 0x0030, 0x0904, 0xa427, 0x9184,
-	0x0048, 0x9086, 0x0008, 0x1904, 0xa427, 0x2001, 0x020b, 0x2004,
-	0xd0fc, 0x0904, 0xa427, 0xd08c, 0x0904, 0xa427, 0x2009, 0x1a7f,
-	0x2104, 0x8000, 0x0208, 0x200a, 0x2069, 0x0100, 0x6914, 0x918c,
-	0x0184, 0x918d, 0x0010, 0x6916, 0x69c8, 0x2011, 0x0020, 0x68c8,
-	0x9106, 0x1570, 0x8211, 0x1dd8, 0x2001, 0x0306, 0x2003, 0x4800,
-	0x2001, 0x009a, 0x2003, 0x0004, 0x2001, 0x1a65, 0x2003, 0x0000,
-	0x2001, 0x1a6e, 0x2003, 0x0000, 0x6a88, 0x698c, 0x2200, 0x9105,
-	0x1120, 0x2c10, 0x080c, 0x1bba, 0x0040, 0x6014, 0x2048, 0xaa3a,
-	0xa936, 0x6ac4, 0x69c8, 0xa946, 0xaa4a, 0x0126, 0x00c6, 0x2091,
-	0x2400, 0x002e, 0x080c, 0x1c53, 0x190c, 0x0dd5, 0x012e, 0x0090,
-	0x2009, 0x1a80, 0x2104, 0x8000, 0x0208, 0x200a, 0x69c8, 0x2011,
-	0x0020, 0x8211, 0x1df0, 0x68c8, 0x9106, 0x1dc0, 0x69c4, 0x68c8,
-	0x9105, 0x0160, 0x6824, 0xd08c, 0x0110, 0x6827, 0x0002, 0x7048,
-	0xc085, 0x704a, 0x0079, 0x7048, 0xc084, 0x704a, 0x2009, 0x07d0,
-	0x080c, 0x8584, 0x9006, 0x009e, 0x00ce, 0x00de, 0x0005, 0x9085,
-	0x0001, 0x0cc8, 0x0026, 0x00e6, 0x2071, 0x19e6, 0x7048, 0xd084,
-	0x01d8, 0x713c, 0x81ff, 0x01c0, 0x2071, 0x0100, 0x9188, 0x0008,
-	0x2114, 0x928e, 0x0006, 0x1138, 0x7014, 0x9084, 0x1984, 0x9085,
-	0x0012, 0x7016, 0x0048, 0x928e, 0x0009, 0x0db0, 0x7014, 0x9084,
-	0x1984, 0x9085, 0x0016, 0x7016, 0x00ee, 0x002e, 0x0005, 0x00b6,
-	0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0056, 0x0046, 0x0006, 0x0126,
-	0x2091, 0x8000, 0x6010, 0x2058, 0xbca0, 0x2071, 0x19e6, 0x7018,
-	0x2058, 0x8bff, 0x0190, 0xb8a0, 0x9406, 0x0118, 0xb854, 0x2058,
-	0x0cc0, 0x6014, 0x0096, 0x2048, 0xac6c, 0xad70, 0xae78, 0x009e,
-	0x080c, 0x6748, 0x0110, 0x9085, 0x0001, 0x012e, 0x000e, 0x004e,
-	0x005e, 0x006e, 0x00ce, 0x00de, 0x00ee, 0x00be, 0x0005, 0x080c,
-	0x9c7c, 0x7003, 0x1200, 0x7838, 0x7012, 0x783c, 0x7016, 0x00c6,
-	0x7820, 0x9086, 0x0004, 0x1148, 0x7810, 0x9005, 0x0130, 0x00b6,
-	0x2058, 0xb810, 0xb914, 0x00be, 0x0020, 0x2061, 0x1800, 0x607c,
-	0x6180, 0x9084, 0x00ff, 0x700a, 0x710e, 0x00ce, 0x60c3, 0x002c,
-	0x0804, 0xa263, 0x080c, 0x9c7c, 0x7003, 0x0f00, 0x7808, 0xd09c,
-	0x0128, 0xb810, 0x9084, 0x00ff, 0x700a, 0xb814, 0x700e, 0x60c3,
-	0x0008, 0x0804, 0xa263, 0x0156, 0x080c, 0x9cc7, 0x7003, 0x0200,
-	0x080c, 0x85df, 0x20a9, 0x0006, 0x2011, 0xffec, 0x2019, 0xffed,
-	0x9ef0, 0x0002, 0x2305, 0x2072, 0x8e70, 0x2205, 0x2072, 0x8e70,
-	0x9398, 0x0002, 0x9290, 0x0002, 0x1f04, 0xa4c2, 0x60c3, 0x001c,
-	0x015e, 0x0804, 0xa263, 0x0016, 0x0026, 0x080c, 0x9ca3, 0x080c,
-	0x9cb5, 0x9e80, 0x0004, 0x20e9, 0x0000, 0x20a0, 0x7814, 0x0096,
-	0x2048, 0xa800, 0x2048, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x0021,
-	0x2098, 0x009e, 0x7808, 0x9088, 0x0002, 0x21a8, 0x9192, 0x0010,
-	0x1250, 0x4003, 0x9080, 0x0004, 0x8003, 0x60c2, 0x080c, 0xa263,
-	0x002e, 0x001e, 0x0005, 0x20a9, 0x0010, 0x4003, 0x080c, 0xab05,
-	0x20a1, 0x0240, 0x22a8, 0x4003, 0x0c68, 0x080c, 0x9c7c, 0x7003,
-	0x6200, 0x7808, 0x700e, 0x60c3, 0x0008, 0x0804, 0xa263, 0x0016,
-	0x0026, 0x080c, 0x9c7c, 0x20e9, 0x0000, 0x20a1, 0x024c, 0x7814,
-	0x0096, 0x2048, 0xa800, 0x2048, 0xa860, 0x20e0, 0xa85c, 0x9080,
-	0x0023, 0x2098, 0x009e, 0x7808, 0x9088, 0x0002, 0x21a8, 0x4003,
-	0x8003, 0x60c2, 0x080c, 0xa263, 0x002e, 0x001e, 0x0005, 0x00e6,
-	0x00c6, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071, 0x19e6, 0x700c,
-	0x2060, 0x8cff, 0x0178, 0x080c, 0xcd60, 0x1110, 0x080c, 0xb821,
-	0x600c, 0x0006, 0x080c, 0xcfcc, 0x080c, 0xae5f, 0x080c, 0xa67d,
-	0x00ce, 0x0c78, 0x2c00, 0x700e, 0x700a, 0x012e, 0x000e, 0x00ce,
-	0x00ee, 0x0005, 0x0126, 0x0156, 0x00f6, 0x00e6, 0x00d6, 0x00c6,
-	0x0066, 0x0026, 0x0016, 0x0006, 0x2091, 0x8000, 0x2001, 0x180c,
-	0x200c, 0x918c, 0xe7ff, 0x2102, 0x2069, 0x0100, 0x2079, 0x0140,
-	0x2071, 0x19e6, 0x7024, 0x2060, 0x8cff, 0x01f8, 0x080c, 0xa28f,
-	0x6ac0, 0x68c3, 0x0000, 0x080c, 0x857f, 0x00c6, 0x2061, 0x0100,
-	0x080c, 0xac56, 0x00ce, 0x20a9, 0x01f4, 0x0461, 0x2009, 0x0013,
-	0x080c, 0xaeda, 0x000e, 0x001e, 0x002e, 0x006e, 0x00ce, 0x00de,
-	0x00ee, 0x00fe, 0x015e, 0x012e, 0x0005, 0x2001, 0x1800, 0x2004,
-	0x9096, 0x0001, 0x0d78, 0x9096, 0x0004, 0x0d60, 0x080c, 0x857f,
-	0x6814, 0x9084, 0x0001, 0x0110, 0x68a7, 0x95f5, 0x6817, 0x0008,
-	0x68c3, 0x0000, 0x2011, 0x5e96, 0x080c, 0x84f9, 0x20a9, 0x01f4,
-	0x0009, 0x08c0, 0x6824, 0xd094, 0x0140, 0x6827, 0x0004, 0x7804,
-	0x9084, 0x4000, 0x190c, 0x2d0c, 0x0090, 0xd084, 0x0118, 0x6827,
-	0x0001, 0x0010, 0x1f04, 0xa5aa, 0x7804, 0x9084, 0x1000, 0x0138,
-	0x2001, 0x0100, 0x080c, 0x2cfc, 0x9006, 0x080c, 0x2cfc, 0x0005,
-	0x0126, 0x0156, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0026,
-	0x0016, 0x0006, 0x2091, 0x8000, 0x2001, 0x180c, 0x200c, 0x918c,
-	0xdbff, 0x2102, 0x2069, 0x0100, 0x2079, 0x0140, 0x2071, 0x19e6,
-	0x703c, 0x2060, 0x8cff, 0x0904, 0xa633, 0x9386, 0x0002, 0x1128,
-	0x6814, 0x9084, 0x0002, 0x0904, 0xa633, 0x68af, 0x95f5, 0x6817,
-	0x0010, 0x2009, 0x00fa, 0x8109, 0x1df0, 0x69c6, 0x68cb, 0x0008,
-	0x080c, 0x858c, 0x080c, 0x2007, 0x2001, 0x0032, 0x6920, 0xd1bc,
-	0x0130, 0x8001, 0x1dd8, 0x692c, 0x918d, 0x0008, 0x692e, 0x20a9,
-	0x03e8, 0x6824, 0xd094, 0x0140, 0x6827, 0x0004, 0x7804, 0x9084,
-	0x4000, 0x190c, 0x2d0c, 0x0090, 0xd08c, 0x0118, 0x6827, 0x0002,
-	0x0010, 0x1f04, 0xa609, 0x7804, 0x9084, 0x1000, 0x0138, 0x2001,
-	0x0100, 0x080c, 0x2cfc, 0x9006, 0x080c, 0x2cfc, 0x6827, 0x4000,
-	0x6824, 0x83ff, 0x1140, 0x2009, 0x0049, 0x6020, 0x9086, 0x0009,
-	0x0110, 0x080c, 0xaeda, 0x000e, 0x001e, 0x002e, 0x006e, 0x00ce,
-	0x00de, 0x00ee, 0x00fe, 0x015e, 0x012e, 0x0005, 0x00d6, 0x0126,
-	0x2091, 0x8000, 0x2069, 0x19e6, 0x6a06, 0x012e, 0x00de, 0x0005,
-	0x00d6, 0x0126, 0x2091, 0x8000, 0x2069, 0x19e6, 0x6a32, 0x012e,
-	0x00de, 0x0005, 0x080c, 0x9e35, 0x7854, 0x7032, 0x7042, 0x7047,
-	0x1000, 0x00f8, 0x080c, 0x9e35, 0x7854, 0x7032, 0x7042, 0x7047,
-	0x4000, 0x00b8, 0x080c, 0x9e35, 0x7854, 0x7032, 0x7042, 0x7047,
-	0x2000, 0x0078, 0x080c, 0x9e35, 0x7854, 0x7032, 0x7042, 0x7047,
-	0x0400, 0x0038, 0x080c, 0x9e35, 0x7854, 0x7032, 0x7042, 0x7047,
-	0x0200, 0x60c3, 0x0020, 0x0804, 0xa263, 0x00e6, 0x2071, 0x19e6,
-	0x7020, 0x9005, 0x0110, 0x8001, 0x7022, 0x00ee, 0x0005, 0x00f6,
-	0x00e6, 0x00d6, 0x00c6, 0x0076, 0x0066, 0x0006, 0x0126, 0x2091,
-	0x8000, 0x2071, 0x19e6, 0x7614, 0x2660, 0x2678, 0x2039, 0x0001,
-	0x87ff, 0x0904, 0xa722, 0x8cff, 0x0904, 0xa722, 0x6020, 0x9086,
-	0x0006, 0x1904, 0xa71d, 0x88ff, 0x0138, 0x2800, 0x9c06, 0x1904,
-	0xa71d, 0x2039, 0x0000, 0x0050, 0x6010, 0x9b06, 0x1904, 0xa71d,
-	0x85ff, 0x0120, 0x6054, 0x9106, 0x1904, 0xa71d, 0x7024, 0x9c06,
-	0x15b0, 0x2069, 0x0100, 0x68c0, 0x9005, 0x1160, 0x6824, 0xd084,
-	0x0148, 0x6827, 0x0001, 0x080c, 0x857f, 0x080c, 0xa7a7, 0x7027,
-	0x0000, 0x0428, 0x080c, 0x857f, 0x6820, 0xd0b4, 0x0110, 0x68a7,
-	0x95f5, 0x6817, 0x0008, 0x68c3, 0x0000, 0x080c, 0xa7a7, 0x7027,
-	0x0000, 0x0036, 0x2069, 0x0140, 0x6b04, 0x9384, 0x1000, 0x0138,
-	0x2001, 0x0100, 0x080c, 0x2cfc, 0x9006, 0x080c, 0x2cfc, 0x2069,
-	0x0100, 0x6824, 0xd084, 0x0110, 0x6827, 0x0001, 0x003e, 0x7014,
-	0x9c36, 0x1110, 0x660c, 0x7616, 0x7010, 0x9c36, 0x1140, 0x2c00,
-	0x9f36, 0x0118, 0x2f00, 0x7012, 0x0010, 0x7013, 0x0000, 0x660c,
-	0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x89ff,
-	0x1168, 0x600f, 0x0000, 0x6014, 0x0096, 0x2048, 0x080c, 0xcb58,
-	0x0110, 0x080c, 0xe58c, 0x009e, 0x080c, 0xae90, 0x080c, 0xa67d,
-	0x88ff, 0x1190, 0x00ce, 0x0804, 0xa698, 0x2c78, 0x600c, 0x2060,
-	0x0804, 0xa698, 0x9006, 0x012e, 0x000e, 0x006e, 0x007e, 0x00ce,
-	0x00de, 0x00ee, 0x00fe, 0x0005, 0x601b, 0x0000, 0x00ce, 0x98c5,
-	0x0001, 0x0c88, 0x00f6, 0x00e6, 0x00d6, 0x0096, 0x00c6, 0x0066,
-	0x0026, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071, 0x19e6, 0x7638,
-	0x2660, 0x2678, 0x8cff, 0x0904, 0xa796, 0x6020, 0x9086, 0x0006,
-	0x1904, 0xa791, 0x87ff, 0x0128, 0x2700, 0x9c06, 0x1904, 0xa791,
-	0x0040, 0x6010, 0x9b06, 0x15e8, 0x85ff, 0x0118, 0x6054, 0x9106,
-	0x15c0, 0x703c, 0x9c06, 0x1168, 0x0036, 0x2019, 0x0001, 0x080c,
-	0xa5c8, 0x7033, 0x0000, 0x9006, 0x703e, 0x7042, 0x7046, 0x704a,
-	0x003e, 0x7038, 0x9c36, 0x1110, 0x660c, 0x763a, 0x7034, 0x9c36,
-	0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00, 0x7036, 0x0010, 0x7037,
-	0x0000, 0x660c, 0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008,
-	0x2678, 0x600f, 0x0000, 0x6014, 0x2048, 0x080c, 0xcb58, 0x0110,
-	0x080c, 0xe58c, 0x080c, 0xae90, 0x87ff, 0x1198, 0x00ce, 0x0804,
-	0xa742, 0x2c78, 0x600c, 0x2060, 0x0804, 0xa742, 0x9006, 0x012e,
-	0x000e, 0x002e, 0x006e, 0x00ce, 0x009e, 0x00de, 0x00ee, 0x00fe,
-	0x0005, 0x601b, 0x0000, 0x00ce, 0x97bd, 0x0001, 0x0c80, 0x00e6,
-	0x2071, 0x19e6, 0x2001, 0x1800, 0x2004, 0x9086, 0x0002, 0x1118,
-	0x7007, 0x0005, 0x0010, 0x7007, 0x0000, 0x00ee, 0x0005, 0x00f6,
-	0x00e6, 0x00c6, 0x0066, 0x0026, 0x0006, 0x0126, 0x2091, 0x8000,
-	0x2071, 0x19e6, 0x2c10, 0x7638, 0x2660, 0x2678, 0x8cff, 0x0540,
-	0x2200, 0x9c06, 0x1508, 0x7038, 0x9c36, 0x1110, 0x660c, 0x763a,
-	0x7034, 0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00, 0x7036,
-	0x0010, 0x7037, 0x0000, 0x660c, 0x2c00, 0x9f06, 0x0110, 0x7e0e,
-	0x0008, 0x2678, 0x600f, 0x0000, 0x6004, 0x9086, 0x0040, 0x090c,
-	0x959a, 0x9085, 0x0001, 0x0020, 0x2c78, 0x600c, 0x2060, 0x08b0,
-	0x012e, 0x000e, 0x002e, 0x006e, 0x00ce, 0x00ee, 0x00fe, 0x0005,
-	0x0096, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0026, 0x0006,
-	0x0126, 0x2091, 0x8000, 0x2071, 0x19e6, 0x760c, 0x2660, 0x2678,
-	0x8cff, 0x0904, 0xa88d, 0x6010, 0x00b6, 0x2058, 0xb8a0, 0x00be,
-	0x9206, 0x1904, 0xa888, 0x7024, 0x9c06, 0x1520, 0x2069, 0x0100,
-	0x68c0, 0x9005, 0x0904, 0xa85f, 0x080c, 0xa28f, 0x68c3, 0x0000,
-	0x080c, 0xa7a7, 0x7027, 0x0000, 0x0036, 0x2069, 0x0140, 0x6b04,
-	0x9384, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2cfc, 0x9006,
-	0x080c, 0x2cfc, 0x2069, 0x0100, 0x6824, 0xd084, 0x0110, 0x6827,
-	0x0001, 0x003e, 0x700c, 0x9c36, 0x1110, 0x660c, 0x760e, 0x7008,
-	0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00, 0x700a, 0x0010,
-	0x700b, 0x0000, 0x660c, 0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e,
-	0x0008, 0x2678, 0x600f, 0x0000, 0x080c, 0xcd4f, 0x1180, 0x080c,
-	0x31f5, 0x080c, 0xcd60, 0x1518, 0x080c, 0xb821, 0x0400, 0x080c,
-	0xa7a7, 0x6824, 0xd084, 0x09b0, 0x6827, 0x0001, 0x0898, 0x080c,
-	0xcd60, 0x1118, 0x080c, 0xb821, 0x0090, 0x6014, 0x2048, 0x080c,
-	0xcb58, 0x0168, 0x6020, 0x9086, 0x0003, 0x1508, 0xa867, 0x0103,
-	0xab7a, 0xa877, 0x0000, 0x080c, 0x6c88, 0x080c, 0xcd43, 0x080c,
-	0xcfcc, 0x080c, 0xae90, 0x080c, 0xa67d, 0x00ce, 0x0804, 0xa808,
-	0x2c78, 0x600c, 0x2060, 0x0804, 0xa808, 0x012e, 0x000e, 0x002e,
-	0x006e, 0x00ce, 0x00de, 0x00ee, 0x00fe, 0x009e, 0x0005, 0x6020,
-	0x9086, 0x0006, 0x1d20, 0x080c, 0xe58c, 0x0c08, 0x00d6, 0x080c,
-	0x9cc7, 0x7003, 0x0200, 0x7007, 0x0014, 0x60c3, 0x0014, 0x20e1,
-	0x0001, 0x2099, 0x1988, 0x20e9, 0x0000, 0x20a1, 0x0250, 0x20a9,
-	0x0004, 0x4003, 0x7023, 0x0004, 0x7027, 0x7878, 0x080c, 0xa263,
-	0x00de, 0x0005, 0x080c, 0x9cc7, 0x700b, 0x0800, 0x7814, 0x9084,
-	0xff00, 0x700e, 0x7814, 0x9084, 0x00ff, 0x7022, 0x782c, 0x7026,
-	0x7858, 0x9084, 0x00ff, 0x9085, 0x0200, 0x7002, 0x7858, 0x9084,
-	0xff00, 0x8007, 0x7006, 0x60c2, 0x0804, 0xa263, 0x00b6, 0x00d6,
-	0x0016, 0x00d6, 0x2f68, 0x2009, 0x0035, 0x080c, 0xd1d2, 0x00de,
-	0x1904, 0xa93b, 0x080c, 0x9c7c, 0x7003, 0x1300, 0x782c, 0x080c,
-	0xaa41, 0x2068, 0x6820, 0x9086, 0x0003, 0x0560, 0x7810, 0x2058,
-	0xbaa0, 0x080c, 0xadc9, 0x11d8, 0x9286, 0x007e, 0x1128, 0x700b,
-	0x00ff, 0x700f, 0xfffe, 0x0498, 0x9286, 0x007f, 0x1128, 0x700b,
-	0x00ff, 0x700f, 0xfffd, 0x0458, 0x9284, 0xff80, 0x0180, 0x9286,
-	0x0080, 0x1128, 0x700b, 0x00ff, 0x700f, 0xfffc, 0x0400, 0x92d8,
-	0x1000, 0x2b5c, 0xb810, 0x700a, 0xb814, 0x700e, 0x00c0, 0x6098,
-	0x700e, 0x00a8, 0x080c, 0xadc9, 0x1130, 0x7810, 0x2058, 0xb8a0,
-	0x9082, 0x007e, 0x0250, 0x00d6, 0x2069, 0x181f, 0x2d04, 0x700a,
-	0x8d68, 0x2d04, 0x700e, 0x00de, 0x0010, 0x6034, 0x700e, 0x7838,
-	0x7012, 0x783c, 0x7016, 0x60c3, 0x000c, 0x001e, 0x00de, 0x080c,
-	0xa263, 0x00be, 0x0005, 0x781b, 0x0001, 0x7803, 0x0006, 0x001e,
-	0x00de, 0x00be, 0x0005, 0x792c, 0x9180, 0x0008, 0x200c, 0x9186,
-	0x0006, 0x01c0, 0x9186, 0x0003, 0x0904, 0xa9b6, 0x9186, 0x0005,
-	0x0904, 0xa99e, 0x9186, 0x0004, 0x05d8, 0x9186, 0x0008, 0x0904,
-	0xa9a7, 0x7807, 0x0037, 0x782f, 0x0003, 0x7817, 0x1700, 0x080c,
-	0xaa1e, 0x0005, 0x080c, 0xa9df, 0x00d6, 0x0026, 0x792c, 0x2168,
-	0x2009, 0x4000, 0x6800, 0x0002, 0xa97f, 0xa98a, 0xa981, 0xa98a,
-	0xa986, 0xa97f, 0xa97f, 0xa98a, 0xa98a, 0xa98a, 0xa98a, 0xa97f,
-	0xa97f, 0xa97f, 0xa97f, 0xa97f, 0xa98a, 0xa97f, 0xa98a, 0x080c,
-	0x0dd5, 0x6824, 0xd0e4, 0x0110, 0xd0cc, 0x0110, 0x900e, 0x0010,
-	0x2009, 0x2000, 0x682c, 0x7022, 0x6830, 0x7026, 0x0804, 0xa9d8,
-	0x080c, 0xa9df, 0x00d6, 0x0026, 0x792c, 0x2168, 0x2009, 0x4000,
-	0x6a00, 0x9286, 0x0002, 0x1108, 0x900e, 0x04d0, 0x080c, 0xa9df,
-	0x00d6, 0x0026, 0x792c, 0x2168, 0x2009, 0x4000, 0x0488, 0x04b9,
-	0x00d6, 0x0026, 0x792c, 0x2168, 0x2009, 0x4000, 0x9286, 0x0005,
-	0x0118, 0x9286, 0x0002, 0x1108, 0x900e, 0x0410, 0x0441, 0x00d6,
-	0x0026, 0x792c, 0x2168, 0x6814, 0x6924, 0xc185, 0x6926, 0x0096,
-	0x2048, 0xa9ac, 0xa834, 0x9112, 0xa9b0, 0xa838, 0x009e, 0x9103,
-	0x7022, 0x7226, 0x792c, 0x9180, 0x0000, 0x2004, 0x908e, 0x0002,
-	0x0130, 0x908e, 0x0004, 0x0118, 0x2009, 0x4000, 0x0008, 0x900e,
-	0x712a, 0x60c3, 0x0018, 0x002e, 0x00de, 0x0804, 0xa263, 0x00b6,
-	0x0036, 0x0046, 0x0056, 0x0066, 0x080c, 0x9cc7, 0x9006, 0x7003,
-	0x0200, 0x7938, 0x710a, 0x793c, 0x710e, 0x7810, 0x2058, 0xb8a0,
-	0x080c, 0xadc9, 0x1118, 0x9092, 0x007e, 0x0268, 0x00d6, 0x2069,
-	0x181f, 0x2d2c, 0x8d68, 0x2d34, 0x90d8, 0x1000, 0x2b5c, 0xbb10,
-	0xbc14, 0x00de, 0x0028, 0x901e, 0x6498, 0x2029, 0x0000, 0x6634,
-	0x782c, 0x9080, 0x0008, 0x2004, 0x9086, 0x0003, 0x1128, 0x7512,
-	0x7616, 0x731a, 0x741e, 0x0020, 0x7312, 0x7416, 0x751a, 0x761e,
-	0x006e, 0x005e, 0x004e, 0x003e, 0x00be, 0x0005, 0x080c, 0x9cc7,
-	0x7003, 0x0100, 0x782c, 0x700a, 0x7814, 0x700e, 0x700e, 0x60c3,
-	0x0008, 0x0804, 0xa263, 0x080c, 0x9c73, 0x7003, 0x1400, 0x7838,
-	0x700a, 0x0079, 0x783c, 0x700e, 0x782c, 0x7012, 0x7830, 0x7016,
-	0x7834, 0x9084, 0x00ff, 0x8007, 0x701a, 0x60c3, 0x0010, 0x0804,
-	0xa263, 0x00e6, 0x2071, 0x0240, 0x0006, 0x00f6, 0x2078, 0x7810,
-	0x00b6, 0x2058, 0xb8cc, 0xd084, 0x0120, 0x7848, 0x702a, 0x7844,
-	0x702e, 0x00be, 0x00fe, 0x000e, 0x00ee, 0x0005, 0x080c, 0x9cbe,
-	0x7003, 0x0100, 0x782c, 0x700a, 0x7814, 0x700e, 0x60c3, 0x0008,
-	0x0804, 0xa263, 0x0021, 0x60c3, 0x0000, 0x0804, 0xa263, 0x00d6,
-	0x080c, 0xab1a, 0xb810, 0x9085, 0x0300, 0x7002, 0xb814, 0x7006,
-	0x2069, 0x1800, 0x687c, 0x700a, 0x6880, 0x700e, 0x7013, 0x0819,
-	0x080c, 0xa251, 0x721a, 0x2f10, 0x7222, 0x7a08, 0x7226, 0x2071,
-	0x024c, 0x00de, 0x0005, 0x00a9, 0x7914, 0x712a, 0x60c3, 0x0000,
-	0x60a7, 0x9575, 0x0026, 0x080c, 0x2bb2, 0x0228, 0x2011, 0x0101,
-	0x2204, 0xc0c5, 0x2012, 0x002e, 0x080c, 0xa286, 0x080c, 0x8576,
-	0x0005, 0x0036, 0x0096, 0x00d6, 0x00e6, 0x7858, 0x2048, 0xaa7c,
-	0x9296, 0x00c0, 0x9294, 0xfffd, 0xaa7e, 0xaa80, 0x9294, 0x0300,
-	0xaa82, 0xa96c, 0x9194, 0x00ff, 0xab74, 0x9384, 0x00ff, 0x908d,
-	0xc200, 0xa96e, 0x9384, 0xff00, 0x9215, 0xaa76, 0xa870, 0xaa78,
-	0xa87a, 0xaa72, 0x00d6, 0x2069, 0x0200, 0x080c, 0xab1a, 0x00de,
-	0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9, 0x000a, 0xa860, 0x20e0,
-	0xa85c, 0x9080, 0x001b, 0x2098, 0x4003, 0x60a3, 0x0035, 0xaa68,
-	0x9294, 0x7000, 0x9286, 0x3000, 0x0110, 0x60a3, 0x0037, 0x00ee,
-	0x00de, 0x009e, 0x003e, 0x0005, 0x900e, 0x7814, 0x0096, 0x2048,
-	0xa87c, 0xd0fc, 0x01c0, 0x9084, 0x0003, 0x11a8, 0x2001, 0x180c,
-	0x2004, 0xd0bc, 0x0180, 0x7824, 0xd0cc, 0x1168, 0xd0c4, 0x1158,
-	0xa8a8, 0x9005, 0x1140, 0x2001, 0x180c, 0x200c, 0xc1d5, 0x2102,
-	0x2009, 0x19b1, 0x210c, 0x009e, 0x918d, 0x0092, 0x0010, 0x2009,
-	0x0096, 0x60ab, 0x0036, 0x6116, 0x0005, 0x2009, 0x0009, 0x00a0,
-	0x2009, 0x000a, 0x0088, 0x2009, 0x000b, 0x0070, 0x2009, 0x000c,
-	0x0058, 0x2009, 0x000d, 0x0040, 0x2009, 0x000e, 0x0028, 0x2009,
-	0x000f, 0x0010, 0x2009, 0x0008, 0x6912, 0x0005, 0x080c, 0x9c7c,
-	0x0016, 0x0026, 0x0096, 0x00d6, 0x7814, 0x2048, 0x7013, 0x0138,
-	0x2001, 0x1837, 0x2004, 0x9084, 0x0028, 0x1138, 0x2001, 0x197b,
-	0x2004, 0x9086, 0xaaaa, 0x1904, 0xabbf, 0x7003, 0x5400, 0x00c6,
-	0x2061, 0x1800, 0x607c, 0x9084, 0x00ff, 0xa998, 0x810f, 0x918c,
-	0xff00, 0x9105, 0x700a, 0x6080, 0x700e, 0xa998, 0x918c, 0xff00,
-	0x7112, 0x20a9, 0x0004, 0x2009, 0x1805, 0x2e10, 0x9290, 0x0006,
-	0x2104, 0x2012, 0x8108, 0x8210, 0x1f04, 0xab50, 0x20a9, 0x0004,
-	0x2009, 0x1801, 0x2104, 0x2012, 0x8108, 0x8210, 0x1f04, 0xab5a,
-	0xa860, 0x20e0, 0xa85c, 0x9080, 0x0029, 0x2098, 0x2009, 0x0006,
-	0x20a9, 0x0001, 0x4002, 0x8007, 0x2012, 0x8210, 0x8109, 0x1dc0,
-	0x00d6, 0x2069, 0x0200, 0x080c, 0xab05, 0x00de, 0x2071, 0x0240,
-	0x2011, 0x0240, 0x2009, 0x0002, 0x20a9, 0x0001, 0x4002, 0x8007,
-	0x2012, 0x8210, 0x8109, 0x1dc0, 0x2009, 0x0008, 0x20a9, 0x0001,
-	0x4002, 0x8007, 0x2012, 0x8210, 0x8109, 0x1dc0, 0xa85c, 0x9080,
-	0x0031, 0x2098, 0x2009, 0x0008, 0x20a9, 0x0001, 0x4002, 0x8007,
-	0x2012, 0x8210, 0x8109, 0x1dc0, 0x00ce, 0x60c3, 0x004c, 0x60a3,
-	0x0056, 0x60a7, 0x9575, 0x2001, 0x1837, 0x2004, 0x9084, 0x0028,
-	0x1168, 0x080c, 0x73b3, 0x0150, 0x6028, 0xc0bd, 0x602a, 0x6014,
-	0x9084, 0x1804, 0x9085, 0x0029, 0x6016, 0x0010, 0x080c, 0xa263,
-	0x080c, 0x8576, 0x00de, 0x009e, 0x002e, 0x001e, 0x0005, 0x00e6,
-	0x2071, 0x0240, 0x2001, 0x2200, 0x9085, 0x00ff, 0x7002, 0x7007,
-	0xffff, 0x2071, 0x0100, 0x709b, 0x00ff, 0x00ee, 0x0804, 0xab35,
-	0x080c, 0x9c7c, 0x0016, 0x0026, 0x0096, 0x00d6, 0x7814, 0x2048,
-	0x7013, 0x0138, 0x7003, 0x5500, 0x00c6, 0xa89c, 0x9084, 0x00ff,
-	0xa998, 0x810f, 0x918c, 0xff00, 0x9105, 0x700a, 0xa99c, 0x918c,
-	0xff00, 0xa8a0, 0x9084, 0x00ff, 0x9105, 0x700e, 0xa998, 0x918c,
-	0xff00, 0x2061, 0x1800, 0x607c, 0x9084, 0x00ff, 0x910d, 0x7112,
-	0x6180, 0x7116, 0x2009, 0x0008, 0xa860, 0x20e0, 0xa85c, 0x9080,
-	0x0029, 0x2098, 0x2e10, 0x9290, 0x0006, 0x20a9, 0x0001, 0x4002,
-	0x8007, 0x2012, 0x8210, 0x8109, 0x1dc0, 0x20a9, 0x0004, 0x2009,
-	0x1805, 0x2104, 0x2012, 0x8108, 0x8210, 0x1f04, 0xac11, 0x20a9,
-	0x0002, 0x2009, 0x1801, 0x2104, 0x2012, 0x8108, 0x8210, 0x1f04,
-	0xac1b, 0x00d6, 0x0016, 0x2069, 0x0200, 0x080c, 0xab05, 0x001e,
-	0x00de, 0x2071, 0x0240, 0x20a9, 0x0002, 0x2009, 0x1803, 0x2011,
-	0x0240, 0x2104, 0x2012, 0x8108, 0x8210, 0x1f04, 0xac31, 0x2009,
-	0x0008, 0x4002, 0x8007, 0x2012, 0x8210, 0x8109, 0x1dd0, 0x9006,
-	0x20a9, 0x0008, 0x2012, 0x8210, 0x1f04, 0xac42, 0x00ce, 0x60c3,
-	0x004c, 0x60a3, 0x0056, 0x60a7, 0x9575, 0x080c, 0xa263, 0x080c,
-	0x8576, 0x00de, 0x009e, 0x002e, 0x001e, 0x0005, 0x00d6, 0x9290,
-	0x0018, 0x8214, 0x20e9, 0x0000, 0x2069, 0x0200, 0x6813, 0x0000,
-	0x22a8, 0x9284, 0x00e0, 0x0128, 0x20a9, 0x0020, 0x9292, 0x0020,
-	0x0008, 0x9016, 0x20a1, 0x0240, 0x9006, 0x4004, 0x82ff, 0x0120,
-	0x6810, 0x8000, 0x6812, 0x0c60, 0x00de, 0x0005, 0x00d6, 0x0096,
-	0x6014, 0x2048, 0xa878, 0x6056, 0x9006, 0xa836, 0xa83a, 0xa99c,
-	0xa946, 0xa84a, 0x6023, 0x0003, 0x6007, 0x0040, 0x6003, 0x0003,
-	0x600b, 0xffff, 0xa817, 0x0001, 0xa842, 0xa83e, 0x2900, 0xa85a,
-	0xa813, 0x209b, 0x080c, 0x915d, 0x0126, 0x2091, 0x8000, 0x080c,
-	0x97d4, 0x012e, 0x009e, 0x00de, 0x0005, 0x00f6, 0x00e6, 0x00d6,
-	0x00c6, 0x00a6, 0x0096, 0x0066, 0x0126, 0x2091, 0x8000, 0x2071,
-	0x19e6, 0x760c, 0x2660, 0x2678, 0x8cff, 0x0904, 0xad29, 0x7024,
-	0x9c06, 0x1520, 0x2069, 0x0100, 0x68c0, 0x9005, 0x0904, 0xacfb,
-	0x080c, 0xa28f, 0x68c3, 0x0000, 0x080c, 0xa7a7, 0x7027, 0x0000,
+	0x95d5, 0x60d7, 0x0000, 0xbac0, 0x629e, 0x00f6, 0x2079, 0x0140,
+	0x7803, 0x0000, 0x00fe, 0x2009, 0x0092, 0x6116, 0x2009, 0x07d0,
+	0x080c, 0x863b, 0x003e, 0x004e, 0x005e, 0x006e, 0x00ce, 0x00de,
+	0x00ee, 0x00be, 0x0005, 0x00b6, 0x0096, 0x00e6, 0x00d6, 0x00c6,
+	0x0056, 0x0046, 0x0036, 0x2061, 0x0100, 0x2071, 0x1800, 0x7810,
+	0x2058, 0xb8a0, 0x2028, 0xb910, 0xba14, 0x737c, 0x7480, 0x7820,
+	0x90be, 0x0006, 0x0904, 0xa287, 0x90be, 0x000a, 0x1904, 0xa243,
+	0xb8c0, 0x609e, 0x7814, 0x2048, 0xa87c, 0xd0fc, 0x0558, 0xaf90,
+	0x9784, 0xff00, 0x9105, 0x6062, 0x873f, 0x9784, 0xff00, 0x0006,
+	0x7814, 0x2048, 0xa878, 0xc0fc, 0x9005, 0x000e, 0x1160, 0xaf94,
+	0x87ff, 0x0198, 0x2039, 0x0098, 0x9705, 0x6072, 0x7808, 0x6082,
+	0x2f00, 0x6086, 0x0038, 0x9185, 0x2200, 0x6062, 0x6073, 0x0129,
+	0x6077, 0x0000, 0xb8c0, 0x609e, 0x0050, 0x2039, 0x0029, 0x9705,
+	0x6072, 0x0cc0, 0x9185, 0x0200, 0x6062, 0x6073, 0x2029, 0xa87c,
+	0xd0fc, 0x0118, 0xaf94, 0x87ff, 0x1120, 0x2f00, 0x6082, 0x7808,
+	0x6086, 0x6266, 0x636a, 0x646e, 0x6077, 0x0000, 0xb88c, 0x8000,
+	0x9084, 0x00ff, 0xb88e, 0x8007, 0x607a, 0x607f, 0x0000, 0xa838,
+	0x608a, 0xa834, 0x608e, 0xa848, 0x60c6, 0xa844, 0x60ca, 0xb86c,
+	0x60ce, 0x60af, 0x95d5, 0x60d7, 0x0000, 0x080c, 0xabe3, 0x2009,
+	0x07d0, 0x60c4, 0x9084, 0xfff0, 0x9005, 0x0110, 0x2009, 0x1b58,
+	0x080c, 0x863b, 0x003e, 0x004e, 0x005e, 0x00ce, 0x00de, 0x00ee,
+	0x009e, 0x00be, 0x0005, 0x7804, 0x9086, 0x0040, 0x0904, 0xa2c3,
+	0x9185, 0x0100, 0x6062, 0x6266, 0x636a, 0x646e, 0x6073, 0x0809,
+	0x6077, 0x0008, 0x60af, 0x95d5, 0x60d7, 0x0000, 0xb88c, 0x8000,
+	0x9084, 0x00ff, 0xb88e, 0x8007, 0x607a, 0x607f, 0x0000, 0x2f00,
+	0x6082, 0x7808, 0x6086, 0x7814, 0x2048, 0xa838, 0x608a, 0xa834,
+	0x608e, 0xa848, 0x60c6, 0xa844, 0x60ca, 0xb86c, 0x60ce, 0xbac0,
+	0x629e, 0x080c, 0xabe3, 0x2009, 0x07d0, 0x60c4, 0x9084, 0xfff0,
+	0x9005, 0x0110, 0x2009, 0x1b58, 0x080c, 0x863b, 0x003e, 0x004e,
+	0x005e, 0x00ce, 0x00de, 0x00ee, 0x009e, 0x00be, 0x0005, 0x7814,
+	0x2048, 0xa87c, 0x9084, 0x0003, 0x9086, 0x0002, 0x0904, 0xa2df,
+	0x9185, 0x0100, 0x6062, 0x6266, 0x636a, 0x646e, 0x6073, 0x0880,
+	0x6077, 0x0008, 0xb88c, 0x8000, 0x9084, 0x00ff, 0xb88e, 0x8007,
+	0x607a, 0x7838, 0x607e, 0x2f00, 0x6086, 0x7808, 0x6082, 0xa890,
+	0x608a, 0xa88c, 0x608e, 0xa8b0, 0x60c6, 0xa8ac, 0x60ca, 0xa8ac,
+	0x7930, 0x9108, 0x7932, 0xa8b0, 0x792c, 0x9109, 0x792e, 0xb86c,
+	0x60ce, 0x60af, 0x95d5, 0x60d7, 0x0000, 0xbac0, 0x629e, 0x080c,
+	0xabc0, 0x0804, 0xa273, 0xb8cc, 0xd084, 0x0148, 0xb88c, 0x7814,
+	0x2048, 0xb88c, 0x784a, 0xa836, 0x2900, 0xa83a, 0xb046, 0x9185,
+	0x0600, 0x6062, 0x6266, 0x636a, 0x646e, 0x6073, 0x0829, 0x6077,
+	0x0000, 0x60af, 0x9575, 0x60d7, 0x0000, 0x0804, 0xa256, 0x9185,
+	0x0700, 0x6062, 0x6266, 0x636a, 0x646e, 0x7824, 0xd0cc, 0x7826,
+	0x0118, 0x6073, 0x0889, 0x0010, 0x6073, 0x0898, 0x6077, 0x0000,
+	0xb88c, 0x8000, 0x9084, 0x00ff, 0xb88e, 0x8007, 0x607a, 0x607f,
+	0x0000, 0x2f00, 0x6086, 0x7808, 0x6082, 0xa838, 0x608a, 0xa834,
+	0x608e, 0xa848, 0x60c6, 0xa844, 0x60ca, 0xb86c, 0x60ce, 0x60af,
+	0x95d5, 0x60d7, 0x0000, 0xbac0, 0x629e, 0x7824, 0xd0cc, 0x0120,
+	0x080c, 0xabe3, 0x0804, 0xa273, 0x080c, 0xabc0, 0x0804, 0xa273,
+	0x7a10, 0x00b6, 0x2258, 0xba8c, 0x8210, 0x9294, 0x00ff, 0xba8e,
+	0x00be, 0x8217, 0x0005, 0x00d6, 0x2069, 0x19e6, 0x6843, 0x0001,
+	0x00de, 0x0005, 0x60a3, 0x0056, 0x60a7, 0x9575, 0x00f1, 0x080c,
+	0x862d, 0x0005, 0x0016, 0x2001, 0x180c, 0x200c, 0x9184, 0x0600,
+	0x9086, 0x0600, 0x0128, 0x0089, 0x080c, 0x862d, 0x001e, 0x0005,
+	0xc1e5, 0x2001, 0x180c, 0x2102, 0x2001, 0x19e7, 0x2003, 0x0000,
+	0x2001, 0x19ef, 0x2003, 0x0000, 0x0c88, 0x0006, 0x6014, 0x9084,
+	0x1804, 0x9085, 0x0009, 0x6016, 0x000e, 0x0005, 0x0016, 0x00c6,
+	0x0006, 0x2061, 0x0100, 0x61a4, 0x60a7, 0x95f5, 0x6014, 0x9084,
+	0x1804, 0x9085, 0x0008, 0x6016, 0x000e, 0xa001, 0xa001, 0xa001,
+	0x61a6, 0x00ce, 0x001e, 0x0005, 0x00c6, 0x00d6, 0x0016, 0x0026,
+	0x2061, 0x0100, 0x2069, 0x0140, 0x080c, 0x743e, 0x11c0, 0x2001,
+	0x1a02, 0x2004, 0x9005, 0x15d0, 0x080c, 0x74ee, 0x1160, 0x2061,
+	0x0100, 0x6020, 0xd0b4, 0x1120, 0x6024, 0xd084, 0x090c, 0x0dd5,
+	0x080c, 0x862d, 0x0458, 0x00c6, 0x2061, 0x19e6, 0x00c8, 0x6904,
+	0x9194, 0x4000, 0x0540, 0x0811, 0x080c, 0x2d5e, 0x00c6, 0x2061,
+	0x19e6, 0x6128, 0x9192, 0x0008, 0x1258, 0x8108, 0x612a, 0x6124,
+	0x00ce, 0x81ff, 0x0198, 0x080c, 0x862d, 0x080c, 0xa34d, 0x0070,
+	0x6124, 0x91e5, 0x0000, 0x0140, 0x080c, 0xeb8e, 0x080c, 0x8636,
+	0x2009, 0x0014, 0x080c, 0xafbe, 0x00ce, 0x0000, 0x002e, 0x001e,
+	0x00de, 0x00ce, 0x0005, 0x2001, 0x1a02, 0x2004, 0x9005, 0x1db0,
+	0x00c6, 0x2061, 0x19e6, 0x6128, 0x9192, 0x0003, 0x1e08, 0x8108,
+	0x612a, 0x00ce, 0x080c, 0x862d, 0x080c, 0x5f6c, 0x2009, 0x1846,
+	0x2114, 0x8210, 0x220a, 0x0c10, 0x0096, 0x00c6, 0x00d6, 0x00e6,
+	0x0016, 0x0026, 0x080c, 0x8643, 0x2071, 0x19e6, 0x713c, 0x81ff,
+	0x0904, 0xa456, 0x2061, 0x0100, 0x2069, 0x0140, 0x080c, 0x743e,
+	0x11e0, 0x0036, 0x2019, 0x0002, 0x080c, 0xa6ac, 0x003e, 0x713c,
+	0x2160, 0x080c, 0xeb8e, 0x2009, 0x004a, 0x6220, 0x9296, 0x0009,
+	0x1130, 0x6114, 0x2148, 0xa87b, 0x0006, 0x2009, 0x004a, 0x080c,
+	0xafbe, 0x080c, 0x74ee, 0x0804, 0xa456, 0x080c, 0xa462, 0x0904,
+	0xa456, 0x6904, 0xd1f4, 0x0904, 0xa45d, 0x080c, 0x2d5e, 0x00c6,
+	0x703c, 0x9065, 0x090c, 0x0dd5, 0x6020, 0x00ce, 0x9086, 0x0006,
+	0x1528, 0x61c8, 0x60c4, 0x9105, 0x1508, 0x2009, 0x180c, 0x2104,
+	0xd0d4, 0x01e0, 0x6214, 0x9294, 0x1800, 0x1128, 0x6224, 0x9294,
+	0x0002, 0x1560, 0x0030, 0xc0d4, 0x200a, 0xd0cc, 0x0110, 0x080c,
+	0x2c90, 0x6014, 0x9084, 0xe7fd, 0x9085, 0x0010, 0x6016, 0x703c,
+	0x2060, 0x2009, 0x0049, 0x080c, 0xafbe, 0x00c0, 0x0036, 0x2019,
+	0x0001, 0x080c, 0xa6ac, 0x003e, 0x713c, 0x2160, 0x080c, 0xeb8e,
+	0x2009, 0x004a, 0x6220, 0x9296, 0x0009, 0x1130, 0x6114, 0x2148,
+	0xa87b, 0x0006, 0x2009, 0x004a, 0x080c, 0xafbe, 0x002e, 0x001e,
+	0x00ee, 0x00de, 0x00ce, 0x009e, 0x0005, 0xd1ec, 0x1904, 0xa40d,
+	0x0804, 0xa40f, 0x00d6, 0x00c6, 0x0096, 0x703c, 0x9065, 0x090c,
+	0x0dd5, 0x2001, 0x0306, 0x200c, 0x9184, 0x0030, 0x0904, 0xa50b,
+	0x9184, 0x0048, 0x9086, 0x0008, 0x1904, 0xa50b, 0x2009, 0x0206,
+	0x2104, 0x2009, 0x0203, 0x210c, 0x9106, 0x1904, 0xa50b, 0x2009,
+	0x022a, 0x2104, 0x2009, 0x022f, 0x210c, 0x9116, 0x9084, 0x03ff,
+	0x918c, 0x03ff, 0x9294, 0x0400, 0x0110, 0x9102, 0x0030, 0x2010,
+	0x2100, 0x9202, 0x2009, 0x0228, 0x9102, 0x9082, 0x0005, 0x0250,
+	0x2008, 0x2001, 0x013b, 0x2004, 0x8004, 0x8004, 0x8004, 0x9102,
+	0x1a04, 0xa50b, 0x2009, 0x1a80, 0x2104, 0x8000, 0x0208, 0x200a,
+	0x2069, 0x0100, 0x6914, 0x918c, 0x0184, 0x918d, 0x0010, 0x6916,
+	0x69c8, 0x2011, 0x0020, 0x68c8, 0x9106, 0x1570, 0x8211, 0x1dd8,
+	0x2001, 0x0306, 0x2003, 0x4800, 0x2001, 0x009a, 0x2003, 0x0004,
+	0x2001, 0x1a65, 0x2003, 0x0000, 0x2001, 0x1a6e, 0x2003, 0x0000,
+	0x6a88, 0x698c, 0x2200, 0x9105, 0x1120, 0x2c10, 0x080c, 0x1beb,
+	0x0040, 0x6014, 0x2048, 0xaa3a, 0xa936, 0x6ac4, 0x69c8, 0xa946,
+	0xaa4a, 0x0126, 0x00c6, 0x2091, 0x2400, 0x002e, 0x080c, 0x1c84,
+	0x190c, 0x0dd5, 0x012e, 0x0090, 0x2009, 0x1a81, 0x2104, 0x8000,
+	0x0208, 0x200a, 0x69c8, 0x2011, 0x0020, 0x8211, 0x1df0, 0x68c8,
+	0x9106, 0x1dc0, 0x69c4, 0x68c8, 0x9105, 0x0160, 0x6824, 0xd08c,
+	0x0110, 0x6827, 0x0002, 0x7048, 0xc085, 0x704a, 0x0079, 0x7048,
+	0xc084, 0x704a, 0x2009, 0x07d0, 0x080c, 0x863b, 0x9006, 0x009e,
+	0x00ce, 0x00de, 0x0005, 0x9085, 0x0001, 0x0cc8, 0x0026, 0x00e6,
+	0x2071, 0x19e6, 0x7048, 0xd084, 0x01d8, 0x713c, 0x81ff, 0x01c0,
+	0x2071, 0x0100, 0x9188, 0x0008, 0x2114, 0x928e, 0x0006, 0x1138,
+	0x7014, 0x9084, 0x1984, 0x9085, 0x0012, 0x7016, 0x0048, 0x928e,
+	0x0009, 0x0db0, 0x7014, 0x9084, 0x1984, 0x9085, 0x0016, 0x7016,
+	0x00ee, 0x002e, 0x0005, 0x00b6, 0x00e6, 0x00d6, 0x00c6, 0x0066,
+	0x0056, 0x0046, 0x0006, 0x0126, 0x2091, 0x8000, 0x6010, 0x2058,
+	0xbca0, 0x2071, 0x19e6, 0x7018, 0x2058, 0x8bff, 0x0190, 0xb8a0,
+	0x9406, 0x0118, 0xb854, 0x2058, 0x0cc0, 0x6014, 0x0096, 0x2048,
+	0xac6c, 0xad70, 0xae78, 0x009e, 0x080c, 0x67cb, 0x0110, 0x9085,
+	0x0001, 0x012e, 0x000e, 0x004e, 0x005e, 0x006e, 0x00ce, 0x00de,
+	0x00ee, 0x00be, 0x0005, 0x080c, 0x9d39, 0x7003, 0x1200, 0x7838,
+	0x7012, 0x783c, 0x7016, 0x00c6, 0x7820, 0x9086, 0x0004, 0x1148,
+	0x7810, 0x9005, 0x0130, 0x00b6, 0x2058, 0xb810, 0xb914, 0x00be,
+	0x0020, 0x2061, 0x1800, 0x607c, 0x6180, 0x9084, 0x00ff, 0x700a,
+	0x710e, 0x00ce, 0x60c3, 0x002c, 0x0804, 0xa32a, 0x080c, 0x9d39,
+	0x7003, 0x0f00, 0x7808, 0xd09c, 0x0128, 0xb810, 0x9084, 0x00ff,
+	0x700a, 0xb814, 0x700e, 0x60c3, 0x0008, 0x0804, 0xa32a, 0x0156,
+	0x080c, 0x9d84, 0x7003, 0x0200, 0x080c, 0x8696, 0x20a9, 0x0006,
+	0x2011, 0xffec, 0x2019, 0xffed, 0x9ef0, 0x0002, 0x2305, 0x2072,
+	0x8e70, 0x2205, 0x2072, 0x8e70, 0x9398, 0x0002, 0x9290, 0x0002,
+	0x1f04, 0xa5a6, 0x60c3, 0x001c, 0x015e, 0x0804, 0xa32a, 0x0016,
+	0x0026, 0x080c, 0x9d60, 0x080c, 0x9d72, 0x9e80, 0x0004, 0x20e9,
+	0x0000, 0x20a0, 0x7814, 0x0096, 0x2048, 0xa800, 0x2048, 0xa860,
+	0x20e0, 0xa85c, 0x9080, 0x0021, 0x2098, 0x009e, 0x7808, 0x9088,
+	0x0002, 0x21a8, 0x9192, 0x0010, 0x1250, 0x4003, 0x9080, 0x0004,
+	0x8003, 0x60c2, 0x080c, 0xa32a, 0x002e, 0x001e, 0x0005, 0x20a9,
+	0x0010, 0x4003, 0x080c, 0xabe9, 0x20a1, 0x0240, 0x22a8, 0x4003,
+	0x0c68, 0x080c, 0x9d39, 0x7003, 0x6200, 0x7808, 0x700e, 0x60c3,
+	0x0008, 0x0804, 0xa32a, 0x0016, 0x0026, 0x080c, 0x9d39, 0x20e9,
+	0x0000, 0x20a1, 0x024c, 0x7814, 0x0096, 0x2048, 0xa800, 0x2048,
+	0xa860, 0x20e0, 0xa85c, 0x9080, 0x0023, 0x2098, 0x009e, 0x7808,
+	0x9088, 0x0002, 0x21a8, 0x4003, 0x8003, 0x60c2, 0x080c, 0xa32a,
+	0x002e, 0x001e, 0x0005, 0x00e6, 0x00c6, 0x0006, 0x0126, 0x2091,
+	0x8000, 0x2071, 0x19e6, 0x700c, 0x2060, 0x8cff, 0x0178, 0x080c,
+	0xce8e, 0x1110, 0x080c, 0xb905, 0x600c, 0x0006, 0x080c, 0xd0fa,
+	0x080c, 0xaf43, 0x080c, 0xa761, 0x00ce, 0x0c78, 0x2c00, 0x700e,
+	0x700a, 0x012e, 0x000e, 0x00ce, 0x00ee, 0x0005, 0x0126, 0x0156,
+	0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0026, 0x0016, 0x0006,
+	0x2091, 0x8000, 0x2001, 0x180c, 0x200c, 0x918c, 0xe7ff, 0x2102,
+	0x2069, 0x0100, 0x2079, 0x0140, 0x2071, 0x19e6, 0x7024, 0x2060,
+	0x8cff, 0x01f8, 0x080c, 0xa356, 0x6ac0, 0x68c3, 0x0000, 0x080c,
+	0x8636, 0x00c6, 0x2061, 0x0100, 0x080c, 0xad3a, 0x00ce, 0x20a9,
+	0x01f4, 0x0461, 0x2009, 0x0013, 0x080c, 0xafbe, 0x000e, 0x001e,
+	0x002e, 0x006e, 0x00ce, 0x00de, 0x00ee, 0x00fe, 0x015e, 0x012e,
+	0x0005, 0x2001, 0x1800, 0x2004, 0x9096, 0x0001, 0x0d78, 0x9096,
+	0x0004, 0x0d60, 0x080c, 0x8636, 0x6814, 0x9084, 0x0001, 0x0110,
+	0x68a7, 0x95f5, 0x6817, 0x0008, 0x68c3, 0x0000, 0x2011, 0x5f16,
+	0x080c, 0x85b0, 0x20a9, 0x01f4, 0x0009, 0x08c0, 0x6824, 0xd094,
+	0x0140, 0x6827, 0x0004, 0x7804, 0x9084, 0x4000, 0x190c, 0x2d5e,
+	0x0090, 0xd084, 0x0118, 0x6827, 0x0001, 0x0010, 0x1f04, 0xa68e,
+	0x7804, 0x9084, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2d4e,
+	0x9006, 0x080c, 0x2d4e, 0x0005, 0x0126, 0x0156, 0x00f6, 0x00e6,
+	0x00d6, 0x00c6, 0x0066, 0x0026, 0x0016, 0x0006, 0x2091, 0x8000,
+	0x2001, 0x180c, 0x200c, 0x918c, 0xdbff, 0x2102, 0x2069, 0x0100,
+	0x2079, 0x0140, 0x2071, 0x19e6, 0x703c, 0x2060, 0x8cff, 0x0904,
+	0xa717, 0x9386, 0x0002, 0x1128, 0x6814, 0x9084, 0x0002, 0x0904,
+	0xa717, 0x68af, 0x95f5, 0x6817, 0x0010, 0x2009, 0x00fa, 0x8109,
+	0x1df0, 0x69c6, 0x68cb, 0x0008, 0x080c, 0x8643, 0x080c, 0x2038,
+	0x2001, 0x0032, 0x6920, 0xd1bc, 0x0130, 0x8001, 0x1dd8, 0x692c,
+	0x918d, 0x0008, 0x692e, 0x20a9, 0x03e8, 0x6824, 0xd094, 0x0140,
+	0x6827, 0x0004, 0x7804, 0x9084, 0x4000, 0x190c, 0x2d5e, 0x0090,
+	0xd08c, 0x0118, 0x6827, 0x0002, 0x0010, 0x1f04, 0xa6ed, 0x7804,
+	0x9084, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2d4e, 0x9006,
+	0x080c, 0x2d4e, 0x6827, 0x4000, 0x6824, 0x83ff, 0x1140, 0x2009,
+	0x0049, 0x6020, 0x9086, 0x0009, 0x0110, 0x080c, 0xafbe, 0x000e,
+	0x001e, 0x002e, 0x006e, 0x00ce, 0x00de, 0x00ee, 0x00fe, 0x015e,
+	0x012e, 0x0005, 0x00d6, 0x0126, 0x2091, 0x8000, 0x2069, 0x19e6,
+	0x6a06, 0x012e, 0x00de, 0x0005, 0x00d6, 0x0126, 0x2091, 0x8000,
+	0x2069, 0x19e6, 0x6a32, 0x012e, 0x00de, 0x0005, 0x080c, 0x9efc,
+	0x7854, 0x7032, 0x7042, 0x7047, 0x1000, 0x00f8, 0x080c, 0x9efc,
+	0x7854, 0x7032, 0x7042, 0x7047, 0x4000, 0x00b8, 0x080c, 0x9efc,
+	0x7854, 0x7032, 0x7042, 0x7047, 0x2000, 0x0078, 0x080c, 0x9efc,
+	0x7854, 0x7032, 0x7042, 0x7047, 0x0400, 0x0038, 0x080c, 0x9efc,
+	0x7854, 0x7032, 0x7042, 0x7047, 0x0200, 0x60c3, 0x0020, 0x0804,
+	0xa32a, 0x00e6, 0x2071, 0x19e6, 0x7020, 0x9005, 0x0110, 0x8001,
+	0x7022, 0x00ee, 0x0005, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0076,
+	0x0066, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071, 0x19e6, 0x7614,
+	0x2660, 0x2678, 0x2039, 0x0001, 0x87ff, 0x0904, 0xa806, 0x8cff,
+	0x0904, 0xa806, 0x6020, 0x9086, 0x0006, 0x1904, 0xa801, 0x88ff,
+	0x0138, 0x2800, 0x9c06, 0x1904, 0xa801, 0x2039, 0x0000, 0x0050,
+	0x6010, 0x9b06, 0x1904, 0xa801, 0x85ff, 0x0120, 0x6054, 0x9106,
+	0x1904, 0xa801, 0x7024, 0x9c06, 0x15b0, 0x2069, 0x0100, 0x68c0,
+	0x9005, 0x1160, 0x6824, 0xd084, 0x0148, 0x6827, 0x0001, 0x080c,
+	0x8636, 0x080c, 0xa88b, 0x7027, 0x0000, 0x0428, 0x080c, 0x8636,
+	0x6820, 0xd0b4, 0x0110, 0x68a7, 0x95f5, 0x6817, 0x0008, 0x68c3,
+	0x0000, 0x080c, 0xa88b, 0x7027, 0x0000, 0x0036, 0x2069, 0x0140,
+	0x6b04, 0x9384, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2d4e,
+	0x9006, 0x080c, 0x2d4e, 0x2069, 0x0100, 0x6824, 0xd084, 0x0110,
+	0x6827, 0x0001, 0x003e, 0x7014, 0x9c36, 0x1110, 0x660c, 0x7616,
+	0x7010, 0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00, 0x7012,
+	0x0010, 0x7013, 0x0000, 0x660c, 0x0066, 0x2c00, 0x9f06, 0x0110,
+	0x7e0e, 0x0008, 0x2678, 0x89ff, 0x1168, 0x600f, 0x0000, 0x6014,
+	0x0096, 0x2048, 0x080c, 0xcc84, 0x0110, 0x080c, 0xe6dd, 0x009e,
+	0x080c, 0xaf74, 0x080c, 0xa761, 0x88ff, 0x1190, 0x00ce, 0x0804,
+	0xa77c, 0x2c78, 0x600c, 0x2060, 0x0804, 0xa77c, 0x9006, 0x012e,
+	0x000e, 0x006e, 0x007e, 0x00ce, 0x00de, 0x00ee, 0x00fe, 0x0005,
+	0x601b, 0x0000, 0x00ce, 0x98c5, 0x0001, 0x0c88, 0x00f6, 0x00e6,
+	0x00d6, 0x0096, 0x00c6, 0x0066, 0x0026, 0x0006, 0x0126, 0x2091,
+	0x8000, 0x2071, 0x19e6, 0x7638, 0x2660, 0x2678, 0x8cff, 0x0904,
+	0xa87a, 0x6020, 0x9086, 0x0006, 0x1904, 0xa875, 0x87ff, 0x0128,
+	0x2700, 0x9c06, 0x1904, 0xa875, 0x0040, 0x6010, 0x9b06, 0x15e8,
+	0x85ff, 0x0118, 0x6054, 0x9106, 0x15c0, 0x703c, 0x9c06, 0x1168,
+	0x0036, 0x2019, 0x0001, 0x080c, 0xa6ac, 0x7033, 0x0000, 0x9006,
+	0x703e, 0x7042, 0x7046, 0x704a, 0x003e, 0x7038, 0x9c36, 0x1110,
+	0x660c, 0x763a, 0x7034, 0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118,
+	0x2f00, 0x7036, 0x0010, 0x7037, 0x0000, 0x660c, 0x0066, 0x2c00,
+	0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000, 0x6014,
+	0x2048, 0x080c, 0xcc84, 0x0110, 0x080c, 0xe6dd, 0x080c, 0xaf74,
+	0x87ff, 0x1198, 0x00ce, 0x0804, 0xa826, 0x2c78, 0x600c, 0x2060,
+	0x0804, 0xa826, 0x9006, 0x012e, 0x000e, 0x002e, 0x006e, 0x00ce,
+	0x009e, 0x00de, 0x00ee, 0x00fe, 0x0005, 0x601b, 0x0000, 0x00ce,
+	0x97bd, 0x0001, 0x0c80, 0x00e6, 0x2071, 0x19e6, 0x2001, 0x1800,
+	0x2004, 0x9086, 0x0002, 0x1118, 0x7007, 0x0005, 0x0010, 0x7007,
+	0x0000, 0x00ee, 0x0005, 0x00f6, 0x00e6, 0x00c6, 0x0066, 0x0026,
+	0x0006, 0x0126, 0x2091, 0x8000, 0x2071, 0x19e6, 0x2c10, 0x7638,
+	0x2660, 0x2678, 0x8cff, 0x0540, 0x2200, 0x9c06, 0x1508, 0x7038,
+	0x9c36, 0x1110, 0x660c, 0x763a, 0x7034, 0x9c36, 0x1140, 0x2c00,
+	0x9f36, 0x0118, 0x2f00, 0x7036, 0x0010, 0x7037, 0x0000, 0x660c,
+	0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000,
+	0x6004, 0x9086, 0x0040, 0x090c, 0x9657, 0x9085, 0x0001, 0x0020,
+	0x2c78, 0x600c, 0x2060, 0x08b0, 0x012e, 0x000e, 0x002e, 0x006e,
+	0x00ce, 0x00ee, 0x00fe, 0x0005, 0x0096, 0x00f6, 0x00e6, 0x00d6,
+	0x00c6, 0x0066, 0x0026, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071,
+	0x19e6, 0x760c, 0x2660, 0x2678, 0x8cff, 0x0904, 0xa971, 0x6010,
+	0x00b6, 0x2058, 0xb8a0, 0x00be, 0x9206, 0x1904, 0xa96c, 0x7024,
+	0x9c06, 0x1520, 0x2069, 0x0100, 0x68c0, 0x9005, 0x0904, 0xa943,
+	0x080c, 0xa356, 0x68c3, 0x0000, 0x080c, 0xa88b, 0x7027, 0x0000,
 	0x0036, 0x2069, 0x0140, 0x6b04, 0x9384, 0x1000, 0x0138, 0x2001,
-	0x0100, 0x080c, 0x2cfc, 0x9006, 0x080c, 0x2cfc, 0x2069, 0x0100,
+	0x0100, 0x080c, 0x2d4e, 0x9006, 0x080c, 0x2d4e, 0x2069, 0x0100,
 	0x6824, 0xd084, 0x0110, 0x6827, 0x0001, 0x003e, 0x700c, 0x9c36,
 	0x1110, 0x660c, 0x760e, 0x7008, 0x9c36, 0x1140, 0x2c00, 0x9f36,
 	0x0118, 0x2f00, 0x700a, 0x0010, 0x700b, 0x0000, 0x660c, 0x0066,
 	0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000,
-	0x080c, 0xcd4f, 0x1180, 0x080c, 0x31f5, 0x080c, 0xcd60, 0x1518,
-	0x080c, 0xb821, 0x0400, 0x080c, 0xa7a7, 0x6824, 0xd084, 0x09b0,
-	0x6827, 0x0001, 0x0898, 0x080c, 0xcd60, 0x1118, 0x080c, 0xb821,
-	0x0090, 0x6014, 0x2048, 0x080c, 0xcb58, 0x0168, 0x6020, 0x9086,
-	0x0003, 0x1520, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c,
-	0x6c94, 0x080c, 0xcd43, 0x080c, 0xcfcc, 0x080c, 0xae90, 0x080c,
-	0xa67d, 0x00ce, 0x0804, 0xacac, 0x2c78, 0x600c, 0x2060, 0x0804,
-	0xacac, 0x700f, 0x0000, 0x700b, 0x0000, 0x012e, 0x006e, 0x009e,
-	0x00ae, 0x00ce, 0x00de, 0x00ee, 0x00fe, 0x0005, 0x6020, 0x9086,
-	0x0006, 0x1d08, 0x080c, 0xe58c, 0x08f0, 0x00d6, 0x0156, 0x080c,
-	0x9cc7, 0x7a14, 0x82ff, 0x0138, 0x7003, 0x0100, 0x700b, 0x0003,
-	0x60c3, 0x0008, 0x0490, 0x7003, 0x0200, 0x7007, 0x0000, 0x2069,
-	0x1800, 0x901e, 0x6800, 0x9086, 0x0004, 0x1110, 0xc38d, 0x0060,
-	0x080c, 0x73b3, 0x1110, 0xc3ad, 0x0008, 0xc3a5, 0x6adc, 0xd29c,
-	0x1110, 0xd2ac, 0x0108, 0xc39d, 0x730e, 0x080c, 0x85df, 0x20a9,
-	0x0006, 0x2011, 0xffec, 0x2019, 0xffed, 0x2071, 0x0250, 0x2305,
-	0x2072, 0x8e70, 0x2205, 0x2072, 0x8e70, 0x9398, 0x0002, 0x9290,
-	0x0002, 0x1f04, 0xad6f, 0x60c3, 0x0020, 0x080c, 0xa263, 0x015e,
-	0x00de, 0x0005, 0x0156, 0x080c, 0x9cc7, 0x7a14, 0x82ff, 0x0168,
-	0x9286, 0xffff, 0x0118, 0x9282, 0x000e, 0x1238, 0x7003, 0x0100,
-	0x700b, 0x0003, 0x60c3, 0x0008, 0x0488, 0x7003, 0x0200, 0x7007,
-	0x001c, 0x700f, 0x0001, 0x2011, 0x19bc, 0x2204, 0x8007, 0x701a,
-	0x8210, 0x2204, 0x8007, 0x701e, 0x0421, 0x1120, 0xb8a0, 0x9082,
-	0x007f, 0x0248, 0x2001, 0x181f, 0x2004, 0x7022, 0x2001, 0x1820,
-	0x2004, 0x7026, 0x0030, 0x2001, 0x1818, 0x2004, 0x9084, 0x00ff,
-	0x7026, 0x20a9, 0x0004, 0x20e1, 0x0001, 0x2099, 0x1805, 0x20e9,
-	0x0000, 0x20a1, 0x0256, 0x4003, 0x60c3, 0x001c, 0x015e, 0x0804,
-	0xa263, 0x0006, 0x2001, 0x1837, 0x2004, 0xd0ac, 0x000e, 0x0005,
-	0x2011, 0x0003, 0x080c, 0xa63e, 0x2011, 0x0002, 0x080c, 0xa648,
-	0x080c, 0xa552, 0x0036, 0x901e, 0x080c, 0xa5c8, 0x003e, 0x0005,
-	0x080c, 0x332b, 0x0188, 0x0016, 0x00b6, 0x00c6, 0x7010, 0x9085,
-	0x0020, 0x7012, 0x2009, 0x007e, 0x080c, 0x6616, 0xb85c, 0xc0ac,
-	0xb85e, 0x00ce, 0x00be, 0x001e, 0x0005, 0x2071, 0x188d, 0x7000,
-	0x9005, 0x0140, 0x2001, 0x0976, 0x2071, 0x1800, 0x7076, 0x707a,
-	0x706b, 0xffe0, 0x2071, 0x1800, 0x7074, 0x7056, 0x705b, 0x1cd0,
-	0x0005, 0x00e6, 0x0126, 0x2071, 0x1800, 0x2091, 0x8000, 0x7554,
-	0x9582, 0x0010, 0x0608, 0x7058, 0x2060, 0x6000, 0x9086, 0x0000,
-	0x0148, 0x9ce0, 0x0018, 0x7068, 0x9c02, 0x1208, 0x0cb0, 0x2061,
-	0x1cd0, 0x0c98, 0x6003, 0x0008, 0x8529, 0x7556, 0x9ca8, 0x0018,
-	0x7068, 0x9502, 0x1230, 0x755a, 0x9085, 0x0001, 0x012e, 0x00ee,
-	0x0005, 0x705b, 0x1cd0, 0x0cc0, 0x9006, 0x0cc0, 0x00e6, 0x2071,
-	0x1800, 0x7554, 0x9582, 0x0010, 0x0600, 0x7058, 0x2060, 0x6000,
-	0x9086, 0x0000, 0x0148, 0x9ce0, 0x0018, 0x7068, 0x9c02, 0x1208,
-	0x0cb0, 0x2061, 0x1cd0, 0x0c98, 0x6003, 0x0008, 0x8529, 0x7556,
-	0x9ca8, 0x0018, 0x7068, 0x9502, 0x1228, 0x755a, 0x9085, 0x0001,
-	0x00ee, 0x0005, 0x705b, 0x1cd0, 0x0cc8, 0x9006, 0x0cc8, 0x9c82,
-	0x1cd0, 0x0a0c, 0x0dd5, 0x2001, 0x181a, 0x2004, 0x9c02, 0x1a0c,
-	0x0dd5, 0x9006, 0x6006, 0x600a, 0x600e, 0x6016, 0x601a, 0x6012,
-	0x6023, 0x0000, 0x6003, 0x0000, 0x601e, 0x6056, 0x605a, 0x6026,
-	0x602a, 0x602e, 0x6032, 0x6036, 0x603a, 0x603e, 0x6042, 0x602a,
-	0x2061, 0x1800, 0x6054, 0x8000, 0x6056, 0x9086, 0x0001, 0x0108,
-	0x0005, 0x0126, 0x2091, 0x8000, 0x080c, 0x96a6, 0x012e, 0x0cc0,
-	0x0006, 0x6000, 0x9086, 0x0000, 0x01b0, 0x601c, 0xd084, 0x190c,
-	0x1a70, 0x6017, 0x0000, 0x6023, 0x0007, 0x2001, 0x1985, 0x2004,
-	0x0006, 0x9082, 0x0051, 0x000e, 0x0208, 0x8004, 0x601a, 0x080c,
-	0xe846, 0x6043, 0x0000, 0x000e, 0x0005, 0x00e6, 0x0126, 0x2071,
-	0x1800, 0x2091, 0x8000, 0x7554, 0x9582, 0x0001, 0x0608, 0x7058,
+	0x080c, 0xce7d, 0x1180, 0x080c, 0x3247, 0x080c, 0xce8e, 0x1518,
+	0x080c, 0xb905, 0x0400, 0x080c, 0xa88b, 0x6824, 0xd084, 0x09b0,
+	0x6827, 0x0001, 0x0898, 0x080c, 0xce8e, 0x1118, 0x080c, 0xb905,
+	0x0090, 0x6014, 0x2048, 0x080c, 0xcc84, 0x0168, 0x6020, 0x9086,
+	0x0003, 0x1508, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c,
+	0x6d0b, 0x080c, 0xce71, 0x080c, 0xd0fa, 0x080c, 0xaf74, 0x080c,
+	0xa761, 0x00ce, 0x0804, 0xa8ec, 0x2c78, 0x600c, 0x2060, 0x0804,
+	0xa8ec, 0x012e, 0x000e, 0x002e, 0x006e, 0x00ce, 0x00de, 0x00ee,
+	0x00fe, 0x009e, 0x0005, 0x6020, 0x9086, 0x0006, 0x1d20, 0x080c,
+	0xe6dd, 0x0c08, 0x00d6, 0x080c, 0x9d84, 0x7003, 0x0200, 0x7007,
+	0x0014, 0x60c3, 0x0014, 0x20e1, 0x0001, 0x2099, 0x1988, 0x20e9,
+	0x0000, 0x20a1, 0x0250, 0x20a9, 0x0004, 0x4003, 0x7023, 0x0004,
+	0x7027, 0x7878, 0x080c, 0xa32a, 0x00de, 0x0005, 0x080c, 0x9d84,
+	0x700b, 0x0800, 0x7814, 0x9084, 0xff00, 0x700e, 0x7814, 0x9084,
+	0x00ff, 0x7022, 0x782c, 0x7026, 0x7858, 0x9084, 0x00ff, 0x9085,
+	0x0200, 0x7002, 0x7858, 0x9084, 0xff00, 0x8007, 0x7006, 0x60c2,
+	0x0804, 0xa32a, 0x00b6, 0x00d6, 0x0016, 0x00d6, 0x2f68, 0x2009,
+	0x0035, 0x080c, 0xd300, 0x00de, 0x1904, 0xaa1f, 0x080c, 0x9d39,
+	0x7003, 0x1300, 0x782c, 0x080c, 0xab25, 0x2068, 0x6820, 0x9086,
+	0x0003, 0x0560, 0x7810, 0x2058, 0xbaa0, 0x080c, 0xaead, 0x11d8,
+	0x9286, 0x007e, 0x1128, 0x700b, 0x00ff, 0x700f, 0xfffe, 0x0498,
+	0x9286, 0x007f, 0x1128, 0x700b, 0x00ff, 0x700f, 0xfffd, 0x0458,
+	0x9284, 0xff80, 0x0180, 0x9286, 0x0080, 0x1128, 0x700b, 0x00ff,
+	0x700f, 0xfffc, 0x0400, 0x92d8, 0x1000, 0x2b5c, 0xb810, 0x700a,
+	0xb814, 0x700e, 0x00c0, 0x6098, 0x700e, 0x00a8, 0x080c, 0xaead,
+	0x1130, 0x7810, 0x2058, 0xb8a0, 0x9082, 0x007e, 0x0250, 0x00d6,
+	0x2069, 0x181f, 0x2d04, 0x700a, 0x8d68, 0x2d04, 0x700e, 0x00de,
+	0x0010, 0x6034, 0x700e, 0x7838, 0x7012, 0x783c, 0x7016, 0x60c3,
+	0x000c, 0x001e, 0x00de, 0x080c, 0xa32a, 0x00be, 0x0005, 0x781b,
+	0x0001, 0x7803, 0x0006, 0x001e, 0x00de, 0x00be, 0x0005, 0x792c,
+	0x9180, 0x0008, 0x200c, 0x9186, 0x0006, 0x01c0, 0x9186, 0x0003,
+	0x0904, 0xaa9a, 0x9186, 0x0005, 0x0904, 0xaa82, 0x9186, 0x0004,
+	0x05d8, 0x9186, 0x0008, 0x0904, 0xaa8b, 0x7807, 0x0037, 0x782f,
+	0x0003, 0x7817, 0x1700, 0x080c, 0xab02, 0x0005, 0x080c, 0xaac3,
+	0x00d6, 0x0026, 0x792c, 0x2168, 0x2009, 0x4000, 0x6800, 0x0002,
+	0xaa63, 0xaa6e, 0xaa65, 0xaa6e, 0xaa6a, 0xaa63, 0xaa63, 0xaa6e,
+	0xaa6e, 0xaa6e, 0xaa6e, 0xaa63, 0xaa63, 0xaa63, 0xaa63, 0xaa63,
+	0xaa6e, 0xaa63, 0xaa6e, 0x080c, 0x0dd5, 0x6824, 0xd0e4, 0x0110,
+	0xd0cc, 0x0110, 0x900e, 0x0010, 0x2009, 0x2000, 0x682c, 0x7022,
+	0x6830, 0x7026, 0x0804, 0xaabc, 0x080c, 0xaac3, 0x00d6, 0x0026,
+	0x792c, 0x2168, 0x2009, 0x4000, 0x6a00, 0x9286, 0x0002, 0x1108,
+	0x900e, 0x04d0, 0x080c, 0xaac3, 0x00d6, 0x0026, 0x792c, 0x2168,
+	0x2009, 0x4000, 0x0488, 0x04b9, 0x00d6, 0x0026, 0x792c, 0x2168,
+	0x2009, 0x4000, 0x9286, 0x0005, 0x0118, 0x9286, 0x0002, 0x1108,
+	0x900e, 0x0410, 0x0441, 0x00d6, 0x0026, 0x792c, 0x2168, 0x6814,
+	0x6924, 0xc185, 0x6926, 0x0096, 0x2048, 0xa9ac, 0xa834, 0x9112,
+	0xa9b0, 0xa838, 0x009e, 0x9103, 0x7022, 0x7226, 0x792c, 0x9180,
+	0x0000, 0x2004, 0x908e, 0x0002, 0x0130, 0x908e, 0x0004, 0x0118,
+	0x2009, 0x4000, 0x0008, 0x900e, 0x712a, 0x60c3, 0x0018, 0x002e,
+	0x00de, 0x0804, 0xa32a, 0x00b6, 0x0036, 0x0046, 0x0056, 0x0066,
+	0x080c, 0x9d84, 0x9006, 0x7003, 0x0200, 0x7938, 0x710a, 0x793c,
+	0x710e, 0x7810, 0x2058, 0xb8a0, 0x080c, 0xaead, 0x1118, 0x9092,
+	0x007e, 0x0268, 0x00d6, 0x2069, 0x181f, 0x2d2c, 0x8d68, 0x2d34,
+	0x90d8, 0x1000, 0x2b5c, 0xbb10, 0xbc14, 0x00de, 0x0028, 0x901e,
+	0x6498, 0x2029, 0x0000, 0x6634, 0x782c, 0x9080, 0x0008, 0x2004,
+	0x9086, 0x0003, 0x1128, 0x7512, 0x7616, 0x731a, 0x741e, 0x0020,
+	0x7312, 0x7416, 0x751a, 0x761e, 0x006e, 0x005e, 0x004e, 0x003e,
+	0x00be, 0x0005, 0x080c, 0x9d84, 0x7003, 0x0100, 0x782c, 0x700a,
+	0x7814, 0x700e, 0x700e, 0x60c3, 0x0008, 0x0804, 0xa32a, 0x080c,
+	0x9d30, 0x7003, 0x1400, 0x7838, 0x700a, 0x0079, 0x783c, 0x700e,
+	0x782c, 0x7012, 0x7830, 0x7016, 0x7834, 0x9084, 0x00ff, 0x8007,
+	0x701a, 0x60c3, 0x0010, 0x0804, 0xa32a, 0x00e6, 0x2071, 0x0240,
+	0x0006, 0x00f6, 0x2078, 0x7810, 0x00b6, 0x2058, 0xb8cc, 0xd084,
+	0x0120, 0x7844, 0x702a, 0x7848, 0x702e, 0x00be, 0x00fe, 0x000e,
+	0x00ee, 0x0005, 0x080c, 0x9d7b, 0x7003, 0x0100, 0x782c, 0x700a,
+	0x7814, 0x700e, 0x60c3, 0x0008, 0x0804, 0xa32a, 0x0021, 0x60c3,
+	0x0000, 0x0804, 0xa32a, 0x00d6, 0x080c, 0xabfe, 0xb810, 0x9085,
+	0x0300, 0x7002, 0xb814, 0x7006, 0x2069, 0x1800, 0x687c, 0x700a,
+	0x6880, 0x700e, 0x7013, 0x0819, 0x080c, 0xa318, 0x721a, 0x2f10,
+	0x7222, 0x7a08, 0x7226, 0x2071, 0x024c, 0x00de, 0x0005, 0x00a9,
+	0x7914, 0x712a, 0x60c3, 0x0000, 0x60a7, 0x9575, 0x0026, 0x080c,
+	0x2be3, 0x0228, 0x2011, 0x0101, 0x2204, 0xc0c5, 0x2012, 0x002e,
+	0x080c, 0xa34d, 0x080c, 0x862d, 0x0005, 0x0036, 0x0096, 0x00d6,
+	0x00e6, 0x7858, 0x2048, 0xaa7c, 0x9296, 0x00c0, 0x9294, 0xfffd,
+	0xaa7e, 0xaa80, 0x9294, 0x0300, 0xaa82, 0xa96c, 0x9194, 0x00ff,
+	0xab74, 0x9384, 0x00ff, 0x908d, 0xc200, 0xa96e, 0x9384, 0xff00,
+	0x9215, 0xaa76, 0xa870, 0xaa78, 0xa87a, 0xaa72, 0x00d6, 0x2069,
+	0x0200, 0x080c, 0xabfe, 0x00de, 0x20e9, 0x0000, 0x20a1, 0x0240,
+	0x20a9, 0x000a, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x001b, 0x2098,
+	0x4003, 0x60a3, 0x0035, 0xaa68, 0x9294, 0x7000, 0x9286, 0x3000,
+	0x0110, 0x60a3, 0x0037, 0x00ee, 0x00de, 0x009e, 0x003e, 0x0005,
+	0x900e, 0x7814, 0x0096, 0x2048, 0xa87c, 0xd0fc, 0x01c0, 0x9084,
+	0x0003, 0x11a8, 0x2001, 0x180c, 0x2004, 0xd0bc, 0x0180, 0x7824,
+	0xd0cc, 0x1168, 0xd0c4, 0x1158, 0xa8a8, 0x9005, 0x1140, 0x2001,
+	0x180c, 0x200c, 0xc1d5, 0x2102, 0x2009, 0x19b1, 0x210c, 0x009e,
+	0x918d, 0x0092, 0x0010, 0x2009, 0x0096, 0x60ab, 0x0036, 0x6116,
+	0x0005, 0x2009, 0x0009, 0x00a0, 0x2009, 0x000a, 0x0088, 0x2009,
+	0x000b, 0x0070, 0x2009, 0x000c, 0x0058, 0x2009, 0x000d, 0x0040,
+	0x2009, 0x000e, 0x0028, 0x2009, 0x000f, 0x0010, 0x2009, 0x0008,
+	0x6912, 0x0005, 0x080c, 0x9d39, 0x0016, 0x0026, 0x0096, 0x00d6,
+	0x7814, 0x2048, 0x7013, 0x0138, 0x2001, 0x1837, 0x2004, 0x9084,
+	0x0028, 0x1138, 0x2001, 0x197b, 0x2004, 0x9086, 0xaaaa, 0x1904,
+	0xaca3, 0x7003, 0x5400, 0x00c6, 0x2061, 0x1800, 0x607c, 0x9084,
+	0x00ff, 0xa998, 0x810f, 0x918c, 0xff00, 0x9105, 0x700a, 0x6080,
+	0x700e, 0xa998, 0x918c, 0xff00, 0x7112, 0x20a9, 0x0004, 0x2009,
+	0x1805, 0x2e10, 0x9290, 0x0006, 0x2104, 0x2012, 0x8108, 0x8210,
+	0x1f04, 0xac34, 0x20a9, 0x0004, 0x2009, 0x1801, 0x2104, 0x2012,
+	0x8108, 0x8210, 0x1f04, 0xac3e, 0xa860, 0x20e0, 0xa85c, 0x9080,
+	0x0029, 0x2098, 0x2009, 0x0006, 0x20a9, 0x0001, 0x4002, 0x8007,
+	0x2012, 0x8210, 0x8109, 0x1dc0, 0x00d6, 0x2069, 0x0200, 0x080c,
+	0xabe9, 0x00de, 0x2071, 0x0240, 0x2011, 0x0240, 0x2009, 0x0002,
+	0x20a9, 0x0001, 0x4002, 0x8007, 0x2012, 0x8210, 0x8109, 0x1dc0,
+	0x2009, 0x0008, 0x20a9, 0x0001, 0x4002, 0x8007, 0x2012, 0x8210,
+	0x8109, 0x1dc0, 0xa85c, 0x9080, 0x0031, 0x2098, 0x2009, 0x0008,
+	0x20a9, 0x0001, 0x4002, 0x8007, 0x2012, 0x8210, 0x8109, 0x1dc0,
+	0x00ce, 0x60c3, 0x004c, 0x60a3, 0x0056, 0x60a7, 0x9575, 0x2001,
+	0x1837, 0x2004, 0x9084, 0x0028, 0x1168, 0x080c, 0x743e, 0x0150,
+	0x6028, 0xc0bd, 0x602a, 0x6014, 0x9084, 0x1804, 0x9085, 0x0029,
+	0x6016, 0x0010, 0x080c, 0xa32a, 0x080c, 0x862d, 0x00de, 0x009e,
+	0x002e, 0x001e, 0x0005, 0x00e6, 0x2071, 0x0240, 0x2001, 0x2200,
+	0x9085, 0x00ff, 0x7002, 0x7007, 0xffff, 0x2071, 0x0100, 0x709b,
+	0x00ff, 0x00ee, 0x0804, 0xac19, 0x080c, 0x9d39, 0x0016, 0x0026,
+	0x0096, 0x00d6, 0x7814, 0x2048, 0x7013, 0x0138, 0x7003, 0x5500,
+	0x00c6, 0xa89c, 0x9084, 0x00ff, 0xa998, 0x810f, 0x918c, 0xff00,
+	0x9105, 0x700a, 0xa99c, 0x918c, 0xff00, 0xa8a0, 0x9084, 0x00ff,
+	0x9105, 0x700e, 0xa998, 0x918c, 0xff00, 0x2061, 0x1800, 0x607c,
+	0x9084, 0x00ff, 0x910d, 0x7112, 0x6180, 0x7116, 0x2009, 0x0008,
+	0xa860, 0x20e0, 0xa85c, 0x9080, 0x0029, 0x2098, 0x2e10, 0x9290,
+	0x0006, 0x20a9, 0x0001, 0x4002, 0x8007, 0x2012, 0x8210, 0x8109,
+	0x1dc0, 0x20a9, 0x0004, 0x2009, 0x1805, 0x2104, 0x2012, 0x8108,
+	0x8210, 0x1f04, 0xacf5, 0x20a9, 0x0002, 0x2009, 0x1801, 0x2104,
+	0x2012, 0x8108, 0x8210, 0x1f04, 0xacff, 0x00d6, 0x0016, 0x2069,
+	0x0200, 0x080c, 0xabe9, 0x001e, 0x00de, 0x2071, 0x0240, 0x20a9,
+	0x0002, 0x2009, 0x1803, 0x2011, 0x0240, 0x2104, 0x2012, 0x8108,
+	0x8210, 0x1f04, 0xad15, 0x2009, 0x0008, 0x4002, 0x8007, 0x2012,
+	0x8210, 0x8109, 0x1dd0, 0x9006, 0x20a9, 0x0008, 0x2012, 0x8210,
+	0x1f04, 0xad26, 0x00ce, 0x60c3, 0x004c, 0x60a3, 0x0056, 0x60a7,
+	0x9575, 0x080c, 0xa32a, 0x080c, 0x862d, 0x00de, 0x009e, 0x002e,
+	0x001e, 0x0005, 0x00d6, 0x9290, 0x0018, 0x8214, 0x20e9, 0x0000,
+	0x2069, 0x0200, 0x6813, 0x0000, 0x22a8, 0x9284, 0x00e0, 0x0128,
+	0x20a9, 0x0020, 0x9292, 0x0020, 0x0008, 0x9016, 0x20a1, 0x0240,
+	0x9006, 0x4004, 0x82ff, 0x0120, 0x6810, 0x8000, 0x6812, 0x0c60,
+	0x00de, 0x0005, 0x00d6, 0x0096, 0x6014, 0x2048, 0xa878, 0x6056,
+	0x9006, 0xa836, 0xa83a, 0xa99c, 0xa946, 0xa84a, 0x6023, 0x0003,
+	0x6007, 0x0040, 0x6003, 0x0003, 0x600b, 0xffff, 0xa817, 0x0001,
+	0xa842, 0xa83e, 0x2900, 0xa85a, 0xa813, 0x20cc, 0x080c, 0x9216,
+	0x0126, 0x2091, 0x8000, 0x080c, 0x9891, 0x012e, 0x009e, 0x00de,
+	0x0005, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x00a6, 0x0096, 0x0066,
+	0x0126, 0x2091, 0x8000, 0x2071, 0x19e6, 0x760c, 0x2660, 0x2678,
+	0x8cff, 0x0904, 0xae0d, 0x7024, 0x9c06, 0x1520, 0x2069, 0x0100,
+	0x68c0, 0x9005, 0x0904, 0xaddf, 0x080c, 0xa356, 0x68c3, 0x0000,
+	0x080c, 0xa88b, 0x7027, 0x0000, 0x0036, 0x2069, 0x0140, 0x6b04,
+	0x9384, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2d4e, 0x9006,
+	0x080c, 0x2d4e, 0x2069, 0x0100, 0x6824, 0xd084, 0x0110, 0x6827,
+	0x0001, 0x003e, 0x700c, 0x9c36, 0x1110, 0x660c, 0x760e, 0x7008,
+	0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00, 0x700a, 0x0010,
+	0x700b, 0x0000, 0x660c, 0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e,
+	0x0008, 0x2678, 0x600f, 0x0000, 0x080c, 0xce7d, 0x1180, 0x080c,
+	0x3247, 0x080c, 0xce8e, 0x1518, 0x080c, 0xb905, 0x0400, 0x080c,
+	0xa88b, 0x6824, 0xd084, 0x09b0, 0x6827, 0x0001, 0x0898, 0x080c,
+	0xce8e, 0x1118, 0x080c, 0xb905, 0x0090, 0x6014, 0x2048, 0x080c,
+	0xcc84, 0x0168, 0x6020, 0x9086, 0x0003, 0x1520, 0xa867, 0x0103,
+	0xab7a, 0xa877, 0x0000, 0x080c, 0x6d17, 0x080c, 0xce71, 0x080c,
+	0xd0fa, 0x080c, 0xaf74, 0x080c, 0xa761, 0x00ce, 0x0804, 0xad90,
+	0x2c78, 0x600c, 0x2060, 0x0804, 0xad90, 0x700f, 0x0000, 0x700b,
+	0x0000, 0x012e, 0x006e, 0x009e, 0x00ae, 0x00ce, 0x00de, 0x00ee,
+	0x00fe, 0x0005, 0x6020, 0x9086, 0x0006, 0x1d08, 0x080c, 0xe6dd,
+	0x08f0, 0x00d6, 0x0156, 0x080c, 0x9d84, 0x7a14, 0x82ff, 0x0138,
+	0x7003, 0x0100, 0x700b, 0x0003, 0x60c3, 0x0008, 0x0490, 0x7003,
+	0x0200, 0x7007, 0x0000, 0x2069, 0x1800, 0x901e, 0x6800, 0x9086,
+	0x0004, 0x1110, 0xc38d, 0x0060, 0x080c, 0x743e, 0x1110, 0xc3ad,
+	0x0008, 0xc3a5, 0x6adc, 0xd29c, 0x1110, 0xd2ac, 0x0108, 0xc39d,
+	0x730e, 0x080c, 0x8696, 0x20a9, 0x0006, 0x2011, 0xffec, 0x2019,
+	0xffed, 0x2071, 0x0250, 0x2305, 0x2072, 0x8e70, 0x2205, 0x2072,
+	0x8e70, 0x9398, 0x0002, 0x9290, 0x0002, 0x1f04, 0xae53, 0x60c3,
+	0x0020, 0x080c, 0xa32a, 0x015e, 0x00de, 0x0005, 0x0156, 0x080c,
+	0x9d84, 0x7a14, 0x82ff, 0x0168, 0x9286, 0xffff, 0x0118, 0x9282,
+	0x000e, 0x1238, 0x7003, 0x0100, 0x700b, 0x0003, 0x60c3, 0x0008,
+	0x0488, 0x7003, 0x0200, 0x7007, 0x001c, 0x700f, 0x0001, 0x2011,
+	0x19bc, 0x2204, 0x8007, 0x701a, 0x8210, 0x2204, 0x8007, 0x701e,
+	0x0421, 0x1120, 0xb8a0, 0x9082, 0x007f, 0x0248, 0x2001, 0x181f,
+	0x2004, 0x7022, 0x2001, 0x1820, 0x2004, 0x7026, 0x0030, 0x2001,
+	0x1818, 0x2004, 0x9084, 0x00ff, 0x7026, 0x20a9, 0x0004, 0x20e1,
+	0x0001, 0x2099, 0x1805, 0x20e9, 0x0000, 0x20a1, 0x0256, 0x4003,
+	0x60c3, 0x001c, 0x015e, 0x0804, 0xa32a, 0x0006, 0x2001, 0x1837,
+	0x2004, 0xd0ac, 0x000e, 0x0005, 0x2011, 0x0003, 0x080c, 0xa722,
+	0x2011, 0x0002, 0x080c, 0xa72c, 0x080c, 0xa636, 0x0036, 0x901e,
+	0x080c, 0xa6ac, 0x003e, 0x0005, 0x080c, 0x337d, 0x0188, 0x0016,
+	0x00b6, 0x00c6, 0x7010, 0x9085, 0x0020, 0x7012, 0x2009, 0x007e,
+	0x080c, 0x6699, 0xb85c, 0xc0ac, 0xb85e, 0x00ce, 0x00be, 0x001e,
+	0x0005, 0x2071, 0x188d, 0x7000, 0x9005, 0x0140, 0x2001, 0x0976,
+	0x2071, 0x1800, 0x7076, 0x707a, 0x706b, 0xffe0, 0x2071, 0x1800,
+	0x7074, 0x7056, 0x705b, 0x1cd0, 0x0005, 0x00e6, 0x0126, 0x2071,
+	0x1800, 0x2091, 0x8000, 0x7554, 0x9582, 0x0010, 0x0608, 0x7058,
 	0x2060, 0x6000, 0x9086, 0x0000, 0x0148, 0x9ce0, 0x0018, 0x7068,
 	0x9c02, 0x1208, 0x0cb0, 0x2061, 0x1cd0, 0x0c98, 0x6003, 0x0008,
 	0x8529, 0x7556, 0x9ca8, 0x0018, 0x7068, 0x9502, 0x1230, 0x755a,
 	0x9085, 0x0001, 0x012e, 0x00ee, 0x0005, 0x705b, 0x1cd0, 0x0cc0,
-	0x9006, 0x0cc0, 0x6020, 0x9084, 0x000f, 0x0002, 0xaeed, 0xaef6,
-	0xaf11, 0xaf2c, 0xd280, 0xd29d, 0xd2b8, 0xaeed, 0xaef6, 0x8d93,
-	0xaf48, 0xaeed, 0xaeed, 0xaeed, 0xaeed, 0x9186, 0x0013, 0x1128,
-	0x080c, 0x959a, 0x080c, 0x96a6, 0x0005, 0x0005, 0x0066, 0x6000,
-	0x90b2, 0x0016, 0x1a0c, 0x0dd5, 0x0013, 0x006e, 0x0005, 0xaf0f,
-	0xb68b, 0xb868, 0xaf0f, 0xb8fe, 0xb22b, 0xaf0f, 0xaf0f, 0xb60d,
-	0xbe65, 0xaf0f, 0xaf0f, 0xaf0f, 0xaf0f, 0xaf0f, 0xaf0f, 0x080c,
-	0x0dd5, 0x0066, 0x6000, 0x90b2, 0x0016, 0x1a0c, 0x0dd5, 0x0013,
-	0x006e, 0x0005, 0xaf2a, 0xc53c, 0xaf2a, 0xaf2a, 0xaf2a, 0xaf2a,
-	0xaf2a, 0xaf2a, 0xc4de, 0xc6be, 0xaf2a, 0xc57d, 0xc5fc, 0xc57d,
-	0xc5fc, 0xaf2a, 0x080c, 0x0dd5, 0x6000, 0x9082, 0x0016, 0x1a0c,
-	0x0dd5, 0x6000, 0x0002, 0xaf46, 0xbeac, 0xbf91, 0xc0c1, 0xc26c,
-	0xaf46, 0xaf46, 0xaf46, 0xbe80, 0xc46a, 0xc46d, 0xaf46, 0xaf46,
-	0xaf46, 0xaf46, 0xc49c, 0xaf46, 0xaf46, 0xaf46, 0x080c, 0x0dd5,
-	0x0066, 0x6000, 0x90b2, 0x0016, 0x1a0c, 0x0dd5, 0x0013, 0x006e,
-	0x0005, 0xaf61, 0xaf61, 0xafa4, 0xb043, 0xb0d8, 0xaf61, 0xaf61,
-	0xaf61, 0xaf63, 0xaf61, 0xaf61, 0xaf61, 0xaf61, 0xaf61, 0xaf61,
-	0xaf61, 0x080c, 0x0dd5, 0x9186, 0x004c, 0x0588, 0x9186, 0x0003,
-	0x190c, 0x0dd5, 0x0096, 0x601c, 0xc0ed, 0x601e, 0x6003, 0x0003,
-	0x6106, 0x6014, 0x2048, 0xa87c, 0x9084, 0xa000, 0xc0b5, 0xa87e,
-	0xa8ac, 0xa846, 0xa8b0, 0xa84a, 0x9006, 0xa836, 0xa83a, 0xa884,
-	0x9092, 0x199a, 0x0210, 0x2001, 0x1999, 0x8003, 0x8013, 0x8213,
-	0x9210, 0x621a, 0x009e, 0x2c10, 0x080c, 0x1bba, 0x080c, 0x915d,
-	0x0126, 0x2091, 0x8000, 0x080c, 0x97d4, 0x012e, 0x0005, 0x6010,
-	0x00b6, 0x2058, 0xbca0, 0x00be, 0x2c00, 0x080c, 0xb0fa, 0x080c,
-	0xd272, 0x6003, 0x0007, 0x0005, 0x00d6, 0x0096, 0x00f6, 0x2079,
-	0x1800, 0x7a90, 0x6014, 0x2048, 0xa87c, 0xd0ec, 0x1110, 0x9290,
-	0x0018, 0xac78, 0xc4fc, 0x0046, 0xa8e0, 0x9005, 0x1140, 0xa8dc,
-	0x921a, 0x0140, 0x0220, 0xa87b, 0x0007, 0x2010, 0x0028, 0xa87b,
-	0x0015, 0x0010, 0xa87b, 0x0000, 0x8214, 0xa883, 0x0000, 0xaa02,
-	0x0006, 0x0016, 0x0026, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x2400,
-	0x9005, 0x1108, 0x009a, 0x2100, 0x9086, 0x0015, 0x1118, 0x2001,
-	0x0001, 0x0038, 0x2100, 0x9086, 0x0016, 0x0118, 0x2001, 0x0001,
-	0x002a, 0x94a4, 0x0007, 0x8423, 0x9405, 0x0002, 0xb00b, 0xb00b,
-	0xb006, 0xb009, 0xb00b, 0xb003, 0xaff6, 0xaff6, 0xaff6, 0xaff6,
-	0xaff6, 0xaff6, 0xaff6, 0xaff6, 0xaff6, 0xaff6, 0x00fe, 0x00ee,
-	0x00de, 0x00ce, 0x002e, 0x001e, 0x000e, 0x004e, 0x00fe, 0x009e,
-	0x00de, 0x080c, 0x0dd5, 0x080c, 0xbabd, 0x0028, 0x080c, 0xbba2,
-	0x0010, 0x080c, 0xbc98, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x002e,
-	0x001e, 0x2c00, 0xa896, 0x000e, 0x080c, 0xb1b8, 0x0530, 0xa804,
-	0xa80e, 0x00a6, 0x2050, 0xb100, 0x00ae, 0x8006, 0x8006, 0x8007,
-	0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0002, 0xaacc, 0xabd0,
-	0xacd4, 0xadd8, 0x2031, 0x0000, 0x2041, 0x125d, 0x080c, 0xb379,
-	0x0160, 0x000e, 0x9005, 0x0120, 0x00fe, 0x009e, 0x00de, 0x0005,
-	0x00fe, 0x009e, 0x00de, 0x0804, 0xae5f, 0x2001, 0x002c, 0x900e,
-	0x080c, 0xb21e, 0x0c70, 0x91b6, 0x0015, 0x0170, 0x91b6, 0x0016,
-	0x0158, 0x91b2, 0x0047, 0x0a0c, 0x0dd5, 0x91b2, 0x0050, 0x1a0c,
-	0x0dd5, 0x9182, 0x0047, 0x00ca, 0x2001, 0x0109, 0x2004, 0xd08c,
-	0x0198, 0x0126, 0x2091, 0x2800, 0x0006, 0x0016, 0x0026, 0x080c,
-	0x90aa, 0x002e, 0x001e, 0x000e, 0x012e, 0xa001, 0x6000, 0x9086,
-	0x0002, 0x1110, 0x0804, 0xafa4, 0x0005, 0xb076, 0xb076, 0xb078,
-	0xb0ae, 0xb076, 0xb076, 0xb076, 0xb076, 0xb0c1, 0x080c, 0x0dd5,
-	0x00d6, 0x0016, 0x0096, 0x080c, 0x9656, 0x080c, 0x97d4, 0x6003,
-	0x0004, 0x6114, 0x2148, 0xa87c, 0xd0fc, 0x01c0, 0xa878, 0xc0fc,
-	0x9005, 0x1158, 0xa894, 0x9005, 0x0140, 0x2001, 0x0000, 0x900e,
-	0x080c, 0xb21e, 0x080c, 0xae5f, 0x00a8, 0x6003, 0x0002, 0xa8a4,
-	0xa9a8, 0x9105, 0x1178, 0xa8ae, 0xa8b2, 0x0c78, 0xa87f, 0x0020,
-	0xa88c, 0xa88a, 0xa8a4, 0xa8ae, 0xa8a8, 0xa8b2, 0xa8c7, 0x0000,
-	0xa8cb, 0x0000, 0x009e, 0x001e, 0x00de, 0x0005, 0x080c, 0x9656,
-	0x00d6, 0x0096, 0x6114, 0x2148, 0x080c, 0xcb5a, 0x0120, 0xa87b,
-	0x0006, 0x080c, 0x6c94, 0x009e, 0x00de, 0x080c, 0xae5f, 0x0804,
-	0x97d4, 0x080c, 0x9656, 0x080c, 0x31cc, 0x080c, 0xd26f, 0x00d6,
-	0x0096, 0x6114, 0x2148, 0x080c, 0xcb5a, 0x0120, 0xa87b, 0x0029,
-	0x080c, 0x6c94, 0x009e, 0x00de, 0x080c, 0xae5f, 0x0804, 0x97d4,
-	0x9182, 0x0047, 0x0002, 0xb0e8, 0xb0ea, 0xb0e8, 0xb0e8, 0xb0e8,
-	0xb0e8, 0xb0e8, 0xb0e8, 0xb0e8, 0xb0e8, 0xb0e8, 0xb0e8, 0xb0ea,
-	0x080c, 0x0dd5, 0x00d6, 0x0096, 0x601f, 0x0000, 0x6114, 0x2148,
-	0xa87b, 0x0000, 0xa883, 0x0000, 0x080c, 0x6c94, 0x009e, 0x00de,
-	0x0804, 0xae5f, 0x0026, 0x0036, 0x0056, 0x0066, 0x0096, 0x00a6,
-	0x00f6, 0x0006, 0x080c, 0x0fff, 0x000e, 0x090c, 0x0dd5, 0xa960,
-	0x21e8, 0xa95c, 0x9188, 0x0019, 0x21a0, 0x900e, 0x20a9, 0x0020,
-	0x4104, 0xa87a, 0x2079, 0x1800, 0x7990, 0x9188, 0x0018, 0x918c,
-	0x0fff, 0xa972, 0xac76, 0x2950, 0x00a6, 0x2001, 0x0205, 0x2003,
-	0x0000, 0x901e, 0x2029, 0x0001, 0x9182, 0x0034, 0x1228, 0x2011,
-	0x001f, 0x080c, 0xc743, 0x04c0, 0x2130, 0x2009, 0x0034, 0x2011,
-	0x001f, 0x080c, 0xc743, 0x96b2, 0x0034, 0xb004, 0x904d, 0x0110,
-	0x080c, 0x0fb1, 0x080c, 0x0fff, 0x01d0, 0x8528, 0xa867, 0x0110,
-	0xa86b, 0x0000, 0x2920, 0xb406, 0x968a, 0x003d, 0x1230, 0x2608,
-	0x2011, 0x001b, 0x080c, 0xc743, 0x00b8, 0x96b2, 0x003c, 0x2009,
-	0x003c, 0x2950, 0x2011, 0x001b, 0x080c, 0xc743, 0x0c18, 0x2001,
-	0x0205, 0x2003, 0x0000, 0x00ae, 0x852f, 0x95ad, 0x0050, 0xb566,
-	0xb070, 0xc0fd, 0xb072, 0x0048, 0x2001, 0x0205, 0x2003, 0x0000,
-	0x00ae, 0x852f, 0x95ad, 0x0050, 0xb566, 0x2a48, 0xa804, 0xa807,
-	0x0000, 0x0006, 0x080c, 0x6c94, 0x000e, 0x2048, 0x9005, 0x1db0,
-	0x00fe, 0x00ae, 0x009e, 0x006e, 0x005e, 0x003e, 0x002e, 0x0005,
-	0x00d6, 0x00f6, 0x0096, 0x0006, 0x080c, 0x0fff, 0x000e, 0x090c,
-	0x0dd5, 0xa960, 0x21e8, 0xa95c, 0x9188, 0x0019, 0x21a0, 0x900e,
-	0x20a9, 0x0020, 0x4104, 0xaa66, 0xa87a, 0x2079, 0x1800, 0x7990,
-	0x810c, 0x9188, 0x000c, 0x9182, 0x001a, 0x0210, 0x2009, 0x001a,
-	0x21a8, 0x810b, 0xa972, 0xac76, 0x2e98, 0xa85c, 0x9080, 0x001f,
-	0x20a0, 0x2001, 0x0205, 0x200c, 0x918d, 0x0080, 0x2102, 0x4003,
-	0x2003, 0x0000, 0x080c, 0x6c94, 0x009e, 0x00fe, 0x00de, 0x0005,
-	0x0016, 0x00d6, 0x00f6, 0x0096, 0x0016, 0x2001, 0x0205, 0x200c,
-	0x918d, 0x0080, 0x2102, 0x001e, 0x2079, 0x0200, 0x2e98, 0xa87c,
-	0xd0ec, 0x0118, 0x9e80, 0x000c, 0x2098, 0x2021, 0x003e, 0x901e,
-	0x9282, 0x0020, 0x0218, 0x2011, 0x0020, 0x2018, 0x9486, 0x003e,
-	0x1170, 0x0096, 0x080c, 0x0fff, 0x2900, 0x009e, 0x05c0, 0xa806,
-	0x2048, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0002, 0x20a0, 0x3300,
-	0x908e, 0x0260, 0x0140, 0x2009, 0x0280, 0x9102, 0x920a, 0x0218,
-	0x2010, 0x2100, 0x9318, 0x2200, 0x9402, 0x1228, 0x2400, 0x9202,
-	0x2410, 0x9318, 0x9006, 0x2020, 0x22a8, 0xa800, 0x9200, 0xa802,
-	0x20e1, 0x0000, 0x4003, 0x83ff, 0x0180, 0x3300, 0x9086, 0x0280,
-	0x1130, 0x7814, 0x8000, 0x9085, 0x0080, 0x7816, 0x2e98, 0x2310,
-	0x84ff, 0x0904, 0xb1cd, 0x0804, 0xb1cf, 0x9085, 0x0001, 0x7817,
-	0x0000, 0x009e, 0x00fe, 0x00de, 0x001e, 0x0005, 0x00d6, 0x0036,
-	0x0096, 0x6314, 0x2348, 0xa87a, 0xa982, 0x080c, 0x6c88, 0x009e,
-	0x003e, 0x00de, 0x0005, 0x91b6, 0x0015, 0x1118, 0x080c, 0xae5f,
-	0x0030, 0x91b6, 0x0016, 0x190c, 0x0dd5, 0x080c, 0xae5f, 0x0005,
-	0x20a9, 0x000e, 0x20e1, 0x0000, 0x2e98, 0x6014, 0x0096, 0x2048,
-	0xa860, 0x20e8, 0xa85c, 0x20a0, 0x009e, 0x4003, 0x0136, 0x9080,
-	0x001b, 0x20a0, 0x2011, 0x0006, 0x20a9, 0x0001, 0x3418, 0x8318,
-	0x23a0, 0x4003, 0x3318, 0x8318, 0x2398, 0x8211, 0x1db8, 0x2011,
-	0x0006, 0x013e, 0x20a0, 0x3318, 0x8318, 0x2398, 0x4003, 0x3418,
-	0x8318, 0x23a0, 0x8211, 0x1db8, 0x0096, 0x080c, 0xcb5a, 0x0130,
-	0x6014, 0x2048, 0xa807, 0x0000, 0xa867, 0x0103, 0x009e, 0x0804,
-	0xae5f, 0x0096, 0x00d6, 0x0036, 0x7330, 0x9386, 0x0200, 0x11a8,
-	0x6010, 0x00b6, 0x2058, 0xb8cf, 0x0000, 0x00be, 0x6014, 0x9005,
-	0x0130, 0x2048, 0xa807, 0x0000, 0xa867, 0x0103, 0xab32, 0x080c,
-	0xae5f, 0x003e, 0x00de, 0x009e, 0x0005, 0x0011, 0x1d48, 0x0cc8,
-	0x0006, 0x0016, 0x080c, 0xd25a, 0x0188, 0x6014, 0x9005, 0x1170,
-	0x600b, 0x0003, 0x601b, 0x0000, 0x6043, 0x0000, 0x2009, 0x0022,
-	0x080c, 0xb663, 0x9006, 0x001e, 0x000e, 0x0005, 0x9085, 0x0001,
-	0x0cd0, 0x0096, 0x0016, 0x20a9, 0x0014, 0x9e80, 0x000c, 0x20e1,
-	0x0000, 0x2098, 0x6014, 0x2048, 0xa860, 0x20e8, 0xa85c, 0x9080,
-	0x0002, 0x20a0, 0x4003, 0x2001, 0x0205, 0x2003, 0x0001, 0x2099,
-	0x0260, 0x20a9, 0x0016, 0x4003, 0x20a9, 0x000a, 0xa804, 0x2048,
+	0x9006, 0x0cc0, 0x00e6, 0x2071, 0x1800, 0x7554, 0x9582, 0x0010,
+	0x0600, 0x7058, 0x2060, 0x6000, 0x9086, 0x0000, 0x0148, 0x9ce0,
+	0x0018, 0x7068, 0x9c02, 0x1208, 0x0cb0, 0x2061, 0x1cd0, 0x0c98,
+	0x6003, 0x0008, 0x8529, 0x7556, 0x9ca8, 0x0018, 0x7068, 0x9502,
+	0x1228, 0x755a, 0x9085, 0x0001, 0x00ee, 0x0005, 0x705b, 0x1cd0,
+	0x0cc8, 0x9006, 0x0cc8, 0x9c82, 0x1cd0, 0x0a0c, 0x0dd5, 0x2001,
+	0x181a, 0x2004, 0x9c02, 0x1a0c, 0x0dd5, 0x9006, 0x6006, 0x600a,
+	0x600e, 0x6016, 0x601a, 0x6012, 0x6023, 0x0000, 0x6003, 0x0000,
+	0x601e, 0x6056, 0x605a, 0x6026, 0x602a, 0x602e, 0x6032, 0x6036,
+	0x603a, 0x603e, 0x6042, 0x602a, 0x2061, 0x1800, 0x6054, 0x8000,
+	0x6056, 0x9086, 0x0001, 0x0108, 0x0005, 0x0126, 0x2091, 0x8000,
+	0x080c, 0x9763, 0x012e, 0x0cc0, 0x0006, 0x6000, 0x9086, 0x0000,
+	0x01b0, 0x601c, 0xd084, 0x190c, 0x1aa1, 0x6017, 0x0000, 0x6023,
+	0x0007, 0x2001, 0x1985, 0x2004, 0x0006, 0x9082, 0x0051, 0x000e,
+	0x0208, 0x8004, 0x601a, 0x080c, 0xe997, 0x6043, 0x0000, 0x000e,
+	0x0005, 0x00e6, 0x0126, 0x2071, 0x1800, 0x2091, 0x8000, 0x7554,
+	0x9582, 0x0001, 0x0608, 0x7058, 0x2060, 0x6000, 0x9086, 0x0000,
+	0x0148, 0x9ce0, 0x0018, 0x7068, 0x9c02, 0x1208, 0x0cb0, 0x2061,
+	0x1cd0, 0x0c98, 0x6003, 0x0008, 0x8529, 0x7556, 0x9ca8, 0x0018,
+	0x7068, 0x9502, 0x1230, 0x755a, 0x9085, 0x0001, 0x012e, 0x00ee,
+	0x0005, 0x705b, 0x1cd0, 0x0cc0, 0x9006, 0x0cc0, 0x6020, 0x9084,
+	0x000f, 0x0002, 0xafd1, 0xafda, 0xaff5, 0xb010, 0xd3ae, 0xd3cb,
+	0xd3e6, 0xafd1, 0xafda, 0x8e43, 0xb02c, 0xafd1, 0xafd1, 0xafd1,
+	0xafd1, 0x9186, 0x0013, 0x1128, 0x080c, 0x9657, 0x080c, 0x9763,
+	0x0005, 0x0005, 0x0066, 0x6000, 0x90b2, 0x0016, 0x1a0c, 0x0dd5,
+	0x0013, 0x006e, 0x0005, 0xaff3, 0xb76f, 0xb94c, 0xaff3, 0xb9e2,
+	0xb30f, 0xaff3, 0xaff3, 0xb6f1, 0xbf49, 0xaff3, 0xaff3, 0xaff3,
+	0xaff3, 0xaff3, 0xaff3, 0x080c, 0x0dd5, 0x0066, 0x6000, 0x90b2,
+	0x0016, 0x1a0c, 0x0dd5, 0x0013, 0x006e, 0x0005, 0xb00e, 0xc630,
+	0xb00e, 0xb00e, 0xb00e, 0xb00e, 0xb00e, 0xb00e, 0xc5c7, 0xc7b2,
+	0xb00e, 0xc671, 0xc6f0, 0xc671, 0xc6f0, 0xb00e, 0x080c, 0x0dd5,
+	0x6000, 0x9082, 0x0016, 0x1a0c, 0x0dd5, 0x6000, 0x0002, 0xb02a,
+	0xbf90, 0xc075, 0xc1a5, 0xc354, 0xb02a, 0xb02a, 0xb02a, 0xbf64,
+	0xc553, 0xc556, 0xb02a, 0xb02a, 0xb02a, 0xb02a, 0xc585, 0xb02a,
+	0xb02a, 0xb02a, 0x080c, 0x0dd5, 0x0066, 0x6000, 0x90b2, 0x0016,
+	0x1a0c, 0x0dd5, 0x0013, 0x006e, 0x0005, 0xb045, 0xb045, 0xb088,
+	0xb127, 0xb1bc, 0xb045, 0xb045, 0xb045, 0xb047, 0xb045, 0xb045,
+	0xb045, 0xb045, 0xb045, 0xb045, 0xb045, 0x080c, 0x0dd5, 0x9186,
+	0x004c, 0x0588, 0x9186, 0x0003, 0x190c, 0x0dd5, 0x0096, 0x601c,
+	0xc0ed, 0x601e, 0x6003, 0x0003, 0x6106, 0x6014, 0x2048, 0xa87c,
+	0x9084, 0xa000, 0xc0b5, 0xa87e, 0xa8ac, 0xa846, 0xa8b0, 0xa84a,
+	0x9006, 0xa836, 0xa83a, 0xa884, 0x9092, 0x199a, 0x0210, 0x2001,
+	0x1999, 0x8003, 0x8013, 0x8213, 0x9210, 0x621a, 0x009e, 0x2c10,
+	0x080c, 0x1beb, 0x080c, 0x9216, 0x0126, 0x2091, 0x8000, 0x080c,
+	0x9891, 0x012e, 0x0005, 0x6010, 0x00b6, 0x2058, 0xbca0, 0x00be,
+	0x2c00, 0x080c, 0xb1de, 0x080c, 0xd3a0, 0x6003, 0x0007, 0x0005,
+	0x00d6, 0x0096, 0x00f6, 0x2079, 0x1800, 0x7a90, 0x6014, 0x2048,
+	0xa87c, 0xd0ec, 0x1110, 0x9290, 0x0018, 0xac78, 0xc4fc, 0x0046,
+	0xa8e0, 0x9005, 0x1140, 0xa8dc, 0x921a, 0x0140, 0x0220, 0xa87b,
+	0x0007, 0x2010, 0x0028, 0xa87b, 0x0015, 0x0010, 0xa87b, 0x0000,
+	0x8214, 0xa883, 0x0000, 0xaa02, 0x0006, 0x0016, 0x0026, 0x00c6,
+	0x00d6, 0x00e6, 0x00f6, 0x2400, 0x9005, 0x1108, 0x009a, 0x2100,
+	0x9086, 0x0015, 0x1118, 0x2001, 0x0001, 0x0038, 0x2100, 0x9086,
+	0x0016, 0x0118, 0x2001, 0x0001, 0x002a, 0x94a4, 0x0007, 0x8423,
+	0x9405, 0x0002, 0xb0ef, 0xb0ef, 0xb0ea, 0xb0ed, 0xb0ef, 0xb0e7,
+	0xb0da, 0xb0da, 0xb0da, 0xb0da, 0xb0da, 0xb0da, 0xb0da, 0xb0da,
+	0xb0da, 0xb0da, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x002e, 0x001e,
+	0x000e, 0x004e, 0x00fe, 0x009e, 0x00de, 0x080c, 0x0dd5, 0x080c,
+	0xbba1, 0x0028, 0x080c, 0xbc86, 0x0010, 0x080c, 0xbd7c, 0x00fe,
+	0x00ee, 0x00de, 0x00ce, 0x002e, 0x001e, 0x2c00, 0xa896, 0x000e,
+	0x080c, 0xb29c, 0x0530, 0xa804, 0xa80e, 0x00a6, 0x2050, 0xb100,
+	0x00ae, 0x8006, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0,
+	0x9080, 0x0002, 0xaacc, 0xabd0, 0xacd4, 0xadd8, 0x2031, 0x0000,
+	0x2041, 0x125d, 0x080c, 0xb45d, 0x0160, 0x000e, 0x9005, 0x0120,
+	0x00fe, 0x009e, 0x00de, 0x0005, 0x00fe, 0x009e, 0x00de, 0x0804,
+	0xaf43, 0x2001, 0x002c, 0x900e, 0x080c, 0xb302, 0x0c70, 0x91b6,
+	0x0015, 0x0170, 0x91b6, 0x0016, 0x0158, 0x91b2, 0x0047, 0x0a0c,
+	0x0dd5, 0x91b2, 0x0050, 0x1a0c, 0x0dd5, 0x9182, 0x0047, 0x00ca,
+	0x2001, 0x0109, 0x2004, 0xd08c, 0x0198, 0x0126, 0x2091, 0x2800,
+	0x0006, 0x0016, 0x0026, 0x080c, 0x9163, 0x002e, 0x001e, 0x000e,
+	0x012e, 0xa001, 0x6000, 0x9086, 0x0002, 0x1110, 0x0804, 0xb088,
+	0x0005, 0xb15a, 0xb15a, 0xb15c, 0xb192, 0xb15a, 0xb15a, 0xb15a,
+	0xb15a, 0xb1a5, 0x080c, 0x0dd5, 0x00d6, 0x0016, 0x0096, 0x080c,
+	0x9713, 0x080c, 0x9891, 0x6003, 0x0004, 0x6114, 0x2148, 0xa87c,
+	0xd0fc, 0x01c0, 0xa878, 0xc0fc, 0x9005, 0x1158, 0xa894, 0x9005,
+	0x0140, 0x2001, 0x0000, 0x900e, 0x080c, 0xb302, 0x080c, 0xaf43,
+	0x00a8, 0x6003, 0x0002, 0xa8a4, 0xa9a8, 0x9105, 0x1178, 0xa8ae,
+	0xa8b2, 0x0c78, 0xa87f, 0x0020, 0xa88c, 0xa88a, 0xa8a4, 0xa8ae,
+	0xa8a8, 0xa8b2, 0xa8c7, 0x0000, 0xa8cb, 0x0000, 0x009e, 0x001e,
+	0x00de, 0x0005, 0x080c, 0x9713, 0x00d6, 0x0096, 0x6114, 0x2148,
+	0x080c, 0xcc86, 0x0120, 0xa87b, 0x0006, 0x080c, 0x6d17, 0x009e,
+	0x00de, 0x080c, 0xaf43, 0x0804, 0x9891, 0x080c, 0x9713, 0x080c,
+	0x321e, 0x080c, 0xd39d, 0x00d6, 0x0096, 0x6114, 0x2148, 0x080c,
+	0xcc86, 0x0120, 0xa87b, 0x0029, 0x080c, 0x6d17, 0x009e, 0x00de,
+	0x080c, 0xaf43, 0x0804, 0x9891, 0x9182, 0x0047, 0x0002, 0xb1cc,
+	0xb1ce, 0xb1cc, 0xb1cc, 0xb1cc, 0xb1cc, 0xb1cc, 0xb1cc, 0xb1cc,
+	0xb1cc, 0xb1cc, 0xb1cc, 0xb1ce, 0x080c, 0x0dd5, 0x00d6, 0x0096,
+	0x601f, 0x0000, 0x6114, 0x2148, 0xa87b, 0x0000, 0xa883, 0x0000,
+	0x080c, 0x6d17, 0x009e, 0x00de, 0x0804, 0xaf43, 0x0026, 0x0036,
+	0x0056, 0x0066, 0x0096, 0x00a6, 0x00f6, 0x0006, 0x080c, 0x0fff,
+	0x000e, 0x090c, 0x0dd5, 0xa960, 0x21e8, 0xa95c, 0x9188, 0x0019,
+	0x21a0, 0x900e, 0x20a9, 0x0020, 0x4104, 0xa87a, 0x2079, 0x1800,
+	0x7990, 0x9188, 0x0018, 0x918c, 0x0fff, 0xa972, 0xac76, 0x2950,
+	0x00a6, 0x2001, 0x0205, 0x2003, 0x0000, 0x901e, 0x2029, 0x0001,
+	0x9182, 0x0034, 0x1228, 0x2011, 0x001f, 0x080c, 0xc837, 0x04c0,
+	0x2130, 0x2009, 0x0034, 0x2011, 0x001f, 0x080c, 0xc837, 0x96b2,
+	0x0034, 0xb004, 0x904d, 0x0110, 0x080c, 0x0fb1, 0x080c, 0x0fff,
+	0x01d0, 0x8528, 0xa867, 0x0110, 0xa86b, 0x0000, 0x2920, 0xb406,
+	0x968a, 0x003d, 0x1230, 0x2608, 0x2011, 0x001b, 0x080c, 0xc837,
+	0x00b8, 0x96b2, 0x003c, 0x2009, 0x003c, 0x2950, 0x2011, 0x001b,
+	0x080c, 0xc837, 0x0c18, 0x2001, 0x0205, 0x2003, 0x0000, 0x00ae,
+	0x852f, 0x95ad, 0x0050, 0xb566, 0xb070, 0xc0fd, 0xb072, 0x0048,
+	0x2001, 0x0205, 0x2003, 0x0000, 0x00ae, 0x852f, 0x95ad, 0x0050,
+	0xb566, 0x2a48, 0xa804, 0xa807, 0x0000, 0x0006, 0x080c, 0x6d17,
+	0x000e, 0x2048, 0x9005, 0x1db0, 0x00fe, 0x00ae, 0x009e, 0x006e,
+	0x005e, 0x003e, 0x002e, 0x0005, 0x00d6, 0x00f6, 0x0096, 0x0006,
+	0x080c, 0x0fff, 0x000e, 0x090c, 0x0dd5, 0xa960, 0x21e8, 0xa95c,
+	0x9188, 0x0019, 0x21a0, 0x900e, 0x20a9, 0x0020, 0x4104, 0xaa66,
+	0xa87a, 0x2079, 0x1800, 0x7990, 0x810c, 0x9188, 0x000c, 0x9182,
+	0x001a, 0x0210, 0x2009, 0x001a, 0x21a8, 0x810b, 0xa972, 0xac76,
+	0x2e98, 0xa85c, 0x9080, 0x001f, 0x20a0, 0x2001, 0x0205, 0x200c,
+	0x918d, 0x0080, 0x2102, 0x4003, 0x2003, 0x0000, 0x080c, 0x6d17,
+	0x009e, 0x00fe, 0x00de, 0x0005, 0x0016, 0x00d6, 0x00f6, 0x0096,
+	0x0016, 0x2001, 0x0205, 0x200c, 0x918d, 0x0080, 0x2102, 0x001e,
+	0x2079, 0x0200, 0x2e98, 0xa87c, 0xd0ec, 0x0118, 0x9e80, 0x000c,
+	0x2098, 0x2021, 0x003e, 0x901e, 0x9282, 0x0020, 0x0218, 0x2011,
+	0x0020, 0x2018, 0x9486, 0x003e, 0x1170, 0x0096, 0x080c, 0x0fff,
+	0x2900, 0x009e, 0x05c0, 0xa806, 0x2048, 0xa860, 0x20e8, 0xa85c,
+	0x9080, 0x0002, 0x20a0, 0x3300, 0x908e, 0x0260, 0x0140, 0x2009,
+	0x0280, 0x9102, 0x920a, 0x0218, 0x2010, 0x2100, 0x9318, 0x2200,
+	0x9402, 0x1228, 0x2400, 0x9202, 0x2410, 0x9318, 0x9006, 0x2020,
+	0x22a8, 0xa800, 0x9200, 0xa802, 0x20e1, 0x0000, 0x4003, 0x83ff,
+	0x0180, 0x3300, 0x9086, 0x0280, 0x1130, 0x7814, 0x8000, 0x9085,
+	0x0080, 0x7816, 0x2e98, 0x2310, 0x84ff, 0x0904, 0xb2b1, 0x0804,
+	0xb2b3, 0x9085, 0x0001, 0x7817, 0x0000, 0x009e, 0x00fe, 0x00de,
+	0x001e, 0x0005, 0x00d6, 0x0036, 0x0096, 0x6314, 0x2348, 0xa87a,
+	0xa982, 0x080c, 0x6d0b, 0x009e, 0x003e, 0x00de, 0x0005, 0x91b6,
+	0x0015, 0x1118, 0x080c, 0xaf43, 0x0030, 0x91b6, 0x0016, 0x190c,
+	0x0dd5, 0x080c, 0xaf43, 0x0005, 0x20a9, 0x000e, 0x20e1, 0x0000,
+	0x2e98, 0x6014, 0x0096, 0x2048, 0xa860, 0x20e8, 0xa85c, 0x20a0,
+	0x009e, 0x4003, 0x0136, 0x9080, 0x001b, 0x20a0, 0x2011, 0x0006,
+	0x20a9, 0x0001, 0x3418, 0x8318, 0x23a0, 0x4003, 0x3318, 0x8318,
+	0x2398, 0x8211, 0x1db8, 0x2011, 0x0006, 0x013e, 0x20a0, 0x3318,
+	0x8318, 0x2398, 0x4003, 0x3418, 0x8318, 0x23a0, 0x8211, 0x1db8,
+	0x0096, 0x080c, 0xcc86, 0x0130, 0x6014, 0x2048, 0xa807, 0x0000,
+	0xa867, 0x0103, 0x009e, 0x0804, 0xaf43, 0x0096, 0x00d6, 0x0036,
+	0x7330, 0x9386, 0x0200, 0x11a8, 0x6010, 0x00b6, 0x2058, 0xb8cf,
+	0x0000, 0x00be, 0x6014, 0x9005, 0x0130, 0x2048, 0xa807, 0x0000,
+	0xa867, 0x0103, 0xab32, 0x080c, 0xaf43, 0x003e, 0x00de, 0x009e,
+	0x0005, 0x0011, 0x1d48, 0x0cc8, 0x0006, 0x0016, 0x080c, 0xd388,
+	0x0188, 0x6014, 0x9005, 0x1170, 0x600b, 0x0003, 0x601b, 0x0000,
+	0x6043, 0x0000, 0x2009, 0x0022, 0x080c, 0xb747, 0x9006, 0x001e,
+	0x000e, 0x0005, 0x9085, 0x0001, 0x0cd0, 0x0096, 0x0016, 0x20a9,
+	0x0014, 0x9e80, 0x000c, 0x20e1, 0x0000, 0x2098, 0x6014, 0x2048,
 	0xa860, 0x20e8, 0xa85c, 0x9080, 0x0002, 0x20a0, 0x4003, 0x2001,
-	0x0205, 0x2003, 0x0002, 0x2099, 0x0260, 0x20a9, 0x0020, 0x4003,
-	0x2003, 0x0000, 0x6014, 0x2048, 0xa800, 0x2048, 0xa867, 0x0103,
-	0x080c, 0xae5f, 0x001e, 0x009e, 0x0005, 0x0096, 0x0016, 0x900e,
-	0x7030, 0x9086, 0x0100, 0x0140, 0x7038, 0x9084, 0x00ff, 0x800c,
-	0x703c, 0x9084, 0x00ff, 0x8004, 0x9080, 0x0004, 0x9108, 0x810b,
-	0x2011, 0x0002, 0x2019, 0x000c, 0x6014, 0x2048, 0x080c, 0xc743,
-	0x080c, 0xcb5a, 0x0140, 0x6014, 0x2048, 0xa807, 0x0000, 0xa864,
-	0xa8e2, 0xa867, 0x0103, 0x080c, 0xae5f, 0x001e, 0x009e, 0x0005,
-	0x0016, 0x2009, 0x0000, 0x7030, 0x9086, 0x0200, 0x0110, 0x2009,
-	0x0001, 0x0096, 0x6014, 0x904d, 0x090c, 0x0dd5, 0xa97a, 0x080c,
-	0x6c94, 0x009e, 0x080c, 0xae5f, 0x001e, 0x0005, 0x0016, 0x0096,
-	0x7030, 0x9086, 0x0100, 0x1118, 0x2009, 0x0004, 0x0010, 0x7034,
-	0x800c, 0x810b, 0x2011, 0x000c, 0x2019, 0x000c, 0x6014, 0x2048,
-	0xa804, 0x0096, 0x9005, 0x0108, 0x2048, 0x080c, 0xc743, 0x009e,
-	0x080c, 0xcb5a, 0x0148, 0xa804, 0x9005, 0x1158, 0xa807, 0x0000,
-	0xa864, 0xa8e2, 0xa867, 0x0103, 0x080c, 0xae5f, 0x009e, 0x001e,
-	0x0005, 0x0086, 0x2040, 0xa030, 0x8007, 0x9086, 0x0100, 0x1118,
-	0x080c, 0xb821, 0x00e0, 0xa034, 0x8007, 0x800c, 0x8806, 0x8006,
-	0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x000c, 0xa87b,
-	0x0000, 0xa883, 0x0000, 0xa897, 0x4000, 0xaaa0, 0xab9c, 0xaca8,
-	0xada4, 0x2031, 0x0000, 0x2041, 0x1243, 0x0019, 0x0d08, 0x008e,
-	0x0898, 0x0096, 0x0006, 0x080c, 0x0fff, 0x000e, 0x01b0, 0xa8ab,
-	0x0dcb, 0xa876, 0x000e, 0xa8a2, 0x0006, 0xae6a, 0x2800, 0xa89e,
-	0xa97a, 0xaf72, 0xaa8e, 0xab92, 0xac96, 0xad9a, 0x0086, 0x2940,
-	0x080c, 0x10e9, 0x008e, 0x9085, 0x0001, 0x009e, 0x0005, 0x00e6,
-	0x00d6, 0x0026, 0x7008, 0x9084, 0x00ff, 0x6210, 0x00b6, 0x2258,
-	0xba10, 0x00be, 0x9206, 0x1520, 0x700c, 0x6210, 0x00b6, 0x2258,
-	0xba14, 0x00be, 0x9206, 0x11e0, 0x6043, 0x0000, 0x2c68, 0x0016,
-	0x2009, 0x0035, 0x080c, 0xd1d2, 0x001e, 0x1158, 0x622c, 0x2268,
-	0x2071, 0x026c, 0x6b20, 0x9386, 0x0003, 0x0130, 0x9386, 0x0006,
-	0x0128, 0x080c, 0xae5f, 0x0020, 0x0039, 0x0010, 0x080c, 0xb498,
-	0x002e, 0x00de, 0x00ee, 0x0005, 0x0096, 0x6814, 0x2048, 0x9186,
-	0x0015, 0x0904, 0xb480, 0x918e, 0x0016, 0x1904, 0xb496, 0x700c,
-	0x908c, 0xff00, 0x9186, 0x1700, 0x0120, 0x9186, 0x0300, 0x1904,
-	0xb45a, 0x89ff, 0x1138, 0x6800, 0x9086, 0x000f, 0x0904, 0xb43d,
-	0x0804, 0xb494, 0x6808, 0x9086, 0xffff, 0x1904, 0xb482, 0xa87c,
-	0x9084, 0x0060, 0x9086, 0x0020, 0x1128, 0xa83c, 0xa940, 0x9105,
-	0x1904, 0xb482, 0x6824, 0xd084, 0x1904, 0xb482, 0xd0b4, 0x0158,
-	0x0016, 0x2001, 0x1985, 0x200c, 0x6018, 0x9102, 0x9082, 0x0005,
-	0x001e, 0x1a04, 0xb482, 0x080c, 0xcd43, 0x685c, 0xa882, 0xa87c,
-	0xc0dc, 0xc0f4, 0xc0d4, 0xa87e, 0x0026, 0x900e, 0x6a18, 0x2001,
-	0x000a, 0x080c, 0x8f70, 0xa884, 0x920a, 0x0208, 0x8011, 0xaa86,
-	0x82ff, 0x002e, 0x1138, 0x00c6, 0x2d60, 0x080c, 0xc86d, 0x00ce,
-	0x0804, 0xb494, 0x00c6, 0xa868, 0xd0fc, 0x1118, 0x080c, 0x60c1,
-	0x0010, 0x080c, 0x64cb, 0x00ce, 0x1904, 0xb482, 0x00c6, 0x2d60,
-	0x080c, 0xae5f, 0x00ce, 0x0804, 0xb494, 0x00c6, 0x080c, 0xaead,
-	0x0198, 0x6017, 0x0000, 0x6810, 0x6012, 0x080c, 0xcfd4, 0x6023,
-	0x0003, 0x6904, 0x00c6, 0x2d60, 0x080c, 0xae5f, 0x00ce, 0x080c,
-	0xaeda, 0x00ce, 0x0804, 0xb494, 0x2001, 0x1987, 0x2004, 0x6842,
-	0x00ce, 0x04d0, 0x7008, 0x9086, 0x000b, 0x11c8, 0x6010, 0x00b6,
-	0x2058, 0xb900, 0xc1bc, 0xb902, 0x00be, 0x00c6, 0x2d60, 0xa87b,
-	0x0003, 0x080c, 0xd214, 0x6007, 0x0085, 0x6003, 0x000b, 0x6023,
-	0x0002, 0x080c, 0x90f8, 0x080c, 0x96a6, 0x00ce, 0x00e8, 0x700c,
-	0x9086, 0x2a00, 0x1138, 0x2001, 0x1987, 0x2004, 0x6842, 0x00a0,
-	0x0479, 0x00a0, 0x89ff, 0x090c, 0x0dd5, 0x00c6, 0x00d6, 0x2d60,
-	0xa867, 0x0103, 0xa87b, 0x0003, 0x080c, 0x6ab0, 0x080c, 0xcd43,
-	0x080c, 0xae90, 0x00de, 0x00ce, 0x080c, 0xae5f, 0x009e, 0x0005,
-	0x9186, 0x0015, 0x1128, 0x2001, 0x1987, 0x2004, 0x6842, 0x0068,
-	0x918e, 0x0016, 0x1160, 0x00c6, 0x2d00, 0x2060, 0x080c, 0xe846,
-	0x080c, 0x86b8, 0x080c, 0xae5f, 0x00ce, 0x080c, 0xae5f, 0x0005,
-	0x0026, 0x0036, 0x0046, 0x7228, 0xacb0, 0xabac, 0xd2f4, 0x0130,
-	0x2001, 0x1987, 0x2004, 0x6842, 0x0804, 0xb512, 0x00c6, 0x2d60,
-	0x080c, 0xc76e, 0x00ce, 0x6804, 0x9086, 0x0050, 0x1168, 0x00c6,
-	0x2d00, 0x2060, 0x6003, 0x0001, 0x6007, 0x0050, 0x080c, 0x90f8,
-	0x080c, 0x96a6, 0x00ce, 0x04f0, 0x6800, 0x9086, 0x000f, 0x01a8,
-	0x89ff, 0x090c, 0x0dd5, 0x6800, 0x9086, 0x0004, 0x1190, 0xa87c,
-	0xd0ac, 0x0178, 0xa843, 0x0fff, 0xa83f, 0x0fff, 0xa880, 0xc0fc,
-	0xa882, 0x2001, 0x0001, 0x6832, 0x0400, 0x2001, 0x0007, 0x6832,
-	0x00e0, 0xa87c, 0xd0b4, 0x1150, 0xd0ac, 0x0db8, 0x6824, 0xd0f4,
-	0x1d48, 0xa838, 0xa934, 0x9105, 0x0d80, 0x0c20, 0xd2ec, 0x1d68,
-	0x7024, 0x9306, 0x1118, 0x7020, 0x9406, 0x0d38, 0x7020, 0x683e,
-	0x7024, 0x683a, 0x2001, 0x0005, 0x6832, 0x080c, 0xcecb, 0x080c,
-	0x96a6, 0x0010, 0x080c, 0xae5f, 0x004e, 0x003e, 0x002e, 0x0005,
-	0x00e6, 0x00d6, 0x0026, 0x7008, 0x9084, 0x00ff, 0x6210, 0x00b6,
-	0x2258, 0xba10, 0x00be, 0x9206, 0x1904, 0xb57d, 0x700c, 0x6210,
-	0x00b6, 0x2258, 0xba14, 0x00be, 0x9206, 0x1904, 0xb57d, 0x6038,
-	0x2068, 0x6824, 0xc0dc, 0x6826, 0x6a20, 0x9286, 0x0007, 0x0904,
-	0xb57d, 0x9286, 0x0002, 0x0904, 0xb57d, 0x9286, 0x0000, 0x05e8,
-	0x6808, 0x633c, 0x9306, 0x15c8, 0x2071, 0x026c, 0x9186, 0x0015,
-	0x0570, 0x918e, 0x0016, 0x1100, 0x00c6, 0x6038, 0x2060, 0x6104,
-	0x9186, 0x004b, 0x01c0, 0x9186, 0x004c, 0x01a8, 0x9186, 0x004d,
-	0x0190, 0x9186, 0x004e, 0x0178, 0x9186, 0x0052, 0x0160, 0x6014,
-	0x0096, 0x2048, 0x080c, 0xcb5a, 0x090c, 0x0dd5, 0xa87b, 0x0003,
-	0x009e, 0x080c, 0xd214, 0x6007, 0x0085, 0x6003, 0x000b, 0x6023,
-	0x0002, 0x080c, 0x90f8, 0x080c, 0x96a6, 0x00ce, 0x0030, 0x6038,
-	0x2070, 0x2001, 0x1987, 0x2004, 0x7042, 0x080c, 0xae5f, 0x002e,
-	0x00de, 0x00ee, 0x0005, 0x00b6, 0x0096, 0x00f6, 0x6014, 0x2048,
-	0x6010, 0x2058, 0x91b6, 0x0015, 0x0130, 0xba08, 0xbb0c, 0xbc00,
-	0xc48c, 0xbc02, 0x0460, 0x0096, 0x0156, 0x0036, 0x0026, 0x2b48,
-	0x9e90, 0x0010, 0x2019, 0x000a, 0x20a9, 0x0004, 0x080c, 0xbe2d,
-	0x002e, 0x003e, 0x015e, 0x009e, 0x1904, 0xb5ec, 0x0096, 0x0156,
-	0x0036, 0x0026, 0x2b48, 0x9e90, 0x0014, 0x2019, 0x0006, 0x20a9,
-	0x0004, 0x080c, 0xbe2d, 0x002e, 0x003e, 0x015e, 0x009e, 0x15a0,
-	0x7238, 0xba0a, 0x733c, 0xbb0e, 0xbc00, 0xc48d, 0xbc02, 0xa804,
-	0x9005, 0x1128, 0x00fe, 0x009e, 0x00be, 0x0804, 0xb264, 0x0096,
-	0x2048, 0xaa12, 0xab16, 0xac0a, 0x009e, 0x8006, 0x8006, 0x8007,
-	0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0002, 0x2009, 0x002b,
-	0xaaa0, 0xab9c, 0xaca8, 0xada4, 0x2031, 0x0000, 0x2041, 0x1243,
-	0x080c, 0xb379, 0x0130, 0x00fe, 0x009e, 0x080c, 0xae5f, 0x00be,
-	0x0005, 0x080c, 0xb821, 0x0cb8, 0x2b78, 0x00f6, 0x080c, 0x31cc,
-	0x080c, 0xd26f, 0x00fe, 0x00c6, 0x080c, 0xae09, 0x2f00, 0x6012,
-	0x6017, 0x0000, 0x6023, 0x0001, 0x6007, 0x0001, 0x6003, 0x0001,
-	0x2001, 0x0007, 0x080c, 0x6566, 0x080c, 0x6592, 0x080c, 0x9140,
-	0x080c, 0x96a6, 0x00ce, 0x0804, 0xb5bf, 0x2100, 0x91b2, 0x0053,
-	0x1a0c, 0x0dd5, 0x91b2, 0x0040, 0x1a04, 0xb675, 0x0002, 0xb663,
-	0xb663, 0xb659, 0xb663, 0xb663, 0xb663, 0xb657, 0xb657, 0xb657,
-	0xb657, 0xb657, 0xb657, 0xb657, 0xb657, 0xb657, 0xb657, 0xb657,
-	0xb657, 0xb657, 0xb657, 0xb657, 0xb657, 0xb657, 0xb657, 0xb657,
-	0xb657, 0xb657, 0xb657, 0xb657, 0xb657, 0xb657, 0xb663, 0xb657,
-	0xb663, 0xb663, 0xb657, 0xb657, 0xb657, 0xb657, 0xb657, 0xb659,
-	0xb657, 0xb657, 0xb657, 0xb657, 0xb657, 0xb657, 0xb657, 0xb657,
-	0xb657, 0xb663, 0xb663, 0xb657, 0xb657, 0xb657, 0xb657, 0xb657,
-	0xb657, 0xb657, 0xb657, 0xb657, 0xb663, 0xb657, 0xb657, 0x080c,
-	0x0dd5, 0x0066, 0x00b6, 0x6610, 0x2658, 0xb8cc, 0xc08c, 0xb8ce,
-	0x00be, 0x006e, 0x0000, 0x6003, 0x0001, 0x6106, 0x9186, 0x0032,
-	0x0118, 0x080c, 0x9140, 0x0010, 0x080c, 0x90f8, 0x0126, 0x2091,
-	0x8000, 0x080c, 0x96a6, 0x012e, 0x0005, 0x2600, 0x0002, 0xb663,
-	0xb663, 0xb689, 0xb663, 0xb663, 0xb689, 0xb689, 0xb689, 0xb689,
-	0xb663, 0xb689, 0xb663, 0xb689, 0xb663, 0xb689, 0xb689, 0xb689,
-	0xb689, 0x080c, 0x0dd5, 0x6004, 0x90b2, 0x0053, 0x1a0c, 0x0dd5,
-	0x91b6, 0x0013, 0x0904, 0xb74d, 0x91b6, 0x0027, 0x1904, 0xb708,
-	0x080c, 0x959a, 0x6004, 0x080c, 0xcd4f, 0x01b0, 0x080c, 0xcd60,
-	0x01a8, 0x908e, 0x0021, 0x0904, 0xb705, 0x908e, 0x0022, 0x1130,
-	0x080c, 0xb290, 0x0904, 0xb701, 0x0804, 0xb702, 0x908e, 0x003d,
-	0x0904, 0xb705, 0x0804, 0xb6fb, 0x080c, 0x31f5, 0x2001, 0x0007,
-	0x080c, 0x6566, 0x6010, 0x00b6, 0x2058, 0xb9a0, 0x00be, 0x080c,
-	0xb821, 0x9186, 0x007e, 0x1148, 0x2001, 0x1837, 0x2014, 0xc285,
-	0x080c, 0x73b3, 0x1108, 0xc2ad, 0x2202, 0x0036, 0x0026, 0x2019,
-	0x0028, 0x2110, 0x080c, 0xe952, 0x002e, 0x003e, 0x0016, 0x0026,
-	0x0036, 0x2110, 0x2019, 0x0028, 0x080c, 0x929d, 0x0076, 0x903e,
-	0x080c, 0x9170, 0x6010, 0x00b6, 0x905d, 0x0100, 0x00be, 0x2c08,
-	0x080c, 0xe326, 0x007e, 0x003e, 0x002e, 0x001e, 0x080c, 0xd26f,
-	0x0016, 0x080c, 0xcfcc, 0x080c, 0xae5f, 0x001e, 0x080c, 0x32c8,
-	0x080c, 0x96a6, 0x0030, 0x080c, 0xcfcc, 0x080c, 0xae5f, 0x080c,
-	0x96a6, 0x0005, 0x080c, 0xb821, 0x0cb0, 0x080c, 0xb85d, 0x0c98,
-	0x9186, 0x0014, 0x1db0, 0x080c, 0x959a, 0x6004, 0x908e, 0x0022,
-	0x1118, 0x080c, 0xb290, 0x0d68, 0x080c, 0x31cc, 0x080c, 0xd26f,
-	0x080c, 0xcd4f, 0x1190, 0x080c, 0x31f5, 0x6010, 0x00b6, 0x2058,
-	0xb9a0, 0x00be, 0x080c, 0xb821, 0x9186, 0x007e, 0x1128, 0x2001,
-	0x1837, 0x200c, 0xc185, 0x2102, 0x0870, 0x080c, 0xcd60, 0x1118,
-	0x080c, 0xb821, 0x0840, 0x6004, 0x908e, 0x0032, 0x1160, 0x00e6,
-	0x00f6, 0x2071, 0x189e, 0x2079, 0x0000, 0x080c, 0x3563, 0x00fe,
-	0x00ee, 0x0804, 0xb6fb, 0x6004, 0x908e, 0x0021, 0x0d48, 0x908e,
-	0x0022, 0x090c, 0xb821, 0x0804, 0xb6fb, 0x90b2, 0x0040, 0x1a04,
-	0xb7fd, 0x2008, 0x0002, 0xb795, 0xb796, 0xb799, 0xb79c, 0xb79f,
-	0xb7a2, 0xb793, 0xb793, 0xb793, 0xb793, 0xb793, 0xb793, 0xb793,
-	0xb793, 0xb793, 0xb793, 0xb793, 0xb793, 0xb793, 0xb793, 0xb793,
-	0xb793, 0xb793, 0xb793, 0xb793, 0xb793, 0xb793, 0xb793, 0xb793,
-	0xb793, 0xb7a5, 0xb7b2, 0xb793, 0xb7b4, 0xb7b2, 0xb793, 0xb793,
-	0xb793, 0xb793, 0xb793, 0xb7b2, 0xb7b2, 0xb793, 0xb793, 0xb793,
-	0xb793, 0xb793, 0xb793, 0xb793, 0xb793, 0xb7e4, 0xb7b2, 0xb793,
-	0xb7ae, 0xb793, 0xb793, 0xb793, 0xb7af, 0xb793, 0xb793, 0xb793,
-	0xb7b2, 0xb7db, 0xb793, 0x080c, 0x0dd5, 0x00e0, 0x2001, 0x000b,
-	0x0420, 0x2001, 0x0003, 0x0408, 0x2001, 0x0005, 0x00f0, 0x2001,
-	0x0001, 0x00d8, 0x2001, 0x0009, 0x00c0, 0x080c, 0x959a, 0x6003,
-	0x0005, 0x080c, 0xd272, 0x080c, 0x96a6, 0x0070, 0x0018, 0x0010,
-	0x080c, 0x6566, 0x0804, 0xb7f5, 0x080c, 0x959a, 0x080c, 0xd272,
-	0x6003, 0x0004, 0x080c, 0x96a6, 0x0005, 0x080c, 0x6566, 0x080c,
-	0x959a, 0x6003, 0x0002, 0x0036, 0x2019, 0x1852, 0x2304, 0x9084,
-	0xff00, 0x1120, 0x2001, 0x1985, 0x201c, 0x0040, 0x8007, 0x909a,
-	0x0004, 0x0ec0, 0x8003, 0x801b, 0x831b, 0x9318, 0x631a, 0x003e,
-	0x080c, 0x96a6, 0x0c08, 0x080c, 0x959a, 0x080c, 0xcfcc, 0x080c,
-	0xae5f, 0x080c, 0x96a6, 0x08c0, 0x00e6, 0x00f6, 0x2071, 0x189e,
-	0x2079, 0x0000, 0x080c, 0x3563, 0x00fe, 0x00ee, 0x080c, 0x959a,
-	0x080c, 0xae5f, 0x080c, 0x96a6, 0x0838, 0x080c, 0x959a, 0x6003,
-	0x0002, 0x080c, 0xd272, 0x0804, 0x96a6, 0x2600, 0x2008, 0x0002,
-	0xb814, 0xb7f5, 0xb812, 0xb7f5, 0xb7f5, 0xb812, 0xb812, 0xb812,
-	0xb812, 0xb7f5, 0xb812, 0xb7f5, 0xb812, 0xb7f5, 0xb812, 0xb812,
-	0xb812, 0xb812, 0x080c, 0x0dd5, 0x080c, 0x959a, 0x0096, 0x6014,
-	0x2048, 0x080c, 0x6c94, 0x009e, 0x080c, 0xae5f, 0x080c, 0x96a6,
-	0x0005, 0x00e6, 0x0096, 0x0026, 0x0016, 0x080c, 0xcb5a, 0x0568,
-	0x6014, 0x2048, 0xa864, 0x9086, 0x0139, 0x11a8, 0xa894, 0x9086,
-	0x0056, 0x1148, 0x080c, 0x548b, 0x0130, 0x2001, 0x0000, 0x900e,
-	0x2011, 0x4000, 0x0028, 0x2001, 0x0030, 0x900e, 0x2011, 0x4005,
-	0x080c, 0xd139, 0x0090, 0xa868, 0xd0fc, 0x0178, 0xa807, 0x0000,
-	0x0016, 0x6004, 0x908e, 0x0021, 0x0168, 0x908e, 0x003d, 0x0150,
-	0x001e, 0xa867, 0x0103, 0xa833, 0x0100, 0x001e, 0x002e, 0x009e,
-	0x00ee, 0x0005, 0x001e, 0x0009, 0x0cc0, 0x0096, 0x6014, 0x2048,
-	0xa800, 0x2048, 0xa867, 0x0103, 0xa823, 0x8001, 0x009e, 0x0005,
-	0x00b6, 0x6610, 0x2658, 0xb804, 0x9084, 0x00ff, 0x90b2, 0x000c,
-	0x1a0c, 0x0dd5, 0x6604, 0x96b6, 0x004d, 0x1120, 0x080c, 0xd058,
-	0x0804, 0xb8ed, 0x6604, 0x96b6, 0x0043, 0x1120, 0x080c, 0xd0a1,
-	0x0804, 0xb8ed, 0x6604, 0x96b6, 0x004b, 0x1120, 0x080c, 0xd0cd,
-	0x0804, 0xb8ed, 0x6604, 0x96b6, 0x0033, 0x1120, 0x080c, 0xcfee,
-	0x0804, 0xb8ed, 0x6604, 0x96b6, 0x0028, 0x1120, 0x080c, 0xcd9e,
-	0x0804, 0xb8ed, 0x6604, 0x96b6, 0x0029, 0x1120, 0x080c, 0xcddf,
-	0x0804, 0xb8ed, 0x6604, 0x96b6, 0x001f, 0x1120, 0x080c, 0xb238,
-	0x0804, 0xb8ed, 0x6604, 0x96b6, 0x0000, 0x1118, 0x080c, 0xb583,
-	0x04e0, 0x6604, 0x96b6, 0x0022, 0x1118, 0x080c, 0xb271, 0x04a8,
-	0x6604, 0x96b6, 0x0035, 0x1118, 0x080c, 0xb397, 0x0470, 0x6604,
-	0x96b6, 0x0039, 0x1118, 0x080c, 0xb518, 0x0438, 0x6604, 0x96b6,
-	0x003d, 0x1118, 0x080c, 0xb2a9, 0x0400, 0x6604, 0x96b6, 0x0044,
-	0x1118, 0x080c, 0xb2e5, 0x00c8, 0x6604, 0x96b6, 0x0049, 0x1118,
-	0x080c, 0xb326, 0x0090, 0x6604, 0x96b6, 0x0041, 0x1118, 0x080c,
-	0xb310, 0x0058, 0x91b6, 0x0015, 0x1110, 0x0063, 0x0030, 0x91b6,
-	0x0016, 0x1128, 0x00be, 0x0804, 0xbb49, 0x00be, 0x0005, 0x080c,
-	0xaef5, 0x0cd8, 0xb90a, 0xb90d, 0xb90a, 0xb954, 0xb90a, 0xbabd,
-	0xbb56, 0xb90a, 0xb90a, 0xbb1f, 0xb90a, 0xbb35, 0x0096, 0x601f,
-	0x0000, 0x6014, 0x2048, 0xa800, 0x2048, 0xa867, 0x0103, 0x009e,
-	0x0804, 0xae5f, 0xa001, 0xa001, 0x0005, 0x00e6, 0x2071, 0x1800,
-	0x7090, 0x9086, 0x0074, 0x1540, 0x080c, 0xe2f7, 0x11b0, 0x6010,
-	0x00b6, 0x2058, 0x7030, 0xd08c, 0x0128, 0xb800, 0xd0bc, 0x0110,
-	0xc0c5, 0xb802, 0x00f9, 0x00be, 0x2001, 0x0006, 0x080c, 0x6566,
-	0x080c, 0x31f5, 0x080c, 0xae5f, 0x0098, 0x2001, 0x000a, 0x080c,
-	0x6566, 0x080c, 0x31f5, 0x6003, 0x0001, 0x6007, 0x0001, 0x080c,
-	0x9140, 0x080c, 0x96a6, 0x0020, 0x2001, 0x0001, 0x080c, 0xba8d,
-	0x00ee, 0x0005, 0x00d6, 0xb800, 0xd084, 0x0160, 0x9006, 0x080c,
-	0x6552, 0x2069, 0x1847, 0x6804, 0xd0a4, 0x0120, 0x2001, 0x0006,
-	0x080c, 0x6592, 0x00de, 0x0005, 0x00b6, 0x0096, 0x00d6, 0x2011,
-	0x1824, 0x2204, 0x9086, 0x0074, 0x1904, 0xba62, 0x6010, 0x2058,
-	0xbaa0, 0x9286, 0x007e, 0x1120, 0x080c, 0xbca3, 0x0804, 0xb9c6,
-	0x080c, 0xbc98, 0x6010, 0x2058, 0xbaa0, 0x9286, 0x0080, 0x1510,
-	0x6014, 0x9005, 0x01a8, 0x2048, 0xa864, 0x9084, 0x00ff, 0x9086,
-	0x0039, 0x1140, 0x2001, 0x0000, 0x900e, 0x2011, 0x4000, 0x080c,
-	0xd139, 0x0030, 0xa807, 0x0000, 0xa867, 0x0103, 0xa833, 0x0200,
-	0x2001, 0x0006, 0x080c, 0x6566, 0x080c, 0x31f5, 0x080c, 0xae5f,
-	0x0804, 0xba67, 0x080c, 0xba75, 0x6014, 0x9005, 0x0190, 0x2048,
-	0xa868, 0xd0f4, 0x01e8, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0039,
-	0x1d08, 0x2001, 0x0000, 0x900e, 0x2011, 0x4000, 0x080c, 0xd139,
-	0x08f8, 0x080c, 0xba6b, 0x0160, 0x9006, 0x080c, 0x6552, 0x2001,
-	0x0004, 0x080c, 0x6592, 0x2001, 0x0007, 0x080c, 0x6566, 0x08a0,
-	0x2001, 0x0004, 0x080c, 0x6566, 0x6003, 0x0001, 0x6007, 0x0003,
-	0x080c, 0x9140, 0x080c, 0x96a6, 0x0804, 0xba67, 0xb85c, 0xd0e4,
-	0x01d8, 0x080c, 0xcf6e, 0x080c, 0x73b3, 0x0118, 0xd0dc, 0x1904,
-	0xb988, 0x2011, 0x1837, 0x2204, 0xc0ad, 0x2012, 0x2001, 0x196c,
-	0x2004, 0x00f6, 0x2079, 0x0100, 0x78e3, 0x0000, 0x080c, 0x28bf,
-	0x78e2, 0x00fe, 0x0804, 0xb988, 0x080c, 0xcfab, 0x2011, 0x1837,
-	0x2204, 0xc0a5, 0x2012, 0x0006, 0x080c, 0xe47c, 0x000e, 0x1904,
-	0xb988, 0xc0b5, 0x2012, 0x2001, 0x0006, 0x080c, 0x6566, 0x9006,
-	0x080c, 0x6552, 0x00c6, 0x2001, 0x180f, 0x2004, 0xd09c, 0x0520,
-	0x00f6, 0x2079, 0x0100, 0x00e6, 0x2071, 0x1800, 0x700c, 0x9084,
-	0x00ff, 0x78e6, 0x707e, 0x7010, 0x78ea, 0x7082, 0x908c, 0x00ff,
-	0x00ee, 0x780c, 0xc0b5, 0x780e, 0x00fe, 0x080c, 0x2894, 0x00f6,
-	0x2100, 0x900e, 0x080c, 0x284b, 0x795e, 0x00fe, 0x9186, 0x0081,
-	0x01d8, 0x2009, 0x0081, 0x00c8, 0x2009, 0x00ef, 0x00f6, 0x2079,
-	0x0100, 0x79ea, 0x7932, 0x7936, 0x780c, 0xc0b5, 0x780e, 0x00fe,
-	0x080c, 0x2894, 0x00f6, 0x2079, 0x1800, 0x7982, 0x2100, 0x900e,
-	0x080c, 0x284b, 0x795e, 0x00fe, 0x8108, 0x080c, 0x65b5, 0x2b00,
-	0x00ce, 0x1904, 0xb988, 0x6012, 0x2009, 0x180f, 0x210c, 0xd19c,
-	0x0150, 0x2009, 0x027c, 0x210c, 0x918c, 0x00ff, 0xb912, 0x2009,
-	0x027d, 0x210c, 0xb916, 0x2001, 0x0002, 0x080c, 0x6566, 0x6023,
-	0x0001, 0x6003, 0x0001, 0x6007, 0x0002, 0x080c, 0x9140, 0x080c,
-	0x96a6, 0x0028, 0x080c, 0xb821, 0x2001, 0x0001, 0x0431, 0x00de,
-	0x009e, 0x00be, 0x0005, 0x2001, 0x1810, 0x2004, 0xd0a4, 0x0120,
-	0x2001, 0x1848, 0x2004, 0xd0ac, 0x0005, 0x00e6, 0x080c, 0xe9ab,
-	0x0190, 0x2071, 0x0260, 0x7108, 0x720c, 0x918c, 0x00ff, 0x1118,
-	0x9284, 0xff00, 0x0140, 0x6010, 0x2058, 0xb8a0, 0x9084, 0xff80,
-	0x1110, 0xb912, 0xba16, 0x00ee, 0x0005, 0x2030, 0x9005, 0x0158,
-	0x2001, 0x0007, 0x080c, 0x6566, 0x080c, 0x56f6, 0x1120, 0x2001,
-	0x0007, 0x080c, 0x6592, 0x2600, 0x9005, 0x11b0, 0x6014, 0x0096,
-	0x2048, 0xa868, 0x009e, 0xd0fc, 0x1178, 0x0036, 0x0046, 0x6010,
-	0x00b6, 0x2058, 0xbba0, 0x00be, 0x2021, 0x0004, 0x2011, 0x8014,
-	0x080c, 0x4b1e, 0x004e, 0x003e, 0x080c, 0x31f5, 0x6020, 0x9086,
-	0x000a, 0x1108, 0x0005, 0x0804, 0xae5f, 0x00b6, 0x00e6, 0x0026,
-	0x0016, 0x2071, 0x1800, 0x7090, 0x9086, 0x0014, 0x1904, 0xbb15,
-	0x080c, 0x56f6, 0x1170, 0x6014, 0x9005, 0x1158, 0x0036, 0x0046,
-	0x6010, 0x2058, 0xbba0, 0x2021, 0x0006, 0x080c, 0x4cd5, 0x004e,
-	0x003e, 0x00d6, 0x6010, 0x2058, 0x080c, 0x66b1, 0x080c, 0xb942,
-	0x00de, 0x080c, 0xbd69, 0x1588, 0x6010, 0x2058, 0xb890, 0x9005,
-	0x0560, 0x2001, 0x0006, 0x080c, 0x6566, 0x0096, 0x6014, 0x904d,
-	0x01d0, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0039, 0x1140, 0x2001,
-	0x0000, 0x900e, 0x2011, 0x4000, 0x080c, 0xd139, 0x0060, 0xa864,
-	0x9084, 0x00ff, 0x9086, 0x0029, 0x0130, 0xa807, 0x0000, 0xa867,
-	0x0103, 0xa833, 0x0200, 0x009e, 0x080c, 0x31f5, 0x6020, 0x9086,
-	0x000a, 0x0140, 0x080c, 0xae5f, 0x0028, 0x080c, 0xb821, 0x9006,
-	0x080c, 0xba8d, 0x001e, 0x002e, 0x00ee, 0x00be, 0x0005, 0x2011,
-	0x1824, 0x2204, 0x9086, 0x0014, 0x1160, 0x2001, 0x0002, 0x080c,
-	0x6566, 0x6003, 0x0001, 0x6007, 0x0001, 0x080c, 0x9140, 0x0804,
-	0x96a6, 0x2001, 0x0001, 0x0804, 0xba8d, 0x2030, 0x2011, 0x1824,
-	0x2204, 0x9086, 0x0004, 0x1148, 0x96b6, 0x000b, 0x1120, 0x2001,
-	0x0007, 0x080c, 0x6566, 0x0804, 0xae5f, 0x2001, 0x0001, 0x0804,
-	0xba8d, 0x0002, 0xb90a, 0xbb61, 0xb90a, 0xbba2, 0xb90a, 0xbc4f,
-	0xbb56, 0xb90a, 0xb90a, 0xbc63, 0xb90a, 0xbc75, 0x6604, 0x9686,
-	0x0003, 0x0904, 0xbabd, 0x96b6, 0x001e, 0x1110, 0x080c, 0xae5f,
-	0x0005, 0x00b6, 0x00d6, 0x00c6, 0x080c, 0xbc87, 0x11a0, 0x9006,
-	0x080c, 0x6552, 0x080c, 0x31cc, 0x080c, 0xd26f, 0x2001, 0x0002,
-	0x080c, 0x6566, 0x6003, 0x0001, 0x6007, 0x0002, 0x080c, 0x9140,
-	0x080c, 0x96a6, 0x0418, 0x2009, 0x026e, 0x2104, 0x9086, 0x0009,
-	0x1160, 0x6010, 0x2058, 0xb840, 0x9084, 0x00ff, 0x9005, 0x0170,
-	0x8001, 0xb842, 0x601b, 0x000a, 0x0088, 0x2009, 0x026f, 0x2104,
-	0x9084, 0xff00, 0x9086, 0x1900, 0x1108, 0x08a0, 0x080c, 0x31cc,
-	0x080c, 0xd26f, 0x2001, 0x0001, 0x080c, 0xba8d, 0x00ce, 0x00de,
-	0x00be, 0x0005, 0x0096, 0x00b6, 0x0026, 0x9016, 0x080c, 0xbc95,
-	0x00d6, 0x2069, 0x197b, 0x2d04, 0x9005, 0x0168, 0x6010, 0x2058,
-	0xb8a0, 0x9086, 0x007e, 0x1138, 0x2069, 0x1820, 0x2d04, 0x8000,
-	0x206a, 0x00de, 0x0010, 0x00de, 0x0088, 0x9006, 0x080c, 0x6552,
-	0x2001, 0x0002, 0x080c, 0x6566, 0x6003, 0x0001, 0x6007, 0x0002,
-	0x080c, 0x9140, 0x080c, 0x96a6, 0x0804, 0xbc1f, 0x080c, 0xcb5a,
-	0x01b0, 0x6014, 0x2048, 0xa864, 0x2010, 0x9086, 0x0139, 0x1138,
-	0x6007, 0x0016, 0x2001, 0x0002, 0x080c, 0xd193, 0x00b0, 0x6014,
-	0x2048, 0xa864, 0xd0fc, 0x0118, 0x2001, 0x0001, 0x0ca8, 0x2001,
-	0x180e, 0x2004, 0xd0dc, 0x0148, 0x6010, 0x2058, 0xb840, 0x9084,
-	0x00ff, 0x9005, 0x1110, 0x9006, 0x0c38, 0x080c, 0xb821, 0x2009,
-	0x026e, 0x2134, 0x96b4, 0x00ff, 0x9686, 0x0005, 0x0520, 0x9686,
-	0x000b, 0x01c8, 0x2009, 0x026f, 0x2104, 0x9084, 0xff00, 0x1118,
-	0x9686, 0x0009, 0x01c0, 0x9086, 0x1900, 0x1168, 0x9686, 0x0009,
-	0x0190, 0x2001, 0x0004, 0x080c, 0x6566, 0x2001, 0x0028, 0x601a,
-	0x6007, 0x0052, 0x0020, 0x2001, 0x0001, 0x080c, 0xba8d, 0x002e,
-	0x00be, 0x009e, 0x0005, 0x9286, 0x0139, 0x0160, 0x6014, 0x2048,
-	0x080c, 0xcb5a, 0x0140, 0xa864, 0x9086, 0x0139, 0x0118, 0xa868,
-	0xd0fc, 0x0108, 0x0c40, 0x6010, 0x2058, 0xb840, 0x9084, 0x00ff,
-	0x9005, 0x0138, 0x8001, 0xb842, 0x601b, 0x000a, 0x6007, 0x0016,
-	0x08f0, 0xb8a0, 0x9086, 0x007e, 0x1138, 0x00e6, 0x2071, 0x1800,
-	0x080c, 0x5fc0, 0x00ee, 0x0010, 0x080c, 0x31cc, 0x0860, 0x080c,
-	0xbc95, 0x1160, 0x2001, 0x0004, 0x080c, 0x6566, 0x6003, 0x0001,
-	0x6007, 0x0003, 0x080c, 0x9140, 0x0804, 0x96a6, 0x080c, 0xb821,
-	0x9006, 0x0804, 0xba8d, 0x0489, 0x1160, 0x2001, 0x0008, 0x080c,
-	0x6566, 0x6003, 0x0001, 0x6007, 0x0005, 0x080c, 0x9140, 0x0804,
-	0x96a6, 0x2001, 0x0001, 0x0804, 0xba8d, 0x00f9, 0x1160, 0x2001,
-	0x000a, 0x080c, 0x6566, 0x6003, 0x0001, 0x6007, 0x0001, 0x080c,
-	0x9140, 0x0804, 0x96a6, 0x2001, 0x0001, 0x0804, 0xba8d, 0x2009,
-	0x026e, 0x2104, 0x9086, 0x0003, 0x1138, 0x2009, 0x026f, 0x2104,
-	0x9084, 0xff00, 0x9086, 0x2a00, 0x0005, 0x9085, 0x0001, 0x0005,
-	0x00b6, 0x00c6, 0x0016, 0x6110, 0x2158, 0x080c, 0x6625, 0x001e,
-	0x00ce, 0x00be, 0x0005, 0x00b6, 0x00f6, 0x00e6, 0x00d6, 0x0036,
-	0x0016, 0x6010, 0x2058, 0x2009, 0x1837, 0x2104, 0x9085, 0x0003,
-	0x200a, 0x080c, 0xbd3b, 0x0560, 0x2009, 0x1837, 0x2104, 0xc0cd,
-	0x200a, 0x080c, 0x6985, 0x0158, 0x9006, 0x2020, 0x2009, 0x002a,
-	0x080c, 0xe5e9, 0x2001, 0x180c, 0x200c, 0xc195, 0x2102, 0x2019,
-	0x002a, 0x2009, 0x0001, 0x080c, 0x3197, 0x00e6, 0x2071, 0x1800,
-	0x080c, 0x2fa3, 0x00ee, 0x00c6, 0x0156, 0x20a9, 0x0781, 0x2009,
-	0x007f, 0x080c, 0x32c8, 0x8108, 0x1f04, 0xbcd9, 0x015e, 0x00ce,
-	0x080c, 0xbc98, 0x2071, 0x0260, 0x2079, 0x0200, 0x7817, 0x0001,
-	0x2001, 0x1837, 0x200c, 0xc1c5, 0x7018, 0xd0fc, 0x0110, 0xd0dc,
-	0x0118, 0x7038, 0xd0dc, 0x1108, 0xc1c4, 0x7817, 0x0000, 0x2001,
-	0x1837, 0x2102, 0x2079, 0x0100, 0x2e04, 0x9084, 0x00ff, 0x2069,
-	0x181f, 0x206a, 0x78e6, 0x0006, 0x8e70, 0x2e04, 0x2069, 0x1820,
-	0x206a, 0x78ea, 0x7832, 0x7836, 0x2010, 0x9084, 0xff00, 0x001e,
-	0x9105, 0x2009, 0x182c, 0x200a, 0x2200, 0x9084, 0x00ff, 0x2008,
-	0x080c, 0x2894, 0x080c, 0x73b3, 0x0170, 0x2071, 0x0260, 0x2069,
-	0x1981, 0x7048, 0x206a, 0x704c, 0x6806, 0x7050, 0x680a, 0x7054,
-	0x680e, 0x080c, 0xcf6e, 0x0040, 0x2001, 0x0006, 0x080c, 0x6566,
-	0x080c, 0x31f5, 0x080c, 0xae5f, 0x001e, 0x003e, 0x00de, 0x00ee,
-	0x00fe, 0x00be, 0x0005, 0x0096, 0x0026, 0x0036, 0x00e6, 0x0156,
-	0x2019, 0x182c, 0x231c, 0x83ff, 0x01f0, 0x2071, 0x0260, 0x7200,
-	0x9294, 0x00ff, 0x7004, 0x9084, 0xff00, 0x9205, 0x9306, 0x1198,
-	0x2011, 0x0276, 0x20a9, 0x0004, 0x2b48, 0x2019, 0x000a, 0x080c,
-	0xbe2d, 0x1148, 0x2011, 0x027a, 0x20a9, 0x0004, 0x2019, 0x0006,
-	0x080c, 0xbe2d, 0x1100, 0x015e, 0x00ee, 0x003e, 0x002e, 0x009e,
-	0x0005, 0x00e6, 0x2071, 0x0260, 0x7034, 0x9086, 0x0014, 0x11a8,
-	0x7038, 0x9086, 0x0800, 0x1188, 0x703c, 0xd0ec, 0x0160, 0x9084,
-	0x0f00, 0x9086, 0x0100, 0x1138, 0x7054, 0xd0a4, 0x1110, 0xd0ac,
-	0x0110, 0x9006, 0x0010, 0x9085, 0x0001, 0x00ee, 0x0005, 0x00e6,
-	0x0096, 0x00c6, 0x0076, 0x0056, 0x0046, 0x0026, 0x0006, 0x0126,
-	0x2091, 0x8000, 0x2029, 0x19ef, 0x252c, 0x2021, 0x19f5, 0x2424,
-	0x2061, 0x1cd0, 0x2071, 0x1800, 0x7254, 0x7074, 0x9202, 0x1a04,
-	0xbdf9, 0x080c, 0x8987, 0x0904, 0xbdf2, 0x080c, 0xe61a, 0x0904,
-	0xbdf2, 0x6720, 0x9786, 0x0007, 0x0904, 0xbdf2, 0x2500, 0x9c06,
-	0x0904, 0xbdf2, 0x2400, 0x9c06, 0x05e8, 0x3e08, 0x9186, 0x0002,
-	0x1148, 0x6010, 0x9005, 0x0130, 0x00b6, 0x2058, 0xb800, 0x00be,
-	0xd0bc, 0x1580, 0x00c6, 0x6000, 0x9086, 0x0004, 0x1110, 0x080c,
-	0x1a70, 0x9786, 0x000a, 0x0148, 0x080c, 0xcd60, 0x1130, 0x00ce,
-	0x080c, 0xb821, 0x080c, 0xae90, 0x00e8, 0x6014, 0x2048, 0x080c,
-	0xcb5a, 0x01a8, 0x9786, 0x0003, 0x1530, 0xa867, 0x0103, 0xa87c,
-	0xd0cc, 0x0130, 0x0096, 0xa878, 0x2048, 0x080c, 0x0fb1, 0x009e,
-	0xab7a, 0xa877, 0x0000, 0x080c, 0x6c88, 0x080c, 0xcd43, 0x080c,
-	0xae90, 0x00ce, 0x9ce0, 0x0018, 0x7068, 0x9c02, 0x1210, 0x0804,
-	0xbd9c, 0x012e, 0x000e, 0x002e, 0x004e, 0x005e, 0x007e, 0x00ce,
-	0x009e, 0x00ee, 0x0005, 0x9786, 0x0006, 0x1118, 0x080c, 0xe58c,
-	0x0c30, 0x9786, 0x0009, 0x1148, 0x6000, 0x9086, 0x0004, 0x0d08,
-	0x2009, 0x004c, 0x080c, 0xaeda, 0x08e0, 0x9786, 0x000a, 0x0938,
-	0x0820, 0x220c, 0x2304, 0x9106, 0x1130, 0x8210, 0x8318, 0x1f04,
-	0xbe19, 0x9006, 0x0005, 0x2304, 0x9102, 0x0218, 0x2001, 0x0001,
-	0x0008, 0x9006, 0x918d, 0x0001, 0x0005, 0x0136, 0x01c6, 0x0016,
-	0x8906, 0x8006, 0x8007, 0x908c, 0x003f, 0x21e0, 0x9084, 0xffc0,
-	0x9300, 0x2098, 0x3518, 0x20a9, 0x0001, 0x220c, 0x4002, 0x910e,
-	0x1140, 0x8210, 0x8319, 0x1dc8, 0x9006, 0x001e, 0x01ce, 0x013e,
-	0x0005, 0x220c, 0x9102, 0x0218, 0x2001, 0x0001, 0x0010, 0x2001,
-	0x0000, 0x918d, 0x0001, 0x001e, 0x01ce, 0x013e, 0x0005, 0x220c,
-	0x810f, 0x2304, 0x9106, 0x1130, 0x8210, 0x8318, 0x1f04, 0xbe57,
-	0x9006, 0x0005, 0x918d, 0x0001, 0x0005, 0x6004, 0x908a, 0x0053,
-	0x1a0c, 0x0dd5, 0x080c, 0xcd4f, 0x0120, 0x080c, 0xcd60, 0x0168,
-	0x0028, 0x080c, 0x31f5, 0x080c, 0xcd60, 0x0138, 0x080c, 0x959a,
-	0x080c, 0xae5f, 0x080c, 0x96a6, 0x0005, 0x080c, 0xb821, 0x0cb0,
-	0x9182, 0x0054, 0x1220, 0x9182, 0x0040, 0x0208, 0x000a, 0x0005,
-	0xbe9c, 0xbe9c, 0xbe9c, 0xbe9c, 0xbe9c, 0xbe9c, 0xbe9c, 0xbe9c,
-	0xbe9c, 0xbe9c, 0xbe9c, 0xbe9e, 0xbe9e, 0xbe9e, 0xbe9e, 0xbe9c,
-	0xbe9c, 0xbe9c, 0xbe9e, 0xbe9c, 0x080c, 0x0dd5, 0x600b, 0xffff,
-	0x6003, 0x0001, 0x6106, 0x080c, 0x90f8, 0x0126, 0x2091, 0x8000,
-	0x080c, 0x96a6, 0x012e, 0x0005, 0x9186, 0x0013, 0x1128, 0x6004,
-	0x9082, 0x0040, 0x0804, 0xbf53, 0x9186, 0x0027, 0x1520, 0x080c,
-	0x959a, 0x080c, 0x31cc, 0x080c, 0xd26f, 0x0096, 0x6114, 0x2148,
-	0x080c, 0xcb5a, 0x0198, 0x080c, 0xcd60, 0x1118, 0x080c, 0xb821,
-	0x0068, 0xa867, 0x0103, 0xa87b, 0x0029, 0xa877, 0x0000, 0xa97c,
-	0xc1c5, 0xa97e, 0x080c, 0x6c94, 0x080c, 0xcd43, 0x009e, 0x080c,
-	0xae5f, 0x0804, 0x96a6, 0x9186, 0x0014, 0x1120, 0x6004, 0x9082,
-	0x0040, 0x04a0, 0x9186, 0x0046, 0x0150, 0x9186, 0x0045, 0x0138,
-	0x9186, 0x0053, 0x0120, 0x9186, 0x0048, 0x190c, 0x0dd5, 0x2001,
-	0x0109, 0x2004, 0xd084, 0x0508, 0x0126, 0x2091, 0x2800, 0x0006,
-	0x0016, 0x0026, 0x0036, 0x00f6, 0x00e6, 0x00c6, 0x2079, 0x19e6,
-	0x2071, 0x1800, 0x2061, 0x0100, 0x080c, 0x8fdd, 0x00ce, 0x00ee,
-	0x00fe, 0x003e, 0x002e, 0x001e, 0x000e, 0x012e, 0xa001, 0x6000,
-	0x9086, 0x0002, 0x1110, 0x0804, 0xbf91, 0x0005, 0x0002, 0xbf2d,
-	0xbf2b, 0xbf2b, 0xbf2b, 0xbf2b, 0xbf2b, 0xbf2b, 0xbf2b, 0xbf2b,
-	0xbf2b, 0xbf2b, 0xbf48, 0xbf48, 0xbf48, 0xbf48, 0xbf2b, 0xbf48,
-	0xbf2b, 0xbf48, 0xbf2b, 0x080c, 0x0dd5, 0x080c, 0x959a, 0x0096,
-	0x6114, 0x2148, 0x080c, 0xcb5a, 0x0168, 0xa867, 0x0103, 0xa87b,
-	0x0006, 0xa877, 0x0000, 0xa880, 0xc0ec, 0xa882, 0x080c, 0x6c94,
-	0x080c, 0xcd43, 0x009e, 0x080c, 0xae5f, 0x080c, 0x96a6, 0x0005,
-	0x080c, 0x959a, 0x080c, 0xcd60, 0x090c, 0xb821, 0x080c, 0xae5f,
-	0x080c, 0x96a6, 0x0005, 0x0002, 0xbf6a, 0xbf68, 0xbf68, 0xbf68,
-	0xbf68, 0xbf68, 0xbf68, 0xbf68, 0xbf68, 0xbf68, 0xbf68, 0xbf81,
-	0xbf81, 0xbf81, 0xbf81, 0xbf68, 0xbf8b, 0xbf68, 0xbf81, 0xbf68,
-	0x080c, 0x0dd5, 0x0096, 0x080c, 0x959a, 0x6014, 0x2048, 0x2001,
-	0x1987, 0x2004, 0x6042, 0xa97c, 0xd1ac, 0x0140, 0x6003, 0x0004,
-	0xa87c, 0x9085, 0x0400, 0xa87e, 0x009e, 0x0005, 0x6003, 0x0002,
-	0x0cb8, 0x080c, 0x959a, 0x080c, 0xd272, 0x080c, 0xd277, 0x6003,
-	0x000f, 0x0804, 0x96a6, 0x080c, 0x959a, 0x080c, 0xae5f, 0x0804,
-	0x96a6, 0x9182, 0x0054, 0x1220, 0x9182, 0x0040, 0x0208, 0x000a,
-	0x0005, 0xbfad, 0xbfad, 0xbfad, 0xbfad, 0xbfad, 0xbfaf, 0xc08c,
-	0xbfad, 0xc0c0, 0xbfad, 0xbfad, 0xbfad, 0xbfad, 0xbfad, 0xbfad,
-	0xbfad, 0xbfad, 0xbfad, 0xbfad, 0xc0c0, 0x080c, 0x0dd5, 0x00b6,
-	0x0096, 0x6114, 0x2148, 0x7644, 0x96b4, 0x0fff, 0x86ff, 0x1528,
-	0x6010, 0x2058, 0xb800, 0xd0bc, 0x1904, 0xc07b, 0xa87b, 0x0000,
-	0xa867, 0x0103, 0xae76, 0xa87c, 0xd0ac, 0x0128, 0xa834, 0xa938,
-	0x9115, 0x190c, 0xc255, 0x080c, 0x6ab0, 0x6210, 0x2258, 0xba3c,
-	0x82ff, 0x0110, 0x8211, 0xba3e, 0x7044, 0xd0e4, 0x1904, 0xc05f,
-	0x080c, 0xae5f, 0x009e, 0x00be, 0x0005, 0x968c, 0x0c00, 0x0150,
-	0x6010, 0x2058, 0xb800, 0xd0bc, 0x1904, 0xc063, 0x7348, 0xab92,
-	0x734c, 0xab8e, 0x968c, 0x00ff, 0x9186, 0x0002, 0x0508, 0x9186,
-	0x0028, 0x1118, 0xa87b, 0x001c, 0x00e8, 0xd6dc, 0x01a0, 0xa87b,
-	0x0015, 0xa87c, 0xd0ac, 0x0170, 0xa938, 0xaa34, 0x2100, 0x9205,
-	0x0148, 0x7048, 0x9106, 0x1118, 0x704c, 0x9206, 0x0118, 0xa992,
-	0xaa8e, 0xc6dc, 0x0038, 0xd6d4, 0x0118, 0xa87b, 0x0007, 0x0010,
-	0xa87b, 0x0000, 0xa867, 0x0103, 0xae76, 0x901e, 0xd6c4, 0x01d8,
-	0x9686, 0x0100, 0x1130, 0x7064, 0x9005, 0x1118, 0xc6c4, 0x0804,
-	0xbfb6, 0x735c, 0xab86, 0x83ff, 0x0170, 0x938a, 0x0009, 0x0210,
-	0x2019, 0x0008, 0x0036, 0x2308, 0x2019, 0x0018, 0x2011, 0x0025,
-	0x080c, 0xc743, 0x003e, 0xd6cc, 0x0904, 0xbfcb, 0x7154, 0xa98a,
-	0x81ff, 0x0904, 0xbfcb, 0x9192, 0x0021, 0x1278, 0x8304, 0x9098,
-	0x0018, 0x2011, 0x0029, 0x080c, 0xc743, 0x2011, 0x0205, 0x2013,
-	0x0000, 0x080c, 0xd1ff, 0x0804, 0xbfcb, 0xa868, 0xd0fc, 0x0120,
-	0x2009, 0x0020, 0xa98a, 0x0c50, 0x00a6, 0x2950, 0x080c, 0xc6e2,
-	0x00ae, 0x080c, 0xd1ff, 0x080c, 0xc733, 0x0804, 0xbfcd, 0x080c,
-	0xce58, 0x0804, 0xbfda, 0xa87c, 0xd0ac, 0x0904, 0xbfe6, 0xa880,
-	0xd0bc, 0x1904, 0xbfe6, 0x7348, 0xa838, 0x9306, 0x11c8, 0x734c,
-	0xa834, 0x931e, 0x0904, 0xbfe6, 0xd6d4, 0x0190, 0xab38, 0x9305,
-	0x0904, 0xbfe6, 0x0068, 0xa87c, 0xd0ac, 0x0904, 0xbfbe, 0xa838,
-	0xa934, 0x9105, 0x0904, 0xbfbe, 0xa880, 0xd0bc, 0x1904, 0xbfbe,
-	0x080c, 0xce92, 0x0804, 0xbfda, 0x0096, 0x00f6, 0x6003, 0x0003,
-	0x6007, 0x0043, 0x2079, 0x026c, 0x7c04, 0x7b00, 0x7e0c, 0x7d08,
-	0x6014, 0x2048, 0xa87c, 0xd0ac, 0x0140, 0x6003, 0x0002, 0x00fe,
-	0x009e, 0x0005, 0x2130, 0x2228, 0x0058, 0x2400, 0xa9ac, 0x910a,
-	0x2300, 0xaab0, 0x9213, 0x2600, 0x9102, 0x2500, 0x9203, 0x0e90,
-	0xac36, 0xab3a, 0xae46, 0xad4a, 0x00fe, 0x6043, 0x0000, 0x2c10,
-	0x080c, 0x1bba, 0x080c, 0x915d, 0x080c, 0x97d4, 0x009e, 0x0005,
-	0x0005, 0x9182, 0x0054, 0x1220, 0x9182, 0x0040, 0x0208, 0x000a,
-	0x0005, 0xc0dd, 0xc0dd, 0xc0dd, 0xc0dd, 0xc0dd, 0xc0df, 0xc175,
-	0xc0dd, 0xc0dd, 0xc18c, 0xc218, 0xc0dd, 0xc0dd, 0xc0dd, 0xc0dd,
-	0xc22d, 0xc0dd, 0xc0dd, 0xc0dd, 0xc0dd, 0x080c, 0x0dd5, 0x0076,
-	0x00a6, 0x00e6, 0x0096, 0x2071, 0x0260, 0x6114, 0x2150, 0x7644,
-	0xb676, 0x96b4, 0x0fff, 0xb77c, 0xc7e5, 0xb77e, 0x6210, 0x00b6,
-	0x2258, 0xba3c, 0x82ff, 0x0110, 0x8211, 0xba3e, 0x00be, 0x86ff,
-	0x0904, 0xc170, 0x9694, 0xff00, 0x9284, 0x0c00, 0x0120, 0x7048,
-	0xb092, 0x704c, 0xb08e, 0x9284, 0x0300, 0x0904, 0xc170, 0x080c,
-	0x0fff, 0x090c, 0x0dd5, 0x2900, 0xb07a, 0xb77c, 0xc7cd, 0xb77e,
-	0xa867, 0x0103, 0xb068, 0xa86a, 0xb06c, 0xa86e, 0xb070, 0xa872,
-	0xae76, 0x968c, 0x0c00, 0x0120, 0x7348, 0xab92, 0x734c, 0xab8e,
-	0x968c, 0x00ff, 0x9186, 0x0002, 0x0180, 0x9186, 0x0028, 0x1118,
-	0xa87b, 0x001c, 0x0060, 0xd6dc, 0x0118, 0xa87b, 0x0015, 0x0038,
-	0xd6d4, 0x0118, 0xa87b, 0x0007, 0x0010, 0xa87b, 0x0000, 0xaf7e,
-	0xb080, 0xa882, 0xb084, 0xa886, 0x901e, 0xd6c4, 0x0190, 0x735c,
-	0xab86, 0x83ff, 0x0170, 0x938a, 0x0009, 0x0210, 0x2019, 0x0008,
-	0x0036, 0x2308, 0x2019, 0x0018, 0x2011, 0x0025, 0x080c, 0xc743,
-	0x003e, 0xd6cc, 0x01e8, 0x7154, 0xa98a, 0x81ff, 0x01c8, 0x9192,
-	0x0021, 0x1260, 0x8304, 0x9098, 0x0018, 0x2011, 0x0029, 0x080c,
-	0xc743, 0x2011, 0x0205, 0x2013, 0x0000, 0x0050, 0xb068, 0xd0fc,
-	0x0120, 0x2009, 0x0020, 0xa98a, 0x0c68, 0x2950, 0x080c, 0xc6e2,
-	0x009e, 0x00ee, 0x00ae, 0x007e, 0x0005, 0x00f6, 0x00a6, 0x6003,
-	0x0003, 0x2079, 0x026c, 0x7c04, 0x7b00, 0x7e0c, 0x7d08, 0x6014,
-	0x2050, 0xb436, 0xb33a, 0xb646, 0xb54a, 0x00ae, 0x00fe, 0x2c10,
-	0x080c, 0x1bba, 0x0804, 0xa25c, 0x6003, 0x0002, 0x6004, 0x9086,
-	0x0040, 0x11c8, 0x0096, 0x6014, 0x2048, 0xa87c, 0xd0ac, 0x0160,
-	0x601c, 0xd084, 0x1130, 0x00f6, 0x2c00, 0x2078, 0x080c, 0x1727,
-	0x00fe, 0x6003, 0x0004, 0x0010, 0x6003, 0x0002, 0x009e, 0x080c,
-	0x959a, 0x080c, 0x96a6, 0x0096, 0x2001, 0x1987, 0x2004, 0x6042,
-	0x080c, 0x9656, 0x080c, 0x97d4, 0x6114, 0x2148, 0xa97c, 0xd1e4,
-	0x0904, 0xc213, 0xd1cc, 0x05a8, 0xa978, 0xa868, 0xd0fc, 0x0538,
-	0x0016, 0xa87c, 0x0006, 0xa880, 0x0006, 0xa860, 0x20e8, 0xa85c,
-	0x9080, 0x0019, 0x20a0, 0x810e, 0x810e, 0x810f, 0x9184, 0x003f,
-	0x20e0, 0x9184, 0xffc0, 0x9080, 0x0019, 0x2098, 0x0156, 0x20a9,
-	0x0020, 0x4003, 0x015e, 0x000e, 0xa882, 0x000e, 0xa87e, 0x001e,
-	0xa874, 0x0006, 0x2148, 0x080c, 0x0fb1, 0x001e, 0x0440, 0x0016,
-	0x080c, 0x0fb1, 0x009e, 0xa974, 0x0016, 0x080c, 0xc733, 0x001e,
+	0x0205, 0x2003, 0x0001, 0x2099, 0x0260, 0x20a9, 0x0016, 0x4003,
+	0x20a9, 0x000a, 0xa804, 0x2048, 0xa860, 0x20e8, 0xa85c, 0x9080,
+	0x0002, 0x20a0, 0x4003, 0x2001, 0x0205, 0x2003, 0x0002, 0x2099,
+	0x0260, 0x20a9, 0x0020, 0x4003, 0x2003, 0x0000, 0x6014, 0x2048,
+	0xa800, 0x2048, 0xa867, 0x0103, 0x080c, 0xaf43, 0x001e, 0x009e,
+	0x0005, 0x0096, 0x0016, 0x900e, 0x7030, 0x9086, 0x0100, 0x0140,
+	0x7038, 0x9084, 0x00ff, 0x800c, 0x703c, 0x9084, 0x00ff, 0x8004,
+	0x9080, 0x0004, 0x9108, 0x810b, 0x2011, 0x0002, 0x2019, 0x000c,
+	0x6014, 0x2048, 0x080c, 0xc837, 0x080c, 0xcc86, 0x0140, 0x6014,
+	0x2048, 0xa807, 0x0000, 0xa864, 0xa8e2, 0xa867, 0x0103, 0x080c,
+	0xaf43, 0x001e, 0x009e, 0x0005, 0x0016, 0x2009, 0x0000, 0x7030,
+	0x9086, 0x0200, 0x0110, 0x2009, 0x0001, 0x0096, 0x6014, 0x904d,
+	0x090c, 0x0dd5, 0xa97a, 0x080c, 0x6d17, 0x009e, 0x080c, 0xaf43,
+	0x001e, 0x0005, 0x0016, 0x0096, 0x7030, 0x9086, 0x0100, 0x1118,
+	0x2009, 0x0004, 0x0010, 0x7034, 0x800c, 0x810b, 0x2011, 0x000c,
+	0x2019, 0x000c, 0x6014, 0x2048, 0xa804, 0x0096, 0x9005, 0x0108,
+	0x2048, 0x080c, 0xc837, 0x009e, 0x080c, 0xcc86, 0x0148, 0xa804,
+	0x9005, 0x1158, 0xa807, 0x0000, 0xa864, 0xa8e2, 0xa867, 0x0103,
+	0x080c, 0xaf43, 0x009e, 0x001e, 0x0005, 0x0086, 0x2040, 0xa030,
+	0x8007, 0x9086, 0x0100, 0x1118, 0x080c, 0xb905, 0x00e0, 0xa034,
+	0x8007, 0x800c, 0x8806, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084,
+	0xffc0, 0x9080, 0x000c, 0xa87b, 0x0000, 0xa883, 0x0000, 0xa897,
+	0x4000, 0xaaa0, 0xab9c, 0xaca8, 0xada4, 0x2031, 0x0000, 0x2041,
+	0x1243, 0x0019, 0x0d08, 0x008e, 0x0898, 0x0096, 0x0006, 0x080c,
+	0x0fff, 0x000e, 0x01b0, 0xa8ab, 0x0dcb, 0xa876, 0x000e, 0xa8a2,
+	0x0006, 0xae6a, 0x2800, 0xa89e, 0xa97a, 0xaf72, 0xaa8e, 0xab92,
+	0xac96, 0xad9a, 0x0086, 0x2940, 0x080c, 0x10e9, 0x008e, 0x9085,
+	0x0001, 0x009e, 0x0005, 0x00e6, 0x00d6, 0x0026, 0x7008, 0x9084,
+	0x00ff, 0x6210, 0x00b6, 0x2258, 0xba10, 0x00be, 0x9206, 0x1520,
+	0x700c, 0x6210, 0x00b6, 0x2258, 0xba14, 0x00be, 0x9206, 0x11e0,
+	0x6043, 0x0000, 0x2c68, 0x0016, 0x2009, 0x0035, 0x080c, 0xd300,
+	0x001e, 0x1158, 0x622c, 0x2268, 0x2071, 0x026c, 0x6b20, 0x9386,
+	0x0003, 0x0130, 0x9386, 0x0006, 0x0128, 0x080c, 0xaf43, 0x0020,
+	0x0039, 0x0010, 0x080c, 0xb57c, 0x002e, 0x00de, 0x00ee, 0x0005,
+	0x0096, 0x6814, 0x2048, 0x9186, 0x0015, 0x0904, 0xb564, 0x918e,
+	0x0016, 0x1904, 0xb57a, 0x700c, 0x908c, 0xff00, 0x9186, 0x1700,
+	0x0120, 0x9186, 0x0300, 0x1904, 0xb53e, 0x89ff, 0x1138, 0x6800,
+	0x9086, 0x000f, 0x0904, 0xb521, 0x0804, 0xb578, 0x6808, 0x9086,
+	0xffff, 0x1904, 0xb566, 0xa87c, 0x9084, 0x0060, 0x9086, 0x0020,
+	0x1128, 0xa83c, 0xa940, 0x9105, 0x1904, 0xb566, 0x6824, 0xd084,
+	0x1904, 0xb566, 0xd0b4, 0x0158, 0x0016, 0x2001, 0x1985, 0x200c,
+	0x6018, 0x9102, 0x9082, 0x0005, 0x001e, 0x1a04, 0xb566, 0x080c,
+	0xce71, 0x685c, 0xa882, 0xa87c, 0xc0dc, 0xc0f4, 0xc0d4, 0xa87e,
+	0x0026, 0x900e, 0x6a18, 0x2001, 0x000a, 0x080c, 0x9027, 0xa884,
+	0x920a, 0x0208, 0x8011, 0xaa86, 0x82ff, 0x002e, 0x1138, 0x00c6,
+	0x2d60, 0x080c, 0xc999, 0x00ce, 0x0804, 0xb578, 0x00c6, 0xa868,
+	0xd0fc, 0x1118, 0x080c, 0x6141, 0x0010, 0x080c, 0x654e, 0x00ce,
+	0x1904, 0xb566, 0x00c6, 0x2d60, 0x080c, 0xaf43, 0x00ce, 0x0804,
+	0xb578, 0x00c6, 0x080c, 0xaf91, 0x0198, 0x6017, 0x0000, 0x6810,
+	0x6012, 0x080c, 0xd102, 0x6023, 0x0003, 0x6904, 0x00c6, 0x2d60,
+	0x080c, 0xaf43, 0x00ce, 0x080c, 0xafbe, 0x00ce, 0x0804, 0xb578,
+	0x2001, 0x1987, 0x2004, 0x6842, 0x00ce, 0x04d0, 0x7008, 0x9086,
+	0x000b, 0x11c8, 0x6010, 0x00b6, 0x2058, 0xb900, 0xc1bc, 0xb902,
+	0x00be, 0x00c6, 0x2d60, 0xa87b, 0x0003, 0x080c, 0xd342, 0x6007,
+	0x0085, 0x6003, 0x000b, 0x6023, 0x0002, 0x080c, 0x91b1, 0x080c,
+	0x9763, 0x00ce, 0x00e8, 0x700c, 0x9086, 0x2a00, 0x1138, 0x2001,
+	0x1987, 0x2004, 0x6842, 0x00a0, 0x0479, 0x00a0, 0x89ff, 0x090c,
+	0x0dd5, 0x00c6, 0x00d6, 0x2d60, 0xa867, 0x0103, 0xa87b, 0x0003,
+	0x080c, 0x6b33, 0x080c, 0xce71, 0x080c, 0xaf74, 0x00de, 0x00ce,
+	0x080c, 0xaf43, 0x009e, 0x0005, 0x9186, 0x0015, 0x1128, 0x2001,
+	0x1987, 0x2004, 0x6842, 0x0068, 0x918e, 0x0016, 0x1160, 0x00c6,
+	0x2d00, 0x2060, 0x080c, 0xe997, 0x080c, 0x876f, 0x080c, 0xaf43,
+	0x00ce, 0x080c, 0xaf43, 0x0005, 0x0026, 0x0036, 0x0046, 0x7228,
+	0xacb0, 0xabac, 0xd2f4, 0x0130, 0x2001, 0x1987, 0x2004, 0x6842,
+	0x0804, 0xb5f6, 0x00c6, 0x2d60, 0x080c, 0xc898, 0x00ce, 0x6804,
+	0x9086, 0x0050, 0x1168, 0x00c6, 0x2d00, 0x2060, 0x6003, 0x0001,
+	0x6007, 0x0050, 0x080c, 0x91b1, 0x080c, 0x9763, 0x00ce, 0x04f0,
+	0x6800, 0x9086, 0x000f, 0x01a8, 0x89ff, 0x090c, 0x0dd5, 0x6800,
+	0x9086, 0x0004, 0x1190, 0xa87c, 0xd0ac, 0x0178, 0xa843, 0x0fff,
+	0xa83f, 0x0fff, 0xa880, 0xc0fc, 0xa882, 0x2001, 0x0001, 0x6832,
+	0x0400, 0x2001, 0x0007, 0x6832, 0x00e0, 0xa87c, 0xd0b4, 0x1150,
+	0xd0ac, 0x0db8, 0x6824, 0xd0f4, 0x1d48, 0xa838, 0xa934, 0x9105,
+	0x0d80, 0x0c20, 0xd2ec, 0x1d68, 0x7024, 0x9306, 0x1118, 0x7020,
+	0x9406, 0x0d38, 0x7020, 0x683e, 0x7024, 0x683a, 0x2001, 0x0005,
+	0x6832, 0x080c, 0xcff9, 0x080c, 0x9763, 0x0010, 0x080c, 0xaf43,
+	0x004e, 0x003e, 0x002e, 0x0005, 0x00e6, 0x00d6, 0x0026, 0x7008,
+	0x9084, 0x00ff, 0x6210, 0x00b6, 0x2258, 0xba10, 0x00be, 0x9206,
+	0x1904, 0xb661, 0x700c, 0x6210, 0x00b6, 0x2258, 0xba14, 0x00be,
+	0x9206, 0x1904, 0xb661, 0x6038, 0x2068, 0x6824, 0xc0dc, 0x6826,
+	0x6a20, 0x9286, 0x0007, 0x0904, 0xb661, 0x9286, 0x0002, 0x0904,
+	0xb661, 0x9286, 0x0000, 0x05e8, 0x6808, 0x633c, 0x9306, 0x15c8,
+	0x2071, 0x026c, 0x9186, 0x0015, 0x0570, 0x918e, 0x0016, 0x1100,
+	0x00c6, 0x6038, 0x2060, 0x6104, 0x9186, 0x004b, 0x01c0, 0x9186,
+	0x004c, 0x01a8, 0x9186, 0x004d, 0x0190, 0x9186, 0x004e, 0x0178,
+	0x9186, 0x0052, 0x0160, 0x6014, 0x0096, 0x2048, 0x080c, 0xcc86,
+	0x090c, 0x0dd5, 0xa87b, 0x0003, 0x009e, 0x080c, 0xd342, 0x6007,
+	0x0085, 0x6003, 0x000b, 0x6023, 0x0002, 0x080c, 0x91b1, 0x080c,
+	0x9763, 0x00ce, 0x0030, 0x6038, 0x2070, 0x2001, 0x1987, 0x2004,
+	0x7042, 0x080c, 0xaf43, 0x002e, 0x00de, 0x00ee, 0x0005, 0x00b6,
+	0x0096, 0x00f6, 0x6014, 0x2048, 0x6010, 0x2058, 0x91b6, 0x0015,
+	0x0130, 0xba08, 0xbb0c, 0xbc00, 0xc48c, 0xbc02, 0x0460, 0x0096,
+	0x0156, 0x0036, 0x0026, 0x2b48, 0x9e90, 0x0010, 0x2019, 0x000a,
+	0x20a9, 0x0004, 0x080c, 0xbf11, 0x002e, 0x003e, 0x015e, 0x009e,
+	0x1904, 0xb6d0, 0x0096, 0x0156, 0x0036, 0x0026, 0x2b48, 0x9e90,
+	0x0014, 0x2019, 0x0006, 0x20a9, 0x0004, 0x080c, 0xbf11, 0x002e,
+	0x003e, 0x015e, 0x009e, 0x15a0, 0x7238, 0xba0a, 0x733c, 0xbb0e,
+	0xbc00, 0xc48d, 0xbc02, 0xa804, 0x9005, 0x1128, 0x00fe, 0x009e,
+	0x00be, 0x0804, 0xb348, 0x0096, 0x2048, 0xaa12, 0xab16, 0xac0a,
+	0x009e, 0x8006, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0,
+	0x9080, 0x0002, 0x2009, 0x002b, 0xaaa0, 0xab9c, 0xaca8, 0xada4,
+	0x2031, 0x0000, 0x2041, 0x1243, 0x080c, 0xb45d, 0x0130, 0x00fe,
+	0x009e, 0x080c, 0xaf43, 0x00be, 0x0005, 0x080c, 0xb905, 0x0cb8,
+	0x2b78, 0x00f6, 0x080c, 0x321e, 0x080c, 0xd39d, 0x00fe, 0x00c6,
+	0x080c, 0xaeed, 0x2f00, 0x6012, 0x6017, 0x0000, 0x6023, 0x0001,
+	0x6007, 0x0001, 0x6003, 0x0001, 0x2001, 0x0007, 0x080c, 0x65e9,
+	0x080c, 0x6615, 0x080c, 0x91f9, 0x080c, 0x9763, 0x00ce, 0x0804,
+	0xb6a3, 0x2100, 0x91b2, 0x0053, 0x1a0c, 0x0dd5, 0x91b2, 0x0040,
+	0x1a04, 0xb759, 0x0002, 0xb747, 0xb747, 0xb73d, 0xb747, 0xb747,
+	0xb747, 0xb73b, 0xb73b, 0xb73b, 0xb73b, 0xb73b, 0xb73b, 0xb73b,
+	0xb73b, 0xb73b, 0xb73b, 0xb73b, 0xb73b, 0xb73b, 0xb73b, 0xb73b,
+	0xb73b, 0xb73b, 0xb73b, 0xb73b, 0xb73b, 0xb73b, 0xb73b, 0xb73b,
+	0xb73b, 0xb73b, 0xb747, 0xb73b, 0xb747, 0xb747, 0xb73b, 0xb73b,
+	0xb73b, 0xb73b, 0xb73b, 0xb73d, 0xb73b, 0xb73b, 0xb73b, 0xb73b,
+	0xb73b, 0xb73b, 0xb73b, 0xb73b, 0xb73b, 0xb747, 0xb747, 0xb73b,
+	0xb73b, 0xb73b, 0xb73b, 0xb73b, 0xb73b, 0xb73b, 0xb73b, 0xb73b,
+	0xb747, 0xb73b, 0xb73b, 0x080c, 0x0dd5, 0x0066, 0x00b6, 0x6610,
+	0x2658, 0xb8cc, 0xc08c, 0xb8ce, 0x00be, 0x006e, 0x0000, 0x6003,
+	0x0001, 0x6106, 0x9186, 0x0032, 0x0118, 0x080c, 0x91f9, 0x0010,
+	0x080c, 0x91b1, 0x0126, 0x2091, 0x8000, 0x080c, 0x9763, 0x012e,
+	0x0005, 0x2600, 0x0002, 0xb747, 0xb747, 0xb76d, 0xb747, 0xb747,
+	0xb76d, 0xb76d, 0xb76d, 0xb76d, 0xb747, 0xb76d, 0xb747, 0xb76d,
+	0xb747, 0xb76d, 0xb76d, 0xb76d, 0xb76d, 0x080c, 0x0dd5, 0x6004,
+	0x90b2, 0x0053, 0x1a0c, 0x0dd5, 0x91b6, 0x0013, 0x0904, 0xb831,
+	0x91b6, 0x0027, 0x1904, 0xb7ec, 0x080c, 0x9657, 0x6004, 0x080c,
+	0xce7d, 0x01b0, 0x080c, 0xce8e, 0x01a8, 0x908e, 0x0021, 0x0904,
+	0xb7e9, 0x908e, 0x0022, 0x1130, 0x080c, 0xb374, 0x0904, 0xb7e5,
+	0x0804, 0xb7e6, 0x908e, 0x003d, 0x0904, 0xb7e9, 0x0804, 0xb7df,
+	0x080c, 0x3247, 0x2001, 0x0007, 0x080c, 0x65e9, 0x6010, 0x00b6,
+	0x2058, 0xb9a0, 0x00be, 0x080c, 0xb905, 0x9186, 0x007e, 0x1148,
+	0x2001, 0x1837, 0x2014, 0xc285, 0x080c, 0x743e, 0x1108, 0xc2ad,
+	0x2202, 0x0036, 0x0026, 0x2019, 0x0028, 0x2110, 0x080c, 0xeaa3,
+	0x002e, 0x003e, 0x0016, 0x0026, 0x0036, 0x2110, 0x2019, 0x0028,
+	0x080c, 0x9356, 0x0076, 0x903e, 0x080c, 0x9229, 0x6010, 0x00b6,
+	0x905d, 0x0100, 0x00be, 0x2c08, 0x080c, 0xe477, 0x007e, 0x003e,
+	0x002e, 0x001e, 0x080c, 0xd39d, 0x0016, 0x080c, 0xd0fa, 0x080c,
+	0xaf43, 0x001e, 0x080c, 0x331a, 0x080c, 0x9763, 0x0030, 0x080c,
+	0xd0fa, 0x080c, 0xaf43, 0x080c, 0x9763, 0x0005, 0x080c, 0xb905,
+	0x0cb0, 0x080c, 0xb941, 0x0c98, 0x9186, 0x0014, 0x1db0, 0x080c,
+	0x9657, 0x6004, 0x908e, 0x0022, 0x1118, 0x080c, 0xb374, 0x0d68,
+	0x080c, 0x321e, 0x080c, 0xd39d, 0x080c, 0xce7d, 0x1190, 0x080c,
+	0x3247, 0x6010, 0x00b6, 0x2058, 0xb9a0, 0x00be, 0x080c, 0xb905,
+	0x9186, 0x007e, 0x1128, 0x2001, 0x1837, 0x200c, 0xc185, 0x2102,
+	0x0870, 0x080c, 0xce8e, 0x1118, 0x080c, 0xb905, 0x0840, 0x6004,
+	0x908e, 0x0032, 0x1160, 0x00e6, 0x00f6, 0x2071, 0x189e, 0x2079,
+	0x0000, 0x080c, 0x35b5, 0x00fe, 0x00ee, 0x0804, 0xb7df, 0x6004,
+	0x908e, 0x0021, 0x0d48, 0x908e, 0x0022, 0x090c, 0xb905, 0x0804,
+	0xb7df, 0x90b2, 0x0040, 0x1a04, 0xb8e1, 0x2008, 0x0002, 0xb879,
+	0xb87a, 0xb87d, 0xb880, 0xb883, 0xb886, 0xb877, 0xb877, 0xb877,
+	0xb877, 0xb877, 0xb877, 0xb877, 0xb877, 0xb877, 0xb877, 0xb877,
+	0xb877, 0xb877, 0xb877, 0xb877, 0xb877, 0xb877, 0xb877, 0xb877,
+	0xb877, 0xb877, 0xb877, 0xb877, 0xb877, 0xb889, 0xb896, 0xb877,
+	0xb898, 0xb896, 0xb877, 0xb877, 0xb877, 0xb877, 0xb877, 0xb896,
+	0xb896, 0xb877, 0xb877, 0xb877, 0xb877, 0xb877, 0xb877, 0xb877,
+	0xb877, 0xb8c8, 0xb896, 0xb877, 0xb892, 0xb877, 0xb877, 0xb877,
+	0xb893, 0xb877, 0xb877, 0xb877, 0xb896, 0xb8bf, 0xb877, 0x080c,
+	0x0dd5, 0x00e0, 0x2001, 0x000b, 0x0420, 0x2001, 0x0003, 0x0408,
+	0x2001, 0x0005, 0x00f0, 0x2001, 0x0001, 0x00d8, 0x2001, 0x0009,
+	0x00c0, 0x080c, 0x9657, 0x6003, 0x0005, 0x080c, 0xd3a0, 0x080c,
+	0x9763, 0x0070, 0x0018, 0x0010, 0x080c, 0x65e9, 0x0804, 0xb8d9,
+	0x080c, 0x9657, 0x080c, 0xd3a0, 0x6003, 0x0004, 0x080c, 0x9763,
+	0x0005, 0x080c, 0x65e9, 0x080c, 0x9657, 0x6003, 0x0002, 0x0036,
+	0x2019, 0x1852, 0x2304, 0x9084, 0xff00, 0x1120, 0x2001, 0x1985,
+	0x201c, 0x0040, 0x8007, 0x909a, 0x0004, 0x0ec0, 0x8003, 0x801b,
+	0x831b, 0x9318, 0x631a, 0x003e, 0x080c, 0x9763, 0x0c08, 0x080c,
+	0x9657, 0x080c, 0xd0fa, 0x080c, 0xaf43, 0x080c, 0x9763, 0x08c0,
+	0x00e6, 0x00f6, 0x2071, 0x189e, 0x2079, 0x0000, 0x080c, 0x35b5,
+	0x00fe, 0x00ee, 0x080c, 0x9657, 0x080c, 0xaf43, 0x080c, 0x9763,
+	0x0838, 0x080c, 0x9657, 0x6003, 0x0002, 0x080c, 0xd3a0, 0x0804,
+	0x9763, 0x2600, 0x2008, 0x0002, 0xb8f8, 0xb8d9, 0xb8f6, 0xb8d9,
+	0xb8d9, 0xb8f6, 0xb8f6, 0xb8f6, 0xb8f6, 0xb8d9, 0xb8f6, 0xb8d9,
+	0xb8f6, 0xb8d9, 0xb8f6, 0xb8f6, 0xb8f6, 0xb8f6, 0x080c, 0x0dd5,
+	0x080c, 0x9657, 0x0096, 0x6014, 0x2048, 0x080c, 0x6d17, 0x009e,
+	0x080c, 0xaf43, 0x080c, 0x9763, 0x0005, 0x00e6, 0x0096, 0x0026,
+	0x0016, 0x080c, 0xcc86, 0x0568, 0x6014, 0x2048, 0xa864, 0x9086,
+	0x0139, 0x11a8, 0xa894, 0x9086, 0x0056, 0x1148, 0x080c, 0x54f7,
+	0x0130, 0x2001, 0x0000, 0x900e, 0x2011, 0x4000, 0x0028, 0x2001,
+	0x0030, 0x900e, 0x2011, 0x4005, 0x080c, 0xd267, 0x0090, 0xa868,
+	0xd0fc, 0x0178, 0xa807, 0x0000, 0x0016, 0x6004, 0x908e, 0x0021,
+	0x0168, 0x908e, 0x003d, 0x0150, 0x001e, 0xa867, 0x0103, 0xa833,
+	0x0100, 0x001e, 0x002e, 0x009e, 0x00ee, 0x0005, 0x001e, 0x0009,
+	0x0cc0, 0x0096, 0x6014, 0x2048, 0xa800, 0x2048, 0xa867, 0x0103,
+	0xa823, 0x8001, 0x009e, 0x0005, 0x00b6, 0x6610, 0x2658, 0xb804,
+	0x9084, 0x00ff, 0x90b2, 0x000c, 0x1a0c, 0x0dd5, 0x6604, 0x96b6,
+	0x004d, 0x1120, 0x080c, 0xd186, 0x0804, 0xb9d1, 0x6604, 0x96b6,
+	0x0043, 0x1120, 0x080c, 0xd1cf, 0x0804, 0xb9d1, 0x6604, 0x96b6,
+	0x004b, 0x1120, 0x080c, 0xd1fb, 0x0804, 0xb9d1, 0x6604, 0x96b6,
+	0x0033, 0x1120, 0x080c, 0xd11c, 0x0804, 0xb9d1, 0x6604, 0x96b6,
+	0x0028, 0x1120, 0x080c, 0xcecc, 0x0804, 0xb9d1, 0x6604, 0x96b6,
+	0x0029, 0x1120, 0x080c, 0xcf0d, 0x0804, 0xb9d1, 0x6604, 0x96b6,
+	0x001f, 0x1120, 0x080c, 0xb31c, 0x0804, 0xb9d1, 0x6604, 0x96b6,
+	0x0000, 0x1118, 0x080c, 0xb667, 0x04e0, 0x6604, 0x96b6, 0x0022,
+	0x1118, 0x080c, 0xb355, 0x04a8, 0x6604, 0x96b6, 0x0035, 0x1118,
+	0x080c, 0xb47b, 0x0470, 0x6604, 0x96b6, 0x0039, 0x1118, 0x080c,
+	0xb5fc, 0x0438, 0x6604, 0x96b6, 0x003d, 0x1118, 0x080c, 0xb38d,
+	0x0400, 0x6604, 0x96b6, 0x0044, 0x1118, 0x080c, 0xb3c9, 0x00c8,
+	0x6604, 0x96b6, 0x0049, 0x1118, 0x080c, 0xb40a, 0x0090, 0x6604,
+	0x96b6, 0x0041, 0x1118, 0x080c, 0xb3f4, 0x0058, 0x91b6, 0x0015,
+	0x1110, 0x0063, 0x0030, 0x91b6, 0x0016, 0x1128, 0x00be, 0x0804,
+	0xbc2d, 0x00be, 0x0005, 0x080c, 0xafd9, 0x0cd8, 0xb9ee, 0xb9f1,
+	0xb9ee, 0xba38, 0xb9ee, 0xbba1, 0xbc3a, 0xb9ee, 0xb9ee, 0xbc03,
+	0xb9ee, 0xbc19, 0x0096, 0x601f, 0x0000, 0x6014, 0x2048, 0xa800,
+	0x2048, 0xa867, 0x0103, 0x009e, 0x0804, 0xaf43, 0xa001, 0xa001,
+	0x0005, 0x00e6, 0x2071, 0x1800, 0x7090, 0x9086, 0x0074, 0x1540,
+	0x080c, 0xe448, 0x11b0, 0x6010, 0x00b6, 0x2058, 0x7030, 0xd08c,
+	0x0128, 0xb800, 0xd0bc, 0x0110, 0xc0c5, 0xb802, 0x00f9, 0x00be,
+	0x2001, 0x0006, 0x080c, 0x65e9, 0x080c, 0x3247, 0x080c, 0xaf43,
+	0x0098, 0x2001, 0x000a, 0x080c, 0x65e9, 0x080c, 0x3247, 0x6003,
+	0x0001, 0x6007, 0x0001, 0x080c, 0x91f9, 0x080c, 0x9763, 0x0020,
+	0x2001, 0x0001, 0x080c, 0xbb71, 0x00ee, 0x0005, 0x00d6, 0xb800,
+	0xd084, 0x0160, 0x9006, 0x080c, 0x65d5, 0x2069, 0x1847, 0x6804,
+	0xd0a4, 0x0120, 0x2001, 0x0006, 0x080c, 0x6615, 0x00de, 0x0005,
+	0x00b6, 0x0096, 0x00d6, 0x2011, 0x1824, 0x2204, 0x9086, 0x0074,
+	0x1904, 0xbb46, 0x6010, 0x2058, 0xbaa0, 0x9286, 0x007e, 0x1120,
+	0x080c, 0xbd87, 0x0804, 0xbaaa, 0x080c, 0xbd7c, 0x6010, 0x2058,
+	0xbaa0, 0x9286, 0x0080, 0x1510, 0x6014, 0x9005, 0x01a8, 0x2048,
+	0xa864, 0x9084, 0x00ff, 0x9086, 0x0039, 0x1140, 0x2001, 0x0000,
+	0x900e, 0x2011, 0x4000, 0x080c, 0xd267, 0x0030, 0xa807, 0x0000,
+	0xa867, 0x0103, 0xa833, 0x0200, 0x2001, 0x0006, 0x080c, 0x65e9,
+	0x080c, 0x3247, 0x080c, 0xaf43, 0x0804, 0xbb4b, 0x080c, 0xbb59,
+	0x6014, 0x9005, 0x0190, 0x2048, 0xa868, 0xd0f4, 0x01e8, 0xa864,
+	0x9084, 0x00ff, 0x9086, 0x0039, 0x1d08, 0x2001, 0x0000, 0x900e,
+	0x2011, 0x4000, 0x080c, 0xd267, 0x08f8, 0x080c, 0xbb4f, 0x0160,
+	0x9006, 0x080c, 0x65d5, 0x2001, 0x0004, 0x080c, 0x6615, 0x2001,
+	0x0007, 0x080c, 0x65e9, 0x08a0, 0x2001, 0x0004, 0x080c, 0x65e9,
+	0x6003, 0x0001, 0x6007, 0x0003, 0x080c, 0x91f9, 0x080c, 0x9763,
+	0x0804, 0xbb4b, 0xb85c, 0xd0e4, 0x01d8, 0x080c, 0xd09c, 0x080c,
+	0x743e, 0x0118, 0xd0dc, 0x1904, 0xba6c, 0x2011, 0x1837, 0x2204,
+	0xc0ad, 0x2012, 0x2001, 0x196c, 0x2004, 0x00f6, 0x2079, 0x0100,
+	0x78e3, 0x0000, 0x080c, 0x28f0, 0x78e2, 0x00fe, 0x0804, 0xba6c,
+	0x080c, 0xd0d9, 0x2011, 0x1837, 0x2204, 0xc0a5, 0x2012, 0x0006,
+	0x080c, 0xe5cd, 0x000e, 0x1904, 0xba6c, 0xc0b5, 0x2012, 0x2001,
+	0x0006, 0x080c, 0x65e9, 0x9006, 0x080c, 0x65d5, 0x00c6, 0x2001,
+	0x180f, 0x2004, 0xd09c, 0x0520, 0x00f6, 0x2079, 0x0100, 0x00e6,
+	0x2071, 0x1800, 0x700c, 0x9084, 0x00ff, 0x78e6, 0x707e, 0x7010,
+	0x78ea, 0x7082, 0x908c, 0x00ff, 0x00ee, 0x780c, 0xc0b5, 0x780e,
+	0x00fe, 0x080c, 0x28c5, 0x00f6, 0x2100, 0x900e, 0x080c, 0x287c,
+	0x795e, 0x00fe, 0x9186, 0x0081, 0x01d8, 0x2009, 0x0081, 0x00c8,
+	0x2009, 0x00ef, 0x00f6, 0x2079, 0x0100, 0x79ea, 0x7932, 0x7936,
+	0x780c, 0xc0b5, 0x780e, 0x00fe, 0x080c, 0x28c5, 0x00f6, 0x2079,
+	0x1800, 0x7982, 0x2100, 0x900e, 0x080c, 0x287c, 0x795e, 0x00fe,
+	0x8108, 0x080c, 0x6638, 0x2b00, 0x00ce, 0x1904, 0xba6c, 0x6012,
+	0x2009, 0x180f, 0x210c, 0xd19c, 0x0150, 0x2009, 0x027c, 0x210c,
+	0x918c, 0x00ff, 0xb912, 0x2009, 0x027d, 0x210c, 0xb916, 0x2001,
+	0x0002, 0x080c, 0x65e9, 0x6023, 0x0001, 0x6003, 0x0001, 0x6007,
+	0x0002, 0x080c, 0x91f9, 0x080c, 0x9763, 0x0028, 0x080c, 0xb905,
+	0x2001, 0x0001, 0x0431, 0x00de, 0x009e, 0x00be, 0x0005, 0x2001,
+	0x1810, 0x2004, 0xd0a4, 0x0120, 0x2001, 0x1848, 0x2004, 0xd0ac,
+	0x0005, 0x00e6, 0x080c, 0xeafc, 0x0190, 0x2071, 0x0260, 0x7108,
+	0x720c, 0x918c, 0x00ff, 0x1118, 0x9284, 0xff00, 0x0140, 0x6010,
+	0x2058, 0xb8a0, 0x9084, 0xff80, 0x1110, 0xb912, 0xba16, 0x00ee,
+	0x0005, 0x2030, 0x9005, 0x0158, 0x2001, 0x0007, 0x080c, 0x65e9,
+	0x080c, 0x5771, 0x1120, 0x2001, 0x0007, 0x080c, 0x6615, 0x2600,
+	0x9005, 0x11b0, 0x6014, 0x0096, 0x2048, 0xa868, 0x009e, 0xd0fc,
+	0x1178, 0x0036, 0x0046, 0x6010, 0x00b6, 0x2058, 0xbba0, 0x00be,
+	0x2021, 0x0004, 0x2011, 0x8014, 0x080c, 0x4b7f, 0x004e, 0x003e,
+	0x080c, 0x3247, 0x6020, 0x9086, 0x000a, 0x1108, 0x0005, 0x0804,
+	0xaf43, 0x00b6, 0x00e6, 0x0026, 0x0016, 0x2071, 0x1800, 0x7090,
+	0x9086, 0x0014, 0x1904, 0xbbf9, 0x080c, 0x5771, 0x1170, 0x6014,
+	0x9005, 0x1158, 0x0036, 0x0046, 0x6010, 0x2058, 0xbba0, 0x2021,
+	0x0006, 0x080c, 0x4d36, 0x004e, 0x003e, 0x00d6, 0x6010, 0x2058,
+	0x080c, 0x6734, 0x080c, 0xba26, 0x00de, 0x080c, 0xbe4d, 0x1588,
+	0x6010, 0x2058, 0xb890, 0x9005, 0x0560, 0x2001, 0x0006, 0x080c,
+	0x65e9, 0x0096, 0x6014, 0x904d, 0x01d0, 0xa864, 0x9084, 0x00ff,
+	0x9086, 0x0039, 0x1140, 0x2001, 0x0000, 0x900e, 0x2011, 0x4000,
+	0x080c, 0xd267, 0x0060, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0029,
+	0x0130, 0xa807, 0x0000, 0xa867, 0x0103, 0xa833, 0x0200, 0x009e,
+	0x080c, 0x3247, 0x6020, 0x9086, 0x000a, 0x0140, 0x080c, 0xaf43,
+	0x0028, 0x080c, 0xb905, 0x9006, 0x080c, 0xbb71, 0x001e, 0x002e,
+	0x00ee, 0x00be, 0x0005, 0x2011, 0x1824, 0x2204, 0x9086, 0x0014,
+	0x1160, 0x2001, 0x0002, 0x080c, 0x65e9, 0x6003, 0x0001, 0x6007,
+	0x0001, 0x080c, 0x91f9, 0x0804, 0x9763, 0x2001, 0x0001, 0x0804,
+	0xbb71, 0x2030, 0x2011, 0x1824, 0x2204, 0x9086, 0x0004, 0x1148,
+	0x96b6, 0x000b, 0x1120, 0x2001, 0x0007, 0x080c, 0x65e9, 0x0804,
+	0xaf43, 0x2001, 0x0001, 0x0804, 0xbb71, 0x0002, 0xb9ee, 0xbc45,
+	0xb9ee, 0xbc86, 0xb9ee, 0xbd33, 0xbc3a, 0xb9ee, 0xb9ee, 0xbd47,
+	0xb9ee, 0xbd59, 0x6604, 0x9686, 0x0003, 0x0904, 0xbba1, 0x96b6,
+	0x001e, 0x1110, 0x080c, 0xaf43, 0x0005, 0x00b6, 0x00d6, 0x00c6,
+	0x080c, 0xbd6b, 0x11a0, 0x9006, 0x080c, 0x65d5, 0x080c, 0x321e,
+	0x080c, 0xd39d, 0x2001, 0x0002, 0x080c, 0x65e9, 0x6003, 0x0001,
+	0x6007, 0x0002, 0x080c, 0x91f9, 0x080c, 0x9763, 0x0418, 0x2009,
+	0x026e, 0x2104, 0x9086, 0x0009, 0x1160, 0x6010, 0x2058, 0xb840,
+	0x9084, 0x00ff, 0x9005, 0x0170, 0x8001, 0xb842, 0x601b, 0x000a,
+	0x0088, 0x2009, 0x026f, 0x2104, 0x9084, 0xff00, 0x9086, 0x1900,
+	0x1108, 0x08a0, 0x080c, 0x321e, 0x080c, 0xd39d, 0x2001, 0x0001,
+	0x080c, 0xbb71, 0x00ce, 0x00de, 0x00be, 0x0005, 0x0096, 0x00b6,
+	0x0026, 0x9016, 0x080c, 0xbd79, 0x00d6, 0x2069, 0x197b, 0x2d04,
+	0x9005, 0x0168, 0x6010, 0x2058, 0xb8a0, 0x9086, 0x007e, 0x1138,
+	0x2069, 0x1820, 0x2d04, 0x8000, 0x206a, 0x00de, 0x0010, 0x00de,
+	0x0088, 0x9006, 0x080c, 0x65d5, 0x2001, 0x0002, 0x080c, 0x65e9,
+	0x6003, 0x0001, 0x6007, 0x0002, 0x080c, 0x91f9, 0x080c, 0x9763,
+	0x0804, 0xbd03, 0x080c, 0xcc86, 0x01b0, 0x6014, 0x2048, 0xa864,
+	0x2010, 0x9086, 0x0139, 0x1138, 0x6007, 0x0016, 0x2001, 0x0002,
+	0x080c, 0xd2c1, 0x00b0, 0x6014, 0x2048, 0xa864, 0xd0fc, 0x0118,
+	0x2001, 0x0001, 0x0ca8, 0x2001, 0x180e, 0x2004, 0xd0dc, 0x0148,
+	0x6010, 0x2058, 0xb840, 0x9084, 0x00ff, 0x9005, 0x1110, 0x9006,
+	0x0c38, 0x080c, 0xb905, 0x2009, 0x026e, 0x2134, 0x96b4, 0x00ff,
+	0x9686, 0x0005, 0x0520, 0x9686, 0x000b, 0x01c8, 0x2009, 0x026f,
+	0x2104, 0x9084, 0xff00, 0x1118, 0x9686, 0x0009, 0x01c0, 0x9086,
+	0x1900, 0x1168, 0x9686, 0x0009, 0x0190, 0x2001, 0x0004, 0x080c,
+	0x65e9, 0x2001, 0x0028, 0x601a, 0x6007, 0x0052, 0x0020, 0x2001,
+	0x0001, 0x080c, 0xbb71, 0x002e, 0x00be, 0x009e, 0x0005, 0x9286,
+	0x0139, 0x0160, 0x6014, 0x2048, 0x080c, 0xcc86, 0x0140, 0xa864,
+	0x9086, 0x0139, 0x0118, 0xa868, 0xd0fc, 0x0108, 0x0c40, 0x6010,
+	0x2058, 0xb840, 0x9084, 0x00ff, 0x9005, 0x0138, 0x8001, 0xb842,
+	0x601b, 0x000a, 0x6007, 0x0016, 0x08f0, 0xb8a0, 0x9086, 0x007e,
+	0x1138, 0x00e6, 0x2071, 0x1800, 0x080c, 0x6040, 0x00ee, 0x0010,
+	0x080c, 0x321e, 0x0860, 0x080c, 0xbd79, 0x1160, 0x2001, 0x0004,
+	0x080c, 0x65e9, 0x6003, 0x0001, 0x6007, 0x0003, 0x080c, 0x91f9,
+	0x0804, 0x9763, 0x080c, 0xb905, 0x9006, 0x0804, 0xbb71, 0x0489,
+	0x1160, 0x2001, 0x0008, 0x080c, 0x65e9, 0x6003, 0x0001, 0x6007,
+	0x0005, 0x080c, 0x91f9, 0x0804, 0x9763, 0x2001, 0x0001, 0x0804,
+	0xbb71, 0x00f9, 0x1160, 0x2001, 0x000a, 0x080c, 0x65e9, 0x6003,
+	0x0001, 0x6007, 0x0001, 0x080c, 0x91f9, 0x0804, 0x9763, 0x2001,
+	0x0001, 0x0804, 0xbb71, 0x2009, 0x026e, 0x2104, 0x9086, 0x0003,
+	0x1138, 0x2009, 0x026f, 0x2104, 0x9084, 0xff00, 0x9086, 0x2a00,
+	0x0005, 0x9085, 0x0001, 0x0005, 0x00b6, 0x00c6, 0x0016, 0x6110,
+	0x2158, 0x080c, 0x66a8, 0x001e, 0x00ce, 0x00be, 0x0005, 0x00b6,
+	0x00f6, 0x00e6, 0x00d6, 0x0036, 0x0016, 0x6010, 0x2058, 0x2009,
+	0x1837, 0x2104, 0x9085, 0x0003, 0x200a, 0x080c, 0xbe1f, 0x0560,
+	0x2009, 0x1837, 0x2104, 0xc0cd, 0x200a, 0x080c, 0x6a08, 0x0158,
+	0x9006, 0x2020, 0x2009, 0x002a, 0x080c, 0xe73a, 0x2001, 0x180c,
+	0x200c, 0xc195, 0x2102, 0x2019, 0x002a, 0x2009, 0x0001, 0x080c,
+	0x31e9, 0x00e6, 0x2071, 0x1800, 0x080c, 0x2ff5, 0x00ee, 0x00c6,
+	0x0156, 0x20a9, 0x0781, 0x2009, 0x007f, 0x080c, 0x331a, 0x8108,
+	0x1f04, 0xbdbd, 0x015e, 0x00ce, 0x080c, 0xbd7c, 0x2071, 0x0260,
+	0x2079, 0x0200, 0x7817, 0x0001, 0x2001, 0x1837, 0x200c, 0xc1c5,
+	0x7018, 0xd0fc, 0x0110, 0xd0dc, 0x0118, 0x7038, 0xd0dc, 0x1108,
+	0xc1c4, 0x7817, 0x0000, 0x2001, 0x1837, 0x2102, 0x2079, 0x0100,
+	0x2e04, 0x9084, 0x00ff, 0x2069, 0x181f, 0x206a, 0x78e6, 0x0006,
+	0x8e70, 0x2e04, 0x2069, 0x1820, 0x206a, 0x78ea, 0x7832, 0x7836,
+	0x2010, 0x9084, 0xff00, 0x001e, 0x9105, 0x2009, 0x182c, 0x200a,
+	0x2200, 0x9084, 0x00ff, 0x2008, 0x080c, 0x28c5, 0x080c, 0x743e,
+	0x0170, 0x2071, 0x0260, 0x2069, 0x1981, 0x7048, 0x206a, 0x704c,
+	0x6806, 0x7050, 0x680a, 0x7054, 0x680e, 0x080c, 0xd09c, 0x0040,
+	0x2001, 0x0006, 0x080c, 0x65e9, 0x080c, 0x3247, 0x080c, 0xaf43,
+	0x001e, 0x003e, 0x00de, 0x00ee, 0x00fe, 0x00be, 0x0005, 0x0096,
+	0x0026, 0x0036, 0x00e6, 0x0156, 0x2019, 0x182c, 0x231c, 0x83ff,
+	0x01f0, 0x2071, 0x0260, 0x7200, 0x9294, 0x00ff, 0x7004, 0x9084,
+	0xff00, 0x9205, 0x9306, 0x1198, 0x2011, 0x0276, 0x20a9, 0x0004,
+	0x2b48, 0x2019, 0x000a, 0x080c, 0xbf11, 0x1148, 0x2011, 0x027a,
+	0x20a9, 0x0004, 0x2019, 0x0006, 0x080c, 0xbf11, 0x1100, 0x015e,
+	0x00ee, 0x003e, 0x002e, 0x009e, 0x0005, 0x00e6, 0x2071, 0x0260,
+	0x7034, 0x9086, 0x0014, 0x11a8, 0x7038, 0x9086, 0x0800, 0x1188,
+	0x703c, 0xd0ec, 0x0160, 0x9084, 0x0f00, 0x9086, 0x0100, 0x1138,
+	0x7054, 0xd0a4, 0x1110, 0xd0ac, 0x0110, 0x9006, 0x0010, 0x9085,
+	0x0001, 0x00ee, 0x0005, 0x00e6, 0x0096, 0x00c6, 0x0076, 0x0056,
+	0x0046, 0x0026, 0x0006, 0x0126, 0x2091, 0x8000, 0x2029, 0x19ef,
+	0x252c, 0x2021, 0x19f5, 0x2424, 0x2061, 0x1cd0, 0x2071, 0x1800,
+	0x7254, 0x7074, 0x9202, 0x1a04, 0xbedd, 0x080c, 0x8a3d, 0x0904,
+	0xbed6, 0x080c, 0xe76b, 0x0904, 0xbed6, 0x6720, 0x9786, 0x0007,
+	0x0904, 0xbed6, 0x2500, 0x9c06, 0x0904, 0xbed6, 0x2400, 0x9c06,
+	0x05e8, 0x3e08, 0x9186, 0x0002, 0x1148, 0x6010, 0x9005, 0x0130,
+	0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x1580, 0x00c6, 0x6000,
+	0x9086, 0x0004, 0x1110, 0x080c, 0x1aa1, 0x9786, 0x000a, 0x0148,
+	0x080c, 0xce8e, 0x1130, 0x00ce, 0x080c, 0xb905, 0x080c, 0xaf74,
+	0x00e8, 0x6014, 0x2048, 0x080c, 0xcc86, 0x01a8, 0x9786, 0x0003,
+	0x1530, 0xa867, 0x0103, 0xa87c, 0xd0cc, 0x0130, 0x0096, 0xa878,
+	0x2048, 0x080c, 0x0fb1, 0x009e, 0xab7a, 0xa877, 0x0000, 0x080c,
+	0x6d0b, 0x080c, 0xce71, 0x080c, 0xaf74, 0x00ce, 0x9ce0, 0x0018,
+	0x7068, 0x9c02, 0x1210, 0x0804, 0xbe80, 0x012e, 0x000e, 0x002e,
+	0x004e, 0x005e, 0x007e, 0x00ce, 0x009e, 0x00ee, 0x0005, 0x9786,
+	0x0006, 0x1118, 0x080c, 0xe6dd, 0x0c30, 0x9786, 0x0009, 0x1148,
+	0x6000, 0x9086, 0x0004, 0x0d08, 0x2009, 0x004c, 0x080c, 0xafbe,
+	0x08e0, 0x9786, 0x000a, 0x0980, 0x0820, 0x220c, 0x2304, 0x9106,
+	0x1130, 0x8210, 0x8318, 0x1f04, 0xbefd, 0x9006, 0x0005, 0x2304,
+	0x9102, 0x0218, 0x2001, 0x0001, 0x0008, 0x9006, 0x918d, 0x0001,
+	0x0005, 0x0136, 0x01c6, 0x0016, 0x8906, 0x8006, 0x8007, 0x908c,
+	0x003f, 0x21e0, 0x9084, 0xffc0, 0x9300, 0x2098, 0x3518, 0x20a9,
+	0x0001, 0x220c, 0x4002, 0x910e, 0x1140, 0x8210, 0x8319, 0x1dc8,
+	0x9006, 0x001e, 0x01ce, 0x013e, 0x0005, 0x220c, 0x9102, 0x0218,
+	0x2001, 0x0001, 0x0010, 0x2001, 0x0000, 0x918d, 0x0001, 0x001e,
+	0x01ce, 0x013e, 0x0005, 0x220c, 0x810f, 0x2304, 0x9106, 0x1130,
+	0x8210, 0x8318, 0x1f04, 0xbf3b, 0x9006, 0x0005, 0x918d, 0x0001,
+	0x0005, 0x6004, 0x908a, 0x0053, 0x1a0c, 0x0dd5, 0x080c, 0xce7d,
+	0x0120, 0x080c, 0xce8e, 0x0168, 0x0028, 0x080c, 0x3247, 0x080c,
+	0xce8e, 0x0138, 0x080c, 0x9657, 0x080c, 0xaf43, 0x080c, 0x9763,
+	0x0005, 0x080c, 0xb905, 0x0cb0, 0x9182, 0x0054, 0x1220, 0x9182,
+	0x0040, 0x0208, 0x000a, 0x0005, 0xbf80, 0xbf80, 0xbf80, 0xbf80,
+	0xbf80, 0xbf80, 0xbf80, 0xbf80, 0xbf80, 0xbf80, 0xbf80, 0xbf82,
+	0xbf82, 0xbf82, 0xbf82, 0xbf80, 0xbf80, 0xbf80, 0xbf82, 0xbf80,
+	0x080c, 0x0dd5, 0x600b, 0xffff, 0x6003, 0x0001, 0x6106, 0x080c,
+	0x91b1, 0x0126, 0x2091, 0x8000, 0x080c, 0x9763, 0x012e, 0x0005,
+	0x9186, 0x0013, 0x1128, 0x6004, 0x9082, 0x0040, 0x0804, 0xc037,
+	0x9186, 0x0027, 0x1520, 0x080c, 0x9657, 0x080c, 0x321e, 0x080c,
+	0xd39d, 0x0096, 0x6114, 0x2148, 0x080c, 0xcc86, 0x0198, 0x080c,
+	0xce8e, 0x1118, 0x080c, 0xb905, 0x0068, 0xa867, 0x0103, 0xa87b,
+	0x0029, 0xa877, 0x0000, 0xa97c, 0xc1c5, 0xa97e, 0x080c, 0x6d17,
+	0x080c, 0xce71, 0x009e, 0x080c, 0xaf43, 0x0804, 0x9763, 0x9186,
+	0x0014, 0x1120, 0x6004, 0x9082, 0x0040, 0x04a0, 0x9186, 0x0046,
+	0x0150, 0x9186, 0x0045, 0x0138, 0x9186, 0x0053, 0x0120, 0x9186,
+	0x0048, 0x190c, 0x0dd5, 0x2001, 0x0109, 0x2004, 0xd084, 0x0508,
+	0x0126, 0x2091, 0x2800, 0x0006, 0x0016, 0x0026, 0x0036, 0x00f6,
+	0x00e6, 0x00c6, 0x2079, 0x19e6, 0x2071, 0x1800, 0x2061, 0x0100,
+	0x080c, 0x9094, 0x00ce, 0x00ee, 0x00fe, 0x003e, 0x002e, 0x001e,
+	0x000e, 0x012e, 0xa001, 0x6000, 0x9086, 0x0002, 0x1110, 0x0804,
+	0xc075, 0x0005, 0x0002, 0xc011, 0xc00f, 0xc00f, 0xc00f, 0xc00f,
+	0xc00f, 0xc00f, 0xc00f, 0xc00f, 0xc00f, 0xc00f, 0xc02c, 0xc02c,
+	0xc02c, 0xc02c, 0xc00f, 0xc02c, 0xc00f, 0xc02c, 0xc00f, 0x080c,
+	0x0dd5, 0x080c, 0x9657, 0x0096, 0x6114, 0x2148, 0x080c, 0xcc86,
+	0x0168, 0xa867, 0x0103, 0xa87b, 0x0006, 0xa877, 0x0000, 0xa880,
+	0xc0ec, 0xa882, 0x080c, 0x6d17, 0x080c, 0xce71, 0x009e, 0x080c,
+	0xaf43, 0x080c, 0x9763, 0x0005, 0x080c, 0x9657, 0x080c, 0xce8e,
+	0x090c, 0xb905, 0x080c, 0xaf43, 0x080c, 0x9763, 0x0005, 0x0002,
+	0xc04e, 0xc04c, 0xc04c, 0xc04c, 0xc04c, 0xc04c, 0xc04c, 0xc04c,
+	0xc04c, 0xc04c, 0xc04c, 0xc065, 0xc065, 0xc065, 0xc065, 0xc04c,
+	0xc06f, 0xc04c, 0xc065, 0xc04c, 0x080c, 0x0dd5, 0x0096, 0x080c,
+	0x9657, 0x6014, 0x2048, 0x2001, 0x1987, 0x2004, 0x6042, 0xa97c,
+	0xd1ac, 0x0140, 0x6003, 0x0004, 0xa87c, 0x9085, 0x0400, 0xa87e,
+	0x009e, 0x0005, 0x6003, 0x0002, 0x0cb8, 0x080c, 0x9657, 0x080c,
+	0xd3a0, 0x080c, 0xd3a5, 0x6003, 0x000f, 0x0804, 0x9763, 0x080c,
+	0x9657, 0x080c, 0xaf43, 0x0804, 0x9763, 0x9182, 0x0054, 0x1220,
+	0x9182, 0x0040, 0x0208, 0x000a, 0x0005, 0xc091, 0xc091, 0xc091,
+	0xc091, 0xc091, 0xc093, 0xc170, 0xc091, 0xc1a4, 0xc091, 0xc091,
+	0xc091, 0xc091, 0xc091, 0xc091, 0xc091, 0xc091, 0xc091, 0xc091,
+	0xc1a4, 0x080c, 0x0dd5, 0x00b6, 0x0096, 0x6114, 0x2148, 0x7644,
+	0x96b4, 0x0fff, 0x86ff, 0x1528, 0x6010, 0x2058, 0xb800, 0xd0bc,
+	0x1904, 0xc15f, 0xa87b, 0x0000, 0xa867, 0x0103, 0xae76, 0xa87c,
+	0xd0ac, 0x0128, 0xa834, 0xa938, 0x9115, 0x190c, 0xc33d, 0x080c,
+	0x6b33, 0x6210, 0x2258, 0xba3c, 0x82ff, 0x0110, 0x8211, 0xba3e,
+	0x7044, 0xd0e4, 0x1904, 0xc143, 0x080c, 0xaf43, 0x009e, 0x00be,
+	0x0005, 0x968c, 0x0c00, 0x0150, 0x6010, 0x2058, 0xb800, 0xd0bc,
+	0x1904, 0xc147, 0x7348, 0xab92, 0x734c, 0xab8e, 0x968c, 0x00ff,
+	0x9186, 0x0002, 0x0508, 0x9186, 0x0028, 0x1118, 0xa87b, 0x001c,
+	0x00e8, 0xd6dc, 0x01a0, 0xa87b, 0x0015, 0xa87c, 0xd0ac, 0x0170,
+	0xa938, 0xaa34, 0x2100, 0x9205, 0x0148, 0x7048, 0x9106, 0x1118,
+	0x704c, 0x9206, 0x0118, 0xa992, 0xaa8e, 0xc6dc, 0x0038, 0xd6d4,
+	0x0118, 0xa87b, 0x0007, 0x0010, 0xa87b, 0x0000, 0xa867, 0x0103,
+	0xae76, 0x901e, 0xd6c4, 0x01d8, 0x9686, 0x0100, 0x1130, 0x7064,
+	0x9005, 0x1118, 0xc6c4, 0x0804, 0xc09a, 0x735c, 0xab86, 0x83ff,
+	0x0170, 0x938a, 0x0009, 0x0210, 0x2019, 0x0008, 0x0036, 0x2308,
+	0x2019, 0x0018, 0x2011, 0x0025, 0x080c, 0xc837, 0x003e, 0xd6cc,
+	0x0904, 0xc0af, 0x7154, 0xa98a, 0x81ff, 0x0904, 0xc0af, 0x9192,
+	0x0021, 0x1278, 0x8304, 0x9098, 0x0018, 0x2011, 0x0029, 0x080c,
+	0xc837, 0x2011, 0x0205, 0x2013, 0x0000, 0x080c, 0xd32d, 0x0804,
+	0xc0af, 0xa868, 0xd0fc, 0x0120, 0x2009, 0x0020, 0xa98a, 0x0c50,
+	0x00a6, 0x2950, 0x080c, 0xc7d6, 0x00ae, 0x080c, 0xd32d, 0x080c,
+	0xc827, 0x0804, 0xc0b1, 0x080c, 0xcf86, 0x0804, 0xc0be, 0xa87c,
+	0xd0ac, 0x0904, 0xc0ca, 0xa880, 0xd0bc, 0x1904, 0xc0ca, 0x7348,
+	0xa838, 0x9306, 0x11c8, 0x734c, 0xa834, 0x931e, 0x0904, 0xc0ca,
+	0xd6d4, 0x0190, 0xab38, 0x9305, 0x0904, 0xc0ca, 0x0068, 0xa87c,
+	0xd0ac, 0x0904, 0xc0a2, 0xa838, 0xa934, 0x9105, 0x0904, 0xc0a2,
+	0xa880, 0xd0bc, 0x1904, 0xc0a2, 0x080c, 0xcfc0, 0x0804, 0xc0be,
+	0x0096, 0x00f6, 0x6003, 0x0003, 0x6007, 0x0043, 0x2079, 0x026c,
+	0x7c04, 0x7b00, 0x7e0c, 0x7d08, 0x6014, 0x2048, 0xa87c, 0xd0ac,
+	0x0140, 0x6003, 0x0002, 0x00fe, 0x009e, 0x0005, 0x2130, 0x2228,
+	0x0058, 0x2400, 0xa9ac, 0x910a, 0x2300, 0xaab0, 0x9213, 0x2600,
+	0x9102, 0x2500, 0x9203, 0x0e90, 0xac36, 0xab3a, 0xae46, 0xad4a,
+	0x00fe, 0x6043, 0x0000, 0x2c10, 0x080c, 0x1beb, 0x080c, 0x9216,
+	0x080c, 0x9891, 0x009e, 0x0005, 0x0005, 0x9182, 0x0054, 0x1220,
+	0x9182, 0x0040, 0x0208, 0x000a, 0x0005, 0xc1c1, 0xc1c1, 0xc1c1,
+	0xc1c1, 0xc1c1, 0xc1c3, 0xc259, 0xc1c1, 0xc1c1, 0xc270, 0xc300,
+	0xc1c1, 0xc1c1, 0xc1c1, 0xc1c1, 0xc315, 0xc1c1, 0xc1c1, 0xc1c1,
+	0xc1c1, 0x080c, 0x0dd5, 0x0076, 0x00a6, 0x00e6, 0x0096, 0x2071,
+	0x0260, 0x6114, 0x2150, 0x7644, 0xb676, 0x96b4, 0x0fff, 0xb77c,
+	0xc7e5, 0xb77e, 0x6210, 0x00b6, 0x2258, 0xba3c, 0x82ff, 0x0110,
+	0x8211, 0xba3e, 0x00be, 0x86ff, 0x0904, 0xc254, 0x9694, 0xff00,
+	0x9284, 0x0c00, 0x0120, 0x7048, 0xb092, 0x704c, 0xb08e, 0x9284,
+	0x0300, 0x0904, 0xc254, 0x080c, 0x0fff, 0x090c, 0x0dd5, 0x2900,
+	0xb07a, 0xb77c, 0xc7cd, 0xb77e, 0xa867, 0x0103, 0xb068, 0xa86a,
+	0xb06c, 0xa86e, 0xb070, 0xa872, 0xae76, 0x968c, 0x0c00, 0x0120,
+	0x7348, 0xab92, 0x734c, 0xab8e, 0x968c, 0x00ff, 0x9186, 0x0002,
+	0x0180, 0x9186, 0x0028, 0x1118, 0xa87b, 0x001c, 0x0060, 0xd6dc,
+	0x0118, 0xa87b, 0x0015, 0x0038, 0xd6d4, 0x0118, 0xa87b, 0x0007,
+	0x0010, 0xa87b, 0x0000, 0xaf7e, 0xb080, 0xa882, 0xb084, 0xa886,
+	0x901e, 0xd6c4, 0x0190, 0x735c, 0xab86, 0x83ff, 0x0170, 0x938a,
+	0x0009, 0x0210, 0x2019, 0x0008, 0x0036, 0x2308, 0x2019, 0x0018,
+	0x2011, 0x0025, 0x080c, 0xc837, 0x003e, 0xd6cc, 0x01e8, 0x7154,
+	0xa98a, 0x81ff, 0x01c8, 0x9192, 0x0021, 0x1260, 0x8304, 0x9098,
+	0x0018, 0x2011, 0x0029, 0x080c, 0xc837, 0x2011, 0x0205, 0x2013,
+	0x0000, 0x0050, 0xb068, 0xd0fc, 0x0120, 0x2009, 0x0020, 0xa98a,
+	0x0c68, 0x2950, 0x080c, 0xc7d6, 0x009e, 0x00ee, 0x00ae, 0x007e,
+	0x0005, 0x00f6, 0x00a6, 0x6003, 0x0003, 0x2079, 0x026c, 0x7c04,
+	0x7b00, 0x7e0c, 0x7d08, 0x6014, 0x2050, 0xb436, 0xb33a, 0xb646,
+	0xb54a, 0x00ae, 0x00fe, 0x2c10, 0x080c, 0x1beb, 0x0804, 0xa323,
+	0x6003, 0x0002, 0x6004, 0x9086, 0x0040, 0x11c8, 0x0096, 0x6014,
+	0x2048, 0xa87c, 0xd0ac, 0x0160, 0x601c, 0xd084, 0x1130, 0x00f6,
+	0x2c00, 0x2078, 0x080c, 0x1754, 0x00fe, 0x6003, 0x0004, 0x0010,
+	0x6003, 0x0002, 0x009e, 0x080c, 0x9657, 0x080c, 0x9763, 0x0096,
+	0x2001, 0x1987, 0x2004, 0x6042, 0x080c, 0x9713, 0x080c, 0x9891,
+	0x6114, 0x2148, 0xa97c, 0xd1e4, 0x0904, 0xc2fb, 0xd1cc, 0x05c8,
+	0xa978, 0xa868, 0xd0fc, 0x0540, 0x0016, 0xa87c, 0x0006, 0xa880,
+	0x0006, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0019, 0x20a0, 0x810e,
+	0x810e, 0x810f, 0x9184, 0x003f, 0x20e0, 0x9184, 0xffc0, 0x9080,
+	0x0019, 0x2098, 0x0156, 0x20a9, 0x0020, 0x4003, 0x015e, 0x000e,
+	0xa882, 0x000e, 0xc0cc, 0xa87e, 0x001e, 0xa874, 0x0006, 0x2148,
+	0x080c, 0x0fb1, 0x001e, 0x0458, 0x0016, 0x080c, 0x0fb1, 0x009e,
+	0xa87c, 0xc0cc, 0xa87e, 0xa974, 0x0016, 0x080c, 0xc827, 0x001e,
 	0x00f0, 0xa867, 0x0103, 0xa974, 0x9184, 0x00ff, 0x90b6, 0x0002,
 	0x0180, 0x9086, 0x0028, 0x1118, 0xa87b, 0x001c, 0x0060, 0xd1dc,
 	0x0118, 0xa87b, 0x0015, 0x0038, 0xd1d4, 0x0118, 0xa87b, 0x0007,
-	0x0010, 0xa87b, 0x0000, 0x0016, 0x080c, 0x6ab0, 0x001e, 0xd1e4,
-	0x1120, 0x080c, 0xae5f, 0x009e, 0x0005, 0x080c, 0xce58, 0x0cd8,
-	0x6004, 0x9086, 0x0040, 0x1120, 0x080c, 0x959a, 0x080c, 0x96a6,
-	0x2019, 0x0001, 0x080c, 0xa5c8, 0x6003, 0x0002, 0x080c, 0xd277,
-	0x080c, 0x9656, 0x080c, 0x97d4, 0x0005, 0x6004, 0x9086, 0x0040,
-	0x1120, 0x080c, 0x959a, 0x080c, 0x96a6, 0x2019, 0x0001, 0x080c,
-	0xa5c8, 0x080c, 0x9656, 0x080c, 0x31cc, 0x080c, 0xd26f, 0x0096,
-	0x6114, 0x2148, 0x080c, 0xcb5a, 0x0150, 0xa867, 0x0103, 0xa87b,
-	0x0029, 0xa877, 0x0000, 0x080c, 0x6c94, 0x080c, 0xcd43, 0x009e,
-	0x080c, 0xae5f, 0x080c, 0x97d4, 0x0005, 0xa87b, 0x0015, 0xd1fc,
+	0x0010, 0xa87b, 0x0000, 0x0016, 0x080c, 0x6b33, 0x001e, 0xd1e4,
+	0x1120, 0x080c, 0xaf43, 0x009e, 0x0005, 0x080c, 0xcf86, 0x0cd8,
+	0x6004, 0x9086, 0x0040, 0x1120, 0x080c, 0x9657, 0x080c, 0x9763,
+	0x2019, 0x0001, 0x080c, 0xa6ac, 0x6003, 0x0002, 0x080c, 0xd3a5,
+	0x080c, 0x9713, 0x080c, 0x9891, 0x0005, 0x6004, 0x9086, 0x0040,
+	0x1120, 0x080c, 0x9657, 0x080c, 0x9763, 0x2019, 0x0001, 0x080c,
+	0xa6ac, 0x080c, 0x9713, 0x080c, 0x321e, 0x080c, 0xd39d, 0x0096,
+	0x6114, 0x2148, 0x080c, 0xcc86, 0x0150, 0xa867, 0x0103, 0xa87b,
+	0x0029, 0xa877, 0x0000, 0x080c, 0x6d17, 0x080c, 0xce71, 0x009e,
+	0x080c, 0xaf43, 0x080c, 0x9891, 0x0005, 0xa87b, 0x0015, 0xd1fc,
 	0x0180, 0xa87b, 0x0007, 0x8002, 0x8000, 0x810a, 0x9189, 0x0000,
 	0x0006, 0x0016, 0x2009, 0x1a79, 0x2104, 0x8000, 0x200a, 0x001e,
 	0x000e, 0xa992, 0xa88e, 0x0005, 0x9182, 0x0054, 0x1220, 0x9182,
-	0x0040, 0x0208, 0x000a, 0x0005, 0xc288, 0xc288, 0xc288, 0xc288,
-	0xc288, 0xc28a, 0xc288, 0xc288, 0xc330, 0xc288, 0xc288, 0xc288,
-	0xc288, 0xc288, 0xc288, 0xc288, 0xc288, 0xc288, 0xc288, 0xc461,
+	0x0040, 0x0208, 0x000a, 0x0005, 0xc370, 0xc370, 0xc370, 0xc370,
+	0xc370, 0xc372, 0xc370, 0xc370, 0xc418, 0xc370, 0xc370, 0xc370,
+	0xc370, 0xc370, 0xc370, 0xc370, 0xc370, 0xc370, 0xc370, 0xc54a,
 	0x080c, 0x0dd5, 0x0076, 0x00a6, 0x00e6, 0x0096, 0x2071, 0x0260,
 	0x6114, 0x2150, 0x7644, 0xb676, 0x96b4, 0x0fff, 0xb77c, 0xc7e5,
 	0xb77e, 0x6210, 0x00b6, 0x2258, 0xba3c, 0x82ff, 0x0110, 0x8211,
-	0xba3e, 0x00be, 0x86ff, 0x0904, 0xc329, 0x9694, 0xff00, 0x9284,
+	0xba3e, 0x00be, 0x86ff, 0x0904, 0xc411, 0x9694, 0xff00, 0x9284,
 	0x0c00, 0x0120, 0x7048, 0xb092, 0x704c, 0xb08e, 0x9284, 0x0300,
-	0x0904, 0xc329, 0x9686, 0x0100, 0x1130, 0x7064, 0x9005, 0x1118,
+	0x0904, 0xc411, 0x9686, 0x0100, 0x1130, 0x7064, 0x9005, 0x1118,
 	0xc6c4, 0xb676, 0x0c38, 0x080c, 0x0fff, 0x090c, 0x0dd5, 0x2900,
 	0xb07a, 0xb77c, 0x97bd, 0x0200, 0xb77e, 0xa867, 0x0103, 0xb068,
 	0xa86a, 0xb06c, 0xa86e, 0xb070, 0xa872, 0x7044, 0x9084, 0xf000,
@@ -6035,1514 +6064,1527 @@
 	0xaf7e, 0xb080, 0xa882, 0xb084, 0xa886, 0x901e, 0xd6c4, 0x0190,
 	0x735c, 0xab86, 0x83ff, 0x0170, 0x938a, 0x0009, 0x0210, 0x2019,
 	0x0008, 0x0036, 0x2308, 0x2019, 0x0018, 0x2011, 0x0025, 0x080c,
-	0xc743, 0x003e, 0xd6cc, 0x01e8, 0x7154, 0xa98a, 0x81ff, 0x01c8,
+	0xc837, 0x003e, 0xd6cc, 0x01e8, 0x7154, 0xa98a, 0x81ff, 0x01c8,
 	0x9192, 0x0021, 0x1260, 0x8304, 0x9098, 0x0018, 0x2011, 0x0029,
-	0x080c, 0xc743, 0x2011, 0x0205, 0x2013, 0x0000, 0x0050, 0xb068,
+	0x080c, 0xc837, 0x2011, 0x0205, 0x2013, 0x0000, 0x0050, 0xb068,
 	0xd0fc, 0x0120, 0x2009, 0x0020, 0xa98a, 0x0c68, 0x2950, 0x080c,
-	0xc6e2, 0x080c, 0x1a3e, 0x009e, 0x00ee, 0x00ae, 0x007e, 0x0005,
+	0xc7d6, 0x080c, 0x1a6f, 0x009e, 0x00ee, 0x00ae, 0x007e, 0x0005,
 	0x2001, 0x1987, 0x2004, 0x6042, 0x0096, 0x6114, 0x2148, 0xa83c,
 	0xa940, 0x9105, 0x1118, 0xa87c, 0xc0dc, 0xa87e, 0x6003, 0x0002,
-	0xa97c, 0xd1e4, 0x0904, 0xc45c, 0x6043, 0x0000, 0x6010, 0x00b6,
-	0x2058, 0xb800, 0x00be, 0xd0bc, 0x1500, 0xd1cc, 0x0904, 0xc42b,
-	0xa978, 0xa868, 0xd0fc, 0x0904, 0xc3ec, 0x0016, 0xa87c, 0x0006,
+	0xa97c, 0xd1e4, 0x0904, 0xc545, 0x6043, 0x0000, 0x6010, 0x00b6,
+	0x2058, 0xb800, 0x00be, 0xd0bc, 0x1500, 0xd1cc, 0x0904, 0xc514,
+	0xa978, 0xa868, 0xd0fc, 0x0904, 0xc4d5, 0x0016, 0xa87c, 0x0006,
 	0xa880, 0x0006, 0x00a6, 0x2150, 0xb174, 0x9184, 0x00ff, 0x90b6,
-	0x0002, 0x0904, 0xc3ba, 0x9086, 0x0028, 0x1904, 0xc3a6, 0xa87b,
-	0x001c, 0xb07b, 0x001c, 0x0804, 0xc3c2, 0x6024, 0xd0f4, 0x11d0,
+	0x0002, 0x0904, 0xc4a2, 0x9086, 0x0028, 0x1904, 0xc48e, 0xa87b,
+	0x001c, 0xb07b, 0x001c, 0x0804, 0xc4aa, 0x6024, 0xd0f4, 0x11d0,
 	0xa838, 0xaa34, 0x9205, 0x09c8, 0xa838, 0xaa90, 0x9206, 0x1120,
 	0xa88c, 0xaa34, 0x9206, 0x0988, 0x6024, 0xd0d4, 0x1148, 0xa9ac,
 	0xa834, 0x9102, 0x603a, 0xa9b0, 0xa838, 0x9103, 0x603e, 0x6024,
 	0xc0f5, 0x6026, 0x6010, 0x00b6, 0x2058, 0xb83c, 0x8000, 0xb83e,
 	0x00be, 0x9006, 0xa876, 0xa892, 0xa88e, 0xa87c, 0xc0e4, 0xa87e,
 	0xd0cc, 0x0140, 0xc0cc, 0xa87e, 0x0096, 0xa878, 0x2048, 0x080c,
-	0x0fb1, 0x009e, 0x080c, 0xce92, 0x0804, 0xc45c, 0xd1dc, 0x0158,
-	0xa87b, 0x0015, 0xb07b, 0x0015, 0x080c, 0xd122, 0x0118, 0xb174,
+	0x0fb1, 0x009e, 0x080c, 0xcfc0, 0x0804, 0xc545, 0xd1dc, 0x0158,
+	0xa87b, 0x0015, 0xb07b, 0x0015, 0x080c, 0xd250, 0x0118, 0xb174,
 	0xc1dc, 0xb176, 0x0078, 0xd1d4, 0x0128, 0xa87b, 0x0007, 0xb07b,
 	0x0007, 0x0040, 0xa87c, 0xd0ac, 0x0128, 0xa834, 0xa938, 0x9115,
-	0x190c, 0xc255, 0xa87c, 0xb07e, 0xa890, 0xb092, 0xa88c, 0xb08e,
+	0x190c, 0xc33d, 0xa87c, 0xb07e, 0xa890, 0xb092, 0xa88c, 0xb08e,
 	0xa860, 0x20e8, 0xa85c, 0x9080, 0x0019, 0x20a0, 0x20a9, 0x0020,
 	0x8a06, 0x8006, 0x8007, 0x9094, 0x003f, 0x22e0, 0x9084, 0xffc0,
 	0x9080, 0x0019, 0x2098, 0x4003, 0x00ae, 0x000e, 0xa882, 0x000e,
-	0xa87e, 0x080c, 0xd1ff, 0x001e, 0xa874, 0x0006, 0x2148, 0x080c,
-	0x0fb1, 0x001e, 0x0804, 0xc458, 0x0016, 0x00a6, 0x2150, 0xb174,
-	0x9184, 0x00ff, 0x90b6, 0x0002, 0x01e0, 0x9086, 0x0028, 0x1128,
-	0xa87b, 0x001c, 0xb07b, 0x001c, 0x00e0, 0xd1dc, 0x0158, 0xa87b,
-	0x0015, 0xb07b, 0x0015, 0x080c, 0xd122, 0x0118, 0xb174, 0xc1dc,
-	0xb176, 0x0078, 0xd1d4, 0x0128, 0xa87b, 0x0007, 0xb07b, 0x0007,
-	0x0040, 0xa87c, 0xd0ac, 0x0128, 0xa834, 0xa938, 0x9115, 0x190c,
-	0xc255, 0xa890, 0xb092, 0xa88c, 0xb08e, 0xa87c, 0xb07e, 0x00ae,
-	0x080c, 0x0fb1, 0x009e, 0x080c, 0xd1ff, 0xa974, 0x0016, 0x080c,
-	0xc733, 0x001e, 0x0468, 0xa867, 0x0103, 0xa974, 0x9184, 0x00ff,
-	0x90b6, 0x0002, 0x01b0, 0x9086, 0x0028, 0x1118, 0xa87b, 0x001c,
-	0x00d0, 0xd1dc, 0x0148, 0xa87b, 0x0015, 0x080c, 0xd122, 0x0118,
-	0xa974, 0xc1dc, 0xa976, 0x0078, 0xd1d4, 0x0118, 0xa87b, 0x0007,
-	0x0050, 0xa87b, 0x0000, 0xa87c, 0xd0ac, 0x0128, 0xa834, 0xa938,
-	0x9115, 0x190c, 0xc255, 0xa974, 0x0016, 0x080c, 0x6ab0, 0x001e,
-	0xd1e4, 0x1120, 0x080c, 0xae5f, 0x009e, 0x0005, 0x080c, 0xce58,
-	0x0cd8, 0x6114, 0x0096, 0x2148, 0xa97c, 0xd1e4, 0x190c, 0x1a5c,
-	0x009e, 0x0005, 0x080c, 0x959a, 0x0010, 0x080c, 0x9656, 0x080c,
-	0xcb5a, 0x01f0, 0x0096, 0x6114, 0x2148, 0x080c, 0xcd60, 0x1118,
-	0x080c, 0xb821, 0x00a0, 0xa867, 0x0103, 0x2009, 0x180c, 0x210c,
-	0xd18c, 0x11b8, 0xd184, 0x1190, 0x6108, 0xa97a, 0x918e, 0x0029,
-	0x1110, 0x080c, 0xe943, 0xa877, 0x0000, 0x080c, 0x6c94, 0x009e,
-	0x080c, 0xae5f, 0x080c, 0x96a6, 0x0804, 0x97d4, 0xa87b, 0x0004,
-	0x0c90, 0xa87b, 0x0004, 0x0c78, 0x9182, 0x0054, 0x1220, 0x9182,
-	0x0040, 0x0208, 0x000a, 0x0005, 0xc4b8, 0xc4b8, 0xc4b8, 0xc4b8,
-	0xc4b8, 0xc4ba, 0xc4b8, 0xc4b8, 0xc4b8, 0xc4b8, 0xc4b8, 0xc4b8,
-	0xc4b8, 0xc4b8, 0xc4b8, 0xc4b8, 0xc4b8, 0xc4b8, 0xc4b8, 0xc4b8,
-	0x080c, 0x0dd5, 0x080c, 0x56ea, 0x01f8, 0x6014, 0x7144, 0x918c,
-	0x0fff, 0x9016, 0xd1c4, 0x0118, 0x7264, 0x9294, 0x00ff, 0x0096,
-	0x904d, 0x0188, 0xa87b, 0x0000, 0xa864, 0x9086, 0x0139, 0x0128,
-	0xa867, 0x0103, 0xa976, 0xaa96, 0x0030, 0xa897, 0x4000, 0xa99a,
-	0xaa9e, 0x080c, 0x6c94, 0x009e, 0x0804, 0xae5f, 0x9182, 0x0085,
-	0x0002, 0xc4f0, 0xc4ee, 0xc4ee, 0xc4fc, 0xc4ee, 0xc4ee, 0xc4ee,
-	0xc4ee, 0xc4ee, 0xc4ee, 0xc4ee, 0xc4ee, 0xc4ee, 0x080c, 0x0dd5,
-	0x6003, 0x0001, 0x6106, 0x080c, 0x90f8, 0x0126, 0x2091, 0x8000,
-	0x080c, 0x96a6, 0x012e, 0x0005, 0x0026, 0x0056, 0x00d6, 0x00e6,
-	0x2071, 0x0260, 0x7224, 0x6216, 0x7220, 0x080c, 0xcb48, 0x01a0,
-	0x2268, 0x6800, 0x9086, 0x0000, 0x0178, 0x6010, 0x6d10, 0x952e,
-	0x1158, 0x00c6, 0x2d60, 0x080c, 0xc76e, 0x00ce, 0x0128, 0x6803,
-	0x0002, 0x6007, 0x0086, 0x0010, 0x6007, 0x0087, 0x6003, 0x0001,
-	0x080c, 0x90f8, 0x080c, 0x96a6, 0x7220, 0x080c, 0xcb48, 0x0178,
-	0x6810, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x0140, 0x6824,
-	0xd0ec, 0x0128, 0x00c6, 0x2d60, 0x080c, 0xce92, 0x00ce, 0x00ee,
-	0x00de, 0x005e, 0x002e, 0x0005, 0x9186, 0x0013, 0x1160, 0x6004,
-	0x908a, 0x0085, 0x0a0c, 0x0dd5, 0x908a, 0x0092, 0x1a0c, 0x0dd5,
-	0x9082, 0x0085, 0x00e2, 0x9186, 0x0027, 0x0120, 0x9186, 0x0014,
-	0x190c, 0x0dd5, 0x080c, 0x959a, 0x0096, 0x6014, 0x2048, 0x080c,
-	0xcb5a, 0x0140, 0xa867, 0x0103, 0xa877, 0x0000, 0xa87b, 0x0029,
-	0x080c, 0x6c94, 0x009e, 0x080c, 0xae90, 0x0804, 0x96a6, 0xc574,
-	0xc576, 0xc576, 0xc574, 0xc574, 0xc574, 0xc574, 0xc574, 0xc574,
-	0xc574, 0xc574, 0xc574, 0xc574, 0x080c, 0x0dd5, 0x080c, 0x959a,
-	0x080c, 0xae90, 0x080c, 0x96a6, 0x0005, 0x9186, 0x0013, 0x1128,
-	0x6004, 0x9082, 0x0085, 0x2008, 0x04b8, 0x9186, 0x0027, 0x11f8,
-	0x080c, 0x959a, 0x080c, 0x31cc, 0x080c, 0xd26f, 0x0096, 0x6014,
-	0x2048, 0x080c, 0xcb5a, 0x0150, 0xa867, 0x0103, 0xa877, 0x0000,
-	0xa87b, 0x0029, 0x080c, 0x6c94, 0x080c, 0xcd43, 0x009e, 0x080c,
-	0xae5f, 0x080c, 0x96a6, 0x0005, 0x080c, 0xaef5, 0x0ce0, 0x9186,
-	0x0014, 0x1dd0, 0x080c, 0x959a, 0x0096, 0x6014, 0x2048, 0x080c,
-	0xcb5a, 0x0d60, 0xa867, 0x0103, 0xa877, 0x0000, 0xa87b, 0x0006,
-	0xa880, 0xc0ec, 0xa882, 0x08f0, 0x0002, 0xc5cc, 0xc5ca, 0xc5ca,
-	0xc5ca, 0xc5ca, 0xc5ca, 0xc5e4, 0xc5ca, 0xc5ca, 0xc5ca, 0xc5ca,
-	0xc5ca, 0xc5ca, 0x080c, 0x0dd5, 0x080c, 0x959a, 0x6034, 0x908c,
-	0xff00, 0x810f, 0x9186, 0x0039, 0x0118, 0x9186, 0x0035, 0x1118,
-	0x2001, 0x1985, 0x0010, 0x2001, 0x1986, 0x2004, 0x601a, 0x6003,
-	0x000c, 0x080c, 0x96a6, 0x0005, 0x080c, 0x959a, 0x6034, 0x908c,
-	0xff00, 0x810f, 0x9186, 0x0039, 0x0118, 0x9186, 0x0035, 0x1118,
-	0x2001, 0x1985, 0x0010, 0x2001, 0x1986, 0x2004, 0x601a, 0x6003,
-	0x000e, 0x080c, 0x96a6, 0x0005, 0x9182, 0x0092, 0x1220, 0x9182,
-	0x0085, 0x0208, 0x0012, 0x0804, 0xaef5, 0xc612, 0xc612, 0xc612,
-	0xc612, 0xc614, 0xc661, 0xc612, 0xc612, 0xc612, 0xc612, 0xc612,
-	0xc612, 0xc612, 0x080c, 0x0dd5, 0x0096, 0x6010, 0x00b6, 0x2058,
-	0xb800, 0x00be, 0xd0bc, 0x0168, 0x6034, 0x908c, 0xff00, 0x810f,
-	0x9186, 0x0039, 0x0118, 0x9186, 0x0035, 0x1118, 0x009e, 0x0804,
-	0xc675, 0x080c, 0xcb5a, 0x1118, 0x080c, 0xcd43, 0x0068, 0x6014,
-	0x2048, 0xa87c, 0xd0e4, 0x1110, 0x080c, 0xcd43, 0xa867, 0x0103,
-	0x080c, 0xd23a, 0x080c, 0x6c94, 0x00d6, 0x2c68, 0x080c, 0xae09,
-	0x01d0, 0x6003, 0x0001, 0x6007, 0x001e, 0x600b, 0xffff, 0x2009,
-	0x026e, 0x210c, 0x613a, 0x2009, 0x026f, 0x210c, 0x613e, 0x6910,
-	0x6112, 0x080c, 0xcfd4, 0x6954, 0x6156, 0x6023, 0x0001, 0x080c,
-	0x90f8, 0x080c, 0x96a6, 0x2d60, 0x00de, 0x080c, 0xae5f, 0x009e,
-	0x0005, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x05a0,
-	0x6034, 0x908c, 0xff00, 0x810f, 0x9186, 0x0035, 0x0130, 0x9186,
-	0x001e, 0x0118, 0x9186, 0x0039, 0x1538, 0x00d6, 0x2c68, 0x080c,
-	0xd1d2, 0x11f0, 0x080c, 0xae09, 0x01d8, 0x6106, 0x6003, 0x0001,
-	0x6023, 0x0001, 0x6910, 0x6112, 0x692c, 0x612e, 0x6930, 0x6132,
-	0x6934, 0x918c, 0x00ff, 0x6136, 0x6938, 0x613a, 0x693c, 0x613e,
-	0x6954, 0x6156, 0x080c, 0xcfd4, 0x080c, 0x90f8, 0x080c, 0x96a6,
-	0x2d60, 0x00de, 0x0804, 0xae5f, 0x0096, 0x6014, 0x2048, 0x080c,
-	0xcb5a, 0x01c8, 0xa867, 0x0103, 0xa880, 0xd0b4, 0x0128, 0xc0ec,
-	0xa882, 0xa87b, 0x0006, 0x0048, 0xd0bc, 0x0118, 0xa87b, 0x0002,
-	0x0020, 0xa87b, 0x0005, 0x080c, 0xce54, 0xa877, 0x0000, 0x080c,
-	0x6c94, 0x080c, 0xcd43, 0x009e, 0x0804, 0xae5f, 0x0016, 0x0096,
-	0x6014, 0x2048, 0x080c, 0xcb5a, 0x0140, 0xa867, 0x0103, 0xa87b,
-	0x0028, 0xa877, 0x0000, 0x080c, 0x6c94, 0x009e, 0x001e, 0x9186,
-	0x0013, 0x0148, 0x9186, 0x0014, 0x0130, 0x9186, 0x0027, 0x0118,
-	0x080c, 0xaef5, 0x0030, 0x080c, 0x959a, 0x080c, 0xae90, 0x080c,
-	0x96a6, 0x0005, 0x0056, 0x0066, 0x0096, 0x00a6, 0x2029, 0x0001,
-	0x9182, 0x0101, 0x1208, 0x0010, 0x2009, 0x0100, 0x2130, 0x8304,
-	0x9098, 0x0018, 0x2009, 0x0020, 0x2011, 0x0029, 0x080c, 0xc743,
-	0x96b2, 0x0020, 0xb004, 0x904d, 0x0110, 0x080c, 0x0fb1, 0x080c,
-	0x0fff, 0x0520, 0x8528, 0xa867, 0x0110, 0xa86b, 0x0000, 0x2920,
-	0xb406, 0x968a, 0x003d, 0x1228, 0x2608, 0x2011, 0x001b, 0x0499,
-	0x00a8, 0x96b2, 0x003c, 0x2009, 0x003c, 0x2950, 0x2011, 0x001b,
-	0x0451, 0x0c28, 0x2001, 0x0205, 0x2003, 0x0000, 0x00ae, 0x852f,
-	0x95ad, 0x0003, 0xb566, 0x95ac, 0x0000, 0x0048, 0x2001, 0x0205,
-	0x2003, 0x0000, 0x00ae, 0x852f, 0x95ad, 0x0003, 0xb566, 0x009e,
-	0x006e, 0x005e, 0x0005, 0x00a6, 0x89ff, 0x0158, 0xa804, 0x9055,
-	0x0130, 0xa807, 0x0000, 0x080c, 0x6c94, 0x2a48, 0x0cb8, 0x080c,
-	0x6c94, 0x00ae, 0x0005, 0x00f6, 0x2079, 0x0200, 0x7814, 0x9085,
-	0x0080, 0x7816, 0xd184, 0x0108, 0x8108, 0x810c, 0x20a9, 0x0001,
-	0xa860, 0x20e8, 0xa85c, 0x9200, 0x20a0, 0x20e1, 0x0000, 0x2300,
-	0x9e00, 0x2098, 0x4003, 0x8318, 0x9386, 0x0020, 0x1148, 0x2018,
-	0x2300, 0x9e00, 0x2098, 0x7814, 0x8000, 0x9085, 0x0080, 0x7816,
-	0x8109, 0x1d80, 0x7817, 0x0000, 0x00fe, 0x0005, 0x0066, 0x0126,
-	0x2091, 0x8000, 0x2031, 0x0001, 0x6020, 0x9084, 0x000f, 0x0083,
-	0x012e, 0x006e, 0x0005, 0x0126, 0x2091, 0x8000, 0x0066, 0x2031,
-	0x0000, 0x6020, 0x9084, 0x000f, 0x001b, 0x006e, 0x012e, 0x0005,
-	0xc7a9, 0xc7a9, 0xc7a4, 0xc7cb, 0xc797, 0xc7a4, 0xc7cb, 0xc7a4,
-	0xc797, 0x8ee1, 0xc7a4, 0xc7a4, 0xc7a4, 0xc797, 0xc797, 0x080c,
-	0x0dd5, 0x0036, 0x2019, 0x0010, 0x080c, 0xe16f, 0x6023, 0x0006,
-	0x6003, 0x0007, 0x003e, 0x0005, 0x9006, 0x0005, 0x9085, 0x0001,
-	0x0005, 0x0096, 0x86ff, 0x11d8, 0x6014, 0x2048, 0x080c, 0xcb5a,
-	0x01c0, 0xa864, 0x9086, 0x0139, 0x1128, 0xa87b, 0x0005, 0xa883,
-	0x0000, 0x0028, 0x900e, 0x2001, 0x0005, 0x080c, 0x6ec7, 0x080c,
-	0xce54, 0x080c, 0x6c88, 0x080c, 0xae90, 0x9085, 0x0001, 0x009e,
-	0x0005, 0x9006, 0x0ce0, 0x6000, 0x908a, 0x0016, 0x1a0c, 0x0dd5,
-	0x0002, 0xc7e1, 0xc80f, 0xc7e3, 0xc830, 0xc80a, 0xc7e1, 0xc7a4,
-	0xc7a9, 0xc7a9, 0xc7a4, 0xc7a4, 0xc7a4, 0xc7a4, 0xc7a4, 0xc7a4,
-	0xc7a4, 0x080c, 0x0dd5, 0x86ff, 0x1510, 0x6020, 0x9086, 0x0006,
-	0x01f0, 0x0096, 0x6014, 0x2048, 0x080c, 0xcb5a, 0x0158, 0xa87c,
-	0xd0cc, 0x0130, 0x0096, 0xa878, 0x2048, 0x080c, 0x0fb1, 0x009e,
-	0x080c, 0xce54, 0x009e, 0x080c, 0xd214, 0x6007, 0x0085, 0x6003,
-	0x000b, 0x6023, 0x0002, 0x080c, 0x90f8, 0x080c, 0x96a6, 0x9085,
-	0x0001, 0x0005, 0x0066, 0x080c, 0x1a70, 0x006e, 0x08a0, 0x00e6,
-	0x2071, 0x19e6, 0x7024, 0x9c06, 0x1120, 0x080c, 0xa552, 0x00ee,
-	0x0850, 0x6020, 0x9084, 0x000f, 0x9086, 0x0006, 0x1150, 0x0086,
-	0x0096, 0x2049, 0x0001, 0x2c40, 0x080c, 0xa687, 0x009e, 0x008e,
-	0x0010, 0x080c, 0xa44f, 0x00ee, 0x1904, 0xc7e3, 0x0804, 0xc7a4,
-	0x0036, 0x00e6, 0x2071, 0x19e6, 0x703c, 0x9c06, 0x1138, 0x901e,
-	0x080c, 0xa5c8, 0x00ee, 0x003e, 0x0804, 0xc7e3, 0x080c, 0xa7b7,
-	0x00ee, 0x003e, 0x1904, 0xc7e3, 0x0804, 0xc7a4, 0x00c6, 0x6020,
-	0x9084, 0x000f, 0x0013, 0x00ce, 0x0005, 0xc863, 0xc92e, 0xca98,
-	0xc86d, 0xae90, 0xc863, 0xe161, 0xd27c, 0xc92e, 0x8eb3, 0xcb24,
-	0xc85c, 0xc85c, 0xc85c, 0xc85c, 0x080c, 0x0dd5, 0x080c, 0xcd60,
-	0x1110, 0x080c, 0xb821, 0x0005, 0x080c, 0x959a, 0x080c, 0x96a6,
-	0x0804, 0xae5f, 0x601b, 0x0001, 0x0005, 0x080c, 0xcb5a, 0x0130,
-	0x6014, 0x0096, 0x2048, 0x2c00, 0xa896, 0x009e, 0x6000, 0x908a,
-	0x0016, 0x1a0c, 0x0dd5, 0x0002, 0xc88c, 0xc88e, 0xc8b2, 0xc8c6,
-	0xc8ec, 0xc88c, 0xc863, 0xc863, 0xc863, 0xc8c6, 0xc8c6, 0xc88c,
-	0xc88c, 0xc88c, 0xc88c, 0xc8d0, 0x080c, 0x0dd5, 0x00e6, 0x6014,
-	0x0096, 0x2048, 0xa880, 0xc0b5, 0xa882, 0x009e, 0x2071, 0x19e6,
-	0x7024, 0x9c06, 0x01a0, 0x080c, 0xa44f, 0x080c, 0xd214, 0x6007,
-	0x0085, 0x6003, 0x000b, 0x6023, 0x0002, 0x2001, 0x1986, 0x2004,
-	0x601a, 0x080c, 0x90f8, 0x080c, 0x96a6, 0x00ee, 0x0005, 0x601b,
-	0x0001, 0x0cd8, 0x0096, 0x6014, 0x2048, 0xa880, 0xc0b5, 0xa882,
-	0x009e, 0x080c, 0xd214, 0x6007, 0x0085, 0x6003, 0x000b, 0x6023,
-	0x0002, 0x080c, 0x90f8, 0x080c, 0x96a6, 0x0005, 0x0096, 0x601b,
-	0x0001, 0x6014, 0x2048, 0xa880, 0xc0b5, 0xa882, 0x009e, 0x0005,
-	0x080c, 0x56ea, 0x01b8, 0x6014, 0x0096, 0x904d, 0x0190, 0xa864,
-	0xa867, 0x0103, 0xa87b, 0x0006, 0x9086, 0x0139, 0x1150, 0xa867,
-	0x0139, 0xa87b, 0x0030, 0xa897, 0x4005, 0xa89b, 0x0004, 0x080c,
-	0x6c94, 0x009e, 0x0804, 0xae5f, 0x6014, 0x0096, 0x904d, 0x05c8,
-	0xa97c, 0xd1e4, 0x05b0, 0x2001, 0x180f, 0x2004, 0xd0c4, 0x0110,
-	0x009e, 0x0005, 0xa884, 0x009e, 0x8003, 0x800b, 0x810b, 0x9108,
-	0x611a, 0x2001, 0x0030, 0x2c08, 0x080c, 0x15f0, 0x2001, 0x030c,
-	0x2004, 0x9086, 0x0041, 0x11a0, 0x6014, 0x0096, 0x904d, 0x090c,
-	0x0dd5, 0xa880, 0xd0f4, 0x1130, 0xc0f5, 0xa882, 0x009e, 0x601b,
-	0x0002, 0x0070, 0x009e, 0x2001, 0x0037, 0x2c08, 0x080c, 0x15f0,
-	0x6000, 0x9086, 0x0004, 0x1120, 0x2009, 0x0048, 0x080c, 0xaeda,
-	0x0005, 0x009e, 0x080c, 0x1a70, 0x0804, 0xc8b2, 0x6000, 0x908a,
-	0x0016, 0x1a0c, 0x0dd5, 0x000b, 0x0005, 0xc945, 0xc86a, 0xc947,
-	0xc945, 0xc947, 0xc947, 0xc864, 0xc945, 0xc85e, 0xc85e, 0xc945,
-	0xc945, 0xc945, 0xc945, 0xc945, 0xc945, 0x080c, 0x0dd5, 0x6010,
-	0x00b6, 0x2058, 0xb804, 0x9084, 0x00ff, 0x00be, 0x908a, 0x000c,
-	0x1a0c, 0x0dd5, 0x00b6, 0x0013, 0x00be, 0x0005, 0xc962, 0xca2f,
-	0xc964, 0xc9a4, 0xc964, 0xc9a4, 0xc964, 0xc972, 0xc962, 0xc9a4,
-	0xc962, 0xc993, 0x080c, 0x0dd5, 0x6004, 0x908e, 0x0016, 0x05c0,
-	0x908e, 0x0004, 0x05a8, 0x908e, 0x0002, 0x0590, 0x908e, 0x0052,
-	0x0904, 0xca2b, 0x6004, 0x080c, 0xcd60, 0x0904, 0xca48, 0x908e,
-	0x0004, 0x1110, 0x080c, 0x31f5, 0x908e, 0x0021, 0x0904, 0xca4c,
-	0x908e, 0x0022, 0x0904, 0xca93, 0x908e, 0x003d, 0x0904, 0xca4c,
-	0x908e, 0x0039, 0x0904, 0xca50, 0x908e, 0x0035, 0x0904, 0xca50,
-	0x908e, 0x001e, 0x0178, 0x908e, 0x0001, 0x1140, 0x6010, 0x2058,
-	0xb804, 0x9084, 0x00ff, 0x9086, 0x0006, 0x0110, 0x080c, 0x31cc,
-	0x080c, 0xb821, 0x0804, 0xae90, 0x00c6, 0x00d6, 0x6104, 0x9186,
-	0x0016, 0x0904, 0xca1c, 0x9186, 0x0002, 0x1904, 0xc9f1, 0x2001,
-	0x1837, 0x2004, 0xd08c, 0x11c8, 0x080c, 0x73b3, 0x11b0, 0x080c,
-	0xd25a, 0x0138, 0x080c, 0x73d6, 0x1120, 0x080c, 0x72c3, 0x0804,
-	0xca7c, 0x2001, 0x197c, 0x2003, 0x0001, 0x2001, 0x1800, 0x2003,
-	0x0001, 0x080c, 0x72e5, 0x0804, 0xca7c, 0x6010, 0x2058, 0x2001,
-	0x1837, 0x2004, 0xd0ac, 0x1904, 0xca7c, 0xb8a0, 0x9084, 0xff80,
-	0x1904, 0xca7c, 0xb840, 0x9084, 0x00ff, 0x9005, 0x0190, 0x8001,
-	0xb842, 0x6017, 0x0000, 0x6023, 0x0007, 0x601b, 0x0398, 0x6043,
-	0x0000, 0x080c, 0xae09, 0x0128, 0x2b00, 0x6012, 0x6023, 0x0001,
-	0x0458, 0x00de, 0x00ce, 0x6004, 0x908e, 0x0002, 0x11a0, 0x6010,
-	0x2058, 0xb8a0, 0x9086, 0x007e, 0x1170, 0x2009, 0x1837, 0x2104,
-	0xc085, 0x200a, 0x00e6, 0x2071, 0x1800, 0x080c, 0x5fc0, 0x00ee,
-	0x080c, 0xb821, 0x0030, 0x080c, 0xb821, 0x080c, 0x31cc, 0x080c,
-	0xd26f, 0x00e6, 0x0126, 0x2091, 0x8000, 0x080c, 0x31f5, 0x012e,
-	0x00ee, 0x080c, 0xae90, 0x0005, 0x2001, 0x0002, 0x080c, 0x6566,
-	0x6003, 0x0001, 0x6007, 0x0002, 0x080c, 0x9140, 0x080c, 0x96a6,
-	0x00de, 0x00ce, 0x0c80, 0x080c, 0x31f5, 0x0804, 0xc9a0, 0x00c6,
-	0x00d6, 0x6104, 0x9186, 0x0016, 0x0d38, 0x6010, 0x2058, 0xb840,
-	0x9084, 0x00ff, 0x9005, 0x0904, 0xc9f1, 0x8001, 0xb842, 0x6003,
-	0x0001, 0x080c, 0x9140, 0x080c, 0x96a6, 0x00de, 0x00ce, 0x0898,
-	0x080c, 0xb821, 0x0804, 0xc9a2, 0x080c, 0xb85d, 0x0804, 0xc9a2,
-	0x00d6, 0x2c68, 0x6104, 0x080c, 0xd1d2, 0x00de, 0x0118, 0x080c,
-	0xae5f, 0x0408, 0x6004, 0x8007, 0x6134, 0x918c, 0x00ff, 0x9105,
-	0x6036, 0x6007, 0x0085, 0x6003, 0x000b, 0x6023, 0x0002, 0x603c,
-	0x600a, 0x2001, 0x1986, 0x2004, 0x601a, 0x602c, 0x2c08, 0x2060,
-	0x6024, 0xd0b4, 0x0108, 0xc085, 0xc0b5, 0x6026, 0x2160, 0x080c,
-	0x90f8, 0x080c, 0x96a6, 0x0005, 0x00de, 0x00ce, 0x080c, 0xb821,
-	0x080c, 0x31cc, 0x00e6, 0x0126, 0x2091, 0x8000, 0x080c, 0x31f5,
-	0x6017, 0x0000, 0x6023, 0x0007, 0x601b, 0x0398, 0x6043, 0x0000,
-	0x012e, 0x00ee, 0x0005, 0x080c, 0xb290, 0x1904, 0xca48, 0x0005,
-	0x6000, 0x908a, 0x0016, 0x1a0c, 0x0dd5, 0x0096, 0x00d6, 0x001b,
-	0x00de, 0x009e, 0x0005, 0xcab3, 0xcab3, 0xcab3, 0xcab3, 0xcab3,
-	0xcab3, 0xcab3, 0xcab3, 0xcab3, 0xc863, 0xcab3, 0xc86a, 0xcab5,
-	0xc86a, 0xcacf, 0xcab3, 0x080c, 0x0dd5, 0x6004, 0x9086, 0x008b,
-	0x01b0, 0x6034, 0x908c, 0xff00, 0x810f, 0x9186, 0x0035, 0x1130,
-	0x602c, 0x9080, 0x0009, 0x200c, 0xc185, 0x2102, 0x6007, 0x008b,
-	0x6003, 0x000d, 0x080c, 0x90f8, 0x080c, 0x96a6, 0x0005, 0x080c,
-	0xd24e, 0x0118, 0x080c, 0xd261, 0x0010, 0x080c, 0xd26f, 0x080c,
-	0xcd43, 0x080c, 0xcb5a, 0x0570, 0x080c, 0x31cc, 0x080c, 0xcb5a,
-	0x0168, 0x6014, 0x2048, 0xa867, 0x0103, 0xa87b, 0x0006, 0xa877,
-	0x0000, 0xa880, 0xc0ed, 0xa882, 0x080c, 0x6c94, 0x2c68, 0x080c,
-	0xae09, 0x0150, 0x6810, 0x6012, 0x080c, 0xcfd4, 0x00c6, 0x2d60,
-	0x080c, 0xae90, 0x00ce, 0x0008, 0x2d60, 0x6017, 0x0000, 0x6023,
-	0x0001, 0x6007, 0x0001, 0x6003, 0x0001, 0x080c, 0x9140, 0x080c,
-	0x96a6, 0x00c8, 0x080c, 0xd24e, 0x0138, 0x6034, 0x9086, 0x4000,
-	0x1118, 0x080c, 0x31cc, 0x08d0, 0x6034, 0x908c, 0xff00, 0x810f,
-	0x9186, 0x0039, 0x0118, 0x9186, 0x0035, 0x1118, 0x080c, 0x31cc,
-	0x0868, 0x080c, 0xae90, 0x0005, 0x6000, 0x908a, 0x0016, 0x1a0c,
-	0x0dd5, 0x0002, 0xcb3a, 0xcb3a, 0xcb3c, 0xcb3c, 0xcb3c, 0xcb3a,
-	0xcb3a, 0xae90, 0xcb3a, 0xcb3a, 0xcb3a, 0xcb3a, 0xcb3a, 0xcb3a,
-	0xcb3a, 0xcb3a, 0x080c, 0x0dd5, 0x080c, 0xa7b7, 0x6114, 0x0096,
-	0x2148, 0xa87b, 0x0006, 0x080c, 0x6c94, 0x009e, 0x0804, 0xae5f,
-	0x9284, 0x0007, 0x1158, 0x9282, 0x1cd0, 0x0240, 0x2001, 0x181a,
-	0x2004, 0x9202, 0x1218, 0x9085, 0x0001, 0x0005, 0x9006, 0x0ce8,
-	0x0096, 0x0028, 0x0096, 0x0006, 0x6014, 0x2048, 0x000e, 0x0006,
-	0x9984, 0xf000, 0x9086, 0xf000, 0x0110, 0x080c, 0x10aa, 0x000e,
-	0x009e, 0x0005, 0x00e6, 0x00c6, 0x0036, 0x0006, 0x0126, 0x2091,
-	0x8000, 0x2061, 0x1cd0, 0x2071, 0x1800, 0x7354, 0x7074, 0x9302,
-	0x1640, 0x6020, 0x9206, 0x11f8, 0x080c, 0xd25a, 0x0180, 0x9286,
-	0x0001, 0x1168, 0x6004, 0x9086, 0x0004, 0x1148, 0x080c, 0x31cc,
-	0x080c, 0xd26f, 0x00c6, 0x080c, 0xae90, 0x00ce, 0x0060, 0x080c,
-	0xcf4e, 0x0148, 0x080c, 0xcd60, 0x1110, 0x080c, 0xb821, 0x00c6,
-	0x080c, 0xae5f, 0x00ce, 0x9ce0, 0x0018, 0x7068, 0x9c02, 0x1208,
-	0x08a0, 0x012e, 0x000e, 0x003e, 0x00ce, 0x00ee, 0x0005, 0x00e6,
-	0x00c6, 0x0016, 0x9188, 0x1000, 0x210c, 0x81ff, 0x0128, 0x2061,
-	0x1aaf, 0x6112, 0x080c, 0x31cc, 0x9006, 0x0010, 0x9085, 0x0001,
-	0x001e, 0x00ce, 0x00ee, 0x0005, 0x00c6, 0x0126, 0x2091, 0x8000,
-	0x080c, 0xae09, 0x01b0, 0x6656, 0x2b00, 0x6012, 0x080c, 0x56ea,
-	0x0118, 0x080c, 0xcc87, 0x0168, 0x080c, 0xcfd4, 0x6023, 0x0003,
-	0x2009, 0x004b, 0x080c, 0xaeda, 0x9085, 0x0001, 0x012e, 0x00ce,
-	0x0005, 0x9006, 0x0cd8, 0x00c6, 0x0126, 0x2091, 0x8000, 0xbaa0,
-	0x080c, 0xaead, 0x0560, 0x6057, 0x0000, 0x2b00, 0x6012, 0x080c,
-	0xcfd4, 0x6023, 0x0003, 0x0016, 0x080c, 0x929d, 0x0076, 0x903e,
-	0x080c, 0x9170, 0x2c08, 0x080c, 0xe326, 0x007e, 0x001e, 0xd184,
-	0x0128, 0x080c, 0xae5f, 0x9085, 0x0001, 0x0070, 0x080c, 0x56ea,
-	0x0128, 0xd18c, 0x1170, 0x080c, 0xcc87, 0x0148, 0x2009, 0x004c,
-	0x080c, 0xaeda, 0x9085, 0x0001, 0x012e, 0x00ce, 0x0005, 0x9006,
-	0x0cd8, 0x2900, 0x6016, 0x0c90, 0x2009, 0x004d, 0x0010, 0x2009,
-	0x004e, 0x00f6, 0x00c6, 0x0046, 0x0016, 0x080c, 0xae09, 0x2c78,
-	0x0590, 0x7e56, 0x2b00, 0x7812, 0x7823, 0x0003, 0x2021, 0x0005,
-	0x080c, 0xcc99, 0x9186, 0x004d, 0x0118, 0x9186, 0x004e, 0x0148,
-	0x2001, 0x197f, 0x200c, 0xd1fc, 0x0168, 0x2f60, 0x080c, 0xae5f,
-	0x00d0, 0x2001, 0x197e, 0x200c, 0xd1fc, 0x0120, 0x2f60, 0x080c,
-	0xae5f, 0x0088, 0x2f60, 0x080c, 0x56ea, 0x0138, 0xd18c, 0x1118,
-	0x04f1, 0x0148, 0x0010, 0x2900, 0x7816, 0x001e, 0x0016, 0x080c,
-	0xaeda, 0x9085, 0x0001, 0x001e, 0x004e, 0x00ce, 0x00fe, 0x0005,
-	0x00f6, 0x00c6, 0x0046, 0x080c, 0xae09, 0x2c78, 0x0508, 0x7e56,
-	0x2b00, 0x7812, 0x7823, 0x0003, 0x0096, 0x2021, 0x0004, 0x0489,
-	0x009e, 0x2001, 0x197d, 0x200c, 0xd1fc, 0x0120, 0x2f60, 0x080c,
-	0xae5f, 0x0060, 0x2f60, 0x080c, 0x56ea, 0x0120, 0xd18c, 0x1160,
-	0x0071, 0x0130, 0x2009, 0x0052, 0x080c, 0xaeda, 0x9085, 0x0001,
-	0x004e, 0x00ce, 0x00fe, 0x0005, 0x2900, 0x7816, 0x0c98, 0x00c6,
-	0x080c, 0x4abe, 0x00ce, 0x1120, 0x080c, 0xae5f, 0x9006, 0x0005,
-	0xa867, 0x0000, 0xa86b, 0x8000, 0x2900, 0x6016, 0x9085, 0x0001,
-	0x0005, 0x0096, 0x0076, 0x0126, 0x2091, 0x8000, 0x080c, 0x674a,
-	0x0158, 0x2001, 0xcc9e, 0x0006, 0x900e, 0x2400, 0x080c, 0x6ec7,
-	0x080c, 0x6c94, 0x000e, 0x0807, 0x2418, 0x080c, 0x9534, 0xbaa0,
-	0x0086, 0x2041, 0x0001, 0x2039, 0x0001, 0x2608, 0x080c, 0x92b5,
-	0x008e, 0x080c, 0x9170, 0x2f08, 0x2648, 0x080c, 0xe326, 0xb93c,
-	0x81ff, 0x090c, 0x9386, 0x080c, 0x96a6, 0x012e, 0x007e, 0x009e,
-	0x0005, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0xae09, 0x0190,
-	0x660a, 0x2b08, 0x6112, 0x080c, 0xcfd4, 0x6023, 0x0001, 0x2900,
-	0x6016, 0x2009, 0x001f, 0x080c, 0xaeda, 0x9085, 0x0001, 0x012e,
-	0x00ce, 0x0005, 0x9006, 0x0cd8, 0x00c6, 0x0126, 0x2091, 0x8000,
-	0x080c, 0xaead, 0x01b8, 0x660a, 0x2b08, 0x6112, 0x080c, 0xcfd4,
-	0x6023, 0x0008, 0x2900, 0x6016, 0x00f6, 0x2c78, 0x080c, 0x1727,
-	0x00fe, 0x2009, 0x0021, 0x080c, 0xaeda, 0x9085, 0x0001, 0x012e,
-	0x00ce, 0x0005, 0x9006, 0x0cd8, 0x2009, 0x003d, 0x00c6, 0x0126,
-	0x0016, 0x2091, 0x8000, 0x080c, 0xae09, 0x0198, 0x660a, 0x2b08,
-	0x6112, 0x080c, 0xcfd4, 0x6023, 0x0001, 0x2900, 0x6016, 0x001e,
-	0x0016, 0x080c, 0xaeda, 0x9085, 0x0001, 0x001e, 0x012e, 0x00ce,
-	0x0005, 0x9006, 0x0cd0, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c,
-	0xaead, 0x0188, 0x2b08, 0x6112, 0x080c, 0xcfd4, 0x6023, 0x0001,
-	0x2900, 0x6016, 0x2009, 0x0000, 0x080c, 0xaeda, 0x9085, 0x0001,
-	0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x2009, 0x0044, 0x0830,
-	0x2009, 0x0049, 0x0818, 0x0026, 0x00b6, 0x6210, 0x2258, 0xba3c,
-	0x82ff, 0x0110, 0x8211, 0xba3e, 0x00be, 0x002e, 0x0005, 0x0006,
-	0x0016, 0x6004, 0x908e, 0x0002, 0x0140, 0x908e, 0x0003, 0x0128,
-	0x908e, 0x0004, 0x0110, 0x9085, 0x0001, 0x001e, 0x000e, 0x0005,
-	0x0006, 0x0086, 0x0096, 0x6020, 0x9086, 0x0004, 0x01a8, 0x6014,
-	0x904d, 0x080c, 0xcb5a, 0x0180, 0xa864, 0x9086, 0x0139, 0x0170,
-	0x6020, 0x90c6, 0x0003, 0x0140, 0x90c6, 0x0002, 0x0128, 0xa868,
-	0xd0fc, 0x0110, 0x9006, 0x0010, 0x9085, 0x0001, 0x009e, 0x008e,
-	0x000e, 0x0005, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0xaead,
-	0x0198, 0x2b08, 0x6112, 0x080c, 0xcfd4, 0x6023, 0x0001, 0x2900,
-	0x6016, 0x080c, 0x31cc, 0x2009, 0x0028, 0x080c, 0xaeda, 0x9085,
-	0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x9186, 0x0015,
-	0x11a8, 0x2011, 0x1824, 0x2204, 0x9086, 0x0074, 0x1178, 0x00b6,
-	0x080c, 0xba75, 0x00be, 0x080c, 0xbc98, 0x6003, 0x0001, 0x6007,
-	0x0029, 0x080c, 0x9140, 0x080c, 0x96a6, 0x0078, 0x6014, 0x0096,
-	0x2048, 0xa868, 0x009e, 0xd0fc, 0x0148, 0x2001, 0x0001, 0x080c,
-	0xd193, 0x080c, 0xb821, 0x080c, 0xae5f, 0x0005, 0x0096, 0x6014,
-	0x904d, 0x090c, 0x0dd5, 0xa87b, 0x0030, 0xa883, 0x0000, 0xa897,
-	0x4005, 0xa89b, 0x0004, 0xa867, 0x0139, 0x0126, 0x2091, 0x8000,
-	0x080c, 0x6c94, 0x012e, 0x009e, 0x080c, 0xae5f, 0x0c30, 0x0096,
-	0x9186, 0x0016, 0x1128, 0x2001, 0x0004, 0x080c, 0x6566, 0x00e8,
-	0x9186, 0x0015, 0x1510, 0x2011, 0x1824, 0x2204, 0x9086, 0x0014,
-	0x11e0, 0x6010, 0x00b6, 0x2058, 0x080c, 0x66b1, 0x00be, 0x080c,
-	0xbd69, 0x1198, 0x6010, 0x00b6, 0x2058, 0xb890, 0x00be, 0x9005,
-	0x0160, 0x2001, 0x0006, 0x080c, 0x6566, 0x6014, 0x2048, 0xa868,
-	0xd0fc, 0x0170, 0x080c, 0xb264, 0x0048, 0x6014, 0x2048, 0xa868,
-	0xd0fc, 0x0528, 0x080c, 0xb821, 0x080c, 0xae5f, 0x009e, 0x0005,
-	0x6014, 0x6310, 0x2358, 0x904d, 0x090c, 0x0dd5, 0xa87b, 0x0000,
-	0xa883, 0x0000, 0xa897, 0x4000, 0x900e, 0x080c, 0x6836, 0x1108,
-	0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d, 0xa99a, 0x0126, 0x2091,
-	0x8000, 0x080c, 0x6c94, 0x012e, 0x080c, 0xae5f, 0x08f8, 0x6014,
-	0x904d, 0x090c, 0x0dd5, 0xa87b, 0x0030, 0xa883, 0x0000, 0xa897,
-	0x4005, 0xa89b, 0x0004, 0xa867, 0x0139, 0x0126, 0x2091, 0x8000,
-	0x080c, 0x6c94, 0x012e, 0x080c, 0xae5f, 0x0840, 0xa878, 0x9086,
-	0x0005, 0x1108, 0x0009, 0x0005, 0xa880, 0xc0ad, 0xa882, 0x0005,
-	0x6043, 0x0000, 0x6017, 0x0000, 0x6003, 0x0001, 0x6007, 0x0050,
-	0x080c, 0x90f8, 0x080c, 0x96a6, 0x0005, 0x00c6, 0x6010, 0x00b6,
-	0x2058, 0xb800, 0x00be, 0xd0bc, 0x0120, 0x6020, 0x9084, 0x000f,
-	0x0013, 0x00ce, 0x0005, 0xc863, 0xce84, 0xce84, 0xce87, 0xe638,
-	0xe653, 0xe656, 0xc863, 0xc863, 0xc863, 0xc863, 0xc863, 0xc863,
-	0xc863, 0xc863, 0x080c, 0x0dd5, 0xa001, 0xa001, 0x0005, 0x0096,
-	0x6014, 0x904d, 0x0118, 0xa87c, 0xd0e4, 0x1110, 0x009e, 0x0010,
-	0x009e, 0x0005, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc,
-	0x0550, 0x2001, 0x1834, 0x2004, 0x9005, 0x1540, 0x00f6, 0x2c78,
-	0x080c, 0xae09, 0x0508, 0x7810, 0x6012, 0x080c, 0xcfd4, 0x7820,
-	0x9086, 0x0003, 0x0128, 0x7808, 0x603a, 0x2f00, 0x603e, 0x0020,
-	0x7808, 0x603e, 0x2f00, 0x603a, 0x602e, 0x6023, 0x0001, 0x6007,
-	0x0035, 0x6003, 0x0001, 0x7954, 0x6156, 0x080c, 0x90f8, 0x080c,
-	0x96a6, 0x2f60, 0x00fe, 0x0005, 0x2f60, 0x00fe, 0x2001, 0x1987,
-	0x2004, 0x6042, 0x0005, 0x0016, 0x0096, 0x6814, 0x2048, 0xa87c,
-	0xd0e4, 0x0180, 0xc0e4, 0xa87e, 0xa877, 0x0000, 0xa893, 0x0000,
-	0xa88f, 0x0000, 0xd0cc, 0x0130, 0xc0cc, 0xa87e, 0xa878, 0x2048,
-	0x080c, 0x0fb1, 0x6830, 0x6036, 0x908e, 0x0001, 0x0148, 0x6803,
-	0x0002, 0x9086, 0x0005, 0x0170, 0x9006, 0x602e, 0x6032, 0x00d0,
-	0x681c, 0xc085, 0x681e, 0x6803, 0x0004, 0x6824, 0xc0f4, 0x9085,
-	0x0c00, 0x6826, 0x6814, 0x2048, 0xa8ac, 0x6938, 0x9102, 0xa8b0,
-	0x693c, 0x9103, 0x1e48, 0x683c, 0x602e, 0x6838, 0x9084, 0xfffc,
-	0x683a, 0x6032, 0x2d00, 0x603a, 0x6808, 0x603e, 0x6910, 0x6112,
-	0x6954, 0x6156, 0x6023, 0x0001, 0x6007, 0x0039, 0x6003, 0x0001,
-	0x080c, 0x90f8, 0x080c, 0x96a6, 0x009e, 0x001e, 0x0005, 0x6024,
-	0xd0d4, 0x0510, 0xd0f4, 0x11f8, 0x6038, 0x940a, 0x603c, 0x9303,
-	0x0230, 0x9105, 0x0120, 0x6024, 0xc0d4, 0xc0f5, 0x0098, 0x643a,
-	0x633e, 0xac3e, 0xab42, 0x0046, 0x0036, 0x2400, 0xacac, 0x9402,
-	0xa836, 0x2300, 0xabb0, 0x9303, 0xa83a, 0x003e, 0x004e, 0x6024,
-	0xc0d4, 0x0000, 0x6026, 0x0005, 0xd0f4, 0x1138, 0xa83c, 0x603a,
-	0xa840, 0x603e, 0x6024, 0xc0f5, 0x6026, 0x0005, 0x0006, 0x0016,
-	0x6004, 0x908e, 0x0034, 0x01b8, 0x908e, 0x0035, 0x01a0, 0x908e,
-	0x0036, 0x0188, 0x908e, 0x0037, 0x0170, 0x908e, 0x0038, 0x0158,
-	0x908e, 0x0039, 0x0140, 0x908e, 0x003a, 0x0128, 0x908e, 0x003b,
-	0x0110, 0x9085, 0x0001, 0x001e, 0x000e, 0x0005, 0x0006, 0x0016,
-	0x0026, 0x0036, 0x00e6, 0x2001, 0x1981, 0x200c, 0x8000, 0x2014,
-	0x2001, 0x0032, 0x080c, 0x8f70, 0x2001, 0x1985, 0x82ff, 0x1110,
-	0x2011, 0x0014, 0x2202, 0x2001, 0x1983, 0x200c, 0x8000, 0x2014,
-	0x2071, 0x196b, 0x711a, 0x721e, 0x2001, 0x0064, 0x080c, 0x8f70,
-	0x2001, 0x1986, 0x82ff, 0x1110, 0x2011, 0x0014, 0x2202, 0x2001,
-	0x1987, 0x9288, 0x000a, 0x2102, 0x2001, 0x1a90, 0x2102, 0x2001,
-	0x0032, 0x080c, 0x15f0, 0x080c, 0x696a, 0x00ee, 0x003e, 0x002e,
-	0x001e, 0x000e, 0x0005, 0x0006, 0x0016, 0x00e6, 0x2001, 0x1985,
-	0x2003, 0x0028, 0x2001, 0x1986, 0x2003, 0x0014, 0x2071, 0x196b,
-	0x701b, 0x0000, 0x701f, 0x07d0, 0x2001, 0x1987, 0x2009, 0x001e,
-	0x2102, 0x2001, 0x1a90, 0x2102, 0x2001, 0x0032, 0x080c, 0x15f0,
-	0x00ee, 0x001e, 0x000e, 0x0005, 0x0096, 0x6058, 0x904d, 0x0110,
-	0x080c, 0x1031, 0x009e, 0x0005, 0x0005, 0x00c6, 0x0126, 0x2091,
-	0x8000, 0x080c, 0xae09, 0x0180, 0x2b08, 0x6112, 0x0ca9, 0x6023,
-	0x0001, 0x2900, 0x6016, 0x2009, 0x0033, 0x080c, 0xaeda, 0x9085,
-	0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x0096, 0x00e6,
-	0x00f6, 0x2071, 0x1800, 0x9186, 0x0015, 0x1500, 0x7090, 0x9086,
-	0x0018, 0x11e0, 0x6014, 0x2048, 0xaa3c, 0xd2e4, 0x1160, 0x2c78,
-	0x080c, 0x993c, 0x01d8, 0x707c, 0xaa50, 0x9206, 0x1160, 0x7080,
-	0xaa54, 0x9206, 0x1140, 0x6210, 0x00b6, 0x2258, 0xbaa0, 0x00be,
-	0x900e, 0x080c, 0x3215, 0x080c, 0xb264, 0x0020, 0x080c, 0xb821,
-	0x080c, 0xae5f, 0x00fe, 0x00ee, 0x009e, 0x0005, 0x7060, 0xaa54,
-	0x9206, 0x0d48, 0x0c80, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c,
-	0xae09, 0x0188, 0x2b08, 0x6112, 0x080c, 0xcfd4, 0x6023, 0x0001,
-	0x2900, 0x6016, 0x2009, 0x004d, 0x080c, 0xaeda, 0x9085, 0x0001,
-	0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x00c6, 0x0126, 0x2091,
-	0x8000, 0x0016, 0x080c, 0xae09, 0x0180, 0x2b08, 0x6112, 0x080c,
-	0xcfd4, 0x6023, 0x0001, 0x2900, 0x6016, 0x001e, 0x080c, 0xaeda,
-	0x9085, 0x0001, 0x012e, 0x00ce, 0x0005, 0x001e, 0x9006, 0x0cd0,
-	0x0016, 0x0026, 0x0036, 0x0046, 0x0056, 0x0066, 0x0096, 0x00e6,
-	0x00f6, 0x2071, 0x1800, 0x9186, 0x0015, 0x1568, 0x7190, 0x6014,
-	0x2048, 0xa814, 0x8003, 0x9106, 0x1530, 0x20e1, 0x0000, 0x2001,
-	0x199f, 0x2003, 0x0000, 0x6014, 0x2048, 0xa830, 0x20a8, 0x8906,
-	0x8006, 0x8007, 0x9094, 0x003f, 0x22e8, 0x9084, 0xffc0, 0x9080,
-	0x001b, 0x20a0, 0x2001, 0x199f, 0x0016, 0x200c, 0x080c, 0xd84a,
-	0x001e, 0xa804, 0x9005, 0x0110, 0x2048, 0x0c38, 0x6014, 0x2048,
-	0xa867, 0x0103, 0x0010, 0x080c, 0xb821, 0x080c, 0xae5f, 0x00fe,
-	0x00ee, 0x009e, 0x006e, 0x005e, 0x004e, 0x003e, 0x002e, 0x001e,
-	0x0005, 0x0096, 0x00e6, 0x00f6, 0x2071, 0x1800, 0x9186, 0x0015,
-	0x11b8, 0x7090, 0x9086, 0x0004, 0x1198, 0x6014, 0x2048, 0x2c78,
-	0x080c, 0x993c, 0x01a8, 0x707c, 0xaa74, 0x9206, 0x1130, 0x7080,
-	0xaa78, 0x9206, 0x1110, 0x080c, 0x31cc, 0x080c, 0xb264, 0x0020,
-	0x080c, 0xb821, 0x080c, 0xae5f, 0x00fe, 0x00ee, 0x009e, 0x0005,
-	0x7060, 0xaa78, 0x9206, 0x0d78, 0x0c80, 0x0096, 0x00e6, 0x00f6,
-	0x2071, 0x1800, 0x9186, 0x0015, 0x1550, 0x7090, 0x9086, 0x0004,
-	0x1530, 0x6014, 0x2048, 0x2c78, 0x080c, 0x993c, 0x05f0, 0x707c,
-	0xaacc, 0x9206, 0x1180, 0x7080, 0xaad0, 0x9206, 0x1160, 0x080c,
-	0x31cc, 0x0016, 0xa998, 0xaab0, 0x9284, 0x1000, 0xc0fd, 0x080c,
-	0x569a, 0x001e, 0x0010, 0x080c, 0x548b, 0x080c, 0xcb5a, 0x0508,
-	0xa87b, 0x0000, 0xa883, 0x0000, 0xa897, 0x4000, 0x0080, 0x080c,
-	0xcb5a, 0x01b8, 0x6014, 0x2048, 0x080c, 0x548b, 0x1d70, 0xa87b,
-	0x0030, 0xa883, 0x0000, 0xa897, 0x4005, 0xa89b, 0x0004, 0x0126,
-	0x2091, 0x8000, 0xa867, 0x0139, 0x080c, 0x6c94, 0x012e, 0x080c,
-	0xae5f, 0x00fe, 0x00ee, 0x009e, 0x0005, 0x7060, 0xaad0, 0x9206,
-	0x0930, 0x0888, 0x0016, 0x0026, 0xa87c, 0xd0ac, 0x0178, 0xa938,
-	0xaa34, 0x2100, 0x9205, 0x0150, 0xa890, 0x9106, 0x1118, 0xa88c,
-	0x9206, 0x0120, 0xa992, 0xaa8e, 0x9085, 0x0001, 0x002e, 0x001e,
-	0x0005, 0x00b6, 0x00d6, 0x0036, 0x080c, 0xcb5a, 0x0904, 0xd18f,
-	0x0096, 0x6314, 0x2348, 0xa87a, 0xa982, 0x929e, 0x4000, 0x1580,
-	0x6310, 0x00c6, 0x2358, 0x2009, 0x0000, 0xa868, 0xd0f4, 0x1140,
-	0x080c, 0x6836, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d,
-	0xaa96, 0xa99a, 0x20a9, 0x0004, 0xa860, 0x20e8, 0xa85c, 0x9080,
-	0x0031, 0x20a0, 0xb8c4, 0x20e0, 0xb8c8, 0x9080, 0x0006, 0x2098,
-	0x080c, 0x0f7c, 0x20a9, 0x0004, 0xa85c, 0x9080, 0x0035, 0x20a0,
-	0xb8c8, 0x9080, 0x000a, 0x2098, 0x080c, 0x0f7c, 0x00ce, 0x0090,
-	0xaa96, 0x3918, 0x9398, 0x0007, 0x231c, 0x6004, 0x9086, 0x0016,
-	0x0110, 0xa89b, 0x0004, 0xaba2, 0x6310, 0x2358, 0xb804, 0x9084,
-	0x00ff, 0xa89e, 0x080c, 0x6c88, 0x6017, 0x0000, 0x009e, 0x003e,
-	0x00de, 0x00be, 0x0005, 0x0026, 0x0036, 0x0046, 0x00b6, 0x0096,
-	0x00f6, 0x6214, 0x2248, 0x6210, 0x2258, 0x2079, 0x0260, 0x9096,
-	0x0000, 0x11a0, 0xb814, 0x9084, 0x00ff, 0x900e, 0x080c, 0x284b,
-	0x2118, 0x831f, 0x939c, 0xff00, 0x7838, 0x9084, 0x00ff, 0x931d,
-	0x7c3c, 0x2011, 0x8018, 0x080c, 0x4b1e, 0x00a8, 0x9096, 0x0001,
-	0x1148, 0x89ff, 0x0180, 0xa89b, 0x000d, 0x7838, 0xa8a6, 0x783c,
-	0xa8aa, 0x0048, 0x9096, 0x0002, 0x1130, 0xa89b, 0x000d, 0x7838,
-	0xa8a6, 0x783c, 0xa8aa, 0x00fe, 0x009e, 0x00be, 0x004e, 0x003e,
-	0x002e, 0x0005, 0x00c6, 0x0026, 0x0016, 0x9186, 0x0035, 0x0110,
-	0x6a38, 0x0008, 0x6a2c, 0x080c, 0xcb48, 0x01f0, 0x2260, 0x6120,
-	0x9186, 0x0003, 0x0118, 0x9186, 0x0006, 0x1190, 0x6838, 0x9206,
-	0x0140, 0x683c, 0x9206, 0x1160, 0x6108, 0x6838, 0x9106, 0x1140,
-	0x0020, 0x6008, 0x693c, 0x9106, 0x1118, 0x6010, 0x6910, 0x9106,
-	0x001e, 0x002e, 0x00ce, 0x0005, 0x9085, 0x0001, 0x0cc8, 0xa974,
-	0xd1cc, 0x0188, 0x918c, 0x00ff, 0x918e, 0x0002, 0x1160, 0xa9a8,
-	0x918c, 0x0f00, 0x810f, 0x918e, 0x0001, 0x1128, 0xa834, 0xa938,
-	0x9115, 0x190c, 0xc255, 0x0005, 0x0036, 0x2019, 0x0001, 0x0010,
-	0x0036, 0x901e, 0x0499, 0x01e0, 0x080c, 0xcb5a, 0x01c8, 0x080c,
-	0xcd43, 0x6037, 0x4000, 0x6014, 0x6017, 0x0000, 0x0096, 0x2048,
-	0xa87c, 0x080c, 0xcd60, 0x1118, 0x080c, 0xb821, 0x0040, 0xa867,
-	0x0103, 0xa877, 0x0000, 0x83ff, 0x1129, 0x080c, 0x6c94, 0x009e,
-	0x003e, 0x0005, 0xa880, 0xd0b4, 0x0128, 0xa87b, 0x0006, 0xc0ec,
-	0xa882, 0x0048, 0xd0bc, 0x0118, 0xa87b, 0x0002, 0x0020, 0xa87b,
-	0x0005, 0x080c, 0xce54, 0xa877, 0x0000, 0x0005, 0x2001, 0x1810,
-	0x2004, 0xd0ec, 0x0005, 0x0006, 0x2001, 0x1810, 0x2004, 0xd0f4,
-	0x000e, 0x0005, 0x0006, 0x2001, 0x1810, 0x2004, 0xd0e4, 0x000e,
-	0x0005, 0x0036, 0x0046, 0x6010, 0x00b6, 0x2058, 0xbba0, 0x00be,
-	0x2021, 0x0007, 0x080c, 0x4cd5, 0x004e, 0x003e, 0x0005, 0x0c51,
-	0x1d81, 0x0005, 0x2001, 0x1985, 0x2004, 0x601a, 0x0005, 0x2001,
-	0x1987, 0x2004, 0x6042, 0x0005, 0x080c, 0xae5f, 0x0804, 0x96a6,
-	0x00b6, 0x0066, 0x6000, 0x90b2, 0x0016, 0x1a0c, 0x0dd5, 0x001b,
-	0x006e, 0x00be, 0x0005, 0xd29b, 0xd9a7, 0xdb04, 0xd29b, 0xd29b,
-	0xd29b, 0xd29b, 0xd29b, 0xd2d2, 0xdb88, 0xd29b, 0xd29b, 0xd29b,
-	0xd29b, 0xd29b, 0xd29b, 0x080c, 0x0dd5, 0x0066, 0x6000, 0x90b2,
-	0x0016, 0x1a0c, 0x0dd5, 0x0013, 0x006e, 0x0005, 0xd2b6, 0xe0fa,
-	0xd2b6, 0xd2b6, 0xd2b6, 0xd2b6, 0xd2b6, 0xd2b6, 0xe0a7, 0xe14e,
-	0xd2b6, 0xe773, 0xe7a9, 0xe773, 0xe7a9, 0xd2b6, 0x080c, 0x0dd5,
-	0x6000, 0x9082, 0x0016, 0x1a0c, 0x0dd5, 0x6000, 0x000a, 0x0005,
-	0xd2d0, 0xdd66, 0xde58, 0xde7b, 0xdf3b, 0xd2d0, 0xe01a, 0xdfc3,
-	0xdb94, 0xe07d, 0xe092, 0xd2d0, 0xd2d0, 0xd2d0, 0xd2d0, 0xd2d0,
-	0x080c, 0x0dd5, 0x91b2, 0x0053, 0x1a0c, 0x0dd5, 0x2100, 0x91b2,
-	0x0040, 0x1a04, 0xd71b, 0x0002, 0xd31c, 0xd50c, 0xd31c, 0xd31c,
-	0xd31c, 0xd515, 0xd31c, 0xd31c, 0xd31c, 0xd31c, 0xd31c, 0xd31c,
-	0xd31c, 0xd31c, 0xd31c, 0xd31c, 0xd31c, 0xd31c, 0xd31c, 0xd31c,
-	0xd31c, 0xd31c, 0xd31c, 0xd31e, 0xd381, 0xd390, 0xd3f4, 0xd41f,
-	0xd498, 0xd4f7, 0xd31c, 0xd31c, 0xd518, 0xd31c, 0xd31c, 0xd52d,
-	0xd53a, 0xd31c, 0xd31c, 0xd31c, 0xd31c, 0xd31c, 0xd5bd, 0xd31c,
-	0xd31c, 0xd5d1, 0xd31c, 0xd31c, 0xd58c, 0xd31c, 0xd31c, 0xd31c,
-	0xd5e9, 0xd31c, 0xd31c, 0xd31c, 0xd666, 0xd31c, 0xd31c, 0xd31c,
-	0xd31c, 0xd31c, 0xd31c, 0xd6e3, 0x080c, 0x0dd5, 0x080c, 0x6947,
-	0x1150, 0x2001, 0x1837, 0x2004, 0xd0cc, 0x1128, 0x9084, 0x0009,
-	0x9086, 0x0008, 0x1140, 0x6007, 0x0009, 0x602f, 0x0009, 0x6017,
-	0x0000, 0x0804, 0xd505, 0x080c, 0x68e3, 0x00e6, 0x00c6, 0x0036,
-	0x0026, 0x0016, 0x6210, 0x2258, 0xbaa0, 0x0026, 0x2019, 0x0029,
-	0x080c, 0x929d, 0x0076, 0x903e, 0x080c, 0x9170, 0x2c08, 0x080c,
-	0xe326, 0x007e, 0x001e, 0x001e, 0x002e, 0x003e, 0x00ce, 0x00ee,
-	0x6610, 0x2658, 0x080c, 0x6625, 0xbe04, 0x9684, 0x00ff, 0x9082,
-	0x0006, 0x1268, 0x0016, 0x0026, 0x6210, 0x00b6, 0x2258, 0xbaa0,
-	0x00be, 0x2c08, 0x080c, 0xe9d2, 0x002e, 0x001e, 0x1178, 0x080c,
-	0xe258, 0x1904, 0xd3ec, 0x080c, 0xe1f4, 0x1120, 0x6007, 0x0008,
-	0x0804, 0xd505, 0x6007, 0x0009, 0x0804, 0xd505, 0x080c, 0xe47c,
-	0x0128, 0x080c, 0xe258, 0x0d78, 0x0804, 0xd3ec, 0x6017, 0x1900,
-	0x0c88, 0x080c, 0x32f0, 0x1904, 0xd718, 0x6106, 0x080c, 0xe1a9,
-	0x6007, 0x0006, 0x0804, 0xd505, 0x6007, 0x0007, 0x0804, 0xd505,
-	0x080c, 0xe7e5, 0x1904, 0xd718, 0x080c, 0x32f0, 0x1904, 0xd718,
-	0x00d6, 0x6610, 0x2658, 0xbe04, 0x9684, 0x00ff, 0x9082, 0x0006,
-	0x1220, 0x2001, 0x0001, 0x080c, 0x6552, 0x96b4, 0xff00, 0x8637,
-	0x9686, 0x0006, 0x0188, 0x9686, 0x0004, 0x0170, 0xbe04, 0x96b4,
-	0x00ff, 0x9686, 0x0006, 0x0140, 0x9686, 0x0004, 0x0128, 0x9686,
-	0x0005, 0x0110, 0x00de, 0x0480, 0x00e6, 0x2071, 0x0260, 0x7034,
-	0x9084, 0x0003, 0x1140, 0x7034, 0x9082, 0x0014, 0x0220, 0x7030,
-	0x9084, 0x0003, 0x0130, 0x00ee, 0x6017, 0x0000, 0x602f, 0x0007,
-	0x00b0, 0x00ee, 0x080c, 0xe2bc, 0x1190, 0x9686, 0x0006, 0x1140,
-	0x0026, 0x6210, 0x2258, 0xbaa0, 0x900e, 0x080c, 0x3215, 0x002e,
-	0x080c, 0x66b1, 0x6007, 0x000a, 0x00de, 0x0804, 0xd505, 0x6007,
-	0x000b, 0x00de, 0x0804, 0xd505, 0x080c, 0x31cc, 0x080c, 0xd26f,
-	0x6007, 0x0001, 0x0804, 0xd505, 0x080c, 0xe7e5, 0x1904, 0xd718,
-	0x080c, 0x32f0, 0x1904, 0xd718, 0x2071, 0x0260, 0x7034, 0x90b4,
-	0x0003, 0x1948, 0x90b2, 0x0014, 0x0a30, 0x7030, 0x9084, 0x0003,
-	0x1910, 0x6610, 0x2658, 0xbe04, 0x9686, 0x0707, 0x09e8, 0x0026,
-	0x6210, 0x2258, 0xbaa0, 0x900e, 0x080c, 0x3215, 0x002e, 0x6007,
-	0x000c, 0x2001, 0x0001, 0x080c, 0xe9b2, 0x0804, 0xd505, 0x080c,
-	0x6947, 0x1140, 0x2001, 0x1837, 0x2004, 0x9084, 0x0009, 0x9086,
-	0x0008, 0x1110, 0x0804, 0xd32b, 0x080c, 0x68e3, 0x6610, 0x2658,
-	0xbe04, 0x9684, 0x00ff, 0x9082, 0x0006, 0x06c8, 0x1138, 0x0026,
-	0x2001, 0x0006, 0x080c, 0x6592, 0x002e, 0x0050, 0x96b4, 0xff00,
-	0x8637, 0x9686, 0x0004, 0x0120, 0x9686, 0x0006, 0x1904, 0xd3ec,
-	0x080c, 0xe2c9, 0x1120, 0x6007, 0x000e, 0x0804, 0xd505, 0x0046,
-	0x6410, 0x2458, 0xbca0, 0x0046, 0x080c, 0x31cc, 0x080c, 0xd26f,
-	0x004e, 0x0016, 0x9006, 0x2009, 0x1848, 0x210c, 0xd1a4, 0x0148,
-	0x2009, 0x0029, 0x080c, 0xe5e9, 0x6010, 0x2058, 0xb800, 0xc0e5,
-	0xb802, 0x001e, 0x004e, 0x6007, 0x0001, 0x0804, 0xd505, 0x2001,
-	0x0001, 0x080c, 0x6552, 0x0156, 0x0016, 0x0026, 0x0036, 0x20a9,
-	0x0004, 0x2019, 0x1805, 0x2011, 0x0270, 0x080c, 0xbe19, 0x003e,
-	0x002e, 0x001e, 0x015e, 0x9005, 0x0168, 0x96b4, 0xff00, 0x8637,
-	0x9682, 0x0004, 0x0a04, 0xd3ec, 0x9682, 0x0007, 0x0a04, 0xd448,
-	0x0804, 0xd3ec, 0x6017, 0x1900, 0x6007, 0x0009, 0x0804, 0xd505,
-	0x080c, 0x6947, 0x1140, 0x2001, 0x1837, 0x2004, 0x9084, 0x0009,
-	0x9086, 0x0008, 0x1110, 0x0804, 0xd32b, 0x080c, 0x68e3, 0x6610,
-	0x2658, 0xbe04, 0x9684, 0x00ff, 0x0006, 0x9086, 0x0001, 0x000e,
-	0x0170, 0x9082, 0x0006, 0x0698, 0x0150, 0x96b4, 0xff00, 0x8637,
-	0x9686, 0x0004, 0x0120, 0x9686, 0x0006, 0x1904, 0xd3ec, 0x080c,
-	0xe2f7, 0x1130, 0x080c, 0xe1f4, 0x1118, 0x6007, 0x0010, 0x04e8,
-	0x0046, 0x6410, 0x2458, 0xbca0, 0x0046, 0x080c, 0x31cc, 0x080c,
-	0xd26f, 0x004e, 0x0016, 0x9006, 0x2009, 0x1848, 0x210c, 0xd1a4,
-	0x0148, 0x2009, 0x0029, 0x080c, 0xe5e9, 0x6010, 0x2058, 0xb800,
-	0xc0e5, 0xb802, 0x001e, 0x004e, 0x6007, 0x0001, 0x00f0, 0x080c,
-	0xe47c, 0x0140, 0x96b4, 0xff00, 0x8637, 0x9686, 0x0006, 0x0978,
-	0x0804, 0xd3ec, 0x6017, 0x1900, 0x6007, 0x0009, 0x0070, 0x080c,
-	0x32f0, 0x1904, 0xd718, 0x080c, 0xe7e5, 0x1904, 0xd718, 0x080c,
-	0xd8e5, 0x1904, 0xd3ec, 0x6007, 0x0012, 0x6003, 0x0001, 0x080c,
-	0x9140, 0x080c, 0x96a6, 0x0005, 0x6007, 0x0001, 0x6003, 0x0001,
-	0x080c, 0x9140, 0x080c, 0x96a6, 0x0cb0, 0x6007, 0x0005, 0x0c68,
-	0x080c, 0xe7e5, 0x1904, 0xd718, 0x080c, 0x32f0, 0x1904, 0xd718,
-	0x080c, 0xd8e5, 0x1904, 0xd3ec, 0x6007, 0x0020, 0x6003, 0x0001,
-	0x080c, 0x9140, 0x080c, 0x96a6, 0x0005, 0x080c, 0x32f0, 0x1904,
-	0xd718, 0x6007, 0x0023, 0x6003, 0x0001, 0x080c, 0x9140, 0x080c,
-	0x96a6, 0x0005, 0x080c, 0xe7e5, 0x1904, 0xd718, 0x080c, 0x32f0,
-	0x1904, 0xd718, 0x080c, 0xd8e5, 0x1904, 0xd3ec, 0x0016, 0x0026,
-	0x00e6, 0x2071, 0x0260, 0x7244, 0x9286, 0xffff, 0x0180, 0x2c08,
-	0x080c, 0xcb48, 0x01b0, 0x2260, 0x7240, 0x6008, 0x9206, 0x1188,
-	0x6010, 0x9190, 0x0004, 0x2214, 0x9206, 0x01b8, 0x0050, 0x7240,
-	0x2c08, 0x9006, 0x080c, 0xe5b3, 0x1180, 0x7244, 0x9286, 0xffff,
-	0x01b0, 0x2160, 0x6007, 0x0026, 0x6017, 0x1700, 0x7214, 0x9296,
-	0xffff, 0x1180, 0x6007, 0x0025, 0x0068, 0x6020, 0x9086, 0x0007,
-	0x1d80, 0x6004, 0x9086, 0x0024, 0x1110, 0x080c, 0xae5f, 0x2160,
-	0x6007, 0x0025, 0x6003, 0x0001, 0x080c, 0x9140, 0x080c, 0x96a6,
-	0x00ee, 0x002e, 0x001e, 0x0005, 0x2001, 0x0001, 0x080c, 0x6552,
-	0x0156, 0x0016, 0x0026, 0x0036, 0x20a9, 0x0004, 0x2019, 0x1805,
-	0x2011, 0x0276, 0x080c, 0xbe19, 0x003e, 0x002e, 0x001e, 0x015e,
-	0x0120, 0x6007, 0x0031, 0x0804, 0xd505, 0x080c, 0xba8d, 0x080c,
-	0x73b3, 0x1190, 0x0006, 0x0026, 0x0036, 0x080c, 0x73cd, 0x1138,
-	0x080c, 0x7699, 0x080c, 0x602d, 0x080c, 0x72e5, 0x0010, 0x080c,
-	0x738b, 0x003e, 0x002e, 0x000e, 0x0005, 0x080c, 0x32f0, 0x1904,
-	0xd718, 0x080c, 0xd8e5, 0x1904, 0xd3ec, 0x6106, 0x080c, 0xd901,
-	0x1120, 0x6007, 0x002b, 0x0804, 0xd505, 0x6007, 0x002c, 0x0804,
-	0xd505, 0x080c, 0xe7e5, 0x1904, 0xd718, 0x080c, 0x32f0, 0x1904,
-	0xd718, 0x080c, 0xd8e5, 0x1904, 0xd3ec, 0x6106, 0x080c, 0xd906,
-	0x1120, 0x6007, 0x002e, 0x0804, 0xd505, 0x6007, 0x002f, 0x0804,
-	0xd505, 0x080c, 0x32f0, 0x1904, 0xd718, 0x00e6, 0x00d6, 0x00c6,
-	0x6010, 0x2058, 0xb904, 0x9184, 0x00ff, 0x9086, 0x0006, 0x0158,
-	0x9184, 0xff00, 0x8007, 0x9086, 0x0006, 0x0128, 0x00ce, 0x00de,
-	0x00ee, 0x0804, 0xd50c, 0x080c, 0x56e6, 0xd0e4, 0x0904, 0xd663,
-	0x2071, 0x026c, 0x7010, 0x603a, 0x7014, 0x603e, 0x7108, 0x720c,
-	0x080c, 0x6985, 0x0140, 0x6010, 0x2058, 0xb810, 0x9106, 0x1118,
-	0xb814, 0x9206, 0x0510, 0x080c, 0x6981, 0x15b8, 0x2069, 0x1800,
-	0x6880, 0x9206, 0x1590, 0x687c, 0x9106, 0x1578, 0x7210, 0x080c,
-	0xcb48, 0x0590, 0x080c, 0xd7d0, 0x0578, 0x080c, 0xe665, 0x0560,
-	0x622e, 0x6007, 0x0036, 0x6003, 0x0001, 0x080c, 0x90f8, 0x080c,
-	0x96a6, 0x00ce, 0x00de, 0x00ee, 0x0005, 0x7214, 0x9286, 0xffff,
-	0x0150, 0x080c, 0xcb48, 0x01c0, 0x9280, 0x0002, 0x2004, 0x7110,
-	0x9106, 0x1190, 0x08e0, 0x7210, 0x2c08, 0x9085, 0x0001, 0x080c,
-	0xe5b3, 0x2c10, 0x2160, 0x0140, 0x0890, 0x6007, 0x0037, 0x602f,
-	0x0009, 0x6017, 0x1500, 0x08b8, 0x6007, 0x0037, 0x602f, 0x0003,
-	0x6017, 0x1700, 0x0880, 0x6007, 0x0012, 0x0868, 0x080c, 0x32f0,
-	0x1904, 0xd718, 0x6010, 0x2058, 0xb804, 0x9084, 0xff00, 0x8007,
-	0x9086, 0x0006, 0x1904, 0xd50c, 0x00e6, 0x00d6, 0x00c6, 0x080c,
-	0x56e6, 0xd0e4, 0x0904, 0xd6db, 0x2069, 0x1800, 0x2071, 0x026c,
-	0x7008, 0x603a, 0x720c, 0x623e, 0x9286, 0xffff, 0x1150, 0x7208,
-	0x00c6, 0x2c08, 0x9085, 0x0001, 0x080c, 0xe5b3, 0x2c10, 0x00ce,
-	0x05e8, 0x080c, 0xcb48, 0x05d0, 0x7108, 0x9280, 0x0002, 0x2004,
-	0x9106, 0x15a0, 0x00c6, 0x0026, 0x2260, 0x080c, 0xc76e, 0x002e,
-	0x00ce, 0x7118, 0x918c, 0xff00, 0x810f, 0x9186, 0x0001, 0x0178,
-	0x9186, 0x0005, 0x0118, 0x9186, 0x0007, 0x1198, 0x9280, 0x0005,
-	0x2004, 0x9005, 0x0170, 0x080c, 0xd7d0, 0x0904, 0xd65c, 0x0056,
-	0x7510, 0x7614, 0x080c, 0xe67e, 0x005e, 0x00ce, 0x00de, 0x00ee,
-	0x0005, 0x6007, 0x003b, 0x602f, 0x0009, 0x6017, 0x2a00, 0x6003,
-	0x0001, 0x080c, 0x90f8, 0x080c, 0x96a6, 0x0c78, 0x6007, 0x003b,
-	0x602f, 0x0003, 0x6017, 0x0300, 0x6003, 0x0001, 0x080c, 0x90f8,
-	0x080c, 0x96a6, 0x0c10, 0x6007, 0x003b, 0x602f, 0x000b, 0x6017,
-	0x0000, 0x0804, 0xd633, 0x00e6, 0x0026, 0x080c, 0x6947, 0x0550,
-	0x080c, 0x68e3, 0x080c, 0xe857, 0x1518, 0x2071, 0x1800, 0x70dc,
-	0x9085, 0x0003, 0x70de, 0x00f6, 0x2079, 0x0100, 0x72b0, 0x9284,
-	0x00ff, 0x707e, 0x78e6, 0x9284, 0xff00, 0x7280, 0x9205, 0x7082,
-	0x78ea, 0x00fe, 0x70e7, 0x0000, 0x080c, 0x6985, 0x0120, 0x2011,
-	0x19ff, 0x2013, 0x07d0, 0xd0ac, 0x1128, 0x080c, 0x2fa3, 0x0010,
-	0x080c, 0xe889, 0x002e, 0x00ee, 0x080c, 0xae5f, 0x0804, 0xd50b,
-	0x080c, 0xae5f, 0x0005, 0x2600, 0x0002, 0xd72f, 0xd760, 0xd771,
-	0xd72f, 0xd72f, 0xd731, 0xd782, 0xd72f, 0xd72f, 0xd72f, 0xd74e,
-	0xd72f, 0xd72f, 0xd72f, 0xd78d, 0xd79a, 0xd7cb, 0xd72f, 0x080c,
-	0x0dd5, 0x080c, 0xe7e5, 0x1d20, 0x080c, 0x32f0, 0x1d08, 0x080c,
-	0xd8e5, 0x1148, 0x7038, 0x6016, 0x6007, 0x0045, 0x6003, 0x0001,
-	0x080c, 0x9140, 0x0005, 0x080c, 0x31cc, 0x080c, 0xd26f, 0x6007,
-	0x0001, 0x6003, 0x0001, 0x080c, 0x9140, 0x0005, 0x080c, 0xe7e5,
-	0x1938, 0x080c, 0x32f0, 0x1920, 0x080c, 0xd8e5, 0x1d60, 0x703c,
-	0x6016, 0x6007, 0x004a, 0x6003, 0x0001, 0x080c, 0x9140, 0x0005,
-	0x080c, 0x32f0, 0x1904, 0xd718, 0x2009, 0x0041, 0x080c, 0xe892,
-	0x6007, 0x0047, 0x6003, 0x0001, 0x080c, 0x9140, 0x080c, 0x96a6,
-	0x0005, 0x080c, 0x32f0, 0x1904, 0xd718, 0x2009, 0x0042, 0x080c,
-	0xe892, 0x6007, 0x0047, 0x6003, 0x0001, 0x080c, 0x9140, 0x080c,
-	0x96a6, 0x0005, 0x080c, 0x32f0, 0x1904, 0xd718, 0x2009, 0x0046,
-	0x080c, 0xe892, 0x080c, 0xae5f, 0x0005, 0x080c, 0xd7ed, 0x0904,
-	0xd718, 0x6007, 0x004e, 0x6003, 0x0001, 0x080c, 0x9140, 0x080c,
-	0x96a6, 0x0005, 0x6007, 0x004f, 0x6017, 0x0000, 0x7134, 0x918c,
-	0x00ff, 0x81ff, 0x0508, 0x9186, 0x0001, 0x1160, 0x7140, 0x2001,
-	0x19bc, 0x2004, 0x9106, 0x11b0, 0x7144, 0x2001, 0x19bd, 0x2004,
-	0x9106, 0x0190, 0x9186, 0x0002, 0x1168, 0x2011, 0x0276, 0x20a9,
-	0x0004, 0x6010, 0x0096, 0x2048, 0x2019, 0x000a, 0x080c, 0xbe2d,
-	0x009e, 0x0110, 0x6017, 0x0001, 0x6003, 0x0001, 0x080c, 0x9140,
-	0x080c, 0x96a6, 0x0005, 0x6007, 0x0050, 0x703c, 0x6016, 0x0ca0,
-	0x0016, 0x00e6, 0x2071, 0x0260, 0x00b6, 0x00c6, 0x2260, 0x6010,
-	0x2058, 0xb8cc, 0xd084, 0x0150, 0x7128, 0x6048, 0x9106, 0x1120,
-	0x712c, 0x6044, 0x9106, 0x0110, 0x9006, 0x0010, 0x9085, 0x0001,
-	0x00ce, 0x00be, 0x00ee, 0x001e, 0x0005, 0x0016, 0x0096, 0x0086,
-	0x00e6, 0x01c6, 0x01d6, 0x0126, 0x2091, 0x8000, 0x2071, 0x1800,
-	0x7090, 0x908a, 0x00f9, 0x16e8, 0x20e1, 0x0000, 0x2001, 0x199f,
-	0x2003, 0x0000, 0x080c, 0x1018, 0x05a0, 0x2900, 0x6016, 0x7090,
-	0x8004, 0xa816, 0x908a, 0x001e, 0x02d0, 0xa833, 0x001e, 0x20a9,
-	0x001e, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x001b, 0x20a0, 0x2001,
-	0x199f, 0x0016, 0x200c, 0x0471, 0x001e, 0x2940, 0x080c, 0x1018,
-	0x01c0, 0x2900, 0xa006, 0x2100, 0x81ff, 0x0180, 0x0c18, 0xa832,
-	0x20a8, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x001b, 0x20a0, 0x2001,
-	0x199f, 0x0016, 0x200c, 0x00b1, 0x001e, 0x0000, 0x9085, 0x0001,
-	0x0048, 0x2071, 0x1800, 0x7093, 0x0000, 0x6014, 0x2048, 0x080c,
-	0x0fb1, 0x9006, 0x012e, 0x01de, 0x01ce, 0x00ee, 0x008e, 0x009e,
-	0x001e, 0x0005, 0x0006, 0x0016, 0x0026, 0x0036, 0x00c6, 0x918c,
-	0xffff, 0x11a8, 0x080c, 0x23b8, 0x2099, 0x026c, 0x2001, 0x0014,
-	0x3518, 0x9312, 0x1218, 0x23a8, 0x4003, 0x00f8, 0x20a8, 0x4003,
-	0x22a8, 0x8108, 0x080c, 0x23b8, 0x2099, 0x0260, 0x0ca8, 0x080c,
-	0x23b8, 0x2061, 0x199f, 0x6004, 0x2098, 0x6008, 0x3518, 0x9312,
-	0x1218, 0x23a8, 0x4003, 0x0048, 0x20a8, 0x4003, 0x22a8, 0x8108,
-	0x080c, 0x23b8, 0x2099, 0x0260, 0x0ca8, 0x2061, 0x199f, 0x2019,
-	0x0280, 0x3300, 0x931e, 0x0110, 0x6006, 0x0020, 0x2001, 0x0260,
+	0xc0cc, 0xa87e, 0x080c, 0xd32d, 0x001e, 0xa874, 0x0006, 0x2148,
+	0x080c, 0x0fb1, 0x001e, 0x0804, 0xc541, 0x0016, 0x00a6, 0x2150,
+	0xb174, 0x9184, 0x00ff, 0x90b6, 0x0002, 0x01e0, 0x9086, 0x0028,
+	0x1128, 0xa87b, 0x001c, 0xb07b, 0x001c, 0x00e0, 0xd1dc, 0x0158,
+	0xa87b, 0x0015, 0xb07b, 0x0015, 0x080c, 0xd250, 0x0118, 0xb174,
+	0xc1dc, 0xb176, 0x0078, 0xd1d4, 0x0128, 0xa87b, 0x0007, 0xb07b,
+	0x0007, 0x0040, 0xa87c, 0xd0ac, 0x0128, 0xa834, 0xa938, 0x9115,
+	0x190c, 0xc33d, 0xa890, 0xb092, 0xa88c, 0xb08e, 0xa87c, 0xb07e,
+	0x00ae, 0x080c, 0x0fb1, 0x009e, 0x080c, 0xd32d, 0xa974, 0x0016,
+	0x080c, 0xc827, 0x001e, 0x0468, 0xa867, 0x0103, 0xa974, 0x9184,
+	0x00ff, 0x90b6, 0x0002, 0x01b0, 0x9086, 0x0028, 0x1118, 0xa87b,
+	0x001c, 0x00d0, 0xd1dc, 0x0148, 0xa87b, 0x0015, 0x080c, 0xd250,
+	0x0118, 0xa974, 0xc1dc, 0xa976, 0x0078, 0xd1d4, 0x0118, 0xa87b,
+	0x0007, 0x0050, 0xa87b, 0x0000, 0xa87c, 0xd0ac, 0x0128, 0xa834,
+	0xa938, 0x9115, 0x190c, 0xc33d, 0xa974, 0x0016, 0x080c, 0x6b33,
+	0x001e, 0xd1e4, 0x1120, 0x080c, 0xaf43, 0x009e, 0x0005, 0x080c,
+	0xcf86, 0x0cd8, 0x6114, 0x0096, 0x2148, 0xa97c, 0xd1e4, 0x190c,
+	0x1a8d, 0x009e, 0x0005, 0x080c, 0x9657, 0x0010, 0x080c, 0x9713,
+	0x080c, 0xcc86, 0x01f0, 0x0096, 0x6114, 0x2148, 0x080c, 0xce8e,
+	0x1118, 0x080c, 0xb905, 0x00a0, 0xa867, 0x0103, 0x2009, 0x180c,
+	0x210c, 0xd18c, 0x11b8, 0xd184, 0x1190, 0x6108, 0xa97a, 0x918e,
+	0x0029, 0x1110, 0x080c, 0xea94, 0xa877, 0x0000, 0x080c, 0x6d17,
+	0x009e, 0x080c, 0xaf43, 0x080c, 0x9763, 0x0804, 0x9891, 0xa87b,
+	0x0004, 0x0c90, 0xa87b, 0x0004, 0x0c78, 0x9182, 0x0054, 0x1220,
+	0x9182, 0x0040, 0x0208, 0x000a, 0x0005, 0xc5a1, 0xc5a1, 0xc5a1,
+	0xc5a1, 0xc5a1, 0xc5a3, 0xc5a1, 0xc5a1, 0xc5a1, 0xc5a1, 0xc5a1,
+	0xc5a1, 0xc5a1, 0xc5a1, 0xc5a1, 0xc5a1, 0xc5a1, 0xc5a1, 0xc5a1,
+	0xc5a1, 0x080c, 0x0dd5, 0x080c, 0x5765, 0x01f8, 0x6014, 0x7144,
+	0x918c, 0x0fff, 0x9016, 0xd1c4, 0x0118, 0x7264, 0x9294, 0x00ff,
+	0x0096, 0x904d, 0x0188, 0xa87b, 0x0000, 0xa864, 0x9086, 0x0139,
+	0x0128, 0xa867, 0x0103, 0xa976, 0xaa96, 0x0030, 0xa897, 0x4000,
+	0xa99a, 0xaa9e, 0x080c, 0x6d17, 0x009e, 0x0804, 0xaf43, 0x9182,
+	0x0085, 0x0002, 0xc5d9, 0xc5d7, 0xc5d7, 0xc5e5, 0xc5d7, 0xc5d7,
+	0xc5d7, 0xc5d7, 0xc5d7, 0xc5d7, 0xc5d7, 0xc5d7, 0xc5d7, 0x080c,
+	0x0dd5, 0x6003, 0x0001, 0x6106, 0x080c, 0x91b1, 0x0126, 0x2091,
+	0x8000, 0x080c, 0x9763, 0x012e, 0x0005, 0x0026, 0x0056, 0x00d6,
+	0x00e6, 0x2071, 0x0260, 0x7224, 0x6216, 0x7220, 0x080c, 0xcc74,
+	0x01f8, 0x2268, 0x6800, 0x9086, 0x0000, 0x01d0, 0x6010, 0x6d10,
+	0x952e, 0x11b0, 0x00c6, 0x2d60, 0x00d6, 0x080c, 0xc898, 0x00de,
+	0x00ce, 0x0158, 0x702c, 0xd084, 0x1118, 0x080c, 0xc862, 0x0010,
+	0x6803, 0x0002, 0x6007, 0x0086, 0x0028, 0x080c, 0xc884, 0x0d90,
+	0x6007, 0x0087, 0x6003, 0x0001, 0x080c, 0x91b1, 0x080c, 0x9763,
+	0x7220, 0x080c, 0xcc74, 0x0178, 0x6810, 0x00b6, 0x2058, 0xb800,
+	0x00be, 0xd0bc, 0x0140, 0x6824, 0xd0ec, 0x0128, 0x00c6, 0x2d60,
+	0x080c, 0xcfc0, 0x00ce, 0x00ee, 0x00de, 0x005e, 0x002e, 0x0005,
+	0x9186, 0x0013, 0x1160, 0x6004, 0x908a, 0x0085, 0x0a0c, 0x0dd5,
+	0x908a, 0x0092, 0x1a0c, 0x0dd5, 0x9082, 0x0085, 0x00e2, 0x9186,
+	0x0027, 0x0120, 0x9186, 0x0014, 0x190c, 0x0dd5, 0x080c, 0x9657,
+	0x0096, 0x6014, 0x2048, 0x080c, 0xcc86, 0x0140, 0xa867, 0x0103,
+	0xa877, 0x0000, 0xa87b, 0x0029, 0x080c, 0x6d17, 0x009e, 0x080c,
+	0xaf74, 0x0804, 0x9763, 0xc668, 0xc66a, 0xc66a, 0xc668, 0xc668,
+	0xc668, 0xc668, 0xc668, 0xc668, 0xc668, 0xc668, 0xc668, 0xc668,
+	0x080c, 0x0dd5, 0x080c, 0x9657, 0x080c, 0xaf74, 0x080c, 0x9763,
+	0x0005, 0x9186, 0x0013, 0x1128, 0x6004, 0x9082, 0x0085, 0x2008,
+	0x04b8, 0x9186, 0x0027, 0x11f8, 0x080c, 0x9657, 0x080c, 0x321e,
+	0x080c, 0xd39d, 0x0096, 0x6014, 0x2048, 0x080c, 0xcc86, 0x0150,
+	0xa867, 0x0103, 0xa877, 0x0000, 0xa87b, 0x0029, 0x080c, 0x6d17,
+	0x080c, 0xce71, 0x009e, 0x080c, 0xaf43, 0x080c, 0x9763, 0x0005,
+	0x080c, 0xafd9, 0x0ce0, 0x9186, 0x0014, 0x1dd0, 0x080c, 0x9657,
+	0x0096, 0x6014, 0x2048, 0x080c, 0xcc86, 0x0d60, 0xa867, 0x0103,
+	0xa877, 0x0000, 0xa87b, 0x0006, 0xa880, 0xc0ec, 0xa882, 0x08f0,
+	0x0002, 0xc6c0, 0xc6be, 0xc6be, 0xc6be, 0xc6be, 0xc6be, 0xc6d8,
+	0xc6be, 0xc6be, 0xc6be, 0xc6be, 0xc6be, 0xc6be, 0x080c, 0x0dd5,
+	0x080c, 0x9657, 0x6034, 0x908c, 0xff00, 0x810f, 0x9186, 0x0039,
+	0x0118, 0x9186, 0x0035, 0x1118, 0x2001, 0x1985, 0x0010, 0x2001,
+	0x1986, 0x2004, 0x601a, 0x6003, 0x000c, 0x080c, 0x9763, 0x0005,
+	0x080c, 0x9657, 0x6034, 0x908c, 0xff00, 0x810f, 0x9186, 0x0039,
+	0x0118, 0x9186, 0x0035, 0x1118, 0x2001, 0x1985, 0x0010, 0x2001,
+	0x1986, 0x2004, 0x601a, 0x6003, 0x000e, 0x080c, 0x9763, 0x0005,
+	0x9182, 0x0092, 0x1220, 0x9182, 0x0085, 0x0208, 0x0012, 0x0804,
+	0xafd9, 0xc706, 0xc706, 0xc706, 0xc706, 0xc708, 0xc755, 0xc706,
+	0xc706, 0xc706, 0xc706, 0xc706, 0xc706, 0xc706, 0x080c, 0x0dd5,
+	0x0096, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x0168,
+	0x6034, 0x908c, 0xff00, 0x810f, 0x9186, 0x0039, 0x0118, 0x9186,
+	0x0035, 0x1118, 0x009e, 0x0804, 0xc769, 0x080c, 0xcc86, 0x1118,
+	0x080c, 0xce71, 0x0068, 0x6014, 0x2048, 0xa87c, 0xd0e4, 0x1110,
+	0x080c, 0xce71, 0xa867, 0x0103, 0x080c, 0xd368, 0x080c, 0x6d17,
+	0x00d6, 0x2c68, 0x080c, 0xaeed, 0x01d0, 0x6003, 0x0001, 0x6007,
+	0x001e, 0x600b, 0xffff, 0x2009, 0x026e, 0x210c, 0x613a, 0x2009,
+	0x026f, 0x210c, 0x613e, 0x6910, 0x6112, 0x080c, 0xd102, 0x6954,
+	0x6156, 0x6023, 0x0001, 0x080c, 0x91b1, 0x080c, 0x9763, 0x2d60,
+	0x00de, 0x080c, 0xaf43, 0x009e, 0x0005, 0x6010, 0x00b6, 0x2058,
+	0xb800, 0x00be, 0xd0bc, 0x05a0, 0x6034, 0x908c, 0xff00, 0x810f,
+	0x9186, 0x0035, 0x0130, 0x9186, 0x001e, 0x0118, 0x9186, 0x0039,
+	0x1538, 0x00d6, 0x2c68, 0x080c, 0xd300, 0x11f0, 0x080c, 0xaeed,
+	0x01d8, 0x6106, 0x6003, 0x0001, 0x6023, 0x0001, 0x6910, 0x6112,
+	0x692c, 0x612e, 0x6930, 0x6132, 0x6934, 0x918c, 0x00ff, 0x6136,
+	0x6938, 0x613a, 0x693c, 0x613e, 0x6954, 0x6156, 0x080c, 0xd102,
+	0x080c, 0x91b1, 0x080c, 0x9763, 0x2d60, 0x00de, 0x0804, 0xaf43,
+	0x0096, 0x6014, 0x2048, 0x080c, 0xcc86, 0x01c8, 0xa867, 0x0103,
+	0xa880, 0xd0b4, 0x0128, 0xc0ec, 0xa882, 0xa87b, 0x0006, 0x0048,
+	0xd0bc, 0x0118, 0xa87b, 0x0002, 0x0020, 0xa87b, 0x0005, 0x080c,
+	0xcf82, 0xa877, 0x0000, 0x080c, 0x6d17, 0x080c, 0xce71, 0x009e,
+	0x0804, 0xaf43, 0x0016, 0x0096, 0x6014, 0x2048, 0x080c, 0xcc86,
+	0x0140, 0xa867, 0x0103, 0xa87b, 0x0028, 0xa877, 0x0000, 0x080c,
+	0x6d17, 0x009e, 0x001e, 0x9186, 0x0013, 0x0148, 0x9186, 0x0014,
+	0x0130, 0x9186, 0x0027, 0x0118, 0x080c, 0xafd9, 0x0030, 0x080c,
+	0x9657, 0x080c, 0xaf74, 0x080c, 0x9763, 0x0005, 0x0056, 0x0066,
+	0x0096, 0x00a6, 0x2029, 0x0001, 0x9182, 0x0101, 0x1208, 0x0010,
+	0x2009, 0x0100, 0x2130, 0x8304, 0x9098, 0x0018, 0x2009, 0x0020,
+	0x2011, 0x0029, 0x080c, 0xc837, 0x96b2, 0x0020, 0xb004, 0x904d,
+	0x0110, 0x080c, 0x0fb1, 0x080c, 0x0fff, 0x0520, 0x8528, 0xa867,
+	0x0110, 0xa86b, 0x0000, 0x2920, 0xb406, 0x968a, 0x003d, 0x1228,
+	0x2608, 0x2011, 0x001b, 0x0499, 0x00a8, 0x96b2, 0x003c, 0x2009,
+	0x003c, 0x2950, 0x2011, 0x001b, 0x0451, 0x0c28, 0x2001, 0x0205,
+	0x2003, 0x0000, 0x00ae, 0x852f, 0x95ad, 0x0003, 0xb566, 0x95ac,
+	0x0000, 0x0048, 0x2001, 0x0205, 0x2003, 0x0000, 0x00ae, 0x852f,
+	0x95ad, 0x0003, 0xb566, 0x009e, 0x006e, 0x005e, 0x0005, 0x00a6,
+	0x89ff, 0x0158, 0xa804, 0x9055, 0x0130, 0xa807, 0x0000, 0x080c,
+	0x6d17, 0x2a48, 0x0cb8, 0x080c, 0x6d17, 0x00ae, 0x0005, 0x00f6,
+	0x2079, 0x0200, 0x7814, 0x9085, 0x0080, 0x7816, 0xd184, 0x0108,
+	0x8108, 0x810c, 0x20a9, 0x0001, 0xa860, 0x20e8, 0xa85c, 0x9200,
+	0x20a0, 0x20e1, 0x0000, 0x2300, 0x9e00, 0x2098, 0x4003, 0x8318,
+	0x9386, 0x0020, 0x1148, 0x2018, 0x2300, 0x9e00, 0x2098, 0x7814,
+	0x8000, 0x9085, 0x0080, 0x7816, 0x8109, 0x1d80, 0x7817, 0x0000,
+	0x00fe, 0x0005, 0x6920, 0x9186, 0x0003, 0x0118, 0x9186, 0x0002,
+	0x11d0, 0x00c6, 0x00d6, 0x00e6, 0x2d60, 0x0096, 0x6014, 0x2048,
+	0x080c, 0xcc86, 0x0150, 0x2001, 0x0006, 0xa980, 0xc1d5, 0x080c,
+	0x6f4a, 0x080c, 0x6d0b, 0x080c, 0xce71, 0x009e, 0x080c, 0xaf74,
+	0x00ee, 0x00de, 0x00ce, 0x0005, 0x00c6, 0x702c, 0xd084, 0x1170,
+	0x6008, 0x2060, 0x6020, 0x9086, 0x0002, 0x1140, 0x6104, 0x9186,
+	0x0085, 0x0118, 0x9186, 0x008b, 0x1108, 0x9006, 0x00ce, 0x0005,
+	0x0066, 0x0126, 0x2091, 0x8000, 0x2031, 0x0001, 0x6020, 0x9084,
+	0x000f, 0x0083, 0x012e, 0x006e, 0x0005, 0x0126, 0x2091, 0x8000,
+	0x0066, 0x2031, 0x0000, 0x6020, 0x9084, 0x000f, 0x001b, 0x006e,
+	0x012e, 0x0005, 0xc8d3, 0xc8d3, 0xc8ce, 0xc8f5, 0xc8c1, 0xc8ce,
+	0xc8f5, 0xc8ce, 0xc8c1, 0x8f95, 0xc8ce, 0xc8ce, 0xc8ce, 0xc8c1,
+	0xc8c1, 0x080c, 0x0dd5, 0x0036, 0x2019, 0x0010, 0x080c, 0xe2c0,
+	0x6023, 0x0006, 0x6003, 0x0007, 0x003e, 0x0005, 0x9006, 0x0005,
+	0x9085, 0x0001, 0x0005, 0x0096, 0x86ff, 0x11d8, 0x6014, 0x2048,
+	0x080c, 0xcc86, 0x01c0, 0xa864, 0x9086, 0x0139, 0x1128, 0xa87b,
+	0x0005, 0xa883, 0x0000, 0x0028, 0x900e, 0x2001, 0x0005, 0x080c,
+	0x6f4a, 0x080c, 0xcf82, 0x080c, 0x6d0b, 0x080c, 0xaf74, 0x9085,
+	0x0001, 0x009e, 0x0005, 0x9006, 0x0ce0, 0x6000, 0x908a, 0x0016,
+	0x1a0c, 0x0dd5, 0x0002, 0xc90b, 0xc93b, 0xc90d, 0xc95c, 0xc936,
+	0xc90b, 0xc8ce, 0xc8d3, 0xc8d3, 0xc8ce, 0xc8ce, 0xc8ce, 0xc8ce,
+	0xc8ce, 0xc8ce, 0xc8ce, 0x080c, 0x0dd5, 0x86ff, 0x1520, 0x6020,
+	0x9086, 0x0006, 0x0500, 0x0096, 0x6014, 0x2048, 0x080c, 0xcc86,
+	0x0168, 0xa87c, 0xd0cc, 0x0140, 0x0096, 0xc0cc, 0xa87e, 0xa878,
+	0x2048, 0x080c, 0x0fb1, 0x009e, 0x080c, 0xcf82, 0x009e, 0x080c,
+	0xd342, 0x6007, 0x0085, 0x6003, 0x000b, 0x6023, 0x0002, 0x080c,
+	0x91b1, 0x080c, 0x9763, 0x9085, 0x0001, 0x0005, 0x0066, 0x080c,
+	0x1aa1, 0x006e, 0x0890, 0x00e6, 0x2071, 0x19e6, 0x7024, 0x9c06,
+	0x1120, 0x080c, 0xa636, 0x00ee, 0x0840, 0x6020, 0x9084, 0x000f,
+	0x9086, 0x0006, 0x1150, 0x0086, 0x0096, 0x2049, 0x0001, 0x2c40,
+	0x080c, 0xa76b, 0x009e, 0x008e, 0x0010, 0x080c, 0xa533, 0x00ee,
+	0x1904, 0xc90d, 0x0804, 0xc8ce, 0x0036, 0x00e6, 0x2071, 0x19e6,
+	0x703c, 0x9c06, 0x1138, 0x901e, 0x080c, 0xa6ac, 0x00ee, 0x003e,
+	0x0804, 0xc90d, 0x080c, 0xa89b, 0x00ee, 0x003e, 0x1904, 0xc90d,
+	0x0804, 0xc8ce, 0x00c6, 0x6020, 0x9084, 0x000f, 0x0013, 0x00ce,
+	0x0005, 0xc98f, 0xca5a, 0xcbc4, 0xc999, 0xaf74, 0xc98f, 0xe2b2,
+	0xd3aa, 0xca5a, 0x8f67, 0xcc50, 0xc988, 0xc988, 0xc988, 0xc988,
+	0x080c, 0x0dd5, 0x080c, 0xce8e, 0x1110, 0x080c, 0xb905, 0x0005,
+	0x080c, 0x9657, 0x080c, 0x9763, 0x0804, 0xaf43, 0x601b, 0x0001,
+	0x0005, 0x080c, 0xcc86, 0x0130, 0x6014, 0x0096, 0x2048, 0x2c00,
+	0xa896, 0x009e, 0x6000, 0x908a, 0x0016, 0x1a0c, 0x0dd5, 0x0002,
+	0xc9b8, 0xc9ba, 0xc9de, 0xc9f2, 0xca18, 0xc9b8, 0xc98f, 0xc98f,
+	0xc98f, 0xc9f2, 0xc9f2, 0xc9b8, 0xc9b8, 0xc9b8, 0xc9b8, 0xc9fc,
+	0x080c, 0x0dd5, 0x00e6, 0x6014, 0x0096, 0x2048, 0xa880, 0xc0b5,
+	0xa882, 0x009e, 0x2071, 0x19e6, 0x7024, 0x9c06, 0x01a0, 0x080c,
+	0xa533, 0x080c, 0xd342, 0x6007, 0x0085, 0x6003, 0x000b, 0x6023,
+	0x0002, 0x2001, 0x1986, 0x2004, 0x601a, 0x080c, 0x91b1, 0x080c,
+	0x9763, 0x00ee, 0x0005, 0x601b, 0x0001, 0x0cd8, 0x0096, 0x6014,
+	0x2048, 0xa880, 0xc0b5, 0xa882, 0x009e, 0x080c, 0xd342, 0x6007,
+	0x0085, 0x6003, 0x000b, 0x6023, 0x0002, 0x080c, 0x91b1, 0x080c,
+	0x9763, 0x0005, 0x0096, 0x601b, 0x0001, 0x6014, 0x2048, 0xa880,
+	0xc0b5, 0xa882, 0x009e, 0x0005, 0x080c, 0x5765, 0x01b8, 0x6014,
+	0x0096, 0x904d, 0x0190, 0xa864, 0xa867, 0x0103, 0xa87b, 0x0006,
+	0x9086, 0x0139, 0x1150, 0xa867, 0x0139, 0xa87b, 0x0030, 0xa897,
+	0x4005, 0xa89b, 0x0004, 0x080c, 0x6d17, 0x009e, 0x0804, 0xaf43,
+	0x6014, 0x0096, 0x904d, 0x05c8, 0xa97c, 0xd1e4, 0x05b0, 0x2001,
+	0x180f, 0x2004, 0xd0c4, 0x0110, 0x009e, 0x0005, 0xa884, 0x009e,
+	0x8003, 0x800b, 0x810b, 0x9108, 0x611a, 0x2001, 0x0030, 0x2c08,
+	0x080c, 0x15fd, 0x2001, 0x030c, 0x2004, 0x9086, 0x0041, 0x11a0,
+	0x6014, 0x0096, 0x904d, 0x090c, 0x0dd5, 0xa880, 0xd0f4, 0x1130,
+	0xc0f5, 0xa882, 0x009e, 0x601b, 0x0002, 0x0070, 0x009e, 0x2001,
+	0x0037, 0x2c08, 0x080c, 0x15fd, 0x6000, 0x9086, 0x0004, 0x1120,
+	0x2009, 0x0048, 0x080c, 0xafbe, 0x0005, 0x009e, 0x080c, 0x1aa1,
+	0x0804, 0xc9de, 0x6000, 0x908a, 0x0016, 0x1a0c, 0x0dd5, 0x000b,
+	0x0005, 0xca71, 0xc996, 0xca73, 0xca71, 0xca73, 0xca73, 0xc990,
+	0xca71, 0xc98a, 0xc98a, 0xca71, 0xca71, 0xca71, 0xca71, 0xca71,
+	0xca71, 0x080c, 0x0dd5, 0x6010, 0x00b6, 0x2058, 0xb804, 0x9084,
+	0x00ff, 0x00be, 0x908a, 0x000c, 0x1a0c, 0x0dd5, 0x00b6, 0x0013,
+	0x00be, 0x0005, 0xca8e, 0xcb5b, 0xca90, 0xcad0, 0xca90, 0xcad0,
+	0xca90, 0xca9e, 0xca8e, 0xcad0, 0xca8e, 0xcabf, 0x080c, 0x0dd5,
+	0x6004, 0x908e, 0x0016, 0x05c0, 0x908e, 0x0004, 0x05a8, 0x908e,
+	0x0002, 0x0590, 0x908e, 0x0052, 0x0904, 0xcb57, 0x6004, 0x080c,
+	0xce8e, 0x0904, 0xcb74, 0x908e, 0x0004, 0x1110, 0x080c, 0x3247,
+	0x908e, 0x0021, 0x0904, 0xcb78, 0x908e, 0x0022, 0x0904, 0xcbbf,
+	0x908e, 0x003d, 0x0904, 0xcb78, 0x908e, 0x0039, 0x0904, 0xcb7c,
+	0x908e, 0x0035, 0x0904, 0xcb7c, 0x908e, 0x001e, 0x0178, 0x908e,
+	0x0001, 0x1140, 0x6010, 0x2058, 0xb804, 0x9084, 0x00ff, 0x9086,
+	0x0006, 0x0110, 0x080c, 0x321e, 0x080c, 0xb905, 0x0804, 0xaf74,
+	0x00c6, 0x00d6, 0x6104, 0x9186, 0x0016, 0x0904, 0xcb48, 0x9186,
+	0x0002, 0x1904, 0xcb1d, 0x2001, 0x1837, 0x2004, 0xd08c, 0x11c8,
+	0x080c, 0x743e, 0x11b0, 0x080c, 0xd388, 0x0138, 0x080c, 0x7461,
+	0x1120, 0x080c, 0x7348, 0x0804, 0xcba8, 0x2001, 0x197c, 0x2003,
+	0x0001, 0x2001, 0x1800, 0x2003, 0x0001, 0x080c, 0x736a, 0x0804,
+	0xcba8, 0x6010, 0x2058, 0x2001, 0x1837, 0x2004, 0xd0ac, 0x1904,
+	0xcba8, 0xb8a0, 0x9084, 0xff80, 0x1904, 0xcba8, 0xb840, 0x9084,
+	0x00ff, 0x9005, 0x0190, 0x8001, 0xb842, 0x6017, 0x0000, 0x6023,
+	0x0007, 0x601b, 0x0398, 0x6043, 0x0000, 0x080c, 0xaeed, 0x0128,
+	0x2b00, 0x6012, 0x6023, 0x0001, 0x0458, 0x00de, 0x00ce, 0x6004,
+	0x908e, 0x0002, 0x11a0, 0x6010, 0x2058, 0xb8a0, 0x9086, 0x007e,
+	0x1170, 0x2009, 0x1837, 0x2104, 0xc085, 0x200a, 0x00e6, 0x2071,
+	0x1800, 0x080c, 0x6040, 0x00ee, 0x080c, 0xb905, 0x0030, 0x080c,
+	0xb905, 0x080c, 0x321e, 0x080c, 0xd39d, 0x00e6, 0x0126, 0x2091,
+	0x8000, 0x080c, 0x3247, 0x012e, 0x00ee, 0x080c, 0xaf74, 0x0005,
+	0x2001, 0x0002, 0x080c, 0x65e9, 0x6003, 0x0001, 0x6007, 0x0002,
+	0x080c, 0x91f9, 0x080c, 0x9763, 0x00de, 0x00ce, 0x0c80, 0x080c,
+	0x3247, 0x0804, 0xcacc, 0x00c6, 0x00d6, 0x6104, 0x9186, 0x0016,
+	0x0d38, 0x6010, 0x2058, 0xb840, 0x9084, 0x00ff, 0x9005, 0x0904,
+	0xcb1d, 0x8001, 0xb842, 0x6003, 0x0001, 0x080c, 0x91f9, 0x080c,
+	0x9763, 0x00de, 0x00ce, 0x0898, 0x080c, 0xb905, 0x0804, 0xcace,
+	0x080c, 0xb941, 0x0804, 0xcace, 0x00d6, 0x2c68, 0x6104, 0x080c,
+	0xd300, 0x00de, 0x0118, 0x080c, 0xaf43, 0x0408, 0x6004, 0x8007,
+	0x6134, 0x918c, 0x00ff, 0x9105, 0x6036, 0x6007, 0x0085, 0x6003,
+	0x000b, 0x6023, 0x0002, 0x603c, 0x600a, 0x2001, 0x1986, 0x2004,
+	0x601a, 0x602c, 0x2c08, 0x2060, 0x6024, 0xd0b4, 0x0108, 0xc085,
+	0xc0b5, 0x6026, 0x2160, 0x080c, 0x91b1, 0x080c, 0x9763, 0x0005,
+	0x00de, 0x00ce, 0x080c, 0xb905, 0x080c, 0x321e, 0x00e6, 0x0126,
+	0x2091, 0x8000, 0x080c, 0x3247, 0x6017, 0x0000, 0x6023, 0x0007,
+	0x601b, 0x0398, 0x6043, 0x0000, 0x012e, 0x00ee, 0x0005, 0x080c,
+	0xb374, 0x1904, 0xcb74, 0x0005, 0x6000, 0x908a, 0x0016, 0x1a0c,
+	0x0dd5, 0x0096, 0x00d6, 0x001b, 0x00de, 0x009e, 0x0005, 0xcbdf,
+	0xcbdf, 0xcbdf, 0xcbdf, 0xcbdf, 0xcbdf, 0xcbdf, 0xcbdf, 0xcbdf,
+	0xc98f, 0xcbdf, 0xc996, 0xcbe1, 0xc996, 0xcbfb, 0xcbdf, 0x080c,
+	0x0dd5, 0x6004, 0x9086, 0x008b, 0x01b0, 0x6034, 0x908c, 0xff00,
+	0x810f, 0x9186, 0x0035, 0x1130, 0x602c, 0x9080, 0x0009, 0x200c,
+	0xc185, 0x2102, 0x6007, 0x008b, 0x6003, 0x000d, 0x080c, 0x91b1,
+	0x080c, 0x9763, 0x0005, 0x080c, 0xd37c, 0x0118, 0x080c, 0xd38f,
+	0x0010, 0x080c, 0xd39d, 0x080c, 0xce71, 0x080c, 0xcc86, 0x0570,
+	0x080c, 0x321e, 0x080c, 0xcc86, 0x0168, 0x6014, 0x2048, 0xa867,
+	0x0103, 0xa87b, 0x0006, 0xa877, 0x0000, 0xa880, 0xc0ed, 0xa882,
+	0x080c, 0x6d17, 0x2c68, 0x080c, 0xaeed, 0x0150, 0x6810, 0x6012,
+	0x080c, 0xd102, 0x00c6, 0x2d60, 0x080c, 0xaf74, 0x00ce, 0x0008,
+	0x2d60, 0x6017, 0x0000, 0x6023, 0x0001, 0x6007, 0x0001, 0x6003,
+	0x0001, 0x080c, 0x91f9, 0x080c, 0x9763, 0x00c8, 0x080c, 0xd37c,
+	0x0138, 0x6034, 0x9086, 0x4000, 0x1118, 0x080c, 0x321e, 0x08d0,
+	0x6034, 0x908c, 0xff00, 0x810f, 0x9186, 0x0039, 0x0118, 0x9186,
+	0x0035, 0x1118, 0x080c, 0x321e, 0x0868, 0x080c, 0xaf74, 0x0005,
+	0x6000, 0x908a, 0x0016, 0x1a0c, 0x0dd5, 0x0002, 0xcc66, 0xcc66,
+	0xcc68, 0xcc68, 0xcc68, 0xcc66, 0xcc66, 0xaf74, 0xcc66, 0xcc66,
+	0xcc66, 0xcc66, 0xcc66, 0xcc66, 0xcc66, 0xcc66, 0x080c, 0x0dd5,
+	0x080c, 0xa89b, 0x6114, 0x0096, 0x2148, 0xa87b, 0x0006, 0x080c,
+	0x6d17, 0x009e, 0x0804, 0xaf43, 0x9284, 0x0007, 0x1158, 0x9282,
+	0x1cd0, 0x0240, 0x2001, 0x181a, 0x2004, 0x9202, 0x1218, 0x9085,
+	0x0001, 0x0005, 0x9006, 0x0ce8, 0x0096, 0x0028, 0x0096, 0x0006,
+	0x6014, 0x2048, 0x000e, 0x0006, 0x9984, 0xf000, 0x9086, 0xf000,
+	0x0110, 0x080c, 0x10aa, 0x000e, 0x009e, 0x0005, 0x00e6, 0x00c6,
+	0x0036, 0x0006, 0x0126, 0x2091, 0x8000, 0x2061, 0x1cd0, 0x2071,
+	0x1800, 0x7354, 0x7074, 0x9302, 0x1640, 0x6020, 0x9206, 0x11f8,
+	0x080c, 0xd388, 0x0180, 0x9286, 0x0001, 0x1168, 0x6004, 0x9086,
+	0x0004, 0x1148, 0x080c, 0x321e, 0x080c, 0xd39d, 0x00c6, 0x080c,
+	0xaf74, 0x00ce, 0x0060, 0x080c, 0xd07c, 0x0148, 0x080c, 0xce8e,
+	0x1110, 0x080c, 0xb905, 0x00c6, 0x080c, 0xaf43, 0x00ce, 0x9ce0,
+	0x0018, 0x7068, 0x9c02, 0x1208, 0x08a0, 0x012e, 0x000e, 0x003e,
+	0x00ce, 0x00ee, 0x0005, 0x00e6, 0x00c6, 0x0016, 0x9188, 0x1000,
+	0x210c, 0x81ff, 0x0128, 0x2061, 0x1ab2, 0x6112, 0x080c, 0x321e,
+	0x9006, 0x0010, 0x9085, 0x0001, 0x001e, 0x00ce, 0x00ee, 0x0005,
+	0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0xaeed, 0x01b0, 0x6656,
+	0x2b00, 0x6012, 0x080c, 0x5765, 0x0118, 0x080c, 0xcdb5, 0x0168,
+	0x080c, 0xd102, 0x6023, 0x0003, 0x2009, 0x004b, 0x080c, 0xafbe,
+	0x9085, 0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x00c6,
+	0x0126, 0x2091, 0x8000, 0xbaa0, 0x080c, 0xaf91, 0x0560, 0x6057,
+	0x0000, 0x2b00, 0x6012, 0x080c, 0xd102, 0x6023, 0x0003, 0x0016,
+	0x080c, 0x9356, 0x0076, 0x903e, 0x080c, 0x9229, 0x2c08, 0x080c,
+	0xe477, 0x007e, 0x001e, 0xd184, 0x0128, 0x080c, 0xaf43, 0x9085,
+	0x0001, 0x0070, 0x080c, 0x5765, 0x0128, 0xd18c, 0x1170, 0x080c,
+	0xcdb5, 0x0148, 0x2009, 0x004c, 0x080c, 0xafbe, 0x9085, 0x0001,
+	0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x2900, 0x6016, 0x0c90,
+	0x2009, 0x004d, 0x0010, 0x2009, 0x004e, 0x00f6, 0x00c6, 0x0046,
+	0x0016, 0x080c, 0xaeed, 0x2c78, 0x05a0, 0x7e56, 0x2b00, 0x7812,
+	0x7823, 0x0003, 0x0016, 0x2021, 0x0005, 0x080c, 0xcdc7, 0x001e,
+	0x9186, 0x004d, 0x0118, 0x9186, 0x004e, 0x0148, 0x2001, 0x197f,
+	0x200c, 0xd1fc, 0x0168, 0x2f60, 0x080c, 0xaf43, 0x00d0, 0x2001,
+	0x197e, 0x200c, 0xd1fc, 0x0120, 0x2f60, 0x080c, 0xaf43, 0x0088,
+	0x2f60, 0x080c, 0x5765, 0x0138, 0xd18c, 0x1118, 0x04f1, 0x0148,
+	0x0010, 0x2900, 0x7816, 0x001e, 0x0016, 0x080c, 0xafbe, 0x9085,
+	0x0001, 0x001e, 0x004e, 0x00ce, 0x00fe, 0x0005, 0x00f6, 0x00c6,
+	0x0046, 0x080c, 0xaeed, 0x2c78, 0x0508, 0x7e56, 0x2b00, 0x7812,
+	0x7823, 0x0003, 0x0096, 0x2021, 0x0004, 0x0489, 0x009e, 0x2001,
+	0x197d, 0x200c, 0xd1fc, 0x0120, 0x2f60, 0x080c, 0xaf43, 0x0060,
+	0x2f60, 0x080c, 0x5765, 0x0120, 0xd18c, 0x1160, 0x0071, 0x0130,
+	0x2009, 0x0052, 0x080c, 0xafbe, 0x9085, 0x0001, 0x004e, 0x00ce,
+	0x00fe, 0x0005, 0x2900, 0x7816, 0x0c98, 0x00c6, 0x080c, 0x4b1f,
+	0x00ce, 0x1120, 0x080c, 0xaf43, 0x9006, 0x0005, 0xa867, 0x0000,
+	0xa86b, 0x8000, 0x2900, 0x6016, 0x9085, 0x0001, 0x0005, 0x0096,
+	0x0076, 0x0126, 0x2091, 0x8000, 0x080c, 0x67cd, 0x0158, 0x2001,
+	0xcdcc, 0x0006, 0x900e, 0x2400, 0x080c, 0x6f4a, 0x080c, 0x6d17,
+	0x000e, 0x0807, 0x2418, 0x080c, 0x95f1, 0xbaa0, 0x0086, 0x2041,
+	0x0001, 0x2039, 0x0001, 0x2608, 0x080c, 0x936e, 0x008e, 0x080c,
+	0x9229, 0x2f08, 0x2648, 0x080c, 0xe477, 0xb93c, 0x81ff, 0x090c,
+	0x9441, 0x080c, 0x9763, 0x012e, 0x007e, 0x009e, 0x0005, 0x00c6,
+	0x0126, 0x2091, 0x8000, 0x080c, 0xaeed, 0x0190, 0x660a, 0x2b08,
+	0x6112, 0x080c, 0xd102, 0x6023, 0x0001, 0x2900, 0x6016, 0x2009,
+	0x001f, 0x080c, 0xafbe, 0x9085, 0x0001, 0x012e, 0x00ce, 0x0005,
+	0x9006, 0x0cd8, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0xaf91,
+	0x01b8, 0x660a, 0x2b08, 0x6112, 0x080c, 0xd102, 0x6023, 0x0008,
+	0x2900, 0x6016, 0x00f6, 0x2c78, 0x080c, 0x1754, 0x00fe, 0x2009,
+	0x0021, 0x080c, 0xafbe, 0x9085, 0x0001, 0x012e, 0x00ce, 0x0005,
+	0x9006, 0x0cd8, 0x2009, 0x003d, 0x00c6, 0x0126, 0x0016, 0x2091,
+	0x8000, 0x080c, 0xaeed, 0x0198, 0x660a, 0x2b08, 0x6112, 0x080c,
+	0xd102, 0x6023, 0x0001, 0x2900, 0x6016, 0x001e, 0x0016, 0x080c,
+	0xafbe, 0x9085, 0x0001, 0x001e, 0x012e, 0x00ce, 0x0005, 0x9006,
+	0x0cd0, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0xaf91, 0x0188,
+	0x2b08, 0x6112, 0x080c, 0xd102, 0x6023, 0x0001, 0x2900, 0x6016,
+	0x2009, 0x0000, 0x080c, 0xafbe, 0x9085, 0x0001, 0x012e, 0x00ce,
+	0x0005, 0x9006, 0x0cd8, 0x2009, 0x0044, 0x0830, 0x2009, 0x0049,
+	0x0818, 0x0026, 0x00b6, 0x6210, 0x2258, 0xba3c, 0x82ff, 0x0110,
+	0x8211, 0xba3e, 0x00be, 0x002e, 0x0005, 0x0006, 0x0016, 0x6004,
+	0x908e, 0x0002, 0x0140, 0x908e, 0x0003, 0x0128, 0x908e, 0x0004,
+	0x0110, 0x9085, 0x0001, 0x001e, 0x000e, 0x0005, 0x0006, 0x0086,
+	0x0096, 0x6020, 0x9086, 0x0004, 0x01a8, 0x6014, 0x904d, 0x080c,
+	0xcc86, 0x0180, 0xa864, 0x9086, 0x0139, 0x0170, 0x6020, 0x90c6,
+	0x0003, 0x0140, 0x90c6, 0x0002, 0x0128, 0xa868, 0xd0fc, 0x0110,
+	0x9006, 0x0010, 0x9085, 0x0001, 0x009e, 0x008e, 0x000e, 0x0005,
+	0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0xaf91, 0x0198, 0x2b08,
+	0x6112, 0x080c, 0xd102, 0x6023, 0x0001, 0x2900, 0x6016, 0x080c,
+	0x321e, 0x2009, 0x0028, 0x080c, 0xafbe, 0x9085, 0x0001, 0x012e,
+	0x00ce, 0x0005, 0x9006, 0x0cd8, 0x9186, 0x0015, 0x11a8, 0x2011,
+	0x1824, 0x2204, 0x9086, 0x0074, 0x1178, 0x00b6, 0x080c, 0xbb59,
+	0x00be, 0x080c, 0xbd7c, 0x6003, 0x0001, 0x6007, 0x0029, 0x080c,
+	0x91f9, 0x080c, 0x9763, 0x0078, 0x6014, 0x0096, 0x2048, 0xa868,
+	0x009e, 0xd0fc, 0x0148, 0x2001, 0x0001, 0x080c, 0xd2c1, 0x080c,
+	0xb905, 0x080c, 0xaf43, 0x0005, 0x0096, 0x6014, 0x904d, 0x090c,
+	0x0dd5, 0xa87b, 0x0030, 0xa883, 0x0000, 0xa897, 0x4005, 0xa89b,
+	0x0004, 0xa867, 0x0139, 0x0126, 0x2091, 0x8000, 0x080c, 0x6d17,
+	0x012e, 0x009e, 0x080c, 0xaf43, 0x0c30, 0x0096, 0x9186, 0x0016,
+	0x1128, 0x2001, 0x0004, 0x080c, 0x65e9, 0x00e8, 0x9186, 0x0015,
+	0x1510, 0x2011, 0x1824, 0x2204, 0x9086, 0x0014, 0x11e0, 0x6010,
+	0x00b6, 0x2058, 0x080c, 0x6734, 0x00be, 0x080c, 0xbe4d, 0x1198,
+	0x6010, 0x00b6, 0x2058, 0xb890, 0x00be, 0x9005, 0x0160, 0x2001,
+	0x0006, 0x080c, 0x65e9, 0x6014, 0x2048, 0xa868, 0xd0fc, 0x0170,
+	0x080c, 0xb348, 0x0048, 0x6014, 0x2048, 0xa868, 0xd0fc, 0x0528,
+	0x080c, 0xb905, 0x080c, 0xaf43, 0x009e, 0x0005, 0x6014, 0x6310,
+	0x2358, 0x904d, 0x090c, 0x0dd5, 0xa87b, 0x0000, 0xa883, 0x0000,
+	0xa897, 0x4000, 0x900e, 0x080c, 0x68b9, 0x1108, 0xc185, 0xb800,
+	0xd0bc, 0x0108, 0xc18d, 0xa99a, 0x0126, 0x2091, 0x8000, 0x080c,
+	0x6d17, 0x012e, 0x080c, 0xaf43, 0x08f8, 0x6014, 0x904d, 0x090c,
+	0x0dd5, 0xa87b, 0x0030, 0xa883, 0x0000, 0xa897, 0x4005, 0xa89b,
+	0x0004, 0xa867, 0x0139, 0x0126, 0x2091, 0x8000, 0x080c, 0x6d17,
+	0x012e, 0x080c, 0xaf43, 0x0840, 0xa878, 0x9086, 0x0005, 0x1108,
+	0x0009, 0x0005, 0xa880, 0xc0ad, 0xa882, 0x0005, 0x6043, 0x0000,
+	0x6017, 0x0000, 0x6003, 0x0001, 0x6007, 0x0050, 0x080c, 0x91b1,
+	0x080c, 0x9763, 0x0005, 0x00c6, 0x6010, 0x00b6, 0x2058, 0xb800,
+	0x00be, 0xd0bc, 0x0120, 0x6020, 0x9084, 0x000f, 0x0013, 0x00ce,
+	0x0005, 0xc98f, 0xcfb2, 0xcfb2, 0xcfb5, 0xe789, 0xe7a4, 0xe7a7,
+	0xc98f, 0xc98f, 0xc98f, 0xc98f, 0xc98f, 0xc98f, 0xc98f, 0xc98f,
+	0x080c, 0x0dd5, 0xa001, 0xa001, 0x0005, 0x0096, 0x6014, 0x904d,
+	0x0118, 0xa87c, 0xd0e4, 0x1110, 0x009e, 0x0010, 0x009e, 0x0005,
+	0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x0550, 0x2001,
+	0x1834, 0x2004, 0x9005, 0x1540, 0x00f6, 0x2c78, 0x080c, 0xaeed,
+	0x0508, 0x7810, 0x6012, 0x080c, 0xd102, 0x7820, 0x9086, 0x0003,
+	0x0128, 0x7808, 0x603a, 0x2f00, 0x603e, 0x0020, 0x7808, 0x603e,
+	0x2f00, 0x603a, 0x602e, 0x6023, 0x0001, 0x6007, 0x0035, 0x6003,
+	0x0001, 0x7954, 0x6156, 0x080c, 0x91b1, 0x080c, 0x9763, 0x2f60,
+	0x00fe, 0x0005, 0x2f60, 0x00fe, 0x2001, 0x1987, 0x2004, 0x6042,
+	0x0005, 0x0016, 0x0096, 0x6814, 0x2048, 0xa87c, 0xd0e4, 0x0180,
+	0xc0e4, 0xa87e, 0xa877, 0x0000, 0xa893, 0x0000, 0xa88f, 0x0000,
+	0xd0cc, 0x0130, 0xc0cc, 0xa87e, 0xa878, 0x2048, 0x080c, 0x0fb1,
+	0x6830, 0x6036, 0x908e, 0x0001, 0x0148, 0x6803, 0x0002, 0x9086,
+	0x0005, 0x0170, 0x9006, 0x602e, 0x6032, 0x00d0, 0x681c, 0xc085,
+	0x681e, 0x6803, 0x0004, 0x6824, 0xc0f4, 0x9085, 0x0c00, 0x6826,
+	0x6814, 0x2048, 0xa8ac, 0x6938, 0x9102, 0xa8b0, 0x693c, 0x9103,
+	0x1e48, 0x683c, 0x602e, 0x6838, 0x9084, 0xfffc, 0x683a, 0x6032,
+	0x2d00, 0x603a, 0x6808, 0x603e, 0x6910, 0x6112, 0x6954, 0x6156,
+	0x6023, 0x0001, 0x6007, 0x0039, 0x6003, 0x0001, 0x080c, 0x91b1,
+	0x080c, 0x9763, 0x009e, 0x001e, 0x0005, 0x6024, 0xd0d4, 0x0510,
+	0xd0f4, 0x11f8, 0x6038, 0x940a, 0x603c, 0x9303, 0x0230, 0x9105,
+	0x0120, 0x6024, 0xc0d4, 0xc0f5, 0x0098, 0x643a, 0x633e, 0xac3e,
+	0xab42, 0x0046, 0x0036, 0x2400, 0xacac, 0x9402, 0xa836, 0x2300,
+	0xabb0, 0x9303, 0xa83a, 0x003e, 0x004e, 0x6024, 0xc0d4, 0x0000,
+	0x6026, 0x0005, 0xd0f4, 0x1138, 0xa83c, 0x603a, 0xa840, 0x603e,
+	0x6024, 0xc0f5, 0x6026, 0x0005, 0x0006, 0x0016, 0x6004, 0x908e,
+	0x0034, 0x01b8, 0x908e, 0x0035, 0x01a0, 0x908e, 0x0036, 0x0188,
+	0x908e, 0x0037, 0x0170, 0x908e, 0x0038, 0x0158, 0x908e, 0x0039,
+	0x0140, 0x908e, 0x003a, 0x0128, 0x908e, 0x003b, 0x0110, 0x9085,
+	0x0001, 0x001e, 0x000e, 0x0005, 0x0006, 0x0016, 0x0026, 0x0036,
+	0x00e6, 0x2001, 0x1981, 0x200c, 0x8000, 0x2014, 0x2001, 0x0032,
+	0x080c, 0x9027, 0x2001, 0x1985, 0x82ff, 0x1110, 0x2011, 0x0014,
+	0x2202, 0x2001, 0x1983, 0x200c, 0x8000, 0x2014, 0x2071, 0x196b,
+	0x711a, 0x721e, 0x2001, 0x0064, 0x080c, 0x9027, 0x2001, 0x1986,
+	0x82ff, 0x1110, 0x2011, 0x0014, 0x2202, 0x2001, 0x1987, 0x9288,
+	0x000a, 0x2102, 0x2001, 0x1a93, 0x2102, 0x2001, 0x0032, 0x080c,
+	0x15fd, 0x080c, 0x69ed, 0x00ee, 0x003e, 0x002e, 0x001e, 0x000e,
+	0x0005, 0x0006, 0x0016, 0x00e6, 0x2001, 0x1985, 0x2003, 0x0028,
+	0x2001, 0x1986, 0x2003, 0x0014, 0x2071, 0x196b, 0x701b, 0x0000,
+	0x701f, 0x07d0, 0x2001, 0x1987, 0x2009, 0x001e, 0x2102, 0x2001,
+	0x1a93, 0x2102, 0x2001, 0x0032, 0x080c, 0x15fd, 0x00ee, 0x001e,
+	0x000e, 0x0005, 0x0096, 0x6058, 0x904d, 0x0110, 0x080c, 0x1031,
+	0x009e, 0x0005, 0x0005, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c,
+	0xaeed, 0x0180, 0x2b08, 0x6112, 0x0ca9, 0x6023, 0x0001, 0x2900,
+	0x6016, 0x2009, 0x0033, 0x080c, 0xafbe, 0x9085, 0x0001, 0x012e,
+	0x00ce, 0x0005, 0x9006, 0x0cd8, 0x0096, 0x00e6, 0x00f6, 0x2071,
+	0x1800, 0x9186, 0x0015, 0x1500, 0x7090, 0x9086, 0x0018, 0x11e0,
+	0x6014, 0x2048, 0xaa3c, 0xd2e4, 0x1160, 0x2c78, 0x080c, 0x99f9,
+	0x01d8, 0x707c, 0xaa50, 0x9206, 0x1160, 0x7080, 0xaa54, 0x9206,
+	0x1140, 0x6210, 0x00b6, 0x2258, 0xbaa0, 0x00be, 0x900e, 0x080c,
+	0x3267, 0x080c, 0xb348, 0x0020, 0x080c, 0xb905, 0x080c, 0xaf43,
+	0x00fe, 0x00ee, 0x009e, 0x0005, 0x7060, 0xaa54, 0x9206, 0x0d48,
+	0x0c80, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0xaeed, 0x0188,
+	0x2b08, 0x6112, 0x080c, 0xd102, 0x6023, 0x0001, 0x2900, 0x6016,
+	0x2009, 0x004d, 0x080c, 0xafbe, 0x9085, 0x0001, 0x012e, 0x00ce,
+	0x0005, 0x9006, 0x0cd8, 0x00c6, 0x0126, 0x2091, 0x8000, 0x0016,
+	0x080c, 0xaeed, 0x0180, 0x2b08, 0x6112, 0x080c, 0xd102, 0x6023,
+	0x0001, 0x2900, 0x6016, 0x001e, 0x080c, 0xafbe, 0x9085, 0x0001,
+	0x012e, 0x00ce, 0x0005, 0x001e, 0x9006, 0x0cd0, 0x0016, 0x0026,
+	0x0036, 0x0046, 0x0056, 0x0066, 0x0096, 0x00e6, 0x00f6, 0x2071,
+	0x1800, 0x9186, 0x0015, 0x1568, 0x7190, 0x6014, 0x2048, 0xa814,
+	0x8003, 0x9106, 0x1530, 0x20e1, 0x0000, 0x2001, 0x199f, 0x2003,
+	0x0000, 0x6014, 0x2048, 0xa830, 0x20a8, 0x8906, 0x8006, 0x8007,
+	0x9094, 0x003f, 0x22e8, 0x9084, 0xffc0, 0x9080, 0x001b, 0x20a0,
+	0x2001, 0x199f, 0x0016, 0x200c, 0x080c, 0xd99b, 0x001e, 0xa804,
+	0x9005, 0x0110, 0x2048, 0x0c38, 0x6014, 0x2048, 0xa867, 0x0103,
+	0x0010, 0x080c, 0xb905, 0x080c, 0xaf43, 0x00fe, 0x00ee, 0x009e,
+	0x006e, 0x005e, 0x004e, 0x003e, 0x002e, 0x001e, 0x0005, 0x0096,
+	0x00e6, 0x00f6, 0x2071, 0x1800, 0x9186, 0x0015, 0x11b8, 0x7090,
+	0x9086, 0x0004, 0x1198, 0x6014, 0x2048, 0x2c78, 0x080c, 0x99f9,
+	0x01a8, 0x707c, 0xaa74, 0x9206, 0x1130, 0x7080, 0xaa78, 0x9206,
+	0x1110, 0x080c, 0x321e, 0x080c, 0xb348, 0x0020, 0x080c, 0xb905,
+	0x080c, 0xaf43, 0x00fe, 0x00ee, 0x009e, 0x0005, 0x7060, 0xaa78,
+	0x9206, 0x0d78, 0x0c80, 0x0096, 0x00e6, 0x00f6, 0x2071, 0x1800,
+	0x9186, 0x0015, 0x1550, 0x7090, 0x9086, 0x0004, 0x1530, 0x6014,
+	0x2048, 0x2c78, 0x080c, 0x99f9, 0x05f0, 0x707c, 0xaacc, 0x9206,
+	0x1180, 0x7080, 0xaad0, 0x9206, 0x1160, 0x080c, 0x321e, 0x0016,
+	0xa998, 0xaab0, 0x9284, 0x1000, 0xc0fd, 0x080c, 0x570c, 0x001e,
+	0x0010, 0x080c, 0x54f7, 0x080c, 0xcc86, 0x0508, 0xa87b, 0x0000,
+	0xa883, 0x0000, 0xa897, 0x4000, 0x0080, 0x080c, 0xcc86, 0x01b8,
+	0x6014, 0x2048, 0x080c, 0x54f7, 0x1d70, 0xa87b, 0x0030, 0xa883,
+	0x0000, 0xa897, 0x4005, 0xa89b, 0x0004, 0x0126, 0x2091, 0x8000,
+	0xa867, 0x0139, 0x080c, 0x6d17, 0x012e, 0x080c, 0xaf43, 0x00fe,
+	0x00ee, 0x009e, 0x0005, 0x7060, 0xaad0, 0x9206, 0x0930, 0x0888,
+	0x0016, 0x0026, 0xa87c, 0xd0ac, 0x0178, 0xa938, 0xaa34, 0x2100,
+	0x9205, 0x0150, 0xa890, 0x9106, 0x1118, 0xa88c, 0x9206, 0x0120,
+	0xa992, 0xaa8e, 0x9085, 0x0001, 0x002e, 0x001e, 0x0005, 0x00b6,
+	0x00d6, 0x0036, 0x080c, 0xcc86, 0x0904, 0xd2bd, 0x0096, 0x6314,
+	0x2348, 0xa87a, 0xa982, 0x929e, 0x4000, 0x1580, 0x6310, 0x00c6,
+	0x2358, 0x2009, 0x0000, 0xa868, 0xd0f4, 0x1140, 0x080c, 0x68b9,
+	0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d, 0xaa96, 0xa99a,
+	0x20a9, 0x0004, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0031, 0x20a0,
+	0xb8c4, 0x20e0, 0xb8c8, 0x9080, 0x0006, 0x2098, 0x080c, 0x0f7c,
+	0x20a9, 0x0004, 0xa85c, 0x9080, 0x0035, 0x20a0, 0xb8c8, 0x9080,
+	0x000a, 0x2098, 0x080c, 0x0f7c, 0x00ce, 0x0090, 0xaa96, 0x3918,
+	0x9398, 0x0007, 0x231c, 0x6004, 0x9086, 0x0016, 0x0110, 0xa89b,
+	0x0004, 0xaba2, 0x6310, 0x2358, 0xb804, 0x9084, 0x00ff, 0xa89e,
+	0x080c, 0x6d0b, 0x6017, 0x0000, 0x009e, 0x003e, 0x00de, 0x00be,
+	0x0005, 0x0026, 0x0036, 0x0046, 0x00b6, 0x0096, 0x00f6, 0x6214,
+	0x2248, 0x6210, 0x2258, 0x2079, 0x0260, 0x9096, 0x0000, 0x11a0,
+	0xb814, 0x9084, 0x00ff, 0x900e, 0x080c, 0x287c, 0x2118, 0x831f,
+	0x939c, 0xff00, 0x7838, 0x9084, 0x00ff, 0x931d, 0x7c3c, 0x2011,
+	0x8018, 0x080c, 0x4b7f, 0x00a8, 0x9096, 0x0001, 0x1148, 0x89ff,
+	0x0180, 0xa89b, 0x000d, 0x7838, 0xa8a6, 0x783c, 0xa8aa, 0x0048,
+	0x9096, 0x0002, 0x1130, 0xa89b, 0x000d, 0x7838, 0xa8a6, 0x783c,
+	0xa8aa, 0x00fe, 0x009e, 0x00be, 0x004e, 0x003e, 0x002e, 0x0005,
+	0x00c6, 0x0026, 0x0016, 0x9186, 0x0035, 0x0110, 0x6a38, 0x0008,
+	0x6a2c, 0x080c, 0xcc74, 0x01f0, 0x2260, 0x6120, 0x9186, 0x0003,
+	0x0118, 0x9186, 0x0006, 0x1190, 0x6838, 0x9206, 0x0140, 0x683c,
+	0x9206, 0x1160, 0x6108, 0x6838, 0x9106, 0x1140, 0x0020, 0x6008,
+	0x693c, 0x9106, 0x1118, 0x6010, 0x6910, 0x9106, 0x001e, 0x002e,
+	0x00ce, 0x0005, 0x9085, 0x0001, 0x0cc8, 0xa974, 0xd1cc, 0x0188,
+	0x918c, 0x00ff, 0x918e, 0x0002, 0x1160, 0xa9a8, 0x918c, 0x0f00,
+	0x810f, 0x918e, 0x0001, 0x1128, 0xa834, 0xa938, 0x9115, 0x190c,
+	0xc33d, 0x0005, 0x0036, 0x2019, 0x0001, 0x0010, 0x0036, 0x901e,
+	0x0499, 0x01e0, 0x080c, 0xcc86, 0x01c8, 0x080c, 0xce71, 0x6037,
+	0x4000, 0x6014, 0x6017, 0x0000, 0x0096, 0x2048, 0xa87c, 0x080c,
+	0xce8e, 0x1118, 0x080c, 0xb905, 0x0040, 0xa867, 0x0103, 0xa877,
+	0x0000, 0x83ff, 0x1129, 0x080c, 0x6d17, 0x009e, 0x003e, 0x0005,
+	0xa880, 0xd0b4, 0x0128, 0xa87b, 0x0006, 0xc0ec, 0xa882, 0x0048,
+	0xd0bc, 0x0118, 0xa87b, 0x0002, 0x0020, 0xa87b, 0x0005, 0x080c,
+	0xcf82, 0xa877, 0x0000, 0x0005, 0x2001, 0x1810, 0x2004, 0xd0ec,
+	0x0005, 0x0006, 0x2001, 0x1810, 0x2004, 0xd0f4, 0x000e, 0x0005,
+	0x0006, 0x2001, 0x1810, 0x2004, 0xd0e4, 0x000e, 0x0005, 0x0036,
+	0x0046, 0x6010, 0x00b6, 0x2058, 0xbba0, 0x00be, 0x2021, 0x0007,
+	0x080c, 0x4d36, 0x004e, 0x003e, 0x0005, 0x0c51, 0x1d81, 0x0005,
+	0x2001, 0x1985, 0x2004, 0x601a, 0x0005, 0x2001, 0x1987, 0x2004,
+	0x6042, 0x0005, 0x080c, 0xaf43, 0x0804, 0x9763, 0x00b6, 0x0066,
+	0x6000, 0x90b2, 0x0016, 0x1a0c, 0x0dd5, 0x001b, 0x006e, 0x00be,
+	0x0005, 0xd3c9, 0xdaf8, 0xdc55, 0xd3c9, 0xd3c9, 0xd3c9, 0xd3c9,
+	0xd3c9, 0xd400, 0xdcd9, 0xd3c9, 0xd3c9, 0xd3c9, 0xd3c9, 0xd3c9,
+	0xd3c9, 0x080c, 0x0dd5, 0x0066, 0x6000, 0x90b2, 0x0016, 0x1a0c,
+	0x0dd5, 0x0013, 0x006e, 0x0005, 0xd3e4, 0xe24b, 0xd3e4, 0xd3e4,
+	0xd3e4, 0xd3e4, 0xd3e4, 0xd3e4, 0xe1f8, 0xe29f, 0xd3e4, 0xe8c4,
+	0xe8fa, 0xe8c4, 0xe8fa, 0xd3e4, 0x080c, 0x0dd5, 0x6000, 0x9082,
+	0x0016, 0x1a0c, 0x0dd5, 0x6000, 0x000a, 0x0005, 0xd3fe, 0xdeb7,
+	0xdfa9, 0xdfcc, 0xe08c, 0xd3fe, 0xe16b, 0xe114, 0xdce5, 0xe1ce,
+	0xe1e3, 0xd3fe, 0xd3fe, 0xd3fe, 0xd3fe, 0xd3fe, 0x080c, 0x0dd5,
+	0x91b2, 0x0053, 0x1a0c, 0x0dd5, 0x2100, 0x91b2, 0x0040, 0x1a04,
+	0xd86c, 0x0002, 0xd44a, 0xd63a, 0xd44a, 0xd44a, 0xd44a, 0xd643,
+	0xd44a, 0xd44a, 0xd44a, 0xd44a, 0xd44a, 0xd44a, 0xd44a, 0xd44a,
+	0xd44a, 0xd44a, 0xd44a, 0xd44a, 0xd44a, 0xd44a, 0xd44a, 0xd44a,
+	0xd44a, 0xd44c, 0xd4af, 0xd4be, 0xd522, 0xd54d, 0xd5c6, 0xd625,
+	0xd44a, 0xd44a, 0xd646, 0xd44a, 0xd44a, 0xd65b, 0xd668, 0xd44a,
+	0xd44a, 0xd44a, 0xd44a, 0xd44a, 0xd70e, 0xd44a, 0xd44a, 0xd722,
+	0xd44a, 0xd44a, 0xd6dd, 0xd44a, 0xd44a, 0xd44a, 0xd73a, 0xd44a,
+	0xd44a, 0xd44a, 0xd7b7, 0xd44a, 0xd44a, 0xd44a, 0xd44a, 0xd44a,
+	0xd44a, 0xd834, 0x080c, 0x0dd5, 0x080c, 0x69ca, 0x1150, 0x2001,
+	0x1837, 0x2004, 0xd0cc, 0x1128, 0x9084, 0x0009, 0x9086, 0x0008,
+	0x1140, 0x6007, 0x0009, 0x602f, 0x0009, 0x6017, 0x0000, 0x0804,
+	0xd633, 0x080c, 0x6966, 0x00e6, 0x00c6, 0x0036, 0x0026, 0x0016,
+	0x6210, 0x2258, 0xbaa0, 0x0026, 0x2019, 0x0029, 0x080c, 0x9356,
+	0x0076, 0x903e, 0x080c, 0x9229, 0x2c08, 0x080c, 0xe477, 0x007e,
+	0x001e, 0x001e, 0x002e, 0x003e, 0x00ce, 0x00ee, 0x6610, 0x2658,
+	0x080c, 0x66a8, 0xbe04, 0x9684, 0x00ff, 0x9082, 0x0006, 0x1268,
+	0x0016, 0x0026, 0x6210, 0x00b6, 0x2258, 0xbaa0, 0x00be, 0x2c08,
+	0x080c, 0xeb23, 0x002e, 0x001e, 0x1178, 0x080c, 0xe3a9, 0x1904,
+	0xd51a, 0x080c, 0xe345, 0x1120, 0x6007, 0x0008, 0x0804, 0xd633,
+	0x6007, 0x0009, 0x0804, 0xd633, 0x080c, 0xe5cd, 0x0128, 0x080c,
+	0xe3a9, 0x0d78, 0x0804, 0xd51a, 0x6017, 0x1900, 0x0c88, 0x080c,
+	0x3342, 0x1904, 0xd869, 0x6106, 0x080c, 0xe2fa, 0x6007, 0x0006,
+	0x0804, 0xd633, 0x6007, 0x0007, 0x0804, 0xd633, 0x080c, 0xe936,
+	0x1904, 0xd869, 0x080c, 0x3342, 0x1904, 0xd869, 0x00d6, 0x6610,
+	0x2658, 0xbe04, 0x9684, 0x00ff, 0x9082, 0x0006, 0x1220, 0x2001,
+	0x0001, 0x080c, 0x65d5, 0x96b4, 0xff00, 0x8637, 0x9686, 0x0006,
+	0x0188, 0x9686, 0x0004, 0x0170, 0xbe04, 0x96b4, 0x00ff, 0x9686,
+	0x0006, 0x0140, 0x9686, 0x0004, 0x0128, 0x9686, 0x0005, 0x0110,
+	0x00de, 0x0480, 0x00e6, 0x2071, 0x0260, 0x7034, 0x9084, 0x0003,
+	0x1140, 0x7034, 0x9082, 0x0014, 0x0220, 0x7030, 0x9084, 0x0003,
+	0x0130, 0x00ee, 0x6017, 0x0000, 0x602f, 0x0007, 0x00b0, 0x00ee,
+	0x080c, 0xe40d, 0x1190, 0x9686, 0x0006, 0x1140, 0x0026, 0x6210,
+	0x2258, 0xbaa0, 0x900e, 0x080c, 0x3267, 0x002e, 0x080c, 0x6734,
+	0x6007, 0x000a, 0x00de, 0x0804, 0xd633, 0x6007, 0x000b, 0x00de,
+	0x0804, 0xd633, 0x080c, 0x321e, 0x080c, 0xd39d, 0x6007, 0x0001,
+	0x0804, 0xd633, 0x080c, 0xe936, 0x1904, 0xd869, 0x080c, 0x3342,
+	0x1904, 0xd869, 0x2071, 0x0260, 0x7034, 0x90b4, 0x0003, 0x1948,
+	0x90b2, 0x0014, 0x0a30, 0x7030, 0x9084, 0x0003, 0x1910, 0x6610,
+	0x2658, 0xbe04, 0x9686, 0x0707, 0x09e8, 0x0026, 0x6210, 0x2258,
+	0xbaa0, 0x900e, 0x080c, 0x3267, 0x002e, 0x6007, 0x000c, 0x2001,
+	0x0001, 0x080c, 0xeb03, 0x0804, 0xd633, 0x080c, 0x69ca, 0x1140,
+	0x2001, 0x1837, 0x2004, 0x9084, 0x0009, 0x9086, 0x0008, 0x1110,
+	0x0804, 0xd459, 0x080c, 0x6966, 0x6610, 0x2658, 0xbe04, 0x9684,
+	0x00ff, 0x9082, 0x0006, 0x06c8, 0x1138, 0x0026, 0x2001, 0x0006,
+	0x080c, 0x6615, 0x002e, 0x0050, 0x96b4, 0xff00, 0x8637, 0x9686,
+	0x0004, 0x0120, 0x9686, 0x0006, 0x1904, 0xd51a, 0x080c, 0xe41a,
+	0x1120, 0x6007, 0x000e, 0x0804, 0xd633, 0x0046, 0x6410, 0x2458,
+	0xbca0, 0x0046, 0x080c, 0x321e, 0x080c, 0xd39d, 0x004e, 0x0016,
+	0x9006, 0x2009, 0x1848, 0x210c, 0xd1a4, 0x0148, 0x2009, 0x0029,
+	0x080c, 0xe73a, 0x6010, 0x2058, 0xb800, 0xc0e5, 0xb802, 0x001e,
+	0x004e, 0x6007, 0x0001, 0x0804, 0xd633, 0x2001, 0x0001, 0x080c,
+	0x65d5, 0x0156, 0x0016, 0x0026, 0x0036, 0x20a9, 0x0004, 0x2019,
+	0x1805, 0x2011, 0x0270, 0x080c, 0xbefd, 0x003e, 0x002e, 0x001e,
+	0x015e, 0x9005, 0x0168, 0x96b4, 0xff00, 0x8637, 0x9682, 0x0004,
+	0x0a04, 0xd51a, 0x9682, 0x0007, 0x0a04, 0xd576, 0x0804, 0xd51a,
+	0x6017, 0x1900, 0x6007, 0x0009, 0x0804, 0xd633, 0x080c, 0x69ca,
+	0x1140, 0x2001, 0x1837, 0x2004, 0x9084, 0x0009, 0x9086, 0x0008,
+	0x1110, 0x0804, 0xd459, 0x080c, 0x6966, 0x6610, 0x2658, 0xbe04,
+	0x9684, 0x00ff, 0x0006, 0x9086, 0x0001, 0x000e, 0x0170, 0x9082,
+	0x0006, 0x0698, 0x0150, 0x96b4, 0xff00, 0x8637, 0x9686, 0x0004,
+	0x0120, 0x9686, 0x0006, 0x1904, 0xd51a, 0x080c, 0xe448, 0x1130,
+	0x080c, 0xe345, 0x1118, 0x6007, 0x0010, 0x04e8, 0x0046, 0x6410,
+	0x2458, 0xbca0, 0x0046, 0x080c, 0x321e, 0x080c, 0xd39d, 0x004e,
+	0x0016, 0x9006, 0x2009, 0x1848, 0x210c, 0xd1a4, 0x0148, 0x2009,
+	0x0029, 0x080c, 0xe73a, 0x6010, 0x2058, 0xb800, 0xc0e5, 0xb802,
+	0x001e, 0x004e, 0x6007, 0x0001, 0x00f0, 0x080c, 0xe5cd, 0x0140,
+	0x96b4, 0xff00, 0x8637, 0x9686, 0x0006, 0x0978, 0x0804, 0xd51a,
+	0x6017, 0x1900, 0x6007, 0x0009, 0x0070, 0x080c, 0x3342, 0x1904,
+	0xd869, 0x080c, 0xe936, 0x1904, 0xd869, 0x080c, 0xda36, 0x1904,
+	0xd51a, 0x6007, 0x0012, 0x6003, 0x0001, 0x080c, 0x91f9, 0x080c,
+	0x9763, 0x0005, 0x6007, 0x0001, 0x6003, 0x0001, 0x080c, 0x91f9,
+	0x080c, 0x9763, 0x0cb0, 0x6007, 0x0005, 0x0c68, 0x080c, 0xe936,
+	0x1904, 0xd869, 0x080c, 0x3342, 0x1904, 0xd869, 0x080c, 0xda36,
+	0x1904, 0xd51a, 0x6007, 0x0020, 0x6003, 0x0001, 0x080c, 0x91f9,
+	0x080c, 0x9763, 0x0005, 0x080c, 0x3342, 0x1904, 0xd869, 0x6007,
+	0x0023, 0x6003, 0x0001, 0x080c, 0x91f9, 0x080c, 0x9763, 0x0005,
+	0x080c, 0xe936, 0x1904, 0xd869, 0x080c, 0x3342, 0x1904, 0xd869,
+	0x080c, 0xda36, 0x1904, 0xd51a, 0x0016, 0x0026, 0x00e6, 0x2071,
+	0x0260, 0x2c08, 0x2011, 0x1820, 0x2214, 0x703c, 0x9206, 0x11e0,
+	0x2011, 0x181f, 0x2214, 0x7038, 0x9084, 0x00ff, 0x9206, 0x11a0,
+	0x7240, 0x080c, 0xcc74, 0x0570, 0x2260, 0x6008, 0x9086, 0xffff,
+	0x0120, 0x7244, 0x6008, 0x9206, 0x1528, 0x6020, 0x9086, 0x0007,
+	0x1508, 0x080c, 0xaf43, 0x04a0, 0x7244, 0x9286, 0xffff, 0x0180,
+	0x2c08, 0x080c, 0xcc74, 0x01b0, 0x2260, 0x7240, 0x6008, 0x9206,
+	0x1188, 0x6010, 0x9190, 0x0004, 0x2214, 0x9206, 0x01b8, 0x0050,
+	0x7240, 0x2c08, 0x9006, 0x080c, 0xe704, 0x1180, 0x7244, 0x9286,
+	0xffff, 0x01b0, 0x2160, 0x6007, 0x0026, 0x6017, 0x1700, 0x7214,
+	0x9296, 0xffff, 0x1180, 0x6007, 0x0025, 0x0068, 0x6020, 0x9086,
+	0x0007, 0x1d80, 0x6004, 0x9086, 0x0024, 0x1110, 0x080c, 0xaf43,
+	0x2160, 0x6007, 0x0025, 0x6003, 0x0001, 0x080c, 0x91f9, 0x080c,
+	0x9763, 0x00ee, 0x002e, 0x001e, 0x0005, 0x2001, 0x0001, 0x080c,
+	0x65d5, 0x0156, 0x0016, 0x0026, 0x0036, 0x20a9, 0x0004, 0x2019,
+	0x1805, 0x2011, 0x0276, 0x080c, 0xbefd, 0x003e, 0x002e, 0x001e,
+	0x015e, 0x0120, 0x6007, 0x0031, 0x0804, 0xd633, 0x080c, 0xbb71,
+	0x080c, 0x743e, 0x1190, 0x0006, 0x0026, 0x0036, 0x080c, 0x7458,
+	0x1138, 0x080c, 0x7724, 0x080c, 0x60ad, 0x080c, 0x736a, 0x0010,
+	0x080c, 0x7416, 0x003e, 0x002e, 0x000e, 0x0005, 0x080c, 0x3342,
+	0x1904, 0xd869, 0x080c, 0xda36, 0x1904, 0xd51a, 0x6106, 0x080c,
+	0xda52, 0x1120, 0x6007, 0x002b, 0x0804, 0xd633, 0x6007, 0x002c,
+	0x0804, 0xd633, 0x080c, 0xe936, 0x1904, 0xd869, 0x080c, 0x3342,
+	0x1904, 0xd869, 0x080c, 0xda36, 0x1904, 0xd51a, 0x6106, 0x080c,
+	0xda57, 0x1120, 0x6007, 0x002e, 0x0804, 0xd633, 0x6007, 0x002f,
+	0x0804, 0xd633, 0x080c, 0x3342, 0x1904, 0xd869, 0x00e6, 0x00d6,
+	0x00c6, 0x6010, 0x2058, 0xb904, 0x9184, 0x00ff, 0x9086, 0x0006,
+	0x0158, 0x9184, 0xff00, 0x8007, 0x9086, 0x0006, 0x0128, 0x00ce,
+	0x00de, 0x00ee, 0x0804, 0xd63a, 0x080c, 0x5761, 0xd0e4, 0x0904,
+	0xd7b4, 0x2071, 0x026c, 0x7010, 0x603a, 0x7014, 0x603e, 0x7108,
+	0x720c, 0x080c, 0x6a08, 0x0140, 0x6010, 0x2058, 0xb810, 0x9106,
+	0x1118, 0xb814, 0x9206, 0x0510, 0x080c, 0x6a04, 0x15b8, 0x2069,
+	0x1800, 0x6880, 0x9206, 0x1590, 0x687c, 0x9106, 0x1578, 0x7210,
+	0x080c, 0xcc74, 0x0590, 0x080c, 0xd921, 0x0578, 0x080c, 0xe7b6,
+	0x0560, 0x622e, 0x6007, 0x0036, 0x6003, 0x0001, 0x080c, 0x91b1,
+	0x080c, 0x9763, 0x00ce, 0x00de, 0x00ee, 0x0005, 0x7214, 0x9286,
+	0xffff, 0x0150, 0x080c, 0xcc74, 0x01c0, 0x9280, 0x0002, 0x2004,
+	0x7110, 0x9106, 0x1190, 0x08e0, 0x7210, 0x2c08, 0x9085, 0x0001,
+	0x080c, 0xe704, 0x2c10, 0x2160, 0x0140, 0x0890, 0x6007, 0x0037,
+	0x602f, 0x0009, 0x6017, 0x1500, 0x08b8, 0x6007, 0x0037, 0x602f,
+	0x0003, 0x6017, 0x1700, 0x0880, 0x6007, 0x0012, 0x0868, 0x080c,
+	0x3342, 0x1904, 0xd869, 0x6010, 0x2058, 0xb804, 0x9084, 0xff00,
+	0x8007, 0x9086, 0x0006, 0x1904, 0xd63a, 0x00e6, 0x00d6, 0x00c6,
+	0x080c, 0x5761, 0xd0e4, 0x0904, 0xd82c, 0x2069, 0x1800, 0x2071,
+	0x026c, 0x7008, 0x603a, 0x720c, 0x623e, 0x9286, 0xffff, 0x1150,
+	0x7208, 0x00c6, 0x2c08, 0x9085, 0x0001, 0x080c, 0xe704, 0x2c10,
+	0x00ce, 0x05e8, 0x080c, 0xcc74, 0x05d0, 0x7108, 0x9280, 0x0002,
+	0x2004, 0x9106, 0x15a0, 0x00c6, 0x0026, 0x2260, 0x080c, 0xc898,
+	0x002e, 0x00ce, 0x7118, 0x918c, 0xff00, 0x810f, 0x9186, 0x0001,
+	0x0178, 0x9186, 0x0005, 0x0118, 0x9186, 0x0007, 0x1198, 0x9280,
+	0x0005, 0x2004, 0x9005, 0x0170, 0x080c, 0xd921, 0x0904, 0xd7ad,
+	0x0056, 0x7510, 0x7614, 0x080c, 0xe7cf, 0x005e, 0x00ce, 0x00de,
+	0x00ee, 0x0005, 0x6007, 0x003b, 0x602f, 0x0009, 0x6017, 0x2a00,
+	0x6003, 0x0001, 0x080c, 0x91b1, 0x080c, 0x9763, 0x0c78, 0x6007,
+	0x003b, 0x602f, 0x0003, 0x6017, 0x0300, 0x6003, 0x0001, 0x080c,
+	0x91b1, 0x080c, 0x9763, 0x0c10, 0x6007, 0x003b, 0x602f, 0x000b,
+	0x6017, 0x0000, 0x0804, 0xd784, 0x00e6, 0x0026, 0x080c, 0x69ca,
+	0x0550, 0x080c, 0x6966, 0x080c, 0xe9a8, 0x1518, 0x2071, 0x1800,
+	0x70dc, 0x9085, 0x0003, 0x70de, 0x00f6, 0x2079, 0x0100, 0x72b0,
+	0x9284, 0x00ff, 0x707e, 0x78e6, 0x9284, 0xff00, 0x7280, 0x9205,
+	0x7082, 0x78ea, 0x00fe, 0x70e7, 0x0000, 0x080c, 0x6a08, 0x0120,
+	0x2011, 0x19ff, 0x2013, 0x07d0, 0xd0ac, 0x1128, 0x080c, 0x2ff5,
+	0x0010, 0x080c, 0xe9da, 0x002e, 0x00ee, 0x080c, 0xaf43, 0x0804,
+	0xd639, 0x080c, 0xaf43, 0x0005, 0x2600, 0x0002, 0xd880, 0xd8b1,
+	0xd8c2, 0xd880, 0xd880, 0xd882, 0xd8d3, 0xd880, 0xd880, 0xd880,
+	0xd89f, 0xd880, 0xd880, 0xd880, 0xd8de, 0xd8eb, 0xd91c, 0xd880,
+	0x080c, 0x0dd5, 0x080c, 0xe936, 0x1d20, 0x080c, 0x3342, 0x1d08,
+	0x080c, 0xda36, 0x1148, 0x7038, 0x6016, 0x6007, 0x0045, 0x6003,
+	0x0001, 0x080c, 0x91f9, 0x0005, 0x080c, 0x321e, 0x080c, 0xd39d,
+	0x6007, 0x0001, 0x6003, 0x0001, 0x080c, 0x91f9, 0x0005, 0x080c,
+	0xe936, 0x1938, 0x080c, 0x3342, 0x1920, 0x080c, 0xda36, 0x1d60,
+	0x703c, 0x6016, 0x6007, 0x004a, 0x6003, 0x0001, 0x080c, 0x91f9,
+	0x0005, 0x080c, 0x3342, 0x1904, 0xd869, 0x2009, 0x0041, 0x080c,
+	0xe9e3, 0x6007, 0x0047, 0x6003, 0x0001, 0x080c, 0x91f9, 0x080c,
+	0x9763, 0x0005, 0x080c, 0x3342, 0x1904, 0xd869, 0x2009, 0x0042,
+	0x080c, 0xe9e3, 0x6007, 0x0047, 0x6003, 0x0001, 0x080c, 0x91f9,
+	0x080c, 0x9763, 0x0005, 0x080c, 0x3342, 0x1904, 0xd869, 0x2009,
+	0x0046, 0x080c, 0xe9e3, 0x080c, 0xaf43, 0x0005, 0x080c, 0xd93e,
+	0x0904, 0xd869, 0x6007, 0x004e, 0x6003, 0x0001, 0x080c, 0x91f9,
+	0x080c, 0x9763, 0x0005, 0x6007, 0x004f, 0x6017, 0x0000, 0x7134,
+	0x918c, 0x00ff, 0x81ff, 0x0508, 0x9186, 0x0001, 0x1160, 0x7140,
+	0x2001, 0x19bc, 0x2004, 0x9106, 0x11b0, 0x7144, 0x2001, 0x19bd,
+	0x2004, 0x9106, 0x0190, 0x9186, 0x0002, 0x1168, 0x2011, 0x0276,
+	0x20a9, 0x0004, 0x6010, 0x0096, 0x2048, 0x2019, 0x000a, 0x080c,
+	0xbf11, 0x009e, 0x0110, 0x6017, 0x0001, 0x6003, 0x0001, 0x080c,
+	0x91f9, 0x080c, 0x9763, 0x0005, 0x6007, 0x0050, 0x703c, 0x6016,
+	0x0ca0, 0x0016, 0x00e6, 0x2071, 0x0260, 0x00b6, 0x00c6, 0x2260,
+	0x6010, 0x2058, 0xb8cc, 0xd084, 0x0150, 0x7128, 0x6044, 0x9106,
+	0x1120, 0x712c, 0x6048, 0x9106, 0x0110, 0x9006, 0x0010, 0x9085,
+	0x0001, 0x00ce, 0x00be, 0x00ee, 0x001e, 0x0005, 0x0016, 0x0096,
+	0x0086, 0x00e6, 0x01c6, 0x01d6, 0x0126, 0x2091, 0x8000, 0x2071,
+	0x1800, 0x7090, 0x908a, 0x00f9, 0x16e8, 0x20e1, 0x0000, 0x2001,
+	0x199f, 0x2003, 0x0000, 0x080c, 0x1018, 0x05a0, 0x2900, 0x6016,
+	0x7090, 0x8004, 0xa816, 0x908a, 0x001e, 0x02d0, 0xa833, 0x001e,
+	0x20a9, 0x001e, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x001b, 0x20a0,
+	0x2001, 0x199f, 0x0016, 0x200c, 0x0471, 0x001e, 0x2940, 0x080c,
+	0x1018, 0x01c0, 0x2900, 0xa006, 0x2100, 0x81ff, 0x0180, 0x0c18,
+	0xa832, 0x20a8, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x001b, 0x20a0,
+	0x2001, 0x199f, 0x0016, 0x200c, 0x00b1, 0x001e, 0x0000, 0x9085,
+	0x0001, 0x0048, 0x2071, 0x1800, 0x7093, 0x0000, 0x6014, 0x2048,
+	0x080c, 0x0fb1, 0x9006, 0x012e, 0x01de, 0x01ce, 0x00ee, 0x008e,
+	0x009e, 0x001e, 0x0005, 0x0006, 0x0016, 0x0026, 0x0036, 0x00c6,
+	0x918c, 0xffff, 0x11a8, 0x080c, 0x23e9, 0x2099, 0x026c, 0x2001,
+	0x0014, 0x3518, 0x9312, 0x1218, 0x23a8, 0x4003, 0x00f8, 0x20a8,
+	0x4003, 0x22a8, 0x8108, 0x080c, 0x23e9, 0x2099, 0x0260, 0x0ca8,
+	0x080c, 0x23e9, 0x2061, 0x199f, 0x6004, 0x2098, 0x6008, 0x3518,
+	0x9312, 0x1218, 0x23a8, 0x4003, 0x0048, 0x20a8, 0x4003, 0x22a8,
+	0x8108, 0x080c, 0x23e9, 0x2099, 0x0260, 0x0ca8, 0x2061, 0x199f,
+	0x2019, 0x0280, 0x3300, 0x931e, 0x0110, 0x6006, 0x0020, 0x2001,
+	0x0260, 0x6006, 0x8108, 0x2162, 0x9292, 0x0021, 0x9296, 0xffff,
+	0x620a, 0x00ce, 0x003e, 0x002e, 0x001e, 0x000e, 0x0005, 0x0006,
+	0x0016, 0x0026, 0x0036, 0x00c6, 0x81ff, 0x11b8, 0x080c, 0x2401,
+	0x20a1, 0x024c, 0x2001, 0x0014, 0x3518, 0x9312, 0x1218, 0x23a8,
+	0x4003, 0x0418, 0x20a8, 0x4003, 0x82ff, 0x01f8, 0x22a8, 0x8108,
+	0x080c, 0x2401, 0x20a1, 0x0240, 0x0c98, 0x080c, 0x2401, 0x2061,
+	0x19a2, 0x6004, 0x20a0, 0x6008, 0x3518, 0x9312, 0x1218, 0x23a8,
+	0x4003, 0x0058, 0x20a8, 0x4003, 0x82ff, 0x0138, 0x22a8, 0x8108,
+	0x080c, 0x2401, 0x20a1, 0x0240, 0x0c98, 0x2061, 0x19a2, 0x2019,
+	0x0260, 0x3400, 0x931e, 0x0110, 0x6006, 0x0020, 0x2001, 0x0240,
 	0x6006, 0x8108, 0x2162, 0x9292, 0x0021, 0x9296, 0xffff, 0x620a,
-	0x00ce, 0x003e, 0x002e, 0x001e, 0x000e, 0x0005, 0x0006, 0x0016,
-	0x0026, 0x0036, 0x00c6, 0x81ff, 0x11b8, 0x080c, 0x23d0, 0x20a1,
-	0x024c, 0x2001, 0x0014, 0x3518, 0x9312, 0x1218, 0x23a8, 0x4003,
-	0x0418, 0x20a8, 0x4003, 0x82ff, 0x01f8, 0x22a8, 0x8108, 0x080c,
-	0x23d0, 0x20a1, 0x0240, 0x0c98, 0x080c, 0x23d0, 0x2061, 0x19a2,
-	0x6004, 0x20a0, 0x6008, 0x3518, 0x9312, 0x1218, 0x23a8, 0x4003,
-	0x0058, 0x20a8, 0x4003, 0x82ff, 0x0138, 0x22a8, 0x8108, 0x080c,
-	0x23d0, 0x20a1, 0x0240, 0x0c98, 0x2061, 0x19a2, 0x2019, 0x0260,
-	0x3400, 0x931e, 0x0110, 0x6006, 0x0020, 0x2001, 0x0240, 0x6006,
-	0x8108, 0x2162, 0x9292, 0x0021, 0x9296, 0xffff, 0x620a, 0x00ce,
-	0x003e, 0x002e, 0x001e, 0x000e, 0x0005, 0x00b6, 0x0066, 0x6610,
-	0x2658, 0xbe04, 0x96b4, 0xff00, 0x8637, 0x9686, 0x0006, 0x0170,
-	0x9686, 0x0004, 0x0158, 0xbe04, 0x96b4, 0x00ff, 0x9686, 0x0006,
-	0x0128, 0x9686, 0x0004, 0x0110, 0x9085, 0x0001, 0x006e, 0x00be,
-	0x0005, 0x00d6, 0x080c, 0xd97d, 0x00de, 0x0005, 0x00d6, 0x080c,
-	0xd98a, 0x1520, 0x680c, 0x908c, 0xff00, 0x6820, 0x9084, 0x00ff,
-	0x9115, 0x6216, 0x6824, 0x602e, 0xd1e4, 0x0130, 0x9006, 0x080c,
-	0xe9b2, 0x2009, 0x0001, 0x0078, 0xd1ec, 0x0180, 0x6920, 0x918c,
-	0x00ff, 0x6824, 0x080c, 0x284b, 0x1148, 0x2001, 0x0001, 0x080c,
-	0xe9b2, 0x2110, 0x900e, 0x080c, 0x3215, 0x0018, 0x9085, 0x0001,
-	0x0008, 0x9006, 0x00de, 0x0005, 0x00b6, 0x00c6, 0x080c, 0xaead,
-	0x05a8, 0x0016, 0x0026, 0x00c6, 0x2011, 0x0263, 0x2204, 0x8211,
-	0x220c, 0x080c, 0x284b, 0x1578, 0x080c, 0x65b5, 0x1560, 0xbe12,
-	0xbd16, 0x00ce, 0x002e, 0x001e, 0x2b00, 0x6012, 0x080c, 0xe7e5,
-	0x11d8, 0x080c, 0x32f0, 0x11c0, 0x080c, 0xd8e5, 0x0510, 0x2001,
-	0x0007, 0x080c, 0x6566, 0x2001, 0x0007, 0x080c, 0x6592, 0x6017,
-	0x0000, 0x6023, 0x0001, 0x6007, 0x0001, 0x6003, 0x0001, 0x080c,
-	0x9140, 0x080c, 0x96a6, 0x0010, 0x080c, 0xae5f, 0x9085, 0x0001,
-	0x00ce, 0x00be, 0x0005, 0x080c, 0xae5f, 0x00ce, 0x002e, 0x001e,
-	0x0ca8, 0x080c, 0xae5f, 0x9006, 0x0c98, 0x2069, 0x026d, 0x6800,
-	0x9082, 0x0010, 0x1228, 0x6017, 0x0000, 0x9085, 0x0001, 0x0008,
-	0x9006, 0x0005, 0x6017, 0x0000, 0x2069, 0x026c, 0x6808, 0x9084,
-	0xff00, 0x9086, 0x0800, 0x1190, 0x6904, 0x9186, 0x0018, 0x0118,
-	0x9186, 0x0014, 0x1158, 0x810f, 0x6800, 0x9084, 0x00ff, 0x910d,
-	0x615a, 0x908e, 0x0014, 0x0110, 0x908e, 0x0010, 0x0005, 0x6004,
-	0x90b2, 0x0053, 0x1a0c, 0x0dd5, 0x91b6, 0x0013, 0x1130, 0x2008,
-	0x91b2, 0x0040, 0x1a04, 0xdad4, 0x0092, 0x91b6, 0x0027, 0x0120,
-	0x91b6, 0x0014, 0x190c, 0x0dd5, 0x2001, 0x0007, 0x080c, 0x6592,
-	0x080c, 0x959a, 0x080c, 0xae90, 0x080c, 0x96a6, 0x0005, 0xda07,
-	0xda09, 0xda07, 0xda07, 0xda07, 0xda09, 0xda18, 0xdacd, 0xda6a,
-	0xdacd, 0xda7e, 0xdacd, 0xda18, 0xdacd, 0xdac5, 0xdacd, 0xdac5,
-	0xdacd, 0xdacd, 0xda07, 0xda07, 0xda07, 0xda07, 0xda07, 0xda07,
-	0xda07, 0xda07, 0xda07, 0xda07, 0xda07, 0xda09, 0xda07, 0xdacd,
-	0xda07, 0xda07, 0xdacd, 0xda07, 0xdaca, 0xdacd, 0xda07, 0xda07,
-	0xda07, 0xda07, 0xdacd, 0xdacd, 0xda07, 0xdacd, 0xdacd, 0xda07,
-	0xda13, 0xda07, 0xda07, 0xda07, 0xda07, 0xdac9, 0xdacd, 0xda07,
-	0xda07, 0xdacd, 0xdacd, 0xda07, 0xda07, 0xda07, 0xda07, 0x080c,
-	0x0dd5, 0x080c, 0x959a, 0x080c, 0xd272, 0x6003, 0x0002, 0x080c,
-	0x96a6, 0x0804, 0xdad3, 0x9006, 0x080c, 0x6552, 0x0804, 0xdacd,
-	0x080c, 0x6981, 0x1904, 0xdacd, 0x9006, 0x080c, 0x6552, 0x6010,
-	0x2058, 0xb810, 0x9086, 0x00ff, 0x1140, 0x00f6, 0x2079, 0x1800,
-	0x78a8, 0x8000, 0x78aa, 0x00fe, 0x0428, 0x6010, 0x2058, 0xb8c0,
-	0x9005, 0x1178, 0x080c, 0xd25a, 0x1904, 0xdacd, 0x0036, 0x0046,
-	0xbba0, 0x2021, 0x0007, 0x080c, 0x4cd5, 0x004e, 0x003e, 0x0804,
-	0xdacd, 0x080c, 0x3321, 0x1904, 0xdacd, 0x2001, 0x1800, 0x2004,
-	0x9086, 0x0002, 0x1138, 0x00f6, 0x2079, 0x1800, 0x78a8, 0x8000,
-	0x78aa, 0x00fe, 0x2001, 0x0002, 0x080c, 0x6566, 0x080c, 0x959a,
-	0x6023, 0x0001, 0x6003, 0x0001, 0x6007, 0x0002, 0x080c, 0x9140,
-	0x080c, 0x96a6, 0x6110, 0x2158, 0x2009, 0x0001, 0x080c, 0x8507,
-	0x0804, 0xdad3, 0x6610, 0x2658, 0xbe04, 0x96b4, 0xff00, 0x8637,
-	0x9686, 0x0006, 0x0904, 0xdacd, 0x9686, 0x0004, 0x0904, 0xdacd,
-	0x080c, 0x8cc3, 0x2001, 0x0004, 0x0804, 0xdacb, 0x2001, 0x1800,
-	0x2004, 0x9086, 0x0003, 0x1158, 0x0036, 0x0046, 0x6010, 0x2058,
-	0xbba0, 0x2021, 0x0006, 0x080c, 0x4cd5, 0x004e, 0x003e, 0x2001,
-	0x0006, 0x080c, 0xdaf1, 0x6610, 0x2658, 0xbe04, 0x0066, 0x96b4,
-	0xff00, 0x8637, 0x9686, 0x0006, 0x006e, 0x0168, 0x2001, 0x0006,
-	0x080c, 0x6592, 0x9284, 0x00ff, 0x908e, 0x0007, 0x1120, 0x2001,
-	0x0006, 0x080c, 0x6566, 0x080c, 0x6981, 0x11f8, 0x2001, 0x1837,
-	0x2004, 0xd0a4, 0x01d0, 0xbe04, 0x96b4, 0x00ff, 0x9686, 0x0006,
-	0x01a0, 0x00f6, 0x2079, 0x1800, 0x78a8, 0x8000, 0x78aa, 0x00fe,
-	0x0804, 0xda52, 0x2001, 0x0004, 0x0030, 0x2001, 0x0006, 0x0449,
-	0x0020, 0x0018, 0x0010, 0x080c, 0x6592, 0x080c, 0x959a, 0x080c,
-	0xae5f, 0x080c, 0x96a6, 0x0005, 0x2600, 0x0002, 0xdae8, 0xdae8,
-	0xdae8, 0xdae8, 0xdae8, 0xdaea, 0xdae8, 0xdaea, 0xdae8, 0xdae8,
-	0xdaea, 0xdae8, 0xdae8, 0xdae8, 0xdaea, 0xdaea, 0xdaea, 0xdaea,
-	0x080c, 0x0dd5, 0x080c, 0x959a, 0x080c, 0xae5f, 0x080c, 0x96a6,
-	0x0005, 0x0016, 0x00b6, 0x00d6, 0x6110, 0x2158, 0xb900, 0xd184,
-	0x0138, 0x080c, 0x6566, 0x9006, 0x080c, 0x6552, 0x080c, 0x31f5,
-	0x00de, 0x00be, 0x001e, 0x0005, 0x6610, 0x2658, 0xb804, 0x9084,
-	0xff00, 0x8007, 0x90b2, 0x000c, 0x1a0c, 0x0dd5, 0x91b6, 0x0015,
-	0x1110, 0x003b, 0x0028, 0x91b6, 0x0016, 0x190c, 0x0dd5, 0x006b,
-	0x0005, 0xb90a, 0xb90a, 0xb90a, 0xb90a, 0xdb86, 0xb90a, 0xdb70,
-	0xdb31, 0xb90a, 0xb90a, 0xb90a, 0xb90a, 0xb90a, 0xb90a, 0xb90a,
-	0xb90a, 0xdb86, 0xb90a, 0xdb70, 0xdb77, 0xb90a, 0xb90a, 0xb90a,
-	0xb90a, 0x00f6, 0x080c, 0x6981, 0x11d8, 0x080c, 0xd25a, 0x11c0,
-	0x6010, 0x905d, 0x01a8, 0xb8c0, 0x9005, 0x0190, 0x9006, 0x080c,
-	0x6552, 0x2001, 0x0002, 0x080c, 0x6566, 0x6023, 0x0001, 0x6003,
-	0x0001, 0x6007, 0x0002, 0x080c, 0x9140, 0x080c, 0x96a6, 0x00f0,
-	0x2011, 0x0263, 0x2204, 0x8211, 0x220c, 0x080c, 0x284b, 0x11b0,
-	0x080c, 0x6616, 0x0118, 0x080c, 0xae5f, 0x0080, 0xb810, 0x0006,
-	0xb814, 0x0006, 0xb8c0, 0x0006, 0x080c, 0x6047, 0x000e, 0xb8c2,
-	0x000e, 0xb816, 0x000e, 0xb812, 0x080c, 0xae5f, 0x00fe, 0x0005,
-	0x6604, 0x96b6, 0x001e, 0x1110, 0x080c, 0xae5f, 0x0005, 0x080c,
-	0xbc95, 0x1148, 0x6003, 0x0001, 0x6007, 0x0001, 0x080c, 0x9140,
-	0x080c, 0x96a6, 0x0010, 0x080c, 0xae5f, 0x0005, 0x0804, 0xae5f,
-	0x6004, 0x908a, 0x0053, 0x1a0c, 0x0dd5, 0x080c, 0x959a, 0x080c,
-	0xae90, 0x080c, 0x96a6, 0x0005, 0x9182, 0x0040, 0x0002, 0xdbab,
-	0xdbab, 0xdbab, 0xdbab, 0xdbad, 0xdbab, 0xdbab, 0xdbab, 0xdbab,
-	0xdbab, 0xdbab, 0xdbab, 0xdbab, 0xdbab, 0xdbab, 0xdbab, 0xdbab,
-	0xdbab, 0xdbab, 0xdbab, 0x080c, 0x0dd5, 0x0096, 0x00b6, 0x00d6,
-	0x00e6, 0x00f6, 0x0046, 0x0026, 0x6210, 0x2258, 0xb8bc, 0x9005,
-	0x11a8, 0x6106, 0x2071, 0x0260, 0x7444, 0x94a4, 0xff00, 0x0904,
-	0xdc13, 0x080c, 0xe9a6, 0x1170, 0x9486, 0x2000, 0x1158, 0x2009,
-	0x0001, 0x2011, 0x0200, 0x080c, 0x86e3, 0x0020, 0x9026, 0x080c,
-	0xe82a, 0x0c38, 0x080c, 0x0fff, 0x090c, 0x0dd5, 0x6003, 0x0007,
-	0xa867, 0x010d, 0x9006, 0xa802, 0xa86a, 0xac8a, 0x2c00, 0xa88e,
-	0x6008, 0xa8e2, 0x6010, 0x2058, 0xb8a0, 0x7130, 0xa97a, 0x0016,
-	0xa876, 0xa87f, 0x0000, 0xa883, 0x0000, 0xa887, 0x0036, 0x080c,
-	0x6c94, 0x001e, 0x080c, 0xe9a6, 0x1904, 0xdc73, 0x9486, 0x2000,
-	0x1130, 0x2019, 0x0017, 0x080c, 0xe55d, 0x0804, 0xdc73, 0x9486,
-	0x0200, 0x1120, 0x080c, 0xe4f9, 0x0804, 0xdc73, 0x9486, 0x0400,
-	0x0120, 0x9486, 0x1000, 0x1904, 0xdc73, 0x2019, 0x0002, 0x080c,
-	0xe514, 0x0804, 0xdc73, 0x2069, 0x1a70, 0x6a00, 0xd284, 0x0904,
-	0xdcdd, 0x9284, 0x0300, 0x1904, 0xdcd6, 0x6804, 0x9005, 0x0904,
-	0xdcbe, 0x2d78, 0x6003, 0x0007, 0x080c, 0x1018, 0x0904, 0xdc7f,
-	0x7800, 0xd08c, 0x1118, 0x7804, 0x8001, 0x7806, 0x6017, 0x0000,
-	0x2001, 0x180f, 0x2004, 0xd084, 0x1904, 0xdce1, 0x9006, 0xa802,
-	0xa867, 0x0116, 0xa86a, 0x6008, 0xa8e2, 0x2c00, 0xa87a, 0x6010,
-	0x2058, 0xb8a0, 0x7130, 0xa9b6, 0xa876, 0xb928, 0xa9ba, 0xb92c,
-	0xa9be, 0xb930, 0xa9c2, 0xb934, 0xa9c6, 0xa883, 0x003d, 0x7044,
-	0x9084, 0x0003, 0x9080, 0xdc7b, 0x2005, 0xa87e, 0x20a9, 0x000a,
-	0x2001, 0x0270, 0xaa5c, 0x9290, 0x0021, 0x2009, 0x0205, 0x200b,
-	0x0080, 0x20e1, 0x0000, 0xab60, 0x23e8, 0x2098, 0x22a0, 0x4003,
-	0x200b, 0x0000, 0x2001, 0x027a, 0x200c, 0xa9b2, 0x8000, 0x200c,
-	0xa9ae, 0x080c, 0x6c94, 0x002e, 0x004e, 0x00fe, 0x00ee, 0x00de,
-	0x00be, 0x009e, 0x0005, 0x0000, 0x0080, 0x0040, 0x0000, 0x2001,
-	0x1810, 0x2004, 0xd084, 0x0120, 0x080c, 0x0fff, 0x1904, 0xdc28,
-	0x6017, 0xf100, 0x6003, 0x0001, 0x6007, 0x0041, 0x080c, 0x90f8,
-	0x080c, 0x96a6, 0x0c00, 0x2069, 0x0260, 0x6848, 0x9084, 0xff00,
-	0x9086, 0x1200, 0x1198, 0x686c, 0x9084, 0x00ff, 0x0016, 0x6114,
-	0x918c, 0xf700, 0x910d, 0x6116, 0x001e, 0x6003, 0x0001, 0x6007,
-	0x0043, 0x080c, 0x90f8, 0x080c, 0x96a6, 0x0828, 0x6868, 0x602e,
-	0x686c, 0x6032, 0x6017, 0xf200, 0x6003, 0x0001, 0x6007, 0x0041,
-	0x080c, 0x90f8, 0x080c, 0x96a6, 0x0804, 0xdc73, 0x2001, 0x180e,
-	0x2004, 0xd0ec, 0x0120, 0x2011, 0x8049, 0x080c, 0x4b1e, 0x6017,
-	0xf300, 0x0010, 0x6017, 0xf100, 0x6003, 0x0001, 0x6007, 0x0041,
-	0x080c, 0x90f8, 0x080c, 0x96a6, 0x0804, 0xdc73, 0x6017, 0xf500,
-	0x0c98, 0x6017, 0xf600, 0x0804, 0xdc93, 0x6017, 0xf200, 0x0804,
-	0xdc93, 0xa867, 0x0146, 0xa86b, 0x0000, 0x6008, 0xa886, 0x2c00,
-	0xa87a, 0x7044, 0x9084, 0x0003, 0x9080, 0xdc7b, 0x2005, 0xa87e,
-	0x2928, 0x6010, 0x2058, 0xb8a0, 0xa876, 0xb828, 0xa88a, 0xb82c,
-	0xa88e, 0xb830, 0xa892, 0xb834, 0xa896, 0xa883, 0x003d, 0x2009,
-	0x0205, 0x2104, 0x9085, 0x0080, 0x200a, 0x20e1, 0x0000, 0x2011,
-	0x0210, 0x2214, 0x9294, 0x0fff, 0xaaa2, 0x9282, 0x0111, 0x1a0c,
-	0x0dd5, 0x8210, 0x821c, 0x2001, 0x026c, 0x2098, 0xa860, 0x20e8,
-	0xa85c, 0x9080, 0x0029, 0x20a0, 0x2011, 0xdd5d, 0x2041, 0x0001,
-	0x223d, 0x9784, 0x00ff, 0x9322, 0x1208, 0x2300, 0x20a8, 0x4003,
-	0x931a, 0x0530, 0x8210, 0xd7fc, 0x1130, 0x8d68, 0x2d0a, 0x2001,
-	0x0260, 0x2098, 0x0c68, 0x2950, 0x080c, 0x1018, 0x0170, 0x2900,
-	0xb002, 0xa867, 0x0147, 0xa86b, 0x0000, 0xa860, 0x20e8, 0xa85c,
-	0x9080, 0x001b, 0x20a0, 0x8840, 0x08d8, 0x2548, 0xa800, 0x902d,
-	0x0118, 0x080c, 0x1031, 0x0cc8, 0x080c, 0x1031, 0x0804, 0xdc7f,
-	0x2548, 0x8847, 0x9885, 0x0046, 0xa866, 0x2009, 0x0205, 0x200b,
-	0x0000, 0x080c, 0xe58c, 0x0804, 0xdc73, 0x8010, 0x0004, 0x801a,
-	0x0006, 0x8018, 0x0008, 0x8016, 0x000a, 0x8014, 0x9186, 0x0013,
-	0x1160, 0x6004, 0x908a, 0x0054, 0x1a0c, 0x0dd5, 0x9082, 0x0040,
-	0x0a0c, 0x0dd5, 0x2008, 0x0804, 0xde0f, 0x9186, 0x0051, 0x0108,
-	0x00c0, 0x2001, 0x0109, 0x2004, 0xd084, 0x0904, 0xddbf, 0x0126,
-	0x2091, 0x2800, 0x0006, 0x0016, 0x0026, 0x080c, 0x8fdd, 0x002e,
-	0x001e, 0x000e, 0x012e, 0x6000, 0x9086, 0x0002, 0x1580, 0x0804,
-	0xde58, 0x9186, 0x0027, 0x0530, 0x9186, 0x0048, 0x0128, 0x9186,
-	0x0014, 0x0500, 0x190c, 0x0dd5, 0x2001, 0x0109, 0x2004, 0xd084,
-	0x01f0, 0x00c6, 0x0126, 0x2091, 0x2800, 0x00c6, 0x2061, 0x0100,
-	0x0006, 0x0016, 0x0026, 0x080c, 0x8fdd, 0x002e, 0x001e, 0x000e,
-	0x00ce, 0x012e, 0x00ce, 0x6000, 0x9086, 0x0004, 0x190c, 0x0dd5,
-	0x0804, 0xdf3b, 0x6004, 0x9082, 0x0040, 0x2008, 0x001a, 0x080c,
-	0xaef5, 0x0005, 0xddd6, 0xddd8, 0xddd8, 0xddff, 0xddd6, 0xddd6,
-	0xddd6, 0xddd6, 0xddd6, 0xddd6, 0xddd6, 0xddd6, 0xddd6, 0xddd6,
-	0xddd6, 0xddd6, 0xddd6, 0xddd6, 0xddd6, 0xddd6, 0x080c, 0x0dd5,
-	0x080c, 0x959a, 0x080c, 0x96a6, 0x0036, 0x0096, 0x6014, 0x904d,
-	0x01d8, 0x080c, 0xcb5a, 0x01c0, 0x6003, 0x0002, 0x6010, 0x00b6,
-	0x2058, 0xb800, 0x00be, 0xd0bc, 0x1178, 0x2019, 0x0004, 0x080c,
-	0xe58c, 0x6017, 0x0000, 0x6018, 0x9005, 0x1120, 0x2001, 0x1986,
-	0x2004, 0x601a, 0x6003, 0x0007, 0x009e, 0x003e, 0x0005, 0x0096,
-	0x080c, 0x959a, 0x080c, 0x96a6, 0x080c, 0xcb5a, 0x0120, 0x6014,
-	0x2048, 0x080c, 0x1031, 0x080c, 0xae90, 0x009e, 0x0005, 0x0002,
-	0xde24, 0xde3b, 0xde26, 0xde52, 0xde24, 0xde24, 0xde24, 0xde24,
-	0xde24, 0xde24, 0xde24, 0xde24, 0xde24, 0xde24, 0xde24, 0xde24,
-	0xde24, 0xde24, 0xde24, 0xde24, 0x080c, 0x0dd5, 0x0096, 0x080c,
-	0x959a, 0x6014, 0x2048, 0xa87c, 0xd0b4, 0x0138, 0x6003, 0x0007,
-	0x2009, 0x0043, 0x080c, 0xaeda, 0x0010, 0x6003, 0x0004, 0x080c,
-	0x96a6, 0x009e, 0x0005, 0x080c, 0x959a, 0x080c, 0xcb5a, 0x0138,
-	0x6114, 0x0096, 0x2148, 0xa97c, 0x009e, 0xd1ec, 0x1138, 0x080c,
-	0x86b8, 0x080c, 0xae5f, 0x080c, 0x96a6, 0x0005, 0x080c, 0xe7ee,
-	0x0db0, 0x0cc8, 0x080c, 0x959a, 0x2009, 0x0041, 0x0804, 0xdfc3,
-	0x9182, 0x0040, 0x0002, 0xde6f, 0xde71, 0xde6f, 0xde6f, 0xde6f,
-	0xde6f, 0xde6f, 0xde6f, 0xde6f, 0xde6f, 0xde6f, 0xde6f, 0xde6f,
-	0xde6f, 0xde6f, 0xde6f, 0xde6f, 0xde72, 0xde6f, 0xde6f, 0x080c,
-	0x0dd5, 0x0005, 0x00d6, 0x080c, 0x86b8, 0x00de, 0x080c, 0xe846,
-	0x080c, 0xae5f, 0x0005, 0x9182, 0x0040, 0x0002, 0xde92, 0xde92,
-	0xde92, 0xde92, 0xde92, 0xde92, 0xde92, 0xde92, 0xde92, 0xde94,
-	0xdf03, 0xde92, 0xde92, 0xde92, 0xde92, 0xdf03, 0xde92, 0xde92,
-	0xde92, 0xde92, 0x080c, 0x0dd5, 0x2001, 0x0105, 0x2004, 0x9084,
-	0x1800, 0x01c8, 0x2001, 0x0132, 0x200c, 0x2001, 0x0131, 0x2004,
-	0x9105, 0x1904, 0xdf03, 0x2009, 0x180c, 0x2104, 0xd0d4, 0x0904,
-	0xdf03, 0xc0d4, 0x200a, 0x2009, 0x0105, 0x2104, 0x9084, 0xe7fd,
-	0x9085, 0x0010, 0x200a, 0x2001, 0x1867, 0x2004, 0xd0e4, 0x1528,
-	0x603b, 0x0000, 0x080c, 0x9656, 0x6014, 0x0096, 0x2048, 0xa87c,
-	0xd0fc, 0x0188, 0x908c, 0x0003, 0x918e, 0x0002, 0x0508, 0x2001,
-	0x180c, 0x2004, 0xd0d4, 0x11e0, 0x080c, 0x97d4, 0x2009, 0x0041,
-	0x009e, 0x0804, 0xdfc3, 0x080c, 0x97d4, 0x6003, 0x0007, 0x601b,
-	0x0000, 0x080c, 0x86b8, 0x009e, 0x0005, 0x2001, 0x0100, 0x2004,
-	0x9082, 0x0005, 0x0aa8, 0x2001, 0x011f, 0x2004, 0x603a, 0x0890,
-	0x2001, 0x180c, 0x200c, 0xc1d4, 0x2102, 0xd1cc, 0x0110, 0x080c,
-	0x2c5f, 0x080c, 0x97d4, 0x6014, 0x2048, 0xa97c, 0xd1ec, 0x1130,
-	0x080c, 0x86b8, 0x080c, 0xae5f, 0x009e, 0x0005, 0x080c, 0xe7ee,
-	0x0db8, 0x009e, 0x0005, 0x2001, 0x180c, 0x200c, 0xc1d4, 0x2102,
-	0x0036, 0x080c, 0x9656, 0x080c, 0x97d4, 0x6014, 0x0096, 0x2048,
-	0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x0188, 0xa87c,
-	0x9084, 0x0003, 0x9086, 0x0002, 0x0140, 0xa8ac, 0x6330, 0x931a,
-	0x6332, 0xa8b0, 0x632c, 0x931b, 0x632e, 0x6003, 0x0002, 0x0080,
-	0x2019, 0x0004, 0x080c, 0xe58c, 0x6018, 0x9005, 0x1128, 0x2001,
-	0x1986, 0x2004, 0x8003, 0x601a, 0x6017, 0x0000, 0x6003, 0x0007,
-	0x009e, 0x003e, 0x0005, 0x9182, 0x0040, 0x0002, 0xdf52, 0xdf52,
-	0xdf52, 0xdf52, 0xdf52, 0xdf52, 0xdf52, 0xdf52, 0xdf54, 0xdf52,
-	0xdf52, 0xdf52, 0xdf52, 0xdf52, 0xdf52, 0xdf52, 0xdf52, 0xdf52,
-	0xdf52, 0xdf9f, 0x080c, 0x0dd5, 0x6014, 0x0096, 0x2048, 0xa834,
-	0xaa38, 0x6110, 0x00b6, 0x2158, 0xb900, 0x00be, 0xd1bc, 0x1190,
-	0x920d, 0x1518, 0xa87c, 0xd0fc, 0x0128, 0x2009, 0x0041, 0x009e,
-	0x0804, 0xdfc3, 0x6003, 0x0007, 0x601b, 0x0000, 0x080c, 0x86b8,
-	0x009e, 0x0005, 0x6124, 0xd1f4, 0x1d58, 0x0006, 0x0046, 0xacac,
-	0x9422, 0xa9b0, 0x2200, 0x910b, 0x6030, 0x9420, 0x6432, 0x602c,
-	0x9109, 0x612e, 0x004e, 0x000e, 0x08d8, 0x6110, 0x00b6, 0x2158,
-	0xb900, 0x00be, 0xd1bc, 0x1178, 0x2009, 0x180e, 0x210c, 0xd19c,
-	0x0118, 0x6003, 0x0007, 0x0010, 0x6003, 0x0006, 0x00e9, 0x080c,
-	0x86ba, 0x009e, 0x0005, 0x6003, 0x0002, 0x009e, 0x0005, 0x6024,
-	0xd0f4, 0x0128, 0x080c, 0x15e7, 0x1904, 0xdf54, 0x0005, 0x6014,
-	0x0096, 0x2048, 0xa834, 0xa938, 0x009e, 0x9105, 0x1120, 0x080c,
-	0x15e7, 0x1904, 0xdf54, 0x0005, 0xd2fc, 0x0140, 0x8002, 0x8000,
-	0x8212, 0x9291, 0x0000, 0x2009, 0x0009, 0x0010, 0x2009, 0x0015,
-	0xaa9a, 0xa896, 0x0005, 0x9182, 0x0040, 0x0208, 0x0062, 0x9186,
-	0x0013, 0x0120, 0x9186, 0x0014, 0x190c, 0x0dd5, 0x6024, 0xd0dc,
-	0x090c, 0x0dd5, 0x0005, 0xdfe7, 0xdff3, 0xdfff, 0xe00b, 0xdfe7,
-	0xdfe7, 0xdfe7, 0xdfe7, 0xdfee, 0xdfe9, 0xdfe9, 0xdfe7, 0xdfe7,
-	0xdfe7, 0xdfe7, 0xdfe9, 0xdfe7, 0xdfe9, 0xdfe7, 0xdfee, 0x080c,
-	0x0dd5, 0x6024, 0xd0dc, 0x090c, 0x0dd5, 0x0005, 0x6014, 0x9005,
-	0x190c, 0x0dd5, 0x0005, 0x6003, 0x0001, 0x6106, 0x080c, 0x90f8,
-	0x0126, 0x2091, 0x8000, 0x080c, 0x96a6, 0x012e, 0x0005, 0x6003,
-	0x0001, 0x6106, 0x080c, 0x90f8, 0x0126, 0x2091, 0x8000, 0x080c,
-	0x96a6, 0x012e, 0x0005, 0x6003, 0x0003, 0x6106, 0x2c10, 0x080c,
-	0x1bba, 0x0126, 0x2091, 0x8000, 0x080c, 0x915d, 0x080c, 0x97d4,
-	0x012e, 0x0005, 0x0126, 0x2091, 0x8000, 0x0036, 0x0096, 0x9182,
-	0x0040, 0x0023, 0x009e, 0x003e, 0x012e, 0x0005, 0xe03a, 0xe03c,
-	0xe04e, 0xe068, 0xe03a, 0xe03a, 0xe03a, 0xe03a, 0xe03a, 0xe03a,
-	0xe03a, 0xe03a, 0xe03a, 0xe03a, 0xe03a, 0xe03a, 0xe03a, 0xe03a,
-	0xe03a, 0xe03a, 0x080c, 0x0dd5, 0x6014, 0x2048, 0xa87c, 0xd0fc,
-	0x01f8, 0x909c, 0x0003, 0x939e, 0x0003, 0x01d0, 0x6003, 0x0001,
-	0x6106, 0x080c, 0x90f8, 0x080c, 0x96a6, 0x0470, 0x6014, 0x2048,
-	0xa87c, 0xd0fc, 0x0168, 0x909c, 0x0003, 0x939e, 0x0003, 0x0140,
-	0x6003, 0x0001, 0x6106, 0x080c, 0x90f8, 0x080c, 0x96a6, 0x00e0,
-	0x901e, 0x6316, 0x631a, 0x2019, 0x0004, 0x080c, 0xe58c, 0x00a0,
-	0x6014, 0x2048, 0xa87c, 0xd0fc, 0x0d98, 0x909c, 0x0003, 0x939e,
-	0x0003, 0x0d70, 0x6003, 0x0003, 0x6106, 0x2c10, 0x080c, 0x1bba,
-	0x080c, 0x915d, 0x080c, 0x97d4, 0x0005, 0x080c, 0x959a, 0x6114,
-	0x81ff, 0x0158, 0x0096, 0x2148, 0x080c, 0xe943, 0x0036, 0x2019,
-	0x0029, 0x080c, 0xe58c, 0x003e, 0x009e, 0x080c, 0xae90, 0x080c,
-	0x96a6, 0x0005, 0x080c, 0x9656, 0x6114, 0x81ff, 0x0158, 0x0096,
-	0x2148, 0x080c, 0xe943, 0x0036, 0x2019, 0x0029, 0x080c, 0xe58c,
-	0x003e, 0x009e, 0x080c, 0xae90, 0x080c, 0x97d4, 0x0005, 0x9182,
-	0x0085, 0x0002, 0xe0b9, 0xe0b7, 0xe0b7, 0xe0c5, 0xe0b7, 0xe0b7,
-	0xe0b7, 0xe0b7, 0xe0b7, 0xe0b7, 0xe0b7, 0xe0b7, 0xe0b7, 0x080c,
-	0x0dd5, 0x6003, 0x000b, 0x6106, 0x080c, 0x90f8, 0x0126, 0x2091,
-	0x8000, 0x080c, 0x96a6, 0x012e, 0x0005, 0x0026, 0x00e6, 0x080c,
-	0xe7e5, 0x0118, 0x080c, 0xae5f, 0x0450, 0x2071, 0x0260, 0x7224,
-	0x6216, 0x2001, 0x180e, 0x2004, 0xd0e4, 0x0150, 0x6010, 0x00b6,
-	0x2058, 0xbca0, 0x00be, 0x2c00, 0x2011, 0x014e, 0x080c, 0xb180,
-	0x7220, 0x080c, 0xe432, 0x0118, 0x6007, 0x0086, 0x0040, 0x6007,
-	0x0087, 0x7224, 0x9296, 0xffff, 0x1110, 0x6007, 0x0086, 0x6003,
-	0x0001, 0x080c, 0x90f8, 0x080c, 0x96a6, 0x080c, 0x97d4, 0x00ee,
-	0x002e, 0x0005, 0x9186, 0x0013, 0x1160, 0x6004, 0x908a, 0x0085,
-	0x0a0c, 0x0dd5, 0x908a, 0x0092, 0x1a0c, 0x0dd5, 0x9082, 0x0085,
-	0x00a2, 0x9186, 0x0027, 0x0130, 0x9186, 0x0014, 0x0118, 0x080c,
-	0xaef5, 0x0050, 0x2001, 0x0007, 0x080c, 0x6592, 0x080c, 0x959a,
-	0x080c, 0xae90, 0x080c, 0x96a6, 0x0005, 0xe12a, 0xe12c, 0xe12c,
-	0xe12a, 0xe12a, 0xe12a, 0xe12a, 0xe12a, 0xe12a, 0xe12a, 0xe12a,
-	0xe12a, 0xe12a, 0x080c, 0x0dd5, 0x080c, 0x959a, 0x080c, 0xae90,
-	0x080c, 0x96a6, 0x0005, 0x9182, 0x0085, 0x0a0c, 0x0dd5, 0x9182,
-	0x0092, 0x1a0c, 0x0dd5, 0x9182, 0x0085, 0x0002, 0xe14b, 0xe14b,
-	0xe14b, 0xe14d, 0xe14b, 0xe14b, 0xe14b, 0xe14b, 0xe14b, 0xe14b,
-	0xe14b, 0xe14b, 0xe14b, 0x080c, 0x0dd5, 0x0005, 0x9186, 0x0013,
-	0x0148, 0x9186, 0x0014, 0x0130, 0x9186, 0x0027, 0x0118, 0x080c,
-	0xaef5, 0x0030, 0x080c, 0x959a, 0x080c, 0xae90, 0x080c, 0x96a6,
-	0x0005, 0x0036, 0x080c, 0xe846, 0x6043, 0x0000, 0x2019, 0x000b,
-	0x0031, 0x6023, 0x0006, 0x6003, 0x0007, 0x003e, 0x0005, 0x0126,
-	0x0036, 0x2091, 0x8000, 0x0086, 0x2c40, 0x0096, 0x904e, 0x080c,
-	0xa687, 0x009e, 0x008e, 0x1550, 0x0076, 0x2c38, 0x080c, 0xa732,
-	0x007e, 0x1520, 0x6000, 0x9086, 0x0000, 0x0500, 0x6020, 0x9086,
-	0x0007, 0x01e0, 0x0096, 0x601c, 0xd084, 0x0140, 0x080c, 0xe846,
-	0x080c, 0xd272, 0x080c, 0x1a70, 0x6023, 0x0007, 0x6014, 0x2048,
-	0x080c, 0xcb5a, 0x0110, 0x080c, 0xe58c, 0x009e, 0x6017, 0x0000,
-	0x080c, 0xe846, 0x6023, 0x0007, 0x080c, 0xd272, 0x003e, 0x012e,
-	0x0005, 0x00f6, 0x00c6, 0x00b6, 0x0036, 0x0156, 0x2079, 0x0260,
-	0x7938, 0x783c, 0x080c, 0x284b, 0x15c8, 0x0016, 0x00c6, 0x080c,
-	0x6616, 0x1590, 0x001e, 0x00c6, 0x2160, 0x080c, 0xd26f, 0x00ce,
-	0x002e, 0x0026, 0x0016, 0x2019, 0x0029, 0x080c, 0xa7f8, 0x080c,
-	0x929d, 0x0076, 0x903e, 0x080c, 0x9170, 0x007e, 0x001e, 0x0076,
-	0x903e, 0x080c, 0xe326, 0x007e, 0x0026, 0xba04, 0x9294, 0xff00,
-	0x8217, 0x9286, 0x0006, 0x0118, 0x9286, 0x0004, 0x1118, 0xbaa0,
-	0x080c, 0x328a, 0x002e, 0xbcc0, 0x001e, 0x080c, 0x6047, 0xbe12,
-	0xbd16, 0xbcc2, 0x9006, 0x0010, 0x00ce, 0x001e, 0x015e, 0x003e,
-	0x00be, 0x00ce, 0x00fe, 0x0005, 0x00c6, 0x00d6, 0x00b6, 0x0016,
-	0x2009, 0x1824, 0x2104, 0x9086, 0x0074, 0x1904, 0xe24d, 0x2069,
-	0x0260, 0x6944, 0x9182, 0x0100, 0x06e0, 0x6940, 0x9184, 0x8000,
-	0x0904, 0xe24a, 0x2001, 0x197b, 0x2004, 0x9005, 0x1140, 0x6010,
-	0x2058, 0xb8c0, 0x9005, 0x0118, 0x9184, 0x0800, 0x0598, 0x6948,
-	0x918a, 0x0001, 0x0648, 0x080c, 0xe9ab, 0x0118, 0x6978, 0xd1fc,
-	0x11b8, 0x2009, 0x0205, 0x200b, 0x0001, 0x693c, 0x81ff, 0x1198,
-	0x6944, 0x9182, 0x0100, 0x02a8, 0x6940, 0x81ff, 0x1178, 0x6948,
-	0x918a, 0x0001, 0x0288, 0x6950, 0x918a, 0x0001, 0x0298, 0x00d0,
-	0x6017, 0x0100, 0x00a0, 0x6017, 0x0300, 0x0088, 0x6017, 0x0500,
-	0x0070, 0x6017, 0x0700, 0x0058, 0x6017, 0x0900, 0x0040, 0x6017,
-	0x0b00, 0x0028, 0x6017, 0x0f00, 0x0010, 0x6017, 0x2d00, 0x9085,
-	0x0001, 0x0008, 0x9006, 0x001e, 0x00be, 0x00de, 0x00ce, 0x0005,
-	0x00c6, 0x00b6, 0x0026, 0x0036, 0x0156, 0x6210, 0x2258, 0xbb04,
-	0x9394, 0x00ff, 0x9286, 0x0006, 0x0180, 0x9286, 0x0004, 0x0168,
-	0x9394, 0xff00, 0x8217, 0x9286, 0x0006, 0x0138, 0x9286, 0x0004,
-	0x0120, 0x080c, 0x6625, 0x0804, 0xe2b5, 0x2011, 0x0276, 0x20a9,
-	0x0004, 0x0096, 0x2b48, 0x2019, 0x000a, 0x080c, 0xbe2d, 0x009e,
-	0x15a8, 0x2011, 0x027a, 0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019,
-	0x0006, 0x080c, 0xbe2d, 0x009e, 0x1548, 0x0046, 0x0016, 0xbaa0,
-	0x2220, 0x9006, 0x2009, 0x1848, 0x210c, 0xd1a4, 0x0138, 0x2009,
-	0x0029, 0x080c, 0xe5e9, 0xb800, 0xc0e5, 0xb802, 0x2019, 0x0029,
-	0x080c, 0x929d, 0x0076, 0x2039, 0x0000, 0x080c, 0x9170, 0x2c08,
-	0x080c, 0xe326, 0x007e, 0x2001, 0x0007, 0x080c, 0x6592, 0x2001,
-	0x0007, 0x080c, 0x6566, 0x001e, 0x004e, 0x9006, 0x015e, 0x003e,
-	0x002e, 0x00be, 0x00ce, 0x0005, 0x00d6, 0x2069, 0x026e, 0x6800,
-	0x9086, 0x0800, 0x0118, 0x6017, 0x0000, 0x0008, 0x9006, 0x00de,
-	0x0005, 0x00b6, 0x00f6, 0x0016, 0x0026, 0x0036, 0x0156, 0x2079,
-	0x026c, 0x7930, 0x7834, 0x080c, 0x284b, 0x11d0, 0x080c, 0x6616,
-	0x11b8, 0x2011, 0x0270, 0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019,
-	0x000a, 0x080c, 0xbe2d, 0x009e, 0x1158, 0x2011, 0x0274, 0x20a9,
-	0x0004, 0x0096, 0x2b48, 0x2019, 0x0006, 0x080c, 0xbe2d, 0x009e,
-	0x015e, 0x003e, 0x002e, 0x001e, 0x00fe, 0x00be, 0x0005, 0x00b6,
-	0x0006, 0x0016, 0x0026, 0x0036, 0x0156, 0x2011, 0x0263, 0x2204,
-	0x8211, 0x220c, 0x080c, 0x284b, 0x11d0, 0x080c, 0x6616, 0x11b8,
-	0x2011, 0x0276, 0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019, 0x000a,
-	0x080c, 0xbe2d, 0x009e, 0x1158, 0x2011, 0x027a, 0x20a9, 0x0004,
-	0x0096, 0x2b48, 0x2019, 0x0006, 0x080c, 0xbe2d, 0x009e, 0x015e,
-	0x003e, 0x002e, 0x001e, 0x000e, 0x00be, 0x0005, 0x00e6, 0x00c6,
-	0x0086, 0x0076, 0x0066, 0x0056, 0x0046, 0x0026, 0x0126, 0x2091,
-	0x8000, 0x2740, 0x2029, 0x19ef, 0x252c, 0x2021, 0x19f5, 0x2424,
-	0x2061, 0x1cd0, 0x2071, 0x1800, 0x7654, 0x7074, 0x81ff, 0x0150,
-	0x0006, 0x9186, 0x1aaf, 0x000e, 0x0128, 0x8001, 0x9602, 0x1a04,
-	0xe3c3, 0x0018, 0x9606, 0x0904, 0xe3c3, 0x080c, 0x8987, 0x0904,
-	0xe3ba, 0x2100, 0x9c06, 0x0904, 0xe3ba, 0x080c, 0xe62a, 0x1904,
-	0xe3ba, 0x080c, 0xe9c8, 0x0904, 0xe3ba, 0x080c, 0xe61a, 0x0904,
-	0xe3ba, 0x6720, 0x9786, 0x0001, 0x1148, 0x080c, 0x3321, 0x0904,
-	0xe402, 0x6004, 0x9086, 0x0000, 0x1904, 0xe402, 0x9786, 0x0004,
-	0x0904, 0xe402, 0x9786, 0x0007, 0x0904, 0xe3ba, 0x2500, 0x9c06,
-	0x0904, 0xe3ba, 0x2400, 0x9c06, 0x05e8, 0x88ff, 0x0118, 0x6054,
-	0x9906, 0x15c0, 0x0096, 0x6000, 0x9086, 0x0004, 0x1120, 0x0016,
-	0x080c, 0x1a70, 0x001e, 0x9786, 0x000a, 0x0148, 0x080c, 0xcd60,
-	0x1130, 0x080c, 0xb821, 0x009e, 0x080c, 0xae90, 0x0418, 0x6014,
-	0x2048, 0x080c, 0xcb5a, 0x01d8, 0x9786, 0x0003, 0x1570, 0xa867,
-	0x0103, 0xa87c, 0xd0cc, 0x0130, 0x0096, 0xa878, 0x2048, 0x080c,
-	0x0fb1, 0x009e, 0xab7a, 0xa877, 0x0000, 0x080c, 0xe943, 0x0016,
-	0x080c, 0xce4e, 0x080c, 0x6c88, 0x001e, 0x080c, 0xcd43, 0x009e,
-	0x080c, 0xae90, 0x9ce0, 0x0018, 0x2001, 0x181a, 0x2004, 0x9c02,
-	0x1210, 0x0804, 0xe33a, 0x012e, 0x002e, 0x004e, 0x005e, 0x006e,
-	0x007e, 0x008e, 0x00ce, 0x00ee, 0x0005, 0x9786, 0x0006, 0x1150,
-	0x9386, 0x0005, 0x0128, 0x080c, 0xe943, 0x080c, 0xe58c, 0x08f8,
-	0x009e, 0x0c00, 0x9786, 0x0009, 0x11f8, 0x6000, 0x9086, 0x0004,
-	0x01c0, 0x6000, 0x9086, 0x0003, 0x11a0, 0x080c, 0x9656, 0x0096,
-	0x6114, 0x2148, 0x080c, 0xcb5a, 0x0118, 0x6010, 0x080c, 0x6c94,
-	0x009e, 0x00c6, 0x080c, 0xae5f, 0x00ce, 0x0036, 0x080c, 0x97d4,
-	0x003e, 0x009e, 0x0804, 0xe3ba, 0x9786, 0x000a, 0x0904, 0xe3a1,
-	0x0804, 0xe39f, 0x81ff, 0x0904, 0xe3ba, 0x9180, 0x0001, 0x2004,
-	0x9086, 0x0018, 0x0138, 0x9180, 0x0001, 0x2004, 0x9086, 0x002d,
-	0x1904, 0xe3ba, 0x6000, 0x9086, 0x0002, 0x1904, 0xe3ba, 0x080c,
-	0xcd4f, 0x0138, 0x080c, 0xcd60, 0x1904, 0xe3ba, 0x080c, 0xb821,
-	0x0038, 0x080c, 0x31f5, 0x080c, 0xcd60, 0x1110, 0x080c, 0xb821,
-	0x080c, 0xae90, 0x0804, 0xe3ba, 0xa864, 0x9084, 0x00ff, 0x9086,
-	0x0039, 0x0005, 0x00c6, 0x00e6, 0x0016, 0x2c08, 0x2170, 0x9006,
-	0x080c, 0xe5b3, 0x001e, 0x0120, 0x6020, 0x9084, 0x000f, 0x001b,
-	0x00ee, 0x00ce, 0x0005, 0xe451, 0xe451, 0xe451, 0xe451, 0xe451,
-	0xe451, 0xe453, 0xe451, 0xe451, 0xe451, 0xe451, 0xae90, 0xae90,
-	0xe451, 0x9006, 0x0005, 0x0036, 0x0046, 0x0016, 0x7010, 0x00b6,
-	0x2058, 0xbca0, 0x00be, 0x2c00, 0x2009, 0x0020, 0x080c, 0xe5e9,
-	0x001e, 0x004e, 0x2019, 0x0002, 0x080c, 0xe16f, 0x003e, 0x9085,
-	0x0001, 0x0005, 0x0096, 0x080c, 0xcb5a, 0x0140, 0x6014, 0x904d,
-	0x080c, 0xc77b, 0x687b, 0x0005, 0x080c, 0x6c94, 0x009e, 0x080c,
-	0xae90, 0x9085, 0x0001, 0x0005, 0x2001, 0x0001, 0x080c, 0x6552,
-	0x0156, 0x0016, 0x0026, 0x0036, 0x20a9, 0x0004, 0x2019, 0x1805,
-	0x2011, 0x0276, 0x080c, 0xbe19, 0x003e, 0x002e, 0x001e, 0x015e,
-	0x9005, 0x0005, 0x00f6, 0x00e6, 0x00c6, 0x0086, 0x0076, 0x0066,
-	0x00b6, 0x0126, 0x2091, 0x8000, 0x2740, 0x2061, 0x1cd0, 0x2079,
-	0x0001, 0x8fff, 0x0904, 0xe4ec, 0x2071, 0x1800, 0x7654, 0x7074,
-	0x8001, 0x9602, 0x1a04, 0xe4ec, 0x88ff, 0x0120, 0x2800, 0x9c06,
-	0x1590, 0x2078, 0x080c, 0xe61a, 0x0570, 0x2400, 0x9c06, 0x0558,
-	0x6720, 0x9786, 0x0006, 0x1538, 0x9786, 0x0007, 0x0520, 0x88ff,
-	0x1140, 0x6010, 0x9b06, 0x11f8, 0x85ff, 0x0118, 0x6054, 0x9106,
-	0x11d0, 0x0096, 0x601c, 0xd084, 0x0140, 0x080c, 0xe846, 0x080c,
-	0xd272, 0x080c, 0x1a70, 0x6023, 0x0007, 0x6014, 0x2048, 0x080c,
-	0xcb5a, 0x0120, 0x0046, 0x080c, 0xe58c, 0x004e, 0x009e, 0x080c,
-	0xae90, 0x88ff, 0x1198, 0x9ce0, 0x0018, 0x2001, 0x181a, 0x2004,
-	0x9c02, 0x1210, 0x0804, 0xe4a1, 0x9006, 0x012e, 0x00be, 0x006e,
-	0x007e, 0x008e, 0x00ce, 0x00ee, 0x00fe, 0x0005, 0x98c5, 0x0001,
-	0x0ca0, 0x00b6, 0x0076, 0x0056, 0x0086, 0x9046, 0x2029, 0x0001,
-	0x2c20, 0x2019, 0x0002, 0x6210, 0x2258, 0x0096, 0x904e, 0x080c,
-	0xa687, 0x009e, 0x008e, 0x903e, 0x080c, 0xa732, 0x080c, 0xe492,
-	0x005e, 0x007e, 0x00be, 0x0005, 0x00b6, 0x0046, 0x0056, 0x0076,
-	0x00c6, 0x0156, 0x2c20, 0x2128, 0x20a9, 0x007f, 0x900e, 0x0016,
-	0x0036, 0x080c, 0x6616, 0x1190, 0x0056, 0x0086, 0x9046, 0x2508,
-	0x2029, 0x0001, 0x0096, 0x904e, 0x080c, 0xa687, 0x009e, 0x008e,
-	0x903e, 0x080c, 0xa732, 0x080c, 0xe492, 0x005e, 0x003e, 0x001e,
-	0x8108, 0x1f04, 0xe51f, 0x015e, 0x00ce, 0x007e, 0x005e, 0x004e,
-	0x00be, 0x0005, 0x00b6, 0x0076, 0x0056, 0x6210, 0x2258, 0x0086,
-	0x9046, 0x2029, 0x0001, 0x2019, 0x0048, 0x0096, 0x904e, 0x080c,
-	0xa687, 0x009e, 0x008e, 0x903e, 0x080c, 0xa732, 0x2c20, 0x080c,
-	0xe492, 0x005e, 0x007e, 0x00be, 0x0005, 0x00b6, 0x0046, 0x0056,
-	0x0076, 0x00c6, 0x0156, 0x2c20, 0x20a9, 0x0800, 0x900e, 0x0016,
-	0x0036, 0x080c, 0x6616, 0x11a0, 0x0086, 0x9046, 0x2828, 0x0046,
-	0x2021, 0x0001, 0x080c, 0xe82a, 0x004e, 0x0096, 0x904e, 0x080c,
-	0xa687, 0x009e, 0x008e, 0x903e, 0x080c, 0xa732, 0x080c, 0xe492,
-	0x003e, 0x001e, 0x8108, 0x1f04, 0xe567, 0x015e, 0x00ce, 0x007e,
-	0x005e, 0x004e, 0x00be, 0x0005, 0x0016, 0x00f6, 0x080c, 0xcb58,
-	0x0198, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0046, 0x0180, 0xa800,
-	0x907d, 0x0138, 0xa803, 0x0000, 0xab82, 0x080c, 0x6c94, 0x2f48,
-	0x0cb0, 0xab82, 0x080c, 0x6c94, 0x00fe, 0x001e, 0x0005, 0xa800,
-	0x907d, 0x0130, 0xa803, 0x0000, 0x080c, 0x6c94, 0x2f48, 0x0cb8,
-	0x080c, 0x6c94, 0x0c88, 0x00e6, 0x0046, 0x0036, 0x2061, 0x1cd0,
-	0x9005, 0x1138, 0x2071, 0x1800, 0x7454, 0x7074, 0x8001, 0x9402,
-	0x12f8, 0x2100, 0x9c06, 0x0188, 0x6000, 0x9086, 0x0000, 0x0168,
-	0x6008, 0x9206, 0x1150, 0x6320, 0x9386, 0x0009, 0x01b0, 0x6010,
-	0x91a0, 0x0004, 0x2424, 0x9406, 0x0140, 0x9ce0, 0x0018, 0x2001,
-	0x181a, 0x2004, 0x9c02, 0x1220, 0x0c20, 0x9085, 0x0001, 0x0008,
-	0x9006, 0x003e, 0x004e, 0x00ee, 0x0005, 0x631c, 0xd3c4, 0x1d68,
-	0x0c30, 0x0096, 0x0006, 0x080c, 0x0fff, 0x000e, 0x090c, 0x0dd5,
-	0xaae2, 0xa867, 0x010d, 0xa88e, 0x0026, 0x2010, 0x080c, 0xcb48,
-	0x2001, 0x0000, 0x0120, 0x2200, 0x9080, 0x0015, 0x2004, 0x002e,
-	0xa87a, 0x9186, 0x0020, 0x0110, 0xa8e3, 0xffff, 0xa986, 0xac76,
-	0xa87f, 0x0000, 0x2001, 0x198d, 0x2004, 0xa882, 0x9006, 0xa802,
-	0xa86a, 0xa88a, 0x0126, 0x2091, 0x8000, 0x080c, 0x6c94, 0x012e,
-	0x009e, 0x0005, 0x6700, 0x9786, 0x0000, 0x0158, 0x9786, 0x0001,
-	0x0140, 0x9786, 0x000a, 0x0128, 0x9786, 0x0009, 0x0110, 0x9085,
-	0x0001, 0x0005, 0x00e6, 0x6010, 0x9075, 0x0138, 0x00b6, 0x2058,
-	0xb8a0, 0x00be, 0x9206, 0x00ee, 0x0005, 0x9085, 0x0001, 0x0cd8,
-	0x0016, 0x6004, 0x908e, 0x001e, 0x11a0, 0x8007, 0x6134, 0x918c,
-	0x00ff, 0x9105, 0x6036, 0x6007, 0x0085, 0x6003, 0x000b, 0x6023,
-	0x0005, 0x2001, 0x1986, 0x2004, 0x601a, 0x080c, 0x90f8, 0x080c,
-	0x96a6, 0x001e, 0x0005, 0xa001, 0xa001, 0x0005, 0x6024, 0xd0e4,
-	0x0158, 0xd0cc, 0x0118, 0x080c, 0xce92, 0x0030, 0x080c, 0xe846,
-	0x080c, 0x86b8, 0x080c, 0xae5f, 0x0005, 0x9280, 0x0008, 0x2004,
-	0x9084, 0x000f, 0x0002, 0xe679, 0xe679, 0xe679, 0xe67b, 0xe679,
-	0xe67b, 0xe67b, 0xe679, 0xe67b, 0xe679, 0xe679, 0xe679, 0xe679,
-	0xe679, 0x9006, 0x0005, 0x9085, 0x0001, 0x0005, 0x9280, 0x0008,
-	0x2004, 0x9084, 0x000f, 0x0002, 0xe692, 0xe692, 0xe692, 0xe692,
-	0xe692, 0xe692, 0xe69f, 0xe692, 0xe692, 0xe692, 0xe692, 0xe692,
-	0xe692, 0xe692, 0x6007, 0x003b, 0x602f, 0x0009, 0x6017, 0x2a00,
-	0x6003, 0x0001, 0x080c, 0x90f8, 0x080c, 0x96a6, 0x0005, 0x0096,
-	0x00c6, 0x2260, 0x080c, 0xe846, 0x6043, 0x0000, 0x6024, 0xc0f4,
-	0xc0e4, 0x6026, 0x603b, 0x0000, 0x00ce, 0x00d6, 0x2268, 0x9186,
-	0x0007, 0x1904, 0xe6f8, 0x6814, 0x9005, 0x0138, 0x2048, 0xa87c,
-	0xd0fc, 0x1118, 0x00de, 0x009e, 0x08a8, 0x6007, 0x003a, 0x6003,
-	0x0001, 0x080c, 0x90f8, 0x080c, 0x96a6, 0x00c6, 0x2d60, 0x6100,
-	0x9186, 0x0002, 0x1904, 0xe76f, 0x6014, 0x9005, 0x1138, 0x6000,
-	0x9086, 0x0007, 0x190c, 0x0dd5, 0x0804, 0xe76f, 0x2048, 0x080c,
-	0xcb5a, 0x1130, 0x0028, 0x2048, 0xa800, 0x9005, 0x1de0, 0x2900,
-	0x2048, 0xa87c, 0x9084, 0x0003, 0x9086, 0x0002, 0x1168, 0xa87c,
-	0xc0dc, 0xc0f4, 0xa87e, 0xa880, 0xc0fc, 0xa882, 0x2009, 0x0043,
-	0x080c, 0xdfc3, 0x0804, 0xe76f, 0x2009, 0x0041, 0x0804, 0xe769,
-	0x9186, 0x0005, 0x15a0, 0x6814, 0x2048, 0xa87c, 0xd0bc, 0x1120,
-	0x00de, 0x009e, 0x0804, 0xe692, 0xd0b4, 0x0128, 0xd0fc, 0x090c,
-	0x0dd5, 0x0804, 0xe6b3, 0x6007, 0x003a, 0x6003, 0x0001, 0x080c,
-	0x90f8, 0x080c, 0x96a6, 0x00c6, 0x2d60, 0x6100, 0x9186, 0x0002,
-	0x0120, 0x9186, 0x0004, 0x1904, 0xe76f, 0x6814, 0x2048, 0xa97c,
-	0xc1f4, 0xc1dc, 0xa97e, 0xa980, 0xc1fc, 0xc1bc, 0xa982, 0x00f6,
-	0x2c78, 0x080c, 0x1727, 0x00fe, 0x2009, 0x0042, 0x04d0, 0x0036,
-	0x080c, 0x0fff, 0x090c, 0x0dd5, 0xa867, 0x010d, 0x9006, 0xa802,
-	0xa86a, 0xa88a, 0x2d18, 0xab8e, 0xa887, 0x0045, 0x2c00, 0xa892,
-	0x6038, 0xa8a2, 0x2360, 0x6024, 0xc0dd, 0x6026, 0x6010, 0x00b6,
-	0x2058, 0xb8a0, 0x00be, 0x2004, 0x6354, 0xab7a, 0xa876, 0x9006,
-	0xa87e, 0xa882, 0xad9a, 0xae96, 0xa89f, 0x0001, 0x080c, 0x6c94,
-	0x2019, 0x0045, 0x6008, 0x2068, 0x080c, 0xe16f, 0x2d00, 0x600a,
-	0x6023, 0x0006, 0x6003, 0x0007, 0x901e, 0x631a, 0x6342, 0x003e,
-	0x0038, 0x6043, 0x0000, 0x6003, 0x0007, 0x080c, 0xdfc3, 0x00ce,
-	0x00de, 0x009e, 0x0005, 0x9186, 0x0013, 0x1128, 0x6004, 0x9082,
-	0x0085, 0x2008, 0x00c2, 0x9186, 0x0027, 0x1178, 0x080c, 0x959a,
-	0x0036, 0x0096, 0x6014, 0x2048, 0x2019, 0x0004, 0x080c, 0xe58c,
-	0x009e, 0x003e, 0x080c, 0x96a6, 0x0005, 0x9186, 0x0014, 0x0d70,
-	0x080c, 0xaef5, 0x0005, 0xe7a2, 0xe7a0, 0xe7a0, 0xe7a0, 0xe7a0,
-	0xe7a0, 0xe7a2, 0xe7a0, 0xe7a0, 0xe7a0, 0xe7a0, 0xe7a0, 0xe7a0,
-	0x080c, 0x0dd5, 0x080c, 0x959a, 0x6003, 0x000c, 0x080c, 0x96a6,
-	0x0005, 0x9182, 0x0092, 0x1220, 0x9182, 0x0085, 0x0208, 0x001a,
-	0x080c, 0xaef5, 0x0005, 0xe7c0, 0xe7c0, 0xe7c0, 0xe7c0, 0xe7c2,
-	0xe7e2, 0xe7c0, 0xe7c0, 0xe7c0, 0xe7c0, 0xe7c0, 0xe7c0, 0xe7c0,
-	0x080c, 0x0dd5, 0x00d6, 0x2c68, 0x080c, 0xae09, 0x01b0, 0x6003,
-	0x0001, 0x6007, 0x001e, 0x2009, 0x026e, 0x210c, 0x613a, 0x2009,
-	0x026f, 0x210c, 0x613e, 0x600b, 0xffff, 0x6910, 0x6112, 0x6023,
-	0x0004, 0x080c, 0x90f8, 0x080c, 0x96a6, 0x2d60, 0x080c, 0xae5f,
-	0x00de, 0x0005, 0x080c, 0xae5f, 0x0005, 0x00e6, 0x6010, 0x00b6,
-	0x2058, 0xb800, 0x00be, 0xd0ec, 0x00ee, 0x0005, 0x2009, 0x1867,
-	0x210c, 0xd1ec, 0x05b0, 0x6003, 0x0002, 0x6024, 0xc0e5, 0x6026,
-	0xd0cc, 0x0150, 0x2001, 0x1987, 0x2004, 0x6042, 0x2009, 0x1867,
-	0x210c, 0xd1f4, 0x1520, 0x00a0, 0x2009, 0x1867, 0x210c, 0xd1f4,
-	0x0128, 0x6024, 0xc0e4, 0x6026, 0x9006, 0x00d8, 0x2001, 0x1987,
-	0x200c, 0x2001, 0x1985, 0x2004, 0x9100, 0x9080, 0x000a, 0x6042,
-	0x6010, 0x00b6, 0x2058, 0xb8bc, 0x00be, 0x0008, 0x2104, 0x9005,
-	0x0118, 0x9088, 0x0003, 0x0cd0, 0x2c0a, 0x600f, 0x0000, 0x9085,
-	0x0001, 0x0005, 0x0016, 0x00c6, 0x00e6, 0x6154, 0xb8bc, 0x2060,
-	0x8cff, 0x0180, 0x84ff, 0x1118, 0x6054, 0x9106, 0x1138, 0x600c,
-	0x2072, 0x080c, 0x86b8, 0x080c, 0xae5f, 0x0010, 0x9cf0, 0x0003,
-	0x2e64, 0x0c70, 0x00ee, 0x00ce, 0x001e, 0x0005, 0x00d6, 0x00b6,
-	0x6010, 0x2058, 0xb8bc, 0x2068, 0x9005, 0x0130, 0x9c06, 0x0110,
-	0x680c, 0x0cd0, 0x600c, 0x680e, 0x00be, 0x00de, 0x0005, 0x0026,
-	0x0036, 0x0156, 0x2011, 0x182c, 0x2204, 0x9084, 0x00ff, 0x2019,
-	0x026e, 0x2334, 0x9636, 0x1508, 0x8318, 0x2334, 0x2204, 0x9084,
-	0xff00, 0x9636, 0x11d0, 0x2011, 0x0270, 0x20a9, 0x0004, 0x6010,
-	0x0096, 0x2048, 0x2019, 0x000a, 0x080c, 0xbe2d, 0x009e, 0x1168,
-	0x2011, 0x0274, 0x20a9, 0x0004, 0x6010, 0x0096, 0x2048, 0x2019,
-	0x0006, 0x080c, 0xbe2d, 0x009e, 0x1100, 0x015e, 0x003e, 0x002e,
-	0x0005, 0x00e6, 0x2071, 0x1800, 0x080c, 0x5fc0, 0x080c, 0x2fa3,
-	0x00ee, 0x0005, 0x0096, 0x0026, 0x080c, 0x0fff, 0x090c, 0x0dd5,
-	0xa85c, 0x9080, 0x001a, 0x20a0, 0x20a9, 0x000c, 0xa860, 0x20e8,
-	0x9006, 0x4004, 0x9186, 0x0046, 0x1118, 0xa867, 0x0136, 0x0038,
-	0xa867, 0x0138, 0x9186, 0x0041, 0x0110, 0xa87b, 0x0001, 0x7038,
-	0x9084, 0xff00, 0x7240, 0x9294, 0xff00, 0x8007, 0x9215, 0xaa9a,
-	0x9186, 0x0046, 0x1168, 0x7038, 0x9084, 0x00ff, 0x723c, 0x9294,
-	0xff00, 0x9215, 0xaa9e, 0x723c, 0x9294, 0x00ff, 0xaaa2, 0x0060,
-	0x7040, 0x9084, 0x00ff, 0x7244, 0x9294, 0xff00, 0x9215, 0xaa9e,
-	0x7244, 0x9294, 0x00ff, 0xaaa2, 0x9186, 0x0046, 0x1118, 0x9e90,
-	0x0012, 0x0010, 0x9e90, 0x001a, 0x2204, 0x8007, 0xa8a6, 0x8210,
-	0x2204, 0x8007, 0xa8aa, 0x8210, 0x2204, 0x8007, 0xa8ae, 0x8210,
-	0x2204, 0x8007, 0xa8b2, 0x8210, 0x9186, 0x0046, 0x11b8, 0x9e90,
-	0x0016, 0x2204, 0x8007, 0xa8b6, 0x8210, 0x2204, 0x8007, 0xa8ba,
-	0x8210, 0x2204, 0x8007, 0xa8be, 0x8210, 0x2204, 0x8007, 0xa8c2,
-	0x8210, 0x2011, 0x0205, 0x2013, 0x0001, 0x00b0, 0x9e90, 0x001e,
-	0x2204, 0x8007, 0xa8b6, 0x8210, 0x2204, 0x8007, 0xa8ba, 0x2011,
-	0x0205, 0x2013, 0x0001, 0x2011, 0x0260, 0x2204, 0x8007, 0xa8be,
-	0x8210, 0x2204, 0x8007, 0xa8c2, 0x9186, 0x0046, 0x1118, 0x2011,
-	0x0262, 0x0010, 0x2011, 0x026a, 0x0146, 0x01d6, 0x0036, 0x20a9,
-	0x0001, 0x2019, 0x0008, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0031,
-	0x20a0, 0x2204, 0x8007, 0x4004, 0x8210, 0x8319, 0x1dd0, 0x003e,
-	0x01ce, 0x013e, 0x2011, 0x0205, 0x2013, 0x0000, 0x002e, 0x080c,
-	0x6c94, 0x009e, 0x0005, 0x00e6, 0x6010, 0x00b6, 0x2058, 0xb800,
-	0x00be, 0xd0fc, 0x0108, 0x0011, 0x00ee, 0x0005, 0xa880, 0xc0e5,
-	0xa882, 0x0005, 0x00e6, 0x00d6, 0x00c6, 0x0076, 0x0066, 0x0056,
-	0x0046, 0x0026, 0x0016, 0x0126, 0x2091, 0x8000, 0x2029, 0x19ef,
-	0x252c, 0x2021, 0x19f5, 0x2424, 0x2061, 0x1cd0, 0x2071, 0x1800,
-	0x7654, 0x7074, 0x9606, 0x0578, 0x6720, 0x9786, 0x0001, 0x0118,
-	0x9786, 0x0008, 0x1500, 0x2500, 0x9c06, 0x01e8, 0x2400, 0x9c06,
-	0x01d0, 0x080c, 0xe61a, 0x01b8, 0x080c, 0xe62a, 0x11a0, 0x6000,
-	0x9086, 0x0004, 0x1120, 0x0016, 0x080c, 0x1a70, 0x001e, 0x080c,
-	0xcd4f, 0x1110, 0x080c, 0x31f5, 0x080c, 0xcd60, 0x1110, 0x080c,
-	0xb821, 0x080c, 0xae90, 0x9ce0, 0x0018, 0x2001, 0x181a, 0x2004,
-	0x9c02, 0x1208, 0x0858, 0x012e, 0x001e, 0x002e, 0x004e, 0x005e,
-	0x006e, 0x007e, 0x00ce, 0x00de, 0x00ee, 0x0005, 0x2001, 0x1810,
-	0x2004, 0xd0dc, 0x0005, 0x0006, 0x2001, 0x1837, 0x2004, 0xd09c,
-	0x000e, 0x0005, 0x0006, 0x0036, 0x0046, 0x080c, 0xd25a, 0x0168,
-	0x2019, 0xffff, 0x9005, 0x0128, 0x6010, 0x00b6, 0x2058, 0xbba0,
-	0x00be, 0x2021, 0x0004, 0x080c, 0x4cd5, 0x004e, 0x003e, 0x000e,
-	0x6004, 0x9086, 0x0001, 0x1128, 0x080c, 0xa7f8, 0x080c, 0xae90,
-	0x9006, 0x0005, 0x00e6, 0x00c6, 0x00b6, 0x0046, 0x2061, 0x1cd0,
-	0x2071, 0x1800, 0x7454, 0x7074, 0x8001, 0x9402, 0x12b8, 0x2100,
-	0x9c06, 0x0148, 0x6000, 0x9086, 0x0000, 0x0128, 0x6010, 0x2058,
-	0xb8a0, 0x9206, 0x0140, 0x9ce0, 0x0018, 0x2001, 0x181a, 0x2004,
-	0x9c02, 0x1220, 0x0c60, 0x9085, 0x0001, 0x0008, 0x9006, 0x004e,
-	0x00be, 0x00ce, 0x00ee, 0x0005, 0x0126, 0x0006, 0x00e6, 0x0016,
-	0x2091, 0x8000, 0x2071, 0x1840, 0xd5a4, 0x0118, 0x7004, 0x8000,
-	0x7006, 0xd5b4, 0x0118, 0x7000, 0x8000, 0x7002, 0xd5ac, 0x0178,
-	0x2500, 0x9084, 0x0007, 0x908e, 0x0003, 0x0148, 0x908e, 0x0004,
-	0x0130, 0x908e, 0x0005, 0x0118, 0x2071, 0xfff6, 0x0089, 0x001e,
-	0x00ee, 0x000e, 0x012e, 0x0005, 0x0126, 0x0006, 0x00e6, 0x2091,
-	0x8000, 0x2071, 0xffee, 0x0021, 0x00ee, 0x000e, 0x012e, 0x0005,
-	0x2e05, 0x8000, 0x2077, 0x1220, 0x8e70, 0x2e05, 0x8000, 0x2077,
-	0x0005, 0x00e6, 0x2071, 0xffec, 0x0c99, 0x00ee, 0x0005, 0x00e6,
-	0x2071, 0xfff0, 0x0c69, 0x00ee, 0x0005, 0x0126, 0x0006, 0x00e6,
-	0x2091, 0x8000, 0x2071, 0x1840, 0x7014, 0x8000, 0x7016, 0x00ee,
-	0x000e, 0x012e, 0x0005, 0x0003, 0x000b, 0x079e, 0x0000, 0xc000,
-	0x0001, 0x8064, 0x0008, 0x0010, 0x0000, 0x8066, 0x0000, 0x0101,
-	0x0008, 0x4407, 0x0003, 0x8060, 0x0000, 0x0400, 0x0000, 0x580d,
-	0x000b, 0x79a8, 0x000b, 0x50ee, 0x000b, 0x4c0a, 0x0003, 0xbac0,
-	0x0009, 0x008a, 0x0000, 0x0c0a, 0x000b, 0x15fe, 0x0008, 0x340a,
-	0x0003, 0xc4c0, 0x0009, 0x7000, 0x0000, 0xffa0, 0x0001, 0x2000,
-	0x0000, 0x1668, 0x000b, 0x808c, 0x0008, 0x0001, 0x0000, 0x0000,
-	0x0007, 0x4028, 0x0000, 0x4047, 0x000a, 0x808c, 0x0008, 0x0002,
-	0x0000, 0x0822, 0x0003, 0x4022, 0x0000, 0x0028, 0x000b, 0x4122,
-	0x0008, 0x94c0, 0x0009, 0xff00, 0x0008, 0xffe0, 0x0009, 0x0500,
-	0x0008, 0x0a93, 0x000b, 0x4447, 0x0002, 0x0e90, 0x0003, 0x0bfe,
-	0x0008, 0x11a0, 0x0001, 0x126e, 0x0003, 0x0ca0, 0x0001, 0x126e,
-	0x0003, 0x9180, 0x0001, 0x0004, 0x0000, 0x8060, 0x0000, 0x0400,
-	0x0000, 0x7f62, 0x0008, 0x8066, 0x0000, 0x0009, 0x0008, 0x4436,
-	0x000b, 0x808c, 0x0008, 0x0000, 0x0008, 0x0060, 0x0008, 0x8062,
-	0x0008, 0x0004, 0x0000, 0x8066, 0x0000, 0x0411, 0x0000, 0x443e,
-	0x0003, 0x03fe, 0x0000, 0x43e0, 0x0001, 0x0e6b, 0x000b, 0xc2c0,
-	0x0009, 0x00ff, 0x0008, 0x02e0, 0x0001, 0x0e6b, 0x000b, 0x9180,
-	0x0001, 0x0005, 0x0008, 0x8060, 0x0000, 0x0400, 0x0000, 0x7f62,
-	0x0008, 0x8066, 0x0000, 0x0019, 0x0000, 0x444d, 0x000b, 0x0240,
-	0x0002, 0x0a68, 0x0003, 0x00fe, 0x0000, 0x326b, 0x000b, 0x0248,
-	0x000a, 0x085c, 0x0003, 0x9180, 0x0001, 0x0006, 0x0008, 0x7f62,
-	0x0008, 0x8002, 0x0008, 0x0003, 0x0008, 0x8066, 0x0000, 0x020a,
-	0x0000, 0x445b, 0x0003, 0x112a, 0x0000, 0x002e, 0x0008, 0x022c,
-	0x0008, 0x3a44, 0x0002, 0x0c0a, 0x000b, 0x808c, 0x0008, 0x0002,
-	0x0000, 0x1760, 0x0008, 0x8062, 0x0008, 0x000f, 0x0008, 0x8066,
-	0x0000, 0x0011, 0x0008, 0x4468, 0x0003, 0x01fe, 0x0008, 0x42e0,
-	0x0009, 0x0e5c, 0x0003, 0x00fe, 0x0000, 0x43e0, 0x0001, 0x0e5c,
-	0x0003, 0x1734, 0x0000, 0x1530, 0x0000, 0x1632, 0x0008, 0x0d2a,
-	0x0008, 0x9880, 0x0001, 0x0010, 0x0000, 0x8060, 0x0000, 0x0400,
-	0x0000, 0x7f62, 0x0008, 0x8066, 0x0000, 0x1e0a, 0x0008, 0x447a,
-	0x0003, 0x808a, 0x0008, 0x0003, 0x0008, 0x1a60, 0x0000, 0x8062,
-	0x0008, 0x0002, 0x0000, 0x5880, 0x000b, 0x8066, 0x0000, 0x3679,
-	0x0000, 0x4483, 0x0003, 0x5884, 0x0003, 0x3efe, 0x0008, 0x7f4f,
-	0x0002, 0x088a, 0x000b, 0x0d00, 0x0000, 0x0092, 0x000c, 0x8054,
-	0x0008, 0x0011, 0x0008, 0x8074, 0x0000, 0x1010, 0x0008, 0x1efe,
-	0x0000, 0x300a, 0x000b, 0x00c8, 0x000c, 0x000a, 0x000b, 0x00fe,
-	0x0000, 0x349a, 0x0003, 0x1a60, 0x0000, 0x8062, 0x0008, 0x0007,
-	0x0000, 0x8066, 0x0000, 0x0231, 0x0008, 0x4499, 0x000b, 0x03fe,
-	0x0000, 0x04d0, 0x0001, 0x0cc0, 0x000b, 0x82c0, 0x0001, 0x1f00,
-	0x0000, 0xffa0, 0x0001, 0x0400, 0x0000, 0x08af, 0x0003, 0x14c0,
-	0x000b, 0x01fe, 0x0008, 0x0580, 0x0009, 0x7f06, 0x0000, 0x02fe,
-	0x0008, 0xffc0, 0x0001, 0x00ff, 0x0008, 0x0690, 0x0001, 0x10af,
-	0x0003, 0x7f08, 0x0008, 0x84c0, 0x0001, 0xff00, 0x0008, 0x08c0,
-	0x0003, 0x00fe, 0x0000, 0x34b6, 0x000b, 0x8072, 0x0000, 0x1010,
-	0x0008, 0x3944, 0x0002, 0x08b1, 0x0003, 0x00ba, 0x0003, 0x8072,
-	0x0000, 0x2020, 0x0008, 0x3945, 0x000a, 0x08b6, 0x000b, 0x3946,
-	0x000a, 0x0cc7, 0x0003, 0x0000, 0x0007, 0x3943, 0x000a, 0x08c7,
-	0x000b, 0x00ba, 0x0003, 0x00fe, 0x0000, 0x34c5, 0x0003, 0x8072,
-	0x0000, 0x1000, 0x0000, 0x00c7, 0x0003, 0x8072, 0x0000, 0x2000,
-	0x0000, 0x4000, 0x000f, 0x1c60, 0x0000, 0x1b62, 0x0000, 0x8066,
-	0x0000, 0x0231, 0x0008, 0x44cc, 0x000b, 0x58cd, 0x000b, 0x0140,
-	0x0008, 0x0242, 0x0000, 0x1f43, 0x0002, 0x0cdb, 0x000b, 0x0d44,
-	0x0000, 0x0d46, 0x0008, 0x0348, 0x0008, 0x044a, 0x0008, 0x030a,
-	0x0008, 0x040c, 0x0000, 0x0d06, 0x0000, 0x0d08, 0x0008, 0x00df,
-	0x0003, 0x0344, 0x0008, 0x0446, 0x0008, 0x0548, 0x0008, 0x064a,
-	0x0000, 0x1948, 0x000a, 0x08e2, 0x0003, 0x0d4a, 0x0008, 0x58e2,
-	0x0003, 0x3efe, 0x0008, 0x7f4f, 0x0002, 0x08e9, 0x000b, 0x8000,
-	0x0000, 0x0001, 0x0000, 0x0092, 0x000c, 0x8054, 0x0008, 0x0001,
-	0x0000, 0x8074, 0x0000, 0x2020, 0x0008, 0x4000, 0x000f, 0x3a40,
-	0x000a, 0x0c0d, 0x0003, 0x2b24, 0x0008, 0x2b24, 0x0008, 0x58f2,
-	0x000b, 0x8054, 0x0008, 0x0002, 0x0000, 0x1242, 0x0002, 0x0940,
-	0x0003, 0x3a45, 0x000a, 0x092f, 0x0003, 0x8072, 0x0000, 0x1000,
-	0x0000, 0x3945, 0x000a, 0x08ff, 0x0003, 0x8072, 0x0000, 0x3010,
-	0x0000, 0x1e10, 0x000a, 0x7f3c, 0x0000, 0x092a, 0x0003, 0x1d00,
-	0x0002, 0x7f3a, 0x0000, 0x0d60, 0x0000, 0x7f62, 0x0008, 0x8066,
-	0x0000, 0x0009, 0x0008, 0x4508, 0x000b, 0x00fe, 0x0000, 0x3527,
-	0x000b, 0x1c60, 0x0000, 0x8062, 0x0008, 0x0001, 0x0000, 0x8066,
-	0x0000, 0x0009, 0x0008, 0x4510, 0x000b, 0x00fe, 0x0000, 0x3243,
-	0x000b, 0x0038, 0x0000, 0x0060, 0x0008, 0x8062, 0x0008, 0x0019,
-	0x0000, 0x8066, 0x0000, 0x0009, 0x0008, 0x4519, 0x000b, 0x80c0,
-	0x0009, 0x00ff, 0x0008, 0x7f3e, 0x0008, 0x0d60, 0x0000, 0x0efe,
-	0x0008, 0x1f80, 0x0001, 0x7f62, 0x0008, 0x8066, 0x0000, 0x0009,
-	0x0008, 0x4523, 0x000b, 0x003a, 0x0008, 0x1dfe, 0x0000, 0x0104,
-	0x000b, 0x0036, 0x0008, 0x00c8, 0x000c, 0x0140, 0x000b, 0x8074,
-	0x0000, 0x2000, 0x0000, 0x8072, 0x0000, 0x2000, 0x0000, 0x0140,
-	0x000b, 0x3a44, 0x0002, 0x0a71, 0x000b, 0x8074, 0x0000, 0x1000,
-	0x0000, 0x8072, 0x0000, 0x1000, 0x0000, 0x2d0e, 0x0000, 0x2d0e,
-	0x0000, 0x3640, 0x0003, 0x26fe, 0x0008, 0x26fe, 0x0008, 0x2700,
-	0x0008, 0x2700, 0x0008, 0x00d0, 0x0009, 0x0d52, 0x000b, 0x8074,
-	0x0000, 0x4040, 0x0008, 0x5940, 0x0003, 0x50ee, 0x000b, 0x3a46,
-	0x000a, 0x0d52, 0x000b, 0x3a47, 0x0002, 0x094d, 0x000b, 0x8054,
-	0x0008, 0x0004, 0x0000, 0x8074, 0x0000, 0x8000, 0x0000, 0x8072,
-	0x0000, 0x3000, 0x0008, 0x019c, 0x0003, 0x92c0, 0x0009, 0x0fc8,
-	0x0000, 0x080a, 0x0003, 0x1246, 0x000a, 0x0e3a, 0x0003, 0x1a60,
-	0x0000, 0x8062, 0x0008, 0x0002, 0x0000, 0x8066, 0x0000, 0x362a,
-	0x0000, 0x4557, 0x000b, 0x2000, 0x0000, 0x2000, 0x0000, 0x2102,
-	0x0000, 0x2102, 0x0000, 0x2204, 0x0000, 0x2204, 0x0000, 0x2306,
-	0x0000, 0x2306, 0x0000, 0x2408, 0x0000, 0x2408, 0x0000, 0x250a,
-	0x0000, 0x250a, 0x0000, 0x260c, 0x0000, 0x260c, 0x0000, 0x270e,
-	0x0000, 0x270e, 0x0000, 0x2810, 0x0000, 0x2810, 0x0000, 0x2912,
-	0x0000, 0x2912, 0x0000, 0x1a60, 0x0000, 0x8062, 0x0008, 0x0007,
-	0x0000, 0x8066, 0x0000, 0x0052, 0x0000, 0x4571, 0x0003, 0x92c0,
-	0x0009, 0x0780, 0x0008, 0x0e56, 0x0003, 0x124b, 0x0002, 0x097a,
-	0x0003, 0x2e4d, 0x0002, 0x2e4d, 0x0002, 0x0a40, 0x0003, 0x3a46,
-	0x000a, 0x0d8a, 0x000b, 0x597c, 0x0003, 0x8054, 0x0008, 0x0004,
-	0x0000, 0x1243, 0x000a, 0x0998, 0x0003, 0x8010, 0x0008, 0x000d,
-	0x0000, 0x021b, 0x000c, 0x1948, 0x000a, 0x0987, 0x000b, 0x0210,
-	0x0004, 0x1810, 0x0000, 0x021b, 0x000c, 0x0198, 0x000b, 0x1948,
-	0x000a, 0x098e, 0x000b, 0x1243, 0x000a, 0x0a43, 0x0003, 0x194d,
-	0x000a, 0x0992, 0x0003, 0x1243, 0x000a, 0x0a4a, 0x0003, 0x5992,
-	0x0003, 0x8054, 0x0008, 0x0004, 0x0000, 0x0210, 0x0004, 0x1810,
-	0x0000, 0x021b, 0x000c, 0x8074, 0x0000, 0xf000, 0x0008, 0x8072,
-	0x0000, 0x3000, 0x0008, 0x0d30, 0x0000, 0x3a42, 0x0002, 0x0da2,
-	0x000b, 0x15fe, 0x0008, 0x3461, 0x000b, 0x000a, 0x000b, 0x8074,
-	0x0000, 0x0501, 0x0000, 0x8010, 0x0008, 0x000c, 0x0008, 0x021b,
-	0x000c, 0x000a, 0x000b, 0xbbe0, 0x0009, 0x0030, 0x0008, 0x0db8,
-	0x0003, 0x18fe, 0x0000, 0x3ce0, 0x0009, 0x09b5, 0x0003, 0x15fe,
-	0x0008, 0x3ce0, 0x0009, 0x09b5, 0x0003, 0x020b, 0x0004, 0x8076,
-	0x0008, 0x0040, 0x0000, 0x0208, 0x000b, 0x8076, 0x0008, 0x0041,
-	0x0008, 0x0208, 0x000b, 0xbbe0, 0x0009, 0x0032, 0x0000, 0x0dbd,
-	0x0003, 0x3c1e, 0x0008, 0x0208, 0x000b, 0xbbe0, 0x0009, 0x003b,
-	0x0000, 0x0dc2, 0x000b, 0x3c20, 0x0000, 0x0208, 0x000b, 0xbbe0,
-	0x0009, 0x0035, 0x0008, 0x0dc8, 0x000b, 0x8072, 0x0000, 0x8000,
-	0x0000, 0x0384, 0x000b, 0xbbe0, 0x0009, 0x0036, 0x0008, 0x0aa5,
-	0x000b, 0xbbe0, 0x0009, 0x0037, 0x0000, 0x0de9, 0x000b, 0x18fe,
-	0x0000, 0x3ce0, 0x0009, 0x0db5, 0x000b, 0x8076, 0x0008, 0x0040,
-	0x0000, 0x1a60, 0x0000, 0x8062, 0x0008, 0x000d, 0x0000, 0x2604,
-	0x0008, 0x2604, 0x0008, 0x2706, 0x0008, 0x2706, 0x0008, 0x2808,
-	0x0000, 0x2808, 0x0000, 0x290a, 0x0000, 0x290a, 0x0000, 0x8066,
-	0x0000, 0x0422, 0x0000, 0x45e0, 0x000b, 0x0210, 0x0004, 0x8054,
-	0x0008, 0x0004, 0x0000, 0x8074, 0x0000, 0xf000, 0x0008, 0x8072,
-	0x0000, 0xb000, 0x0000, 0x019c, 0x0003, 0xbbe0, 0x0009, 0x0038,
-	0x0000, 0x0dfb, 0x000b, 0x18fe, 0x0000, 0x3ce0, 0x0009, 0x09f8,
-	0x0003, 0x15fe, 0x0008, 0x3ce0, 0x0009, 0x0db1, 0x0003, 0x020b,
-	0x0004, 0x8076, 0x0008, 0x0040, 0x0000, 0x8072, 0x0000, 0x8000,
-	0x0000, 0x0268, 0x000b, 0x8076, 0x0008, 0x0042, 0x0008, 0x0208,
-	0x000b, 0xbbe0, 0x0009, 0x0016, 0x0000, 0x0e08, 0x000b, 0x8074,
-	0x0000, 0x0808, 0x0008, 0x3a44, 0x0002, 0x0c0c, 0x000b, 0x8074,
-	0x0000, 0x0800, 0x0000, 0x8072, 0x0000, 0x8000, 0x0000, 0x8000,
-	0x000f, 0x000a, 0x000b, 0x8072, 0x0000, 0x8000, 0x0000, 0x000a,
-	0x000b, 0x3d30, 0x000a, 0x7f00, 0x0000, 0xbc80, 0x0001, 0x0007,
-	0x0000, 0x0214, 0x0003, 0x1930, 0x000a, 0x7f00, 0x0000, 0x9880,
-	0x0001, 0x0007, 0x0000, 0x8060, 0x0000, 0x0400, 0x0000, 0x7f62,
-	0x0008, 0x8066, 0x0000, 0x000a, 0x0008, 0x4619, 0x000b, 0x4000,
-	0x000f, 0x221e, 0x000b, 0x0870, 0x0008, 0x4000, 0x000f, 0x7e1b,
-	0x000b, 0xbbe0, 0x0009, 0x0030, 0x0008, 0x0e1b, 0x0003, 0x18fe,
-	0x0000, 0x3ce0, 0x0009, 0x0a2c, 0x0003, 0x15fe, 0x0008, 0x3ce0,
-	0x0009, 0x0a2c, 0x0003, 0x020b, 0x0004, 0x8076, 0x0008, 0x0040,
-	0x0000, 0x022e, 0x0003, 0x8076, 0x0008, 0x0041, 0x0008, 0x8072,
-	0x0000, 0x8000, 0x0000, 0x021b, 0x0003, 0xbac0, 0x0009, 0x0090,
-	0x0008, 0x0a37, 0x0003, 0x8074, 0x0000, 0x0706, 0x0000, 0x0239,
-	0x0003, 0x8074, 0x0000, 0x0703, 0x0000, 0x4000, 0x000f, 0x8010,
-	0x0008, 0x0023, 0x0000, 0x0276, 0x000b, 0x8010, 0x0008, 0x0008,
-	0x0000, 0x0276, 0x000b, 0x8010, 0x0008, 0x0022, 0x0008, 0x0276,
-	0x000b, 0x0210, 0x0004, 0x8010, 0x0008, 0x0007, 0x0000, 0x021b,
-	0x000c, 0x1810, 0x0000, 0x021b, 0x000c, 0x0282, 0x0003, 0x0210,
-	0x0004, 0x8010, 0x0008, 0x001b, 0x0008, 0x021b, 0x000c, 0x1810,
-	0x0000, 0x021b, 0x000c, 0x8074, 0x0000, 0xf080, 0x0000, 0x8072,
-	0x0000, 0x3000, 0x0008, 0x0d30, 0x0000, 0x000a, 0x000b, 0x8010,
-	0x0008, 0x0009, 0x0008, 0x0276, 0x000b, 0x8010, 0x0008, 0x0005,
-	0x0008, 0x0276, 0x000b, 0x1648, 0x000a, 0x0c6f, 0x000b, 0x808c,
-	0x0008, 0x0001, 0x0000, 0x8010, 0x0008, 0x0004, 0x0000, 0x4143,
-	0x000a, 0x086f, 0x0003, 0x3a44, 0x0002, 0x0c0a, 0x000b, 0x0d2a,
-	0x0008, 0x0276, 0x000b, 0x8010, 0x0008, 0x0003, 0x0008, 0x027a,
-	0x000b, 0x8010, 0x0008, 0x000b, 0x0000, 0x027a, 0x000b, 0x8010,
-	0x0008, 0x0002, 0x0000, 0x027a, 0x000b, 0x3a47, 0x0002, 0x0d40,
-	0x000b, 0x8010, 0x0008, 0x0006, 0x0008, 0x027a, 0x000b, 0x8074,
-	0x0000, 0xf000, 0x0008, 0x8072, 0x0000, 0x3000, 0x0008, 0x021b,
-	0x000c, 0x0231, 0x0004, 0x3a40, 0x000a, 0x080a, 0x0003, 0x8010,
-	0x0008, 0x000c, 0x0008, 0x021b, 0x000c, 0x000a, 0x000b, 0x8074,
-	0x0000, 0xf080, 0x0000, 0x8072, 0x0000, 0x3000, 0x0008, 0x0d30,
-	0x0000, 0x2e4d, 0x0002, 0x2e4d, 0x0002, 0x0a8d, 0x000b, 0x8054,
-	0x0008, 0x0019, 0x0000, 0x000a, 0x000b, 0x8054, 0x0008, 0x0009,
-	0x0008, 0x000a, 0x000b, 0x3a44, 0x0002, 0x0c0a, 0x000b, 0x026b,
-	0x000b, 0x808c, 0x0008, 0x0000, 0x0008, 0x4447, 0x0002, 0x0ab9,
-	0x0003, 0xc0c0, 0x0001, 0x00ff, 0x0008, 0xffe0, 0x0009, 0x00ff,
-	0x0008, 0x0e90, 0x0003, 0xc1e0, 0x0001, 0xffff, 0x0008, 0x0e90,
-	0x0003, 0x8010, 0x0008, 0x0013, 0x0000, 0x021b, 0x000c, 0x8074,
-	0x0000, 0x0202, 0x0008, 0x000a, 0x000b, 0x3a40, 0x000a, 0x0eb6,
-	0x000b, 0x8074, 0x0000, 0x0200, 0x0000, 0x3d00, 0x0000, 0x3cfe,
-	0x0000, 0x8072, 0x0000, 0x8000, 0x0000, 0x43e0, 0x0001, 0x0eb4,
-	0x0003, 0x42fe, 0x0000, 0xffc0, 0x0001, 0x00ff, 0x0008, 0x00e0,
-	0x0009, 0x0a90, 0x000b, 0x0d08, 0x0008, 0x0309, 0x000b, 0x8072,
-	0x0000, 0x8000, 0x0000, 0x000a, 0x000b, 0x038d, 0x0004, 0x808c,
-	0x0008, 0x0001, 0x0000, 0x04fe, 0x0008, 0x3370, 0x0003, 0x0460,
-	0x0000, 0x8062, 0x0008, 0x0001, 0x0000, 0x8066, 0x0000, 0x0009,
-	0x0008, 0x46c3, 0x0003, 0x0004, 0x0000, 0x80c0, 0x0009, 0x00ff,
-	0x0008, 0x7f00, 0x0000, 0x80e0, 0x0001, 0x0004, 0x0000, 0x0add,
-	0x000b, 0x80e0, 0x0001, 0x0005, 0x0008, 0x0add, 0x000b, 0x80e0,
-	0x0001, 0x0006, 0x0008, 0x0add, 0x000b, 0x82c0, 0x0001, 0xff00,
-	0x0008, 0x7f04, 0x0008, 0x82e0, 0x0009, 0x0600, 0x0008, 0x0add,
-	0x000b, 0x82e0, 0x0009, 0x0500, 0x0008, 0x0add, 0x000b, 0x82e0,
-	0x0009, 0x0400, 0x0000, 0x0f70, 0x0003, 0xc4c0, 0x0009, 0x7000,
-	0x0000, 0xffe0, 0x0009, 0x1000, 0x0000, 0x0b09, 0x0003, 0x037e,
-	0x0004, 0x3941, 0x0002, 0x0ae8, 0x000b, 0x8072, 0x0000, 0x0400,
-	0x0000, 0x000a, 0x000b, 0x0460, 0x0000, 0x80fe, 0x0008, 0x002b,
-	0x0008, 0x7f62, 0x0008, 0x8066, 0x0000, 0x2209, 0x0008, 0x46ee,
-	0x0003, 0x11fe, 0x0000, 0x3304, 0x0003, 0x9180, 0x0001, 0x0002,
-	0x0000, 0x8060, 0x0000, 0x0400, 0x0000, 0x7f62, 0x0008, 0x8066,
-	0x0000, 0x0609, 0x0008, 0x46f8, 0x000b, 0x42fe, 0x0000, 0xffc0,
-	0x0001, 0xff00, 0x0008, 0x03e0, 0x0009, 0x0f01, 0x0003, 0x8072,
-	0x0000, 0x0400, 0x0000, 0x0046, 0x0003, 0x9180, 0x0001, 0x0003,
-	0x0008, 0x02eb, 0x0003, 0x8072, 0x0000, 0x0400, 0x0000, 0x8010,
-	0x0008, 0x0010, 0x0000, 0x0361, 0x0003, 0x037e, 0x0004, 0x3941,
-	0x0002, 0x0b0f, 0x0003, 0x8072, 0x0000, 0x0400, 0x0000, 0x000a,
-	0x000b, 0x0346, 0x000c, 0x11fe, 0x0000, 0x3717, 0x0003, 0x8072,
-	0x0000, 0x0400, 0x0000, 0x8010, 0x0008, 0x000e, 0x0000, 0x0361,
-	0x0003, 0x8060, 0x0000, 0x0400, 0x0000, 0x04fe, 0x0008, 0x372c,
-	0x000b, 0x808c, 0x0008, 0x0000, 0x0008, 0x9180, 0x0001, 0x0005,
-	0x0008, 0x7f62, 0x0008, 0x8066, 0x0000, 0x0009, 0x0008, 0x4722,
-	0x000b, 0x0060, 0x0008, 0x8062, 0x0008, 0x001b, 0x0008, 0x4304,
-	0x0008, 0x4206, 0x0008, 0x8066, 0x0000, 0x0412, 0x0000, 0x472a,
-	0x0003, 0x0343, 0x0003, 0x808c, 0x0008, 0x0001, 0x0000, 0x0460,
-	0x0000, 0x8062, 0x0008, 0x002b, 0x0008, 0x8066, 0x0000, 0x0609,
-	0x0008, 0x4733, 0x000b, 0x8066, 0x0000, 0x220a, 0x0008, 0x4736,
-	0x000b, 0x42fe, 0x0000, 0xffc0, 0x0001, 0xff00, 0x0008, 0x7f04,
-	0x0008, 0x8060, 0x0000, 0x0400, 0x0000, 0x9180, 0x0001, 0x0002,
-	0x0000, 0x7f62, 0x0008, 0x8066, 0x0000, 0x041a, 0x0008, 0x4742,
-	0x000b, 0x8072, 0x0000, 0x0400, 0x0000, 0x0046, 0x0003, 0x8060,
-	0x0000, 0x0400, 0x0000, 0x1362, 0x0008, 0x8066, 0x0000, 0x0411,
-	0x0000, 0x474b, 0x000b, 0x02fe, 0x0008, 0x03e0, 0x0009, 0x0f51,
-	0x0003, 0x0d22, 0x0000, 0x4000, 0x000f, 0x8280, 0x0009, 0x0002,
-	0x0000, 0x1380, 0x0001, 0x7f62, 0x0008, 0x8066, 0x0000, 0x2209,
-	0x0008, 0x4757, 0x0003, 0x0200, 0x000a, 0xffc0, 0x0001, 0x0007,
-	0x0000, 0x7f06, 0x0000, 0x1362, 0x0008, 0x8066, 0x0000, 0x060a,
-	0x0008, 0x475f, 0x000b, 0x4000, 0x000f, 0x3a44, 0x0002, 0x0c0a,
-	0x000b, 0x2f44, 0x000a, 0x2f44, 0x000a, 0x0e6b, 0x000b, 0x808a,
-	0x0008, 0x0003, 0x0008, 0x8074, 0x0000, 0xf080, 0x0000, 0x8072,
-	0x0000, 0x3000, 0x0008, 0x5b6c, 0x0003, 0x8054, 0x0008, 0x0019,
-	0x0000, 0x000a, 0x000b, 0x3a44, 0x0002, 0x0c0a, 0x000b, 0x808c,
-	0x0008, 0x0000, 0x0008, 0x8010, 0x0008, 0x0011, 0x0008, 0x021b,
-	0x000c, 0x42fe, 0x0000, 0xffc0, 0x0001, 0x00ff, 0x0008, 0x7f10,
-	0x0008, 0x021b, 0x000c, 0x4310, 0x0008, 0x027a, 0x000b, 0x3941,
-	0x0002, 0x0b81, 0x0003, 0x4000, 0x000f, 0x8072, 0x0000, 0x0404,
-	0x0008, 0x4000, 0x000f, 0x8010, 0x0008, 0x0012, 0x0008, 0x021b,
-	0x000c, 0x0346, 0x000c, 0x1110, 0x0000, 0x021b, 0x000c, 0x11fe,
-	0x0000, 0x3787, 0x0003, 0x000a, 0x000b, 0xc2c0, 0x0009, 0x00ff,
-	0x0008, 0x7f00, 0x0000, 0xc3c0, 0x0001, 0xff00, 0x0008, 0x00d0,
-	0x0009, 0x0bb2, 0x0003, 0x0d0a, 0x0000, 0x8580, 0x0001, 0x1000,
-	0x0000, 0x7f62, 0x0008, 0x8060, 0x0000, 0x0400, 0x0000, 0x8066,
-	0x0000, 0x0809, 0x0000, 0x479c, 0x000b, 0x04fe, 0x0008, 0x33ab,
-	0x0003, 0x0460, 0x0000, 0x8062, 0x0008, 0x0004, 0x0000, 0x8066,
-	0x0000, 0x0211, 0x0000, 0x47a4, 0x0003, 0x01fe, 0x0008, 0x00e0,
-	0x0009, 0x0fab, 0x0003, 0x02fe, 0x0008, 0x43e0, 0x0001, 0x0bb1,
-	0x0003, 0x0500, 0x0002, 0x7f0a, 0x0000, 0xffe0, 0x0009, 0x0800,
-	0x0000, 0x0f95, 0x000b, 0x0d08, 0x0008, 0x4000, 0x000f, 0x43fe,
-	0x0008, 0x3e80, 0x0001, 0xffc0, 0x0001, 0x7fff, 0x0000, 0x0d60,
-	0x0000, 0x7f62, 0x0008, 0x8066, 0x0000, 0x0809, 0x0000, 0x47ba,
-	0x0003, 0x8060, 0x0000, 0x0400, 0x0000, 0x84c0, 0x0001, 0xff00,
-	0x0008, 0x7f60, 0x000a, 0x7f60, 0x000a, 0x7f60, 0x000a, 0x7f60,
-	0x000a, 0x7f60, 0x000a, 0x7f60, 0x000a, 0x7f60, 0x000a, 0x7f60,
-	0x000a, 0xff80, 0x0009, 0x1000, 0x0000, 0x7f62, 0x0008, 0x8066,
-	0x0000, 0x0809, 0x0000, 0x47cc, 0x000b, 0x4000, 0x000f, 0x5ff4,
-	0xebed, 0x0001, 0x0002, 0x0004, 0x0008, 0x0010, 0x0020, 0x0040,
-	0x0080, 0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x2000, 0x4000,
-	0x8000, 0x74b9
+	0x00ce, 0x003e, 0x002e, 0x001e, 0x000e, 0x0005, 0x00b6, 0x0066,
+	0x6610, 0x2658, 0xbe04, 0x96b4, 0xff00, 0x8637, 0x9686, 0x0006,
+	0x0170, 0x9686, 0x0004, 0x0158, 0xbe04, 0x96b4, 0x00ff, 0x9686,
+	0x0006, 0x0128, 0x9686, 0x0004, 0x0110, 0x9085, 0x0001, 0x006e,
+	0x00be, 0x0005, 0x00d6, 0x080c, 0xdace, 0x00de, 0x0005, 0x00d6,
+	0x080c, 0xdadb, 0x1520, 0x680c, 0x908c, 0xff00, 0x6820, 0x9084,
+	0x00ff, 0x9115, 0x6216, 0x6824, 0x602e, 0xd1e4, 0x0130, 0x9006,
+	0x080c, 0xeb03, 0x2009, 0x0001, 0x0078, 0xd1ec, 0x0180, 0x6920,
+	0x918c, 0x00ff, 0x6824, 0x080c, 0x287c, 0x1148, 0x2001, 0x0001,
+	0x080c, 0xeb03, 0x2110, 0x900e, 0x080c, 0x3267, 0x0018, 0x9085,
+	0x0001, 0x0008, 0x9006, 0x00de, 0x0005, 0x00b6, 0x00c6, 0x080c,
+	0xaf91, 0x05a8, 0x0016, 0x0026, 0x00c6, 0x2011, 0x0263, 0x2204,
+	0x8211, 0x220c, 0x080c, 0x287c, 0x1578, 0x080c, 0x6638, 0x1560,
+	0xbe12, 0xbd16, 0x00ce, 0x002e, 0x001e, 0x2b00, 0x6012, 0x080c,
+	0xe936, 0x11d8, 0x080c, 0x3342, 0x11c0, 0x080c, 0xda36, 0x0510,
+	0x2001, 0x0007, 0x080c, 0x65e9, 0x2001, 0x0007, 0x080c, 0x6615,
+	0x6017, 0x0000, 0x6023, 0x0001, 0x6007, 0x0001, 0x6003, 0x0001,
+	0x080c, 0x91f9, 0x080c, 0x9763, 0x0010, 0x080c, 0xaf43, 0x9085,
+	0x0001, 0x00ce, 0x00be, 0x0005, 0x080c, 0xaf43, 0x00ce, 0x002e,
+	0x001e, 0x0ca8, 0x080c, 0xaf43, 0x9006, 0x0c98, 0x2069, 0x026d,
+	0x6800, 0x9082, 0x0010, 0x1228, 0x6017, 0x0000, 0x9085, 0x0001,
+	0x0008, 0x9006, 0x0005, 0x6017, 0x0000, 0x2069, 0x026c, 0x6808,
+	0x9084, 0xff00, 0x9086, 0x0800, 0x1190, 0x6904, 0x9186, 0x0018,
+	0x0118, 0x9186, 0x0014, 0x1158, 0x810f, 0x6800, 0x9084, 0x00ff,
+	0x910d, 0x615a, 0x908e, 0x0014, 0x0110, 0x908e, 0x0010, 0x0005,
+	0x6004, 0x90b2, 0x0053, 0x1a0c, 0x0dd5, 0x91b6, 0x0013, 0x1130,
+	0x2008, 0x91b2, 0x0040, 0x1a04, 0xdc25, 0x0092, 0x91b6, 0x0027,
+	0x0120, 0x91b6, 0x0014, 0x190c, 0x0dd5, 0x2001, 0x0007, 0x080c,
+	0x6615, 0x080c, 0x9657, 0x080c, 0xaf74, 0x080c, 0x9763, 0x0005,
+	0xdb58, 0xdb5a, 0xdb58, 0xdb58, 0xdb58, 0xdb5a, 0xdb69, 0xdc1e,
+	0xdbbb, 0xdc1e, 0xdbcf, 0xdc1e, 0xdb69, 0xdc1e, 0xdc16, 0xdc1e,
+	0xdc16, 0xdc1e, 0xdc1e, 0xdb58, 0xdb58, 0xdb58, 0xdb58, 0xdb58,
+	0xdb58, 0xdb58, 0xdb58, 0xdb58, 0xdb58, 0xdb58, 0xdb5a, 0xdb58,
+	0xdc1e, 0xdb58, 0xdb58, 0xdc1e, 0xdb58, 0xdc1b, 0xdc1e, 0xdb58,
+	0xdb58, 0xdb58, 0xdb58, 0xdc1e, 0xdc1e, 0xdb58, 0xdc1e, 0xdc1e,
+	0xdb58, 0xdb64, 0xdb58, 0xdb58, 0xdb58, 0xdb58, 0xdc1a, 0xdc1e,
+	0xdb58, 0xdb58, 0xdc1e, 0xdc1e, 0xdb58, 0xdb58, 0xdb58, 0xdb58,
+	0x080c, 0x0dd5, 0x080c, 0x9657, 0x080c, 0xd3a0, 0x6003, 0x0002,
+	0x080c, 0x9763, 0x0804, 0xdc24, 0x9006, 0x080c, 0x65d5, 0x0804,
+	0xdc1e, 0x080c, 0x6a04, 0x1904, 0xdc1e, 0x9006, 0x080c, 0x65d5,
+	0x6010, 0x2058, 0xb810, 0x9086, 0x00ff, 0x1140, 0x00f6, 0x2079,
+	0x1800, 0x78a8, 0x8000, 0x78aa, 0x00fe, 0x0428, 0x6010, 0x2058,
+	0xb8c0, 0x9005, 0x1178, 0x080c, 0xd388, 0x1904, 0xdc1e, 0x0036,
+	0x0046, 0xbba0, 0x2021, 0x0007, 0x080c, 0x4d36, 0x004e, 0x003e,
+	0x0804, 0xdc1e, 0x080c, 0x3373, 0x1904, 0xdc1e, 0x2001, 0x1800,
+	0x2004, 0x9086, 0x0002, 0x1138, 0x00f6, 0x2079, 0x1800, 0x78a8,
+	0x8000, 0x78aa, 0x00fe, 0x2001, 0x0002, 0x080c, 0x65e9, 0x080c,
+	0x9657, 0x6023, 0x0001, 0x6003, 0x0001, 0x6007, 0x0002, 0x080c,
+	0x91f9, 0x080c, 0x9763, 0x6110, 0x2158, 0x2009, 0x0001, 0x080c,
+	0x85be, 0x0804, 0xdc24, 0x6610, 0x2658, 0xbe04, 0x96b4, 0xff00,
+	0x8637, 0x9686, 0x0006, 0x0904, 0xdc1e, 0x9686, 0x0004, 0x0904,
+	0xdc1e, 0x080c, 0x8d70, 0x2001, 0x0004, 0x0804, 0xdc1c, 0x2001,
+	0x1800, 0x2004, 0x9086, 0x0003, 0x1158, 0x0036, 0x0046, 0x6010,
+	0x2058, 0xbba0, 0x2021, 0x0006, 0x080c, 0x4d36, 0x004e, 0x003e,
+	0x2001, 0x0006, 0x080c, 0xdc42, 0x6610, 0x2658, 0xbe04, 0x0066,
+	0x96b4, 0xff00, 0x8637, 0x9686, 0x0006, 0x006e, 0x0168, 0x2001,
+	0x0006, 0x080c, 0x6615, 0x9284, 0x00ff, 0x908e, 0x0007, 0x1120,
+	0x2001, 0x0006, 0x080c, 0x65e9, 0x080c, 0x6a04, 0x11f8, 0x2001,
+	0x1837, 0x2004, 0xd0a4, 0x01d0, 0xbe04, 0x96b4, 0x00ff, 0x9686,
+	0x0006, 0x01a0, 0x00f6, 0x2079, 0x1800, 0x78a8, 0x8000, 0x78aa,
+	0x00fe, 0x0804, 0xdba3, 0x2001, 0x0004, 0x0030, 0x2001, 0x0006,
+	0x0449, 0x0020, 0x0018, 0x0010, 0x080c, 0x6615, 0x080c, 0x9657,
+	0x080c, 0xaf43, 0x080c, 0x9763, 0x0005, 0x2600, 0x0002, 0xdc39,
+	0xdc39, 0xdc39, 0xdc39, 0xdc39, 0xdc3b, 0xdc39, 0xdc3b, 0xdc39,
+	0xdc39, 0xdc3b, 0xdc39, 0xdc39, 0xdc39, 0xdc3b, 0xdc3b, 0xdc3b,
+	0xdc3b, 0x080c, 0x0dd5, 0x080c, 0x9657, 0x080c, 0xaf43, 0x080c,
+	0x9763, 0x0005, 0x0016, 0x00b6, 0x00d6, 0x6110, 0x2158, 0xb900,
+	0xd184, 0x0138, 0x080c, 0x65e9, 0x9006, 0x080c, 0x65d5, 0x080c,
+	0x3247, 0x00de, 0x00be, 0x001e, 0x0005, 0x6610, 0x2658, 0xb804,
+	0x9084, 0xff00, 0x8007, 0x90b2, 0x000c, 0x1a0c, 0x0dd5, 0x91b6,
+	0x0015, 0x1110, 0x003b, 0x0028, 0x91b6, 0x0016, 0x190c, 0x0dd5,
+	0x006b, 0x0005, 0xb9ee, 0xb9ee, 0xb9ee, 0xb9ee, 0xdcd7, 0xb9ee,
+	0xdcc1, 0xdc82, 0xb9ee, 0xb9ee, 0xb9ee, 0xb9ee, 0xb9ee, 0xb9ee,
+	0xb9ee, 0xb9ee, 0xdcd7, 0xb9ee, 0xdcc1, 0xdcc8, 0xb9ee, 0xb9ee,
+	0xb9ee, 0xb9ee, 0x00f6, 0x080c, 0x6a04, 0x11d8, 0x080c, 0xd388,
+	0x11c0, 0x6010, 0x905d, 0x01a8, 0xb8c0, 0x9005, 0x0190, 0x9006,
+	0x080c, 0x65d5, 0x2001, 0x0002, 0x080c, 0x65e9, 0x6023, 0x0001,
+	0x6003, 0x0001, 0x6007, 0x0002, 0x080c, 0x91f9, 0x080c, 0x9763,
+	0x00f0, 0x2011, 0x0263, 0x2204, 0x8211, 0x220c, 0x080c, 0x287c,
+	0x11b0, 0x080c, 0x6699, 0x0118, 0x080c, 0xaf43, 0x0080, 0xb810,
+	0x0006, 0xb814, 0x0006, 0xb8c0, 0x0006, 0x080c, 0x60c7, 0x000e,
+	0xb8c2, 0x000e, 0xb816, 0x000e, 0xb812, 0x080c, 0xaf43, 0x00fe,
+	0x0005, 0x6604, 0x96b6, 0x001e, 0x1110, 0x080c, 0xaf43, 0x0005,
+	0x080c, 0xbd79, 0x1148, 0x6003, 0x0001, 0x6007, 0x0001, 0x080c,
+	0x91f9, 0x080c, 0x9763, 0x0010, 0x080c, 0xaf43, 0x0005, 0x0804,
+	0xaf43, 0x6004, 0x908a, 0x0053, 0x1a0c, 0x0dd5, 0x080c, 0x9657,
+	0x080c, 0xaf74, 0x080c, 0x9763, 0x0005, 0x9182, 0x0040, 0x0002,
+	0xdcfc, 0xdcfc, 0xdcfc, 0xdcfc, 0xdcfe, 0xdcfc, 0xdcfc, 0xdcfc,
+	0xdcfc, 0xdcfc, 0xdcfc, 0xdcfc, 0xdcfc, 0xdcfc, 0xdcfc, 0xdcfc,
+	0xdcfc, 0xdcfc, 0xdcfc, 0xdcfc, 0x080c, 0x0dd5, 0x0096, 0x00b6,
+	0x00d6, 0x00e6, 0x00f6, 0x0046, 0x0026, 0x6210, 0x2258, 0xb8bc,
+	0x9005, 0x11a8, 0x6106, 0x2071, 0x0260, 0x7444, 0x94a4, 0xff00,
+	0x0904, 0xdd64, 0x080c, 0xeaf7, 0x1170, 0x9486, 0x2000, 0x1158,
+	0x2009, 0x0001, 0x2011, 0x0200, 0x080c, 0x879a, 0x0020, 0x9026,
+	0x080c, 0xe97b, 0x0c38, 0x080c, 0x0fff, 0x090c, 0x0dd5, 0x6003,
+	0x0007, 0xa867, 0x010d, 0x9006, 0xa802, 0xa86a, 0xac8a, 0x2c00,
+	0xa88e, 0x6008, 0xa8e2, 0x6010, 0x2058, 0xb8a0, 0x7130, 0xa97a,
+	0x0016, 0xa876, 0xa87f, 0x0000, 0xa883, 0x0000, 0xa887, 0x0036,
+	0x080c, 0x6d17, 0x001e, 0x080c, 0xeaf7, 0x1904, 0xddc4, 0x9486,
+	0x2000, 0x1130, 0x2019, 0x0017, 0x080c, 0xe6ae, 0x0804, 0xddc4,
+	0x9486, 0x0200, 0x1120, 0x080c, 0xe64a, 0x0804, 0xddc4, 0x9486,
+	0x0400, 0x0120, 0x9486, 0x1000, 0x1904, 0xddc4, 0x2019, 0x0002,
+	0x080c, 0xe665, 0x0804, 0xddc4, 0x2069, 0x1a70, 0x6a00, 0xd284,
+	0x0904, 0xde2e, 0x9284, 0x0300, 0x1904, 0xde27, 0x6804, 0x9005,
+	0x0904, 0xde0f, 0x2d78, 0x6003, 0x0007, 0x080c, 0x1018, 0x0904,
+	0xddd0, 0x7800, 0xd08c, 0x1118, 0x7804, 0x8001, 0x7806, 0x6017,
+	0x0000, 0x2001, 0x180f, 0x2004, 0xd084, 0x1904, 0xde32, 0x9006,
+	0xa802, 0xa867, 0x0116, 0xa86a, 0x6008, 0xa8e2, 0x2c00, 0xa87a,
+	0x6010, 0x2058, 0xb8a0, 0x7130, 0xa9b6, 0xa876, 0xb928, 0xa9ba,
+	0xb92c, 0xa9be, 0xb930, 0xa9c2, 0xb934, 0xa9c6, 0xa883, 0x003d,
+	0x7044, 0x9084, 0x0003, 0x9080, 0xddcc, 0x2005, 0xa87e, 0x20a9,
+	0x000a, 0x2001, 0x0270, 0xaa5c, 0x9290, 0x0021, 0x2009, 0x0205,
+	0x200b, 0x0080, 0x20e1, 0x0000, 0xab60, 0x23e8, 0x2098, 0x22a0,
+	0x4003, 0x200b, 0x0000, 0x2001, 0x027a, 0x200c, 0xa9b2, 0x8000,
+	0x200c, 0xa9ae, 0x080c, 0x6d17, 0x002e, 0x004e, 0x00fe, 0x00ee,
+	0x00de, 0x00be, 0x009e, 0x0005, 0x0000, 0x0080, 0x0040, 0x0000,
+	0x2001, 0x1810, 0x2004, 0xd084, 0x0120, 0x080c, 0x0fff, 0x1904,
+	0xdd79, 0x6017, 0xf100, 0x6003, 0x0001, 0x6007, 0x0041, 0x080c,
+	0x91b1, 0x080c, 0x9763, 0x0c00, 0x2069, 0x0260, 0x6848, 0x9084,
+	0xff00, 0x9086, 0x1200, 0x1198, 0x686c, 0x9084, 0x00ff, 0x0016,
+	0x6114, 0x918c, 0xf700, 0x910d, 0x6116, 0x001e, 0x6003, 0x0001,
+	0x6007, 0x0043, 0x080c, 0x91b1, 0x080c, 0x9763, 0x0828, 0x6868,
+	0x602e, 0x686c, 0x6032, 0x6017, 0xf200, 0x6003, 0x0001, 0x6007,
+	0x0041, 0x080c, 0x91b1, 0x080c, 0x9763, 0x0804, 0xddc4, 0x2001,
+	0x180e, 0x2004, 0xd0ec, 0x0120, 0x2011, 0x8049, 0x080c, 0x4b7f,
+	0x6017, 0xf300, 0x0010, 0x6017, 0xf100, 0x6003, 0x0001, 0x6007,
+	0x0041, 0x080c, 0x91b1, 0x080c, 0x9763, 0x0804, 0xddc4, 0x6017,
+	0xf500, 0x0c98, 0x6017, 0xf600, 0x0804, 0xdde4, 0x6017, 0xf200,
+	0x0804, 0xdde4, 0xa867, 0x0146, 0xa86b, 0x0000, 0x6008, 0xa886,
+	0x2c00, 0xa87a, 0x7044, 0x9084, 0x0003, 0x9080, 0xddcc, 0x2005,
+	0xa87e, 0x2928, 0x6010, 0x2058, 0xb8a0, 0xa876, 0xb828, 0xa88a,
+	0xb82c, 0xa88e, 0xb830, 0xa892, 0xb834, 0xa896, 0xa883, 0x003d,
+	0x2009, 0x0205, 0x2104, 0x9085, 0x0080, 0x200a, 0x20e1, 0x0000,
+	0x2011, 0x0210, 0x2214, 0x9294, 0x0fff, 0xaaa2, 0x9282, 0x0111,
+	0x1a0c, 0x0dd5, 0x8210, 0x821c, 0x2001, 0x026c, 0x2098, 0xa860,
+	0x20e8, 0xa85c, 0x9080, 0x0029, 0x20a0, 0x2011, 0xdeae, 0x2041,
+	0x0001, 0x223d, 0x9784, 0x00ff, 0x9322, 0x1208, 0x2300, 0x20a8,
+	0x4003, 0x931a, 0x0530, 0x8210, 0xd7fc, 0x1130, 0x8d68, 0x2d0a,
+	0x2001, 0x0260, 0x2098, 0x0c68, 0x2950, 0x080c, 0x1018, 0x0170,
+	0x2900, 0xb002, 0xa867, 0x0147, 0xa86b, 0x0000, 0xa860, 0x20e8,
+	0xa85c, 0x9080, 0x001b, 0x20a0, 0x8840, 0x08d8, 0x2548, 0xa800,
+	0x902d, 0x0118, 0x080c, 0x1031, 0x0cc8, 0x080c, 0x1031, 0x0804,
+	0xddd0, 0x2548, 0x8847, 0x9885, 0x0046, 0xa866, 0x2009, 0x0205,
+	0x200b, 0x0000, 0x080c, 0xe6dd, 0x0804, 0xddc4, 0x8010, 0x0004,
+	0x801a, 0x0006, 0x8018, 0x0008, 0x8016, 0x000a, 0x8014, 0x9186,
+	0x0013, 0x1160, 0x6004, 0x908a, 0x0054, 0x1a0c, 0x0dd5, 0x9082,
+	0x0040, 0x0a0c, 0x0dd5, 0x2008, 0x0804, 0xdf60, 0x9186, 0x0051,
+	0x0108, 0x00c0, 0x2001, 0x0109, 0x2004, 0xd084, 0x0904, 0xdf10,
+	0x0126, 0x2091, 0x2800, 0x0006, 0x0016, 0x0026, 0x080c, 0x9094,
+	0x002e, 0x001e, 0x000e, 0x012e, 0x6000, 0x9086, 0x0002, 0x1580,
+	0x0804, 0xdfa9, 0x9186, 0x0027, 0x0530, 0x9186, 0x0048, 0x0128,
+	0x9186, 0x0014, 0x0500, 0x190c, 0x0dd5, 0x2001, 0x0109, 0x2004,
+	0xd084, 0x01f0, 0x00c6, 0x0126, 0x2091, 0x2800, 0x00c6, 0x2061,
+	0x0100, 0x0006, 0x0016, 0x0026, 0x080c, 0x9094, 0x002e, 0x001e,
+	0x000e, 0x00ce, 0x012e, 0x00ce, 0x6000, 0x9086, 0x0004, 0x190c,
+	0x0dd5, 0x0804, 0xe08c, 0x6004, 0x9082, 0x0040, 0x2008, 0x001a,
+	0x080c, 0xafd9, 0x0005, 0xdf27, 0xdf29, 0xdf29, 0xdf50, 0xdf27,
+	0xdf27, 0xdf27, 0xdf27, 0xdf27, 0xdf27, 0xdf27, 0xdf27, 0xdf27,
+	0xdf27, 0xdf27, 0xdf27, 0xdf27, 0xdf27, 0xdf27, 0xdf27, 0x080c,
+	0x0dd5, 0x080c, 0x9657, 0x080c, 0x9763, 0x0036, 0x0096, 0x6014,
+	0x904d, 0x01d8, 0x080c, 0xcc86, 0x01c0, 0x6003, 0x0002, 0x6010,
+	0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x1178, 0x2019, 0x0004,
+	0x080c, 0xe6dd, 0x6017, 0x0000, 0x6018, 0x9005, 0x1120, 0x2001,
+	0x1986, 0x2004, 0x601a, 0x6003, 0x0007, 0x009e, 0x003e, 0x0005,
+	0x0096, 0x080c, 0x9657, 0x080c, 0x9763, 0x080c, 0xcc86, 0x0120,
+	0x6014, 0x2048, 0x080c, 0x1031, 0x080c, 0xaf74, 0x009e, 0x0005,
+	0x0002, 0xdf75, 0xdf8c, 0xdf77, 0xdfa3, 0xdf75, 0xdf75, 0xdf75,
+	0xdf75, 0xdf75, 0xdf75, 0xdf75, 0xdf75, 0xdf75, 0xdf75, 0xdf75,
+	0xdf75, 0xdf75, 0xdf75, 0xdf75, 0xdf75, 0x080c, 0x0dd5, 0x0096,
+	0x080c, 0x9657, 0x6014, 0x2048, 0xa87c, 0xd0b4, 0x0138, 0x6003,
+	0x0007, 0x2009, 0x0043, 0x080c, 0xafbe, 0x0010, 0x6003, 0x0004,
+	0x080c, 0x9763, 0x009e, 0x0005, 0x080c, 0x9657, 0x080c, 0xcc86,
+	0x0138, 0x6114, 0x0096, 0x2148, 0xa97c, 0x009e, 0xd1ec, 0x1138,
+	0x080c, 0x876f, 0x080c, 0xaf43, 0x080c, 0x9763, 0x0005, 0x080c,
+	0xe93f, 0x0db0, 0x0cc8, 0x080c, 0x9657, 0x2009, 0x0041, 0x0804,
+	0xe114, 0x9182, 0x0040, 0x0002, 0xdfc0, 0xdfc2, 0xdfc0, 0xdfc0,
+	0xdfc0, 0xdfc0, 0xdfc0, 0xdfc0, 0xdfc0, 0xdfc0, 0xdfc0, 0xdfc0,
+	0xdfc0, 0xdfc0, 0xdfc0, 0xdfc0, 0xdfc0, 0xdfc3, 0xdfc0, 0xdfc0,
+	0x080c, 0x0dd5, 0x0005, 0x00d6, 0x080c, 0x876f, 0x00de, 0x080c,
+	0xe997, 0x080c, 0xaf43, 0x0005, 0x9182, 0x0040, 0x0002, 0xdfe3,
+	0xdfe3, 0xdfe3, 0xdfe3, 0xdfe3, 0xdfe3, 0xdfe3, 0xdfe3, 0xdfe3,
+	0xdfe5, 0xe054, 0xdfe3, 0xdfe3, 0xdfe3, 0xdfe3, 0xe054, 0xdfe3,
+	0xdfe3, 0xdfe3, 0xdfe3, 0x080c, 0x0dd5, 0x2001, 0x0105, 0x2004,
+	0x9084, 0x1800, 0x01c8, 0x2001, 0x0132, 0x200c, 0x2001, 0x0131,
+	0x2004, 0x9105, 0x1904, 0xe054, 0x2009, 0x180c, 0x2104, 0xd0d4,
+	0x0904, 0xe054, 0xc0d4, 0x200a, 0x2009, 0x0105, 0x2104, 0x9084,
+	0xe7fd, 0x9085, 0x0010, 0x200a, 0x2001, 0x1867, 0x2004, 0xd0e4,
+	0x1528, 0x603b, 0x0000, 0x080c, 0x9713, 0x6014, 0x0096, 0x2048,
+	0xa87c, 0xd0fc, 0x0188, 0x908c, 0x0003, 0x918e, 0x0002, 0x0508,
+	0x2001, 0x180c, 0x2004, 0xd0d4, 0x11e0, 0x080c, 0x9891, 0x2009,
+	0x0041, 0x009e, 0x0804, 0xe114, 0x080c, 0x9891, 0x6003, 0x0007,
+	0x601b, 0x0000, 0x080c, 0x876f, 0x009e, 0x0005, 0x2001, 0x0100,
+	0x2004, 0x9082, 0x0005, 0x0aa8, 0x2001, 0x011f, 0x2004, 0x603a,
+	0x0890, 0x2001, 0x180c, 0x200c, 0xc1d4, 0x2102, 0xd1cc, 0x0110,
+	0x080c, 0x2c90, 0x080c, 0x9891, 0x6014, 0x2048, 0xa97c, 0xd1ec,
+	0x1130, 0x080c, 0x876f, 0x080c, 0xaf43, 0x009e, 0x0005, 0x080c,
+	0xe93f, 0x0db8, 0x009e, 0x0005, 0x2001, 0x180c, 0x200c, 0xc1d4,
+	0x2102, 0x0036, 0x080c, 0x9713, 0x080c, 0x9891, 0x6014, 0x0096,
+	0x2048, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x0188,
+	0xa87c, 0x9084, 0x0003, 0x9086, 0x0002, 0x0140, 0xa8ac, 0x6330,
+	0x931a, 0x6332, 0xa8b0, 0x632c, 0x931b, 0x632e, 0x6003, 0x0002,
+	0x0080, 0x2019, 0x0004, 0x080c, 0xe6dd, 0x6018, 0x9005, 0x1128,
+	0x2001, 0x1986, 0x2004, 0x8003, 0x601a, 0x6017, 0x0000, 0x6003,
+	0x0007, 0x009e, 0x003e, 0x0005, 0x9182, 0x0040, 0x0002, 0xe0a3,
+	0xe0a3, 0xe0a3, 0xe0a3, 0xe0a3, 0xe0a3, 0xe0a3, 0xe0a3, 0xe0a5,
+	0xe0a3, 0xe0a3, 0xe0a3, 0xe0a3, 0xe0a3, 0xe0a3, 0xe0a3, 0xe0a3,
+	0xe0a3, 0xe0a3, 0xe0f0, 0x080c, 0x0dd5, 0x6014, 0x0096, 0x2048,
+	0xa834, 0xaa38, 0x6110, 0x00b6, 0x2158, 0xb900, 0x00be, 0xd1bc,
+	0x1190, 0x920d, 0x1518, 0xa87c, 0xd0fc, 0x0128, 0x2009, 0x0041,
+	0x009e, 0x0804, 0xe114, 0x6003, 0x0007, 0x601b, 0x0000, 0x080c,
+	0x876f, 0x009e, 0x0005, 0x6124, 0xd1f4, 0x1d58, 0x0006, 0x0046,
+	0xacac, 0x9422, 0xa9b0, 0x2200, 0x910b, 0x6030, 0x9420, 0x6432,
+	0x602c, 0x9109, 0x612e, 0x004e, 0x000e, 0x08d8, 0x6110, 0x00b6,
+	0x2158, 0xb900, 0x00be, 0xd1bc, 0x1178, 0x2009, 0x180e, 0x210c,
+	0xd19c, 0x0118, 0x6003, 0x0007, 0x0010, 0x6003, 0x0006, 0x00e9,
+	0x080c, 0x8771, 0x009e, 0x0005, 0x6003, 0x0002, 0x009e, 0x0005,
+	0x6024, 0xd0f4, 0x0128, 0x080c, 0x15f4, 0x1904, 0xe0a5, 0x0005,
+	0x6014, 0x0096, 0x2048, 0xa834, 0xa938, 0x009e, 0x9105, 0x1120,
+	0x080c, 0x15f4, 0x1904, 0xe0a5, 0x0005, 0xd2fc, 0x0140, 0x8002,
+	0x8000, 0x8212, 0x9291, 0x0000, 0x2009, 0x0009, 0x0010, 0x2009,
+	0x0015, 0xaa9a, 0xa896, 0x0005, 0x9182, 0x0040, 0x0208, 0x0062,
+	0x9186, 0x0013, 0x0120, 0x9186, 0x0014, 0x190c, 0x0dd5, 0x6024,
+	0xd0dc, 0x090c, 0x0dd5, 0x0005, 0xe138, 0xe144, 0xe150, 0xe15c,
+	0xe138, 0xe138, 0xe138, 0xe138, 0xe13f, 0xe13a, 0xe13a, 0xe138,
+	0xe138, 0xe138, 0xe138, 0xe13a, 0xe138, 0xe13a, 0xe138, 0xe13f,
+	0x080c, 0x0dd5, 0x6024, 0xd0dc, 0x090c, 0x0dd5, 0x0005, 0x6014,
+	0x9005, 0x190c, 0x0dd5, 0x0005, 0x6003, 0x0001, 0x6106, 0x080c,
+	0x91b1, 0x0126, 0x2091, 0x8000, 0x080c, 0x9763, 0x012e, 0x0005,
+	0x6003, 0x0001, 0x6106, 0x080c, 0x91b1, 0x0126, 0x2091, 0x8000,
+	0x080c, 0x9763, 0x012e, 0x0005, 0x6003, 0x0003, 0x6106, 0x2c10,
+	0x080c, 0x1beb, 0x0126, 0x2091, 0x8000, 0x080c, 0x9216, 0x080c,
+	0x9891, 0x012e, 0x0005, 0x0126, 0x2091, 0x8000, 0x0036, 0x0096,
+	0x9182, 0x0040, 0x0023, 0x009e, 0x003e, 0x012e, 0x0005, 0xe18b,
+	0xe18d, 0xe19f, 0xe1b9, 0xe18b, 0xe18b, 0xe18b, 0xe18b, 0xe18b,
+	0xe18b, 0xe18b, 0xe18b, 0xe18b, 0xe18b, 0xe18b, 0xe18b, 0xe18b,
+	0xe18b, 0xe18b, 0xe18b, 0x080c, 0x0dd5, 0x6014, 0x2048, 0xa87c,
+	0xd0fc, 0x01f8, 0x909c, 0x0003, 0x939e, 0x0003, 0x01d0, 0x6003,
+	0x0001, 0x6106, 0x080c, 0x91b1, 0x080c, 0x9763, 0x0470, 0x6014,
+	0x2048, 0xa87c, 0xd0fc, 0x0168, 0x909c, 0x0003, 0x939e, 0x0003,
+	0x0140, 0x6003, 0x0001, 0x6106, 0x080c, 0x91b1, 0x080c, 0x9763,
+	0x00e0, 0x901e, 0x6316, 0x631a, 0x2019, 0x0004, 0x080c, 0xe6dd,
+	0x00a0, 0x6014, 0x2048, 0xa87c, 0xd0fc, 0x0d98, 0x909c, 0x0003,
+	0x939e, 0x0003, 0x0d70, 0x6003, 0x0003, 0x6106, 0x2c10, 0x080c,
+	0x1beb, 0x080c, 0x9216, 0x080c, 0x9891, 0x0005, 0x080c, 0x9657,
+	0x6114, 0x81ff, 0x0158, 0x0096, 0x2148, 0x080c, 0xea94, 0x0036,
+	0x2019, 0x0029, 0x080c, 0xe6dd, 0x003e, 0x009e, 0x080c, 0xaf74,
+	0x080c, 0x9763, 0x0005, 0x080c, 0x9713, 0x6114, 0x81ff, 0x0158,
+	0x0096, 0x2148, 0x080c, 0xea94, 0x0036, 0x2019, 0x0029, 0x080c,
+	0xe6dd, 0x003e, 0x009e, 0x080c, 0xaf74, 0x080c, 0x9891, 0x0005,
+	0x9182, 0x0085, 0x0002, 0xe20a, 0xe208, 0xe208, 0xe216, 0xe208,
+	0xe208, 0xe208, 0xe208, 0xe208, 0xe208, 0xe208, 0xe208, 0xe208,
+	0x080c, 0x0dd5, 0x6003, 0x000b, 0x6106, 0x080c, 0x91b1, 0x0126,
+	0x2091, 0x8000, 0x080c, 0x9763, 0x012e, 0x0005, 0x0026, 0x00e6,
+	0x080c, 0xe936, 0x0118, 0x080c, 0xaf43, 0x0450, 0x2071, 0x0260,
+	0x7224, 0x6216, 0x2001, 0x180e, 0x2004, 0xd0e4, 0x0150, 0x6010,
+	0x00b6, 0x2058, 0xbca0, 0x00be, 0x2c00, 0x2011, 0x014e, 0x080c,
+	0xb264, 0x7220, 0x080c, 0xe583, 0x0118, 0x6007, 0x0086, 0x0040,
+	0x6007, 0x0087, 0x7224, 0x9296, 0xffff, 0x1110, 0x6007, 0x0086,
+	0x6003, 0x0001, 0x080c, 0x91b1, 0x080c, 0x9763, 0x080c, 0x9891,
+	0x00ee, 0x002e, 0x0005, 0x9186, 0x0013, 0x1160, 0x6004, 0x908a,
+	0x0085, 0x0a0c, 0x0dd5, 0x908a, 0x0092, 0x1a0c, 0x0dd5, 0x9082,
+	0x0085, 0x00a2, 0x9186, 0x0027, 0x0130, 0x9186, 0x0014, 0x0118,
+	0x080c, 0xafd9, 0x0050, 0x2001, 0x0007, 0x080c, 0x6615, 0x080c,
+	0x9657, 0x080c, 0xaf74, 0x080c, 0x9763, 0x0005, 0xe27b, 0xe27d,
+	0xe27d, 0xe27b, 0xe27b, 0xe27b, 0xe27b, 0xe27b, 0xe27b, 0xe27b,
+	0xe27b, 0xe27b, 0xe27b, 0x080c, 0x0dd5, 0x080c, 0x9657, 0x080c,
+	0xaf74, 0x080c, 0x9763, 0x0005, 0x9182, 0x0085, 0x0a0c, 0x0dd5,
+	0x9182, 0x0092, 0x1a0c, 0x0dd5, 0x9182, 0x0085, 0x0002, 0xe29c,
+	0xe29c, 0xe29c, 0xe29e, 0xe29c, 0xe29c, 0xe29c, 0xe29c, 0xe29c,
+	0xe29c, 0xe29c, 0xe29c, 0xe29c, 0x080c, 0x0dd5, 0x0005, 0x9186,
+	0x0013, 0x0148, 0x9186, 0x0014, 0x0130, 0x9186, 0x0027, 0x0118,
+	0x080c, 0xafd9, 0x0030, 0x080c, 0x9657, 0x080c, 0xaf74, 0x080c,
+	0x9763, 0x0005, 0x0036, 0x080c, 0xe997, 0x6043, 0x0000, 0x2019,
+	0x000b, 0x0031, 0x6023, 0x0006, 0x6003, 0x0007, 0x003e, 0x0005,
+	0x0126, 0x0036, 0x2091, 0x8000, 0x0086, 0x2c40, 0x0096, 0x904e,
+	0x080c, 0xa76b, 0x009e, 0x008e, 0x1550, 0x0076, 0x2c38, 0x080c,
+	0xa816, 0x007e, 0x1520, 0x6000, 0x9086, 0x0000, 0x0500, 0x6020,
+	0x9086, 0x0007, 0x01e0, 0x0096, 0x601c, 0xd084, 0x0140, 0x080c,
+	0xe997, 0x080c, 0xd3a0, 0x080c, 0x1aa1, 0x6023, 0x0007, 0x6014,
+	0x2048, 0x080c, 0xcc86, 0x0110, 0x080c, 0xe6dd, 0x009e, 0x6017,
+	0x0000, 0x080c, 0xe997, 0x6023, 0x0007, 0x080c, 0xd3a0, 0x003e,
+	0x012e, 0x0005, 0x00f6, 0x00c6, 0x00b6, 0x0036, 0x0156, 0x2079,
+	0x0260, 0x7938, 0x783c, 0x080c, 0x287c, 0x15c8, 0x0016, 0x00c6,
+	0x080c, 0x6699, 0x1590, 0x001e, 0x00c6, 0x2160, 0x080c, 0xd39d,
+	0x00ce, 0x002e, 0x0026, 0x0016, 0x2019, 0x0029, 0x080c, 0xa8dc,
+	0x080c, 0x9356, 0x0076, 0x903e, 0x080c, 0x9229, 0x007e, 0x001e,
+	0x0076, 0x903e, 0x080c, 0xe477, 0x007e, 0x0026, 0xba04, 0x9294,
+	0xff00, 0x8217, 0x9286, 0x0006, 0x0118, 0x9286, 0x0004, 0x1118,
+	0xbaa0, 0x080c, 0x32dc, 0x002e, 0xbcc0, 0x001e, 0x080c, 0x60c7,
+	0xbe12, 0xbd16, 0xbcc2, 0x9006, 0x0010, 0x00ce, 0x001e, 0x015e,
+	0x003e, 0x00be, 0x00ce, 0x00fe, 0x0005, 0x00c6, 0x00d6, 0x00b6,
+	0x0016, 0x2009, 0x1824, 0x2104, 0x9086, 0x0074, 0x1904, 0xe39e,
+	0x2069, 0x0260, 0x6944, 0x9182, 0x0100, 0x06e0, 0x6940, 0x9184,
+	0x8000, 0x0904, 0xe39b, 0x2001, 0x197b, 0x2004, 0x9005, 0x1140,
+	0x6010, 0x2058, 0xb8c0, 0x9005, 0x0118, 0x9184, 0x0800, 0x0598,
+	0x6948, 0x918a, 0x0001, 0x0648, 0x080c, 0xeafc, 0x0118, 0x6978,
+	0xd1fc, 0x11b8, 0x2009, 0x0205, 0x200b, 0x0001, 0x693c, 0x81ff,
+	0x1198, 0x6944, 0x9182, 0x0100, 0x02a8, 0x6940, 0x81ff, 0x1178,
+	0x6948, 0x918a, 0x0001, 0x0288, 0x6950, 0x918a, 0x0001, 0x0298,
+	0x00d0, 0x6017, 0x0100, 0x00a0, 0x6017, 0x0300, 0x0088, 0x6017,
+	0x0500, 0x0070, 0x6017, 0x0700, 0x0058, 0x6017, 0x0900, 0x0040,
+	0x6017, 0x0b00, 0x0028, 0x6017, 0x0f00, 0x0010, 0x6017, 0x2d00,
+	0x9085, 0x0001, 0x0008, 0x9006, 0x001e, 0x00be, 0x00de, 0x00ce,
+	0x0005, 0x00c6, 0x00b6, 0x0026, 0x0036, 0x0156, 0x6210, 0x2258,
+	0xbb04, 0x9394, 0x00ff, 0x9286, 0x0006, 0x0180, 0x9286, 0x0004,
+	0x0168, 0x9394, 0xff00, 0x8217, 0x9286, 0x0006, 0x0138, 0x9286,
+	0x0004, 0x0120, 0x080c, 0x66a8, 0x0804, 0xe406, 0x2011, 0x0276,
+	0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019, 0x000a, 0x080c, 0xbf11,
+	0x009e, 0x15a8, 0x2011, 0x027a, 0x20a9, 0x0004, 0x0096, 0x2b48,
+	0x2019, 0x0006, 0x080c, 0xbf11, 0x009e, 0x1548, 0x0046, 0x0016,
+	0xbaa0, 0x2220, 0x9006, 0x2009, 0x1848, 0x210c, 0xd1a4, 0x0138,
+	0x2009, 0x0029, 0x080c, 0xe73a, 0xb800, 0xc0e5, 0xb802, 0x2019,
+	0x0029, 0x080c, 0x9356, 0x0076, 0x2039, 0x0000, 0x080c, 0x9229,
+	0x2c08, 0x080c, 0xe477, 0x007e, 0x2001, 0x0007, 0x080c, 0x6615,
+	0x2001, 0x0007, 0x080c, 0x65e9, 0x001e, 0x004e, 0x9006, 0x015e,
+	0x003e, 0x002e, 0x00be, 0x00ce, 0x0005, 0x00d6, 0x2069, 0x026e,
+	0x6800, 0x9086, 0x0800, 0x0118, 0x6017, 0x0000, 0x0008, 0x9006,
+	0x00de, 0x0005, 0x00b6, 0x00f6, 0x0016, 0x0026, 0x0036, 0x0156,
+	0x2079, 0x026c, 0x7930, 0x7834, 0x080c, 0x287c, 0x11d0, 0x080c,
+	0x6699, 0x11b8, 0x2011, 0x0270, 0x20a9, 0x0004, 0x0096, 0x2b48,
+	0x2019, 0x000a, 0x080c, 0xbf11, 0x009e, 0x1158, 0x2011, 0x0274,
+	0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019, 0x0006, 0x080c, 0xbf11,
+	0x009e, 0x015e, 0x003e, 0x002e, 0x001e, 0x00fe, 0x00be, 0x0005,
+	0x00b6, 0x0006, 0x0016, 0x0026, 0x0036, 0x0156, 0x2011, 0x0263,
+	0x2204, 0x8211, 0x220c, 0x080c, 0x287c, 0x11d0, 0x080c, 0x6699,
+	0x11b8, 0x2011, 0x0276, 0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019,
+	0x000a, 0x080c, 0xbf11, 0x009e, 0x1158, 0x2011, 0x027a, 0x20a9,
+	0x0004, 0x0096, 0x2b48, 0x2019, 0x0006, 0x080c, 0xbf11, 0x009e,
+	0x015e, 0x003e, 0x002e, 0x001e, 0x000e, 0x00be, 0x0005, 0x00e6,
+	0x00c6, 0x0086, 0x0076, 0x0066, 0x0056, 0x0046, 0x0026, 0x0126,
+	0x2091, 0x8000, 0x2740, 0x2029, 0x19ef, 0x252c, 0x2021, 0x19f5,
+	0x2424, 0x2061, 0x1cd0, 0x2071, 0x1800, 0x7654, 0x7074, 0x81ff,
+	0x0150, 0x0006, 0x9186, 0x1ab2, 0x000e, 0x0128, 0x8001, 0x9602,
+	0x1a04, 0xe514, 0x0018, 0x9606, 0x0904, 0xe514, 0x080c, 0x8a3d,
+	0x0904, 0xe50b, 0x2100, 0x9c06, 0x0904, 0xe50b, 0x080c, 0xe77b,
+	0x1904, 0xe50b, 0x080c, 0xeb19, 0x0904, 0xe50b, 0x080c, 0xe76b,
+	0x0904, 0xe50b, 0x6720, 0x9786, 0x0001, 0x1148, 0x080c, 0x3373,
+	0x0904, 0xe553, 0x6004, 0x9086, 0x0000, 0x1904, 0xe553, 0x9786,
+	0x0004, 0x0904, 0xe553, 0x9786, 0x0007, 0x0904, 0xe50b, 0x2500,
+	0x9c06, 0x0904, 0xe50b, 0x2400, 0x9c06, 0x05e8, 0x88ff, 0x0118,
+	0x6054, 0x9906, 0x15c0, 0x0096, 0x6000, 0x9086, 0x0004, 0x1120,
+	0x0016, 0x080c, 0x1aa1, 0x001e, 0x9786, 0x000a, 0x0148, 0x080c,
+	0xce8e, 0x1130, 0x080c, 0xb905, 0x009e, 0x080c, 0xaf74, 0x0418,
+	0x6014, 0x2048, 0x080c, 0xcc86, 0x01d8, 0x9786, 0x0003, 0x1570,
+	0xa867, 0x0103, 0xa87c, 0xd0cc, 0x0130, 0x0096, 0xa878, 0x2048,
+	0x080c, 0x0fb1, 0x009e, 0xab7a, 0xa877, 0x0000, 0x080c, 0xea94,
+	0x0016, 0x080c, 0xcf7c, 0x080c, 0x6d0b, 0x001e, 0x080c, 0xce71,
+	0x009e, 0x080c, 0xaf74, 0x9ce0, 0x0018, 0x2001, 0x181a, 0x2004,
+	0x9c02, 0x1210, 0x0804, 0xe48b, 0x012e, 0x002e, 0x004e, 0x005e,
+	0x006e, 0x007e, 0x008e, 0x00ce, 0x00ee, 0x0005, 0x9786, 0x0006,
+	0x1150, 0x9386, 0x0005, 0x0128, 0x080c, 0xea94, 0x080c, 0xe6dd,
+	0x08f8, 0x009e, 0x0c00, 0x9786, 0x0009, 0x11f8, 0x6000, 0x9086,
+	0x0004, 0x01c0, 0x6000, 0x9086, 0x0003, 0x11a0, 0x080c, 0x9713,
+	0x0096, 0x6114, 0x2148, 0x080c, 0xcc86, 0x0118, 0x6010, 0x080c,
+	0x6d17, 0x009e, 0x00c6, 0x080c, 0xaf43, 0x00ce, 0x0036, 0x080c,
+	0x9891, 0x003e, 0x009e, 0x0804, 0xe50b, 0x9786, 0x000a, 0x0904,
+	0xe4fb, 0x0804, 0xe4f0, 0x81ff, 0x0904, 0xe50b, 0x9180, 0x0001,
+	0x2004, 0x9086, 0x0018, 0x0138, 0x9180, 0x0001, 0x2004, 0x9086,
+	0x002d, 0x1904, 0xe50b, 0x6000, 0x9086, 0x0002, 0x1904, 0xe50b,
+	0x080c, 0xce7d, 0x0138, 0x080c, 0xce8e, 0x1904, 0xe50b, 0x080c,
+	0xb905, 0x0038, 0x080c, 0x3247, 0x080c, 0xce8e, 0x1110, 0x080c,
+	0xb905, 0x080c, 0xaf74, 0x0804, 0xe50b, 0xa864, 0x9084, 0x00ff,
+	0x9086, 0x0039, 0x0005, 0x00c6, 0x00e6, 0x0016, 0x2c08, 0x2170,
+	0x9006, 0x080c, 0xe704, 0x001e, 0x0120, 0x6020, 0x9084, 0x000f,
+	0x001b, 0x00ee, 0x00ce, 0x0005, 0xe5a2, 0xe5a2, 0xe5a2, 0xe5a2,
+	0xe5a2, 0xe5a2, 0xe5a4, 0xe5a2, 0xe5a2, 0xe5a2, 0xe5a2, 0xaf74,
+	0xaf74, 0xe5a2, 0x9006, 0x0005, 0x0036, 0x0046, 0x0016, 0x7010,
+	0x00b6, 0x2058, 0xbca0, 0x00be, 0x2c00, 0x2009, 0x0020, 0x080c,
+	0xe73a, 0x001e, 0x004e, 0x2019, 0x0002, 0x080c, 0xe2c0, 0x003e,
+	0x9085, 0x0001, 0x0005, 0x0096, 0x080c, 0xcc86, 0x0140, 0x6014,
+	0x904d, 0x080c, 0xc8a5, 0x687b, 0x0005, 0x080c, 0x6d17, 0x009e,
+	0x080c, 0xaf74, 0x9085, 0x0001, 0x0005, 0x2001, 0x0001, 0x080c,
+	0x65d5, 0x0156, 0x0016, 0x0026, 0x0036, 0x20a9, 0x0004, 0x2019,
+	0x1805, 0x2011, 0x0276, 0x080c, 0xbefd, 0x003e, 0x002e, 0x001e,
+	0x015e, 0x9005, 0x0005, 0x00f6, 0x00e6, 0x00c6, 0x0086, 0x0076,
+	0x0066, 0x00b6, 0x0126, 0x2091, 0x8000, 0x2740, 0x2061, 0x1cd0,
+	0x2079, 0x0001, 0x8fff, 0x0904, 0xe63d, 0x2071, 0x1800, 0x7654,
+	0x7074, 0x8001, 0x9602, 0x1a04, 0xe63d, 0x88ff, 0x0120, 0x2800,
+	0x9c06, 0x1590, 0x2078, 0x080c, 0xe76b, 0x0570, 0x2400, 0x9c06,
+	0x0558, 0x6720, 0x9786, 0x0006, 0x1538, 0x9786, 0x0007, 0x0520,
+	0x88ff, 0x1140, 0x6010, 0x9b06, 0x11f8, 0x85ff, 0x0118, 0x6054,
+	0x9106, 0x11d0, 0x0096, 0x601c, 0xd084, 0x0140, 0x080c, 0xe997,
+	0x080c, 0xd3a0, 0x080c, 0x1aa1, 0x6023, 0x0007, 0x6014, 0x2048,
+	0x080c, 0xcc86, 0x0120, 0x0046, 0x080c, 0xe6dd, 0x004e, 0x009e,
+	0x080c, 0xaf74, 0x88ff, 0x1198, 0x9ce0, 0x0018, 0x2001, 0x181a,
+	0x2004, 0x9c02, 0x1210, 0x0804, 0xe5f2, 0x9006, 0x012e, 0x00be,
+	0x006e, 0x007e, 0x008e, 0x00ce, 0x00ee, 0x00fe, 0x0005, 0x98c5,
+	0x0001, 0x0ca0, 0x00b6, 0x0076, 0x0056, 0x0086, 0x9046, 0x2029,
+	0x0001, 0x2c20, 0x2019, 0x0002, 0x6210, 0x2258, 0x0096, 0x904e,
+	0x080c, 0xa76b, 0x009e, 0x008e, 0x903e, 0x080c, 0xa816, 0x080c,
+	0xe5e3, 0x005e, 0x007e, 0x00be, 0x0005, 0x00b6, 0x0046, 0x0056,
+	0x0076, 0x00c6, 0x0156, 0x2c20, 0x2128, 0x20a9, 0x007f, 0x900e,
+	0x0016, 0x0036, 0x080c, 0x6699, 0x1190, 0x0056, 0x0086, 0x9046,
+	0x2508, 0x2029, 0x0001, 0x0096, 0x904e, 0x080c, 0xa76b, 0x009e,
+	0x008e, 0x903e, 0x080c, 0xa816, 0x080c, 0xe5e3, 0x005e, 0x003e,
+	0x001e, 0x8108, 0x1f04, 0xe670, 0x015e, 0x00ce, 0x007e, 0x005e,
+	0x004e, 0x00be, 0x0005, 0x00b6, 0x0076, 0x0056, 0x6210, 0x2258,
+	0x0086, 0x9046, 0x2029, 0x0001, 0x2019, 0x0048, 0x0096, 0x904e,
+	0x080c, 0xa76b, 0x009e, 0x008e, 0x903e, 0x080c, 0xa816, 0x2c20,
+	0x080c, 0xe5e3, 0x005e, 0x007e, 0x00be, 0x0005, 0x00b6, 0x0046,
+	0x0056, 0x0076, 0x00c6, 0x0156, 0x2c20, 0x20a9, 0x0800, 0x900e,
+	0x0016, 0x0036, 0x080c, 0x6699, 0x11a0, 0x0086, 0x9046, 0x2828,
+	0x0046, 0x2021, 0x0001, 0x080c, 0xe97b, 0x004e, 0x0096, 0x904e,
+	0x080c, 0xa76b, 0x009e, 0x008e, 0x903e, 0x080c, 0xa816, 0x080c,
+	0xe5e3, 0x003e, 0x001e, 0x8108, 0x1f04, 0xe6b8, 0x015e, 0x00ce,
+	0x007e, 0x005e, 0x004e, 0x00be, 0x0005, 0x0016, 0x00f6, 0x080c,
+	0xcc84, 0x0198, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0046, 0x0180,
+	0xa800, 0x907d, 0x0138, 0xa803, 0x0000, 0xab82, 0x080c, 0x6d17,
+	0x2f48, 0x0cb0, 0xab82, 0x080c, 0x6d17, 0x00fe, 0x001e, 0x0005,
+	0xa800, 0x907d, 0x0130, 0xa803, 0x0000, 0x080c, 0x6d17, 0x2f48,
+	0x0cb8, 0x080c, 0x6d17, 0x0c88, 0x00e6, 0x0046, 0x0036, 0x2061,
+	0x1cd0, 0x9005, 0x1138, 0x2071, 0x1800, 0x7454, 0x7074, 0x8001,
+	0x9402, 0x12f8, 0x2100, 0x9c06, 0x0188, 0x6000, 0x9086, 0x0000,
+	0x0168, 0x6008, 0x9206, 0x1150, 0x6320, 0x9386, 0x0009, 0x01b0,
+	0x6010, 0x91a0, 0x0004, 0x2424, 0x9406, 0x0140, 0x9ce0, 0x0018,
+	0x2001, 0x181a, 0x2004, 0x9c02, 0x1220, 0x0c20, 0x9085, 0x0001,
+	0x0008, 0x9006, 0x003e, 0x004e, 0x00ee, 0x0005, 0x631c, 0xd3c4,
+	0x1d68, 0x0c30, 0x0096, 0x0006, 0x080c, 0x0fff, 0x000e, 0x090c,
+	0x0dd5, 0xaae2, 0xa867, 0x010d, 0xa88e, 0x0026, 0x2010, 0x080c,
+	0xcc74, 0x2001, 0x0000, 0x0120, 0x2200, 0x9080, 0x0015, 0x2004,
+	0x002e, 0xa87a, 0x9186, 0x0020, 0x0110, 0xa8e3, 0xffff, 0xa986,
+	0xac76, 0xa87f, 0x0000, 0x2001, 0x198d, 0x2004, 0xa882, 0x9006,
+	0xa802, 0xa86a, 0xa88a, 0x0126, 0x2091, 0x8000, 0x080c, 0x6d17,
+	0x012e, 0x009e, 0x0005, 0x6700, 0x9786, 0x0000, 0x0158, 0x9786,
+	0x0001, 0x0140, 0x9786, 0x000a, 0x0128, 0x9786, 0x0009, 0x0110,
+	0x9085, 0x0001, 0x0005, 0x00e6, 0x6010, 0x9075, 0x0138, 0x00b6,
+	0x2058, 0xb8a0, 0x00be, 0x9206, 0x00ee, 0x0005, 0x9085, 0x0001,
+	0x0cd8, 0x0016, 0x6004, 0x908e, 0x001e, 0x11a0, 0x8007, 0x6134,
+	0x918c, 0x00ff, 0x9105, 0x6036, 0x6007, 0x0085, 0x6003, 0x000b,
+	0x6023, 0x0005, 0x2001, 0x1986, 0x2004, 0x601a, 0x080c, 0x91b1,
+	0x080c, 0x9763, 0x001e, 0x0005, 0xa001, 0xa001, 0x0005, 0x6024,
+	0xd0e4, 0x0158, 0xd0cc, 0x0118, 0x080c, 0xcfc0, 0x0030, 0x080c,
+	0xe997, 0x080c, 0x876f, 0x080c, 0xaf43, 0x0005, 0x9280, 0x0008,
+	0x2004, 0x9084, 0x000f, 0x0002, 0xe7ca, 0xe7ca, 0xe7ca, 0xe7cc,
+	0xe7ca, 0xe7cc, 0xe7cc, 0xe7ca, 0xe7cc, 0xe7ca, 0xe7ca, 0xe7ca,
+	0xe7ca, 0xe7ca, 0x9006, 0x0005, 0x9085, 0x0001, 0x0005, 0x9280,
+	0x0008, 0x2004, 0x9084, 0x000f, 0x0002, 0xe7e3, 0xe7e3, 0xe7e3,
+	0xe7e3, 0xe7e3, 0xe7e3, 0xe7f0, 0xe7e3, 0xe7e3, 0xe7e3, 0xe7e3,
+	0xe7e3, 0xe7e3, 0xe7e3, 0x6007, 0x003b, 0x602f, 0x0009, 0x6017,
+	0x2a00, 0x6003, 0x0001, 0x080c, 0x91b1, 0x080c, 0x9763, 0x0005,
+	0x0096, 0x00c6, 0x2260, 0x080c, 0xe997, 0x6043, 0x0000, 0x6024,
+	0xc0f4, 0xc0e4, 0x6026, 0x603b, 0x0000, 0x00ce, 0x00d6, 0x2268,
+	0x9186, 0x0007, 0x1904, 0xe849, 0x6814, 0x9005, 0x0138, 0x2048,
+	0xa87c, 0xd0fc, 0x1118, 0x00de, 0x009e, 0x08a8, 0x6007, 0x003a,
+	0x6003, 0x0001, 0x080c, 0x91b1, 0x080c, 0x9763, 0x00c6, 0x2d60,
+	0x6100, 0x9186, 0x0002, 0x1904, 0xe8c0, 0x6014, 0x9005, 0x1138,
+	0x6000, 0x9086, 0x0007, 0x190c, 0x0dd5, 0x0804, 0xe8c0, 0x2048,
+	0x080c, 0xcc86, 0x1130, 0x0028, 0x2048, 0xa800, 0x9005, 0x1de0,
+	0x2900, 0x2048, 0xa87c, 0x9084, 0x0003, 0x9086, 0x0002, 0x1168,
+	0xa87c, 0xc0dc, 0xc0f4, 0xa87e, 0xa880, 0xc0fc, 0xa882, 0x2009,
+	0x0043, 0x080c, 0xe114, 0x0804, 0xe8c0, 0x2009, 0x0041, 0x0804,
+	0xe8ba, 0x9186, 0x0005, 0x15a0, 0x6814, 0x2048, 0xa87c, 0xd0bc,
+	0x1120, 0x00de, 0x009e, 0x0804, 0xe7e3, 0xd0b4, 0x0128, 0xd0fc,
+	0x090c, 0x0dd5, 0x0804, 0xe804, 0x6007, 0x003a, 0x6003, 0x0001,
+	0x080c, 0x91b1, 0x080c, 0x9763, 0x00c6, 0x2d60, 0x6100, 0x9186,
+	0x0002, 0x0120, 0x9186, 0x0004, 0x1904, 0xe8c0, 0x6814, 0x2048,
+	0xa97c, 0xc1f4, 0xc1dc, 0xa97e, 0xa980, 0xc1fc, 0xc1bc, 0xa982,
+	0x00f6, 0x2c78, 0x080c, 0x1754, 0x00fe, 0x2009, 0x0042, 0x04d0,
+	0x0036, 0x080c, 0x0fff, 0x090c, 0x0dd5, 0xa867, 0x010d, 0x9006,
+	0xa802, 0xa86a, 0xa88a, 0x2d18, 0xab8e, 0xa887, 0x0045, 0x2c00,
+	0xa892, 0x6038, 0xa8a2, 0x2360, 0x6024, 0xc0dd, 0x6026, 0x6010,
+	0x00b6, 0x2058, 0xb8a0, 0x00be, 0x2004, 0x6354, 0xab7a, 0xa876,
+	0x9006, 0xa87e, 0xa882, 0xad9a, 0xae96, 0xa89f, 0x0001, 0x080c,
+	0x6d17, 0x2019, 0x0045, 0x6008, 0x2068, 0x080c, 0xe2c0, 0x2d00,
+	0x600a, 0x6023, 0x0006, 0x6003, 0x0007, 0x901e, 0x631a, 0x6342,
+	0x003e, 0x0038, 0x6043, 0x0000, 0x6003, 0x0007, 0x080c, 0xe114,
+	0x00ce, 0x00de, 0x009e, 0x0005, 0x9186, 0x0013, 0x1128, 0x6004,
+	0x9082, 0x0085, 0x2008, 0x00c2, 0x9186, 0x0027, 0x1178, 0x080c,
+	0x9657, 0x0036, 0x0096, 0x6014, 0x2048, 0x2019, 0x0004, 0x080c,
+	0xe6dd, 0x009e, 0x003e, 0x080c, 0x9763, 0x0005, 0x9186, 0x0014,
+	0x0d70, 0x080c, 0xafd9, 0x0005, 0xe8f3, 0xe8f1, 0xe8f1, 0xe8f1,
+	0xe8f1, 0xe8f1, 0xe8f3, 0xe8f1, 0xe8f1, 0xe8f1, 0xe8f1, 0xe8f1,
+	0xe8f1, 0x080c, 0x0dd5, 0x080c, 0x9657, 0x6003, 0x000c, 0x080c,
+	0x9763, 0x0005, 0x9182, 0x0092, 0x1220, 0x9182, 0x0085, 0x0208,
+	0x001a, 0x080c, 0xafd9, 0x0005, 0xe911, 0xe911, 0xe911, 0xe911,
+	0xe913, 0xe933, 0xe911, 0xe911, 0xe911, 0xe911, 0xe911, 0xe911,
+	0xe911, 0x080c, 0x0dd5, 0x00d6, 0x2c68, 0x080c, 0xaeed, 0x01b0,
+	0x6003, 0x0001, 0x6007, 0x001e, 0x2009, 0x026e, 0x210c, 0x613a,
+	0x2009, 0x026f, 0x210c, 0x613e, 0x600b, 0xffff, 0x6910, 0x6112,
+	0x6023, 0x0004, 0x080c, 0x91b1, 0x080c, 0x9763, 0x2d60, 0x080c,
+	0xaf43, 0x00de, 0x0005, 0x080c, 0xaf43, 0x0005, 0x00e6, 0x6010,
+	0x00b6, 0x2058, 0xb800, 0x00be, 0xd0ec, 0x00ee, 0x0005, 0x2009,
+	0x1867, 0x210c, 0xd1ec, 0x05b0, 0x6003, 0x0002, 0x6024, 0xc0e5,
+	0x6026, 0xd0cc, 0x0150, 0x2001, 0x1987, 0x2004, 0x6042, 0x2009,
+	0x1867, 0x210c, 0xd1f4, 0x1520, 0x00a0, 0x2009, 0x1867, 0x210c,
+	0xd1f4, 0x0128, 0x6024, 0xc0e4, 0x6026, 0x9006, 0x00d8, 0x2001,
+	0x1987, 0x200c, 0x2001, 0x1985, 0x2004, 0x9100, 0x9080, 0x000a,
+	0x6042, 0x6010, 0x00b6, 0x2058, 0xb8bc, 0x00be, 0x0008, 0x2104,
+	0x9005, 0x0118, 0x9088, 0x0003, 0x0cd0, 0x2c0a, 0x600f, 0x0000,
+	0x9085, 0x0001, 0x0005, 0x0016, 0x00c6, 0x00e6, 0x6154, 0xb8bc,
+	0x2060, 0x8cff, 0x0180, 0x84ff, 0x1118, 0x6054, 0x9106, 0x1138,
+	0x600c, 0x2072, 0x080c, 0x876f, 0x080c, 0xaf43, 0x0010, 0x9cf0,
+	0x0003, 0x2e64, 0x0c70, 0x00ee, 0x00ce, 0x001e, 0x0005, 0x00d6,
+	0x00b6, 0x6010, 0x2058, 0xb8bc, 0x2068, 0x9005, 0x0130, 0x9c06,
+	0x0110, 0x680c, 0x0cd0, 0x600c, 0x680e, 0x00be, 0x00de, 0x0005,
+	0x0026, 0x0036, 0x0156, 0x2011, 0x182c, 0x2204, 0x9084, 0x00ff,
+	0x2019, 0x026e, 0x2334, 0x9636, 0x1508, 0x8318, 0x2334, 0x2204,
+	0x9084, 0xff00, 0x9636, 0x11d0, 0x2011, 0x0270, 0x20a9, 0x0004,
+	0x6010, 0x0096, 0x2048, 0x2019, 0x000a, 0x080c, 0xbf11, 0x009e,
+	0x1168, 0x2011, 0x0274, 0x20a9, 0x0004, 0x6010, 0x0096, 0x2048,
+	0x2019, 0x0006, 0x080c, 0xbf11, 0x009e, 0x1100, 0x015e, 0x003e,
+	0x002e, 0x0005, 0x00e6, 0x2071, 0x1800, 0x080c, 0x6040, 0x080c,
+	0x2ff5, 0x00ee, 0x0005, 0x0096, 0x0026, 0x080c, 0x0fff, 0x090c,
+	0x0dd5, 0xa85c, 0x9080, 0x001a, 0x20a0, 0x20a9, 0x000c, 0xa860,
+	0x20e8, 0x9006, 0x4004, 0x9186, 0x0046, 0x1118, 0xa867, 0x0136,
+	0x0038, 0xa867, 0x0138, 0x9186, 0x0041, 0x0110, 0xa87b, 0x0001,
+	0x7038, 0x9084, 0xff00, 0x7240, 0x9294, 0xff00, 0x8007, 0x9215,
+	0xaa9a, 0x9186, 0x0046, 0x1168, 0x7038, 0x9084, 0x00ff, 0x723c,
+	0x9294, 0xff00, 0x9215, 0xaa9e, 0x723c, 0x9294, 0x00ff, 0xaaa2,
+	0x0060, 0x7040, 0x9084, 0x00ff, 0x7244, 0x9294, 0xff00, 0x9215,
+	0xaa9e, 0x7244, 0x9294, 0x00ff, 0xaaa2, 0x9186, 0x0046, 0x1118,
+	0x9e90, 0x0012, 0x0010, 0x9e90, 0x001a, 0x2204, 0x8007, 0xa8a6,
+	0x8210, 0x2204, 0x8007, 0xa8aa, 0x8210, 0x2204, 0x8007, 0xa8ae,
+	0x8210, 0x2204, 0x8007, 0xa8b2, 0x8210, 0x9186, 0x0046, 0x11b8,
+	0x9e90, 0x0016, 0x2204, 0x8007, 0xa8b6, 0x8210, 0x2204, 0x8007,
+	0xa8ba, 0x8210, 0x2204, 0x8007, 0xa8be, 0x8210, 0x2204, 0x8007,
+	0xa8c2, 0x8210, 0x2011, 0x0205, 0x2013, 0x0001, 0x00b0, 0x9e90,
+	0x001e, 0x2204, 0x8007, 0xa8b6, 0x8210, 0x2204, 0x8007, 0xa8ba,
+	0x2011, 0x0205, 0x2013, 0x0001, 0x2011, 0x0260, 0x2204, 0x8007,
+	0xa8be, 0x8210, 0x2204, 0x8007, 0xa8c2, 0x9186, 0x0046, 0x1118,
+	0x2011, 0x0262, 0x0010, 0x2011, 0x026a, 0x0146, 0x01d6, 0x0036,
+	0x20a9, 0x0001, 0x2019, 0x0008, 0xa860, 0x20e8, 0xa85c, 0x9080,
+	0x0031, 0x20a0, 0x2204, 0x8007, 0x4004, 0x8210, 0x8319, 0x1dd0,
+	0x003e, 0x01ce, 0x013e, 0x2011, 0x0205, 0x2013, 0x0000, 0x002e,
+	0x080c, 0x6d17, 0x009e, 0x0005, 0x00e6, 0x6010, 0x00b6, 0x2058,
+	0xb800, 0x00be, 0xd0fc, 0x0108, 0x0011, 0x00ee, 0x0005, 0xa880,
+	0xc0e5, 0xa882, 0x0005, 0x00e6, 0x00d6, 0x00c6, 0x0076, 0x0066,
+	0x0056, 0x0046, 0x0026, 0x0016, 0x0126, 0x2091, 0x8000, 0x2029,
+	0x19ef, 0x252c, 0x2021, 0x19f5, 0x2424, 0x2061, 0x1cd0, 0x2071,
+	0x1800, 0x7654, 0x7074, 0x9606, 0x0578, 0x6720, 0x9786, 0x0001,
+	0x0118, 0x9786, 0x0008, 0x1500, 0x2500, 0x9c06, 0x01e8, 0x2400,
+	0x9c06, 0x01d0, 0x080c, 0xe76b, 0x01b8, 0x080c, 0xe77b, 0x11a0,
+	0x6000, 0x9086, 0x0004, 0x1120, 0x0016, 0x080c, 0x1aa1, 0x001e,
+	0x080c, 0xce7d, 0x1110, 0x080c, 0x3247, 0x080c, 0xce8e, 0x1110,
+	0x080c, 0xb905, 0x080c, 0xaf74, 0x9ce0, 0x0018, 0x2001, 0x181a,
+	0x2004, 0x9c02, 0x1208, 0x0858, 0x012e, 0x001e, 0x002e, 0x004e,
+	0x005e, 0x006e, 0x007e, 0x00ce, 0x00de, 0x00ee, 0x0005, 0x2001,
+	0x1810, 0x2004, 0xd0dc, 0x0005, 0x0006, 0x2001, 0x1837, 0x2004,
+	0xd09c, 0x000e, 0x0005, 0x0006, 0x0036, 0x0046, 0x080c, 0xd388,
+	0x0168, 0x2019, 0xffff, 0x9005, 0x0128, 0x6010, 0x00b6, 0x2058,
+	0xbba0, 0x00be, 0x2021, 0x0004, 0x080c, 0x4d36, 0x004e, 0x003e,
+	0x000e, 0x6004, 0x9086, 0x0001, 0x1128, 0x080c, 0xa8dc, 0x080c,
+	0xaf74, 0x9006, 0x0005, 0x00e6, 0x00c6, 0x00b6, 0x0046, 0x2061,
+	0x1cd0, 0x2071, 0x1800, 0x7454, 0x7074, 0x8001, 0x9402, 0x12d8,
+	0x2100, 0x9c06, 0x0168, 0x6000, 0x9086, 0x0000, 0x0148, 0x6010,
+	0x2058, 0xb8a0, 0x9206, 0x1120, 0x6004, 0x9086, 0x0002, 0x0140,
+	0x9ce0, 0x0018, 0x2001, 0x181a, 0x2004, 0x9c02, 0x1220, 0x0c40,
+	0x9085, 0x0001, 0x0008, 0x9006, 0x004e, 0x00be, 0x00ce, 0x00ee,
+	0x0005, 0x0126, 0x0006, 0x00e6, 0x0016, 0x2091, 0x8000, 0x2071,
+	0x1840, 0xd5a4, 0x0118, 0x7004, 0x8000, 0x7006, 0xd5b4, 0x0118,
+	0x7000, 0x8000, 0x7002, 0xd5ac, 0x0178, 0x2500, 0x9084, 0x0007,
+	0x908e, 0x0003, 0x0148, 0x908e, 0x0004, 0x0130, 0x908e, 0x0005,
+	0x0118, 0x2071, 0xfff6, 0x0089, 0x001e, 0x00ee, 0x000e, 0x012e,
+	0x0005, 0x0126, 0x0006, 0x00e6, 0x2091, 0x8000, 0x2071, 0xffee,
+	0x0021, 0x00ee, 0x000e, 0x012e, 0x0005, 0x2e05, 0x8000, 0x2077,
+	0x1220, 0x8e70, 0x2e05, 0x8000, 0x2077, 0x0005, 0x00e6, 0x2071,
+	0xffec, 0x0c99, 0x00ee, 0x0005, 0x00e6, 0x2071, 0xfff0, 0x0c69,
+	0x00ee, 0x0005, 0x0126, 0x0006, 0x00e6, 0x2091, 0x8000, 0x2071,
+	0x1840, 0x7014, 0x8000, 0x7016, 0x00ee, 0x000e, 0x012e, 0x0005,
+	0x0003, 0x000b, 0x079e, 0x0000, 0xc000, 0x0001, 0x8064, 0x0008,
+	0x0010, 0x0000, 0x8066, 0x0000, 0x0101, 0x0008, 0x4407, 0x0003,
+	0x8060, 0x0000, 0x0400, 0x0000, 0x580d, 0x000b, 0x79a8, 0x000b,
+	0x50ee, 0x000b, 0x4c0a, 0x0003, 0xbac0, 0x0009, 0x008a, 0x0000,
+	0x0c0a, 0x000b, 0x15fe, 0x0008, 0x340a, 0x0003, 0xc4c0, 0x0009,
+	0x7000, 0x0000, 0xffa0, 0x0001, 0x2000, 0x0000, 0x1668, 0x000b,
+	0x808c, 0x0008, 0x0001, 0x0000, 0x0000, 0x0007, 0x4028, 0x0000,
+	0x4047, 0x000a, 0x808c, 0x0008, 0x0002, 0x0000, 0x0822, 0x0003,
+	0x4022, 0x0000, 0x0028, 0x000b, 0x4122, 0x0008, 0x94c0, 0x0009,
+	0xff00, 0x0008, 0xffe0, 0x0009, 0x0500, 0x0008, 0x0a93, 0x000b,
+	0x4447, 0x0002, 0x0e90, 0x0003, 0x0bfe, 0x0008, 0x11a0, 0x0001,
+	0x126e, 0x0003, 0x0ca0, 0x0001, 0x126e, 0x0003, 0x9180, 0x0001,
+	0x0004, 0x0000, 0x8060, 0x0000, 0x0400, 0x0000, 0x7f62, 0x0008,
+	0x8066, 0x0000, 0x0009, 0x0008, 0x4436, 0x000b, 0x808c, 0x0008,
+	0x0000, 0x0008, 0x0060, 0x0008, 0x8062, 0x0008, 0x0004, 0x0000,
+	0x8066, 0x0000, 0x0411, 0x0000, 0x443e, 0x0003, 0x03fe, 0x0000,
+	0x43e0, 0x0001, 0x0e6b, 0x000b, 0xc2c0, 0x0009, 0x00ff, 0x0008,
+	0x02e0, 0x0001, 0x0e6b, 0x000b, 0x9180, 0x0001, 0x0005, 0x0008,
+	0x8060, 0x0000, 0x0400, 0x0000, 0x7f62, 0x0008, 0x8066, 0x0000,
+	0x0019, 0x0000, 0x444d, 0x000b, 0x0240, 0x0002, 0x0a68, 0x0003,
+	0x00fe, 0x0000, 0x326b, 0x000b, 0x0248, 0x000a, 0x085c, 0x0003,
+	0x9180, 0x0001, 0x0006, 0x0008, 0x7f62, 0x0008, 0x8002, 0x0008,
+	0x0003, 0x0008, 0x8066, 0x0000, 0x020a, 0x0000, 0x445b, 0x0003,
+	0x112a, 0x0000, 0x002e, 0x0008, 0x022c, 0x0008, 0x3a44, 0x0002,
+	0x0c0a, 0x000b, 0x808c, 0x0008, 0x0002, 0x0000, 0x1760, 0x0008,
+	0x8062, 0x0008, 0x000f, 0x0008, 0x8066, 0x0000, 0x0011, 0x0008,
+	0x4468, 0x0003, 0x01fe, 0x0008, 0x42e0, 0x0009, 0x0e5c, 0x0003,
+	0x00fe, 0x0000, 0x43e0, 0x0001, 0x0e5c, 0x0003, 0x1734, 0x0000,
+	0x1530, 0x0000, 0x1632, 0x0008, 0x0d2a, 0x0008, 0x9880, 0x0001,
+	0x0010, 0x0000, 0x8060, 0x0000, 0x0400, 0x0000, 0x7f62, 0x0008,
+	0x8066, 0x0000, 0x1e0a, 0x0008, 0x447a, 0x0003, 0x808a, 0x0008,
+	0x0003, 0x0008, 0x1a60, 0x0000, 0x8062, 0x0008, 0x0002, 0x0000,
+	0x5880, 0x000b, 0x8066, 0x0000, 0x3679, 0x0000, 0x4483, 0x0003,
+	0x5884, 0x0003, 0x3efe, 0x0008, 0x7f4f, 0x0002, 0x088a, 0x000b,
+	0x0d00, 0x0000, 0x0092, 0x000c, 0x8054, 0x0008, 0x0011, 0x0008,
+	0x8074, 0x0000, 0x1010, 0x0008, 0x1efe, 0x0000, 0x300a, 0x000b,
+	0x00c8, 0x000c, 0x000a, 0x000b, 0x00fe, 0x0000, 0x349a, 0x0003,
+	0x1a60, 0x0000, 0x8062, 0x0008, 0x0007, 0x0000, 0x8066, 0x0000,
+	0x0231, 0x0008, 0x4499, 0x000b, 0x03fe, 0x0000, 0x04d0, 0x0001,
+	0x0cc0, 0x000b, 0x82c0, 0x0001, 0x1f00, 0x0000, 0xffa0, 0x0001,
+	0x0400, 0x0000, 0x08af, 0x0003, 0x14c0, 0x000b, 0x01fe, 0x0008,
+	0x0580, 0x0009, 0x7f06, 0x0000, 0x02fe, 0x0008, 0xffc0, 0x0001,
+	0x00ff, 0x0008, 0x0690, 0x0001, 0x10af, 0x0003, 0x7f08, 0x0008,
+	0x84c0, 0x0001, 0xff00, 0x0008, 0x08c0, 0x0003, 0x00fe, 0x0000,
+	0x34b6, 0x000b, 0x8072, 0x0000, 0x1010, 0x0008, 0x3944, 0x0002,
+	0x08b1, 0x0003, 0x00ba, 0x0003, 0x8072, 0x0000, 0x2020, 0x0008,
+	0x3945, 0x000a, 0x08b6, 0x000b, 0x3946, 0x000a, 0x0cc7, 0x0003,
+	0x0000, 0x0007, 0x3943, 0x000a, 0x08c7, 0x000b, 0x00ba, 0x0003,
+	0x00fe, 0x0000, 0x34c5, 0x0003, 0x8072, 0x0000, 0x1000, 0x0000,
+	0x00c7, 0x0003, 0x8072, 0x0000, 0x2000, 0x0000, 0x4000, 0x000f,
+	0x1c60, 0x0000, 0x1b62, 0x0000, 0x8066, 0x0000, 0x0231, 0x0008,
+	0x44cc, 0x000b, 0x58cd, 0x000b, 0x0140, 0x0008, 0x0242, 0x0000,
+	0x1f43, 0x0002, 0x0cdb, 0x000b, 0x0d44, 0x0000, 0x0d46, 0x0008,
+	0x0348, 0x0008, 0x044a, 0x0008, 0x030a, 0x0008, 0x040c, 0x0000,
+	0x0d06, 0x0000, 0x0d08, 0x0008, 0x00df, 0x0003, 0x0344, 0x0008,
+	0x0446, 0x0008, 0x0548, 0x0008, 0x064a, 0x0000, 0x1948, 0x000a,
+	0x08e2, 0x0003, 0x0d4a, 0x0008, 0x58e2, 0x0003, 0x3efe, 0x0008,
+	0x7f4f, 0x0002, 0x08e9, 0x000b, 0x8000, 0x0000, 0x0001, 0x0000,
+	0x0092, 0x000c, 0x8054, 0x0008, 0x0001, 0x0000, 0x8074, 0x0000,
+	0x2020, 0x0008, 0x4000, 0x000f, 0x3a40, 0x000a, 0x0c0d, 0x0003,
+	0x2b24, 0x0008, 0x2b24, 0x0008, 0x58f2, 0x000b, 0x8054, 0x0008,
+	0x0002, 0x0000, 0x1242, 0x0002, 0x0940, 0x0003, 0x3a45, 0x000a,
+	0x092f, 0x0003, 0x8072, 0x0000, 0x1000, 0x0000, 0x3945, 0x000a,
+	0x08ff, 0x0003, 0x8072, 0x0000, 0x3010, 0x0000, 0x1e10, 0x000a,
+	0x7f3c, 0x0000, 0x092a, 0x0003, 0x1d00, 0x0002, 0x7f3a, 0x0000,
+	0x0d60, 0x0000, 0x7f62, 0x0008, 0x8066, 0x0000, 0x0009, 0x0008,
+	0x4508, 0x000b, 0x00fe, 0x0000, 0x3527, 0x000b, 0x1c60, 0x0000,
+	0x8062, 0x0008, 0x0001, 0x0000, 0x8066, 0x0000, 0x0009, 0x0008,
+	0x4510, 0x000b, 0x00fe, 0x0000, 0x3243, 0x000b, 0x0038, 0x0000,
+	0x0060, 0x0008, 0x8062, 0x0008, 0x0019, 0x0000, 0x8066, 0x0000,
+	0x0009, 0x0008, 0x4519, 0x000b, 0x80c0, 0x0009, 0x00ff, 0x0008,
+	0x7f3e, 0x0008, 0x0d60, 0x0000, 0x0efe, 0x0008, 0x1f80, 0x0001,
+	0x7f62, 0x0008, 0x8066, 0x0000, 0x0009, 0x0008, 0x4523, 0x000b,
+	0x003a, 0x0008, 0x1dfe, 0x0000, 0x0104, 0x000b, 0x0036, 0x0008,
+	0x00c8, 0x000c, 0x0140, 0x000b, 0x8074, 0x0000, 0x2000, 0x0000,
+	0x8072, 0x0000, 0x2000, 0x0000, 0x0140, 0x000b, 0x3a44, 0x0002,
+	0x0a71, 0x000b, 0x8074, 0x0000, 0x1000, 0x0000, 0x8072, 0x0000,
+	0x1000, 0x0000, 0x2d0e, 0x0000, 0x2d0e, 0x0000, 0x3640, 0x0003,
+	0x26fe, 0x0008, 0x26fe, 0x0008, 0x2700, 0x0008, 0x2700, 0x0008,
+	0x00d0, 0x0009, 0x0d52, 0x000b, 0x8074, 0x0000, 0x4040, 0x0008,
+	0x5940, 0x0003, 0x50ee, 0x000b, 0x3a46, 0x000a, 0x0d52, 0x000b,
+	0x3a47, 0x0002, 0x094d, 0x000b, 0x8054, 0x0008, 0x0004, 0x0000,
+	0x8074, 0x0000, 0x8000, 0x0000, 0x8072, 0x0000, 0x3000, 0x0008,
+	0x019c, 0x0003, 0x92c0, 0x0009, 0x0fc8, 0x0000, 0x080a, 0x0003,
+	0x1246, 0x000a, 0x0e3a, 0x0003, 0x1a60, 0x0000, 0x8062, 0x0008,
+	0x0002, 0x0000, 0x8066, 0x0000, 0x362a, 0x0000, 0x4557, 0x000b,
+	0x2000, 0x0000, 0x2000, 0x0000, 0x2102, 0x0000, 0x2102, 0x0000,
+	0x2204, 0x0000, 0x2204, 0x0000, 0x2306, 0x0000, 0x2306, 0x0000,
+	0x2408, 0x0000, 0x2408, 0x0000, 0x250a, 0x0000, 0x250a, 0x0000,
+	0x260c, 0x0000, 0x260c, 0x0000, 0x270e, 0x0000, 0x270e, 0x0000,
+	0x2810, 0x0000, 0x2810, 0x0000, 0x2912, 0x0000, 0x2912, 0x0000,
+	0x1a60, 0x0000, 0x8062, 0x0008, 0x0007, 0x0000, 0x8066, 0x0000,
+	0x0052, 0x0000, 0x4571, 0x0003, 0x92c0, 0x0009, 0x0780, 0x0008,
+	0x0e56, 0x0003, 0x124b, 0x0002, 0x097a, 0x0003, 0x2e4d, 0x0002,
+	0x2e4d, 0x0002, 0x0a40, 0x0003, 0x3a46, 0x000a, 0x0d8a, 0x000b,
+	0x597c, 0x0003, 0x8054, 0x0008, 0x0004, 0x0000, 0x1243, 0x000a,
+	0x0998, 0x0003, 0x8010, 0x0008, 0x000d, 0x0000, 0x021b, 0x000c,
+	0x1948, 0x000a, 0x0987, 0x000b, 0x0210, 0x0004, 0x1810, 0x0000,
+	0x021b, 0x000c, 0x0198, 0x000b, 0x1948, 0x000a, 0x098e, 0x000b,
+	0x1243, 0x000a, 0x0a43, 0x0003, 0x194d, 0x000a, 0x0992, 0x0003,
+	0x1243, 0x000a, 0x0a4a, 0x0003, 0x5992, 0x0003, 0x8054, 0x0008,
+	0x0004, 0x0000, 0x0210, 0x0004, 0x1810, 0x0000, 0x021b, 0x000c,
+	0x8074, 0x0000, 0xf000, 0x0008, 0x8072, 0x0000, 0x3000, 0x0008,
+	0x0d30, 0x0000, 0x3a42, 0x0002, 0x0da2, 0x000b, 0x15fe, 0x0008,
+	0x3461, 0x000b, 0x000a, 0x000b, 0x8074, 0x0000, 0x0501, 0x0000,
+	0x8010, 0x0008, 0x000c, 0x0008, 0x021b, 0x000c, 0x000a, 0x000b,
+	0xbbe0, 0x0009, 0x0030, 0x0008, 0x0db8, 0x0003, 0x18fe, 0x0000,
+	0x3ce0, 0x0009, 0x09b5, 0x0003, 0x15fe, 0x0008, 0x3ce0, 0x0009,
+	0x09b5, 0x0003, 0x020b, 0x0004, 0x8076, 0x0008, 0x0040, 0x0000,
+	0x0208, 0x000b, 0x8076, 0x0008, 0x0041, 0x0008, 0x0208, 0x000b,
+	0xbbe0, 0x0009, 0x0032, 0x0000, 0x0dbd, 0x0003, 0x3c1e, 0x0008,
+	0x0208, 0x000b, 0xbbe0, 0x0009, 0x003b, 0x0000, 0x0dc2, 0x000b,
+	0x3c20, 0x0000, 0x0208, 0x000b, 0xbbe0, 0x0009, 0x0035, 0x0008,
+	0x0dc8, 0x000b, 0x8072, 0x0000, 0x8000, 0x0000, 0x0384, 0x000b,
+	0xbbe0, 0x0009, 0x0036, 0x0008, 0x0aa5, 0x000b, 0xbbe0, 0x0009,
+	0x0037, 0x0000, 0x0de9, 0x000b, 0x18fe, 0x0000, 0x3ce0, 0x0009,
+	0x0db5, 0x000b, 0x8076, 0x0008, 0x0040, 0x0000, 0x1a60, 0x0000,
+	0x8062, 0x0008, 0x000d, 0x0000, 0x2604, 0x0008, 0x2604, 0x0008,
+	0x2706, 0x0008, 0x2706, 0x0008, 0x2808, 0x0000, 0x2808, 0x0000,
+	0x290a, 0x0000, 0x290a, 0x0000, 0x8066, 0x0000, 0x0422, 0x0000,
+	0x45e0, 0x000b, 0x0210, 0x0004, 0x8054, 0x0008, 0x0004, 0x0000,
+	0x8074, 0x0000, 0xf000, 0x0008, 0x8072, 0x0000, 0xb000, 0x0000,
+	0x019c, 0x0003, 0xbbe0, 0x0009, 0x0038, 0x0000, 0x0dfb, 0x000b,
+	0x18fe, 0x0000, 0x3ce0, 0x0009, 0x09f8, 0x0003, 0x15fe, 0x0008,
+	0x3ce0, 0x0009, 0x0db1, 0x0003, 0x020b, 0x0004, 0x8076, 0x0008,
+	0x0040, 0x0000, 0x8072, 0x0000, 0x8000, 0x0000, 0x0268, 0x000b,
+	0x8076, 0x0008, 0x0042, 0x0008, 0x0208, 0x000b, 0xbbe0, 0x0009,
+	0x0016, 0x0000, 0x0e08, 0x000b, 0x8074, 0x0000, 0x0808, 0x0008,
+	0x3a44, 0x0002, 0x0c0c, 0x000b, 0x8074, 0x0000, 0x0800, 0x0000,
+	0x8072, 0x0000, 0x8000, 0x0000, 0x8000, 0x000f, 0x000a, 0x000b,
+	0x8072, 0x0000, 0x8000, 0x0000, 0x000a, 0x000b, 0x3d30, 0x000a,
+	0x7f00, 0x0000, 0xbc80, 0x0001, 0x0007, 0x0000, 0x0214, 0x0003,
+	0x1930, 0x000a, 0x7f00, 0x0000, 0x9880, 0x0001, 0x0007, 0x0000,
+	0x8060, 0x0000, 0x0400, 0x0000, 0x7f62, 0x0008, 0x8066, 0x0000,
+	0x000a, 0x0008, 0x4619, 0x000b, 0x4000, 0x000f, 0x221e, 0x000b,
+	0x0870, 0x0008, 0x4000, 0x000f, 0x7e1b, 0x000b, 0xbbe0, 0x0009,
+	0x0030, 0x0008, 0x0e1b, 0x0003, 0x18fe, 0x0000, 0x3ce0, 0x0009,
+	0x0a2c, 0x0003, 0x15fe, 0x0008, 0x3ce0, 0x0009, 0x0a2c, 0x0003,
+	0x020b, 0x0004, 0x8076, 0x0008, 0x0040, 0x0000, 0x022e, 0x0003,
+	0x8076, 0x0008, 0x0041, 0x0008, 0x8072, 0x0000, 0x8000, 0x0000,
+	0x021b, 0x0003, 0xbac0, 0x0009, 0x0090, 0x0008, 0x0a37, 0x0003,
+	0x8074, 0x0000, 0x0706, 0x0000, 0x0239, 0x0003, 0x8074, 0x0000,
+	0x0703, 0x0000, 0x4000, 0x000f, 0x8010, 0x0008, 0x0023, 0x0000,
+	0x0276, 0x000b, 0x8010, 0x0008, 0x0008, 0x0000, 0x0276, 0x000b,
+	0x8010, 0x0008, 0x0022, 0x0008, 0x0276, 0x000b, 0x0210, 0x0004,
+	0x8010, 0x0008, 0x0007, 0x0000, 0x021b, 0x000c, 0x1810, 0x0000,
+	0x021b, 0x000c, 0x0282, 0x0003, 0x0210, 0x0004, 0x8010, 0x0008,
+	0x001b, 0x0008, 0x021b, 0x000c, 0x1810, 0x0000, 0x021b, 0x000c,
+	0x8074, 0x0000, 0xf080, 0x0000, 0x8072, 0x0000, 0x3000, 0x0008,
+	0x0d30, 0x0000, 0x000a, 0x000b, 0x8010, 0x0008, 0x0009, 0x0008,
+	0x0276, 0x000b, 0x8010, 0x0008, 0x0005, 0x0008, 0x0276, 0x000b,
+	0x1648, 0x000a, 0x0c6f, 0x000b, 0x808c, 0x0008, 0x0001, 0x0000,
+	0x8010, 0x0008, 0x0004, 0x0000, 0x4143, 0x000a, 0x086f, 0x0003,
+	0x3a44, 0x0002, 0x0c0a, 0x000b, 0x0d2a, 0x0008, 0x0276, 0x000b,
+	0x8010, 0x0008, 0x0003, 0x0008, 0x027a, 0x000b, 0x8010, 0x0008,
+	0x000b, 0x0000, 0x027a, 0x000b, 0x8010, 0x0008, 0x0002, 0x0000,
+	0x027a, 0x000b, 0x3a47, 0x0002, 0x0d40, 0x000b, 0x8010, 0x0008,
+	0x0006, 0x0008, 0x027a, 0x000b, 0x8074, 0x0000, 0xf000, 0x0008,
+	0x8072, 0x0000, 0x3000, 0x0008, 0x021b, 0x000c, 0x0231, 0x0004,
+	0x3a40, 0x000a, 0x080a, 0x0003, 0x8010, 0x0008, 0x000c, 0x0008,
+	0x021b, 0x000c, 0x000a, 0x000b, 0x8074, 0x0000, 0xf080, 0x0000,
+	0x8072, 0x0000, 0x3000, 0x0008, 0x0d30, 0x0000, 0x2e4d, 0x0002,
+	0x2e4d, 0x0002, 0x0a8d, 0x000b, 0x8054, 0x0008, 0x0019, 0x0000,
+	0x000a, 0x000b, 0x8054, 0x0008, 0x0009, 0x0008, 0x000a, 0x000b,
+	0x3a44, 0x0002, 0x0c0a, 0x000b, 0x026b, 0x000b, 0x808c, 0x0008,
+	0x0000, 0x0008, 0x4447, 0x0002, 0x0ab9, 0x0003, 0xc0c0, 0x0001,
+	0x00ff, 0x0008, 0xffe0, 0x0009, 0x00ff, 0x0008, 0x0e90, 0x0003,
+	0xc1e0, 0x0001, 0xffff, 0x0008, 0x0e90, 0x0003, 0x8010, 0x0008,
+	0x0013, 0x0000, 0x021b, 0x000c, 0x8074, 0x0000, 0x0202, 0x0008,
+	0x000a, 0x000b, 0x3a40, 0x000a, 0x0eb6, 0x000b, 0x8074, 0x0000,
+	0x0200, 0x0000, 0x3d00, 0x0000, 0x3cfe, 0x0000, 0x8072, 0x0000,
+	0x8000, 0x0000, 0x43e0, 0x0001, 0x0eb4, 0x0003, 0x42fe, 0x0000,
+	0xffc0, 0x0001, 0x00ff, 0x0008, 0x00e0, 0x0009, 0x0a90, 0x000b,
+	0x0d08, 0x0008, 0x0309, 0x000b, 0x8072, 0x0000, 0x8000, 0x0000,
+	0x000a, 0x000b, 0x038d, 0x0004, 0x808c, 0x0008, 0x0001, 0x0000,
+	0x04fe, 0x0008, 0x3370, 0x0003, 0x0460, 0x0000, 0x8062, 0x0008,
+	0x0001, 0x0000, 0x8066, 0x0000, 0x0009, 0x0008, 0x46c3, 0x0003,
+	0x0004, 0x0000, 0x80c0, 0x0009, 0x00ff, 0x0008, 0x7f00, 0x0000,
+	0x80e0, 0x0001, 0x0004, 0x0000, 0x0add, 0x000b, 0x80e0, 0x0001,
+	0x0005, 0x0008, 0x0add, 0x000b, 0x80e0, 0x0001, 0x0006, 0x0008,
+	0x0add, 0x000b, 0x82c0, 0x0001, 0xff00, 0x0008, 0x7f04, 0x0008,
+	0x82e0, 0x0009, 0x0600, 0x0008, 0x0add, 0x000b, 0x82e0, 0x0009,
+	0x0500, 0x0008, 0x0add, 0x000b, 0x82e0, 0x0009, 0x0400, 0x0000,
+	0x0f70, 0x0003, 0xc4c0, 0x0009, 0x7000, 0x0000, 0xffe0, 0x0009,
+	0x1000, 0x0000, 0x0b09, 0x0003, 0x037e, 0x0004, 0x3941, 0x0002,
+	0x0ae8, 0x000b, 0x8072, 0x0000, 0x0400, 0x0000, 0x000a, 0x000b,
+	0x0460, 0x0000, 0x80fe, 0x0008, 0x002b, 0x0008, 0x7f62, 0x0008,
+	0x8066, 0x0000, 0x2209, 0x0008, 0x46ee, 0x0003, 0x11fe, 0x0000,
+	0x3304, 0x0003, 0x9180, 0x0001, 0x0002, 0x0000, 0x8060, 0x0000,
+	0x0400, 0x0000, 0x7f62, 0x0008, 0x8066, 0x0000, 0x0609, 0x0008,
+	0x46f8, 0x000b, 0x42fe, 0x0000, 0xffc0, 0x0001, 0xff00, 0x0008,
+	0x03e0, 0x0009, 0x0f01, 0x0003, 0x8072, 0x0000, 0x0400, 0x0000,
+	0x0046, 0x0003, 0x9180, 0x0001, 0x0003, 0x0008, 0x02eb, 0x0003,
+	0x8072, 0x0000, 0x0400, 0x0000, 0x8010, 0x0008, 0x0010, 0x0000,
+	0x0361, 0x0003, 0x037e, 0x0004, 0x3941, 0x0002, 0x0b0f, 0x0003,
+	0x8072, 0x0000, 0x0400, 0x0000, 0x000a, 0x000b, 0x0346, 0x000c,
+	0x11fe, 0x0000, 0x3717, 0x0003, 0x8072, 0x0000, 0x0400, 0x0000,
+	0x8010, 0x0008, 0x000e, 0x0000, 0x0361, 0x0003, 0x8060, 0x0000,
+	0x0400, 0x0000, 0x04fe, 0x0008, 0x372c, 0x000b, 0x808c, 0x0008,
+	0x0000, 0x0008, 0x9180, 0x0001, 0x0005, 0x0008, 0x7f62, 0x0008,
+	0x8066, 0x0000, 0x0009, 0x0008, 0x4722, 0x000b, 0x0060, 0x0008,
+	0x8062, 0x0008, 0x001b, 0x0008, 0x4304, 0x0008, 0x4206, 0x0008,
+	0x8066, 0x0000, 0x0412, 0x0000, 0x472a, 0x0003, 0x0343, 0x0003,
+	0x808c, 0x0008, 0x0001, 0x0000, 0x0460, 0x0000, 0x8062, 0x0008,
+	0x002b, 0x0008, 0x8066, 0x0000, 0x0609, 0x0008, 0x4733, 0x000b,
+	0x8066, 0x0000, 0x220a, 0x0008, 0x4736, 0x000b, 0x42fe, 0x0000,
+	0xffc0, 0x0001, 0xff00, 0x0008, 0x7f04, 0x0008, 0x8060, 0x0000,
+	0x0400, 0x0000, 0x9180, 0x0001, 0x0002, 0x0000, 0x7f62, 0x0008,
+	0x8066, 0x0000, 0x041a, 0x0008, 0x4742, 0x000b, 0x8072, 0x0000,
+	0x0400, 0x0000, 0x0046, 0x0003, 0x8060, 0x0000, 0x0400, 0x0000,
+	0x1362, 0x0008, 0x8066, 0x0000, 0x0411, 0x0000, 0x474b, 0x000b,
+	0x02fe, 0x0008, 0x03e0, 0x0009, 0x0f51, 0x0003, 0x0d22, 0x0000,
+	0x4000, 0x000f, 0x8280, 0x0009, 0x0002, 0x0000, 0x1380, 0x0001,
+	0x7f62, 0x0008, 0x8066, 0x0000, 0x2209, 0x0008, 0x4757, 0x0003,
+	0x0200, 0x000a, 0xffc0, 0x0001, 0x0007, 0x0000, 0x7f06, 0x0000,
+	0x1362, 0x0008, 0x8066, 0x0000, 0x060a, 0x0008, 0x475f, 0x000b,
+	0x4000, 0x000f, 0x3a44, 0x0002, 0x0c0a, 0x000b, 0x2f44, 0x000a,
+	0x2f44, 0x000a, 0x0e6b, 0x000b, 0x808a, 0x0008, 0x0003, 0x0008,
+	0x8074, 0x0000, 0xf080, 0x0000, 0x8072, 0x0000, 0x3000, 0x0008,
+	0x5b6c, 0x0003, 0x8054, 0x0008, 0x0019, 0x0000, 0x000a, 0x000b,
+	0x3a44, 0x0002, 0x0c0a, 0x000b, 0x808c, 0x0008, 0x0000, 0x0008,
+	0x8010, 0x0008, 0x0011, 0x0008, 0x021b, 0x000c, 0x42fe, 0x0000,
+	0xffc0, 0x0001, 0x00ff, 0x0008, 0x7f10, 0x0008, 0x021b, 0x000c,
+	0x4310, 0x0008, 0x027a, 0x000b, 0x3941, 0x0002, 0x0b81, 0x0003,
+	0x4000, 0x000f, 0x8072, 0x0000, 0x0404, 0x0008, 0x4000, 0x000f,
+	0x8010, 0x0008, 0x0012, 0x0008, 0x021b, 0x000c, 0x0346, 0x000c,
+	0x1110, 0x0000, 0x021b, 0x000c, 0x11fe, 0x0000, 0x3787, 0x0003,
+	0x000a, 0x000b, 0xc2c0, 0x0009, 0x00ff, 0x0008, 0x7f00, 0x0000,
+	0xc3c0, 0x0001, 0xff00, 0x0008, 0x00d0, 0x0009, 0x0bb2, 0x0003,
+	0x0d0a, 0x0000, 0x8580, 0x0001, 0x1000, 0x0000, 0x7f62, 0x0008,
+	0x8060, 0x0000, 0x0400, 0x0000, 0x8066, 0x0000, 0x0809, 0x0000,
+	0x479c, 0x000b, 0x04fe, 0x0008, 0x33ab, 0x0003, 0x0460, 0x0000,
+	0x8062, 0x0008, 0x0004, 0x0000, 0x8066, 0x0000, 0x0211, 0x0000,
+	0x47a4, 0x0003, 0x01fe, 0x0008, 0x00e0, 0x0009, 0x0fab, 0x0003,
+	0x02fe, 0x0008, 0x43e0, 0x0001, 0x0bb1, 0x0003, 0x0500, 0x0002,
+	0x7f0a, 0x0000, 0xffe0, 0x0009, 0x0800, 0x0000, 0x0f95, 0x000b,
+	0x0d08, 0x0008, 0x4000, 0x000f, 0x43fe, 0x0008, 0x3e80, 0x0001,
+	0xffc0, 0x0001, 0x7fff, 0x0000, 0x0d60, 0x0000, 0x7f62, 0x0008,
+	0x8066, 0x0000, 0x0809, 0x0000, 0x47ba, 0x0003, 0x8060, 0x0000,
+	0x0400, 0x0000, 0x84c0, 0x0001, 0xff00, 0x0008, 0x7f60, 0x000a,
+	0x7f60, 0x000a, 0x7f60, 0x000a, 0x7f60, 0x000a, 0x7f60, 0x000a,
+	0x7f60, 0x000a, 0x7f60, 0x000a, 0x7f60, 0x000a, 0xff80, 0x0009,
+	0x1000, 0x0000, 0x7f62, 0x0008, 0x8066, 0x0000, 0x0809, 0x0000,
+	0x47cc, 0x000b, 0x4000, 0x000f, 0x5ff4, 0xebed, 0x0001, 0x0002,
+	0x0004, 0x0008, 0x0010, 0x0020, 0x0040, 0x0080, 0x0100, 0x0200,
+	0x0400, 0x0800, 0x1000, 0x2000, 0x4000, 0x8000, 0xa258
 };
 #ifdef UNIQUE_FW_NAME
-unsigned short fw2300ipx_length01 = 0xea02;
+unsigned short fw2300ipx_length01 = 0xeb57;
 #else
-unsigned short risc_code_length01 = 0xea02;
+unsigned short risc_code_length01 = 0xeb57;
 #endif
 
diff -Nru a/drivers/scsi/qla2xxx/ql2322_fw.c b/drivers/scsi/qla2xxx/ql2322_fw.c
--- a/drivers/scsi/qla2xxx/ql2322_fw.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/scsi/qla2xxx/ql2322_fw.c	2005-01-10 20:11:15 -08:00
@@ -1,8 +1,8 @@
-/**************************************************************************
+/******************************************************************************
  *                  QLOGIC LINUX SOFTWARE
  *
  * QLogic ISP2x00 device driver for Linux 2.6.x
- * Copyright (C) 2003-2004 QLogic Corporation
+ * Copyright (C) 2003 QLogic Corporation
  * (www.qlogic.com)
  *
  * This program is free software; you can redistribute it and/or modify it
@@ -15,10 +15,10 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  *
- *************************************************************************/
+ ******************************************************************************/
 
 /*
- *	Firmware Version 3.03.02 (16:54 Aug 10, 2004)
+ *	Firmware Version 3.03.08 (10:03 Nov 12, 2004)
  */
 
 #ifdef UNIQUE_FW_NAME
@@ -28,15 +28,15 @@
 #endif
 
 #ifdef UNIQUE_FW_NAME
-unsigned char fw2322ipx_version_str[] = {3, 3, 2};
+unsigned char fw2322ipx_version_str[] = {3, 3, 8};
 #else
-unsigned char firmware_version[] = {3, 3, 2};
+unsigned char firmware_version[] = {3, 3, 8};
 #endif
 
 #ifdef UNIQUE_FW_NAME
-#define fw2322ipx_VERSION_STRING "3.03.02"
+#define fw2322ipx_VERSION_STRING "3.03.08"
 #else
-#define FW_VERSION_STRING "3.03.02"
+#define FW_VERSION_STRING "3.03.08"
 #endif
 
 #ifdef UNIQUE_FW_NAME
@@ -50,12 +50,12 @@
 #else
 unsigned short risc_code01[] = { 
 #endif
-	0x0470, 0x0000, 0x0000, 0xdf8f, 0x0000, 0x0003, 0x0003, 0x0002,
+	0x0470, 0x0000, 0x0000, 0xe0c2, 0x0000, 0x0003, 0x0003, 0x0008,
 	0x0137, 0x2043, 0x4f50, 0x5952, 0x4947, 0x4854, 0x2032, 0x3030,
 	0x3120, 0x514c, 0x4f47, 0x4943, 0x2043, 0x4f52, 0x504f, 0x5241,
 	0x5449, 0x4f4e, 0x2049, 0x5350, 0x3233, 0x3030, 0x2046, 0x6972,
 	0x6d77, 0x6172, 0x6520, 0x2056, 0x6572, 0x7369, 0x6f6e, 0x2030,
-	0x332e, 0x3033, 0x2e30, 0x3220, 0x2020, 0x2020, 0x2400, 0x20a9,
+	0x332e, 0x3033, 0x2e30, 0x3820, 0x2020, 0x2020, 0x2400, 0x20a9,
 	0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2200, 0x20a9, 0x000f,
 	0x2001, 0x0000, 0x400f, 0x2091, 0x2400, 0x20a9, 0x000f, 0x2001,
 	0x0000, 0x400f, 0x2091, 0x2600, 0x20a9, 0x000f, 0x2001, 0x0000,
@@ -64,164 +64,164 @@
 	0x2c00, 0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2e00,
 	0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2000, 0x2001,
 	0x0000, 0x20c1, 0x0004, 0x20c9, 0x1cff, 0x2059, 0x0000, 0x2b78,
-	0x7883, 0x0004, 0x2089, 0x2ae3, 0x2051, 0x1800, 0x2a70, 0x20e1,
+	0x7883, 0x0004, 0x2089, 0x2b14, 0x2051, 0x1800, 0x2a70, 0x20e1,
 	0x0001, 0x20e9, 0x0001, 0x2009, 0x0000, 0x080c, 0x0e62, 0x00f6,
-	0x7888, 0x9005, 0x11f8, 0x2061, 0xc000, 0x080c, 0x207f, 0x1170,
-	0x2079, 0x0300, 0x080c, 0x2095, 0x2061, 0xe000, 0x080c, 0x207f,
-	0x1128, 0x2079, 0x0380, 0x080c, 0x2095, 0x0060, 0x00fe, 0x7883,
+	0x7888, 0x9005, 0x11f8, 0x2061, 0xc000, 0x080c, 0x20b0, 0x1170,
+	0x2079, 0x0300, 0x080c, 0x20c6, 0x2061, 0xe000, 0x080c, 0x20b0,
+	0x1128, 0x2079, 0x0380, 0x080c, 0x20c6, 0x0060, 0x00fe, 0x7883,
 	0x4010, 0x7837, 0x4010, 0x7833, 0x0010, 0x2091, 0x5000, 0x2091,
 	0x4080, 0x0cf8, 0x00fe, 0x2029, 0x5600, 0x2031, 0xffff, 0x2039,
 	0x55dc, 0x2021, 0x0200, 0x20e9, 0x0001, 0x20a1, 0x0000, 0x20a9,
 	0x0800, 0x900e, 0x4104, 0x20e9, 0x0001, 0x20a1, 0x1000, 0x900e,
 	0x2001, 0x0dc1, 0x9084, 0x0fff, 0x20a8, 0x4104, 0x2001, 0x0000,
 	0x9086, 0x0000, 0x0120, 0x21a8, 0x4104, 0x8001, 0x1de0, 0x756e,
-	0x7672, 0x776a, 0x7476, 0x747a, 0x00e6, 0x2071, 0x1b4d, 0x2472,
+	0x7672, 0x776a, 0x7476, 0x747a, 0x00e6, 0x2071, 0x1b50, 0x2472,
 	0x00ee, 0x20a1, 0x1ddc, 0x7170, 0x810d, 0x810d, 0x810d, 0x810d,
 	0x918c, 0x000f, 0x2001, 0x0001, 0x9112, 0x900e, 0x21a8, 0x4104,
 	0x8211, 0x1de0, 0x7170, 0x3400, 0x8001, 0x9102, 0x0120, 0x0218,
 	0x20a8, 0x900e, 0x4104, 0x2009, 0x1800, 0x810d, 0x810d, 0x810d,
 	0x810d, 0x810d, 0x918c, 0x001f, 0x2001, 0x0001, 0x9112, 0x20e9,
 	0x0001, 0x20a1, 0x0800, 0x900e, 0x20a9, 0x0800, 0x4104, 0x8211,
-	0x1dd8, 0x080c, 0x0f5f, 0x080c, 0x6052, 0x080c, 0xab86, 0x080c,
-	0x1116, 0x080c, 0x1340, 0x080c, 0x1bd5, 0x080c, 0x91a8, 0x080c,
-	0x0d0f, 0x080c, 0x109b, 0x080c, 0x3488, 0x080c, 0x7803, 0x080c,
-	0x6ab2, 0x080c, 0x891b, 0x080c, 0x857c, 0x080c, 0x2270, 0x080c,
-	0x7ed9, 0x080c, 0x20ae, 0x080c, 0x21ec, 0x080c, 0x2265, 0x2091,
+	0x1dd8, 0x080c, 0x0f5f, 0x080c, 0x60a0, 0x080c, 0xac46, 0x080c,
+	0x1116, 0x080c, 0x1340, 0x080c, 0x1c06, 0x080c, 0x921f, 0x080c,
+	0x0d0f, 0x080c, 0x109b, 0x080c, 0x34b9, 0x080c, 0x7854, 0x080c,
+	0x6b01, 0x080c, 0x8992, 0x080c, 0x85f3, 0x080c, 0x22a1, 0x080c,
+	0x7f2a, 0x080c, 0x20df, 0x080c, 0x221d, 0x080c, 0x2296, 0x2091,
 	0x3009, 0x7883, 0x0000, 0x1004, 0x0943, 0x7880, 0x9086, 0x0002,
 	0x1190, 0x7883, 0x4000, 0x7837, 0x4000, 0x7833, 0x0010, 0x0e04,
 	0x0937, 0x2091, 0x5000, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004,
 	0xd084, 0x190c, 0x11ee, 0x2071, 0x1800, 0x7003, 0x0000, 0x780c,
 	0x9084, 0x0030, 0x9086, 0x0000, 0x190c, 0x0d7d, 0x2071, 0x1800,
-	0x7000, 0x908e, 0x0003, 0x1168, 0x080c, 0x4bee, 0x080c, 0x34af,
-	0x080c, 0x786b, 0x080c, 0x6fea, 0x080c, 0x89f9, 0x080c, 0x85a5,
+	0x7000, 0x908e, 0x0003, 0x1168, 0x080c, 0x4c17, 0x080c, 0x34e0,
+	0x080c, 0x78bc, 0x080c, 0x7039, 0x080c, 0x8a75, 0x080c, 0x861c,
 	0x0c68, 0x000b, 0x0c88, 0x096d, 0x096e, 0x0b09, 0x096b, 0x0bc3,
 	0x0d0e, 0x0d0e, 0x0d0e, 0x080c, 0x0d7d, 0x0005, 0x0126, 0x00f6,
 	0x2091, 0x8000, 0x7000, 0x9086, 0x0001, 0x1904, 0x0adc, 0x080c,
-	0x0eb2, 0x080c, 0x74ec, 0x0150, 0x080c, 0x750f, 0x15b0, 0x2079,
-	0x0100, 0x7828, 0x9085, 0x1800, 0x782a, 0x0478, 0x080c, 0x741d,
+	0x0eb2, 0x080c, 0x753d, 0x0150, 0x080c, 0x7560, 0x15b0, 0x2079,
+	0x0100, 0x7828, 0x9085, 0x1800, 0x782a, 0x0478, 0x080c, 0x746e,
 	0x7000, 0x9086, 0x0001, 0x1904, 0x0adc, 0x7098, 0x9086, 0x0028,
-	0x1904, 0x0adc, 0x080c, 0x8574, 0x080c, 0x8566, 0x2001, 0x0161,
-	0x2003, 0x0001, 0x2079, 0x0100, 0x2011, 0xffff, 0x080c, 0x2a83,
-	0x7a28, 0x9295, 0x5e2c, 0x7a2a, 0x2011, 0x7362, 0x080c, 0x8651,
-	0x2011, 0x7355, 0x080c, 0x875d, 0x2011, 0x5ea9, 0x080c, 0x8651,
-	0x2011, 0x8030, 0x901e, 0x7396, 0x04d0, 0x080c, 0x5756, 0x2079,
-	0x0100, 0x7844, 0x9005, 0x1904, 0x0adc, 0x2011, 0x5ea9, 0x080c,
-	0x8651, 0x2011, 0x7362, 0x080c, 0x8651, 0x2011, 0x7355, 0x080c,
-	0x875d, 0x2001, 0x0265, 0x2001, 0x0205, 0x2003, 0x0000, 0x7840,
+	0x1904, 0x0adc, 0x080c, 0x85dc, 0x080c, 0x85ce, 0x2001, 0x0161,
+	0x2003, 0x0001, 0x2079, 0x0100, 0x2011, 0xffff, 0x080c, 0x2ab4,
+	0x7a28, 0x9295, 0x5e2c, 0x7a2a, 0x2011, 0x73b3, 0x080c, 0x86c8,
+	0x2011, 0x73a6, 0x080c, 0x87d4, 0x2011, 0x5ef7, 0x080c, 0x86c8,
+	0x2011, 0x8030, 0x901e, 0x7396, 0x04d0, 0x080c, 0x57a4, 0x2079,
+	0x0100, 0x7844, 0x9005, 0x1904, 0x0adc, 0x2011, 0x5ef7, 0x080c,
+	0x86c8, 0x2011, 0x73b3, 0x080c, 0x86c8, 0x2011, 0x73a6, 0x080c,
+	0x87d4, 0x2001, 0x0265, 0x2001, 0x0205, 0x2003, 0x0000, 0x7840,
 	0x9084, 0xfffb, 0x7842, 0x2001, 0x19a5, 0x2004, 0x9005, 0x1140,
-	0x00c6, 0x2061, 0x0100, 0x080c, 0x5ffa, 0x00ce, 0x0804, 0x0adc,
-	0x780f, 0x006b, 0x7a28, 0x080c, 0x74f4, 0x0118, 0x9295, 0x5e2c,
+	0x00c6, 0x2061, 0x0100, 0x080c, 0x6048, 0x00ce, 0x0804, 0x0adc,
+	0x780f, 0x006b, 0x7a28, 0x080c, 0x7545, 0x0118, 0x9295, 0x5e2c,
 	0x0010, 0x9295, 0x402c, 0x7a2a, 0x2011, 0x8010, 0x73d8, 0x2001,
-	0x19a6, 0x2003, 0x0001, 0x080c, 0x294b, 0x080c, 0x4b29, 0x7248,
+	0x19a6, 0x2003, 0x0001, 0x080c, 0x297c, 0x080c, 0x4b52, 0x7248,
 	0xc284, 0x724a, 0x2001, 0x180c, 0x200c, 0xc1ac, 0xc1cc, 0x2102,
-	0x2001, 0x0390, 0x2003, 0x0400, 0x080c, 0xa899, 0x080c, 0xa08e,
-	0x2011, 0x0004, 0x080c, 0xc875, 0x080c, 0xa8b5, 0x080c, 0x693a,
-	0x080c, 0x74ec, 0x1120, 0x080c, 0x29ac, 0x0600, 0x0420, 0x080c,
-	0x6001, 0x0140, 0x7097, 0x0001, 0x70d3, 0x0000, 0x080c, 0x5923,
-	0x0804, 0x0adc, 0x080c, 0x56f5, 0xd094, 0x01a8, 0x2001, 0x0390,
+	0x2001, 0x0390, 0x2003, 0x0400, 0x080c, 0xa91e, 0x080c, 0xa113,
+	0x2011, 0x0004, 0x080c, 0xc98a, 0x080c, 0xa93a, 0x080c, 0x6989,
+	0x080c, 0x753d, 0x1120, 0x080c, 0x29dd, 0x0600, 0x0420, 0x080c,
+	0x604f, 0x0140, 0x7097, 0x0001, 0x70d3, 0x0000, 0x080c, 0x5971,
+	0x0804, 0x0adc, 0x080c, 0x573e, 0xd094, 0x01a8, 0x2001, 0x0390,
 	0x2003, 0x0404, 0x2011, 0x180c, 0x2204, 0xc0cd, 0x2012, 0x080c,
-	0x56f9, 0xd0d4, 0x1118, 0x080c, 0x29ac, 0x1270, 0x2011, 0x180c,
-	0x2204, 0xc0bc, 0x00a8, 0x080c, 0x56f9, 0xd0d4, 0x1db8, 0x2011,
+	0x5742, 0xd0d4, 0x1118, 0x080c, 0x29dd, 0x1270, 0x2011, 0x180c,
+	0x2204, 0xc0bc, 0x00a8, 0x080c, 0x5742, 0xd0d4, 0x1db8, 0x2011,
 	0x180c, 0x2204, 0xc0bd, 0x0060, 0x2011, 0x180c, 0x2204, 0xc0bd,
-	0x2012, 0x080c, 0x6a86, 0x1128, 0xd0a4, 0x0118, 0x2204, 0xc0fd,
-	0x2012, 0x080c, 0x6a4c, 0x0120, 0x7a0c, 0xc2b4, 0x7a0e, 0x00a8,
-	0x707f, 0x0000, 0x080c, 0x74ec, 0x1130, 0x70b0, 0x9005, 0x1168,
-	0x080c, 0xccd1, 0x0050, 0x080c, 0xccd1, 0x70dc, 0xd09c, 0x1128,
-	0x70b0, 0x9005, 0x0110, 0x080c, 0x5fd7, 0x70e7, 0x0000, 0x70e3,
-	0x0000, 0x70a7, 0x0000, 0x080c, 0x29b4, 0x0228, 0x2011, 0x0101,
-	0x2204, 0xc0c4, 0x2012, 0x72dc, 0x080c, 0x74ec, 0x1178, 0x9016,
-	0x0016, 0x080c, 0x2748, 0x2019, 0x196c, 0x211a, 0x001e, 0x705f,
+	0x2012, 0x080c, 0x6ad5, 0x1128, 0xd0a4, 0x0118, 0x2204, 0xc0fd,
+	0x2012, 0x080c, 0x6a9b, 0x0120, 0x7a0c, 0xc2b4, 0x7a0e, 0x00a8,
+	0x707f, 0x0000, 0x080c, 0x753d, 0x1130, 0x70b0, 0x9005, 0x1168,
+	0x080c, 0xcde8, 0x0050, 0x080c, 0xcde8, 0x70dc, 0xd09c, 0x1128,
+	0x70b0, 0x9005, 0x0110, 0x080c, 0x6025, 0x70e7, 0x0000, 0x70e3,
+	0x0000, 0x70a7, 0x0000, 0x080c, 0x29e5, 0x0228, 0x2011, 0x0101,
+	0x2204, 0xc0c4, 0x2012, 0x72dc, 0x080c, 0x753d, 0x1178, 0x9016,
+	0x0016, 0x080c, 0x2779, 0x2019, 0x196c, 0x211a, 0x001e, 0x705f,
 	0xffff, 0x7063, 0x00ef, 0x7083, 0x0000, 0x0020, 0x2019, 0x196c,
 	0x201b, 0x0000, 0x2079, 0x1847, 0x7804, 0xd0ac, 0x0108, 0xc295,
-	0x72de, 0x080c, 0x74ec, 0x0118, 0x9296, 0x0004, 0x0518, 0x2011,
-	0x0001, 0x080c, 0xc875, 0x70ab, 0x0000, 0x70af, 0xffff, 0x7003,
-	0x0002, 0x00fe, 0x080c, 0x2fe0, 0x080c, 0xa899, 0x2011, 0x0005,
-	0x080c, 0xa1be, 0x080c, 0xa8b5, 0x080c, 0x74ec, 0x0148, 0x00c6,
-	0x2061, 0x0100, 0x0016, 0x080c, 0x2748, 0x61e2, 0x001e, 0x00ce,
+	0x72de, 0x080c, 0x753d, 0x0118, 0x9296, 0x0004, 0x0518, 0x2011,
+	0x0001, 0x080c, 0xc98a, 0x70ab, 0x0000, 0x70af, 0xffff, 0x7003,
+	0x0002, 0x00fe, 0x080c, 0x3011, 0x080c, 0xa91e, 0x2011, 0x0005,
+	0x080c, 0xa243, 0x080c, 0xa93a, 0x080c, 0x753d, 0x0148, 0x00c6,
+	0x2061, 0x0100, 0x0016, 0x080c, 0x2779, 0x61e2, 0x001e, 0x00ce,
 	0x012e, 0x00e0, 0x70ab, 0x0000, 0x70af, 0xffff, 0x7003, 0x0002,
-	0x080c, 0xa899, 0x2011, 0x0005, 0x080c, 0xa1be, 0x080c, 0xa8b5,
-	0x080c, 0x74ec, 0x0148, 0x00c6, 0x2061, 0x0100, 0x0016, 0x080c,
-	0x2748, 0x61e2, 0x001e, 0x00ce, 0x00fe, 0x012e, 0x0005, 0x00c6,
-	0x00b6, 0x080c, 0x74ec, 0x1118, 0x20a9, 0x0800, 0x0010, 0x20a9,
-	0x0782, 0x080c, 0x74ec, 0x1110, 0x900e, 0x0010, 0x2009, 0x007e,
+	0x080c, 0xa91e, 0x2011, 0x0005, 0x080c, 0xa243, 0x080c, 0xa93a,
+	0x080c, 0x753d, 0x0148, 0x00c6, 0x2061, 0x0100, 0x0016, 0x080c,
+	0x2779, 0x61e2, 0x001e, 0x00ce, 0x00fe, 0x012e, 0x0005, 0x00c6,
+	0x00b6, 0x080c, 0x753d, 0x1118, 0x20a9, 0x0800, 0x0010, 0x20a9,
+	0x0782, 0x080c, 0x753d, 0x1110, 0x900e, 0x0010, 0x2009, 0x007e,
 	0x86ff, 0x0138, 0x9180, 0x1000, 0x2004, 0x905d, 0x0110, 0xb800,
-	0xd0bc, 0x090c, 0x3318, 0x8108, 0x1f04, 0x0af0, 0x707f, 0x0000,
+	0xd0bc, 0x090c, 0x3349, 0x8108, 0x1f04, 0x0af0, 0x707f, 0x0000,
 	0x7080, 0x9084, 0x00ff, 0x7082, 0x70b3, 0x0000, 0x00be, 0x00ce,
 	0x0005, 0x00b6, 0x0126, 0x2091, 0x8000, 0x7000, 0x9086, 0x0002,
-	0x1904, 0x0bc0, 0x70ac, 0x9086, 0xffff, 0x0120, 0x080c, 0x2fe0,
+	0x1904, 0x0bc0, 0x70ac, 0x9086, 0xffff, 0x0120, 0x080c, 0x3011,
 	0x0804, 0x0bc0, 0x70dc, 0xd0ac, 0x1110, 0xd09c, 0x0538, 0xd084,
 	0x0528, 0x0006, 0x2001, 0x0103, 0x2003, 0x002b, 0x000e, 0xd08c,
-	0x01e8, 0x080c, 0x3381, 0x11b0, 0x70e0, 0x9086, 0xffff, 0x0190,
-	0x080c, 0x3175, 0x70dc, 0xd094, 0x1904, 0x0bc0, 0x2011, 0x0001,
-	0x080c, 0xcf84, 0x0110, 0x2011, 0x0003, 0x901e, 0x080c, 0x31af,
+	0x01e8, 0x080c, 0x33b2, 0x11b0, 0x70e0, 0x9086, 0xffff, 0x0190,
+	0x080c, 0x31a6, 0x70dc, 0xd094, 0x1904, 0x0bc0, 0x2011, 0x0001,
+	0x080c, 0xd09b, 0x0110, 0x2011, 0x0003, 0x901e, 0x080c, 0x31e0,
 	0x0804, 0x0bc0, 0x70e4, 0x9005, 0x1904, 0x0bc0, 0x70a8, 0x9005,
 	0x1904, 0x0bc0, 0x70dc, 0xd0a4, 0x0118, 0xd0b4, 0x0904, 0x0bc0,
-	0x080c, 0x6a4c, 0x1904, 0x0bc0, 0x080c, 0x6a9f, 0x1904, 0x0bc0,
-	0x080c, 0x6a86, 0x01c0, 0x0156, 0x00c6, 0x20a9, 0x007f, 0x900e,
-	0x0016, 0x080c, 0x6644, 0x1118, 0xb800, 0xd0ec, 0x1138, 0x001e,
+	0x080c, 0x6a9b, 0x1904, 0x0bc0, 0x080c, 0x6aee, 0x1904, 0x0bc0,
+	0x080c, 0x6ad5, 0x01c0, 0x0156, 0x00c6, 0x20a9, 0x007f, 0x900e,
+	0x0016, 0x080c, 0x6693, 0x1118, 0xb800, 0xd0ec, 0x1138, 0x001e,
 	0x8108, 0x1f04, 0x0b60, 0x00ce, 0x015e, 0x0028, 0x001e, 0x00ce,
 	0x015e, 0x0804, 0x0bc0, 0x0006, 0x2001, 0x0103, 0x2003, 0x002b,
 	0x000e, 0x2011, 0x19b2, 0x080c, 0x0fcf, 0x2011, 0x19cc, 0x080c,
 	0x0fcf, 0x7030, 0xc08c, 0x7032, 0x7003, 0x0003, 0x70af, 0xffff,
-	0x080c, 0x0e86, 0x9006, 0x080c, 0x25d5, 0x080c, 0x3381, 0x0118,
-	0x080c, 0x4cc6, 0x0050, 0x0036, 0x0046, 0x2019, 0xffff, 0x2021,
-	0x0006, 0x080c, 0x4ce0, 0x004e, 0x003e, 0x00f6, 0x2079, 0x0100,
-	0x080c, 0x750f, 0x0150, 0x080c, 0x74ec, 0x7828, 0x0118, 0x9084,
-	0xe1ff, 0x0010, 0x9084, 0xffdf, 0x782a, 0x00fe, 0x080c, 0xa899,
+	0x080c, 0x0e86, 0x9006, 0x080c, 0x2606, 0x080c, 0x33b2, 0x0118,
+	0x080c, 0x4cef, 0x0050, 0x0036, 0x0046, 0x2019, 0xffff, 0x2021,
+	0x0006, 0x080c, 0x4d09, 0x004e, 0x003e, 0x00f6, 0x2079, 0x0100,
+	0x080c, 0x7560, 0x0150, 0x080c, 0x753d, 0x7828, 0x0118, 0x9084,
+	0xe1ff, 0x0010, 0x9084, 0xffdf, 0x782a, 0x00fe, 0x080c, 0xa91e,
 	0x2001, 0x19e7, 0x2004, 0x9086, 0x0005, 0x1120, 0x2011, 0x0000,
-	0x080c, 0xa1be, 0x2011, 0x0000, 0x080c, 0xa1c8, 0x080c, 0xa8b5,
+	0x080c, 0xa243, 0x2011, 0x0000, 0x080c, 0xa24d, 0x080c, 0xa93a,
 	0x012e, 0x00be, 0x0005, 0x0016, 0x0026, 0x0046, 0x00f6, 0x0126,
 	0x2091, 0x8000, 0x2079, 0x0100, 0x7904, 0x918c, 0xfffd, 0x7906,
-	0x2009, 0x00f7, 0x080c, 0x5fc0, 0x7940, 0x918c, 0x0010, 0x7942,
-	0x7924, 0xd1b4, 0x0120, 0x2011, 0x0040, 0x080c, 0x2a83, 0xd19c,
-	0x0120, 0x2011, 0x0008, 0x080c, 0x2a83, 0x0006, 0x0036, 0x0156,
-	0x0000, 0x2001, 0x19a6, 0x2004, 0x9005, 0x1518, 0x080c, 0x2a17,
-	0x1148, 0x2001, 0x0001, 0x080c, 0x297a, 0x2001, 0x0001, 0x080c,
-	0x295d, 0x00b8, 0x080c, 0x2a1f, 0x1138, 0x9006, 0x080c, 0x297a,
-	0x9006, 0x080c, 0x295d, 0x0068, 0x080c, 0x2a27, 0x1d50, 0x2001,
-	0x1997, 0x2004, 0xd0fc, 0x0108, 0x0020, 0x080c, 0x2774, 0x0804,
-	0x0cc1, 0x080c, 0x2aa6, 0x080c, 0x2ad9, 0x20a9, 0x003a, 0x1d04,
-	0x0c17, 0x080c, 0x873d, 0x1f04, 0x0c17, 0x080c, 0x74fd, 0x0148,
-	0x080c, 0x750f, 0x1118, 0x080c, 0x77fe, 0x0050, 0x080c, 0x74f4,
-	0x0dd0, 0x080c, 0x77f9, 0x080c, 0x77ef, 0x080c, 0x741d, 0x0020,
-	0x2009, 0x00f8, 0x080c, 0x5fc0, 0x7850, 0xc0e5, 0x7852, 0x080c,
-	0x74ec, 0x0120, 0x7843, 0x0090, 0x7843, 0x0010, 0x2021, 0xe678,
-	0x2019, 0xea60, 0x0d0c, 0x873d, 0x7820, 0xd09c, 0x15a0, 0x080c,
-	0x74ec, 0x0904, 0x0ca3, 0x7824, 0xd0ac, 0x1904, 0x0cc6, 0x080c,
-	0x750f, 0x1548, 0x0046, 0x2021, 0x0320, 0x8421, 0x1df0, 0x004e,
-	0x2011, 0x1800, 0x080c, 0x2a83, 0x080c, 0x2a2f, 0x7824, 0x9084,
+	0x2009, 0x00f7, 0x080c, 0x600e, 0x7940, 0x918c, 0x0010, 0x7942,
+	0x7924, 0xd1b4, 0x0120, 0x2011, 0x0040, 0x080c, 0x2ab4, 0xd19c,
+	0x0120, 0x2011, 0x0008, 0x080c, 0x2ab4, 0x0006, 0x0036, 0x0156,
+	0x0000, 0x2001, 0x19a6, 0x2004, 0x9005, 0x1518, 0x080c, 0x2a48,
+	0x1148, 0x2001, 0x0001, 0x080c, 0x29ab, 0x2001, 0x0001, 0x080c,
+	0x298e, 0x00b8, 0x080c, 0x2a50, 0x1138, 0x9006, 0x080c, 0x29ab,
+	0x9006, 0x080c, 0x298e, 0x0068, 0x080c, 0x2a58, 0x1d50, 0x2001,
+	0x1997, 0x2004, 0xd0fc, 0x0108, 0x0020, 0x080c, 0x27a5, 0x0804,
+	0x0cc1, 0x080c, 0x2ad7, 0x080c, 0x2b0a, 0x20a9, 0x003a, 0x1d04,
+	0x0c17, 0x080c, 0x87b4, 0x1f04, 0x0c17, 0x080c, 0x754e, 0x0148,
+	0x080c, 0x7560, 0x1118, 0x080c, 0x784f, 0x0050, 0x080c, 0x7545,
+	0x0dd0, 0x080c, 0x784a, 0x080c, 0x7840, 0x080c, 0x746e, 0x0020,
+	0x2009, 0x00f8, 0x080c, 0x600e, 0x7850, 0xc0e5, 0x7852, 0x080c,
+	0x753d, 0x0120, 0x7843, 0x0090, 0x7843, 0x0010, 0x2021, 0xe678,
+	0x2019, 0xea60, 0x0d0c, 0x87b4, 0x7820, 0xd09c, 0x15a0, 0x080c,
+	0x753d, 0x0904, 0x0ca3, 0x7824, 0xd0ac, 0x1904, 0x0cc6, 0x080c,
+	0x7560, 0x1548, 0x0046, 0x2021, 0x0320, 0x8421, 0x1df0, 0x004e,
+	0x2011, 0x1800, 0x080c, 0x2ab4, 0x080c, 0x2a60, 0x7824, 0x9084,
 	0x1800, 0x1168, 0x9484, 0x0fff, 0x1140, 0x2001, 0x1810, 0x2004,
 	0x9084, 0x9000, 0x0110, 0x080c, 0x0ce9, 0x8421, 0x1160, 0x1d04,
-	0x0c73, 0x080c, 0x873d, 0x080c, 0x77f9, 0x080c, 0x77ef, 0x7003,
+	0x0c73, 0x080c, 0x87b4, 0x080c, 0x784a, 0x080c, 0x7840, 0x7003,
 	0x0001, 0x0804, 0x0cc6, 0x8319, 0x1928, 0x2001, 0x1810, 0x2004,
 	0x9084, 0x9000, 0x0110, 0x080c, 0x0ce9, 0x1d04, 0x0c89, 0x080c,
-	0x873d, 0x2009, 0x199a, 0x2104, 0x9005, 0x0118, 0x8001, 0x200a,
-	0x1188, 0x200b, 0x000a, 0x2011, 0x0048, 0x080c, 0x2a83, 0x20a9,
-	0x0002, 0x080c, 0x2a10, 0x7924, 0x080c, 0x2a2f, 0xd19c, 0x0110,
-	0x080c, 0x294b, 0x00f0, 0x080c, 0x74fd, 0x1140, 0x94a2, 0x03e8,
-	0x1128, 0x080c, 0x74c0, 0x7003, 0x0001, 0x00c0, 0x2011, 0x1800,
-	0x080c, 0x2a83, 0x080c, 0x2a2f, 0x7824, 0x080c, 0x7506, 0x0110,
+	0x87b4, 0x2009, 0x199a, 0x2104, 0x9005, 0x0118, 0x8001, 0x200a,
+	0x1188, 0x200b, 0x000a, 0x2011, 0x0048, 0x080c, 0x2ab4, 0x20a9,
+	0x0002, 0x080c, 0x2a41, 0x7924, 0x080c, 0x2a60, 0xd19c, 0x0110,
+	0x080c, 0x297c, 0x00f0, 0x080c, 0x754e, 0x1140, 0x94a2, 0x03e8,
+	0x1128, 0x080c, 0x7511, 0x7003, 0x0001, 0x00c0, 0x2011, 0x1800,
+	0x080c, 0x2ab4, 0x080c, 0x2a60, 0x7824, 0x080c, 0x7557, 0x0110,
 	0xd0ac, 0x1160, 0x9084, 0x1800, 0x0904, 0x0c7b, 0x7003, 0x0001,
-	0x0028, 0x2001, 0x0001, 0x080c, 0x25d5, 0x00a0, 0x7850, 0xc0e4,
+	0x0028, 0x2001, 0x0001, 0x080c, 0x2606, 0x00a0, 0x7850, 0xc0e4,
 	0x7852, 0x2009, 0x180c, 0x210c, 0xd19c, 0x1120, 0x7904, 0x918d,
-	0x0002, 0x7906, 0x2011, 0x0048, 0x080c, 0x2a83, 0x7828, 0x9085,
+	0x0002, 0x7906, 0x2011, 0x0048, 0x080c, 0x2ab4, 0x7828, 0x9085,
 	0x0028, 0x782a, 0x2001, 0x19a6, 0x2003, 0x0000, 0x9006, 0x78f2,
 	0x015e, 0x003e, 0x000e, 0x012e, 0x00fe, 0x004e, 0x002e, 0x001e,
 	0x0005, 0x0006, 0x0016, 0x0026, 0x0036, 0x0046, 0x00b6, 0x00c6,
-	0x00d6, 0x00e6, 0x00f6, 0x0156, 0x0071, 0x0d0c, 0x873d, 0x015e,
+	0x00d6, 0x00e6, 0x00f6, 0x0156, 0x0071, 0x0d0c, 0x87b4, 0x015e,
 	0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x004e, 0x003e, 0x002e,
 	0x001e, 0x000e, 0x0005, 0x00e6, 0x2071, 0x189e, 0x7004, 0x9086,
-	0x0001, 0x1110, 0x080c, 0x34af, 0x00ee, 0x0005, 0x0005, 0x2a70,
-	0x2061, 0x19aa, 0x2063, 0x0003, 0x6007, 0x0003, 0x600b, 0x0002,
+	0x0001, 0x1110, 0x080c, 0x34e0, 0x00ee, 0x0005, 0x0005, 0x2a70,
+	0x2061, 0x19aa, 0x2063, 0x0003, 0x6007, 0x0003, 0x600b, 0x0008,
 	0x600f, 0x0137, 0x2001, 0x197b, 0x900e, 0x2102, 0x7196, 0x2001,
 	0x0100, 0x2004, 0x9082, 0x0002, 0x0218, 0x705f, 0xffff, 0x0008,
-	0x715e, 0x7067, 0xffff, 0x717e, 0x7182, 0x080c, 0xccd1, 0x70ef,
+	0x715e, 0x7067, 0xffff, 0x717e, 0x7182, 0x080c, 0xcde8, 0x70ef,
 	0x00c0, 0x2061, 0x196b, 0x6003, 0x0909, 0x6106, 0x600b, 0x8800,
 	0x600f, 0x0200, 0x6013, 0x00ff, 0x6017, 0x001f, 0x611a, 0x601f,
 	0x07d0, 0x2061, 0x1973, 0x6003, 0x8000, 0x6106, 0x610a, 0x600f,
 	0x0200, 0x6013, 0x00ff, 0x6116, 0x601b, 0x0001, 0x611e, 0x2061,
 	0x1988, 0x6003, 0x514c, 0x6007, 0x4f47, 0x600b, 0x4943, 0x600f,
-	0x2020, 0x2001, 0x182c, 0x2102, 0x0005, 0x9016, 0x080c, 0x6644,
+	0x2020, 0x2001, 0x182c, 0x2102, 0x0005, 0x9016, 0x080c, 0x6693,
 	0x1178, 0xb804, 0x90c4, 0x00ff, 0x98c6, 0x0006, 0x0128, 0x90c4,
 	0xff00, 0x98c6, 0x0600, 0x1120, 0x9186, 0x0080, 0x0108, 0x8210,
 	0x8108, 0x9186, 0x0800, 0x1d50, 0x2208, 0x0005, 0x2091, 0x8000,
@@ -229,30 +229,30 @@
 	0x0d7f, 0x0006, 0x0016, 0x2001, 0x8002, 0x0006, 0x2079, 0x0000,
 	0x000e, 0x7882, 0x7836, 0x001e, 0x798e, 0x000e, 0x788a, 0x000e,
 	0x7886, 0x3900, 0x789a, 0x7833, 0x0012, 0x2091, 0x5000, 0x0156,
-	0x00d6, 0x0036, 0x0026, 0x2079, 0x0300, 0x2069, 0x1b23, 0x7a08,
-	0x226a, 0x2069, 0x1b24, 0x7a18, 0x226a, 0x8d68, 0x7a1c, 0x226a,
-	0x782c, 0x2019, 0x1b31, 0x201a, 0x2019, 0x1b34, 0x9016, 0x7808,
-	0xd09c, 0x0168, 0x7820, 0x201a, 0x8210, 0x8318, 0x9386, 0x1b4d,
+	0x00d6, 0x0036, 0x0026, 0x2079, 0x0300, 0x2069, 0x1b26, 0x7a08,
+	0x226a, 0x2069, 0x1b27, 0x7a18, 0x226a, 0x8d68, 0x7a1c, 0x226a,
+	0x782c, 0x2019, 0x1b34, 0x201a, 0x2019, 0x1b37, 0x9016, 0x7808,
+	0xd09c, 0x0168, 0x7820, 0x201a, 0x8210, 0x8318, 0x9386, 0x1b50,
 	0x0108, 0x0ca8, 0x7808, 0xd09c, 0x0110, 0x2011, 0xdead, 0x2019,
-	0x1b32, 0x782c, 0x201a, 0x8318, 0x221a, 0x7803, 0x0000, 0x2069,
-	0x1a79, 0x901e, 0x20a9, 0x0020, 0x7b26, 0x7a28, 0x226a, 0x8d68,
-	0x8318, 0x1f04, 0x0dcc, 0x2069, 0x1a99, 0x2019, 0x0050, 0x20a9,
+	0x1b35, 0x782c, 0x201a, 0x8318, 0x221a, 0x7803, 0x0000, 0x2069,
+	0x1a7c, 0x901e, 0x20a9, 0x0020, 0x7b26, 0x7a28, 0x226a, 0x8d68,
+	0x8318, 0x1f04, 0x0dcc, 0x2069, 0x1a9c, 0x2019, 0x0050, 0x20a9,
 	0x0020, 0x7b26, 0x7a28, 0x226a, 0x8d68, 0x8318, 0x1f04, 0x0dd9,
 	0x0491, 0x002e, 0x003e, 0x00de, 0x015e, 0x2079, 0x1800, 0x7803,
 	0x0005, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x0180,
 	0x2001, 0x1a21, 0x2004, 0x9005, 0x0128, 0x2001, 0x008b, 0x2004,
 	0xd0fc, 0x0dd8, 0x2001, 0x008a, 0x2003, 0x0002, 0x2003, 0x1001,
-	0x080c, 0x5704, 0x1170, 0x080c, 0x0f20, 0x0110, 0x080c, 0x0e73,
-	0x080c, 0x5704, 0x1130, 0x2071, 0x1800, 0x2011, 0x8000, 0x080c,
+	0x080c, 0x574d, 0x1170, 0x080c, 0x0f20, 0x0110, 0x080c, 0x0e73,
+	0x080c, 0x574d, 0x1130, 0x2071, 0x1800, 0x2011, 0x8000, 0x080c,
 	0x0f34, 0x0c70, 0x0005, 0x2001, 0x0382, 0x2004, 0x9084, 0x0007,
-	0x9086, 0x0001, 0x1120, 0x2001, 0x0015, 0x080c, 0xa88a, 0x2079,
-	0x0380, 0x2069, 0x1b03, 0x7818, 0x6802, 0x781c, 0x6806, 0x7840,
-	0x680a, 0x7844, 0x680e, 0x782c, 0x6812, 0x2019, 0x1b0e, 0x9016,
+	0x9086, 0x0001, 0x1120, 0x2001, 0x0015, 0x080c, 0xa90f, 0x2079,
+	0x0380, 0x2069, 0x1b06, 0x7818, 0x6802, 0x781c, 0x6806, 0x7840,
+	0x680a, 0x7844, 0x680e, 0x782c, 0x6812, 0x2019, 0x1b11, 0x9016,
 	0x7808, 0xd09c, 0x0150, 0x7820, 0x201a, 0x8210, 0x8318, 0x8210,
 	0x9282, 0x0011, 0x0ea8, 0x2011, 0xdead, 0x6a2a, 0x7830, 0x681a,
 	0x7834, 0x681e, 0x7838, 0x6822, 0x783c, 0x6826, 0x7803, 0x0000,
-	0x2069, 0x1ac3, 0x901e, 0x20a9, 0x0020, 0x7b26, 0x7828, 0x206a,
-	0x8d68, 0x8318, 0x1f04, 0x0e4d, 0x2069, 0x1ae3, 0x2019, 0x00b0,
+	0x2069, 0x1ac6, 0x901e, 0x20a9, 0x0020, 0x7b26, 0x7828, 0x206a,
+	0x8d68, 0x8318, 0x1f04, 0x0e4d, 0x2069, 0x1ae6, 0x2019, 0x00b0,
 	0x20a9, 0x0020, 0x7b26, 0x7828, 0x206a, 0x8d68, 0x8318, 0x1f04,
 	0x0e5a, 0x0005, 0x918c, 0x03ff, 0x2001, 0x0003, 0x2004, 0x9084,
 	0x0600, 0x1118, 0x918d, 0x6c00, 0x0010, 0x918d, 0x6400, 0x2001,
@@ -263,11 +263,11 @@
 	0x0007, 0x0118, 0x2011, 0x0947, 0x0010, 0x2011, 0x1b47, 0x080c,
 	0x0f34, 0x002e, 0x0005, 0x2011, 0x010e, 0x2214, 0x9294, 0x0007,
 	0x9296, 0x0007, 0x0118, 0x2011, 0xa880, 0x0010, 0x2011, 0x6840,
-	0xd0e4, 0x70f3, 0x0000, 0x1128, 0x70f3, 0x0fa0, 0x080c, 0x0f25,
+	0xd0e4, 0x70f3, 0x0000, 0x1120, 0x70f3, 0x0fa0, 0x080c, 0x0f25,
 	0x002e, 0x0005, 0x0026, 0x080c, 0x0f20, 0x0148, 0xd0a4, 0x1138,
 	0x2011, 0xcdd5, 0x0010, 0x2011, 0x0080, 0x080c, 0x0f25, 0x002e,
 	0x0005, 0x0026, 0x70f3, 0x0000, 0x080c, 0x0f20, 0x1130, 0x2011,
-	0x8040, 0x080c, 0x0f34, 0x002e, 0x0005, 0x080c, 0x2a27, 0x1118,
+	0x8040, 0x080c, 0x0f34, 0x002e, 0x0005, 0x080c, 0x2a58, 0x1118,
 	0x2011, 0xcdc5, 0x0010, 0x2011, 0xcac2, 0x080c, 0x0f25, 0x002e,
 	0x0005, 0x00e6, 0x0016, 0x0006, 0x2071, 0x1800, 0xd0b4, 0x70ec,
 	0x71e8, 0x1118, 0xc0e4, 0xc1f4, 0x0050, 0x0006, 0x3b00, 0x9084,
@@ -324,7 +324,7 @@
 	0x0cd8, 0x00e6, 0x0126, 0x2091, 0x8000, 0x0016, 0x890e, 0x810e,
 	0x810f, 0x9184, 0x003f, 0xa862, 0x9184, 0xffc0, 0xa85e, 0x001e,
 	0x0020, 0x00e6, 0x0126, 0x2091, 0x8000, 0x2071, 0x1800, 0x702c,
-	0xa802, 0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2, 0x080c, 0x8566,
+	0xa802, 0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2, 0x080c, 0x85ce,
 	0x012e, 0x00ee, 0x0005, 0x2071, 0x1800, 0x9026, 0x2009, 0x0000,
 	0x2049, 0x0400, 0x2900, 0x702e, 0x8940, 0x2800, 0xa802, 0xa95e,
 	0xa863, 0x0001, 0x8420, 0x9886, 0x0440, 0x0120, 0x2848, 0x9188,
@@ -390,15 +390,15 @@
 	0x008e, 0x00de, 0x009e, 0x080c, 0x115b, 0x0005, 0x00de, 0x009e,
 	0x080c, 0x115b, 0x0005, 0xa8a8, 0xd08c, 0x0005, 0x0096, 0xa0a0,
 	0x904d, 0x090c, 0x0d7d, 0xa06c, 0x908e, 0x0100, 0x0130, 0xa87b,
-	0x0030, 0xa883, 0x0000, 0xa897, 0x4002, 0x080c, 0x6d93, 0xa09f,
+	0x0030, 0xa883, 0x0000, 0xa897, 0x4002, 0x080c, 0x6de2, 0xa09f,
 	0x0000, 0xa0a3, 0x0000, 0x2848, 0x080c, 0x1079, 0x009e, 0x0005,
 	0x00a6, 0xa0a0, 0x904d, 0x090c, 0x0d7d, 0xa06c, 0x908e, 0x0100,
 	0x0128, 0xa87b, 0x0001, 0xa883, 0x0000, 0x00c0, 0xa80c, 0x2050,
 	0xb004, 0x9005, 0x0198, 0xa80e, 0x2050, 0x8006, 0x8006, 0x8007,
 	0x908c, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0002, 0xa076, 0xa172,
 	0xb000, 0xa07a, 0x2810, 0x080c, 0x113c, 0x00e8, 0xa97c, 0xa894,
-	0x0016, 0x0006, 0x080c, 0x6d93, 0x000e, 0x001e, 0xd1fc, 0x1138,
-	0xd1f4, 0x0128, 0x00c6, 0x2060, 0x080c, 0xabf0, 0x00ce, 0x7008,
+	0x0016, 0x0006, 0x080c, 0x6de2, 0x000e, 0x001e, 0xd1fc, 0x1138,
+	0xd1f4, 0x0128, 0x00c6, 0x2060, 0x080c, 0xacb0, 0x00ce, 0x7008,
 	0x2048, 0xa89f, 0x0000, 0xa8a3, 0x0000, 0x080c, 0x1079, 0x7007,
 	0x0000, 0x080c, 0x115b, 0x00ae, 0x0005, 0x0126, 0x2091, 0x8000,
 	0x782b, 0x1001, 0x7007, 0x0005, 0x7000, 0xc094, 0x7002, 0x012e,
@@ -407,8 +407,8 @@
 	0x0020, 0x0126, 0x2091, 0x8000, 0x782b, 0x0041, 0x7007, 0x0003,
 	0x7000, 0xc084, 0x7002, 0x2900, 0x700a, 0x012e, 0x009e, 0x0005,
 	0x20e1, 0x0000, 0x2099, 0x0088, 0x782b, 0x0040, 0x0096, 0x2001,
-	0x192e, 0x204c, 0xaa7c, 0x009e, 0x080c, 0x8c34, 0x2009, 0x188c,
-	0x2104, 0x9084, 0xfffc, 0x200a, 0x080c, 0x8aa4, 0x7007, 0x0000,
+	0x192e, 0x204c, 0xaa7c, 0x009e, 0x080c, 0x8cb2, 0x2009, 0x188c,
+	0x2104, 0x9084, 0xfffc, 0x200a, 0x080c, 0x8b18, 0x7007, 0x0000,
 	0x080c, 0x116c, 0x0005, 0x7007, 0x0000, 0x080c, 0x116c, 0x0005,
 	0x0126, 0x2091, 0x2200, 0x2079, 0x0300, 0x2071, 0x1a6a, 0x7003,
 	0x0000, 0x78bf, 0x00f6, 0x0041, 0x7807, 0x0007, 0x7803, 0x0000,
@@ -416,49 +416,49 @@
 	0x0165, 0x2003, 0x4198, 0x7808, 0xd09c, 0x0118, 0x7820, 0x04e9,
 	0x0cd0, 0x2001, 0x1a6b, 0x2003, 0x0000, 0x78ab, 0x0004, 0x78ac,
 	0xd0ac, 0x1de8, 0x78ab, 0x0002, 0x7807, 0x0007, 0x7827, 0x0030,
-	0x782b, 0x0400, 0x7827, 0x0031, 0x782b, 0x1a79, 0x781f, 0xff00,
+	0x782b, 0x0400, 0x7827, 0x0031, 0x782b, 0x1a7c, 0x781f, 0xff00,
 	0x781b, 0xff00, 0x2001, 0x0200, 0x2004, 0xd0dc, 0x0110, 0x781f,
-	0x0303, 0x2061, 0x1a79, 0x602f, 0x1ddc, 0x2001, 0x181a, 0x2004,
-	0x9082, 0x1ddc, 0x6032, 0x603b, 0x1e7a, 0x602b, 0x1ab9, 0x6007,
-	0x1a99, 0x2061, 0x1a99, 0x606f, 0x193c, 0x2001, 0x1927, 0x2004,
-	0x607a, 0x783f, 0x3388, 0x00ce, 0x0005, 0x9086, 0x000d, 0x11d0,
-	0x7808, 0xd09c, 0x01b8, 0x7820, 0x0026, 0x2010, 0x080c, 0xc853,
+	0x0303, 0x2061, 0x1a7c, 0x602f, 0x1ddc, 0x2001, 0x181a, 0x2004,
+	0x9082, 0x1ddc, 0x6032, 0x603b, 0x1eab, 0x602b, 0x1abc, 0x6007,
+	0x1a9c, 0x2061, 0x1a9c, 0x606f, 0x193c, 0x2001, 0x1927, 0x2004,
+	0x607a, 0x783f, 0x33b9, 0x00ce, 0x0005, 0x9086, 0x000d, 0x11d0,
+	0x7808, 0xd09c, 0x01b8, 0x7820, 0x0026, 0x2010, 0x080c, 0xc968,
 	0x0180, 0x2260, 0x6000, 0x9086, 0x0004, 0x1158, 0x0016, 0x6120,
-	0x9186, 0x0009, 0x0108, 0x0020, 0x2009, 0x004c, 0x080c, 0xac8d,
+	0x9186, 0x0009, 0x0108, 0x0020, 0x2009, 0x004c, 0x080c, 0xad4d,
 	0x001e, 0x002e, 0x0005, 0x0126, 0x2091, 0x2200, 0x7908, 0x9184,
 	0x0070, 0x190c, 0x0d76, 0xd19c, 0x05a0, 0x7820, 0x908c, 0xf000,
 	0x0540, 0x2060, 0x6020, 0x9086, 0x0003, 0x1550, 0x6000, 0x9086,
 	0x0004, 0x1530, 0x6114, 0x2148, 0xa876, 0xa87a, 0xa867, 0x0103,
-	0x080c, 0x6bb5, 0x00b6, 0x6010, 0x2058, 0xba3c, 0x8211, 0x0208,
-	0xba3e, 0xb8d0, 0x9005, 0x190c, 0x676f, 0x00be, 0x6044, 0xd0fc,
-	0x190c, 0xa8c2, 0x080c, 0xac19, 0x7808, 0xd09c, 0x19b0, 0x012e,
+	0x080c, 0x6c04, 0x00b6, 0x6010, 0x2058, 0xba3c, 0x8211, 0x0208,
+	0xba3e, 0xb8d0, 0x9005, 0x190c, 0x67be, 0x00be, 0x6044, 0xd0fc,
+	0x190c, 0xa947, 0x080c, 0xacd9, 0x7808, 0xd09c, 0x19b0, 0x012e,
 	0x0005, 0x908a, 0x0024, 0x1a0c, 0x0d7d, 0x002b, 0x012e, 0x0005,
 	0x04b0, 0x012e, 0x0005, 0x141f, 0x1445, 0x1475, 0x147a, 0x147e,
 	0x1483, 0x14ab, 0x14af, 0x14bd, 0x14c1, 0x141f, 0x158e, 0x1592,
-	0x15f7, 0x15fe, 0x141f, 0x15ff, 0x1600, 0x160b, 0x1612, 0x141f,
+	0x1604, 0x160b, 0x141f, 0x160c, 0x160d, 0x1618, 0x161f, 0x141f,
 	0x141f, 0x141f, 0x141f, 0x141f, 0x141f, 0x141f, 0x1485, 0x141f,
 	0x144d, 0x1472, 0x1439, 0x141f, 0x1459, 0x1423, 0x1421, 0x080c,
-	0x0d7d, 0x080c, 0x0d76, 0x080c, 0x161d, 0x2009, 0x1a78, 0x2104,
-	0x8000, 0x200a, 0x080c, 0x7f9c, 0x080c, 0x1adf, 0x0005, 0x6044,
-	0xd0fc, 0x190c, 0xa8c2, 0x2009, 0x0055, 0x080c, 0xac8d, 0x012e,
-	0x0005, 0x080c, 0x161d, 0x2060, 0x6044, 0xd0fc, 0x190c, 0xa8c2,
-	0x2009, 0x0055, 0x080c, 0xac8d, 0x0005, 0x2009, 0x0048, 0x080c,
-	0x161d, 0x2060, 0x080c, 0xac8d, 0x0005, 0x2009, 0x0054, 0x080c,
-	0x161d, 0x2060, 0x6044, 0xd0fc, 0x190c, 0xa8c2, 0x080c, 0xac8d,
-	0x0005, 0x080c, 0x161d, 0x2060, 0x0056, 0x0066, 0x080c, 0x161d,
-	0x2028, 0x080c, 0x161d, 0x2030, 0x0036, 0x0046, 0x2021, 0x0000,
-	0x2418, 0x2009, 0x0056, 0x080c, 0xac8d, 0x004e, 0x003e, 0x006e,
-	0x005e, 0x0005, 0x080c, 0x161d, 0x0005, 0x7004, 0xc085, 0xc0b5,
-	0x7006, 0x0005, 0x7004, 0xc085, 0x7006, 0x0005, 0x080c, 0x161d,
-	0x080c, 0x16e1, 0x0005, 0x080c, 0x0d7d, 0x080c, 0x161d, 0x2060,
+	0x0d7d, 0x080c, 0x0d76, 0x080c, 0x162a, 0x2009, 0x1a78, 0x2104,
+	0x8000, 0x200a, 0x080c, 0x7fed, 0x080c, 0x1b10, 0x0005, 0x6044,
+	0xd0fc, 0x190c, 0xa947, 0x2009, 0x0055, 0x080c, 0xad4d, 0x012e,
+	0x0005, 0x080c, 0x162a, 0x2060, 0x6044, 0xd0fc, 0x190c, 0xa947,
+	0x2009, 0x0055, 0x080c, 0xad4d, 0x0005, 0x2009, 0x0048, 0x080c,
+	0x162a, 0x2060, 0x080c, 0xad4d, 0x0005, 0x2009, 0x0054, 0x080c,
+	0x162a, 0x2060, 0x6044, 0xd0fc, 0x190c, 0xa947, 0x080c, 0xad4d,
+	0x0005, 0x080c, 0x162a, 0x2060, 0x0056, 0x0066, 0x080c, 0x162a,
+	0x2028, 0x080c, 0x162a, 0x2030, 0x0036, 0x0046, 0x2021, 0x0000,
+	0x2418, 0x2009, 0x0056, 0x080c, 0xad4d, 0x004e, 0x003e, 0x006e,
+	0x005e, 0x0005, 0x080c, 0x162a, 0x0005, 0x7004, 0xc085, 0xc0b5,
+	0x7006, 0x0005, 0x7004, 0xc085, 0x7006, 0x0005, 0x080c, 0x162a,
+	0x080c, 0x170b, 0x0005, 0x080c, 0x0d7d, 0x080c, 0x162a, 0x2060,
 	0x6014, 0x0096, 0x2048, 0xa83b, 0xffff, 0x009e, 0x2009, 0x0048,
-	0x080c, 0xac8d, 0x2001, 0x015d, 0x2003, 0x0000, 0x2009, 0x03e8,
+	0x080c, 0xad4d, 0x2001, 0x015d, 0x2003, 0x0000, 0x2009, 0x03e8,
 	0x8109, 0x0160, 0x2001, 0x0201, 0x2004, 0x9005, 0x0dc8, 0x2001,
-	0x0218, 0x2004, 0xd0ec, 0x1110, 0x080c, 0x1622, 0x2001, 0x0307,
+	0x0218, 0x2004, 0xd0ec, 0x1110, 0x080c, 0x162f, 0x2001, 0x0307,
 	0x2003, 0x8000, 0x0005, 0x7004, 0xc095, 0x7006, 0x0005, 0x080c,
-	0x161d, 0x2060, 0x6014, 0x0096, 0x2048, 0xa83b, 0xffff, 0x009e,
-	0x2009, 0x0048, 0x080c, 0xac8d, 0x0005, 0x080c, 0x161d, 0x080c,
-	0x0d7d, 0x080c, 0x161d, 0x080c, 0x1579, 0x7827, 0x0018, 0x79ac,
+	0x162a, 0x2060, 0x6014, 0x0096, 0x2048, 0xa83b, 0xffff, 0x009e,
+	0x2009, 0x0048, 0x080c, 0xad4d, 0x0005, 0x080c, 0x162a, 0x080c,
+	0x0d7d, 0x080c, 0x162a, 0x080c, 0x1579, 0x7827, 0x0018, 0x79ac,
 	0xd1dc, 0x0904, 0x152a, 0x7827, 0x0015, 0x7828, 0x782b, 0x0000,
 	0x9065, 0x0140, 0x2001, 0x020d, 0x2003, 0x0050, 0x2003, 0x0020,
 	0x0804, 0x1530, 0x7004, 0x9005, 0x01c8, 0x1188, 0x78ab, 0x0004,
@@ -467,4808 +467,4825 @@
 	0x0004, 0x7803, 0x0001, 0x080c, 0x1592, 0x0005, 0x7827, 0x0018,
 	0xa001, 0x7828, 0x7827, 0x0011, 0xa001, 0x7928, 0x9106, 0x0110,
 	0x79ac, 0x08e0, 0x00e6, 0x2071, 0x0200, 0x702c, 0xd0c4, 0x0140,
-	0x00ee, 0x080c, 0x1adf, 0x080c, 0x1354, 0x7803, 0x0001, 0x0005,
+	0x00ee, 0x080c, 0x1b10, 0x080c, 0x1354, 0x7803, 0x0001, 0x0005,
 	0x7037, 0x0001, 0xa001, 0x7150, 0x00ee, 0x918c, 0xff00, 0x9186,
 	0x0500, 0x0110, 0x79ac, 0x0810, 0x7004, 0xc09d, 0x7006, 0x78ab,
 	0x0004, 0x7803, 0x0001, 0x080c, 0x1592, 0x2001, 0x020d, 0x2003,
 	0x0020, 0x0005, 0x7828, 0x782b, 0x0000, 0x9065, 0x090c, 0x0d7d,
 	0x6014, 0x2048, 0x78ab, 0x0004, 0x918c, 0x0700, 0x01a8, 0x080c,
-	0x7f9c, 0x080c, 0x1adf, 0x080c, 0xc865, 0x0158, 0xa9ac, 0xa936,
+	0x7fed, 0x080c, 0x1b10, 0x080c, 0xc97a, 0x0158, 0xa9ac, 0xa936,
 	0xa9b0, 0xa93a, 0xa83f, 0xffff, 0xa843, 0xffff, 0xa880, 0xc0bd,
-	0xa882, 0x080c, 0xc453, 0x0005, 0x6020, 0x9086, 0x0009, 0x1128,
-	0x2009, 0x004c, 0x080c, 0xac8d, 0x0048, 0x6010, 0x00b6, 0x2058,
-	0xb800, 0x00be, 0xd0bc, 0x6024, 0x190c, 0xcc66, 0x2029, 0x00c8,
+	0xa882, 0x080c, 0xc566, 0x0005, 0x6020, 0x9086, 0x0009, 0x1128,
+	0x2009, 0x004c, 0x080c, 0xad4d, 0x0048, 0x6010, 0x00b6, 0x2058,
+	0xb800, 0x00be, 0xd0bc, 0x6024, 0x190c, 0xcd7d, 0x2029, 0x00c8,
 	0x8529, 0x0128, 0x2001, 0x0201, 0x2004, 0x9005, 0x0dc8, 0x7dbc,
-	0x080c, 0xe727, 0xd5a4, 0x1118, 0x080c, 0x1622, 0x0005, 0x080c,
-	0x7f9c, 0x080c, 0x1adf, 0x0005, 0x781f, 0x0300, 0x7803, 0x0001,
+	0x080c, 0xe85a, 0xd5a4, 0x1118, 0x080c, 0x162f, 0x0005, 0x080c,
+	0x7fed, 0x080c, 0x1b10, 0x0005, 0x781f, 0x0300, 0x7803, 0x0001,
 	0x0005, 0x0016, 0x0066, 0x0076, 0x00f6, 0x2079, 0x0300, 0x7908,
 	0x918c, 0x0007, 0x9186, 0x0003, 0x0120, 0x2001, 0x0016, 0x080c,
-	0x1693, 0x00fe, 0x007e, 0x006e, 0x001e, 0x0005, 0x7004, 0xc09d,
+	0x16a0, 0x00fe, 0x007e, 0x006e, 0x001e, 0x0005, 0x7004, 0xc09d,
 	0x7006, 0x0005, 0x7104, 0x9184, 0x0004, 0x190c, 0x0d7d, 0xd184,
-	0x1189, 0xd19c, 0x0158, 0xc19c, 0x7106, 0x2001, 0x020d, 0x2003,
-	0x0050, 0x2003, 0x0020, 0x080c, 0x1622, 0x0005, 0x81ff, 0x190c,
-	0x0d7d, 0x0005, 0xc184, 0xd1b4, 0xc1b4, 0x7106, 0x0016, 0x00e6,
-	0x15f0, 0x2071, 0x0200, 0x080c, 0x16ce, 0x05c8, 0x6014, 0x9005,
-	0x05b0, 0x0096, 0x2048, 0xa864, 0x009e, 0x9084, 0x00ff, 0x908e,
-	0x0029, 0x0160, 0x908e, 0x0048, 0x1550, 0x601c, 0xd084, 0x11e0,
-	0x00f6, 0x2c78, 0x080c, 0x174b, 0x00fe, 0x00b0, 0x00f6, 0x2c78,
-	0x080c, 0x18d2, 0x00fe, 0x2009, 0x01f4, 0x8109, 0x0168, 0x2001,
-	0x0201, 0x2004, 0x9005, 0x0dc8, 0x2001, 0x0218, 0x2004, 0xd0ec,
-	0x1118, 0x080c, 0x1622, 0x0040, 0x2001, 0x020d, 0x2003, 0x0020,
-	0x080c, 0x1354, 0x7803, 0x0001, 0x00ee, 0x001e, 0x0005, 0x2001,
-	0x020d, 0x2003, 0x0050, 0x2003, 0x0020, 0x0461, 0x0ca8, 0x0429,
-	0x2060, 0x2009, 0x0053, 0x080c, 0xac8d, 0x0005, 0x0005, 0x0005,
-	0x00e1, 0x2008, 0x00d1, 0x0006, 0x7004, 0xc09d, 0x7006, 0x000e,
-	0x080c, 0x8f93, 0x0005, 0x0089, 0x9005, 0x0118, 0x080c, 0x8b94,
-	0x0cd0, 0x0005, 0x2001, 0x0036, 0x2009, 0x1820, 0x210c, 0x2011,
-	0x181f, 0x2214, 0x080c, 0x1693, 0x0005, 0x7808, 0xd09c, 0x0de8,
-	0x7820, 0x0005, 0x080c, 0x1579, 0x00d6, 0x2069, 0x0200, 0x2009,
-	0x01f4, 0x8109, 0x0510, 0x6804, 0x9005, 0x0dd8, 0x2001, 0x015d,
-	0x2003, 0x0000, 0x79bc, 0xd1a4, 0x1528, 0x79b8, 0x918c, 0x0fff,
-	0x0180, 0x9182, 0x0841, 0x1268, 0x9188, 0x0007, 0x918c, 0x0ff8,
-	0x810c, 0x810c, 0x810c, 0x080c, 0x1685, 0x6827, 0x0001, 0x8109,
-	0x1dd0, 0x04d9, 0x6827, 0x0002, 0x04c1, 0x6804, 0x9005, 0x1130,
-	0x682c, 0xd0e4, 0x1500, 0x6804, 0x9005, 0x0de8, 0x79b8, 0xd1ec,
-	0x1130, 0x08c0, 0x080c, 0x7f9c, 0x080c, 0x1adf, 0x0090, 0x7827,
-	0x0015, 0x782b, 0x0000, 0x7827, 0x0018, 0x782b, 0x0000, 0x2001,
-	0x020d, 0x2003, 0x0020, 0x2001, 0x0307, 0x2003, 0x0300, 0x7803,
-	0x0001, 0x00de, 0x0005, 0x682c, 0x9084, 0x5400, 0x9086, 0x5400,
-	0x0d30, 0x7827, 0x0015, 0x782b, 0x0000, 0x7803, 0x0001, 0x6800,
-	0x9085, 0x1800, 0x6802, 0x00de, 0x0005, 0x6824, 0x9084, 0x0003,
-	0x1de0, 0x0005, 0x2001, 0x0030, 0x2c08, 0x621c, 0x0021, 0x7830,
-	0x9086, 0x0041, 0x0005, 0x00f6, 0x2079, 0x0300, 0x0006, 0x7808,
-	0xd09c, 0x0140, 0x0016, 0x0026, 0x00c6, 0x080c, 0x13bb, 0x00ce,
-	0x002e, 0x001e, 0x000e, 0x0006, 0x7832, 0x7936, 0x7a3a, 0x781b,
-	0x8080, 0x0059, 0x1118, 0x000e, 0x00fe, 0x0005, 0x000e, 0x792c,
-	0x3900, 0x8000, 0x2004, 0x080c, 0x0d7d, 0x2009, 0xff00, 0x8109,
-	0x0120, 0x7818, 0xd0bc, 0x1dd8, 0x0005, 0x9085, 0x0001, 0x0005,
-	0x7832, 0x7936, 0x7a3a, 0x781b, 0x8080, 0x0c79, 0x1108, 0x0005,
-	0x792c, 0x3900, 0x8000, 0x2004, 0x080c, 0x0d7d, 0x7037, 0x0001,
-	0x7150, 0x7037, 0x0002, 0x7050, 0x2060, 0xd1bc, 0x1110, 0x7054,
-	0x2060, 0x918c, 0xff00, 0x9186, 0x0500, 0x0110, 0x9085, 0x0001,
-	0x0005, 0x00e6, 0x0016, 0x2071, 0x0200, 0x0c41, 0x6124, 0xd1dc,
-	0x01f8, 0x701c, 0xd08c, 0x0904, 0x1740, 0x7017, 0x0000, 0x2001,
-	0x0264, 0x2004, 0xd0bc, 0x0904, 0x1740, 0x2001, 0x0268, 0x00c6,
-	0x2064, 0x6104, 0x6038, 0x00ce, 0x918e, 0x0039, 0x1904, 0x1740,
-	0x9c06, 0x15f0, 0x0126, 0x2091, 0x2600, 0x080c, 0x7ef4, 0x012e,
-	0x7358, 0x745c, 0x6014, 0x905d, 0x0598, 0x2b48, 0x6010, 0x00b6,
-	0x2058, 0xb800, 0x00be, 0xd0bc, 0x190c, 0xcc41, 0xab42, 0xac3e,
-	0x2001, 0x1869, 0x2004, 0xd0b4, 0x1170, 0x601c, 0xd0e4, 0x1158,
-	0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x1120, 0xa83b,
-	0x7fff, 0xa837, 0xffff, 0x080c, 0x1e9a, 0x1190, 0x080c, 0x192d,
-	0x2a00, 0xa816, 0x0130, 0x2800, 0xa80e, 0x2c05, 0xa80a, 0x2c00,
-	0xa812, 0x7037, 0x0020, 0x781f, 0x0300, 0x001e, 0x00ee, 0x0005,
-	0x7037, 0x0050, 0x7037, 0x0020, 0x001e, 0x00ee, 0x080c, 0x1622,
-	0x0005, 0x080c, 0x0d7d, 0x2cf0, 0x0126, 0x2091, 0x2200, 0x00c6,
-	0x3e60, 0x6014, 0x2048, 0x2940, 0x903e, 0x2730, 0xa864, 0x2068,
-	0xa81a, 0x9d84, 0x000f, 0x9088, 0x1e7a, 0x2165, 0x0002, 0x1776,
-	0x17e4, 0x1776, 0x1776, 0x177a, 0x17c5, 0x1776, 0x179a, 0x176f,
-	0x17db, 0x1776, 0x1776, 0x177f, 0x18d0, 0x17ae, 0x17a4, 0xa964,
-	0x918c, 0x00ff, 0x918e, 0x0048, 0x0904, 0x17db, 0x9085, 0x0001,
-	0x0804, 0x18c7, 0xa87c, 0xd0ac, 0x0dc8, 0x0804, 0x17eb, 0xa87c,
-	0xd0ac, 0x0da0, 0x0804, 0x1856, 0xa898, 0x901d, 0x1108, 0xab9c,
-	0x9016, 0xaab2, 0xaa3e, 0xaa42, 0x3e00, 0x9080, 0x0008, 0x2004,
-	0x9080, 0x915c, 0x2005, 0x9005, 0x090c, 0x0d7d, 0x2004, 0xa8ae,
-	0x0804, 0x18af, 0xa87c, 0xd0bc, 0x09c8, 0xa890, 0xa842, 0xa88c,
-	0xa83e, 0xa888, 0x0804, 0x17eb, 0xa87c, 0xd0bc, 0x0978, 0xa890,
-	0xa842, 0xa88c, 0xa83e, 0xa888, 0x0804, 0x1856, 0xa87c, 0xd0bc,
-	0x0928, 0xa890, 0xa842, 0xa88c, 0xa83e, 0xa804, 0x9045, 0x090c,
-	0x0d7d, 0xa164, 0xa91a, 0x91ec, 0x000f, 0x9d80, 0x1e7a, 0x2065,
-	0xa888, 0xd19c, 0x1904, 0x1856, 0x0430, 0xa87c, 0xd0ac, 0x0904,
-	0x1776, 0xa804, 0x9045, 0x090c, 0x0d7d, 0xa164, 0xa91a, 0x91ec,
-	0x000f, 0x9d80, 0x1e7a, 0x2065, 0x9006, 0xa842, 0xa83e, 0xd19c,
-	0x1904, 0x1856, 0x0080, 0xa87c, 0xd0ac, 0x0904, 0x1776, 0x9006,
-	0xa842, 0xa83e, 0x0804, 0x1856, 0xa87c, 0xd0ac, 0x0904, 0x1776,
-	0x9006, 0xa842, 0xa83e, 0x2c05, 0x908a, 0x0036, 0x1a0c, 0x0d7d,
-	0x9082, 0x001b, 0x0002, 0x180e, 0x180e, 0x1810, 0x180e, 0x180e,
-	0x180e, 0x181a, 0x180e, 0x180e, 0x180e, 0x1824, 0x180e, 0x180e,
-	0x180e, 0x182e, 0x180e, 0x180e, 0x180e, 0x1838, 0x180e, 0x180e,
-	0x180e, 0x1842, 0x180e, 0x180e, 0x180e, 0x184c, 0x080c, 0x0d7d,
-	0xa574, 0xa478, 0x9d86, 0x0024, 0x0904, 0x1784, 0xa37c, 0xa280,
-	0x0804, 0x18af, 0xa584, 0xa488, 0x9d86, 0x0024, 0x0904, 0x1784,
-	0xa38c, 0xa290, 0x0804, 0x18af, 0xa594, 0xa498, 0x9d86, 0x0024,
-	0x0904, 0x1784, 0xa39c, 0xa2a0, 0x0804, 0x18af, 0xa5a4, 0xa4a8,
-	0x9d86, 0x0024, 0x0904, 0x1784, 0xa3ac, 0xa2b0, 0x0804, 0x18af,
-	0xa5b4, 0xa4b8, 0x9d86, 0x0024, 0x0904, 0x1784, 0xa3bc, 0xa2c0,
-	0x0804, 0x18af, 0xa5c4, 0xa4c8, 0x9d86, 0x0024, 0x0904, 0x1784,
-	0xa3cc, 0xa2d0, 0x0804, 0x18af, 0xa5d4, 0xa4d8, 0x9d86, 0x0024,
-	0x0904, 0x1784, 0xa3dc, 0xa2e0, 0x0804, 0x18af, 0x2c05, 0x908a,
-	0x0034, 0x1a0c, 0x0d7d, 0x9082, 0x001b, 0x0002, 0x1879, 0x1877,
-	0x1877, 0x1877, 0x1877, 0x1877, 0x1884, 0x1877, 0x1877, 0x1877,
-	0x1877, 0x1877, 0x188f, 0x1877, 0x1877, 0x1877, 0x1877, 0x1877,
-	0x189a, 0x1877, 0x1877, 0x1877, 0x1877, 0x1877, 0x18a5, 0x080c,
-	0x0d7d, 0xa56c, 0xa470, 0xa774, 0xa678, 0x9d86, 0x002c, 0x0904,
-	0x1784, 0xa37c, 0xa280, 0x0458, 0xa584, 0xa488, 0xa78c, 0xa690,
-	0x9d86, 0x002c, 0x0904, 0x1784, 0xa394, 0xa298, 0x0400, 0xa59c,
-	0xa4a0, 0xa7a4, 0xa6a8, 0x9d86, 0x002c, 0x0904, 0x1784, 0xa3ac,
-	0xa2b0, 0x00a8, 0xa5b4, 0xa4b8, 0xa7bc, 0xa6c0, 0x9d86, 0x002c,
-	0x0904, 0x1784, 0xa3c4, 0xa2c8, 0x0050, 0xa5cc, 0xa4d0, 0xa7d4,
-	0xa6d8, 0x9d86, 0x002c, 0x0904, 0x1784, 0xa3dc, 0xa2e0, 0xab2e,
-	0xaa32, 0xad1e, 0xac22, 0xaf26, 0xae2a, 0xa988, 0x8c60, 0x2c1d,
-	0xa8ac, 0xaab0, 0xa836, 0xaa3a, 0x8109, 0xa916, 0x1158, 0x3e60,
-	0x601c, 0xc085, 0x601e, 0xa87c, 0xc0dd, 0xa87e, 0x9006, 0x00ce,
-	0x012e, 0x0005, 0x2800, 0xa80e, 0xab0a, 0x2c00, 0xa812, 0x0c78,
-	0x0804, 0x1776, 0x2ff0, 0x0126, 0x2091, 0x2200, 0x00c6, 0x3e60,
-	0x6014, 0x2048, 0x2940, 0xa80e, 0x2061, 0x1e75, 0xa813, 0x1e75,
+	0x11b1, 0xd19c, 0x0180, 0xc19c, 0x7106, 0x0016, 0x080c, 0x16ee,
+	0x001e, 0x0148, 0x2001, 0x020d, 0x2003, 0x0050, 0x2003, 0x0020,
+	0x080c, 0x162f, 0x0005, 0x81ff, 0x190c, 0x0d7d, 0x0005, 0x2100,
+	0xc184, 0xc1b4, 0x7106, 0xd0b4, 0x0016, 0x00e6, 0x1904, 0x15f9,
+	0x2071, 0x0200, 0x080c, 0x16db, 0x05e0, 0x080c, 0x16ee, 0x05b0,
+	0x6014, 0x9005, 0x05b0, 0x0096, 0x2048, 0xa864, 0x009e, 0x9084,
+	0x00ff, 0x908e, 0x0029, 0x0160, 0x908e, 0x0048, 0x1550, 0x601c,
+	0xd084, 0x11e0, 0x00f6, 0x2c78, 0x080c, 0x1778, 0x00fe, 0x00b0,
+	0x00f6, 0x2c78, 0x080c, 0x1901, 0x00fe, 0x2009, 0x01f4, 0x8109,
+	0x0168, 0x2001, 0x0201, 0x2004, 0x9005, 0x0dc8, 0x2001, 0x0218,
+	0x2004, 0xd0ec, 0x1118, 0x080c, 0x162f, 0x0040, 0x2001, 0x020d,
+	0x2003, 0x0020, 0x080c, 0x1354, 0x7803, 0x0001, 0x00ee, 0x001e,
+	0x0005, 0x080c, 0x16ee, 0x0dd0, 0x2001, 0x020d, 0x2003, 0x0050,
+	0x2003, 0x0020, 0x0461, 0x0c90, 0x0429, 0x2060, 0x2009, 0x0053,
+	0x080c, 0xad4d, 0x0005, 0x0005, 0x0005, 0x00e1, 0x2008, 0x00d1,
+	0x0006, 0x7004, 0xc09d, 0x7006, 0x000e, 0x080c, 0x9003, 0x0005,
+	0x0089, 0x9005, 0x0118, 0x080c, 0x8c0a, 0x0cd0, 0x0005, 0x2001,
+	0x0036, 0x2009, 0x1820, 0x210c, 0x2011, 0x181f, 0x2214, 0x080c,
+	0x16a0, 0x0005, 0x7808, 0xd09c, 0x0de8, 0x7820, 0x0005, 0x080c,
+	0x1579, 0x00d6, 0x2069, 0x0200, 0x2009, 0x01f4, 0x8109, 0x0510,
+	0x6804, 0x9005, 0x0dd8, 0x2001, 0x015d, 0x2003, 0x0000, 0x79bc,
+	0xd1a4, 0x1528, 0x79b8, 0x918c, 0x0fff, 0x0180, 0x9182, 0x0841,
+	0x1268, 0x9188, 0x0007, 0x918c, 0x0ff8, 0x810c, 0x810c, 0x810c,
+	0x080c, 0x1692, 0x6827, 0x0001, 0x8109, 0x1dd0, 0x04d9, 0x6827,
+	0x0002, 0x04c1, 0x6804, 0x9005, 0x1130, 0x682c, 0xd0e4, 0x1500,
+	0x6804, 0x9005, 0x0de8, 0x79b8, 0xd1ec, 0x1130, 0x08c0, 0x080c,
+	0x7fed, 0x080c, 0x1b10, 0x0090, 0x7827, 0x0015, 0x782b, 0x0000,
+	0x7827, 0x0018, 0x782b, 0x0000, 0x2001, 0x020d, 0x2003, 0x0020,
+	0x2001, 0x0307, 0x2003, 0x0300, 0x7803, 0x0001, 0x00de, 0x0005,
+	0x682c, 0x9084, 0x5400, 0x9086, 0x5400, 0x0d30, 0x7827, 0x0015,
+	0x782b, 0x0000, 0x7803, 0x0001, 0x6800, 0x9085, 0x1800, 0x6802,
+	0x00de, 0x0005, 0x6824, 0x9084, 0x0003, 0x1de0, 0x0005, 0x2001,
+	0x0030, 0x2c08, 0x621c, 0x0021, 0x7830, 0x9086, 0x0041, 0x0005,
+	0x00f6, 0x2079, 0x0300, 0x0006, 0x7808, 0xd09c, 0x0140, 0x0016,
+	0x0026, 0x00c6, 0x080c, 0x13bb, 0x00ce, 0x002e, 0x001e, 0x000e,
+	0x0006, 0x7832, 0x7936, 0x7a3a, 0x781b, 0x8080, 0x0059, 0x1118,
+	0x000e, 0x00fe, 0x0005, 0x000e, 0x792c, 0x3900, 0x8000, 0x2004,
+	0x080c, 0x0d7d, 0x2009, 0xff00, 0x8109, 0x0120, 0x7818, 0xd0bc,
+	0x1dd8, 0x0005, 0x9085, 0x0001, 0x0005, 0x7832, 0x7936, 0x7a3a,
+	0x781b, 0x8080, 0x0c79, 0x1108, 0x0005, 0x792c, 0x3900, 0x8000,
+	0x2004, 0x080c, 0x0d7d, 0x7037, 0x0001, 0x7150, 0x7037, 0x0002,
+	0x7050, 0x2060, 0xd1bc, 0x1110, 0x7054, 0x2060, 0x918c, 0xff00,
+	0x9186, 0x0500, 0x0110, 0x9085, 0x0001, 0x0005, 0x0006, 0x0046,
+	0x00e6, 0x2071, 0x0200, 0x7037, 0x0002, 0x7058, 0x9084, 0xff00,
+	0x8007, 0x9086, 0x00bc, 0x1158, 0x2021, 0x1a79, 0x2404, 0x8000,
+	0x0208, 0x2022, 0x080c, 0x7fed, 0x080c, 0x1b10, 0x9006, 0x00ee,
+	0x004e, 0x000e, 0x0005, 0x0c11, 0x1108, 0x0005, 0x00e6, 0x0016,
+	0x2071, 0x0200, 0x0841, 0x6124, 0xd1dc, 0x01f8, 0x701c, 0xd08c,
+	0x0904, 0x176d, 0x7017, 0x0000, 0x2001, 0x0264, 0x2004, 0xd0bc,
+	0x0904, 0x176d, 0x2001, 0x0268, 0x00c6, 0x2064, 0x6104, 0x6038,
+	0x00ce, 0x918e, 0x0039, 0x1904, 0x176d, 0x9c06, 0x15f0, 0x0126,
+	0x2091, 0x2600, 0x080c, 0x7f45, 0x012e, 0x7358, 0x745c, 0x6014,
+	0x905d, 0x0598, 0x2b48, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be,
+	0xd0bc, 0x190c, 0xcd58, 0xab42, 0xac3e, 0x2001, 0x1869, 0x2004,
+	0xd0b4, 0x1170, 0x601c, 0xd0e4, 0x1158, 0x6010, 0x00b6, 0x2058,
+	0xb800, 0x00be, 0xd0bc, 0x1120, 0xa83b, 0x7fff, 0xa837, 0xffff,
+	0x080c, 0x1ecb, 0x1190, 0x080c, 0x195e, 0x2a00, 0xa816, 0x0130,
+	0x2800, 0xa80e, 0x2c05, 0xa80a, 0x2c00, 0xa812, 0x7037, 0x0020,
+	0x781f, 0x0300, 0x001e, 0x00ee, 0x0005, 0x7037, 0x0050, 0x7037,
+	0x0020, 0x001e, 0x00ee, 0x080c, 0x162f, 0x0005, 0x080c, 0x0d7d,
+	0x2cf0, 0x0126, 0x2091, 0x2200, 0x0016, 0x00c6, 0x3e60, 0x6014,
+	0x2048, 0x2940, 0x903e, 0x2730, 0xa864, 0x2068, 0xa81a, 0x9d84,
+	0x000f, 0x9088, 0x1eab, 0x2165, 0x0002, 0x17a4, 0x1812, 0x17a4,
+	0x17a4, 0x17a8, 0x17f3, 0x17a4, 0x17c8, 0x179d, 0x1809, 0x17a4,
+	0x17a4, 0x17ad, 0x18ff, 0x17dc, 0x17d2, 0xa964, 0x918c, 0x00ff,
+	0x918e, 0x0048, 0x0904, 0x1809, 0x9085, 0x0001, 0x0804, 0x18f5,
+	0xa87c, 0xd0ac, 0x0dc8, 0x0804, 0x1819, 0xa87c, 0xd0ac, 0x0da0,
+	0x0804, 0x1884, 0xa898, 0x901d, 0x1108, 0xab9c, 0x9016, 0xaab2,
+	0xaa3e, 0xaa42, 0x3e00, 0x9080, 0x0008, 0x2004, 0x9080, 0x91d3,
+	0x2005, 0x9005, 0x090c, 0x0d7d, 0x2004, 0xa8ae, 0x0804, 0x18dd,
+	0xa87c, 0xd0bc, 0x09c8, 0xa890, 0xa842, 0xa88c, 0xa83e, 0xa888,
+	0x0804, 0x1819, 0xa87c, 0xd0bc, 0x0978, 0xa890, 0xa842, 0xa88c,
+	0xa83e, 0xa888, 0x0804, 0x1884, 0xa87c, 0xd0bc, 0x0928, 0xa890,
+	0xa842, 0xa88c, 0xa83e, 0xa804, 0x9045, 0x090c, 0x0d7d, 0xa164,
+	0xa91a, 0x91ec, 0x000f, 0x9d80, 0x1eab, 0x2065, 0xa888, 0xd19c,
+	0x1904, 0x1884, 0x0430, 0xa87c, 0xd0ac, 0x0904, 0x17a4, 0xa804,
+	0x9045, 0x090c, 0x0d7d, 0xa164, 0xa91a, 0x91ec, 0x000f, 0x9d80,
+	0x1eab, 0x2065, 0x9006, 0xa842, 0xa83e, 0xd19c, 0x1904, 0x1884,
+	0x0080, 0xa87c, 0xd0ac, 0x0904, 0x17a4, 0x9006, 0xa842, 0xa83e,
+	0x0804, 0x1884, 0xa87c, 0xd0ac, 0x0904, 0x17a4, 0x9006, 0xa842,
+	0xa83e, 0x2c05, 0x908a, 0x0036, 0x1a0c, 0x0d7d, 0x9082, 0x001b,
+	0x0002, 0x183c, 0x183c, 0x183e, 0x183c, 0x183c, 0x183c, 0x1848,
+	0x183c, 0x183c, 0x183c, 0x1852, 0x183c, 0x183c, 0x183c, 0x185c,
+	0x183c, 0x183c, 0x183c, 0x1866, 0x183c, 0x183c, 0x183c, 0x1870,
+	0x183c, 0x183c, 0x183c, 0x187a, 0x080c, 0x0d7d, 0xa574, 0xa478,
+	0x9d86, 0x0024, 0x0904, 0x17b2, 0xa37c, 0xa280, 0x0804, 0x18dd,
+	0xa584, 0xa488, 0x9d86, 0x0024, 0x0904, 0x17b2, 0xa38c, 0xa290,
+	0x0804, 0x18dd, 0xa594, 0xa498, 0x9d86, 0x0024, 0x0904, 0x17b2,
+	0xa39c, 0xa2a0, 0x0804, 0x18dd, 0xa5a4, 0xa4a8, 0x9d86, 0x0024,
+	0x0904, 0x17b2, 0xa3ac, 0xa2b0, 0x0804, 0x18dd, 0xa5b4, 0xa4b8,
+	0x9d86, 0x0024, 0x0904, 0x17b2, 0xa3bc, 0xa2c0, 0x0804, 0x18dd,
+	0xa5c4, 0xa4c8, 0x9d86, 0x0024, 0x0904, 0x17b2, 0xa3cc, 0xa2d0,
+	0x0804, 0x18dd, 0xa5d4, 0xa4d8, 0x9d86, 0x0024, 0x0904, 0x17b2,
+	0xa3dc, 0xa2e0, 0x0804, 0x18dd, 0x2c05, 0x908a, 0x0034, 0x1a0c,
+	0x0d7d, 0x9082, 0x001b, 0x0002, 0x18a7, 0x18a5, 0x18a5, 0x18a5,
+	0x18a5, 0x18a5, 0x18b2, 0x18a5, 0x18a5, 0x18a5, 0x18a5, 0x18a5,
+	0x18bd, 0x18a5, 0x18a5, 0x18a5, 0x18a5, 0x18a5, 0x18c8, 0x18a5,
+	0x18a5, 0x18a5, 0x18a5, 0x18a5, 0x18d3, 0x080c, 0x0d7d, 0xa56c,
+	0xa470, 0xa774, 0xa678, 0x9d86, 0x002c, 0x0904, 0x17b2, 0xa37c,
+	0xa280, 0x0458, 0xa584, 0xa488, 0xa78c, 0xa690, 0x9d86, 0x002c,
+	0x0904, 0x17b2, 0xa394, 0xa298, 0x0400, 0xa59c, 0xa4a0, 0xa7a4,
+	0xa6a8, 0x9d86, 0x002c, 0x0904, 0x17b2, 0xa3ac, 0xa2b0, 0x00a8,
+	0xa5b4, 0xa4b8, 0xa7bc, 0xa6c0, 0x9d86, 0x002c, 0x0904, 0x17b2,
+	0xa3c4, 0xa2c8, 0x0050, 0xa5cc, 0xa4d0, 0xa7d4, 0xa6d8, 0x9d86,
+	0x002c, 0x0904, 0x17b2, 0xa3dc, 0xa2e0, 0xab2e, 0xaa32, 0xad1e,
+	0xac22, 0xaf26, 0xae2a, 0xa988, 0x8c60, 0x2c1d, 0xa8ac, 0xaab0,
+	0xa836, 0xaa3a, 0x8109, 0xa916, 0x1160, 0x3e60, 0x601c, 0xc085,
+	0x601e, 0xa87c, 0xc0dd, 0xa87e, 0x9006, 0x00ce, 0x001e, 0x012e,
+	0x0005, 0x2800, 0xa80e, 0xab0a, 0x2c00, 0xa812, 0x0c70, 0x0804,
+	0x17a4, 0x2ff0, 0x0126, 0x2091, 0x2200, 0x0016, 0x00c6, 0x3e60,
+	0x6014, 0x2048, 0x2940, 0xa80e, 0x2061, 0x1ea6, 0xa813, 0x1ea6,
 	0x2c05, 0xa80a, 0xa964, 0xa91a, 0xa87c, 0xd0ac, 0x090c, 0x0d7d,
 	0x9006, 0xa842, 0xa83e, 0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0d7d,
 	0xadcc, 0xacd0, 0xafd4, 0xaed8, 0xabdc, 0xaae0, 0xab2e, 0xaa32,
 	0xad1e, 0xac22, 0xaf26, 0xae2a, 0xa8ac, 0xaab0, 0xa836, 0xaa3a,
 	0xa988, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0008, 0x1120, 0x8109,
-	0xa916, 0x0128, 0x0078, 0x918a, 0x0002, 0xa916, 0x1158, 0x3e60,
+	0xa916, 0x0128, 0x0080, 0x918a, 0x0002, 0xa916, 0x1160, 0x3e60,
 	0x601c, 0xc085, 0x601e, 0xa87c, 0xc0dd, 0xa87e, 0x9006, 0x00ce,
-	0x012e, 0x0005, 0xa804, 0x9045, 0x090c, 0x0d7d, 0xa80e, 0xa064,
-	0xa81a, 0x9084, 0x000f, 0x9080, 0x1e7a, 0x2015, 0x82ff, 0x090c,
-	0x0d7d, 0xaa12, 0x2205, 0xa80a, 0x0c10, 0x903e, 0x2730, 0xa880,
-	0xd0fc, 0x1190, 0x2d00, 0x0002, 0x1a57, 0x1984, 0x1984, 0x1a57,
-	0x1984, 0x1a51, 0x1a57, 0x1984, 0x19f4, 0x19f4, 0x19f4, 0x1a57,
-	0x19f4, 0x1a57, 0x1a4e, 0x19f4, 0xc0fc, 0xa882, 0xab2c, 0xaa30,
-	0xad1c, 0xac20, 0xdd9c, 0x0904, 0x1a59, 0x2c05, 0x908a, 0x0034,
-	0x1a0c, 0x0d7d, 0x9082, 0x001b, 0x0002, 0x1970, 0x196e, 0x196e,
-	0x196e, 0x196e, 0x196e, 0x1974, 0x196e, 0x196e, 0x196e, 0x196e,
-	0x196e, 0x1978, 0x196e, 0x196e, 0x196e, 0x196e, 0x196e, 0x197c,
-	0x196e, 0x196e, 0x196e, 0x196e, 0x196e, 0x1980, 0x080c, 0x0d7d,
-	0xa774, 0xa678, 0x0804, 0x1a59, 0xa78c, 0xa690, 0x0804, 0x1a59,
-	0xa7a4, 0xa6a8, 0x0804, 0x1a59, 0xa7bc, 0xa6c0, 0x0804, 0x1a59,
-	0xa7d4, 0xa6d8, 0x0804, 0x1a59, 0xa898, 0x901d, 0x1108, 0xab9c,
-	0x9016, 0x2c05, 0x908a, 0x0036, 0x1a0c, 0x0d7d, 0x9082, 0x001b,
-	0x0002, 0x19ac, 0x19ac, 0x19ae, 0x19ac, 0x19ac, 0x19ac, 0x19b8,
-	0x19ac, 0x19ac, 0x19ac, 0x19c2, 0x19ac, 0x19ac, 0x19ac, 0x19cc,
-	0x19ac, 0x19ac, 0x19ac, 0x19d6, 0x19ac, 0x19ac, 0x19ac, 0x19e0,
-	0x19ac, 0x19ac, 0x19ac, 0x19ea, 0x080c, 0x0d7d, 0xa574, 0xa478,
-	0x9d86, 0x0004, 0x0904, 0x1a59, 0xa37c, 0xa280, 0x0804, 0x1a59,
-	0xa584, 0xa488, 0x9d86, 0x0004, 0x0904, 0x1a59, 0xa38c, 0xa290,
-	0x0804, 0x1a59, 0xa594, 0xa498, 0x9d86, 0x0004, 0x0904, 0x1a59,
-	0xa39c, 0xa2a0, 0x0804, 0x1a59, 0xa5a4, 0xa4a8, 0x9d86, 0x0004,
-	0x0904, 0x1a59, 0xa3ac, 0xa2b0, 0x0804, 0x1a59, 0xa5b4, 0xa4b8,
-	0x9d86, 0x0004, 0x0904, 0x1a59, 0xa3bc, 0xa2c0, 0x0804, 0x1a59,
-	0xa5c4, 0xa4c8, 0x9d86, 0x0004, 0x0904, 0x1a59, 0xa3cc, 0xa2d0,
-	0x0804, 0x1a59, 0xa5d4, 0xa4d8, 0x9d86, 0x0004, 0x0904, 0x1a59,
-	0xa3dc, 0xa2e0, 0x0804, 0x1a59, 0xa898, 0x901d, 0x1108, 0xab9c,
-	0x9016, 0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0d7d, 0x9082, 0x001b,
-	0x0002, 0x1a1c, 0x1a1a, 0x1a1a, 0x1a1a, 0x1a1a, 0x1a1a, 0x1a26,
-	0x1a1a, 0x1a1a, 0x1a1a, 0x1a1a, 0x1a1a, 0x1a30, 0x1a1a, 0x1a1a,
-	0x1a1a, 0x1a1a, 0x1a1a, 0x1a3a, 0x1a1a, 0x1a1a, 0x1a1a, 0x1a1a,
-	0x1a1a, 0x1a44, 0x080c, 0x0d7d, 0xa56c, 0xa470, 0xa774, 0xa678,
-	0x9d86, 0x000c, 0x05b0, 0xa37c, 0xa280, 0x0498, 0xa584, 0xa488,
-	0xa78c, 0xa690, 0x9d86, 0x000c, 0x0560, 0xa394, 0xa298, 0x0448,
-	0xa59c, 0xa4a0, 0xa7a4, 0xa6a8, 0x9d86, 0x000c, 0x0510, 0xa3ac,
-	0xa2b0, 0x00f8, 0xa5b4, 0xa4b8, 0xa7bc, 0xa6c0, 0x9d86, 0x000c,
-	0x01c0, 0xa3c4, 0xa2c8, 0x00a8, 0xa5cc, 0xa4d0, 0xa7d4, 0xa6d8,
-	0x9d86, 0x000c, 0x0170, 0xa3dc, 0xa2e0, 0x0058, 0x9d86, 0x000e,
-	0x1130, 0x080c, 0x1e50, 0x1904, 0x192d, 0x900e, 0x0050, 0x080c,
-	0x0d7d, 0xab2e, 0xaa32, 0xad1e, 0xac22, 0xaf26, 0xae2a, 0x080c,
-	0x1e50, 0x0005, 0x6014, 0x2048, 0x6118, 0x810c, 0x810c, 0x810c,
-	0x81ff, 0x1118, 0xa887, 0x0001, 0x0008, 0xa986, 0x601b, 0x0002,
-	0xa874, 0x9084, 0x00ff, 0x9084, 0x0008, 0x0150, 0x00e9, 0x6000,
-	0x9086, 0x0004, 0x1120, 0x2009, 0x0048, 0x080c, 0xac8d, 0x0005,
-	0xa974, 0xd1dc, 0x1108, 0x0005, 0xa934, 0xa88c, 0x9106, 0x1158,
-	0xa938, 0xa890, 0x9106, 0x1138, 0x601c, 0xc084, 0x601e, 0x2009,
-	0x0048, 0x0804, 0xac8d, 0x0005, 0x0126, 0x00c6, 0x2091, 0x2200,
-	0x00ce, 0x7908, 0x918c, 0x0007, 0x9186, 0x0000, 0x05b0, 0x9186,
-	0x0003, 0x0598, 0x6020, 0x6023, 0x0000, 0x0006, 0x2031, 0x0008,
-	0x00c6, 0x781f, 0x0808, 0x7808, 0xd09c, 0x0120, 0x080c, 0x13bb,
-	0x8631, 0x1db8, 0x00ce, 0x781f, 0x0800, 0x2031, 0x0168, 0x00c6,
-	0x7808, 0xd09c, 0x190c, 0x13bb, 0x00ce, 0x2001, 0x0038, 0x080c,
-	0x1b67, 0x7930, 0x9186, 0x0040, 0x0160, 0x9186, 0x0042, 0x190c,
-	0x0d7d, 0x2001, 0x001e, 0x8001, 0x1df0, 0x8631, 0x1d40, 0x080c,
-	0x1b76, 0x000e, 0x6022, 0x012e, 0x0005, 0x080c, 0x1b63, 0x7827,
-	0x0015, 0x7828, 0x9c06, 0x1db8, 0x782b, 0x0000, 0x0ca0, 0x00f6,
-	0x2079, 0x0300, 0x7803, 0x0000, 0x78ab, 0x0004, 0x00fe, 0x080c,
-	0x74ec, 0x1188, 0x2001, 0x0138, 0x2003, 0x0000, 0x2001, 0x0160,
-	0x2003, 0x0000, 0x2011, 0x012c, 0xa001, 0xa001, 0x8211, 0x1de0,
-	0x0059, 0x0804, 0x7591, 0x0479, 0x0039, 0x2001, 0x0160, 0x2502,
-	0x2001, 0x0138, 0x2202, 0x0005, 0x00e6, 0x2071, 0x0200, 0x080c,
-	0x2a3b, 0x2009, 0x003c, 0x080c, 0x21d9, 0x2001, 0x015d, 0x2003,
-	0x0000, 0x7000, 0x9084, 0x003c, 0x1de0, 0x080c, 0x8566, 0x70a0,
-	0x70a2, 0x7098, 0x709a, 0x709c, 0x709e, 0x2001, 0x020d, 0x2003,
-	0x0020, 0x00f6, 0x2079, 0x0300, 0x080c, 0x1354, 0x7803, 0x0001,
-	0x00fe, 0x00ee, 0x0005, 0x2001, 0x0138, 0x2014, 0x2003, 0x0000,
-	0x2001, 0x0160, 0x202c, 0x2003, 0x0000, 0x080c, 0x74ec, 0x1108,
-	0x0005, 0x2021, 0x0260, 0x2001, 0x0141, 0x201c, 0xd3dc, 0x1168,
-	0x2001, 0x0109, 0x201c, 0x939c, 0x0048, 0x1160, 0x2001, 0x0111,
-	0x201c, 0x83ff, 0x1110, 0x8421, 0x1d70, 0x2001, 0x015d, 0x2003,
-	0x0000, 0x0005, 0x0046, 0x2021, 0x0019, 0x2003, 0x0048, 0xa001,
-	0xa001, 0x201c, 0x939c, 0x0048, 0x0120, 0x8421, 0x1db0, 0x004e,
-	0x0c60, 0x004e, 0x0c40, 0x601c, 0xc084, 0x601e, 0x0005, 0x2c08,
-	0x621c, 0x080c, 0x1693, 0x7930, 0x0005, 0x2c08, 0x621c, 0x080c,
-	0x16c0, 0x7930, 0x0005, 0x8001, 0x1df0, 0x0005, 0x2031, 0x0005,
-	0x781c, 0x9084, 0x0007, 0x0170, 0x2001, 0x0038, 0x0c41, 0x9186,
-	0x0040, 0x0904, 0x1bd4, 0x2001, 0x001e, 0x0c69, 0x8631, 0x1d80,
-	0x080c, 0x0d7d, 0x781f, 0x0202, 0x2001, 0x015d, 0x2003, 0x0000,
-	0x2001, 0x0b10, 0x0c01, 0x781c, 0xd084, 0x0110, 0x0861, 0x04e0,
-	0x2001, 0x0030, 0x0891, 0x9186, 0x0040, 0x0568, 0x781c, 0xd084,
-	0x1da8, 0x781f, 0x0101, 0x2001, 0x0014, 0x0869, 0x2001, 0x0037,
-	0x0821, 0x9186, 0x0040, 0x0140, 0x2001, 0x0030, 0x080c, 0x1b6d,
-	0x9186, 0x0040, 0x190c, 0x0d7d, 0x00d6, 0x2069, 0x0200, 0x692c,
-	0xd1f4, 0x1170, 0xd1c4, 0x0160, 0xd19c, 0x0130, 0x6800, 0x9085,
-	0x1800, 0x6802, 0x00de, 0x0080, 0x6908, 0x9184, 0x0007, 0x1db0,
-	0x00de, 0x781f, 0x0100, 0x791c, 0x9184, 0x0007, 0x090c, 0x0d7d,
-	0xa001, 0xa001, 0x781f, 0x0200, 0x0005, 0x0126, 0x2091, 0x2400,
-	0x2079, 0x0380, 0x2001, 0x19e6, 0x2070, 0x012e, 0x0005, 0x2cf0,
-	0x0126, 0x2091, 0x2400, 0x3e60, 0x6014, 0x2048, 0xa964, 0xa91a,
-	0x918c, 0x00ff, 0x9184, 0x000f, 0x0002, 0x1c09, 0x1c09, 0x1c09,
-	0x1c0b, 0x1c09, 0x1c09, 0x1c09, 0x1c09, 0x1bfd, 0x1c13, 0x1c09,
-	0x1c0f, 0x1c09, 0x1c09, 0x1c09, 0x1c09, 0x9086, 0x0008, 0x1148,
-	0xa87c, 0xd0b4, 0x0904, 0x1d83, 0x2011, 0x1e75, 0x2205, 0xab88,
-	0x00a8, 0x080c, 0x0d7d, 0x9186, 0x0013, 0x0128, 0x0cd0, 0x9186,
-	0x001b, 0x0108, 0x0cb0, 0xa87c, 0xd0b4, 0x0904, 0x1d83, 0x9184,
-	0x000f, 0x9080, 0x1e7a, 0x2015, 0x2205, 0xab88, 0x2908, 0xa80a,
-	0xa90e, 0xaa12, 0xab16, 0x9006, 0xa842, 0xa83e, 0x012e, 0x0005,
-	0x2cf0, 0x0126, 0x2091, 0x2400, 0x3e60, 0x6014, 0x2048, 0xa88c,
-	0xa990, 0xaaac, 0xabb0, 0xaa36, 0xab3a, 0xa83e, 0xa942, 0xa846,
-	0xa94a, 0xa964, 0x918c, 0x00ff, 0x9186, 0x001e, 0x0198, 0x2940,
-	0xa064, 0xa81a, 0x90ec, 0x000f, 0x9d80, 0x1e7a, 0x2065, 0x2c05,
-	0x2808, 0x2c10, 0xab88, 0xa80a, 0xa90e, 0xaa12, 0xab16, 0x012e,
-	0x3e60, 0x0005, 0xa804, 0x2040, 0x0c58, 0x2cf0, 0x0126, 0x2091,
-	0x2400, 0x3e60, 0x6014, 0x2048, 0xa97c, 0x2950, 0xd1dc, 0x1904,
-	0x1d4d, 0xc1dd, 0xa97e, 0x9006, 0xa842, 0xa83e, 0xa988, 0x8109,
-	0xa916, 0xa964, 0xa91a, 0x9184, 0x000f, 0x9088, 0x1e7a, 0x2145,
-	0x0002, 0x1c81, 0x1c8f, 0x1c81, 0x1c81, 0x1c81, 0x1c83, 0x1c81,
-	0x1c81, 0x1ce4, 0x1ce4, 0x1c81, 0x1c81, 0x1c81, 0x1ce2, 0x1c81,
-	0x1c81, 0x080c, 0x0d7d, 0xa804, 0x2050, 0xb164, 0xa91a, 0x9184,
-	0x000f, 0x9080, 0x1e7a, 0x2045, 0xd19c, 0x1904, 0x1ce4, 0x9036,
-	0x2638, 0x2805, 0x908a, 0x0036, 0x1a0c, 0x0d7d, 0x9082, 0x001b,
-	0x0002, 0x1cb4, 0x1cb4, 0x1cb6, 0x1cb4, 0x1cb4, 0x1cb4, 0x1cbc,
-	0x1cb4, 0x1cb4, 0x1cb4, 0x1cc2, 0x1cb4, 0x1cb4, 0x1cb4, 0x1cc8,
-	0x1cb4, 0x1cb4, 0x1cb4, 0x1cce, 0x1cb4, 0x1cb4, 0x1cb4, 0x1cd4,
-	0x1cb4, 0x1cb4, 0x1cb4, 0x1cda, 0x080c, 0x0d7d, 0xb574, 0xb478,
-	0xb37c, 0xb280, 0x0804, 0x1d29, 0xb584, 0xb488, 0xb38c, 0xb290,
-	0x0804, 0x1d29, 0xb594, 0xb498, 0xb39c, 0xb2a0, 0x0804, 0x1d29,
-	0xb5a4, 0xb4a8, 0xb3ac, 0xb2b0, 0x0804, 0x1d29, 0xb5b4, 0xb4b8,
-	0xb3bc, 0xb2c0, 0x0804, 0x1d29, 0xb5c4, 0xb4c8, 0xb3cc, 0xb2d0,
-	0x0804, 0x1d29, 0xb5d4, 0xb4d8, 0xb3dc, 0xb2e0, 0x0804, 0x1d29,
-	0x0804, 0x1d29, 0x080c, 0x0d7d, 0x2805, 0x908a, 0x0034, 0x1a0c,
-	0x0d7d, 0x9082, 0x001b, 0x0002, 0x1d07, 0x1d05, 0x1d05, 0x1d05,
-	0x1d05, 0x1d05, 0x1d0e, 0x1d05, 0x1d05, 0x1d05, 0x1d05, 0x1d05,
-	0x1d15, 0x1d05, 0x1d05, 0x1d05, 0x1d05, 0x1d05, 0x1d1c, 0x1d05,
-	0x1d05, 0x1d05, 0x1d05, 0x1d05, 0x1d23, 0x080c, 0x0d7d, 0xb56c,
-	0xb470, 0xb774, 0xb678, 0xb37c, 0xb280, 0x00d8, 0xb584, 0xb488,
-	0xb78c, 0xb690, 0xb394, 0xb298, 0x00a0, 0xb59c, 0xb4a0, 0xb7a4,
-	0xb6a8, 0xb3ac, 0xb2b0, 0x0068, 0xb5b4, 0xb4b8, 0xb7bc, 0xb6c0,
-	0xb3c4, 0xb2c8, 0x0030, 0xb5cc, 0xb4d0, 0xb7d4, 0xb6d8, 0xb3dc,
-	0xb2e0, 0xab2e, 0xaa32, 0xad1e, 0xac22, 0xaf26, 0xae2a, 0xa988,
-	0x8109, 0xa916, 0x1118, 0x9006, 0x012e, 0x0005, 0x8840, 0x2805,
-	0x9005, 0x1168, 0xb004, 0x9005, 0x090c, 0x0d7d, 0x2050, 0xb164,
-	0xa91a, 0x9184, 0x000f, 0x9080, 0x1e7a, 0x2045, 0x2805, 0x2810,
-	0x2a08, 0xa80a, 0xa90e, 0xaa12, 0x0c30, 0x3e60, 0x6344, 0xd3fc,
-	0x190c, 0x0d7d, 0xa93c, 0xaa40, 0xa844, 0x9106, 0x1118, 0xa848,
-	0x9206, 0x0508, 0x2958, 0xab48, 0xac44, 0x2940, 0x080c, 0x1e9a,
-	0x1998, 0x2850, 0x2c40, 0xab14, 0xa880, 0xd0fc, 0x1140, 0xa810,
-	0x2005, 0xa80a, 0x2a00, 0xa80e, 0x2009, 0x8015, 0x0070, 0x00c6,
-	0x3e60, 0x6044, 0xc0a4, 0x9085, 0x8005, 0x6046, 0x00ce, 0x8319,
-	0xab16, 0x1904, 0x1d36, 0x2009, 0x8005, 0x3e60, 0x6044, 0x9105,
-	0x6046, 0x0804, 0x1d33, 0x080c, 0x0d7d, 0x00f6, 0x00e6, 0x0096,
-	0x00c6, 0x0026, 0x704c, 0x9c06, 0x190c, 0x0d7d, 0x2079, 0x0090,
-	0x2001, 0x0105, 0x2003, 0x0010, 0x782b, 0x0004, 0x7057, 0x0000,
-	0x6014, 0x2048, 0x080c, 0xc865, 0x0118, 0xa880, 0xc0bd, 0xa882,
-	0x6020, 0x9086, 0x0006, 0x1170, 0x2061, 0x0100, 0x62c8, 0x2001,
-	0x00fa, 0x8001, 0x1df0, 0x60c8, 0x9206, 0x1dc0, 0x60c4, 0xa89a,
-	0x60c8, 0xa896, 0x704c, 0x2060, 0x00c6, 0x080c, 0xc453, 0x080c,
-	0xa899, 0x00ce, 0x704c, 0x9c06, 0x1150, 0x2009, 0x0040, 0x080c,
-	0x21d9, 0x080c, 0xa33e, 0x2011, 0x0000, 0x080c, 0xa1c8, 0x002e,
-	0x00ce, 0x009e, 0x00ee, 0x00fe, 0x0005, 0x00f6, 0x2079, 0x0090,
-	0x781c, 0x0006, 0x7818, 0x0006, 0x2079, 0x0100, 0x7a14, 0x9284,
-	0x1984, 0x9085, 0x0012, 0x7816, 0x2019, 0x1000, 0x8319, 0x090c,
-	0x0d7d, 0x7820, 0xd0bc, 0x1dd0, 0x79c8, 0x000e, 0x9102, 0x001e,
-	0x0006, 0x0016, 0x79c4, 0x000e, 0x9103, 0x78c6, 0x000e, 0x78ca,
-	0x9284, 0x1984, 0x9085, 0x0012, 0x7816, 0x2079, 0x0090, 0x782b,
-	0x0008, 0x7057, 0x0000, 0x00fe, 0x0005, 0x00f6, 0x00e6, 0x2071,
-	0x19e6, 0x7054, 0x9086, 0x0000, 0x0904, 0x1e4b, 0x2079, 0x0090,
-	0x2009, 0x0207, 0x210c, 0xd194, 0x01b8, 0x2009, 0x020c, 0x210c,
-	0x9184, 0x0003, 0x0188, 0x080c, 0xe770, 0x2001, 0x0133, 0x2004,
-	0x9005, 0x090c, 0x0d7d, 0x0016, 0x2009, 0x0040, 0x080c, 0x21d9,
-	0x001e, 0x2001, 0x020c, 0x2102, 0x2009, 0x0206, 0x2104, 0x2009,
-	0x0203, 0x210c, 0x9106, 0x1120, 0x2009, 0x0040, 0x080c, 0x21d9,
-	0x782c, 0xd0fc, 0x09a8, 0x080c, 0xa8b5, 0x782c, 0xd0fc, 0x1de8,
-	0x080c, 0xa899, 0x7054, 0x9086, 0x0000, 0x1950, 0x782b, 0x0004,
-	0x782c, 0xd0ac, 0x1de8, 0x2009, 0x0040, 0x080c, 0x21d9, 0x782b,
-	0x0002, 0x7057, 0x0000, 0x00ee, 0x00fe, 0x0005, 0x080c, 0x0d7d,
-	0x8c60, 0x2c05, 0x9005, 0x0110, 0x8a51, 0x0005, 0xa004, 0x9005,
-	0x0168, 0xa85a, 0x2040, 0xa064, 0x9084, 0x000f, 0x9080, 0x1e7a,
-	0x2065, 0x8cff, 0x090c, 0x0d7d, 0x8a51, 0x0005, 0x2050, 0x0005,
-	0x0000, 0x001d, 0x0021, 0x0025, 0x0029, 0x002d, 0x0031, 0x0035,
-	0x0000, 0x001b, 0x0021, 0x0027, 0x002d, 0x0033, 0x0000, 0x0000,
-	0x0023, 0x0000, 0x0000, 0x1e6d, 0x1e69, 0x1e6d, 0x1e6d, 0x1e77,
-	0x0000, 0x1e6d, 0x1e74, 0x1e74, 0x1e71, 0x1e74, 0x1e74, 0x0000,
-	0x1e77, 0x1e74, 0x0000, 0x1e6f, 0x1e6f, 0x0000, 0x1e6f, 0x1e77,
-	0x0000, 0x1e6f, 0x1e75, 0x1e75, 0x1e75, 0x0000, 0x1e75, 0x0000,
-	0x1e77, 0x1e75, 0x00c6, 0x00d6, 0x0086, 0xab42, 0xac3e, 0xa888,
-	0x9055, 0x0904, 0x2079, 0x2940, 0xa064, 0x90ec, 0x000f, 0x9084,
-	0x00ff, 0x9086, 0x0008, 0x1118, 0x2061, 0x1e75, 0x00d0, 0x9de0,
-	0x1e7a, 0x9d86, 0x0007, 0x0130, 0x9d86, 0x000e, 0x0118, 0x9d86,
-	0x000f, 0x1120, 0xa08c, 0x9422, 0xa090, 0x931b, 0x2c05, 0x9065,
-	0x1140, 0x0310, 0x0804, 0x2079, 0xa004, 0x9045, 0x0904, 0x2079,
-	0x08d8, 0x2c05, 0x9005, 0x0904, 0x1f61, 0xdd9c, 0x1904, 0x1f1d,
-	0x908a, 0x0036, 0x1a0c, 0x0d7d, 0x9082, 0x001b, 0x0002, 0x1ef2,
-	0x1ef2, 0x1ef4, 0x1ef2, 0x1ef2, 0x1ef2, 0x1efa, 0x1ef2, 0x1ef2,
-	0x1ef2, 0x1f00, 0x1ef2, 0x1ef2, 0x1ef2, 0x1f06, 0x1ef2, 0x1ef2,
-	0x1ef2, 0x1f0c, 0x1ef2, 0x1ef2, 0x1ef2, 0x1f12, 0x1ef2, 0x1ef2,
-	0x1ef2, 0x1f18, 0x080c, 0x0d7d, 0xa07c, 0x9422, 0xa080, 0x931b,
-	0x0804, 0x1f57, 0xa08c, 0x9422, 0xa090, 0x931b, 0x0804, 0x1f57,
-	0xa09c, 0x9422, 0xa0a0, 0x931b, 0x0804, 0x1f57, 0xa0ac, 0x9422,
-	0xa0b0, 0x931b, 0x0804, 0x1f57, 0xa0bc, 0x9422, 0xa0c0, 0x931b,
-	0x0804, 0x1f57, 0xa0cc, 0x9422, 0xa0d0, 0x931b, 0x0804, 0x1f57,
-	0xa0dc, 0x9422, 0xa0e0, 0x931b, 0x04d0, 0x908a, 0x0034, 0x1a0c,
-	0x0d7d, 0x9082, 0x001b, 0x0002, 0x1f3f, 0x1f3d, 0x1f3d, 0x1f3d,
-	0x1f3d, 0x1f3d, 0x1f44, 0x1f3d, 0x1f3d, 0x1f3d, 0x1f3d, 0x1f3d,
-	0x1f49, 0x1f3d, 0x1f3d, 0x1f3d, 0x1f3d, 0x1f3d, 0x1f4e, 0x1f3d,
-	0x1f3d, 0x1f3d, 0x1f3d, 0x1f3d, 0x1f53, 0x080c, 0x0d7d, 0xa07c,
-	0x9422, 0xa080, 0x931b, 0x0098, 0xa094, 0x9422, 0xa098, 0x931b,
-	0x0070, 0xa0ac, 0x9422, 0xa0b0, 0x931b, 0x0048, 0xa0c4, 0x9422,
-	0xa0c8, 0x931b, 0x0020, 0xa0dc, 0x9422, 0xa0e0, 0x931b, 0x0630,
-	0x2300, 0x9405, 0x0160, 0x8a51, 0x0904, 0x2079, 0x8c60, 0x0804,
-	0x1ec9, 0xa004, 0x9045, 0x0904, 0x2079, 0x0804, 0x1ea4, 0x8a51,
-	0x0904, 0x2079, 0x8c60, 0x2c05, 0x9005, 0x1158, 0xa004, 0x9045,
-	0x0904, 0x2079, 0xa064, 0x90ec, 0x000f, 0x9de0, 0x1e7a, 0x2c05,
-	0x2060, 0xa880, 0xc0fc, 0xa882, 0x0804, 0x206e, 0x2c05, 0x8422,
-	0x8420, 0x831a, 0x9399, 0x0000, 0xac2e, 0xab32, 0xdd9c, 0x1904,
-	0x200b, 0x9082, 0x001b, 0x0002, 0x1fa7, 0x1fa7, 0x1fa9, 0x1fa7,
-	0x1fa7, 0x1fa7, 0x1fb7, 0x1fa7, 0x1fa7, 0x1fa7, 0x1fc5, 0x1fa7,
-	0x1fa7, 0x1fa7, 0x1fd3, 0x1fa7, 0x1fa7, 0x1fa7, 0x1fe1, 0x1fa7,
-	0x1fa7, 0x1fa7, 0x1fef, 0x1fa7, 0x1fa7, 0x1fa7, 0x1ffd, 0x080c,
-	0x0d7d, 0xa17c, 0x2400, 0x9122, 0xa180, 0x2300, 0x911b, 0x0a0c,
-	0x0d7d, 0xa074, 0x9420, 0xa078, 0x9319, 0x0804, 0x2069, 0xa18c,
-	0x2400, 0x9122, 0xa190, 0x2300, 0x911b, 0x0a0c, 0x0d7d, 0xa084,
-	0x9420, 0xa088, 0x9319, 0x0804, 0x2069, 0xa19c, 0x2400, 0x9122,
-	0xa1a0, 0x2300, 0x911b, 0x0a0c, 0x0d7d, 0xa094, 0x9420, 0xa098,
-	0x9319, 0x0804, 0x2069, 0xa1ac, 0x2400, 0x9122, 0xa1b0, 0x2300,
-	0x911b, 0x0a0c, 0x0d7d, 0xa0a4, 0x9420, 0xa0a8, 0x9319, 0x0804,
-	0x2069, 0xa1bc, 0x2400, 0x9122, 0xa1c0, 0x2300, 0x911b, 0x0a0c,
-	0x0d7d, 0xa0b4, 0x9420, 0xa0b8, 0x9319, 0x0804, 0x2069, 0xa1cc,
-	0x2400, 0x9122, 0xa1d0, 0x2300, 0x911b, 0x0a0c, 0x0d7d, 0xa0c4,
-	0x9420, 0xa0c8, 0x9319, 0x0804, 0x2069, 0xa1dc, 0x2400, 0x9122,
-	0xa1e0, 0x2300, 0x911b, 0x0a0c, 0x0d7d, 0xa0d4, 0x9420, 0xa0d8,
-	0x9319, 0x0804, 0x2069, 0x9082, 0x001b, 0x0002, 0x2029, 0x2027,
-	0x2027, 0x2027, 0x2027, 0x2027, 0x2036, 0x2027, 0x2027, 0x2027,
-	0x2027, 0x2027, 0x2043, 0x2027, 0x2027, 0x2027, 0x2027, 0x2027,
-	0x2050, 0x2027, 0x2027, 0x2027, 0x2027, 0x2027, 0x205d, 0x080c,
-	0x0d7d, 0xa17c, 0x2400, 0x9122, 0xa180, 0x2300, 0x911b, 0x0a0c,
-	0x0d7d, 0xa06c, 0x9420, 0xa070, 0x9319, 0x0498, 0xa194, 0x2400,
-	0x9122, 0xa198, 0x2300, 0x911b, 0x0a0c, 0x0d7d, 0xa084, 0x9420,
-	0xa088, 0x9319, 0x0430, 0xa1ac, 0x2400, 0x9122, 0xa1b0, 0x2300,
-	0x911b, 0x0a0c, 0x0d7d, 0xa09c, 0x9420, 0xa0a0, 0x9319, 0x00c8,
-	0xa1c4, 0x2400, 0x9122, 0xa1c8, 0x2300, 0x911b, 0x0a0c, 0x0d7d,
-	0xa0b4, 0x9420, 0xa0b8, 0x9319, 0x0060, 0xa1dc, 0x2400, 0x9122,
-	0xa1e0, 0x2300, 0x911b, 0x0a0c, 0x0d7d, 0xa0cc, 0x9420, 0xa0d0,
-	0x9319, 0xac1e, 0xab22, 0xa880, 0xc0fd, 0xa882, 0x2800, 0xa85a,
-	0x2c00, 0xa812, 0x2a00, 0xa816, 0x000e, 0x000e, 0x000e, 0x9006,
-	0x0028, 0x008e, 0x00de, 0x00ce, 0x9085, 0x0001, 0x0005, 0x00c6,
-	0x610c, 0x0016, 0x9026, 0x2410, 0x6004, 0x9420, 0x9291, 0x0000,
-	0x2c04, 0x9210, 0x9ce0, 0x0002, 0x918a, 0x0002, 0x1da8, 0x9284,
-	0x000f, 0x9405, 0x001e, 0x00ce, 0x0005, 0x7803, 0x0003, 0x780f,
-	0x0000, 0x6004, 0x7812, 0x2c04, 0x7816, 0x9ce0, 0x0002, 0x918a,
-	0x0002, 0x1db8, 0x0005, 0x2001, 0x0005, 0x2004, 0xd0bc, 0x190c,
-	0x0d76, 0xd094, 0x0110, 0x080c, 0x11f6, 0x0005, 0x0126, 0x2091,
-	0x2600, 0x2079, 0x0200, 0x2071, 0x0260, 0x2069, 0x1800, 0x7817,
-	0x0000, 0x789b, 0x0814, 0x78a3, 0x0406, 0x789f, 0x0410, 0x2009,
-	0x013b, 0x200b, 0x0400, 0x781b, 0x0002, 0x783b, 0x001f, 0x7837,
-	0x0020, 0x7803, 0x1600, 0x012e, 0x0005, 0x2091, 0x2600, 0x781c,
-	0xd0a4, 0x190c, 0x21d6, 0x7900, 0xd1dc, 0x1118, 0x9084, 0x0006,
-	0x001a, 0x9084, 0x000e, 0x0002, 0x20f4, 0x20ec, 0x7ef4, 0x20ec,
-	0x20ee, 0x20ee, 0x20ee, 0x20ee, 0x7eda, 0x20ec, 0x20f0, 0x20ec,
-	0x20ee, 0x20ec, 0x20ee, 0x20ec, 0x080c, 0x0d7d, 0x0031, 0x0020,
-	0x080c, 0x7eda, 0x080c, 0x7ef4, 0x0005, 0x0006, 0x0016, 0x0026,
-	0x080c, 0xe770, 0x7930, 0x9184, 0x0003, 0x0510, 0x080c, 0xa899,
-	0x2001, 0x19f9, 0x2004, 0x9005, 0x01a0, 0x2001, 0x0133, 0x2004,
-	0x9005, 0x090c, 0x0d7d, 0x00c6, 0x2001, 0x19f9, 0x2064, 0x080c,
-	0xa8b5, 0x080c, 0xc453, 0x2009, 0x0040, 0x080c, 0x21d9, 0x00ce,
-	0x0408, 0x2009, 0x0040, 0x080c, 0x21d9, 0x080c, 0xa8b5, 0x00d0,
-	0x9184, 0x0014, 0x01a0, 0x6a00, 0x9286, 0x0003, 0x0160, 0x080c,
-	0x74ec, 0x1138, 0x080c, 0x77ef, 0x080c, 0x6044, 0x080c, 0x741d,
-	0x0010, 0x080c, 0x5eff, 0x080c, 0x7f92, 0x0041, 0x0018, 0x9184,
-	0x9540, 0x1dc8, 0x002e, 0x001e, 0x000e, 0x0005, 0x00e6, 0x0036,
-	0x0046, 0x0056, 0x2071, 0x1a6a, 0x080c, 0x1adf, 0x005e, 0x004e,
-	0x003e, 0x00ee, 0x0005, 0x0126, 0x2091, 0x2e00, 0x2071, 0x1800,
-	0x7128, 0x2001, 0x196e, 0x2102, 0x2001, 0x1976, 0x2102, 0x2001,
-	0x013b, 0x2102, 0x2079, 0x0200, 0x2001, 0x0201, 0x789e, 0x78a3,
-	0x0200, 0x9198, 0x0007, 0x831c, 0x831c, 0x831c, 0x9398, 0x0005,
-	0x2320, 0x9182, 0x0204, 0x1230, 0x2011, 0x0008, 0x8423, 0x8423,
-	0x8423, 0x0488, 0x9182, 0x024c, 0x1240, 0x2011, 0x0007, 0x8403,
-	0x8003, 0x9400, 0x9400, 0x9420, 0x0430, 0x9182, 0x02bc, 0x1238,
-	0x2011, 0x0006, 0x8403, 0x8003, 0x9400, 0x9420, 0x00e0, 0x9182,
-	0x034c, 0x1230, 0x2011, 0x0005, 0x8403, 0x8003, 0x9420, 0x0098,
-	0x9182, 0x042c, 0x1228, 0x2011, 0x0004, 0x8423, 0x8423, 0x0058,
-	0x9182, 0x059c, 0x1228, 0x2011, 0x0003, 0x8403, 0x9420, 0x0018,
-	0x2011, 0x0002, 0x8423, 0x9482, 0x0228, 0x8002, 0x8020, 0x8301,
-	0x9402, 0x0110, 0x0208, 0x8321, 0x8217, 0x8203, 0x9405, 0x789a,
-	0x012e, 0x0005, 0x0006, 0x00d6, 0x2069, 0x0200, 0x6814, 0x9084,
-	0xffc0, 0x910d, 0x6916, 0x00de, 0x000e, 0x0005, 0x00d6, 0x2069,
-	0x0200, 0x9005, 0x6810, 0x0110, 0xc0a5, 0x0008, 0xc0a4, 0x6812,
-	0x00de, 0x0005, 0x0006, 0x00d6, 0x2069, 0x0200, 0x6810, 0x9084,
-	0xfff8, 0x910d, 0x6912, 0x00de, 0x000e, 0x0005, 0x7938, 0x080c,
-	0x0d76, 0x00f6, 0x2079, 0x0200, 0x7902, 0xa001, 0xa001, 0xa001,
-	0xa001, 0xa001, 0xa001, 0x7902, 0xa001, 0xa001, 0xa001, 0xa001,
-	0xa001, 0xa001, 0x00fe, 0x0005, 0x0126, 0x2091, 0x2800, 0x2061,
-	0x0100, 0x2071, 0x1800, 0x2009, 0x0000, 0x080c, 0x2a35, 0x080c,
-	0x294b, 0x2001, 0x199c, 0x2003, 0x0700, 0x2001, 0x199d, 0x2003,
-	0x0700, 0x080c, 0x2aa6, 0x9006, 0x080c, 0x297a, 0x9006, 0x080c,
-	0x295d, 0x20a9, 0x0012, 0x1d04, 0x220b, 0x2091, 0x6000, 0x1f04,
-	0x220b, 0x602f, 0x0100, 0x602f, 0x0000, 0x6050, 0x9085, 0x0400,
-	0x9084, 0xdfff, 0x6052, 0x6224, 0x080c, 0x2a83, 0x080c, 0x2669,
-	0x2009, 0x00ef, 0x6132, 0x6136, 0x080c, 0x2679, 0x60e7, 0x0000,
-	0x61ea, 0x60e3, 0x0008, 0x604b, 0xf7f7, 0x6043, 0x0000, 0x602f,
-	0x0080, 0x602f, 0x0000, 0x6007, 0x349f, 0x00c6, 0x2061, 0x0140,
-	0x608b, 0x000b, 0x608f, 0x10b8, 0x6093, 0x0000, 0x6097, 0x0198,
-	0x00ce, 0x6004, 0x9085, 0x8000, 0x6006, 0x60bb, 0x0000, 0x20a9,
-	0x0018, 0x60bf, 0x0000, 0x1f04, 0x2249, 0x60bb, 0x0000, 0x60bf,
-	0x0108, 0x60bf, 0x0012, 0x60bf, 0x0405, 0x60bf, 0x0014, 0x60bf,
-	0x0320, 0x60bf, 0x0018, 0x601b, 0x00f0, 0x601f, 0x001e, 0x600f,
-	0x006b, 0x602b, 0x402c, 0x012e, 0x0005, 0x00f6, 0x2079, 0x0140,
-	0x78c3, 0x0080, 0x78c3, 0x0083, 0x78c3, 0x0000, 0x00fe, 0x0005,
-	0x2001, 0x1835, 0x2003, 0x0000, 0x2001, 0x1834, 0x2003, 0x0001,
-	0x0005, 0x0126, 0x2091, 0x2800, 0x0006, 0x0016, 0x0026, 0x6124,
-	0x6028, 0x910c, 0x0066, 0x2031, 0x1837, 0x2634, 0x96b4, 0x0028,
-	0x006e, 0x1138, 0x6020, 0xd1bc, 0x0120, 0xd0bc, 0x1168, 0xd0b4,
-	0x1198, 0x9184, 0x5e2c, 0x1118, 0x9184, 0x0007, 0x00aa, 0x9195,
-	0x0004, 0x9284, 0x0007, 0x0082, 0x0016, 0x2001, 0x0387, 0x200c,
-	0xd1a4, 0x001e, 0x0d70, 0x0c98, 0x0016, 0x2001, 0x0387, 0x200c,
-	0xd1b4, 0x001e, 0x0d30, 0x0c58, 0x22b7, 0x22b4, 0x22b4, 0x22b4,
-	0x22b6, 0x22b4, 0x22b4, 0x22b4, 0x080c, 0x0d7d, 0x0029, 0x002e,
-	0x001e, 0x000e, 0x012e, 0x0005, 0x00a6, 0x6124, 0x6028, 0xd09c,
-	0x0118, 0xd19c, 0x1904, 0x2531, 0xd1f4, 0x190c, 0x0d76, 0x080c,
-	0x74ec, 0x0904, 0x2314, 0x080c, 0xcf84, 0x1120, 0x7000, 0x9086,
-	0x0003, 0x0580, 0x6024, 0x9084, 0x1800, 0x0560, 0x080c, 0x750f,
-	0x0118, 0x080c, 0x74fd, 0x1530, 0x2011, 0x0020, 0x080c, 0x2a83,
-	0x6043, 0x0000, 0x080c, 0xcf84, 0x0168, 0x080c, 0x750f, 0x1150,
-	0x2001, 0x19a6, 0x2003, 0x0001, 0x6027, 0x1800, 0x080c, 0x7362,
-	0x0804, 0x2534, 0x70a4, 0x9005, 0x1150, 0x70a7, 0x0001, 0x00d6,
-	0x2069, 0x0140, 0x080c, 0x7543, 0x00de, 0x1904, 0x2534, 0x080c,
-	0x77f9, 0x0428, 0x080c, 0x750f, 0x1590, 0x6024, 0x9084, 0x1800,
-	0x1108, 0x0468, 0x080c, 0x77f9, 0x080c, 0x77ef, 0x080c, 0x6044,
-	0x080c, 0x741d, 0x0804, 0x2531, 0xd1ac, 0x1508, 0x6024, 0xd0dc,
-	0x1170, 0xd0e4, 0x1178, 0xd0d4, 0x1190, 0xd0cc, 0x0130, 0x7098,
-	0x9086, 0x0028, 0x1110, 0x080c, 0x76d0, 0x0804, 0x2531, 0x080c,
-	0x77f4, 0x0048, 0x2001, 0x197c, 0x2003, 0x0002, 0x0020, 0x080c,
-	0x762d, 0x0804, 0x2531, 0x080c, 0x7773, 0x0804, 0x2531, 0x6220,
-	0xd1bc, 0x0138, 0xd2bc, 0x1904, 0x259a, 0xd2b4, 0x1904, 0x25ac,
-	0x0000, 0xd1ac, 0x0904, 0x243e, 0x0036, 0x6328, 0xc3bc, 0x632a,
-	0x003e, 0x080c, 0x74ec, 0x11d0, 0x2011, 0x0020, 0x080c, 0x2a83,
-	0x0006, 0x0026, 0x0036, 0x080c, 0x7506, 0x1158, 0x080c, 0x77ef,
-	0x080c, 0x6044, 0x080c, 0x741d, 0x003e, 0x002e, 0x000e, 0x00ae,
-	0x0005, 0x003e, 0x002e, 0x000e, 0x080c, 0x74c0, 0x0016, 0x0046,
-	0x00c6, 0x644c, 0x9486, 0xf0f0, 0x1138, 0x2061, 0x0100, 0x644a,
-	0x6043, 0x0090, 0x6043, 0x0010, 0x74da, 0x948c, 0xff00, 0x7038,
-	0xd084, 0x0178, 0x9186, 0xf800, 0x1160, 0x7048, 0xd084, 0x1148,
-	0xc085, 0x704a, 0x0036, 0x2418, 0x2011, 0x8016, 0x080c, 0x4b29,
-	0x003e, 0x080c, 0xcf7d, 0x1904, 0x2415, 0x9196, 0xff00, 0x05a8,
-	0x7060, 0x9084, 0x00ff, 0x810f, 0x81ff, 0x0110, 0x9116, 0x0568,
-	0x7130, 0xd184, 0x1550, 0x080c, 0x337c, 0x0128, 0xc18d, 0x7132,
-	0x080c, 0x6a86, 0x1510, 0x6240, 0x9294, 0x0010, 0x0130, 0x6248,
-	0x9294, 0xff00, 0x9296, 0xff00, 0x01c0, 0x7030, 0xd08c, 0x0904,
-	0x2415, 0x7038, 0xd08c, 0x1140, 0x2001, 0x180c, 0x200c, 0xd1ac,
-	0x1904, 0x2415, 0xc1ad, 0x2102, 0x0036, 0x73d8, 0x2011, 0x8013,
-	0x080c, 0x4b29, 0x003e, 0x0804, 0x2415, 0x7038, 0xd08c, 0x1140,
-	0x2001, 0x180c, 0x200c, 0xd1ac, 0x1904, 0x2415, 0xc1ad, 0x2102,
-	0x0036, 0x73d8, 0x2011, 0x8013, 0x080c, 0x4b29, 0x003e, 0x7130,
-	0xc185, 0x7132, 0x2011, 0x1848, 0x220c, 0xd1a4, 0x01f0, 0x0016,
-	0x2009, 0x0001, 0x2011, 0x0100, 0x080c, 0x8902, 0x2019, 0x000e,
-	0x00c6, 0x2061, 0x0000, 0x080c, 0xe286, 0x00ce, 0x9484, 0x00ff,
-	0x9080, 0x3388, 0x200d, 0x918c, 0xff00, 0x810f, 0x2120, 0x9006,
-	0x2009, 0x000e, 0x080c, 0xe316, 0x001e, 0x0016, 0x2009, 0x0002,
-	0x2019, 0x0004, 0x080c, 0x31d4, 0x001e, 0x0078, 0x0156, 0x00b6,
-	0x20a9, 0x007f, 0x900e, 0x080c, 0x6644, 0x1110, 0x080c, 0x605e,
-	0x8108, 0x1f04, 0x240b, 0x00be, 0x015e, 0x00ce, 0x004e, 0x080c,
-	0xa899, 0x080c, 0xab61, 0x080c, 0xa8b5, 0x60e3, 0x0000, 0x001e,
-	0x2001, 0x1800, 0x2014, 0x9296, 0x0004, 0x1170, 0xd19c, 0x11b0,
-	0x2011, 0x180c, 0x2214, 0xd29c, 0x1120, 0x6204, 0x9295, 0x0002,
-	0x6206, 0x6228, 0xc29d, 0x622a, 0x2003, 0x0001, 0x2001, 0x1826,
-	0x2003, 0x0000, 0x2011, 0x0020, 0x080c, 0x2a83, 0xd194, 0x0904,
-	0x2531, 0x0016, 0x080c, 0xa899, 0x6220, 0xd2b4, 0x0904, 0x24cc,
-	0x080c, 0x8709, 0x080c, 0x9e4f, 0x2011, 0x0004, 0x080c, 0x2a83,
-	0x00f6, 0x2019, 0x19f2, 0x2304, 0x907d, 0x0904, 0x2499, 0x7804,
-	0x9086, 0x0032, 0x15f0, 0x00d6, 0x00c6, 0x00e6, 0x0096, 0x2069,
-	0x0140, 0x782c, 0x685e, 0x7808, 0x685a, 0x6043, 0x0002, 0x2001,
-	0x0003, 0x8001, 0x1df0, 0x6043, 0x0000, 0x2001, 0x003c, 0x8001,
-	0x1df0, 0x080c, 0x2a59, 0x2001, 0x001e, 0x8001, 0x0240, 0x20a9,
-	0x0009, 0x080c, 0x2a10, 0x6904, 0xd1dc, 0x1140, 0x0cb0, 0x2001,
-	0x0100, 0x080c, 0x2a49, 0x9006, 0x080c, 0x2a49, 0x080c, 0x95ff,
-	0x080c, 0xa8b5, 0x7814, 0x2048, 0xa867, 0x0103, 0x2f60, 0x080c,
-	0xabf0, 0x009e, 0x00ee, 0x00ce, 0x00de, 0x00fe, 0x001e, 0x00ae,
-	0x0005, 0x00fe, 0x00d6, 0x2069, 0x0140, 0x6804, 0x9084, 0x4000,
-	0x0110, 0x080c, 0x2a59, 0x00de, 0x00c6, 0x2061, 0x19e6, 0x6034,
-	0x080c, 0xcf84, 0x0120, 0x909a, 0x0003, 0x1258, 0x0018, 0x909a,
-	0x00c8, 0x1238, 0x8000, 0x6036, 0x00ce, 0x080c, 0x9e27, 0x0804,
-	0x252e, 0x2061, 0x0100, 0x62c0, 0x080c, 0xa7ca, 0x2019, 0x19f2,
-	0x2304, 0x9065, 0x0130, 0x6003, 0x0001, 0x2009, 0x0027, 0x080c,
-	0xac8d, 0x00ce, 0x0804, 0x252e, 0xd2bc, 0x0904, 0x2511, 0x080c,
-	0x8716, 0x2011, 0x0004, 0x080c, 0x2a83, 0x00d6, 0x2069, 0x0140,
-	0x6804, 0x9084, 0x4000, 0x0110, 0x080c, 0x2a59, 0x00de, 0x00c6,
-	0x2061, 0x19e6, 0x6050, 0x080c, 0xcf84, 0x0120, 0x909a, 0x0003,
-	0x1668, 0x0018, 0x909a, 0x00c8, 0x1648, 0x8000, 0x6052, 0x604c,
-	0x00ce, 0x9005, 0x05d8, 0x2009, 0x07d0, 0x080c, 0x870e, 0x9080,
-	0x0008, 0x2004, 0x9086, 0x0006, 0x1138, 0x2009, 0x1984, 0x2011,
-	0x0012, 0x080c, 0x2a92, 0x0450, 0x9080, 0x0008, 0x2004, 0x9086,
-	0x0009, 0x0d98, 0x2009, 0x1984, 0x2011, 0x0016, 0x080c, 0x2a92,
-	0x00e8, 0x2011, 0x0004, 0x080c, 0x2a83, 0x00c0, 0x0036, 0x2019,
-	0x0001, 0x080c, 0xa133, 0x003e, 0x2019, 0x19f9, 0x2304, 0x9065,
-	0x0160, 0x2009, 0x004f, 0x6020, 0x9086, 0x0009, 0x1110, 0x2009,
-	0x004f, 0x6003, 0x0003, 0x080c, 0xac8d, 0x00ce, 0x080c, 0xa8b5,
-	0x001e, 0xd19c, 0x0904, 0x2593, 0x7038, 0xd0ac, 0x1558, 0x0016,
-	0x0156, 0x2011, 0x0008, 0x080c, 0x2a83, 0x080c, 0x2aa6, 0x080c,
-	0x2ad9, 0x6050, 0xc0e5, 0x6052, 0x20a9, 0x0367, 0x1f04, 0x2560,
-	0x1d04, 0x2548, 0x080c, 0x873d, 0x6020, 0xd09c, 0x1db8, 0x00f6,
-	0x2079, 0x0100, 0x080c, 0x29bc, 0x00fe, 0x1d80, 0x6050, 0xc0e4,
-	0x6052, 0x2011, 0x0008, 0x080c, 0x2a83, 0x015e, 0x001e, 0x0498,
-	0x015e, 0x001e, 0x0016, 0x6028, 0xc09c, 0x602a, 0x080c, 0xa899,
-	0x080c, 0xab61, 0x080c, 0xa8b5, 0x60e3, 0x0000, 0x080c, 0xe74f,
-	0x080c, 0xe76a, 0x080c, 0x56f9, 0xd0fc, 0x1138, 0x080c, 0xcf7d,
-	0x1120, 0x9085, 0x0001, 0x080c, 0x7533, 0x9006, 0x080c, 0x2a49,
-	0x2009, 0x0002, 0x080c, 0x2a35, 0x00e6, 0x2071, 0x1800, 0x7003,
-	0x0004, 0x080c, 0x0ec1, 0x00ee, 0x2011, 0x0008, 0x080c, 0x2a83,
-	0x080c, 0x0bc3, 0x001e, 0x918c, 0xffd0, 0x2110, 0x080c, 0x2a83,
-	0x00ae, 0x0005, 0x0016, 0x2001, 0x0387, 0x200c, 0xd1a4, 0x001e,
-	0x0904, 0x2341, 0x0016, 0x2009, 0x25a6, 0x00c0, 0x2001, 0x0387,
-	0x2003, 0x1000, 0x001e, 0x0c38, 0x0016, 0x2001, 0x0387, 0x200c,
-	0xd1b4, 0x001e, 0x0904, 0x2341, 0x0016, 0x2009, 0x25b8, 0x0030,
-	0x2001, 0x0387, 0x2003, 0x4000, 0x001e, 0x08a8, 0x6028, 0xc0bc,
-	0x602a, 0x2001, 0x0156, 0x2003, 0xbc91, 0x8000, 0x2003, 0xffff,
-	0x6043, 0x0001, 0x080c, 0x2a2f, 0x2011, 0x0080, 0x080c, 0x2a83,
-	0x6017, 0x0000, 0x6043, 0x0000, 0x0817, 0x0006, 0x0016, 0x0026,
-	0x0036, 0x00e6, 0x00f6, 0x0126, 0x2091, 0x8000, 0x2071, 0x1800,
-	0x71d0, 0x70d2, 0x9116, 0x0904, 0x2628, 0x81ff, 0x01a0, 0x2009,
-	0x0000, 0x080c, 0x2a35, 0x2011, 0x8011, 0x2019, 0x010e, 0x231c,
-	0x939e, 0x0007, 0x1118, 0x2019, 0x0001, 0x0010, 0x2019, 0x0000,
-	0x080c, 0x4b29, 0x0468, 0x2001, 0x19a7, 0x200c, 0x81ff, 0x1140,
-	0x2001, 0x0109, 0x2004, 0xd0b4, 0x0118, 0x2019, 0x0003, 0x0008,
-	0x2118, 0x2011, 0x8012, 0x080c, 0x4b29, 0x080c, 0x0ec1, 0x080c,
-	0x56f9, 0xd0fc, 0x11a8, 0x080c, 0xcf7d, 0x1190, 0x00c6, 0x080c,
-	0x26c4, 0x080c, 0xa899, 0x080c, 0xa08e, 0x080c, 0xa8b5, 0x2061,
-	0x0100, 0x2019, 0x0028, 0x2009, 0x0002, 0x080c, 0x31d4, 0x00ce,
-	0x012e, 0x00fe, 0x00ee, 0x003e, 0x002e, 0x001e, 0x000e, 0x0005,
-	0x2028, 0x918c, 0x00ff, 0x2130, 0x9094, 0xff00, 0x11f0, 0x2011,
-	0x1837, 0x2214, 0xd2ac, 0x11c8, 0x81ff, 0x01e8, 0x2011, 0x181f,
-	0x2204, 0x9106, 0x1190, 0x2011, 0x1820, 0x2214, 0x9294, 0xff00,
-	0x9584, 0xff00, 0x9206, 0x1148, 0x2011, 0x1820, 0x2214, 0x9294,
-	0x00ff, 0x9584, 0x00ff, 0x9206, 0x1120, 0x2500, 0x080c, 0x8202,
-	0x0048, 0x9584, 0x00ff, 0x9080, 0x3388, 0x200d, 0x918c, 0xff00,
-	0x810f, 0x9006, 0x0005, 0x9080, 0x3388, 0x200d, 0x918c, 0x00ff,
-	0x0005, 0x00d6, 0x2069, 0x0140, 0x2001, 0x1818, 0x2003, 0x00ef,
-	0x20a9, 0x0010, 0x9006, 0x6852, 0x6856, 0x1f04, 0x2674, 0x00de,
-	0x0005, 0x0006, 0x00d6, 0x0026, 0x2069, 0x0140, 0x2001, 0x1818,
-	0x2102, 0x8114, 0x8214, 0x8214, 0x8214, 0x20a9, 0x0010, 0x6853,
-	0x0000, 0x9006, 0x82ff, 0x1128, 0x9184, 0x000f, 0x9080, 0xe77e,
-	0x2005, 0x6856, 0x8211, 0x1f04, 0x2689, 0x002e, 0x00de, 0x000e,
-	0x0005, 0x00c6, 0x2061, 0x1800, 0x6030, 0x0110, 0xc09d, 0x0008,
-	0xc09c, 0x6032, 0x00ce, 0x0005, 0x0156, 0x00d6, 0x0026, 0x0016,
-	0x0006, 0x2069, 0x0140, 0x6980, 0x9116, 0x0180, 0x9112, 0x1230,
-	0x8212, 0x8210, 0x22a8, 0x2001, 0x0402, 0x0018, 0x22a8, 0x2001,
-	0x0404, 0x680e, 0x1f04, 0x26b9, 0x680f, 0x0000, 0x000e, 0x001e,
-	0x002e, 0x00de, 0x015e, 0x0005, 0x080c, 0x56f5, 0xd0c4, 0x0150,
-	0xd0a4, 0x0140, 0x9006, 0x0046, 0x2020, 0x2009, 0x002e, 0x080c,
-	0xe316, 0x004e, 0x0005, 0x00f6, 0x0016, 0x0026, 0x2079, 0x0140,
-	0x78c4, 0xd0dc, 0x0904, 0x2730, 0x080c, 0x29ac, 0x0660, 0x9084,
-	0x0700, 0x908e, 0x0600, 0x1120, 0x2011, 0x4000, 0x900e, 0x0458,
-	0x908e, 0x0500, 0x1120, 0x2011, 0x8000, 0x900e, 0x0420, 0x908e,
-	0x0400, 0x1120, 0x9016, 0x2009, 0x0001, 0x00e8, 0x908e, 0x0300,
-	0x1120, 0x9016, 0x2009, 0x0002, 0x00b0, 0x908e, 0x0200, 0x1120,
-	0x9016, 0x2009, 0x0004, 0x0078, 0x908e, 0x0100, 0x1548, 0x9016,
-	0x2009, 0x0008, 0x0040, 0x9084, 0x0700, 0x908e, 0x0300, 0x1500,
-	0x2011, 0x0030, 0x0058, 0x2300, 0x9080, 0x0020, 0x2018, 0x080c,
-	0x9181, 0x928c, 0xff00, 0x0110, 0x2011, 0x00ff, 0x2200, 0x8007,
-	0x9085, 0x004c, 0x78c2, 0x2009, 0x0138, 0x220a, 0x080c, 0x74ec,
-	0x1118, 0x2009, 0x196c, 0x220a, 0x002e, 0x001e, 0x00fe, 0x0005,
-	0x78c3, 0x0000, 0x0cc8, 0x0126, 0x2091, 0x2800, 0x0006, 0x0016,
-	0x0026, 0x2001, 0x0170, 0x200c, 0x8000, 0x2014, 0x9184, 0x0003,
-	0x0110, 0x080c, 0x0d76, 0x002e, 0x001e, 0x000e, 0x012e, 0x0005,
-	0x2001, 0x0171, 0x2004, 0xd0dc, 0x0168, 0x2001, 0x0170, 0x200c,
-	0x918c, 0x00ff, 0x918e, 0x004c, 0x1128, 0x200c, 0x918c, 0xff00,
-	0x810f, 0x0005, 0x900e, 0x2001, 0x0227, 0x2004, 0x8007, 0x9084,
-	0x00ff, 0x8004, 0x9108, 0x2001, 0x0226, 0x2004, 0x8007, 0x9084,
-	0x00ff, 0x8004, 0x9108, 0x0005, 0x0018, 0x000c, 0x0018, 0x0020,
-	0x1000, 0x0800, 0x1000, 0x1800, 0x0156, 0x0006, 0x0016, 0x0026,
-	0x00e6, 0x2001, 0x198f, 0x2004, 0x908a, 0x0007, 0x1a0c, 0x0d7d,
-	0x0033, 0x00ee, 0x002e, 0x001e, 0x000e, 0x015e, 0x0005, 0x278e,
-	0x27ac, 0x27d0, 0x27d2, 0x27fb, 0x27fd, 0x27ff, 0x2001, 0x0001,
-	0x080c, 0x25d5, 0x080c, 0x29fa, 0x2001, 0x1991, 0x2003, 0x0000,
-	0x7828, 0x9084, 0xe1d7, 0x782a, 0x9006, 0x20a9, 0x0009, 0x080c,
-	0x29c8, 0x2001, 0x198f, 0x2003, 0x0006, 0x2009, 0x001e, 0x2011,
-	0x2800, 0x080c, 0x871b, 0x0005, 0x2009, 0x1994, 0x200b, 0x0000,
-	0x2001, 0x1999, 0x2003, 0x0036, 0x2001, 0x1998, 0x2003, 0x002a,
-	0x2001, 0x1991, 0x2003, 0x0001, 0x9006, 0x080c, 0x295d, 0x2001,
-	0xffff, 0x20a9, 0x0009, 0x080c, 0x29c8, 0x2001, 0x198f, 0x2003,
-	0x0006, 0x2009, 0x001e, 0x2011, 0x2800, 0x080c, 0x871b, 0x0005,
-	0x080c, 0x0d7d, 0x2001, 0x1999, 0x2003, 0x0036, 0x2001, 0x1991,
-	0x2003, 0x0003, 0x7a38, 0x9294, 0x0005, 0x9296, 0x0004, 0x0110,
-	0x9006, 0x0010, 0x2001, 0x0001, 0x080c, 0x295d, 0x2001, 0x1995,
-	0x2003, 0x0000, 0x2001, 0xffff, 0x20a9, 0x0009, 0x080c, 0x29c8,
-	0x2001, 0x198f, 0x2003, 0x0006, 0x2009, 0x001e, 0x2011, 0x2800,
-	0x080c, 0x871b, 0x0005, 0x080c, 0x0d7d, 0x080c, 0x0d7d, 0x0005,
-	0x0006, 0x0016, 0x0026, 0x00e6, 0x00f6, 0x0156, 0x0126, 0x2091,
-	0x8000, 0x2079, 0x0100, 0x2001, 0x1991, 0x2004, 0x908a, 0x0007,
-	0x1a0c, 0x0d7d, 0x0043, 0x012e, 0x015e, 0x00fe, 0x00ee, 0x002e,
-	0x001e, 0x000e, 0x0005, 0x2822, 0x2842, 0x2882, 0x28b2, 0x28d6,
-	0x28e6, 0x28e8, 0x080c, 0x29bc, 0x11b0, 0x7850, 0x9084, 0xefff,
-	0x7852, 0x2009, 0x1997, 0x2104, 0x7a38, 0x9294, 0x0005, 0x9296,
-	0x0004, 0x0110, 0xc08d, 0x0008, 0xc085, 0x200a, 0x2001, 0x198f,
-	0x2003, 0x0001, 0x0030, 0x080c, 0x290c, 0x2001, 0xffff, 0x080c,
-	0x279d, 0x0005, 0x080c, 0x28ea, 0x05e0, 0x2009, 0x1998, 0x2104,
-	0x8001, 0x200a, 0x080c, 0x29bc, 0x1178, 0x7850, 0x9084, 0xefff,
-	0x7852, 0x7a38, 0x9294, 0x0005, 0x9296, 0x0005, 0x0518, 0x2009,
-	0x1997, 0x2104, 0xc085, 0x200a, 0x2009, 0x1994, 0x2104, 0x8000,
-	0x200a, 0x9086, 0x0005, 0x0118, 0x080c, 0x28f2, 0x00c0, 0x200b,
-	0x0000, 0x7a38, 0x9294, 0x0006, 0x9296, 0x0004, 0x0110, 0x9006,
-	0x0010, 0x2001, 0x0001, 0x080c, 0x297a, 0x2001, 0x1991, 0x2003,
-	0x0002, 0x0028, 0x2001, 0x198f, 0x2003, 0x0003, 0x0010, 0x080c,
-	0x27bf, 0x0005, 0x080c, 0x28ea, 0x0560, 0x2009, 0x1998, 0x2104,
-	0x8001, 0x200a, 0x080c, 0x29bc, 0x1168, 0x7850, 0x9084, 0xefff,
-	0x7852, 0x2001, 0x198f, 0x2003, 0x0003, 0x2001, 0x1990, 0x2003,
-	0x0000, 0x00b8, 0x2009, 0x1998, 0x2104, 0x9005, 0x1118, 0x080c,
-	0x292f, 0x0010, 0x080c, 0x28ff, 0x080c, 0x28f2, 0x2009, 0x1994,
-	0x200b, 0x0000, 0x2001, 0x1991, 0x2003, 0x0001, 0x080c, 0x27bf,
-	0x0000, 0x0005, 0x04b9, 0x0508, 0x080c, 0x29bc, 0x11b8, 0x7850,
-	0x9084, 0xefff, 0x7852, 0x2009, 0x1995, 0x2104, 0x8000, 0x200a,
-	0x9086, 0x0007, 0x0108, 0x0078, 0x2001, 0x199a, 0x2003, 0x000a,
-	0x2009, 0x1997, 0x2104, 0xc0fd, 0x200a, 0x0038, 0x0419, 0x2001,
-	0x1991, 0x2003, 0x0004, 0x080c, 0x27ea, 0x0005, 0x0099, 0x0168,
-	0x080c, 0x29bc, 0x1138, 0x7850, 0x9084, 0xefff, 0x7852, 0x080c,
-	0x27d6, 0x0018, 0x0079, 0x080c, 0x27ea, 0x0005, 0x080c, 0x0d7d,
-	0x080c, 0x0d7d, 0x2009, 0x1999, 0x2104, 0x8001, 0x200a, 0x090c,
-	0x294b, 0x0005, 0x7a38, 0x9294, 0x0005, 0x9296, 0x0005, 0x0110,
-	0x9006, 0x0010, 0x2001, 0x0001, 0x080c, 0x297a, 0x0005, 0x7a38,
-	0x9294, 0x0006, 0x9296, 0x0006, 0x0110, 0x9006, 0x0010, 0x2001,
-	0x0001, 0x080c, 0x295d, 0x0005, 0x2009, 0x1994, 0x2104, 0x8000,
-	0x200a, 0x9086, 0x0005, 0x0108, 0x0068, 0x200b, 0x0000, 0x7a38,
-	0x9294, 0x0006, 0x9296, 0x0006, 0x0110, 0x9006, 0x0010, 0x2001,
-	0x0001, 0x04d9, 0x7a38, 0x9294, 0x0005, 0x9296, 0x0005, 0x0110,
-	0x9006, 0x0010, 0x2001, 0x0001, 0x080c, 0x297a, 0x0005, 0x0086,
-	0x2001, 0x1997, 0x2004, 0x9084, 0x7fff, 0x090c, 0x0d7d, 0x2009,
-	0x1996, 0x2144, 0x8846, 0x280a, 0x9844, 0x0dd8, 0xd08c, 0x1120,
-	0xd084, 0x1120, 0x080c, 0x0d7d, 0x9006, 0x0010, 0x2001, 0x0001,
-	0x00a1, 0x008e, 0x0005, 0x0006, 0x0156, 0x2001, 0x198f, 0x20a9,
-	0x0009, 0x2003, 0x0000, 0x8000, 0x1f04, 0x2951, 0x2001, 0x1996,
-	0x2003, 0x8000, 0x015e, 0x000e, 0x0005, 0x00f6, 0x2079, 0x0100,
-	0x9085, 0x0000, 0x0158, 0x7838, 0x9084, 0xfff9, 0x9085, 0x0004,
-	0x783a, 0x2009, 0x199c, 0x210c, 0x795a, 0x0050, 0x7838, 0x9084,
-	0xfffb, 0x9085, 0x0006, 0x783a, 0x2009, 0x199d, 0x210c, 0x795a,
-	0x00fe, 0x0005, 0x00f6, 0x2079, 0x0100, 0x9085, 0x0000, 0x0158,
-	0x7838, 0x9084, 0xfffa, 0x9085, 0x0004, 0x783a, 0x7850, 0x9084,
-	0xfff0, 0x7852, 0x00f8, 0x7838, 0x9084, 0xfffb, 0x9085, 0x0005,
-	0x783a, 0x7850, 0x9084, 0xfff0, 0x0016, 0x2009, 0x017f, 0x210c,
-	0x918e, 0x0005, 0x0140, 0x2009, 0x0003, 0x210c, 0x918c, 0x0600,
-	0x918e, 0x0400, 0x0118, 0x9085, 0x000a, 0x0010, 0x9085, 0x0000,
-	0x001e, 0x7852, 0x00fe, 0x0005, 0x0006, 0x2001, 0x0100, 0x2004,
-	0x9082, 0x0007, 0x000e, 0x0005, 0x0006, 0x2001, 0x0100, 0x2004,
-	0x9082, 0x0009, 0x000e, 0x0005, 0x0156, 0x20a9, 0x0064, 0x7820,
-	0x080c, 0x2a2f, 0xd09c, 0x1110, 0x1f04, 0x29bf, 0x015e, 0x0005,
-	0x0126, 0x0016, 0x0006, 0x2091, 0x8000, 0x080c, 0x2aa6, 0x080c,
-	0x2ad9, 0x000e, 0x2008, 0x9186, 0x0000, 0x1118, 0x783b, 0x0007,
-	0x0090, 0x9186, 0x0001, 0x1118, 0x783b, 0x0006, 0x0060, 0x9186,
-	0x0002, 0x1118, 0x783b, 0x0005, 0x0030, 0x9186, 0x0003, 0x1118,
-	0x783b, 0x0004, 0x0000, 0x0006, 0x1d04, 0x29ec, 0x080c, 0x873d,
-	0x1f04, 0x29ec, 0x7850, 0x9085, 0x1000, 0x7852, 0x000e, 0x001e,
-	0x012e, 0x0005, 0x080c, 0x2ad9, 0x0005, 0x0006, 0x0156, 0x00f6,
-	0x2079, 0x0100, 0x20a9, 0x000a, 0x7854, 0xd0ac, 0x1100, 0x7854,
-	0xd08c, 0x1110, 0x1f04, 0x2a07, 0x00fe, 0x015e, 0x000e, 0x0005,
-	0x1d04, 0x2a10, 0x080c, 0x873d, 0x1f04, 0x2a10, 0x0005, 0x0006,
-	0x2001, 0x199b, 0x2004, 0x9086, 0x0000, 0x000e, 0x0005, 0x0006,
-	0x2001, 0x199b, 0x2004, 0x9086, 0x0001, 0x000e, 0x0005, 0x0006,
-	0x2001, 0x199b, 0x2004, 0x9086, 0x0002, 0x000e, 0x0005, 0xa001,
-	0xa001, 0xa001, 0xa001, 0xa001, 0x0005, 0x0006, 0x2001, 0x19a7,
-	0x2102, 0x000e, 0x0005, 0x2009, 0x0171, 0x2104, 0xd0dc, 0x0140,
-	0x2009, 0x0170, 0x2104, 0x200b, 0x0080, 0xa001, 0xa001, 0x200a,
-	0x0005, 0x0016, 0x0026, 0x080c, 0x7506, 0x0108, 0xc0bc, 0x2009,
-	0x0140, 0x2114, 0x9294, 0x0001, 0x9215, 0x220a, 0x002e, 0x001e,
-	0x0005, 0x0016, 0x0026, 0x2009, 0x0140, 0x2114, 0x9294, 0x0001,
-	0x9285, 0x1000, 0x200a, 0x220a, 0x002e, 0x001e, 0x0005, 0x0016,
-	0x0026, 0x2009, 0x0140, 0x2114, 0x9294, 0x0001, 0x9215, 0x220a,
-	0x002e, 0x001e, 0x0005, 0x0006, 0x0016, 0x2009, 0x0140, 0x2104,
-	0x1128, 0x080c, 0x7506, 0x0110, 0xc0bc, 0x0008, 0xc0bd, 0x200a,
-	0x001e, 0x000e, 0x0005, 0x00f6, 0x2079, 0x0380, 0x7843, 0x0101,
-	0x7844, 0xd084, 0x1de8, 0x2001, 0x0109, 0x2202, 0x7843, 0x0100,
-	0x00fe, 0x0005, 0x00f6, 0x2079, 0x0380, 0x7843, 0x0202, 0x7844,
-	0xd08c, 0x1de8, 0x2079, 0x0100, 0x7814, 0x9104, 0x9205, 0x7a16,
-	0x2079, 0x0380, 0x7843, 0x0200, 0x00fe, 0x0005, 0x0016, 0x0026,
-	0x0036, 0x00c6, 0x2061, 0x0100, 0x6050, 0x9084, 0xfbff, 0x9085,
-	0x0040, 0x6052, 0x20a9, 0x0002, 0x080c, 0x2a10, 0x6050, 0x9085,
-	0x0400, 0x9084, 0xff9f, 0x6052, 0x20a9, 0x0005, 0x080c, 0x2a10,
-	0x6054, 0xd0bc, 0x090c, 0x0d7d, 0x20a9, 0x0005, 0x080c, 0x2a10,
-	0x6054, 0xd0ac, 0x090c, 0x0d7d, 0x2009, 0x19ae, 0x9084, 0x7e00,
-	0x8007, 0x8004, 0x8004, 0x200a, 0x00ce, 0x003e, 0x002e, 0x001e,
-	0x0005, 0x0006, 0x00c6, 0x2061, 0x0100, 0x6050, 0xc0cd, 0x6052,
-	0x00ce, 0x000e, 0x0005, 0x2fdf, 0x2fdf, 0x2be3, 0x2be3, 0x2bef,
-	0x2bef, 0x2bfb, 0x2bfb, 0x2c09, 0x2c09, 0x2c15, 0x2c15, 0x2c23,
-	0x2c23, 0x2c31, 0x2c31, 0x2c43, 0x2c43, 0x2c4f, 0x2c4f, 0x2c5d,
-	0x2c5d, 0x2c7b, 0x2c7b, 0x2c9b, 0x2c9b, 0x2c6b, 0x2c6b, 0x2c8b,
-	0x2c8b, 0x2ca9, 0x2ca9, 0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41,
-	0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41,
-	0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41,
-	0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41,
-	0x2c41, 0x2c41, 0x2c41, 0x2cbb, 0x2cbb, 0x2cc7, 0x2cc7, 0x2cd5,
-	0x2cd5, 0x2ce3, 0x2ce3, 0x2cf3, 0x2cf3, 0x2d01, 0x2d01, 0x2d11,
-	0x2d11, 0x2d21, 0x2d21, 0x2d33, 0x2d33, 0x2d41, 0x2d41, 0x2d51,
-	0x2d51, 0x2d73, 0x2d73, 0x2d97, 0x2d97, 0x2d61, 0x2d61, 0x2d85,
-	0x2d85, 0x2da7, 0x2da7, 0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41,
-	0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41,
-	0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41,
-	0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41,
-	0x2c41, 0x2c41, 0x2c41, 0x2dbb, 0x2dbb, 0x2dc7, 0x2dc7, 0x2dd5,
-	0x2dd5, 0x2de3, 0x2de3, 0x2df3, 0x2df3, 0x2e01, 0x2e01, 0x2e11,
-	0x2e11, 0x2e21, 0x2e21, 0x2e33, 0x2e33, 0x2e41, 0x2e41, 0x2e51,
-	0x2e51, 0x2e61, 0x2e61, 0x2e73, 0x2e73, 0x2e83, 0x2e83, 0x2e95,
-	0x2e95, 0x2ea7, 0x2ea7, 0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41,
-	0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41,
-	0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41,
-	0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41,
-	0x2c41, 0x2c41, 0x2c41, 0x2ebb, 0x2ebb, 0x2ec9, 0x2ec9, 0x2ed9,
-	0x2ed9, 0x2ee9, 0x2ee9, 0x2efb, 0x2efb, 0x2f0b, 0x2f0b, 0x2f1d,
-	0x2f1d, 0x2f2f, 0x2f2f, 0x2f43, 0x2f43, 0x2f53, 0x2f53, 0x2f65,
-	0x2f65, 0x2f77, 0x2f77, 0x2f8b, 0x2f8b, 0x2f9c, 0x2f9c, 0x2faf,
-	0x2faf, 0x2fc2, 0x2fc2, 0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41,
-	0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41,
-	0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41,
-	0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41, 0x2c41,
-	0x2c41, 0x2c41, 0x2c41, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x2279, 0x0804, 0x2fd7, 0x0106,
-	0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c,
-	0x20a3, 0x0804, 0x2fd7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x20a3, 0x080c, 0x2279, 0x0804,
-	0x2fd7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x0156, 0x080c, 0x20cd, 0x0804, 0x2fd7, 0x0106, 0x0006, 0x0126,
-	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2279, 0x080c,
-	0x20cd, 0x0804, 0x2fd7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x20a3, 0x080c, 0x20cd, 0x0804,
-	0x2fd7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x0156, 0x080c, 0x20a3, 0x080c, 0x2279, 0x080c, 0x20cd, 0x0804,
-	0x2fd7, 0xa001, 0x0cf0, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x13bb, 0x0804, 0x2fd7, 0x0106,
-	0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c,
-	0x2279, 0x080c, 0x13bb, 0x0804, 0x2fd7, 0x0106, 0x0006, 0x0126,
-	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x20a3, 0x080c,
-	0x13bb, 0x0804, 0x2fd7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x2279, 0x080c, 0x13bb, 0x080c,
-	0x20cd, 0x0804, 0x2fd7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x20a3, 0x080c, 0x2279, 0x080c,
-	0x13bb, 0x0804, 0x2fd7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x20a3, 0x080c, 0x13bb, 0x080c,
-	0x20cd, 0x0804, 0x2fd7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x13bb, 0x080c, 0x20cd, 0x0804,
-	0x2fd7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x0156, 0x080c, 0x20a3, 0x080c, 0x2279, 0x080c, 0x13bb, 0x080c,
-	0x20cd, 0x0804, 0x2fd7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x2733, 0x0804, 0x2fd7, 0x0106,
-	0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c,
-	0x2733, 0x080c, 0x2279, 0x0804, 0x2fd7, 0x0106, 0x0006, 0x0126,
-	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2733, 0x080c,
-	0x20a3, 0x0804, 0x2fd7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x2733, 0x080c, 0x20a3, 0x080c,
-	0x2279, 0x0804, 0x2fd7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x2733, 0x080c, 0x20cd, 0x0804,
-	0x2fd7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x0156, 0x080c, 0x2733, 0x080c, 0x2279, 0x080c, 0x20cd, 0x0804,
-	0x2fd7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x0156, 0x080c, 0x2733, 0x080c, 0x20a3, 0x080c, 0x20cd, 0x0804,
-	0x2fd7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x0156, 0x080c, 0x2733, 0x080c, 0x20a3, 0x080c, 0x2279, 0x080c,
-	0x20cd, 0x0804, 0x2fd7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x2733, 0x080c, 0x13bb, 0x0804,
-	0x2fd7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x0156, 0x080c, 0x2733, 0x080c, 0x2279, 0x080c, 0x13bb, 0x0804,
-	0x2fd7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x0156, 0x080c, 0x2733, 0x080c, 0x20a3, 0x080c, 0x13bb, 0x0804,
-	0x2fd7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x0156, 0x080c, 0x2733, 0x080c, 0x2279, 0x080c, 0x13bb, 0x080c,
-	0x20cd, 0x0804, 0x2fd7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x2733, 0x080c, 0x20a3, 0x080c,
-	0x2279, 0x080c, 0x13bb, 0x0804, 0x2fd7, 0x0106, 0x0006, 0x0126,
-	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2733, 0x080c,
-	0x20a3, 0x080c, 0x13bb, 0x080c, 0x20cd, 0x0804, 0x2fd7, 0x0106,
-	0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c,
-	0x2733, 0x080c, 0x13bb, 0x080c, 0x20cd, 0x0804, 0x2fd7, 0x0106,
-	0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c,
-	0x2733, 0x080c, 0x20a3, 0x080c, 0x2279, 0x080c, 0x13bb, 0x080c,
-	0x20cd, 0x0804, 0x2fd7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0xa8ff, 0x0804, 0x2fd7, 0x0106,
-	0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c,
-	0xa8ff, 0x080c, 0x2279, 0x0804, 0x2fd7, 0x0106, 0x0006, 0x0126,
-	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x20a3, 0x080c,
-	0xa8ff, 0x0804, 0x2fd7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x20a3, 0x080c, 0xa8ff, 0x080c,
-	0x2279, 0x0804, 0x2fd7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0xa8ff, 0x080c, 0x20cd, 0x0804,
-	0x2fd7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x0156, 0x080c, 0xa8ff, 0x080c, 0x2279, 0x080c, 0x20cd, 0x0804,
-	0x2fd7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x0156, 0x080c, 0x20a3, 0x080c, 0xa8ff, 0x080c, 0x20cd, 0x0804,
-	0x2fd7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x0156, 0x080c, 0x20a3, 0x080c, 0xa8ff, 0x080c, 0x2279, 0x080c,
-	0x20cd, 0x0804, 0x2fd7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0xa8ff, 0x080c, 0x13bb, 0x0804,
-	0x2fd7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x0156, 0x080c, 0xa8ff, 0x080c, 0x2279, 0x080c, 0x13bb, 0x0804,
-	0x2fd7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x0156, 0x080c, 0x20a3, 0x080c, 0xa8ff, 0x080c, 0x13bb, 0x0804,
-	0x2fd7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x0156, 0x080c, 0x20a3, 0x080c, 0xa8ff, 0x080c, 0x2279, 0x080c,
-	0x13bb, 0x0804, 0x2fd7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0xa8ff, 0x080c, 0x13bb, 0x080c,
-	0x20cd, 0x0804, 0x2fd7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0xa8ff, 0x080c, 0x2279, 0x080c,
-	0x13bb, 0x080c, 0x20cd, 0x0804, 0x2fd7, 0x0106, 0x0006, 0x0126,
-	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x20a3, 0x080c,
-	0xa8ff, 0x080c, 0x13bb, 0x080c, 0x20cd, 0x0804, 0x2fd7, 0x0106,
-	0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c,
-	0x20a3, 0x080c, 0xa8ff, 0x080c, 0x2279, 0x080c, 0x13bb, 0x080c,
-	0x20cd, 0x0804, 0x2fd7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x2733, 0x080c, 0xa8ff, 0x0804,
-	0x2fd7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x0156, 0x080c, 0x2733, 0x080c, 0xa8ff, 0x080c, 0x2279, 0x0804,
-	0x2fd7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x0156, 0x080c, 0x2733, 0x080c, 0x20a3, 0x080c, 0xa8ff, 0x0804,
-	0x2fd7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x0156, 0x080c, 0x2733, 0x080c, 0x20a3, 0x080c, 0xa8ff, 0x080c,
-	0x2279, 0x0804, 0x2fd7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x2733, 0x080c, 0xa8ff, 0x080c,
-	0x20cd, 0x0804, 0x2fd7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x2733, 0x080c, 0xa8ff, 0x080c,
-	0x2279, 0x080c, 0x20cd, 0x0804, 0x2fd7, 0x0106, 0x0006, 0x0126,
-	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2733, 0x080c,
-	0x20a3, 0x080c, 0xa8ff, 0x080c, 0x20cd, 0x0804, 0x2fd7, 0x0106,
-	0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c,
-	0x2733, 0x080c, 0x20a3, 0x080c, 0xa8ff, 0x080c, 0x2279, 0x080c,
-	0x20cd, 0x0804, 0x2fd7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x2733, 0x080c, 0xa8ff, 0x080c,
-	0x13bb, 0x0804, 0x2fd7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x2733, 0x080c, 0xa8ff, 0x080c,
-	0x2279, 0x080c, 0x13bb, 0x0804, 0x2fd7, 0x0106, 0x0006, 0x0126,
-	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2733, 0x080c,
-	0x20a3, 0x080c, 0xa8ff, 0x080c, 0x13bb, 0x0804, 0x2fd7, 0x0106,
-	0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c,
-	0x2733, 0x080c, 0x20a3, 0x080c, 0xa8ff, 0x080c, 0x2279, 0x080c,
-	0x13bb, 0x0804, 0x2fd7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x2733, 0x080c, 0xa8ff, 0x080c,
-	0x13bb, 0x080c, 0x20cd, 0x04d8, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2733, 0x080c, 0xa8ff,
-	0x080c, 0x2279, 0x080c, 0x13bb, 0x080c, 0x20cd, 0x0440, 0x0106,
-	0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c,
-	0x2733, 0x080c, 0x20a3, 0x080c, 0x13bb, 0x080c, 0xa8ff, 0x080c,
-	0x20cd, 0x00a8, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
-	0x0146, 0x0156, 0x080c, 0x2733, 0x080c, 0x20a3, 0x080c, 0xa8ff,
-	0x080c, 0x2279, 0x080c, 0x13bb, 0x080c, 0x20cd, 0x0000, 0x015e,
-	0x014e, 0x013e, 0x01de, 0x01ce, 0x012e, 0x000e, 0x010e, 0x000d,
-	0x00b6, 0x00c6, 0x0026, 0x0046, 0x9026, 0x080c, 0x6a4c, 0x1904,
-	0x30f0, 0x72dc, 0x2001, 0x197b, 0x2004, 0x9005, 0x1110, 0xd29c,
-	0x0148, 0xd284, 0x1138, 0xd2bc, 0x1904, 0x30f0, 0x080c, 0x30f5,
-	0x0804, 0x30f0, 0xd2cc, 0x1904, 0x30f0, 0x080c, 0x74ec, 0x1120,
-	0x70af, 0xffff, 0x0804, 0x30f0, 0xd294, 0x0120, 0x70af, 0xffff,
-	0x0804, 0x30f0, 0x080c, 0x3377, 0x0160, 0x080c, 0xcf84, 0x0128,
-	0x2001, 0x1818, 0x203c, 0x0804, 0x307d, 0x70af, 0xffff, 0x0804,
-	0x30f0, 0x2001, 0x1818, 0x203c, 0x7294, 0xd284, 0x0904, 0x307d,
-	0xd28c, 0x1904, 0x307d, 0x0036, 0x73ac, 0x938e, 0xffff, 0x1110,
-	0x2019, 0x0001, 0x8314, 0x92e0, 0x1d80, 0x2c04, 0x938c, 0x0001,
-	0x0120, 0x9084, 0xff00, 0x8007, 0x0010, 0x9084, 0x00ff, 0x970e,
-	0x05d0, 0x908e, 0x0000, 0x05b8, 0x908e, 0x00ff, 0x1150, 0x7230,
-	0xd284, 0x15b0, 0x7294, 0xc28d, 0x7296, 0x70af, 0xffff, 0x003e,
-	0x04a0, 0x900e, 0x080c, 0x2630, 0x080c, 0x65e3, 0x1538, 0x9006,
-	0xb8bb, 0x0520, 0xb8ac, 0x9005, 0x0148, 0x00c6, 0x2060, 0x080c,
-	0x8ba9, 0x00ce, 0x090c, 0x8f4f, 0xb8af, 0x0000, 0x080c, 0x6a8e,
-	0x1168, 0x7030, 0xd08c, 0x0130, 0xb800, 0xd0bc, 0x0138, 0x080c,
-	0x6937, 0x0120, 0x080c, 0x310e, 0x0148, 0x0028, 0x080c, 0x325a,
-	0x080c, 0x313a, 0x0118, 0x8318, 0x0804, 0x302a, 0x73ae, 0x0010,
-	0x70af, 0xffff, 0x003e, 0x0804, 0x30f0, 0x9780, 0x3388, 0x203d,
-	0x97bc, 0xff00, 0x873f, 0x2041, 0x007e, 0x70ac, 0x9096, 0xffff,
-	0x1118, 0x900e, 0x28a8, 0x0050, 0x9812, 0x0220, 0x2008, 0x9802,
-	0x20a8, 0x0020, 0x70af, 0xffff, 0x0804, 0x30f0, 0x2700, 0x0156,
-	0x0016, 0x9106, 0x0904, 0x30e5, 0xc484, 0x080c, 0x6644, 0x0148,
-	0x080c, 0xcf84, 0x1904, 0x30e5, 0x080c, 0x65e3, 0x1904, 0x30ed,
-	0x0008, 0xc485, 0xb8bb, 0x0520, 0xb8ac, 0x9005, 0x0148, 0x00c6,
-	0x2060, 0x080c, 0x8ba9, 0x00ce, 0x090c, 0x8f4f, 0xb8af, 0x0000,
-	0x080c, 0x6a8e, 0x1130, 0x7030, 0xd08c, 0x01f8, 0xb800, 0xd0bc,
-	0x11e0, 0x7294, 0xd28c, 0x0180, 0x080c, 0x6a8e, 0x9082, 0x0006,
-	0x02e0, 0xd484, 0x1118, 0x080c, 0x6608, 0x0028, 0x080c, 0x32ed,
-	0x01a0, 0x080c, 0x3318, 0x0088, 0x080c, 0x325a, 0x080c, 0xcf84,
-	0x1160, 0x080c, 0x313a, 0x0188, 0x0040, 0x080c, 0xcf84, 0x1118,
-	0x080c, 0x32ed, 0x0110, 0x0451, 0x0140, 0x001e, 0x8108, 0x015e,
-	0x1f04, 0x3096, 0x70af, 0xffff, 0x0018, 0x001e, 0x015e, 0x71ae,
-	0x004e, 0x002e, 0x00ce, 0x00be, 0x0005, 0x00c6, 0x0016, 0x70af,
-	0x0001, 0x2009, 0x007e, 0x080c, 0x65e3, 0x1168, 0xb813, 0x00ff,
-	0xb817, 0xfffe, 0x080c, 0x325a, 0x04a9, 0x0128, 0x70dc, 0xc0bd,
-	0x70de, 0x080c, 0xccd1, 0x001e, 0x00ce, 0x0005, 0x0016, 0x0076,
-	0x00d6, 0x00c6, 0x2001, 0x184c, 0x2004, 0x9084, 0x00ff, 0xb842,
-	0x080c, 0xac60, 0x01d0, 0x2b00, 0x6012, 0x080c, 0xccfe, 0x6023,
-	0x0001, 0x9006, 0x080c, 0x6580, 0x2001, 0x0000, 0x080c, 0x6594,
-	0x0126, 0x2091, 0x8000, 0x70a8, 0x8000, 0x70aa, 0x012e, 0x2009,
-	0x0004, 0x080c, 0xac8d, 0x9085, 0x0001, 0x00ce, 0x00de, 0x007e,
-	0x001e, 0x0005, 0x0016, 0x0076, 0x00d6, 0x00c6, 0x2001, 0x184c,
-	0x2004, 0x9084, 0x00ff, 0xb842, 0x080c, 0xac60, 0x0548, 0x2b00,
-	0x6012, 0xb800, 0xc0c4, 0xb802, 0xb8a0, 0x9086, 0x007e, 0x0140,
-	0xb804, 0x9084, 0x00ff, 0x9086, 0x0006, 0x1110, 0x080c, 0x320f,
-	0x080c, 0xccfe, 0x6023, 0x0001, 0x9006, 0x080c, 0x6580, 0x2001,
-	0x0002, 0x080c, 0x6594, 0x0126, 0x2091, 0x8000, 0x70a8, 0x8000,
-	0x70aa, 0x012e, 0x2009, 0x0002, 0x080c, 0xac8d, 0x9085, 0x0001,
-	0x00ce, 0x00de, 0x007e, 0x001e, 0x0005, 0x00b6, 0x00c6, 0x0026,
-	0x2009, 0x0080, 0x080c, 0x65e3, 0x1140, 0xb813, 0x00ff, 0xb817,
-	0xfffc, 0x0039, 0x0110, 0x70e3, 0xffff, 0x002e, 0x00ce, 0x00be,
-	0x0005, 0x0016, 0x0076, 0x00d6, 0x00c6, 0x080c, 0xab9a, 0x01d0,
-	0x2b00, 0x6012, 0x080c, 0xccfe, 0x6023, 0x0001, 0x9006, 0x080c,
-	0x6580, 0x2001, 0x0002, 0x080c, 0x6594, 0x0126, 0x2091, 0x8000,
-	0x70e4, 0x8000, 0x70e6, 0x012e, 0x2009, 0x0002, 0x080c, 0xac8d,
-	0x9085, 0x0001, 0x00ce, 0x00de, 0x007e, 0x001e, 0x0005, 0x00c6,
-	0x00d6, 0x0126, 0x2091, 0x8000, 0x2009, 0x007f, 0x080c, 0x65e3,
-	0x11b8, 0xb813, 0x00ff, 0xb817, 0xfffd, 0xb8d7, 0x0004, 0x080c,
-	0xab9a, 0x0170, 0x2b00, 0x6012, 0x6316, 0x6023, 0x0001, 0x620a,
-	0x080c, 0xccfe, 0x2009, 0x0022, 0x080c, 0xac8d, 0x9085, 0x0001,
-	0x012e, 0x00de, 0x00ce, 0x0005, 0x00e6, 0x00c6, 0x0066, 0x0036,
-	0x0026, 0x00b6, 0x21f0, 0x080c, 0xa899, 0x0106, 0x080c, 0x93d1,
-	0x080c, 0x9342, 0x080c, 0xa7ea, 0x080c, 0xbb2c, 0x010e, 0x090c,
-	0xa8b5, 0x3e08, 0x2130, 0x81ff, 0x0120, 0x20a9, 0x007e, 0x900e,
-	0x0018, 0x20a9, 0x007f, 0x900e, 0x0016, 0x080c, 0x6644, 0x1140,
-	0x9686, 0x0002, 0x1118, 0xb800, 0xd0bc, 0x1110, 0x080c, 0x605e,
-	0x001e, 0x8108, 0x1f04, 0x31f4, 0x9686, 0x0001, 0x190c, 0x334b,
-	0x00be, 0x002e, 0x003e, 0x006e, 0x00ce, 0x00ee, 0x0005, 0x00e6,
-	0x00c6, 0x0046, 0x0036, 0x0026, 0x0016, 0x00b6, 0x080c, 0xa899,
-	0x0106, 0x6210, 0x2258, 0xbaa0, 0x0026, 0x2019, 0x0029, 0x080c,
-	0x93c6, 0x0076, 0x2039, 0x0000, 0x080c, 0x928f, 0x2c08, 0x080c,
-	0xe038, 0x007e, 0x001e, 0x010e, 0x090c, 0xa8b5, 0xba10, 0xbb14,
-	0xbc84, 0x080c, 0x605e, 0xba12, 0xbb16, 0xbc86, 0x00be, 0x001e,
-	0x002e, 0x003e, 0x004e, 0x00ce, 0x00ee, 0x0005, 0x00e6, 0x0006,
-	0x00b6, 0x6010, 0x2058, 0xb8a0, 0x00be, 0x9086, 0x0080, 0x0150,
-	0x2071, 0x1800, 0x70a8, 0x9005, 0x0110, 0x8001, 0x70aa, 0x000e,
-	0x00ee, 0x0005, 0x2071, 0x1800, 0x70e4, 0x9005, 0x0dc0, 0x8001,
-	0x70e6, 0x0ca8, 0xb800, 0xc08c, 0xb802, 0x0005, 0x00f6, 0x00e6,
-	0x00c6, 0x00b6, 0x0046, 0x0036, 0x0026, 0x0016, 0x0156, 0x2178,
-	0x080c, 0xa899, 0x0106, 0x81ff, 0x1118, 0x20a9, 0x0001, 0x0078,
-	0x080c, 0x56f5, 0xd0c4, 0x0140, 0xd0a4, 0x0130, 0x9006, 0x2020,
-	0x2009, 0x002d, 0x080c, 0xe316, 0x20a9, 0x0800, 0x9016, 0x0026,
-	0x928e, 0x007e, 0x0904, 0x32c9, 0x928e, 0x007f, 0x0904, 0x32c9,
-	0x928e, 0x0080, 0x05f0, 0x9288, 0x1000, 0x210c, 0x81ff, 0x05c8,
-	0x8fff, 0x1150, 0x2001, 0x198d, 0x0006, 0x2003, 0x0001, 0x080c,
-	0x32da, 0x000e, 0x2003, 0x0000, 0x00b6, 0x00c6, 0x2158, 0x2001,
-	0x0001, 0x080c, 0x6a58, 0x00ce, 0x00be, 0x2019, 0x0029, 0x080c,
-	0x93c6, 0x0076, 0x2039, 0x0000, 0x080c, 0x928f, 0x00b6, 0x00c6,
-	0x0026, 0x2158, 0xba04, 0x9294, 0x00ff, 0x9286, 0x0006, 0x1118,
-	0xb807, 0x0404, 0x0028, 0x2001, 0x0004, 0x8007, 0x9215, 0xba06,
-	0x002e, 0x00ce, 0x00be, 0x0016, 0x2c08, 0x080c, 0xe038, 0x001e,
-	0x007e, 0x002e, 0x8210, 0x1f04, 0x327f, 0x010e, 0x090c, 0xa8b5,
-	0x015e, 0x001e, 0x002e, 0x003e, 0x004e, 0x00be, 0x00ce, 0x00ee,
-	0x00fe, 0x0005, 0x0046, 0x0026, 0x0016, 0x080c, 0x56f5, 0xd0c4,
-	0x0140, 0xd0a4, 0x0130, 0x9006, 0x2220, 0x2009, 0x0029, 0x080c,
-	0xe316, 0x001e, 0x002e, 0x004e, 0x0005, 0x0016, 0x0026, 0x0036,
-	0x00c6, 0x7294, 0x82ff, 0x01e8, 0x080c, 0x6a86, 0x11d0, 0x2100,
-	0x080c, 0x2663, 0x81ff, 0x01b8, 0x2019, 0x0001, 0x8314, 0x92e0,
-	0x1d80, 0x2c04, 0xd384, 0x0120, 0x9084, 0xff00, 0x8007, 0x0010,
-	0x9084, 0x00ff, 0x9116, 0x0138, 0x9096, 0x00ff, 0x0110, 0x8318,
-	0x0c68, 0x9085, 0x0001, 0x00ce, 0x003e, 0x002e, 0x001e, 0x0005,
-	0x0016, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0xa899, 0x0106,
-	0x0036, 0x2019, 0x0029, 0x00c1, 0x003e, 0x010e, 0x090c, 0xa8b5,
-	0x9180, 0x1000, 0x2004, 0x9065, 0x0158, 0x0016, 0x00c6, 0x2061,
-	0x1b31, 0x001e, 0x6112, 0x080c, 0x320f, 0x001e, 0x080c, 0x6608,
-	0x012e, 0x00ce, 0x001e, 0x0005, 0x0016, 0x0026, 0x2110, 0x080c,
-	0xa37f, 0x080c, 0xe67d, 0x002e, 0x001e, 0x0005, 0x2001, 0x1837,
-	0x2004, 0xd0cc, 0x0005, 0x00c6, 0x00b6, 0x080c, 0x74ec, 0x1118,
-	0x20a9, 0x0800, 0x0010, 0x20a9, 0x0782, 0x080c, 0x74ec, 0x1110,
-	0x900e, 0x0010, 0x2009, 0x007e, 0x9180, 0x1000, 0x2004, 0x905d,
-	0x0130, 0x86ff, 0x0110, 0xb800, 0xd0bc, 0x090c, 0x6608, 0x8108,
-	0x1f04, 0x335c, 0x2061, 0x1800, 0x607f, 0x0000, 0x6080, 0x9084,
-	0x00ff, 0x6082, 0x60b3, 0x0000, 0x00be, 0x00ce, 0x0005, 0x2001,
-	0x1869, 0x2004, 0xd0bc, 0x0005, 0x2011, 0x1848, 0x2214, 0xd2ec,
-	0x0005, 0x0026, 0x2011, 0x1867, 0x2214, 0xd2dc, 0x002e, 0x0005,
-	0x7eef, 0x7de8, 0x7ce4, 0x80e2, 0x7be1, 0x80e0, 0x80dc, 0x80da,
-	0x7ad9, 0x80d6, 0x80d5, 0x80d4, 0x80d3, 0x80d2, 0x80d1, 0x79ce,
-	0x78cd, 0x80cc, 0x80cb, 0x80ca, 0x80c9, 0x80c7, 0x80c6, 0x77c5,
-	0x76c3, 0x80bc, 0x80ba, 0x75b9, 0x80b6, 0x74b5, 0x73b4, 0x72b3,
-	0x80b2, 0x80b1, 0x80ae, 0x71ad, 0x80ac, 0x70ab, 0x6faa, 0x6ea9,
-	0x80a7, 0x6da6, 0x6ca5, 0x6ba3, 0x6a9f, 0x699e, 0x689d, 0x809b,
-	0x8098, 0x6797, 0x6690, 0x658f, 0x6488, 0x6384, 0x6282, 0x8081,
-	0x8080, 0x617c, 0x607a, 0x8079, 0x5f76, 0x8075, 0x8074, 0x8073,
-	0x8072, 0x8071, 0x806e, 0x5e6d, 0x806c, 0x5d6b, 0x5c6a, 0x5b69,
-	0x8067, 0x5a66, 0x5965, 0x5863, 0x575c, 0x565a, 0x5559, 0x8056,
-	0x8055, 0x5454, 0x5353, 0x5252, 0x5151, 0x504e, 0x4f4d, 0x804c,
-	0x804b, 0x4e4a, 0x4d49, 0x8047, 0x4c46, 0x8045, 0x8043, 0x803c,
-	0x803a, 0x8039, 0x8036, 0x4b35, 0x8034, 0x4a33, 0x4932, 0x4831,
-	0x802e, 0x472d, 0x462c, 0x452b, 0x442a, 0x4329, 0x4227, 0x8026,
-	0x8025, 0x4123, 0x401f, 0x3f1e, 0x3e1d, 0x3d1b, 0x3c18, 0x8017,
-	0x8010, 0x3b0f, 0x3a08, 0x8004, 0x3902, 0x8001, 0x8000, 0x8000,
-	0x3800, 0x3700, 0x3600, 0x8000, 0x3500, 0x8000, 0x8000, 0x8000,
-	0x3400, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x3300,
-	0x3200, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x3100,
-	0x3000, 0x8000, 0x8000, 0x2f00, 0x8000, 0x2e00, 0x2d00, 0x2c00,
-	0x8000, 0x8000, 0x8000, 0x2b00, 0x8000, 0x2a00, 0x2900, 0x2800,
-	0x8000, 0x2700, 0x2600, 0x2500, 0x2400, 0x2300, 0x2200, 0x8000,
-	0x8000, 0x2100, 0x2000, 0x1f00, 0x1e00, 0x1d00, 0x1c00, 0x8000,
-	0x8000, 0x1b00, 0x1a00, 0x8000, 0x1900, 0x8000, 0x8000, 0x8000,
-	0x8000, 0x8000, 0x8000, 0x1800, 0x8000, 0x1700, 0x1600, 0x1500,
-	0x8000, 0x1400, 0x1300, 0x1200, 0x1100, 0x1000, 0x0f00, 0x8000,
-	0x8000, 0x0e00, 0x0d00, 0x0c00, 0x0b00, 0x0a00, 0x0900, 0x8000,
-	0x8000, 0x0800, 0x0700, 0x8000, 0x0600, 0x8000, 0x8000, 0x8000,
-	0x0500, 0x0400, 0x0300, 0x8000, 0x0200, 0x8000, 0x8000, 0x8000,
-	0x0100, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x0000,
-	0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
+	0x001e, 0x012e, 0x0005, 0xa804, 0x9045, 0x090c, 0x0d7d, 0xa80e,
+	0xa064, 0xa81a, 0x9084, 0x000f, 0x9080, 0x1eab, 0x2015, 0x82ff,
+	0x090c, 0x0d7d, 0xaa12, 0x2205, 0xa80a, 0x0c08, 0x903e, 0x2730,
+	0xa880, 0xd0fc, 0x1190, 0x2d00, 0x0002, 0x1a88, 0x19b5, 0x19b5,
+	0x1a88, 0x19b5, 0x1a82, 0x1a88, 0x19b5, 0x1a25, 0x1a25, 0x1a25,
+	0x1a88, 0x1a25, 0x1a88, 0x1a7f, 0x1a25, 0xc0fc, 0xa882, 0xab2c,
+	0xaa30, 0xad1c, 0xac20, 0xdd9c, 0x0904, 0x1a8a, 0x2c05, 0x908a,
+	0x0034, 0x1a0c, 0x0d7d, 0x9082, 0x001b, 0x0002, 0x19a1, 0x199f,
+	0x199f, 0x199f, 0x199f, 0x199f, 0x19a5, 0x199f, 0x199f, 0x199f,
+	0x199f, 0x199f, 0x19a9, 0x199f, 0x199f, 0x199f, 0x199f, 0x199f,
+	0x19ad, 0x199f, 0x199f, 0x199f, 0x199f, 0x199f, 0x19b1, 0x080c,
+	0x0d7d, 0xa774, 0xa678, 0x0804, 0x1a8a, 0xa78c, 0xa690, 0x0804,
+	0x1a8a, 0xa7a4, 0xa6a8, 0x0804, 0x1a8a, 0xa7bc, 0xa6c0, 0x0804,
+	0x1a8a, 0xa7d4, 0xa6d8, 0x0804, 0x1a8a, 0xa898, 0x901d, 0x1108,
+	0xab9c, 0x9016, 0x2c05, 0x908a, 0x0036, 0x1a0c, 0x0d7d, 0x9082,
+	0x001b, 0x0002, 0x19dd, 0x19dd, 0x19df, 0x19dd, 0x19dd, 0x19dd,
+	0x19e9, 0x19dd, 0x19dd, 0x19dd, 0x19f3, 0x19dd, 0x19dd, 0x19dd,
+	0x19fd, 0x19dd, 0x19dd, 0x19dd, 0x1a07, 0x19dd, 0x19dd, 0x19dd,
+	0x1a11, 0x19dd, 0x19dd, 0x19dd, 0x1a1b, 0x080c, 0x0d7d, 0xa574,
+	0xa478, 0x9d86, 0x0004, 0x0904, 0x1a8a, 0xa37c, 0xa280, 0x0804,
+	0x1a8a, 0xa584, 0xa488, 0x9d86, 0x0004, 0x0904, 0x1a8a, 0xa38c,
+	0xa290, 0x0804, 0x1a8a, 0xa594, 0xa498, 0x9d86, 0x0004, 0x0904,
+	0x1a8a, 0xa39c, 0xa2a0, 0x0804, 0x1a8a, 0xa5a4, 0xa4a8, 0x9d86,
+	0x0004, 0x0904, 0x1a8a, 0xa3ac, 0xa2b0, 0x0804, 0x1a8a, 0xa5b4,
+	0xa4b8, 0x9d86, 0x0004, 0x0904, 0x1a8a, 0xa3bc, 0xa2c0, 0x0804,
+	0x1a8a, 0xa5c4, 0xa4c8, 0x9d86, 0x0004, 0x0904, 0x1a8a, 0xa3cc,
+	0xa2d0, 0x0804, 0x1a8a, 0xa5d4, 0xa4d8, 0x9d86, 0x0004, 0x0904,
+	0x1a8a, 0xa3dc, 0xa2e0, 0x0804, 0x1a8a, 0xa898, 0x901d, 0x1108,
+	0xab9c, 0x9016, 0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0d7d, 0x9082,
+	0x001b, 0x0002, 0x1a4d, 0x1a4b, 0x1a4b, 0x1a4b, 0x1a4b, 0x1a4b,
+	0x1a57, 0x1a4b, 0x1a4b, 0x1a4b, 0x1a4b, 0x1a4b, 0x1a61, 0x1a4b,
+	0x1a4b, 0x1a4b, 0x1a4b, 0x1a4b, 0x1a6b, 0x1a4b, 0x1a4b, 0x1a4b,
+	0x1a4b, 0x1a4b, 0x1a75, 0x080c, 0x0d7d, 0xa56c, 0xa470, 0xa774,
+	0xa678, 0x9d86, 0x000c, 0x05b0, 0xa37c, 0xa280, 0x0498, 0xa584,
+	0xa488, 0xa78c, 0xa690, 0x9d86, 0x000c, 0x0560, 0xa394, 0xa298,
+	0x0448, 0xa59c, 0xa4a0, 0xa7a4, 0xa6a8, 0x9d86, 0x000c, 0x0510,
+	0xa3ac, 0xa2b0, 0x00f8, 0xa5b4, 0xa4b8, 0xa7bc, 0xa6c0, 0x9d86,
+	0x000c, 0x01c0, 0xa3c4, 0xa2c8, 0x00a8, 0xa5cc, 0xa4d0, 0xa7d4,
+	0xa6d8, 0x9d86, 0x000c, 0x0170, 0xa3dc, 0xa2e0, 0x0058, 0x9d86,
+	0x000e, 0x1130, 0x080c, 0x1e81, 0x1904, 0x195e, 0x900e, 0x0050,
+	0x080c, 0x0d7d, 0xab2e, 0xaa32, 0xad1e, 0xac22, 0xaf26, 0xae2a,
+	0x080c, 0x1e81, 0x0005, 0x6014, 0x2048, 0x6118, 0x810c, 0x810c,
+	0x810c, 0x81ff, 0x1118, 0xa887, 0x0001, 0x0008, 0xa986, 0x601b,
+	0x0002, 0xa874, 0x9084, 0x00ff, 0x9084, 0x0008, 0x0150, 0x00e9,
+	0x6000, 0x9086, 0x0004, 0x1120, 0x2009, 0x0048, 0x080c, 0xad4d,
+	0x0005, 0xa974, 0xd1dc, 0x1108, 0x0005, 0xa934, 0xa88c, 0x9106,
+	0x1158, 0xa938, 0xa890, 0x9106, 0x1138, 0x601c, 0xc084, 0x601e,
+	0x2009, 0x0048, 0x0804, 0xad4d, 0x0005, 0x0126, 0x00c6, 0x2091,
+	0x2200, 0x00ce, 0x7908, 0x918c, 0x0007, 0x9186, 0x0000, 0x05b0,
+	0x9186, 0x0003, 0x0598, 0x6020, 0x6023, 0x0000, 0x0006, 0x2031,
+	0x0008, 0x00c6, 0x781f, 0x0808, 0x7808, 0xd09c, 0x0120, 0x080c,
+	0x13bb, 0x8631, 0x1db8, 0x00ce, 0x781f, 0x0800, 0x2031, 0x0168,
+	0x00c6, 0x7808, 0xd09c, 0x190c, 0x13bb, 0x00ce, 0x2001, 0x0038,
+	0x080c, 0x1b98, 0x7930, 0x9186, 0x0040, 0x0160, 0x9186, 0x0042,
+	0x190c, 0x0d7d, 0x2001, 0x001e, 0x8001, 0x1df0, 0x8631, 0x1d40,
+	0x080c, 0x1ba7, 0x000e, 0x6022, 0x012e, 0x0005, 0x080c, 0x1b94,
+	0x7827, 0x0015, 0x7828, 0x9c06, 0x1db8, 0x782b, 0x0000, 0x0ca0,
+	0x00f6, 0x2079, 0x0300, 0x7803, 0x0000, 0x78ab, 0x0004, 0x00fe,
+	0x080c, 0x753d, 0x1188, 0x2001, 0x0138, 0x2003, 0x0000, 0x2001,
+	0x0160, 0x2003, 0x0000, 0x2011, 0x012c, 0xa001, 0xa001, 0x8211,
+	0x1de0, 0x0059, 0x0804, 0x75e2, 0x0479, 0x0039, 0x2001, 0x0160,
+	0x2502, 0x2001, 0x0138, 0x2202, 0x0005, 0x00e6, 0x2071, 0x0200,
+	0x080c, 0x2a6c, 0x2009, 0x003c, 0x080c, 0x220a, 0x2001, 0x015d,
+	0x2003, 0x0000, 0x7000, 0x9084, 0x003c, 0x1de0, 0x080c, 0x85ce,
+	0x70a0, 0x70a2, 0x7098, 0x709a, 0x709c, 0x709e, 0x2001, 0x020d,
+	0x2003, 0x0020, 0x00f6, 0x2079, 0x0300, 0x080c, 0x1354, 0x7803,
+	0x0001, 0x00fe, 0x00ee, 0x0005, 0x2001, 0x0138, 0x2014, 0x2003,
+	0x0000, 0x2001, 0x0160, 0x202c, 0x2003, 0x0000, 0x080c, 0x753d,
+	0x1108, 0x0005, 0x2021, 0x0260, 0x2001, 0x0141, 0x201c, 0xd3dc,
+	0x1168, 0x2001, 0x0109, 0x201c, 0x939c, 0x0048, 0x1160, 0x2001,
+	0x0111, 0x201c, 0x83ff, 0x1110, 0x8421, 0x1d70, 0x2001, 0x015d,
+	0x2003, 0x0000, 0x0005, 0x0046, 0x2021, 0x0019, 0x2003, 0x0048,
+	0xa001, 0xa001, 0x201c, 0x939c, 0x0048, 0x0120, 0x8421, 0x1db0,
+	0x004e, 0x0c60, 0x004e, 0x0c40, 0x601c, 0xc084, 0x601e, 0x0005,
+	0x2c08, 0x621c, 0x080c, 0x16a0, 0x7930, 0x0005, 0x2c08, 0x621c,
+	0x080c, 0x16cd, 0x7930, 0x0005, 0x8001, 0x1df0, 0x0005, 0x2031,
+	0x0064, 0x781c, 0x9084, 0x0007, 0x0170, 0x2001, 0x0038, 0x0c41,
+	0x9186, 0x0040, 0x0904, 0x1c05, 0x2001, 0x001e, 0x0c69, 0x8631,
+	0x1d80, 0x080c, 0x0d7d, 0x781f, 0x0202, 0x2001, 0x015d, 0x2003,
+	0x0000, 0x2001, 0x0dac, 0x0c01, 0x781c, 0xd084, 0x0110, 0x0861,
+	0x04e0, 0x2001, 0x0030, 0x0891, 0x9186, 0x0040, 0x0568, 0x781c,
+	0xd084, 0x1da8, 0x781f, 0x0101, 0x2001, 0x0014, 0x0869, 0x2001,
+	0x0037, 0x0821, 0x9186, 0x0040, 0x0140, 0x2001, 0x0030, 0x080c,
+	0x1b9e, 0x9186, 0x0040, 0x190c, 0x0d7d, 0x00d6, 0x2069, 0x0200,
+	0x692c, 0xd1f4, 0x1170, 0xd1c4, 0x0160, 0xd19c, 0x0130, 0x6800,
+	0x9085, 0x1800, 0x6802, 0x00de, 0x0080, 0x6908, 0x9184, 0x0007,
+	0x1db0, 0x00de, 0x781f, 0x0100, 0x791c, 0x9184, 0x0007, 0x090c,
+	0x0d7d, 0xa001, 0xa001, 0x781f, 0x0200, 0x0005, 0x0126, 0x2091,
+	0x2400, 0x2079, 0x0380, 0x2001, 0x19e6, 0x2070, 0x012e, 0x0005,
+	0x2cf0, 0x0126, 0x2091, 0x2400, 0x3e60, 0x6014, 0x2048, 0xa964,
+	0xa91a, 0x918c, 0x00ff, 0x9184, 0x000f, 0x0002, 0x1c3a, 0x1c3a,
+	0x1c3a, 0x1c3c, 0x1c3a, 0x1c3a, 0x1c3a, 0x1c3a, 0x1c2e, 0x1c44,
+	0x1c3a, 0x1c40, 0x1c3a, 0x1c3a, 0x1c3a, 0x1c3a, 0x9086, 0x0008,
+	0x1148, 0xa87c, 0xd0b4, 0x0904, 0x1db4, 0x2011, 0x1ea6, 0x2205,
+	0xab88, 0x00a8, 0x080c, 0x0d7d, 0x9186, 0x0013, 0x0128, 0x0cd0,
+	0x9186, 0x001b, 0x0108, 0x0cb0, 0xa87c, 0xd0b4, 0x0904, 0x1db4,
+	0x9184, 0x000f, 0x9080, 0x1eab, 0x2015, 0x2205, 0xab88, 0x2908,
+	0xa80a, 0xa90e, 0xaa12, 0xab16, 0x9006, 0xa842, 0xa83e, 0x012e,
+	0x0005, 0x2cf0, 0x0126, 0x2091, 0x2400, 0x3e60, 0x6014, 0x2048,
+	0xa88c, 0xa990, 0xaaac, 0xabb0, 0xaa36, 0xab3a, 0xa83e, 0xa942,
+	0xa846, 0xa94a, 0xa964, 0x918c, 0x00ff, 0x9186, 0x001e, 0x0198,
+	0x2940, 0xa064, 0xa81a, 0x90ec, 0x000f, 0x9d80, 0x1eab, 0x2065,
+	0x2c05, 0x2808, 0x2c10, 0xab88, 0xa80a, 0xa90e, 0xaa12, 0xab16,
+	0x012e, 0x3e60, 0x0005, 0xa804, 0x2040, 0x0c58, 0x2cf0, 0x0126,
+	0x2091, 0x2400, 0x3e60, 0x6014, 0x2048, 0xa97c, 0x2950, 0xd1dc,
+	0x1904, 0x1d7e, 0xc1dd, 0xa97e, 0x9006, 0xa842, 0xa83e, 0xa988,
+	0x8109, 0xa916, 0xa964, 0xa91a, 0x9184, 0x000f, 0x9088, 0x1eab,
+	0x2145, 0x0002, 0x1cb2, 0x1cc0, 0x1cb2, 0x1cb2, 0x1cb2, 0x1cb4,
+	0x1cb2, 0x1cb2, 0x1d15, 0x1d15, 0x1cb2, 0x1cb2, 0x1cb2, 0x1d13,
+	0x1cb2, 0x1cb2, 0x080c, 0x0d7d, 0xa804, 0x2050, 0xb164, 0xa91a,
+	0x9184, 0x000f, 0x9080, 0x1eab, 0x2045, 0xd19c, 0x1904, 0x1d15,
+	0x9036, 0x2638, 0x2805, 0x908a, 0x0036, 0x1a0c, 0x0d7d, 0x9082,
+	0x001b, 0x0002, 0x1ce5, 0x1ce5, 0x1ce7, 0x1ce5, 0x1ce5, 0x1ce5,
+	0x1ced, 0x1ce5, 0x1ce5, 0x1ce5, 0x1cf3, 0x1ce5, 0x1ce5, 0x1ce5,
+	0x1cf9, 0x1ce5, 0x1ce5, 0x1ce5, 0x1cff, 0x1ce5, 0x1ce5, 0x1ce5,
+	0x1d05, 0x1ce5, 0x1ce5, 0x1ce5, 0x1d0b, 0x080c, 0x0d7d, 0xb574,
+	0xb478, 0xb37c, 0xb280, 0x0804, 0x1d5a, 0xb584, 0xb488, 0xb38c,
+	0xb290, 0x0804, 0x1d5a, 0xb594, 0xb498, 0xb39c, 0xb2a0, 0x0804,
+	0x1d5a, 0xb5a4, 0xb4a8, 0xb3ac, 0xb2b0, 0x0804, 0x1d5a, 0xb5b4,
+	0xb4b8, 0xb3bc, 0xb2c0, 0x0804, 0x1d5a, 0xb5c4, 0xb4c8, 0xb3cc,
+	0xb2d0, 0x0804, 0x1d5a, 0xb5d4, 0xb4d8, 0xb3dc, 0xb2e0, 0x0804,
+	0x1d5a, 0x0804, 0x1d5a, 0x080c, 0x0d7d, 0x2805, 0x908a, 0x0034,
+	0x1a0c, 0x0d7d, 0x9082, 0x001b, 0x0002, 0x1d38, 0x1d36, 0x1d36,
+	0x1d36, 0x1d36, 0x1d36, 0x1d3f, 0x1d36, 0x1d36, 0x1d36, 0x1d36,
+	0x1d36, 0x1d46, 0x1d36, 0x1d36, 0x1d36, 0x1d36, 0x1d36, 0x1d4d,
+	0x1d36, 0x1d36, 0x1d36, 0x1d36, 0x1d36, 0x1d54, 0x080c, 0x0d7d,
+	0xb56c, 0xb470, 0xb774, 0xb678, 0xb37c, 0xb280, 0x00d8, 0xb584,
+	0xb488, 0xb78c, 0xb690, 0xb394, 0xb298, 0x00a0, 0xb59c, 0xb4a0,
+	0xb7a4, 0xb6a8, 0xb3ac, 0xb2b0, 0x0068, 0xb5b4, 0xb4b8, 0xb7bc,
+	0xb6c0, 0xb3c4, 0xb2c8, 0x0030, 0xb5cc, 0xb4d0, 0xb7d4, 0xb6d8,
+	0xb3dc, 0xb2e0, 0xab2e, 0xaa32, 0xad1e, 0xac22, 0xaf26, 0xae2a,
+	0xa988, 0x8109, 0xa916, 0x1118, 0x9006, 0x012e, 0x0005, 0x8840,
+	0x2805, 0x9005, 0x1168, 0xb004, 0x9005, 0x090c, 0x0d7d, 0x2050,
+	0xb164, 0xa91a, 0x9184, 0x000f, 0x9080, 0x1eab, 0x2045, 0x2805,
+	0x2810, 0x2a08, 0xa80a, 0xa90e, 0xaa12, 0x0c30, 0x3e60, 0x6344,
+	0xd3fc, 0x190c, 0x0d7d, 0xa93c, 0xaa40, 0xa844, 0x9106, 0x1118,
+	0xa848, 0x9206, 0x0508, 0x2958, 0xab48, 0xac44, 0x2940, 0x080c,
+	0x1ecb, 0x1998, 0x2850, 0x2c40, 0xab14, 0xa880, 0xd0fc, 0x1140,
+	0xa810, 0x2005, 0xa80a, 0x2a00, 0xa80e, 0x2009, 0x8015, 0x0070,
+	0x00c6, 0x3e60, 0x6044, 0xc0a4, 0x9085, 0x8005, 0x6046, 0x00ce,
+	0x8319, 0xab16, 0x1904, 0x1d67, 0x2009, 0x8005, 0x3e60, 0x6044,
+	0x9105, 0x6046, 0x0804, 0x1d64, 0x080c, 0x0d7d, 0x00f6, 0x00e6,
+	0x0096, 0x00c6, 0x0026, 0x704c, 0x9c06, 0x190c, 0x0d7d, 0x2079,
+	0x0090, 0x2001, 0x0105, 0x2003, 0x0010, 0x782b, 0x0004, 0x7057,
+	0x0000, 0x6014, 0x2048, 0x080c, 0xc97a, 0x0118, 0xa880, 0xc0bd,
+	0xa882, 0x6020, 0x9086, 0x0006, 0x1170, 0x2061, 0x0100, 0x62c8,
+	0x2001, 0x00fa, 0x8001, 0x1df0, 0x60c8, 0x9206, 0x1dc0, 0x60c4,
+	0xa89a, 0x60c8, 0xa896, 0x704c, 0x2060, 0x00c6, 0x080c, 0xc566,
+	0x080c, 0xa91e, 0x00ce, 0x704c, 0x9c06, 0x1150, 0x2009, 0x0040,
+	0x080c, 0x220a, 0x080c, 0xa3c3, 0x2011, 0x0000, 0x080c, 0xa24d,
+	0x002e, 0x00ce, 0x009e, 0x00ee, 0x00fe, 0x0005, 0x00f6, 0x2079,
+	0x0090, 0x781c, 0x0006, 0x7818, 0x0006, 0x2079, 0x0100, 0x7a14,
+	0x9284, 0x1984, 0x9085, 0x0012, 0x7816, 0x2019, 0x1000, 0x8319,
+	0x090c, 0x0d7d, 0x7820, 0xd0bc, 0x1dd0, 0x79c8, 0x000e, 0x9102,
+	0x001e, 0x0006, 0x0016, 0x79c4, 0x000e, 0x9103, 0x78c6, 0x000e,
+	0x78ca, 0x9284, 0x1984, 0x9085, 0x0012, 0x7816, 0x2079, 0x0090,
+	0x782b, 0x0008, 0x7057, 0x0000, 0x00fe, 0x0005, 0x00f6, 0x00e6,
+	0x2071, 0x19e6, 0x7054, 0x9086, 0x0000, 0x0904, 0x1e7c, 0x2079,
+	0x0090, 0x2009, 0x0207, 0x210c, 0xd194, 0x01b8, 0x2009, 0x020c,
+	0x210c, 0x9184, 0x0003, 0x0188, 0x080c, 0xe8a3, 0x2001, 0x0133,
+	0x2004, 0x9005, 0x090c, 0x0d7d, 0x0016, 0x2009, 0x0040, 0x080c,
+	0x220a, 0x001e, 0x2001, 0x020c, 0x2102, 0x2009, 0x0206, 0x2104,
+	0x2009, 0x0203, 0x210c, 0x9106, 0x1120, 0x2009, 0x0040, 0x080c,
+	0x220a, 0x782c, 0xd0fc, 0x09a8, 0x080c, 0xa93a, 0x782c, 0xd0fc,
+	0x1de8, 0x080c, 0xa91e, 0x7054, 0x9086, 0x0000, 0x1950, 0x782b,
+	0x0004, 0x782c, 0xd0ac, 0x1de8, 0x2009, 0x0040, 0x080c, 0x220a,
+	0x782b, 0x0002, 0x7057, 0x0000, 0x00ee, 0x00fe, 0x0005, 0x080c,
+	0x0d7d, 0x8c60, 0x2c05, 0x9005, 0x0110, 0x8a51, 0x0005, 0xa004,
+	0x9005, 0x0168, 0xa85a, 0x2040, 0xa064, 0x9084, 0x000f, 0x9080,
+	0x1eab, 0x2065, 0x8cff, 0x090c, 0x0d7d, 0x8a51, 0x0005, 0x2050,
+	0x0005, 0x0000, 0x001d, 0x0021, 0x0025, 0x0029, 0x002d, 0x0031,
+	0x0035, 0x0000, 0x001b, 0x0021, 0x0027, 0x002d, 0x0033, 0x0000,
+	0x0000, 0x0023, 0x0000, 0x0000, 0x1e9e, 0x1e9a, 0x1e9e, 0x1e9e,
+	0x1ea8, 0x0000, 0x1e9e, 0x1ea5, 0x1ea5, 0x1ea2, 0x1ea5, 0x1ea5,
+	0x0000, 0x1ea8, 0x1ea5, 0x0000, 0x1ea0, 0x1ea0, 0x0000, 0x1ea0,
+	0x1ea8, 0x0000, 0x1ea0, 0x1ea6, 0x1ea6, 0x1ea6, 0x0000, 0x1ea6,
+	0x0000, 0x1ea8, 0x1ea6, 0x00c6, 0x00d6, 0x0086, 0xab42, 0xac3e,
+	0xa888, 0x9055, 0x0904, 0x20aa, 0x2940, 0xa064, 0x90ec, 0x000f,
+	0x9084, 0x00ff, 0x9086, 0x0008, 0x1118, 0x2061, 0x1ea6, 0x00d0,
+	0x9de0, 0x1eab, 0x9d86, 0x0007, 0x0130, 0x9d86, 0x000e, 0x0118,
+	0x9d86, 0x000f, 0x1120, 0xa08c, 0x9422, 0xa090, 0x931b, 0x2c05,
+	0x9065, 0x1140, 0x0310, 0x0804, 0x20aa, 0xa004, 0x9045, 0x0904,
+	0x20aa, 0x08d8, 0x2c05, 0x9005, 0x0904, 0x1f92, 0xdd9c, 0x1904,
+	0x1f4e, 0x908a, 0x0036, 0x1a0c, 0x0d7d, 0x9082, 0x001b, 0x0002,
+	0x1f23, 0x1f23, 0x1f25, 0x1f23, 0x1f23, 0x1f23, 0x1f2b, 0x1f23,
+	0x1f23, 0x1f23, 0x1f31, 0x1f23, 0x1f23, 0x1f23, 0x1f37, 0x1f23,
+	0x1f23, 0x1f23, 0x1f3d, 0x1f23, 0x1f23, 0x1f23, 0x1f43, 0x1f23,
+	0x1f23, 0x1f23, 0x1f49, 0x080c, 0x0d7d, 0xa07c, 0x9422, 0xa080,
+	0x931b, 0x0804, 0x1f88, 0xa08c, 0x9422, 0xa090, 0x931b, 0x0804,
+	0x1f88, 0xa09c, 0x9422, 0xa0a0, 0x931b, 0x0804, 0x1f88, 0xa0ac,
+	0x9422, 0xa0b0, 0x931b, 0x0804, 0x1f88, 0xa0bc, 0x9422, 0xa0c0,
+	0x931b, 0x0804, 0x1f88, 0xa0cc, 0x9422, 0xa0d0, 0x931b, 0x0804,
+	0x1f88, 0xa0dc, 0x9422, 0xa0e0, 0x931b, 0x04d0, 0x908a, 0x0034,
+	0x1a0c, 0x0d7d, 0x9082, 0x001b, 0x0002, 0x1f70, 0x1f6e, 0x1f6e,
+	0x1f6e, 0x1f6e, 0x1f6e, 0x1f75, 0x1f6e, 0x1f6e, 0x1f6e, 0x1f6e,
+	0x1f6e, 0x1f7a, 0x1f6e, 0x1f6e, 0x1f6e, 0x1f6e, 0x1f6e, 0x1f7f,
+	0x1f6e, 0x1f6e, 0x1f6e, 0x1f6e, 0x1f6e, 0x1f84, 0x080c, 0x0d7d,
+	0xa07c, 0x9422, 0xa080, 0x931b, 0x0098, 0xa094, 0x9422, 0xa098,
+	0x931b, 0x0070, 0xa0ac, 0x9422, 0xa0b0, 0x931b, 0x0048, 0xa0c4,
+	0x9422, 0xa0c8, 0x931b, 0x0020, 0xa0dc, 0x9422, 0xa0e0, 0x931b,
+	0x0630, 0x2300, 0x9405, 0x0160, 0x8a51, 0x0904, 0x20aa, 0x8c60,
+	0x0804, 0x1efa, 0xa004, 0x9045, 0x0904, 0x20aa, 0x0804, 0x1ed5,
+	0x8a51, 0x0904, 0x20aa, 0x8c60, 0x2c05, 0x9005, 0x1158, 0xa004,
+	0x9045, 0x0904, 0x20aa, 0xa064, 0x90ec, 0x000f, 0x9de0, 0x1eab,
+	0x2c05, 0x2060, 0xa880, 0xc0fc, 0xa882, 0x0804, 0x209f, 0x2c05,
+	0x8422, 0x8420, 0x831a, 0x9399, 0x0000, 0xac2e, 0xab32, 0xdd9c,
+	0x1904, 0x203c, 0x9082, 0x001b, 0x0002, 0x1fd8, 0x1fd8, 0x1fda,
+	0x1fd8, 0x1fd8, 0x1fd8, 0x1fe8, 0x1fd8, 0x1fd8, 0x1fd8, 0x1ff6,
+	0x1fd8, 0x1fd8, 0x1fd8, 0x2004, 0x1fd8, 0x1fd8, 0x1fd8, 0x2012,
+	0x1fd8, 0x1fd8, 0x1fd8, 0x2020, 0x1fd8, 0x1fd8, 0x1fd8, 0x202e,
+	0x080c, 0x0d7d, 0xa17c, 0x2400, 0x9122, 0xa180, 0x2300, 0x911b,
+	0x0a0c, 0x0d7d, 0xa074, 0x9420, 0xa078, 0x9319, 0x0804, 0x209a,
+	0xa18c, 0x2400, 0x9122, 0xa190, 0x2300, 0x911b, 0x0a0c, 0x0d7d,
+	0xa084, 0x9420, 0xa088, 0x9319, 0x0804, 0x209a, 0xa19c, 0x2400,
+	0x9122, 0xa1a0, 0x2300, 0x911b, 0x0a0c, 0x0d7d, 0xa094, 0x9420,
+	0xa098, 0x9319, 0x0804, 0x209a, 0xa1ac, 0x2400, 0x9122, 0xa1b0,
+	0x2300, 0x911b, 0x0a0c, 0x0d7d, 0xa0a4, 0x9420, 0xa0a8, 0x9319,
+	0x0804, 0x209a, 0xa1bc, 0x2400, 0x9122, 0xa1c0, 0x2300, 0x911b,
+	0x0a0c, 0x0d7d, 0xa0b4, 0x9420, 0xa0b8, 0x9319, 0x0804, 0x209a,
+	0xa1cc, 0x2400, 0x9122, 0xa1d0, 0x2300, 0x911b, 0x0a0c, 0x0d7d,
+	0xa0c4, 0x9420, 0xa0c8, 0x9319, 0x0804, 0x209a, 0xa1dc, 0x2400,
+	0x9122, 0xa1e0, 0x2300, 0x911b, 0x0a0c, 0x0d7d, 0xa0d4, 0x9420,
+	0xa0d8, 0x9319, 0x0804, 0x209a, 0x9082, 0x001b, 0x0002, 0x205a,
+	0x2058, 0x2058, 0x2058, 0x2058, 0x2058, 0x2067, 0x2058, 0x2058,
+	0x2058, 0x2058, 0x2058, 0x2074, 0x2058, 0x2058, 0x2058, 0x2058,
+	0x2058, 0x2081, 0x2058, 0x2058, 0x2058, 0x2058, 0x2058, 0x208e,
+	0x080c, 0x0d7d, 0xa17c, 0x2400, 0x9122, 0xa180, 0x2300, 0x911b,
+	0x0a0c, 0x0d7d, 0xa06c, 0x9420, 0xa070, 0x9319, 0x0498, 0xa194,
+	0x2400, 0x9122, 0xa198, 0x2300, 0x911b, 0x0a0c, 0x0d7d, 0xa084,
+	0x9420, 0xa088, 0x9319, 0x0430, 0xa1ac, 0x2400, 0x9122, 0xa1b0,
+	0x2300, 0x911b, 0x0a0c, 0x0d7d, 0xa09c, 0x9420, 0xa0a0, 0x9319,
+	0x00c8, 0xa1c4, 0x2400, 0x9122, 0xa1c8, 0x2300, 0x911b, 0x0a0c,
+	0x0d7d, 0xa0b4, 0x9420, 0xa0b8, 0x9319, 0x0060, 0xa1dc, 0x2400,
+	0x9122, 0xa1e0, 0x2300, 0x911b, 0x0a0c, 0x0d7d, 0xa0cc, 0x9420,
+	0xa0d0, 0x9319, 0xac1e, 0xab22, 0xa880, 0xc0fd, 0xa882, 0x2800,
+	0xa85a, 0x2c00, 0xa812, 0x2a00, 0xa816, 0x000e, 0x000e, 0x000e,
+	0x9006, 0x0028, 0x008e, 0x00de, 0x00ce, 0x9085, 0x0001, 0x0005,
+	0x00c6, 0x610c, 0x0016, 0x9026, 0x2410, 0x6004, 0x9420, 0x9291,
+	0x0000, 0x2c04, 0x9210, 0x9ce0, 0x0002, 0x918a, 0x0002, 0x1da8,
+	0x9284, 0x000f, 0x9405, 0x001e, 0x00ce, 0x0005, 0x7803, 0x0003,
+	0x780f, 0x0000, 0x6004, 0x7812, 0x2c04, 0x7816, 0x9ce0, 0x0002,
+	0x918a, 0x0002, 0x1db8, 0x0005, 0x2001, 0x0005, 0x2004, 0xd0bc,
+	0x190c, 0x0d76, 0xd094, 0x0110, 0x080c, 0x11f6, 0x0005, 0x0126,
+	0x2091, 0x2600, 0x2079, 0x0200, 0x2071, 0x0260, 0x2069, 0x1800,
+	0x7817, 0x0000, 0x789b, 0x0814, 0x78a3, 0x0406, 0x789f, 0x0410,
+	0x2009, 0x013b, 0x200b, 0x0400, 0x781b, 0x0002, 0x783b, 0x001f,
+	0x7837, 0x0020, 0x7803, 0x1600, 0x012e, 0x0005, 0x2091, 0x2600,
+	0x781c, 0xd0a4, 0x190c, 0x2207, 0x7900, 0xd1dc, 0x1118, 0x9084,
+	0x0006, 0x001a, 0x9084, 0x000e, 0x0002, 0x2125, 0x211d, 0x7f45,
+	0x211d, 0x211f, 0x211f, 0x211f, 0x211f, 0x7f2b, 0x211d, 0x2121,
+	0x211d, 0x211f, 0x211d, 0x211f, 0x211d, 0x080c, 0x0d7d, 0x0031,
+	0x0020, 0x080c, 0x7f2b, 0x080c, 0x7f45, 0x0005, 0x0006, 0x0016,
+	0x0026, 0x080c, 0xe8a3, 0x7930, 0x9184, 0x0003, 0x0510, 0x080c,
+	0xa91e, 0x2001, 0x19f9, 0x2004, 0x9005, 0x01a0, 0x2001, 0x0133,
+	0x2004, 0x9005, 0x090c, 0x0d7d, 0x00c6, 0x2001, 0x19f9, 0x2064,
+	0x080c, 0xa93a, 0x080c, 0xc566, 0x2009, 0x0040, 0x080c, 0x220a,
+	0x00ce, 0x0408, 0x2009, 0x0040, 0x080c, 0x220a, 0x080c, 0xa93a,
+	0x00d0, 0x9184, 0x0014, 0x01a0, 0x6a00, 0x9286, 0x0003, 0x0160,
+	0x080c, 0x753d, 0x1138, 0x080c, 0x7840, 0x080c, 0x6092, 0x080c,
+	0x746e, 0x0010, 0x080c, 0x5f4d, 0x080c, 0x7fe3, 0x0041, 0x0018,
+	0x9184, 0x9540, 0x1dc8, 0x002e, 0x001e, 0x000e, 0x0005, 0x00e6,
+	0x0036, 0x0046, 0x0056, 0x2071, 0x1a6a, 0x080c, 0x1b10, 0x005e,
+	0x004e, 0x003e, 0x00ee, 0x0005, 0x0126, 0x2091, 0x2e00, 0x2071,
+	0x1800, 0x7128, 0x2001, 0x196e, 0x2102, 0x2001, 0x1976, 0x2102,
+	0x2001, 0x013b, 0x2102, 0x2079, 0x0200, 0x2001, 0x0201, 0x789e,
+	0x78a3, 0x0200, 0x9198, 0x0007, 0x831c, 0x831c, 0x831c, 0x9398,
+	0x0005, 0x2320, 0x9182, 0x0204, 0x1230, 0x2011, 0x0008, 0x8423,
+	0x8423, 0x8423, 0x0488, 0x9182, 0x024c, 0x1240, 0x2011, 0x0007,
+	0x8403, 0x8003, 0x9400, 0x9400, 0x9420, 0x0430, 0x9182, 0x02bc,
+	0x1238, 0x2011, 0x0006, 0x8403, 0x8003, 0x9400, 0x9420, 0x00e0,
+	0x9182, 0x034c, 0x1230, 0x2011, 0x0005, 0x8403, 0x8003, 0x9420,
+	0x0098, 0x9182, 0x042c, 0x1228, 0x2011, 0x0004, 0x8423, 0x8423,
+	0x0058, 0x9182, 0x059c, 0x1228, 0x2011, 0x0003, 0x8403, 0x9420,
+	0x0018, 0x2011, 0x0002, 0x8423, 0x9482, 0x0228, 0x8002, 0x8020,
+	0x8301, 0x9402, 0x0110, 0x0208, 0x8321, 0x8217, 0x8203, 0x9405,
+	0x789a, 0x012e, 0x0005, 0x0006, 0x00d6, 0x2069, 0x0200, 0x6814,
+	0x9084, 0xffc0, 0x910d, 0x6916, 0x00de, 0x000e, 0x0005, 0x00d6,
+	0x2069, 0x0200, 0x9005, 0x6810, 0x0110, 0xc0a5, 0x0008, 0xc0a4,
+	0x6812, 0x00de, 0x0005, 0x0006, 0x00d6, 0x2069, 0x0200, 0x6810,
+	0x9084, 0xfff8, 0x910d, 0x6912, 0x00de, 0x000e, 0x0005, 0x7938,
+	0x080c, 0x0d76, 0x00f6, 0x2079, 0x0200, 0x7902, 0xa001, 0xa001,
+	0xa001, 0xa001, 0xa001, 0xa001, 0x7902, 0xa001, 0xa001, 0xa001,
+	0xa001, 0xa001, 0xa001, 0x00fe, 0x0005, 0x0126, 0x2091, 0x2800,
+	0x2061, 0x0100, 0x2071, 0x1800, 0x2009, 0x0000, 0x080c, 0x2a66,
+	0x080c, 0x297c, 0x2001, 0x199c, 0x2003, 0x0700, 0x2001, 0x199d,
+	0x2003, 0x0700, 0x080c, 0x2ad7, 0x9006, 0x080c, 0x29ab, 0x9006,
+	0x080c, 0x298e, 0x20a9, 0x0012, 0x1d04, 0x223c, 0x2091, 0x6000,
+	0x1f04, 0x223c, 0x602f, 0x0100, 0x602f, 0x0000, 0x6050, 0x9085,
+	0x0400, 0x9084, 0xdfff, 0x6052, 0x6224, 0x080c, 0x2ab4, 0x080c,
+	0x269a, 0x2009, 0x00ef, 0x6132, 0x6136, 0x080c, 0x26aa, 0x60e7,
+	0x0000, 0x61ea, 0x60e3, 0x0008, 0x604b, 0xf7f7, 0x6043, 0x0000,
+	0x602f, 0x0080, 0x602f, 0x0000, 0x6007, 0x349f, 0x00c6, 0x2061,
+	0x0140, 0x608b, 0x000b, 0x608f, 0x10b8, 0x6093, 0x0000, 0x6097,
+	0x0198, 0x00ce, 0x6004, 0x9085, 0x8000, 0x6006, 0x60bb, 0x0000,
+	0x20a9, 0x0018, 0x60bf, 0x0000, 0x1f04, 0x227a, 0x60bb, 0x0000,
+	0x60bf, 0x0108, 0x60bf, 0x0012, 0x60bf, 0x0405, 0x60bf, 0x0014,
+	0x60bf, 0x0320, 0x60bf, 0x0018, 0x601b, 0x00f0, 0x601f, 0x001e,
+	0x600f, 0x006b, 0x602b, 0x402c, 0x012e, 0x0005, 0x00f6, 0x2079,
+	0x0140, 0x78c3, 0x0080, 0x78c3, 0x0083, 0x78c3, 0x0000, 0x00fe,
+	0x0005, 0x2001, 0x1835, 0x2003, 0x0000, 0x2001, 0x1834, 0x2003,
+	0x0001, 0x0005, 0x0126, 0x2091, 0x2800, 0x0006, 0x0016, 0x0026,
+	0x6124, 0x6028, 0x910c, 0x0066, 0x2031, 0x1837, 0x2634, 0x96b4,
+	0x0028, 0x006e, 0x1138, 0x6020, 0xd1bc, 0x0120, 0xd0bc, 0x1168,
+	0xd0b4, 0x1198, 0x9184, 0x5e2c, 0x1118, 0x9184, 0x0007, 0x00aa,
+	0x9195, 0x0004, 0x9284, 0x0007, 0x0082, 0x0016, 0x2001, 0x0387,
+	0x200c, 0xd1a4, 0x001e, 0x0d70, 0x0c98, 0x0016, 0x2001, 0x0387,
+	0x200c, 0xd1b4, 0x001e, 0x0d30, 0x0c58, 0x22e8, 0x22e5, 0x22e5,
+	0x22e5, 0x22e7, 0x22e5, 0x22e5, 0x22e5, 0x080c, 0x0d7d, 0x0029,
+	0x002e, 0x001e, 0x000e, 0x012e, 0x0005, 0x00a6, 0x6124, 0x6028,
+	0xd09c, 0x0118, 0xd19c, 0x1904, 0x2562, 0xd1f4, 0x190c, 0x0d76,
+	0x080c, 0x753d, 0x0904, 0x2345, 0x080c, 0xd09b, 0x1120, 0x7000,
+	0x9086, 0x0003, 0x0580, 0x6024, 0x9084, 0x1800, 0x0560, 0x080c,
+	0x7560, 0x0118, 0x080c, 0x754e, 0x1530, 0x2011, 0x0020, 0x080c,
+	0x2ab4, 0x6043, 0x0000, 0x080c, 0xd09b, 0x0168, 0x080c, 0x7560,
+	0x1150, 0x2001, 0x19a6, 0x2003, 0x0001, 0x6027, 0x1800, 0x080c,
+	0x73b3, 0x0804, 0x2565, 0x70a4, 0x9005, 0x1150, 0x70a7, 0x0001,
+	0x00d6, 0x2069, 0x0140, 0x080c, 0x7594, 0x00de, 0x1904, 0x2565,
+	0x080c, 0x784a, 0x0428, 0x080c, 0x7560, 0x1590, 0x6024, 0x9084,
+	0x1800, 0x1108, 0x0468, 0x080c, 0x784a, 0x080c, 0x7840, 0x080c,
+	0x6092, 0x080c, 0x746e, 0x0804, 0x2562, 0xd1ac, 0x1508, 0x6024,
+	0xd0dc, 0x1170, 0xd0e4, 0x1178, 0xd0d4, 0x1190, 0xd0cc, 0x0130,
+	0x7098, 0x9086, 0x0028, 0x1110, 0x080c, 0x7721, 0x0804, 0x2562,
+	0x080c, 0x7845, 0x0048, 0x2001, 0x197c, 0x2003, 0x0002, 0x0020,
+	0x080c, 0x767e, 0x0804, 0x2562, 0x080c, 0x77c4, 0x0804, 0x2562,
+	0x6220, 0xd1bc, 0x0138, 0xd2bc, 0x1904, 0x25cb, 0xd2b4, 0x1904,
+	0x25dd, 0x0000, 0xd1ac, 0x0904, 0x246f, 0x0036, 0x6328, 0xc3bc,
+	0x632a, 0x003e, 0x080c, 0x753d, 0x11d0, 0x2011, 0x0020, 0x080c,
+	0x2ab4, 0x0006, 0x0026, 0x0036, 0x080c, 0x7557, 0x1158, 0x080c,
+	0x7840, 0x080c, 0x6092, 0x080c, 0x746e, 0x003e, 0x002e, 0x000e,
+	0x00ae, 0x0005, 0x003e, 0x002e, 0x000e, 0x080c, 0x7511, 0x0016,
+	0x0046, 0x00c6, 0x644c, 0x9486, 0xf0f0, 0x1138, 0x2061, 0x0100,
+	0x644a, 0x6043, 0x0090, 0x6043, 0x0010, 0x74da, 0x948c, 0xff00,
+	0x7038, 0xd084, 0x0178, 0x9186, 0xf800, 0x1160, 0x7048, 0xd084,
+	0x1148, 0xc085, 0x704a, 0x0036, 0x2418, 0x2011, 0x8016, 0x080c,
+	0x4b52, 0x003e, 0x080c, 0xd094, 0x1904, 0x2446, 0x9196, 0xff00,
+	0x05a8, 0x7060, 0x9084, 0x00ff, 0x810f, 0x81ff, 0x0110, 0x9116,
+	0x0568, 0x7130, 0xd184, 0x1550, 0x080c, 0x33ad, 0x0128, 0xc18d,
+	0x7132, 0x080c, 0x6ad5, 0x1510, 0x6240, 0x9294, 0x0010, 0x0130,
+	0x6248, 0x9294, 0xff00, 0x9296, 0xff00, 0x01c0, 0x7030, 0xd08c,
+	0x0904, 0x2446, 0x7038, 0xd08c, 0x1140, 0x2001, 0x180c, 0x200c,
+	0xd1ac, 0x1904, 0x2446, 0xc1ad, 0x2102, 0x0036, 0x73d8, 0x2011,
+	0x8013, 0x080c, 0x4b52, 0x003e, 0x0804, 0x2446, 0x7038, 0xd08c,
+	0x1140, 0x2001, 0x180c, 0x200c, 0xd1ac, 0x1904, 0x2446, 0xc1ad,
+	0x2102, 0x0036, 0x73d8, 0x2011, 0x8013, 0x080c, 0x4b52, 0x003e,
+	0x7130, 0xc185, 0x7132, 0x2011, 0x1848, 0x220c, 0xd1a4, 0x01f0,
+	0x0016, 0x2009, 0x0001, 0x2011, 0x0100, 0x080c, 0x8979, 0x2019,
+	0x000e, 0x00c6, 0x2061, 0x0000, 0x080c, 0xe3b5, 0x00ce, 0x9484,
+	0x00ff, 0x9080, 0x33b9, 0x200d, 0x918c, 0xff00, 0x810f, 0x2120,
+	0x9006, 0x2009, 0x000e, 0x080c, 0xe445, 0x001e, 0x0016, 0x2009,
+	0x0002, 0x2019, 0x0004, 0x080c, 0x3205, 0x001e, 0x0078, 0x0156,
+	0x00b6, 0x20a9, 0x007f, 0x900e, 0x080c, 0x6693, 0x1110, 0x080c,
+	0x60ac, 0x8108, 0x1f04, 0x243c, 0x00be, 0x015e, 0x00ce, 0x004e,
+	0x080c, 0xa91e, 0x080c, 0xabe9, 0x080c, 0xa93a, 0x60e3, 0x0000,
+	0x001e, 0x2001, 0x1800, 0x2014, 0x9296, 0x0004, 0x1170, 0xd19c,
+	0x11b0, 0x2011, 0x180c, 0x2214, 0xd29c, 0x1120, 0x6204, 0x9295,
+	0x0002, 0x6206, 0x6228, 0xc29d, 0x622a, 0x2003, 0x0001, 0x2001,
+	0x1826, 0x2003, 0x0000, 0x2011, 0x0020, 0x080c, 0x2ab4, 0xd194,
+	0x0904, 0x2562, 0x0016, 0x080c, 0xa91e, 0x6220, 0xd2b4, 0x0904,
+	0x24fd, 0x080c, 0x8780, 0x080c, 0x9ed4, 0x2011, 0x0004, 0x080c,
+	0x2ab4, 0x00f6, 0x2019, 0x19f2, 0x2304, 0x907d, 0x0904, 0x24ca,
+	0x7804, 0x9086, 0x0032, 0x15f0, 0x00d6, 0x00c6, 0x00e6, 0x0096,
+	0x2069, 0x0140, 0x782c, 0x685e, 0x7808, 0x685a, 0x6043, 0x0002,
+	0x2001, 0x0003, 0x8001, 0x1df0, 0x6043, 0x0000, 0x2001, 0x003c,
+	0x8001, 0x1df0, 0x080c, 0x2a8a, 0x2001, 0x001e, 0x8001, 0x0240,
+	0x20a9, 0x0009, 0x080c, 0x2a41, 0x6904, 0xd1dc, 0x1140, 0x0cb0,
+	0x2001, 0x0100, 0x080c, 0x2a7a, 0x9006, 0x080c, 0x2a7a, 0x080c,
+	0x967a, 0x080c, 0xa93a, 0x7814, 0x2048, 0xa867, 0x0103, 0x2f60,
+	0x080c, 0xacb0, 0x009e, 0x00ee, 0x00ce, 0x00de, 0x00fe, 0x001e,
+	0x00ae, 0x0005, 0x00fe, 0x00d6, 0x2069, 0x0140, 0x6804, 0x9084,
+	0x4000, 0x0110, 0x080c, 0x2a8a, 0x00de, 0x00c6, 0x2061, 0x19e6,
+	0x6034, 0x080c, 0xd09b, 0x0120, 0x909a, 0x0003, 0x1258, 0x0018,
+	0x909a, 0x00c8, 0x1238, 0x8000, 0x6036, 0x00ce, 0x080c, 0x9eac,
+	0x0804, 0x255f, 0x2061, 0x0100, 0x62c0, 0x080c, 0xa84f, 0x2019,
+	0x19f2, 0x2304, 0x9065, 0x0130, 0x6003, 0x0001, 0x2009, 0x0027,
+	0x080c, 0xad4d, 0x00ce, 0x0804, 0x255f, 0xd2bc, 0x0904, 0x2542,
+	0x080c, 0x878d, 0x2011, 0x0004, 0x080c, 0x2ab4, 0x00d6, 0x2069,
+	0x0140, 0x6804, 0x9084, 0x4000, 0x0110, 0x080c, 0x2a8a, 0x00de,
+	0x00c6, 0x2061, 0x19e6, 0x6050, 0x080c, 0xd09b, 0x0120, 0x909a,
+	0x0003, 0x1668, 0x0018, 0x909a, 0x00c8, 0x1648, 0x8000, 0x6052,
+	0x604c, 0x00ce, 0x9005, 0x05d8, 0x2009, 0x07d0, 0x080c, 0x8785,
+	0x9080, 0x0008, 0x2004, 0x9086, 0x0006, 0x1138, 0x2009, 0x1984,
+	0x2011, 0x0012, 0x080c, 0x2ac3, 0x0450, 0x9080, 0x0008, 0x2004,
+	0x9086, 0x0009, 0x0d98, 0x2009, 0x1984, 0x2011, 0x0016, 0x080c,
+	0x2ac3, 0x00e8, 0x2011, 0x0004, 0x080c, 0x2ab4, 0x00c0, 0x0036,
+	0x2019, 0x0001, 0x080c, 0xa1b8, 0x003e, 0x2019, 0x19f9, 0x2304,
+	0x9065, 0x0160, 0x2009, 0x004f, 0x6020, 0x9086, 0x0009, 0x1110,
+	0x2009, 0x004f, 0x6003, 0x0003, 0x080c, 0xad4d, 0x00ce, 0x080c,
+	0xa93a, 0x001e, 0xd19c, 0x0904, 0x25c4, 0x7038, 0xd0ac, 0x1558,
+	0x0016, 0x0156, 0x2011, 0x0008, 0x080c, 0x2ab4, 0x080c, 0x2ad7,
+	0x080c, 0x2b0a, 0x6050, 0xc0e5, 0x6052, 0x20a9, 0x0367, 0x1f04,
+	0x2591, 0x1d04, 0x2579, 0x080c, 0x87b4, 0x6020, 0xd09c, 0x1db8,
+	0x00f6, 0x2079, 0x0100, 0x080c, 0x29ed, 0x00fe, 0x1d80, 0x6050,
+	0xc0e4, 0x6052, 0x2011, 0x0008, 0x080c, 0x2ab4, 0x015e, 0x001e,
+	0x0498, 0x015e, 0x001e, 0x0016, 0x6028, 0xc09c, 0x602a, 0x080c,
+	0xa91e, 0x080c, 0xabe9, 0x080c, 0xa93a, 0x60e3, 0x0000, 0x080c,
+	0xe882, 0x080c, 0xe89d, 0x080c, 0x5742, 0xd0fc, 0x1138, 0x080c,
+	0xd094, 0x1120, 0x9085, 0x0001, 0x080c, 0x7584, 0x9006, 0x080c,
+	0x2a7a, 0x2009, 0x0002, 0x080c, 0x2a66, 0x00e6, 0x2071, 0x1800,
+	0x7003, 0x0004, 0x080c, 0x0ec1, 0x00ee, 0x2011, 0x0008, 0x080c,
+	0x2ab4, 0x080c, 0x0bc3, 0x001e, 0x918c, 0xffd0, 0x2110, 0x080c,
+	0x2ab4, 0x00ae, 0x0005, 0x0016, 0x2001, 0x0387, 0x200c, 0xd1a4,
+	0x001e, 0x0904, 0x2372, 0x0016, 0x2009, 0x25d7, 0x00c0, 0x2001,
+	0x0387, 0x2003, 0x1000, 0x001e, 0x0c38, 0x0016, 0x2001, 0x0387,
+	0x200c, 0xd1b4, 0x001e, 0x0904, 0x2372, 0x0016, 0x2009, 0x25e9,
+	0x0030, 0x2001, 0x0387, 0x2003, 0x4000, 0x001e, 0x08a8, 0x6028,
+	0xc0bc, 0x602a, 0x2001, 0x0156, 0x2003, 0xbc91, 0x8000, 0x2003,
+	0xffff, 0x6043, 0x0001, 0x080c, 0x2a60, 0x2011, 0x0080, 0x080c,
+	0x2ab4, 0x6017, 0x0000, 0x6043, 0x0000, 0x0817, 0x0006, 0x0016,
+	0x0026, 0x0036, 0x00e6, 0x00f6, 0x0126, 0x2091, 0x8000, 0x2071,
+	0x1800, 0x71d0, 0x70d2, 0x9116, 0x0904, 0x2659, 0x81ff, 0x01a0,
+	0x2009, 0x0000, 0x080c, 0x2a66, 0x2011, 0x8011, 0x2019, 0x010e,
+	0x231c, 0x939e, 0x0007, 0x1118, 0x2019, 0x0001, 0x0010, 0x2019,
+	0x0000, 0x080c, 0x4b52, 0x0468, 0x2001, 0x19a7, 0x200c, 0x81ff,
+	0x1140, 0x2001, 0x0109, 0x2004, 0xd0b4, 0x0118, 0x2019, 0x0003,
+	0x0008, 0x2118, 0x2011, 0x8012, 0x080c, 0x4b52, 0x080c, 0x0ec1,
+	0x080c, 0x5742, 0xd0fc, 0x11a8, 0x080c, 0xd094, 0x1190, 0x00c6,
+	0x080c, 0x26f5, 0x080c, 0xa91e, 0x080c, 0xa113, 0x080c, 0xa93a,
+	0x2061, 0x0100, 0x2019, 0x0028, 0x2009, 0x0002, 0x080c, 0x3205,
+	0x00ce, 0x012e, 0x00fe, 0x00ee, 0x003e, 0x002e, 0x001e, 0x000e,
+	0x0005, 0x2028, 0x918c, 0x00ff, 0x2130, 0x9094, 0xff00, 0x11f0,
+	0x2011, 0x1837, 0x2214, 0xd2ac, 0x11c8, 0x81ff, 0x01e8, 0x2011,
+	0x181f, 0x2204, 0x9106, 0x1190, 0x2011, 0x1820, 0x2214, 0x9294,
+	0xff00, 0x9584, 0xff00, 0x9206, 0x1148, 0x2011, 0x1820, 0x2214,
+	0x9294, 0x00ff, 0x9584, 0x00ff, 0x9206, 0x1120, 0x2500, 0x080c,
+	0x8256, 0x0048, 0x9584, 0x00ff, 0x9080, 0x33b9, 0x200d, 0x918c,
+	0xff00, 0x810f, 0x9006, 0x0005, 0x9080, 0x33b9, 0x200d, 0x918c,
+	0x00ff, 0x0005, 0x00d6, 0x2069, 0x0140, 0x2001, 0x1818, 0x2003,
+	0x00ef, 0x20a9, 0x0010, 0x9006, 0x6852, 0x6856, 0x1f04, 0x26a5,
+	0x00de, 0x0005, 0x0006, 0x00d6, 0x0026, 0x2069, 0x0140, 0x2001,
+	0x1818, 0x2102, 0x8114, 0x8214, 0x8214, 0x8214, 0x20a9, 0x0010,
+	0x6853, 0x0000, 0x9006, 0x82ff, 0x1128, 0x9184, 0x000f, 0x9080,
+	0xe8b1, 0x2005, 0x6856, 0x8211, 0x1f04, 0x26ba, 0x002e, 0x00de,
+	0x000e, 0x0005, 0x00c6, 0x2061, 0x1800, 0x6030, 0x0110, 0xc09d,
+	0x0008, 0xc09c, 0x6032, 0x00ce, 0x0005, 0x0156, 0x00d6, 0x0026,
+	0x0016, 0x0006, 0x2069, 0x0140, 0x6980, 0x9116, 0x0180, 0x9112,
+	0x1230, 0x8212, 0x8210, 0x22a8, 0x2001, 0x0402, 0x0018, 0x22a8,
+	0x2001, 0x0404, 0x680e, 0x1f04, 0x26ea, 0x680f, 0x0000, 0x000e,
+	0x001e, 0x002e, 0x00de, 0x015e, 0x0005, 0x080c, 0x573e, 0xd0c4,
+	0x0150, 0xd0a4, 0x0140, 0x9006, 0x0046, 0x2020, 0x2009, 0x002e,
+	0x080c, 0xe445, 0x004e, 0x0005, 0x00f6, 0x0016, 0x0026, 0x2079,
+	0x0140, 0x78c4, 0xd0dc, 0x0904, 0x2761, 0x080c, 0x29dd, 0x0660,
+	0x9084, 0x0700, 0x908e, 0x0600, 0x1120, 0x2011, 0x4000, 0x900e,
+	0x0458, 0x908e, 0x0500, 0x1120, 0x2011, 0x8000, 0x900e, 0x0420,
+	0x908e, 0x0400, 0x1120, 0x9016, 0x2009, 0x0001, 0x00e8, 0x908e,
+	0x0300, 0x1120, 0x9016, 0x2009, 0x0002, 0x00b0, 0x908e, 0x0200,
+	0x1120, 0x9016, 0x2009, 0x0004, 0x0078, 0x908e, 0x0100, 0x1548,
+	0x9016, 0x2009, 0x0008, 0x0040, 0x9084, 0x0700, 0x908e, 0x0300,
+	0x1500, 0x2011, 0x0030, 0x0058, 0x2300, 0x9080, 0x0020, 0x2018,
+	0x080c, 0x91f8, 0x928c, 0xff00, 0x0110, 0x2011, 0x00ff, 0x2200,
+	0x8007, 0x9085, 0x004c, 0x78c2, 0x2009, 0x0138, 0x220a, 0x080c,
+	0x753d, 0x1118, 0x2009, 0x196c, 0x220a, 0x002e, 0x001e, 0x00fe,
+	0x0005, 0x78c3, 0x0000, 0x0cc8, 0x0126, 0x2091, 0x2800, 0x0006,
+	0x0016, 0x0026, 0x2001, 0x0170, 0x200c, 0x8000, 0x2014, 0x9184,
+	0x0003, 0x0110, 0x080c, 0x0d76, 0x002e, 0x001e, 0x000e, 0x012e,
+	0x0005, 0x2001, 0x0171, 0x2004, 0xd0dc, 0x0168, 0x2001, 0x0170,
+	0x200c, 0x918c, 0x00ff, 0x918e, 0x004c, 0x1128, 0x200c, 0x918c,
+	0xff00, 0x810f, 0x0005, 0x900e, 0x2001, 0x0227, 0x2004, 0x8007,
+	0x9084, 0x00ff, 0x8004, 0x9108, 0x2001, 0x0226, 0x2004, 0x8007,
+	0x9084, 0x00ff, 0x8004, 0x9108, 0x0005, 0x0018, 0x000c, 0x0018,
+	0x0020, 0x1000, 0x0800, 0x1000, 0x1800, 0x0156, 0x0006, 0x0016,
+	0x0026, 0x00e6, 0x2001, 0x198f, 0x2004, 0x908a, 0x0007, 0x1a0c,
+	0x0d7d, 0x0033, 0x00ee, 0x002e, 0x001e, 0x000e, 0x015e, 0x0005,
+	0x27bf, 0x27dd, 0x2801, 0x2803, 0x282c, 0x282e, 0x2830, 0x2001,
+	0x0001, 0x080c, 0x2606, 0x080c, 0x2a2b, 0x2001, 0x1991, 0x2003,
+	0x0000, 0x7828, 0x9084, 0xe1d7, 0x782a, 0x9006, 0x20a9, 0x0009,
+	0x080c, 0x29f9, 0x2001, 0x198f, 0x2003, 0x0006, 0x2009, 0x001e,
+	0x2011, 0x2831, 0x080c, 0x8792, 0x0005, 0x2009, 0x1994, 0x200b,
+	0x0000, 0x2001, 0x1999, 0x2003, 0x0036, 0x2001, 0x1998, 0x2003,
+	0x002a, 0x2001, 0x1991, 0x2003, 0x0001, 0x9006, 0x080c, 0x298e,
+	0x2001, 0xffff, 0x20a9, 0x0009, 0x080c, 0x29f9, 0x2001, 0x198f,
+	0x2003, 0x0006, 0x2009, 0x001e, 0x2011, 0x2831, 0x080c, 0x8792,
+	0x0005, 0x080c, 0x0d7d, 0x2001, 0x1999, 0x2003, 0x0036, 0x2001,
+	0x1991, 0x2003, 0x0003, 0x7a38, 0x9294, 0x0005, 0x9296, 0x0004,
+	0x0110, 0x9006, 0x0010, 0x2001, 0x0001, 0x080c, 0x298e, 0x2001,
+	0x1995, 0x2003, 0x0000, 0x2001, 0xffff, 0x20a9, 0x0009, 0x080c,
+	0x29f9, 0x2001, 0x198f, 0x2003, 0x0006, 0x2009, 0x001e, 0x2011,
+	0x2831, 0x080c, 0x8792, 0x0005, 0x080c, 0x0d7d, 0x080c, 0x0d7d,
+	0x0005, 0x0006, 0x0016, 0x0026, 0x00e6, 0x00f6, 0x0156, 0x0126,
+	0x2091, 0x8000, 0x2079, 0x0100, 0x2001, 0x1991, 0x2004, 0x908a,
+	0x0007, 0x1a0c, 0x0d7d, 0x0043, 0x012e, 0x015e, 0x00fe, 0x00ee,
+	0x002e, 0x001e, 0x000e, 0x0005, 0x2853, 0x2873, 0x28b3, 0x28e3,
+	0x2907, 0x2917, 0x2919, 0x080c, 0x29ed, 0x11b0, 0x7850, 0x9084,
+	0xefff, 0x7852, 0x2009, 0x1997, 0x2104, 0x7a38, 0x9294, 0x0005,
+	0x9296, 0x0004, 0x0110, 0xc08d, 0x0008, 0xc085, 0x200a, 0x2001,
+	0x198f, 0x2003, 0x0001, 0x0030, 0x080c, 0x293d, 0x2001, 0xffff,
+	0x080c, 0x27ce, 0x0005, 0x080c, 0x291b, 0x05e0, 0x2009, 0x1998,
+	0x2104, 0x8001, 0x200a, 0x080c, 0x29ed, 0x1178, 0x7850, 0x9084,
+	0xefff, 0x7852, 0x7a38, 0x9294, 0x0005, 0x9296, 0x0005, 0x0518,
+	0x2009, 0x1997, 0x2104, 0xc085, 0x200a, 0x2009, 0x1994, 0x2104,
+	0x8000, 0x200a, 0x9086, 0x0005, 0x0118, 0x080c, 0x2923, 0x00c0,
+	0x200b, 0x0000, 0x7a38, 0x9294, 0x0006, 0x9296, 0x0004, 0x0110,
+	0x9006, 0x0010, 0x2001, 0x0001, 0x080c, 0x29ab, 0x2001, 0x1991,
+	0x2003, 0x0002, 0x0028, 0x2001, 0x198f, 0x2003, 0x0003, 0x0010,
+	0x080c, 0x27f0, 0x0005, 0x080c, 0x291b, 0x0560, 0x2009, 0x1998,
+	0x2104, 0x8001, 0x200a, 0x080c, 0x29ed, 0x1168, 0x7850, 0x9084,
+	0xefff, 0x7852, 0x2001, 0x198f, 0x2003, 0x0003, 0x2001, 0x1990,
+	0x2003, 0x0000, 0x00b8, 0x2009, 0x1998, 0x2104, 0x9005, 0x1118,
+	0x080c, 0x2960, 0x0010, 0x080c, 0x2930, 0x080c, 0x2923, 0x2009,
+	0x1994, 0x200b, 0x0000, 0x2001, 0x1991, 0x2003, 0x0001, 0x080c,
+	0x27f0, 0x0000, 0x0005, 0x04b9, 0x0508, 0x080c, 0x29ed, 0x11b8,
+	0x7850, 0x9084, 0xefff, 0x7852, 0x2009, 0x1995, 0x2104, 0x8000,
+	0x200a, 0x9086, 0x0007, 0x0108, 0x0078, 0x2001, 0x199a, 0x2003,
+	0x000a, 0x2009, 0x1997, 0x2104, 0xc0fd, 0x200a, 0x0038, 0x0419,
+	0x2001, 0x1991, 0x2003, 0x0004, 0x080c, 0x281b, 0x0005, 0x0099,
+	0x0168, 0x080c, 0x29ed, 0x1138, 0x7850, 0x9084, 0xefff, 0x7852,
+	0x080c, 0x2807, 0x0018, 0x0079, 0x080c, 0x281b, 0x0005, 0x080c,
+	0x0d7d, 0x080c, 0x0d7d, 0x2009, 0x1999, 0x2104, 0x8001, 0x200a,
+	0x090c, 0x297c, 0x0005, 0x7a38, 0x9294, 0x0005, 0x9296, 0x0005,
+	0x0110, 0x9006, 0x0010, 0x2001, 0x0001, 0x080c, 0x29ab, 0x0005,
+	0x7a38, 0x9294, 0x0006, 0x9296, 0x0006, 0x0110, 0x9006, 0x0010,
+	0x2001, 0x0001, 0x080c, 0x298e, 0x0005, 0x2009, 0x1994, 0x2104,
+	0x8000, 0x200a, 0x9086, 0x0005, 0x0108, 0x0068, 0x200b, 0x0000,
+	0x7a38, 0x9294, 0x0006, 0x9296, 0x0006, 0x0110, 0x9006, 0x0010,
+	0x2001, 0x0001, 0x04d9, 0x7a38, 0x9294, 0x0005, 0x9296, 0x0005,
+	0x0110, 0x9006, 0x0010, 0x2001, 0x0001, 0x080c, 0x29ab, 0x0005,
+	0x0086, 0x2001, 0x1997, 0x2004, 0x9084, 0x7fff, 0x090c, 0x0d7d,
+	0x2009, 0x1996, 0x2144, 0x8846, 0x280a, 0x9844, 0x0dd8, 0xd08c,
+	0x1120, 0xd084, 0x1120, 0x080c, 0x0d7d, 0x9006, 0x0010, 0x2001,
+	0x0001, 0x00a1, 0x008e, 0x0005, 0x0006, 0x0156, 0x2001, 0x198f,
+	0x20a9, 0x0009, 0x2003, 0x0000, 0x8000, 0x1f04, 0x2982, 0x2001,
+	0x1996, 0x2003, 0x8000, 0x015e, 0x000e, 0x0005, 0x00f6, 0x2079,
+	0x0100, 0x9085, 0x0000, 0x0158, 0x7838, 0x9084, 0xfff9, 0x9085,
+	0x0004, 0x783a, 0x2009, 0x199c, 0x210c, 0x795a, 0x0050, 0x7838,
+	0x9084, 0xfffb, 0x9085, 0x0006, 0x783a, 0x2009, 0x199d, 0x210c,
+	0x795a, 0x00fe, 0x0005, 0x00f6, 0x2079, 0x0100, 0x9085, 0x0000,
+	0x0158, 0x7838, 0x9084, 0xfffa, 0x9085, 0x0004, 0x783a, 0x7850,
+	0x9084, 0xfff0, 0x7852, 0x00f8, 0x7838, 0x9084, 0xfffb, 0x9085,
+	0x0005, 0x783a, 0x7850, 0x9084, 0xfff0, 0x0016, 0x2009, 0x017f,
+	0x210c, 0x918e, 0x0005, 0x0140, 0x2009, 0x0003, 0x210c, 0x918c,
+	0x0600, 0x918e, 0x0400, 0x0118, 0x9085, 0x000a, 0x0010, 0x9085,
+	0x0000, 0x001e, 0x7852, 0x00fe, 0x0005, 0x0006, 0x2001, 0x0100,
+	0x2004, 0x9082, 0x0007, 0x000e, 0x0005, 0x0006, 0x2001, 0x0100,
+	0x2004, 0x9082, 0x0009, 0x000e, 0x0005, 0x0156, 0x20a9, 0x0064,
+	0x7820, 0x080c, 0x2a60, 0xd09c, 0x1110, 0x1f04, 0x29f0, 0x015e,
+	0x0005, 0x0126, 0x0016, 0x0006, 0x2091, 0x8000, 0x080c, 0x2ad7,
+	0x080c, 0x2b0a, 0x000e, 0x2008, 0x9186, 0x0000, 0x1118, 0x783b,
+	0x0007, 0x0090, 0x9186, 0x0001, 0x1118, 0x783b, 0x0006, 0x0060,
+	0x9186, 0x0002, 0x1118, 0x783b, 0x0005, 0x0030, 0x9186, 0x0003,
+	0x1118, 0x783b, 0x0004, 0x0000, 0x0006, 0x1d04, 0x2a1d, 0x080c,
+	0x87b4, 0x1f04, 0x2a1d, 0x7850, 0x9085, 0x1000, 0x7852, 0x000e,
+	0x001e, 0x012e, 0x0005, 0x080c, 0x2b0a, 0x0005, 0x0006, 0x0156,
+	0x00f6, 0x2079, 0x0100, 0x20a9, 0x000a, 0x7854, 0xd0ac, 0x1100,
+	0x7854, 0xd08c, 0x1110, 0x1f04, 0x2a38, 0x00fe, 0x015e, 0x000e,
+	0x0005, 0x1d04, 0x2a41, 0x080c, 0x87b4, 0x1f04, 0x2a41, 0x0005,
+	0x0006, 0x2001, 0x199b, 0x2004, 0x9086, 0x0000, 0x000e, 0x0005,
+	0x0006, 0x2001, 0x199b, 0x2004, 0x9086, 0x0001, 0x000e, 0x0005,
+	0x0006, 0x2001, 0x199b, 0x2004, 0x9086, 0x0002, 0x000e, 0x0005,
+	0xa001, 0xa001, 0xa001, 0xa001, 0xa001, 0x0005, 0x0006, 0x2001,
+	0x19a7, 0x2102, 0x000e, 0x0005, 0x2009, 0x0171, 0x2104, 0xd0dc,
+	0x0140, 0x2009, 0x0170, 0x2104, 0x200b, 0x0080, 0xa001, 0xa001,
+	0x200a, 0x0005, 0x0016, 0x0026, 0x080c, 0x7557, 0x0108, 0xc0bc,
+	0x2009, 0x0140, 0x2114, 0x9294, 0x0001, 0x9215, 0x220a, 0x002e,
+	0x001e, 0x0005, 0x0016, 0x0026, 0x2009, 0x0140, 0x2114, 0x9294,
+	0x0001, 0x9285, 0x1000, 0x200a, 0x220a, 0x002e, 0x001e, 0x0005,
+	0x0016, 0x0026, 0x2009, 0x0140, 0x2114, 0x9294, 0x0001, 0x9215,
+	0x220a, 0x002e, 0x001e, 0x0005, 0x0006, 0x0016, 0x2009, 0x0140,
+	0x2104, 0x1128, 0x080c, 0x7557, 0x0110, 0xc0bc, 0x0008, 0xc0bd,
+	0x200a, 0x001e, 0x000e, 0x0005, 0x00f6, 0x2079, 0x0380, 0x7843,
+	0x0101, 0x7844, 0xd084, 0x1de8, 0x2001, 0x0109, 0x2202, 0x7843,
+	0x0100, 0x00fe, 0x0005, 0x00f6, 0x2079, 0x0380, 0x7843, 0x0202,
+	0x7844, 0xd08c, 0x1de8, 0x2079, 0x0100, 0x7814, 0x9104, 0x9205,
+	0x7a16, 0x2079, 0x0380, 0x7843, 0x0200, 0x00fe, 0x0005, 0x0016,
+	0x0026, 0x0036, 0x00c6, 0x2061, 0x0100, 0x6050, 0x9084, 0xfbff,
+	0x9085, 0x0040, 0x6052, 0x20a9, 0x0002, 0x080c, 0x2a41, 0x6050,
+	0x9085, 0x0400, 0x9084, 0xff9f, 0x6052, 0x20a9, 0x0005, 0x080c,
+	0x2a41, 0x6054, 0xd0bc, 0x090c, 0x0d7d, 0x20a9, 0x0005, 0x080c,
+	0x2a41, 0x6054, 0xd0ac, 0x090c, 0x0d7d, 0x2009, 0x19ae, 0x9084,
+	0x7e00, 0x8007, 0x8004, 0x8004, 0x200a, 0x00ce, 0x003e, 0x002e,
+	0x001e, 0x0005, 0x0006, 0x00c6, 0x2061, 0x0100, 0x6050, 0xc0cd,
+	0x6052, 0x00ce, 0x000e, 0x0005, 0x3010, 0x3010, 0x2c14, 0x2c14,
+	0x2c20, 0x2c20, 0x2c2c, 0x2c2c, 0x2c3a, 0x2c3a, 0x2c46, 0x2c46,
+	0x2c54, 0x2c54, 0x2c62, 0x2c62, 0x2c74, 0x2c74, 0x2c80, 0x2c80,
+	0x2c8e, 0x2c8e, 0x2cac, 0x2cac, 0x2ccc, 0x2ccc, 0x2c9c, 0x2c9c,
+	0x2cbc, 0x2cbc, 0x2cda, 0x2cda, 0x2c72, 0x2c72, 0x2c72, 0x2c72,
+	0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2c72,
+	0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2c72,
+	0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2c72,
+	0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2cec, 0x2cec, 0x2cf8, 0x2cf8,
+	0x2d06, 0x2d06, 0x2d14, 0x2d14, 0x2d24, 0x2d24, 0x2d32, 0x2d32,
+	0x2d42, 0x2d42, 0x2d52, 0x2d52, 0x2d64, 0x2d64, 0x2d72, 0x2d72,
+	0x2d82, 0x2d82, 0x2da4, 0x2da4, 0x2dc8, 0x2dc8, 0x2d92, 0x2d92,
+	0x2db6, 0x2db6, 0x2dd8, 0x2dd8, 0x2c72, 0x2c72, 0x2c72, 0x2c72,
+	0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2c72,
+	0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2c72,
+	0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2c72,
+	0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2dec, 0x2dec, 0x2df8, 0x2df8,
+	0x2e06, 0x2e06, 0x2e14, 0x2e14, 0x2e24, 0x2e24, 0x2e32, 0x2e32,
+	0x2e42, 0x2e42, 0x2e52, 0x2e52, 0x2e64, 0x2e64, 0x2e72, 0x2e72,
+	0x2e82, 0x2e82, 0x2e92, 0x2e92, 0x2ea4, 0x2ea4, 0x2eb4, 0x2eb4,
+	0x2ec6, 0x2ec6, 0x2ed8, 0x2ed8, 0x2c72, 0x2c72, 0x2c72, 0x2c72,
+	0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2c72,
+	0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2c72,
+	0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2c72,
+	0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2eec, 0x2eec, 0x2efa, 0x2efa,
+	0x2f0a, 0x2f0a, 0x2f1a, 0x2f1a, 0x2f2c, 0x2f2c, 0x2f3c, 0x2f3c,
+	0x2f4e, 0x2f4e, 0x2f60, 0x2f60, 0x2f74, 0x2f74, 0x2f84, 0x2f84,
+	0x2f96, 0x2f96, 0x2fa8, 0x2fa8, 0x2fbc, 0x2fbc, 0x2fcd, 0x2fcd,
+	0x2fe0, 0x2fe0, 0x2ff3, 0x2ff3, 0x2c72, 0x2c72, 0x2c72, 0x2c72,
+	0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2c72,
+	0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2c72,
+	0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x2c72,
+	0x2c72, 0x2c72, 0x2c72, 0x2c72, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x22aa, 0x0804, 0x3008,
+	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
+	0x080c, 0x20d4, 0x0804, 0x3008, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x20d4, 0x080c, 0x22aa,
+	0x0804, 0x3008, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
+	0x0146, 0x0156, 0x080c, 0x20fe, 0x0804, 0x3008, 0x0106, 0x0006,
+	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x22aa,
+	0x080c, 0x20fe, 0x0804, 0x3008, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x20d4, 0x080c, 0x20fe,
+	0x0804, 0x3008, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
+	0x0146, 0x0156, 0x080c, 0x20d4, 0x080c, 0x22aa, 0x080c, 0x20fe,
+	0x0804, 0x3008, 0xa001, 0x0cf0, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x13bb, 0x0804, 0x3008,
+	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
+	0x080c, 0x22aa, 0x080c, 0x13bb, 0x0804, 0x3008, 0x0106, 0x0006,
+	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x20d4,
+	0x080c, 0x13bb, 0x0804, 0x3008, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x22aa, 0x080c, 0x13bb,
+	0x080c, 0x20fe, 0x0804, 0x3008, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x20d4, 0x080c, 0x22aa,
+	0x080c, 0x13bb, 0x0804, 0x3008, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x20d4, 0x080c, 0x13bb,
+	0x080c, 0x20fe, 0x0804, 0x3008, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x13bb, 0x080c, 0x20fe,
+	0x0804, 0x3008, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
+	0x0146, 0x0156, 0x080c, 0x20d4, 0x080c, 0x22aa, 0x080c, 0x13bb,
+	0x080c, 0x20fe, 0x0804, 0x3008, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2764, 0x0804, 0x3008,
+	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
+	0x080c, 0x2764, 0x080c, 0x22aa, 0x0804, 0x3008, 0x0106, 0x0006,
+	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2764,
+	0x080c, 0x20d4, 0x0804, 0x3008, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2764, 0x080c, 0x20d4,
+	0x080c, 0x22aa, 0x0804, 0x3008, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2764, 0x080c, 0x20fe,
+	0x0804, 0x3008, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
+	0x0146, 0x0156, 0x080c, 0x2764, 0x080c, 0x22aa, 0x080c, 0x20fe,
+	0x0804, 0x3008, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
+	0x0146, 0x0156, 0x080c, 0x2764, 0x080c, 0x20d4, 0x080c, 0x20fe,
+	0x0804, 0x3008, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
+	0x0146, 0x0156, 0x080c, 0x2764, 0x080c, 0x20d4, 0x080c, 0x22aa,
+	0x080c, 0x20fe, 0x0804, 0x3008, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2764, 0x080c, 0x13bb,
+	0x0804, 0x3008, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
+	0x0146, 0x0156, 0x080c, 0x2764, 0x080c, 0x22aa, 0x080c, 0x13bb,
+	0x0804, 0x3008, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
+	0x0146, 0x0156, 0x080c, 0x2764, 0x080c, 0x20d4, 0x080c, 0x13bb,
+	0x0804, 0x3008, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
+	0x0146, 0x0156, 0x080c, 0x2764, 0x080c, 0x22aa, 0x080c, 0x13bb,
+	0x080c, 0x20fe, 0x0804, 0x3008, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2764, 0x080c, 0x20d4,
+	0x080c, 0x22aa, 0x080c, 0x13bb, 0x0804, 0x3008, 0x0106, 0x0006,
+	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2764,
+	0x080c, 0x20d4, 0x080c, 0x13bb, 0x080c, 0x20fe, 0x0804, 0x3008,
+	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
+	0x080c, 0x2764, 0x080c, 0x13bb, 0x080c, 0x20fe, 0x0804, 0x3008,
+	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
+	0x080c, 0x2764, 0x080c, 0x20d4, 0x080c, 0x22aa, 0x080c, 0x13bb,
+	0x080c, 0x20fe, 0x0804, 0x3008, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0xa984, 0x0804, 0x3008,
+	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
+	0x080c, 0xa984, 0x080c, 0x22aa, 0x0804, 0x3008, 0x0106, 0x0006,
+	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x20d4,
+	0x080c, 0xa984, 0x0804, 0x3008, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x20d4, 0x080c, 0xa984,
+	0x080c, 0x22aa, 0x0804, 0x3008, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0xa984, 0x080c, 0x20fe,
+	0x0804, 0x3008, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
+	0x0146, 0x0156, 0x080c, 0xa984, 0x080c, 0x22aa, 0x080c, 0x20fe,
+	0x0804, 0x3008, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
+	0x0146, 0x0156, 0x080c, 0x20d4, 0x080c, 0xa984, 0x080c, 0x20fe,
+	0x0804, 0x3008, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
+	0x0146, 0x0156, 0x080c, 0x20d4, 0x080c, 0xa984, 0x080c, 0x22aa,
+	0x080c, 0x20fe, 0x0804, 0x3008, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0xa984, 0x080c, 0x13bb,
+	0x0804, 0x3008, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
+	0x0146, 0x0156, 0x080c, 0xa984, 0x080c, 0x22aa, 0x080c, 0x13bb,
+	0x0804, 0x3008, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
+	0x0146, 0x0156, 0x080c, 0x20d4, 0x080c, 0xa984, 0x080c, 0x13bb,
+	0x0804, 0x3008, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
+	0x0146, 0x0156, 0x080c, 0x20d4, 0x080c, 0xa984, 0x080c, 0x22aa,
+	0x080c, 0x13bb, 0x0804, 0x3008, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0xa984, 0x080c, 0x13bb,
+	0x080c, 0x20fe, 0x0804, 0x3008, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0xa984, 0x080c, 0x22aa,
+	0x080c, 0x13bb, 0x080c, 0x20fe, 0x0804, 0x3008, 0x0106, 0x0006,
+	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x20d4,
+	0x080c, 0xa984, 0x080c, 0x13bb, 0x080c, 0x20fe, 0x0804, 0x3008,
+	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
+	0x080c, 0x20d4, 0x080c, 0xa984, 0x080c, 0x22aa, 0x080c, 0x13bb,
+	0x080c, 0x20fe, 0x0804, 0x3008, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2764, 0x080c, 0xa984,
+	0x0804, 0x3008, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
+	0x0146, 0x0156, 0x080c, 0x2764, 0x080c, 0xa984, 0x080c, 0x22aa,
+	0x0804, 0x3008, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
+	0x0146, 0x0156, 0x080c, 0x2764, 0x080c, 0x20d4, 0x080c, 0xa984,
+	0x0804, 0x3008, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
+	0x0146, 0x0156, 0x080c, 0x2764, 0x080c, 0x20d4, 0x080c, 0xa984,
+	0x080c, 0x22aa, 0x0804, 0x3008, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2764, 0x080c, 0xa984,
+	0x080c, 0x20fe, 0x0804, 0x3008, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2764, 0x080c, 0xa984,
+	0x080c, 0x22aa, 0x080c, 0x20fe, 0x0804, 0x3008, 0x0106, 0x0006,
+	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2764,
+	0x080c, 0x20d4, 0x080c, 0xa984, 0x080c, 0x20fe, 0x0804, 0x3008,
+	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
+	0x080c, 0x2764, 0x080c, 0x20d4, 0x080c, 0xa984, 0x080c, 0x22aa,
+	0x080c, 0x20fe, 0x0804, 0x3008, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2764, 0x080c, 0xa984,
+	0x080c, 0x13bb, 0x0804, 0x3008, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2764, 0x080c, 0xa984,
+	0x080c, 0x22aa, 0x080c, 0x13bb, 0x0804, 0x3008, 0x0106, 0x0006,
+	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2764,
+	0x080c, 0x20d4, 0x080c, 0xa984, 0x080c, 0x13bb, 0x0804, 0x3008,
+	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
+	0x080c, 0x2764, 0x080c, 0x20d4, 0x080c, 0xa984, 0x080c, 0x22aa,
+	0x080c, 0x13bb, 0x0804, 0x3008, 0x0106, 0x0006, 0x0126, 0x01c6,
+	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2764, 0x080c, 0xa984,
+	0x080c, 0x13bb, 0x080c, 0x20fe, 0x04d8, 0x0106, 0x0006, 0x0126,
+	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2764, 0x080c,
+	0xa984, 0x080c, 0x22aa, 0x080c, 0x13bb, 0x080c, 0x20fe, 0x0440,
+	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
+	0x080c, 0x2764, 0x080c, 0x20d4, 0x080c, 0x13bb, 0x080c, 0xa984,
+	0x080c, 0x20fe, 0x00a8, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
+	0x0136, 0x0146, 0x0156, 0x080c, 0x2764, 0x080c, 0x20d4, 0x080c,
+	0xa984, 0x080c, 0x22aa, 0x080c, 0x13bb, 0x080c, 0x20fe, 0x0000,
+	0x015e, 0x014e, 0x013e, 0x01de, 0x01ce, 0x012e, 0x000e, 0x010e,
+	0x000d, 0x00b6, 0x00c6, 0x0026, 0x0046, 0x9026, 0x080c, 0x6a9b,
+	0x1904, 0x3121, 0x72dc, 0x2001, 0x197b, 0x2004, 0x9005, 0x1110,
+	0xd29c, 0x0148, 0xd284, 0x1138, 0xd2bc, 0x1904, 0x3121, 0x080c,
+	0x3126, 0x0804, 0x3121, 0xd2cc, 0x1904, 0x3121, 0x080c, 0x753d,
+	0x1120, 0x70af, 0xffff, 0x0804, 0x3121, 0xd294, 0x0120, 0x70af,
+	0xffff, 0x0804, 0x3121, 0x080c, 0x33a8, 0x0160, 0x080c, 0xd09b,
+	0x0128, 0x2001, 0x1818, 0x203c, 0x0804, 0x30ae, 0x70af, 0xffff,
+	0x0804, 0x3121, 0x2001, 0x1818, 0x203c, 0x7294, 0xd284, 0x0904,
+	0x30ae, 0xd28c, 0x1904, 0x30ae, 0x0036, 0x73ac, 0x938e, 0xffff,
+	0x1110, 0x2019, 0x0001, 0x8314, 0x92e0, 0x1d80, 0x2c04, 0x938c,
+	0x0001, 0x0120, 0x9084, 0xff00, 0x8007, 0x0010, 0x9084, 0x00ff,
+	0x970e, 0x05d0, 0x908e, 0x0000, 0x05b8, 0x908e, 0x00ff, 0x1150,
+	0x7230, 0xd284, 0x15b0, 0x7294, 0xc28d, 0x7296, 0x70af, 0xffff,
+	0x003e, 0x04a0, 0x900e, 0x080c, 0x2661, 0x080c, 0x6632, 0x1538,
+	0x9006, 0xb8bb, 0x0520, 0xb8ac, 0x9005, 0x0148, 0x00c6, 0x2060,
+	0x080c, 0x8c1f, 0x00ce, 0x090c, 0x8fbc, 0xb8af, 0x0000, 0x080c,
+	0x6add, 0x1168, 0x7030, 0xd08c, 0x0130, 0xb800, 0xd0bc, 0x0138,
+	0x080c, 0x6986, 0x0120, 0x080c, 0x313f, 0x0148, 0x0028, 0x080c,
+	0x328b, 0x080c, 0x316b, 0x0118, 0x8318, 0x0804, 0x305b, 0x73ae,
+	0x0010, 0x70af, 0xffff, 0x003e, 0x0804, 0x3121, 0x9780, 0x33b9,
+	0x203d, 0x97bc, 0xff00, 0x873f, 0x2041, 0x007e, 0x70ac, 0x9096,
+	0xffff, 0x1118, 0x900e, 0x28a8, 0x0050, 0x9812, 0x0220, 0x2008,
+	0x9802, 0x20a8, 0x0020, 0x70af, 0xffff, 0x0804, 0x3121, 0x2700,
+	0x0156, 0x0016, 0x9106, 0x0904, 0x3116, 0xc484, 0x080c, 0x6693,
+	0x0148, 0x080c, 0xd09b, 0x1904, 0x3116, 0x080c, 0x6632, 0x1904,
+	0x311e, 0x0008, 0xc485, 0xb8bb, 0x0520, 0xb8ac, 0x9005, 0x0148,
+	0x00c6, 0x2060, 0x080c, 0x8c1f, 0x00ce, 0x090c, 0x8fbc, 0xb8af,
+	0x0000, 0x080c, 0x6add, 0x1130, 0x7030, 0xd08c, 0x01f8, 0xb800,
+	0xd0bc, 0x11e0, 0x7294, 0xd28c, 0x0180, 0x080c, 0x6add, 0x9082,
+	0x0006, 0x02e0, 0xd484, 0x1118, 0x080c, 0x6657, 0x0028, 0x080c,
+	0x331e, 0x01a0, 0x080c, 0x3349, 0x0088, 0x080c, 0x328b, 0x080c,
+	0xd09b, 0x1160, 0x080c, 0x316b, 0x0188, 0x0040, 0x080c, 0xd09b,
+	0x1118, 0x080c, 0x331e, 0x0110, 0x0451, 0x0140, 0x001e, 0x8108,
+	0x015e, 0x1f04, 0x30c7, 0x70af, 0xffff, 0x0018, 0x001e, 0x015e,
+	0x71ae, 0x004e, 0x002e, 0x00ce, 0x00be, 0x0005, 0x00c6, 0x0016,
+	0x70af, 0x0001, 0x2009, 0x007e, 0x080c, 0x6632, 0x1168, 0xb813,
+	0x00ff, 0xb817, 0xfffe, 0x080c, 0x328b, 0x04a9, 0x0128, 0x70dc,
+	0xc0bd, 0x70de, 0x080c, 0xcde8, 0x001e, 0x00ce, 0x0005, 0x0016,
+	0x0076, 0x00d6, 0x00c6, 0x2001, 0x184c, 0x2004, 0x9084, 0x00ff,
+	0xb842, 0x080c, 0xad20, 0x01d0, 0x2b00, 0x6012, 0x080c, 0xce15,
+	0x6023, 0x0001, 0x9006, 0x080c, 0x65cf, 0x2001, 0x0000, 0x080c,
+	0x65e3, 0x0126, 0x2091, 0x8000, 0x70a8, 0x8000, 0x70aa, 0x012e,
+	0x2009, 0x0004, 0x080c, 0xad4d, 0x9085, 0x0001, 0x00ce, 0x00de,
+	0x007e, 0x001e, 0x0005, 0x0016, 0x0076, 0x00d6, 0x00c6, 0x2001,
+	0x184c, 0x2004, 0x9084, 0x00ff, 0xb842, 0x080c, 0xad20, 0x0548,
+	0x2b00, 0x6012, 0xb800, 0xc0c4, 0xb802, 0xb8a0, 0x9086, 0x007e,
+	0x0140, 0xb804, 0x9084, 0x00ff, 0x9086, 0x0006, 0x1110, 0x080c,
+	0x3240, 0x080c, 0xce15, 0x6023, 0x0001, 0x9006, 0x080c, 0x65cf,
+	0x2001, 0x0002, 0x080c, 0x65e3, 0x0126, 0x2091, 0x8000, 0x70a8,
+	0x8000, 0x70aa, 0x012e, 0x2009, 0x0002, 0x080c, 0xad4d, 0x9085,
+	0x0001, 0x00ce, 0x00de, 0x007e, 0x001e, 0x0005, 0x00b6, 0x00c6,
+	0x0026, 0x2009, 0x0080, 0x080c, 0x6632, 0x1140, 0xb813, 0x00ff,
+	0xb817, 0xfffc, 0x0039, 0x0110, 0x70e3, 0xffff, 0x002e, 0x00ce,
+	0x00be, 0x0005, 0x0016, 0x0076, 0x00d6, 0x00c6, 0x080c, 0xac5a,
+	0x01d0, 0x2b00, 0x6012, 0x080c, 0xce15, 0x6023, 0x0001, 0x9006,
+	0x080c, 0x65cf, 0x2001, 0x0002, 0x080c, 0x65e3, 0x0126, 0x2091,
+	0x8000, 0x70e4, 0x8000, 0x70e6, 0x012e, 0x2009, 0x0002, 0x080c,
+	0xad4d, 0x9085, 0x0001, 0x00ce, 0x00de, 0x007e, 0x001e, 0x0005,
+	0x00c6, 0x00d6, 0x0126, 0x2091, 0x8000, 0x2009, 0x007f, 0x080c,
+	0x6632, 0x11b8, 0xb813, 0x00ff, 0xb817, 0xfffd, 0xb8d7, 0x0004,
+	0x080c, 0xac5a, 0x0170, 0x2b00, 0x6012, 0x6316, 0x6023, 0x0001,
+	0x620a, 0x080c, 0xce15, 0x2009, 0x0022, 0x080c, 0xad4d, 0x9085,
+	0x0001, 0x012e, 0x00de, 0x00ce, 0x0005, 0x00e6, 0x00c6, 0x0066,
+	0x0036, 0x0026, 0x00b6, 0x21f0, 0x080c, 0xa91e, 0x0106, 0x080c,
+	0x9448, 0x080c, 0x93b9, 0x080c, 0xa86f, 0x080c, 0xbbf9, 0x010e,
+	0x090c, 0xa93a, 0x3e08, 0x2130, 0x81ff, 0x0120, 0x20a9, 0x007e,
+	0x900e, 0x0018, 0x20a9, 0x007f, 0x900e, 0x0016, 0x080c, 0x6693,
+	0x1140, 0x9686, 0x0002, 0x1118, 0xb800, 0xd0bc, 0x1110, 0x080c,
+	0x60ac, 0x001e, 0x8108, 0x1f04, 0x3225, 0x9686, 0x0001, 0x190c,
+	0x337c, 0x00be, 0x002e, 0x003e, 0x006e, 0x00ce, 0x00ee, 0x0005,
+	0x00e6, 0x00c6, 0x0046, 0x0036, 0x0026, 0x0016, 0x00b6, 0x080c,
+	0xa91e, 0x0106, 0x6210, 0x2258, 0xbaa0, 0x0026, 0x2019, 0x0029,
+	0x080c, 0x943d, 0x0076, 0x2039, 0x0000, 0x080c, 0x9306, 0x2c08,
+	0x080c, 0xe167, 0x007e, 0x001e, 0x010e, 0x090c, 0xa93a, 0xba10,
+	0xbb14, 0xbc84, 0x080c, 0x60ac, 0xba12, 0xbb16, 0xbc86, 0x00be,
+	0x001e, 0x002e, 0x003e, 0x004e, 0x00ce, 0x00ee, 0x0005, 0x00e6,
+	0x0006, 0x00b6, 0x6010, 0x2058, 0xb8a0, 0x00be, 0x9086, 0x0080,
+	0x0150, 0x2071, 0x1800, 0x70a8, 0x9005, 0x0110, 0x8001, 0x70aa,
+	0x000e, 0x00ee, 0x0005, 0x2071, 0x1800, 0x70e4, 0x9005, 0x0dc0,
+	0x8001, 0x70e6, 0x0ca8, 0xb800, 0xc08c, 0xb802, 0x0005, 0x00f6,
+	0x00e6, 0x00c6, 0x00b6, 0x0046, 0x0036, 0x0026, 0x0016, 0x0156,
+	0x2178, 0x080c, 0xa91e, 0x0106, 0x81ff, 0x1118, 0x20a9, 0x0001,
+	0x0078, 0x080c, 0x573e, 0xd0c4, 0x0140, 0xd0a4, 0x0130, 0x9006,
+	0x2020, 0x2009, 0x002d, 0x080c, 0xe445, 0x20a9, 0x0800, 0x9016,
+	0x0026, 0x928e, 0x007e, 0x0904, 0x32fa, 0x928e, 0x007f, 0x0904,
+	0x32fa, 0x928e, 0x0080, 0x05f0, 0x9288, 0x1000, 0x210c, 0x81ff,
+	0x05c8, 0x8fff, 0x1150, 0x2001, 0x198d, 0x0006, 0x2003, 0x0001,
+	0x080c, 0x330b, 0x000e, 0x2003, 0x0000, 0x00b6, 0x00c6, 0x2158,
+	0x2001, 0x0001, 0x080c, 0x6aa7, 0x00ce, 0x00be, 0x2019, 0x0029,
+	0x080c, 0x943d, 0x0076, 0x2039, 0x0000, 0x080c, 0x9306, 0x00b6,
+	0x00c6, 0x0026, 0x2158, 0xba04, 0x9294, 0x00ff, 0x9286, 0x0006,
+	0x1118, 0xb807, 0x0404, 0x0028, 0x2001, 0x0004, 0x8007, 0x9215,
+	0xba06, 0x002e, 0x00ce, 0x00be, 0x0016, 0x2c08, 0x080c, 0xe167,
+	0x001e, 0x007e, 0x002e, 0x8210, 0x1f04, 0x32b0, 0x010e, 0x090c,
+	0xa93a, 0x015e, 0x001e, 0x002e, 0x003e, 0x004e, 0x00be, 0x00ce,
+	0x00ee, 0x00fe, 0x0005, 0x0046, 0x0026, 0x0016, 0x080c, 0x573e,
+	0xd0c4, 0x0140, 0xd0a4, 0x0130, 0x9006, 0x2220, 0x2009, 0x0029,
+	0x080c, 0xe445, 0x001e, 0x002e, 0x004e, 0x0005, 0x0016, 0x0026,
+	0x0036, 0x00c6, 0x7294, 0x82ff, 0x01e8, 0x080c, 0x6ad5, 0x11d0,
+	0x2100, 0x080c, 0x2694, 0x81ff, 0x01b8, 0x2019, 0x0001, 0x8314,
+	0x92e0, 0x1d80, 0x2c04, 0xd384, 0x0120, 0x9084, 0xff00, 0x8007,
+	0x0010, 0x9084, 0x00ff, 0x9116, 0x0138, 0x9096, 0x00ff, 0x0110,
+	0x8318, 0x0c68, 0x9085, 0x0001, 0x00ce, 0x003e, 0x002e, 0x001e,
+	0x0005, 0x0016, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0xa91e,
+	0x0106, 0x0036, 0x2019, 0x0029, 0x00c1, 0x003e, 0x010e, 0x090c,
+	0xa93a, 0x9180, 0x1000, 0x2004, 0x9065, 0x0158, 0x0016, 0x00c6,
+	0x2061, 0x1b34, 0x001e, 0x6112, 0x080c, 0x3240, 0x001e, 0x080c,
+	0x6657, 0x012e, 0x00ce, 0x001e, 0x0005, 0x0016, 0x0026, 0x2110,
+	0x080c, 0xa404, 0x080c, 0xe7ac, 0x002e, 0x001e, 0x0005, 0x2001,
+	0x1837, 0x2004, 0xd0cc, 0x0005, 0x00c6, 0x00b6, 0x080c, 0x753d,
+	0x1118, 0x20a9, 0x0800, 0x0010, 0x20a9, 0x0782, 0x080c, 0x753d,
+	0x1110, 0x900e, 0x0010, 0x2009, 0x007e, 0x9180, 0x1000, 0x2004,
+	0x905d, 0x0130, 0x86ff, 0x0110, 0xb800, 0xd0bc, 0x090c, 0x6657,
+	0x8108, 0x1f04, 0x338d, 0x2061, 0x1800, 0x607f, 0x0000, 0x6080,
+	0x9084, 0x00ff, 0x6082, 0x60b3, 0x0000, 0x00be, 0x00ce, 0x0005,
+	0x2001, 0x1869, 0x2004, 0xd0bc, 0x0005, 0x2011, 0x1848, 0x2214,
+	0xd2ec, 0x0005, 0x0026, 0x2011, 0x1867, 0x2214, 0xd2dc, 0x002e,
+	0x0005, 0x7eef, 0x7de8, 0x7ce4, 0x80e2, 0x7be1, 0x80e0, 0x80dc,
+	0x80da, 0x7ad9, 0x80d6, 0x80d5, 0x80d4, 0x80d3, 0x80d2, 0x80d1,
+	0x79ce, 0x78cd, 0x80cc, 0x80cb, 0x80ca, 0x80c9, 0x80c7, 0x80c6,
+	0x77c5, 0x76c3, 0x80bc, 0x80ba, 0x75b9, 0x80b6, 0x74b5, 0x73b4,
+	0x72b3, 0x80b2, 0x80b1, 0x80ae, 0x71ad, 0x80ac, 0x70ab, 0x6faa,
+	0x6ea9, 0x80a7, 0x6da6, 0x6ca5, 0x6ba3, 0x6a9f, 0x699e, 0x689d,
+	0x809b, 0x8098, 0x6797, 0x6690, 0x658f, 0x6488, 0x6384, 0x6282,
+	0x8081, 0x8080, 0x617c, 0x607a, 0x8079, 0x5f76, 0x8075, 0x8074,
+	0x8073, 0x8072, 0x8071, 0x806e, 0x5e6d, 0x806c, 0x5d6b, 0x5c6a,
+	0x5b69, 0x8067, 0x5a66, 0x5965, 0x5863, 0x575c, 0x565a, 0x5559,
+	0x8056, 0x8055, 0x5454, 0x5353, 0x5252, 0x5151, 0x504e, 0x4f4d,
+	0x804c, 0x804b, 0x4e4a, 0x4d49, 0x8047, 0x4c46, 0x8045, 0x8043,
+	0x803c, 0x803a, 0x8039, 0x8036, 0x4b35, 0x8034, 0x4a33, 0x4932,
+	0x4831, 0x802e, 0x472d, 0x462c, 0x452b, 0x442a, 0x4329, 0x4227,
+	0x8026, 0x8025, 0x4123, 0x401f, 0x3f1e, 0x3e1d, 0x3d1b, 0x3c18,
+	0x8017, 0x8010, 0x3b0f, 0x3a08, 0x8004, 0x3902, 0x8001, 0x8000,
+	0x8000, 0x3800, 0x3700, 0x3600, 0x8000, 0x3500, 0x8000, 0x8000,
+	0x8000, 0x3400, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
+	0x3300, 0x3200, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
+	0x3100, 0x3000, 0x8000, 0x8000, 0x2f00, 0x8000, 0x2e00, 0x2d00,
+	0x2c00, 0x8000, 0x8000, 0x8000, 0x2b00, 0x8000, 0x2a00, 0x2900,
+	0x2800, 0x8000, 0x2700, 0x2600, 0x2500, 0x2400, 0x2300, 0x2200,
+	0x8000, 0x8000, 0x2100, 0x2000, 0x1f00, 0x1e00, 0x1d00, 0x1c00,
+	0x8000, 0x8000, 0x1b00, 0x1a00, 0x8000, 0x1900, 0x8000, 0x8000,
+	0x8000, 0x8000, 0x8000, 0x8000, 0x1800, 0x8000, 0x1700, 0x1600,
+	0x1500, 0x8000, 0x1400, 0x1300, 0x1200, 0x1100, 0x1000, 0x0f00,
+	0x8000, 0x8000, 0x0e00, 0x0d00, 0x0c00, 0x0b00, 0x0a00, 0x0900,
+	0x8000, 0x8000, 0x0800, 0x0700, 0x8000, 0x0600, 0x8000, 0x8000,
+	0x8000, 0x0500, 0x0400, 0x0300, 0x8000, 0x0200, 0x8000, 0x8000,
+	0x8000, 0x0100, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
+	0x0000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
 	0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
-	0x2071, 0x189e, 0x7003, 0x0002, 0x9006, 0x7016, 0x701a, 0x704a,
-	0x704e, 0x700e, 0x7042, 0x7046, 0x703b, 0x18ba, 0x703f, 0x18ba,
-	0x7007, 0x0001, 0x080c, 0x1060, 0x090c, 0x0d7d, 0x2900, 0x706a,
-	0xa867, 0x0002, 0xa8ab, 0xdcb0, 0x080c, 0x1060, 0x090c, 0x0d7d,
-	0x2900, 0x706e, 0xa867, 0x0002, 0xa8ab, 0xdcb0, 0x0005, 0x2071,
-	0x189e, 0x7004, 0x0002, 0x34b7, 0x34b8, 0x34cb, 0x34df, 0x0005,
-	0x1004, 0x34c8, 0x0e04, 0x34c8, 0x2079, 0x0000, 0x0126, 0x2091,
-	0x8000, 0x700c, 0x9005, 0x1128, 0x700f, 0x0001, 0x012e, 0x0468,
-	0x0005, 0x012e, 0x0ce8, 0x2079, 0x0000, 0x2061, 0x18b8, 0x2c4c,
-	0xa86c, 0x908e, 0x0100, 0x0128, 0x9086, 0x0200, 0x0904, 0x35b3,
-	0x0005, 0x7018, 0x2048, 0x2061, 0x1800, 0x701c, 0x0807, 0x7014,
-	0x2048, 0xa864, 0x9094, 0x00ff, 0x9296, 0x0029, 0x1120, 0xaa78,
-	0xd2fc, 0x0128, 0x0005, 0x9086, 0x0103, 0x0108, 0x0005, 0x2079,
-	0x0000, 0x2061, 0x1800, 0x701c, 0x0807, 0x2061, 0x1800, 0x7880,
-	0x908a, 0x0040, 0x1210, 0x61d0, 0x0042, 0x2100, 0x908a, 0x003f,
-	0x1a04, 0x35b0, 0x61d0, 0x0804, 0x3545, 0x3587, 0x35bf, 0x35b0,
-	0x35c9, 0x35d3, 0x35d9, 0x35dd, 0x35ed, 0x35f1, 0x3607, 0x360d,
-	0x3613, 0x361e, 0x3629, 0x3638, 0x3647, 0x3655, 0x366c, 0x3687,
-	0x35b0, 0x3730, 0x376e, 0x3813, 0x3824, 0x3847, 0x35b0, 0x35b0,
-	0x35b0, 0x387f, 0x389f, 0x38a8, 0x38d4, 0x38da, 0x35b0, 0x3920,
-	0x35b0, 0x35b0, 0x35b0, 0x35b0, 0x35b0, 0x392b, 0x3934, 0x393c,
-	0x393e, 0x35b0, 0x35b0, 0x35b0, 0x35b0, 0x35b0, 0x35b0, 0x396e,
-	0x35b0, 0x35b0, 0x35b0, 0x35b0, 0x35b0, 0x398b, 0x39ef, 0x35b0,
-	0x35b0, 0x35b0, 0x35b0, 0x35b0, 0x35b0, 0x0002, 0x3a19, 0x3a1c,
-	0x3a7b, 0x3a94, 0x3ac4, 0x3d66, 0x35b0, 0x52c6, 0x35b0, 0x35b0,
-	0x35b0, 0x35b0, 0x35b0, 0x35b0, 0x35b0, 0x35b0, 0x3607, 0x360d,
-	0x4265, 0x5719, 0x4283, 0x5355, 0x53a6, 0x54a9, 0x35b0, 0x550b,
-	0x5547, 0x5578, 0x5684, 0x55a5, 0x5604, 0x35b0, 0x4287, 0x443c,
-	0x4452, 0x4477, 0x44dc, 0x4550, 0x4570, 0x45e7, 0x4643, 0x469f,
-	0x46a2, 0x46c7, 0x4737, 0x47a1, 0x47a9, 0x48db, 0x4a53, 0x4a87,
-	0x4ceb, 0x35b0, 0x4d09, 0x4dae, 0x4e90, 0x4eea, 0x35b0, 0x4f9f,
-	0x35b0, 0x5005, 0x5020, 0x47a9, 0x5266, 0x714c, 0x0000, 0x2021,
-	0x4000, 0x080c, 0x4b05, 0x0126, 0x2091, 0x8000, 0x0e04, 0x3591,
-	0x0010, 0x012e, 0x0cc0, 0x7c36, 0x9486, 0x4000, 0x0118, 0x7833,
-	0x0011, 0x0010, 0x7833, 0x0010, 0x7c82, 0x7986, 0x7a8a, 0x7b8e,
-	0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11ee,
-	0x7007, 0x0001, 0x2091, 0x5000, 0x700f, 0x0000, 0x012e, 0x0005,
-	0x2021, 0x4001, 0x08b0, 0x2021, 0x4002, 0x0898, 0x2021, 0x4003,
-	0x0880, 0x2021, 0x4005, 0x0868, 0x2021, 0x4006, 0x0850, 0x2039,
-	0x0001, 0x902e, 0x2520, 0x7b88, 0x7a8c, 0x7884, 0x7990, 0x0804,
-	0x4b12, 0x2039, 0x0001, 0x902e, 0x2520, 0x7b88, 0x7a8c, 0x7884,
-	0x7990, 0x0804, 0x4b15, 0x7984, 0x7888, 0x2114, 0x200a, 0x0804,
-	0x3587, 0x7984, 0x2114, 0x0804, 0x3587, 0x20e1, 0x0000, 0x2099,
-	0x0021, 0x20e9, 0x0000, 0x20a1, 0x0021, 0x20a9, 0x001f, 0x4003,
-	0x7984, 0x7a88, 0x7b8c, 0x0804, 0x3587, 0x7884, 0x2060, 0x0804,
-	0x363a, 0x2009, 0x0003, 0x2011, 0x0003, 0x2019, 0x0002, 0x789b,
-	0x0137, 0x7893, 0xffff, 0x2001, 0x188f, 0x2004, 0x9005, 0x0118,
-	0x7896, 0x0804, 0x3587, 0x7897, 0x0001, 0x0804, 0x3587, 0x2039,
-	0x0001, 0x7d98, 0x7c9c, 0x0804, 0x35c3, 0x2039, 0x0001, 0x7d98,
-	0x7c9c, 0x0804, 0x35cd, 0x79a0, 0x9182, 0x0040, 0x0210, 0x0804,
-	0x35bc, 0x2138, 0x7d98, 0x7c9c, 0x0804, 0x35c3, 0x79a0, 0x9182,
-	0x0040, 0x0210, 0x0804, 0x35bc, 0x2138, 0x7d98, 0x7c9c, 0x0804,
-	0x35cd, 0x79a0, 0x9182, 0x0040, 0x0210, 0x0804, 0x35bc, 0x21e8,
-	0x7984, 0x7888, 0x20a9, 0x0001, 0x21a0, 0x4004, 0x0804, 0x3587,
-	0x2061, 0x0800, 0xe10c, 0x9006, 0x2c15, 0x9200, 0x8c60, 0x8109,
-	0x1dd8, 0x2010, 0x9005, 0x0904, 0x3587, 0x0804, 0x35b6, 0x79a0,
-	0x9182, 0x0040, 0x0210, 0x0804, 0x35bc, 0x21e0, 0x20a9, 0x0001,
-	0x7984, 0x2198, 0x4012, 0x0804, 0x3587, 0x2069, 0x1847, 0x7884,
-	0x7990, 0x911a, 0x1a04, 0x35bc, 0x8019, 0x0904, 0x35bc, 0x684a,
-	0x6942, 0x788c, 0x6852, 0x7888, 0x6856, 0x9006, 0x685a, 0x685e,
-	0x080c, 0x7820, 0x0804, 0x3587, 0x2069, 0x1847, 0x7884, 0x7994,
-	0x911a, 0x1a04, 0x35bc, 0x8019, 0x0904, 0x35bc, 0x684e, 0x6946,
-	0x788c, 0x6862, 0x7888, 0x6866, 0x9006, 0x686a, 0x686e, 0x0126,
-	0x2091, 0x8000, 0x080c, 0x6af4, 0x012e, 0x0804, 0x3587, 0x902e,
-	0x2520, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x35b9, 0x7984,
-	0x7b88, 0x7a8c, 0x20a9, 0x0005, 0x20e9, 0x0001, 0x20a1, 0x18a6,
-	0x4101, 0x080c, 0x4ac9, 0x1120, 0x2009, 0x0002, 0x0804, 0x35b9,
-	0x2009, 0x0020, 0xa85c, 0x9080, 0x0019, 0xaf60, 0x080c, 0x4b12,
-	0x701f, 0x36ab, 0x0005, 0xa864, 0x2008, 0x9084, 0x00ff, 0x9096,
-	0x0011, 0x0168, 0x9096, 0x0019, 0x0150, 0x9096, 0x0015, 0x0138,
-	0x9096, 0x0048, 0x0120, 0x9096, 0x0029, 0x1904, 0x35b9, 0x810f,
-	0x918c, 0x00ff, 0x0904, 0x35b9, 0x7112, 0x7010, 0x8001, 0x0560,
-	0x7012, 0x080c, 0x4ac9, 0x1120, 0x2009, 0x0002, 0x0804, 0x35b9,
-	0x2009, 0x0020, 0x7068, 0x2040, 0xa28c, 0xa390, 0xa494, 0xa598,
-	0x9290, 0x0040, 0x9399, 0x0000, 0x94a1, 0x0000, 0x95a9, 0x0000,
-	0xa85c, 0x9080, 0x0019, 0xaf60, 0x080c, 0x4b12, 0x701f, 0x36e9,
-	0x0005, 0xa864, 0x9084, 0x00ff, 0x9096, 0x0002, 0x0120, 0x9096,
-	0x000a, 0x1904, 0x35b9, 0x0888, 0x7014, 0x2048, 0xa868, 0xc0fd,
-	0xa86a, 0xa864, 0x9084, 0x00ff, 0x9096, 0x0029, 0x1160, 0xc2fd,
-	0xaa7a, 0x080c, 0x61b1, 0x0150, 0x0126, 0x2091, 0x8000, 0xa87a,
-	0xa982, 0x012e, 0x0050, 0x080c, 0x64de, 0x1128, 0x7007, 0x0003,
-	0x701f, 0x3715, 0x0005, 0x080c, 0x6fd3, 0x0126, 0x2091, 0x8000,
-	0x20a9, 0x0005, 0x20e1, 0x0001, 0x2099, 0x18a6, 0x400a, 0x2100,
-	0x9210, 0x9399, 0x0000, 0x94a1, 0x0000, 0x95a9, 0x0000, 0xa85c,
-	0x9080, 0x0019, 0x2009, 0x0020, 0x012e, 0xaf60, 0x0804, 0x4b15,
-	0x2091, 0x8000, 0x7837, 0x4000, 0x7833, 0x0010, 0x7883, 0x4000,
-	0x7887, 0x4953, 0x788b, 0x5020, 0x788f, 0x2020, 0x2009, 0x017f,
-	0x2104, 0x7892, 0x3f00, 0x7896, 0x2061, 0x0100, 0x6200, 0x2061,
-	0x0200, 0x603c, 0x8007, 0x9205, 0x789a, 0x2009, 0x04fd, 0x2104,
-	0x789e, 0x2091, 0x5000, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004,
-	0xd084, 0x0180, 0x2001, 0x1a21, 0x2004, 0x9005, 0x0128, 0x2001,
-	0x008b, 0x2004, 0xd0fc, 0x0dd8, 0x2001, 0x008a, 0x2003, 0x0002,
-	0x2003, 0x1001, 0x2071, 0x0080, 0x0804, 0x0427, 0x81ff, 0x1904,
-	0x35b9, 0x7984, 0x080c, 0x6644, 0x1904, 0x35bc, 0x7e98, 0x9684,
-	0x3fff, 0x9082, 0x4000, 0x1a04, 0x35bc, 0x7c88, 0x7d8c, 0x080c,
-	0x687a, 0x080c, 0x6807, 0x1518, 0x2061, 0x1ddc, 0x0126, 0x2091,
-	0x8000, 0x6000, 0x9086, 0x0000, 0x0148, 0x6014, 0x904d, 0x0130,
-	0xa86c, 0x9406, 0x1118, 0xa870, 0x9506, 0x0150, 0x012e, 0x9ce0,
-	0x001c, 0x2001, 0x181a, 0x2004, 0x9c02, 0x1a04, 0x35b9, 0x0c30,
-	0x080c, 0xc453, 0x012e, 0x0904, 0x35b9, 0x0804, 0x3587, 0x900e,
-	0x2001, 0x0005, 0x080c, 0x6fd3, 0x0126, 0x2091, 0x8000, 0x080c,
-	0xcb6e, 0x080c, 0x6d9f, 0x012e, 0x0804, 0x3587, 0x00a6, 0x2950,
-	0xb198, 0x080c, 0x6644, 0x1904, 0x3800, 0xb6a4, 0x9684, 0x3fff,
-	0x9082, 0x4000, 0x16e8, 0xb49c, 0xb5a0, 0x080c, 0x687a, 0x080c,
-	0x6824, 0x1520, 0x2061, 0x1ddc, 0x0126, 0x2091, 0x8000, 0x6000,
-	0x9086, 0x0000, 0x0148, 0x6014, 0x904d, 0x0130, 0xa86c, 0x9406,
-	0x1118, 0xa870, 0x9506, 0x0158, 0x012e, 0x9ce0, 0x001c, 0x2001,
-	0x181a, 0x2004, 0x9c02, 0x2009, 0x000d, 0x12b0, 0x0c28, 0x080c,
-	0xc453, 0x012e, 0x2009, 0x0003, 0x0178, 0x00e0, 0x900e, 0x2001,
-	0x0005, 0x080c, 0x6fd3, 0x0126, 0x2091, 0x8000, 0x080c, 0xcb6e,
-	0x080c, 0x6d93, 0x012e, 0x0070, 0xb097, 0x4005, 0xb19a, 0x0010,
-	0xb097, 0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x2a48,
-	0x00ae, 0x0005, 0xb097, 0x4000, 0x9006, 0x918d, 0x0001, 0x2008,
-	0x2a48, 0x00ae, 0x0005, 0x81ff, 0x1904, 0x35b9, 0x080c, 0x4ae0,
-	0x0904, 0x35bc, 0x080c, 0x670b, 0x0904, 0x35b9, 0x080c, 0x6880,
-	0x0904, 0x35b9, 0x0804, 0x4567, 0x81ff, 0x1904, 0x35b9, 0x080c,
-	0x4afc, 0x0904, 0x35bc, 0x080c, 0x690e, 0x0904, 0x35b9, 0x2019,
-	0x0005, 0x79a8, 0x080c, 0x689b, 0x0904, 0x35b9, 0x7888, 0x908a,
-	0x1000, 0x1a04, 0x35bc, 0x8003, 0x800b, 0x810b, 0x9108, 0x080c,
-	0x865f, 0x7984, 0xd184, 0x1904, 0x3587, 0x0804, 0x4567, 0x0126,
-	0x2091, 0x8000, 0x81ff, 0x0118, 0x2009, 0x0001, 0x0450, 0x2029,
-	0x07ff, 0x645c, 0x2400, 0x9506, 0x01f8, 0x2508, 0x080c, 0x6644,
-	0x11d8, 0x080c, 0x690e, 0x1128, 0x2009, 0x0002, 0x62c0, 0x2518,
-	0x00c0, 0x2019, 0x0004, 0x900e, 0x080c, 0x689b, 0x1118, 0x2009,
-	0x0006, 0x0078, 0x7884, 0x908a, 0x1000, 0x1270, 0x8003, 0x800b,
-	0x810b, 0x9108, 0x080c, 0x865f, 0x8529, 0x1ae0, 0x012e, 0x0804,
-	0x3587, 0x012e, 0x0804, 0x35b9, 0x012e, 0x0804, 0x35bc, 0x080c,
-	0x4ae0, 0x0904, 0x35bc, 0x080c, 0x670b, 0x0904, 0x35b9, 0x080c,
-	0xa899, 0xbaa0, 0x2019, 0x0005, 0x00c6, 0x9066, 0x080c, 0x93c6,
-	0x0076, 0x903e, 0x080c, 0x928f, 0x900e, 0x080c, 0xe038, 0x007e,
-	0x00ce, 0x080c, 0xa8b5, 0x080c, 0x687a, 0x0804, 0x3587, 0x080c,
-	0x4ae0, 0x0904, 0x35bc, 0x080c, 0x687a, 0x2208, 0x0804, 0x3587,
-	0x0156, 0x00d6, 0x00e6, 0x00c6, 0x2069, 0x1910, 0x6810, 0x6914,
-	0x910a, 0x1208, 0x900e, 0x6816, 0x9016, 0x901e, 0x2071, 0x19e6,
-	0x7028, 0x9065, 0x0118, 0x8210, 0x600c, 0x0cd8, 0x2300, 0x9218,
-	0x00ce, 0x00ee, 0x00de, 0x015e, 0x0804, 0x3587, 0x00f6, 0x0016,
-	0x907d, 0x0138, 0x9006, 0x8000, 0x2f0c, 0x81ff, 0x0110, 0x2178,
-	0x0cd0, 0x001e, 0x00fe, 0x0005, 0x2069, 0x1910, 0x6910, 0x62bc,
-	0x0804, 0x3587, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x35b9,
-	0x0126, 0x2091, 0x8000, 0x080c, 0x5709, 0x0128, 0x2009, 0x0007,
-	0x012e, 0x0804, 0x35b9, 0x012e, 0x615c, 0x9190, 0x3388, 0x2215,
-	0x9294, 0x00ff, 0x637c, 0x83ff, 0x0108, 0x6280, 0x67dc, 0x97c4,
-	0x000a, 0x98c6, 0x000a, 0x1118, 0x2031, 0x0001, 0x00e8, 0x97c4,
-	0x0022, 0x98c6, 0x0022, 0x1118, 0x2031, 0x0003, 0x00a8, 0x97c4,
-	0x0012, 0x98c6, 0x0012, 0x1118, 0x2031, 0x0002, 0x0068, 0x080c,
-	0x74ec, 0x1118, 0x2031, 0x0004, 0x0038, 0xd79c, 0x0120, 0x2009,
-	0x0005, 0x0804, 0x35b9, 0x9036, 0x7e9a, 0x7f9e, 0x0804, 0x3587,
-	0x614c, 0x6250, 0x2019, 0x1985, 0x231c, 0x2001, 0x1986, 0x2004,
-	0x789a, 0x0804, 0x3587, 0x0126, 0x2091, 0x8000, 0x6138, 0x623c,
-	0x6340, 0x012e, 0x0804, 0x3587, 0x080c, 0x4afc, 0x0904, 0x35bc,
-	0xba44, 0xbb38, 0x0804, 0x3587, 0x080c, 0x0d7d, 0x080c, 0x4afc,
-	0x2110, 0x0904, 0x35bc, 0xb804, 0x908c, 0x00ff, 0x918e, 0x0006,
-	0x0140, 0x9084, 0xff00, 0x9086, 0x0600, 0x2009, 0x0009, 0x1904,
-	0x35b9, 0x0126, 0x2091, 0x8000, 0x2019, 0x0005, 0x00c6, 0x9066,
-	0x080c, 0xa899, 0x080c, 0xa37f, 0x080c, 0x93c6, 0x0076, 0x903e,
-	0x080c, 0x928f, 0x900e, 0x080c, 0xe038, 0x007e, 0x00ce, 0x080c,
-	0xa8b5, 0xb807, 0x0407, 0x012e, 0x0804, 0x3587, 0x614c, 0x6250,
-	0x7884, 0x604e, 0x7b88, 0x6352, 0x2069, 0x1847, 0x831f, 0x9305,
-	0x6816, 0x788c, 0x2069, 0x1985, 0x2d1c, 0x206a, 0x7e98, 0x9682,
-	0x0014, 0x1210, 0x2031, 0x07d0, 0x2069, 0x1986, 0x2d04, 0x266a,
-	0x789a, 0x0804, 0x3587, 0x0126, 0x2091, 0x8000, 0x6138, 0x7884,
-	0x603a, 0x910e, 0xd1b4, 0x190c, 0x0ed9, 0xd0c4, 0x01a8, 0x00d6,
-	0x78a8, 0x2009, 0x199c, 0x200a, 0x78ac, 0x2011, 0x199d, 0x2012,
-	0x2069, 0x0100, 0x6838, 0x9086, 0x0007, 0x1118, 0x2214, 0x6a5a,
-	0x0010, 0x210c, 0x695a, 0x00de, 0x7888, 0x603e, 0x2011, 0x0116,
-	0x220c, 0x7888, 0xd08c, 0x0118, 0x918d, 0x0040, 0x0010, 0x918c,
-	0xff7f, 0x2112, 0x6140, 0x788c, 0x6042, 0x910e, 0xd1e4, 0x190c,
-	0x0ef4, 0x9084, 0x0020, 0x0130, 0x78b4, 0x6046, 0x9084, 0x0001,
-	0x090c, 0x4265, 0x6040, 0xd0cc, 0x0120, 0x78b0, 0x2011, 0x0114,
-	0x2012, 0x012e, 0x0804, 0x3587, 0x00f6, 0x2079, 0x1800, 0x7a38,
-	0xa898, 0x9084, 0xfebf, 0x9215, 0xa89c, 0x9084, 0xfebf, 0x8002,
-	0x9214, 0x7838, 0x9084, 0x0140, 0x9215, 0x7a3a, 0xa897, 0x4000,
-	0x900e, 0x9085, 0x0001, 0x2001, 0x0000, 0x00fe, 0x0005, 0x7898,
-	0x9005, 0x01a8, 0x7888, 0x9025, 0x0904, 0x35bc, 0x788c, 0x902d,
-	0x0904, 0x35bc, 0x900e, 0x080c, 0x6644, 0x1120, 0xba44, 0xbb38,
-	0xbc46, 0xbd3a, 0x9186, 0x07ff, 0x0190, 0x8108, 0x0ca0, 0x080c,
-	0x4afc, 0x0904, 0x35bc, 0x7888, 0x900d, 0x0904, 0x35bc, 0x788c,
-	0x9005, 0x0904, 0x35bc, 0xba44, 0xb946, 0xbb38, 0xb83a, 0x0804,
-	0x3587, 0x2011, 0xbc09, 0x0010, 0x2011, 0xbc05, 0x080c, 0x5709,
-	0x1904, 0x35b9, 0x00c6, 0x2061, 0x0100, 0x7984, 0x9186, 0x00ff,
-	0x1130, 0x2001, 0x1818, 0x2004, 0x9085, 0xff00, 0x0088, 0x9182,
-	0x007f, 0x16e0, 0x9188, 0x3388, 0x210d, 0x918c, 0x00ff, 0x2001,
-	0x1818, 0x2004, 0x0026, 0x9116, 0x002e, 0x0580, 0x810f, 0x9105,
-	0x0126, 0x2091, 0x8000, 0x0006, 0x080c, 0xab9a, 0x000e, 0x0510,
-	0x602e, 0x620a, 0x7984, 0x00b6, 0x080c, 0x65e9, 0x2b08, 0x00be,
-	0x1500, 0x6112, 0x6023, 0x0001, 0x080c, 0x4ac9, 0x01d0, 0x9006,
-	0xa866, 0x7007, 0x0003, 0xa832, 0xa868, 0xc0fd, 0xa86a, 0x701f,
-	0x3a74, 0x2900, 0x6016, 0x2009, 0x0032, 0x080c, 0xac8d, 0x012e,
-	0x00ce, 0x0005, 0x012e, 0x00ce, 0x0804, 0x35b9, 0x00ce, 0x0804,
-	0x35bc, 0x080c, 0xabf0, 0x0cb0, 0xa830, 0x9086, 0x0100, 0x0904,
-	0x35b9, 0x0804, 0x3587, 0x2061, 0x1a6e, 0x0126, 0x2091, 0x8000,
-	0x6000, 0xd084, 0x0170, 0x6104, 0x6208, 0x2061, 0x1800, 0x6354,
-	0x6074, 0x789a, 0x60c0, 0x789e, 0x60bc, 0x78aa, 0x012e, 0x0804,
-	0x3587, 0x900e, 0x2110, 0x0c88, 0x81ff, 0x1904, 0x35b9, 0x080c,
-	0x74ec, 0x0904, 0x35b9, 0x0126, 0x2091, 0x8000, 0x6254, 0x6074,
-	0x9202, 0x0248, 0x9085, 0x0001, 0x080c, 0x2699, 0x080c, 0x5923,
-	0x012e, 0x0804, 0x3587, 0x012e, 0x0804, 0x35bc, 0x0006, 0x0016,
-	0x00c6, 0x00e6, 0x2001, 0x19a8, 0x2070, 0x2061, 0x1847, 0x6008,
-	0x2072, 0x900e, 0x2011, 0x1400, 0x080c, 0x9181, 0x7206, 0x00ee,
-	0x00ce, 0x001e, 0x000e, 0x0005, 0x0126, 0x2091, 0x8000, 0x81ff,
-	0x0128, 0x012e, 0x2021, 0x400b, 0x0804, 0x3589, 0x7884, 0xd0fc,
-	0x0148, 0x2001, 0x002a, 0x2004, 0x9082, 0x00e1, 0x0288, 0x012e,
-	0x0804, 0x35bc, 0x2001, 0x002a, 0x2004, 0x2069, 0x1847, 0x6908,
-	0x9102, 0x1230, 0x012e, 0x0804, 0x35bc, 0x012e, 0x0804, 0x35b9,
-	0x080c, 0xab5a, 0x0dd0, 0x7884, 0xd0fc, 0x0904, 0x3b3f, 0x00c6,
-	0x080c, 0x4ac9, 0x00ce, 0x0d88, 0xa867, 0x0000, 0x7884, 0xa80a,
-	0x7898, 0xa80e, 0x789c, 0xa812, 0x2001, 0x002e, 0x2004, 0xa81a,
-	0x2001, 0x002f, 0x2004, 0xa81e, 0x2001, 0x0030, 0x2004, 0xa822,
-	0x2001, 0x0031, 0x2004, 0xa826, 0x2001, 0x0034, 0x2004, 0xa82a,
-	0x2001, 0x0035, 0x2004, 0xa82e, 0x2001, 0x002a, 0x2004, 0x9080,
-	0x0003, 0x9084, 0x00fc, 0x8004, 0xa816, 0x080c, 0x3cc9, 0x0928,
-	0x7014, 0x2048, 0xad2c, 0xac28, 0xab1c, 0xaa18, 0xa930, 0xa808,
-	0xd0b4, 0x1120, 0x2029, 0x0000, 0x2021, 0x0000, 0x8906, 0x8006,
-	0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x001b, 0x080c,
-	0x4b12, 0x701f, 0x3c06, 0x7023, 0x0001, 0x012e, 0x0005, 0x080c,
-	0xa899, 0x0046, 0x0086, 0x0096, 0x00a6, 0x00b6, 0x00c6, 0x00d6,
-	0x00e6, 0x00f6, 0x080c, 0x3aae, 0x2001, 0x199e, 0x2003, 0x0000,
-	0x2021, 0x000a, 0x2061, 0x0100, 0x6104, 0x0016, 0x60bb, 0x0000,
-	0x60bf, 0x32e1, 0x60bf, 0x0012, 0x080c, 0x3d38, 0x080c, 0x3cf7,
-	0x00f6, 0x00e6, 0x0086, 0x2940, 0x2071, 0x19e6, 0x2079, 0x0090,
-	0x00d6, 0x2069, 0x0000, 0x6884, 0xd0b4, 0x0140, 0x2001, 0x0035,
-	0x2004, 0x780e, 0x2001, 0x0034, 0x2004, 0x780a, 0x00de, 0x2011,
-	0x0001, 0x080c, 0x40a9, 0x008e, 0x00ee, 0x00fe, 0x080c, 0x3fd6,
-	0x080c, 0x3f03, 0x05b8, 0x2001, 0x020b, 0x2004, 0x9084, 0x0140,
-	0x1db8, 0x080c, 0x411d, 0x00f6, 0x2079, 0x0300, 0x78bc, 0x00fe,
-	0x908c, 0x0070, 0x1560, 0x2071, 0x0200, 0x7037, 0x0000, 0x7050,
-	0x9084, 0xff00, 0x9086, 0x3200, 0x1510, 0x7037, 0x0001, 0x7050,
-	0x9084, 0xff00, 0x9086, 0xe100, 0x11d0, 0x7037, 0x0000, 0x7054,
-	0x7037, 0x0000, 0x715c, 0x9106, 0x1190, 0x2001, 0x1820, 0x2004,
-	0x9106, 0x1168, 0x00c6, 0x2061, 0x0100, 0x6024, 0x9084, 0x1e00,
-	0x00ce, 0x0138, 0x080c, 0x3f0d, 0x080c, 0x3cf2, 0x0058, 0x080c,
-	0x3cf2, 0x080c, 0x4041, 0x080c, 0x3fcc, 0x2001, 0x020b, 0x2004,
-	0xd0e4, 0x0dd8, 0x2001, 0x032a, 0x2003, 0x0004, 0x2061, 0x0100,
-	0x6027, 0x0002, 0x001e, 0x6106, 0x2011, 0x020d, 0x2013, 0x0020,
-	0x60bb, 0x0000, 0x60bf, 0x0108, 0x60bf, 0x0012, 0x2001, 0x0004,
-	0x200c, 0x918c, 0xfffd, 0x2102, 0x080c, 0x1340, 0x2009, 0x0028,
-	0x080c, 0x21d9, 0x2001, 0x0227, 0x200c, 0x2102, 0x080c, 0xa8b5,
-	0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x00ae, 0x009e, 0x008e,
-	0x004e, 0x2001, 0x199e, 0x2004, 0x9005, 0x1118, 0x012e, 0x0804,
-	0x3587, 0x012e, 0x2021, 0x400c, 0x0804, 0x3589, 0x0016, 0x0026,
-	0x0036, 0x0046, 0x0056, 0x0076, 0x0086, 0x0096, 0x00d6, 0x0156,
-	0x7014, 0x2048, 0x7020, 0x20a8, 0x8000, 0x7022, 0xa804, 0x9005,
-	0x0904, 0x3c62, 0x2048, 0x1f04, 0x3c16, 0x7068, 0x2040, 0xa28c,
-	0xa390, 0xa494, 0xa598, 0xa930, 0xa808, 0xd0b4, 0x1120, 0x2029,
-	0x0000, 0x2021, 0x0000, 0x0096, 0x7014, 0x2048, 0xa864, 0x009e,
-	0x9086, 0x0103, 0x0170, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f,
-	0x9084, 0xffc0, 0x9080, 0x001b, 0x080c, 0x4b12, 0x701f, 0x3c06,
-	0x00b0, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0,
-	0x9080, 0x001b, 0x21a8, 0x27e0, 0x2098, 0x27e8, 0x20a0, 0x0006,
-	0x080c, 0x0fc4, 0x000e, 0x080c, 0x4b15, 0x701f, 0x3c06, 0x015e,
-	0x00de, 0x009e, 0x008e, 0x007e, 0x005e, 0x004e, 0x003e, 0x002e,
-	0x001e, 0x0005, 0x7014, 0x2048, 0xa864, 0x9086, 0x0103, 0x1118,
-	0x701f, 0x3cc7, 0x0450, 0x7014, 0x2048, 0xa868, 0xc0fd, 0xa86a,
-	0x2009, 0x007f, 0x080c, 0x65e3, 0x0110, 0x9006, 0x0030, 0xb813,
-	0x00ff, 0xb817, 0xfffd, 0x080c, 0xcd4d, 0x015e, 0x00de, 0x009e,
-	0x008e, 0x007e, 0x005e, 0x004e, 0x003e, 0x002e, 0x001e, 0x0904,
-	0x35b9, 0x0016, 0x0026, 0x0036, 0x0046, 0x0056, 0x0076, 0x0086,
-	0x0096, 0x00d6, 0x0156, 0x701f, 0x3c99, 0x7007, 0x0003, 0x0804,
-	0x3c57, 0xa830, 0x9086, 0x0100, 0x2021, 0x400c, 0x0904, 0x3589,
-	0x0076, 0xad10, 0xac0c, 0xab24, 0xaa20, 0xa930, 0xa808, 0xd0b4,
+	0x8000, 0x2071, 0x189e, 0x7003, 0x0002, 0x9006, 0x7016, 0x701a,
+	0x704a, 0x704e, 0x700e, 0x7042, 0x7046, 0x703b, 0x18ba, 0x703f,
+	0x18ba, 0x7007, 0x0001, 0x080c, 0x1060, 0x090c, 0x0d7d, 0x2900,
+	0x706a, 0xa867, 0x0002, 0xa8ab, 0xdcb0, 0x080c, 0x1060, 0x090c,
+	0x0d7d, 0x2900, 0x706e, 0xa867, 0x0002, 0xa8ab, 0xdcb0, 0x0005,
+	0x2071, 0x189e, 0x7004, 0x0002, 0x34e8, 0x34e9, 0x34fc, 0x3510,
+	0x0005, 0x1004, 0x34f9, 0x0e04, 0x34f9, 0x2079, 0x0000, 0x0126,
+	0x2091, 0x8000, 0x700c, 0x9005, 0x1128, 0x700f, 0x0001, 0x012e,
+	0x0468, 0x0005, 0x012e, 0x0ce8, 0x2079, 0x0000, 0x2061, 0x18b8,
+	0x2c4c, 0xa86c, 0x908e, 0x0100, 0x0128, 0x9086, 0x0200, 0x0904,
+	0x35e4, 0x0005, 0x7018, 0x2048, 0x2061, 0x1800, 0x701c, 0x0807,
+	0x7014, 0x2048, 0xa864, 0x9094, 0x00ff, 0x9296, 0x0029, 0x1120,
+	0xaa78, 0xd2fc, 0x0128, 0x0005, 0x9086, 0x0103, 0x0108, 0x0005,
+	0x2079, 0x0000, 0x2061, 0x1800, 0x701c, 0x0807, 0x2061, 0x1800,
+	0x7880, 0x908a, 0x0040, 0x1210, 0x61d0, 0x0042, 0x2100, 0x908a,
+	0x003f, 0x1a04, 0x35e1, 0x61d0, 0x0804, 0x3576, 0x35b8, 0x35f0,
+	0x35e1, 0x35fa, 0x3604, 0x360a, 0x360e, 0x361e, 0x3622, 0x3638,
+	0x363e, 0x3644, 0x364f, 0x365a, 0x3669, 0x3678, 0x3686, 0x369d,
+	0x36b8, 0x35e1, 0x3761, 0x379f, 0x3844, 0x3855, 0x3878, 0x35e1,
+	0x35e1, 0x35e1, 0x38b0, 0x38d0, 0x38d9, 0x3905, 0x390b, 0x35e1,
+	0x3951, 0x35e1, 0x35e1, 0x35e1, 0x35e1, 0x35e1, 0x395c, 0x3965,
+	0x396d, 0x396f, 0x35e1, 0x35e1, 0x35e1, 0x35e1, 0x35e1, 0x35e1,
+	0x399f, 0x35e1, 0x35e1, 0x35e1, 0x35e1, 0x35e1, 0x39bc, 0x3a26,
+	0x35e1, 0x35e1, 0x35e1, 0x35e1, 0x35e1, 0x35e1, 0x0002, 0x3a50,
+	0x3a53, 0x3ab2, 0x3acb, 0x3afb, 0x3d9d, 0x35e1, 0x52f4, 0x35e1,
+	0x35e1, 0x35e1, 0x35e1, 0x35e1, 0x35e1, 0x35e1, 0x35e1, 0x3638,
+	0x363e, 0x428c, 0x5762, 0x42aa, 0x5383, 0x53d4, 0x54df, 0x35e1,
+	0x5541, 0x557d, 0x55ae, 0x56be, 0x55db, 0x563e, 0x35e1, 0x42ae,
+	0x4463, 0x4479, 0x449e, 0x4503, 0x4577, 0x4597, 0x460e, 0x466a,
+	0x46c6, 0x46c9, 0x46ee, 0x4760, 0x47ca, 0x47d2, 0x4904, 0x4a7c,
+	0x4ab0, 0x4d14, 0x35e1, 0x4d32, 0x4dd8, 0x4eba, 0x4f14, 0x35e1,
+	0x4fcb, 0x35e1, 0x5033, 0x504e, 0x47d2, 0x5294, 0x714c, 0x0000,
+	0x2021, 0x4000, 0x080c, 0x4b2e, 0x0126, 0x2091, 0x8000, 0x0e04,
+	0x35c2, 0x0010, 0x012e, 0x0cc0, 0x7c36, 0x9486, 0x4000, 0x0118,
+	0x7833, 0x0011, 0x0010, 0x7833, 0x0010, 0x7c82, 0x7986, 0x7a8a,
+	0x7b8e, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c,
+	0x11ee, 0x7007, 0x0001, 0x2091, 0x5000, 0x700f, 0x0000, 0x012e,
+	0x0005, 0x2021, 0x4001, 0x08b0, 0x2021, 0x4002, 0x0898, 0x2021,
+	0x4003, 0x0880, 0x2021, 0x4005, 0x0868, 0x2021, 0x4006, 0x0850,
+	0x2039, 0x0001, 0x902e, 0x2520, 0x7b88, 0x7a8c, 0x7884, 0x7990,
+	0x0804, 0x4b3b, 0x2039, 0x0001, 0x902e, 0x2520, 0x7b88, 0x7a8c,
+	0x7884, 0x7990, 0x0804, 0x4b3e, 0x7984, 0x7888, 0x2114, 0x200a,
+	0x0804, 0x35b8, 0x7984, 0x2114, 0x0804, 0x35b8, 0x20e1, 0x0000,
+	0x2099, 0x0021, 0x20e9, 0x0000, 0x20a1, 0x0021, 0x20a9, 0x001f,
+	0x4003, 0x7984, 0x7a88, 0x7b8c, 0x0804, 0x35b8, 0x7884, 0x2060,
+	0x0804, 0x366b, 0x2009, 0x0003, 0x2011, 0x0003, 0x2019, 0x0008,
+	0x789b, 0x0137, 0x7893, 0xffff, 0x2001, 0x188f, 0x2004, 0x9005,
+	0x0118, 0x7896, 0x0804, 0x35b8, 0x7897, 0x0001, 0x0804, 0x35b8,
+	0x2039, 0x0001, 0x7d98, 0x7c9c, 0x0804, 0x35f4, 0x2039, 0x0001,
+	0x7d98, 0x7c9c, 0x0804, 0x35fe, 0x79a0, 0x9182, 0x0040, 0x0210,
+	0x0804, 0x35ed, 0x2138, 0x7d98, 0x7c9c, 0x0804, 0x35f4, 0x79a0,
+	0x9182, 0x0040, 0x0210, 0x0804, 0x35ed, 0x2138, 0x7d98, 0x7c9c,
+	0x0804, 0x35fe, 0x79a0, 0x9182, 0x0040, 0x0210, 0x0804, 0x35ed,
+	0x21e8, 0x7984, 0x7888, 0x20a9, 0x0001, 0x21a0, 0x4004, 0x0804,
+	0x35b8, 0x2061, 0x0800, 0xe10c, 0x9006, 0x2c15, 0x9200, 0x8c60,
+	0x8109, 0x1dd8, 0x2010, 0x9005, 0x0904, 0x35b8, 0x0804, 0x35e7,
+	0x79a0, 0x9182, 0x0040, 0x0210, 0x0804, 0x35ed, 0x21e0, 0x20a9,
+	0x0001, 0x7984, 0x2198, 0x4012, 0x0804, 0x35b8, 0x2069, 0x1847,
+	0x7884, 0x7990, 0x911a, 0x1a04, 0x35ed, 0x8019, 0x0904, 0x35ed,
+	0x684a, 0x6942, 0x788c, 0x6852, 0x7888, 0x6856, 0x9006, 0x685a,
+	0x685e, 0x080c, 0x7871, 0x0804, 0x35b8, 0x2069, 0x1847, 0x7884,
+	0x7994, 0x911a, 0x1a04, 0x35ed, 0x8019, 0x0904, 0x35ed, 0x684e,
+	0x6946, 0x788c, 0x6862, 0x7888, 0x6866, 0x9006, 0x686a, 0x686e,
+	0x0126, 0x2091, 0x8000, 0x080c, 0x6b43, 0x012e, 0x0804, 0x35b8,
+	0x902e, 0x2520, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x35ea,
+	0x7984, 0x7b88, 0x7a8c, 0x20a9, 0x0005, 0x20e9, 0x0001, 0x20a1,
+	0x18a6, 0x4101, 0x080c, 0x4af2, 0x1120, 0x2009, 0x0002, 0x0804,
+	0x35ea, 0x2009, 0x0020, 0xa85c, 0x9080, 0x0019, 0xaf60, 0x080c,
+	0x4b3b, 0x701f, 0x36dc, 0x0005, 0xa864, 0x2008, 0x9084, 0x00ff,
+	0x9096, 0x0011, 0x0168, 0x9096, 0x0019, 0x0150, 0x9096, 0x0015,
+	0x0138, 0x9096, 0x0048, 0x0120, 0x9096, 0x0029, 0x1904, 0x35ea,
+	0x810f, 0x918c, 0x00ff, 0x0904, 0x35ea, 0x7112, 0x7010, 0x8001,
+	0x0560, 0x7012, 0x080c, 0x4af2, 0x1120, 0x2009, 0x0002, 0x0804,
+	0x35ea, 0x2009, 0x0020, 0x7068, 0x2040, 0xa28c, 0xa390, 0xa494,
+	0xa598, 0x9290, 0x0040, 0x9399, 0x0000, 0x94a1, 0x0000, 0x95a9,
+	0x0000, 0xa85c, 0x9080, 0x0019, 0xaf60, 0x080c, 0x4b3b, 0x701f,
+	0x371a, 0x0005, 0xa864, 0x9084, 0x00ff, 0x9096, 0x0002, 0x0120,
+	0x9096, 0x000a, 0x1904, 0x35ea, 0x0888, 0x7014, 0x2048, 0xa868,
+	0xc0fd, 0xa86a, 0xa864, 0x9084, 0x00ff, 0x9096, 0x0029, 0x1160,
+	0xc2fd, 0xaa7a, 0x080c, 0x61ff, 0x0150, 0x0126, 0x2091, 0x8000,
+	0xa87a, 0xa982, 0x012e, 0x0050, 0x080c, 0x652f, 0x1128, 0x7007,
+	0x0003, 0x701f, 0x3746, 0x0005, 0x080c, 0x7022, 0x0126, 0x2091,
+	0x8000, 0x20a9, 0x0005, 0x20e1, 0x0001, 0x2099, 0x18a6, 0x400a,
+	0x2100, 0x9210, 0x9399, 0x0000, 0x94a1, 0x0000, 0x95a9, 0x0000,
+	0xa85c, 0x9080, 0x0019, 0x2009, 0x0020, 0x012e, 0xaf60, 0x0804,
+	0x4b3e, 0x2091, 0x8000, 0x7837, 0x4000, 0x7833, 0x0010, 0x7883,
+	0x4000, 0x7887, 0x4953, 0x788b, 0x5020, 0x788f, 0x2020, 0x2009,
+	0x017f, 0x2104, 0x7892, 0x3f00, 0x7896, 0x2061, 0x0100, 0x6200,
+	0x2061, 0x0200, 0x603c, 0x8007, 0x9205, 0x789a, 0x2009, 0x04fd,
+	0x2104, 0x789e, 0x2091, 0x5000, 0x2091, 0x4080, 0x2001, 0x0089,
+	0x2004, 0xd084, 0x0180, 0x2001, 0x1a21, 0x2004, 0x9005, 0x0128,
+	0x2001, 0x008b, 0x2004, 0xd0fc, 0x0dd8, 0x2001, 0x008a, 0x2003,
+	0x0002, 0x2003, 0x1001, 0x2071, 0x0080, 0x0804, 0x0427, 0x81ff,
+	0x1904, 0x35ea, 0x7984, 0x080c, 0x6693, 0x1904, 0x35ed, 0x7e98,
+	0x9684, 0x3fff, 0x9082, 0x4000, 0x1a04, 0x35ed, 0x7c88, 0x7d8c,
+	0x080c, 0x68c9, 0x080c, 0x6856, 0x1518, 0x2061, 0x1ddc, 0x0126,
+	0x2091, 0x8000, 0x6000, 0x9086, 0x0000, 0x0148, 0x6014, 0x904d,
+	0x0130, 0xa86c, 0x9406, 0x1118, 0xa870, 0x9506, 0x0150, 0x012e,
+	0x9ce0, 0x001c, 0x2001, 0x181a, 0x2004, 0x9c02, 0x1a04, 0x35ea,
+	0x0c30, 0x080c, 0xc566, 0x012e, 0x0904, 0x35ea, 0x0804, 0x35b8,
+	0x900e, 0x2001, 0x0005, 0x080c, 0x7022, 0x0126, 0x2091, 0x8000,
+	0x080c, 0xcc85, 0x080c, 0x6dee, 0x012e, 0x0804, 0x35b8, 0x00a6,
+	0x2950, 0xb198, 0x080c, 0x6693, 0x1904, 0x3831, 0xb6a4, 0x9684,
+	0x3fff, 0x9082, 0x4000, 0x16e8, 0xb49c, 0xb5a0, 0x080c, 0x68c9,
+	0x080c, 0x6873, 0x1520, 0x2061, 0x1ddc, 0x0126, 0x2091, 0x8000,
+	0x6000, 0x9086, 0x0000, 0x0148, 0x6014, 0x904d, 0x0130, 0xa86c,
+	0x9406, 0x1118, 0xa870, 0x9506, 0x0158, 0x012e, 0x9ce0, 0x001c,
+	0x2001, 0x181a, 0x2004, 0x9c02, 0x2009, 0x000d, 0x12b0, 0x0c28,
+	0x080c, 0xc566, 0x012e, 0x2009, 0x0003, 0x0178, 0x00e0, 0x900e,
+	0x2001, 0x0005, 0x080c, 0x7022, 0x0126, 0x2091, 0x8000, 0x080c,
+	0xcc85, 0x080c, 0x6de2, 0x012e, 0x0070, 0xb097, 0x4005, 0xb19a,
+	0x0010, 0xb097, 0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030,
+	0x2a48, 0x00ae, 0x0005, 0xb097, 0x4000, 0x9006, 0x918d, 0x0001,
+	0x2008, 0x2a48, 0x00ae, 0x0005, 0x81ff, 0x1904, 0x35ea, 0x080c,
+	0x4b09, 0x0904, 0x35ed, 0x080c, 0x675a, 0x0904, 0x35ea, 0x080c,
+	0x68cf, 0x0904, 0x35ea, 0x0804, 0x458e, 0x81ff, 0x1904, 0x35ea,
+	0x080c, 0x4b25, 0x0904, 0x35ed, 0x080c, 0x695d, 0x0904, 0x35ea,
+	0x2019, 0x0005, 0x79a8, 0x080c, 0x68ea, 0x0904, 0x35ea, 0x7888,
+	0x908a, 0x1000, 0x1a04, 0x35ed, 0x8003, 0x800b, 0x810b, 0x9108,
+	0x080c, 0x86d6, 0x7984, 0xd184, 0x1904, 0x35b8, 0x0804, 0x458e,
+	0x0126, 0x2091, 0x8000, 0x81ff, 0x0118, 0x2009, 0x0001, 0x0450,
+	0x2029, 0x07ff, 0x645c, 0x2400, 0x9506, 0x01f8, 0x2508, 0x080c,
+	0x6693, 0x11d8, 0x080c, 0x695d, 0x1128, 0x2009, 0x0002, 0x62c0,
+	0x2518, 0x00c0, 0x2019, 0x0004, 0x900e, 0x080c, 0x68ea, 0x1118,
+	0x2009, 0x0006, 0x0078, 0x7884, 0x908a, 0x1000, 0x1270, 0x8003,
+	0x800b, 0x810b, 0x9108, 0x080c, 0x86d6, 0x8529, 0x1ae0, 0x012e,
+	0x0804, 0x35b8, 0x012e, 0x0804, 0x35ea, 0x012e, 0x0804, 0x35ed,
+	0x080c, 0x4b09, 0x0904, 0x35ed, 0x080c, 0x675a, 0x0904, 0x35ea,
+	0x080c, 0xa91e, 0xbaa0, 0x2019, 0x0005, 0x00c6, 0x9066, 0x080c,
+	0x943d, 0x0076, 0x903e, 0x080c, 0x9306, 0x900e, 0x080c, 0xe167,
+	0x007e, 0x00ce, 0x080c, 0xa93a, 0x080c, 0x68c9, 0x0804, 0x35b8,
+	0x080c, 0x4b09, 0x0904, 0x35ed, 0x080c, 0x68c9, 0x2208, 0x0804,
+	0x35b8, 0x0156, 0x00d6, 0x00e6, 0x00c6, 0x2069, 0x1910, 0x6810,
+	0x6914, 0x910a, 0x1208, 0x900e, 0x6816, 0x9016, 0x901e, 0x2071,
+	0x19e6, 0x7028, 0x9065, 0x0118, 0x8210, 0x600c, 0x0cd8, 0x2300,
+	0x9218, 0x00ce, 0x00ee, 0x00de, 0x015e, 0x0804, 0x35b8, 0x00f6,
+	0x0016, 0x907d, 0x0138, 0x9006, 0x8000, 0x2f0c, 0x81ff, 0x0110,
+	0x2178, 0x0cd0, 0x001e, 0x00fe, 0x0005, 0x2069, 0x1910, 0x6910,
+	0x62bc, 0x0804, 0x35b8, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804,
+	0x35ea, 0x0126, 0x2091, 0x8000, 0x080c, 0x5752, 0x0128, 0x2009,
+	0x0007, 0x012e, 0x0804, 0x35ea, 0x012e, 0x615c, 0x9190, 0x33b9,
+	0x2215, 0x9294, 0x00ff, 0x637c, 0x83ff, 0x0108, 0x6280, 0x67dc,
+	0x97c4, 0x000a, 0x98c6, 0x000a, 0x1118, 0x2031, 0x0001, 0x00e8,
+	0x97c4, 0x0022, 0x98c6, 0x0022, 0x1118, 0x2031, 0x0003, 0x00a8,
+	0x97c4, 0x0012, 0x98c6, 0x0012, 0x1118, 0x2031, 0x0002, 0x0068,
+	0x080c, 0x753d, 0x1118, 0x2031, 0x0004, 0x0038, 0xd79c, 0x0120,
+	0x2009, 0x0005, 0x0804, 0x35ea, 0x9036, 0x7e9a, 0x7f9e, 0x0804,
+	0x35b8, 0x614c, 0x6250, 0x2019, 0x1985, 0x231c, 0x2001, 0x1986,
+	0x2004, 0x789a, 0x0804, 0x35b8, 0x0126, 0x2091, 0x8000, 0x6138,
+	0x623c, 0x6340, 0x012e, 0x0804, 0x35b8, 0x080c, 0x4b25, 0x0904,
+	0x35ed, 0xba44, 0xbb38, 0x0804, 0x35b8, 0x080c, 0x0d7d, 0x080c,
+	0x4b25, 0x2110, 0x0904, 0x35ed, 0xb804, 0x908c, 0x00ff, 0x918e,
+	0x0006, 0x0140, 0x9084, 0xff00, 0x9086, 0x0600, 0x2009, 0x0009,
+	0x1904, 0x35ea, 0x0126, 0x2091, 0x8000, 0x2019, 0x0005, 0x00c6,
+	0x9066, 0x080c, 0xa91e, 0x080c, 0xa404, 0x080c, 0x943d, 0x0076,
+	0x903e, 0x080c, 0x9306, 0x900e, 0x080c, 0xe167, 0x007e, 0x00ce,
+	0x080c, 0xa93a, 0xb807, 0x0407, 0x012e, 0x0804, 0x35b8, 0x614c,
+	0x6250, 0x7884, 0x604e, 0x7b88, 0x6352, 0x2069, 0x1847, 0x831f,
+	0x9305, 0x6816, 0x788c, 0x2069, 0x1985, 0x2d1c, 0x206a, 0x7e98,
+	0x9682, 0x0014, 0x1210, 0x2031, 0x07d0, 0x2069, 0x1986, 0x2d04,
+	0x266a, 0x789a, 0x0804, 0x35b8, 0x0126, 0x2091, 0x8000, 0x6138,
+	0x7884, 0x603a, 0x910e, 0xd1b4, 0x190c, 0x0ed9, 0xd0c4, 0x01a8,
+	0x00d6, 0x78a8, 0x2009, 0x199c, 0x200a, 0x78ac, 0x2011, 0x199d,
+	0x2012, 0x2069, 0x0100, 0x6838, 0x9086, 0x0007, 0x1118, 0x2214,
+	0x6a5a, 0x0010, 0x210c, 0x695a, 0x00de, 0x2011, 0x0116, 0x220c,
+	0x7888, 0xd08c, 0x0118, 0x918d, 0x0040, 0x0010, 0x918c, 0xff7f,
+	0x2112, 0x603c, 0x7988, 0x613e, 0x6140, 0x910d, 0x788c, 0x6042,
+	0x7a88, 0x9294, 0x1000, 0x9205, 0x910e, 0xd1e4, 0x190c, 0x0ef4,
+	0x9084, 0x0020, 0x0130, 0x78b4, 0x6046, 0x9084, 0x0001, 0x090c,
+	0x428c, 0x6040, 0xd0cc, 0x0120, 0x78b0, 0x2011, 0x0114, 0x2012,
+	0x012e, 0x0804, 0x35b8, 0x00f6, 0x2079, 0x1800, 0x7a38, 0xa898,
+	0x9084, 0xfebf, 0x9215, 0xa89c, 0x9084, 0xfebf, 0x8002, 0x9214,
+	0x7838, 0x9084, 0x0140, 0x9215, 0x7a3a, 0xa897, 0x4000, 0x900e,
+	0x9085, 0x0001, 0x2001, 0x0000, 0x00fe, 0x0005, 0x7898, 0x9005,
+	0x01a8, 0x7888, 0x9025, 0x0904, 0x35ed, 0x788c, 0x902d, 0x0904,
+	0x35ed, 0x900e, 0x080c, 0x6693, 0x1120, 0xba44, 0xbb38, 0xbc46,
+	0xbd3a, 0x9186, 0x07ff, 0x0190, 0x8108, 0x0ca0, 0x080c, 0x4b25,
+	0x0904, 0x35ed, 0x7888, 0x900d, 0x0904, 0x35ed, 0x788c, 0x9005,
+	0x0904, 0x35ed, 0xba44, 0xb946, 0xbb38, 0xb83a, 0x0804, 0x35b8,
+	0x2011, 0xbc09, 0x0010, 0x2011, 0xbc05, 0x080c, 0x5752, 0x1904,
+	0x35ea, 0x00c6, 0x2061, 0x0100, 0x7984, 0x9186, 0x00ff, 0x1130,
+	0x2001, 0x1818, 0x2004, 0x9085, 0xff00, 0x0088, 0x9182, 0x007f,
+	0x16e0, 0x9188, 0x33b9, 0x210d, 0x918c, 0x00ff, 0x2001, 0x1818,
+	0x2004, 0x0026, 0x9116, 0x002e, 0x0580, 0x810f, 0x9105, 0x0126,
+	0x2091, 0x8000, 0x0006, 0x080c, 0xac5a, 0x000e, 0x0510, 0x602e,
+	0x620a, 0x7984, 0x00b6, 0x080c, 0x6638, 0x2b08, 0x00be, 0x1500,
+	0x6112, 0x6023, 0x0001, 0x080c, 0x4af2, 0x01d0, 0x9006, 0xa866,
+	0x7007, 0x0003, 0xa832, 0xa868, 0xc0fd, 0xa86a, 0x701f, 0x3aab,
+	0x2900, 0x6016, 0x2009, 0x0032, 0x080c, 0xad4d, 0x012e, 0x00ce,
+	0x0005, 0x012e, 0x00ce, 0x0804, 0x35ea, 0x00ce, 0x0804, 0x35ed,
+	0x080c, 0xacb0, 0x0cb0, 0xa830, 0x9086, 0x0100, 0x0904, 0x35ea,
+	0x0804, 0x35b8, 0x2061, 0x1a6e, 0x0126, 0x2091, 0x8000, 0x6000,
+	0xd084, 0x0170, 0x6104, 0x6208, 0x2061, 0x1800, 0x6354, 0x6074,
+	0x789a, 0x60c0, 0x789e, 0x60bc, 0x78aa, 0x012e, 0x0804, 0x35b8,
+	0x900e, 0x2110, 0x0c88, 0x81ff, 0x1904, 0x35ea, 0x080c, 0x753d,
+	0x0904, 0x35ea, 0x0126, 0x2091, 0x8000, 0x6254, 0x6074, 0x9202,
+	0x0248, 0x9085, 0x0001, 0x080c, 0x26ca, 0x080c, 0x5971, 0x012e,
+	0x0804, 0x35b8, 0x012e, 0x0804, 0x35ed, 0x0006, 0x0016, 0x00c6,
+	0x00e6, 0x2001, 0x19a8, 0x2070, 0x2061, 0x1847, 0x6008, 0x2072,
+	0x900e, 0x2011, 0x1400, 0x080c, 0x91f8, 0x7206, 0x00ee, 0x00ce,
+	0x001e, 0x000e, 0x0005, 0x0126, 0x2091, 0x8000, 0x81ff, 0x0128,
+	0x012e, 0x2021, 0x400b, 0x0804, 0x35ba, 0x7884, 0xd0fc, 0x0148,
+	0x2001, 0x002a, 0x2004, 0x9082, 0x00e1, 0x0288, 0x012e, 0x0804,
+	0x35ed, 0x2001, 0x002a, 0x2004, 0x2069, 0x1847, 0x6908, 0x9102,
+	0x1230, 0x012e, 0x0804, 0x35ed, 0x012e, 0x0804, 0x35ea, 0x080c,
+	0xabe2, 0x0dd0, 0x7884, 0xd0fc, 0x0904, 0x3b76, 0x00c6, 0x080c,
+	0x4af2, 0x00ce, 0x0d88, 0xa867, 0x0000, 0x7884, 0xa80a, 0x7898,
+	0xa80e, 0x789c, 0xa812, 0x2001, 0x002e, 0x2004, 0xa81a, 0x2001,
+	0x002f, 0x2004, 0xa81e, 0x2001, 0x0030, 0x2004, 0xa822, 0x2001,
+	0x0031, 0x2004, 0xa826, 0x2001, 0x0034, 0x2004, 0xa82a, 0x2001,
+	0x0035, 0x2004, 0xa82e, 0x2001, 0x002a, 0x2004, 0x9080, 0x0003,
+	0x9084, 0x00fc, 0x8004, 0xa816, 0x080c, 0x3d00, 0x0928, 0x7014,
+	0x2048, 0xad2c, 0xac28, 0xab1c, 0xaa18, 0xa930, 0xa808, 0xd0b4,
 	0x1120, 0x2029, 0x0000, 0x2021, 0x0000, 0x8906, 0x8006, 0x8007,
-	0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x001b, 0x21a8, 0x27e0,
-	0x2098, 0x27e8, 0x20a0, 0x0006, 0x080c, 0x0fc4, 0x000e, 0x080c,
-	0x4b15, 0x007e, 0x701f, 0x3c06, 0x7023, 0x0001, 0x0005, 0x0804,
-	0x3587, 0x0156, 0x00c6, 0xa814, 0x908a, 0x001e, 0x0218, 0xa833,
-	0x001e, 0x0010, 0xa832, 0x0078, 0x81ff, 0x0168, 0x0016, 0x080c,
-	0x4ac9, 0x001e, 0x0130, 0xa800, 0x2040, 0xa008, 0xa80a, 0x2100,
-	0x0c58, 0x9006, 0x0010, 0x9085, 0x0001, 0x00ce, 0x015e, 0x0005,
-	0x0006, 0x00f6, 0x2079, 0x0000, 0x7880, 0x9086, 0x0044, 0x00fe,
-	0x000e, 0x0005, 0x2001, 0x199e, 0x2003, 0x0001, 0x0005, 0x00f6,
-	0x00e6, 0x00c6, 0x2061, 0x0200, 0x2001, 0x19a9, 0x2004, 0x601a,
-	0x2061, 0x0100, 0x2001, 0x19a8, 0x2004, 0x60ce, 0x6104, 0xc1ac,
-	0x6106, 0x080c, 0x4ac9, 0xa813, 0x0019, 0xa817, 0x0001, 0x2900,
-	0xa85a, 0x2001, 0x002e, 0x2004, 0xa866, 0x2001, 0x002f, 0x2004,
-	0xa86a, 0x2061, 0x0090, 0x2079, 0x0100, 0x2001, 0x19a8, 0x2004,
-	0x6036, 0x2009, 0x0040, 0x080c, 0x21d9, 0x2001, 0x002a, 0x2004,
-	0x9084, 0xfff8, 0xa86e, 0x601a, 0xa873, 0x0000, 0x601f, 0x0000,
-	0x78ca, 0x9006, 0x600a, 0x600e, 0x00ce, 0x00ee, 0x00fe, 0x0005,
-	0x00e6, 0x080c, 0x4ac9, 0x2940, 0xa013, 0x0019, 0xa017, 0x0001,
-	0x2800, 0xa05a, 0x2001, 0x0030, 0x2004, 0xa866, 0x2001, 0x0031,
-	0x2004, 0xa86a, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8, 0xa86e,
-	0xa873, 0x0000, 0x2001, 0x032a, 0x2003, 0x0004, 0x2001, 0x0300,
-	0x2003, 0x0000, 0x2001, 0x020d, 0x2003, 0x0000, 0x2001, 0x0004,
-	0x200c, 0x918d, 0x0002, 0x2102, 0x00ee, 0x0005, 0x0126, 0x2091,
-	0x8000, 0x81ff, 0x0148, 0x080c, 0x2a27, 0x1130, 0x9006, 0x080c,
-	0x297a, 0x9006, 0x080c, 0x295d, 0x7884, 0x9084, 0x0007, 0x0002,
-	0x3d83, 0x3d8c, 0x3d95, 0x3d80, 0x3d80, 0x3d80, 0x3d80, 0x3d80,
-	0x012e, 0x0804, 0x35bc, 0x2009, 0x0114, 0x2104, 0x9085, 0x0800,
-	0x200a, 0x080c, 0x3f57, 0x00c0, 0x2009, 0x0114, 0x2104, 0x9085,
-	0x4000, 0x200a, 0x080c, 0x3f57, 0x0078, 0x080c, 0x74ec, 0x1128,
-	0x012e, 0x2009, 0x0016, 0x0804, 0x35b9, 0x81ff, 0x0128, 0x012e,
-	0x2021, 0x400b, 0x0804, 0x3589, 0x080c, 0xa899, 0x0086, 0x0096,
-	0x00a6, 0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x080c, 0x3aae,
-	0x2009, 0x0101, 0x210c, 0x0016, 0x7ec8, 0x7dcc, 0x9006, 0x2068,
-	0x2060, 0x2058, 0x080c, 0x41f8, 0x080c, 0x4148, 0x903e, 0x2720,
-	0x00f6, 0x00e6, 0x0086, 0x2940, 0x2071, 0x19e6, 0x2079, 0x0090,
-	0x00d6, 0x2069, 0x0000, 0x6884, 0xd0b4, 0x0120, 0x68d4, 0x780e,
-	0x68d0, 0x780a, 0x00de, 0x2011, 0x0001, 0x080c, 0x40a9, 0x080c,
-	0x2a2f, 0x080c, 0x2a2f, 0x080c, 0x2a2f, 0x080c, 0x2a2f, 0x080c,
-	0x40a9, 0x008e, 0x00ee, 0x00fe, 0x080c, 0x3fd6, 0x2009, 0x9c40,
-	0x8109, 0x11b0, 0x080c, 0x3f0d, 0x2001, 0x0004, 0x200c, 0x918c,
-	0xfffd, 0x2102, 0x001e, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be,
-	0x00ae, 0x009e, 0x008e, 0x2009, 0x0017, 0x080c, 0x35b9, 0x0cf8,
-	0x2001, 0x020b, 0x2004, 0x9084, 0x0140, 0x1d10, 0x00f6, 0x2079,
-	0x0000, 0x7884, 0x00fe, 0xd0bc, 0x0178, 0x2001, 0x0201, 0x200c,
-	0x81ff, 0x0150, 0x080c, 0x3fb4, 0x2d00, 0x9c05, 0x9b05, 0x0120,
-	0x080c, 0x3f0d, 0x0804, 0x3eb6, 0x080c, 0x411d, 0x080c, 0x4041,
-	0x080c, 0x3f97, 0x080c, 0x3fcc, 0x00f6, 0x2079, 0x0100, 0x7824,
-	0xd0ac, 0x0130, 0x8b58, 0x080c, 0x3f0d, 0x00fe, 0x0804, 0x3eb6,
-	0x00fe, 0x080c, 0x3f03, 0x1150, 0x8d68, 0x2001, 0x0032, 0x2602,
-	0x2001, 0x0033, 0x2502, 0x080c, 0x3f0d, 0x0080, 0x87ff, 0x0138,
-	0x2001, 0x0201, 0x2004, 0x9005, 0x1908, 0x8739, 0x0038, 0x2001,
-	0x1a6a, 0x2004, 0x9086, 0x0000, 0x1904, 0x3e06, 0x2001, 0x032f,
-	0x2003, 0x00f6, 0x8631, 0x1208, 0x8529, 0x2500, 0x9605, 0x0904,
-	0x3eb6, 0x7884, 0xd0bc, 0x0128, 0x2d00, 0x9c05, 0x9b05, 0x1904,
-	0x3eb6, 0xa013, 0x0019, 0x2001, 0x032a, 0x2003, 0x0004, 0x7884,
-	0xd0ac, 0x1148, 0x2001, 0x1a6a, 0x2003, 0x0003, 0x2001, 0x032a,
-	0x2003, 0x0009, 0x0030, 0xa017, 0x0001, 0x78b4, 0x9005, 0x0108,
-	0xa016, 0x2800, 0xa05a, 0x2009, 0x0040, 0x080c, 0x21d9, 0x2900,
-	0xa85a, 0xa813, 0x0019, 0x7884, 0xd0a4, 0x1180, 0xa817, 0x0000,
-	0x00c6, 0x20a9, 0x0004, 0x2061, 0x0090, 0x602b, 0x0008, 0x2001,
-	0x0203, 0x2004, 0x1f04, 0x3e8d, 0x00ce, 0x0030, 0xa817, 0x0001,
-	0x78b0, 0x9005, 0x0108, 0xa816, 0x00f6, 0x00c6, 0x2079, 0x0100,
-	0x2061, 0x0090, 0x7827, 0x0002, 0x2001, 0x002a, 0x2004, 0x9084,
-	0xfff8, 0x601a, 0x0006, 0x2001, 0x002b, 0x2004, 0x601e, 0x78c6,
-	0x000e, 0x78ca, 0x00ce, 0x00fe, 0x0804, 0x3dc0, 0x001e, 0x00c6,
-	0x2001, 0x032a, 0x2003, 0x0004, 0x2061, 0x0100, 0x6027, 0x0002,
-	0x6106, 0x2011, 0x020d, 0x2013, 0x0020, 0x2001, 0x0004, 0x200c,
-	0x918c, 0xfffd, 0x2102, 0x080c, 0x1340, 0x7884, 0x9084, 0x0003,
-	0x9086, 0x0002, 0x01b0, 0x2009, 0x0028, 0x080c, 0x21d9, 0x2001,
-	0x0227, 0x200c, 0x2102, 0x6050, 0x9084, 0xb7ff, 0x080c, 0x2ad9,
-	0x6052, 0x602f, 0x0000, 0x604b, 0xf7f7, 0x6043, 0x0090, 0x6043,
-	0x0010, 0x080c, 0xa8b5, 0x00ce, 0x2d08, 0x2c10, 0x2b18, 0x2b00,
-	0x9c05, 0x9d05, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x00ae,
-	0x009e, 0x008e, 0x1118, 0x012e, 0x0804, 0x3587, 0x012e, 0x2021,
-	0x400c, 0x0804, 0x3589, 0x9085, 0x0001, 0x1d04, 0x3f0c, 0x2091,
-	0x6000, 0x8420, 0x9486, 0x0064, 0x0005, 0x2001, 0x0105, 0x2003,
-	0x0010, 0x2001, 0x032a, 0x2003, 0x0004, 0x2001, 0x1a6a, 0x2003,
-	0x0000, 0x0071, 0x2009, 0x0048, 0x080c, 0x21d9, 0x2001, 0x0227,
-	0x2024, 0x2402, 0x2001, 0x0109, 0x2003, 0x4000, 0x9026, 0x0005,
-	0x00f6, 0x00e6, 0x2071, 0x19e6, 0x7054, 0x9086, 0x0000, 0x0520,
-	0x2079, 0x0090, 0x2009, 0x0206, 0x2104, 0x2009, 0x0203, 0x210c,
-	0x9106, 0x1120, 0x2009, 0x0040, 0x080c, 0x21d9, 0x782c, 0xd0fc,
-	0x0d88, 0x080c, 0x411d, 0x7054, 0x9086, 0x0000, 0x1d58, 0x782b,
-	0x0004, 0x782c, 0xd0ac, 0x1de8, 0x2009, 0x0040, 0x080c, 0x21d9,
-	0x782b, 0x0002, 0x7057, 0x0000, 0x00ee, 0x00fe, 0x0005, 0x00f6,
-	0x2079, 0x0100, 0x2001, 0x1818, 0x200c, 0x7932, 0x7936, 0x080c,
-	0x2679, 0x080c, 0x2aa6, 0x080c, 0x2ad9, 0x784b, 0xf7f7, 0x7843,
-	0x0090, 0x7843, 0x0010, 0x7850, 0xc0e5, 0x7852, 0x2019, 0x61a8,
-	0x7820, 0xd09c, 0x0110, 0x8319, 0x1dd8, 0x7850, 0xc0e4, 0x7852,
-	0x2011, 0x0048, 0x080c, 0x2a83, 0x7843, 0x0040, 0x2019, 0x01f4,
-	0xa001, 0xa001, 0x8319, 0x1de0, 0x2001, 0x0100, 0x080c, 0x2a49,
-	0x2011, 0x0020, 0x080c, 0x2a83, 0x7843, 0x0000, 0x9006, 0x080c,
-	0x2a49, 0x2011, 0x0048, 0x080c, 0x2a83, 0x00fe, 0x0005, 0x7884,
-	0xd0ac, 0x11c8, 0x00f6, 0x00e6, 0x2071, 0x1a6a, 0x2079, 0x0320,
-	0x2001, 0x0201, 0x2004, 0x9005, 0x0160, 0x7000, 0x9086, 0x0000,
-	0x1140, 0x0051, 0xd0bc, 0x0108, 0x8738, 0x7003, 0x0003, 0x782b,
-	0x0019, 0x00ee, 0x00fe, 0x0005, 0x00f6, 0x2079, 0x0300, 0x78bc,
-	0x00fe, 0x908c, 0x0070, 0x0178, 0x2009, 0x0032, 0x260a, 0x2009,
-	0x0033, 0x250a, 0xd0b4, 0x0108, 0x8c60, 0xd0ac, 0x0108, 0x8d68,
-	0xd0a4, 0x0108, 0x8b58, 0x0005, 0x00f6, 0x2079, 0x0200, 0x781c,
-	0xd084, 0x0110, 0x7837, 0x0050, 0x00fe, 0x0005, 0x00e6, 0x2071,
-	0x0100, 0x2001, 0x19a9, 0x2004, 0x70e2, 0x080c, 0x3ce8, 0x1188,
-	0x2001, 0x1820, 0x2004, 0x2009, 0x181f, 0x210c, 0x918c, 0x00ff,
-	0x706e, 0x716a, 0x7066, 0x918d, 0x3200, 0x7162, 0x7073, 0xe109,
-	0x0080, 0x702c, 0x9085, 0x0002, 0x702e, 0x2009, 0x1818, 0x210c,
-	0x716e, 0x7063, 0x0100, 0x7166, 0x719e, 0x706b, 0x0000, 0x7073,
-	0x0809, 0x7077, 0x0008, 0x7078, 0x9080, 0x0100, 0x707a, 0x7080,
-	0x8000, 0x7082, 0x7087, 0xaaaa, 0x9006, 0x708a, 0x708e, 0x707e,
-	0x70d6, 0x70ab, 0x0036, 0x70af, 0x95d5, 0x7014, 0x9084, 0x1984,
-	0x9085, 0x0092, 0x7016, 0x080c, 0x411d, 0x00f6, 0x2071, 0x1a6a,
-	0x2079, 0x0320, 0x00d6, 0x2069, 0x0000, 0x6884, 0xd0b4, 0x0120,
-	0x689c, 0x780e, 0x6898, 0x780a, 0x00de, 0x2009, 0x03e8, 0x8109,
-	0x1df0, 0x792c, 0xd1fc, 0x0110, 0x782b, 0x0004, 0x2011, 0x0011,
-	0x080c, 0x40a9, 0x2011, 0x0001, 0x080c, 0x40a9, 0x00fe, 0x00ee,
-	0x0005, 0x00f6, 0x00e6, 0x2071, 0x1a6a, 0x2079, 0x0320, 0x792c,
-	0xd1fc, 0x0904, 0x40a6, 0x782b, 0x0002, 0x9026, 0xd19c, 0x1904,
-	0x40a2, 0x7000, 0x0002, 0x40a6, 0x4057, 0x4087, 0x40a2, 0xd1bc,
-	0x1170, 0xd1dc, 0x1190, 0x8001, 0x7002, 0x2011, 0x0001, 0x080c,
-	0x40a9, 0x0904, 0x40a6, 0x080c, 0x40a9, 0x0804, 0x40a6, 0x00f6,
-	0x2079, 0x0300, 0x78bf, 0x0000, 0x00fe, 0x7810, 0x7914, 0x782b,
-	0x0004, 0x7812, 0x7916, 0x2001, 0x0201, 0x200c, 0x81ff, 0x0de8,
-	0x080c, 0x3fb4, 0x2009, 0x0001, 0x00f6, 0x2079, 0x0300, 0x78b8,
-	0x00fe, 0xd0ec, 0x0110, 0x2009, 0x0011, 0x792a, 0x00f8, 0x8001,
-	0x7002, 0x9184, 0x0880, 0x1140, 0x782c, 0xd0fc, 0x1904, 0x404b,
-	0x2011, 0x0001, 0x00b1, 0x0090, 0xa010, 0x9092, 0x0004, 0x9086,
-	0x0015, 0x1120, 0xa000, 0xa05a, 0x2011, 0x0031, 0xa212, 0xd1dc,
-	0x1960, 0x0828, 0x782b, 0x0004, 0x7003, 0x0000, 0x00ee, 0x00fe,
-	0x0005, 0xa014, 0x9005, 0x0550, 0x8001, 0x0036, 0x0096, 0xa016,
-	0xa058, 0x2048, 0xa010, 0x2009, 0x0031, 0x911a, 0x831c, 0x831c,
-	0x938a, 0x0007, 0x1a0c, 0x0d7d, 0x9398, 0x40d7, 0x231d, 0x083f,
-	0x9080, 0x0004, 0x7a2a, 0x7100, 0x8108, 0x7102, 0x009e, 0x003e,
-	0x908a, 0x0035, 0x1140, 0x0096, 0xa058, 0x2048, 0xa804, 0xa05a,
-	0x2001, 0x0019, 0x009e, 0xa012, 0x9085, 0x0001, 0x0005, 0x4114,
-	0x410b, 0x4102, 0x40f9, 0x40f0, 0x40e7, 0x40de, 0xa964, 0x7902,
-	0xa968, 0x7906, 0xa96c, 0x7912, 0xa970, 0x7916, 0x0005, 0xa974,
-	0x7902, 0xa978, 0x7906, 0xa97c, 0x7912, 0xa980, 0x7916, 0x0005,
-	0xa984, 0x7902, 0xa988, 0x7906, 0xa98c, 0x7912, 0xa990, 0x7916,
-	0x0005, 0xa994, 0x7902, 0xa998, 0x7906, 0xa99c, 0x7912, 0xa9a0,
-	0x7916, 0x0005, 0xa9a4, 0x7902, 0xa9a8, 0x7906, 0xa9ac, 0x7912,
-	0xa9b0, 0x7916, 0x0005, 0xa9b4, 0x7902, 0xa9b8, 0x7906, 0xa9bc,
-	0x7912, 0xa9c0, 0x7916, 0x0005, 0xa9c4, 0x7902, 0xa9c8, 0x7906,
-	0xa9cc, 0x7912, 0xa9d0, 0x7916, 0x0005, 0x00f6, 0x00e6, 0x0086,
-	0x2071, 0x19e6, 0x2079, 0x0090, 0x792c, 0xd1fc, 0x01e8, 0x782b,
-	0x0002, 0x2940, 0x9026, 0x7054, 0x0002, 0x4144, 0x4130, 0x413b,
-	0x8001, 0x7056, 0xd19c, 0x1180, 0x2011, 0x0001, 0x080c, 0x40a9,
-	0x190c, 0x40a9, 0x0048, 0x8001, 0x7056, 0x782c, 0xd0fc, 0x1d38,
-	0x2011, 0x0001, 0x080c, 0x40a9, 0x008e, 0x00ee, 0x00fe, 0x0005,
-	0x00f6, 0x00e6, 0x00c6, 0x0086, 0x2061, 0x0200, 0x2001, 0x19a9,
-	0x2004, 0x601a, 0x2061, 0x0100, 0x2001, 0x19a8, 0x2004, 0x60ce,
-	0x6104, 0xc1ac, 0x6106, 0x2001, 0x002c, 0x2004, 0x9005, 0x0520,
-	0x2038, 0x2001, 0x002e, 0x2024, 0x2001, 0x002f, 0x201c, 0x080c,
-	0x4ac9, 0xa813, 0x0019, 0xaf16, 0x2900, 0xa85a, 0x978a, 0x0007,
-	0x0220, 0x2138, 0x2009, 0x0007, 0x0010, 0x2708, 0x903e, 0x0096,
-	0xa858, 0x2048, 0xa85c, 0x9080, 0x0019, 0x009e, 0x080c, 0x41c0,
-	0x1d68, 0x2900, 0xa85a, 0x00d0, 0x080c, 0x4ac9, 0xa813, 0x0019,
-	0xa817, 0x0001, 0x2900, 0xa85a, 0x2001, 0x002e, 0x2004, 0xa866,
-	0x2001, 0x002f, 0x2004, 0xa86a, 0x2001, 0x002a, 0x2004, 0x9084,
-	0xfff8, 0xa86e, 0x2001, 0x002b, 0x2004, 0xa872, 0x2061, 0x0090,
-	0x2079, 0x0100, 0x2001, 0x19a8, 0x2004, 0x6036, 0x2009, 0x0040,
-	0x080c, 0x21d9, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8, 0x601a,
-	0x0006, 0x2001, 0x002b, 0x2004, 0x601e, 0x78c6, 0x000e, 0x78ca,
-	0x9006, 0x600a, 0x600e, 0x008e, 0x00ce, 0x00ee, 0x00fe, 0x0005,
-	0x00e6, 0x2071, 0x0080, 0xaa60, 0x22e8, 0x20a0, 0x20e1, 0x0000,
-	0x2099, 0x0088, 0x702b, 0x0026, 0x7402, 0x7306, 0x9006, 0x700a,
-	0x700e, 0x810b, 0x810b, 0x21a8, 0x810b, 0x7112, 0x702b, 0x0041,
-	0x702c, 0xd0fc, 0x0de8, 0x702b, 0x0002, 0x702b, 0x0040, 0x4005,
-	0x7400, 0x7304, 0x87ff, 0x0190, 0x0086, 0x0096, 0x2940, 0x0086,
-	0x080c, 0x4ac9, 0x008e, 0xa058, 0x00a6, 0x2050, 0x2900, 0xb006,
-	0xa05a, 0x00ae, 0x009e, 0x008e, 0x9085, 0x0001, 0x00ee, 0x0005,
-	0x00e6, 0x2001, 0x002d, 0x2004, 0x9005, 0x0528, 0x2038, 0x2001,
-	0x0030, 0x2024, 0x2001, 0x0031, 0x201c, 0x080c, 0x4ac9, 0x2940,
-	0xa813, 0x0019, 0xaf16, 0x2900, 0xa85a, 0x978a, 0x0007, 0x0220,
-	0x2138, 0x2009, 0x0007, 0x0010, 0x2708, 0x903e, 0x0096, 0xa858,
-	0x2048, 0xa85c, 0x9080, 0x0019, 0x009e, 0x080c, 0x41c0, 0x1d68,
-	0x2900, 0xa85a, 0x00d8, 0x080c, 0x4ac9, 0x2940, 0xa013, 0x0019,
-	0xa017, 0x0001, 0x2800, 0xa05a, 0x2001, 0x0030, 0x2004, 0xa066,
-	0x2001, 0x0031, 0x2004, 0xa06a, 0x2001, 0x002a, 0x2004, 0x9084,
-	0xfff8, 0xa06e, 0x2001, 0x002b, 0x2004, 0xa072, 0x2001, 0x032a,
-	0x2003, 0x0004, 0x7884, 0xd0ac, 0x1180, 0x2001, 0x0101, 0x200c,
-	0x918d, 0x0200, 0x2102, 0xa017, 0x0000, 0x2001, 0x1a6a, 0x2003,
-	0x0003, 0x2001, 0x032a, 0x2003, 0x0009, 0x2001, 0x0300, 0x2003,
+	0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x001b, 0x080c, 0x4b3b,
+	0x701f, 0x3c3d, 0x7023, 0x0001, 0x012e, 0x0005, 0x080c, 0xa91e,
+	0x0046, 0x0086, 0x0096, 0x00a6, 0x00b6, 0x00c6, 0x00d6, 0x00e6,
+	0x00f6, 0x080c, 0x3ae5, 0x2001, 0x199e, 0x2003, 0x0000, 0x2021,
+	0x000a, 0x2061, 0x0100, 0x6104, 0x0016, 0x60bb, 0x0000, 0x60bf,
+	0x32e1, 0x60bf, 0x0012, 0x080c, 0x3d6f, 0x080c, 0x3d2e, 0x00f6,
+	0x00e6, 0x0086, 0x2940, 0x2071, 0x19e6, 0x2079, 0x0090, 0x00d6,
+	0x2069, 0x0000, 0x6884, 0xd0b4, 0x0140, 0x2001, 0x0035, 0x2004,
+	0x780e, 0x2001, 0x0034, 0x2004, 0x780a, 0x00de, 0x2011, 0x0001,
+	0x080c, 0x40d0, 0x008e, 0x00ee, 0x00fe, 0x080c, 0x3ffd, 0x080c,
+	0x3f2a, 0x05b8, 0x2001, 0x020b, 0x2004, 0x9084, 0x0140, 0x1db8,
+	0x080c, 0x4144, 0x00f6, 0x2079, 0x0300, 0x78bc, 0x00fe, 0x908c,
+	0x0070, 0x1560, 0x2071, 0x0200, 0x7037, 0x0000, 0x7050, 0x9084,
+	0xff00, 0x9086, 0x3200, 0x1510, 0x7037, 0x0001, 0x7050, 0x9084,
+	0xff00, 0x9086, 0xe100, 0x11d0, 0x7037, 0x0000, 0x7054, 0x7037,
+	0x0000, 0x715c, 0x9106, 0x1190, 0x2001, 0x1820, 0x2004, 0x9106,
+	0x1168, 0x00c6, 0x2061, 0x0100, 0x6024, 0x9084, 0x1e00, 0x00ce,
+	0x0138, 0x080c, 0x3f34, 0x080c, 0x3d29, 0x0058, 0x080c, 0x3d29,
+	0x080c, 0x4068, 0x080c, 0x3ff3, 0x2001, 0x020b, 0x2004, 0xd0e4,
+	0x0dd8, 0x2001, 0x032a, 0x2003, 0x0004, 0x2061, 0x0100, 0x6027,
+	0x0002, 0x001e, 0x6106, 0x2011, 0x020d, 0x2013, 0x0020, 0x60bb,
+	0x0000, 0x60bf, 0x0108, 0x60bf, 0x0012, 0x2001, 0x0004, 0x200c,
+	0x918c, 0xfffd, 0x2102, 0x080c, 0x1340, 0x2009, 0x0028, 0x080c,
+	0x220a, 0x2001, 0x0227, 0x200c, 0x2102, 0x080c, 0xa93a, 0x00fe,
+	0x00ee, 0x00de, 0x00ce, 0x00be, 0x00ae, 0x009e, 0x008e, 0x004e,
+	0x2001, 0x199e, 0x2004, 0x9005, 0x1118, 0x012e, 0x0804, 0x35b8,
+	0x012e, 0x2021, 0x400c, 0x0804, 0x35ba, 0x0016, 0x0026, 0x0036,
+	0x0046, 0x0056, 0x0076, 0x0086, 0x0096, 0x00d6, 0x0156, 0x7014,
+	0x2048, 0x7020, 0x20a8, 0x8000, 0x7022, 0xa804, 0x9005, 0x0904,
+	0x3c99, 0x2048, 0x1f04, 0x3c4d, 0x7068, 0x2040, 0xa28c, 0xa390,
+	0xa494, 0xa598, 0xa930, 0xa808, 0xd0b4, 0x1120, 0x2029, 0x0000,
+	0x2021, 0x0000, 0x0096, 0x7014, 0x2048, 0xa864, 0x009e, 0x9086,
+	0x0103, 0x0170, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084,
+	0xffc0, 0x9080, 0x001b, 0x080c, 0x4b3b, 0x701f, 0x3c3d, 0x00b0,
+	0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080,
+	0x001b, 0x21a8, 0x27e0, 0x2098, 0x27e8, 0x20a0, 0x0006, 0x080c,
+	0x0fc4, 0x000e, 0x080c, 0x4b3e, 0x701f, 0x3c3d, 0x015e, 0x00de,
+	0x009e, 0x008e, 0x007e, 0x005e, 0x004e, 0x003e, 0x002e, 0x001e,
+	0x0005, 0x7014, 0x2048, 0xa864, 0x9086, 0x0103, 0x1118, 0x701f,
+	0x3cfe, 0x0450, 0x7014, 0x2048, 0xa868, 0xc0fd, 0xa86a, 0x2009,
+	0x007f, 0x080c, 0x6632, 0x0110, 0x9006, 0x0030, 0xb813, 0x00ff,
+	0xb817, 0xfffd, 0x080c, 0xce64, 0x015e, 0x00de, 0x009e, 0x008e,
+	0x007e, 0x005e, 0x004e, 0x003e, 0x002e, 0x001e, 0x0904, 0x35ea,
+	0x0016, 0x0026, 0x0036, 0x0046, 0x0056, 0x0076, 0x0086, 0x0096,
+	0x00d6, 0x0156, 0x701f, 0x3cd0, 0x7007, 0x0003, 0x0804, 0x3c8e,
+	0xa830, 0x9086, 0x0100, 0x2021, 0x400c, 0x0904, 0x35ba, 0x0076,
+	0xad10, 0xac0c, 0xab24, 0xaa20, 0xa930, 0xa808, 0xd0b4, 0x1120,
+	0x2029, 0x0000, 0x2021, 0x0000, 0x8906, 0x8006, 0x8007, 0x90bc,
+	0x003f, 0x9084, 0xffc0, 0x9080, 0x001b, 0x21a8, 0x27e0, 0x2098,
+	0x27e8, 0x20a0, 0x0006, 0x080c, 0x0fc4, 0x000e, 0x080c, 0x4b3e,
+	0x007e, 0x701f, 0x3c3d, 0x7023, 0x0001, 0x0005, 0x0804, 0x35b8,
+	0x0156, 0x00c6, 0xa814, 0x908a, 0x001e, 0x0218, 0xa833, 0x001e,
+	0x0010, 0xa832, 0x0078, 0x81ff, 0x0168, 0x0016, 0x080c, 0x4af2,
+	0x001e, 0x0130, 0xa800, 0x2040, 0xa008, 0xa80a, 0x2100, 0x0c58,
+	0x9006, 0x0010, 0x9085, 0x0001, 0x00ce, 0x015e, 0x0005, 0x0006,
+	0x00f6, 0x2079, 0x0000, 0x7880, 0x9086, 0x0044, 0x00fe, 0x000e,
+	0x0005, 0x2001, 0x199e, 0x2003, 0x0001, 0x0005, 0x00f6, 0x00e6,
+	0x00c6, 0x2061, 0x0200, 0x2001, 0x19a9, 0x2004, 0x601a, 0x2061,
+	0x0100, 0x2001, 0x19a8, 0x2004, 0x60ce, 0x6104, 0xc1ac, 0x6106,
+	0x080c, 0x4af2, 0xa813, 0x0019, 0xa817, 0x0001, 0x2900, 0xa85a,
+	0x2001, 0x002e, 0x2004, 0xa866, 0x2001, 0x002f, 0x2004, 0xa86a,
+	0x2061, 0x0090, 0x2079, 0x0100, 0x2001, 0x19a8, 0x2004, 0x6036,
+	0x2009, 0x0040, 0x080c, 0x220a, 0x2001, 0x002a, 0x2004, 0x9084,
+	0xfff8, 0xa86e, 0x601a, 0xa873, 0x0000, 0x601f, 0x0000, 0x78ca,
+	0x9006, 0x600a, 0x600e, 0x00ce, 0x00ee, 0x00fe, 0x0005, 0x00e6,
+	0x080c, 0x4af2, 0x2940, 0xa013, 0x0019, 0xa017, 0x0001, 0x2800,
+	0xa05a, 0x2001, 0x0030, 0x2004, 0xa866, 0x2001, 0x0031, 0x2004,
+	0xa86a, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8, 0xa86e, 0xa873,
+	0x0000, 0x2001, 0x032a, 0x2003, 0x0004, 0x2001, 0x0300, 0x2003,
 	0x0000, 0x2001, 0x020d, 0x2003, 0x0000, 0x2001, 0x0004, 0x200c,
 	0x918d, 0x0002, 0x2102, 0x00ee, 0x0005, 0x0126, 0x2091, 0x8000,
-	0x20a9, 0x0007, 0x20a1, 0x1840, 0x20e9, 0x0001, 0x9006, 0x4004,
-	0x20a9, 0x0014, 0x20a1, 0xffec, 0x20e9, 0x0000, 0x9006, 0x4004,
-	0x2009, 0x013c, 0x200a, 0x012e, 0x7880, 0x9086, 0x0052, 0x0108,
-	0x0005, 0x0804, 0x3587, 0x7d98, 0x7c9c, 0x0804, 0x3689, 0x080c,
-	0x74ec, 0x190c, 0x6009, 0x6040, 0x9084, 0x0020, 0x09b1, 0x2069,
-	0x1847, 0x2d00, 0x2009, 0x0030, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98,
-	0x2039, 0x0001, 0x080c, 0x4b12, 0x701f, 0x429f, 0x0005, 0x080c,
-	0x5704, 0x1130, 0x3b00, 0x3a08, 0xc194, 0xc095, 0x20d8, 0x21d0,
-	0x2069, 0x1847, 0x6800, 0x9005, 0x0904, 0x35bc, 0x6804, 0xd0ac,
-	0x0118, 0xd0a4, 0x0904, 0x35bc, 0xd094, 0x00c6, 0x2061, 0x0100,
-	0x6104, 0x0138, 0x6200, 0x9292, 0x0005, 0x0218, 0x918c, 0xffdf,
-	0x0010, 0x918d, 0x0020, 0x6106, 0x00ce, 0xd08c, 0x00c6, 0x2061,
-	0x0100, 0x6104, 0x0118, 0x918d, 0x0010, 0x0010, 0x918c, 0xffef,
-	0x6106, 0x00ce, 0xd084, 0x0158, 0x6a28, 0x928a, 0x007f, 0x1a04,
-	0x35bc, 0x9288, 0x3388, 0x210d, 0x918c, 0x00ff, 0x6166, 0xd0dc,
-	0x0130, 0x6828, 0x908a, 0x007f, 0x1a04, 0x35bc, 0x605e, 0x6888,
-	0x9084, 0x0030, 0x8004, 0x8004, 0x8004, 0x8004, 0x0006, 0x2009,
-	0x19b0, 0x9080, 0x276c, 0x2005, 0x200a, 0x2008, 0x2001, 0x0018,
-	0x080c, 0xa88a, 0x2009, 0x0390, 0x200b, 0x0400, 0x000e, 0x2009,
-	0x19b1, 0x9080, 0x2770, 0x2005, 0x200a, 0x6808, 0x908a, 0x0100,
-	0x0a04, 0x35bc, 0x908a, 0x0841, 0x1a04, 0x35bc, 0x9084, 0x0007,
-	0x1904, 0x35bc, 0x680c, 0x9005, 0x0904, 0x35bc, 0x6810, 0x9005,
-	0x0904, 0x35bc, 0x6848, 0x6940, 0x910a, 0x1a04, 0x35bc, 0x8001,
-	0x0904, 0x35bc, 0x684c, 0x6944, 0x910a, 0x1a04, 0x35bc, 0x8001,
-	0x0904, 0x35bc, 0x6814, 0x908c, 0x00ff, 0x614e, 0x8007, 0x9084,
-	0x00ff, 0x6052, 0x080c, 0x7820, 0x080c, 0x6ac0, 0x080c, 0x6af4,
-	0x6808, 0x602a, 0x080c, 0x214b, 0x2009, 0x0170, 0x200b, 0x0080,
-	0xa001, 0xa001, 0x200b, 0x0000, 0x0036, 0x6b08, 0x080c, 0x26d3,
-	0x003e, 0x6000, 0x9086, 0x0000, 0x1904, 0x442a, 0x6818, 0x691c,
-	0x6a20, 0x6b24, 0x8007, 0x810f, 0x8217, 0x831f, 0x6016, 0x611a,
-	0x621e, 0x6322, 0x6c04, 0xd4f4, 0x0148, 0x6830, 0x6934, 0x6a38,
-	0x6b3c, 0x8007, 0x810f, 0x8217, 0x831f, 0x0010, 0x9084, 0xf0ff,
-	0x6006, 0x610a, 0x620e, 0x6312, 0x8007, 0x810f, 0x8217, 0x831f,
-	0x20a9, 0x0004, 0x20a1, 0x19b2, 0x20e9, 0x0001, 0x4001, 0x20a9,
-	0x0004, 0x20a1, 0x19cc, 0x20e9, 0x0001, 0x4001, 0x080c, 0x87e4,
-	0x00c6, 0x900e, 0x20a9, 0x0001, 0x6b70, 0xd384, 0x01c8, 0x0020,
-	0x839d, 0x12b0, 0x3508, 0x8109, 0x080c, 0x7de2, 0x6878, 0x6016,
-	0x6874, 0x2008, 0x9084, 0xff00, 0x8007, 0x600a, 0x9184, 0x00ff,
-	0x6006, 0x8108, 0x1118, 0x6003, 0x0003, 0x0010, 0x6003, 0x0001,
-	0x1f04, 0x4388, 0x00ce, 0x00c6, 0x2061, 0x199b, 0x6a88, 0x9284,
-	0xc000, 0x2010, 0x9286, 0x0000, 0x1158, 0x2063, 0x0000, 0x2001,
-	0x0001, 0x080c, 0x297a, 0x2001, 0x0001, 0x080c, 0x295d, 0x0088,
-	0x9286, 0x4000, 0x1148, 0x2063, 0x0001, 0x9006, 0x080c, 0x297a,
-	0x9006, 0x080c, 0x295d, 0x0028, 0x9286, 0x8000, 0x1d30, 0x2063,
-	0x0002, 0x00ce, 0x00e6, 0x2c70, 0x080c, 0x0ec1, 0x00ee, 0x6888,
-	0xd0ec, 0x0130, 0x2011, 0x0114, 0x2204, 0x9085, 0x0180, 0x2012,
-	0x6a80, 0x9284, 0x0030, 0x9086, 0x0030, 0x1128, 0x9294, 0xffcf,
-	0x9295, 0x0020, 0x6a82, 0x2001, 0x197b, 0x6a80, 0x9294, 0x0030,
-	0x928e, 0x0000, 0x0170, 0x928e, 0x0010, 0x0118, 0x928e, 0x0020,
-	0x0140, 0x2003, 0xaaaa, 0x080c, 0x2748, 0x2001, 0x196c, 0x2102,
-	0x0008, 0x2102, 0x00c6, 0x2061, 0x0100, 0x602f, 0x0040, 0x602f,
-	0x0000, 0x00ce, 0x080c, 0x74ec, 0x0128, 0x080c, 0x4ff9, 0x0110,
-	0x080c, 0x2699, 0x60d4, 0x9005, 0x01c0, 0x6003, 0x0001, 0x2009,
-	0x4412, 0x00e0, 0x080c, 0x74ec, 0x1168, 0x2011, 0x7362, 0x080c,
-	0x8651, 0x2011, 0x7355, 0x080c, 0x875d, 0x080c, 0x77f4, 0x080c,
-	0x741d, 0x0040, 0x080c, 0x5eff, 0x0028, 0x6003, 0x0004, 0x2009,
-	0x442a, 0x0020, 0x080c, 0x69f0, 0x0804, 0x3587, 0x2001, 0x0170,
-	0x2004, 0x9084, 0x00ff, 0x9086, 0x004c, 0x1118, 0x2091, 0x31bd,
-	0x0817, 0x2091, 0x313d, 0x0817, 0x6000, 0x9086, 0x0000, 0x0904,
-	0x35b9, 0x2069, 0x1847, 0x7890, 0x6842, 0x7894, 0x6846, 0x2d00,
-	0x2009, 0x0030, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x2039, 0x0001,
-	0x0804, 0x4b15, 0x9006, 0x080c, 0x2699, 0x81ff, 0x1904, 0x35b9,
-	0x080c, 0x74ec, 0x11b0, 0x080c, 0x77ef, 0x080c, 0x6044, 0x080c,
-	0x337c, 0x0118, 0x6130, 0xc18d, 0x6132, 0x080c, 0xcf84, 0x0130,
-	0x080c, 0x750f, 0x1118, 0x080c, 0x74c0, 0x0038, 0x080c, 0x741d,
-	0x0020, 0x080c, 0x6009, 0x080c, 0x5eff, 0x0804, 0x3587, 0x81ff,
-	0x1904, 0x35b9, 0x080c, 0x74ec, 0x1110, 0x0804, 0x35b9, 0x6194,
-	0x81ff, 0x01a8, 0x704f, 0x0000, 0x2001, 0x1d80, 0x2009, 0x0040,
-	0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x0126, 0x2091, 0x8000, 0x2039,
-	0x0001, 0x080c, 0x4b15, 0x701f, 0x3585, 0x012e, 0x0005, 0x704f,
-	0x0001, 0x00d6, 0x2069, 0x1d80, 0x20a9, 0x0040, 0x20e9, 0x0001,
-	0x20a1, 0x1d80, 0x2019, 0xffff, 0x4304, 0x655c, 0x9588, 0x3388,
-	0x210d, 0x918c, 0x00ff, 0x216a, 0x900e, 0x2011, 0x0002, 0x2100,
-	0x9506, 0x01a8, 0x080c, 0x6644, 0x1190, 0xb814, 0x821c, 0x0238,
-	0x9398, 0x1d80, 0x9085, 0xff00, 0x8007, 0x201a, 0x0038, 0x9398,
-	0x1d80, 0x2324, 0x94a4, 0xff00, 0x9405, 0x201a, 0x8210, 0x8108,
-	0x9182, 0x0080, 0x1208, 0x0c18, 0x8201, 0x8007, 0x2d0c, 0x9105,
-	0x206a, 0x00de, 0x20a9, 0x0040, 0x20a1, 0x1d80, 0x2099, 0x1d80,
-	0x080c, 0x5f94, 0x0804, 0x4484, 0x080c, 0x4afc, 0x0904, 0x35bc,
-	0x080c, 0x4ac9, 0x1120, 0x2009, 0x0002, 0x0804, 0x35b9, 0x080c,
-	0x56f5, 0xd0b4, 0x0558, 0x7884, 0x908e, 0x007e, 0x0538, 0x908e,
-	0x007f, 0x0520, 0x908e, 0x0080, 0x0508, 0x080c, 0x3377, 0x1148,
-	0xb800, 0xd08c, 0x11d8, 0xb804, 0x9084, 0x00ff, 0x9086, 0x0006,
-	0x11a8, 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, 0x080c, 0xca34,
-	0x1120, 0x2009, 0x0003, 0x0804, 0x35b9, 0x7007, 0x0003, 0x701f,
-	0x4512, 0x0005, 0x080c, 0x4afc, 0x0904, 0x35bc, 0x20a9, 0x002b,
-	0xb8c4, 0x20e0, 0xb8c8, 0x2098, 0xa860, 0x20e8, 0xa85c, 0x9080,
-	0x0002, 0x20a0, 0x4003, 0x20a9, 0x0008, 0x9080, 0x0006, 0x20a0,
-	0xb8c4, 0x20e0, 0xb8c8, 0x9080, 0x0006, 0x2098, 0x080c, 0x0fc4,
-	0x0070, 0x20a9, 0x0004, 0xa85c, 0x9080, 0x000a, 0x20a0, 0xb8c4,
-	0x20e0, 0xb8c8, 0x9080, 0x000a, 0x2098, 0x080c, 0x0fc4, 0x8906,
-	0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0002,
-	0x2009, 0x002b, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x0804, 0x4b15,
-	0x81ff, 0x1904, 0x35b9, 0x080c, 0x4ae0, 0x0904, 0x35bc, 0x080c,
-	0x6889, 0x0904, 0x35b9, 0x0058, 0xa878, 0x9005, 0x0120, 0x2009,
-	0x0004, 0x0804, 0x35b9, 0xa974, 0xaa94, 0x0804, 0x3587, 0x080c,
-	0x56fd, 0x0904, 0x3587, 0x701f, 0x455c, 0x7007, 0x0003, 0x0005,
-	0x81ff, 0x1904, 0x35b9, 0x7888, 0x908a, 0x1000, 0x1a04, 0x35bc,
-	0x080c, 0x4afc, 0x0904, 0x35bc, 0x080c, 0x6a8e, 0x0120, 0x080c,
-	0x6a96, 0x1904, 0x35bc, 0x080c, 0x690e, 0x0904, 0x35b9, 0x2019,
-	0x0004, 0x900e, 0x080c, 0x689b, 0x0904, 0x35b9, 0x7984, 0x7a88,
-	0x04c9, 0x08a8, 0xa89c, 0x908a, 0x1000, 0x12f8, 0x080c, 0x4afa,
-	0x01e0, 0x080c, 0x6a8e, 0x0118, 0x080c, 0x6a96, 0x11b0, 0x080c,
-	0x690e, 0x2009, 0x0002, 0x0168, 0x2009, 0x0002, 0x2019, 0x0004,
-	0x080c, 0x689b, 0x2009, 0x0003, 0x0120, 0xa998, 0xaa9c, 0x00d1,
-	0x0060, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006, 0x900e,
-	0x9085, 0x0001, 0x2001, 0x0030, 0x0005, 0xa897, 0x4000, 0x080c,
-	0x56fd, 0x0110, 0x9006, 0x0018, 0x900e, 0x9085, 0x0001, 0x2001,
-	0x0000, 0x0005, 0x9186, 0x00ff, 0x0110, 0x0071, 0x0060, 0x2029,
-	0x007e, 0x2061, 0x1800, 0x645c, 0x2400, 0x9506, 0x0110, 0x2508,
-	0x0019, 0x8529, 0x1ec8, 0x0005, 0x080c, 0x6644, 0x1138, 0x2200,
-	0x8003, 0x800b, 0x810b, 0x9108, 0x080c, 0x865f, 0x0005, 0x81ff,
-	0x1904, 0x35b9, 0x798c, 0x2001, 0x197f, 0x918c, 0x8000, 0x2102,
-	0x080c, 0x4ae0, 0x0904, 0x35bc, 0x080c, 0x6a8e, 0x0120, 0x080c,
-	0x6a96, 0x1904, 0x35bc, 0x080c, 0x670b, 0x0904, 0x35b9, 0x080c,
-	0x6892, 0x0904, 0x35b9, 0x2001, 0x197f, 0x2004, 0xd0fc, 0x1904,
-	0x3587, 0x0804, 0x4567, 0xa9a0, 0x2001, 0x197f, 0x918c, 0x8000,
-	0xc18d, 0x2102, 0x080c, 0x4aed, 0x01a0, 0x080c, 0x6a8e, 0x0118,
-	0x080c, 0x6a96, 0x1170, 0x080c, 0x670b, 0x2009, 0x0002, 0x0128,
-	0x080c, 0x6892, 0x1170, 0x2009, 0x0003, 0xa897, 0x4005, 0xa99a,
-	0x0010, 0xa897, 0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030,
-	0x0005, 0xa897, 0x4000, 0x2001, 0x197f, 0x2004, 0xd0fc, 0x1128,
-	0x080c, 0x56fd, 0x0110, 0x9006, 0x0018, 0x900e, 0x9085, 0x0001,
-	0x2001, 0x0000, 0x0005, 0x81ff, 0x1904, 0x35b9, 0x798c, 0x2001,
-	0x197e, 0x918c, 0x8000, 0x2102, 0x080c, 0x4ae0, 0x0904, 0x35bc,
-	0x080c, 0x6a8e, 0x0120, 0x080c, 0x6a96, 0x1904, 0x35bc, 0x080c,
-	0x670b, 0x0904, 0x35b9, 0x080c, 0x6880, 0x0904, 0x35b9, 0x2001,
-	0x197e, 0x2004, 0xd0fc, 0x1904, 0x3587, 0x0804, 0x4567, 0xa9a0,
-	0x2001, 0x197e, 0x918c, 0x8000, 0xc18d, 0x2102, 0x080c, 0x4aed,
-	0x01a0, 0x080c, 0x6a8e, 0x0118, 0x080c, 0x6a96, 0x1170, 0x080c,
-	0x670b, 0x2009, 0x0002, 0x0128, 0x080c, 0x6880, 0x1170, 0x2009,
-	0x0003, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006, 0x900e,
-	0x9085, 0x0001, 0x2001, 0x0030, 0x0005, 0xa897, 0x4000, 0x2001,
-	0x197e, 0x2004, 0xd0fc, 0x1128, 0x080c, 0x56fd, 0x0110, 0x9006,
-	0x0018, 0x900e, 0x9085, 0x0001, 0x2001, 0x0000, 0x0005, 0x6100,
-	0x0804, 0x3587, 0x080c, 0x4afc, 0x0904, 0x35bc, 0x080c, 0x5709,
-	0x1904, 0x35b9, 0x79a8, 0xd184, 0x1158, 0xb834, 0x8007, 0x789e,
-	0xb830, 0x8007, 0x789a, 0xbb2c, 0x831f, 0xba28, 0x8217, 0x0050,
-	0xb824, 0x8007, 0x789e, 0xb820, 0x8007, 0x789a, 0xbb1c, 0x831f,
-	0xba18, 0x8217, 0xb900, 0x918c, 0x0200, 0x0804, 0x3587, 0x78a8,
-	0x909c, 0x0003, 0xd0ac, 0x1150, 0xd0b4, 0x1140, 0x939a, 0x0003,
-	0x1a04, 0x35b9, 0x625c, 0x7884, 0x9206, 0x1538, 0x080c, 0x87ce,
-	0x2001, 0xffec, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x2039, 0x0000,
-	0x0006, 0x78a8, 0x9084, 0x0080, 0x1118, 0x000e, 0x0804, 0x4b15,
-	0x000e, 0x2031, 0x0000, 0x2061, 0x18b8, 0x2c44, 0xa66a, 0xa17a,
-	0xa772, 0xa076, 0xa28e, 0xa392, 0xa496, 0xa59a, 0x080c, 0x113c,
-	0x7007, 0x0002, 0x701f, 0x471d, 0x0005, 0x81ff, 0x1904, 0x35b9,
-	0x080c, 0x4afc, 0x0904, 0x35bc, 0x080c, 0x6a8e, 0x1904, 0x35b9,
-	0x00c6, 0x080c, 0x4ac9, 0x00ce, 0x0904, 0x35b9, 0xa867, 0x0000,
-	0xa868, 0xc0fd, 0xa86a, 0x7ea8, 0x080c, 0xc9da, 0x0904, 0x35b9,
-	0x7007, 0x0003, 0x701f, 0x4721, 0x0005, 0x080c, 0x4265, 0x0804,
-	0x3587, 0xa830, 0x9086, 0x0100, 0x0904, 0x35b9, 0x8906, 0x8006,
-	0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x001b, 0x2009,
-	0x000c, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x0804, 0x4b15, 0x9006,
-	0x080c, 0x2699, 0x78a8, 0x9084, 0x00ff, 0x9086, 0x00ff, 0x0118,
-	0x81ff, 0x1904, 0x35b9, 0x080c, 0x74ec, 0x0110, 0x080c, 0x6009,
-	0x7888, 0x908a, 0x1000, 0x1a04, 0x35bc, 0x7984, 0x9186, 0x00ff,
-	0x0138, 0x9182, 0x007f, 0x1a04, 0x35bc, 0x2100, 0x080c, 0x2663,
-	0x0026, 0x00c6, 0x0126, 0x2091, 0x8000, 0x2061, 0x1a02, 0x601b,
-	0x0000, 0x601f, 0x0000, 0x6073, 0x0000, 0x6077, 0x0000, 0x080c,
-	0x74ec, 0x1158, 0x080c, 0x77ef, 0x080c, 0x6044, 0x9085, 0x0001,
-	0x080c, 0x7533, 0x080c, 0x741d, 0x00f0, 0x080c, 0xa899, 0x080c,
-	0xab61, 0x080c, 0xa8b5, 0x2061, 0x0100, 0x2001, 0x1818, 0x2004,
-	0x9084, 0x00ff, 0x810f, 0x9105, 0x604a, 0x6043, 0x0090, 0x6043,
-	0x0010, 0x2009, 0x1998, 0x200b, 0x0000, 0x2009, 0x002d, 0x2011,
-	0x5f2f, 0x080c, 0x871b, 0x7984, 0x080c, 0x74ec, 0x1110, 0x2009,
-	0x00ff, 0x7a88, 0x080c, 0x45ca, 0x012e, 0x00ce, 0x002e, 0x0804,
-	0x3587, 0x7984, 0x080c, 0x65e3, 0x2b08, 0x1904, 0x35bc, 0x0804,
-	0x3587, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x35b9, 0x60dc,
-	0xd0ac, 0x1130, 0xd09c, 0x1120, 0x2009, 0x0005, 0x0804, 0x35b9,
-	0x080c, 0x4ac9, 0x1120, 0x2009, 0x0002, 0x0804, 0x35b9, 0x7984,
-	0x9192, 0x0021, 0x1a04, 0x35bc, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98,
-	0xa85c, 0x9080, 0x0019, 0x702a, 0xaf60, 0x7736, 0x080c, 0x4b12,
-	0x701f, 0x47d9, 0x7880, 0x9086, 0x006e, 0x0110, 0x701f, 0x51ab,
-	0x0005, 0x2009, 0x0080, 0x080c, 0x6644, 0x1118, 0x080c, 0x6a8e,
-	0x0120, 0x2021, 0x400a, 0x0804, 0x3589, 0x00d6, 0x0096, 0xa964,
-	0xaa6c, 0xab70, 0xac74, 0xad78, 0xae7c, 0xa884, 0x90be, 0x0100,
-	0x0904, 0x4872, 0x90be, 0x0112, 0x0904, 0x4872, 0x90be, 0x0113,
-	0x0904, 0x4872, 0x90be, 0x0114, 0x0904, 0x4872, 0x90be, 0x0117,
-	0x0904, 0x4872, 0x90be, 0x011a, 0x0904, 0x4872, 0x90be, 0x011c,
-	0x0904, 0x4872, 0x90be, 0x0121, 0x0904, 0x4859, 0x90be, 0x0131,
-	0x0904, 0x4859, 0x90be, 0x0171, 0x0904, 0x4872, 0x90be, 0x0173,
-	0x0904, 0x4872, 0x90be, 0x01a1, 0x1128, 0xa894, 0x8007, 0xa896,
-	0x0804, 0x487d, 0x90be, 0x0212, 0x0904, 0x4866, 0x90be, 0x0213,
-	0x05e8, 0x90be, 0x0214, 0x0500, 0x90be, 0x0217, 0x0188, 0x90be,
-	0x021a, 0x1120, 0xa89c, 0x8007, 0xa89e, 0x04e0, 0x90be, 0x021f,
-	0x05c8, 0x90be, 0x0300, 0x05b0, 0x009e, 0x00de, 0x0804, 0x35bc,
-	0x7028, 0x9080, 0x0010, 0x2098, 0x20a0, 0x7034, 0x20e0, 0x20e8,
-	0x20a9, 0x0007, 0x080c, 0x48bb, 0x7028, 0x9080, 0x000e, 0x2098,
-	0x20a0, 0x7034, 0x20e0, 0x20e8, 0x20a9, 0x0001, 0x080c, 0x48bb,
-	0x00c8, 0x7028, 0x9080, 0x000c, 0x2098, 0x20a0, 0x7034, 0x20e0,
-	0x20e8, 0x20a9, 0x0001, 0x080c, 0x48c8, 0x00b8, 0x7028, 0x9080,
-	0x000e, 0x2098, 0x20a0, 0x7034, 0x20e0, 0x20e8, 0x20a9, 0x0001,
-	0x080c, 0x48c8, 0x7028, 0x9080, 0x000c, 0x2098, 0x20a0, 0x7034,
-	0x20e0, 0x20e8, 0x20a9, 0x0001, 0x04f1, 0x00c6, 0x080c, 0x4ac9,
-	0x0550, 0xa868, 0xc0fd, 0xa86a, 0xa867, 0x0119, 0x9006, 0xa882,
-	0xa87f, 0x0020, 0xa88b, 0x0001, 0x810b, 0xa9ae, 0xa8b2, 0xaab6,
-	0xabba, 0xacbe, 0xadc2, 0xa9c6, 0xa8ca, 0x00ce, 0x009e, 0x00de,
-	0xa866, 0xa822, 0xa868, 0xc0fd, 0xa86a, 0xa804, 0x2048, 0x080c,
-	0xc9f5, 0x1120, 0x2009, 0x0003, 0x0804, 0x35b9, 0x7007, 0x0003,
-	0x701f, 0x48b2, 0x0005, 0x00ce, 0x009e, 0x00de, 0x2009, 0x0002,
-	0x0804, 0x35b9, 0xa820, 0x9086, 0x8001, 0x1904, 0x3587, 0x2009,
-	0x0004, 0x0804, 0x35b9, 0x0016, 0x0026, 0x3510, 0x20a9, 0x0002,
-	0x4002, 0x4104, 0x4004, 0x8211, 0x1dc8, 0x002e, 0x001e, 0x0005,
-	0x0016, 0x0026, 0x0036, 0x0046, 0x3520, 0x20a9, 0x0004, 0x4002,
-	0x4304, 0x4204, 0x4104, 0x4004, 0x8421, 0x1db8, 0x004e, 0x003e,
-	0x002e, 0x001e, 0x0005, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804,
-	0x35b9, 0x60dc, 0xd0ac, 0x1130, 0xd09c, 0x1120, 0x2009, 0x0005,
-	0x0804, 0x35b9, 0x7984, 0x78a8, 0x2040, 0x080c, 0xab5a, 0x1120,
-	0x9182, 0x007f, 0x0a04, 0x35bc, 0x9186, 0x00ff, 0x0904, 0x35bc,
-	0x9182, 0x0800, 0x1a04, 0x35bc, 0x7a8c, 0x7b88, 0x607c, 0x9306,
-	0x1158, 0x6080, 0x924e, 0x0904, 0x35bc, 0x080c, 0xab5a, 0x1120,
-	0x99cc, 0xff00, 0x0904, 0x35bc, 0x0126, 0x2091, 0x8000, 0x080c,
-	0x49dc, 0x0904, 0x495c, 0x0086, 0x90c6, 0x4000, 0x008e, 0x1538,
-	0x00c6, 0x0006, 0x0036, 0xb818, 0xbb1c, 0x9305, 0xbb20, 0x9305,
-	0xbb24, 0x9305, 0xbb28, 0x9305, 0xbb2c, 0x9305, 0xbb30, 0x9305,
-	0xbb34, 0x9305, 0x003e, 0x0570, 0xd88c, 0x1128, 0x080c, 0x6a8e,
-	0x0110, 0xc89d, 0x0438, 0x900e, 0x080c, 0x6937, 0x1108, 0xc185,
-	0xb800, 0xd0bc, 0x0108, 0xc18d, 0x000e, 0x00ce, 0x00b8, 0x90c6,
-	0x4007, 0x1110, 0x2408, 0x0090, 0x90c6, 0x4008, 0x1118, 0x2708,
-	0x2610, 0x0060, 0x90c6, 0x4009, 0x1108, 0x0040, 0x90c6, 0x4006,
-	0x1108, 0x0020, 0x2001, 0x4005, 0x2009, 0x000a, 0x2020, 0x012e,
-	0x0804, 0x3589, 0x000e, 0x00ce, 0x2b00, 0x7026, 0x0016, 0x00b6,
-	0x00c6, 0x00e6, 0x2c70, 0x080c, 0xac60, 0x0904, 0x49b1, 0x2b00,
-	0x6012, 0x080c, 0xccfe, 0x2e58, 0x00ee, 0x00e6, 0x00c6, 0x080c,
-	0x4ac9, 0x00ce, 0x2b70, 0x1158, 0x080c, 0xabf0, 0x00ee, 0x00ce,
-	0x00be, 0x001e, 0x012e, 0x2009, 0x0002, 0x0804, 0x35b9, 0x900e,
-	0xa966, 0xa96a, 0x2900, 0x6016, 0xa932, 0xa868, 0xc0fd, 0xd88c,
-	0x0108, 0xc0f5, 0xa86a, 0xd89c, 0x1110, 0x080c, 0x320f, 0x6023,
-	0x0001, 0x9006, 0x080c, 0x6580, 0xd89c, 0x0138, 0x2001, 0x0004,
-	0x080c, 0x6594, 0x2009, 0x0003, 0x0030, 0x2001, 0x0002, 0x080c,
-	0x6594, 0x2009, 0x0002, 0x080c, 0xac8d, 0x78a8, 0xd094, 0x0138,
-	0x00ee, 0x7024, 0x00e6, 0x2058, 0xb8d4, 0xc08d, 0xb8d6, 0x9085,
-	0x0001, 0x00ee, 0x00ce, 0x00be, 0x001e, 0x012e, 0x1120, 0x2009,
-	0x0003, 0x0804, 0x35b9, 0x7007, 0x0003, 0x701f, 0x49c0, 0x0005,
-	0xa830, 0x9086, 0x0100, 0x7024, 0x2058, 0x1138, 0x2009, 0x0004,
-	0xba04, 0x9294, 0x00ff, 0x0804, 0x5652, 0x900e, 0xa868, 0xd0f4,
-	0x1904, 0x3587, 0x080c, 0x6937, 0x1108, 0xc185, 0xb800, 0xd0bc,
-	0x0108, 0xc18d, 0x0804, 0x3587, 0x00e6, 0x00d6, 0x0096, 0x83ff,
-	0x0904, 0x4a2b, 0x902e, 0x080c, 0xab5a, 0x0130, 0x9026, 0x20a9,
-	0x0800, 0x2071, 0x1000, 0x0030, 0x2021, 0x007f, 0x20a9, 0x0781,
-	0x2071, 0x107f, 0x2e04, 0x9005, 0x11b8, 0x2100, 0x9406, 0x1904,
-	0x4a3c, 0x2428, 0x94ce, 0x007f, 0x1120, 0x92ce, 0xfffd, 0x1558,
-	0x0030, 0x94ce, 0x0080, 0x1130, 0x92ce, 0xfffc, 0x1520, 0x93ce,
-	0x00ff, 0x1508, 0xc5fd, 0x0480, 0x2058, 0xbf10, 0x2700, 0x9306,
-	0x11e8, 0xbe14, 0x2600, 0x9206, 0x11c8, 0x2400, 0x9106, 0x1180,
-	0xd884, 0x0598, 0xd894, 0x1588, 0x080c, 0x6a2e, 0x1570, 0x2001,
-	0x4000, 0x0460, 0x080c, 0x6a8e, 0x1540, 0x2001, 0x4000, 0x0430,
-	0x2001, 0x4007, 0x0418, 0x2001, 0x4006, 0x0400, 0x2400, 0x9106,
-	0x1158, 0xbe14, 0x87ff, 0x1128, 0x86ff, 0x0918, 0x080c, 0xab5a,
-	0x1900, 0x2001, 0x4008, 0x0090, 0x8420, 0x8e70, 0x1f04, 0x49f2,
-	0x85ff, 0x1130, 0x2001, 0x4009, 0x0048, 0x2001, 0x0001, 0x0030,
-	0x080c, 0x65e3, 0x1dd0, 0xbb12, 0xba16, 0x9006, 0x9005, 0x009e,
-	0x00de, 0x00ee, 0x0005, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804,
-	0x35b9, 0x080c, 0x4ac9, 0x1120, 0x2009, 0x0002, 0x0804, 0x35b9,
-	0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, 0x7884, 0x9005, 0x0904,
-	0x35bc, 0x9096, 0x00ff, 0x0120, 0x9092, 0x0004, 0x1a04, 0x35bc,
-	0x2010, 0x2918, 0x080c, 0x31af, 0x1120, 0x2009, 0x0003, 0x0804,
-	0x35b9, 0x7007, 0x0003, 0x701f, 0x4a7e, 0x0005, 0xa830, 0x9086,
-	0x0100, 0x1904, 0x3587, 0x2009, 0x0004, 0x0804, 0x35b9, 0x7984,
-	0x080c, 0xab5a, 0x1120, 0x9182, 0x007f, 0x0a04, 0x35bc, 0x9186,
-	0x00ff, 0x0904, 0x35bc, 0x9182, 0x0800, 0x1a04, 0x35bc, 0x2001,
-	0x9000, 0x080c, 0x56ad, 0x1904, 0x35b9, 0x0804, 0x3587, 0xa998,
-	0x080c, 0xab5a, 0x1118, 0x9182, 0x007f, 0x0280, 0x9186, 0x00ff,
-	0x0168, 0x9182, 0x0800, 0x1250, 0x2001, 0x9000, 0x080c, 0x56ad,
-	0x11a8, 0x0060, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006,
-	0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x0005, 0xa897, 0x4000,
-	0x900e, 0x9085, 0x0001, 0x2001, 0x0000, 0x0005, 0x2009, 0x000a,
-	0x0c48, 0x080c, 0x1047, 0x0198, 0x9006, 0xa802, 0x7014, 0x9005,
-	0x1120, 0x2900, 0x7016, 0x701a, 0x0040, 0x7018, 0xa802, 0x0086,
-	0x2040, 0x2900, 0xa006, 0x701a, 0x008e, 0x9085, 0x0001, 0x0005,
-	0x7984, 0x080c, 0x6644, 0x1130, 0x7e88, 0x9684, 0x3fff, 0x9082,
-	0x4000, 0x0208, 0x905e, 0x8bff, 0x0005, 0xa998, 0x080c, 0x6644,
-	0x1130, 0xae9c, 0x9684, 0x3fff, 0x9082, 0x4000, 0x0208, 0x905e,
-	0x8bff, 0x0005, 0xae98, 0x0008, 0x7e84, 0x2608, 0x080c, 0x6644,
-	0x1108, 0x0008, 0x905e, 0x8bff, 0x0005, 0x0016, 0x7114, 0x81ff,
-	0x0128, 0x2148, 0xa904, 0x080c, 0x1079, 0x0cc8, 0x7116, 0x711a,
-	0x001e, 0x0005, 0x2031, 0x0001, 0x0010, 0x2031, 0x0000, 0x2061,
-	0x18b8, 0x2c44, 0xa66a, 0xa17a, 0xa772, 0xa076, 0xa28e, 0xa392,
-	0xa496, 0xa59a, 0x080c, 0x113c, 0x7007, 0x0002, 0x701f, 0x3587,
-	0x0005, 0x00f6, 0x0126, 0x2091, 0x8000, 0x2079, 0x0000, 0x2001,
-	0x18b0, 0x2004, 0x9005, 0x1190, 0x0e04, 0x4b46, 0x7a36, 0x7833,
-	0x0012, 0x7a82, 0x7b86, 0x7c8a, 0x2091, 0x4080, 0x2001, 0x0089,
-	0x2004, 0xd084, 0x190c, 0x11ee, 0x0804, 0x4bac, 0x0016, 0x0086,
-	0x0096, 0x00c6, 0x00e6, 0x2071, 0x189e, 0x7044, 0x9005, 0x1540,
-	0x7148, 0x9182, 0x0010, 0x0288, 0x7038, 0x2060, 0x080c, 0x1047,
-	0x0904, 0x4ba4, 0xa84b, 0x0000, 0x2900, 0x7046, 0x2001, 0x0002,
-	0x9080, 0x1e7a, 0x2005, 0xa846, 0x0098, 0x7038, 0x90e0, 0x0004,
-	0x2001, 0x18ba, 0x9c82, 0x18fa, 0x0210, 0x2061, 0x18ba, 0x2c00,
-	0x703a, 0x7148, 0x81ff, 0x1108, 0x703e, 0x8108, 0x714a, 0x0460,
-	0x7148, 0x8108, 0x714a, 0x7044, 0x2040, 0xa144, 0x2105, 0x0016,
-	0x908a, 0x0036, 0x1a0c, 0x0d7d, 0x2060, 0x001e, 0x8108, 0x2105,
-	0x9005, 0xa146, 0x1520, 0x080c, 0x1047, 0x1130, 0x8109, 0xa946,
-	0x7148, 0x8109, 0x714a, 0x00d8, 0x9006, 0xa806, 0xa84a, 0xa046,
-	0x2800, 0xa802, 0x2900, 0xa006, 0x7046, 0x2001, 0x0002, 0x9080,
-	0x1e7a, 0x2005, 0xa846, 0x0058, 0x2262, 0x6306, 0x640a, 0x00ee,
-	0x00ce, 0x009e, 0x008e, 0x001e, 0x012e, 0x00fe, 0x0005, 0x2c00,
-	0x9082, 0x001b, 0x0002, 0x4bce, 0x4bce, 0x4bd0, 0x4bce, 0x4bce,
-	0x4bce, 0x4bd4, 0x4bce, 0x4bce, 0x4bce, 0x4bd8, 0x4bce, 0x4bce,
-	0x4bce, 0x4bdc, 0x4bce, 0x4bce, 0x4bce, 0x4be0, 0x4bce, 0x4bce,
-	0x4bce, 0x4be4, 0x4bce, 0x4bce, 0x4bce, 0x4be9, 0x080c, 0x0d7d,
-	0xa276, 0xa37a, 0xa47e, 0x0898, 0xa286, 0xa38a, 0xa48e, 0x0878,
-	0xa296, 0xa39a, 0xa49e, 0x0858, 0xa2a6, 0xa3aa, 0xa4ae, 0x0838,
-	0xa2b6, 0xa3ba, 0xa4be, 0x0818, 0xa2c6, 0xa3ca, 0xa4ce, 0x0804,
-	0x4ba7, 0xa2d6, 0xa3da, 0xa4de, 0x0804, 0x4ba7, 0x00e6, 0x2071,
-	0x189e, 0x7048, 0x9005, 0x0904, 0x4c80, 0x0126, 0x2091, 0x8000,
-	0x0e04, 0x4c7f, 0x00f6, 0x2079, 0x0000, 0x00c6, 0x0096, 0x0086,
-	0x0076, 0x9006, 0x2038, 0x7040, 0x2048, 0x9005, 0x0500, 0xa948,
-	0x2105, 0x0016, 0x908a, 0x0036, 0x1a0c, 0x0d7d, 0x2060, 0x001e,
-	0x8108, 0x2105, 0x9005, 0xa94a, 0x1904, 0x4c82, 0xa804, 0x9005,
-	0x090c, 0x0d7d, 0x7042, 0x2938, 0x2040, 0xa003, 0x0000, 0x2001,
-	0x0002, 0x9080, 0x1e7a, 0x2005, 0xa04a, 0x0804, 0x4c82, 0x703c,
-	0x2060, 0x2c14, 0x6304, 0x6408, 0x650c, 0x2200, 0x7836, 0x7833,
-	0x0012, 0x7882, 0x2300, 0x7886, 0x2400, 0x788a, 0x2091, 0x4080,
-	0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11ee, 0x87ff, 0x0118,
-	0x2748, 0x080c, 0x1079, 0x7048, 0x8001, 0x704a, 0x9005, 0x1170,
-	0x7040, 0x2048, 0x9005, 0x0128, 0x080c, 0x1079, 0x9006, 0x7042,
-	0x7046, 0x703b, 0x18ba, 0x703f, 0x18ba, 0x0420, 0x7040, 0x9005,
-	0x1508, 0x7238, 0x2c00, 0x9206, 0x0148, 0x9c80, 0x0004, 0x90fa,
-	0x18fa, 0x0210, 0x2001, 0x18ba, 0x703e, 0x00a0, 0x9006, 0x703e,
-	0x703a, 0x7044, 0x9005, 0x090c, 0x0d7d, 0x2048, 0xa800, 0x9005,
-	0x1de0, 0x2900, 0x7042, 0x2001, 0x0002, 0x9080, 0x1e7a, 0x2005,
-	0xa84a, 0x0000, 0x007e, 0x008e, 0x009e, 0x00ce, 0x00fe, 0x012e,
-	0x00ee, 0x0005, 0x2c00, 0x9082, 0x001b, 0x0002, 0x4ca1, 0x4ca1,
-	0x4ca3, 0x4ca1, 0x4ca1, 0x4ca1, 0x4ca8, 0x4ca1, 0x4ca1, 0x4ca1,
-	0x4cad, 0x4ca1, 0x4ca1, 0x4ca1, 0x4cb2, 0x4ca1, 0x4ca1, 0x4ca1,
-	0x4cb7, 0x4ca1, 0x4ca1, 0x4ca1, 0x4cbc, 0x4ca1, 0x4ca1, 0x4ca1,
-	0x4cc1, 0x080c, 0x0d7d, 0xaa74, 0xab78, 0xac7c, 0x0804, 0x4c2d,
-	0xaa84, 0xab88, 0xac8c, 0x0804, 0x4c2d, 0xaa94, 0xab98, 0xac9c,
-	0x0804, 0x4c2d, 0xaaa4, 0xaba8, 0xacac, 0x0804, 0x4c2d, 0xaab4,
-	0xabb8, 0xacbc, 0x0804, 0x4c2d, 0xaac4, 0xabc8, 0xaccc, 0x0804,
-	0x4c2d, 0xaad4, 0xabd8, 0xacdc, 0x0804, 0x4c2d, 0x0016, 0x0026,
-	0x0036, 0x00b6, 0x00c6, 0x2009, 0x007e, 0x080c, 0x6644, 0x2019,
-	0x0001, 0xb85c, 0xd0ac, 0x0110, 0x2019, 0x0000, 0x2011, 0x801b,
-	0x080c, 0x4b29, 0x00ce, 0x00be, 0x003e, 0x002e, 0x001e, 0x0005,
-	0x0026, 0x080c, 0x56f5, 0xd0c4, 0x0120, 0x2011, 0x8014, 0x080c,
-	0x4b29, 0x002e, 0x0005, 0x81ff, 0x1904, 0x35b9, 0x0126, 0x2091,
-	0x8000, 0x6030, 0xc08d, 0xc085, 0xc0ac, 0x6032, 0x080c, 0x74ec,
-	0x1158, 0x080c, 0x77ef, 0x080c, 0x6044, 0x9085, 0x0001, 0x080c,
-	0x7533, 0x080c, 0x741d, 0x0010, 0x080c, 0x5eff, 0x012e, 0x0804,
-	0x3587, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x35b9, 0x080c,
-	0x5709, 0x0120, 0x2009, 0x0007, 0x0804, 0x35b9, 0x080c, 0x6a86,
-	0x0120, 0x2009, 0x0008, 0x0804, 0x35b9, 0x7984, 0x080c, 0x65e3,
-	0x1904, 0x35bc, 0x2b00, 0x7026, 0x080c, 0x6a8e, 0x7888, 0x1170,
-	0x9084, 0x0005, 0x1158, 0x900e, 0x080c, 0x6937, 0x1108, 0xc185,
-	0xb800, 0xd0bc, 0x0108, 0xc18d, 0x0804, 0x3587, 0x080c, 0x4ac9,
-	0x0904, 0x35b9, 0x9006, 0xa866, 0xa832, 0xa868, 0xc0fd, 0xa86a,
-	0x080c, 0xca9c, 0x0904, 0x35b9, 0x7888, 0xd094, 0x0118, 0xb8d4,
-	0xc08d, 0xb8d6, 0x7007, 0x0003, 0x701f, 0x4d9b, 0x0005, 0x2061,
-	0x1800, 0x080c, 0x5709, 0x2009, 0x0007, 0x1578, 0x080c, 0x6a86,
-	0x0118, 0x2009, 0x0008, 0x0448, 0x080c, 0x3377, 0x0120, 0xa998,
-	0x080c, 0x65e3, 0x1530, 0x080c, 0x4afa, 0x0518, 0x080c, 0x6a8e,
-	0xa89c, 0x1168, 0x9084, 0x0005, 0x1150, 0x900e, 0x080c, 0x6937,
-	0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d, 0x00d0, 0xa868,
-	0xc0fc, 0xa86a, 0x080c, 0xca9c, 0x11e0, 0xa89c, 0xd094, 0x0118,
-	0xb8d4, 0xc08d, 0xb8d6, 0x2009, 0x0003, 0xa897, 0x4005, 0xa99a,
-	0x0010, 0xa897, 0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030,
-	0x0005, 0xa897, 0x4000, 0xa99a, 0x9006, 0x918d, 0x0001, 0x2008,
-	0x0005, 0x9006, 0x0005, 0xa830, 0x9086, 0x0100, 0x7024, 0x2058,
-	0x1110, 0x0804, 0x5652, 0x900e, 0x080c, 0x6937, 0x1108, 0xc185,
-	0xb800, 0xd0bc, 0x0108, 0xc18d, 0x0804, 0x3587, 0x080c, 0x5709,
-	0x0120, 0x2009, 0x0007, 0x0804, 0x35b9, 0x7f84, 0x7a8c, 0x7b88,
-	0x7c9c, 0x7d98, 0x080c, 0x4ac9, 0x1120, 0x2009, 0x0002, 0x0804,
-	0x35b9, 0x900e, 0x2130, 0x7126, 0x7132, 0xa860, 0x20e8, 0x7036,
-	0xa85c, 0x9080, 0x0005, 0x702a, 0x20a0, 0x080c, 0x6644, 0x1904,
-	0x4e3d, 0x080c, 0x6a8e, 0x0138, 0x080c, 0x6a96, 0x0120, 0x080c,
-	0x6a2e, 0x1904, 0x4e3d, 0xd794, 0x1110, 0xd784, 0x01a8, 0xb8c4,
-	0x20e0, 0xb8c8, 0x9080, 0x0006, 0x2098, 0x3400, 0xd794, 0x0160,
-	0x20a9, 0x0008, 0x4003, 0x2098, 0x20a0, 0x3d00, 0x20e0, 0x20a9,
-	0x0002, 0x080c, 0x48c8, 0x0048, 0x20a9, 0x0004, 0x4003, 0x2098,
-	0x20a0, 0x3d00, 0x20e0, 0x080c, 0x48c8, 0x9186, 0x007e, 0x0170,
-	0x9186, 0x0080, 0x0158, 0x080c, 0x6a8e, 0x90c2, 0x0006, 0x1210,
-	0xc1fd, 0x0020, 0x080c, 0x6937, 0x1108, 0xc1fd, 0x4104, 0xc1fc,
-	0xd794, 0x0528, 0xb8c4, 0x20e0, 0xb8c8, 0x2060, 0x9c80, 0x0000,
-	0x2098, 0x20a9, 0x0002, 0x4003, 0x9c80, 0x0003, 0x2098, 0x20a9,
-	0x0001, 0x4005, 0x9c80, 0x0004, 0x2098, 0x3400, 0x20a9, 0x0002,
-	0x4003, 0x2098, 0x20a0, 0x3d00, 0x20e0, 0x080c, 0x48bb, 0x9c80,
-	0x0026, 0x2098, 0xb8c4, 0x20e0, 0x20a9, 0x0002, 0x4003, 0xd794,
-	0x0110, 0x96b0, 0x000b, 0x96b0, 0x0005, 0x8108, 0x080c, 0xab5a,
-	0x0118, 0x9186, 0x0800, 0x0040, 0xd78c, 0x0120, 0x9186, 0x0800,
-	0x0170, 0x0018, 0x9186, 0x007e, 0x0150, 0xd794, 0x0118, 0x9686,
-	0x0020, 0x0010, 0x9686, 0x0028, 0x0150, 0x0804, 0x4dcd, 0x86ff,
-	0x1120, 0x7124, 0x810b, 0x0804, 0x3587, 0x7033, 0x0001, 0x7122,
-	0x7024, 0x9600, 0x7026, 0x772e, 0x2061, 0x18b8, 0x2c44, 0xa06b,
-	0x0000, 0xa67a, 0x7034, 0xa072, 0x7028, 0xa076, 0xa28e, 0xa392,
-	0xa496, 0xa59a, 0x080c, 0x113c, 0x7007, 0x0002, 0x701f, 0x4e79,
-	0x0005, 0x7030, 0x9005, 0x1180, 0x7120, 0x7028, 0x20a0, 0x772c,
-	0x9036, 0x7034, 0x20e8, 0x2061, 0x18b8, 0x2c44, 0xa28c, 0xa390,
-	0xa494, 0xa598, 0x0804, 0x4dcd, 0x7124, 0x810b, 0x0804, 0x3587,
-	0x2029, 0x007e, 0x7984, 0x7a88, 0x7b8c, 0x7c98, 0x9184, 0xff00,
-	0x8007, 0x90e2, 0x0020, 0x0a04, 0x35bc, 0x9502, 0x0a04, 0x35bc,
-	0x9184, 0x00ff, 0x90e2, 0x0020, 0x0a04, 0x35bc, 0x9502, 0x0a04,
-	0x35bc, 0x9284, 0xff00, 0x8007, 0x90e2, 0x0020, 0x0a04, 0x35bc,
-	0x9502, 0x0a04, 0x35bc, 0x9284, 0x00ff, 0x90e2, 0x0020, 0x0a04,
-	0x35bc, 0x9502, 0x0a04, 0x35bc, 0x9384, 0xff00, 0x8007, 0x90e2,
-	0x0020, 0x0a04, 0x35bc, 0x9502, 0x0a04, 0x35bc, 0x9384, 0x00ff,
-	0x90e2, 0x0020, 0x0a04, 0x35bc, 0x9502, 0x0a04, 0x35bc, 0x9484,
-	0xff00, 0x8007, 0x90e2, 0x0020, 0x0a04, 0x35bc, 0x9502, 0x0a04,
-	0x35bc, 0x9484, 0x00ff, 0x90e2, 0x0020, 0x0a04, 0x35bc, 0x9502,
-	0x0a04, 0x35bc, 0x2061, 0x1988, 0x6102, 0x6206, 0x630a, 0x640e,
-	0x0804, 0x3587, 0x080c, 0x4ac9, 0x0904, 0x35b9, 0x2009, 0x0016,
-	0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0xa85c, 0x9080, 0x0019, 0xaf60,
-	0x080c, 0x4b12, 0x701f, 0x4efd, 0x0005, 0x2001, 0x0138, 0x2003,
-	0x0000, 0x00e6, 0x2071, 0x0300, 0x701c, 0xd0a4, 0x1de8, 0x00ee,
-	0x20a9, 0x0016, 0x896e, 0x8d6e, 0x8d6f, 0x9d84, 0xffc0, 0x9080,
-	0x0019, 0x2098, 0x9d84, 0x003f, 0x20e0, 0x2069, 0x1877, 0x20e9,
-	0x0001, 0x2da0, 0x4003, 0x6800, 0x9005, 0x0904, 0x4f7e, 0x6804,
-	0x2008, 0x918c, 0xfff8, 0x1904, 0x4f7e, 0x680c, 0x9005, 0x0904,
-	0x4f7e, 0x9082, 0xff01, 0x1a04, 0x4f7e, 0x6810, 0x9082, 0x005c,
-	0x0a04, 0x4f7e, 0x6824, 0x2008, 0x9082, 0x0008, 0x0a04, 0x4f7e,
-	0x9182, 0x0400, 0x1a04, 0x4f7e, 0x0056, 0x2029, 0x0000, 0x080c,
-	0x8d23, 0x005e, 0x6944, 0x6820, 0x9102, 0x06c0, 0x6820, 0x9082,
-	0x0019, 0x16a0, 0x6828, 0x6944, 0x810c, 0x9102, 0x0678, 0x6840,
-	0x9082, 0x000f, 0x1658, 0x080c, 0x1060, 0x2900, 0x0904, 0x4f98,
-	0x684e, 0x00e6, 0x2071, 0x1930, 0x00b6, 0x2059, 0x0000, 0x080c,
-	0x8bdf, 0x00be, 0x00ee, 0x0558, 0x080c, 0x8936, 0x080c, 0x897c,
-	0x11e0, 0x6857, 0x0000, 0x00c6, 0x2061, 0x0100, 0x6104, 0x918d,
-	0x2000, 0x6106, 0x6b10, 0x2061, 0x1a6a, 0x630a, 0x00ce, 0x080c,
-	0x2748, 0x2001, 0x0138, 0x2102, 0x0804, 0x3587, 0x080c, 0x2748,
-	0x2001, 0x0138, 0x2102, 0x0804, 0x35bc, 0x00e6, 0x2071, 0x1930,
-	0x080c, 0x8db4, 0x080c, 0x8dc3, 0x080c, 0x8bce, 0x00ee, 0x2001,
-	0x188a, 0x204c, 0x080c, 0x1079, 0x2001, 0x188a, 0x2003, 0x0000,
-	0x080c, 0x2748, 0x2001, 0x0138, 0x2102, 0x0804, 0x35b9, 0x2001,
-	0x1924, 0x200c, 0x918e, 0x0000, 0x0904, 0x4ff7, 0x080c, 0x8bc9,
-	0x0904, 0x4ff7, 0x2001, 0x0101, 0x200c, 0x918c, 0xdfff, 0x2102,
-	0x2001, 0x0138, 0x2003, 0x0000, 0x00e6, 0x2071, 0x0300, 0x701c,
-	0xd0a4, 0x1de8, 0x00ee, 0x080c, 0x8bce, 0x2001, 0x0035, 0x080c,
-	0x1693, 0x00c6, 0x2061, 0x193c, 0x6004, 0x6100, 0x9106, 0x1de0,
-	0x00ce, 0x080c, 0x2748, 0x2001, 0x0138, 0x2102, 0x00e6, 0x00f6,
-	0x2071, 0x1923, 0x080c, 0x8b0a, 0x0120, 0x2f00, 0x080c, 0x8b94,
-	0x0cc8, 0x00fe, 0x00ee, 0x0126, 0x2091, 0x8000, 0x2001, 0x188a,
-	0x200c, 0x81ff, 0x0138, 0x2148, 0x080c, 0x1079, 0x2001, 0x188a,
-	0x2003, 0x0000, 0x2001, 0x183d, 0x2003, 0x0020, 0x00e6, 0x2071,
-	0x1930, 0x080c, 0x8db4, 0x080c, 0x8dc3, 0x00ee, 0x012e, 0x0804,
-	0x3587, 0x0006, 0x080c, 0x56f5, 0xd0cc, 0x000e, 0x0005, 0x0006,
-	0x080c, 0x56f9, 0xd0bc, 0x000e, 0x0005, 0x6174, 0x7a84, 0x6300,
-	0x82ff, 0x1118, 0x7986, 0x0804, 0x3587, 0x83ff, 0x1904, 0x35bc,
-	0x2001, 0xfff0, 0x9200, 0x1a04, 0x35bc, 0x2019, 0xffff, 0x6078,
-	0x9302, 0x9200, 0x0a04, 0x35bc, 0x7986, 0x6276, 0x0804, 0x3587,
-	0x080c, 0x5709, 0x1904, 0x35b9, 0x7c88, 0x7d84, 0x7e98, 0x7f8c,
-	0x080c, 0x4ac9, 0x0904, 0x35b9, 0x900e, 0x901e, 0x7326, 0x7332,
-	0xa860, 0x20e8, 0x7036, 0xa85c, 0x9080, 0x0003, 0x702a, 0x20a0,
-	0x91d8, 0x1000, 0x2b5c, 0x8bff, 0x0178, 0x080c, 0x6a8e, 0x0118,
-	0x080c, 0x6a96, 0x1148, 0x20a9, 0x0001, 0xb814, 0x4004, 0xb810,
-	0x4004, 0x4104, 0x9398, 0x0003, 0x8108, 0x9182, 0x0800, 0x0120,
-	0x9386, 0x003c, 0x0170, 0x0c20, 0x83ff, 0x1148, 0x7224, 0x900e,
-	0x2001, 0x0003, 0x080c, 0x9181, 0x2208, 0x0804, 0x3587, 0x7033,
-	0x0001, 0x7122, 0x7024, 0x9300, 0x7026, 0x2061, 0x18b8, 0x2c44,
-	0xa06b, 0x0000, 0xa37a, 0x7028, 0xa076, 0x7034, 0xa072, 0xa48e,
-	0xa592, 0xa696, 0xa79a, 0x080c, 0x113c, 0x7007, 0x0002, 0x701f,
-	0x507a, 0x0005, 0x7030, 0x9005, 0x1178, 0x7120, 0x7028, 0x20a0,
-	0x901e, 0x7034, 0x20e8, 0x2061, 0x18b8, 0x2c44, 0xa48c, 0xa590,
-	0xa694, 0xa798, 0x0804, 0x5038, 0x7224, 0x900e, 0x2001, 0x0003,
-	0x080c, 0x9181, 0x2208, 0x0804, 0x3587, 0x00f6, 0x00e6, 0x080c,
-	0x5709, 0x2009, 0x0007, 0x1904, 0x510d, 0x2071, 0x189e, 0x745c,
-	0x84ff, 0x2009, 0x000e, 0x1904, 0x510d, 0xac9c, 0xad98, 0xaea4,
-	0xafa0, 0x0096, 0x080c, 0x1060, 0x2009, 0x0002, 0x0904, 0x510d,
-	0x2900, 0x705e, 0x900e, 0x901e, 0x7356, 0x7362, 0xa860, 0x7066,
-	0xa85c, 0x9080, 0x0003, 0x705a, 0x20a0, 0x91d8, 0x1000, 0x2b5c,
-	0x8bff, 0x0178, 0x080c, 0x6a8e, 0x0118, 0x080c, 0x6a96, 0x1148,
-	0xb814, 0x20a9, 0x0001, 0x4004, 0xb810, 0x4004, 0x4104, 0x9398,
-	0x0003, 0x8108, 0x9182, 0x0800, 0x0120, 0x9386, 0x003c, 0x01e8,
-	0x0c20, 0x83ff, 0x11c0, 0x7254, 0x900e, 0x2001, 0x0003, 0x080c,
-	0x9181, 0x2208, 0x009e, 0xa897, 0x4000, 0xa99a, 0x715c, 0x81ff,
-	0x090c, 0x0d7d, 0x2148, 0x080c, 0x1079, 0x9006, 0x705e, 0x918d,
-	0x0001, 0x2008, 0x0418, 0x7063, 0x0001, 0x7152, 0x7054, 0x9300,
-	0x7056, 0x2061, 0x18b9, 0x2c44, 0xa37a, 0x7058, 0xa076, 0x7064,
-	0xa072, 0xa48e, 0xa592, 0xa696, 0xa79a, 0xa09f, 0x5119, 0x000e,
-	0xa0a2, 0x080c, 0x113c, 0x9006, 0x0048, 0x009e, 0xa897, 0x4005,
-	0xa99a, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x00ee, 0x00fe,
-	0x0005, 0x00f6, 0xa0a0, 0x904d, 0x090c, 0x0d7d, 0x00e6, 0x2071,
-	0x189e, 0xa06c, 0x908e, 0x0100, 0x0138, 0xa87b, 0x0030, 0xa883,
-	0x0000, 0xa897, 0x4002, 0x00d8, 0x7060, 0x9005, 0x1158, 0x7150,
-	0x7058, 0x20a0, 0x901e, 0x7064, 0x20e8, 0xa48c, 0xa590, 0xa694,
-	0xa798, 0x0428, 0xa87b, 0x0000, 0xa883, 0x0000, 0xa897, 0x4000,
-	0x7254, 0x900e, 0x2001, 0x0003, 0x080c, 0x9181, 0xaa9a, 0x715c,
-	0x81ff, 0x090c, 0x0d7d, 0x2148, 0x080c, 0x1079, 0x705f, 0x0000,
-	0xa0a0, 0x2048, 0x0126, 0x2091, 0x8000, 0x080c, 0x6d9f, 0x012e,
-	0xa09f, 0x0000, 0xa0a3, 0x0000, 0x00ee, 0x00fe, 0x0005, 0x91d8,
-	0x1000, 0x2b5c, 0x8bff, 0x0178, 0x080c, 0x6a8e, 0x0118, 0x080c,
-	0x6a96, 0x1148, 0xb814, 0x20a9, 0x0001, 0x4004, 0xb810, 0x4004,
-	0x4104, 0x9398, 0x0003, 0x8108, 0x9182, 0x0800, 0x0120, 0x9386,
-	0x003c, 0x0518, 0x0c20, 0x83ff, 0x11f0, 0x7154, 0x810c, 0xa99a,
-	0xa897, 0x4000, 0x715c, 0x81ff, 0x090c, 0x0d7d, 0x2148, 0x080c,
-	0x1079, 0x9006, 0x705e, 0x918d, 0x0001, 0x2008, 0xa0a0, 0x2048,
-	0x0126, 0x2091, 0x8000, 0x080c, 0x6d9f, 0x012e, 0xa09f, 0x0000,
-	0xa0a3, 0x0000, 0x0070, 0x7063, 0x0001, 0x7152, 0x7054, 0x9300,
-	0x7056, 0xa37a, 0xa48e, 0xa592, 0xa696, 0xa79a, 0x080c, 0x113c,
-	0x9006, 0x00ee, 0x0005, 0x0096, 0xa88c, 0x90be, 0x7000, 0x0148,
-	0x90be, 0x7100, 0x0130, 0x90be, 0x7200, 0x0118, 0x009e, 0x0804,
-	0x35bc, 0xa884, 0xa988, 0x080c, 0x2630, 0x1518, 0x080c, 0x65e3,
-	0x1500, 0x7126, 0xbe12, 0xbd16, 0xae7c, 0x080c, 0x4ac9, 0x01c8,
-	0x080c, 0x4ac9, 0x01b0, 0x009e, 0xa867, 0x0000, 0xa868, 0xc0fd,
-	0xa86a, 0xa823, 0x0000, 0xa804, 0x2048, 0x080c, 0xca15, 0x1120,
-	0x2009, 0x0003, 0x0804, 0x35b9, 0x7007, 0x0003, 0x701f, 0x51e6,
-	0x0005, 0x009e, 0x2009, 0x0002, 0x0804, 0x35b9, 0x7124, 0x080c,
-	0x3318, 0xa820, 0x9086, 0x8001, 0x1120, 0x2009, 0x0004, 0x0804,
-	0x35b9, 0x2900, 0x7022, 0xa804, 0x0096, 0x2048, 0x8906, 0x8006,
-	0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x009e, 0x9080, 0x0002,
-	0x0076, 0x0006, 0x2098, 0x20a0, 0x27e0, 0x27e8, 0x20a9, 0x002a,
-	0x080c, 0x0fc4, 0xaa6c, 0xab70, 0xac74, 0xad78, 0x2061, 0x18b8,
-	0x2c44, 0xa06b, 0x0000, 0xae64, 0xaf8c, 0x97c6, 0x7000, 0x0118,
-	0x97c6, 0x7100, 0x1148, 0x96c2, 0x0004, 0x0600, 0x2009, 0x0004,
-	0x000e, 0x007e, 0x0804, 0x4b15, 0x97c6, 0x7200, 0x11b8, 0x96c2,
-	0x0054, 0x02a0, 0x000e, 0x007e, 0x2061, 0x18b8, 0x2c44, 0xa076,
-	0xa772, 0xa07b, 0x002a, 0xa28e, 0xa392, 0xa496, 0xa59a, 0x080c,
-	0x113c, 0x7007, 0x0002, 0x701f, 0x5242, 0x0005, 0x000e, 0x007e,
-	0x0804, 0x35bc, 0x7020, 0x2048, 0xa804, 0x2048, 0xa804, 0x2048,
-	0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080,
-	0x0002, 0x2098, 0x20a0, 0x27e0, 0x27e8, 0x20a9, 0x002a, 0x080c,
-	0x0fc4, 0x2100, 0x2238, 0x2061, 0x18b8, 0x2c44, 0xa28c, 0xa390,
-	0xa494, 0xa598, 0x2009, 0x002a, 0x0804, 0x4b15, 0x81ff, 0x1904,
-	0x35b9, 0x798c, 0x2001, 0x197d, 0x918c, 0x8000, 0x2102, 0x080c,
-	0x4ae0, 0x0904, 0x35bc, 0x080c, 0x6a8e, 0x0120, 0x080c, 0x6a96,
-	0x1904, 0x35bc, 0x080c, 0x670b, 0x0904, 0x35b9, 0x0126, 0x2091,
-	0x8000, 0x080c, 0x68a4, 0x012e, 0x0904, 0x35b9, 0x2001, 0x197d,
-	0x2004, 0xd0fc, 0x1904, 0x3587, 0x0804, 0x4567, 0xa9a0, 0x2001,
-	0x197d, 0x918c, 0x8000, 0xc18d, 0x2102, 0x080c, 0x4aed, 0x01a0,
-	0x080c, 0x6a8e, 0x0118, 0x080c, 0x6a96, 0x1170, 0x080c, 0x670b,
-	0x2009, 0x0002, 0x0128, 0x080c, 0x68a4, 0x1170, 0x2009, 0x0003,
+	0x81ff, 0x0148, 0x080c, 0x2a58, 0x1130, 0x9006, 0x080c, 0x29ab,
+	0x9006, 0x080c, 0x298e, 0x7884, 0x9084, 0x0007, 0x0002, 0x3dba,
+	0x3dbb, 0x3dbc, 0x3db7, 0x3db7, 0x3db7, 0x3db7, 0x3db7, 0x012e,
+	0x0804, 0x35ed, 0x0ce0, 0x0cd8, 0x080c, 0x753d, 0x1128, 0x012e,
+	0x2009, 0x0016, 0x0804, 0x35ea, 0x81ff, 0x0128, 0x012e, 0x2021,
+	0x400b, 0x0804, 0x35ba, 0x080c, 0xa91e, 0x0086, 0x0096, 0x00a6,
+	0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x080c, 0x3ae5, 0x2009,
+	0x0101, 0x210c, 0x0016, 0x7ec8, 0x7dcc, 0x9006, 0x2068, 0x2060,
+	0x2058, 0x080c, 0x421f, 0x080c, 0x416f, 0x903e, 0x2720, 0x00f6,
+	0x00e6, 0x0086, 0x2940, 0x2071, 0x19e6, 0x2079, 0x0090, 0x00d6,
+	0x2069, 0x0000, 0x6884, 0xd0b4, 0x0120, 0x68d4, 0x780e, 0x68d0,
+	0x780a, 0x00de, 0x2011, 0x0001, 0x080c, 0x40d0, 0x080c, 0x2a60,
+	0x080c, 0x2a60, 0x080c, 0x2a60, 0x080c, 0x2a60, 0x080c, 0x40d0,
+	0x008e, 0x00ee, 0x00fe, 0x080c, 0x3ffd, 0x2009, 0x9c40, 0x8109,
+	0x11b0, 0x080c, 0x3f34, 0x2001, 0x0004, 0x200c, 0x918c, 0xfffd,
+	0x2102, 0x001e, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x00ae,
+	0x009e, 0x008e, 0x2009, 0x0017, 0x080c, 0x35ea, 0x0cf8, 0x2001,
+	0x020b, 0x2004, 0x9084, 0x0140, 0x1d10, 0x00f6, 0x2079, 0x0000,
+	0x7884, 0x00fe, 0xd0bc, 0x0178, 0x2001, 0x0201, 0x200c, 0x81ff,
+	0x0150, 0x080c, 0x3fdb, 0x2d00, 0x9c05, 0x9b05, 0x0120, 0x080c,
+	0x3f34, 0x0804, 0x3edd, 0x080c, 0x4144, 0x080c, 0x4068, 0x080c,
+	0x3fbe, 0x080c, 0x3ff3, 0x00f6, 0x2079, 0x0100, 0x7824, 0xd0ac,
+	0x0130, 0x8b58, 0x080c, 0x3f34, 0x00fe, 0x0804, 0x3edd, 0x00fe,
+	0x080c, 0x3f2a, 0x1150, 0x8d68, 0x2001, 0x0032, 0x2602, 0x2001,
+	0x0033, 0x2502, 0x080c, 0x3f34, 0x0080, 0x87ff, 0x0138, 0x2001,
+	0x0201, 0x2004, 0x9005, 0x1908, 0x8739, 0x0038, 0x2001, 0x1a6a,
+	0x2004, 0x9086, 0x0000, 0x1904, 0x3e2d, 0x2001, 0x032f, 0x2003,
+	0x00f6, 0x8631, 0x1208, 0x8529, 0x2500, 0x9605, 0x0904, 0x3edd,
+	0x7884, 0xd0bc, 0x0128, 0x2d00, 0x9c05, 0x9b05, 0x1904, 0x3edd,
+	0xa013, 0x0019, 0x2001, 0x032a, 0x2003, 0x0004, 0x7884, 0xd0ac,
+	0x1148, 0x2001, 0x1a6a, 0x2003, 0x0003, 0x2001, 0x032a, 0x2003,
+	0x0009, 0x0030, 0xa017, 0x0001, 0x78b4, 0x9005, 0x0108, 0xa016,
+	0x2800, 0xa05a, 0x2009, 0x0040, 0x080c, 0x220a, 0x2900, 0xa85a,
+	0xa813, 0x0019, 0x7884, 0xd0a4, 0x1180, 0xa817, 0x0000, 0x00c6,
+	0x20a9, 0x0004, 0x2061, 0x0090, 0x602b, 0x0008, 0x2001, 0x0203,
+	0x2004, 0x1f04, 0x3eb4, 0x00ce, 0x0030, 0xa817, 0x0001, 0x78b0,
+	0x9005, 0x0108, 0xa816, 0x00f6, 0x00c6, 0x2079, 0x0100, 0x2061,
+	0x0090, 0x7827, 0x0002, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8,
+	0x601a, 0x0006, 0x2001, 0x002b, 0x2004, 0x601e, 0x78c6, 0x000e,
+	0x78ca, 0x00ce, 0x00fe, 0x0804, 0x3de7, 0x001e, 0x00c6, 0x2001,
+	0x032a, 0x2003, 0x0004, 0x2061, 0x0100, 0x6027, 0x0002, 0x6106,
+	0x2011, 0x020d, 0x2013, 0x0020, 0x2001, 0x0004, 0x200c, 0x918c,
+	0xfffd, 0x2102, 0x080c, 0x1340, 0x7884, 0x9084, 0x0003, 0x9086,
+	0x0002, 0x01b0, 0x2009, 0x0028, 0x080c, 0x220a, 0x2001, 0x0227,
+	0x200c, 0x2102, 0x6050, 0x9084, 0xb7ff, 0x080c, 0x2b0a, 0x6052,
+	0x602f, 0x0000, 0x604b, 0xf7f7, 0x6043, 0x0090, 0x6043, 0x0010,
+	0x080c, 0xa93a, 0x00ce, 0x2d08, 0x2c10, 0x2b18, 0x2b00, 0x9c05,
+	0x9d05, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x00ae, 0x009e,
+	0x008e, 0x1118, 0x012e, 0x0804, 0x35b8, 0x012e, 0x2021, 0x400c,
+	0x0804, 0x35ba, 0x9085, 0x0001, 0x1d04, 0x3f33, 0x2091, 0x6000,
+	0x8420, 0x9486, 0x0064, 0x0005, 0x2001, 0x0105, 0x2003, 0x0010,
+	0x2001, 0x032a, 0x2003, 0x0004, 0x2001, 0x1a6a, 0x2003, 0x0000,
+	0x0071, 0x2009, 0x0048, 0x080c, 0x220a, 0x2001, 0x0227, 0x2024,
+	0x2402, 0x2001, 0x0109, 0x2003, 0x4000, 0x9026, 0x0005, 0x00f6,
+	0x00e6, 0x2071, 0x19e6, 0x7054, 0x9086, 0x0000, 0x0520, 0x2079,
+	0x0090, 0x2009, 0x0206, 0x2104, 0x2009, 0x0203, 0x210c, 0x9106,
+	0x1120, 0x2009, 0x0040, 0x080c, 0x220a, 0x782c, 0xd0fc, 0x0d88,
+	0x080c, 0x4144, 0x7054, 0x9086, 0x0000, 0x1d58, 0x782b, 0x0004,
+	0x782c, 0xd0ac, 0x1de8, 0x2009, 0x0040, 0x080c, 0x220a, 0x782b,
+	0x0002, 0x7057, 0x0000, 0x00ee, 0x00fe, 0x0005, 0x00f6, 0x2079,
+	0x0100, 0x2001, 0x1818, 0x200c, 0x7932, 0x7936, 0x080c, 0x26aa,
+	0x080c, 0x2ad7, 0x080c, 0x2b0a, 0x784b, 0xf7f7, 0x7843, 0x0090,
+	0x7843, 0x0010, 0x7850, 0xc0e5, 0x7852, 0x2019, 0x61a8, 0x7820,
+	0xd09c, 0x0110, 0x8319, 0x1dd8, 0x7850, 0xc0e4, 0x7852, 0x2011,
+	0x0048, 0x080c, 0x2ab4, 0x7843, 0x0040, 0x2019, 0x01f4, 0xa001,
+	0xa001, 0x8319, 0x1de0, 0x2001, 0x0100, 0x080c, 0x2a7a, 0x2011,
+	0x0020, 0x080c, 0x2ab4, 0x7843, 0x0000, 0x9006, 0x080c, 0x2a7a,
+	0x2011, 0x0048, 0x080c, 0x2ab4, 0x00fe, 0x0005, 0x7884, 0xd0ac,
+	0x11c8, 0x00f6, 0x00e6, 0x2071, 0x1a6a, 0x2079, 0x0320, 0x2001,
+	0x0201, 0x2004, 0x9005, 0x0160, 0x7000, 0x9086, 0x0000, 0x1140,
+	0x0051, 0xd0bc, 0x0108, 0x8738, 0x7003, 0x0003, 0x782b, 0x0019,
+	0x00ee, 0x00fe, 0x0005, 0x00f6, 0x2079, 0x0300, 0x78bc, 0x00fe,
+	0x908c, 0x0070, 0x0178, 0x2009, 0x0032, 0x260a, 0x2009, 0x0033,
+	0x250a, 0xd0b4, 0x0108, 0x8c60, 0xd0ac, 0x0108, 0x8d68, 0xd0a4,
+	0x0108, 0x8b58, 0x0005, 0x00f6, 0x2079, 0x0200, 0x781c, 0xd084,
+	0x0110, 0x7837, 0x0050, 0x00fe, 0x0005, 0x00e6, 0x2071, 0x0100,
+	0x2001, 0x19a9, 0x2004, 0x70e2, 0x080c, 0x3d1f, 0x1188, 0x2001,
+	0x1820, 0x2004, 0x2009, 0x181f, 0x210c, 0x918c, 0x00ff, 0x706e,
+	0x716a, 0x7066, 0x918d, 0x3200, 0x7162, 0x7073, 0xe109, 0x0080,
+	0x702c, 0x9085, 0x0002, 0x702e, 0x2009, 0x1818, 0x210c, 0x716e,
+	0x7063, 0x0100, 0x7166, 0x719e, 0x706b, 0x0000, 0x7073, 0x0809,
+	0x7077, 0x0008, 0x7078, 0x9080, 0x0100, 0x707a, 0x7080, 0x8000,
+	0x7082, 0x7087, 0xaaaa, 0x9006, 0x708a, 0x708e, 0x707e, 0x70d6,
+	0x70ab, 0x0036, 0x70af, 0x95d5, 0x7014, 0x9084, 0x1984, 0x9085,
+	0x0092, 0x7016, 0x080c, 0x4144, 0x00f6, 0x2071, 0x1a6a, 0x2079,
+	0x0320, 0x00d6, 0x2069, 0x0000, 0x6884, 0xd0b4, 0x0120, 0x689c,
+	0x780e, 0x6898, 0x780a, 0x00de, 0x2009, 0x03e8, 0x8109, 0x1df0,
+	0x792c, 0xd1fc, 0x0110, 0x782b, 0x0004, 0x2011, 0x0011, 0x080c,
+	0x40d0, 0x2011, 0x0001, 0x080c, 0x40d0, 0x00fe, 0x00ee, 0x0005,
+	0x00f6, 0x00e6, 0x2071, 0x1a6a, 0x2079, 0x0320, 0x792c, 0xd1fc,
+	0x0904, 0x40cd, 0x782b, 0x0002, 0x9026, 0xd19c, 0x1904, 0x40c9,
+	0x7000, 0x0002, 0x40cd, 0x407e, 0x40ae, 0x40c9, 0xd1bc, 0x1170,
+	0xd1dc, 0x1190, 0x8001, 0x7002, 0x2011, 0x0001, 0x080c, 0x40d0,
+	0x0904, 0x40cd, 0x080c, 0x40d0, 0x0804, 0x40cd, 0x00f6, 0x2079,
+	0x0300, 0x78bf, 0x0000, 0x00fe, 0x7810, 0x7914, 0x782b, 0x0004,
+	0x7812, 0x7916, 0x2001, 0x0201, 0x200c, 0x81ff, 0x0de8, 0x080c,
+	0x3fdb, 0x2009, 0x0001, 0x00f6, 0x2079, 0x0300, 0x78b8, 0x00fe,
+	0xd0ec, 0x0110, 0x2009, 0x0011, 0x792a, 0x00f8, 0x8001, 0x7002,
+	0x9184, 0x0880, 0x1140, 0x782c, 0xd0fc, 0x1904, 0x4072, 0x2011,
+	0x0001, 0x00b1, 0x0090, 0xa010, 0x9092, 0x0004, 0x9086, 0x0015,
+	0x1120, 0xa000, 0xa05a, 0x2011, 0x0031, 0xa212, 0xd1dc, 0x1960,
+	0x0828, 0x782b, 0x0004, 0x7003, 0x0000, 0x00ee, 0x00fe, 0x0005,
+	0xa014, 0x9005, 0x0550, 0x8001, 0x0036, 0x0096, 0xa016, 0xa058,
+	0x2048, 0xa010, 0x2009, 0x0031, 0x911a, 0x831c, 0x831c, 0x938a,
+	0x0007, 0x1a0c, 0x0d7d, 0x9398, 0x40fe, 0x231d, 0x083f, 0x9080,
+	0x0004, 0x7a2a, 0x7100, 0x8108, 0x7102, 0x009e, 0x003e, 0x908a,
+	0x0035, 0x1140, 0x0096, 0xa058, 0x2048, 0xa804, 0xa05a, 0x2001,
+	0x0019, 0x009e, 0xa012, 0x9085, 0x0001, 0x0005, 0x413b, 0x4132,
+	0x4129, 0x4120, 0x4117, 0x410e, 0x4105, 0xa964, 0x7902, 0xa968,
+	0x7906, 0xa96c, 0x7912, 0xa970, 0x7916, 0x0005, 0xa974, 0x7902,
+	0xa978, 0x7906, 0xa97c, 0x7912, 0xa980, 0x7916, 0x0005, 0xa984,
+	0x7902, 0xa988, 0x7906, 0xa98c, 0x7912, 0xa990, 0x7916, 0x0005,
+	0xa994, 0x7902, 0xa998, 0x7906, 0xa99c, 0x7912, 0xa9a0, 0x7916,
+	0x0005, 0xa9a4, 0x7902, 0xa9a8, 0x7906, 0xa9ac, 0x7912, 0xa9b0,
+	0x7916, 0x0005, 0xa9b4, 0x7902, 0xa9b8, 0x7906, 0xa9bc, 0x7912,
+	0xa9c0, 0x7916, 0x0005, 0xa9c4, 0x7902, 0xa9c8, 0x7906, 0xa9cc,
+	0x7912, 0xa9d0, 0x7916, 0x0005, 0x00f6, 0x00e6, 0x0086, 0x2071,
+	0x19e6, 0x2079, 0x0090, 0x792c, 0xd1fc, 0x01e8, 0x782b, 0x0002,
+	0x2940, 0x9026, 0x7054, 0x0002, 0x416b, 0x4157, 0x4162, 0x8001,
+	0x7056, 0xd19c, 0x1180, 0x2011, 0x0001, 0x080c, 0x40d0, 0x190c,
+	0x40d0, 0x0048, 0x8001, 0x7056, 0x782c, 0xd0fc, 0x1d38, 0x2011,
+	0x0001, 0x080c, 0x40d0, 0x008e, 0x00ee, 0x00fe, 0x0005, 0x00f6,
+	0x00e6, 0x00c6, 0x0086, 0x2061, 0x0200, 0x2001, 0x19a9, 0x2004,
+	0x601a, 0x2061, 0x0100, 0x2001, 0x19a8, 0x2004, 0x60ce, 0x6104,
+	0xc1ac, 0x6106, 0x2001, 0x002c, 0x2004, 0x9005, 0x0520, 0x2038,
+	0x2001, 0x002e, 0x2024, 0x2001, 0x002f, 0x201c, 0x080c, 0x4af2,
+	0xa813, 0x0019, 0xaf16, 0x2900, 0xa85a, 0x978a, 0x0007, 0x0220,
+	0x2138, 0x2009, 0x0007, 0x0010, 0x2708, 0x903e, 0x0096, 0xa858,
+	0x2048, 0xa85c, 0x9080, 0x0019, 0x009e, 0x080c, 0x41e7, 0x1d68,
+	0x2900, 0xa85a, 0x00d0, 0x080c, 0x4af2, 0xa813, 0x0019, 0xa817,
+	0x0001, 0x2900, 0xa85a, 0x2001, 0x002e, 0x2004, 0xa866, 0x2001,
+	0x002f, 0x2004, 0xa86a, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8,
+	0xa86e, 0x2001, 0x002b, 0x2004, 0xa872, 0x2061, 0x0090, 0x2079,
+	0x0100, 0x2001, 0x19a8, 0x2004, 0x6036, 0x2009, 0x0040, 0x080c,
+	0x220a, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8, 0x601a, 0x0006,
+	0x2001, 0x002b, 0x2004, 0x601e, 0x78c6, 0x000e, 0x78ca, 0x9006,
+	0x600a, 0x600e, 0x008e, 0x00ce, 0x00ee, 0x00fe, 0x0005, 0x00e6,
+	0x2071, 0x0080, 0xaa60, 0x22e8, 0x20a0, 0x20e1, 0x0000, 0x2099,
+	0x0088, 0x702b, 0x0026, 0x7402, 0x7306, 0x9006, 0x700a, 0x700e,
+	0x810b, 0x810b, 0x21a8, 0x810b, 0x7112, 0x702b, 0x0041, 0x702c,
+	0xd0fc, 0x0de8, 0x702b, 0x0002, 0x702b, 0x0040, 0x4005, 0x7400,
+	0x7304, 0x87ff, 0x0190, 0x0086, 0x0096, 0x2940, 0x0086, 0x080c,
+	0x4af2, 0x008e, 0xa058, 0x00a6, 0x2050, 0x2900, 0xb006, 0xa05a,
+	0x00ae, 0x009e, 0x008e, 0x9085, 0x0001, 0x00ee, 0x0005, 0x00e6,
+	0x2001, 0x002d, 0x2004, 0x9005, 0x0528, 0x2038, 0x2001, 0x0030,
+	0x2024, 0x2001, 0x0031, 0x201c, 0x080c, 0x4af2, 0x2940, 0xa813,
+	0x0019, 0xaf16, 0x2900, 0xa85a, 0x978a, 0x0007, 0x0220, 0x2138,
+	0x2009, 0x0007, 0x0010, 0x2708, 0x903e, 0x0096, 0xa858, 0x2048,
+	0xa85c, 0x9080, 0x0019, 0x009e, 0x080c, 0x41e7, 0x1d68, 0x2900,
+	0xa85a, 0x00d8, 0x080c, 0x4af2, 0x2940, 0xa013, 0x0019, 0xa017,
+	0x0001, 0x2800, 0xa05a, 0x2001, 0x0030, 0x2004, 0xa066, 0x2001,
+	0x0031, 0x2004, 0xa06a, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8,
+	0xa06e, 0x2001, 0x002b, 0x2004, 0xa072, 0x2001, 0x032a, 0x2003,
+	0x0004, 0x7884, 0xd0ac, 0x1180, 0x2001, 0x0101, 0x200c, 0x918d,
+	0x0200, 0x2102, 0xa017, 0x0000, 0x2001, 0x1a6a, 0x2003, 0x0003,
+	0x2001, 0x032a, 0x2003, 0x0009, 0x2001, 0x0300, 0x2003, 0x0000,
+	0x2001, 0x020d, 0x2003, 0x0000, 0x2001, 0x0004, 0x200c, 0x918d,
+	0x0002, 0x2102, 0x00ee, 0x0005, 0x0126, 0x2091, 0x8000, 0x20a9,
+	0x0007, 0x20a1, 0x1840, 0x20e9, 0x0001, 0x9006, 0x4004, 0x20a9,
+	0x0014, 0x20a1, 0xffec, 0x20e9, 0x0000, 0x9006, 0x4004, 0x2009,
+	0x013c, 0x200a, 0x012e, 0x7880, 0x9086, 0x0052, 0x0108, 0x0005,
+	0x0804, 0x35b8, 0x7d98, 0x7c9c, 0x0804, 0x36ba, 0x080c, 0x753d,
+	0x190c, 0x6057, 0x6040, 0x9084, 0x0020, 0x09b1, 0x2069, 0x1847,
+	0x2d00, 0x2009, 0x0030, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x2039,
+	0x0001, 0x080c, 0x4b3b, 0x701f, 0x42c6, 0x0005, 0x080c, 0x574d,
+	0x1130, 0x3b00, 0x3a08, 0xc194, 0xc095, 0x20d8, 0x21d0, 0x2069,
+	0x1847, 0x6800, 0x9005, 0x0904, 0x35ed, 0x6804, 0xd0ac, 0x0118,
+	0xd0a4, 0x0904, 0x35ed, 0xd094, 0x00c6, 0x2061, 0x0100, 0x6104,
+	0x0138, 0x6200, 0x9292, 0x0005, 0x0218, 0x918c, 0xffdf, 0x0010,
+	0x918d, 0x0020, 0x6106, 0x00ce, 0xd08c, 0x00c6, 0x2061, 0x0100,
+	0x6104, 0x0118, 0x918d, 0x0010, 0x0010, 0x918c, 0xffef, 0x6106,
+	0x00ce, 0xd084, 0x0158, 0x6a28, 0x928a, 0x007f, 0x1a04, 0x35ed,
+	0x9288, 0x33b9, 0x210d, 0x918c, 0x00ff, 0x6166, 0xd0dc, 0x0130,
+	0x6828, 0x908a, 0x007f, 0x1a04, 0x35ed, 0x605e, 0x6888, 0x9084,
+	0x0030, 0x8004, 0x8004, 0x8004, 0x8004, 0x0006, 0x2009, 0x19b0,
+	0x9080, 0x279d, 0x2005, 0x200a, 0x2008, 0x2001, 0x0018, 0x080c,
+	0xa90f, 0x2009, 0x0390, 0x200b, 0x0400, 0x000e, 0x2009, 0x19b1,
+	0x9080, 0x27a1, 0x2005, 0x200a, 0x6808, 0x908a, 0x0100, 0x0a04,
+	0x35ed, 0x908a, 0x0841, 0x1a04, 0x35ed, 0x9084, 0x0007, 0x1904,
+	0x35ed, 0x680c, 0x9005, 0x0904, 0x35ed, 0x6810, 0x9005, 0x0904,
+	0x35ed, 0x6848, 0x6940, 0x910a, 0x1a04, 0x35ed, 0x8001, 0x0904,
+	0x35ed, 0x684c, 0x6944, 0x910a, 0x1a04, 0x35ed, 0x8001, 0x0904,
+	0x35ed, 0x6814, 0x908c, 0x00ff, 0x614e, 0x8007, 0x9084, 0x00ff,
+	0x6052, 0x080c, 0x7871, 0x080c, 0x6b0f, 0x080c, 0x6b43, 0x6808,
+	0x602a, 0x080c, 0x217c, 0x2009, 0x0170, 0x200b, 0x0080, 0xa001,
+	0xa001, 0x200b, 0x0000, 0x0036, 0x6b08, 0x080c, 0x2704, 0x003e,
+	0x6000, 0x9086, 0x0000, 0x1904, 0x4451, 0x6818, 0x691c, 0x6a20,
+	0x6b24, 0x8007, 0x810f, 0x8217, 0x831f, 0x6016, 0x611a, 0x621e,
+	0x6322, 0x6c04, 0xd4f4, 0x0148, 0x6830, 0x6934, 0x6a38, 0x6b3c,
+	0x8007, 0x810f, 0x8217, 0x831f, 0x0010, 0x9084, 0xf0ff, 0x6006,
+	0x610a, 0x620e, 0x6312, 0x8007, 0x810f, 0x8217, 0x831f, 0x20a9,
+	0x0004, 0x20a1, 0x19b2, 0x20e9, 0x0001, 0x4001, 0x20a9, 0x0004,
+	0x20a1, 0x19cc, 0x20e9, 0x0001, 0x4001, 0x080c, 0x885b, 0x00c6,
+	0x900e, 0x20a9, 0x0001, 0x6b70, 0xd384, 0x01c8, 0x0020, 0x839d,
+	0x12b0, 0x3508, 0x8109, 0x080c, 0x7e33, 0x6878, 0x6016, 0x6874,
+	0x2008, 0x9084, 0xff00, 0x8007, 0x600a, 0x9184, 0x00ff, 0x6006,
+	0x8108, 0x1118, 0x6003, 0x0003, 0x0010, 0x6003, 0x0001, 0x1f04,
+	0x43af, 0x00ce, 0x00c6, 0x2061, 0x199b, 0x6a88, 0x9284, 0xc000,
+	0x2010, 0x9286, 0x0000, 0x1158, 0x2063, 0x0000, 0x2001, 0x0001,
+	0x080c, 0x29ab, 0x2001, 0x0001, 0x080c, 0x298e, 0x0088, 0x9286,
+	0x4000, 0x1148, 0x2063, 0x0001, 0x9006, 0x080c, 0x29ab, 0x9006,
+	0x080c, 0x298e, 0x0028, 0x9286, 0x8000, 0x1d30, 0x2063, 0x0002,
+	0x00ce, 0x00e6, 0x2c70, 0x080c, 0x0ec1, 0x00ee, 0x6888, 0xd0ec,
+	0x0130, 0x2011, 0x0114, 0x2204, 0x9085, 0x0180, 0x2012, 0x6a80,
+	0x9284, 0x0030, 0x9086, 0x0030, 0x1128, 0x9294, 0xffcf, 0x9295,
+	0x0020, 0x6a82, 0x2001, 0x197b, 0x6a80, 0x9294, 0x0030, 0x928e,
+	0x0000, 0x0170, 0x928e, 0x0010, 0x0118, 0x928e, 0x0020, 0x0140,
+	0x2003, 0xaaaa, 0x080c, 0x2779, 0x2001, 0x196c, 0x2102, 0x0008,
+	0x2102, 0x00c6, 0x2061, 0x0100, 0x602f, 0x0040, 0x602f, 0x0000,
+	0x00ce, 0x080c, 0x753d, 0x0128, 0x080c, 0x5027, 0x0110, 0x080c,
+	0x26ca, 0x60d4, 0x9005, 0x01c0, 0x6003, 0x0001, 0x2009, 0x4439,
+	0x00e0, 0x080c, 0x753d, 0x1168, 0x2011, 0x73b3, 0x080c, 0x86c8,
+	0x2011, 0x73a6, 0x080c, 0x87d4, 0x080c, 0x7845, 0x080c, 0x746e,
+	0x0040, 0x080c, 0x5f4d, 0x0028, 0x6003, 0x0004, 0x2009, 0x4451,
+	0x0020, 0x080c, 0x6a3f, 0x0804, 0x35b8, 0x2001, 0x0170, 0x2004,
+	0x9084, 0x00ff, 0x9086, 0x004c, 0x1118, 0x2091, 0x31bd, 0x0817,
+	0x2091, 0x313d, 0x0817, 0x6000, 0x9086, 0x0000, 0x0904, 0x35ea,
+	0x2069, 0x1847, 0x7890, 0x6842, 0x7894, 0x6846, 0x2d00, 0x2009,
+	0x0030, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x2039, 0x0001, 0x0804,
+	0x4b3e, 0x9006, 0x080c, 0x26ca, 0x81ff, 0x1904, 0x35ea, 0x080c,
+	0x753d, 0x11b0, 0x080c, 0x7840, 0x080c, 0x6092, 0x080c, 0x33ad,
+	0x0118, 0x6130, 0xc18d, 0x6132, 0x080c, 0xd09b, 0x0130, 0x080c,
+	0x7560, 0x1118, 0x080c, 0x7511, 0x0038, 0x080c, 0x746e, 0x0020,
+	0x080c, 0x6057, 0x080c, 0x5f4d, 0x0804, 0x35b8, 0x81ff, 0x1904,
+	0x35ea, 0x080c, 0x753d, 0x1110, 0x0804, 0x35ea, 0x6194, 0x81ff,
+	0x01a8, 0x704f, 0x0000, 0x2001, 0x1d80, 0x2009, 0x0040, 0x7a8c,
+	0x7b88, 0x7c9c, 0x7d98, 0x0126, 0x2091, 0x8000, 0x2039, 0x0001,
+	0x080c, 0x4b3e, 0x701f, 0x35b6, 0x012e, 0x0005, 0x704f, 0x0001,
+	0x00d6, 0x2069, 0x1d80, 0x20a9, 0x0040, 0x20e9, 0x0001, 0x20a1,
+	0x1d80, 0x2019, 0xffff, 0x4304, 0x655c, 0x9588, 0x33b9, 0x210d,
+	0x918c, 0x00ff, 0x216a, 0x900e, 0x2011, 0x0002, 0x2100, 0x9506,
+	0x01a8, 0x080c, 0x6693, 0x1190, 0xb814, 0x821c, 0x0238, 0x9398,
+	0x1d80, 0x9085, 0xff00, 0x8007, 0x201a, 0x0038, 0x9398, 0x1d80,
+	0x2324, 0x94a4, 0xff00, 0x9405, 0x201a, 0x8210, 0x8108, 0x9182,
+	0x0080, 0x1208, 0x0c18, 0x8201, 0x8007, 0x2d0c, 0x9105, 0x206a,
+	0x00de, 0x20a9, 0x0040, 0x20a1, 0x1d80, 0x2099, 0x1d80, 0x080c,
+	0x5fe2, 0x0804, 0x44ab, 0x080c, 0x4b25, 0x0904, 0x35ed, 0x080c,
+	0x4af2, 0x1120, 0x2009, 0x0002, 0x0804, 0x35ea, 0x080c, 0x573e,
+	0xd0b4, 0x0558, 0x7884, 0x908e, 0x007e, 0x0538, 0x908e, 0x007f,
+	0x0520, 0x908e, 0x0080, 0x0508, 0x080c, 0x33a8, 0x1148, 0xb800,
+	0xd08c, 0x11d8, 0xb804, 0x9084, 0x00ff, 0x9086, 0x0006, 0x11a8,
+	0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, 0x080c, 0xcb4b, 0x1120,
+	0x2009, 0x0003, 0x0804, 0x35ea, 0x7007, 0x0003, 0x701f, 0x4539,
+	0x0005, 0x080c, 0x4b25, 0x0904, 0x35ed, 0x20a9, 0x002b, 0xb8c4,
+	0x20e0, 0xb8c8, 0x2098, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0002,
+	0x20a0, 0x4003, 0x20a9, 0x0008, 0x9080, 0x0006, 0x20a0, 0xb8c4,
+	0x20e0, 0xb8c8, 0x9080, 0x0006, 0x2098, 0x080c, 0x0fc4, 0x0070,
+	0x20a9, 0x0004, 0xa85c, 0x9080, 0x000a, 0x20a0, 0xb8c4, 0x20e0,
+	0xb8c8, 0x9080, 0x000a, 0x2098, 0x080c, 0x0fc4, 0x8906, 0x8006,
+	0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0002, 0x2009,
+	0x002b, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x0804, 0x4b3e, 0x81ff,
+	0x1904, 0x35ea, 0x080c, 0x4b09, 0x0904, 0x35ed, 0x080c, 0x68d8,
+	0x0904, 0x35ea, 0x0058, 0xa878, 0x9005, 0x0120, 0x2009, 0x0004,
+	0x0804, 0x35ea, 0xa974, 0xaa94, 0x0804, 0x35b8, 0x080c, 0x5746,
+	0x0904, 0x35b8, 0x701f, 0x4583, 0x7007, 0x0003, 0x0005, 0x81ff,
+	0x1904, 0x35ea, 0x7888, 0x908a, 0x1000, 0x1a04, 0x35ed, 0x080c,
+	0x4b25, 0x0904, 0x35ed, 0x080c, 0x6add, 0x0120, 0x080c, 0x6ae5,
+	0x1904, 0x35ed, 0x080c, 0x695d, 0x0904, 0x35ea, 0x2019, 0x0004,
+	0x900e, 0x080c, 0x68ea, 0x0904, 0x35ea, 0x7984, 0x7a88, 0x04c9,
+	0x08a8, 0xa89c, 0x908a, 0x1000, 0x12f8, 0x080c, 0x4b23, 0x01e0,
+	0x080c, 0x6add, 0x0118, 0x080c, 0x6ae5, 0x11b0, 0x080c, 0x695d,
+	0x2009, 0x0002, 0x0168, 0x2009, 0x0002, 0x2019, 0x0004, 0x080c,
+	0x68ea, 0x2009, 0x0003, 0x0120, 0xa998, 0xaa9c, 0x00d1, 0x0060,
+	0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006, 0x900e, 0x9085,
+	0x0001, 0x2001, 0x0030, 0x0005, 0xa897, 0x4000, 0x080c, 0x5746,
+	0x0110, 0x9006, 0x0018, 0x900e, 0x9085, 0x0001, 0x2001, 0x0000,
+	0x0005, 0x9186, 0x00ff, 0x0110, 0x0071, 0x0060, 0x2029, 0x007e,
+	0x2061, 0x1800, 0x645c, 0x2400, 0x9506, 0x0110, 0x2508, 0x0019,
+	0x8529, 0x1ec8, 0x0005, 0x080c, 0x6693, 0x1138, 0x2200, 0x8003,
+	0x800b, 0x810b, 0x9108, 0x080c, 0x86d6, 0x0005, 0x81ff, 0x1904,
+	0x35ea, 0x798c, 0x2001, 0x197f, 0x918c, 0x8000, 0x2102, 0x080c,
+	0x4b09, 0x0904, 0x35ed, 0x080c, 0x6add, 0x0120, 0x080c, 0x6ae5,
+	0x1904, 0x35ed, 0x080c, 0x675a, 0x0904, 0x35ea, 0x080c, 0x68e1,
+	0x0904, 0x35ea, 0x2001, 0x197f, 0x2004, 0xd0fc, 0x1904, 0x35b8,
+	0x0804, 0x458e, 0xa9a0, 0x2001, 0x197f, 0x918c, 0x8000, 0xc18d,
+	0x2102, 0x080c, 0x4b16, 0x01a0, 0x080c, 0x6add, 0x0118, 0x080c,
+	0x6ae5, 0x1170, 0x080c, 0x675a, 0x2009, 0x0002, 0x0128, 0x080c,
+	0x68e1, 0x1170, 0x2009, 0x0003, 0xa897, 0x4005, 0xa99a, 0x0010,
+	0xa897, 0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x0005,
+	0xa897, 0x4000, 0x2001, 0x197f, 0x2004, 0xd0fc, 0x1128, 0x080c,
+	0x5746, 0x0110, 0x9006, 0x0018, 0x900e, 0x9085, 0x0001, 0x2001,
+	0x0000, 0x0005, 0x81ff, 0x1904, 0x35ea, 0x798c, 0x2001, 0x197e,
+	0x918c, 0x8000, 0x2102, 0x080c, 0x4b09, 0x0904, 0x35ed, 0x080c,
+	0x6add, 0x0120, 0x080c, 0x6ae5, 0x1904, 0x35ed, 0x080c, 0x675a,
+	0x0904, 0x35ea, 0x080c, 0x68cf, 0x0904, 0x35ea, 0x2001, 0x197e,
+	0x2004, 0xd0fc, 0x1904, 0x35b8, 0x0804, 0x458e, 0xa9a0, 0x2001,
+	0x197e, 0x918c, 0x8000, 0xc18d, 0x2102, 0x080c, 0x4b16, 0x01a0,
+	0x080c, 0x6add, 0x0118, 0x080c, 0x6ae5, 0x1170, 0x080c, 0x675a,
+	0x2009, 0x0002, 0x0128, 0x080c, 0x68cf, 0x1170, 0x2009, 0x0003,
 	0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006, 0x900e, 0x9085,
-	0x0001, 0x2001, 0x0030, 0x0005, 0xa897, 0x4000, 0x2001, 0x197d,
-	0x2004, 0xd0fc, 0x1128, 0x080c, 0x56fd, 0x0110, 0x9006, 0x0018,
-	0x900e, 0x9085, 0x0001, 0x2001, 0x0000, 0x0005, 0x78a8, 0xd08c,
-	0x1118, 0xd084, 0x0904, 0x44dc, 0x080c, 0x4afc, 0x0904, 0x35bc,
-	0x080c, 0x4ac9, 0x1120, 0x2009, 0x0002, 0x0804, 0x35b9, 0x080c,
-	0x6a8e, 0x0130, 0x908e, 0x0004, 0x0118, 0x908e, 0x0005, 0x15a0,
-	0x78a8, 0xd08c, 0x0120, 0xb800, 0xc08c, 0xb802, 0x0028, 0x080c,
-	0x56f5, 0xd0b4, 0x0904, 0x4516, 0x7884, 0x908e, 0x007e, 0x0904,
-	0x4516, 0x908e, 0x007f, 0x0904, 0x4516, 0x908e, 0x0080, 0x0904,
-	0x4516, 0xb800, 0xd08c, 0x1904, 0x4516, 0xa867, 0x0000, 0xa868,
-	0xc0fd, 0xa86a, 0x080c, 0xca34, 0x1120, 0x2009, 0x0003, 0x0804,
-	0x35b9, 0x7007, 0x0003, 0x701f, 0x530e, 0x0005, 0x080c, 0x4afc,
-	0x0904, 0x35bc, 0x0804, 0x4516, 0x080c, 0x3377, 0x0108, 0x0005,
-	0x2009, 0x1834, 0x210c, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804,
-	0x35b9, 0x080c, 0x5709, 0x0120, 0x2009, 0x0007, 0x0804, 0x35b9,
-	0x080c, 0x6a86, 0x0120, 0x2009, 0x0008, 0x0804, 0x35b9, 0xb89c,
-	0xd0a4, 0x1118, 0xd0ac, 0x1904, 0x4516, 0x9006, 0xa866, 0xa832,
-	0xa868, 0xc0fd, 0xa86a, 0x080c, 0xca9c, 0x1120, 0x2009, 0x0003,
-	0x0804, 0x35b9, 0x7007, 0x0003, 0x701f, 0x5347, 0x0005, 0xa830,
-	0x9086, 0x0100, 0x1120, 0x2009, 0x0004, 0x0804, 0x5652, 0x080c,
-	0x4afc, 0x0904, 0x35bc, 0x0804, 0x52e0, 0x81ff, 0x2009, 0x0001,
-	0x1904, 0x35b9, 0x080c, 0x5709, 0x2009, 0x0007, 0x1904, 0x35b9,
-	0x080c, 0x6a86, 0x0120, 0x2009, 0x0008, 0x0804, 0x35b9, 0x080c,
-	0x4afc, 0x0904, 0x35bc, 0x080c, 0x6a8e, 0x2009, 0x0009, 0x1904,
-	0x35b9, 0x080c, 0x4ac9, 0x2009, 0x0002, 0x0904, 0x35b9, 0x9006,
-	0xa866, 0xa832, 0xa868, 0xc0fd, 0xa86a, 0x7988, 0x9194, 0xff00,
-	0x918c, 0x00ff, 0x9006, 0x82ff, 0x1128, 0xc0ed, 0xa952, 0x798c,
-	0xa956, 0x0038, 0x928e, 0x0100, 0x1904, 0x35bc, 0xc0e5, 0xa952,
-	0xa956, 0xa83e, 0x080c, 0xccff, 0x2009, 0x0003, 0x0904, 0x35b9,
-	0x7007, 0x0003, 0x701f, 0x539d, 0x0005, 0xa830, 0x9086, 0x0100,
-	0x2009, 0x0004, 0x0904, 0x35b9, 0x0804, 0x3587, 0x7aa8, 0x9284,
-	0xc000, 0x0148, 0xd2ec, 0x01a0, 0x080c, 0x5709, 0x1188, 0x2009,
-	0x0014, 0x0804, 0x35b9, 0xd2dc, 0x1568, 0x81ff, 0x2009, 0x0001,
-	0x1904, 0x35b9, 0x080c, 0x5709, 0x2009, 0x0007, 0x1904, 0x35b9,
-	0xd2f4, 0x0130, 0x9284, 0x5000, 0x080c, 0x56d0, 0x0804, 0x3587,
-	0xd2fc, 0x0158, 0x080c, 0x4afc, 0x0904, 0x35bc, 0x7984, 0x9284,
-	0x9000, 0x080c, 0x56ad, 0x0804, 0x3587, 0x080c, 0x4afc, 0x0904,
-	0x35bc, 0xb804, 0x9084, 0x00ff, 0x9086, 0x0006, 0x2009, 0x0009,
-	0x1904, 0x5486, 0x080c, 0x4ac9, 0x2009, 0x0002, 0x0904, 0x5486,
+	0x0001, 0x2001, 0x0030, 0x0005, 0xa897, 0x4000, 0x2001, 0x197e,
+	0x2004, 0xd0fc, 0x1128, 0x080c, 0x5746, 0x0110, 0x9006, 0x0018,
+	0x900e, 0x9085, 0x0001, 0x2001, 0x0000, 0x0005, 0x6100, 0x0804,
+	0x35b8, 0x080c, 0x4b25, 0x0904, 0x35ed, 0x080c, 0x5752, 0x1904,
+	0x35ea, 0x79a8, 0xd184, 0x1158, 0xb834, 0x8007, 0x789e, 0xb830,
+	0x8007, 0x789a, 0xbb2c, 0x831f, 0xba28, 0x8217, 0x0050, 0xb824,
+	0x8007, 0x789e, 0xb820, 0x8007, 0x789a, 0xbb1c, 0x831f, 0xba18,
+	0x8217, 0xb900, 0x918c, 0x0202, 0x0804, 0x35b8, 0x78a8, 0x909c,
+	0x0003, 0xd0ac, 0x1150, 0xd0b4, 0x1140, 0x939a, 0x0003, 0x1a04,
+	0x35ea, 0x625c, 0x7884, 0x9206, 0x1548, 0x080c, 0x8845, 0x2001,
+	0xffec, 0x2009, 0x000c, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x2039,
+	0x0000, 0x0006, 0x78a8, 0x9084, 0x0080, 0x1118, 0x000e, 0x0804,
+	0x4b3e, 0x000e, 0x2031, 0x0000, 0x2061, 0x18b8, 0x2c44, 0xa66a,
+	0xa17a, 0xa772, 0xa076, 0xa28e, 0xa392, 0xa496, 0xa59a, 0x080c,
+	0x113c, 0x7007, 0x0002, 0x701f, 0x4746, 0x0005, 0x81ff, 0x1904,
+	0x35ea, 0x080c, 0x4b25, 0x0904, 0x35ed, 0x080c, 0x6add, 0x1904,
+	0x35ea, 0x00c6, 0x080c, 0x4af2, 0x00ce, 0x0904, 0x35ea, 0xa867,
+	0x0000, 0xa868, 0xc0fd, 0xa86a, 0x7ea8, 0x080c, 0xcaf1, 0x0904,
+	0x35ea, 0x7007, 0x0003, 0x701f, 0x474a, 0x0005, 0x080c, 0x428c,
+	0x0804, 0x35b8, 0xa830, 0x9086, 0x0100, 0x0904, 0x35ea, 0x8906,
+	0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x001b,
+	0x2009, 0x000c, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x0804, 0x4b3e,
+	0x9006, 0x080c, 0x26ca, 0x78a8, 0x9084, 0x00ff, 0x9086, 0x00ff,
+	0x0118, 0x81ff, 0x1904, 0x35ea, 0x080c, 0x753d, 0x0110, 0x080c,
+	0x6057, 0x7888, 0x908a, 0x1000, 0x1a04, 0x35ed, 0x7984, 0x9186,
+	0x00ff, 0x0138, 0x9182, 0x007f, 0x1a04, 0x35ed, 0x2100, 0x080c,
+	0x2694, 0x0026, 0x00c6, 0x0126, 0x2091, 0x8000, 0x2061, 0x1a02,
+	0x601b, 0x0000, 0x601f, 0x0000, 0x6073, 0x0000, 0x6077, 0x0000,
+	0x080c, 0x753d, 0x1158, 0x080c, 0x7840, 0x080c, 0x6092, 0x9085,
+	0x0001, 0x080c, 0x7584, 0x080c, 0x746e, 0x00f0, 0x080c, 0xa91e,
+	0x080c, 0xabe9, 0x080c, 0xa93a, 0x2061, 0x0100, 0x2001, 0x1818,
+	0x2004, 0x9084, 0x00ff, 0x810f, 0x9105, 0x604a, 0x6043, 0x0090,
+	0x6043, 0x0010, 0x2009, 0x1998, 0x200b, 0x0000, 0x2009, 0x002d,
+	0x2011, 0x5f7d, 0x080c, 0x8792, 0x7984, 0x080c, 0x753d, 0x1110,
+	0x2009, 0x00ff, 0x7a88, 0x080c, 0x45f1, 0x012e, 0x00ce, 0x002e,
+	0x0804, 0x35b8, 0x7984, 0x080c, 0x6632, 0x2b08, 0x1904, 0x35ed,
+	0x0804, 0x35b8, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x35ea,
+	0x60dc, 0xd0ac, 0x1130, 0xd09c, 0x1120, 0x2009, 0x0005, 0x0804,
+	0x35ea, 0x080c, 0x4af2, 0x1120, 0x2009, 0x0002, 0x0804, 0x35ea,
+	0x7984, 0x9192, 0x0021, 0x1a04, 0x35ed, 0x7a8c, 0x7b88, 0x7c9c,
+	0x7d98, 0xa85c, 0x9080, 0x0019, 0x702a, 0xaf60, 0x7736, 0x080c,
+	0x4b3b, 0x701f, 0x4802, 0x7880, 0x9086, 0x006e, 0x0110, 0x701f,
+	0x51d9, 0x0005, 0x2009, 0x0080, 0x080c, 0x6693, 0x1118, 0x080c,
+	0x6add, 0x0120, 0x2021, 0x400a, 0x0804, 0x35ba, 0x00d6, 0x0096,
+	0xa964, 0xaa6c, 0xab70, 0xac74, 0xad78, 0xae7c, 0xa884, 0x90be,
+	0x0100, 0x0904, 0x489b, 0x90be, 0x0112, 0x0904, 0x489b, 0x90be,
+	0x0113, 0x0904, 0x489b, 0x90be, 0x0114, 0x0904, 0x489b, 0x90be,
+	0x0117, 0x0904, 0x489b, 0x90be, 0x011a, 0x0904, 0x489b, 0x90be,
+	0x011c, 0x0904, 0x489b, 0x90be, 0x0121, 0x0904, 0x4882, 0x90be,
+	0x0131, 0x0904, 0x4882, 0x90be, 0x0171, 0x0904, 0x489b, 0x90be,
+	0x0173, 0x0904, 0x489b, 0x90be, 0x01a1, 0x1128, 0xa894, 0x8007,
+	0xa896, 0x0804, 0x48a6, 0x90be, 0x0212, 0x0904, 0x488f, 0x90be,
+	0x0213, 0x05e8, 0x90be, 0x0214, 0x0500, 0x90be, 0x0217, 0x0188,
+	0x90be, 0x021a, 0x1120, 0xa89c, 0x8007, 0xa89e, 0x04e0, 0x90be,
+	0x021f, 0x05c8, 0x90be, 0x0300, 0x05b0, 0x009e, 0x00de, 0x0804,
+	0x35ed, 0x7028, 0x9080, 0x0010, 0x2098, 0x20a0, 0x7034, 0x20e0,
+	0x20e8, 0x20a9, 0x0007, 0x080c, 0x48e4, 0x7028, 0x9080, 0x000e,
+	0x2098, 0x20a0, 0x7034, 0x20e0, 0x20e8, 0x20a9, 0x0001, 0x080c,
+	0x48e4, 0x00c8, 0x7028, 0x9080, 0x000c, 0x2098, 0x20a0, 0x7034,
+	0x20e0, 0x20e8, 0x20a9, 0x0001, 0x080c, 0x48f1, 0x00b8, 0x7028,
+	0x9080, 0x000e, 0x2098, 0x20a0, 0x7034, 0x20e0, 0x20e8, 0x20a9,
+	0x0001, 0x080c, 0x48f1, 0x7028, 0x9080, 0x000c, 0x2098, 0x20a0,
+	0x7034, 0x20e0, 0x20e8, 0x20a9, 0x0001, 0x04f1, 0x00c6, 0x080c,
+	0x4af2, 0x0550, 0xa868, 0xc0fd, 0xa86a, 0xa867, 0x0119, 0x9006,
+	0xa882, 0xa87f, 0x0020, 0xa88b, 0x0001, 0x810b, 0xa9ae, 0xa8b2,
+	0xaab6, 0xabba, 0xacbe, 0xadc2, 0xa9c6, 0xa8ca, 0x00ce, 0x009e,
+	0x00de, 0xa866, 0xa822, 0xa868, 0xc0fd, 0xa86a, 0xa804, 0x2048,
+	0x080c, 0xcb0c, 0x1120, 0x2009, 0x0003, 0x0804, 0x35ea, 0x7007,
+	0x0003, 0x701f, 0x48db, 0x0005, 0x00ce, 0x009e, 0x00de, 0x2009,
+	0x0002, 0x0804, 0x35ea, 0xa820, 0x9086, 0x8001, 0x1904, 0x35b8,
+	0x2009, 0x0004, 0x0804, 0x35ea, 0x0016, 0x0026, 0x3510, 0x20a9,
+	0x0002, 0x4002, 0x4104, 0x4004, 0x8211, 0x1dc8, 0x002e, 0x001e,
+	0x0005, 0x0016, 0x0026, 0x0036, 0x0046, 0x3520, 0x20a9, 0x0004,
+	0x4002, 0x4304, 0x4204, 0x4104, 0x4004, 0x8421, 0x1db8, 0x004e,
+	0x003e, 0x002e, 0x001e, 0x0005, 0x81ff, 0x0120, 0x2009, 0x0001,
+	0x0804, 0x35ea, 0x60dc, 0xd0ac, 0x1130, 0xd09c, 0x1120, 0x2009,
+	0x0005, 0x0804, 0x35ea, 0x7984, 0x78a8, 0x2040, 0x080c, 0xabe2,
+	0x1120, 0x9182, 0x007f, 0x0a04, 0x35ed, 0x9186, 0x00ff, 0x0904,
+	0x35ed, 0x9182, 0x0800, 0x1a04, 0x35ed, 0x7a8c, 0x7b88, 0x607c,
+	0x9306, 0x1158, 0x6080, 0x924e, 0x0904, 0x35ed, 0x080c, 0xabe2,
+	0x1120, 0x99cc, 0xff00, 0x0904, 0x35ed, 0x0126, 0x2091, 0x8000,
+	0x080c, 0x4a05, 0x0904, 0x4985, 0x0086, 0x90c6, 0x4000, 0x008e,
+	0x1538, 0x00c6, 0x0006, 0x0036, 0xb818, 0xbb1c, 0x9305, 0xbb20,
+	0x9305, 0xbb24, 0x9305, 0xbb28, 0x9305, 0xbb2c, 0x9305, 0xbb30,
+	0x9305, 0xbb34, 0x9305, 0x003e, 0x0570, 0xd88c, 0x1128, 0x080c,
+	0x6add, 0x0110, 0xc89d, 0x0438, 0x900e, 0x080c, 0x6986, 0x1108,
+	0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d, 0x000e, 0x00ce, 0x00b8,
+	0x90c6, 0x4007, 0x1110, 0x2408, 0x0090, 0x90c6, 0x4008, 0x1118,
+	0x2708, 0x2610, 0x0060, 0x90c6, 0x4009, 0x1108, 0x0040, 0x90c6,
+	0x4006, 0x1108, 0x0020, 0x2001, 0x4005, 0x2009, 0x000a, 0x2020,
+	0x012e, 0x0804, 0x35ba, 0x000e, 0x00ce, 0x2b00, 0x7026, 0x0016,
+	0x00b6, 0x00c6, 0x00e6, 0x2c70, 0x080c, 0xad20, 0x0904, 0x49da,
+	0x2b00, 0x6012, 0x080c, 0xce15, 0x2e58, 0x00ee, 0x00e6, 0x00c6,
+	0x080c, 0x4af2, 0x00ce, 0x2b70, 0x1158, 0x080c, 0xacb0, 0x00ee,
+	0x00ce, 0x00be, 0x001e, 0x012e, 0x2009, 0x0002, 0x0804, 0x35ea,
+	0x900e, 0xa966, 0xa96a, 0x2900, 0x6016, 0xa932, 0xa868, 0xc0fd,
+	0xd88c, 0x0108, 0xc0f5, 0xa86a, 0xd89c, 0x1110, 0x080c, 0x3240,
+	0x6023, 0x0001, 0x9006, 0x080c, 0x65cf, 0xd89c, 0x0138, 0x2001,
+	0x0004, 0x080c, 0x65e3, 0x2009, 0x0003, 0x0030, 0x2001, 0x0002,
+	0x080c, 0x65e3, 0x2009, 0x0002, 0x080c, 0xad4d, 0x78a8, 0xd094,
+	0x0138, 0x00ee, 0x7024, 0x00e6, 0x2058, 0xb8d4, 0xc08d, 0xb8d6,
+	0x9085, 0x0001, 0x00ee, 0x00ce, 0x00be, 0x001e, 0x012e, 0x1120,
+	0x2009, 0x0003, 0x0804, 0x35ea, 0x7007, 0x0003, 0x701f, 0x49e9,
+	0x0005, 0xa830, 0x9086, 0x0100, 0x7024, 0x2058, 0x1138, 0x2009,
+	0x0004, 0xba04, 0x9294, 0x00ff, 0x0804, 0x568c, 0x900e, 0xa868,
+	0xd0f4, 0x1904, 0x35b8, 0x080c, 0x6986, 0x1108, 0xc185, 0xb800,
+	0xd0bc, 0x0108, 0xc18d, 0x0804, 0x35b8, 0x00e6, 0x00d6, 0x0096,
+	0x83ff, 0x0904, 0x4a54, 0x902e, 0x080c, 0xabe2, 0x0130, 0x9026,
+	0x20a9, 0x0800, 0x2071, 0x1000, 0x0030, 0x2021, 0x007f, 0x20a9,
+	0x0781, 0x2071, 0x107f, 0x2e04, 0x9005, 0x11b8, 0x2100, 0x9406,
+	0x1904, 0x4a65, 0x2428, 0x94ce, 0x007f, 0x1120, 0x92ce, 0xfffd,
+	0x1558, 0x0030, 0x94ce, 0x0080, 0x1130, 0x92ce, 0xfffc, 0x1520,
+	0x93ce, 0x00ff, 0x1508, 0xc5fd, 0x0480, 0x2058, 0xbf10, 0x2700,
+	0x9306, 0x11e8, 0xbe14, 0x2600, 0x9206, 0x11c8, 0x2400, 0x9106,
+	0x1180, 0xd884, 0x0598, 0xd894, 0x1588, 0x080c, 0x6a7d, 0x1570,
+	0x2001, 0x4000, 0x0460, 0x080c, 0x6add, 0x1540, 0x2001, 0x4000,
+	0x0430, 0x2001, 0x4007, 0x0418, 0x2001, 0x4006, 0x0400, 0x2400,
+	0x9106, 0x1158, 0xbe14, 0x87ff, 0x1128, 0x86ff, 0x0918, 0x080c,
+	0xabe2, 0x1900, 0x2001, 0x4008, 0x0090, 0x8420, 0x8e70, 0x1f04,
+	0x4a1b, 0x85ff, 0x1130, 0x2001, 0x4009, 0x0048, 0x2001, 0x0001,
+	0x0030, 0x080c, 0x6632, 0x1dd0, 0xbb12, 0xba16, 0x9006, 0x9005,
+	0x009e, 0x00de, 0x00ee, 0x0005, 0x81ff, 0x0120, 0x2009, 0x0001,
+	0x0804, 0x35ea, 0x080c, 0x4af2, 0x1120, 0x2009, 0x0002, 0x0804,
+	0x35ea, 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, 0x7884, 0x9005,
+	0x0904, 0x35ed, 0x9096, 0x00ff, 0x0120, 0x9092, 0x0004, 0x1a04,
+	0x35ed, 0x2010, 0x2918, 0x080c, 0x31e0, 0x1120, 0x2009, 0x0003,
+	0x0804, 0x35ea, 0x7007, 0x0003, 0x701f, 0x4aa7, 0x0005, 0xa830,
+	0x9086, 0x0100, 0x1904, 0x35b8, 0x2009, 0x0004, 0x0804, 0x35ea,
+	0x7984, 0x080c, 0xabe2, 0x1120, 0x9182, 0x007f, 0x0a04, 0x35ed,
+	0x9186, 0x00ff, 0x0904, 0x35ed, 0x9182, 0x0800, 0x1a04, 0x35ed,
+	0x2001, 0x9400, 0x080c, 0x56e7, 0x1904, 0x35ea, 0x0804, 0x35b8,
+	0xa998, 0x080c, 0xabe2, 0x1118, 0x9182, 0x007f, 0x0280, 0x9186,
+	0x00ff, 0x0168, 0x9182, 0x0800, 0x1250, 0x2001, 0x9400, 0x080c,
+	0x56e7, 0x11a8, 0x0060, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897,
+	0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x0005, 0xa897,
+	0x4000, 0x900e, 0x9085, 0x0001, 0x2001, 0x0000, 0x0005, 0x2009,
+	0x000a, 0x0c48, 0x080c, 0x1047, 0x0198, 0x9006, 0xa802, 0x7014,
+	0x9005, 0x1120, 0x2900, 0x7016, 0x701a, 0x0040, 0x7018, 0xa802,
+	0x0086, 0x2040, 0x2900, 0xa006, 0x701a, 0x008e, 0x9085, 0x0001,
+	0x0005, 0x7984, 0x080c, 0x6693, 0x1130, 0x7e88, 0x9684, 0x3fff,
+	0x9082, 0x4000, 0x0208, 0x905e, 0x8bff, 0x0005, 0xa998, 0x080c,
+	0x6693, 0x1130, 0xae9c, 0x9684, 0x3fff, 0x9082, 0x4000, 0x0208,
+	0x905e, 0x8bff, 0x0005, 0xae98, 0x0008, 0x7e84, 0x2608, 0x080c,
+	0x6693, 0x1108, 0x0008, 0x905e, 0x8bff, 0x0005, 0x0016, 0x7114,
+	0x81ff, 0x0128, 0x2148, 0xa904, 0x080c, 0x1079, 0x0cc8, 0x7116,
+	0x711a, 0x001e, 0x0005, 0x2031, 0x0001, 0x0010, 0x2031, 0x0000,
+	0x2061, 0x18b8, 0x2c44, 0xa66a, 0xa17a, 0xa772, 0xa076, 0xa28e,
+	0xa392, 0xa496, 0xa59a, 0x080c, 0x113c, 0x7007, 0x0002, 0x701f,
+	0x35b8, 0x0005, 0x00f6, 0x0126, 0x2091, 0x8000, 0x2079, 0x0000,
+	0x2001, 0x18b0, 0x2004, 0x9005, 0x1190, 0x0e04, 0x4b6f, 0x7a36,
+	0x7833, 0x0012, 0x7a82, 0x7b86, 0x7c8a, 0x2091, 0x4080, 0x2001,
+	0x0089, 0x2004, 0xd084, 0x190c, 0x11ee, 0x0804, 0x4bd5, 0x0016,
+	0x0086, 0x0096, 0x00c6, 0x00e6, 0x2071, 0x189e, 0x7044, 0x9005,
+	0x1540, 0x7148, 0x9182, 0x0010, 0x0288, 0x7038, 0x2060, 0x080c,
+	0x1047, 0x0904, 0x4bcd, 0xa84b, 0x0000, 0x2900, 0x7046, 0x2001,
+	0x0002, 0x9080, 0x1eab, 0x2005, 0xa846, 0x0098, 0x7038, 0x90e0,
+	0x0004, 0x2001, 0x18ba, 0x9c82, 0x18fa, 0x0210, 0x2061, 0x18ba,
+	0x2c00, 0x703a, 0x7148, 0x81ff, 0x1108, 0x703e, 0x8108, 0x714a,
+	0x0460, 0x7148, 0x8108, 0x714a, 0x7044, 0x2040, 0xa144, 0x2105,
+	0x0016, 0x908a, 0x0036, 0x1a0c, 0x0d7d, 0x2060, 0x001e, 0x8108,
+	0x2105, 0x9005, 0xa146, 0x1520, 0x080c, 0x1047, 0x1130, 0x8109,
+	0xa946, 0x7148, 0x8109, 0x714a, 0x00d8, 0x9006, 0xa806, 0xa84a,
+	0xa046, 0x2800, 0xa802, 0x2900, 0xa006, 0x7046, 0x2001, 0x0002,
+	0x9080, 0x1eab, 0x2005, 0xa846, 0x0058, 0x2262, 0x6306, 0x640a,
+	0x00ee, 0x00ce, 0x009e, 0x008e, 0x001e, 0x012e, 0x00fe, 0x0005,
+	0x2c00, 0x9082, 0x001b, 0x0002, 0x4bf7, 0x4bf7, 0x4bf9, 0x4bf7,
+	0x4bf7, 0x4bf7, 0x4bfd, 0x4bf7, 0x4bf7, 0x4bf7, 0x4c01, 0x4bf7,
+	0x4bf7, 0x4bf7, 0x4c05, 0x4bf7, 0x4bf7, 0x4bf7, 0x4c09, 0x4bf7,
+	0x4bf7, 0x4bf7, 0x4c0d, 0x4bf7, 0x4bf7, 0x4bf7, 0x4c12, 0x080c,
+	0x0d7d, 0xa276, 0xa37a, 0xa47e, 0x0898, 0xa286, 0xa38a, 0xa48e,
+	0x0878, 0xa296, 0xa39a, 0xa49e, 0x0858, 0xa2a6, 0xa3aa, 0xa4ae,
+	0x0838, 0xa2b6, 0xa3ba, 0xa4be, 0x0818, 0xa2c6, 0xa3ca, 0xa4ce,
+	0x0804, 0x4bd0, 0xa2d6, 0xa3da, 0xa4de, 0x0804, 0x4bd0, 0x00e6,
+	0x2071, 0x189e, 0x7048, 0x9005, 0x0904, 0x4ca9, 0x0126, 0x2091,
+	0x8000, 0x0e04, 0x4ca8, 0x00f6, 0x2079, 0x0000, 0x00c6, 0x0096,
+	0x0086, 0x0076, 0x9006, 0x2038, 0x7040, 0x2048, 0x9005, 0x0500,
+	0xa948, 0x2105, 0x0016, 0x908a, 0x0036, 0x1a0c, 0x0d7d, 0x2060,
+	0x001e, 0x8108, 0x2105, 0x9005, 0xa94a, 0x1904, 0x4cab, 0xa804,
+	0x9005, 0x090c, 0x0d7d, 0x7042, 0x2938, 0x2040, 0xa003, 0x0000,
+	0x2001, 0x0002, 0x9080, 0x1eab, 0x2005, 0xa04a, 0x0804, 0x4cab,
+	0x703c, 0x2060, 0x2c14, 0x6304, 0x6408, 0x650c, 0x2200, 0x7836,
+	0x7833, 0x0012, 0x7882, 0x2300, 0x7886, 0x2400, 0x788a, 0x2091,
+	0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11ee, 0x87ff,
+	0x0118, 0x2748, 0x080c, 0x1079, 0x7048, 0x8001, 0x704a, 0x9005,
+	0x1170, 0x7040, 0x2048, 0x9005, 0x0128, 0x080c, 0x1079, 0x9006,
+	0x7042, 0x7046, 0x703b, 0x18ba, 0x703f, 0x18ba, 0x0420, 0x7040,
+	0x9005, 0x1508, 0x7238, 0x2c00, 0x9206, 0x0148, 0x9c80, 0x0004,
+	0x90fa, 0x18fa, 0x0210, 0x2001, 0x18ba, 0x703e, 0x00a0, 0x9006,
+	0x703e, 0x703a, 0x7044, 0x9005, 0x090c, 0x0d7d, 0x2048, 0xa800,
+	0x9005, 0x1de0, 0x2900, 0x7042, 0x2001, 0x0002, 0x9080, 0x1eab,
+	0x2005, 0xa84a, 0x0000, 0x007e, 0x008e, 0x009e, 0x00ce, 0x00fe,
+	0x012e, 0x00ee, 0x0005, 0x2c00, 0x9082, 0x001b, 0x0002, 0x4cca,
+	0x4cca, 0x4ccc, 0x4cca, 0x4cca, 0x4cca, 0x4cd1, 0x4cca, 0x4cca,
+	0x4cca, 0x4cd6, 0x4cca, 0x4cca, 0x4cca, 0x4cdb, 0x4cca, 0x4cca,
+	0x4cca, 0x4ce0, 0x4cca, 0x4cca, 0x4cca, 0x4ce5, 0x4cca, 0x4cca,
+	0x4cca, 0x4cea, 0x080c, 0x0d7d, 0xaa74, 0xab78, 0xac7c, 0x0804,
+	0x4c56, 0xaa84, 0xab88, 0xac8c, 0x0804, 0x4c56, 0xaa94, 0xab98,
+	0xac9c, 0x0804, 0x4c56, 0xaaa4, 0xaba8, 0xacac, 0x0804, 0x4c56,
+	0xaab4, 0xabb8, 0xacbc, 0x0804, 0x4c56, 0xaac4, 0xabc8, 0xaccc,
+	0x0804, 0x4c56, 0xaad4, 0xabd8, 0xacdc, 0x0804, 0x4c56, 0x0016,
+	0x0026, 0x0036, 0x00b6, 0x00c6, 0x2009, 0x007e, 0x080c, 0x6693,
+	0x2019, 0x0001, 0xb85c, 0xd0ac, 0x0110, 0x2019, 0x0000, 0x2011,
+	0x801b, 0x080c, 0x4b52, 0x00ce, 0x00be, 0x003e, 0x002e, 0x001e,
+	0x0005, 0x0026, 0x080c, 0x573e, 0xd0c4, 0x0120, 0x2011, 0x8014,
+	0x080c, 0x4b52, 0x002e, 0x0005, 0x81ff, 0x1904, 0x35ea, 0x0126,
+	0x2091, 0x8000, 0x6030, 0xc08d, 0xc085, 0xc0ac, 0x6032, 0x080c,
+	0x753d, 0x1158, 0x080c, 0x7840, 0x080c, 0x6092, 0x9085, 0x0001,
+	0x080c, 0x7584, 0x080c, 0x746e, 0x0010, 0x080c, 0x5f4d, 0x012e,
+	0x0804, 0x35b8, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x35ea,
+	0x080c, 0x5752, 0x0120, 0x2009, 0x0007, 0x0804, 0x35ea, 0x080c,
+	0x6ad5, 0x0120, 0x2009, 0x0008, 0x0804, 0x35ea, 0x7984, 0x080c,
+	0x6632, 0x1904, 0x35ed, 0x080c, 0x4b25, 0x0904, 0x35ed, 0x2b00,
+	0x7026, 0x080c, 0x6add, 0x7888, 0x1170, 0x9084, 0x0005, 0x1158,
+	0x900e, 0x080c, 0x6986, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108,
+	0xc18d, 0x0804, 0x35b8, 0x080c, 0x4af2, 0x0904, 0x35ea, 0x9006,
+	0xa866, 0xa832, 0xa868, 0xc0fd, 0xa86a, 0x080c, 0xcbb3, 0x0904,
+	0x35ea, 0x7888, 0xd094, 0x0118, 0xb8d4, 0xc08d, 0xb8d6, 0x7007,
+	0x0003, 0x701f, 0x4dc5, 0x0005, 0x2061, 0x1800, 0x080c, 0x5752,
+	0x2009, 0x0007, 0x1560, 0x080c, 0x6ad5, 0x0118, 0x2009, 0x0008,
+	0x0430, 0xa998, 0x080c, 0x6632, 0x1530, 0x080c, 0x4b23, 0x0518,
+	0x080c, 0x6add, 0xa89c, 0x1168, 0x9084, 0x0005, 0x1150, 0x900e,
+	0x080c, 0x6986, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d,
+	0x00d0, 0xa868, 0xc0fc, 0xa86a, 0x080c, 0xcbb3, 0x11e0, 0xa89c,
+	0xd094, 0x0118, 0xb8d4, 0xc08d, 0xb8d6, 0x2009, 0x0003, 0xa897,
+	0x4005, 0xa99a, 0x0010, 0xa897, 0x4006, 0x900e, 0x9085, 0x0001,
+	0x2001, 0x0030, 0x0005, 0xa897, 0x4000, 0xa99a, 0x9006, 0x918d,
+	0x0001, 0x2008, 0x0005, 0x9006, 0x0005, 0xa830, 0x9086, 0x0100,
+	0x7024, 0x2058, 0x1110, 0x0804, 0x568c, 0x900e, 0x080c, 0x6986,
+	0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d, 0x0804, 0x35b8,
+	0x080c, 0x5752, 0x0120, 0x2009, 0x0007, 0x0804, 0x35ea, 0x7f84,
+	0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x080c, 0x4af2, 0x1120, 0x2009,
+	0x0002, 0x0804, 0x35ea, 0x900e, 0x2130, 0x7126, 0x7132, 0xa860,
+	0x20e8, 0x7036, 0xa85c, 0x9080, 0x0005, 0x702a, 0x20a0, 0x080c,
+	0x6693, 0x1904, 0x4e67, 0x080c, 0x6add, 0x0138, 0x080c, 0x6ae5,
+	0x0120, 0x080c, 0x6a7d, 0x1904, 0x4e67, 0xd794, 0x1110, 0xd784,
+	0x01a8, 0xb8c4, 0x20e0, 0xb8c8, 0x9080, 0x0006, 0x2098, 0x3400,
+	0xd794, 0x0160, 0x20a9, 0x0008, 0x4003, 0x2098, 0x20a0, 0x3d00,
+	0x20e0, 0x20a9, 0x0002, 0x080c, 0x48f1, 0x0048, 0x20a9, 0x0004,
+	0x4003, 0x2098, 0x20a0, 0x3d00, 0x20e0, 0x080c, 0x48f1, 0x9186,
+	0x007e, 0x0170, 0x9186, 0x0080, 0x0158, 0x080c, 0x6add, 0x90c2,
+	0x0006, 0x1210, 0xc1fd, 0x0020, 0x080c, 0x6986, 0x1108, 0xc1fd,
+	0x4104, 0xc1fc, 0xd794, 0x0528, 0xb8c4, 0x20e0, 0xb8c8, 0x2060,
+	0x9c80, 0x0000, 0x2098, 0x20a9, 0x0002, 0x4003, 0x9c80, 0x0003,
+	0x2098, 0x20a9, 0x0001, 0x4005, 0x9c80, 0x0004, 0x2098, 0x3400,
+	0x20a9, 0x0002, 0x4003, 0x2098, 0x20a0, 0x3d00, 0x20e0, 0x080c,
+	0x48e4, 0x9c80, 0x0026, 0x2098, 0xb8c4, 0x20e0, 0x20a9, 0x0002,
+	0x4003, 0xd794, 0x0110, 0x96b0, 0x000b, 0x96b0, 0x0005, 0x8108,
+	0x080c, 0xabe2, 0x0118, 0x9186, 0x0800, 0x0040, 0xd78c, 0x0120,
+	0x9186, 0x0800, 0x0170, 0x0018, 0x9186, 0x007e, 0x0150, 0xd794,
+	0x0118, 0x9686, 0x0020, 0x0010, 0x9686, 0x0028, 0x0150, 0x0804,
+	0x4df7, 0x86ff, 0x1120, 0x7124, 0x810b, 0x0804, 0x35b8, 0x7033,
+	0x0001, 0x7122, 0x7024, 0x9600, 0x7026, 0x772e, 0x2061, 0x18b8,
+	0x2c44, 0xa06b, 0x0000, 0xa67a, 0x7034, 0xa072, 0x7028, 0xa076,
+	0xa28e, 0xa392, 0xa496, 0xa59a, 0x080c, 0x113c, 0x7007, 0x0002,
+	0x701f, 0x4ea3, 0x0005, 0x7030, 0x9005, 0x1180, 0x7120, 0x7028,
+	0x20a0, 0x772c, 0x9036, 0x7034, 0x20e8, 0x2061, 0x18b8, 0x2c44,
+	0xa28c, 0xa390, 0xa494, 0xa598, 0x0804, 0x4df7, 0x7124, 0x810b,
+	0x0804, 0x35b8, 0x2029, 0x007e, 0x7984, 0x7a88, 0x7b8c, 0x7c98,
+	0x9184, 0xff00, 0x8007, 0x90e2, 0x0020, 0x0a04, 0x35ed, 0x9502,
+	0x0a04, 0x35ed, 0x9184, 0x00ff, 0x90e2, 0x0020, 0x0a04, 0x35ed,
+	0x9502, 0x0a04, 0x35ed, 0x9284, 0xff00, 0x8007, 0x90e2, 0x0020,
+	0x0a04, 0x35ed, 0x9502, 0x0a04, 0x35ed, 0x9284, 0x00ff, 0x90e2,
+	0x0020, 0x0a04, 0x35ed, 0x9502, 0x0a04, 0x35ed, 0x9384, 0xff00,
+	0x8007, 0x90e2, 0x0020, 0x0a04, 0x35ed, 0x9502, 0x0a04, 0x35ed,
+	0x9384, 0x00ff, 0x90e2, 0x0020, 0x0a04, 0x35ed, 0x9502, 0x0a04,
+	0x35ed, 0x9484, 0xff00, 0x8007, 0x90e2, 0x0020, 0x0a04, 0x35ed,
+	0x9502, 0x0a04, 0x35ed, 0x9484, 0x00ff, 0x90e2, 0x0020, 0x0a04,
+	0x35ed, 0x9502, 0x0a04, 0x35ed, 0x2061, 0x1988, 0x6102, 0x6206,
+	0x630a, 0x640e, 0x0804, 0x35b8, 0x080c, 0x4af2, 0x0904, 0x35ea,
+	0x2009, 0x0016, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0xa85c, 0x9080,
+	0x0019, 0xaf60, 0x080c, 0x4b3b, 0x701f, 0x4f27, 0x0005, 0x2001,
+	0x0138, 0x2003, 0x0000, 0x00e6, 0x2071, 0x0300, 0x701c, 0xd0a4,
+	0x1de8, 0x00ee, 0x20a9, 0x0016, 0x896e, 0x8d6e, 0x8d6f, 0x9d84,
+	0xffc0, 0x9080, 0x0019, 0x2098, 0x9d84, 0x003f, 0x20e0, 0x2069,
+	0x1877, 0x20e9, 0x0001, 0x2da0, 0x4003, 0x6800, 0x9005, 0x0904,
+	0x4fa8, 0x6804, 0x2008, 0x918c, 0xfff8, 0x1904, 0x4fa8, 0x680c,
+	0x9005, 0x0904, 0x4fa8, 0x9082, 0xff01, 0x1a04, 0x4fa8, 0x6810,
+	0x9082, 0x005c, 0x0a04, 0x4fa8, 0x6824, 0x2008, 0x9082, 0x0008,
+	0x0a04, 0x4fa8, 0x9182, 0x0400, 0x1a04, 0x4fa8, 0x0056, 0x2029,
+	0x0000, 0x080c, 0x8da1, 0x005e, 0x6944, 0x6820, 0x9102, 0x06c0,
+	0x6820, 0x9082, 0x0019, 0x16a0, 0x6828, 0x6944, 0x810c, 0x9102,
+	0x0678, 0x6840, 0x9082, 0x000f, 0x1658, 0x080c, 0x1060, 0x2900,
+	0x0904, 0x4fc4, 0x684e, 0x00e6, 0x2071, 0x1930, 0x00b6, 0x2059,
+	0x0000, 0x080c, 0x8c5d, 0x00be, 0x00ee, 0x0568, 0x080c, 0x89ad,
+	0x080c, 0x89f8, 0x11e0, 0x6857, 0x0000, 0x00c6, 0x2061, 0x0100,
+	0x6104, 0x918d, 0x2000, 0x6106, 0x6b10, 0x2061, 0x1a6a, 0x630a,
+	0x00ce, 0x080c, 0x2779, 0x2001, 0x0138, 0x2102, 0x0804, 0x35b8,
+	0x080c, 0x2779, 0x2001, 0x0138, 0x2102, 0x0804, 0x35ed, 0x080c,
+	0x89f1, 0x00e6, 0x2071, 0x1930, 0x080c, 0x8e21, 0x080c, 0x8e30,
+	0x080c, 0x8c44, 0x00ee, 0x2001, 0x188a, 0x204c, 0x080c, 0x1079,
+	0x2001, 0x188a, 0x2003, 0x0000, 0x080c, 0x2779, 0x2001, 0x0138,
+	0x2102, 0x0804, 0x35ea, 0x2001, 0x1924, 0x200c, 0x918e, 0x0000,
+	0x0904, 0x5025, 0x080c, 0x8c3f, 0x0904, 0x5025, 0x2001, 0x0101,
+	0x200c, 0x918c, 0xdfff, 0x2102, 0x2001, 0x0138, 0x2003, 0x0000,
+	0x00e6, 0x2071, 0x0300, 0x701c, 0xd0a4, 0x1de8, 0x00ee, 0x080c,
+	0x8c44, 0x2001, 0x0035, 0x080c, 0x16a0, 0x00c6, 0x2061, 0x193c,
+	0x6004, 0x6100, 0x9106, 0x1de0, 0x00ce, 0x080c, 0x2779, 0x2001,
+	0x0138, 0x2102, 0x00e6, 0x00f6, 0x2071, 0x1923, 0x080c, 0x8b7e,
+	0x0120, 0x2f00, 0x080c, 0x8c0a, 0x0cc8, 0x00fe, 0x00ee, 0x0126,
+	0x2091, 0x8000, 0x2001, 0x188a, 0x200c, 0x81ff, 0x0138, 0x2148,
+	0x080c, 0x1079, 0x2001, 0x188a, 0x2003, 0x0000, 0x2001, 0x183d,
+	0x2003, 0x0020, 0x080c, 0x89f1, 0x00e6, 0x2071, 0x1930, 0x080c,
+	0x8e21, 0x080c, 0x8e30, 0x00ee, 0x012e, 0x0804, 0x35b8, 0x0006,
+	0x080c, 0x573e, 0xd0cc, 0x000e, 0x0005, 0x0006, 0x080c, 0x5742,
+	0xd0bc, 0x000e, 0x0005, 0x6174, 0x7a84, 0x6300, 0x82ff, 0x1118,
+	0x7986, 0x0804, 0x35b8, 0x83ff, 0x1904, 0x35ed, 0x2001, 0xfff0,
+	0x9200, 0x1a04, 0x35ed, 0x2019, 0xffff, 0x6078, 0x9302, 0x9200,
+	0x0a04, 0x35ed, 0x7986, 0x6276, 0x0804, 0x35b8, 0x080c, 0x5752,
+	0x1904, 0x35ea, 0x7c88, 0x7d84, 0x7e98, 0x7f8c, 0x080c, 0x4af2,
+	0x0904, 0x35ea, 0x900e, 0x901e, 0x7326, 0x7332, 0xa860, 0x20e8,
+	0x7036, 0xa85c, 0x9080, 0x0003, 0x702a, 0x20a0, 0x91d8, 0x1000,
+	0x2b5c, 0x8bff, 0x0178, 0x080c, 0x6add, 0x0118, 0x080c, 0x6ae5,
+	0x1148, 0x20a9, 0x0001, 0xb814, 0x4004, 0xb810, 0x4004, 0x4104,
+	0x9398, 0x0003, 0x8108, 0x9182, 0x0800, 0x0120, 0x9386, 0x003c,
+	0x0170, 0x0c20, 0x83ff, 0x1148, 0x7224, 0x900e, 0x2001, 0x0003,
+	0x080c, 0x91f8, 0x2208, 0x0804, 0x35b8, 0x7033, 0x0001, 0x7122,
+	0x7024, 0x9300, 0x7026, 0x2061, 0x18b8, 0x2c44, 0xa06b, 0x0000,
+	0xa37a, 0x7028, 0xa076, 0x7034, 0xa072, 0xa48e, 0xa592, 0xa696,
+	0xa79a, 0x080c, 0x113c, 0x7007, 0x0002, 0x701f, 0x50a8, 0x0005,
+	0x7030, 0x9005, 0x1178, 0x7120, 0x7028, 0x20a0, 0x901e, 0x7034,
+	0x20e8, 0x2061, 0x18b8, 0x2c44, 0xa48c, 0xa590, 0xa694, 0xa798,
+	0x0804, 0x5066, 0x7224, 0x900e, 0x2001, 0x0003, 0x080c, 0x91f8,
+	0x2208, 0x0804, 0x35b8, 0x00f6, 0x00e6, 0x080c, 0x5752, 0x2009,
+	0x0007, 0x1904, 0x513b, 0x2071, 0x189e, 0x745c, 0x84ff, 0x2009,
+	0x000e, 0x1904, 0x513b, 0xac9c, 0xad98, 0xaea4, 0xafa0, 0x0096,
+	0x080c, 0x1060, 0x2009, 0x0002, 0x0904, 0x513b, 0x2900, 0x705e,
+	0x900e, 0x901e, 0x7356, 0x7362, 0xa860, 0x7066, 0xa85c, 0x9080,
+	0x0003, 0x705a, 0x20a0, 0x91d8, 0x1000, 0x2b5c, 0x8bff, 0x0178,
+	0x080c, 0x6add, 0x0118, 0x080c, 0x6ae5, 0x1148, 0xb814, 0x20a9,
+	0x0001, 0x4004, 0xb810, 0x4004, 0x4104, 0x9398, 0x0003, 0x8108,
+	0x9182, 0x0800, 0x0120, 0x9386, 0x003c, 0x01e8, 0x0c20, 0x83ff,
+	0x11c0, 0x7254, 0x900e, 0x2001, 0x0003, 0x080c, 0x91f8, 0x2208,
+	0x009e, 0xa897, 0x4000, 0xa99a, 0x715c, 0x81ff, 0x090c, 0x0d7d,
+	0x2148, 0x080c, 0x1079, 0x9006, 0x705e, 0x918d, 0x0001, 0x2008,
+	0x0418, 0x7063, 0x0001, 0x7152, 0x7054, 0x9300, 0x7056, 0x2061,
+	0x18b9, 0x2c44, 0xa37a, 0x7058, 0xa076, 0x7064, 0xa072, 0xa48e,
+	0xa592, 0xa696, 0xa79a, 0xa09f, 0x5147, 0x000e, 0xa0a2, 0x080c,
+	0x113c, 0x9006, 0x0048, 0x009e, 0xa897, 0x4005, 0xa99a, 0x900e,
+	0x9085, 0x0001, 0x2001, 0x0030, 0x00ee, 0x00fe, 0x0005, 0x00f6,
+	0xa0a0, 0x904d, 0x090c, 0x0d7d, 0x00e6, 0x2071, 0x189e, 0xa06c,
+	0x908e, 0x0100, 0x0138, 0xa87b, 0x0030, 0xa883, 0x0000, 0xa897,
+	0x4002, 0x00d8, 0x7060, 0x9005, 0x1158, 0x7150, 0x7058, 0x20a0,
+	0x901e, 0x7064, 0x20e8, 0xa48c, 0xa590, 0xa694, 0xa798, 0x0428,
+	0xa87b, 0x0000, 0xa883, 0x0000, 0xa897, 0x4000, 0x7254, 0x900e,
+	0x2001, 0x0003, 0x080c, 0x91f8, 0xaa9a, 0x715c, 0x81ff, 0x090c,
+	0x0d7d, 0x2148, 0x080c, 0x1079, 0x705f, 0x0000, 0xa0a0, 0x2048,
+	0x0126, 0x2091, 0x8000, 0x080c, 0x6dee, 0x012e, 0xa09f, 0x0000,
+	0xa0a3, 0x0000, 0x00ee, 0x00fe, 0x0005, 0x91d8, 0x1000, 0x2b5c,
+	0x8bff, 0x0178, 0x080c, 0x6add, 0x0118, 0x080c, 0x6ae5, 0x1148,
+	0xb814, 0x20a9, 0x0001, 0x4004, 0xb810, 0x4004, 0x4104, 0x9398,
+	0x0003, 0x8108, 0x9182, 0x0800, 0x0120, 0x9386, 0x003c, 0x0518,
+	0x0c20, 0x83ff, 0x11f0, 0x7154, 0x810c, 0xa99a, 0xa897, 0x4000,
+	0x715c, 0x81ff, 0x090c, 0x0d7d, 0x2148, 0x080c, 0x1079, 0x9006,
+	0x705e, 0x918d, 0x0001, 0x2008, 0xa0a0, 0x2048, 0x0126, 0x2091,
+	0x8000, 0x080c, 0x6dee, 0x012e, 0xa09f, 0x0000, 0xa0a3, 0x0000,
+	0x0070, 0x7063, 0x0001, 0x7152, 0x7054, 0x9300, 0x7056, 0xa37a,
+	0xa48e, 0xa592, 0xa696, 0xa79a, 0x080c, 0x113c, 0x9006, 0x00ee,
+	0x0005, 0x0096, 0xa88c, 0x90be, 0x7000, 0x0148, 0x90be, 0x7100,
+	0x0130, 0x90be, 0x7200, 0x0118, 0x009e, 0x0804, 0x35ed, 0xa884,
+	0xa988, 0x080c, 0x2661, 0x1518, 0x080c, 0x6632, 0x1500, 0x7126,
+	0xbe12, 0xbd16, 0xae7c, 0x080c, 0x4af2, 0x01c8, 0x080c, 0x4af2,
+	0x01b0, 0x009e, 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, 0xa823,
+	0x0000, 0xa804, 0x2048, 0x080c, 0xcb2c, 0x1120, 0x2009, 0x0003,
+	0x0804, 0x35ea, 0x7007, 0x0003, 0x701f, 0x5214, 0x0005, 0x009e,
+	0x2009, 0x0002, 0x0804, 0x35ea, 0x7124, 0x080c, 0x3349, 0xa820,
+	0x9086, 0x8001, 0x1120, 0x2009, 0x0004, 0x0804, 0x35ea, 0x2900,
+	0x7022, 0xa804, 0x0096, 0x2048, 0x8906, 0x8006, 0x8007, 0x90bc,
+	0x003f, 0x9084, 0xffc0, 0x009e, 0x9080, 0x0002, 0x0076, 0x0006,
+	0x2098, 0x20a0, 0x27e0, 0x27e8, 0x20a9, 0x002a, 0x080c, 0x0fc4,
+	0xaa6c, 0xab70, 0xac74, 0xad78, 0x2061, 0x18b8, 0x2c44, 0xa06b,
+	0x0000, 0xae64, 0xaf8c, 0x97c6, 0x7000, 0x0118, 0x97c6, 0x7100,
+	0x1148, 0x96c2, 0x0004, 0x0600, 0x2009, 0x0004, 0x000e, 0x007e,
+	0x0804, 0x4b3e, 0x97c6, 0x7200, 0x11b8, 0x96c2, 0x0054, 0x02a0,
+	0x000e, 0x007e, 0x2061, 0x18b8, 0x2c44, 0xa076, 0xa772, 0xa07b,
+	0x002a, 0xa28e, 0xa392, 0xa496, 0xa59a, 0x080c, 0x113c, 0x7007,
+	0x0002, 0x701f, 0x5270, 0x0005, 0x000e, 0x007e, 0x0804, 0x35ed,
+	0x7020, 0x2048, 0xa804, 0x2048, 0xa804, 0x2048, 0x8906, 0x8006,
+	0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0002, 0x2098,
+	0x20a0, 0x27e0, 0x27e8, 0x20a9, 0x002a, 0x080c, 0x0fc4, 0x2100,
+	0x2238, 0x2061, 0x18b8, 0x2c44, 0xa28c, 0xa390, 0xa494, 0xa598,
+	0x2009, 0x002a, 0x0804, 0x4b3e, 0x81ff, 0x1904, 0x35ea, 0x798c,
+	0x2001, 0x197d, 0x918c, 0x8000, 0x2102, 0x080c, 0x4b09, 0x0904,
+	0x35ed, 0x080c, 0x6add, 0x0120, 0x080c, 0x6ae5, 0x1904, 0x35ed,
+	0x080c, 0x675a, 0x0904, 0x35ea, 0x0126, 0x2091, 0x8000, 0x080c,
+	0x68f3, 0x012e, 0x0904, 0x35ea, 0x2001, 0x197d, 0x2004, 0xd0fc,
+	0x1904, 0x35b8, 0x0804, 0x458e, 0xa9a0, 0x2001, 0x197d, 0x918c,
+	0x8000, 0xc18d, 0x2102, 0x080c, 0x4b16, 0x01a0, 0x080c, 0x6add,
+	0x0118, 0x080c, 0x6ae5, 0x1170, 0x080c, 0x675a, 0x2009, 0x0002,
+	0x0128, 0x080c, 0x68f3, 0x1170, 0x2009, 0x0003, 0xa897, 0x4005,
+	0xa99a, 0x0010, 0xa897, 0x4006, 0x900e, 0x9085, 0x0001, 0x2001,
+	0x0030, 0x0005, 0xa897, 0x4000, 0x2001, 0x197d, 0x2004, 0xd0fc,
+	0x1128, 0x080c, 0x5746, 0x0110, 0x9006, 0x0018, 0x900e, 0x9085,
+	0x0001, 0x2001, 0x0000, 0x0005, 0x78a8, 0xd08c, 0x1118, 0xd084,
+	0x0904, 0x4503, 0x080c, 0x4b25, 0x0904, 0x35ed, 0x080c, 0x4af2,
+	0x1120, 0x2009, 0x0002, 0x0804, 0x35ea, 0x080c, 0x6add, 0x0130,
+	0x908e, 0x0004, 0x0118, 0x908e, 0x0005, 0x15a0, 0x78a8, 0xd08c,
+	0x0120, 0xb800, 0xc08c, 0xb802, 0x0028, 0x080c, 0x573e, 0xd0b4,
+	0x0904, 0x453d, 0x7884, 0x908e, 0x007e, 0x0904, 0x453d, 0x908e,
+	0x007f, 0x0904, 0x453d, 0x908e, 0x0080, 0x0904, 0x453d, 0xb800,
+	0xd08c, 0x1904, 0x453d, 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a,
+	0x080c, 0xcb4b, 0x1120, 0x2009, 0x0003, 0x0804, 0x35ea, 0x7007,
+	0x0003, 0x701f, 0x533c, 0x0005, 0x080c, 0x4b25, 0x0904, 0x35ed,
+	0x0804, 0x453d, 0x080c, 0x33a8, 0x0108, 0x0005, 0x2009, 0x1834,
+	0x210c, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x35ea, 0x080c,
+	0x5752, 0x0120, 0x2009, 0x0007, 0x0804, 0x35ea, 0x080c, 0x6ad5,
+	0x0120, 0x2009, 0x0008, 0x0804, 0x35ea, 0xb89c, 0xd0a4, 0x1118,
+	0xd0ac, 0x1904, 0x453d, 0x9006, 0xa866, 0xa832, 0xa868, 0xc0fd,
+	0xa86a, 0x080c, 0xcbb3, 0x1120, 0x2009, 0x0003, 0x0804, 0x35ea,
+	0x7007, 0x0003, 0x701f, 0x5375, 0x0005, 0xa830, 0x9086, 0x0100,
+	0x1120, 0x2009, 0x0004, 0x0804, 0x568c, 0x080c, 0x4b25, 0x0904,
+	0x35ed, 0x0804, 0x530e, 0x81ff, 0x2009, 0x0001, 0x1904, 0x35ea,
+	0x080c, 0x5752, 0x2009, 0x0007, 0x1904, 0x35ea, 0x080c, 0x6ad5,
+	0x0120, 0x2009, 0x0008, 0x0804, 0x35ea, 0x080c, 0x4b25, 0x0904,
+	0x35ed, 0x080c, 0x6add, 0x2009, 0x0009, 0x1904, 0x35ea, 0x080c,
+	0x4af2, 0x2009, 0x0002, 0x0904, 0x35ea, 0x9006, 0xa866, 0xa832,
+	0xa868, 0xc0fd, 0xa86a, 0x7988, 0x9194, 0xff00, 0x918c, 0x00ff,
+	0x9006, 0x82ff, 0x1128, 0xc0ed, 0xa952, 0x798c, 0xa956, 0x0038,
+	0x928e, 0x0100, 0x1904, 0x35ed, 0xc0e5, 0xa952, 0xa956, 0xa83e,
+	0x080c, 0xce16, 0x2009, 0x0003, 0x0904, 0x35ea, 0x7007, 0x0003,
+	0x701f, 0x53cb, 0x0005, 0xa830, 0x9086, 0x0100, 0x2009, 0x0004,
+	0x0904, 0x35ea, 0x0804, 0x35b8, 0x7aa8, 0x9284, 0xc000, 0x0148,
+	0xd2ec, 0x01a0, 0x080c, 0x5752, 0x1188, 0x2009, 0x0014, 0x0804,
+	0x35ea, 0xd2dc, 0x1578, 0x81ff, 0x2009, 0x0001, 0x1904, 0x35ea,
+	0x080c, 0x5752, 0x2009, 0x0007, 0x1904, 0x35ea, 0xd2f4, 0x0138,
+	0x9284, 0x5000, 0xc0d5, 0x080c, 0x5718, 0x0804, 0x35b8, 0xd2fc,
+	0x0160, 0x080c, 0x4b25, 0x0904, 0x35ed, 0x7984, 0x9284, 0x9000,
+	0xc0d5, 0x080c, 0x56e7, 0x0804, 0x35b8, 0x080c, 0x4b25, 0x0904,
+	0x35ed, 0xb804, 0x9084, 0x00ff, 0x9086, 0x0006, 0x2009, 0x0009,
+	0x1904, 0x54ba, 0x080c, 0x4af2, 0x2009, 0x0002, 0x0904, 0x54ba,
 	0xa85c, 0x9080, 0x001b, 0xaf60, 0x2009, 0x0008, 0x7a8c, 0x7b88,
-	0x7c9c, 0x7d98, 0x080c, 0x4b12, 0x701f, 0x53f7, 0x0005, 0xa86c,
+	0x7c9c, 0x7d98, 0x080c, 0x4b3b, 0x701f, 0x5427, 0x0005, 0xa86c,
 	0x9086, 0x0500, 0x1138, 0xa870, 0x9005, 0x1120, 0xa874, 0x9084,
-	0xff00, 0x0110, 0x1904, 0x35bc, 0xa866, 0xa832, 0xa868, 0xc0fd,
-	0xa86a, 0x080c, 0x4afc, 0x1110, 0x0804, 0x35bc, 0x2009, 0x0043,
-	0x080c, 0xcd67, 0x2009, 0x0003, 0x0904, 0x5486, 0x7007, 0x0003,
-	0x701f, 0x541b, 0x0005, 0xa830, 0x9086, 0x0100, 0x2009, 0x0004,
-	0x0904, 0x5486, 0x7984, 0x7aa8, 0x9284, 0x1000, 0x080c, 0x56ad,
-	0x0804, 0x3587, 0x00c6, 0xaab0, 0x9284, 0xc000, 0x0140, 0xd2ec,
-	0x0168, 0x080c, 0x5709, 0x1150, 0x2009, 0x0014, 0x04f0, 0x2061,
-	0x1800, 0x080c, 0x5709, 0x2009, 0x0007, 0x15b8, 0xd2f4, 0x0128,
-	0x9284, 0x5000, 0x080c, 0x56d0, 0x0050, 0xd2fc, 0x0178, 0x080c,
-	0x4afa, 0x0588, 0xa998, 0x9284, 0x9000, 0x080c, 0x56ad, 0xa87b,
-	0x0000, 0xa883, 0x0000, 0xa897, 0x4000, 0x0438, 0x080c, 0x4afa,
-	0x0510, 0x080c, 0x6a8e, 0x2009, 0x0009, 0x11b8, 0xa8c4, 0x9086,
-	0x0500, 0x11c8, 0xa8c8, 0x9005, 0x11b0, 0xa8cc, 0x9084, 0xff00,
-	0x1190, 0x080c, 0x4afa, 0x1108, 0x0070, 0x2009, 0x004b, 0x080c,
-	0xcd67, 0x2009, 0x0003, 0x0108, 0x0078, 0x0429, 0x19c0, 0xa897,
-	0x4005, 0xa99a, 0x0010, 0xa897, 0x4006, 0x900e, 0x9085, 0x0001,
-	0x2001, 0x0030, 0x00ce, 0x0005, 0x9006, 0x0ce0, 0x7aa8, 0xd2dc,
-	0x0904, 0x35b9, 0x0016, 0x7984, 0x9284, 0x1000, 0xc0fd, 0x080c,
-	0x56ad, 0x001e, 0x1904, 0x35b9, 0x0804, 0x3587, 0x00f6, 0x2d78,
-	0x0011, 0x00fe, 0x0005, 0xaab0, 0xd2dc, 0x0150, 0x0016, 0xa998,
-	0x9284, 0x1000, 0xc0fd, 0x080c, 0x56ad, 0x001e, 0x9085, 0x0001,
-	0x0005, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x35b9, 0x080c,
-	0x5709, 0x0120, 0x2009, 0x0007, 0x0804, 0x35b9, 0x7984, 0x7ea8,
-	0x96b4, 0x00ff, 0x080c, 0x6644, 0x1904, 0x35bc, 0x9186, 0x007f,
-	0x0138, 0x080c, 0x6a8e, 0x0120, 0x2009, 0x0009, 0x0804, 0x35b9,
-	0x080c, 0x4ac9, 0x1120, 0x2009, 0x0002, 0x0804, 0x35b9, 0xa867,
-	0x0000, 0xa868, 0xc0fd, 0xa86a, 0x2001, 0x0100, 0x8007, 0xa80a,
-	0x080c, 0xca4e, 0x1120, 0x2009, 0x0003, 0x0804, 0x35b9, 0x7007,
-	0x0003, 0x701f, 0x54e4, 0x0005, 0xa808, 0x8007, 0x9086, 0x0100,
-	0x1120, 0x2009, 0x0004, 0x0804, 0x35b9, 0xa8e0, 0xa866, 0xa810,
-	0x8007, 0x9084, 0x00ff, 0x800c, 0xa814, 0x8007, 0x9084, 0x00ff,
-	0x8004, 0x9080, 0x0002, 0x9108, 0x8906, 0x8006, 0x8007, 0x90bc,
-	0x003f, 0x9084, 0xffc0, 0x9080, 0x0004, 0x7a8c, 0x7b88, 0x7c9c,
-	0x7d98, 0x0804, 0x4b15, 0x080c, 0x4ac9, 0x1120, 0x2009, 0x0002,
-	0x0804, 0x35b9, 0x7984, 0x9194, 0xff00, 0x918c, 0x00ff, 0x8217,
-	0x82ff, 0x1118, 0x7023, 0x19b2, 0x0040, 0x92c6, 0x0001, 0x1118,
-	0x7023, 0x19cc, 0x0010, 0x0804, 0x35bc, 0x2009, 0x001a, 0x7a8c,
-	0x7b88, 0x7c9c, 0x7d98, 0xa85c, 0x9080, 0x0019, 0xaf60, 0x080c,
-	0x4b12, 0x701f, 0x5534, 0x0005, 0x2001, 0x182e, 0x2003, 0x0001,
-	0xa85c, 0x9080, 0x0019, 0x2098, 0xa860, 0x20e0, 0x20a9, 0x001a,
-	0x7020, 0x20a0, 0x20e9, 0x0001, 0x4003, 0x0804, 0x3587, 0x080c,
-	0x4ac9, 0x1120, 0x2009, 0x0002, 0x0804, 0x35b9, 0x7984, 0x9194,
-	0xff00, 0x918c, 0x00ff, 0x8217, 0x82ff, 0x1118, 0x2099, 0x19b2,
-	0x0040, 0x92c6, 0x0001, 0x1118, 0x2099, 0x19cc, 0x0010, 0x0804,
-	0x35bc, 0xa85c, 0x9080, 0x0019, 0x20a0, 0xa860, 0x20e8, 0x20a9,
-	0x001a, 0x20e1, 0x0001, 0x4003, 0x2009, 0x001a, 0x7a8c, 0x7b88,
-	0x7c9c, 0x7d98, 0xa85c, 0x9080, 0x0019, 0xaf60, 0x0804, 0x4b15,
-	0x7884, 0x908a, 0x1000, 0x1a04, 0x35bc, 0x0126, 0x2091, 0x8000,
-	0x8003, 0x800b, 0x810b, 0x9108, 0x00c6, 0x2061, 0x1a02, 0x6142,
-	0x00ce, 0x012e, 0x0804, 0x3587, 0x00c6, 0x080c, 0x74ec, 0x1160,
-	0x080c, 0x77ef, 0x080c, 0x6044, 0x9085, 0x0001, 0x080c, 0x7533,
-	0x080c, 0x741d, 0x080c, 0x0d7d, 0x2061, 0x1800, 0x6030, 0xc09d,
-	0x6032, 0x080c, 0x5eff, 0x00ce, 0x0005, 0x00c6, 0x2001, 0x1800,
-	0x2004, 0x908e, 0x0000, 0x0904, 0x35b9, 0x7884, 0x9005, 0x0188,
-	0x7888, 0x2061, 0x199b, 0x2c0c, 0x2062, 0x080c, 0x2a17, 0x01a0,
-	0x080c, 0x2a1f, 0x0188, 0x080c, 0x2a27, 0x0170, 0x2162, 0x0804,
-	0x35bc, 0x2061, 0x0100, 0x6038, 0x9086, 0x0007, 0x1118, 0x2009,
-	0x0001, 0x0010, 0x2009, 0x0000, 0x7884, 0x9086, 0x0002, 0x1588,
-	0x2061, 0x0100, 0x6028, 0xc09c, 0x602a, 0x080c, 0xa899, 0x0026,
-	0x2011, 0x0003, 0x080c, 0xa1be, 0x2011, 0x0002, 0x080c, 0xa1c8,
-	0x002e, 0x080c, 0xa0b3, 0x0036, 0x901e, 0x080c, 0xa133, 0x003e,
-	0x080c, 0xa8b5, 0x60e3, 0x0000, 0x080c, 0xe74f, 0x080c, 0xe76a,
-	0x9085, 0x0001, 0x080c, 0x7533, 0x9006, 0x080c, 0x2a49, 0x2001,
-	0x1800, 0x2003, 0x0004, 0x0026, 0x2011, 0x0008, 0x080c, 0x2a83,
-	0x002e, 0x00ce, 0x0804, 0x3587, 0x81ff, 0x0120, 0x2009, 0x0001,
-	0x0804, 0x35b9, 0x080c, 0x5709, 0x0120, 0x2009, 0x0007, 0x0804,
-	0x35b9, 0x7984, 0x7ea8, 0x96b4, 0x00ff, 0x080c, 0x6644, 0x1904,
-	0x35bc, 0x9186, 0x007f, 0x0138, 0x080c, 0x6a8e, 0x0120, 0x2009,
-	0x0009, 0x0804, 0x35b9, 0x080c, 0x4ac9, 0x1120, 0x2009, 0x0002,
-	0x0804, 0x35b9, 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, 0x080c,
-	0xca51, 0x1120, 0x2009, 0x0003, 0x0804, 0x35b9, 0x7007, 0x0003,
-	0x701f, 0x563b, 0x0005, 0xa830, 0x9086, 0x0100, 0x1120, 0x2009,
-	0x0004, 0x0804, 0x35b9, 0xa8e0, 0xa866, 0xa834, 0x8007, 0x800c,
-	0xa85c, 0x9080, 0x000c, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0xaf60,
-	0x0804, 0x4b15, 0xa898, 0x9086, 0x000d, 0x1904, 0x35b9, 0x2021,
-	0x4005, 0x0126, 0x2091, 0x8000, 0x0e04, 0x565f, 0x0010, 0x012e,
-	0x0cc0, 0x7c36, 0x9486, 0x4000, 0x0118, 0x7833, 0x0011, 0x0010,
-	0x7833, 0x0010, 0x7883, 0x4005, 0xa998, 0x7986, 0xa9a4, 0x799a,
-	0xa9a8, 0x799e, 0x080c, 0x4b05, 0x2091, 0x4080, 0x2001, 0x0089,
-	0x2004, 0xd084, 0x190c, 0x11ee, 0x7007, 0x0001, 0x2091, 0x5000,
-	0x700f, 0x0000, 0x012e, 0x0005, 0x0126, 0x2091, 0x8000, 0x00c6,
-	0x2061, 0x1a02, 0x7984, 0x6152, 0x614e, 0x6057, 0x0000, 0x604b,
-	0x0009, 0x7898, 0x606a, 0x789c, 0x6066, 0x7888, 0x6062, 0x788c,
-	0x605e, 0x2001, 0x1a10, 0x2044, 0x2001, 0x1a17, 0xa076, 0xa060,
-	0xa072, 0xa07b, 0x0001, 0xa07f, 0x0002, 0xa06b, 0x0000, 0xa09f,
-	0x0000, 0x00ce, 0x012e, 0x0804, 0x3587, 0x0126, 0x2091, 0x8000,
-	0x00b6, 0x00c6, 0x90e4, 0xc000, 0x0128, 0x0006, 0x080c, 0xc8b2,
+	0xff00, 0x0110, 0x1904, 0x35ed, 0xa866, 0xa832, 0xa868, 0xc0fd,
+	0xa86a, 0x080c, 0x4b25, 0x1110, 0x0804, 0x35ed, 0x2009, 0x0043,
+	0x080c, 0xce7e, 0x2009, 0x0003, 0x0904, 0x54ba, 0x7007, 0x0003,
+	0x701f, 0x544b, 0x0005, 0xa830, 0x9086, 0x0100, 0x2009, 0x0004,
+	0x0904, 0x54ba, 0x7984, 0x7aa8, 0x9284, 0x1000, 0xe085, 0x080c,
+	0x56e7, 0x0804, 0x35b8, 0x00c6, 0xaab0, 0x9284, 0xc000, 0x0148,
+	0xd2ec, 0x0170, 0x080c, 0x5752, 0x1158, 0x2009, 0x0014, 0x0804,
+	0x54a9, 0x2061, 0x1800, 0x080c, 0x5752, 0x2009, 0x0007, 0x15c8,
+	0xd2f4, 0x0130, 0x9284, 0x5000, 0xc0d5, 0x080c, 0x5718, 0x0058,
+	0xd2fc, 0x0180, 0x080c, 0x4b23, 0x0590, 0xa998, 0x9284, 0x9000,
+	0xc0d5, 0x080c, 0x56e7, 0xa87b, 0x0000, 0xa883, 0x0000, 0xa897,
+	0x4000, 0x0438, 0x080c, 0x4b23, 0x0510, 0x080c, 0x6add, 0x2009,
+	0x0009, 0x11b8, 0xa8c4, 0x9086, 0x0500, 0x11c8, 0xa8c8, 0x9005,
+	0x11b0, 0xa8cc, 0x9084, 0xff00, 0x1190, 0x080c, 0x4b23, 0x1108,
+	0x0070, 0x2009, 0x004b, 0x080c, 0xce7e, 0x2009, 0x0003, 0x0108,
+	0x0078, 0x0431, 0x19c0, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897,
+	0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x00ce, 0x0005,
+	0x9006, 0x0ce0, 0x7aa8, 0xd2dc, 0x0904, 0x35ea, 0x0016, 0x7984,
+	0x9284, 0x1000, 0xc0fd, 0x080c, 0x56e7, 0x001e, 0x1904, 0x35ea,
+	0x0804, 0x35b8, 0x00f6, 0x2d78, 0xaab0, 0x0021, 0x00fe, 0x0005,
+	0xaab0, 0xc2d5, 0xd2dc, 0x0150, 0x0016, 0xa998, 0x9284, 0x1400,
+	0xc0fd, 0x080c, 0x56e7, 0x001e, 0x9085, 0x0001, 0x0005, 0x81ff,
+	0x0120, 0x2009, 0x0001, 0x0804, 0x35ea, 0x080c, 0x5752, 0x0120,
+	0x2009, 0x0007, 0x0804, 0x35ea, 0x7984, 0x7ea8, 0x96b4, 0x00ff,
+	0x080c, 0x6693, 0x1904, 0x35ed, 0x9186, 0x007f, 0x0138, 0x080c,
+	0x6add, 0x0120, 0x2009, 0x0009, 0x0804, 0x35ea, 0x080c, 0x4af2,
+	0x1120, 0x2009, 0x0002, 0x0804, 0x35ea, 0xa867, 0x0000, 0xa868,
+	0xc0fd, 0xa86a, 0x2001, 0x0100, 0x8007, 0xa80a, 0x080c, 0xcb65,
+	0x1120, 0x2009, 0x0003, 0x0804, 0x35ea, 0x7007, 0x0003, 0x701f,
+	0x551a, 0x0005, 0xa808, 0x8007, 0x9086, 0x0100, 0x1120, 0x2009,
+	0x0004, 0x0804, 0x35ea, 0xa8e0, 0xa866, 0xa810, 0x8007, 0x9084,
+	0x00ff, 0x800c, 0xa814, 0x8007, 0x9084, 0x00ff, 0x8004, 0x9080,
+	0x0002, 0x9108, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084,
+	0xffc0, 0x9080, 0x0004, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x0804,
+	0x4b3e, 0x080c, 0x4af2, 0x1120, 0x2009, 0x0002, 0x0804, 0x35ea,
+	0x7984, 0x9194, 0xff00, 0x918c, 0x00ff, 0x8217, 0x82ff, 0x1118,
+	0x7023, 0x19b2, 0x0040, 0x92c6, 0x0001, 0x1118, 0x7023, 0x19cc,
+	0x0010, 0x0804, 0x35ed, 0x2009, 0x001a, 0x7a8c, 0x7b88, 0x7c9c,
+	0x7d98, 0xa85c, 0x9080, 0x0019, 0xaf60, 0x080c, 0x4b3b, 0x701f,
+	0x556a, 0x0005, 0x2001, 0x182e, 0x2003, 0x0001, 0xa85c, 0x9080,
+	0x0019, 0x2098, 0xa860, 0x20e0, 0x20a9, 0x001a, 0x7020, 0x20a0,
+	0x20e9, 0x0001, 0x4003, 0x0804, 0x35b8, 0x080c, 0x4af2, 0x1120,
+	0x2009, 0x0002, 0x0804, 0x35ea, 0x7984, 0x9194, 0xff00, 0x918c,
+	0x00ff, 0x8217, 0x82ff, 0x1118, 0x2099, 0x19b2, 0x0040, 0x92c6,
+	0x0001, 0x1118, 0x2099, 0x19cc, 0x0010, 0x0804, 0x35ed, 0xa85c,
+	0x9080, 0x0019, 0x20a0, 0xa860, 0x20e8, 0x20a9, 0x001a, 0x20e1,
+	0x0001, 0x4003, 0x2009, 0x001a, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98,
+	0xa85c, 0x9080, 0x0019, 0xaf60, 0x0804, 0x4b3e, 0x7884, 0x908a,
+	0x1000, 0x1a04, 0x35ed, 0x0126, 0x2091, 0x8000, 0x8003, 0x800b,
+	0x810b, 0x9108, 0x00c6, 0x2061, 0x1a02, 0x6142, 0x00ce, 0x012e,
+	0x0804, 0x35b8, 0x00c6, 0x080c, 0x753d, 0x1160, 0x080c, 0x7840,
+	0x080c, 0x6092, 0x9085, 0x0001, 0x080c, 0x7584, 0x080c, 0x746e,
+	0x080c, 0x0d7d, 0x2061, 0x1800, 0x6030, 0xc09d, 0x6032, 0x080c,
+	0x5f4d, 0x00ce, 0x0005, 0x00c6, 0x2001, 0x1800, 0x2004, 0x908e,
+	0x0000, 0x0904, 0x35ea, 0x7884, 0x9005, 0x0188, 0x7888, 0x2061,
+	0x199b, 0x2c0c, 0x2062, 0x080c, 0x2a48, 0x01a0, 0x080c, 0x2a50,
+	0x0188, 0x080c, 0x2a58, 0x0170, 0x2162, 0x0804, 0x35ed, 0x2061,
+	0x0100, 0x6038, 0x9086, 0x0007, 0x1118, 0x2009, 0x0001, 0x0010,
+	0x2009, 0x0000, 0x7884, 0x9086, 0x0002, 0x15a8, 0x2061, 0x0100,
+	0x6028, 0xc09c, 0x602a, 0x080c, 0xa91e, 0x0026, 0x2011, 0x0003,
+	0x080c, 0xa243, 0x2011, 0x0002, 0x080c, 0xa24d, 0x002e, 0x080c,
+	0xa138, 0x0036, 0x901e, 0x080c, 0xa1b8, 0x003e, 0x080c, 0xa93a,
+	0x60e3, 0x0000, 0x080c, 0xe882, 0x080c, 0xe89d, 0x9085, 0x0001,
+	0x080c, 0x7584, 0x9006, 0x080c, 0x2a7a, 0x2001, 0x1800, 0x2003,
+	0x0004, 0x2001, 0x19a6, 0x2003, 0x0000, 0x0026, 0x2011, 0x0008,
+	0x080c, 0x2ab4, 0x002e, 0x00ce, 0x0804, 0x35b8, 0x81ff, 0x0120,
+	0x2009, 0x0001, 0x0804, 0x35ea, 0x080c, 0x5752, 0x0120, 0x2009,
+	0x0007, 0x0804, 0x35ea, 0x7984, 0x7ea8, 0x96b4, 0x00ff, 0x080c,
+	0x6693, 0x1904, 0x35ed, 0x9186, 0x007f, 0x0138, 0x080c, 0x6add,
+	0x0120, 0x2009, 0x0009, 0x0804, 0x35ea, 0x080c, 0x4af2, 0x1120,
+	0x2009, 0x0002, 0x0804, 0x35ea, 0xa867, 0x0000, 0xa868, 0xc0fd,
+	0xa86a, 0x080c, 0xcb68, 0x1120, 0x2009, 0x0003, 0x0804, 0x35ea,
+	0x7007, 0x0003, 0x701f, 0x5675, 0x0005, 0xa830, 0x9086, 0x0100,
+	0x1120, 0x2009, 0x0004, 0x0804, 0x35ea, 0xa8e0, 0xa866, 0xa834,
+	0x8007, 0x800c, 0xa85c, 0x9080, 0x000c, 0x7a8c, 0x7b88, 0x7c9c,
+	0x7d98, 0xaf60, 0x0804, 0x4b3e, 0xa898, 0x9086, 0x000d, 0x1904,
+	0x35ea, 0x2021, 0x4005, 0x0126, 0x2091, 0x8000, 0x0e04, 0x5699,
+	0x0010, 0x012e, 0x0cc0, 0x7c36, 0x9486, 0x4000, 0x0118, 0x7833,
+	0x0011, 0x0010, 0x7833, 0x0010, 0x7883, 0x4005, 0xa998, 0x7986,
+	0xa9a4, 0x799a, 0xa9a8, 0x799e, 0x080c, 0x4b2e, 0x2091, 0x4080,
+	0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11ee, 0x7007, 0x0001,
+	0x2091, 0x5000, 0x700f, 0x0000, 0x012e, 0x0005, 0x0126, 0x2091,
+	0x8000, 0x00c6, 0x2061, 0x1a02, 0x7984, 0x6152, 0x614e, 0x6057,
+	0x0000, 0x604b, 0x0009, 0x7898, 0x606a, 0x789c, 0x6066, 0x7888,
+	0x6062, 0x788c, 0x605e, 0x2001, 0x1a10, 0x2044, 0x2001, 0x1a17,
+	0xa076, 0xa060, 0xa072, 0xa07b, 0x0001, 0xa07f, 0x0002, 0xa06b,
+	0x0000, 0xa09f, 0x0000, 0x00ce, 0x012e, 0x0804, 0x35b8, 0x0126,
+	0x2091, 0x8000, 0x00b6, 0x00c6, 0x90e4, 0xc000, 0x0198, 0x0006,
+	0xd0d4, 0x0160, 0x0036, 0x2019, 0x0029, 0x080c, 0xa91e, 0x0106,
+	0x080c, 0x336d, 0x010e, 0x090c, 0xa93a, 0x003e, 0x080c, 0xc9c7,
 	0x000e, 0x1198, 0xd0e4, 0x0160, 0x9180, 0x1000, 0x2004, 0x905d,
-	0x0160, 0x080c, 0x605e, 0x080c, 0xab5a, 0x0110, 0xb817, 0x0000,
+	0x0160, 0x080c, 0x60ac, 0x080c, 0xabe2, 0x0110, 0xb817, 0x0000,
 	0x9006, 0x00ce, 0x00be, 0x012e, 0x0005, 0x9085, 0x0001, 0x0cc8,
 	0x0126, 0x2091, 0x8000, 0x0156, 0x2010, 0x900e, 0x20a9, 0x0800,
-	0x0016, 0x9180, 0x1000, 0x2004, 0x9005, 0x0180, 0x9186, 0x007e,
-	0x0168, 0x9186, 0x007f, 0x0150, 0x9186, 0x0080, 0x0138, 0x9186,
-	0x00ff, 0x0120, 0x0026, 0x2200, 0x0801, 0x002e, 0x001e, 0x8108,
-	0x1f04, 0x56d8, 0x015e, 0x012e, 0x0005, 0x2001, 0x1848, 0x2004,
-	0x0005, 0x2001, 0x1867, 0x2004, 0x0005, 0x0006, 0x2001, 0x1810,
-	0x2004, 0xd0d4, 0x000e, 0x0005, 0x2001, 0x180e, 0x2004, 0xd0b4,
-	0x0005, 0x2001, 0x1800, 0x2004, 0x9086, 0x0003, 0x0005, 0x0016,
-	0x00e6, 0x2071, 0x189e, 0x7108, 0x910d, 0x710a, 0x00ee, 0x001e,
-	0x0005, 0x79a4, 0x9182, 0x0081, 0x1a04, 0x35bc, 0x810c, 0x0016,
-	0x080c, 0x4ac9, 0x080c, 0x0f4f, 0x2100, 0x2238, 0x7d84, 0x7c88,
-	0x7b8c, 0x7a90, 0x001e, 0x080c, 0x4b12, 0x701f, 0x5730, 0x0005,
-	0x2079, 0x0000, 0x7d94, 0x7c98, 0x7ba8, 0x7aac, 0x79a4, 0x810c,
-	0x2061, 0x18b8, 0x2c44, 0xa770, 0xa074, 0x2071, 0x189e, 0x080c,
-	0x4b15, 0x701f, 0x5744, 0x0005, 0x2061, 0x18b8, 0x2c44, 0x0016,
-	0x0026, 0xa270, 0xa174, 0x080c, 0x0f57, 0x002e, 0x001e, 0x080c,
-	0x1004, 0x9006, 0xa802, 0xa806, 0x0804, 0x3587, 0x0126, 0x0156,
-	0x0136, 0x0146, 0x01c6, 0x01d6, 0x00c6, 0x00d6, 0x00e6, 0x00f6,
-	0x2061, 0x0100, 0x2069, 0x0200, 0x2071, 0x1800, 0x6044, 0xd0a4,
-	0x11e8, 0xd084, 0x0118, 0x080c, 0x58ff, 0x0068, 0xd08c, 0x0118,
-	0x080c, 0x5808, 0x0040, 0xd094, 0x0118, 0x080c, 0x57d8, 0x0018,
-	0xd09c, 0x0108, 0x0099, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x01de,
-	0x01ce, 0x014e, 0x013e, 0x015e, 0x012e, 0x0005, 0x0016, 0x6128,
-	0xd19c, 0x1110, 0xc19d, 0x612a, 0x001e, 0x0c68, 0x0006, 0x7098,
-	0x9005, 0x000e, 0x0120, 0x709b, 0x0000, 0x7093, 0x0000, 0x624c,
-	0x9286, 0xf0f0, 0x1150, 0x6048, 0x9086, 0xf0f0, 0x0130, 0x624a,
-	0x6043, 0x0090, 0x6043, 0x0010, 0x0490, 0x9294, 0xff00, 0x9296,
-	0xf700, 0x0178, 0x7138, 0xd1a4, 0x1160, 0x6240, 0x9295, 0x0100,
-	0x6242, 0x9294, 0x0010, 0x0128, 0x2009, 0x00f7, 0x080c, 0x5fc0,
-	0x00f0, 0x6040, 0x9084, 0x0010, 0x9085, 0x0140, 0x6042, 0x6043,
-	0x0000, 0x7087, 0x0000, 0x70a3, 0x0001, 0x70c7, 0x0000, 0x70df,
-	0x0000, 0x2009, 0x1d80, 0x200b, 0x0000, 0x7097, 0x0000, 0x708b,
-	0x000f, 0x2009, 0x000f, 0x2011, 0x5ea2, 0x080c, 0x871b, 0x0005,
-	0x2001, 0x1869, 0x2004, 0xd08c, 0x0110, 0x705f, 0xffff, 0x7088,
-	0x9005, 0x1528, 0x2011, 0x5ea2, 0x080c, 0x8651, 0x6040, 0x9094,
-	0x0010, 0x9285, 0x0020, 0x6042, 0x20a9, 0x00c8, 0x6044, 0xd08c,
-	0x1168, 0x1f04, 0x57ee, 0x6242, 0x709b, 0x0000, 0x6040, 0x9094,
-	0x0010, 0x9285, 0x0080, 0x6042, 0x6242, 0x0048, 0x6242, 0x709b,
-	0x0000, 0x708f, 0x0000, 0x9006, 0x080c, 0x6049, 0x0000, 0x0005,
-	0x708c, 0x908a, 0x0003, 0x1a0c, 0x0d7d, 0x000b, 0x0005, 0x5812,
-	0x5863, 0x58fe, 0x00f6, 0x0016, 0x6900, 0x918c, 0x0800, 0x708f,
-	0x0001, 0x2001, 0x015d, 0x2003, 0x0000, 0x6803, 0x00fc, 0x20a9,
-	0x0004, 0x6800, 0x9084, 0x00fc, 0x0120, 0x1f04, 0x5821, 0x080c,
-	0x0d7d, 0x68a0, 0x68a2, 0x689c, 0x689e, 0x6898, 0x689a, 0xa001,
-	0x918d, 0x1600, 0x6902, 0x001e, 0x6837, 0x0020, 0x080c, 0x6025,
-	0x2079, 0x1d00, 0x7833, 0x1101, 0x7837, 0x0000, 0x20e1, 0x0001,
-	0x2099, 0x1805, 0x20e9, 0x0001, 0x20a1, 0x1d0e, 0x20a9, 0x0004,
-	0x4003, 0x080c, 0xa68e, 0x20e1, 0x0001, 0x2099, 0x1d00, 0x20e9,
-	0x0000, 0x20a1, 0x0240, 0x20a9, 0x0014, 0x4003, 0x60c3, 0x000c,
-	0x600f, 0x0000, 0x080c, 0x5ed3, 0x00fe, 0x9006, 0x7092, 0x6043,
-	0x0008, 0x6042, 0x0005, 0x00f6, 0x7090, 0x7093, 0x0000, 0x9025,
-	0x0904, 0x58db, 0x6020, 0xd0b4, 0x1904, 0x58d9, 0x71a0, 0x81ff,
-	0x0904, 0x58c7, 0x9486, 0x000c, 0x1904, 0x58d4, 0x9480, 0x0018,
-	0x8004, 0x20a8, 0x080c, 0x601e, 0x2011, 0x0260, 0x2019, 0x1d00,
-	0x220c, 0x2304, 0x9106, 0x11e8, 0x8210, 0x8318, 0x1f04, 0x5880,
-	0x6043, 0x0004, 0x2061, 0x0140, 0x605b, 0xbc94, 0x605f, 0xf0f0,
-	0x2061, 0x0100, 0x6043, 0x0006, 0x708f, 0x0002, 0x709b, 0x0002,
-	0x2009, 0x07d0, 0x2011, 0x5ea9, 0x080c, 0x871b, 0x080c, 0x6025,
-	0x04c0, 0x080c, 0x601e, 0x2079, 0x0260, 0x7930, 0x918e, 0x1101,
-	0x1558, 0x7834, 0x9005, 0x1540, 0x7900, 0x918c, 0x00ff, 0x1118,
-	0x7804, 0x9005, 0x0190, 0x080c, 0x601e, 0x2011, 0x026e, 0x2019,
-	0x1805, 0x20a9, 0x0004, 0x220c, 0x2304, 0x9102, 0x0230, 0x11a0,
-	0x8210, 0x8318, 0x1f04, 0x58bb, 0x0078, 0x70a3, 0x0000, 0x080c,
-	0x601e, 0x20e1, 0x0000, 0x2099, 0x0260, 0x20e9, 0x0001, 0x20a1,
-	0x1d00, 0x20a9, 0x0014, 0x4003, 0x6043, 0x0008, 0x6043, 0x0000,
-	0x0010, 0x00fe, 0x0005, 0x6040, 0x9085, 0x0100, 0x6042, 0x6020,
-	0xd0b4, 0x1db8, 0x080c, 0xa68e, 0x20e1, 0x0001, 0x2099, 0x1d00,
-	0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9, 0x0014, 0x4003, 0x60c3,
-	0x000c, 0x2011, 0x19f3, 0x2013, 0x0000, 0x7093, 0x0000, 0x60a3,
-	0x0056, 0x60a7, 0x9575, 0x080c, 0x9e42, 0x08d8, 0x0005, 0x7098,
-	0x908a, 0x001d, 0x1a0c, 0x0d7d, 0x000b, 0x0005, 0x5930, 0x5943,
-	0x596c, 0x598c, 0x59b2, 0x59e1, 0x5a07, 0x5a3f, 0x5a65, 0x5a93,
-	0x5ace, 0x5b06, 0x5b24, 0x5b4f, 0x5b71, 0x5b8c, 0x5b96, 0x5bca,
-	0x5bf0, 0x5c1f, 0x5c45, 0x5c7d, 0x5cc1, 0x5cfe, 0x5d1f, 0x5d78,
-	0x5d9a, 0x5dc8, 0x5dc8, 0x00c6, 0x2061, 0x1800, 0x6003, 0x0007,
-	0x2061, 0x0100, 0x6004, 0x9084, 0xfff9, 0x6006, 0x00ce, 0x0005,
+	0x0016, 0x9180, 0x1000, 0x2004, 0x9005, 0x0188, 0x9186, 0x007e,
+	0x0170, 0x9186, 0x007f, 0x0158, 0x9186, 0x0080, 0x0140, 0x9186,
+	0x00ff, 0x0128, 0x0026, 0x2200, 0x080c, 0x56e7, 0x002e, 0x001e,
+	0x8108, 0x1f04, 0x5720, 0x015e, 0x012e, 0x0005, 0x2001, 0x1848,
+	0x2004, 0x0005, 0x2001, 0x1867, 0x2004, 0x0005, 0x0006, 0x2001,
+	0x1810, 0x2004, 0xd0d4, 0x000e, 0x0005, 0x2001, 0x180e, 0x2004,
+	0xd0b4, 0x0005, 0x2001, 0x1800, 0x2004, 0x9086, 0x0003, 0x0005,
+	0x0016, 0x00e6, 0x2071, 0x189e, 0x7108, 0x910d, 0x710a, 0x00ee,
+	0x001e, 0x0005, 0x79a4, 0x9182, 0x0081, 0x1a04, 0x35ed, 0x810c,
+	0x0016, 0x080c, 0x4af2, 0x0170, 0x080c, 0x0f4f, 0x2100, 0x2238,
+	0x7d84, 0x7c88, 0x7b8c, 0x7a90, 0x001e, 0x080c, 0x4b3b, 0x701f,
+	0x577e, 0x0005, 0x2009, 0x0002, 0x0804, 0x35ea, 0x2079, 0x0000,
+	0x7d94, 0x7c98, 0x7ba8, 0x7aac, 0x79a4, 0x810c, 0x2061, 0x18b8,
+	0x2c44, 0xa770, 0xa074, 0x2071, 0x189e, 0x080c, 0x4b3e, 0x701f,
+	0x5792, 0x0005, 0x2061, 0x18b8, 0x2c44, 0x0016, 0x0026, 0xa270,
+	0xa174, 0x080c, 0x0f57, 0x002e, 0x001e, 0x080c, 0x1004, 0x9006,
+	0xa802, 0xa806, 0x0804, 0x35b8, 0x0126, 0x0156, 0x0136, 0x0146,
+	0x01c6, 0x01d6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x2061, 0x0100,
+	0x2069, 0x0200, 0x2071, 0x1800, 0x6044, 0xd0a4, 0x11e8, 0xd084,
+	0x0118, 0x080c, 0x594d, 0x0068, 0xd08c, 0x0118, 0x080c, 0x5856,
+	0x0040, 0xd094, 0x0118, 0x080c, 0x5826, 0x0018, 0xd09c, 0x0108,
+	0x0099, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x01de, 0x01ce, 0x014e,
+	0x013e, 0x015e, 0x012e, 0x0005, 0x0016, 0x6128, 0xd19c, 0x1110,
+	0xc19d, 0x612a, 0x001e, 0x0c68, 0x0006, 0x7098, 0x9005, 0x000e,
+	0x0120, 0x709b, 0x0000, 0x7093, 0x0000, 0x624c, 0x9286, 0xf0f0,
+	0x1150, 0x6048, 0x9086, 0xf0f0, 0x0130, 0x624a, 0x6043, 0x0090,
+	0x6043, 0x0010, 0x0490, 0x9294, 0xff00, 0x9296, 0xf700, 0x0178,
+	0x7138, 0xd1a4, 0x1160, 0x6240, 0x9295, 0x0100, 0x6242, 0x9294,
+	0x0010, 0x0128, 0x2009, 0x00f7, 0x080c, 0x600e, 0x00f0, 0x6040,
+	0x9084, 0x0010, 0x9085, 0x0140, 0x6042, 0x6043, 0x0000, 0x7087,
+	0x0000, 0x70a3, 0x0001, 0x70c7, 0x0000, 0x70df, 0x0000, 0x2009,
+	0x1d80, 0x200b, 0x0000, 0x7097, 0x0000, 0x708b, 0x000f, 0x2009,
+	0x000f, 0x2011, 0x5ef0, 0x080c, 0x8792, 0x0005, 0x2001, 0x1869,
+	0x2004, 0xd08c, 0x0110, 0x705f, 0xffff, 0x7088, 0x9005, 0x1528,
+	0x2011, 0x5ef0, 0x080c, 0x86c8, 0x6040, 0x9094, 0x0010, 0x9285,
+	0x0020, 0x6042, 0x20a9, 0x00c8, 0x6044, 0xd08c, 0x1168, 0x1f04,
+	0x583c, 0x6242, 0x709b, 0x0000, 0x6040, 0x9094, 0x0010, 0x9285,
+	0x0080, 0x6042, 0x6242, 0x0048, 0x6242, 0x709b, 0x0000, 0x708f,
+	0x0000, 0x9006, 0x080c, 0x6097, 0x0000, 0x0005, 0x708c, 0x908a,
+	0x0003, 0x1a0c, 0x0d7d, 0x000b, 0x0005, 0x5860, 0x58b1, 0x594c,
+	0x00f6, 0x0016, 0x6900, 0x918c, 0x0800, 0x708f, 0x0001, 0x2001,
+	0x015d, 0x2003, 0x0000, 0x6803, 0x00fc, 0x20a9, 0x0004, 0x6800,
+	0x9084, 0x00fc, 0x0120, 0x1f04, 0x586f, 0x080c, 0x0d7d, 0x68a0,
+	0x68a2, 0x689c, 0x689e, 0x6898, 0x689a, 0xa001, 0x918d, 0x1600,
+	0x6902, 0x001e, 0x6837, 0x0020, 0x080c, 0x6073, 0x2079, 0x1d00,
+	0x7833, 0x1101, 0x7837, 0x0000, 0x20e1, 0x0001, 0x2099, 0x1805,
+	0x20e9, 0x0001, 0x20a1, 0x1d0e, 0x20a9, 0x0004, 0x4003, 0x080c,
+	0xa713, 0x20e1, 0x0001, 0x2099, 0x1d00, 0x20e9, 0x0000, 0x20a1,
+	0x0240, 0x20a9, 0x0014, 0x4003, 0x60c3, 0x000c, 0x600f, 0x0000,
+	0x080c, 0x5f21, 0x00fe, 0x9006, 0x7092, 0x6043, 0x0008, 0x6042,
+	0x0005, 0x00f6, 0x7090, 0x7093, 0x0000, 0x9025, 0x0904, 0x5929,
+	0x6020, 0xd0b4, 0x1904, 0x5927, 0x71a0, 0x81ff, 0x0904, 0x5915,
+	0x9486, 0x000c, 0x1904, 0x5922, 0x9480, 0x0018, 0x8004, 0x20a8,
+	0x080c, 0x606c, 0x2011, 0x0260, 0x2019, 0x1d00, 0x220c, 0x2304,
+	0x9106, 0x11e8, 0x8210, 0x8318, 0x1f04, 0x58ce, 0x6043, 0x0004,
 	0x2061, 0x0140, 0x605b, 0xbc94, 0x605f, 0xf0f0, 0x2061, 0x0100,
-	0x6043, 0x0002, 0x709b, 0x0001, 0x2009, 0x07d0, 0x2011, 0x5ea9,
-	0x080c, 0x871b, 0x0005, 0x00f6, 0x7090, 0x9086, 0x0014, 0x1510,
-	0x6042, 0x6020, 0xd0b4, 0x11f0, 0x080c, 0x601e, 0x2079, 0x0260,
-	0x7a30, 0x9296, 0x1102, 0x11a0, 0x7834, 0x9005, 0x1188, 0x7a38,
-	0xd2fc, 0x0128, 0x70c4, 0x9005, 0x1110, 0x70c7, 0x0001, 0x2011,
-	0x5ea9, 0x080c, 0x8651, 0x709b, 0x0010, 0x080c, 0x5b96, 0x0010,
-	0x7093, 0x0000, 0x00fe, 0x0005, 0x00f6, 0x709b, 0x0003, 0x6043,
-	0x0004, 0x2011, 0x5ea9, 0x080c, 0x8651, 0x080c, 0x5fa2, 0x2079,
-	0x0240, 0x7833, 0x1102, 0x7837, 0x0000, 0x20a9, 0x0008, 0x9f88,
-	0x000e, 0x200b, 0x0000, 0x8108, 0x1f04, 0x5981, 0x60c3, 0x0014,
-	0x080c, 0x5ed3, 0x00fe, 0x0005, 0x00f6, 0x7090, 0x9005, 0x0500,
-	0x2011, 0x5ea9, 0x080c, 0x8651, 0x9086, 0x0014, 0x11b8, 0x080c,
-	0x601e, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1102, 0x1178, 0x7834,
-	0x9005, 0x1160, 0x7a38, 0xd2fc, 0x0128, 0x70c4, 0x9005, 0x1110,
-	0x70c7, 0x0001, 0x709b, 0x0004, 0x0029, 0x0010, 0x080c, 0x5ffa,
-	0x00fe, 0x0005, 0x00f6, 0x709b, 0x0005, 0x080c, 0x5fa2, 0x2079,
-	0x0240, 0x7833, 0x1103, 0x7837, 0x0000, 0x080c, 0x601e, 0x080c,
-	0x6001, 0x1170, 0x7084, 0x9005, 0x1158, 0x715c, 0x9186, 0xffff,
-	0x0138, 0x2011, 0x0008, 0x080c, 0x5e56, 0x0168, 0x080c, 0x5fd7,
-	0x20a9, 0x0008, 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9, 0x0000,
-	0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014, 0x080c, 0x5ed3, 0x00fe,
-	0x0005, 0x00f6, 0x7090, 0x9005, 0x0500, 0x2011, 0x5ea9, 0x080c,
-	0x8651, 0x9086, 0x0014, 0x11b8, 0x080c, 0x601e, 0x2079, 0x0260,
-	0x7a30, 0x9296, 0x1103, 0x1178, 0x7834, 0x9005, 0x1160, 0x7a38,
-	0xd2fc, 0x0128, 0x70c4, 0x9005, 0x1110, 0x70c7, 0x0001, 0x709b,
-	0x0006, 0x0029, 0x0010, 0x080c, 0x5ffa, 0x00fe, 0x0005, 0x00f6,
-	0x709b, 0x0007, 0x080c, 0x5fa2, 0x2079, 0x0240, 0x7833, 0x1104,
-	0x7837, 0x0000, 0x080c, 0x601e, 0x080c, 0x6001, 0x11b8, 0x7084,
-	0x9005, 0x11a0, 0x7164, 0x9186, 0xffff, 0x0180, 0x9180, 0x3388,
-	0x200d, 0x918c, 0xff00, 0x810f, 0x2011, 0x0008, 0x080c, 0x5e56,
-	0x0180, 0x080c, 0x4fff, 0x0110, 0x080c, 0x2699, 0x20a9, 0x0008,
-	0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9, 0x0000, 0x20a1, 0x024e,
-	0x4003, 0x60c3, 0x0014, 0x080c, 0x5ed3, 0x00fe, 0x0005, 0x00f6,
-	0x7090, 0x9005, 0x0500, 0x2011, 0x5ea9, 0x080c, 0x8651, 0x9086,
-	0x0014, 0x11b8, 0x080c, 0x601e, 0x2079, 0x0260, 0x7a30, 0x9296,
-	0x1104, 0x1178, 0x7834, 0x9005, 0x1160, 0x7a38, 0xd2fc, 0x0128,
-	0x70c4, 0x9005, 0x1110, 0x70c7, 0x0001, 0x709b, 0x0008, 0x0029,
-	0x0010, 0x080c, 0x5ffa, 0x00fe, 0x0005, 0x00f6, 0x709b, 0x0009,
-	0x080c, 0x5fa2, 0x2079, 0x0240, 0x7833, 0x1105, 0x7837, 0x0100,
-	0x080c, 0x6001, 0x1150, 0x7084, 0x9005, 0x1138, 0x080c, 0x5dc9,
-	0x1188, 0x9085, 0x0001, 0x080c, 0x2699, 0x20a9, 0x0008, 0x080c,
-	0x601e, 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9, 0x0000, 0x20a1,
-	0x024e, 0x4003, 0x60c3, 0x0014, 0x080c, 0x5ed3, 0x0010, 0x080c,
-	0x5923, 0x00fe, 0x0005, 0x00f6, 0x7090, 0x9005, 0x05a8, 0x2011,
-	0x5ea9, 0x080c, 0x8651, 0x9086, 0x0014, 0x1560, 0x080c, 0x601e,
-	0x2079, 0x0260, 0x7a30, 0x9296, 0x1105, 0x1520, 0x7834, 0x9084,
-	0x0100, 0x2011, 0x0100, 0x921e, 0x1160, 0x7a38, 0xd2fc, 0x0128,
-	0x70c4, 0x9005, 0x1110, 0x70c7, 0x0001, 0x709b, 0x000a, 0x00b1,
-	0x0098, 0x9005, 0x1178, 0x7a38, 0xd2fc, 0x0128, 0x70c4, 0x9005,
-	0x1110, 0x70c7, 0x0001, 0x7097, 0x0000, 0x709b, 0x000e, 0x080c,
-	0x5b71, 0x0010, 0x080c, 0x5ffa, 0x00fe, 0x0005, 0x00f6, 0x709b,
-	0x000b, 0x2011, 0x1d0e, 0x20e9, 0x0001, 0x22a0, 0x20a9, 0x0040,
-	0x2019, 0xffff, 0x4304, 0x080c, 0x5fa2, 0x2079, 0x0240, 0x7833,
-	0x1106, 0x7837, 0x0000, 0x080c, 0x6001, 0x0118, 0x2013, 0x0000,
-	0x0020, 0x7060, 0x9085, 0x0100, 0x2012, 0x20a9, 0x0040, 0x2009,
-	0x024e, 0x2011, 0x1d0e, 0x220e, 0x8210, 0x8108, 0x9186, 0x0260,
-	0x1128, 0x6810, 0x8000, 0x6812, 0x2009, 0x0240, 0x1f04, 0x5af3,
-	0x60c3, 0x0084, 0x080c, 0x5ed3, 0x00fe, 0x0005, 0x00f6, 0x7090,
-	0x9005, 0x01c0, 0x2011, 0x5ea9, 0x080c, 0x8651, 0x9086, 0x0084,
-	0x1178, 0x080c, 0x601e, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1106,
-	0x1138, 0x7834, 0x9005, 0x1120, 0x709b, 0x000c, 0x0029, 0x0010,
-	0x080c, 0x5ffa, 0x00fe, 0x0005, 0x00f6, 0x709b, 0x000d, 0x080c,
-	0x5fa2, 0x2079, 0x0240, 0x7833, 0x1107, 0x7837, 0x0000, 0x080c,
-	0x601e, 0x20a9, 0x0040, 0x2011, 0x026e, 0x2009, 0x024e, 0x220e,
-	0x8210, 0x8108, 0x9186, 0x0260, 0x1150, 0x6810, 0x8000, 0x6812,
-	0x2009, 0x0240, 0x6814, 0x8000, 0x6816, 0x2011, 0x0260, 0x1f04,
-	0x5b37, 0x60c3, 0x0084, 0x080c, 0x5ed3, 0x00fe, 0x0005, 0x00f6,
-	0x7090, 0x9005, 0x01e0, 0x2011, 0x5ea9, 0x080c, 0x8651, 0x9086,
-	0x0084, 0x1198, 0x080c, 0x601e, 0x2079, 0x0260, 0x7a30, 0x9296,
-	0x1107, 0x1158, 0x7834, 0x9005, 0x1140, 0x7097, 0x0001, 0x080c,
-	0x5f74, 0x709b, 0x000e, 0x0029, 0x0010, 0x080c, 0x5ffa, 0x00fe,
-	0x0005, 0x918d, 0x0001, 0x080c, 0x6049, 0x709b, 0x000f, 0x7093,
-	0x0000, 0x2061, 0x0140, 0x605b, 0xbc85, 0x605f, 0xb5b5, 0x2061,
-	0x0100, 0x6043, 0x0005, 0x6043, 0x0004, 0x2009, 0x07d0, 0x2011,
-	0x5ea9, 0x080c, 0x8645, 0x0005, 0x7090, 0x9005, 0x0130, 0x2011,
-	0x5ea9, 0x080c, 0x8651, 0x709b, 0x0000, 0x0005, 0x709b, 0x0011,
-	0x080c, 0xa68e, 0x080c, 0x601e, 0x20e1, 0x0000, 0x2099, 0x0260,
-	0x20e9, 0x0000, 0x20a1, 0x0240, 0x7490, 0x9480, 0x0018, 0x9080,
-	0x0007, 0x9084, 0x03f8, 0x8004, 0x20a8, 0x4003, 0x080c, 0x6001,
-	0x11a0, 0x717c, 0x81ff, 0x0188, 0x900e, 0x7080, 0x9084, 0x00ff,
-	0x0160, 0x080c, 0x2630, 0x9186, 0x007e, 0x0138, 0x9186, 0x0080,
-	0x0120, 0x2011, 0x0008, 0x080c, 0x5e56, 0x60c3, 0x0014, 0x080c,
-	0x5ed3, 0x0005, 0x00f6, 0x7090, 0x9005, 0x0500, 0x2011, 0x5ea9,
-	0x080c, 0x8651, 0x9086, 0x0014, 0x11b8, 0x080c, 0x601e, 0x2079,
-	0x0260, 0x7a30, 0x9296, 0x1103, 0x1178, 0x7834, 0x9005, 0x1160,
+	0x6043, 0x0006, 0x708f, 0x0002, 0x709b, 0x0002, 0x2009, 0x07d0,
+	0x2011, 0x5ef7, 0x080c, 0x8792, 0x080c, 0x6073, 0x04c0, 0x080c,
+	0x606c, 0x2079, 0x0260, 0x7930, 0x918e, 0x1101, 0x1558, 0x7834,
+	0x9005, 0x1540, 0x7900, 0x918c, 0x00ff, 0x1118, 0x7804, 0x9005,
+	0x0190, 0x080c, 0x606c, 0x2011, 0x026e, 0x2019, 0x1805, 0x20a9,
+	0x0004, 0x220c, 0x2304, 0x9102, 0x0230, 0x11a0, 0x8210, 0x8318,
+	0x1f04, 0x5909, 0x0078, 0x70a3, 0x0000, 0x080c, 0x606c, 0x20e1,
+	0x0000, 0x2099, 0x0260, 0x20e9, 0x0001, 0x20a1, 0x1d00, 0x20a9,
+	0x0014, 0x4003, 0x6043, 0x0008, 0x6043, 0x0000, 0x0010, 0x00fe,
+	0x0005, 0x6040, 0x9085, 0x0100, 0x6042, 0x6020, 0xd0b4, 0x1db8,
+	0x080c, 0xa713, 0x20e1, 0x0001, 0x2099, 0x1d00, 0x20e9, 0x0000,
+	0x20a1, 0x0240, 0x20a9, 0x0014, 0x4003, 0x60c3, 0x000c, 0x2011,
+	0x19f3, 0x2013, 0x0000, 0x7093, 0x0000, 0x60a3, 0x0056, 0x60a7,
+	0x9575, 0x080c, 0x9ec7, 0x08d8, 0x0005, 0x7098, 0x908a, 0x001d,
+	0x1a0c, 0x0d7d, 0x000b, 0x0005, 0x597e, 0x5991, 0x59ba, 0x59da,
+	0x5a00, 0x5a2f, 0x5a55, 0x5a8d, 0x5ab3, 0x5ae1, 0x5b1c, 0x5b54,
+	0x5b72, 0x5b9d, 0x5bbf, 0x5bda, 0x5be4, 0x5c18, 0x5c3e, 0x5c6d,
+	0x5c93, 0x5ccb, 0x5d0f, 0x5d4c, 0x5d6d, 0x5dc6, 0x5de8, 0x5e16,
+	0x5e16, 0x00c6, 0x2061, 0x1800, 0x6003, 0x0007, 0x2061, 0x0100,
+	0x6004, 0x9084, 0xfff9, 0x6006, 0x00ce, 0x0005, 0x2061, 0x0140,
+	0x605b, 0xbc94, 0x605f, 0xf0f0, 0x2061, 0x0100, 0x6043, 0x0002,
+	0x709b, 0x0001, 0x2009, 0x07d0, 0x2011, 0x5ef7, 0x080c, 0x8792,
+	0x0005, 0x00f6, 0x7090, 0x9086, 0x0014, 0x1510, 0x6042, 0x6020,
+	0xd0b4, 0x11f0, 0x080c, 0x606c, 0x2079, 0x0260, 0x7a30, 0x9296,
+	0x1102, 0x11a0, 0x7834, 0x9005, 0x1188, 0x7a38, 0xd2fc, 0x0128,
+	0x70c4, 0x9005, 0x1110, 0x70c7, 0x0001, 0x2011, 0x5ef7, 0x080c,
+	0x86c8, 0x709b, 0x0010, 0x080c, 0x5be4, 0x0010, 0x7093, 0x0000,
+	0x00fe, 0x0005, 0x00f6, 0x709b, 0x0003, 0x6043, 0x0004, 0x2011,
+	0x5ef7, 0x080c, 0x86c8, 0x080c, 0x5ff0, 0x2079, 0x0240, 0x7833,
+	0x1102, 0x7837, 0x0000, 0x20a9, 0x0008, 0x9f88, 0x000e, 0x200b,
+	0x0000, 0x8108, 0x1f04, 0x59cf, 0x60c3, 0x0014, 0x080c, 0x5f21,
+	0x00fe, 0x0005, 0x00f6, 0x7090, 0x9005, 0x0500, 0x2011, 0x5ef7,
+	0x080c, 0x86c8, 0x9086, 0x0014, 0x11b8, 0x080c, 0x606c, 0x2079,
+	0x0260, 0x7a30, 0x9296, 0x1102, 0x1178, 0x7834, 0x9005, 0x1160,
 	0x7a38, 0xd2fc, 0x0128, 0x70c4, 0x9005, 0x1110, 0x70c7, 0x0001,
-	0x709b, 0x0012, 0x0029, 0x0010, 0x7093, 0x0000, 0x00fe, 0x0005,
-	0x00f6, 0x709b, 0x0013, 0x080c, 0x5fb0, 0x2079, 0x0240, 0x7833,
-	0x1103, 0x7837, 0x0000, 0x080c, 0x601e, 0x080c, 0x6001, 0x1170,
+	0x709b, 0x0004, 0x0029, 0x0010, 0x080c, 0x6048, 0x00fe, 0x0005,
+	0x00f6, 0x709b, 0x0005, 0x080c, 0x5ff0, 0x2079, 0x0240, 0x7833,
+	0x1103, 0x7837, 0x0000, 0x080c, 0x606c, 0x080c, 0x604f, 0x1170,
 	0x7084, 0x9005, 0x1158, 0x715c, 0x9186, 0xffff, 0x0138, 0x2011,
-	0x0008, 0x080c, 0x5e56, 0x0168, 0x080c, 0x5fd7, 0x20a9, 0x0008,
+	0x0008, 0x080c, 0x5ea4, 0x0168, 0x080c, 0x6025, 0x20a9, 0x0008,
 	0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9, 0x0000, 0x20a1, 0x024e,
-	0x4003, 0x60c3, 0x0014, 0x080c, 0x5ed3, 0x00fe, 0x0005, 0x00f6,
-	0x7090, 0x9005, 0x0500, 0x2011, 0x5ea9, 0x080c, 0x8651, 0x9086,
-	0x0014, 0x11b8, 0x080c, 0x601e, 0x2079, 0x0260, 0x7a30, 0x9296,
-	0x1104, 0x1178, 0x7834, 0x9005, 0x1160, 0x7a38, 0xd2fc, 0x0128,
-	0x70c4, 0x9005, 0x1110, 0x70c7, 0x0001, 0x709b, 0x0014, 0x0029,
-	0x0010, 0x7093, 0x0000, 0x00fe, 0x0005, 0x00f6, 0x709b, 0x0015,
-	0x080c, 0x5fb0, 0x2079, 0x0240, 0x7833, 0x1104, 0x7837, 0x0000,
-	0x080c, 0x601e, 0x080c, 0x6001, 0x11b8, 0x7084, 0x9005, 0x11a0,
-	0x7164, 0x9186, 0xffff, 0x0180, 0x9180, 0x3388, 0x200d, 0x918c,
-	0xff00, 0x810f, 0x2011, 0x0008, 0x080c, 0x5e56, 0x0180, 0x080c,
-	0x4fff, 0x0110, 0x080c, 0x2699, 0x20a9, 0x0008, 0x20e1, 0x0000,
+	0x4003, 0x60c3, 0x0014, 0x080c, 0x5f21, 0x00fe, 0x0005, 0x00f6,
+	0x7090, 0x9005, 0x0500, 0x2011, 0x5ef7, 0x080c, 0x86c8, 0x9086,
+	0x0014, 0x11b8, 0x080c, 0x606c, 0x2079, 0x0260, 0x7a30, 0x9296,
+	0x1103, 0x1178, 0x7834, 0x9005, 0x1160, 0x7a38, 0xd2fc, 0x0128,
+	0x70c4, 0x9005, 0x1110, 0x70c7, 0x0001, 0x709b, 0x0006, 0x0029,
+	0x0010, 0x080c, 0x6048, 0x00fe, 0x0005, 0x00f6, 0x709b, 0x0007,
+	0x080c, 0x5ff0, 0x2079, 0x0240, 0x7833, 0x1104, 0x7837, 0x0000,
+	0x080c, 0x606c, 0x080c, 0x604f, 0x11b8, 0x7084, 0x9005, 0x11a0,
+	0x7164, 0x9186, 0xffff, 0x0180, 0x9180, 0x33b9, 0x200d, 0x918c,
+	0xff00, 0x810f, 0x2011, 0x0008, 0x080c, 0x5ea4, 0x0180, 0x080c,
+	0x502d, 0x0110, 0x080c, 0x26ca, 0x20a9, 0x0008, 0x20e1, 0x0000,
+	0x2099, 0x026e, 0x20e9, 0x0000, 0x20a1, 0x024e, 0x4003, 0x60c3,
+	0x0014, 0x080c, 0x5f21, 0x00fe, 0x0005, 0x00f6, 0x7090, 0x9005,
+	0x0500, 0x2011, 0x5ef7, 0x080c, 0x86c8, 0x9086, 0x0014, 0x11b8,
+	0x080c, 0x606c, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1104, 0x1178,
+	0x7834, 0x9005, 0x1160, 0x7a38, 0xd2fc, 0x0128, 0x70c4, 0x9005,
+	0x1110, 0x70c7, 0x0001, 0x709b, 0x0008, 0x0029, 0x0010, 0x080c,
+	0x6048, 0x00fe, 0x0005, 0x00f6, 0x709b, 0x0009, 0x080c, 0x5ff0,
+	0x2079, 0x0240, 0x7833, 0x1105, 0x7837, 0x0100, 0x080c, 0x604f,
+	0x1150, 0x7084, 0x9005, 0x1138, 0x080c, 0x5e17, 0x1188, 0x9085,
+	0x0001, 0x080c, 0x26ca, 0x20a9, 0x0008, 0x080c, 0x606c, 0x20e1,
+	0x0000, 0x2099, 0x026e, 0x20e9, 0x0000, 0x20a1, 0x024e, 0x4003,
+	0x60c3, 0x0014, 0x080c, 0x5f21, 0x0010, 0x080c, 0x5971, 0x00fe,
+	0x0005, 0x00f6, 0x7090, 0x9005, 0x05a8, 0x2011, 0x5ef7, 0x080c,
+	0x86c8, 0x9086, 0x0014, 0x1560, 0x080c, 0x606c, 0x2079, 0x0260,
+	0x7a30, 0x9296, 0x1105, 0x1520, 0x7834, 0x9084, 0x0100, 0x2011,
+	0x0100, 0x921e, 0x1160, 0x7a38, 0xd2fc, 0x0128, 0x70c4, 0x9005,
+	0x1110, 0x70c7, 0x0001, 0x709b, 0x000a, 0x00b1, 0x0098, 0x9005,
+	0x1178, 0x7a38, 0xd2fc, 0x0128, 0x70c4, 0x9005, 0x1110, 0x70c7,
+	0x0001, 0x7097, 0x0000, 0x709b, 0x000e, 0x080c, 0x5bbf, 0x0010,
+	0x080c, 0x6048, 0x00fe, 0x0005, 0x00f6, 0x709b, 0x000b, 0x2011,
+	0x1d0e, 0x20e9, 0x0001, 0x22a0, 0x20a9, 0x0040, 0x2019, 0xffff,
+	0x4304, 0x080c, 0x5ff0, 0x2079, 0x0240, 0x7833, 0x1106, 0x7837,
+	0x0000, 0x080c, 0x604f, 0x0118, 0x2013, 0x0000, 0x0020, 0x7060,
+	0x9085, 0x0100, 0x2012, 0x20a9, 0x0040, 0x2009, 0x024e, 0x2011,
+	0x1d0e, 0x220e, 0x8210, 0x8108, 0x9186, 0x0260, 0x1128, 0x6810,
+	0x8000, 0x6812, 0x2009, 0x0240, 0x1f04, 0x5b41, 0x60c3, 0x0084,
+	0x080c, 0x5f21, 0x00fe, 0x0005, 0x00f6, 0x7090, 0x9005, 0x01c0,
+	0x2011, 0x5ef7, 0x080c, 0x86c8, 0x9086, 0x0084, 0x1178, 0x080c,
+	0x606c, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1106, 0x1138, 0x7834,
+	0x9005, 0x1120, 0x709b, 0x000c, 0x0029, 0x0010, 0x080c, 0x6048,
+	0x00fe, 0x0005, 0x00f6, 0x709b, 0x000d, 0x080c, 0x5ff0, 0x2079,
+	0x0240, 0x7833, 0x1107, 0x7837, 0x0000, 0x080c, 0x606c, 0x20a9,
+	0x0040, 0x2011, 0x026e, 0x2009, 0x024e, 0x220e, 0x8210, 0x8108,
+	0x9186, 0x0260, 0x1150, 0x6810, 0x8000, 0x6812, 0x2009, 0x0240,
+	0x6814, 0x8000, 0x6816, 0x2011, 0x0260, 0x1f04, 0x5b85, 0x60c3,
+	0x0084, 0x080c, 0x5f21, 0x00fe, 0x0005, 0x00f6, 0x7090, 0x9005,
+	0x01e0, 0x2011, 0x5ef7, 0x080c, 0x86c8, 0x9086, 0x0084, 0x1198,
+	0x080c, 0x606c, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1107, 0x1158,
+	0x7834, 0x9005, 0x1140, 0x7097, 0x0001, 0x080c, 0x5fc2, 0x709b,
+	0x000e, 0x0029, 0x0010, 0x080c, 0x6048, 0x00fe, 0x0005, 0x918d,
+	0x0001, 0x080c, 0x6097, 0x709b, 0x000f, 0x7093, 0x0000, 0x2061,
+	0x0140, 0x605b, 0xbc85, 0x605f, 0xb5b5, 0x2061, 0x0100, 0x6043,
+	0x0005, 0x6043, 0x0004, 0x2009, 0x07d0, 0x2011, 0x5ef7, 0x080c,
+	0x86bc, 0x0005, 0x7090, 0x9005, 0x0130, 0x2011, 0x5ef7, 0x080c,
+	0x86c8, 0x709b, 0x0000, 0x0005, 0x709b, 0x0011, 0x080c, 0xa713,
+	0x080c, 0x606c, 0x20e1, 0x0000, 0x2099, 0x0260, 0x20e9, 0x0000,
+	0x20a1, 0x0240, 0x7490, 0x9480, 0x0018, 0x9080, 0x0007, 0x9084,
+	0x03f8, 0x8004, 0x20a8, 0x4003, 0x080c, 0x604f, 0x11a0, 0x717c,
+	0x81ff, 0x0188, 0x900e, 0x7080, 0x9084, 0x00ff, 0x0160, 0x080c,
+	0x2661, 0x9186, 0x007e, 0x0138, 0x9186, 0x0080, 0x0120, 0x2011,
+	0x0008, 0x080c, 0x5ea4, 0x60c3, 0x0014, 0x080c, 0x5f21, 0x0005,
+	0x00f6, 0x7090, 0x9005, 0x0500, 0x2011, 0x5ef7, 0x080c, 0x86c8,
+	0x9086, 0x0014, 0x11b8, 0x080c, 0x606c, 0x2079, 0x0260, 0x7a30,
+	0x9296, 0x1103, 0x1178, 0x7834, 0x9005, 0x1160, 0x7a38, 0xd2fc,
+	0x0128, 0x70c4, 0x9005, 0x1110, 0x70c7, 0x0001, 0x709b, 0x0012,
+	0x0029, 0x0010, 0x7093, 0x0000, 0x00fe, 0x0005, 0x00f6, 0x709b,
+	0x0013, 0x080c, 0x5ffe, 0x2079, 0x0240, 0x7833, 0x1103, 0x7837,
+	0x0000, 0x080c, 0x606c, 0x080c, 0x604f, 0x1170, 0x7084, 0x9005,
+	0x1158, 0x715c, 0x9186, 0xffff, 0x0138, 0x2011, 0x0008, 0x080c,
+	0x5ea4, 0x0168, 0x080c, 0x6025, 0x20a9, 0x0008, 0x20e1, 0x0000,
 	0x2099, 0x026e, 0x20e9, 0x0000, 0x20a1, 0x024e, 0x4003, 0x60c3,
-	0x0014, 0x080c, 0x5ed3, 0x00fe, 0x0005, 0x00f6, 0x7090, 0x9005,
-	0x05f0, 0x2011, 0x5ea9, 0x080c, 0x8651, 0x9086, 0x0014, 0x15a8,
-	0x080c, 0x601e, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1105, 0x1568,
-	0x7834, 0x9084, 0x0100, 0x2011, 0x0100, 0x921e, 0x1168, 0x9085,
-	0x0001, 0x080c, 0x6049, 0x7a38, 0xd2fc, 0x0128, 0x70c4, 0x9005,
-	0x1110, 0x70c7, 0x0001, 0x0080, 0x9005, 0x11b8, 0x7a38, 0xd2fc,
-	0x0128, 0x70c4, 0x9005, 0x1110, 0x70c7, 0x0001, 0x9085, 0x0001,
-	0x080c, 0x6049, 0x7097, 0x0000, 0x7a38, 0xd2f4, 0x0110, 0x70df,
-	0x0008, 0x709b, 0x0016, 0x0029, 0x0010, 0x7093, 0x0000, 0x00fe,
-	0x0005, 0x080c, 0xa68e, 0x080c, 0x601e, 0x20e1, 0x0000, 0x2099,
-	0x0260, 0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9, 0x000e, 0x4003,
-	0x2011, 0x026d, 0x2204, 0x9084, 0x0100, 0x2011, 0x024d, 0x2012,
-	0x2011, 0x026e, 0x709b, 0x0017, 0x080c, 0x6001, 0x1150, 0x7084,
-	0x9005, 0x1138, 0x080c, 0x5dc9, 0x1188, 0x9085, 0x0001, 0x080c,
-	0x2699, 0x20a9, 0x0008, 0x080c, 0x601e, 0x20e1, 0x0000, 0x2099,
-	0x026e, 0x20e9, 0x0000, 0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014,
-	0x080c, 0x5ed3, 0x0010, 0x080c, 0x5923, 0x0005, 0x00f6, 0x7090,
-	0x9005, 0x01d8, 0x2011, 0x5ea9, 0x080c, 0x8651, 0x9086, 0x0084,
-	0x1190, 0x080c, 0x601e, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1106,
-	0x1150, 0x7834, 0x9005, 0x1138, 0x9006, 0x080c, 0x6049, 0x709b,
-	0x0018, 0x0029, 0x0010, 0x7093, 0x0000, 0x00fe, 0x0005, 0x00f6,
-	0x709b, 0x0019, 0x080c, 0x5fb0, 0x2079, 0x0240, 0x7833, 0x1106,
-	0x7837, 0x0000, 0x080c, 0x601e, 0x2009, 0x026e, 0x2039, 0x1d0e,
-	0x20a9, 0x0040, 0x213e, 0x8738, 0x8108, 0x9186, 0x0280, 0x1128,
-	0x6814, 0x8000, 0x6816, 0x2009, 0x0260, 0x1f04, 0x5d32, 0x2039,
-	0x1d0e, 0x080c, 0x6001, 0x11e8, 0x2728, 0x2514, 0x8207, 0x9084,
-	0x00ff, 0x8000, 0x2018, 0x9294, 0x00ff, 0x8007, 0x9205, 0x202a,
-	0x7060, 0x2310, 0x8214, 0x92a0, 0x1d0e, 0x2414, 0x938c, 0x0001,
-	0x0118, 0x9294, 0xff00, 0x0018, 0x9294, 0x00ff, 0x8007, 0x9215,
-	0x2222, 0x20a9, 0x0040, 0x2009, 0x024e, 0x270e, 0x8738, 0x8108,
-	0x9186, 0x0260, 0x1128, 0x6810, 0x8000, 0x6812, 0x2009, 0x0240,
-	0x1f04, 0x5d65, 0x60c3, 0x0084, 0x080c, 0x5ed3, 0x00fe, 0x0005,
-	0x00f6, 0x7090, 0x9005, 0x01e0, 0x2011, 0x5ea9, 0x080c, 0x8651,
-	0x9086, 0x0084, 0x1198, 0x080c, 0x601e, 0x2079, 0x0260, 0x7a30,
-	0x9296, 0x1107, 0x1158, 0x7834, 0x9005, 0x1140, 0x7097, 0x0001,
-	0x080c, 0x5f74, 0x709b, 0x001a, 0x0029, 0x0010, 0x7093, 0x0000,
-	0x00fe, 0x0005, 0x9085, 0x0001, 0x080c, 0x6049, 0x709b, 0x001b,
-	0x080c, 0xa68e, 0x080c, 0x601e, 0x2011, 0x0260, 0x2009, 0x0240,
-	0x7490, 0x9480, 0x0018, 0x9080, 0x0007, 0x9084, 0x03f8, 0x8004,
-	0x20a8, 0x220e, 0x8210, 0x8108, 0x9186, 0x0260, 0x1150, 0x6810,
-	0x8000, 0x6812, 0x2009, 0x0240, 0x6814, 0x8000, 0x6816, 0x2011,
-	0x0260, 0x1f04, 0x5db1, 0x60c3, 0x0084, 0x080c, 0x5ed3, 0x0005,
-	0x0005, 0x0086, 0x0096, 0x2029, 0x1848, 0x252c, 0x20a9, 0x0008,
-	0x2041, 0x1d0e, 0x20e9, 0x0001, 0x28a0, 0x080c, 0x601e, 0x20e1,
-	0x0000, 0x2099, 0x026e, 0x4003, 0x20a9, 0x0008, 0x2011, 0x0007,
-	0xd5d4, 0x0108, 0x9016, 0x2800, 0x9200, 0x200c, 0x91a6, 0xffff,
-	0x1148, 0xd5d4, 0x0110, 0x8210, 0x0008, 0x8211, 0x1f04, 0x5de3,
-	0x0804, 0x5e52, 0x82ff, 0x1160, 0xd5d4, 0x0120, 0x91a6, 0x3fff,
-	0x0d90, 0x0020, 0x91a6, 0x3fff, 0x0904, 0x5e52, 0x918d, 0xc000,
-	0x20a9, 0x0010, 0x2019, 0x0001, 0xd5d4, 0x0110, 0x2019, 0x0010,
-	0x2120, 0xd5d4, 0x0110, 0x8423, 0x0008, 0x8424, 0x1240, 0xd5d4,
-	0x0110, 0x8319, 0x0008, 0x8318, 0x1f04, 0x5e09, 0x04d8, 0x23a8,
-	0x2021, 0x0001, 0x8426, 0x8425, 0x1f04, 0x5e1b, 0x2328, 0x8529,
-	0x92be, 0x0007, 0x0158, 0x0006, 0x2039, 0x0007, 0x2200, 0x973a,
-	0x000e, 0x27a8, 0x95a8, 0x0010, 0x1f04, 0x5e2a, 0x755e, 0x95c8,
-	0x3388, 0x292d, 0x95ac, 0x00ff, 0x7582, 0x6532, 0x6536, 0x0016,
-	0x2508, 0x080c, 0x2679, 0x001e, 0x60e7, 0x0000, 0x65ea, 0x2018,
-	0x2304, 0x9405, 0x201a, 0x7087, 0x0001, 0x20e9, 0x0000, 0x20a1,
-	0x024e, 0x20e1, 0x0001, 0x2898, 0x20a9, 0x0008, 0x4003, 0x9085,
-	0x0001, 0x0008, 0x9006, 0x009e, 0x008e, 0x0005, 0x0156, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x22a8, 0x20e1, 0x0000, 0x2099, 0x026e,
-	0x20e9, 0x0000, 0x2011, 0x024e, 0x22a0, 0x4003, 0x014e, 0x013e,
-	0x01de, 0x01ce, 0x015e, 0x2118, 0x9026, 0x2001, 0x0007, 0x939a,
-	0x0010, 0x0218, 0x8420, 0x8001, 0x0cd0, 0x2118, 0x84ff, 0x0120,
-	0x939a, 0x0010, 0x8421, 0x1de0, 0x2021, 0x0001, 0x83ff, 0x0118,
-	0x8423, 0x8319, 0x1de8, 0x9238, 0x2029, 0x026e, 0x9528, 0x2504,
-	0x942c, 0x11b8, 0x9405, 0x203a, 0x715e, 0x91a0, 0x3388, 0x242d,
+	0x0014, 0x080c, 0x5f21, 0x00fe, 0x0005, 0x00f6, 0x7090, 0x9005,
+	0x0500, 0x2011, 0x5ef7, 0x080c, 0x86c8, 0x9086, 0x0014, 0x11b8,
+	0x080c, 0x606c, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1104, 0x1178,
+	0x7834, 0x9005, 0x1160, 0x7a38, 0xd2fc, 0x0128, 0x70c4, 0x9005,
+	0x1110, 0x70c7, 0x0001, 0x709b, 0x0014, 0x0029, 0x0010, 0x7093,
+	0x0000, 0x00fe, 0x0005, 0x00f6, 0x709b, 0x0015, 0x080c, 0x5ffe,
+	0x2079, 0x0240, 0x7833, 0x1104, 0x7837, 0x0000, 0x080c, 0x606c,
+	0x080c, 0x604f, 0x11b8, 0x7084, 0x9005, 0x11a0, 0x7164, 0x9186,
+	0xffff, 0x0180, 0x9180, 0x33b9, 0x200d, 0x918c, 0xff00, 0x810f,
+	0x2011, 0x0008, 0x080c, 0x5ea4, 0x0180, 0x080c, 0x502d, 0x0110,
+	0x080c, 0x26ca, 0x20a9, 0x0008, 0x20e1, 0x0000, 0x2099, 0x026e,
+	0x20e9, 0x0000, 0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014, 0x080c,
+	0x5f21, 0x00fe, 0x0005, 0x00f6, 0x7090, 0x9005, 0x05f0, 0x2011,
+	0x5ef7, 0x080c, 0x86c8, 0x9086, 0x0014, 0x15a8, 0x080c, 0x606c,
+	0x2079, 0x0260, 0x7a30, 0x9296, 0x1105, 0x1568, 0x7834, 0x9084,
+	0x0100, 0x2011, 0x0100, 0x921e, 0x1168, 0x9085, 0x0001, 0x080c,
+	0x6097, 0x7a38, 0xd2fc, 0x0128, 0x70c4, 0x9005, 0x1110, 0x70c7,
+	0x0001, 0x0080, 0x9005, 0x11b8, 0x7a38, 0xd2fc, 0x0128, 0x70c4,
+	0x9005, 0x1110, 0x70c7, 0x0001, 0x9085, 0x0001, 0x080c, 0x6097,
+	0x7097, 0x0000, 0x7a38, 0xd2f4, 0x0110, 0x70df, 0x0008, 0x709b,
+	0x0016, 0x0029, 0x0010, 0x7093, 0x0000, 0x00fe, 0x0005, 0x080c,
+	0xa713, 0x080c, 0x606c, 0x20e1, 0x0000, 0x2099, 0x0260, 0x20e9,
+	0x0000, 0x20a1, 0x0240, 0x20a9, 0x000e, 0x4003, 0x2011, 0x026d,
+	0x2204, 0x9084, 0x0100, 0x2011, 0x024d, 0x2012, 0x2011, 0x026e,
+	0x709b, 0x0017, 0x080c, 0x604f, 0x1150, 0x7084, 0x9005, 0x1138,
+	0x080c, 0x5e17, 0x1188, 0x9085, 0x0001, 0x080c, 0x26ca, 0x20a9,
+	0x0008, 0x080c, 0x606c, 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9,
+	0x0000, 0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014, 0x080c, 0x5f21,
+	0x0010, 0x080c, 0x5971, 0x0005, 0x00f6, 0x7090, 0x9005, 0x01d8,
+	0x2011, 0x5ef7, 0x080c, 0x86c8, 0x9086, 0x0084, 0x1190, 0x080c,
+	0x606c, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1106, 0x1150, 0x7834,
+	0x9005, 0x1138, 0x9006, 0x080c, 0x6097, 0x709b, 0x0018, 0x0029,
+	0x0010, 0x7093, 0x0000, 0x00fe, 0x0005, 0x00f6, 0x709b, 0x0019,
+	0x080c, 0x5ffe, 0x2079, 0x0240, 0x7833, 0x1106, 0x7837, 0x0000,
+	0x080c, 0x606c, 0x2009, 0x026e, 0x2039, 0x1d0e, 0x20a9, 0x0040,
+	0x213e, 0x8738, 0x8108, 0x9186, 0x0280, 0x1128, 0x6814, 0x8000,
+	0x6816, 0x2009, 0x0260, 0x1f04, 0x5d80, 0x2039, 0x1d0e, 0x080c,
+	0x604f, 0x11e8, 0x2728, 0x2514, 0x8207, 0x9084, 0x00ff, 0x8000,
+	0x2018, 0x9294, 0x00ff, 0x8007, 0x9205, 0x202a, 0x7060, 0x2310,
+	0x8214, 0x92a0, 0x1d0e, 0x2414, 0x938c, 0x0001, 0x0118, 0x9294,
+	0xff00, 0x0018, 0x9294, 0x00ff, 0x8007, 0x9215, 0x2222, 0x20a9,
+	0x0040, 0x2009, 0x024e, 0x270e, 0x8738, 0x8108, 0x9186, 0x0260,
+	0x1128, 0x6810, 0x8000, 0x6812, 0x2009, 0x0240, 0x1f04, 0x5db3,
+	0x60c3, 0x0084, 0x080c, 0x5f21, 0x00fe, 0x0005, 0x00f6, 0x7090,
+	0x9005, 0x01e0, 0x2011, 0x5ef7, 0x080c, 0x86c8, 0x9086, 0x0084,
+	0x1198, 0x080c, 0x606c, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1107,
+	0x1158, 0x7834, 0x9005, 0x1140, 0x7097, 0x0001, 0x080c, 0x5fc2,
+	0x709b, 0x001a, 0x0029, 0x0010, 0x7093, 0x0000, 0x00fe, 0x0005,
+	0x9085, 0x0001, 0x080c, 0x6097, 0x709b, 0x001b, 0x080c, 0xa713,
+	0x080c, 0x606c, 0x2011, 0x0260, 0x2009, 0x0240, 0x7490, 0x9480,
+	0x0018, 0x9080, 0x0007, 0x9084, 0x03f8, 0x8004, 0x20a8, 0x220e,
+	0x8210, 0x8108, 0x9186, 0x0260, 0x1150, 0x6810, 0x8000, 0x6812,
+	0x2009, 0x0240, 0x6814, 0x8000, 0x6816, 0x2011, 0x0260, 0x1f04,
+	0x5dff, 0x60c3, 0x0084, 0x080c, 0x5f21, 0x0005, 0x0005, 0x0086,
+	0x0096, 0x2029, 0x1848, 0x252c, 0x20a9, 0x0008, 0x2041, 0x1d0e,
+	0x20e9, 0x0001, 0x28a0, 0x080c, 0x606c, 0x20e1, 0x0000, 0x2099,
+	0x026e, 0x4003, 0x20a9, 0x0008, 0x2011, 0x0007, 0xd5d4, 0x0108,
+	0x9016, 0x2800, 0x9200, 0x200c, 0x91a6, 0xffff, 0x1148, 0xd5d4,
+	0x0110, 0x8210, 0x0008, 0x8211, 0x1f04, 0x5e31, 0x0804, 0x5ea0,
+	0x82ff, 0x1160, 0xd5d4, 0x0120, 0x91a6, 0x3fff, 0x0d90, 0x0020,
+	0x91a6, 0x3fff, 0x0904, 0x5ea0, 0x918d, 0xc000, 0x20a9, 0x0010,
+	0x2019, 0x0001, 0xd5d4, 0x0110, 0x2019, 0x0010, 0x2120, 0xd5d4,
+	0x0110, 0x8423, 0x0008, 0x8424, 0x1240, 0xd5d4, 0x0110, 0x8319,
+	0x0008, 0x8318, 0x1f04, 0x5e57, 0x04d8, 0x23a8, 0x2021, 0x0001,
+	0x8426, 0x8425, 0x1f04, 0x5e69, 0x2328, 0x8529, 0x92be, 0x0007,
+	0x0158, 0x0006, 0x2039, 0x0007, 0x2200, 0x973a, 0x000e, 0x27a8,
+	0x95a8, 0x0010, 0x1f04, 0x5e78, 0x755e, 0x95c8, 0x33b9, 0x292d,
 	0x95ac, 0x00ff, 0x7582, 0x6532, 0x6536, 0x0016, 0x2508, 0x080c,
-	0x2679, 0x001e, 0x60e7, 0x0000, 0x65ea, 0x7087, 0x0001, 0x9084,
-	0x0000, 0x0005, 0x00e6, 0x2071, 0x1800, 0x708b, 0x0000, 0x00ee,
-	0x0005, 0x00e6, 0x00f6, 0x2079, 0x0100, 0x2071, 0x0140, 0x080c,
-	0x5f63, 0x080c, 0x9e4f, 0x7004, 0x9084, 0x4000, 0x0110, 0x080c,
-	0x2a59, 0x0126, 0x2091, 0x8000, 0x2071, 0x1826, 0x2073, 0x0000,
-	0x7840, 0x0026, 0x0016, 0x2009, 0x00f7, 0x080c, 0x5fc0, 0x001e,
-	0x9094, 0x0010, 0x9285, 0x0080, 0x7842, 0x7a42, 0x002e, 0x012e,
-	0x00fe, 0x00ee, 0x0005, 0x0126, 0x2091, 0x8000, 0x080c, 0x29b4,
-	0x0228, 0x2011, 0x0101, 0x2204, 0xc0c5, 0x2012, 0x2011, 0x19f3,
-	0x2013, 0x0000, 0x7093, 0x0000, 0x012e, 0x60a3, 0x0056, 0x60a7,
-	0x9575, 0x080c, 0x9e42, 0x6144, 0xd184, 0x0120, 0x7198, 0x918d,
-	0x2000, 0x0018, 0x718c, 0x918d, 0x1000, 0x2011, 0x1998, 0x2112,
-	0x2009, 0x07d0, 0x2011, 0x5ea9, 0x080c, 0x871b, 0x0005, 0x0016,
-	0x0026, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0xa899, 0x080c,
-	0xab61, 0x080c, 0xa8b5, 0x2009, 0x00f7, 0x080c, 0x5fc0, 0x2061,
-	0x1a02, 0x900e, 0x611a, 0x611e, 0x6172, 0x6176, 0x2061, 0x1800,
-	0x6003, 0x0001, 0x2061, 0x0100, 0x6043, 0x0090, 0x6043, 0x0010,
-	0x2009, 0x1998, 0x200b, 0x0000, 0x2009, 0x002d, 0x2011, 0x5f2f,
-	0x080c, 0x8645, 0x012e, 0x00ce, 0x002e, 0x001e, 0x0005, 0x00e6,
-	0x0006, 0x0126, 0x2091, 0x8000, 0x0471, 0x2071, 0x0100, 0x080c,
-	0x9e4f, 0x2071, 0x0140, 0x7004, 0x9084, 0x4000, 0x0110, 0x080c,
-	0x2a59, 0x080c, 0x74f4, 0x0188, 0x080c, 0x750f, 0x1170, 0x080c,
-	0x77f9, 0x0016, 0x080c, 0x2748, 0x2001, 0x196c, 0x2102, 0x001e,
-	0x080c, 0x77f4, 0x080c, 0x741d, 0x0050, 0x2009, 0x0001, 0x080c,
-	0x2a35, 0x2001, 0x0001, 0x080c, 0x25d5, 0x080c, 0x5eff, 0x012e,
-	0x000e, 0x00ee, 0x0005, 0x2001, 0x180e, 0x2004, 0xd0bc, 0x0158,
-	0x0026, 0x0036, 0x2011, 0x8017, 0x2001, 0x1998, 0x201c, 0x080c,
-	0x4b29, 0x003e, 0x002e, 0x0005, 0x20a9, 0x0012, 0x20e9, 0x0001,
-	0x20a1, 0x1d80, 0x080c, 0x601e, 0x20e9, 0x0000, 0x2099, 0x026e,
-	0x0099, 0x20a9, 0x0020, 0x080c, 0x6018, 0x2099, 0x0260, 0x20a1,
-	0x1d92, 0x0051, 0x20a9, 0x000e, 0x080c, 0x601b, 0x2099, 0x0260,
-	0x20a1, 0x1db2, 0x0009, 0x0005, 0x0016, 0x0026, 0x3410, 0x3308,
-	0x2104, 0x8007, 0x2012, 0x8108, 0x8210, 0x1f04, 0x5f98, 0x002e,
-	0x001e, 0x0005, 0x080c, 0xa68e, 0x20e1, 0x0001, 0x2099, 0x1d00,
-	0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9, 0x000c, 0x4003, 0x0005,
-	0x080c, 0xa68e, 0x080c, 0x601e, 0x20e1, 0x0000, 0x2099, 0x0260,
-	0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9, 0x000c, 0x4003, 0x0005,
-	0x00c6, 0x0006, 0x2061, 0x0100, 0x810f, 0x2001, 0x1834, 0x2004,
-	0x9005, 0x1138, 0x2001, 0x1818, 0x2004, 0x9084, 0x00ff, 0x9105,
-	0x0010, 0x9185, 0x00f7, 0x604a, 0x000e, 0x00ce, 0x0005, 0x0016,
-	0x0046, 0x080c, 0x6a8a, 0x0158, 0x9006, 0x2020, 0x2009, 0x002a,
-	0x080c, 0xe316, 0x2001, 0x180c, 0x200c, 0xc195, 0x2102, 0x2019,
-	0x002a, 0x900e, 0x080c, 0x31d4, 0x080c, 0xcf84, 0x0140, 0x0036,
-	0x2019, 0xffff, 0x2021, 0x0007, 0x080c, 0x4ce0, 0x003e, 0x004e,
-	0x001e, 0x0005, 0x080c, 0x5eff, 0x709b, 0x0000, 0x7093, 0x0000,
-	0x0005, 0x0006, 0x2001, 0x180c, 0x2004, 0xd09c, 0x0100, 0x000e,
-	0x0005, 0x0006, 0x0016, 0x0126, 0x2091, 0x8000, 0x2001, 0x0101,
-	0x200c, 0x918d, 0x0006, 0x2102, 0x012e, 0x001e, 0x000e, 0x0005,
-	0x2009, 0x0001, 0x0020, 0x2009, 0x0002, 0x0008, 0x900e, 0x6814,
-	0x9084, 0xffc0, 0x910d, 0x6916, 0x0005, 0x00f6, 0x0156, 0x0146,
-	0x01d6, 0x9006, 0x20a9, 0x0080, 0x20e9, 0x0001, 0x20a1, 0x1d00,
-	0x4004, 0x2079, 0x1d00, 0x7803, 0x2200, 0x7807, 0x00ef, 0x780f,
-	0x00ef, 0x7813, 0x0138, 0x7823, 0xffff, 0x7827, 0xffff, 0x01de,
-	0x014e, 0x015e, 0x00fe, 0x0005, 0x2001, 0x1800, 0x2003, 0x0001,
-	0x0005, 0x2001, 0x19a5, 0x0118, 0x2003, 0x0001, 0x0010, 0x2003,
-	0x0000, 0x0005, 0x0156, 0x20a9, 0x0800, 0x2009, 0x1000, 0x9006,
-	0x200a, 0x8108, 0x1f04, 0x6058, 0x015e, 0x0005, 0x00d6, 0x0036,
-	0x0156, 0x0136, 0x0146, 0x2069, 0x1847, 0x9006, 0xb802, 0xb8d6,
-	0xb807, 0x0707, 0xb80a, 0xb80e, 0xb812, 0x9198, 0x3388, 0x231d,
-	0x939c, 0x00ff, 0xbb16, 0x0016, 0x0026, 0xb886, 0x080c, 0xab5a,
-	0x1120, 0x9192, 0x007e, 0x1208, 0xbb86, 0x20a9, 0x0004, 0xb8c4,
-	0x20e8, 0xb9c8, 0x9198, 0x0006, 0x9006, 0x23a0, 0x4004, 0x20a9,
-	0x0004, 0x9198, 0x000a, 0x23a0, 0x4004, 0x002e, 0x001e, 0xb83e,
-	0xb842, 0xb8ce, 0xb8d2, 0xb85e, 0xb862, 0xb866, 0xb86a, 0xb86f,
-	0x0100, 0xb872, 0xb876, 0xb87a, 0xb88a, 0xb88e, 0xb893, 0x0008,
-	0xb896, 0xb89a, 0xb89e, 0xb8be, 0xb9a2, 0x0096, 0xb8a4, 0x904d,
-	0x0110, 0x080c, 0x1079, 0xb8a7, 0x0000, 0x009e, 0x9006, 0xb84a,
-	0x6810, 0xb83a, 0x680c, 0xb846, 0xb8bb, 0x0520, 0xb8ac, 0x9005,
-	0x0198, 0x00c6, 0x2060, 0x9c82, 0x1ddc, 0x0a0c, 0x0d7d, 0x2001,
-	0x181a, 0x2004, 0x9c02, 0x1a0c, 0x0d7d, 0x080c, 0x8ba9, 0x00ce,
-	0x090c, 0x8f4f, 0xb8af, 0x0000, 0x6814, 0x9084, 0x00ff, 0xb842,
-	0x014e, 0x013e, 0x015e, 0x003e, 0x00de, 0x0005, 0x0126, 0x2091,
-	0x8000, 0xa974, 0xae78, 0x9684, 0x3fff, 0x9082, 0x4000, 0x1a04,
-	0x6134, 0x9182, 0x0800, 0x1a04, 0x6138, 0x2001, 0x180c, 0x2004,
-	0x9084, 0x0003, 0x1904, 0x613e, 0x9188, 0x1000, 0x2104, 0x905d,
-	0x0198, 0xb804, 0x9084, 0x00ff, 0x908e, 0x0006, 0x1188, 0xb8a4,
-	0x900d, 0x1904, 0x6150, 0x080c, 0x650d, 0x9006, 0x012e, 0x0005,
-	0x2001, 0x0005, 0x900e, 0x04b8, 0x2001, 0x0028, 0x900e, 0x0498,
-	0x9082, 0x0006, 0x1290, 0x080c, 0xab5a, 0x1160, 0xb8a0, 0x9084,
-	0xff80, 0x1140, 0xb900, 0xd1fc, 0x0d10, 0x2001, 0x0029, 0x2009,
-	0x1000, 0x0408, 0x2001, 0x0028, 0x00a8, 0x2009, 0x180c, 0x210c,
-	0xd18c, 0x0118, 0x2001, 0x0004, 0x0068, 0xd184, 0x0118, 0x2001,
-	0x0004, 0x0040, 0x2001, 0x0029, 0xb900, 0xd1fc, 0x0118, 0x2009,
-	0x1000, 0x0048, 0x900e, 0x0038, 0x2001, 0x0029, 0x900e, 0x0018,
-	0x2001, 0x0029, 0x900e, 0x9005, 0x012e, 0x0005, 0x2001, 0x180c,
-	0x2004, 0xd084, 0x19d0, 0x9188, 0x1000, 0x2104, 0x9065, 0x09a8,
-	0x080c, 0x6a8e, 0x1990, 0xb800, 0xd0bc, 0x0978, 0x0804, 0x60f7,
-	0x080c, 0x68b3, 0x0904, 0x6100, 0x0804, 0x60fb, 0x00e6, 0x2071,
-	0x19e6, 0x7004, 0x9086, 0x0002, 0x1128, 0x7030, 0x9080, 0x0004,
-	0x2004, 0x9b06, 0x00ee, 0x0005, 0x00b6, 0x00e6, 0x0126, 0x2091,
-	0x8000, 0xa874, 0x908e, 0x00ff, 0x1120, 0x2001, 0x196a, 0x205c,
-	0x0060, 0xa974, 0x9182, 0x0800, 0x1690, 0x9188, 0x1000, 0x2104,
-	0x905d, 0x01d0, 0x080c, 0x6a2e, 0x11d0, 0x080c, 0xab9a, 0x0570,
-	0x2b00, 0x6012, 0x2900, 0x6016, 0x6023, 0x0009, 0x602b, 0x0000,
-	0xa874, 0x908e, 0x00ff, 0x1110, 0x602b, 0x8000, 0x2009, 0x0043,
-	0x080c, 0xac8d, 0x9006, 0x00b0, 0x2001, 0x0028, 0x0090, 0x2009,
-	0x180c, 0x210c, 0xd18c, 0x0118, 0x2001, 0x0004, 0x0038, 0xd184,
-	0x0118, 0x2001, 0x0004, 0x0010, 0x2001, 0x0029, 0x0010, 0x2001,
-	0x0029, 0x9005, 0x012e, 0x00ee, 0x00be, 0x0005, 0x2001, 0x002c,
-	0x0cc0, 0x00b6, 0x00e6, 0x0126, 0x2091, 0x8000, 0xa974, 0x9182,
-	0x0800, 0x1a04, 0x622c, 0x9188, 0x1000, 0x2104, 0x905d, 0x0904,
-	0x6204, 0xb8a0, 0x9086, 0x007f, 0x0178, 0x080c, 0x6a96, 0x0160,
-	0xa994, 0x81ff, 0x0130, 0x908e, 0x0004, 0x0130, 0x908e, 0x0005,
-	0x0118, 0x080c, 0x6a8e, 0x1598, 0xa87c, 0xd0fc, 0x01e0, 0xa894,
-	0x9005, 0x01c8, 0x2060, 0x0026, 0x2010, 0x080c, 0xc853, 0x002e,
-	0x1120, 0x2001, 0x0008, 0x0804, 0x622e, 0x6020, 0x9086, 0x000a,
-	0x0120, 0x2001, 0x0008, 0x0804, 0x622e, 0x601a, 0x6003, 0x0008,
-	0x2900, 0x6016, 0x0058, 0x080c, 0xab9a, 0x05e8, 0x2b00, 0x6012,
-	0x2900, 0x6016, 0x600b, 0xffff, 0x6023, 0x000a, 0x2009, 0x0003,
-	0x080c, 0xac8d, 0x9006, 0x0458, 0x2001, 0x0028, 0x0438, 0x9082,
-	0x0006, 0x1290, 0x080c, 0xab5a, 0x1160, 0xb8a0, 0x9084, 0xff80,
-	0x1140, 0xb900, 0xd1fc, 0x0900, 0x2001, 0x0029, 0x2009, 0x1000,
-	0x00a8, 0x2001, 0x0028, 0x0090, 0x2009, 0x180c, 0x210c, 0xd18c,
-	0x0118, 0x2001, 0x0004, 0x0050, 0xd184, 0x0118, 0x2001, 0x0004,
-	0x0028, 0x2001, 0x0029, 0x0010, 0x2001, 0x0029, 0x9005, 0x012e,
-	0x00ee, 0x00be, 0x0005, 0x2001, 0x002c, 0x0cc0, 0x00f6, 0x00b6,
-	0x0126, 0x2091, 0x8000, 0xa8e0, 0x9005, 0x1550, 0xa8dc, 0x9082,
-	0x0101, 0x1630, 0xa8c8, 0x9005, 0x1518, 0xa8c4, 0x9082, 0x0101,
-	0x12f8, 0xa974, 0x2079, 0x1800, 0x9182, 0x0800, 0x12e8, 0x7830,
-	0x9084, 0x0003, 0x1130, 0xaa98, 0xab94, 0xa878, 0x9084, 0x0007,
-	0x00ea, 0x7930, 0xd18c, 0x0118, 0x2001, 0x0004, 0x0038, 0xd184,
-	0x0118, 0x2001, 0x0004, 0x0010, 0x2001, 0x0029, 0x900e, 0x0038,
-	0x2001, 0x002c, 0x900e, 0x0018, 0x2001, 0x0029, 0x900e, 0x9006,
-	0x0008, 0x9005, 0x012e, 0x00be, 0x00fe, 0x0005, 0x62c3, 0x627e,
-	0x6295, 0x62c3, 0x62c3, 0x62c3, 0x62c3, 0x62c3, 0x2100, 0x9082,
-	0x007e, 0x1278, 0x080c, 0x65e3, 0x0148, 0x9046, 0xb810, 0x9306,
-	0x1904, 0x62cb, 0xb814, 0x9206, 0x15f0, 0x0028, 0xbb12, 0xba16,
-	0x0010, 0x080c, 0x49dc, 0x0150, 0x04b0, 0x080c, 0x6644, 0x1598,
-	0xb810, 0x9306, 0x1580, 0xb814, 0x9206, 0x1568, 0x080c, 0xab9a,
-	0x0530, 0x2b00, 0x6012, 0x080c, 0xccfe, 0x2900, 0x6016, 0x600b,
-	0xffff, 0x6023, 0x000a, 0xa878, 0x9086, 0x0001, 0x1170, 0x080c,
-	0x320f, 0x9006, 0x080c, 0x6580, 0x2001, 0x0002, 0x080c, 0x6594,
-	0x2001, 0x0200, 0xb86e, 0xb893, 0x0002, 0x2009, 0x0003, 0x080c,
-	0xac8d, 0x9006, 0x0068, 0x2001, 0x0001, 0x900e, 0x0038, 0x2001,
-	0x002c, 0x900e, 0x0018, 0x2001, 0x0028, 0x900e, 0x9005, 0x0000,
-	0x012e, 0x00be, 0x00fe, 0x0005, 0x00b6, 0x00f6, 0x00e6, 0x0126,
-	0x2091, 0x8000, 0xa894, 0x90c6, 0x0015, 0x0904, 0x64b6, 0x90c6,
-	0x0056, 0x0904, 0x64ba, 0x90c6, 0x0066, 0x0904, 0x64be, 0x90c6,
-	0x0067, 0x0904, 0x64c2, 0x90c6, 0x0068, 0x0904, 0x64c6, 0x90c6,
-	0x0071, 0x0904, 0x64ca, 0x90c6, 0x0074, 0x0904, 0x64ce, 0x90c6,
-	0x007c, 0x0904, 0x64d2, 0x90c6, 0x007e, 0x0904, 0x64d6, 0x90c6,
-	0x0037, 0x0904, 0x64da, 0x9016, 0x2079, 0x1800, 0xa974, 0x9186,
-	0x00ff, 0x0904, 0x64b1, 0x9182, 0x0800, 0x1a04, 0x64b1, 0x080c,
-	0x6644, 0x1198, 0xb804, 0x9084, 0x00ff, 0x9082, 0x0006, 0x1268,
-	0xa894, 0x90c6, 0x006f, 0x0148, 0x080c, 0xab5a, 0x1904, 0x649a,
-	0xb8a0, 0x9084, 0xff80, 0x1904, 0x649a, 0xa894, 0x90c6, 0x006f,
-	0x0158, 0x90c6, 0x005e, 0x0904, 0x63fa, 0x90c6, 0x0064, 0x0904,
-	0x6423, 0x2008, 0x0804, 0x63bc, 0xa998, 0xa8b0, 0x2040, 0x080c,
-	0xab5a, 0x1120, 0x9182, 0x007f, 0x0a04, 0x63bc, 0x9186, 0x00ff,
-	0x0904, 0x63bc, 0x9182, 0x0800, 0x1a04, 0x63bc, 0xaaa0, 0xab9c,
-	0x787c, 0x9306, 0x11a8, 0x7880, 0x0096, 0x924e, 0x1128, 0x2208,
-	0x2310, 0x009e, 0x0804, 0x63bc, 0x080c, 0xab5a, 0x1140, 0x99cc,
-	0xff00, 0x009e, 0x1128, 0x2208, 0x2310, 0x0804, 0x63bc, 0x009e,
-	0x080c, 0x49dc, 0x0904, 0x63c6, 0x900e, 0x9016, 0x90c6, 0x4000,
-	0x15e0, 0x0006, 0x080c, 0x6937, 0x1108, 0xc185, 0xb800, 0xd0bc,
-	0x0108, 0xc18d, 0x20a9, 0x0004, 0xa860, 0x20e8, 0xa85c, 0x9080,
-	0x0031, 0x20a0, 0xb8c4, 0x20e0, 0xb8c8, 0x9080, 0x0006, 0x2098,
-	0x080c, 0x0fc4, 0x20a9, 0x0004, 0xa860, 0x20e8, 0xa85c, 0x9080,
-	0x0035, 0x20a0, 0xb8c4, 0x20e0, 0xb8c8, 0x9080, 0x000a, 0x2098,
-	0x080c, 0x0fc4, 0xa8c4, 0xabc8, 0x9305, 0xabcc, 0x9305, 0xabd0,
-	0x9305, 0xabd4, 0x9305, 0xabd8, 0x9305, 0xabdc, 0x9305, 0xabe0,
-	0x9305, 0x9005, 0x0510, 0x000e, 0x00c8, 0x90c6, 0x4007, 0x1110,
-	0x2408, 0x00a0, 0x90c6, 0x4008, 0x1118, 0x2708, 0x2610, 0x0070,
-	0x90c6, 0x4009, 0x1108, 0x0050, 0x90c6, 0x4006, 0x0138, 0x2001,
-	0x4005, 0x2009, 0x000a, 0x0010, 0x2001, 0x4006, 0xa896, 0xa99a,
-	0xaa9e, 0x2001, 0x0030, 0x900e, 0x0478, 0x000e, 0x080c, 0xab9a,
-	0x1130, 0x2001, 0x4005, 0x2009, 0x0003, 0x9016, 0x0c78, 0x2b00,
-	0x6012, 0x080c, 0xccfe, 0x2900, 0x6016, 0x6023, 0x0001, 0xa868,
-	0xd88c, 0x0108, 0xc0f5, 0xa86a, 0x0126, 0x2091, 0x8000, 0x080c,
-	0x320f, 0x012e, 0x9006, 0x080c, 0x6580, 0x2001, 0x0002, 0x080c,
-	0x6594, 0x2009, 0x0002, 0x080c, 0xac8d, 0xa8b0, 0xd094, 0x0118,
-	0xb8d4, 0xc08d, 0xb8d6, 0x9006, 0x9005, 0x012e, 0x00ee, 0x00fe,
-	0x00be, 0x0005, 0x080c, 0x5709, 0x0118, 0x2009, 0x0007, 0x00f8,
-	0xa998, 0xaeb0, 0x080c, 0x6644, 0x1904, 0x63b7, 0x9186, 0x007f,
-	0x0130, 0x080c, 0x6a8e, 0x0118, 0x2009, 0x0009, 0x0080, 0x0096,
-	0x080c, 0x1047, 0x1120, 0x009e, 0x2009, 0x0002, 0x0040, 0x2900,
-	0x009e, 0xa806, 0x080c, 0xca51, 0x19b0, 0x2009, 0x0003, 0x2001,
-	0x4005, 0x0804, 0x63be, 0xa998, 0xaeb0, 0x080c, 0x6644, 0x1904,
-	0x63b7, 0x0096, 0x080c, 0x1047, 0x1128, 0x009e, 0x2009, 0x0002,
-	0x0804, 0x6477, 0x2900, 0x009e, 0xa806, 0x0096, 0x2048, 0x20a9,
-	0x002b, 0xb8c4, 0x20e0, 0xb8c8, 0x2098, 0xa860, 0x20e8, 0xa85c,
-	0x9080, 0x0002, 0x20a0, 0x4003, 0x20a9, 0x0008, 0x9080, 0x0006,
-	0x20a0, 0xbbc8, 0x9398, 0x0006, 0x2398, 0x080c, 0x0fc4, 0x009e,
-	0xa87b, 0x0000, 0xa883, 0x0000, 0xa897, 0x4000, 0xd684, 0x1168,
-	0x080c, 0x56f5, 0xd0b4, 0x1118, 0xa89b, 0x000b, 0x00e0, 0xb800,
-	0xd08c, 0x0118, 0xa89b, 0x000c, 0x00b0, 0x080c, 0x6a8e, 0x0118,
-	0xa89b, 0x0009, 0x0080, 0x080c, 0x5709, 0x0118, 0xa89b, 0x0007,
-	0x0050, 0x080c, 0xca34, 0x1904, 0x63f3, 0x2009, 0x0003, 0x2001,
-	0x4005, 0x0804, 0x63be, 0xa87b, 0x0030, 0xa897, 0x4005, 0xa804,
-	0x8006, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080,
-	0x0002, 0x2009, 0x002b, 0xaaa0, 0xab9c, 0xaca8, 0xada4, 0x2031,
-	0x0000, 0x2041, 0x1296, 0x080c, 0xb114, 0x1904, 0x63f3, 0x2009,
-	0x0002, 0x08e8, 0x2001, 0x0028, 0x900e, 0x0804, 0x63f4, 0x2009,
-	0x180c, 0x210c, 0xd18c, 0x0118, 0x2001, 0x0004, 0x0038, 0xd184,
-	0x0118, 0x2001, 0x0004, 0x0010, 0x2001, 0x0029, 0x900e, 0x0804,
-	0x63f4, 0x2001, 0x0029, 0x900e, 0x0804, 0x63f4, 0x080c, 0x37b6,
-	0x0804, 0x63f5, 0x080c, 0x542a, 0x0804, 0x63f5, 0x080c, 0x4592,
-	0x0804, 0x63f5, 0x080c, 0x460b, 0x0804, 0x63f5, 0x080c, 0x4667,
-	0x0804, 0x63f5, 0x080c, 0x4a9f, 0x0804, 0x63f5, 0x080c, 0x4d4f,
-	0x0804, 0x63f5, 0x080c, 0x5095, 0x0804, 0x63f5, 0x080c, 0x528e,
-	0x0804, 0x63f5, 0x080c, 0x39d4, 0x0804, 0x63f5, 0x00b6, 0xa974,
-	0xae78, 0x9684, 0x3fff, 0x9082, 0x4000, 0x1608, 0x9182, 0x0800,
-	0x1258, 0x9188, 0x1000, 0x2104, 0x905d, 0x0130, 0x080c, 0x6a8e,
-	0x1138, 0x00d9, 0x9006, 0x00b0, 0x2001, 0x0028, 0x900e, 0x0090,
-	0x9082, 0x0006, 0x1240, 0xb900, 0xd1fc, 0x0d98, 0x2001, 0x0029,
-	0x2009, 0x1000, 0x0038, 0x2001, 0x0029, 0x900e, 0x0018, 0x2001,
-	0x0029, 0x900e, 0x9005, 0x00be, 0x0005, 0xa877, 0x0000, 0xb8d0,
-	0x9005, 0x1904, 0x6574, 0xb888, 0x9005, 0x1904, 0x6574, 0xb838,
-	0xb93c, 0x9102, 0x1a04, 0x6574, 0x2b10, 0x080c, 0xabc7, 0x0904,
-	0x6570, 0x8108, 0xb93e, 0x6212, 0x2900, 0x6016, 0x6023, 0x0003,
-	0x600b, 0xffff, 0x6007, 0x0040, 0xa878, 0x605e, 0xa880, 0x9084,
-	0x00ff, 0x6066, 0xa883, 0x0000, 0xa87c, 0xd0ac, 0x0588, 0xc0dd,
-	0xa87e, 0xa888, 0x8001, 0x1530, 0xa816, 0xa864, 0x9094, 0x00f7,
-	0x9296, 0x0011, 0x11f8, 0x9084, 0x00ff, 0xc0bd, 0x601e, 0xa8ac,
-	0xaab0, 0xa836, 0xaa3a, 0x2001, 0x000f, 0x8001, 0x1df0, 0x2001,
-	0x8004, 0x6003, 0x0004, 0x6046, 0x00f6, 0x2079, 0x0380, 0x7818,
-	0xd0bc, 0x1de8, 0x7833, 0x0010, 0x2c00, 0x7836, 0x781b, 0x8080,
-	0x00fe, 0x0005, 0x080c, 0x174b, 0x601c, 0xc0bd, 0x601e, 0x0c38,
-	0xd0b4, 0x190c, 0x1c55, 0x2001, 0x8004, 0x6003, 0x0002, 0x0c18,
-	0x81ff, 0x1110, 0xb88b, 0x0001, 0x2908, 0xb8cc, 0xb9ce, 0x9005,
-	0x1110, 0xb9d2, 0x0020, 0x0096, 0x2048, 0xa902, 0x009e, 0x0005,
-	0x00b6, 0x0126, 0x00c6, 0x0026, 0x2091, 0x8000, 0x6210, 0x2258,
-	0xba00, 0x9005, 0x0110, 0xc285, 0x0008, 0xc284, 0xba02, 0x002e,
-	0x00ce, 0x012e, 0x00be, 0x0005, 0x00b6, 0x0126, 0x00c6, 0x2091,
-	0x8000, 0x6210, 0x2258, 0xba04, 0x0006, 0x9086, 0x0006, 0x1170,
-	0xb89c, 0xd0ac, 0x0158, 0x080c, 0x6a8a, 0x0140, 0x9284, 0xff00,
-	0x8007, 0x9086, 0x0007, 0x1110, 0x2011, 0x0600, 0x000e, 0x9294,
-	0xff00, 0x9215, 0xba06, 0x0006, 0x9086, 0x0006, 0x1120, 0xba90,
-	0x82ff, 0x090c, 0x0d7d, 0x000e, 0x00ce, 0x012e, 0x00be, 0x0005,
-	0x00b6, 0x0126, 0x00c6, 0x2091, 0x8000, 0x6210, 0x2258, 0xba04,
-	0x0006, 0x9086, 0x0006, 0x1168, 0xb89c, 0xd0a4, 0x0150, 0x080c,
-	0x6a86, 0x1138, 0x9284, 0x00ff, 0x9086, 0x0007, 0x1110, 0x2011,
-	0x0006, 0x000e, 0x9294, 0x00ff, 0x8007, 0x9215, 0xba06, 0x00ce,
-	0x012e, 0x00be, 0x0005, 0x9182, 0x0800, 0x0218, 0x9085, 0x0001,
-	0x0005, 0x00d6, 0x0026, 0x9190, 0x1000, 0x2204, 0x905d, 0x1188,
-	0x0096, 0x080c, 0x1047, 0x2958, 0x009e, 0x0168, 0x2b00, 0x2012,
-	0xb85c, 0xb8ca, 0xb860, 0xb8c6, 0x9006, 0xb8a6, 0xb8ae, 0x080c,
-	0x605e, 0x9006, 0x0010, 0x9085, 0x0001, 0x002e, 0x00de, 0x0005,
-	0x00b6, 0x0096, 0x0126, 0x2091, 0x8000, 0x0026, 0x9182, 0x0800,
-	0x0218, 0x9085, 0x0001, 0x0458, 0x00d6, 0x9190, 0x1000, 0x2204,
-	0x905d, 0x0518, 0x2013, 0x0000, 0xb8a4, 0x904d, 0x0110, 0x080c,
-	0x1079, 0x00d6, 0x00c6, 0xb8bc, 0x2060, 0x8cff, 0x0168, 0x600c,
-	0x0006, 0x6014, 0x2048, 0x080c, 0xc865, 0x0110, 0x080c, 0x0ff9,
-	0x080c, 0xabf0, 0x00ce, 0x0c88, 0x00ce, 0x00de, 0x2b48, 0xb8c8,
-	0xb85e, 0xb8c4, 0xb862, 0x080c, 0x1089, 0x00de, 0x9006, 0x002e,
-	0x012e, 0x009e, 0x00be, 0x0005, 0x0016, 0x9182, 0x0800, 0x0218,
-	0x9085, 0x0001, 0x0030, 0x9188, 0x1000, 0x2104, 0x905d, 0x0dc0,
-	0x9006, 0x001e, 0x0005, 0x00d6, 0x0156, 0x0136, 0x0146, 0x9006,
-	0xb80a, 0xb80e, 0xb800, 0xc08c, 0xb802, 0x080c, 0x74ec, 0x1510,
-	0xb8a0, 0x9086, 0x007e, 0x0120, 0x080c, 0xab5a, 0x11d8, 0x0078,
-	0x7040, 0xd0e4, 0x01b8, 0x00c6, 0x2061, 0x1981, 0x7048, 0x2062,
-	0x704c, 0x6006, 0x7050, 0x600a, 0x7054, 0x600e, 0x00ce, 0x703c,
-	0x2069, 0x0140, 0x9005, 0x1110, 0x2001, 0x0001, 0x6886, 0x2069,
-	0x1800, 0x68b6, 0x7040, 0xb85e, 0x7048, 0xb862, 0x704c, 0xb866,
-	0x20e1, 0x0000, 0x2099, 0x0276, 0xb8c4, 0x20e8, 0xb8c8, 0x9088,
-	0x000a, 0x21a0, 0x20a9, 0x0004, 0x4003, 0x2099, 0x027a, 0x9088,
-	0x0006, 0x21a0, 0x20a9, 0x0004, 0x4003, 0x2069, 0x0200, 0x6817,
-	0x0001, 0x7040, 0xb86a, 0x7144, 0xb96e, 0x7048, 0xb872, 0x7050,
-	0xb876, 0x2069, 0x0200, 0x6817, 0x0000, 0xb8a0, 0x9086, 0x007e,
-	0x1110, 0x7144, 0xb96e, 0x9182, 0x0211, 0x1218, 0x2009, 0x0008,
-	0x0400, 0x9182, 0x0259, 0x1218, 0x2009, 0x0007, 0x00d0, 0x9182,
-	0x02c1, 0x1218, 0x2009, 0x0006, 0x00a0, 0x9182, 0x0349, 0x1218,
-	0x2009, 0x0005, 0x0070, 0x9182, 0x0421, 0x1218, 0x2009, 0x0004,
-	0x0040, 0x9182, 0x0581, 0x1218, 0x2009, 0x0003, 0x0010, 0x2009,
-	0x0002, 0xb992, 0x014e, 0x013e, 0x015e, 0x00de, 0x0005, 0x0016,
-	0x0026, 0x00e6, 0x2071, 0x0260, 0x7034, 0xb896, 0x703c, 0xb89a,
-	0x7054, 0xb89e, 0x0036, 0xbbd4, 0xc384, 0xba00, 0x2009, 0x1867,
-	0x210c, 0xd0bc, 0x0120, 0xd1ec, 0x0110, 0xc2ad, 0x0008, 0xc2ac,
-	0xd0c4, 0x0148, 0xd1e4, 0x0138, 0xc2bd, 0xd0cc, 0x0128, 0xd38c,
-	0x1108, 0xc385, 0x0008, 0xc2bc, 0xba02, 0xbbd6, 0x003e, 0x00ee,
-	0x002e, 0x001e, 0x0005, 0x0096, 0x0126, 0x2091, 0x8000, 0xb8a4,
-	0x904d, 0x0578, 0xa900, 0x81ff, 0x15c0, 0xaa04, 0x9282, 0x0010,
-	0x16c8, 0x0136, 0x0146, 0x01c6, 0x01d6, 0x8906, 0x8006, 0x8007,
-	0x908c, 0x003f, 0x21e0, 0x9084, 0xffc0, 0x9080, 0x0004, 0x2098,
-	0x2009, 0x0010, 0x20a9, 0x0001, 0x4002, 0x9086, 0xffff, 0x0120,
-	0x8109, 0x1dd0, 0x080c, 0x0d7d, 0x3c00, 0x20e8, 0x3300, 0x8001,
-	0x20a0, 0x4604, 0x8210, 0xaa06, 0x01de, 0x01ce, 0x014e, 0x013e,
-	0x0060, 0x080c, 0x1047, 0x0170, 0x2900, 0xb8a6, 0xa803, 0x0000,
-	0x080c, 0x68d3, 0xa807, 0x0001, 0xae12, 0x9085, 0x0001, 0x012e,
-	0x009e, 0x0005, 0x9006, 0x0cd8, 0x0126, 0x2091, 0x8000, 0x0096,
-	0xb8a4, 0x904d, 0x0188, 0xa800, 0x9005, 0x1150, 0x080c, 0x68e2,
-	0x1158, 0xa804, 0x908a, 0x0002, 0x0218, 0x8001, 0xa806, 0x0020,
-	0x080c, 0x1079, 0xb8a7, 0x0000, 0x009e, 0x012e, 0x0005, 0x0096,
-	0x00c6, 0xb888, 0x9005, 0x1904, 0x67c8, 0xb8d0, 0x904d, 0x0904,
-	0x67c8, 0x080c, 0xabc7, 0x0904, 0x67c4, 0x8210, 0xba3e, 0xa800,
-	0xb8d2, 0x9005, 0x1108, 0xb8ce, 0x2b00, 0x6012, 0x2900, 0x6016,
-	0x6023, 0x0003, 0x600b, 0xffff, 0x6007, 0x0040, 0xa878, 0x605e,
-	0xa880, 0x9084, 0x00ff, 0x6066, 0xa883, 0x0000, 0xa87c, 0xd0ac,
-	0x01c8, 0xc0dd, 0xa87e, 0xa888, 0x8001, 0x1568, 0xa816, 0xa864,
-	0x9094, 0x00f7, 0x9296, 0x0011, 0x1530, 0x9084, 0x00ff, 0xc0bd,
-	0x601e, 0xa8ac, 0xaab0, 0xa836, 0xaa3a, 0x2001, 0x8004, 0x6003,
-	0x0004, 0x0030, 0x080c, 0x1c55, 0x2001, 0x8004, 0x6003, 0x0002,
-	0x6046, 0x2001, 0x0010, 0x2c08, 0x080c, 0xa88a, 0xb838, 0xba3c,
-	0x9202, 0x0a04, 0x6775, 0x0020, 0x82ff, 0x1110, 0xb88b, 0x0001,
-	0x00ce, 0x009e, 0x0005, 0x080c, 0x174b, 0x601c, 0xc0bd, 0x601e,
-	0x08e0, 0x00b6, 0x0096, 0x0016, 0x20a9, 0x0800, 0x900e, 0x0016,
-	0x080c, 0x6644, 0x1158, 0xb8d0, 0x904d, 0x0140, 0x3e00, 0x9086,
-	0x0002, 0x1118, 0xb800, 0xd0bc, 0x1108, 0x0041, 0x001e, 0x8108,
-	0x1f04, 0x67d7, 0x001e, 0x00be, 0x009e, 0x0005, 0x0096, 0x0016,
-	0xb8d0, 0x904d, 0x0188, 0xa800, 0xb8d2, 0x9005, 0x1108, 0xb8ce,
-	0x9006, 0xa802, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c,
-	0xcb68, 0x080c, 0x6d9f, 0x0c60, 0x001e, 0x009e, 0x0005, 0x0086,
-	0x9046, 0xb8d0, 0x904d, 0x01b0, 0xa86c, 0x9406, 0x1118, 0xa870,
-	0x9506, 0x0128, 0x2940, 0xa800, 0x904d, 0x0160, 0x0ca8, 0xa800,
-	0x88ff, 0x1128, 0xb8d2, 0x9005, 0x1118, 0xb8ce, 0x0008, 0xa002,
-	0xa803, 0x0000, 0x008e, 0x0005, 0x901e, 0x0010, 0x2019, 0x0001,
-	0x0126, 0x2091, 0x8000, 0x00e6, 0x0096, 0x00c6, 0x0086, 0x0026,
-	0x2071, 0x19e6, 0x9046, 0x7028, 0x9065, 0x01e8, 0x6014, 0x2068,
-	0x83ff, 0x0120, 0x605c, 0x9606, 0x0158, 0x0030, 0xa86c, 0x9406,
-	0x1118, 0xa870, 0x9506, 0x0120, 0x2c40, 0x600c, 0x2060, 0x0c60,
-	0x600c, 0x0006, 0x0066, 0x2830, 0x080c, 0x9fbd, 0x006e, 0x000e,
-	0x83ff, 0x0508, 0x0c08, 0x9046, 0xb8d0, 0x904d, 0x01e0, 0x83ff,
-	0x0120, 0xa878, 0x9606, 0x0158, 0x0030, 0xa86c, 0x9406, 0x1118,
-	0xa870, 0x9506, 0x0120, 0x2940, 0xa800, 0x2048, 0x0c70, 0xb8d0,
-	0xaa00, 0x0026, 0x9906, 0x1110, 0xbad2, 0x0008, 0xa202, 0x000e,
-	0x83ff, 0x0108, 0x0c10, 0x002e, 0x008e, 0x00ce, 0x009e, 0x00ee,
-	0x012e, 0x0005, 0x9016, 0x0489, 0x1110, 0x2011, 0x0001, 0x0005,
-	0x080c, 0x6937, 0x0128, 0x080c, 0xc926, 0x0010, 0x9085, 0x0001,
-	0x0005, 0x080c, 0x6937, 0x0128, 0x080c, 0xc8c7, 0x0010, 0x9085,
-	0x0001, 0x0005, 0x080c, 0x6937, 0x0128, 0x080c, 0xc923, 0x0010,
-	0x9085, 0x0001, 0x0005, 0x080c, 0x6937, 0x0128, 0x080c, 0xc8e6,
-	0x0010, 0x9085, 0x0001, 0x0005, 0x080c, 0x6937, 0x0128, 0x080c,
-	0xc967, 0x0010, 0x9085, 0x0001, 0x0005, 0xb8a4, 0x900d, 0x1118,
-	0x9085, 0x0001, 0x0005, 0x0136, 0x01c6, 0xa800, 0x9005, 0x11b8,
-	0x890e, 0x810e, 0x810f, 0x9184, 0x003f, 0x20e0, 0x9184, 0xffc0,
-	0x9080, 0x0004, 0x2098, 0x20a9, 0x0001, 0x2009, 0x0010, 0x4002,
-	0x9606, 0x0128, 0x8109, 0x1dd8, 0x9085, 0x0001, 0x0008, 0x9006,
-	0x01ce, 0x013e, 0x0005, 0x0146, 0x01d6, 0xa860, 0x20e8, 0xa85c,
-	0x9080, 0x0004, 0x20a0, 0x20a9, 0x0010, 0x2009, 0xffff, 0x4104,
-	0x01de, 0x014e, 0x0136, 0x01c6, 0xa800, 0x9005, 0x11b8, 0x890e,
+	0x26aa, 0x001e, 0x60e7, 0x0000, 0x65ea, 0x2018, 0x2304, 0x9405,
+	0x201a, 0x7087, 0x0001, 0x20e9, 0x0000, 0x20a1, 0x024e, 0x20e1,
+	0x0001, 0x2898, 0x20a9, 0x0008, 0x4003, 0x9085, 0x0001, 0x0008,
+	0x9006, 0x009e, 0x008e, 0x0005, 0x0156, 0x01c6, 0x01d6, 0x0136,
+	0x0146, 0x22a8, 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9, 0x0000,
+	0x2011, 0x024e, 0x22a0, 0x4003, 0x014e, 0x013e, 0x01de, 0x01ce,
+	0x015e, 0x2118, 0x9026, 0x2001, 0x0007, 0x939a, 0x0010, 0x0218,
+	0x8420, 0x8001, 0x0cd0, 0x2118, 0x84ff, 0x0120, 0x939a, 0x0010,
+	0x8421, 0x1de0, 0x2021, 0x0001, 0x83ff, 0x0118, 0x8423, 0x8319,
+	0x1de8, 0x9238, 0x2029, 0x026e, 0x9528, 0x2504, 0x942c, 0x11b8,
+	0x9405, 0x203a, 0x715e, 0x91a0, 0x33b9, 0x242d, 0x95ac, 0x00ff,
+	0x7582, 0x6532, 0x6536, 0x0016, 0x2508, 0x080c, 0x26aa, 0x001e,
+	0x60e7, 0x0000, 0x65ea, 0x7087, 0x0001, 0x9084, 0x0000, 0x0005,
+	0x00e6, 0x2071, 0x1800, 0x708b, 0x0000, 0x00ee, 0x0005, 0x00e6,
+	0x00f6, 0x2079, 0x0100, 0x2071, 0x0140, 0x080c, 0x5fb1, 0x080c,
+	0x9ed4, 0x7004, 0x9084, 0x4000, 0x0110, 0x080c, 0x2a8a, 0x0126,
+	0x2091, 0x8000, 0x2071, 0x1826, 0x2073, 0x0000, 0x7840, 0x0026,
+	0x0016, 0x2009, 0x00f7, 0x080c, 0x600e, 0x001e, 0x9094, 0x0010,
+	0x9285, 0x0080, 0x7842, 0x7a42, 0x002e, 0x012e, 0x00fe, 0x00ee,
+	0x0005, 0x0126, 0x2091, 0x8000, 0x080c, 0x29e5, 0x0228, 0x2011,
+	0x0101, 0x2204, 0xc0c5, 0x2012, 0x2011, 0x19f3, 0x2013, 0x0000,
+	0x7093, 0x0000, 0x012e, 0x60a3, 0x0056, 0x60a7, 0x9575, 0x080c,
+	0x9ec7, 0x6144, 0xd184, 0x0120, 0x7198, 0x918d, 0x2000, 0x0018,
+	0x718c, 0x918d, 0x1000, 0x2011, 0x1998, 0x2112, 0x2009, 0x07d0,
+	0x2011, 0x5ef7, 0x080c, 0x8792, 0x0005, 0x0016, 0x0026, 0x00c6,
+	0x0126, 0x2091, 0x8000, 0x080c, 0xa91e, 0x080c, 0xabe9, 0x080c,
+	0xa93a, 0x2009, 0x00f7, 0x080c, 0x600e, 0x2061, 0x1a02, 0x900e,
+	0x611a, 0x611e, 0x6172, 0x6176, 0x2061, 0x1800, 0x6003, 0x0001,
+	0x2061, 0x0100, 0x6043, 0x0090, 0x6043, 0x0010, 0x2009, 0x1998,
+	0x200b, 0x0000, 0x2009, 0x002d, 0x2011, 0x5f7d, 0x080c, 0x86bc,
+	0x012e, 0x00ce, 0x002e, 0x001e, 0x0005, 0x00e6, 0x0006, 0x0126,
+	0x2091, 0x8000, 0x0471, 0x2071, 0x0100, 0x080c, 0x9ed4, 0x2071,
+	0x0140, 0x7004, 0x9084, 0x4000, 0x0110, 0x080c, 0x2a8a, 0x080c,
+	0x7545, 0x0188, 0x080c, 0x7560, 0x1170, 0x080c, 0x784a, 0x0016,
+	0x080c, 0x2779, 0x2001, 0x196c, 0x2102, 0x001e, 0x080c, 0x7845,
+	0x080c, 0x746e, 0x0050, 0x2009, 0x0001, 0x080c, 0x2a66, 0x2001,
+	0x0001, 0x080c, 0x2606, 0x080c, 0x5f4d, 0x012e, 0x000e, 0x00ee,
+	0x0005, 0x2001, 0x180e, 0x2004, 0xd0bc, 0x0158, 0x0026, 0x0036,
+	0x2011, 0x8017, 0x2001, 0x1998, 0x201c, 0x080c, 0x4b52, 0x003e,
+	0x002e, 0x0005, 0x20a9, 0x0012, 0x20e9, 0x0001, 0x20a1, 0x1d80,
+	0x080c, 0x606c, 0x20e9, 0x0000, 0x2099, 0x026e, 0x0099, 0x20a9,
+	0x0020, 0x080c, 0x6066, 0x2099, 0x0260, 0x20a1, 0x1d92, 0x0051,
+	0x20a9, 0x000e, 0x080c, 0x6069, 0x2099, 0x0260, 0x20a1, 0x1db2,
+	0x0009, 0x0005, 0x0016, 0x0026, 0x3410, 0x3308, 0x2104, 0x8007,
+	0x2012, 0x8108, 0x8210, 0x1f04, 0x5fe6, 0x002e, 0x001e, 0x0005,
+	0x080c, 0xa713, 0x20e1, 0x0001, 0x2099, 0x1d00, 0x20e9, 0x0000,
+	0x20a1, 0x0240, 0x20a9, 0x000c, 0x4003, 0x0005, 0x080c, 0xa713,
+	0x080c, 0x606c, 0x20e1, 0x0000, 0x2099, 0x0260, 0x20e9, 0x0000,
+	0x20a1, 0x0240, 0x20a9, 0x000c, 0x4003, 0x0005, 0x00c6, 0x0006,
+	0x2061, 0x0100, 0x810f, 0x2001, 0x1834, 0x2004, 0x9005, 0x1138,
+	0x2001, 0x1818, 0x2004, 0x9084, 0x00ff, 0x9105, 0x0010, 0x9185,
+	0x00f7, 0x604a, 0x000e, 0x00ce, 0x0005, 0x0016, 0x0046, 0x080c,
+	0x6ad9, 0x0158, 0x9006, 0x2020, 0x2009, 0x002a, 0x080c, 0xe445,
+	0x2001, 0x180c, 0x200c, 0xc195, 0x2102, 0x2019, 0x002a, 0x900e,
+	0x080c, 0x3205, 0x080c, 0xd09b, 0x0140, 0x0036, 0x2019, 0xffff,
+	0x2021, 0x0007, 0x080c, 0x4d09, 0x003e, 0x004e, 0x001e, 0x0005,
+	0x080c, 0x5f4d, 0x709b, 0x0000, 0x7093, 0x0000, 0x0005, 0x0006,
+	0x2001, 0x180c, 0x2004, 0xd09c, 0x0100, 0x000e, 0x0005, 0x0006,
+	0x0016, 0x0126, 0x2091, 0x8000, 0x2001, 0x0101, 0x200c, 0x918d,
+	0x0006, 0x2102, 0x012e, 0x001e, 0x000e, 0x0005, 0x2009, 0x0001,
+	0x0020, 0x2009, 0x0002, 0x0008, 0x900e, 0x6814, 0x9084, 0xffc0,
+	0x910d, 0x6916, 0x0005, 0x00f6, 0x0156, 0x0146, 0x01d6, 0x9006,
+	0x20a9, 0x0080, 0x20e9, 0x0001, 0x20a1, 0x1d00, 0x4004, 0x2079,
+	0x1d00, 0x7803, 0x2200, 0x7807, 0x00ef, 0x780f, 0x00ef, 0x7813,
+	0x0138, 0x7823, 0xffff, 0x7827, 0xffff, 0x01de, 0x014e, 0x015e,
+	0x00fe, 0x0005, 0x2001, 0x1800, 0x2003, 0x0001, 0x0005, 0x2001,
+	0x19a5, 0x0118, 0x2003, 0x0001, 0x0010, 0x2003, 0x0000, 0x0005,
+	0x0156, 0x20a9, 0x0800, 0x2009, 0x1000, 0x9006, 0x200a, 0x8108,
+	0x1f04, 0x60a6, 0x015e, 0x0005, 0x00d6, 0x0036, 0x0156, 0x0136,
+	0x0146, 0x2069, 0x1847, 0x9006, 0xb802, 0xb8d6, 0xb807, 0x0707,
+	0xb80a, 0xb80e, 0xb812, 0x9198, 0x33b9, 0x231d, 0x939c, 0x00ff,
+	0xbb16, 0x0016, 0x0026, 0xb886, 0x080c, 0xabe2, 0x1120, 0x9192,
+	0x007e, 0x1208, 0xbb86, 0x20a9, 0x0004, 0xb8c4, 0x20e8, 0xb9c8,
+	0x9198, 0x0006, 0x9006, 0x23a0, 0x4004, 0x20a9, 0x0004, 0x9198,
+	0x000a, 0x23a0, 0x4004, 0x002e, 0x001e, 0xb83e, 0xb842, 0xb8ce,
+	0xb8d2, 0xb85e, 0xb862, 0xb866, 0xb86a, 0xb86f, 0x0100, 0xb872,
+	0xb876, 0xb87a, 0xb88a, 0xb88e, 0xb893, 0x0008, 0xb896, 0xb89a,
+	0xb89e, 0xb8be, 0xb9a2, 0x0096, 0xb8a4, 0x904d, 0x0110, 0x080c,
+	0x1079, 0xb8a7, 0x0000, 0x009e, 0x9006, 0xb84a, 0x6810, 0xb83a,
+	0x680c, 0xb846, 0xb8bb, 0x0520, 0xb8ac, 0x9005, 0x0198, 0x00c6,
+	0x2060, 0x9c82, 0x1ddc, 0x0a0c, 0x0d7d, 0x2001, 0x181a, 0x2004,
+	0x9c02, 0x1a0c, 0x0d7d, 0x080c, 0x8c1f, 0x00ce, 0x090c, 0x8fbc,
+	0xb8af, 0x0000, 0x6814, 0x9084, 0x00ff, 0xb842, 0x014e, 0x013e,
+	0x015e, 0x003e, 0x00de, 0x0005, 0x0126, 0x2091, 0x8000, 0xa974,
+	0xae78, 0x9684, 0x3fff, 0x9082, 0x4000, 0x1a04, 0x6182, 0x9182,
+	0x0800, 0x1a04, 0x6186, 0x2001, 0x180c, 0x2004, 0x9084, 0x0003,
+	0x1904, 0x618c, 0x9188, 0x1000, 0x2104, 0x905d, 0x0198, 0xb804,
+	0x9084, 0x00ff, 0x908e, 0x0006, 0x1188, 0xb8a4, 0x900d, 0x1904,
+	0x619e, 0x080c, 0x655e, 0x9006, 0x012e, 0x0005, 0x2001, 0x0005,
+	0x900e, 0x04b8, 0x2001, 0x0028, 0x900e, 0x0498, 0x9082, 0x0006,
+	0x1290, 0x080c, 0xabe2, 0x1160, 0xb8a0, 0x9084, 0xff80, 0x1140,
+	0xb900, 0xd1fc, 0x0d10, 0x2001, 0x0029, 0x2009, 0x1000, 0x0408,
+	0x2001, 0x0028, 0x00a8, 0x2009, 0x180c, 0x210c, 0xd18c, 0x0118,
+	0x2001, 0x0004, 0x0068, 0xd184, 0x0118, 0x2001, 0x0004, 0x0040,
+	0x2001, 0x0029, 0xb900, 0xd1fc, 0x0118, 0x2009, 0x1000, 0x0048,
+	0x900e, 0x0038, 0x2001, 0x0029, 0x900e, 0x0018, 0x2001, 0x0029,
+	0x900e, 0x9005, 0x012e, 0x0005, 0x2001, 0x180c, 0x2004, 0xd084,
+	0x19d0, 0x9188, 0x1000, 0x2104, 0x9065, 0x09a8, 0x080c, 0x6add,
+	0x1990, 0xb800, 0xd0bc, 0x0978, 0x0804, 0x6145, 0x080c, 0x6902,
+	0x0904, 0x614e, 0x0804, 0x6149, 0x00e6, 0x2071, 0x19e6, 0x7004,
+	0x9086, 0x0002, 0x1128, 0x7030, 0x9080, 0x0004, 0x2004, 0x9b06,
+	0x00ee, 0x0005, 0x00b6, 0x00e6, 0x0126, 0x2091, 0x8000, 0xa874,
+	0x908e, 0x00ff, 0x1120, 0x2001, 0x196a, 0x205c, 0x0060, 0xa974,
+	0x9182, 0x0800, 0x1690, 0x9188, 0x1000, 0x2104, 0x905d, 0x01d0,
+	0x080c, 0x6a7d, 0x11d0, 0x080c, 0xac5a, 0x0570, 0x2b00, 0x6012,
+	0x2900, 0x6016, 0x6023, 0x0009, 0x602b, 0x0000, 0xa874, 0x908e,
+	0x00ff, 0x1110, 0x602b, 0x8000, 0x2009, 0x0043, 0x080c, 0xad4d,
+	0x9006, 0x00b0, 0x2001, 0x0028, 0x0090, 0x2009, 0x180c, 0x210c,
+	0xd18c, 0x0118, 0x2001, 0x0004, 0x0038, 0xd184, 0x0118, 0x2001,
+	0x0004, 0x0010, 0x2001, 0x0029, 0x0010, 0x2001, 0x0029, 0x9005,
+	0x012e, 0x00ee, 0x00be, 0x0005, 0x2001, 0x002c, 0x0cc0, 0x00b6,
+	0x00e6, 0x0126, 0x2091, 0x8000, 0xa974, 0x9182, 0x0800, 0x1a04,
+	0x627d, 0x9188, 0x1000, 0x2104, 0x905d, 0x0904, 0x6255, 0xb8a0,
+	0x9086, 0x007f, 0x0190, 0xa87c, 0xd0fc, 0x1178, 0x080c, 0x6ae5,
+	0x0160, 0xa994, 0x81ff, 0x0130, 0x908e, 0x0004, 0x0130, 0x908e,
+	0x0005, 0x0118, 0x080c, 0x6add, 0x1598, 0xa87c, 0xd0fc, 0x01e0,
+	0xa894, 0x9005, 0x01c8, 0x2060, 0x0026, 0x2010, 0x080c, 0xc968,
+	0x002e, 0x1120, 0x2001, 0x0008, 0x0804, 0x627f, 0x6020, 0x9086,
+	0x000a, 0x0120, 0x2001, 0x0008, 0x0804, 0x627f, 0x601a, 0x6003,
+	0x0008, 0x2900, 0x6016, 0x0058, 0x080c, 0xac5a, 0x05e8, 0x2b00,
+	0x6012, 0x2900, 0x6016, 0x600b, 0xffff, 0x6023, 0x000a, 0x2009,
+	0x0003, 0x080c, 0xad4d, 0x9006, 0x0458, 0x2001, 0x0028, 0x0438,
+	0x9082, 0x0006, 0x1290, 0x080c, 0xabe2, 0x1160, 0xb8a0, 0x9084,
+	0xff80, 0x1140, 0xb900, 0xd1fc, 0x0900, 0x2001, 0x0029, 0x2009,
+	0x1000, 0x00a8, 0x2001, 0x0028, 0x0090, 0x2009, 0x180c, 0x210c,
+	0xd18c, 0x0118, 0x2001, 0x0004, 0x0050, 0xd184, 0x0118, 0x2001,
+	0x0004, 0x0028, 0x2001, 0x0029, 0x0010, 0x2001, 0x0029, 0x9005,
+	0x012e, 0x00ee, 0x00be, 0x0005, 0x2001, 0x002c, 0x0cc0, 0x00f6,
+	0x00b6, 0x0126, 0x2091, 0x8000, 0xa8e0, 0x9005, 0x1550, 0xa8dc,
+	0x9082, 0x0101, 0x1630, 0xa8c8, 0x9005, 0x1518, 0xa8c4, 0x9082,
+	0x0101, 0x12f8, 0xa974, 0x2079, 0x1800, 0x9182, 0x0800, 0x12e8,
+	0x7830, 0x9084, 0x0003, 0x1130, 0xaa98, 0xab94, 0xa878, 0x9084,
+	0x0007, 0x00ea, 0x7930, 0xd18c, 0x0118, 0x2001, 0x0004, 0x0038,
+	0xd184, 0x0118, 0x2001, 0x0004, 0x0010, 0x2001, 0x0029, 0x900e,
+	0x0038, 0x2001, 0x002c, 0x900e, 0x0018, 0x2001, 0x0029, 0x900e,
+	0x9006, 0x0008, 0x9005, 0x012e, 0x00be, 0x00fe, 0x0005, 0x6314,
+	0x62cf, 0x62e6, 0x6314, 0x6314, 0x6314, 0x6314, 0x6314, 0x2100,
+	0x9082, 0x007e, 0x1278, 0x080c, 0x6632, 0x0148, 0x9046, 0xb810,
+	0x9306, 0x1904, 0x631c, 0xb814, 0x9206, 0x15f0, 0x0028, 0xbb12,
+	0xba16, 0x0010, 0x080c, 0x4a05, 0x0150, 0x04b0, 0x080c, 0x6693,
+	0x1598, 0xb810, 0x9306, 0x1580, 0xb814, 0x9206, 0x1568, 0x080c,
+	0xac5a, 0x0530, 0x2b00, 0x6012, 0x080c, 0xce15, 0x2900, 0x6016,
+	0x600b, 0xffff, 0x6023, 0x000a, 0xa878, 0x9086, 0x0001, 0x1170,
+	0x080c, 0x3240, 0x9006, 0x080c, 0x65cf, 0x2001, 0x0002, 0x080c,
+	0x65e3, 0x2001, 0x0200, 0xb86e, 0xb893, 0x0002, 0x2009, 0x0003,
+	0x080c, 0xad4d, 0x9006, 0x0068, 0x2001, 0x0001, 0x900e, 0x0038,
+	0x2001, 0x002c, 0x900e, 0x0018, 0x2001, 0x0028, 0x900e, 0x9005,
+	0x0000, 0x012e, 0x00be, 0x00fe, 0x0005, 0x00b6, 0x00f6, 0x00e6,
+	0x0126, 0x2091, 0x8000, 0xa894, 0x90c6, 0x0015, 0x0904, 0x6507,
+	0x90c6, 0x0056, 0x0904, 0x650b, 0x90c6, 0x0066, 0x0904, 0x650f,
+	0x90c6, 0x0067, 0x0904, 0x6513, 0x90c6, 0x0068, 0x0904, 0x6517,
+	0x90c6, 0x0071, 0x0904, 0x651b, 0x90c6, 0x0074, 0x0904, 0x651f,
+	0x90c6, 0x007c, 0x0904, 0x6523, 0x90c6, 0x007e, 0x0904, 0x6527,
+	0x90c6, 0x0037, 0x0904, 0x652b, 0x9016, 0x2079, 0x1800, 0xa974,
+	0x9186, 0x00ff, 0x0904, 0x6502, 0x9182, 0x0800, 0x1a04, 0x6502,
+	0x080c, 0x6693, 0x1198, 0xb804, 0x9084, 0x00ff, 0x9082, 0x0006,
+	0x1268, 0xa894, 0x90c6, 0x006f, 0x0148, 0x080c, 0xabe2, 0x1904,
+	0x64eb, 0xb8a0, 0x9084, 0xff80, 0x1904, 0x64eb, 0xa894, 0x90c6,
+	0x006f, 0x0158, 0x90c6, 0x005e, 0x0904, 0x644b, 0x90c6, 0x0064,
+	0x0904, 0x6474, 0x2008, 0x0804, 0x640d, 0xa998, 0xa8b0, 0x2040,
+	0x080c, 0xabe2, 0x1120, 0x9182, 0x007f, 0x0a04, 0x640d, 0x9186,
+	0x00ff, 0x0904, 0x640d, 0x9182, 0x0800, 0x1a04, 0x640d, 0xaaa0,
+	0xab9c, 0x787c, 0x9306, 0x11a8, 0x7880, 0x0096, 0x924e, 0x1128,
+	0x2208, 0x2310, 0x009e, 0x0804, 0x640d, 0x080c, 0xabe2, 0x1140,
+	0x99cc, 0xff00, 0x009e, 0x1128, 0x2208, 0x2310, 0x0804, 0x640d,
+	0x009e, 0x080c, 0x4a05, 0x0904, 0x6417, 0x900e, 0x9016, 0x90c6,
+	0x4000, 0x15e0, 0x0006, 0x080c, 0x6986, 0x1108, 0xc185, 0xb800,
+	0xd0bc, 0x0108, 0xc18d, 0x20a9, 0x0004, 0xa860, 0x20e8, 0xa85c,
+	0x9080, 0x0031, 0x20a0, 0xb8c4, 0x20e0, 0xb8c8, 0x9080, 0x0006,
+	0x2098, 0x080c, 0x0fc4, 0x20a9, 0x0004, 0xa860, 0x20e8, 0xa85c,
+	0x9080, 0x0035, 0x20a0, 0xb8c4, 0x20e0, 0xb8c8, 0x9080, 0x000a,
+	0x2098, 0x080c, 0x0fc4, 0xa8c4, 0xabc8, 0x9305, 0xabcc, 0x9305,
+	0xabd0, 0x9305, 0xabd4, 0x9305, 0xabd8, 0x9305, 0xabdc, 0x9305,
+	0xabe0, 0x9305, 0x9005, 0x0510, 0x000e, 0x00c8, 0x90c6, 0x4007,
+	0x1110, 0x2408, 0x00a0, 0x90c6, 0x4008, 0x1118, 0x2708, 0x2610,
+	0x0070, 0x90c6, 0x4009, 0x1108, 0x0050, 0x90c6, 0x4006, 0x0138,
+	0x2001, 0x4005, 0x2009, 0x000a, 0x0010, 0x2001, 0x4006, 0xa896,
+	0xa99a, 0xaa9e, 0x2001, 0x0030, 0x900e, 0x0478, 0x000e, 0x080c,
+	0xac5a, 0x1130, 0x2001, 0x4005, 0x2009, 0x0003, 0x9016, 0x0c78,
+	0x2b00, 0x6012, 0x080c, 0xce15, 0x2900, 0x6016, 0x6023, 0x0001,
+	0xa868, 0xd88c, 0x0108, 0xc0f5, 0xa86a, 0x0126, 0x2091, 0x8000,
+	0x080c, 0x3240, 0x012e, 0x9006, 0x080c, 0x65cf, 0x2001, 0x0002,
+	0x080c, 0x65e3, 0x2009, 0x0002, 0x080c, 0xad4d, 0xa8b0, 0xd094,
+	0x0118, 0xb8d4, 0xc08d, 0xb8d6, 0x9006, 0x9005, 0x012e, 0x00ee,
+	0x00fe, 0x00be, 0x0005, 0x080c, 0x5752, 0x0118, 0x2009, 0x0007,
+	0x00f8, 0xa998, 0xaeb0, 0x080c, 0x6693, 0x1904, 0x6408, 0x9186,
+	0x007f, 0x0130, 0x080c, 0x6add, 0x0118, 0x2009, 0x0009, 0x0080,
+	0x0096, 0x080c, 0x1047, 0x1120, 0x009e, 0x2009, 0x0002, 0x0040,
+	0x2900, 0x009e, 0xa806, 0x080c, 0xcb68, 0x19b0, 0x2009, 0x0003,
+	0x2001, 0x4005, 0x0804, 0x640f, 0xa998, 0xaeb0, 0x080c, 0x6693,
+	0x1904, 0x6408, 0x0096, 0x080c, 0x1047, 0x1128, 0x009e, 0x2009,
+	0x0002, 0x0804, 0x64c8, 0x2900, 0x009e, 0xa806, 0x0096, 0x2048,
+	0x20a9, 0x002b, 0xb8c4, 0x20e0, 0xb8c8, 0x2098, 0xa860, 0x20e8,
+	0xa85c, 0x9080, 0x0002, 0x20a0, 0x4003, 0x20a9, 0x0008, 0x9080,
+	0x0006, 0x20a0, 0xbbc8, 0x9398, 0x0006, 0x2398, 0x080c, 0x0fc4,
+	0x009e, 0xa87b, 0x0000, 0xa883, 0x0000, 0xa897, 0x4000, 0xd684,
+	0x1168, 0x080c, 0x573e, 0xd0b4, 0x1118, 0xa89b, 0x000b, 0x00e0,
+	0xb800, 0xd08c, 0x0118, 0xa89b, 0x000c, 0x00b0, 0x080c, 0x6add,
+	0x0118, 0xa89b, 0x0009, 0x0080, 0x080c, 0x5752, 0x0118, 0xa89b,
+	0x0007, 0x0050, 0x080c, 0xcb4b, 0x1904, 0x6444, 0x2009, 0x0003,
+	0x2001, 0x4005, 0x0804, 0x640f, 0xa87b, 0x0030, 0xa897, 0x4005,
+	0xa804, 0x8006, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0,
+	0x9080, 0x0002, 0x2009, 0x002b, 0xaaa0, 0xab9c, 0xaca8, 0xada4,
+	0x2031, 0x0000, 0x2041, 0x1296, 0x080c, 0xb1d4, 0x1904, 0x6444,
+	0x2009, 0x0002, 0x08e8, 0x2001, 0x0028, 0x900e, 0x0804, 0x6445,
+	0x2009, 0x180c, 0x210c, 0xd18c, 0x0118, 0x2001, 0x0004, 0x0038,
+	0xd184, 0x0118, 0x2001, 0x0004, 0x0010, 0x2001, 0x0029, 0x900e,
+	0x0804, 0x6445, 0x2001, 0x0029, 0x900e, 0x0804, 0x6445, 0x080c,
+	0x37e7, 0x0804, 0x6446, 0x080c, 0x545b, 0x0804, 0x6446, 0x080c,
+	0x45b9, 0x0804, 0x6446, 0x080c, 0x4632, 0x0804, 0x6446, 0x080c,
+	0x468e, 0x0804, 0x6446, 0x080c, 0x4ac8, 0x0804, 0x6446, 0x080c,
+	0x4d7c, 0x0804, 0x6446, 0x080c, 0x50c3, 0x0804, 0x6446, 0x080c,
+	0x52bc, 0x0804, 0x6446, 0x080c, 0x3a0b, 0x0804, 0x6446, 0x00b6,
+	0xa974, 0xae78, 0x9684, 0x3fff, 0x9082, 0x4000, 0x1608, 0x9182,
+	0x0800, 0x1258, 0x9188, 0x1000, 0x2104, 0x905d, 0x0130, 0x080c,
+	0x6add, 0x1138, 0x00d9, 0x9006, 0x00b0, 0x2001, 0x0028, 0x900e,
+	0x0090, 0x9082, 0x0006, 0x1240, 0xb900, 0xd1fc, 0x0d98, 0x2001,
+	0x0029, 0x2009, 0x1000, 0x0038, 0x2001, 0x0029, 0x900e, 0x0018,
+	0x2001, 0x0029, 0x900e, 0x9005, 0x00be, 0x0005, 0xa877, 0x0000,
+	0xb8d0, 0x9005, 0x1904, 0x65c3, 0xb888, 0x9005, 0x1904, 0x65c3,
+	0xb838, 0xb93c, 0x9102, 0x1a04, 0x65c3, 0x2b10, 0x080c, 0xac87,
+	0x0904, 0x65bf, 0x8108, 0xb93e, 0x6212, 0x2900, 0x6016, 0x6023,
+	0x0003, 0x600b, 0xffff, 0x6007, 0x0040, 0xa878, 0x605e, 0xa880,
+	0x6066, 0xa883, 0x0000, 0xa87c, 0xd0ac, 0x0588, 0xc0dd, 0xa87e,
+	0xa888, 0x8001, 0x1530, 0xa816, 0xa864, 0x9094, 0x00f7, 0x9296,
+	0x0011, 0x11f8, 0x9084, 0x00ff, 0xc0bd, 0x601e, 0xa8ac, 0xaab0,
+	0xa836, 0xaa3a, 0x2001, 0x000f, 0x8001, 0x1df0, 0x2001, 0x8004,
+	0x6003, 0x0004, 0x6046, 0x00f6, 0x2079, 0x0380, 0x7818, 0xd0bc,
+	0x1de8, 0x7833, 0x0010, 0x2c00, 0x7836, 0x781b, 0x8080, 0x00fe,
+	0x0005, 0x080c, 0x1778, 0x601c, 0xc0bd, 0x601e, 0x0c38, 0xd0b4,
+	0x190c, 0x1c86, 0x2001, 0x8004, 0x6003, 0x0002, 0x0c18, 0x81ff,
+	0x1110, 0xb88b, 0x0001, 0x2908, 0xb8cc, 0xb9ce, 0x9005, 0x1110,
+	0xb9d2, 0x0020, 0x0096, 0x2048, 0xa902, 0x009e, 0x0005, 0x00b6,
+	0x0126, 0x00c6, 0x0026, 0x2091, 0x8000, 0x6210, 0x2258, 0xba00,
+	0x9005, 0x0110, 0xc285, 0x0008, 0xc284, 0xba02, 0x002e, 0x00ce,
+	0x012e, 0x00be, 0x0005, 0x00b6, 0x0126, 0x00c6, 0x2091, 0x8000,
+	0x6210, 0x2258, 0xba04, 0x0006, 0x9086, 0x0006, 0x1170, 0xb89c,
+	0xd0ac, 0x0158, 0x080c, 0x6ad9, 0x0140, 0x9284, 0xff00, 0x8007,
+	0x9086, 0x0007, 0x1110, 0x2011, 0x0600, 0x000e, 0x9294, 0xff00,
+	0x9215, 0xba06, 0x0006, 0x9086, 0x0006, 0x1120, 0xba90, 0x82ff,
+	0x090c, 0x0d7d, 0x000e, 0x00ce, 0x012e, 0x00be, 0x0005, 0x00b6,
+	0x0126, 0x00c6, 0x2091, 0x8000, 0x6210, 0x2258, 0xba04, 0x0006,
+	0x9086, 0x0006, 0x1168, 0xb89c, 0xd0a4, 0x0150, 0x080c, 0x6ad5,
+	0x1138, 0x9284, 0x00ff, 0x9086, 0x0007, 0x1110, 0x2011, 0x0006,
+	0x000e, 0x9294, 0x00ff, 0x8007, 0x9215, 0xba06, 0x00ce, 0x012e,
+	0x00be, 0x0005, 0x9182, 0x0800, 0x0218, 0x9085, 0x0001, 0x0005,
+	0x00d6, 0x0026, 0x9190, 0x1000, 0x2204, 0x905d, 0x1188, 0x0096,
+	0x080c, 0x1047, 0x2958, 0x009e, 0x0168, 0x2b00, 0x2012, 0xb85c,
+	0xb8ca, 0xb860, 0xb8c6, 0x9006, 0xb8a6, 0xb8ae, 0x080c, 0x60ac,
+	0x9006, 0x0010, 0x9085, 0x0001, 0x002e, 0x00de, 0x0005, 0x00b6,
+	0x0096, 0x0126, 0x2091, 0x8000, 0x0026, 0x9182, 0x0800, 0x0218,
+	0x9085, 0x0001, 0x0458, 0x00d6, 0x9190, 0x1000, 0x2204, 0x905d,
+	0x0518, 0x2013, 0x0000, 0xb8a4, 0x904d, 0x0110, 0x080c, 0x1079,
+	0x00d6, 0x00c6, 0xb8bc, 0x2060, 0x8cff, 0x0168, 0x600c, 0x0006,
+	0x6014, 0x2048, 0x080c, 0xc97a, 0x0110, 0x080c, 0x0ff9, 0x080c,
+	0xacb0, 0x00ce, 0x0c88, 0x00ce, 0x00de, 0x2b48, 0xb8c8, 0xb85e,
+	0xb8c4, 0xb862, 0x080c, 0x1089, 0x00de, 0x9006, 0x002e, 0x012e,
+	0x009e, 0x00be, 0x0005, 0x0016, 0x9182, 0x0800, 0x0218, 0x9085,
+	0x0001, 0x0030, 0x9188, 0x1000, 0x2104, 0x905d, 0x0dc0, 0x9006,
+	0x001e, 0x0005, 0x00d6, 0x0156, 0x0136, 0x0146, 0x9006, 0xb80a,
+	0xb80e, 0xb800, 0xc08c, 0xb802, 0x080c, 0x753d, 0x1510, 0xb8a0,
+	0x9086, 0x007e, 0x0120, 0x080c, 0xabe2, 0x11d8, 0x0078, 0x7040,
+	0xd0e4, 0x01b8, 0x00c6, 0x2061, 0x1981, 0x7048, 0x2062, 0x704c,
+	0x6006, 0x7050, 0x600a, 0x7054, 0x600e, 0x00ce, 0x703c, 0x2069,
+	0x0140, 0x9005, 0x1110, 0x2001, 0x0001, 0x6886, 0x2069, 0x1800,
+	0x68b6, 0x7040, 0xb85e, 0x7048, 0xb862, 0x704c, 0xb866, 0x20e1,
+	0x0000, 0x2099, 0x0276, 0xb8c4, 0x20e8, 0xb8c8, 0x9088, 0x000a,
+	0x21a0, 0x20a9, 0x0004, 0x4003, 0x2099, 0x027a, 0x9088, 0x0006,
+	0x21a0, 0x20a9, 0x0004, 0x4003, 0x2069, 0x0200, 0x6817, 0x0001,
+	0x7040, 0xb86a, 0x7144, 0xb96e, 0x7048, 0xb872, 0x7050, 0xb876,
+	0x2069, 0x0200, 0x6817, 0x0000, 0xb8a0, 0x9086, 0x007e, 0x1110,
+	0x7144, 0xb96e, 0x9182, 0x0211, 0x1218, 0x2009, 0x0008, 0x0400,
+	0x9182, 0x0259, 0x1218, 0x2009, 0x0007, 0x00d0, 0x9182, 0x02c1,
+	0x1218, 0x2009, 0x0006, 0x00a0, 0x9182, 0x0349, 0x1218, 0x2009,
+	0x0005, 0x0070, 0x9182, 0x0421, 0x1218, 0x2009, 0x0004, 0x0040,
+	0x9182, 0x0581, 0x1218, 0x2009, 0x0003, 0x0010, 0x2009, 0x0002,
+	0xb992, 0x014e, 0x013e, 0x015e, 0x00de, 0x0005, 0x0016, 0x0026,
+	0x00e6, 0x2071, 0x0260, 0x7034, 0xb896, 0x703c, 0xb89a, 0x7054,
+	0xb89e, 0x0036, 0xbbd4, 0xc384, 0xba00, 0x2009, 0x1867, 0x210c,
+	0xd0bc, 0x0120, 0xd1ec, 0x0110, 0xc2ad, 0x0008, 0xc2ac, 0xd0c4,
+	0x0148, 0xd1e4, 0x0138, 0xc2bd, 0xd0cc, 0x0128, 0xd38c, 0x1108,
+	0xc385, 0x0008, 0xc2bc, 0xba02, 0xbbd6, 0x003e, 0x00ee, 0x002e,
+	0x001e, 0x0005, 0x0096, 0x0126, 0x2091, 0x8000, 0xb8a4, 0x904d,
+	0x0578, 0xa900, 0x81ff, 0x15c0, 0xaa04, 0x9282, 0x0010, 0x16c8,
+	0x0136, 0x0146, 0x01c6, 0x01d6, 0x8906, 0x8006, 0x8007, 0x908c,
+	0x003f, 0x21e0, 0x9084, 0xffc0, 0x9080, 0x0004, 0x2098, 0x2009,
+	0x0010, 0x20a9, 0x0001, 0x4002, 0x9086, 0xffff, 0x0120, 0x8109,
+	0x1dd0, 0x080c, 0x0d7d, 0x3c00, 0x20e8, 0x3300, 0x8001, 0x20a0,
+	0x4604, 0x8210, 0xaa06, 0x01de, 0x01ce, 0x014e, 0x013e, 0x0060,
+	0x080c, 0x1047, 0x0170, 0x2900, 0xb8a6, 0xa803, 0x0000, 0x080c,
+	0x6922, 0xa807, 0x0001, 0xae12, 0x9085, 0x0001, 0x012e, 0x009e,
+	0x0005, 0x9006, 0x0cd8, 0x0126, 0x2091, 0x8000, 0x0096, 0xb8a4,
+	0x904d, 0x0188, 0xa800, 0x9005, 0x1150, 0x080c, 0x6931, 0x1158,
+	0xa804, 0x908a, 0x0002, 0x0218, 0x8001, 0xa806, 0x0020, 0x080c,
+	0x1079, 0xb8a7, 0x0000, 0x009e, 0x012e, 0x0005, 0x0096, 0x00c6,
+	0xb888, 0x9005, 0x1904, 0x6817, 0xb8d0, 0x904d, 0x0904, 0x6817,
+	0x080c, 0xac87, 0x0904, 0x6813, 0x8210, 0xba3e, 0xa800, 0xb8d2,
+	0x9005, 0x1108, 0xb8ce, 0x2b00, 0x6012, 0x2900, 0x6016, 0x6023,
+	0x0003, 0x600b, 0xffff, 0x6007, 0x0040, 0xa878, 0x605e, 0xa880,
+	0x9084, 0x00ff, 0x6066, 0xa883, 0x0000, 0xa87c, 0xd0ac, 0x01c8,
+	0xc0dd, 0xa87e, 0xa888, 0x8001, 0x1568, 0xa816, 0xa864, 0x9094,
+	0x00f7, 0x9296, 0x0011, 0x1530, 0x9084, 0x00ff, 0xc0bd, 0x601e,
+	0xa8ac, 0xaab0, 0xa836, 0xaa3a, 0x2001, 0x8004, 0x6003, 0x0004,
+	0x0030, 0x080c, 0x1c86, 0x2001, 0x8004, 0x6003, 0x0002, 0x6046,
+	0x2001, 0x0010, 0x2c08, 0x080c, 0xa90f, 0xb838, 0xba3c, 0x9202,
+	0x0a04, 0x67c4, 0x0020, 0x82ff, 0x1110, 0xb88b, 0x0001, 0x00ce,
+	0x009e, 0x0005, 0x080c, 0x1778, 0x601c, 0xc0bd, 0x601e, 0x08e0,
+	0x00b6, 0x0096, 0x0016, 0x20a9, 0x0800, 0x900e, 0x0016, 0x080c,
+	0x6693, 0x1158, 0xb8d0, 0x904d, 0x0140, 0x3e00, 0x9086, 0x0002,
+	0x1118, 0xb800, 0xd0bc, 0x1108, 0x0041, 0x001e, 0x8108, 0x1f04,
+	0x6826, 0x001e, 0x00be, 0x009e, 0x0005, 0x0096, 0x0016, 0xb8d0,
+	0x904d, 0x0188, 0xa800, 0xb8d2, 0x9005, 0x1108, 0xb8ce, 0x9006,
+	0xa802, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c, 0xcc7f,
+	0x080c, 0x6dee, 0x0c60, 0x001e, 0x009e, 0x0005, 0x0086, 0x9046,
+	0xb8d0, 0x904d, 0x01b0, 0xa86c, 0x9406, 0x1118, 0xa870, 0x9506,
+	0x0128, 0x2940, 0xa800, 0x904d, 0x0160, 0x0ca8, 0xa800, 0x88ff,
+	0x1128, 0xb8d2, 0x9005, 0x1118, 0xb8ce, 0x0008, 0xa002, 0xa803,
+	0x0000, 0x008e, 0x0005, 0x901e, 0x0010, 0x2019, 0x0001, 0x0126,
+	0x2091, 0x8000, 0x00e6, 0x0096, 0x00c6, 0x0086, 0x0026, 0x2071,
+	0x19e6, 0x9046, 0x7028, 0x9065, 0x01e8, 0x6014, 0x2068, 0x83ff,
+	0x0120, 0x605c, 0x9606, 0x0158, 0x0030, 0xa86c, 0x9406, 0x1118,
+	0xa870, 0x9506, 0x0120, 0x2c40, 0x600c, 0x2060, 0x0c60, 0x600c,
+	0x0006, 0x0066, 0x2830, 0x080c, 0xa042, 0x006e, 0x000e, 0x83ff,
+	0x0508, 0x0c08, 0x9046, 0xb8d0, 0x904d, 0x01e0, 0x83ff, 0x0120,
+	0xa878, 0x9606, 0x0158, 0x0030, 0xa86c, 0x9406, 0x1118, 0xa870,
+	0x9506, 0x0120, 0x2940, 0xa800, 0x2048, 0x0c70, 0xb8d0, 0xaa00,
+	0x0026, 0x9906, 0x1110, 0xbad2, 0x0008, 0xa202, 0x000e, 0x83ff,
+	0x0108, 0x0c10, 0x002e, 0x008e, 0x00ce, 0x009e, 0x00ee, 0x012e,
+	0x0005, 0x9016, 0x0489, 0x1110, 0x2011, 0x0001, 0x0005, 0x080c,
+	0x6986, 0x0128, 0x080c, 0xca3b, 0x0010, 0x9085, 0x0001, 0x0005,
+	0x080c, 0x6986, 0x0128, 0x080c, 0xc9dc, 0x0010, 0x9085, 0x0001,
+	0x0005, 0x080c, 0x6986, 0x0128, 0x080c, 0xca38, 0x0010, 0x9085,
+	0x0001, 0x0005, 0x080c, 0x6986, 0x0128, 0x080c, 0xc9fb, 0x0010,
+	0x9085, 0x0001, 0x0005, 0x080c, 0x6986, 0x0128, 0x080c, 0xca7e,
+	0x0010, 0x9085, 0x0001, 0x0005, 0xb8a4, 0x900d, 0x1118, 0x9085,
+	0x0001, 0x0005, 0x0136, 0x01c6, 0xa800, 0x9005, 0x11b8, 0x890e,
 	0x810e, 0x810f, 0x9184, 0x003f, 0x20e0, 0x9184, 0xffc0, 0x9080,
 	0x0004, 0x2098, 0x20a9, 0x0001, 0x2009, 0x0010, 0x4002, 0x9606,
-	0x0128, 0x8109, 0x1dd8, 0x9085, 0x0001, 0x0068, 0x0146, 0x01d6,
-	0x3300, 0x8001, 0x20a0, 0x3c00, 0x20e8, 0x2001, 0xffff, 0x4004,
-	0x01de, 0x014e, 0x9006, 0x01ce, 0x013e, 0x0005, 0x0096, 0x0126,
-	0x2091, 0x8000, 0xb8a4, 0x904d, 0x1128, 0x080c, 0x1047, 0x0168,
-	0x2900, 0xb8a6, 0x080c, 0x68d3, 0xa803, 0x0001, 0xa807, 0x0000,
-	0x9085, 0x0001, 0x012e, 0x009e, 0x0005, 0x9006, 0x0cd8, 0x0096,
-	0x0126, 0x2091, 0x8000, 0xb8a4, 0x904d, 0x0130, 0xb8a7, 0x0000,
-	0x080c, 0x1079, 0x9085, 0x0001, 0x012e, 0x009e, 0x0005, 0xb89c,
-	0xd0a4, 0x0005, 0x00b6, 0x00f6, 0x080c, 0x74ec, 0x01b0, 0x71c4,
-	0x81ff, 0x1198, 0x71dc, 0xd19c, 0x0180, 0x2001, 0x007e, 0x9080,
-	0x1000, 0x2004, 0x905d, 0x0148, 0xb804, 0x9084, 0x00ff, 0x9086,
-	0x0006, 0x1118, 0xb800, 0xc0ed, 0xb802, 0x2079, 0x1847, 0x7804,
-	0xd0a4, 0x01d0, 0x0156, 0x20a9, 0x007f, 0x900e, 0x0016, 0x080c,
-	0x6644, 0x1168, 0xb804, 0x9084, 0xff00, 0x8007, 0x9096, 0x0004,
-	0x0118, 0x9086, 0x0006, 0x1118, 0xb800, 0xc0ed, 0xb802, 0x001e,
-	0x8108, 0x1f04, 0x695e, 0x015e, 0x080c, 0x6a4c, 0x0120, 0x2001,
-	0x1984, 0x200c, 0x0038, 0x2079, 0x1847, 0x7804, 0xd0a4, 0x0130,
-	0x2009, 0x07d0, 0x2011, 0x6989, 0x080c, 0x871b, 0x00fe, 0x00be,
-	0x0005, 0x00b6, 0x2011, 0x6989, 0x080c, 0x8651, 0x080c, 0x6a4c,
-	0x01d8, 0x2001, 0x107e, 0x2004, 0x2058, 0xb900, 0xc1ec, 0xb902,
-	0x080c, 0x6a8a, 0x0130, 0x2009, 0x07d0, 0x2011, 0x6989, 0x080c,
-	0x871b, 0x00e6, 0x2071, 0x1800, 0x9006, 0x707e, 0x7060, 0x7082,
-	0x080c, 0x2fe0, 0x00ee, 0x04d0, 0x0156, 0x00c6, 0x20a9, 0x007f,
-	0x900e, 0x0016, 0x080c, 0x6644, 0x1558, 0xb800, 0xd0ec, 0x0540,
-	0x0046, 0xbaa0, 0x2220, 0x9006, 0x2009, 0x0029, 0x080c, 0xe316,
-	0xb800, 0xc0e5, 0xc0ec, 0xb802, 0x080c, 0x6a86, 0x2001, 0x0707,
-	0x1128, 0xb804, 0x9084, 0x00ff, 0x9085, 0x0700, 0xb806, 0x080c,
-	0xa899, 0x2019, 0x0029, 0x080c, 0x93c6, 0x0076, 0x903e, 0x080c,
-	0x928f, 0x900e, 0x080c, 0xe038, 0x007e, 0x004e, 0x080c, 0xa8b5,
-	0x001e, 0x8108, 0x1f04, 0x69b1, 0x00ce, 0x015e, 0x00be, 0x0005,
-	0x00b6, 0x6010, 0x2058, 0xb800, 0xc0ec, 0xb802, 0x00be, 0x0005,
-	0x00b6, 0x00c6, 0x0096, 0x080c, 0x1060, 0x090c, 0x0d7d, 0x2958,
-	0x009e, 0x2001, 0x196a, 0x2b02, 0x8b07, 0x8006, 0x8006, 0x908c,
-	0x003f, 0xb9c6, 0x908c, 0xffc0, 0xb9ca, 0xb8af, 0x0000, 0x2009,
-	0x00ff, 0x080c, 0x605e, 0xb807, 0x0006, 0xb813, 0x00ff, 0xb817,
-	0xffff, 0xb86f, 0x0200, 0xb86c, 0xb893, 0x0002, 0xb8bb, 0x0520,
-	0xb8a3, 0x00ff, 0xb8af, 0x0000, 0x00ce, 0x00be, 0x0005, 0x7810,
-	0x00b6, 0x2058, 0xb800, 0x00be, 0xd0ac, 0x0005, 0x6010, 0x00b6,
-	0x905d, 0x0108, 0xb800, 0x00be, 0xd0bc, 0x0005, 0x0006, 0x0016,
-	0x0026, 0xb804, 0x908c, 0x00ff, 0x9196, 0x0006, 0x0188, 0x9196,
-	0x0004, 0x0170, 0x9196, 0x0005, 0x0158, 0x908c, 0xff00, 0x810f,
-	0x9196, 0x0006, 0x0128, 0x9196, 0x0004, 0x0110, 0x9196, 0x0005,
-	0x002e, 0x001e, 0x000e, 0x0005, 0x00b6, 0x00f6, 0x2001, 0x107e,
-	0x2004, 0x905d, 0x0110, 0xb800, 0xd0ec, 0x00fe, 0x00be, 0x0005,
-	0x0126, 0x0026, 0x2091, 0x8000, 0x0006, 0xbaa0, 0x9290, 0x1000,
-	0x2204, 0x9b06, 0x190c, 0x0d7d, 0x000e, 0xba00, 0x9005, 0x0110,
-	0xc2fd, 0x0008, 0xc2fc, 0xba02, 0x002e, 0x012e, 0x0005, 0x2011,
-	0x1837, 0x2204, 0xd0cc, 0x0138, 0x2001, 0x1982, 0x200c, 0x2011,
-	0x6a7c, 0x080c, 0x871b, 0x0005, 0x2011, 0x6a7c, 0x080c, 0x8651,
-	0x2011, 0x1837, 0x2204, 0xc0cc, 0x2012, 0x0005, 0x080c, 0x56f5,
-	0xd0ac, 0x0005, 0x080c, 0x56f5, 0xd0a4, 0x0005, 0x0016, 0xb904,
-	0x9184, 0x00ff, 0x908e, 0x0006, 0x001e, 0x0005, 0x0016, 0xb904,
-	0x9184, 0xff00, 0x8007, 0x908e, 0x0006, 0x001e, 0x0005, 0x00b6,
-	0x00f6, 0x080c, 0xcf84, 0x0158, 0x70dc, 0x9084, 0x0028, 0x0138,
-	0x2001, 0x107f, 0x2004, 0x905d, 0x0110, 0xb8d4, 0xd094, 0x00fe,
-	0x00be, 0x0005, 0x2071, 0x1910, 0x7003, 0x0001, 0x7007, 0x0000,
-	0x9006, 0x7012, 0x7016, 0x701a, 0x701e, 0x700a, 0x7046, 0x0005,
-	0x0016, 0x00e6, 0x2071, 0x1947, 0x900e, 0x710a, 0x080c, 0x56f5,
-	0xd0fc, 0x1140, 0x080c, 0x56f5, 0x900e, 0xd09c, 0x0108, 0x8108,
-	0x7102, 0x00f8, 0x2001, 0x1867, 0x200c, 0x9184, 0x0007, 0x0002,
-	0x6aca, 0x6aca, 0x6aca, 0x6aca, 0x6aca, 0x6ae0, 0x6aee, 0x6aca,
-	0x7003, 0x0003, 0x2009, 0x1868, 0x210c, 0x9184, 0xff00, 0x8007,
-	0x9005, 0x1110, 0x2001, 0x0002, 0x7006, 0x0018, 0x7003, 0x0005,
-	0x0c88, 0x00ee, 0x001e, 0x0005, 0x00e6, 0x2071, 0x0050, 0x684c,
-	0x9005, 0x1150, 0x00e6, 0x2071, 0x1910, 0x7028, 0xc085, 0x702a,
-	0x00ee, 0x9085, 0x0001, 0x0488, 0x6844, 0x9005, 0x0158, 0x080c,
-	0x7861, 0x6a60, 0x9200, 0x7002, 0x6864, 0x9101, 0x7006, 0x9006,
-	0x7012, 0x7016, 0x6860, 0x7002, 0x6864, 0x7006, 0x6868, 0x700a,
-	0x686c, 0x700e, 0x6844, 0x9005, 0x1110, 0x7012, 0x7016, 0x684c,
-	0x701a, 0x701c, 0x9085, 0x0040, 0x701e, 0x7037, 0x0019, 0x702b,
-	0x0001, 0x00e6, 0x2071, 0x1910, 0x7028, 0xc084, 0x702a, 0x7007,
-	0x0001, 0x700b, 0x0000, 0x00ee, 0x9006, 0x00ee, 0x0005, 0x00e6,
-	0x0026, 0x2071, 0x1947, 0x7000, 0x9015, 0x0904, 0x6da4, 0x9286,
-	0x0003, 0x0904, 0x6c34, 0x9286, 0x0005, 0x0904, 0x6c34, 0x2071,
-	0x1877, 0xa87c, 0x9005, 0x0904, 0x6b95, 0x7140, 0xa868, 0x9102,
-	0x0a04, 0x6da4, 0xa878, 0xd084, 0x15d8, 0xa853, 0x0019, 0x2001,
-	0x8023, 0xa84e, 0x2071, 0x1910, 0x701c, 0x9005, 0x1904, 0x6f3b,
-	0x0e04, 0x6fa9, 0x2071, 0x0000, 0xa850, 0x7032, 0xa84c, 0x7082,
-	0xa870, 0x7086, 0xa86c, 0x708a, 0xa880, 0x708e, 0x7036, 0x0146,
-	0x01d6, 0x0136, 0x01c6, 0x0156, 0x20e9, 0x0000, 0x20a1, 0x002a,
-	0xa868, 0x20a8, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x0021, 0x2098,
-	0x4003, 0x015e, 0x01ce, 0x013e, 0x01de, 0x014e, 0x2091, 0x4080,
-	0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11ee, 0x0804, 0x6c17,
-	0xa853, 0x001b, 0x2001, 0x8027, 0x0820, 0x7004, 0xd08c, 0x1904,
-	0x6da4, 0xa853, 0x001a, 0x2001, 0x8024, 0x0804, 0x6b59, 0x00e6,
-	0x0026, 0x2071, 0x1947, 0x7000, 0x9015, 0x0904, 0x6da4, 0x9286,
-	0x0003, 0x0904, 0x6c34, 0x9286, 0x0005, 0x0904, 0x6c34, 0xa84f,
-	0x8022, 0xa853, 0x0018, 0x0804, 0x6bfc, 0xa868, 0xd0fc, 0x11d8,
-	0x00e6, 0x0026, 0x2001, 0x1947, 0x2004, 0x9005, 0x0904, 0x6da4,
-	0xa87c, 0xd0bc, 0x1904, 0x6da4, 0xa978, 0xa874, 0x9105, 0x1904,
-	0x6da4, 0x2001, 0x1947, 0x2004, 0x0002, 0x6da4, 0x6bf8, 0x6c34,
-	0x6c34, 0x6da4, 0x6c34, 0x0005, 0xa868, 0xd0fc, 0x1500, 0x00e6,
-	0x0026, 0x2009, 0x1947, 0x210c, 0x81ff, 0x0904, 0x6da4, 0xa87c,
-	0xd0cc, 0x0904, 0x6da4, 0xa880, 0x9084, 0x00ff, 0x9086, 0x0001,
-	0x1904, 0x6da4, 0x9186, 0x0003, 0x0904, 0x6c34, 0x9186, 0x0005,
-	0x0904, 0x6c34, 0xa84f, 0x8021, 0xa853, 0x0017, 0x0028, 0x0005,
-	0xa84f, 0x8020, 0xa853, 0x0016, 0x2071, 0x1910, 0x701c, 0x9005,
-	0x1904, 0x6f3b, 0x0e04, 0x6fa9, 0x2071, 0x0000, 0xa84c, 0x7082,
-	0xa850, 0x7032, 0xa86c, 0x7086, 0x7036, 0xa870, 0x708a, 0x2091,
-	0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11ee, 0x2071,
-	0x1800, 0x2011, 0x0001, 0xa804, 0x900d, 0x702c, 0x1158, 0xa802,
-	0x2900, 0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c, 0x8566, 0x002e,
-	0x00ee, 0x0005, 0x0096, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900,
-	0x81ff, 0x1dc8, 0x009e, 0x0c58, 0xa84f, 0x0000, 0x00f6, 0x2079,
-	0x0050, 0x2071, 0x1910, 0xa803, 0x0000, 0x7010, 0x9005, 0x1904,
-	0x6d29, 0x782c, 0x908c, 0x0780, 0x190c, 0x70f5, 0x8004, 0x8004,
-	0x8004, 0x9084, 0x0003, 0x0002, 0x6c52, 0x6d29, 0x6c77, 0x6cc4,
-	0x080c, 0x0d7d, 0x2071, 0x1800, 0x2900, 0x7822, 0xa804, 0x900d,
-	0x1170, 0x2071, 0x1a02, 0x703c, 0x9005, 0x1328, 0x2001, 0x1948,
-	0x2004, 0x8005, 0x703e, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x9016,
-	0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8,
-	0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c, 0x8566, 0x0c10, 0x2071,
-	0x1800, 0x2900, 0x7822, 0xa804, 0x900d, 0x15a8, 0x7824, 0x00e6,
-	0x2071, 0x0040, 0x712c, 0xd19c, 0x1170, 0x2009, 0x1830, 0x210c,
-	0x918a, 0x0020, 0x0240, 0x7022, 0x2001, 0x1dc0, 0x200c, 0x8108,
-	0x2102, 0x00ee, 0x0058, 0x00ee, 0x2048, 0x702c, 0xa802, 0x2900,
-	0x702e, 0x70c0, 0x8000, 0x70c2, 0x080c, 0x8566, 0x782c, 0x9094,
-	0x0780, 0x190c, 0x70f5, 0xd0a4, 0x19c8, 0x2071, 0x1a02, 0x703c,
-	0x9005, 0x1328, 0x2001, 0x1948, 0x2004, 0x8005, 0x703e, 0x00fe,
-	0x002e, 0x00ee, 0x0005, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802,
-	0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70c0, 0x9200, 0x70c2,
-	0x080c, 0x8566, 0x0804, 0x6c7e, 0x0096, 0x00e6, 0x7824, 0x2048,
-	0x2071, 0x1800, 0x702c, 0xa802, 0x2900, 0x702e, 0x70c0, 0x8000,
-	0x70c2, 0x080c, 0x8566, 0x782c, 0x9094, 0x0780, 0x190c, 0x70f5,
-	0xd0a4, 0x1d60, 0x00ee, 0x782c, 0x9094, 0x0780, 0x190c, 0x70f5,
-	0xd09c, 0x11a0, 0x009e, 0x2900, 0x7822, 0xa804, 0x900d, 0x1560,
+	0x0128, 0x8109, 0x1dd8, 0x9085, 0x0001, 0x0008, 0x9006, 0x01ce,
+	0x013e, 0x0005, 0x0146, 0x01d6, 0xa860, 0x20e8, 0xa85c, 0x9080,
+	0x0004, 0x20a0, 0x20a9, 0x0010, 0x2009, 0xffff, 0x4104, 0x01de,
+	0x014e, 0x0136, 0x01c6, 0xa800, 0x9005, 0x11b8, 0x890e, 0x810e,
+	0x810f, 0x9184, 0x003f, 0x20e0, 0x9184, 0xffc0, 0x9080, 0x0004,
+	0x2098, 0x20a9, 0x0001, 0x2009, 0x0010, 0x4002, 0x9606, 0x0128,
+	0x8109, 0x1dd8, 0x9085, 0x0001, 0x0068, 0x0146, 0x01d6, 0x3300,
+	0x8001, 0x20a0, 0x3c00, 0x20e8, 0x2001, 0xffff, 0x4004, 0x01de,
+	0x014e, 0x9006, 0x01ce, 0x013e, 0x0005, 0x0096, 0x0126, 0x2091,
+	0x8000, 0xb8a4, 0x904d, 0x1128, 0x080c, 0x1047, 0x0168, 0x2900,
+	0xb8a6, 0x080c, 0x6922, 0xa803, 0x0001, 0xa807, 0x0000, 0x9085,
+	0x0001, 0x012e, 0x009e, 0x0005, 0x9006, 0x0cd8, 0x0096, 0x0126,
+	0x2091, 0x8000, 0xb8a4, 0x904d, 0x0130, 0xb8a7, 0x0000, 0x080c,
+	0x1079, 0x9085, 0x0001, 0x012e, 0x009e, 0x0005, 0xb89c, 0xd0a4,
+	0x0005, 0x00b6, 0x00f6, 0x080c, 0x753d, 0x01b0, 0x71c4, 0x81ff,
+	0x1198, 0x71dc, 0xd19c, 0x0180, 0x2001, 0x007e, 0x9080, 0x1000,
+	0x2004, 0x905d, 0x0148, 0xb804, 0x9084, 0x00ff, 0x9086, 0x0006,
+	0x1118, 0xb800, 0xc0ed, 0xb802, 0x2079, 0x1847, 0x7804, 0xd0a4,
+	0x01d0, 0x0156, 0x20a9, 0x007f, 0x900e, 0x0016, 0x080c, 0x6693,
+	0x1168, 0xb804, 0x9084, 0xff00, 0x8007, 0x9096, 0x0004, 0x0118,
+	0x9086, 0x0006, 0x1118, 0xb800, 0xc0ed, 0xb802, 0x001e, 0x8108,
+	0x1f04, 0x69ad, 0x015e, 0x080c, 0x6a9b, 0x0120, 0x2001, 0x1984,
+	0x200c, 0x0038, 0x2079, 0x1847, 0x7804, 0xd0a4, 0x0130, 0x2009,
+	0x07d0, 0x2011, 0x69d8, 0x080c, 0x8792, 0x00fe, 0x00be, 0x0005,
+	0x00b6, 0x2011, 0x69d8, 0x080c, 0x86c8, 0x080c, 0x6a9b, 0x01d8,
+	0x2001, 0x107e, 0x2004, 0x2058, 0xb900, 0xc1ec, 0xb902, 0x080c,
+	0x6ad9, 0x0130, 0x2009, 0x07d0, 0x2011, 0x69d8, 0x080c, 0x8792,
+	0x00e6, 0x2071, 0x1800, 0x9006, 0x707e, 0x7060, 0x7082, 0x080c,
+	0x3011, 0x00ee, 0x04d0, 0x0156, 0x00c6, 0x20a9, 0x007f, 0x900e,
+	0x0016, 0x080c, 0x6693, 0x1558, 0xb800, 0xd0ec, 0x0540, 0x0046,
+	0xbaa0, 0x2220, 0x9006, 0x2009, 0x0029, 0x080c, 0xe445, 0xb800,
+	0xc0e5, 0xc0ec, 0xb802, 0x080c, 0x6ad5, 0x2001, 0x0707, 0x1128,
+	0xb804, 0x9084, 0x00ff, 0x9085, 0x0700, 0xb806, 0x080c, 0xa91e,
+	0x2019, 0x0029, 0x080c, 0x943d, 0x0076, 0x903e, 0x080c, 0x9306,
+	0x900e, 0x080c, 0xe167, 0x007e, 0x004e, 0x080c, 0xa93a, 0x001e,
+	0x8108, 0x1f04, 0x6a00, 0x00ce, 0x015e, 0x00be, 0x0005, 0x00b6,
+	0x6010, 0x2058, 0xb800, 0xc0ec, 0xb802, 0x00be, 0x0005, 0x00b6,
+	0x00c6, 0x0096, 0x080c, 0x1060, 0x090c, 0x0d7d, 0x2958, 0x009e,
+	0x2001, 0x196a, 0x2b02, 0x8b07, 0x8006, 0x8006, 0x908c, 0x003f,
+	0xb9c6, 0x908c, 0xffc0, 0xb9ca, 0xb8af, 0x0000, 0x2009, 0x00ff,
+	0x080c, 0x60ac, 0xb807, 0x0006, 0xb813, 0x00ff, 0xb817, 0xffff,
+	0xb86f, 0x0200, 0xb86c, 0xb893, 0x0002, 0xb8bb, 0x0520, 0xb8a3,
+	0x00ff, 0xb8af, 0x0000, 0x00ce, 0x00be, 0x0005, 0x7810, 0x00b6,
+	0x2058, 0xb800, 0x00be, 0xd0ac, 0x0005, 0x6010, 0x00b6, 0x905d,
+	0x0108, 0xb800, 0x00be, 0xd0bc, 0x0005, 0x0006, 0x0016, 0x0026,
+	0xb804, 0x908c, 0x00ff, 0x9196, 0x0006, 0x0188, 0x9196, 0x0004,
+	0x0170, 0x9196, 0x0005, 0x0158, 0x908c, 0xff00, 0x810f, 0x9196,
+	0x0006, 0x0128, 0x9196, 0x0004, 0x0110, 0x9196, 0x0005, 0x002e,
+	0x001e, 0x000e, 0x0005, 0x00b6, 0x00f6, 0x2001, 0x107e, 0x2004,
+	0x905d, 0x0110, 0xb800, 0xd0ec, 0x00fe, 0x00be, 0x0005, 0x0126,
+	0x0026, 0x2091, 0x8000, 0x0006, 0xbaa0, 0x9290, 0x1000, 0x2204,
+	0x9b06, 0x190c, 0x0d7d, 0x000e, 0xba00, 0x9005, 0x0110, 0xc2fd,
+	0x0008, 0xc2fc, 0xba02, 0x002e, 0x012e, 0x0005, 0x2011, 0x1837,
+	0x2204, 0xd0cc, 0x0138, 0x2001, 0x1982, 0x200c, 0x2011, 0x6acb,
+	0x080c, 0x8792, 0x0005, 0x2011, 0x6acb, 0x080c, 0x86c8, 0x2011,
+	0x1837, 0x2204, 0xc0cc, 0x2012, 0x0005, 0x080c, 0x573e, 0xd0ac,
+	0x0005, 0x080c, 0x573e, 0xd0a4, 0x0005, 0x0016, 0xb904, 0x9184,
+	0x00ff, 0x908e, 0x0006, 0x001e, 0x0005, 0x0016, 0xb904, 0x9184,
+	0xff00, 0x8007, 0x908e, 0x0006, 0x001e, 0x0005, 0x00b6, 0x00f6,
+	0x080c, 0xd09b, 0x0158, 0x70dc, 0x9084, 0x0028, 0x0138, 0x2001,
+	0x107f, 0x2004, 0x905d, 0x0110, 0xb8d4, 0xd094, 0x00fe, 0x00be,
+	0x0005, 0x2071, 0x1910, 0x7003, 0x0001, 0x7007, 0x0000, 0x9006,
+	0x7012, 0x7016, 0x701a, 0x701e, 0x700a, 0x7046, 0x0005, 0x0016,
+	0x00e6, 0x2071, 0x1947, 0x900e, 0x710a, 0x080c, 0x573e, 0xd0fc,
+	0x1140, 0x080c, 0x573e, 0x900e, 0xd09c, 0x0108, 0x8108, 0x7102,
+	0x00f8, 0x2001, 0x1867, 0x200c, 0x9184, 0x0007, 0x0002, 0x6b19,
+	0x6b19, 0x6b19, 0x6b19, 0x6b19, 0x6b2f, 0x6b3d, 0x6b19, 0x7003,
+	0x0003, 0x2009, 0x1868, 0x210c, 0x9184, 0xff00, 0x8007, 0x9005,
+	0x1110, 0x2001, 0x0002, 0x7006, 0x0018, 0x7003, 0x0005, 0x0c88,
+	0x00ee, 0x001e, 0x0005, 0x00e6, 0x2071, 0x0050, 0x684c, 0x9005,
+	0x1150, 0x00e6, 0x2071, 0x1910, 0x7028, 0xc085, 0x702a, 0x00ee,
+	0x9085, 0x0001, 0x0488, 0x6844, 0x9005, 0x0158, 0x080c, 0x78b2,
+	0x6a60, 0x9200, 0x7002, 0x6864, 0x9101, 0x7006, 0x9006, 0x7012,
+	0x7016, 0x6860, 0x7002, 0x6864, 0x7006, 0x6868, 0x700a, 0x686c,
+	0x700e, 0x6844, 0x9005, 0x1110, 0x7012, 0x7016, 0x684c, 0x701a,
+	0x701c, 0x9085, 0x0040, 0x701e, 0x7037, 0x0019, 0x702b, 0x0001,
+	0x00e6, 0x2071, 0x1910, 0x7028, 0xc084, 0x702a, 0x7007, 0x0001,
+	0x700b, 0x0000, 0x00ee, 0x9006, 0x00ee, 0x0005, 0x00e6, 0x0026,
+	0x2071, 0x1947, 0x7000, 0x9015, 0x0904, 0x6df3, 0x9286, 0x0003,
+	0x0904, 0x6c83, 0x9286, 0x0005, 0x0904, 0x6c83, 0x2071, 0x1877,
+	0xa87c, 0x9005, 0x0904, 0x6be4, 0x7140, 0xa868, 0x9102, 0x0a04,
+	0x6df3, 0xa878, 0xd084, 0x15d8, 0xa853, 0x0019, 0x2001, 0x8023,
+	0xa84e, 0x2071, 0x1910, 0x701c, 0x9005, 0x1904, 0x6f8a, 0x0e04,
+	0x6ff8, 0x2071, 0x0000, 0xa850, 0x7032, 0xa84c, 0x7082, 0xa870,
+	0x7086, 0xa86c, 0x708a, 0xa880, 0x708e, 0x7036, 0x0146, 0x01d6,
+	0x0136, 0x01c6, 0x0156, 0x20e9, 0x0000, 0x20a1, 0x002a, 0xa868,
+	0x20a8, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x0021, 0x2098, 0x4003,
+	0x015e, 0x01ce, 0x013e, 0x01de, 0x014e, 0x2091, 0x4080, 0x2001,
+	0x0089, 0x2004, 0xd084, 0x190c, 0x11ee, 0x0804, 0x6c66, 0xa853,
+	0x001b, 0x2001, 0x8027, 0x0820, 0x7004, 0xd08c, 0x1904, 0x6df3,
+	0xa853, 0x001a, 0x2001, 0x8024, 0x0804, 0x6ba8, 0x00e6, 0x0026,
+	0x2071, 0x1947, 0x7000, 0x9015, 0x0904, 0x6df3, 0x9286, 0x0003,
+	0x0904, 0x6c83, 0x9286, 0x0005, 0x0904, 0x6c83, 0xa84f, 0x8022,
+	0xa853, 0x0018, 0x0804, 0x6c4b, 0xa868, 0xd0fc, 0x11d8, 0x00e6,
+	0x0026, 0x2001, 0x1947, 0x2004, 0x9005, 0x0904, 0x6df3, 0xa87c,
+	0xd0bc, 0x1904, 0x6df3, 0xa978, 0xa874, 0x9105, 0x1904, 0x6df3,
+	0x2001, 0x1947, 0x2004, 0x0002, 0x6df3, 0x6c47, 0x6c83, 0x6c83,
+	0x6df3, 0x6c83, 0x0005, 0xa868, 0xd0fc, 0x1500, 0x00e6, 0x0026,
+	0x2009, 0x1947, 0x210c, 0x81ff, 0x0904, 0x6df3, 0xa87c, 0xd0cc,
+	0x0904, 0x6df3, 0xa880, 0x9084, 0x00ff, 0x9086, 0x0001, 0x1904,
+	0x6df3, 0x9186, 0x0003, 0x0904, 0x6c83, 0x9186, 0x0005, 0x0904,
+	0x6c83, 0xa84f, 0x8021, 0xa853, 0x0017, 0x0028, 0x0005, 0xa84f,
+	0x8020, 0xa853, 0x0016, 0x2071, 0x1910, 0x701c, 0x9005, 0x1904,
+	0x6f8a, 0x0e04, 0x6ff8, 0x2071, 0x0000, 0xa84c, 0x7082, 0xa850,
+	0x7032, 0xa86c, 0x7086, 0x7036, 0xa870, 0x708a, 0x2091, 0x4080,
+	0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11ee, 0x2071, 0x1800,
+	0x2011, 0x0001, 0xa804, 0x900d, 0x702c, 0x1158, 0xa802, 0x2900,
+	0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c, 0x85ce, 0x002e, 0x00ee,
+	0x0005, 0x0096, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff,
+	0x1dc8, 0x009e, 0x0c58, 0xa84f, 0x0000, 0x00f6, 0x2079, 0x0050,
+	0x2071, 0x1910, 0xa803, 0x0000, 0x7010, 0x9005, 0x1904, 0x6d78,
+	0x782c, 0x908c, 0x0780, 0x190c, 0x7146, 0x8004, 0x8004, 0x8004,
+	0x9084, 0x0003, 0x0002, 0x6ca1, 0x6d78, 0x6cc6, 0x6d13, 0x080c,
+	0x0d7d, 0x2071, 0x1800, 0x2900, 0x7822, 0xa804, 0x900d, 0x1170,
 	0x2071, 0x1a02, 0x703c, 0x9005, 0x1328, 0x2001, 0x1948, 0x2004,
-	0x8005, 0x703e, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x009e, 0x2908,
-	0x7010, 0x8000, 0x7012, 0x7018, 0x904d, 0x711a, 0x0110, 0xa902,
-	0x0008, 0x711e, 0x2148, 0xa804, 0x900d, 0x1170, 0x2071, 0x1a02,
-	0x703c, 0x9005, 0x1328, 0x2001, 0x1948, 0x2004, 0x8005, 0x703e,
-	0x00fe, 0x002e, 0x00ee, 0x0005, 0x2071, 0x1800, 0x9016, 0x702c,
+	0x8005, 0x703e, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x9016, 0x702c,
 	0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e,
-	0x70c0, 0x9200, 0x70c2, 0x080c, 0x8566, 0x00fe, 0x002e, 0x00ee,
-	0x0005, 0x2908, 0x7010, 0x8000, 0x7012, 0x7018, 0x904d, 0x711a,
-	0x0110, 0xa902, 0x0008, 0x711e, 0x2148, 0xa804, 0x900d, 0x1904,
-	0x6d7e, 0x782c, 0x9094, 0x0780, 0x190c, 0x70f5, 0xd09c, 0x1198,
-	0x701c, 0x904d, 0x0180, 0x7010, 0x8001, 0x7012, 0x1108, 0x701a,
-	0xa800, 0x701e, 0x2900, 0x7822, 0x782c, 0x9094, 0x0780, 0x190c,
-	0x70f5, 0xd09c, 0x0d68, 0x782c, 0x9094, 0x0780, 0x190c, 0x70f5,
-	0xd0a4, 0x01b0, 0x00e6, 0x7824, 0x2048, 0x2071, 0x1800, 0x702c,
-	0xa802, 0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2, 0x080c, 0x8566,
-	0x782c, 0x9094, 0x0780, 0x190c, 0x70f5, 0xd0a4, 0x1d60, 0x00ee,
-	0x2071, 0x1a02, 0x703c, 0x9005, 0x1328, 0x2001, 0x1948, 0x2004,
-	0x8005, 0x703e, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x00e6, 0x2071,
-	0x1800, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900,
-	0x81ff, 0x1dc8, 0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c, 0x8566,
-	0x00ee, 0x0804, 0x6d39, 0xa868, 0xd0fc, 0x1560, 0x0096, 0xa804,
-	0xa807, 0x0000, 0x904d, 0x190c, 0x0ff9, 0x009e, 0x0018, 0xa868,
-	0xd0fc, 0x1500, 0x00e6, 0x0026, 0xa84f, 0x0000, 0x00f6, 0x2079,
-	0x0050, 0x2071, 0x1910, 0xa803, 0x0000, 0x7010, 0x9005, 0x1904,
-	0x6eb9, 0x782c, 0x908c, 0x0780, 0x190c, 0x70f5, 0x8004, 0x8004,
-	0x8004, 0x9084, 0x0003, 0x0002, 0x6dc3, 0x6eb9, 0x6dde, 0x6e4c,
-	0x080c, 0x0d7d, 0x0005, 0x2071, 0x1800, 0x2900, 0x7822, 0xa804,
-	0x900d, 0x1120, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x9016, 0x702c,
-	0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e,
-	0x70c0, 0x9200, 0x70c2, 0x080c, 0x8566, 0x0c60, 0x2071, 0x1800,
-	0x2900, 0x7822, 0xa804, 0x900d, 0x1904, 0x6e3b, 0x7830, 0xd0dc,
-	0x1120, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x7824, 0x00e6, 0x2071,
+	0x70c0, 0x9200, 0x70c2, 0x080c, 0x85ce, 0x0c10, 0x2071, 0x1800,
+	0x2900, 0x7822, 0xa804, 0x900d, 0x15a8, 0x7824, 0x00e6, 0x2071,
 	0x0040, 0x712c, 0xd19c, 0x1170, 0x2009, 0x1830, 0x210c, 0x918a,
 	0x0020, 0x0240, 0x7022, 0x2001, 0x1dc0, 0x200c, 0x8108, 0x2102,
 	0x00ee, 0x0058, 0x00ee, 0x2048, 0x702c, 0xa802, 0x2900, 0x702e,
-	0x70c0, 0x8000, 0x70c2, 0x080c, 0x8566, 0x782c, 0x9094, 0x0780,
-	0x190c, 0x70f5, 0xd0a4, 0x19c8, 0x0e04, 0x6e32, 0x7838, 0x7938,
-	0x910e, 0x1de0, 0x00d6, 0x2069, 0x0000, 0x6836, 0x6833, 0x0013,
-	0x00de, 0x2001, 0x1921, 0x200c, 0xc184, 0x2102, 0x2091, 0x4080,
-	0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11ee, 0x00fe, 0x002e,
-	0x00ee, 0x0005, 0x2001, 0x1921, 0x200c, 0xc185, 0x2102, 0x00fe,
-	0x002e, 0x00ee, 0x0005, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802,
-	0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70c0, 0x9200, 0x70c2,
-	0x080c, 0x8566, 0x0804, 0x6ded, 0x0096, 0x00e6, 0x7824, 0x2048,
-	0x2071, 0x1800, 0x702c, 0xa802, 0x2900, 0x702e, 0x70c0, 0x8000,
-	0x70c2, 0x080c, 0x8566, 0x782c, 0x9094, 0x0780, 0x190c, 0x70f5,
-	0xd0a4, 0x1d60, 0x00ee, 0x0e04, 0x6e8c, 0x7838, 0x7938, 0x910e,
-	0x1de0, 0x00d6, 0x2069, 0x0000, 0x6836, 0x6833, 0x0013, 0x00de,
-	0x7044, 0xc084, 0x7046, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004,
-	0xd084, 0x190c, 0x11ee, 0x782c, 0x9094, 0x0780, 0x190c, 0x70f5,
-	0xd09c, 0x1170, 0x009e, 0x2900, 0x7822, 0xa804, 0x900d, 0x11e0,
-	0x00fe, 0x002e, 0x00ee, 0x0005, 0x7044, 0xc085, 0x7046, 0x0c58,
-	0x009e, 0x2908, 0x7010, 0x8000, 0x7012, 0x7018, 0x904d, 0x711a,
-	0x0110, 0xa902, 0x0008, 0x711e, 0x2148, 0xa804, 0x900d, 0x1120,
-	0x00fe, 0x002e, 0x00ee, 0x0005, 0x2071, 0x1800, 0x9016, 0x702c,
-	0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e,
-	0x70c0, 0x9200, 0x70c2, 0x080c, 0x8566, 0x00fe, 0x002e, 0x00ee,
-	0x0005, 0x2908, 0x7010, 0x8000, 0x7012, 0x7018, 0x904d, 0x711a,
-	0x0110, 0xa902, 0x0008, 0x711e, 0x2148, 0xa804, 0x900d, 0x1904,
-	0x6f26, 0x782c, 0x9094, 0x0780, 0x190c, 0x70f5, 0xd09c, 0x11b0,
-	0x701c, 0x904d, 0x0198, 0xa84c, 0x9005, 0x1180, 0x7010, 0x8001,
-	0x7012, 0x1108, 0x701a, 0xa800, 0x701e, 0x2900, 0x7822, 0x782c,
-	0x9094, 0x0780, 0x190c, 0x70f5, 0xd09c, 0x0d50, 0x782c, 0x9094,
-	0x0780, 0x190c, 0x70f5, 0xd0a4, 0x05a8, 0x00e6, 0x7824, 0x2048,
-	0x2071, 0x1800, 0x702c, 0xa802, 0x2900, 0x702e, 0x70c0, 0x8000,
-	0x70c2, 0x080c, 0x8566, 0x782c, 0x9094, 0x0780, 0x190c, 0x70f5,
-	0xd0a4, 0x1d60, 0x00ee, 0x0e04, 0x6f1f, 0x7838, 0x7938, 0x910e,
+	0x70c0, 0x8000, 0x70c2, 0x080c, 0x85ce, 0x782c, 0x9094, 0x0780,
+	0x190c, 0x7146, 0xd0a4, 0x19c8, 0x2071, 0x1a02, 0x703c, 0x9005,
+	0x1328, 0x2001, 0x1948, 0x2004, 0x8005, 0x703e, 0x00fe, 0x002e,
+	0x00ee, 0x0005, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210,
+	0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c,
+	0x85ce, 0x0804, 0x6ccd, 0x0096, 0x00e6, 0x7824, 0x2048, 0x2071,
+	0x1800, 0x702c, 0xa802, 0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2,
+	0x080c, 0x85ce, 0x782c, 0x9094, 0x0780, 0x190c, 0x7146, 0xd0a4,
+	0x1d60, 0x00ee, 0x782c, 0x9094, 0x0780, 0x190c, 0x7146, 0xd09c,
+	0x11a0, 0x009e, 0x2900, 0x7822, 0xa804, 0x900d, 0x1560, 0x2071,
+	0x1a02, 0x703c, 0x9005, 0x1328, 0x2001, 0x1948, 0x2004, 0x8005,
+	0x703e, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x009e, 0x2908, 0x7010,
+	0x8000, 0x7012, 0x7018, 0x904d, 0x711a, 0x0110, 0xa902, 0x0008,
+	0x711e, 0x2148, 0xa804, 0x900d, 0x1170, 0x2071, 0x1a02, 0x703c,
+	0x9005, 0x1328, 0x2001, 0x1948, 0x2004, 0x8005, 0x703e, 0x00fe,
+	0x002e, 0x00ee, 0x0005, 0x2071, 0x1800, 0x9016, 0x702c, 0x2148,
+	0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70c0,
+	0x9200, 0x70c2, 0x080c, 0x85ce, 0x00fe, 0x002e, 0x00ee, 0x0005,
+	0x2908, 0x7010, 0x8000, 0x7012, 0x7018, 0x904d, 0x711a, 0x0110,
+	0xa902, 0x0008, 0x711e, 0x2148, 0xa804, 0x900d, 0x1904, 0x6dcd,
+	0x782c, 0x9094, 0x0780, 0x190c, 0x7146, 0xd09c, 0x1198, 0x701c,
+	0x904d, 0x0180, 0x7010, 0x8001, 0x7012, 0x1108, 0x701a, 0xa800,
+	0x701e, 0x2900, 0x7822, 0x782c, 0x9094, 0x0780, 0x190c, 0x7146,
+	0xd09c, 0x0d68, 0x782c, 0x9094, 0x0780, 0x190c, 0x7146, 0xd0a4,
+	0x01b0, 0x00e6, 0x7824, 0x2048, 0x2071, 0x1800, 0x702c, 0xa802,
+	0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2, 0x080c, 0x85ce, 0x782c,
+	0x9094, 0x0780, 0x190c, 0x7146, 0xd0a4, 0x1d60, 0x00ee, 0x2071,
+	0x1a02, 0x703c, 0x9005, 0x1328, 0x2001, 0x1948, 0x2004, 0x8005,
+	0x703e, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x00e6, 0x2071, 0x1800,
+	0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff,
+	0x1dc8, 0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c, 0x85ce, 0x00ee,
+	0x0804, 0x6d88, 0xa868, 0xd0fc, 0x1560, 0x0096, 0xa804, 0xa807,
+	0x0000, 0x904d, 0x190c, 0x0ff9, 0x009e, 0x0018, 0xa868, 0xd0fc,
+	0x1500, 0x00e6, 0x0026, 0xa84f, 0x0000, 0x00f6, 0x2079, 0x0050,
+	0x2071, 0x1910, 0xa803, 0x0000, 0x7010, 0x9005, 0x1904, 0x6f08,
+	0x782c, 0x908c, 0x0780, 0x190c, 0x7146, 0x8004, 0x8004, 0x8004,
+	0x9084, 0x0003, 0x0002, 0x6e12, 0x6f08, 0x6e2d, 0x6e9b, 0x080c,
+	0x0d7d, 0x0005, 0x2071, 0x1800, 0x2900, 0x7822, 0xa804, 0x900d,
+	0x1120, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x9016, 0x702c, 0x2148,
+	0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70c0,
+	0x9200, 0x70c2, 0x080c, 0x85ce, 0x0c60, 0x2071, 0x1800, 0x2900,
+	0x7822, 0xa804, 0x900d, 0x1904, 0x6e8a, 0x7830, 0xd0dc, 0x1120,
+	0x00fe, 0x002e, 0x00ee, 0x0005, 0x7824, 0x00e6, 0x2071, 0x0040,
+	0x712c, 0xd19c, 0x1170, 0x2009, 0x1830, 0x210c, 0x918a, 0x0020,
+	0x0240, 0x7022, 0x2001, 0x1dc0, 0x200c, 0x8108, 0x2102, 0x00ee,
+	0x0058, 0x00ee, 0x2048, 0x702c, 0xa802, 0x2900, 0x702e, 0x70c0,
+	0x8000, 0x70c2, 0x080c, 0x85ce, 0x782c, 0x9094, 0x0780, 0x190c,
+	0x7146, 0xd0a4, 0x19c8, 0x0e04, 0x6e81, 0x7838, 0x7938, 0x910e,
 	0x1de0, 0x00d6, 0x2069, 0x0000, 0x6836, 0x6833, 0x0013, 0x00de,
-	0x7044, 0xc084, 0x7046, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004,
-	0xd084, 0x190c, 0x11ee, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x7044,
-	0xc085, 0x7046, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x00e6, 0x2071,
-	0x1800, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900,
-	0x81ff, 0x1dc8, 0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c, 0x8566,
-	0x00ee, 0x0804, 0x6ec9, 0x2071, 0x1910, 0xa803, 0x0000, 0x2908,
-	0x7010, 0x8000, 0x7012, 0x7018, 0x904d, 0x711a, 0x0110, 0xa902,
-	0x0008, 0x711e, 0x2148, 0xa804, 0x900d, 0x1128, 0x1e04, 0x6f66,
+	0x2001, 0x1921, 0x200c, 0xc184, 0x2102, 0x2091, 0x4080, 0x2001,
+	0x0089, 0x2004, 0xd084, 0x190c, 0x11ee, 0x00fe, 0x002e, 0x00ee,
+	0x0005, 0x2001, 0x1921, 0x200c, 0xc185, 0x2102, 0x00fe, 0x002e,
+	0x00ee, 0x0005, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210,
+	0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c,
+	0x85ce, 0x0804, 0x6e3c, 0x0096, 0x00e6, 0x7824, 0x2048, 0x2071,
+	0x1800, 0x702c, 0xa802, 0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2,
+	0x080c, 0x85ce, 0x782c, 0x9094, 0x0780, 0x190c, 0x7146, 0xd0a4,
+	0x1d60, 0x00ee, 0x0e04, 0x6edb, 0x7838, 0x7938, 0x910e, 0x1de0,
+	0x00d6, 0x2069, 0x0000, 0x6836, 0x6833, 0x0013, 0x00de, 0x7044,
+	0xc084, 0x7046, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084,
+	0x190c, 0x11ee, 0x782c, 0x9094, 0x0780, 0x190c, 0x7146, 0xd09c,
+	0x1170, 0x009e, 0x2900, 0x7822, 0xa804, 0x900d, 0x11e0, 0x00fe,
+	0x002e, 0x00ee, 0x0005, 0x7044, 0xc085, 0x7046, 0x0c58, 0x009e,
+	0x2908, 0x7010, 0x8000, 0x7012, 0x7018, 0x904d, 0x711a, 0x0110,
+	0xa902, 0x0008, 0x711e, 0x2148, 0xa804, 0x900d, 0x1120, 0x00fe,
 	0x002e, 0x00ee, 0x0005, 0x2071, 0x1800, 0x9016, 0x702c, 0x2148,
 	0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70c0,
-	0x9200, 0x70c2, 0x080c, 0x8566, 0x0e04, 0x6f50, 0x2071, 0x1910,
-	0x701c, 0x2048, 0xa84c, 0x900d, 0x0d18, 0x2071, 0x0000, 0x7182,
-	0xa850, 0x7032, 0xa86c, 0x7086, 0x7036, 0xa870, 0x708a, 0xa850,
-	0x9082, 0x0019, 0x1278, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004,
-	0xd084, 0x190c, 0x11ee, 0x2071, 0x1910, 0x080c, 0x70e1, 0x002e,
-	0x00ee, 0x0005, 0xa850, 0x9082, 0x001c, 0x1e68, 0xa880, 0x708e,
-	0x7036, 0x0146, 0x01d6, 0x0136, 0x01c6, 0x0156, 0x20e9, 0x0000,
-	0x20a1, 0x002a, 0xa868, 0x20a8, 0xa860, 0x20e0, 0xa85c, 0x9080,
-	0x0021, 0x2098, 0x4003, 0x015e, 0x01ce, 0x013e, 0x01de, 0x014e,
-	0x0890, 0x2071, 0x1910, 0xa803, 0x0000, 0x2908, 0x7010, 0x8000,
-	0x7012, 0x7018, 0x904d, 0x711a, 0x0110, 0xa902, 0x0008, 0x711e,
-	0x2148, 0xa804, 0x900d, 0x1118, 0x002e, 0x00ee, 0x0005, 0x2071,
-	0x1800, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900,
-	0x81ff, 0x1dc8, 0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c, 0x8566,
-	0x002e, 0x00ee, 0x0005, 0x0006, 0xa87c, 0x0006, 0xa867, 0x0103,
-	0x20a9, 0x001c, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x001d, 0x20a0,
-	0x9006, 0x4004, 0x000e, 0x9084, 0x00ff, 0xa87e, 0x000e, 0xa87a,
-	0xa982, 0x0005, 0x2071, 0x1910, 0x7004, 0x0002, 0x6ff4, 0x6ff5,
-	0x70e0, 0x6ff5, 0x0d7d, 0x70e0, 0x0005, 0x2001, 0x1947, 0x2004,
-	0x0002, 0x6fff, 0x6fff, 0x7079, 0x707a, 0x6fff, 0x707a, 0x0126,
-	0x2091, 0x8000, 0x1e0c, 0x7100, 0x701c, 0x904d, 0x0508, 0xa84c,
-	0x9005, 0x0904, 0x704a, 0x0e04, 0x7028, 0xa94c, 0x2071, 0x0000,
-	0x7182, 0xa850, 0x7032, 0xa86c, 0x7086, 0x7036, 0xa870, 0x708a,
-	0xa850, 0x9082, 0x0019, 0x1278, 0x2091, 0x4080, 0x2001, 0x0089,
-	0x2004, 0xd084, 0x190c, 0x11ee, 0x2071, 0x1910, 0x080c, 0x70e1,
-	0x012e, 0x0804, 0x7078, 0xa850, 0x9082, 0x001c, 0x1e68, 0xa880,
-	0x708e, 0x7036, 0x0146, 0x01d6, 0x0136, 0x01c6, 0x0156, 0x20e9,
-	0x0000, 0x20a1, 0x002a, 0xa868, 0x20a8, 0xa860, 0x20e0, 0xa85c,
-	0x9080, 0x0021, 0x2098, 0x4003, 0x015e, 0x01ce, 0x013e, 0x01de,
-	0x014e, 0x0890, 0x2001, 0x005b, 0x2004, 0x9094, 0x0780, 0x190c,
-	0x70f5, 0xd09c, 0x2071, 0x1910, 0x1510, 0x2071, 0x1910, 0x700f,
-	0x0001, 0xa964, 0x9184, 0x00ff, 0x9086, 0x0003, 0x1130, 0x810f,
-	0x918c, 0x00ff, 0x8101, 0x0108, 0x710e, 0x2900, 0x00d6, 0x2069,
-	0x0050, 0x6822, 0x00de, 0x2071, 0x1910, 0x701c, 0x2048, 0x7010,
-	0x8001, 0x7012, 0xa800, 0x701e, 0x9005, 0x1108, 0x701a, 0x012e,
-	0x0005, 0x0005, 0x00d6, 0x2008, 0x2069, 0x1a02, 0x683c, 0x9005,
-	0x0760, 0x0158, 0x9186, 0x0003, 0x0540, 0x2001, 0x1815, 0x2004,
-	0x2009, 0x1b4d, 0x210c, 0x9102, 0x1500, 0x0126, 0x2091, 0x8000,
-	0x2069, 0x0050, 0x693c, 0x6838, 0x9106, 0x0190, 0x0e04, 0x70ac,
-	0x2069, 0x0000, 0x6837, 0x8040, 0x6833, 0x0012, 0x6883, 0x8040,
-	0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11ee,
-	0x2069, 0x1a02, 0x683f, 0xffff, 0x012e, 0x00de, 0x0126, 0x2091,
-	0x8000, 0x1e0c, 0x7166, 0x701c, 0x904d, 0x0540, 0x2001, 0x005b,
-	0x2004, 0x9094, 0x0780, 0x15c9, 0xd09c, 0x1500, 0x2071, 0x1910,
+	0x9200, 0x70c2, 0x080c, 0x85ce, 0x00fe, 0x002e, 0x00ee, 0x0005,
+	0x2908, 0x7010, 0x8000, 0x7012, 0x7018, 0x904d, 0x711a, 0x0110,
+	0xa902, 0x0008, 0x711e, 0x2148, 0xa804, 0x900d, 0x1904, 0x6f75,
+	0x782c, 0x9094, 0x0780, 0x190c, 0x7146, 0xd09c, 0x11b0, 0x701c,
+	0x904d, 0x0198, 0xa84c, 0x9005, 0x1180, 0x7010, 0x8001, 0x7012,
+	0x1108, 0x701a, 0xa800, 0x701e, 0x2900, 0x7822, 0x782c, 0x9094,
+	0x0780, 0x190c, 0x7146, 0xd09c, 0x0d50, 0x782c, 0x9094, 0x0780,
+	0x190c, 0x7146, 0xd0a4, 0x05a8, 0x00e6, 0x7824, 0x2048, 0x2071,
+	0x1800, 0x702c, 0xa802, 0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2,
+	0x080c, 0x85ce, 0x782c, 0x9094, 0x0780, 0x190c, 0x7146, 0xd0a4,
+	0x1d60, 0x00ee, 0x0e04, 0x6f6e, 0x7838, 0x7938, 0x910e, 0x1de0,
+	0x00d6, 0x2069, 0x0000, 0x6836, 0x6833, 0x0013, 0x00de, 0x7044,
+	0xc084, 0x7046, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084,
+	0x190c, 0x11ee, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x7044, 0xc085,
+	0x7046, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x00e6, 0x2071, 0x1800,
+	0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff,
+	0x1dc8, 0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c, 0x85ce, 0x00ee,
+	0x0804, 0x6f18, 0x2071, 0x1910, 0xa803, 0x0000, 0x2908, 0x7010,
+	0x8000, 0x7012, 0x7018, 0x904d, 0x711a, 0x0110, 0xa902, 0x0008,
+	0x711e, 0x2148, 0xa804, 0x900d, 0x1128, 0x1e04, 0x6fb5, 0x002e,
+	0x00ee, 0x0005, 0x2071, 0x1800, 0x9016, 0x702c, 0x2148, 0xa904,
+	0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70c0, 0x9200,
+	0x70c2, 0x080c, 0x85ce, 0x0e04, 0x6f9f, 0x2071, 0x1910, 0x701c,
+	0x2048, 0xa84c, 0x900d, 0x0d18, 0x2071, 0x0000, 0x7182, 0xa850,
+	0x7032, 0xa86c, 0x7086, 0x7036, 0xa870, 0x708a, 0xa850, 0x9082,
+	0x0019, 0x1278, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084,
+	0x190c, 0x11ee, 0x2071, 0x1910, 0x080c, 0x7132, 0x002e, 0x00ee,
+	0x0005, 0xa850, 0x9082, 0x001c, 0x1e68, 0xa880, 0x708e, 0x7036,
+	0x0146, 0x01d6, 0x0136, 0x01c6, 0x0156, 0x20e9, 0x0000, 0x20a1,
+	0x002a, 0xa868, 0x20a8, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x0021,
+	0x2098, 0x4003, 0x015e, 0x01ce, 0x013e, 0x01de, 0x014e, 0x0890,
+	0x2071, 0x1910, 0xa803, 0x0000, 0x2908, 0x7010, 0x8000, 0x7012,
+	0x7018, 0x904d, 0x711a, 0x0110, 0xa902, 0x0008, 0x711e, 0x2148,
+	0xa804, 0x900d, 0x1118, 0x002e, 0x00ee, 0x0005, 0x2071, 0x1800,
+	0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff,
+	0x1dc8, 0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c, 0x85ce, 0x002e,
+	0x00ee, 0x0005, 0x0006, 0xa87c, 0x0006, 0xa867, 0x0103, 0x20a9,
+	0x001c, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x001d, 0x20a0, 0x9006,
+	0x4004, 0x000e, 0x9084, 0x00ff, 0xa87e, 0x000e, 0xa87a, 0xa982,
+	0x0005, 0x2071, 0x1910, 0x7004, 0x0002, 0x7045, 0x7046, 0x7131,
+	0x7046, 0x7043, 0x7131, 0x080c, 0x0d7d, 0x0005, 0x2001, 0x1947,
+	0x2004, 0x0002, 0x7050, 0x7050, 0x70ca, 0x70cb, 0x7050, 0x70cb,
+	0x0126, 0x2091, 0x8000, 0x1e0c, 0x7151, 0x701c, 0x904d, 0x0508,
+	0xa84c, 0x9005, 0x0904, 0x709b, 0x0e04, 0x7079, 0xa94c, 0x2071,
+	0x0000, 0x7182, 0xa850, 0x7032, 0xa86c, 0x7086, 0x7036, 0xa870,
+	0x708a, 0xa850, 0x9082, 0x0019, 0x1278, 0x2091, 0x4080, 0x2001,
+	0x0089, 0x2004, 0xd084, 0x190c, 0x11ee, 0x2071, 0x1910, 0x080c,
+	0x7132, 0x012e, 0x0804, 0x70c9, 0xa850, 0x9082, 0x001c, 0x1e68,
+	0xa880, 0x708e, 0x7036, 0x0146, 0x01d6, 0x0136, 0x01c6, 0x0156,
+	0x20e9, 0x0000, 0x20a1, 0x002a, 0xa868, 0x20a8, 0xa860, 0x20e0,
+	0xa85c, 0x9080, 0x0021, 0x2098, 0x4003, 0x015e, 0x01ce, 0x013e,
+	0x01de, 0x014e, 0x0890, 0x2001, 0x005b, 0x2004, 0x9094, 0x0780,
+	0x190c, 0x7146, 0xd09c, 0x2071, 0x1910, 0x1510, 0x2071, 0x1910,
 	0x700f, 0x0001, 0xa964, 0x9184, 0x00ff, 0x9086, 0x0003, 0x1130,
 	0x810f, 0x918c, 0x00ff, 0x8101, 0x0108, 0x710e, 0x2900, 0x00d6,
-	0x2069, 0x0050, 0x6822, 0x00de, 0x701c, 0x2048, 0x7010, 0x8001,
-	0x7012, 0xa800, 0x701e, 0x9005, 0x1108, 0x701a, 0x012e, 0x0005,
-	0x0005, 0x0126, 0x2091, 0x8000, 0x701c, 0x904d, 0x0160, 0x7010,
+	0x2069, 0x0050, 0x6822, 0x00de, 0x2071, 0x1910, 0x701c, 0x2048,
+	0x7010, 0x8001, 0x7012, 0xa800, 0x701e, 0x9005, 0x1108, 0x701a,
+	0x012e, 0x0005, 0x0005, 0x00d6, 0x2008, 0x2069, 0x1a02, 0x683c,
+	0x9005, 0x0760, 0x0158, 0x9186, 0x0003, 0x0540, 0x2001, 0x1815,
+	0x2004, 0x2009, 0x1b50, 0x210c, 0x9102, 0x1500, 0x0126, 0x2091,
+	0x8000, 0x2069, 0x0050, 0x693c, 0x6838, 0x9106, 0x0190, 0x0e04,
+	0x70fd, 0x2069, 0x0000, 0x6837, 0x8040, 0x6833, 0x0012, 0x6883,
+	0x8040, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c,
+	0x11ee, 0x2069, 0x1a02, 0x683f, 0xffff, 0x012e, 0x00de, 0x0126,
+	0x2091, 0x8000, 0x1e0c, 0x71b7, 0x701c, 0x904d, 0x0540, 0x2001,
+	0x005b, 0x2004, 0x9094, 0x0780, 0x15c9, 0xd09c, 0x1500, 0x2071,
+	0x1910, 0x700f, 0x0001, 0xa964, 0x9184, 0x00ff, 0x9086, 0x0003,
+	0x1130, 0x810f, 0x918c, 0x00ff, 0x8101, 0x0108, 0x710e, 0x2900,
+	0x00d6, 0x2069, 0x0050, 0x6822, 0x00de, 0x701c, 0x2048, 0x7010,
 	0x8001, 0x7012, 0xa800, 0x701e, 0x9005, 0x1108, 0x701a, 0x012e,
-	0x080c, 0x1079, 0x0005, 0x012e, 0x0005, 0x2091, 0x8000, 0x0e04,
-	0x70f7, 0x0006, 0x0016, 0x2001, 0x8004, 0x0006, 0x0804, 0x0d86,
-	0x0096, 0x00f6, 0x2079, 0x0050, 0x7044, 0xd084, 0x01c0, 0xc084,
-	0x7046, 0x7838, 0x7938, 0x910e, 0x1de0, 0x00d6, 0x2069, 0x0000,
-	0x6836, 0x6833, 0x0013, 0x00de, 0x2091, 0x4080, 0x2001, 0x0089,
-	0x2004, 0xd084, 0x190c, 0x11ee, 0x00fe, 0x009e, 0x0005, 0x782c,
-	0x9094, 0x0780, 0x1991, 0xd0a4, 0x0db8, 0x00e6, 0x2071, 0x1800,
-	0x7824, 0x00e6, 0x2071, 0x0040, 0x712c, 0xd19c, 0x1170, 0x2009,
-	0x1830, 0x210c, 0x918a, 0x0020, 0x0240, 0x7022, 0x2001, 0x1dc0,
-	0x200c, 0x8108, 0x2102, 0x00ee, 0x0058, 0x00ee, 0x2048, 0x702c,
-	0xa802, 0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2, 0x080c, 0x8566,
-	0x782c, 0x9094, 0x0780, 0x190c, 0x70f5, 0xd0a4, 0x19c8, 0x7838,
+	0x0005, 0x0005, 0x0126, 0x2091, 0x8000, 0x701c, 0x904d, 0x0160,
+	0x7010, 0x8001, 0x7012, 0xa800, 0x701e, 0x9005, 0x1108, 0x701a,
+	0x012e, 0x080c, 0x1079, 0x0005, 0x012e, 0x0005, 0x2091, 0x8000,
+	0x0e04, 0x7148, 0x0006, 0x0016, 0x2001, 0x8004, 0x0006, 0x0804,
+	0x0d86, 0x0096, 0x00f6, 0x2079, 0x0050, 0x7044, 0xd084, 0x01c0,
+	0xc084, 0x7046, 0x7838, 0x7938, 0x910e, 0x1de0, 0x00d6, 0x2069,
+	0x0000, 0x6836, 0x6833, 0x0013, 0x00de, 0x2091, 0x4080, 0x2001,
+	0x0089, 0x2004, 0xd084, 0x190c, 0x11ee, 0x00fe, 0x009e, 0x0005,
+	0x782c, 0x9094, 0x0780, 0x1991, 0xd0a4, 0x0db8, 0x00e6, 0x2071,
+	0x1800, 0x7824, 0x00e6, 0x2071, 0x0040, 0x712c, 0xd19c, 0x1170,
+	0x2009, 0x1830, 0x210c, 0x918a, 0x0020, 0x0240, 0x7022, 0x2001,
+	0x1dc0, 0x200c, 0x8108, 0x2102, 0x00ee, 0x0058, 0x00ee, 0x2048,
+	0x702c, 0xa802, 0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2, 0x080c,
+	0x85ce, 0x782c, 0x9094, 0x0780, 0x190c, 0x7146, 0xd0a4, 0x19c8,
+	0x7838, 0x7938, 0x910e, 0x1de0, 0x00d6, 0x2069, 0x0000, 0x6836,
+	0x6833, 0x0013, 0x00de, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004,
+	0xd084, 0x190c, 0x11ee, 0x00ee, 0x00fe, 0x009e, 0x0005, 0x00f6,
+	0x2079, 0x0050, 0x7044, 0xd084, 0x01b8, 0xc084, 0x7046, 0x7838,
 	0x7938, 0x910e, 0x1de0, 0x00d6, 0x2069, 0x0000, 0x6836, 0x6833,
 	0x0013, 0x00de, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084,
-	0x190c, 0x11ee, 0x00ee, 0x00fe, 0x009e, 0x0005, 0x00f6, 0x2079,
-	0x0050, 0x7044, 0xd084, 0x01b8, 0xc084, 0x7046, 0x7838, 0x7938,
-	0x910e, 0x1de0, 0x00d6, 0x2069, 0x0000, 0x6836, 0x6833, 0x0013,
-	0x00de, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c,
-	0x11ee, 0x00fe, 0x0005, 0x782c, 0x9094, 0x0780, 0x190c, 0x70f5,
-	0xd0a4, 0x0db8, 0x00e6, 0x2071, 0x1800, 0x7824, 0x2048, 0x702c,
-	0xa802, 0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2, 0x080c, 0x8566,
-	0x782c, 0x9094, 0x0780, 0x190c, 0x70f5, 0xd0a4, 0x1d70, 0x00d6,
-	0x2069, 0x0050, 0x693c, 0x2069, 0x1947, 0x6808, 0x690a, 0x2069,
-	0x1a02, 0x9102, 0x1118, 0x683c, 0x9005, 0x1328, 0x2001, 0x1948,
-	0x200c, 0x810d, 0x693e, 0x00de, 0x00ee, 0x00fe, 0x0005, 0x7098,
-	0x908a, 0x0029, 0x1a0c, 0x0d7d, 0x9082, 0x001d, 0x003b, 0x0026,
-	0x2011, 0x1e00, 0x080c, 0x2a83, 0x002e, 0x0005, 0x7292, 0x7218,
-	0x7234, 0x725e, 0x7281, 0x72c1, 0x72d3, 0x7234, 0x72a9, 0x71d3,
-	0x7201, 0x71d2, 0x0005, 0x00d6, 0x2069, 0x0200, 0x6804, 0x9005,
-	0x1180, 0x6808, 0x9005, 0x1518, 0x709b, 0x0028, 0x2069, 0x198e,
-	0x2d04, 0x7002, 0x080c, 0x762d, 0x6028, 0x9085, 0x0600, 0x602a,
-	0x00b0, 0x709b, 0x0028, 0x2069, 0x198e, 0x2d04, 0x7002, 0x6028,
-	0x9085, 0x0600, 0x602a, 0x00e6, 0x0036, 0x0046, 0x0056, 0x2071,
-	0x1a6a, 0x080c, 0x1adf, 0x005e, 0x004e, 0x003e, 0x00ee, 0x00de,
-	0x0005, 0x00d6, 0x2069, 0x0200, 0x6804, 0x9005, 0x1178, 0x6808,
-	0x9005, 0x1160, 0x709b, 0x0028, 0x2069, 0x198e, 0x2d04, 0x7002,
-	0x080c, 0x76d0, 0x6028, 0x9085, 0x0600, 0x602a, 0x00de, 0x0005,
-	0x0006, 0x2001, 0x0090, 0x080c, 0x2a49, 0x000e, 0x6124, 0xd1e4,
-	0x1190, 0x080c, 0x7344, 0xd1d4, 0x1160, 0xd1dc, 0x1138, 0xd1cc,
-	0x0150, 0x709b, 0x0020, 0x080c, 0x7344, 0x0028, 0x709b, 0x001d,
-	0x0010, 0x709b, 0x001f, 0x0005, 0x2001, 0x0088, 0x080c, 0x2a49,
-	0x6124, 0xd1cc, 0x11e8, 0xd1dc, 0x11c0, 0xd1e4, 0x1198, 0x9184,
-	0x1e00, 0x11d8, 0x080c, 0x1b04, 0x60e3, 0x0001, 0x600c, 0xc0b4,
-	0x600e, 0x080c, 0x7518, 0x2001, 0x0080, 0x080c, 0x2a49, 0x709b,
-	0x0028, 0x0058, 0x709b, 0x001e, 0x0040, 0x709b, 0x001d, 0x0028,
-	0x709b, 0x0020, 0x0010, 0x709b, 0x001f, 0x0005, 0x080c, 0x1b04,
-	0x60e3, 0x0001, 0x600c, 0xc0b4, 0x600e, 0x080c, 0x7518, 0x2001,
-	0x0080, 0x080c, 0x2a49, 0x6124, 0xd1d4, 0x1180, 0xd1dc, 0x1158,
-	0xd1e4, 0x1130, 0x9184, 0x1e00, 0x1158, 0x709b, 0x0028, 0x0040,
-	0x709b, 0x001e, 0x0028, 0x709b, 0x001d, 0x0010, 0x709b, 0x001f,
-	0x0005, 0x2001, 0x00a0, 0x080c, 0x2a49, 0x6124, 0xd1dc, 0x1138,
-	0xd1e4, 0x0138, 0x080c, 0x1b04, 0x709b, 0x001e, 0x0010, 0x709b,
-	0x001d, 0x0005, 0x080c, 0x73cd, 0x6124, 0xd1dc, 0x1188, 0x080c,
-	0x7344, 0x0016, 0x080c, 0x1b04, 0x001e, 0xd1d4, 0x1128, 0xd1e4,
-	0x0138, 0x709b, 0x001e, 0x0020, 0x709b, 0x001f, 0x080c, 0x7344,
-	0x0005, 0x0006, 0x2001, 0x00a0, 0x080c, 0x2a49, 0x000e, 0x6124,
-	0xd1d4, 0x1160, 0xd1cc, 0x1150, 0xd1dc, 0x1128, 0xd1e4, 0x0140,
-	0x709b, 0x001e, 0x0028, 0x709b, 0x001d, 0x0010, 0x709b, 0x0021,
-	0x0005, 0x080c, 0x73cd, 0x6124, 0xd1d4, 0x1150, 0xd1dc, 0x1128,
-	0xd1e4, 0x0140, 0x709b, 0x001e, 0x0028, 0x709b, 0x001d, 0x0010,
-	0x709b, 0x001f, 0x0005, 0x0006, 0x2001, 0x0090, 0x080c, 0x2a49,
-	0x000e, 0x6124, 0xd1d4, 0x1178, 0xd1cc, 0x1150, 0xd1dc, 0x1128,
-	0xd1e4, 0x0158, 0x709b, 0x001e, 0x0040, 0x709b, 0x001d, 0x0028,
-	0x709b, 0x0020, 0x0010, 0x709b, 0x001f, 0x0005, 0x0016, 0x00c6,
-	0x00d6, 0x00e6, 0x0126, 0x2061, 0x0100, 0x2069, 0x0140, 0x2071,
-	0x1800, 0x2091, 0x8000, 0x080c, 0x74ec, 0x11f8, 0x2001, 0x180c,
-	0x200c, 0xd1b4, 0x01d0, 0xc1b4, 0x2102, 0x0026, 0x2011, 0x0200,
-	0x080c, 0x2a83, 0x002e, 0x080c, 0x2a2f, 0x6024, 0xd0cc, 0x0148,
-	0x2001, 0x00a0, 0x080c, 0x2a49, 0x080c, 0x77ef, 0x080c, 0x6044,
-	0x0428, 0x6028, 0xc0cd, 0x602a, 0x0408, 0x080c, 0x7506, 0x0150,
-	0x080c, 0x74fd, 0x1138, 0x2001, 0x0001, 0x080c, 0x25d5, 0x080c,
-	0x74c0, 0x00a0, 0x080c, 0x73ca, 0x0178, 0x2001, 0x0001, 0x080c,
-	0x25d5, 0x7098, 0x9086, 0x001e, 0x0120, 0x7098, 0x9086, 0x0022,
-	0x1118, 0x709b, 0x0025, 0x0010, 0x709b, 0x0021, 0x012e, 0x00ee,
-	0x00de, 0x00ce, 0x001e, 0x0005, 0x0026, 0x2011, 0x7355, 0x080c,
-	0x875d, 0x002e, 0x0016, 0x0026, 0x2009, 0x0064, 0x2011, 0x7355,
-	0x080c, 0x8754, 0x002e, 0x001e, 0x0005, 0x00e6, 0x00f6, 0x0016,
-	0x080c, 0x9e4f, 0x2071, 0x1800, 0x080c, 0x72ee, 0x001e, 0x00fe,
-	0x00ee, 0x0005, 0x0016, 0x0026, 0x0036, 0x00c6, 0x00d6, 0x00e6,
-	0x00f6, 0x0126, 0x080c, 0x9e4f, 0x2061, 0x0100, 0x2069, 0x0140,
-	0x2071, 0x1800, 0x2091, 0x8000, 0x6028, 0xc09c, 0x602a, 0x080c,
-	0xa899, 0x2011, 0x0003, 0x080c, 0xa1be, 0x2011, 0x0002, 0x080c,
-	0xa1c8, 0x080c, 0xa0b3, 0x080c, 0x8709, 0x0036, 0x901e, 0x080c,
-	0xa133, 0x003e, 0x080c, 0xa8b5, 0x60e3, 0x0000, 0x080c, 0xe74f,
-	0x080c, 0xe76a, 0x2009, 0x0004, 0x080c, 0x2a35, 0x080c, 0x294b,
-	0x2001, 0x1800, 0x2003, 0x0004, 0x2011, 0x0008, 0x080c, 0x2a83,
-	0x2011, 0x7355, 0x080c, 0x875d, 0x080c, 0x7506, 0x0118, 0x9006,
-	0x080c, 0x2a49, 0x080c, 0x0bc3, 0x2001, 0x0001, 0x080c, 0x25d5,
-	0x012e, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x003e, 0x002e, 0x001e,
-	0x0005, 0x0026, 0x00e6, 0x2011, 0x7362, 0x2071, 0x1a02, 0x701c,
-	0x9206, 0x1118, 0x7018, 0x9005, 0x0110, 0x9085, 0x0001, 0x00ee,
-	0x002e, 0x0005, 0x6020, 0xd09c, 0x0005, 0x6800, 0x9084, 0xfffe,
-	0x9086, 0x00c0, 0x01b8, 0x2001, 0x00c0, 0x080c, 0x2a49, 0x0156,
-	0x20a9, 0x002d, 0x1d04, 0x73da, 0x2091, 0x6000, 0x1f04, 0x73da,
-	0x015e, 0x00d6, 0x2069, 0x1800, 0x689c, 0x8001, 0x0220, 0x0118,
-	0x689e, 0x00de, 0x0005, 0x689f, 0x0014, 0x68ec, 0xd0dc, 0x0dc8,
-	0x6800, 0x9086, 0x0001, 0x1da8, 0x080c, 0x8769, 0x0c90, 0x00c6,
-	0x00d6, 0x00e6, 0x2061, 0x0100, 0x2069, 0x0140, 0x2071, 0x1800,
-	0x080c, 0x77fe, 0x2001, 0x196c, 0x2003, 0x0000, 0x9006, 0x709a,
-	0x60e2, 0x6886, 0x080c, 0x26a4, 0x9006, 0x080c, 0x2a49, 0x080c,
-	0x5eff, 0x0026, 0x2011, 0xffff, 0x080c, 0x2a83, 0x002e, 0x602b,
-	0x182c, 0x00ee, 0x00de, 0x00ce, 0x0005, 0x00c6, 0x00d6, 0x00e6,
-	0x2061, 0x0100, 0x2069, 0x0140, 0x2071, 0x1800, 0x2001, 0x197c,
-	0x200c, 0x9186, 0x0000, 0x0158, 0x9186, 0x0001, 0x0158, 0x9186,
-	0x0002, 0x0158, 0x9186, 0x0003, 0x0158, 0x0804, 0x74b0, 0x709b,
-	0x0022, 0x0040, 0x709b, 0x0021, 0x0028, 0x709b, 0x0023, 0x0010,
-	0x709b, 0x0024, 0x60e3, 0x0000, 0x6887, 0x0001, 0x2001, 0x0001,
-	0x080c, 0x26a4, 0x080c, 0xa899, 0x0026, 0x080c, 0xab61, 0x002e,
-	0x080c, 0xa8b5, 0x7000, 0x908e, 0x0004, 0x0118, 0x602b, 0x0028,
-	0x0010, 0x602b, 0x0020, 0x0156, 0x0126, 0x2091, 0x8000, 0x20a9,
-	0x0005, 0x6024, 0xd0ac, 0x0150, 0x012e, 0x015e, 0x080c, 0xcf84,
-	0x0118, 0x9006, 0x080c, 0x2a73, 0x0804, 0x74bc, 0x6800, 0x9084,
-	0x00a1, 0xc0bd, 0x6802, 0x080c, 0x2a2f, 0x6904, 0xd1d4, 0x1140,
-	0x2001, 0x0100, 0x080c, 0x2a49, 0x1f04, 0x7461, 0x080c, 0x7543,
-	0x012e, 0x015e, 0x080c, 0x74fd, 0x0170, 0x6044, 0x9005, 0x0130,
-	0x080c, 0x7543, 0x9006, 0x8001, 0x1df0, 0x0028, 0x6804, 0xd0d4,
-	0x1110, 0x080c, 0x7543, 0x080c, 0xcf84, 0x0118, 0x9006, 0x080c,
-	0x2a73, 0x0016, 0x0026, 0x7000, 0x908e, 0x0004, 0x0130, 0x2009,
-	0x00c8, 0x2011, 0x7362, 0x080c, 0x871b, 0x002e, 0x001e, 0x080c,
-	0x855d, 0x7034, 0xc085, 0x7036, 0x2001, 0x197c, 0x2003, 0x0004,
-	0x080c, 0x71b7, 0x080c, 0x74fd, 0x0138, 0x6804, 0xd0d4, 0x1120,
-	0xd0dc, 0x1100, 0x080c, 0x77f4, 0x00ee, 0x00de, 0x00ce, 0x0005,
+	0x190c, 0x11ee, 0x00fe, 0x0005, 0x782c, 0x9094, 0x0780, 0x190c,
+	0x7146, 0xd0a4, 0x0db8, 0x00e6, 0x2071, 0x1800, 0x7824, 0x2048,
+	0x702c, 0xa802, 0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2, 0x080c,
+	0x85ce, 0x782c, 0x9094, 0x0780, 0x190c, 0x7146, 0xd0a4, 0x1d70,
+	0x00d6, 0x2069, 0x0050, 0x693c, 0x2069, 0x1947, 0x6808, 0x690a,
+	0x2069, 0x1a02, 0x9102, 0x1118, 0x683c, 0x9005, 0x1328, 0x2001,
+	0x1948, 0x200c, 0x810d, 0x693e, 0x00de, 0x00ee, 0x00fe, 0x0005,
+	0x7098, 0x908a, 0x0029, 0x1a0c, 0x0d7d, 0x9082, 0x001d, 0x003b,
+	0x0026, 0x2011, 0x1e00, 0x080c, 0x2ab4, 0x002e, 0x0005, 0x72e3,
+	0x7269, 0x7285, 0x72af, 0x72d2, 0x7312, 0x7324, 0x7285, 0x72fa,
+	0x7224, 0x7252, 0x7223, 0x0005, 0x00d6, 0x2069, 0x0200, 0x6804,
+	0x9005, 0x1180, 0x6808, 0x9005, 0x1518, 0x709b, 0x0028, 0x2069,
+	0x198e, 0x2d04, 0x7002, 0x080c, 0x767e, 0x6028, 0x9085, 0x0600,
+	0x602a, 0x00b0, 0x709b, 0x0028, 0x2069, 0x198e, 0x2d04, 0x7002,
+	0x6028, 0x9085, 0x0600, 0x602a, 0x00e6, 0x0036, 0x0046, 0x0056,
+	0x2071, 0x1a6a, 0x080c, 0x1b10, 0x005e, 0x004e, 0x003e, 0x00ee,
+	0x00de, 0x0005, 0x00d6, 0x2069, 0x0200, 0x6804, 0x9005, 0x1178,
+	0x6808, 0x9005, 0x1160, 0x709b, 0x0028, 0x2069, 0x198e, 0x2d04,
+	0x7002, 0x080c, 0x7721, 0x6028, 0x9085, 0x0600, 0x602a, 0x00de,
+	0x0005, 0x0006, 0x2001, 0x0090, 0x080c, 0x2a7a, 0x000e, 0x6124,
+	0xd1e4, 0x1190, 0x080c, 0x7395, 0xd1d4, 0x1160, 0xd1dc, 0x1138,
+	0xd1cc, 0x0150, 0x709b, 0x0020, 0x080c, 0x7395, 0x0028, 0x709b,
+	0x001d, 0x0010, 0x709b, 0x001f, 0x0005, 0x2001, 0x0088, 0x080c,
+	0x2a7a, 0x6124, 0xd1cc, 0x11e8, 0xd1dc, 0x11c0, 0xd1e4, 0x1198,
+	0x9184, 0x1e00, 0x11d8, 0x080c, 0x1b35, 0x60e3, 0x0001, 0x600c,
+	0xc0b4, 0x600e, 0x080c, 0x7569, 0x2001, 0x0080, 0x080c, 0x2a7a,
+	0x709b, 0x0028, 0x0058, 0x709b, 0x001e, 0x0040, 0x709b, 0x001d,
+	0x0028, 0x709b, 0x0020, 0x0010, 0x709b, 0x001f, 0x0005, 0x080c,
+	0x1b35, 0x60e3, 0x0001, 0x600c, 0xc0b4, 0x600e, 0x080c, 0x7569,
+	0x2001, 0x0080, 0x080c, 0x2a7a, 0x6124, 0xd1d4, 0x1180, 0xd1dc,
+	0x1158, 0xd1e4, 0x1130, 0x9184, 0x1e00, 0x1158, 0x709b, 0x0028,
+	0x0040, 0x709b, 0x001e, 0x0028, 0x709b, 0x001d, 0x0010, 0x709b,
+	0x001f, 0x0005, 0x2001, 0x00a0, 0x080c, 0x2a7a, 0x6124, 0xd1dc,
+	0x1138, 0xd1e4, 0x0138, 0x080c, 0x1b35, 0x709b, 0x001e, 0x0010,
+	0x709b, 0x001d, 0x0005, 0x080c, 0x741e, 0x6124, 0xd1dc, 0x1188,
+	0x080c, 0x7395, 0x0016, 0x080c, 0x1b35, 0x001e, 0xd1d4, 0x1128,
+	0xd1e4, 0x0138, 0x709b, 0x001e, 0x0020, 0x709b, 0x001f, 0x080c,
+	0x7395, 0x0005, 0x0006, 0x2001, 0x00a0, 0x080c, 0x2a7a, 0x000e,
+	0x6124, 0xd1d4, 0x1160, 0xd1cc, 0x1150, 0xd1dc, 0x1128, 0xd1e4,
+	0x0140, 0x709b, 0x001e, 0x0028, 0x709b, 0x001d, 0x0010, 0x709b,
+	0x0021, 0x0005, 0x080c, 0x741e, 0x6124, 0xd1d4, 0x1150, 0xd1dc,
+	0x1128, 0xd1e4, 0x0140, 0x709b, 0x001e, 0x0028, 0x709b, 0x001d,
+	0x0010, 0x709b, 0x001f, 0x0005, 0x0006, 0x2001, 0x0090, 0x080c,
+	0x2a7a, 0x000e, 0x6124, 0xd1d4, 0x1178, 0xd1cc, 0x1150, 0xd1dc,
+	0x1128, 0xd1e4, 0x0158, 0x709b, 0x001e, 0x0040, 0x709b, 0x001d,
+	0x0028, 0x709b, 0x0020, 0x0010, 0x709b, 0x001f, 0x0005, 0x0016,
+	0x00c6, 0x00d6, 0x00e6, 0x0126, 0x2061, 0x0100, 0x2069, 0x0140,
+	0x2071, 0x1800, 0x2091, 0x8000, 0x080c, 0x753d, 0x11f8, 0x2001,
+	0x180c, 0x200c, 0xd1b4, 0x01d0, 0xc1b4, 0x2102, 0x0026, 0x2011,
+	0x0200, 0x080c, 0x2ab4, 0x002e, 0x080c, 0x2a60, 0x6024, 0xd0cc,
+	0x0148, 0x2001, 0x00a0, 0x080c, 0x2a7a, 0x080c, 0x7840, 0x080c,
+	0x6092, 0x0428, 0x6028, 0xc0cd, 0x602a, 0x0408, 0x080c, 0x7557,
+	0x0150, 0x080c, 0x754e, 0x1138, 0x2001, 0x0001, 0x080c, 0x2606,
+	0x080c, 0x7511, 0x00a0, 0x080c, 0x741b, 0x0178, 0x2001, 0x0001,
+	0x080c, 0x2606, 0x7098, 0x9086, 0x001e, 0x0120, 0x7098, 0x9086,
+	0x0022, 0x1118, 0x709b, 0x0025, 0x0010, 0x709b, 0x0021, 0x012e,
+	0x00ee, 0x00de, 0x00ce, 0x001e, 0x0005, 0x0026, 0x2011, 0x73a6,
+	0x080c, 0x87d4, 0x002e, 0x0016, 0x0026, 0x2009, 0x0064, 0x2011,
+	0x73a6, 0x080c, 0x87cb, 0x002e, 0x001e, 0x0005, 0x00e6, 0x00f6,
+	0x0016, 0x080c, 0x9ed4, 0x2071, 0x1800, 0x080c, 0x733f, 0x001e,
+	0x00fe, 0x00ee, 0x0005, 0x0016, 0x0026, 0x0036, 0x00c6, 0x00d6,
+	0x00e6, 0x00f6, 0x0126, 0x080c, 0x9ed4, 0x2061, 0x0100, 0x2069,
+	0x0140, 0x2071, 0x1800, 0x2091, 0x8000, 0x6028, 0xc09c, 0x602a,
+	0x080c, 0xa91e, 0x2011, 0x0003, 0x080c, 0xa243, 0x2011, 0x0002,
+	0x080c, 0xa24d, 0x080c, 0xa138, 0x080c, 0x8780, 0x0036, 0x901e,
+	0x080c, 0xa1b8, 0x003e, 0x080c, 0xa93a, 0x60e3, 0x0000, 0x080c,
+	0xe882, 0x080c, 0xe89d, 0x2009, 0x0004, 0x080c, 0x2a66, 0x080c,
+	0x297c, 0x2001, 0x1800, 0x2003, 0x0004, 0x2011, 0x0008, 0x080c,
+	0x2ab4, 0x2011, 0x73a6, 0x080c, 0x87d4, 0x080c, 0x7557, 0x0118,
+	0x9006, 0x080c, 0x2a7a, 0x080c, 0x0bc3, 0x2001, 0x0001, 0x080c,
+	0x2606, 0x012e, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x003e, 0x002e,
+	0x001e, 0x0005, 0x0026, 0x00e6, 0x2011, 0x73b3, 0x2071, 0x1a02,
+	0x701c, 0x9206, 0x1118, 0x7018, 0x9005, 0x0110, 0x9085, 0x0001,
+	0x00ee, 0x002e, 0x0005, 0x6020, 0xd09c, 0x0005, 0x6800, 0x9084,
+	0xfffe, 0x9086, 0x00c0, 0x01b8, 0x2001, 0x00c0, 0x080c, 0x2a7a,
+	0x0156, 0x20a9, 0x002d, 0x1d04, 0x742b, 0x2091, 0x6000, 0x1f04,
+	0x742b, 0x015e, 0x00d6, 0x2069, 0x1800, 0x689c, 0x8001, 0x0220,
+	0x0118, 0x689e, 0x00de, 0x0005, 0x689f, 0x0014, 0x68ec, 0xd0dc,
+	0x0dc8, 0x6800, 0x9086, 0x0001, 0x1da8, 0x080c, 0x87e0, 0x0c90,
 	0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100, 0x2069, 0x0140, 0x2071,
-	0x1800, 0x080c, 0x8574, 0x080c, 0x8566, 0x080c, 0x77fe, 0x2001,
-	0x196c, 0x2003, 0x0000, 0x9006, 0x709a, 0x60e2, 0x6886, 0x080c,
-	0x26a4, 0x9006, 0x080c, 0x2a49, 0x6043, 0x0090, 0x6043, 0x0010,
-	0x0026, 0x2011, 0xffff, 0x080c, 0x2a83, 0x002e, 0x602b, 0x182c,
-	0x00ee, 0x00de, 0x00ce, 0x0005, 0x0006, 0x2001, 0x197b, 0x2004,
-	0x9086, 0xaaaa, 0x000e, 0x0005, 0x0006, 0x080c, 0x56f9, 0x9084,
-	0x0030, 0x9086, 0x0000, 0x000e, 0x0005, 0x0006, 0x080c, 0x56f9,
-	0x9084, 0x0030, 0x9086, 0x0030, 0x000e, 0x0005, 0x0006, 0x080c,
-	0x56f9, 0x9084, 0x0030, 0x9086, 0x0010, 0x000e, 0x0005, 0x0006,
-	0x080c, 0x56f9, 0x9084, 0x0030, 0x9086, 0x0020, 0x000e, 0x0005,
-	0x0036, 0x0016, 0x2001, 0x180c, 0x2004, 0x908c, 0x0013, 0x0180,
-	0x0020, 0x080c, 0x26c4, 0x900e, 0x0028, 0x080c, 0x6a86, 0x1dc8,
-	0x2009, 0x0002, 0x2019, 0x0028, 0x080c, 0x31d4, 0x9006, 0x0019,
-	0x001e, 0x003e, 0x0005, 0x00e6, 0x2071, 0x180c, 0x2e04, 0x0130,
-	0x080c, 0xcf7d, 0x1128, 0x9085, 0x0010, 0x0010, 0x9084, 0xffef,
-	0x2072, 0x00ee, 0x0005, 0x6050, 0x0006, 0x60ec, 0x0006, 0x600c,
-	0x0006, 0x6004, 0x0006, 0x6028, 0x0006, 0x080c, 0x2aa6, 0x080c,
-	0x2ad9, 0x602f, 0x0100, 0x602f, 0x0000, 0x602f, 0x0040, 0x602f,
-	0x0000, 0x20a9, 0x0002, 0x080c, 0x2a10, 0x0026, 0x2011, 0x0040,
-	0x080c, 0x2a83, 0x002e, 0x000e, 0x602a, 0x000e, 0x6006, 0x000e,
-	0x600e, 0x000e, 0x60ee, 0x60e3, 0x0000, 0x6887, 0x0001, 0x2001,
-	0x0001, 0x080c, 0x26a4, 0x2001, 0x00a0, 0x0006, 0x080c, 0xcf84,
-	0x000e, 0x0130, 0x080c, 0x2a67, 0x9006, 0x080c, 0x2a73, 0x0010,
-	0x080c, 0x2a49, 0x000e, 0x6052, 0x6050, 0x0006, 0xc0e5, 0x6052,
-	0x00f6, 0x2079, 0x0100, 0x080c, 0x29bc, 0x00fe, 0x000e, 0x6052,
+	0x1800, 0x080c, 0x784f, 0x2001, 0x196c, 0x2003, 0x0000, 0x9006,
+	0x709a, 0x60e2, 0x6886, 0x080c, 0x26d5, 0x9006, 0x080c, 0x2a7a,
+	0x080c, 0x5f4d, 0x0026, 0x2011, 0xffff, 0x080c, 0x2ab4, 0x002e,
+	0x602b, 0x182c, 0x00ee, 0x00de, 0x00ce, 0x0005, 0x00c6, 0x00d6,
+	0x00e6, 0x2061, 0x0100, 0x2069, 0x0140, 0x2071, 0x1800, 0x2001,
+	0x197c, 0x200c, 0x9186, 0x0000, 0x0158, 0x9186, 0x0001, 0x0158,
+	0x9186, 0x0002, 0x0158, 0x9186, 0x0003, 0x0158, 0x0804, 0x7501,
+	0x709b, 0x0022, 0x0040, 0x709b, 0x0021, 0x0028, 0x709b, 0x0023,
+	0x0010, 0x709b, 0x0024, 0x60e3, 0x0000, 0x6887, 0x0001, 0x2001,
+	0x0001, 0x080c, 0x26d5, 0x080c, 0xa91e, 0x0026, 0x080c, 0xabe9,
+	0x002e, 0x080c, 0xa93a, 0x7000, 0x908e, 0x0004, 0x0118, 0x602b,
+	0x0028, 0x0010, 0x602b, 0x0020, 0x0156, 0x0126, 0x2091, 0x8000,
+	0x20a9, 0x0005, 0x6024, 0xd0ac, 0x0150, 0x012e, 0x015e, 0x080c,
+	0xd09b, 0x0118, 0x9006, 0x080c, 0x2aa4, 0x0804, 0x750d, 0x6800,
+	0x9084, 0x00a1, 0xc0bd, 0x6802, 0x080c, 0x2a60, 0x6904, 0xd1d4,
+	0x1140, 0x2001, 0x0100, 0x080c, 0x2a7a, 0x1f04, 0x74b2, 0x080c,
+	0x7594, 0x012e, 0x015e, 0x080c, 0x754e, 0x0170, 0x6044, 0x9005,
+	0x0130, 0x080c, 0x7594, 0x9006, 0x8001, 0x1df0, 0x0028, 0x6804,
+	0xd0d4, 0x1110, 0x080c, 0x7594, 0x080c, 0xd09b, 0x0118, 0x9006,
+	0x080c, 0x2aa4, 0x0016, 0x0026, 0x7000, 0x908e, 0x0004, 0x0130,
+	0x2009, 0x00c8, 0x2011, 0x73b3, 0x080c, 0x8792, 0x002e, 0x001e,
+	0x080c, 0x85c5, 0x7034, 0xc085, 0x7036, 0x2001, 0x197c, 0x2003,
+	0x0004, 0x080c, 0x7208, 0x080c, 0x754e, 0x0138, 0x6804, 0xd0d4,
+	0x1120, 0xd0dc, 0x1100, 0x080c, 0x7845, 0x00ee, 0x00de, 0x00ce,
+	0x0005, 0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100, 0x2069, 0x0140,
+	0x2071, 0x1800, 0x080c, 0x85dc, 0x080c, 0x85ce, 0x080c, 0x784f,
+	0x2001, 0x196c, 0x2003, 0x0000, 0x9006, 0x709a, 0x60e2, 0x6886,
+	0x080c, 0x26d5, 0x9006, 0x080c, 0x2a7a, 0x6043, 0x0090, 0x6043,
+	0x0010, 0x0026, 0x2011, 0xffff, 0x080c, 0x2ab4, 0x002e, 0x602b,
+	0x182c, 0x00ee, 0x00de, 0x00ce, 0x0005, 0x0006, 0x2001, 0x197b,
+	0x2004, 0x9086, 0xaaaa, 0x000e, 0x0005, 0x0006, 0x080c, 0x5742,
+	0x9084, 0x0030, 0x9086, 0x0000, 0x000e, 0x0005, 0x0006, 0x080c,
+	0x5742, 0x9084, 0x0030, 0x9086, 0x0030, 0x000e, 0x0005, 0x0006,
+	0x080c, 0x5742, 0x9084, 0x0030, 0x9086, 0x0010, 0x000e, 0x0005,
+	0x0006, 0x080c, 0x5742, 0x9084, 0x0030, 0x9086, 0x0020, 0x000e,
+	0x0005, 0x0036, 0x0016, 0x2001, 0x180c, 0x2004, 0x908c, 0x0013,
+	0x0180, 0x0020, 0x080c, 0x26f5, 0x900e, 0x0028, 0x080c, 0x6ad5,
+	0x1dc8, 0x2009, 0x0002, 0x2019, 0x0028, 0x080c, 0x3205, 0x9006,
+	0x0019, 0x001e, 0x003e, 0x0005, 0x00e6, 0x2071, 0x180c, 0x2e04,
+	0x0130, 0x080c, 0xd094, 0x1128, 0x9085, 0x0010, 0x0010, 0x9084,
+	0xffef, 0x2072, 0x00ee, 0x0005, 0x6050, 0x0006, 0x60ec, 0x0006,
+	0x600c, 0x0006, 0x6004, 0x0006, 0x6028, 0x0006, 0x080c, 0x2ad7,
+	0x080c, 0x2b0a, 0x602f, 0x0100, 0x602f, 0x0000, 0x602f, 0x0040,
+	0x602f, 0x0000, 0x20a9, 0x0002, 0x080c, 0x2a41, 0x0026, 0x2011,
+	0x0040, 0x080c, 0x2ab4, 0x002e, 0x000e, 0x602a, 0x000e, 0x6006,
+	0x000e, 0x600e, 0x000e, 0x60ee, 0x60e3, 0x0000, 0x6887, 0x0001,
+	0x2001, 0x0001, 0x080c, 0x26d5, 0x2001, 0x00a0, 0x0006, 0x080c,
+	0xd09b, 0x000e, 0x0130, 0x080c, 0x2a98, 0x9006, 0x080c, 0x2aa4,
+	0x0010, 0x080c, 0x2a7a, 0x000e, 0x6052, 0x6050, 0x0006, 0xc0e5,
+	0x6052, 0x00f6, 0x2079, 0x0100, 0x080c, 0x29ed, 0x00fe, 0x000e,
+	0x6052, 0x0005, 0x0156, 0x0016, 0x0026, 0x0036, 0x00c6, 0x00d6,
+	0x00e6, 0x2061, 0x0100, 0x2069, 0x0140, 0x2071, 0x1800, 0x080c,
+	0xa97c, 0x0158, 0x2001, 0x0386, 0x2004, 0xd0b4, 0x1130, 0x2001,
+	0x0016, 0x080c, 0xa90f, 0x0804, 0x7670, 0x2001, 0x180c, 0x200c,
+	0xc1c4, 0x2102, 0x6028, 0x9084, 0xe1ff, 0x602a, 0x2011, 0x0200,
+	0x080c, 0x2ab4, 0x2001, 0x0090, 0x080c, 0x2a7a, 0x20a9, 0x0366,
+	0x6024, 0xd0cc, 0x1558, 0x1d04, 0x7610, 0x2091, 0x6000, 0x1f04,
+	0x7610, 0x080c, 0xa91e, 0x2011, 0x0003, 0x080c, 0xa243, 0x2011,
+	0x0002, 0x080c, 0xa24d, 0x080c, 0xa138, 0x901e, 0x080c, 0xa1b8,
+	0x2001, 0x0386, 0x2003, 0x7000, 0x080c, 0xa93a, 0x2001, 0x00a0,
+	0x080c, 0x2a7a, 0x080c, 0x7840, 0x080c, 0x6092, 0x080c, 0xd09b,
+	0x0110, 0x080c, 0x0ce9, 0x9085, 0x0001, 0x04c0, 0x080c, 0x1b35,
+	0x60e3, 0x0000, 0x2001, 0x196c, 0x2004, 0x080c, 0x26d5, 0x60e2,
+	0x2001, 0x0080, 0x080c, 0x2a7a, 0x20a9, 0x0366, 0x2011, 0x1e00,
+	0x080c, 0x2ab4, 0x2009, 0x1e00, 0x080c, 0x2a60, 0x6024, 0x910c,
+	0x0140, 0x1d04, 0x764e, 0x2091, 0x6000, 0x1f04, 0x764e, 0x0804,
+	0x7619, 0x2001, 0x0386, 0x2003, 0x7000, 0x6028, 0x9085, 0x1e00,
+	0x602a, 0x70b4, 0x9005, 0x1118, 0x6887, 0x0001, 0x0008, 0x6886,
+	0x080c, 0xd09b, 0x0110, 0x080c, 0x0ce9, 0x9006, 0x00ee, 0x00de,
+	0x00ce, 0x003e, 0x002e, 0x001e, 0x015e, 0x0005, 0x0156, 0x0016,
+	0x0026, 0x0036, 0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100, 0x2071,
+	0x1800, 0x7000, 0x9086, 0x0003, 0x1168, 0x2001, 0x020b, 0x2004,
+	0x9084, 0x5540, 0x9086, 0x5540, 0x1128, 0x2069, 0x1a76, 0x2d04,
+	0x8000, 0x206a, 0x2069, 0x0140, 0x6020, 0x9084, 0x00c0, 0x0120,
+	0x6884, 0x9005, 0x1904, 0x76e7, 0x2001, 0x0088, 0x080c, 0x2a7a,
+	0x9006, 0x60e2, 0x6886, 0x080c, 0x26d5, 0x2069, 0x0200, 0x6804,
+	0x9005, 0x1118, 0x6808, 0x9005, 0x01d0, 0x6028, 0x9084, 0xfbff,
+	0x602a, 0x2011, 0x0400, 0x080c, 0x2ab4, 0x2069, 0x198e, 0x7000,
+	0x206a, 0x709b, 0x0026, 0x7003, 0x0001, 0x20a9, 0x0002, 0x1d04,
+	0x76c7, 0x2091, 0x6000, 0x1f04, 0x76c7, 0x0804, 0x7719, 0x2069,
+	0x0140, 0x20a9, 0x0384, 0x2011, 0x1e00, 0x080c, 0x2ab4, 0x2009,
+	0x1e00, 0x080c, 0x2a60, 0x6024, 0x910c, 0x0528, 0x9084, 0x1a00,
+	0x1510, 0x1d04, 0x76d3, 0x2091, 0x6000, 0x1f04, 0x76d3, 0x080c,
+	0xa91e, 0x2011, 0x0003, 0x080c, 0xa243, 0x2011, 0x0002, 0x080c,
+	0xa24d, 0x080c, 0xa138, 0x901e, 0x080c, 0xa1b8, 0x080c, 0xa93a,
+	0x2001, 0x00a0, 0x080c, 0x2a7a, 0x080c, 0x7840, 0x080c, 0x6092,
+	0x9085, 0x0001, 0x00b0, 0x2001, 0x0080, 0x080c, 0x2a7a, 0x2069,
+	0x0140, 0x60e3, 0x0000, 0x70b4, 0x9005, 0x1118, 0x6887, 0x0001,
+	0x0008, 0x6886, 0x2001, 0x196c, 0x2004, 0x080c, 0x26d5, 0x60e2,
+	0x9006, 0x00ee, 0x00de, 0x00ce, 0x003e, 0x002e, 0x001e, 0x015e,
 	0x0005, 0x0156, 0x0016, 0x0026, 0x0036, 0x00c6, 0x00d6, 0x00e6,
-	0x2061, 0x0100, 0x2069, 0x0140, 0x2071, 0x1800, 0x080c, 0xa8f7,
-	0x0158, 0x2001, 0x0386, 0x2004, 0xd0b4, 0x1130, 0x2001, 0x0016,
-	0x080c, 0xa88a, 0x0804, 0x761f, 0x2001, 0x180c, 0x200c, 0xc1c4,
-	0x2102, 0x6028, 0x9084, 0xe1ff, 0x602a, 0x2011, 0x0200, 0x080c,
-	0x2a83, 0x2001, 0x0090, 0x080c, 0x2a49, 0x20a9, 0x0366, 0x6024,
-	0xd0cc, 0x1558, 0x1d04, 0x75bf, 0x2091, 0x6000, 0x1f04, 0x75bf,
-	0x080c, 0xa899, 0x2011, 0x0003, 0x080c, 0xa1be, 0x2011, 0x0002,
-	0x080c, 0xa1c8, 0x080c, 0xa0b3, 0x901e, 0x080c, 0xa133, 0x2001,
-	0x0386, 0x2003, 0x7000, 0x080c, 0xa8b5, 0x2001, 0x00a0, 0x080c,
-	0x2a49, 0x080c, 0x77ef, 0x080c, 0x6044, 0x080c, 0xcf84, 0x0110,
-	0x080c, 0x0ce9, 0x9085, 0x0001, 0x04c0, 0x080c, 0x1b04, 0x60e3,
-	0x0000, 0x2001, 0x196c, 0x2004, 0x080c, 0x26a4, 0x60e2, 0x2001,
-	0x0080, 0x080c, 0x2a49, 0x20a9, 0x0366, 0x2011, 0x1e00, 0x080c,
-	0x2a83, 0x2009, 0x1e00, 0x080c, 0x2a2f, 0x6024, 0x910c, 0x0140,
-	0x1d04, 0x75fd, 0x2091, 0x6000, 0x1f04, 0x75fd, 0x0804, 0x75c8,
-	0x2001, 0x0386, 0x2003, 0x7000, 0x6028, 0x9085, 0x1e00, 0x602a,
-	0x70b4, 0x9005, 0x1118, 0x6887, 0x0001, 0x0008, 0x6886, 0x080c,
-	0xcf84, 0x0110, 0x080c, 0x0ce9, 0x9006, 0x00ee, 0x00de, 0x00ce,
-	0x003e, 0x002e, 0x001e, 0x015e, 0x0005, 0x0156, 0x0016, 0x0026,
-	0x0036, 0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100, 0x2071, 0x1800,
-	0x7000, 0x9086, 0x0003, 0x1168, 0x2001, 0x020b, 0x2004, 0x9084,
-	0x5540, 0x9086, 0x5540, 0x1128, 0x2069, 0x1a76, 0x2d04, 0x8000,
-	0x206a, 0x2069, 0x0140, 0x6020, 0x9084, 0x00c0, 0x0120, 0x6884,
-	0x9005, 0x1904, 0x7696, 0x2001, 0x0088, 0x080c, 0x2a49, 0x9006,
-	0x60e2, 0x6886, 0x080c, 0x26a4, 0x2069, 0x0200, 0x6804, 0x9005,
-	0x1118, 0x6808, 0x9005, 0x01d0, 0x6028, 0x9084, 0xfbff, 0x602a,
-	0x2011, 0x0400, 0x080c, 0x2a83, 0x2069, 0x198e, 0x7000, 0x206a,
-	0x709b, 0x0026, 0x7003, 0x0001, 0x20a9, 0x0002, 0x1d04, 0x7676,
-	0x2091, 0x6000, 0x1f04, 0x7676, 0x0804, 0x76c8, 0x2069, 0x0140,
-	0x20a9, 0x0384, 0x2011, 0x1e00, 0x080c, 0x2a83, 0x2009, 0x1e00,
-	0x080c, 0x2a2f, 0x6024, 0x910c, 0x0528, 0x9084, 0x1a00, 0x1510,
-	0x1d04, 0x7682, 0x2091, 0x6000, 0x1f04, 0x7682, 0x080c, 0xa899,
-	0x2011, 0x0003, 0x080c, 0xa1be, 0x2011, 0x0002, 0x080c, 0xa1c8,
-	0x080c, 0xa0b3, 0x901e, 0x080c, 0xa133, 0x080c, 0xa8b5, 0x2001,
-	0x00a0, 0x080c, 0x2a49, 0x080c, 0x77ef, 0x080c, 0x6044, 0x9085,
-	0x0001, 0x00b0, 0x2001, 0x0080, 0x080c, 0x2a49, 0x2069, 0x0140,
+	0x2061, 0x0100, 0x2071, 0x1800, 0x6020, 0x9084, 0x00c0, 0x01e8,
+	0x080c, 0xa91e, 0x2011, 0x0003, 0x080c, 0xa243, 0x2011, 0x0002,
+	0x080c, 0xa24d, 0x080c, 0xa138, 0x901e, 0x080c, 0xa1b8, 0x080c,
+	0xa93a, 0x2069, 0x0140, 0x2001, 0x00a0, 0x080c, 0x2a7a, 0x080c,
+	0x7840, 0x080c, 0x6092, 0x0804, 0x77bc, 0x2001, 0x180c, 0x200c,
+	0xd1b4, 0x1160, 0xc1b5, 0x2102, 0x080c, 0x739b, 0x2069, 0x0140,
+	0x2001, 0x0080, 0x080c, 0x2a7a, 0x60e3, 0x0000, 0x2069, 0x0200,
+	0x6804, 0x9005, 0x1118, 0x6808, 0x9005, 0x0190, 0x6028, 0x9084,
+	0xfdff, 0x602a, 0x2011, 0x0200, 0x080c, 0x2ab4, 0x2069, 0x198e,
+	0x7000, 0x206a, 0x709b, 0x0027, 0x7003, 0x0001, 0x0804, 0x77bc,
+	0x2011, 0x1e00, 0x080c, 0x2ab4, 0x2009, 0x1e00, 0x080c, 0x2a60,
+	0x6024, 0x910c, 0x01c8, 0x9084, 0x1c00, 0x11b0, 0x1d04, 0x7778,
+	0x0006, 0x0016, 0x00c6, 0x00d6, 0x00e6, 0x080c, 0x861c, 0x00ee,
+	0x00de, 0x00ce, 0x001e, 0x000e, 0x00e6, 0x2071, 0x1a02, 0x7070,
+	0x00ee, 0x9005, 0x19e8, 0x0400, 0x0026, 0x2011, 0x73b3, 0x080c,
+	0x86c8, 0x2011, 0x73a6, 0x080c, 0x87d4, 0x002e, 0x2069, 0x0140,
 	0x60e3, 0x0000, 0x70b4, 0x9005, 0x1118, 0x6887, 0x0001, 0x0008,
-	0x6886, 0x2001, 0x196c, 0x2004, 0x080c, 0x26a4, 0x60e2, 0x9006,
-	0x00ee, 0x00de, 0x00ce, 0x003e, 0x002e, 0x001e, 0x015e, 0x0005,
-	0x0156, 0x0016, 0x0026, 0x0036, 0x00c6, 0x00d6, 0x00e6, 0x2061,
-	0x0100, 0x2071, 0x1800, 0x6020, 0x9084, 0x00c0, 0x01e8, 0x080c,
-	0xa899, 0x2011, 0x0003, 0x080c, 0xa1be, 0x2011, 0x0002, 0x080c,
-	0xa1c8, 0x080c, 0xa0b3, 0x901e, 0x080c, 0xa133, 0x080c, 0xa8b5,
-	0x2069, 0x0140, 0x2001, 0x00a0, 0x080c, 0x2a49, 0x080c, 0x77ef,
-	0x080c, 0x6044, 0x0804, 0x776b, 0x2001, 0x180c, 0x200c, 0xd1b4,
-	0x1160, 0xc1b5, 0x2102, 0x080c, 0x734a, 0x2069, 0x0140, 0x2001,
-	0x0080, 0x080c, 0x2a49, 0x60e3, 0x0000, 0x2069, 0x0200, 0x6804,
-	0x9005, 0x1118, 0x6808, 0x9005, 0x0190, 0x6028, 0x9084, 0xfdff,
-	0x602a, 0x2011, 0x0200, 0x080c, 0x2a83, 0x2069, 0x198e, 0x7000,
-	0x206a, 0x709b, 0x0027, 0x7003, 0x0001, 0x0804, 0x776b, 0x2011,
-	0x1e00, 0x080c, 0x2a83, 0x2009, 0x1e00, 0x080c, 0x2a2f, 0x6024,
-	0x910c, 0x01c8, 0x9084, 0x1c00, 0x11b0, 0x1d04, 0x7727, 0x0006,
-	0x0016, 0x00c6, 0x00d6, 0x00e6, 0x080c, 0x85a5, 0x00ee, 0x00de,
-	0x00ce, 0x001e, 0x000e, 0x00e6, 0x2071, 0x1a02, 0x7070, 0x00ee,
-	0x9005, 0x19e8, 0x0400, 0x0026, 0x2011, 0x7362, 0x080c, 0x8651,
-	0x2011, 0x7355, 0x080c, 0x875d, 0x002e, 0x2069, 0x0140, 0x60e3,
-	0x0000, 0x70b4, 0x9005, 0x1118, 0x6887, 0x0001, 0x0008, 0x6886,
-	0x2001, 0x196c, 0x2004, 0x080c, 0x26a4, 0x60e2, 0x2001, 0x180c,
-	0x200c, 0xc1b4, 0x2102, 0x00ee, 0x00de, 0x00ce, 0x003e, 0x002e,
-	0x001e, 0x015e, 0x0005, 0x0156, 0x0016, 0x0026, 0x0036, 0x0046,
-	0x00c6, 0x00e6, 0x2061, 0x0100, 0x2071, 0x1800, 0x080c, 0xcf7d,
-	0x1904, 0x77d9, 0x7130, 0xd184, 0x1170, 0x080c, 0x337c, 0x0138,
-	0xc18d, 0x7132, 0x2011, 0x1848, 0x2214, 0xd2ac, 0x1120, 0x7030,
-	0xd08c, 0x0904, 0x77d9, 0x2011, 0x1848, 0x220c, 0xd1a4, 0x0538,
-	0x0016, 0x2019, 0x000e, 0x080c, 0xe286, 0x0156, 0x00b6, 0x20a9,
-	0x007f, 0x900e, 0x9186, 0x007e, 0x01a0, 0x9186, 0x0080, 0x0188,
-	0x080c, 0x6644, 0x1170, 0x2120, 0x9006, 0x0016, 0x2009, 0x000e,
-	0x080c, 0xe316, 0x2009, 0x0001, 0x2011, 0x0100, 0x080c, 0x8902,
-	0x001e, 0x8108, 0x1f04, 0x77a2, 0x00be, 0x015e, 0x001e, 0xd1ac,
-	0x1148, 0x0016, 0x2009, 0x0002, 0x2019, 0x0004, 0x080c, 0x31d4,
-	0x001e, 0x0078, 0x0156, 0x00b6, 0x20a9, 0x007f, 0x900e, 0x080c,
-	0x6644, 0x1110, 0x080c, 0x605e, 0x8108, 0x1f04, 0x77cf, 0x00be,
-	0x015e, 0x080c, 0x1b04, 0x080c, 0xa899, 0x080c, 0xab61, 0x080c,
-	0xa8b5, 0x60e3, 0x0000, 0x080c, 0x6044, 0x080c, 0x741d, 0x00ee,
-	0x00ce, 0x004e, 0x003e, 0x002e, 0x001e, 0x015e, 0x0005, 0x2001,
-	0x197c, 0x2003, 0x0001, 0x0005, 0x2001, 0x197c, 0x2003, 0x0000,
-	0x0005, 0x2001, 0x197b, 0x2003, 0xaaaa, 0x0005, 0x2001, 0x197b,
-	0x2003, 0x0000, 0x0005, 0x2071, 0x18fa, 0x7003, 0x0000, 0x7007,
-	0x0000, 0x080c, 0x1060, 0x090c, 0x0d7d, 0xa8ab, 0xdcb0, 0x2900,
-	0x704e, 0x080c, 0x1060, 0x090c, 0x0d7d, 0xa8ab, 0xdcb0, 0x2900,
-	0x7052, 0xa867, 0x0000, 0xa86b, 0x0001, 0xa89f, 0x0000, 0x0005,
-	0x00e6, 0x2071, 0x0040, 0x6848, 0x9005, 0x1118, 0x9085, 0x0001,
-	0x04b0, 0x6840, 0x9005, 0x0150, 0x04a1, 0x6a50, 0x9200, 0x7002,
-	0x6854, 0x9101, 0x7006, 0x9006, 0x7012, 0x7016, 0x6850, 0x7002,
-	0x6854, 0x7006, 0x6858, 0x700a, 0x685c, 0x700e, 0x6840, 0x9005,
-	0x1110, 0x7012, 0x7016, 0x6848, 0x701a, 0x701c, 0x9085, 0x0040,
-	0x701e, 0x2001, 0x0019, 0x7036, 0x702b, 0x0001, 0x2001, 0x0004,
-	0x200c, 0x918c, 0xfff7, 0x918d, 0x8000, 0x2102, 0x00d6, 0x2069,
-	0x18fa, 0x6807, 0x0001, 0x00de, 0x080c, 0x7de7, 0x9006, 0x00ee,
-	0x0005, 0x900e, 0x0156, 0x20a9, 0x0006, 0x8003, 0x818d, 0x1f04,
-	0x7865, 0x015e, 0x0005, 0x2079, 0x0040, 0x2071, 0x18fa, 0x7004,
-	0x0002, 0x787b, 0x787c, 0x78c8, 0x7923, 0x7a33, 0x7879, 0x7879,
-	0x7a5d, 0x080c, 0x0d7d, 0x0005, 0x2079, 0x0040, 0x2001, 0x1dc0,
-	0x2003, 0x0000, 0x782c, 0x908c, 0x0780, 0x190c, 0x7ec9, 0xd0a4,
-	0x0578, 0x2001, 0x1dc0, 0x2004, 0x9082, 0x0080, 0x1648, 0x1d04,
-	0x7899, 0x2001, 0x1a05, 0x200c, 0x8109, 0x0510, 0x2091, 0x6000,
-	0x2102, 0x7824, 0x2048, 0x9006, 0xa802, 0xa806, 0xa864, 0x9084,
-	0x00ff, 0x908a, 0x0040, 0x0610, 0x00c0, 0x2001, 0x1800, 0x200c,
-	0x9186, 0x0003, 0x1168, 0x7004, 0x0002, 0x78b8, 0x7882, 0x78b8,
-	0x78b6, 0x78b8, 0x78b8, 0x78b8, 0x78b8, 0x78b8, 0x080c, 0x7923,
-	0x782c, 0xd09c, 0x090c, 0x7de7, 0x0005, 0x9082, 0x005a, 0x1218,
-	0x2100, 0x003b, 0x0c10, 0x080c, 0x7959, 0x0c90, 0x00e3, 0x08e8,
-	0x0005, 0x7959, 0x7959, 0x7959, 0x7959, 0x7959, 0x7959, 0x7959,
-	0x7959, 0x797b, 0x7959, 0x7959, 0x7959, 0x7959, 0x7959, 0x7959,
-	0x7959, 0x7959, 0x7959, 0x7959, 0x7959, 0x7959, 0x7959, 0x7959,
-	0x7959, 0x7959, 0x7959, 0x7959, 0x7959, 0x7965, 0x7959, 0x7b4e,
-	0x7959, 0x7959, 0x7959, 0x797b, 0x7959, 0x7965, 0x7b8f, 0x7bd0,
-	0x7c17, 0x7c2b, 0x7959, 0x7959, 0x797b, 0x7965, 0x798f, 0x7959,
-	0x7a07, 0x7cd6, 0x7cf1, 0x7959, 0x797b, 0x7959, 0x798f, 0x7959,
-	0x7959, 0x79fd, 0x7cf1, 0x7959, 0x7959, 0x7959, 0x7959, 0x7959,
-	0x7959, 0x7959, 0x7959, 0x7959, 0x79a3, 0x7959, 0x7959, 0x7959,
-	0x7959, 0x7959, 0x7959, 0x7959, 0x7959, 0x7959, 0x7e6d, 0x7959,
-	0x7e17, 0x7959, 0x7e17, 0x7959, 0x79b8, 0x7959, 0x7959, 0x7959,
-	0x7959, 0x7959, 0x7959, 0x2079, 0x0040, 0x7004, 0x9086, 0x0003,
-	0x1198, 0x782c, 0x080c, 0x7e10, 0xd0a4, 0x0170, 0x7824, 0x2048,
-	0x9006, 0xa802, 0xa806, 0xa864, 0x9084, 0x00ff, 0x908a, 0x001a,
-	0x1210, 0x002b, 0x0c50, 0x00e9, 0x080c, 0x7de7, 0x0005, 0x7959,
-	0x7965, 0x7b3a, 0x7959, 0x7965, 0x7959, 0x7965, 0x7965, 0x7959,
-	0x7965, 0x7b3a, 0x7965, 0x7965, 0x7965, 0x7965, 0x7965, 0x7959,
-	0x7965, 0x7b3a, 0x7959, 0x7959, 0x7965, 0x7959, 0x7959, 0x7959,
-	0x7965, 0x00e6, 0x2071, 0x18fa, 0x2009, 0x0400, 0x0071, 0x00ee,
-	0x0005, 0x2009, 0x1000, 0x0049, 0x0005, 0x2009, 0x2000, 0x0029,
-	0x0005, 0x2009, 0x0800, 0x0009, 0x0005, 0x7007, 0x0001, 0xa868,
-	0x9084, 0x00ff, 0x9105, 0xa86a, 0x0126, 0x2091, 0x8000, 0x080c,
-	0x6d9f, 0x012e, 0x0005, 0xa864, 0x8007, 0x9084, 0x00ff, 0x0d08,
-	0x8001, 0x1120, 0x7007, 0x0001, 0x0804, 0x7adc, 0x7007, 0x0003,
-	0x7012, 0x2900, 0x7016, 0x701a, 0x704b, 0x7adc, 0x0005, 0xa864,
-	0x8007, 0x9084, 0x00ff, 0x0968, 0x8001, 0x1120, 0x7007, 0x0001,
-	0x0804, 0x7af7, 0x7007, 0x0003, 0x7012, 0x2900, 0x7016, 0x701a,
-	0x704b, 0x7af7, 0x0005, 0xa864, 0x8007, 0x9084, 0x00ff, 0x0904,
-	0x7961, 0x8001, 0x1120, 0x7007, 0x0001, 0x0804, 0x7b13, 0x7007,
-	0x0003, 0x7012, 0x2900, 0x7016, 0x701a, 0x704b, 0x7b13, 0x0005,
-	0xa864, 0x8007, 0x9084, 0x00ff, 0x9086, 0x0001, 0x1904, 0x7961,
-	0x7007, 0x0001, 0x2009, 0x1834, 0x210c, 0x81ff, 0x11a8, 0xa868,
-	0x9084, 0x00ff, 0xa86a, 0xa883, 0x0000, 0x080c, 0x62d4, 0x1108,
-	0x0005, 0x0126, 0x2091, 0x8000, 0xa867, 0x0139, 0xa87a, 0xa982,
-	0x080c, 0x6d9f, 0x012e, 0x0ca0, 0xa994, 0x9186, 0x0071, 0x0d38,
-	0x9186, 0x0064, 0x0d20, 0x9186, 0x007c, 0x0d08, 0x9186, 0x0028,
-	0x09f0, 0x9186, 0x0038, 0x09d8, 0x9186, 0x0078, 0x09c0, 0x9186,
-	0x005f, 0x09a8, 0x9186, 0x0056, 0x0990, 0xa897, 0x4005, 0xa89b,
-	0x0001, 0x2001, 0x0030, 0x900e, 0x08a0, 0xa87c, 0x9084, 0x00c0,
-	0x9086, 0x00c0, 0x1120, 0x7007, 0x0001, 0x0804, 0x7d08, 0x2900,
-	0x7016, 0x701a, 0x20a9, 0x0004, 0xa860, 0x20e0, 0xa85c, 0x9080,
-	0x0030, 0x2098, 0x7050, 0x2040, 0xa060, 0x20e8, 0xa05c, 0x9080,
-	0x0023, 0x20a0, 0x4003, 0xa888, 0x7012, 0x9082, 0x0401, 0x1a04,
-	0x7969, 0xaab4, 0x928a, 0x0002, 0x1a04, 0x7969, 0x82ff, 0x1138,
-	0xa8b8, 0xa9bc, 0x9105, 0x0118, 0x2001, 0x7a9a, 0x0018, 0x9280,
-	0x7a90, 0x2005, 0x7056, 0x7010, 0x9015, 0x0904, 0x7a7b, 0x080c,
-	0x1060, 0x1118, 0x7007, 0x0004, 0x0005, 0x2900, 0x7022, 0x7054,
-	0x2060, 0xe000, 0xa866, 0x7050, 0x2040, 0xa95c, 0xe004, 0x9100,
-	0xa076, 0xa860, 0xa072, 0xe008, 0x920a, 0x1210, 0x900e, 0x2200,
-	0x7112, 0xe20c, 0x8003, 0x800b, 0x9296, 0x0004, 0x0108, 0x9108,
-	0xa17a, 0x810b, 0xa17e, 0x080c, 0x113c, 0xa06c, 0x908e, 0x0100,
-	0x0170, 0x9086, 0x0200, 0x0118, 0x7007, 0x0007, 0x0005, 0x7020,
-	0x2048, 0x080c, 0x1079, 0x7014, 0x2048, 0x0804, 0x7969, 0x7020,
-	0x2048, 0x7018, 0xa802, 0xa807, 0x0000, 0x2908, 0x2048, 0xa906,
-	0x711a, 0x0804, 0x7a33, 0x7014, 0x2048, 0x7007, 0x0001, 0xa8b4,
-	0x9005, 0x1128, 0xa8b8, 0xa9bc, 0x9105, 0x0108, 0x00b9, 0xa864,
-	0x9084, 0x00ff, 0x9086, 0x001e, 0x0904, 0x7d08, 0x0804, 0x7adc,
-	0x7a92, 0x7a96, 0x0002, 0x001d, 0x0007, 0x0004, 0x000a, 0x001b,
-	0x0005, 0x0006, 0x000a, 0x001d, 0x0005, 0x0004, 0x0076, 0x0066,
-	0xafb8, 0xaebc, 0xa804, 0x2050, 0xb0c0, 0xb0e2, 0xb0bc, 0xb0de,
-	0xb0b8, 0xb0d2, 0xb0b4, 0xb0ce, 0xb6da, 0xb7d6, 0xb0b0, 0xb0ca,
-	0xb0ac, 0xb0c6, 0xb0a8, 0xb0ba, 0xb0a4, 0xb0b6, 0xb6c2, 0xb7be,
-	0xb0a0, 0xb0b2, 0xb09c, 0xb0ae, 0xb098, 0xb0a2, 0xb094, 0xb09e,
-	0xb6aa, 0xb7a6, 0xb090, 0xb09a, 0xb08c, 0xb096, 0xb088, 0xb08a,
-	0xb084, 0xb086, 0xb692, 0xb78e, 0xb080, 0xb082, 0xb07c, 0xb07e,
-	0xb078, 0xb072, 0xb074, 0xb06e, 0xb67a, 0xb776, 0xb004, 0x9055,
-	0x1958, 0x006e, 0x007e, 0x0005, 0x2009, 0x1834, 0x210c, 0x81ff,
-	0x1178, 0x080c, 0x60d6, 0x1108, 0x0005, 0x080c, 0x6fd3, 0x0126,
-	0x2091, 0x8000, 0x080c, 0xcb68, 0x080c, 0x6d9f, 0x012e, 0x0ca0,
-	0x080c, 0xcf7d, 0x1d70, 0x2001, 0x0028, 0x900e, 0x0c70, 0x2009,
-	0x1834, 0x210c, 0x81ff, 0x1188, 0xa888, 0x9005, 0x0188, 0xa883,
-	0x0000, 0x080c, 0x6164, 0x1108, 0x0005, 0xa87a, 0x0126, 0x2091,
-	0x8000, 0x080c, 0x6d9f, 0x012e, 0x0cb8, 0x2001, 0x0028, 0x0ca8,
-	0x2001, 0x0000, 0x0c90, 0x2009, 0x1834, 0x210c, 0x81ff, 0x11d8,
-	0xa888, 0x9005, 0x01e0, 0xa883, 0x0000, 0xa87c, 0xd0f4, 0x0120,
-	0x080c, 0x6236, 0x1138, 0x0005, 0x9006, 0xa87a, 0x080c, 0x61b1,
-	0x1108, 0x0005, 0x0126, 0x2091, 0x8000, 0xa87a, 0xa982, 0x080c,
-	0x6d9f, 0x012e, 0x0cb0, 0x2001, 0x0028, 0x900e, 0x0c98, 0x2001,
-	0x0000, 0x0c80, 0x7018, 0xa802, 0x2908, 0x2048, 0xa906, 0x711a,
-	0x7010, 0x8001, 0x7012, 0x0118, 0x7007, 0x0003, 0x0030, 0x7014,
-	0x2048, 0x7007, 0x0001, 0x7048, 0x080f, 0x0005, 0x00b6, 0x7007,
-	0x0001, 0xa974, 0xa878, 0x9084, 0x00ff, 0x9096, 0x0004, 0x0540,
-	0x20a9, 0x0001, 0x9096, 0x0001, 0x0190, 0x900e, 0x20a9, 0x0800,
-	0x9096, 0x0002, 0x0160, 0x9005, 0x11d8, 0xa974, 0x080c, 0x6644,
-	0x11b8, 0x0066, 0xae80, 0x080c, 0x6754, 0x006e, 0x0088, 0x0046,
-	0x2011, 0x180c, 0x2224, 0xc484, 0x2412, 0x004e, 0x00c6, 0x080c,
-	0x6644, 0x1110, 0x080c, 0x6927, 0x8108, 0x1f04, 0x7b77, 0x00ce,
-	0xa87c, 0xd084, 0x1120, 0x080c, 0x1079, 0x00be, 0x0005, 0x0126,
-	0x2091, 0x8000, 0x080c, 0x6d9f, 0x012e, 0x00be, 0x0005, 0x0126,
-	0x2091, 0x8000, 0x7007, 0x0001, 0x080c, 0x6a8a, 0x0580, 0x2061,
-	0x1a6e, 0x6100, 0xd184, 0x0178, 0xa888, 0x9084, 0x00ff, 0x1550,
-	0x6000, 0xd084, 0x0520, 0x6004, 0x9005, 0x1538, 0x6003, 0x0000,
-	0x600b, 0x0000, 0x00c8, 0x2011, 0x0001, 0xa890, 0x9005, 0x1110,
-	0x2001, 0x001e, 0x8000, 0x6016, 0xa888, 0x9084, 0x00ff, 0x0178,
-	0x6006, 0xa888, 0x8007, 0x9084, 0x00ff, 0x0148, 0x600a, 0xa888,
-	0x8000, 0x1108, 0xc28d, 0x6202, 0x012e, 0x0804, 0x7dd1, 0x012e,
-	0x0804, 0x7dcb, 0x012e, 0x0804, 0x7dc5, 0x012e, 0x0804, 0x7dc8,
-	0x0126, 0x2091, 0x8000, 0x7007, 0x0001, 0x080c, 0x6a8a, 0x05e0,
-	0x2061, 0x1a6e, 0x6000, 0xd084, 0x05b8, 0x6204, 0x6308, 0xd08c,
-	0x1530, 0xac78, 0x9484, 0x0003, 0x0170, 0xa988, 0x918c, 0x00ff,
-	0x8001, 0x1120, 0x2100, 0x9210, 0x0620, 0x0028, 0x8001, 0x1508,
-	0x2100, 0x9212, 0x02f0, 0x9484, 0x000c, 0x0188, 0xa988, 0x810f,
-	0x918c, 0x00ff, 0x9082, 0x0004, 0x1120, 0x2100, 0x9318, 0x0288,
-	0x0030, 0x9082, 0x0004, 0x1168, 0x2100, 0x931a, 0x0250, 0xa890,
-	0x9005, 0x0110, 0x8000, 0x6016, 0x6206, 0x630a, 0x012e, 0x0804,
-	0x7dd1, 0x012e, 0x0804, 0x7dce, 0x012e, 0x0804, 0x7dcb, 0x0126,
-	0x2091, 0x8000, 0x7007, 0x0001, 0x2061, 0x1a6e, 0x6300, 0xd38c,
-	0x1120, 0x6308, 0x8318, 0x0220, 0x630a, 0x012e, 0x0804, 0x7ddf,
-	0x012e, 0x0804, 0x7dce, 0x00b6, 0x0126, 0x00c6, 0x2091, 0x8000,
-	0x7007, 0x0001, 0xa87c, 0xd0ac, 0x0148, 0x00c6, 0x2061, 0x1a6e,
-	0x6000, 0x9084, 0xfcff, 0x6002, 0x00ce, 0x0440, 0xa888, 0x9005,
-	0x05d8, 0xa88c, 0x9065, 0x0598, 0x2001, 0x1834, 0x2004, 0x9005,
-	0x0118, 0x080c, 0xac2b, 0x0068, 0x6017, 0xf400, 0x6063, 0x0000,
-	0xa97c, 0xd1a4, 0x0110, 0xa980, 0x6162, 0x2009, 0x0041, 0x080c,
-	0xac8d, 0xa988, 0x918c, 0xff00, 0x9186, 0x2000, 0x1138, 0x0026,
-	0x900e, 0x2011, 0xfdff, 0x080c, 0x8902, 0x002e, 0xa87c, 0xd0c4,
-	0x0148, 0x2061, 0x1a6e, 0x6000, 0xd08c, 0x1120, 0x6008, 0x8000,
-	0x0208, 0x600a, 0x00ce, 0x012e, 0x00be, 0x0804, 0x7dd1, 0x00ce,
-	0x012e, 0x00be, 0x0804, 0x7dcb, 0xa984, 0x9186, 0x002e, 0x0d30,
-	0x9186, 0x002d, 0x0d18, 0x9186, 0x0045, 0x0510, 0x9186, 0x002a,
-	0x1130, 0x2001, 0x180c, 0x200c, 0xc194, 0x2102, 0x08b8, 0x9186,
-	0x0020, 0x0158, 0x9186, 0x0029, 0x1d10, 0xa974, 0x080c, 0x6644,
-	0x1968, 0xb800, 0xc0e4, 0xb802, 0x0848, 0xa88c, 0x9065, 0x09b8,
-	0x6007, 0x0024, 0x2001, 0x1985, 0x2004, 0x601a, 0x0804, 0x7c66,
-	0xa88c, 0x9065, 0x0960, 0x00e6, 0xa890, 0x9075, 0x2001, 0x1834,
-	0x2004, 0x9005, 0x0150, 0x080c, 0xac2b, 0x8eff, 0x0118, 0x2e60,
-	0x080c, 0xac2b, 0x00ee, 0x0804, 0x7c66, 0x6024, 0xc0dc, 0xc0d5,
-	0x6026, 0x2e60, 0x6007, 0x003a, 0xa8a0, 0x9005, 0x0130, 0x6007,
-	0x003b, 0xa8a4, 0x602e, 0xa8a8, 0x6016, 0x6003, 0x0001, 0x2009,
-	0x8020, 0x080c, 0x9239, 0x00ee, 0x0804, 0x7c66, 0x2061, 0x1a6e,
-	0x6000, 0xd084, 0x0190, 0xd08c, 0x1904, 0x7ddf, 0x0126, 0x2091,
-	0x8000, 0x6204, 0x8210, 0x0220, 0x6206, 0x012e, 0x0804, 0x7ddf,
-	0x012e, 0xa883, 0x0016, 0x0804, 0x7dd8, 0xa883, 0x0007, 0x0804,
-	0x7dd8, 0xa864, 0x8007, 0x9084, 0x00ff, 0x0130, 0x8001, 0x1138,
-	0x7007, 0x0001, 0x0069, 0x0005, 0x080c, 0x7961, 0x0040, 0x7007,
-	0x0003, 0x7012, 0x2900, 0x7016, 0x701a, 0x704b, 0x7d08, 0x0005,
-	0x00b6, 0x00e6, 0x0126, 0x2091, 0x8000, 0x903e, 0x2061, 0x1800,
-	0x61d0, 0x81ff, 0x1904, 0x7d8a, 0x6130, 0xd194, 0x1904, 0x7db4,
-	0xa878, 0x2070, 0x9e82, 0x1ddc, 0x0a04, 0x7d7e, 0x6068, 0x9e02,
-	0x1a04, 0x7d7e, 0x7120, 0x9186, 0x0006, 0x1904, 0x7d70, 0x7010,
-	0x905d, 0x0904, 0x7d8a, 0xb800, 0xd0e4, 0x1904, 0x7dae, 0x2061,
-	0x1a6e, 0x6100, 0x9184, 0x0301, 0x9086, 0x0001, 0x15a0, 0x7024,
-	0xd0dc, 0x1904, 0x7db7, 0xa883, 0x0000, 0xa803, 0x0000, 0x2908,
-	0x7014, 0x9005, 0x1198, 0x7116, 0xa87c, 0xd0f4, 0x1904, 0x7dba,
-	0x080c, 0x56f5, 0xd09c, 0x1118, 0xa87c, 0xc0cc, 0xa87e, 0x2e60,
-	0x080c, 0x87f2, 0x012e, 0x00ee, 0x00be, 0x0005, 0x2048, 0xa800,
-	0x9005, 0x1de0, 0xa902, 0x2148, 0xa87c, 0xd0f4, 0x1904, 0x7dba,
-	0x012e, 0x00ee, 0x00be, 0x0005, 0x012e, 0x00ee, 0xa883, 0x0006,
-	0x00be, 0x0804, 0x7dd8, 0xd184, 0x0db8, 0xd1c4, 0x1190, 0x00a0,
-	0xa974, 0x080c, 0x6644, 0x15d0, 0xb800, 0xd0e4, 0x15b8, 0x7120,
-	0x9186, 0x0007, 0x1118, 0xa883, 0x0002, 0x0490, 0xa883, 0x0008,
-	0x0478, 0xa883, 0x000e, 0x0460, 0xa883, 0x0017, 0x0448, 0xa883,
-	0x0035, 0x0430, 0x080c, 0x56f9, 0xd0fc, 0x01e8, 0xa878, 0x2070,
-	0x9e82, 0x1ddc, 0x02c0, 0x6068, 0x9e02, 0x12a8, 0x7120, 0x9186,
-	0x0006, 0x1188, 0x7010, 0x905d, 0x0170, 0xb800, 0xd0bc, 0x0158,
-	0x2039, 0x0001, 0x7000, 0x9086, 0x0007, 0x1904, 0x7d14, 0x7003,
-	0x0002, 0x0804, 0x7d14, 0xa883, 0x0028, 0x0010, 0xa883, 0x0029,
-	0x012e, 0x00ee, 0x00be, 0x0420, 0xa883, 0x002a, 0x0cc8, 0xa883,
-	0x0045, 0x0cb0, 0x2e60, 0x2019, 0x0002, 0x601b, 0x0014, 0x080c,
-	0xde67, 0x012e, 0x00ee, 0x00be, 0x0005, 0x2009, 0x003e, 0x0058,
-	0x2009, 0x0004, 0x0040, 0x2009, 0x0006, 0x0028, 0x2009, 0x0016,
-	0x0010, 0x2009, 0x0001, 0xa884, 0x9084, 0xff00, 0x9105, 0xa886,
-	0x0126, 0x2091, 0x8000, 0x080c, 0x6d9f, 0x012e, 0x0005, 0x080c,
-	0x1079, 0x0005, 0x00d6, 0x080c, 0x87e9, 0x00de, 0x0005, 0x00d6,
-	0x00e6, 0x0126, 0x2091, 0x8000, 0x2071, 0x0040, 0x702c, 0xd084,
-	0x01d8, 0x908c, 0x0780, 0x190c, 0x7ec9, 0xd09c, 0x11a8, 0x2071,
-	0x1800, 0x70c0, 0x90ea, 0x0020, 0x0278, 0x8001, 0x70c2, 0x702c,
-	0x2048, 0xa800, 0x702e, 0x9006, 0xa802, 0xa806, 0x2071, 0x0040,
-	0x2900, 0x7022, 0x702c, 0x0c28, 0x012e, 0x00ee, 0x00de, 0x0005,
-	0x0006, 0x9084, 0x0780, 0x190c, 0x7ec9, 0x000e, 0x0005, 0xa898,
-	0x9084, 0x0003, 0x05a8, 0x080c, 0xab9a, 0x05d8, 0x2900, 0x6016,
-	0xa864, 0x9084, 0x00ff, 0x9086, 0x0035, 0x1138, 0x6028, 0xc0fd,
-	0x602a, 0x2001, 0x196a, 0x2004, 0x0098, 0xa8a0, 0x9084, 0x00ff,
-	0xa99c, 0x918c, 0xff00, 0x9105, 0xa99c, 0x918c, 0x00ff, 0x080c,
-	0x2630, 0x1540, 0x00b6, 0x080c, 0x6644, 0x2b00, 0x00be, 0x1510,
-	0x6012, 0x6023, 0x0001, 0x2009, 0x0040, 0xa864, 0x9084, 0x00ff,
-	0x9086, 0x0035, 0x0110, 0x2009, 0x0041, 0x080c, 0xac8d, 0x0005,
-	0xa87b, 0x0101, 0x0126, 0x2091, 0x8000, 0x080c, 0x6d9f, 0x012e,
-	0x0005, 0xa87b, 0x002c, 0x0126, 0x2091, 0x8000, 0x080c, 0x6d9f,
-	0x012e, 0x0005, 0xa87b, 0x0028, 0x0126, 0x2091, 0x8000, 0x080c,
-	0x6d9f, 0x012e, 0x080c, 0xabf0, 0x0005, 0x00d6, 0x00c6, 0x0036,
-	0x0026, 0x0016, 0x00b6, 0x7007, 0x0001, 0xaa74, 0x9282, 0x0004,
-	0x1a04, 0x7eba, 0xa97c, 0x9188, 0x1000, 0x2104, 0x905d, 0xb804,
-	0xd284, 0x0140, 0x05e8, 0x8007, 0x9084, 0x00ff, 0x9084, 0x0006,
-	0x1108, 0x04b0, 0x2b10, 0x080c, 0xab9a, 0x1118, 0x080c, 0xac60,
-	0x05a8, 0x6212, 0xa874, 0x0002, 0x7e98, 0x7e9d, 0x7ea0, 0x7ea6,
-	0x2019, 0x0002, 0x080c, 0xe286, 0x0060, 0x080c, 0xe216, 0x0048,
-	0x2019, 0x0002, 0xa980, 0x080c, 0xe235, 0x0018, 0xa980, 0x080c,
-	0xe216, 0x080c, 0xabf0, 0xa887, 0x0000, 0x0126, 0x2091, 0x8000,
-	0x080c, 0x6d9f, 0x012e, 0x00be, 0x001e, 0x002e, 0x003e, 0x00ce,
-	0x00de, 0x0005, 0xa887, 0x0006, 0x0c80, 0xa887, 0x0002, 0x0c68,
-	0xa887, 0x0005, 0x0c50, 0xa887, 0x0004, 0x0c38, 0xa887, 0x0007,
-	0x0c20, 0x2091, 0x8000, 0x0e04, 0x7ecb, 0x0006, 0x0016, 0x2001,
-	0x8003, 0x0006, 0x0804, 0x0d86, 0x2001, 0x1834, 0x2004, 0x9005,
-	0x0005, 0x0005, 0x00f6, 0x2079, 0x0300, 0x2001, 0x0200, 0x200c,
-	0xc1e5, 0xc1dc, 0x2102, 0x2009, 0x0218, 0x210c, 0xd1ec, 0x1120,
-	0x080c, 0x1622, 0x00fe, 0x0005, 0x2001, 0x020d, 0x2003, 0x0020,
-	0x781f, 0x0300, 0x00fe, 0x0005, 0x781c, 0xd08c, 0x0904, 0x7f4c,
-	0x68c0, 0x90aa, 0x0005, 0x0a04, 0x855d, 0x7d44, 0x7c40, 0xd59c,
-	0x190c, 0x0d7d, 0x9584, 0x00f6, 0x1508, 0x9484, 0x7000, 0x0138,
-	0x908a, 0x2000, 0x1258, 0x9584, 0x0700, 0x8007, 0x04f0, 0x7000,
-	0x9084, 0xff00, 0x9086, 0x8100, 0x0db0, 0x00b0, 0x9484, 0x0fff,
-	0x1130, 0x7000, 0x9084, 0xff00, 0x9086, 0x8100, 0x11c0, 0x080c,
-	0xe727, 0x080c, 0x8444, 0x7817, 0x0140, 0x00a8, 0x9584, 0x0076,
-	0x1118, 0x080c, 0x84a0, 0x19c8, 0xd5a4, 0x0148, 0x0046, 0x0056,
-	0x080c, 0x7f9c, 0x080c, 0x213e, 0x005e, 0x004e, 0x0020, 0x080c,
-	0xe727, 0x7817, 0x0140, 0x080c, 0x74ec, 0x0168, 0x2001, 0x0111,
-	0x2004, 0xd08c, 0x0140, 0x6893, 0x0000, 0x2001, 0x0110, 0x2003,
-	0x0008, 0x2003, 0x0000, 0x0489, 0x0005, 0x0002, 0x7f59, 0x8266,
-	0x7f56, 0x7f56, 0x7f56, 0x7f56, 0x7f56, 0x7f56, 0x7817, 0x0140,
-	0x0005, 0x7000, 0x908c, 0xff00, 0x9194, 0xf000, 0x810f, 0x9484,
-	0x0fff, 0x6892, 0x9286, 0x2000, 0x1150, 0x6800, 0x9086, 0x0001,
-	0x1118, 0x080c, 0x5756, 0x0070, 0x080c, 0x7fbc, 0x0058, 0x9286,
-	0x3000, 0x1118, 0x080c, 0x81a3, 0x0028, 0x9286, 0x8000, 0x1110,
-	0x080c, 0x837a, 0x7817, 0x0140, 0x0005, 0x2001, 0x1810, 0x2004,
-	0xd08c, 0x0178, 0x2001, 0x1800, 0x2004, 0x9086, 0x0003, 0x1148,
-	0x0026, 0x0036, 0x2011, 0x8048, 0x2518, 0x080c, 0x4b29, 0x003e,
-	0x002e, 0x0005, 0x0036, 0x0046, 0x0056, 0x00f6, 0x2079, 0x0200,
-	0x2019, 0xfffe, 0x7c30, 0x0050, 0x0036, 0x0046, 0x0056, 0x00f6,
-	0x2079, 0x0200, 0x7d44, 0x7c40, 0x2019, 0xffff, 0x2001, 0x1810,
-	0x2004, 0xd08c, 0x0160, 0x2001, 0x1800, 0x2004, 0x9086, 0x0003,
-	0x1130, 0x0026, 0x2011, 0x8048, 0x080c, 0x4b29, 0x002e, 0x00fe,
-	0x005e, 0x004e, 0x003e, 0x0005, 0x00b6, 0x00c6, 0x7010, 0x9084,
-	0xff00, 0x8007, 0x9096, 0x0001, 0x0120, 0x9096, 0x0023, 0x1904,
-	0x8174, 0x9186, 0x0023, 0x15c0, 0x080c, 0x840f, 0x0904, 0x8174,
-	0x6120, 0x9186, 0x0001, 0x0150, 0x9186, 0x0004, 0x0138, 0x9186,
-	0x0008, 0x0120, 0x9186, 0x000a, 0x1904, 0x8174, 0x7124, 0x610a,
-	0x7030, 0x908e, 0x0200, 0x1130, 0x2009, 0x0015, 0x080c, 0xac8d,
-	0x0804, 0x8174, 0x908e, 0x0214, 0x0118, 0x908e, 0x0210, 0x1130,
-	0x2009, 0x0015, 0x080c, 0xac8d, 0x0804, 0x8174, 0x908e, 0x0100,
-	0x1904, 0x8174, 0x7034, 0x9005, 0x1904, 0x8174, 0x2009, 0x0016,
-	0x080c, 0xac8d, 0x0804, 0x8174, 0x9186, 0x0022, 0x1904, 0x8174,
-	0x7030, 0x908e, 0x0300, 0x1580, 0x68dc, 0xd0a4, 0x0528, 0xc0b5,
-	0x68de, 0x7100, 0x918c, 0x00ff, 0x697e, 0x7004, 0x6882, 0x00f6,
-	0x2079, 0x0100, 0x79e6, 0x78ea, 0x0006, 0x9084, 0x00ff, 0x0016,
-	0x2008, 0x080c, 0x2679, 0x7932, 0x7936, 0x001e, 0x000e, 0x00fe,
-	0x080c, 0x2630, 0x695e, 0x703c, 0x00e6, 0x2071, 0x0140, 0x7086,
-	0x2071, 0x1800, 0x70b6, 0x00ee, 0x7034, 0x9005, 0x1904, 0x8174,
-	0x2009, 0x0017, 0x0804, 0x8124, 0x908e, 0x0400, 0x1190, 0x7034,
-	0x9005, 0x1904, 0x8174, 0x080c, 0x74ec, 0x0120, 0x2009, 0x001d,
-	0x0804, 0x8124, 0x68dc, 0xc0a5, 0x68de, 0x2009, 0x0030, 0x0804,
-	0x8124, 0x908e, 0x0500, 0x1140, 0x7034, 0x9005, 0x1904, 0x8174,
-	0x2009, 0x0018, 0x0804, 0x8124, 0x908e, 0x2010, 0x1120, 0x2009,
-	0x0019, 0x0804, 0x8124, 0x908e, 0x2110, 0x1120, 0x2009, 0x001a,
-	0x0804, 0x8124, 0x908e, 0x5200, 0x1140, 0x7034, 0x9005, 0x1904,
-	0x8174, 0x2009, 0x001b, 0x0804, 0x8124, 0x908e, 0x5000, 0x1140,
-	0x7034, 0x9005, 0x1904, 0x8174, 0x2009, 0x001c, 0x0804, 0x8124,
-	0x908e, 0x1300, 0x1120, 0x2009, 0x0034, 0x0804, 0x8124, 0x908e,
-	0x1200, 0x1140, 0x7034, 0x9005, 0x1904, 0x8174, 0x2009, 0x0024,
-	0x0804, 0x8124, 0x908c, 0xff00, 0x918e, 0x2400, 0x1170, 0x2009,
-	0x002d, 0x2001, 0x1810, 0x2004, 0xd09c, 0x0904, 0x8124, 0x080c,
-	0xd68f, 0x1904, 0x8174, 0x0804, 0x8122, 0x908c, 0xff00, 0x918e,
-	0x5300, 0x1120, 0x2009, 0x002a, 0x0804, 0x8124, 0x908e, 0x0f00,
-	0x1120, 0x2009, 0x0020, 0x0804, 0x8124, 0x908e, 0x6104, 0x1530,
-	0x2029, 0x0205, 0x2011, 0x026d, 0x8208, 0x2204, 0x9082, 0x0004,
-	0x8004, 0x8004, 0x20a8, 0x2011, 0x8015, 0x211c, 0x8108, 0x0046,
-	0x2124, 0x080c, 0x4b29, 0x004e, 0x8108, 0x0f04, 0x80d8, 0x9186,
-	0x0280, 0x1d88, 0x2504, 0x8000, 0x202a, 0x2009, 0x0260, 0x0c58,
-	0x202b, 0x0000, 0x2009, 0x0023, 0x0804, 0x8124, 0x908e, 0x6000,
-	0x1120, 0x2009, 0x003f, 0x0804, 0x8124, 0x908e, 0x5400, 0x1138,
-	0x080c, 0x850d, 0x1904, 0x8174, 0x2009, 0x0046, 0x04a8, 0x908e,
-	0x5500, 0x1148, 0x080c, 0x8535, 0x1118, 0x2009, 0x0041, 0x0460,
-	0x2009, 0x0042, 0x0448, 0x908e, 0x7800, 0x1118, 0x2009, 0x0045,
-	0x0418, 0x908e, 0x1000, 0x1118, 0x2009, 0x004e, 0x00e8, 0x908e,
-	0x6300, 0x1118, 0x2009, 0x004a, 0x00b8, 0x908c, 0xff00, 0x918e,
-	0x5600, 0x1118, 0x2009, 0x004f, 0x0078, 0x908c, 0xff00, 0x918e,
-	0x5700, 0x1118, 0x2009, 0x0050, 0x0038, 0x2009, 0x001d, 0x6838,
-	0xd0d4, 0x0110, 0x2009, 0x004c, 0x0016, 0x2011, 0x0263, 0x2204,
-	0x8211, 0x220c, 0x080c, 0x2630, 0x1904, 0x8177, 0x080c, 0x65e3,
-	0x1904, 0x8177, 0xbe12, 0xbd16, 0x001e, 0x0016, 0x080c, 0x74ec,
-	0x01c0, 0x68dc, 0xd08c, 0x1148, 0x7000, 0x9084, 0x00ff, 0x1188,
-	0x7004, 0x9084, 0xff00, 0x1168, 0x0040, 0x687c, 0x9606, 0x1148,
-	0x6880, 0x9506, 0x9084, 0xff00, 0x1120, 0x9584, 0x00ff, 0xb886,
-	0x0080, 0xb884, 0x9005, 0x1168, 0x9186, 0x0046, 0x1150, 0x687c,
-	0x9606, 0x1138, 0x6880, 0x9506, 0x9084, 0xff00, 0x1110, 0x001e,
-	0x0098, 0x080c, 0xab9a, 0x01a8, 0x2b08, 0x6112, 0x6023, 0x0004,
-	0x7120, 0x610a, 0x001e, 0x9186, 0x004c, 0x1110, 0x6023, 0x000a,
-	0x0016, 0x001e, 0x080c, 0xac8d, 0x00ce, 0x00be, 0x0005, 0x001e,
-	0x0cd8, 0x2001, 0x180e, 0x2004, 0xd0ec, 0x0120, 0x2011, 0x8049,
-	0x080c, 0x4b29, 0x080c, 0xac60, 0x0d90, 0x2b08, 0x6112, 0x6023,
-	0x0004, 0x7120, 0x610a, 0x001e, 0x0016, 0x9186, 0x0017, 0x0118,
-	0x9186, 0x0030, 0x1128, 0x6007, 0x0009, 0x6017, 0x2900, 0x0020,
-	0x6007, 0x0051, 0x6017, 0x0000, 0x602f, 0x0009, 0x6003, 0x0001,
-	0x080c, 0x9240, 0x08a0, 0x080c, 0x3346, 0x1140, 0x7010, 0x9084,
-	0xff00, 0x8007, 0x908e, 0x0008, 0x1108, 0x0009, 0x0005, 0x00b6,
-	0x00c6, 0x0046, 0x7000, 0x908c, 0xff00, 0x810f, 0x9186, 0x0033,
-	0x11e8, 0x080c, 0x840f, 0x0904, 0x81fe, 0x7124, 0x610a, 0x7030,
-	0x908e, 0x0200, 0x1140, 0x7034, 0x9005, 0x15c0, 0x2009, 0x0015,
-	0x080c, 0xac8d, 0x0498, 0x908e, 0x0100, 0x1580, 0x7034, 0x9005,
-	0x1568, 0x2009, 0x0016, 0x080c, 0xac8d, 0x0440, 0x9186, 0x0032,
-	0x1528, 0x7030, 0x908e, 0x1400, 0x1508, 0x2009, 0x0038, 0x0016,
-	0x2011, 0x0263, 0x2204, 0x8211, 0x220c, 0x080c, 0x2630, 0x11a8,
-	0x080c, 0x65e3, 0x1190, 0xbe12, 0xbd16, 0x080c, 0xab9a, 0x0168,
-	0x2b08, 0x6112, 0x080c, 0xccfe, 0x6023, 0x0004, 0x7120, 0x610a,
-	0x001e, 0x080c, 0xac8d, 0x0010, 0x00ce, 0x001e, 0x004e, 0x00ce,
-	0x00be, 0x0005, 0x00b6, 0x0046, 0x00e6, 0x00d6, 0x2028, 0x2130,
-	0x9696, 0x00ff, 0x11b8, 0x9592, 0xfffc, 0x02a0, 0x9596, 0xfffd,
-	0x1120, 0x2009, 0x007f, 0x0804, 0x8260, 0x9596, 0xfffe, 0x1120,
-	0x2009, 0x007e, 0x0804, 0x8260, 0x9596, 0xfffc, 0x1118, 0x2009,
-	0x0080, 0x04f0, 0x2011, 0x0000, 0x2019, 0x1837, 0x231c, 0xd3ac,
-	0x0130, 0x9026, 0x20a9, 0x0800, 0x2071, 0x1000, 0x0030, 0x2021,
-	0x0081, 0x20a9, 0x077f, 0x2071, 0x1081, 0x2e1c, 0x93dd, 0x0000,
-	0x1140, 0x82ff, 0x11d0, 0x9496, 0x00ff, 0x01b8, 0x2410, 0xc2fd,
-	0x00a0, 0xbf10, 0x2600, 0x9706, 0xb814, 0x1120, 0x9546, 0x1110,
-	0x2408, 0x00b0, 0x9745, 0x1148, 0x94c6, 0x007e, 0x0130, 0x94c6,
-	0x007f, 0x0118, 0x94c6, 0x0080, 0x1d20, 0x8420, 0x8e70, 0x1f04,
-	0x8235, 0x82ff, 0x1118, 0x9085, 0x0001, 0x0018, 0xc2fc, 0x2208,
-	0x9006, 0x00de, 0x00ee, 0x004e, 0x00be, 0x0005, 0x7000, 0x908c,
-	0xff00, 0x810f, 0x9184, 0x000f, 0x0002, 0x827d, 0x827d, 0x827d,
-	0x8421, 0x827d, 0x8280, 0x82a5, 0x832e, 0x827d, 0x827d, 0x827d,
-	0x827d, 0x827d, 0x827d, 0x827d, 0x827d, 0x7817, 0x0140, 0x0005,
-	0x00b6, 0x7110, 0xd1bc, 0x01e8, 0x7120, 0x2160, 0x9c8c, 0x0003,
-	0x11c0, 0x9c8a, 0x1ddc, 0x02a8, 0x6868, 0x9c02, 0x1290, 0x7008,
-	0x9084, 0x00ff, 0x6110, 0x2158, 0xb910, 0x9106, 0x1150, 0x700c,
-	0xb914, 0x9106, 0x1130, 0x7124, 0x610a, 0x2009, 0x0046, 0x080c,
-	0xac8d, 0x7817, 0x0140, 0x00be, 0x0005, 0x00b6, 0x00c6, 0x9484,
-	0x0fff, 0x0904, 0x830a, 0x7110, 0xd1bc, 0x1904, 0x830a, 0x7108,
-	0x700c, 0x2028, 0x918c, 0x00ff, 0x2130, 0x9094, 0xff00, 0x15c8,
-	0x81ff, 0x15b8, 0x9080, 0x3388, 0x200d, 0x918c, 0xff00, 0x810f,
-	0x2001, 0x0080, 0x9106, 0x0904, 0x830a, 0x9182, 0x0801, 0x1a04,
-	0x830a, 0x9190, 0x1000, 0x2204, 0x905d, 0x05e0, 0xbe12, 0xbd16,
-	0xb800, 0xd0ec, 0x15b8, 0xba04, 0x9294, 0xff00, 0x9286, 0x0600,
-	0x1190, 0x080c, 0xab9a, 0x0598, 0x2b08, 0x7028, 0x6052, 0x702c,
-	0x604e, 0x6112, 0x6023, 0x0006, 0x7120, 0x610a, 0x7130, 0x615e,
-	0x080c, 0xd8f8, 0x00f8, 0x080c, 0x6a8e, 0x1138, 0xb807, 0x0606,
-	0x0c40, 0x190c, 0x8202, 0x11b0, 0x0880, 0x080c, 0xab9a, 0x2b08,
-	0x0188, 0x6112, 0x6023, 0x0004, 0x7120, 0x610a, 0x9286, 0x0400,
-	0x1118, 0x6007, 0x0005, 0x0010, 0x6007, 0x0001, 0x6003, 0x0001,
-	0x080c, 0x9240, 0x7817, 0x0140, 0x00ce, 0x00be, 0x0005, 0x2001,
-	0x180e, 0x2004, 0xd0ec, 0x0120, 0x2011, 0x8049, 0x080c, 0x4b29,
-	0x080c, 0xac60, 0x0d78, 0x2b08, 0x6112, 0x6023, 0x0006, 0x7120,
-	0x610a, 0x7130, 0x615e, 0x6017, 0xf300, 0x6003, 0x0001, 0x6007,
-	0x0041, 0x2009, 0xa022, 0x080c, 0x9239, 0x08e0, 0x00b6, 0x7110,
-	0xd1bc, 0x05d0, 0x7020, 0x2060, 0x9c84, 0x0003, 0x15a8, 0x9c82,
-	0x1ddc, 0x0690, 0x6868, 0x9c02, 0x1678, 0x9484, 0x0fff, 0x9082,
-	0x000c, 0x0650, 0x7008, 0x9084, 0x00ff, 0x6110, 0x2158, 0xb910,
-	0x9106, 0x1510, 0x700c, 0xb914, 0x9106, 0x11f0, 0x7124, 0x610a,
-	0x601c, 0xd0fc, 0x11c8, 0x2001, 0x0271, 0x2004, 0x9005, 0x1180,
-	0x9484, 0x0fff, 0x9082, 0x000c, 0x0158, 0x0066, 0x2031, 0x0100,
-	0xa001, 0xa001, 0x8631, 0x1de0, 0x006e, 0x601c, 0xd0fc, 0x1120,
-	0x2009, 0x0045, 0x080c, 0xac8d, 0x7817, 0x0140, 0x00be, 0x0005,
-	0x6120, 0x9186, 0x0002, 0x0128, 0x9186, 0x0005, 0x0110, 0x9085,
-	0x0001, 0x0005, 0x080c, 0x3346, 0x1168, 0x7010, 0x9084, 0xff00,
-	0x8007, 0x9086, 0x0000, 0x1130, 0x9184, 0x000f, 0x908a, 0x0006,
-	0x1208, 0x000b, 0x0005, 0x8391, 0x8392, 0x8391, 0x8391, 0x83f1,
-	0x8400, 0x0005, 0x00b6, 0x7110, 0xd1bc, 0x0120, 0x702c, 0xd084,
-	0x0904, 0x83ef, 0x700c, 0x7108, 0x080c, 0x2630, 0x1904, 0x83ef,
-	0x080c, 0x65e3, 0x1904, 0x83ef, 0xbe12, 0xbd16, 0x7110, 0xd1bc,
-	0x01d8, 0x080c, 0x6a8e, 0x0118, 0x9086, 0x0004, 0x1588, 0x00c6,
-	0x080c, 0x840f, 0x00ce, 0x05d8, 0x080c, 0xab9a, 0x2b08, 0x05b8,
-	0x6112, 0x080c, 0xccfe, 0x6023, 0x0002, 0x7120, 0x610a, 0x2009,
-	0x0088, 0x080c, 0xac8d, 0x0458, 0x080c, 0x6a8e, 0x0148, 0x9086,
-	0x0004, 0x0130, 0x080c, 0x6a96, 0x0118, 0x9086, 0x0004, 0x1180,
-	0x080c, 0xab9a, 0x2b08, 0x01d8, 0x6112, 0x080c, 0xccfe, 0x6023,
-	0x0005, 0x7120, 0x610a, 0x2009, 0x0088, 0x080c, 0xac8d, 0x0078,
-	0x080c, 0xab9a, 0x2b08, 0x0158, 0x6112, 0x080c, 0xccfe, 0x6023,
-	0x0004, 0x7120, 0x610a, 0x2009, 0x0001, 0x080c, 0xac8d, 0x00be,
-	0x0005, 0x7110, 0xd1bc, 0x0158, 0x00d1, 0x0148, 0x080c, 0x8370,
-	0x1130, 0x7124, 0x610a, 0x2009, 0x0089, 0x080c, 0xac8d, 0x0005,
-	0x7110, 0xd1bc, 0x0158, 0x0059, 0x0148, 0x080c, 0x8370, 0x1130,
-	0x7124, 0x610a, 0x2009, 0x008a, 0x080c, 0xac8d, 0x0005, 0x7020,
+	0x6886, 0x2001, 0x196c, 0x2004, 0x080c, 0x26d5, 0x60e2, 0x2001,
+	0x180c, 0x200c, 0xc1b4, 0x2102, 0x00ee, 0x00de, 0x00ce, 0x003e,
+	0x002e, 0x001e, 0x015e, 0x0005, 0x0156, 0x0016, 0x0026, 0x0036,
+	0x0046, 0x00c6, 0x00e6, 0x2061, 0x0100, 0x2071, 0x1800, 0x080c,
+	0xd094, 0x1904, 0x782a, 0x7130, 0xd184, 0x1170, 0x080c, 0x33ad,
+	0x0138, 0xc18d, 0x7132, 0x2011, 0x1848, 0x2214, 0xd2ac, 0x1120,
+	0x7030, 0xd08c, 0x0904, 0x782a, 0x2011, 0x1848, 0x220c, 0xd1a4,
+	0x0538, 0x0016, 0x2019, 0x000e, 0x080c, 0xe3b5, 0x0156, 0x00b6,
+	0x20a9, 0x007f, 0x900e, 0x9186, 0x007e, 0x01a0, 0x9186, 0x0080,
+	0x0188, 0x080c, 0x6693, 0x1170, 0x2120, 0x9006, 0x0016, 0x2009,
+	0x000e, 0x080c, 0xe445, 0x2009, 0x0001, 0x2011, 0x0100, 0x080c,
+	0x8979, 0x001e, 0x8108, 0x1f04, 0x77f3, 0x00be, 0x015e, 0x001e,
+	0xd1ac, 0x1148, 0x0016, 0x2009, 0x0002, 0x2019, 0x0004, 0x080c,
+	0x3205, 0x001e, 0x0078, 0x0156, 0x00b6, 0x20a9, 0x007f, 0x900e,
+	0x080c, 0x6693, 0x1110, 0x080c, 0x60ac, 0x8108, 0x1f04, 0x7820,
+	0x00be, 0x015e, 0x080c, 0x1b35, 0x080c, 0xa91e, 0x080c, 0xabe9,
+	0x080c, 0xa93a, 0x60e3, 0x0000, 0x080c, 0x6092, 0x080c, 0x746e,
+	0x00ee, 0x00ce, 0x004e, 0x003e, 0x002e, 0x001e, 0x015e, 0x0005,
+	0x2001, 0x197c, 0x2003, 0x0001, 0x0005, 0x2001, 0x197c, 0x2003,
+	0x0000, 0x0005, 0x2001, 0x197b, 0x2003, 0xaaaa, 0x0005, 0x2001,
+	0x197b, 0x2003, 0x0000, 0x0005, 0x2071, 0x18fa, 0x7003, 0x0000,
+	0x7007, 0x0000, 0x080c, 0x1060, 0x090c, 0x0d7d, 0xa8ab, 0xdcb0,
+	0x2900, 0x704e, 0x080c, 0x1060, 0x090c, 0x0d7d, 0xa8ab, 0xdcb0,
+	0x2900, 0x7052, 0xa867, 0x0000, 0xa86b, 0x0001, 0xa89f, 0x0000,
+	0x0005, 0x00e6, 0x2071, 0x0040, 0x6848, 0x9005, 0x1118, 0x9085,
+	0x0001, 0x04b0, 0x6840, 0x9005, 0x0150, 0x04a1, 0x6a50, 0x9200,
+	0x7002, 0x6854, 0x9101, 0x7006, 0x9006, 0x7012, 0x7016, 0x6850,
+	0x7002, 0x6854, 0x7006, 0x6858, 0x700a, 0x685c, 0x700e, 0x6840,
+	0x9005, 0x1110, 0x7012, 0x7016, 0x6848, 0x701a, 0x701c, 0x9085,
+	0x0040, 0x701e, 0x2001, 0x0019, 0x7036, 0x702b, 0x0001, 0x2001,
+	0x0004, 0x200c, 0x918c, 0xfff7, 0x918d, 0x8000, 0x2102, 0x00d6,
+	0x2069, 0x18fa, 0x6807, 0x0001, 0x00de, 0x080c, 0x7e38, 0x9006,
+	0x00ee, 0x0005, 0x900e, 0x0156, 0x20a9, 0x0006, 0x8003, 0x818d,
+	0x1f04, 0x78b6, 0x015e, 0x0005, 0x2079, 0x0040, 0x2071, 0x18fa,
+	0x7004, 0x0002, 0x78cc, 0x78cd, 0x7919, 0x7974, 0x7a84, 0x78ca,
+	0x78ca, 0x7aae, 0x080c, 0x0d7d, 0x0005, 0x2079, 0x0040, 0x2001,
+	0x1dc0, 0x2003, 0x0000, 0x782c, 0x908c, 0x0780, 0x190c, 0x7f1a,
+	0xd0a4, 0x0578, 0x2001, 0x1dc0, 0x2004, 0x9082, 0x0080, 0x1648,
+	0x1d04, 0x78ea, 0x2001, 0x1a05, 0x200c, 0x8109, 0x0510, 0x2091,
+	0x6000, 0x2102, 0x7824, 0x2048, 0x9006, 0xa802, 0xa806, 0xa864,
+	0x9084, 0x00ff, 0x908a, 0x0040, 0x0610, 0x00c0, 0x2001, 0x1800,
+	0x200c, 0x9186, 0x0003, 0x1168, 0x7004, 0x0002, 0x7909, 0x78d3,
+	0x7909, 0x7907, 0x7909, 0x7909, 0x7909, 0x7909, 0x7909, 0x080c,
+	0x7974, 0x782c, 0xd09c, 0x090c, 0x7e38, 0x0005, 0x9082, 0x005a,
+	0x1218, 0x2100, 0x003b, 0x0c10, 0x080c, 0x79aa, 0x0c90, 0x00e3,
+	0x08e8, 0x0005, 0x79aa, 0x79aa, 0x79aa, 0x79aa, 0x79aa, 0x79aa,
+	0x79aa, 0x79aa, 0x79cc, 0x79aa, 0x79aa, 0x79aa, 0x79aa, 0x79aa,
+	0x79aa, 0x79aa, 0x79aa, 0x79aa, 0x79aa, 0x79aa, 0x79aa, 0x79aa,
+	0x79aa, 0x79aa, 0x79aa, 0x79aa, 0x79aa, 0x79aa, 0x79b6, 0x79aa,
+	0x7b9f, 0x79aa, 0x79aa, 0x79aa, 0x79cc, 0x79aa, 0x79b6, 0x7be0,
+	0x7c21, 0x7c68, 0x7c7c, 0x79aa, 0x79aa, 0x79cc, 0x79b6, 0x79e0,
+	0x79aa, 0x7a58, 0x7d27, 0x7d42, 0x79aa, 0x79cc, 0x79aa, 0x79e0,
+	0x79aa, 0x79aa, 0x7a4e, 0x7d42, 0x79aa, 0x79aa, 0x79aa, 0x79aa,
+	0x79aa, 0x79aa, 0x79aa, 0x79aa, 0x79aa, 0x79f4, 0x79aa, 0x79aa,
+	0x79aa, 0x79aa, 0x79aa, 0x79aa, 0x79aa, 0x79aa, 0x79aa, 0x7ebe,
+	0x79aa, 0x7e68, 0x79aa, 0x7e68, 0x79aa, 0x7a09, 0x79aa, 0x79aa,
+	0x79aa, 0x79aa, 0x79aa, 0x79aa, 0x2079, 0x0040, 0x7004, 0x9086,
+	0x0003, 0x1198, 0x782c, 0x080c, 0x7e61, 0xd0a4, 0x0170, 0x7824,
+	0x2048, 0x9006, 0xa802, 0xa806, 0xa864, 0x9084, 0x00ff, 0x908a,
+	0x001a, 0x1210, 0x002b, 0x0c50, 0x00e9, 0x080c, 0x7e38, 0x0005,
+	0x79aa, 0x79b6, 0x7b8b, 0x79aa, 0x79b6, 0x79aa, 0x79b6, 0x79b6,
+	0x79aa, 0x79b6, 0x7b8b, 0x79b6, 0x79b6, 0x79b6, 0x79b6, 0x79b6,
+	0x79aa, 0x79b6, 0x7b8b, 0x79aa, 0x79aa, 0x79b6, 0x79aa, 0x79aa,
+	0x79aa, 0x79b6, 0x00e6, 0x2071, 0x18fa, 0x2009, 0x0400, 0x0071,
+	0x00ee, 0x0005, 0x2009, 0x1000, 0x0049, 0x0005, 0x2009, 0x2000,
+	0x0029, 0x0005, 0x2009, 0x0800, 0x0009, 0x0005, 0x7007, 0x0001,
+	0xa868, 0x9084, 0x00ff, 0x9105, 0xa86a, 0x0126, 0x2091, 0x8000,
+	0x080c, 0x6dee, 0x012e, 0x0005, 0xa864, 0x8007, 0x9084, 0x00ff,
+	0x0d08, 0x8001, 0x1120, 0x7007, 0x0001, 0x0804, 0x7b2d, 0x7007,
+	0x0003, 0x7012, 0x2900, 0x7016, 0x701a, 0x704b, 0x7b2d, 0x0005,
+	0xa864, 0x8007, 0x9084, 0x00ff, 0x0968, 0x8001, 0x1120, 0x7007,
+	0x0001, 0x0804, 0x7b48, 0x7007, 0x0003, 0x7012, 0x2900, 0x7016,
+	0x701a, 0x704b, 0x7b48, 0x0005, 0xa864, 0x8007, 0x9084, 0x00ff,
+	0x0904, 0x79b2, 0x8001, 0x1120, 0x7007, 0x0001, 0x0804, 0x7b64,
+	0x7007, 0x0003, 0x7012, 0x2900, 0x7016, 0x701a, 0x704b, 0x7b64,
+	0x0005, 0xa864, 0x8007, 0x9084, 0x00ff, 0x9086, 0x0001, 0x1904,
+	0x79b2, 0x7007, 0x0001, 0x2009, 0x1834, 0x210c, 0x81ff, 0x11a8,
+	0xa868, 0x9084, 0x00ff, 0xa86a, 0xa883, 0x0000, 0x080c, 0x6325,
+	0x1108, 0x0005, 0x0126, 0x2091, 0x8000, 0xa867, 0x0139, 0xa87a,
+	0xa982, 0x080c, 0x6dee, 0x012e, 0x0ca0, 0xa994, 0x9186, 0x0071,
+	0x0d38, 0x9186, 0x0064, 0x0d20, 0x9186, 0x007c, 0x0d08, 0x9186,
+	0x0028, 0x09f0, 0x9186, 0x0038, 0x09d8, 0x9186, 0x0078, 0x09c0,
+	0x9186, 0x005f, 0x09a8, 0x9186, 0x0056, 0x0990, 0xa897, 0x4005,
+	0xa89b, 0x0001, 0x2001, 0x0030, 0x900e, 0x08a0, 0xa87c, 0x9084,
+	0x00c0, 0x9086, 0x00c0, 0x1120, 0x7007, 0x0001, 0x0804, 0x7d59,
+	0x2900, 0x7016, 0x701a, 0x20a9, 0x0004, 0xa860, 0x20e0, 0xa85c,
+	0x9080, 0x0030, 0x2098, 0x7050, 0x2040, 0xa060, 0x20e8, 0xa05c,
+	0x9080, 0x0023, 0x20a0, 0x4003, 0xa888, 0x7012, 0x9082, 0x0401,
+	0x1a04, 0x79ba, 0xaab4, 0x928a, 0x0002, 0x1a04, 0x79ba, 0x82ff,
+	0x1138, 0xa8b8, 0xa9bc, 0x9105, 0x0118, 0x2001, 0x7aeb, 0x0018,
+	0x9280, 0x7ae1, 0x2005, 0x7056, 0x7010, 0x9015, 0x0904, 0x7acc,
+	0x080c, 0x1060, 0x1118, 0x7007, 0x0004, 0x0005, 0x2900, 0x7022,
+	0x7054, 0x2060, 0xe000, 0xa866, 0x7050, 0x2040, 0xa95c, 0xe004,
+	0x9100, 0xa076, 0xa860, 0xa072, 0xe008, 0x920a, 0x1210, 0x900e,
+	0x2200, 0x7112, 0xe20c, 0x8003, 0x800b, 0x9296, 0x0004, 0x0108,
+	0x9108, 0xa17a, 0x810b, 0xa17e, 0x080c, 0x113c, 0xa06c, 0x908e,
+	0x0100, 0x0170, 0x9086, 0x0200, 0x0118, 0x7007, 0x0007, 0x0005,
+	0x7020, 0x2048, 0x080c, 0x1079, 0x7014, 0x2048, 0x0804, 0x79ba,
+	0x7020, 0x2048, 0x7018, 0xa802, 0xa807, 0x0000, 0x2908, 0x2048,
+	0xa906, 0x711a, 0x0804, 0x7a84, 0x7014, 0x2048, 0x7007, 0x0001,
+	0xa8b4, 0x9005, 0x1128, 0xa8b8, 0xa9bc, 0x9105, 0x0108, 0x00b9,
+	0xa864, 0x9084, 0x00ff, 0x9086, 0x001e, 0x0904, 0x7d59, 0x0804,
+	0x7b2d, 0x7ae3, 0x7ae7, 0x0002, 0x001d, 0x0007, 0x0004, 0x000a,
+	0x001b, 0x0005, 0x0006, 0x000a, 0x001d, 0x0005, 0x0004, 0x0076,
+	0x0066, 0xafb8, 0xaebc, 0xa804, 0x2050, 0xb0c0, 0xb0e2, 0xb0bc,
+	0xb0de, 0xb0b8, 0xb0d2, 0xb0b4, 0xb0ce, 0xb6da, 0xb7d6, 0xb0b0,
+	0xb0ca, 0xb0ac, 0xb0c6, 0xb0a8, 0xb0ba, 0xb0a4, 0xb0b6, 0xb6c2,
+	0xb7be, 0xb0a0, 0xb0b2, 0xb09c, 0xb0ae, 0xb098, 0xb0a2, 0xb094,
+	0xb09e, 0xb6aa, 0xb7a6, 0xb090, 0xb09a, 0xb08c, 0xb096, 0xb088,
+	0xb08a, 0xb084, 0xb086, 0xb692, 0xb78e, 0xb080, 0xb082, 0xb07c,
+	0xb07e, 0xb078, 0xb072, 0xb074, 0xb06e, 0xb67a, 0xb776, 0xb004,
+	0x9055, 0x1958, 0x006e, 0x007e, 0x0005, 0x2009, 0x1834, 0x210c,
+	0x81ff, 0x1178, 0x080c, 0x6124, 0x1108, 0x0005, 0x080c, 0x7022,
+	0x0126, 0x2091, 0x8000, 0x080c, 0xcc7f, 0x080c, 0x6dee, 0x012e,
+	0x0ca0, 0x080c, 0xd094, 0x1d70, 0x2001, 0x0028, 0x900e, 0x0c70,
+	0x2009, 0x1834, 0x210c, 0x81ff, 0x1188, 0xa888, 0x9005, 0x0188,
+	0xa883, 0x0000, 0x080c, 0x61b2, 0x1108, 0x0005, 0xa87a, 0x0126,
+	0x2091, 0x8000, 0x080c, 0x6dee, 0x012e, 0x0cb8, 0x2001, 0x0028,
+	0x0ca8, 0x2001, 0x0000, 0x0c90, 0x2009, 0x1834, 0x210c, 0x81ff,
+	0x11d8, 0xa888, 0x9005, 0x01e0, 0xa883, 0x0000, 0xa87c, 0xd0f4,
+	0x0120, 0x080c, 0x6287, 0x1138, 0x0005, 0x9006, 0xa87a, 0x080c,
+	0x61ff, 0x1108, 0x0005, 0x0126, 0x2091, 0x8000, 0xa87a, 0xa982,
+	0x080c, 0x6dee, 0x012e, 0x0cb0, 0x2001, 0x0028, 0x900e, 0x0c98,
+	0x2001, 0x0000, 0x0c80, 0x7018, 0xa802, 0x2908, 0x2048, 0xa906,
+	0x711a, 0x7010, 0x8001, 0x7012, 0x0118, 0x7007, 0x0003, 0x0030,
+	0x7014, 0x2048, 0x7007, 0x0001, 0x7048, 0x080f, 0x0005, 0x00b6,
+	0x7007, 0x0001, 0xa974, 0xa878, 0x9084, 0x00ff, 0x9096, 0x0004,
+	0x0540, 0x20a9, 0x0001, 0x9096, 0x0001, 0x0190, 0x900e, 0x20a9,
+	0x0800, 0x9096, 0x0002, 0x0160, 0x9005, 0x11d8, 0xa974, 0x080c,
+	0x6693, 0x11b8, 0x0066, 0xae80, 0x080c, 0x67a3, 0x006e, 0x0088,
+	0x0046, 0x2011, 0x180c, 0x2224, 0xc484, 0x2412, 0x004e, 0x00c6,
+	0x080c, 0x6693, 0x1110, 0x080c, 0x6976, 0x8108, 0x1f04, 0x7bc8,
+	0x00ce, 0xa87c, 0xd084, 0x1120, 0x080c, 0x1079, 0x00be, 0x0005,
+	0x0126, 0x2091, 0x8000, 0x080c, 0x6dee, 0x012e, 0x00be, 0x0005,
+	0x0126, 0x2091, 0x8000, 0x7007, 0x0001, 0x080c, 0x6ad9, 0x0580,
+	0x2061, 0x1a6e, 0x6100, 0xd184, 0x0178, 0xa888, 0x9084, 0x00ff,
+	0x1550, 0x6000, 0xd084, 0x0520, 0x6004, 0x9005, 0x1538, 0x6003,
+	0x0000, 0x600b, 0x0000, 0x00c8, 0x2011, 0x0001, 0xa890, 0x9005,
+	0x1110, 0x2001, 0x001e, 0x8000, 0x6016, 0xa888, 0x9084, 0x00ff,
+	0x0178, 0x6006, 0xa888, 0x8007, 0x9084, 0x00ff, 0x0148, 0x600a,
+	0xa888, 0x8000, 0x1108, 0xc28d, 0x6202, 0x012e, 0x0804, 0x7e22,
+	0x012e, 0x0804, 0x7e1c, 0x012e, 0x0804, 0x7e16, 0x012e, 0x0804,
+	0x7e19, 0x0126, 0x2091, 0x8000, 0x7007, 0x0001, 0x080c, 0x6ad9,
+	0x05e0, 0x2061, 0x1a6e, 0x6000, 0xd084, 0x05b8, 0x6204, 0x6308,
+	0xd08c, 0x1530, 0xac78, 0x9484, 0x0003, 0x0170, 0xa988, 0x918c,
+	0x00ff, 0x8001, 0x1120, 0x2100, 0x9210, 0x0620, 0x0028, 0x8001,
+	0x1508, 0x2100, 0x9212, 0x02f0, 0x9484, 0x000c, 0x0188, 0xa988,
+	0x810f, 0x918c, 0x00ff, 0x9082, 0x0004, 0x1120, 0x2100, 0x9318,
+	0x0288, 0x0030, 0x9082, 0x0004, 0x1168, 0x2100, 0x931a, 0x0250,
+	0xa890, 0x9005, 0x0110, 0x8000, 0x6016, 0x6206, 0x630a, 0x012e,
+	0x0804, 0x7e22, 0x012e, 0x0804, 0x7e1f, 0x012e, 0x0804, 0x7e1c,
+	0x0126, 0x2091, 0x8000, 0x7007, 0x0001, 0x2061, 0x1a6e, 0x6300,
+	0xd38c, 0x1120, 0x6308, 0x8318, 0x0220, 0x630a, 0x012e, 0x0804,
+	0x7e30, 0x012e, 0x0804, 0x7e1f, 0x00b6, 0x0126, 0x00c6, 0x2091,
+	0x8000, 0x7007, 0x0001, 0xa87c, 0xd0ac, 0x0148, 0x00c6, 0x2061,
+	0x1a6e, 0x6000, 0x9084, 0xfcff, 0x6002, 0x00ce, 0x0440, 0xa888,
+	0x9005, 0x05d8, 0xa88c, 0x9065, 0x0598, 0x2001, 0x1834, 0x2004,
+	0x9005, 0x0118, 0x080c, 0xaceb, 0x0068, 0x6017, 0xf400, 0x6063,
+	0x0000, 0xa97c, 0xd1a4, 0x0110, 0xa980, 0x6162, 0x2009, 0x0041,
+	0x080c, 0xad4d, 0xa988, 0x918c, 0xff00, 0x9186, 0x2000, 0x1138,
+	0x0026, 0x900e, 0x2011, 0xfdff, 0x080c, 0x8979, 0x002e, 0xa87c,
+	0xd0c4, 0x0148, 0x2061, 0x1a6e, 0x6000, 0xd08c, 0x1120, 0x6008,
+	0x8000, 0x0208, 0x600a, 0x00ce, 0x012e, 0x00be, 0x0804, 0x7e22,
+	0x00ce, 0x012e, 0x00be, 0x0804, 0x7e1c, 0xa984, 0x9186, 0x002e,
+	0x0d30, 0x9186, 0x002d, 0x0d18, 0x9186, 0x0045, 0x0510, 0x9186,
+	0x002a, 0x1130, 0x2001, 0x180c, 0x200c, 0xc194, 0x2102, 0x08b8,
+	0x9186, 0x0020, 0x0158, 0x9186, 0x0029, 0x1d10, 0xa974, 0x080c,
+	0x6693, 0x1968, 0xb800, 0xc0e4, 0xb802, 0x0848, 0xa88c, 0x9065,
+	0x09b8, 0x6007, 0x0024, 0x2001, 0x1985, 0x2004, 0x601a, 0x0804,
+	0x7cb7, 0xa88c, 0x9065, 0x0960, 0x00e6, 0xa890, 0x9075, 0x2001,
+	0x1834, 0x2004, 0x9005, 0x0150, 0x080c, 0xaceb, 0x8eff, 0x0118,
+	0x2e60, 0x080c, 0xaceb, 0x00ee, 0x0804, 0x7cb7, 0x6024, 0xc0dc,
+	0xc0d5, 0x6026, 0x2e60, 0x6007, 0x003a, 0xa8a0, 0x9005, 0x0130,
+	0x6007, 0x003b, 0xa8a4, 0x602e, 0xa8a8, 0x6016, 0x6003, 0x0001,
+	0x2009, 0x8020, 0x080c, 0x92b0, 0x00ee, 0x0804, 0x7cb7, 0x2061,
+	0x1a6e, 0x6000, 0xd084, 0x0190, 0xd08c, 0x1904, 0x7e30, 0x0126,
+	0x2091, 0x8000, 0x6204, 0x8210, 0x0220, 0x6206, 0x012e, 0x0804,
+	0x7e30, 0x012e, 0xa883, 0x0016, 0x0804, 0x7e29, 0xa883, 0x0007,
+	0x0804, 0x7e29, 0xa864, 0x8007, 0x9084, 0x00ff, 0x0130, 0x8001,
+	0x1138, 0x7007, 0x0001, 0x0069, 0x0005, 0x080c, 0x79b2, 0x0040,
+	0x7007, 0x0003, 0x7012, 0x2900, 0x7016, 0x701a, 0x704b, 0x7d59,
+	0x0005, 0x00b6, 0x00e6, 0x0126, 0x2091, 0x8000, 0x903e, 0x2061,
+	0x1800, 0x61d0, 0x81ff, 0x1904, 0x7ddb, 0x6130, 0xd194, 0x1904,
+	0x7e05, 0xa878, 0x2070, 0x9e82, 0x1ddc, 0x0a04, 0x7dcf, 0x6068,
+	0x9e02, 0x1a04, 0x7dcf, 0x7120, 0x9186, 0x0006, 0x1904, 0x7dc1,
+	0x7010, 0x905d, 0x0904, 0x7ddb, 0xb800, 0xd0e4, 0x1904, 0x7dff,
+	0x2061, 0x1a6e, 0x6100, 0x9184, 0x0301, 0x9086, 0x0001, 0x15a0,
+	0x7024, 0xd0dc, 0x1904, 0x7e08, 0xa883, 0x0000, 0xa803, 0x0000,
+	0x2908, 0x7014, 0x9005, 0x1198, 0x7116, 0xa87c, 0xd0f4, 0x1904,
+	0x7e0b, 0x080c, 0x573e, 0xd09c, 0x1118, 0xa87c, 0xc0cc, 0xa87e,
+	0x2e60, 0x080c, 0x8869, 0x012e, 0x00ee, 0x00be, 0x0005, 0x2048,
+	0xa800, 0x9005, 0x1de0, 0xa902, 0x2148, 0xa87c, 0xd0f4, 0x1904,
+	0x7e0b, 0x012e, 0x00ee, 0x00be, 0x0005, 0x012e, 0x00ee, 0xa883,
+	0x0006, 0x00be, 0x0804, 0x7e29, 0xd184, 0x0db8, 0xd1c4, 0x1190,
+	0x00a0, 0xa974, 0x080c, 0x6693, 0x15d0, 0xb800, 0xd0e4, 0x15b8,
+	0x7120, 0x9186, 0x0007, 0x1118, 0xa883, 0x0002, 0x0490, 0xa883,
+	0x0008, 0x0478, 0xa883, 0x000e, 0x0460, 0xa883, 0x0017, 0x0448,
+	0xa883, 0x0035, 0x0430, 0x080c, 0x5742, 0xd0fc, 0x01e8, 0xa878,
+	0x2070, 0x9e82, 0x1ddc, 0x02c0, 0x6068, 0x9e02, 0x12a8, 0x7120,
+	0x9186, 0x0006, 0x1188, 0x7010, 0x905d, 0x0170, 0xb800, 0xd0bc,
+	0x0158, 0x2039, 0x0001, 0x7000, 0x9086, 0x0007, 0x1904, 0x7d65,
+	0x7003, 0x0002, 0x0804, 0x7d65, 0xa883, 0x0028, 0x0010, 0xa883,
+	0x0029, 0x012e, 0x00ee, 0x00be, 0x0420, 0xa883, 0x002a, 0x0cc8,
+	0xa883, 0x0045, 0x0cb0, 0x2e60, 0x2019, 0x0002, 0x601b, 0x0014,
+	0x080c, 0xdfa1, 0x012e, 0x00ee, 0x00be, 0x0005, 0x2009, 0x003e,
+	0x0058, 0x2009, 0x0004, 0x0040, 0x2009, 0x0006, 0x0028, 0x2009,
+	0x0016, 0x0010, 0x2009, 0x0001, 0xa884, 0x9084, 0xff00, 0x9105,
+	0xa886, 0x0126, 0x2091, 0x8000, 0x080c, 0x6dee, 0x012e, 0x0005,
+	0x080c, 0x1079, 0x0005, 0x00d6, 0x080c, 0x8860, 0x00de, 0x0005,
+	0x00d6, 0x00e6, 0x0126, 0x2091, 0x8000, 0x2071, 0x0040, 0x702c,
+	0xd084, 0x01d8, 0x908c, 0x0780, 0x190c, 0x7f1a, 0xd09c, 0x11a8,
+	0x2071, 0x1800, 0x70c0, 0x90ea, 0x0020, 0x0278, 0x8001, 0x70c2,
+	0x702c, 0x2048, 0xa800, 0x702e, 0x9006, 0xa802, 0xa806, 0x2071,
+	0x0040, 0x2900, 0x7022, 0x702c, 0x0c28, 0x012e, 0x00ee, 0x00de,
+	0x0005, 0x0006, 0x9084, 0x0780, 0x190c, 0x7f1a, 0x000e, 0x0005,
+	0xa898, 0x9084, 0x0003, 0x05a8, 0x080c, 0xac5a, 0x05d8, 0x2900,
+	0x6016, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0035, 0x1138, 0x6028,
+	0xc0fd, 0x602a, 0x2001, 0x196a, 0x2004, 0x0098, 0xa8a0, 0x9084,
+	0x00ff, 0xa99c, 0x918c, 0xff00, 0x9105, 0xa99c, 0x918c, 0x00ff,
+	0x080c, 0x2661, 0x1540, 0x00b6, 0x080c, 0x6693, 0x2b00, 0x00be,
+	0x1510, 0x6012, 0x6023, 0x0001, 0x2009, 0x0040, 0xa864, 0x9084,
+	0x00ff, 0x9086, 0x0035, 0x0110, 0x2009, 0x0041, 0x080c, 0xad4d,
+	0x0005, 0xa87b, 0x0101, 0x0126, 0x2091, 0x8000, 0x080c, 0x6dee,
+	0x012e, 0x0005, 0xa87b, 0x002c, 0x0126, 0x2091, 0x8000, 0x080c,
+	0x6dee, 0x012e, 0x0005, 0xa87b, 0x0028, 0x0126, 0x2091, 0x8000,
+	0x080c, 0x6dee, 0x012e, 0x080c, 0xacb0, 0x0005, 0x00d6, 0x00c6,
+	0x0036, 0x0026, 0x0016, 0x00b6, 0x7007, 0x0001, 0xaa74, 0x9282,
+	0x0004, 0x1a04, 0x7f0b, 0xa97c, 0x9188, 0x1000, 0x2104, 0x905d,
+	0xb804, 0xd284, 0x0140, 0x05e8, 0x8007, 0x9084, 0x00ff, 0x9084,
+	0x0006, 0x1108, 0x04b0, 0x2b10, 0x080c, 0xac5a, 0x1118, 0x080c,
+	0xad20, 0x05a8, 0x6212, 0xa874, 0x0002, 0x7ee9, 0x7eee, 0x7ef1,
+	0x7ef7, 0x2019, 0x0002, 0x080c, 0xe3b5, 0x0060, 0x080c, 0xe345,
+	0x0048, 0x2019, 0x0002, 0xa980, 0x080c, 0xe364, 0x0018, 0xa980,
+	0x080c, 0xe345, 0x080c, 0xacb0, 0xa887, 0x0000, 0x0126, 0x2091,
+	0x8000, 0x080c, 0x6dee, 0x012e, 0x00be, 0x001e, 0x002e, 0x003e,
+	0x00ce, 0x00de, 0x0005, 0xa887, 0x0006, 0x0c80, 0xa887, 0x0002,
+	0x0c68, 0xa887, 0x0005, 0x0c50, 0xa887, 0x0004, 0x0c38, 0xa887,
+	0x0007, 0x0c20, 0x2091, 0x8000, 0x0e04, 0x7f1c, 0x0006, 0x0016,
+	0x2001, 0x8003, 0x0006, 0x0804, 0x0d86, 0x2001, 0x1834, 0x2004,
+	0x9005, 0x0005, 0x0005, 0x00f6, 0x2079, 0x0300, 0x2001, 0x0200,
+	0x200c, 0xc1e5, 0xc1dc, 0x2102, 0x2009, 0x0218, 0x210c, 0xd1ec,
+	0x1120, 0x080c, 0x162f, 0x00fe, 0x0005, 0x2001, 0x020d, 0x2003,
+	0x0020, 0x781f, 0x0300, 0x00fe, 0x0005, 0x781c, 0xd08c, 0x0904,
+	0x7f9d, 0x68c0, 0x90aa, 0x0005, 0x0a04, 0x85c5, 0x7d44, 0x7c40,
+	0xd59c, 0x190c, 0x0d7d, 0x9584, 0x00f6, 0x1508, 0x9484, 0x7000,
+	0x0138, 0x908a, 0x2000, 0x1258, 0x9584, 0x0700, 0x8007, 0x04f0,
+	0x7000, 0x9084, 0xff00, 0x9086, 0x8100, 0x0db0, 0x00b0, 0x9484,
+	0x0fff, 0x1130, 0x7000, 0x9084, 0xff00, 0x9086, 0x8100, 0x11c0,
+	0x080c, 0xe85a, 0x080c, 0x84ac, 0x7817, 0x0140, 0x00a8, 0x9584,
+	0x0076, 0x1118, 0x080c, 0x8508, 0x19c8, 0xd5a4, 0x0148, 0x0046,
+	0x0056, 0x080c, 0x7fed, 0x080c, 0x216f, 0x005e, 0x004e, 0x0020,
+	0x080c, 0xe85a, 0x7817, 0x0140, 0x080c, 0x753d, 0x0168, 0x2001,
+	0x0111, 0x2004, 0xd08c, 0x0140, 0x6893, 0x0000, 0x2001, 0x0110,
+	0x2003, 0x0008, 0x2003, 0x0000, 0x0489, 0x0005, 0x0002, 0x7faa,
+	0x82ba, 0x7fa7, 0x7fa7, 0x7fa7, 0x7fa7, 0x7fa7, 0x7fa7, 0x7817,
+	0x0140, 0x0005, 0x7000, 0x908c, 0xff00, 0x9194, 0xf000, 0x810f,
+	0x9484, 0x0fff, 0x6892, 0x9286, 0x2000, 0x1150, 0x6800, 0x9086,
+	0x0001, 0x1118, 0x080c, 0x57a4, 0x0070, 0x080c, 0x800d, 0x0058,
+	0x9286, 0x3000, 0x1118, 0x080c, 0x81f4, 0x0028, 0x9286, 0x8000,
+	0x1110, 0x080c, 0x83d9, 0x7817, 0x0140, 0x0005, 0x2001, 0x1810,
+	0x2004, 0xd08c, 0x0178, 0x2001, 0x1800, 0x2004, 0x9086, 0x0003,
+	0x1148, 0x0026, 0x0036, 0x2011, 0x8048, 0x2518, 0x080c, 0x4b52,
+	0x003e, 0x002e, 0x0005, 0x0036, 0x0046, 0x0056, 0x00f6, 0x2079,
+	0x0200, 0x2019, 0xfffe, 0x7c30, 0x0050, 0x0036, 0x0046, 0x0056,
+	0x00f6, 0x2079, 0x0200, 0x7d44, 0x7c40, 0x2019, 0xffff, 0x2001,
+	0x1810, 0x2004, 0xd08c, 0x0160, 0x2001, 0x1800, 0x2004, 0x9086,
+	0x0003, 0x1130, 0x0026, 0x2011, 0x8048, 0x080c, 0x4b52, 0x002e,
+	0x00fe, 0x005e, 0x004e, 0x003e, 0x0005, 0x00b6, 0x00c6, 0x7010,
+	0x9084, 0xff00, 0x8007, 0x9096, 0x0001, 0x0120, 0x9096, 0x0023,
+	0x1904, 0x81c5, 0x9186, 0x0023, 0x15c0, 0x080c, 0x8477, 0x0904,
+	0x81c5, 0x6120, 0x9186, 0x0001, 0x0150, 0x9186, 0x0004, 0x0138,
+	0x9186, 0x0008, 0x0120, 0x9186, 0x000a, 0x1904, 0x81c5, 0x7124,
+	0x610a, 0x7030, 0x908e, 0x0200, 0x1130, 0x2009, 0x0015, 0x080c,
+	0xad4d, 0x0804, 0x81c5, 0x908e, 0x0214, 0x0118, 0x908e, 0x0210,
+	0x1130, 0x2009, 0x0015, 0x080c, 0xad4d, 0x0804, 0x81c5, 0x908e,
+	0x0100, 0x1904, 0x81c5, 0x7034, 0x9005, 0x1904, 0x81c5, 0x2009,
+	0x0016, 0x080c, 0xad4d, 0x0804, 0x81c5, 0x9186, 0x0022, 0x1904,
+	0x81c5, 0x7030, 0x908e, 0x0300, 0x1580, 0x68dc, 0xd0a4, 0x0528,
+	0xc0b5, 0x68de, 0x7100, 0x918c, 0x00ff, 0x697e, 0x7004, 0x6882,
+	0x00f6, 0x2079, 0x0100, 0x79e6, 0x78ea, 0x0006, 0x9084, 0x00ff,
+	0x0016, 0x2008, 0x080c, 0x26aa, 0x7932, 0x7936, 0x001e, 0x000e,
+	0x00fe, 0x080c, 0x2661, 0x695e, 0x703c, 0x00e6, 0x2071, 0x0140,
+	0x7086, 0x2071, 0x1800, 0x70b6, 0x00ee, 0x7034, 0x9005, 0x1904,
+	0x81c5, 0x2009, 0x0017, 0x0804, 0x8175, 0x908e, 0x0400, 0x1190,
+	0x7034, 0x9005, 0x1904, 0x81c5, 0x080c, 0x753d, 0x0120, 0x2009,
+	0x001d, 0x0804, 0x8175, 0x68dc, 0xc0a5, 0x68de, 0x2009, 0x0030,
+	0x0804, 0x8175, 0x908e, 0x0500, 0x1140, 0x7034, 0x9005, 0x1904,
+	0x81c5, 0x2009, 0x0018, 0x0804, 0x8175, 0x908e, 0x2010, 0x1120,
+	0x2009, 0x0019, 0x0804, 0x8175, 0x908e, 0x2110, 0x1120, 0x2009,
+	0x001a, 0x0804, 0x8175, 0x908e, 0x5200, 0x1140, 0x7034, 0x9005,
+	0x1904, 0x81c5, 0x2009, 0x001b, 0x0804, 0x8175, 0x908e, 0x5000,
+	0x1140, 0x7034, 0x9005, 0x1904, 0x81c5, 0x2009, 0x001c, 0x0804,
+	0x8175, 0x908e, 0x1300, 0x1120, 0x2009, 0x0034, 0x0804, 0x8175,
+	0x908e, 0x1200, 0x1140, 0x7034, 0x9005, 0x1904, 0x81c5, 0x2009,
+	0x0024, 0x0804, 0x8175, 0x908c, 0xff00, 0x918e, 0x2400, 0x1170,
+	0x2009, 0x002d, 0x2001, 0x1810, 0x2004, 0xd09c, 0x0904, 0x8175,
+	0x080c, 0xd7c9, 0x1904, 0x81c5, 0x0804, 0x8173, 0x908c, 0xff00,
+	0x918e, 0x5300, 0x1120, 0x2009, 0x002a, 0x0804, 0x8175, 0x908e,
+	0x0f00, 0x1120, 0x2009, 0x0020, 0x0804, 0x8175, 0x908e, 0x6104,
+	0x1530, 0x2029, 0x0205, 0x2011, 0x026d, 0x8208, 0x2204, 0x9082,
+	0x0004, 0x8004, 0x8004, 0x20a8, 0x2011, 0x8015, 0x211c, 0x8108,
+	0x0046, 0x2124, 0x080c, 0x4b52, 0x004e, 0x8108, 0x0f04, 0x8129,
+	0x9186, 0x0280, 0x1d88, 0x2504, 0x8000, 0x202a, 0x2009, 0x0260,
+	0x0c58, 0x202b, 0x0000, 0x2009, 0x0023, 0x0804, 0x8175, 0x908e,
+	0x6000, 0x1120, 0x2009, 0x003f, 0x0804, 0x8175, 0x908e, 0x5400,
+	0x1138, 0x080c, 0x8575, 0x1904, 0x81c5, 0x2009, 0x0046, 0x04a8,
+	0x908e, 0x5500, 0x1148, 0x080c, 0x859d, 0x1118, 0x2009, 0x0041,
+	0x0460, 0x2009, 0x0042, 0x0448, 0x908e, 0x7800, 0x1118, 0x2009,
+	0x0045, 0x0418, 0x908e, 0x1000, 0x1118, 0x2009, 0x004e, 0x00e8,
+	0x908e, 0x6300, 0x1118, 0x2009, 0x004a, 0x00b8, 0x908c, 0xff00,
+	0x918e, 0x5600, 0x1118, 0x2009, 0x004f, 0x0078, 0x908c, 0xff00,
+	0x918e, 0x5700, 0x1118, 0x2009, 0x0050, 0x0038, 0x2009, 0x001d,
+	0x6838, 0xd0d4, 0x0110, 0x2009, 0x004c, 0x0016, 0x2011, 0x0263,
+	0x2204, 0x8211, 0x220c, 0x080c, 0x2661, 0x1904, 0x81c8, 0x080c,
+	0x6632, 0x1904, 0x81c8, 0xbe12, 0xbd16, 0x001e, 0x0016, 0x080c,
+	0x753d, 0x01c0, 0x68dc, 0xd08c, 0x1148, 0x7000, 0x9084, 0x00ff,
+	0x1188, 0x7004, 0x9084, 0xff00, 0x1168, 0x0040, 0x687c, 0x9606,
+	0x1148, 0x6880, 0x9506, 0x9084, 0xff00, 0x1120, 0x9584, 0x00ff,
+	0xb886, 0x0080, 0xb884, 0x9005, 0x1168, 0x9186, 0x0046, 0x1150,
+	0x687c, 0x9606, 0x1138, 0x6880, 0x9506, 0x9084, 0xff00, 0x1110,
+	0x001e, 0x0098, 0x080c, 0xac5a, 0x01a8, 0x2b08, 0x6112, 0x6023,
+	0x0004, 0x7120, 0x610a, 0x001e, 0x9186, 0x004c, 0x1110, 0x6023,
+	0x000a, 0x0016, 0x001e, 0x080c, 0xad4d, 0x00ce, 0x00be, 0x0005,
+	0x001e, 0x0cd8, 0x2001, 0x180e, 0x2004, 0xd0ec, 0x0120, 0x2011,
+	0x8049, 0x080c, 0x4b52, 0x080c, 0xad20, 0x0d90, 0x2b08, 0x6112,
+	0x6023, 0x0004, 0x7120, 0x610a, 0x001e, 0x0016, 0x9186, 0x0017,
+	0x0118, 0x9186, 0x0030, 0x1128, 0x6007, 0x0009, 0x6017, 0x2900,
+	0x0020, 0x6007, 0x0051, 0x6017, 0x0000, 0x602f, 0x0009, 0x6003,
+	0x0001, 0x080c, 0x92b7, 0x08a0, 0x080c, 0x85e4, 0x1158, 0x080c,
+	0x3377, 0x1140, 0x7010, 0x9084, 0xff00, 0x8007, 0x908e, 0x0008,
+	0x1108, 0x0009, 0x0005, 0x00b6, 0x00c6, 0x0046, 0x7000, 0x908c,
+	0xff00, 0x810f, 0x9186, 0x0033, 0x11e8, 0x080c, 0x8477, 0x0904,
+	0x8252, 0x7124, 0x610a, 0x7030, 0x908e, 0x0200, 0x1140, 0x7034,
+	0x9005, 0x15c0, 0x2009, 0x0015, 0x080c, 0xad4d, 0x0498, 0x908e,
+	0x0100, 0x1580, 0x7034, 0x9005, 0x1568, 0x2009, 0x0016, 0x080c,
+	0xad4d, 0x0440, 0x9186, 0x0032, 0x1528, 0x7030, 0x908e, 0x1400,
+	0x1508, 0x2009, 0x0038, 0x0016, 0x2011, 0x0263, 0x2204, 0x8211,
+	0x220c, 0x080c, 0x2661, 0x11a8, 0x080c, 0x6632, 0x1190, 0xbe12,
+	0xbd16, 0x080c, 0xac5a, 0x0168, 0x2b08, 0x6112, 0x080c, 0xce15,
+	0x6023, 0x0004, 0x7120, 0x610a, 0x001e, 0x080c, 0xad4d, 0x0010,
+	0x00ce, 0x001e, 0x004e, 0x00ce, 0x00be, 0x0005, 0x00b6, 0x0046,
+	0x00e6, 0x00d6, 0x2028, 0x2130, 0x9696, 0x00ff, 0x11b8, 0x9592,
+	0xfffc, 0x02a0, 0x9596, 0xfffd, 0x1120, 0x2009, 0x007f, 0x0804,
+	0x82b4, 0x9596, 0xfffe, 0x1120, 0x2009, 0x007e, 0x0804, 0x82b4,
+	0x9596, 0xfffc, 0x1118, 0x2009, 0x0080, 0x04f0, 0x2011, 0x0000,
+	0x2019, 0x1837, 0x231c, 0xd3ac, 0x0130, 0x9026, 0x20a9, 0x0800,
+	0x2071, 0x1000, 0x0030, 0x2021, 0x0081, 0x20a9, 0x077f, 0x2071,
+	0x1081, 0x2e1c, 0x93dd, 0x0000, 0x1140, 0x82ff, 0x11d0, 0x9496,
+	0x00ff, 0x01b8, 0x2410, 0xc2fd, 0x00a0, 0xbf10, 0x2600, 0x9706,
+	0xb814, 0x1120, 0x9546, 0x1110, 0x2408, 0x00b0, 0x9745, 0x1148,
+	0x94c6, 0x007e, 0x0130, 0x94c6, 0x007f, 0x0118, 0x94c6, 0x0080,
+	0x1d20, 0x8420, 0x8e70, 0x1f04, 0x8289, 0x82ff, 0x1118, 0x9085,
+	0x0001, 0x0018, 0xc2fc, 0x2208, 0x9006, 0x00de, 0x00ee, 0x004e,
+	0x00be, 0x0005, 0x2001, 0x1837, 0x200c, 0x9184, 0x0080, 0x0110,
+	0xd18c, 0x0138, 0x7000, 0x908c, 0xff00, 0x810f, 0x9184, 0x000f,
+	0x001a, 0x7817, 0x0140, 0x0005, 0x82dc, 0x82dc, 0x82dc, 0x8489,
+	0x82dc, 0x82df, 0x8304, 0x838d, 0x82dc, 0x82dc, 0x82dc, 0x82dc,
+	0x82dc, 0x82dc, 0x82dc, 0x82dc, 0x7817, 0x0140, 0x0005, 0x00b6,
+	0x7110, 0xd1bc, 0x01e8, 0x7120, 0x2160, 0x9c8c, 0x0003, 0x11c0,
+	0x9c8a, 0x1ddc, 0x02a8, 0x6868, 0x9c02, 0x1290, 0x7008, 0x9084,
+	0x00ff, 0x6110, 0x2158, 0xb910, 0x9106, 0x1150, 0x700c, 0xb914,
+	0x9106, 0x1130, 0x7124, 0x610a, 0x2009, 0x0046, 0x080c, 0xad4d,
+	0x7817, 0x0140, 0x00be, 0x0005, 0x00b6, 0x00c6, 0x9484, 0x0fff,
+	0x0904, 0x8369, 0x7110, 0xd1bc, 0x1904, 0x8369, 0x7108, 0x700c,
+	0x2028, 0x918c, 0x00ff, 0x2130, 0x9094, 0xff00, 0x15c8, 0x81ff,
+	0x15b8, 0x9080, 0x33b9, 0x200d, 0x918c, 0xff00, 0x810f, 0x2001,
+	0x0080, 0x9106, 0x0904, 0x8369, 0x9182, 0x0801, 0x1a04, 0x8369,
+	0x9190, 0x1000, 0x2204, 0x905d, 0x05e0, 0xbe12, 0xbd16, 0xb800,
+	0xd0ec, 0x15b8, 0xba04, 0x9294, 0xff00, 0x9286, 0x0600, 0x1190,
+	0x080c, 0xac5a, 0x0598, 0x2b08, 0x7028, 0x604e, 0x702c, 0x6052,
+	0x6112, 0x6023, 0x0006, 0x7120, 0x610a, 0x7130, 0x615e, 0x080c,
+	0xda32, 0x00f8, 0x080c, 0x6add, 0x1138, 0xb807, 0x0606, 0x0c40,
+	0x190c, 0x8256, 0x11b0, 0x0880, 0x080c, 0xac5a, 0x2b08, 0x0188,
+	0x6112, 0x6023, 0x0004, 0x7120, 0x610a, 0x9286, 0x0400, 0x1118,
+	0x6007, 0x0005, 0x0010, 0x6007, 0x0001, 0x6003, 0x0001, 0x080c,
+	0x92b7, 0x7817, 0x0140, 0x00ce, 0x00be, 0x0005, 0x2001, 0x180e,
+	0x2004, 0xd0ec, 0x0120, 0x2011, 0x8049, 0x080c, 0x4b52, 0x080c,
+	0xad20, 0x0d78, 0x2b08, 0x6112, 0x6023, 0x0006, 0x7120, 0x610a,
+	0x7130, 0x615e, 0x6017, 0xf300, 0x6003, 0x0001, 0x6007, 0x0041,
+	0x2009, 0xa022, 0x080c, 0x92b0, 0x08e0, 0x00b6, 0x7110, 0xd1bc,
+	0x05d0, 0x7020, 0x2060, 0x9c84, 0x0003, 0x15a8, 0x9c82, 0x1ddc,
+	0x0690, 0x6868, 0x9c02, 0x1678, 0x9484, 0x0fff, 0x9082, 0x000c,
+	0x0650, 0x7008, 0x9084, 0x00ff, 0x6110, 0x2158, 0xb910, 0x9106,
+	0x1510, 0x700c, 0xb914, 0x9106, 0x11f0, 0x7124, 0x610a, 0x601c,
+	0xd0fc, 0x11c8, 0x2001, 0x0271, 0x2004, 0x9005, 0x1180, 0x9484,
+	0x0fff, 0x9082, 0x000c, 0x0158, 0x0066, 0x2031, 0x0100, 0xa001,
+	0xa001, 0x8631, 0x1de0, 0x006e, 0x601c, 0xd0fc, 0x1120, 0x2009,
+	0x0045, 0x080c, 0xad4d, 0x7817, 0x0140, 0x00be, 0x0005, 0x6120,
+	0x9186, 0x0002, 0x0128, 0x9186, 0x0005, 0x0110, 0x9085, 0x0001,
+	0x0005, 0x080c, 0x85e4, 0x1180, 0x080c, 0x3377, 0x1168, 0x7010,
+	0x9084, 0xff00, 0x8007, 0x9086, 0x0000, 0x1130, 0x9184, 0x000f,
+	0x908a, 0x0006, 0x1208, 0x000b, 0x0005, 0x83f3, 0x83f4, 0x83f3,
+	0x83f3, 0x8459, 0x8468, 0x0005, 0x00b6, 0x700c, 0x7108, 0x080c,
+	0x2661, 0x1904, 0x8457, 0x080c, 0x6632, 0x1904, 0x8457, 0xbe12,
+	0xbd16, 0x7110, 0xd1bc, 0x0540, 0x702c, 0xd084, 0x1120, 0xb800,
+	0xd0bc, 0x1904, 0x8457, 0x080c, 0x6add, 0x0148, 0x9086, 0x0004,
+	0x0130, 0x080c, 0x6ae5, 0x0118, 0x9086, 0x0004, 0x1588, 0x00c6,
+	0x080c, 0x8477, 0x00ce, 0x05d8, 0x080c, 0xac5a, 0x2b08, 0x05b8,
+	0x6112, 0x080c, 0xce15, 0x6023, 0x0002, 0x7120, 0x610a, 0x2009,
+	0x0088, 0x080c, 0xad4d, 0x0458, 0x080c, 0x6add, 0x0148, 0x9086,
+	0x0004, 0x0130, 0x080c, 0x6ae5, 0x0118, 0x9086, 0x0004, 0x1180,
+	0x080c, 0xac5a, 0x2b08, 0x01d8, 0x6112, 0x080c, 0xce15, 0x6023,
+	0x0005, 0x7120, 0x610a, 0x2009, 0x0088, 0x080c, 0xad4d, 0x0078,
+	0x080c, 0xac5a, 0x2b08, 0x0158, 0x6112, 0x080c, 0xce15, 0x6023,
+	0x0004, 0x7120, 0x610a, 0x2009, 0x0001, 0x080c, 0xad4d, 0x00be,
+	0x0005, 0x7110, 0xd1bc, 0x0158, 0x00d1, 0x0148, 0x080c, 0x83cf,
+	0x1130, 0x7124, 0x610a, 0x2009, 0x0089, 0x080c, 0xad4d, 0x0005,
+	0x7110, 0xd1bc, 0x0158, 0x0059, 0x0148, 0x080c, 0x83cf, 0x1130,
+	0x7124, 0x610a, 0x2009, 0x008a, 0x080c, 0xad4d, 0x0005, 0x7020,
 	0x2060, 0x9c84, 0x0003, 0x1158, 0x9c82, 0x1ddc, 0x0240, 0x2001,
 	0x181a, 0x2004, 0x9c02, 0x1218, 0x9085, 0x0001, 0x0005, 0x9006,
 	0x0ce8, 0x00b6, 0x7110, 0xd1bc, 0x11d8, 0x7024, 0x2060, 0x9c84,
 	0x0003, 0x11b0, 0x9c82, 0x1ddc, 0x0298, 0x6868, 0x9c02, 0x1280,
 	0x7008, 0x9084, 0x00ff, 0x6110, 0x2158, 0xb910, 0x9106, 0x1140,
-	0x700c, 0xb914, 0x9106, 0x1120, 0x2009, 0x0051, 0x080c, 0xac8d,
+	0x700c, 0xb914, 0x9106, 0x1120, 0x2009, 0x0051, 0x080c, 0xad4d,
 	0x7817, 0x0140, 0x00be, 0x0005, 0x2031, 0x0105, 0x0069, 0x0005,
 	0x2031, 0x0206, 0x0049, 0x0005, 0x2031, 0x0207, 0x0029, 0x0005,
 	0x2031, 0x0213, 0x0009, 0x0005, 0x00c6, 0x0096, 0x00f6, 0x7000,
-	0x9084, 0xf000, 0x9086, 0xc000, 0x05c0, 0x080c, 0xab9a, 0x05a8,
+	0x9084, 0xf000, 0x9086, 0xc000, 0x05c0, 0x080c, 0xac5a, 0x05a8,
 	0x0066, 0x00c6, 0x0046, 0x2011, 0x0263, 0x2204, 0x8211, 0x220c,
-	0x080c, 0x2630, 0x1590, 0x080c, 0x65e3, 0x1578, 0xbe12, 0xbd16,
-	0x2b00, 0x004e, 0x00ce, 0x6012, 0x080c, 0xccfe, 0x080c, 0x1047,
+	0x080c, 0x2661, 0x1590, 0x080c, 0x6632, 0x1578, 0xbe12, 0xbd16,
+	0x2b00, 0x004e, 0x00ce, 0x6012, 0x080c, 0xce15, 0x080c, 0x1047,
 	0x0500, 0x2900, 0x6062, 0x9006, 0xa802, 0xa866, 0xac6a, 0xa85c,
 	0x90f8, 0x001b, 0x20a9, 0x000e, 0xa860, 0x20e8, 0x20e1, 0x0000,
 	0x2fa0, 0x2e98, 0x4003, 0x006e, 0x6616, 0x6007, 0x003e, 0x6023,
-	0x0001, 0x6003, 0x0001, 0x080c, 0x9240, 0x00fe, 0x009e, 0x00ce,
-	0x0005, 0x080c, 0xabf0, 0x006e, 0x0cc0, 0x004e, 0x00ce, 0x0cc8,
+	0x0001, 0x6003, 0x0001, 0x080c, 0x92b7, 0x00fe, 0x009e, 0x00ce,
+	0x0005, 0x080c, 0xacb0, 0x006e, 0x0cc0, 0x004e, 0x00ce, 0x0cc8,
 	0x00c6, 0x7000, 0x908c, 0xff00, 0x9184, 0xf000, 0x810f, 0x9086,
-	0x2000, 0x1904, 0x84f7, 0x9186, 0x0022, 0x15f0, 0x2001, 0x0111,
-	0x2004, 0x9005, 0x1904, 0x84f9, 0x7030, 0x908e, 0x0400, 0x0904,
-	0x84f9, 0x908e, 0x6000, 0x05e8, 0x908e, 0x5400, 0x05d0, 0x908e,
+	0x2000, 0x1904, 0x855f, 0x9186, 0x0022, 0x15f0, 0x2001, 0x0111,
+	0x2004, 0x9005, 0x1904, 0x8561, 0x7030, 0x908e, 0x0400, 0x0904,
+	0x8561, 0x908e, 0x6000, 0x05e8, 0x908e, 0x5400, 0x05d0, 0x908e,
 	0x0300, 0x11d8, 0x2009, 0x1837, 0x210c, 0xd18c, 0x1590, 0xd1a4,
-	0x1580, 0x080c, 0x6a4c, 0x0588, 0x68b0, 0x9084, 0x00ff, 0x7100,
+	0x1580, 0x080c, 0x6a9b, 0x0588, 0x68b0, 0x9084, 0x00ff, 0x7100,
 	0x918c, 0x00ff, 0x9106, 0x1518, 0x6880, 0x69b0, 0x918c, 0xff00,
 	0x9105, 0x7104, 0x9106, 0x11d8, 0x00e0, 0x2009, 0x0103, 0x210c,
 	0xd1b4, 0x11a8, 0x908e, 0x5200, 0x09e8, 0x908e, 0x0500, 0x09d0,
 	0x908e, 0x5000, 0x09b8, 0x0058, 0x9186, 0x0023, 0x1140, 0x080c,
-	0x840f, 0x0128, 0x6004, 0x9086, 0x0002, 0x0118, 0x0000, 0x9006,
+	0x8477, 0x0128, 0x6004, 0x9086, 0x0002, 0x0118, 0x0000, 0x9006,
 	0x0010, 0x9085, 0x0001, 0x00ce, 0x0005, 0x7030, 0x908e, 0x0300,
 	0x0118, 0x908e, 0x5200, 0x1d98, 0x2001, 0x1837, 0x2004, 0x9084,
 	0x0009, 0x9086, 0x0008, 0x0d68, 0x0c50, 0x0156, 0x0046, 0x0016,
 	0x0036, 0x7038, 0x2020, 0x8427, 0x94a4, 0x0007, 0xd484, 0x0148,
-	0x20a9, 0x0004, 0x2019, 0x1805, 0x2011, 0x027a, 0x080c, 0xbbc1,
+	0x20a9, 0x0004, 0x2019, 0x1805, 0x2011, 0x027a, 0x080c, 0xbc8e,
 	0x1178, 0xd48c, 0x0148, 0x20a9, 0x0004, 0x2019, 0x1801, 0x2011,
-	0x027e, 0x080c, 0xbbc1, 0x1120, 0xd494, 0x0110, 0x9085, 0x0001,
+	0x027e, 0x080c, 0xbc8e, 0x1120, 0xd494, 0x0110, 0x9085, 0x0001,
 	0x003e, 0x001e, 0x004e, 0x015e, 0x0005, 0x0156, 0x0046, 0x0016,
 	0x0036, 0x7038, 0x2020, 0x8427, 0x94a4, 0x0007, 0xd484, 0x0148,
-	0x20a9, 0x0004, 0x2019, 0x1805, 0x2011, 0x0272, 0x080c, 0xbbc1,
+	0x20a9, 0x0004, 0x2019, 0x1805, 0x2011, 0x0272, 0x080c, 0xbc8e,
 	0x1178, 0xd48c, 0x0148, 0x20a9, 0x0004, 0x2019, 0x1801, 0x2011,
-	0x0276, 0x080c, 0xbbc1, 0x1120, 0xd494, 0x0110, 0x9085, 0x0001,
+	0x0276, 0x080c, 0xbc8e, 0x1120, 0xd494, 0x0110, 0x9085, 0x0001,
 	0x003e, 0x001e, 0x004e, 0x015e, 0x0005, 0x00f6, 0x2079, 0x0200,
 	0x7800, 0xc0e5, 0xc0cc, 0x7802, 0x00fe, 0x0005, 0x00f6, 0x2079,
 	0x1800, 0x7834, 0xd084, 0x1130, 0x2079, 0x0200, 0x7800, 0x9085,
 	0x1200, 0x7802, 0x00fe, 0x0005, 0x00e6, 0x2071, 0x1800, 0x7034,
-	0xc084, 0x7036, 0x00ee, 0x0005, 0x2071, 0x1a02, 0x7003, 0x0003,
-	0x700f, 0x0361, 0x9006, 0x701a, 0x7072, 0x7012, 0x7017, 0x1ddc,
-	0x7007, 0x0000, 0x7026, 0x702b, 0x9e6f, 0x7032, 0x7037, 0x9eec,
-	0x703f, 0xffff, 0x7042, 0x7047, 0x558c, 0x704a, 0x705b, 0x8724,
-	0x080c, 0x1060, 0x090c, 0x0d7d, 0x2900, 0x703a, 0xa867, 0x0003,
-	0xa86f, 0x0100, 0xa8ab, 0xdcb0, 0x0005, 0x2071, 0x1a02, 0x1d04,
-	0x8640, 0x2091, 0x6000, 0x700c, 0x8001, 0x700e, 0x1590, 0x2001,
-	0x013c, 0x2004, 0x9005, 0x190c, 0x87ce, 0x2001, 0x1869, 0x2004,
-	0xd0c4, 0x0158, 0x3a00, 0xd08c, 0x1140, 0x20d1, 0x0000, 0x20d1,
-	0x0001, 0x20d1, 0x0000, 0x080c, 0x0d7d, 0x700f, 0x0361, 0x7007,
-	0x0001, 0x0126, 0x2091, 0x8000, 0x2069, 0x1800, 0x69ec, 0xd1e4,
-	0x1138, 0xd1dc, 0x1118, 0x080c, 0x8792, 0x0010, 0x080c, 0x8769,
-	0x7040, 0x900d, 0x0148, 0x8109, 0x7142, 0x1130, 0x7044, 0x080f,
-	0x0018, 0x0126, 0x2091, 0x8000, 0x7024, 0x900d, 0x0188, 0x7020,
-	0x8001, 0x7022, 0x1168, 0x7023, 0x0009, 0x8109, 0x7126, 0x9186,
-	0x03e8, 0x1110, 0x7028, 0x080f, 0x81ff, 0x1110, 0x7028, 0x080f,
-	0x7030, 0x900d, 0x0180, 0x702c, 0x8001, 0x702e, 0x1160, 0x702f,
-	0x0009, 0x8109, 0x7132, 0x0128, 0x9184, 0x007f, 0x090c, 0x9f88,
-	0x0010, 0x7034, 0x080f, 0x703c, 0x9005, 0x0118, 0x0310, 0x8001,
-	0x703e, 0x704c, 0x900d, 0x0168, 0x7048, 0x8001, 0x704a, 0x1148,
-	0x704b, 0x0009, 0x8109, 0x714e, 0x1120, 0x7150, 0x714e, 0x7058,
-	0x080f, 0x7018, 0x900d, 0x01d8, 0x0016, 0x7070, 0x900d, 0x0158,
-	0x706c, 0x8001, 0x706e, 0x1138, 0x706f, 0x0009, 0x8109, 0x7172,
-	0x1110, 0x7074, 0x080f, 0x001e, 0x7008, 0x8001, 0x700a, 0x1138,
-	0x700b, 0x0009, 0x8109, 0x711a, 0x1110, 0x701c, 0x080f, 0x012e,
-	0x7004, 0x0002, 0x8668, 0x8669, 0x8693, 0x00e6, 0x2071, 0x1a02,
-	0x7018, 0x9005, 0x1120, 0x711a, 0x721e, 0x700b, 0x0009, 0x00ee,
-	0x0005, 0x00e6, 0x0006, 0x2071, 0x1a02, 0x701c, 0x9206, 0x1120,
-	0x701a, 0x701e, 0x7072, 0x7076, 0x000e, 0x00ee, 0x0005, 0x00e6,
-	0x2071, 0x1a02, 0xb888, 0x9102, 0x0208, 0xb98a, 0x00ee, 0x0005,
-	0x0005, 0x00b6, 0x2031, 0x0010, 0x7110, 0x080c, 0x6644, 0x11a8,
-	0xb888, 0x8001, 0x0290, 0xb88a, 0x1180, 0x0126, 0x2091, 0x8000,
-	0x0066, 0xb8d0, 0x9005, 0x0138, 0x0026, 0xba3c, 0x0016, 0x080c,
-	0x676f, 0x001e, 0x002e, 0x006e, 0x012e, 0x8108, 0x9182, 0x0800,
-	0x1220, 0x8631, 0x0128, 0x7112, 0x0c00, 0x900e, 0x7007, 0x0002,
-	0x7112, 0x00be, 0x0005, 0x2031, 0x0010, 0x7014, 0x2060, 0x0126,
-	0x2091, 0x8000, 0x6048, 0x9005, 0x0128, 0x8001, 0x604a, 0x1110,
-	0x080c, 0xcb7f, 0x6018, 0x9005, 0x0904, 0x86eb, 0x00f6, 0x2079,
-	0x0300, 0x7918, 0xd1b4, 0x1904, 0x86fe, 0x781b, 0x2020, 0xa001,
-	0x7918, 0xd1b4, 0x0120, 0x781b, 0x2000, 0x0804, 0x86fe, 0x8001,
-	0x601a, 0x0106, 0x781b, 0x2000, 0xa001, 0x7918, 0xd1ac, 0x1dd0,
-	0x010e, 0x00fe, 0x1540, 0x6120, 0x9186, 0x0003, 0x0148, 0x9186,
-	0x0006, 0x0130, 0x9186, 0x0009, 0x11e0, 0x611c, 0xd1c4, 0x1100,
-	0x080c, 0xc865, 0x01b0, 0x6014, 0x2048, 0xa884, 0x908a, 0x199a,
-	0x0280, 0x9082, 0x1999, 0xa886, 0x908a, 0x199a, 0x0210, 0x2001,
-	0x1999, 0x8003, 0x800b, 0x810b, 0x9108, 0x611a, 0x080c, 0xcfb0,
-	0x0110, 0x080c, 0xc546, 0x012e, 0x9c88, 0x001c, 0x7116, 0x2001,
-	0x181a, 0x2004, 0x9102, 0x1228, 0x8631, 0x0138, 0x2160, 0x0804,
-	0x8697, 0x7017, 0x1ddc, 0x7007, 0x0000, 0x0005, 0x00fe, 0x0c58,
-	0x00e6, 0x2071, 0x1a02, 0x7027, 0x07d0, 0x7023, 0x0009, 0x00ee,
-	0x0005, 0x2001, 0x1a0b, 0x2003, 0x0000, 0x0005, 0x00e6, 0x2071,
-	0x1a02, 0x7132, 0x702f, 0x0009, 0x00ee, 0x0005, 0x2011, 0x1a0e,
-	0x2013, 0x0000, 0x0005, 0x00e6, 0x2071, 0x1a02, 0x711a, 0x721e,
-	0x700b, 0x0009, 0x00ee, 0x0005, 0x0086, 0x0026, 0x7054, 0x8000,
-	0x7056, 0x2001, 0x1a10, 0x2044, 0xa06c, 0x9086, 0x0000, 0x0150,
-	0x7068, 0xa09a, 0x7064, 0xa096, 0x7060, 0xa092, 0x705c, 0xa08e,
-	0x080c, 0x113c, 0x002e, 0x008e, 0x0005, 0x0006, 0x0016, 0x0096,
-	0x00a6, 0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x0156, 0x080c,
-	0x85a5, 0x015e, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x00ae,
-	0x009e, 0x001e, 0x000e, 0x0005, 0x00e6, 0x2071, 0x1a02, 0x7172,
-	0x7276, 0x706f, 0x0009, 0x00ee, 0x0005, 0x00e6, 0x0006, 0x2071,
-	0x1a02, 0x7074, 0x9206, 0x1110, 0x7072, 0x7076, 0x000e, 0x00ee,
-	0x0005, 0x2069, 0x1800, 0x69ec, 0xd1e4, 0x1518, 0x0026, 0xd1ec,
-	0x0140, 0x6a54, 0x6874, 0x9202, 0x0288, 0x8117, 0x9294, 0x00c1,
-	0x0088, 0x9184, 0x0007, 0x01a0, 0x8109, 0x9184, 0x0007, 0x0110,
-	0x69ee, 0x0070, 0x8107, 0x9084, 0x0007, 0x910d, 0x8107, 0x9106,
-	0x9094, 0x00c1, 0x9184, 0xff3e, 0x9205, 0x68ee, 0x080c, 0x0f12,
-	0x002e, 0x0005, 0x69e8, 0x9184, 0x003f, 0x05b8, 0x8109, 0x9184,
-	0x003f, 0x01a8, 0x6a54, 0x6874, 0x9202, 0x0220, 0xd1bc, 0x0168,
-	0xc1bc, 0x0018, 0xd1bc, 0x1148, 0xc1bd, 0x2110, 0x00e6, 0x2071,
-	0x1800, 0x080c, 0x0f34, 0x00ee, 0x0400, 0x69ea, 0x00f0, 0x0026,
-	0x8107, 0x9094, 0x0007, 0x0128, 0x8001, 0x8007, 0x9085, 0x0007,
-	0x0050, 0x2010, 0x8004, 0x8004, 0x8004, 0x9084, 0x0007, 0x9205,
-	0x8007, 0x9085, 0x0028, 0x9086, 0x0040, 0x2010, 0x00e6, 0x2071,
-	0x1800, 0x080c, 0x0f34, 0x00ee, 0x002e, 0x0005, 0x0016, 0x00c6,
-	0x2009, 0xfff4, 0x210d, 0x2061, 0x0100, 0x60f0, 0x9100, 0x60f3,
-	0x0000, 0x2009, 0xfff4, 0x200f, 0x1220, 0x8108, 0x2105, 0x8000,
-	0x200f, 0x00ce, 0x001e, 0x0005, 0x00c6, 0x2061, 0x1a6e, 0x00ce,
-	0x0005, 0x9184, 0x000f, 0x8003, 0x8003, 0x8003, 0x9080, 0x1a6e,
-	0x2060, 0x0005, 0xa884, 0x908a, 0x199a, 0x1638, 0x9005, 0x1150,
-	0x00c6, 0x2061, 0x1a6e, 0x6014, 0x00ce, 0x9005, 0x1130, 0x2001,
-	0x001e, 0x0018, 0x908e, 0xffff, 0x01b0, 0x8003, 0x800b, 0x810b,
-	0x9108, 0x611a, 0xa87c, 0x908c, 0x00c0, 0x918e, 0x00c0, 0x0904,
-	0x88ac, 0xd0b4, 0x1168, 0xd0bc, 0x1904, 0x8885, 0x2009, 0x0006,
-	0x080c, 0x88d9, 0x0005, 0x900e, 0x0c60, 0x2001, 0x1999, 0x08b0,
-	0xd0fc, 0x05e0, 0x908c, 0x2023, 0x1568, 0x87ff, 0x1558, 0xa9a8,
-	0x81ff, 0x1540, 0x6124, 0x918c, 0x0500, 0x1520, 0x6100, 0x918e,
-	0x0007, 0x1500, 0x2009, 0x1869, 0x210c, 0xd184, 0x11d8, 0x6003,
-	0x0003, 0x6007, 0x0043, 0x6047, 0xb035, 0x080c, 0x1c28, 0xa87c,
-	0xc0dd, 0xa87e, 0x600f, 0x0000, 0x00f6, 0x2079, 0x0380, 0x7818,
-	0xd0bc, 0x1de8, 0x7833, 0x0013, 0x2c00, 0x7836, 0x781b, 0x8080,
-	0x00fe, 0x0005, 0x908c, 0x0003, 0x0120, 0x918e, 0x0003, 0x1904,
-	0x88d3, 0x908c, 0x2020, 0x918e, 0x2020, 0x01a8, 0x6024, 0xd0d4,
-	0x11e8, 0x2009, 0x1869, 0x2104, 0xd084, 0x1138, 0x87ff, 0x1120,
-	0x2009, 0x0043, 0x0804, 0xac8d, 0x0005, 0x87ff, 0x1de8, 0x2009,
-	0x0042, 0x0804, 0xac8d, 0x6110, 0x00b6, 0x2158, 0xb900, 0x00be,
-	0xd1ac, 0x0d20, 0x6024, 0xc0cd, 0x6026, 0x0c00, 0xc0d4, 0x6026,
-	0xa890, 0x602e, 0xa88c, 0x6032, 0x08e0, 0xd0fc, 0x0160, 0x908c,
-	0x0003, 0x0120, 0x918e, 0x0003, 0x1904, 0x88d3, 0x908c, 0x2020,
-	0x918e, 0x2020, 0x0170, 0x0076, 0x00f6, 0x2c78, 0x080c, 0x174b,
-	0x00fe, 0x007e, 0x87ff, 0x1120, 0x2009, 0x0042, 0x080c, 0xac8d,
-	0x0005, 0x6110, 0x00b6, 0x2158, 0xb900, 0x00be, 0xd1ac, 0x0d58,
-	0x6124, 0xc1cd, 0x6126, 0x0c38, 0xd0fc, 0x0188, 0x908c, 0x2020,
-	0x918e, 0x2020, 0x01a8, 0x9084, 0x0003, 0x908e, 0x0002, 0x0148,
-	0x87ff, 0x1120, 0x2009, 0x0041, 0x080c, 0xac8d, 0x0005, 0x00b9,
-	0x0ce8, 0x87ff, 0x1dd8, 0x2009, 0x0043, 0x080c, 0xac8d, 0x0cb0,
-	0x6110, 0x00b6, 0x2158, 0xb900, 0x00be, 0xd1ac, 0x0d20, 0x6124,
-	0xc1cd, 0x6126, 0x0c00, 0x2009, 0x0004, 0x0019, 0x0005, 0x2009,
-	0x0001, 0x0096, 0x080c, 0xc865, 0x0518, 0x6014, 0x2048, 0xa982,
-	0xa800, 0x6016, 0x9186, 0x0001, 0x1188, 0xa97c, 0x918c, 0x8100,
-	0x918e, 0x8100, 0x1158, 0x00c6, 0x2061, 0x1a6e, 0x6200, 0xd28c,
-	0x1120, 0x6204, 0x8210, 0x0208, 0x6206, 0x00ce, 0x080c, 0x6bd4,
-	0x6014, 0x904d, 0x0076, 0x2039, 0x0000, 0x190c, 0x87f2, 0x007e,
-	0x009e, 0x0005, 0x0156, 0x00c6, 0x2061, 0x1a6e, 0x6000, 0x81ff,
-	0x0110, 0x9205, 0x0008, 0x9204, 0x6002, 0x00ce, 0x015e, 0x0005,
-	0x6800, 0xd08c, 0x1138, 0x6808, 0x9005, 0x0120, 0x8001, 0x680a,
-	0x9085, 0x0001, 0x0005, 0x2071, 0x1923, 0x7003, 0x0006, 0x7007,
-	0x0000, 0x700f, 0x0000, 0x7013, 0x0001, 0x080c, 0x1060, 0x090c,
-	0x0d7d, 0xa867, 0x0006, 0xa86b, 0x0001, 0xa8ab, 0xdcb0, 0xa89f,
-	0x0000, 0x2900, 0x702e, 0x7033, 0x0000, 0x0005, 0x0096, 0x00e6,
-	0x2071, 0x1923, 0x702c, 0x2048, 0x6a2c, 0x721e, 0x6b30, 0x7322,
-	0x6834, 0x7026, 0xa896, 0x6838, 0x702a, 0xa89a, 0x6824, 0x7016,
-	0x683c, 0x701a, 0x2009, 0x0028, 0x200a, 0x9005, 0x0148, 0x900e,
-	0x9188, 0x000c, 0x8001, 0x1de0, 0x2100, 0x9210, 0x1208, 0x8318,
-	0xaa8e, 0xab92, 0x7010, 0xd084, 0x0178, 0xc084, 0x7007, 0x0001,
-	0x700f, 0x0000, 0x0006, 0x2009, 0x181d, 0x2104, 0x9082, 0x0007,
-	0x2009, 0x1b4d, 0x200a, 0x000e, 0xc095, 0x7012, 0x2008, 0x2001,
-	0x003b, 0x080c, 0x1693, 0x9006, 0x2071, 0x193c, 0x7002, 0x7006,
-	0x702a, 0x00ee, 0x009e, 0x0005, 0x00e6, 0x0126, 0x0156, 0x2091,
-	0x8000, 0x2071, 0x1800, 0x7154, 0x2001, 0x0008, 0x910a, 0x0638,
-	0x2001, 0x187d, 0x20ac, 0x9006, 0x9080, 0x0008, 0x1f04, 0x898c,
-	0x71c0, 0x9102, 0x02e0, 0x2071, 0x1877, 0x20a9, 0x0007, 0x00c6,
-	0x080c, 0xab9a, 0x6023, 0x0009, 0x6003, 0x0004, 0x601f, 0x0101,
-	0x0089, 0x0126, 0x2091, 0x8000, 0x080c, 0x8b15, 0x012e, 0x1f04,
-	0x8998, 0x9006, 0x00ce, 0x015e, 0x012e, 0x00ee, 0x0005, 0x9085,
-	0x0001, 0x0cc8, 0x00e6, 0x00b6, 0x0096, 0x0086, 0x0056, 0x0046,
-	0x0026, 0x7118, 0x720c, 0x7620, 0x7004, 0xd084, 0x1128, 0x2021,
-	0x0024, 0x2029, 0x0002, 0x0020, 0x2021, 0x002c, 0x2029, 0x000a,
-	0x080c, 0x1047, 0x090c, 0x0d7d, 0x2900, 0x6016, 0x2058, 0xac66,
-	0x9006, 0xa802, 0xa806, 0xa86a, 0xa87a, 0xa8aa, 0xa887, 0x0005,
-	0xa87f, 0x0020, 0x7008, 0xa89a, 0x7010, 0xa89e, 0xae8a, 0xa8af,
-	0xffff, 0xa8b3, 0x0000, 0x8109, 0x0160, 0x080c, 0x1047, 0x090c,
-	0x0d7d, 0xad66, 0x2b00, 0xa802, 0x2900, 0xb806, 0x2058, 0x8109,
-	0x1da0, 0x002e, 0x004e, 0x005e, 0x008e, 0x009e, 0x00be, 0x00ee,
-	0x0005, 0x2079, 0x0000, 0x2071, 0x1923, 0x7004, 0x004b, 0x700c,
-	0x0002, 0x8a04, 0x89fd, 0x89fd, 0x0005, 0x8a0e, 0x8a6f, 0x8a6f,
-	0x8a6f, 0x8a70, 0x8a81, 0x8a81, 0x700c, 0x0cba, 0x0126, 0x2091,
-	0x8000, 0x78a0, 0x79a0, 0x9106, 0x0128, 0x78a0, 0x79a0, 0x9106,
-	0x1904, 0x8a62, 0x2001, 0x0005, 0x2004, 0xd0bc, 0x0130, 0x2011,
-	0x0004, 0x2204, 0xc0c5, 0x2012, 0x0ca8, 0x012e, 0x7018, 0x910a,
-	0x1130, 0x7030, 0x9005, 0x05a8, 0x080c, 0x8ab0, 0x0490, 0x1210,
+	0xc084, 0x7036, 0x00ee, 0x0005, 0x0016, 0x2001, 0x1837, 0x200c,
+	0x9184, 0x0080, 0x0118, 0xd18c, 0x0118, 0x9006, 0x001e, 0x0005,
+	0x9085, 0x0001, 0x0cd8, 0x2071, 0x1a02, 0x7003, 0x0003, 0x700f,
+	0x0361, 0x9006, 0x701a, 0x7072, 0x7012, 0x7017, 0x1ddc, 0x7007,
+	0x0000, 0x7026, 0x702b, 0x9ef4, 0x7032, 0x7037, 0x9f71, 0x703f,
+	0xffff, 0x7042, 0x7047, 0x55c2, 0x704a, 0x705b, 0x879b, 0x080c,
+	0x1060, 0x090c, 0x0d7d, 0x2900, 0x703a, 0xa867, 0x0003, 0xa86f,
+	0x0100, 0xa8ab, 0xdcb0, 0x0005, 0x2071, 0x1a02, 0x1d04, 0x86b7,
+	0x2091, 0x6000, 0x700c, 0x8001, 0x700e, 0x1590, 0x2001, 0x013c,
+	0x2004, 0x9005, 0x190c, 0x8845, 0x2001, 0x1869, 0x2004, 0xd0c4,
+	0x0158, 0x3a00, 0xd08c, 0x1140, 0x20d1, 0x0000, 0x20d1, 0x0001,
+	0x20d1, 0x0000, 0x080c, 0x0d7d, 0x700f, 0x0361, 0x7007, 0x0001,
+	0x0126, 0x2091, 0x8000, 0x2069, 0x1800, 0x69ec, 0xd1e4, 0x1138,
+	0xd1dc, 0x1118, 0x080c, 0x8809, 0x0010, 0x080c, 0x87e0, 0x7040,
+	0x900d, 0x0148, 0x8109, 0x7142, 0x1130, 0x7044, 0x080f, 0x0018,
+	0x0126, 0x2091, 0x8000, 0x7024, 0x900d, 0x0188, 0x7020, 0x8001,
+	0x7022, 0x1168, 0x7023, 0x0009, 0x8109, 0x7126, 0x9186, 0x03e8,
+	0x1110, 0x7028, 0x080f, 0x81ff, 0x1110, 0x7028, 0x080f, 0x7030,
+	0x900d, 0x0180, 0x702c, 0x8001, 0x702e, 0x1160, 0x702f, 0x0009,
+	0x8109, 0x7132, 0x0128, 0x9184, 0x007f, 0x090c, 0xa00d, 0x0010,
+	0x7034, 0x080f, 0x703c, 0x9005, 0x0118, 0x0310, 0x8001, 0x703e,
+	0x704c, 0x900d, 0x0168, 0x7048, 0x8001, 0x704a, 0x1148, 0x704b,
+	0x0009, 0x8109, 0x714e, 0x1120, 0x7150, 0x714e, 0x7058, 0x080f,
+	0x7018, 0x900d, 0x01d8, 0x0016, 0x7070, 0x900d, 0x0158, 0x706c,
+	0x8001, 0x706e, 0x1138, 0x706f, 0x0009, 0x8109, 0x7172, 0x1110,
+	0x7074, 0x080f, 0x001e, 0x7008, 0x8001, 0x700a, 0x1138, 0x700b,
+	0x0009, 0x8109, 0x711a, 0x1110, 0x701c, 0x080f, 0x012e, 0x7004,
+	0x0002, 0x86df, 0x86e0, 0x870a, 0x00e6, 0x2071, 0x1a02, 0x7018,
+	0x9005, 0x1120, 0x711a, 0x721e, 0x700b, 0x0009, 0x00ee, 0x0005,
+	0x00e6, 0x0006, 0x2071, 0x1a02, 0x701c, 0x9206, 0x1120, 0x701a,
+	0x701e, 0x7072, 0x7076, 0x000e, 0x00ee, 0x0005, 0x00e6, 0x2071,
+	0x1a02, 0xb888, 0x9102, 0x0208, 0xb98a, 0x00ee, 0x0005, 0x0005,
+	0x00b6, 0x2031, 0x0010, 0x7110, 0x080c, 0x6693, 0x11a8, 0xb888,
+	0x8001, 0x0290, 0xb88a, 0x1180, 0x0126, 0x2091, 0x8000, 0x0066,
+	0xb8d0, 0x9005, 0x0138, 0x0026, 0xba3c, 0x0016, 0x080c, 0x67be,
+	0x001e, 0x002e, 0x006e, 0x012e, 0x8108, 0x9182, 0x0800, 0x1220,
+	0x8631, 0x0128, 0x7112, 0x0c00, 0x900e, 0x7007, 0x0002, 0x7112,
+	0x00be, 0x0005, 0x2031, 0x0010, 0x7014, 0x2060, 0x0126, 0x2091,
+	0x8000, 0x6048, 0x9005, 0x0128, 0x8001, 0x604a, 0x1110, 0x080c,
+	0xcc96, 0x6018, 0x9005, 0x0904, 0x8762, 0x00f6, 0x2079, 0x0300,
+	0x7918, 0xd1b4, 0x1904, 0x8775, 0x781b, 0x2020, 0xa001, 0x7918,
+	0xd1b4, 0x0120, 0x781b, 0x2000, 0x0804, 0x8775, 0x8001, 0x601a,
+	0x0106, 0x781b, 0x2000, 0xa001, 0x7918, 0xd1ac, 0x1dd0, 0x010e,
+	0x00fe, 0x1540, 0x6120, 0x9186, 0x0003, 0x0148, 0x9186, 0x0006,
+	0x0130, 0x9186, 0x0009, 0x11e0, 0x611c, 0xd1c4, 0x1100, 0x080c,
+	0xc97a, 0x01b0, 0x6014, 0x2048, 0xa884, 0x908a, 0x199a, 0x0280,
+	0x9082, 0x1999, 0xa886, 0x908a, 0x199a, 0x0210, 0x2001, 0x1999,
+	0x8003, 0x800b, 0x810b, 0x9108, 0x611a, 0x080c, 0xd0c7, 0x0110,
+	0x080c, 0xc65b, 0x012e, 0x9c88, 0x001c, 0x7116, 0x2001, 0x181a,
+	0x2004, 0x9102, 0x1228, 0x8631, 0x0138, 0x2160, 0x0804, 0x870e,
+	0x7017, 0x1ddc, 0x7007, 0x0000, 0x0005, 0x00fe, 0x0c58, 0x00e6,
+	0x2071, 0x1a02, 0x7027, 0x07d0, 0x7023, 0x0009, 0x00ee, 0x0005,
+	0x2001, 0x1a0b, 0x2003, 0x0000, 0x0005, 0x00e6, 0x2071, 0x1a02,
+	0x7132, 0x702f, 0x0009, 0x00ee, 0x0005, 0x2011, 0x1a0e, 0x2013,
+	0x0000, 0x0005, 0x00e6, 0x2071, 0x1a02, 0x711a, 0x721e, 0x700b,
+	0x0009, 0x00ee, 0x0005, 0x0086, 0x0026, 0x7054, 0x8000, 0x7056,
+	0x2001, 0x1a10, 0x2044, 0xa06c, 0x9086, 0x0000, 0x0150, 0x7068,
+	0xa09a, 0x7064, 0xa096, 0x7060, 0xa092, 0x705c, 0xa08e, 0x080c,
+	0x113c, 0x002e, 0x008e, 0x0005, 0x0006, 0x0016, 0x0096, 0x00a6,
+	0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x0156, 0x080c, 0x861c,
+	0x015e, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x00ae, 0x009e,
+	0x001e, 0x000e, 0x0005, 0x00e6, 0x2071, 0x1a02, 0x7172, 0x7276,
+	0x706f, 0x0009, 0x00ee, 0x0005, 0x00e6, 0x0006, 0x2071, 0x1a02,
+	0x7074, 0x9206, 0x1110, 0x7072, 0x7076, 0x000e, 0x00ee, 0x0005,
+	0x2069, 0x1800, 0x69ec, 0xd1e4, 0x1518, 0x0026, 0xd1ec, 0x0140,
+	0x6a54, 0x6874, 0x9202, 0x0288, 0x8117, 0x9294, 0x00c1, 0x0088,
+	0x9184, 0x0007, 0x01a0, 0x8109, 0x9184, 0x0007, 0x0110, 0x69ee,
+	0x0070, 0x8107, 0x9084, 0x0007, 0x910d, 0x8107, 0x9106, 0x9094,
+	0x00c1, 0x9184, 0xff3e, 0x9205, 0x68ee, 0x080c, 0x0f12, 0x002e,
+	0x0005, 0x69e8, 0x9184, 0x003f, 0x05b8, 0x8109, 0x9184, 0x003f,
+	0x01a8, 0x6a54, 0x6874, 0x9202, 0x0220, 0xd1bc, 0x0168, 0xc1bc,
+	0x0018, 0xd1bc, 0x1148, 0xc1bd, 0x2110, 0x00e6, 0x2071, 0x1800,
+	0x080c, 0x0f34, 0x00ee, 0x0400, 0x69ea, 0x00f0, 0x0026, 0x8107,
+	0x9094, 0x0007, 0x0128, 0x8001, 0x8007, 0x9085, 0x0007, 0x0050,
+	0x2010, 0x8004, 0x8004, 0x8004, 0x9084, 0x0007, 0x9205, 0x8007,
+	0x9085, 0x0028, 0x9086, 0x0040, 0x2010, 0x00e6, 0x2071, 0x1800,
+	0x080c, 0x0f34, 0x00ee, 0x002e, 0x0005, 0x0016, 0x00c6, 0x2009,
+	0xfff4, 0x210d, 0x2061, 0x0100, 0x60f0, 0x9100, 0x60f3, 0x0000,
+	0x2009, 0xfff4, 0x200f, 0x1220, 0x8108, 0x2105, 0x8000, 0x200f,
+	0x00ce, 0x001e, 0x0005, 0x00c6, 0x2061, 0x1a6e, 0x00ce, 0x0005,
+	0x9184, 0x000f, 0x8003, 0x8003, 0x8003, 0x9080, 0x1a6e, 0x2060,
+	0x0005, 0xa884, 0x908a, 0x199a, 0x1638, 0x9005, 0x1150, 0x00c6,
+	0x2061, 0x1a6e, 0x6014, 0x00ce, 0x9005, 0x1130, 0x2001, 0x001e,
+	0x0018, 0x908e, 0xffff, 0x01b0, 0x8003, 0x800b, 0x810b, 0x9108,
+	0x611a, 0xa87c, 0x908c, 0x00c0, 0x918e, 0x00c0, 0x0904, 0x8923,
+	0xd0b4, 0x1168, 0xd0bc, 0x1904, 0x88fc, 0x2009, 0x0006, 0x080c,
+	0x8950, 0x0005, 0x900e, 0x0c60, 0x2001, 0x1999, 0x08b0, 0xd0fc,
+	0x05e0, 0x908c, 0x2023, 0x1568, 0x87ff, 0x1558, 0xa9a8, 0x81ff,
+	0x1540, 0x6124, 0x918c, 0x0500, 0x1520, 0x6100, 0x918e, 0x0007,
+	0x1500, 0x2009, 0x1869, 0x210c, 0xd184, 0x11d8, 0x6003, 0x0003,
+	0x6007, 0x0043, 0x6047, 0xb035, 0x080c, 0x1c59, 0xa87c, 0xc0dd,
+	0xa87e, 0x600f, 0x0000, 0x00f6, 0x2079, 0x0380, 0x7818, 0xd0bc,
+	0x1de8, 0x7833, 0x0013, 0x2c00, 0x7836, 0x781b, 0x8080, 0x00fe,
+	0x0005, 0x908c, 0x0003, 0x0120, 0x918e, 0x0003, 0x1904, 0x894a,
+	0x908c, 0x2020, 0x918e, 0x2020, 0x01a8, 0x6024, 0xd0d4, 0x11e8,
+	0x2009, 0x1869, 0x2104, 0xd084, 0x1138, 0x87ff, 0x1120, 0x2009,
+	0x0043, 0x0804, 0xad4d, 0x0005, 0x87ff, 0x1de8, 0x2009, 0x0042,
+	0x0804, 0xad4d, 0x6110, 0x00b6, 0x2158, 0xb900, 0x00be, 0xd1ac,
+	0x0d20, 0x6024, 0xc0cd, 0x6026, 0x0c00, 0xc0d4, 0x6026, 0xa890,
+	0x602e, 0xa88c, 0x6032, 0x08e0, 0xd0fc, 0x0160, 0x908c, 0x0003,
+	0x0120, 0x918e, 0x0003, 0x1904, 0x894a, 0x908c, 0x2020, 0x918e,
+	0x2020, 0x0170, 0x0076, 0x00f6, 0x2c78, 0x080c, 0x1778, 0x00fe,
+	0x007e, 0x87ff, 0x1120, 0x2009, 0x0042, 0x080c, 0xad4d, 0x0005,
+	0x6110, 0x00b6, 0x2158, 0xb900, 0x00be, 0xd1ac, 0x0d58, 0x6124,
+	0xc1cd, 0x6126, 0x0c38, 0xd0fc, 0x0188, 0x908c, 0x2020, 0x918e,
+	0x2020, 0x01a8, 0x9084, 0x0003, 0x908e, 0x0002, 0x0148, 0x87ff,
+	0x1120, 0x2009, 0x0041, 0x080c, 0xad4d, 0x0005, 0x00b9, 0x0ce8,
+	0x87ff, 0x1dd8, 0x2009, 0x0043, 0x080c, 0xad4d, 0x0cb0, 0x6110,
+	0x00b6, 0x2158, 0xb900, 0x00be, 0xd1ac, 0x0d20, 0x6124, 0xc1cd,
+	0x6126, 0x0c00, 0x2009, 0x0004, 0x0019, 0x0005, 0x2009, 0x0001,
+	0x0096, 0x080c, 0xc97a, 0x0518, 0x6014, 0x2048, 0xa982, 0xa800,
+	0x6016, 0x9186, 0x0001, 0x1188, 0xa97c, 0x918c, 0x8100, 0x918e,
+	0x8100, 0x1158, 0x00c6, 0x2061, 0x1a6e, 0x6200, 0xd28c, 0x1120,
+	0x6204, 0x8210, 0x0208, 0x6206, 0x00ce, 0x080c, 0x6c23, 0x6014,
+	0x904d, 0x0076, 0x2039, 0x0000, 0x190c, 0x8869, 0x007e, 0x009e,
+	0x0005, 0x0156, 0x00c6, 0x2061, 0x1a6e, 0x6000, 0x81ff, 0x0110,
+	0x9205, 0x0008, 0x9204, 0x6002, 0x00ce, 0x015e, 0x0005, 0x6800,
+	0xd08c, 0x1138, 0x6808, 0x9005, 0x0120, 0x8001, 0x680a, 0x9085,
+	0x0001, 0x0005, 0x2071, 0x1923, 0x7003, 0x0006, 0x7007, 0x0000,
+	0x700f, 0x0000, 0x7013, 0x0001, 0x080c, 0x1060, 0x090c, 0x0d7d,
+	0xa867, 0x0006, 0xa86b, 0x0001, 0xa8ab, 0xdcb0, 0xa89f, 0x0000,
+	0x2900, 0x702e, 0x7033, 0x0000, 0x0005, 0x0096, 0x00e6, 0x2071,
+	0x1923, 0x702c, 0x2048, 0x6a2c, 0x721e, 0x6b30, 0x7322, 0x6834,
+	0x7026, 0xa896, 0x6838, 0x702a, 0xa89a, 0x6824, 0x7016, 0x683c,
+	0x701a, 0x2009, 0x0028, 0x200a, 0x9005, 0x0148, 0x900e, 0x9188,
+	0x000c, 0x8001, 0x1de0, 0x2100, 0x9210, 0x1208, 0x8318, 0xaa8e,
+	0xab92, 0x7010, 0xd084, 0x0168, 0xc084, 0x7007, 0x0001, 0x700f,
+	0x0000, 0x0006, 0x2009, 0x1b50, 0x2104, 0x9082, 0x0007, 0x200a,
+	0x000e, 0xc095, 0x7012, 0x2008, 0x2001, 0x003b, 0x080c, 0x16a0,
+	0x9006, 0x2071, 0x193c, 0x7002, 0x7006, 0x702a, 0x00ee, 0x009e,
+	0x0005, 0x2009, 0x1b50, 0x2104, 0x9080, 0x0007, 0x200a, 0x0005,
+	0x00e6, 0x0126, 0x0156, 0x2091, 0x8000, 0x2071, 0x1800, 0x7154,
+	0x2001, 0x0008, 0x910a, 0x0638, 0x2001, 0x187d, 0x20ac, 0x9006,
+	0x9080, 0x0008, 0x1f04, 0x8a08, 0x71c0, 0x9102, 0x02e0, 0x2071,
+	0x1877, 0x20a9, 0x0007, 0x00c6, 0x080c, 0xac5a, 0x6023, 0x0009,
+	0x6003, 0x0004, 0x601f, 0x0101, 0x0089, 0x0126, 0x2091, 0x8000,
+	0x080c, 0x8b89, 0x012e, 0x1f04, 0x8a14, 0x9006, 0x00ce, 0x015e,
+	0x012e, 0x00ee, 0x0005, 0x9085, 0x0001, 0x0cc8, 0x00e6, 0x00b6,
+	0x0096, 0x0086, 0x0056, 0x0046, 0x0026, 0x7118, 0x720c, 0x7620,
+	0x7004, 0xd084, 0x1128, 0x2021, 0x0024, 0x2029, 0x0002, 0x0020,
+	0x2021, 0x002c, 0x2029, 0x000a, 0x080c, 0x1047, 0x090c, 0x0d7d,
+	0x2900, 0x6016, 0x2058, 0xac66, 0x9006, 0xa802, 0xa806, 0xa86a,
+	0xa87a, 0xa8aa, 0xa887, 0x0005, 0xa87f, 0x0020, 0x7008, 0xa89a,
+	0x7010, 0xa89e, 0xae8a, 0xa8af, 0xffff, 0xa8b3, 0x0000, 0x8109,
+	0x0160, 0x080c, 0x1047, 0x090c, 0x0d7d, 0xad66, 0x2b00, 0xa802,
+	0x2900, 0xb806, 0x2058, 0x8109, 0x1da0, 0x002e, 0x004e, 0x005e,
+	0x008e, 0x009e, 0x00be, 0x00ee, 0x0005, 0x2079, 0x0000, 0x2071,
+	0x1923, 0x7004, 0x004b, 0x700c, 0x0002, 0x8a80, 0x8a79, 0x8a79,
+	0x0005, 0x8a8a, 0x8ae0, 0x8ae0, 0x8ae0, 0x8ae1, 0x8af2, 0x8af2,
+	0x700c, 0x0cba, 0x0126, 0x2091, 0x8000, 0x78a0, 0x79a0, 0x9106,
+	0x1904, 0x8ad2, 0x7814, 0xd0bc, 0x1904, 0x8adb, 0x012e, 0x7018,
+	0x910a, 0x1128, 0x7030, 0x9005, 0x1904, 0x8b24, 0x0005, 0x1210,
 	0x7114, 0x910a, 0x9192, 0x000a, 0x0210, 0x2009, 0x000a, 0x2001,
-	0x1888, 0x2014, 0x2001, 0x1935, 0x2004, 0x9100, 0x9202, 0x0e48,
-	0x080c, 0x8bff, 0x2200, 0x9102, 0x0208, 0x2208, 0x0096, 0x702c,
-	0x2048, 0xa873, 0x0001, 0xa976, 0x080c, 0x8d08, 0x2100, 0xa87e,
+	0x1888, 0x2014, 0x2001, 0x1935, 0x2004, 0x9100, 0x9202, 0x0e50,
+	0x080c, 0x8c7d, 0x2200, 0x9102, 0x0208, 0x2208, 0x0096, 0x702c,
+	0x2048, 0xa873, 0x0001, 0xa976, 0x080c, 0x8d86, 0x2100, 0xa87e,
 	0xa86f, 0x0000, 0x009e, 0x0126, 0x2091, 0x8000, 0x2009, 0x1a20,
 	0x2104, 0xc085, 0x200a, 0x700f, 0x0002, 0x012e, 0x080c, 0x115b,
-	0x1de8, 0x0005, 0x2001, 0x0005, 0x2004, 0xd0bc, 0x0130, 0x2011,
-	0x0004, 0x2204, 0xc0c5, 0x2012, 0x0ca8, 0x012e, 0x0005, 0x0005,
-	0x700c, 0x0002, 0x8a75, 0x8a78, 0x8a77, 0x080c, 0x8a0c, 0x0005,
-	0x8001, 0x700e, 0x0096, 0x702c, 0x2048, 0xa974, 0x009e, 0x0011,
-	0x0ca0, 0x0005, 0x0096, 0x702c, 0x2048, 0x7018, 0x9100, 0x7214,
-	0x921a, 0x1130, 0x701c, 0xa88e, 0x7020, 0xa892, 0x9006, 0x0068,
-	0x0006, 0x080c, 0x8d08, 0x2100, 0xaa8c, 0x9210, 0xaa8e, 0x1220,
-	0xa890, 0x9081, 0x0000, 0xa892, 0x000e, 0x009e, 0x2f08, 0x9188,
-	0x0028, 0x200a, 0x701a, 0x0005, 0x00e6, 0x2071, 0x1923, 0x700c,
-	0x0002, 0x8aae, 0x8aae, 0x8aac, 0x700f, 0x0001, 0x00ee, 0x0005,
-	0x0126, 0x2091, 0x8000, 0x7030, 0x9005, 0x0508, 0x2078, 0x7814,
-	0x2048, 0xae88, 0x00b6, 0x2059, 0x0000, 0x080c, 0x8b1e, 0x00be,
-	0x01b0, 0x00e6, 0x2071, 0x193c, 0x080c, 0x8b65, 0x00ee, 0x0178,
-	0x0096, 0x080c, 0x1060, 0x2900, 0x009e, 0x0148, 0xa8aa, 0x04d1,
-	0x0041, 0x2001, 0x1946, 0x2003, 0x0000, 0x012e, 0x08c8, 0x012e,
-	0x0005, 0x00d6, 0x00c6, 0x0086, 0x00a6, 0x2940, 0x2650, 0x2600,
-	0x9005, 0x0180, 0xa864, 0x9084, 0x000f, 0x2068, 0x9d88, 0x1e7a,
-	0x2165, 0x0056, 0x2029, 0x0000, 0x080c, 0x8c8d, 0x080c, 0x1e50,
-	0x1dd8, 0x005e, 0x00ae, 0x2001, 0x187f, 0x2004, 0xa88a, 0x00c6,
-	0x2f60, 0x080c, 0x174b, 0x00ce, 0x781f, 0x0101, 0x7813, 0x0000,
-	0x0126, 0x2091, 0x8000, 0x080c, 0x8b74, 0x012e, 0x008e, 0x00ce,
-	0x00de, 0x0005, 0x7030, 0x9005, 0x0138, 0x2078, 0x780c, 0x7032,
-	0x2001, 0x1946, 0x2003, 0x0001, 0x0005, 0x00e6, 0x2071, 0x1923,
-	0x7030, 0x600e, 0x2c00, 0x7032, 0x00ee, 0x0005, 0x00d6, 0x00c6,
-	0x0026, 0x9b80, 0x8de7, 0x2005, 0x906d, 0x090c, 0x0d7d, 0x9b80,
-	0x8ddf, 0x2005, 0x9065, 0x090c, 0x0d7d, 0x6114, 0x2600, 0x9102,
-	0x0248, 0x6828, 0x9102, 0x02f0, 0x9085, 0x0001, 0x002e, 0x00ce,
-	0x00de, 0x0005, 0x6804, 0xd094, 0x0148, 0x6854, 0xd084, 0x1178,
-	0xc085, 0x6856, 0x2011, 0x8026, 0x080c, 0x4b29, 0x684c, 0x0096,
-	0x904d, 0x090c, 0x0d7d, 0xa804, 0x8000, 0xa806, 0x009e, 0x9006,
-	0x2030, 0x0c20, 0x6854, 0xd08c, 0x1d08, 0xc08d, 0x6856, 0x2011,
-	0x8025, 0x080c, 0x4b29, 0x684c, 0x0096, 0x904d, 0x090c, 0x0d7d,
-	0xa800, 0x8000, 0xa802, 0x009e, 0x0888, 0x7000, 0x2019, 0x0008,
-	0x8319, 0x7104, 0x9102, 0x1118, 0x2300, 0x9005, 0x0020, 0x0210,
-	0x9302, 0x0008, 0x8002, 0x0005, 0x00d6, 0x7814, 0x9005, 0x090c,
-	0x0d7d, 0x781c, 0x9084, 0x0101, 0x9086, 0x0101, 0x190c, 0x0d7d,
-	0x2069, 0x193c, 0x6804, 0x9080, 0x193e, 0x2f08, 0x2102, 0x6904,
-	0x8108, 0x9182, 0x0008, 0x0208, 0x900e, 0x6906, 0x9180, 0x193e,
-	0x2003, 0x0000, 0x00de, 0x0005, 0x0096, 0x00c6, 0x2060, 0x6014,
-	0x2048, 0xa8a8, 0x0096, 0x2048, 0x9005, 0x190c, 0x1079, 0x009e,
-	0xa8ab, 0x0000, 0x080c, 0x0ff9, 0x080c, 0xabf0, 0x00ce, 0x009e,
-	0x0005, 0x6020, 0x9086, 0x0009, 0x1128, 0x601c, 0xd0c4, 0x0110,
-	0x9006, 0x0005, 0x9085, 0x0001, 0x0005, 0x6000, 0x9086, 0x0000,
-	0x0178, 0x6010, 0x9005, 0x0150, 0x00b6, 0x2058, 0x080c, 0x8f1c,
-	0x00be, 0x6013, 0x0000, 0x601b, 0x0000, 0x0010, 0x2c00, 0x0861,
-	0x0005, 0x2009, 0x1927, 0x210c, 0xd194, 0x0005, 0x00e6, 0x2071,
-	0x1923, 0x7110, 0xc194, 0xd19c, 0x1118, 0xc185, 0x7007, 0x0000,
-	0x7112, 0x2001, 0x003b, 0x080c, 0x1693, 0x00ee, 0x0005, 0x0096,
-	0x00d6, 0x9006, 0x7006, 0x700e, 0x701a, 0x701e, 0x7022, 0x7016,
-	0x702a, 0x7026, 0x702f, 0x0000, 0x080c, 0x8d67, 0x0170, 0x080c,
-	0x8d9c, 0x0158, 0x2900, 0x7002, 0x700a, 0x701a, 0x7013, 0x0001,
-	0x701f, 0x000a, 0x00de, 0x009e, 0x0005, 0x900e, 0x0cd8, 0x00e6,
-	0x0096, 0x0086, 0x00d6, 0x00c6, 0x2071, 0x1930, 0x721c, 0x2100,
-	0x9202, 0x1618, 0x080c, 0x8d9c, 0x090c, 0x0d7d, 0x7018, 0x9005,
-	0x1160, 0x2900, 0x7002, 0x700a, 0x701a, 0x9006, 0x7006, 0x700e,
-	0xa806, 0xa802, 0x7012, 0x701e, 0x0038, 0x2040, 0xa806, 0x2900,
-	0xa002, 0x701a, 0xa803, 0x0000, 0x7010, 0x8000, 0x7012, 0x701c,
-	0x9080, 0x000a, 0x701e, 0x721c, 0x08d0, 0x721c, 0x00ce, 0x00de,
-	0x008e, 0x009e, 0x00ee, 0x0005, 0x0096, 0x0156, 0x0136, 0x0146,
-	0x00e6, 0x0126, 0x2091, 0x8000, 0x2071, 0x1930, 0x7300, 0x831f,
-	0x831e, 0x831e, 0x9384, 0x003f, 0x20e8, 0x939c, 0xffc0, 0x9398,
-	0x0003, 0x7104, 0x080c, 0x8d08, 0x810c, 0x2100, 0x9318, 0x8003,
-	0x2228, 0x2021, 0x0078, 0x9402, 0x9532, 0x0208, 0x2028, 0x2500,
-	0x8004, 0x20a8, 0x23a0, 0xa001, 0xa001, 0x4005, 0x2508, 0x080c,
-	0x8d11, 0x2130, 0x7014, 0x9600, 0x7016, 0x2600, 0x711c, 0x9102,
-	0x701e, 0x7004, 0x9600, 0x2008, 0x9082, 0x000a, 0x1190, 0x7000,
-	0x2048, 0xa800, 0x9005, 0x1148, 0x2009, 0x0001, 0x0026, 0x080c,
-	0x8bff, 0x002e, 0x7000, 0x2048, 0xa800, 0x7002, 0x7007, 0x0000,
-	0x0008, 0x7106, 0x2500, 0x9212, 0x1904, 0x8c3e, 0x012e, 0x00ee,
-	0x014e, 0x013e, 0x015e, 0x009e, 0x0005, 0x0016, 0x0026, 0x00e6,
-	0x0126, 0x2091, 0x8000, 0x9580, 0x8ddf, 0x2005, 0x9075, 0x090c,
-	0x0d7d, 0x080c, 0x8ce3, 0x012e, 0x9580, 0x8ddb, 0x2005, 0x9075,
-	0x090c, 0x0d7d, 0x0156, 0x0136, 0x01c6, 0x0146, 0x01d6, 0x831f,
-	0x831e, 0x831e, 0x9384, 0x003f, 0x20e0, 0x9384, 0xffc0, 0x9100,
-	0x2098, 0xa860, 0x20e8, 0xa95c, 0x2c05, 0x9100, 0x20a0, 0x20a9,
-	0x0002, 0x4003, 0x2e0c, 0x2d00, 0x0002, 0x8ccd, 0x8ccd, 0x8ccf,
-	0x8ccd, 0x8ccf, 0x8ccd, 0x8ccd, 0x8ccd, 0x8ccd, 0x8ccd, 0x8cd5,
-	0x8ccd, 0x8cd5, 0x8ccd, 0x8ccd, 0x8ccd, 0x080c, 0x0d7d, 0x4104,
-	0x20a9, 0x0002, 0x4002, 0x4003, 0x0028, 0x20a9, 0x0002, 0x4003,
-	0x4104, 0x4003, 0x01de, 0x014e, 0x01ce, 0x013e, 0x015e, 0x00ee,
-	0x002e, 0x001e, 0x0005, 0x0096, 0x7014, 0x8001, 0x7016, 0x710c,
-	0x2110, 0x00f1, 0x810c, 0x9188, 0x0003, 0x7308, 0x8210, 0x9282,
-	0x000a, 0x1198, 0x7008, 0x2048, 0xa800, 0x9005, 0x0158, 0x0006,
-	0x080c, 0x8dab, 0x009e, 0xa807, 0x0000, 0x2900, 0x700a, 0x7010,
-	0x8001, 0x7012, 0x700f, 0x0000, 0x0008, 0x720e, 0x009e, 0x0005,
-	0x0006, 0x810b, 0x810b, 0x2100, 0x810b, 0x9100, 0x2008, 0x000e,
-	0x0005, 0x0006, 0x0026, 0x2100, 0x9005, 0x0158, 0x9092, 0x000c,
-	0x0240, 0x900e, 0x8108, 0x9082, 0x000c, 0x1de0, 0x002e, 0x000e,
-	0x0005, 0x900e, 0x0cd8, 0x2d00, 0x90b8, 0x0008, 0x690c, 0x6810,
-	0x2019, 0x0001, 0x2031, 0x8d51, 0x9112, 0x0220, 0x0118, 0x8318,
-	0x2208, 0x0cd0, 0x6808, 0x9005, 0x0108, 0x8318, 0x233a, 0x6804,
-	0xd084, 0x2300, 0x2021, 0x0001, 0x1150, 0x9082, 0x0003, 0x0967,
-	0x0a67, 0x8420, 0x9082, 0x0007, 0x0967, 0x0a67, 0x0cd0, 0x9082,
-	0x0002, 0x0967, 0x0a67, 0x8420, 0x9082, 0x0005, 0x0967, 0x0a67,
-	0x0cd0, 0x6c1a, 0x2d00, 0x90b8, 0x0007, 0x00e6, 0x2071, 0x1800,
-	0x7128, 0x6810, 0x2019, 0x0001, 0x910a, 0x0118, 0x0210, 0x8318,
-	0x0cd8, 0x2031, 0x8d64, 0x0870, 0x6c16, 0x00ee, 0x0005, 0x0096,
-	0x0046, 0x0126, 0x2091, 0x8000, 0x2b00, 0x9080, 0x8de3, 0x2005,
-	0x9005, 0x090c, 0x0d7d, 0x2004, 0x90a0, 0x000a, 0x080c, 0x1060,
-	0x01d0, 0x2900, 0x7026, 0xa803, 0x0000, 0xa807, 0x0000, 0x080c,
-	0x1060, 0x0188, 0x7024, 0xa802, 0xa807, 0x0000, 0x2900, 0x7026,
-	0x94a2, 0x000a, 0x0110, 0x0208, 0x0c90, 0x9085, 0x0001, 0x012e,
-	0x004e, 0x009e, 0x0005, 0x7024, 0x9005, 0x0dc8, 0x2048, 0xac00,
-	0x080c, 0x1079, 0x2400, 0x0cc0, 0x0126, 0x2091, 0x8000, 0x7024,
-	0x2048, 0x9005, 0x0130, 0xa800, 0x7026, 0xa803, 0x0000, 0xa807,
-	0x0000, 0x012e, 0x0005, 0x0126, 0x2091, 0x8000, 0x7024, 0xa802,
-	0x2900, 0x7026, 0x012e, 0x0005, 0x0096, 0x9e80, 0x0009, 0x2004,
-	0x9005, 0x0138, 0x2048, 0xa800, 0x0006, 0x080c, 0x1079, 0x000e,
-	0x0cb8, 0x009e, 0x0005, 0x0096, 0x7008, 0x9005, 0x0138, 0x2048,
-	0xa800, 0x0006, 0x080c, 0x1079, 0x000e, 0x0cb8, 0x9006, 0x7002,
-	0x700a, 0x7006, 0x700e, 0x701a, 0x701e, 0x7022, 0x702a, 0x7026,
-	0x702e, 0x009e, 0x0005, 0x1a6c, 0x0000, 0x0000, 0x0000, 0x1930,
-	0x0000, 0x0000, 0x0000, 0x1888, 0x0000, 0x0000, 0x0000, 0x1877,
-	0x0000, 0x0000, 0x0000, 0x00e6, 0x00c6, 0x00b6, 0x00a6, 0xa8a8,
-	0x2040, 0x2071, 0x1877, 0x080c, 0x8f07, 0xa067, 0x0023, 0x6010,
-	0x905d, 0x0904, 0x8edc, 0xb814, 0xa06e, 0xb910, 0xa172, 0xb9a0,
-	0xa176, 0x2001, 0x0003, 0xa07e, 0xa834, 0xa082, 0xa07b, 0x0000,
-	0xa898, 0x9005, 0x0118, 0xa078, 0xc085, 0xa07a, 0x2858, 0x2031,
-	0x0018, 0xa068, 0x908a, 0x0019, 0x1a0c, 0x0d7d, 0x2020, 0x2050,
-	0x2940, 0xa864, 0x90bc, 0x00ff, 0x908c, 0x000f, 0x91e0, 0x1e7a,
-	0x2c65, 0x9786, 0x0024, 0x2c05, 0x1590, 0x908a, 0x0036, 0x1a0c,
-	0x0d7d, 0x9082, 0x001b, 0x0002, 0x8e47, 0x8e47, 0x8e49, 0x8e47,
-	0x8e47, 0x8e47, 0x8e4b, 0x8e47, 0x8e47, 0x8e47, 0x8e4d, 0x8e47,
-	0x8e47, 0x8e47, 0x8e4f, 0x8e47, 0x8e47, 0x8e47, 0x8e51, 0x8e47,
-	0x8e47, 0x8e47, 0x8e53, 0x8e47, 0x8e47, 0x8e47, 0x8e55, 0x080c,
-	0x0d7d, 0xa180, 0x04b8, 0xa190, 0x04a8, 0xa1a0, 0x0498, 0xa1b0,
-	0x0488, 0xa1c0, 0x0478, 0xa1d0, 0x0468, 0xa1e0, 0x0458, 0x908a,
-	0x0034, 0x1a0c, 0x0d7d, 0x9082, 0x001b, 0x0002, 0x8e79, 0x8e77,
-	0x8e77, 0x8e77, 0x8e77, 0x8e77, 0x8e7b, 0x8e77, 0x8e77, 0x8e77,
-	0x8e77, 0x8e77, 0x8e7d, 0x8e77, 0x8e77, 0x8e77, 0x8e77, 0x8e77,
-	0x8e7f, 0x8e77, 0x8e77, 0x8e77, 0x8e77, 0x8e77, 0x8e81, 0x080c,
-	0x0d7d, 0xa180, 0x0038, 0xa198, 0x0028, 0xa1b0, 0x0018, 0xa1c8,
-	0x0008, 0xa1e0, 0x2600, 0x0002, 0x8e9d, 0x8e9f, 0x8ea1, 0x8ea3,
-	0x8ea5, 0x8ea7, 0x8ea9, 0x8eab, 0x8ead, 0x8eaf, 0x8eb1, 0x8eb3,
-	0x8eb5, 0x8eb7, 0x8eb9, 0x8ebb, 0x8ebd, 0x8ebf, 0x8ec1, 0x8ec3,
-	0x8ec5, 0x8ec7, 0x8ec9, 0x8ecb, 0x8ecd, 0x080c, 0x0d7d, 0xb9e2,
-	0x0468, 0xb9de, 0x0458, 0xb9da, 0x0448, 0xb9d6, 0x0438, 0xb9d2,
-	0x0428, 0xb9ce, 0x0418, 0xb9ca, 0x0408, 0xb9c6, 0x00f8, 0xb9c2,
-	0x00e8, 0xb9be, 0x00d8, 0xb9ba, 0x00c8, 0xb9b6, 0x00b8, 0xb9b2,
-	0x00a8, 0xb9ae, 0x0098, 0xb9aa, 0x0088, 0xb9a6, 0x0078, 0xb9a2,
-	0x0068, 0xb99e, 0x0058, 0xb99a, 0x0048, 0xb996, 0x0038, 0xb992,
-	0x0028, 0xb98e, 0x0018, 0xb98a, 0x0008, 0xb986, 0x8631, 0x8421,
-	0x0130, 0x080c, 0x1e50, 0x090c, 0x0d7d, 0x0804, 0x8e21, 0x00ae,
-	0x00be, 0x00ce, 0x00ee, 0x0005, 0xa86c, 0xa06e, 0xa870, 0xa072,
-	0xa077, 0x00ff, 0x9006, 0x0804, 0x8e03, 0x0006, 0x0016, 0x00b6,
-	0x6010, 0x2058, 0xb810, 0x9005, 0x01b0, 0x2001, 0x1924, 0x2004,
-	0x9005, 0x0188, 0x2001, 0x1800, 0x2004, 0x9086, 0x0003, 0x1158,
-	0x0036, 0x0046, 0xbba0, 0x2021, 0x0004, 0x2011, 0x8014, 0x080c,
-	0x4b29, 0x004e, 0x003e, 0x00be, 0x001e, 0x000e, 0x0005, 0x9016,
-	0x710c, 0xa834, 0x910a, 0xa936, 0x7008, 0x9005, 0x0120, 0x8210,
-	0x910a, 0x0238, 0x0130, 0x7010, 0x8210, 0x910a, 0x0210, 0x0108,
-	0x0cd8, 0xaa8a, 0xa26a, 0x0005, 0x00f6, 0x00d6, 0x0036, 0x2079,
-	0x0300, 0x781b, 0x0200, 0x7818, 0xd094, 0x1dd8, 0x781b, 0x0202,
-	0xa001, 0xa001, 0x7818, 0xd094, 0x1da0, 0xb8ac, 0x9005, 0x01b8,
-	0x2068, 0x2079, 0x0000, 0x2c08, 0x911e, 0x1118, 0x680c, 0xb8ae,
-	0x0060, 0x9106, 0x0140, 0x2d00, 0x2078, 0x680c, 0x9005, 0x090c,
-	0x0d7d, 0x2068, 0x0cb0, 0x6b0c, 0x7b0e, 0x600f, 0x0000, 0x2079,
-	0x0300, 0x781b, 0x0200, 0x003e, 0x00de, 0x00fe, 0x0005, 0x00e6,
-	0x00d6, 0x0096, 0x00c6, 0x0036, 0x0126, 0x2091, 0x8000, 0x0156,
-	0x20a9, 0x01ff, 0x2071, 0x0300, 0x701b, 0x0200, 0x7018, 0xd094,
-	0x0110, 0x1f04, 0x8f5c, 0x701b, 0x0202, 0xa001, 0xa001, 0x7018,
-	0xd094, 0x1d90, 0xb8ac, 0x9005, 0x01d0, 0x2060, 0x600c, 0xb8ae,
+	0x1de8, 0x0005, 0x78a0, 0x79a0, 0x9106, 0x0904, 0x8a92, 0x080c,
+	0x8c55, 0x012e, 0x0005, 0x7810, 0xc0c5, 0x7812, 0x0804, 0x8a92,
+	0x0005, 0x700c, 0x0002, 0x8ae6, 0x8ae9, 0x8ae8, 0x080c, 0x8a88,
+	0x0005, 0x8001, 0x700e, 0x0096, 0x702c, 0x2048, 0xa974, 0x009e,
+	0x0011, 0x0ca0, 0x0005, 0x0096, 0x702c, 0x2048, 0x7018, 0x9100,
+	0x7214, 0x921a, 0x1130, 0x701c, 0xa88e, 0x7020, 0xa892, 0x9006,
+	0x0068, 0x0006, 0x080c, 0x8d86, 0x2100, 0xaa8c, 0x9210, 0xaa8e,
+	0x1220, 0xa890, 0x9081, 0x0000, 0xa892, 0x000e, 0x009e, 0x0126,
+	0x2091, 0x8000, 0x78a2, 0x701a, 0x080c, 0x8c55, 0x012e, 0x0005,
+	0x00e6, 0x2071, 0x1923, 0x700c, 0x0002, 0x8b22, 0x8b22, 0x8b20,
+	0x700f, 0x0001, 0x00ee, 0x0005, 0x0126, 0x2091, 0x8000, 0x7030,
+	0x9005, 0x0508, 0x2078, 0x7814, 0x2048, 0xae88, 0x00b6, 0x2059,
+	0x0000, 0x080c, 0x8b92, 0x00be, 0x01b0, 0x00e6, 0x2071, 0x193c,
+	0x080c, 0x8bd9, 0x00ee, 0x0178, 0x0096, 0x080c, 0x1060, 0x2900,
+	0x009e, 0x0148, 0xa8aa, 0x04d1, 0x0041, 0x2001, 0x1946, 0x2003,
+	0x0000, 0x012e, 0x08c8, 0x012e, 0x0005, 0x00d6, 0x00c6, 0x0086,
+	0x00a6, 0x2940, 0x2650, 0x2600, 0x9005, 0x0180, 0xa864, 0x9084,
+	0x000f, 0x2068, 0x9d88, 0x1eab, 0x2165, 0x0056, 0x2029, 0x0000,
+	0x080c, 0x8d0b, 0x080c, 0x1e81, 0x1dd8, 0x005e, 0x00ae, 0x2001,
+	0x187f, 0x2004, 0xa88a, 0x00c6, 0x2f60, 0x080c, 0x1778, 0x00ce,
+	0x781f, 0x0101, 0x7813, 0x0000, 0x0126, 0x2091, 0x8000, 0x080c,
+	0x8be8, 0x012e, 0x008e, 0x00ce, 0x00de, 0x0005, 0x7030, 0x9005,
+	0x0138, 0x2078, 0x780c, 0x7032, 0x2001, 0x1946, 0x2003, 0x0001,
+	0x0005, 0x00e6, 0x2071, 0x1923, 0x7030, 0x600e, 0x2c00, 0x7032,
+	0x00ee, 0x0005, 0x00d6, 0x00c6, 0x0026, 0x9b80, 0x8e54, 0x2005,
+	0x906d, 0x090c, 0x0d7d, 0x9b80, 0x8e4c, 0x2005, 0x9065, 0x090c,
+	0x0d7d, 0x6114, 0x2600, 0x9102, 0x0248, 0x6828, 0x9102, 0x02f0,
+	0x9085, 0x0001, 0x002e, 0x00ce, 0x00de, 0x0005, 0x6804, 0xd094,
+	0x0148, 0x6854, 0xd084, 0x1178, 0xc085, 0x6856, 0x2011, 0x8026,
+	0x080c, 0x4b52, 0x684c, 0x0096, 0x904d, 0x090c, 0x0d7d, 0xa804,
+	0x8000, 0xa806, 0x009e, 0x9006, 0x2030, 0x0c20, 0x6854, 0xd08c,
+	0x1d08, 0xc08d, 0x6856, 0x2011, 0x8025, 0x080c, 0x4b52, 0x684c,
+	0x0096, 0x904d, 0x090c, 0x0d7d, 0xa800, 0x8000, 0xa802, 0x009e,
+	0x0888, 0x7000, 0x2019, 0x0008, 0x8319, 0x7104, 0x9102, 0x1118,
+	0x2300, 0x9005, 0x0020, 0x0210, 0x9302, 0x0008, 0x8002, 0x0005,
+	0x00d6, 0x7814, 0x9005, 0x090c, 0x0d7d, 0x781c, 0x9084, 0x0101,
+	0x9086, 0x0101, 0x190c, 0x0d7d, 0x7827, 0x0000, 0x2069, 0x193c,
+	0x6804, 0x9080, 0x193e, 0x2f08, 0x2102, 0x6904, 0x8108, 0x9182,
+	0x0008, 0x0208, 0x900e, 0x6906, 0x9180, 0x193e, 0x2003, 0x0000,
+	0x00de, 0x0005, 0x0096, 0x00c6, 0x2060, 0x6014, 0x2048, 0xa8a8,
+	0x0096, 0x2048, 0x9005, 0x190c, 0x1079, 0x009e, 0xa8ab, 0x0000,
+	0x080c, 0x0ff9, 0x080c, 0xacb0, 0x00ce, 0x009e, 0x0005, 0x6020,
+	0x9086, 0x0009, 0x1128, 0x601c, 0xd0c4, 0x0110, 0x9006, 0x0005,
+	0x9085, 0x0001, 0x0005, 0x6000, 0x9086, 0x0000, 0x0178, 0x6010,
+	0x9005, 0x0150, 0x00b6, 0x2058, 0x080c, 0x8f89, 0x00be, 0x6013,
+	0x0000, 0x601b, 0x0000, 0x0010, 0x2c00, 0x0861, 0x0005, 0x2009,
+	0x1927, 0x210c, 0xd194, 0x0005, 0x00e6, 0x2071, 0x1923, 0x7110,
+	0xc194, 0xd19c, 0x1118, 0xc185, 0x7007, 0x0000, 0x7112, 0x2001,
+	0x003b, 0x080c, 0x16a0, 0x00ee, 0x0005, 0x7814, 0xd0bc, 0x1108,
+	0x0005, 0x7810, 0xc0c5, 0x7812, 0x0cc0, 0x0096, 0x00d6, 0x9006,
+	0x7006, 0x700e, 0x701a, 0x701e, 0x7022, 0x7016, 0x702a, 0x7026,
+	0x702f, 0x0000, 0x080c, 0x8dd4, 0x0170, 0x080c, 0x8e09, 0x0158,
+	0x2900, 0x7002, 0x700a, 0x701a, 0x7013, 0x0001, 0x701f, 0x000a,
+	0x00de, 0x009e, 0x0005, 0x900e, 0x0cd8, 0x00e6, 0x0096, 0x0086,
+	0x00d6, 0x00c6, 0x2071, 0x1930, 0x721c, 0x2100, 0x9202, 0x1618,
+	0x080c, 0x8e09, 0x090c, 0x0d7d, 0x7018, 0x9005, 0x1160, 0x2900,
+	0x7002, 0x700a, 0x701a, 0x9006, 0x7006, 0x700e, 0xa806, 0xa802,
+	0x7012, 0x701e, 0x0038, 0x2040, 0xa806, 0x2900, 0xa002, 0x701a,
+	0xa803, 0x0000, 0x7010, 0x8000, 0x7012, 0x701c, 0x9080, 0x000a,
+	0x701e, 0x721c, 0x08d0, 0x721c, 0x00ce, 0x00de, 0x008e, 0x009e,
+	0x00ee, 0x0005, 0x0096, 0x0156, 0x0136, 0x0146, 0x00e6, 0x0126,
+	0x2091, 0x8000, 0x2071, 0x1930, 0x7300, 0x831f, 0x831e, 0x831e,
+	0x9384, 0x003f, 0x20e8, 0x939c, 0xffc0, 0x9398, 0x0003, 0x7104,
+	0x080c, 0x8d86, 0x810c, 0x2100, 0x9318, 0x8003, 0x2228, 0x2021,
+	0x0078, 0x9402, 0x9532, 0x0208, 0x2028, 0x2500, 0x8004, 0x20a8,
+	0x23a0, 0xa001, 0xa001, 0x4005, 0x2508, 0x080c, 0x8d8f, 0x2130,
+	0x7014, 0x9600, 0x7016, 0x2600, 0x711c, 0x9102, 0x701e, 0x7004,
+	0x9600, 0x2008, 0x9082, 0x000a, 0x1190, 0x7000, 0x2048, 0xa800,
+	0x9005, 0x1148, 0x2009, 0x0001, 0x0026, 0x080c, 0x8c7d, 0x002e,
+	0x7000, 0x2048, 0xa800, 0x7002, 0x7007, 0x0000, 0x0008, 0x7106,
+	0x2500, 0x9212, 0x1904, 0x8cbc, 0x012e, 0x00ee, 0x014e, 0x013e,
+	0x015e, 0x009e, 0x0005, 0x0016, 0x0026, 0x00e6, 0x0126, 0x2091,
+	0x8000, 0x9580, 0x8e4c, 0x2005, 0x9075, 0x090c, 0x0d7d, 0x080c,
+	0x8d61, 0x012e, 0x9580, 0x8e48, 0x2005, 0x9075, 0x090c, 0x0d7d,
+	0x0156, 0x0136, 0x01c6, 0x0146, 0x01d6, 0x831f, 0x831e, 0x831e,
+	0x9384, 0x003f, 0x20e0, 0x9384, 0xffc0, 0x9100, 0x2098, 0xa860,
+	0x20e8, 0xa95c, 0x2c05, 0x9100, 0x20a0, 0x20a9, 0x0002, 0x4003,
+	0x2e0c, 0x2d00, 0x0002, 0x8d4b, 0x8d4b, 0x8d4d, 0x8d4b, 0x8d4d,
+	0x8d4b, 0x8d4b, 0x8d4b, 0x8d4b, 0x8d4b, 0x8d53, 0x8d4b, 0x8d53,
+	0x8d4b, 0x8d4b, 0x8d4b, 0x080c, 0x0d7d, 0x4104, 0x20a9, 0x0002,
+	0x4002, 0x4003, 0x0028, 0x20a9, 0x0002, 0x4003, 0x4104, 0x4003,
+	0x01de, 0x014e, 0x01ce, 0x013e, 0x015e, 0x00ee, 0x002e, 0x001e,
+	0x0005, 0x0096, 0x7014, 0x8001, 0x7016, 0x710c, 0x2110, 0x00f1,
+	0x810c, 0x9188, 0x0003, 0x7308, 0x8210, 0x9282, 0x000a, 0x1198,
+	0x7008, 0x2048, 0xa800, 0x9005, 0x0158, 0x0006, 0x080c, 0x8e18,
+	0x009e, 0xa807, 0x0000, 0x2900, 0x700a, 0x7010, 0x8001, 0x7012,
+	0x700f, 0x0000, 0x0008, 0x720e, 0x009e, 0x0005, 0x0006, 0x810b,
+	0x810b, 0x2100, 0x810b, 0x9100, 0x2008, 0x000e, 0x0005, 0x0006,
+	0x0026, 0x2100, 0x9005, 0x0158, 0x9092, 0x000c, 0x0240, 0x900e,
+	0x8108, 0x9082, 0x000c, 0x1de0, 0x002e, 0x000e, 0x0005, 0x900e,
+	0x0cd8, 0x2d00, 0x90b8, 0x0008, 0x2031, 0x8dd2, 0x901e, 0x6808,
+	0x9005, 0x0108, 0x8318, 0x690c, 0x910a, 0x0248, 0x0140, 0x8318,
+	0x6810, 0x9112, 0x0220, 0x0118, 0x8318, 0x2208, 0x0cd0, 0x233a,
+	0x6804, 0xd084, 0x2300, 0x2021, 0x0001, 0x1150, 0x9082, 0x0003,
+	0x0967, 0x0a67, 0x8420, 0x9082, 0x0007, 0x0967, 0x0a67, 0x0cd0,
+	0x9082, 0x0002, 0x0967, 0x0a67, 0x8420, 0x9082, 0x0005, 0x0967,
+	0x0a67, 0x0cd0, 0x6c1a, 0x0005, 0x0096, 0x0046, 0x0126, 0x2091,
+	0x8000, 0x2b00, 0x9080, 0x8e50, 0x2005, 0x9005, 0x090c, 0x0d7d,
+	0x2004, 0x90a0, 0x000a, 0x080c, 0x1060, 0x01d0, 0x2900, 0x7026,
+	0xa803, 0x0000, 0xa807, 0x0000, 0x080c, 0x1060, 0x0188, 0x7024,
+	0xa802, 0xa807, 0x0000, 0x2900, 0x7026, 0x94a2, 0x000a, 0x0110,
+	0x0208, 0x0c90, 0x9085, 0x0001, 0x012e, 0x004e, 0x009e, 0x0005,
+	0x7024, 0x9005, 0x0dc8, 0x2048, 0xac00, 0x080c, 0x1079, 0x2400,
+	0x0cc0, 0x0126, 0x2091, 0x8000, 0x7024, 0x2048, 0x9005, 0x0130,
+	0xa800, 0x7026, 0xa803, 0x0000, 0xa807, 0x0000, 0x012e, 0x0005,
+	0x0126, 0x2091, 0x8000, 0x7024, 0xa802, 0x2900, 0x7026, 0x012e,
+	0x0005, 0x0096, 0x9e80, 0x0009, 0x2004, 0x9005, 0x0138, 0x2048,
+	0xa800, 0x0006, 0x080c, 0x1079, 0x000e, 0x0cb8, 0x009e, 0x0005,
+	0x0096, 0x7008, 0x9005, 0x0138, 0x2048, 0xa800, 0x0006, 0x080c,
+	0x1079, 0x000e, 0x0cb8, 0x9006, 0x7002, 0x700a, 0x7006, 0x700e,
+	0x701a, 0x701e, 0x7022, 0x702a, 0x7026, 0x702e, 0x009e, 0x0005,
+	0x1a6c, 0x0000, 0x0000, 0x0000, 0x1930, 0x0000, 0x0000, 0x0000,
+	0x1888, 0x0000, 0x0000, 0x0000, 0x1877, 0x0000, 0x0000, 0x0000,
+	0x00e6, 0x00c6, 0x00b6, 0x00a6, 0xa8a8, 0x2040, 0x2071, 0x1877,
+	0x080c, 0x8f74, 0xa067, 0x0023, 0x6010, 0x905d, 0x0904, 0x8f49,
+	0xb814, 0xa06e, 0xb910, 0xa172, 0xb9a0, 0xa176, 0x2001, 0x0003,
+	0xa07e, 0xa834, 0xa082, 0xa07b, 0x0000, 0xa898, 0x9005, 0x0118,
+	0xa078, 0xc085, 0xa07a, 0x2858, 0x2031, 0x0018, 0xa068, 0x908a,
+	0x0019, 0x1a0c, 0x0d7d, 0x2020, 0x2050, 0x2940, 0xa864, 0x90bc,
+	0x00ff, 0x908c, 0x000f, 0x91e0, 0x1eab, 0x2c65, 0x9786, 0x0024,
+	0x2c05, 0x1590, 0x908a, 0x0036, 0x1a0c, 0x0d7d, 0x9082, 0x001b,
+	0x0002, 0x8eb4, 0x8eb4, 0x8eb6, 0x8eb4, 0x8eb4, 0x8eb4, 0x8eb8,
+	0x8eb4, 0x8eb4, 0x8eb4, 0x8eba, 0x8eb4, 0x8eb4, 0x8eb4, 0x8ebc,
+	0x8eb4, 0x8eb4, 0x8eb4, 0x8ebe, 0x8eb4, 0x8eb4, 0x8eb4, 0x8ec0,
+	0x8eb4, 0x8eb4, 0x8eb4, 0x8ec2, 0x080c, 0x0d7d, 0xa180, 0x04b8,
+	0xa190, 0x04a8, 0xa1a0, 0x0498, 0xa1b0, 0x0488, 0xa1c0, 0x0478,
+	0xa1d0, 0x0468, 0xa1e0, 0x0458, 0x908a, 0x0034, 0x1a0c, 0x0d7d,
+	0x9082, 0x001b, 0x0002, 0x8ee6, 0x8ee4, 0x8ee4, 0x8ee4, 0x8ee4,
+	0x8ee4, 0x8ee8, 0x8ee4, 0x8ee4, 0x8ee4, 0x8ee4, 0x8ee4, 0x8eea,
+	0x8ee4, 0x8ee4, 0x8ee4, 0x8ee4, 0x8ee4, 0x8eec, 0x8ee4, 0x8ee4,
+	0x8ee4, 0x8ee4, 0x8ee4, 0x8eee, 0x080c, 0x0d7d, 0xa180, 0x0038,
+	0xa198, 0x0028, 0xa1b0, 0x0018, 0xa1c8, 0x0008, 0xa1e0, 0x2600,
+	0x0002, 0x8f0a, 0x8f0c, 0x8f0e, 0x8f10, 0x8f12, 0x8f14, 0x8f16,
+	0x8f18, 0x8f1a, 0x8f1c, 0x8f1e, 0x8f20, 0x8f22, 0x8f24, 0x8f26,
+	0x8f28, 0x8f2a, 0x8f2c, 0x8f2e, 0x8f30, 0x8f32, 0x8f34, 0x8f36,
+	0x8f38, 0x8f3a, 0x080c, 0x0d7d, 0xb9e2, 0x0468, 0xb9de, 0x0458,
+	0xb9da, 0x0448, 0xb9d6, 0x0438, 0xb9d2, 0x0428, 0xb9ce, 0x0418,
+	0xb9ca, 0x0408, 0xb9c6, 0x00f8, 0xb9c2, 0x00e8, 0xb9be, 0x00d8,
+	0xb9ba, 0x00c8, 0xb9b6, 0x00b8, 0xb9b2, 0x00a8, 0xb9ae, 0x0098,
+	0xb9aa, 0x0088, 0xb9a6, 0x0078, 0xb9a2, 0x0068, 0xb99e, 0x0058,
+	0xb99a, 0x0048, 0xb996, 0x0038, 0xb992, 0x0028, 0xb98e, 0x0018,
+	0xb98a, 0x0008, 0xb986, 0x8631, 0x8421, 0x0130, 0x080c, 0x1e81,
+	0x090c, 0x0d7d, 0x0804, 0x8e8e, 0x00ae, 0x00be, 0x00ce, 0x00ee,
+	0x0005, 0xa86c, 0xa06e, 0xa870, 0xa072, 0xa077, 0x00ff, 0x9006,
+	0x0804, 0x8e70, 0x0006, 0x0016, 0x00b6, 0x6010, 0x2058, 0xb810,
+	0x9005, 0x01b0, 0x2001, 0x1924, 0x2004, 0x9005, 0x0188, 0x2001,
+	0x1800, 0x2004, 0x9086, 0x0003, 0x1158, 0x0036, 0x0046, 0xbba0,
+	0x2021, 0x0004, 0x2011, 0x8014, 0x080c, 0x4b52, 0x004e, 0x003e,
+	0x00be, 0x001e, 0x000e, 0x0005, 0x9016, 0x710c, 0xa834, 0x910a,
+	0xa936, 0x7008, 0x9005, 0x0120, 0x8210, 0x910a, 0x0238, 0x0130,
+	0x7010, 0x8210, 0x910a, 0x0210, 0x0108, 0x0cd8, 0xaa8a, 0xa26a,
+	0x0005, 0x00f6, 0x00d6, 0x0036, 0x2079, 0x0300, 0x781b, 0x0200,
+	0x7818, 0xd094, 0x1dd8, 0x781b, 0x0202, 0xa001, 0xa001, 0x7818,
+	0xd094, 0x1da0, 0xb8ac, 0x9005, 0x01b8, 0x2068, 0x2079, 0x0000,
+	0x2c08, 0x911e, 0x1118, 0x680c, 0xb8ae, 0x0060, 0x9106, 0x0140,
+	0x2d00, 0x2078, 0x680c, 0x9005, 0x090c, 0x0d7d, 0x2068, 0x0cb0,
+	0x6b0c, 0x7b0e, 0x600f, 0x0000, 0x2079, 0x0300, 0x781b, 0x0200,
+	0x003e, 0x00de, 0x00fe, 0x0005, 0x00e6, 0x00d6, 0x0096, 0x00c6,
+	0x0036, 0x0126, 0x2091, 0x8000, 0x0156, 0x20a9, 0x01ff, 0x2071,
+	0x0300, 0x701b, 0x0200, 0x7018, 0xd094, 0x0110, 0x1f04, 0x8fc9,
+	0x701b, 0x0202, 0xa001, 0xa001, 0x7018, 0xd094, 0x1d90, 0xb8ac,
+	0x9005, 0x01e8, 0x2060, 0x600c, 0xb8ae, 0x6024, 0xc08d, 0x6026,
 	0x6003, 0x0004, 0x601b, 0x0000, 0x6013, 0x0000, 0x601f, 0x0101,
 	0x6014, 0x2048, 0xa88b, 0x0000, 0xa8a8, 0xa8ab, 0x0000, 0x904d,
-	0x090c, 0x0d7d, 0x080c, 0x1079, 0x080c, 0x8b15, 0x0c18, 0x2071,
+	0x090c, 0x0d7d, 0x080c, 0x1079, 0x080c, 0x8b89, 0x0c00, 0x2071,
 	0x0300, 0x701b, 0x0200, 0x015e, 0x012e, 0x003e, 0x00ce, 0x009e,
 	0x00de, 0x00ee, 0x0005, 0x00c6, 0x00b6, 0x0016, 0x0006, 0x0156,
-	0x080c, 0x2630, 0x015e, 0x11b0, 0x080c, 0x65e3, 0x190c, 0x0d7d,
-	0x000e, 0x001e, 0xb912, 0xb816, 0x080c, 0xab9a, 0x0140, 0x2b00,
-	0x6012, 0x6023, 0x0001, 0x2009, 0x0001, 0x080c, 0xac8d, 0x00be,
+	0x080c, 0x2661, 0x015e, 0x11b0, 0x080c, 0x6632, 0x190c, 0x0d7d,
+	0x000e, 0x001e, 0xb912, 0xb816, 0x080c, 0xac5a, 0x0140, 0x2b00,
+	0x6012, 0x6023, 0x0001, 0x2009, 0x0001, 0x080c, 0xad4d, 0x00be,
 	0x00ce, 0x0005, 0x000e, 0x001e, 0x0cd0, 0x0066, 0x6000, 0x90b2,
-	0x0016, 0x1a0c, 0x0d7d, 0x0013, 0x006e, 0x0005, 0x8fce, 0x8fce,
-	0x8fce, 0x8fd0, 0x9019, 0x8fce, 0x8fce, 0x8fce, 0x907c, 0x8fce,
-	0x90b4, 0x8fce, 0x8fce, 0x8fce, 0x8fce, 0x8fce, 0x080c, 0x0d7d,
-	0x9182, 0x0040, 0x0002, 0x8fe3, 0x8fe3, 0x8fe3, 0x8fe3, 0x8fe3,
-	0x8fe3, 0x8fe3, 0x8fe3, 0x8fe3, 0x8fe5, 0x8ff6, 0x8fe3, 0x8fe3,
-	0x8fe3, 0x8fe3, 0x9007, 0x080c, 0x0d7d, 0x0096, 0x6114, 0x2148,
-	0xa87b, 0x0000, 0x6010, 0x00b6, 0x2058, 0xb8bb, 0x0500, 0x00be,
-	0x080c, 0x6b9f, 0x080c, 0xabf0, 0x009e, 0x0005, 0x080c, 0x965a,
-	0x00d6, 0x6114, 0x080c, 0xc865, 0x0130, 0x0096, 0x6114, 0x2148,
-	0x080c, 0x6d9f, 0x009e, 0x00de, 0x080c, 0xabf0, 0x0005, 0x080c,
-	0x965a, 0x080c, 0x320f, 0x6114, 0x0096, 0x2148, 0x080c, 0xc865,
-	0x0120, 0xa87b, 0x0029, 0x080c, 0x6d9f, 0x009e, 0x080c, 0xabf0,
-	0x0005, 0x601b, 0x0000, 0x9182, 0x0040, 0x0096, 0x0002, 0x9034,
-	0x9034, 0x9034, 0x9034, 0x9034, 0x9034, 0x9034, 0x9034, 0x9036,
-	0x9034, 0x9034, 0x9034, 0x9078, 0x9034, 0x9034, 0x9034, 0x9034,
-	0x9034, 0x9034, 0x903c, 0x9034, 0x080c, 0x0d7d, 0x6114, 0x2148,
-	0xa938, 0x918e, 0xffff, 0x05e0, 0x00e6, 0x6114, 0x2148, 0x080c,
-	0x8deb, 0x0096, 0xa8a8, 0x2048, 0x080c, 0x6b37, 0x009e, 0xa8ab,
-	0x0000, 0x6010, 0x9005, 0x0128, 0x00b6, 0x2058, 0x080c, 0x8f1c,
-	0x00be, 0xae88, 0x00b6, 0x2059, 0x0000, 0x080c, 0x8b1e, 0x00be,
-	0x01e0, 0x2071, 0x193c, 0x080c, 0x8b65, 0x01b8, 0x9086, 0x0001,
-	0x1128, 0x2001, 0x1946, 0x2004, 0x9005, 0x1178, 0x0096, 0x080c,
-	0x1047, 0x2900, 0x009e, 0x0148, 0xa8aa, 0x00f6, 0x2c78, 0x080c,
-	0x8ad9, 0x00fe, 0x00ee, 0x009e, 0x0005, 0x080c, 0x8b15, 0x0cd0,
-	0x080c, 0x9130, 0x009e, 0x0005, 0x9182, 0x0040, 0x0096, 0x0002,
-	0x9090, 0x9090, 0x9090, 0x9092, 0x9090, 0x9090, 0x9090, 0x90b2,
-	0x9090, 0x9090, 0x9090, 0x9090, 0x9090, 0x9090, 0x9090, 0x9090,
-	0x080c, 0x0d7d, 0x6003, 0x0003, 0x6106, 0x6014, 0x2048, 0xa8ac,
-	0xa836, 0xa8b0, 0xa83a, 0xa847, 0x0000, 0xa84b, 0x0000, 0xa884,
-	0x9092, 0x199a, 0x0210, 0x2001, 0x1999, 0x8003, 0x8013, 0x8213,
-	0x9210, 0x621a, 0x080c, 0x1bdf, 0x2009, 0x8030, 0x080c, 0x9280,
-	0x009e, 0x0005, 0x080c, 0x0d7d, 0x080c, 0x965a, 0x6114, 0x2148,
+	0x0016, 0x1a0c, 0x0d7d, 0x0013, 0x006e, 0x0005, 0x903e, 0x903e,
+	0x903e, 0x9040, 0x9089, 0x903e, 0x903e, 0x903e, 0x90f0, 0x903e,
+	0x9128, 0x903e, 0x903e, 0x903e, 0x903e, 0x903e, 0x080c, 0x0d7d,
+	0x9182, 0x0040, 0x0002, 0x9053, 0x9053, 0x9053, 0x9053, 0x9053,
+	0x9053, 0x9053, 0x9053, 0x9053, 0x9055, 0x9066, 0x9053, 0x9053,
+	0x9053, 0x9053, 0x9077, 0x080c, 0x0d7d, 0x0096, 0x6114, 0x2148,
 	0xa87b, 0x0000, 0x6010, 0x00b6, 0x2058, 0xb8bb, 0x0500, 0x00be,
-	0x080c, 0x6d9f, 0x080c, 0xabf0, 0x009e, 0x0005, 0x080c, 0xa899,
-	0x6144, 0xd1fc, 0x0120, 0xd1ac, 0x1110, 0x6003, 0x0003, 0x6000,
-	0x908a, 0x0016, 0x1a0c, 0x0d7d, 0x0096, 0x0023, 0x009e, 0x080c,
-	0xa8b5, 0x0005, 0x90ea, 0x90ea, 0x90ea, 0x90ec, 0x90fd, 0x90ea,
-	0x90ea, 0x90ea, 0x90ea, 0x90ea, 0x90ea, 0x90ea, 0x90ea, 0x90ea,
-	0x90ea, 0x90ea, 0x080c, 0x0d7d, 0x080c, 0xaa2d, 0x6114, 0x2148,
-	0xa87b, 0x0006, 0x6010, 0x00b6, 0x2058, 0xb8bb, 0x0500, 0x00be,
-	0x080c, 0x6d9f, 0x080c, 0xabf0, 0x0005, 0x0491, 0x0005, 0x080c,
-	0xa899, 0x6000, 0x6144, 0xd1fc, 0x0130, 0xd1ac, 0x1120, 0x6003,
-	0x0003, 0x2009, 0x0003, 0x908a, 0x0016, 0x1a0c, 0x0d7d, 0x0096,
-	0x0033, 0x009e, 0x0106, 0x080c, 0xa8b5, 0x010e, 0x0005, 0x9127,
-	0x9127, 0x9127, 0x9129, 0x9130, 0x9127, 0x9127, 0x9127, 0x9127,
-	0x9127, 0x9127, 0x9127, 0x9127, 0x9127, 0x9127, 0x9127, 0x080c,
-	0x0d7d, 0x0036, 0x00e6, 0x080c, 0xaa2d, 0x00ee, 0x003e, 0x0005,
-	0x00f6, 0x00e6, 0x601b, 0x0000, 0x6014, 0x2048, 0x6010, 0x9005,
-	0x0128, 0x00b6, 0x2058, 0x080c, 0x8f1c, 0x00be, 0x2071, 0x193c,
-	0x080c, 0x8b65, 0x0160, 0x2001, 0x187f, 0x2004, 0xa88a, 0x2031,
-	0x0000, 0x2c78, 0x080c, 0x8ad9, 0x00ee, 0x00fe, 0x0005, 0x0096,
-	0xa88b, 0x0000, 0xa8a8, 0x2048, 0x080c, 0x1079, 0x009e, 0xa8ab,
-	0x0000, 0x080c, 0x8b15, 0x0c80, 0x0000, 0x0000, 0x0000, 0x0000,
-	0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x187a, 0x0000, 0x0000,
-	0x0000, 0x0000, 0x0000, 0x0000, 0x0126, 0x2091, 0x8000, 0x0036,
-	0x0046, 0x20a9, 0x0010, 0x9006, 0x8004, 0x8086, 0x818e, 0x1208,
-	0x9200, 0x1f04, 0x9175, 0x8086, 0x818e, 0x004e, 0x003e, 0x012e,
-	0x0005, 0x0126, 0x2091, 0x8000, 0x0076, 0x0156, 0x20a9, 0x0010,
-	0x9005, 0x01c8, 0x911a, 0x12b8, 0x8213, 0x818d, 0x0228, 0x911a,
-	0x1220, 0x1f04, 0x918c, 0x0028, 0x911a, 0x2308, 0x8210, 0x1f04,
-	0x918c, 0x0006, 0x3200, 0x9084, 0xefff, 0x2080, 0x000e, 0x015e,
-	0x007e, 0x012e, 0x0005, 0x0006, 0x3200, 0x9085, 0x1000, 0x0ca8,
-	0x0126, 0x2091, 0x2800, 0x2079, 0x19e6, 0x012e, 0x00d6, 0x2069,
-	0x19e6, 0x6803, 0x0005, 0x0156, 0x0146, 0x01d6, 0x20e9, 0x0000,
-	0x2069, 0x0200, 0x080c, 0xa68e, 0x04a9, 0x080c, 0xa679, 0x0491,
-	0x080c, 0xa67c, 0x0479, 0x080c, 0xa67f, 0x0461, 0x080c, 0xa682,
-	0x0449, 0x080c, 0xa685, 0x0431, 0x080c, 0xa688, 0x0419, 0x080c,
-	0xa68b, 0x0401, 0x01de, 0x014e, 0x015e, 0x6857, 0x0000, 0x00f6,
-	0x2079, 0x0380, 0x00f9, 0x7807, 0x0003, 0x7803, 0x0000, 0x7803,
-	0x0001, 0x2069, 0x0004, 0x2d04, 0x9084, 0xfffe, 0x9085, 0x8000,
-	0x206a, 0x2069, 0x0100, 0x6828, 0x9084, 0xfffc, 0x682a, 0x00fe,
-	0x00de, 0x0005, 0x20a9, 0x0020, 0x20a1, 0x0240, 0x2001, 0x0000,
-	0x4004, 0x0005, 0x00c6, 0x7803, 0x0000, 0x9006, 0x7827, 0x0030,
-	0x782b, 0x0400, 0x7827, 0x0031, 0x782b, 0x1aee, 0x781f, 0xff00,
-	0x781b, 0xff00, 0x2061, 0x1ae3, 0x602f, 0x19e6, 0x6033, 0x1800,
-	0x6037, 0x1a02, 0x603b, 0x1e7a, 0x603f, 0x1e8a, 0x6042, 0x6047,
-	0x1ab9, 0x00ce, 0x0005, 0x2001, 0x0382, 0x2004, 0x9084, 0x0007,
-	0x9086, 0x0001, 0x01b0, 0x00c6, 0x6146, 0x600f, 0x0000, 0x2c08,
-	0x2061, 0x19e6, 0x602c, 0x8000, 0x602e, 0x601c, 0x9005, 0x0130,
-	0x9080, 0x0003, 0x2102, 0x611e, 0x00ce, 0x0005, 0x6122, 0x611e,
-	0x0cd8, 0x6146, 0x2c08, 0x2001, 0x0012, 0x080c, 0xa88a, 0x0005,
-	0x0016, 0x2009, 0x8020, 0x6146, 0x2c08, 0x2001, 0x0382, 0x2004,
-	0x9084, 0x0007, 0x9086, 0x0001, 0x1128, 0x2001, 0x0019, 0x080c,
-	0xa88a, 0x0088, 0x00c6, 0x2061, 0x19e6, 0x602c, 0x8000, 0x602e,
-	0x600c, 0x9005, 0x0128, 0x9080, 0x0003, 0x2102, 0x610e, 0x0010,
-	0x6112, 0x610e, 0x00ce, 0x001e, 0x0005, 0x2001, 0x0382, 0x2004,
-	0x9084, 0x0007, 0x9086, 0x0001, 0x0198, 0x00c6, 0x6146, 0x600f,
-	0x0000, 0x2c08, 0x2061, 0x19e6, 0x6044, 0x9005, 0x0130, 0x9080,
-	0x0003, 0x2102, 0x6146, 0x00ce, 0x0005, 0x614a, 0x6146, 0x0cd8,
-	0x6146, 0x600f, 0x0000, 0x2c08, 0x2001, 0x0013, 0x080c, 0xa88a,
-	0x0005, 0x6044, 0xd0dc, 0x0110, 0x080c, 0xa327, 0x0005, 0x00f6,
-	0x00e6, 0x00d6, 0x00c6, 0x00b6, 0x0096, 0x0076, 0x0066, 0x0056,
-	0x0036, 0x0026, 0x0016, 0x0006, 0x0126, 0x902e, 0x2071, 0x19e6,
-	0x7648, 0x2660, 0x2678, 0x2091, 0x8000, 0x8cff, 0x0904, 0x930c,
-	0x6010, 0x2058, 0xb8a0, 0x9206, 0x1904, 0x9307, 0x87ff, 0x0120,
-	0x605c, 0x9106, 0x1904, 0x9307, 0x704c, 0x9c06, 0x1178, 0x0036,
-	0x2019, 0x0001, 0x080c, 0xa133, 0x703f, 0x0000, 0x9006, 0x704e,
-	0x706a, 0x7052, 0x706e, 0x003e, 0x2029, 0x0001, 0x0811, 0x7048,
-	0x9c36, 0x1110, 0x660c, 0x764a, 0x7044, 0x9c36, 0x1140, 0x2c00,
-	0x9f36, 0x0118, 0x2f00, 0x7046, 0x0010, 0x7047, 0x0000, 0x660c,
-	0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f,
-	0x0000, 0x080c, 0xc865, 0x01f0, 0x6014, 0x2048, 0x6020, 0x9086,
-	0x0003, 0x1588, 0x6004, 0x9086, 0x0040, 0x090c, 0xa327, 0xa867,
-	0x0103, 0xab7a, 0xa877, 0x0000, 0x0016, 0x0036, 0x0076, 0x080c,
-	0xcb68, 0x080c, 0xe66e, 0x080c, 0x6d9f, 0x007e, 0x003e, 0x001e,
-	0x080c, 0xca54, 0x080c, 0xac2b, 0x00ce, 0x0804, 0x92a5, 0x2c78,
-	0x600c, 0x2060, 0x0804, 0x92a5, 0x012e, 0x000e, 0x001e, 0x002e,
-	0x003e, 0x005e, 0x006e, 0x007e, 0x009e, 0x00be, 0x00ce, 0x00de,
-	0x00ee, 0x00fe, 0x0005, 0x6020, 0x9086, 0x0006, 0x1158, 0x0016,
-	0x0036, 0x0076, 0x080c, 0xe66e, 0x080c, 0xe2b9, 0x007e, 0x003e,
-	0x001e, 0x08c0, 0x6020, 0x9086, 0x0009, 0x1168, 0xa87b, 0x0006,
-	0x0016, 0x0036, 0x0076, 0x080c, 0x6d9f, 0x080c, 0xabf0, 0x007e,
-	0x003e, 0x001e, 0x0848, 0x6020, 0x9086, 0x000a, 0x0904, 0x92f1,
-	0x0804, 0x92ea, 0x0006, 0x0066, 0x0096, 0x00c6, 0x00d6, 0x00f6,
-	0x9036, 0x0126, 0x2091, 0x8000, 0x2079, 0x19e6, 0x7848, 0x9065,
-	0x0904, 0x93a6, 0x600c, 0x0006, 0x600f, 0x0000, 0x784c, 0x9c06,
-	0x11a0, 0x0036, 0x2019, 0x0001, 0x080c, 0xa133, 0x783f, 0x0000,
-	0x901e, 0x7b4e, 0x7b6a, 0x7b52, 0x7b6e, 0x003e, 0x000e, 0x9005,
-	0x1118, 0x600c, 0x600f, 0x0000, 0x0006, 0x00e6, 0x2f70, 0x080c,
-	0x9289, 0x00ee, 0x080c, 0xc865, 0x0548, 0x6014, 0x2048, 0x6020,
-	0x9086, 0x0003, 0x15a8, 0x3e08, 0x918e, 0x0002, 0x1188, 0x6010,
-	0x9005, 0x0170, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x0140,
-	0x6048, 0x9005, 0x11c0, 0x2001, 0x1987, 0x2004, 0x604a, 0x0098,
-	0x6004, 0x9086, 0x0040, 0x090c, 0xa327, 0xa867, 0x0103, 0xab7a,
-	0xa877, 0x0000, 0x080c, 0x6d93, 0x080c, 0xca54, 0x6044, 0xc0fc,
-	0x6046, 0x080c, 0xac2b, 0x000e, 0x0804, 0x934f, 0x7e4a, 0x7e46,
-	0x012e, 0x00fe, 0x00de, 0x00ce, 0x009e, 0x006e, 0x000e, 0x0005,
-	0x6020, 0x9086, 0x0006, 0x1118, 0x080c, 0xe2b9, 0x0c38, 0x6020,
-	0x9086, 0x0009, 0x1130, 0xab7a, 0x080c, 0x6d9f, 0x080c, 0xabf0,
-	0x0c10, 0x6020, 0x9086, 0x000a, 0x0990, 0x0850, 0x0016, 0x0026,
-	0x0086, 0x9046, 0x00a9, 0x080c, 0x94b7, 0x008e, 0x002e, 0x001e,
-	0x0005, 0x00f6, 0x0126, 0x2079, 0x19e6, 0x2091, 0x8000, 0x080c,
-	0x9500, 0x080c, 0x9594, 0x080c, 0x67d1, 0x012e, 0x00fe, 0x0005,
-	0x00b6, 0x0096, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0016,
-	0x0006, 0x0126, 0x2091, 0x8000, 0x2071, 0x19e6, 0x7620, 0x2660,
-	0x2678, 0x8cff, 0x0904, 0x947c, 0x6010, 0x2058, 0xb8a0, 0x9206,
-	0x1904, 0x9477, 0x88ff, 0x0120, 0x605c, 0x9106, 0x1904, 0x9477,
-	0x7030, 0x9c06, 0x1570, 0x2069, 0x0100, 0x6820, 0xd0a4, 0x1508,
-	0x080c, 0x8709, 0x080c, 0x9e4f, 0x68c3, 0x0000, 0x080c, 0xa327,
-	0x7033, 0x0000, 0x0036, 0x2069, 0x0140, 0x6b04, 0x9384, 0x1000,
-	0x0138, 0x2001, 0x0100, 0x080c, 0x2a49, 0x9006, 0x080c, 0x2a49,
-	0x2069, 0x0100, 0x6824, 0xd084, 0x0110, 0x6827, 0x0001, 0x003e,
-	0x0040, 0x7008, 0xc0ad, 0x700a, 0x6003, 0x0009, 0x630a, 0x0804,
-	0x9477, 0x7020, 0x9c36, 0x1110, 0x660c, 0x7622, 0x701c, 0x9c36,
-	0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00, 0x701e, 0x0010, 0x701f,
-	0x0000, 0x660c, 0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008,
-	0x2678, 0x600f, 0x0000, 0x6044, 0xc0fc, 0x6046, 0x6014, 0x2048,
-	0x080c, 0xc865, 0x01e8, 0x6020, 0x9086, 0x0003, 0x1580, 0x080c,
-	0xca7a, 0x1118, 0x080c, 0xb5c6, 0x0098, 0xa867, 0x0103, 0xab7a,
-	0xa877, 0x0000, 0x0016, 0x0036, 0x0086, 0x080c, 0xcb68, 0x080c,
-	0xe66e, 0x080c, 0x6d9f, 0x008e, 0x003e, 0x001e, 0x080c, 0xca54,
-	0x080c, 0xac2b, 0x080c, 0xa1fd, 0x00ce, 0x0804, 0x93f1, 0x2c78,
-	0x600c, 0x2060, 0x0804, 0x93f1, 0x012e, 0x000e, 0x001e, 0x006e,
-	0x00ce, 0x00de, 0x00ee, 0x00fe, 0x009e, 0x00be, 0x0005, 0x6020,
-	0x9086, 0x0006, 0x1158, 0x0016, 0x0036, 0x0086, 0x080c, 0xe66e,
-	0x080c, 0xe2b9, 0x008e, 0x003e, 0x001e, 0x08d0, 0x080c, 0xb5c6,
-	0x6020, 0x9086, 0x0002, 0x1160, 0x6004, 0x0006, 0x9086, 0x0085,
-	0x000e, 0x0904, 0x945d, 0x9086, 0x008b, 0x0904, 0x945d, 0x0840,
-	0x6020, 0x9086, 0x0005, 0x1920, 0x6004, 0x0006, 0x9086, 0x0085,
-	0x000e, 0x09c8, 0x9086, 0x008b, 0x09b0, 0x0804, 0x9470, 0x0006,
-	0x00f6, 0x00e6, 0x0096, 0x00b6, 0x00c6, 0x0066, 0x0016, 0x0126,
-	0x2091, 0x8000, 0x9280, 0x1000, 0x2004, 0x905d, 0x2079, 0x19e6,
-	0x9036, 0x7828, 0x2060, 0x8cff, 0x0538, 0x6010, 0x9b06, 0x1500,
-	0x6043, 0xffff, 0x080c, 0xaa78, 0x01d8, 0x610c, 0x0016, 0x080c,
-	0x9fbd, 0x6014, 0x2048, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000,
-	0x0016, 0x0036, 0x0086, 0x080c, 0xcb68, 0x080c, 0xe66e, 0x080c,
-	0x6d9f, 0x008e, 0x003e, 0x001e, 0x080c, 0xac2b, 0x00ce, 0x08d8,
-	0x2c30, 0x600c, 0x2060, 0x08b8, 0x080c, 0x67ee, 0x012e, 0x001e,
-	0x006e, 0x00ce, 0x00be, 0x009e, 0x00ee, 0x00fe, 0x000e, 0x0005,
-	0x0096, 0x0006, 0x0066, 0x00c6, 0x00d6, 0x9036, 0x7820, 0x9065,
-	0x0904, 0x9567, 0x600c, 0x0006, 0x6044, 0xc0fc, 0x6046, 0x600f,
-	0x0000, 0x7830, 0x9c06, 0x1588, 0x2069, 0x0100, 0x6820, 0xd0a4,
-	0x1508, 0x080c, 0x8709, 0x080c, 0x9e4f, 0x68c3, 0x0000, 0x080c,
-	0xa327, 0x7833, 0x0000, 0x0036, 0x2069, 0x0140, 0x6b04, 0x9384,
-	0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2a49, 0x9006, 0x080c,
-	0x2a49, 0x2069, 0x0100, 0x6824, 0xd084, 0x0110, 0x6827, 0x0001,
-	0x003e, 0x0058, 0x080c, 0x6a26, 0x1538, 0x6003, 0x0009, 0x630a,
-	0x7808, 0xc0ad, 0x780a, 0x2c30, 0x00f8, 0x6014, 0x2048, 0x080c,
-	0xc863, 0x01b0, 0x6020, 0x9086, 0x0003, 0x1508, 0x080c, 0xca7a,
-	0x1118, 0x080c, 0xb5c6, 0x0060, 0x080c, 0x6a26, 0x1168, 0xa867,
-	0x0103, 0xab7a, 0xa877, 0x0000, 0x080c, 0x6d9f, 0x080c, 0xca54,
-	0x080c, 0xac2b, 0x080c, 0xa1fd, 0x000e, 0x0804, 0x9507, 0x7e22,
-	0x7e1e, 0x00de, 0x00ce, 0x006e, 0x000e, 0x009e, 0x0005, 0x6020,
-	0x9086, 0x0006, 0x1118, 0x080c, 0xe2b9, 0x0c50, 0x080c, 0xb5c6,
-	0x6020, 0x9086, 0x0002, 0x1150, 0x6004, 0x0006, 0x9086, 0x0085,
-	0x000e, 0x0990, 0x9086, 0x008b, 0x0978, 0x08d0, 0x6020, 0x9086,
-	0x0005, 0x19b0, 0x6004, 0x0006, 0x9086, 0x0085, 0x000e, 0x0d18,
-	0x9086, 0x008b, 0x0d00, 0x0860, 0x0006, 0x0096, 0x00b6, 0x00c6,
-	0x0066, 0x9036, 0x7828, 0x9065, 0x0510, 0x6010, 0x2058, 0x600c,
-	0x0006, 0x3e08, 0x918e, 0x0002, 0x1118, 0xb800, 0xd0bc, 0x11a8,
-	0x6043, 0xffff, 0x080c, 0xaa78, 0x0180, 0x610c, 0x080c, 0x9fbd,
-	0x6014, 0x2048, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c,
-	0x6d9f, 0x080c, 0xac2b, 0x000e, 0x08f0, 0x2c30, 0x0ce0, 0x006e,
-	0x00ce, 0x00be, 0x009e, 0x000e, 0x0005, 0x00e6, 0x00d6, 0x0096,
-	0x0066, 0x080c, 0x6156, 0x11b0, 0x2071, 0x19e6, 0x7030, 0x9080,
-	0x0005, 0x2004, 0x904d, 0x0170, 0xa878, 0x9606, 0x1158, 0x2071,
-	0x19e6, 0x7030, 0x9035, 0x0130, 0x9080, 0x0005, 0x2004, 0x9906,
-	0x1108, 0x0029, 0x006e, 0x009e, 0x00de, 0x00ee, 0x0005, 0x00c6,
-	0x2660, 0x6043, 0xffff, 0x080c, 0xaa78, 0x0178, 0x080c, 0x9fbd,
-	0x6014, 0x2048, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c,
-	0xcb68, 0x080c, 0x6d9f, 0x080c, 0xac2b, 0x00ce, 0x0005, 0x00b6,
-	0x00e6, 0x00c6, 0x080c, 0xa899, 0x0106, 0x2071, 0x0101, 0x2e04,
-	0xc0c4, 0x2072, 0x6044, 0xd0fc, 0x1138, 0x010e, 0x090c, 0xa8b5,
-	0x00ce, 0x00ee, 0x00be, 0x0005, 0x2071, 0x19e6, 0x7030, 0x9005,
-	0x0da0, 0x9c06, 0x190c, 0x0d7d, 0x7036, 0x080c, 0x8709, 0x7004,
-	0x9084, 0x0007, 0x0002, 0x962d, 0x962f, 0x9636, 0x9640, 0x964e,
-	0x962d, 0x963b, 0x962b, 0x080c, 0x0d7d, 0x0428, 0x0005, 0x080c,
-	0xaa63, 0x7007, 0x0000, 0x7033, 0x0000, 0x00e8, 0x0066, 0x9036,
-	0x080c, 0x9fbd, 0x006e, 0x7007, 0x0000, 0x7033, 0x0000, 0x0098,
-	0x080c, 0xaa4e, 0x0140, 0x080c, 0xaa63, 0x0128, 0x0066, 0x9036,
-	0x080c, 0x9fbd, 0x006e, 0x7033, 0x0000, 0x0028, 0x080c, 0xaa4e,
-	0x080c, 0xa327, 0x0000, 0x010e, 0x190c, 0xa8b5, 0x00ce, 0x00ee,
-	0x00be, 0x0005, 0x00d6, 0x00c6, 0x080c, 0xa899, 0x0106, 0x6044,
-	0xd0fc, 0x1130, 0x010e, 0x090c, 0xa8b5, 0x00ce, 0x00de, 0x0005,
-	0x2069, 0x19e6, 0x684c, 0x9005, 0x0da8, 0x9c06, 0x190c, 0x0d7d,
-	0x6852, 0x00e6, 0x2d70, 0x080c, 0x9289, 0x00ee, 0x080c, 0x8716,
-	0x0016, 0x2009, 0x0040, 0x080c, 0x21d9, 0x001e, 0x683c, 0x9084,
-	0x0003, 0x0002, 0x9688, 0x9689, 0x96a7, 0x9686, 0x080c, 0x0d7d,
-	0x0460, 0x6868, 0x9086, 0x0001, 0x0190, 0x600c, 0x9015, 0x0160,
-	0x6a4a, 0x600f, 0x0000, 0x6044, 0xc0fc, 0x6046, 0x9006, 0x7042,
-	0x684e, 0x683f, 0x0000, 0x00c8, 0x684a, 0x6846, 0x0ca0, 0x686b,
-	0x0000, 0x6848, 0x9065, 0x0d78, 0x6003, 0x0002, 0x0c60, 0x9006,
-	0x686a, 0x6852, 0x686e, 0x600c, 0x9015, 0x0120, 0x6a4a, 0x600f,
-	0x0000, 0x0018, 0x684e, 0x684a, 0x6846, 0x684f, 0x0000, 0x010e,
-	0x190c, 0xa8b5, 0x00ce, 0x00de, 0x0005, 0x0005, 0x6020, 0x9084,
-	0x000f, 0x000b, 0x0005, 0x96d3, 0x96d6, 0x9b44, 0x9bd3, 0x96d6,
-	0x9b44, 0x9bd3, 0x96d3, 0x96d6, 0x96d3, 0x96d3, 0x96d3, 0x96d3,
-	0x96d3, 0x96d3, 0x96d3, 0x080c, 0x95ff, 0x0005, 0x00b6, 0x0156,
-	0x0136, 0x0146, 0x01c6, 0x01d6, 0x00c6, 0x00d6, 0x00e6, 0x00f6,
-	0x2069, 0x0200, 0x2071, 0x0240, 0x6004, 0x908a, 0x0053, 0x1a0c,
+	0x080c, 0x6bee, 0x080c, 0xacb0, 0x009e, 0x0005, 0x080c, 0x96d5,
+	0x00d6, 0x6114, 0x080c, 0xc97a, 0x0130, 0x0096, 0x6114, 0x2148,
+	0x080c, 0x6dee, 0x009e, 0x00de, 0x080c, 0xacb0, 0x0005, 0x080c,
+	0x96d5, 0x080c, 0x3240, 0x6114, 0x0096, 0x2148, 0x080c, 0xc97a,
+	0x0120, 0xa87b, 0x0029, 0x080c, 0x6dee, 0x009e, 0x080c, 0xacb0,
+	0x0005, 0x601b, 0x0000, 0x9182, 0x0040, 0x0096, 0x0002, 0x90a4,
+	0x90a4, 0x90a4, 0x90a4, 0x90a4, 0x90a4, 0x90a4, 0x90a4, 0x90a6,
+	0x90a4, 0x90a4, 0x90a4, 0x90ec, 0x90a4, 0x90a4, 0x90a4, 0x90a4,
+	0x90a4, 0x90a4, 0x90ad, 0x90a4, 0x080c, 0x0d7d, 0x6114, 0x2148,
+	0xa938, 0x918e, 0xffff, 0x0904, 0x90ec, 0x6024, 0xd08c, 0x15c0,
+	0x00e6, 0x6114, 0x2148, 0x080c, 0x8e58, 0x0096, 0xa8a8, 0x2048,
+	0x080c, 0x6b86, 0x009e, 0xa8ab, 0x0000, 0x6010, 0x9005, 0x0128,
+	0x00b6, 0x2058, 0x080c, 0x8f89, 0x00be, 0xae88, 0x00b6, 0x2059,
+	0x0000, 0x080c, 0x8b92, 0x00be, 0x01e0, 0x2071, 0x193c, 0x080c,
+	0x8bd9, 0x01b8, 0x9086, 0x0001, 0x1128, 0x2001, 0x1946, 0x2004,
+	0x9005, 0x1178, 0x0096, 0x080c, 0x1047, 0x2900, 0x009e, 0x0148,
+	0xa8aa, 0x00f6, 0x2c78, 0x080c, 0x8b4d, 0x00fe, 0x00ee, 0x009e,
+	0x0005, 0x080c, 0x8b89, 0x0cd0, 0x080c, 0x91a4, 0x009e, 0x0005,
+	0x9182, 0x0040, 0x0096, 0x0002, 0x9104, 0x9104, 0x9104, 0x9106,
+	0x9104, 0x9104, 0x9104, 0x9126, 0x9104, 0x9104, 0x9104, 0x9104,
+	0x9104, 0x9104, 0x9104, 0x9104, 0x080c, 0x0d7d, 0x6003, 0x0003,
+	0x6106, 0x6014, 0x2048, 0xa8ac, 0xa836, 0xa8b0, 0xa83a, 0xa847,
+	0x0000, 0xa84b, 0x0000, 0xa884, 0x9092, 0x199a, 0x0210, 0x2001,
+	0x1999, 0x8003, 0x8013, 0x8213, 0x9210, 0x621a, 0x080c, 0x1c10,
+	0x2009, 0x8030, 0x080c, 0x92f7, 0x009e, 0x0005, 0x080c, 0x0d7d,
+	0x080c, 0x96d5, 0x6114, 0x2148, 0xa87b, 0x0000, 0x6010, 0x00b6,
+	0x2058, 0xb8bb, 0x0500, 0x00be, 0x080c, 0x6dee, 0x080c, 0xacb0,
+	0x009e, 0x0005, 0x080c, 0xa91e, 0x6144, 0xd1fc, 0x0120, 0xd1ac,
+	0x1110, 0x6003, 0x0003, 0x6000, 0x908a, 0x0016, 0x1a0c, 0x0d7d,
+	0x0096, 0x0023, 0x009e, 0x080c, 0xa93a, 0x0005, 0x915e, 0x915e,
+	0x915e, 0x9160, 0x9171, 0x915e, 0x915e, 0x915e, 0x915e, 0x915e,
+	0x915e, 0x915e, 0x915e, 0x915e, 0x915e, 0x915e, 0x080c, 0x0d7d,
+	0x080c, 0xaab5, 0x6114, 0x2148, 0xa87b, 0x0006, 0x6010, 0x00b6,
+	0x2058, 0xb8bb, 0x0500, 0x00be, 0x080c, 0x6dee, 0x080c, 0xacb0,
+	0x0005, 0x0491, 0x0005, 0x080c, 0xa91e, 0x6000, 0x6144, 0xd1fc,
+	0x0130, 0xd1ac, 0x1120, 0x6003, 0x0003, 0x2009, 0x0003, 0x908a,
+	0x0016, 0x1a0c, 0x0d7d, 0x0096, 0x0033, 0x009e, 0x0106, 0x080c,
+	0xa93a, 0x010e, 0x0005, 0x919b, 0x919b, 0x919b, 0x919d, 0x91a4,
+	0x919b, 0x919b, 0x919b, 0x919b, 0x919b, 0x919b, 0x919b, 0x919b,
+	0x919b, 0x919b, 0x919b, 0x080c, 0x0d7d, 0x0036, 0x00e6, 0x080c,
+	0xaab5, 0x00ee, 0x003e, 0x0005, 0x6024, 0xd08c, 0x11f0, 0x00f6,
+	0x00e6, 0x601b, 0x0000, 0x6014, 0x2048, 0x6010, 0x9005, 0x0128,
+	0x00b6, 0x2058, 0x080c, 0x8f89, 0x00be, 0x2071, 0x193c, 0x080c,
+	0x8bd9, 0x0160, 0x2001, 0x187f, 0x2004, 0xa88a, 0x2031, 0x0000,
+	0x2c78, 0x080c, 0x8b4d, 0x00ee, 0x00fe, 0x0005, 0x0096, 0xa88b,
+	0x0000, 0xa8a8, 0x2048, 0x080c, 0x1079, 0x009e, 0xa8ab, 0x0000,
+	0x080c, 0x8b89, 0x0c80, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+	0x0000, 0x0000, 0x0000, 0x0000, 0x187a, 0x0000, 0x0000, 0x0000,
+	0x0000, 0x0000, 0x0000, 0x0126, 0x2091, 0x8000, 0x0036, 0x0046,
+	0x20a9, 0x0010, 0x9006, 0x8004, 0x8086, 0x818e, 0x1208, 0x9200,
+	0x1f04, 0x91ec, 0x8086, 0x818e, 0x004e, 0x003e, 0x012e, 0x0005,
+	0x0126, 0x2091, 0x8000, 0x0076, 0x0156, 0x20a9, 0x0010, 0x9005,
+	0x01c8, 0x911a, 0x12b8, 0x8213, 0x818d, 0x0228, 0x911a, 0x1220,
+	0x1f04, 0x9203, 0x0028, 0x911a, 0x2308, 0x8210, 0x1f04, 0x9203,
+	0x0006, 0x3200, 0x9084, 0xefff, 0x2080, 0x000e, 0x015e, 0x007e,
+	0x012e, 0x0005, 0x0006, 0x3200, 0x9085, 0x1000, 0x0ca8, 0x0126,
+	0x2091, 0x2800, 0x2079, 0x19e6, 0x012e, 0x00d6, 0x2069, 0x19e6,
+	0x6803, 0x0005, 0x0156, 0x0146, 0x01d6, 0x20e9, 0x0000, 0x2069,
+	0x0200, 0x080c, 0xa713, 0x04a9, 0x080c, 0xa6fe, 0x0491, 0x080c,
+	0xa701, 0x0479, 0x080c, 0xa704, 0x0461, 0x080c, 0xa707, 0x0449,
+	0x080c, 0xa70a, 0x0431, 0x080c, 0xa70d, 0x0419, 0x080c, 0xa710,
+	0x0401, 0x01de, 0x014e, 0x015e, 0x6857, 0x0000, 0x00f6, 0x2079,
+	0x0380, 0x00f9, 0x7807, 0x0003, 0x7803, 0x0000, 0x7803, 0x0001,
+	0x2069, 0x0004, 0x2d04, 0x9084, 0xfffe, 0x9085, 0x8000, 0x206a,
+	0x2069, 0x0100, 0x6828, 0x9084, 0xfffc, 0x682a, 0x00fe, 0x00de,
+	0x0005, 0x20a9, 0x0020, 0x20a1, 0x0240, 0x2001, 0x0000, 0x4004,
+	0x0005, 0x00c6, 0x7803, 0x0000, 0x9006, 0x7827, 0x0030, 0x782b,
+	0x0400, 0x7827, 0x0031, 0x782b, 0x1af1, 0x781f, 0xff00, 0x781b,
+	0xff00, 0x2061, 0x1ae6, 0x602f, 0x19e6, 0x6033, 0x1800, 0x6037,
+	0x1a02, 0x603b, 0x1eab, 0x603f, 0x1ebb, 0x6042, 0x6047, 0x1abc,
+	0x00ce, 0x0005, 0x2001, 0x0382, 0x2004, 0x9084, 0x0007, 0x9086,
+	0x0001, 0x01b0, 0x00c6, 0x6146, 0x600f, 0x0000, 0x2c08, 0x2061,
+	0x19e6, 0x602c, 0x8000, 0x602e, 0x601c, 0x9005, 0x0130, 0x9080,
+	0x0003, 0x2102, 0x611e, 0x00ce, 0x0005, 0x6122, 0x611e, 0x0cd8,
+	0x6146, 0x2c08, 0x2001, 0x0012, 0x080c, 0xa90f, 0x0005, 0x0016,
+	0x2009, 0x8020, 0x6146, 0x2c08, 0x2001, 0x0382, 0x2004, 0x9084,
+	0x0007, 0x9086, 0x0001, 0x1128, 0x2001, 0x0019, 0x080c, 0xa90f,
+	0x0088, 0x00c6, 0x2061, 0x19e6, 0x602c, 0x8000, 0x602e, 0x600c,
+	0x9005, 0x0128, 0x9080, 0x0003, 0x2102, 0x610e, 0x0010, 0x6112,
+	0x610e, 0x00ce, 0x001e, 0x0005, 0x2001, 0x0382, 0x2004, 0x9084,
+	0x0007, 0x9086, 0x0001, 0x0198, 0x00c6, 0x6146, 0x600f, 0x0000,
+	0x2c08, 0x2061, 0x19e6, 0x6044, 0x9005, 0x0130, 0x9080, 0x0003,
+	0x2102, 0x6146, 0x00ce, 0x0005, 0x614a, 0x6146, 0x0cd8, 0x6146,
+	0x600f, 0x0000, 0x2c08, 0x2001, 0x0013, 0x080c, 0xa90f, 0x0005,
+	0x6044, 0xd0dc, 0x0110, 0x080c, 0xa3ac, 0x0005, 0x00f6, 0x00e6,
+	0x00d6, 0x00c6, 0x00b6, 0x0096, 0x0076, 0x0066, 0x0056, 0x0036,
+	0x0026, 0x0016, 0x0006, 0x0126, 0x902e, 0x2071, 0x19e6, 0x7648,
+	0x2660, 0x2678, 0x2091, 0x8000, 0x8cff, 0x0904, 0x9383, 0x6010,
+	0x2058, 0xb8a0, 0x9206, 0x1904, 0x937e, 0x87ff, 0x0120, 0x605c,
+	0x9106, 0x1904, 0x937e, 0x704c, 0x9c06, 0x1178, 0x0036, 0x2019,
+	0x0001, 0x080c, 0xa1b8, 0x703f, 0x0000, 0x9006, 0x704e, 0x706a,
+	0x7052, 0x706e, 0x003e, 0x2029, 0x0001, 0x0811, 0x7048, 0x9c36,
+	0x1110, 0x660c, 0x764a, 0x7044, 0x9c36, 0x1140, 0x2c00, 0x9f36,
+	0x0118, 0x2f00, 0x7046, 0x0010, 0x7047, 0x0000, 0x660c, 0x0066,
+	0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000,
+	0x080c, 0xc97a, 0x01f0, 0x6014, 0x2048, 0x6020, 0x9086, 0x0003,
+	0x1588, 0x6004, 0x9086, 0x0040, 0x090c, 0xa3ac, 0xa867, 0x0103,
+	0xab7a, 0xa877, 0x0000, 0x0016, 0x0036, 0x0076, 0x080c, 0xcc7f,
+	0x080c, 0xe79d, 0x080c, 0x6dee, 0x007e, 0x003e, 0x001e, 0x080c,
+	0xcb6b, 0x080c, 0xaceb, 0x00ce, 0x0804, 0x931c, 0x2c78, 0x600c,
+	0x2060, 0x0804, 0x931c, 0x012e, 0x000e, 0x001e, 0x002e, 0x003e,
+	0x005e, 0x006e, 0x007e, 0x009e, 0x00be, 0x00ce, 0x00de, 0x00ee,
+	0x00fe, 0x0005, 0x6020, 0x9086, 0x0006, 0x1158, 0x0016, 0x0036,
+	0x0076, 0x080c, 0xe79d, 0x080c, 0xe3e8, 0x007e, 0x003e, 0x001e,
+	0x08c0, 0x6020, 0x9086, 0x0009, 0x1168, 0xa87b, 0x0006, 0x0016,
+	0x0036, 0x0076, 0x080c, 0x6dee, 0x080c, 0xacb0, 0x007e, 0x003e,
+	0x001e, 0x0848, 0x6020, 0x9086, 0x000a, 0x0904, 0x9368, 0x0804,
+	0x9361, 0x0006, 0x0066, 0x0096, 0x00c6, 0x00d6, 0x00f6, 0x9036,
+	0x0126, 0x2091, 0x8000, 0x2079, 0x19e6, 0x7848, 0x9065, 0x0904,
+	0x941d, 0x600c, 0x0006, 0x600f, 0x0000, 0x784c, 0x9c06, 0x11a0,
+	0x0036, 0x2019, 0x0001, 0x080c, 0xa1b8, 0x783f, 0x0000, 0x901e,
+	0x7b4e, 0x7b6a, 0x7b52, 0x7b6e, 0x003e, 0x000e, 0x9005, 0x1118,
+	0x600c, 0x600f, 0x0000, 0x0006, 0x00e6, 0x2f70, 0x080c, 0x9300,
+	0x00ee, 0x080c, 0xc97a, 0x0548, 0x6014, 0x2048, 0x6020, 0x9086,
+	0x0003, 0x15a8, 0x3e08, 0x918e, 0x0002, 0x1188, 0x6010, 0x9005,
+	0x0170, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x0140, 0x6048,
+	0x9005, 0x11c0, 0x2001, 0x1987, 0x2004, 0x604a, 0x0098, 0x6004,
+	0x9086, 0x0040, 0x090c, 0xa3ac, 0xa867, 0x0103, 0xab7a, 0xa877,
+	0x0000, 0x080c, 0x6de2, 0x080c, 0xcb6b, 0x6044, 0xc0fc, 0x6046,
+	0x080c, 0xaceb, 0x000e, 0x0804, 0x93c6, 0x7e4a, 0x7e46, 0x012e,
+	0x00fe, 0x00de, 0x00ce, 0x009e, 0x006e, 0x000e, 0x0005, 0x6020,
+	0x9086, 0x0006, 0x1118, 0x080c, 0xe3e8, 0x0c38, 0x6020, 0x9086,
+	0x0009, 0x1130, 0xab7a, 0x080c, 0x6dee, 0x080c, 0xacb0, 0x0c10,
+	0x6020, 0x9086, 0x000a, 0x0990, 0x0850, 0x0016, 0x0026, 0x0086,
+	0x9046, 0x00a9, 0x080c, 0x9530, 0x008e, 0x002e, 0x001e, 0x0005,
+	0x00f6, 0x0126, 0x2079, 0x19e6, 0x2091, 0x8000, 0x080c, 0x9579,
+	0x080c, 0x960f, 0x080c, 0x6820, 0x012e, 0x00fe, 0x0005, 0x00b6,
+	0x0096, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0016, 0x0006,
+	0x0126, 0x2091, 0x8000, 0x2071, 0x19e6, 0x7620, 0x2660, 0x2678,
+	0x8cff, 0x0904, 0x94f5, 0x6010, 0x2058, 0xb8a0, 0x9206, 0x1904,
+	0x94f0, 0x88ff, 0x0120, 0x605c, 0x9106, 0x1904, 0x94f0, 0x7030,
+	0x9c06, 0x1580, 0x2069, 0x0100, 0x6820, 0xd0a4, 0x0110, 0xd0cc,
+	0x1508, 0x080c, 0x8780, 0x080c, 0x9ed4, 0x68c3, 0x0000, 0x080c,
+	0xa3ac, 0x7033, 0x0000, 0x0036, 0x2069, 0x0140, 0x6b04, 0x9384,
+	0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2a7a, 0x9006, 0x080c,
+	0x2a7a, 0x2069, 0x0100, 0x6824, 0xd084, 0x0110, 0x6827, 0x0001,
+	0x003e, 0x0040, 0x7008, 0xc0ad, 0x700a, 0x6003, 0x0009, 0x630a,
+	0x0804, 0x94f0, 0x7020, 0x9c36, 0x1110, 0x660c, 0x7622, 0x701c,
+	0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00, 0x701e, 0x0010,
+	0x701f, 0x0000, 0x660c, 0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e,
+	0x0008, 0x2678, 0x600f, 0x0000, 0x6044, 0xc0fc, 0x6046, 0x6014,
+	0x2048, 0x080c, 0xc97a, 0x01e8, 0x6020, 0x9086, 0x0003, 0x1580,
+	0x080c, 0xcb91, 0x1118, 0x080c, 0xb693, 0x0098, 0xa867, 0x0103,
+	0xab7a, 0xa877, 0x0000, 0x0016, 0x0036, 0x0086, 0x080c, 0xcc7f,
+	0x080c, 0xe79d, 0x080c, 0x6dee, 0x008e, 0x003e, 0x001e, 0x080c,
+	0xcb6b, 0x080c, 0xaceb, 0x080c, 0xa282, 0x00ce, 0x0804, 0x9468,
+	0x2c78, 0x600c, 0x2060, 0x0804, 0x9468, 0x012e, 0x000e, 0x001e,
+	0x006e, 0x00ce, 0x00de, 0x00ee, 0x00fe, 0x009e, 0x00be, 0x0005,
+	0x6020, 0x9086, 0x0006, 0x1158, 0x0016, 0x0036, 0x0086, 0x080c,
+	0xe79d, 0x080c, 0xe3e8, 0x008e, 0x003e, 0x001e, 0x08d0, 0x080c,
+	0xb693, 0x6020, 0x9086, 0x0002, 0x1160, 0x6004, 0x0006, 0x9086,
+	0x0085, 0x000e, 0x0904, 0x94d6, 0x9086, 0x008b, 0x0904, 0x94d6,
+	0x0840, 0x6020, 0x9086, 0x0005, 0x1920, 0x6004, 0x0006, 0x9086,
+	0x0085, 0x000e, 0x09c8, 0x9086, 0x008b, 0x09b0, 0x0804, 0x94e9,
+	0x0006, 0x00f6, 0x00e6, 0x0096, 0x00b6, 0x00c6, 0x0066, 0x0016,
+	0x0126, 0x2091, 0x8000, 0x9280, 0x1000, 0x2004, 0x905d, 0x2079,
+	0x19e6, 0x9036, 0x7828, 0x2060, 0x8cff, 0x0538, 0x6010, 0x9b06,
+	0x1500, 0x6043, 0xffff, 0x080c, 0xab00, 0x01d8, 0x610c, 0x0016,
+	0x080c, 0xa042, 0x6014, 0x2048, 0xa867, 0x0103, 0xab7a, 0xa877,
+	0x0000, 0x0016, 0x0036, 0x0086, 0x080c, 0xcc7f, 0x080c, 0xe79d,
+	0x080c, 0x6dee, 0x008e, 0x003e, 0x001e, 0x080c, 0xaceb, 0x00ce,
+	0x08d8, 0x2c30, 0x600c, 0x2060, 0x08b8, 0x080c, 0x683d, 0x012e,
+	0x001e, 0x006e, 0x00ce, 0x00be, 0x009e, 0x00ee, 0x00fe, 0x000e,
+	0x0005, 0x0096, 0x0006, 0x0066, 0x00c6, 0x00d6, 0x9036, 0x7820,
+	0x9065, 0x0904, 0x95e2, 0x600c, 0x0006, 0x6044, 0xc0fc, 0x6046,
+	0x600f, 0x0000, 0x7830, 0x9c06, 0x1598, 0x2069, 0x0100, 0x6820,
+	0xd0a4, 0x0110, 0xd0cc, 0x1508, 0x080c, 0x8780, 0x080c, 0x9ed4,
+	0x68c3, 0x0000, 0x080c, 0xa3ac, 0x7833, 0x0000, 0x0036, 0x2069,
+	0x0140, 0x6b04, 0x9384, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c,
+	0x2a7a, 0x9006, 0x080c, 0x2a7a, 0x2069, 0x0100, 0x6824, 0xd084,
+	0x0110, 0x6827, 0x0001, 0x003e, 0x0058, 0x080c, 0x6a75, 0x1538,
+	0x6003, 0x0009, 0x630a, 0x7808, 0xc0ad, 0x780a, 0x2c30, 0x00f8,
+	0x6014, 0x2048, 0x080c, 0xc978, 0x01b0, 0x6020, 0x9086, 0x0003,
+	0x1508, 0x080c, 0xcb91, 0x1118, 0x080c, 0xb693, 0x0060, 0x080c,
+	0x6a75, 0x1168, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c,
+	0x6dee, 0x080c, 0xcb6b, 0x080c, 0xaceb, 0x080c, 0xa282, 0x000e,
+	0x0804, 0x9580, 0x7e22, 0x7e1e, 0x00de, 0x00ce, 0x006e, 0x000e,
+	0x009e, 0x0005, 0x6020, 0x9086, 0x0006, 0x1118, 0x080c, 0xe3e8,
+	0x0c50, 0x080c, 0xb693, 0x6020, 0x9086, 0x0002, 0x1150, 0x6004,
+	0x0006, 0x9086, 0x0085, 0x000e, 0x0990, 0x9086, 0x008b, 0x0978,
+	0x08d0, 0x6020, 0x9086, 0x0005, 0x19b0, 0x6004, 0x0006, 0x9086,
+	0x0085, 0x000e, 0x0d18, 0x9086, 0x008b, 0x0d00, 0x0860, 0x0006,
+	0x0096, 0x00b6, 0x00c6, 0x0066, 0x9036, 0x7828, 0x9065, 0x0510,
+	0x6010, 0x2058, 0x600c, 0x0006, 0x3e08, 0x918e, 0x0002, 0x1118,
+	0xb800, 0xd0bc, 0x11a8, 0x6043, 0xffff, 0x080c, 0xab00, 0x0180,
+	0x610c, 0x080c, 0xa042, 0x6014, 0x2048, 0xa867, 0x0103, 0xab7a,
+	0xa877, 0x0000, 0x080c, 0x6dee, 0x080c, 0xaceb, 0x000e, 0x08f0,
+	0x2c30, 0x0ce0, 0x006e, 0x00ce, 0x00be, 0x009e, 0x000e, 0x0005,
+	0x00e6, 0x00d6, 0x0096, 0x0066, 0x080c, 0x61a4, 0x11b0, 0x2071,
+	0x19e6, 0x7030, 0x9080, 0x0005, 0x2004, 0x904d, 0x0170, 0xa878,
+	0x9606, 0x1158, 0x2071, 0x19e6, 0x7030, 0x9035, 0x0130, 0x9080,
+	0x0005, 0x2004, 0x9906, 0x1108, 0x0029, 0x006e, 0x009e, 0x00de,
+	0x00ee, 0x0005, 0x00c6, 0x2660, 0x6043, 0xffff, 0x080c, 0xab00,
+	0x0178, 0x080c, 0xa042, 0x6014, 0x2048, 0xa867, 0x0103, 0xab7a,
+	0xa877, 0x0000, 0x080c, 0xcc7f, 0x080c, 0x6dee, 0x080c, 0xaceb,
+	0x00ce, 0x0005, 0x00b6, 0x00e6, 0x00c6, 0x080c, 0xa91e, 0x0106,
+	0x2071, 0x0101, 0x2e04, 0xc0c4, 0x2072, 0x6044, 0xd0fc, 0x1138,
+	0x010e, 0x090c, 0xa93a, 0x00ce, 0x00ee, 0x00be, 0x0005, 0x2071,
+	0x19e6, 0x7030, 0x9005, 0x0da0, 0x9c06, 0x190c, 0x0d7d, 0x7036,
+	0x080c, 0x8780, 0x7004, 0x9084, 0x0007, 0x0002, 0x96a8, 0x96aa,
+	0x96b1, 0x96bb, 0x96c9, 0x96a8, 0x96b6, 0x96a6, 0x080c, 0x0d7d,
+	0x0428, 0x0005, 0x080c, 0xaaeb, 0x7007, 0x0000, 0x7033, 0x0000,
+	0x00e8, 0x0066, 0x9036, 0x080c, 0xa042, 0x006e, 0x7007, 0x0000,
+	0x7033, 0x0000, 0x0098, 0x080c, 0xaad6, 0x0140, 0x080c, 0xaaeb,
+	0x0128, 0x0066, 0x9036, 0x080c, 0xa042, 0x006e, 0x7033, 0x0000,
+	0x0028, 0x080c, 0xaad6, 0x080c, 0xa3ac, 0x0000, 0x010e, 0x090c,
+	0xa93a, 0x00ce, 0x00ee, 0x00be, 0x0005, 0x00d6, 0x00c6, 0x080c,
+	0xa91e, 0x0106, 0x6044, 0xd0fc, 0x1130, 0x010e, 0x090c, 0xa93a,
+	0x00ce, 0x00de, 0x0005, 0x2069, 0x19e6, 0x684c, 0x9005, 0x0da8,
+	0x9c06, 0x190c, 0x0d7d, 0x6852, 0x00e6, 0x2d70, 0x080c, 0x9300,
+	0x00ee, 0x080c, 0x878d, 0x0016, 0x2009, 0x0040, 0x080c, 0x220a,
+	0x001e, 0x683c, 0x9084, 0x0003, 0x0002, 0x9703, 0x9704, 0x9722,
+	0x9701, 0x080c, 0x0d7d, 0x0460, 0x6868, 0x9086, 0x0001, 0x0190,
+	0x600c, 0x9015, 0x0160, 0x6a4a, 0x600f, 0x0000, 0x6044, 0xc0fc,
+	0x6046, 0x9006, 0x7042, 0x684e, 0x683f, 0x0000, 0x00c8, 0x684a,
+	0x6846, 0x0ca0, 0x686b, 0x0000, 0x6848, 0x9065, 0x0d78, 0x6003,
+	0x0002, 0x0c60, 0x9006, 0x686a, 0x6852, 0x686e, 0x600c, 0x9015,
+	0x0120, 0x6a4a, 0x600f, 0x0000, 0x0018, 0x684e, 0x684a, 0x6846,
+	0x684f, 0x0000, 0x010e, 0x090c, 0xa93a, 0x00ce, 0x00de, 0x0005,
+	0x0005, 0x6020, 0x9084, 0x000f, 0x000b, 0x0005, 0x974e, 0x9751,
+	0x9bbf, 0x9c58, 0x9751, 0x9bbf, 0x9c58, 0x974e, 0x9751, 0x974e,
+	0x974e, 0x974e, 0x974e, 0x974e, 0x974e, 0x974e, 0x080c, 0x967a,
+	0x0005, 0x00b6, 0x0156, 0x0136, 0x0146, 0x01c6, 0x01d6, 0x00c6,
+	0x00d6, 0x00e6, 0x00f6, 0x2069, 0x0200, 0x2071, 0x0240, 0x6004,
+	0x908a, 0x0053, 0x1a0c, 0x0d7d, 0x6110, 0x2158, 0xb984, 0x2c78,
+	0x2061, 0x0100, 0x619a, 0x908a, 0x0040, 0x1a04, 0x97bd, 0x005b,
+	0x00fe, 0x00ee, 0x00de, 0x00ce, 0x01de, 0x01ce, 0x014e, 0x013e,
+	0x015e, 0x00be, 0x0005, 0x9942, 0x997d, 0x99a6, 0x9a4e, 0x9a70,
+	0x9a76, 0x9a83, 0x9a8b, 0x9a97, 0x9a9d, 0x9aae, 0x9a9d, 0x9b06,
+	0x9a8b, 0x9b12, 0x9b18, 0x9a97, 0x9b18, 0x9b24, 0x97bb, 0x97bb,
+	0x97bb, 0x97bb, 0x97bb, 0x97bb, 0x97bb, 0x97bb, 0x97bb, 0x97bb,
+	0x97bb, 0xa063, 0xa086, 0xa097, 0xa0b7, 0xa0e9, 0x9a83, 0x97bb,
+	0x9a83, 0x9a9d, 0x97bb, 0x99a6, 0x9a4e, 0x97bb, 0xa4aa, 0x9a9d,
+	0x97bb, 0xa4c6, 0x9a9d, 0x97bb, 0x9a97, 0x993c, 0x97de, 0x97bb,
+	0xa4e2, 0xa54f, 0xa633, 0x97bb, 0xa640, 0x9a80, 0xa66b, 0x97bb,
+	0xa0f3, 0xa677, 0x97bb, 0x080c, 0x0d7d, 0x2100, 0x005b, 0x00fe,
+	0x00ee, 0x00de, 0x00ce, 0x01de, 0x01ce, 0x014e, 0x013e, 0x015e,
+	0x00be, 0x0005, 0xa717, 0xa7c9, 0x97dc, 0x9805, 0x98b1, 0x98bc,
+	0x97dc, 0x9a83, 0x97dc, 0x9903, 0x990f, 0x9820, 0x97dc, 0x983b,
+	0x986f, 0xab56, 0xab9b, 0x9a9d, 0x080c, 0x0d7d, 0x00d6, 0x0096,
+	0x080c, 0x9b37, 0x7003, 0x2414, 0x7007, 0x0018, 0x700b, 0x0800,
+	0x7814, 0x2048, 0xa83c, 0x700e, 0xa850, 0x7022, 0xa854, 0x7026,
+	0x60c3, 0x0018, 0x080c, 0x9ea4, 0x009e, 0x00de, 0x0005, 0x7810,
+	0x00b6, 0x2058, 0xb8a0, 0x00be, 0x080c, 0xabe2, 0x1118, 0x9084,
+	0xff80, 0x0110, 0x9085, 0x0001, 0x0005, 0x00d6, 0x0096, 0x080c,
+	0x9b37, 0x7003, 0x0500, 0x7814, 0x2048, 0xa874, 0x700a, 0xa878,
+	0x700e, 0xa87c, 0x7012, 0xa880, 0x7016, 0xa884, 0x701a, 0xa888,
+	0x701e, 0x60c3, 0x0010, 0x080c, 0x9ea4, 0x009e, 0x00de, 0x0005,
+	0x00d6, 0x0096, 0x080c, 0x9b37, 0x7003, 0x0500, 0x7814, 0x2048,
+	0xa8cc, 0x700a, 0xa8d0, 0x700e, 0xa8d4, 0x7012, 0xa8d8, 0x7016,
+	0xa8dc, 0x701a, 0xa8e0, 0x701e, 0x60c3, 0x0010, 0x080c, 0x9ea4,
+	0x009e, 0x00de, 0x0005, 0x00d6, 0x0096, 0x0126, 0x2091, 0x8000,
+	0x080c, 0x9b37, 0x20e9, 0x0000, 0x2001, 0x19a2, 0x2003, 0x0000,
+	0x7814, 0x2048, 0xa814, 0x8003, 0x60c2, 0xa830, 0x20a8, 0xa860,
+	0x20e0, 0xa85c, 0x9080, 0x001b, 0x2098, 0x2001, 0x19a2, 0x0016,
+	0x200c, 0x2001, 0x0001, 0x080c, 0x21ef, 0x080c, 0xd72b, 0x9006,
+	0x080c, 0x21ef, 0x001e, 0xa804, 0x9005, 0x0110, 0x2048, 0x0c28,
+	0x04d9, 0x080c, 0x9ea4, 0x012e, 0x009e, 0x00de, 0x0005, 0x00d6,
+	0x0096, 0x0126, 0x2091, 0x8000, 0x080c, 0x9b82, 0x20e9, 0x0000,
+	0x2001, 0x19a2, 0x2003, 0x0000, 0x7814, 0x2048, 0xa86f, 0x0200,
+	0xa873, 0x0000, 0xa814, 0x8003, 0x60c2, 0xa830, 0x20a8, 0xa860,
+	0x20e0, 0xa85c, 0x9080, 0x001b, 0x2098, 0x2001, 0x19a2, 0x0016,
+	0x200c, 0x080c, 0xd72b, 0x001e, 0xa804, 0x9005, 0x0110, 0x2048,
+	0x0c60, 0x0051, 0x7814, 0x2048, 0x080c, 0x0ff9, 0x080c, 0x9ea4,
+	0x012e, 0x009e, 0x00de, 0x0005, 0x60c0, 0x8004, 0x9084, 0x0003,
+	0x9005, 0x0130, 0x9082, 0x0004, 0x20a3, 0x0000, 0x8000, 0x1de0,
+	0x0005, 0x080c, 0x9b37, 0x7003, 0x7800, 0x7808, 0x8007, 0x700a,
+	0x60c3, 0x0008, 0x0804, 0x9ea4, 0x00d6, 0x00e6, 0x080c, 0x9b82,
+	0x7814, 0x9084, 0xff00, 0x2073, 0x0200, 0x8e70, 0x8e70, 0x9095,
+	0x0010, 0x2272, 0x8e70, 0x2073, 0x0034, 0x8e70, 0x2069, 0x1805,
+	0x20a9, 0x0004, 0x2d76, 0x8d68, 0x8e70, 0x1f04, 0x98d2, 0x2069,
+	0x1801, 0x20a9, 0x0004, 0x2d76, 0x8d68, 0x8e70, 0x1f04, 0x98db,
+	0x2069, 0x19b2, 0x9086, 0xdf00, 0x0110, 0x2069, 0x19cc, 0x20a9,
+	0x001a, 0x9e86, 0x0260, 0x1148, 0x00c6, 0x2061, 0x0200, 0x6010,
+	0x8000, 0x6012, 0x00ce, 0x2071, 0x0240, 0x2d04, 0x8007, 0x2072,
+	0x8d68, 0x8e70, 0x1f04, 0x98e9, 0x60c3, 0x004c, 0x080c, 0x9ea4,
+	0x00ee, 0x00de, 0x0005, 0x080c, 0x9b37, 0x7003, 0x6300, 0x7007,
+	0x0028, 0x7808, 0x700e, 0x60c3, 0x0008, 0x0804, 0x9ea4, 0x00d6,
+	0x0026, 0x0016, 0x080c, 0x9b82, 0x7003, 0x0200, 0x7814, 0x700e,
+	0x00e6, 0x9ef0, 0x0004, 0x2009, 0x0001, 0x2011, 0x000c, 0x2069,
+	0x1923, 0x6810, 0xd084, 0x1148, 0x2073, 0x0500, 0x8e70, 0x2073,
+	0x0000, 0x8e70, 0x8108, 0x9290, 0x0004, 0x2073, 0x0800, 0x8e70,
+	0x2073, 0x0000, 0x00ee, 0x7206, 0x710a, 0x62c2, 0x080c, 0x9ea4,
+	0x001e, 0x002e, 0x00de, 0x0005, 0x2001, 0x1818, 0x2004, 0x609a,
+	0x0804, 0x9ea4, 0x080c, 0x9b37, 0x7003, 0x5200, 0x2069, 0x1847,
+	0x6804, 0xd084, 0x0130, 0x6828, 0x0016, 0x080c, 0x2694, 0x710e,
+	0x001e, 0x20a9, 0x0004, 0x20e1, 0x0001, 0x2099, 0x1805, 0x20e9,
+	0x0000, 0x20a1, 0x0250, 0x4003, 0x20a9, 0x0004, 0x2099, 0x1801,
+	0x20a1, 0x0254, 0x4003, 0x080c, 0xabe2, 0x1120, 0xb8a0, 0x9082,
+	0x007f, 0x0248, 0x2001, 0x181f, 0x2004, 0x7032, 0x2001, 0x1820,
+	0x2004, 0x7036, 0x0030, 0x2001, 0x1818, 0x2004, 0x9084, 0x00ff,
+	0x7036, 0x60c3, 0x001c, 0x0804, 0x9ea4, 0x080c, 0x9b37, 0x7003,
+	0x0500, 0x080c, 0xabe2, 0x1120, 0xb8a0, 0x9082, 0x007f, 0x0248,
+	0x2001, 0x181f, 0x2004, 0x700a, 0x2001, 0x1820, 0x2004, 0x700e,
+	0x0030, 0x2001, 0x1818, 0x2004, 0x9084, 0x00ff, 0x700e, 0x20a9,
+	0x0004, 0x20e1, 0x0001, 0x2099, 0x1805, 0x20e9, 0x0000, 0x20a1,
+	0x0250, 0x4003, 0x60c3, 0x0010, 0x0804, 0x9ea4, 0x080c, 0x9b37,
+	0x9006, 0x080c, 0x6aa7, 0xb8a0, 0x9086, 0x007e, 0x1130, 0x7003,
+	0x0400, 0x620c, 0xc2b4, 0x620e, 0x0058, 0x7814, 0x0096, 0x904d,
+	0x0120, 0x9006, 0xa89a, 0xa8a6, 0xa8aa, 0x009e, 0x7003, 0x0300,
+	0xb8a0, 0x9086, 0x007e, 0x1904, 0x9a15, 0x00d6, 0x2069, 0x196b,
+	0x2001, 0x1837, 0x2004, 0xd0a4, 0x0188, 0x6800, 0x700a, 0x6808,
+	0x9084, 0x2000, 0x7012, 0x080c, 0xabf9, 0x680c, 0x7016, 0x701f,
+	0x2710, 0x6818, 0x7022, 0x681c, 0x7026, 0x0090, 0x6800, 0x700a,
+	0x6804, 0x700e, 0x6808, 0x080c, 0x753d, 0x1118, 0x9084, 0x37ff,
+	0x0010, 0x9084, 0x3fff, 0x7012, 0x080c, 0xabf9, 0x680c, 0x7016,
+	0x00de, 0x20a9, 0x0004, 0x20e1, 0x0001, 0x2099, 0x1805, 0x20e9,
+	0x0000, 0x20a1, 0x0256, 0x4003, 0x20a9, 0x0004, 0x2099, 0x1801,
+	0x20a1, 0x025a, 0x4003, 0x00d6, 0x080c, 0xa6fe, 0x2069, 0x1973,
+	0x2071, 0x024e, 0x6800, 0xc0dd, 0x7002, 0x080c, 0x5742, 0xd0e4,
+	0x0110, 0x680c, 0x700e, 0x00de, 0x04a8, 0x2001, 0x1837, 0x2004,
+	0xd0a4, 0x0170, 0x0016, 0x2001, 0x196c, 0x200c, 0x60e0, 0x9106,
+	0x0130, 0x2100, 0x60e3, 0x0000, 0x080c, 0x26d5, 0x61e2, 0x001e,
+	0x20e1, 0x0001, 0x2099, 0x196b, 0x20e9, 0x0000, 0x20a1, 0x024e,
+	0x20a9, 0x0008, 0x4003, 0x20a9, 0x0004, 0x2099, 0x1805, 0x20a1,
+	0x0256, 0x4003, 0x20a9, 0x0004, 0x2099, 0x1801, 0x20a1, 0x025a,
+	0x4003, 0x080c, 0xa6fe, 0x20a1, 0x024e, 0x20a9, 0x0008, 0x2099,
+	0x1973, 0x4003, 0x60c3, 0x0074, 0x0804, 0x9ea4, 0x080c, 0x9b37,
+	0x7003, 0x2010, 0x7007, 0x0014, 0x700b, 0x0800, 0x700f, 0x2000,
+	0x9006, 0x00f6, 0x2079, 0x1847, 0x7904, 0x00fe, 0xd1ac, 0x1110,
+	0x9085, 0x0020, 0xd1a4, 0x0110, 0x9085, 0x0010, 0x9085, 0x0002,
+	0x00d6, 0x0804, 0x9ae7, 0x7026, 0x60c3, 0x0014, 0x0804, 0x9ea4,
+	0x080c, 0x9b37, 0x7003, 0x5000, 0x0804, 0x99c0, 0x080c, 0x9b37,
+	0x7003, 0x2110, 0x7007, 0x0014, 0x60c3, 0x0014, 0x0804, 0x9ea4,
+	0x080c, 0x9b79, 0x0010, 0x080c, 0x9b82, 0x7003, 0x0200, 0x60c3,
+	0x0004, 0x0804, 0x9ea4, 0x080c, 0x9b82, 0x7003, 0x0100, 0x700b,
+	0x0003, 0x700f, 0x2a00, 0x60c3, 0x0008, 0x0804, 0x9ea4, 0x080c,
+	0x9b82, 0x7003, 0x0200, 0x0804, 0x99c0, 0x080c, 0x9b82, 0x7003,
+	0x0100, 0x782c, 0x9005, 0x0110, 0x700a, 0x0010, 0x700b, 0x0003,
+	0x7814, 0x700e, 0x60c3, 0x0008, 0x0804, 0x9ea4, 0x00d6, 0x080c,
+	0x9b82, 0x7003, 0x0210, 0x7007, 0x0014, 0x700b, 0x0800, 0xb894,
+	0x9086, 0x0014, 0x1198, 0xb99c, 0x9184, 0x0030, 0x0190, 0xb998,
+	0x9184, 0xc000, 0x1140, 0xd1ec, 0x0118, 0x700f, 0x2100, 0x0058,
+	0x700f, 0x0100, 0x0040, 0x700f, 0x0400, 0x0028, 0x700f, 0x0700,
+	0x0010, 0x700f, 0x0800, 0x00f6, 0x2079, 0x1847, 0x7904, 0x00fe,
+	0xd1ac, 0x1110, 0x9085, 0x0020, 0xd1a4, 0x0110, 0x9085, 0x0010,
+	0x2009, 0x1869, 0x210c, 0xd184, 0x1110, 0x9085, 0x0002, 0x0026,
+	0x2009, 0x1867, 0x210c, 0xd1e4, 0x0150, 0xc0c5, 0xbad4, 0xd28c,
+	0x1108, 0xc0cd, 0x9094, 0x0030, 0x9296, 0x0010, 0x0140, 0xd1ec,
+	0x0130, 0x9094, 0x0030, 0x9296, 0x0010, 0x0108, 0xc0bd, 0x002e,
+	0x7026, 0x60c3, 0x0014, 0x00de, 0x0804, 0x9ea4, 0x080c, 0x9b82,
+	0x7003, 0x0210, 0x7007, 0x0014, 0x700f, 0x0100, 0x60c3, 0x0014,
+	0x0804, 0x9ea4, 0x080c, 0x9b82, 0x7003, 0x0200, 0x0804, 0x9946,
+	0x080c, 0x9b82, 0x7003, 0x0100, 0x700b, 0x0003, 0x700f, 0x2a00,
+	0x60c3, 0x0008, 0x0804, 0x9ea4, 0x080c, 0x9b82, 0x7003, 0x0100,
+	0x700b, 0x000b, 0x60c3, 0x0008, 0x0804, 0x9ea4, 0x0026, 0x00d6,
+	0x0036, 0x0046, 0x2019, 0x3200, 0x2021, 0x0800, 0x0040, 0x0026,
+	0x00d6, 0x0036, 0x0046, 0x2019, 0x2200, 0x2021, 0x0100, 0x080c,
+	0xa713, 0xb810, 0x9305, 0x7002, 0xb814, 0x7006, 0x2069, 0x1800,
+	0x687c, 0x700a, 0x6880, 0x700e, 0x9485, 0x0029, 0x7012, 0x004e,
+	0x003e, 0x00de, 0x080c, 0x9e98, 0x721a, 0x9f95, 0x0000, 0x7222,
+	0x7027, 0xffff, 0x2071, 0x024c, 0x002e, 0x0005, 0x0026, 0x080c,
+	0xa713, 0x7003, 0x02ff, 0x7007, 0xfffc, 0x00d6, 0x2069, 0x1800,
+	0x687c, 0x700a, 0x6880, 0x700e, 0x00de, 0x7013, 0x2029, 0x0c10,
+	0x7003, 0x0100, 0x7007, 0x0000, 0x700b, 0xfc02, 0x700f, 0x0000,
+	0x0005, 0x0026, 0x00d6, 0x0036, 0x0046, 0x2019, 0x3300, 0x2021,
+	0x0800, 0x0040, 0x0026, 0x00d6, 0x0036, 0x0046, 0x2019, 0x2300,
+	0x2021, 0x0100, 0x080c, 0xa713, 0xb810, 0x9305, 0x7002, 0xb814,
+	0x7006, 0x2069, 0x1800, 0xb810, 0x9005, 0x1140, 0xb814, 0x9005,
+	0x1128, 0x700b, 0x00ff, 0x700f, 0xfffe, 0x0020, 0x687c, 0x700a,
+	0x6880, 0x700e, 0x0000, 0x9485, 0x0098, 0x7012, 0x004e, 0x003e,
+	0x00de, 0x080c, 0x9e98, 0x721a, 0x7a08, 0x7222, 0x2f10, 0x7226,
+	0x2071, 0x024c, 0x002e, 0x0005, 0x080c, 0x9e98, 0x721a, 0x7a08,
+	0x7222, 0x7814, 0x7026, 0x2071, 0x024c, 0x002e, 0x0005, 0x00b6,
+	0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x2069, 0x0200, 0x2071, 0x0240,
+	0x6004, 0x908a, 0x0085, 0x0a0c, 0x0d7d, 0x908a, 0x0092, 0x1a0c,
 	0x0d7d, 0x6110, 0x2158, 0xb984, 0x2c78, 0x2061, 0x0100, 0x619a,
-	0x908a, 0x0040, 0x1a04, 0x9742, 0x005b, 0x00fe, 0x00ee, 0x00de,
-	0x00ce, 0x01de, 0x01ce, 0x014e, 0x013e, 0x015e, 0x00be, 0x0005,
-	0x98c7, 0x9902, 0x992b, 0x99d3, 0x99f5, 0x99fb, 0x9a08, 0x9a10,
-	0x9a1c, 0x9a22, 0x9a33, 0x9a22, 0x9a8b, 0x9a10, 0x9a97, 0x9a9d,
-	0x9a1c, 0x9a9d, 0x9aa9, 0x9740, 0x9740, 0x9740, 0x9740, 0x9740,
-	0x9740, 0x9740, 0x9740, 0x9740, 0x9740, 0x9740, 0x9fde, 0xa001,
-	0xa012, 0xa032, 0xa064, 0x9a08, 0x9740, 0x9a08, 0x9a22, 0x9740,
-	0x992b, 0x99d3, 0x9740, 0xa425, 0x9a22, 0x9740, 0xa441, 0x9a22,
-	0x9740, 0x9a1c, 0x98c1, 0x9763, 0x9740, 0xa45d, 0xa4ca, 0xa5ae,
-	0x9740, 0xa5bb, 0x9a05, 0xa5e6, 0x9740, 0xa06e, 0xa5f2, 0x9740,
-	0x080c, 0x0d7d, 0x2100, 0x005b, 0x00fe, 0x00ee, 0x00de, 0x00ce,
-	0x01de, 0x01ce, 0x014e, 0x013e, 0x015e, 0x00be, 0x0005, 0xa692,
-	0xa744, 0x9761, 0x978a, 0x9836, 0x9841, 0x9761, 0x9a08, 0x9761,
-	0x9888, 0x9894, 0x97a5, 0x9761, 0x97c0, 0x97f4, 0xaace, 0xab13,
-	0x9a22, 0x080c, 0x0d7d, 0x00d6, 0x0096, 0x080c, 0x9abc, 0x7003,
-	0x2414, 0x7007, 0x0018, 0x700b, 0x0800, 0x7814, 0x2048, 0xa83c,
-	0x700e, 0xa850, 0x7022, 0xa854, 0x7026, 0x60c3, 0x0018, 0x080c,
-	0x9e1f, 0x009e, 0x00de, 0x0005, 0x7810, 0x00b6, 0x2058, 0xb8a0,
-	0x00be, 0x080c, 0xab5a, 0x1118, 0x9084, 0xff80, 0x0110, 0x9085,
-	0x0001, 0x0005, 0x00d6, 0x0096, 0x080c, 0x9abc, 0x7003, 0x0500,
-	0x7814, 0x2048, 0xa874, 0x700a, 0xa878, 0x700e, 0xa87c, 0x7012,
-	0xa880, 0x7016, 0xa884, 0x701a, 0xa888, 0x701e, 0x60c3, 0x0010,
-	0x080c, 0x9e1f, 0x009e, 0x00de, 0x0005, 0x00d6, 0x0096, 0x080c,
-	0x9abc, 0x7003, 0x0500, 0x7814, 0x2048, 0xa8cc, 0x700a, 0xa8d0,
-	0x700e, 0xa8d4, 0x7012, 0xa8d8, 0x7016, 0xa8dc, 0x701a, 0xa8e0,
-	0x701e, 0x60c3, 0x0010, 0x080c, 0x9e1f, 0x009e, 0x00de, 0x0005,
-	0x00d6, 0x0096, 0x0126, 0x2091, 0x8000, 0x080c, 0x9abc, 0x20e9,
-	0x0000, 0x2001, 0x19a2, 0x2003, 0x0000, 0x7814, 0x2048, 0xa814,
-	0x8003, 0x60c2, 0xa830, 0x20a8, 0xa860, 0x20e0, 0xa85c, 0x9080,
-	0x001b, 0x2098, 0x2001, 0x19a2, 0x0016, 0x200c, 0x2001, 0x0001,
-	0x080c, 0x21be, 0x080c, 0xd5f1, 0x9006, 0x080c, 0x21be, 0x001e,
-	0xa804, 0x9005, 0x0110, 0x2048, 0x0c28, 0x04d9, 0x080c, 0x9e1f,
-	0x012e, 0x009e, 0x00de, 0x0005, 0x00d6, 0x0096, 0x0126, 0x2091,
-	0x8000, 0x080c, 0x9b07, 0x20e9, 0x0000, 0x2001, 0x19a2, 0x2003,
-	0x0000, 0x7814, 0x2048, 0xa86f, 0x0200, 0xa873, 0x0000, 0xa814,
-	0x8003, 0x60c2, 0xa830, 0x20a8, 0xa860, 0x20e0, 0xa85c, 0x9080,
-	0x001b, 0x2098, 0x2001, 0x19a2, 0x0016, 0x200c, 0x080c, 0xd5f1,
-	0x001e, 0xa804, 0x9005, 0x0110, 0x2048, 0x0c60, 0x0051, 0x7814,
-	0x2048, 0x080c, 0x0ff9, 0x080c, 0x9e1f, 0x012e, 0x009e, 0x00de,
-	0x0005, 0x60c0, 0x8004, 0x9084, 0x0003, 0x9005, 0x0130, 0x9082,
-	0x0004, 0x20a3, 0x0000, 0x8000, 0x1de0, 0x0005, 0x080c, 0x9abc,
-	0x7003, 0x7800, 0x7808, 0x8007, 0x700a, 0x60c3, 0x0008, 0x0804,
-	0x9e1f, 0x00d6, 0x00e6, 0x080c, 0x9b07, 0x7814, 0x9084, 0xff00,
-	0x2073, 0x0200, 0x8e70, 0x8e70, 0x9095, 0x0010, 0x2272, 0x8e70,
-	0x2073, 0x0034, 0x8e70, 0x2069, 0x1805, 0x20a9, 0x0004, 0x2d76,
-	0x8d68, 0x8e70, 0x1f04, 0x9857, 0x2069, 0x1801, 0x20a9, 0x0004,
-	0x2d76, 0x8d68, 0x8e70, 0x1f04, 0x9860, 0x2069, 0x19b2, 0x9086,
-	0xdf00, 0x0110, 0x2069, 0x19cc, 0x20a9, 0x001a, 0x9e86, 0x0260,
-	0x1148, 0x00c6, 0x2061, 0x0200, 0x6010, 0x8000, 0x6012, 0x00ce,
-	0x2071, 0x0240, 0x2d04, 0x8007, 0x2072, 0x8d68, 0x8e70, 0x1f04,
-	0x986e, 0x60c3, 0x004c, 0x080c, 0x9e1f, 0x00ee, 0x00de, 0x0005,
-	0x080c, 0x9abc, 0x7003, 0x6300, 0x7007, 0x0028, 0x7808, 0x700e,
-	0x60c3, 0x0008, 0x0804, 0x9e1f, 0x00d6, 0x0026, 0x0016, 0x080c,
-	0x9b07, 0x7003, 0x0200, 0x7814, 0x700e, 0x00e6, 0x9ef0, 0x0004,
-	0x2009, 0x0001, 0x2011, 0x000c, 0x2069, 0x1923, 0x6810, 0xd084,
-	0x1148, 0x2073, 0x0500, 0x8e70, 0x2073, 0x0000, 0x8e70, 0x8108,
-	0x9290, 0x0004, 0x2073, 0x0800, 0x8e70, 0x2073, 0x0000, 0x00ee,
-	0x7206, 0x710a, 0x62c2, 0x080c, 0x9e1f, 0x001e, 0x002e, 0x00de,
-	0x0005, 0x2001, 0x1818, 0x2004, 0x609a, 0x0804, 0x9e1f, 0x080c,
-	0x9abc, 0x7003, 0x5200, 0x2069, 0x1847, 0x6804, 0xd084, 0x0130,
-	0x6828, 0x0016, 0x080c, 0x2663, 0x710e, 0x001e, 0x20a9, 0x0004,
-	0x20e1, 0x0001, 0x2099, 0x1805, 0x20e9, 0x0000, 0x20a1, 0x0250,
-	0x4003, 0x20a9, 0x0004, 0x2099, 0x1801, 0x20a1, 0x0254, 0x4003,
-	0x080c, 0xab5a, 0x1120, 0xb8a0, 0x9082, 0x007f, 0x0248, 0x2001,
-	0x181f, 0x2004, 0x7032, 0x2001, 0x1820, 0x2004, 0x7036, 0x0030,
-	0x2001, 0x1818, 0x2004, 0x9084, 0x00ff, 0x7036, 0x60c3, 0x001c,
-	0x0804, 0x9e1f, 0x080c, 0x9abc, 0x7003, 0x0500, 0x080c, 0xab5a,
-	0x1120, 0xb8a0, 0x9082, 0x007f, 0x0248, 0x2001, 0x181f, 0x2004,
-	0x700a, 0x2001, 0x1820, 0x2004, 0x700e, 0x0030, 0x2001, 0x1818,
-	0x2004, 0x9084, 0x00ff, 0x700e, 0x20a9, 0x0004, 0x20e1, 0x0001,
-	0x2099, 0x1805, 0x20e9, 0x0000, 0x20a1, 0x0250, 0x4003, 0x60c3,
-	0x0010, 0x0804, 0x9e1f, 0x080c, 0x9abc, 0x9006, 0x080c, 0x6a58,
-	0xb8a0, 0x9086, 0x007e, 0x1130, 0x7003, 0x0400, 0x620c, 0xc2b4,
-	0x620e, 0x0058, 0x7814, 0x0096, 0x904d, 0x0120, 0x9006, 0xa89a,
-	0xa8a6, 0xa8aa, 0x009e, 0x7003, 0x0300, 0xb8a0, 0x9086, 0x007e,
-	0x1904, 0x999a, 0x00d6, 0x2069, 0x196b, 0x2001, 0x1837, 0x2004,
-	0xd0a4, 0x0188, 0x6800, 0x700a, 0x6808, 0x9084, 0x2000, 0x7012,
-	0x080c, 0xab71, 0x680c, 0x7016, 0x701f, 0x2710, 0x6818, 0x7022,
-	0x681c, 0x7026, 0x0090, 0x6800, 0x700a, 0x6804, 0x700e, 0x6808,
-	0x080c, 0x74ec, 0x1118, 0x9084, 0x37ff, 0x0010, 0x9084, 0x3fff,
-	0x7012, 0x080c, 0xab71, 0x680c, 0x7016, 0x00de, 0x20a9, 0x0004,
-	0x20e1, 0x0001, 0x2099, 0x1805, 0x20e9, 0x0000, 0x20a1, 0x0256,
-	0x4003, 0x20a9, 0x0004, 0x2099, 0x1801, 0x20a1, 0x025a, 0x4003,
-	0x00d6, 0x080c, 0xa679, 0x2069, 0x1973, 0x2071, 0x024e, 0x6800,
-	0xc0dd, 0x7002, 0x080c, 0x56f9, 0xd0e4, 0x0110, 0x680c, 0x700e,
-	0x00de, 0x04a8, 0x2001, 0x1837, 0x2004, 0xd0a4, 0x0170, 0x0016,
-	0x2001, 0x196c, 0x200c, 0x60e0, 0x9106, 0x0130, 0x2100, 0x60e3,
-	0x0000, 0x080c, 0x26a4, 0x61e2, 0x001e, 0x20e1, 0x0001, 0x2099,
-	0x196b, 0x20e9, 0x0000, 0x20a1, 0x024e, 0x20a9, 0x0008, 0x4003,
-	0x20a9, 0x0004, 0x2099, 0x1805, 0x20a1, 0x0256, 0x4003, 0x20a9,
-	0x0004, 0x2099, 0x1801, 0x20a1, 0x025a, 0x4003, 0x080c, 0xa679,
-	0x20a1, 0x024e, 0x20a9, 0x0008, 0x2099, 0x1973, 0x4003, 0x60c3,
-	0x0074, 0x0804, 0x9e1f, 0x080c, 0x9abc, 0x7003, 0x2010, 0x7007,
-	0x0014, 0x700b, 0x0800, 0x700f, 0x2000, 0x9006, 0x00f6, 0x2079,
-	0x1847, 0x7904, 0x00fe, 0xd1ac, 0x1110, 0x9085, 0x0020, 0xd1a4,
-	0x0110, 0x9085, 0x0010, 0x9085, 0x0002, 0x00d6, 0x0804, 0x9a6c,
-	0x7026, 0x60c3, 0x0014, 0x0804, 0x9e1f, 0x080c, 0x9abc, 0x7003,
-	0x5000, 0x0804, 0x9945, 0x080c, 0x9abc, 0x7003, 0x2110, 0x7007,
-	0x0014, 0x60c3, 0x0014, 0x0804, 0x9e1f, 0x080c, 0x9afe, 0x0010,
-	0x080c, 0x9b07, 0x7003, 0x0200, 0x60c3, 0x0004, 0x0804, 0x9e1f,
-	0x080c, 0x9b07, 0x7003, 0x0100, 0x700b, 0x0003, 0x700f, 0x2a00,
-	0x60c3, 0x0008, 0x0804, 0x9e1f, 0x080c, 0x9b07, 0x7003, 0x0200,
-	0x0804, 0x9945, 0x080c, 0x9b07, 0x7003, 0x0100, 0x782c, 0x9005,
-	0x0110, 0x700a, 0x0010, 0x700b, 0x0003, 0x7814, 0x700e, 0x60c3,
-	0x0008, 0x0804, 0x9e1f, 0x00d6, 0x080c, 0x9b07, 0x7003, 0x0210,
-	0x7007, 0x0014, 0x700b, 0x0800, 0xb894, 0x9086, 0x0014, 0x1198,
-	0xb99c, 0x9184, 0x0030, 0x0190, 0xb998, 0x9184, 0xc000, 0x1140,
-	0xd1ec, 0x0118, 0x700f, 0x2100, 0x0058, 0x700f, 0x0100, 0x0040,
-	0x700f, 0x0400, 0x0028, 0x700f, 0x0700, 0x0010, 0x700f, 0x0800,
-	0x00f6, 0x2079, 0x1847, 0x7904, 0x00fe, 0xd1ac, 0x1110, 0x9085,
-	0x0020, 0xd1a4, 0x0110, 0x9085, 0x0010, 0x2009, 0x1869, 0x210c,
-	0xd184, 0x1110, 0x9085, 0x0002, 0x0026, 0x2009, 0x1867, 0x210c,
-	0xd1e4, 0x0150, 0xc0c5, 0xbad4, 0xd28c, 0x1108, 0xc0cd, 0x9094,
-	0x0030, 0x9296, 0x0010, 0x0140, 0xd1ec, 0x0130, 0x9094, 0x0030,
-	0x9296, 0x0010, 0x0108, 0xc0bd, 0x002e, 0x7026, 0x60c3, 0x0014,
-	0x00de, 0x0804, 0x9e1f, 0x080c, 0x9b07, 0x7003, 0x0210, 0x7007,
-	0x0014, 0x700f, 0x0100, 0x60c3, 0x0014, 0x0804, 0x9e1f, 0x080c,
-	0x9b07, 0x7003, 0x0200, 0x0804, 0x98cb, 0x080c, 0x9b07, 0x7003,
-	0x0100, 0x700b, 0x0003, 0x700f, 0x2a00, 0x60c3, 0x0008, 0x0804,
-	0x9e1f, 0x080c, 0x9b07, 0x7003, 0x0100, 0x700b, 0x000b, 0x60c3,
-	0x0008, 0x0804, 0x9e1f, 0x0026, 0x00d6, 0x0036, 0x0046, 0x2019,
-	0x3200, 0x2021, 0x0800, 0x0040, 0x0026, 0x00d6, 0x0036, 0x0046,
-	0x2019, 0x2200, 0x2021, 0x0100, 0x080c, 0xa68e, 0xb810, 0x9305,
-	0x7002, 0xb814, 0x7006, 0x2069, 0x1800, 0x687c, 0x700a, 0x6880,
-	0x700e, 0x9485, 0x0029, 0x7012, 0x004e, 0x003e, 0x00de, 0x080c,
-	0x9e13, 0x721a, 0x9f95, 0x0000, 0x7222, 0x7027, 0xffff, 0x2071,
-	0x024c, 0x002e, 0x0005, 0x0026, 0x080c, 0xa68e, 0x7003, 0x02ff,
-	0x7007, 0xfffc, 0x00d6, 0x2069, 0x1800, 0x687c, 0x700a, 0x6880,
-	0x700e, 0x00de, 0x7013, 0x2029, 0x0c10, 0x7003, 0x0100, 0x7007,
-	0x0000, 0x700b, 0xfc02, 0x700f, 0x0000, 0x0005, 0x0026, 0x00d6,
-	0x0036, 0x0046, 0x2019, 0x3300, 0x2021, 0x0800, 0x0040, 0x0026,
-	0x00d6, 0x0036, 0x0046, 0x2019, 0x2300, 0x2021, 0x0100, 0x080c,
-	0xa68e, 0xb810, 0x9305, 0x7002, 0xb814, 0x7006, 0x2069, 0x1800,
-	0xb810, 0x9005, 0x1140, 0xb814, 0x9005, 0x1128, 0x700b, 0x00ff,
-	0x700f, 0xfffe, 0x0020, 0x687c, 0x700a, 0x6880, 0x700e, 0x0000,
-	0x9485, 0x0098, 0x7012, 0x004e, 0x003e, 0x00de, 0x080c, 0x9e13,
-	0x721a, 0x7a08, 0x7222, 0x2f10, 0x7226, 0x2071, 0x024c, 0x002e,
-	0x0005, 0x080c, 0x9e13, 0x721a, 0x7a08, 0x7222, 0x7814, 0x7026,
-	0x2071, 0x024c, 0x002e, 0x0005, 0x00b6, 0x00c6, 0x00d6, 0x00e6,
-	0x00f6, 0x2069, 0x0200, 0x2071, 0x0240, 0x6004, 0x908a, 0x0085,
-	0x0a0c, 0x0d7d, 0x908a, 0x0092, 0x1a0c, 0x0d7d, 0x6110, 0x2158,
-	0xb984, 0x2c78, 0x2061, 0x0100, 0x619a, 0x9082, 0x0085, 0x0033,
-	0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x0005, 0x9b75, 0x9b84,
-	0x9b8f, 0x9b73, 0x9b73, 0x9b73, 0x9b75, 0x9b73, 0x9b73, 0x9b73,
-	0x9b73, 0x9b73, 0x9b73, 0x080c, 0x0d7d, 0x0411, 0x60c3, 0x0000,
-	0x0026, 0x080c, 0x29b4, 0x0228, 0x2011, 0x0101, 0x2204, 0xc0c5,
-	0x2012, 0x002e, 0x0804, 0x9e1f, 0x0431, 0x7808, 0x700a, 0x7814,
-	0x700e, 0x7017, 0xffff, 0x60c3, 0x000c, 0x0804, 0x9e1f, 0x0479,
-	0x7003, 0x0003, 0x7007, 0x0300, 0x60c3, 0x0004, 0x0804, 0x9e1f,
-	0x0026, 0x080c, 0xa68e, 0xb810, 0x9085, 0x8100, 0x7002, 0xb814,
-	0x7006, 0x2069, 0x1800, 0x687c, 0x700a, 0x6880, 0x700e, 0x7013,
-	0x0009, 0x0804, 0x9ad7, 0x0026, 0x080c, 0xa68e, 0xb810, 0x9085,
-	0x8400, 0x7002, 0xb814, 0x7006, 0x2069, 0x1800, 0x687c, 0x700a,
-	0x6880, 0x700e, 0x2001, 0x0099, 0x7012, 0x0804, 0x9b39, 0x0026,
-	0x080c, 0xa68e, 0xb810, 0x9085, 0x8500, 0x7002, 0xb814, 0x7006,
+	0x9082, 0x0085, 0x0033, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be,
+	0x0005, 0x9bf0, 0x9bff, 0x9c0a, 0x9bee, 0x9bee, 0x9bee, 0x9bf0,
+	0x9bee, 0x9bee, 0x9bee, 0x9bee, 0x9bee, 0x9bee, 0x080c, 0x0d7d,
+	0x0411, 0x60c3, 0x0000, 0x0026, 0x080c, 0x29e5, 0x0228, 0x2011,
+	0x0101, 0x2204, 0xc0c5, 0x2012, 0x002e, 0x0804, 0x9ea4, 0x0431,
+	0x7808, 0x700a, 0x7814, 0x700e, 0x7017, 0xffff, 0x60c3, 0x000c,
+	0x0804, 0x9ea4, 0x04a1, 0x7003, 0x0003, 0x7007, 0x0300, 0x60c3,
+	0x0004, 0x0804, 0x9ea4, 0x0026, 0x080c, 0xa713, 0xb810, 0x9085,
+	0x8100, 0x7002, 0xb814, 0x7006, 0x2069, 0x1800, 0x687c, 0x700a,
+	0x6880, 0x700e, 0x7013, 0x0009, 0x0804, 0x9b52, 0x0026, 0x080c,
+	0xa713, 0xb810, 0x9085, 0x8400, 0x7002, 0xb814, 0x7006, 0x2069,
+	0x1800, 0x687c, 0x700a, 0x6880, 0x700e, 0x2001, 0x0099, 0x7a20,
+	0x9296, 0x0005, 0x0108, 0xc0bc, 0x7012, 0x0804, 0x9bb4, 0x0026,
+	0x080c, 0xa713, 0xb810, 0x9085, 0x8500, 0x7002, 0xb814, 0x7006,
 	0x2069, 0x1800, 0x687c, 0x700a, 0x6880, 0x700e, 0x2001, 0x0099,
-	0x7012, 0x0804, 0x9b39, 0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6,
-	0x2c78, 0x2069, 0x0200, 0x2071, 0x0240, 0x7804, 0x908a, 0x0040,
-	0x0a0c, 0x0d7d, 0x908a, 0x0057, 0x1a0c, 0x0d7d, 0x7910, 0x2158,
-	0xb984, 0x2061, 0x0100, 0x619a, 0x9082, 0x0040, 0x0033, 0x00fe,
-	0x00ee, 0x00de, 0x00ce, 0x00be, 0x0005, 0x9c08, 0x9c08, 0x9c08,
-	0x9c2e, 0x9c08, 0x9c08, 0x9c08, 0x9c08, 0x9c08, 0x9c08, 0x9c08,
-	0xa1da, 0xa1e2, 0xa1ea, 0xa1f2, 0x9c08, 0x9c08, 0x9c08, 0xa1d2,
-	0x080c, 0x0d7d, 0x6813, 0x0008, 0xba8c, 0x8210, 0xb8d4, 0xd084,
-	0x0128, 0x7a4e, 0x7b14, 0x7b52, 0x722e, 0x732a, 0x9294, 0x00ff,
-	0xba8e, 0x8217, 0x721a, 0xba10, 0x9295, 0x0600, 0x7202, 0xba14,
-	0x7206, 0x2069, 0x1800, 0x6a7c, 0x720a, 0x6a80, 0x720e, 0x7013,
-	0x0829, 0x2f10, 0x7222, 0x7027, 0xffff, 0x0005, 0x0016, 0x7814,
-	0x9084, 0x0700, 0x8007, 0x0013, 0x001e, 0x0005, 0x9c3e, 0x9c3e,
-	0x9c40, 0x9c3e, 0x9c3e, 0x9c3e, 0x9c5a, 0x9c3e, 0x080c, 0x0d7d,
-	0x7914, 0x918c, 0x08ff, 0x918d, 0xf600, 0x7916, 0x2009, 0x0003,
-	0x00b9, 0x2069, 0x1847, 0x6804, 0xd0bc, 0x0130, 0x682c, 0x9084,
-	0x00ff, 0x8007, 0x7032, 0x0010, 0x7033, 0x3f00, 0x60c3, 0x0001,
-	0x0804, 0x9e1f, 0x2009, 0x0003, 0x0019, 0x7033, 0x7f00, 0x0cb0,
-	0x0016, 0x080c, 0xa68e, 0x001e, 0xb810, 0x9085, 0x0100, 0x7002,
-	0xb814, 0x7006, 0x2069, 0x1800, 0x6a7c, 0x720a, 0x6a80, 0x720e,
-	0x7013, 0x0888, 0x918d, 0x0008, 0x7116, 0x080c, 0x9e13, 0x721a,
-	0x7a08, 0x7222, 0x2f10, 0x7226, 0x0005, 0x00b6, 0x00e6, 0x00d6,
+	0x7a20, 0x9296, 0x0005, 0x0108, 0xc0bc, 0x7012, 0x0804, 0x9bb4,
+	0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x2c78, 0x2069, 0x0200,
+	0x2071, 0x0240, 0x7804, 0x908a, 0x0040, 0x0a0c, 0x0d7d, 0x908a,
+	0x0057, 0x1a0c, 0x0d7d, 0x7910, 0x2158, 0xb984, 0x2061, 0x0100,
+	0x619a, 0x9082, 0x0040, 0x0033, 0x00fe, 0x00ee, 0x00de, 0x00ce,
+	0x00be, 0x0005, 0x9c8d, 0x9c8d, 0x9c8d, 0x9cb3, 0x9c8d, 0x9c8d,
+	0x9c8d, 0x9c8d, 0x9c8d, 0x9c8d, 0x9c8d, 0xa25f, 0xa267, 0xa26f,
+	0xa277, 0x9c8d, 0x9c8d, 0x9c8d, 0xa257, 0x080c, 0x0d7d, 0x6813,
+	0x0008, 0xba8c, 0x8210, 0xb8d4, 0xd084, 0x0128, 0x7a52, 0x7b14,
+	0x7b4e, 0x722e, 0x732a, 0x9294, 0x00ff, 0xba8e, 0x8217, 0x721a,
+	0xba10, 0x9295, 0x0600, 0x7202, 0xba14, 0x7206, 0x2069, 0x1800,
+	0x6a7c, 0x720a, 0x6a80, 0x720e, 0x7013, 0x0829, 0x2f10, 0x7222,
+	0x7027, 0xffff, 0x0005, 0x0016, 0x7814, 0x9084, 0x0700, 0x8007,
+	0x0013, 0x001e, 0x0005, 0x9cc3, 0x9cc3, 0x9cc5, 0x9cc3, 0x9cc3,
+	0x9cc3, 0x9cdf, 0x9cc3, 0x080c, 0x0d7d, 0x7914, 0x918c, 0x08ff,
+	0x918d, 0xf600, 0x7916, 0x2009, 0x0003, 0x00b9, 0x2069, 0x1847,
+	0x6804, 0xd0bc, 0x0130, 0x682c, 0x9084, 0x00ff, 0x8007, 0x7032,
+	0x0010, 0x7033, 0x3f00, 0x60c3, 0x0001, 0x0804, 0x9ea4, 0x2009,
+	0x0003, 0x0019, 0x7033, 0x7f00, 0x0cb0, 0x0016, 0x080c, 0xa713,
+	0x001e, 0xb810, 0x9085, 0x0100, 0x7002, 0xb814, 0x7006, 0x2069,
+	0x1800, 0x6a7c, 0x720a, 0x6a80, 0x720e, 0x7013, 0x0888, 0x918d,
+	0x0008, 0x7116, 0x080c, 0x9e98, 0x721a, 0x7a08, 0x7222, 0x2f10,
+	0x7226, 0x0005, 0x00b6, 0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0056,
+	0x0046, 0x0036, 0x2061, 0x0100, 0x2071, 0x1800, 0x7160, 0x7810,
+	0x2058, 0x76dc, 0x96b4, 0x0028, 0x0110, 0x737c, 0x7480, 0x2500,
+	0x76dc, 0x96b4, 0x0028, 0x0140, 0x2001, 0x04ff, 0x6062, 0x6067,
+	0xffff, 0x636a, 0x646e, 0x0050, 0x2001, 0x00ff, 0x9085, 0x0400,
+	0x6062, 0x6067, 0xffff, 0x606b, 0x0000, 0x616e, 0xb8b8, 0x6073,
+	0x0530, 0x6077, 0x0008, 0xb88c, 0x8000, 0x9084, 0x00ff, 0xb88e,
+	0x8007, 0x9085, 0x0020, 0x607a, 0x607f, 0x0000, 0x2b00, 0x6082,
+	0x6087, 0xffff, 0x7814, 0x0096, 0x2048, 0xa848, 0x608a, 0xa844,
+	0x608e, 0xa838, 0x60c6, 0xa834, 0x60ca, 0x009e, 0xb86c, 0x60ce,
+	0x60ab, 0x0036, 0x60af, 0x95d5, 0x60d7, 0x0000, 0x2001, 0x1837,
+	0x2004, 0x9084, 0x0028, 0x0128, 0x609f, 0x0000, 0x2001, 0x0092,
+	0x0058, 0x6028, 0xc0bd, 0x602a, 0x609f, 0x00ff, 0x2011, 0xffff,
+	0x080c, 0x2ab4, 0x2001, 0x00b2, 0x2010, 0x900e, 0x080c, 0x2ac3,
+	0x2009, 0x07d0, 0x080c, 0x8785, 0x003e, 0x004e, 0x005e, 0x006e,
+	0x00ce, 0x00de, 0x00ee, 0x00be, 0x0005, 0x00b6, 0x00e6, 0x00d6,
 	0x00c6, 0x0066, 0x0056, 0x0046, 0x0036, 0x2061, 0x0100, 0x2071,
-	0x1800, 0x7160, 0x7810, 0x2058, 0x76dc, 0x96b4, 0x0028, 0x0110,
-	0x737c, 0x7480, 0x2500, 0x76dc, 0x96b4, 0x0028, 0x0140, 0x2001,
-	0x04ff, 0x6062, 0x6067, 0xffff, 0x636a, 0x646e, 0x0050, 0x2001,
-	0x00ff, 0x9085, 0x0400, 0x6062, 0x6067, 0xffff, 0x606b, 0x0000,
-	0x616e, 0xb8b8, 0x6073, 0x0530, 0x6077, 0x0008, 0xb88c, 0x8000,
-	0x9084, 0x00ff, 0xb88e, 0x8007, 0x9085, 0x0020, 0x607a, 0x607f,
-	0x0000, 0x2b00, 0x6082, 0x6087, 0xffff, 0x7814, 0x0096, 0x2048,
-	0xa848, 0x608a, 0xa844, 0x608e, 0xa838, 0x60c6, 0xa834, 0x60ca,
-	0x009e, 0xb86c, 0x60ce, 0x60ab, 0x0036, 0x60af, 0x95d5, 0x60d7,
-	0x0000, 0x2001, 0x1837, 0x2004, 0x9084, 0x0028, 0x0128, 0x609f,
-	0x0000, 0x2001, 0x0092, 0x0058, 0x6028, 0xc0bd, 0x602a, 0x609f,
-	0x00ff, 0x2011, 0xffff, 0x080c, 0x2a83, 0x2001, 0x00b2, 0x2010,
-	0x900e, 0x080c, 0x2a92, 0x2009, 0x07d0, 0x080c, 0x870e, 0x003e,
-	0x004e, 0x005e, 0x006e, 0x00ce, 0x00de, 0x00ee, 0x00be, 0x0005,
-	0x00b6, 0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0056, 0x0046, 0x0036,
-	0x2061, 0x0100, 0x2071, 0x1800, 0x7160, 0x7810, 0x2058, 0xb8a0,
-	0x2028, 0x76dc, 0xd6ac, 0x1168, 0x9582, 0x007e, 0x1250, 0x2500,
-	0x9094, 0xff80, 0x1130, 0x9080, 0x3388, 0x2015, 0x9294, 0x00ff,
-	0x0020, 0xb910, 0xba14, 0x737c, 0x7480, 0x70dc, 0xd0ac, 0x1130,
-	0x9582, 0x007e, 0x1218, 0x9584, 0xff80, 0x0138, 0x9185, 0x0400,
-	0x6062, 0x6266, 0x636a, 0x646e, 0x0030, 0x6063, 0x0400, 0x6266,
-	0x606b, 0x0000, 0x616e, 0xb8b8, 0x6072, 0x6077, 0x0000, 0xb864,
-	0xd0a4, 0x0110, 0x6077, 0x0008, 0xb88c, 0x8000, 0x9084, 0x00ff,
-	0xb88e, 0x8007, 0x9085, 0x0020, 0x607a, 0x607f, 0x0000, 0x2b00,
-	0x6082, 0x6087, 0xffff, 0x7814, 0x0096, 0x2048, 0xa848, 0x608a,
-	0xa844, 0x608e, 0xa838, 0x60c6, 0xa834, 0x60ca, 0x009e, 0xb86c,
-	0x60ce, 0x60ab, 0x0036, 0x60af, 0x95d5, 0x60d7, 0x0000, 0xba84,
-	0x629e, 0x00f6, 0x2079, 0x0140, 0x7803, 0x0000, 0x00fe, 0x900e,
-	0x2011, 0x0092, 0x080c, 0x2a92, 0x2009, 0x07d0, 0x080c, 0x870e,
-	0x003e, 0x004e, 0x005e, 0x006e, 0x00ce, 0x00de, 0x00ee, 0x00be,
-	0x0005, 0x00b6, 0x0096, 0x00e6, 0x00d6, 0x00c6, 0x0056, 0x0046,
-	0x0036, 0x2061, 0x0100, 0x2071, 0x1800, 0x7810, 0x2058, 0xb8a0,
-	0x2028, 0xb910, 0xba14, 0x737c, 0x7480, 0x7820, 0x0002, 0x9d9e,
-	0x9d9e, 0x9d9e, 0x9d9e, 0x9d9e, 0x9d9e, 0x9d9e, 0x9d9e, 0x9d9e,
-	0x9d9e, 0x9da0, 0x9d9e, 0x9d9e, 0x9d9e, 0x9d9e, 0x080c, 0x0d7d,
-	0xb884, 0x609e, 0x7814, 0x2048, 0xa87c, 0xd0fc, 0x0558, 0xaf90,
-	0x9784, 0xff00, 0x9105, 0x6062, 0x873f, 0x9784, 0xff00, 0x0006,
-	0x7814, 0x2048, 0xa878, 0xc0fc, 0x9005, 0x000e, 0x1160, 0xaf94,
-	0x87ff, 0x0198, 0x2039, 0x0098, 0x9705, 0x6072, 0x7808, 0x6082,
-	0x2f00, 0x6086, 0x0038, 0x9185, 0x2200, 0x6062, 0x6073, 0x0129,
-	0x6077, 0x0000, 0xb884, 0x609e, 0x0050, 0x2039, 0x0029, 0x9705,
-	0x6072, 0x0cc0, 0x9185, 0x0200, 0x6062, 0x6073, 0x2029, 0xa87c,
-	0xd0fc, 0x0118, 0xaf94, 0x87ff, 0x1120, 0x2f00, 0x6082, 0x7808,
-	0x6086, 0x6266, 0x636a, 0x646e, 0x6077, 0x0000, 0xb88c, 0x8000,
-	0x9084, 0x00ff, 0xb88e, 0x8007, 0x607a, 0x607f, 0x0000, 0xa848,
-	0x608a, 0xa844, 0x608e, 0xa838, 0x60c6, 0xa834, 0x60ca, 0xb86c,
-	0x60ce, 0x60af, 0x95d5, 0x60d7, 0x0000, 0x080c, 0xa66e, 0x2009,
-	0x07d0, 0x60c4, 0x9084, 0xfff0, 0x9005, 0x0110, 0x2009, 0x1b58,
-	0x080c, 0x870e, 0x003e, 0x004e, 0x005e, 0x00ce, 0x00de, 0x00ee,
-	0x009e, 0x00be, 0x0005, 0x7a40, 0x9294, 0x00ff, 0x8217, 0x0005,
-	0x00d6, 0x2069, 0x19e6, 0x686b, 0x0001, 0x00de, 0x0005, 0x60a3,
-	0x0056, 0x60a7, 0x9575, 0x00f1, 0x080c, 0x8700, 0x0005, 0x0016,
-	0x2001, 0x180c, 0x200c, 0x9184, 0x0600, 0x9086, 0x0600, 0x0128,
-	0x0089, 0x080c, 0x8700, 0x001e, 0x0005, 0xc1e5, 0x2001, 0x180c,
-	0x2102, 0x2001, 0x19e7, 0x2003, 0x0000, 0x2001, 0x19f2, 0x2003,
-	0x0000, 0x0c88, 0x0006, 0x0016, 0x0026, 0x2009, 0x1804, 0x2011,
-	0x0009, 0x080c, 0x2a92, 0x002e, 0x001e, 0x000e, 0x0005, 0x0016,
-	0x00c6, 0x0006, 0x080c, 0xa899, 0x0106, 0x2061, 0x0100, 0x61a4,
-	0x60a7, 0x95f5, 0x0016, 0x0026, 0x2009, 0x1804, 0x2011, 0x0008,
-	0x080c, 0x2a92, 0x002e, 0x001e, 0x010e, 0x090c, 0xa8b5, 0x000e,
-	0xa001, 0xa001, 0xa001, 0x61a6, 0x00ce, 0x001e, 0x0005, 0x00c6,
-	0x00d6, 0x0016, 0x0026, 0x2061, 0x0100, 0x2069, 0x0140, 0x080c,
-	0x74ec, 0x1510, 0x2001, 0x1a0b, 0x2004, 0x9005, 0x1904, 0x9ece,
-	0x080c, 0x7591, 0x11a8, 0x2069, 0x0380, 0x6843, 0x0101, 0x6844,
-	0xd084, 0x1de8, 0x2061, 0x0100, 0x6020, 0xd0b4, 0x1120, 0x6024,
-	0xd084, 0x090c, 0x0d7d, 0x6843, 0x0100, 0x080c, 0x8700, 0x04b0,
-	0x00c6, 0x2061, 0x19e6, 0x00f0, 0x6904, 0x9194, 0x4000, 0x0598,
-	0x080c, 0x9e4f, 0x080c, 0x2a59, 0x00c6, 0x2061, 0x19e6, 0x6134,
-	0x9192, 0x0008, 0x1278, 0x8108, 0x6136, 0x080c, 0xa899, 0x6130,
-	0x080c, 0xa8b5, 0x00ce, 0x81ff, 0x01c8, 0x080c, 0x8700, 0x080c,
-	0x9e42, 0x00a0, 0x080c, 0xa899, 0x6130, 0x91e5, 0x0000, 0x0150,
-	0x080c, 0xe764, 0x080c, 0x8709, 0x6003, 0x0001, 0x2009, 0x0014,
-	0x080c, 0xac8d, 0x080c, 0xa8b5, 0x00ce, 0x0000, 0x002e, 0x001e,
-	0x00de, 0x00ce, 0x0005, 0x2001, 0x1a0b, 0x2004, 0x9005, 0x1db0,
-	0x00c6, 0x2061, 0x19e6, 0x6134, 0x9192, 0x0003, 0x1ad8, 0x8108,
-	0x6136, 0x00ce, 0x080c, 0x8700, 0x080c, 0x5eff, 0x2009, 0x1846,
-	0x2114, 0x8210, 0x220a, 0x0c10, 0x0096, 0x00c6, 0x00d6, 0x00e6,
-	0x0016, 0x0026, 0x080c, 0x8716, 0x080c, 0xa899, 0x2001, 0x0387,
-	0x2003, 0x0202, 0x2071, 0x19e6, 0x714c, 0x81ff, 0x0904, 0x9f76,
-	0x2061, 0x0100, 0x2069, 0x0140, 0x080c, 0x74ec, 0x1510, 0x0036,
-	0x2019, 0x0002, 0x080c, 0xa133, 0x003e, 0x714c, 0x2160, 0x080c,
-	0xe764, 0x2009, 0x004a, 0x6220, 0x9296, 0x0009, 0x1130, 0x6114,
-	0x2148, 0xa87b, 0x0006, 0x2009, 0x004a, 0x6003, 0x0003, 0x080c,
-	0xac8d, 0x2001, 0x0386, 0x2003, 0x5040, 0x080c, 0x7591, 0x0804,
-	0x9f76, 0x6904, 0xd1f4, 0x0904, 0x9f83, 0x080c, 0x2a59, 0x00c6,
-	0x704c, 0x9065, 0x090c, 0x0d7d, 0x6020, 0x00ce, 0x9086, 0x0006,
-	0x1518, 0x61c8, 0x60c4, 0x9105, 0x11f8, 0x2009, 0x180c, 0x2104,
-	0xd0d4, 0x01d0, 0x6214, 0x9294, 0x1800, 0x1128, 0x6224, 0x9294,
-	0x0002, 0x1560, 0x0010, 0xc0d4, 0x200a, 0x6014, 0x9084, 0xe7fd,
-	0x9085, 0x0010, 0x6016, 0x704c, 0x2060, 0x080c, 0x965a, 0x2009,
-	0x0049, 0x080c, 0xac8d, 0x00d0, 0x0036, 0x2019, 0x0001, 0x080c,
-	0xa133, 0x003e, 0x714c, 0x2160, 0x080c, 0xe764, 0x2009, 0x004a,
+	0x1800, 0x7160, 0x7810, 0x2058, 0xb8a0, 0x2028, 0x76dc, 0xd6ac,
+	0x1168, 0x9582, 0x007e, 0x1250, 0x2500, 0x9094, 0xff80, 0x1130,
+	0x9080, 0x33b9, 0x2015, 0x9294, 0x00ff, 0x0020, 0xb910, 0xba14,
+	0x737c, 0x7480, 0x70dc, 0xd0ac, 0x1130, 0x9582, 0x007e, 0x1218,
+	0x9584, 0xff80, 0x0138, 0x9185, 0x0400, 0x6062, 0x6266, 0x636a,
+	0x646e, 0x0030, 0x6063, 0x0400, 0x6266, 0x606b, 0x0000, 0x616e,
+	0xb8b8, 0x6072, 0x6077, 0x0000, 0xb864, 0xd0a4, 0x0110, 0x6077,
+	0x0008, 0xb88c, 0x8000, 0x9084, 0x00ff, 0xb88e, 0x8007, 0x9085,
+	0x0020, 0x607a, 0x607f, 0x0000, 0x2b00, 0x6082, 0x6087, 0xffff,
+	0x7814, 0x0096, 0x2048, 0xa848, 0x608a, 0xa844, 0x608e, 0xa838,
+	0x60c6, 0xa834, 0x60ca, 0x009e, 0xb86c, 0x60ce, 0x60ab, 0x0036,
+	0x60af, 0x95d5, 0x60d7, 0x0000, 0xba84, 0x629e, 0x00f6, 0x2079,
+	0x0140, 0x7803, 0x0000, 0x00fe, 0x900e, 0x2011, 0x0092, 0x080c,
+	0x2ac3, 0x2009, 0x07d0, 0x080c, 0x8785, 0x003e, 0x004e, 0x005e,
+	0x006e, 0x00ce, 0x00de, 0x00ee, 0x00be, 0x0005, 0x00b6, 0x0096,
+	0x00e6, 0x00d6, 0x00c6, 0x0056, 0x0046, 0x0036, 0x2061, 0x0100,
+	0x2071, 0x1800, 0x7810, 0x2058, 0xb8a0, 0x2028, 0xb910, 0xba14,
+	0x737c, 0x7480, 0x7820, 0x0002, 0x9e23, 0x9e23, 0x9e23, 0x9e23,
+	0x9e23, 0x9e23, 0x9e23, 0x9e23, 0x9e23, 0x9e23, 0x9e25, 0x9e23,
+	0x9e23, 0x9e23, 0x9e23, 0x080c, 0x0d7d, 0xb884, 0x609e, 0x7814,
+	0x2048, 0xa87c, 0xd0fc, 0x0558, 0xaf90, 0x9784, 0xff00, 0x9105,
+	0x6062, 0x873f, 0x9784, 0xff00, 0x0006, 0x7814, 0x2048, 0xa878,
+	0xc0fc, 0x9005, 0x000e, 0x1160, 0xaf94, 0x87ff, 0x0198, 0x2039,
+	0x0098, 0x9705, 0x6072, 0x7808, 0x6082, 0x2f00, 0x6086, 0x0038,
+	0x9185, 0x2200, 0x6062, 0x6073, 0x0129, 0x6077, 0x0000, 0xb884,
+	0x609e, 0x0050, 0x2039, 0x0029, 0x9705, 0x6072, 0x0cc0, 0x9185,
+	0x0200, 0x6062, 0x6073, 0x2029, 0xa87c, 0xd0fc, 0x0118, 0xaf94,
+	0x87ff, 0x1120, 0x2f00, 0x6082, 0x7808, 0x6086, 0x6266, 0x636a,
+	0x646e, 0x6077, 0x0000, 0xb88c, 0x8000, 0x9084, 0x00ff, 0xb88e,
+	0x8007, 0x607a, 0x607f, 0x0000, 0xa848, 0x608a, 0xa844, 0x608e,
+	0xa838, 0x60c6, 0xa834, 0x60ca, 0xb86c, 0x60ce, 0x60af, 0x95d5,
+	0x60d7, 0x0000, 0x080c, 0xa6f3, 0x2009, 0x07d0, 0x60c4, 0x9084,
+	0xfff0, 0x9005, 0x0110, 0x2009, 0x1b58, 0x080c, 0x8785, 0x003e,
+	0x004e, 0x005e, 0x00ce, 0x00de, 0x00ee, 0x009e, 0x00be, 0x0005,
+	0x7a40, 0x9294, 0x00ff, 0x8217, 0x0005, 0x00d6, 0x2069, 0x19e6,
+	0x686b, 0x0001, 0x00de, 0x0005, 0x60a3, 0x0056, 0x60a7, 0x9575,
+	0x00f1, 0x080c, 0x8777, 0x0005, 0x0016, 0x2001, 0x180c, 0x200c,
+	0x9184, 0x0600, 0x9086, 0x0600, 0x0128, 0x0089, 0x080c, 0x8777,
+	0x001e, 0x0005, 0xc1e5, 0x2001, 0x180c, 0x2102, 0x2001, 0x19e7,
+	0x2003, 0x0000, 0x2001, 0x19f2, 0x2003, 0x0000, 0x0c88, 0x0006,
+	0x0016, 0x0026, 0x2009, 0x1804, 0x2011, 0x0009, 0x080c, 0x2ac3,
+	0x002e, 0x001e, 0x000e, 0x0005, 0x0016, 0x00c6, 0x0006, 0x080c,
+	0xa91e, 0x0106, 0x2061, 0x0100, 0x61a4, 0x60a7, 0x95f5, 0x0016,
+	0x0026, 0x2009, 0x1804, 0x2011, 0x0008, 0x080c, 0x2ac3, 0x002e,
+	0x001e, 0x010e, 0x090c, 0xa93a, 0x000e, 0xa001, 0xa001, 0xa001,
+	0x61a6, 0x00ce, 0x001e, 0x0005, 0x00c6, 0x00d6, 0x0016, 0x0026,
+	0x2061, 0x0100, 0x2069, 0x0140, 0x080c, 0x753d, 0x1510, 0x2001,
+	0x1a0b, 0x2004, 0x9005, 0x1904, 0x9f53, 0x080c, 0x75e2, 0x11a8,
+	0x2069, 0x0380, 0x6843, 0x0101, 0x6844, 0xd084, 0x1de8, 0x2061,
+	0x0100, 0x6020, 0xd0b4, 0x1120, 0x6024, 0xd084, 0x090c, 0x0d7d,
+	0x6843, 0x0100, 0x080c, 0x8777, 0x04b0, 0x00c6, 0x2061, 0x19e6,
+	0x00f0, 0x6904, 0x9194, 0x4000, 0x0598, 0x080c, 0x9ed4, 0x080c,
+	0x2a8a, 0x00c6, 0x2061, 0x19e6, 0x6134, 0x9192, 0x0008, 0x1278,
+	0x8108, 0x6136, 0x080c, 0xa91e, 0x6130, 0x080c, 0xa93a, 0x00ce,
+	0x81ff, 0x01c8, 0x080c, 0x8777, 0x080c, 0x9ec7, 0x00a0, 0x080c,
+	0xa91e, 0x6130, 0x91e5, 0x0000, 0x0150, 0x080c, 0xe897, 0x080c,
+	0x8780, 0x6003, 0x0001, 0x2009, 0x0014, 0x080c, 0xad4d, 0x080c,
+	0xa93a, 0x00ce, 0x0000, 0x002e, 0x001e, 0x00de, 0x00ce, 0x0005,
+	0x2001, 0x1a0b, 0x2004, 0x9005, 0x1db0, 0x00c6, 0x2061, 0x19e6,
+	0x6134, 0x9192, 0x0003, 0x1ad8, 0x8108, 0x6136, 0x00ce, 0x080c,
+	0x8777, 0x080c, 0x5f4d, 0x2009, 0x1846, 0x2114, 0x8210, 0x220a,
+	0x0c10, 0x0096, 0x00c6, 0x00d6, 0x00e6, 0x0016, 0x0026, 0x080c,
+	0x878d, 0x080c, 0xa91e, 0x2001, 0x0387, 0x2003, 0x0202, 0x2071,
+	0x19e6, 0x714c, 0x81ff, 0x0904, 0x9ffb, 0x2061, 0x0100, 0x2069,
+	0x0140, 0x080c, 0x753d, 0x1510, 0x0036, 0x2019, 0x0002, 0x080c,
+	0xa1b8, 0x003e, 0x714c, 0x2160, 0x080c, 0xe897, 0x2009, 0x004a,
 	0x6220, 0x9296, 0x0009, 0x1130, 0x6114, 0x2148, 0xa87b, 0x0006,
-	0x2009, 0x004a, 0x6003, 0x0003, 0x080c, 0xac8d, 0x2001, 0x0387,
-	0x2003, 0x0200, 0x080c, 0xa8b5, 0x002e, 0x001e, 0x00ee, 0x00de,
-	0x00ce, 0x009e, 0x0005, 0xd1ec, 0x1904, 0x9f2d, 0x0804, 0x9f2f,
-	0x0026, 0x00e6, 0x2071, 0x19e6, 0x706c, 0xd084, 0x01e8, 0xc084,
-	0x706e, 0x714c, 0x81ff, 0x01c0, 0x2071, 0x0100, 0x9188, 0x0008,
-	0x2114, 0x928e, 0x0006, 0x1138, 0x2009, 0x1984, 0x2011, 0x0012,
-	0x080c, 0x2a92, 0x0048, 0x928e, 0x0009, 0x0db0, 0x2009, 0x1984,
-	0x2011, 0x0016, 0x080c, 0x2a92, 0x00ee, 0x002e, 0x0005, 0x9036,
-	0x2001, 0x19f0, 0x2004, 0x9005, 0x0128, 0x9c06, 0x0128, 0x2c30,
-	0x600c, 0x0cc8, 0x9085, 0x0001, 0x0005, 0x00f6, 0x2079, 0x19e6,
-	0x610c, 0x9006, 0x600e, 0x6044, 0xc0fc, 0x6046, 0x86ff, 0x1140,
-	0x7824, 0x9c06, 0x1118, 0x7826, 0x782a, 0x0050, 0x792a, 0x0040,
-	0x00c6, 0x2660, 0x610e, 0x00ce, 0x7824, 0x9c06, 0x1108, 0x7e26,
-	0x080c, 0xa1fd, 0x080c, 0xca54, 0x00fe, 0x0005, 0x080c, 0x9abc,
-	0x7003, 0x1200, 0x7838, 0x7012, 0x783c, 0x7016, 0x00c6, 0x7820,
-	0x9086, 0x0004, 0x1148, 0x7810, 0x9005, 0x0130, 0x00b6, 0x2058,
-	0xb810, 0xb914, 0x00be, 0x0020, 0x2061, 0x1800, 0x607c, 0x6180,
-	0x9084, 0x00ff, 0x700a, 0x710e, 0x00ce, 0x60c3, 0x002c, 0x0804,
-	0x9e1f, 0x080c, 0x9abc, 0x7003, 0x0f00, 0x7808, 0xd09c, 0x0128,
-	0xb810, 0x9084, 0x00ff, 0x700a, 0xb814, 0x700e, 0x60c3, 0x0008,
-	0x0804, 0x9e1f, 0x0156, 0x080c, 0x9b07, 0x7003, 0x0200, 0x080c,
-	0x87ce, 0x20a9, 0x0006, 0x2011, 0xffec, 0x2019, 0xffed, 0x9ef0,
-	0x0002, 0x2305, 0x2072, 0x8e70, 0x2205, 0x2072, 0x8e70, 0x9398,
-	0x0002, 0x9290, 0x0002, 0x1f04, 0xa021, 0x60c3, 0x001c, 0x015e,
-	0x0804, 0x9e1f, 0x0016, 0x0026, 0x080c, 0x9ae3, 0x080c, 0x9af5,
-	0x9e80, 0x0004, 0x20e9, 0x0000, 0x20a0, 0x7814, 0x0096, 0x2048,
-	0xa800, 0x2048, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x0021, 0x2098,
-	0x009e, 0x7808, 0x9088, 0x0002, 0x21a8, 0x9192, 0x0010, 0x1250,
-	0x4003, 0x9080, 0x0004, 0x8003, 0x60c2, 0x080c, 0x9e1f, 0x002e,
-	0x001e, 0x0005, 0x20a9, 0x0010, 0x4003, 0x080c, 0xa679, 0x20a1,
-	0x0240, 0x22a8, 0x4003, 0x0c68, 0x080c, 0x9abc, 0x7003, 0x6200,
-	0x7808, 0x700e, 0x60c3, 0x0008, 0x0804, 0x9e1f, 0x0016, 0x0026,
-	0x080c, 0x9abc, 0x20e9, 0x0000, 0x20a1, 0x024c, 0x7814, 0x0096,
-	0x2048, 0xa800, 0x2048, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x0023,
-	0x2098, 0x009e, 0x7808, 0x9088, 0x0002, 0x21a8, 0x4003, 0x8003,
-	0x60c2, 0x080c, 0x9e1f, 0x002e, 0x001e, 0x0005, 0x00e6, 0x00c6,
-	0x0006, 0x0126, 0x2091, 0x8000, 0x2071, 0x19e6, 0x7010, 0x2060,
-	0x8cff, 0x0188, 0x080c, 0xca7a, 0x1110, 0x080c, 0xb5c6, 0x600c,
-	0x0006, 0x080c, 0xccf6, 0x600f, 0x0000, 0x080c, 0xabf0, 0x080c,
-	0xa1fd, 0x00ce, 0x0c68, 0x2c00, 0x7012, 0x700e, 0x012e, 0x000e,
-	0x00ce, 0x00ee, 0x0005, 0x0126, 0x0156, 0x00f6, 0x00e6, 0x00d6,
-	0x00c6, 0x0066, 0x0026, 0x0016, 0x0006, 0x2091, 0x8000, 0x2001,
-	0x180c, 0x200c, 0x918c, 0xe7ff, 0x2102, 0x2069, 0x0100, 0x2079,
-	0x0140, 0x2071, 0x19e6, 0x7030, 0x2060, 0x8cff, 0x0548, 0x080c,
-	0x9e4f, 0x6ac0, 0x68c3, 0x0000, 0x080c, 0x8709, 0x00c6, 0x2061,
-	0x0100, 0x080c, 0xa7ca, 0x00ce, 0x20a9, 0x01f4, 0x04b1, 0x080c,
-	0x95ff, 0x6044, 0xd0ac, 0x1128, 0x2001, 0x1987, 0x2004, 0x604a,
-	0x0020, 0x2009, 0x0013, 0x080c, 0xac8d, 0x000e, 0x001e, 0x002e,
-	0x006e, 0x00ce, 0x00de, 0x00ee, 0x00fe, 0x015e, 0x012e, 0x0005,
-	0x2001, 0x1800, 0x2004, 0x9096, 0x0001, 0x0d78, 0x9096, 0x0004,
-	0x0d60, 0x080c, 0x8709, 0x6814, 0x9084, 0x0001, 0x0110, 0x68a7,
-	0x95f5, 0x6817, 0x0008, 0x68c3, 0x0000, 0x2011, 0x5ea9, 0x080c,
-	0x8651, 0x20a9, 0x01f4, 0x0009, 0x08c0, 0x6824, 0xd094, 0x0140,
-	0x6827, 0x0004, 0x7804, 0x9084, 0x4000, 0x190c, 0x2a59, 0x0090,
-	0xd084, 0x0118, 0x6827, 0x0001, 0x0010, 0x1f04, 0xa115, 0x7804,
-	0x9084, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2a49, 0x9006,
-	0x080c, 0x2a49, 0x0005, 0x0126, 0x0156, 0x00f6, 0x00e6, 0x00d6,
-	0x00c6, 0x0066, 0x0026, 0x0016, 0x0006, 0x2091, 0x8000, 0x2001,
-	0x180c, 0x200c, 0x918c, 0xdbff, 0x2102, 0x2069, 0x0100, 0x2079,
-	0x0140, 0x2071, 0x0380, 0x701c, 0x0006, 0x701f, 0x0202, 0x2071,
-	0x19e6, 0x704c, 0x2060, 0x8cff, 0x0904, 0xa1ac, 0x9386, 0x0002,
-	0x1128, 0x6814, 0x9084, 0x0002, 0x0904, 0xa1ac, 0x68af, 0x95f5,
-	0x6817, 0x0010, 0x2009, 0x00fa, 0x8109, 0x1df0, 0x69c6, 0x68cb,
-	0x0008, 0x080c, 0x8716, 0x080c, 0x1dfd, 0x2001, 0x0032, 0x6920,
-	0xd1bc, 0x0130, 0x8001, 0x1dd8, 0x692c, 0x918d, 0x0008, 0x692e,
-	0x20a9, 0x03e8, 0x6824, 0xd094, 0x0140, 0x6827, 0x0004, 0x7804,
-	0x9084, 0x4000, 0x190c, 0x2a59, 0x0090, 0xd08c, 0x0118, 0x6827,
-	0x0002, 0x0010, 0x1f04, 0xa17a, 0x7804, 0x9084, 0x1000, 0x0138,
-	0x2001, 0x0100, 0x080c, 0x2a49, 0x9006, 0x080c, 0x2a49, 0x6827,
-	0x4000, 0x6824, 0x83ff, 0x1180, 0x2009, 0x0049, 0x6020, 0x9086,
-	0x0009, 0x0150, 0x080c, 0x965a, 0x6044, 0xd0ac, 0x1118, 0x6003,
-	0x0002, 0x0010, 0x080c, 0xac8d, 0x000e, 0x2071, 0x0380, 0xd08c,
-	0x1110, 0x701f, 0x0200, 0x000e, 0x001e, 0x002e, 0x006e, 0x00ce,
-	0x00de, 0x00ee, 0x00fe, 0x015e, 0x012e, 0x0005, 0x00d6, 0x0126,
-	0x2091, 0x8000, 0x2069, 0x19e6, 0x6a06, 0x012e, 0x00de, 0x0005,
-	0x00d6, 0x0126, 0x2091, 0x8000, 0x2069, 0x19e6, 0x6a3e, 0x012e,
-	0x00de, 0x0005, 0x080c, 0x9c0a, 0x785c, 0x7032, 0x7042, 0x7047,
-	0x1000, 0x00f8, 0x080c, 0x9c0a, 0x785c, 0x7032, 0x7042, 0x7047,
-	0x4000, 0x00b8, 0x080c, 0x9c0a, 0x785c, 0x7032, 0x7042, 0x7047,
-	0x2000, 0x0078, 0x080c, 0x9c0a, 0x785c, 0x7032, 0x7042, 0x7047,
-	0x0400, 0x0038, 0x080c, 0x9c0a, 0x785c, 0x7032, 0x7042, 0x7047,
-	0x0200, 0x60c3, 0x0020, 0x0804, 0x9e1f, 0x00e6, 0x2071, 0x19e6,
-	0x702c, 0x9005, 0x0110, 0x8001, 0x702e, 0x00ee, 0x0005, 0x00f6,
-	0x00e6, 0x00d6, 0x00c6, 0x0076, 0x0066, 0x0006, 0x0126, 0x2091,
-	0x8000, 0x2071, 0x19e6, 0x7620, 0x2660, 0x2678, 0x2039, 0x0001,
-	0x87ff, 0x0904, 0xa2a2, 0x8cff, 0x0904, 0xa2a2, 0x6020, 0x9086,
-	0x0006, 0x1904, 0xa29d, 0x88ff, 0x0138, 0x2800, 0x9c06, 0x1904,
-	0xa29d, 0x2039, 0x0000, 0x0050, 0x6010, 0x9b06, 0x1904, 0xa29d,
-	0x85ff, 0x0120, 0x605c, 0x9106, 0x1904, 0xa29d, 0x7030, 0x9c06,
-	0x15b0, 0x2069, 0x0100, 0x68c0, 0x9005, 0x1160, 0x6824, 0xd084,
-	0x0148, 0x6827, 0x0001, 0x080c, 0x8709, 0x080c, 0xa327, 0x7033,
-	0x0000, 0x0428, 0x080c, 0x8709, 0x6820, 0xd0b4, 0x0110, 0x68a7,
-	0x95f5, 0x6817, 0x0008, 0x68c3, 0x0000, 0x080c, 0xa327, 0x7033,
-	0x0000, 0x0036, 0x2069, 0x0140, 0x6b04, 0x9384, 0x1000, 0x0138,
-	0x2001, 0x0100, 0x080c, 0x2a49, 0x9006, 0x080c, 0x2a49, 0x2069,
-	0x0100, 0x6824, 0xd084, 0x0110, 0x6827, 0x0001, 0x003e, 0x7020,
-	0x9c36, 0x1110, 0x660c, 0x7622, 0x701c, 0x9c36, 0x1140, 0x2c00,
-	0x9f36, 0x0118, 0x2f00, 0x701e, 0x0010, 0x701f, 0x0000, 0x660c,
-	0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x89ff,
-	0x1168, 0x600f, 0x0000, 0x6014, 0x0096, 0x2048, 0x080c, 0xc863,
-	0x0110, 0x080c, 0xe2b9, 0x009e, 0x080c, 0xac2b, 0x080c, 0xa1fd,
-	0x88ff, 0x1190, 0x00ce, 0x0804, 0xa218, 0x2c78, 0x600c, 0x2060,
-	0x0804, 0xa218, 0x9006, 0x012e, 0x000e, 0x006e, 0x007e, 0x00ce,
-	0x00de, 0x00ee, 0x00fe, 0x0005, 0x601b, 0x0000, 0x00ce, 0x98c5,
-	0x0001, 0x0c88, 0x00f6, 0x00e6, 0x00d6, 0x0096, 0x00c6, 0x0066,
-	0x0026, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071, 0x19e6, 0x7648,
-	0x2660, 0x2678, 0x8cff, 0x0904, 0xa316, 0x6020, 0x9086, 0x0006,
-	0x1904, 0xa311, 0x87ff, 0x0128, 0x2700, 0x9c06, 0x1904, 0xa311,
-	0x0040, 0x6010, 0x9b06, 0x15e8, 0x85ff, 0x0118, 0x605c, 0x9106,
-	0x15c0, 0x704c, 0x9c06, 0x1168, 0x0036, 0x2019, 0x0001, 0x080c,
-	0xa133, 0x703f, 0x0000, 0x9006, 0x704e, 0x706a, 0x7052, 0x706e,
-	0x003e, 0x7048, 0x9c36, 0x1110, 0x660c, 0x764a, 0x7044, 0x9c36,
-	0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00, 0x7046, 0x0010, 0x7047,
-	0x0000, 0x660c, 0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008,
-	0x2678, 0x600f, 0x0000, 0x6014, 0x2048, 0x080c, 0xc863, 0x0110,
-	0x080c, 0xe2b9, 0x080c, 0xac2b, 0x87ff, 0x1198, 0x00ce, 0x0804,
-	0xa2c2, 0x2c78, 0x600c, 0x2060, 0x0804, 0xa2c2, 0x9006, 0x012e,
-	0x000e, 0x002e, 0x006e, 0x00ce, 0x009e, 0x00de, 0x00ee, 0x00fe,
-	0x0005, 0x601b, 0x0000, 0x00ce, 0x97bd, 0x0001, 0x0c80, 0x00e6,
-	0x2071, 0x19e6, 0x9006, 0x7032, 0x700a, 0x7004, 0x9086, 0x0003,
-	0x0158, 0x2001, 0x1800, 0x2004, 0x9086, 0x0002, 0x1118, 0x7007,
-	0x0005, 0x0010, 0x7007, 0x0000, 0x00ee, 0x0005, 0x00f6, 0x00e6,
+	0x2009, 0x004a, 0x6003, 0x0003, 0x080c, 0xad4d, 0x2001, 0x0386,
+	0x2003, 0x5040, 0x080c, 0x75e2, 0x0804, 0x9ffb, 0x6904, 0xd1f4,
+	0x0904, 0xa008, 0x080c, 0x2a8a, 0x00c6, 0x704c, 0x9065, 0x090c,
+	0x0d7d, 0x6020, 0x00ce, 0x9086, 0x0006, 0x1518, 0x61c8, 0x60c4,
+	0x9105, 0x11f8, 0x2009, 0x180c, 0x2104, 0xd0d4, 0x01d0, 0x6214,
+	0x9294, 0x1800, 0x1128, 0x6224, 0x9294, 0x0002, 0x1560, 0x0010,
+	0xc0d4, 0x200a, 0x6014, 0x9084, 0xe7fd, 0x9085, 0x0010, 0x6016,
+	0x704c, 0x2060, 0x080c, 0x96d5, 0x2009, 0x0049, 0x080c, 0xad4d,
+	0x00d0, 0x0036, 0x2019, 0x0001, 0x080c, 0xa1b8, 0x003e, 0x714c,
+	0x2160, 0x080c, 0xe897, 0x2009, 0x004a, 0x6220, 0x9296, 0x0009,
+	0x1130, 0x6114, 0x2148, 0xa87b, 0x0006, 0x2009, 0x004a, 0x6003,
+	0x0003, 0x080c, 0xad4d, 0x2001, 0x0387, 0x2003, 0x0200, 0x080c,
+	0xa93a, 0x002e, 0x001e, 0x00ee, 0x00de, 0x00ce, 0x009e, 0x0005,
+	0xd1ec, 0x1904, 0x9fb2, 0x0804, 0x9fb4, 0x0026, 0x00e6, 0x2071,
+	0x19e6, 0x706c, 0xd084, 0x01e8, 0xc084, 0x706e, 0x714c, 0x81ff,
+	0x01c0, 0x2071, 0x0100, 0x9188, 0x0008, 0x2114, 0x928e, 0x0006,
+	0x1138, 0x2009, 0x1984, 0x2011, 0x0012, 0x080c, 0x2ac3, 0x0048,
+	0x928e, 0x0009, 0x0db0, 0x2009, 0x1984, 0x2011, 0x0016, 0x080c,
+	0x2ac3, 0x00ee, 0x002e, 0x0005, 0x9036, 0x2001, 0x19f0, 0x2004,
+	0x9005, 0x0128, 0x9c06, 0x0128, 0x2c30, 0x600c, 0x0cc8, 0x9085,
+	0x0001, 0x0005, 0x00f6, 0x2079, 0x19e6, 0x610c, 0x9006, 0x600e,
+	0x6044, 0xc0fc, 0x6046, 0x86ff, 0x1140, 0x7824, 0x9c06, 0x1118,
+	0x7826, 0x782a, 0x0050, 0x792a, 0x0040, 0x00c6, 0x2660, 0x610e,
+	0x00ce, 0x7824, 0x9c06, 0x1108, 0x7e26, 0x080c, 0xa282, 0x080c,
+	0xcb6b, 0x00fe, 0x0005, 0x080c, 0x9b37, 0x7003, 0x1200, 0x7838,
+	0x7012, 0x783c, 0x7016, 0x00c6, 0x7820, 0x9086, 0x0004, 0x1148,
+	0x7810, 0x9005, 0x0130, 0x00b6, 0x2058, 0xb810, 0xb914, 0x00be,
+	0x0020, 0x2061, 0x1800, 0x607c, 0x6180, 0x9084, 0x00ff, 0x700a,
+	0x710e, 0x00ce, 0x60c3, 0x002c, 0x0804, 0x9ea4, 0x080c, 0x9b37,
+	0x7003, 0x0f00, 0x7808, 0xd09c, 0x0128, 0xb810, 0x9084, 0x00ff,
+	0x700a, 0xb814, 0x700e, 0x60c3, 0x0008, 0x0804, 0x9ea4, 0x0156,
+	0x080c, 0x9b82, 0x7003, 0x0200, 0x080c, 0x8845, 0x20a9, 0x0006,
+	0x2011, 0xffec, 0x2019, 0xffed, 0x9ef0, 0x0002, 0x2305, 0x2072,
+	0x8e70, 0x2205, 0x2072, 0x8e70, 0x9398, 0x0002, 0x9290, 0x0002,
+	0x1f04, 0xa0a6, 0x60c3, 0x001c, 0x015e, 0x0804, 0x9ea4, 0x0016,
+	0x0026, 0x080c, 0x9b5e, 0x080c, 0x9b70, 0x9e80, 0x0004, 0x20e9,
+	0x0000, 0x20a0, 0x7814, 0x0096, 0x2048, 0xa800, 0x2048, 0xa860,
+	0x20e0, 0xa85c, 0x9080, 0x0021, 0x2098, 0x009e, 0x7808, 0x9088,
+	0x0002, 0x21a8, 0x9192, 0x0010, 0x1250, 0x4003, 0x9080, 0x0004,
+	0x8003, 0x60c2, 0x080c, 0x9ea4, 0x002e, 0x001e, 0x0005, 0x20a9,
+	0x0010, 0x4003, 0x080c, 0xa6fe, 0x20a1, 0x0240, 0x22a8, 0x4003,
+	0x0c68, 0x080c, 0x9b37, 0x7003, 0x6200, 0x7808, 0x700e, 0x60c3,
+	0x0008, 0x0804, 0x9ea4, 0x0016, 0x0026, 0x080c, 0x9b37, 0x20e9,
+	0x0000, 0x20a1, 0x024c, 0x7814, 0x0096, 0x2048, 0xa800, 0x2048,
+	0xa860, 0x20e0, 0xa85c, 0x9080, 0x0023, 0x2098, 0x009e, 0x7808,
+	0x9088, 0x0002, 0x21a8, 0x4003, 0x8003, 0x60c2, 0x080c, 0x9ea4,
+	0x002e, 0x001e, 0x0005, 0x00e6, 0x00c6, 0x0006, 0x0126, 0x2091,
+	0x8000, 0x2071, 0x19e6, 0x7010, 0x2060, 0x8cff, 0x0188, 0x080c,
+	0xcb91, 0x1110, 0x080c, 0xb693, 0x600c, 0x0006, 0x080c, 0xce0d,
+	0x600f, 0x0000, 0x080c, 0xacb0, 0x080c, 0xa282, 0x00ce, 0x0c68,
+	0x2c00, 0x7012, 0x700e, 0x012e, 0x000e, 0x00ce, 0x00ee, 0x0005,
+	0x0126, 0x0156, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0026,
+	0x0016, 0x0006, 0x2091, 0x8000, 0x2001, 0x180c, 0x200c, 0x918c,
+	0xe7ff, 0x2102, 0x2069, 0x0100, 0x2079, 0x0140, 0x2071, 0x19e6,
+	0x7030, 0x2060, 0x8cff, 0x0548, 0x080c, 0x9ed4, 0x6ac0, 0x68c3,
+	0x0000, 0x080c, 0x8780, 0x00c6, 0x2061, 0x0100, 0x080c, 0xa84f,
+	0x00ce, 0x20a9, 0x01f4, 0x04b1, 0x080c, 0x967a, 0x6044, 0xd0ac,
+	0x1128, 0x2001, 0x1987, 0x2004, 0x604a, 0x0020, 0x2009, 0x0013,
+	0x080c, 0xad4d, 0x000e, 0x001e, 0x002e, 0x006e, 0x00ce, 0x00de,
+	0x00ee, 0x00fe, 0x015e, 0x012e, 0x0005, 0x2001, 0x1800, 0x2004,
+	0x9096, 0x0001, 0x0d78, 0x9096, 0x0004, 0x0d60, 0x080c, 0x8780,
+	0x6814, 0x9084, 0x0001, 0x0110, 0x68a7, 0x95f5, 0x6817, 0x0008,
+	0x68c3, 0x0000, 0x2011, 0x5ef7, 0x080c, 0x86c8, 0x20a9, 0x01f4,
+	0x0009, 0x08c0, 0x6824, 0xd094, 0x0140, 0x6827, 0x0004, 0x7804,
+	0x9084, 0x4000, 0x190c, 0x2a8a, 0x0090, 0xd084, 0x0118, 0x6827,
+	0x0001, 0x0010, 0x1f04, 0xa19a, 0x7804, 0x9084, 0x1000, 0x0138,
+	0x2001, 0x0100, 0x080c, 0x2a7a, 0x9006, 0x080c, 0x2a7a, 0x0005,
+	0x0126, 0x0156, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0026,
+	0x0016, 0x0006, 0x2091, 0x8000, 0x2001, 0x180c, 0x200c, 0x918c,
+	0xdbff, 0x2102, 0x2069, 0x0100, 0x2079, 0x0140, 0x2071, 0x0380,
+	0x701c, 0x0006, 0x701f, 0x0202, 0x2071, 0x19e6, 0x704c, 0x2060,
+	0x8cff, 0x0904, 0xa231, 0x9386, 0x0002, 0x1128, 0x6814, 0x9084,
+	0x0002, 0x0904, 0xa231, 0x68af, 0x95f5, 0x6817, 0x0010, 0x2009,
+	0x00fa, 0x8109, 0x1df0, 0x69c6, 0x68cb, 0x0008, 0x080c, 0x878d,
+	0x080c, 0x1e2e, 0x2001, 0x0032, 0x6920, 0xd1bc, 0x0130, 0x8001,
+	0x1dd8, 0x692c, 0x918d, 0x0008, 0x692e, 0x20a9, 0x03e8, 0x6824,
+	0xd094, 0x0140, 0x6827, 0x0004, 0x7804, 0x9084, 0x4000, 0x190c,
+	0x2a8a, 0x0090, 0xd08c, 0x0118, 0x6827, 0x0002, 0x0010, 0x1f04,
+	0xa1ff, 0x7804, 0x9084, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c,
+	0x2a7a, 0x9006, 0x080c, 0x2a7a, 0x6827, 0x4000, 0x6824, 0x83ff,
+	0x1180, 0x2009, 0x0049, 0x6020, 0x9086, 0x0009, 0x0150, 0x080c,
+	0x96d5, 0x6044, 0xd0ac, 0x1118, 0x6003, 0x0002, 0x0010, 0x080c,
+	0xad4d, 0x000e, 0x2071, 0x0380, 0xd08c, 0x1110, 0x701f, 0x0200,
+	0x000e, 0x001e, 0x002e, 0x006e, 0x00ce, 0x00de, 0x00ee, 0x00fe,
+	0x015e, 0x012e, 0x0005, 0x00d6, 0x0126, 0x2091, 0x8000, 0x2069,
+	0x19e6, 0x6a06, 0x012e, 0x00de, 0x0005, 0x00d6, 0x0126, 0x2091,
+	0x8000, 0x2069, 0x19e6, 0x6a3e, 0x012e, 0x00de, 0x0005, 0x080c,
+	0x9c8f, 0x785c, 0x7032, 0x7042, 0x7047, 0x1000, 0x00f8, 0x080c,
+	0x9c8f, 0x785c, 0x7032, 0x7042, 0x7047, 0x4000, 0x00b8, 0x080c,
+	0x9c8f, 0x785c, 0x7032, 0x7042, 0x7047, 0x2000, 0x0078, 0x080c,
+	0x9c8f, 0x785c, 0x7032, 0x7042, 0x7047, 0x0400, 0x0038, 0x080c,
+	0x9c8f, 0x785c, 0x7032, 0x7042, 0x7047, 0x0200, 0x60c3, 0x0020,
+	0x0804, 0x9ea4, 0x00e6, 0x2071, 0x19e6, 0x702c, 0x9005, 0x0110,
+	0x8001, 0x702e, 0x00ee, 0x0005, 0x00f6, 0x00e6, 0x00d6, 0x00c6,
+	0x0076, 0x0066, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071, 0x19e6,
+	0x7620, 0x2660, 0x2678, 0x2039, 0x0001, 0x87ff, 0x0904, 0xa327,
+	0x8cff, 0x0904, 0xa327, 0x6020, 0x9086, 0x0006, 0x1904, 0xa322,
+	0x88ff, 0x0138, 0x2800, 0x9c06, 0x1904, 0xa322, 0x2039, 0x0000,
+	0x0050, 0x6010, 0x9b06, 0x1904, 0xa322, 0x85ff, 0x0120, 0x605c,
+	0x9106, 0x1904, 0xa322, 0x7030, 0x9c06, 0x15b0, 0x2069, 0x0100,
+	0x68c0, 0x9005, 0x1160, 0x6824, 0xd084, 0x0148, 0x6827, 0x0001,
+	0x080c, 0x8780, 0x080c, 0xa3ac, 0x7033, 0x0000, 0x0428, 0x080c,
+	0x8780, 0x6820, 0xd0b4, 0x0110, 0x68a7, 0x95f5, 0x6817, 0x0008,
+	0x68c3, 0x0000, 0x080c, 0xa3ac, 0x7033, 0x0000, 0x0036, 0x2069,
+	0x0140, 0x6b04, 0x9384, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c,
+	0x2a7a, 0x9006, 0x080c, 0x2a7a, 0x2069, 0x0100, 0x6824, 0xd084,
+	0x0110, 0x6827, 0x0001, 0x003e, 0x7020, 0x9c36, 0x1110, 0x660c,
+	0x7622, 0x701c, 0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00,
+	0x701e, 0x0010, 0x701f, 0x0000, 0x660c, 0x0066, 0x2c00, 0x9f06,
+	0x0110, 0x7e0e, 0x0008, 0x2678, 0x89ff, 0x1168, 0x600f, 0x0000,
+	0x6014, 0x0096, 0x2048, 0x080c, 0xc978, 0x0110, 0x080c, 0xe3e8,
+	0x009e, 0x080c, 0xaceb, 0x080c, 0xa282, 0x88ff, 0x1190, 0x00ce,
+	0x0804, 0xa29d, 0x2c78, 0x600c, 0x2060, 0x0804, 0xa29d, 0x9006,
+	0x012e, 0x000e, 0x006e, 0x007e, 0x00ce, 0x00de, 0x00ee, 0x00fe,
+	0x0005, 0x601b, 0x0000, 0x00ce, 0x98c5, 0x0001, 0x0c88, 0x00f6,
+	0x00e6, 0x00d6, 0x0096, 0x00c6, 0x0066, 0x0026, 0x0006, 0x0126,
+	0x2091, 0x8000, 0x2071, 0x19e6, 0x7648, 0x2660, 0x2678, 0x8cff,
+	0x0904, 0xa39b, 0x6020, 0x9086, 0x0006, 0x1904, 0xa396, 0x87ff,
+	0x0128, 0x2700, 0x9c06, 0x1904, 0xa396, 0x0040, 0x6010, 0x9b06,
+	0x15e8, 0x85ff, 0x0118, 0x605c, 0x9106, 0x15c0, 0x704c, 0x9c06,
+	0x1168, 0x0036, 0x2019, 0x0001, 0x080c, 0xa1b8, 0x703f, 0x0000,
+	0x9006, 0x704e, 0x706a, 0x7052, 0x706e, 0x003e, 0x7048, 0x9c36,
+	0x1110, 0x660c, 0x764a, 0x7044, 0x9c36, 0x1140, 0x2c00, 0x9f36,
+	0x0118, 0x2f00, 0x7046, 0x0010, 0x7047, 0x0000, 0x660c, 0x0066,
+	0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000,
+	0x6014, 0x2048, 0x080c, 0xc978, 0x0110, 0x080c, 0xe3e8, 0x080c,
+	0xaceb, 0x87ff, 0x1198, 0x00ce, 0x0804, 0xa347, 0x2c78, 0x600c,
+	0x2060, 0x0804, 0xa347, 0x9006, 0x012e, 0x000e, 0x002e, 0x006e,
+	0x00ce, 0x009e, 0x00de, 0x00ee, 0x00fe, 0x0005, 0x601b, 0x0000,
+	0x00ce, 0x97bd, 0x0001, 0x0c80, 0x00e6, 0x2071, 0x19e6, 0x9006,
+	0x7032, 0x700a, 0x7004, 0x9086, 0x0003, 0x0158, 0x2001, 0x1800,
+	0x2004, 0x9086, 0x0002, 0x1118, 0x7007, 0x0005, 0x0010, 0x7007,
+	0x0000, 0x00ee, 0x0005, 0x00f6, 0x00e6, 0x00c6, 0x0066, 0x0026,
+	0x0006, 0x0126, 0x2091, 0x8000, 0x2071, 0x19e6, 0x2c10, 0x7648,
+	0x2660, 0x2678, 0x8cff, 0x0540, 0x2200, 0x9c06, 0x1508, 0x7048,
+	0x9c36, 0x1110, 0x660c, 0x764a, 0x7044, 0x9c36, 0x1140, 0x2c00,
+	0x9f36, 0x0118, 0x2f00, 0x7046, 0x0010, 0x7047, 0x0000, 0x660c,
+	0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000,
+	0x6004, 0x9086, 0x0040, 0x090c, 0x967a, 0x9085, 0x0001, 0x0020,
+	0x2c78, 0x600c, 0x2060, 0x08b0, 0x012e, 0x000e, 0x002e, 0x006e,
+	0x00ce, 0x00ee, 0x00fe, 0x0005, 0x0096, 0x00f6, 0x00e6, 0x00d6,
 	0x00c6, 0x0066, 0x0026, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071,
-	0x19e6, 0x2c10, 0x7648, 0x2660, 0x2678, 0x8cff, 0x0540, 0x2200,
-	0x9c06, 0x1508, 0x7048, 0x9c36, 0x1110, 0x660c, 0x764a, 0x7044,
-	0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00, 0x7046, 0x0010,
-	0x7047, 0x0000, 0x660c, 0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008,
-	0x2678, 0x600f, 0x0000, 0x6004, 0x9086, 0x0040, 0x090c, 0x95ff,
-	0x9085, 0x0001, 0x0020, 0x2c78, 0x600c, 0x2060, 0x08b0, 0x012e,
-	0x000e, 0x002e, 0x006e, 0x00ce, 0x00ee, 0x00fe, 0x0005, 0x0096,
-	0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0026, 0x0006, 0x0126,
-	0x2091, 0x8000, 0x2071, 0x19e6, 0x7610, 0x2660, 0x2678, 0x8cff,
-	0x0904, 0xa414, 0x6010, 0x00b6, 0x2058, 0xb8a0, 0x00be, 0x9206,
-	0x1904, 0xa40f, 0x7030, 0x9c06, 0x1520, 0x2069, 0x0100, 0x68c0,
-	0x9005, 0x0904, 0xa3e6, 0x080c, 0x9e4f, 0x68c3, 0x0000, 0x080c,
-	0xa327, 0x7033, 0x0000, 0x0036, 0x2069, 0x0140, 0x6b04, 0x9384,
-	0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2a49, 0x9006, 0x080c,
-	0x2a49, 0x2069, 0x0100, 0x6824, 0xd084, 0x0110, 0x6827, 0x0001,
-	0x003e, 0x7010, 0x9c36, 0x1110, 0x660c, 0x7612, 0x700c, 0x9c36,
-	0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00, 0x700e, 0x0010, 0x700f,
-	0x0000, 0x660c, 0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008,
-	0x2678, 0x600f, 0x0000, 0x080c, 0xca69, 0x1180, 0x080c, 0x323e,
-	0x080c, 0xca7a, 0x1518, 0x080c, 0xb5c6, 0x0400, 0x080c, 0xa327,
-	0x6824, 0xd084, 0x09b0, 0x6827, 0x0001, 0x0898, 0x080c, 0xca7a,
-	0x1118, 0x080c, 0xb5c6, 0x0090, 0x6014, 0x2048, 0x080c, 0xc863,
-	0x0168, 0x6020, 0x9086, 0x0003, 0x1508, 0xa867, 0x0103, 0xab7a,
-	0xa877, 0x0000, 0x080c, 0x6d93, 0x080c, 0xca54, 0x080c, 0xccf6,
-	0x080c, 0xac2b, 0x080c, 0xa1fd, 0x00ce, 0x0804, 0xa38f, 0x2c78,
-	0x600c, 0x2060, 0x0804, 0xa38f, 0x012e, 0x000e, 0x002e, 0x006e,
-	0x00ce, 0x00de, 0x00ee, 0x00fe, 0x009e, 0x0005, 0x6020, 0x9086,
-	0x0006, 0x1d20, 0x080c, 0xe2b9, 0x0c08, 0x00d6, 0x080c, 0x9b07,
-	0x7003, 0x0200, 0x7007, 0x0014, 0x60c3, 0x0014, 0x20e1, 0x0001,
-	0x2099, 0x1988, 0x20e9, 0x0000, 0x20a1, 0x0250, 0x20a9, 0x0004,
-	0x4003, 0x7023, 0x0004, 0x7027, 0x7878, 0x080c, 0x9e1f, 0x00de,
-	0x0005, 0x080c, 0x9b07, 0x700b, 0x0800, 0x7814, 0x9084, 0xff00,
-	0x700e, 0x7814, 0x9084, 0x00ff, 0x7022, 0x782c, 0x7026, 0x7860,
-	0x9084, 0x00ff, 0x9085, 0x0200, 0x7002, 0x7860, 0x9084, 0xff00,
-	0x8007, 0x7006, 0x60c2, 0x0804, 0x9e1f, 0x00b6, 0x00d6, 0x0016,
-	0x00d6, 0x2f68, 0x2009, 0x0035, 0x080c, 0xcefc, 0x00de, 0x1904,
-	0xa4c2, 0x080c, 0x9abc, 0x7003, 0x1300, 0x782c, 0x080c, 0xa5d1,
-	0x2068, 0x6820, 0x9086, 0x0003, 0x0560, 0x7810, 0x2058, 0xbaa0,
-	0x080c, 0xab5a, 0x11d8, 0x9286, 0x007e, 0x1128, 0x700b, 0x00ff,
-	0x700f, 0xfffe, 0x0498, 0x9286, 0x007f, 0x1128, 0x700b, 0x00ff,
-	0x700f, 0xfffd, 0x0458, 0x9284, 0xff80, 0x0180, 0x9286, 0x0080,
-	0x1128, 0x700b, 0x00ff, 0x700f, 0xfffc, 0x0400, 0x92d8, 0x1000,
-	0x2b5c, 0xb810, 0x700a, 0xb814, 0x700e, 0x00c0, 0xb884, 0x700e,
-	0x00a8, 0x080c, 0xab5a, 0x1130, 0x7810, 0x2058, 0xb8a0, 0x9082,
-	0x007e, 0x0250, 0x00d6, 0x2069, 0x181f, 0x2d04, 0x700a, 0x8d68,
-	0x2d04, 0x700e, 0x00de, 0x0010, 0x6034, 0x700e, 0x7838, 0x7012,
-	0x783c, 0x7016, 0x60c3, 0x000c, 0x001e, 0x00de, 0x080c, 0x9e1f,
-	0x00be, 0x0005, 0x781b, 0x0001, 0x7803, 0x0006, 0x001e, 0x00de,
-	0x00be, 0x0005, 0x792c, 0x9180, 0x0008, 0x200c, 0x9186, 0x0006,
-	0x01c0, 0x9186, 0x0003, 0x0904, 0xa541, 0x9186, 0x0005, 0x0904,
-	0xa529, 0x9186, 0x0004, 0x05f0, 0x9186, 0x0008, 0x0904, 0xa532,
-	0x7807, 0x0037, 0x782f, 0x0003, 0x7817, 0x1700, 0x080c, 0xa5ae,
-	0x0005, 0x080c, 0xa56f, 0x00d6, 0x0026, 0x792c, 0x2168, 0x2009,
-	0x4000, 0x6800, 0x6a44, 0xd2fc, 0x11f8, 0x0002, 0xa509, 0xa514,
-	0xa50b, 0xa514, 0xa510, 0xa509, 0xa509, 0xa514, 0xa514, 0xa514,
-	0xa514, 0xa509, 0xa509, 0xa509, 0xa509, 0xa509, 0xa514, 0xa509,
-	0xa514, 0x080c, 0x0d7d, 0x6824, 0xd0e4, 0x0110, 0xd0cc, 0x0110,
-	0x900e, 0x0010, 0x2009, 0x2000, 0x682c, 0x7022, 0x6830, 0x7026,
-	0x0804, 0xa568, 0x080c, 0xa56f, 0x00d6, 0x0026, 0x792c, 0x2168,
-	0x2009, 0x4000, 0x6a00, 0x9286, 0x0002, 0x1108, 0x900e, 0x0804,
-	0xa568, 0x080c, 0xa56f, 0x00d6, 0x0026, 0x792c, 0x2168, 0x2009,
-	0x4000, 0x04b0, 0x04e1, 0x00d6, 0x0026, 0x792c, 0x2168, 0x2009,
-	0x4000, 0x9286, 0x0005, 0x0118, 0x9286, 0x0002, 0x1108, 0x900e,
-	0x0438, 0x0469, 0x00d6, 0x0026, 0x792c, 0x2168, 0x6814, 0x6924,
-	0xc185, 0x6926, 0x0096, 0x2048, 0xa9ac, 0xa834, 0x9112, 0xa9b0,
-	0xa838, 0x009e, 0x9103, 0x7022, 0x7226, 0x792c, 0x9180, 0x0011,
-	0x2004, 0xd0fc, 0x1148, 0x9180, 0x0000, 0x2004, 0x908e, 0x0002,
-	0x0130, 0x908e, 0x0004, 0x0118, 0x2009, 0x4000, 0x0008, 0x900e,
-	0x712a, 0x60c3, 0x0018, 0x002e, 0x00de, 0x0804, 0x9e1f, 0x00b6,
-	0x0036, 0x0046, 0x0056, 0x0066, 0x080c, 0x9b07, 0x9006, 0x7003,
-	0x0200, 0x7938, 0x710a, 0x793c, 0x710e, 0x7810, 0x2058, 0xb8a0,
-	0x080c, 0xab5a, 0x1118, 0x9092, 0x007e, 0x0268, 0x00d6, 0x2069,
-	0x181f, 0x2d2c, 0x8d68, 0x2d34, 0x90d8, 0x1000, 0x2b5c, 0xbb10,
-	0xbc14, 0x00de, 0x0028, 0x901e, 0xbc84, 0x2029, 0x0000, 0x6634,
-	0x782c, 0x9080, 0x0008, 0x2004, 0x9086, 0x0003, 0x1128, 0x7512,
-	0x7616, 0x731a, 0x741e, 0x0020, 0x7312, 0x7416, 0x751a, 0x761e,
-	0x006e, 0x005e, 0x004e, 0x003e, 0x00be, 0x0005, 0x080c, 0x9b07,
-	0x7003, 0x0100, 0x782c, 0x700a, 0x7814, 0x700e, 0x700e, 0x60c3,
-	0x0008, 0x0804, 0x9e1f, 0x080c, 0x9ab3, 0x7003, 0x1400, 0x7838,
-	0x700a, 0x0079, 0x783c, 0x700e, 0x782c, 0x7012, 0x7830, 0x7016,
-	0x7834, 0x9084, 0x00ff, 0x8007, 0x701a, 0x60c3, 0x0010, 0x0804,
-	0x9e1f, 0x00e6, 0x2071, 0x0240, 0x0006, 0x00f6, 0x2078, 0x7810,
-	0x00b6, 0x2058, 0xb8d4, 0xd084, 0x0120, 0x7850, 0x702a, 0x784c,
-	0x702e, 0x00be, 0x00fe, 0x000e, 0x00ee, 0x0005, 0x080c, 0x9afe,
-	0x7003, 0x0100, 0x782c, 0x700a, 0x7814, 0x700e, 0x60c3, 0x0008,
-	0x0804, 0x9e1f, 0x00a9, 0x7914, 0x712a, 0x60c3, 0x0000, 0x60a7,
-	0x9575, 0x0026, 0x080c, 0x29b4, 0x0228, 0x2011, 0x0101, 0x2204,
-	0xc0c5, 0x2012, 0x002e, 0x080c, 0x9e42, 0x080c, 0x8700, 0x0005,
-	0x0036, 0x0096, 0x00d6, 0x00e6, 0x7860, 0x2048, 0xaa7c, 0x9296,
-	0x00c0, 0x9294, 0xfffd, 0xaa7e, 0xaa80, 0x9294, 0x0300, 0xaa82,
-	0xa96c, 0x9194, 0x00ff, 0xab74, 0x9384, 0x00ff, 0x908d, 0xc200,
-	0xa96e, 0x9384, 0xff00, 0x9215, 0xaa76, 0xa870, 0xaa78, 0xa87a,
-	0xaa72, 0x00d6, 0x2069, 0x0200, 0x080c, 0xa68e, 0x00de, 0x20e9,
-	0x0000, 0x20a1, 0x0240, 0x20a9, 0x000a, 0xa860, 0x20e0, 0xa85c,
-	0x9080, 0x001b, 0x2098, 0x4003, 0x60a3, 0x0035, 0xaa68, 0x9294,
-	0x7000, 0x9286, 0x3000, 0x0110, 0x60a3, 0x0037, 0x00ee, 0x00de,
-	0x009e, 0x003e, 0x0005, 0x900e, 0x7814, 0x0096, 0x2048, 0xa87c,
-	0xd0fc, 0x01c0, 0x9084, 0x0003, 0x11a8, 0x2001, 0x180c, 0x2004,
-	0xd0bc, 0x0180, 0x7824, 0xd0cc, 0x1168, 0xd0c4, 0x1158, 0xa8a8,
-	0x9005, 0x1140, 0x2001, 0x180c, 0x200c, 0xc1d5, 0x2102, 0x2009,
-	0x19b1, 0x210c, 0x009e, 0x918d, 0x0092, 0x0010, 0x2009, 0x0096,
-	0x60ab, 0x0036, 0x0026, 0x2110, 0x900e, 0x080c, 0x2a92, 0x002e,
-	0x0005, 0x2009, 0x0009, 0x00a0, 0x2009, 0x000a, 0x0088, 0x2009,
-	0x000b, 0x0070, 0x2009, 0x000c, 0x0058, 0x2009, 0x000d, 0x0040,
-	0x2009, 0x000e, 0x0028, 0x2009, 0x000f, 0x0010, 0x2009, 0x0008,
-	0x6912, 0x0005, 0x080c, 0x9abc, 0x0016, 0x0026, 0x0096, 0x00d6,
-	0x7814, 0x2048, 0x7013, 0x0138, 0x2001, 0x1837, 0x2004, 0x9084,
-	0x0028, 0x1138, 0x2001, 0x197b, 0x2004, 0x9086, 0xaaaa, 0x1904,
-	0xa733, 0x7003, 0x5400, 0x00c6, 0x2061, 0x1800, 0x607c, 0x9084,
-	0x00ff, 0xa998, 0x810f, 0x918c, 0xff00, 0x9105, 0x700a, 0x6080,
-	0x700e, 0xa998, 0x918c, 0xff00, 0x7112, 0x20a9, 0x0004, 0x2009,
-	0x1805, 0x2e10, 0x9290, 0x0006, 0x2104, 0x2012, 0x8108, 0x8210,
-	0x1f04, 0xa6c4, 0x20a9, 0x0004, 0x2009, 0x1801, 0x2104, 0x2012,
-	0x8108, 0x8210, 0x1f04, 0xa6ce, 0xa860, 0x20e0, 0xa85c, 0x9080,
-	0x0029, 0x2098, 0x2009, 0x0006, 0x20a9, 0x0001, 0x4002, 0x8007,
-	0x2012, 0x8210, 0x8109, 0x1dc0, 0x00d6, 0x2069, 0x0200, 0x080c,
-	0xa679, 0x00de, 0x2071, 0x0240, 0x2011, 0x0240, 0x2009, 0x0002,
-	0x20a9, 0x0001, 0x4002, 0x8007, 0x2012, 0x8210, 0x8109, 0x1dc0,
-	0x2009, 0x0008, 0x20a9, 0x0001, 0x4002, 0x8007, 0x2012, 0x8210,
-	0x8109, 0x1dc0, 0xa85c, 0x9080, 0x0031, 0x2098, 0x2009, 0x0008,
-	0x20a9, 0x0001, 0x4002, 0x8007, 0x2012, 0x8210, 0x8109, 0x1dc0,
-	0x00ce, 0x60c3, 0x004c, 0x60a3, 0x0056, 0x60a7, 0x9575, 0x2001,
-	0x1837, 0x2004, 0x9084, 0x0028, 0x1168, 0x080c, 0x74ec, 0x0150,
-	0x6028, 0xc0bd, 0x602a, 0x2009, 0x1804, 0x2011, 0x0029, 0x080c,
-	0x2a92, 0x0010, 0x080c, 0x9e1f, 0x080c, 0x8700, 0x00de, 0x009e,
-	0x002e, 0x001e, 0x0005, 0x00e6, 0x2071, 0x0240, 0x2001, 0x2200,
-	0x9085, 0x00ff, 0x7002, 0x7007, 0xffff, 0x2071, 0x0100, 0x709b,
-	0x00ff, 0x00ee, 0x0804, 0xa6a9, 0x080c, 0x9abc, 0x0016, 0x0026,
-	0x0096, 0x00d6, 0x7814, 0x2048, 0x7013, 0x0138, 0x7003, 0x5500,
-	0x00c6, 0xa89c, 0x9084, 0x00ff, 0xa998, 0x810f, 0x918c, 0xff00,
-	0x9105, 0x700a, 0xa99c, 0x918c, 0xff00, 0xa8a0, 0x9084, 0x00ff,
-	0x9105, 0x700e, 0xa998, 0x918c, 0xff00, 0x2061, 0x1800, 0x607c,
-	0x9084, 0x00ff, 0x910d, 0x7112, 0x6180, 0x7116, 0x2009, 0x0008,
-	0xa860, 0x20e0, 0xa85c, 0x9080, 0x0029, 0x2098, 0x2e10, 0x9290,
+	0x19e6, 0x7610, 0x2660, 0x2678, 0x8cff, 0x0904, 0xa499, 0x6010,
+	0x00b6, 0x2058, 0xb8a0, 0x00be, 0x9206, 0x1904, 0xa494, 0x7030,
+	0x9c06, 0x1520, 0x2069, 0x0100, 0x68c0, 0x9005, 0x0904, 0xa46b,
+	0x080c, 0x9ed4, 0x68c3, 0x0000, 0x080c, 0xa3ac, 0x7033, 0x0000,
+	0x0036, 0x2069, 0x0140, 0x6b04, 0x9384, 0x1000, 0x0138, 0x2001,
+	0x0100, 0x080c, 0x2a7a, 0x9006, 0x080c, 0x2a7a, 0x2069, 0x0100,
+	0x6824, 0xd084, 0x0110, 0x6827, 0x0001, 0x003e, 0x7010, 0x9c36,
+	0x1110, 0x660c, 0x7612, 0x700c, 0x9c36, 0x1140, 0x2c00, 0x9f36,
+	0x0118, 0x2f00, 0x700e, 0x0010, 0x700f, 0x0000, 0x660c, 0x0066,
+	0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000,
+	0x080c, 0xcb80, 0x1180, 0x080c, 0x326f, 0x080c, 0xcb91, 0x1518,
+	0x080c, 0xb693, 0x0400, 0x080c, 0xa3ac, 0x6824, 0xd084, 0x09b0,
+	0x6827, 0x0001, 0x0898, 0x080c, 0xcb91, 0x1118, 0x080c, 0xb693,
+	0x0090, 0x6014, 0x2048, 0x080c, 0xc978, 0x0168, 0x6020, 0x9086,
+	0x0003, 0x1508, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c,
+	0x6de2, 0x080c, 0xcb6b, 0x080c, 0xce0d, 0x080c, 0xaceb, 0x080c,
+	0xa282, 0x00ce, 0x0804, 0xa414, 0x2c78, 0x600c, 0x2060, 0x0804,
+	0xa414, 0x012e, 0x000e, 0x002e, 0x006e, 0x00ce, 0x00de, 0x00ee,
+	0x00fe, 0x009e, 0x0005, 0x6020, 0x9086, 0x0006, 0x1d20, 0x080c,
+	0xe3e8, 0x0c08, 0x00d6, 0x080c, 0x9b82, 0x7003, 0x0200, 0x7007,
+	0x0014, 0x60c3, 0x0014, 0x20e1, 0x0001, 0x2099, 0x1988, 0x20e9,
+	0x0000, 0x20a1, 0x0250, 0x20a9, 0x0004, 0x4003, 0x7023, 0x0004,
+	0x7027, 0x7878, 0x080c, 0x9ea4, 0x00de, 0x0005, 0x080c, 0x9b82,
+	0x700b, 0x0800, 0x7814, 0x9084, 0xff00, 0x700e, 0x7814, 0x9084,
+	0x00ff, 0x7022, 0x782c, 0x7026, 0x7860, 0x9084, 0x00ff, 0x9085,
+	0x0200, 0x7002, 0x7860, 0x9084, 0xff00, 0x8007, 0x7006, 0x60c2,
+	0x0804, 0x9ea4, 0x00b6, 0x00d6, 0x0016, 0x00d6, 0x2f68, 0x2009,
+	0x0035, 0x080c, 0xd013, 0x00de, 0x1904, 0xa547, 0x080c, 0x9b37,
+	0x7003, 0x1300, 0x782c, 0x080c, 0xa656, 0x2068, 0x6820, 0x9086,
+	0x0003, 0x0560, 0x7810, 0x2058, 0xbaa0, 0x080c, 0xabe2, 0x11d8,
+	0x9286, 0x007e, 0x1128, 0x700b, 0x00ff, 0x700f, 0xfffe, 0x0498,
+	0x9286, 0x007f, 0x1128, 0x700b, 0x00ff, 0x700f, 0xfffd, 0x0458,
+	0x9284, 0xff80, 0x0180, 0x9286, 0x0080, 0x1128, 0x700b, 0x00ff,
+	0x700f, 0xfffc, 0x0400, 0x92d8, 0x1000, 0x2b5c, 0xb810, 0x700a,
+	0xb814, 0x700e, 0x00c0, 0xb884, 0x700e, 0x00a8, 0x080c, 0xabe2,
+	0x1130, 0x7810, 0x2058, 0xb8a0, 0x9082, 0x007e, 0x0250, 0x00d6,
+	0x2069, 0x181f, 0x2d04, 0x700a, 0x8d68, 0x2d04, 0x700e, 0x00de,
+	0x0010, 0x6034, 0x700e, 0x7838, 0x7012, 0x783c, 0x7016, 0x60c3,
+	0x000c, 0x001e, 0x00de, 0x080c, 0x9ea4, 0x00be, 0x0005, 0x781b,
+	0x0001, 0x7803, 0x0006, 0x001e, 0x00de, 0x00be, 0x0005, 0x792c,
+	0x9180, 0x0008, 0x200c, 0x9186, 0x0006, 0x01c0, 0x9186, 0x0003,
+	0x0904, 0xa5c6, 0x9186, 0x0005, 0x0904, 0xa5ae, 0x9186, 0x0004,
+	0x05f0, 0x9186, 0x0008, 0x0904, 0xa5b7, 0x7807, 0x0037, 0x782f,
+	0x0003, 0x7817, 0x1700, 0x080c, 0xa633, 0x0005, 0x080c, 0xa5f4,
+	0x00d6, 0x0026, 0x792c, 0x2168, 0x2009, 0x4000, 0x6800, 0x6a44,
+	0xd2fc, 0x11f8, 0x0002, 0xa58e, 0xa599, 0xa590, 0xa599, 0xa595,
+	0xa58e, 0xa58e, 0xa599, 0xa599, 0xa599, 0xa599, 0xa58e, 0xa58e,
+	0xa58e, 0xa58e, 0xa58e, 0xa599, 0xa58e, 0xa599, 0x080c, 0x0d7d,
+	0x6824, 0xd0e4, 0x0110, 0xd0cc, 0x0110, 0x900e, 0x0010, 0x2009,
+	0x2000, 0x682c, 0x7022, 0x6830, 0x7026, 0x0804, 0xa5ed, 0x080c,
+	0xa5f4, 0x00d6, 0x0026, 0x792c, 0x2168, 0x2009, 0x4000, 0x6a00,
+	0x9286, 0x0002, 0x1108, 0x900e, 0x0804, 0xa5ed, 0x080c, 0xa5f4,
+	0x00d6, 0x0026, 0x792c, 0x2168, 0x2009, 0x4000, 0x04b0, 0x04e1,
+	0x00d6, 0x0026, 0x792c, 0x2168, 0x2009, 0x4000, 0x9286, 0x0005,
+	0x0118, 0x9286, 0x0002, 0x1108, 0x900e, 0x0438, 0x0469, 0x00d6,
+	0x0026, 0x792c, 0x2168, 0x6814, 0x6924, 0xc185, 0x6926, 0x0096,
+	0x2048, 0xa9ac, 0xa834, 0x9112, 0xa9b0, 0xa838, 0x009e, 0x9103,
+	0x7022, 0x7226, 0x792c, 0x9180, 0x0011, 0x2004, 0xd0fc, 0x1148,
+	0x9180, 0x0000, 0x2004, 0x908e, 0x0002, 0x0130, 0x908e, 0x0004,
+	0x0118, 0x2009, 0x4000, 0x0008, 0x900e, 0x712a, 0x60c3, 0x0018,
+	0x002e, 0x00de, 0x0804, 0x9ea4, 0x00b6, 0x0036, 0x0046, 0x0056,
+	0x0066, 0x080c, 0x9b82, 0x9006, 0x7003, 0x0200, 0x7938, 0x710a,
+	0x793c, 0x710e, 0x7810, 0x2058, 0xb8a0, 0x080c, 0xabe2, 0x1118,
+	0x9092, 0x007e, 0x0268, 0x00d6, 0x2069, 0x181f, 0x2d2c, 0x8d68,
+	0x2d34, 0x90d8, 0x1000, 0x2b5c, 0xbb10, 0xbc14, 0x00de, 0x0028,
+	0x901e, 0xbc84, 0x2029, 0x0000, 0x6634, 0x782c, 0x9080, 0x0008,
+	0x2004, 0x9086, 0x0003, 0x1128, 0x7512, 0x7616, 0x731a, 0x741e,
+	0x0020, 0x7312, 0x7416, 0x751a, 0x761e, 0x006e, 0x005e, 0x004e,
+	0x003e, 0x00be, 0x0005, 0x080c, 0x9b82, 0x7003, 0x0100, 0x782c,
+	0x700a, 0x7814, 0x700e, 0x700e, 0x60c3, 0x0008, 0x0804, 0x9ea4,
+	0x080c, 0x9b2e, 0x7003, 0x1400, 0x7838, 0x700a, 0x0079, 0x783c,
+	0x700e, 0x782c, 0x7012, 0x7830, 0x7016, 0x7834, 0x9084, 0x00ff,
+	0x8007, 0x701a, 0x60c3, 0x0010, 0x0804, 0x9ea4, 0x00e6, 0x2071,
+	0x0240, 0x0006, 0x00f6, 0x2078, 0x7810, 0x00b6, 0x2058, 0xb8d4,
+	0xd084, 0x0120, 0x784c, 0x702a, 0x7850, 0x702e, 0x00be, 0x00fe,
+	0x000e, 0x00ee, 0x0005, 0x080c, 0x9b79, 0x7003, 0x0100, 0x782c,
+	0x700a, 0x7814, 0x700e, 0x60c3, 0x0008, 0x0804, 0x9ea4, 0x00a9,
+	0x7914, 0x712a, 0x60c3, 0x0000, 0x60a7, 0x9575, 0x0026, 0x080c,
+	0x29e5, 0x0228, 0x2011, 0x0101, 0x2204, 0xc0c5, 0x2012, 0x002e,
+	0x080c, 0x9ec7, 0x080c, 0x8777, 0x0005, 0x0036, 0x0096, 0x00d6,
+	0x00e6, 0x7860, 0x2048, 0xaa7c, 0x9296, 0x00c0, 0x9294, 0xfffd,
+	0xaa7e, 0xaa80, 0x9294, 0x0300, 0xaa82, 0xa96c, 0x9194, 0x00ff,
+	0xab74, 0x9384, 0x00ff, 0x908d, 0xc200, 0xa96e, 0x9384, 0xff00,
+	0x9215, 0xaa76, 0xa870, 0xaa78, 0xa87a, 0xaa72, 0x00d6, 0x2069,
+	0x0200, 0x080c, 0xa713, 0x00de, 0x20e9, 0x0000, 0x20a1, 0x0240,
+	0x20a9, 0x000a, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x001b, 0x2098,
+	0x4003, 0x60a3, 0x0035, 0xaa68, 0x9294, 0x7000, 0x9286, 0x3000,
+	0x0110, 0x60a3, 0x0037, 0x00ee, 0x00de, 0x009e, 0x003e, 0x0005,
+	0x900e, 0x7814, 0x0096, 0x2048, 0xa87c, 0xd0fc, 0x01c0, 0x9084,
+	0x0003, 0x11a8, 0x2001, 0x180c, 0x2004, 0xd0bc, 0x0180, 0x7824,
+	0xd0cc, 0x1168, 0xd0c4, 0x1158, 0xa8a8, 0x9005, 0x1140, 0x2001,
+	0x180c, 0x200c, 0xc1d5, 0x2102, 0x2009, 0x19b1, 0x210c, 0x009e,
+	0x918d, 0x0092, 0x0010, 0x2009, 0x0096, 0x60ab, 0x0036, 0x0026,
+	0x2110, 0x900e, 0x080c, 0x2ac3, 0x002e, 0x0005, 0x2009, 0x0009,
+	0x00a0, 0x2009, 0x000a, 0x0088, 0x2009, 0x000b, 0x0070, 0x2009,
+	0x000c, 0x0058, 0x2009, 0x000d, 0x0040, 0x2009, 0x000e, 0x0028,
+	0x2009, 0x000f, 0x0010, 0x2009, 0x0008, 0x6912, 0x0005, 0x080c,
+	0x9b37, 0x0016, 0x0026, 0x0096, 0x00d6, 0x7814, 0x2048, 0x7013,
+	0x0138, 0x2001, 0x1837, 0x2004, 0x9084, 0x0028, 0x1138, 0x2001,
+	0x197b, 0x2004, 0x9086, 0xaaaa, 0x1904, 0xa7b8, 0x7003, 0x5400,
+	0x00c6, 0x2061, 0x1800, 0x607c, 0x9084, 0x00ff, 0xa998, 0x810f,
+	0x918c, 0xff00, 0x9105, 0x700a, 0x6080, 0x700e, 0xa998, 0x918c,
+	0xff00, 0x7112, 0x20a9, 0x0004, 0x2009, 0x1805, 0x2e10, 0x9290,
+	0x0006, 0x2104, 0x2012, 0x8108, 0x8210, 0x1f04, 0xa749, 0x20a9,
+	0x0004, 0x2009, 0x1801, 0x2104, 0x2012, 0x8108, 0x8210, 0x1f04,
+	0xa753, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x0029, 0x2098, 0x2009,
 	0x0006, 0x20a9, 0x0001, 0x4002, 0x8007, 0x2012, 0x8210, 0x8109,
-	0x1dc0, 0x20a9, 0x0004, 0x2009, 0x1805, 0x2104, 0x2012, 0x8108,
-	0x8210, 0x1f04, 0xa785, 0x20a9, 0x0002, 0x2009, 0x1801, 0x2104,
-	0x2012, 0x8108, 0x8210, 0x1f04, 0xa78f, 0x00d6, 0x0016, 0x2069,
-	0x0200, 0x080c, 0xa679, 0x001e, 0x00de, 0x2071, 0x0240, 0x20a9,
-	0x0002, 0x2009, 0x1803, 0x2011, 0x0240, 0x2104, 0x2012, 0x8108,
-	0x8210, 0x1f04, 0xa7a5, 0x2009, 0x0008, 0x4002, 0x8007, 0x2012,
-	0x8210, 0x8109, 0x1dd0, 0x9006, 0x20a9, 0x0008, 0x2012, 0x8210,
-	0x1f04, 0xa7b6, 0x00ce, 0x60c3, 0x004c, 0x60a3, 0x0056, 0x60a7,
-	0x9575, 0x080c, 0x9e1f, 0x080c, 0x8700, 0x00de, 0x009e, 0x002e,
-	0x001e, 0x0005, 0x00d6, 0x9290, 0x0018, 0x8214, 0x20e9, 0x0000,
-	0x2069, 0x0200, 0x6813, 0x0000, 0x22a8, 0x9284, 0x00e0, 0x0128,
-	0x20a9, 0x0020, 0x9292, 0x0020, 0x0008, 0x9016, 0x20a1, 0x0240,
-	0x9006, 0x4004, 0x82ff, 0x0120, 0x6810, 0x8000, 0x6812, 0x0c60,
-	0x00de, 0x0005, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x00a6, 0x0096,
-	0x0066, 0x0126, 0x2091, 0x8000, 0x2071, 0x19e6, 0x7610, 0x2660,
-	0x2678, 0x8cff, 0x0904, 0xa876, 0x7030, 0x9c06, 0x1520, 0x2069,
-	0x0100, 0x68c0, 0x9005, 0x0904, 0xa848, 0x080c, 0x9e4f, 0x68c3,
-	0x0000, 0x080c, 0xa327, 0x7033, 0x0000, 0x0036, 0x2069, 0x0140,
-	0x6b04, 0x9384, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2a49,
-	0x9006, 0x080c, 0x2a49, 0x2069, 0x0100, 0x6824, 0xd084, 0x0110,
-	0x6827, 0x0001, 0x003e, 0x7010, 0x9c36, 0x1110, 0x660c, 0x7612,
-	0x700c, 0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00, 0x700e,
-	0x0010, 0x700f, 0x0000, 0x660c, 0x0066, 0x2c00, 0x9f06, 0x0110,
-	0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000, 0x080c, 0xca69, 0x1180,
-	0x080c, 0x323e, 0x080c, 0xca7a, 0x1518, 0x080c, 0xb5c6, 0x0400,
-	0x080c, 0xa327, 0x6824, 0xd084, 0x09b0, 0x6827, 0x0001, 0x0898,
-	0x080c, 0xca7a, 0x1118, 0x080c, 0xb5c6, 0x0090, 0x6014, 0x2048,
-	0x080c, 0xc863, 0x0168, 0x6020, 0x9086, 0x0003, 0x1520, 0xa867,
-	0x0103, 0xab7a, 0xa877, 0x0000, 0x080c, 0x6d9f, 0x080c, 0xca54,
-	0x080c, 0xccf6, 0x080c, 0xac2b, 0x080c, 0xa1fd, 0x00ce, 0x0804,
-	0xa7f9, 0x2c78, 0x600c, 0x2060, 0x0804, 0xa7f9, 0x7013, 0x0000,
-	0x700f, 0x0000, 0x012e, 0x006e, 0x009e, 0x00ae, 0x00ce, 0x00de,
-	0x00ee, 0x00fe, 0x0005, 0x6020, 0x9086, 0x0006, 0x1d08, 0x080c,
-	0xe2b9, 0x08f0, 0x00f6, 0x0036, 0x2079, 0x0380, 0x7b18, 0xd3bc,
-	0x1de8, 0x7832, 0x7936, 0x7a3a, 0x781b, 0x8080, 0x003e, 0x00fe,
-	0x0005, 0x0016, 0x2001, 0x0382, 0x2004, 0x9084, 0x0007, 0x9086,
-	0x0001, 0x1188, 0x2001, 0x0015, 0x0c29, 0x2009, 0x1000, 0x2001,
-	0x0382, 0x2004, 0x9084, 0x0007, 0x9086, 0x0003, 0x0120, 0x8109,
-	0x1db0, 0x080c, 0x0d7d, 0x001e, 0x0005, 0x2001, 0x0382, 0x2004,
-	0x9084, 0x0007, 0x9086, 0x0003, 0x1120, 0x2001, 0x0380, 0x2003,
-	0x0001, 0x0005, 0x0156, 0x0016, 0x0026, 0x00e6, 0x900e, 0x2071,
-	0x19e6, 0x0469, 0x0106, 0x0190, 0x7004, 0x9086, 0x0003, 0x0148,
-	0x20a9, 0x1000, 0x6044, 0xd0fc, 0x01d8, 0x1f04, 0xa8d2, 0x080c,
-	0x0d7d, 0x080c, 0xa899, 0x6044, 0xd0fc, 0x0190, 0x7030, 0x9c06,
-	0x1148, 0x080c, 0x95ff, 0x6044, 0xd0dc, 0x0150, 0xc0dc, 0x6046,
-	0x700a, 0x7042, 0x704c, 0x9c06, 0x190c, 0x0d7d, 0x080c, 0x965a,
-	0x010e, 0x1919, 0x00ee, 0x002e, 0x001e, 0x015e, 0x0005, 0x2001,
-	0x0382, 0x2004, 0x9084, 0x0007, 0x9086, 0x0003, 0x0005, 0x0126,
-	0x2091, 0x2400, 0x7808, 0xd0a4, 0x190c, 0x0d76, 0xd09c, 0x0128,
-	0x7820, 0x908c, 0xf000, 0x11b8, 0x0012, 0x012e, 0x0005, 0xa91f,
-	0xa95d, 0xa984, 0xa9bb, 0xa9cb, 0xa9dc, 0xa9eb, 0xa9f9, 0xaa26,
-	0xaa2a, 0xa91f, 0xa91f, 0xa91f, 0xa91f, 0xa91f, 0xa91f, 0x080c,
-	0x0d7d, 0x012e, 0x0005, 0x2060, 0x6044, 0xd0bc, 0x0140, 0xc0bc,
-	0x6046, 0x6000, 0x908a, 0x0016, 0x1a0c, 0x0d7d, 0x0012, 0x012e,
-	0x0005, 0xa944, 0xa946, 0xa944, 0xa94c, 0xa944, 0xa944, 0xa944,
-	0xa944, 0xa944, 0xa946, 0xa944, 0xa946, 0xa944, 0xa946, 0xa944,
-	0xa944, 0xa944, 0xa946, 0xa944, 0x080c, 0x0d7d, 0x2009, 0x0013,
-	0x080c, 0xac8d, 0x012e, 0x0005, 0x6014, 0x2048, 0xa87c, 0xd0dc,
-	0x0130, 0x080c, 0x88d7, 0x080c, 0xabf0, 0x012e, 0x0005, 0x2009,
-	0x0049, 0x080c, 0xac8d, 0x012e, 0x0005, 0x080c, 0xa899, 0x2001,
-	0x1a0b, 0x2003, 0x0000, 0x7030, 0x9065, 0x090c, 0x0d7d, 0x7034,
-	0x9092, 0x00c8, 0x1258, 0x8000, 0x7036, 0x7004, 0x9086, 0x0003,
-	0x0110, 0x7007, 0x0000, 0x781f, 0x0808, 0x0040, 0x080c, 0xe764,
-	0x6003, 0x0001, 0x2009, 0x0014, 0x080c, 0xac8d, 0x781f, 0x0100,
-	0x080c, 0xa8b5, 0x012e, 0x0005, 0x080c, 0xa899, 0x714c, 0x81ff,
+	0x1dc0, 0x00d6, 0x2069, 0x0200, 0x080c, 0xa6fe, 0x00de, 0x2071,
+	0x0240, 0x2011, 0x0240, 0x2009, 0x0002, 0x20a9, 0x0001, 0x4002,
+	0x8007, 0x2012, 0x8210, 0x8109, 0x1dc0, 0x2009, 0x0008, 0x20a9,
+	0x0001, 0x4002, 0x8007, 0x2012, 0x8210, 0x8109, 0x1dc0, 0xa85c,
+	0x9080, 0x0031, 0x2098, 0x2009, 0x0008, 0x20a9, 0x0001, 0x4002,
+	0x8007, 0x2012, 0x8210, 0x8109, 0x1dc0, 0x00ce, 0x60c3, 0x004c,
+	0x60a3, 0x0056, 0x60a7, 0x9575, 0x2001, 0x1837, 0x2004, 0x9084,
+	0x0028, 0x1168, 0x080c, 0x753d, 0x0150, 0x6028, 0xc0bd, 0x602a,
+	0x2009, 0x1804, 0x2011, 0x0029, 0x080c, 0x2ac3, 0x0010, 0x080c,
+	0x9ea4, 0x080c, 0x8777, 0x00de, 0x009e, 0x002e, 0x001e, 0x0005,
+	0x00e6, 0x2071, 0x0240, 0x2001, 0x2200, 0x9085, 0x00ff, 0x7002,
+	0x7007, 0xffff, 0x2071, 0x0100, 0x709b, 0x00ff, 0x00ee, 0x0804,
+	0xa72e, 0x080c, 0x9b37, 0x0016, 0x0026, 0x0096, 0x00d6, 0x7814,
+	0x2048, 0x7013, 0x0138, 0x7003, 0x5500, 0x00c6, 0xa89c, 0x9084,
+	0x00ff, 0xa998, 0x810f, 0x918c, 0xff00, 0x9105, 0x700a, 0xa99c,
+	0x918c, 0xff00, 0xa8a0, 0x9084, 0x00ff, 0x9105, 0x700e, 0xa998,
+	0x918c, 0xff00, 0x2061, 0x1800, 0x607c, 0x9084, 0x00ff, 0x910d,
+	0x7112, 0x6180, 0x7116, 0x2009, 0x0008, 0xa860, 0x20e0, 0xa85c,
+	0x9080, 0x0029, 0x2098, 0x2e10, 0x9290, 0x0006, 0x20a9, 0x0001,
+	0x4002, 0x8007, 0x2012, 0x8210, 0x8109, 0x1dc0, 0x20a9, 0x0004,
+	0x2009, 0x1805, 0x2104, 0x2012, 0x8108, 0x8210, 0x1f04, 0xa80a,
+	0x20a9, 0x0002, 0x2009, 0x1801, 0x2104, 0x2012, 0x8108, 0x8210,
+	0x1f04, 0xa814, 0x00d6, 0x0016, 0x2069, 0x0200, 0x080c, 0xa6fe,
+	0x001e, 0x00de, 0x2071, 0x0240, 0x20a9, 0x0002, 0x2009, 0x1803,
+	0x2011, 0x0240, 0x2104, 0x2012, 0x8108, 0x8210, 0x1f04, 0xa82a,
+	0x2009, 0x0008, 0x4002, 0x8007, 0x2012, 0x8210, 0x8109, 0x1dd0,
+	0x9006, 0x20a9, 0x0008, 0x2012, 0x8210, 0x1f04, 0xa83b, 0x00ce,
+	0x60c3, 0x004c, 0x60a3, 0x0056, 0x60a7, 0x9575, 0x080c, 0x9ea4,
+	0x080c, 0x8777, 0x00de, 0x009e, 0x002e, 0x001e, 0x0005, 0x00d6,
+	0x9290, 0x0018, 0x8214, 0x20e9, 0x0000, 0x2069, 0x0200, 0x6813,
+	0x0000, 0x22a8, 0x9284, 0x00e0, 0x0128, 0x20a9, 0x0020, 0x9292,
+	0x0020, 0x0008, 0x9016, 0x20a1, 0x0240, 0x9006, 0x4004, 0x82ff,
+	0x0120, 0x6810, 0x8000, 0x6812, 0x0c60, 0x00de, 0x0005, 0x00f6,
+	0x00e6, 0x00d6, 0x00c6, 0x00a6, 0x0096, 0x0066, 0x0126, 0x2091,
+	0x8000, 0x2071, 0x19e6, 0x7610, 0x2660, 0x2678, 0x8cff, 0x0904,
+	0xa8fb, 0x7030, 0x9c06, 0x1520, 0x2069, 0x0100, 0x68c0, 0x9005,
+	0x0904, 0xa8cd, 0x080c, 0x9ed4, 0x68c3, 0x0000, 0x080c, 0xa3ac,
+	0x7033, 0x0000, 0x0036, 0x2069, 0x0140, 0x6b04, 0x9384, 0x1000,
+	0x0138, 0x2001, 0x0100, 0x080c, 0x2a7a, 0x9006, 0x080c, 0x2a7a,
+	0x2069, 0x0100, 0x6824, 0xd084, 0x0110, 0x6827, 0x0001, 0x003e,
+	0x7010, 0x9c36, 0x1110, 0x660c, 0x7612, 0x700c, 0x9c36, 0x1140,
+	0x2c00, 0x9f36, 0x0118, 0x2f00, 0x700e, 0x0010, 0x700f, 0x0000,
+	0x660c, 0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678,
+	0x600f, 0x0000, 0x080c, 0xcb80, 0x1180, 0x080c, 0x326f, 0x080c,
+	0xcb91, 0x1518, 0x080c, 0xb693, 0x0400, 0x080c, 0xa3ac, 0x6824,
+	0xd084, 0x09b0, 0x6827, 0x0001, 0x0898, 0x080c, 0xcb91, 0x1118,
+	0x080c, 0xb693, 0x0090, 0x6014, 0x2048, 0x080c, 0xc978, 0x0168,
+	0x6020, 0x9086, 0x0003, 0x1520, 0xa867, 0x0103, 0xab7a, 0xa877,
+	0x0000, 0x080c, 0x6dee, 0x080c, 0xcb6b, 0x080c, 0xce0d, 0x080c,
+	0xaceb, 0x080c, 0xa282, 0x00ce, 0x0804, 0xa87e, 0x2c78, 0x600c,
+	0x2060, 0x0804, 0xa87e, 0x7013, 0x0000, 0x700f, 0x0000, 0x012e,
+	0x006e, 0x009e, 0x00ae, 0x00ce, 0x00de, 0x00ee, 0x00fe, 0x0005,
+	0x6020, 0x9086, 0x0006, 0x1d08, 0x080c, 0xe3e8, 0x08f0, 0x00f6,
+	0x0036, 0x2079, 0x0380, 0x7b18, 0xd3bc, 0x1de8, 0x7832, 0x7936,
+	0x7a3a, 0x781b, 0x8080, 0x003e, 0x00fe, 0x0005, 0x0016, 0x2001,
+	0x0382, 0x2004, 0x9084, 0x0007, 0x9086, 0x0001, 0x1188, 0x2001,
+	0x0015, 0x0c29, 0x2009, 0x1000, 0x2001, 0x0382, 0x2004, 0x9084,
+	0x0007, 0x9086, 0x0003, 0x0120, 0x8109, 0x1db0, 0x080c, 0x0d7d,
+	0x001e, 0x0005, 0x2001, 0x0382, 0x2004, 0x9084, 0x0007, 0x9086,
+	0x0003, 0x1120, 0x2001, 0x0380, 0x2003, 0x0001, 0x0005, 0x0156,
+	0x0016, 0x0026, 0x00e6, 0x900e, 0x2071, 0x19e6, 0x0469, 0x0106,
+	0x0190, 0x7004, 0x9086, 0x0003, 0x0148, 0x20a9, 0x1000, 0x6044,
+	0xd0fc, 0x01d8, 0x1f04, 0xa957, 0x080c, 0x0d7d, 0x080c, 0xa91e,
+	0x6044, 0xd0fc, 0x0190, 0x7030, 0x9c06, 0x1148, 0x080c, 0x967a,
+	0x6044, 0xd0dc, 0x0150, 0xc0dc, 0x6046, 0x700a, 0x7042, 0x704c,
+	0x9c06, 0x190c, 0x0d7d, 0x080c, 0x96d5, 0x010e, 0x1919, 0x00ee,
+	0x002e, 0x001e, 0x015e, 0x0005, 0x2001, 0x0382, 0x2004, 0x9084,
+	0x0007, 0x9086, 0x0003, 0x0005, 0x0126, 0x2091, 0x2400, 0x7808,
+	0xd0a4, 0x190c, 0x0d76, 0xd09c, 0x0128, 0x7820, 0x908c, 0xf000,
+	0x11b8, 0x0012, 0x012e, 0x0005, 0xa9a4, 0xa9e2, 0xaa0c, 0xaa43,
+	0xaa53, 0xaa64, 0xaa73, 0xaa81, 0xaaae, 0xaab2, 0xa9a4, 0xa9a4,
+	0xa9a4, 0xa9a4, 0xa9a4, 0xa9a4, 0x080c, 0x0d7d, 0x012e, 0x0005,
+	0x2060, 0x6044, 0xd0bc, 0x0140, 0xc0bc, 0x6046, 0x6000, 0x908a,
+	0x0016, 0x1a0c, 0x0d7d, 0x0012, 0x012e, 0x0005, 0xa9c9, 0xa9cb,
+	0xa9c9, 0xa9d1, 0xa9c9, 0xa9c9, 0xa9c9, 0xa9c9, 0xa9c9, 0xa9cb,
+	0xa9c9, 0xa9cb, 0xa9c9, 0xa9cb, 0xa9c9, 0xa9c9, 0xa9c9, 0xa9cb,
+	0xa9c9, 0x080c, 0x0d7d, 0x2009, 0x0013, 0x080c, 0xad4d, 0x012e,
+	0x0005, 0x6014, 0x2048, 0xa87c, 0xd0dc, 0x0130, 0x080c, 0x894e,
+	0x080c, 0xacb0, 0x012e, 0x0005, 0x2009, 0x0049, 0x080c, 0xad4d,
+	0x012e, 0x0005, 0x080c, 0xa91e, 0x2001, 0x1a0b, 0x2003, 0x0000,
+	0x7030, 0x9065, 0x090c, 0x0d7d, 0x7034, 0x9092, 0xc350, 0x1258,
+	0x8000, 0x7036, 0x7004, 0x9086, 0x0003, 0x0110, 0x7007, 0x0000,
+	0x781f, 0x0808, 0x0058, 0x080c, 0xac0e, 0x0140, 0x080c, 0xe897,
+	0x6003, 0x0001, 0x2009, 0x0014, 0x080c, 0xad4d, 0x781f, 0x0100,
+	0x080c, 0xa93a, 0x012e, 0x0005, 0x080c, 0xa91e, 0x714c, 0x81ff,
 	0x1128, 0x2011, 0x1a0e, 0x2013, 0x0000, 0x0438, 0x2061, 0x0100,
 	0x7150, 0x9192, 0x7530, 0x12f0, 0x8108, 0x7152, 0x714c, 0x9188,
 	0x0008, 0x210c, 0x918e, 0x0006, 0x1138, 0x6014, 0x9084, 0x1984,
 	0x9085, 0x0012, 0x6016, 0x0088, 0x714c, 0x9188, 0x0008, 0x210c,
 	0x918e, 0x0009, 0x0d90, 0x6014, 0x9084, 0x1984, 0x9085, 0x0016,
 	0x6016, 0x0018, 0x706c, 0xc085, 0x706e, 0x781f, 0x0200, 0x080c,
-	0xa8b5, 0x012e, 0x0005, 0x080c, 0xa899, 0x714c, 0x2160, 0x6003,
-	0x0003, 0x2009, 0x004a, 0x080c, 0xac8d, 0x781f, 0x0200, 0x080c,
-	0xa8b5, 0x012e, 0x0005, 0x7808, 0xd09c, 0x0de8, 0x7820, 0x2060,
-	0x6003, 0x0003, 0x080c, 0xa899, 0x080c, 0x1d85, 0x781f, 0x0400,
-	0x080c, 0xa8b5, 0x012e, 0x0005, 0x7808, 0xd09c, 0x0de8, 0x7820,
-	0x2060, 0x080c, 0xa899, 0x080c, 0x1dcd, 0x781f, 0x0400, 0x080c,
-	0xa8b5, 0x012e, 0x0005, 0x7030, 0x9065, 0x0148, 0x6044, 0xc0bc,
-	0x6046, 0x7104, 0x9186, 0x0003, 0x0110, 0x080c, 0x96be, 0x012e,
+	0xa93a, 0x012e, 0x0005, 0x080c, 0xa91e, 0x714c, 0x2160, 0x6003,
+	0x0003, 0x2009, 0x004a, 0x080c, 0xad4d, 0x781f, 0x0200, 0x080c,
+	0xa93a, 0x012e, 0x0005, 0x7808, 0xd09c, 0x0de8, 0x7820, 0x2060,
+	0x6003, 0x0003, 0x080c, 0xa91e, 0x080c, 0x1db6, 0x781f, 0x0400,
+	0x080c, 0xa93a, 0x012e, 0x0005, 0x7808, 0xd09c, 0x0de8, 0x7820,
+	0x2060, 0x080c, 0xa91e, 0x080c, 0x1dfe, 0x781f, 0x0400, 0x080c,
+	0xa93a, 0x012e, 0x0005, 0x7030, 0x9065, 0x0148, 0x6044, 0xc0bc,
+	0x6046, 0x7104, 0x9186, 0x0003, 0x0110, 0x080c, 0x9739, 0x012e,
 	0x0005, 0x00f6, 0x703c, 0x9086, 0x0002, 0x0528, 0x704c, 0x907d,
 	0x0510, 0x7844, 0xc0bc, 0x7846, 0x7820, 0x9086, 0x0009, 0x0118,
-	0x080c, 0x9d79, 0x00c0, 0x7828, 0xd0fc, 0x1118, 0x080c, 0x9cf8,
+	0x080c, 0x9dfe, 0x00c0, 0x7828, 0xd0fc, 0x1118, 0x080c, 0x9d7d,
 	0x0090, 0x2001, 0x1837, 0x2004, 0x9084, 0x0028, 0x1130, 0x2001,
 	0x197b, 0x2004, 0x9086, 0xaaaa, 0x1120, 0x2001, 0x0387, 0x2003,
-	0x1000, 0x080c, 0x9c7d, 0x00fe, 0x012e, 0x0005, 0x080c, 0x7591,
+	0x1000, 0x080c, 0x9d02, 0x00fe, 0x012e, 0x0005, 0x080c, 0x75e2,
 	0x012e, 0x0005, 0x080c, 0x0d7d, 0x0005, 0x00e6, 0x2071, 0x19e6,
 	0x6044, 0xc0bc, 0x6046, 0xd0fc, 0x01b8, 0x704c, 0x9c06, 0x1190,
-	0x2019, 0x0001, 0x080c, 0xa133, 0x704f, 0x0000, 0x2001, 0x0109,
+	0x2019, 0x0001, 0x080c, 0xa1b8, 0x704f, 0x0000, 0x2001, 0x0109,
 	0x2004, 0xd08c, 0x1138, 0x2001, 0x0108, 0x2004, 0xd0bc, 0x1110,
-	0x703f, 0x0000, 0x080c, 0xa33e, 0x00ee, 0x0005, 0x0026, 0x7010,
-	0x9c06, 0x1178, 0x080c, 0xa1fd, 0x6044, 0xc0fc, 0x6046, 0x600c,
+	0x703f, 0x0000, 0x080c, 0xa3c3, 0x00ee, 0x0005, 0x0026, 0x7010,
+	0x9c06, 0x1178, 0x080c, 0xa282, 0x6044, 0xc0fc, 0x6046, 0x600c,
 	0x9015, 0x0120, 0x7212, 0x600f, 0x0000, 0x0010, 0x7212, 0x720e,
 	0x9006, 0x002e, 0x0005, 0x0026, 0x7020, 0x9c06, 0x1178, 0x080c,
-	0xa1fd, 0x6044, 0xc0fc, 0x6046, 0x600c, 0x9015, 0x0120, 0x7222,
+	0xa282, 0x6044, 0xc0fc, 0x6046, 0x600c, 0x9015, 0x0120, 0x7222,
 	0x600f, 0x0000, 0x0010, 0x7222, 0x721e, 0x9006, 0x002e, 0x0005,
 	0x00d6, 0x0036, 0x7830, 0x9c06, 0x1558, 0x2069, 0x0100, 0x68c0,
-	0x9005, 0x01f8, 0x080c, 0x8709, 0x080c, 0x9e4f, 0x68c3, 0x0000,
-	0x080c, 0xa327, 0x2069, 0x0140, 0x6b04, 0x9384, 0x1000, 0x0138,
-	0x2001, 0x0100, 0x080c, 0x2a49, 0x9006, 0x080c, 0x2a49, 0x2069,
+	0x9005, 0x01f8, 0x080c, 0x8780, 0x080c, 0x9ed4, 0x68c3, 0x0000,
+	0x080c, 0xa3ac, 0x2069, 0x0140, 0x6b04, 0x9384, 0x1000, 0x0138,
+	0x2001, 0x0100, 0x080c, 0x2a7a, 0x9006, 0x080c, 0x2a7a, 0x2069,
 	0x0100, 0x6824, 0xd084, 0x0110, 0x6827, 0x0001, 0x9085, 0x0001,
 	0x0038, 0x7808, 0xc0ad, 0x780a, 0x6003, 0x0009, 0x630a, 0x9006,
 	0x003e, 0x00de, 0x0005, 0x0016, 0x0026, 0x0036, 0x6100, 0x2019,
 	0x0100, 0x2001, 0x0382, 0x2004, 0xd09c, 0x0190, 0x00c6, 0x0126,
-	0x2091, 0x2800, 0x0016, 0x0036, 0x080c, 0xa8ff, 0x003e, 0x001e,
+	0x2091, 0x2800, 0x0016, 0x0036, 0x080c, 0xa984, 0x003e, 0x001e,
 	0x012e, 0x00ce, 0x6200, 0x2200, 0x9106, 0x0d58, 0x2200, 0x0010,
 	0x8319, 0x1d38, 0x003e, 0x002e, 0x001e, 0x0005, 0x00d6, 0x0156,
-	0x080c, 0x9b07, 0x7a14, 0x82ff, 0x0138, 0x7003, 0x0100, 0x700b,
+	0x080c, 0x9b82, 0x7a14, 0x82ff, 0x0138, 0x7003, 0x0100, 0x700b,
 	0x0003, 0x60c3, 0x0008, 0x0490, 0x7003, 0x0200, 0x7007, 0x0000,
 	0x2069, 0x1800, 0x901e, 0x6800, 0x9086, 0x0004, 0x1110, 0xc38d,
-	0x0060, 0x080c, 0x74ec, 0x1110, 0xc3ad, 0x0008, 0xc3a5, 0x6adc,
-	0xd29c, 0x1110, 0xd2ac, 0x0108, 0xc39d, 0x730e, 0x080c, 0x87ce,
+	0x0060, 0x080c, 0x753d, 0x1110, 0xc3ad, 0x0008, 0xc3a5, 0x6adc,
+	0xd29c, 0x1110, 0xd2ac, 0x0108, 0xc39d, 0x730e, 0x080c, 0x8845,
 	0x20a9, 0x0006, 0x2011, 0xffec, 0x2019, 0xffed, 0x2071, 0x0250,
 	0x2305, 0x2072, 0x8e70, 0x2205, 0x2072, 0x8e70, 0x9398, 0x0002,
-	0x9290, 0x0002, 0x1f04, 0xab00, 0x60c3, 0x0020, 0x080c, 0x9e1f,
-	0x015e, 0x00de, 0x0005, 0x0156, 0x080c, 0x9b07, 0x7a14, 0x82ff,
+	0x9290, 0x0002, 0x1f04, 0xab88, 0x60c3, 0x0020, 0x080c, 0x9ea4,
+	0x015e, 0x00de, 0x0005, 0x0156, 0x080c, 0x9b82, 0x7a14, 0x82ff,
 	0x0168, 0x9286, 0xffff, 0x0118, 0x9282, 0x000e, 0x1238, 0x7003,
 	0x0100, 0x700b, 0x0003, 0x60c3, 0x0008, 0x0488, 0x7003, 0x0200,
 	0x7007, 0x001c, 0x700f, 0x0001, 0x2011, 0x19bc, 0x2204, 0x8007,
@@ -5277,12 +5294,19 @@
 	0x1820, 0x2004, 0x7026, 0x0030, 0x2001, 0x1818, 0x2004, 0x9084,
 	0x00ff, 0x7026, 0x20a9, 0x0004, 0x20e1, 0x0001, 0x2099, 0x1805,
 	0x20e9, 0x0000, 0x20a1, 0x0256, 0x4003, 0x60c3, 0x001c, 0x015e,
-	0x0804, 0x9e1f, 0x0006, 0x2001, 0x1837, 0x2004, 0xd0ac, 0x000e,
-	0x0005, 0x2011, 0x0003, 0x080c, 0xa1be, 0x2011, 0x0002, 0x080c,
-	0xa1c8, 0x080c, 0xa0b3, 0x0036, 0x901e, 0x080c, 0xa133, 0x003e,
-	0x0005, 0x080c, 0x3381, 0x0188, 0x0016, 0x00b6, 0x00c6, 0x7010,
-	0x9085, 0x0020, 0x7012, 0x2009, 0x007e, 0x080c, 0x6644, 0xb85c,
-	0xc0ac, 0xb85e, 0x00ce, 0x00be, 0x001e, 0x0005, 0x2071, 0x188d,
+	0x0804, 0x9ea4, 0x0006, 0x2001, 0x1837, 0x2004, 0xd0ac, 0x000e,
+	0x0005, 0x2011, 0x0003, 0x080c, 0xa243, 0x2011, 0x0002, 0x080c,
+	0xa24d, 0x080c, 0xa138, 0x0036, 0x901e, 0x080c, 0xa1b8, 0x003e,
+	0x0005, 0x080c, 0x33b2, 0x0188, 0x0016, 0x00b6, 0x00c6, 0x7010,
+	0x9085, 0x0020, 0x7012, 0x2009, 0x007e, 0x080c, 0x6693, 0xb85c,
+	0xc0ac, 0xb85e, 0x00ce, 0x00be, 0x001e, 0x0005, 0x00d6, 0x00f6,
+	0x7104, 0x9186, 0x0004, 0x1120, 0x7410, 0x9e90, 0x0004, 0x0068,
+	0x9186, 0x0001, 0x1120, 0x7420, 0x9e90, 0x0008, 0x0030, 0x9186,
+	0x0002, 0x1508, 0x7428, 0x9e90, 0x000a, 0x6110, 0x2468, 0x680c,
+	0x907d, 0x01c8, 0x7810, 0x9106, 0x1128, 0x2f68, 0x780c, 0x907d,
+	0x1dc8, 0x0088, 0x780c, 0x680e, 0x7c0e, 0x2f12, 0x9006, 0x7032,
+	0x7036, 0x7004, 0x9086, 0x0003, 0x0110, 0x7007, 0x0000, 0x9006,
+	0x00fe, 0x00de, 0x0005, 0x9085, 0x0001, 0x0cd0, 0x2071, 0x188d,
 	0x7000, 0x9005, 0x0140, 0x2001, 0x0812, 0x2071, 0x1800, 0x7076,
 	0x707a, 0x706b, 0xffd4, 0x2071, 0x1800, 0x7074, 0x7056, 0x705b,
 	0x1ddc, 0x0005, 0x00e6, 0x0126, 0x2071, 0x1800, 0x2091, 0x8000,
@@ -5304,43 +5328,43 @@
 	0x0005, 0x9006, 0x600e, 0x6016, 0x601a, 0x6012, 0x6022, 0x6002,
 	0x601e, 0x605e, 0x6062, 0x604a, 0x6046, 0x2061, 0x1800, 0x6054,
 	0x8000, 0x6056, 0x0005, 0x0006, 0x6000, 0x9086, 0x0000, 0x01d0,
-	0x601c, 0xd084, 0x190c, 0x1a94, 0x6023, 0x0007, 0x2001, 0x1985,
+	0x601c, 0xd084, 0x190c, 0x1ac5, 0x6023, 0x0007, 0x2001, 0x1985,
 	0x2004, 0x0006, 0x9082, 0x0051, 0x000e, 0x0208, 0x8004, 0x601a,
-	0x080c, 0xe571, 0x604b, 0x0000, 0x6044, 0xd0fc, 0x1129, 0x9006,
-	0x6046, 0x6016, 0x000e, 0x0005, 0x080c, 0xa899, 0x0106, 0x2001,
+	0x080c, 0xe6a0, 0x604b, 0x0000, 0x6044, 0xd0fc, 0x1129, 0x9006,
+	0x6046, 0x6016, 0x000e, 0x0005, 0x080c, 0xa91e, 0x0106, 0x2001,
 	0x19f9, 0x2004, 0x9c06, 0x1130, 0x0036, 0x2019, 0x0001, 0x080c,
-	0xa133, 0x003e, 0x080c, 0xa33e, 0x010e, 0x090c, 0xa8b5, 0x0005,
+	0xa1b8, 0x003e, 0x080c, 0xa3c3, 0x010e, 0x090c, 0xa93a, 0x0005,
 	0x00e6, 0x0126, 0x2071, 0x1800, 0x2091, 0x8000, 0x7554, 0x9582,
 	0x0001, 0x0608, 0x7058, 0x2060, 0x6000, 0x9086, 0x0000, 0x0148,
 	0x9ce0, 0x001c, 0x7068, 0x9c02, 0x1208, 0x0cb0, 0x2061, 0x1ddc,
 	0x0c98, 0x6003, 0x0008, 0x8529, 0x7556, 0x9ca8, 0x001c, 0x7068,
 	0x9502, 0x1230, 0x755a, 0x9085, 0x0001, 0x012e, 0x00ee, 0x0005,
 	0x705b, 0x1ddc, 0x0cc0, 0x9006, 0x0cc0, 0x6020, 0x9084, 0x000f,
-	0x0002, 0xaca1, 0xacab, 0xacc6, 0xace1, 0xcfd7, 0xcff4, 0xd00f,
-	0xaca1, 0xacab, 0x8fb5, 0xacfd, 0xaca1, 0xaca1, 0xaca1, 0xaca1,
-	0xaca1, 0x9186, 0x0013, 0x1130, 0x6044, 0xd0fc, 0x0110, 0x080c,
-	0x95ff, 0x0005, 0x0005, 0x0066, 0x6000, 0x90b2, 0x0016, 0x1a0c,
-	0x0d7d, 0x0013, 0x006e, 0x0005, 0xacc4, 0xb430, 0xb60d, 0xacc4,
-	0xb6a3, 0xafc6, 0xacc4, 0xacc4, 0xb3b2, 0xbc0d, 0xacc4, 0xacc4,
-	0xacc4, 0xacc4, 0xacc4, 0xacc4, 0x080c, 0x0d7d, 0x0066, 0x6000,
-	0x90b2, 0x0016, 0x1a0c, 0x0d7d, 0x0013, 0x006e, 0x0005, 0xacdf,
-	0xc215, 0xacdf, 0xacdf, 0xacdf, 0xacdf, 0xacdf, 0xacdf, 0xc1b7,
-	0xc398, 0xacdf, 0xc252, 0xc2d6, 0xc252, 0xc2d6, 0xacdf, 0x080c,
+	0x0002, 0xad61, 0xad6b, 0xad86, 0xada1, 0xd0ee, 0xd10b, 0xd126,
+	0xad61, 0xad6b, 0x9025, 0xadbd, 0xad61, 0xad61, 0xad61, 0xad61,
+	0xad61, 0x9186, 0x0013, 0x1130, 0x6044, 0xd0fc, 0x0110, 0x080c,
+	0x967a, 0x0005, 0x0005, 0x0066, 0x6000, 0x90b2, 0x0016, 0x1a0c,
+	0x0d7d, 0x0013, 0x006e, 0x0005, 0xad84, 0xb4fd, 0xb6da, 0xad84,
+	0xb770, 0xb086, 0xad84, 0xad84, 0xb47f, 0xbcda, 0xad84, 0xad84,
+	0xad84, 0xad84, 0xad84, 0xad84, 0x080c, 0x0d7d, 0x0066, 0x6000,
+	0x90b2, 0x0016, 0x1a0c, 0x0d7d, 0x0013, 0x006e, 0x0005, 0xad9f,
+	0xc2f2, 0xad9f, 0xad9f, 0xad9f, 0xad9f, 0xad9f, 0xad9f, 0xc289,
+	0xc475, 0xad9f, 0xc32f, 0xc3b3, 0xc32f, 0xc3b3, 0xad9f, 0x080c,
 	0x0d7d, 0x6000, 0x9082, 0x0016, 0x1a0c, 0x0d7d, 0x6000, 0x0002,
-	0xacfb, 0xbc57, 0xbcee, 0xbe6e, 0xbedd, 0xacfb, 0xacfb, 0xacfb,
-	0xbc26, 0xc138, 0xc13b, 0xacfb, 0xacfb, 0xacfb, 0xacfb, 0xc16b,
-	0xacfb, 0xacfb, 0xacfb, 0x080c, 0x0d7d, 0x0066, 0x6000, 0x90b2,
-	0x0016, 0x1a0c, 0x0d7d, 0x0013, 0x006e, 0x0005, 0xad16, 0xad16,
-	0xad54, 0xadf3, 0xae73, 0xad16, 0xad16, 0xad16, 0xad18, 0xad16,
-	0xad16, 0xad16, 0xad16, 0xad16, 0xad16, 0xad16, 0x080c, 0x0d7d,
+	0xadbb, 0xbd24, 0xbdbe, 0xbf3e, 0xbfad, 0xadbb, 0xadbb, 0xadbb,
+	0xbcf3, 0xc20a, 0xc20d, 0xadbb, 0xadbb, 0xadbb, 0xadbb, 0xc23d,
+	0xadbb, 0xadbb, 0xadbb, 0x080c, 0x0d7d, 0x0066, 0x6000, 0x90b2,
+	0x0016, 0x1a0c, 0x0d7d, 0x0013, 0x006e, 0x0005, 0xadd6, 0xadd6,
+	0xae14, 0xaeb3, 0xaf33, 0xadd6, 0xadd6, 0xadd6, 0xadd8, 0xadd6,
+	0xadd6, 0xadd6, 0xadd6, 0xadd6, 0xadd6, 0xadd6, 0x080c, 0x0d7d,
 	0x9186, 0x004c, 0x0560, 0x9186, 0x0003, 0x190c, 0x0d7d, 0x0096,
 	0x601c, 0xc0ed, 0x601e, 0x6003, 0x0003, 0x6106, 0x6014, 0x2048,
 	0xa87c, 0x9084, 0xa000, 0xc0b5, 0xa87e, 0xa8ac, 0xa836, 0xa8b0,
 	0xa83a, 0x9006, 0xa846, 0xa84a, 0xa884, 0x9092, 0x199a, 0x0210,
 	0x2001, 0x1999, 0x8003, 0x8013, 0x8213, 0x9210, 0x621a, 0x009e,
-	0x080c, 0x1bdf, 0x2009, 0x8030, 0x080c, 0x9280, 0x0005, 0x6010,
-	0x00b6, 0x2058, 0xbca0, 0x00be, 0x2c00, 0x080c, 0xae95, 0x080c,
-	0xcf9c, 0x6003, 0x0007, 0x0005, 0x00d6, 0x0096, 0x00f6, 0x2079,
+	0x080c, 0x1c10, 0x2009, 0x8030, 0x080c, 0x92f7, 0x0005, 0x6010,
+	0x00b6, 0x2058, 0xbca0, 0x00be, 0x2c00, 0x080c, 0xaf55, 0x080c,
+	0xd0b3, 0x6003, 0x0007, 0x0005, 0x00d6, 0x0096, 0x00f6, 0x2079,
 	0x1800, 0x7a90, 0x6014, 0x2048, 0xa87c, 0xd0ec, 0x1110, 0x9290,
 	0x0018, 0xac78, 0xc4fc, 0x0046, 0xa8e0, 0x9005, 0x1140, 0xa8dc,
 	0x921a, 0x0140, 0x0220, 0xa87b, 0x0007, 0x2010, 0x0028, 0xa87b,
@@ -5348,54 +5372,54 @@
 	0x0006, 0x0016, 0x0026, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x2400,
 	0x9005, 0x1108, 0x009a, 0x2100, 0x9086, 0x0015, 0x1118, 0x2001,
 	0x0001, 0x0038, 0x2100, 0x9086, 0x0016, 0x0118, 0x2001, 0x0001,
-	0x002a, 0x94a4, 0x0007, 0x8423, 0x9405, 0x0002, 0xadbb, 0xadbb,
-	0xadb6, 0xadb9, 0xadbb, 0xadb3, 0xada6, 0xada6, 0xada6, 0xada6,
-	0xada6, 0xada6, 0xada6, 0xada6, 0xada6, 0xada6, 0x00fe, 0x00ee,
+	0x002a, 0x94a4, 0x0007, 0x8423, 0x9405, 0x0002, 0xae7b, 0xae7b,
+	0xae76, 0xae79, 0xae7b, 0xae73, 0xae66, 0xae66, 0xae66, 0xae66,
+	0xae66, 0xae66, 0xae66, 0xae66, 0xae66, 0xae66, 0x00fe, 0x00ee,
 	0x00de, 0x00ce, 0x002e, 0x001e, 0x000e, 0x004e, 0x00fe, 0x009e,
-	0x00de, 0x080c, 0x0d7d, 0x080c, 0xb862, 0x0028, 0x080c, 0xb947,
-	0x0010, 0x080c, 0xba3d, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x002e,
-	0x001e, 0x2c00, 0xa896, 0x000e, 0x080c, 0xaf53, 0x0530, 0xa804,
+	0x00de, 0x080c, 0x0d7d, 0x080c, 0xb92f, 0x0028, 0x080c, 0xba14,
+	0x0010, 0x080c, 0xbb0a, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x002e,
+	0x001e, 0x2c00, 0xa896, 0x000e, 0x080c, 0xb013, 0x0530, 0xa804,
 	0xa80e, 0x00a6, 0x2050, 0xb100, 0x00ae, 0x8006, 0x8006, 0x8007,
 	0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0002, 0xaacc, 0xabd0,
-	0xacd4, 0xadd8, 0x2031, 0x0000, 0x2041, 0x12b0, 0x080c, 0xb114,
+	0xacd4, 0xadd8, 0x2031, 0x0000, 0x2041, 0x12b0, 0x080c, 0xb1d4,
 	0x0160, 0x000e, 0x9005, 0x0120, 0x00fe, 0x009e, 0x00de, 0x0005,
-	0x00fe, 0x009e, 0x00de, 0x0804, 0xabf0, 0x2001, 0x002c, 0x900e,
-	0x080c, 0xafb9, 0x0c70, 0x91b6, 0x0015, 0x0170, 0x91b6, 0x0016,
+	0x00fe, 0x009e, 0x00de, 0x0804, 0xacb0, 0x2001, 0x002c, 0x900e,
+	0x080c, 0xb079, 0x0c70, 0x91b6, 0x0015, 0x0170, 0x91b6, 0x0016,
 	0x0158, 0x91b2, 0x0047, 0x0a0c, 0x0d7d, 0x91b2, 0x0050, 0x1a0c,
-	0x0d7d, 0x9182, 0x0047, 0x0042, 0x080c, 0xaaab, 0x0120, 0x9086,
-	0x0002, 0x0904, 0xad54, 0x0005, 0xae15, 0xae15, 0xae17, 0xae49,
-	0xae15, 0xae15, 0xae15, 0xae15, 0xae5c, 0x080c, 0x0d7d, 0x00d6,
+	0x0d7d, 0x9182, 0x0047, 0x0042, 0x080c, 0xab33, 0x0120, 0x9086,
+	0x0002, 0x0904, 0xae14, 0x0005, 0xaed5, 0xaed5, 0xaed7, 0xaf09,
+	0xaed5, 0xaed5, 0xaed5, 0xaed5, 0xaf1c, 0x080c, 0x0d7d, 0x00d6,
 	0x0016, 0x0096, 0x6003, 0x0004, 0x6114, 0x2148, 0xa87c, 0xd0fc,
 	0x01c0, 0xa878, 0xc0fc, 0x9005, 0x1158, 0xa894, 0x9005, 0x0140,
-	0x2001, 0x0000, 0x900e, 0x080c, 0xafb9, 0x080c, 0xabf0, 0x00a8,
+	0x2001, 0x0000, 0x900e, 0x080c, 0xb079, 0x080c, 0xacb0, 0x00a8,
 	0x6003, 0x0002, 0xa8a4, 0xa9a8, 0x9105, 0x1178, 0xa8ae, 0xa8b2,
 	0x0c78, 0xa87f, 0x0020, 0xa88c, 0xa88a, 0xa8a4, 0xa8ae, 0xa8a8,
 	0xa8b2, 0xa8c7, 0x0000, 0xa8cb, 0x0000, 0x009e, 0x001e, 0x00de,
-	0x0005, 0x080c, 0x965a, 0x00d6, 0x0096, 0x6114, 0x2148, 0x080c,
-	0xc865, 0x0120, 0xa87b, 0x0006, 0x080c, 0x6d9f, 0x009e, 0x00de,
-	0x080c, 0xabf0, 0x0804, 0x96bd, 0x080c, 0x965a, 0x080c, 0x320f,
-	0x080c, 0xcf99, 0x00d6, 0x0096, 0x6114, 0x2148, 0x080c, 0xc865,
-	0x0120, 0xa87b, 0x0029, 0x080c, 0x6d9f, 0x009e, 0x00de, 0x080c,
-	0xabf0, 0x0804, 0x96bd, 0x9182, 0x0047, 0x0002, 0xae83, 0xae85,
-	0xae83, 0xae83, 0xae83, 0xae83, 0xae83, 0xae83, 0xae83, 0xae83,
-	0xae83, 0xae83, 0xae85, 0x080c, 0x0d7d, 0x00d6, 0x0096, 0x601f,
+	0x0005, 0x080c, 0x96d5, 0x00d6, 0x0096, 0x6114, 0x2148, 0x080c,
+	0xc97a, 0x0120, 0xa87b, 0x0006, 0x080c, 0x6dee, 0x009e, 0x00de,
+	0x080c, 0xacb0, 0x0804, 0x9738, 0x080c, 0x96d5, 0x080c, 0x3240,
+	0x080c, 0xd0b0, 0x00d6, 0x0096, 0x6114, 0x2148, 0x080c, 0xc97a,
+	0x0120, 0xa87b, 0x0029, 0x080c, 0x6dee, 0x009e, 0x00de, 0x080c,
+	0xacb0, 0x0804, 0x9738, 0x9182, 0x0047, 0x0002, 0xaf43, 0xaf45,
+	0xaf43, 0xaf43, 0xaf43, 0xaf43, 0xaf43, 0xaf43, 0xaf43, 0xaf43,
+	0xaf43, 0xaf43, 0xaf45, 0x080c, 0x0d7d, 0x00d6, 0x0096, 0x601f,
 	0x0000, 0x6114, 0x2148, 0xa87b, 0x0000, 0xa883, 0x0000, 0x080c,
-	0x6d9f, 0x009e, 0x00de, 0x0804, 0xabf0, 0x0026, 0x0036, 0x0056,
+	0x6dee, 0x009e, 0x00de, 0x0804, 0xacb0, 0x0026, 0x0036, 0x0056,
 	0x0066, 0x0096, 0x00a6, 0x00f6, 0x0006, 0x080c, 0x1047, 0x000e,
 	0x090c, 0x0d7d, 0xa960, 0x21e8, 0xa95c, 0x9188, 0x0019, 0x21a0,
 	0x900e, 0x20a9, 0x0020, 0x4104, 0xa87a, 0x2079, 0x1800, 0x7990,
 	0x9188, 0x0018, 0x918c, 0x0fff, 0xa972, 0xac76, 0x2950, 0x00a6,
 	0x2001, 0x0205, 0x2003, 0x0000, 0x901e, 0x2029, 0x0001, 0x9182,
-	0x0034, 0x1228, 0x2011, 0x001f, 0x080c, 0xc41b, 0x04c0, 0x2130,
-	0x2009, 0x0034, 0x2011, 0x001f, 0x080c, 0xc41b, 0x96b2, 0x0034,
+	0x0034, 0x1228, 0x2011, 0x001f, 0x080c, 0xc4f8, 0x04c0, 0x2130,
+	0x2009, 0x0034, 0x2011, 0x001f, 0x080c, 0xc4f8, 0x96b2, 0x0034,
 	0xb004, 0x904d, 0x0110, 0x080c, 0x0ff9, 0x080c, 0x1047, 0x01d0,
 	0x8528, 0xa867, 0x0110, 0xa86b, 0x0000, 0x2920, 0xb406, 0x968a,
-	0x003d, 0x1230, 0x2608, 0x2011, 0x001b, 0x080c, 0xc41b, 0x00b8,
+	0x003d, 0x1230, 0x2608, 0x2011, 0x001b, 0x080c, 0xc4f8, 0x00b8,
 	0x96b2, 0x003c, 0x2009, 0x003c, 0x2950, 0x2011, 0x001b, 0x080c,
-	0xc41b, 0x0c18, 0x2001, 0x0205, 0x2003, 0x0000, 0x00ae, 0x852f,
+	0xc4f8, 0x0c18, 0x2001, 0x0205, 0x2003, 0x0000, 0x00ae, 0x852f,
 	0x95ad, 0x0050, 0xb566, 0xb070, 0xc0fd, 0xb072, 0x0048, 0x2001,
 	0x0205, 0x2003, 0x0000, 0x00ae, 0x852f, 0x95ad, 0x0050, 0xb566,
-	0x2a48, 0xa804, 0xa807, 0x0000, 0x0006, 0x080c, 0x6d9f, 0x000e,
+	0x2a48, 0xa804, 0xa807, 0x0000, 0x0006, 0x080c, 0x6dee, 0x000e,
 	0x2048, 0x9005, 0x1db0, 0x00fe, 0x00ae, 0x009e, 0x006e, 0x005e,
 	0x003e, 0x002e, 0x0005, 0x00d6, 0x00f6, 0x0096, 0x0006, 0x080c,
 	0x1047, 0x000e, 0x090c, 0x0d7d, 0xa960, 0x21e8, 0xa95c, 0x9188,
@@ -5403,7 +5427,7 @@
 	0x2079, 0x1800, 0x7990, 0x810c, 0x9188, 0x000c, 0x9182, 0x001a,
 	0x0210, 0x2009, 0x001a, 0x21a8, 0x810b, 0xa972, 0xac76, 0x2e98,
 	0xa85c, 0x9080, 0x001f, 0x20a0, 0x2001, 0x0205, 0x200c, 0x918d,
-	0x0080, 0x2102, 0x4003, 0x2003, 0x0000, 0x080c, 0x6d9f, 0x009e,
+	0x0080, 0x2102, 0x4003, 0x2003, 0x0000, 0x080c, 0x6dee, 0x009e,
 	0x00fe, 0x00de, 0x0005, 0x0016, 0x00d6, 0x00f6, 0x0096, 0x0016,
 	0x2001, 0x0205, 0x200c, 0x918d, 0x0080, 0x2102, 0x001e, 0x2079,
 	0x0200, 0x2e98, 0xa87c, 0xd0ec, 0x0118, 0x9e80, 0x000c, 0x2098,
@@ -5415,25 +5439,25 @@
 	0x1228, 0x2400, 0x9202, 0x2410, 0x9318, 0x9006, 0x2020, 0x22a8,
 	0xa800, 0x9200, 0xa802, 0x20e1, 0x0000, 0x4003, 0x83ff, 0x0180,
 	0x3300, 0x9086, 0x0280, 0x1130, 0x7814, 0x8000, 0x9085, 0x0080,
-	0x7816, 0x2e98, 0x2310, 0x84ff, 0x0904, 0xaf68, 0x0804, 0xaf6a,
+	0x7816, 0x2e98, 0x2310, 0x84ff, 0x0904, 0xb028, 0x0804, 0xb02a,
 	0x9085, 0x0001, 0x7817, 0x0000, 0x009e, 0x00fe, 0x00de, 0x001e,
 	0x0005, 0x00d6, 0x0036, 0x0096, 0x6314, 0x2348, 0xa87a, 0xa982,
-	0x080c, 0x6d93, 0x009e, 0x003e, 0x00de, 0x0005, 0x91b6, 0x0015,
-	0x1118, 0x080c, 0xabf0, 0x0030, 0x91b6, 0x0016, 0x190c, 0x0d7d,
-	0x080c, 0xabf0, 0x0005, 0x20a9, 0x000e, 0x20e1, 0x0000, 0x2e98,
+	0x080c, 0x6de2, 0x009e, 0x003e, 0x00de, 0x0005, 0x91b6, 0x0015,
+	0x1118, 0x080c, 0xacb0, 0x0030, 0x91b6, 0x0016, 0x190c, 0x0d7d,
+	0x080c, 0xacb0, 0x0005, 0x20a9, 0x000e, 0x20e1, 0x0000, 0x2e98,
 	0x6014, 0x0096, 0x2048, 0xa860, 0x20e8, 0xa85c, 0x20a0, 0x009e,
 	0x4003, 0x0136, 0x9080, 0x001b, 0x20a0, 0x2011, 0x0006, 0x20a9,
 	0x0001, 0x3418, 0x8318, 0x23a0, 0x4003, 0x3318, 0x8318, 0x2398,
 	0x8211, 0x1db8, 0x2011, 0x0006, 0x013e, 0x20a0, 0x3318, 0x8318,
 	0x2398, 0x4003, 0x3418, 0x8318, 0x23a0, 0x8211, 0x1db8, 0x0096,
-	0x080c, 0xc865, 0x0130, 0x6014, 0x2048, 0xa807, 0x0000, 0xa867,
-	0x0103, 0x009e, 0x0804, 0xabf0, 0x0096, 0x00d6, 0x0036, 0x7330,
+	0x080c, 0xc97a, 0x0130, 0x6014, 0x2048, 0xa807, 0x0000, 0xa867,
+	0x0103, 0x009e, 0x0804, 0xacb0, 0x0096, 0x00d6, 0x0036, 0x7330,
 	0x9386, 0x0200, 0x11a8, 0x6010, 0x00b6, 0x2058, 0xb8d7, 0x0000,
 	0x00be, 0x6014, 0x9005, 0x0130, 0x2048, 0xa807, 0x0000, 0xa867,
-	0x0103, 0xab32, 0x080c, 0xabf0, 0x003e, 0x00de, 0x009e, 0x0005,
-	0x0011, 0x1d48, 0x0cc8, 0x0006, 0x0016, 0x080c, 0xcf84, 0x0188,
+	0x0103, 0xab32, 0x080c, 0xacb0, 0x003e, 0x00de, 0x009e, 0x0005,
+	0x0011, 0x1d48, 0x0cc8, 0x0006, 0x0016, 0x080c, 0xd09b, 0x0188,
 	0x6014, 0x9005, 0x1170, 0x600b, 0x0003, 0x601b, 0x0000, 0x604b,
-	0x0000, 0x2009, 0x0022, 0x080c, 0xb408, 0x9006, 0x001e, 0x000e,
+	0x0000, 0x2009, 0x0022, 0x080c, 0xb4d5, 0x9006, 0x001e, 0x000e,
 	0x0005, 0x9085, 0x0001, 0x0cd0, 0x0096, 0x0016, 0x20a9, 0x0014,
 	0x9e80, 0x000c, 0x20e1, 0x0000, 0x2098, 0x6014, 0x2048, 0xa860,
 	0x20e8, 0xa85c, 0x9080, 0x0002, 0x20a0, 0x4003, 0x2001, 0x0205,
@@ -5441,22 +5465,22 @@
 	0x000a, 0xa804, 0x2048, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0002,
 	0x20a0, 0x4003, 0x2001, 0x0205, 0x2003, 0x0002, 0x2099, 0x0260,
 	0x20a9, 0x0020, 0x4003, 0x2003, 0x0000, 0x6014, 0x2048, 0xa800,
-	0x2048, 0xa867, 0x0103, 0x080c, 0xabf0, 0x001e, 0x009e, 0x0005,
+	0x2048, 0xa867, 0x0103, 0x080c, 0xacb0, 0x001e, 0x009e, 0x0005,
 	0x0096, 0x0016, 0x900e, 0x7030, 0x9086, 0x0100, 0x0140, 0x7038,
 	0x9084, 0x00ff, 0x800c, 0x703c, 0x9084, 0x00ff, 0x8004, 0x9080,
 	0x0004, 0x9108, 0x810b, 0x2011, 0x0002, 0x2019, 0x000c, 0x6014,
-	0x2048, 0x080c, 0xc41b, 0x080c, 0xc865, 0x0140, 0x6014, 0x2048,
-	0xa807, 0x0000, 0xa864, 0xa8e2, 0xa867, 0x0103, 0x080c, 0xabf0,
+	0x2048, 0x080c, 0xc4f8, 0x080c, 0xc97a, 0x0140, 0x6014, 0x2048,
+	0xa807, 0x0000, 0xa864, 0xa8e2, 0xa867, 0x0103, 0x080c, 0xacb0,
 	0x001e, 0x009e, 0x0005, 0x0016, 0x2009, 0x0000, 0x7030, 0x9086,
 	0x0200, 0x0110, 0x2009, 0x0001, 0x0096, 0x6014, 0x904d, 0x090c,
-	0x0d7d, 0xa97a, 0x080c, 0x6d9f, 0x009e, 0x080c, 0xabf0, 0x001e,
+	0x0d7d, 0xa97a, 0x080c, 0x6dee, 0x009e, 0x080c, 0xacb0, 0x001e,
 	0x0005, 0x0016, 0x0096, 0x7030, 0x9086, 0x0100, 0x1118, 0x2009,
 	0x0004, 0x0010, 0x7034, 0x800c, 0x810b, 0x2011, 0x000c, 0x2019,
 	0x000c, 0x6014, 0x2048, 0xa804, 0x0096, 0x9005, 0x0108, 0x2048,
-	0x080c, 0xc41b, 0x009e, 0x080c, 0xc865, 0x0148, 0xa804, 0x9005,
+	0x080c, 0xc4f8, 0x009e, 0x080c, 0xc97a, 0x0148, 0xa804, 0x9005,
 	0x1158, 0xa807, 0x0000, 0xa864, 0xa8e2, 0xa867, 0x0103, 0x080c,
-	0xabf0, 0x009e, 0x001e, 0x0005, 0x0086, 0x2040, 0xa030, 0x8007,
-	0x9086, 0x0100, 0x1118, 0x080c, 0xb5c6, 0x00e0, 0xa034, 0x8007,
+	0xacb0, 0x009e, 0x001e, 0x0005, 0x0086, 0x2040, 0xa030, 0x8007,
+	0x9086, 0x0100, 0x1118, 0x080c, 0xb693, 0x00e0, 0xa034, 0x8007,
 	0x800c, 0x8806, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0,
 	0x9080, 0x000c, 0xa87b, 0x0000, 0xa883, 0x0000, 0xa897, 0x4000,
 	0xaaa0, 0xab9c, 0xaca8, 0xada4, 0x2031, 0x0000, 0x2041, 0x1296,
@@ -5467,399 +5491,401 @@
 	0x009e, 0x0005, 0x00e6, 0x00d6, 0x0026, 0x7008, 0x9084, 0x00ff,
 	0x6210, 0x00b6, 0x2258, 0xba10, 0x00be, 0x9206, 0x1520, 0x700c,
 	0x6210, 0x00b6, 0x2258, 0xba14, 0x00be, 0x9206, 0x11e0, 0x604b,
-	0x0000, 0x2c68, 0x0016, 0x2009, 0x0035, 0x080c, 0xcefc, 0x001e,
+	0x0000, 0x2c68, 0x0016, 0x2009, 0x0035, 0x080c, 0xd013, 0x001e,
 	0x1158, 0x622c, 0x2268, 0x2071, 0x026c, 0x6b20, 0x9386, 0x0003,
-	0x0130, 0x9386, 0x0006, 0x0128, 0x080c, 0xabf0, 0x0020, 0x0039,
-	0x0010, 0x080c, 0xb23d, 0x002e, 0x00de, 0x00ee, 0x0005, 0x0096,
-	0x6814, 0x2048, 0x9186, 0x0015, 0x0904, 0xb21c, 0x918e, 0x0016,
-	0x1904, 0xb23b, 0x700c, 0x908c, 0xff00, 0x9186, 0x1700, 0x0120,
-	0x9186, 0x0300, 0x1904, 0xb1f6, 0x89ff, 0x1138, 0x6800, 0x9086,
-	0x000f, 0x0904, 0xb1d8, 0x0804, 0xb239, 0x6808, 0x9086, 0xffff,
-	0x1904, 0xb21e, 0xa87c, 0x9084, 0x0060, 0x9086, 0x0020, 0x1128,
-	0xa83c, 0xa940, 0x9105, 0x1904, 0xb21e, 0x6824, 0xd084, 0x1904,
-	0xb21e, 0xd0b4, 0x0158, 0x0016, 0x2001, 0x1985, 0x200c, 0x6018,
-	0x9102, 0x9082, 0x0005, 0x001e, 0x1a04, 0xb21e, 0x080c, 0xca54,
-	0x6864, 0xa882, 0xa87c, 0xc0dc, 0xc0f4, 0xc0d4, 0xa87e, 0x0026,
-	0x900e, 0x6a18, 0x2001, 0x000a, 0x080c, 0x9181, 0xa884, 0x920a,
-	0x0208, 0x8011, 0xaa86, 0x82ff, 0x002e, 0x1138, 0x00c6, 0x2d60,
-	0x080c, 0xc56e, 0x00ce, 0x0804, 0xb239, 0x00c6, 0xa868, 0xd0fc,
-	0x1118, 0x080c, 0x60d6, 0x0010, 0x080c, 0x64de, 0x00ce, 0x1904,
-	0xb21e, 0x00c6, 0x2d60, 0x080c, 0xabf0, 0x00ce, 0x0804, 0xb239,
-	0x00c6, 0x080c, 0xac60, 0x0198, 0x6017, 0x0000, 0x6810, 0x6012,
-	0x080c, 0xccfe, 0x6023, 0x0003, 0x6904, 0x00c6, 0x2d60, 0x080c,
-	0xabf0, 0x00ce, 0x080c, 0xac8d, 0x00ce, 0x0804, 0xb239, 0x2001,
-	0x1987, 0x2004, 0x684a, 0x00ce, 0x0804, 0xb239, 0x7008, 0x9086,
-	0x000b, 0x11c8, 0x6010, 0x00b6, 0x2058, 0xb900, 0xc1bc, 0xb902,
-	0x00be, 0x00c6, 0x2d60, 0xa87b, 0x0003, 0x080c, 0xcf3e, 0x6007,
-	0x0085, 0x6003, 0x000b, 0x6023, 0x0002, 0x2009, 0x8020, 0x080c,
-	0x9239, 0x00ce, 0x0430, 0x700c, 0x9086, 0x2a00, 0x1138, 0x2001,
-	0x1987, 0x2004, 0x684a, 0x00e8, 0x04c1, 0x00e8, 0x89ff, 0x090c,
-	0x0d7d, 0x00c6, 0x00d6, 0x2d60, 0xa867, 0x0103, 0xa87b, 0x0003,
-	0x080c, 0x6bb5, 0x080c, 0xca54, 0x080c, 0xac2b, 0x0026, 0x6010,
-	0x00b6, 0x2058, 0xba3c, 0x080c, 0x676f, 0x00be, 0x002e, 0x00de,
-	0x00ce, 0x080c, 0xabf0, 0x009e, 0x0005, 0x9186, 0x0015, 0x1128,
-	0x2001, 0x1987, 0x2004, 0x684a, 0x0068, 0x918e, 0x0016, 0x1160,
-	0x00c6, 0x2d00, 0x2060, 0x080c, 0xe571, 0x080c, 0x88d7, 0x080c,
-	0xabf0, 0x00ce, 0x080c, 0xabf0, 0x0005, 0x0026, 0x0036, 0x0046,
-	0x7228, 0xacb0, 0xabac, 0xd2f4, 0x0130, 0x2001, 0x1987, 0x2004,
-	0x684a, 0x0804, 0xb2b7, 0x00c6, 0x2d60, 0x080c, 0xc446, 0x00ce,
-	0x6804, 0x9086, 0x0050, 0x1168, 0x00c6, 0x2d00, 0x2060, 0x6003,
-	0x0001, 0x6007, 0x0050, 0x2009, 0x8023, 0x080c, 0x9239, 0x00ce,
-	0x04f0, 0x6800, 0x9086, 0x000f, 0x01a8, 0x89ff, 0x090c, 0x0d7d,
-	0x6800, 0x9086, 0x0004, 0x1190, 0xa87c, 0xd0ac, 0x0178, 0xa843,
-	0x0fff, 0xa83f, 0x0fff, 0xa880, 0xc0fc, 0xa882, 0x2001, 0x0001,
-	0x6832, 0x0400, 0x2001, 0x0007, 0x6832, 0x00e0, 0xa87c, 0xd0b4,
-	0x1150, 0xd0ac, 0x0db8, 0x6824, 0xd0f4, 0x1d48, 0xa838, 0xa934,
-	0x9105, 0x0d80, 0x0c20, 0xd2ec, 0x1d68, 0x7024, 0x9306, 0x1118,
-	0x7020, 0x9406, 0x0d38, 0x7020, 0x683e, 0x7024, 0x683a, 0x2001,
-	0x0005, 0x6832, 0x080c, 0xcbe8, 0x080c, 0x96bd, 0x0010, 0x080c,
-	0xabf0, 0x004e, 0x003e, 0x002e, 0x0005, 0x00e6, 0x00d6, 0x0026,
-	0x7008, 0x9084, 0x00ff, 0x6210, 0x00b6, 0x2258, 0xba10, 0x00be,
-	0x9206, 0x1904, 0xb322, 0x700c, 0x6210, 0x00b6, 0x2258, 0xba14,
-	0x00be, 0x9206, 0x1904, 0xb322, 0x6038, 0x2068, 0x6824, 0xc0dc,
-	0x6826, 0x6a20, 0x9286, 0x0007, 0x0904, 0xb322, 0x9286, 0x0002,
-	0x0904, 0xb322, 0x9286, 0x0000, 0x05e8, 0x6808, 0x633c, 0x9306,
-	0x15c8, 0x2071, 0x026c, 0x9186, 0x0015, 0x0570, 0x918e, 0x0016,
-	0x1100, 0x00c6, 0x6038, 0x2060, 0x6104, 0x9186, 0x004b, 0x01c0,
-	0x9186, 0x004c, 0x01a8, 0x9186, 0x004d, 0x0190, 0x9186, 0x004e,
-	0x0178, 0x9186, 0x0052, 0x0160, 0x6014, 0x0096, 0x2048, 0x080c,
-	0xc865, 0x090c, 0x0d7d, 0xa87b, 0x0003, 0x009e, 0x080c, 0xcf3e,
-	0x6007, 0x0085, 0x6003, 0x000b, 0x6023, 0x0002, 0x2009, 0x8020,
-	0x080c, 0x9239, 0x00ce, 0x0030, 0x6038, 0x2070, 0x2001, 0x1987,
-	0x2004, 0x704a, 0x080c, 0xabf0, 0x002e, 0x00de, 0x00ee, 0x0005,
-	0x00b6, 0x0096, 0x00f6, 0x6014, 0x2048, 0x6010, 0x2058, 0x91b6,
-	0x0015, 0x0130, 0xba08, 0xbb0c, 0xbc00, 0xc48c, 0xbc02, 0x0460,
-	0x0096, 0x0156, 0x0036, 0x0026, 0x2b48, 0x9e90, 0x0010, 0x2019,
-	0x000a, 0x20a9, 0x0004, 0x080c, 0xbbd5, 0x002e, 0x003e, 0x015e,
-	0x009e, 0x1904, 0xb391, 0x0096, 0x0156, 0x0036, 0x0026, 0x2b48,
-	0x9e90, 0x0014, 0x2019, 0x0006, 0x20a9, 0x0004, 0x080c, 0xbbd5,
-	0x002e, 0x003e, 0x015e, 0x009e, 0x15a0, 0x7238, 0xba0a, 0x733c,
-	0xbb0e, 0xbc00, 0xc48d, 0xbc02, 0xa804, 0x9005, 0x1128, 0x00fe,
-	0x009e, 0x00be, 0x0804, 0xafff, 0x0096, 0x2048, 0xaa12, 0xab16,
-	0xac0a, 0x009e, 0x8006, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084,
-	0xffc0, 0x9080, 0x0002, 0x2009, 0x002b, 0xaaa0, 0xab9c, 0xaca8,
-	0xada4, 0x2031, 0x0000, 0x2041, 0x1296, 0x080c, 0xb114, 0x0130,
-	0x00fe, 0x009e, 0x080c, 0xabf0, 0x00be, 0x0005, 0x080c, 0xb5c6,
-	0x0cb8, 0x2b78, 0x00f6, 0x080c, 0x320f, 0x080c, 0xcf99, 0x00fe,
-	0x00c6, 0x080c, 0xab9a, 0x2f00, 0x6012, 0x6017, 0x0000, 0x6023,
-	0x0001, 0x6007, 0x0001, 0x6003, 0x0001, 0x2001, 0x0007, 0x080c,
-	0x6594, 0x080c, 0x65c0, 0x080c, 0x9240, 0x080c, 0x96bd, 0x00ce,
-	0x0804, 0xb364, 0x2100, 0x91b2, 0x0053, 0x1a0c, 0x0d7d, 0x91b2,
-	0x0040, 0x1a04, 0xb41a, 0x0002, 0xb408, 0xb408, 0xb3fe, 0xb408,
-	0xb408, 0xb408, 0xb3fc, 0xb3fc, 0xb3fc, 0xb3fc, 0xb3fc, 0xb3fc,
-	0xb3fc, 0xb3fc, 0xb3fc, 0xb3fc, 0xb3fc, 0xb3fc, 0xb3fc, 0xb3fc,
-	0xb3fc, 0xb3fc, 0xb3fc, 0xb3fc, 0xb3fc, 0xb3fc, 0xb3fc, 0xb3fc,
-	0xb3fc, 0xb3fc, 0xb3fc, 0xb408, 0xb3fc, 0xb408, 0xb408, 0xb3fc,
-	0xb3fc, 0xb3fc, 0xb3fc, 0xb3fc, 0xb3fe, 0xb3fc, 0xb3fc, 0xb3fc,
-	0xb3fc, 0xb3fc, 0xb3fc, 0xb3fc, 0xb3fc, 0xb3fc, 0xb408, 0xb408,
-	0xb3fc, 0xb3fc, 0xb3fc, 0xb3fc, 0xb3fc, 0xb3fc, 0xb3fc, 0xb3fc,
-	0xb3fc, 0xb408, 0xb3fc, 0xb3fc, 0x080c, 0x0d7d, 0x0066, 0x00b6,
-	0x6610, 0x2658, 0xb8d4, 0xc08c, 0xb8d6, 0x00be, 0x006e, 0x0000,
-	0x6003, 0x0001, 0x6106, 0x9186, 0x0032, 0x0118, 0x080c, 0x9240,
-	0x0010, 0x080c, 0x9239, 0x0126, 0x2091, 0x8000, 0x080c, 0x96bd,
-	0x012e, 0x0005, 0x2600, 0x0002, 0xb408, 0xb408, 0xb42e, 0xb408,
-	0xb408, 0xb42e, 0xb42e, 0xb42e, 0xb42e, 0xb408, 0xb42e, 0xb408,
-	0xb42e, 0xb408, 0xb42e, 0xb42e, 0xb42e, 0xb42e, 0x080c, 0x0d7d,
-	0x6004, 0x90b2, 0x0053, 0x1a0c, 0x0d7d, 0x91b6, 0x0013, 0x0904,
-	0xb505, 0x91b6, 0x0027, 0x1904, 0xb4b1, 0x080c, 0x95ff, 0x6004,
-	0x080c, 0xca69, 0x01b0, 0x080c, 0xca7a, 0x01a8, 0x908e, 0x0021,
-	0x0904, 0xb4ae, 0x908e, 0x0022, 0x1130, 0x080c, 0xb02b, 0x0904,
-	0xb4aa, 0x0804, 0xb4ab, 0x908e, 0x003d, 0x0904, 0xb4ae, 0x0804,
-	0xb4a4, 0x080c, 0x323e, 0x2001, 0x0007, 0x080c, 0x6594, 0x6010,
-	0x00b6, 0x2058, 0xb9a0, 0x00be, 0x080c, 0xb5c6, 0x9186, 0x007e,
-	0x1148, 0x2001, 0x1837, 0x2014, 0xc285, 0x080c, 0x74ec, 0x1108,
-	0xc2ad, 0x2202, 0x080c, 0xa899, 0x0036, 0x0026, 0x2019, 0x0028,
-	0x2110, 0x080c, 0xe67d, 0x002e, 0x003e, 0x0016, 0x0026, 0x0036,
-	0x2110, 0x2019, 0x0028, 0x080c, 0x93c6, 0x0076, 0x903e, 0x080c,
-	0x928f, 0x6010, 0x00b6, 0x905d, 0x0100, 0x00be, 0x2c08, 0x080c,
-	0xe038, 0x007e, 0x003e, 0x002e, 0x001e, 0x080c, 0xa8b5, 0x080c,
-	0xcf99, 0x0016, 0x080c, 0xccf6, 0x080c, 0xabf0, 0x001e, 0x080c,
-	0x3318, 0x080c, 0x96bd, 0x0030, 0x080c, 0xccf6, 0x080c, 0xabf0,
-	0x080c, 0x96bd, 0x0005, 0x080c, 0xb5c6, 0x0cb0, 0x080c, 0xb602,
-	0x0c98, 0x9186, 0x0015, 0x0118, 0x9186, 0x0016, 0x1140, 0x080c,
-	0xaaab, 0x0d80, 0x9086, 0x0002, 0x0904, 0xb60d, 0x0c58, 0x9186,
-	0x0014, 0x1d40, 0x080c, 0x95ff, 0x6004, 0x908e, 0x0022, 0x1118,
-	0x080c, 0xb02b, 0x09f8, 0x080c, 0x320f, 0x080c, 0xcf99, 0x080c,
-	0xca69, 0x1190, 0x080c, 0x323e, 0x6010, 0x00b6, 0x2058, 0xb9a0,
-	0x00be, 0x080c, 0xb5c6, 0x9186, 0x007e, 0x1128, 0x2001, 0x1837,
-	0x200c, 0xc185, 0x2102, 0x0800, 0x080c, 0xca7a, 0x1120, 0x080c,
-	0xb5c6, 0x0804, 0xb4a4, 0x6004, 0x908e, 0x0032, 0x1160, 0x00e6,
-	0x00f6, 0x2071, 0x189e, 0x2079, 0x0000, 0x080c, 0x35b9, 0x00fe,
-	0x00ee, 0x0804, 0xb4a4, 0x6004, 0x908e, 0x0021, 0x0d40, 0x908e,
-	0x0022, 0x090c, 0xb5c6, 0x0804, 0xb4a4, 0x90b2, 0x0040, 0x1a04,
-	0xb5a6, 0x2008, 0x0002, 0xb54d, 0xb54e, 0xb551, 0xb554, 0xb557,
-	0xb55a, 0xb54b, 0xb54b, 0xb54b, 0xb54b, 0xb54b, 0xb54b, 0xb54b,
-	0xb54b, 0xb54b, 0xb54b, 0xb54b, 0xb54b, 0xb54b, 0xb54b, 0xb54b,
-	0xb54b, 0xb54b, 0xb54b, 0xb54b, 0xb54b, 0xb54b, 0xb54b, 0xb54b,
-	0xb54b, 0xb55d, 0xb568, 0xb54b, 0xb569, 0xb568, 0xb54b, 0xb54b,
-	0xb54b, 0xb54b, 0xb54b, 0xb568, 0xb568, 0xb54b, 0xb54b, 0xb54b,
-	0xb54b, 0xb54b, 0xb54b, 0xb54b, 0xb54b, 0xb591, 0xb568, 0xb54b,
-	0xb564, 0xb54b, 0xb54b, 0xb54b, 0xb565, 0xb54b, 0xb54b, 0xb54b,
-	0xb568, 0xb58c, 0xb54b, 0x080c, 0x0d7d, 0x00d0, 0x2001, 0x000b,
-	0x00f8, 0x2001, 0x0003, 0x00e0, 0x2001, 0x0005, 0x00c8, 0x2001,
-	0x0001, 0x00b0, 0x2001, 0x0009, 0x0098, 0x6003, 0x0005, 0x080c,
-	0xcf9c, 0x080c, 0x96bd, 0x0058, 0x0018, 0x0010, 0x080c, 0x6594,
-	0x04b8, 0x080c, 0xcf9c, 0x6003, 0x0004, 0x080c, 0x96bd, 0x0005,
-	0x080c, 0x6594, 0x6003, 0x0002, 0x0036, 0x2019, 0x1852, 0x2304,
-	0x9084, 0xff00, 0x1120, 0x2001, 0x1985, 0x201c, 0x0040, 0x8007,
-	0x909a, 0x0004, 0x0ec0, 0x8003, 0x801b, 0x831b, 0x9318, 0x631a,
-	0x003e, 0x080c, 0x96bd, 0x0c18, 0x080c, 0xccf6, 0x080c, 0xabf0,
-	0x08f0, 0x00e6, 0x00f6, 0x2071, 0x189e, 0x2079, 0x0000, 0x080c,
-	0x35b9, 0x00fe, 0x00ee, 0x080c, 0x95ff, 0x080c, 0xabf0, 0x0878,
-	0x6003, 0x0002, 0x080c, 0xcf9c, 0x0804, 0x96bd, 0x2600, 0x2008,
-	0x0002, 0xb5bd, 0xb5a0, 0xb5bb, 0xb5a0, 0xb5a0, 0xb5bb, 0xb5bb,
-	0xb5bb, 0xb5bb, 0xb5a0, 0xb5bb, 0xb5a0, 0xb5bb, 0xb5a0, 0xb5bb,
-	0xb5bb, 0xb5bb, 0xb5bb, 0x080c, 0x0d7d, 0x0096, 0x6014, 0x2048,
-	0x080c, 0x6d9f, 0x009e, 0x080c, 0xabf0, 0x0005, 0x00e6, 0x0096,
-	0x0026, 0x0016, 0x080c, 0xc865, 0x0568, 0x6014, 0x2048, 0xa864,
-	0x9086, 0x0139, 0x11a8, 0xa894, 0x9086, 0x0056, 0x1148, 0x080c,
-	0x5496, 0x0130, 0x2001, 0x0000, 0x900e, 0x2011, 0x4000, 0x0028,
-	0x2001, 0x0030, 0x900e, 0x2011, 0x4005, 0x080c, 0xce63, 0x0090,
-	0xa868, 0xd0fc, 0x0178, 0xa807, 0x0000, 0x0016, 0x6004, 0x908e,
-	0x0021, 0x0168, 0x908e, 0x003d, 0x0150, 0x001e, 0xa867, 0x0103,
-	0xa833, 0x0100, 0x001e, 0x002e, 0x009e, 0x00ee, 0x0005, 0x001e,
-	0x0009, 0x0cc0, 0x0096, 0x6014, 0x2048, 0xa800, 0x2048, 0xa867,
-	0x0103, 0xa823, 0x8001, 0x009e, 0x0005, 0x00b6, 0x6610, 0x2658,
-	0xb804, 0x9084, 0x00ff, 0x90b2, 0x000c, 0x1a0c, 0x0d7d, 0x6604,
-	0x96b6, 0x004d, 0x1120, 0x080c, 0xcd82, 0x0804, 0xb692, 0x6604,
-	0x96b6, 0x0043, 0x1120, 0x080c, 0xcdcb, 0x0804, 0xb692, 0x6604,
-	0x96b6, 0x004b, 0x1120, 0x080c, 0xcdf7, 0x0804, 0xb692, 0x6604,
-	0x96b6, 0x0033, 0x1120, 0x080c, 0xcd18, 0x0804, 0xb692, 0x6604,
-	0x96b6, 0x0028, 0x1120, 0x080c, 0xcab8, 0x0804, 0xb692, 0x6604,
-	0x96b6, 0x0029, 0x1120, 0x080c, 0xcaf9, 0x0804, 0xb692, 0x6604,
-	0x96b6, 0x001f, 0x1120, 0x080c, 0xafd3, 0x0804, 0xb692, 0x6604,
-	0x96b6, 0x0000, 0x1118, 0x080c, 0xb328, 0x04e0, 0x6604, 0x96b6,
-	0x0022, 0x1118, 0x080c, 0xb00c, 0x04a8, 0x6604, 0x96b6, 0x0035,
-	0x1118, 0x080c, 0xb132, 0x0470, 0x6604, 0x96b6, 0x0039, 0x1118,
-	0x080c, 0xb2bd, 0x0438, 0x6604, 0x96b6, 0x003d, 0x1118, 0x080c,
-	0xb044, 0x0400, 0x6604, 0x96b6, 0x0044, 0x1118, 0x080c, 0xb080,
-	0x00c8, 0x6604, 0x96b6, 0x0049, 0x1118, 0x080c, 0xb0c1, 0x0090,
-	0x6604, 0x96b6, 0x0041, 0x1118, 0x080c, 0xb0ab, 0x0058, 0x91b6,
-	0x0015, 0x1110, 0x0063, 0x0030, 0x91b6, 0x0016, 0x1128, 0x00be,
-	0x0804, 0xb8ee, 0x00be, 0x0005, 0x080c, 0xacaa, 0x0cd8, 0xb6af,
-	0xb6b2, 0xb6af, 0xb6f9, 0xb6af, 0xb862, 0xb8fb, 0xb6af, 0xb6af,
-	0xb8c4, 0xb6af, 0xb8da, 0x0096, 0x601f, 0x0000, 0x6014, 0x2048,
-	0xa800, 0x2048, 0xa867, 0x0103, 0x009e, 0x0804, 0xabf0, 0xa001,
-	0xa001, 0x0005, 0x00e6, 0x2071, 0x1800, 0x7090, 0x9086, 0x0074,
-	0x1540, 0x080c, 0xe009, 0x11b0, 0x6010, 0x00b6, 0x2058, 0x7030,
-	0xd08c, 0x0128, 0xb800, 0xd0bc, 0x0110, 0xc0c5, 0xb802, 0x00f9,
-	0x00be, 0x2001, 0x0006, 0x080c, 0x6594, 0x080c, 0x323e, 0x080c,
-	0xabf0, 0x0098, 0x2001, 0x000a, 0x080c, 0x6594, 0x080c, 0x323e,
-	0x6003, 0x0001, 0x6007, 0x0001, 0x080c, 0x9240, 0x080c, 0x96bd,
-	0x0020, 0x2001, 0x0001, 0x080c, 0xb832, 0x00ee, 0x0005, 0x00d6,
-	0xb800, 0xd084, 0x0160, 0x9006, 0x080c, 0x6580, 0x2069, 0x1847,
-	0x6804, 0xd0a4, 0x0120, 0x2001, 0x0006, 0x080c, 0x65c0, 0x00de,
-	0x0005, 0x00b6, 0x0096, 0x00d6, 0x2011, 0x1824, 0x2204, 0x9086,
-	0x0074, 0x1904, 0xb807, 0x6010, 0x2058, 0xbaa0, 0x9286, 0x007e,
-	0x1120, 0x080c, 0xba48, 0x0804, 0xb76b, 0x080c, 0xba3d, 0x6010,
-	0x2058, 0xbaa0, 0x9286, 0x0080, 0x1510, 0x6014, 0x9005, 0x01a8,
-	0x2048, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0039, 0x1140, 0x2001,
-	0x0000, 0x900e, 0x2011, 0x4000, 0x080c, 0xce63, 0x0030, 0xa807,
-	0x0000, 0xa867, 0x0103, 0xa833, 0x0200, 0x2001, 0x0006, 0x080c,
-	0x6594, 0x080c, 0x323e, 0x080c, 0xabf0, 0x0804, 0xb80c, 0x080c,
-	0xb81a, 0x6014, 0x9005, 0x0190, 0x2048, 0xa868, 0xd0f4, 0x01e8,
-	0xa864, 0x9084, 0x00ff, 0x9086, 0x0039, 0x1d08, 0x2001, 0x0000,
-	0x900e, 0x2011, 0x4000, 0x080c, 0xce63, 0x08f8, 0x080c, 0xb810,
-	0x0160, 0x9006, 0x080c, 0x6580, 0x2001, 0x0004, 0x080c, 0x65c0,
-	0x2001, 0x0007, 0x080c, 0x6594, 0x08a0, 0x2001, 0x0004, 0x080c,
-	0x6594, 0x6003, 0x0001, 0x6007, 0x0003, 0x080c, 0x9240, 0x080c,
-	0x96bd, 0x0804, 0xb80c, 0xb85c, 0xd0e4, 0x01d8, 0x080c, 0xcc90,
-	0x080c, 0x74ec, 0x0118, 0xd0dc, 0x1904, 0xb72d, 0x2011, 0x1837,
-	0x2204, 0xc0ad, 0x2012, 0x2001, 0x196c, 0x2004, 0x00f6, 0x2079,
-	0x0100, 0x78e3, 0x0000, 0x080c, 0x26a4, 0x78e2, 0x00fe, 0x0804,
-	0xb72d, 0x080c, 0xccd1, 0x2011, 0x1837, 0x2204, 0xc0a5, 0x2012,
-	0x0006, 0x080c, 0xe199, 0x000e, 0x1904, 0xb72d, 0xc0b5, 0x2012,
-	0x2001, 0x0006, 0x080c, 0x6594, 0x9006, 0x080c, 0x6580, 0x00c6,
-	0x2001, 0x180f, 0x2004, 0xd09c, 0x0520, 0x00f6, 0x2079, 0x0100,
-	0x00e6, 0x2071, 0x1800, 0x700c, 0x9084, 0x00ff, 0x78e6, 0x707e,
-	0x7010, 0x78ea, 0x7082, 0x908c, 0x00ff, 0x00ee, 0x780c, 0xc0b5,
-	0x780e, 0x00fe, 0x080c, 0x2679, 0x00f6, 0x2100, 0x900e, 0x080c,
-	0x2630, 0x795e, 0x00fe, 0x9186, 0x0081, 0x01d8, 0x2009, 0x0081,
-	0x00c8, 0x2009, 0x00ef, 0x00f6, 0x2079, 0x0100, 0x79ea, 0x7932,
-	0x7936, 0x780c, 0xc0b5, 0x780e, 0x00fe, 0x080c, 0x2679, 0x00f6,
-	0x2079, 0x1800, 0x7982, 0x2100, 0x900e, 0x080c, 0x2630, 0x795e,
-	0x00fe, 0x8108, 0x080c, 0x65e3, 0x2b00, 0x00ce, 0x1904, 0xb72d,
-	0x6012, 0x2009, 0x180f, 0x210c, 0xd19c, 0x0150, 0x2009, 0x027c,
-	0x210c, 0x918c, 0x00ff, 0xb912, 0x2009, 0x027d, 0x210c, 0xb916,
-	0x2001, 0x0002, 0x080c, 0x6594, 0x6023, 0x0001, 0x6003, 0x0001,
-	0x6007, 0x0002, 0x080c, 0x9240, 0x080c, 0x96bd, 0x0028, 0x080c,
-	0xb5c6, 0x2001, 0x0001, 0x0431, 0x00de, 0x009e, 0x00be, 0x0005,
-	0x2001, 0x1810, 0x2004, 0xd0a4, 0x0120, 0x2001, 0x1848, 0x2004,
-	0xd0ac, 0x0005, 0x00e6, 0x080c, 0xe6d6, 0x0190, 0x2071, 0x0260,
-	0x7108, 0x720c, 0x918c, 0x00ff, 0x1118, 0x9284, 0xff00, 0x0140,
-	0x6010, 0x2058, 0xb8a0, 0x9084, 0xff80, 0x1110, 0xb912, 0xba16,
-	0x00ee, 0x0005, 0x2030, 0x9005, 0x0158, 0x2001, 0x0007, 0x080c,
-	0x6594, 0x080c, 0x5709, 0x1120, 0x2001, 0x0007, 0x080c, 0x65c0,
-	0x2600, 0x9005, 0x11b0, 0x6014, 0x0096, 0x2048, 0xa868, 0x009e,
-	0xd0fc, 0x1178, 0x0036, 0x0046, 0x6010, 0x00b6, 0x2058, 0xbba0,
-	0x00be, 0x2021, 0x0004, 0x2011, 0x8014, 0x080c, 0x4b29, 0x004e,
-	0x003e, 0x080c, 0x323e, 0x6020, 0x9086, 0x000a, 0x1108, 0x0005,
-	0x0804, 0xabf0, 0x00b6, 0x00e6, 0x0026, 0x0016, 0x2071, 0x1800,
-	0x7090, 0x9086, 0x0014, 0x1904, 0xb8ba, 0x080c, 0x5709, 0x1170,
-	0x6014, 0x9005, 0x1158, 0x0036, 0x0046, 0x6010, 0x2058, 0xbba0,
-	0x2021, 0x0006, 0x080c, 0x4ce0, 0x004e, 0x003e, 0x00d6, 0x6010,
-	0x2058, 0x080c, 0x66df, 0x080c, 0xb6e7, 0x00de, 0x080c, 0xbb0e,
-	0x1588, 0x6010, 0x2058, 0xb890, 0x9005, 0x0560, 0x2001, 0x0006,
-	0x080c, 0x6594, 0x0096, 0x6014, 0x904d, 0x01d0, 0xa864, 0x9084,
+	0x0130, 0x9386, 0x0006, 0x0128, 0x080c, 0xacb0, 0x0020, 0x0039,
+	0x0010, 0x080c, 0xb30a, 0x002e, 0x00de, 0x00ee, 0x0005, 0x0096,
+	0x6814, 0x2048, 0x9186, 0x0015, 0x0904, 0xb2e9, 0x918e, 0x0016,
+	0x1904, 0xb308, 0x700c, 0x908c, 0xff00, 0x9186, 0x1700, 0x0120,
+	0x9186, 0x0300, 0x1904, 0xb2c3, 0x89ff, 0x1138, 0x6800, 0x9086,
+	0x000f, 0x0904, 0xb2a5, 0x0804, 0xb306, 0x6808, 0x9086, 0xffff,
+	0x1904, 0xb2eb, 0xa87c, 0x9084, 0x0060, 0x9086, 0x0020, 0x1150,
+	0xa8ac, 0xa934, 0x9106, 0x1904, 0xb2eb, 0xa8b0, 0xa938, 0x9106,
+	0x1904, 0xb2eb, 0x6824, 0xd084, 0x1904, 0xb2eb, 0xd0b4, 0x0158,
+	0x0016, 0x2001, 0x1985, 0x200c, 0x6018, 0x9102, 0x9082, 0x0005,
+	0x001e, 0x1a04, 0xb2eb, 0x080c, 0xcb6b, 0x6810, 0x0096, 0x2048,
+	0xa9a0, 0x009e, 0x685c, 0xa87a, 0xa976, 0x6864, 0xa882, 0xa87c,
+	0xc0dc, 0xc0f4, 0xc0d4, 0xa87e, 0x0026, 0x900e, 0x6a18, 0x2001,
+	0x000a, 0x080c, 0x91f8, 0xa884, 0x920a, 0x0208, 0x8011, 0xaa86,
+	0x82ff, 0x002e, 0x1138, 0x00c6, 0x2d60, 0x080c, 0xc683, 0x00ce,
+	0x0804, 0xb306, 0x00c6, 0xa868, 0xd0fc, 0x1118, 0x080c, 0x6124,
+	0x0010, 0x080c, 0x652f, 0x00ce, 0x1904, 0xb2eb, 0x00c6, 0x2d60,
+	0x080c, 0xacb0, 0x00ce, 0x0804, 0xb306, 0x00c6, 0x080c, 0xad20,
+	0x0198, 0x6017, 0x0000, 0x6810, 0x6012, 0x080c, 0xce15, 0x6023,
+	0x0003, 0x6904, 0x00c6, 0x2d60, 0x080c, 0xacb0, 0x00ce, 0x080c,
+	0xad4d, 0x00ce, 0x0804, 0xb306, 0x2001, 0x1987, 0x2004, 0x684a,
+	0x00ce, 0x0804, 0xb306, 0x7008, 0x9086, 0x000b, 0x11c8, 0x6010,
+	0x00b6, 0x2058, 0xb900, 0xc1bc, 0xb902, 0x00be, 0x00c6, 0x2d60,
+	0xa87b, 0x0003, 0x080c, 0xd055, 0x6007, 0x0085, 0x6003, 0x000b,
+	0x6023, 0x0002, 0x2009, 0x8020, 0x080c, 0x92b0, 0x00ce, 0x0430,
+	0x700c, 0x9086, 0x2a00, 0x1138, 0x2001, 0x1987, 0x2004, 0x684a,
+	0x00e8, 0x04c1, 0x00e8, 0x89ff, 0x090c, 0x0d7d, 0x00c6, 0x00d6,
+	0x2d60, 0xa867, 0x0103, 0xa87b, 0x0003, 0x080c, 0x6c04, 0x080c,
+	0xcb6b, 0x080c, 0xaceb, 0x0026, 0x6010, 0x00b6, 0x2058, 0xba3c,
+	0x080c, 0x67be, 0x00be, 0x002e, 0x00de, 0x00ce, 0x080c, 0xacb0,
+	0x009e, 0x0005, 0x9186, 0x0015, 0x1128, 0x2001, 0x1987, 0x2004,
+	0x684a, 0x0068, 0x918e, 0x0016, 0x1160, 0x00c6, 0x2d00, 0x2060,
+	0x080c, 0xe6a0, 0x080c, 0x894e, 0x080c, 0xacb0, 0x00ce, 0x080c,
+	0xacb0, 0x0005, 0x0026, 0x0036, 0x0046, 0x7228, 0xacb0, 0xabac,
+	0xd2f4, 0x0130, 0x2001, 0x1987, 0x2004, 0x684a, 0x0804, 0xb384,
+	0x00c6, 0x2d60, 0x080c, 0xc559, 0x00ce, 0x6804, 0x9086, 0x0050,
+	0x1168, 0x00c6, 0x2d00, 0x2060, 0x6003, 0x0001, 0x6007, 0x0050,
+	0x2009, 0x8023, 0x080c, 0x92b0, 0x00ce, 0x04f0, 0x6800, 0x9086,
+	0x000f, 0x01a8, 0x89ff, 0x090c, 0x0d7d, 0x6800, 0x9086, 0x0004,
+	0x1190, 0xa87c, 0xd0ac, 0x0178, 0xa843, 0x0fff, 0xa83f, 0x0fff,
+	0xa880, 0xc0fc, 0xa882, 0x2001, 0x0001, 0x6832, 0x0400, 0x2001,
+	0x0007, 0x6832, 0x00e0, 0xa87c, 0xd0b4, 0x1150, 0xd0ac, 0x0db8,
+	0x6824, 0xd0f4, 0x1d48, 0xa838, 0xa934, 0x9105, 0x0d80, 0x0c20,
+	0xd2ec, 0x1d68, 0x7024, 0x9306, 0x1118, 0x7020, 0x9406, 0x0d38,
+	0x7020, 0x683e, 0x7024, 0x683a, 0x2001, 0x0005, 0x6832, 0x080c,
+	0xccff, 0x080c, 0x9738, 0x0010, 0x080c, 0xacb0, 0x004e, 0x003e,
+	0x002e, 0x0005, 0x00e6, 0x00d6, 0x0026, 0x7008, 0x9084, 0x00ff,
+	0x6210, 0x00b6, 0x2258, 0xba10, 0x00be, 0x9206, 0x1904, 0xb3ef,
+	0x700c, 0x6210, 0x00b6, 0x2258, 0xba14, 0x00be, 0x9206, 0x1904,
+	0xb3ef, 0x6038, 0x2068, 0x6824, 0xc0dc, 0x6826, 0x6a20, 0x9286,
+	0x0007, 0x0904, 0xb3ef, 0x9286, 0x0002, 0x0904, 0xb3ef, 0x9286,
+	0x0000, 0x05e8, 0x6808, 0x633c, 0x9306, 0x15c8, 0x2071, 0x026c,
+	0x9186, 0x0015, 0x0570, 0x918e, 0x0016, 0x1100, 0x00c6, 0x6038,
+	0x2060, 0x6104, 0x9186, 0x004b, 0x01c0, 0x9186, 0x004c, 0x01a8,
+	0x9186, 0x004d, 0x0190, 0x9186, 0x004e, 0x0178, 0x9186, 0x0052,
+	0x0160, 0x6014, 0x0096, 0x2048, 0x080c, 0xc97a, 0x090c, 0x0d7d,
+	0xa87b, 0x0003, 0x009e, 0x080c, 0xd055, 0x6007, 0x0085, 0x6003,
+	0x000b, 0x6023, 0x0002, 0x2009, 0x8020, 0x080c, 0x92b0, 0x00ce,
+	0x0030, 0x6038, 0x2070, 0x2001, 0x1987, 0x2004, 0x704a, 0x080c,
+	0xacb0, 0x002e, 0x00de, 0x00ee, 0x0005, 0x00b6, 0x0096, 0x00f6,
+	0x6014, 0x2048, 0x6010, 0x2058, 0x91b6, 0x0015, 0x0130, 0xba08,
+	0xbb0c, 0xbc00, 0xc48c, 0xbc02, 0x0460, 0x0096, 0x0156, 0x0036,
+	0x0026, 0x2b48, 0x9e90, 0x0010, 0x2019, 0x000a, 0x20a9, 0x0004,
+	0x080c, 0xbca2, 0x002e, 0x003e, 0x015e, 0x009e, 0x1904, 0xb45e,
+	0x0096, 0x0156, 0x0036, 0x0026, 0x2b48, 0x9e90, 0x0014, 0x2019,
+	0x0006, 0x20a9, 0x0004, 0x080c, 0xbca2, 0x002e, 0x003e, 0x015e,
+	0x009e, 0x15a0, 0x7238, 0xba0a, 0x733c, 0xbb0e, 0xbc00, 0xc48d,
+	0xbc02, 0xa804, 0x9005, 0x1128, 0x00fe, 0x009e, 0x00be, 0x0804,
+	0xb0bf, 0x0096, 0x2048, 0xaa12, 0xab16, 0xac0a, 0x009e, 0x8006,
+	0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0002,
+	0x2009, 0x002b, 0xaaa0, 0xab9c, 0xaca8, 0xada4, 0x2031, 0x0000,
+	0x2041, 0x1296, 0x080c, 0xb1d4, 0x0130, 0x00fe, 0x009e, 0x080c,
+	0xacb0, 0x00be, 0x0005, 0x080c, 0xb693, 0x0cb8, 0x2b78, 0x00f6,
+	0x080c, 0x3240, 0x080c, 0xd0b0, 0x00fe, 0x00c6, 0x080c, 0xac5a,
+	0x2f00, 0x6012, 0x6017, 0x0000, 0x6023, 0x0001, 0x6007, 0x0001,
+	0x6003, 0x0001, 0x2001, 0x0007, 0x080c, 0x65e3, 0x080c, 0x660f,
+	0x080c, 0x92b7, 0x080c, 0x9738, 0x00ce, 0x0804, 0xb431, 0x2100,
+	0x91b2, 0x0053, 0x1a0c, 0x0d7d, 0x91b2, 0x0040, 0x1a04, 0xb4e7,
+	0x0002, 0xb4d5, 0xb4d5, 0xb4cb, 0xb4d5, 0xb4d5, 0xb4d5, 0xb4c9,
+	0xb4c9, 0xb4c9, 0xb4c9, 0xb4c9, 0xb4c9, 0xb4c9, 0xb4c9, 0xb4c9,
+	0xb4c9, 0xb4c9, 0xb4c9, 0xb4c9, 0xb4c9, 0xb4c9, 0xb4c9, 0xb4c9,
+	0xb4c9, 0xb4c9, 0xb4c9, 0xb4c9, 0xb4c9, 0xb4c9, 0xb4c9, 0xb4c9,
+	0xb4d5, 0xb4c9, 0xb4d5, 0xb4d5, 0xb4c9, 0xb4c9, 0xb4c9, 0xb4c9,
+	0xb4c9, 0xb4cb, 0xb4c9, 0xb4c9, 0xb4c9, 0xb4c9, 0xb4c9, 0xb4c9,
+	0xb4c9, 0xb4c9, 0xb4c9, 0xb4d5, 0xb4d5, 0xb4c9, 0xb4c9, 0xb4c9,
+	0xb4c9, 0xb4c9, 0xb4c9, 0xb4c9, 0xb4c9, 0xb4c9, 0xb4d5, 0xb4c9,
+	0xb4c9, 0x080c, 0x0d7d, 0x0066, 0x00b6, 0x6610, 0x2658, 0xb8d4,
+	0xc08c, 0xb8d6, 0x00be, 0x006e, 0x0000, 0x6003, 0x0001, 0x6106,
+	0x9186, 0x0032, 0x0118, 0x080c, 0x92b7, 0x0010, 0x080c, 0x92b0,
+	0x0126, 0x2091, 0x8000, 0x080c, 0x9738, 0x012e, 0x0005, 0x2600,
+	0x0002, 0xb4d5, 0xb4d5, 0xb4fb, 0xb4d5, 0xb4d5, 0xb4fb, 0xb4fb,
+	0xb4fb, 0xb4fb, 0xb4d5, 0xb4fb, 0xb4d5, 0xb4fb, 0xb4d5, 0xb4fb,
+	0xb4fb, 0xb4fb, 0xb4fb, 0x080c, 0x0d7d, 0x6004, 0x90b2, 0x0053,
+	0x1a0c, 0x0d7d, 0x91b6, 0x0013, 0x0904, 0xb5d2, 0x91b6, 0x0027,
+	0x1904, 0xb57e, 0x080c, 0x967a, 0x6004, 0x080c, 0xcb80, 0x01b0,
+	0x080c, 0xcb91, 0x01a8, 0x908e, 0x0021, 0x0904, 0xb57b, 0x908e,
+	0x0022, 0x1130, 0x080c, 0xb0eb, 0x0904, 0xb577, 0x0804, 0xb578,
+	0x908e, 0x003d, 0x0904, 0xb57b, 0x0804, 0xb571, 0x080c, 0x326f,
+	0x2001, 0x0007, 0x080c, 0x65e3, 0x6010, 0x00b6, 0x2058, 0xb9a0,
+	0x00be, 0x080c, 0xb693, 0x9186, 0x007e, 0x1148, 0x2001, 0x1837,
+	0x2014, 0xc285, 0x080c, 0x753d, 0x1108, 0xc2ad, 0x2202, 0x080c,
+	0xa91e, 0x0036, 0x0026, 0x2019, 0x0028, 0x2110, 0x080c, 0xe7ac,
+	0x002e, 0x003e, 0x0016, 0x0026, 0x0036, 0x2110, 0x2019, 0x0028,
+	0x080c, 0x943d, 0x0076, 0x903e, 0x080c, 0x9306, 0x6010, 0x00b6,
+	0x905d, 0x0100, 0x00be, 0x2c08, 0x080c, 0xe167, 0x007e, 0x003e,
+	0x002e, 0x001e, 0x080c, 0xa93a, 0x080c, 0xd0b0, 0x0016, 0x080c,
+	0xce0d, 0x080c, 0xacb0, 0x001e, 0x080c, 0x3349, 0x080c, 0x9738,
+	0x0030, 0x080c, 0xce0d, 0x080c, 0xacb0, 0x080c, 0x9738, 0x0005,
+	0x080c, 0xb693, 0x0cb0, 0x080c, 0xb6cf, 0x0c98, 0x9186, 0x0015,
+	0x0118, 0x9186, 0x0016, 0x1140, 0x080c, 0xab33, 0x0d80, 0x9086,
+	0x0002, 0x0904, 0xb6da, 0x0c58, 0x9186, 0x0014, 0x1d40, 0x080c,
+	0x967a, 0x6004, 0x908e, 0x0022, 0x1118, 0x080c, 0xb0eb, 0x09f8,
+	0x080c, 0x3240, 0x080c, 0xd0b0, 0x080c, 0xcb80, 0x1190, 0x080c,
+	0x326f, 0x6010, 0x00b6, 0x2058, 0xb9a0, 0x00be, 0x080c, 0xb693,
+	0x9186, 0x007e, 0x1128, 0x2001, 0x1837, 0x200c, 0xc185, 0x2102,
+	0x0800, 0x080c, 0xcb91, 0x1120, 0x080c, 0xb693, 0x0804, 0xb571,
+	0x6004, 0x908e, 0x0032, 0x1160, 0x00e6, 0x00f6, 0x2071, 0x189e,
+	0x2079, 0x0000, 0x080c, 0x35ea, 0x00fe, 0x00ee, 0x0804, 0xb571,
+	0x6004, 0x908e, 0x0021, 0x0d40, 0x908e, 0x0022, 0x090c, 0xb693,
+	0x0804, 0xb571, 0x90b2, 0x0040, 0x1a04, 0xb673, 0x2008, 0x0002,
+	0xb61a, 0xb61b, 0xb61e, 0xb621, 0xb624, 0xb627, 0xb618, 0xb618,
+	0xb618, 0xb618, 0xb618, 0xb618, 0xb618, 0xb618, 0xb618, 0xb618,
+	0xb618, 0xb618, 0xb618, 0xb618, 0xb618, 0xb618, 0xb618, 0xb618,
+	0xb618, 0xb618, 0xb618, 0xb618, 0xb618, 0xb618, 0xb62a, 0xb635,
+	0xb618, 0xb636, 0xb635, 0xb618, 0xb618, 0xb618, 0xb618, 0xb618,
+	0xb635, 0xb635, 0xb618, 0xb618, 0xb618, 0xb618, 0xb618, 0xb618,
+	0xb618, 0xb618, 0xb65e, 0xb635, 0xb618, 0xb631, 0xb618, 0xb618,
+	0xb618, 0xb632, 0xb618, 0xb618, 0xb618, 0xb635, 0xb659, 0xb618,
+	0x080c, 0x0d7d, 0x00d0, 0x2001, 0x000b, 0x00f8, 0x2001, 0x0003,
+	0x00e0, 0x2001, 0x0005, 0x00c8, 0x2001, 0x0001, 0x00b0, 0x2001,
+	0x0009, 0x0098, 0x6003, 0x0005, 0x080c, 0xd0b3, 0x080c, 0x9738,
+	0x0058, 0x0018, 0x0010, 0x080c, 0x65e3, 0x04b8, 0x080c, 0xd0b3,
+	0x6003, 0x0004, 0x080c, 0x9738, 0x0005, 0x080c, 0x65e3, 0x6003,
+	0x0002, 0x0036, 0x2019, 0x1852, 0x2304, 0x9084, 0xff00, 0x1120,
+	0x2001, 0x1985, 0x201c, 0x0040, 0x8007, 0x909a, 0x0004, 0x0ec0,
+	0x8003, 0x801b, 0x831b, 0x9318, 0x631a, 0x003e, 0x080c, 0x9738,
+	0x0c18, 0x080c, 0xce0d, 0x080c, 0xacb0, 0x08f0, 0x00e6, 0x00f6,
+	0x2071, 0x189e, 0x2079, 0x0000, 0x080c, 0x35ea, 0x00fe, 0x00ee,
+	0x080c, 0x967a, 0x080c, 0xacb0, 0x0878, 0x6003, 0x0002, 0x080c,
+	0xd0b3, 0x0804, 0x9738, 0x2600, 0x2008, 0x0002, 0xb68a, 0xb66d,
+	0xb688, 0xb66d, 0xb66d, 0xb688, 0xb688, 0xb688, 0xb688, 0xb66d,
+	0xb688, 0xb66d, 0xb688, 0xb66d, 0xb688, 0xb688, 0xb688, 0xb688,
+	0x080c, 0x0d7d, 0x0096, 0x6014, 0x2048, 0x080c, 0x6dee, 0x009e,
+	0x080c, 0xacb0, 0x0005, 0x00e6, 0x0096, 0x0026, 0x0016, 0x080c,
+	0xc97a, 0x0568, 0x6014, 0x2048, 0xa864, 0x9086, 0x0139, 0x11a8,
+	0xa894, 0x9086, 0x0056, 0x1148, 0x080c, 0x54ca, 0x0130, 0x2001,
+	0x0000, 0x900e, 0x2011, 0x4000, 0x0028, 0x2001, 0x0030, 0x900e,
+	0x2011, 0x4005, 0x080c, 0xcf7a, 0x0090, 0xa868, 0xd0fc, 0x0178,
+	0xa807, 0x0000, 0x0016, 0x6004, 0x908e, 0x0021, 0x0168, 0x908e,
+	0x003d, 0x0150, 0x001e, 0xa867, 0x0103, 0xa833, 0x0100, 0x001e,
+	0x002e, 0x009e, 0x00ee, 0x0005, 0x001e, 0x0009, 0x0cc0, 0x0096,
+	0x6014, 0x2048, 0xa800, 0x2048, 0xa867, 0x0103, 0xa823, 0x8001,
+	0x009e, 0x0005, 0x00b6, 0x6610, 0x2658, 0xb804, 0x9084, 0x00ff,
+	0x90b2, 0x000c, 0x1a0c, 0x0d7d, 0x6604, 0x96b6, 0x004d, 0x1120,
+	0x080c, 0xce99, 0x0804, 0xb75f, 0x6604, 0x96b6, 0x0043, 0x1120,
+	0x080c, 0xcee2, 0x0804, 0xb75f, 0x6604, 0x96b6, 0x004b, 0x1120,
+	0x080c, 0xcf0e, 0x0804, 0xb75f, 0x6604, 0x96b6, 0x0033, 0x1120,
+	0x080c, 0xce2f, 0x0804, 0xb75f, 0x6604, 0x96b6, 0x0028, 0x1120,
+	0x080c, 0xcbcf, 0x0804, 0xb75f, 0x6604, 0x96b6, 0x0029, 0x1120,
+	0x080c, 0xcc10, 0x0804, 0xb75f, 0x6604, 0x96b6, 0x001f, 0x1120,
+	0x080c, 0xb093, 0x0804, 0xb75f, 0x6604, 0x96b6, 0x0000, 0x1118,
+	0x080c, 0xb3f5, 0x04e0, 0x6604, 0x96b6, 0x0022, 0x1118, 0x080c,
+	0xb0cc, 0x04a8, 0x6604, 0x96b6, 0x0035, 0x1118, 0x080c, 0xb1f2,
+	0x0470, 0x6604, 0x96b6, 0x0039, 0x1118, 0x080c, 0xb38a, 0x0438,
+	0x6604, 0x96b6, 0x003d, 0x1118, 0x080c, 0xb104, 0x0400, 0x6604,
+	0x96b6, 0x0044, 0x1118, 0x080c, 0xb140, 0x00c8, 0x6604, 0x96b6,
+	0x0049, 0x1118, 0x080c, 0xb181, 0x0090, 0x6604, 0x96b6, 0x0041,
+	0x1118, 0x080c, 0xb16b, 0x0058, 0x91b6, 0x0015, 0x1110, 0x0063,
+	0x0030, 0x91b6, 0x0016, 0x1128, 0x00be, 0x0804, 0xb9bb, 0x00be,
+	0x0005, 0x080c, 0xad6a, 0x0cd8, 0xb77c, 0xb77f, 0xb77c, 0xb7c6,
+	0xb77c, 0xb92f, 0xb9c8, 0xb77c, 0xb77c, 0xb991, 0xb77c, 0xb9a7,
+	0x0096, 0x601f, 0x0000, 0x6014, 0x2048, 0xa800, 0x2048, 0xa867,
+	0x0103, 0x009e, 0x0804, 0xacb0, 0xa001, 0xa001, 0x0005, 0x00e6,
+	0x2071, 0x1800, 0x7090, 0x9086, 0x0074, 0x1540, 0x080c, 0xe138,
+	0x11b0, 0x6010, 0x00b6, 0x2058, 0x7030, 0xd08c, 0x0128, 0xb800,
+	0xd0bc, 0x0110, 0xc0c5, 0xb802, 0x00f9, 0x00be, 0x2001, 0x0006,
+	0x080c, 0x65e3, 0x080c, 0x326f, 0x080c, 0xacb0, 0x0098, 0x2001,
+	0x000a, 0x080c, 0x65e3, 0x080c, 0x326f, 0x6003, 0x0001, 0x6007,
+	0x0001, 0x080c, 0x92b7, 0x080c, 0x9738, 0x0020, 0x2001, 0x0001,
+	0x080c, 0xb8ff, 0x00ee, 0x0005, 0x00d6, 0xb800, 0xd084, 0x0160,
+	0x9006, 0x080c, 0x65cf, 0x2069, 0x1847, 0x6804, 0xd0a4, 0x0120,
+	0x2001, 0x0006, 0x080c, 0x660f, 0x00de, 0x0005, 0x00b6, 0x0096,
+	0x00d6, 0x2011, 0x1824, 0x2204, 0x9086, 0x0074, 0x1904, 0xb8d4,
+	0x6010, 0x2058, 0xbaa0, 0x9286, 0x007e, 0x1120, 0x080c, 0xbb15,
+	0x0804, 0xb838, 0x080c, 0xbb0a, 0x6010, 0x2058, 0xbaa0, 0x9286,
+	0x0080, 0x1510, 0x6014, 0x9005, 0x01a8, 0x2048, 0xa864, 0x9084,
 	0x00ff, 0x9086, 0x0039, 0x1140, 0x2001, 0x0000, 0x900e, 0x2011,
-	0x4000, 0x080c, 0xce63, 0x0060, 0xa864, 0x9084, 0x00ff, 0x9086,
-	0x0029, 0x0130, 0xa807, 0x0000, 0xa867, 0x0103, 0xa833, 0x0200,
-	0x009e, 0x080c, 0x323e, 0x6020, 0x9086, 0x000a, 0x0140, 0x080c,
-	0xabf0, 0x0028, 0x080c, 0xb5c6, 0x9006, 0x080c, 0xb832, 0x001e,
-	0x002e, 0x00ee, 0x00be, 0x0005, 0x2011, 0x1824, 0x2204, 0x9086,
-	0x0014, 0x1160, 0x2001, 0x0002, 0x080c, 0x6594, 0x6003, 0x0001,
-	0x6007, 0x0001, 0x080c, 0x9240, 0x0804, 0x96bd, 0x2001, 0x0001,
-	0x0804, 0xb832, 0x2030, 0x2011, 0x1824, 0x2204, 0x9086, 0x0004,
-	0x1148, 0x96b6, 0x000b, 0x1120, 0x2001, 0x0007, 0x080c, 0x6594,
-	0x0804, 0xabf0, 0x2001, 0x0001, 0x0804, 0xb832, 0x0002, 0xb6af,
-	0xb906, 0xb6af, 0xb947, 0xb6af, 0xb9f4, 0xb8fb, 0xb6af, 0xb6af,
-	0xba08, 0xb6af, 0xba1a, 0x6604, 0x9686, 0x0003, 0x0904, 0xb862,
-	0x96b6, 0x001e, 0x1110, 0x080c, 0xabf0, 0x0005, 0x00b6, 0x00d6,
-	0x00c6, 0x080c, 0xba2c, 0x11a0, 0x9006, 0x080c, 0x6580, 0x080c,
-	0x320f, 0x080c, 0xcf99, 0x2001, 0x0002, 0x080c, 0x6594, 0x6003,
-	0x0001, 0x6007, 0x0002, 0x080c, 0x9240, 0x080c, 0x96bd, 0x0418,
-	0x2009, 0x026e, 0x2104, 0x9086, 0x0009, 0x1160, 0x6010, 0x2058,
-	0xb840, 0x9084, 0x00ff, 0x9005, 0x0170, 0x8001, 0xb842, 0x601b,
-	0x000a, 0x0088, 0x2009, 0x026f, 0x2104, 0x9084, 0xff00, 0x9086,
-	0x1900, 0x1108, 0x08a0, 0x080c, 0x320f, 0x080c, 0xcf99, 0x2001,
-	0x0001, 0x080c, 0xb832, 0x00ce, 0x00de, 0x00be, 0x0005, 0x0096,
-	0x00b6, 0x0026, 0x9016, 0x080c, 0xba3a, 0x00d6, 0x2069, 0x197b,
-	0x2d04, 0x9005, 0x0168, 0x6010, 0x2058, 0xb8a0, 0x9086, 0x007e,
-	0x1138, 0x2069, 0x1820, 0x2d04, 0x8000, 0x206a, 0x00de, 0x0010,
-	0x00de, 0x0088, 0x9006, 0x080c, 0x6580, 0x2001, 0x0002, 0x080c,
-	0x6594, 0x6003, 0x0001, 0x6007, 0x0002, 0x080c, 0x9240, 0x080c,
-	0x96bd, 0x0804, 0xb9c4, 0x080c, 0xc865, 0x01b0, 0x6014, 0x2048,
-	0xa864, 0x2010, 0x9086, 0x0139, 0x1138, 0x6007, 0x0016, 0x2001,
-	0x0002, 0x080c, 0xcebd, 0x00b0, 0x6014, 0x2048, 0xa864, 0xd0fc,
-	0x0118, 0x2001, 0x0001, 0x0ca8, 0x2001, 0x180e, 0x2004, 0xd0dc,
-	0x0148, 0x6010, 0x2058, 0xb840, 0x9084, 0x00ff, 0x9005, 0x1110,
-	0x9006, 0x0c38, 0x080c, 0xb5c6, 0x2009, 0x026e, 0x2134, 0x96b4,
-	0x00ff, 0x9686, 0x0005, 0x0520, 0x9686, 0x000b, 0x01c8, 0x2009,
-	0x026f, 0x2104, 0x9084, 0xff00, 0x1118, 0x9686, 0x0009, 0x01c0,
-	0x9086, 0x1900, 0x1168, 0x9686, 0x0009, 0x0190, 0x2001, 0x0004,
-	0x080c, 0x6594, 0x2001, 0x0028, 0x601a, 0x6007, 0x0052, 0x0020,
-	0x2001, 0x0001, 0x080c, 0xb832, 0x002e, 0x00be, 0x009e, 0x0005,
-	0x9286, 0x0139, 0x0160, 0x6014, 0x2048, 0x080c, 0xc865, 0x0140,
-	0xa864, 0x9086, 0x0139, 0x0118, 0xa868, 0xd0fc, 0x0108, 0x0c40,
-	0x6010, 0x2058, 0xb840, 0x9084, 0x00ff, 0x9005, 0x0138, 0x8001,
-	0xb842, 0x601b, 0x000a, 0x6007, 0x0016, 0x08f0, 0xb8a0, 0x9086,
-	0x007e, 0x1138, 0x00e6, 0x2071, 0x1800, 0x080c, 0x5fd7, 0x00ee,
-	0x0010, 0x080c, 0x320f, 0x0860, 0x080c, 0xba3a, 0x1160, 0x2001,
-	0x0004, 0x080c, 0x6594, 0x6003, 0x0001, 0x6007, 0x0003, 0x080c,
-	0x9240, 0x0804, 0x96bd, 0x080c, 0xb5c6, 0x9006, 0x0804, 0xb832,
-	0x0489, 0x1160, 0x2001, 0x0008, 0x080c, 0x6594, 0x6003, 0x0001,
-	0x6007, 0x0005, 0x080c, 0x9240, 0x0804, 0x96bd, 0x2001, 0x0001,
-	0x0804, 0xb832, 0x00f9, 0x1160, 0x2001, 0x000a, 0x080c, 0x6594,
-	0x6003, 0x0001, 0x6007, 0x0001, 0x080c, 0x9240, 0x0804, 0x96bd,
-	0x2001, 0x0001, 0x0804, 0xb832, 0x2009, 0x026e, 0x2104, 0x9086,
-	0x0003, 0x1138, 0x2009, 0x026f, 0x2104, 0x9084, 0xff00, 0x9086,
-	0x2a00, 0x0005, 0x9085, 0x0001, 0x0005, 0x00b6, 0x00c6, 0x0016,
-	0x6110, 0x2158, 0x080c, 0x6653, 0x001e, 0x00ce, 0x00be, 0x0005,
-	0x00b6, 0x00f6, 0x00e6, 0x00d6, 0x0036, 0x0016, 0x6010, 0x2058,
-	0x2009, 0x1837, 0x2104, 0x9085, 0x0003, 0x200a, 0x080c, 0xbae0,
-	0x0560, 0x2009, 0x1837, 0x2104, 0xc0cd, 0x200a, 0x080c, 0x6a8a,
-	0x0158, 0x9006, 0x2020, 0x2009, 0x002a, 0x080c, 0xe316, 0x2001,
-	0x180c, 0x200c, 0xc195, 0x2102, 0x2019, 0x002a, 0x2009, 0x0001,
-	0x080c, 0x31d4, 0x00e6, 0x2071, 0x1800, 0x080c, 0x2fe0, 0x00ee,
-	0x00c6, 0x0156, 0x20a9, 0x0781, 0x2009, 0x007f, 0x080c, 0x3318,
-	0x8108, 0x1f04, 0xba7e, 0x015e, 0x00ce, 0x080c, 0xba3d, 0x2071,
-	0x0260, 0x2079, 0x0200, 0x7817, 0x0001, 0x2001, 0x1837, 0x200c,
-	0xc1c5, 0x7018, 0xd0fc, 0x0110, 0xd0dc, 0x0118, 0x7038, 0xd0dc,
-	0x1108, 0xc1c4, 0x7817, 0x0000, 0x2001, 0x1837, 0x2102, 0x2079,
-	0x0100, 0x2e04, 0x9084, 0x00ff, 0x2069, 0x181f, 0x206a, 0x78e6,
-	0x0006, 0x8e70, 0x2e04, 0x2069, 0x1820, 0x206a, 0x78ea, 0x7832,
-	0x7836, 0x2010, 0x9084, 0xff00, 0x001e, 0x9105, 0x2009, 0x182c,
-	0x200a, 0x2200, 0x9084, 0x00ff, 0x2008, 0x080c, 0x2679, 0x080c,
-	0x74ec, 0x0170, 0x2071, 0x0260, 0x2069, 0x1981, 0x7048, 0x206a,
-	0x704c, 0x6806, 0x7050, 0x680a, 0x7054, 0x680e, 0x080c, 0xcc90,
-	0x0040, 0x2001, 0x0006, 0x080c, 0x6594, 0x080c, 0x323e, 0x080c,
-	0xabf0, 0x001e, 0x003e, 0x00de, 0x00ee, 0x00fe, 0x00be, 0x0005,
-	0x0096, 0x0026, 0x0036, 0x00e6, 0x0156, 0x2019, 0x182c, 0x231c,
-	0x83ff, 0x01f0, 0x2071, 0x0260, 0x7200, 0x9294, 0x00ff, 0x7004,
-	0x9084, 0xff00, 0x9205, 0x9306, 0x1198, 0x2011, 0x0276, 0x20a9,
-	0x0004, 0x2b48, 0x2019, 0x000a, 0x080c, 0xbbd5, 0x1148, 0x2011,
-	0x027a, 0x20a9, 0x0004, 0x2019, 0x0006, 0x080c, 0xbbd5, 0x1100,
-	0x015e, 0x00ee, 0x003e, 0x002e, 0x009e, 0x0005, 0x00e6, 0x2071,
-	0x0260, 0x7034, 0x9086, 0x0014, 0x11a8, 0x7038, 0x9086, 0x0800,
-	0x1188, 0x703c, 0xd0ec, 0x0160, 0x9084, 0x0f00, 0x9086, 0x0100,
-	0x1138, 0x7054, 0xd0a4, 0x1110, 0xd0ac, 0x0110, 0x9006, 0x0010,
-	0x9085, 0x0001, 0x00ee, 0x0005, 0x00e6, 0x0096, 0x00c6, 0x0076,
-	0x0056, 0x0046, 0x0026, 0x0006, 0x0126, 0x2091, 0x8000, 0x2029,
-	0x19f2, 0x252c, 0x2021, 0x19f9, 0x2424, 0x2061, 0x1ddc, 0x2071,
-	0x1800, 0x7254, 0x7074, 0x9202, 0x1a04, 0xbba1, 0x080c, 0x8ba9,
-	0x0904, 0xbb9a, 0x080c, 0xe347, 0x0904, 0xbb9a, 0x6720, 0x9786,
-	0x0007, 0x0904, 0xbb9a, 0x2500, 0x9c06, 0x0904, 0xbb9a, 0x2400,
-	0x9c06, 0x0904, 0xbb9a, 0x3e08, 0x9186, 0x0002, 0x1148, 0x6010,
-	0x9005, 0x0130, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x1590,
-	0x00c6, 0x6043, 0xffff, 0x6000, 0x9086, 0x0004, 0x1110, 0x080c,
-	0x1a94, 0x9786, 0x000a, 0x0148, 0x080c, 0xca7a, 0x1130, 0x00ce,
-	0x080c, 0xb5c6, 0x080c, 0xac2b, 0x00e8, 0x6014, 0x2048, 0x080c,
-	0xc865, 0x01a8, 0x9786, 0x0003, 0x1530, 0xa867, 0x0103, 0xa87c,
-	0xd0cc, 0x0130, 0x0096, 0xa878, 0x2048, 0x080c, 0x0ff9, 0x009e,
-	0xab7a, 0xa877, 0x0000, 0x080c, 0x6d93, 0x080c, 0xca54, 0x080c,
-	0xac2b, 0x00ce, 0x9ce0, 0x001c, 0x7068, 0x9c02, 0x1210, 0x0804,
-	0xbb41, 0x012e, 0x000e, 0x002e, 0x004e, 0x005e, 0x007e, 0x00ce,
-	0x009e, 0x00ee, 0x0005, 0x9786, 0x0006, 0x1118, 0x080c, 0xe2b9,
-	0x0c30, 0x9786, 0x0009, 0x1148, 0x6000, 0x9086, 0x0004, 0x0d08,
-	0x2009, 0x004c, 0x080c, 0xac8d, 0x08e0, 0x9786, 0x000a, 0x0938,
-	0x0820, 0x220c, 0x2304, 0x9106, 0x1130, 0x8210, 0x8318, 0x1f04,
-	0xbbc1, 0x9006, 0x0005, 0x2304, 0x9102, 0x0218, 0x2001, 0x0001,
-	0x0008, 0x9006, 0x918d, 0x0001, 0x0005, 0x0136, 0x01c6, 0x0016,
-	0x8906, 0x8006, 0x8007, 0x908c, 0x003f, 0x21e0, 0x9084, 0xffc0,
-	0x9300, 0x2098, 0x3518, 0x20a9, 0x0001, 0x220c, 0x4002, 0x910e,
-	0x1140, 0x8210, 0x8319, 0x1dc8, 0x9006, 0x001e, 0x01ce, 0x013e,
-	0x0005, 0x220c, 0x9102, 0x0218, 0x2001, 0x0001, 0x0010, 0x2001,
-	0x0000, 0x918d, 0x0001, 0x001e, 0x01ce, 0x013e, 0x0005, 0x220c,
-	0x810f, 0x2304, 0x9106, 0x1130, 0x8210, 0x8318, 0x1f04, 0xbbff,
-	0x9006, 0x0005, 0x918d, 0x0001, 0x0005, 0x6004, 0x908a, 0x0053,
-	0x1a0c, 0x0d7d, 0x080c, 0xca69, 0x0120, 0x080c, 0xca7a, 0x0158,
-	0x0028, 0x080c, 0x323e, 0x080c, 0xca7a, 0x0128, 0x080c, 0x95ff,
-	0x080c, 0xabf0, 0x0005, 0x080c, 0xb5c6, 0x0cc0, 0x9182, 0x0057,
-	0x1220, 0x9182, 0x0040, 0x0208, 0x000a, 0x0005, 0xbc45, 0xbc45,
-	0xbc45, 0xbc45, 0xbc45, 0xbc45, 0xbc45, 0xbc45, 0xbc45, 0xbc45,
-	0xbc45, 0xbc47, 0xbc47, 0xbc47, 0xbc47, 0xbc45, 0xbc45, 0xbc45,
-	0xbc47, 0xbc45, 0xbc45, 0xbc45, 0xbc45, 0x080c, 0x0d7d, 0x600b,
-	0xffff, 0x6003, 0x000f, 0x6106, 0x0126, 0x2091, 0x8000, 0x080c,
-	0xcf9c, 0x2009, 0x8000, 0x080c, 0x9239, 0x012e, 0x0005, 0x9186,
-	0x0013, 0x1128, 0x6004, 0x9082, 0x0040, 0x0804, 0xbccc, 0x9186,
-	0x0027, 0x1520, 0x080c, 0x95ff, 0x080c, 0x320f, 0x080c, 0xcf99,
-	0x0096, 0x6114, 0x2148, 0x080c, 0xc865, 0x0198, 0x080c, 0xca7a,
-	0x1118, 0x080c, 0xb5c6, 0x0068, 0xa867, 0x0103, 0xa87b, 0x0029,
-	0xa877, 0x0000, 0xa97c, 0xc1c5, 0xa97e, 0x080c, 0x6d9f, 0x080c,
-	0xca54, 0x009e, 0x080c, 0xabf0, 0x0804, 0x96bd, 0x9186, 0x0014,
-	0x1120, 0x6004, 0x9082, 0x0040, 0x0018, 0x080c, 0x0d7d, 0x0005,
-	0x0002, 0xbcaa, 0xbca8, 0xbca8, 0xbca8, 0xbca8, 0xbca8, 0xbca8,
-	0xbca8, 0xbca8, 0xbca8, 0xbca8, 0xbcc3, 0xbcc3, 0xbcc3, 0xbcc3,
-	0xbca8, 0xbcc3, 0xbca8, 0xbcc3, 0xbca8, 0xbca8, 0xbca8, 0xbca8,
-	0x080c, 0x0d7d, 0x080c, 0x95ff, 0x0096, 0x6114, 0x2148, 0x080c,
-	0xc865, 0x0168, 0xa867, 0x0103, 0xa87b, 0x0006, 0xa877, 0x0000,
-	0xa880, 0xc0ec, 0xa882, 0x080c, 0x6d9f, 0x080c, 0xca54, 0x009e,
-	0x080c, 0xabf0, 0x0005, 0x080c, 0x95ff, 0x080c, 0xca7a, 0x090c,
-	0xb5c6, 0x080c, 0xabf0, 0x0005, 0x0002, 0xbce6, 0xbce4, 0xbce4,
-	0xbce4, 0xbce4, 0xbce4, 0xbce4, 0xbce4, 0xbce4, 0xbce4, 0xbce4,
-	0xbce8, 0xbce8, 0xbce8, 0xbce8, 0xbce4, 0xbcea, 0xbce4, 0xbce8,
-	0xbce4, 0xbce4, 0xbce4, 0xbce4, 0x080c, 0x0d7d, 0x080c, 0x0d7d,
-	0x080c, 0x0d7d, 0x080c, 0xabf0, 0x0804, 0x96bd, 0x9182, 0x0057,
-	0x1220, 0x9182, 0x0040, 0x0208, 0x000a, 0x0005, 0xbd0d, 0xbd0d,
-	0xbd0d, 0xbd0d, 0xbd0d, 0xbd46, 0xbe35, 0xbd0d, 0xbe41, 0xbd0d,
-	0xbd0d, 0xbd0d, 0xbd0d, 0xbd0d, 0xbd0d, 0xbd0d, 0xbd0d, 0xbd0d,
-	0xbd0d, 0xbe41, 0xbd0f, 0xbd0d, 0xbe3f, 0x080c, 0x0d7d, 0x00b6,
+	0x4000, 0x080c, 0xcf7a, 0x0030, 0xa807, 0x0000, 0xa867, 0x0103,
+	0xa833, 0x0200, 0x2001, 0x0006, 0x080c, 0x65e3, 0x080c, 0x326f,
+	0x080c, 0xacb0, 0x0804, 0xb8d9, 0x080c, 0xb8e7, 0x6014, 0x9005,
+	0x0190, 0x2048, 0xa868, 0xd0f4, 0x01e8, 0xa864, 0x9084, 0x00ff,
+	0x9086, 0x0039, 0x1d08, 0x2001, 0x0000, 0x900e, 0x2011, 0x4000,
+	0x080c, 0xcf7a, 0x08f8, 0x080c, 0xb8dd, 0x0160, 0x9006, 0x080c,
+	0x65cf, 0x2001, 0x0004, 0x080c, 0x660f, 0x2001, 0x0007, 0x080c,
+	0x65e3, 0x08a0, 0x2001, 0x0004, 0x080c, 0x65e3, 0x6003, 0x0001,
+	0x6007, 0x0003, 0x080c, 0x92b7, 0x080c, 0x9738, 0x0804, 0xb8d9,
+	0xb85c, 0xd0e4, 0x01d8, 0x080c, 0xcda7, 0x080c, 0x753d, 0x0118,
+	0xd0dc, 0x1904, 0xb7fa, 0x2011, 0x1837, 0x2204, 0xc0ad, 0x2012,
+	0x2001, 0x196c, 0x2004, 0x00f6, 0x2079, 0x0100, 0x78e3, 0x0000,
+	0x080c, 0x26d5, 0x78e2, 0x00fe, 0x0804, 0xb7fa, 0x080c, 0xcde8,
+	0x2011, 0x1837, 0x2204, 0xc0a5, 0x2012, 0x0006, 0x080c, 0xe2c8,
+	0x000e, 0x1904, 0xb7fa, 0xc0b5, 0x2012, 0x2001, 0x0006, 0x080c,
+	0x65e3, 0x9006, 0x080c, 0x65cf, 0x00c6, 0x2001, 0x180f, 0x2004,
+	0xd09c, 0x0520, 0x00f6, 0x2079, 0x0100, 0x00e6, 0x2071, 0x1800,
+	0x700c, 0x9084, 0x00ff, 0x78e6, 0x707e, 0x7010, 0x78ea, 0x7082,
+	0x908c, 0x00ff, 0x00ee, 0x780c, 0xc0b5, 0x780e, 0x00fe, 0x080c,
+	0x26aa, 0x00f6, 0x2100, 0x900e, 0x080c, 0x2661, 0x795e, 0x00fe,
+	0x9186, 0x0081, 0x01d8, 0x2009, 0x0081, 0x00c8, 0x2009, 0x00ef,
+	0x00f6, 0x2079, 0x0100, 0x79ea, 0x7932, 0x7936, 0x780c, 0xc0b5,
+	0x780e, 0x00fe, 0x080c, 0x26aa, 0x00f6, 0x2079, 0x1800, 0x7982,
+	0x2100, 0x900e, 0x080c, 0x2661, 0x795e, 0x00fe, 0x8108, 0x080c,
+	0x6632, 0x2b00, 0x00ce, 0x1904, 0xb7fa, 0x6012, 0x2009, 0x180f,
+	0x210c, 0xd19c, 0x0150, 0x2009, 0x027c, 0x210c, 0x918c, 0x00ff,
+	0xb912, 0x2009, 0x027d, 0x210c, 0xb916, 0x2001, 0x0002, 0x080c,
+	0x65e3, 0x6023, 0x0001, 0x6003, 0x0001, 0x6007, 0x0002, 0x080c,
+	0x92b7, 0x080c, 0x9738, 0x0028, 0x080c, 0xb693, 0x2001, 0x0001,
+	0x0431, 0x00de, 0x009e, 0x00be, 0x0005, 0x2001, 0x1810, 0x2004,
+	0xd0a4, 0x0120, 0x2001, 0x1848, 0x2004, 0xd0ac, 0x0005, 0x00e6,
+	0x080c, 0xe805, 0x0190, 0x2071, 0x0260, 0x7108, 0x720c, 0x918c,
+	0x00ff, 0x1118, 0x9284, 0xff00, 0x0140, 0x6010, 0x2058, 0xb8a0,
+	0x9084, 0xff80, 0x1110, 0xb912, 0xba16, 0x00ee, 0x0005, 0x2030,
+	0x9005, 0x0158, 0x2001, 0x0007, 0x080c, 0x65e3, 0x080c, 0x5752,
+	0x1120, 0x2001, 0x0007, 0x080c, 0x660f, 0x2600, 0x9005, 0x11b0,
+	0x6014, 0x0096, 0x2048, 0xa868, 0x009e, 0xd0fc, 0x1178, 0x0036,
+	0x0046, 0x6010, 0x00b6, 0x2058, 0xbba0, 0x00be, 0x2021, 0x0004,
+	0x2011, 0x8014, 0x080c, 0x4b52, 0x004e, 0x003e, 0x080c, 0x326f,
+	0x6020, 0x9086, 0x000a, 0x1108, 0x0005, 0x0804, 0xacb0, 0x00b6,
+	0x00e6, 0x0026, 0x0016, 0x2071, 0x1800, 0x7090, 0x9086, 0x0014,
+	0x1904, 0xb987, 0x080c, 0x5752, 0x1170, 0x6014, 0x9005, 0x1158,
+	0x0036, 0x0046, 0x6010, 0x2058, 0xbba0, 0x2021, 0x0006, 0x080c,
+	0x4d09, 0x004e, 0x003e, 0x00d6, 0x6010, 0x2058, 0x080c, 0x672e,
+	0x080c, 0xb7b4, 0x00de, 0x080c, 0xbbdb, 0x1588, 0x6010, 0x2058,
+	0xb890, 0x9005, 0x0560, 0x2001, 0x0006, 0x080c, 0x65e3, 0x0096,
+	0x6014, 0x904d, 0x01d0, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0039,
+	0x1140, 0x2001, 0x0000, 0x900e, 0x2011, 0x4000, 0x080c, 0xcf7a,
+	0x0060, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0029, 0x0130, 0xa807,
+	0x0000, 0xa867, 0x0103, 0xa833, 0x0200, 0x009e, 0x080c, 0x326f,
+	0x6020, 0x9086, 0x000a, 0x0140, 0x080c, 0xacb0, 0x0028, 0x080c,
+	0xb693, 0x9006, 0x080c, 0xb8ff, 0x001e, 0x002e, 0x00ee, 0x00be,
+	0x0005, 0x2011, 0x1824, 0x2204, 0x9086, 0x0014, 0x1160, 0x2001,
+	0x0002, 0x080c, 0x65e3, 0x6003, 0x0001, 0x6007, 0x0001, 0x080c,
+	0x92b7, 0x0804, 0x9738, 0x2001, 0x0001, 0x0804, 0xb8ff, 0x2030,
+	0x2011, 0x1824, 0x2204, 0x9086, 0x0004, 0x1148, 0x96b6, 0x000b,
+	0x1120, 0x2001, 0x0007, 0x080c, 0x65e3, 0x0804, 0xacb0, 0x2001,
+	0x0001, 0x0804, 0xb8ff, 0x0002, 0xb77c, 0xb9d3, 0xb77c, 0xba14,
+	0xb77c, 0xbac1, 0xb9c8, 0xb77c, 0xb77c, 0xbad5, 0xb77c, 0xbae7,
+	0x6604, 0x9686, 0x0003, 0x0904, 0xb92f, 0x96b6, 0x001e, 0x1110,
+	0x080c, 0xacb0, 0x0005, 0x00b6, 0x00d6, 0x00c6, 0x080c, 0xbaf9,
+	0x11a0, 0x9006, 0x080c, 0x65cf, 0x080c, 0x3240, 0x080c, 0xd0b0,
+	0x2001, 0x0002, 0x080c, 0x65e3, 0x6003, 0x0001, 0x6007, 0x0002,
+	0x080c, 0x92b7, 0x080c, 0x9738, 0x0418, 0x2009, 0x026e, 0x2104,
+	0x9086, 0x0009, 0x1160, 0x6010, 0x2058, 0xb840, 0x9084, 0x00ff,
+	0x9005, 0x0170, 0x8001, 0xb842, 0x601b, 0x000a, 0x0088, 0x2009,
+	0x026f, 0x2104, 0x9084, 0xff00, 0x9086, 0x1900, 0x1108, 0x08a0,
+	0x080c, 0x3240, 0x080c, 0xd0b0, 0x2001, 0x0001, 0x080c, 0xb8ff,
+	0x00ce, 0x00de, 0x00be, 0x0005, 0x0096, 0x00b6, 0x0026, 0x9016,
+	0x080c, 0xbb07, 0x00d6, 0x2069, 0x197b, 0x2d04, 0x9005, 0x0168,
+	0x6010, 0x2058, 0xb8a0, 0x9086, 0x007e, 0x1138, 0x2069, 0x1820,
+	0x2d04, 0x8000, 0x206a, 0x00de, 0x0010, 0x00de, 0x0088, 0x9006,
+	0x080c, 0x65cf, 0x2001, 0x0002, 0x080c, 0x65e3, 0x6003, 0x0001,
+	0x6007, 0x0002, 0x080c, 0x92b7, 0x080c, 0x9738, 0x0804, 0xba91,
+	0x080c, 0xc97a, 0x01b0, 0x6014, 0x2048, 0xa864, 0x2010, 0x9086,
+	0x0139, 0x1138, 0x6007, 0x0016, 0x2001, 0x0002, 0x080c, 0xcfd4,
+	0x00b0, 0x6014, 0x2048, 0xa864, 0xd0fc, 0x0118, 0x2001, 0x0001,
+	0x0ca8, 0x2001, 0x180e, 0x2004, 0xd0dc, 0x0148, 0x6010, 0x2058,
+	0xb840, 0x9084, 0x00ff, 0x9005, 0x1110, 0x9006, 0x0c38, 0x080c,
+	0xb693, 0x2009, 0x026e, 0x2134, 0x96b4, 0x00ff, 0x9686, 0x0005,
+	0x0520, 0x9686, 0x000b, 0x01c8, 0x2009, 0x026f, 0x2104, 0x9084,
+	0xff00, 0x1118, 0x9686, 0x0009, 0x01c0, 0x9086, 0x1900, 0x1168,
+	0x9686, 0x0009, 0x0190, 0x2001, 0x0004, 0x080c, 0x65e3, 0x2001,
+	0x0028, 0x601a, 0x6007, 0x0052, 0x0020, 0x2001, 0x0001, 0x080c,
+	0xb8ff, 0x002e, 0x00be, 0x009e, 0x0005, 0x9286, 0x0139, 0x0160,
+	0x6014, 0x2048, 0x080c, 0xc97a, 0x0140, 0xa864, 0x9086, 0x0139,
+	0x0118, 0xa868, 0xd0fc, 0x0108, 0x0c40, 0x6010, 0x2058, 0xb840,
+	0x9084, 0x00ff, 0x9005, 0x0138, 0x8001, 0xb842, 0x601b, 0x000a,
+	0x6007, 0x0016, 0x08f0, 0xb8a0, 0x9086, 0x007e, 0x1138, 0x00e6,
+	0x2071, 0x1800, 0x080c, 0x6025, 0x00ee, 0x0010, 0x080c, 0x3240,
+	0x0860, 0x080c, 0xbb07, 0x1160, 0x2001, 0x0004, 0x080c, 0x65e3,
+	0x6003, 0x0001, 0x6007, 0x0003, 0x080c, 0x92b7, 0x0804, 0x9738,
+	0x080c, 0xb693, 0x9006, 0x0804, 0xb8ff, 0x0489, 0x1160, 0x2001,
+	0x0008, 0x080c, 0x65e3, 0x6003, 0x0001, 0x6007, 0x0005, 0x080c,
+	0x92b7, 0x0804, 0x9738, 0x2001, 0x0001, 0x0804, 0xb8ff, 0x00f9,
+	0x1160, 0x2001, 0x000a, 0x080c, 0x65e3, 0x6003, 0x0001, 0x6007,
+	0x0001, 0x080c, 0x92b7, 0x0804, 0x9738, 0x2001, 0x0001, 0x0804,
+	0xb8ff, 0x2009, 0x026e, 0x2104, 0x9086, 0x0003, 0x1138, 0x2009,
+	0x026f, 0x2104, 0x9084, 0xff00, 0x9086, 0x2a00, 0x0005, 0x9085,
+	0x0001, 0x0005, 0x00b6, 0x00c6, 0x0016, 0x6110, 0x2158, 0x080c,
+	0x66a2, 0x001e, 0x00ce, 0x00be, 0x0005, 0x00b6, 0x00f6, 0x00e6,
+	0x00d6, 0x0036, 0x0016, 0x6010, 0x2058, 0x2009, 0x1837, 0x2104,
+	0x9085, 0x0003, 0x200a, 0x080c, 0xbbad, 0x0560, 0x2009, 0x1837,
+	0x2104, 0xc0cd, 0x200a, 0x080c, 0x6ad9, 0x0158, 0x9006, 0x2020,
+	0x2009, 0x002a, 0x080c, 0xe445, 0x2001, 0x180c, 0x200c, 0xc195,
+	0x2102, 0x2019, 0x002a, 0x2009, 0x0001, 0x080c, 0x3205, 0x00e6,
+	0x2071, 0x1800, 0x080c, 0x3011, 0x00ee, 0x00c6, 0x0156, 0x20a9,
+	0x0781, 0x2009, 0x007f, 0x080c, 0x3349, 0x8108, 0x1f04, 0xbb4b,
+	0x015e, 0x00ce, 0x080c, 0xbb0a, 0x2071, 0x0260, 0x2079, 0x0200,
+	0x7817, 0x0001, 0x2001, 0x1837, 0x200c, 0xc1c5, 0x7018, 0xd0fc,
+	0x0110, 0xd0dc, 0x0118, 0x7038, 0xd0dc, 0x1108, 0xc1c4, 0x7817,
+	0x0000, 0x2001, 0x1837, 0x2102, 0x2079, 0x0100, 0x2e04, 0x9084,
+	0x00ff, 0x2069, 0x181f, 0x206a, 0x78e6, 0x0006, 0x8e70, 0x2e04,
+	0x2069, 0x1820, 0x206a, 0x78ea, 0x7832, 0x7836, 0x2010, 0x9084,
+	0xff00, 0x001e, 0x9105, 0x2009, 0x182c, 0x200a, 0x2200, 0x9084,
+	0x00ff, 0x2008, 0x080c, 0x26aa, 0x080c, 0x753d, 0x0170, 0x2071,
+	0x0260, 0x2069, 0x1981, 0x7048, 0x206a, 0x704c, 0x6806, 0x7050,
+	0x680a, 0x7054, 0x680e, 0x080c, 0xcda7, 0x0040, 0x2001, 0x0006,
+	0x080c, 0x65e3, 0x080c, 0x326f, 0x080c, 0xacb0, 0x001e, 0x003e,
+	0x00de, 0x00ee, 0x00fe, 0x00be, 0x0005, 0x0096, 0x0026, 0x0036,
+	0x00e6, 0x0156, 0x2019, 0x182c, 0x231c, 0x83ff, 0x01f0, 0x2071,
+	0x0260, 0x7200, 0x9294, 0x00ff, 0x7004, 0x9084, 0xff00, 0x9205,
+	0x9306, 0x1198, 0x2011, 0x0276, 0x20a9, 0x0004, 0x2b48, 0x2019,
+	0x000a, 0x080c, 0xbca2, 0x1148, 0x2011, 0x027a, 0x20a9, 0x0004,
+	0x2019, 0x0006, 0x080c, 0xbca2, 0x1100, 0x015e, 0x00ee, 0x003e,
+	0x002e, 0x009e, 0x0005, 0x00e6, 0x2071, 0x0260, 0x7034, 0x9086,
+	0x0014, 0x11a8, 0x7038, 0x9086, 0x0800, 0x1188, 0x703c, 0xd0ec,
+	0x0160, 0x9084, 0x0f00, 0x9086, 0x0100, 0x1138, 0x7054, 0xd0a4,
+	0x1110, 0xd0ac, 0x0110, 0x9006, 0x0010, 0x9085, 0x0001, 0x00ee,
+	0x0005, 0x00e6, 0x0096, 0x00c6, 0x0076, 0x0056, 0x0046, 0x0026,
+	0x0006, 0x0126, 0x2091, 0x8000, 0x2029, 0x19f2, 0x252c, 0x2021,
+	0x19f9, 0x2424, 0x2061, 0x1ddc, 0x2071, 0x1800, 0x7254, 0x7074,
+	0x9202, 0x1a04, 0xbc6e, 0x080c, 0x8c1f, 0x0904, 0xbc67, 0x080c,
+	0xe476, 0x0904, 0xbc67, 0x6720, 0x9786, 0x0007, 0x0904, 0xbc67,
+	0x2500, 0x9c06, 0x0904, 0xbc67, 0x2400, 0x9c06, 0x0904, 0xbc67,
+	0x3e08, 0x9186, 0x0002, 0x1148, 0x6010, 0x9005, 0x0130, 0x00b6,
+	0x2058, 0xb800, 0x00be, 0xd0bc, 0x1590, 0x00c6, 0x6043, 0xffff,
+	0x6000, 0x9086, 0x0004, 0x1110, 0x080c, 0x1ac5, 0x9786, 0x000a,
+	0x0148, 0x080c, 0xcb91, 0x1130, 0x00ce, 0x080c, 0xb693, 0x080c,
+	0xaceb, 0x00e8, 0x6014, 0x2048, 0x080c, 0xc97a, 0x01a8, 0x9786,
+	0x0003, 0x1530, 0xa867, 0x0103, 0xa87c, 0xd0cc, 0x0130, 0x0096,
+	0xa878, 0x2048, 0x080c, 0x0ff9, 0x009e, 0xab7a, 0xa877, 0x0000,
+	0x080c, 0x6de2, 0x080c, 0xcb6b, 0x080c, 0xaceb, 0x00ce, 0x9ce0,
+	0x001c, 0x7068, 0x9c02, 0x1210, 0x0804, 0xbc0e, 0x012e, 0x000e,
+	0x002e, 0x004e, 0x005e, 0x007e, 0x00ce, 0x009e, 0x00ee, 0x0005,
+	0x9786, 0x0006, 0x1118, 0x080c, 0xe3e8, 0x0c30, 0x9786, 0x0009,
+	0x1148, 0x6000, 0x9086, 0x0004, 0x0d08, 0x2009, 0x004c, 0x080c,
+	0xad4d, 0x08e0, 0x9786, 0x000a, 0x0980, 0x0820, 0x220c, 0x2304,
+	0x9106, 0x1130, 0x8210, 0x8318, 0x1f04, 0xbc8e, 0x9006, 0x0005,
+	0x2304, 0x9102, 0x0218, 0x2001, 0x0001, 0x0008, 0x9006, 0x918d,
+	0x0001, 0x0005, 0x0136, 0x01c6, 0x0016, 0x8906, 0x8006, 0x8007,
+	0x908c, 0x003f, 0x21e0, 0x9084, 0xffc0, 0x9300, 0x2098, 0x3518,
+	0x20a9, 0x0001, 0x220c, 0x4002, 0x910e, 0x1140, 0x8210, 0x8319,
+	0x1dc8, 0x9006, 0x001e, 0x01ce, 0x013e, 0x0005, 0x220c, 0x9102,
+	0x0218, 0x2001, 0x0001, 0x0010, 0x2001, 0x0000, 0x918d, 0x0001,
+	0x001e, 0x01ce, 0x013e, 0x0005, 0x220c, 0x810f, 0x2304, 0x9106,
+	0x1130, 0x8210, 0x8318, 0x1f04, 0xbccc, 0x9006, 0x0005, 0x918d,
+	0x0001, 0x0005, 0x6004, 0x908a, 0x0053, 0x1a0c, 0x0d7d, 0x080c,
+	0xcb80, 0x0120, 0x080c, 0xcb91, 0x0158, 0x0028, 0x080c, 0x326f,
+	0x080c, 0xcb91, 0x0128, 0x080c, 0x967a, 0x080c, 0xacb0, 0x0005,
+	0x080c, 0xb693, 0x0cc0, 0x9182, 0x0057, 0x1220, 0x9182, 0x0040,
+	0x0208, 0x000a, 0x0005, 0xbd12, 0xbd12, 0xbd12, 0xbd12, 0xbd12,
+	0xbd12, 0xbd12, 0xbd12, 0xbd12, 0xbd12, 0xbd12, 0xbd14, 0xbd14,
+	0xbd14, 0xbd14, 0xbd12, 0xbd12, 0xbd12, 0xbd14, 0xbd12, 0xbd12,
+	0xbd12, 0xbd12, 0x080c, 0x0d7d, 0x600b, 0xffff, 0x6003, 0x000f,
+	0x6106, 0x0126, 0x2091, 0x8000, 0x080c, 0xd0b3, 0x2009, 0x8000,
+	0x080c, 0x92b0, 0x012e, 0x0005, 0x9186, 0x0013, 0x1128, 0x6004,
+	0x9082, 0x0040, 0x0804, 0xbd9c, 0x9186, 0x0027, 0x1520, 0x080c,
+	0x967a, 0x080c, 0x3240, 0x080c, 0xd0b0, 0x0096, 0x6114, 0x2148,
+	0x080c, 0xc97a, 0x0198, 0x080c, 0xcb91, 0x1118, 0x080c, 0xb693,
+	0x0068, 0xa867, 0x0103, 0xa87b, 0x0029, 0xa877, 0x0000, 0xa97c,
+	0xc1c5, 0xa97e, 0x080c, 0x6dee, 0x080c, 0xcb6b, 0x009e, 0x080c,
+	0xacb0, 0x0804, 0x9738, 0x9186, 0x0014, 0x1120, 0x6004, 0x9082,
+	0x0040, 0x0030, 0x9186, 0x0053, 0x0110, 0x080c, 0x0d7d, 0x0005,
+	0x0002, 0xbd7a, 0xbd78, 0xbd78, 0xbd78, 0xbd78, 0xbd78, 0xbd78,
+	0xbd78, 0xbd78, 0xbd78, 0xbd78, 0xbd93, 0xbd93, 0xbd93, 0xbd93,
+	0xbd78, 0xbd93, 0xbd78, 0xbd93, 0xbd78, 0xbd78, 0xbd78, 0xbd78,
+	0x080c, 0x0d7d, 0x080c, 0x967a, 0x0096, 0x6114, 0x2148, 0x080c,
+	0xc97a, 0x0168, 0xa867, 0x0103, 0xa87b, 0x0006, 0xa877, 0x0000,
+	0xa880, 0xc0ec, 0xa882, 0x080c, 0x6dee, 0x080c, 0xcb6b, 0x009e,
+	0x080c, 0xacb0, 0x0005, 0x080c, 0x967a, 0x080c, 0xcb91, 0x090c,
+	0xb693, 0x080c, 0xacb0, 0x0005, 0x0002, 0xbdb6, 0xbdb4, 0xbdb4,
+	0xbdb4, 0xbdb4, 0xbdb4, 0xbdb4, 0xbdb4, 0xbdb4, 0xbdb4, 0xbdb4,
+	0xbdb8, 0xbdb8, 0xbdb8, 0xbdb8, 0xbdb4, 0xbdba, 0xbdb4, 0xbdb8,
+	0xbdb4, 0xbdb4, 0xbdb4, 0xbdb4, 0x080c, 0x0d7d, 0x080c, 0x0d7d,
+	0x080c, 0x0d7d, 0x080c, 0xacb0, 0x0804, 0x9738, 0x9182, 0x0057,
+	0x1220, 0x9182, 0x0040, 0x0208, 0x000a, 0x0005, 0xbddd, 0xbddd,
+	0xbddd, 0xbddd, 0xbddd, 0xbe16, 0xbf05, 0xbddd, 0xbf11, 0xbddd,
+	0xbddd, 0xbddd, 0xbddd, 0xbddd, 0xbddd, 0xbddd, 0xbddd, 0xbddd,
+	0xbddd, 0xbf11, 0xbddf, 0xbddd, 0xbf0f, 0x080c, 0x0d7d, 0x00b6,
 	0x0096, 0x6114, 0x2148, 0x6010, 0x2058, 0xb800, 0xd0bc, 0x1508,
 	0xa87b, 0x0000, 0xa867, 0x0103, 0xa877, 0x0000, 0xa87c, 0xd0ac,
-	0x0128, 0xa834, 0xa938, 0x9115, 0x190c, 0xbec6, 0x080c, 0x6bb5,
+	0x0128, 0xa834, 0xa938, 0x9115, 0x190c, 0xbf96, 0x080c, 0x6c04,
 	0x6210, 0x2258, 0xba3c, 0x82ff, 0x0110, 0x8211, 0xba3e, 0xb8d0,
-	0x9005, 0x0110, 0x080c, 0x676f, 0x080c, 0xabf0, 0x009e, 0x00be,
+	0x9005, 0x0110, 0x080c, 0x67be, 0x080c, 0xacb0, 0x009e, 0x00be,
 	0x0005, 0xa87c, 0xd0ac, 0x09e0, 0xa838, 0xa934, 0x9105, 0x09c0,
-	0xa880, 0xd0bc, 0x19a8, 0x080c, 0xcbaf, 0x0c80, 0x00b6, 0x0096,
+	0xa880, 0xd0bc, 0x19a8, 0x080c, 0xccc6, 0x0c80, 0x00b6, 0x0096,
 	0x6114, 0x2148, 0x601c, 0xd0fc, 0x1110, 0x7644, 0x0008, 0x9036,
 	0x96b4, 0x0fff, 0x86ff, 0x1590, 0x6010, 0x2058, 0xb800, 0xd0bc,
-	0x1904, 0xbe24, 0xa87b, 0x0000, 0xa867, 0x0103, 0xae76, 0xa87c,
-	0xd0ac, 0x0128, 0xa834, 0xa938, 0x9115, 0x190c, 0xbec6, 0x080c,
-	0x6bb5, 0x6210, 0x2258, 0xba3c, 0x82ff, 0x0110, 0x8211, 0xba3e,
-	0xb8d0, 0x9005, 0x0110, 0x080c, 0x676f, 0x601c, 0xd0fc, 0x1148,
-	0x7044, 0xd0e4, 0x1904, 0xbe08, 0x080c, 0xabf0, 0x009e, 0x00be,
+	0x1904, 0xbef4, 0xa87b, 0x0000, 0xa867, 0x0103, 0xae76, 0xa87c,
+	0xd0ac, 0x0128, 0xa834, 0xa938, 0x9115, 0x190c, 0xbf96, 0x080c,
+	0x6c04, 0x6210, 0x2258, 0xba3c, 0x82ff, 0x0110, 0x8211, 0xba3e,
+	0xb8d0, 0x9005, 0x0110, 0x080c, 0x67be, 0x601c, 0xd0fc, 0x1148,
+	0x7044, 0xd0e4, 0x1904, 0xbed8, 0x080c, 0xacb0, 0x009e, 0x00be,
 	0x0005, 0x2009, 0x0211, 0x210c, 0x080c, 0x0d7d, 0x968c, 0x0c00,
-	0x0150, 0x6010, 0x2058, 0xb800, 0xd0bc, 0x1904, 0xbe0c, 0x7348,
+	0x0150, 0x6010, 0x2058, 0xb800, 0xd0bc, 0x1904, 0xbedc, 0x7348,
 	0xab92, 0x734c, 0xab8e, 0x968c, 0x00ff, 0x9186, 0x0002, 0x0508,
 	0x9186, 0x0028, 0x1118, 0xa87b, 0x001c, 0x00e8, 0xd6dc, 0x01a0,
 	0xa87b, 0x0015, 0xa87c, 0xd0ac, 0x0170, 0xa938, 0xaa34, 0x2100,
@@ -5867,53 +5893,53 @@
 	0xa992, 0xaa8e, 0xc6dc, 0x0038, 0xd6d4, 0x0118, 0xa87b, 0x0007,
 	0x0010, 0xa87b, 0x0000, 0xa867, 0x0103, 0xae76, 0x901e, 0xd6c4,
 	0x01d8, 0x9686, 0x0100, 0x1130, 0x7064, 0x9005, 0x1118, 0xc6c4,
-	0x0804, 0xbd52, 0x735c, 0xab86, 0x83ff, 0x0170, 0x938a, 0x0009,
+	0x0804, 0xbe22, 0x735c, 0xab86, 0x83ff, 0x0170, 0x938a, 0x0009,
 	0x0210, 0x2019, 0x0008, 0x0036, 0x2308, 0x2019, 0x0018, 0x2011,
-	0x0025, 0x080c, 0xc41b, 0x003e, 0xd6cc, 0x0904, 0xbd67, 0x7154,
-	0xa98a, 0x81ff, 0x0904, 0xbd67, 0x9192, 0x0021, 0x1278, 0x8304,
-	0x9098, 0x0018, 0x2011, 0x0029, 0x080c, 0xc41b, 0x2011, 0x0205,
-	0x2013, 0x0000, 0x080c, 0xcf29, 0x0804, 0xbd67, 0xa868, 0xd0fc,
+	0x0025, 0x080c, 0xc4f8, 0x003e, 0xd6cc, 0x0904, 0xbe37, 0x7154,
+	0xa98a, 0x81ff, 0x0904, 0xbe37, 0x9192, 0x0021, 0x1278, 0x8304,
+	0x9098, 0x0018, 0x2011, 0x0029, 0x080c, 0xc4f8, 0x2011, 0x0205,
+	0x2013, 0x0000, 0x080c, 0xd040, 0x0804, 0xbe37, 0xa868, 0xd0fc,
 	0x0120, 0x2009, 0x0020, 0xa98a, 0x0c50, 0x00a6, 0x2950, 0x080c,
-	0xc3ba, 0x00ae, 0x080c, 0xcf29, 0x080c, 0xc40b, 0x0804, 0xbd69,
-	0x080c, 0xcb72, 0x0804, 0xbd7e, 0xa87c, 0xd0ac, 0x0904, 0xbd8f,
-	0xa880, 0xd0bc, 0x1904, 0xbd8f, 0x7348, 0xa838, 0x9306, 0x11c8,
-	0x734c, 0xa834, 0x931e, 0x0904, 0xbd8f, 0xd6d4, 0x0190, 0xab38,
-	0x9305, 0x0904, 0xbd8f, 0x0068, 0xa87c, 0xd0ac, 0x0904, 0xbd5a,
-	0xa838, 0xa934, 0x9105, 0x0904, 0xbd5a, 0xa880, 0xd0bc, 0x1904,
-	0xbd5a, 0x080c, 0xcbaf, 0x0804, 0xbd7e, 0x00f6, 0x2079, 0x026c,
+	0xc497, 0x00ae, 0x080c, 0xd040, 0x080c, 0xc4e8, 0x0804, 0xbe39,
+	0x080c, 0xcc89, 0x0804, 0xbe4e, 0xa87c, 0xd0ac, 0x0904, 0xbe5f,
+	0xa880, 0xd0bc, 0x1904, 0xbe5f, 0x7348, 0xa838, 0x9306, 0x11c8,
+	0x734c, 0xa834, 0x931e, 0x0904, 0xbe5f, 0xd6d4, 0x0190, 0xab38,
+	0x9305, 0x0904, 0xbe5f, 0x0068, 0xa87c, 0xd0ac, 0x0904, 0xbe2a,
+	0xa838, 0xa934, 0x9105, 0x0904, 0xbe2a, 0xa880, 0xd0bc, 0x1904,
+	0xbe2a, 0x080c, 0xccc6, 0x0804, 0xbe4e, 0x00f6, 0x2079, 0x026c,
 	0x7c04, 0x7b00, 0x7e0c, 0x7d08, 0x00fe, 0x0021, 0x0005, 0x0011,
 	0x0005, 0x0005, 0x0096, 0x6003, 0x0002, 0x6007, 0x0043, 0x6014,
 	0x2048, 0xa87c, 0xd0ac, 0x0128, 0x009e, 0x0005, 0x2130, 0x2228,
 	0x0058, 0x2400, 0xa9ac, 0x910a, 0x2300, 0xaab0, 0x9213, 0x2600,
 	0x9102, 0x2500, 0x9203, 0x0e90, 0xac46, 0xab4a, 0xae36, 0xad3a,
-	0x6044, 0xd0fc, 0x190c, 0xa8c2, 0x604b, 0x0000, 0x080c, 0x1c55,
-	0x1118, 0x6144, 0x080c, 0x9265, 0x009e, 0x0005, 0x9182, 0x0057,
-	0x1220, 0x9182, 0x0040, 0x0208, 0x000a, 0x0005, 0xbe8d, 0xbe8d,
-	0xbe8d, 0xbe8d, 0xbe8d, 0xbe8d, 0xbe8d, 0xbe8d, 0xbe8d, 0xbe8d,
-	0xbe8f, 0xbe8d, 0xbe8d, 0xbe8d, 0xbe8d, 0xbea0, 0xbe8d, 0xbe8d,
-	0xbe8d, 0xbe8d, 0xbec4, 0xbe8d, 0xbe8d, 0x080c, 0x0d7d, 0x6004,
-	0x9086, 0x0040, 0x1110, 0x080c, 0x95ff, 0x2019, 0x0001, 0x080c,
-	0xa133, 0x6003, 0x0002, 0x080c, 0xcfa1, 0x080c, 0x965a, 0x0005,
-	0x6004, 0x9086, 0x0040, 0x1110, 0x080c, 0x95ff, 0x2019, 0x0001,
-	0x080c, 0xa133, 0x080c, 0x965a, 0x080c, 0x320f, 0x080c, 0xcf99,
-	0x0096, 0x6114, 0x2148, 0x080c, 0xc865, 0x0150, 0xa867, 0x0103,
-	0xa87b, 0x0029, 0xa877, 0x0000, 0x080c, 0x6d9f, 0x080c, 0xca54,
-	0x009e, 0x080c, 0xabf0, 0x0005, 0x080c, 0x0d7d, 0xa87b, 0x0015,
+	0x6044, 0xd0fc, 0x190c, 0xa947, 0x604b, 0x0000, 0x080c, 0x1c86,
+	0x1118, 0x6144, 0x080c, 0x92dc, 0x009e, 0x0005, 0x9182, 0x0057,
+	0x1220, 0x9182, 0x0040, 0x0208, 0x000a, 0x0005, 0xbf5d, 0xbf5d,
+	0xbf5d, 0xbf5d, 0xbf5d, 0xbf5d, 0xbf5d, 0xbf5d, 0xbf5d, 0xbf5d,
+	0xbf5f, 0xbf5d, 0xbf5d, 0xbf5d, 0xbf5d, 0xbf70, 0xbf5d, 0xbf5d,
+	0xbf5d, 0xbf5d, 0xbf94, 0xbf5d, 0xbf5d, 0x080c, 0x0d7d, 0x6004,
+	0x9086, 0x0040, 0x1110, 0x080c, 0x967a, 0x2019, 0x0001, 0x080c,
+	0xa1b8, 0x6003, 0x0002, 0x080c, 0xd0b8, 0x080c, 0x96d5, 0x0005,
+	0x6004, 0x9086, 0x0040, 0x1110, 0x080c, 0x967a, 0x2019, 0x0001,
+	0x080c, 0xa1b8, 0x080c, 0x96d5, 0x080c, 0x3240, 0x080c, 0xd0b0,
+	0x0096, 0x6114, 0x2148, 0x080c, 0xc97a, 0x0150, 0xa867, 0x0103,
+	0xa87b, 0x0029, 0xa877, 0x0000, 0x080c, 0x6dee, 0x080c, 0xcb6b,
+	0x009e, 0x080c, 0xacb0, 0x0005, 0x080c, 0x0d7d, 0xa87b, 0x0015,
 	0xd1fc, 0x0180, 0xa87b, 0x0007, 0x8002, 0x8000, 0x810a, 0x9189,
 	0x0000, 0x0006, 0x0016, 0x2009, 0x1a77, 0x2104, 0x8000, 0x200a,
 	0x001e, 0x000e, 0xa992, 0xa88e, 0x0005, 0x9182, 0x0057, 0x1220,
-	0x9182, 0x0040, 0x0208, 0x000a, 0x0005, 0xbefc, 0xbefc, 0xbefc,
-	0xbefc, 0xbefc, 0xbefe, 0xbefc, 0xbefc, 0xbfbb, 0xbefc, 0xbefc,
-	0xbefc, 0xbefc, 0xbefc, 0xbefc, 0xbefc, 0xbefc, 0xbefc, 0xbefc,
-	0xc0f9, 0xbefc, 0xc103, 0xbefc, 0x080c, 0x0d7d, 0x601c, 0xd0bc,
+	0x9182, 0x0040, 0x0208, 0x000a, 0x0005, 0xbfcc, 0xbfcc, 0xbfcc,
+	0xbfcc, 0xbfcc, 0xbfce, 0xbfcc, 0xbfcc, 0xc08b, 0xbfcc, 0xbfcc,
+	0xbfcc, 0xbfcc, 0xbfcc, 0xbfcc, 0xbfcc, 0xbfcc, 0xbfcc, 0xbfcc,
+	0xc1cb, 0xbfcc, 0xc1d5, 0xbfcc, 0x080c, 0x0d7d, 0x601c, 0xd0bc,
 	0x0178, 0xd084, 0x0168, 0xd0f4, 0x0120, 0xc084, 0x601e, 0x0804,
-	0xbcee, 0x6114, 0x0096, 0x2148, 0xa87c, 0xc0e5, 0xa87e, 0x009e,
+	0xbdbe, 0x6114, 0x0096, 0x2148, 0xa87c, 0xc0e5, 0xa87e, 0x009e,
 	0x0076, 0x00a6, 0x00e6, 0x0096, 0x2071, 0x0260, 0x6114, 0x2150,
 	0x601c, 0xd0fc, 0x1110, 0x7644, 0x0008, 0x9036, 0xb676, 0x96b4,
 	0x0fff, 0xb77c, 0xc7e5, 0xb77e, 0x6210, 0x00b6, 0x2258, 0xba3c,
-	0x82ff, 0x0110, 0x8211, 0xba3e, 0x00be, 0x86ff, 0x0904, 0xbfb4,
+	0x82ff, 0x0110, 0x8211, 0xba3e, 0x00be, 0x86ff, 0x0904, 0xc084,
 	0x9694, 0xff00, 0x9284, 0x0c00, 0x0120, 0x7048, 0xb092, 0x704c,
-	0xb08e, 0x9284, 0x0300, 0x0904, 0xbfb4, 0x9686, 0x0100, 0x1130,
+	0xb08e, 0x9284, 0x0300, 0x0904, 0xc084, 0x9686, 0x0100, 0x1130,
 	0x7064, 0x9005, 0x1118, 0xc6c4, 0xb676, 0x0c38, 0x080c, 0x1047,
 	0x090c, 0x0d7d, 0x2900, 0xb07a, 0xb77c, 0x97bd, 0x0200, 0xb77e,
 	0xa867, 0x0103, 0xb068, 0xa86a, 0xb06c, 0xa86e, 0xb070, 0xa872,
@@ -5924,19 +5950,19 @@
 	0x0010, 0xa87b, 0x0000, 0xaf7e, 0xb080, 0xa882, 0xb084, 0xa886,
 	0x901e, 0xd6c4, 0x0190, 0x735c, 0xab86, 0x83ff, 0x0170, 0x938a,
 	0x0009, 0x0210, 0x2019, 0x0008, 0x0036, 0x2308, 0x2019, 0x0018,
-	0x2011, 0x0025, 0x080c, 0xc41b, 0x003e, 0xd6cc, 0x01e8, 0x7154,
+	0x2011, 0x0025, 0x080c, 0xc4f8, 0x003e, 0xd6cc, 0x01e8, 0x7154,
 	0xa98a, 0x81ff, 0x01c8, 0x9192, 0x0021, 0x1260, 0x8304, 0x9098,
-	0x0018, 0x2011, 0x0029, 0x080c, 0xc41b, 0x2011, 0x0205, 0x2013,
+	0x0018, 0x2011, 0x0029, 0x080c, 0xc4f8, 0x2011, 0x0205, 0x2013,
 	0x0000, 0x0050, 0xb068, 0xd0fc, 0x0120, 0x2009, 0x0020, 0xa98a,
-	0x0c68, 0x2950, 0x080c, 0xc3ba, 0x080c, 0x1a62, 0x009e, 0x00ee,
+	0x0c68, 0x2950, 0x080c, 0xc497, 0x080c, 0x1a93, 0x009e, 0x00ee,
 	0x00ae, 0x007e, 0x0005, 0x2001, 0x1987, 0x2004, 0x604a, 0x0096,
 	0x6114, 0x2148, 0xa83c, 0xa940, 0x9105, 0x1118, 0xa87c, 0xc0dc,
-	0xa87e, 0x6003, 0x0002, 0x080c, 0xcfaa, 0x0904, 0xc0f4, 0x604b,
+	0xa87e, 0x6003, 0x0002, 0x080c, 0xd0c1, 0x0904, 0xc1c6, 0x604b,
 	0x0000, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x1500,
-	0xd1cc, 0x0904, 0xc0b9, 0xa978, 0xa868, 0xd0fc, 0x0904, 0xc07a,
+	0xd1cc, 0x0904, 0xc18a, 0xa978, 0xa868, 0xd0fc, 0x0904, 0xc14b,
 	0x0016, 0xa87c, 0x0006, 0xa880, 0x0006, 0x00a6, 0x2150, 0xb174,
-	0x9184, 0x00ff, 0x90b6, 0x0002, 0x0904, 0xc048, 0x9086, 0x0028,
-	0x1904, 0xc034, 0xa87b, 0x001c, 0xb07b, 0x001c, 0x0804, 0xc050,
+	0x9184, 0x00ff, 0x90b6, 0x0002, 0x0904, 0xc118, 0x9086, 0x0028,
+	0x1904, 0xc104, 0xa87b, 0x001c, 0xb07b, 0x001c, 0x0804, 0xc120,
 	0x6024, 0xd0f4, 0x11d0, 0xa838, 0xaa34, 0x9205, 0x09c8, 0xa838,
 	0xaa90, 0x9206, 0x1120, 0xa88c, 0xaa34, 0x9206, 0x0988, 0x6024,
 	0xd0d4, 0x1148, 0xa9ac, 0xa834, 0x9102, 0x603a, 0xa9b0, 0xa838,
@@ -5944,1271 +5970,1284 @@
 	0xb83c, 0x8000, 0xb83e, 0x00be, 0x601c, 0xc0fc, 0x601e, 0x9006,
 	0xa876, 0xa892, 0xa88e, 0xa87c, 0xc0e4, 0xa87e, 0xd0cc, 0x0140,
 	0xc0cc, 0xa87e, 0x0096, 0xa878, 0x2048, 0x080c, 0x0ff9, 0x009e,
-	0x080c, 0xcbaf, 0x0804, 0xc0f4, 0xd1dc, 0x0158, 0xa87b, 0x0015,
-	0xb07b, 0x0015, 0x080c, 0xce4c, 0x0118, 0xb174, 0xc1dc, 0xb176,
+	0x080c, 0xccc6, 0x0804, 0xc1c6, 0xd1dc, 0x0158, 0xa87b, 0x0015,
+	0xb07b, 0x0015, 0x080c, 0xcf63, 0x0118, 0xb174, 0xc1dc, 0xb176,
 	0x0078, 0xd1d4, 0x0128, 0xa87b, 0x0007, 0xb07b, 0x0007, 0x0040,
-	0xa87c, 0xd0ac, 0x0128, 0xa834, 0xa938, 0x9115, 0x190c, 0xbec6,
+	0xa87c, 0xd0ac, 0x0128, 0xa834, 0xa938, 0x9115, 0x190c, 0xbf96,
 	0xa87c, 0xb07e, 0xa890, 0xb092, 0xa88c, 0xb08e, 0xa860, 0x20e8,
 	0xa85c, 0x9080, 0x0019, 0x20a0, 0x20a9, 0x0020, 0x8a06, 0x8006,
 	0x8007, 0x9094, 0x003f, 0x22e0, 0x9084, 0xffc0, 0x9080, 0x0019,
-	0x2098, 0x4003, 0x00ae, 0x000e, 0xa882, 0x000e, 0xa87e, 0x080c,
-	0xcf29, 0x001e, 0xa874, 0x0006, 0x2148, 0x080c, 0x0ff9, 0x001e,
-	0x0804, 0xc0e6, 0x0016, 0x00a6, 0x2150, 0xb174, 0x9184, 0x00ff,
-	0x90b6, 0x0002, 0x01e0, 0x9086, 0x0028, 0x1128, 0xa87b, 0x001c,
-	0xb07b, 0x001c, 0x00e0, 0xd1dc, 0x0158, 0xa87b, 0x0015, 0xb07b,
-	0x0015, 0x080c, 0xce4c, 0x0118, 0xb174, 0xc1dc, 0xb176, 0x0078,
-	0xd1d4, 0x0128, 0xa87b, 0x0007, 0xb07b, 0x0007, 0x0040, 0xa87c,
-	0xd0ac, 0x0128, 0xa834, 0xa938, 0x9115, 0x190c, 0xbec6, 0xa890,
-	0xb092, 0xa88c, 0xb08e, 0xa87c, 0xb07e, 0x00ae, 0x080c, 0x0ff9,
-	0x009e, 0x080c, 0xcf29, 0xa974, 0x0016, 0x080c, 0xc40b, 0x001e,
-	0x0468, 0xa867, 0x0103, 0xa974, 0x9184, 0x00ff, 0x90b6, 0x0002,
-	0x01b0, 0x9086, 0x0028, 0x1118, 0xa87b, 0x001c, 0x00d0, 0xd1dc,
-	0x0148, 0xa87b, 0x0015, 0x080c, 0xce4c, 0x0118, 0xa974, 0xc1dc,
-	0xa976, 0x0078, 0xd1d4, 0x0118, 0xa87b, 0x0007, 0x0050, 0xa87b,
-	0x0000, 0xa87c, 0xd0ac, 0x0128, 0xa834, 0xa938, 0x9115, 0x190c,
-	0xbec6, 0xa974, 0x0016, 0x080c, 0x6bb5, 0x001e, 0x6010, 0x00b6,
-	0x2058, 0xb8d0, 0x0016, 0x9005, 0x190c, 0x676f, 0x001e, 0x00be,
-	0xd1e4, 0x1120, 0x080c, 0xabf0, 0x009e, 0x0005, 0x080c, 0xcb72,
-	0x0cd8, 0x6114, 0x0096, 0x2148, 0xa97c, 0x080c, 0xcfaa, 0x190c,
-	0x1a80, 0x009e, 0x0005, 0x0096, 0x6114, 0x2148, 0xa83c, 0xa940,
-	0x9105, 0x01e8, 0xa877, 0x0000, 0xa87b, 0x0000, 0xa867, 0x0103,
-	0x00b6, 0x6010, 0x2058, 0xa834, 0xa938, 0x9115, 0x11a0, 0x080c,
-	0x6bb5, 0xba3c, 0x8211, 0x0208, 0xba3e, 0xb8d0, 0x9005, 0x0110,
-	0x080c, 0x676f, 0x080c, 0xabf0, 0x00be, 0x009e, 0x0005, 0xa87c,
-	0xc0dc, 0xa87e, 0x08f8, 0xb800, 0xd0bc, 0x1120, 0xa834, 0x080c,
-	0xbec6, 0x0c28, 0xa880, 0xd0bc, 0x1dc8, 0x080c, 0xcbaf, 0x0c60,
-	0x080c, 0x95ff, 0x0010, 0x080c, 0x965a, 0x601c, 0xd084, 0x0110,
-	0x080c, 0x1a94, 0x080c, 0xc865, 0x01f0, 0x0096, 0x6114, 0x2148,
-	0x080c, 0xca7a, 0x1118, 0x080c, 0xb5c6, 0x00a0, 0xa867, 0x0103,
-	0x2009, 0x180c, 0x210c, 0xd18c, 0x1198, 0xd184, 0x1170, 0x6108,
-	0xa97a, 0x918e, 0x0029, 0x1110, 0x080c, 0xe66e, 0xa877, 0x0000,
-	0x080c, 0x6d9f, 0x009e, 0x0804, 0xac2b, 0xa87b, 0x0004, 0x0cb0,
-	0xa87b, 0x0004, 0x0c98, 0x9182, 0x0057, 0x1220, 0x9182, 0x0040,
-	0x0208, 0x000a, 0x0005, 0xc18a, 0xc18a, 0xc18a, 0xc18a, 0xc18a,
-	0xc18c, 0xc18a, 0xc18a, 0xc18a, 0xc18a, 0xc18a, 0xc18a, 0xc18a,
-	0xc18a, 0xc18a, 0xc18a, 0xc18a, 0xc18a, 0xc18a, 0xc18a, 0xc1b0,
-	0xc18a, 0xc18a, 0x080c, 0x0d7d, 0x080c, 0x56fd, 0x01f8, 0x6014,
-	0x7144, 0x918c, 0x0fff, 0x9016, 0xd1c4, 0x0118, 0x7264, 0x9294,
-	0x00ff, 0x0096, 0x904d, 0x0188, 0xa87b, 0x0000, 0xa864, 0x9086,
-	0x0139, 0x0128, 0xa867, 0x0103, 0xa976, 0xaa96, 0x0030, 0xa897,
-	0x4000, 0xa99a, 0xaa9e, 0x080c, 0x6d9f, 0x009e, 0x0804, 0xabf0,
-	0x080c, 0x56fd, 0x0dd8, 0x6014, 0x900e, 0x9016, 0x0c10, 0x9182,
-	0x0085, 0x0002, 0xc1c9, 0xc1c7, 0xc1c7, 0xc1d5, 0xc1c7, 0xc1c7,
-	0xc1c7, 0xc1c7, 0xc1c7, 0xc1c7, 0xc1c7, 0xc1c7, 0xc1c7, 0x080c,
-	0x0d7d, 0x6003, 0x0001, 0x6106, 0x0126, 0x2091, 0x8000, 0x2009,
-	0x8020, 0x080c, 0x9239, 0x012e, 0x0005, 0x0026, 0x0056, 0x00d6,
-	0x00e6, 0x2071, 0x0260, 0x7224, 0x6216, 0x7220, 0x080c, 0xc853,
-	0x01a0, 0x2268, 0x6800, 0x9086, 0x0000, 0x0178, 0x6010, 0x6d10,
-	0x952e, 0x1158, 0x00c6, 0x2d60, 0x080c, 0xc446, 0x00ce, 0x0128,
-	0x6803, 0x0002, 0x6007, 0x0086, 0x0010, 0x6007, 0x0087, 0x6003,
-	0x0001, 0x2009, 0x8020, 0x080c, 0x9239, 0x7220, 0x080c, 0xc853,
-	0x0178, 0x6810, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x0140,
-	0x6824, 0xd0ec, 0x0128, 0x00c6, 0x2d60, 0x080c, 0xcbaf, 0x00ce,
-	0x00ee, 0x00de, 0x005e, 0x002e, 0x0005, 0x9186, 0x0013, 0x1160,
-	0x6004, 0x908a, 0x0085, 0x0a0c, 0x0d7d, 0x908a, 0x0092, 0x1a0c,
-	0x0d7d, 0x9082, 0x0085, 0x00e2, 0x9186, 0x0027, 0x0120, 0x9186,
-	0x0014, 0x190c, 0x0d7d, 0x080c, 0x95ff, 0x0096, 0x6014, 0x2048,
-	0x080c, 0xc865, 0x0140, 0xa867, 0x0103, 0xa877, 0x0000, 0xa87b,
-	0x0029, 0x080c, 0x6d9f, 0x009e, 0x080c, 0xac2b, 0x0804, 0x96bd,
-	0xc24d, 0xc24f, 0xc24f, 0xc24d, 0xc24d, 0xc24d, 0xc24d, 0xc24d,
-	0xc24d, 0xc24d, 0xc24d, 0xc24d, 0xc24d, 0x080c, 0x0d7d, 0x080c,
-	0xac2b, 0x0005, 0x9186, 0x0013, 0x1130, 0x6004, 0x9082, 0x0085,
-	0x2008, 0x0804, 0xc29e, 0x9186, 0x0027, 0x1558, 0x080c, 0x95ff,
-	0x080c, 0x320f, 0x080c, 0xcf99, 0x0096, 0x6014, 0x2048, 0x080c,
-	0xc865, 0x0150, 0xa867, 0x0103, 0xa877, 0x0000, 0xa87b, 0x0029,
-	0x080c, 0x6d9f, 0x080c, 0xca54, 0x009e, 0x080c, 0xabf0, 0x0005,
-	0x9186, 0x0089, 0x0118, 0x9186, 0x008a, 0x1140, 0x080c, 0xaaab,
-	0x0128, 0x9086, 0x000c, 0x0904, 0xc2d6, 0x0000, 0x080c, 0xacaa,
-	0x0c70, 0x9186, 0x0014, 0x1d60, 0x080c, 0x95ff, 0x0096, 0x6014,
-	0x2048, 0x080c, 0xc865, 0x0d00, 0xa867, 0x0103, 0xa877, 0x0000,
-	0xa87b, 0x0006, 0xa880, 0xc0ec, 0xa882, 0x0890, 0x0002, 0xc2ae,
-	0xc2ac, 0xc2ac, 0xc2ac, 0xc2ac, 0xc2ac, 0xc2c2, 0xc2ac, 0xc2ac,
-	0xc2ac, 0xc2ac, 0xc2ac, 0xc2ac, 0x080c, 0x0d7d, 0x6034, 0x908c,
-	0xff00, 0x810f, 0x9186, 0x0039, 0x0118, 0x9186, 0x0035, 0x1118,
-	0x2001, 0x1985, 0x0010, 0x2001, 0x1986, 0x2004, 0x601a, 0x6003,
-	0x000c, 0x0005, 0x6034, 0x908c, 0xff00, 0x810f, 0x9186, 0x0039,
-	0x0118, 0x9186, 0x0035, 0x1118, 0x2001, 0x1985, 0x0010, 0x2001,
-	0x1986, 0x2004, 0x601a, 0x6003, 0x000e, 0x0005, 0x9182, 0x0092,
-	0x1220, 0x9182, 0x0085, 0x0208, 0x0012, 0x0804, 0xacaa, 0xc2ec,
-	0xc2ec, 0xc2ec, 0xc2ec, 0xc2ee, 0xc33b, 0xc2ec, 0xc2ec, 0xc2ec,
-	0xc2ec, 0xc2ec, 0xc2ec, 0xc2ec, 0x080c, 0x0d7d, 0x0096, 0x6010,
-	0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x0168, 0x6034, 0x908c,
-	0xff00, 0x810f, 0x9186, 0x0039, 0x0118, 0x9186, 0x0035, 0x1118,
-	0x009e, 0x0804, 0xc34f, 0x080c, 0xc865, 0x1118, 0x080c, 0xca54,
-	0x0068, 0x6014, 0x2048, 0x080c, 0xcfb0, 0x1110, 0x080c, 0xca54,
-	0xa867, 0x0103, 0x080c, 0xcf64, 0x080c, 0x6d9f, 0x00d6, 0x2c68,
-	0x080c, 0xab9a, 0x01d0, 0x6003, 0x0001, 0x6007, 0x001e, 0x600b,
-	0xffff, 0x2009, 0x026e, 0x210c, 0x613a, 0x2009, 0x026f, 0x210c,
-	0x613e, 0x6910, 0x6112, 0x080c, 0xccfe, 0x695c, 0x615e, 0x6023,
-	0x0001, 0x2009, 0x8020, 0x080c, 0x9239, 0x2d60, 0x00de, 0x080c,
-	0xabf0, 0x009e, 0x0005, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be,
-	0xd0bc, 0x05a0, 0x6034, 0x908c, 0xff00, 0x810f, 0x9186, 0x0035,
-	0x0130, 0x9186, 0x001e, 0x0118, 0x9186, 0x0039, 0x1538, 0x00d6,
-	0x2c68, 0x080c, 0xcefc, 0x11f0, 0x080c, 0xab9a, 0x01d8, 0x6106,
-	0x6003, 0x0001, 0x6023, 0x0001, 0x6910, 0x6112, 0x692c, 0x612e,
-	0x6930, 0x6132, 0x6934, 0x918c, 0x00ff, 0x6136, 0x6938, 0x613a,
-	0x693c, 0x613e, 0x695c, 0x615e, 0x080c, 0xccfe, 0x2009, 0x8020,
-	0x080c, 0x9239, 0x2d60, 0x00de, 0x0804, 0xabf0, 0x0096, 0x6014,
-	0x2048, 0x080c, 0xc865, 0x01c8, 0xa867, 0x0103, 0xa880, 0xd0b4,
-	0x0128, 0xc0ec, 0xa882, 0xa87b, 0x0006, 0x0048, 0xd0bc, 0x0118,
-	0xa87b, 0x0002, 0x0020, 0xa87b, 0x0005, 0x080c, 0xcb6e, 0xa877,
-	0x0000, 0x080c, 0x6d9f, 0x080c, 0xca54, 0x009e, 0x0804, 0xabf0,
-	0x0016, 0x0096, 0x6014, 0x2048, 0x080c, 0xc865, 0x0140, 0xa867,
-	0x0103, 0xa87b, 0x0028, 0xa877, 0x0000, 0x080c, 0x6d9f, 0x009e,
-	0x001e, 0x9186, 0x0013, 0x0158, 0x9186, 0x0014, 0x0130, 0x9186,
-	0x0027, 0x0118, 0x080c, 0xacaa, 0x0020, 0x080c, 0x95ff, 0x080c,
-	0xac2b, 0x0005, 0x0056, 0x0066, 0x0096, 0x00a6, 0x2029, 0x0001,
-	0x9182, 0x0101, 0x1208, 0x0010, 0x2009, 0x0100, 0x2130, 0x8304,
-	0x9098, 0x0018, 0x2009, 0x0020, 0x2011, 0x0029, 0x080c, 0xc41b,
-	0x96b2, 0x0020, 0xb004, 0x904d, 0x0110, 0x080c, 0x0ff9, 0x080c,
-	0x1047, 0x0520, 0x8528, 0xa867, 0x0110, 0xa86b, 0x0000, 0x2920,
-	0xb406, 0x968a, 0x003d, 0x1228, 0x2608, 0x2011, 0x001b, 0x0499,
-	0x00a8, 0x96b2, 0x003c, 0x2009, 0x003c, 0x2950, 0x2011, 0x001b,
-	0x0451, 0x0c28, 0x2001, 0x0205, 0x2003, 0x0000, 0x00ae, 0x852f,
-	0x95ad, 0x0003, 0xb566, 0x95ac, 0x0000, 0x0048, 0x2001, 0x0205,
-	0x2003, 0x0000, 0x00ae, 0x852f, 0x95ad, 0x0003, 0xb566, 0x009e,
-	0x006e, 0x005e, 0x0005, 0x00a6, 0x89ff, 0x0158, 0xa804, 0x9055,
-	0x0130, 0xa807, 0x0000, 0x080c, 0x6d9f, 0x2a48, 0x0cb8, 0x080c,
-	0x6d9f, 0x00ae, 0x0005, 0x00f6, 0x2079, 0x0200, 0x7814, 0x9085,
-	0x0080, 0x7816, 0xd184, 0x0108, 0x8108, 0x810c, 0x20a9, 0x0001,
-	0xa860, 0x20e8, 0xa85c, 0x9200, 0x20a0, 0x20e1, 0x0000, 0x2300,
-	0x9e00, 0x2098, 0x4003, 0x8318, 0x9386, 0x0020, 0x1148, 0x2018,
-	0x2300, 0x9e00, 0x2098, 0x7814, 0x8000, 0x9085, 0x0080, 0x7816,
-	0x8109, 0x1d80, 0x7817, 0x0000, 0x00fe, 0x0005, 0x0066, 0x0126,
-	0x2091, 0x8000, 0x2031, 0x0001, 0x6020, 0x9084, 0x000f, 0x0083,
-	0x012e, 0x006e, 0x0005, 0x0126, 0x2091, 0x8000, 0x0066, 0x2031,
-	0x0000, 0x6020, 0x9084, 0x000f, 0x001b, 0x006e, 0x012e, 0x0005,
-	0xc498, 0xc498, 0xc493, 0xc4bc, 0xc470, 0xc493, 0xc472, 0xc493,
-	0xc470, 0x90ff, 0xc493, 0xc493, 0xc493, 0xc470, 0xc470, 0xc470,
-	0x080c, 0x0d7d, 0x6010, 0x9080, 0x0000, 0x2004, 0xd0bc, 0x190c,
-	0xc4bc, 0x0036, 0x6014, 0x0096, 0x2048, 0xa880, 0x009e, 0xd0cc,
-	0x0118, 0x2019, 0x000c, 0x0038, 0xd094, 0x0118, 0x2019, 0x000d,
-	0x0010, 0x2019, 0x0010, 0x080c, 0xde67, 0x6023, 0x0006, 0x6003,
-	0x0007, 0x003e, 0x0005, 0x9006, 0x0005, 0x9085, 0x0001, 0x0005,
-	0x0096, 0x86ff, 0x11e8, 0x6014, 0x2048, 0x080c, 0xc865, 0x01d0,
-	0x6043, 0xffff, 0xa864, 0x9086, 0x0139, 0x1128, 0xa87b, 0x0005,
-	0xa883, 0x0000, 0x0028, 0x900e, 0x2001, 0x0005, 0x080c, 0x6fd3,
-	0x080c, 0xcb6e, 0x080c, 0x6d93, 0x080c, 0xac2b, 0x9085, 0x0001,
-	0x009e, 0x0005, 0x9006, 0x0ce0, 0x080c, 0xa899, 0x080c, 0xcfbe,
-	0x6000, 0x908a, 0x0016, 0x1a0c, 0x0d7d, 0x002b, 0x0106, 0x080c,
-	0xa8b5, 0x010e, 0x0005, 0xc4db, 0xc509, 0xc4dd, 0xc530, 0xc504,
-	0xc4db, 0xc493, 0xc498, 0xc498, 0xc493, 0xc493, 0xc493, 0xc493,
-	0xc493, 0xc493, 0xc493, 0x080c, 0x0d7d, 0x86ff, 0x1510, 0x6020,
-	0x9086, 0x0006, 0x01f0, 0x0096, 0x6014, 0x2048, 0x080c, 0xc865,
-	0x0158, 0xa87c, 0xd0cc, 0x0130, 0x0096, 0xa878, 0x2048, 0x080c,
-	0x0ff9, 0x009e, 0x080c, 0xcb6e, 0x009e, 0x080c, 0xcf3e, 0x6007,
-	0x0085, 0x6003, 0x000b, 0x6023, 0x0002, 0x2009, 0x8020, 0x080c,
-	0x921b, 0x9085, 0x0001, 0x0005, 0x0066, 0x080c, 0x1a94, 0x006e,
-	0x08a0, 0x00e6, 0x2071, 0x19e6, 0x7030, 0x9c06, 0x1120, 0x080c,
-	0xa0b3, 0x00ee, 0x0850, 0x6020, 0x9084, 0x000f, 0x9086, 0x0006,
-	0x1150, 0x0086, 0x0096, 0x2049, 0x0001, 0x2c40, 0x080c, 0xa207,
-	0x009e, 0x008e, 0x0040, 0x0066, 0x080c, 0x9faf, 0x190c, 0x0d7d,
-	0x080c, 0x9fbd, 0x006e, 0x00ee, 0x1904, 0xc4dd, 0x0804, 0xc493,
-	0x0036, 0x00e6, 0x2071, 0x19e6, 0x704c, 0x9c06, 0x1138, 0x901e,
-	0x080c, 0xa133, 0x00ee, 0x003e, 0x0804, 0xc4dd, 0x080c, 0xa33e,
-	0x00ee, 0x003e, 0x1904, 0xc4dd, 0x0804, 0xc493, 0x00c6, 0x0066,
-	0x6020, 0x9084, 0x000f, 0x001b, 0x006e, 0x00ce, 0x0005, 0xc566,
-	0xc635, 0xc79f, 0xc56e, 0xac2b, 0xc566, 0xde59, 0xcfa6, 0xc635,
-	0x90c6, 0xc82b, 0xc55f, 0xc55f, 0xc55f, 0xc55f, 0xc55f, 0x080c,
-	0x0d7d, 0x080c, 0xca7a, 0x1110, 0x080c, 0xb5c6, 0x0005, 0x080c,
-	0x95ff, 0x0804, 0xabf0, 0x601b, 0x0001, 0x0005, 0x080c, 0xc865,
-	0x0130, 0x6014, 0x0096, 0x2048, 0x2c00, 0xa896, 0x009e, 0x080c,
-	0xa899, 0x080c, 0xcfbe, 0x6000, 0x908a, 0x0016, 0x1a0c, 0x0d7d,
-	0x0013, 0x0804, 0xa8b5, 0xc593, 0xc595, 0xc5bf, 0xc5d3, 0xc600,
-	0xc593, 0xc566, 0xc566, 0xc566, 0xc5da, 0xc5da, 0xc593, 0xc593,
-	0xc593, 0xc593, 0xc5e4, 0x080c, 0x0d7d, 0x00e6, 0x6014, 0x0096,
-	0x2048, 0xa880, 0xc0b5, 0xa882, 0x009e, 0x2071, 0x19e6, 0x7030,
-	0x9c06, 0x01d0, 0x0066, 0x080c, 0x9faf, 0x190c, 0x0d7d, 0x080c,
-	0x9fbd, 0x006e, 0x080c, 0xcf3e, 0x6007, 0x0085, 0x6003, 0x000b,
-	0x6023, 0x0002, 0x2001, 0x1986, 0x2004, 0x601a, 0x2009, 0x8020,
-	0x080c, 0x921b, 0x00ee, 0x0005, 0x601b, 0x0001, 0x0cd8, 0x0096,
-	0x6014, 0x2048, 0xa880, 0xc0b5, 0xa882, 0x009e, 0x080c, 0xcf3e,
-	0x6007, 0x0085, 0x6003, 0x000b, 0x6023, 0x0002, 0x2009, 0x8020,
-	0x080c, 0x921b, 0x0005, 0x080c, 0xa899, 0x080c, 0xaa2d, 0x080c,
-	0xa8b5, 0x0c28, 0x0096, 0x601b, 0x0001, 0x6014, 0x2048, 0xa880,
-	0xc0b5, 0xa882, 0x009e, 0x0005, 0x080c, 0x56fd, 0x01b8, 0x6014,
-	0x0096, 0x904d, 0x0190, 0xa864, 0xa867, 0x0103, 0xa87b, 0x0006,
-	0x9086, 0x0139, 0x1150, 0xa867, 0x0139, 0xa87b, 0x0030, 0xa897,
-	0x4005, 0xa89b, 0x0004, 0x080c, 0x6d9f, 0x009e, 0x0804, 0xabf0,
-	0x6014, 0x0096, 0x904d, 0x0560, 0xa97c, 0xd1e4, 0x1158, 0x611c,
-	0xd1fc, 0x0530, 0x6110, 0x00b6, 0x2158, 0xb93c, 0x8109, 0x0208,
-	0xb93e, 0x00be, 0x080c, 0xa8b5, 0x2001, 0x180f, 0x2004, 0xd0c4,
-	0x0110, 0x009e, 0x0005, 0xa884, 0x009e, 0x8003, 0x800b, 0x810b,
-	0x9108, 0x611a, 0x2001, 0x0037, 0x2c08, 0x080c, 0x1693, 0x6000,
-	0x9086, 0x0004, 0x1120, 0x2009, 0x0048, 0x080c, 0xac8d, 0x0005,
-	0x009e, 0x080c, 0x1a94, 0x0804, 0xc5bf, 0x6000, 0x908a, 0x0016,
-	0x1a0c, 0x0d7d, 0x000b, 0x0005, 0xc64c, 0xc56b, 0xc64e, 0xc64c,
-	0xc64e, 0xc64e, 0xc567, 0xc64c, 0xc561, 0xc561, 0xc64c, 0xc64c,
-	0xc64c, 0xc64c, 0xc64c, 0xc64c, 0x080c, 0x0d7d, 0x6010, 0x00b6,
-	0x2058, 0xb804, 0x9084, 0x00ff, 0x00be, 0x908a, 0x000c, 0x1a0c,
-	0x0d7d, 0x00b6, 0x0013, 0x00be, 0x0005, 0xc669, 0xc736, 0xc66b,
-	0xc6ab, 0xc66b, 0xc6ab, 0xc66b, 0xc679, 0xc669, 0xc6ab, 0xc669,
-	0xc69a, 0x080c, 0x0d7d, 0x6004, 0x908e, 0x0016, 0x05c0, 0x908e,
-	0x0004, 0x05a8, 0x908e, 0x0002, 0x0590, 0x908e, 0x0052, 0x0904,
-	0xc732, 0x6004, 0x080c, 0xca7a, 0x0904, 0xc74f, 0x908e, 0x0004,
-	0x1110, 0x080c, 0x323e, 0x908e, 0x0021, 0x0904, 0xc753, 0x908e,
-	0x0022, 0x0904, 0xc79a, 0x908e, 0x003d, 0x0904, 0xc753, 0x908e,
-	0x0039, 0x0904, 0xc757, 0x908e, 0x0035, 0x0904, 0xc757, 0x908e,
-	0x001e, 0x0178, 0x908e, 0x0001, 0x1140, 0x6010, 0x2058, 0xb804,
-	0x9084, 0x00ff, 0x9086, 0x0006, 0x0110, 0x080c, 0x320f, 0x080c,
-	0xb5c6, 0x0804, 0xac2b, 0x00c6, 0x00d6, 0x6104, 0x9186, 0x0016,
-	0x0904, 0xc723, 0x9186, 0x0002, 0x1904, 0xc6f8, 0x2001, 0x1837,
-	0x2004, 0xd08c, 0x11c8, 0x080c, 0x74ec, 0x11b0, 0x080c, 0xcf84,
-	0x0138, 0x080c, 0x750f, 0x1120, 0x080c, 0x73f7, 0x0804, 0xc783,
-	0x2001, 0x197c, 0x2003, 0x0001, 0x2001, 0x1800, 0x2003, 0x0001,
-	0x080c, 0x741d, 0x0804, 0xc783, 0x6010, 0x2058, 0x2001, 0x1837,
-	0x2004, 0xd0ac, 0x1904, 0xc783, 0xb8a0, 0x9084, 0xff80, 0x1904,
-	0xc783, 0xb840, 0x9084, 0x00ff, 0x9005, 0x0190, 0x8001, 0xb842,
-	0x6017, 0x0000, 0x6023, 0x0007, 0x601b, 0x0398, 0x604b, 0x0000,
-	0x080c, 0xab9a, 0x0128, 0x2b00, 0x6012, 0x6023, 0x0001, 0x0458,
-	0x00de, 0x00ce, 0x6004, 0x908e, 0x0002, 0x11a0, 0x6010, 0x2058,
-	0xb8a0, 0x9086, 0x007e, 0x1170, 0x2009, 0x1837, 0x2104, 0xc085,
-	0x200a, 0x00e6, 0x2071, 0x1800, 0x080c, 0x5fd7, 0x00ee, 0x080c,
-	0xb5c6, 0x0030, 0x080c, 0xb5c6, 0x080c, 0x320f, 0x080c, 0xcf99,
-	0x00e6, 0x0126, 0x2091, 0x8000, 0x080c, 0x323e, 0x012e, 0x00ee,
-	0x080c, 0xac2b, 0x0005, 0x2001, 0x0002, 0x080c, 0x6594, 0x6003,
-	0x0001, 0x6007, 0x0002, 0x080c, 0x9240, 0x080c, 0x96bd, 0x00de,
-	0x00ce, 0x0c80, 0x080c, 0x323e, 0x0804, 0xc6a7, 0x00c6, 0x00d6,
-	0x6104, 0x9186, 0x0016, 0x0d38, 0x6010, 0x2058, 0xb840, 0x9084,
-	0x00ff, 0x9005, 0x0904, 0xc6f8, 0x8001, 0xb842, 0x6003, 0x0001,
-	0x080c, 0x9240, 0x080c, 0x96bd, 0x00de, 0x00ce, 0x0898, 0x080c,
-	0xb5c6, 0x0804, 0xc6a9, 0x080c, 0xb602, 0x0804, 0xc6a9, 0x00d6,
-	0x2c68, 0x6104, 0x080c, 0xcefc, 0x00de, 0x0118, 0x080c, 0xabf0,
-	0x0408, 0x6004, 0x8007, 0x6134, 0x918c, 0x00ff, 0x9105, 0x6036,
-	0x6007, 0x0085, 0x6003, 0x000b, 0x6023, 0x0002, 0x603c, 0x600a,
-	0x2001, 0x1986, 0x2004, 0x601a, 0x602c, 0x2c08, 0x2060, 0x6024,
-	0xd0b4, 0x0108, 0xc085, 0xc0b5, 0x6026, 0x2160, 0x2009, 0x8020,
-	0x080c, 0x9239, 0x0005, 0x00de, 0x00ce, 0x080c, 0xb5c6, 0x080c,
-	0x320f, 0x00e6, 0x0126, 0x2091, 0x8000, 0x080c, 0x323e, 0x6017,
-	0x0000, 0x6023, 0x0007, 0x601b, 0x0398, 0x604b, 0x0000, 0x012e,
-	0x00ee, 0x0005, 0x080c, 0xb02b, 0x1904, 0xc74f, 0x0005, 0x6000,
-	0x908a, 0x0016, 0x1a0c, 0x0d7d, 0x0096, 0x00d6, 0x001b, 0x00de,
-	0x009e, 0x0005, 0xc7ba, 0xc7ba, 0xc7ba, 0xc7ba, 0xc7ba, 0xc7ba,
-	0xc7ba, 0xc7ba, 0xc7ba, 0xc566, 0xc7ba, 0xc56b, 0xc7bc, 0xc56b,
-	0xc7d6, 0xc7ba, 0x080c, 0x0d7d, 0x6004, 0x9086, 0x008b, 0x01b0,
-	0x6034, 0x908c, 0xff00, 0x810f, 0x9186, 0x0035, 0x1130, 0x602c,
-	0x9080, 0x0009, 0x200c, 0xc185, 0x2102, 0x6007, 0x008b, 0x6003,
-	0x000d, 0x2009, 0x8020, 0x080c, 0x9239, 0x0005, 0x080c, 0xcf78,
-	0x0118, 0x080c, 0xcf8b, 0x0010, 0x080c, 0xcf99, 0x080c, 0xca54,
-	0x080c, 0xc865, 0x0570, 0x080c, 0x320f, 0x080c, 0xc865, 0x0168,
-	0x6014, 0x2048, 0xa867, 0x0103, 0xa87b, 0x0006, 0xa877, 0x0000,
-	0xa880, 0xc0ed, 0xa882, 0x080c, 0x6d9f, 0x2c68, 0x080c, 0xab9a,
-	0x0150, 0x6810, 0x6012, 0x080c, 0xccfe, 0x00c6, 0x2d60, 0x080c,
-	0xac2b, 0x00ce, 0x0008, 0x2d60, 0x6017, 0x0000, 0x6023, 0x0001,
-	0x6007, 0x0001, 0x6003, 0x0001, 0x080c, 0x9240, 0x080c, 0x96bd,
-	0x00c8, 0x080c, 0xcf78, 0x0138, 0x6034, 0x9086, 0x4000, 0x1118,
-	0x080c, 0x320f, 0x08d0, 0x6034, 0x908c, 0xff00, 0x810f, 0x9186,
-	0x0039, 0x0118, 0x9186, 0x0035, 0x1118, 0x080c, 0x320f, 0x0868,
-	0x080c, 0xac2b, 0x0005, 0x6000, 0x908a, 0x0016, 0x1a0c, 0x0d7d,
-	0x0002, 0xc841, 0xc841, 0xc843, 0xc843, 0xc843, 0xc841, 0xc841,
-	0xac2b, 0xc841, 0xc841, 0xc841, 0xc841, 0xc841, 0xc841, 0xc841,
-	0xc841, 0x080c, 0x0d7d, 0x080c, 0xa899, 0x080c, 0xaa2d, 0x080c,
-	0xa8b5, 0x6114, 0x0096, 0x2148, 0xa87b, 0x0006, 0x080c, 0x6d9f,
-	0x009e, 0x0804, 0xabf0, 0x9284, 0x0003, 0x1158, 0x9282, 0x1ddc,
-	0x0240, 0x2001, 0x181a, 0x2004, 0x9202, 0x1218, 0x9085, 0x0001,
-	0x0005, 0x9006, 0x0ce8, 0x0096, 0x0028, 0x0096, 0x0006, 0x6014,
-	0x2048, 0x000e, 0x0006, 0x9984, 0xf000, 0x9086, 0xf000, 0x0110,
-	0x080c, 0x10f2, 0x000e, 0x009e, 0x0005, 0x00e6, 0x00c6, 0x0036,
-	0x0006, 0x0126, 0x2091, 0x8000, 0x2061, 0x1ddc, 0x2071, 0x1800,
-	0x7354, 0x7074, 0x9302, 0x1640, 0x6020, 0x9206, 0x11f8, 0x080c,
-	0xcf84, 0x0180, 0x9286, 0x0001, 0x1168, 0x6004, 0x9086, 0x0004,
-	0x1148, 0x080c, 0x320f, 0x080c, 0xcf99, 0x00c6, 0x080c, 0xac2b,
-	0x00ce, 0x0060, 0x080c, 0xcc70, 0x0148, 0x080c, 0xca7a, 0x1110,
-	0x080c, 0xb5c6, 0x00c6, 0x080c, 0xabf0, 0x00ce, 0x9ce0, 0x001c,
-	0x7068, 0x9c02, 0x1208, 0x08a0, 0x012e, 0x000e, 0x003e, 0x00ce,
-	0x00ee, 0x0005, 0x00e6, 0x00c6, 0x0016, 0x9188, 0x1000, 0x210c,
-	0x81ff, 0x0128, 0x2061, 0x1b31, 0x6112, 0x080c, 0x320f, 0x9006,
-	0x0010, 0x9085, 0x0001, 0x001e, 0x00ce, 0x00ee, 0x0005, 0x00c6,
-	0x0126, 0x2091, 0x8000, 0x080c, 0xab9a, 0x01b0, 0x665e, 0x2b00,
-	0x6012, 0x080c, 0x56fd, 0x0118, 0x080c, 0xc996, 0x0168, 0x080c,
-	0xccfe, 0x6023, 0x0003, 0x2009, 0x004b, 0x080c, 0xac8d, 0x9085,
+	0x2098, 0x4003, 0x00ae, 0x000e, 0xa882, 0x000e, 0xc0cc, 0xa87e,
+	0x080c, 0xd040, 0x001e, 0xa874, 0x0006, 0x2148, 0x080c, 0x0ff9,
+	0x001e, 0x0804, 0xc1b7, 0x0016, 0x00a6, 0x2150, 0xb174, 0x9184,
+	0x00ff, 0x90b6, 0x0002, 0x01e0, 0x9086, 0x0028, 0x1128, 0xa87b,
+	0x001c, 0xb07b, 0x001c, 0x00e0, 0xd1dc, 0x0158, 0xa87b, 0x0015,
+	0xb07b, 0x0015, 0x080c, 0xcf63, 0x0118, 0xb174, 0xc1dc, 0xb176,
+	0x0078, 0xd1d4, 0x0128, 0xa87b, 0x0007, 0xb07b, 0x0007, 0x0040,
+	0xa87c, 0xd0ac, 0x0128, 0xa834, 0xa938, 0x9115, 0x190c, 0xbf96,
+	0xa890, 0xb092, 0xa88c, 0xb08e, 0xa87c, 0xb07e, 0x00ae, 0x080c,
+	0x0ff9, 0x009e, 0x080c, 0xd040, 0xa974, 0x0016, 0x080c, 0xc4e8,
+	0x001e, 0x0468, 0xa867, 0x0103, 0xa974, 0x9184, 0x00ff, 0x90b6,
+	0x0002, 0x01b0, 0x9086, 0x0028, 0x1118, 0xa87b, 0x001c, 0x00d0,
+	0xd1dc, 0x0148, 0xa87b, 0x0015, 0x080c, 0xcf63, 0x0118, 0xa974,
+	0xc1dc, 0xa976, 0x0078, 0xd1d4, 0x0118, 0xa87b, 0x0007, 0x0050,
+	0xa87b, 0x0000, 0xa87c, 0xd0ac, 0x0128, 0xa834, 0xa938, 0x9115,
+	0x190c, 0xbf96, 0xa974, 0x0016, 0x080c, 0x6c04, 0x001e, 0x6010,
+	0x00b6, 0x2058, 0xba3c, 0xb8d0, 0x0016, 0x9005, 0x190c, 0x67be,
+	0x001e, 0x00be, 0xd1e4, 0x1120, 0x080c, 0xacb0, 0x009e, 0x0005,
+	0x080c, 0xcc89, 0x0cd8, 0x6114, 0x0096, 0x2148, 0xa97c, 0x080c,
+	0xd0c1, 0x190c, 0x1ab1, 0x009e, 0x0005, 0x0096, 0x6114, 0x2148,
+	0xa83c, 0xa940, 0x9105, 0x01e8, 0xa877, 0x0000, 0xa87b, 0x0000,
+	0xa867, 0x0103, 0x00b6, 0x6010, 0x2058, 0xa834, 0xa938, 0x9115,
+	0x11a0, 0x080c, 0x6c04, 0xba3c, 0x8211, 0x0208, 0xba3e, 0xb8d0,
+	0x9005, 0x0110, 0x080c, 0x67be, 0x080c, 0xacb0, 0x00be, 0x009e,
+	0x0005, 0xa87c, 0xc0dc, 0xa87e, 0x08f8, 0xb800, 0xd0bc, 0x1120,
+	0xa834, 0x080c, 0xbf96, 0x0c28, 0xa880, 0xd0bc, 0x1dc8, 0x080c,
+	0xccc6, 0x0c60, 0x080c, 0x967a, 0x0010, 0x080c, 0x96d5, 0x601c,
+	0xd084, 0x0110, 0x080c, 0x1ac5, 0x080c, 0xc97a, 0x01f0, 0x0096,
+	0x6114, 0x2148, 0x080c, 0xcb91, 0x1118, 0x080c, 0xb693, 0x00a0,
+	0xa867, 0x0103, 0x2009, 0x180c, 0x210c, 0xd18c, 0x1198, 0xd184,
+	0x1170, 0x6108, 0xa97a, 0x918e, 0x0029, 0x1110, 0x080c, 0xe79d,
+	0xa877, 0x0000, 0x080c, 0x6dee, 0x009e, 0x0804, 0xaceb, 0xa87b,
+	0x0004, 0x0cb0, 0xa87b, 0x0004, 0x0c98, 0x9182, 0x0057, 0x1220,
+	0x9182, 0x0040, 0x0208, 0x000a, 0x0005, 0xc25c, 0xc25c, 0xc25c,
+	0xc25c, 0xc25c, 0xc25e, 0xc25c, 0xc25c, 0xc25c, 0xc25c, 0xc25c,
+	0xc25c, 0xc25c, 0xc25c, 0xc25c, 0xc25c, 0xc25c, 0xc25c, 0xc25c,
+	0xc25c, 0xc282, 0xc25c, 0xc25c, 0x080c, 0x0d7d, 0x080c, 0x5746,
+	0x01f8, 0x6014, 0x7144, 0x918c, 0x0fff, 0x9016, 0xd1c4, 0x0118,
+	0x7264, 0x9294, 0x00ff, 0x0096, 0x904d, 0x0188, 0xa87b, 0x0000,
+	0xa864, 0x9086, 0x0139, 0x0128, 0xa867, 0x0103, 0xa976, 0xaa96,
+	0x0030, 0xa897, 0x4000, 0xa99a, 0xaa9e, 0x080c, 0x6dee, 0x009e,
+	0x0804, 0xacb0, 0x080c, 0x5746, 0x0dd8, 0x6014, 0x900e, 0x9016,
+	0x0c10, 0x9182, 0x0085, 0x0002, 0xc29b, 0xc299, 0xc299, 0xc2a7,
+	0xc299, 0xc299, 0xc299, 0xc299, 0xc299, 0xc299, 0xc299, 0xc299,
+	0xc299, 0x080c, 0x0d7d, 0x6003, 0x0001, 0x6106, 0x0126, 0x2091,
+	0x8000, 0x2009, 0x8020, 0x080c, 0x92b0, 0x012e, 0x0005, 0x0026,
+	0x0056, 0x00d6, 0x00e6, 0x2071, 0x0260, 0x7224, 0x6216, 0x7220,
+	0x080c, 0xc968, 0x01f8, 0x2268, 0x6800, 0x9086, 0x0000, 0x01d0,
+	0x6010, 0x6d10, 0x952e, 0x11b0, 0x00c6, 0x2d60, 0x00d6, 0x080c,
+	0xc559, 0x00de, 0x00ce, 0x0158, 0x702c, 0xd084, 0x1118, 0x080c,
+	0xc523, 0x0010, 0x6803, 0x0002, 0x6007, 0x0086, 0x0028, 0x080c,
+	0xc545, 0x0d90, 0x6007, 0x0087, 0x6003, 0x0001, 0x2009, 0x8020,
+	0x080c, 0x92b0, 0x7220, 0x080c, 0xc968, 0x0178, 0x6810, 0x00b6,
+	0x2058, 0xb800, 0x00be, 0xd0bc, 0x0140, 0x6824, 0xd0ec, 0x0128,
+	0x00c6, 0x2d60, 0x080c, 0xccc6, 0x00ce, 0x00ee, 0x00de, 0x005e,
+	0x002e, 0x0005, 0x9186, 0x0013, 0x1160, 0x6004, 0x908a, 0x0085,
+	0x0a0c, 0x0d7d, 0x908a, 0x0092, 0x1a0c, 0x0d7d, 0x9082, 0x0085,
+	0x00e2, 0x9186, 0x0027, 0x0120, 0x9186, 0x0014, 0x190c, 0x0d7d,
+	0x080c, 0x967a, 0x0096, 0x6014, 0x2048, 0x080c, 0xc97a, 0x0140,
+	0xa867, 0x0103, 0xa877, 0x0000, 0xa87b, 0x0029, 0x080c, 0x6dee,
+	0x009e, 0x080c, 0xaceb, 0x0804, 0x9738, 0xc32a, 0xc32c, 0xc32c,
+	0xc32a, 0xc32a, 0xc32a, 0xc32a, 0xc32a, 0xc32a, 0xc32a, 0xc32a,
+	0xc32a, 0xc32a, 0x080c, 0x0d7d, 0x080c, 0xaceb, 0x0005, 0x9186,
+	0x0013, 0x1130, 0x6004, 0x9082, 0x0085, 0x2008, 0x0804, 0xc37b,
+	0x9186, 0x0027, 0x1558, 0x080c, 0x967a, 0x080c, 0x3240, 0x080c,
+	0xd0b0, 0x0096, 0x6014, 0x2048, 0x080c, 0xc97a, 0x0150, 0xa867,
+	0x0103, 0xa877, 0x0000, 0xa87b, 0x0029, 0x080c, 0x6dee, 0x080c,
+	0xcb6b, 0x009e, 0x080c, 0xacb0, 0x0005, 0x9186, 0x0089, 0x0118,
+	0x9186, 0x008a, 0x1140, 0x080c, 0xab33, 0x0128, 0x9086, 0x000c,
+	0x0904, 0xc3b3, 0x0000, 0x080c, 0xad6a, 0x0c70, 0x9186, 0x0014,
+	0x1d60, 0x080c, 0x967a, 0x0096, 0x6014, 0x2048, 0x080c, 0xc97a,
+	0x0d00, 0xa867, 0x0103, 0xa877, 0x0000, 0xa87b, 0x0006, 0xa880,
+	0xc0ec, 0xa882, 0x0890, 0x0002, 0xc38b, 0xc389, 0xc389, 0xc389,
+	0xc389, 0xc389, 0xc39f, 0xc389, 0xc389, 0xc389, 0xc389, 0xc389,
+	0xc389, 0x080c, 0x0d7d, 0x6034, 0x908c, 0xff00, 0x810f, 0x9186,
+	0x0039, 0x0118, 0x9186, 0x0035, 0x1118, 0x2001, 0x1985, 0x0010,
+	0x2001, 0x1986, 0x2004, 0x601a, 0x6003, 0x000c, 0x0005, 0x6034,
+	0x908c, 0xff00, 0x810f, 0x9186, 0x0039, 0x0118, 0x9186, 0x0035,
+	0x1118, 0x2001, 0x1985, 0x0010, 0x2001, 0x1986, 0x2004, 0x601a,
+	0x6003, 0x000e, 0x0005, 0x9182, 0x0092, 0x1220, 0x9182, 0x0085,
+	0x0208, 0x0012, 0x0804, 0xad6a, 0xc3c9, 0xc3c9, 0xc3c9, 0xc3c9,
+	0xc3cb, 0xc418, 0xc3c9, 0xc3c9, 0xc3c9, 0xc3c9, 0xc3c9, 0xc3c9,
+	0xc3c9, 0x080c, 0x0d7d, 0x0096, 0x6010, 0x00b6, 0x2058, 0xb800,
+	0x00be, 0xd0bc, 0x0168, 0x6034, 0x908c, 0xff00, 0x810f, 0x9186,
+	0x0039, 0x0118, 0x9186, 0x0035, 0x1118, 0x009e, 0x0804, 0xc42c,
+	0x080c, 0xc97a, 0x1118, 0x080c, 0xcb6b, 0x0068, 0x6014, 0x2048,
+	0x080c, 0xd0c7, 0x1110, 0x080c, 0xcb6b, 0xa867, 0x0103, 0x080c,
+	0xd07b, 0x080c, 0x6dee, 0x00d6, 0x2c68, 0x080c, 0xac5a, 0x01d0,
+	0x6003, 0x0001, 0x6007, 0x001e, 0x600b, 0xffff, 0x2009, 0x026e,
+	0x210c, 0x613a, 0x2009, 0x026f, 0x210c, 0x613e, 0x6910, 0x6112,
+	0x080c, 0xce15, 0x695c, 0x615e, 0x6023, 0x0001, 0x2009, 0x8020,
+	0x080c, 0x92b0, 0x2d60, 0x00de, 0x080c, 0xacb0, 0x009e, 0x0005,
+	0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x05a0, 0x6034,
+	0x908c, 0xff00, 0x810f, 0x9186, 0x0035, 0x0130, 0x9186, 0x001e,
+	0x0118, 0x9186, 0x0039, 0x1538, 0x00d6, 0x2c68, 0x080c, 0xd013,
+	0x11f0, 0x080c, 0xac5a, 0x01d8, 0x6106, 0x6003, 0x0001, 0x6023,
+	0x0001, 0x6910, 0x6112, 0x692c, 0x612e, 0x6930, 0x6132, 0x6934,
+	0x918c, 0x00ff, 0x6136, 0x6938, 0x613a, 0x693c, 0x613e, 0x695c,
+	0x615e, 0x080c, 0xce15, 0x2009, 0x8020, 0x080c, 0x92b0, 0x2d60,
+	0x00de, 0x0804, 0xacb0, 0x0096, 0x6014, 0x2048, 0x080c, 0xc97a,
+	0x01c8, 0xa867, 0x0103, 0xa880, 0xd0b4, 0x0128, 0xc0ec, 0xa882,
+	0xa87b, 0x0006, 0x0048, 0xd0bc, 0x0118, 0xa87b, 0x0002, 0x0020,
+	0xa87b, 0x0005, 0x080c, 0xcc85, 0xa877, 0x0000, 0x080c, 0x6dee,
+	0x080c, 0xcb6b, 0x009e, 0x0804, 0xacb0, 0x0016, 0x0096, 0x6014,
+	0x2048, 0x080c, 0xc97a, 0x0140, 0xa867, 0x0103, 0xa87b, 0x0028,
+	0xa877, 0x0000, 0x080c, 0x6dee, 0x009e, 0x001e, 0x9186, 0x0013,
+	0x0158, 0x9186, 0x0014, 0x0130, 0x9186, 0x0027, 0x0118, 0x080c,
+	0xad6a, 0x0020, 0x080c, 0x967a, 0x080c, 0xaceb, 0x0005, 0x0056,
+	0x0066, 0x0096, 0x00a6, 0x2029, 0x0001, 0x9182, 0x0101, 0x1208,
+	0x0010, 0x2009, 0x0100, 0x2130, 0x8304, 0x9098, 0x0018, 0x2009,
+	0x0020, 0x2011, 0x0029, 0x080c, 0xc4f8, 0x96b2, 0x0020, 0xb004,
+	0x904d, 0x0110, 0x080c, 0x0ff9, 0x080c, 0x1047, 0x0520, 0x8528,
+	0xa867, 0x0110, 0xa86b, 0x0000, 0x2920, 0xb406, 0x968a, 0x003d,
+	0x1228, 0x2608, 0x2011, 0x001b, 0x0499, 0x00a8, 0x96b2, 0x003c,
+	0x2009, 0x003c, 0x2950, 0x2011, 0x001b, 0x0451, 0x0c28, 0x2001,
+	0x0205, 0x2003, 0x0000, 0x00ae, 0x852f, 0x95ad, 0x0003, 0xb566,
+	0x95ac, 0x0000, 0x0048, 0x2001, 0x0205, 0x2003, 0x0000, 0x00ae,
+	0x852f, 0x95ad, 0x0003, 0xb566, 0x009e, 0x006e, 0x005e, 0x0005,
+	0x00a6, 0x89ff, 0x0158, 0xa804, 0x9055, 0x0130, 0xa807, 0x0000,
+	0x080c, 0x6dee, 0x2a48, 0x0cb8, 0x080c, 0x6dee, 0x00ae, 0x0005,
+	0x00f6, 0x2079, 0x0200, 0x7814, 0x9085, 0x0080, 0x7816, 0xd184,
+	0x0108, 0x8108, 0x810c, 0x20a9, 0x0001, 0xa860, 0x20e8, 0xa85c,
+	0x9200, 0x20a0, 0x20e1, 0x0000, 0x2300, 0x9e00, 0x2098, 0x4003,
+	0x8318, 0x9386, 0x0020, 0x1148, 0x2018, 0x2300, 0x9e00, 0x2098,
+	0x7814, 0x8000, 0x9085, 0x0080, 0x7816, 0x8109, 0x1d80, 0x7817,
+	0x0000, 0x00fe, 0x0005, 0x6920, 0x9186, 0x0003, 0x0118, 0x9186,
+	0x0002, 0x11d0, 0x00c6, 0x00d6, 0x00e6, 0x2d60, 0x0096, 0x6014,
+	0x2048, 0x080c, 0xc97a, 0x0150, 0x2001, 0x0006, 0xa980, 0xc1d5,
+	0x080c, 0x7022, 0x080c, 0x6de2, 0x080c, 0xcb6b, 0x009e, 0x080c,
+	0xaceb, 0x00ee, 0x00de, 0x00ce, 0x0005, 0x00c6, 0x702c, 0xd084,
+	0x1170, 0x6008, 0x2060, 0x6020, 0x9086, 0x0002, 0x1140, 0x6104,
+	0x9186, 0x0085, 0x0118, 0x9186, 0x008b, 0x1108, 0x9006, 0x00ce,
+	0x0005, 0x0066, 0x0126, 0x2091, 0x8000, 0x2031, 0x0001, 0x6020,
+	0x9084, 0x000f, 0x0083, 0x012e, 0x006e, 0x0005, 0x0126, 0x2091,
+	0x8000, 0x0066, 0x2031, 0x0000, 0x6020, 0x9084, 0x000f, 0x001b,
+	0x006e, 0x012e, 0x0005, 0xc5ab, 0xc5ab, 0xc5a6, 0xc5cf, 0xc583,
+	0xc5a6, 0xc585, 0xc5a6, 0xc583, 0x9173, 0xc5a6, 0xc5a6, 0xc5a6,
+	0xc583, 0xc583, 0xc583, 0x080c, 0x0d7d, 0x6010, 0x9080, 0x0000,
+	0x2004, 0xd0bc, 0x190c, 0xc5cf, 0x0036, 0x6014, 0x0096, 0x2048,
+	0xa880, 0x009e, 0xd0cc, 0x0118, 0x2019, 0x000c, 0x0038, 0xd094,
+	0x0118, 0x2019, 0x000d, 0x0010, 0x2019, 0x0010, 0x080c, 0xdfa1,
+	0x6023, 0x0006, 0x6003, 0x0007, 0x003e, 0x0005, 0x9006, 0x0005,
+	0x9085, 0x0001, 0x0005, 0x0096, 0x86ff, 0x11e8, 0x6014, 0x2048,
+	0x080c, 0xc97a, 0x01d0, 0x6043, 0xffff, 0xa864, 0x9086, 0x0139,
+	0x1128, 0xa87b, 0x0005, 0xa883, 0x0000, 0x0028, 0x900e, 0x2001,
+	0x0005, 0x080c, 0x7022, 0x080c, 0xcc85, 0x080c, 0x6de2, 0x080c,
+	0xaceb, 0x9085, 0x0001, 0x009e, 0x0005, 0x9006, 0x0ce0, 0x080c,
+	0xa91e, 0x080c, 0xd0d5, 0x6000, 0x908a, 0x0016, 0x1a0c, 0x0d7d,
+	0x002b, 0x0106, 0x080c, 0xa93a, 0x010e, 0x0005, 0xc5ee, 0xc61e,
+	0xc5f0, 0xc645, 0xc619, 0xc5ee, 0xc5a6, 0xc5ab, 0xc5ab, 0xc5a6,
+	0xc5a6, 0xc5a6, 0xc5a6, 0xc5a6, 0xc5a6, 0xc5a6, 0x080c, 0x0d7d,
+	0x86ff, 0x1520, 0x6020, 0x9086, 0x0006, 0x0500, 0x0096, 0x6014,
+	0x2048, 0x080c, 0xc97a, 0x0168, 0xa87c, 0xd0cc, 0x0140, 0x0096,
+	0xc0cc, 0xa87e, 0xa878, 0x2048, 0x080c, 0x0ff9, 0x009e, 0x080c,
+	0xcc85, 0x009e, 0x080c, 0xd055, 0x6007, 0x0085, 0x6003, 0x000b,
+	0x6023, 0x0002, 0x2009, 0x8020, 0x080c, 0x9292, 0x9085, 0x0001,
+	0x0005, 0x0066, 0x080c, 0x1ac5, 0x006e, 0x0890, 0x00e6, 0x2071,
+	0x19e6, 0x7030, 0x9c06, 0x1120, 0x080c, 0xa138, 0x00ee, 0x0840,
+	0x6020, 0x9084, 0x000f, 0x9086, 0x0006, 0x1150, 0x0086, 0x0096,
+	0x2049, 0x0001, 0x2c40, 0x080c, 0xa28c, 0x009e, 0x008e, 0x0040,
+	0x0066, 0x080c, 0xa034, 0x190c, 0x0d7d, 0x080c, 0xa042, 0x006e,
+	0x00ee, 0x1904, 0xc5f0, 0x0804, 0xc5a6, 0x0036, 0x00e6, 0x2071,
+	0x19e6, 0x704c, 0x9c06, 0x1138, 0x901e, 0x080c, 0xa1b8, 0x00ee,
+	0x003e, 0x0804, 0xc5f0, 0x080c, 0xa3c3, 0x00ee, 0x003e, 0x1904,
+	0xc5f0, 0x0804, 0xc5a6, 0x00c6, 0x0066, 0x6020, 0x9084, 0x000f,
+	0x001b, 0x006e, 0x00ce, 0x0005, 0xc67b, 0xc74a, 0xc8b4, 0xc683,
+	0xaceb, 0xc67b, 0xdf93, 0xd0bd, 0xc74a, 0x913a, 0xc940, 0xc674,
+	0xc674, 0xc674, 0xc674, 0xc674, 0x080c, 0x0d7d, 0x080c, 0xcb91,
+	0x1110, 0x080c, 0xb693, 0x0005, 0x080c, 0x967a, 0x0804, 0xacb0,
+	0x601b, 0x0001, 0x0005, 0x080c, 0xc97a, 0x0130, 0x6014, 0x0096,
+	0x2048, 0x2c00, 0xa896, 0x009e, 0x080c, 0xa91e, 0x080c, 0xd0d5,
+	0x6000, 0x908a, 0x0016, 0x1a0c, 0x0d7d, 0x0013, 0x0804, 0xa93a,
+	0xc6a8, 0xc6aa, 0xc6d4, 0xc6e8, 0xc715, 0xc6a8, 0xc67b, 0xc67b,
+	0xc67b, 0xc6ef, 0xc6ef, 0xc6a8, 0xc6a8, 0xc6a8, 0xc6a8, 0xc6f9,
+	0x080c, 0x0d7d, 0x00e6, 0x6014, 0x0096, 0x2048, 0xa880, 0xc0b5,
+	0xa882, 0x009e, 0x2071, 0x19e6, 0x7030, 0x9c06, 0x01d0, 0x0066,
+	0x080c, 0xa034, 0x190c, 0x0d7d, 0x080c, 0xa042, 0x006e, 0x080c,
+	0xd055, 0x6007, 0x0085, 0x6003, 0x000b, 0x6023, 0x0002, 0x2001,
+	0x1986, 0x2004, 0x601a, 0x2009, 0x8020, 0x080c, 0x9292, 0x00ee,
+	0x0005, 0x601b, 0x0001, 0x0cd8, 0x0096, 0x6014, 0x2048, 0xa880,
+	0xc0b5, 0xa882, 0x009e, 0x080c, 0xd055, 0x6007, 0x0085, 0x6003,
+	0x000b, 0x6023, 0x0002, 0x2009, 0x8020, 0x080c, 0x9292, 0x0005,
+	0x080c, 0xa91e, 0x080c, 0xaab5, 0x080c, 0xa93a, 0x0c28, 0x0096,
+	0x601b, 0x0001, 0x6014, 0x2048, 0xa880, 0xc0b5, 0xa882, 0x009e,
+	0x0005, 0x080c, 0x5746, 0x01b8, 0x6014, 0x0096, 0x904d, 0x0190,
+	0xa864, 0xa867, 0x0103, 0xa87b, 0x0006, 0x9086, 0x0139, 0x1150,
+	0xa867, 0x0139, 0xa87b, 0x0030, 0xa897, 0x4005, 0xa89b, 0x0004,
+	0x080c, 0x6dee, 0x009e, 0x0804, 0xacb0, 0x6014, 0x0096, 0x904d,
+	0x0560, 0xa97c, 0xd1e4, 0x1158, 0x611c, 0xd1fc, 0x0530, 0x6110,
+	0x00b6, 0x2158, 0xb93c, 0x8109, 0x0208, 0xb93e, 0x00be, 0x080c,
+	0xa93a, 0x2001, 0x180f, 0x2004, 0xd0c4, 0x0110, 0x009e, 0x0005,
+	0xa884, 0x009e, 0x8003, 0x800b, 0x810b, 0x9108, 0x611a, 0x2001,
+	0x0037, 0x2c08, 0x080c, 0x16a0, 0x6000, 0x9086, 0x0004, 0x1120,
+	0x2009, 0x0048, 0x080c, 0xad4d, 0x0005, 0x009e, 0x080c, 0x1ac5,
+	0x0804, 0xc6d4, 0x6000, 0x908a, 0x0016, 0x1a0c, 0x0d7d, 0x000b,
+	0x0005, 0xc761, 0xc680, 0xc763, 0xc761, 0xc763, 0xc763, 0xc67c,
+	0xc761, 0xc676, 0xc676, 0xc761, 0xc761, 0xc761, 0xc761, 0xc761,
+	0xc761, 0x080c, 0x0d7d, 0x6010, 0x00b6, 0x2058, 0xb804, 0x9084,
+	0x00ff, 0x00be, 0x908a, 0x000c, 0x1a0c, 0x0d7d, 0x00b6, 0x0013,
+	0x00be, 0x0005, 0xc77e, 0xc84b, 0xc780, 0xc7c0, 0xc780, 0xc7c0,
+	0xc780, 0xc78e, 0xc77e, 0xc7c0, 0xc77e, 0xc7af, 0x080c, 0x0d7d,
+	0x6004, 0x908e, 0x0016, 0x05c0, 0x908e, 0x0004, 0x05a8, 0x908e,
+	0x0002, 0x0590, 0x908e, 0x0052, 0x0904, 0xc847, 0x6004, 0x080c,
+	0xcb91, 0x0904, 0xc864, 0x908e, 0x0004, 0x1110, 0x080c, 0x326f,
+	0x908e, 0x0021, 0x0904, 0xc868, 0x908e, 0x0022, 0x0904, 0xc8af,
+	0x908e, 0x003d, 0x0904, 0xc868, 0x908e, 0x0039, 0x0904, 0xc86c,
+	0x908e, 0x0035, 0x0904, 0xc86c, 0x908e, 0x001e, 0x0178, 0x908e,
+	0x0001, 0x1140, 0x6010, 0x2058, 0xb804, 0x9084, 0x00ff, 0x9086,
+	0x0006, 0x0110, 0x080c, 0x3240, 0x080c, 0xb693, 0x0804, 0xaceb,
+	0x00c6, 0x00d6, 0x6104, 0x9186, 0x0016, 0x0904, 0xc838, 0x9186,
+	0x0002, 0x1904, 0xc80d, 0x2001, 0x1837, 0x2004, 0xd08c, 0x11c8,
+	0x080c, 0x753d, 0x11b0, 0x080c, 0xd09b, 0x0138, 0x080c, 0x7560,
+	0x1120, 0x080c, 0x7448, 0x0804, 0xc898, 0x2001, 0x197c, 0x2003,
+	0x0001, 0x2001, 0x1800, 0x2003, 0x0001, 0x080c, 0x746e, 0x0804,
+	0xc898, 0x6010, 0x2058, 0x2001, 0x1837, 0x2004, 0xd0ac, 0x1904,
+	0xc898, 0xb8a0, 0x9084, 0xff80, 0x1904, 0xc898, 0xb840, 0x9084,
+	0x00ff, 0x9005, 0x0190, 0x8001, 0xb842, 0x6017, 0x0000, 0x6023,
+	0x0007, 0x601b, 0x0398, 0x604b, 0x0000, 0x080c, 0xac5a, 0x0128,
+	0x2b00, 0x6012, 0x6023, 0x0001, 0x0458, 0x00de, 0x00ce, 0x6004,
+	0x908e, 0x0002, 0x11a0, 0x6010, 0x2058, 0xb8a0, 0x9086, 0x007e,
+	0x1170, 0x2009, 0x1837, 0x2104, 0xc085, 0x200a, 0x00e6, 0x2071,
+	0x1800, 0x080c, 0x6025, 0x00ee, 0x080c, 0xb693, 0x0030, 0x080c,
+	0xb693, 0x080c, 0x3240, 0x080c, 0xd0b0, 0x00e6, 0x0126, 0x2091,
+	0x8000, 0x080c, 0x326f, 0x012e, 0x00ee, 0x080c, 0xaceb, 0x0005,
+	0x2001, 0x0002, 0x080c, 0x65e3, 0x6003, 0x0001, 0x6007, 0x0002,
+	0x080c, 0x92b7, 0x080c, 0x9738, 0x00de, 0x00ce, 0x0c80, 0x080c,
+	0x326f, 0x0804, 0xc7bc, 0x00c6, 0x00d6, 0x6104, 0x9186, 0x0016,
+	0x0d38, 0x6010, 0x2058, 0xb840, 0x9084, 0x00ff, 0x9005, 0x0904,
+	0xc80d, 0x8001, 0xb842, 0x6003, 0x0001, 0x080c, 0x92b7, 0x080c,
+	0x9738, 0x00de, 0x00ce, 0x0898, 0x080c, 0xb693, 0x0804, 0xc7be,
+	0x080c, 0xb6cf, 0x0804, 0xc7be, 0x00d6, 0x2c68, 0x6104, 0x080c,
+	0xd013, 0x00de, 0x0118, 0x080c, 0xacb0, 0x0408, 0x6004, 0x8007,
+	0x6134, 0x918c, 0x00ff, 0x9105, 0x6036, 0x6007, 0x0085, 0x6003,
+	0x000b, 0x6023, 0x0002, 0x603c, 0x600a, 0x2001, 0x1986, 0x2004,
+	0x601a, 0x602c, 0x2c08, 0x2060, 0x6024, 0xd0b4, 0x0108, 0xc085,
+	0xc0b5, 0x6026, 0x2160, 0x2009, 0x8020, 0x080c, 0x92b0, 0x0005,
+	0x00de, 0x00ce, 0x080c, 0xb693, 0x080c, 0x3240, 0x00e6, 0x0126,
+	0x2091, 0x8000, 0x080c, 0x326f, 0x6017, 0x0000, 0x6023, 0x0007,
+	0x601b, 0x0398, 0x604b, 0x0000, 0x012e, 0x00ee, 0x0005, 0x080c,
+	0xb0eb, 0x1904, 0xc864, 0x0005, 0x6000, 0x908a, 0x0016, 0x1a0c,
+	0x0d7d, 0x0096, 0x00d6, 0x001b, 0x00de, 0x009e, 0x0005, 0xc8cf,
+	0xc8cf, 0xc8cf, 0xc8cf, 0xc8cf, 0xc8cf, 0xc8cf, 0xc8cf, 0xc8cf,
+	0xc67b, 0xc8cf, 0xc680, 0xc8d1, 0xc680, 0xc8eb, 0xc8cf, 0x080c,
+	0x0d7d, 0x6004, 0x9086, 0x008b, 0x01b0, 0x6034, 0x908c, 0xff00,
+	0x810f, 0x9186, 0x0035, 0x1130, 0x602c, 0x9080, 0x0009, 0x200c,
+	0xc185, 0x2102, 0x6007, 0x008b, 0x6003, 0x000d, 0x2009, 0x8020,
+	0x080c, 0x92b0, 0x0005, 0x080c, 0xd08f, 0x0118, 0x080c, 0xd0a2,
+	0x0010, 0x080c, 0xd0b0, 0x080c, 0xcb6b, 0x080c, 0xc97a, 0x0570,
+	0x080c, 0x3240, 0x080c, 0xc97a, 0x0168, 0x6014, 0x2048, 0xa867,
+	0x0103, 0xa87b, 0x0006, 0xa877, 0x0000, 0xa880, 0xc0ed, 0xa882,
+	0x080c, 0x6dee, 0x2c68, 0x080c, 0xac5a, 0x0150, 0x6810, 0x6012,
+	0x080c, 0xce15, 0x00c6, 0x2d60, 0x080c, 0xaceb, 0x00ce, 0x0008,
+	0x2d60, 0x6017, 0x0000, 0x6023, 0x0001, 0x6007, 0x0001, 0x6003,
+	0x0001, 0x080c, 0x92b7, 0x080c, 0x9738, 0x00c8, 0x080c, 0xd08f,
+	0x0138, 0x6034, 0x9086, 0x4000, 0x1118, 0x080c, 0x3240, 0x08d0,
+	0x6034, 0x908c, 0xff00, 0x810f, 0x9186, 0x0039, 0x0118, 0x9186,
+	0x0035, 0x1118, 0x080c, 0x3240, 0x0868, 0x080c, 0xaceb, 0x0005,
+	0x6000, 0x908a, 0x0016, 0x1a0c, 0x0d7d, 0x0002, 0xc956, 0xc956,
+	0xc958, 0xc958, 0xc958, 0xc956, 0xc956, 0xaceb, 0xc956, 0xc956,
+	0xc956, 0xc956, 0xc956, 0xc956, 0xc956, 0xc956, 0x080c, 0x0d7d,
+	0x080c, 0xa91e, 0x080c, 0xaab5, 0x080c, 0xa93a, 0x6114, 0x0096,
+	0x2148, 0xa87b, 0x0006, 0x080c, 0x6dee, 0x009e, 0x0804, 0xacb0,
+	0x9284, 0x0003, 0x1158, 0x9282, 0x1ddc, 0x0240, 0x2001, 0x181a,
+	0x2004, 0x9202, 0x1218, 0x9085, 0x0001, 0x0005, 0x9006, 0x0ce8,
+	0x0096, 0x0028, 0x0096, 0x0006, 0x6014, 0x2048, 0x000e, 0x0006,
+	0x9984, 0xf000, 0x9086, 0xf000, 0x0110, 0x080c, 0x10f2, 0x000e,
+	0x009e, 0x0005, 0x00e6, 0x00c6, 0x0036, 0x0006, 0x0126, 0x2091,
+	0x8000, 0x2061, 0x1ddc, 0x2071, 0x1800, 0x7354, 0x7074, 0x9302,
+	0x1640, 0x6020, 0x9206, 0x11f8, 0x080c, 0xd09b, 0x0180, 0x9286,
+	0x0001, 0x1168, 0x6004, 0x9086, 0x0004, 0x1148, 0x080c, 0x3240,
+	0x080c, 0xd0b0, 0x00c6, 0x080c, 0xaceb, 0x00ce, 0x0060, 0x080c,
+	0xcd87, 0x0148, 0x080c, 0xcb91, 0x1110, 0x080c, 0xb693, 0x00c6,
+	0x080c, 0xacb0, 0x00ce, 0x9ce0, 0x001c, 0x7068, 0x9c02, 0x1208,
+	0x08a0, 0x012e, 0x000e, 0x003e, 0x00ce, 0x00ee, 0x0005, 0x00e6,
+	0x00c6, 0x0016, 0x9188, 0x1000, 0x210c, 0x81ff, 0x0128, 0x2061,
+	0x1b34, 0x6112, 0x080c, 0x3240, 0x9006, 0x0010, 0x9085, 0x0001,
+	0x001e, 0x00ce, 0x00ee, 0x0005, 0x00c6, 0x0126, 0x2091, 0x8000,
+	0x080c, 0xac5a, 0x01b0, 0x665e, 0x2b00, 0x6012, 0x080c, 0x5746,
+	0x0118, 0x080c, 0xcaad, 0x0168, 0x080c, 0xce15, 0x6023, 0x0003,
+	0x2009, 0x004b, 0x080c, 0xad4d, 0x9085, 0x0001, 0x012e, 0x00ce,
+	0x0005, 0x9006, 0x0cd8, 0x00c6, 0x0126, 0x2091, 0x8000, 0xbaa0,
+	0x080c, 0xad20, 0x0580, 0x605f, 0x0000, 0x2b00, 0x6012, 0x080c,
+	0xce15, 0x6023, 0x0003, 0x0016, 0x080c, 0xa91e, 0x080c, 0x943d,
+	0x0076, 0x903e, 0x080c, 0x9306, 0x2c08, 0x080c, 0xe167, 0x007e,
+	0x080c, 0xa93a, 0x001e, 0xd184, 0x0128, 0x080c, 0xacb0, 0x9085,
+	0x0001, 0x0070, 0x080c, 0x5746, 0x0128, 0xd18c, 0x1170, 0x080c,
+	0xcaad, 0x0148, 0x2009, 0x004c, 0x080c, 0xad4d, 0x9085, 0x0001,
+	0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x2900, 0x6016, 0x0c90,
+	0x2009, 0x004d, 0x0010, 0x2009, 0x004e, 0x00f6, 0x00c6, 0x0046,
+	0x0016, 0x080c, 0xac5a, 0x2c78, 0x05a0, 0x7e5e, 0x2b00, 0x7812,
+	0x7823, 0x0003, 0x0016, 0x2021, 0x0005, 0x080c, 0xcabf, 0x001e,
+	0x9186, 0x004d, 0x0118, 0x9186, 0x004e, 0x0148, 0x2001, 0x197f,
+	0x200c, 0xd1fc, 0x0168, 0x2f60, 0x080c, 0xacb0, 0x00d0, 0x2001,
+	0x197e, 0x200c, 0xd1fc, 0x0120, 0x2f60, 0x080c, 0xacb0, 0x0088,
+	0x2f60, 0x080c, 0x5746, 0x0138, 0xd18c, 0x1118, 0x04f1, 0x0148,
+	0x0010, 0x2900, 0x7816, 0x001e, 0x0016, 0x080c, 0xad4d, 0x9085,
+	0x0001, 0x001e, 0x004e, 0x00ce, 0x00fe, 0x0005, 0x00f6, 0x00c6,
+	0x0046, 0x080c, 0xac5a, 0x2c78, 0x0508, 0x7e5e, 0x2b00, 0x7812,
+	0x7823, 0x0003, 0x0096, 0x2021, 0x0004, 0x0489, 0x009e, 0x2001,
+	0x197d, 0x200c, 0xd1fc, 0x0120, 0x2f60, 0x080c, 0xacb0, 0x0060,
+	0x2f60, 0x080c, 0x5746, 0x0120, 0xd18c, 0x1160, 0x0071, 0x0130,
+	0x2009, 0x0052, 0x080c, 0xad4d, 0x9085, 0x0001, 0x004e, 0x00ce,
+	0x00fe, 0x0005, 0x2900, 0x7816, 0x0c98, 0x00c6, 0x080c, 0x4af2,
+	0x00ce, 0x1120, 0x080c, 0xacb0, 0x9006, 0x0005, 0xa867, 0x0000,
+	0xa86b, 0x8000, 0x2900, 0x6016, 0x9085, 0x0001, 0x0005, 0x0096,
+	0x0076, 0x0126, 0x2091, 0x8000, 0x080c, 0xa91e, 0x080c, 0x6875,
+	0x0158, 0x2001, 0xcac6, 0x0006, 0x900e, 0x2400, 0x080c, 0x7022,
+	0x080c, 0x6dee, 0x000e, 0x0807, 0x2418, 0x080c, 0x9640, 0xbaa0,
+	0x0086, 0x2041, 0x0001, 0x2039, 0x0001, 0x2608, 0x080c, 0x9457,
+	0x008e, 0x080c, 0x9306, 0x2f08, 0x2648, 0x080c, 0xe167, 0xb93c,
+	0x81ff, 0x090c, 0x9530, 0x080c, 0xa93a, 0x012e, 0x007e, 0x009e,
+	0x0005, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0xac5a, 0x0190,
+	0x660a, 0x2b08, 0x6112, 0x080c, 0xce15, 0x6023, 0x0001, 0x2900,
+	0x6016, 0x2009, 0x001f, 0x080c, 0xad4d, 0x9085, 0x0001, 0x012e,
+	0x00ce, 0x0005, 0x9006, 0x0cd8, 0x00c6, 0x0126, 0x2091, 0x8000,
+	0x080c, 0xad20, 0x01b8, 0x660a, 0x2b08, 0x6112, 0x080c, 0xce15,
+	0x6023, 0x0008, 0x2900, 0x6016, 0x00f6, 0x2c78, 0x080c, 0x1778,
+	0x00fe, 0x2009, 0x0021, 0x080c, 0xad4d, 0x9085, 0x0001, 0x012e,
+	0x00ce, 0x0005, 0x9006, 0x0cd8, 0x2009, 0x003d, 0x00c6, 0x0126,
+	0x0016, 0x2091, 0x8000, 0x080c, 0xac5a, 0x0198, 0x660a, 0x2b08,
+	0x6112, 0x080c, 0xce15, 0x6023, 0x0001, 0x2900, 0x6016, 0x001e,
+	0x0016, 0x080c, 0xad4d, 0x9085, 0x0001, 0x001e, 0x012e, 0x00ce,
+	0x0005, 0x9006, 0x0cd0, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c,
+	0xad20, 0x0188, 0x2b08, 0x6112, 0x080c, 0xce15, 0x6023, 0x0001,
+	0x2900, 0x6016, 0x2009, 0x0000, 0x080c, 0xad4d, 0x9085, 0x0001,
+	0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x2009, 0x0044, 0x0830,
+	0x2009, 0x0049, 0x0818, 0x0026, 0x00b6, 0x6210, 0x2258, 0xba3c,
+	0x82ff, 0x0118, 0x8211, 0xba3e, 0x1140, 0xb8d0, 0x9005, 0x0128,
+	0xb888, 0x9005, 0x1110, 0xb88b, 0x0001, 0x00be, 0x002e, 0x0005,
+	0x0006, 0x0016, 0x6004, 0x908e, 0x0002, 0x0140, 0x908e, 0x0003,
+	0x0128, 0x908e, 0x0004, 0x0110, 0x9085, 0x0001, 0x001e, 0x000e,
+	0x0005, 0x0006, 0x0086, 0x0096, 0x6020, 0x9086, 0x0004, 0x01a8,
+	0x6014, 0x904d, 0x080c, 0xc97a, 0x0180, 0xa864, 0x9086, 0x0139,
+	0x0170, 0x6020, 0x90c6, 0x0003, 0x0140, 0x90c6, 0x0002, 0x0128,
+	0xa868, 0xd0fc, 0x0110, 0x9006, 0x0010, 0x9085, 0x0001, 0x009e,
+	0x008e, 0x000e, 0x0005, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c,
+	0xad20, 0x0198, 0x2b08, 0x6112, 0x080c, 0xce15, 0x6023, 0x0001,
+	0x2900, 0x6016, 0x080c, 0x3240, 0x2009, 0x0028, 0x080c, 0xad4d,
+	0x9085, 0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x9186,
+	0x0015, 0x11a8, 0x2011, 0x1824, 0x2204, 0x9086, 0x0074, 0x1178,
+	0x00b6, 0x080c, 0xb8e7, 0x00be, 0x080c, 0xbb0a, 0x6003, 0x0001,
+	0x6007, 0x0029, 0x080c, 0x92b7, 0x080c, 0x9738, 0x0078, 0x6014,
+	0x0096, 0x2048, 0xa868, 0x009e, 0xd0fc, 0x0148, 0x2001, 0x0001,
+	0x080c, 0xcfd4, 0x080c, 0xb693, 0x080c, 0xacb0, 0x0005, 0x0096,
+	0x6014, 0x904d, 0x090c, 0x0d7d, 0xa87b, 0x0030, 0xa883, 0x0000,
+	0xa897, 0x4005, 0xa89b, 0x0004, 0xa867, 0x0139, 0x0126, 0x2091,
+	0x8000, 0x080c, 0x6dee, 0x012e, 0x009e, 0x080c, 0xacb0, 0x0c30,
+	0x0096, 0x9186, 0x0016, 0x1128, 0x2001, 0x0004, 0x080c, 0x65e3,
+	0x00e8, 0x9186, 0x0015, 0x1510, 0x2011, 0x1824, 0x2204, 0x9086,
+	0x0014, 0x11e0, 0x6010, 0x00b6, 0x2058, 0x080c, 0x672e, 0x00be,
+	0x080c, 0xbbdb, 0x1198, 0x6010, 0x00b6, 0x2058, 0xb890, 0x00be,
+	0x9005, 0x0160, 0x2001, 0x0006, 0x080c, 0x65e3, 0x6014, 0x2048,
+	0xa868, 0xd0fc, 0x0170, 0x080c, 0xb0bf, 0x0048, 0x6014, 0x2048,
+	0xa868, 0xd0fc, 0x0528, 0x080c, 0xb693, 0x080c, 0xacb0, 0x009e,
+	0x0005, 0x6014, 0x6310, 0x2358, 0x904d, 0x090c, 0x0d7d, 0xa87b,
+	0x0000, 0xa883, 0x0000, 0xa897, 0x4000, 0x900e, 0x080c, 0x6986,
+	0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d, 0xa99a, 0x0126,
+	0x2091, 0x8000, 0x080c, 0x6dee, 0x012e, 0x080c, 0xacb0, 0x08f8,
+	0x6014, 0x904d, 0x090c, 0x0d7d, 0xa87b, 0x0030, 0xa883, 0x0000,
+	0xa897, 0x4005, 0xa89b, 0x0004, 0xa867, 0x0139, 0x0126, 0x2091,
+	0x8000, 0x080c, 0x6dee, 0x012e, 0x080c, 0xacb0, 0x0840, 0xa878,
+	0x9086, 0x0005, 0x1108, 0x0009, 0x0005, 0xa880, 0xc0ad, 0xa882,
+	0x0005, 0x604b, 0x0000, 0x6017, 0x0000, 0x6003, 0x0001, 0x6007,
+	0x0050, 0x2009, 0x8023, 0x080c, 0x92b0, 0x0005, 0x00c6, 0x6010,
+	0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x0130, 0x0066, 0x6020,
+	0x9084, 0x000f, 0x001b, 0x006e, 0x00ce, 0x0005, 0xc67b, 0xccb8,
+	0xccb8, 0xccbb, 0xe494, 0xe4af, 0xe4b2, 0xc67b, 0xc67b, 0xc67b,
+	0xc67b, 0xc67b, 0xc67b, 0xc67b, 0xc67b, 0xc67b, 0x080c, 0x0d7d,
+	0xa001, 0xa001, 0x0005, 0x0096, 0x6014, 0x904d, 0x0118, 0xa87c,
+	0xd0e4, 0x1110, 0x009e, 0x0010, 0x009e, 0x0005, 0x6010, 0x00b6,
+	0x2058, 0xb800, 0x00be, 0xd0bc, 0x0550, 0x2001, 0x1834, 0x2004,
+	0x9005, 0x1540, 0x00f6, 0x2c78, 0x080c, 0xac5a, 0x0508, 0x7810,
+	0x6012, 0x080c, 0xce15, 0x7820, 0x9086, 0x0003, 0x0128, 0x7808,
+	0x603a, 0x2f00, 0x603e, 0x0020, 0x7808, 0x603e, 0x2f00, 0x603a,
+	0x602e, 0x6023, 0x0001, 0x6007, 0x0035, 0x6003, 0x0001, 0x795c,
+	0x615e, 0x2009, 0x8020, 0x080c, 0x92b0, 0x2f60, 0x00fe, 0x0005,
+	0x2f60, 0x00fe, 0x2001, 0x1987, 0x2004, 0x604a, 0x0005, 0x0016,
+	0x0096, 0x6814, 0x2048, 0x681c, 0xd0fc, 0xc0fc, 0x681e, 0xa87c,
+	0x1108, 0xd0e4, 0x0180, 0xc0e4, 0xa87e, 0xa877, 0x0000, 0xa893,
+	0x0000, 0xa88f, 0x0000, 0xd0cc, 0x0130, 0xc0cc, 0xa87e, 0xa878,
+	0x2048, 0x080c, 0x0ff9, 0x6830, 0x6036, 0x908e, 0x0001, 0x0148,
+	0x6803, 0x0002, 0x9086, 0x0005, 0x0170, 0x9006, 0x602e, 0x6032,
+	0x00d0, 0x681c, 0xc085, 0x681e, 0x6803, 0x0004, 0x6824, 0xc0f4,
+	0x9085, 0x0c00, 0x6826, 0x6814, 0x2048, 0xa8ac, 0x6938, 0x9102,
+	0xa8b0, 0x693c, 0x9103, 0x1e48, 0x683c, 0x602e, 0x6838, 0x9084,
+	0xfffc, 0x683a, 0x6032, 0x2d00, 0x603a, 0x6808, 0x603e, 0x6910,
+	0x6112, 0x695c, 0x615e, 0x6023, 0x0001, 0x6007, 0x0039, 0x6003,
+	0x0001, 0x2009, 0x8020, 0x080c, 0x92b0, 0x009e, 0x001e, 0x0005,
+	0x6024, 0xd0d4, 0x0510, 0xd0f4, 0x11f8, 0x6038, 0x940a, 0x603c,
+	0x9303, 0x0230, 0x9105, 0x0120, 0x6024, 0xc0d4, 0xc0f5, 0x0098,
+	0x643a, 0x633e, 0xac3e, 0xab42, 0x0046, 0x0036, 0x2400, 0xacac,
+	0x9402, 0xa836, 0x2300, 0xabb0, 0x9303, 0xa83a, 0x003e, 0x004e,
+	0x6024, 0xc0d4, 0x0000, 0x6026, 0x0005, 0xd0f4, 0x1138, 0xa83c,
+	0x603a, 0xa840, 0x603e, 0x6024, 0xc0f5, 0x6026, 0x0005, 0x0006,
+	0x0016, 0x6004, 0x908e, 0x0034, 0x01b8, 0x908e, 0x0035, 0x01a0,
+	0x908e, 0x0036, 0x0188, 0x908e, 0x0037, 0x0170, 0x908e, 0x0038,
+	0x0158, 0x908e, 0x0039, 0x0140, 0x908e, 0x003a, 0x0128, 0x908e,
+	0x003b, 0x0110, 0x9085, 0x0001, 0x001e, 0x000e, 0x0005, 0x0006,
+	0x0016, 0x0026, 0x0036, 0x00e6, 0x2001, 0x1981, 0x200c, 0x8000,
+	0x2014, 0x2001, 0x0032, 0x080c, 0x91f8, 0x2001, 0x1985, 0x82ff,
+	0x1110, 0x2011, 0x0014, 0x2202, 0x2001, 0x1983, 0x200c, 0x8000,
+	0x2014, 0x2071, 0x196b, 0x711a, 0x721e, 0x2001, 0x0064, 0x080c,
+	0x91f8, 0x2001, 0x1986, 0x82ff, 0x1110, 0x2011, 0x0014, 0x2202,
+	0x2001, 0x1987, 0x9288, 0x000a, 0x2102, 0x2001, 0x0017, 0x080c,
+	0xa90f, 0x2001, 0x1a8b, 0x2102, 0x2001, 0x0032, 0x080c, 0x16a0,
+	0x080c, 0x6abe, 0x00ee, 0x003e, 0x002e, 0x001e, 0x000e, 0x0005,
+	0x0006, 0x0016, 0x00e6, 0x2001, 0x1985, 0x2003, 0x0028, 0x2001,
+	0x1986, 0x2003, 0x0014, 0x2071, 0x196b, 0x701b, 0x0000, 0x701f,
+	0x07d0, 0x2001, 0x1987, 0x2009, 0x001e, 0x2102, 0x2001, 0x0017,
+	0x080c, 0xa90f, 0x2001, 0x1a8b, 0x2102, 0x2001, 0x0032, 0x080c,
+	0x16a0, 0x00ee, 0x001e, 0x000e, 0x0005, 0x0096, 0x6060, 0x904d,
+	0x0110, 0x080c, 0x1079, 0x009e, 0x0005, 0x0005, 0x00c6, 0x0126,
+	0x2091, 0x8000, 0x080c, 0xac5a, 0x0180, 0x2b08, 0x6112, 0x0ca9,
+	0x6023, 0x0001, 0x2900, 0x6016, 0x2009, 0x0033, 0x080c, 0xad4d,
+	0x9085, 0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x0096,
+	0x00e6, 0x00f6, 0x2071, 0x1800, 0x9186, 0x0015, 0x1500, 0x7090,
+	0x9086, 0x0018, 0x11e0, 0x6014, 0x2048, 0xaa3c, 0xd2e4, 0x1160,
+	0x2c78, 0x080c, 0x97f7, 0x01d8, 0x707c, 0xaa50, 0x9206, 0x1160,
+	0x7080, 0xaa54, 0x9206, 0x1140, 0x6210, 0x00b6, 0x2258, 0xbaa0,
+	0x00be, 0x900e, 0x080c, 0x328f, 0x080c, 0xb0bf, 0x0020, 0x080c,
+	0xb693, 0x080c, 0xacb0, 0x00fe, 0x00ee, 0x009e, 0x0005, 0x7060,
+	0xaa54, 0x9206, 0x0d48, 0x0c80, 0x00c6, 0x0126, 0x2091, 0x8000,
+	0x080c, 0xac5a, 0x0188, 0x2b08, 0x6112, 0x080c, 0xce15, 0x6023,
+	0x0001, 0x2900, 0x6016, 0x2009, 0x004d, 0x080c, 0xad4d, 0x9085,
 	0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x00c6, 0x0126,
-	0x2091, 0x8000, 0xbaa0, 0x080c, 0xac60, 0x0580, 0x605f, 0x0000,
-	0x2b00, 0x6012, 0x080c, 0xccfe, 0x6023, 0x0003, 0x0016, 0x080c,
-	0xa899, 0x080c, 0x93c6, 0x0076, 0x903e, 0x080c, 0x928f, 0x2c08,
-	0x080c, 0xe038, 0x007e, 0x080c, 0xa8b5, 0x001e, 0xd184, 0x0128,
-	0x080c, 0xabf0, 0x9085, 0x0001, 0x0070, 0x080c, 0x56fd, 0x0128,
-	0xd18c, 0x1170, 0x080c, 0xc996, 0x0148, 0x2009, 0x004c, 0x080c,
-	0xac8d, 0x9085, 0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8,
-	0x2900, 0x6016, 0x0c90, 0x2009, 0x004d, 0x0010, 0x2009, 0x004e,
-	0x00f6, 0x00c6, 0x0046, 0x0016, 0x080c, 0xab9a, 0x2c78, 0x0590,
-	0x7e5e, 0x2b00, 0x7812, 0x7823, 0x0003, 0x2021, 0x0005, 0x080c,
-	0xc9a8, 0x9186, 0x004d, 0x0118, 0x9186, 0x004e, 0x0148, 0x2001,
-	0x197f, 0x200c, 0xd1fc, 0x0168, 0x2f60, 0x080c, 0xabf0, 0x00d0,
-	0x2001, 0x197e, 0x200c, 0xd1fc, 0x0120, 0x2f60, 0x080c, 0xabf0,
-	0x0088, 0x2f60, 0x080c, 0x56fd, 0x0138, 0xd18c, 0x1118, 0x04f1,
-	0x0148, 0x0010, 0x2900, 0x7816, 0x001e, 0x0016, 0x080c, 0xac8d,
-	0x9085, 0x0001, 0x001e, 0x004e, 0x00ce, 0x00fe, 0x0005, 0x00f6,
-	0x00c6, 0x0046, 0x080c, 0xab9a, 0x2c78, 0x0508, 0x7e5e, 0x2b00,
-	0x7812, 0x7823, 0x0003, 0x0096, 0x2021, 0x0004, 0x0489, 0x009e,
-	0x2001, 0x197d, 0x200c, 0xd1fc, 0x0120, 0x2f60, 0x080c, 0xabf0,
-	0x0060, 0x2f60, 0x080c, 0x56fd, 0x0120, 0xd18c, 0x1160, 0x0071,
-	0x0130, 0x2009, 0x0052, 0x080c, 0xac8d, 0x9085, 0x0001, 0x004e,
-	0x00ce, 0x00fe, 0x0005, 0x2900, 0x7816, 0x0c98, 0x00c6, 0x080c,
-	0x4ac9, 0x00ce, 0x1120, 0x080c, 0xabf0, 0x9006, 0x0005, 0xa867,
-	0x0000, 0xa86b, 0x8000, 0x2900, 0x6016, 0x9085, 0x0001, 0x0005,
-	0x0096, 0x0076, 0x0126, 0x2091, 0x8000, 0x080c, 0xa899, 0x080c,
-	0x6826, 0x0158, 0x2001, 0xc9af, 0x0006, 0x900e, 0x2400, 0x080c,
-	0x6fd3, 0x080c, 0x6d9f, 0x000e, 0x0807, 0x2418, 0x080c, 0x95c5,
-	0xbaa0, 0x0086, 0x2041, 0x0001, 0x2039, 0x0001, 0x2608, 0x080c,
-	0x93e0, 0x008e, 0x080c, 0x928f, 0x2f08, 0x2648, 0x080c, 0xe038,
-	0xb93c, 0x81ff, 0x090c, 0x94b7, 0x080c, 0xa8b5, 0x012e, 0x007e,
-	0x009e, 0x0005, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0xab9a,
-	0x0190, 0x660a, 0x2b08, 0x6112, 0x080c, 0xccfe, 0x6023, 0x0001,
-	0x2900, 0x6016, 0x2009, 0x001f, 0x080c, 0xac8d, 0x9085, 0x0001,
-	0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x00c6, 0x0126, 0x2091,
-	0x8000, 0x080c, 0xac60, 0x01b8, 0x660a, 0x2b08, 0x6112, 0x080c,
-	0xccfe, 0x6023, 0x0008, 0x2900, 0x6016, 0x00f6, 0x2c78, 0x080c,
-	0x174b, 0x00fe, 0x2009, 0x0021, 0x080c, 0xac8d, 0x9085, 0x0001,
-	0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x2009, 0x003d, 0x00c6,
-	0x0126, 0x0016, 0x2091, 0x8000, 0x080c, 0xab9a, 0x0198, 0x660a,
-	0x2b08, 0x6112, 0x080c, 0xccfe, 0x6023, 0x0001, 0x2900, 0x6016,
-	0x001e, 0x0016, 0x080c, 0xac8d, 0x9085, 0x0001, 0x001e, 0x012e,
-	0x00ce, 0x0005, 0x9006, 0x0cd0, 0x00c6, 0x0126, 0x2091, 0x8000,
-	0x080c, 0xac60, 0x0188, 0x2b08, 0x6112, 0x080c, 0xccfe, 0x6023,
-	0x0001, 0x2900, 0x6016, 0x2009, 0x0000, 0x080c, 0xac8d, 0x9085,
-	0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x2009, 0x0044,
-	0x0830, 0x2009, 0x0049, 0x0818, 0x0026, 0x00b6, 0x6210, 0x2258,
-	0xba3c, 0x82ff, 0x0118, 0x8211, 0xba3e, 0x1140, 0xb8d0, 0x9005,
-	0x0128, 0xb888, 0x9005, 0x1110, 0xb88b, 0x0001, 0x00be, 0x002e,
-	0x0005, 0x0006, 0x0016, 0x6004, 0x908e, 0x0002, 0x0140, 0x908e,
-	0x0003, 0x0128, 0x908e, 0x0004, 0x0110, 0x9085, 0x0001, 0x001e,
-	0x000e, 0x0005, 0x0006, 0x0086, 0x0096, 0x6020, 0x9086, 0x0004,
-	0x01a8, 0x6014, 0x904d, 0x080c, 0xc865, 0x0180, 0xa864, 0x9086,
-	0x0139, 0x0170, 0x6020, 0x90c6, 0x0003, 0x0140, 0x90c6, 0x0002,
-	0x0128, 0xa868, 0xd0fc, 0x0110, 0x9006, 0x0010, 0x9085, 0x0001,
-	0x009e, 0x008e, 0x000e, 0x0005, 0x00c6, 0x0126, 0x2091, 0x8000,
-	0x080c, 0xac60, 0x0198, 0x2b08, 0x6112, 0x080c, 0xccfe, 0x6023,
-	0x0001, 0x2900, 0x6016, 0x080c, 0x320f, 0x2009, 0x0028, 0x080c,
-	0xac8d, 0x9085, 0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8,
-	0x9186, 0x0015, 0x11a8, 0x2011, 0x1824, 0x2204, 0x9086, 0x0074,
-	0x1178, 0x00b6, 0x080c, 0xb81a, 0x00be, 0x080c, 0xba3d, 0x6003,
-	0x0001, 0x6007, 0x0029, 0x080c, 0x9240, 0x080c, 0x96bd, 0x0078,
-	0x6014, 0x0096, 0x2048, 0xa868, 0x009e, 0xd0fc, 0x0148, 0x2001,
-	0x0001, 0x080c, 0xcebd, 0x080c, 0xb5c6, 0x080c, 0xabf0, 0x0005,
-	0x0096, 0x6014, 0x904d, 0x090c, 0x0d7d, 0xa87b, 0x0030, 0xa883,
-	0x0000, 0xa897, 0x4005, 0xa89b, 0x0004, 0xa867, 0x0139, 0x0126,
-	0x2091, 0x8000, 0x080c, 0x6d9f, 0x012e, 0x009e, 0x080c, 0xabf0,
-	0x0c30, 0x0096, 0x9186, 0x0016, 0x1128, 0x2001, 0x0004, 0x080c,
-	0x6594, 0x00e8, 0x9186, 0x0015, 0x1510, 0x2011, 0x1824, 0x2204,
-	0x9086, 0x0014, 0x11e0, 0x6010, 0x00b6, 0x2058, 0x080c, 0x66df,
-	0x00be, 0x080c, 0xbb0e, 0x1198, 0x6010, 0x00b6, 0x2058, 0xb890,
-	0x00be, 0x9005, 0x0160, 0x2001, 0x0006, 0x080c, 0x6594, 0x6014,
-	0x2048, 0xa868, 0xd0fc, 0x0170, 0x080c, 0xafff, 0x0048, 0x6014,
-	0x2048, 0xa868, 0xd0fc, 0x0528, 0x080c, 0xb5c6, 0x080c, 0xabf0,
-	0x009e, 0x0005, 0x6014, 0x6310, 0x2358, 0x904d, 0x090c, 0x0d7d,
-	0xa87b, 0x0000, 0xa883, 0x0000, 0xa897, 0x4000, 0x900e, 0x080c,
-	0x6937, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d, 0xa99a,
-	0x0126, 0x2091, 0x8000, 0x080c, 0x6d9f, 0x012e, 0x080c, 0xabf0,
-	0x08f8, 0x6014, 0x904d, 0x090c, 0x0d7d, 0xa87b, 0x0030, 0xa883,
-	0x0000, 0xa897, 0x4005, 0xa89b, 0x0004, 0xa867, 0x0139, 0x0126,
-	0x2091, 0x8000, 0x080c, 0x6d9f, 0x012e, 0x080c, 0xabf0, 0x0840,
-	0xa878, 0x9086, 0x0005, 0x1108, 0x0009, 0x0005, 0xa880, 0xc0ad,
-	0xa882, 0x0005, 0x604b, 0x0000, 0x6017, 0x0000, 0x6003, 0x0001,
-	0x6007, 0x0050, 0x2009, 0x8023, 0x080c, 0x9239, 0x0005, 0x00c6,
-	0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x0130, 0x0066,
-	0x6020, 0x9084, 0x000f, 0x001b, 0x006e, 0x00ce, 0x0005, 0xc566,
-	0xcba1, 0xcba1, 0xcba4, 0xe365, 0xe380, 0xe383, 0xc566, 0xc566,
-	0xc566, 0xc566, 0xc566, 0xc566, 0xc566, 0xc566, 0xc566, 0x080c,
-	0x0d7d, 0xa001, 0xa001, 0x0005, 0x0096, 0x6014, 0x904d, 0x0118,
-	0xa87c, 0xd0e4, 0x1110, 0x009e, 0x0010, 0x009e, 0x0005, 0x6010,
-	0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x0550, 0x2001, 0x1834,
-	0x2004, 0x9005, 0x1540, 0x00f6, 0x2c78, 0x080c, 0xab9a, 0x0508,
-	0x7810, 0x6012, 0x080c, 0xccfe, 0x7820, 0x9086, 0x0003, 0x0128,
-	0x7808, 0x603a, 0x2f00, 0x603e, 0x0020, 0x7808, 0x603e, 0x2f00,
-	0x603a, 0x602e, 0x6023, 0x0001, 0x6007, 0x0035, 0x6003, 0x0001,
-	0x795c, 0x615e, 0x2009, 0x8020, 0x080c, 0x9239, 0x2f60, 0x00fe,
-	0x0005, 0x2f60, 0x00fe, 0x2001, 0x1987, 0x2004, 0x604a, 0x0005,
-	0x0016, 0x0096, 0x6814, 0x2048, 0x681c, 0xd0fc, 0xc0fc, 0x681e,
-	0xa87c, 0x1108, 0xd0e4, 0x0180, 0xc0e4, 0xa87e, 0xa877, 0x0000,
-	0xa893, 0x0000, 0xa88f, 0x0000, 0xd0cc, 0x0130, 0xc0cc, 0xa87e,
-	0xa878, 0x2048, 0x080c, 0x0ff9, 0x6830, 0x6036, 0x908e, 0x0001,
-	0x0148, 0x6803, 0x0002, 0x9086, 0x0005, 0x0170, 0x9006, 0x602e,
-	0x6032, 0x00d0, 0x681c, 0xc085, 0x681e, 0x6803, 0x0004, 0x6824,
-	0xc0f4, 0x9085, 0x0c00, 0x6826, 0x6814, 0x2048, 0xa8ac, 0x6938,
-	0x9102, 0xa8b0, 0x693c, 0x9103, 0x1e48, 0x683c, 0x602e, 0x6838,
-	0x9084, 0xfffc, 0x683a, 0x6032, 0x2d00, 0x603a, 0x6808, 0x603e,
-	0x6910, 0x6112, 0x695c, 0x615e, 0x6023, 0x0001, 0x6007, 0x0039,
-	0x6003, 0x0001, 0x2009, 0x8020, 0x080c, 0x9239, 0x009e, 0x001e,
-	0x0005, 0x6024, 0xd0d4, 0x0510, 0xd0f4, 0x11f8, 0x6038, 0x940a,
-	0x603c, 0x9303, 0x0230, 0x9105, 0x0120, 0x6024, 0xc0d4, 0xc0f5,
-	0x0098, 0x643a, 0x633e, 0xac3e, 0xab42, 0x0046, 0x0036, 0x2400,
-	0xacac, 0x9402, 0xa836, 0x2300, 0xabb0, 0x9303, 0xa83a, 0x003e,
-	0x004e, 0x6024, 0xc0d4, 0x0000, 0x6026, 0x0005, 0xd0f4, 0x1138,
-	0xa83c, 0x603a, 0xa840, 0x603e, 0x6024, 0xc0f5, 0x6026, 0x0005,
-	0x0006, 0x0016, 0x6004, 0x908e, 0x0034, 0x01b8, 0x908e, 0x0035,
-	0x01a0, 0x908e, 0x0036, 0x0188, 0x908e, 0x0037, 0x0170, 0x908e,
-	0x0038, 0x0158, 0x908e, 0x0039, 0x0140, 0x908e, 0x003a, 0x0128,
-	0x908e, 0x003b, 0x0110, 0x9085, 0x0001, 0x001e, 0x000e, 0x0005,
-	0x0006, 0x0016, 0x0026, 0x0036, 0x00e6, 0x2001, 0x1981, 0x200c,
-	0x8000, 0x2014, 0x2001, 0x0032, 0x080c, 0x9181, 0x2001, 0x1985,
-	0x82ff, 0x1110, 0x2011, 0x0014, 0x2202, 0x2001, 0x1983, 0x200c,
-	0x8000, 0x2014, 0x2071, 0x196b, 0x711a, 0x721e, 0x2001, 0x0064,
-	0x080c, 0x9181, 0x2001, 0x1986, 0x82ff, 0x1110, 0x2011, 0x0014,
-	0x2202, 0x2001, 0x1987, 0x9288, 0x000a, 0x2102, 0x2001, 0x0017,
-	0x080c, 0xa88a, 0x2001, 0x1a88, 0x2102, 0x2001, 0x0032, 0x080c,
-	0x1693, 0x080c, 0x6a6f, 0x00ee, 0x003e, 0x002e, 0x001e, 0x000e,
-	0x0005, 0x0006, 0x0016, 0x00e6, 0x2001, 0x1985, 0x2003, 0x0028,
-	0x2001, 0x1986, 0x2003, 0x0014, 0x2071, 0x196b, 0x701b, 0x0000,
-	0x701f, 0x07d0, 0x2001, 0x1987, 0x2009, 0x001e, 0x2102, 0x2001,
-	0x0017, 0x080c, 0xa88a, 0x2001, 0x1a88, 0x2102, 0x2001, 0x0032,
-	0x080c, 0x1693, 0x00ee, 0x001e, 0x000e, 0x0005, 0x0096, 0x6060,
-	0x904d, 0x0110, 0x080c, 0x1079, 0x009e, 0x0005, 0x0005, 0x00c6,
-	0x0126, 0x2091, 0x8000, 0x080c, 0xab9a, 0x0180, 0x2b08, 0x6112,
-	0x0ca9, 0x6023, 0x0001, 0x2900, 0x6016, 0x2009, 0x0033, 0x080c,
-	0xac8d, 0x9085, 0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8,
-	0x0096, 0x00e6, 0x00f6, 0x2071, 0x1800, 0x9186, 0x0015, 0x1500,
-	0x7090, 0x9086, 0x0018, 0x11e0, 0x6014, 0x2048, 0xaa3c, 0xd2e4,
-	0x1160, 0x2c78, 0x080c, 0x977c, 0x01d8, 0x707c, 0xaa50, 0x9206,
-	0x1160, 0x7080, 0xaa54, 0x9206, 0x1140, 0x6210, 0x00b6, 0x2258,
-	0xbaa0, 0x00be, 0x900e, 0x080c, 0x325e, 0x080c, 0xafff, 0x0020,
-	0x080c, 0xb5c6, 0x080c, 0xabf0, 0x00fe, 0x00ee, 0x009e, 0x0005,
-	0x7060, 0xaa54, 0x9206, 0x0d48, 0x0c80, 0x00c6, 0x0126, 0x2091,
-	0x8000, 0x080c, 0xab9a, 0x0188, 0x2b08, 0x6112, 0x080c, 0xccfe,
-	0x6023, 0x0001, 0x2900, 0x6016, 0x2009, 0x004d, 0x080c, 0xac8d,
-	0x9085, 0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x00c6,
-	0x0126, 0x2091, 0x8000, 0x0016, 0x080c, 0xab9a, 0x0180, 0x2b08,
-	0x6112, 0x080c, 0xccfe, 0x6023, 0x0001, 0x2900, 0x6016, 0x001e,
-	0x080c, 0xac8d, 0x9085, 0x0001, 0x012e, 0x00ce, 0x0005, 0x001e,
-	0x9006, 0x0cd0, 0x0016, 0x0026, 0x0036, 0x0046, 0x0056, 0x0066,
-	0x0096, 0x00e6, 0x00f6, 0x2071, 0x1800, 0x9186, 0x0015, 0x1568,
-	0x7190, 0x6014, 0x2048, 0xa814, 0x8003, 0x9106, 0x1530, 0x20e1,
-	0x0000, 0x2001, 0x199f, 0x2003, 0x0000, 0x6014, 0x2048, 0xa830,
-	0x20a8, 0x8906, 0x8006, 0x8007, 0x9094, 0x003f, 0x22e8, 0x9084,
-	0xffc0, 0x9080, 0x001b, 0x20a0, 0x2001, 0x199f, 0x0016, 0x200c,
-	0x080c, 0xd5a5, 0x001e, 0xa804, 0x9005, 0x0110, 0x2048, 0x0c38,
-	0x6014, 0x2048, 0xa867, 0x0103, 0x0010, 0x080c, 0xb5c6, 0x080c,
-	0xabf0, 0x00fe, 0x00ee, 0x009e, 0x006e, 0x005e, 0x004e, 0x003e,
-	0x002e, 0x001e, 0x0005, 0x0096, 0x00e6, 0x00f6, 0x2071, 0x1800,
-	0x9186, 0x0015, 0x11b8, 0x7090, 0x9086, 0x0004, 0x1198, 0x6014,
-	0x2048, 0x2c78, 0x080c, 0x977c, 0x01a8, 0x707c, 0xaa74, 0x9206,
-	0x1130, 0x7080, 0xaa78, 0x9206, 0x1110, 0x080c, 0x320f, 0x080c,
-	0xafff, 0x0020, 0x080c, 0xb5c6, 0x080c, 0xabf0, 0x00fe, 0x00ee,
-	0x009e, 0x0005, 0x7060, 0xaa78, 0x9206, 0x0d78, 0x0c80, 0x0096,
-	0x00e6, 0x00f6, 0x2071, 0x1800, 0x9186, 0x0015, 0x1550, 0x7090,
-	0x9086, 0x0004, 0x1530, 0x6014, 0x2048, 0x2c78, 0x080c, 0x977c,
-	0x05f0, 0x707c, 0xaacc, 0x9206, 0x1180, 0x7080, 0xaad0, 0x9206,
-	0x1160, 0x080c, 0x320f, 0x0016, 0xa998, 0xaab0, 0x9284, 0x1000,
-	0xc0fd, 0x080c, 0x56ad, 0x001e, 0x0010, 0x080c, 0x5496, 0x080c,
-	0xc865, 0x0508, 0xa87b, 0x0000, 0xa883, 0x0000, 0xa897, 0x4000,
-	0x0080, 0x080c, 0xc865, 0x01b8, 0x6014, 0x2048, 0x080c, 0x5496,
-	0x1d70, 0xa87b, 0x0030, 0xa883, 0x0000, 0xa897, 0x4005, 0xa89b,
-	0x0004, 0x0126, 0x2091, 0x8000, 0xa867, 0x0139, 0x080c, 0x6d9f,
-	0x012e, 0x080c, 0xabf0, 0x00fe, 0x00ee, 0x009e, 0x0005, 0x7060,
-	0xaad0, 0x9206, 0x0930, 0x0888, 0x0016, 0x0026, 0xa87c, 0xd0ac,
-	0x0178, 0xa938, 0xaa34, 0x2100, 0x9205, 0x0150, 0xa890, 0x9106,
-	0x1118, 0xa88c, 0x9206, 0x0120, 0xa992, 0xaa8e, 0x9085, 0x0001,
-	0x002e, 0x001e, 0x0005, 0x00b6, 0x00d6, 0x0036, 0x080c, 0xc865,
-	0x0904, 0xceb9, 0x0096, 0x6314, 0x2348, 0xa87a, 0xa982, 0x929e,
-	0x4000, 0x1580, 0x6310, 0x00c6, 0x2358, 0x2009, 0x0000, 0xa868,
-	0xd0f4, 0x1140, 0x080c, 0x6937, 0x1108, 0xc185, 0xb800, 0xd0bc,
-	0x0108, 0xc18d, 0xaa96, 0xa99a, 0x20a9, 0x0004, 0xa860, 0x20e8,
-	0xa85c, 0x9080, 0x0031, 0x20a0, 0xb8c4, 0x20e0, 0xb8c8, 0x9080,
-	0x0006, 0x2098, 0x080c, 0x0fc4, 0x20a9, 0x0004, 0xa85c, 0x9080,
-	0x0035, 0x20a0, 0xb8c8, 0x9080, 0x000a, 0x2098, 0x080c, 0x0fc4,
-	0x00ce, 0x0090, 0xaa96, 0x3918, 0x9398, 0x0007, 0x231c, 0x6004,
-	0x9086, 0x0016, 0x0110, 0xa89b, 0x0004, 0xaba2, 0x6310, 0x2358,
-	0xb804, 0x9084, 0x00ff, 0xa89e, 0x080c, 0x6d93, 0x6017, 0x0000,
-	0x009e, 0x003e, 0x00de, 0x00be, 0x0005, 0x0026, 0x0036, 0x0046,
-	0x00b6, 0x0096, 0x00f6, 0x6214, 0x2248, 0x6210, 0x2258, 0x2079,
-	0x0260, 0x9096, 0x0000, 0x11a0, 0xb814, 0x9084, 0x00ff, 0x900e,
-	0x080c, 0x2630, 0x2118, 0x831f, 0x939c, 0xff00, 0x7838, 0x9084,
-	0x00ff, 0x931d, 0x7c3c, 0x2011, 0x8018, 0x080c, 0x4b29, 0x00a8,
-	0x9096, 0x0001, 0x1148, 0x89ff, 0x0180, 0xa89b, 0x000d, 0x7838,
-	0xa8a6, 0x783c, 0xa8aa, 0x0048, 0x9096, 0x0002, 0x1130, 0xa89b,
-	0x000d, 0x7838, 0xa8a6, 0x783c, 0xa8aa, 0x00fe, 0x009e, 0x00be,
-	0x004e, 0x003e, 0x002e, 0x0005, 0x00c6, 0x0026, 0x0016, 0x9186,
-	0x0035, 0x0110, 0x6a38, 0x0008, 0x6a2c, 0x080c, 0xc853, 0x01f0,
-	0x2260, 0x6120, 0x9186, 0x0003, 0x0118, 0x9186, 0x0006, 0x1190,
-	0x6838, 0x9206, 0x0140, 0x683c, 0x9206, 0x1160, 0x6108, 0x6838,
-	0x9106, 0x1140, 0x0020, 0x6008, 0x693c, 0x9106, 0x1118, 0x6010,
-	0x6910, 0x9106, 0x001e, 0x002e, 0x00ce, 0x0005, 0x9085, 0x0001,
-	0x0cc8, 0xa974, 0xd1cc, 0x0188, 0x918c, 0x00ff, 0x918e, 0x0002,
-	0x1160, 0xa9a8, 0x918c, 0x0f00, 0x810f, 0x918e, 0x0001, 0x1128,
-	0xa834, 0xa938, 0x9115, 0x190c, 0xbec6, 0x0005, 0x0036, 0x2019,
-	0x0001, 0x0010, 0x0036, 0x901e, 0x0499, 0x01e0, 0x080c, 0xc865,
-	0x01c8, 0x080c, 0xca54, 0x6037, 0x4000, 0x6014, 0x6017, 0x0000,
-	0x0096, 0x2048, 0xa87c, 0x080c, 0xca7a, 0x1118, 0x080c, 0xb5c6,
-	0x0040, 0xa867, 0x0103, 0xa877, 0x0000, 0x83ff, 0x1129, 0x080c,
-	0x6d9f, 0x009e, 0x003e, 0x0005, 0xa880, 0xd0b4, 0x0128, 0xa87b,
-	0x0006, 0xc0ec, 0xa882, 0x0048, 0xd0bc, 0x0118, 0xa87b, 0x0002,
-	0x0020, 0xa87b, 0x0005, 0x080c, 0xcb6e, 0xa877, 0x0000, 0x0005,
-	0x2001, 0x1810, 0x2004, 0xd0ec, 0x0005, 0x0006, 0x2001, 0x1810,
-	0x2004, 0xd0f4, 0x000e, 0x0005, 0x0006, 0x2001, 0x1810, 0x2004,
-	0xd0e4, 0x000e, 0x0005, 0x0036, 0x0046, 0x6010, 0x00b6, 0x2058,
-	0xbba0, 0x00be, 0x2021, 0x0007, 0x080c, 0x4ce0, 0x004e, 0x003e,
-	0x0005, 0x0c51, 0x1d81, 0x0005, 0x2001, 0x1985, 0x2004, 0x601a,
-	0x0005, 0x2001, 0x1987, 0x2004, 0x604a, 0x0005, 0x080c, 0xabf0,
-	0x0804, 0x96bd, 0x611c, 0xd1fc, 0xa97c, 0x1108, 0xd1e4, 0x0005,
-	0x601c, 0xd0fc, 0xa87c, 0x1108, 0xd0e4, 0x0005, 0x601c, 0xd0fc,
-	0xc0fc, 0x601e, 0xa87c, 0x1108, 0xd0e4, 0x0005, 0x6044, 0xd0fc,
-	0x1138, 0xd0bc, 0x0198, 0xc0bc, 0x6046, 0x6003, 0x0002, 0x0070,
-	0xd0ac, 0x1160, 0xd0dc, 0x1128, 0x908c, 0x000f, 0x9186, 0x0005,
-	0x1118, 0x6003, 0x0003, 0x0010, 0x6003, 0x0001, 0x0005, 0x00b6,
-	0x0066, 0x6000, 0x90b2, 0x0016, 0x1a0c, 0x0d7d, 0x001b, 0x006e,
-	0x00be, 0x0005, 0xcff2, 0xd700, 0xd851, 0xcff2, 0xcff2, 0xcff2,
-	0xcff2, 0xcff2, 0xd029, 0xd8d5, 0xcff2, 0xcff2, 0xcff2, 0xcff2,
-	0xcff2, 0xcff2, 0x080c, 0x0d7d, 0x0066, 0x6000, 0x90b2, 0x0016,
-	0x1a0c, 0x0d7d, 0x0013, 0x006e, 0x0005, 0xd00d, 0xddf6, 0xd00d,
-	0xd00d, 0xd00d, 0xd00d, 0xd00d, 0xd00d, 0xdda5, 0xde48, 0xd00d,
-	0xe4a0, 0xe4d4, 0xe4a0, 0xe4d4, 0xd00d, 0x080c, 0x0d7d, 0x6000,
-	0x9082, 0x0016, 0x1a0c, 0x0d7d, 0x6000, 0x000a, 0x0005, 0xd027,
-	0xdab2, 0xdb7d, 0xdba0, 0xdc1c, 0xd027, 0xdd17, 0xdca4, 0xd8df,
-	0xdd7d, 0xdd92, 0xd027, 0xd027, 0xd027, 0xd027, 0xd027, 0x080c,
-	0x0d7d, 0x91b2, 0x0053, 0x1a0c, 0x0d7d, 0x2100, 0x91b2, 0x0040,
-	0x1a04, 0xd476, 0x0002, 0xd073, 0xd267, 0xd073, 0xd073, 0xd073,
-	0xd270, 0xd073, 0xd073, 0xd073, 0xd073, 0xd073, 0xd073, 0xd073,
-	0xd073, 0xd073, 0xd073, 0xd073, 0xd073, 0xd073, 0xd073, 0xd073,
-	0xd073, 0xd073, 0xd075, 0xd0dc, 0xd0eb, 0xd14f, 0xd17a, 0xd1f3,
-	0xd252, 0xd073, 0xd073, 0xd273, 0xd073, 0xd073, 0xd288, 0xd295,
-	0xd073, 0xd073, 0xd073, 0xd073, 0xd073, 0xd318, 0xd073, 0xd073,
-	0xd32c, 0xd073, 0xd073, 0xd2e7, 0xd073, 0xd073, 0xd073, 0xd344,
-	0xd073, 0xd073, 0xd073, 0xd3c1, 0xd073, 0xd073, 0xd073, 0xd073,
-	0xd073, 0xd073, 0xd43e, 0x080c, 0x0d7d, 0x080c, 0x6a4c, 0x1150,
-	0x2001, 0x1837, 0x2004, 0xd0cc, 0x1128, 0x9084, 0x0009, 0x9086,
-	0x0008, 0x1140, 0x6007, 0x0009, 0x602f, 0x0009, 0x6017, 0x0000,
-	0x0804, 0xd260, 0x080c, 0x69e8, 0x00e6, 0x00c6, 0x0036, 0x0026,
-	0x0016, 0x6210, 0x2258, 0xbaa0, 0x0026, 0x2019, 0x0029, 0x080c,
-	0xa899, 0x080c, 0x93c6, 0x0076, 0x903e, 0x080c, 0x928f, 0x2c08,
-	0x080c, 0xe038, 0x007e, 0x001e, 0x080c, 0xa8b5, 0x001e, 0x002e,
-	0x003e, 0x00ce, 0x00ee, 0x6610, 0x2658, 0x080c, 0x6653, 0xbe04,
-	0x9684, 0x00ff, 0x9082, 0x0006, 0x1268, 0x0016, 0x0026, 0x6210,
-	0x00b6, 0x2258, 0xbaa0, 0x00be, 0x2c08, 0x080c, 0xe6fd, 0x002e,
-	0x001e, 0x1178, 0x080c, 0xdf66, 0x1904, 0xd147, 0x080c, 0xdf02,
-	0x1120, 0x6007, 0x0008, 0x0804, 0xd260, 0x6007, 0x0009, 0x0804,
-	0xd260, 0x080c, 0xe199, 0x0128, 0x080c, 0xdf66, 0x0d78, 0x0804,
-	0xd147, 0x6017, 0x1900, 0x0c88, 0x080c, 0x3346, 0x1904, 0xd473,
-	0x6106, 0x080c, 0xdeb3, 0x6007, 0x0006, 0x0804, 0xd260, 0x6007,
-	0x0007, 0x0804, 0xd260, 0x080c, 0xe510, 0x1904, 0xd473, 0x080c,
-	0x3346, 0x1904, 0xd473, 0x00d6, 0x6610, 0x2658, 0xbe04, 0x9684,
-	0x00ff, 0x9082, 0x0006, 0x1220, 0x2001, 0x0001, 0x080c, 0x6580,
-	0x96b4, 0xff00, 0x8637, 0x9686, 0x0006, 0x0188, 0x9686, 0x0004,
-	0x0170, 0xbe04, 0x96b4, 0x00ff, 0x9686, 0x0006, 0x0140, 0x9686,
-	0x0004, 0x0128, 0x9686, 0x0005, 0x0110, 0x00de, 0x0480, 0x00e6,
-	0x2071, 0x0260, 0x7034, 0x9084, 0x0003, 0x1140, 0x7034, 0x9082,
-	0x0014, 0x0220, 0x7030, 0x9084, 0x0003, 0x0130, 0x00ee, 0x6017,
-	0x0000, 0x602f, 0x0007, 0x00b0, 0x00ee, 0x080c, 0xdfce, 0x1190,
-	0x9686, 0x0006, 0x1140, 0x0026, 0x6210, 0x2258, 0xbaa0, 0x900e,
-	0x080c, 0x325e, 0x002e, 0x080c, 0x66df, 0x6007, 0x000a, 0x00de,
-	0x0804, 0xd260, 0x6007, 0x000b, 0x00de, 0x0804, 0xd260, 0x080c,
-	0x320f, 0x080c, 0xcf99, 0x6007, 0x0001, 0x0804, 0xd260, 0x080c,
-	0xe510, 0x1904, 0xd473, 0x080c, 0x3346, 0x1904, 0xd473, 0x2071,
-	0x0260, 0x7034, 0x90b4, 0x0003, 0x1948, 0x90b2, 0x0014, 0x0a30,
-	0x7030, 0x9084, 0x0003, 0x1910, 0x6610, 0x2658, 0xbe04, 0x9686,
-	0x0707, 0x09e8, 0x0026, 0x6210, 0x2258, 0xbaa0, 0x900e, 0x080c,
-	0x325e, 0x002e, 0x6007, 0x000c, 0x2001, 0x0001, 0x080c, 0xe6dd,
-	0x0804, 0xd260, 0x080c, 0x6a4c, 0x1140, 0x2001, 0x1837, 0x2004,
-	0x9084, 0x0009, 0x9086, 0x0008, 0x1110, 0x0804, 0xd082, 0x080c,
-	0x69e8, 0x6610, 0x2658, 0xbe04, 0x9684, 0x00ff, 0x9082, 0x0006,
-	0x06c8, 0x1138, 0x0026, 0x2001, 0x0006, 0x080c, 0x65c0, 0x002e,
-	0x0050, 0x96b4, 0xff00, 0x8637, 0x9686, 0x0004, 0x0120, 0x9686,
-	0x0006, 0x1904, 0xd147, 0x080c, 0xdfdb, 0x1120, 0x6007, 0x000e,
-	0x0804, 0xd260, 0x0046, 0x6410, 0x2458, 0xbca0, 0x0046, 0x080c,
-	0x320f, 0x080c, 0xcf99, 0x004e, 0x0016, 0x9006, 0x2009, 0x1848,
-	0x210c, 0xd1a4, 0x0148, 0x2009, 0x0029, 0x080c, 0xe316, 0x6010,
-	0x2058, 0xb800, 0xc0e5, 0xb802, 0x001e, 0x004e, 0x6007, 0x0001,
-	0x0804, 0xd260, 0x2001, 0x0001, 0x080c, 0x6580, 0x0156, 0x0016,
-	0x0026, 0x0036, 0x20a9, 0x0004, 0x2019, 0x1805, 0x2011, 0x0270,
-	0x080c, 0xbbc1, 0x003e, 0x002e, 0x001e, 0x015e, 0x9005, 0x0168,
-	0x96b4, 0xff00, 0x8637, 0x9682, 0x0004, 0x0a04, 0xd147, 0x9682,
-	0x0007, 0x0a04, 0xd1a3, 0x0804, 0xd147, 0x6017, 0x1900, 0x6007,
-	0x0009, 0x0804, 0xd260, 0x080c, 0x6a4c, 0x1140, 0x2001, 0x1837,
-	0x2004, 0x9084, 0x0009, 0x9086, 0x0008, 0x1110, 0x0804, 0xd082,
-	0x080c, 0x69e8, 0x6610, 0x2658, 0xbe04, 0x9684, 0x00ff, 0x0006,
-	0x9086, 0x0001, 0x000e, 0x0170, 0x9082, 0x0006, 0x0698, 0x0150,
+	0x2091, 0x8000, 0x0016, 0x080c, 0xac5a, 0x0180, 0x2b08, 0x6112,
+	0x080c, 0xce15, 0x6023, 0x0001, 0x2900, 0x6016, 0x001e, 0x080c,
+	0xad4d, 0x9085, 0x0001, 0x012e, 0x00ce, 0x0005, 0x001e, 0x9006,
+	0x0cd0, 0x0016, 0x0026, 0x0036, 0x0046, 0x0056, 0x0066, 0x0096,
+	0x00e6, 0x00f6, 0x2071, 0x1800, 0x9186, 0x0015, 0x1568, 0x7190,
+	0x6014, 0x2048, 0xa814, 0x8003, 0x9106, 0x1530, 0x20e1, 0x0000,
+	0x2001, 0x199f, 0x2003, 0x0000, 0x6014, 0x2048, 0xa830, 0x20a8,
+	0x8906, 0x8006, 0x8007, 0x9094, 0x003f, 0x22e8, 0x9084, 0xffc0,
+	0x9080, 0x001b, 0x20a0, 0x2001, 0x199f, 0x0016, 0x200c, 0x080c,
+	0xd6df, 0x001e, 0xa804, 0x9005, 0x0110, 0x2048, 0x0c38, 0x6014,
+	0x2048, 0xa867, 0x0103, 0x0010, 0x080c, 0xb693, 0x080c, 0xacb0,
+	0x00fe, 0x00ee, 0x009e, 0x006e, 0x005e, 0x004e, 0x003e, 0x002e,
+	0x001e, 0x0005, 0x0096, 0x00e6, 0x00f6, 0x2071, 0x1800, 0x9186,
+	0x0015, 0x11b8, 0x7090, 0x9086, 0x0004, 0x1198, 0x6014, 0x2048,
+	0x2c78, 0x080c, 0x97f7, 0x01a8, 0x707c, 0xaa74, 0x9206, 0x1130,
+	0x7080, 0xaa78, 0x9206, 0x1110, 0x080c, 0x3240, 0x080c, 0xb0bf,
+	0x0020, 0x080c, 0xb693, 0x080c, 0xacb0, 0x00fe, 0x00ee, 0x009e,
+	0x0005, 0x7060, 0xaa78, 0x9206, 0x0d78, 0x0c80, 0x0096, 0x00e6,
+	0x00f6, 0x2071, 0x1800, 0x9186, 0x0015, 0x1550, 0x7090, 0x9086,
+	0x0004, 0x1530, 0x6014, 0x2048, 0x2c78, 0x080c, 0x97f7, 0x05f0,
+	0x707c, 0xaacc, 0x9206, 0x1180, 0x7080, 0xaad0, 0x9206, 0x1160,
+	0x080c, 0x3240, 0x0016, 0xa998, 0xaab0, 0x9284, 0x1000, 0xc0fd,
+	0x080c, 0x56e7, 0x001e, 0x0010, 0x080c, 0x54ca, 0x080c, 0xc97a,
+	0x0508, 0xa87b, 0x0000, 0xa883, 0x0000, 0xa897, 0x4000, 0x0080,
+	0x080c, 0xc97a, 0x01b8, 0x6014, 0x2048, 0x080c, 0x54ca, 0x1d70,
+	0xa87b, 0x0030, 0xa883, 0x0000, 0xa897, 0x4005, 0xa89b, 0x0004,
+	0x0126, 0x2091, 0x8000, 0xa867, 0x0139, 0x080c, 0x6dee, 0x012e,
+	0x080c, 0xacb0, 0x00fe, 0x00ee, 0x009e, 0x0005, 0x7060, 0xaad0,
+	0x9206, 0x0930, 0x0888, 0x0016, 0x0026, 0xa87c, 0xd0ac, 0x0178,
+	0xa938, 0xaa34, 0x2100, 0x9205, 0x0150, 0xa890, 0x9106, 0x1118,
+	0xa88c, 0x9206, 0x0120, 0xa992, 0xaa8e, 0x9085, 0x0001, 0x002e,
+	0x001e, 0x0005, 0x00b6, 0x00d6, 0x0036, 0x080c, 0xc97a, 0x0904,
+	0xcfd0, 0x0096, 0x6314, 0x2348, 0xa87a, 0xa982, 0x929e, 0x4000,
+	0x1580, 0x6310, 0x00c6, 0x2358, 0x2009, 0x0000, 0xa868, 0xd0f4,
+	0x1140, 0x080c, 0x6986, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108,
+	0xc18d, 0xaa96, 0xa99a, 0x20a9, 0x0004, 0xa860, 0x20e8, 0xa85c,
+	0x9080, 0x0031, 0x20a0, 0xb8c4, 0x20e0, 0xb8c8, 0x9080, 0x0006,
+	0x2098, 0x080c, 0x0fc4, 0x20a9, 0x0004, 0xa85c, 0x9080, 0x0035,
+	0x20a0, 0xb8c8, 0x9080, 0x000a, 0x2098, 0x080c, 0x0fc4, 0x00ce,
+	0x0090, 0xaa96, 0x3918, 0x9398, 0x0007, 0x231c, 0x6004, 0x9086,
+	0x0016, 0x0110, 0xa89b, 0x0004, 0xaba2, 0x6310, 0x2358, 0xb804,
+	0x9084, 0x00ff, 0xa89e, 0x080c, 0x6de2, 0x6017, 0x0000, 0x009e,
+	0x003e, 0x00de, 0x00be, 0x0005, 0x0026, 0x0036, 0x0046, 0x00b6,
+	0x0096, 0x00f6, 0x6214, 0x2248, 0x6210, 0x2258, 0x2079, 0x0260,
+	0x9096, 0x0000, 0x11a0, 0xb814, 0x9084, 0x00ff, 0x900e, 0x080c,
+	0x2661, 0x2118, 0x831f, 0x939c, 0xff00, 0x7838, 0x9084, 0x00ff,
+	0x931d, 0x7c3c, 0x2011, 0x8018, 0x080c, 0x4b52, 0x00a8, 0x9096,
+	0x0001, 0x1148, 0x89ff, 0x0180, 0xa89b, 0x000d, 0x7838, 0xa8a6,
+	0x783c, 0xa8aa, 0x0048, 0x9096, 0x0002, 0x1130, 0xa89b, 0x000d,
+	0x7838, 0xa8a6, 0x783c, 0xa8aa, 0x00fe, 0x009e, 0x00be, 0x004e,
+	0x003e, 0x002e, 0x0005, 0x00c6, 0x0026, 0x0016, 0x9186, 0x0035,
+	0x0110, 0x6a38, 0x0008, 0x6a2c, 0x080c, 0xc968, 0x01f0, 0x2260,
+	0x6120, 0x9186, 0x0003, 0x0118, 0x9186, 0x0006, 0x1190, 0x6838,
+	0x9206, 0x0140, 0x683c, 0x9206, 0x1160, 0x6108, 0x6838, 0x9106,
+	0x1140, 0x0020, 0x6008, 0x693c, 0x9106, 0x1118, 0x6010, 0x6910,
+	0x9106, 0x001e, 0x002e, 0x00ce, 0x0005, 0x9085, 0x0001, 0x0cc8,
+	0xa974, 0xd1cc, 0x0188, 0x918c, 0x00ff, 0x918e, 0x0002, 0x1160,
+	0xa9a8, 0x918c, 0x0f00, 0x810f, 0x918e, 0x0001, 0x1128, 0xa834,
+	0xa938, 0x9115, 0x190c, 0xbf96, 0x0005, 0x0036, 0x2019, 0x0001,
+	0x0010, 0x0036, 0x901e, 0x0499, 0x01e0, 0x080c, 0xc97a, 0x01c8,
+	0x080c, 0xcb6b, 0x6037, 0x4000, 0x6014, 0x6017, 0x0000, 0x0096,
+	0x2048, 0xa87c, 0x080c, 0xcb91, 0x1118, 0x080c, 0xb693, 0x0040,
+	0xa867, 0x0103, 0xa877, 0x0000, 0x83ff, 0x1129, 0x080c, 0x6dee,
+	0x009e, 0x003e, 0x0005, 0xa880, 0xd0b4, 0x0128, 0xa87b, 0x0006,
+	0xc0ec, 0xa882, 0x0048, 0xd0bc, 0x0118, 0xa87b, 0x0002, 0x0020,
+	0xa87b, 0x0005, 0x080c, 0xcc85, 0xa877, 0x0000, 0x0005, 0x2001,
+	0x1810, 0x2004, 0xd0ec, 0x0005, 0x0006, 0x2001, 0x1810, 0x2004,
+	0xd0f4, 0x000e, 0x0005, 0x0006, 0x2001, 0x1810, 0x2004, 0xd0e4,
+	0x000e, 0x0005, 0x0036, 0x0046, 0x6010, 0x00b6, 0x2058, 0xbba0,
+	0x00be, 0x2021, 0x0007, 0x080c, 0x4d09, 0x004e, 0x003e, 0x0005,
+	0x0c51, 0x1d81, 0x0005, 0x2001, 0x1985, 0x2004, 0x601a, 0x0005,
+	0x2001, 0x1987, 0x2004, 0x604a, 0x0005, 0x080c, 0xacb0, 0x0804,
+	0x9738, 0x611c, 0xd1fc, 0xa97c, 0x1108, 0xd1e4, 0x0005, 0x601c,
+	0xd0fc, 0xa87c, 0x1108, 0xd0e4, 0x0005, 0x601c, 0xd0fc, 0xc0fc,
+	0x601e, 0xa87c, 0x1108, 0xd0e4, 0x0005, 0x6044, 0xd0fc, 0x1138,
+	0xd0bc, 0x0198, 0xc0bc, 0x6046, 0x6003, 0x0002, 0x0070, 0xd0ac,
+	0x1160, 0xd0dc, 0x1128, 0x908c, 0x000f, 0x9186, 0x0005, 0x1118,
+	0x6003, 0x0003, 0x0010, 0x6003, 0x0001, 0x0005, 0x00b6, 0x0066,
+	0x6000, 0x90b2, 0x0016, 0x1a0c, 0x0d7d, 0x001b, 0x006e, 0x00be,
+	0x0005, 0xd109, 0xd83a, 0xd98b, 0xd109, 0xd109, 0xd109, 0xd109,
+	0xd109, 0xd140, 0xda0f, 0xd109, 0xd109, 0xd109, 0xd109, 0xd109,
+	0xd109, 0x080c, 0x0d7d, 0x0066, 0x6000, 0x90b2, 0x0016, 0x1a0c,
+	0x0d7d, 0x0013, 0x006e, 0x0005, 0xd124, 0xdf30, 0xd124, 0xd124,
+	0xd124, 0xd124, 0xd124, 0xd124, 0xdedf, 0xdf82, 0xd124, 0xe5cf,
+	0xe603, 0xe5cf, 0xe603, 0xd124, 0x080c, 0x0d7d, 0x6000, 0x9082,
+	0x0016, 0x1a0c, 0x0d7d, 0x6000, 0x000a, 0x0005, 0xd13e, 0xdbec,
+	0xdcb7, 0xdcda, 0xdd56, 0xd13e, 0xde51, 0xddde, 0xda19, 0xdeb7,
+	0xdecc, 0xd13e, 0xd13e, 0xd13e, 0xd13e, 0xd13e, 0x080c, 0x0d7d,
+	0x91b2, 0x0053, 0x1a0c, 0x0d7d, 0x2100, 0x91b2, 0x0040, 0x1a04,
+	0xd5b0, 0x0002, 0xd18a, 0xd37e, 0xd18a, 0xd18a, 0xd18a, 0xd387,
+	0xd18a, 0xd18a, 0xd18a, 0xd18a, 0xd18a, 0xd18a, 0xd18a, 0xd18a,
+	0xd18a, 0xd18a, 0xd18a, 0xd18a, 0xd18a, 0xd18a, 0xd18a, 0xd18a,
+	0xd18a, 0xd18c, 0xd1f3, 0xd202, 0xd266, 0xd291, 0xd30a, 0xd369,
+	0xd18a, 0xd18a, 0xd38a, 0xd18a, 0xd18a, 0xd39f, 0xd3ac, 0xd18a,
+	0xd18a, 0xd18a, 0xd18a, 0xd18a, 0xd452, 0xd18a, 0xd18a, 0xd466,
+	0xd18a, 0xd18a, 0xd421, 0xd18a, 0xd18a, 0xd18a, 0xd47e, 0xd18a,
+	0xd18a, 0xd18a, 0xd4fb, 0xd18a, 0xd18a, 0xd18a, 0xd18a, 0xd18a,
+	0xd18a, 0xd578, 0x080c, 0x0d7d, 0x080c, 0x6a9b, 0x1150, 0x2001,
+	0x1837, 0x2004, 0xd0cc, 0x1128, 0x9084, 0x0009, 0x9086, 0x0008,
+	0x1140, 0x6007, 0x0009, 0x602f, 0x0009, 0x6017, 0x0000, 0x0804,
+	0xd377, 0x080c, 0x6a37, 0x00e6, 0x00c6, 0x0036, 0x0026, 0x0016,
+	0x6210, 0x2258, 0xbaa0, 0x0026, 0x2019, 0x0029, 0x080c, 0xa91e,
+	0x080c, 0x943d, 0x0076, 0x903e, 0x080c, 0x9306, 0x2c08, 0x080c,
+	0xe167, 0x007e, 0x001e, 0x080c, 0xa93a, 0x001e, 0x002e, 0x003e,
+	0x00ce, 0x00ee, 0x6610, 0x2658, 0x080c, 0x66a2, 0xbe04, 0x9684,
+	0x00ff, 0x9082, 0x0006, 0x1268, 0x0016, 0x0026, 0x6210, 0x00b6,
+	0x2258, 0xbaa0, 0x00be, 0x2c08, 0x080c, 0xe82c, 0x002e, 0x001e,
+	0x1178, 0x080c, 0xe095, 0x1904, 0xd25e, 0x080c, 0xe031, 0x1120,
+	0x6007, 0x0008, 0x0804, 0xd377, 0x6007, 0x0009, 0x0804, 0xd377,
+	0x080c, 0xe2c8, 0x0128, 0x080c, 0xe095, 0x0d78, 0x0804, 0xd25e,
+	0x6017, 0x1900, 0x0c88, 0x080c, 0x3377, 0x1904, 0xd5ad, 0x6106,
+	0x080c, 0xdfe2, 0x6007, 0x0006, 0x0804, 0xd377, 0x6007, 0x0007,
+	0x0804, 0xd377, 0x080c, 0xe63f, 0x1904, 0xd5ad, 0x080c, 0x3377,
+	0x1904, 0xd5ad, 0x00d6, 0x6610, 0x2658, 0xbe04, 0x9684, 0x00ff,
+	0x9082, 0x0006, 0x1220, 0x2001, 0x0001, 0x080c, 0x65cf, 0x96b4,
+	0xff00, 0x8637, 0x9686, 0x0006, 0x0188, 0x9686, 0x0004, 0x0170,
+	0xbe04, 0x96b4, 0x00ff, 0x9686, 0x0006, 0x0140, 0x9686, 0x0004,
+	0x0128, 0x9686, 0x0005, 0x0110, 0x00de, 0x0480, 0x00e6, 0x2071,
+	0x0260, 0x7034, 0x9084, 0x0003, 0x1140, 0x7034, 0x9082, 0x0014,
+	0x0220, 0x7030, 0x9084, 0x0003, 0x0130, 0x00ee, 0x6017, 0x0000,
+	0x602f, 0x0007, 0x00b0, 0x00ee, 0x080c, 0xe0fd, 0x1190, 0x9686,
+	0x0006, 0x1140, 0x0026, 0x6210, 0x2258, 0xbaa0, 0x900e, 0x080c,
+	0x328f, 0x002e, 0x080c, 0x672e, 0x6007, 0x000a, 0x00de, 0x0804,
+	0xd377, 0x6007, 0x000b, 0x00de, 0x0804, 0xd377, 0x080c, 0x3240,
+	0x080c, 0xd0b0, 0x6007, 0x0001, 0x0804, 0xd377, 0x080c, 0xe63f,
+	0x1904, 0xd5ad, 0x080c, 0x3377, 0x1904, 0xd5ad, 0x2071, 0x0260,
+	0x7034, 0x90b4, 0x0003, 0x1948, 0x90b2, 0x0014, 0x0a30, 0x7030,
+	0x9084, 0x0003, 0x1910, 0x6610, 0x2658, 0xbe04, 0x9686, 0x0707,
+	0x09e8, 0x0026, 0x6210, 0x2258, 0xbaa0, 0x900e, 0x080c, 0x328f,
+	0x002e, 0x6007, 0x000c, 0x2001, 0x0001, 0x080c, 0xe80c, 0x0804,
+	0xd377, 0x080c, 0x6a9b, 0x1140, 0x2001, 0x1837, 0x2004, 0x9084,
+	0x0009, 0x9086, 0x0008, 0x1110, 0x0804, 0xd199, 0x080c, 0x6a37,
+	0x6610, 0x2658, 0xbe04, 0x9684, 0x00ff, 0x9082, 0x0006, 0x06c8,
+	0x1138, 0x0026, 0x2001, 0x0006, 0x080c, 0x660f, 0x002e, 0x0050,
 	0x96b4, 0xff00, 0x8637, 0x9686, 0x0004, 0x0120, 0x9686, 0x0006,
-	0x1904, 0xd147, 0x080c, 0xe009, 0x1130, 0x080c, 0xdf02, 0x1118,
-	0x6007, 0x0010, 0x04e8, 0x0046, 0x6410, 0x2458, 0xbca0, 0x0046,
-	0x080c, 0x320f, 0x080c, 0xcf99, 0x004e, 0x0016, 0x9006, 0x2009,
-	0x1848, 0x210c, 0xd1a4, 0x0148, 0x2009, 0x0029, 0x080c, 0xe316,
-	0x6010, 0x2058, 0xb800, 0xc0e5, 0xb802, 0x001e, 0x004e, 0x6007,
-	0x0001, 0x00f0, 0x080c, 0xe199, 0x0140, 0x96b4, 0xff00, 0x8637,
-	0x9686, 0x0006, 0x0978, 0x0804, 0xd147, 0x6017, 0x1900, 0x6007,
-	0x0009, 0x0070, 0x080c, 0x3346, 0x1904, 0xd473, 0x080c, 0xe510,
-	0x1904, 0xd473, 0x080c, 0xd640, 0x1904, 0xd147, 0x6007, 0x0012,
-	0x6003, 0x0001, 0x080c, 0x9240, 0x080c, 0x96bd, 0x0005, 0x6007,
-	0x0001, 0x6003, 0x0001, 0x080c, 0x9240, 0x080c, 0x96bd, 0x0cb0,
-	0x6007, 0x0005, 0x0c68, 0x080c, 0xe510, 0x1904, 0xd473, 0x080c,
-	0x3346, 0x1904, 0xd473, 0x080c, 0xd640, 0x1904, 0xd147, 0x6007,
-	0x0020, 0x6003, 0x0001, 0x080c, 0x9240, 0x080c, 0x96bd, 0x0005,
-	0x080c, 0x3346, 0x1904, 0xd473, 0x6007, 0x0023, 0x6003, 0x0001,
-	0x080c, 0x9240, 0x080c, 0x96bd, 0x0005, 0x080c, 0xe510, 0x1904,
-	0xd473, 0x080c, 0x3346, 0x1904, 0xd473, 0x080c, 0xd640, 0x1904,
-	0xd147, 0x0016, 0x0026, 0x00e6, 0x2071, 0x0260, 0x7244, 0x9286,
-	0xffff, 0x0180, 0x2c08, 0x080c, 0xc853, 0x01b0, 0x2260, 0x7240,
-	0x6008, 0x9206, 0x1188, 0x6010, 0x9190, 0x0004, 0x2214, 0x9206,
-	0x01b8, 0x0050, 0x7240, 0x2c08, 0x9006, 0x080c, 0xe2e0, 0x1180,
-	0x7244, 0x9286, 0xffff, 0x01b0, 0x2160, 0x6007, 0x0026, 0x6017,
-	0x1700, 0x7214, 0x9296, 0xffff, 0x1180, 0x6007, 0x0025, 0x0068,
-	0x6020, 0x9086, 0x0007, 0x1d80, 0x6004, 0x9086, 0x0024, 0x1110,
-	0x080c, 0xabf0, 0x2160, 0x6007, 0x0025, 0x6003, 0x0001, 0x080c,
-	0x9240, 0x080c, 0x96bd, 0x00ee, 0x002e, 0x001e, 0x0005, 0x2001,
-	0x0001, 0x080c, 0x6580, 0x0156, 0x0016, 0x0026, 0x0036, 0x20a9,
-	0x0004, 0x2019, 0x1805, 0x2011, 0x0276, 0x080c, 0xbbc1, 0x003e,
-	0x002e, 0x001e, 0x015e, 0x0120, 0x6007, 0x0031, 0x0804, 0xd260,
-	0x080c, 0xb832, 0x080c, 0x74ec, 0x1190, 0x0006, 0x0026, 0x0036,
-	0x080c, 0x7506, 0x1138, 0x080c, 0x77ef, 0x080c, 0x6044, 0x080c,
-	0x741d, 0x0010, 0x080c, 0x74c0, 0x003e, 0x002e, 0x000e, 0x0005,
-	0x080c, 0x3346, 0x1904, 0xd473, 0x080c, 0xd640, 0x1904, 0xd147,
-	0x6106, 0x080c, 0xd65c, 0x1120, 0x6007, 0x002b, 0x0804, 0xd260,
-	0x6007, 0x002c, 0x0804, 0xd260, 0x080c, 0xe510, 0x1904, 0xd473,
-	0x080c, 0x3346, 0x1904, 0xd473, 0x080c, 0xd640, 0x1904, 0xd147,
-	0x6106, 0x080c, 0xd661, 0x1120, 0x6007, 0x002e, 0x0804, 0xd260,
-	0x6007, 0x002f, 0x0804, 0xd260, 0x080c, 0x3346, 0x1904, 0xd473,
-	0x00e6, 0x00d6, 0x00c6, 0x6010, 0x2058, 0xb904, 0x9184, 0x00ff,
-	0x9086, 0x0006, 0x0158, 0x9184, 0xff00, 0x8007, 0x9086, 0x0006,
-	0x0128, 0x00ce, 0x00de, 0x00ee, 0x0804, 0xd267, 0x080c, 0x56f9,
-	0xd0e4, 0x0904, 0xd3be, 0x2071, 0x026c, 0x7010, 0x603a, 0x7014,
-	0x603e, 0x7108, 0x720c, 0x080c, 0x6a8a, 0x0140, 0x6010, 0x2058,
-	0xb810, 0x9106, 0x1118, 0xb814, 0x9206, 0x0510, 0x080c, 0x6a86,
-	0x15b8, 0x2069, 0x1800, 0x6880, 0x9206, 0x1590, 0x687c, 0x9106,
-	0x1578, 0x7210, 0x080c, 0xc853, 0x0590, 0x080c, 0xd52b, 0x0578,
-	0x080c, 0xe392, 0x0560, 0x622e, 0x6007, 0x0036, 0x6003, 0x0001,
-	0x2009, 0x8020, 0x080c, 0x9239, 0x00ce, 0x00de, 0x00ee, 0x0005,
-	0x7214, 0x9286, 0xffff, 0x0150, 0x080c, 0xc853, 0x01c0, 0x9280,
-	0x0002, 0x2004, 0x7110, 0x9106, 0x1190, 0x08e0, 0x7210, 0x2c08,
-	0x9085, 0x0001, 0x080c, 0xe2e0, 0x2c10, 0x2160, 0x0140, 0x0890,
-	0x6007, 0x0037, 0x602f, 0x0009, 0x6017, 0x1500, 0x08b8, 0x6007,
-	0x0037, 0x602f, 0x0003, 0x6017, 0x1700, 0x0880, 0x6007, 0x0012,
-	0x0868, 0x080c, 0x3346, 0x1904, 0xd473, 0x6010, 0x2058, 0xb804,
-	0x9084, 0xff00, 0x8007, 0x9086, 0x0006, 0x1904, 0xd267, 0x00e6,
-	0x00d6, 0x00c6, 0x080c, 0x56f9, 0xd0e4, 0x0904, 0xd436, 0x2069,
-	0x1800, 0x2071, 0x026c, 0x7008, 0x603a, 0x720c, 0x623e, 0x9286,
-	0xffff, 0x1150, 0x7208, 0x00c6, 0x2c08, 0x9085, 0x0001, 0x080c,
-	0xe2e0, 0x2c10, 0x00ce, 0x05e8, 0x080c, 0xc853, 0x05d0, 0x7108,
-	0x9280, 0x0002, 0x2004, 0x9106, 0x15a0, 0x00c6, 0x0026, 0x2260,
-	0x080c, 0xc446, 0x002e, 0x00ce, 0x7118, 0x918c, 0xff00, 0x810f,
-	0x9186, 0x0001, 0x0178, 0x9186, 0x0005, 0x0118, 0x9186, 0x0007,
-	0x1198, 0x9280, 0x0005, 0x2004, 0x9005, 0x0170, 0x080c, 0xd52b,
-	0x0904, 0xd3b7, 0x0056, 0x7510, 0x7614, 0x080c, 0xe3ab, 0x005e,
-	0x00ce, 0x00de, 0x00ee, 0x0005, 0x6007, 0x003b, 0x602f, 0x0009,
-	0x6017, 0x2a00, 0x6003, 0x0001, 0x2009, 0x8020, 0x080c, 0x9239,
-	0x0c78, 0x6007, 0x003b, 0x602f, 0x0003, 0x6017, 0x0300, 0x6003,
-	0x0001, 0x2009, 0x8020, 0x080c, 0x9239, 0x0c10, 0x6007, 0x003b,
-	0x602f, 0x000b, 0x6017, 0x0000, 0x0804, 0xd38e, 0x00e6, 0x0026,
-	0x080c, 0x6a4c, 0x0550, 0x080c, 0x69e8, 0x080c, 0xe582, 0x1518,
-	0x2071, 0x1800, 0x70dc, 0x9085, 0x0003, 0x70de, 0x00f6, 0x2079,
-	0x0100, 0x72b0, 0x9284, 0x00ff, 0x707e, 0x78e6, 0x9284, 0xff00,
-	0x7280, 0x9205, 0x7082, 0x78ea, 0x00fe, 0x70e7, 0x0000, 0x080c,
-	0x6a8a, 0x0120, 0x2011, 0x1a08, 0x2013, 0x07d0, 0xd0ac, 0x1128,
-	0x080c, 0x2fe0, 0x0010, 0x080c, 0xe5b4, 0x002e, 0x00ee, 0x080c,
-	0xabf0, 0x0804, 0xd266, 0x080c, 0xabf0, 0x0005, 0x2600, 0x0002,
-	0xd48a, 0xd4bb, 0xd4cc, 0xd48a, 0xd48a, 0xd48c, 0xd4dd, 0xd48a,
-	0xd48a, 0xd48a, 0xd4a9, 0xd48a, 0xd48a, 0xd48a, 0xd4e8, 0xd4f5,
-	0xd526, 0xd48a, 0x080c, 0x0d7d, 0x080c, 0xe510, 0x1d20, 0x080c,
-	0x3346, 0x1d08, 0x080c, 0xd640, 0x1148, 0x7038, 0x6016, 0x6007,
-	0x0045, 0x6003, 0x0001, 0x080c, 0x9240, 0x0005, 0x080c, 0x320f,
-	0x080c, 0xcf99, 0x6007, 0x0001, 0x6003, 0x0001, 0x080c, 0x9240,
-	0x0005, 0x080c, 0xe510, 0x1938, 0x080c, 0x3346, 0x1920, 0x080c,
-	0xd640, 0x1d60, 0x703c, 0x6016, 0x6007, 0x004a, 0x6003, 0x0001,
-	0x080c, 0x9240, 0x0005, 0x080c, 0x3346, 0x1904, 0xd473, 0x2009,
-	0x0041, 0x080c, 0xe5bd, 0x6007, 0x0047, 0x6003, 0x0001, 0x080c,
-	0x9240, 0x080c, 0x96bd, 0x0005, 0x080c, 0x3346, 0x1904, 0xd473,
-	0x2009, 0x0042, 0x080c, 0xe5bd, 0x6007, 0x0047, 0x6003, 0x0001,
-	0x080c, 0x9240, 0x080c, 0x96bd, 0x0005, 0x080c, 0x3346, 0x1904,
-	0xd473, 0x2009, 0x0046, 0x080c, 0xe5bd, 0x080c, 0xabf0, 0x0005,
-	0x080c, 0xd548, 0x0904, 0xd473, 0x6007, 0x004e, 0x6003, 0x0001,
-	0x080c, 0x9240, 0x080c, 0x96bd, 0x0005, 0x6007, 0x004f, 0x6017,
-	0x0000, 0x7134, 0x918c, 0x00ff, 0x81ff, 0x0508, 0x9186, 0x0001,
-	0x1160, 0x7140, 0x2001, 0x19bc, 0x2004, 0x9106, 0x11b0, 0x7144,
-	0x2001, 0x19bd, 0x2004, 0x9106, 0x0190, 0x9186, 0x0002, 0x1168,
-	0x2011, 0x0276, 0x20a9, 0x0004, 0x6010, 0x0096, 0x2048, 0x2019,
-	0x000a, 0x080c, 0xbbd5, 0x009e, 0x0110, 0x6017, 0x0001, 0x6003,
-	0x0001, 0x080c, 0x9240, 0x080c, 0x96bd, 0x0005, 0x6007, 0x0050,
-	0x703c, 0x6016, 0x0ca0, 0x0016, 0x00e6, 0x2071, 0x0260, 0x00b6,
-	0x00c6, 0x2260, 0x6010, 0x2058, 0xb8d4, 0xd084, 0x0150, 0x7128,
-	0x6050, 0x9106, 0x1120, 0x712c, 0x604c, 0x9106, 0x0110, 0x9006,
-	0x0010, 0x9085, 0x0001, 0x00ce, 0x00be, 0x00ee, 0x001e, 0x0005,
-	0x0016, 0x0096, 0x0086, 0x00e6, 0x01c6, 0x01d6, 0x0126, 0x2091,
-	0x8000, 0x2071, 0x1800, 0x7090, 0x908a, 0x00f9, 0x16e8, 0x20e1,
-	0x0000, 0x2001, 0x199f, 0x2003, 0x0000, 0x080c, 0x1060, 0x05a0,
-	0x2900, 0x6016, 0x7090, 0x8004, 0xa816, 0x908a, 0x001e, 0x02d0,
-	0xa833, 0x001e, 0x20a9, 0x001e, 0xa860, 0x20e8, 0xa85c, 0x9080,
-	0x001b, 0x20a0, 0x2001, 0x199f, 0x0016, 0x200c, 0x0471, 0x001e,
-	0x2940, 0x080c, 0x1060, 0x01c0, 0x2900, 0xa006, 0x2100, 0x81ff,
-	0x0180, 0x0c18, 0xa832, 0x20a8, 0xa860, 0x20e8, 0xa85c, 0x9080,
-	0x001b, 0x20a0, 0x2001, 0x199f, 0x0016, 0x200c, 0x00b1, 0x001e,
-	0x0000, 0x9085, 0x0001, 0x0048, 0x2071, 0x1800, 0x7093, 0x0000,
-	0x6014, 0x2048, 0x080c, 0x0ff9, 0x9006, 0x012e, 0x01de, 0x01ce,
-	0x00ee, 0x008e, 0x009e, 0x001e, 0x0005, 0x0006, 0x0016, 0x0026,
-	0x0036, 0x00c6, 0x918c, 0xffff, 0x11a8, 0x080c, 0x21b2, 0x2099,
-	0x026c, 0x2001, 0x0014, 0x3518, 0x9312, 0x1218, 0x23a8, 0x4003,
-	0x00f8, 0x20a8, 0x4003, 0x22a8, 0x8108, 0x080c, 0x21b2, 0x2099,
-	0x0260, 0x0ca8, 0x080c, 0x21b2, 0x2061, 0x199f, 0x6004, 0x2098,
-	0x6008, 0x3518, 0x9312, 0x1218, 0x23a8, 0x4003, 0x0048, 0x20a8,
-	0x4003, 0x22a8, 0x8108, 0x080c, 0x21b2, 0x2099, 0x0260, 0x0ca8,
-	0x2061, 0x199f, 0x2019, 0x0280, 0x3300, 0x931e, 0x0110, 0x6006,
-	0x0020, 0x2001, 0x0260, 0x6006, 0x8108, 0x2162, 0x9292, 0x0021,
-	0x9296, 0xffff, 0x620a, 0x00ce, 0x003e, 0x002e, 0x001e, 0x000e,
-	0x0005, 0x0006, 0x0016, 0x0026, 0x0036, 0x00c6, 0x81ff, 0x11b8,
-	0x080c, 0x21ca, 0x20a1, 0x024c, 0x2001, 0x0014, 0x3518, 0x9312,
-	0x1218, 0x23a8, 0x4003, 0x0418, 0x20a8, 0x4003, 0x82ff, 0x01f8,
-	0x22a8, 0x8108, 0x080c, 0x21ca, 0x20a1, 0x0240, 0x0c98, 0x080c,
-	0x21ca, 0x2061, 0x19a2, 0x6004, 0x20a0, 0x6008, 0x3518, 0x9312,
-	0x1218, 0x23a8, 0x4003, 0x0058, 0x20a8, 0x4003, 0x82ff, 0x0138,
-	0x22a8, 0x8108, 0x080c, 0x21ca, 0x20a1, 0x0240, 0x0c98, 0x2061,
-	0x19a2, 0x2019, 0x0260, 0x3400, 0x931e, 0x0110, 0x6006, 0x0020,
-	0x2001, 0x0240, 0x6006, 0x8108, 0x2162, 0x9292, 0x0021, 0x9296,
-	0xffff, 0x620a, 0x00ce, 0x003e, 0x002e, 0x001e, 0x000e, 0x0005,
-	0x00b6, 0x0066, 0x6610, 0x2658, 0xbe04, 0x96b4, 0xff00, 0x8637,
-	0x9686, 0x0006, 0x0170, 0x9686, 0x0004, 0x0158, 0xbe04, 0x96b4,
-	0x00ff, 0x9686, 0x0006, 0x0128, 0x9686, 0x0004, 0x0110, 0x9085,
-	0x0001, 0x006e, 0x00be, 0x0005, 0x00d6, 0x080c, 0xd6d6, 0x00de,
-	0x0005, 0x00d6, 0x080c, 0xd6e3, 0x1520, 0x680c, 0x908c, 0xff00,
-	0x6820, 0x9084, 0x00ff, 0x9115, 0x6216, 0x6824, 0x602e, 0xd1e4,
-	0x0130, 0x9006, 0x080c, 0xe6dd, 0x2009, 0x0001, 0x0078, 0xd1ec,
-	0x0180, 0x6920, 0x918c, 0x00ff, 0x6824, 0x080c, 0x2630, 0x1148,
-	0x2001, 0x0001, 0x080c, 0xe6dd, 0x2110, 0x900e, 0x080c, 0x325e,
-	0x0018, 0x9085, 0x0001, 0x0008, 0x9006, 0x00de, 0x0005, 0x00b6,
-	0x00c6, 0x080c, 0xac60, 0x0598, 0x0016, 0x0026, 0x00c6, 0x2011,
-	0x0263, 0x2204, 0x8211, 0x220c, 0x080c, 0x2630, 0x1568, 0x080c,
-	0x65e3, 0x1550, 0xbe12, 0xbd16, 0x00ce, 0x002e, 0x001e, 0x2b00,
-	0x6012, 0x080c, 0xe510, 0x11c8, 0x080c, 0x3346, 0x11b0, 0x080c,
-	0xd640, 0x0500, 0x2001, 0x0007, 0x080c, 0x6594, 0x2001, 0x0007,
-	0x080c, 0x65c0, 0x6017, 0x0000, 0x6023, 0x0001, 0x6007, 0x0001,
-	0x6003, 0x0001, 0x080c, 0x9240, 0x0010, 0x080c, 0xabf0, 0x9085,
-	0x0001, 0x00ce, 0x00be, 0x0005, 0x080c, 0xabf0, 0x00ce, 0x002e,
-	0x001e, 0x0ca8, 0x080c, 0xabf0, 0x9006, 0x0c98, 0x2069, 0x026d,
-	0x6800, 0x9082, 0x0010, 0x1228, 0x6017, 0x0000, 0x9085, 0x0001,
-	0x0008, 0x9006, 0x0005, 0x6017, 0x0000, 0x2069, 0x026c, 0x6808,
-	0x9084, 0xff00, 0x9086, 0x0800, 0x1190, 0x6904, 0x9186, 0x0018,
-	0x0118, 0x9186, 0x0014, 0x1158, 0x810f, 0x6800, 0x9084, 0x00ff,
-	0x910d, 0x6162, 0x908e, 0x0014, 0x0110, 0x908e, 0x0010, 0x0005,
-	0x6004, 0x90b2, 0x0053, 0x1a0c, 0x0d7d, 0x91b6, 0x0013, 0x1130,
-	0x2008, 0x91b2, 0x0040, 0x1a04, 0xd825, 0x0092, 0x91b6, 0x0027,
-	0x0120, 0x91b6, 0x0014, 0x190c, 0x0d7d, 0x2001, 0x0007, 0x080c,
-	0x65c0, 0x080c, 0x95ff, 0x080c, 0xac2b, 0x080c, 0x96bd, 0x0005,
-	0xd760, 0xd762, 0xd760, 0xd760, 0xd760, 0xd762, 0xd76f, 0xd822,
-	0xd7bf, 0xd822, 0xd7d3, 0xd822, 0xd76f, 0xd822, 0xd81a, 0xd822,
-	0xd81a, 0xd822, 0xd822, 0xd760, 0xd760, 0xd760, 0xd760, 0xd760,
-	0xd760, 0xd760, 0xd760, 0xd760, 0xd760, 0xd760, 0xd762, 0xd760,
-	0xd822, 0xd760, 0xd760, 0xd822, 0xd760, 0xd81f, 0xd822, 0xd760,
-	0xd760, 0xd760, 0xd760, 0xd822, 0xd822, 0xd760, 0xd822, 0xd822,
-	0xd760, 0xd76a, 0xd760, 0xd760, 0xd760, 0xd760, 0xd81e, 0xd822,
-	0xd760, 0xd760, 0xd822, 0xd822, 0xd760, 0xd760, 0xd760, 0xd760,
-	0x080c, 0x0d7d, 0x080c, 0xcf9c, 0x6003, 0x0002, 0x080c, 0x96bd,
-	0x0804, 0xd824, 0x9006, 0x080c, 0x6580, 0x0804, 0xd822, 0x080c,
-	0x6a86, 0x1904, 0xd822, 0x9006, 0x080c, 0x6580, 0x6010, 0x2058,
-	0xb810, 0x9086, 0x00ff, 0x1140, 0x00f6, 0x2079, 0x1800, 0x78a8,
-	0x8000, 0x78aa, 0x00fe, 0x0428, 0x6010, 0x2058, 0xb884, 0x9005,
-	0x1178, 0x080c, 0xcf84, 0x1904, 0xd822, 0x0036, 0x0046, 0xbba0,
-	0x2021, 0x0007, 0x080c, 0x4ce0, 0x004e, 0x003e, 0x0804, 0xd822,
-	0x080c, 0x3377, 0x1904, 0xd822, 0x2001, 0x1800, 0x2004, 0x9086,
-	0x0002, 0x1138, 0x00f6, 0x2079, 0x1800, 0x78a8, 0x8000, 0x78aa,
-	0x00fe, 0x2001, 0x0002, 0x080c, 0x6594, 0x6023, 0x0001, 0x6003,
-	0x0001, 0x6007, 0x0002, 0x080c, 0x9240, 0x080c, 0x96bd, 0x6110,
-	0x2158, 0x2009, 0x0001, 0x080c, 0x865f, 0x0804, 0xd824, 0x6610,
-	0x2658, 0xbe04, 0x96b4, 0xff00, 0x8637, 0x9686, 0x0006, 0x0904,
-	0xd822, 0x9686, 0x0004, 0x0904, 0xd822, 0x080c, 0x8ee5, 0x2001,
-	0x0004, 0x0804, 0xd820, 0x2001, 0x1800, 0x2004, 0x9086, 0x0003,
-	0x1158, 0x0036, 0x0046, 0x6010, 0x2058, 0xbba0, 0x2021, 0x0006,
-	0x080c, 0x4ce0, 0x004e, 0x003e, 0x2001, 0x0006, 0x080c, 0xd83e,
-	0x6610, 0x2658, 0xbe04, 0x0066, 0x96b4, 0xff00, 0x8637, 0x9686,
-	0x0006, 0x006e, 0x0168, 0x2001, 0x0006, 0x080c, 0x65c0, 0x9284,
-	0x00ff, 0x908e, 0x0007, 0x1120, 0x2001, 0x0006, 0x080c, 0x6594,
-	0x080c, 0x6a86, 0x11f8, 0x2001, 0x1837, 0x2004, 0xd0a4, 0x01d0,
-	0xbe04, 0x96b4, 0x00ff, 0x9686, 0x0006, 0x01a0, 0x00f6, 0x2079,
-	0x1800, 0x78a8, 0x8000, 0x78aa, 0x00fe, 0x0804, 0xd7a9, 0x2001,
-	0x0004, 0x0030, 0x2001, 0x0006, 0x0409, 0x0020, 0x0018, 0x0010,
-	0x080c, 0x65c0, 0x080c, 0xabf0, 0x0005, 0x2600, 0x0002, 0xd839,
-	0xd839, 0xd839, 0xd839, 0xd839, 0xd83b, 0xd839, 0xd83b, 0xd839,
-	0xd839, 0xd83b, 0xd839, 0xd839, 0xd839, 0xd83b, 0xd83b, 0xd83b,
-	0xd83b, 0x080c, 0x0d7d, 0x080c, 0xabf0, 0x0005, 0x0016, 0x00b6,
-	0x00d6, 0x6110, 0x2158, 0xb900, 0xd184, 0x0138, 0x080c, 0x6594,
-	0x9006, 0x080c, 0x6580, 0x080c, 0x323e, 0x00de, 0x00be, 0x001e,
-	0x0005, 0x6610, 0x2658, 0xb804, 0x9084, 0xff00, 0x8007, 0x90b2,
-	0x000c, 0x1a0c, 0x0d7d, 0x91b6, 0x0015, 0x1110, 0x003b, 0x0028,
-	0x91b6, 0x0016, 0x190c, 0x0d7d, 0x006b, 0x0005, 0xb6af, 0xb6af,
-	0xb6af, 0xb6af, 0xd8d3, 0xb6af, 0xd8bd, 0xd87e, 0xb6af, 0xb6af,
-	0xb6af, 0xb6af, 0xb6af, 0xb6af, 0xb6af, 0xb6af, 0xd8d3, 0xb6af,
-	0xd8bd, 0xd8c4, 0xb6af, 0xb6af, 0xb6af, 0xb6af, 0x00f6, 0x080c,
-	0x6a86, 0x11d8, 0x080c, 0xcf84, 0x11c0, 0x6010, 0x905d, 0x01a8,
-	0xb884, 0x9005, 0x0190, 0x9006, 0x080c, 0x6580, 0x2001, 0x0002,
-	0x080c, 0x6594, 0x6023, 0x0001, 0x6003, 0x0001, 0x6007, 0x0002,
-	0x080c, 0x9240, 0x080c, 0x96bd, 0x00f0, 0x2011, 0x0263, 0x2204,
-	0x8211, 0x220c, 0x080c, 0x2630, 0x11b0, 0x080c, 0x6644, 0x0118,
-	0x080c, 0xabf0, 0x0080, 0xb810, 0x0006, 0xb814, 0x0006, 0xb884,
-	0x0006, 0x080c, 0x605e, 0x000e, 0xb886, 0x000e, 0xb816, 0x000e,
-	0xb812, 0x080c, 0xabf0, 0x00fe, 0x0005, 0x6604, 0x96b6, 0x001e,
-	0x1110, 0x080c, 0xabf0, 0x0005, 0x080c, 0xba3a, 0x1148, 0x6003,
-	0x0001, 0x6007, 0x0001, 0x080c, 0x9240, 0x080c, 0x96bd, 0x0010,
-	0x080c, 0xabf0, 0x0005, 0x0804, 0xabf0, 0x6004, 0x908a, 0x0053,
-	0x1a0c, 0x0d7d, 0x080c, 0x95ff, 0x080c, 0xac2b, 0x0005, 0x9182,
-	0x0040, 0x0002, 0xd8f6, 0xd8f6, 0xd8f6, 0xd8f6, 0xd8f8, 0xd8f6,
-	0xd8f6, 0xd8f6, 0xd8f6, 0xd8f6, 0xd8f6, 0xd8f6, 0xd8f6, 0xd8f6,
-	0xd8f6, 0xd8f6, 0xd8f6, 0xd8f6, 0xd8f6, 0xd8f6, 0x080c, 0x0d7d,
-	0x0096, 0x00b6, 0x00d6, 0x00e6, 0x00f6, 0x0046, 0x0026, 0x6210,
-	0x2258, 0xb8bc, 0x9005, 0x11b0, 0x6007, 0x0044, 0x2071, 0x0260,
-	0x7444, 0x94a4, 0xff00, 0x0904, 0xd95f, 0x080c, 0xe6d1, 0x1170,
-	0x9486, 0x2000, 0x1158, 0x2009, 0x0001, 0x2011, 0x0200, 0x080c,
-	0x8902, 0x0020, 0x9026, 0x080c, 0xe555, 0x0c30, 0x080c, 0x1047,
-	0x090c, 0x0d7d, 0x6003, 0x0007, 0xa867, 0x010d, 0x9006, 0xa802,
-	0xa86a, 0xac8a, 0x2c00, 0xa88e, 0x6008, 0xa8e2, 0x6010, 0x2058,
-	0xb8a0, 0x7130, 0xa97a, 0x0016, 0xa876, 0xa87f, 0x0000, 0xa883,
-	0x0000, 0xa887, 0x0036, 0x080c, 0x6d9f, 0x001e, 0x080c, 0xe6d1,
-	0x1904, 0xd9bf, 0x9486, 0x2000, 0x1130, 0x2019, 0x0017, 0x080c,
-	0xe286, 0x0804, 0xd9bf, 0x9486, 0x0200, 0x1120, 0x080c, 0xe216,
-	0x0804, 0xd9bf, 0x9486, 0x0400, 0x0120, 0x9486, 0x1000, 0x1904,
-	0xd9bf, 0x2019, 0x0002, 0x080c, 0xe235, 0x0804, 0xd9bf, 0x2069,
-	0x1a6e, 0x6a00, 0xd284, 0x0904, 0xda29, 0x9284, 0x0300, 0x1904,
-	0xda22, 0x6804, 0x9005, 0x0904, 0xda0a, 0x2d78, 0x6003, 0x0007,
-	0x080c, 0x1060, 0x0904, 0xd9cb, 0x7800, 0xd08c, 0x1118, 0x7804,
-	0x8001, 0x7806, 0x6017, 0x0000, 0x2001, 0x180f, 0x2004, 0xd084,
-	0x1904, 0xda2d, 0x9006, 0xa802, 0xa867, 0x0116, 0xa86a, 0x6008,
-	0xa8e2, 0x2c00, 0xa87a, 0x6010, 0x2058, 0xb8a0, 0x7130, 0xa9b6,
-	0xa876, 0xb928, 0xa9ba, 0xb92c, 0xa9be, 0xb930, 0xa9c2, 0xb934,
-	0xa9c6, 0xa883, 0x003d, 0x7044, 0x9084, 0x0003, 0x9080, 0xd9c7,
-	0x2005, 0xa87e, 0x20a9, 0x000a, 0x2001, 0x0270, 0xaa5c, 0x9290,
-	0x0021, 0x2009, 0x0205, 0x200b, 0x0080, 0x20e1, 0x0000, 0xab60,
-	0x23e8, 0x2098, 0x22a0, 0x4003, 0x200b, 0x0000, 0x2001, 0x027a,
-	0x200c, 0xa9b2, 0x8000, 0x200c, 0xa9ae, 0x080c, 0x6da2, 0x002e,
-	0x004e, 0x00fe, 0x00ee, 0x00de, 0x00be, 0x009e, 0x0005, 0x0000,
-	0x0080, 0x0040, 0x0000, 0x2001, 0x1810, 0x2004, 0xd084, 0x0120,
-	0x080c, 0x1047, 0x1904, 0xd974, 0x6017, 0xf100, 0x6003, 0x0001,
-	0x6007, 0x0041, 0x2009, 0xa022, 0x080c, 0x9239, 0x0c00, 0x2069,
-	0x0260, 0x6848, 0x9084, 0xff00, 0x9086, 0x1200, 0x1198, 0x686c,
-	0x9084, 0x00ff, 0x0016, 0x6114, 0x918c, 0xf700, 0x910d, 0x6116,
-	0x001e, 0x6003, 0x0001, 0x6007, 0x0043, 0x2009, 0xa025, 0x080c,
-	0x9239, 0x0828, 0x6868, 0x602e, 0x686c, 0x6032, 0x6017, 0xf200,
-	0x6003, 0x0001, 0x6007, 0x0041, 0x2009, 0xa022, 0x080c, 0x9239,
-	0x0804, 0xd9bf, 0x2001, 0x180e, 0x2004, 0xd0ec, 0x0120, 0x2011,
-	0x8049, 0x080c, 0x4b29, 0x6017, 0xf300, 0x0010, 0x6017, 0xf100,
-	0x6003, 0x0001, 0x6007, 0x0041, 0x2009, 0xa022, 0x080c, 0x9239,
-	0x0804, 0xd9bf, 0x6017, 0xf500, 0x0c98, 0x6017, 0xf600, 0x0804,
-	0xd9df, 0x6017, 0xf200, 0x0804, 0xd9df, 0xa867, 0x0146, 0xa86b,
-	0x0000, 0x6008, 0xa886, 0x2c00, 0xa87a, 0x7044, 0x9084, 0x0003,
-	0x9080, 0xd9c7, 0x2005, 0xa87e, 0x2928, 0x6010, 0x2058, 0xb8a0,
-	0xa876, 0xb828, 0xa88a, 0xb82c, 0xa88e, 0xb830, 0xa892, 0xb834,
-	0xa896, 0xa883, 0x003d, 0x2009, 0x0205, 0x2104, 0x9085, 0x0080,
-	0x200a, 0x20e1, 0x0000, 0x2011, 0x0210, 0x2214, 0x9294, 0x0fff,
-	0xaaa2, 0x9282, 0x0111, 0x1a0c, 0x0d7d, 0x8210, 0x821c, 0x2001,
-	0x026c, 0x2098, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0029, 0x20a0,
-	0x2011, 0xdaa9, 0x2041, 0x0001, 0x223d, 0x9784, 0x00ff, 0x9322,
-	0x1208, 0x2300, 0x20a8, 0x4003, 0x931a, 0x0530, 0x8210, 0xd7fc,
-	0x1130, 0x8d68, 0x2d0a, 0x2001, 0x0260, 0x2098, 0x0c68, 0x2950,
-	0x080c, 0x1060, 0x0170, 0x2900, 0xb002, 0xa867, 0x0147, 0xa86b,
-	0x0000, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x001b, 0x20a0, 0x8840,
-	0x08d8, 0x2548, 0xa800, 0x902d, 0x0118, 0x080c, 0x1079, 0x0cc8,
-	0x080c, 0x1079, 0x0804, 0xd9cb, 0x2548, 0x8847, 0x9885, 0x0046,
-	0xa866, 0x2009, 0x0205, 0x200b, 0x0000, 0x080c, 0xe2b9, 0x0804,
-	0xd9bf, 0x8010, 0x0004, 0x801a, 0x0006, 0x8018, 0x0008, 0x8016,
-	0x000a, 0x8014, 0x9186, 0x0013, 0x1160, 0x6004, 0x908a, 0x0057,
-	0x1a0c, 0x0d7d, 0x9082, 0x0040, 0x0a0c, 0x0d7d, 0x2008, 0x0804,
-	0xdb35, 0x9186, 0x0051, 0x0108, 0x0040, 0x080c, 0xaaab, 0x01e8,
-	0x9086, 0x0002, 0x0904, 0xdb7d, 0x00c0, 0x9186, 0x0027, 0x0180,
-	0x9186, 0x0048, 0x0128, 0x9186, 0x0014, 0x0150, 0x190c, 0x0d7d,
-	0x080c, 0xaaab, 0x0150, 0x9086, 0x0004, 0x0904, 0xdc1c, 0x0028,
-	0x6004, 0x9082, 0x0040, 0x2008, 0x001a, 0x080c, 0xacaa, 0x0005,
-	0xdafc, 0xdafe, 0xdafe, 0xdb25, 0xdafc, 0xdafc, 0xdafc, 0xdafc,
-	0xdafc, 0xdafc, 0xdafc, 0xdafc, 0xdafc, 0xdafc, 0xdafc, 0xdafc,
-	0xdafc, 0xdafc, 0xdafc, 0xdafc, 0x080c, 0x0d7d, 0x080c, 0x95ff,
-	0x080c, 0x96bd, 0x0036, 0x0096, 0x6014, 0x904d, 0x01d8, 0x080c,
-	0xc865, 0x01c0, 0x6003, 0x0002, 0x6010, 0x00b6, 0x2058, 0xb800,
-	0x00be, 0xd0bc, 0x1178, 0x2019, 0x0004, 0x080c, 0xe2b9, 0x6017,
-	0x0000, 0x6018, 0x9005, 0x1120, 0x2001, 0x1986, 0x2004, 0x601a,
-	0x6003, 0x0007, 0x009e, 0x003e, 0x0005, 0x0096, 0x080c, 0x95ff,
-	0x080c, 0x96bd, 0x080c, 0xc865, 0x0120, 0x6014, 0x2048, 0x080c,
-	0x1079, 0x080c, 0xac2b, 0x009e, 0x0005, 0x0002, 0xdb4a, 0xdb5f,
-	0xdb4c, 0xdb74, 0xdb4a, 0xdb4a, 0xdb4a, 0xdb4a, 0xdb4a, 0xdb4a,
-	0xdb4a, 0xdb4a, 0xdb4a, 0xdb4a, 0xdb4a, 0xdb4a, 0xdb4a, 0xdb4a,
-	0xdb4a, 0xdb4a, 0x080c, 0x0d7d, 0x0096, 0x6014, 0x2048, 0xa87c,
-	0xd0b4, 0x0138, 0x6003, 0x0007, 0x2009, 0x0043, 0x080c, 0xac8d,
-	0x0010, 0x6003, 0x0004, 0x080c, 0x96bd, 0x009e, 0x0005, 0x080c,
-	0xc865, 0x0138, 0x6114, 0x0096, 0x2148, 0xa97c, 0x009e, 0xd1ec,
-	0x1138, 0x080c, 0x88d7, 0x080c, 0xabf0, 0x080c, 0x96bd, 0x0005,
-	0x080c, 0xe519, 0x0db0, 0x0cc8, 0x6003, 0x0001, 0x6007, 0x0041,
-	0x2009, 0xa022, 0x080c, 0x9239, 0x0005, 0x9182, 0x0040, 0x0002,
-	0xdb94, 0xdb96, 0xdb94, 0xdb94, 0xdb94, 0xdb94, 0xdb94, 0xdb94,
-	0xdb94, 0xdb94, 0xdb94, 0xdb94, 0xdb94, 0xdb94, 0xdb94, 0xdb94,
-	0xdb94, 0xdb97, 0xdb94, 0xdb94, 0x080c, 0x0d7d, 0x0005, 0x00d6,
-	0x080c, 0x88d7, 0x00de, 0x080c, 0xe571, 0x080c, 0xabf0, 0x0005,
-	0x9182, 0x0040, 0x0002, 0xdbb7, 0xdbb7, 0xdbb7, 0xdbb7, 0xdbb7,
-	0xdbb7, 0xdbb7, 0xdbb7, 0xdbb7, 0xdbb9, 0xdbe4, 0xdbb7, 0xdbb7,
-	0xdbb7, 0xdbb7, 0xdbe4, 0xdbb7, 0xdbb7, 0xdbb7, 0xdbb7, 0x080c,
-	0x0d7d, 0x6014, 0x0096, 0x2048, 0xa87c, 0xd0fc, 0x0168, 0x908c,
-	0x0003, 0x918e, 0x0002, 0x0180, 0x6144, 0xd1e4, 0x1168, 0x2009,
-	0x0041, 0x009e, 0x0804, 0xdca4, 0x6003, 0x0007, 0x601b, 0x0000,
-	0x080c, 0x88d7, 0x009e, 0x0005, 0x6014, 0x2048, 0xa97c, 0xd1ec,
-	0x1130, 0x080c, 0x88d7, 0x080c, 0xabf0, 0x009e, 0x0005, 0x080c,
-	0xe519, 0x0db8, 0x009e, 0x0005, 0x2001, 0x180c, 0x200c, 0xc1d4,
-	0x2102, 0x0036, 0x080c, 0x965a, 0x080c, 0x96bd, 0x6014, 0x0096,
-	0x2048, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x0188,
-	0xa87c, 0x9084, 0x0003, 0x9086, 0x0002, 0x0140, 0xa8ac, 0x6330,
-	0x931a, 0x6332, 0xa8b0, 0x632c, 0x931b, 0x632e, 0x6003, 0x0002,
-	0x0080, 0x2019, 0x0004, 0x080c, 0xe2b9, 0x6018, 0x9005, 0x1128,
-	0x2001, 0x1986, 0x2004, 0x8003, 0x601a, 0x6017, 0x0000, 0x6003,
-	0x0007, 0x009e, 0x003e, 0x0005, 0x9182, 0x0040, 0x0002, 0xdc33,
-	0xdc33, 0xdc33, 0xdc33, 0xdc33, 0xdc33, 0xdc33, 0xdc33, 0xdc35,
-	0xdc33, 0xdc33, 0xdc33, 0xdc33, 0xdc33, 0xdc33, 0xdc33, 0xdc33,
-	0xdc33, 0xdc33, 0xdc80, 0x080c, 0x0d7d, 0x6014, 0x0096, 0x2048,
-	0xa834, 0xaa38, 0x6110, 0x00b6, 0x2158, 0xb900, 0x00be, 0xd1bc,
-	0x1190, 0x920d, 0x1518, 0xa87c, 0xd0fc, 0x0128, 0x2009, 0x0041,
-	0x009e, 0x0804, 0xdca4, 0x6003, 0x0007, 0x601b, 0x0000, 0x080c,
-	0x88d7, 0x009e, 0x0005, 0x6124, 0xd1f4, 0x1d58, 0x0006, 0x0046,
-	0xacac, 0x9422, 0xa9b0, 0x2200, 0x910b, 0x6030, 0x9420, 0x6432,
-	0x602c, 0x9109, 0x612e, 0x004e, 0x000e, 0x08d8, 0x6110, 0x00b6,
-	0x2158, 0xb900, 0x00be, 0xd1bc, 0x1178, 0x2009, 0x180e, 0x210c,
-	0xd19c, 0x0118, 0x6003, 0x0007, 0x0010, 0x6003, 0x0006, 0x00e9,
-	0x080c, 0x88d9, 0x009e, 0x0005, 0x6003, 0x0002, 0x009e, 0x0005,
-	0x6024, 0xd0f4, 0x0128, 0x080c, 0x168a, 0x1904, 0xdc35, 0x0005,
-	0x6014, 0x0096, 0x2048, 0xa834, 0xa938, 0x009e, 0x9105, 0x1120,
-	0x080c, 0x168a, 0x1904, 0xdc35, 0x0005, 0xd2fc, 0x0140, 0x8002,
-	0x8000, 0x8212, 0x9291, 0x0000, 0x2009, 0x0009, 0x0010, 0x2009,
-	0x0015, 0xaa9a, 0xa896, 0x0005, 0x9182, 0x0040, 0x0208, 0x0062,
-	0x9186, 0x0013, 0x0120, 0x9186, 0x0014, 0x190c, 0x0d7d, 0x6024,
-	0xd0dc, 0x090c, 0x0d7d, 0x0005, 0xdcc8, 0xdcd4, 0xdce0, 0xdcec,
-	0xdcc8, 0xdcc8, 0xdcc8, 0xdcc8, 0xdccf, 0xdcca, 0xdcca, 0xdcc8,
-	0xdcc8, 0xdcc8, 0xdcc8, 0xdcca, 0xdcc8, 0xdcca, 0xdcc8, 0xdccf,
-	0x080c, 0x0d7d, 0x6024, 0xd0dc, 0x090c, 0x0d7d, 0x0005, 0x6014,
-	0x9005, 0x190c, 0x0d7d, 0x0005, 0x6003, 0x0001, 0x6106, 0x0126,
-	0x2091, 0x8000, 0x2009, 0xa022, 0x080c, 0x921b, 0x012e, 0x0005,
-	0x6003, 0x0004, 0x6106, 0x0126, 0x2091, 0x8000, 0x2009, 0xa001,
-	0x080c, 0x9239, 0x012e, 0x0005, 0x6003, 0x0003, 0x6106, 0x080c,
-	0x1c28, 0x0126, 0x2091, 0x8000, 0x6014, 0x0096, 0x2048, 0xa87c,
-	0xd0fc, 0x0188, 0x9084, 0x0003, 0x9086, 0x0002, 0x01a0, 0x6024,
-	0xd0cc, 0x1148, 0xd0c4, 0x1138, 0xa8a8, 0x9005, 0x1120, 0x6144,
-	0x918d, 0xb035, 0x0018, 0x6144, 0x918d, 0xa035, 0x009e, 0x080c,
-	0x9280, 0x012e, 0x0005, 0x6144, 0x918d, 0xa032, 0x0cb8, 0x0126,
-	0x2091, 0x8000, 0x0036, 0x0096, 0x9182, 0x0040, 0x0023, 0x009e,
-	0x003e, 0x012e, 0x0005, 0xdd37, 0xdd39, 0xdd4e, 0xdd68, 0xdd37,
-	0xdd37, 0xdd37, 0xdd37, 0xdd37, 0xdd37, 0xdd37, 0xdd37, 0xdd37,
-	0xdd37, 0xdd37, 0xdd37, 0xdd37, 0xdd37, 0xdd37, 0xdd37, 0x080c,
-	0x0d7d, 0x6014, 0x2048, 0xa87c, 0xd0fc, 0x0510, 0x909c, 0x0003,
-	0x939e, 0x0003, 0x01e8, 0x6003, 0x0001, 0x6106, 0x0126, 0x2091,
-	0x8000, 0x2009, 0xa022, 0x080c, 0x9239, 0x0470, 0x6014, 0x2048,
-	0xa87c, 0xd0fc, 0x0168, 0x909c, 0x0003, 0x939e, 0x0003, 0x0140,
-	0x6003, 0x0001, 0x6106, 0x2009, 0xa001, 0x080c, 0x9239, 0x00e0,
-	0x901e, 0x6316, 0x631a, 0x2019, 0x0004, 0x080c, 0xe2b9, 0x00a0,
-	0x6014, 0x2048, 0xa87c, 0xd0fc, 0x0d98, 0x909c, 0x0003, 0x939e,
-	0x0003, 0x0d70, 0x6003, 0x0003, 0x6106, 0x080c, 0x1c28, 0x6144,
-	0x918d, 0xa035, 0x080c, 0x9280, 0x0005, 0x080c, 0x95ff, 0x6114,
-	0x81ff, 0x0158, 0x0096, 0x2148, 0x080c, 0xe66e, 0x0036, 0x2019,
-	0x0029, 0x080c, 0xe2b9, 0x003e, 0x009e, 0x080c, 0xac2b, 0x080c,
-	0x96bd, 0x0005, 0x080c, 0x965a, 0x6114, 0x81ff, 0x0158, 0x0096,
-	0x2148, 0x080c, 0xe66e, 0x0036, 0x2019, 0x0029, 0x080c, 0xe2b9,
-	0x003e, 0x009e, 0x080c, 0xac2b, 0x0005, 0x9182, 0x0085, 0x0002,
-	0xddb7, 0xddb5, 0xddb5, 0xddc3, 0xddb5, 0xddb5, 0xddb5, 0xddb5,
-	0xddb5, 0xddb5, 0xddb5, 0xddb5, 0xddb5, 0x080c, 0x0d7d, 0x6003,
-	0x000b, 0x6106, 0x0126, 0x2091, 0x8000, 0x2009, 0x8020, 0x080c,
-	0x9239, 0x012e, 0x0005, 0x0026, 0x00e6, 0x080c, 0xe510, 0x0118,
-	0x080c, 0xabf0, 0x0440, 0x2071, 0x0260, 0x7224, 0x6216, 0x2001,
-	0x180e, 0x2004, 0xd0e4, 0x0150, 0x6010, 0x00b6, 0x2058, 0xbca0,
-	0x00be, 0x2c00, 0x2011, 0x014e, 0x080c, 0xaf1b, 0x7220, 0x080c,
-	0xe14f, 0x0118, 0x6007, 0x0086, 0x0040, 0x6007, 0x0087, 0x7224,
-	0x9296, 0xffff, 0x1110, 0x6007, 0x0086, 0x6003, 0x0001, 0x2009,
-	0x8020, 0x080c, 0x9239, 0x00ee, 0x002e, 0x0005, 0x9186, 0x0013,
-	0x1160, 0x6004, 0x908a, 0x0085, 0x0a0c, 0x0d7d, 0x908a, 0x0092,
-	0x1a0c, 0x0d7d, 0x9082, 0x0085, 0x00a2, 0x9186, 0x0027, 0x0130,
-	0x9186, 0x0014, 0x0118, 0x080c, 0xacaa, 0x0050, 0x2001, 0x0007,
-	0x080c, 0x65c0, 0x080c, 0x95ff, 0x080c, 0xac2b, 0x080c, 0x96bd,
-	0x0005, 0xde26, 0xde28, 0xde28, 0xde26, 0xde26, 0xde26, 0xde26,
-	0xde26, 0xde26, 0xde26, 0xde26, 0xde26, 0xde26, 0x080c, 0x0d7d,
-	0x080c, 0xac2b, 0x080c, 0x96bd, 0x0005, 0x9182, 0x0085, 0x0a0c,
-	0x0d7d, 0x9182, 0x0092, 0x1a0c, 0x0d7d, 0x9182, 0x0085, 0x0002,
-	0xde45, 0xde45, 0xde45, 0xde47, 0xde45, 0xde45, 0xde45, 0xde45,
-	0xde45, 0xde45, 0xde45, 0xde45, 0xde45, 0x080c, 0x0d7d, 0x0005,
-	0x9186, 0x0013, 0x0148, 0x9186, 0x0014, 0x0130, 0x9186, 0x0027,
-	0x0118, 0x080c, 0xacaa, 0x0020, 0x080c, 0x95ff, 0x080c, 0xac2b,
-	0x0005, 0x0036, 0x080c, 0xe571, 0x604b, 0x0000, 0x2019, 0x000b,
-	0x0031, 0x6023, 0x0006, 0x6003, 0x0007, 0x003e, 0x0005, 0x0126,
-	0x0036, 0x2091, 0x8000, 0x2001, 0x0382, 0x2004, 0x9084, 0x0007,
-	0x0006, 0x9086, 0x0003, 0x0110, 0x080c, 0xa899, 0x0086, 0x2c40,
-	0x0096, 0x904e, 0x080c, 0xa207, 0x009e, 0x008e, 0x1558, 0x0076,
-	0x2c38, 0x080c, 0xa2b2, 0x007e, 0x1528, 0x6000, 0x9086, 0x0000,
-	0x0508, 0x6020, 0x9086, 0x0007, 0x01e8, 0x0096, 0x601c, 0xd084,
-	0x0140, 0x080c, 0xe571, 0x080c, 0xcf9c, 0x080c, 0x1a94, 0x6023,
-	0x0007, 0x6014, 0x2048, 0x080c, 0xc865, 0x0110, 0x080c, 0xe2b9,
-	0x009e, 0x9006, 0x6046, 0x6016, 0x080c, 0xe571, 0x6023, 0x0007,
-	0x080c, 0xcf9c, 0x000e, 0x9086, 0x0003, 0x0110, 0x080c, 0xa8b5,
-	0x003e, 0x012e, 0x0005, 0x00f6, 0x00c6, 0x00b6, 0x0036, 0x0156,
-	0x2079, 0x0260, 0x7938, 0x783c, 0x080c, 0x2630, 0x15e8, 0x0016,
-	0x00c6, 0x080c, 0x6644, 0x15b0, 0x001e, 0x00c6, 0x2160, 0x080c,
-	0xcf99, 0x00ce, 0x002e, 0x0026, 0x0016, 0x080c, 0xa899, 0x2019,
-	0x0029, 0x080c, 0xa37f, 0x080c, 0x93c6, 0x0076, 0x903e, 0x080c,
-	0x928f, 0x007e, 0x001e, 0x0076, 0x903e, 0x080c, 0xe038, 0x007e,
-	0x080c, 0xa8b5, 0x0026, 0xba04, 0x9294, 0xff00, 0x8217, 0x9286,
-	0x0006, 0x0118, 0x9286, 0x0004, 0x1118, 0xbaa0, 0x080c, 0x32da,
-	0x002e, 0xbc84, 0x001e, 0x080c, 0x605e, 0xbe12, 0xbd16, 0xbc86,
-	0x9006, 0x0010, 0x00ce, 0x001e, 0x015e, 0x003e, 0x00be, 0x00ce,
-	0x00fe, 0x0005, 0x00c6, 0x00d6, 0x00b6, 0x0016, 0x2009, 0x1824,
-	0x2104, 0x9086, 0x0074, 0x1904, 0xdf5b, 0x2069, 0x0260, 0x6944,
-	0x9182, 0x0100, 0x06e0, 0x6940, 0x9184, 0x8000, 0x0904, 0xdf58,
-	0x2001, 0x197b, 0x2004, 0x9005, 0x1140, 0x6010, 0x2058, 0xb884,
-	0x9005, 0x0118, 0x9184, 0x0800, 0x0598, 0x6948, 0x918a, 0x0001,
-	0x0648, 0x080c, 0xe6d6, 0x0118, 0x6978, 0xd1fc, 0x11b8, 0x2009,
-	0x0205, 0x200b, 0x0001, 0x693c, 0x81ff, 0x1198, 0x6944, 0x9182,
-	0x0100, 0x02a8, 0x6940, 0x81ff, 0x1178, 0x6948, 0x918a, 0x0001,
-	0x0288, 0x6950, 0x918a, 0x0001, 0x0298, 0x00d0, 0x6017, 0x0100,
-	0x00a0, 0x6017, 0x0300, 0x0088, 0x6017, 0x0500, 0x0070, 0x6017,
-	0x0700, 0x0058, 0x6017, 0x0900, 0x0040, 0x6017, 0x0b00, 0x0028,
-	0x6017, 0x0f00, 0x0010, 0x6017, 0x2d00, 0x9085, 0x0001, 0x0008,
-	0x9006, 0x001e, 0x00be, 0x00de, 0x00ce, 0x0005, 0x00c6, 0x00b6,
-	0x0026, 0x0036, 0x0156, 0x6210, 0x2258, 0xbb04, 0x9394, 0x00ff,
-	0x9286, 0x0006, 0x0180, 0x9286, 0x0004, 0x0168, 0x9394, 0xff00,
-	0x8217, 0x9286, 0x0006, 0x0138, 0x9286, 0x0004, 0x0120, 0x080c,
-	0x6653, 0x0804, 0xdfc7, 0x2011, 0x0276, 0x20a9, 0x0004, 0x0096,
-	0x2b48, 0x2019, 0x000a, 0x080c, 0xbbd5, 0x009e, 0x15c8, 0x2011,
-	0x027a, 0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019, 0x0006, 0x080c,
-	0xbbd5, 0x009e, 0x1568, 0x0046, 0x0016, 0xbaa0, 0x2220, 0x9006,
-	0x2009, 0x1848, 0x210c, 0xd1a4, 0x0138, 0x2009, 0x0029, 0x080c,
-	0xe316, 0xb800, 0xc0e5, 0xb802, 0x080c, 0xa899, 0x2019, 0x0029,
-	0x080c, 0x93c6, 0x0076, 0x2039, 0x0000, 0x080c, 0x928f, 0x2c08,
-	0x080c, 0xe038, 0x007e, 0x080c, 0xa8b5, 0x2001, 0x0007, 0x080c,
-	0x65c0, 0x2001, 0x0007, 0x080c, 0x6594, 0x001e, 0x004e, 0x9006,
-	0x015e, 0x003e, 0x002e, 0x00be, 0x00ce, 0x0005, 0x00d6, 0x2069,
-	0x026e, 0x6800, 0x9086, 0x0800, 0x0118, 0x6017, 0x0000, 0x0008,
-	0x9006, 0x00de, 0x0005, 0x00b6, 0x00f6, 0x0016, 0x0026, 0x0036,
-	0x0156, 0x2079, 0x026c, 0x7930, 0x7834, 0x080c, 0x2630, 0x11d0,
-	0x080c, 0x6644, 0x11b8, 0x2011, 0x0270, 0x20a9, 0x0004, 0x0096,
-	0x2b48, 0x2019, 0x000a, 0x080c, 0xbbd5, 0x009e, 0x1158, 0x2011,
-	0x0274, 0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019, 0x0006, 0x080c,
-	0xbbd5, 0x009e, 0x015e, 0x003e, 0x002e, 0x001e, 0x00fe, 0x00be,
-	0x0005, 0x00b6, 0x0006, 0x0016, 0x0026, 0x0036, 0x0156, 0x2011,
-	0x0263, 0x2204, 0x8211, 0x220c, 0x080c, 0x2630, 0x11d0, 0x080c,
-	0x6644, 0x11b8, 0x2011, 0x0276, 0x20a9, 0x0004, 0x0096, 0x2b48,
-	0x2019, 0x000a, 0x080c, 0xbbd5, 0x009e, 0x1158, 0x2011, 0x027a,
-	0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019, 0x0006, 0x080c, 0xbbd5,
-	0x009e, 0x015e, 0x003e, 0x002e, 0x001e, 0x000e, 0x00be, 0x0005,
-	0x00e6, 0x00c6, 0x0086, 0x0076, 0x0066, 0x0056, 0x0046, 0x0026,
-	0x0126, 0x2091, 0x8000, 0x080c, 0xa8f7, 0x0106, 0x190c, 0xa899,
-	0x2740, 0x2029, 0x19f2, 0x252c, 0x2021, 0x19f9, 0x2424, 0x2061,
-	0x1ddc, 0x2071, 0x1800, 0x7654, 0x7074, 0x81ff, 0x0150, 0x0006,
-	0x9186, 0x1b31, 0x000e, 0x0128, 0x8001, 0x9602, 0x1a04, 0xe0dd,
-	0x0018, 0x9606, 0x0904, 0xe0dd, 0x080c, 0x8ba9, 0x0904, 0xe0d4,
-	0x2100, 0x9c06, 0x0904, 0xe0d4, 0x080c, 0xe357, 0x1904, 0xe0d4,
-	0x080c, 0xe6f3, 0x0904, 0xe0d4, 0x080c, 0xe347, 0x0904, 0xe0d4,
-	0x6720, 0x9786, 0x0001, 0x1148, 0x080c, 0x3377, 0x0904, 0xe11f,
-	0x6004, 0x9086, 0x0000, 0x1904, 0xe11f, 0x9786, 0x0004, 0x0904,
-	0xe11f, 0x9786, 0x0007, 0x0904, 0xe0d4, 0x2500, 0x9c06, 0x0904,
-	0xe0d4, 0x2400, 0x9c06, 0x0904, 0xe0d4, 0x88ff, 0x0118, 0x605c,
-	0x9906, 0x15d0, 0x0096, 0x6043, 0xffff, 0x6000, 0x9086, 0x0004,
-	0x1120, 0x0016, 0x080c, 0x1a94, 0x001e, 0x9786, 0x000a, 0x0148,
-	0x080c, 0xca7a, 0x1130, 0x080c, 0xb5c6, 0x009e, 0x080c, 0xac2b,
-	0x0418, 0x6014, 0x2048, 0x080c, 0xc865, 0x01d8, 0x9786, 0x0003,
-	0x1588, 0xa867, 0x0103, 0xa87c, 0xd0cc, 0x0130, 0x0096, 0xa878,
-	0x2048, 0x080c, 0x0ff9, 0x009e, 0xab7a, 0xa877, 0x0000, 0x080c,
-	0xe66e, 0x0016, 0x080c, 0xcb68, 0x080c, 0x6d93, 0x001e, 0x080c,
-	0xca54, 0x009e, 0x080c, 0xac2b, 0x9ce0, 0x001c, 0x2001, 0x181a,
-	0x2004, 0x9c02, 0x1210, 0x0804, 0xe051, 0x010e, 0x190c, 0xa8b5,
-	0x012e, 0x002e, 0x004e, 0x005e, 0x006e, 0x007e, 0x008e, 0x00ce,
-	0x00ee, 0x0005, 0x9786, 0x0006, 0x1150, 0x9386, 0x0005, 0x0128,
-	0x080c, 0xe66e, 0x080c, 0xe2b9, 0x08e0, 0x009e, 0x08e8, 0x9786,
-	0x0009, 0x11f8, 0x6000, 0x9086, 0x0004, 0x01c0, 0x6000, 0x9086,
-	0x0003, 0x11a0, 0x080c, 0x965a, 0x0096, 0x6114, 0x2148, 0x080c,
-	0xc865, 0x0118, 0x6010, 0x080c, 0x6d9f, 0x009e, 0x00c6, 0x080c,
-	0xabf0, 0x00ce, 0x0036, 0x080c, 0x96bd, 0x003e, 0x009e, 0x0804,
-	0xe0d4, 0x9786, 0x000a, 0x0904, 0xe0bb, 0x0804, 0xe0b9, 0x81ff,
-	0x0904, 0xe0d4, 0x9180, 0x0001, 0x2004, 0x9086, 0x0018, 0x0138,
-	0x9180, 0x0001, 0x2004, 0x9086, 0x002d, 0x1904, 0xe0d4, 0x6000,
-	0x9086, 0x0002, 0x1904, 0xe0d4, 0x080c, 0xca69, 0x0138, 0x080c,
-	0xca7a, 0x1904, 0xe0d4, 0x080c, 0xb5c6, 0x0038, 0x080c, 0x323e,
-	0x080c, 0xca7a, 0x1110, 0x080c, 0xb5c6, 0x080c, 0xac2b, 0x0804,
-	0xe0d4, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0039, 0x0005, 0x00c6,
-	0x00e6, 0x0016, 0x2c08, 0x2170, 0x9006, 0x080c, 0xe2e0, 0x001e,
-	0x0120, 0x6020, 0x9084, 0x000f, 0x001b, 0x00ee, 0x00ce, 0x0005,
-	0xe16e, 0xe16e, 0xe16e, 0xe16e, 0xe16e, 0xe16e, 0xe170, 0xe16e,
-	0xe16e, 0xe16e, 0xe16e, 0xac2b, 0xac2b, 0xe16e, 0x9006, 0x0005,
-	0x0036, 0x0046, 0x0016, 0x7010, 0x00b6, 0x2058, 0xbca0, 0x00be,
-	0x2c00, 0x2009, 0x0020, 0x080c, 0xe316, 0x001e, 0x004e, 0x2019,
-	0x0002, 0x080c, 0xde67, 0x003e, 0x9085, 0x0001, 0x0005, 0x0096,
-	0x080c, 0xc865, 0x0140, 0x6014, 0x904d, 0x080c, 0xc453, 0x687b,
-	0x0005, 0x080c, 0x6d9f, 0x009e, 0x080c, 0xac2b, 0x9085, 0x0001,
-	0x0005, 0x2001, 0x0001, 0x080c, 0x6580, 0x0156, 0x0016, 0x0026,
+	0x1904, 0xd25e, 0x080c, 0xe10a, 0x1120, 0x6007, 0x000e, 0x0804,
+	0xd377, 0x0046, 0x6410, 0x2458, 0xbca0, 0x0046, 0x080c, 0x3240,
+	0x080c, 0xd0b0, 0x004e, 0x0016, 0x9006, 0x2009, 0x1848, 0x210c,
+	0xd1a4, 0x0148, 0x2009, 0x0029, 0x080c, 0xe445, 0x6010, 0x2058,
+	0xb800, 0xc0e5, 0xb802, 0x001e, 0x004e, 0x6007, 0x0001, 0x0804,
+	0xd377, 0x2001, 0x0001, 0x080c, 0x65cf, 0x0156, 0x0016, 0x0026,
+	0x0036, 0x20a9, 0x0004, 0x2019, 0x1805, 0x2011, 0x0270, 0x080c,
+	0xbc8e, 0x003e, 0x002e, 0x001e, 0x015e, 0x9005, 0x0168, 0x96b4,
+	0xff00, 0x8637, 0x9682, 0x0004, 0x0a04, 0xd25e, 0x9682, 0x0007,
+	0x0a04, 0xd2ba, 0x0804, 0xd25e, 0x6017, 0x1900, 0x6007, 0x0009,
+	0x0804, 0xd377, 0x080c, 0x6a9b, 0x1140, 0x2001, 0x1837, 0x2004,
+	0x9084, 0x0009, 0x9086, 0x0008, 0x1110, 0x0804, 0xd199, 0x080c,
+	0x6a37, 0x6610, 0x2658, 0xbe04, 0x9684, 0x00ff, 0x0006, 0x9086,
+	0x0001, 0x000e, 0x0170, 0x9082, 0x0006, 0x0698, 0x0150, 0x96b4,
+	0xff00, 0x8637, 0x9686, 0x0004, 0x0120, 0x9686, 0x0006, 0x1904,
+	0xd25e, 0x080c, 0xe138, 0x1130, 0x080c, 0xe031, 0x1118, 0x6007,
+	0x0010, 0x04e8, 0x0046, 0x6410, 0x2458, 0xbca0, 0x0046, 0x080c,
+	0x3240, 0x080c, 0xd0b0, 0x004e, 0x0016, 0x9006, 0x2009, 0x1848,
+	0x210c, 0xd1a4, 0x0148, 0x2009, 0x0029, 0x080c, 0xe445, 0x6010,
+	0x2058, 0xb800, 0xc0e5, 0xb802, 0x001e, 0x004e, 0x6007, 0x0001,
+	0x00f0, 0x080c, 0xe2c8, 0x0140, 0x96b4, 0xff00, 0x8637, 0x9686,
+	0x0006, 0x0978, 0x0804, 0xd25e, 0x6017, 0x1900, 0x6007, 0x0009,
+	0x0070, 0x080c, 0x3377, 0x1904, 0xd5ad, 0x080c, 0xe63f, 0x1904,
+	0xd5ad, 0x080c, 0xd77a, 0x1904, 0xd25e, 0x6007, 0x0012, 0x6003,
+	0x0001, 0x080c, 0x92b7, 0x080c, 0x9738, 0x0005, 0x6007, 0x0001,
+	0x6003, 0x0001, 0x080c, 0x92b7, 0x080c, 0x9738, 0x0cb0, 0x6007,
+	0x0005, 0x0c68, 0x080c, 0xe63f, 0x1904, 0xd5ad, 0x080c, 0x3377,
+	0x1904, 0xd5ad, 0x080c, 0xd77a, 0x1904, 0xd25e, 0x6007, 0x0020,
+	0x6003, 0x0001, 0x080c, 0x92b7, 0x080c, 0x9738, 0x0005, 0x080c,
+	0x3377, 0x1904, 0xd5ad, 0x6007, 0x0023, 0x6003, 0x0001, 0x080c,
+	0x92b7, 0x080c, 0x9738, 0x0005, 0x080c, 0xe63f, 0x1904, 0xd5ad,
+	0x080c, 0x3377, 0x1904, 0xd5ad, 0x080c, 0xd77a, 0x1904, 0xd25e,
+	0x0016, 0x0026, 0x00e6, 0x2071, 0x0260, 0x2c08, 0x2011, 0x1820,
+	0x2214, 0x703c, 0x9206, 0x11e0, 0x2011, 0x181f, 0x2214, 0x7038,
+	0x9084, 0x00ff, 0x9206, 0x11a0, 0x7240, 0x080c, 0xc968, 0x0570,
+	0x2260, 0x6008, 0x9086, 0xffff, 0x0120, 0x7244, 0x6008, 0x9206,
+	0x1528, 0x6020, 0x9086, 0x0007, 0x1508, 0x080c, 0xacb0, 0x04a0,
+	0x7244, 0x9286, 0xffff, 0x0180, 0x2c08, 0x080c, 0xc968, 0x01b0,
+	0x2260, 0x7240, 0x6008, 0x9206, 0x1188, 0x6010, 0x9190, 0x0004,
+	0x2214, 0x9206, 0x01b8, 0x0050, 0x7240, 0x2c08, 0x9006, 0x080c,
+	0xe40f, 0x1180, 0x7244, 0x9286, 0xffff, 0x01b0, 0x2160, 0x6007,
+	0x0026, 0x6017, 0x1700, 0x7214, 0x9296, 0xffff, 0x1180, 0x6007,
+	0x0025, 0x0068, 0x6020, 0x9086, 0x0007, 0x1d80, 0x6004, 0x9086,
+	0x0024, 0x1110, 0x080c, 0xacb0, 0x2160, 0x6007, 0x0025, 0x6003,
+	0x0001, 0x080c, 0x92b7, 0x080c, 0x9738, 0x00ee, 0x002e, 0x001e,
+	0x0005, 0x2001, 0x0001, 0x080c, 0x65cf, 0x0156, 0x0016, 0x0026,
 	0x0036, 0x20a9, 0x0004, 0x2019, 0x1805, 0x2011, 0x0276, 0x080c,
-	0xbbc1, 0x003e, 0x002e, 0x001e, 0x015e, 0x9005, 0x0005, 0x00f6,
-	0x00e6, 0x00c6, 0x0086, 0x0076, 0x0066, 0x00b6, 0x0126, 0x2091,
-	0x8000, 0x2740, 0x2061, 0x1ddc, 0x2079, 0x0001, 0x8fff, 0x0904,
-	0xe209, 0x2071, 0x1800, 0x7654, 0x7074, 0x8001, 0x9602, 0x1a04,
-	0xe209, 0x88ff, 0x0120, 0x2800, 0x9c06, 0x1590, 0x2078, 0x080c,
-	0xe347, 0x0570, 0x2400, 0x9c06, 0x0558, 0x6720, 0x9786, 0x0006,
-	0x1538, 0x9786, 0x0007, 0x0520, 0x88ff, 0x1140, 0x6010, 0x9b06,
-	0x11f8, 0x85ff, 0x0118, 0x605c, 0x9106, 0x11d0, 0x0096, 0x601c,
-	0xd084, 0x0140, 0x080c, 0xe571, 0x080c, 0xcf9c, 0x080c, 0x1a94,
-	0x6023, 0x0007, 0x6014, 0x2048, 0x080c, 0xc865, 0x0120, 0x0046,
-	0x080c, 0xe2b9, 0x004e, 0x009e, 0x080c, 0xac2b, 0x88ff, 0x1198,
-	0x9ce0, 0x001c, 0x2001, 0x181a, 0x2004, 0x9c02, 0x1210, 0x0804,
-	0xe1be, 0x9006, 0x012e, 0x00be, 0x006e, 0x007e, 0x008e, 0x00ce,
-	0x00ee, 0x00fe, 0x0005, 0x98c5, 0x0001, 0x0ca0, 0x080c, 0xa899,
-	0x00b6, 0x0076, 0x0056, 0x0086, 0x9046, 0x2029, 0x0001, 0x2c20,
-	0x2019, 0x0002, 0x6210, 0x2258, 0x0096, 0x904e, 0x080c, 0xa207,
-	0x009e, 0x008e, 0x903e, 0x080c, 0xa2b2, 0x080c, 0xe1af, 0x005e,
-	0x007e, 0x00be, 0x080c, 0xa8b5, 0x0005, 0x080c, 0xa899, 0x00b6,
-	0x0046, 0x0056, 0x0076, 0x00c6, 0x0156, 0x2c20, 0x2128, 0x20a9,
-	0x007f, 0x900e, 0x0016, 0x0036, 0x080c, 0x6644, 0x1190, 0x0056,
-	0x0086, 0x9046, 0x2508, 0x2029, 0x0001, 0x0096, 0x904e, 0x080c,
-	0xa207, 0x009e, 0x008e, 0x903e, 0x080c, 0xa2b2, 0x080c, 0xe1af,
-	0x005e, 0x003e, 0x001e, 0x8108, 0x1f04, 0xe242, 0x015e, 0x00ce,
-	0x007e, 0x005e, 0x004e, 0x00be, 0x080c, 0xa8b5, 0x0005, 0x080c,
-	0xa899, 0x00b6, 0x0076, 0x0056, 0x6210, 0x2258, 0x0086, 0x9046,
-	0x2029, 0x0001, 0x2019, 0x0048, 0x0096, 0x904e, 0x080c, 0xa207,
-	0x009e, 0x008e, 0x903e, 0x080c, 0xa2b2, 0x2c20, 0x080c, 0xe1af,
-	0x005e, 0x007e, 0x00be, 0x080c, 0xa8b5, 0x0005, 0x080c, 0xa899,
-	0x00b6, 0x0046, 0x0056, 0x0076, 0x00c6, 0x0156, 0x2c20, 0x20a9,
-	0x0800, 0x900e, 0x0016, 0x0036, 0x080c, 0x6644, 0x11a0, 0x0086,
-	0x9046, 0x2828, 0x0046, 0x2021, 0x0001, 0x080c, 0xe555, 0x004e,
-	0x0096, 0x904e, 0x080c, 0xa207, 0x009e, 0x008e, 0x903e, 0x080c,
-	0xa2b2, 0x080c, 0xe1af, 0x003e, 0x001e, 0x8108, 0x1f04, 0xe292,
-	0x015e, 0x00ce, 0x007e, 0x005e, 0x004e, 0x00be, 0x080c, 0xa8b5,
-	0x0005, 0x0016, 0x00f6, 0x080c, 0xc863, 0x0198, 0xa864, 0x9084,
-	0x00ff, 0x9086, 0x0046, 0x0180, 0xa800, 0x907d, 0x0138, 0xa803,
-	0x0000, 0xab82, 0x080c, 0x6d9f, 0x2f48, 0x0cb0, 0xab82, 0x080c,
-	0x6d9f, 0x00fe, 0x001e, 0x0005, 0xa800, 0x907d, 0x0130, 0xa803,
-	0x0000, 0x080c, 0x6d9f, 0x2f48, 0x0cb8, 0x080c, 0x6d9f, 0x0c88,
-	0x00e6, 0x0046, 0x0036, 0x2061, 0x1ddc, 0x9005, 0x1138, 0x2071,
-	0x1800, 0x7454, 0x7074, 0x8001, 0x9402, 0x12f8, 0x2100, 0x9c06,
-	0x0188, 0x6000, 0x9086, 0x0000, 0x0168, 0x6008, 0x9206, 0x1150,
-	0x6320, 0x9386, 0x0009, 0x01b0, 0x6010, 0x91a0, 0x0004, 0x2424,
-	0x9406, 0x0140, 0x9ce0, 0x001c, 0x2001, 0x181a, 0x2004, 0x9c02,
-	0x1220, 0x0c20, 0x9085, 0x0001, 0x0008, 0x9006, 0x003e, 0x004e,
-	0x00ee, 0x0005, 0x631c, 0xd3c4, 0x1d68, 0x0c30, 0x0096, 0x0006,
-	0x080c, 0x1047, 0x000e, 0x090c, 0x0d7d, 0xaae2, 0xa867, 0x010d,
-	0xa88e, 0x0026, 0x2010, 0x080c, 0xc853, 0x2001, 0x0000, 0x0120,
-	0x2200, 0x9080, 0x0017, 0x2004, 0x002e, 0xa87a, 0x9186, 0x0020,
-	0x0110, 0xa8e3, 0xffff, 0xa986, 0xac76, 0xa87f, 0x0000, 0x2001,
-	0x198d, 0x2004, 0xa882, 0x9006, 0xa802, 0xa86a, 0xa88a, 0x0126,
-	0x2091, 0x8000, 0x080c, 0x6d9f, 0x012e, 0x009e, 0x0005, 0x6700,
-	0x9786, 0x0000, 0x0158, 0x9786, 0x0001, 0x0140, 0x9786, 0x000a,
-	0x0128, 0x9786, 0x0009, 0x0110, 0x9085, 0x0001, 0x0005, 0x00e6,
-	0x6010, 0x9075, 0x0138, 0x00b6, 0x2058, 0xb8a0, 0x00be, 0x9206,
-	0x00ee, 0x0005, 0x9085, 0x0001, 0x0cd8, 0x0016, 0x6004, 0x908e,
-	0x001e, 0x11a0, 0x8007, 0x6134, 0x918c, 0x00ff, 0x9105, 0x6036,
-	0x6007, 0x0085, 0x6003, 0x000b, 0x6023, 0x0005, 0x2001, 0x1986,
-	0x2004, 0x601a, 0x2009, 0x8020, 0x080c, 0x9239, 0x001e, 0x0005,
-	0xa001, 0xa001, 0x0005, 0x6024, 0xd0e4, 0x0158, 0xd0cc, 0x0118,
-	0x080c, 0xcbaf, 0x0030, 0x080c, 0xe571, 0x080c, 0x88d7, 0x080c,
-	0xabf0, 0x0005, 0x9280, 0x0008, 0x2004, 0x9084, 0x000f, 0x0002,
-	0xe3a6, 0xe3a6, 0xe3a6, 0xe3a8, 0xe3a6, 0xe3a8, 0xe3a8, 0xe3a6,
-	0xe3a8, 0xe3a6, 0xe3a6, 0xe3a6, 0xe3a6, 0xe3a6, 0x9006, 0x0005,
-	0x9085, 0x0001, 0x0005, 0x9280, 0x0008, 0x2004, 0x9084, 0x000f,
-	0x0002, 0xe3bf, 0xe3bf, 0xe3bf, 0xe3bf, 0xe3bf, 0xe3bf, 0xe3cc,
-	0xe3bf, 0xe3bf, 0xe3bf, 0xe3bf, 0xe3bf, 0xe3bf, 0xe3bf, 0x6007,
-	0x003b, 0x602f, 0x0009, 0x6017, 0x2a00, 0x6003, 0x0001, 0x2009,
-	0x8020, 0x080c, 0x9239, 0x0005, 0x0096, 0x00c6, 0x2260, 0x080c,
-	0xe571, 0x604b, 0x0000, 0x6024, 0xc0f4, 0xc0e4, 0x6026, 0x603b,
-	0x0000, 0x00ce, 0x00d6, 0x2268, 0x9186, 0x0007, 0x1904, 0xe425,
-	0x6814, 0x9005, 0x0138, 0x2048, 0xa87c, 0xd0fc, 0x1118, 0x00de,
-	0x009e, 0x08a8, 0x6007, 0x003a, 0x6003, 0x0001, 0x2009, 0x8020,
-	0x080c, 0x9239, 0x00c6, 0x2d60, 0x6100, 0x9186, 0x0002, 0x1904,
-	0xe49c, 0x6014, 0x9005, 0x1138, 0x6000, 0x9086, 0x0007, 0x190c,
-	0x0d7d, 0x0804, 0xe49c, 0x2048, 0x080c, 0xc865, 0x1130, 0x0028,
-	0x2048, 0xa800, 0x9005, 0x1de0, 0x2900, 0x2048, 0xa87c, 0x9084,
-	0x0003, 0x9086, 0x0002, 0x1168, 0xa87c, 0xc0dc, 0xc0f4, 0xa87e,
-	0xa880, 0xc0fc, 0xa882, 0x2009, 0x0043, 0x080c, 0xdca4, 0x0804,
-	0xe49c, 0x2009, 0x0041, 0x0804, 0xe496, 0x9186, 0x0005, 0x15a0,
-	0x6814, 0x2048, 0xa87c, 0xd0bc, 0x1120, 0x00de, 0x009e, 0x0804,
-	0xe3bf, 0xd0b4, 0x0128, 0xd0fc, 0x090c, 0x0d7d, 0x0804, 0xe3e0,
-	0x6007, 0x003a, 0x6003, 0x0001, 0x2009, 0x8020, 0x080c, 0x9239,
-	0x00c6, 0x2d60, 0x6100, 0x9186, 0x0002, 0x0120, 0x9186, 0x0004,
-	0x1904, 0xe49c, 0x6814, 0x2048, 0xa97c, 0xc1f4, 0xc1dc, 0xa97e,
-	0xa980, 0xc1fc, 0xc1bc, 0xa982, 0x00f6, 0x2c78, 0x080c, 0x174b,
-	0x00fe, 0x2009, 0x0042, 0x04d0, 0x0036, 0x080c, 0x1047, 0x090c,
-	0x0d7d, 0xa867, 0x010d, 0x9006, 0xa802, 0xa86a, 0xa88a, 0x2d18,
-	0xab8e, 0xa887, 0x0045, 0x2c00, 0xa892, 0x6038, 0xa8a2, 0x2360,
-	0x6024, 0xc0dd, 0x6026, 0x6010, 0x00b6, 0x2058, 0xb8a0, 0x00be,
-	0x2004, 0x635c, 0xab7a, 0xa876, 0x9006, 0xa87e, 0xa882, 0xad9a,
-	0xae96, 0xa89f, 0x0001, 0x080c, 0x6d9f, 0x2019, 0x0045, 0x6008,
-	0x2068, 0x080c, 0xde67, 0x2d00, 0x600a, 0x6023, 0x0006, 0x6003,
-	0x0007, 0x901e, 0x631a, 0x634a, 0x003e, 0x0038, 0x604b, 0x0000,
-	0x6003, 0x0007, 0x080c, 0xdca4, 0x00ce, 0x00de, 0x009e, 0x0005,
-	0x9186, 0x0013, 0x1128, 0x6004, 0x9082, 0x0085, 0x2008, 0x00c2,
-	0x9186, 0x0027, 0x1178, 0x080c, 0x95ff, 0x0036, 0x0096, 0x6014,
-	0x2048, 0x2019, 0x0004, 0x080c, 0xe2b9, 0x009e, 0x003e, 0x080c,
-	0x96bd, 0x0005, 0x9186, 0x0014, 0x0d70, 0x080c, 0xacaa, 0x0005,
-	0xe4cf, 0xe4cd, 0xe4cd, 0xe4cd, 0xe4cd, 0xe4cd, 0xe4cf, 0xe4cd,
-	0xe4cd, 0xe4cd, 0xe4cd, 0xe4cd, 0xe4cd, 0x080c, 0x0d7d, 0x6003,
-	0x000c, 0x080c, 0x96bd, 0x0005, 0x9182, 0x0092, 0x1220, 0x9182,
-	0x0085, 0x0208, 0x001a, 0x080c, 0xacaa, 0x0005, 0xe4eb, 0xe4eb,
-	0xe4eb, 0xe4eb, 0xe4ed, 0xe50d, 0xe4eb, 0xe4eb, 0xe4eb, 0xe4eb,
-	0xe4eb, 0xe4eb, 0xe4eb, 0x080c, 0x0d7d, 0x00d6, 0x2c68, 0x080c,
-	0xab9a, 0x01b0, 0x6003, 0x0001, 0x6007, 0x001e, 0x2009, 0x026e,
-	0x210c, 0x613a, 0x2009, 0x026f, 0x210c, 0x613e, 0x600b, 0xffff,
-	0x6910, 0x6112, 0x6023, 0x0004, 0x2009, 0x8020, 0x080c, 0x9239,
-	0x2d60, 0x080c, 0xabf0, 0x00de, 0x0005, 0x080c, 0xabf0, 0x0005,
-	0x00e6, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0ec, 0x00ee,
-	0x0005, 0x2009, 0x1867, 0x210c, 0xd1ec, 0x05b0, 0x6003, 0x0002,
-	0x6024, 0xc0e5, 0x6026, 0xd0cc, 0x0150, 0x2001, 0x1987, 0x2004,
-	0x604a, 0x2009, 0x1867, 0x210c, 0xd1f4, 0x1520, 0x00a0, 0x2009,
-	0x1867, 0x210c, 0xd1f4, 0x0128, 0x6024, 0xc0e4, 0x6026, 0x9006,
-	0x00d8, 0x2001, 0x1987, 0x200c, 0x2001, 0x1985, 0x2004, 0x9100,
-	0x9080, 0x000a, 0x604a, 0x6010, 0x00b6, 0x2058, 0xb8bc, 0x00be,
-	0x0008, 0x2104, 0x9005, 0x0118, 0x9088, 0x0003, 0x0cd0, 0x2c0a,
-	0x600f, 0x0000, 0x9085, 0x0001, 0x0005, 0x0016, 0x00c6, 0x00e6,
-	0x615c, 0xb8bc, 0x2060, 0x8cff, 0x0180, 0x84ff, 0x1118, 0x605c,
-	0x9106, 0x1138, 0x600c, 0x2072, 0x080c, 0x88d7, 0x080c, 0xabf0,
-	0x0010, 0x9cf0, 0x0003, 0x2e64, 0x0c70, 0x00ee, 0x00ce, 0x001e,
-	0x0005, 0x00d6, 0x00b6, 0x6010, 0x2058, 0xb8bc, 0x2068, 0x9005,
-	0x0130, 0x9c06, 0x0110, 0x680c, 0x0cd0, 0x600c, 0x680e, 0x00be,
-	0x00de, 0x0005, 0x0026, 0x0036, 0x0156, 0x2011, 0x182c, 0x2204,
-	0x9084, 0x00ff, 0x2019, 0x026e, 0x2334, 0x9636, 0x1508, 0x8318,
-	0x2334, 0x2204, 0x9084, 0xff00, 0x9636, 0x11d0, 0x2011, 0x0270,
-	0x20a9, 0x0004, 0x6010, 0x0096, 0x2048, 0x2019, 0x000a, 0x080c,
-	0xbbd5, 0x009e, 0x1168, 0x2011, 0x0274, 0x20a9, 0x0004, 0x6010,
-	0x0096, 0x2048, 0x2019, 0x0006, 0x080c, 0xbbd5, 0x009e, 0x1100,
-	0x015e, 0x003e, 0x002e, 0x0005, 0x00e6, 0x2071, 0x1800, 0x080c,
-	0x5fd7, 0x080c, 0x2fe0, 0x00ee, 0x0005, 0x0096, 0x0026, 0x080c,
-	0x1047, 0x090c, 0x0d7d, 0xa85c, 0x9080, 0x001a, 0x20a0, 0x20a9,
-	0x000c, 0xa860, 0x20e8, 0x9006, 0x4004, 0x9186, 0x0046, 0x1118,
-	0xa867, 0x0136, 0x0038, 0xa867, 0x0138, 0x9186, 0x0041, 0x0110,
-	0xa87b, 0x0001, 0x7038, 0x9084, 0xff00, 0x7240, 0x9294, 0xff00,
-	0x8007, 0x9215, 0xaa9a, 0x9186, 0x0046, 0x1168, 0x7038, 0x9084,
-	0x00ff, 0x723c, 0x9294, 0xff00, 0x9215, 0xaa9e, 0x723c, 0x9294,
-	0x00ff, 0xaaa2, 0x0060, 0x7040, 0x9084, 0x00ff, 0x7244, 0x9294,
-	0xff00, 0x9215, 0xaa9e, 0x7244, 0x9294, 0x00ff, 0xaaa2, 0x9186,
-	0x0046, 0x1118, 0x9e90, 0x0012, 0x0010, 0x9e90, 0x001a, 0x2204,
-	0x8007, 0xa8a6, 0x8210, 0x2204, 0x8007, 0xa8aa, 0x8210, 0x2204,
-	0x8007, 0xa8ae, 0x8210, 0x2204, 0x8007, 0xa8b2, 0x8210, 0x9186,
-	0x0046, 0x11b8, 0x9e90, 0x0016, 0x2204, 0x8007, 0xa8b6, 0x8210,
-	0x2204, 0x8007, 0xa8ba, 0x8210, 0x2204, 0x8007, 0xa8be, 0x8210,
-	0x2204, 0x8007, 0xa8c2, 0x8210, 0x2011, 0x0205, 0x2013, 0x0001,
-	0x00b0, 0x9e90, 0x001e, 0x2204, 0x8007, 0xa8b6, 0x8210, 0x2204,
-	0x8007, 0xa8ba, 0x2011, 0x0205, 0x2013, 0x0001, 0x2011, 0x0260,
-	0x2204, 0x8007, 0xa8be, 0x8210, 0x2204, 0x8007, 0xa8c2, 0x9186,
-	0x0046, 0x1118, 0x2011, 0x0262, 0x0010, 0x2011, 0x026a, 0x0146,
-	0x01d6, 0x0036, 0x20a9, 0x0001, 0x2019, 0x0008, 0xa860, 0x20e8,
-	0xa85c, 0x9080, 0x0031, 0x20a0, 0x2204, 0x8007, 0x4004, 0x8210,
-	0x8319, 0x1dd0, 0x003e, 0x01ce, 0x013e, 0x2011, 0x0205, 0x2013,
-	0x0000, 0x002e, 0x080c, 0x6d9f, 0x009e, 0x0005, 0x00e6, 0x6010,
-	0x00b6, 0x2058, 0xb800, 0x00be, 0xd0fc, 0x0108, 0x0011, 0x00ee,
-	0x0005, 0xa880, 0xc0e5, 0xa882, 0x0005, 0x00e6, 0x00d6, 0x00c6,
-	0x0076, 0x0066, 0x0056, 0x0046, 0x0026, 0x0016, 0x0126, 0x2091,
-	0x8000, 0x2029, 0x19f2, 0x252c, 0x2021, 0x19f9, 0x2424, 0x2061,
-	0x1ddc, 0x2071, 0x1800, 0x7654, 0x7074, 0x9606, 0x0578, 0x6720,
-	0x9786, 0x0001, 0x0118, 0x9786, 0x0008, 0x1500, 0x2500, 0x9c06,
-	0x01e8, 0x2400, 0x9c06, 0x01d0, 0x080c, 0xe347, 0x01b8, 0x080c,
-	0xe357, 0x11a0, 0x6000, 0x9086, 0x0004, 0x1120, 0x0016, 0x080c,
-	0x1a94, 0x001e, 0x080c, 0xca69, 0x1110, 0x080c, 0x323e, 0x080c,
-	0xca7a, 0x1110, 0x080c, 0xb5c6, 0x080c, 0xac2b, 0x9ce0, 0x001c,
-	0x2001, 0x181a, 0x2004, 0x9c02, 0x1208, 0x0858, 0x012e, 0x001e,
-	0x002e, 0x004e, 0x005e, 0x006e, 0x007e, 0x00ce, 0x00de, 0x00ee,
-	0x0005, 0x2001, 0x1810, 0x2004, 0xd0dc, 0x0005, 0x0006, 0x2001,
-	0x1837, 0x2004, 0xd09c, 0x000e, 0x0005, 0x0006, 0x0036, 0x0046,
-	0x080c, 0xcf84, 0x0168, 0x2019, 0xffff, 0x9005, 0x0128, 0x6010,
-	0x00b6, 0x2058, 0xbba0, 0x00be, 0x2021, 0x0004, 0x080c, 0x4ce0,
-	0x004e, 0x003e, 0x000e, 0x6004, 0x9086, 0x0001, 0x1128, 0x080c,
-	0xa37f, 0x080c, 0xac2b, 0x9006, 0x0005, 0x00e6, 0x00c6, 0x00b6,
-	0x0046, 0x2061, 0x1ddc, 0x2071, 0x1800, 0x7454, 0x7074, 0x8001,
-	0x9402, 0x12b8, 0x2100, 0x9c06, 0x0148, 0x6000, 0x9086, 0x0000,
-	0x0128, 0x6010, 0x2058, 0xb8a0, 0x9206, 0x0140, 0x9ce0, 0x001c,
-	0x2001, 0x181a, 0x2004, 0x9c02, 0x1220, 0x0c60, 0x9085, 0x0001,
-	0x0008, 0x9006, 0x004e, 0x00be, 0x00ce, 0x00ee, 0x0005, 0x0126,
-	0x0006, 0x00e6, 0x0016, 0x2091, 0x8000, 0x2071, 0x1840, 0xd5a4,
-	0x0118, 0x7004, 0x8000, 0x7006, 0xd5b4, 0x0118, 0x7000, 0x8000,
-	0x7002, 0xd5ac, 0x0178, 0x2500, 0x9084, 0x0007, 0x908e, 0x0003,
-	0x0148, 0x908e, 0x0004, 0x0130, 0x908e, 0x0005, 0x0118, 0x2071,
-	0xfff6, 0x0089, 0x001e, 0x00ee, 0x000e, 0x012e, 0x0005, 0x0126,
-	0x0006, 0x00e6, 0x2091, 0x8000, 0x2071, 0xffee, 0x0021, 0x00ee,
-	0x000e, 0x012e, 0x0005, 0x2e05, 0x8000, 0x2077, 0x1220, 0x8e70,
-	0x2e05, 0x8000, 0x2077, 0x0005, 0x00e6, 0x2071, 0xffec, 0x0c99,
-	0x00ee, 0x0005, 0x00e6, 0x2071, 0xfff0, 0x0c69, 0x00ee, 0x0005,
-	0x0126, 0x0006, 0x00e6, 0x2091, 0x8000, 0x2071, 0x1840, 0x7014,
-	0x8000, 0x7016, 0x00ee, 0x000e, 0x012e, 0x0005, 0x0001, 0x0002,
-	0x0004, 0x0008, 0x0010, 0x0020, 0x0040, 0x0080, 0x0100, 0x0200,
-	0x0400, 0x0800, 0x1000, 0x2000, 0x4000, 0x8000, 0x97f5
+	0xbc8e, 0x003e, 0x002e, 0x001e, 0x015e, 0x0120, 0x6007, 0x0031,
+	0x0804, 0xd377, 0x080c, 0xb8ff, 0x080c, 0x753d, 0x1190, 0x0006,
+	0x0026, 0x0036, 0x080c, 0x7557, 0x1138, 0x080c, 0x7840, 0x080c,
+	0x6092, 0x080c, 0x746e, 0x0010, 0x080c, 0x7511, 0x003e, 0x002e,
+	0x000e, 0x0005, 0x080c, 0x3377, 0x1904, 0xd5ad, 0x080c, 0xd77a,
+	0x1904, 0xd25e, 0x6106, 0x080c, 0xd796, 0x1120, 0x6007, 0x002b,
+	0x0804, 0xd377, 0x6007, 0x002c, 0x0804, 0xd377, 0x080c, 0xe63f,
+	0x1904, 0xd5ad, 0x080c, 0x3377, 0x1904, 0xd5ad, 0x080c, 0xd77a,
+	0x1904, 0xd25e, 0x6106, 0x080c, 0xd79b, 0x1120, 0x6007, 0x002e,
+	0x0804, 0xd377, 0x6007, 0x002f, 0x0804, 0xd377, 0x080c, 0x3377,
+	0x1904, 0xd5ad, 0x00e6, 0x00d6, 0x00c6, 0x6010, 0x2058, 0xb904,
+	0x9184, 0x00ff, 0x9086, 0x0006, 0x0158, 0x9184, 0xff00, 0x8007,
+	0x9086, 0x0006, 0x0128, 0x00ce, 0x00de, 0x00ee, 0x0804, 0xd37e,
+	0x080c, 0x5742, 0xd0e4, 0x0904, 0xd4f8, 0x2071, 0x026c, 0x7010,
+	0x603a, 0x7014, 0x603e, 0x7108, 0x720c, 0x080c, 0x6ad9, 0x0140,
+	0x6010, 0x2058, 0xb810, 0x9106, 0x1118, 0xb814, 0x9206, 0x0510,
+	0x080c, 0x6ad5, 0x15b8, 0x2069, 0x1800, 0x6880, 0x9206, 0x1590,
+	0x687c, 0x9106, 0x1578, 0x7210, 0x080c, 0xc968, 0x0590, 0x080c,
+	0xd665, 0x0578, 0x080c, 0xe4c1, 0x0560, 0x622e, 0x6007, 0x0036,
+	0x6003, 0x0001, 0x2009, 0x8020, 0x080c, 0x92b0, 0x00ce, 0x00de,
+	0x00ee, 0x0005, 0x7214, 0x9286, 0xffff, 0x0150, 0x080c, 0xc968,
+	0x01c0, 0x9280, 0x0002, 0x2004, 0x7110, 0x9106, 0x1190, 0x08e0,
+	0x7210, 0x2c08, 0x9085, 0x0001, 0x080c, 0xe40f, 0x2c10, 0x2160,
+	0x0140, 0x0890, 0x6007, 0x0037, 0x602f, 0x0009, 0x6017, 0x1500,
+	0x08b8, 0x6007, 0x0037, 0x602f, 0x0003, 0x6017, 0x1700, 0x0880,
+	0x6007, 0x0012, 0x0868, 0x080c, 0x3377, 0x1904, 0xd5ad, 0x6010,
+	0x2058, 0xb804, 0x9084, 0xff00, 0x8007, 0x9086, 0x0006, 0x1904,
+	0xd37e, 0x00e6, 0x00d6, 0x00c6, 0x080c, 0x5742, 0xd0e4, 0x0904,
+	0xd570, 0x2069, 0x1800, 0x2071, 0x026c, 0x7008, 0x603a, 0x720c,
+	0x623e, 0x9286, 0xffff, 0x1150, 0x7208, 0x00c6, 0x2c08, 0x9085,
+	0x0001, 0x080c, 0xe40f, 0x2c10, 0x00ce, 0x05e8, 0x080c, 0xc968,
+	0x05d0, 0x7108, 0x9280, 0x0002, 0x2004, 0x9106, 0x15a0, 0x00c6,
+	0x0026, 0x2260, 0x080c, 0xc559, 0x002e, 0x00ce, 0x7118, 0x918c,
+	0xff00, 0x810f, 0x9186, 0x0001, 0x0178, 0x9186, 0x0005, 0x0118,
+	0x9186, 0x0007, 0x1198, 0x9280, 0x0005, 0x2004, 0x9005, 0x0170,
+	0x080c, 0xd665, 0x0904, 0xd4f1, 0x0056, 0x7510, 0x7614, 0x080c,
+	0xe4da, 0x005e, 0x00ce, 0x00de, 0x00ee, 0x0005, 0x6007, 0x003b,
+	0x602f, 0x0009, 0x6017, 0x2a00, 0x6003, 0x0001, 0x2009, 0x8020,
+	0x080c, 0x92b0, 0x0c78, 0x6007, 0x003b, 0x602f, 0x0003, 0x6017,
+	0x0300, 0x6003, 0x0001, 0x2009, 0x8020, 0x080c, 0x92b0, 0x0c10,
+	0x6007, 0x003b, 0x602f, 0x000b, 0x6017, 0x0000, 0x0804, 0xd4c8,
+	0x00e6, 0x0026, 0x080c, 0x6a9b, 0x0550, 0x080c, 0x6a37, 0x080c,
+	0xe6b1, 0x1518, 0x2071, 0x1800, 0x70dc, 0x9085, 0x0003, 0x70de,
+	0x00f6, 0x2079, 0x0100, 0x72b0, 0x9284, 0x00ff, 0x707e, 0x78e6,
+	0x9284, 0xff00, 0x7280, 0x9205, 0x7082, 0x78ea, 0x00fe, 0x70e7,
+	0x0000, 0x080c, 0x6ad9, 0x0120, 0x2011, 0x1a08, 0x2013, 0x07d0,
+	0xd0ac, 0x1128, 0x080c, 0x3011, 0x0010, 0x080c, 0xe6e3, 0x002e,
+	0x00ee, 0x080c, 0xacb0, 0x0804, 0xd37d, 0x080c, 0xacb0, 0x0005,
+	0x2600, 0x0002, 0xd5c4, 0xd5f5, 0xd606, 0xd5c4, 0xd5c4, 0xd5c6,
+	0xd617, 0xd5c4, 0xd5c4, 0xd5c4, 0xd5e3, 0xd5c4, 0xd5c4, 0xd5c4,
+	0xd622, 0xd62f, 0xd660, 0xd5c4, 0x080c, 0x0d7d, 0x080c, 0xe63f,
+	0x1d20, 0x080c, 0x3377, 0x1d08, 0x080c, 0xd77a, 0x1148, 0x7038,
+	0x6016, 0x6007, 0x0045, 0x6003, 0x0001, 0x080c, 0x92b7, 0x0005,
+	0x080c, 0x3240, 0x080c, 0xd0b0, 0x6007, 0x0001, 0x6003, 0x0001,
+	0x080c, 0x92b7, 0x0005, 0x080c, 0xe63f, 0x1938, 0x080c, 0x3377,
+	0x1920, 0x080c, 0xd77a, 0x1d60, 0x703c, 0x6016, 0x6007, 0x004a,
+	0x6003, 0x0001, 0x080c, 0x92b7, 0x0005, 0x080c, 0x3377, 0x1904,
+	0xd5ad, 0x2009, 0x0041, 0x080c, 0xe6ec, 0x6007, 0x0047, 0x6003,
+	0x0001, 0x080c, 0x92b7, 0x080c, 0x9738, 0x0005, 0x080c, 0x3377,
+	0x1904, 0xd5ad, 0x2009, 0x0042, 0x080c, 0xe6ec, 0x6007, 0x0047,
+	0x6003, 0x0001, 0x080c, 0x92b7, 0x080c, 0x9738, 0x0005, 0x080c,
+	0x3377, 0x1904, 0xd5ad, 0x2009, 0x0046, 0x080c, 0xe6ec, 0x080c,
+	0xacb0, 0x0005, 0x080c, 0xd682, 0x0904, 0xd5ad, 0x6007, 0x004e,
+	0x6003, 0x0001, 0x080c, 0x92b7, 0x080c, 0x9738, 0x0005, 0x6007,
+	0x004f, 0x6017, 0x0000, 0x7134, 0x918c, 0x00ff, 0x81ff, 0x0508,
+	0x9186, 0x0001, 0x1160, 0x7140, 0x2001, 0x19bc, 0x2004, 0x9106,
+	0x11b0, 0x7144, 0x2001, 0x19bd, 0x2004, 0x9106, 0x0190, 0x9186,
+	0x0002, 0x1168, 0x2011, 0x0276, 0x20a9, 0x0004, 0x6010, 0x0096,
+	0x2048, 0x2019, 0x000a, 0x080c, 0xbca2, 0x009e, 0x0110, 0x6017,
+	0x0001, 0x6003, 0x0001, 0x080c, 0x92b7, 0x080c, 0x9738, 0x0005,
+	0x6007, 0x0050, 0x703c, 0x6016, 0x0ca0, 0x0016, 0x00e6, 0x2071,
+	0x0260, 0x00b6, 0x00c6, 0x2260, 0x6010, 0x2058, 0xb8d4, 0xd084,
+	0x0150, 0x7128, 0x604c, 0x9106, 0x1120, 0x712c, 0x6050, 0x9106,
+	0x0110, 0x9006, 0x0010, 0x9085, 0x0001, 0x00ce, 0x00be, 0x00ee,
+	0x001e, 0x0005, 0x0016, 0x0096, 0x0086, 0x00e6, 0x01c6, 0x01d6,
+	0x0126, 0x2091, 0x8000, 0x2071, 0x1800, 0x7090, 0x908a, 0x00f9,
+	0x16e8, 0x20e1, 0x0000, 0x2001, 0x199f, 0x2003, 0x0000, 0x080c,
+	0x1060, 0x05a0, 0x2900, 0x6016, 0x7090, 0x8004, 0xa816, 0x908a,
+	0x001e, 0x02d0, 0xa833, 0x001e, 0x20a9, 0x001e, 0xa860, 0x20e8,
+	0xa85c, 0x9080, 0x001b, 0x20a0, 0x2001, 0x199f, 0x0016, 0x200c,
+	0x0471, 0x001e, 0x2940, 0x080c, 0x1060, 0x01c0, 0x2900, 0xa006,
+	0x2100, 0x81ff, 0x0180, 0x0c18, 0xa832, 0x20a8, 0xa860, 0x20e8,
+	0xa85c, 0x9080, 0x001b, 0x20a0, 0x2001, 0x199f, 0x0016, 0x200c,
+	0x00b1, 0x001e, 0x0000, 0x9085, 0x0001, 0x0048, 0x2071, 0x1800,
+	0x7093, 0x0000, 0x6014, 0x2048, 0x080c, 0x0ff9, 0x9006, 0x012e,
+	0x01de, 0x01ce, 0x00ee, 0x008e, 0x009e, 0x001e, 0x0005, 0x0006,
+	0x0016, 0x0026, 0x0036, 0x00c6, 0x918c, 0xffff, 0x11a8, 0x080c,
+	0x21e3, 0x2099, 0x026c, 0x2001, 0x0014, 0x3518, 0x9312, 0x1218,
+	0x23a8, 0x4003, 0x00f8, 0x20a8, 0x4003, 0x22a8, 0x8108, 0x080c,
+	0x21e3, 0x2099, 0x0260, 0x0ca8, 0x080c, 0x21e3, 0x2061, 0x199f,
+	0x6004, 0x2098, 0x6008, 0x3518, 0x9312, 0x1218, 0x23a8, 0x4003,
+	0x0048, 0x20a8, 0x4003, 0x22a8, 0x8108, 0x080c, 0x21e3, 0x2099,
+	0x0260, 0x0ca8, 0x2061, 0x199f, 0x2019, 0x0280, 0x3300, 0x931e,
+	0x0110, 0x6006, 0x0020, 0x2001, 0x0260, 0x6006, 0x8108, 0x2162,
+	0x9292, 0x0021, 0x9296, 0xffff, 0x620a, 0x00ce, 0x003e, 0x002e,
+	0x001e, 0x000e, 0x0005, 0x0006, 0x0016, 0x0026, 0x0036, 0x00c6,
+	0x81ff, 0x11b8, 0x080c, 0x21fb, 0x20a1, 0x024c, 0x2001, 0x0014,
+	0x3518, 0x9312, 0x1218, 0x23a8, 0x4003, 0x0418, 0x20a8, 0x4003,
+	0x82ff, 0x01f8, 0x22a8, 0x8108, 0x080c, 0x21fb, 0x20a1, 0x0240,
+	0x0c98, 0x080c, 0x21fb, 0x2061, 0x19a2, 0x6004, 0x20a0, 0x6008,
+	0x3518, 0x9312, 0x1218, 0x23a8, 0x4003, 0x0058, 0x20a8, 0x4003,
+	0x82ff, 0x0138, 0x22a8, 0x8108, 0x080c, 0x21fb, 0x20a1, 0x0240,
+	0x0c98, 0x2061, 0x19a2, 0x2019, 0x0260, 0x3400, 0x931e, 0x0110,
+	0x6006, 0x0020, 0x2001, 0x0240, 0x6006, 0x8108, 0x2162, 0x9292,
+	0x0021, 0x9296, 0xffff, 0x620a, 0x00ce, 0x003e, 0x002e, 0x001e,
+	0x000e, 0x0005, 0x00b6, 0x0066, 0x6610, 0x2658, 0xbe04, 0x96b4,
+	0xff00, 0x8637, 0x9686, 0x0006, 0x0170, 0x9686, 0x0004, 0x0158,
+	0xbe04, 0x96b4, 0x00ff, 0x9686, 0x0006, 0x0128, 0x9686, 0x0004,
+	0x0110, 0x9085, 0x0001, 0x006e, 0x00be, 0x0005, 0x00d6, 0x080c,
+	0xd810, 0x00de, 0x0005, 0x00d6, 0x080c, 0xd81d, 0x1520, 0x680c,
+	0x908c, 0xff00, 0x6820, 0x9084, 0x00ff, 0x9115, 0x6216, 0x6824,
+	0x602e, 0xd1e4, 0x0130, 0x9006, 0x080c, 0xe80c, 0x2009, 0x0001,
+	0x0078, 0xd1ec, 0x0180, 0x6920, 0x918c, 0x00ff, 0x6824, 0x080c,
+	0x2661, 0x1148, 0x2001, 0x0001, 0x080c, 0xe80c, 0x2110, 0x900e,
+	0x080c, 0x328f, 0x0018, 0x9085, 0x0001, 0x0008, 0x9006, 0x00de,
+	0x0005, 0x00b6, 0x00c6, 0x080c, 0xad20, 0x0598, 0x0016, 0x0026,
+	0x00c6, 0x2011, 0x0263, 0x2204, 0x8211, 0x220c, 0x080c, 0x2661,
+	0x1568, 0x080c, 0x6632, 0x1550, 0xbe12, 0xbd16, 0x00ce, 0x002e,
+	0x001e, 0x2b00, 0x6012, 0x080c, 0xe63f, 0x11c8, 0x080c, 0x3377,
+	0x11b0, 0x080c, 0xd77a, 0x0500, 0x2001, 0x0007, 0x080c, 0x65e3,
+	0x2001, 0x0007, 0x080c, 0x660f, 0x6017, 0x0000, 0x6023, 0x0001,
+	0x6007, 0x0001, 0x6003, 0x0001, 0x080c, 0x92b7, 0x0010, 0x080c,
+	0xacb0, 0x9085, 0x0001, 0x00ce, 0x00be, 0x0005, 0x080c, 0xacb0,
+	0x00ce, 0x002e, 0x001e, 0x0ca8, 0x080c, 0xacb0, 0x9006, 0x0c98,
+	0x2069, 0x026d, 0x6800, 0x9082, 0x0010, 0x1228, 0x6017, 0x0000,
+	0x9085, 0x0001, 0x0008, 0x9006, 0x0005, 0x6017, 0x0000, 0x2069,
+	0x026c, 0x6808, 0x9084, 0xff00, 0x9086, 0x0800, 0x1190, 0x6904,
+	0x9186, 0x0018, 0x0118, 0x9186, 0x0014, 0x1158, 0x810f, 0x6800,
+	0x9084, 0x00ff, 0x910d, 0x6162, 0x908e, 0x0014, 0x0110, 0x908e,
+	0x0010, 0x0005, 0x6004, 0x90b2, 0x0053, 0x1a0c, 0x0d7d, 0x91b6,
+	0x0013, 0x1130, 0x2008, 0x91b2, 0x0040, 0x1a04, 0xd95f, 0x0092,
+	0x91b6, 0x0027, 0x0120, 0x91b6, 0x0014, 0x190c, 0x0d7d, 0x2001,
+	0x0007, 0x080c, 0x660f, 0x080c, 0x967a, 0x080c, 0xaceb, 0x080c,
+	0x9738, 0x0005, 0xd89a, 0xd89c, 0xd89a, 0xd89a, 0xd89a, 0xd89c,
+	0xd8a9, 0xd95c, 0xd8f9, 0xd95c, 0xd90d, 0xd95c, 0xd8a9, 0xd95c,
+	0xd954, 0xd95c, 0xd954, 0xd95c, 0xd95c, 0xd89a, 0xd89a, 0xd89a,
+	0xd89a, 0xd89a, 0xd89a, 0xd89a, 0xd89a, 0xd89a, 0xd89a, 0xd89a,
+	0xd89c, 0xd89a, 0xd95c, 0xd89a, 0xd89a, 0xd95c, 0xd89a, 0xd959,
+	0xd95c, 0xd89a, 0xd89a, 0xd89a, 0xd89a, 0xd95c, 0xd95c, 0xd89a,
+	0xd95c, 0xd95c, 0xd89a, 0xd8a4, 0xd89a, 0xd89a, 0xd89a, 0xd89a,
+	0xd958, 0xd95c, 0xd89a, 0xd89a, 0xd95c, 0xd95c, 0xd89a, 0xd89a,
+	0xd89a, 0xd89a, 0x080c, 0x0d7d, 0x080c, 0xd0b3, 0x6003, 0x0002,
+	0x080c, 0x9738, 0x0804, 0xd95e, 0x9006, 0x080c, 0x65cf, 0x0804,
+	0xd95c, 0x080c, 0x6ad5, 0x1904, 0xd95c, 0x9006, 0x080c, 0x65cf,
+	0x6010, 0x2058, 0xb810, 0x9086, 0x00ff, 0x1140, 0x00f6, 0x2079,
+	0x1800, 0x78a8, 0x8000, 0x78aa, 0x00fe, 0x0428, 0x6010, 0x2058,
+	0xb884, 0x9005, 0x1178, 0x080c, 0xd09b, 0x1904, 0xd95c, 0x0036,
+	0x0046, 0xbba0, 0x2021, 0x0007, 0x080c, 0x4d09, 0x004e, 0x003e,
+	0x0804, 0xd95c, 0x080c, 0x33a8, 0x1904, 0xd95c, 0x2001, 0x1800,
+	0x2004, 0x9086, 0x0002, 0x1138, 0x00f6, 0x2079, 0x1800, 0x78a8,
+	0x8000, 0x78aa, 0x00fe, 0x2001, 0x0002, 0x080c, 0x65e3, 0x6023,
+	0x0001, 0x6003, 0x0001, 0x6007, 0x0002, 0x080c, 0x92b7, 0x080c,
+	0x9738, 0x6110, 0x2158, 0x2009, 0x0001, 0x080c, 0x86d6, 0x0804,
+	0xd95e, 0x6610, 0x2658, 0xbe04, 0x96b4, 0xff00, 0x8637, 0x9686,
+	0x0006, 0x0904, 0xd95c, 0x9686, 0x0004, 0x0904, 0xd95c, 0x080c,
+	0x8f52, 0x2001, 0x0004, 0x0804, 0xd95a, 0x2001, 0x1800, 0x2004,
+	0x9086, 0x0003, 0x1158, 0x0036, 0x0046, 0x6010, 0x2058, 0xbba0,
+	0x2021, 0x0006, 0x080c, 0x4d09, 0x004e, 0x003e, 0x2001, 0x0006,
+	0x080c, 0xd978, 0x6610, 0x2658, 0xbe04, 0x0066, 0x96b4, 0xff00,
+	0x8637, 0x9686, 0x0006, 0x006e, 0x0168, 0x2001, 0x0006, 0x080c,
+	0x660f, 0x9284, 0x00ff, 0x908e, 0x0007, 0x1120, 0x2001, 0x0006,
+	0x080c, 0x65e3, 0x080c, 0x6ad5, 0x11f8, 0x2001, 0x1837, 0x2004,
+	0xd0a4, 0x01d0, 0xbe04, 0x96b4, 0x00ff, 0x9686, 0x0006, 0x01a0,
+	0x00f6, 0x2079, 0x1800, 0x78a8, 0x8000, 0x78aa, 0x00fe, 0x0804,
+	0xd8e3, 0x2001, 0x0004, 0x0030, 0x2001, 0x0006, 0x0409, 0x0020,
+	0x0018, 0x0010, 0x080c, 0x660f, 0x080c, 0xacb0, 0x0005, 0x2600,
+	0x0002, 0xd973, 0xd973, 0xd973, 0xd973, 0xd973, 0xd975, 0xd973,
+	0xd975, 0xd973, 0xd973, 0xd975, 0xd973, 0xd973, 0xd973, 0xd975,
+	0xd975, 0xd975, 0xd975, 0x080c, 0x0d7d, 0x080c, 0xacb0, 0x0005,
+	0x0016, 0x00b6, 0x00d6, 0x6110, 0x2158, 0xb900, 0xd184, 0x0138,
+	0x080c, 0x65e3, 0x9006, 0x080c, 0x65cf, 0x080c, 0x326f, 0x00de,
+	0x00be, 0x001e, 0x0005, 0x6610, 0x2658, 0xb804, 0x9084, 0xff00,
+	0x8007, 0x90b2, 0x000c, 0x1a0c, 0x0d7d, 0x91b6, 0x0015, 0x1110,
+	0x003b, 0x0028, 0x91b6, 0x0016, 0x190c, 0x0d7d, 0x006b, 0x0005,
+	0xb77c, 0xb77c, 0xb77c, 0xb77c, 0xda0d, 0xb77c, 0xd9f7, 0xd9b8,
+	0xb77c, 0xb77c, 0xb77c, 0xb77c, 0xb77c, 0xb77c, 0xb77c, 0xb77c,
+	0xda0d, 0xb77c, 0xd9f7, 0xd9fe, 0xb77c, 0xb77c, 0xb77c, 0xb77c,
+	0x00f6, 0x080c, 0x6ad5, 0x11d8, 0x080c, 0xd09b, 0x11c0, 0x6010,
+	0x905d, 0x01a8, 0xb884, 0x9005, 0x0190, 0x9006, 0x080c, 0x65cf,
+	0x2001, 0x0002, 0x080c, 0x65e3, 0x6023, 0x0001, 0x6003, 0x0001,
+	0x6007, 0x0002, 0x080c, 0x92b7, 0x080c, 0x9738, 0x00f0, 0x2011,
+	0x0263, 0x2204, 0x8211, 0x220c, 0x080c, 0x2661, 0x11b0, 0x080c,
+	0x6693, 0x0118, 0x080c, 0xacb0, 0x0080, 0xb810, 0x0006, 0xb814,
+	0x0006, 0xb884, 0x0006, 0x080c, 0x60ac, 0x000e, 0xb886, 0x000e,
+	0xb816, 0x000e, 0xb812, 0x080c, 0xacb0, 0x00fe, 0x0005, 0x6604,
+	0x96b6, 0x001e, 0x1110, 0x080c, 0xacb0, 0x0005, 0x080c, 0xbb07,
+	0x1148, 0x6003, 0x0001, 0x6007, 0x0001, 0x080c, 0x92b7, 0x080c,
+	0x9738, 0x0010, 0x080c, 0xacb0, 0x0005, 0x0804, 0xacb0, 0x6004,
+	0x908a, 0x0053, 0x1a0c, 0x0d7d, 0x080c, 0x967a, 0x080c, 0xaceb,
+	0x0005, 0x9182, 0x0040, 0x0002, 0xda30, 0xda30, 0xda30, 0xda30,
+	0xda32, 0xda30, 0xda30, 0xda30, 0xda30, 0xda30, 0xda30, 0xda30,
+	0xda30, 0xda30, 0xda30, 0xda30, 0xda30, 0xda30, 0xda30, 0xda30,
+	0x080c, 0x0d7d, 0x0096, 0x00b6, 0x00d6, 0x00e6, 0x00f6, 0x0046,
+	0x0026, 0x6210, 0x2258, 0xb8bc, 0x9005, 0x11b0, 0x6007, 0x0044,
+	0x2071, 0x0260, 0x7444, 0x94a4, 0xff00, 0x0904, 0xda99, 0x080c,
+	0xe800, 0x1170, 0x9486, 0x2000, 0x1158, 0x2009, 0x0001, 0x2011,
+	0x0200, 0x080c, 0x8979, 0x0020, 0x9026, 0x080c, 0xe684, 0x0c30,
+	0x080c, 0x1047, 0x090c, 0x0d7d, 0x6003, 0x0007, 0xa867, 0x010d,
+	0x9006, 0xa802, 0xa86a, 0xac8a, 0x2c00, 0xa88e, 0x6008, 0xa8e2,
+	0x6010, 0x2058, 0xb8a0, 0x7130, 0xa97a, 0x0016, 0xa876, 0xa87f,
+	0x0000, 0xa883, 0x0000, 0xa887, 0x0036, 0x080c, 0x6dee, 0x001e,
+	0x080c, 0xe800, 0x1904, 0xdaf9, 0x9486, 0x2000, 0x1130, 0x2019,
+	0x0017, 0x080c, 0xe3b5, 0x0804, 0xdaf9, 0x9486, 0x0200, 0x1120,
+	0x080c, 0xe345, 0x0804, 0xdaf9, 0x9486, 0x0400, 0x0120, 0x9486,
+	0x1000, 0x1904, 0xdaf9, 0x2019, 0x0002, 0x080c, 0xe364, 0x0804,
+	0xdaf9, 0x2069, 0x1a6e, 0x6a00, 0xd284, 0x0904, 0xdb63, 0x9284,
+	0x0300, 0x1904, 0xdb5c, 0x6804, 0x9005, 0x0904, 0xdb44, 0x2d78,
+	0x6003, 0x0007, 0x080c, 0x1060, 0x0904, 0xdb05, 0x7800, 0xd08c,
+	0x1118, 0x7804, 0x8001, 0x7806, 0x6017, 0x0000, 0x2001, 0x180f,
+	0x2004, 0xd084, 0x1904, 0xdb67, 0x9006, 0xa802, 0xa867, 0x0116,
+	0xa86a, 0x6008, 0xa8e2, 0x2c00, 0xa87a, 0x6010, 0x2058, 0xb8a0,
+	0x7130, 0xa9b6, 0xa876, 0xb928, 0xa9ba, 0xb92c, 0xa9be, 0xb930,
+	0xa9c2, 0xb934, 0xa9c6, 0xa883, 0x003d, 0x7044, 0x9084, 0x0003,
+	0x9080, 0xdb01, 0x2005, 0xa87e, 0x20a9, 0x000a, 0x2001, 0x0270,
+	0xaa5c, 0x9290, 0x0021, 0x2009, 0x0205, 0x200b, 0x0080, 0x20e1,
+	0x0000, 0xab60, 0x23e8, 0x2098, 0x22a0, 0x4003, 0x200b, 0x0000,
+	0x2001, 0x027a, 0x200c, 0xa9b2, 0x8000, 0x200c, 0xa9ae, 0x080c,
+	0x6df1, 0x002e, 0x004e, 0x00fe, 0x00ee, 0x00de, 0x00be, 0x009e,
+	0x0005, 0x0000, 0x0080, 0x0040, 0x0000, 0x2001, 0x1810, 0x2004,
+	0xd084, 0x0120, 0x080c, 0x1047, 0x1904, 0xdaae, 0x6017, 0xf100,
+	0x6003, 0x0001, 0x6007, 0x0041, 0x2009, 0xa022, 0x080c, 0x92b0,
+	0x0c00, 0x2069, 0x0260, 0x6848, 0x9084, 0xff00, 0x9086, 0x1200,
+	0x1198, 0x686c, 0x9084, 0x00ff, 0x0016, 0x6114, 0x918c, 0xf700,
+	0x910d, 0x6116, 0x001e, 0x6003, 0x0001, 0x6007, 0x0043, 0x2009,
+	0xa025, 0x080c, 0x92b0, 0x0828, 0x6868, 0x602e, 0x686c, 0x6032,
+	0x6017, 0xf200, 0x6003, 0x0001, 0x6007, 0x0041, 0x2009, 0xa022,
+	0x080c, 0x92b0, 0x0804, 0xdaf9, 0x2001, 0x180e, 0x2004, 0xd0ec,
+	0x0120, 0x2011, 0x8049, 0x080c, 0x4b52, 0x6017, 0xf300, 0x0010,
+	0x6017, 0xf100, 0x6003, 0x0001, 0x6007, 0x0041, 0x2009, 0xa022,
+	0x080c, 0x92b0, 0x0804, 0xdaf9, 0x6017, 0xf500, 0x0c98, 0x6017,
+	0xf600, 0x0804, 0xdb19, 0x6017, 0xf200, 0x0804, 0xdb19, 0xa867,
+	0x0146, 0xa86b, 0x0000, 0x6008, 0xa886, 0x2c00, 0xa87a, 0x7044,
+	0x9084, 0x0003, 0x9080, 0xdb01, 0x2005, 0xa87e, 0x2928, 0x6010,
+	0x2058, 0xb8a0, 0xa876, 0xb828, 0xa88a, 0xb82c, 0xa88e, 0xb830,
+	0xa892, 0xb834, 0xa896, 0xa883, 0x003d, 0x2009, 0x0205, 0x2104,
+	0x9085, 0x0080, 0x200a, 0x20e1, 0x0000, 0x2011, 0x0210, 0x2214,
+	0x9294, 0x0fff, 0xaaa2, 0x9282, 0x0111, 0x1a0c, 0x0d7d, 0x8210,
+	0x821c, 0x2001, 0x026c, 0x2098, 0xa860, 0x20e8, 0xa85c, 0x9080,
+	0x0029, 0x20a0, 0x2011, 0xdbe3, 0x2041, 0x0001, 0x223d, 0x9784,
+	0x00ff, 0x9322, 0x1208, 0x2300, 0x20a8, 0x4003, 0x931a, 0x0530,
+	0x8210, 0xd7fc, 0x1130, 0x8d68, 0x2d0a, 0x2001, 0x0260, 0x2098,
+	0x0c68, 0x2950, 0x080c, 0x1060, 0x0170, 0x2900, 0xb002, 0xa867,
+	0x0147, 0xa86b, 0x0000, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x001b,
+	0x20a0, 0x8840, 0x08d8, 0x2548, 0xa800, 0x902d, 0x0118, 0x080c,
+	0x1079, 0x0cc8, 0x080c, 0x1079, 0x0804, 0xdb05, 0x2548, 0x8847,
+	0x9885, 0x0046, 0xa866, 0x2009, 0x0205, 0x200b, 0x0000, 0x080c,
+	0xe3e8, 0x0804, 0xdaf9, 0x8010, 0x0004, 0x801a, 0x0006, 0x8018,
+	0x0008, 0x8016, 0x000a, 0x8014, 0x9186, 0x0013, 0x1160, 0x6004,
+	0x908a, 0x0057, 0x1a0c, 0x0d7d, 0x9082, 0x0040, 0x0a0c, 0x0d7d,
+	0x2008, 0x0804, 0xdc6f, 0x9186, 0x0051, 0x0108, 0x0040, 0x080c,
+	0xab33, 0x01e8, 0x9086, 0x0002, 0x0904, 0xdcb7, 0x00c0, 0x9186,
+	0x0027, 0x0180, 0x9186, 0x0048, 0x0128, 0x9186, 0x0014, 0x0150,
+	0x190c, 0x0d7d, 0x080c, 0xab33, 0x0150, 0x9086, 0x0004, 0x0904,
+	0xdd56, 0x0028, 0x6004, 0x9082, 0x0040, 0x2008, 0x001a, 0x080c,
+	0xad6a, 0x0005, 0xdc36, 0xdc38, 0xdc38, 0xdc5f, 0xdc36, 0xdc36,
+	0xdc36, 0xdc36, 0xdc36, 0xdc36, 0xdc36, 0xdc36, 0xdc36, 0xdc36,
+	0xdc36, 0xdc36, 0xdc36, 0xdc36, 0xdc36, 0xdc36, 0x080c, 0x0d7d,
+	0x080c, 0x967a, 0x080c, 0x9738, 0x0036, 0x0096, 0x6014, 0x904d,
+	0x01d8, 0x080c, 0xc97a, 0x01c0, 0x6003, 0x0002, 0x6010, 0x00b6,
+	0x2058, 0xb800, 0x00be, 0xd0bc, 0x1178, 0x2019, 0x0004, 0x080c,
+	0xe3e8, 0x6017, 0x0000, 0x6018, 0x9005, 0x1120, 0x2001, 0x1986,
+	0x2004, 0x601a, 0x6003, 0x0007, 0x009e, 0x003e, 0x0005, 0x0096,
+	0x080c, 0x967a, 0x080c, 0x9738, 0x080c, 0xc97a, 0x0120, 0x6014,
+	0x2048, 0x080c, 0x1079, 0x080c, 0xaceb, 0x009e, 0x0005, 0x0002,
+	0xdc84, 0xdc99, 0xdc86, 0xdcae, 0xdc84, 0xdc84, 0xdc84, 0xdc84,
+	0xdc84, 0xdc84, 0xdc84, 0xdc84, 0xdc84, 0xdc84, 0xdc84, 0xdc84,
+	0xdc84, 0xdc84, 0xdc84, 0xdc84, 0x080c, 0x0d7d, 0x0096, 0x6014,
+	0x2048, 0xa87c, 0xd0b4, 0x0138, 0x6003, 0x0007, 0x2009, 0x0043,
+	0x080c, 0xad4d, 0x0010, 0x6003, 0x0004, 0x080c, 0x9738, 0x009e,
+	0x0005, 0x080c, 0xc97a, 0x0138, 0x6114, 0x0096, 0x2148, 0xa97c,
+	0x009e, 0xd1ec, 0x1138, 0x080c, 0x894e, 0x080c, 0xacb0, 0x080c,
+	0x9738, 0x0005, 0x080c, 0xe648, 0x0db0, 0x0cc8, 0x6003, 0x0001,
+	0x6007, 0x0041, 0x2009, 0xa022, 0x080c, 0x92b0, 0x0005, 0x9182,
+	0x0040, 0x0002, 0xdcce, 0xdcd0, 0xdcce, 0xdcce, 0xdcce, 0xdcce,
+	0xdcce, 0xdcce, 0xdcce, 0xdcce, 0xdcce, 0xdcce, 0xdcce, 0xdcce,
+	0xdcce, 0xdcce, 0xdcce, 0xdcd1, 0xdcce, 0xdcce, 0x080c, 0x0d7d,
+	0x0005, 0x00d6, 0x080c, 0x894e, 0x00de, 0x080c, 0xe6a0, 0x080c,
+	0xacb0, 0x0005, 0x9182, 0x0040, 0x0002, 0xdcf1, 0xdcf1, 0xdcf1,
+	0xdcf1, 0xdcf1, 0xdcf1, 0xdcf1, 0xdcf1, 0xdcf1, 0xdcf3, 0xdd1e,
+	0xdcf1, 0xdcf1, 0xdcf1, 0xdcf1, 0xdd1e, 0xdcf1, 0xdcf1, 0xdcf1,
+	0xdcf1, 0x080c, 0x0d7d, 0x6014, 0x0096, 0x2048, 0xa87c, 0xd0fc,
+	0x0168, 0x908c, 0x0003, 0x918e, 0x0002, 0x0180, 0x6144, 0xd1e4,
+	0x1168, 0x2009, 0x0041, 0x009e, 0x0804, 0xddde, 0x6003, 0x0007,
+	0x601b, 0x0000, 0x080c, 0x894e, 0x009e, 0x0005, 0x6014, 0x2048,
+	0xa97c, 0xd1ec, 0x1130, 0x080c, 0x894e, 0x080c, 0xacb0, 0x009e,
+	0x0005, 0x080c, 0xe648, 0x0db8, 0x009e, 0x0005, 0x2001, 0x180c,
+	0x200c, 0xc1d4, 0x2102, 0x0036, 0x080c, 0x96d5, 0x080c, 0x9738,
+	0x6014, 0x0096, 0x2048, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be,
+	0xd0bc, 0x0188, 0xa87c, 0x9084, 0x0003, 0x9086, 0x0002, 0x0140,
+	0xa8ac, 0x6330, 0x931a, 0x6332, 0xa8b0, 0x632c, 0x931b, 0x632e,
+	0x6003, 0x0002, 0x0080, 0x2019, 0x0004, 0x080c, 0xe3e8, 0x6018,
+	0x9005, 0x1128, 0x2001, 0x1986, 0x2004, 0x8003, 0x601a, 0x6017,
+	0x0000, 0x6003, 0x0007, 0x009e, 0x003e, 0x0005, 0x9182, 0x0040,
+	0x0002, 0xdd6d, 0xdd6d, 0xdd6d, 0xdd6d, 0xdd6d, 0xdd6d, 0xdd6d,
+	0xdd6d, 0xdd6f, 0xdd6d, 0xdd6d, 0xdd6d, 0xdd6d, 0xdd6d, 0xdd6d,
+	0xdd6d, 0xdd6d, 0xdd6d, 0xdd6d, 0xddba, 0x080c, 0x0d7d, 0x6014,
+	0x0096, 0x2048, 0xa834, 0xaa38, 0x6110, 0x00b6, 0x2158, 0xb900,
+	0x00be, 0xd1bc, 0x1190, 0x920d, 0x1518, 0xa87c, 0xd0fc, 0x0128,
+	0x2009, 0x0041, 0x009e, 0x0804, 0xddde, 0x6003, 0x0007, 0x601b,
+	0x0000, 0x080c, 0x894e, 0x009e, 0x0005, 0x6124, 0xd1f4, 0x1d58,
+	0x0006, 0x0046, 0xacac, 0x9422, 0xa9b0, 0x2200, 0x910b, 0x6030,
+	0x9420, 0x6432, 0x602c, 0x9109, 0x612e, 0x004e, 0x000e, 0x08d8,
+	0x6110, 0x00b6, 0x2158, 0xb900, 0x00be, 0xd1bc, 0x1178, 0x2009,
+	0x180e, 0x210c, 0xd19c, 0x0118, 0x6003, 0x0007, 0x0010, 0x6003,
+	0x0006, 0x00e9, 0x080c, 0x8950, 0x009e, 0x0005, 0x6003, 0x0002,
+	0x009e, 0x0005, 0x6024, 0xd0f4, 0x0128, 0x080c, 0x1697, 0x1904,
+	0xdd6f, 0x0005, 0x6014, 0x0096, 0x2048, 0xa834, 0xa938, 0x009e,
+	0x9105, 0x1120, 0x080c, 0x1697, 0x1904, 0xdd6f, 0x0005, 0xd2fc,
+	0x0140, 0x8002, 0x8000, 0x8212, 0x9291, 0x0000, 0x2009, 0x0009,
+	0x0010, 0x2009, 0x0015, 0xaa9a, 0xa896, 0x0005, 0x9182, 0x0040,
+	0x0208, 0x0062, 0x9186, 0x0013, 0x0120, 0x9186, 0x0014, 0x190c,
+	0x0d7d, 0x6024, 0xd0dc, 0x090c, 0x0d7d, 0x0005, 0xde02, 0xde0e,
+	0xde1a, 0xde26, 0xde02, 0xde02, 0xde02, 0xde02, 0xde09, 0xde04,
+	0xde04, 0xde02, 0xde02, 0xde02, 0xde02, 0xde04, 0xde02, 0xde04,
+	0xde02, 0xde09, 0x080c, 0x0d7d, 0x6024, 0xd0dc, 0x090c, 0x0d7d,
+	0x0005, 0x6014, 0x9005, 0x190c, 0x0d7d, 0x0005, 0x6003, 0x0001,
+	0x6106, 0x0126, 0x2091, 0x8000, 0x2009, 0xa022, 0x080c, 0x9292,
+	0x012e, 0x0005, 0x6003, 0x0004, 0x6106, 0x0126, 0x2091, 0x8000,
+	0x2009, 0xa001, 0x080c, 0x92b0, 0x012e, 0x0005, 0x6003, 0x0003,
+	0x6106, 0x080c, 0x1c59, 0x0126, 0x2091, 0x8000, 0x6014, 0x0096,
+	0x2048, 0xa87c, 0xd0fc, 0x0188, 0x9084, 0x0003, 0x9086, 0x0002,
+	0x01a0, 0x6024, 0xd0cc, 0x1148, 0xd0c4, 0x1138, 0xa8a8, 0x9005,
+	0x1120, 0x6144, 0x918d, 0xb035, 0x0018, 0x6144, 0x918d, 0xa035,
+	0x009e, 0x080c, 0x92f7, 0x012e, 0x0005, 0x6144, 0x918d, 0xa032,
+	0x0cb8, 0x0126, 0x2091, 0x8000, 0x0036, 0x0096, 0x9182, 0x0040,
+	0x0023, 0x009e, 0x003e, 0x012e, 0x0005, 0xde71, 0xde73, 0xde88,
+	0xdea2, 0xde71, 0xde71, 0xde71, 0xde71, 0xde71, 0xde71, 0xde71,
+	0xde71, 0xde71, 0xde71, 0xde71, 0xde71, 0xde71, 0xde71, 0xde71,
+	0xde71, 0x080c, 0x0d7d, 0x6014, 0x2048, 0xa87c, 0xd0fc, 0x0510,
+	0x909c, 0x0003, 0x939e, 0x0003, 0x01e8, 0x6003, 0x0001, 0x6106,
+	0x0126, 0x2091, 0x8000, 0x2009, 0xa022, 0x080c, 0x92b0, 0x0470,
+	0x6014, 0x2048, 0xa87c, 0xd0fc, 0x0168, 0x909c, 0x0003, 0x939e,
+	0x0003, 0x0140, 0x6003, 0x0001, 0x6106, 0x2009, 0xa001, 0x080c,
+	0x92b0, 0x00e0, 0x901e, 0x6316, 0x631a, 0x2019, 0x0004, 0x080c,
+	0xe3e8, 0x00a0, 0x6014, 0x2048, 0xa87c, 0xd0fc, 0x0d98, 0x909c,
+	0x0003, 0x939e, 0x0003, 0x0d70, 0x6003, 0x0003, 0x6106, 0x080c,
+	0x1c59, 0x6144, 0x918d, 0xa035, 0x080c, 0x92f7, 0x0005, 0x080c,
+	0x967a, 0x6114, 0x81ff, 0x0158, 0x0096, 0x2148, 0x080c, 0xe79d,
+	0x0036, 0x2019, 0x0029, 0x080c, 0xe3e8, 0x003e, 0x009e, 0x080c,
+	0xaceb, 0x080c, 0x9738, 0x0005, 0x080c, 0x96d5, 0x6114, 0x81ff,
+	0x0158, 0x0096, 0x2148, 0x080c, 0xe79d, 0x0036, 0x2019, 0x0029,
+	0x080c, 0xe3e8, 0x003e, 0x009e, 0x080c, 0xaceb, 0x0005, 0x9182,
+	0x0085, 0x0002, 0xdef1, 0xdeef, 0xdeef, 0xdefd, 0xdeef, 0xdeef,
+	0xdeef, 0xdeef, 0xdeef, 0xdeef, 0xdeef, 0xdeef, 0xdeef, 0x080c,
+	0x0d7d, 0x6003, 0x000b, 0x6106, 0x0126, 0x2091, 0x8000, 0x2009,
+	0x8020, 0x080c, 0x92b0, 0x012e, 0x0005, 0x0026, 0x00e6, 0x080c,
+	0xe63f, 0x0118, 0x080c, 0xacb0, 0x0440, 0x2071, 0x0260, 0x7224,
+	0x6216, 0x2001, 0x180e, 0x2004, 0xd0e4, 0x0150, 0x6010, 0x00b6,
+	0x2058, 0xbca0, 0x00be, 0x2c00, 0x2011, 0x014e, 0x080c, 0xafdb,
+	0x7220, 0x080c, 0xe27e, 0x0118, 0x6007, 0x0086, 0x0040, 0x6007,
+	0x0087, 0x7224, 0x9296, 0xffff, 0x1110, 0x6007, 0x0086, 0x6003,
+	0x0001, 0x2009, 0x8020, 0x080c, 0x92b0, 0x00ee, 0x002e, 0x0005,
+	0x9186, 0x0013, 0x1160, 0x6004, 0x908a, 0x0085, 0x0a0c, 0x0d7d,
+	0x908a, 0x0092, 0x1a0c, 0x0d7d, 0x9082, 0x0085, 0x00a2, 0x9186,
+	0x0027, 0x0130, 0x9186, 0x0014, 0x0118, 0x080c, 0xad6a, 0x0050,
+	0x2001, 0x0007, 0x080c, 0x660f, 0x080c, 0x967a, 0x080c, 0xaceb,
+	0x080c, 0x9738, 0x0005, 0xdf60, 0xdf62, 0xdf62, 0xdf60, 0xdf60,
+	0xdf60, 0xdf60, 0xdf60, 0xdf60, 0xdf60, 0xdf60, 0xdf60, 0xdf60,
+	0x080c, 0x0d7d, 0x080c, 0xaceb, 0x080c, 0x9738, 0x0005, 0x9182,
+	0x0085, 0x0a0c, 0x0d7d, 0x9182, 0x0092, 0x1a0c, 0x0d7d, 0x9182,
+	0x0085, 0x0002, 0xdf7f, 0xdf7f, 0xdf7f, 0xdf81, 0xdf7f, 0xdf7f,
+	0xdf7f, 0xdf7f, 0xdf7f, 0xdf7f, 0xdf7f, 0xdf7f, 0xdf7f, 0x080c,
+	0x0d7d, 0x0005, 0x9186, 0x0013, 0x0148, 0x9186, 0x0014, 0x0130,
+	0x9186, 0x0027, 0x0118, 0x080c, 0xad6a, 0x0020, 0x080c, 0x967a,
+	0x080c, 0xaceb, 0x0005, 0x0036, 0x080c, 0xe6a0, 0x604b, 0x0000,
+	0x2019, 0x000b, 0x0031, 0x6023, 0x0006, 0x6003, 0x0007, 0x003e,
+	0x0005, 0x0126, 0x0036, 0x2091, 0x8000, 0x080c, 0xa91e, 0x0106,
+	0x0086, 0x2c40, 0x0096, 0x904e, 0x080c, 0xa28c, 0x009e, 0x008e,
+	0x1558, 0x0076, 0x2c38, 0x080c, 0xa337, 0x007e, 0x1528, 0x6000,
+	0x9086, 0x0000, 0x0508, 0x6020, 0x9086, 0x0007, 0x01e8, 0x0096,
+	0x601c, 0xd084, 0x0140, 0x080c, 0xe6a0, 0x080c, 0xd0b3, 0x080c,
+	0x1ac5, 0x6023, 0x0007, 0x6014, 0x2048, 0x080c, 0xc97a, 0x0110,
+	0x080c, 0xe3e8, 0x009e, 0x9006, 0x6046, 0x6016, 0x080c, 0xe6a0,
+	0x6023, 0x0007, 0x080c, 0xd0b3, 0x010e, 0x090c, 0xa93a, 0x003e,
+	0x012e, 0x0005, 0x00f6, 0x00c6, 0x00b6, 0x0036, 0x0156, 0x2079,
+	0x0260, 0x7938, 0x783c, 0x080c, 0x2661, 0x15e8, 0x0016, 0x00c6,
+	0x080c, 0x6693, 0x15b0, 0x001e, 0x00c6, 0x2160, 0x080c, 0xd0b0,
+	0x00ce, 0x002e, 0x0026, 0x0016, 0x080c, 0xa91e, 0x2019, 0x0029,
+	0x080c, 0xa404, 0x080c, 0x943d, 0x0076, 0x903e, 0x080c, 0x9306,
+	0x007e, 0x001e, 0x0076, 0x903e, 0x080c, 0xe167, 0x007e, 0x080c,
+	0xa93a, 0x0026, 0xba04, 0x9294, 0xff00, 0x8217, 0x9286, 0x0006,
+	0x0118, 0x9286, 0x0004, 0x1118, 0xbaa0, 0x080c, 0x330b, 0x002e,
+	0xbc84, 0x001e, 0x080c, 0x60ac, 0xbe12, 0xbd16, 0xbc86, 0x9006,
+	0x0010, 0x00ce, 0x001e, 0x015e, 0x003e, 0x00be, 0x00ce, 0x00fe,
+	0x0005, 0x00c6, 0x00d6, 0x00b6, 0x0016, 0x2009, 0x1824, 0x2104,
+	0x9086, 0x0074, 0x1904, 0xe08a, 0x2069, 0x0260, 0x6944, 0x9182,
+	0x0100, 0x06e0, 0x6940, 0x9184, 0x8000, 0x0904, 0xe087, 0x2001,
+	0x197b, 0x2004, 0x9005, 0x1140, 0x6010, 0x2058, 0xb884, 0x9005,
+	0x0118, 0x9184, 0x0800, 0x0598, 0x6948, 0x918a, 0x0001, 0x0648,
+	0x080c, 0xe805, 0x0118, 0x6978, 0xd1fc, 0x11b8, 0x2009, 0x0205,
+	0x200b, 0x0001, 0x693c, 0x81ff, 0x1198, 0x6944, 0x9182, 0x0100,
+	0x02a8, 0x6940, 0x81ff, 0x1178, 0x6948, 0x918a, 0x0001, 0x0288,
+	0x6950, 0x918a, 0x0001, 0x0298, 0x00d0, 0x6017, 0x0100, 0x00a0,
+	0x6017, 0x0300, 0x0088, 0x6017, 0x0500, 0x0070, 0x6017, 0x0700,
+	0x0058, 0x6017, 0x0900, 0x0040, 0x6017, 0x0b00, 0x0028, 0x6017,
+	0x0f00, 0x0010, 0x6017, 0x2d00, 0x9085, 0x0001, 0x0008, 0x9006,
+	0x001e, 0x00be, 0x00de, 0x00ce, 0x0005, 0x00c6, 0x00b6, 0x0026,
+	0x0036, 0x0156, 0x6210, 0x2258, 0xbb04, 0x9394, 0x00ff, 0x9286,
+	0x0006, 0x0180, 0x9286, 0x0004, 0x0168, 0x9394, 0xff00, 0x8217,
+	0x9286, 0x0006, 0x0138, 0x9286, 0x0004, 0x0120, 0x080c, 0x66a2,
+	0x0804, 0xe0f6, 0x2011, 0x0276, 0x20a9, 0x0004, 0x0096, 0x2b48,
+	0x2019, 0x000a, 0x080c, 0xbca2, 0x009e, 0x15c8, 0x2011, 0x027a,
+	0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019, 0x0006, 0x080c, 0xbca2,
+	0x009e, 0x1568, 0x0046, 0x0016, 0xbaa0, 0x2220, 0x9006, 0x2009,
+	0x1848, 0x210c, 0xd1a4, 0x0138, 0x2009, 0x0029, 0x080c, 0xe445,
+	0xb800, 0xc0e5, 0xb802, 0x080c, 0xa91e, 0x2019, 0x0029, 0x080c,
+	0x943d, 0x0076, 0x2039, 0x0000, 0x080c, 0x9306, 0x2c08, 0x080c,
+	0xe167, 0x007e, 0x080c, 0xa93a, 0x2001, 0x0007, 0x080c, 0x660f,
+	0x2001, 0x0007, 0x080c, 0x65e3, 0x001e, 0x004e, 0x9006, 0x015e,
+	0x003e, 0x002e, 0x00be, 0x00ce, 0x0005, 0x00d6, 0x2069, 0x026e,
+	0x6800, 0x9086, 0x0800, 0x0118, 0x6017, 0x0000, 0x0008, 0x9006,
+	0x00de, 0x0005, 0x00b6, 0x00f6, 0x0016, 0x0026, 0x0036, 0x0156,
+	0x2079, 0x026c, 0x7930, 0x7834, 0x080c, 0x2661, 0x11d0, 0x080c,
+	0x6693, 0x11b8, 0x2011, 0x0270, 0x20a9, 0x0004, 0x0096, 0x2b48,
+	0x2019, 0x000a, 0x080c, 0xbca2, 0x009e, 0x1158, 0x2011, 0x0274,
+	0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019, 0x0006, 0x080c, 0xbca2,
+	0x009e, 0x015e, 0x003e, 0x002e, 0x001e, 0x00fe, 0x00be, 0x0005,
+	0x00b6, 0x0006, 0x0016, 0x0026, 0x0036, 0x0156, 0x2011, 0x0263,
+	0x2204, 0x8211, 0x220c, 0x080c, 0x2661, 0x11d0, 0x080c, 0x6693,
+	0x11b8, 0x2011, 0x0276, 0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019,
+	0x000a, 0x080c, 0xbca2, 0x009e, 0x1158, 0x2011, 0x027a, 0x20a9,
+	0x0004, 0x0096, 0x2b48, 0x2019, 0x0006, 0x080c, 0xbca2, 0x009e,
+	0x015e, 0x003e, 0x002e, 0x001e, 0x000e, 0x00be, 0x0005, 0x00e6,
+	0x00c6, 0x0086, 0x0076, 0x0066, 0x0056, 0x0046, 0x0026, 0x0126,
+	0x2091, 0x8000, 0x080c, 0xa97c, 0x0106, 0x190c, 0xa91e, 0x2740,
+	0x2029, 0x19f2, 0x252c, 0x2021, 0x19f9, 0x2424, 0x2061, 0x1ddc,
+	0x2071, 0x1800, 0x7654, 0x7074, 0x81ff, 0x0150, 0x0006, 0x9186,
+	0x1b34, 0x000e, 0x0128, 0x8001, 0x9602, 0x1a04, 0xe20c, 0x0018,
+	0x9606, 0x0904, 0xe20c, 0x080c, 0x8c1f, 0x0904, 0xe203, 0x2100,
+	0x9c06, 0x0904, 0xe203, 0x080c, 0xe486, 0x1904, 0xe203, 0x080c,
+	0xe822, 0x0904, 0xe203, 0x080c, 0xe476, 0x0904, 0xe203, 0x6720,
+	0x9786, 0x0001, 0x1148, 0x080c, 0x33a8, 0x0904, 0xe24e, 0x6004,
+	0x9086, 0x0000, 0x1904, 0xe24e, 0x9786, 0x0004, 0x0904, 0xe24e,
+	0x9786, 0x0007, 0x0904, 0xe203, 0x2500, 0x9c06, 0x0904, 0xe203,
+	0x2400, 0x9c06, 0x0904, 0xe203, 0x88ff, 0x0118, 0x605c, 0x9906,
+	0x15d0, 0x0096, 0x6043, 0xffff, 0x6000, 0x9086, 0x0004, 0x1120,
+	0x0016, 0x080c, 0x1ac5, 0x001e, 0x9786, 0x000a, 0x0148, 0x080c,
+	0xcb91, 0x1130, 0x080c, 0xb693, 0x009e, 0x080c, 0xaceb, 0x0418,
+	0x6014, 0x2048, 0x080c, 0xc97a, 0x01d8, 0x9786, 0x0003, 0x1588,
+	0xa867, 0x0103, 0xa87c, 0xd0cc, 0x0130, 0x0096, 0xa878, 0x2048,
+	0x080c, 0x0ff9, 0x009e, 0xab7a, 0xa877, 0x0000, 0x080c, 0xe79d,
+	0x0016, 0x080c, 0xcc7f, 0x080c, 0x6de2, 0x001e, 0x080c, 0xcb6b,
+	0x009e, 0x080c, 0xaceb, 0x9ce0, 0x001c, 0x2001, 0x181a, 0x2004,
+	0x9c02, 0x1210, 0x0804, 0xe180, 0x010e, 0x190c, 0xa93a, 0x012e,
+	0x002e, 0x004e, 0x005e, 0x006e, 0x007e, 0x008e, 0x00ce, 0x00ee,
+	0x0005, 0x9786, 0x0006, 0x1150, 0x9386, 0x0005, 0x0128, 0x080c,
+	0xe79d, 0x080c, 0xe3e8, 0x08e0, 0x009e, 0x08e8, 0x9786, 0x0009,
+	0x11f8, 0x6000, 0x9086, 0x0004, 0x01c0, 0x6000, 0x9086, 0x0003,
+	0x11a0, 0x080c, 0x96d5, 0x0096, 0x6114, 0x2148, 0x080c, 0xc97a,
+	0x0118, 0x6010, 0x080c, 0x6dee, 0x009e, 0x00c6, 0x080c, 0xacb0,
+	0x00ce, 0x0036, 0x080c, 0x9738, 0x003e, 0x009e, 0x0804, 0xe203,
+	0x9786, 0x000a, 0x0904, 0xe1f3, 0x0804, 0xe1e8, 0x81ff, 0x0904,
+	0xe203, 0x9180, 0x0001, 0x2004, 0x9086, 0x0018, 0x0138, 0x9180,
+	0x0001, 0x2004, 0x9086, 0x002d, 0x1904, 0xe203, 0x6000, 0x9086,
+	0x0002, 0x1904, 0xe203, 0x080c, 0xcb80, 0x0138, 0x080c, 0xcb91,
+	0x1904, 0xe203, 0x080c, 0xb693, 0x0038, 0x080c, 0x326f, 0x080c,
+	0xcb91, 0x1110, 0x080c, 0xb693, 0x080c, 0xaceb, 0x0804, 0xe203,
+	0xa864, 0x9084, 0x00ff, 0x9086, 0x0039, 0x0005, 0x00c6, 0x00e6,
+	0x0016, 0x2c08, 0x2170, 0x9006, 0x080c, 0xe40f, 0x001e, 0x0120,
+	0x6020, 0x9084, 0x000f, 0x001b, 0x00ee, 0x00ce, 0x0005, 0xe29d,
+	0xe29d, 0xe29d, 0xe29d, 0xe29d, 0xe29d, 0xe29f, 0xe29d, 0xe29d,
+	0xe29d, 0xe29d, 0xaceb, 0xaceb, 0xe29d, 0x9006, 0x0005, 0x0036,
+	0x0046, 0x0016, 0x7010, 0x00b6, 0x2058, 0xbca0, 0x00be, 0x2c00,
+	0x2009, 0x0020, 0x080c, 0xe445, 0x001e, 0x004e, 0x2019, 0x0002,
+	0x080c, 0xdfa1, 0x003e, 0x9085, 0x0001, 0x0005, 0x0096, 0x080c,
+	0xc97a, 0x0140, 0x6014, 0x904d, 0x080c, 0xc566, 0x687b, 0x0005,
+	0x080c, 0x6dee, 0x009e, 0x080c, 0xaceb, 0x9085, 0x0001, 0x0005,
+	0x2001, 0x0001, 0x080c, 0x65cf, 0x0156, 0x0016, 0x0026, 0x0036,
+	0x20a9, 0x0004, 0x2019, 0x1805, 0x2011, 0x0276, 0x080c, 0xbc8e,
+	0x003e, 0x002e, 0x001e, 0x015e, 0x9005, 0x0005, 0x00f6, 0x00e6,
+	0x00c6, 0x0086, 0x0076, 0x0066, 0x00b6, 0x0126, 0x2091, 0x8000,
+	0x2740, 0x2061, 0x1ddc, 0x2079, 0x0001, 0x8fff, 0x0904, 0xe338,
+	0x2071, 0x1800, 0x7654, 0x7074, 0x8001, 0x9602, 0x1a04, 0xe338,
+	0x88ff, 0x0120, 0x2800, 0x9c06, 0x1590, 0x2078, 0x080c, 0xe476,
+	0x0570, 0x2400, 0x9c06, 0x0558, 0x6720, 0x9786, 0x0006, 0x1538,
+	0x9786, 0x0007, 0x0520, 0x88ff, 0x1140, 0x6010, 0x9b06, 0x11f8,
+	0x85ff, 0x0118, 0x605c, 0x9106, 0x11d0, 0x0096, 0x601c, 0xd084,
+	0x0140, 0x080c, 0xe6a0, 0x080c, 0xd0b3, 0x080c, 0x1ac5, 0x6023,
+	0x0007, 0x6014, 0x2048, 0x080c, 0xc97a, 0x0120, 0x0046, 0x080c,
+	0xe3e8, 0x004e, 0x009e, 0x080c, 0xaceb, 0x88ff, 0x1198, 0x9ce0,
+	0x001c, 0x2001, 0x181a, 0x2004, 0x9c02, 0x1210, 0x0804, 0xe2ed,
+	0x9006, 0x012e, 0x00be, 0x006e, 0x007e, 0x008e, 0x00ce, 0x00ee,
+	0x00fe, 0x0005, 0x98c5, 0x0001, 0x0ca0, 0x080c, 0xa91e, 0x00b6,
+	0x0076, 0x0056, 0x0086, 0x9046, 0x2029, 0x0001, 0x2c20, 0x2019,
+	0x0002, 0x6210, 0x2258, 0x0096, 0x904e, 0x080c, 0xa28c, 0x009e,
+	0x008e, 0x903e, 0x080c, 0xa337, 0x080c, 0xe2de, 0x005e, 0x007e,
+	0x00be, 0x080c, 0xa93a, 0x0005, 0x080c, 0xa91e, 0x00b6, 0x0046,
+	0x0056, 0x0076, 0x00c6, 0x0156, 0x2c20, 0x2128, 0x20a9, 0x007f,
+	0x900e, 0x0016, 0x0036, 0x080c, 0x6693, 0x1190, 0x0056, 0x0086,
+	0x9046, 0x2508, 0x2029, 0x0001, 0x0096, 0x904e, 0x080c, 0xa28c,
+	0x009e, 0x008e, 0x903e, 0x080c, 0xa337, 0x080c, 0xe2de, 0x005e,
+	0x003e, 0x001e, 0x8108, 0x1f04, 0xe371, 0x015e, 0x00ce, 0x007e,
+	0x005e, 0x004e, 0x00be, 0x080c, 0xa93a, 0x0005, 0x080c, 0xa91e,
+	0x00b6, 0x0076, 0x0056, 0x6210, 0x2258, 0x0086, 0x9046, 0x2029,
+	0x0001, 0x2019, 0x0048, 0x0096, 0x904e, 0x080c, 0xa28c, 0x009e,
+	0x008e, 0x903e, 0x080c, 0xa337, 0x2c20, 0x080c, 0xe2de, 0x005e,
+	0x007e, 0x00be, 0x080c, 0xa93a, 0x0005, 0x080c, 0xa91e, 0x00b6,
+	0x0046, 0x0056, 0x0076, 0x00c6, 0x0156, 0x2c20, 0x20a9, 0x0800,
+	0x900e, 0x0016, 0x0036, 0x080c, 0x6693, 0x11a0, 0x0086, 0x9046,
+	0x2828, 0x0046, 0x2021, 0x0001, 0x080c, 0xe684, 0x004e, 0x0096,
+	0x904e, 0x080c, 0xa28c, 0x009e, 0x008e, 0x903e, 0x080c, 0xa337,
+	0x080c, 0xe2de, 0x003e, 0x001e, 0x8108, 0x1f04, 0xe3c1, 0x015e,
+	0x00ce, 0x007e, 0x005e, 0x004e, 0x00be, 0x080c, 0xa93a, 0x0005,
+	0x0016, 0x00f6, 0x080c, 0xc978, 0x0198, 0xa864, 0x9084, 0x00ff,
+	0x9086, 0x0046, 0x0180, 0xa800, 0x907d, 0x0138, 0xa803, 0x0000,
+	0xab82, 0x080c, 0x6dee, 0x2f48, 0x0cb0, 0xab82, 0x080c, 0x6dee,
+	0x00fe, 0x001e, 0x0005, 0xa800, 0x907d, 0x0130, 0xa803, 0x0000,
+	0x080c, 0x6dee, 0x2f48, 0x0cb8, 0x080c, 0x6dee, 0x0c88, 0x00e6,
+	0x0046, 0x0036, 0x2061, 0x1ddc, 0x9005, 0x1138, 0x2071, 0x1800,
+	0x7454, 0x7074, 0x8001, 0x9402, 0x12f8, 0x2100, 0x9c06, 0x0188,
+	0x6000, 0x9086, 0x0000, 0x0168, 0x6008, 0x9206, 0x1150, 0x6320,
+	0x9386, 0x0009, 0x01b0, 0x6010, 0x91a0, 0x0004, 0x2424, 0x9406,
+	0x0140, 0x9ce0, 0x001c, 0x2001, 0x181a, 0x2004, 0x9c02, 0x1220,
+	0x0c20, 0x9085, 0x0001, 0x0008, 0x9006, 0x003e, 0x004e, 0x00ee,
+	0x0005, 0x631c, 0xd3c4, 0x1d68, 0x0c30, 0x0096, 0x0006, 0x080c,
+	0x1047, 0x000e, 0x090c, 0x0d7d, 0xaae2, 0xa867, 0x010d, 0xa88e,
+	0x0026, 0x2010, 0x080c, 0xc968, 0x2001, 0x0000, 0x0120, 0x2200,
+	0x9080, 0x0017, 0x2004, 0x002e, 0xa87a, 0x9186, 0x0020, 0x0110,
+	0xa8e3, 0xffff, 0xa986, 0xac76, 0xa87f, 0x0000, 0x2001, 0x198d,
+	0x2004, 0xa882, 0x9006, 0xa802, 0xa86a, 0xa88a, 0x0126, 0x2091,
+	0x8000, 0x080c, 0x6dee, 0x012e, 0x009e, 0x0005, 0x6700, 0x9786,
+	0x0000, 0x0158, 0x9786, 0x0001, 0x0140, 0x9786, 0x000a, 0x0128,
+	0x9786, 0x0009, 0x0110, 0x9085, 0x0001, 0x0005, 0x00e6, 0x6010,
+	0x9075, 0x0138, 0x00b6, 0x2058, 0xb8a0, 0x00be, 0x9206, 0x00ee,
+	0x0005, 0x9085, 0x0001, 0x0cd8, 0x0016, 0x6004, 0x908e, 0x001e,
+	0x11a0, 0x8007, 0x6134, 0x918c, 0x00ff, 0x9105, 0x6036, 0x6007,
+	0x0085, 0x6003, 0x000b, 0x6023, 0x0005, 0x2001, 0x1986, 0x2004,
+	0x601a, 0x2009, 0x8020, 0x080c, 0x92b0, 0x001e, 0x0005, 0xa001,
+	0xa001, 0x0005, 0x6024, 0xd0e4, 0x0158, 0xd0cc, 0x0118, 0x080c,
+	0xccc6, 0x0030, 0x080c, 0xe6a0, 0x080c, 0x894e, 0x080c, 0xacb0,
+	0x0005, 0x9280, 0x0008, 0x2004, 0x9084, 0x000f, 0x0002, 0xe4d5,
+	0xe4d5, 0xe4d5, 0xe4d7, 0xe4d5, 0xe4d7, 0xe4d7, 0xe4d5, 0xe4d7,
+	0xe4d5, 0xe4d5, 0xe4d5, 0xe4d5, 0xe4d5, 0x9006, 0x0005, 0x9085,
+	0x0001, 0x0005, 0x9280, 0x0008, 0x2004, 0x9084, 0x000f, 0x0002,
+	0xe4ee, 0xe4ee, 0xe4ee, 0xe4ee, 0xe4ee, 0xe4ee, 0xe4fb, 0xe4ee,
+	0xe4ee, 0xe4ee, 0xe4ee, 0xe4ee, 0xe4ee, 0xe4ee, 0x6007, 0x003b,
+	0x602f, 0x0009, 0x6017, 0x2a00, 0x6003, 0x0001, 0x2009, 0x8020,
+	0x080c, 0x92b0, 0x0005, 0x0096, 0x00c6, 0x2260, 0x080c, 0xe6a0,
+	0x604b, 0x0000, 0x6024, 0xc0f4, 0xc0e4, 0x6026, 0x603b, 0x0000,
+	0x00ce, 0x00d6, 0x2268, 0x9186, 0x0007, 0x1904, 0xe554, 0x6814,
+	0x9005, 0x0138, 0x2048, 0xa87c, 0xd0fc, 0x1118, 0x00de, 0x009e,
+	0x08a8, 0x6007, 0x003a, 0x6003, 0x0001, 0x2009, 0x8020, 0x080c,
+	0x92b0, 0x00c6, 0x2d60, 0x6100, 0x9186, 0x0002, 0x1904, 0xe5cb,
+	0x6014, 0x9005, 0x1138, 0x6000, 0x9086, 0x0007, 0x190c, 0x0d7d,
+	0x0804, 0xe5cb, 0x2048, 0x080c, 0xc97a, 0x1130, 0x0028, 0x2048,
+	0xa800, 0x9005, 0x1de0, 0x2900, 0x2048, 0xa87c, 0x9084, 0x0003,
+	0x9086, 0x0002, 0x1168, 0xa87c, 0xc0dc, 0xc0f4, 0xa87e, 0xa880,
+	0xc0fc, 0xa882, 0x2009, 0x0043, 0x080c, 0xddde, 0x0804, 0xe5cb,
+	0x2009, 0x0041, 0x0804, 0xe5c5, 0x9186, 0x0005, 0x15a0, 0x6814,
+	0x2048, 0xa87c, 0xd0bc, 0x1120, 0x00de, 0x009e, 0x0804, 0xe4ee,
+	0xd0b4, 0x0128, 0xd0fc, 0x090c, 0x0d7d, 0x0804, 0xe50f, 0x6007,
+	0x003a, 0x6003, 0x0001, 0x2009, 0x8020, 0x080c, 0x92b0, 0x00c6,
+	0x2d60, 0x6100, 0x9186, 0x0002, 0x0120, 0x9186, 0x0004, 0x1904,
+	0xe5cb, 0x6814, 0x2048, 0xa97c, 0xc1f4, 0xc1dc, 0xa97e, 0xa980,
+	0xc1fc, 0xc1bc, 0xa982, 0x00f6, 0x2c78, 0x080c, 0x1778, 0x00fe,
+	0x2009, 0x0042, 0x04d0, 0x0036, 0x080c, 0x1047, 0x090c, 0x0d7d,
+	0xa867, 0x010d, 0x9006, 0xa802, 0xa86a, 0xa88a, 0x2d18, 0xab8e,
+	0xa887, 0x0045, 0x2c00, 0xa892, 0x6038, 0xa8a2, 0x2360, 0x6024,
+	0xc0dd, 0x6026, 0x6010, 0x00b6, 0x2058, 0xb8a0, 0x00be, 0x2004,
+	0x635c, 0xab7a, 0xa876, 0x9006, 0xa87e, 0xa882, 0xad9a, 0xae96,
+	0xa89f, 0x0001, 0x080c, 0x6dee, 0x2019, 0x0045, 0x6008, 0x2068,
+	0x080c, 0xdfa1, 0x2d00, 0x600a, 0x6023, 0x0006, 0x6003, 0x0007,
+	0x901e, 0x631a, 0x634a, 0x003e, 0x0038, 0x604b, 0x0000, 0x6003,
+	0x0007, 0x080c, 0xddde, 0x00ce, 0x00de, 0x009e, 0x0005, 0x9186,
+	0x0013, 0x1128, 0x6004, 0x9082, 0x0085, 0x2008, 0x00c2, 0x9186,
+	0x0027, 0x1178, 0x080c, 0x967a, 0x0036, 0x0096, 0x6014, 0x2048,
+	0x2019, 0x0004, 0x080c, 0xe3e8, 0x009e, 0x003e, 0x080c, 0x9738,
+	0x0005, 0x9186, 0x0014, 0x0d70, 0x080c, 0xad6a, 0x0005, 0xe5fe,
+	0xe5fc, 0xe5fc, 0xe5fc, 0xe5fc, 0xe5fc, 0xe5fe, 0xe5fc, 0xe5fc,
+	0xe5fc, 0xe5fc, 0xe5fc, 0xe5fc, 0x080c, 0x0d7d, 0x6003, 0x000c,
+	0x080c, 0x9738, 0x0005, 0x9182, 0x0092, 0x1220, 0x9182, 0x0085,
+	0x0208, 0x001a, 0x080c, 0xad6a, 0x0005, 0xe61a, 0xe61a, 0xe61a,
+	0xe61a, 0xe61c, 0xe63c, 0xe61a, 0xe61a, 0xe61a, 0xe61a, 0xe61a,
+	0xe61a, 0xe61a, 0x080c, 0x0d7d, 0x00d6, 0x2c68, 0x080c, 0xac5a,
+	0x01b0, 0x6003, 0x0001, 0x6007, 0x001e, 0x2009, 0x026e, 0x210c,
+	0x613a, 0x2009, 0x026f, 0x210c, 0x613e, 0x600b, 0xffff, 0x6910,
+	0x6112, 0x6023, 0x0004, 0x2009, 0x8020, 0x080c, 0x92b0, 0x2d60,
+	0x080c, 0xacb0, 0x00de, 0x0005, 0x080c, 0xacb0, 0x0005, 0x00e6,
+	0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0ec, 0x00ee, 0x0005,
+	0x2009, 0x1867, 0x210c, 0xd1ec, 0x05b0, 0x6003, 0x0002, 0x6024,
+	0xc0e5, 0x6026, 0xd0cc, 0x0150, 0x2001, 0x1987, 0x2004, 0x604a,
+	0x2009, 0x1867, 0x210c, 0xd1f4, 0x1520, 0x00a0, 0x2009, 0x1867,
+	0x210c, 0xd1f4, 0x0128, 0x6024, 0xc0e4, 0x6026, 0x9006, 0x00d8,
+	0x2001, 0x1987, 0x200c, 0x2001, 0x1985, 0x2004, 0x9100, 0x9080,
+	0x000a, 0x604a, 0x6010, 0x00b6, 0x2058, 0xb8bc, 0x00be, 0x0008,
+	0x2104, 0x9005, 0x0118, 0x9088, 0x0003, 0x0cd0, 0x2c0a, 0x600f,
+	0x0000, 0x9085, 0x0001, 0x0005, 0x0016, 0x00c6, 0x00e6, 0x615c,
+	0xb8bc, 0x2060, 0x8cff, 0x0180, 0x84ff, 0x1118, 0x605c, 0x9106,
+	0x1138, 0x600c, 0x2072, 0x080c, 0x894e, 0x080c, 0xacb0, 0x0010,
+	0x9cf0, 0x0003, 0x2e64, 0x0c70, 0x00ee, 0x00ce, 0x001e, 0x0005,
+	0x00d6, 0x00b6, 0x6010, 0x2058, 0xb8bc, 0x2068, 0x9005, 0x0130,
+	0x9c06, 0x0110, 0x680c, 0x0cd0, 0x600c, 0x680e, 0x00be, 0x00de,
+	0x0005, 0x0026, 0x0036, 0x0156, 0x2011, 0x182c, 0x2204, 0x9084,
+	0x00ff, 0x2019, 0x026e, 0x2334, 0x9636, 0x1508, 0x8318, 0x2334,
+	0x2204, 0x9084, 0xff00, 0x9636, 0x11d0, 0x2011, 0x0270, 0x20a9,
+	0x0004, 0x6010, 0x0096, 0x2048, 0x2019, 0x000a, 0x080c, 0xbca2,
+	0x009e, 0x1168, 0x2011, 0x0274, 0x20a9, 0x0004, 0x6010, 0x0096,
+	0x2048, 0x2019, 0x0006, 0x080c, 0xbca2, 0x009e, 0x1100, 0x015e,
+	0x003e, 0x002e, 0x0005, 0x00e6, 0x2071, 0x1800, 0x080c, 0x6025,
+	0x080c, 0x3011, 0x00ee, 0x0005, 0x0096, 0x0026, 0x080c, 0x1047,
+	0x090c, 0x0d7d, 0xa85c, 0x9080, 0x001a, 0x20a0, 0x20a9, 0x000c,
+	0xa860, 0x20e8, 0x9006, 0x4004, 0x9186, 0x0046, 0x1118, 0xa867,
+	0x0136, 0x0038, 0xa867, 0x0138, 0x9186, 0x0041, 0x0110, 0xa87b,
+	0x0001, 0x7038, 0x9084, 0xff00, 0x7240, 0x9294, 0xff00, 0x8007,
+	0x9215, 0xaa9a, 0x9186, 0x0046, 0x1168, 0x7038, 0x9084, 0x00ff,
+	0x723c, 0x9294, 0xff00, 0x9215, 0xaa9e, 0x723c, 0x9294, 0x00ff,
+	0xaaa2, 0x0060, 0x7040, 0x9084, 0x00ff, 0x7244, 0x9294, 0xff00,
+	0x9215, 0xaa9e, 0x7244, 0x9294, 0x00ff, 0xaaa2, 0x9186, 0x0046,
+	0x1118, 0x9e90, 0x0012, 0x0010, 0x9e90, 0x001a, 0x2204, 0x8007,
+	0xa8a6, 0x8210, 0x2204, 0x8007, 0xa8aa, 0x8210, 0x2204, 0x8007,
+	0xa8ae, 0x8210, 0x2204, 0x8007, 0xa8b2, 0x8210, 0x9186, 0x0046,
+	0x11b8, 0x9e90, 0x0016, 0x2204, 0x8007, 0xa8b6, 0x8210, 0x2204,
+	0x8007, 0xa8ba, 0x8210, 0x2204, 0x8007, 0xa8be, 0x8210, 0x2204,
+	0x8007, 0xa8c2, 0x8210, 0x2011, 0x0205, 0x2013, 0x0001, 0x00b0,
+	0x9e90, 0x001e, 0x2204, 0x8007, 0xa8b6, 0x8210, 0x2204, 0x8007,
+	0xa8ba, 0x2011, 0x0205, 0x2013, 0x0001, 0x2011, 0x0260, 0x2204,
+	0x8007, 0xa8be, 0x8210, 0x2204, 0x8007, 0xa8c2, 0x9186, 0x0046,
+	0x1118, 0x2011, 0x0262, 0x0010, 0x2011, 0x026a, 0x0146, 0x01d6,
+	0x0036, 0x20a9, 0x0001, 0x2019, 0x0008, 0xa860, 0x20e8, 0xa85c,
+	0x9080, 0x0031, 0x20a0, 0x2204, 0x8007, 0x4004, 0x8210, 0x8319,
+	0x1dd0, 0x003e, 0x01ce, 0x013e, 0x2011, 0x0205, 0x2013, 0x0000,
+	0x002e, 0x080c, 0x6dee, 0x009e, 0x0005, 0x00e6, 0x6010, 0x00b6,
+	0x2058, 0xb800, 0x00be, 0xd0fc, 0x0108, 0x0011, 0x00ee, 0x0005,
+	0xa880, 0xc0e5, 0xa882, 0x0005, 0x00e6, 0x00d6, 0x00c6, 0x0076,
+	0x0066, 0x0056, 0x0046, 0x0026, 0x0016, 0x0126, 0x2091, 0x8000,
+	0x2029, 0x19f2, 0x252c, 0x2021, 0x19f9, 0x2424, 0x2061, 0x1ddc,
+	0x2071, 0x1800, 0x7654, 0x7074, 0x9606, 0x0578, 0x6720, 0x9786,
+	0x0001, 0x0118, 0x9786, 0x0008, 0x1500, 0x2500, 0x9c06, 0x01e8,
+	0x2400, 0x9c06, 0x01d0, 0x080c, 0xe476, 0x01b8, 0x080c, 0xe486,
+	0x11a0, 0x6000, 0x9086, 0x0004, 0x1120, 0x0016, 0x080c, 0x1ac5,
+	0x001e, 0x080c, 0xcb80, 0x1110, 0x080c, 0x326f, 0x080c, 0xcb91,
+	0x1110, 0x080c, 0xb693, 0x080c, 0xaceb, 0x9ce0, 0x001c, 0x2001,
+	0x181a, 0x2004, 0x9c02, 0x1208, 0x0858, 0x012e, 0x001e, 0x002e,
+	0x004e, 0x005e, 0x006e, 0x007e, 0x00ce, 0x00de, 0x00ee, 0x0005,
+	0x2001, 0x1810, 0x2004, 0xd0dc, 0x0005, 0x0006, 0x2001, 0x1837,
+	0x2004, 0xd09c, 0x000e, 0x0005, 0x0006, 0x0036, 0x0046, 0x080c,
+	0xd09b, 0x0168, 0x2019, 0xffff, 0x9005, 0x0128, 0x6010, 0x00b6,
+	0x2058, 0xbba0, 0x00be, 0x2021, 0x0004, 0x080c, 0x4d09, 0x004e,
+	0x003e, 0x000e, 0x6004, 0x9086, 0x0001, 0x1128, 0x080c, 0xa404,
+	0x080c, 0xaceb, 0x9006, 0x0005, 0x00e6, 0x00c6, 0x00b6, 0x0046,
+	0x2061, 0x1ddc, 0x2071, 0x1800, 0x7454, 0x7074, 0x8001, 0x9402,
+	0x12d8, 0x2100, 0x9c06, 0x0168, 0x6000, 0x9086, 0x0000, 0x0148,
+	0x6010, 0x2058, 0xb8a0, 0x9206, 0x1120, 0x6004, 0x9086, 0x0002,
+	0x0140, 0x9ce0, 0x001c, 0x2001, 0x181a, 0x2004, 0x9c02, 0x1220,
+	0x0c40, 0x9085, 0x0001, 0x0008, 0x9006, 0x004e, 0x00be, 0x00ce,
+	0x00ee, 0x0005, 0x0126, 0x0006, 0x00e6, 0x0016, 0x2091, 0x8000,
+	0x2071, 0x1840, 0xd5a4, 0x0118, 0x7004, 0x8000, 0x7006, 0xd5b4,
+	0x0118, 0x7000, 0x8000, 0x7002, 0xd5ac, 0x0178, 0x2500, 0x9084,
+	0x0007, 0x908e, 0x0003, 0x0148, 0x908e, 0x0004, 0x0130, 0x908e,
+	0x0005, 0x0118, 0x2071, 0xfff6, 0x0089, 0x001e, 0x00ee, 0x000e,
+	0x012e, 0x0005, 0x0126, 0x0006, 0x00e6, 0x2091, 0x8000, 0x2071,
+	0xffee, 0x0021, 0x00ee, 0x000e, 0x012e, 0x0005, 0x2e05, 0x8000,
+	0x2077, 0x1220, 0x8e70, 0x2e05, 0x8000, 0x2077, 0x0005, 0x00e6,
+	0x2071, 0xffec, 0x0c99, 0x00ee, 0x0005, 0x00e6, 0x2071, 0xfff0,
+	0x0c69, 0x00ee, 0x0005, 0x0126, 0x0006, 0x00e6, 0x2091, 0x8000,
+	0x2071, 0x1840, 0x7014, 0x8000, 0x7016, 0x00ee, 0x000e, 0x012e,
+	0x0005, 0x0001, 0x0002, 0x0004, 0x0008, 0x0010, 0x0020, 0x0040,
+	0x0080, 0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x2000, 0x4000,
+	0x8000, 0x3f07
 };
 #ifdef UNIQUE_FW_NAME
-unsigned short fw2322ipx_length01 = 0xdf8f;
+unsigned short fw2322ipx_length01 = 0xe0c2;
 #else
-unsigned short risc_code_length01 = 0xdf8f;
+unsigned short risc_code_length01 = 0xe0c2;
 #endif
 
 /*
@@ -7853,7 +7892,7 @@
 	0x0005, 0x00b0, 0x0010, 0x0009, 0x0015, 0x0033, 0x0000, 0xb012,
 	0x000b, 0x84d4, 0x0013, 0x043b, 0x0000, 0xba30, 0x0005, 0x0031,
 	0x0010, 0x0035, 0x0015, 0x0033, 0x0000, 0xb009, 0x000b, 0x84db,
-	0x0002, 0xb040, 0x0003, 0x14e9, 0x0000, 0xb7b0, 0x0000, 0xb9b1,
+	0x0002, 0xb040, 0x0003, 0x14e9, 0x0010, 0xb9b0, 0x0010, 0xb7b1,
 	0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88, 0x0000, 0x0013,
 	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb012, 0x000b, 0x84e7,
 	0x0003, 0x04eb, 0x0010, 0xc0b1, 0x0000, 0xc0b0, 0x0017, 0x4000,
@@ -8080,6 +8119,6 @@
 	0x000b, 0x885c, 0x0012, 0x1027, 0x0010, 0xffb2, 0x0011, 0x1388,
 	0x0010, 0x0011, 0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0xb20a,
 	0x001b, 0x8864, 0x0015, 0x00b8, 0x0000, 0x0007, 0x0003, 0x4867,
-	0x0000, 0xb838, 0x0017, 0x4000, 0xa307, 0x24ad
+	0x0000, 0xb838, 0x0017, 0x4000, 0xa2e7, 0x24ad
 };
 unsigned short xseqipx_code_length01 = 0x10d6;
diff -Nru a/drivers/scsi/qla2xxx/ql6312.c b/drivers/scsi/qla2xxx/ql6312.c
--- a/drivers/scsi/qla2xxx/ql6312.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/scsi/qla2xxx/ql6312.c	2005-01-10 20:11:23 -08:00
@@ -35,6 +35,11 @@
 		.isp_name	= "ISP6312",
 		.fw_info	= qla_fw_tbl,
 	},
+	{
+		.drv_name	= qla_driver_name,
+		.isp_name	= "ISP6322",
+		.fw_info	= qla_fw_tbl,
+	},
 };
 
 static struct pci_device_id qla6312_pci_tbl[] = {
@@ -45,6 +50,13 @@
 		.subdevice	= PCI_ANY_ID,
 		.driver_data	= (unsigned long)&qla_board_tbl[0],
 	},
+	{
+		.vendor		= PCI_VENDOR_ID_QLOGIC,
+		.device		= PCI_DEVICE_ID_QLOGIC_ISP6322,
+		.subvendor	= PCI_ANY_ID,
+		.subdevice	= PCI_ANY_ID,
+		.driver_data	= (unsigned long)&qla_board_tbl[1],
+	},
 	{0, 0},
 };
 MODULE_DEVICE_TABLE(pci, qla6312_pci_tbl);
@@ -85,6 +97,6 @@
 module_exit(qla6312_exit);
 
 MODULE_AUTHOR("QLogic Corporation");
-MODULE_DESCRIPTION("QLogic ISP6312 FC-SCSI Host Bus Adapter driver");
+MODULE_DESCRIPTION("QLogic ISP63xx FC-SCSI Host Bus Adapter driver");
 MODULE_LICENSE("GPL");
 MODULE_VERSION(QLA2XXX_VERSION);
diff -Nru a/drivers/scsi/qla2xxx/ql6312_fw.c b/drivers/scsi/qla2xxx/ql6312_fw.c
--- a/drivers/scsi/qla2xxx/ql6312_fw.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/scsi/qla2xxx/ql6312_fw.c	2005-01-10 20:11:17 -08:00
@@ -1,8 +1,8 @@
-/**************************************************************************
+/******************************************************************************
  *                  QLOGIC LINUX SOFTWARE
  *
  * QLogic ISP2x00 device driver for Linux 2.6.x
- * Copyright (C) 2003-2004 QLogic Corporation
+ * Copyright (C) 2003 QLogic Corporation
  * (www.qlogic.com)
  *
  * This program is free software; you can redistribute it and/or modify it
@@ -15,10 +15,10 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  *
- *************************************************************************/
+ ******************************************************************************/
 
 /*
- *	Firmware Version 3.03.02 (16:50 Aug 10, 2004)
+ *	Firmware Version 3.03.08 (10:02 Nov 12, 2004)
  */
 
 #ifdef UNIQUE_FW_NAME
@@ -28,15 +28,15 @@
 #endif
 
 #ifdef UNIQUE_FW_NAME
-unsigned char fw2300flx_version_str[] = {3, 3, 2};
+unsigned char fw2300flx_version_str[] = {3, 3, 8};
 #else
-unsigned char firmware_version[] = {3, 3, 2};
+unsigned char firmware_version[] = {3, 3, 8};
 #endif
 
 #ifdef UNIQUE_FW_NAME
-#define fw2300flx_VERSION_STRING "3.03.02"
+#define fw2300flx_VERSION_STRING "3.03.08"
 #else
-#define FW_VERSION_STRING "3.03.02"
+#define FW_VERSION_STRING "3.03.08"
 #endif
 
 #ifdef UNIQUE_FW_NAME
@@ -50,12 +50,12 @@
 #else
 unsigned short risc_code01[] = { 
 #endif
-	0x0470, 0x0000, 0x0000, 0xd5d4, 0x0000, 0x0003, 0x0003, 0x0002,
+	0x0470, 0x0000, 0x0000, 0xdd79, 0x0000, 0x0003, 0x0003, 0x0008,
 	0x0317, 0x2043, 0x4f50, 0x5952, 0x4947, 0x4854, 0x2032, 0x3030,
 	0x3120, 0x514c, 0x4f47, 0x4943, 0x2043, 0x4f52, 0x504f, 0x5241,
 	0x5449, 0x4f4e, 0x2049, 0x5350, 0x3233, 0x3030, 0x2046, 0x6972,
 	0x6d77, 0x6172, 0x6520, 0x2056, 0x6572, 0x7369, 0x6f6e, 0x2030,
-	0x332e, 0x3033, 0x2e30, 0x3220, 0x2020, 0x2020, 0x2400, 0x20a9,
+	0x332e, 0x3033, 0x2e30, 0x3820, 0x2020, 0x2020, 0x2400, 0x20a9,
 	0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2200, 0x20a9, 0x000f,
 	0x2001, 0x0000, 0x400f, 0x2091, 0x2400, 0x20a9, 0x000f, 0x2001,
 	0x0000, 0x400f, 0x2091, 0x2600, 0x20a9, 0x000f, 0x2001, 0x0000,
@@ -64,3407 +64,3486 @@
 	0x2c00, 0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2e00,
 	0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2000, 0x2001,
 	0x0000, 0x20c1, 0x0004, 0x20c9, 0x1bff, 0x2059, 0x0000, 0x2b78,
-	0x7883, 0x0004, 0x2089, 0x2b5b, 0x2051, 0x1800, 0x2a70, 0x20e1,
-	0x0001, 0x20e9, 0x0001, 0x2009, 0x0000, 0x080c, 0x0e2f, 0x2029,
+	0x7883, 0x0004, 0x2089, 0x2cff, 0x2051, 0x1800, 0x2a70, 0x20e1,
+	0x0001, 0x20e9, 0x0001, 0x2009, 0x0000, 0x080c, 0x0e75, 0x2029,
 	0x2480, 0x2031, 0xffff, 0x2039, 0x2450, 0x2021, 0x0050, 0x20e9,
 	0x0001, 0x20a1, 0x0000, 0x20a9, 0x0800, 0x900e, 0x4104, 0x20e9,
 	0x0001, 0x20a1, 0x1000, 0x900e, 0x2001, 0x0cc0, 0x9084, 0x0fff,
 	0x20a8, 0x4104, 0x2001, 0x0000, 0x9086, 0x0000, 0x0120, 0x21a8,
 	0x4104, 0x8001, 0x1de0, 0x756a, 0x766e, 0x7766, 0x7472, 0x7476,
-	0x00e6, 0x2071, 0x1a9f, 0x2472, 0x00ee, 0x20a1, 0x1cd0, 0x716c,
+	0x00e6, 0x2071, 0x1aa2, 0x2472, 0x00ee, 0x20a1, 0x1cd0, 0x716c,
 	0x810d, 0x810d, 0x810d, 0x810d, 0x918c, 0x000f, 0x2001, 0x0001,
 	0x9112, 0x900e, 0x21a8, 0x4104, 0x8211, 0x1de0, 0x716c, 0x3400,
 	0x8001, 0x9102, 0x0120, 0x0218, 0x20a8, 0x900e, 0x4104, 0x2009,
 	0x1800, 0x810d, 0x810d, 0x810d, 0x810d, 0x810d, 0x918c, 0x001f,
 	0x2001, 0x0001, 0x9112, 0x20e9, 0x0001, 0x20a1, 0x0800, 0x900e,
-	0x20a9, 0x0800, 0x4104, 0x8211, 0x1dd8, 0x080c, 0x0f03, 0x080c,
-	0x5cf3, 0x080c, 0x9dc5, 0x080c, 0x10ba, 0x080c, 0x129f, 0x080c,
-	0x1a60, 0x080c, 0x0d46, 0x080c, 0x103f, 0x080c, 0x3245, 0x080c,
-	0x72a0, 0x080c, 0x6635, 0x080c, 0x7f7a, 0x080c, 0x2317, 0x080c,
-	0x82a7, 0x080c, 0x792a, 0x080c, 0x2154, 0x080c, 0x2288, 0x080c,
-	0x230c, 0x2091, 0x3009, 0x7883, 0x0000, 0x1004, 0x091d, 0x7880,
+	0x20a9, 0x0800, 0x4104, 0x8211, 0x1dd8, 0x080c, 0x0f49, 0x080c,
+	0x5f39, 0x080c, 0xa079, 0x080c, 0x1100, 0x080c, 0x12f8, 0x080c,
+	0x1af5, 0x080c, 0x0d8c, 0x080c, 0x1085, 0x080c, 0x33e9, 0x080c,
+	0x7518, 0x080c, 0x687e, 0x080c, 0x8215, 0x080c, 0x23bd, 0x080c,
+	0x8526, 0x080c, 0x7b99, 0x080c, 0x21e9, 0x080c, 0x231d, 0x080c,
+	0x23b2, 0x2091, 0x3009, 0x7883, 0x0000, 0x1004, 0x091d, 0x7880,
 	0x9086, 0x0002, 0x1190, 0x7883, 0x4000, 0x7837, 0x4000, 0x7833,
 	0x0010, 0x0e04, 0x0911, 0x2091, 0x5000, 0x2091, 0x4080, 0x2001,
-	0x0089, 0x2004, 0xd084, 0x190c, 0x1187, 0x2071, 0x1800, 0x7003,
+	0x0089, 0x2004, 0xd084, 0x190c, 0x11e0, 0x2071, 0x1800, 0x7003,
 	0x0000, 0x2071, 0x1800, 0x7000, 0x908e, 0x0003, 0x1168, 0x080c,
-	0x49b9, 0x080c, 0x326c, 0x080c, 0x7311, 0x080c, 0x6ae5, 0x080c,
-	0x7fa3, 0x080c, 0x2ac5, 0x0c68, 0x000b, 0x0c88, 0x0940, 0x0941,
-	0x0ad8, 0x093e, 0x0b8f, 0x0d45, 0x0d45, 0x0d45, 0x080c, 0x0db4,
+	0x4be4, 0x080c, 0x3410, 0x080c, 0x7580, 0x080c, 0x6d2e, 0x080c,
+	0x823e, 0x080c, 0x2c2c, 0x0c68, 0x000b, 0x0c88, 0x0940, 0x0941,
+	0x0ad8, 0x093e, 0x0b8f, 0x0d8b, 0x0d8b, 0x0d8b, 0x080c, 0x0dfa,
 	0x0005, 0x0126, 0x00f6, 0x2091, 0x8000, 0x7000, 0x9086, 0x0001,
-	0x1904, 0x0aab, 0x080c, 0x0e71, 0x080c, 0x6faa, 0x0150, 0x080c,
-	0x6fcd, 0x15a0, 0x2079, 0x0100, 0x7828, 0x9085, 0x1800, 0x782a,
-	0x0468, 0x080c, 0x6edc, 0x7000, 0x9086, 0x0001, 0x1904, 0x0aab,
-	0x7094, 0x9086, 0x0028, 0x1904, 0x0aab, 0x080c, 0x7f72, 0x080c,
-	0x7f64, 0x2001, 0x0161, 0x2003, 0x0001, 0x2079, 0x0100, 0x7827,
-	0xffff, 0x7a28, 0x9295, 0x5e2f, 0x7a2a, 0x2011, 0x6e2b, 0x080c,
-	0x803f, 0x2011, 0x6e1e, 0x080c, 0x8113, 0x2011, 0x5b4e, 0x080c,
-	0x803f, 0x2011, 0x8030, 0x901e, 0x7392, 0x04d0, 0x080c, 0x53fb,
-	0x2079, 0x0100, 0x7844, 0x9005, 0x1904, 0x0aab, 0x2011, 0x5b4e,
-	0x080c, 0x803f, 0x2011, 0x6e2b, 0x080c, 0x803f, 0x2011, 0x6e1e,
-	0x080c, 0x8113, 0x2001, 0x0265, 0x2001, 0x0205, 0x2003, 0x0000,
+	0x1904, 0x0aab, 0x080c, 0x0eb7, 0x080c, 0x7207, 0x0150, 0x080c,
+	0x722a, 0x15a0, 0x2079, 0x0100, 0x7828, 0x9085, 0x1800, 0x782a,
+	0x0468, 0x080c, 0x7127, 0x7000, 0x9086, 0x0001, 0x1904, 0x0aab,
+	0x7094, 0x9086, 0x0028, 0x1904, 0x0aab, 0x080c, 0x81fe, 0x080c,
+	0x81f0, 0x2001, 0x0161, 0x2003, 0x0001, 0x2079, 0x0100, 0x7827,
+	0xffff, 0x7a28, 0x9295, 0x5e2f, 0x7a2a, 0x2011, 0x7076, 0x080c,
+	0x82da, 0x2011, 0x7069, 0x080c, 0x83ae, 0x2011, 0x5d94, 0x080c,
+	0x82da, 0x2011, 0x8030, 0x901e, 0x7392, 0x04d0, 0x080c, 0x5641,
+	0x2079, 0x0100, 0x7844, 0x9005, 0x1904, 0x0aab, 0x2011, 0x5d94,
+	0x080c, 0x82da, 0x2011, 0x7076, 0x080c, 0x82da, 0x2011, 0x7069,
+	0x080c, 0x83ae, 0x2001, 0x0265, 0x2001, 0x0205, 0x2003, 0x0000,
 	0x7840, 0x9084, 0xfffb, 0x7842, 0x2001, 0x197e, 0x2004, 0x9005,
-	0x1140, 0x00c6, 0x2061, 0x0100, 0x080c, 0x5c9b, 0x00ce, 0x0804,
-	0x0aab, 0x780f, 0x006b, 0x7a28, 0x080c, 0x6fb2, 0x0118, 0x9295,
+	0x1140, 0x00c6, 0x2061, 0x0100, 0x080c, 0x5ee1, 0x00ce, 0x0804,
+	0x0aab, 0x780f, 0x006b, 0x7a28, 0x080c, 0x720f, 0x0118, 0x9295,
 	0x5e2f, 0x0010, 0x9295, 0x402f, 0x7a2a, 0x2011, 0x8010, 0x73d4,
-	0x2001, 0x197f, 0x2003, 0x0001, 0x080c, 0x298b, 0x080c, 0x48f4,
+	0x2001, 0x197f, 0x2003, 0x0001, 0x080c, 0x2a89, 0x080c, 0x4b1f,
 	0x7244, 0xc284, 0x7246, 0x2001, 0x180c, 0x200c, 0xc1ac, 0xc1cc,
-	0x2102, 0x080c, 0x9650, 0x2011, 0x0004, 0x080c, 0xbb4b, 0x080c,
-	0x6479, 0x080c, 0x6faa, 0x1120, 0x080c, 0x29cf, 0x02e0, 0x0400,
-	0x080c, 0x5ca2, 0x0140, 0x7093, 0x0001, 0x70cf, 0x0000, 0x080c,
-	0x55c8, 0x0804, 0x0aab, 0x080c, 0x539a, 0xd094, 0x0188, 0x2011,
-	0x180c, 0x2204, 0xc0cd, 0x2012, 0x080c, 0x539e, 0xd0d4, 0x1118,
-	0x080c, 0x29cf, 0x1270, 0x2011, 0x180c, 0x2204, 0xc0bc, 0x0088,
-	0x080c, 0x539e, 0xd0d4, 0x1db8, 0x2011, 0x180c, 0x2204, 0xc0bd,
-	0x0040, 0x2011, 0x180c, 0x2204, 0xc0bd, 0x2012, 0x080c, 0x6572,
-	0x0008, 0x2012, 0x080c, 0x6538, 0x0120, 0x7a0c, 0xc2b4, 0x7a0e,
-	0x00a8, 0x707b, 0x0000, 0x080c, 0x6faa, 0x1130, 0x70ac, 0x9005,
-	0x1168, 0x080c, 0xbf8c, 0x0050, 0x080c, 0xbf8c, 0x70d8, 0xd09c,
-	0x1128, 0x70ac, 0x9005, 0x0110, 0x080c, 0x5c78, 0x70e3, 0x0000,
-	0x70df, 0x0000, 0x70a3, 0x0000, 0x080c, 0x29d7, 0x0228, 0x2011,
-	0x0101, 0x2204, 0xc0c4, 0x2012, 0x72d8, 0x080c, 0x6faa, 0x1178,
+	0x2102, 0x080c, 0x9904, 0x2011, 0x0004, 0x080c, 0xbe47, 0x080c,
+	0x66c2, 0x080c, 0x7207, 0x1120, 0x080c, 0x2af6, 0x02e0, 0x0400,
+	0x080c, 0x5ee8, 0x0140, 0x7093, 0x0001, 0x70cf, 0x0000, 0x080c,
+	0x580e, 0x0804, 0x0aab, 0x080c, 0x55db, 0xd094, 0x0188, 0x2011,
+	0x180c, 0x2204, 0xc0cd, 0x2012, 0x080c, 0x55df, 0xd0d4, 0x1118,
+	0x080c, 0x2af6, 0x1270, 0x2011, 0x180c, 0x2204, 0xc0bc, 0x0088,
+	0x080c, 0x55df, 0xd0d4, 0x1db8, 0x2011, 0x180c, 0x2204, 0xc0bd,
+	0x0040, 0x2011, 0x180c, 0x2204, 0xc0bd, 0x2012, 0x080c, 0x67bb,
+	0x0008, 0x2012, 0x080c, 0x6781, 0x0120, 0x7a0c, 0xc2b4, 0x7a0e,
+	0x00a8, 0x707b, 0x0000, 0x080c, 0x7207, 0x1130, 0x70ac, 0x9005,
+	0x1168, 0x080c, 0xc28a, 0x0050, 0x080c, 0xc28a, 0x70d8, 0xd09c,
+	0x1128, 0x70ac, 0x9005, 0x0110, 0x080c, 0x5ebe, 0x70e3, 0x0000,
+	0x70df, 0x0000, 0x70a3, 0x0000, 0x080c, 0x2afe, 0x0228, 0x2011,
+	0x0101, 0x2204, 0xc0c4, 0x2012, 0x72d8, 0x080c, 0x7207, 0x1178,
 	0x9016, 0x0016, 0x2009, 0x0002, 0x2019, 0x1945, 0x211a, 0x001e,
 	0x705b, 0xffff, 0x705f, 0x00ef, 0x707f, 0x0000, 0x0020, 0x2019,
 	0x1945, 0x201b, 0x0000, 0x2079, 0x185b, 0x7804, 0xd0ac, 0x0108,
-	0xc295, 0x72da, 0x080c, 0x6faa, 0x0118, 0x9296, 0x0004, 0x0548,
-	0x2011, 0x0001, 0x080c, 0xbb4b, 0x70a7, 0x0000, 0x70ab, 0xffff,
+	0xc295, 0x72da, 0x080c, 0x7207, 0x0118, 0x9296, 0x0004, 0x0548,
+	0x2011, 0x0001, 0x080c, 0xbe47, 0x70a7, 0x0000, 0x70ab, 0xffff,
 	0x7003, 0x0002, 0x2079, 0x0100, 0x7827, 0x0003, 0x7828, 0x9085,
-	0x0003, 0x782a, 0x00fe, 0x080c, 0x2dc8, 0x2011, 0x0005, 0x080c,
-	0x975b, 0x080c, 0x898b, 0x080c, 0x6faa, 0x0148, 0x00c6, 0x2061,
+	0x0003, 0x782a, 0x00fe, 0x080c, 0x2f6c, 0x2011, 0x0005, 0x080c,
+	0x9a0f, 0x080c, 0x8c10, 0x080c, 0x7207, 0x0148, 0x00c6, 0x2061,
 	0x0100, 0x0016, 0x2009, 0x0002, 0x61e2, 0x001e, 0x00ce, 0x012e,
 	0x0420, 0x70a7, 0x0000, 0x70ab, 0xffff, 0x7003, 0x0002, 0x00f6,
 	0x2079, 0x0100, 0x7827, 0x0003, 0x7828, 0x9085, 0x0003, 0x782a,
-	0x00fe, 0x2011, 0x0005, 0x080c, 0x975b, 0x080c, 0x898b, 0x080c,
-	0x6faa, 0x0148, 0x00c6, 0x2061, 0x0100, 0x0016, 0x2009, 0x0002,
+	0x00fe, 0x2011, 0x0005, 0x080c, 0x9a0f, 0x080c, 0x8c10, 0x080c,
+	0x7207, 0x0148, 0x00c6, 0x2061, 0x0100, 0x0016, 0x2009, 0x0002,
 	0x61e2, 0x001e, 0x00ce, 0x00fe, 0x012e, 0x0005, 0x00c6, 0x00b6,
-	0x080c, 0x6faa, 0x1118, 0x20a9, 0x0800, 0x0010, 0x20a9, 0x0782,
-	0x080c, 0x6faa, 0x1110, 0x900e, 0x0010, 0x2009, 0x007e, 0x86ff,
+	0x080c, 0x7207, 0x1118, 0x20a9, 0x0800, 0x0010, 0x20a9, 0x0782,
+	0x080c, 0x7207, 0x1110, 0x900e, 0x0010, 0x2009, 0x007e, 0x86ff,
 	0x0138, 0x9180, 0x1000, 0x2004, 0x905d, 0x0110, 0xb800, 0xd0bc,
-	0x090c, 0x30e2, 0x8108, 0x1f04, 0x0abf, 0x707b, 0x0000, 0x707c,
+	0x090c, 0x3286, 0x8108, 0x1f04, 0x0abf, 0x707b, 0x0000, 0x707c,
 	0x9084, 0x00ff, 0x707e, 0x70af, 0x0000, 0x00be, 0x00ce, 0x0005,
 	0x00b6, 0x0126, 0x2091, 0x8000, 0x7000, 0x9086, 0x0002, 0x1904,
-	0x0b8c, 0x70a8, 0x9086, 0xffff, 0x0130, 0x080c, 0x2dc8, 0x080c,
-	0x898b, 0x0804, 0x0b8c, 0x70d8, 0xd0ac, 0x1110, 0xd09c, 0x0540,
+	0x0b8c, 0x70a8, 0x9086, 0xffff, 0x0130, 0x080c, 0x2f6c, 0x080c,
+	0x8c10, 0x0804, 0x0b8c, 0x70d8, 0xd0ac, 0x1110, 0xd09c, 0x0540,
 	0xd084, 0x0530, 0x0006, 0x2001, 0x0103, 0x2003, 0x002b, 0x000e,
-	0xd08c, 0x01f0, 0x70dc, 0x9086, 0xffff, 0x01b0, 0x080c, 0x2f53,
-	0x080c, 0x898b, 0x70d8, 0xd094, 0x1904, 0x0b8c, 0x2011, 0x0001,
-	0x080c, 0xc23b, 0x0110, 0x2011, 0x0003, 0x901e, 0x080c, 0x2f8d,
-	0x080c, 0x898b, 0x0804, 0x0b8c, 0x70e0, 0x9005, 0x1904, 0x0b8c,
+	0xd08c, 0x01f0, 0x70dc, 0x9086, 0xffff, 0x01b0, 0x080c, 0x30f7,
+	0x080c, 0x8c10, 0x70d8, 0xd094, 0x1904, 0x0b8c, 0x2011, 0x0001,
+	0x080c, 0xc539, 0x0110, 0x2011, 0x0003, 0x901e, 0x080c, 0x3131,
+	0x080c, 0x8c10, 0x0804, 0x0b8c, 0x70e0, 0x9005, 0x1904, 0x0b8c,
 	0x70a4, 0x9005, 0x1904, 0x0b8c, 0x70d8, 0xd0a4, 0x0118, 0xd0b4,
-	0x0904, 0x0b8c, 0x080c, 0x6538, 0x1904, 0x0b8c, 0x080c, 0x658b,
-	0x1904, 0x0b8c, 0x080c, 0x6572, 0x01c0, 0x0156, 0x00c6, 0x20a9,
-	0x007f, 0x900e, 0x0016, 0x080c, 0x6256, 0x1118, 0xb800, 0xd0ec,
+	0x0904, 0x0b8c, 0x080c, 0x6781, 0x1904, 0x0b8c, 0x080c, 0x67d4,
+	0x1904, 0x0b8c, 0x080c, 0x67bb, 0x01c0, 0x0156, 0x00c6, 0x20a9,
+	0x007f, 0x900e, 0x0016, 0x080c, 0x649f, 0x1118, 0xb800, 0xd0ec,
 	0x1138, 0x001e, 0x8108, 0x1f04, 0x0b32, 0x00ce, 0x015e, 0x0028,
 	0x001e, 0x00ce, 0x015e, 0x0804, 0x0b8c, 0x0006, 0x2001, 0x0103,
-	0x2003, 0x006b, 0x000e, 0x2011, 0x198b, 0x080c, 0x0f73, 0x2011,
-	0x19a5, 0x080c, 0x0f73, 0x7030, 0xc08c, 0x7032, 0x7003, 0x0003,
-	0x70ab, 0xffff, 0x080c, 0x0e53, 0x9006, 0x080c, 0x2619, 0x0036,
-	0x0046, 0x2019, 0xffff, 0x2021, 0x0006, 0x080c, 0x4a91, 0x004e,
-	0x003e, 0x00f6, 0x2079, 0x0100, 0x080c, 0x6fcd, 0x0150, 0x080c,
-	0x6faa, 0x7828, 0x0118, 0x9084, 0xe1ff, 0x0010, 0x9084, 0xffdf,
+	0x2003, 0x006b, 0x000e, 0x2011, 0x198b, 0x080c, 0x0fb9, 0x2011,
+	0x19a5, 0x080c, 0x0fb9, 0x7030, 0xc08c, 0x7032, 0x7003, 0x0003,
+	0x70ab, 0xffff, 0x080c, 0x0e99, 0x9006, 0x080c, 0x2717, 0x0036,
+	0x0046, 0x2019, 0xffff, 0x2021, 0x0006, 0x080c, 0x4cbc, 0x004e,
+	0x003e, 0x00f6, 0x2079, 0x0100, 0x080c, 0x722a, 0x0150, 0x080c,
+	0x7207, 0x7828, 0x0118, 0x9084, 0xe1ff, 0x0010, 0x9084, 0xffdf,
 	0x782a, 0x00fe, 0x2001, 0x19c0, 0x2004, 0x9086, 0x0005, 0x1120,
-	0x2011, 0x0000, 0x080c, 0x975b, 0x2011, 0x0000, 0x080c, 0x9765,
-	0x080c, 0x898b, 0x080c, 0x8a68, 0x012e, 0x00be, 0x0005, 0x0016,
+	0x2011, 0x0000, 0x080c, 0x9a0f, 0x2011, 0x0000, 0x080c, 0x9a19,
+	0x080c, 0x8c10, 0x080c, 0x8ced, 0x012e, 0x00be, 0x0005, 0x0016,
 	0x0046, 0x00f6, 0x0126, 0x2091, 0x8000, 0x2079, 0x0100, 0x7904,
-	0x918c, 0xfffd, 0x7906, 0x2009, 0x00f7, 0x080c, 0x5c61, 0x7940,
+	0x918c, 0xfffd, 0x7906, 0x2009, 0x00f7, 0x080c, 0x5ea7, 0x7940,
 	0x918c, 0x0010, 0x7942, 0x7924, 0xd1b4, 0x0110, 0x7827, 0x0040,
-	0xd19c, 0x0110, 0x7827, 0x0008, 0x0006, 0x0036, 0x0156, 0x7954,
-	0xd1ac, 0x1904, 0x0c1c, 0x2001, 0x197f, 0x2004, 0x9005, 0x1518,
-	0x080c, 0x2a52, 0x1148, 0x2001, 0x0001, 0x080c, 0x29ba, 0x2001,
-	0x0001, 0x080c, 0x299d, 0x00b8, 0x080c, 0x2a5a, 0x1138, 0x9006,
-	0x080c, 0x29ba, 0x9006, 0x080c, 0x299d, 0x0068, 0x080c, 0x2a62,
+	0xd19c, 0x0110, 0x7827, 0x0008, 0x0006, 0x0036, 0x0156, 0x2001,
+	0x0100, 0x2004, 0x9086, 0x000a, 0x1904, 0x0c23, 0x7954, 0xd1ac,
+	0x1904, 0x0c23, 0x2001, 0x197f, 0x2004, 0x9005, 0x1518, 0x080c,
+	0x2b98, 0x1148, 0x2001, 0x0001, 0x080c, 0x2ab8, 0x2001, 0x0001,
+	0x080c, 0x2a9b, 0x00b8, 0x080c, 0x2ba0, 0x1138, 0x9006, 0x080c,
+	0x2ab8, 0x9006, 0x080c, 0x2a9b, 0x0068, 0x080c, 0x2ba8, 0x1d50,
+	0x2001, 0x1970, 0x2004, 0xd0fc, 0x0108, 0x0020, 0x080c, 0x28b2,
+	0x0804, 0x0d33, 0x080c, 0x7218, 0x0148, 0x080c, 0x722a, 0x1118,
+	0x080c, 0x7513, 0x0050, 0x080c, 0x720f, 0x0dd0, 0x080c, 0x750e,
+	0x080c, 0x7504, 0x080c, 0x7127, 0x0058, 0x080c, 0x7207, 0x0140,
+	0x2009, 0x00f8, 0x080c, 0x5ea7, 0x7843, 0x0090, 0x7843, 0x0010,
+	0x20a9, 0x09c4, 0x7820, 0xd09c, 0x1138, 0x080c, 0x7207, 0x0138,
+	0x7824, 0xd0ac, 0x1904, 0x0d38, 0x1f04, 0x0c02, 0x0070, 0x7824,
+	0x080c, 0x7221, 0x0118, 0xd0ac, 0x1904, 0x0d38, 0x9084, 0x1800,
+	0x0d98, 0x7003, 0x0001, 0x0804, 0x0d38, 0x2001, 0x0001, 0x080c,
+	0x2717, 0x0804, 0x0d5a, 0x2001, 0x197f, 0x2004, 0x9005, 0x1518,
+	0x080c, 0x2b98, 0x1148, 0x2001, 0x0001, 0x080c, 0x2ab8, 0x2001,
+	0x0001, 0x080c, 0x2a9b, 0x00b8, 0x080c, 0x2ba0, 0x1138, 0x9006,
+	0x080c, 0x2ab8, 0x9006, 0x080c, 0x2a9b, 0x0068, 0x080c, 0x2ba8,
 	0x1d50, 0x2001, 0x1970, 0x2004, 0xd0fc, 0x0108, 0x0020, 0x080c,
-	0x27b4, 0x0804, 0x0cfc, 0x080c, 0x6fbb, 0x0148, 0x080c, 0x6fcd,
-	0x1118, 0x080c, 0x729b, 0x0050, 0x080c, 0x6fb2, 0x0dd0, 0x080c,
-	0x7296, 0x080c, 0x728c, 0x080c, 0x6edc, 0x0058, 0x080c, 0x6faa,
-	0x0140, 0x2009, 0x00f8, 0x080c, 0x5c61, 0x7843, 0x0090, 0x7843,
-	0x0010, 0x20a9, 0x09c4, 0x7820, 0xd09c, 0x1138, 0x080c, 0x6faa,
-	0x0138, 0x7824, 0xd0ac, 0x1904, 0x0d01, 0x1f04, 0x0bfb, 0x0070,
-	0x7824, 0x080c, 0x6fc4, 0x0118, 0xd0ac, 0x1904, 0x0d01, 0x9084,
-	0x1800, 0x0d98, 0x7003, 0x0001, 0x0804, 0x0d01, 0x2001, 0x0001,
-	0x080c, 0x2619, 0x0804, 0x0d14, 0x2001, 0x197f, 0x2004, 0x9005,
-	0x1518, 0x080c, 0x2a52, 0x1148, 0x2001, 0x0001, 0x080c, 0x29ba,
-	0x2001, 0x0001, 0x080c, 0x299d, 0x00b8, 0x080c, 0x2a5a, 0x1138,
-	0x9006, 0x080c, 0x29ba, 0x9006, 0x080c, 0x299d, 0x0068, 0x080c,
-	0x2a62, 0x1d50, 0x2001, 0x1970, 0x2004, 0xd0fc, 0x0108, 0x0020,
-	0x080c, 0x27b4, 0x0804, 0x0cfc, 0x7850, 0x9085, 0x0040, 0x7852,
-	0x7938, 0x7850, 0x9084, 0xfbcf, 0x7852, 0x080c, 0x2a6a, 0x9085,
-	0x2000, 0x7852, 0x793a, 0x20a9, 0x0046, 0x1d04, 0x0c55, 0x080c,
-	0x80f3, 0x1f04, 0x0c55, 0x7850, 0x9085, 0x0400, 0x9084, 0xdfbf,
-	0x7852, 0x793a, 0x080c, 0x6fbb, 0x0148, 0x080c, 0x6fcd, 0x1118,
-	0x080c, 0x729b, 0x0050, 0x080c, 0x6fb2, 0x0dd0, 0x080c, 0x7296,
-	0x080c, 0x728c, 0x080c, 0x6edc, 0x0020, 0x2009, 0x00f8, 0x080c,
-	0x5c61, 0x20a9, 0x0028, 0xa001, 0x1f04, 0x0c7b, 0x7850, 0x9085,
-	0x1400, 0x7852, 0x080c, 0x6faa, 0x0120, 0x7843, 0x0090, 0x7843,
-	0x0010, 0x2021, 0xe678, 0x2019, 0xea60, 0x0d0c, 0x80f3, 0x7820,
-	0xd09c, 0x1588, 0x080c, 0x6faa, 0x0904, 0x0ce1, 0x7824, 0xd0ac,
-	0x1904, 0x0d01, 0x080c, 0x6fcd, 0x1530, 0x0046, 0x2021, 0x0320,
-	0x8421, 0x1df0, 0x004e, 0x7827, 0x1800, 0x080c, 0x2a6a, 0x7824,
-	0x9084, 0x1800, 0x1168, 0x9484, 0x0fff, 0x1140, 0x2001, 0x1810,
-	0x2004, 0x9084, 0x9000, 0x0110, 0x080c, 0x0d22, 0x8421, 0x1158,
-	0x1d04, 0x0cbc, 0x080c, 0x80f3, 0x080c, 0x7296, 0x080c, 0x728c,
-	0x7003, 0x0001, 0x04f0, 0x8319, 0x1940, 0x1d04, 0x0cc9, 0x080c,
-	0x80f3, 0x2009, 0x1973, 0x2104, 0x9005, 0x0118, 0x8001, 0x200a,
-	0x1178, 0x200b, 0x000a, 0x7827, 0x0048, 0x20a9, 0x0002, 0x080c,
-	0x2a4b, 0x7924, 0x080c, 0x2a6a, 0xd19c, 0x0110, 0x080c, 0x298b,
-	0x00d8, 0x080c, 0x6fbb, 0x1140, 0x94a2, 0x03e8, 0x1128, 0x080c,
-	0x6f82, 0x7003, 0x0001, 0x00a8, 0x7827, 0x1800, 0x080c, 0x2a6a,
-	0x7824, 0x080c, 0x6fc4, 0x0110, 0xd0ac, 0x1158, 0x9084, 0x1800,
-	0x0950, 0x7003, 0x0001, 0x0028, 0x2001, 0x0001, 0x080c, 0x2619,
-	0x0078, 0x2009, 0x180c, 0x210c, 0xd19c, 0x1120, 0x7904, 0x918d,
+	0x28b2, 0x0804, 0x0d33, 0x2001, 0x0100, 0x2004, 0x9086, 0x000a,
+	0x01f8, 0x7850, 0x9085, 0x0040, 0x7852, 0x7938, 0x7850, 0x9084,
+	0xfbcf, 0x7852, 0x080c, 0x2bb0, 0x9085, 0x2000, 0x7852, 0x793a,
+	0x20a9, 0x0046, 0x1d04, 0x0c62, 0x080c, 0x838e, 0x1f04, 0x0c62,
+	0x7850, 0x9085, 0x0400, 0x9084, 0xdfbf, 0x7852, 0x793a, 0x0060,
+	0x080c, 0x2cc2, 0x080c, 0x2cf5, 0x20a9, 0x003a, 0x1d04, 0x0c76,
+	0x080c, 0x838e, 0x1f04, 0x0c76, 0x080c, 0x7218, 0x0148, 0x080c,
+	0x722a, 0x1118, 0x080c, 0x7513, 0x0050, 0x080c, 0x720f, 0x0dd0,
+	0x080c, 0x750e, 0x080c, 0x7504, 0x080c, 0x7127, 0x0020, 0x2009,
+	0x00f8, 0x080c, 0x5ea7, 0x2001, 0x0100, 0x2004, 0x9086, 0x000a,
+	0x0168, 0x20a9, 0x0028, 0xa001, 0x1f04, 0x0c9b, 0x7850, 0x9085,
+	0x1400, 0x7852, 0x080c, 0x7207, 0x0158, 0x0030, 0x7850, 0xc0e5,
+	0x7852, 0x080c, 0x7207, 0x0120, 0x7843, 0x0090, 0x7843, 0x0010,
+	0x2021, 0xe678, 0x2019, 0xea60, 0x0d0c, 0x838e, 0x7820, 0xd09c,
+	0x1590, 0x080c, 0x7207, 0x0904, 0x0d17, 0x7824, 0xd0ac, 0x1904,
+	0x0d38, 0x080c, 0x722a, 0x1538, 0x0046, 0x2021, 0x0320, 0x8421,
+	0x1df0, 0x004e, 0x7827, 0x1800, 0x080c, 0x2bb0, 0x7824, 0x9084,
+	0x1800, 0x1168, 0x9484, 0x0fff, 0x1140, 0x2001, 0x1810, 0x2004,
+	0x9084, 0x9000, 0x0110, 0x080c, 0x0d68, 0x8421, 0x1160, 0x1d04,
+	0x0ce3, 0x080c, 0x838e, 0x080c, 0x750e, 0x080c, 0x7504, 0x7003,
+	0x0001, 0x0804, 0x0d38, 0x8319, 0x1938, 0x2001, 0x0100, 0x2004,
+	0x9086, 0x000a, 0x1140, 0x2001, 0x1810, 0x2004, 0x9084, 0x9000,
+	0x0110, 0x080c, 0x0d68, 0x1d04, 0x0cff, 0x080c, 0x838e, 0x2009,
+	0x1973, 0x2104, 0x9005, 0x0118, 0x8001, 0x200a, 0x1178, 0x200b,
+	0x000a, 0x7827, 0x0048, 0x20a9, 0x0002, 0x080c, 0x2b91, 0x7924,
+	0x080c, 0x2bb0, 0xd19c, 0x0110, 0x080c, 0x2a89, 0x00e0, 0x080c,
+	0x7218, 0x1140, 0x94a2, 0x03e8, 0x1128, 0x080c, 0x71df, 0x7003,
+	0x0001, 0x00b0, 0x7827, 0x1800, 0x080c, 0x2bb0, 0x7824, 0x080c,
+	0x7221, 0x0110, 0xd0ac, 0x1160, 0x9084, 0x1800, 0x0904, 0x0ceb,
+	0x7003, 0x0001, 0x0028, 0x2001, 0x0001, 0x080c, 0x2717, 0x00c0,
+	0x2001, 0x0100, 0x2004, 0x9086, 0x000a, 0x1118, 0x7850, 0xc0e4,
+	0x7852, 0x2009, 0x180c, 0x210c, 0xd19c, 0x1120, 0x7904, 0x918d,
 	0x0002, 0x7906, 0x7827, 0x0048, 0x7828, 0x9085, 0x0028, 0x782a,
-	0x7850, 0x9085, 0x0400, 0x7852, 0x2001, 0x197f, 0x2003, 0x0000,
-	0x9006, 0x78f2, 0x015e, 0x003e, 0x000e, 0x012e, 0x00fe, 0x004e,
-	0x001e, 0x0005, 0x0006, 0x0016, 0x0036, 0x0046, 0x00b6, 0x00c6,
-	0x00d6, 0x00e6, 0x00f6, 0x0156, 0x0069, 0x0d0c, 0x80f3, 0x015e,
-	0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x004e, 0x003e, 0x001e,
-	0x000e, 0x0005, 0x00e6, 0x2071, 0x189c, 0x7004, 0x9086, 0x0001,
-	0x1110, 0x080c, 0x326c, 0x00ee, 0x0005, 0x0005, 0x2a70, 0x2061,
-	0x1983, 0x2063, 0x0003, 0x6007, 0x0003, 0x600b, 0x0002, 0x600f,
-	0x0317, 0x2001, 0x1954, 0x900e, 0x2102, 0x7192, 0x2001, 0x0100,
-	0x2004, 0x9082, 0x0002, 0x0218, 0x705b, 0xffff, 0x0008, 0x715a,
-	0x7063, 0xffff, 0x717a, 0x717e, 0x080c, 0xbf8c, 0x70e7, 0x00c0,
-	0x2061, 0x1944, 0x6003, 0x0909, 0x6106, 0x600b, 0x8800, 0x600f,
-	0x0200, 0x6013, 0x00ff, 0x6017, 0x000f, 0x611a, 0x601f, 0x07d0,
-	0x2061, 0x194c, 0x6003, 0x8000, 0x6106, 0x610a, 0x600f, 0x0200,
-	0x6013, 0x00ff, 0x6116, 0x601b, 0x0001, 0x611e, 0x2061, 0x1961,
-	0x6003, 0x514c, 0x6007, 0x4f47, 0x600b, 0x4943, 0x600f, 0x2020,
-	0x2001, 0x182b, 0x2102, 0x0005, 0x9016, 0x080c, 0x6256, 0x1178,
-	0xb804, 0x90c4, 0x00ff, 0x98c6, 0x0006, 0x0128, 0x90c4, 0xff00,
-	0x98c6, 0x0600, 0x1120, 0x9186, 0x0080, 0x0108, 0x8210, 0x8108,
-	0x9186, 0x0800, 0x1d50, 0x2208, 0x0005, 0x2091, 0x8000, 0x2079,
-	0x0000, 0x000e, 0x00f6, 0x0010, 0x2091, 0x8000, 0x0e04, 0x0db6,
-	0x0006, 0x0016, 0x2001, 0x8002, 0x0006, 0x2079, 0x0000, 0x000e,
-	0x7882, 0x7836, 0x001e, 0x798e, 0x000e, 0x788a, 0x000e, 0x7886,
-	0x3900, 0x789a, 0x7833, 0x0012, 0x2091, 0x5000, 0x0156, 0x00d6,
-	0x0036, 0x0026, 0x2079, 0x0300, 0x2069, 0x1a79, 0x7a08, 0x226a,
-	0x2069, 0x1a7a, 0x7a18, 0x226a, 0x8d68, 0x7a1c, 0x226a, 0x782c,
-	0x2019, 0x1a87, 0x201a, 0x2019, 0x1a8a, 0x9016, 0x7808, 0xd09c,
-	0x0168, 0x7820, 0x201a, 0x8210, 0x8318, 0x9386, 0x1a9f, 0x0108,
-	0x0ca8, 0x7808, 0xd09c, 0x0110, 0x2011, 0xdead, 0x2019, 0x1a88,
-	0x782c, 0x201a, 0x8318, 0x221a, 0x7803, 0x0000, 0x2069, 0x1a59,
-	0x901e, 0x20a9, 0x0020, 0x7b26, 0x7a28, 0x226a, 0x8d68, 0x8318,
-	0x1f04, 0x0e03, 0x002e, 0x003e, 0x00de, 0x015e, 0x2079, 0x1800,
-	0x7803, 0x0005, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084,
-	0x0180, 0x2001, 0x19f1, 0x2004, 0x9005, 0x0128, 0x2001, 0x008b,
-	0x2004, 0xd0fc, 0x0dd8, 0x2001, 0x008a, 0x2003, 0x0002, 0x2003,
-	0x1001, 0x080c, 0x53a9, 0x1108, 0x0099, 0x0cd8, 0x0005, 0x918c,
-	0x03ff, 0x2001, 0x0003, 0x2004, 0x9084, 0x0600, 0x1118, 0x918d,
-	0x2800, 0x0010, 0x918d, 0x2000, 0x2001, 0x017f, 0x2102, 0x0005,
-	0x0026, 0x0126, 0x2011, 0x0080, 0x080c, 0x0ecb, 0x20a9, 0x0900,
-	0x080c, 0x0eec, 0x2011, 0x0040, 0x080c, 0x0ecb, 0x20a9, 0x0900,
-	0x080c, 0x0eec, 0x0c78, 0x0026, 0x080c, 0x0ed8, 0x1118, 0x2011,
-	0x0040, 0x0098, 0x2011, 0x010e, 0x2214, 0x9294, 0x0007, 0x9296,
-	0x0007, 0x0118, 0x2011, 0xa880, 0x0010, 0x2011, 0x6840, 0xd0e4,
-	0x70eb, 0x0000, 0x1128, 0x70eb, 0x0fa0, 0x080c, 0x0edd, 0x002e,
-	0x0005, 0x0026, 0x080c, 0x0ed8, 0x0128, 0xd0a4, 0x1138, 0x2011,
-	0xcdd5, 0x0010, 0x2011, 0x0080, 0x080c, 0x0edd, 0x002e, 0x0005,
-	0x0026, 0x70eb, 0x0000, 0x080c, 0x0ed8, 0x1148, 0x080c, 0x2a62,
-	0x1118, 0x2011, 0x8484, 0x0058, 0x2011, 0x8282, 0x0040, 0x080c,
-	0x2a62, 0x1118, 0x2011, 0xcdc5, 0x0010, 0x2011, 0xcac2, 0x080c,
-	0x0edd, 0x002e, 0x0005, 0x00e6, 0x0006, 0x2071, 0x1800, 0xd0b4,
-	0x70e4, 0x1110, 0xc0e4, 0x0048, 0x0006, 0x3b00, 0x9084, 0xff3f,
-	0x20d8, 0x000e, 0x70eb, 0x0000, 0xc0e5, 0x0079, 0x000e, 0x00ee,
-	0x0005, 0x00e6, 0x2071, 0x1800, 0xd0e4, 0x70e4, 0x1110, 0xc0dc,
-	0x0008, 0xc0dd, 0x0011, 0x00ee, 0x0005, 0x70e6, 0x7000, 0x9084,
-	0x0007, 0x000b, 0x0005, 0x0e9a, 0x0e71, 0x0e71, 0x0e53, 0x0e80,
-	0x0e71, 0x0e71, 0x0e80, 0x0016, 0x3b08, 0x3a00, 0x9104, 0x918d,
-	0x00c0, 0x21d8, 0x9084, 0xff3f, 0x9205, 0x20d0, 0x001e, 0x0005,
-	0x2001, 0x1839, 0x2004, 0xd0dc, 0x0005, 0x9e86, 0x1800, 0x190c,
-	0x0db4, 0x70e4, 0xd0e4, 0x0108, 0xc2e5, 0x72e6, 0xd0e4, 0x1118,
-	0x9294, 0x00c0, 0x0c01, 0x0005, 0x1d04, 0x0eec, 0x2091, 0x6000,
-	0x1f04, 0x0eec, 0x0005, 0x890e, 0x810e, 0x810f, 0x9194, 0x003f,
-	0x918c, 0xffc0, 0x0005, 0x0006, 0x2200, 0x914d, 0x894f, 0x894d,
-	0x894d, 0x000e, 0x0005, 0x01d6, 0x0146, 0x0036, 0x0096, 0x2061,
-	0x188b, 0x600b, 0x0000, 0x600f, 0x0000, 0x6003, 0x0000, 0x6007,
-	0x0000, 0x2009, 0xffc0, 0x2105, 0x0006, 0x2001, 0xaaaa, 0x200f,
-	0x2019, 0x5555, 0x9016, 0x2049, 0x0bff, 0xab02, 0xa001, 0xa001,
-	0xa800, 0x9306, 0x1138, 0x2105, 0x9306, 0x0120, 0x8210, 0x99c8,
-	0x0400, 0x0c98, 0x000e, 0x200f, 0x2001, 0x189b, 0x928a, 0x000e,
-	0x1638, 0x928a, 0x0006, 0x2011, 0x0006, 0x1210, 0x2011, 0x0000,
-	0x2202, 0x9006, 0x2008, 0x82ff, 0x01b0, 0x8200, 0x600a, 0x600f,
-	0xffff, 0x6003, 0x0002, 0x6007, 0x0000, 0x0026, 0x2019, 0x0010,
-	0x9280, 0x0001, 0x20e8, 0x21a0, 0x21a8, 0x4104, 0x8319, 0x1de0,
-	0x8211, 0x1da0, 0x002e, 0x009e, 0x003e, 0x014e, 0x01de, 0x0005,
-	0x2011, 0x000e, 0x08e8, 0x0016, 0x0026, 0x0096, 0x3348, 0x080c,
-	0x0ef3, 0x2100, 0x9300, 0x2098, 0x22e0, 0x009e, 0x002e, 0x001e,
-	0x0036, 0x3518, 0x20a9, 0x0001, 0x4002, 0x8007, 0x4004, 0x8319,
-	0x1dd8, 0x003e, 0x0005, 0x20e9, 0x0001, 0x71b4, 0x81ff, 0x11c0,
-	0x9006, 0x2009, 0x0200, 0x20a9, 0x0002, 0x9298, 0x0018, 0x23a0,
-	0x4001, 0x2009, 0x0700, 0x20a9, 0x0002, 0x9298, 0x0008, 0x23a0,
-	0x4001, 0x7078, 0x8007, 0x717c, 0x810f, 0x20a9, 0x0002, 0x4001,
-	0x9298, 0x000c, 0x23a0, 0x900e, 0x080c, 0x0d94, 0x2001, 0x0000,
-	0x810f, 0x20a9, 0x0002, 0x4001, 0x0005, 0x89ff, 0x0140, 0xa804,
-	0xa807, 0x0000, 0x0006, 0x080c, 0x101d, 0x009e, 0x0cb0, 0x0005,
-	0x00e6, 0x2071, 0x1800, 0x080c, 0x1096, 0x090c, 0x0db4, 0x00ee,
-	0x0005, 0x0086, 0x00e6, 0x0006, 0x0026, 0x0036, 0x0126, 0x2091,
-	0x8000, 0x00c9, 0x2071, 0x1800, 0x73bc, 0x702c, 0x9016, 0x9045,
-	0x0158, 0x8210, 0x9906, 0x090c, 0x0db4, 0x2300, 0x9202, 0x0120,
-	0x1a0c, 0x0db4, 0xa000, 0x0c98, 0x012e, 0x003e, 0x002e, 0x000e,
-	0x00ee, 0x008e, 0x0005, 0x0086, 0x00e6, 0x0006, 0x0126, 0x2091,
-	0x8000, 0x2071, 0x190e, 0x7010, 0x9005, 0x0140, 0x7018, 0x9045,
-	0x0128, 0x9906, 0x090c, 0x0db4, 0xa000, 0x0cc8, 0x012e, 0x000e,
-	0x00ee, 0x008e, 0x0005, 0x00e6, 0x2071, 0x1800, 0x0126, 0x2091,
-	0x8000, 0x70bc, 0x8001, 0x0270, 0x70be, 0x702c, 0x2048, 0x9085,
-	0x0001, 0xa800, 0x702e, 0xa803, 0x0000, 0xa807, 0x0000, 0x012e,
-	0x00ee, 0x0005, 0x904e, 0x0cd8, 0x00e6, 0x0126, 0x2091, 0x8000,
-	0x2071, 0x1800, 0x70bc, 0x90ca, 0x0040, 0x0268, 0x8001, 0x70be,
-	0x702c, 0x2048, 0xa800, 0x702e, 0xa803, 0x0000, 0xa807, 0x0000,
-	0x012e, 0x00ee, 0x0005, 0x904e, 0x0cd8, 0x00e6, 0x0126, 0x2091,
-	0x8000, 0x0016, 0x890e, 0x810e, 0x810f, 0x9184, 0x003f, 0xa862,
-	0x9184, 0xffc0, 0xa85e, 0x001e, 0x0020, 0x00e6, 0x0126, 0x2091,
-	0x8000, 0x2071, 0x1800, 0x702c, 0xa802, 0x2900, 0x702e, 0x70bc,
-	0x8000, 0x70be, 0x080c, 0x7f64, 0x012e, 0x00ee, 0x0005, 0x2071,
-	0x1800, 0x9026, 0x2009, 0x0000, 0x2049, 0x0400, 0x2900, 0x702e,
-	0x8940, 0x2800, 0xa802, 0xa95e, 0xa863, 0x0001, 0x8420, 0x9886,
-	0x0440, 0x0120, 0x2848, 0x9188, 0x0040, 0x0c90, 0x2071, 0x188b,
-	0x7000, 0x9005, 0x11a0, 0x2001, 0x0492, 0xa802, 0x2048, 0x2009,
-	0x2480, 0x8940, 0x2800, 0xa802, 0xa95e, 0xa863, 0x0001, 0x8420,
-	0x9886, 0x0800, 0x0120, 0x2848, 0x9188, 0x0040, 0x0c90, 0x2071,
-	0x188b, 0x7104, 0x7200, 0x82ff, 0x01d0, 0x7308, 0x8318, 0x831f,
-	0x831b, 0x831b, 0x7312, 0x8319, 0x2001, 0x0800, 0xa802, 0x2048,
-	0x8900, 0xa802, 0x2040, 0xa95e, 0xaa62, 0x8420, 0x2300, 0x9906,
-	0x0130, 0x2848, 0x9188, 0x0040, 0x9291, 0x0000, 0x0c88, 0xa803,
-	0x0000, 0x2071, 0x1800, 0x74ba, 0x74be, 0x0005, 0x00e6, 0x0016,
-	0x9984, 0xfc00, 0x01e8, 0x908c, 0xf800, 0x1168, 0x9982, 0x0400,
-	0x02b8, 0x9982, 0x0440, 0x0278, 0x9982, 0x0492, 0x0288, 0x9982,
-	0x0800, 0x1270, 0x0040, 0x9982, 0x0800, 0x0250, 0x2071, 0x188b,
-	0x7010, 0x9902, 0x1228, 0x9085, 0x0001, 0x001e, 0x00ee, 0x0005,
-	0x9006, 0x0cd8, 0x00e6, 0x2071, 0x19f0, 0x7007, 0x0000, 0x9006,
-	0x701e, 0x7022, 0x7002, 0x2071, 0x0000, 0x7010, 0x9085, 0x8044,
-	0x7012, 0x2071, 0x0080, 0x9006, 0x20a9, 0x0040, 0x7022, 0x1f04,
-	0x10ce, 0x702b, 0x0020, 0x00ee, 0x0005, 0x0126, 0x2091, 0x8000,
-	0x00e6, 0xa06f, 0x0000, 0x2071, 0x19f0, 0x701c, 0x9088, 0x19fa,
-	0x280a, 0x8000, 0x9084, 0x003f, 0x701e, 0x7120, 0x9106, 0x090c,
-	0x0db4, 0x7004, 0x9005, 0x1128, 0x00f6, 0x2079, 0x0080, 0x00a9,
-	0x00fe, 0x00ee, 0x012e, 0x0005, 0x0126, 0x2091, 0x8000, 0x00e6,
-	0x2071, 0x19f0, 0x7004, 0x9005, 0x1128, 0x00f6, 0x2079, 0x0080,
-	0x0021, 0x00fe, 0x00ee, 0x012e, 0x0005, 0x7004, 0x9086, 0x0000,
-	0x1110, 0x7007, 0x0006, 0x7000, 0x0002, 0x1117, 0x1115, 0x1115,
-	0x1115, 0x128e, 0x128e, 0x128e, 0x128e, 0x080c, 0x0db4, 0x701c,
-	0x7120, 0x9106, 0x1148, 0x792c, 0x9184, 0x0001, 0x1120, 0xd1fc,
-	0x1110, 0x7007, 0x0000, 0x0005, 0x0096, 0x9180, 0x19fa, 0x2004,
-	0x700a, 0x2048, 0x8108, 0x918c, 0x003f, 0x7122, 0x782b, 0x0026,
-	0xa88c, 0x7802, 0xa890, 0x7806, 0xa894, 0x780a, 0xa898, 0x780e,
-	0xa878, 0x700e, 0xa870, 0x7016, 0xa874, 0x701a, 0xa868, 0x009e,
-	0xd084, 0x0120, 0x7007, 0x0001, 0x0029, 0x0005, 0x7007, 0x0002,
-	0x00b1, 0x0005, 0x0016, 0x0026, 0x710c, 0x2011, 0x0040, 0x9182,
-	0x0040, 0x1210, 0x2110, 0x9006, 0x700e, 0x7212, 0x8203, 0x7812,
-	0x782b, 0x0020, 0x782b, 0x0041, 0x002e, 0x001e, 0x0005, 0x0016,
-	0x0026, 0x0136, 0x0146, 0x0156, 0x7014, 0x20e0, 0x7018, 0x2098,
-	0x20e9, 0x0000, 0x20a1, 0x0088, 0x782b, 0x0026, 0x710c, 0x2011,
-	0x0040, 0x9182, 0x0040, 0x1210, 0x2110, 0x9006, 0x700e, 0x22a8,
-	0x4006, 0x8203, 0x7812, 0x782b, 0x0020, 0x3300, 0x701a, 0x782b,
-	0x0001, 0x015e, 0x014e, 0x013e, 0x002e, 0x001e, 0x0005, 0x2009,
-	0x19f0, 0x2104, 0xc095, 0x200a, 0x080c, 0x10f4, 0x0005, 0x0016,
-	0x00e6, 0x2071, 0x19f0, 0x00f6, 0x2079, 0x0080, 0x792c, 0xd1bc,
-	0x190c, 0x0dad, 0x782b, 0x0002, 0xd1fc, 0x0120, 0x918c, 0x0700,
-	0x7004, 0x0023, 0x00fe, 0x00ee, 0x001e, 0x0005, 0x1105, 0x11ad,
-	0x11e1, 0x0db4, 0x0db4, 0x129a, 0x0db4, 0x918c, 0x0700, 0x1550,
-	0x0136, 0x0146, 0x0156, 0x7014, 0x20e8, 0x7018, 0x20a0, 0x20e1,
-	0x0000, 0x2099, 0x0088, 0x782b, 0x0040, 0x7010, 0x20a8, 0x4005,
-	0x3400, 0x701a, 0x015e, 0x014e, 0x013e, 0x700c, 0x9005, 0x0578,
-	0x7800, 0x7802, 0x7804, 0x7806, 0x080c, 0x114a, 0x0005, 0x7008,
-	0x0096, 0x2048, 0xa86f, 0x0100, 0x009e, 0x7007, 0x0000, 0x080c,
-	0x1105, 0x0005, 0x7008, 0x0096, 0x2048, 0xa86f, 0x0200, 0x009e,
-	0x0ca0, 0x918c, 0x0700, 0x1150, 0x700c, 0x9005, 0x0180, 0x7800,
-	0x7802, 0x7804, 0x7806, 0x080c, 0x115f, 0x0005, 0x7008, 0x0096,
-	0x2048, 0xa86f, 0x0200, 0x009e, 0x7007, 0x0000, 0x0080, 0x0096,
-	0x7008, 0x2048, 0x7800, 0xa88e, 0x7804, 0xa892, 0x7808, 0xa896,
-	0x780c, 0xa89a, 0xa86f, 0x0100, 0x009e, 0x7007, 0x0000, 0x0096,
-	0x00d6, 0x7008, 0x2048, 0x2001, 0x18b7, 0x2004, 0x9906, 0x1128,
-	0xa89c, 0x080f, 0x00de, 0x009e, 0x00a0, 0x00de, 0x009e, 0x0096,
-	0x00d6, 0x7008, 0x2048, 0x0081, 0x0150, 0xa89c, 0x0086, 0x2940,
-	0x080f, 0x008e, 0x00de, 0x009e, 0x080c, 0x10f4, 0x0005, 0x00de,
-	0x009e, 0x080c, 0x10f4, 0x0005, 0xa8a8, 0xd08c, 0x0005, 0x0096,
-	0xa0a0, 0x904d, 0x090c, 0x0db4, 0xa06c, 0x908e, 0x0100, 0x0130,
-	0xa87b, 0x0030, 0xa883, 0x0000, 0xa897, 0x4002, 0x080c, 0x6893,
-	0xa09f, 0x0000, 0xa0a3, 0x0000, 0x2848, 0x080c, 0x101d, 0x009e,
-	0x0005, 0x00a6, 0xa0a0, 0x904d, 0x090c, 0x0db4, 0xa06c, 0x908e,
-	0x0100, 0x0128, 0xa87b, 0x0001, 0xa883, 0x0000, 0x00c0, 0xa80c,
-	0x2050, 0xb004, 0x9005, 0x0198, 0xa80e, 0x2050, 0x8006, 0x8006,
-	0x8007, 0x908c, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0002, 0xa076,
-	0xa172, 0xb000, 0xa07a, 0x2810, 0x080c, 0x10d5, 0x00e8, 0xa97c,
-	0xa894, 0x0016, 0x0006, 0x080c, 0x6893, 0x000e, 0x001e, 0xd1fc,
-	0x1138, 0xd1f4, 0x0128, 0x00c6, 0x2060, 0x080c, 0x9e2f, 0x00ce,
-	0x7008, 0x2048, 0xa89f, 0x0000, 0xa8a3, 0x0000, 0x080c, 0x101d,
-	0x7007, 0x0000, 0x080c, 0x10f4, 0x00ae, 0x0005, 0x0126, 0x2091,
-	0x8000, 0x782b, 0x1001, 0x7007, 0x0005, 0x7000, 0xc094, 0x7002,
-	0x012e, 0x0005, 0x7007, 0x0000, 0x080c, 0x1105, 0x0005, 0x0126,
-	0x2091, 0x2200, 0x2079, 0x0300, 0x2071, 0x1a3a, 0x7003, 0x0000,
-	0x78bf, 0x00f6, 0x781b, 0x4800, 0x00c1, 0x7803, 0x0003, 0x780f,
-	0x0000, 0x20a9, 0x0254, 0x2061, 0xd91d, 0x2c0d, 0x7912, 0xe104,
-	0x9ce0, 0x0002, 0x7916, 0x1f04, 0x12b5, 0x7807, 0x0007, 0x7803,
-	0x0000, 0x7803, 0x0001, 0x012e, 0x0005, 0x00c6, 0x7803, 0x0000,
-	0x7808, 0xd09c, 0x0110, 0x7820, 0x0cd8, 0x2001, 0x1a3b, 0x2003,
-	0x0000, 0x78ab, 0x0004, 0x78ac, 0xd0ac, 0x1de8, 0x78ab, 0x0002,
-	0x7807, 0x0007, 0x7827, 0x0030, 0x782b, 0x0400, 0x7827, 0x0031,
-	0x782b, 0x1a59, 0x781f, 0xff00, 0x781b, 0xb700, 0x2001, 0x0200,
-	0x2004, 0xd0dc, 0x0110, 0x781f, 0x0303, 0x2061, 0x1a59, 0x602f,
-	0x1cd0, 0x2001, 0x1819, 0x2004, 0x9082, 0x1cd0, 0x6032, 0x603b,
-	0x1f33, 0x2001, 0x3145, 0xd0fc, 0x190c, 0x0db4, 0x2001, 0x0003,
-	0x2004, 0xd0d4, 0x1118, 0x783f, 0x3145, 0x0020, 0x9084, 0xc000,
-	0x783f, 0xb145, 0x00ce, 0x0005, 0x0126, 0x2091, 0x2200, 0x7908,
-	0x9184, 0x0070, 0x190c, 0x0dad, 0xd19c, 0x0158, 0x7820, 0x908c,
-	0xf000, 0x15e8, 0x908a, 0x0024, 0x1a0c, 0x0db4, 0x0023, 0x012e,
-	0x0005, 0x012e, 0x0005, 0x1347, 0x1347, 0x135e, 0x1363, 0x1367,
-	0x136c, 0x1394, 0x1398, 0x13a6, 0x13aa, 0x1347, 0x1436, 0x143a,
-	0x149d, 0x1347, 0x1347, 0x1347, 0x1347, 0x1347, 0x1347, 0x1347,
-	0x1347, 0x1347, 0x1347, 0x1347, 0x1347, 0x1347, 0x136e, 0x1347,
-	0x1347, 0x1347, 0x1347, 0x1347, 0x1347, 0x134b, 0x1349, 0x080c,
-	0x0db4, 0x080c, 0x0dad, 0x080c, 0x14a4, 0x2009, 0x1a52, 0x2104,
-	0x8000, 0x200a, 0x080c, 0x79fe, 0x080c, 0x196a, 0x0005, 0x2009,
-	0x0048, 0x2060, 0x080c, 0x9ea9, 0x012e, 0x0005, 0x7004, 0xc085,
-	0xc0b5, 0x7006, 0x0005, 0x7004, 0xc085, 0x7006, 0x0005, 0x080c,
-	0x14a4, 0x080c, 0x15e0, 0x0005, 0x080c, 0x0db4, 0x080c, 0x14a4,
-	0x2060, 0x6014, 0x0096, 0x2048, 0xa83b, 0xffff, 0x009e, 0x2009,
-	0x0048, 0x080c, 0x9ea9, 0x2001, 0x015d, 0x2003, 0x0000, 0x2009,
-	0x03e8, 0x8109, 0x0160, 0x2001, 0x0201, 0x2004, 0x9005, 0x0dc8,
-	0x2001, 0x0218, 0x2004, 0xd0ec, 0x1110, 0x080c, 0x14a9, 0x2001,
-	0x0307, 0x2003, 0x8000, 0x0005, 0x7004, 0xc095, 0x7006, 0x0005,
-	0x080c, 0x14a4, 0x2060, 0x6014, 0x0096, 0x2048, 0xa83b, 0xffff,
-	0x009e, 0x2009, 0x0048, 0x080c, 0x9ea9, 0x0005, 0x080c, 0x14a4,
-	0x080c, 0x0db4, 0x080c, 0x14a4, 0x080c, 0x1421, 0x7827, 0x0018,
-	0x79ac, 0xd1dc, 0x0540, 0x7827, 0x0015, 0x7828, 0x782b, 0x0000,
-	0x9065, 0x0138, 0x2001, 0x020d, 0x2003, 0x0050, 0x2003, 0x0020,
-	0x0400, 0x7004, 0x9005, 0x1180, 0x78ab, 0x0004, 0x7827, 0x0018,
-	0x782b, 0x0000, 0xd1bc, 0x090c, 0x0db4, 0x2001, 0x020d, 0x2003,
-	0x0050, 0x2003, 0x0020, 0x0490, 0x78ab, 0x0004, 0x7803, 0x0001,
-	0x080c, 0x143a, 0x0005, 0x7828, 0x782b, 0x0000, 0x9065, 0x090c,
-	0x0db4, 0x6014, 0x2048, 0x78ab, 0x0004, 0x918c, 0x0700, 0x01a8,
-	0x080c, 0x79fe, 0x080c, 0x196a, 0x080c, 0xbb3b, 0x0158, 0xa9ac,
-	0xa936, 0xa9b0, 0xa93a, 0xa83f, 0xffff, 0xa843, 0xffff, 0xa880,
-	0xc0bd, 0xa882, 0x080c, 0xb75c, 0x0005, 0x6010, 0x00b6, 0x2058,
-	0xb800, 0x00be, 0xd0bc, 0x6024, 0x190c, 0xbf25, 0x2029, 0x00c8,
-	0x8529, 0x0128, 0x2001, 0x0201, 0x2004, 0x9005, 0x0dc8, 0x7dbc,
-	0x080c, 0xd8c6, 0xd5a4, 0x1118, 0x080c, 0x14a9, 0x0005, 0x080c,
-	0x79fe, 0x080c, 0x196a, 0x0005, 0x781f, 0x0300, 0x7803, 0x0001,
-	0x0005, 0x0016, 0x0066, 0x0076, 0x00f6, 0x2079, 0x0300, 0x7908,
-	0x918c, 0x0007, 0x9186, 0x0003, 0x0120, 0x2001, 0x0016, 0x080c,
-	0x151a, 0x00fe, 0x007e, 0x006e, 0x001e, 0x0005, 0x7004, 0xc09d,
-	0x7006, 0x0005, 0x7104, 0x9184, 0x0004, 0x190c, 0x0db4, 0xd184,
-	0x1189, 0xd19c, 0x0158, 0xc19c, 0x7106, 0x2001, 0x020d, 0x2003,
-	0x0050, 0x2003, 0x0020, 0x080c, 0x14a9, 0x0005, 0x81ff, 0x190c,
-	0x0db4, 0x0005, 0xc184, 0xd1b4, 0xc1b4, 0x7106, 0x0016, 0x00e6,
-	0x15e0, 0x2071, 0x0200, 0x080c, 0x15d4, 0x6014, 0x9005, 0x05a8,
-	0x0096, 0x2048, 0xa864, 0x009e, 0x9084, 0x00ff, 0x908e, 0x0029,
-	0x0160, 0x908e, 0x0048, 0x1548, 0x601c, 0xd084, 0x11d8, 0x00f6,
-	0x2c78, 0x080c, 0x164a, 0x00fe, 0x00a8, 0x00f6, 0x2c78, 0x080c,
-	0x1792, 0x00fe, 0x2009, 0x01f4, 0x8109, 0x0160, 0x2001, 0x0201,
-	0x2004, 0x9005, 0x0dc8, 0x2001, 0x0218, 0x2004, 0xd0ec, 0x1110,
-	0x0401, 0x0040, 0x2001, 0x020d, 0x2003, 0x0020, 0x080c, 0x12c5,
-	0x7803, 0x0001, 0x00ee, 0x001e, 0x0005, 0x2001, 0x020d, 0x2003,
-	0x0050, 0x2003, 0x0020, 0x0069, 0x0ca8, 0x0031, 0x2060, 0x2009,
-	0x0053, 0x080c, 0x9ea9, 0x0005, 0x7808, 0xd09c, 0x0de8, 0x7820,
-	0x0005, 0x080c, 0x1421, 0x00d6, 0x2069, 0x0200, 0x2009, 0x01f4,
-	0x8109, 0x0510, 0x6804, 0x9005, 0x0dd8, 0x2001, 0x015d, 0x2003,
-	0x0000, 0x79bc, 0xd1a4, 0x1528, 0x79b8, 0x918c, 0x0fff, 0x0180,
-	0x9182, 0x0841, 0x1268, 0x9188, 0x0007, 0x918c, 0x0ff8, 0x810c,
-	0x810c, 0x810c, 0x080c, 0x150c, 0x6827, 0x0001, 0x8109, 0x1dd0,
-	0x04d9, 0x6827, 0x0002, 0x04c1, 0x6804, 0x9005, 0x1130, 0x682c,
-	0xd0e4, 0x1500, 0x6804, 0x9005, 0x0de8, 0x79b8, 0xd1ec, 0x1130,
-	0x08c0, 0x080c, 0x79fe, 0x080c, 0x196a, 0x0090, 0x7827, 0x0015,
-	0x782b, 0x0000, 0x7827, 0x0018, 0x782b, 0x0000, 0x2001, 0x020d,
-	0x2003, 0x0020, 0x2001, 0x0307, 0x2003, 0x0300, 0x7803, 0x0001,
-	0x00de, 0x0005, 0x682c, 0x9084, 0x5400, 0x9086, 0x5400, 0x0d30,
-	0x7827, 0x0015, 0x782b, 0x0000, 0x7803, 0x0001, 0x6800, 0x9085,
-	0x1800, 0x6802, 0x00de, 0x0005, 0x6824, 0x9084, 0x0003, 0x1de0,
-	0x0005, 0x2001, 0x0030, 0x2c08, 0x621c, 0x0021, 0x7830, 0x9086,
-	0x0041, 0x0005, 0x00f6, 0x2079, 0x0300, 0x0006, 0x7808, 0xd09c,
-	0x0140, 0x0016, 0x0026, 0x00c6, 0x080c, 0x130c, 0x00ce, 0x002e,
-	0x001e, 0x000e, 0x0006, 0x7832, 0x7936, 0x7a3a, 0x781b, 0x8080,
-	0x0059, 0x1118, 0x000e, 0x00fe, 0x0005, 0x000e, 0x792c, 0x3900,
-	0x8000, 0x2004, 0x080c, 0x0db4, 0x2009, 0x180c, 0x2104, 0xc0f4,
-	0x200a, 0x2009, 0xff00, 0x8109, 0x0904, 0x1598, 0x7a18, 0x9284,
-	0x0030, 0x0904, 0x1593, 0x9284, 0x0048, 0x9086, 0x0008, 0x1904,
-	0x1593, 0x2001, 0x0109, 0x2004, 0xd08c, 0x01f0, 0x0006, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x0126, 0x2091, 0x2800, 0x00f6,
-	0x0026, 0x0016, 0x2009, 0x1a54, 0x2104, 0x8000, 0x0208, 0x200a,
-	0x080c, 0x83b1, 0x001e, 0x002e, 0x00fe, 0x012e, 0x015e, 0x014e,
-	0x013e, 0x01de, 0x01ce, 0x000e, 0x2001, 0x009b, 0x2004, 0xd0fc,
-	0x01d0, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
-	0x00f6, 0x0016, 0x2009, 0x1a55, 0x2104, 0x8000, 0x0208, 0x200a,
-	0x080c, 0x1d57, 0x001e, 0x00fe, 0x015e, 0x014e, 0x013e, 0x01de,
-	0x01ce, 0x012e, 0x000e, 0x7818, 0xd0bc, 0x1904, 0x1543, 0x0005,
-	0x2001, 0x180c, 0x2004, 0xd0f4, 0x1528, 0x7a18, 0x9284, 0x0030,
-	0x0508, 0x9284, 0x0048, 0x9086, 0x0008, 0x11e0, 0x2001, 0x19ce,
-	0x2004, 0x9005, 0x01b8, 0x2001, 0x1a3d, 0x2004, 0x9086, 0x0000,
-	0x0188, 0x2009, 0x1a53, 0x2104, 0x8000, 0x0208, 0x200a, 0x080c,
-	0x9445, 0x2009, 0x180c, 0x2104, 0xc0f5, 0x200a, 0x2009, 0xff00,
-	0x0804, 0x1543, 0x9085, 0x0001, 0x0005, 0x7832, 0x7936, 0x7a3a,
-	0x781b, 0x8080, 0x080c, 0x153c, 0x1108, 0x0005, 0x792c, 0x3900,
-	0x8000, 0x2004, 0x080c, 0x0db4, 0x7037, 0x0001, 0x7150, 0x7037,
-	0x0002, 0x7050, 0x2060, 0xd1bc, 0x1110, 0x7054, 0x2060, 0x0005,
-	0x00e6, 0x0016, 0x2071, 0x0200, 0x0c79, 0x6124, 0xd1dc, 0x01f8,
-	0x701c, 0xd08c, 0x0904, 0x163f, 0x7017, 0x0000, 0x2001, 0x0264,
-	0x2004, 0xd0bc, 0x0904, 0x163f, 0x2001, 0x0268, 0x00c6, 0x2064,
-	0x6104, 0x6038, 0x00ce, 0x918e, 0x0039, 0x1904, 0x163f, 0x9c06,
-	0x15f0, 0x0126, 0x2091, 0x2600, 0x080c, 0x7945, 0x012e, 0x7358,
-	0x745c, 0x6014, 0x905d, 0x0598, 0x2b48, 0x6010, 0x00b6, 0x2058,
-	0xb800, 0x00be, 0xd0bc, 0x190c, 0xbf00, 0xab42, 0xac3e, 0x2001,
-	0x187d, 0x2004, 0xd0b4, 0x1170, 0x601c, 0xd0e4, 0x1158, 0x6010,
-	0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x1120, 0xa83b, 0x7fff,
-	0xa837, 0xffff, 0x080c, 0x1f53, 0x1190, 0x080c, 0x17ed, 0x2a00,
-	0xa816, 0x0130, 0x2800, 0xa80e, 0x2c05, 0xa80a, 0x2c00, 0xa812,
-	0x7037, 0x0020, 0x781f, 0x0300, 0x001e, 0x00ee, 0x0005, 0x7037,
-	0x0050, 0x7037, 0x0020, 0x001e, 0x00ee, 0x080c, 0x14a9, 0x0005,
-	0x080c, 0x0db4, 0x0016, 0x2009, 0x00a0, 0x8109, 0xa001, 0xa001,
-	0xa001, 0x1dd8, 0x001e, 0x2ff0, 0x0126, 0x2091, 0x2200, 0x00c6,
-	0x3e60, 0x6014, 0x2048, 0x2940, 0x903e, 0x2730, 0xa864, 0x2068,
-	0xa81a, 0x9d84, 0x000f, 0x9088, 0x1f33, 0x2165, 0x0002, 0x167e,
-	0x16cb, 0x167e, 0x167e, 0x167e, 0x16ad, 0x167e, 0x1682, 0x1677,
-	0x16c2, 0x167e, 0x167e, 0x167e, 0x1787, 0x1696, 0x168c, 0xa964,
-	0x918c, 0x00ff, 0x918e, 0x0048, 0x0904, 0x16c2, 0x9085, 0x0001,
-	0x0804, 0x177e, 0xa87c, 0xd0bc, 0x0dc8, 0xa890, 0xa842, 0xa88c,
-	0xa83e, 0xa888, 0x0804, 0x16d2, 0xa87c, 0xd0bc, 0x0d78, 0xa890,
-	0xa842, 0xa88c, 0xa83e, 0xa888, 0x0804, 0x1721, 0xa87c, 0xd0bc,
-	0x0d28, 0xa890, 0xa842, 0xa88c, 0xa83e, 0xa804, 0x9045, 0x090c,
-	0x0db4, 0xa164, 0xa91a, 0x91ec, 0x000f, 0x9d80, 0x1f33, 0x2065,
-	0xa888, 0xd19c, 0x1904, 0x1721, 0x0428, 0xa87c, 0xd0ac, 0x0970,
-	0xa804, 0x9045, 0x090c, 0x0db4, 0xa164, 0xa91a, 0x91ec, 0x000f,
-	0x9d80, 0x1f33, 0x2065, 0x9006, 0xa842, 0xa83e, 0xd19c, 0x1904,
-	0x1721, 0x0080, 0xa87c, 0xd0ac, 0x0904, 0x167e, 0x9006, 0xa842,
-	0xa83e, 0x0804, 0x1721, 0xa87c, 0xd0ac, 0x0904, 0x167e, 0x9006,
-	0xa842, 0xa83e, 0x2c05, 0x908a, 0x0036, 0x1a0c, 0x0db4, 0x9082,
-	0x001b, 0x0002, 0x16f5, 0x16f5, 0x16f7, 0x16f5, 0x16f5, 0x16f5,
-	0x16fd, 0x16f5, 0x16f5, 0x16f5, 0x1703, 0x16f5, 0x16f5, 0x16f5,
-	0x1709, 0x16f5, 0x16f5, 0x16f5, 0x170f, 0x16f5, 0x16f5, 0x16f5,
-	0x1715, 0x16f5, 0x16f5, 0x16f5, 0x171b, 0x080c, 0x0db4, 0xa574,
-	0xa478, 0xa37c, 0xa280, 0x0804, 0x1766, 0xa584, 0xa488, 0xa38c,
-	0xa290, 0x0804, 0x1766, 0xa594, 0xa498, 0xa39c, 0xa2a0, 0x0804,
-	0x1766, 0xa5a4, 0xa4a8, 0xa3ac, 0xa2b0, 0x0804, 0x1766, 0xa5b4,
-	0xa4b8, 0xa3bc, 0xa2c0, 0x0804, 0x1766, 0xa5c4, 0xa4c8, 0xa3cc,
-	0xa2d0, 0x0804, 0x1766, 0xa5d4, 0xa4d8, 0xa3dc, 0xa2e0, 0x0804,
-	0x1766, 0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0db4, 0x9082, 0x001b,
-	0x0002, 0x1744, 0x1742, 0x1742, 0x1742, 0x1742, 0x1742, 0x174b,
-	0x1742, 0x1742, 0x1742, 0x1742, 0x1742, 0x1752, 0x1742, 0x1742,
-	0x1742, 0x1742, 0x1742, 0x1759, 0x1742, 0x1742, 0x1742, 0x1742,
-	0x1742, 0x1760, 0x080c, 0x0db4, 0xa56c, 0xa470, 0xa774, 0xa678,
-	0xa37c, 0xa280, 0x00d8, 0xa584, 0xa488, 0xa78c, 0xa690, 0xa394,
-	0xa298, 0x00a0, 0xa59c, 0xa4a0, 0xa7a4, 0xa6a8, 0xa3ac, 0xa2b0,
-	0x0068, 0xa5b4, 0xa4b8, 0xa7bc, 0xa6c0, 0xa3c4, 0xa2c8, 0x0030,
-	0xa5cc, 0xa4d0, 0xa7d4, 0xa6d8, 0xa3dc, 0xa2e0, 0xab2e, 0xaa32,
-	0xad1e, 0xac22, 0xaf26, 0xae2a, 0xa988, 0x8c60, 0x2c1d, 0xa8ac,
-	0xaab0, 0xa836, 0xaa3a, 0x8109, 0xa916, 0x1158, 0x3e60, 0x601c,
-	0xc085, 0x601e, 0xa87c, 0xc0dd, 0xa87e, 0x9006, 0x00ce, 0x012e,
-	0x0005, 0x2800, 0xa80e, 0xab0a, 0x2c00, 0xa812, 0x0c78, 0x0804,
-	0x167e, 0x0016, 0x2009, 0x00a0, 0x8109, 0xa001, 0xa001, 0xa001,
-	0x1dd8, 0x001e, 0x2ff0, 0x0126, 0x2091, 0x2200, 0x00c6, 0x3e60,
-	0x6014, 0x2048, 0x2940, 0xa80e, 0x2061, 0x1f2e, 0xa813, 0x1f2e,
-	0x2c05, 0xa80a, 0xa964, 0xa91a, 0xa87c, 0xd0ac, 0x090c, 0x0db4,
-	0x9006, 0xa842, 0xa83e, 0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0db4,
-	0xadcc, 0xacd0, 0xafd4, 0xaed8, 0xabdc, 0xaae0, 0xab2e, 0xaa32,
-	0xad1e, 0xac22, 0xaf26, 0xae2a, 0xa8ac, 0xaab0, 0xa836, 0xaa3a,
-	0xa988, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0008, 0x1120, 0x8109,
-	0xa916, 0x0128, 0x0078, 0x918a, 0x0002, 0xa916, 0x1158, 0x3e60,
-	0x601c, 0xc085, 0x601e, 0xa87c, 0xc0dd, 0xa87e, 0x9006, 0x00ce,
-	0x012e, 0x0005, 0xa804, 0x9045, 0x090c, 0x0db4, 0xa80e, 0xa064,
-	0xa81a, 0x9084, 0x000f, 0x9080, 0x1f33, 0x2015, 0x82ff, 0x090c,
-	0x0db4, 0xaa12, 0x2205, 0xa80a, 0x0c10, 0x903e, 0x2730, 0xa880,
-	0xd0fc, 0x1190, 0x2d00, 0x0002, 0x18e2, 0x1844, 0x1844, 0x18e2,
-	0x18e2, 0x18dc, 0x18e2, 0x1844, 0x1893, 0x1893, 0x1893, 0x18e2,
-	0x18e2, 0x18e2, 0x18d9, 0x1893, 0xc0fc, 0xa882, 0xab2c, 0xaa30,
-	0xad1c, 0xac20, 0xdd9c, 0x0904, 0x18e4, 0x2c05, 0x908a, 0x0034,
-	0x1a0c, 0x0db4, 0x9082, 0x001b, 0x0002, 0x1830, 0x182e, 0x182e,
-	0x182e, 0x182e, 0x182e, 0x1834, 0x182e, 0x182e, 0x182e, 0x182e,
-	0x182e, 0x1838, 0x182e, 0x182e, 0x182e, 0x182e, 0x182e, 0x183c,
-	0x182e, 0x182e, 0x182e, 0x182e, 0x182e, 0x1840, 0x080c, 0x0db4,
-	0xa774, 0xa678, 0x0804, 0x18e4, 0xa78c, 0xa690, 0x0804, 0x18e4,
-	0xa7a4, 0xa6a8, 0x0804, 0x18e4, 0xa7bc, 0xa6c0, 0x0804, 0x18e4,
-	0xa7d4, 0xa6d8, 0x0804, 0x18e4, 0x2c05, 0x908a, 0x0036, 0x1a0c,
-	0x0db4, 0x9082, 0x001b, 0x0002, 0x1867, 0x1867, 0x1869, 0x1867,
-	0x1867, 0x1867, 0x186f, 0x1867, 0x1867, 0x1867, 0x1875, 0x1867,
-	0x1867, 0x1867, 0x187b, 0x1867, 0x1867, 0x1867, 0x1881, 0x1867,
-	0x1867, 0x1867, 0x1887, 0x1867, 0x1867, 0x1867, 0x188d, 0x080c,
-	0x0db4, 0xa574, 0xa478, 0xa37c, 0xa280, 0x0804, 0x18e4, 0xa584,
-	0xa488, 0xa38c, 0xa290, 0x0804, 0x18e4, 0xa594, 0xa498, 0xa39c,
-	0xa2a0, 0x0804, 0x18e4, 0xa5a4, 0xa4a8, 0xa3ac, 0xa2b0, 0x0804,
-	0x18e4, 0xa5b4, 0xa4b8, 0xa3bc, 0xa2c0, 0x0804, 0x18e4, 0xa5c4,
-	0xa4c8, 0xa3cc, 0xa2d0, 0x0804, 0x18e4, 0xa5d4, 0xa4d8, 0xa3dc,
-	0xa2e0, 0x0804, 0x18e4, 0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0db4,
-	0x9082, 0x001b, 0x0002, 0x18b6, 0x18b4, 0x18b4, 0x18b4, 0x18b4,
-	0x18b4, 0x18bd, 0x18b4, 0x18b4, 0x18b4, 0x18b4, 0x18b4, 0x18c4,
-	0x18b4, 0x18b4, 0x18b4, 0x18b4, 0x18b4, 0x18cb, 0x18b4, 0x18b4,
-	0x18b4, 0x18b4, 0x18b4, 0x18d2, 0x080c, 0x0db4, 0xa56c, 0xa470,
-	0xa774, 0xa678, 0xa37c, 0xa280, 0x0438, 0xa584, 0xa488, 0xa78c,
-	0xa690, 0xa394, 0xa298, 0x0400, 0xa59c, 0xa4a0, 0xa7a4, 0xa6a8,
-	0xa3ac, 0xa2b0, 0x00c8, 0xa5b4, 0xa4b8, 0xa7bc, 0xa6c0, 0xa3c4,
-	0xa2c8, 0x0090, 0xa5cc, 0xa4d0, 0xa7d4, 0xa6d8, 0xa3dc, 0xa2e0,
-	0x0058, 0x9d86, 0x000e, 0x1130, 0x080c, 0x1eeb, 0x1904, 0x17ed,
-	0x900e, 0x0050, 0x080c, 0x0db4, 0xab2e, 0xaa32, 0xad1e, 0xac22,
-	0xaf26, 0xae2a, 0x080c, 0x1eeb, 0x0005, 0x6014, 0x2048, 0x6118,
-	0x810c, 0x810c, 0x810c, 0x81ff, 0x1118, 0xa887, 0x0001, 0x0008,
-	0xa986, 0x601b, 0x0002, 0xa874, 0x9084, 0x00ff, 0x9084, 0x0008,
-	0x0150, 0x00e9, 0x6000, 0x9086, 0x0004, 0x1120, 0x2009, 0x0048,
-	0x080c, 0x9ea9, 0x0005, 0xa974, 0xd1dc, 0x1108, 0x0005, 0xa934,
-	0xa88c, 0x9106, 0x1158, 0xa938, 0xa890, 0x9106, 0x1138, 0x601c,
-	0xc084, 0x601e, 0x2009, 0x0048, 0x0804, 0x9ea9, 0x0005, 0x0126,
-	0x00c6, 0x2091, 0x2200, 0x00ce, 0x7908, 0x918c, 0x0007, 0x9186,
-	0x0000, 0x05b0, 0x9186, 0x0003, 0x0598, 0x6020, 0x6023, 0x0000,
-	0x0006, 0x2031, 0x0008, 0x00c6, 0x781f, 0x0808, 0x7808, 0xd09c,
-	0x0120, 0x080c, 0x130c, 0x8631, 0x1db8, 0x00ce, 0x781f, 0x0800,
-	0x2031, 0x0168, 0x00c6, 0x7808, 0xd09c, 0x190c, 0x130c, 0x00ce,
-	0x2001, 0x0038, 0x080c, 0x19f2, 0x7930, 0x9186, 0x0040, 0x0160,
-	0x9186, 0x0042, 0x190c, 0x0db4, 0x2001, 0x001e, 0x8001, 0x1df0,
-	0x8631, 0x1d40, 0x080c, 0x1a01, 0x000e, 0x6022, 0x012e, 0x0005,
-	0x080c, 0x19ee, 0x7827, 0x0015, 0x7828, 0x9c06, 0x1db8, 0x782b,
-	0x0000, 0x0ca0, 0x00f6, 0x2079, 0x0300, 0x7803, 0x0000, 0x78ab,
-	0x0004, 0x00fe, 0x080c, 0x6faa, 0x1188, 0x2001, 0x0138, 0x2003,
-	0x0000, 0x2001, 0x0160, 0x2003, 0x0000, 0x2011, 0x012c, 0xa001,
-	0xa001, 0x8211, 0x1de0, 0x0059, 0x0804, 0x705a, 0x0479, 0x0039,
-	0x2001, 0x0160, 0x2502, 0x2001, 0x0138, 0x2202, 0x0005, 0x00e6,
-	0x2071, 0x0200, 0x080c, 0x2a76, 0x2009, 0x003c, 0x080c, 0x2275,
-	0x2001, 0x015d, 0x2003, 0x0000, 0x7000, 0x9084, 0x003c, 0x1de0,
-	0x080c, 0x7f64, 0x70a0, 0x70a2, 0x7098, 0x709a, 0x709c, 0x709e,
-	0x2001, 0x020d, 0x2003, 0x0020, 0x00f6, 0x2079, 0x0300, 0x080c,
-	0x12c5, 0x7803, 0x0001, 0x00fe, 0x00ee, 0x0005, 0x2001, 0x0138,
-	0x2014, 0x2003, 0x0000, 0x2001, 0x0160, 0x202c, 0x2003, 0x0000,
-	0x080c, 0x6faa, 0x1108, 0x0005, 0x2021, 0x0260, 0x2001, 0x0141,
-	0x201c, 0xd3dc, 0x1168, 0x2001, 0x0109, 0x201c, 0x939c, 0x0048,
-	0x1160, 0x2001, 0x0111, 0x201c, 0x83ff, 0x1110, 0x8421, 0x1d70,
-	0x2001, 0x015d, 0x2003, 0x0000, 0x0005, 0x0046, 0x2021, 0x0019,
-	0x2003, 0x0048, 0xa001, 0xa001, 0x201c, 0x939c, 0x0048, 0x0120,
-	0x8421, 0x1db0, 0x004e, 0x0c60, 0x004e, 0x0c40, 0x601c, 0xc084,
-	0x601e, 0x0005, 0x2c08, 0x621c, 0x080c, 0x151a, 0x7930, 0x0005,
-	0x2c08, 0x621c, 0x080c, 0x15c5, 0x7930, 0x0005, 0x8001, 0x1df0,
-	0x0005, 0x2031, 0x0005, 0x781c, 0x9084, 0x0007, 0x0170, 0x2001,
-	0x0038, 0x0c41, 0x9186, 0x0040, 0x0904, 0x1a5f, 0x2001, 0x001e,
-	0x0c69, 0x8631, 0x1d80, 0x080c, 0x0db4, 0x781f, 0x0202, 0x2001,
-	0x015d, 0x2003, 0x0000, 0x2001, 0x0b10, 0x0c01, 0x781c, 0xd084,
-	0x0110, 0x0861, 0x04e0, 0x2001, 0x0030, 0x0891, 0x9186, 0x0040,
-	0x0568, 0x781c, 0xd084, 0x1da8, 0x781f, 0x0101, 0x2001, 0x0014,
-	0x0869, 0x2001, 0x0037, 0x0821, 0x9186, 0x0040, 0x0140, 0x2001,
-	0x0030, 0x080c, 0x19f8, 0x9186, 0x0040, 0x190c, 0x0db4, 0x00d6,
-	0x2069, 0x0200, 0x692c, 0xd1f4, 0x1170, 0xd1c4, 0x0160, 0xd19c,
-	0x0130, 0x6800, 0x9085, 0x1800, 0x6802, 0x00de, 0x0080, 0x6908,
-	0x9184, 0x0007, 0x1db0, 0x00de, 0x781f, 0x0100, 0x791c, 0x9184,
-	0x0007, 0x090c, 0x0db4, 0xa001, 0xa001, 0x781f, 0x0200, 0x0005,
-	0x0126, 0x2091, 0x2400, 0x2071, 0x1a3d, 0x2079, 0x0090, 0x012e,
-	0x0005, 0x9280, 0x0005, 0x2004, 0x2048, 0xa97c, 0xd1dc, 0x1904,
-	0x1af4, 0xa964, 0x9184, 0x0007, 0x0002, 0x1a7d, 0x1adf, 0x1a94,
-	0x1a94, 0x1a94, 0x1ac7, 0x1aa7, 0x1a96, 0x918c, 0x00ff, 0x9186,
-	0x0008, 0x1170, 0xa87c, 0xd0b4, 0x0904, 0x1d12, 0x9006, 0xa842,
-	0xa83e, 0xa988, 0x2900, 0xa85a, 0xa813, 0x1f2e, 0x0804, 0x1af0,
-	0x9186, 0x0048, 0x0904, 0x1adf, 0x080c, 0x0db4, 0xa87c, 0xd0b4,
-	0x0904, 0x1d12, 0xa890, 0xa842, 0xa83a, 0xa88c, 0xa83e, 0xa836,
-	0xa8ac, 0xa846, 0xa8b0, 0xa84a, 0xa988, 0x0804, 0x1ae7, 0xa864,
-	0x9084, 0x00ff, 0x9086, 0x001e, 0x1d38, 0xa87c, 0xd0b4, 0x0904,
-	0x1d12, 0xa890, 0xa842, 0xa83a, 0xa88c, 0xa83e, 0xa836, 0xa8ac,
-	0xa846, 0xa8b0, 0xa84a, 0xa804, 0xa85a, 0x2040, 0xa064, 0x9084,
-	0x000f, 0x9080, 0x1f33, 0x2005, 0xa812, 0xa988, 0x0448, 0x918c,
-	0x00ff, 0x9186, 0x0015, 0x1540, 0xa87c, 0xd0b4, 0x0904, 0x1d12,
-	0xa804, 0xa85a, 0x2040, 0xa064, 0x9084, 0x000f, 0x9080, 0x1f33,
-	0x2005, 0xa812, 0xa988, 0x9006, 0xa842, 0xa83e, 0x0088, 0xa87c,
-	0xd0b4, 0x0904, 0x1d12, 0xa988, 0x9006, 0xa842, 0xa83e, 0x2900,
-	0xa85a, 0xa864, 0x9084, 0x000f, 0x9080, 0x1f33, 0x2005, 0xa812,
-	0xa916, 0xa87c, 0xc0dd, 0xa87e, 0x0005, 0x00f6, 0x2079, 0x0090,
-	0x782c, 0xd0fc, 0x190c, 0x1d57, 0x00e6, 0x2071, 0x1a3d, 0x7000,
-	0x9005, 0x1904, 0x1b5d, 0x7206, 0x9280, 0x0005, 0x204c, 0x9280,
-	0x0004, 0x2004, 0x782b, 0x0004, 0x00f6, 0x2079, 0x0200, 0x7803,
-	0x0040, 0x00fe, 0x00b6, 0x2058, 0xb86c, 0x7836, 0xb890, 0x00be,
-	0x00f6, 0x2079, 0x0200, 0x7803, 0x0040, 0xa001, 0xa001, 0xa001,
-	0xa001, 0xa001, 0xa001, 0x781a, 0x2079, 0x0100, 0x8004, 0x78d6,
-	0x00fe, 0xa814, 0x2050, 0xa858, 0x2040, 0xa810, 0x2060, 0xa064,
-	0x90ec, 0x000f, 0xa944, 0x791a, 0x7116, 0xa848, 0x781e, 0x701a,
-	0x9006, 0x700e, 0x7012, 0x7004, 0xa940, 0xa838, 0x9106, 0x1500,
-	0xa93c, 0xa834, 0x9106, 0x11e0, 0x0006, 0x0016, 0xa938, 0xa834,
-	0x9105, 0x0118, 0x001e, 0x000e, 0x0098, 0x001e, 0x000e, 0x8aff,
-	0x01c8, 0x0126, 0x2091, 0x8000, 0x2009, 0x0306, 0x200b, 0x0808,
-	0x00d9, 0x0108, 0x00c9, 0x012e, 0x9006, 0x00ee, 0x00fe, 0x0005,
-	0x0036, 0x0046, 0xab38, 0xac34, 0x080c, 0x1f53, 0x004e, 0x003e,
-	0x0d30, 0x0c98, 0x9085, 0x0001, 0x0c80, 0x2009, 0x0306, 0x200b,
-	0x4800, 0x7027, 0x0000, 0x0005, 0x0076, 0x0066, 0x0056, 0x0046,
-	0x0036, 0x0026, 0x8aff, 0x0904, 0x1d0b, 0x700c, 0x7214, 0x923a,
-	0x7010, 0x7218, 0x9203, 0x0a04, 0x1d0a, 0x9705, 0x0904, 0x1d0a,
-	0x903e, 0x2730, 0xa880, 0xd0fc, 0x1190, 0x2d00, 0x0002, 0x1c9f,
-	0x1bdf, 0x1bdf, 0x1c9f, 0x1c9f, 0x1c7c, 0x1c9f, 0x1bdf, 0x1c83,
-	0x1c2e, 0x1c2e, 0x1c9f, 0x1c9f, 0x1c9f, 0x1c76, 0x1c2e, 0xc0fc,
-	0xa882, 0xab2c, 0xaa30, 0xad1c, 0xac20, 0xdd9c, 0x0904, 0x1ca1,
-	0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0db4, 0x9082, 0x001b, 0x0002,
-	0x1bcb, 0x1bc9, 0x1bc9, 0x1bc9, 0x1bc9, 0x1bc9, 0x1bcf, 0x1bc9,
-	0x1bc9, 0x1bc9, 0x1bc9, 0x1bc9, 0x1bd3, 0x1bc9, 0x1bc9, 0x1bc9,
-	0x1bc9, 0x1bc9, 0x1bd7, 0x1bc9, 0x1bc9, 0x1bc9, 0x1bc9, 0x1bc9,
-	0x1bdb, 0x080c, 0x0db4, 0xa774, 0xa678, 0x0804, 0x1ca1, 0xa78c,
-	0xa690, 0x0804, 0x1ca1, 0xa7a4, 0xa6a8, 0x0804, 0x1ca1, 0xa7bc,
-	0xa6c0, 0x0804, 0x1ca1, 0xa7d4, 0xa6d8, 0x0804, 0x1ca1, 0x2c05,
-	0x908a, 0x0036, 0x1a0c, 0x0db4, 0x9082, 0x001b, 0x0002, 0x1c02,
-	0x1c02, 0x1c04, 0x1c02, 0x1c02, 0x1c02, 0x1c0a, 0x1c02, 0x1c02,
-	0x1c02, 0x1c10, 0x1c02, 0x1c02, 0x1c02, 0x1c16, 0x1c02, 0x1c02,
-	0x1c02, 0x1c1c, 0x1c02, 0x1c02, 0x1c02, 0x1c22, 0x1c02, 0x1c02,
-	0x1c02, 0x1c28, 0x080c, 0x0db4, 0xa574, 0xa478, 0xa37c, 0xa280,
-	0x0804, 0x1ca1, 0xa584, 0xa488, 0xa38c, 0xa290, 0x0804, 0x1ca1,
-	0xa594, 0xa498, 0xa39c, 0xa2a0, 0x0804, 0x1ca1, 0xa5a4, 0xa4a8,
-	0xa3ac, 0xa2b0, 0x0804, 0x1ca1, 0xa5b4, 0xa4b8, 0xa3bc, 0xa2c0,
-	0x0804, 0x1ca1, 0xa5c4, 0xa4c8, 0xa3cc, 0xa2d0, 0x0804, 0x1ca1,
-	0xa5d4, 0xa4d8, 0xa3dc, 0xa2e0, 0x0804, 0x1ca1, 0x2c05, 0x908a,
-	0x0034, 0x1a0c, 0x0db4, 0x9082, 0x001b, 0x0002, 0x1c51, 0x1c4f,
-	0x1c4f, 0x1c4f, 0x1c4f, 0x1c4f, 0x1c59, 0x1c4f, 0x1c4f, 0x1c4f,
-	0x1c4f, 0x1c4f, 0x1c61, 0x1c4f, 0x1c4f, 0x1c4f, 0x1c4f, 0x1c4f,
-	0x1c68, 0x1c4f, 0x1c4f, 0x1c4f, 0x1c4f, 0x1c4f, 0x1c6f, 0x080c,
-	0x0db4, 0xa56c, 0xa470, 0xa774, 0xa678, 0xa37c, 0xa280, 0x0804,
-	0x1ca1, 0xa584, 0xa488, 0xa78c, 0xa690, 0xa394, 0xa298, 0x0804,
-	0x1ca1, 0xa59c, 0xa4a0, 0xa7a4, 0xa6a8, 0xa3ac, 0xa2b0, 0x04c8,
-	0xa5b4, 0xa4b8, 0xa7bc, 0xa6c0, 0xa3c4, 0xa2c8, 0x0490, 0xa5cc,
-	0xa4d0, 0xa7d4, 0xa6d8, 0xa3dc, 0xa2e0, 0x0458, 0xa864, 0x9084,
-	0x00ff, 0x9086, 0x001e, 0x1518, 0x080c, 0x1eeb, 0x1904, 0x1b7a,
-	0x900e, 0x0804, 0x1d0b, 0xab64, 0x939c, 0x00ff, 0x9386, 0x0048,
-	0x1180, 0x00c6, 0x7004, 0x2060, 0x6004, 0x9086, 0x0043, 0x00ce,
-	0x0904, 0x1c2e, 0xab9c, 0x9016, 0xad8c, 0xac90, 0xaf94, 0xae98,
-	0x0040, 0x9386, 0x0008, 0x0904, 0x1c2e, 0x080c, 0x0db4, 0x080c,
-	0x0db4, 0x2009, 0x030f, 0x2104, 0xd0fc, 0x0530, 0x0066, 0x2009,
-	0x0306, 0x2104, 0x9084, 0x0030, 0x15c8, 0x2031, 0x1000, 0x200b,
-	0x4000, 0x2600, 0x9302, 0x928b, 0x0000, 0xa82e, 0xa932, 0x0278,
-	0x9105, 0x0168, 0x2011, 0x0000, 0x2618, 0x2600, 0x9500, 0xa81e,
-	0x9481, 0x0000, 0xa822, 0xa880, 0xc0fd, 0xa882, 0x0020, 0xa82f,
-	0x0000, 0xa833, 0x0000, 0x006e, 0x7b12, 0x7a16, 0x7d02, 0x7c06,
-	0x7f0a, 0x7e0e, 0x782b, 0x0001, 0x7000, 0x8000, 0x7002, 0xa83c,
-	0x9300, 0xa83e, 0xa840, 0x9201, 0xa842, 0x700c, 0x9300, 0x700e,
-	0x7010, 0x9201, 0x7012, 0x080c, 0x1eeb, 0x0428, 0x2031, 0x0080,
-	0x9584, 0x007f, 0x0108, 0x9632, 0x7124, 0x7000, 0x9086, 0x0000,
-	0x1198, 0xc185, 0x7126, 0x2009, 0x0306, 0x2104, 0xd0b4, 0x1904,
-	0x1cb1, 0x200b, 0x4040, 0x2009, 0x1a56, 0x2104, 0x8000, 0x0a04,
-	0x1cb1, 0x200a, 0x0804, 0x1cb1, 0xc18d, 0x7126, 0xd184, 0x1d58,
-	0x0804, 0x1cb1, 0x9006, 0x002e, 0x003e, 0x004e, 0x005e, 0x006e,
-	0x007e, 0x0005, 0x080c, 0x0db4, 0x0026, 0x2001, 0x0105, 0x2003,
-	0x0010, 0x782b, 0x0004, 0x7003, 0x0000, 0x7004, 0x0016, 0x080c,
-	0x1b6d, 0x001e, 0x2060, 0x6014, 0x2048, 0x080c, 0xbb3b, 0x0118,
-	0xa880, 0xc0bd, 0xa882, 0x6020, 0x9086, 0x0006, 0x1180, 0x2061,
-	0x0100, 0x62c8, 0x2001, 0x00fa, 0x8001, 0x1df0, 0x60c8, 0x9206,
-	0x1dc0, 0x60c4, 0xa89a, 0x60c8, 0xa896, 0x7004, 0x2060, 0x00c6,
-	0x080c, 0xb75c, 0x00ce, 0x2001, 0x19ce, 0x2004, 0x9c06, 0x1160,
-	0x2009, 0x0040, 0x080c, 0x2275, 0x080c, 0x98d4, 0x2011, 0x0000,
-	0x080c, 0x9765, 0x080c, 0x8a68, 0x002e, 0x0804, 0x1e9b, 0x0126,
-	0x2091, 0x2400, 0xa858, 0x2040, 0x792c, 0x782b, 0x0002, 0x9184,
-	0x0700, 0x1904, 0x1d14, 0x7000, 0x0002, 0x1e9b, 0x1d69, 0x1de9,
-	0x1e99, 0x8001, 0x7002, 0x7027, 0x0000, 0xd19c, 0x1158, 0x8aff,
-	0x0904, 0x1db6, 0x080c, 0x1b74, 0x0904, 0x1e9b, 0x080c, 0x1b74,
-	0x0804, 0x1e9b, 0x782b, 0x0004, 0xd194, 0x0148, 0xa880, 0xc0fc,
-	0xa882, 0x8aff, 0x1518, 0xa87c, 0xc0f5, 0xa87e, 0x00f8, 0x0026,
-	0x0036, 0xab3c, 0xaa40, 0x0016, 0x7910, 0xa82c, 0x9100, 0xa82e,
-	0x7914, 0xa830, 0x9101, 0xa832, 0x001e, 0x7810, 0x931a, 0x7814,
-	0x9213, 0x7800, 0xa81e, 0x7804, 0xa822, 0xab3e, 0xaa42, 0x003e,
-	0x002e, 0x080c, 0x1f06, 0xa880, 0xc0fd, 0xa882, 0x2a00, 0xa816,
-	0x2800, 0xa85a, 0x2c00, 0xa812, 0x7003, 0x0000, 0x2009, 0x0306,
-	0x200b, 0x4800, 0x7027, 0x0000, 0x0804, 0x1e9b, 0x00f6, 0x0026,
-	0x781c, 0x0006, 0x7818, 0x0006, 0x2079, 0x0100, 0x7a14, 0x9284,
-	0x1984, 0x9085, 0x0012, 0x7816, 0x0036, 0x2019, 0x1000, 0x8319,
-	0x090c, 0x0db4, 0x7820, 0xd0bc, 0x1dd0, 0x003e, 0x79c8, 0x000e,
-	0x9102, 0x001e, 0x0006, 0x0016, 0x79c4, 0x000e, 0x9103, 0x78c6,
-	0x000e, 0x78ca, 0x9284, 0x1984, 0x9085, 0x0012, 0x7816, 0x002e,
-	0x00fe, 0x782b, 0x0008, 0x7003, 0x0000, 0x080c, 0x1b6d, 0x0804,
-	0x1e9b, 0x8001, 0x7002, 0x7024, 0x8004, 0x7026, 0xd194, 0x0170,
-	0x782c, 0xd0fc, 0x1904, 0x1d5c, 0xd19c, 0x1904, 0x1e97, 0x8aff,
-	0x0904, 0x1e9b, 0x080c, 0x1b74, 0x0804, 0x1e9b, 0x0026, 0x0036,
-	0xab3c, 0xaa40, 0x080c, 0x1f06, 0xdd9c, 0x1904, 0x1e56, 0x2c05,
-	0x908a, 0x0036, 0x1a0c, 0x0db4, 0x9082, 0x001b, 0x0002, 0x1e2a,
-	0x1e2a, 0x1e2c, 0x1e2a, 0x1e2a, 0x1e2a, 0x1e32, 0x1e2a, 0x1e2a,
-	0x1e2a, 0x1e38, 0x1e2a, 0x1e2a, 0x1e2a, 0x1e3e, 0x1e2a, 0x1e2a,
-	0x1e2a, 0x1e44, 0x1e2a, 0x1e2a, 0x1e2a, 0x1e4a, 0x1e2a, 0x1e2a,
-	0x1e2a, 0x1e50, 0x080c, 0x0db4, 0xa07c, 0x931a, 0xa080, 0x9213,
-	0x0804, 0x1d8b, 0xa08c, 0x931a, 0xa090, 0x9213, 0x0804, 0x1d8b,
-	0xa09c, 0x931a, 0xa0a0, 0x9213, 0x0804, 0x1d8b, 0xa0ac, 0x931a,
-	0xa0b0, 0x9213, 0x0804, 0x1d8b, 0xa0bc, 0x931a, 0xa0c0, 0x9213,
-	0x0804, 0x1d8b, 0xa0cc, 0x931a, 0xa0d0, 0x9213, 0x0804, 0x1d8b,
-	0xa0dc, 0x931a, 0xa0e0, 0x9213, 0x0804, 0x1d8b, 0x2c05, 0x908a,
-	0x0034, 0x1a0c, 0x0db4, 0x9082, 0x001b, 0x0002, 0x1e79, 0x1e77,
-	0x1e77, 0x1e77, 0x1e77, 0x1e77, 0x1e7f, 0x1e77, 0x1e77, 0x1e77,
-	0x1e77, 0x1e77, 0x1e85, 0x1e77, 0x1e77, 0x1e77, 0x1e77, 0x1e77,
-	0x1e8b, 0x1e77, 0x1e77, 0x1e77, 0x1e77, 0x1e77, 0x1e91, 0x080c,
-	0x0db4, 0xa07c, 0x931a, 0xa080, 0x9213, 0x0804, 0x1d8b, 0xa094,
-	0x931a, 0xa098, 0x9213, 0x0804, 0x1d8b, 0xa0ac, 0x931a, 0xa0b0,
-	0x9213, 0x0804, 0x1d8b, 0xa0c4, 0x931a, 0xa0c8, 0x9213, 0x0804,
-	0x1d8b, 0xa0dc, 0x931a, 0xa0e0, 0x9213, 0x0804, 0x1d8b, 0x0804,
-	0x1d87, 0x080c, 0x0db4, 0x012e, 0x0005, 0x00f6, 0x00e6, 0x2071,
-	0x1a3d, 0x7000, 0x9086, 0x0000, 0x0904, 0x1ee6, 0x2079, 0x0090,
-	0x2009, 0x0207, 0x210c, 0xd194, 0x01b8, 0x2009, 0x020c, 0x210c,
-	0x9184, 0x0003, 0x0188, 0x080c, 0xd90f, 0x2001, 0x0133, 0x2004,
-	0x9005, 0x090c, 0x0db4, 0x0016, 0x2009, 0x0040, 0x080c, 0x2275,
-	0x001e, 0x2001, 0x020c, 0x2102, 0x2009, 0x0206, 0x2104, 0x2009,
-	0x0203, 0x210c, 0x9106, 0x1120, 0x2009, 0x0040, 0x080c, 0x2275,
-	0x782c, 0xd0fc, 0x09a8, 0x080c, 0x1d57, 0x7000, 0x9086, 0x0000,
-	0x1978, 0x782b, 0x0004, 0x782c, 0xd0ac, 0x1de8, 0x2009, 0x0040,
-	0x080c, 0x2275, 0x782b, 0x0002, 0x7003, 0x0000, 0x080c, 0x1b6d,
-	0x00ee, 0x00fe, 0x0005, 0xa880, 0xd0fc, 0x11a8, 0x8c60, 0x2c05,
-	0x9005, 0x0110, 0x8a51, 0x0005, 0xa004, 0x9005, 0x0168, 0xa85a,
-	0x2040, 0xa064, 0x9084, 0x000f, 0x9080, 0x1f33, 0x2065, 0x8cff,
-	0x090c, 0x0db4, 0x8a51, 0x0005, 0x2050, 0x0005, 0xa880, 0xd0fc,
-	0x11b8, 0x8a50, 0x8c61, 0x2c05, 0x9005, 0x1190, 0x2800, 0x9906,
-	0x0120, 0xa000, 0x9005, 0x1108, 0x2900, 0x2040, 0xa85a, 0xa064,
-	0x9084, 0x000f, 0x9080, 0x1f43, 0x2065, 0x8cff, 0x090c, 0x0db4,
-	0x0005, 0x0000, 0x001d, 0x0021, 0x0025, 0x0029, 0x002d, 0x0031,
-	0x0035, 0x0000, 0x001b, 0x0021, 0x0027, 0x002d, 0x0033, 0x0000,
-	0x0000, 0x0023, 0x0000, 0x0000, 0x1f26, 0x1f22, 0x0000, 0x0000,
-	0x1f30, 0x0000, 0x1f26, 0x1f2d, 0x1f2d, 0x1f2a, 0x0000, 0x0000,
-	0x0000, 0x1f30, 0x1f2d, 0x0000, 0x1f28, 0x1f28, 0x0000, 0x0000,
-	0x1f30, 0x0000, 0x1f28, 0x1f2e, 0x1f2e, 0x1f2e, 0x0000, 0x0000,
-	0x0000, 0x1f30, 0x1f2e, 0x00c6, 0x00d6, 0x0086, 0xab42, 0xac3e,
-	0xa888, 0x9055, 0x0904, 0x2132, 0x2940, 0xa064, 0x90ec, 0x000f,
-	0x9084, 0x00ff, 0x9086, 0x0008, 0x1118, 0x2061, 0x1f2e, 0x00d0,
-	0x9de0, 0x1f33, 0x9d86, 0x0007, 0x0130, 0x9d86, 0x000e, 0x0118,
-	0x9d86, 0x000f, 0x1120, 0xa08c, 0x9422, 0xa090, 0x931b, 0x2c05,
-	0x9065, 0x1140, 0x0310, 0x0804, 0x2132, 0xa004, 0x9045, 0x0904,
-	0x2132, 0x08d8, 0x2c05, 0x9005, 0x0904, 0x201a, 0xdd9c, 0x1904,
-	0x1fd6, 0x908a, 0x0036, 0x1a0c, 0x0db4, 0x9082, 0x001b, 0x0002,
-	0x1fab, 0x1fab, 0x1fad, 0x1fab, 0x1fab, 0x1fab, 0x1fb3, 0x1fab,
-	0x1fab, 0x1fab, 0x1fb9, 0x1fab, 0x1fab, 0x1fab, 0x1fbf, 0x1fab,
-	0x1fab, 0x1fab, 0x1fc5, 0x1fab, 0x1fab, 0x1fab, 0x1fcb, 0x1fab,
-	0x1fab, 0x1fab, 0x1fd1, 0x080c, 0x0db4, 0xa07c, 0x9422, 0xa080,
-	0x931b, 0x0804, 0x2010, 0xa08c, 0x9422, 0xa090, 0x931b, 0x0804,
-	0x2010, 0xa09c, 0x9422, 0xa0a0, 0x931b, 0x0804, 0x2010, 0xa0ac,
-	0x9422, 0xa0b0, 0x931b, 0x0804, 0x2010, 0xa0bc, 0x9422, 0xa0c0,
-	0x931b, 0x0804, 0x2010, 0xa0cc, 0x9422, 0xa0d0, 0x931b, 0x0804,
-	0x2010, 0xa0dc, 0x9422, 0xa0e0, 0x931b, 0x04d0, 0x908a, 0x0034,
-	0x1a0c, 0x0db4, 0x9082, 0x001b, 0x0002, 0x1ff8, 0x1ff6, 0x1ff6,
-	0x1ff6, 0x1ff6, 0x1ff6, 0x1ffd, 0x1ff6, 0x1ff6, 0x1ff6, 0x1ff6,
-	0x1ff6, 0x2002, 0x1ff6, 0x1ff6, 0x1ff6, 0x1ff6, 0x1ff6, 0x2007,
-	0x1ff6, 0x1ff6, 0x1ff6, 0x1ff6, 0x1ff6, 0x200c, 0x080c, 0x0db4,
-	0xa07c, 0x9422, 0xa080, 0x931b, 0x0098, 0xa094, 0x9422, 0xa098,
-	0x931b, 0x0070, 0xa0ac, 0x9422, 0xa0b0, 0x931b, 0x0048, 0xa0c4,
-	0x9422, 0xa0c8, 0x931b, 0x0020, 0xa0dc, 0x9422, 0xa0e0, 0x931b,
-	0x0630, 0x2300, 0x9405, 0x0160, 0x8a51, 0x0904, 0x2132, 0x8c60,
-	0x0804, 0x1f82, 0xa004, 0x9045, 0x0904, 0x2132, 0x0804, 0x1f5d,
-	0x8a51, 0x0904, 0x2132, 0x8c60, 0x2c05, 0x9005, 0x1158, 0xa004,
-	0x9045, 0x0904, 0x2132, 0xa064, 0x90ec, 0x000f, 0x9de0, 0x1f33,
-	0x2c05, 0x2060, 0xa880, 0xc0fc, 0xa882, 0x0804, 0x2127, 0x2c05,
-	0x8422, 0x8420, 0x831a, 0x9399, 0x0000, 0xac2e, 0xab32, 0xdd9c,
-	0x1904, 0x20c4, 0x9082, 0x001b, 0x0002, 0x2060, 0x2060, 0x2062,
-	0x2060, 0x2060, 0x2060, 0x2070, 0x2060, 0x2060, 0x2060, 0x207e,
-	0x2060, 0x2060, 0x2060, 0x208c, 0x2060, 0x2060, 0x2060, 0x209a,
-	0x2060, 0x2060, 0x2060, 0x20a8, 0x2060, 0x2060, 0x2060, 0x20b6,
-	0x080c, 0x0db4, 0xa17c, 0x2400, 0x9122, 0xa180, 0x2300, 0x911b,
-	0x0a0c, 0x0db4, 0xa074, 0x9420, 0xa078, 0x9319, 0x0804, 0x2122,
-	0xa18c, 0x2400, 0x9122, 0xa190, 0x2300, 0x911b, 0x0a0c, 0x0db4,
-	0xa084, 0x9420, 0xa088, 0x9319, 0x0804, 0x2122, 0xa19c, 0x2400,
-	0x9122, 0xa1a0, 0x2300, 0x911b, 0x0a0c, 0x0db4, 0xa094, 0x9420,
-	0xa098, 0x9319, 0x0804, 0x2122, 0xa1ac, 0x2400, 0x9122, 0xa1b0,
-	0x2300, 0x911b, 0x0a0c, 0x0db4, 0xa0a4, 0x9420, 0xa0a8, 0x9319,
-	0x0804, 0x2122, 0xa1bc, 0x2400, 0x9122, 0xa1c0, 0x2300, 0x911b,
-	0x0a0c, 0x0db4, 0xa0b4, 0x9420, 0xa0b8, 0x9319, 0x0804, 0x2122,
-	0xa1cc, 0x2400, 0x9122, 0xa1d0, 0x2300, 0x911b, 0x0a0c, 0x0db4,
-	0xa0c4, 0x9420, 0xa0c8, 0x9319, 0x0804, 0x2122, 0xa1dc, 0x2400,
-	0x9122, 0xa1e0, 0x2300, 0x911b, 0x0a0c, 0x0db4, 0xa0d4, 0x9420,
-	0xa0d8, 0x9319, 0x0804, 0x2122, 0x9082, 0x001b, 0x0002, 0x20e2,
-	0x20e0, 0x20e0, 0x20e0, 0x20e0, 0x20e0, 0x20ef, 0x20e0, 0x20e0,
-	0x20e0, 0x20e0, 0x20e0, 0x20fc, 0x20e0, 0x20e0, 0x20e0, 0x20e0,
-	0x20e0, 0x2109, 0x20e0, 0x20e0, 0x20e0, 0x20e0, 0x20e0, 0x2116,
-	0x080c, 0x0db4, 0xa17c, 0x2400, 0x9122, 0xa180, 0x2300, 0x911b,
-	0x0a0c, 0x0db4, 0xa06c, 0x9420, 0xa070, 0x9319, 0x0498, 0xa194,
-	0x2400, 0x9122, 0xa198, 0x2300, 0x911b, 0x0a0c, 0x0db4, 0xa084,
-	0x9420, 0xa088, 0x9319, 0x0430, 0xa1ac, 0x2400, 0x9122, 0xa1b0,
-	0x2300, 0x911b, 0x0a0c, 0x0db4, 0xa09c, 0x9420, 0xa0a0, 0x9319,
-	0x00c8, 0xa1c4, 0x2400, 0x9122, 0xa1c8, 0x2300, 0x911b, 0x0a0c,
-	0x0db4, 0xa0b4, 0x9420, 0xa0b8, 0x9319, 0x0060, 0xa1dc, 0x2400,
-	0x9122, 0xa1e0, 0x2300, 0x911b, 0x0a0c, 0x0db4, 0xa0cc, 0x9420,
-	0xa0d0, 0x9319, 0xac1e, 0xab22, 0xa880, 0xc0fd, 0xa882, 0x2800,
-	0xa85a, 0x2c00, 0xa812, 0x2a00, 0xa816, 0x000e, 0x000e, 0x000e,
-	0x9006, 0x0028, 0x008e, 0x00de, 0x00ce, 0x9085, 0x0001, 0x0005,
-	0x2001, 0x0005, 0x2004, 0xd0bc, 0x190c, 0x0dad, 0x9084, 0x0007,
-	0x0002, 0x2153, 0x1d57, 0x2153, 0x2149, 0x214c, 0x214f, 0x214c,
-	0x214f, 0x080c, 0x1d57, 0x0005, 0x080c, 0x118f, 0x0005, 0x080c,
-	0x1d57, 0x080c, 0x118f, 0x0005, 0x0126, 0x2091, 0x2600, 0x2079,
-	0x0200, 0x2071, 0x0260, 0x2069, 0x1800, 0x7817, 0x0000, 0x789b,
-	0x0814, 0x78a3, 0x0406, 0x789f, 0x0410, 0x2009, 0x013b, 0x200b,
-	0x0400, 0x781b, 0x0002, 0x783b, 0x001f, 0x7837, 0x0020, 0x7803,
-	0x1600, 0x012e, 0x0005, 0x2091, 0x2600, 0x781c, 0xd0a4, 0x190c,
-	0x2272, 0x7900, 0xd1dc, 0x1118, 0x9084, 0x0006, 0x001a, 0x9084,
-	0x000e, 0x0002, 0x219a, 0x2192, 0x7945, 0x2192, 0x2194, 0x2194,
-	0x2194, 0x2194, 0x792b, 0x2192, 0x2196, 0x2192, 0x2194, 0x2192,
-	0x2194, 0x2192, 0x080c, 0x0db4, 0x0031, 0x0020, 0x080c, 0x792b,
-	0x080c, 0x7945, 0x0005, 0x0006, 0x0016, 0x0026, 0x080c, 0xd90f,
-	0x7930, 0x9184, 0x0003, 0x01c0, 0x2001, 0x19ce, 0x2004, 0x9005,
-	0x0170, 0x2001, 0x0133, 0x2004, 0x9005, 0x090c, 0x0db4, 0x00c6,
-	0x2001, 0x19ce, 0x2064, 0x080c, 0xb75c, 0x00ce, 0x00f8, 0x2009,
-	0x0040, 0x080c, 0x2275, 0x00d0, 0x9184, 0x0014, 0x01a0, 0x6a00,
-	0x9286, 0x0003, 0x0160, 0x080c, 0x6faa, 0x1138, 0x080c, 0x728c,
-	0x080c, 0x5ce5, 0x080c, 0x6edc, 0x0010, 0x080c, 0x5ba4, 0x080c,
-	0x79f4, 0x0041, 0x0018, 0x9184, 0x9540, 0x1dc8, 0x002e, 0x001e,
-	0x000e, 0x0005, 0x00e6, 0x0036, 0x0046, 0x0056, 0x2071, 0x1a3a,
-	0x080c, 0x196a, 0x005e, 0x004e, 0x003e, 0x00ee, 0x0005, 0x0126,
-	0x2091, 0x2e00, 0x2071, 0x1800, 0x7128, 0x2001, 0x1947, 0x2102,
-	0x2001, 0x194f, 0x2102, 0x2001, 0x013b, 0x2102, 0x2079, 0x0200,
-	0x2001, 0x0201, 0x789e, 0x78a3, 0x0200, 0x9198, 0x0007, 0x831c,
-	0x831c, 0x831c, 0x9398, 0x0005, 0x2320, 0x9182, 0x0204, 0x1230,
-	0x2011, 0x0008, 0x8423, 0x8423, 0x8423, 0x0488, 0x9182, 0x024c,
-	0x1240, 0x2011, 0x0007, 0x8403, 0x8003, 0x9400, 0x9400, 0x9420,
-	0x0430, 0x9182, 0x02bc, 0x1238, 0x2011, 0x0006, 0x8403, 0x8003,
-	0x9400, 0x9420, 0x00e0, 0x9182, 0x034c, 0x1230, 0x2011, 0x0005,
-	0x8403, 0x8003, 0x9420, 0x0098, 0x9182, 0x042c, 0x1228, 0x2011,
-	0x0004, 0x8423, 0x8423, 0x0058, 0x9182, 0x059c, 0x1228, 0x2011,
-	0x0003, 0x8403, 0x9420, 0x0018, 0x2011, 0x0002, 0x8423, 0x9482,
-	0x0228, 0x8002, 0x8020, 0x8301, 0x9402, 0x0110, 0x0208, 0x8321,
-	0x8217, 0x8203, 0x9405, 0x789a, 0x012e, 0x0005, 0x0006, 0x00d6,
-	0x2069, 0x0200, 0x6814, 0x9084, 0xffc0, 0x910d, 0x6916, 0x00de,
-	0x000e, 0x0005, 0x00d6, 0x2069, 0x0200, 0x9005, 0x6810, 0x0110,
-	0xc0a5, 0x0008, 0xc0a4, 0x6812, 0x00de, 0x0005, 0x0006, 0x00d6,
-	0x2069, 0x0200, 0x6810, 0x9084, 0xfff8, 0x910d, 0x6912, 0x00de,
-	0x000e, 0x0005, 0x7938, 0x080c, 0x0dad, 0x00f6, 0x2079, 0x0200,
-	0x7902, 0xa001, 0xa001, 0xa001, 0xa001, 0xa001, 0xa001, 0x7902,
-	0xa001, 0xa001, 0xa001, 0xa001, 0xa001, 0xa001, 0x00fe, 0x0005,
-	0x0126, 0x2091, 0x2800, 0x2061, 0x0100, 0x2071, 0x1800, 0x2009,
-	0x0000, 0x080c, 0x2a70, 0x080c, 0x298b, 0x6054, 0x8004, 0x8004,
-	0x8004, 0x8004, 0x9084, 0x000c, 0x6150, 0x918c, 0xfff3, 0x9105,
-	0x6052, 0x6050, 0x9084, 0xb17f, 0x9085, 0x2000, 0x6052, 0x2009,
-	0x1975, 0x2011, 0x1976, 0x6358, 0x939c, 0x38f0, 0x2320, 0x080c,
-	0x29cf, 0x1238, 0x939d, 0x4003, 0x94a5, 0x8603, 0x230a, 0x2412,
-	0x0030, 0x939d, 0x0203, 0x94a5, 0x8603, 0x230a, 0x2412, 0x9006,
-	0x080c, 0x29ba, 0x9006, 0x080c, 0x299d, 0x20a9, 0x0012, 0x1d04,
-	0x22c7, 0x2091, 0x6000, 0x1f04, 0x22c7, 0x602f, 0x0100, 0x602f,
-	0x0000, 0x6050, 0x9085, 0x0400, 0x9084, 0xdfff, 0x6052, 0x6024,
-	0x6026, 0x080c, 0x26a9, 0x2009, 0x00ef, 0x6132, 0x6136, 0x080c,
-	0x26b9, 0x60e7, 0x0000, 0x61ea, 0x60e3, 0x0002, 0x604b, 0xf7f7,
-	0x6043, 0x0000, 0x602f, 0x0080, 0x602f, 0x0000, 0x6007, 0x149f,
-	0x60bb, 0x0000, 0x20a9, 0x0018, 0x60bf, 0x0000, 0x1f04, 0x22f4,
-	0x60bb, 0x0000, 0x60bf, 0x0108, 0x60bf, 0x0012, 0x60bf, 0x0320,
-	0x60bf, 0x0018, 0x601b, 0x00f0, 0x601f, 0x001e, 0x600f, 0x006b,
-	0x602b, 0x402f, 0x012e, 0x0005, 0x00f6, 0x2079, 0x0140, 0x78c3,
-	0x0080, 0x78c3, 0x0083, 0x78c3, 0x0000, 0x00fe, 0x0005, 0x2001,
-	0x1834, 0x2003, 0x0000, 0x2001, 0x1833, 0x2003, 0x0001, 0x0005,
-	0x0126, 0x2091, 0x2800, 0x0006, 0x0016, 0x0026, 0x6124, 0x9184,
-	0x5e2c, 0x1118, 0x9184, 0x0007, 0x002a, 0x9195, 0x0004, 0x9284,
-	0x0007, 0x0002, 0x2354, 0x233a, 0x233d, 0x2340, 0x2345, 0x2347,
-	0x234b, 0x234f, 0x080c, 0x82e4, 0x00b8, 0x080c, 0x83b1, 0x00a0,
-	0x080c, 0x83b1, 0x080c, 0x82e4, 0x0078, 0x0099, 0x0068, 0x080c,
-	0x82e4, 0x0079, 0x0048, 0x080c, 0x83b1, 0x0059, 0x0028, 0x080c,
-	0x83b1, 0x080c, 0x82e4, 0x0029, 0x002e, 0x001e, 0x000e, 0x012e,
-	0x0005, 0x00a6, 0x6124, 0x6028, 0xd09c, 0x0118, 0xd19c, 0x1904,
-	0x25a2, 0xd1f4, 0x190c, 0x0dad, 0x080c, 0x6faa, 0x0904, 0x23af,
-	0x080c, 0xc23b, 0x1120, 0x7000, 0x9086, 0x0003, 0x0570, 0x6024,
-	0x9084, 0x1800, 0x0550, 0x080c, 0x6fcd, 0x0118, 0x080c, 0x6fbb,
-	0x1520, 0x6027, 0x0020, 0x6043, 0x0000, 0x080c, 0xc23b, 0x0168,
-	0x080c, 0x6fcd, 0x1150, 0x2001, 0x197f, 0x2003, 0x0001, 0x6027,
-	0x1800, 0x080c, 0x6e2b, 0x0804, 0x25a5, 0x70a0, 0x9005, 0x1150,
-	0x70a3, 0x0001, 0x00d6, 0x2069, 0x0140, 0x080c, 0x7001, 0x00de,
-	0x1904, 0x25a5, 0x080c, 0x7296, 0x0428, 0x080c, 0x6fcd, 0x1590,
-	0x6024, 0x9084, 0x1800, 0x1108, 0x0468, 0x080c, 0x7296, 0x080c,
-	0x728c, 0x080c, 0x5ce5, 0x080c, 0x6edc, 0x0804, 0x25a2, 0xd1ac,
-	0x1508, 0x6024, 0xd0dc, 0x1170, 0xd0e4, 0x1178, 0xd0d4, 0x1190,
-	0xd0cc, 0x0130, 0x7094, 0x9086, 0x0028, 0x1110, 0x080c, 0x717b,
-	0x0804, 0x25a2, 0x080c, 0x7291, 0x0048, 0x2001, 0x1955, 0x2003,
-	0x0002, 0x0020, 0x080c, 0x70e1, 0x0804, 0x25a2, 0x080c, 0x7215,
-	0x0804, 0x25a2, 0xd1ac, 0x0904, 0x24c3, 0x080c, 0x6faa, 0x11c0,
-	0x6027, 0x0020, 0x0006, 0x0026, 0x0036, 0x080c, 0x6fc4, 0x1158,
-	0x080c, 0x728c, 0x080c, 0x5ce5, 0x080c, 0x6edc, 0x003e, 0x002e,
-	0x000e, 0x00ae, 0x0005, 0x003e, 0x002e, 0x000e, 0x080c, 0x6f82,
-	0x0016, 0x0046, 0x00c6, 0x644c, 0x9486, 0xf0f0, 0x1138, 0x2061,
-	0x0100, 0x644a, 0x6043, 0x0090, 0x6043, 0x0010, 0x74d6, 0x948c,
-	0xff00, 0x7038, 0xd084, 0x0178, 0x9186, 0xf800, 0x1160, 0x7044,
-	0xd084, 0x1148, 0xc085, 0x7046, 0x0036, 0x2418, 0x2011, 0x8016,
-	0x080c, 0x48f4, 0x003e, 0x080c, 0xc234, 0x1904, 0x24a0, 0x9196,
-	0xff00, 0x05a8, 0x705c, 0x9084, 0x00ff, 0x810f, 0x81ff, 0x0110,
-	0x9116, 0x0568, 0x7130, 0xd184, 0x1550, 0x080c, 0x3140, 0x0128,
-	0xc18d, 0x7132, 0x080c, 0x6572, 0x1510, 0x6240, 0x9294, 0x0010,
-	0x0130, 0x6248, 0x9294, 0xff00, 0x9296, 0xff00, 0x01c0, 0x7030,
-	0xd08c, 0x0904, 0x24a0, 0x7038, 0xd08c, 0x1140, 0x2001, 0x180c,
-	0x200c, 0xd1ac, 0x1904, 0x24a0, 0xc1ad, 0x2102, 0x0036, 0x73d4,
-	0x2011, 0x8013, 0x080c, 0x48f4, 0x003e, 0x0804, 0x24a0, 0x7038,
-	0xd08c, 0x1140, 0x2001, 0x180c, 0x200c, 0xd1ac, 0x1904, 0x24a0,
-	0xc1ad, 0x2102, 0x0036, 0x73d4, 0x2011, 0x8013, 0x080c, 0x48f4,
-	0x003e, 0x7130, 0xc185, 0x7132, 0x2011, 0x185c, 0x220c, 0x00f0,
-	0x0016, 0x2009, 0x0001, 0x2011, 0x0100, 0x080c, 0x8236, 0x2019,
-	0x000e, 0x00c6, 0x2061, 0x0000, 0x080c, 0xd4e0, 0x00ce, 0x9484,
-	0x00ff, 0x9080, 0x3145, 0x200d, 0x918c, 0xff00, 0x810f, 0x2120,
-	0x9006, 0x2009, 0x000e, 0x080c, 0xd564, 0x001e, 0xd1ac, 0x1148,
-	0x0016, 0x2009, 0x0002, 0x2019, 0x0004, 0x080c, 0x2fb2, 0x001e,
-	0x0078, 0x0156, 0x00b6, 0x20a9, 0x007f, 0x900e, 0x080c, 0x6256,
-	0x1110, 0x080c, 0x5cff, 0x8108, 0x1f04, 0x2496, 0x00be, 0x015e,
-	0x00ce, 0x004e, 0x080c, 0x9db5, 0x60e3, 0x0000, 0x001e, 0x2001,
-	0x1800, 0x2014, 0x9296, 0x0004, 0x1170, 0xd19c, 0x11a0, 0x2011,
-	0x180c, 0x2214, 0xd29c, 0x1120, 0x6204, 0x9295, 0x0002, 0x6206,
-	0x6228, 0xc29d, 0x622a, 0x2003, 0x0001, 0x2001, 0x1825, 0x2003,
-	0x0000, 0x6027, 0x0020, 0xd194, 0x0904, 0x25a2, 0x0016, 0x6220,
-	0xd2b4, 0x0904, 0x254b, 0x080c, 0x80bf, 0x080c, 0x93c7, 0x6027,
-	0x0004, 0x00f6, 0x2019, 0x19c8, 0x2304, 0x907d, 0x0904, 0x251a,
-	0x7804, 0x9086, 0x0032, 0x15f0, 0x00d6, 0x00c6, 0x00e6, 0x0096,
-	0x2069, 0x0140, 0x782c, 0x685e, 0x7808, 0x685a, 0x6043, 0x0002,
-	0x2001, 0x0003, 0x8001, 0x1df0, 0x6043, 0x0000, 0x2001, 0x003c,
-	0x8001, 0x1df0, 0x080c, 0x2b31, 0x2001, 0x001e, 0x8001, 0x0240,
-	0x20a9, 0x0009, 0x080c, 0x2a4b, 0x6904, 0xd1dc, 0x1140, 0x0cb0,
-	0x2001, 0x0100, 0x080c, 0x2b21, 0x9006, 0x080c, 0x2b21, 0x080c,
-	0x887f, 0x080c, 0x898b, 0x7814, 0x2048, 0xa867, 0x0103, 0x2f60,
-	0x080c, 0x9e2f, 0x009e, 0x00ee, 0x00ce, 0x00de, 0x00fe, 0x001e,
-	0x00ae, 0x0005, 0x00fe, 0x00d6, 0x2069, 0x0140, 0x6804, 0x9084,
-	0x4000, 0x0110, 0x080c, 0x2b31, 0x00de, 0x00c6, 0x2061, 0x19bf,
-	0x6028, 0x080c, 0xc23b, 0x0120, 0x909a, 0x0003, 0x1258, 0x0018,
-	0x909a, 0x00c8, 0x1238, 0x8000, 0x602a, 0x00ce, 0x080c, 0x93a3,
-	0x0804, 0x25a1, 0x2061, 0x0100, 0x62c0, 0x080c, 0x9c3b, 0x2019,
-	0x19c8, 0x2304, 0x9065, 0x0120, 0x2009, 0x0027, 0x080c, 0x9ea9,
-	0x00ce, 0x0804, 0x25a1, 0xd2bc, 0x0904, 0x258e, 0x080c, 0x80cc,
-	0x6014, 0x9084, 0x1984, 0x9085, 0x0010, 0x6016, 0x6027, 0x0004,
-	0x00d6, 0x2069, 0x0140, 0x6804, 0x9084, 0x4000, 0x0110, 0x080c,
-	0x2b31, 0x00de, 0x00c6, 0x2061, 0x19bf, 0x6044, 0x080c, 0xc23b,
-	0x0120, 0x909a, 0x0003, 0x1628, 0x0018, 0x909a, 0x00c8, 0x1608,
-	0x8000, 0x6046, 0x603c, 0x00ce, 0x9005, 0x0558, 0x2009, 0x07d0,
-	0x080c, 0x80c4, 0x9080, 0x0008, 0x2004, 0x9086, 0x0006, 0x1138,
-	0x6114, 0x918c, 0x1984, 0x918d, 0x0012, 0x6116, 0x00d0, 0x6114,
-	0x918c, 0x1984, 0x918d, 0x0016, 0x6116, 0x0098, 0x6027, 0x0004,
-	0x0080, 0x0036, 0x2019, 0x0001, 0x080c, 0x96e9, 0x003e, 0x2019,
-	0x19ce, 0x2304, 0x9065, 0x0120, 0x2009, 0x004f, 0x080c, 0x9ea9,
-	0x00ce, 0x001e, 0xd19c, 0x0904, 0x2614, 0x7038, 0xd0ac, 0x1904,
-	0x25e9, 0x0016, 0x0156, 0x6027, 0x0008, 0x6050, 0x9085, 0x0040,
-	0x6052, 0x6050, 0x9084, 0xfbcf, 0x6052, 0x080c, 0x2a6a, 0x9085,
-	0x2000, 0x6052, 0x20a9, 0x0012, 0x1d04, 0x25bc, 0x080c, 0x80f3,
-	0x1f04, 0x25bc, 0x6050, 0x9085, 0x0400, 0x9084, 0xdfbf, 0x6052,
-	0x20a9, 0x0028, 0xa001, 0x1f04, 0x25ca, 0x6150, 0x9185, 0x1400,
-	0x6052, 0x20a9, 0x0366, 0x1d04, 0x25d3, 0x080c, 0x80f3, 0x6020,
-	0xd09c, 0x1130, 0x015e, 0x6152, 0x001e, 0x6027, 0x0008, 0x04a0,
-	0x080c, 0x2a32, 0x1f04, 0x25d3, 0x015e, 0x6152, 0x001e, 0x6027,
-	0x0008, 0x0016, 0x6028, 0xc09c, 0x602a, 0x080c, 0x9db5, 0x60e3,
-	0x0000, 0x080c, 0xd8ee, 0x080c, 0xd909, 0x080c, 0x539e, 0xd0fc,
-	0x1138, 0x080c, 0xc234, 0x1120, 0x9085, 0x0001, 0x080c, 0x6ff1,
-	0x9006, 0x080c, 0x2b21, 0x2009, 0x0002, 0x080c, 0x2a70, 0x00e6,
-	0x2071, 0x1800, 0x7003, 0x0004, 0x080c, 0x0e80, 0x00ee, 0x6027,
-	0x0008, 0x080c, 0x0b8f, 0x001e, 0x918c, 0xffd0, 0x6126, 0x00ae,
-	0x0005, 0x0006, 0x0016, 0x0026, 0x0036, 0x00e6, 0x00f6, 0x0126,
-	0x2091, 0x8000, 0x2071, 0x1800, 0x71cc, 0x70ce, 0x9116, 0x0904,
-	0x2668, 0x81ff, 0x01a0, 0x2009, 0x0000, 0x080c, 0x2a70, 0x2011,
-	0x8011, 0x2019, 0x010e, 0x231c, 0x939e, 0x0007, 0x1118, 0x2019,
-	0x0001, 0x0010, 0x2019, 0x0000, 0x080c, 0x48f4, 0x0448, 0x2001,
-	0x1980, 0x200c, 0x81ff, 0x1140, 0x2001, 0x0109, 0x2004, 0xd0b4,
-	0x0118, 0x2019, 0x0003, 0x0008, 0x2118, 0x2011, 0x8012, 0x080c,
-	0x48f4, 0x080c, 0x0e80, 0x080c, 0x539e, 0xd0fc, 0x1188, 0x080c,
-	0xc234, 0x1170, 0x00c6, 0x080c, 0x2704, 0x080c, 0x9650, 0x2061,
-	0x0100, 0x2019, 0x0028, 0x2009, 0x0002, 0x080c, 0x2fb2, 0x00ce,
-	0x012e, 0x00fe, 0x00ee, 0x003e, 0x002e, 0x001e, 0x000e, 0x0005,
-	0x2028, 0x918c, 0x00ff, 0x2130, 0x9094, 0xff00, 0x11f0, 0x2011,
-	0x1836, 0x2214, 0xd2ac, 0x11c8, 0x81ff, 0x01e8, 0x2011, 0x181e,
-	0x2204, 0x9106, 0x1190, 0x2011, 0x181f, 0x2214, 0x9294, 0xff00,
-	0x9584, 0xff00, 0x9206, 0x1148, 0x2011, 0x181f, 0x2214, 0x9294,
-	0x00ff, 0x9584, 0x00ff, 0x9206, 0x1120, 0x2500, 0x080c, 0x7c4e,
-	0x0048, 0x9584, 0x00ff, 0x9080, 0x3145, 0x200d, 0x918c, 0xff00,
-	0x810f, 0x9006, 0x0005, 0x9080, 0x3145, 0x200d, 0x918c, 0x00ff,
-	0x0005, 0x00d6, 0x2069, 0x0140, 0x2001, 0x1817, 0x2003, 0x00ef,
-	0x20a9, 0x0010, 0x9006, 0x6852, 0x6856, 0x1f04, 0x26b4, 0x00de,
-	0x0005, 0x0006, 0x00d6, 0x0026, 0x2069, 0x0140, 0x2001, 0x1817,
-	0x2102, 0x8114, 0x8214, 0x8214, 0x8214, 0x20a9, 0x0010, 0x6853,
-	0x0000, 0x9006, 0x82ff, 0x1128, 0x9184, 0x000f, 0x9080, 0xddc3,
-	0x2005, 0x6856, 0x8211, 0x1f04, 0x26c9, 0x002e, 0x00de, 0x000e,
-	0x0005, 0x00c6, 0x2061, 0x1800, 0x6030, 0x0110, 0xc09d, 0x0008,
-	0xc09c, 0x6032, 0x00ce, 0x0005, 0x0156, 0x00d6, 0x0026, 0x0016,
-	0x0006, 0x2069, 0x0140, 0x6980, 0x9116, 0x0180, 0x9112, 0x1230,
-	0x8212, 0x8210, 0x22a8, 0x2001, 0x0402, 0x0018, 0x22a8, 0x2001,
-	0x0404, 0x680e, 0x1f04, 0x26f9, 0x680f, 0x0000, 0x000e, 0x001e,
-	0x002e, 0x00de, 0x015e, 0x0005, 0x080c, 0x539a, 0xd0c4, 0x0150,
-	0xd0a4, 0x0140, 0x9006, 0x0046, 0x2020, 0x2009, 0x002e, 0x080c,
-	0xd564, 0x004e, 0x0005, 0x00f6, 0x0016, 0x0026, 0x2079, 0x0140,
-	0x78c4, 0xd0dc, 0x0904, 0x2770, 0x080c, 0x29cf, 0x0660, 0x9084,
-	0x0700, 0x908e, 0x0600, 0x1120, 0x2011, 0x4000, 0x900e, 0x0458,
-	0x908e, 0x0500, 0x1120, 0x2011, 0x8000, 0x900e, 0x0420, 0x908e,
-	0x0400, 0x1120, 0x9016, 0x2009, 0x0001, 0x00e8, 0x908e, 0x0300,
-	0x1120, 0x9016, 0x2009, 0x0002, 0x00b0, 0x908e, 0x0200, 0x1120,
-	0x9016, 0x2009, 0x0004, 0x0078, 0x908e, 0x0100, 0x1548, 0x9016,
-	0x2009, 0x0008, 0x0040, 0x9084, 0x0700, 0x908e, 0x0300, 0x1500,
-	0x2011, 0x0030, 0x0058, 0x2300, 0x9080, 0x0020, 0x2018, 0x080c,
-	0x8277, 0x928c, 0xff00, 0x0110, 0x2011, 0x00ff, 0x2200, 0x8007,
-	0x9085, 0x004c, 0x78c2, 0x2009, 0x0138, 0x220a, 0x080c, 0x6faa,
-	0x1118, 0x2009, 0x1945, 0x220a, 0x002e, 0x001e, 0x00fe, 0x0005,
-	0x78c3, 0x0000, 0x0cc8, 0x0126, 0x2091, 0x2800, 0x0006, 0x0016,
-	0x0026, 0x2001, 0x0170, 0x200c, 0x8000, 0x2014, 0x9184, 0x0003,
-	0x0110, 0x080c, 0x0dad, 0x002e, 0x001e, 0x000e, 0x012e, 0x0005,
-	0x2001, 0x0171, 0x2004, 0xd0dc, 0x0168, 0x2001, 0x0170, 0x200c,
-	0x918c, 0x00ff, 0x918e, 0x004c, 0x1128, 0x200c, 0x918c, 0xff00,
-	0x810f, 0x0005, 0x900e, 0x2001, 0x0227, 0x2004, 0x8007, 0x9084,
-	0x00ff, 0x8004, 0x9108, 0x2001, 0x0226, 0x2004, 0x8007, 0x9084,
-	0x00ff, 0x8004, 0x9108, 0x0005, 0x0018, 0x000c, 0x0018, 0x0020,
-	0x1000, 0x0800, 0x1000, 0x1800, 0x0156, 0x0006, 0x0016, 0x0026,
-	0x00e6, 0x2001, 0x1968, 0x2004, 0x908a, 0x0007, 0x1a0c, 0x0db4,
-	0x0033, 0x00ee, 0x002e, 0x001e, 0x000e, 0x015e, 0x0005, 0x27ce,
-	0x27ec, 0x2810, 0x2812, 0x283b, 0x283d, 0x283f, 0x2001, 0x0001,
-	0x080c, 0x2619, 0x080c, 0x2a2d, 0x2001, 0x196a, 0x2003, 0x0000,
-	0x7828, 0x9084, 0xe1d7, 0x782a, 0x9006, 0x20a9, 0x0009, 0x080c,
-	0x29eb, 0x2001, 0x1968, 0x2003, 0x0006, 0x2009, 0x001e, 0x2011,
-	0x2840, 0x080c, 0x80d1, 0x0005, 0x2009, 0x196d, 0x200b, 0x0000,
-	0x2001, 0x1972, 0x2003, 0x0036, 0x2001, 0x1971, 0x2003, 0x002a,
-	0x2001, 0x196a, 0x2003, 0x0001, 0x9006, 0x080c, 0x299d, 0x2001,
-	0xffff, 0x20a9, 0x0009, 0x080c, 0x29eb, 0x2001, 0x1968, 0x2003,
-	0x0006, 0x2009, 0x001e, 0x2011, 0x2840, 0x080c, 0x80d1, 0x0005,
-	0x080c, 0x0db4, 0x2001, 0x1972, 0x2003, 0x0036, 0x2001, 0x196a,
-	0x2003, 0x0003, 0x7a38, 0x9294, 0x0005, 0x9296, 0x0004, 0x0110,
-	0x9006, 0x0010, 0x2001, 0x0001, 0x080c, 0x299d, 0x2001, 0x196e,
-	0x2003, 0x0000, 0x2001, 0xffff, 0x20a9, 0x0009, 0x080c, 0x29eb,
-	0x2001, 0x1968, 0x2003, 0x0006, 0x2009, 0x001e, 0x2011, 0x2840,
-	0x080c, 0x80d1, 0x0005, 0x080c, 0x0db4, 0x080c, 0x0db4, 0x0005,
-	0x0006, 0x0016, 0x0026, 0x00e6, 0x00f6, 0x0156, 0x0126, 0x2091,
-	0x8000, 0x2079, 0x0100, 0x2001, 0x196a, 0x2004, 0x908a, 0x0007,
-	0x1a0c, 0x0db4, 0x0043, 0x012e, 0x015e, 0x00fe, 0x00ee, 0x002e,
-	0x001e, 0x000e, 0x0005, 0x2862, 0x2882, 0x28c2, 0x28f2, 0x2916,
-	0x2926, 0x2928, 0x080c, 0x29df, 0x11b0, 0x7850, 0x9084, 0xefff,
-	0x7852, 0x2009, 0x1970, 0x2104, 0x7a38, 0x9294, 0x0005, 0x9296,
-	0x0004, 0x0110, 0xc08d, 0x0008, 0xc085, 0x200a, 0x2001, 0x1968,
-	0x2003, 0x0001, 0x0030, 0x080c, 0x294c, 0x2001, 0xffff, 0x080c,
-	0x27dd, 0x0005, 0x080c, 0x292a, 0x05e0, 0x2009, 0x1971, 0x2104,
-	0x8001, 0x200a, 0x080c, 0x29df, 0x1178, 0x7850, 0x9084, 0xefff,
-	0x7852, 0x7a38, 0x9294, 0x0005, 0x9296, 0x0005, 0x0518, 0x2009,
-	0x1970, 0x2104, 0xc085, 0x200a, 0x2009, 0x196d, 0x2104, 0x8000,
-	0x200a, 0x9086, 0x0005, 0x0118, 0x080c, 0x2932, 0x00c0, 0x200b,
-	0x0000, 0x7a38, 0x9294, 0x0006, 0x9296, 0x0004, 0x0110, 0x9006,
-	0x0010, 0x2001, 0x0001, 0x080c, 0x29ba, 0x2001, 0x196a, 0x2003,
-	0x0002, 0x0028, 0x2001, 0x1968, 0x2003, 0x0003, 0x0010, 0x080c,
-	0x27ff, 0x0005, 0x080c, 0x292a, 0x0560, 0x2009, 0x1971, 0x2104,
-	0x8001, 0x200a, 0x080c, 0x29df, 0x1168, 0x7850, 0x9084, 0xefff,
-	0x7852, 0x2001, 0x1968, 0x2003, 0x0003, 0x2001, 0x1969, 0x2003,
-	0x0000, 0x00b8, 0x2009, 0x1971, 0x2104, 0x9005, 0x1118, 0x080c,
-	0x296f, 0x0010, 0x080c, 0x293f, 0x080c, 0x2932, 0x2009, 0x196d,
-	0x200b, 0x0000, 0x2001, 0x196a, 0x2003, 0x0001, 0x080c, 0x27ff,
-	0x0000, 0x0005, 0x04b9, 0x0508, 0x080c, 0x29df, 0x11b8, 0x7850,
-	0x9084, 0xefff, 0x7852, 0x2009, 0x196e, 0x2104, 0x8000, 0x200a,
-	0x9086, 0x0007, 0x0108, 0x0078, 0x2001, 0x1973, 0x2003, 0x000a,
-	0x2009, 0x1970, 0x2104, 0xc0fd, 0x200a, 0x0038, 0x0419, 0x2001,
-	0x196a, 0x2003, 0x0004, 0x080c, 0x282a, 0x0005, 0x0099, 0x0168,
-	0x080c, 0x29df, 0x1138, 0x7850, 0x9084, 0xefff, 0x7852, 0x080c,
-	0x2816, 0x0018, 0x0079, 0x080c, 0x282a, 0x0005, 0x080c, 0x0db4,
-	0x080c, 0x0db4, 0x2009, 0x1972, 0x2104, 0x8001, 0x200a, 0x090c,
-	0x298b, 0x0005, 0x7a38, 0x9294, 0x0005, 0x9296, 0x0005, 0x0110,
-	0x9006, 0x0010, 0x2001, 0x0001, 0x080c, 0x29ba, 0x0005, 0x7a38,
-	0x9294, 0x0006, 0x9296, 0x0006, 0x0110, 0x9006, 0x0010, 0x2001,
-	0x0001, 0x080c, 0x299d, 0x0005, 0x2009, 0x196d, 0x2104, 0x8000,
-	0x200a, 0x9086, 0x0005, 0x0108, 0x0068, 0x200b, 0x0000, 0x7a38,
-	0x9294, 0x0006, 0x9296, 0x0006, 0x0110, 0x9006, 0x0010, 0x2001,
-	0x0001, 0x04d9, 0x7a38, 0x9294, 0x0005, 0x9296, 0x0005, 0x0110,
-	0x9006, 0x0010, 0x2001, 0x0001, 0x080c, 0x29ba, 0x0005, 0x0086,
-	0x2001, 0x1970, 0x2004, 0x9084, 0x7fff, 0x090c, 0x0db4, 0x2009,
-	0x196f, 0x2144, 0x8846, 0x280a, 0x9844, 0x0dd8, 0xd08c, 0x1120,
-	0xd084, 0x1120, 0x080c, 0x0db4, 0x9006, 0x0010, 0x2001, 0x0001,
-	0x00a1, 0x008e, 0x0005, 0x0006, 0x0156, 0x2001, 0x1968, 0x20a9,
-	0x0009, 0x2003, 0x0000, 0x8000, 0x1f04, 0x2991, 0x2001, 0x196f,
-	0x2003, 0x8000, 0x015e, 0x000e, 0x0005, 0x00f6, 0x2079, 0x0100,
-	0x9085, 0x0000, 0x0158, 0x7838, 0x9084, 0xfff9, 0x9085, 0x0004,
-	0x783a, 0x2009, 0x1975, 0x210c, 0x795a, 0x0050, 0x7838, 0x9084,
-	0xfffb, 0x9085, 0x0006, 0x783a, 0x2009, 0x1976, 0x210c, 0x795a,
-	0x00fe, 0x0005, 0x00f6, 0x2079, 0x0100, 0x9085, 0x0000, 0x0138,
-	0x7838, 0x9084, 0xfffa, 0x9085, 0x0004, 0x783a, 0x0030, 0x7838,
-	0x9084, 0xfffb, 0x9085, 0x0005, 0x783a, 0x00fe, 0x0005, 0x0006,
-	0x2001, 0x0100, 0x2004, 0x9082, 0x0007, 0x000e, 0x0005, 0x0006,
-	0x2001, 0x0100, 0x2004, 0x9082, 0x0009, 0x000e, 0x0005, 0x0156,
-	0x20a9, 0x0064, 0x7820, 0x080c, 0x2a6a, 0xd09c, 0x1110, 0x1f04,
-	0x29e2, 0x015e, 0x0005, 0x0126, 0x0016, 0x0006, 0x2091, 0x8000,
-	0x7850, 0x9085, 0x0040, 0x7852, 0x7850, 0x9084, 0xfbcf, 0x7852,
-	0x080c, 0x2a6a, 0x9085, 0x2000, 0x7852, 0x000e, 0x2008, 0x9186,
-	0x0000, 0x1118, 0x783b, 0x0007, 0x0090, 0x9186, 0x0001, 0x1118,
-	0x783b, 0x0006, 0x0060, 0x9186, 0x0002, 0x1118, 0x783b, 0x0005,
-	0x0030, 0x9186, 0x0003, 0x1118, 0x783b, 0x0004, 0x0000, 0x0006,
-	0x1d04, 0x2a18, 0x080c, 0x80f3, 0x1f04, 0x2a18, 0x7850, 0x9085,
-	0x0400, 0x9084, 0xdfbf, 0x7852, 0x080c, 0x2a6a, 0x9085, 0x1000,
-	0x7852, 0x000e, 0x001e, 0x012e, 0x0005, 0x7850, 0x9084, 0xffcf,
-	0x7852, 0x0005, 0x0006, 0x0156, 0x00f6, 0x2079, 0x0100, 0x20a9,
-	0x000a, 0x7854, 0xd0ac, 0x1130, 0x7820, 0xd0e4, 0x1140, 0x1f04,
-	0x2a3c, 0x0028, 0x7854, 0xd08c, 0x1110, 0x1f04, 0x2a42, 0x00fe,
-	0x015e, 0x000e, 0x0005, 0x1d04, 0x2a4b, 0x080c, 0x80f3, 0x1f04,
-	0x2a4b, 0x0005, 0x0006, 0x2001, 0x1974, 0x2004, 0x9086, 0x0000,
-	0x000e, 0x0005, 0x0006, 0x2001, 0x1974, 0x2004, 0x9086, 0x0001,
-	0x000e, 0x0005, 0x0006, 0x2001, 0x1974, 0x2004, 0x9086, 0x0002,
-	0x000e, 0x0005, 0xa001, 0xa001, 0xa001, 0xa001, 0xa001, 0x0005,
-	0x0006, 0x2001, 0x1980, 0x2102, 0x000e, 0x0005, 0x2009, 0x0171,
-	0x2104, 0xd0dc, 0x0140, 0x2009, 0x0170, 0x2104, 0x200b, 0x0080,
-	0xa001, 0xa001, 0x200a, 0x0005, 0x0036, 0x0046, 0x2001, 0x0141,
-	0x200c, 0x918c, 0xff00, 0x9186, 0x2000, 0x0118, 0x9186, 0x0100,
-	0x1588, 0x2009, 0x00a2, 0x080c, 0x0e2f, 0x2019, 0x0160, 0x2324,
-	0x2011, 0x0003, 0x2009, 0x0169, 0x2104, 0x9084, 0x0007, 0x210c,
-	0x918c, 0x0007, 0x910e, 0x1db0, 0x9086, 0x0003, 0x11b8, 0x2304,
-	0x9402, 0x02a0, 0x1d60, 0x8211, 0x1d68, 0x84ff, 0x0170, 0x2001,
-	0x0141, 0x200c, 0x918c, 0xff00, 0x9186, 0x0100, 0x0130, 0x2009,
-	0x180c, 0x2104, 0xc0dd, 0x200a, 0x0008, 0x0419, 0x2009, 0x0000,
-	0x080c, 0x0e2f, 0x004e, 0x003e, 0x0005, 0x2001, 0x180c, 0x2004,
-	0xd0dc, 0x01b0, 0x2001, 0x0160, 0x2004, 0x9005, 0x0140, 0x2001,
-	0x0141, 0x2004, 0x9084, 0xff00, 0x9086, 0x0100, 0x1148, 0x0126,
-	0x2091, 0x8000, 0x0016, 0x0026, 0x0021, 0x002e, 0x001e, 0x012e,
-	0x0005, 0x00c6, 0x2061, 0x0100, 0x6014, 0x0006, 0x2001, 0x0161,
-	0x2003, 0x0000, 0x6017, 0x0018, 0xa001, 0xa001, 0x602f, 0x0008,
-	0x6104, 0x918e, 0x0010, 0x6106, 0x918e, 0x0010, 0x6106, 0x6017,
-	0x0040, 0x04b9, 0x001e, 0x9184, 0x0003, 0x01e0, 0x0036, 0x0016,
-	0x2019, 0x0141, 0x6124, 0x918c, 0x0028, 0x1120, 0x2304, 0x9084,
-	0x2800, 0x0dc0, 0x001e, 0x919c, 0xffe4, 0x9184, 0x0001, 0x0118,
-	0x9385, 0x0009, 0x6016, 0x9184, 0x0002, 0x0118, 0x9385, 0x0012,
-	0x6016, 0x003e, 0x2001, 0x180c, 0x200c, 0xc1dc, 0x2102, 0x00ce,
-	0x0005, 0x0016, 0x0026, 0x080c, 0x6fc4, 0x0108, 0xc0bc, 0x2009,
-	0x0140, 0x2114, 0x9294, 0x0001, 0x9215, 0x220a, 0x002e, 0x001e,
-	0x0005, 0x0016, 0x0026, 0x2009, 0x0140, 0x2114, 0x9294, 0x0001,
-	0x9285, 0x1000, 0x200a, 0x220a, 0x002e, 0x001e, 0x0005, 0x0016,
-	0x0026, 0x2009, 0x0140, 0x2114, 0x9294, 0x0001, 0x9215, 0x220a,
-	0x002e, 0x001e, 0x0005, 0x0006, 0x0016, 0x2009, 0x0140, 0x2104,
-	0x1128, 0x080c, 0x6fc4, 0x0110, 0xc0bc, 0x0008, 0xc0bd, 0x200a,
-	0x001e, 0x000e, 0x0005, 0x2dc7, 0x2dc7, 0x2beb, 0x2beb, 0x2bf7,
-	0x2bf7, 0x2c03, 0x2c03, 0x2c11, 0x2c11, 0x2c1d, 0x2c1d, 0x2c2b,
-	0x2c2b, 0x2c39, 0x2c39, 0x2c4b, 0x2c4b, 0x2c57, 0x2c57, 0x2c65,
-	0x2c65, 0x2c83, 0x2c83, 0x2ca3, 0x2ca3, 0x2c73, 0x2c73, 0x2c93,
-	0x2c93, 0x2cb1, 0x2cb1, 0x2c49, 0x2c49, 0x2c49, 0x2c49, 0x2c49,
-	0x2c49, 0x2c49, 0x2c49, 0x2c49, 0x2c49, 0x2c49, 0x2c49, 0x2c49,
-	0x2c49, 0x2c49, 0x2c49, 0x2c49, 0x2c49, 0x2c49, 0x2c49, 0x2c49,
-	0x2c49, 0x2c49, 0x2c49, 0x2c49, 0x2c49, 0x2c49, 0x2c49, 0x2c49,
-	0x2c49, 0x2c49, 0x2c49, 0x2cc3, 0x2cc3, 0x2ccf, 0x2ccf, 0x2cdd,
-	0x2cdd, 0x2ceb, 0x2ceb, 0x2cfb, 0x2cfb, 0x2d09, 0x2d09, 0x2d19,
-	0x2d19, 0x2d29, 0x2d29, 0x2d3b, 0x2d3b, 0x2d49, 0x2d49, 0x2d59,
-	0x2d59, 0x2d7b, 0x2d7b, 0x2d9d, 0x2d9d, 0x2d69, 0x2d69, 0x2d8c,
-	0x2d8c, 0x2dac, 0x2dac, 0x2c49, 0x2c49, 0x2c49, 0x2c49, 0x2c49,
-	0x2c49, 0x2c49, 0x2c49, 0x2c49, 0x2c49, 0x2c49, 0x2c49, 0x2c49,
-	0x2c49, 0x2c49, 0x2c49, 0x2c49, 0x2c49, 0x2c49, 0x2c49, 0x2c49,
-	0x2c49, 0x2c49, 0x2c49, 0x2c49, 0x2c49, 0x2c49, 0x2c49, 0x2c49,
-	0x2c49, 0x2c49, 0x2c49, 0x2c49, 0x2c49, 0x2c49, 0x2c49, 0x2c49,
-	0x2c49, 0x2c49, 0x2c49, 0x2c49, 0x2c49, 0x2c49, 0x2c49, 0x2c49,
-	0x2c49, 0x2c49, 0x2c49, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x2320, 0x0804, 0x2dbf, 0x0106,
+	0x2001, 0x0100, 0x2004, 0x9086, 0x000a, 0x0120, 0x7850, 0x9085,
+	0x0400, 0x7852, 0x2001, 0x197f, 0x2003, 0x0000, 0x9006, 0x78f2,
+	0x015e, 0x003e, 0x000e, 0x012e, 0x00fe, 0x004e, 0x001e, 0x0005,
+	0x0006, 0x0016, 0x0036, 0x0046, 0x00b6, 0x00c6, 0x00d6, 0x00e6,
+	0x00f6, 0x0156, 0x0069, 0x0d0c, 0x838e, 0x015e, 0x00fe, 0x00ee,
+	0x00de, 0x00ce, 0x00be, 0x004e, 0x003e, 0x001e, 0x000e, 0x0005,
+	0x00e6, 0x2071, 0x189c, 0x7004, 0x9086, 0x0001, 0x1110, 0x080c,
+	0x3410, 0x00ee, 0x0005, 0x0005, 0x2a70, 0x2061, 0x1983, 0x2063,
+	0x0003, 0x6007, 0x0003, 0x600b, 0x0008, 0x600f, 0x0317, 0x2001,
+	0x1954, 0x900e, 0x2102, 0x7192, 0x2001, 0x0100, 0x2004, 0x9082,
+	0x0002, 0x0218, 0x705b, 0xffff, 0x0008, 0x715a, 0x7063, 0xffff,
+	0x717a, 0x717e, 0x080c, 0xc28a, 0x70e7, 0x00c0, 0x2061, 0x1944,
+	0x6003, 0x0909, 0x6106, 0x600b, 0x8800, 0x600f, 0x0200, 0x6013,
+	0x00ff, 0x6017, 0x000f, 0x611a, 0x601f, 0x07d0, 0x2061, 0x194c,
+	0x6003, 0x8000, 0x6106, 0x610a, 0x600f, 0x0200, 0x6013, 0x00ff,
+	0x6116, 0x601b, 0x0001, 0x611e, 0x2061, 0x1961, 0x6003, 0x514c,
+	0x6007, 0x4f47, 0x600b, 0x4943, 0x600f, 0x2020, 0x2001, 0x182b,
+	0x2102, 0x0005, 0x9016, 0x080c, 0x649f, 0x1178, 0xb804, 0x90c4,
+	0x00ff, 0x98c6, 0x0006, 0x0128, 0x90c4, 0xff00, 0x98c6, 0x0600,
+	0x1120, 0x9186, 0x0080, 0x0108, 0x8210, 0x8108, 0x9186, 0x0800,
+	0x1d50, 0x2208, 0x0005, 0x2091, 0x8000, 0x2079, 0x0000, 0x000e,
+	0x00f6, 0x0010, 0x2091, 0x8000, 0x0e04, 0x0dfc, 0x0006, 0x0016,
+	0x2001, 0x8002, 0x0006, 0x2079, 0x0000, 0x000e, 0x7882, 0x7836,
+	0x001e, 0x798e, 0x000e, 0x788a, 0x000e, 0x7886, 0x3900, 0x789a,
+	0x7833, 0x0012, 0x2091, 0x5000, 0x0156, 0x00d6, 0x0036, 0x0026,
+	0x2079, 0x0300, 0x2069, 0x1a7c, 0x7a08, 0x226a, 0x2069, 0x1a7d,
+	0x7a18, 0x226a, 0x8d68, 0x7a1c, 0x226a, 0x782c, 0x2019, 0x1a8a,
+	0x201a, 0x2019, 0x1a8d, 0x9016, 0x7808, 0xd09c, 0x0168, 0x7820,
+	0x201a, 0x8210, 0x8318, 0x9386, 0x1aa2, 0x0108, 0x0ca8, 0x7808,
+	0xd09c, 0x0110, 0x2011, 0xdead, 0x2019, 0x1a8b, 0x782c, 0x201a,
+	0x8318, 0x221a, 0x7803, 0x0000, 0x2069, 0x1a5c, 0x901e, 0x20a9,
+	0x0020, 0x7b26, 0x7a28, 0x226a, 0x8d68, 0x8318, 0x1f04, 0x0e49,
+	0x002e, 0x003e, 0x00de, 0x015e, 0x2079, 0x1800, 0x7803, 0x0005,
+	0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x0180, 0x2001,
+	0x19f1, 0x2004, 0x9005, 0x0128, 0x2001, 0x008b, 0x2004, 0xd0fc,
+	0x0dd8, 0x2001, 0x008a, 0x2003, 0x0002, 0x2003, 0x1001, 0x080c,
+	0x55ea, 0x1108, 0x0099, 0x0cd8, 0x0005, 0x918c, 0x03ff, 0x2001,
+	0x0003, 0x2004, 0x9084, 0x0600, 0x1118, 0x918d, 0x6c00, 0x0010,
+	0x918d, 0x6400, 0x2001, 0x017f, 0x2102, 0x0005, 0x0026, 0x0126,
+	0x2011, 0x0080, 0x080c, 0x0f11, 0x20a9, 0x0900, 0x080c, 0x0f32,
+	0x2011, 0x0040, 0x080c, 0x0f11, 0x20a9, 0x0900, 0x080c, 0x0f32,
+	0x0c78, 0x0026, 0x080c, 0x0f1e, 0x1118, 0x2011, 0x0040, 0x0098,
+	0x2011, 0x010e, 0x2214, 0x9294, 0x0007, 0x9296, 0x0007, 0x0118,
+	0x2011, 0xa880, 0x0010, 0x2011, 0x6840, 0xd0e4, 0x70eb, 0x0000,
+	0x1120, 0x70eb, 0x0fa0, 0x080c, 0x0f23, 0x002e, 0x0005, 0x0026,
+	0x080c, 0x0f1e, 0x0128, 0xd0a4, 0x1138, 0x2011, 0xcdd5, 0x0010,
+	0x2011, 0x0080, 0x080c, 0x0f23, 0x002e, 0x0005, 0x0026, 0x70eb,
+	0x0000, 0x080c, 0x0f1e, 0x1148, 0x080c, 0x2ba8, 0x1118, 0x2011,
+	0x8484, 0x0058, 0x2011, 0x8282, 0x0040, 0x080c, 0x2ba8, 0x1118,
+	0x2011, 0xcdc5, 0x0010, 0x2011, 0xcac2, 0x080c, 0x0f23, 0x002e,
+	0x0005, 0x00e6, 0x0006, 0x2071, 0x1800, 0xd0b4, 0x70e4, 0x1110,
+	0xc0e4, 0x0048, 0x0006, 0x3b00, 0x9084, 0xff3f, 0x20d8, 0x000e,
+	0x70eb, 0x0000, 0xc0e5, 0x0079, 0x000e, 0x00ee, 0x0005, 0x00e6,
+	0x2071, 0x1800, 0xd0e4, 0x70e4, 0x1110, 0xc0dc, 0x0008, 0xc0dd,
+	0x0011, 0x00ee, 0x0005, 0x70e6, 0x7000, 0x9084, 0x0007, 0x000b,
+	0x0005, 0x0ee0, 0x0eb7, 0x0eb7, 0x0e99, 0x0ec6, 0x0eb7, 0x0eb7,
+	0x0ec6, 0x0016, 0x3b08, 0x3a00, 0x9104, 0x918d, 0x00c0, 0x21d8,
+	0x9084, 0xff3f, 0x9205, 0x20d0, 0x001e, 0x0005, 0x2001, 0x1839,
+	0x2004, 0xd0dc, 0x0005, 0x9e86, 0x1800, 0x190c, 0x0dfa, 0x70e4,
+	0xd0e4, 0x0108, 0xc2e5, 0x72e6, 0xd0e4, 0x1118, 0x9294, 0x00c0,
+	0x0c01, 0x0005, 0x1d04, 0x0f32, 0x2091, 0x6000, 0x1f04, 0x0f32,
+	0x0005, 0x890e, 0x810e, 0x810f, 0x9194, 0x003f, 0x918c, 0xffc0,
+	0x0005, 0x0006, 0x2200, 0x914d, 0x894f, 0x894d, 0x894d, 0x000e,
+	0x0005, 0x01d6, 0x0146, 0x0036, 0x0096, 0x2061, 0x188b, 0x600b,
+	0x0000, 0x600f, 0x0000, 0x6003, 0x0000, 0x6007, 0x0000, 0x2009,
+	0xffc0, 0x2105, 0x0006, 0x2001, 0xaaaa, 0x200f, 0x2019, 0x5555,
+	0x9016, 0x2049, 0x0bff, 0xab02, 0xa001, 0xa001, 0xa800, 0x9306,
+	0x1138, 0x2105, 0x9306, 0x0120, 0x8210, 0x99c8, 0x0400, 0x0c98,
+	0x000e, 0x200f, 0x2001, 0x189b, 0x928a, 0x000e, 0x1638, 0x928a,
+	0x0006, 0x2011, 0x0006, 0x1210, 0x2011, 0x0000, 0x2202, 0x9006,
+	0x2008, 0x82ff, 0x01b0, 0x8200, 0x600a, 0x600f, 0xffff, 0x6003,
+	0x0002, 0x6007, 0x0000, 0x0026, 0x2019, 0x0010, 0x9280, 0x0001,
+	0x20e8, 0x21a0, 0x21a8, 0x4104, 0x8319, 0x1de0, 0x8211, 0x1da0,
+	0x002e, 0x009e, 0x003e, 0x014e, 0x01de, 0x0005, 0x2011, 0x000e,
+	0x08e8, 0x0016, 0x0026, 0x0096, 0x3348, 0x080c, 0x0f39, 0x2100,
+	0x9300, 0x2098, 0x22e0, 0x009e, 0x002e, 0x001e, 0x0036, 0x3518,
+	0x20a9, 0x0001, 0x4002, 0x8007, 0x4004, 0x8319, 0x1dd8, 0x003e,
+	0x0005, 0x20e9, 0x0001, 0x71b4, 0x81ff, 0x11c0, 0x9006, 0x2009,
+	0x0200, 0x20a9, 0x0002, 0x9298, 0x0018, 0x23a0, 0x4001, 0x2009,
+	0x0700, 0x20a9, 0x0002, 0x9298, 0x0008, 0x23a0, 0x4001, 0x7078,
+	0x8007, 0x717c, 0x810f, 0x20a9, 0x0002, 0x4001, 0x9298, 0x000c,
+	0x23a0, 0x900e, 0x080c, 0x0dda, 0x2001, 0x0000, 0x810f, 0x20a9,
+	0x0002, 0x4001, 0x0005, 0x89ff, 0x0140, 0xa804, 0xa807, 0x0000,
+	0x0006, 0x080c, 0x1063, 0x009e, 0x0cb0, 0x0005, 0x00e6, 0x2071,
+	0x1800, 0x080c, 0x10dc, 0x090c, 0x0dfa, 0x00ee, 0x0005, 0x0086,
+	0x00e6, 0x0006, 0x0026, 0x0036, 0x0126, 0x2091, 0x8000, 0x00c9,
+	0x2071, 0x1800, 0x73bc, 0x702c, 0x9016, 0x9045, 0x0158, 0x8210,
+	0x9906, 0x090c, 0x0dfa, 0x2300, 0x9202, 0x0120, 0x1a0c, 0x0dfa,
+	0xa000, 0x0c98, 0x012e, 0x003e, 0x002e, 0x000e, 0x00ee, 0x008e,
+	0x0005, 0x0086, 0x00e6, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071,
+	0x190e, 0x7010, 0x9005, 0x0140, 0x7018, 0x9045, 0x0128, 0x9906,
+	0x090c, 0x0dfa, 0xa000, 0x0cc8, 0x012e, 0x000e, 0x00ee, 0x008e,
+	0x0005, 0x00e6, 0x2071, 0x1800, 0x0126, 0x2091, 0x8000, 0x70bc,
+	0x8001, 0x0270, 0x70be, 0x702c, 0x2048, 0x9085, 0x0001, 0xa800,
+	0x702e, 0xa803, 0x0000, 0xa807, 0x0000, 0x012e, 0x00ee, 0x0005,
+	0x904e, 0x0cd8, 0x00e6, 0x0126, 0x2091, 0x8000, 0x2071, 0x1800,
+	0x70bc, 0x90ca, 0x0040, 0x0268, 0x8001, 0x70be, 0x702c, 0x2048,
+	0xa800, 0x702e, 0xa803, 0x0000, 0xa807, 0x0000, 0x012e, 0x00ee,
+	0x0005, 0x904e, 0x0cd8, 0x00e6, 0x0126, 0x2091, 0x8000, 0x0016,
+	0x890e, 0x810e, 0x810f, 0x9184, 0x003f, 0xa862, 0x9184, 0xffc0,
+	0xa85e, 0x001e, 0x0020, 0x00e6, 0x0126, 0x2091, 0x8000, 0x2071,
+	0x1800, 0x702c, 0xa802, 0x2900, 0x702e, 0x70bc, 0x8000, 0x70be,
+	0x080c, 0x81f0, 0x012e, 0x00ee, 0x0005, 0x2071, 0x1800, 0x9026,
+	0x2009, 0x0000, 0x2049, 0x0400, 0x2900, 0x702e, 0x8940, 0x2800,
+	0xa802, 0xa95e, 0xa863, 0x0001, 0x8420, 0x9886, 0x0440, 0x0120,
+	0x2848, 0x9188, 0x0040, 0x0c90, 0x2071, 0x188b, 0x7000, 0x9005,
+	0x11a0, 0x2001, 0x0492, 0xa802, 0x2048, 0x2009, 0x2480, 0x8940,
+	0x2800, 0xa802, 0xa95e, 0xa863, 0x0001, 0x8420, 0x9886, 0x0800,
+	0x0120, 0x2848, 0x9188, 0x0040, 0x0c90, 0x2071, 0x188b, 0x7104,
+	0x7200, 0x82ff, 0x01d0, 0x7308, 0x8318, 0x831f, 0x831b, 0x831b,
+	0x7312, 0x8319, 0x2001, 0x0800, 0xa802, 0x2048, 0x8900, 0xa802,
+	0x2040, 0xa95e, 0xaa62, 0x8420, 0x2300, 0x9906, 0x0130, 0x2848,
+	0x9188, 0x0040, 0x9291, 0x0000, 0x0c88, 0xa803, 0x0000, 0x2071,
+	0x1800, 0x74ba, 0x74be, 0x0005, 0x00e6, 0x0016, 0x9984, 0xfc00,
+	0x01e8, 0x908c, 0xf800, 0x1168, 0x9982, 0x0400, 0x02b8, 0x9982,
+	0x0440, 0x0278, 0x9982, 0x0492, 0x0288, 0x9982, 0x0800, 0x1270,
+	0x0040, 0x9982, 0x0800, 0x0250, 0x2071, 0x188b, 0x7010, 0x9902,
+	0x1228, 0x9085, 0x0001, 0x001e, 0x00ee, 0x0005, 0x9006, 0x0cd8,
+	0x00e6, 0x2071, 0x19f0, 0x7007, 0x0000, 0x9006, 0x701e, 0x7022,
+	0x7002, 0x2071, 0x0000, 0x7010, 0x9085, 0x8044, 0x7012, 0x2071,
+	0x0080, 0x9006, 0x0006, 0x2001, 0x0100, 0x2004, 0x9086, 0x000a,
+	0x000e, 0x1158, 0x702b, 0x0060, 0x20a9, 0x0040, 0x7022, 0x1f04,
+	0x111e, 0x702b, 0x0060, 0x702b, 0x0020, 0x20a9, 0x0040, 0x7022,
+	0x1f04, 0x1127, 0x702b, 0x0020, 0x00ee, 0x0005, 0x0126, 0x2091,
+	0x8000, 0x00e6, 0xa06f, 0x0000, 0x2071, 0x19f0, 0x701c, 0x9088,
+	0x19fa, 0x280a, 0x8000, 0x9084, 0x003f, 0x701e, 0x7120, 0x9106,
+	0x090c, 0x0dfa, 0x7004, 0x9005, 0x1128, 0x00f6, 0x2079, 0x0080,
+	0x00a9, 0x00fe, 0x00ee, 0x012e, 0x0005, 0x0126, 0x2091, 0x8000,
+	0x00e6, 0x2071, 0x19f0, 0x7004, 0x9005, 0x1128, 0x00f6, 0x2079,
+	0x0080, 0x0021, 0x00fe, 0x00ee, 0x012e, 0x0005, 0x7004, 0x9086,
+	0x0000, 0x1110, 0x7007, 0x0006, 0x7000, 0x0002, 0x1170, 0x116e,
+	0x116e, 0x116e, 0x12e7, 0x12e7, 0x12e7, 0x12e7, 0x080c, 0x0dfa,
+	0x701c, 0x7120, 0x9106, 0x1148, 0x792c, 0x9184, 0x0001, 0x1120,
+	0xd1fc, 0x1110, 0x7007, 0x0000, 0x0005, 0x0096, 0x9180, 0x19fa,
+	0x2004, 0x700a, 0x2048, 0x8108, 0x918c, 0x003f, 0x7122, 0x782b,
+	0x0026, 0xa88c, 0x7802, 0xa890, 0x7806, 0xa894, 0x780a, 0xa898,
+	0x780e, 0xa878, 0x700e, 0xa870, 0x7016, 0xa874, 0x701a, 0xa868,
+	0x009e, 0xd084, 0x0120, 0x7007, 0x0001, 0x0029, 0x0005, 0x7007,
+	0x0002, 0x00b1, 0x0005, 0x0016, 0x0026, 0x710c, 0x2011, 0x0040,
+	0x9182, 0x0040, 0x1210, 0x2110, 0x9006, 0x700e, 0x7212, 0x8203,
+	0x7812, 0x782b, 0x0020, 0x782b, 0x0041, 0x002e, 0x001e, 0x0005,
+	0x0016, 0x0026, 0x0136, 0x0146, 0x0156, 0x7014, 0x20e0, 0x7018,
+	0x2098, 0x20e9, 0x0000, 0x20a1, 0x0088, 0x782b, 0x0026, 0x710c,
+	0x2011, 0x0040, 0x9182, 0x0040, 0x1210, 0x2110, 0x9006, 0x700e,
+	0x22a8, 0x4006, 0x8203, 0x7812, 0x782b, 0x0020, 0x3300, 0x701a,
+	0x782b, 0x0001, 0x015e, 0x014e, 0x013e, 0x002e, 0x001e, 0x0005,
+	0x2009, 0x19f0, 0x2104, 0xc095, 0x200a, 0x080c, 0x114d, 0x0005,
+	0x0016, 0x00e6, 0x2071, 0x19f0, 0x00f6, 0x2079, 0x0080, 0x792c,
+	0xd1bc, 0x190c, 0x0df3, 0x782b, 0x0002, 0xd1fc, 0x0120, 0x918c,
+	0x0700, 0x7004, 0x0023, 0x00fe, 0x00ee, 0x001e, 0x0005, 0x115e,
+	0x1206, 0x123a, 0x0dfa, 0x0dfa, 0x12f3, 0x0dfa, 0x918c, 0x0700,
+	0x1550, 0x0136, 0x0146, 0x0156, 0x7014, 0x20e8, 0x7018, 0x20a0,
+	0x20e1, 0x0000, 0x2099, 0x0088, 0x782b, 0x0040, 0x7010, 0x20a8,
+	0x4005, 0x3400, 0x701a, 0x015e, 0x014e, 0x013e, 0x700c, 0x9005,
+	0x0578, 0x7800, 0x7802, 0x7804, 0x7806, 0x080c, 0x11a3, 0x0005,
+	0x7008, 0x0096, 0x2048, 0xa86f, 0x0100, 0x009e, 0x7007, 0x0000,
+	0x080c, 0x115e, 0x0005, 0x7008, 0x0096, 0x2048, 0xa86f, 0x0200,
+	0x009e, 0x0ca0, 0x918c, 0x0700, 0x1150, 0x700c, 0x9005, 0x0180,
+	0x7800, 0x7802, 0x7804, 0x7806, 0x080c, 0x11b8, 0x0005, 0x7008,
+	0x0096, 0x2048, 0xa86f, 0x0200, 0x009e, 0x7007, 0x0000, 0x0080,
+	0x0096, 0x7008, 0x2048, 0x7800, 0xa88e, 0x7804, 0xa892, 0x7808,
+	0xa896, 0x780c, 0xa89a, 0xa86f, 0x0100, 0x009e, 0x7007, 0x0000,
+	0x0096, 0x00d6, 0x7008, 0x2048, 0x2001, 0x18b7, 0x2004, 0x9906,
+	0x1128, 0xa89c, 0x080f, 0x00de, 0x009e, 0x00a0, 0x00de, 0x009e,
+	0x0096, 0x00d6, 0x7008, 0x2048, 0x0081, 0x0150, 0xa89c, 0x0086,
+	0x2940, 0x080f, 0x008e, 0x00de, 0x009e, 0x080c, 0x114d, 0x0005,
+	0x00de, 0x009e, 0x080c, 0x114d, 0x0005, 0xa8a8, 0xd08c, 0x0005,
+	0x0096, 0xa0a0, 0x904d, 0x090c, 0x0dfa, 0xa06c, 0x908e, 0x0100,
+	0x0130, 0xa87b, 0x0030, 0xa883, 0x0000, 0xa897, 0x4002, 0x080c,
+	0x6adc, 0xa09f, 0x0000, 0xa0a3, 0x0000, 0x2848, 0x080c, 0x1063,
+	0x009e, 0x0005, 0x00a6, 0xa0a0, 0x904d, 0x090c, 0x0dfa, 0xa06c,
+	0x908e, 0x0100, 0x0128, 0xa87b, 0x0001, 0xa883, 0x0000, 0x00c0,
+	0xa80c, 0x2050, 0xb004, 0x9005, 0x0198, 0xa80e, 0x2050, 0x8006,
+	0x8006, 0x8007, 0x908c, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0002,
+	0xa076, 0xa172, 0xb000, 0xa07a, 0x2810, 0x080c, 0x112e, 0x00e8,
+	0xa97c, 0xa894, 0x0016, 0x0006, 0x080c, 0x6adc, 0x000e, 0x001e,
+	0xd1fc, 0x1138, 0xd1f4, 0x0128, 0x00c6, 0x2060, 0x080c, 0xa0e3,
+	0x00ce, 0x7008, 0x2048, 0xa89f, 0x0000, 0xa8a3, 0x0000, 0x080c,
+	0x1063, 0x7007, 0x0000, 0x080c, 0x114d, 0x00ae, 0x0005, 0x0126,
+	0x2091, 0x8000, 0x782b, 0x1001, 0x7007, 0x0005, 0x7000, 0xc094,
+	0x7002, 0x012e, 0x0005, 0x7007, 0x0000, 0x080c, 0x115e, 0x0005,
+	0x0126, 0x2091, 0x2200, 0x2079, 0x0300, 0x2071, 0x1a3a, 0x7003,
+	0x0000, 0x78bf, 0x00f6, 0x781b, 0x4800, 0x0419, 0x7803, 0x0003,
+	0x780f, 0x0000, 0x2001, 0x0100, 0x2004, 0x9086, 0x000a, 0x0128,
+	0x20a9, 0x0254, 0x2061, 0xdc42, 0x0020, 0x20a9, 0x0241, 0x2061,
+	0xe0e8, 0x2c0d, 0x7912, 0xe104, 0x9ce0, 0x0002, 0x7916, 0x1f04,
+	0x1319, 0x7807, 0x0007, 0x7803, 0x0000, 0x7803, 0x0001, 0x012e,
+	0x0005, 0x00c6, 0x7803, 0x0000, 0x7808, 0xd09c, 0x0110, 0x7820,
+	0x0cd8, 0x2001, 0x1a3b, 0x2003, 0x0000, 0x78ab, 0x0004, 0x78ac,
+	0xd0ac, 0x1de8, 0x78ab, 0x0002, 0x7807, 0x0007, 0x7827, 0x0030,
+	0x782b, 0x0400, 0x7827, 0x0031, 0x782b, 0x1a5c, 0x781f, 0xff00,
+	0x781b, 0xb700, 0x2001, 0x0200, 0x2004, 0xd0dc, 0x0110, 0x781f,
+	0x0303, 0x2061, 0x1a5c, 0x602f, 0x1cd0, 0x2001, 0x1819, 0x2004,
+	0x9082, 0x1cd0, 0x6032, 0x603b, 0x1fc8, 0x2001, 0x32e9, 0xd0fc,
+	0x190c, 0x0dfa, 0x2001, 0x0003, 0x2004, 0xd0d4, 0x1118, 0x783f,
+	0x32e9, 0x0020, 0x9084, 0xc000, 0x783f, 0xb2e9, 0x00ce, 0x0005,
+	0x0126, 0x2091, 0x2200, 0x7908, 0x9184, 0x0070, 0x190c, 0x0df3,
+	0xd19c, 0x0158, 0x7820, 0x908c, 0xf000, 0x15e8, 0x908a, 0x0024,
+	0x1a0c, 0x0dfa, 0x0023, 0x012e, 0x0005, 0x012e, 0x0005, 0x13ab,
+	0x13ab, 0x13c2, 0x13c7, 0x13cb, 0x13d0, 0x13f8, 0x13fc, 0x140a,
+	0x140e, 0x13ab, 0x149a, 0x149e, 0x150e, 0x13ab, 0x13ab, 0x13ab,
+	0x13ab, 0x13ab, 0x13ab, 0x13ab, 0x13ab, 0x13ab, 0x13ab, 0x13ab,
+	0x13ab, 0x13ab, 0x13d2, 0x13ab, 0x13ab, 0x13ab, 0x13ab, 0x13ab,
+	0x13ab, 0x13af, 0x13ad, 0x080c, 0x0dfa, 0x080c, 0x0df3, 0x080c,
+	0x1515, 0x2009, 0x1a52, 0x2104, 0x8000, 0x200a, 0x080c, 0x7c6d,
+	0x080c, 0x19ff, 0x0005, 0x2009, 0x0048, 0x2060, 0x080c, 0xa15d,
+	0x012e, 0x0005, 0x7004, 0xc085, 0xc0b5, 0x7006, 0x0005, 0x7004,
+	0xc085, 0x7006, 0x0005, 0x080c, 0x1515, 0x080c, 0x166e, 0x0005,
+	0x080c, 0x0dfa, 0x080c, 0x1515, 0x2060, 0x6014, 0x0096, 0x2048,
+	0xa83b, 0xffff, 0x009e, 0x2009, 0x0048, 0x080c, 0xa15d, 0x2001,
+	0x015d, 0x2003, 0x0000, 0x2009, 0x03e8, 0x8109, 0x0160, 0x2001,
+	0x0201, 0x2004, 0x9005, 0x0dc8, 0x2001, 0x0218, 0x2004, 0xd0ec,
+	0x1110, 0x080c, 0x151a, 0x2001, 0x0307, 0x2003, 0x8000, 0x0005,
+	0x7004, 0xc095, 0x7006, 0x0005, 0x080c, 0x1515, 0x2060, 0x6014,
+	0x0096, 0x2048, 0xa83b, 0xffff, 0x009e, 0x2009, 0x0048, 0x080c,
+	0xa15d, 0x0005, 0x080c, 0x1515, 0x080c, 0x0dfa, 0x080c, 0x1515,
+	0x080c, 0x1485, 0x7827, 0x0018, 0x79ac, 0xd1dc, 0x0540, 0x7827,
+	0x0015, 0x7828, 0x782b, 0x0000, 0x9065, 0x0138, 0x2001, 0x020d,
+	0x2003, 0x0050, 0x2003, 0x0020, 0x0400, 0x7004, 0x9005, 0x1180,
+	0x78ab, 0x0004, 0x7827, 0x0018, 0x782b, 0x0000, 0xd1bc, 0x090c,
+	0x0dfa, 0x2001, 0x020d, 0x2003, 0x0050, 0x2003, 0x0020, 0x0490,
+	0x78ab, 0x0004, 0x7803, 0x0001, 0x080c, 0x149e, 0x0005, 0x7828,
+	0x782b, 0x0000, 0x9065, 0x090c, 0x0dfa, 0x6014, 0x2048, 0x78ab,
+	0x0004, 0x918c, 0x0700, 0x01a8, 0x080c, 0x7c6d, 0x080c, 0x19ff,
+	0x080c, 0xbe37, 0x0158, 0xa9ac, 0xa936, 0xa9b0, 0xa93a, 0xa83f,
+	0xffff, 0xa843, 0xffff, 0xa880, 0xc0bd, 0xa882, 0x080c, 0xba56,
+	0x0005, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x6024,
+	0x190c, 0xc223, 0x2029, 0x00c8, 0x8529, 0x0128, 0x2001, 0x0201,
+	0x2004, 0x9005, 0x0dc8, 0x7dbc, 0x080c, 0xdbeb, 0xd5a4, 0x1118,
+	0x080c, 0x151a, 0x0005, 0x080c, 0x7c6d, 0x080c, 0x19ff, 0x0005,
+	0x781f, 0x0300, 0x7803, 0x0001, 0x0005, 0x0016, 0x0066, 0x0076,
+	0x00f6, 0x2079, 0x0300, 0x7908, 0x918c, 0x0007, 0x9186, 0x0003,
+	0x0120, 0x2001, 0x0016, 0x080c, 0x158b, 0x00fe, 0x007e, 0x006e,
+	0x001e, 0x0005, 0x7004, 0xc09d, 0x7006, 0x0005, 0x7104, 0x9184,
+	0x0004, 0x190c, 0x0dfa, 0xd184, 0x11b1, 0xd19c, 0x0180, 0xc19c,
+	0x7106, 0x0016, 0x080c, 0x1651, 0x001e, 0x0148, 0x2001, 0x020d,
+	0x2003, 0x0050, 0x2003, 0x0020, 0x080c, 0x151a, 0x0005, 0x81ff,
+	0x190c, 0x0dfa, 0x0005, 0x2100, 0xc184, 0xc1b4, 0x7106, 0xd0b4,
+	0x0016, 0x00e6, 0x1904, 0x1503, 0x2071, 0x0200, 0x080c, 0x1645,
+	0x080c, 0x1651, 0x05a8, 0x6014, 0x9005, 0x05a8, 0x0096, 0x2048,
+	0xa864, 0x009e, 0x9084, 0x00ff, 0x908e, 0x0029, 0x0160, 0x908e,
+	0x0048, 0x1548, 0x601c, 0xd084, 0x11d8, 0x00f6, 0x2c78, 0x080c,
+	0x16db, 0x00fe, 0x00a8, 0x00f6, 0x2c78, 0x080c, 0x1825, 0x00fe,
+	0x2009, 0x01f4, 0x8109, 0x0160, 0x2001, 0x0201, 0x2004, 0x9005,
+	0x0dc8, 0x2001, 0x0218, 0x2004, 0xd0ec, 0x1110, 0x0419, 0x0040,
+	0x2001, 0x020d, 0x2003, 0x0020, 0x080c, 0x1329, 0x7803, 0x0001,
+	0x00ee, 0x001e, 0x0005, 0x080c, 0x1651, 0x0dd0, 0x2001, 0x020d,
+	0x2003, 0x0050, 0x2003, 0x0020, 0x0069, 0x0c90, 0x0031, 0x2060,
+	0x2009, 0x0053, 0x080c, 0xa15d, 0x0005, 0x7808, 0xd09c, 0x0de8,
+	0x7820, 0x0005, 0x080c, 0x1485, 0x00d6, 0x2069, 0x0200, 0x2009,
+	0x01f4, 0x8109, 0x0510, 0x6804, 0x9005, 0x0dd8, 0x2001, 0x015d,
+	0x2003, 0x0000, 0x79bc, 0xd1a4, 0x1528, 0x79b8, 0x918c, 0x0fff,
+	0x0180, 0x9182, 0x0841, 0x1268, 0x9188, 0x0007, 0x918c, 0x0ff8,
+	0x810c, 0x810c, 0x810c, 0x080c, 0x157d, 0x6827, 0x0001, 0x8109,
+	0x1dd0, 0x04d9, 0x6827, 0x0002, 0x04c1, 0x6804, 0x9005, 0x1130,
+	0x682c, 0xd0e4, 0x1500, 0x6804, 0x9005, 0x0de8, 0x79b8, 0xd1ec,
+	0x1130, 0x08c0, 0x080c, 0x7c6d, 0x080c, 0x19ff, 0x0090, 0x7827,
+	0x0015, 0x782b, 0x0000, 0x7827, 0x0018, 0x782b, 0x0000, 0x2001,
+	0x020d, 0x2003, 0x0020, 0x2001, 0x0307, 0x2003, 0x0300, 0x7803,
+	0x0001, 0x00de, 0x0005, 0x682c, 0x9084, 0x5400, 0x9086, 0x5400,
+	0x0d30, 0x7827, 0x0015, 0x782b, 0x0000, 0x7803, 0x0001, 0x6800,
+	0x9085, 0x1800, 0x6802, 0x00de, 0x0005, 0x6824, 0x9084, 0x0003,
+	0x1de0, 0x0005, 0x2001, 0x0030, 0x2c08, 0x621c, 0x0021, 0x7830,
+	0x9086, 0x0041, 0x0005, 0x00f6, 0x2079, 0x0300, 0x0006, 0x7808,
+	0xd09c, 0x0140, 0x0016, 0x0026, 0x00c6, 0x080c, 0x1370, 0x00ce,
+	0x002e, 0x001e, 0x000e, 0x0006, 0x7832, 0x7936, 0x7a3a, 0x781b,
+	0x8080, 0x0059, 0x1118, 0x000e, 0x00fe, 0x0005, 0x000e, 0x792c,
+	0x3900, 0x8000, 0x2004, 0x080c, 0x0dfa, 0x2009, 0x180c, 0x2104,
+	0xc0f4, 0x200a, 0x2009, 0xff00, 0x8109, 0x0904, 0x1609, 0x7a18,
+	0x9284, 0x0030, 0x0904, 0x1604, 0x9284, 0x0048, 0x9086, 0x0008,
+	0x1904, 0x1604, 0x2001, 0x0109, 0x2004, 0xd08c, 0x01f0, 0x0006,
+	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x0126, 0x2091, 0x2800,
+	0x00f6, 0x0026, 0x0016, 0x2009, 0x1a55, 0x2104, 0x8000, 0x0208,
+	0x200a, 0x080c, 0x8632, 0x001e, 0x002e, 0x00fe, 0x012e, 0x015e,
+	0x014e, 0x013e, 0x01de, 0x01ce, 0x000e, 0x2001, 0x009b, 0x2004,
+	0xd0fc, 0x01d0, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
+	0x0156, 0x00f6, 0x0016, 0x2009, 0x1a56, 0x2104, 0x8000, 0x0208,
+	0x200a, 0x080c, 0x1dec, 0x001e, 0x00fe, 0x015e, 0x014e, 0x013e,
+	0x01de, 0x01ce, 0x012e, 0x000e, 0x7818, 0xd0bc, 0x1904, 0x15b4,
+	0x0005, 0x2001, 0x180c, 0x2004, 0xd0f4, 0x1528, 0x7a18, 0x9284,
+	0x0030, 0x0508, 0x9284, 0x0048, 0x9086, 0x0008, 0x11e0, 0x2001,
+	0x19ce, 0x2004, 0x9005, 0x01b8, 0x2001, 0x1a3d, 0x2004, 0x9086,
+	0x0000, 0x0188, 0x2009, 0x1a54, 0x2104, 0x8000, 0x0208, 0x200a,
+	0x080c, 0x96d4, 0x2009, 0x180c, 0x2104, 0xc0f5, 0x200a, 0x2009,
+	0xff00, 0x0804, 0x15b4, 0x9085, 0x0001, 0x0005, 0x7832, 0x7936,
+	0x7a3a, 0x781b, 0x8080, 0x080c, 0x15ad, 0x1108, 0x0005, 0x792c,
+	0x3900, 0x8000, 0x2004, 0x080c, 0x0dfa, 0x7037, 0x0001, 0x7150,
+	0x7037, 0x0002, 0x7050, 0x2060, 0xd1bc, 0x1110, 0x7054, 0x2060,
+	0x0005, 0x0006, 0x0046, 0x00e6, 0x2071, 0x0200, 0x7037, 0x0002,
+	0x7058, 0x9084, 0xff00, 0x8007, 0x9086, 0x00bc, 0x1158, 0x2021,
+	0x1a53, 0x2404, 0x8000, 0x0208, 0x2022, 0x080c, 0x7c6d, 0x080c,
+	0x19ff, 0x9006, 0x00ee, 0x004e, 0x000e, 0x0005, 0x0c11, 0x1108,
+	0x0005, 0x00e6, 0x0016, 0x2071, 0x0200, 0x0879, 0x6124, 0xd1dc,
+	0x01f8, 0x701c, 0xd08c, 0x0904, 0x16d0, 0x7017, 0x0000, 0x2001,
+	0x0264, 0x2004, 0xd0bc, 0x0904, 0x16d0, 0x2001, 0x0268, 0x00c6,
+	0x2064, 0x6104, 0x6038, 0x00ce, 0x918e, 0x0039, 0x1904, 0x16d0,
+	0x9c06, 0x15f0, 0x0126, 0x2091, 0x2600, 0x080c, 0x7bb4, 0x012e,
+	0x7358, 0x745c, 0x6014, 0x905d, 0x0598, 0x2b48, 0x6010, 0x00b6,
+	0x2058, 0xb800, 0x00be, 0xd0bc, 0x190c, 0xc1fe, 0xab42, 0xac3e,
+	0x2001, 0x187d, 0x2004, 0xd0b4, 0x1170, 0x601c, 0xd0e4, 0x1158,
+	0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x1120, 0xa83b,
+	0x7fff, 0xa837, 0xffff, 0x080c, 0x1fe8, 0x1190, 0x080c, 0x1882,
+	0x2a00, 0xa816, 0x0130, 0x2800, 0xa80e, 0x2c05, 0xa80a, 0x2c00,
+	0xa812, 0x7037, 0x0020, 0x781f, 0x0300, 0x001e, 0x00ee, 0x0005,
+	0x7037, 0x0050, 0x7037, 0x0020, 0x001e, 0x00ee, 0x080c, 0x151a,
+	0x0005, 0x080c, 0x0dfa, 0x0016, 0x2009, 0x00a0, 0x8109, 0xa001,
+	0xa001, 0xa001, 0x1dd8, 0x001e, 0x2ff0, 0x0126, 0x2091, 0x2200,
+	0x0016, 0x00c6, 0x3e60, 0x6014, 0x2048, 0x2940, 0x903e, 0x2730,
+	0xa864, 0x2068, 0xa81a, 0x9d84, 0x000f, 0x9088, 0x1fc8, 0x2165,
+	0x0002, 0x1710, 0x175d, 0x1710, 0x1710, 0x1710, 0x173f, 0x1710,
+	0x1714, 0x1709, 0x1754, 0x1710, 0x1710, 0x1710, 0x181a, 0x1728,
+	0x171e, 0xa964, 0x918c, 0x00ff, 0x918e, 0x0048, 0x0904, 0x1754,
+	0x9085, 0x0001, 0x0804, 0x1810, 0xa87c, 0xd0bc, 0x0dc8, 0xa890,
+	0xa842, 0xa88c, 0xa83e, 0xa888, 0x0804, 0x1764, 0xa87c, 0xd0bc,
+	0x0d78, 0xa890, 0xa842, 0xa88c, 0xa83e, 0xa888, 0x0804, 0x17b3,
+	0xa87c, 0xd0bc, 0x0d28, 0xa890, 0xa842, 0xa88c, 0xa83e, 0xa804,
+	0x9045, 0x090c, 0x0dfa, 0xa164, 0xa91a, 0x91ec, 0x000f, 0x9d80,
+	0x1fc8, 0x2065, 0xa888, 0xd19c, 0x1904, 0x17b3, 0x0428, 0xa87c,
+	0xd0ac, 0x0970, 0xa804, 0x9045, 0x090c, 0x0dfa, 0xa164, 0xa91a,
+	0x91ec, 0x000f, 0x9d80, 0x1fc8, 0x2065, 0x9006, 0xa842, 0xa83e,
+	0xd19c, 0x1904, 0x17b3, 0x0080, 0xa87c, 0xd0ac, 0x0904, 0x1710,
+	0x9006, 0xa842, 0xa83e, 0x0804, 0x17b3, 0xa87c, 0xd0ac, 0x0904,
+	0x1710, 0x9006, 0xa842, 0xa83e, 0x2c05, 0x908a, 0x0036, 0x1a0c,
+	0x0dfa, 0x9082, 0x001b, 0x0002, 0x1787, 0x1787, 0x1789, 0x1787,
+	0x1787, 0x1787, 0x178f, 0x1787, 0x1787, 0x1787, 0x1795, 0x1787,
+	0x1787, 0x1787, 0x179b, 0x1787, 0x1787, 0x1787, 0x17a1, 0x1787,
+	0x1787, 0x1787, 0x17a7, 0x1787, 0x1787, 0x1787, 0x17ad, 0x080c,
+	0x0dfa, 0xa574, 0xa478, 0xa37c, 0xa280, 0x0804, 0x17f8, 0xa584,
+	0xa488, 0xa38c, 0xa290, 0x0804, 0x17f8, 0xa594, 0xa498, 0xa39c,
+	0xa2a0, 0x0804, 0x17f8, 0xa5a4, 0xa4a8, 0xa3ac, 0xa2b0, 0x0804,
+	0x17f8, 0xa5b4, 0xa4b8, 0xa3bc, 0xa2c0, 0x0804, 0x17f8, 0xa5c4,
+	0xa4c8, 0xa3cc, 0xa2d0, 0x0804, 0x17f8, 0xa5d4, 0xa4d8, 0xa3dc,
+	0xa2e0, 0x0804, 0x17f8, 0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0dfa,
+	0x9082, 0x001b, 0x0002, 0x17d6, 0x17d4, 0x17d4, 0x17d4, 0x17d4,
+	0x17d4, 0x17dd, 0x17d4, 0x17d4, 0x17d4, 0x17d4, 0x17d4, 0x17e4,
+	0x17d4, 0x17d4, 0x17d4, 0x17d4, 0x17d4, 0x17eb, 0x17d4, 0x17d4,
+	0x17d4, 0x17d4, 0x17d4, 0x17f2, 0x080c, 0x0dfa, 0xa56c, 0xa470,
+	0xa774, 0xa678, 0xa37c, 0xa280, 0x00d8, 0xa584, 0xa488, 0xa78c,
+	0xa690, 0xa394, 0xa298, 0x00a0, 0xa59c, 0xa4a0, 0xa7a4, 0xa6a8,
+	0xa3ac, 0xa2b0, 0x0068, 0xa5b4, 0xa4b8, 0xa7bc, 0xa6c0, 0xa3c4,
+	0xa2c8, 0x0030, 0xa5cc, 0xa4d0, 0xa7d4, 0xa6d8, 0xa3dc, 0xa2e0,
+	0xab2e, 0xaa32, 0xad1e, 0xac22, 0xaf26, 0xae2a, 0xa988, 0x8c60,
+	0x2c1d, 0xa8ac, 0xaab0, 0xa836, 0xaa3a, 0x8109, 0xa916, 0x1160,
+	0x3e60, 0x601c, 0xc085, 0x601e, 0xa87c, 0xc0dd, 0xa87e, 0x9006,
+	0x00ce, 0x001e, 0x012e, 0x0005, 0x2800, 0xa80e, 0xab0a, 0x2c00,
+	0xa812, 0x0c70, 0x0804, 0x1710, 0x0016, 0x2009, 0x00a0, 0x8109,
+	0xa001, 0xa001, 0xa001, 0x1dd8, 0x001e, 0x2ff0, 0x0126, 0x2091,
+	0x2200, 0x0016, 0x00c6, 0x3e60, 0x6014, 0x2048, 0x2940, 0xa80e,
+	0x2061, 0x1fc3, 0xa813, 0x1fc3, 0x2c05, 0xa80a, 0xa964, 0xa91a,
+	0xa87c, 0xd0ac, 0x090c, 0x0dfa, 0x9006, 0xa842, 0xa83e, 0x2c05,
+	0x908a, 0x0034, 0x1a0c, 0x0dfa, 0xadcc, 0xacd0, 0xafd4, 0xaed8,
+	0xabdc, 0xaae0, 0xab2e, 0xaa32, 0xad1e, 0xac22, 0xaf26, 0xae2a,
+	0xa8ac, 0xaab0, 0xa836, 0xaa3a, 0xa988, 0xa864, 0x9084, 0x00ff,
+	0x9086, 0x0008, 0x1120, 0x8109, 0xa916, 0x0128, 0x0080, 0x918a,
+	0x0002, 0xa916, 0x1160, 0x3e60, 0x601c, 0xc085, 0x601e, 0xa87c,
+	0xc0dd, 0xa87e, 0x9006, 0x00ce, 0x001e, 0x012e, 0x0005, 0xa804,
+	0x9045, 0x090c, 0x0dfa, 0xa80e, 0xa064, 0xa81a, 0x9084, 0x000f,
+	0x9080, 0x1fc8, 0x2015, 0x82ff, 0x090c, 0x0dfa, 0xaa12, 0x2205,
+	0xa80a, 0x0c08, 0x903e, 0x2730, 0xa880, 0xd0fc, 0x1190, 0x2d00,
+	0x0002, 0x1977, 0x18d9, 0x18d9, 0x1977, 0x1977, 0x1971, 0x1977,
+	0x18d9, 0x1928, 0x1928, 0x1928, 0x1977, 0x1977, 0x1977, 0x196e,
+	0x1928, 0xc0fc, 0xa882, 0xab2c, 0xaa30, 0xad1c, 0xac20, 0xdd9c,
+	0x0904, 0x1979, 0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0dfa, 0x9082,
+	0x001b, 0x0002, 0x18c5, 0x18c3, 0x18c3, 0x18c3, 0x18c3, 0x18c3,
+	0x18c9, 0x18c3, 0x18c3, 0x18c3, 0x18c3, 0x18c3, 0x18cd, 0x18c3,
+	0x18c3, 0x18c3, 0x18c3, 0x18c3, 0x18d1, 0x18c3, 0x18c3, 0x18c3,
+	0x18c3, 0x18c3, 0x18d5, 0x080c, 0x0dfa, 0xa774, 0xa678, 0x0804,
+	0x1979, 0xa78c, 0xa690, 0x0804, 0x1979, 0xa7a4, 0xa6a8, 0x0804,
+	0x1979, 0xa7bc, 0xa6c0, 0x0804, 0x1979, 0xa7d4, 0xa6d8, 0x0804,
+	0x1979, 0x2c05, 0x908a, 0x0036, 0x1a0c, 0x0dfa, 0x9082, 0x001b,
+	0x0002, 0x18fc, 0x18fc, 0x18fe, 0x18fc, 0x18fc, 0x18fc, 0x1904,
+	0x18fc, 0x18fc, 0x18fc, 0x190a, 0x18fc, 0x18fc, 0x18fc, 0x1910,
+	0x18fc, 0x18fc, 0x18fc, 0x1916, 0x18fc, 0x18fc, 0x18fc, 0x191c,
+	0x18fc, 0x18fc, 0x18fc, 0x1922, 0x080c, 0x0dfa, 0xa574, 0xa478,
+	0xa37c, 0xa280, 0x0804, 0x1979, 0xa584, 0xa488, 0xa38c, 0xa290,
+	0x0804, 0x1979, 0xa594, 0xa498, 0xa39c, 0xa2a0, 0x0804, 0x1979,
+	0xa5a4, 0xa4a8, 0xa3ac, 0xa2b0, 0x0804, 0x1979, 0xa5b4, 0xa4b8,
+	0xa3bc, 0xa2c0, 0x0804, 0x1979, 0xa5c4, 0xa4c8, 0xa3cc, 0xa2d0,
+	0x0804, 0x1979, 0xa5d4, 0xa4d8, 0xa3dc, 0xa2e0, 0x0804, 0x1979,
+	0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0dfa, 0x9082, 0x001b, 0x0002,
+	0x194b, 0x1949, 0x1949, 0x1949, 0x1949, 0x1949, 0x1952, 0x1949,
+	0x1949, 0x1949, 0x1949, 0x1949, 0x1959, 0x1949, 0x1949, 0x1949,
+	0x1949, 0x1949, 0x1960, 0x1949, 0x1949, 0x1949, 0x1949, 0x1949,
+	0x1967, 0x080c, 0x0dfa, 0xa56c, 0xa470, 0xa774, 0xa678, 0xa37c,
+	0xa280, 0x0438, 0xa584, 0xa488, 0xa78c, 0xa690, 0xa394, 0xa298,
+	0x0400, 0xa59c, 0xa4a0, 0xa7a4, 0xa6a8, 0xa3ac, 0xa2b0, 0x00c8,
+	0xa5b4, 0xa4b8, 0xa7bc, 0xa6c0, 0xa3c4, 0xa2c8, 0x0090, 0xa5cc,
+	0xa4d0, 0xa7d4, 0xa6d8, 0xa3dc, 0xa2e0, 0x0058, 0x9d86, 0x000e,
+	0x1130, 0x080c, 0x1f80, 0x1904, 0x1882, 0x900e, 0x0050, 0x080c,
+	0x0dfa, 0xab2e, 0xaa32, 0xad1e, 0xac22, 0xaf26, 0xae2a, 0x080c,
+	0x1f80, 0x0005, 0x6014, 0x2048, 0x6118, 0x810c, 0x810c, 0x810c,
+	0x81ff, 0x1118, 0xa887, 0x0001, 0x0008, 0xa986, 0x601b, 0x0002,
+	0xa874, 0x9084, 0x00ff, 0x9084, 0x0008, 0x0150, 0x00e9, 0x6000,
+	0x9086, 0x0004, 0x1120, 0x2009, 0x0048, 0x080c, 0xa15d, 0x0005,
+	0xa974, 0xd1dc, 0x1108, 0x0005, 0xa934, 0xa88c, 0x9106, 0x1158,
+	0xa938, 0xa890, 0x9106, 0x1138, 0x601c, 0xc084, 0x601e, 0x2009,
+	0x0048, 0x0804, 0xa15d, 0x0005, 0x0126, 0x00c6, 0x2091, 0x2200,
+	0x00ce, 0x7908, 0x918c, 0x0007, 0x9186, 0x0000, 0x05b0, 0x9186,
+	0x0003, 0x0598, 0x6020, 0x6023, 0x0000, 0x0006, 0x2031, 0x0008,
+	0x00c6, 0x781f, 0x0808, 0x7808, 0xd09c, 0x0120, 0x080c, 0x1370,
+	0x8631, 0x1db8, 0x00ce, 0x781f, 0x0800, 0x2031, 0x0168, 0x00c6,
+	0x7808, 0xd09c, 0x190c, 0x1370, 0x00ce, 0x2001, 0x0038, 0x080c,
+	0x1a87, 0x7930, 0x9186, 0x0040, 0x0160, 0x9186, 0x0042, 0x190c,
+	0x0dfa, 0x2001, 0x001e, 0x8001, 0x1df0, 0x8631, 0x1d40, 0x080c,
+	0x1a96, 0x000e, 0x6022, 0x012e, 0x0005, 0x080c, 0x1a83, 0x7827,
+	0x0015, 0x7828, 0x9c06, 0x1db8, 0x782b, 0x0000, 0x0ca0, 0x00f6,
+	0x2079, 0x0300, 0x7803, 0x0000, 0x78ab, 0x0004, 0x00fe, 0x080c,
+	0x7207, 0x1188, 0x2001, 0x0138, 0x2003, 0x0000, 0x2001, 0x0160,
+	0x2003, 0x0000, 0x2011, 0x012c, 0xa001, 0xa001, 0x8211, 0x1de0,
+	0x0059, 0x0804, 0x72d2, 0x0479, 0x0039, 0x2001, 0x0160, 0x2502,
+	0x2001, 0x0138, 0x2202, 0x0005, 0x00e6, 0x2071, 0x0200, 0x080c,
+	0x2bbc, 0x2009, 0x003c, 0x080c, 0x230a, 0x2001, 0x015d, 0x2003,
+	0x0000, 0x7000, 0x9084, 0x003c, 0x1de0, 0x080c, 0x81f0, 0x70a0,
+	0x70a2, 0x7098, 0x709a, 0x709c, 0x709e, 0x2001, 0x020d, 0x2003,
+	0x0020, 0x00f6, 0x2079, 0x0300, 0x080c, 0x1329, 0x7803, 0x0001,
+	0x00fe, 0x00ee, 0x0005, 0x2001, 0x0138, 0x2014, 0x2003, 0x0000,
+	0x2001, 0x0160, 0x202c, 0x2003, 0x0000, 0x080c, 0x7207, 0x1108,
+	0x0005, 0x2021, 0x0260, 0x2001, 0x0141, 0x201c, 0xd3dc, 0x1168,
+	0x2001, 0x0109, 0x201c, 0x939c, 0x0048, 0x1160, 0x2001, 0x0111,
+	0x201c, 0x83ff, 0x1110, 0x8421, 0x1d70, 0x2001, 0x015d, 0x2003,
+	0x0000, 0x0005, 0x0046, 0x2021, 0x0019, 0x2003, 0x0048, 0xa001,
+	0xa001, 0x201c, 0x939c, 0x0048, 0x0120, 0x8421, 0x1db0, 0x004e,
+	0x0c60, 0x004e, 0x0c40, 0x601c, 0xc084, 0x601e, 0x0005, 0x2c08,
+	0x621c, 0x080c, 0x158b, 0x7930, 0x0005, 0x2c08, 0x621c, 0x080c,
+	0x1636, 0x7930, 0x0005, 0x8001, 0x1df0, 0x0005, 0x2031, 0x0064,
+	0x781c, 0x9084, 0x0007, 0x0170, 0x2001, 0x0038, 0x0c41, 0x9186,
+	0x0040, 0x0904, 0x1af4, 0x2001, 0x001e, 0x0c69, 0x8631, 0x1d80,
+	0x080c, 0x0dfa, 0x781f, 0x0202, 0x2001, 0x015d, 0x2003, 0x0000,
+	0x2001, 0x0dac, 0x0c01, 0x781c, 0xd084, 0x0110, 0x0861, 0x04e0,
+	0x2001, 0x0030, 0x0891, 0x9186, 0x0040, 0x0568, 0x781c, 0xd084,
+	0x1da8, 0x781f, 0x0101, 0x2001, 0x0014, 0x0869, 0x2001, 0x0037,
+	0x0821, 0x9186, 0x0040, 0x0140, 0x2001, 0x0030, 0x080c, 0x1a8d,
+	0x9186, 0x0040, 0x190c, 0x0dfa, 0x00d6, 0x2069, 0x0200, 0x692c,
+	0xd1f4, 0x1170, 0xd1c4, 0x0160, 0xd19c, 0x0130, 0x6800, 0x9085,
+	0x1800, 0x6802, 0x00de, 0x0080, 0x6908, 0x9184, 0x0007, 0x1db0,
+	0x00de, 0x781f, 0x0100, 0x791c, 0x9184, 0x0007, 0x090c, 0x0dfa,
+	0xa001, 0xa001, 0x781f, 0x0200, 0x0005, 0x0126, 0x2091, 0x2400,
+	0x2071, 0x1a3d, 0x2079, 0x0090, 0x012e, 0x0005, 0x9280, 0x0005,
+	0x2004, 0x2048, 0xa97c, 0xd1dc, 0x1904, 0x1b89, 0xa964, 0x9184,
+	0x0007, 0x0002, 0x1b12, 0x1b74, 0x1b29, 0x1b29, 0x1b29, 0x1b5c,
+	0x1b3c, 0x1b2b, 0x918c, 0x00ff, 0x9186, 0x0008, 0x1170, 0xa87c,
+	0xd0b4, 0x0904, 0x1da7, 0x9006, 0xa842, 0xa83e, 0xa988, 0x2900,
+	0xa85a, 0xa813, 0x1fc3, 0x0804, 0x1b85, 0x9186, 0x0048, 0x0904,
+	0x1b74, 0x080c, 0x0dfa, 0xa87c, 0xd0b4, 0x0904, 0x1da7, 0xa890,
+	0xa842, 0xa83a, 0xa88c, 0xa83e, 0xa836, 0xa8ac, 0xa846, 0xa8b0,
+	0xa84a, 0xa988, 0x0804, 0x1b7c, 0xa864, 0x9084, 0x00ff, 0x9086,
+	0x001e, 0x1d38, 0xa87c, 0xd0b4, 0x0904, 0x1da7, 0xa890, 0xa842,
+	0xa83a, 0xa88c, 0xa83e, 0xa836, 0xa8ac, 0xa846, 0xa8b0, 0xa84a,
+	0xa804, 0xa85a, 0x2040, 0xa064, 0x9084, 0x000f, 0x9080, 0x1fc8,
+	0x2005, 0xa812, 0xa988, 0x0448, 0x918c, 0x00ff, 0x9186, 0x0015,
+	0x1540, 0xa87c, 0xd0b4, 0x0904, 0x1da7, 0xa804, 0xa85a, 0x2040,
+	0xa064, 0x9084, 0x000f, 0x9080, 0x1fc8, 0x2005, 0xa812, 0xa988,
+	0x9006, 0xa842, 0xa83e, 0x0088, 0xa87c, 0xd0b4, 0x0904, 0x1da7,
+	0xa988, 0x9006, 0xa842, 0xa83e, 0x2900, 0xa85a, 0xa864, 0x9084,
+	0x000f, 0x9080, 0x1fc8, 0x2005, 0xa812, 0xa916, 0xa87c, 0xc0dd,
+	0xa87e, 0x0005, 0x00f6, 0x2079, 0x0090, 0x782c, 0xd0fc, 0x190c,
+	0x1dec, 0x00e6, 0x2071, 0x1a3d, 0x7000, 0x9005, 0x1904, 0x1bf2,
+	0x7206, 0x9280, 0x0005, 0x204c, 0x9280, 0x0004, 0x2004, 0x782b,
+	0x0004, 0x00f6, 0x2079, 0x0200, 0x7803, 0x0040, 0x00fe, 0x00b6,
+	0x2058, 0xb86c, 0x7836, 0xb890, 0x00be, 0x00f6, 0x2079, 0x0200,
+	0x7803, 0x0040, 0xa001, 0xa001, 0xa001, 0xa001, 0xa001, 0xa001,
+	0x781a, 0x2079, 0x0100, 0x8004, 0x78d6, 0x00fe, 0xa814, 0x2050,
+	0xa858, 0x2040, 0xa810, 0x2060, 0xa064, 0x90ec, 0x000f, 0xa944,
+	0x791a, 0x7116, 0xa848, 0x781e, 0x701a, 0x9006, 0x700e, 0x7012,
+	0x7004, 0xa940, 0xa838, 0x9106, 0x1500, 0xa93c, 0xa834, 0x9106,
+	0x11e0, 0x0006, 0x0016, 0xa938, 0xa834, 0x9105, 0x0118, 0x001e,
+	0x000e, 0x0098, 0x001e, 0x000e, 0x8aff, 0x01c8, 0x0126, 0x2091,
+	0x8000, 0x2009, 0x0306, 0x200b, 0x0808, 0x00d9, 0x0108, 0x00c9,
+	0x012e, 0x9006, 0x00ee, 0x00fe, 0x0005, 0x0036, 0x0046, 0xab38,
+	0xac34, 0x080c, 0x1fe8, 0x004e, 0x003e, 0x0d30, 0x0c98, 0x9085,
+	0x0001, 0x0c80, 0x2009, 0x0306, 0x200b, 0x4800, 0x7027, 0x0000,
+	0x0005, 0x0076, 0x0066, 0x0056, 0x0046, 0x0036, 0x0026, 0x8aff,
+	0x0904, 0x1da0, 0x700c, 0x7214, 0x923a, 0x7010, 0x7218, 0x9203,
+	0x0a04, 0x1d9f, 0x9705, 0x0904, 0x1d9f, 0x903e, 0x2730, 0xa880,
+	0xd0fc, 0x1190, 0x2d00, 0x0002, 0x1d34, 0x1c74, 0x1c74, 0x1d34,
+	0x1d34, 0x1d11, 0x1d34, 0x1c74, 0x1d18, 0x1cc3, 0x1cc3, 0x1d34,
+	0x1d34, 0x1d34, 0x1d0b, 0x1cc3, 0xc0fc, 0xa882, 0xab2c, 0xaa30,
+	0xad1c, 0xac20, 0xdd9c, 0x0904, 0x1d36, 0x2c05, 0x908a, 0x0034,
+	0x1a0c, 0x0dfa, 0x9082, 0x001b, 0x0002, 0x1c60, 0x1c5e, 0x1c5e,
+	0x1c5e, 0x1c5e, 0x1c5e, 0x1c64, 0x1c5e, 0x1c5e, 0x1c5e, 0x1c5e,
+	0x1c5e, 0x1c68, 0x1c5e, 0x1c5e, 0x1c5e, 0x1c5e, 0x1c5e, 0x1c6c,
+	0x1c5e, 0x1c5e, 0x1c5e, 0x1c5e, 0x1c5e, 0x1c70, 0x080c, 0x0dfa,
+	0xa774, 0xa678, 0x0804, 0x1d36, 0xa78c, 0xa690, 0x0804, 0x1d36,
+	0xa7a4, 0xa6a8, 0x0804, 0x1d36, 0xa7bc, 0xa6c0, 0x0804, 0x1d36,
+	0xa7d4, 0xa6d8, 0x0804, 0x1d36, 0x2c05, 0x908a, 0x0036, 0x1a0c,
+	0x0dfa, 0x9082, 0x001b, 0x0002, 0x1c97, 0x1c97, 0x1c99, 0x1c97,
+	0x1c97, 0x1c97, 0x1c9f, 0x1c97, 0x1c97, 0x1c97, 0x1ca5, 0x1c97,
+	0x1c97, 0x1c97, 0x1cab, 0x1c97, 0x1c97, 0x1c97, 0x1cb1, 0x1c97,
+	0x1c97, 0x1c97, 0x1cb7, 0x1c97, 0x1c97, 0x1c97, 0x1cbd, 0x080c,
+	0x0dfa, 0xa574, 0xa478, 0xa37c, 0xa280, 0x0804, 0x1d36, 0xa584,
+	0xa488, 0xa38c, 0xa290, 0x0804, 0x1d36, 0xa594, 0xa498, 0xa39c,
+	0xa2a0, 0x0804, 0x1d36, 0xa5a4, 0xa4a8, 0xa3ac, 0xa2b0, 0x0804,
+	0x1d36, 0xa5b4, 0xa4b8, 0xa3bc, 0xa2c0, 0x0804, 0x1d36, 0xa5c4,
+	0xa4c8, 0xa3cc, 0xa2d0, 0x0804, 0x1d36, 0xa5d4, 0xa4d8, 0xa3dc,
+	0xa2e0, 0x0804, 0x1d36, 0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0dfa,
+	0x9082, 0x001b, 0x0002, 0x1ce6, 0x1ce4, 0x1ce4, 0x1ce4, 0x1ce4,
+	0x1ce4, 0x1cee, 0x1ce4, 0x1ce4, 0x1ce4, 0x1ce4, 0x1ce4, 0x1cf6,
+	0x1ce4, 0x1ce4, 0x1ce4, 0x1ce4, 0x1ce4, 0x1cfd, 0x1ce4, 0x1ce4,
+	0x1ce4, 0x1ce4, 0x1ce4, 0x1d04, 0x080c, 0x0dfa, 0xa56c, 0xa470,
+	0xa774, 0xa678, 0xa37c, 0xa280, 0x0804, 0x1d36, 0xa584, 0xa488,
+	0xa78c, 0xa690, 0xa394, 0xa298, 0x0804, 0x1d36, 0xa59c, 0xa4a0,
+	0xa7a4, 0xa6a8, 0xa3ac, 0xa2b0, 0x04c8, 0xa5b4, 0xa4b8, 0xa7bc,
+	0xa6c0, 0xa3c4, 0xa2c8, 0x0490, 0xa5cc, 0xa4d0, 0xa7d4, 0xa6d8,
+	0xa3dc, 0xa2e0, 0x0458, 0xa864, 0x9084, 0x00ff, 0x9086, 0x001e,
+	0x1518, 0x080c, 0x1f80, 0x1904, 0x1c0f, 0x900e, 0x0804, 0x1da0,
+	0xab64, 0x939c, 0x00ff, 0x9386, 0x0048, 0x1180, 0x00c6, 0x7004,
+	0x2060, 0x6004, 0x9086, 0x0043, 0x00ce, 0x0904, 0x1cc3, 0xab9c,
+	0x9016, 0xad8c, 0xac90, 0xaf94, 0xae98, 0x0040, 0x9386, 0x0008,
+	0x0904, 0x1cc3, 0x080c, 0x0dfa, 0x080c, 0x0dfa, 0x2009, 0x030f,
+	0x2104, 0xd0fc, 0x0530, 0x0066, 0x2009, 0x0306, 0x2104, 0x9084,
+	0x0030, 0x15c8, 0x2031, 0x1000, 0x200b, 0x4000, 0x2600, 0x9302,
+	0x928b, 0x0000, 0xa82e, 0xa932, 0x0278, 0x9105, 0x0168, 0x2011,
+	0x0000, 0x2618, 0x2600, 0x9500, 0xa81e, 0x9481, 0x0000, 0xa822,
+	0xa880, 0xc0fd, 0xa882, 0x0020, 0xa82f, 0x0000, 0xa833, 0x0000,
+	0x006e, 0x7b12, 0x7a16, 0x7d02, 0x7c06, 0x7f0a, 0x7e0e, 0x782b,
+	0x0001, 0x7000, 0x8000, 0x7002, 0xa83c, 0x9300, 0xa83e, 0xa840,
+	0x9201, 0xa842, 0x700c, 0x9300, 0x700e, 0x7010, 0x9201, 0x7012,
+	0x080c, 0x1f80, 0x0428, 0x2031, 0x0080, 0x9584, 0x007f, 0x0108,
+	0x9632, 0x7124, 0x7000, 0x9086, 0x0000, 0x1198, 0xc185, 0x7126,
+	0x2009, 0x0306, 0x2104, 0xd0b4, 0x1904, 0x1d46, 0x200b, 0x4040,
+	0x2009, 0x1a57, 0x2104, 0x8000, 0x0a04, 0x1d46, 0x200a, 0x0804,
+	0x1d46, 0xc18d, 0x7126, 0xd184, 0x1d58, 0x0804, 0x1d46, 0x9006,
+	0x002e, 0x003e, 0x004e, 0x005e, 0x006e, 0x007e, 0x0005, 0x080c,
+	0x0dfa, 0x0026, 0x2001, 0x0105, 0x2003, 0x0010, 0x782b, 0x0004,
+	0x7003, 0x0000, 0x7004, 0x0016, 0x080c, 0x1c02, 0x001e, 0x2060,
+	0x6014, 0x2048, 0x080c, 0xbe37, 0x0118, 0xa880, 0xc0bd, 0xa882,
+	0x6020, 0x9086, 0x0006, 0x1180, 0x2061, 0x0100, 0x62c8, 0x2001,
+	0x00fa, 0x8001, 0x1df0, 0x60c8, 0x9206, 0x1dc0, 0x60c4, 0xa89a,
+	0x60c8, 0xa896, 0x7004, 0x2060, 0x00c6, 0x080c, 0xba56, 0x00ce,
+	0x2001, 0x19ce, 0x2004, 0x9c06, 0x1160, 0x2009, 0x0040, 0x080c,
+	0x230a, 0x080c, 0x9b88, 0x2011, 0x0000, 0x080c, 0x9a19, 0x080c,
+	0x8ced, 0x002e, 0x0804, 0x1f30, 0x0126, 0x2091, 0x2400, 0xa858,
+	0x2040, 0x792c, 0x782b, 0x0002, 0x9184, 0x0700, 0x1904, 0x1da9,
+	0x7000, 0x0002, 0x1f30, 0x1dfe, 0x1e7e, 0x1f2e, 0x8001, 0x7002,
+	0x7027, 0x0000, 0xd19c, 0x1158, 0x8aff, 0x0904, 0x1e4b, 0x080c,
+	0x1c09, 0x0904, 0x1f30, 0x080c, 0x1c09, 0x0804, 0x1f30, 0x782b,
+	0x0004, 0xd194, 0x0148, 0xa880, 0xc0fc, 0xa882, 0x8aff, 0x1518,
+	0xa87c, 0xc0f5, 0xa87e, 0x00f8, 0x0026, 0x0036, 0xab3c, 0xaa40,
+	0x0016, 0x7910, 0xa82c, 0x9100, 0xa82e, 0x7914, 0xa830, 0x9101,
+	0xa832, 0x001e, 0x7810, 0x931a, 0x7814, 0x9213, 0x7800, 0xa81e,
+	0x7804, 0xa822, 0xab3e, 0xaa42, 0x003e, 0x002e, 0x080c, 0x1f9b,
+	0xa880, 0xc0fd, 0xa882, 0x2a00, 0xa816, 0x2800, 0xa85a, 0x2c00,
+	0xa812, 0x7003, 0x0000, 0x2009, 0x0306, 0x200b, 0x4800, 0x7027,
+	0x0000, 0x0804, 0x1f30, 0x00f6, 0x0026, 0x781c, 0x0006, 0x7818,
+	0x0006, 0x2079, 0x0100, 0x7a14, 0x9284, 0x1984, 0x9085, 0x0012,
+	0x7816, 0x0036, 0x2019, 0x1000, 0x8319, 0x090c, 0x0dfa, 0x7820,
+	0xd0bc, 0x1dd0, 0x003e, 0x79c8, 0x000e, 0x9102, 0x001e, 0x0006,
+	0x0016, 0x79c4, 0x000e, 0x9103, 0x78c6, 0x000e, 0x78ca, 0x9284,
+	0x1984, 0x9085, 0x0012, 0x7816, 0x002e, 0x00fe, 0x782b, 0x0008,
+	0x7003, 0x0000, 0x080c, 0x1c02, 0x0804, 0x1f30, 0x8001, 0x7002,
+	0x7024, 0x8004, 0x7026, 0xd194, 0x0170, 0x782c, 0xd0fc, 0x1904,
+	0x1df1, 0xd19c, 0x1904, 0x1f2c, 0x8aff, 0x0904, 0x1f30, 0x080c,
+	0x1c09, 0x0804, 0x1f30, 0x0026, 0x0036, 0xab3c, 0xaa40, 0x080c,
+	0x1f9b, 0xdd9c, 0x1904, 0x1eeb, 0x2c05, 0x908a, 0x0036, 0x1a0c,
+	0x0dfa, 0x9082, 0x001b, 0x0002, 0x1ebf, 0x1ebf, 0x1ec1, 0x1ebf,
+	0x1ebf, 0x1ebf, 0x1ec7, 0x1ebf, 0x1ebf, 0x1ebf, 0x1ecd, 0x1ebf,
+	0x1ebf, 0x1ebf, 0x1ed3, 0x1ebf, 0x1ebf, 0x1ebf, 0x1ed9, 0x1ebf,
+	0x1ebf, 0x1ebf, 0x1edf, 0x1ebf, 0x1ebf, 0x1ebf, 0x1ee5, 0x080c,
+	0x0dfa, 0xa07c, 0x931a, 0xa080, 0x9213, 0x0804, 0x1e20, 0xa08c,
+	0x931a, 0xa090, 0x9213, 0x0804, 0x1e20, 0xa09c, 0x931a, 0xa0a0,
+	0x9213, 0x0804, 0x1e20, 0xa0ac, 0x931a, 0xa0b0, 0x9213, 0x0804,
+	0x1e20, 0xa0bc, 0x931a, 0xa0c0, 0x9213, 0x0804, 0x1e20, 0xa0cc,
+	0x931a, 0xa0d0, 0x9213, 0x0804, 0x1e20, 0xa0dc, 0x931a, 0xa0e0,
+	0x9213, 0x0804, 0x1e20, 0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0dfa,
+	0x9082, 0x001b, 0x0002, 0x1f0e, 0x1f0c, 0x1f0c, 0x1f0c, 0x1f0c,
+	0x1f0c, 0x1f14, 0x1f0c, 0x1f0c, 0x1f0c, 0x1f0c, 0x1f0c, 0x1f1a,
+	0x1f0c, 0x1f0c, 0x1f0c, 0x1f0c, 0x1f0c, 0x1f20, 0x1f0c, 0x1f0c,
+	0x1f0c, 0x1f0c, 0x1f0c, 0x1f26, 0x080c, 0x0dfa, 0xa07c, 0x931a,
+	0xa080, 0x9213, 0x0804, 0x1e20, 0xa094, 0x931a, 0xa098, 0x9213,
+	0x0804, 0x1e20, 0xa0ac, 0x931a, 0xa0b0, 0x9213, 0x0804, 0x1e20,
+	0xa0c4, 0x931a, 0xa0c8, 0x9213, 0x0804, 0x1e20, 0xa0dc, 0x931a,
+	0xa0e0, 0x9213, 0x0804, 0x1e20, 0x0804, 0x1e1c, 0x080c, 0x0dfa,
+	0x012e, 0x0005, 0x00f6, 0x00e6, 0x2071, 0x1a3d, 0x7000, 0x9086,
+	0x0000, 0x0904, 0x1f7b, 0x2079, 0x0090, 0x2009, 0x0207, 0x210c,
+	0xd194, 0x01b8, 0x2009, 0x020c, 0x210c, 0x9184, 0x0003, 0x0188,
+	0x080c, 0xdc34, 0x2001, 0x0133, 0x2004, 0x9005, 0x090c, 0x0dfa,
+	0x0016, 0x2009, 0x0040, 0x080c, 0x230a, 0x001e, 0x2001, 0x020c,
+	0x2102, 0x2009, 0x0206, 0x2104, 0x2009, 0x0203, 0x210c, 0x9106,
+	0x1120, 0x2009, 0x0040, 0x080c, 0x230a, 0x782c, 0xd0fc, 0x09a8,
+	0x080c, 0x1dec, 0x7000, 0x9086, 0x0000, 0x1978, 0x782b, 0x0004,
+	0x782c, 0xd0ac, 0x1de8, 0x2009, 0x0040, 0x080c, 0x230a, 0x782b,
+	0x0002, 0x7003, 0x0000, 0x080c, 0x1c02, 0x00ee, 0x00fe, 0x0005,
+	0xa880, 0xd0fc, 0x11a8, 0x8c60, 0x2c05, 0x9005, 0x0110, 0x8a51,
+	0x0005, 0xa004, 0x9005, 0x0168, 0xa85a, 0x2040, 0xa064, 0x9084,
+	0x000f, 0x9080, 0x1fc8, 0x2065, 0x8cff, 0x090c, 0x0dfa, 0x8a51,
+	0x0005, 0x2050, 0x0005, 0xa880, 0xd0fc, 0x11b8, 0x8a50, 0x8c61,
+	0x2c05, 0x9005, 0x1190, 0x2800, 0x9906, 0x0120, 0xa000, 0x9005,
+	0x1108, 0x2900, 0x2040, 0xa85a, 0xa064, 0x9084, 0x000f, 0x9080,
+	0x1fd8, 0x2065, 0x8cff, 0x090c, 0x0dfa, 0x0005, 0x0000, 0x001d,
+	0x0021, 0x0025, 0x0029, 0x002d, 0x0031, 0x0035, 0x0000, 0x001b,
+	0x0021, 0x0027, 0x002d, 0x0033, 0x0000, 0x0000, 0x0023, 0x0000,
+	0x0000, 0x1fbb, 0x1fb7, 0x0000, 0x0000, 0x1fc5, 0x0000, 0x1fbb,
+	0x1fc2, 0x1fc2, 0x1fbf, 0x0000, 0x0000, 0x0000, 0x1fc5, 0x1fc2,
+	0x0000, 0x1fbd, 0x1fbd, 0x0000, 0x0000, 0x1fc5, 0x0000, 0x1fbd,
+	0x1fc3, 0x1fc3, 0x1fc3, 0x0000, 0x0000, 0x0000, 0x1fc5, 0x1fc3,
+	0x00c6, 0x00d6, 0x0086, 0xab42, 0xac3e, 0xa888, 0x9055, 0x0904,
+	0x21c7, 0x2940, 0xa064, 0x90ec, 0x000f, 0x9084, 0x00ff, 0x9086,
+	0x0008, 0x1118, 0x2061, 0x1fc3, 0x00d0, 0x9de0, 0x1fc8, 0x9d86,
+	0x0007, 0x0130, 0x9d86, 0x000e, 0x0118, 0x9d86, 0x000f, 0x1120,
+	0xa08c, 0x9422, 0xa090, 0x931b, 0x2c05, 0x9065, 0x1140, 0x0310,
+	0x0804, 0x21c7, 0xa004, 0x9045, 0x0904, 0x21c7, 0x08d8, 0x2c05,
+	0x9005, 0x0904, 0x20af, 0xdd9c, 0x1904, 0x206b, 0x908a, 0x0036,
+	0x1a0c, 0x0dfa, 0x9082, 0x001b, 0x0002, 0x2040, 0x2040, 0x2042,
+	0x2040, 0x2040, 0x2040, 0x2048, 0x2040, 0x2040, 0x2040, 0x204e,
+	0x2040, 0x2040, 0x2040, 0x2054, 0x2040, 0x2040, 0x2040, 0x205a,
+	0x2040, 0x2040, 0x2040, 0x2060, 0x2040, 0x2040, 0x2040, 0x2066,
+	0x080c, 0x0dfa, 0xa07c, 0x9422, 0xa080, 0x931b, 0x0804, 0x20a5,
+	0xa08c, 0x9422, 0xa090, 0x931b, 0x0804, 0x20a5, 0xa09c, 0x9422,
+	0xa0a0, 0x931b, 0x0804, 0x20a5, 0xa0ac, 0x9422, 0xa0b0, 0x931b,
+	0x0804, 0x20a5, 0xa0bc, 0x9422, 0xa0c0, 0x931b, 0x0804, 0x20a5,
+	0xa0cc, 0x9422, 0xa0d0, 0x931b, 0x0804, 0x20a5, 0xa0dc, 0x9422,
+	0xa0e0, 0x931b, 0x04d0, 0x908a, 0x0034, 0x1a0c, 0x0dfa, 0x9082,
+	0x001b, 0x0002, 0x208d, 0x208b, 0x208b, 0x208b, 0x208b, 0x208b,
+	0x2092, 0x208b, 0x208b, 0x208b, 0x208b, 0x208b, 0x2097, 0x208b,
+	0x208b, 0x208b, 0x208b, 0x208b, 0x209c, 0x208b, 0x208b, 0x208b,
+	0x208b, 0x208b, 0x20a1, 0x080c, 0x0dfa, 0xa07c, 0x9422, 0xa080,
+	0x931b, 0x0098, 0xa094, 0x9422, 0xa098, 0x931b, 0x0070, 0xa0ac,
+	0x9422, 0xa0b0, 0x931b, 0x0048, 0xa0c4, 0x9422, 0xa0c8, 0x931b,
+	0x0020, 0xa0dc, 0x9422, 0xa0e0, 0x931b, 0x0630, 0x2300, 0x9405,
+	0x0160, 0x8a51, 0x0904, 0x21c7, 0x8c60, 0x0804, 0x2017, 0xa004,
+	0x9045, 0x0904, 0x21c7, 0x0804, 0x1ff2, 0x8a51, 0x0904, 0x21c7,
+	0x8c60, 0x2c05, 0x9005, 0x1158, 0xa004, 0x9045, 0x0904, 0x21c7,
+	0xa064, 0x90ec, 0x000f, 0x9de0, 0x1fc8, 0x2c05, 0x2060, 0xa880,
+	0xc0fc, 0xa882, 0x0804, 0x21bc, 0x2c05, 0x8422, 0x8420, 0x831a,
+	0x9399, 0x0000, 0xac2e, 0xab32, 0xdd9c, 0x1904, 0x2159, 0x9082,
+	0x001b, 0x0002, 0x20f5, 0x20f5, 0x20f7, 0x20f5, 0x20f5, 0x20f5,
+	0x2105, 0x20f5, 0x20f5, 0x20f5, 0x2113, 0x20f5, 0x20f5, 0x20f5,
+	0x2121, 0x20f5, 0x20f5, 0x20f5, 0x212f, 0x20f5, 0x20f5, 0x20f5,
+	0x213d, 0x20f5, 0x20f5, 0x20f5, 0x214b, 0x080c, 0x0dfa, 0xa17c,
+	0x2400, 0x9122, 0xa180, 0x2300, 0x911b, 0x0a0c, 0x0dfa, 0xa074,
+	0x9420, 0xa078, 0x9319, 0x0804, 0x21b7, 0xa18c, 0x2400, 0x9122,
+	0xa190, 0x2300, 0x911b, 0x0a0c, 0x0dfa, 0xa084, 0x9420, 0xa088,
+	0x9319, 0x0804, 0x21b7, 0xa19c, 0x2400, 0x9122, 0xa1a0, 0x2300,
+	0x911b, 0x0a0c, 0x0dfa, 0xa094, 0x9420, 0xa098, 0x9319, 0x0804,
+	0x21b7, 0xa1ac, 0x2400, 0x9122, 0xa1b0, 0x2300, 0x911b, 0x0a0c,
+	0x0dfa, 0xa0a4, 0x9420, 0xa0a8, 0x9319, 0x0804, 0x21b7, 0xa1bc,
+	0x2400, 0x9122, 0xa1c0, 0x2300, 0x911b, 0x0a0c, 0x0dfa, 0xa0b4,
+	0x9420, 0xa0b8, 0x9319, 0x0804, 0x21b7, 0xa1cc, 0x2400, 0x9122,
+	0xa1d0, 0x2300, 0x911b, 0x0a0c, 0x0dfa, 0xa0c4, 0x9420, 0xa0c8,
+	0x9319, 0x0804, 0x21b7, 0xa1dc, 0x2400, 0x9122, 0xa1e0, 0x2300,
+	0x911b, 0x0a0c, 0x0dfa, 0xa0d4, 0x9420, 0xa0d8, 0x9319, 0x0804,
+	0x21b7, 0x9082, 0x001b, 0x0002, 0x2177, 0x2175, 0x2175, 0x2175,
+	0x2175, 0x2175, 0x2184, 0x2175, 0x2175, 0x2175, 0x2175, 0x2175,
+	0x2191, 0x2175, 0x2175, 0x2175, 0x2175, 0x2175, 0x219e, 0x2175,
+	0x2175, 0x2175, 0x2175, 0x2175, 0x21ab, 0x080c, 0x0dfa, 0xa17c,
+	0x2400, 0x9122, 0xa180, 0x2300, 0x911b, 0x0a0c, 0x0dfa, 0xa06c,
+	0x9420, 0xa070, 0x9319, 0x0498, 0xa194, 0x2400, 0x9122, 0xa198,
+	0x2300, 0x911b, 0x0a0c, 0x0dfa, 0xa084, 0x9420, 0xa088, 0x9319,
+	0x0430, 0xa1ac, 0x2400, 0x9122, 0xa1b0, 0x2300, 0x911b, 0x0a0c,
+	0x0dfa, 0xa09c, 0x9420, 0xa0a0, 0x9319, 0x00c8, 0xa1c4, 0x2400,
+	0x9122, 0xa1c8, 0x2300, 0x911b, 0x0a0c, 0x0dfa, 0xa0b4, 0x9420,
+	0xa0b8, 0x9319, 0x0060, 0xa1dc, 0x2400, 0x9122, 0xa1e0, 0x2300,
+	0x911b, 0x0a0c, 0x0dfa, 0xa0cc, 0x9420, 0xa0d0, 0x9319, 0xac1e,
+	0xab22, 0xa880, 0xc0fd, 0xa882, 0x2800, 0xa85a, 0x2c00, 0xa812,
+	0x2a00, 0xa816, 0x000e, 0x000e, 0x000e, 0x9006, 0x0028, 0x008e,
+	0x00de, 0x00ce, 0x9085, 0x0001, 0x0005, 0x2001, 0x0005, 0x2004,
+	0xd0bc, 0x190c, 0x0df3, 0x9084, 0x0007, 0x0002, 0x21e8, 0x1dec,
+	0x21e8, 0x21de, 0x21e1, 0x21e4, 0x21e1, 0x21e4, 0x080c, 0x1dec,
+	0x0005, 0x080c, 0x11e8, 0x0005, 0x080c, 0x1dec, 0x080c, 0x11e8,
+	0x0005, 0x0126, 0x2091, 0x2600, 0x2079, 0x0200, 0x2071, 0x0260,
+	0x2069, 0x1800, 0x7817, 0x0000, 0x789b, 0x0814, 0x78a3, 0x0406,
+	0x789f, 0x0410, 0x2009, 0x013b, 0x200b, 0x0400, 0x781b, 0x0002,
+	0x783b, 0x001f, 0x7837, 0x0020, 0x7803, 0x1600, 0x012e, 0x0005,
+	0x2091, 0x2600, 0x781c, 0xd0a4, 0x190c, 0x2307, 0x7900, 0xd1dc,
+	0x1118, 0x9084, 0x0006, 0x001a, 0x9084, 0x000e, 0x0002, 0x222f,
+	0x2227, 0x7bb4, 0x2227, 0x2229, 0x2229, 0x2229, 0x2229, 0x7b9a,
+	0x2227, 0x222b, 0x2227, 0x2229, 0x2227, 0x2229, 0x2227, 0x080c,
+	0x0dfa, 0x0031, 0x0020, 0x080c, 0x7b9a, 0x080c, 0x7bb4, 0x0005,
+	0x0006, 0x0016, 0x0026, 0x080c, 0xdc34, 0x7930, 0x9184, 0x0003,
+	0x01c0, 0x2001, 0x19ce, 0x2004, 0x9005, 0x0170, 0x2001, 0x0133,
+	0x2004, 0x9005, 0x090c, 0x0dfa, 0x00c6, 0x2001, 0x19ce, 0x2064,
+	0x080c, 0xba56, 0x00ce, 0x00f8, 0x2009, 0x0040, 0x080c, 0x230a,
+	0x00d0, 0x9184, 0x0014, 0x01a0, 0x6a00, 0x9286, 0x0003, 0x0160,
+	0x080c, 0x7207, 0x1138, 0x080c, 0x7504, 0x080c, 0x5f2b, 0x080c,
+	0x7127, 0x0010, 0x080c, 0x5dea, 0x080c, 0x7c63, 0x0041, 0x0018,
+	0x9184, 0x9540, 0x1dc8, 0x002e, 0x001e, 0x000e, 0x0005, 0x00e6,
+	0x0036, 0x0046, 0x0056, 0x2071, 0x1a3a, 0x080c, 0x19ff, 0x005e,
+	0x004e, 0x003e, 0x00ee, 0x0005, 0x0126, 0x2091, 0x2e00, 0x2071,
+	0x1800, 0x7128, 0x2001, 0x1947, 0x2102, 0x2001, 0x194f, 0x2102,
+	0x2001, 0x013b, 0x2102, 0x2079, 0x0200, 0x2001, 0x0201, 0x789e,
+	0x78a3, 0x0200, 0x9198, 0x0007, 0x831c, 0x831c, 0x831c, 0x9398,
+	0x0005, 0x2320, 0x9182, 0x0204, 0x1230, 0x2011, 0x0008, 0x8423,
+	0x8423, 0x8423, 0x0488, 0x9182, 0x024c, 0x1240, 0x2011, 0x0007,
+	0x8403, 0x8003, 0x9400, 0x9400, 0x9420, 0x0430, 0x9182, 0x02bc,
+	0x1238, 0x2011, 0x0006, 0x8403, 0x8003, 0x9400, 0x9420, 0x00e0,
+	0x9182, 0x034c, 0x1230, 0x2011, 0x0005, 0x8403, 0x8003, 0x9420,
+	0x0098, 0x9182, 0x042c, 0x1228, 0x2011, 0x0004, 0x8423, 0x8423,
+	0x0058, 0x9182, 0x059c, 0x1228, 0x2011, 0x0003, 0x8403, 0x9420,
+	0x0018, 0x2011, 0x0002, 0x8423, 0x9482, 0x0228, 0x8002, 0x8020,
+	0x8301, 0x9402, 0x0110, 0x0208, 0x8321, 0x8217, 0x8203, 0x9405,
+	0x789a, 0x012e, 0x0005, 0x0006, 0x00d6, 0x2069, 0x0200, 0x6814,
+	0x9084, 0xffc0, 0x910d, 0x6916, 0x00de, 0x000e, 0x0005, 0x00d6,
+	0x2069, 0x0200, 0x9005, 0x6810, 0x0110, 0xc0a5, 0x0008, 0xc0a4,
+	0x6812, 0x00de, 0x0005, 0x0006, 0x00d6, 0x2069, 0x0200, 0x6810,
+	0x9084, 0xfff8, 0x910d, 0x6912, 0x00de, 0x000e, 0x0005, 0x7938,
+	0x080c, 0x0df3, 0x00f6, 0x2079, 0x0200, 0x7902, 0xa001, 0xa001,
+	0xa001, 0xa001, 0xa001, 0xa001, 0x7902, 0xa001, 0xa001, 0xa001,
+	0xa001, 0xa001, 0xa001, 0x00fe, 0x0005, 0x0126, 0x2091, 0x2800,
+	0x2061, 0x0100, 0x2071, 0x1800, 0x2009, 0x0000, 0x080c, 0x2bb6,
+	0x080c, 0x2a89, 0x2001, 0x0100, 0x2004, 0x9086, 0x000a, 0x0558,
+	0x6054, 0x8004, 0x8004, 0x8004, 0x8004, 0x9084, 0x000c, 0x6150,
+	0x918c, 0xfff3, 0x9105, 0x6052, 0x6050, 0x9084, 0xb17f, 0x9085,
+	0x2000, 0x6052, 0x2009, 0x1975, 0x2011, 0x1976, 0x6358, 0x939c,
+	0x38f0, 0x2320, 0x080c, 0x2af6, 0x1238, 0x939d, 0x4003, 0x94a5,
+	0x8603, 0x230a, 0x2412, 0x0030, 0x939d, 0x0203, 0x94a5, 0x8603,
+	0x230a, 0x2412, 0x0050, 0x2001, 0x1975, 0x2003, 0x0700, 0x2001,
+	0x1976, 0x2003, 0x0700, 0x080c, 0x2cc2, 0x9006, 0x080c, 0x2ab8,
+	0x9006, 0x080c, 0x2a9b, 0x20a9, 0x0012, 0x1d04, 0x236d, 0x2091,
+	0x6000, 0x1f04, 0x236d, 0x602f, 0x0100, 0x602f, 0x0000, 0x6050,
+	0x9085, 0x0400, 0x9084, 0xdfff, 0x6052, 0x6024, 0x6026, 0x080c,
+	0x27a7, 0x2009, 0x00ef, 0x6132, 0x6136, 0x080c, 0x27b7, 0x60e7,
+	0x0000, 0x61ea, 0x60e3, 0x0002, 0x604b, 0xf7f7, 0x6043, 0x0000,
+	0x602f, 0x0080, 0x602f, 0x0000, 0x6007, 0x149f, 0x60bb, 0x0000,
+	0x20a9, 0x0018, 0x60bf, 0x0000, 0x1f04, 0x239a, 0x60bb, 0x0000,
+	0x60bf, 0x0108, 0x60bf, 0x0012, 0x60bf, 0x0320, 0x60bf, 0x0018,
+	0x601b, 0x00f0, 0x601f, 0x001e, 0x600f, 0x006b, 0x602b, 0x402f,
+	0x012e, 0x0005, 0x00f6, 0x2079, 0x0140, 0x78c3, 0x0080, 0x78c3,
+	0x0083, 0x78c3, 0x0000, 0x00fe, 0x0005, 0x2001, 0x1834, 0x2003,
+	0x0000, 0x2001, 0x1833, 0x2003, 0x0001, 0x0005, 0x0126, 0x2091,
+	0x2800, 0x0006, 0x0016, 0x0026, 0x6124, 0x9184, 0x5e2c, 0x1118,
+	0x9184, 0x0007, 0x002a, 0x9195, 0x0004, 0x9284, 0x0007, 0x0002,
+	0x23fa, 0x23e0, 0x23e3, 0x23e6, 0x23eb, 0x23ed, 0x23f1, 0x23f5,
+	0x080c, 0x8563, 0x00b8, 0x080c, 0x8632, 0x00a0, 0x080c, 0x8632,
+	0x080c, 0x8563, 0x0078, 0x0099, 0x0068, 0x080c, 0x8563, 0x0079,
+	0x0048, 0x080c, 0x8632, 0x0059, 0x0028, 0x080c, 0x8632, 0x080c,
+	0x8563, 0x0029, 0x002e, 0x001e, 0x000e, 0x012e, 0x0005, 0x00a6,
+	0x6124, 0x6028, 0xd09c, 0x0118, 0xd19c, 0x1904, 0x2648, 0xd1f4,
+	0x190c, 0x0df3, 0x080c, 0x7207, 0x0904, 0x2455, 0x080c, 0xc539,
+	0x1120, 0x7000, 0x9086, 0x0003, 0x0570, 0x6024, 0x9084, 0x1800,
+	0x0550, 0x080c, 0x722a, 0x0118, 0x080c, 0x7218, 0x1520, 0x6027,
+	0x0020, 0x6043, 0x0000, 0x080c, 0xc539, 0x0168, 0x080c, 0x722a,
+	0x1150, 0x2001, 0x197f, 0x2003, 0x0001, 0x6027, 0x1800, 0x080c,
+	0x7076, 0x0804, 0x264b, 0x70a0, 0x9005, 0x1150, 0x70a3, 0x0001,
+	0x00d6, 0x2069, 0x0140, 0x080c, 0x725e, 0x00de, 0x1904, 0x264b,
+	0x080c, 0x750e, 0x0428, 0x080c, 0x722a, 0x1590, 0x6024, 0x9084,
+	0x1800, 0x1108, 0x0468, 0x080c, 0x750e, 0x080c, 0x7504, 0x080c,
+	0x5f2b, 0x080c, 0x7127, 0x0804, 0x2648, 0xd1ac, 0x1508, 0x6024,
+	0xd0dc, 0x1170, 0xd0e4, 0x1178, 0xd0d4, 0x1190, 0xd0cc, 0x0130,
+	0x7094, 0x9086, 0x0028, 0x1110, 0x080c, 0x73f3, 0x0804, 0x2648,
+	0x080c, 0x7509, 0x0048, 0x2001, 0x1955, 0x2003, 0x0002, 0x0020,
+	0x080c, 0x7359, 0x0804, 0x2648, 0x080c, 0x748d, 0x0804, 0x2648,
+	0xd1ac, 0x0904, 0x2569, 0x080c, 0x7207, 0x11c0, 0x6027, 0x0020,
+	0x0006, 0x0026, 0x0036, 0x080c, 0x7221, 0x1158, 0x080c, 0x7504,
+	0x080c, 0x5f2b, 0x080c, 0x7127, 0x003e, 0x002e, 0x000e, 0x00ae,
+	0x0005, 0x003e, 0x002e, 0x000e, 0x080c, 0x71df, 0x0016, 0x0046,
+	0x00c6, 0x644c, 0x9486, 0xf0f0, 0x1138, 0x2061, 0x0100, 0x644a,
+	0x6043, 0x0090, 0x6043, 0x0010, 0x74d6, 0x948c, 0xff00, 0x7038,
+	0xd084, 0x0178, 0x9186, 0xf800, 0x1160, 0x7044, 0xd084, 0x1148,
+	0xc085, 0x7046, 0x0036, 0x2418, 0x2011, 0x8016, 0x080c, 0x4b1f,
+	0x003e, 0x080c, 0xc532, 0x1904, 0x2546, 0x9196, 0xff00, 0x05a8,
+	0x705c, 0x9084, 0x00ff, 0x810f, 0x81ff, 0x0110, 0x9116, 0x0568,
+	0x7130, 0xd184, 0x1550, 0x080c, 0x32e4, 0x0128, 0xc18d, 0x7132,
+	0x080c, 0x67bb, 0x1510, 0x6240, 0x9294, 0x0010, 0x0130, 0x6248,
+	0x9294, 0xff00, 0x9296, 0xff00, 0x01c0, 0x7030, 0xd08c, 0x0904,
+	0x2546, 0x7038, 0xd08c, 0x1140, 0x2001, 0x180c, 0x200c, 0xd1ac,
+	0x1904, 0x2546, 0xc1ad, 0x2102, 0x0036, 0x73d4, 0x2011, 0x8013,
+	0x080c, 0x4b1f, 0x003e, 0x0804, 0x2546, 0x7038, 0xd08c, 0x1140,
+	0x2001, 0x180c, 0x200c, 0xd1ac, 0x1904, 0x2546, 0xc1ad, 0x2102,
+	0x0036, 0x73d4, 0x2011, 0x8013, 0x080c, 0x4b1f, 0x003e, 0x7130,
+	0xc185, 0x7132, 0x2011, 0x185c, 0x220c, 0x00f0, 0x0016, 0x2009,
+	0x0001, 0x2011, 0x0100, 0x080c, 0x84d1, 0x2019, 0x000e, 0x00c6,
+	0x2061, 0x0000, 0x080c, 0xd801, 0x00ce, 0x9484, 0x00ff, 0x9080,
+	0x32e9, 0x200d, 0x918c, 0xff00, 0x810f, 0x2120, 0x9006, 0x2009,
+	0x000e, 0x080c, 0xd885, 0x001e, 0xd1ac, 0x1148, 0x0016, 0x2009,
+	0x0002, 0x2019, 0x0004, 0x080c, 0x3156, 0x001e, 0x0078, 0x0156,
+	0x00b6, 0x20a9, 0x007f, 0x900e, 0x080c, 0x649f, 0x1110, 0x080c,
+	0x5f45, 0x8108, 0x1f04, 0x253c, 0x00be, 0x015e, 0x00ce, 0x004e,
+	0x080c, 0xa069, 0x60e3, 0x0000, 0x001e, 0x2001, 0x1800, 0x2014,
+	0x9296, 0x0004, 0x1170, 0xd19c, 0x11a0, 0x2011, 0x180c, 0x2214,
+	0xd29c, 0x1120, 0x6204, 0x9295, 0x0002, 0x6206, 0x6228, 0xc29d,
+	0x622a, 0x2003, 0x0001, 0x2001, 0x1825, 0x2003, 0x0000, 0x6027,
+	0x0020, 0xd194, 0x0904, 0x2648, 0x0016, 0x6220, 0xd2b4, 0x0904,
+	0x25f1, 0x080c, 0x835a, 0x080c, 0x9656, 0x6027, 0x0004, 0x00f6,
+	0x2019, 0x19c8, 0x2304, 0x907d, 0x0904, 0x25c0, 0x7804, 0x9086,
+	0x0032, 0x15f0, 0x00d6, 0x00c6, 0x00e6, 0x0096, 0x2069, 0x0140,
+	0x782c, 0x685e, 0x7808, 0x685a, 0x6043, 0x0002, 0x2001, 0x0003,
+	0x8001, 0x1df0, 0x6043, 0x0000, 0x2001, 0x003c, 0x8001, 0x1df0,
+	0x080c, 0x2c98, 0x2001, 0x001e, 0x8001, 0x0240, 0x20a9, 0x0009,
+	0x080c, 0x2b91, 0x6904, 0xd1dc, 0x1140, 0x0cb0, 0x2001, 0x0100,
+	0x080c, 0x2c88, 0x9006, 0x080c, 0x2c88, 0x080c, 0x8b04, 0x080c,
+	0x8c10, 0x7814, 0x2048, 0xa867, 0x0103, 0x2f60, 0x080c, 0xa0e3,
+	0x009e, 0x00ee, 0x00ce, 0x00de, 0x00fe, 0x001e, 0x00ae, 0x0005,
+	0x00fe, 0x00d6, 0x2069, 0x0140, 0x6804, 0x9084, 0x4000, 0x0110,
+	0x080c, 0x2c98, 0x00de, 0x00c6, 0x2061, 0x19bf, 0x6028, 0x080c,
+	0xc539, 0x0120, 0x909a, 0x0003, 0x1258, 0x0018, 0x909a, 0x00c8,
+	0x1238, 0x8000, 0x602a, 0x00ce, 0x080c, 0x9632, 0x0804, 0x2647,
+	0x2061, 0x0100, 0x62c0, 0x080c, 0x9eef, 0x2019, 0x19c8, 0x2304,
+	0x9065, 0x0120, 0x2009, 0x0027, 0x080c, 0xa15d, 0x00ce, 0x0804,
+	0x2647, 0xd2bc, 0x0904, 0x2634, 0x080c, 0x8367, 0x6014, 0x9084,
+	0x1984, 0x9085, 0x0010, 0x6016, 0x6027, 0x0004, 0x00d6, 0x2069,
+	0x0140, 0x6804, 0x9084, 0x4000, 0x0110, 0x080c, 0x2c98, 0x00de,
+	0x00c6, 0x2061, 0x19bf, 0x6044, 0x080c, 0xc539, 0x0120, 0x909a,
+	0x0003, 0x1628, 0x0018, 0x909a, 0x00c8, 0x1608, 0x8000, 0x6046,
+	0x603c, 0x00ce, 0x9005, 0x0558, 0x2009, 0x07d0, 0x080c, 0x835f,
+	0x9080, 0x0008, 0x2004, 0x9086, 0x0006, 0x1138, 0x6114, 0x918c,
+	0x1984, 0x918d, 0x0012, 0x6116, 0x00d0, 0x6114, 0x918c, 0x1984,
+	0x918d, 0x0016, 0x6116, 0x0098, 0x6027, 0x0004, 0x0080, 0x0036,
+	0x2019, 0x0001, 0x080c, 0x999d, 0x003e, 0x2019, 0x19ce, 0x2304,
+	0x9065, 0x0120, 0x2009, 0x004f, 0x080c, 0xa15d, 0x00ce, 0x001e,
+	0xd19c, 0x0904, 0x2712, 0x7038, 0xd0ac, 0x1904, 0x26e7, 0x0016,
+	0x0156, 0x6027, 0x0008, 0x2001, 0x0100, 0x2004, 0x9086, 0x000a,
+	0x0904, 0x26c4, 0x6050, 0x9085, 0x0040, 0x6052, 0x6050, 0x9084,
+	0xfbcf, 0x6052, 0x080c, 0x2bb0, 0x9085, 0x2000, 0x6052, 0x20a9,
+	0x0012, 0x1d04, 0x2669, 0x080c, 0x838e, 0x1f04, 0x2669, 0x6050,
+	0x9085, 0x0400, 0x9084, 0xdfbf, 0x6052, 0x20a9, 0x0028, 0xa001,
+	0x1f04, 0x2677, 0x6150, 0x9185, 0x1400, 0x6052, 0x20a9, 0x0366,
+	0x1d04, 0x2680, 0x080c, 0x838e, 0x6020, 0xd09c, 0x1138, 0x015e,
+	0x6152, 0x001e, 0x6027, 0x0008, 0x0804, 0x2712, 0x080c, 0x2b78,
+	0x1f04, 0x2680, 0x015e, 0x6152, 0x001e, 0x6027, 0x0008, 0x0016,
+	0x6028, 0xc09c, 0x602a, 0x080c, 0xa069, 0x60e3, 0x0000, 0x080c,
+	0xdc13, 0x080c, 0xdc2e, 0x080c, 0x55df, 0xd0fc, 0x1138, 0x080c,
+	0xc532, 0x1120, 0x9085, 0x0001, 0x080c, 0x724e, 0x9006, 0x080c,
+	0x2c88, 0x2009, 0x0002, 0x080c, 0x2bb6, 0x00e6, 0x2071, 0x1800,
+	0x7003, 0x0004, 0x080c, 0x0ec6, 0x00ee, 0x6027, 0x0008, 0x080c,
+	0x0b8f, 0x001e, 0x0804, 0x2712, 0x080c, 0x2cc2, 0x080c, 0x2cf5,
+	0x6050, 0xc0e5, 0x6052, 0x20a9, 0x0367, 0x1f04, 0x26e5, 0x1d04,
+	0x26cf, 0x080c, 0x838e, 0x6020, 0xd09c, 0x1db8, 0x00f6, 0x2079,
+	0x0100, 0x080c, 0x2b06, 0x00fe, 0x1d80, 0x6050, 0xc0e4, 0x6052,
+	0x6027, 0x0008, 0x015e, 0x001e, 0x0468, 0x015e, 0x001e, 0x0016,
+	0x6028, 0xc09c, 0x602a, 0x080c, 0xa069, 0x60e3, 0x0000, 0x080c,
+	0xdc13, 0x080c, 0xdc2e, 0x080c, 0x55df, 0xd0fc, 0x1138, 0x080c,
+	0xc532, 0x1120, 0x9085, 0x0001, 0x080c, 0x724e, 0x9006, 0x080c,
+	0x2c88, 0x2009, 0x0002, 0x080c, 0x2bb6, 0x00e6, 0x2071, 0x1800,
+	0x7003, 0x0004, 0x080c, 0x0ec6, 0x00ee, 0x6027, 0x0008, 0x080c,
+	0x0b8f, 0x001e, 0x918c, 0xffd0, 0x6126, 0x00ae, 0x0005, 0x0006,
+	0x0016, 0x0026, 0x0036, 0x00e6, 0x00f6, 0x0126, 0x2091, 0x8000,
+	0x2071, 0x1800, 0x71cc, 0x70ce, 0x9116, 0x0904, 0x2766, 0x81ff,
+	0x01a0, 0x2009, 0x0000, 0x080c, 0x2bb6, 0x2011, 0x8011, 0x2019,
+	0x010e, 0x231c, 0x939e, 0x0007, 0x1118, 0x2019, 0x0001, 0x0010,
+	0x2019, 0x0000, 0x080c, 0x4b1f, 0x0448, 0x2001, 0x1980, 0x200c,
+	0x81ff, 0x1140, 0x2001, 0x0109, 0x2004, 0xd0b4, 0x0118, 0x2019,
+	0x0003, 0x0008, 0x2118, 0x2011, 0x8012, 0x080c, 0x4b1f, 0x080c,
+	0x0ec6, 0x080c, 0x55df, 0xd0fc, 0x1188, 0x080c, 0xc532, 0x1170,
+	0x00c6, 0x080c, 0x2802, 0x080c, 0x9904, 0x2061, 0x0100, 0x2019,
+	0x0028, 0x2009, 0x0002, 0x080c, 0x3156, 0x00ce, 0x012e, 0x00fe,
+	0x00ee, 0x003e, 0x002e, 0x001e, 0x000e, 0x0005, 0x2028, 0x918c,
+	0x00ff, 0x2130, 0x9094, 0xff00, 0x11f0, 0x2011, 0x1836, 0x2214,
+	0xd2ac, 0x11c8, 0x81ff, 0x01e8, 0x2011, 0x181e, 0x2204, 0x9106,
+	0x1190, 0x2011, 0x181f, 0x2214, 0x9294, 0xff00, 0x9584, 0xff00,
+	0x9206, 0x1148, 0x2011, 0x181f, 0x2214, 0x9294, 0x00ff, 0x9584,
+	0x00ff, 0x9206, 0x1120, 0x2500, 0x080c, 0x7ec0, 0x0048, 0x9584,
+	0x00ff, 0x9080, 0x32e9, 0x200d, 0x918c, 0xff00, 0x810f, 0x9006,
+	0x0005, 0x9080, 0x32e9, 0x200d, 0x918c, 0x00ff, 0x0005, 0x00d6,
+	0x2069, 0x0140, 0x2001, 0x1817, 0x2003, 0x00ef, 0x20a9, 0x0010,
+	0x9006, 0x6852, 0x6856, 0x1f04, 0x27b2, 0x00de, 0x0005, 0x0006,
+	0x00d6, 0x0026, 0x2069, 0x0140, 0x2001, 0x1817, 0x2102, 0x8114,
+	0x8214, 0x8214, 0x8214, 0x20a9, 0x0010, 0x6853, 0x0000, 0x9006,
+	0x82ff, 0x1128, 0x9184, 0x000f, 0x9080, 0xe568, 0x2005, 0x6856,
+	0x8211, 0x1f04, 0x27c7, 0x002e, 0x00de, 0x000e, 0x0005, 0x00c6,
+	0x2061, 0x1800, 0x6030, 0x0110, 0xc09d, 0x0008, 0xc09c, 0x6032,
+	0x00ce, 0x0005, 0x0156, 0x00d6, 0x0026, 0x0016, 0x0006, 0x2069,
+	0x0140, 0x6980, 0x9116, 0x0180, 0x9112, 0x1230, 0x8212, 0x8210,
+	0x22a8, 0x2001, 0x0402, 0x0018, 0x22a8, 0x2001, 0x0404, 0x680e,
+	0x1f04, 0x27f7, 0x680f, 0x0000, 0x000e, 0x001e, 0x002e, 0x00de,
+	0x015e, 0x0005, 0x080c, 0x55db, 0xd0c4, 0x0150, 0xd0a4, 0x0140,
+	0x9006, 0x0046, 0x2020, 0x2009, 0x002e, 0x080c, 0xd885, 0x004e,
+	0x0005, 0x00f6, 0x0016, 0x0026, 0x2079, 0x0140, 0x78c4, 0xd0dc,
+	0x0904, 0x286e, 0x080c, 0x2af6, 0x0660, 0x9084, 0x0700, 0x908e,
+	0x0600, 0x1120, 0x2011, 0x4000, 0x900e, 0x0458, 0x908e, 0x0500,
+	0x1120, 0x2011, 0x8000, 0x900e, 0x0420, 0x908e, 0x0400, 0x1120,
+	0x9016, 0x2009, 0x0001, 0x00e8, 0x908e, 0x0300, 0x1120, 0x9016,
+	0x2009, 0x0002, 0x00b0, 0x908e, 0x0200, 0x1120, 0x9016, 0x2009,
+	0x0004, 0x0078, 0x908e, 0x0100, 0x1548, 0x9016, 0x2009, 0x0008,
+	0x0040, 0x9084, 0x0700, 0x908e, 0x0300, 0x1500, 0x2011, 0x0030,
+	0x0058, 0x2300, 0x9080, 0x0020, 0x2018, 0x080c, 0x84ff, 0x928c,
+	0xff00, 0x0110, 0x2011, 0x00ff, 0x2200, 0x8007, 0x9085, 0x004c,
+	0x78c2, 0x2009, 0x0138, 0x220a, 0x080c, 0x7207, 0x1118, 0x2009,
+	0x1945, 0x220a, 0x002e, 0x001e, 0x00fe, 0x0005, 0x78c3, 0x0000,
+	0x0cc8, 0x0126, 0x2091, 0x2800, 0x0006, 0x0016, 0x0026, 0x2001,
+	0x0170, 0x200c, 0x8000, 0x2014, 0x9184, 0x0003, 0x0110, 0x080c,
+	0x0df3, 0x002e, 0x001e, 0x000e, 0x012e, 0x0005, 0x2001, 0x0171,
+	0x2004, 0xd0dc, 0x0168, 0x2001, 0x0170, 0x200c, 0x918c, 0x00ff,
+	0x918e, 0x004c, 0x1128, 0x200c, 0x918c, 0xff00, 0x810f, 0x0005,
+	0x900e, 0x2001, 0x0227, 0x2004, 0x8007, 0x9084, 0x00ff, 0x8004,
+	0x9108, 0x2001, 0x0226, 0x2004, 0x8007, 0x9084, 0x00ff, 0x8004,
+	0x9108, 0x0005, 0x0018, 0x000c, 0x0018, 0x0020, 0x1000, 0x0800,
+	0x1000, 0x1800, 0x0156, 0x0006, 0x0016, 0x0026, 0x00e6, 0x2001,
+	0x1968, 0x2004, 0x908a, 0x0007, 0x1a0c, 0x0dfa, 0x0033, 0x00ee,
+	0x002e, 0x001e, 0x000e, 0x015e, 0x0005, 0x28cc, 0x28ea, 0x290e,
+	0x2910, 0x2939, 0x293b, 0x293d, 0x2001, 0x0001, 0x080c, 0x2717,
+	0x080c, 0x2b6a, 0x2001, 0x196a, 0x2003, 0x0000, 0x7828, 0x9084,
+	0xe1d7, 0x782a, 0x9006, 0x20a9, 0x0009, 0x080c, 0x2b12, 0x2001,
+	0x1968, 0x2003, 0x0006, 0x2009, 0x001e, 0x2011, 0x293e, 0x080c,
+	0x836c, 0x0005, 0x2009, 0x196d, 0x200b, 0x0000, 0x2001, 0x1972,
+	0x2003, 0x0036, 0x2001, 0x1971, 0x2003, 0x002a, 0x2001, 0x196a,
+	0x2003, 0x0001, 0x9006, 0x080c, 0x2a9b, 0x2001, 0xffff, 0x20a9,
+	0x0009, 0x080c, 0x2b12, 0x2001, 0x1968, 0x2003, 0x0006, 0x2009,
+	0x001e, 0x2011, 0x293e, 0x080c, 0x836c, 0x0005, 0x080c, 0x0dfa,
+	0x2001, 0x1972, 0x2003, 0x0036, 0x2001, 0x196a, 0x2003, 0x0003,
+	0x7a38, 0x9294, 0x0005, 0x9296, 0x0004, 0x0110, 0x9006, 0x0010,
+	0x2001, 0x0001, 0x080c, 0x2a9b, 0x2001, 0x196e, 0x2003, 0x0000,
+	0x2001, 0xffff, 0x20a9, 0x0009, 0x080c, 0x2b12, 0x2001, 0x1968,
+	0x2003, 0x0006, 0x2009, 0x001e, 0x2011, 0x293e, 0x080c, 0x836c,
+	0x0005, 0x080c, 0x0dfa, 0x080c, 0x0dfa, 0x0005, 0x0006, 0x0016,
+	0x0026, 0x00e6, 0x00f6, 0x0156, 0x0126, 0x2091, 0x8000, 0x2079,
+	0x0100, 0x2001, 0x196a, 0x2004, 0x908a, 0x0007, 0x1a0c, 0x0dfa,
+	0x0043, 0x012e, 0x015e, 0x00fe, 0x00ee, 0x002e, 0x001e, 0x000e,
+	0x0005, 0x2960, 0x2980, 0x29c0, 0x29f0, 0x2a14, 0x2a24, 0x2a26,
+	0x080c, 0x2b06, 0x11b0, 0x7850, 0x9084, 0xefff, 0x7852, 0x2009,
+	0x1970, 0x2104, 0x7a38, 0x9294, 0x0005, 0x9296, 0x0004, 0x0110,
+	0xc08d, 0x0008, 0xc085, 0x200a, 0x2001, 0x1968, 0x2003, 0x0001,
+	0x0030, 0x080c, 0x2a4a, 0x2001, 0xffff, 0x080c, 0x28db, 0x0005,
+	0x080c, 0x2a28, 0x05e0, 0x2009, 0x1971, 0x2104, 0x8001, 0x200a,
+	0x080c, 0x2b06, 0x1178, 0x7850, 0x9084, 0xefff, 0x7852, 0x7a38,
+	0x9294, 0x0005, 0x9296, 0x0005, 0x0518, 0x2009, 0x1970, 0x2104,
+	0xc085, 0x200a, 0x2009, 0x196d, 0x2104, 0x8000, 0x200a, 0x9086,
+	0x0005, 0x0118, 0x080c, 0x2a30, 0x00c0, 0x200b, 0x0000, 0x7a38,
+	0x9294, 0x0006, 0x9296, 0x0004, 0x0110, 0x9006, 0x0010, 0x2001,
+	0x0001, 0x080c, 0x2ab8, 0x2001, 0x196a, 0x2003, 0x0002, 0x0028,
+	0x2001, 0x1968, 0x2003, 0x0003, 0x0010, 0x080c, 0x28fd, 0x0005,
+	0x080c, 0x2a28, 0x0560, 0x2009, 0x1971, 0x2104, 0x8001, 0x200a,
+	0x080c, 0x2b06, 0x1168, 0x7850, 0x9084, 0xefff, 0x7852, 0x2001,
+	0x1968, 0x2003, 0x0003, 0x2001, 0x1969, 0x2003, 0x0000, 0x00b8,
+	0x2009, 0x1971, 0x2104, 0x9005, 0x1118, 0x080c, 0x2a6d, 0x0010,
+	0x080c, 0x2a3d, 0x080c, 0x2a30, 0x2009, 0x196d, 0x200b, 0x0000,
+	0x2001, 0x196a, 0x2003, 0x0001, 0x080c, 0x28fd, 0x0000, 0x0005,
+	0x04b9, 0x0508, 0x080c, 0x2b06, 0x11b8, 0x7850, 0x9084, 0xefff,
+	0x7852, 0x2009, 0x196e, 0x2104, 0x8000, 0x200a, 0x9086, 0x0007,
+	0x0108, 0x0078, 0x2001, 0x1973, 0x2003, 0x000a, 0x2009, 0x1970,
+	0x2104, 0xc0fd, 0x200a, 0x0038, 0x0419, 0x2001, 0x196a, 0x2003,
+	0x0004, 0x080c, 0x2928, 0x0005, 0x0099, 0x0168, 0x080c, 0x2b06,
+	0x1138, 0x7850, 0x9084, 0xefff, 0x7852, 0x080c, 0x2914, 0x0018,
+	0x0079, 0x080c, 0x2928, 0x0005, 0x080c, 0x0dfa, 0x080c, 0x0dfa,
+	0x2009, 0x1972, 0x2104, 0x8001, 0x200a, 0x090c, 0x2a89, 0x0005,
+	0x7a38, 0x9294, 0x0005, 0x9296, 0x0005, 0x0110, 0x9006, 0x0010,
+	0x2001, 0x0001, 0x080c, 0x2ab8, 0x0005, 0x7a38, 0x9294, 0x0006,
+	0x9296, 0x0006, 0x0110, 0x9006, 0x0010, 0x2001, 0x0001, 0x080c,
+	0x2a9b, 0x0005, 0x2009, 0x196d, 0x2104, 0x8000, 0x200a, 0x9086,
+	0x0005, 0x0108, 0x0068, 0x200b, 0x0000, 0x7a38, 0x9294, 0x0006,
+	0x9296, 0x0006, 0x0110, 0x9006, 0x0010, 0x2001, 0x0001, 0x04d9,
+	0x7a38, 0x9294, 0x0005, 0x9296, 0x0005, 0x0110, 0x9006, 0x0010,
+	0x2001, 0x0001, 0x080c, 0x2ab8, 0x0005, 0x0086, 0x2001, 0x1970,
+	0x2004, 0x9084, 0x7fff, 0x090c, 0x0dfa, 0x2009, 0x196f, 0x2144,
+	0x8846, 0x280a, 0x9844, 0x0dd8, 0xd08c, 0x1120, 0xd084, 0x1120,
+	0x080c, 0x0dfa, 0x9006, 0x0010, 0x2001, 0x0001, 0x00a1, 0x008e,
+	0x0005, 0x0006, 0x0156, 0x2001, 0x1968, 0x20a9, 0x0009, 0x2003,
+	0x0000, 0x8000, 0x1f04, 0x2a8f, 0x2001, 0x196f, 0x2003, 0x8000,
+	0x015e, 0x000e, 0x0005, 0x00f6, 0x2079, 0x0100, 0x9085, 0x0000,
+	0x0158, 0x7838, 0x9084, 0xfff9, 0x9085, 0x0004, 0x783a, 0x2009,
+	0x1975, 0x210c, 0x795a, 0x0050, 0x7838, 0x9084, 0xfffb, 0x9085,
+	0x0006, 0x783a, 0x2009, 0x1976, 0x210c, 0x795a, 0x00fe, 0x0005,
+	0x00f6, 0x2079, 0x0100, 0x9085, 0x0000, 0x0188, 0x7838, 0x9084,
+	0xfffa, 0x9085, 0x0004, 0x783a, 0x2001, 0x0100, 0x2004, 0x9086,
+	0x000a, 0x1120, 0x7850, 0x9084, 0xfff0, 0x7852, 0x0428, 0x7838,
+	0x9084, 0xfffb, 0x9085, 0x0005, 0x783a, 0x2001, 0x0100, 0x2004,
+	0x9086, 0x000a, 0x11c8, 0x7850, 0x9084, 0xfff0, 0x0016, 0x2009,
+	0x017f, 0x210c, 0x918e, 0x0005, 0x0140, 0x2009, 0x0003, 0x210c,
+	0x918c, 0x0600, 0x918e, 0x0400, 0x0118, 0x9085, 0x000a, 0x0010,
+	0x9085, 0x0000, 0x001e, 0x7852, 0x00fe, 0x0005, 0x0006, 0x2001,
+	0x0100, 0x2004, 0x9082, 0x0007, 0x000e, 0x0005, 0x0006, 0x2001,
+	0x0100, 0x2004, 0x9082, 0x0009, 0x000e, 0x0005, 0x0156, 0x20a9,
+	0x0064, 0x7820, 0x080c, 0x2bb0, 0xd09c, 0x1110, 0x1f04, 0x2b09,
+	0x015e, 0x0005, 0x0126, 0x0016, 0x0006, 0x2091, 0x8000, 0x2001,
+	0x0100, 0x2004, 0x9086, 0x000a, 0x0170, 0x7850, 0x9085, 0x0040,
+	0x7852, 0x7850, 0x9084, 0xfbcf, 0x7852, 0x080c, 0x2bb0, 0x9085,
+	0x2000, 0x7852, 0x0020, 0x080c, 0x2cc2, 0x080c, 0x2cf5, 0x000e,
+	0x2008, 0x9186, 0x0000, 0x1118, 0x783b, 0x0007, 0x0090, 0x9186,
+	0x0001, 0x1118, 0x783b, 0x0006, 0x0060, 0x9186, 0x0002, 0x1118,
+	0x783b, 0x0005, 0x0030, 0x9186, 0x0003, 0x1118, 0x783b, 0x0004,
+	0x0000, 0x0006, 0x1d04, 0x2b4a, 0x080c, 0x838e, 0x1f04, 0x2b4a,
+	0x2001, 0x0100, 0x2004, 0x9086, 0x000a, 0x0160, 0x7850, 0x9085,
+	0x0400, 0x9084, 0xdfbf, 0x7852, 0x080c, 0x2bb0, 0x9085, 0x1000,
+	0x7852, 0x0020, 0x7850, 0x9085, 0x1000, 0x7852, 0x000e, 0x001e,
+	0x012e, 0x0005, 0x2001, 0x0100, 0x2004, 0x9086, 0x000a, 0x0128,
+	0x7850, 0x9084, 0xffcf, 0x7852, 0x0010, 0x080c, 0x2cf5, 0x0005,
+	0x0006, 0x0156, 0x00f6, 0x2079, 0x0100, 0x20a9, 0x000a, 0x7854,
+	0xd0ac, 0x1130, 0x7820, 0xd0e4, 0x1140, 0x1f04, 0x2b82, 0x0028,
+	0x7854, 0xd08c, 0x1110, 0x1f04, 0x2b88, 0x00fe, 0x015e, 0x000e,
+	0x0005, 0x1d04, 0x2b91, 0x080c, 0x838e, 0x1f04, 0x2b91, 0x0005,
+	0x0006, 0x2001, 0x1974, 0x2004, 0x9086, 0x0000, 0x000e, 0x0005,
+	0x0006, 0x2001, 0x1974, 0x2004, 0x9086, 0x0001, 0x000e, 0x0005,
+	0x0006, 0x2001, 0x1974, 0x2004, 0x9086, 0x0002, 0x000e, 0x0005,
+	0xa001, 0xa001, 0xa001, 0xa001, 0xa001, 0x0005, 0x0006, 0x2001,
+	0x1980, 0x2102, 0x000e, 0x0005, 0x2009, 0x0171, 0x2104, 0xd0dc,
+	0x0140, 0x2009, 0x0170, 0x2104, 0x200b, 0x0080, 0xa001, 0xa001,
+	0x200a, 0x0005, 0x0036, 0x0046, 0x2001, 0x0141, 0x200c, 0x918c,
+	0xff00, 0x9186, 0x2100, 0x0140, 0x9186, 0x2000, 0x0170, 0x9186,
+	0x0100, 0x1904, 0x2c29, 0x0048, 0x0016, 0x2009, 0x1a5a, 0x2104,
+	0x8000, 0x0208, 0x200a, 0x001e, 0x04f0, 0x2009, 0x00a2, 0x080c,
+	0x0e75, 0x2019, 0x0160, 0x2324, 0x2011, 0x0003, 0x2009, 0x0169,
+	0x2104, 0x9084, 0x0007, 0x210c, 0x918c, 0x0007, 0x910e, 0x1db0,
+	0x9086, 0x0003, 0x1548, 0x2304, 0x0066, 0x0076, 0x2031, 0x0002,
+	0x233c, 0x973e, 0x0148, 0x8631, 0x1dd8, 0x2031, 0x1a5b, 0x263c,
+	0x8738, 0x0208, 0x2732, 0x2304, 0x007e, 0x006e, 0x9402, 0x02a0,
+	0x19d0, 0x8211, 0x19d8, 0x84ff, 0x0170, 0x2001, 0x0141, 0x200c,
+	0x918c, 0xff00, 0x9186, 0x0100, 0x0130, 0x2009, 0x180c, 0x2104,
+	0xc0dd, 0x200a, 0x0008, 0x0421, 0x2001, 0x1959, 0x200c, 0x080c,
+	0x0e75, 0x004e, 0x003e, 0x0005, 0x2001, 0x180c, 0x2004, 0xd0dc,
+	0x01b0, 0x2001, 0x0160, 0x2004, 0x9005, 0x0140, 0x2001, 0x0141,
+	0x2004, 0x9084, 0xff00, 0x9086, 0x0100, 0x1148, 0x0126, 0x2091,
+	0x8000, 0x0016, 0x0026, 0x0021, 0x002e, 0x001e, 0x012e, 0x0005,
+	0x00c6, 0x2061, 0x0100, 0x6014, 0x0006, 0x2001, 0x0161, 0x2003,
+	0x0000, 0x6017, 0x0018, 0xa001, 0xa001, 0x602f, 0x0008, 0x6104,
+	0x918e, 0x0010, 0x6106, 0x918e, 0x0010, 0x6106, 0x6017, 0x0040,
+	0x04b9, 0x001e, 0x9184, 0x0003, 0x01e0, 0x0036, 0x0016, 0x2019,
+	0x0141, 0x6124, 0x918c, 0x0028, 0x1120, 0x2304, 0x9084, 0x2800,
+	0x0dc0, 0x001e, 0x919c, 0xffe4, 0x9184, 0x0001, 0x0118, 0x9385,
+	0x0009, 0x6016, 0x9184, 0x0002, 0x0118, 0x9385, 0x0012, 0x6016,
+	0x003e, 0x2001, 0x180c, 0x200c, 0xc1dc, 0x2102, 0x00ce, 0x0005,
+	0x0016, 0x0026, 0x080c, 0x7221, 0x0108, 0xc0bc, 0x2009, 0x0140,
+	0x2114, 0x9294, 0x0001, 0x9215, 0x220a, 0x002e, 0x001e, 0x0005,
+	0x0016, 0x0026, 0x2009, 0x0140, 0x2114, 0x9294, 0x0001, 0x9285,
+	0x1000, 0x200a, 0x220a, 0x002e, 0x001e, 0x0005, 0x0016, 0x0026,
+	0x2009, 0x0140, 0x2114, 0x9294, 0x0001, 0x9215, 0x220a, 0x002e,
+	0x001e, 0x0005, 0x0006, 0x0016, 0x2009, 0x0140, 0x2104, 0x1128,
+	0x080c, 0x7221, 0x0110, 0xc0bc, 0x0008, 0xc0bd, 0x200a, 0x001e,
+	0x000e, 0x0005, 0x0016, 0x0026, 0x0036, 0x00c6, 0x2061, 0x0100,
+	0x6050, 0x9084, 0xfbff, 0x9085, 0x0040, 0x6052, 0x20a9, 0x0002,
+	0x080c, 0x2b91, 0x6050, 0x9085, 0x0400, 0x9084, 0xff9f, 0x6052,
+	0x20a9, 0x0005, 0x080c, 0x2b91, 0x6054, 0xd0bc, 0x090c, 0x0dfa,
+	0x20a9, 0x0005, 0x080c, 0x2b91, 0x6054, 0xd0ac, 0x090c, 0x0dfa,
+	0x2009, 0x1987, 0x9084, 0x7e00, 0x8007, 0x8004, 0x8004, 0x200a,
+	0x00ce, 0x003e, 0x002e, 0x001e, 0x0005, 0x0006, 0x00c6, 0x2061,
+	0x0100, 0x6050, 0xc0cd, 0x6052, 0x00ce, 0x000e, 0x0005, 0x2f6b,
+	0x2f6b, 0x2d8f, 0x2d8f, 0x2d9b, 0x2d9b, 0x2da7, 0x2da7, 0x2db5,
+	0x2db5, 0x2dc1, 0x2dc1, 0x2dcf, 0x2dcf, 0x2ddd, 0x2ddd, 0x2def,
+	0x2def, 0x2dfb, 0x2dfb, 0x2e09, 0x2e09, 0x2e27, 0x2e27, 0x2e47,
+	0x2e47, 0x2e17, 0x2e17, 0x2e37, 0x2e37, 0x2e55, 0x2e55, 0x2ded,
+	0x2ded, 0x2ded, 0x2ded, 0x2ded, 0x2ded, 0x2ded, 0x2ded, 0x2ded,
+	0x2ded, 0x2ded, 0x2ded, 0x2ded, 0x2ded, 0x2ded, 0x2ded, 0x2ded,
+	0x2ded, 0x2ded, 0x2ded, 0x2ded, 0x2ded, 0x2ded, 0x2ded, 0x2ded,
+	0x2ded, 0x2ded, 0x2ded, 0x2ded, 0x2ded, 0x2ded, 0x2ded, 0x2e67,
+	0x2e67, 0x2e73, 0x2e73, 0x2e81, 0x2e81, 0x2e8f, 0x2e8f, 0x2e9f,
+	0x2e9f, 0x2ead, 0x2ead, 0x2ebd, 0x2ebd, 0x2ecd, 0x2ecd, 0x2edf,
+	0x2edf, 0x2eed, 0x2eed, 0x2efd, 0x2efd, 0x2f1f, 0x2f1f, 0x2f41,
+	0x2f41, 0x2f0d, 0x2f0d, 0x2f30, 0x2f30, 0x2f50, 0x2f50, 0x2ded,
+	0x2ded, 0x2ded, 0x2ded, 0x2ded, 0x2ded, 0x2ded, 0x2ded, 0x2ded,
+	0x2ded, 0x2ded, 0x2ded, 0x2ded, 0x2ded, 0x2ded, 0x2ded, 0x2ded,
+	0x2ded, 0x2ded, 0x2ded, 0x2ded, 0x2ded, 0x2ded, 0x2ded, 0x2ded,
+	0x2ded, 0x2ded, 0x2ded, 0x2ded, 0x2ded, 0x2ded, 0x2ded, 0x2ded,
+	0x2ded, 0x2ded, 0x2ded, 0x2ded, 0x2ded, 0x2ded, 0x2ded, 0x2ded,
+	0x2ded, 0x2ded, 0x2ded, 0x2ded, 0x2ded, 0x2ded, 0x2ded, 0x0106,
+	0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c,
+	0x23c6, 0x0804, 0x2f63, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
+	0x0136, 0x0146, 0x0156, 0x080c, 0x21cd, 0x0804, 0x2f63, 0x0106,
+	0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c,
+	0x21cd, 0x080c, 0x23c6, 0x0804, 0x2f63, 0x0106, 0x0006, 0x0126,
+	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2208, 0x0804,
+	0x2f63, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
+	0x0156, 0x080c, 0x23c6, 0x080c, 0x2208, 0x0804, 0x2f63, 0x0106,
+	0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c,
+	0x21cd, 0x080c, 0x2208, 0x0804, 0x2f63, 0x0106, 0x0006, 0x0126,
+	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x21cd, 0x080c,
+	0x23c6, 0x080c, 0x2208, 0x0804, 0x2f63, 0xa001, 0x0cf0, 0x0106,
+	0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c,
+	0x1370, 0x0804, 0x2f63, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
+	0x0136, 0x0146, 0x0156, 0x080c, 0x23c6, 0x080c, 0x1370, 0x0804,
+	0x2f63, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
+	0x0156, 0x080c, 0x21cd, 0x080c, 0x1370, 0x0804, 0x2f63, 0x0106,
+	0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c,
+	0x23c6, 0x080c, 0x1370, 0x080c, 0x2208, 0x0804, 0x2f63, 0x0106,
+	0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c,
+	0x21cd, 0x080c, 0x23c6, 0x080c, 0x1370, 0x0804, 0x2f63, 0x0106,
+	0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c,
+	0x21cd, 0x080c, 0x1370, 0x080c, 0x2208, 0x0804, 0x2f63, 0x0106,
+	0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c,
+	0x1370, 0x080c, 0x2208, 0x0804, 0x2f63, 0x0106, 0x0006, 0x0126,
+	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x21cd, 0x080c,
+	0x23c6, 0x080c, 0x1370, 0x080c, 0x2208, 0x0804, 0x2f63, 0x0106,
 	0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c,
-	0x2138, 0x0804, 0x2dbf, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x2138, 0x080c, 0x2320, 0x0804,
-	0x2dbf, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x0156, 0x080c, 0x2173, 0x0804, 0x2dbf, 0x0106, 0x0006, 0x0126,
-	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2320, 0x080c,
-	0x2173, 0x0804, 0x2dbf, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x2138, 0x080c, 0x2173, 0x0804,
-	0x2dbf, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x0156, 0x080c, 0x2138, 0x080c, 0x2320, 0x080c, 0x2173, 0x0804,
-	0x2dbf, 0xa001, 0x0cf0, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x130c, 0x0804, 0x2dbf, 0x0106,
+	0x2871, 0x0804, 0x2f63, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
+	0x0136, 0x0146, 0x0156, 0x080c, 0x2871, 0x080c, 0x23c6, 0x0804,
+	0x2f63, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
+	0x0156, 0x080c, 0x2871, 0x080c, 0x21cd, 0x0804, 0x2f63, 0x0106,
 	0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c,
-	0x2320, 0x080c, 0x130c, 0x0804, 0x2dbf, 0x0106, 0x0006, 0x0126,
-	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2138, 0x080c,
-	0x130c, 0x0804, 0x2dbf, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x2320, 0x080c, 0x130c, 0x080c,
-	0x2173, 0x0804, 0x2dbf, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x2138, 0x080c, 0x2320, 0x080c,
-	0x130c, 0x0804, 0x2dbf, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x2138, 0x080c, 0x130c, 0x080c,
-	0x2173, 0x0804, 0x2dbf, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x130c, 0x080c, 0x2173, 0x0804,
-	0x2dbf, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x0156, 0x080c, 0x2138, 0x080c, 0x2320, 0x080c, 0x130c, 0x080c,
-	0x2173, 0x0804, 0x2dbf, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x2773, 0x0804, 0x2dbf, 0x0106,
+	0x2871, 0x080c, 0x21cd, 0x080c, 0x23c6, 0x0804, 0x2f63, 0x0106,
 	0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c,
-	0x2773, 0x080c, 0x2320, 0x0804, 0x2dbf, 0x0106, 0x0006, 0x0126,
-	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2773, 0x080c,
-	0x2138, 0x0804, 0x2dbf, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x2773, 0x080c, 0x2138, 0x080c,
-	0x2320, 0x0804, 0x2dbf, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x2773, 0x080c, 0x2173, 0x0804,
-	0x2dbf, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x0156, 0x080c, 0x2773, 0x080c, 0x2320, 0x080c, 0x2173, 0x0804,
-	0x2dbf, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x0156, 0x080c, 0x2773, 0x080c, 0x2138, 0x080c, 0x2173, 0x0804,
-	0x2dbf, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x0156, 0x080c, 0x2773, 0x080c, 0x2138, 0x080c, 0x2320, 0x080c,
-	0x2173, 0x0804, 0x2dbf, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x2773, 0x080c, 0x130c, 0x0804,
-	0x2dbf, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x0156, 0x080c, 0x2773, 0x080c, 0x2320, 0x080c, 0x130c, 0x0804,
-	0x2dbf, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x0156, 0x080c, 0x2773, 0x080c, 0x2138, 0x080c, 0x130c, 0x0804,
-	0x2dbf, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x0156, 0x080c, 0x2773, 0x080c, 0x2320, 0x080c, 0x130c, 0x080c,
-	0x2173, 0x0804, 0x2dbf, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x2773, 0x080c, 0x2138, 0x080c,
-	0x2320, 0x080c, 0x130c, 0x0498, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2773, 0x080c, 0x2138,
-	0x080c, 0x130c, 0x080c, 0x2173, 0x0410, 0x0106, 0x0006, 0x0126,
-	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2773, 0x080c,
-	0x130c, 0x080c, 0x2173, 0x0098, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2773, 0x080c, 0x2138,
-	0x080c, 0x2320, 0x080c, 0x130c, 0x080c, 0x2173, 0x0000, 0x015e,
-	0x014e, 0x013e, 0x01de, 0x01ce, 0x012e, 0x000e, 0x010e, 0x000d,
-	0x00b6, 0x00c6, 0x0026, 0x0046, 0x9026, 0x080c, 0x6538, 0x1904,
-	0x2ece, 0x72d8, 0x2001, 0x1954, 0x2004, 0x9005, 0x1110, 0xd29c,
-	0x0148, 0xd284, 0x1138, 0xd2bc, 0x1904, 0x2ece, 0x080c, 0x2ed3,
-	0x0804, 0x2ece, 0xd2cc, 0x1904, 0x2ece, 0x080c, 0x6faa, 0x1120,
-	0x70ab, 0xffff, 0x0804, 0x2ece, 0xd294, 0x0120, 0x70ab, 0xffff,
-	0x0804, 0x2ece, 0x080c, 0x313b, 0x0160, 0x080c, 0xc23b, 0x0128,
-	0x2001, 0x1817, 0x203c, 0x0804, 0x2e60, 0x70ab, 0xffff, 0x0804,
-	0x2ece, 0x2001, 0x1817, 0x203c, 0x7290, 0xd284, 0x0904, 0x2e60,
-	0xd28c, 0x1904, 0x2e60, 0x0036, 0x73a8, 0x938e, 0xffff, 0x1110,
-	0x2019, 0x0001, 0x8314, 0x92e0, 0x1c80, 0x2c04, 0x938c, 0x0001,
-	0x0120, 0x9084, 0xff00, 0x8007, 0x0010, 0x9084, 0x00ff, 0x970e,
-	0x05a8, 0x908e, 0x0000, 0x0590, 0x908e, 0x00ff, 0x1150, 0x7230,
-	0xd284, 0x1588, 0x7290, 0xc28d, 0x7292, 0x70ab, 0xffff, 0x003e,
-	0x0478, 0x0026, 0x2011, 0x0010, 0x080c, 0x659e, 0x002e, 0x0118,
-	0x70ab, 0xffff, 0x0410, 0x900e, 0x080c, 0x2670, 0x080c, 0x61f6,
-	0x11c0, 0x080c, 0x657a, 0x1168, 0x7030, 0xd08c, 0x0130, 0xb800,
-	0xd0bc, 0x0138, 0x080c, 0x6476, 0x0120, 0x080c, 0x2eec, 0x0148,
-	0x0028, 0x080c, 0x302c, 0x080c, 0x2f18, 0x0118, 0x8318, 0x0804,
-	0x2e12, 0x73aa, 0x0010, 0x70ab, 0xffff, 0x003e, 0x0804, 0x2ece,
-	0x9780, 0x3145, 0x203d, 0x97bc, 0xff00, 0x873f, 0x2041, 0x007e,
-	0x70a8, 0x9096, 0xffff, 0x1118, 0x900e, 0x28a8, 0x0050, 0x9812,
-	0x0220, 0x2008, 0x9802, 0x20a8, 0x0020, 0x70ab, 0xffff, 0x0804,
-	0x2ece, 0x2700, 0x0156, 0x0016, 0x9106, 0x0904, 0x2ec3, 0x0026,
-	0x2011, 0x0010, 0x080c, 0x659e, 0x002e, 0x0120, 0x2009, 0xffff,
-	0x0804, 0x2ecb, 0xc484, 0x080c, 0x6256, 0x0138, 0x080c, 0xc23b,
-	0x1590, 0x080c, 0x61f6, 0x15b8, 0x0008, 0xc485, 0x080c, 0x657a,
-	0x1130, 0x7030, 0xd08c, 0x01f8, 0xb800, 0xd0bc, 0x11e0, 0x7290,
-	0xd28c, 0x0180, 0x080c, 0x657a, 0x9082, 0x0006, 0x02e0, 0xd484,
-	0x1118, 0x080c, 0x621a, 0x0028, 0x080c, 0x30b7, 0x01a0, 0x080c,
-	0x30e2, 0x0088, 0x080c, 0x302c, 0x080c, 0xc23b, 0x1160, 0x080c,
-	0x2f18, 0x0188, 0x0040, 0x080c, 0xc23b, 0x1118, 0x080c, 0x30b7,
-	0x0110, 0x0451, 0x0140, 0x001e, 0x8108, 0x015e, 0x1f04, 0x2e79,
-	0x70ab, 0xffff, 0x0018, 0x001e, 0x015e, 0x71aa, 0x004e, 0x002e,
-	0x00ce, 0x00be, 0x0005, 0x00c6, 0x0016, 0x70ab, 0x0001, 0x2009,
-	0x007e, 0x080c, 0x61f6, 0x1168, 0xb813, 0x00ff, 0xb817, 0xfffe,
-	0x080c, 0x302c, 0x04a9, 0x0128, 0x70d8, 0xc0bd, 0x70da, 0x080c,
-	0xbf8c, 0x001e, 0x00ce, 0x0005, 0x0016, 0x0076, 0x00d6, 0x00c6,
-	0x2001, 0x1860, 0x2004, 0x9084, 0x00ff, 0xb842, 0x080c, 0x9e7c,
-	0x01d0, 0x2b00, 0x6012, 0x080c, 0xbfb5, 0x6023, 0x0001, 0x9006,
-	0x080c, 0x6193, 0x2001, 0x0000, 0x080c, 0x61a7, 0x0126, 0x2091,
-	0x8000, 0x70a4, 0x8000, 0x70a6, 0x012e, 0x2009, 0x0004, 0x080c,
-	0x9ea9, 0x9085, 0x0001, 0x00ce, 0x00de, 0x007e, 0x001e, 0x0005,
+	0x2871, 0x080c, 0x2208, 0x0804, 0x2f63, 0x0106, 0x0006, 0x0126,
+	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2871, 0x080c,
+	0x23c6, 0x080c, 0x2208, 0x0804, 0x2f63, 0x0106, 0x0006, 0x0126,
+	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2871, 0x080c,
+	0x21cd, 0x080c, 0x2208, 0x0804, 0x2f63, 0x0106, 0x0006, 0x0126,
+	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2871, 0x080c,
+	0x21cd, 0x080c, 0x23c6, 0x080c, 0x2208, 0x0804, 0x2f63, 0x0106,
+	0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c,
+	0x2871, 0x080c, 0x1370, 0x0804, 0x2f63, 0x0106, 0x0006, 0x0126,
+	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2871, 0x080c,
+	0x23c6, 0x080c, 0x1370, 0x0804, 0x2f63, 0x0106, 0x0006, 0x0126,
+	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2871, 0x080c,
+	0x21cd, 0x080c, 0x1370, 0x0804, 0x2f63, 0x0106, 0x0006, 0x0126,
+	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2871, 0x080c,
+	0x23c6, 0x080c, 0x1370, 0x080c, 0x2208, 0x0804, 0x2f63, 0x0106,
+	0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c,
+	0x2871, 0x080c, 0x21cd, 0x080c, 0x23c6, 0x080c, 0x1370, 0x0498,
+	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
+	0x080c, 0x2871, 0x080c, 0x21cd, 0x080c, 0x1370, 0x080c, 0x2208,
+	0x0410, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146,
+	0x0156, 0x080c, 0x2871, 0x080c, 0x1370, 0x080c, 0x2208, 0x0098,
+	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
+	0x080c, 0x2871, 0x080c, 0x21cd, 0x080c, 0x23c6, 0x080c, 0x1370,
+	0x080c, 0x2208, 0x0000, 0x015e, 0x014e, 0x013e, 0x01de, 0x01ce,
+	0x012e, 0x000e, 0x010e, 0x000d, 0x00b6, 0x00c6, 0x0026, 0x0046,
+	0x9026, 0x080c, 0x6781, 0x1904, 0x3072, 0x72d8, 0x2001, 0x1954,
+	0x2004, 0x9005, 0x1110, 0xd29c, 0x0148, 0xd284, 0x1138, 0xd2bc,
+	0x1904, 0x3072, 0x080c, 0x3077, 0x0804, 0x3072, 0xd2cc, 0x1904,
+	0x3072, 0x080c, 0x7207, 0x1120, 0x70ab, 0xffff, 0x0804, 0x3072,
+	0xd294, 0x0120, 0x70ab, 0xffff, 0x0804, 0x3072, 0x080c, 0x32df,
+	0x0160, 0x080c, 0xc539, 0x0128, 0x2001, 0x1817, 0x203c, 0x0804,
+	0x3004, 0x70ab, 0xffff, 0x0804, 0x3072, 0x2001, 0x1817, 0x203c,
+	0x7290, 0xd284, 0x0904, 0x3004, 0xd28c, 0x1904, 0x3004, 0x0036,
+	0x73a8, 0x938e, 0xffff, 0x1110, 0x2019, 0x0001, 0x8314, 0x92e0,
+	0x1c80, 0x2c04, 0x938c, 0x0001, 0x0120, 0x9084, 0xff00, 0x8007,
+	0x0010, 0x9084, 0x00ff, 0x970e, 0x05a8, 0x908e, 0x0000, 0x0590,
+	0x908e, 0x00ff, 0x1150, 0x7230, 0xd284, 0x1588, 0x7290, 0xc28d,
+	0x7292, 0x70ab, 0xffff, 0x003e, 0x0478, 0x0026, 0x2011, 0x0010,
+	0x080c, 0x67e7, 0x002e, 0x0118, 0x70ab, 0xffff, 0x0410, 0x900e,
+	0x080c, 0x276e, 0x080c, 0x643f, 0x11c0, 0x080c, 0x67c3, 0x1168,
+	0x7030, 0xd08c, 0x0130, 0xb800, 0xd0bc, 0x0138, 0x080c, 0x66bf,
+	0x0120, 0x080c, 0x3090, 0x0148, 0x0028, 0x080c, 0x31d0, 0x080c,
+	0x30bc, 0x0118, 0x8318, 0x0804, 0x2fb6, 0x73aa, 0x0010, 0x70ab,
+	0xffff, 0x003e, 0x0804, 0x3072, 0x9780, 0x32e9, 0x203d, 0x97bc,
+	0xff00, 0x873f, 0x2041, 0x007e, 0x70a8, 0x9096, 0xffff, 0x1118,
+	0x900e, 0x28a8, 0x0050, 0x9812, 0x0220, 0x2008, 0x9802, 0x20a8,
+	0x0020, 0x70ab, 0xffff, 0x0804, 0x3072, 0x2700, 0x0156, 0x0016,
+	0x9106, 0x0904, 0x3067, 0x0026, 0x2011, 0x0010, 0x080c, 0x67e7,
+	0x002e, 0x0120, 0x2009, 0xffff, 0x0804, 0x306f, 0xc484, 0x080c,
+	0x649f, 0x0138, 0x080c, 0xc539, 0x1590, 0x080c, 0x643f, 0x15b8,
+	0x0008, 0xc485, 0x080c, 0x67c3, 0x1130, 0x7030, 0xd08c, 0x01f8,
+	0xb800, 0xd0bc, 0x11e0, 0x7290, 0xd28c, 0x0180, 0x080c, 0x67c3,
+	0x9082, 0x0006, 0x02e0, 0xd484, 0x1118, 0x080c, 0x6463, 0x0028,
+	0x080c, 0x325b, 0x01a0, 0x080c, 0x3286, 0x0088, 0x080c, 0x31d0,
+	0x080c, 0xc539, 0x1160, 0x080c, 0x30bc, 0x0188, 0x0040, 0x080c,
+	0xc539, 0x1118, 0x080c, 0x325b, 0x0110, 0x0451, 0x0140, 0x001e,
+	0x8108, 0x015e, 0x1f04, 0x301d, 0x70ab, 0xffff, 0x0018, 0x001e,
+	0x015e, 0x71aa, 0x004e, 0x002e, 0x00ce, 0x00be, 0x0005, 0x00c6,
+	0x0016, 0x70ab, 0x0001, 0x2009, 0x007e, 0x080c, 0x643f, 0x1168,
+	0xb813, 0x00ff, 0xb817, 0xfffe, 0x080c, 0x31d0, 0x04a9, 0x0128,
+	0x70d8, 0xc0bd, 0x70da, 0x080c, 0xc28a, 0x001e, 0x00ce, 0x0005,
 	0x0016, 0x0076, 0x00d6, 0x00c6, 0x2001, 0x1860, 0x2004, 0x9084,
-	0x00ff, 0xb842, 0x080c, 0x9e7c, 0x0548, 0x2b00, 0x6012, 0xb800,
-	0xc0c4, 0xb802, 0xb8a0, 0x9086, 0x007e, 0x0140, 0xb804, 0x9084,
-	0x00ff, 0x9086, 0x0006, 0x1110, 0x080c, 0x2fe7, 0x080c, 0xbfb5,
-	0x6023, 0x0001, 0x9006, 0x080c, 0x6193, 0x2001, 0x0002, 0x080c,
-	0x61a7, 0x0126, 0x2091, 0x8000, 0x70a4, 0x8000, 0x70a6, 0x012e,
-	0x2009, 0x0002, 0x080c, 0x9ea9, 0x9085, 0x0001, 0x00ce, 0x00de,
-	0x007e, 0x001e, 0x0005, 0x00b6, 0x00c6, 0x0026, 0x2009, 0x0080,
-	0x080c, 0x61f6, 0x1140, 0xb813, 0x00ff, 0xb817, 0xfffc, 0x0039,
-	0x0110, 0x70df, 0xffff, 0x002e, 0x00ce, 0x00be, 0x0005, 0x0016,
-	0x0076, 0x00d6, 0x00c6, 0x080c, 0x9dd9, 0x01d0, 0x2b00, 0x6012,
-	0x080c, 0xbfb5, 0x6023, 0x0001, 0x9006, 0x080c, 0x6193, 0x2001,
-	0x0002, 0x080c, 0x61a7, 0x0126, 0x2091, 0x8000, 0x70e0, 0x8000,
-	0x70e2, 0x012e, 0x2009, 0x0002, 0x080c, 0x9ea9, 0x9085, 0x0001,
-	0x00ce, 0x00de, 0x007e, 0x001e, 0x0005, 0x00c6, 0x00d6, 0x0126,
-	0x2091, 0x8000, 0x2009, 0x007f, 0x080c, 0x61f6, 0x11b8, 0xb813,
-	0x00ff, 0xb817, 0xfffd, 0xb8bf, 0x0004, 0x080c, 0x9dd9, 0x0170,
-	0x2b00, 0x6012, 0x6316, 0x6023, 0x0001, 0x620a, 0x080c, 0xbfb5,
-	0x2009, 0x0022, 0x080c, 0x9ea9, 0x9085, 0x0001, 0x012e, 0x00de,
-	0x00ce, 0x0005, 0x00e6, 0x00c6, 0x0066, 0x0036, 0x0026, 0x00b6,
-	0x21f0, 0x080c, 0x858d, 0x080c, 0x8517, 0x080c, 0x9c82, 0x080c,
-	0xad86, 0x3e08, 0x2130, 0x81ff, 0x0120, 0x20a9, 0x007e, 0x900e,
-	0x0018, 0x20a9, 0x007f, 0x900e, 0x0016, 0x080c, 0x6256, 0x1140,
-	0x9686, 0x0002, 0x1118, 0xb800, 0xd0bc, 0x1110, 0x080c, 0x5cff,
-	0x001e, 0x8108, 0x1f04, 0x2fcc, 0x9686, 0x0001, 0x190c, 0x310f,
-	0x00be, 0x002e, 0x003e, 0x006e, 0x00ce, 0x00ee, 0x0005, 0x00e6,
-	0x00c6, 0x0046, 0x0036, 0x0026, 0x0016, 0x00b6, 0x6210, 0x2258,
-	0xbaa0, 0x0026, 0x2019, 0x0029, 0x080c, 0x8582, 0x0076, 0x2039,
-	0x0000, 0x080c, 0x8470, 0x2c08, 0x080c, 0xd2d5, 0x007e, 0x001e,
-	0xba10, 0xbb14, 0xbcb0, 0x080c, 0x5cff, 0xba12, 0xbb16, 0xbcb2,
-	0x00be, 0x001e, 0x002e, 0x003e, 0x004e, 0x00ce, 0x00ee, 0x0005,
-	0x00e6, 0x0006, 0x00b6, 0x6010, 0x2058, 0xb8a0, 0x00be, 0x9086,
-	0x0080, 0x0150, 0x2071, 0x1800, 0x70a4, 0x9005, 0x0110, 0x8001,
-	0x70a6, 0x000e, 0x00ee, 0x0005, 0x2071, 0x1800, 0x70e0, 0x9005,
-	0x0dc0, 0x8001, 0x70e2, 0x0ca8, 0xb800, 0xc08c, 0xb802, 0x0005,
-	0x00f6, 0x00e6, 0x00c6, 0x00b6, 0x0046, 0x0036, 0x0026, 0x0016,
-	0x0156, 0x2178, 0x81ff, 0x1118, 0x20a9, 0x0001, 0x0070, 0x080c,
-	0x539a, 0xd0c4, 0x0138, 0x0030, 0x9006, 0x2020, 0x2009, 0x002d,
-	0x080c, 0xd564, 0x20a9, 0x0800, 0x9016, 0x0026, 0x928e, 0x007e,
-	0x0904, 0x3096, 0x928e, 0x007f, 0x0904, 0x3096, 0x928e, 0x0080,
-	0x05e8, 0x9288, 0x1000, 0x210c, 0x81ff, 0x05c0, 0x8fff, 0x1148,
-	0x2001, 0x1966, 0x0006, 0x2003, 0x0001, 0x04f1, 0x000e, 0x2003,
-	0x0000, 0x00b6, 0x00c6, 0x2158, 0x2001, 0x0001, 0x080c, 0x6544,
-	0x00ce, 0x00be, 0x2019, 0x0029, 0x080c, 0x8582, 0x0076, 0x2039,
-	0x0000, 0x080c, 0x8470, 0x00b6, 0x00c6, 0x0026, 0x2158, 0xba04,
-	0x9294, 0x00ff, 0x9286, 0x0006, 0x1118, 0xb807, 0x0404, 0x0028,
-	0x2001, 0x0004, 0x8007, 0x9215, 0xba06, 0x002e, 0x00ce, 0x00be,
-	0x0016, 0x2c08, 0x080c, 0xd2d5, 0x001e, 0x007e, 0x002e, 0x8210,
-	0x1f04, 0x304d, 0x015e, 0x001e, 0x002e, 0x003e, 0x004e, 0x00be,
-	0x00ce, 0x00ee, 0x00fe, 0x0005, 0x0046, 0x0026, 0x0016, 0x080c,
-	0x539a, 0xd0c4, 0x0140, 0xd0a4, 0x0130, 0x9006, 0x2220, 0x2009,
-	0x0029, 0x080c, 0xd564, 0x001e, 0x002e, 0x004e, 0x0005, 0x0016,
-	0x0026, 0x0036, 0x00c6, 0x7290, 0x82ff, 0x01e8, 0x080c, 0x6572,
-	0x11d0, 0x2100, 0x080c, 0x26a3, 0x81ff, 0x01b8, 0x2019, 0x0001,
-	0x8314, 0x92e0, 0x1c80, 0x2c04, 0xd384, 0x0120, 0x9084, 0xff00,
-	0x8007, 0x0010, 0x9084, 0x00ff, 0x9116, 0x0138, 0x9096, 0x00ff,
-	0x0110, 0x8318, 0x0c68, 0x9085, 0x0001, 0x00ce, 0x003e, 0x002e,
-	0x001e, 0x0005, 0x0016, 0x00c6, 0x0126, 0x2091, 0x8000, 0x0036,
-	0x2019, 0x0029, 0x00a9, 0x003e, 0x9180, 0x1000, 0x2004, 0x9065,
-	0x0158, 0x0016, 0x00c6, 0x2061, 0x1a87, 0x001e, 0x6112, 0x080c,
-	0x2fe7, 0x001e, 0x080c, 0x621a, 0x012e, 0x00ce, 0x001e, 0x0005,
-	0x0016, 0x0026, 0x2110, 0x080c, 0x9915, 0x080c, 0xd81c, 0x002e,
-	0x001e, 0x0005, 0x2001, 0x1836, 0x2004, 0xd0cc, 0x0005, 0x00c6,
-	0x00b6, 0x080c, 0x6faa, 0x1118, 0x20a9, 0x0800, 0x0010, 0x20a9,
-	0x0782, 0x080c, 0x6faa, 0x1110, 0x900e, 0x0010, 0x2009, 0x007e,
-	0x9180, 0x1000, 0x2004, 0x905d, 0x0130, 0x86ff, 0x0110, 0xb800,
-	0xd0bc, 0x090c, 0x621a, 0x8108, 0x1f04, 0x3120, 0x2061, 0x1800,
-	0x607b, 0x0000, 0x607c, 0x9084, 0x00ff, 0x607e, 0x60af, 0x0000,
-	0x00be, 0x00ce, 0x0005, 0x2001, 0x187d, 0x2004, 0xd0bc, 0x0005,
-	0x2011, 0x185c, 0x2214, 0xd2ec, 0x0005, 0x7eef, 0x7de8, 0x7ce4,
-	0x80e2, 0x7be1, 0x80e0, 0x80dc, 0x80da, 0x7ad9, 0x80d6, 0x80d5,
-	0x80d4, 0x80d3, 0x80d2, 0x80d1, 0x79ce, 0x78cd, 0x80cc, 0x80cb,
-	0x80ca, 0x80c9, 0x80c7, 0x80c6, 0x77c5, 0x76c3, 0x80bc, 0x80ba,
-	0x75b9, 0x80b6, 0x74b5, 0x73b4, 0x72b3, 0x80b2, 0x80b1, 0x80ae,
-	0x71ad, 0x80ac, 0x70ab, 0x6faa, 0x6ea9, 0x80a7, 0x6da6, 0x6ca5,
-	0x6ba3, 0x6a9f, 0x699e, 0x689d, 0x809b, 0x8098, 0x6797, 0x6690,
-	0x658f, 0x6488, 0x6384, 0x6282, 0x8081, 0x8080, 0x617c, 0x607a,
-	0x8079, 0x5f76, 0x8075, 0x8074, 0x8073, 0x8072, 0x8071, 0x806e,
-	0x5e6d, 0x806c, 0x5d6b, 0x5c6a, 0x5b69, 0x8067, 0x5a66, 0x5965,
-	0x5863, 0x575c, 0x565a, 0x5559, 0x8056, 0x8055, 0x5454, 0x5353,
-	0x5252, 0x5151, 0x504e, 0x4f4d, 0x804c, 0x804b, 0x4e4a, 0x4d49,
-	0x8047, 0x4c46, 0x8045, 0x8043, 0x803c, 0x803a, 0x8039, 0x8036,
-	0x4b35, 0x8034, 0x4a33, 0x4932, 0x4831, 0x802e, 0x472d, 0x462c,
-	0x452b, 0x442a, 0x4329, 0x4227, 0x8026, 0x8025, 0x4123, 0x401f,
-	0x3f1e, 0x3e1d, 0x3d1b, 0x3c18, 0x8017, 0x8010, 0x3b0f, 0x3a08,
-	0x8004, 0x3902, 0x8001, 0x8000, 0x8000, 0x3800, 0x3700, 0x3600,
-	0x8000, 0x3500, 0x8000, 0x8000, 0x8000, 0x3400, 0x8000, 0x8000,
-	0x8000, 0x8000, 0x8000, 0x8000, 0x3300, 0x3200, 0x8000, 0x8000,
-	0x8000, 0x8000, 0x8000, 0x8000, 0x3100, 0x3000, 0x8000, 0x8000,
-	0x2f00, 0x8000, 0x2e00, 0x2d00, 0x2c00, 0x8000, 0x8000, 0x8000,
-	0x2b00, 0x8000, 0x2a00, 0x2900, 0x2800, 0x8000, 0x2700, 0x2600,
-	0x2500, 0x2400, 0x2300, 0x2200, 0x8000, 0x8000, 0x2100, 0x2000,
-	0x1f00, 0x1e00, 0x1d00, 0x1c00, 0x8000, 0x8000, 0x1b00, 0x1a00,
-	0x8000, 0x1900, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
-	0x1800, 0x8000, 0x1700, 0x1600, 0x1500, 0x8000, 0x1400, 0x1300,
-	0x1200, 0x1100, 0x1000, 0x0f00, 0x8000, 0x8000, 0x0e00, 0x0d00,
-	0x0c00, 0x0b00, 0x0a00, 0x0900, 0x8000, 0x8000, 0x0800, 0x0700,
-	0x8000, 0x0600, 0x8000, 0x8000, 0x8000, 0x0500, 0x0400, 0x0300,
-	0x8000, 0x0200, 0x8000, 0x8000, 0x8000, 0x0100, 0x8000, 0x8000,
-	0x8000, 0x8000, 0x8000, 0x8000, 0x0000, 0x8000, 0x8000, 0x8000,
+	0x00ff, 0xb842, 0x080c, 0xa130, 0x01d0, 0x2b00, 0x6012, 0x080c,
+	0xc2b3, 0x6023, 0x0001, 0x9006, 0x080c, 0x63dc, 0x2001, 0x0000,
+	0x080c, 0x63f0, 0x0126, 0x2091, 0x8000, 0x70a4, 0x8000, 0x70a6,
+	0x012e, 0x2009, 0x0004, 0x080c, 0xa15d, 0x9085, 0x0001, 0x00ce,
+	0x00de, 0x007e, 0x001e, 0x0005, 0x0016, 0x0076, 0x00d6, 0x00c6,
+	0x2001, 0x1860, 0x2004, 0x9084, 0x00ff, 0xb842, 0x080c, 0xa130,
+	0x0548, 0x2b00, 0x6012, 0xb800, 0xc0c4, 0xb802, 0xb8a0, 0x9086,
+	0x007e, 0x0140, 0xb804, 0x9084, 0x00ff, 0x9086, 0x0006, 0x1110,
+	0x080c, 0x318b, 0x080c, 0xc2b3, 0x6023, 0x0001, 0x9006, 0x080c,
+	0x63dc, 0x2001, 0x0002, 0x080c, 0x63f0, 0x0126, 0x2091, 0x8000,
+	0x70a4, 0x8000, 0x70a6, 0x012e, 0x2009, 0x0002, 0x080c, 0xa15d,
+	0x9085, 0x0001, 0x00ce, 0x00de, 0x007e, 0x001e, 0x0005, 0x00b6,
+	0x00c6, 0x0026, 0x2009, 0x0080, 0x080c, 0x643f, 0x1140, 0xb813,
+	0x00ff, 0xb817, 0xfffc, 0x0039, 0x0110, 0x70df, 0xffff, 0x002e,
+	0x00ce, 0x00be, 0x0005, 0x0016, 0x0076, 0x00d6, 0x00c6, 0x080c,
+	0xa08d, 0x01d0, 0x2b00, 0x6012, 0x080c, 0xc2b3, 0x6023, 0x0001,
+	0x9006, 0x080c, 0x63dc, 0x2001, 0x0002, 0x080c, 0x63f0, 0x0126,
+	0x2091, 0x8000, 0x70e0, 0x8000, 0x70e2, 0x012e, 0x2009, 0x0002,
+	0x080c, 0xa15d, 0x9085, 0x0001, 0x00ce, 0x00de, 0x007e, 0x001e,
+	0x0005, 0x00c6, 0x00d6, 0x0126, 0x2091, 0x8000, 0x2009, 0x007f,
+	0x080c, 0x643f, 0x11b8, 0xb813, 0x00ff, 0xb817, 0xfffd, 0xb8bf,
+	0x0004, 0x080c, 0xa08d, 0x0170, 0x2b00, 0x6012, 0x6316, 0x6023,
+	0x0001, 0x620a, 0x080c, 0xc2b3, 0x2009, 0x0022, 0x080c, 0xa15d,
+	0x9085, 0x0001, 0x012e, 0x00de, 0x00ce, 0x0005, 0x00e6, 0x00c6,
+	0x0066, 0x0036, 0x0026, 0x00b6, 0x21f0, 0x080c, 0x880e, 0x080c,
+	0x8798, 0x080c, 0x9f36, 0x080c, 0xb03a, 0x3e08, 0x2130, 0x81ff,
+	0x0120, 0x20a9, 0x007e, 0x900e, 0x0018, 0x20a9, 0x007f, 0x900e,
+	0x0016, 0x080c, 0x649f, 0x1140, 0x9686, 0x0002, 0x1118, 0xb800,
+	0xd0bc, 0x1110, 0x080c, 0x5f45, 0x001e, 0x8108, 0x1f04, 0x3170,
+	0x9686, 0x0001, 0x190c, 0x32b3, 0x00be, 0x002e, 0x003e, 0x006e,
+	0x00ce, 0x00ee, 0x0005, 0x00e6, 0x00c6, 0x0046, 0x0036, 0x0026,
+	0x0016, 0x00b6, 0x6210, 0x2258, 0xbaa0, 0x0026, 0x2019, 0x0029,
+	0x080c, 0x8803, 0x0076, 0x2039, 0x0000, 0x080c, 0x86f1, 0x2c08,
+	0x080c, 0xd5f6, 0x007e, 0x001e, 0xba10, 0xbb14, 0xbcb0, 0x080c,
+	0x5f45, 0xba12, 0xbb16, 0xbcb2, 0x00be, 0x001e, 0x002e, 0x003e,
+	0x004e, 0x00ce, 0x00ee, 0x0005, 0x00e6, 0x0006, 0x00b6, 0x6010,
+	0x2058, 0xb8a0, 0x00be, 0x9086, 0x0080, 0x0150, 0x2071, 0x1800,
+	0x70a4, 0x9005, 0x0110, 0x8001, 0x70a6, 0x000e, 0x00ee, 0x0005,
+	0x2071, 0x1800, 0x70e0, 0x9005, 0x0dc0, 0x8001, 0x70e2, 0x0ca8,
+	0xb800, 0xc08c, 0xb802, 0x0005, 0x00f6, 0x00e6, 0x00c6, 0x00b6,
+	0x0046, 0x0036, 0x0026, 0x0016, 0x0156, 0x2178, 0x81ff, 0x1118,
+	0x20a9, 0x0001, 0x0070, 0x080c, 0x55db, 0xd0c4, 0x0138, 0x0030,
+	0x9006, 0x2020, 0x2009, 0x002d, 0x080c, 0xd885, 0x20a9, 0x0800,
+	0x9016, 0x0026, 0x928e, 0x007e, 0x0904, 0x323a, 0x928e, 0x007f,
+	0x0904, 0x323a, 0x928e, 0x0080, 0x05e8, 0x9288, 0x1000, 0x210c,
+	0x81ff, 0x05c0, 0x8fff, 0x1148, 0x2001, 0x1966, 0x0006, 0x2003,
+	0x0001, 0x04f1, 0x000e, 0x2003, 0x0000, 0x00b6, 0x00c6, 0x2158,
+	0x2001, 0x0001, 0x080c, 0x678d, 0x00ce, 0x00be, 0x2019, 0x0029,
+	0x080c, 0x8803, 0x0076, 0x2039, 0x0000, 0x080c, 0x86f1, 0x00b6,
+	0x00c6, 0x0026, 0x2158, 0xba04, 0x9294, 0x00ff, 0x9286, 0x0006,
+	0x1118, 0xb807, 0x0404, 0x0028, 0x2001, 0x0004, 0x8007, 0x9215,
+	0xba06, 0x002e, 0x00ce, 0x00be, 0x0016, 0x2c08, 0x080c, 0xd5f6,
+	0x001e, 0x007e, 0x002e, 0x8210, 0x1f04, 0x31f1, 0x015e, 0x001e,
+	0x002e, 0x003e, 0x004e, 0x00be, 0x00ce, 0x00ee, 0x00fe, 0x0005,
+	0x0046, 0x0026, 0x0016, 0x080c, 0x55db, 0xd0c4, 0x0140, 0xd0a4,
+	0x0130, 0x9006, 0x2220, 0x2009, 0x0029, 0x080c, 0xd885, 0x001e,
+	0x002e, 0x004e, 0x0005, 0x0016, 0x0026, 0x0036, 0x00c6, 0x7290,
+	0x82ff, 0x01e8, 0x080c, 0x67bb, 0x11d0, 0x2100, 0x080c, 0x27a1,
+	0x81ff, 0x01b8, 0x2019, 0x0001, 0x8314, 0x92e0, 0x1c80, 0x2c04,
+	0xd384, 0x0120, 0x9084, 0xff00, 0x8007, 0x0010, 0x9084, 0x00ff,
+	0x9116, 0x0138, 0x9096, 0x00ff, 0x0110, 0x8318, 0x0c68, 0x9085,
+	0x0001, 0x00ce, 0x003e, 0x002e, 0x001e, 0x0005, 0x0016, 0x00c6,
+	0x0126, 0x2091, 0x8000, 0x0036, 0x2019, 0x0029, 0x00a9, 0x003e,
+	0x9180, 0x1000, 0x2004, 0x9065, 0x0158, 0x0016, 0x00c6, 0x2061,
+	0x1a8a, 0x001e, 0x6112, 0x080c, 0x318b, 0x001e, 0x080c, 0x6463,
+	0x012e, 0x00ce, 0x001e, 0x0005, 0x0016, 0x0026, 0x2110, 0x080c,
+	0x9bc9, 0x080c, 0xdb3d, 0x002e, 0x001e, 0x0005, 0x2001, 0x1836,
+	0x2004, 0xd0cc, 0x0005, 0x00c6, 0x00b6, 0x080c, 0x7207, 0x1118,
+	0x20a9, 0x0800, 0x0010, 0x20a9, 0x0782, 0x080c, 0x7207, 0x1110,
+	0x900e, 0x0010, 0x2009, 0x007e, 0x9180, 0x1000, 0x2004, 0x905d,
+	0x0130, 0x86ff, 0x0110, 0xb800, 0xd0bc, 0x090c, 0x6463, 0x8108,
+	0x1f04, 0x32c4, 0x2061, 0x1800, 0x607b, 0x0000, 0x607c, 0x9084,
+	0x00ff, 0x607e, 0x60af, 0x0000, 0x00be, 0x00ce, 0x0005, 0x2001,
+	0x187d, 0x2004, 0xd0bc, 0x0005, 0x2011, 0x185c, 0x2214, 0xd2ec,
+	0x0005, 0x7eef, 0x7de8, 0x7ce4, 0x80e2, 0x7be1, 0x80e0, 0x80dc,
+	0x80da, 0x7ad9, 0x80d6, 0x80d5, 0x80d4, 0x80d3, 0x80d2, 0x80d1,
+	0x79ce, 0x78cd, 0x80cc, 0x80cb, 0x80ca, 0x80c9, 0x80c7, 0x80c6,
+	0x77c5, 0x76c3, 0x80bc, 0x80ba, 0x75b9, 0x80b6, 0x74b5, 0x73b4,
+	0x72b3, 0x80b2, 0x80b1, 0x80ae, 0x71ad, 0x80ac, 0x70ab, 0x6faa,
+	0x6ea9, 0x80a7, 0x6da6, 0x6ca5, 0x6ba3, 0x6a9f, 0x699e, 0x689d,
+	0x809b, 0x8098, 0x6797, 0x6690, 0x658f, 0x6488, 0x6384, 0x6282,
+	0x8081, 0x8080, 0x617c, 0x607a, 0x8079, 0x5f76, 0x8075, 0x8074,
+	0x8073, 0x8072, 0x8071, 0x806e, 0x5e6d, 0x806c, 0x5d6b, 0x5c6a,
+	0x5b69, 0x8067, 0x5a66, 0x5965, 0x5863, 0x575c, 0x565a, 0x5559,
+	0x8056, 0x8055, 0x5454, 0x5353, 0x5252, 0x5151, 0x504e, 0x4f4d,
+	0x804c, 0x804b, 0x4e4a, 0x4d49, 0x8047, 0x4c46, 0x8045, 0x8043,
+	0x803c, 0x803a, 0x8039, 0x8036, 0x4b35, 0x8034, 0x4a33, 0x4932,
+	0x4831, 0x802e, 0x472d, 0x462c, 0x452b, 0x442a, 0x4329, 0x4227,
+	0x8026, 0x8025, 0x4123, 0x401f, 0x3f1e, 0x3e1d, 0x3d1b, 0x3c18,
+	0x8017, 0x8010, 0x3b0f, 0x3a08, 0x8004, 0x3902, 0x8001, 0x8000,
+	0x8000, 0x3800, 0x3700, 0x3600, 0x8000, 0x3500, 0x8000, 0x8000,
+	0x8000, 0x3400, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
+	0x3300, 0x3200, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
+	0x3100, 0x3000, 0x8000, 0x8000, 0x2f00, 0x8000, 0x2e00, 0x2d00,
+	0x2c00, 0x8000, 0x8000, 0x8000, 0x2b00, 0x8000, 0x2a00, 0x2900,
+	0x2800, 0x8000, 0x2700, 0x2600, 0x2500, 0x2400, 0x2300, 0x2200,
+	0x8000, 0x8000, 0x2100, 0x2000, 0x1f00, 0x1e00, 0x1d00, 0x1c00,
+	0x8000, 0x8000, 0x1b00, 0x1a00, 0x8000, 0x1900, 0x8000, 0x8000,
+	0x8000, 0x8000, 0x8000, 0x8000, 0x1800, 0x8000, 0x1700, 0x1600,
+	0x1500, 0x8000, 0x1400, 0x1300, 0x1200, 0x1100, 0x1000, 0x0f00,
+	0x8000, 0x8000, 0x0e00, 0x0d00, 0x0c00, 0x0b00, 0x0a00, 0x0900,
+	0x8000, 0x8000, 0x0800, 0x0700, 0x8000, 0x0600, 0x8000, 0x8000,
+	0x8000, 0x0500, 0x0400, 0x0300, 0x8000, 0x0200, 0x8000, 0x8000,
+	0x8000, 0x0100, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
+	0x0000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
 	0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
-	0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x2071, 0x189c, 0x7003,
-	0x0002, 0x9006, 0x7016, 0x701a, 0x704a, 0x704e, 0x700e, 0x7042,
-	0x7046, 0x703b, 0x18b8, 0x703f, 0x18b8, 0x7007, 0x0001, 0x080c,
-	0x1004, 0x090c, 0x0db4, 0x2900, 0x706a, 0xa867, 0x0002, 0xa8ab,
-	0xdcb0, 0x080c, 0x1004, 0x090c, 0x0db4, 0x2900, 0x706e, 0xa867,
-	0x0002, 0xa8ab, 0xdcb0, 0x0005, 0x2071, 0x189c, 0x7004, 0x0002,
-	0x3274, 0x3275, 0x3288, 0x329c, 0x0005, 0x1004, 0x3285, 0x0e04,
-	0x3285, 0x2079, 0x0000, 0x0126, 0x2091, 0x8000, 0x700c, 0x9005,
-	0x1128, 0x700f, 0x0001, 0x012e, 0x0468, 0x0005, 0x012e, 0x0ce8,
-	0x2079, 0x0000, 0x2061, 0x18b6, 0x2c4c, 0xa86c, 0x908e, 0x0100,
-	0x0128, 0x9086, 0x0200, 0x0904, 0x3370, 0x0005, 0x7018, 0x2048,
-	0x2061, 0x1800, 0x701c, 0x0807, 0x7014, 0x2048, 0xa864, 0x9094,
-	0x00ff, 0x9296, 0x0029, 0x1120, 0xaa78, 0xd2fc, 0x0128, 0x0005,
-	0x9086, 0x0103, 0x0108, 0x0005, 0x2079, 0x0000, 0x2061, 0x1800,
-	0x701c, 0x0807, 0x2061, 0x1800, 0x7880, 0x908a, 0x0040, 0x1210,
-	0x61cc, 0x0042, 0x2100, 0x908a, 0x003f, 0x1a04, 0x336d, 0x61cc,
-	0x0804, 0x3302, 0x3344, 0x337c, 0x336d, 0x3386, 0x3390, 0x3396,
-	0x339a, 0x33aa, 0x33ae, 0x33c4, 0x33ca, 0x33d0, 0x33db, 0x33e6,
-	0x33f5, 0x3404, 0x3412, 0x3429, 0x3444, 0x336d, 0x34ed, 0x352b,
-	0x35d1, 0x35e2, 0x3605, 0x336d, 0x336d, 0x336d, 0x363d, 0x3659,
-	0x3662, 0x3691, 0x3697, 0x336d, 0x36dd, 0x336d, 0x336d, 0x336d,
-	0x336d, 0x336d, 0x36e8, 0x36f1, 0x36f9, 0x36fb, 0x336d, 0x336d,
-	0x336d, 0x336d, 0x336d, 0x336d, 0x3727, 0x336d, 0x336d, 0x336d,
-	0x336d, 0x336d, 0x3744, 0x379f, 0x336d, 0x336d, 0x336d, 0x336d,
-	0x336d, 0x336d, 0x0002, 0x37c9, 0x37cc, 0x382b, 0x3844, 0x3874,
-	0x3b12, 0x336d, 0x4f73, 0x336d, 0x336d, 0x336d, 0x336d, 0x336d,
-	0x336d, 0x336d, 0x336d, 0x33c4, 0x33ca, 0x4033, 0x53be, 0x4049,
-	0x5002, 0x5053, 0x5156, 0x336d, 0x51b8, 0x51f4, 0x5225, 0x5329,
-	0x5252, 0x52a9, 0x336d, 0x404d, 0x41ee, 0x4204, 0x4229, 0x428e,
-	0x4302, 0x4322, 0x4399, 0x43f5, 0x4451, 0x4454, 0x4479, 0x4519,
-	0x457f, 0x4587, 0x46b9, 0x481e, 0x4852, 0x4a9c, 0x336d, 0x4aba,
-	0x4b76, 0x4c4c, 0x336d, 0x336d, 0x336d, 0x336d, 0x4cb2, 0x4ccd,
-	0x4587, 0x4f13, 0x714c, 0x0000, 0x2021, 0x4000, 0x080c, 0x48d0,
-	0x0126, 0x2091, 0x8000, 0x0e04, 0x334e, 0x0010, 0x012e, 0x0cc0,
-	0x7c36, 0x9486, 0x4000, 0x0118, 0x7833, 0x0011, 0x0010, 0x7833,
-	0x0010, 0x7c82, 0x7986, 0x7a8a, 0x7b8e, 0x2091, 0x4080, 0x2001,
-	0x0089, 0x2004, 0xd084, 0x190c, 0x1187, 0x7007, 0x0001, 0x2091,
-	0x5000, 0x700f, 0x0000, 0x012e, 0x0005, 0x2021, 0x4001, 0x08b0,
-	0x2021, 0x4002, 0x0898, 0x2021, 0x4003, 0x0880, 0x2021, 0x4005,
-	0x0868, 0x2021, 0x4006, 0x0850, 0x2039, 0x0001, 0x902e, 0x2520,
-	0x7b88, 0x7a8c, 0x7884, 0x7990, 0x0804, 0x48dd, 0x2039, 0x0001,
-	0x902e, 0x2520, 0x7b88, 0x7a8c, 0x7884, 0x7990, 0x0804, 0x48e0,
-	0x7984, 0x7888, 0x2114, 0x200a, 0x0804, 0x3344, 0x7984, 0x2114,
-	0x0804, 0x3344, 0x20e1, 0x0000, 0x2099, 0x0021, 0x20e9, 0x0000,
-	0x20a1, 0x0021, 0x20a9, 0x001f, 0x4003, 0x7984, 0x7a88, 0x7b8c,
-	0x0804, 0x3344, 0x7884, 0x2060, 0x0804, 0x33f7, 0x2009, 0x0003,
-	0x2011, 0x0003, 0x2019, 0x0002, 0x789b, 0x0317, 0x7893, 0xffff,
-	0x2001, 0x188d, 0x2004, 0x9005, 0x0118, 0x7896, 0x0804, 0x3344,
-	0x7897, 0x0001, 0x0804, 0x3344, 0x2039, 0x0001, 0x7d98, 0x7c9c,
-	0x0804, 0x3380, 0x2039, 0x0001, 0x7d98, 0x7c9c, 0x0804, 0x338a,
-	0x79a0, 0x9182, 0x0040, 0x0210, 0x0804, 0x3379, 0x2138, 0x7d98,
-	0x7c9c, 0x0804, 0x3380, 0x79a0, 0x9182, 0x0040, 0x0210, 0x0804,
-	0x3379, 0x2138, 0x7d98, 0x7c9c, 0x0804, 0x338a, 0x79a0, 0x9182,
-	0x0040, 0x0210, 0x0804, 0x3379, 0x21e8, 0x7984, 0x7888, 0x20a9,
-	0x0001, 0x21a0, 0x4004, 0x0804, 0x3344, 0x2061, 0x0800, 0xe10c,
-	0x9006, 0x2c15, 0x9200, 0x8c60, 0x8109, 0x1dd8, 0x2010, 0x9005,
-	0x0904, 0x3344, 0x0804, 0x3373, 0x79a0, 0x9182, 0x0040, 0x0210,
-	0x0804, 0x3379, 0x21e0, 0x20a9, 0x0001, 0x7984, 0x2198, 0x4012,
-	0x0804, 0x3344, 0x2069, 0x185b, 0x7884, 0x7990, 0x911a, 0x1a04,
-	0x3379, 0x8019, 0x0904, 0x3379, 0x684a, 0x6942, 0x788c, 0x6852,
-	0x7888, 0x6856, 0x9006, 0x685a, 0x685e, 0x080c, 0x72bd, 0x0804,
-	0x3344, 0x2069, 0x185b, 0x7884, 0x7994, 0x911a, 0x1a04, 0x3379,
-	0x8019, 0x0904, 0x3379, 0x684e, 0x6946, 0x788c, 0x6862, 0x7888,
-	0x6866, 0x9006, 0x686a, 0x686e, 0x0126, 0x2091, 0x8000, 0x080c,
-	0x6678, 0x012e, 0x0804, 0x3344, 0x902e, 0x2520, 0x81ff, 0x0120,
-	0x2009, 0x0001, 0x0804, 0x3376, 0x7984, 0x7b88, 0x7a8c, 0x20a9,
-	0x0005, 0x20e9, 0x0001, 0x20a1, 0x18a4, 0x4101, 0x080c, 0x4894,
-	0x1120, 0x2009, 0x0002, 0x0804, 0x3376, 0x2009, 0x0020, 0xa85c,
-	0x9080, 0x0019, 0xaf60, 0x080c, 0x48dd, 0x701f, 0x3468, 0x0005,
-	0xa864, 0x2008, 0x9084, 0x00ff, 0x9096, 0x0011, 0x0168, 0x9096,
-	0x0019, 0x0150, 0x9096, 0x0015, 0x0138, 0x9096, 0x0048, 0x0120,
-	0x9096, 0x0029, 0x1904, 0x3376, 0x810f, 0x918c, 0x00ff, 0x0904,
-	0x3376, 0x7112, 0x7010, 0x8001, 0x0560, 0x7012, 0x080c, 0x4894,
-	0x1120, 0x2009, 0x0002, 0x0804, 0x3376, 0x2009, 0x0020, 0x7068,
-	0x2040, 0xa28c, 0xa390, 0xa494, 0xa598, 0x9290, 0x0040, 0x9399,
-	0x0000, 0x94a1, 0x0000, 0x95a9, 0x0000, 0xa85c, 0x9080, 0x0019,
-	0xaf60, 0x080c, 0x48dd, 0x701f, 0x34a6, 0x0005, 0xa864, 0x9084,
-	0x00ff, 0x9096, 0x0002, 0x0120, 0x9096, 0x000a, 0x1904, 0x3376,
-	0x0888, 0x7014, 0x2048, 0xa868, 0xc0fd, 0xa86a, 0xa864, 0x9084,
-	0x00ff, 0x9096, 0x0029, 0x1160, 0xc2fd, 0xaa7a, 0x080c, 0x5df1,
-	0x0150, 0x0126, 0x2091, 0x8000, 0xa87a, 0xa982, 0x012e, 0x0050,
-	0x080c, 0x610c, 0x1128, 0x7007, 0x0003, 0x701f, 0x34d2, 0x0005,
-	0x080c, 0x6ace, 0x0126, 0x2091, 0x8000, 0x20a9, 0x0005, 0x20e1,
-	0x0001, 0x2099, 0x18a4, 0x400a, 0x2100, 0x9210, 0x9399, 0x0000,
-	0x94a1, 0x0000, 0x95a9, 0x0000, 0xa85c, 0x9080, 0x0019, 0x2009,
-	0x0020, 0x012e, 0xaf60, 0x0804, 0x48e0, 0x2091, 0x8000, 0x7837,
-	0x4000, 0x7833, 0x0010, 0x7883, 0x4000, 0x7887, 0x4953, 0x788b,
-	0x5020, 0x788f, 0x2020, 0x2009, 0x017f, 0x2104, 0x7892, 0x3f00,
-	0x7896, 0x2061, 0x0100, 0x6200, 0x2061, 0x0200, 0x603c, 0x8007,
-	0x9205, 0x789a, 0x2009, 0x04fd, 0x2104, 0x789e, 0x2091, 0x5000,
-	0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x0180, 0x2001,
-	0x19f1, 0x2004, 0x9005, 0x0128, 0x2001, 0x008b, 0x2004, 0xd0fc,
-	0x0dd8, 0x2001, 0x008a, 0x2003, 0x0002, 0x2003, 0x1001, 0x2071,
-	0x0080, 0x0804, 0x0427, 0x81ff, 0x1904, 0x3376, 0x7984, 0x080c,
-	0x6256, 0x1904, 0x3379, 0x7e98, 0x9684, 0x3fff, 0x9082, 0x4000,
-	0x1a04, 0x3379, 0x7c88, 0x7d8c, 0x080c, 0x63b9, 0x080c, 0x6388,
-	0x0000, 0x1518, 0x2061, 0x1cd0, 0x0126, 0x2091, 0x8000, 0x6000,
-	0x9086, 0x0000, 0x0148, 0x6014, 0x904d, 0x0130, 0xa86c, 0x9406,
-	0x1118, 0xa870, 0x9506, 0x0150, 0x012e, 0x9ce0, 0x0018, 0x2001,
-	0x1819, 0x2004, 0x9c02, 0x1a04, 0x3376, 0x0c30, 0x080c, 0xb75c,
-	0x012e, 0x0904, 0x3376, 0x0804, 0x3344, 0x900e, 0x2001, 0x0005,
-	0x080c, 0x6ace, 0x0126, 0x2091, 0x8000, 0x080c, 0xbe35, 0x080c,
-	0x68a0, 0x012e, 0x0804, 0x3344, 0x00a6, 0x2950, 0xb198, 0x080c,
-	0x6256, 0x1904, 0x35be, 0xb6a4, 0x9684, 0x3fff, 0x9082, 0x4000,
-	0x16e8, 0xb49c, 0xb5a0, 0x080c, 0x63b9, 0x080c, 0x6388, 0x1520,
-	0x2061, 0x1cd0, 0x0126, 0x2091, 0x8000, 0x6000, 0x9086, 0x0000,
-	0x0148, 0x6014, 0x904d, 0x0130, 0xa86c, 0x9406, 0x1118, 0xa870,
-	0x9506, 0x0158, 0x012e, 0x9ce0, 0x0018, 0x2001, 0x1819, 0x2004,
-	0x9c02, 0x2009, 0x000d, 0x12b0, 0x0c28, 0x080c, 0xb75c, 0x012e,
-	0x2009, 0x0003, 0x0178, 0x00e0, 0x900e, 0x2001, 0x0005, 0x080c,
-	0x6ace, 0x0126, 0x2091, 0x8000, 0x080c, 0xbe35, 0x080c, 0x6893,
-	0x012e, 0x0070, 0xb097, 0x4005, 0xb19a, 0x0010, 0xb097, 0x4006,
-	0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x2a48, 0x00ae, 0x0005,
-	0xb097, 0x4000, 0x9006, 0x918d, 0x0001, 0x2008, 0x2a48, 0x00ae,
-	0x0005, 0x81ff, 0x1904, 0x3376, 0x080c, 0x48ab, 0x0904, 0x3379,
-	0x080c, 0x631d, 0x0904, 0x3376, 0x080c, 0x63bf, 0x0904, 0x3376,
-	0x0804, 0x4319, 0x81ff, 0x1904, 0x3376, 0x080c, 0x48c7, 0x0904,
-	0x3379, 0x080c, 0x644d, 0x0904, 0x3376, 0x2019, 0x0005, 0x79a8,
-	0x080c, 0x63da, 0x0904, 0x3376, 0x7888, 0x908a, 0x1000, 0x1a04,
-	0x3379, 0x8003, 0x800b, 0x810b, 0x9108, 0x080c, 0x804d, 0x7984,
-	0xd184, 0x1904, 0x3344, 0x0804, 0x4319, 0x0126, 0x2091, 0x8000,
-	0x81ff, 0x0118, 0x2009, 0x0001, 0x0450, 0x2029, 0x07ff, 0x6458,
-	0x2400, 0x9506, 0x01f8, 0x2508, 0x080c, 0x6256, 0x11d8, 0x080c,
-	0x644d, 0x1128, 0x2009, 0x0002, 0x62bc, 0x2518, 0x00c0, 0x2019,
-	0x0004, 0x900e, 0x080c, 0x63da, 0x1118, 0x2009, 0x0006, 0x0078,
-	0x7884, 0x908a, 0x1000, 0x1270, 0x8003, 0x800b, 0x810b, 0x9108,
-	0x080c, 0x804d, 0x8529, 0x1ae0, 0x012e, 0x0804, 0x3344, 0x012e,
-	0x0804, 0x3376, 0x012e, 0x0804, 0x3379, 0x080c, 0x48ab, 0x0904,
-	0x3379, 0x080c, 0x631d, 0x0904, 0x3376, 0xbaa0, 0x2019, 0x0005,
-	0x00c6, 0x9066, 0x080c, 0x8582, 0x0076, 0x903e, 0x080c, 0x8470,
-	0x900e, 0x080c, 0xd2d5, 0x007e, 0x00ce, 0x080c, 0x63b9, 0x0804,
-	0x3344, 0x080c, 0x48ab, 0x0904, 0x3379, 0x080c, 0x63b9, 0x2208,
-	0x0804, 0x3344, 0x0156, 0x00d6, 0x00e6, 0x2069, 0x190e, 0x6810,
-	0x6914, 0x910a, 0x1208, 0x900e, 0x6816, 0x9016, 0x901e, 0x20a9,
-	0x007e, 0x2069, 0x1000, 0x2d04, 0x905d, 0x0118, 0xb84c, 0x0059,
-	0x9210, 0x8d68, 0x1f04, 0x3673, 0x2300, 0x9218, 0x00ee, 0x00de,
-	0x015e, 0x0804, 0x3344, 0x00f6, 0x0016, 0x907d, 0x0138, 0x9006,
-	0x8000, 0x2f0c, 0x81ff, 0x0110, 0x2178, 0x0cd0, 0x001e, 0x00fe,
-	0x0005, 0x2069, 0x190e, 0x6910, 0x62b8, 0x0804, 0x3344, 0x81ff,
-	0x0120, 0x2009, 0x0001, 0x0804, 0x3376, 0x0126, 0x2091, 0x8000,
-	0x080c, 0x53ae, 0x0128, 0x2009, 0x0007, 0x012e, 0x0804, 0x3376,
-	0x012e, 0x6158, 0x9190, 0x3145, 0x2215, 0x9294, 0x00ff, 0x6378,
-	0x83ff, 0x0108, 0x627c, 0x67d8, 0x97c4, 0x000a, 0x98c6, 0x000a,
-	0x1118, 0x2031, 0x0001, 0x00e8, 0x97c4, 0x0022, 0x98c6, 0x0022,
-	0x1118, 0x2031, 0x0003, 0x00a8, 0x97c4, 0x0012, 0x98c6, 0x0012,
-	0x1118, 0x2031, 0x0002, 0x0068, 0x080c, 0x6faa, 0x1118, 0x2031,
-	0x0004, 0x0038, 0xd79c, 0x0120, 0x2009, 0x0005, 0x0804, 0x3376,
-	0x9036, 0x7e9a, 0x7f9e, 0x0804, 0x3344, 0x6148, 0x624c, 0x2019,
-	0x195e, 0x231c, 0x2001, 0x195f, 0x2004, 0x789a, 0x0804, 0x3344,
-	0x0126, 0x2091, 0x8000, 0x6138, 0x623c, 0x6340, 0x012e, 0x0804,
-	0x3344, 0x080c, 0x48c7, 0x0904, 0x3379, 0xba44, 0xbb38, 0x0804,
-	0x3344, 0x080c, 0x0db4, 0x080c, 0x48c7, 0x2110, 0x0904, 0x3379,
-	0xb804, 0x908c, 0x00ff, 0x918e, 0x0006, 0x0140, 0x9084, 0xff00,
-	0x9086, 0x0600, 0x2009, 0x0009, 0x1904, 0x3376, 0x0126, 0x2091,
-	0x8000, 0x2019, 0x0005, 0x00c6, 0x9066, 0x080c, 0x9915, 0x080c,
-	0x8582, 0x0076, 0x903e, 0x080c, 0x8470, 0x900e, 0x080c, 0xd2d5,
-	0x007e, 0x00ce, 0xb807, 0x0407, 0x012e, 0x0804, 0x3344, 0x6148,
-	0x624c, 0x7884, 0x604a, 0x7b88, 0x634e, 0x2069, 0x185b, 0x831f,
-	0x9305, 0x6816, 0x788c, 0x2069, 0x195e, 0x2d1c, 0x206a, 0x7e98,
-	0x9682, 0x0014, 0x1210, 0x2031, 0x07d0, 0x2069, 0x195f, 0x2d04,
-	0x266a, 0x789a, 0x0804, 0x3344, 0x0126, 0x2091, 0x8000, 0x6138,
-	0x7884, 0x603a, 0x910e, 0xd1b4, 0x190c, 0x0e9b, 0xd0c4, 0x01a8,
-	0x00d6, 0x78a8, 0x2009, 0x1975, 0x200a, 0x78ac, 0x2011, 0x1976,
-	0x2012, 0x2069, 0x0100, 0x6838, 0x9086, 0x0007, 0x1118, 0x2214,
-	0x6a5a, 0x0010, 0x210c, 0x695a, 0x00de, 0x7888, 0x603e, 0x2011,
+	0x8000, 0x2071, 0x189c, 0x7003, 0x0002, 0x9006, 0x7016, 0x701a,
+	0x704a, 0x704e, 0x700e, 0x7042, 0x7046, 0x703b, 0x18b8, 0x703f,
+	0x18b8, 0x7007, 0x0001, 0x080c, 0x104a, 0x090c, 0x0dfa, 0x2900,
+	0x706a, 0xa867, 0x0002, 0xa8ab, 0xdcb0, 0x080c, 0x104a, 0x090c,
+	0x0dfa, 0x2900, 0x706e, 0xa867, 0x0002, 0xa8ab, 0xdcb0, 0x0005,
+	0x2071, 0x189c, 0x7004, 0x0002, 0x3418, 0x3419, 0x342c, 0x3440,
+	0x0005, 0x1004, 0x3429, 0x0e04, 0x3429, 0x2079, 0x0000, 0x0126,
+	0x2091, 0x8000, 0x700c, 0x9005, 0x1128, 0x700f, 0x0001, 0x012e,
+	0x0468, 0x0005, 0x012e, 0x0ce8, 0x2079, 0x0000, 0x2061, 0x18b6,
+	0x2c4c, 0xa86c, 0x908e, 0x0100, 0x0128, 0x9086, 0x0200, 0x0904,
+	0x3514, 0x0005, 0x7018, 0x2048, 0x2061, 0x1800, 0x701c, 0x0807,
+	0x7014, 0x2048, 0xa864, 0x9094, 0x00ff, 0x9296, 0x0029, 0x1120,
+	0xaa78, 0xd2fc, 0x0128, 0x0005, 0x9086, 0x0103, 0x0108, 0x0005,
+	0x2079, 0x0000, 0x2061, 0x1800, 0x701c, 0x0807, 0x2061, 0x1800,
+	0x7880, 0x908a, 0x0040, 0x1210, 0x61cc, 0x0042, 0x2100, 0x908a,
+	0x003f, 0x1a04, 0x3511, 0x61cc, 0x0804, 0x34a6, 0x34e8, 0x3520,
+	0x3511, 0x352a, 0x3534, 0x353a, 0x353e, 0x354e, 0x3552, 0x3568,
+	0x356e, 0x3574, 0x357f, 0x358a, 0x3599, 0x35a8, 0x35b6, 0x35cd,
+	0x35e8, 0x3511, 0x3691, 0x36cf, 0x3775, 0x3786, 0x37a9, 0x3511,
+	0x3511, 0x3511, 0x37e1, 0x37fd, 0x3806, 0x3835, 0x383b, 0x3511,
+	0x3881, 0x3511, 0x3511, 0x3511, 0x3511, 0x3511, 0x388c, 0x3895,
+	0x389d, 0x389f, 0x3511, 0x3511, 0x3511, 0x3511, 0x3511, 0x3511,
+	0x38cb, 0x3511, 0x3511, 0x3511, 0x3511, 0x3511, 0x38e8, 0x395c,
+	0x3511, 0x3511, 0x3511, 0x3511, 0x3511, 0x3511, 0x0002, 0x3986,
+	0x3989, 0x39e8, 0x3a01, 0x3a31, 0x3ccf, 0x3511, 0x519f, 0x3511,
+	0x3511, 0x3511, 0x3511, 0x3511, 0x3511, 0x3511, 0x3511, 0x3568,
+	0x356e, 0x4249, 0x55ff, 0x425f, 0x522e, 0x527f, 0x538a, 0x3511,
+	0x53ec, 0x5428, 0x5459, 0x5561, 0x5486, 0x54e1, 0x3511, 0x4263,
+	0x4408, 0x441e, 0x4443, 0x44a8, 0x451c, 0x453c, 0x45b3, 0x460f,
+	0x466b, 0x466e, 0x4693, 0x4741, 0x47a7, 0x47af, 0x48e1, 0x4a49,
+	0x4a7d, 0x4cc7, 0x3511, 0x4ce5, 0x4da2, 0x4e78, 0x3511, 0x3511,
+	0x3511, 0x3511, 0x4ede, 0x4ef9, 0x47af, 0x513f, 0x714c, 0x0000,
+	0x2021, 0x4000, 0x080c, 0x4afb, 0x0126, 0x2091, 0x8000, 0x0e04,
+	0x34f2, 0x0010, 0x012e, 0x0cc0, 0x7c36, 0x9486, 0x4000, 0x0118,
+	0x7833, 0x0011, 0x0010, 0x7833, 0x0010, 0x7c82, 0x7986, 0x7a8a,
+	0x7b8e, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c,
+	0x11e0, 0x7007, 0x0001, 0x2091, 0x5000, 0x700f, 0x0000, 0x012e,
+	0x0005, 0x2021, 0x4001, 0x08b0, 0x2021, 0x4002, 0x0898, 0x2021,
+	0x4003, 0x0880, 0x2021, 0x4005, 0x0868, 0x2021, 0x4006, 0x0850,
+	0x2039, 0x0001, 0x902e, 0x2520, 0x7b88, 0x7a8c, 0x7884, 0x7990,
+	0x0804, 0x4b08, 0x2039, 0x0001, 0x902e, 0x2520, 0x7b88, 0x7a8c,
+	0x7884, 0x7990, 0x0804, 0x4b0b, 0x7984, 0x7888, 0x2114, 0x200a,
+	0x0804, 0x34e8, 0x7984, 0x2114, 0x0804, 0x34e8, 0x20e1, 0x0000,
+	0x2099, 0x0021, 0x20e9, 0x0000, 0x20a1, 0x0021, 0x20a9, 0x001f,
+	0x4003, 0x7984, 0x7a88, 0x7b8c, 0x0804, 0x34e8, 0x7884, 0x2060,
+	0x0804, 0x359b, 0x2009, 0x0003, 0x2011, 0x0003, 0x2019, 0x0008,
+	0x789b, 0x0317, 0x7893, 0xffff, 0x2001, 0x188d, 0x2004, 0x9005,
+	0x0118, 0x7896, 0x0804, 0x34e8, 0x7897, 0x0001, 0x0804, 0x34e8,
+	0x2039, 0x0001, 0x7d98, 0x7c9c, 0x0804, 0x3524, 0x2039, 0x0001,
+	0x7d98, 0x7c9c, 0x0804, 0x352e, 0x79a0, 0x9182, 0x0040, 0x0210,
+	0x0804, 0x351d, 0x2138, 0x7d98, 0x7c9c, 0x0804, 0x3524, 0x79a0,
+	0x9182, 0x0040, 0x0210, 0x0804, 0x351d, 0x2138, 0x7d98, 0x7c9c,
+	0x0804, 0x352e, 0x79a0, 0x9182, 0x0040, 0x0210, 0x0804, 0x351d,
+	0x21e8, 0x7984, 0x7888, 0x20a9, 0x0001, 0x21a0, 0x4004, 0x0804,
+	0x34e8, 0x2061, 0x0800, 0xe10c, 0x9006, 0x2c15, 0x9200, 0x8c60,
+	0x8109, 0x1dd8, 0x2010, 0x9005, 0x0904, 0x34e8, 0x0804, 0x3517,
+	0x79a0, 0x9182, 0x0040, 0x0210, 0x0804, 0x351d, 0x21e0, 0x20a9,
+	0x0001, 0x7984, 0x2198, 0x4012, 0x0804, 0x34e8, 0x2069, 0x185b,
+	0x7884, 0x7990, 0x911a, 0x1a04, 0x351d, 0x8019, 0x0904, 0x351d,
+	0x684a, 0x6942, 0x788c, 0x6852, 0x7888, 0x6856, 0x9006, 0x685a,
+	0x685e, 0x080c, 0x7535, 0x0804, 0x34e8, 0x2069, 0x185b, 0x7884,
+	0x7994, 0x911a, 0x1a04, 0x351d, 0x8019, 0x0904, 0x351d, 0x684e,
+	0x6946, 0x788c, 0x6862, 0x7888, 0x6866, 0x9006, 0x686a, 0x686e,
+	0x0126, 0x2091, 0x8000, 0x080c, 0x68c1, 0x012e, 0x0804, 0x34e8,
+	0x902e, 0x2520, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x351a,
+	0x7984, 0x7b88, 0x7a8c, 0x20a9, 0x0005, 0x20e9, 0x0001, 0x20a1,
+	0x18a4, 0x4101, 0x080c, 0x4abf, 0x1120, 0x2009, 0x0002, 0x0804,
+	0x351a, 0x2009, 0x0020, 0xa85c, 0x9080, 0x0019, 0xaf60, 0x080c,
+	0x4b08, 0x701f, 0x360c, 0x0005, 0xa864, 0x2008, 0x9084, 0x00ff,
+	0x9096, 0x0011, 0x0168, 0x9096, 0x0019, 0x0150, 0x9096, 0x0015,
+	0x0138, 0x9096, 0x0048, 0x0120, 0x9096, 0x0029, 0x1904, 0x351a,
+	0x810f, 0x918c, 0x00ff, 0x0904, 0x351a, 0x7112, 0x7010, 0x8001,
+	0x0560, 0x7012, 0x080c, 0x4abf, 0x1120, 0x2009, 0x0002, 0x0804,
+	0x351a, 0x2009, 0x0020, 0x7068, 0x2040, 0xa28c, 0xa390, 0xa494,
+	0xa598, 0x9290, 0x0040, 0x9399, 0x0000, 0x94a1, 0x0000, 0x95a9,
+	0x0000, 0xa85c, 0x9080, 0x0019, 0xaf60, 0x080c, 0x4b08, 0x701f,
+	0x364a, 0x0005, 0xa864, 0x9084, 0x00ff, 0x9096, 0x0002, 0x0120,
+	0x9096, 0x000a, 0x1904, 0x351a, 0x0888, 0x7014, 0x2048, 0xa868,
+	0xc0fd, 0xa86a, 0xa864, 0x9084, 0x00ff, 0x9096, 0x0029, 0x1160,
+	0xc2fd, 0xaa7a, 0x080c, 0x6037, 0x0150, 0x0126, 0x2091, 0x8000,
+	0xa87a, 0xa982, 0x012e, 0x0050, 0x080c, 0x6355, 0x1128, 0x7007,
+	0x0003, 0x701f, 0x3676, 0x0005, 0x080c, 0x6d17, 0x0126, 0x2091,
+	0x8000, 0x20a9, 0x0005, 0x20e1, 0x0001, 0x2099, 0x18a4, 0x400a,
+	0x2100, 0x9210, 0x9399, 0x0000, 0x94a1, 0x0000, 0x95a9, 0x0000,
+	0xa85c, 0x9080, 0x0019, 0x2009, 0x0020, 0x012e, 0xaf60, 0x0804,
+	0x4b0b, 0x2091, 0x8000, 0x7837, 0x4000, 0x7833, 0x0010, 0x7883,
+	0x4000, 0x7887, 0x4953, 0x788b, 0x5020, 0x788f, 0x2020, 0x2009,
+	0x017f, 0x2104, 0x7892, 0x3f00, 0x7896, 0x2061, 0x0100, 0x6200,
+	0x2061, 0x0200, 0x603c, 0x8007, 0x9205, 0x789a, 0x2009, 0x04fd,
+	0x2104, 0x789e, 0x2091, 0x5000, 0x2091, 0x4080, 0x2001, 0x0089,
+	0x2004, 0xd084, 0x0180, 0x2001, 0x19f1, 0x2004, 0x9005, 0x0128,
+	0x2001, 0x008b, 0x2004, 0xd0fc, 0x0dd8, 0x2001, 0x008a, 0x2003,
+	0x0002, 0x2003, 0x1001, 0x2071, 0x0080, 0x0804, 0x0427, 0x81ff,
+	0x1904, 0x351a, 0x7984, 0x080c, 0x649f, 0x1904, 0x351d, 0x7e98,
+	0x9684, 0x3fff, 0x9082, 0x4000, 0x1a04, 0x351d, 0x7c88, 0x7d8c,
+	0x080c, 0x6602, 0x080c, 0x65d1, 0x0000, 0x1518, 0x2061, 0x1cd0,
+	0x0126, 0x2091, 0x8000, 0x6000, 0x9086, 0x0000, 0x0148, 0x6014,
+	0x904d, 0x0130, 0xa86c, 0x9406, 0x1118, 0xa870, 0x9506, 0x0150,
+	0x012e, 0x9ce0, 0x0018, 0x2001, 0x1819, 0x2004, 0x9c02, 0x1a04,
+	0x351a, 0x0c30, 0x080c, 0xba56, 0x012e, 0x0904, 0x351a, 0x0804,
+	0x34e8, 0x900e, 0x2001, 0x0005, 0x080c, 0x6d17, 0x0126, 0x2091,
+	0x8000, 0x080c, 0xc133, 0x080c, 0x6ae9, 0x012e, 0x0804, 0x34e8,
+	0x00a6, 0x2950, 0xb198, 0x080c, 0x649f, 0x1904, 0x3762, 0xb6a4,
+	0x9684, 0x3fff, 0x9082, 0x4000, 0x16e8, 0xb49c, 0xb5a0, 0x080c,
+	0x6602, 0x080c, 0x65d1, 0x1520, 0x2061, 0x1cd0, 0x0126, 0x2091,
+	0x8000, 0x6000, 0x9086, 0x0000, 0x0148, 0x6014, 0x904d, 0x0130,
+	0xa86c, 0x9406, 0x1118, 0xa870, 0x9506, 0x0158, 0x012e, 0x9ce0,
+	0x0018, 0x2001, 0x1819, 0x2004, 0x9c02, 0x2009, 0x000d, 0x12b0,
+	0x0c28, 0x080c, 0xba56, 0x012e, 0x2009, 0x0003, 0x0178, 0x00e0,
+	0x900e, 0x2001, 0x0005, 0x080c, 0x6d17, 0x0126, 0x2091, 0x8000,
+	0x080c, 0xc133, 0x080c, 0x6adc, 0x012e, 0x0070, 0xb097, 0x4005,
+	0xb19a, 0x0010, 0xb097, 0x4006, 0x900e, 0x9085, 0x0001, 0x2001,
+	0x0030, 0x2a48, 0x00ae, 0x0005, 0xb097, 0x4000, 0x9006, 0x918d,
+	0x0001, 0x2008, 0x2a48, 0x00ae, 0x0005, 0x81ff, 0x1904, 0x351a,
+	0x080c, 0x4ad6, 0x0904, 0x351d, 0x080c, 0x6566, 0x0904, 0x351a,
+	0x080c, 0x6608, 0x0904, 0x351a, 0x0804, 0x4533, 0x81ff, 0x1904,
+	0x351a, 0x080c, 0x4af2, 0x0904, 0x351d, 0x080c, 0x6696, 0x0904,
+	0x351a, 0x2019, 0x0005, 0x79a8, 0x080c, 0x6623, 0x0904, 0x351a,
+	0x7888, 0x908a, 0x1000, 0x1a04, 0x351d, 0x8003, 0x800b, 0x810b,
+	0x9108, 0x080c, 0x82e8, 0x7984, 0xd184, 0x1904, 0x34e8, 0x0804,
+	0x4533, 0x0126, 0x2091, 0x8000, 0x81ff, 0x0118, 0x2009, 0x0001,
+	0x0450, 0x2029, 0x07ff, 0x6458, 0x2400, 0x9506, 0x01f8, 0x2508,
+	0x080c, 0x649f, 0x11d8, 0x080c, 0x6696, 0x1128, 0x2009, 0x0002,
+	0x62bc, 0x2518, 0x00c0, 0x2019, 0x0004, 0x900e, 0x080c, 0x6623,
+	0x1118, 0x2009, 0x0006, 0x0078, 0x7884, 0x908a, 0x1000, 0x1270,
+	0x8003, 0x800b, 0x810b, 0x9108, 0x080c, 0x82e8, 0x8529, 0x1ae0,
+	0x012e, 0x0804, 0x34e8, 0x012e, 0x0804, 0x351a, 0x012e, 0x0804,
+	0x351d, 0x080c, 0x4ad6, 0x0904, 0x351d, 0x080c, 0x6566, 0x0904,
+	0x351a, 0xbaa0, 0x2019, 0x0005, 0x00c6, 0x9066, 0x080c, 0x8803,
+	0x0076, 0x903e, 0x080c, 0x86f1, 0x900e, 0x080c, 0xd5f6, 0x007e,
+	0x00ce, 0x080c, 0x6602, 0x0804, 0x34e8, 0x080c, 0x4ad6, 0x0904,
+	0x351d, 0x080c, 0x6602, 0x2208, 0x0804, 0x34e8, 0x0156, 0x00d6,
+	0x00e6, 0x2069, 0x190e, 0x6810, 0x6914, 0x910a, 0x1208, 0x900e,
+	0x6816, 0x9016, 0x901e, 0x20a9, 0x007e, 0x2069, 0x1000, 0x2d04,
+	0x905d, 0x0118, 0xb84c, 0x0059, 0x9210, 0x8d68, 0x1f04, 0x3817,
+	0x2300, 0x9218, 0x00ee, 0x00de, 0x015e, 0x0804, 0x34e8, 0x00f6,
+	0x0016, 0x907d, 0x0138, 0x9006, 0x8000, 0x2f0c, 0x81ff, 0x0110,
+	0x2178, 0x0cd0, 0x001e, 0x00fe, 0x0005, 0x2069, 0x190e, 0x6910,
+	0x62b8, 0x0804, 0x34e8, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804,
+	0x351a, 0x0126, 0x2091, 0x8000, 0x080c, 0x55ef, 0x0128, 0x2009,
+	0x0007, 0x012e, 0x0804, 0x351a, 0x012e, 0x6158, 0x9190, 0x32e9,
+	0x2215, 0x9294, 0x00ff, 0x6378, 0x83ff, 0x0108, 0x627c, 0x67d8,
+	0x97c4, 0x000a, 0x98c6, 0x000a, 0x1118, 0x2031, 0x0001, 0x00e8,
+	0x97c4, 0x0022, 0x98c6, 0x0022, 0x1118, 0x2031, 0x0003, 0x00a8,
+	0x97c4, 0x0012, 0x98c6, 0x0012, 0x1118, 0x2031, 0x0002, 0x0068,
+	0x080c, 0x7207, 0x1118, 0x2031, 0x0004, 0x0038, 0xd79c, 0x0120,
+	0x2009, 0x0005, 0x0804, 0x351a, 0x9036, 0x7e9a, 0x7f9e, 0x0804,
+	0x34e8, 0x6148, 0x624c, 0x2019, 0x195e, 0x231c, 0x2001, 0x195f,
+	0x2004, 0x789a, 0x0804, 0x34e8, 0x0126, 0x2091, 0x8000, 0x6138,
+	0x623c, 0x6340, 0x012e, 0x0804, 0x34e8, 0x080c, 0x4af2, 0x0904,
+	0x351d, 0xba44, 0xbb38, 0x0804, 0x34e8, 0x080c, 0x0dfa, 0x080c,
+	0x4af2, 0x2110, 0x0904, 0x351d, 0xb804, 0x908c, 0x00ff, 0x918e,
+	0x0006, 0x0140, 0x9084, 0xff00, 0x9086, 0x0600, 0x2009, 0x0009,
+	0x1904, 0x351a, 0x0126, 0x2091, 0x8000, 0x2019, 0x0005, 0x00c6,
+	0x9066, 0x080c, 0x9bc9, 0x080c, 0x8803, 0x0076, 0x903e, 0x080c,
+	0x86f1, 0x900e, 0x080c, 0xd5f6, 0x007e, 0x00ce, 0xb807, 0x0407,
+	0x012e, 0x0804, 0x34e8, 0x6148, 0x624c, 0x7884, 0x604a, 0x7b88,
+	0x634e, 0x2069, 0x185b, 0x831f, 0x9305, 0x6816, 0x788c, 0x2069,
+	0x195e, 0x2d1c, 0x206a, 0x7e98, 0x9682, 0x0014, 0x1210, 0x2031,
+	0x07d0, 0x2069, 0x195f, 0x2d04, 0x266a, 0x789a, 0x0804, 0x34e8,
+	0x0126, 0x2091, 0x8000, 0x6138, 0x7884, 0x603a, 0x910e, 0xd1b4,
+	0x190c, 0x0ee1, 0xd0c4, 0x01a8, 0x00d6, 0x78a8, 0x2009, 0x1975,
+	0x200a, 0x78ac, 0x2011, 0x1976, 0x2012, 0x2069, 0x0100, 0x6838,
+	0x9086, 0x0007, 0x1118, 0x2214, 0x6a5a, 0x0010, 0x210c, 0x695a,
+	0x00de, 0x2001, 0x0100, 0x2004, 0x9086, 0x000a, 0x0168, 0x2011,
 	0x0114, 0x220c, 0x7888, 0xd08c, 0x0118, 0x918d, 0x0080, 0x0010,
-	0x918c, 0xff7f, 0x2112, 0x6140, 0x788c, 0x6042, 0x910e, 0xd1e4,
-	0x190c, 0x0eb1, 0x6040, 0xd0cc, 0x0120, 0x78b0, 0x2011, 0x0114,
-	0x2012, 0x012e, 0x0804, 0x3344, 0x00f6, 0x2079, 0x1800, 0x7a38,
-	0xa898, 0x9084, 0xfebf, 0x9215, 0xa89c, 0x9084, 0xfebf, 0x8002,
-	0x9214, 0x7838, 0x9084, 0x0140, 0x9215, 0x7a3a, 0xa897, 0x4000,
-	0x900e, 0x9085, 0x0001, 0x2001, 0x0000, 0x00fe, 0x0005, 0x7898,
-	0x9005, 0x01a8, 0x7888, 0x9025, 0x0904, 0x3379, 0x788c, 0x902d,
-	0x0904, 0x3379, 0x900e, 0x080c, 0x6256, 0x1120, 0xba44, 0xbb38,
-	0xbc46, 0xbd3a, 0x9186, 0x07ff, 0x0190, 0x8108, 0x0ca0, 0x080c,
-	0x48c7, 0x0904, 0x3379, 0x7888, 0x900d, 0x0904, 0x3379, 0x788c,
-	0x9005, 0x0904, 0x3379, 0xba44, 0xb946, 0xbb38, 0xb83a, 0x0804,
-	0x3344, 0x2011, 0xbc09, 0x0010, 0x2011, 0xbc05, 0x080c, 0x53ae,
-	0x1904, 0x3376, 0x00c6, 0x2061, 0x0100, 0x7984, 0x9186, 0x00ff,
-	0x1130, 0x2001, 0x1817, 0x2004, 0x9085, 0xff00, 0x0088, 0x9182,
-	0x007f, 0x16e0, 0x9188, 0x3145, 0x210d, 0x918c, 0x00ff, 0x2001,
-	0x1817, 0x2004, 0x0026, 0x9116, 0x002e, 0x0580, 0x810f, 0x9105,
-	0x0126, 0x2091, 0x8000, 0x0006, 0x080c, 0x9dd9, 0x000e, 0x0510,
-	0x602e, 0x620a, 0x7984, 0x00b6, 0x080c, 0x61fc, 0x2b08, 0x00be,
-	0x1500, 0x6112, 0x6023, 0x0001, 0x080c, 0x4894, 0x01d0, 0x9006,
-	0xa866, 0x7007, 0x0003, 0xa832, 0xa868, 0xc0fd, 0xa86a, 0x701f,
-	0x3824, 0x2900, 0x6016, 0x2009, 0x0032, 0x080c, 0x9ea9, 0x012e,
-	0x00ce, 0x0005, 0x012e, 0x00ce, 0x0804, 0x3376, 0x00ce, 0x0804,
-	0x3379, 0x080c, 0x9e2f, 0x0cb0, 0xa830, 0x9086, 0x0100, 0x0904,
-	0x3376, 0x0804, 0x3344, 0x2061, 0x1a48, 0x0126, 0x2091, 0x8000,
-	0x6000, 0xd084, 0x0170, 0x6104, 0x6208, 0x2061, 0x1800, 0x6350,
-	0x6070, 0x789a, 0x60bc, 0x789e, 0x60b8, 0x78aa, 0x012e, 0x0804,
-	0x3344, 0x900e, 0x2110, 0x0c88, 0x81ff, 0x1904, 0x3376, 0x080c,
-	0x6faa, 0x0904, 0x3376, 0x0126, 0x2091, 0x8000, 0x6250, 0x6070,
-	0x9202, 0x0248, 0x9085, 0x0001, 0x080c, 0x26d9, 0x080c, 0x55c8,
-	0x012e, 0x0804, 0x3344, 0x012e, 0x0804, 0x3379, 0x0006, 0x0016,
-	0x00c6, 0x00e6, 0x2001, 0x1981, 0x2070, 0x2061, 0x185b, 0x6008,
-	0x2072, 0x900e, 0x2011, 0x1400, 0x080c, 0x8277, 0x7206, 0x00ee,
-	0x00ce, 0x001e, 0x000e, 0x0005, 0x0126, 0x2091, 0x8000, 0x81ff,
-	0x0128, 0x012e, 0x2021, 0x400b, 0x0804, 0x3346, 0x7884, 0xd0fc,
-	0x0148, 0x2001, 0x002a, 0x2004, 0x9082, 0x00e1, 0x0288, 0x012e,
-	0x0804, 0x3379, 0x2001, 0x002a, 0x2004, 0x2069, 0x185b, 0x6908,
-	0x9102, 0x1230, 0x012e, 0x0804, 0x3379, 0x012e, 0x0804, 0x3376,
-	0x080c, 0x9dae, 0x0dd0, 0x7884, 0xd0fc, 0x0904, 0x38ef, 0x00c6,
-	0x080c, 0x4894, 0x00ce, 0x0d88, 0xa867, 0x0000, 0x7884, 0xa80a,
-	0x7898, 0xa80e, 0x789c, 0xa812, 0x2001, 0x002e, 0x2004, 0xa81a,
-	0x2001, 0x002f, 0x2004, 0xa81e, 0x2001, 0x0030, 0x2004, 0xa822,
-	0x2001, 0x0031, 0x2004, 0xa826, 0x2001, 0x0034, 0x2004, 0xa82a,
-	0x2001, 0x0035, 0x2004, 0xa82e, 0x2001, 0x002a, 0x2004, 0x9080,
-	0x0003, 0x9084, 0x00fc, 0x8004, 0xa816, 0x080c, 0x3a75, 0x0928,
-	0x7014, 0x2048, 0xad2c, 0xac28, 0xab1c, 0xaa18, 0xa930, 0xa808,
+	0x918c, 0xff7f, 0x2112, 0x0060, 0x2011, 0x0116, 0x220c, 0x7888,
+	0xd08c, 0x0118, 0x918d, 0x0040, 0x0010, 0x918c, 0xff7f, 0x2112,
+	0x603c, 0x7988, 0x613e, 0x6140, 0x910d, 0x788c, 0x6042, 0x7a88,
+	0x9294, 0x1000, 0x9205, 0x910e, 0xd1e4, 0x190c, 0x0ef7, 0x6040,
+	0xd0cc, 0x0120, 0x78b0, 0x2011, 0x0114, 0x2012, 0x012e, 0x0804,
+	0x34e8, 0x00f6, 0x2079, 0x1800, 0x7a38, 0xa898, 0x9084, 0xfebf,
+	0x9215, 0xa89c, 0x9084, 0xfebf, 0x8002, 0x9214, 0x7838, 0x9084,
+	0x0140, 0x9215, 0x7a3a, 0xa897, 0x4000, 0x900e, 0x9085, 0x0001,
+	0x2001, 0x0000, 0x00fe, 0x0005, 0x7898, 0x9005, 0x01a8, 0x7888,
+	0x9025, 0x0904, 0x351d, 0x788c, 0x902d, 0x0904, 0x351d, 0x900e,
+	0x080c, 0x649f, 0x1120, 0xba44, 0xbb38, 0xbc46, 0xbd3a, 0x9186,
+	0x07ff, 0x0190, 0x8108, 0x0ca0, 0x080c, 0x4af2, 0x0904, 0x351d,
+	0x7888, 0x900d, 0x0904, 0x351d, 0x788c, 0x9005, 0x0904, 0x351d,
+	0xba44, 0xb946, 0xbb38, 0xb83a, 0x0804, 0x34e8, 0x2011, 0xbc09,
+	0x0010, 0x2011, 0xbc05, 0x080c, 0x55ef, 0x1904, 0x351a, 0x00c6,
+	0x2061, 0x0100, 0x7984, 0x9186, 0x00ff, 0x1130, 0x2001, 0x1817,
+	0x2004, 0x9085, 0xff00, 0x0088, 0x9182, 0x007f, 0x16e0, 0x9188,
+	0x32e9, 0x210d, 0x918c, 0x00ff, 0x2001, 0x1817, 0x2004, 0x0026,
+	0x9116, 0x002e, 0x0580, 0x810f, 0x9105, 0x0126, 0x2091, 0x8000,
+	0x0006, 0x080c, 0xa08d, 0x000e, 0x0510, 0x602e, 0x620a, 0x7984,
+	0x00b6, 0x080c, 0x6445, 0x2b08, 0x00be, 0x1500, 0x6112, 0x6023,
+	0x0001, 0x080c, 0x4abf, 0x01d0, 0x9006, 0xa866, 0x7007, 0x0003,
+	0xa832, 0xa868, 0xc0fd, 0xa86a, 0x701f, 0x39e1, 0x2900, 0x6016,
+	0x2009, 0x0032, 0x080c, 0xa15d, 0x012e, 0x00ce, 0x0005, 0x012e,
+	0x00ce, 0x0804, 0x351a, 0x00ce, 0x0804, 0x351d, 0x080c, 0xa0e3,
+	0x0cb0, 0xa830, 0x9086, 0x0100, 0x0904, 0x351a, 0x0804, 0x34e8,
+	0x2061, 0x1a48, 0x0126, 0x2091, 0x8000, 0x6000, 0xd084, 0x0170,
+	0x6104, 0x6208, 0x2061, 0x1800, 0x6350, 0x6070, 0x789a, 0x60bc,
+	0x789e, 0x60b8, 0x78aa, 0x012e, 0x0804, 0x34e8, 0x900e, 0x2110,
+	0x0c88, 0x81ff, 0x1904, 0x351a, 0x080c, 0x7207, 0x0904, 0x351a,
+	0x0126, 0x2091, 0x8000, 0x6250, 0x6070, 0x9202, 0x0248, 0x9085,
+	0x0001, 0x080c, 0x27d7, 0x080c, 0x580e, 0x012e, 0x0804, 0x34e8,
+	0x012e, 0x0804, 0x351d, 0x0006, 0x0016, 0x00c6, 0x00e6, 0x2001,
+	0x1981, 0x2070, 0x2061, 0x185b, 0x6008, 0x2072, 0x900e, 0x2011,
+	0x1400, 0x080c, 0x84ff, 0x7206, 0x00ee, 0x00ce, 0x001e, 0x000e,
+	0x0005, 0x0126, 0x2091, 0x8000, 0x81ff, 0x0128, 0x012e, 0x2021,
+	0x400b, 0x0804, 0x34ea, 0x7884, 0xd0fc, 0x0148, 0x2001, 0x002a,
+	0x2004, 0x9082, 0x00e1, 0x0288, 0x012e, 0x0804, 0x351d, 0x2001,
+	0x002a, 0x2004, 0x2069, 0x185b, 0x6908, 0x9102, 0x1230, 0x012e,
+	0x0804, 0x351d, 0x012e, 0x0804, 0x351a, 0x080c, 0xa062, 0x0dd0,
+	0x7884, 0xd0fc, 0x0904, 0x3aac, 0x00c6, 0x080c, 0x4abf, 0x00ce,
+	0x0d88, 0xa867, 0x0000, 0x7884, 0xa80a, 0x7898, 0xa80e, 0x789c,
+	0xa812, 0x2001, 0x002e, 0x2004, 0xa81a, 0x2001, 0x002f, 0x2004,
+	0xa81e, 0x2001, 0x0030, 0x2004, 0xa822, 0x2001, 0x0031, 0x2004,
+	0xa826, 0x2001, 0x0034, 0x2004, 0xa82a, 0x2001, 0x0035, 0x2004,
+	0xa82e, 0x2001, 0x002a, 0x2004, 0x9080, 0x0003, 0x9084, 0x00fc,
+	0x8004, 0xa816, 0x080c, 0x3c32, 0x0928, 0x7014, 0x2048, 0xad2c,
+	0xac28, 0xab1c, 0xaa18, 0xa930, 0xa808, 0xd0b4, 0x1120, 0x2029,
+	0x0000, 0x2021, 0x0000, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f,
+	0x9084, 0xffc0, 0x9080, 0x001b, 0x080c, 0x4b08, 0x701f, 0x3b6f,
+	0x7023, 0x0001, 0x012e, 0x0005, 0x0046, 0x0086, 0x0096, 0x00a6,
+	0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x080c, 0x3a1b, 0x2001,
+	0x1977, 0x2003, 0x0000, 0x2021, 0x000a, 0x2061, 0x0100, 0x6104,
+	0x0016, 0x60bb, 0x0000, 0x60bf, 0x32e1, 0x60bf, 0x0012, 0x080c,
+	0x3ca1, 0x080c, 0x3c60, 0x00f6, 0x00e6, 0x0086, 0x2940, 0x2071,
+	0x1a3d, 0x2079, 0x0090, 0x00d6, 0x2069, 0x0000, 0x6884, 0xd0b4,
+	0x0140, 0x2001, 0x0035, 0x2004, 0x780e, 0x2001, 0x0034, 0x2004,
+	0x780a, 0x00de, 0x2011, 0x0001, 0x080c, 0x408d, 0x008e, 0x00ee,
+	0x00fe, 0x080c, 0x3fba, 0x080c, 0x3e7f, 0x05b8, 0x2001, 0x020b,
+	0x2004, 0x9084, 0x0140, 0x1db8, 0x080c, 0x4101, 0x00f6, 0x2079,
+	0x0300, 0x78bc, 0x00fe, 0x908c, 0x0070, 0x1560, 0x2071, 0x0200,
+	0x7037, 0x0000, 0x7050, 0x9084, 0xff00, 0x9086, 0x3200, 0x1510,
+	0x7037, 0x0001, 0x7050, 0x9084, 0xff00, 0x9086, 0xe100, 0x11d0,
+	0x7037, 0x0000, 0x7054, 0x7037, 0x0000, 0x715c, 0x9106, 0x1190,
+	0x2001, 0x181f, 0x2004, 0x9106, 0x1168, 0x00c6, 0x2061, 0x0100,
+	0x6024, 0x9084, 0x1e00, 0x00ce, 0x0138, 0x080c, 0x3e89, 0x080c,
+	0x3c5b, 0x0058, 0x080c, 0x3c5b, 0x080c, 0x4025, 0x080c, 0x3fb0,
+	0x2001, 0x020b, 0x2004, 0xd0e4, 0x0dd8, 0x2001, 0x032a, 0x2003,
+	0x0004, 0x2061, 0x0100, 0x6027, 0x0002, 0x001e, 0x6106, 0x2011,
+	0x020d, 0x2013, 0x0020, 0x60bb, 0x0000, 0x60bf, 0x0108, 0x60bf,
+	0x0012, 0x2001, 0x0004, 0x200c, 0x918c, 0xfffd, 0x2102, 0x080c,
+	0x12f8, 0x2009, 0x0028, 0x080c, 0x230a, 0x2001, 0x0227, 0x200c,
+	0x2102, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x00ae, 0x009e,
+	0x008e, 0x004e, 0x2001, 0x1977, 0x2004, 0x9005, 0x1118, 0x012e,
+	0x0804, 0x34e8, 0x012e, 0x2021, 0x400c, 0x0804, 0x34ea, 0x0016,
+	0x0026, 0x0036, 0x0046, 0x0056, 0x0076, 0x0086, 0x0096, 0x00d6,
+	0x0156, 0x7014, 0x2048, 0x7020, 0x20a8, 0x8000, 0x7022, 0xa804,
+	0x9005, 0x0904, 0x3bcb, 0x2048, 0x1f04, 0x3b7f, 0x7068, 0x2040,
+	0xa28c, 0xa390, 0xa494, 0xa598, 0xa930, 0xa808, 0xd0b4, 0x1120,
+	0x2029, 0x0000, 0x2021, 0x0000, 0x0096, 0x7014, 0x2048, 0xa864,
+	0x009e, 0x9086, 0x0103, 0x0170, 0x8906, 0x8006, 0x8007, 0x90bc,
+	0x003f, 0x9084, 0xffc0, 0x9080, 0x001b, 0x080c, 0x4b08, 0x701f,
+	0x3b6f, 0x00b0, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084,
+	0xffc0, 0x9080, 0x001b, 0x21a8, 0x27e0, 0x2098, 0x27e8, 0x20a0,
+	0x0006, 0x080c, 0x0fae, 0x000e, 0x080c, 0x4b0b, 0x701f, 0x3b6f,
+	0x015e, 0x00de, 0x009e, 0x008e, 0x007e, 0x005e, 0x004e, 0x003e,
+	0x002e, 0x001e, 0x0005, 0x7014, 0x2048, 0xa864, 0x9086, 0x0103,
+	0x1118, 0x701f, 0x3c30, 0x0450, 0x7014, 0x2048, 0xa868, 0xc0fd,
+	0xa86a, 0x2009, 0x007f, 0x080c, 0x643f, 0x0110, 0x9006, 0x0030,
+	0xb813, 0x00ff, 0xb817, 0xfffd, 0x080c, 0xc302, 0x015e, 0x00de,
+	0x009e, 0x008e, 0x007e, 0x005e, 0x004e, 0x003e, 0x002e, 0x001e,
+	0x0904, 0x351a, 0x0016, 0x0026, 0x0036, 0x0046, 0x0056, 0x0076,
+	0x0086, 0x0096, 0x00d6, 0x0156, 0x701f, 0x3c02, 0x7007, 0x0003,
+	0x0804, 0x3bc0, 0xa830, 0x9086, 0x0100, 0x2021, 0x400c, 0x0904,
+	0x34ea, 0x0076, 0xad10, 0xac0c, 0xab24, 0xaa20, 0xa930, 0xa808,
 	0xd0b4, 0x1120, 0x2029, 0x0000, 0x2021, 0x0000, 0x8906, 0x8006,
-	0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x001b, 0x080c,
-	0x48dd, 0x701f, 0x39b2, 0x7023, 0x0001, 0x012e, 0x0005, 0x0046,
-	0x0086, 0x0096, 0x00a6, 0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6,
-	0x080c, 0x385e, 0x2001, 0x1977, 0x2003, 0x0000, 0x2021, 0x000a,
-	0x2061, 0x0100, 0x6104, 0x0016, 0x60bb, 0x0000, 0x60bf, 0x32e1,
-	0x60bf, 0x0012, 0x080c, 0x3ae4, 0x080c, 0x3aa3, 0x00f6, 0x00e6,
-	0x0086, 0x2940, 0x2071, 0x1a3d, 0x2079, 0x0090, 0x00d6, 0x2069,
-	0x0000, 0x6884, 0xd0b4, 0x0140, 0x2001, 0x0035, 0x2004, 0x780e,
-	0x2001, 0x0034, 0x2004, 0x780a, 0x00de, 0x2011, 0x0001, 0x080c,
-	0x3e77, 0x008e, 0x00ee, 0x00fe, 0x080c, 0x3da4, 0x080c, 0x3ca9,
-	0x05b8, 0x2001, 0x020b, 0x2004, 0x9084, 0x0140, 0x1db8, 0x080c,
-	0x3eeb, 0x00f6, 0x2079, 0x0300, 0x78bc, 0x00fe, 0x908c, 0x0070,
-	0x1560, 0x2071, 0x0200, 0x7037, 0x0000, 0x7050, 0x9084, 0xff00,
-	0x9086, 0x3200, 0x1510, 0x7037, 0x0001, 0x7050, 0x9084, 0xff00,
-	0x9086, 0xe100, 0x11d0, 0x7037, 0x0000, 0x7054, 0x7037, 0x0000,
-	0x715c, 0x9106, 0x1190, 0x2001, 0x181f, 0x2004, 0x9106, 0x1168,
-	0x00c6, 0x2061, 0x0100, 0x6024, 0x9084, 0x1e00, 0x00ce, 0x0138,
-	0x080c, 0x3cb3, 0x080c, 0x3a9e, 0x0058, 0x080c, 0x3a9e, 0x080c,
-	0x3e0f, 0x080c, 0x3d9a, 0x2001, 0x020b, 0x2004, 0xd0e4, 0x0dd8,
-	0x2001, 0x032a, 0x2003, 0x0004, 0x2061, 0x0100, 0x6027, 0x0002,
-	0x001e, 0x6106, 0x2011, 0x020d, 0x2013, 0x0020, 0x60bb, 0x0000,
-	0x60bf, 0x0108, 0x60bf, 0x0012, 0x2001, 0x0004, 0x200c, 0x918c,
-	0xfffd, 0x2102, 0x080c, 0x129f, 0x2009, 0x0028, 0x080c, 0x2275,
-	0x2001, 0x0227, 0x200c, 0x2102, 0x00fe, 0x00ee, 0x00de, 0x00ce,
-	0x00be, 0x00ae, 0x009e, 0x008e, 0x004e, 0x2001, 0x1977, 0x2004,
-	0x9005, 0x1118, 0x012e, 0x0804, 0x3344, 0x012e, 0x2021, 0x400c,
-	0x0804, 0x3346, 0x0016, 0x0026, 0x0036, 0x0046, 0x0056, 0x0076,
-	0x0086, 0x0096, 0x00d6, 0x0156, 0x7014, 0x2048, 0x7020, 0x20a8,
-	0x8000, 0x7022, 0xa804, 0x9005, 0x0904, 0x3a0e, 0x2048, 0x1f04,
-	0x39c2, 0x7068, 0x2040, 0xa28c, 0xa390, 0xa494, 0xa598, 0xa930,
-	0xa808, 0xd0b4, 0x1120, 0x2029, 0x0000, 0x2021, 0x0000, 0x0096,
-	0x7014, 0x2048, 0xa864, 0x009e, 0x9086, 0x0103, 0x0170, 0x8906,
-	0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x001b,
-	0x080c, 0x48dd, 0x701f, 0x39b2, 0x00b0, 0x8906, 0x8006, 0x8007,
-	0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x001b, 0x21a8, 0x27e0,
-	0x2098, 0x27e8, 0x20a0, 0x0006, 0x080c, 0x0f68, 0x000e, 0x080c,
-	0x48e0, 0x701f, 0x39b2, 0x015e, 0x00de, 0x009e, 0x008e, 0x007e,
-	0x005e, 0x004e, 0x003e, 0x002e, 0x001e, 0x0005, 0x7014, 0x2048,
-	0xa864, 0x9086, 0x0103, 0x1118, 0x701f, 0x3a73, 0x0450, 0x7014,
-	0x2048, 0xa868, 0xc0fd, 0xa86a, 0x2009, 0x007f, 0x080c, 0x61f6,
-	0x0110, 0x9006, 0x0030, 0xb813, 0x00ff, 0xb817, 0xfffd, 0x080c,
-	0xc004, 0x015e, 0x00de, 0x009e, 0x008e, 0x007e, 0x005e, 0x004e,
-	0x003e, 0x002e, 0x001e, 0x0904, 0x3376, 0x0016, 0x0026, 0x0036,
-	0x0046, 0x0056, 0x0076, 0x0086, 0x0096, 0x00d6, 0x0156, 0x701f,
-	0x3a45, 0x7007, 0x0003, 0x0804, 0x3a03, 0xa830, 0x9086, 0x0100,
-	0x2021, 0x400c, 0x0904, 0x3346, 0x0076, 0xad10, 0xac0c, 0xab24,
-	0xaa20, 0xa930, 0xa808, 0xd0b4, 0x1120, 0x2029, 0x0000, 0x2021,
-	0x0000, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0,
-	0x9080, 0x001b, 0x21a8, 0x27e0, 0x2098, 0x27e8, 0x20a0, 0x0006,
-	0x080c, 0x0f68, 0x000e, 0x080c, 0x48e0, 0x007e, 0x701f, 0x39b2,
-	0x7023, 0x0001, 0x0005, 0x0804, 0x3344, 0x0156, 0x00c6, 0xa814,
-	0x908a, 0x001e, 0x0218, 0xa833, 0x001e, 0x0010, 0xa832, 0x0078,
-	0x81ff, 0x0168, 0x0016, 0x080c, 0x4894, 0x001e, 0x0130, 0xa800,
-	0x2040, 0xa008, 0xa80a, 0x2100, 0x0c58, 0x9006, 0x0010, 0x9085,
-	0x0001, 0x00ce, 0x015e, 0x0005, 0x0006, 0x00f6, 0x2079, 0x0000,
-	0x7880, 0x9086, 0x0044, 0x00fe, 0x000e, 0x0005, 0x2001, 0x1977,
-	0x2003, 0x0001, 0x0005, 0x00f6, 0x00e6, 0x00c6, 0x2061, 0x0200,
-	0x2001, 0x1982, 0x2004, 0x601a, 0x2061, 0x0100, 0x2001, 0x1981,
-	0x2004, 0x60ce, 0x6104, 0xc1ac, 0x6106, 0x080c, 0x4894, 0xa813,
-	0x0019, 0xa817, 0x0001, 0x2900, 0xa85a, 0x2001, 0x002e, 0x2004,
-	0xa866, 0x2001, 0x002f, 0x2004, 0xa86a, 0x2061, 0x0090, 0x2079,
-	0x0100, 0x2001, 0x1981, 0x2004, 0x6036, 0x2009, 0x0040, 0x080c,
-	0x2275, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8, 0xa86e, 0x601a,
-	0xa873, 0x0000, 0x601f, 0x0000, 0x78ca, 0x9006, 0x600a, 0x600e,
-	0x00ce, 0x00ee, 0x00fe, 0x0005, 0x00e6, 0x080c, 0x4894, 0x2940,
-	0xa013, 0x0019, 0xa017, 0x0001, 0x2800, 0xa05a, 0x2001, 0x0030,
-	0x2004, 0xa866, 0x2001, 0x0031, 0x2004, 0xa86a, 0x2001, 0x002a,
-	0x2004, 0x9084, 0xfff8, 0xa86e, 0xa873, 0x0000, 0x2001, 0x032a,
-	0x2003, 0x0004, 0x2001, 0x0300, 0x2003, 0x0000, 0x2001, 0x020d,
-	0x2003, 0x0000, 0x2001, 0x0004, 0x200c, 0x918d, 0x0002, 0x2102,
-	0x00ee, 0x0005, 0x0126, 0x2091, 0x8000, 0x81ff, 0x0148, 0x080c,
-	0x2a62, 0x1130, 0x9006, 0x080c, 0x29ba, 0x9006, 0x080c, 0x299d,
-	0x7884, 0x9084, 0x0007, 0x0002, 0x3b2f, 0x3b38, 0x3b41, 0x3b2c,
-	0x3b2c, 0x3b2c, 0x3b2c, 0x3b2c, 0x012e, 0x0804, 0x3379, 0x2009,
-	0x0114, 0x2104, 0x9085, 0x0800, 0x200a, 0x080c, 0x3cfd, 0x00c0,
-	0x2009, 0x0114, 0x2104, 0x9085, 0x4000, 0x200a, 0x080c, 0x3cfd,
-	0x0078, 0x080c, 0x6faa, 0x1128, 0x012e, 0x2009, 0x0016, 0x0804,
-	0x3376, 0x81ff, 0x0128, 0x012e, 0x2021, 0x400b, 0x0804, 0x3346,
-	0x0086, 0x0096, 0x00a6, 0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6,
-	0x080c, 0x385e, 0x2009, 0x0101, 0x210c, 0x0016, 0x7ec8, 0x7dcc,
-	0x9006, 0x2068, 0x2060, 0x2058, 0x080c, 0x3fc6, 0x080c, 0x3f16,
-	0x903e, 0x2720, 0x00f6, 0x00e6, 0x0086, 0x2940, 0x2071, 0x1a3d,
-	0x2079, 0x0090, 0x00d6, 0x2069, 0x0000, 0x6884, 0xd0b4, 0x0120,
-	0x68d4, 0x780e, 0x68d0, 0x780a, 0x00de, 0x2011, 0x0001, 0x080c,
-	0x3e77, 0x080c, 0x2a6a, 0x080c, 0x2a6a, 0x080c, 0x2a6a, 0x080c,
-	0x2a6a, 0x080c, 0x3e77, 0x008e, 0x00ee, 0x00fe, 0x080c, 0x3da4,
-	0x2009, 0x9c40, 0x8109, 0x11b0, 0x080c, 0x3cb3, 0x2001, 0x0004,
-	0x200c, 0x918c, 0xfffd, 0x2102, 0x001e, 0x00fe, 0x00ee, 0x00de,
-	0x00ce, 0x00be, 0x00ae, 0x009e, 0x008e, 0x2009, 0x0017, 0x080c,
-	0x3376, 0x0cf8, 0x2001, 0x020b, 0x2004, 0x9084, 0x0140, 0x1d10,
-	0x00f6, 0x2079, 0x0000, 0x7884, 0x00fe, 0xd0bc, 0x0178, 0x2001,
-	0x0201, 0x200c, 0x81ff, 0x0150, 0x080c, 0x3d82, 0x2d00, 0x9c05,
-	0x9b05, 0x0120, 0x080c, 0x3cb3, 0x0804, 0x3c60, 0x080c, 0x3eeb,
-	0x080c, 0x3e0f, 0x080c, 0x3d65, 0x080c, 0x3d9a, 0x00f6, 0x2079,
-	0x0100, 0x7824, 0xd0ac, 0x0130, 0x8b58, 0x080c, 0x3cb3, 0x00fe,
-	0x0804, 0x3c60, 0x00fe, 0x080c, 0x3ca9, 0x1150, 0x8d68, 0x2001,
-	0x0032, 0x2602, 0x2001, 0x0033, 0x2502, 0x080c, 0x3cb3, 0x0080,
-	0x87ff, 0x0138, 0x2001, 0x0201, 0x2004, 0x9005, 0x1908, 0x8739,
-	0x0038, 0x2001, 0x1a3a, 0x2004, 0x9086, 0x0000, 0x1904, 0x3bb0,
-	0x2001, 0x032f, 0x2003, 0x00f6, 0x8631, 0x1208, 0x8529, 0x2500,
-	0x9605, 0x0904, 0x3c60, 0x7884, 0xd0bc, 0x0128, 0x2d00, 0x9c05,
-	0x9b05, 0x1904, 0x3c60, 0xa013, 0x0019, 0x2001, 0x032a, 0x2003,
-	0x0004, 0x7884, 0xd0ac, 0x1148, 0x2001, 0x1a3a, 0x2003, 0x0003,
-	0x2001, 0x032a, 0x2003, 0x0009, 0x0030, 0xa017, 0x0001, 0x78b4,
-	0x9005, 0x0108, 0xa016, 0x2800, 0xa05a, 0x2009, 0x0040, 0x080c,
-	0x2275, 0x2900, 0xa85a, 0xa813, 0x0019, 0x7884, 0xd0a4, 0x1180,
-	0xa817, 0x0000, 0x00c6, 0x20a9, 0x0004, 0x2061, 0x0090, 0x602b,
-	0x0008, 0x2001, 0x0203, 0x2004, 0x1f04, 0x3c37, 0x00ce, 0x0030,
-	0xa817, 0x0001, 0x78b0, 0x9005, 0x0108, 0xa816, 0x00f6, 0x00c6,
-	0x2079, 0x0100, 0x2061, 0x0090, 0x7827, 0x0002, 0x2001, 0x002a,
-	0x2004, 0x9084, 0xfff8, 0x601a, 0x0006, 0x2001, 0x002b, 0x2004,
-	0x601e, 0x78c6, 0x000e, 0x78ca, 0x00ce, 0x00fe, 0x0804, 0x3b6a,
-	0x001e, 0x00c6, 0x2001, 0x032a, 0x2003, 0x0004, 0x2061, 0x0100,
-	0x6027, 0x0002, 0x6106, 0x2011, 0x020d, 0x2013, 0x0020, 0x2001,
-	0x0004, 0x200c, 0x918c, 0xfffd, 0x2102, 0x080c, 0x129f, 0x7884,
-	0x9084, 0x0003, 0x9086, 0x0002, 0x01a0, 0x2009, 0x0028, 0x080c,
-	0x2275, 0x2001, 0x0227, 0x200c, 0x2102, 0x6050, 0x9084, 0xb7ef,
-	0x6052, 0x602f, 0x0000, 0x604b, 0xf7f7, 0x6043, 0x0090, 0x6043,
-	0x0010, 0x00ce, 0x2d08, 0x2c10, 0x2b18, 0x2b00, 0x9c05, 0x9d05,
-	0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x00ae, 0x009e, 0x008e,
-	0x1118, 0x012e, 0x0804, 0x3344, 0x012e, 0x2021, 0x400c, 0x0804,
-	0x3346, 0x9085, 0x0001, 0x1d04, 0x3cb2, 0x2091, 0x6000, 0x8420,
-	0x9486, 0x0064, 0x0005, 0x2001, 0x0105, 0x2003, 0x0010, 0x2001,
-	0x032a, 0x2003, 0x0004, 0x2001, 0x1a3a, 0x2003, 0x0000, 0x0071,
-	0x2009, 0x0048, 0x080c, 0x2275, 0x2001, 0x0227, 0x2024, 0x2402,
-	0x2001, 0x0109, 0x2003, 0x4000, 0x9026, 0x0005, 0x00f6, 0x00e6,
-	0x2071, 0x1a3d, 0x7000, 0x9086, 0x0000, 0x0520, 0x2079, 0x0090,
-	0x2009, 0x0206, 0x2104, 0x2009, 0x0203, 0x210c, 0x9106, 0x1120,
-	0x2009, 0x0040, 0x080c, 0x2275, 0x782c, 0xd0fc, 0x0d88, 0x080c,
-	0x3eeb, 0x7000, 0x9086, 0x0000, 0x1d58, 0x782b, 0x0004, 0x782c,
-	0xd0ac, 0x1de8, 0x2009, 0x0040, 0x080c, 0x2275, 0x782b, 0x0002,
-	0x7003, 0x0000, 0x00ee, 0x00fe, 0x0005, 0x00f6, 0x2079, 0x0100,
-	0x2001, 0x1817, 0x200c, 0x7932, 0x7936, 0x080c, 0x26b9, 0x7850,
-	0x9084, 0xfbff, 0x9085, 0x0030, 0x7852, 0x2019, 0x01f4, 0x8319,
-	0x1df0, 0x9084, 0xffcf, 0x9085, 0x2000, 0x7852, 0x20a9, 0x0046,
-	0x1d04, 0x3d18, 0x2091, 0x6000, 0x1f04, 0x3d18, 0x7850, 0x9085,
-	0x0400, 0x9084, 0xdfff, 0x7852, 0x2001, 0x0021, 0x2004, 0x9084,
-	0x0003, 0x9086, 0x0001, 0x1120, 0x7850, 0x9084, 0xdfff, 0x7852,
-	0x784b, 0xf7f7, 0x7843, 0x0090, 0x7843, 0x0010, 0x20a9, 0x0028,
-	0xa001, 0x1f04, 0x3d38, 0x7850, 0x9085, 0x1400, 0x7852, 0x2019,
-	0x61a8, 0x7854, 0xa001, 0xa001, 0xd08c, 0x1110, 0x8319, 0x1dc8,
-	0x7827, 0x0048, 0x7850, 0x9085, 0x0400, 0x7852, 0x7843, 0x0040,
-	0x2019, 0x01f4, 0xa001, 0xa001, 0x8319, 0x1de0, 0x2001, 0x0100,
-	0x080c, 0x2b21, 0x7827, 0x0020, 0x7843, 0x0000, 0x9006, 0x080c,
-	0x2b21, 0x7827, 0x0048, 0x00fe, 0x0005, 0x7884, 0xd0ac, 0x11c8,
-	0x00f6, 0x00e6, 0x2071, 0x1a3a, 0x2079, 0x0320, 0x2001, 0x0201,
-	0x2004, 0x9005, 0x0160, 0x7000, 0x9086, 0x0000, 0x1140, 0x0051,
-	0xd0bc, 0x0108, 0x8738, 0x7003, 0x0003, 0x782b, 0x0019, 0x00ee,
-	0x00fe, 0x0005, 0x00f6, 0x2079, 0x0300, 0x78bc, 0x00fe, 0x908c,
-	0x0070, 0x0178, 0x2009, 0x0032, 0x260a, 0x2009, 0x0033, 0x250a,
-	0xd0b4, 0x0108, 0x8c60, 0xd0ac, 0x0108, 0x8d68, 0xd0a4, 0x0108,
-	0x8b58, 0x0005, 0x00f6, 0x2079, 0x0200, 0x781c, 0xd084, 0x0110,
-	0x7837, 0x0050, 0x00fe, 0x0005, 0x00e6, 0x2071, 0x0100, 0x2001,
-	0x1982, 0x2004, 0x70e2, 0x080c, 0x3a94, 0x1188, 0x2001, 0x181f,
-	0x2004, 0x2009, 0x181e, 0x210c, 0x918c, 0x00ff, 0x706e, 0x716a,
-	0x7066, 0x918d, 0x3200, 0x7162, 0x7073, 0xe109, 0x0080, 0x702c,
-	0x9085, 0x0002, 0x702e, 0x2009, 0x1817, 0x210c, 0x716e, 0x7063,
-	0x0100, 0x7166, 0x719e, 0x706b, 0x0000, 0x7073, 0x0809, 0x7077,
-	0x0008, 0x7078, 0x9080, 0x0100, 0x707a, 0x7080, 0x8000, 0x7082,
-	0x7087, 0xaaaa, 0x9006, 0x708a, 0x708e, 0x707e, 0x70d6, 0x70ab,
-	0x0036, 0x70af, 0x95d5, 0x7014, 0x9084, 0x1984, 0x9085, 0x0092,
-	0x7016, 0x080c, 0x3eeb, 0x00f6, 0x2071, 0x1a3a, 0x2079, 0x0320,
-	0x00d6, 0x2069, 0x0000, 0x6884, 0xd0b4, 0x0120, 0x689c, 0x780e,
-	0x6898, 0x780a, 0x00de, 0x2009, 0x03e8, 0x8109, 0x1df0, 0x792c,
-	0xd1fc, 0x0110, 0x782b, 0x0004, 0x2011, 0x0011, 0x080c, 0x3e77,
-	0x2011, 0x0001, 0x080c, 0x3e77, 0x00fe, 0x00ee, 0x0005, 0x00f6,
-	0x00e6, 0x2071, 0x1a3a, 0x2079, 0x0320, 0x792c, 0xd1fc, 0x0904,
-	0x3e74, 0x782b, 0x0002, 0x9026, 0xd19c, 0x1904, 0x3e70, 0x7000,
-	0x0002, 0x3e74, 0x3e25, 0x3e55, 0x3e70, 0xd1bc, 0x1170, 0xd1dc,
-	0x1190, 0x8001, 0x7002, 0x2011, 0x0001, 0x080c, 0x3e77, 0x0904,
-	0x3e74, 0x080c, 0x3e77, 0x0804, 0x3e74, 0x00f6, 0x2079, 0x0300,
-	0x78bf, 0x0000, 0x00fe, 0x7810, 0x7914, 0x782b, 0x0004, 0x7812,
-	0x7916, 0x2001, 0x0201, 0x200c, 0x81ff, 0x0de8, 0x080c, 0x3d82,
-	0x2009, 0x0001, 0x00f6, 0x2079, 0x0300, 0x78b8, 0x00fe, 0xd0ec,
-	0x0110, 0x2009, 0x0011, 0x792a, 0x00f8, 0x8001, 0x7002, 0x9184,
-	0x0880, 0x1140, 0x782c, 0xd0fc, 0x1904, 0x3e19, 0x2011, 0x0001,
-	0x00b1, 0x0090, 0xa010, 0x9092, 0x0004, 0x9086, 0x0015, 0x1120,
-	0xa000, 0xa05a, 0x2011, 0x0031, 0xa212, 0xd1dc, 0x1960, 0x0828,
-	0x782b, 0x0004, 0x7003, 0x0000, 0x00ee, 0x00fe, 0x0005, 0xa014,
-	0x9005, 0x0550, 0x8001, 0x0036, 0x0096, 0xa016, 0xa058, 0x2048,
-	0xa010, 0x2009, 0x0031, 0x911a, 0x831c, 0x831c, 0x938a, 0x0007,
-	0x1a0c, 0x0db4, 0x9398, 0x3ea5, 0x231d, 0x083f, 0x9080, 0x0004,
-	0x7a2a, 0x7100, 0x8108, 0x7102, 0x009e, 0x003e, 0x908a, 0x0035,
-	0x1140, 0x0096, 0xa058, 0x2048, 0xa804, 0xa05a, 0x2001, 0x0019,
-	0x009e, 0xa012, 0x9085, 0x0001, 0x0005, 0x3ee2, 0x3ed9, 0x3ed0,
-	0x3ec7, 0x3ebe, 0x3eb5, 0x3eac, 0xa964, 0x7902, 0xa968, 0x7906,
-	0xa96c, 0x7912, 0xa970, 0x7916, 0x0005, 0xa974, 0x7902, 0xa978,
-	0x7906, 0xa97c, 0x7912, 0xa980, 0x7916, 0x0005, 0xa984, 0x7902,
-	0xa988, 0x7906, 0xa98c, 0x7912, 0xa990, 0x7916, 0x0005, 0xa994,
-	0x7902, 0xa998, 0x7906, 0xa99c, 0x7912, 0xa9a0, 0x7916, 0x0005,
-	0xa9a4, 0x7902, 0xa9a8, 0x7906, 0xa9ac, 0x7912, 0xa9b0, 0x7916,
-	0x0005, 0xa9b4, 0x7902, 0xa9b8, 0x7906, 0xa9bc, 0x7912, 0xa9c0,
-	0x7916, 0x0005, 0xa9c4, 0x7902, 0xa9c8, 0x7906, 0xa9cc, 0x7912,
-	0xa9d0, 0x7916, 0x0005, 0x00f6, 0x00e6, 0x0086, 0x2071, 0x1a3d,
-	0x2079, 0x0090, 0x792c, 0xd1fc, 0x01e8, 0x782b, 0x0002, 0x2940,
-	0x9026, 0x7000, 0x0002, 0x3f12, 0x3efe, 0x3f09, 0x8001, 0x7002,
-	0xd19c, 0x1180, 0x2011, 0x0001, 0x080c, 0x3e77, 0x190c, 0x3e77,
-	0x0048, 0x8001, 0x7002, 0x782c, 0xd0fc, 0x1d38, 0x2011, 0x0001,
-	0x080c, 0x3e77, 0x008e, 0x00ee, 0x00fe, 0x0005, 0x00f6, 0x00e6,
-	0x00c6, 0x0086, 0x2061, 0x0200, 0x2001, 0x1982, 0x2004, 0x601a,
-	0x2061, 0x0100, 0x2001, 0x1981, 0x2004, 0x60ce, 0x6104, 0xc1ac,
-	0x6106, 0x2001, 0x002c, 0x2004, 0x9005, 0x0520, 0x2038, 0x2001,
-	0x002e, 0x2024, 0x2001, 0x002f, 0x201c, 0x080c, 0x4894, 0xa813,
-	0x0019, 0xaf16, 0x2900, 0xa85a, 0x978a, 0x0007, 0x0220, 0x2138,
-	0x2009, 0x0007, 0x0010, 0x2708, 0x903e, 0x0096, 0xa858, 0x2048,
-	0xa85c, 0x9080, 0x0019, 0x009e, 0x080c, 0x3f8e, 0x1d68, 0x2900,
-	0xa85a, 0x00d0, 0x080c, 0x4894, 0xa813, 0x0019, 0xa817, 0x0001,
+	0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x001b, 0x21a8,
+	0x27e0, 0x2098, 0x27e8, 0x20a0, 0x0006, 0x080c, 0x0fae, 0x000e,
+	0x080c, 0x4b0b, 0x007e, 0x701f, 0x3b6f, 0x7023, 0x0001, 0x0005,
+	0x0804, 0x34e8, 0x0156, 0x00c6, 0xa814, 0x908a, 0x001e, 0x0218,
+	0xa833, 0x001e, 0x0010, 0xa832, 0x0078, 0x81ff, 0x0168, 0x0016,
+	0x080c, 0x4abf, 0x001e, 0x0130, 0xa800, 0x2040, 0xa008, 0xa80a,
+	0x2100, 0x0c58, 0x9006, 0x0010, 0x9085, 0x0001, 0x00ce, 0x015e,
+	0x0005, 0x0006, 0x00f6, 0x2079, 0x0000, 0x7880, 0x9086, 0x0044,
+	0x00fe, 0x000e, 0x0005, 0x2001, 0x1977, 0x2003, 0x0001, 0x0005,
+	0x00f6, 0x00e6, 0x00c6, 0x2061, 0x0200, 0x2001, 0x1982, 0x2004,
+	0x601a, 0x2061, 0x0100, 0x2001, 0x1981, 0x2004, 0x60ce, 0x6104,
+	0xc1ac, 0x6106, 0x080c, 0x4abf, 0xa813, 0x0019, 0xa817, 0x0001,
 	0x2900, 0xa85a, 0x2001, 0x002e, 0x2004, 0xa866, 0x2001, 0x002f,
-	0x2004, 0xa86a, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8, 0xa86e,
-	0x2001, 0x002b, 0x2004, 0xa872, 0x2061, 0x0090, 0x2079, 0x0100,
-	0x2001, 0x1981, 0x2004, 0x6036, 0x2009, 0x0040, 0x080c, 0x2275,
-	0x2001, 0x002a, 0x2004, 0x9084, 0xfff8, 0x601a, 0x0006, 0x2001,
-	0x002b, 0x2004, 0x601e, 0x78c6, 0x000e, 0x78ca, 0x9006, 0x600a,
-	0x600e, 0x008e, 0x00ce, 0x00ee, 0x00fe, 0x0005, 0x00e6, 0x2071,
-	0x0080, 0xaa60, 0x22e8, 0x20a0, 0x20e1, 0x0000, 0x2099, 0x0088,
-	0x702b, 0x0026, 0x7402, 0x7306, 0x9006, 0x700a, 0x700e, 0x810b,
-	0x810b, 0x21a8, 0x810b, 0x7112, 0x702b, 0x0041, 0x702c, 0xd0fc,
-	0x0de8, 0x702b, 0x0002, 0x702b, 0x0040, 0x4005, 0x7400, 0x7304,
-	0x87ff, 0x0190, 0x0086, 0x0096, 0x2940, 0x0086, 0x080c, 0x4894,
-	0x008e, 0xa058, 0x00a6, 0x2050, 0x2900, 0xb006, 0xa05a, 0x00ae,
-	0x009e, 0x008e, 0x9085, 0x0001, 0x00ee, 0x0005, 0x00e6, 0x2001,
-	0x002d, 0x2004, 0x9005, 0x0528, 0x2038, 0x2001, 0x0030, 0x2024,
-	0x2001, 0x0031, 0x201c, 0x080c, 0x4894, 0x2940, 0xa813, 0x0019,
-	0xaf16, 0x2900, 0xa85a, 0x978a, 0x0007, 0x0220, 0x2138, 0x2009,
-	0x0007, 0x0010, 0x2708, 0x903e, 0x0096, 0xa858, 0x2048, 0xa85c,
-	0x9080, 0x0019, 0x009e, 0x080c, 0x3f8e, 0x1d68, 0x2900, 0xa85a,
-	0x00d8, 0x080c, 0x4894, 0x2940, 0xa013, 0x0019, 0xa017, 0x0001,
-	0x2800, 0xa05a, 0x2001, 0x0030, 0x2004, 0xa066, 0x2001, 0x0031,
-	0x2004, 0xa06a, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8, 0xa06e,
-	0x2001, 0x002b, 0x2004, 0xa072, 0x2001, 0x032a, 0x2003, 0x0004,
-	0x7884, 0xd0ac, 0x1180, 0x2001, 0x0101, 0x200c, 0x918d, 0x0200,
-	0x2102, 0xa017, 0x0000, 0x2001, 0x1a3a, 0x2003, 0x0003, 0x2001,
-	0x032a, 0x2003, 0x0009, 0x2001, 0x0300, 0x2003, 0x0000, 0x2001,
-	0x020d, 0x2003, 0x0000, 0x2001, 0x0004, 0x200c, 0x918d, 0x0002,
-	0x2102, 0x00ee, 0x0005, 0x0126, 0x2091, 0x8000, 0x20a9, 0x001b,
-	0x20a1, 0x1840, 0x20e9, 0x0001, 0x9006, 0x4004, 0x2009, 0x013c,
-	0x200a, 0x012e, 0x7880, 0x9086, 0x0052, 0x0108, 0x0005, 0x0804,
-	0x3344, 0x7d98, 0x7c9c, 0x0804, 0x3446, 0x080c, 0x6faa, 0x190c,
-	0x5caa, 0x2069, 0x185b, 0x2d00, 0x2009, 0x0030, 0x7a8c, 0x7b88,
-	0x7c9c, 0x7d98, 0x2039, 0x0001, 0x080c, 0x48dd, 0x701f, 0x4061,
-	0x0005, 0x080c, 0x53a9, 0x1130, 0x3b00, 0x3a08, 0xc194, 0xc095,
-	0x20d8, 0x21d0, 0x2069, 0x185b, 0x6800, 0x9005, 0x0904, 0x3379,
-	0x6804, 0xd094, 0x00c6, 0x2061, 0x0100, 0x6104, 0x0138, 0x6200,
-	0x9292, 0x0005, 0x0218, 0x918c, 0xffdf, 0x0010, 0x918d, 0x0020,
-	0x6106, 0x00ce, 0xd08c, 0x00c6, 0x2061, 0x0100, 0x6104, 0x0118,
-	0x918d, 0x0010, 0x0010, 0x918c, 0xffef, 0x6106, 0x00ce, 0xd084,
-	0x0158, 0x6a28, 0x928a, 0x007f, 0x1a04, 0x3379, 0x9288, 0x3145,
-	0x210d, 0x918c, 0x00ff, 0x6162, 0xd0dc, 0x0130, 0x6828, 0x908a,
-	0x007f, 0x1a04, 0x3379, 0x605a, 0x6888, 0x9084, 0x0030, 0x8004,
-	0x8004, 0x8004, 0x8004, 0x0006, 0x2009, 0x1989, 0x9080, 0x27ac,
-	0x2005, 0x200a, 0x000e, 0x2009, 0x198a, 0x9080, 0x27b0, 0x2005,
-	0x200a, 0x6808, 0x908a, 0x0100, 0x0a04, 0x3379, 0x908a, 0x0841,
-	0x1a04, 0x3379, 0x9084, 0x0007, 0x1904, 0x3379, 0x680c, 0x9005,
-	0x0904, 0x3379, 0x6810, 0x9005, 0x0904, 0x3379, 0x6848, 0x6940,
-	0x910a, 0x1a04, 0x3379, 0x8001, 0x0904, 0x3379, 0x684c, 0x6944,
-	0x910a, 0x1a04, 0x3379, 0x8001, 0x0904, 0x3379, 0x2009, 0x1959,
-	0x200b, 0x0000, 0x2001, 0x187d, 0x2004, 0xd0c4, 0x0140, 0x7884,
-	0x200a, 0x2009, 0x017f, 0x200a, 0x3b00, 0xc085, 0x20d8, 0x6814,
-	0x908c, 0x00ff, 0x614a, 0x8007, 0x9084, 0x00ff, 0x604e, 0x080c,
-	0x72bd, 0x080c, 0x6643, 0x080c, 0x6678, 0x6808, 0x602a, 0x080c,
-	0x21e7, 0x2009, 0x0170, 0x200b, 0x0080, 0xa001, 0xa001, 0x200b,
-	0x0000, 0x0036, 0x6b08, 0x080c, 0x2713, 0x003e, 0x6000, 0x9086,
-	0x0000, 0x1904, 0x41de, 0x6818, 0x691c, 0x6a20, 0x6b24, 0x8007,
-	0x810f, 0x8217, 0x831f, 0x6016, 0x611a, 0x621e, 0x6322, 0x6c04,
-	0xd4f4, 0x0148, 0x6830, 0x6934, 0x6a38, 0x6b3c, 0x8007, 0x810f,
-	0x8217, 0x831f, 0x0010, 0x9084, 0xf0ff, 0x6006, 0x610a, 0x620e,
-	0x6312, 0x8007, 0x810f, 0x8217, 0x831f, 0x20a9, 0x0004, 0x20a1,
-	0x198b, 0x20e9, 0x0001, 0x4001, 0x20a9, 0x0004, 0x20a1, 0x19a5,
-	0x20e9, 0x0001, 0x4001, 0x080c, 0x8148, 0x00c6, 0x900e, 0x20a9,
-	0x0001, 0x6b70, 0xd384, 0x0510, 0x0068, 0x2009, 0x0100, 0x210c,
-	0x918e, 0x0008, 0x1110, 0x839d, 0x0010, 0x83f5, 0x3e18, 0x12b0,
-	0x3508, 0x8109, 0x080c, 0x7889, 0x6878, 0x6016, 0x6874, 0x2008,
-	0x9084, 0xff00, 0x8007, 0x600a, 0x9184, 0x00ff, 0x6006, 0x8108,
-	0x1118, 0x6003, 0x0003, 0x0010, 0x6003, 0x0001, 0x1f04, 0x414d,
-	0x00ce, 0x00c6, 0x2061, 0x1974, 0x2063, 0x0001, 0x9006, 0x080c,
-	0x29ba, 0x9006, 0x080c, 0x299d, 0x0000, 0x00ce, 0x00e6, 0x2c70,
-	0x080c, 0x0e80, 0x00ee, 0x6888, 0xd0ec, 0x0130, 0x2011, 0x0114,
-	0x2204, 0x9085, 0x0100, 0x2012, 0x6a80, 0x9284, 0x0030, 0x9086,
-	0x0030, 0x1128, 0x9294, 0xffcf, 0x9295, 0x0020, 0x6a82, 0x2001,
-	0x1954, 0x6a80, 0x9294, 0x0030, 0x928e, 0x0000, 0x0170, 0x928e,
-	0x0010, 0x0118, 0x928e, 0x0020, 0x0140, 0x2003, 0xaaaa, 0x080c,
-	0x2788, 0x2001, 0x1945, 0x2102, 0x0008, 0x2102, 0x00c6, 0x2061,
-	0x0100, 0x602f, 0x0040, 0x602f, 0x0000, 0x00ce, 0x080c, 0x6faa,
-	0x0128, 0x080c, 0x4ca6, 0x0110, 0x080c, 0x26d9, 0x60d0, 0x9005,
-	0x01c0, 0x6003, 0x0001, 0x2009, 0x41c6, 0x00d0, 0x080c, 0x6faa,
-	0x1168, 0x2011, 0x6e2b, 0x080c, 0x803f, 0x2011, 0x6e1e, 0x080c,
-	0x8113, 0x080c, 0x7291, 0x080c, 0x6edc, 0x0040, 0x080c, 0x5ba4,
-	0x0028, 0x6003, 0x0004, 0x2009, 0x41de, 0x0010, 0x0804, 0x3344,
-	0x2001, 0x0170, 0x2004, 0x9084, 0x00ff, 0x9086, 0x004c, 0x1118,
-	0x2091, 0x30bd, 0x0817, 0x2091, 0x303d, 0x0817, 0x6000, 0x9086,
-	0x0000, 0x0904, 0x3376, 0x2069, 0x185b, 0x7890, 0x6842, 0x7894,
-	0x6846, 0x2d00, 0x2009, 0x0030, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98,
-	0x2039, 0x0001, 0x0804, 0x48e0, 0x9006, 0x080c, 0x26d9, 0x81ff,
-	0x1904, 0x3376, 0x080c, 0x6faa, 0x11b0, 0x080c, 0x728c, 0x080c,
-	0x5ce5, 0x080c, 0x3140, 0x0118, 0x6130, 0xc18d, 0x6132, 0x080c,
-	0xc23b, 0x0130, 0x080c, 0x6fcd, 0x1118, 0x080c, 0x6f82, 0x0038,
-	0x080c, 0x6edc, 0x0020, 0x080c, 0x5caa, 0x080c, 0x5ba4, 0x0804,
-	0x3344, 0x81ff, 0x1904, 0x3376, 0x080c, 0x6faa, 0x1110, 0x0804,
-	0x3376, 0x6190, 0x81ff, 0x01a8, 0x704f, 0x0000, 0x2001, 0x1c80,
-	0x2009, 0x0040, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x0126, 0x2091,
-	0x8000, 0x2039, 0x0001, 0x080c, 0x48e0, 0x701f, 0x3342, 0x012e,
-	0x0005, 0x704f, 0x0001, 0x00d6, 0x2069, 0x1c80, 0x20a9, 0x0040,
-	0x20e9, 0x0001, 0x20a1, 0x1c80, 0x2019, 0xffff, 0x4304, 0x6558,
-	0x9588, 0x3145, 0x210d, 0x918c, 0x00ff, 0x216a, 0x900e, 0x2011,
-	0x0002, 0x2100, 0x9506, 0x01a8, 0x080c, 0x6256, 0x1190, 0xb814,
-	0x821c, 0x0238, 0x9398, 0x1c80, 0x9085, 0xff00, 0x8007, 0x201a,
-	0x0038, 0x9398, 0x1c80, 0x2324, 0x94a4, 0xff00, 0x9405, 0x201a,
-	0x8210, 0x8108, 0x9182, 0x0080, 0x1208, 0x0c18, 0x8201, 0x8007,
-	0x2d0c, 0x9105, 0x206a, 0x00de, 0x20a9, 0x0040, 0x20a1, 0x1c80,
-	0x2099, 0x1c80, 0x080c, 0x5c35, 0x0804, 0x4236, 0x080c, 0x48c7,
-	0x0904, 0x3379, 0x080c, 0x4894, 0x1120, 0x2009, 0x0002, 0x0804,
-	0x3376, 0x080c, 0x539a, 0xd0b4, 0x0558, 0x7884, 0x908e, 0x007e,
-	0x0538, 0x908e, 0x007f, 0x0520, 0x908e, 0x0080, 0x0508, 0x080c,
-	0x313b, 0x1148, 0xb800, 0xd08c, 0x11d8, 0xb804, 0x9084, 0x00ff,
-	0x9086, 0x0006, 0x11a8, 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a,
-	0x080c, 0xbd04, 0x1120, 0x2009, 0x0003, 0x0804, 0x3376, 0x7007,
-	0x0003, 0x701f, 0x42c4, 0x0005, 0x080c, 0x48c7, 0x0904, 0x3379,
-	0x20a9, 0x002b, 0xb8b4, 0x20e0, 0xb8b8, 0x2098, 0xa860, 0x20e8,
-	0xa85c, 0x9080, 0x0002, 0x20a0, 0x4003, 0x20a9, 0x0008, 0x9080,
-	0x0006, 0x20a0, 0xb8b4, 0x20e0, 0xb8b8, 0x9080, 0x0006, 0x2098,
-	0x080c, 0x0f68, 0x0070, 0x20a9, 0x0004, 0xa85c, 0x9080, 0x000a,
-	0x20a0, 0xb8b4, 0x20e0, 0xb8b8, 0x9080, 0x000a, 0x2098, 0x080c,
-	0x0f68, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0,
-	0x9080, 0x0002, 0x2009, 0x002b, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98,
-	0x0804, 0x48e0, 0x81ff, 0x1904, 0x3376, 0x080c, 0x48ab, 0x0904,
-	0x3379, 0x080c, 0x63c8, 0x0904, 0x3376, 0x0058, 0xa878, 0x9005,
-	0x0120, 0x2009, 0x0004, 0x0804, 0x3376, 0xa974, 0xaa94, 0x0804,
-	0x3344, 0x080c, 0x53a2, 0x0904, 0x3344, 0x701f, 0x430e, 0x7007,
-	0x0003, 0x0005, 0x81ff, 0x1904, 0x3376, 0x7888, 0x908a, 0x1000,
-	0x1a04, 0x3379, 0x080c, 0x48c7, 0x0904, 0x3379, 0x080c, 0x657a,
-	0x0120, 0x080c, 0x6582, 0x1904, 0x3379, 0x080c, 0x644d, 0x0904,
-	0x3376, 0x2019, 0x0004, 0x900e, 0x080c, 0x63da, 0x0904, 0x3376,
-	0x7984, 0x7a88, 0x04c9, 0x08a8, 0xa89c, 0x908a, 0x1000, 0x12f8,
-	0x080c, 0x48c5, 0x01e0, 0x080c, 0x657a, 0x0118, 0x080c, 0x6582,
-	0x11b0, 0x080c, 0x644d, 0x2009, 0x0002, 0x0168, 0x2009, 0x0002,
-	0x2019, 0x0004, 0x080c, 0x63da, 0x2009, 0x0003, 0x0120, 0xa998,
-	0xaa9c, 0x00d1, 0x0060, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897,
-	0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x0005, 0xa897,
-	0x4000, 0x080c, 0x53a2, 0x0110, 0x9006, 0x0018, 0x900e, 0x9085,
-	0x0001, 0x2001, 0x0000, 0x0005, 0x9186, 0x00ff, 0x0110, 0x0071,
-	0x0060, 0x2029, 0x007e, 0x2061, 0x1800, 0x6458, 0x2400, 0x9506,
-	0x0110, 0x2508, 0x0019, 0x8529, 0x1ec8, 0x0005, 0x080c, 0x6256,
-	0x1138, 0x2200, 0x8003, 0x800b, 0x810b, 0x9108, 0x080c, 0x804d,
-	0x0005, 0x81ff, 0x1904, 0x3376, 0x798c, 0x2001, 0x1958, 0x918c,
-	0x8000, 0x2102, 0x080c, 0x48ab, 0x0904, 0x3379, 0x080c, 0x657a,
-	0x0120, 0x080c, 0x6582, 0x1904, 0x3379, 0x080c, 0x631d, 0x0904,
-	0x3376, 0x080c, 0x63d1, 0x0904, 0x3376, 0x2001, 0x1958, 0x2004,
-	0xd0fc, 0x1904, 0x3344, 0x0804, 0x4319, 0xa9a0, 0x2001, 0x1958,
-	0x918c, 0x8000, 0xc18d, 0x2102, 0x080c, 0x48b8, 0x01a0, 0x080c,
-	0x657a, 0x0118, 0x080c, 0x6582, 0x1170, 0x080c, 0x631d, 0x2009,
-	0x0002, 0x0128, 0x080c, 0x63d1, 0x1170, 0x2009, 0x0003, 0xa897,
-	0x4005, 0xa99a, 0x0010, 0xa897, 0x4006, 0x900e, 0x9085, 0x0001,
-	0x2001, 0x0030, 0x0005, 0xa897, 0x4000, 0x2001, 0x1958, 0x2004,
-	0xd0fc, 0x1128, 0x080c, 0x53a2, 0x0110, 0x9006, 0x0018, 0x900e,
-	0x9085, 0x0001, 0x2001, 0x0000, 0x0005, 0x81ff, 0x1904, 0x3376,
-	0x798c, 0x2001, 0x1957, 0x918c, 0x8000, 0x2102, 0x080c, 0x48ab,
-	0x0904, 0x3379, 0x080c, 0x657a, 0x0120, 0x080c, 0x6582, 0x1904,
-	0x3379, 0x080c, 0x631d, 0x0904, 0x3376, 0x080c, 0x63bf, 0x0904,
-	0x3376, 0x2001, 0x1957, 0x2004, 0xd0fc, 0x1904, 0x3344, 0x0804,
-	0x4319, 0xa9a0, 0x2001, 0x1957, 0x918c, 0x8000, 0xc18d, 0x2102,
-	0x080c, 0x48b8, 0x01a0, 0x080c, 0x657a, 0x0118, 0x080c, 0x6582,
-	0x1170, 0x080c, 0x631d, 0x2009, 0x0002, 0x0128, 0x080c, 0x63bf,
-	0x1170, 0x2009, 0x0003, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897,
-	0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x0005, 0xa897,
-	0x4000, 0x2001, 0x1957, 0x2004, 0xd0fc, 0x1128, 0x080c, 0x53a2,
-	0x0110, 0x9006, 0x0018, 0x900e, 0x9085, 0x0001, 0x2001, 0x0000,
-	0x0005, 0x6100, 0x0804, 0x3344, 0x080c, 0x48c7, 0x0904, 0x3379,
-	0x080c, 0x53ae, 0x1904, 0x3376, 0x79a8, 0xd184, 0x1158, 0xb834,
-	0x8007, 0x789e, 0xb830, 0x8007, 0x789a, 0xbb2c, 0x831f, 0xba28,
-	0x8217, 0x0050, 0xb824, 0x8007, 0x789e, 0xb820, 0x8007, 0x789a,
-	0xbb1c, 0x831f, 0xba18, 0x8217, 0xb900, 0x918c, 0x0200, 0x0804,
-	0x3344, 0x78a8, 0x909c, 0x0003, 0xd0ac, 0x1158, 0xd0b4, 0x1148,
-	0x939a, 0x0003, 0x1a04, 0x3376, 0x6258, 0x7884, 0x9206, 0x1904,
-	0x44c9, 0x2031, 0x1848, 0x2009, 0x013c, 0x2136, 0x2001, 0x1840,
-	0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x2039, 0x0001, 0x0006, 0x78a8,
-	0x9084, 0x0080, 0x11c8, 0x0006, 0x0036, 0x2001, 0x1a56, 0x201c,
-	0x7b9a, 0x2003, 0x0000, 0x2001, 0x1a57, 0x201c, 0x7b9e, 0x2003,
-	0x0000, 0x2001, 0x1a58, 0x201c, 0x7ba2, 0x2003, 0x0000, 0x003e,
-	0x000e, 0x000e, 0x0804, 0x48e0, 0x000e, 0x2031, 0x0000, 0x2061,
-	0x18b6, 0x2c44, 0xa66a, 0xa17a, 0xa772, 0xa076, 0xa28e, 0xa392,
-	0xa496, 0xa59a, 0x080c, 0x10d5, 0x7007, 0x0002, 0x701f, 0x44e9,
-	0x0005, 0x81ff, 0x1904, 0x3376, 0x080c, 0x48c7, 0x0904, 0x3379,
-	0x080c, 0x657a, 0x1904, 0x3376, 0x00c6, 0x080c, 0x4894, 0x00ce,
-	0x0904, 0x3376, 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, 0x7ea8,
-	0x080c, 0xbcaa, 0x0904, 0x3376, 0x7007, 0x0003, 0x701f, 0x4503,
-	0x0005, 0x080c, 0x4033, 0x0006, 0x0036, 0x2001, 0x1a56, 0x201c,
-	0x7b9a, 0x2003, 0x0000, 0x2001, 0x1a57, 0x201c, 0x7b9e, 0x2003,
-	0x0000, 0x2001, 0x1a58, 0x201c, 0x7ba2, 0x2003, 0x0000, 0x003e,
-	0x000e, 0x0804, 0x3344, 0xa830, 0x9086, 0x0100, 0x0904, 0x3376,
+	0x2004, 0xa86a, 0x2061, 0x0090, 0x2079, 0x0100, 0x2001, 0x1981,
+	0x2004, 0x6036, 0x2009, 0x0040, 0x080c, 0x230a, 0x2001, 0x002a,
+	0x2004, 0x9084, 0xfff8, 0xa86e, 0x601a, 0xa873, 0x0000, 0x601f,
+	0x0000, 0x78ca, 0x9006, 0x600a, 0x600e, 0x00ce, 0x00ee, 0x00fe,
+	0x0005, 0x00e6, 0x080c, 0x4abf, 0x2940, 0xa013, 0x0019, 0xa017,
+	0x0001, 0x2800, 0xa05a, 0x2001, 0x0030, 0x2004, 0xa866, 0x2001,
+	0x0031, 0x2004, 0xa86a, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8,
+	0xa86e, 0xa873, 0x0000, 0x2001, 0x032a, 0x2003, 0x0004, 0x2001,
+	0x0300, 0x2003, 0x0000, 0x2001, 0x020d, 0x2003, 0x0000, 0x2001,
+	0x0004, 0x200c, 0x918d, 0x0002, 0x2102, 0x00ee, 0x0005, 0x0126,
+	0x2091, 0x8000, 0x81ff, 0x0148, 0x080c, 0x2ba8, 0x1130, 0x9006,
+	0x080c, 0x2ab8, 0x9006, 0x080c, 0x2a9b, 0x7884, 0x9084, 0x0007,
+	0x0002, 0x3cec, 0x3cfb, 0x3d0a, 0x3ce9, 0x3ce9, 0x3ce9, 0x3ce9,
+	0x3ce9, 0x012e, 0x0804, 0x351d, 0x2001, 0x0100, 0x2004, 0x9086,
+	0x000a, 0x0db8, 0x2009, 0x0114, 0x2104, 0x9085, 0x0800, 0x200a,
+	0x080c, 0x3ed3, 0x00f0, 0x2001, 0x0100, 0x2004, 0x9086, 0x000a,
+	0x0d40, 0x2009, 0x0114, 0x2104, 0x9085, 0x4000, 0x200a, 0x080c,
+	0x3ed3, 0x0078, 0x080c, 0x7207, 0x1128, 0x012e, 0x2009, 0x0016,
+	0x0804, 0x351a, 0x81ff, 0x0128, 0x012e, 0x2021, 0x400b, 0x0804,
+	0x34ea, 0x0086, 0x0096, 0x00a6, 0x00b6, 0x00c6, 0x00d6, 0x00e6,
+	0x00f6, 0x080c, 0x3a1b, 0x2009, 0x0101, 0x210c, 0x0016, 0x7ec8,
+	0x7dcc, 0x9006, 0x2068, 0x2060, 0x2058, 0x080c, 0x41dc, 0x080c,
+	0x412c, 0x903e, 0x2720, 0x00f6, 0x00e6, 0x0086, 0x2940, 0x2071,
+	0x1a3d, 0x2079, 0x0090, 0x00d6, 0x2069, 0x0000, 0x6884, 0xd0b4,
+	0x0120, 0x68d4, 0x780e, 0x68d0, 0x780a, 0x00de, 0x2011, 0x0001,
+	0x080c, 0x408d, 0x080c, 0x2bb0, 0x080c, 0x2bb0, 0x080c, 0x2bb0,
+	0x080c, 0x2bb0, 0x080c, 0x408d, 0x008e, 0x00ee, 0x00fe, 0x080c,
+	0x3fba, 0x2009, 0x9c40, 0x8109, 0x11b0, 0x080c, 0x3e89, 0x2001,
+	0x0004, 0x200c, 0x918c, 0xfffd, 0x2102, 0x001e, 0x00fe, 0x00ee,
+	0x00de, 0x00ce, 0x00be, 0x00ae, 0x009e, 0x008e, 0x2009, 0x0017,
+	0x080c, 0x351a, 0x0cf8, 0x2001, 0x020b, 0x2004, 0x9084, 0x0140,
+	0x1d10, 0x00f6, 0x2079, 0x0000, 0x7884, 0x00fe, 0xd0bc, 0x0178,
+	0x2001, 0x0201, 0x200c, 0x81ff, 0x0150, 0x080c, 0x3f98, 0x2d00,
+	0x9c05, 0x9b05, 0x0120, 0x080c, 0x3e89, 0x0804, 0x3e29, 0x080c,
+	0x4101, 0x080c, 0x4025, 0x080c, 0x3f7b, 0x080c, 0x3fb0, 0x00f6,
+	0x2079, 0x0100, 0x7824, 0xd0ac, 0x0130, 0x8b58, 0x080c, 0x3e89,
+	0x00fe, 0x0804, 0x3e29, 0x00fe, 0x080c, 0x3e7f, 0x1150, 0x8d68,
+	0x2001, 0x0032, 0x2602, 0x2001, 0x0033, 0x2502, 0x080c, 0x3e89,
+	0x0080, 0x87ff, 0x0138, 0x2001, 0x0201, 0x2004, 0x9005, 0x1908,
+	0x8739, 0x0038, 0x2001, 0x1a3a, 0x2004, 0x9086, 0x0000, 0x1904,
+	0x3d79, 0x2001, 0x032f, 0x2003, 0x00f6, 0x8631, 0x1208, 0x8529,
+	0x2500, 0x9605, 0x0904, 0x3e29, 0x7884, 0xd0bc, 0x0128, 0x2d00,
+	0x9c05, 0x9b05, 0x1904, 0x3e29, 0xa013, 0x0019, 0x2001, 0x032a,
+	0x2003, 0x0004, 0x7884, 0xd0ac, 0x1148, 0x2001, 0x1a3a, 0x2003,
+	0x0003, 0x2001, 0x032a, 0x2003, 0x0009, 0x0030, 0xa017, 0x0001,
+	0x78b4, 0x9005, 0x0108, 0xa016, 0x2800, 0xa05a, 0x2009, 0x0040,
+	0x080c, 0x230a, 0x2900, 0xa85a, 0xa813, 0x0019, 0x7884, 0xd0a4,
+	0x1180, 0xa817, 0x0000, 0x00c6, 0x20a9, 0x0004, 0x2061, 0x0090,
+	0x602b, 0x0008, 0x2001, 0x0203, 0x2004, 0x1f04, 0x3e00, 0x00ce,
+	0x0030, 0xa817, 0x0001, 0x78b0, 0x9005, 0x0108, 0xa816, 0x00f6,
+	0x00c6, 0x2079, 0x0100, 0x2061, 0x0090, 0x7827, 0x0002, 0x2001,
+	0x002a, 0x2004, 0x9084, 0xfff8, 0x601a, 0x0006, 0x2001, 0x002b,
+	0x2004, 0x601e, 0x78c6, 0x000e, 0x78ca, 0x00ce, 0x00fe, 0x0804,
+	0x3d33, 0x001e, 0x00c6, 0x2001, 0x032a, 0x2003, 0x0004, 0x2061,
+	0x0100, 0x6027, 0x0002, 0x6106, 0x2011, 0x020d, 0x2013, 0x0020,
+	0x2001, 0x0004, 0x200c, 0x918c, 0xfffd, 0x2102, 0x080c, 0x12f8,
+	0x7884, 0x9084, 0x0003, 0x9086, 0x0002, 0x0508, 0x2009, 0x0028,
+	0x080c, 0x230a, 0x2001, 0x0227, 0x200c, 0x2102, 0x6050, 0x0006,
+	0x2001, 0x0100, 0x2004, 0x9086, 0x000a, 0x000e, 0x0118, 0x9084,
+	0xb7ef, 0x0020, 0x9084, 0xb7ff, 0x080c, 0x2cf5, 0x6052, 0x602f,
+	0x0000, 0x604b, 0xf7f7, 0x6043, 0x0090, 0x6043, 0x0010, 0x00ce,
+	0x2d08, 0x2c10, 0x2b18, 0x2b00, 0x9c05, 0x9d05, 0x00fe, 0x00ee,
+	0x00de, 0x00ce, 0x00be, 0x00ae, 0x009e, 0x008e, 0x1118, 0x012e,
+	0x0804, 0x34e8, 0x012e, 0x2021, 0x400c, 0x0804, 0x34ea, 0x9085,
+	0x0001, 0x1d04, 0x3e88, 0x2091, 0x6000, 0x8420, 0x9486, 0x0064,
+	0x0005, 0x2001, 0x0105, 0x2003, 0x0010, 0x2001, 0x032a, 0x2003,
+	0x0004, 0x2001, 0x1a3a, 0x2003, 0x0000, 0x0071, 0x2009, 0x0048,
+	0x080c, 0x230a, 0x2001, 0x0227, 0x2024, 0x2402, 0x2001, 0x0109,
+	0x2003, 0x4000, 0x9026, 0x0005, 0x00f6, 0x00e6, 0x2071, 0x1a3d,
+	0x7000, 0x9086, 0x0000, 0x0520, 0x2079, 0x0090, 0x2009, 0x0206,
+	0x2104, 0x2009, 0x0203, 0x210c, 0x9106, 0x1120, 0x2009, 0x0040,
+	0x080c, 0x230a, 0x782c, 0xd0fc, 0x0d88, 0x080c, 0x4101, 0x7000,
+	0x9086, 0x0000, 0x1d58, 0x782b, 0x0004, 0x782c, 0xd0ac, 0x1de8,
+	0x2009, 0x0040, 0x080c, 0x230a, 0x782b, 0x0002, 0x7003, 0x0000,
+	0x00ee, 0x00fe, 0x0005, 0x2001, 0x0100, 0x2004, 0x9086, 0x000a,
+	0x15d0, 0x00f6, 0x2079, 0x0100, 0x2001, 0x1817, 0x200c, 0x7932,
+	0x7936, 0x080c, 0x27b7, 0x080c, 0x2cc2, 0x080c, 0x2cf5, 0x784b,
+	0xf7f7, 0x7843, 0x0090, 0x7843, 0x0010, 0x7850, 0xc0e5, 0x7852,
+	0x2019, 0x61a8, 0x7820, 0xd09c, 0x0110, 0x8319, 0x1dd8, 0x7850,
+	0xc0e4, 0x7852, 0x7827, 0x0048, 0x7843, 0x0040, 0x2019, 0x01f4,
+	0xa001, 0xa001, 0x8319, 0x1de0, 0x2001, 0x0100, 0x080c, 0x2c88,
+	0x7827, 0x0020, 0x7843, 0x0000, 0x9006, 0x080c, 0x2c88, 0x7827,
+	0x0048, 0x00fe, 0x0005, 0x00f6, 0x2079, 0x0100, 0x2001, 0x1817,
+	0x200c, 0x7932, 0x7936, 0x080c, 0x27b7, 0x7850, 0x9084, 0xfbff,
+	0x9085, 0x0030, 0x7852, 0x2019, 0x01f4, 0x8319, 0x1df0, 0x9084,
+	0xffcf, 0x9085, 0x2000, 0x7852, 0x20a9, 0x0046, 0x1d04, 0x3f2e,
+	0x2091, 0x6000, 0x1f04, 0x3f2e, 0x7850, 0x9085, 0x0400, 0x9084,
+	0xdfff, 0x7852, 0x2001, 0x0021, 0x2004, 0x9084, 0x0003, 0x9086,
+	0x0001, 0x1120, 0x7850, 0x9084, 0xdfff, 0x7852, 0x784b, 0xf7f7,
+	0x7843, 0x0090, 0x7843, 0x0010, 0x20a9, 0x0028, 0xa001, 0x1f04,
+	0x3f4e, 0x7850, 0x9085, 0x1400, 0x7852, 0x2019, 0x61a8, 0x7854,
+	0xa001, 0xa001, 0xd08c, 0x1110, 0x8319, 0x1dc8, 0x7827, 0x0048,
+	0x7850, 0x9085, 0x0400, 0x7852, 0x7843, 0x0040, 0x2019, 0x01f4,
+	0xa001, 0xa001, 0x8319, 0x1de0, 0x2001, 0x0100, 0x080c, 0x2c88,
+	0x7827, 0x0020, 0x7843, 0x0000, 0x9006, 0x080c, 0x2c88, 0x7827,
+	0x0048, 0x00fe, 0x0005, 0x7884, 0xd0ac, 0x11c8, 0x00f6, 0x00e6,
+	0x2071, 0x1a3a, 0x2079, 0x0320, 0x2001, 0x0201, 0x2004, 0x9005,
+	0x0160, 0x7000, 0x9086, 0x0000, 0x1140, 0x0051, 0xd0bc, 0x0108,
+	0x8738, 0x7003, 0x0003, 0x782b, 0x0019, 0x00ee, 0x00fe, 0x0005,
+	0x00f6, 0x2079, 0x0300, 0x78bc, 0x00fe, 0x908c, 0x0070, 0x0178,
+	0x2009, 0x0032, 0x260a, 0x2009, 0x0033, 0x250a, 0xd0b4, 0x0108,
+	0x8c60, 0xd0ac, 0x0108, 0x8d68, 0xd0a4, 0x0108, 0x8b58, 0x0005,
+	0x00f6, 0x2079, 0x0200, 0x781c, 0xd084, 0x0110, 0x7837, 0x0050,
+	0x00fe, 0x0005, 0x00e6, 0x2071, 0x0100, 0x2001, 0x1982, 0x2004,
+	0x70e2, 0x080c, 0x3c51, 0x1188, 0x2001, 0x181f, 0x2004, 0x2009,
+	0x181e, 0x210c, 0x918c, 0x00ff, 0x706e, 0x716a, 0x7066, 0x918d,
+	0x3200, 0x7162, 0x7073, 0xe109, 0x0080, 0x702c, 0x9085, 0x0002,
+	0x702e, 0x2009, 0x1817, 0x210c, 0x716e, 0x7063, 0x0100, 0x7166,
+	0x719e, 0x706b, 0x0000, 0x7073, 0x0809, 0x7077, 0x0008, 0x7078,
+	0x9080, 0x0100, 0x707a, 0x7080, 0x8000, 0x7082, 0x7087, 0xaaaa,
+	0x9006, 0x708a, 0x708e, 0x707e, 0x70d6, 0x70ab, 0x0036, 0x70af,
+	0x95d5, 0x7014, 0x9084, 0x1984, 0x9085, 0x0092, 0x7016, 0x080c,
+	0x4101, 0x00f6, 0x2071, 0x1a3a, 0x2079, 0x0320, 0x00d6, 0x2069,
+	0x0000, 0x6884, 0xd0b4, 0x0120, 0x689c, 0x780e, 0x6898, 0x780a,
+	0x00de, 0x2009, 0x03e8, 0x8109, 0x1df0, 0x792c, 0xd1fc, 0x0110,
+	0x782b, 0x0004, 0x2011, 0x0011, 0x080c, 0x408d, 0x2011, 0x0001,
+	0x080c, 0x408d, 0x00fe, 0x00ee, 0x0005, 0x00f6, 0x00e6, 0x2071,
+	0x1a3a, 0x2079, 0x0320, 0x792c, 0xd1fc, 0x0904, 0x408a, 0x782b,
+	0x0002, 0x9026, 0xd19c, 0x1904, 0x4086, 0x7000, 0x0002, 0x408a,
+	0x403b, 0x406b, 0x4086, 0xd1bc, 0x1170, 0xd1dc, 0x1190, 0x8001,
+	0x7002, 0x2011, 0x0001, 0x080c, 0x408d, 0x0904, 0x408a, 0x080c,
+	0x408d, 0x0804, 0x408a, 0x00f6, 0x2079, 0x0300, 0x78bf, 0x0000,
+	0x00fe, 0x7810, 0x7914, 0x782b, 0x0004, 0x7812, 0x7916, 0x2001,
+	0x0201, 0x200c, 0x81ff, 0x0de8, 0x080c, 0x3f98, 0x2009, 0x0001,
+	0x00f6, 0x2079, 0x0300, 0x78b8, 0x00fe, 0xd0ec, 0x0110, 0x2009,
+	0x0011, 0x792a, 0x00f8, 0x8001, 0x7002, 0x9184, 0x0880, 0x1140,
+	0x782c, 0xd0fc, 0x1904, 0x402f, 0x2011, 0x0001, 0x00b1, 0x0090,
+	0xa010, 0x9092, 0x0004, 0x9086, 0x0015, 0x1120, 0xa000, 0xa05a,
+	0x2011, 0x0031, 0xa212, 0xd1dc, 0x1960, 0x0828, 0x782b, 0x0004,
+	0x7003, 0x0000, 0x00ee, 0x00fe, 0x0005, 0xa014, 0x9005, 0x0550,
+	0x8001, 0x0036, 0x0096, 0xa016, 0xa058, 0x2048, 0xa010, 0x2009,
+	0x0031, 0x911a, 0x831c, 0x831c, 0x938a, 0x0007, 0x1a0c, 0x0dfa,
+	0x9398, 0x40bb, 0x231d, 0x083f, 0x9080, 0x0004, 0x7a2a, 0x7100,
+	0x8108, 0x7102, 0x009e, 0x003e, 0x908a, 0x0035, 0x1140, 0x0096,
+	0xa058, 0x2048, 0xa804, 0xa05a, 0x2001, 0x0019, 0x009e, 0xa012,
+	0x9085, 0x0001, 0x0005, 0x40f8, 0x40ef, 0x40e6, 0x40dd, 0x40d4,
+	0x40cb, 0x40c2, 0xa964, 0x7902, 0xa968, 0x7906, 0xa96c, 0x7912,
+	0xa970, 0x7916, 0x0005, 0xa974, 0x7902, 0xa978, 0x7906, 0xa97c,
+	0x7912, 0xa980, 0x7916, 0x0005, 0xa984, 0x7902, 0xa988, 0x7906,
+	0xa98c, 0x7912, 0xa990, 0x7916, 0x0005, 0xa994, 0x7902, 0xa998,
+	0x7906, 0xa99c, 0x7912, 0xa9a0, 0x7916, 0x0005, 0xa9a4, 0x7902,
+	0xa9a8, 0x7906, 0xa9ac, 0x7912, 0xa9b0, 0x7916, 0x0005, 0xa9b4,
+	0x7902, 0xa9b8, 0x7906, 0xa9bc, 0x7912, 0xa9c0, 0x7916, 0x0005,
+	0xa9c4, 0x7902, 0xa9c8, 0x7906, 0xa9cc, 0x7912, 0xa9d0, 0x7916,
+	0x0005, 0x00f6, 0x00e6, 0x0086, 0x2071, 0x1a3d, 0x2079, 0x0090,
+	0x792c, 0xd1fc, 0x01e8, 0x782b, 0x0002, 0x2940, 0x9026, 0x7000,
+	0x0002, 0x4128, 0x4114, 0x411f, 0x8001, 0x7002, 0xd19c, 0x1180,
+	0x2011, 0x0001, 0x080c, 0x408d, 0x190c, 0x408d, 0x0048, 0x8001,
+	0x7002, 0x782c, 0xd0fc, 0x1d38, 0x2011, 0x0001, 0x080c, 0x408d,
+	0x008e, 0x00ee, 0x00fe, 0x0005, 0x00f6, 0x00e6, 0x00c6, 0x0086,
+	0x2061, 0x0200, 0x2001, 0x1982, 0x2004, 0x601a, 0x2061, 0x0100,
+	0x2001, 0x1981, 0x2004, 0x60ce, 0x6104, 0xc1ac, 0x6106, 0x2001,
+	0x002c, 0x2004, 0x9005, 0x0520, 0x2038, 0x2001, 0x002e, 0x2024,
+	0x2001, 0x002f, 0x201c, 0x080c, 0x4abf, 0xa813, 0x0019, 0xaf16,
+	0x2900, 0xa85a, 0x978a, 0x0007, 0x0220, 0x2138, 0x2009, 0x0007,
+	0x0010, 0x2708, 0x903e, 0x0096, 0xa858, 0x2048, 0xa85c, 0x9080,
+	0x0019, 0x009e, 0x080c, 0x41a4, 0x1d68, 0x2900, 0xa85a, 0x00d0,
+	0x080c, 0x4abf, 0xa813, 0x0019, 0xa817, 0x0001, 0x2900, 0xa85a,
+	0x2001, 0x002e, 0x2004, 0xa866, 0x2001, 0x002f, 0x2004, 0xa86a,
+	0x2001, 0x002a, 0x2004, 0x9084, 0xfff8, 0xa86e, 0x2001, 0x002b,
+	0x2004, 0xa872, 0x2061, 0x0090, 0x2079, 0x0100, 0x2001, 0x1981,
+	0x2004, 0x6036, 0x2009, 0x0040, 0x080c, 0x230a, 0x2001, 0x002a,
+	0x2004, 0x9084, 0xfff8, 0x601a, 0x0006, 0x2001, 0x002b, 0x2004,
+	0x601e, 0x78c6, 0x000e, 0x78ca, 0x9006, 0x600a, 0x600e, 0x008e,
+	0x00ce, 0x00ee, 0x00fe, 0x0005, 0x00e6, 0x2071, 0x0080, 0xaa60,
+	0x22e8, 0x20a0, 0x20e1, 0x0000, 0x2099, 0x0088, 0x702b, 0x0026,
+	0x7402, 0x7306, 0x9006, 0x700a, 0x700e, 0x810b, 0x810b, 0x21a8,
+	0x810b, 0x7112, 0x702b, 0x0041, 0x702c, 0xd0fc, 0x0de8, 0x702b,
+	0x0002, 0x702b, 0x0040, 0x4005, 0x7400, 0x7304, 0x87ff, 0x0190,
+	0x0086, 0x0096, 0x2940, 0x0086, 0x080c, 0x4abf, 0x008e, 0xa058,
+	0x00a6, 0x2050, 0x2900, 0xb006, 0xa05a, 0x00ae, 0x009e, 0x008e,
+	0x9085, 0x0001, 0x00ee, 0x0005, 0x00e6, 0x2001, 0x002d, 0x2004,
+	0x9005, 0x0528, 0x2038, 0x2001, 0x0030, 0x2024, 0x2001, 0x0031,
+	0x201c, 0x080c, 0x4abf, 0x2940, 0xa813, 0x0019, 0xaf16, 0x2900,
+	0xa85a, 0x978a, 0x0007, 0x0220, 0x2138, 0x2009, 0x0007, 0x0010,
+	0x2708, 0x903e, 0x0096, 0xa858, 0x2048, 0xa85c, 0x9080, 0x0019,
+	0x009e, 0x080c, 0x41a4, 0x1d68, 0x2900, 0xa85a, 0x00d8, 0x080c,
+	0x4abf, 0x2940, 0xa013, 0x0019, 0xa017, 0x0001, 0x2800, 0xa05a,
+	0x2001, 0x0030, 0x2004, 0xa066, 0x2001, 0x0031, 0x2004, 0xa06a,
+	0x2001, 0x002a, 0x2004, 0x9084, 0xfff8, 0xa06e, 0x2001, 0x002b,
+	0x2004, 0xa072, 0x2001, 0x032a, 0x2003, 0x0004, 0x7884, 0xd0ac,
+	0x1180, 0x2001, 0x0101, 0x200c, 0x918d, 0x0200, 0x2102, 0xa017,
+	0x0000, 0x2001, 0x1a3a, 0x2003, 0x0003, 0x2001, 0x032a, 0x2003,
+	0x0009, 0x2001, 0x0300, 0x2003, 0x0000, 0x2001, 0x020d, 0x2003,
+	0x0000, 0x2001, 0x0004, 0x200c, 0x918d, 0x0002, 0x2102, 0x00ee,
+	0x0005, 0x0126, 0x2091, 0x8000, 0x20a9, 0x001b, 0x20a1, 0x1840,
+	0x20e9, 0x0001, 0x9006, 0x4004, 0x2009, 0x013c, 0x200a, 0x012e,
+	0x7880, 0x9086, 0x0052, 0x0108, 0x0005, 0x0804, 0x34e8, 0x7d98,
+	0x7c9c, 0x0804, 0x35ea, 0x080c, 0x7207, 0x190c, 0x5ef0, 0x2069,
+	0x185b, 0x2d00, 0x2009, 0x0030, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98,
+	0x2039, 0x0001, 0x080c, 0x4b08, 0x701f, 0x4277, 0x0005, 0x080c,
+	0x55ea, 0x1130, 0x3b00, 0x3a08, 0xc194, 0xc095, 0x20d8, 0x21d0,
+	0x2069, 0x185b, 0x6800, 0x9005, 0x0904, 0x351d, 0x6804, 0xd094,
+	0x00c6, 0x2061, 0x0100, 0x6104, 0x0138, 0x6200, 0x9292, 0x0005,
+	0x0218, 0x918c, 0xffdf, 0x0010, 0x918d, 0x0020, 0x6106, 0x00ce,
+	0xd08c, 0x00c6, 0x2061, 0x0100, 0x6104, 0x0118, 0x918d, 0x0010,
+	0x0010, 0x918c, 0xffef, 0x6106, 0x00ce, 0xd084, 0x0158, 0x6a28,
+	0x928a, 0x007f, 0x1a04, 0x351d, 0x9288, 0x32e9, 0x210d, 0x918c,
+	0x00ff, 0x6162, 0xd0dc, 0x0130, 0x6828, 0x908a, 0x007f, 0x1a04,
+	0x351d, 0x605a, 0x6888, 0x9084, 0x0030, 0x8004, 0x8004, 0x8004,
+	0x8004, 0x0006, 0x2009, 0x1989, 0x9080, 0x28aa, 0x2005, 0x200a,
+	0x000e, 0x2009, 0x198a, 0x9080, 0x28ae, 0x2005, 0x200a, 0x6808,
+	0x908a, 0x0100, 0x0a04, 0x351d, 0x908a, 0x0841, 0x1a04, 0x351d,
+	0x9084, 0x0007, 0x1904, 0x351d, 0x680c, 0x9005, 0x0904, 0x351d,
+	0x6810, 0x9005, 0x0904, 0x351d, 0x6848, 0x6940, 0x910a, 0x1a04,
+	0x351d, 0x8001, 0x0904, 0x351d, 0x684c, 0x6944, 0x910a, 0x1a04,
+	0x351d, 0x8001, 0x0904, 0x351d, 0x2009, 0x1959, 0x200b, 0x0000,
+	0x2001, 0x187d, 0x2004, 0xd0c4, 0x0140, 0x7884, 0x200a, 0x2009,
+	0x017f, 0x200a, 0x3b00, 0xc085, 0x20d8, 0x6814, 0x908c, 0x00ff,
+	0x614a, 0x8007, 0x9084, 0x00ff, 0x604e, 0x080c, 0x7535, 0x080c,
+	0x688c, 0x080c, 0x68c1, 0x6808, 0x602a, 0x080c, 0x227c, 0x2009,
+	0x0170, 0x200b, 0x0080, 0xa001, 0xa001, 0x200b, 0x0000, 0x0036,
+	0x6b08, 0x080c, 0x2811, 0x003e, 0x6000, 0x9086, 0x0000, 0x1904,
+	0x43f8, 0x6818, 0x691c, 0x6a20, 0x6b24, 0x8007, 0x810f, 0x8217,
+	0x831f, 0x6016, 0x611a, 0x621e, 0x6322, 0x6c04, 0xd4f4, 0x0148,
+	0x6830, 0x6934, 0x6a38, 0x6b3c, 0x8007, 0x810f, 0x8217, 0x831f,
+	0x0010, 0x9084, 0xf0ff, 0x6006, 0x610a, 0x620e, 0x6312, 0x8007,
+	0x810f, 0x8217, 0x831f, 0x20a9, 0x0004, 0x20a1, 0x198b, 0x20e9,
+	0x0001, 0x4001, 0x20a9, 0x0004, 0x20a1, 0x19a5, 0x20e9, 0x0001,
+	0x4001, 0x080c, 0x83e3, 0x00c6, 0x900e, 0x20a9, 0x0001, 0x6b70,
+	0xd384, 0x01c8, 0x0020, 0x839d, 0x12b0, 0x3508, 0x8109, 0x080c,
+	0x7af8, 0x6878, 0x6016, 0x6874, 0x2008, 0x9084, 0xff00, 0x8007,
+	0x600a, 0x9184, 0x00ff, 0x6006, 0x8108, 0x1118, 0x6003, 0x0003,
+	0x0010, 0x6003, 0x0001, 0x1f04, 0x4363, 0x00ce, 0x00c6, 0x2061,
+	0x1974, 0x2063, 0x0001, 0x9006, 0x080c, 0x2ab8, 0x9006, 0x080c,
+	0x2a9b, 0x0000, 0x00ce, 0x00e6, 0x2c70, 0x080c, 0x0ec6, 0x00ee,
+	0x6888, 0xd0ec, 0x0198, 0x2001, 0x0100, 0x2004, 0x9086, 0x000a,
+	0x0138, 0x2011, 0x0114, 0x2204, 0x9085, 0x0100, 0x2012, 0x0030,
+	0x2011, 0x0114, 0x2204, 0x9085, 0x0180, 0x2012, 0x6a80, 0x9284,
+	0x0030, 0x9086, 0x0030, 0x1128, 0x9294, 0xffcf, 0x9295, 0x0020,
+	0x6a82, 0x2001, 0x1954, 0x6a80, 0x9294, 0x0030, 0x928e, 0x0000,
+	0x0170, 0x928e, 0x0010, 0x0118, 0x928e, 0x0020, 0x0140, 0x2003,
+	0xaaaa, 0x080c, 0x2886, 0x2001, 0x1945, 0x2102, 0x0008, 0x2102,
+	0x00c6, 0x2061, 0x0100, 0x602f, 0x0040, 0x602f, 0x0000, 0x00ce,
+	0x080c, 0x7207, 0x0128, 0x080c, 0x4ed2, 0x0110, 0x080c, 0x27d7,
+	0x60d0, 0x9005, 0x01c0, 0x6003, 0x0001, 0x2009, 0x43e0, 0x00d0,
+	0x080c, 0x7207, 0x1168, 0x2011, 0x7076, 0x080c, 0x82da, 0x2011,
+	0x7069, 0x080c, 0x83ae, 0x080c, 0x7509, 0x080c, 0x7127, 0x0040,
+	0x080c, 0x5dea, 0x0028, 0x6003, 0x0004, 0x2009, 0x43f8, 0x0010,
+	0x0804, 0x34e8, 0x2001, 0x0170, 0x2004, 0x9084, 0x00ff, 0x9086,
+	0x004c, 0x1118, 0x2091, 0x30bd, 0x0817, 0x2091, 0x303d, 0x0817,
+	0x6000, 0x9086, 0x0000, 0x0904, 0x351a, 0x2069, 0x185b, 0x7890,
+	0x6842, 0x7894, 0x6846, 0x2d00, 0x2009, 0x0030, 0x7a8c, 0x7b88,
+	0x7c9c, 0x7d98, 0x2039, 0x0001, 0x0804, 0x4b0b, 0x9006, 0x080c,
+	0x27d7, 0x81ff, 0x1904, 0x351a, 0x080c, 0x7207, 0x11b0, 0x080c,
+	0x7504, 0x080c, 0x5f2b, 0x080c, 0x32e4, 0x0118, 0x6130, 0xc18d,
+	0x6132, 0x080c, 0xc539, 0x0130, 0x080c, 0x722a, 0x1118, 0x080c,
+	0x71df, 0x0038, 0x080c, 0x7127, 0x0020, 0x080c, 0x5ef0, 0x080c,
+	0x5dea, 0x0804, 0x34e8, 0x81ff, 0x1904, 0x351a, 0x080c, 0x7207,
+	0x1110, 0x0804, 0x351a, 0x6190, 0x81ff, 0x01a8, 0x704f, 0x0000,
+	0x2001, 0x1c80, 0x2009, 0x0040, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98,
+	0x0126, 0x2091, 0x8000, 0x2039, 0x0001, 0x080c, 0x4b0b, 0x701f,
+	0x34e6, 0x012e, 0x0005, 0x704f, 0x0001, 0x00d6, 0x2069, 0x1c80,
+	0x20a9, 0x0040, 0x20e9, 0x0001, 0x20a1, 0x1c80, 0x2019, 0xffff,
+	0x4304, 0x6558, 0x9588, 0x32e9, 0x210d, 0x918c, 0x00ff, 0x216a,
+	0x900e, 0x2011, 0x0002, 0x2100, 0x9506, 0x01a8, 0x080c, 0x649f,
+	0x1190, 0xb814, 0x821c, 0x0238, 0x9398, 0x1c80, 0x9085, 0xff00,
+	0x8007, 0x201a, 0x0038, 0x9398, 0x1c80, 0x2324, 0x94a4, 0xff00,
+	0x9405, 0x201a, 0x8210, 0x8108, 0x9182, 0x0080, 0x1208, 0x0c18,
+	0x8201, 0x8007, 0x2d0c, 0x9105, 0x206a, 0x00de, 0x20a9, 0x0040,
+	0x20a1, 0x1c80, 0x2099, 0x1c80, 0x080c, 0x5e7b, 0x0804, 0x4450,
+	0x080c, 0x4af2, 0x0904, 0x351d, 0x080c, 0x4abf, 0x1120, 0x2009,
+	0x0002, 0x0804, 0x351a, 0x080c, 0x55db, 0xd0b4, 0x0558, 0x7884,
+	0x908e, 0x007e, 0x0538, 0x908e, 0x007f, 0x0520, 0x908e, 0x0080,
+	0x0508, 0x080c, 0x32df, 0x1148, 0xb800, 0xd08c, 0x11d8, 0xb804,
+	0x9084, 0x00ff, 0x9086, 0x0006, 0x11a8, 0xa867, 0x0000, 0xa868,
+	0xc0fd, 0xa86a, 0x080c, 0xc002, 0x1120, 0x2009, 0x0003, 0x0804,
+	0x351a, 0x7007, 0x0003, 0x701f, 0x44de, 0x0005, 0x080c, 0x4af2,
+	0x0904, 0x351d, 0x20a9, 0x002b, 0xb8b4, 0x20e0, 0xb8b8, 0x2098,
+	0xa860, 0x20e8, 0xa85c, 0x9080, 0x0002, 0x20a0, 0x4003, 0x20a9,
+	0x0008, 0x9080, 0x0006, 0x20a0, 0xb8b4, 0x20e0, 0xb8b8, 0x9080,
+	0x0006, 0x2098, 0x080c, 0x0fae, 0x0070, 0x20a9, 0x0004, 0xa85c,
+	0x9080, 0x000a, 0x20a0, 0xb8b4, 0x20e0, 0xb8b8, 0x9080, 0x000a,
+	0x2098, 0x080c, 0x0fae, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f,
+	0x9084, 0xffc0, 0x9080, 0x0002, 0x2009, 0x002b, 0x7a8c, 0x7b88,
+	0x7c9c, 0x7d98, 0x0804, 0x4b0b, 0x81ff, 0x1904, 0x351a, 0x080c,
+	0x4ad6, 0x0904, 0x351d, 0x080c, 0x6611, 0x0904, 0x351a, 0x0058,
+	0xa878, 0x9005, 0x0120, 0x2009, 0x0004, 0x0804, 0x351a, 0xa974,
+	0xaa94, 0x0804, 0x34e8, 0x080c, 0x55e3, 0x0904, 0x34e8, 0x701f,
+	0x4528, 0x7007, 0x0003, 0x0005, 0x81ff, 0x1904, 0x351a, 0x7888,
+	0x908a, 0x1000, 0x1a04, 0x351d, 0x080c, 0x4af2, 0x0904, 0x351d,
+	0x080c, 0x67c3, 0x0120, 0x080c, 0x67cb, 0x1904, 0x351d, 0x080c,
+	0x6696, 0x0904, 0x351a, 0x2019, 0x0004, 0x900e, 0x080c, 0x6623,
+	0x0904, 0x351a, 0x7984, 0x7a88, 0x04c9, 0x08a8, 0xa89c, 0x908a,
+	0x1000, 0x12f8, 0x080c, 0x4af0, 0x01e0, 0x080c, 0x67c3, 0x0118,
+	0x080c, 0x67cb, 0x11b0, 0x080c, 0x6696, 0x2009, 0x0002, 0x0168,
+	0x2009, 0x0002, 0x2019, 0x0004, 0x080c, 0x6623, 0x2009, 0x0003,
+	0x0120, 0xa998, 0xaa9c, 0x00d1, 0x0060, 0xa897, 0x4005, 0xa99a,
+	0x0010, 0xa897, 0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030,
+	0x0005, 0xa897, 0x4000, 0x080c, 0x55e3, 0x0110, 0x9006, 0x0018,
+	0x900e, 0x9085, 0x0001, 0x2001, 0x0000, 0x0005, 0x9186, 0x00ff,
+	0x0110, 0x0071, 0x0060, 0x2029, 0x007e, 0x2061, 0x1800, 0x6458,
+	0x2400, 0x9506, 0x0110, 0x2508, 0x0019, 0x8529, 0x1ec8, 0x0005,
+	0x080c, 0x649f, 0x1138, 0x2200, 0x8003, 0x800b, 0x810b, 0x9108,
+	0x080c, 0x82e8, 0x0005, 0x81ff, 0x1904, 0x351a, 0x798c, 0x2001,
+	0x1958, 0x918c, 0x8000, 0x2102, 0x080c, 0x4ad6, 0x0904, 0x351d,
+	0x080c, 0x67c3, 0x0120, 0x080c, 0x67cb, 0x1904, 0x351d, 0x080c,
+	0x6566, 0x0904, 0x351a, 0x080c, 0x661a, 0x0904, 0x351a, 0x2001,
+	0x1958, 0x2004, 0xd0fc, 0x1904, 0x34e8, 0x0804, 0x4533, 0xa9a0,
+	0x2001, 0x1958, 0x918c, 0x8000, 0xc18d, 0x2102, 0x080c, 0x4ae3,
+	0x01a0, 0x080c, 0x67c3, 0x0118, 0x080c, 0x67cb, 0x1170, 0x080c,
+	0x6566, 0x2009, 0x0002, 0x0128, 0x080c, 0x661a, 0x1170, 0x2009,
+	0x0003, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006, 0x900e,
+	0x9085, 0x0001, 0x2001, 0x0030, 0x0005, 0xa897, 0x4000, 0x2001,
+	0x1958, 0x2004, 0xd0fc, 0x1128, 0x080c, 0x55e3, 0x0110, 0x9006,
+	0x0018, 0x900e, 0x9085, 0x0001, 0x2001, 0x0000, 0x0005, 0x81ff,
+	0x1904, 0x351a, 0x798c, 0x2001, 0x1957, 0x918c, 0x8000, 0x2102,
+	0x080c, 0x4ad6, 0x0904, 0x351d, 0x080c, 0x67c3, 0x0120, 0x080c,
+	0x67cb, 0x1904, 0x351d, 0x080c, 0x6566, 0x0904, 0x351a, 0x080c,
+	0x6608, 0x0904, 0x351a, 0x2001, 0x1957, 0x2004, 0xd0fc, 0x1904,
+	0x34e8, 0x0804, 0x4533, 0xa9a0, 0x2001, 0x1957, 0x918c, 0x8000,
+	0xc18d, 0x2102, 0x080c, 0x4ae3, 0x01a0, 0x080c, 0x67c3, 0x0118,
+	0x080c, 0x67cb, 0x1170, 0x080c, 0x6566, 0x2009, 0x0002, 0x0128,
+	0x080c, 0x6608, 0x1170, 0x2009, 0x0003, 0xa897, 0x4005, 0xa99a,
+	0x0010, 0xa897, 0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030,
+	0x0005, 0xa897, 0x4000, 0x2001, 0x1957, 0x2004, 0xd0fc, 0x1128,
+	0x080c, 0x55e3, 0x0110, 0x9006, 0x0018, 0x900e, 0x9085, 0x0001,
+	0x2001, 0x0000, 0x0005, 0x6100, 0x0804, 0x34e8, 0x080c, 0x4af2,
+	0x0904, 0x351d, 0x080c, 0x55ef, 0x1904, 0x351a, 0x79a8, 0xd184,
+	0x1158, 0xb834, 0x8007, 0x789e, 0xb830, 0x8007, 0x789a, 0xbb2c,
+	0x831f, 0xba28, 0x8217, 0x0050, 0xb824, 0x8007, 0x789e, 0xb820,
+	0x8007, 0x789a, 0xbb1c, 0x831f, 0xba18, 0x8217, 0xb900, 0x918c,
+	0x0202, 0x0804, 0x34e8, 0x78a8, 0x909c, 0x0003, 0xd0ac, 0x1158,
+	0xd0b4, 0x1148, 0x939a, 0x0003, 0x1a04, 0x351a, 0x6258, 0x7884,
+	0x9206, 0x1904, 0x46eb, 0x2031, 0x1848, 0x2009, 0x013c, 0x2136,
+	0x2001, 0x1840, 0x2009, 0x000c, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98,
+	0x2039, 0x0001, 0x0006, 0x78a8, 0x9084, 0x0080, 0x11f8, 0x0006,
+	0x0036, 0x2001, 0x1a57, 0x201c, 0x7b9a, 0x2003, 0x0000, 0x2001,
+	0x1a58, 0x201c, 0x7b9e, 0x2003, 0x0000, 0x2001, 0x1a59, 0x201c,
+	0x7ba2, 0x2003, 0x0000, 0x2001, 0x1a53, 0x201c, 0x7baa, 0x2003,
+	0x0000, 0x003e, 0x000e, 0x000e, 0x0804, 0x4b0b, 0x000e, 0x2031,
+	0x0000, 0x2061, 0x18b6, 0x2c44, 0xa66a, 0xa17a, 0xa772, 0xa076,
+	0xa28e, 0xa392, 0xa496, 0xa59a, 0x080c, 0x112e, 0x7007, 0x0002,
+	0x701f, 0x470b, 0x0005, 0x81ff, 0x1904, 0x351a, 0x080c, 0x4af2,
+	0x0904, 0x351d, 0x080c, 0x67c3, 0x1904, 0x351a, 0x00c6, 0x080c,
+	0x4abf, 0x00ce, 0x0904, 0x351a, 0xa867, 0x0000, 0xa868, 0xc0fd,
+	0xa86a, 0x7ea8, 0x080c, 0xbfa8, 0x0904, 0x351a, 0x7007, 0x0003,
+	0x701f, 0x472b, 0x0005, 0x080c, 0x4249, 0x0006, 0x0036, 0x2001,
+	0x1a57, 0x201c, 0x7b9a, 0x2003, 0x0000, 0x2001, 0x1a58, 0x201c,
+	0x7b9e, 0x2003, 0x0000, 0x2001, 0x1a59, 0x201c, 0x7ba2, 0x2003,
+	0x0000, 0x2001, 0x1a53, 0x201c, 0x7baa, 0x2003, 0x0000, 0x003e,
+	0x000e, 0x0804, 0x34e8, 0xa830, 0x9086, 0x0100, 0x0904, 0x351a,
 	0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080,
 	0x001b, 0x2009, 0x000c, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x0804,
-	0x48e0, 0x9006, 0x080c, 0x26d9, 0x78a8, 0x9084, 0x00ff, 0x9086,
-	0x00ff, 0x0118, 0x81ff, 0x1904, 0x3376, 0x080c, 0x6faa, 0x0110,
-	0x080c, 0x5caa, 0x7888, 0x908a, 0x1000, 0x1a04, 0x3379, 0x7984,
-	0x9186, 0x00ff, 0x0138, 0x9182, 0x007f, 0x1a04, 0x3379, 0x2100,
-	0x080c, 0x26a3, 0x0026, 0x00c6, 0x0126, 0x2091, 0x8000, 0x2061,
+	0x4b0b, 0x9006, 0x080c, 0x27d7, 0x78a8, 0x9084, 0x00ff, 0x9086,
+	0x00ff, 0x0118, 0x81ff, 0x1904, 0x351a, 0x080c, 0x7207, 0x0110,
+	0x080c, 0x5ef0, 0x7888, 0x908a, 0x1000, 0x1a04, 0x351d, 0x7984,
+	0x9186, 0x00ff, 0x0138, 0x9182, 0x007f, 0x1a04, 0x351d, 0x2100,
+	0x080c, 0x27a1, 0x0026, 0x00c6, 0x0126, 0x2091, 0x8000, 0x2061,
 	0x19d2, 0x601b, 0x0000, 0x601f, 0x0000, 0x6073, 0x0000, 0x6077,
-	0x0000, 0x080c, 0x6faa, 0x1158, 0x080c, 0x728c, 0x080c, 0x5ce5,
-	0x9085, 0x0001, 0x080c, 0x6ff1, 0x080c, 0x6edc, 0x00d0, 0x080c,
-	0x9db5, 0x2061, 0x0100, 0x2001, 0x1817, 0x2004, 0x9084, 0x00ff,
+	0x0000, 0x080c, 0x7207, 0x1158, 0x080c, 0x7504, 0x080c, 0x5f2b,
+	0x9085, 0x0001, 0x080c, 0x724e, 0x080c, 0x7127, 0x00d0, 0x080c,
+	0xa069, 0x2061, 0x0100, 0x2001, 0x1817, 0x2004, 0x9084, 0x00ff,
 	0x810f, 0x9105, 0x604a, 0x6043, 0x0090, 0x6043, 0x0010, 0x2009,
-	0x1971, 0x200b, 0x0000, 0x2009, 0x002d, 0x2011, 0x5bd0, 0x080c,
-	0x80d1, 0x7984, 0x080c, 0x6faa, 0x1110, 0x2009, 0x00ff, 0x7a88,
-	0x080c, 0x437c, 0x012e, 0x00ce, 0x002e, 0x0804, 0x3344, 0x7984,
-	0x080c, 0x61f6, 0x2b08, 0x1904, 0x3379, 0x0804, 0x3344, 0x81ff,
-	0x0120, 0x2009, 0x0001, 0x0804, 0x3376, 0x60d8, 0xd0ac, 0x1130,
-	0xd09c, 0x1120, 0x2009, 0x0005, 0x0804, 0x3376, 0x080c, 0x4894,
-	0x1120, 0x2009, 0x0002, 0x0804, 0x3376, 0x7984, 0x9192, 0x0021,
-	0x1a04, 0x3379, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0xa85c, 0x9080,
-	0x0019, 0x702a, 0xaf60, 0x7736, 0x080c, 0x48dd, 0x701f, 0x45b7,
-	0x7880, 0x9086, 0x006e, 0x0110, 0x701f, 0x4e58, 0x0005, 0x2009,
-	0x0080, 0x080c, 0x6256, 0x1118, 0x080c, 0x657a, 0x0120, 0x2021,
-	0x400a, 0x0804, 0x3346, 0x00d6, 0x0096, 0xa964, 0xaa6c, 0xab70,
-	0xac74, 0xad78, 0xae7c, 0xa884, 0x90be, 0x0100, 0x0904, 0x4650,
-	0x90be, 0x0112, 0x0904, 0x4650, 0x90be, 0x0113, 0x0904, 0x4650,
-	0x90be, 0x0114, 0x0904, 0x4650, 0x90be, 0x0117, 0x0904, 0x4650,
-	0x90be, 0x011a, 0x0904, 0x4650, 0x90be, 0x011c, 0x0904, 0x4650,
-	0x90be, 0x0121, 0x0904, 0x4637, 0x90be, 0x0131, 0x0904, 0x4637,
-	0x90be, 0x0171, 0x0904, 0x4650, 0x90be, 0x0173, 0x0904, 0x4650,
-	0x90be, 0x01a1, 0x1128, 0xa894, 0x8007, 0xa896, 0x0804, 0x465b,
-	0x90be, 0x0212, 0x0904, 0x4644, 0x90be, 0x0213, 0x05e8, 0x90be,
+	0x1971, 0x200b, 0x0000, 0x2009, 0x002d, 0x2011, 0x5e16, 0x080c,
+	0x836c, 0x7984, 0x080c, 0x7207, 0x1110, 0x2009, 0x00ff, 0x7a88,
+	0x080c, 0x4596, 0x012e, 0x00ce, 0x002e, 0x0804, 0x34e8, 0x7984,
+	0x080c, 0x643f, 0x2b08, 0x1904, 0x351d, 0x0804, 0x34e8, 0x81ff,
+	0x0120, 0x2009, 0x0001, 0x0804, 0x351a, 0x60d8, 0xd0ac, 0x1130,
+	0xd09c, 0x1120, 0x2009, 0x0005, 0x0804, 0x351a, 0x080c, 0x4abf,
+	0x1120, 0x2009, 0x0002, 0x0804, 0x351a, 0x7984, 0x9192, 0x0021,
+	0x1a04, 0x351d, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0xa85c, 0x9080,
+	0x0019, 0x702a, 0xaf60, 0x7736, 0x080c, 0x4b08, 0x701f, 0x47df,
+	0x7880, 0x9086, 0x006e, 0x0110, 0x701f, 0x5084, 0x0005, 0x2009,
+	0x0080, 0x080c, 0x649f, 0x1118, 0x080c, 0x67c3, 0x0120, 0x2021,
+	0x400a, 0x0804, 0x34ea, 0x00d6, 0x0096, 0xa964, 0xaa6c, 0xab70,
+	0xac74, 0xad78, 0xae7c, 0xa884, 0x90be, 0x0100, 0x0904, 0x4878,
+	0x90be, 0x0112, 0x0904, 0x4878, 0x90be, 0x0113, 0x0904, 0x4878,
+	0x90be, 0x0114, 0x0904, 0x4878, 0x90be, 0x0117, 0x0904, 0x4878,
+	0x90be, 0x011a, 0x0904, 0x4878, 0x90be, 0x011c, 0x0904, 0x4878,
+	0x90be, 0x0121, 0x0904, 0x485f, 0x90be, 0x0131, 0x0904, 0x485f,
+	0x90be, 0x0171, 0x0904, 0x4878, 0x90be, 0x0173, 0x0904, 0x4878,
+	0x90be, 0x01a1, 0x1128, 0xa894, 0x8007, 0xa896, 0x0804, 0x4883,
+	0x90be, 0x0212, 0x0904, 0x486c, 0x90be, 0x0213, 0x05e8, 0x90be,
 	0x0214, 0x0500, 0x90be, 0x0217, 0x0188, 0x90be, 0x021a, 0x1120,
 	0xa89c, 0x8007, 0xa89e, 0x04e0, 0x90be, 0x021f, 0x05c8, 0x90be,
-	0x0300, 0x05b0, 0x009e, 0x00de, 0x0804, 0x3379, 0x7028, 0x9080,
+	0x0300, 0x05b0, 0x009e, 0x00de, 0x0804, 0x351d, 0x7028, 0x9080,
 	0x0010, 0x2098, 0x20a0, 0x7034, 0x20e0, 0x20e8, 0x20a9, 0x0007,
-	0x080c, 0x4699, 0x7028, 0x9080, 0x000e, 0x2098, 0x20a0, 0x7034,
-	0x20e0, 0x20e8, 0x20a9, 0x0001, 0x080c, 0x4699, 0x00c8, 0x7028,
+	0x080c, 0x48c1, 0x7028, 0x9080, 0x000e, 0x2098, 0x20a0, 0x7034,
+	0x20e0, 0x20e8, 0x20a9, 0x0001, 0x080c, 0x48c1, 0x00c8, 0x7028,
 	0x9080, 0x000c, 0x2098, 0x20a0, 0x7034, 0x20e0, 0x20e8, 0x20a9,
-	0x0001, 0x080c, 0x46a6, 0x00b8, 0x7028, 0x9080, 0x000e, 0x2098,
-	0x20a0, 0x7034, 0x20e0, 0x20e8, 0x20a9, 0x0001, 0x080c, 0x46a6,
+	0x0001, 0x080c, 0x48ce, 0x00b8, 0x7028, 0x9080, 0x000e, 0x2098,
+	0x20a0, 0x7034, 0x20e0, 0x20e8, 0x20a9, 0x0001, 0x080c, 0x48ce,
 	0x7028, 0x9080, 0x000c, 0x2098, 0x20a0, 0x7034, 0x20e0, 0x20e8,
-	0x20a9, 0x0001, 0x04f1, 0x00c6, 0x080c, 0x4894, 0x0550, 0xa868,
+	0x20a9, 0x0001, 0x04f1, 0x00c6, 0x080c, 0x4abf, 0x0550, 0xa868,
 	0xc0fd, 0xa86a, 0xa867, 0x0119, 0x9006, 0xa882, 0xa87f, 0x0020,
 	0xa88b, 0x0001, 0x810b, 0xa9ae, 0xa8b2, 0xaab6, 0xabba, 0xacbe,
 	0xadc2, 0xa9c6, 0xa8ca, 0x00ce, 0x009e, 0x00de, 0xa866, 0xa822,
-	0xa868, 0xc0fd, 0xa86a, 0xa804, 0x2048, 0x080c, 0xbcc5, 0x1120,
-	0x2009, 0x0003, 0x0804, 0x3376, 0x7007, 0x0003, 0x701f, 0x4690,
-	0x0005, 0x00ce, 0x009e, 0x00de, 0x2009, 0x0002, 0x0804, 0x3376,
-	0xa820, 0x9086, 0x8001, 0x1904, 0x3344, 0x2009, 0x0004, 0x0804,
-	0x3376, 0x0016, 0x0026, 0x3510, 0x20a9, 0x0002, 0x4002, 0x4104,
+	0xa868, 0xc0fd, 0xa86a, 0xa804, 0x2048, 0x080c, 0xbfc3, 0x1120,
+	0x2009, 0x0003, 0x0804, 0x351a, 0x7007, 0x0003, 0x701f, 0x48b8,
+	0x0005, 0x00ce, 0x009e, 0x00de, 0x2009, 0x0002, 0x0804, 0x351a,
+	0xa820, 0x9086, 0x8001, 0x1904, 0x34e8, 0x2009, 0x0004, 0x0804,
+	0x351a, 0x0016, 0x0026, 0x3510, 0x20a9, 0x0002, 0x4002, 0x4104,
 	0x4004, 0x8211, 0x1dc8, 0x002e, 0x001e, 0x0005, 0x0016, 0x0026,
 	0x0036, 0x0046, 0x3520, 0x20a9, 0x0004, 0x4002, 0x4304, 0x4204,
 	0x4104, 0x4004, 0x8421, 0x1db8, 0x004e, 0x003e, 0x002e, 0x001e,
-	0x0005, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x3376, 0x60d8,
-	0xd0ac, 0x1160, 0xd09c, 0x0120, 0x2009, 0x0016, 0x0804, 0x3376,
-	0xd09c, 0x1120, 0x2009, 0x0005, 0x0804, 0x3376, 0x7984, 0x78a8,
-	0x2040, 0x080c, 0x9dae, 0x1120, 0x9182, 0x007f, 0x0a04, 0x3379,
-	0x9186, 0x00ff, 0x0904, 0x3379, 0x9182, 0x0800, 0x1a04, 0x3379,
+	0x0005, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x351a, 0x60d8,
+	0xd0ac, 0x1160, 0xd09c, 0x0120, 0x2009, 0x0016, 0x0804, 0x351a,
+	0xd09c, 0x1120, 0x2009, 0x0005, 0x0804, 0x351a, 0x7984, 0x78a8,
+	0x2040, 0x080c, 0xa062, 0x1120, 0x9182, 0x007f, 0x0a04, 0x351d,
+	0x9186, 0x00ff, 0x0904, 0x351d, 0x9182, 0x0800, 0x1a04, 0x351d,
 	0x7a8c, 0x7b88, 0x6078, 0x9306, 0x1158, 0x607c, 0x924e, 0x0904,
-	0x3379, 0x080c, 0x9dae, 0x1120, 0x99cc, 0xff00, 0x0904, 0x3379,
-	0x0126, 0x2091, 0x8000, 0x0026, 0x2011, 0x8008, 0x080c, 0x659e,
-	0x002e, 0x0140, 0x918d, 0x8000, 0x080c, 0x65e8, 0x1118, 0x2001,
-	0x4009, 0x0458, 0x080c, 0x47ae, 0x0560, 0x90c6, 0x4000, 0x1170,
-	0x00c6, 0x0006, 0x900e, 0x080c, 0x6476, 0x1108, 0xc185, 0xb800,
-	0xd0bc, 0x0108, 0xc18d, 0x000e, 0x00ce, 0x00b8, 0x90c6, 0x4007,
-	0x1110, 0x2408, 0x0090, 0x90c6, 0x4008, 0x1118, 0x2708, 0x2610,
-	0x0060, 0x90c6, 0x4009, 0x1108, 0x0040, 0x90c6, 0x4006, 0x1108,
-	0x0020, 0x2001, 0x4005, 0x2009, 0x000a, 0x2020, 0x012e, 0x0804,
-	0x3346, 0x2b00, 0x7026, 0x0016, 0x00b6, 0x00c6, 0x00e6, 0x2c70,
-	0x080c, 0x9e7c, 0x0904, 0x477b, 0x2b00, 0x6012, 0x080c, 0xbfb5,
-	0x2e58, 0x00ee, 0x00e6, 0x00c6, 0x080c, 0x4894, 0x00ce, 0x2b70,
-	0x1158, 0x080c, 0x9e2f, 0x00ee, 0x00ce, 0x00be, 0x001e, 0x012e,
-	0x2009, 0x0002, 0x0804, 0x3376, 0x900e, 0xa966, 0xa96a, 0x2900,
-	0x6016, 0xa932, 0xa868, 0xc0fd, 0xd88c, 0x0108, 0xc0f5, 0xa86a,
-	0x080c, 0x2fe7, 0x6023, 0x0001, 0x9006, 0x080c, 0x6193, 0x2001,
-	0x0002, 0x080c, 0x61a7, 0x2009, 0x0002, 0x080c, 0x9ea9, 0x78a8,
-	0xd094, 0x0138, 0x00ee, 0x7024, 0x00e6, 0x2058, 0xb8bc, 0xc08d,
-	0xb8be, 0x9085, 0x0001, 0x00ee, 0x00ce, 0x00be, 0x001e, 0x012e,
-	0x1120, 0x2009, 0x0003, 0x0804, 0x3376, 0x7007, 0x0003, 0x701f,
-	0x478a, 0x0005, 0xa830, 0x2008, 0x918e, 0xdead, 0x1120, 0x2021,
-	0x4009, 0x0804, 0x3346, 0x9086, 0x0100, 0x7024, 0x2058, 0x1138,
-	0x2009, 0x0004, 0xba04, 0x9294, 0x00ff, 0x0804, 0x52f7, 0x900e,
-	0xa868, 0xd0f4, 0x1904, 0x3344, 0x080c, 0x6476, 0x1108, 0xc185,
-	0xb800, 0xd0bc, 0x0108, 0xc18d, 0x0804, 0x3344, 0x00e6, 0x00d6,
-	0x0096, 0x83ff, 0x0904, 0x47f6, 0x902e, 0x080c, 0x9dae, 0x0130,
-	0x9026, 0x20a9, 0x0800, 0x2071, 0x1000, 0x0030, 0x2021, 0x007f,
-	0x20a9, 0x0781, 0x2071, 0x107f, 0x2e04, 0x9005, 0x11b0, 0x2100,
-	0x9406, 0x15e8, 0x2428, 0x94ce, 0x007f, 0x1120, 0x92ce, 0xfffd,
-	0x1528, 0x0030, 0x94ce, 0x0080, 0x1130, 0x92ce, 0xfffc, 0x11f0,
-	0x93ce, 0x00ff, 0x11d8, 0xc5fd, 0x0450, 0x2058, 0xbf10, 0x2700,
-	0x9306, 0x11b8, 0xbe14, 0x2600, 0x9206, 0x1198, 0x2400, 0x9106,
-	0x1150, 0xd884, 0x0568, 0xd894, 0x1558, 0x080c, 0x657a, 0x1540,
-	0x2001, 0x4000, 0x0430, 0x2001, 0x4007, 0x0418, 0x2001, 0x4006,
-	0x0400, 0x2400, 0x9106, 0x1158, 0xbe14, 0x87ff, 0x1128, 0x86ff,
-	0x0948, 0x080c, 0x9dae, 0x1930, 0x2001, 0x4008, 0x0090, 0x8420,
-	0x8e70, 0x1f04, 0x47c4, 0x85ff, 0x1130, 0x2001, 0x4009, 0x0048,
-	0x2001, 0x0001, 0x0030, 0x080c, 0x61f6, 0x1dd0, 0xbb12, 0xba16,
-	0x9006, 0x9005, 0x009e, 0x00de, 0x00ee, 0x0005, 0x81ff, 0x0120,
-	0x2009, 0x0001, 0x0804, 0x3376, 0x080c, 0x4894, 0x1120, 0x2009,
-	0x0002, 0x0804, 0x3376, 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a,
-	0x7884, 0x9005, 0x0904, 0x3379, 0x9096, 0x00ff, 0x0120, 0x9092,
-	0x0004, 0x1a04, 0x3379, 0x2010, 0x2918, 0x080c, 0x2f8d, 0x1120,
-	0x2009, 0x0003, 0x0804, 0x3376, 0x7007, 0x0003, 0x701f, 0x4849,
-	0x0005, 0xa830, 0x9086, 0x0100, 0x1904, 0x3344, 0x2009, 0x0004,
-	0x0804, 0x3376, 0x7984, 0x080c, 0x9dae, 0x1120, 0x9182, 0x007f,
-	0x0a04, 0x3379, 0x9186, 0x00ff, 0x0904, 0x3379, 0x9182, 0x0800,
-	0x1a04, 0x3379, 0x2001, 0x9000, 0x080c, 0x5352, 0x1904, 0x3376,
-	0x0804, 0x3344, 0xa998, 0x080c, 0x9dae, 0x1118, 0x9182, 0x007f,
-	0x0280, 0x9186, 0x00ff, 0x0168, 0x9182, 0x0800, 0x1250, 0x2001,
-	0x9000, 0x080c, 0x5352, 0x11a8, 0x0060, 0xa897, 0x4005, 0xa99a,
-	0x0010, 0xa897, 0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030,
-	0x0005, 0xa897, 0x4000, 0x900e, 0x9085, 0x0001, 0x2001, 0x0000,
-	0x0005, 0x2009, 0x000a, 0x0c48, 0x080c, 0x0feb, 0x0198, 0x9006,
-	0xa802, 0x7014, 0x9005, 0x1120, 0x2900, 0x7016, 0x701a, 0x0040,
-	0x7018, 0xa802, 0x0086, 0x2040, 0x2900, 0xa006, 0x701a, 0x008e,
-	0x9085, 0x0001, 0x0005, 0x7984, 0x080c, 0x6256, 0x1130, 0x7e88,
+	0x351d, 0x080c, 0xa062, 0x1120, 0x99cc, 0xff00, 0x0904, 0x351d,
+	0x0126, 0x2091, 0x8000, 0x9386, 0xffff, 0x0178, 0x0026, 0x2011,
+	0x8008, 0x080c, 0x67e7, 0x002e, 0x0140, 0x918d, 0x8000, 0x080c,
+	0x6831, 0x1118, 0x2001, 0x4009, 0x0458, 0x080c, 0x49d9, 0x0560,
+	0x90c6, 0x4000, 0x1170, 0x00c6, 0x0006, 0x900e, 0x080c, 0x66bf,
+	0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d, 0x000e, 0x00ce,
+	0x00b8, 0x90c6, 0x4007, 0x1110, 0x2408, 0x0090, 0x90c6, 0x4008,
+	0x1118, 0x2708, 0x2610, 0x0060, 0x90c6, 0x4009, 0x1108, 0x0040,
+	0x90c6, 0x4006, 0x1108, 0x0020, 0x2001, 0x4005, 0x2009, 0x000a,
+	0x2020, 0x012e, 0x0804, 0x34ea, 0x2b00, 0x7026, 0x0016, 0x00b6,
+	0x00c6, 0x00e6, 0x2c70, 0x080c, 0xa130, 0x0904, 0x49a6, 0x2b00,
+	0x6012, 0x080c, 0xc2b3, 0x2e58, 0x00ee, 0x00e6, 0x00c6, 0x080c,
+	0x4abf, 0x00ce, 0x2b70, 0x1158, 0x080c, 0xa0e3, 0x00ee, 0x00ce,
+	0x00be, 0x001e, 0x012e, 0x2009, 0x0002, 0x0804, 0x351a, 0x900e,
+	0xa966, 0xa96a, 0x2900, 0x6016, 0xa932, 0xa868, 0xc0fd, 0xd88c,
+	0x0108, 0xc0f5, 0xa86a, 0x080c, 0x318b, 0x6023, 0x0001, 0x9006,
+	0x080c, 0x63dc, 0x2001, 0x0002, 0x080c, 0x63f0, 0x2009, 0x0002,
+	0x080c, 0xa15d, 0x78a8, 0xd094, 0x0138, 0x00ee, 0x7024, 0x00e6,
+	0x2058, 0xb8bc, 0xc08d, 0xb8be, 0x9085, 0x0001, 0x00ee, 0x00ce,
+	0x00be, 0x001e, 0x012e, 0x1120, 0x2009, 0x0003, 0x0804, 0x351a,
+	0x7007, 0x0003, 0x701f, 0x49b5, 0x0005, 0xa830, 0x2008, 0x918e,
+	0xdead, 0x1120, 0x2021, 0x4009, 0x0804, 0x34ea, 0x9086, 0x0100,
+	0x7024, 0x2058, 0x1138, 0x2009, 0x0004, 0xba04, 0x9294, 0x00ff,
+	0x0804, 0x552f, 0x900e, 0xa868, 0xd0f4, 0x1904, 0x34e8, 0x080c,
+	0x66bf, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d, 0x0804,
+	0x34e8, 0x00e6, 0x00d6, 0x0096, 0x83ff, 0x0904, 0x4a21, 0x902e,
+	0x080c, 0xa062, 0x0130, 0x9026, 0x20a9, 0x0800, 0x2071, 0x1000,
+	0x0030, 0x2021, 0x007f, 0x20a9, 0x0781, 0x2071, 0x107f, 0x2e04,
+	0x9005, 0x11b0, 0x2100, 0x9406, 0x15e8, 0x2428, 0x94ce, 0x007f,
+	0x1120, 0x92ce, 0xfffd, 0x1528, 0x0030, 0x94ce, 0x0080, 0x1130,
+	0x92ce, 0xfffc, 0x11f0, 0x93ce, 0x00ff, 0x11d8, 0xc5fd, 0x0450,
+	0x2058, 0xbf10, 0x2700, 0x9306, 0x11b8, 0xbe14, 0x2600, 0x9206,
+	0x1198, 0x2400, 0x9106, 0x1150, 0xd884, 0x0568, 0xd894, 0x1558,
+	0x080c, 0x67c3, 0x1540, 0x2001, 0x4000, 0x0430, 0x2001, 0x4007,
+	0x0418, 0x2001, 0x4006, 0x0400, 0x2400, 0x9106, 0x1158, 0xbe14,
+	0x87ff, 0x1128, 0x86ff, 0x0948, 0x080c, 0xa062, 0x1930, 0x2001,
+	0x4008, 0x0090, 0x8420, 0x8e70, 0x1f04, 0x49ef, 0x85ff, 0x1130,
+	0x2001, 0x4009, 0x0048, 0x2001, 0x0001, 0x0030, 0x080c, 0x643f,
+	0x1dd0, 0xbb12, 0xba16, 0x9006, 0x9005, 0x009e, 0x00de, 0x00ee,
+	0x0005, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x351a, 0x080c,
+	0x4abf, 0x1120, 0x2009, 0x0002, 0x0804, 0x351a, 0xa867, 0x0000,
+	0xa868, 0xc0fd, 0xa86a, 0x7884, 0x9005, 0x0904, 0x351d, 0x9096,
+	0x00ff, 0x0120, 0x9092, 0x0004, 0x1a04, 0x351d, 0x2010, 0x2918,
+	0x080c, 0x3131, 0x1120, 0x2009, 0x0003, 0x0804, 0x351a, 0x7007,
+	0x0003, 0x701f, 0x4a74, 0x0005, 0xa830, 0x9086, 0x0100, 0x1904,
+	0x34e8, 0x2009, 0x0004, 0x0804, 0x351a, 0x7984, 0x080c, 0xa062,
+	0x1120, 0x9182, 0x007f, 0x0a04, 0x351d, 0x9186, 0x00ff, 0x0904,
+	0x351d, 0x9182, 0x0800, 0x1a04, 0x351d, 0x2001, 0x9400, 0x080c,
+	0x558a, 0x1904, 0x351a, 0x0804, 0x34e8, 0xa998, 0x080c, 0xa062,
+	0x1118, 0x9182, 0x007f, 0x0280, 0x9186, 0x00ff, 0x0168, 0x9182,
+	0x0800, 0x1250, 0x2001, 0x9400, 0x080c, 0x558a, 0x11a8, 0x0060,
+	0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006, 0x900e, 0x9085,
+	0x0001, 0x2001, 0x0030, 0x0005, 0xa897, 0x4000, 0x900e, 0x9085,
+	0x0001, 0x2001, 0x0000, 0x0005, 0x2009, 0x000a, 0x0c48, 0x080c,
+	0x1031, 0x0198, 0x9006, 0xa802, 0x7014, 0x9005, 0x1120, 0x2900,
+	0x7016, 0x701a, 0x0040, 0x7018, 0xa802, 0x0086, 0x2040, 0x2900,
+	0xa006, 0x701a, 0x008e, 0x9085, 0x0001, 0x0005, 0x7984, 0x080c,
+	0x649f, 0x1130, 0x7e88, 0x9684, 0x3fff, 0x9082, 0x4000, 0x0208,
+	0x905e, 0x8bff, 0x0005, 0xa998, 0x080c, 0x649f, 0x1130, 0xae9c,
 	0x9684, 0x3fff, 0x9082, 0x4000, 0x0208, 0x905e, 0x8bff, 0x0005,
-	0xa998, 0x080c, 0x6256, 0x1130, 0xae9c, 0x9684, 0x3fff, 0x9082,
-	0x4000, 0x0208, 0x905e, 0x8bff, 0x0005, 0xae98, 0x0008, 0x7e84,
-	0x2608, 0x080c, 0x6256, 0x1108, 0x0008, 0x905e, 0x8bff, 0x0005,
-	0x0016, 0x7114, 0x81ff, 0x0128, 0x2148, 0xa904, 0x080c, 0x101d,
-	0x0cc8, 0x7116, 0x711a, 0x001e, 0x0005, 0x2031, 0x0001, 0x0010,
-	0x2031, 0x0000, 0x2061, 0x18b6, 0x2c44, 0xa66a, 0xa17a, 0xa772,
-	0xa076, 0xa28e, 0xa392, 0xa496, 0xa59a, 0x080c, 0x10d5, 0x7007,
-	0x0002, 0x701f, 0x3344, 0x0005, 0x00f6, 0x0126, 0x2091, 0x8000,
-	0x2079, 0x0000, 0x2001, 0x18ae, 0x2004, 0x9005, 0x1190, 0x0e04,
-	0x4911, 0x7a36, 0x7833, 0x0012, 0x7a82, 0x7b86, 0x7c8a, 0x2091,
-	0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x1187, 0x0804,
-	0x4977, 0x0016, 0x0086, 0x0096, 0x00c6, 0x00e6, 0x2071, 0x189c,
-	0x7044, 0x9005, 0x1540, 0x7148, 0x9182, 0x0010, 0x0288, 0x7038,
-	0x2060, 0x080c, 0x0feb, 0x0904, 0x496f, 0xa84b, 0x0000, 0x2900,
-	0x7046, 0x2001, 0x0002, 0x9080, 0x1f33, 0x2005, 0xa846, 0x0098,
-	0x7038, 0x90e0, 0x0004, 0x2001, 0x18b8, 0x9c82, 0x18f8, 0x0210,
-	0x2061, 0x18b8, 0x2c00, 0x703a, 0x7148, 0x81ff, 0x1108, 0x703e,
-	0x8108, 0x714a, 0x0460, 0x7148, 0x8108, 0x714a, 0x7044, 0x2040,
-	0xa144, 0x2105, 0x0016, 0x908a, 0x0036, 0x1a0c, 0x0db4, 0x2060,
-	0x001e, 0x8108, 0x2105, 0x9005, 0xa146, 0x1520, 0x080c, 0x0feb,
-	0x1130, 0x8109, 0xa946, 0x7148, 0x8109, 0x714a, 0x00d8, 0x9006,
-	0xa806, 0xa84a, 0xa046, 0x2800, 0xa802, 0x2900, 0xa006, 0x7046,
-	0x2001, 0x0002, 0x9080, 0x1f33, 0x2005, 0xa846, 0x0058, 0x2262,
-	0x6306, 0x640a, 0x00ee, 0x00ce, 0x009e, 0x008e, 0x001e, 0x012e,
-	0x00fe, 0x0005, 0x2c00, 0x9082, 0x001b, 0x0002, 0x4999, 0x4999,
-	0x499b, 0x4999, 0x4999, 0x4999, 0x499f, 0x4999, 0x4999, 0x4999,
-	0x49a3, 0x4999, 0x4999, 0x4999, 0x49a7, 0x4999, 0x4999, 0x4999,
-	0x49ab, 0x4999, 0x4999, 0x4999, 0x49af, 0x4999, 0x4999, 0x4999,
-	0x49b4, 0x080c, 0x0db4, 0xa276, 0xa37a, 0xa47e, 0x0898, 0xa286,
-	0xa38a, 0xa48e, 0x0878, 0xa296, 0xa39a, 0xa49e, 0x0858, 0xa2a6,
-	0xa3aa, 0xa4ae, 0x0838, 0xa2b6, 0xa3ba, 0xa4be, 0x0818, 0xa2c6,
-	0xa3ca, 0xa4ce, 0x0804, 0x4972, 0xa2d6, 0xa3da, 0xa4de, 0x0804,
-	0x4972, 0x00e6, 0x2071, 0x189c, 0x7048, 0x9005, 0x0904, 0x4a4b,
-	0x0126, 0x2091, 0x8000, 0x0e04, 0x4a4a, 0x00f6, 0x2079, 0x0000,
-	0x00c6, 0x0096, 0x0086, 0x0076, 0x9006, 0x2038, 0x7040, 0x2048,
-	0x9005, 0x0500, 0xa948, 0x2105, 0x0016, 0x908a, 0x0036, 0x1a0c,
-	0x0db4, 0x2060, 0x001e, 0x8108, 0x2105, 0x9005, 0xa94a, 0x1904,
-	0x4a4d, 0xa804, 0x9005, 0x090c, 0x0db4, 0x7042, 0x2938, 0x2040,
-	0xa003, 0x0000, 0x2001, 0x0002, 0x9080, 0x1f33, 0x2005, 0xa04a,
-	0x0804, 0x4a4d, 0x703c, 0x2060, 0x2c14, 0x6304, 0x6408, 0x650c,
-	0x2200, 0x7836, 0x7833, 0x0012, 0x7882, 0x2300, 0x7886, 0x2400,
-	0x788a, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c,
-	0x1187, 0x87ff, 0x0118, 0x2748, 0x080c, 0x101d, 0x7048, 0x8001,
-	0x704a, 0x9005, 0x1170, 0x7040, 0x2048, 0x9005, 0x0128, 0x080c,
-	0x101d, 0x9006, 0x7042, 0x7046, 0x703b, 0x18b8, 0x703f, 0x18b8,
-	0x0420, 0x7040, 0x9005, 0x1508, 0x7238, 0x2c00, 0x9206, 0x0148,
-	0x9c80, 0x0004, 0x90fa, 0x18f8, 0x0210, 0x2001, 0x18b8, 0x703e,
-	0x00a0, 0x9006, 0x703e, 0x703a, 0x7044, 0x9005, 0x090c, 0x0db4,
-	0x2048, 0xa800, 0x9005, 0x1de0, 0x2900, 0x7042, 0x2001, 0x0002,
-	0x9080, 0x1f33, 0x2005, 0xa84a, 0x0000, 0x007e, 0x008e, 0x009e,
-	0x00ce, 0x00fe, 0x012e, 0x00ee, 0x0005, 0x2c00, 0x9082, 0x001b,
-	0x0002, 0x4a6c, 0x4a6c, 0x4a6e, 0x4a6c, 0x4a6c, 0x4a6c, 0x4a73,
-	0x4a6c, 0x4a6c, 0x4a6c, 0x4a78, 0x4a6c, 0x4a6c, 0x4a6c, 0x4a7d,
-	0x4a6c, 0x4a6c, 0x4a6c, 0x4a82, 0x4a6c, 0x4a6c, 0x4a6c, 0x4a87,
-	0x4a6c, 0x4a6c, 0x4a6c, 0x4a8c, 0x080c, 0x0db4, 0xaa74, 0xab78,
-	0xac7c, 0x0804, 0x49f8, 0xaa84, 0xab88, 0xac8c, 0x0804, 0x49f8,
-	0xaa94, 0xab98, 0xac9c, 0x0804, 0x49f8, 0xaaa4, 0xaba8, 0xacac,
-	0x0804, 0x49f8, 0xaab4, 0xabb8, 0xacbc, 0x0804, 0x49f8, 0xaac4,
-	0xabc8, 0xaccc, 0x0804, 0x49f8, 0xaad4, 0xabd8, 0xacdc, 0x0804,
-	0x49f8, 0x0026, 0x080c, 0x539a, 0xd0c4, 0x0120, 0x2011, 0x8014,
-	0x080c, 0x48f4, 0x002e, 0x0005, 0x81ff, 0x1904, 0x3376, 0x0126,
-	0x2091, 0x8000, 0x6030, 0xc08d, 0xc085, 0xc0ac, 0x6032, 0x080c,
-	0x6faa, 0x1158, 0x080c, 0x728c, 0x080c, 0x5ce5, 0x9085, 0x0001,
-	0x080c, 0x6ff1, 0x080c, 0x6edc, 0x0010, 0x080c, 0x5ba4, 0x012e,
-	0x0804, 0x3344, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x3376,
-	0x080c, 0x53ae, 0x0120, 0x2009, 0x0007, 0x0804, 0x3376, 0x080c,
-	0x6572, 0x0120, 0x2009, 0x0008, 0x0804, 0x3376, 0x0026, 0x2011,
-	0x0010, 0x080c, 0x659e, 0x002e, 0x0140, 0x7984, 0x080c, 0x65e8,
-	0x1120, 0x2009, 0x4009, 0x0804, 0x3376, 0x7984, 0x080c, 0x61f6,
-	0x1904, 0x3379, 0x2b00, 0x7026, 0x080c, 0x657a, 0x7888, 0x1170,
-	0x9084, 0x0005, 0x1158, 0x900e, 0x080c, 0x6476, 0x1108, 0xc185,
-	0xb800, 0xd0bc, 0x0108, 0xc18d, 0x0804, 0x3344, 0x080c, 0x4894,
-	0x0904, 0x3376, 0x9006, 0xa866, 0xa832, 0xa868, 0xc0fd, 0xa86a,
-	0x080c, 0xbd63, 0x0904, 0x3376, 0x7888, 0xd094, 0x0118, 0xb8bc,
-	0xc08d, 0xb8be, 0x7007, 0x0003, 0x701f, 0x4b5b, 0x0005, 0x2061,
-	0x1800, 0x080c, 0x53ae, 0x2009, 0x0007, 0x1578, 0x080c, 0x6572,
-	0x0118, 0x2009, 0x0008, 0x0448, 0x080c, 0x313b, 0x0120, 0xa998,
-	0x080c, 0x61f6, 0x1530, 0x080c, 0x48c5, 0x0518, 0x080c, 0x657a,
-	0xa89c, 0x1168, 0x9084, 0x0005, 0x1150, 0x900e, 0x080c, 0x6476,
-	0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d, 0x00d0, 0xa868,
-	0xc0fc, 0xa86a, 0x080c, 0xbd63, 0x11e0, 0xa89c, 0xd094, 0x0118,
-	0xb8bc, 0xc08d, 0xb8be, 0x2009, 0x0003, 0xa897, 0x4005, 0xa99a,
-	0x0010, 0xa897, 0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030,
-	0x0005, 0xa897, 0x4000, 0xa99a, 0x9006, 0x918d, 0x0001, 0x2008,
-	0x0005, 0x9006, 0x0005, 0xa830, 0x2008, 0x918e, 0xdead, 0x1120,
-	0x2021, 0x4009, 0x0804, 0x3346, 0x9086, 0x0100, 0x7024, 0x2058,
-	0x1110, 0x0804, 0x52f7, 0x900e, 0x080c, 0x6476, 0x1108, 0xc185,
-	0xb800, 0xd0bc, 0x0108, 0xc18d, 0x0804, 0x3344, 0x080c, 0x53ae,
-	0x0120, 0x2009, 0x0007, 0x0804, 0x3376, 0x7f84, 0x7a8c, 0x7b88,
-	0x7c9c, 0x7d98, 0x080c, 0x4894, 0x1120, 0x2009, 0x0002, 0x0804,
-	0x3376, 0x900e, 0x2130, 0x7126, 0x7132, 0xa860, 0x20e8, 0x7036,
-	0xa85c, 0x9080, 0x0005, 0x702a, 0x20a0, 0x080c, 0x6256, 0x1904,
-	0x4bf9, 0x080c, 0x657a, 0x0120, 0x080c, 0x6582, 0x1904, 0x4bf9,
-	0x080c, 0x6572, 0x1130, 0x080c, 0x6476, 0x1118, 0xd79c, 0x0904,
-	0x4bf9, 0xd794, 0x1110, 0xd784, 0x01a8, 0xb8b4, 0x20e0, 0xb8b8,
-	0x9080, 0x0006, 0x2098, 0x3400, 0xd794, 0x0160, 0x20a9, 0x0008,
-	0x4003, 0x2098, 0x20a0, 0x3d00, 0x20e0, 0x20a9, 0x0002, 0x080c,
-	0x46a6, 0x0048, 0x20a9, 0x0004, 0x4003, 0x2098, 0x20a0, 0x3d00,
-	0x20e0, 0x080c, 0x46a6, 0x4104, 0xd794, 0x0528, 0xb8b4, 0x20e0,
-	0xb8b8, 0x2060, 0x9c80, 0x0000, 0x2098, 0x20a9, 0x0002, 0x4003,
-	0x9c80, 0x0003, 0x2098, 0x20a9, 0x0001, 0x4005, 0x9c80, 0x0004,
-	0x2098, 0x3400, 0x20a9, 0x0002, 0x4003, 0x2098, 0x20a0, 0x3d00,
-	0x20e0, 0x080c, 0x4699, 0x9c80, 0x0026, 0x2098, 0xb8b4, 0x20e0,
-	0x20a9, 0x0002, 0x4003, 0xd794, 0x0110, 0x96b0, 0x000b, 0x96b0,
-	0x0005, 0x8108, 0x080c, 0x9dae, 0x0118, 0x9186, 0x0800, 0x0040,
-	0xd78c, 0x0120, 0x9186, 0x0800, 0x0170, 0x0018, 0x9186, 0x007e,
-	0x0150, 0xd794, 0x0118, 0x9686, 0x0020, 0x0010, 0x9686, 0x0028,
-	0x0150, 0x0804, 0x4b95, 0x86ff, 0x1120, 0x7124, 0x810b, 0x0804,
-	0x3344, 0x7033, 0x0001, 0x7122, 0x7024, 0x9600, 0x7026, 0x772e,
-	0x2061, 0x18b6, 0x2c44, 0xa06b, 0x0000, 0xa67a, 0x7034, 0xa072,
-	0x7028, 0xa076, 0xa28e, 0xa392, 0xa496, 0xa59a, 0x080c, 0x10d5,
-	0x7007, 0x0002, 0x701f, 0x4c35, 0x0005, 0x7030, 0x9005, 0x1180,
-	0x7120, 0x7028, 0x20a0, 0x772c, 0x9036, 0x7034, 0x20e8, 0x2061,
-	0x18b6, 0x2c44, 0xa28c, 0xa390, 0xa494, 0xa598, 0x0804, 0x4b95,
-	0x7124, 0x810b, 0x0804, 0x3344, 0x2029, 0x007e, 0x7984, 0x7a88,
-	0x7b8c, 0x7c98, 0x9184, 0xff00, 0x8007, 0x90e2, 0x0020, 0x0a04,
-	0x3379, 0x9502, 0x0a04, 0x3379, 0x9184, 0x00ff, 0x90e2, 0x0020,
-	0x0a04, 0x3379, 0x9502, 0x0a04, 0x3379, 0x9284, 0xff00, 0x8007,
-	0x90e2, 0x0020, 0x0a04, 0x3379, 0x9502, 0x0a04, 0x3379, 0x9284,
-	0x00ff, 0x90e2, 0x0020, 0x0a04, 0x3379, 0x9502, 0x0a04, 0x3379,
-	0x9384, 0xff00, 0x8007, 0x90e2, 0x0020, 0x0a04, 0x3379, 0x9502,
-	0x0a04, 0x3379, 0x9384, 0x00ff, 0x90e2, 0x0020, 0x0a04, 0x3379,
-	0x9502, 0x0a04, 0x3379, 0x9484, 0xff00, 0x8007, 0x90e2, 0x0020,
-	0x0a04, 0x3379, 0x9502, 0x0a04, 0x3379, 0x9484, 0x00ff, 0x90e2,
-	0x0020, 0x0a04, 0x3379, 0x9502, 0x0a04, 0x3379, 0x2061, 0x1961,
-	0x6102, 0x6206, 0x630a, 0x640e, 0x0804, 0x3344, 0x0006, 0x080c,
-	0x539a, 0xd0cc, 0x000e, 0x0005, 0x0006, 0x080c, 0x539e, 0xd0bc,
-	0x000e, 0x0005, 0x6170, 0x7a84, 0x6300, 0x82ff, 0x1118, 0x7986,
-	0x0804, 0x3344, 0x83ff, 0x1904, 0x3379, 0x2001, 0xfff0, 0x9200,
-	0x1a04, 0x3379, 0x2019, 0xffff, 0x6074, 0x9302, 0x9200, 0x0a04,
-	0x3379, 0x7986, 0x6272, 0x0804, 0x3344, 0x080c, 0x53ae, 0x1904,
-	0x3376, 0x7c88, 0x7d84, 0x7e98, 0x7f8c, 0x080c, 0x4894, 0x0904,
-	0x3376, 0x900e, 0x901e, 0x7326, 0x7332, 0xa860, 0x20e8, 0x7036,
-	0xa85c, 0x9080, 0x0003, 0x702a, 0x20a0, 0x91d8, 0x1000, 0x2b5c,
-	0x8bff, 0x0178, 0x080c, 0x657a, 0x0118, 0x080c, 0x6582, 0x1148,
-	0x20a9, 0x0001, 0xb814, 0x4004, 0xb810, 0x4004, 0x4104, 0x9398,
-	0x0003, 0x8108, 0x9182, 0x0800, 0x0120, 0x9386, 0x003c, 0x0170,
-	0x0c20, 0x83ff, 0x1148, 0x7224, 0x900e, 0x2001, 0x0003, 0x080c,
-	0x8277, 0x2208, 0x0804, 0x3344, 0x7033, 0x0001, 0x7122, 0x7024,
-	0x9300, 0x7026, 0x2061, 0x18b6, 0x2c44, 0xa06b, 0x0000, 0xa37a,
-	0x7028, 0xa076, 0x7034, 0xa072, 0xa48e, 0xa592, 0xa696, 0xa79a,
-	0x080c, 0x10d5, 0x7007, 0x0002, 0x701f, 0x4d27, 0x0005, 0x7030,
-	0x9005, 0x1178, 0x7120, 0x7028, 0x20a0, 0x901e, 0x7034, 0x20e8,
-	0x2061, 0x18b6, 0x2c44, 0xa48c, 0xa590, 0xa694, 0xa798, 0x0804,
-	0x4ce5, 0x7224, 0x900e, 0x2001, 0x0003, 0x080c, 0x8277, 0x2208,
-	0x0804, 0x3344, 0x00f6, 0x00e6, 0x080c, 0x53ae, 0x2009, 0x0007,
-	0x1904, 0x4dba, 0x2071, 0x189c, 0x745c, 0x84ff, 0x2009, 0x000e,
-	0x1904, 0x4dba, 0xac9c, 0xad98, 0xaea4, 0xafa0, 0x0096, 0x080c,
-	0x1004, 0x2009, 0x0002, 0x0904, 0x4dba, 0x2900, 0x705e, 0x900e,
-	0x901e, 0x7356, 0x7362, 0xa860, 0x7066, 0xa85c, 0x9080, 0x0003,
-	0x705a, 0x20a0, 0x91d8, 0x1000, 0x2b5c, 0x8bff, 0x0178, 0x080c,
-	0x657a, 0x0118, 0x080c, 0x6582, 0x1148, 0xb814, 0x20a9, 0x0001,
-	0x4004, 0xb810, 0x4004, 0x4104, 0x9398, 0x0003, 0x8108, 0x9182,
-	0x0800, 0x0120, 0x9386, 0x003c, 0x01e8, 0x0c20, 0x83ff, 0x11c0,
-	0x7254, 0x900e, 0x2001, 0x0003, 0x080c, 0x8277, 0x2208, 0x009e,
-	0xa897, 0x4000, 0xa99a, 0x715c, 0x81ff, 0x090c, 0x0db4, 0x2148,
-	0x080c, 0x101d, 0x9006, 0x705e, 0x918d, 0x0001, 0x2008, 0x0418,
-	0x7063, 0x0001, 0x7152, 0x7054, 0x9300, 0x7056, 0x2061, 0x18b7,
-	0x2c44, 0xa37a, 0x7058, 0xa076, 0x7064, 0xa072, 0xa48e, 0xa592,
-	0xa696, 0xa79a, 0xa09f, 0x4dc6, 0x000e, 0xa0a2, 0x080c, 0x10d5,
-	0x9006, 0x0048, 0x009e, 0xa897, 0x4005, 0xa99a, 0x900e, 0x9085,
-	0x0001, 0x2001, 0x0030, 0x00ee, 0x00fe, 0x0005, 0x00f6, 0xa0a0,
-	0x904d, 0x090c, 0x0db4, 0x00e6, 0x2071, 0x189c, 0xa06c, 0x908e,
-	0x0100, 0x0138, 0xa87b, 0x0030, 0xa883, 0x0000, 0xa897, 0x4002,
-	0x00d8, 0x7060, 0x9005, 0x1158, 0x7150, 0x7058, 0x20a0, 0x901e,
-	0x7064, 0x20e8, 0xa48c, 0xa590, 0xa694, 0xa798, 0x0428, 0xa87b,
-	0x0000, 0xa883, 0x0000, 0xa897, 0x4000, 0x7254, 0x900e, 0x2001,
-	0x0003, 0x080c, 0x8277, 0xaa9a, 0x715c, 0x81ff, 0x090c, 0x0db4,
-	0x2148, 0x080c, 0x101d, 0x705f, 0x0000, 0xa0a0, 0x2048, 0x0126,
-	0x2091, 0x8000, 0x080c, 0x68a0, 0x012e, 0xa09f, 0x0000, 0xa0a3,
-	0x0000, 0x00ee, 0x00fe, 0x0005, 0x91d8, 0x1000, 0x2b5c, 0x8bff,
-	0x0178, 0x080c, 0x657a, 0x0118, 0x080c, 0x6582, 0x1148, 0xb814,
-	0x20a9, 0x0001, 0x4004, 0xb810, 0x4004, 0x4104, 0x9398, 0x0003,
-	0x8108, 0x9182, 0x0800, 0x0120, 0x9386, 0x003c, 0x0518, 0x0c20,
-	0x83ff, 0x11f0, 0x7154, 0x810c, 0xa99a, 0xa897, 0x4000, 0x715c,
-	0x81ff, 0x090c, 0x0db4, 0x2148, 0x080c, 0x101d, 0x9006, 0x705e,
-	0x918d, 0x0001, 0x2008, 0xa0a0, 0x2048, 0x0126, 0x2091, 0x8000,
-	0x080c, 0x68a0, 0x012e, 0xa09f, 0x0000, 0xa0a3, 0x0000, 0x0070,
-	0x7063, 0x0001, 0x7152, 0x7054, 0x9300, 0x7056, 0xa37a, 0xa48e,
-	0xa592, 0xa696, 0xa79a, 0x080c, 0x10d5, 0x9006, 0x00ee, 0x0005,
-	0x0096, 0xa88c, 0x90be, 0x7000, 0x0148, 0x90be, 0x7100, 0x0130,
-	0x90be, 0x7200, 0x0118, 0x009e, 0x0804, 0x3379, 0xa884, 0xa988,
-	0x080c, 0x2670, 0x1518, 0x080c, 0x61f6, 0x1500, 0x7126, 0xbe12,
-	0xbd16, 0xae7c, 0x080c, 0x4894, 0x01c8, 0x080c, 0x4894, 0x01b0,
-	0x009e, 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, 0xa823, 0x0000,
-	0xa804, 0x2048, 0x080c, 0xbce5, 0x1120, 0x2009, 0x0003, 0x0804,
-	0x3376, 0x7007, 0x0003, 0x701f, 0x4e93, 0x0005, 0x009e, 0x2009,
-	0x0002, 0x0804, 0x3376, 0x7124, 0x080c, 0x30e2, 0xa820, 0x9086,
-	0x8001, 0x1120, 0x2009, 0x0004, 0x0804, 0x3376, 0x2900, 0x7022,
-	0xa804, 0x0096, 0x2048, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f,
-	0x9084, 0xffc0, 0x009e, 0x9080, 0x0002, 0x0076, 0x0006, 0x2098,
-	0x20a0, 0x27e0, 0x27e8, 0x20a9, 0x002a, 0x080c, 0x0f68, 0xaa6c,
-	0xab70, 0xac74, 0xad78, 0x2061, 0x18b6, 0x2c44, 0xa06b, 0x0000,
-	0xae64, 0xaf8c, 0x97c6, 0x7000, 0x0118, 0x97c6, 0x7100, 0x1148,
-	0x96c2, 0x0004, 0x0600, 0x2009, 0x0004, 0x000e, 0x007e, 0x0804,
-	0x48e0, 0x97c6, 0x7200, 0x11b8, 0x96c2, 0x0054, 0x02a0, 0x000e,
-	0x007e, 0x2061, 0x18b6, 0x2c44, 0xa076, 0xa772, 0xa07b, 0x002a,
-	0xa28e, 0xa392, 0xa496, 0xa59a, 0x080c, 0x10d5, 0x7007, 0x0002,
-	0x701f, 0x4eef, 0x0005, 0x000e, 0x007e, 0x0804, 0x3379, 0x7020,
-	0x2048, 0xa804, 0x2048, 0xa804, 0x2048, 0x8906, 0x8006, 0x8007,
-	0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0002, 0x2098, 0x20a0,
-	0x27e0, 0x27e8, 0x20a9, 0x002a, 0x080c, 0x0f68, 0x2100, 0x2238,
-	0x2061, 0x18b6, 0x2c44, 0xa28c, 0xa390, 0xa494, 0xa598, 0x2009,
-	0x002a, 0x0804, 0x48e0, 0x81ff, 0x1904, 0x3376, 0x798c, 0x2001,
-	0x1956, 0x918c, 0x8000, 0x2102, 0x080c, 0x48ab, 0x0904, 0x3379,
-	0x080c, 0x657a, 0x0120, 0x080c, 0x6582, 0x1904, 0x3379, 0x080c,
-	0x631d, 0x0904, 0x3376, 0x0126, 0x2091, 0x8000, 0x080c, 0x63e3,
-	0x012e, 0x0904, 0x3376, 0x2001, 0x1956, 0x2004, 0xd0fc, 0x1904,
-	0x3344, 0x0804, 0x4319, 0xa9a0, 0x2001, 0x1956, 0x918c, 0x8000,
-	0xc18d, 0x2102, 0x080c, 0x48b8, 0x01a0, 0x080c, 0x657a, 0x0118,
-	0x080c, 0x6582, 0x1170, 0x080c, 0x631d, 0x2009, 0x0002, 0x0128,
-	0x080c, 0x63e3, 0x1170, 0x2009, 0x0003, 0xa897, 0x4005, 0xa99a,
-	0x0010, 0xa897, 0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030,
-	0x0005, 0xa897, 0x4000, 0x2001, 0x1956, 0x2004, 0xd0fc, 0x1128,
-	0x080c, 0x53a2, 0x0110, 0x9006, 0x0018, 0x900e, 0x9085, 0x0001,
-	0x2001, 0x0000, 0x0005, 0x78a8, 0xd08c, 0x1118, 0xd084, 0x0904,
-	0x428e, 0x080c, 0x48c7, 0x0904, 0x3379, 0x080c, 0x4894, 0x1120,
-	0x2009, 0x0002, 0x0804, 0x3376, 0x080c, 0x657a, 0x0130, 0x908e,
-	0x0004, 0x0118, 0x908e, 0x0005, 0x15a0, 0x78a8, 0xd08c, 0x0120,
-	0xb800, 0xc08c, 0xb802, 0x0028, 0x080c, 0x539a, 0xd0b4, 0x0904,
-	0x42c8, 0x7884, 0x908e, 0x007e, 0x0904, 0x42c8, 0x908e, 0x007f,
-	0x0904, 0x42c8, 0x908e, 0x0080, 0x0904, 0x42c8, 0xb800, 0xd08c,
-	0x1904, 0x42c8, 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, 0x080c,
-	0xbd04, 0x1120, 0x2009, 0x0003, 0x0804, 0x3376, 0x7007, 0x0003,
-	0x701f, 0x4fbb, 0x0005, 0x080c, 0x48c7, 0x0904, 0x3379, 0x0804,
-	0x42c8, 0x080c, 0x313b, 0x0108, 0x0005, 0x2009, 0x1833, 0x210c,
-	0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x3376, 0x080c, 0x53ae,
-	0x0120, 0x2009, 0x0007, 0x0804, 0x3376, 0x080c, 0x6572, 0x0120,
-	0x2009, 0x0008, 0x0804, 0x3376, 0xb89c, 0xd0a4, 0x1118, 0xd0ac,
-	0x1904, 0x42c8, 0x9006, 0xa866, 0xa832, 0xa868, 0xc0fd, 0xa86a,
-	0x080c, 0xbd63, 0x1120, 0x2009, 0x0003, 0x0804, 0x3376, 0x7007,
-	0x0003, 0x701f, 0x4ff4, 0x0005, 0xa830, 0x9086, 0x0100, 0x1120,
-	0x2009, 0x0004, 0x0804, 0x52f7, 0x080c, 0x48c7, 0x0904, 0x3379,
-	0x0804, 0x4f8d, 0x81ff, 0x2009, 0x0001, 0x1904, 0x3376, 0x080c,
-	0x53ae, 0x2009, 0x0007, 0x1904, 0x3376, 0x080c, 0x6572, 0x0120,
-	0x2009, 0x0008, 0x0804, 0x3376, 0x080c, 0x48c7, 0x0904, 0x3379,
-	0x080c, 0x657a, 0x2009, 0x0009, 0x1904, 0x3376, 0x080c, 0x4894,
-	0x2009, 0x0002, 0x0904, 0x3376, 0x9006, 0xa866, 0xa832, 0xa868,
-	0xc0fd, 0xa86a, 0x7988, 0x9194, 0xff00, 0x918c, 0x00ff, 0x9006,
-	0x82ff, 0x1128, 0xc0ed, 0xa952, 0x798c, 0xa956, 0x0038, 0x928e,
-	0x0100, 0x1904, 0x3379, 0xc0e5, 0xa952, 0xa956, 0xa83e, 0x080c,
-	0xbfb6, 0x2009, 0x0003, 0x0904, 0x3376, 0x7007, 0x0003, 0x701f,
-	0x504a, 0x0005, 0xa830, 0x9086, 0x0100, 0x2009, 0x0004, 0x0904,
-	0x3376, 0x0804, 0x3344, 0x7aa8, 0x9284, 0xc000, 0x0148, 0xd2ec,
-	0x01a0, 0x080c, 0x53ae, 0x1188, 0x2009, 0x0014, 0x0804, 0x3376,
-	0xd2dc, 0x1568, 0x81ff, 0x2009, 0x0001, 0x1904, 0x3376, 0x080c,
-	0x53ae, 0x2009, 0x0007, 0x1904, 0x3376, 0xd2f4, 0x0130, 0x9284,
-	0x5000, 0x080c, 0x5375, 0x0804, 0x3344, 0xd2fc, 0x0158, 0x080c,
-	0x48c7, 0x0904, 0x3379, 0x7984, 0x9284, 0x9000, 0x080c, 0x5352,
-	0x0804, 0x3344, 0x080c, 0x48c7, 0x0904, 0x3379, 0xb804, 0x9084,
-	0x00ff, 0x9086, 0x0006, 0x2009, 0x0009, 0x1904, 0x5133, 0x080c,
-	0x4894, 0x2009, 0x0002, 0x0904, 0x5133, 0xa85c, 0x9080, 0x001b,
-	0xaf60, 0x2009, 0x0008, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x080c,
-	0x48dd, 0x701f, 0x50a4, 0x0005, 0xa86c, 0x9086, 0x0500, 0x1138,
-	0xa870, 0x9005, 0x1120, 0xa874, 0x9084, 0xff00, 0x0110, 0x1904,
-	0x3379, 0xa866, 0xa832, 0xa868, 0xc0fd, 0xa86a, 0x080c, 0x48c7,
-	0x1110, 0x0804, 0x3379, 0x2009, 0x0043, 0x080c, 0xc01e, 0x2009,
-	0x0003, 0x0904, 0x5133, 0x7007, 0x0003, 0x701f, 0x50c8, 0x0005,
-	0xa830, 0x9086, 0x0100, 0x2009, 0x0004, 0x0904, 0x5133, 0x7984,
-	0x7aa8, 0x9284, 0x1000, 0x080c, 0x5352, 0x0804, 0x3344, 0x00c6,
-	0xaab0, 0x9284, 0xc000, 0x0140, 0xd2ec, 0x0168, 0x080c, 0x53ae,
-	0x1150, 0x2009, 0x0014, 0x04f0, 0x2061, 0x1800, 0x080c, 0x53ae,
-	0x2009, 0x0007, 0x15b8, 0xd2f4, 0x0128, 0x9284, 0x5000, 0x080c,
-	0x5375, 0x0050, 0xd2fc, 0x0178, 0x080c, 0x48c5, 0x0588, 0xa998,
-	0x9284, 0x9000, 0x080c, 0x5352, 0xa87b, 0x0000, 0xa883, 0x0000,
-	0xa897, 0x4000, 0x0438, 0x080c, 0x48c5, 0x0510, 0x080c, 0x657a,
-	0x2009, 0x0009, 0x11b8, 0xa8c4, 0x9086, 0x0500, 0x11c8, 0xa8c8,
-	0x9005, 0x11b0, 0xa8cc, 0x9084, 0xff00, 0x1190, 0x080c, 0x48c5,
-	0x1108, 0x0070, 0x2009, 0x004b, 0x080c, 0xc01e, 0x2009, 0x0003,
-	0x0108, 0x0078, 0x0429, 0x19c0, 0xa897, 0x4005, 0xa99a, 0x0010,
-	0xa897, 0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x00ce,
-	0x0005, 0x9006, 0x0ce0, 0x7aa8, 0xd2dc, 0x0904, 0x3376, 0x0016,
-	0x7984, 0x9284, 0x1000, 0xc0fd, 0x080c, 0x5352, 0x001e, 0x1904,
-	0x3376, 0x0804, 0x3344, 0x00f6, 0x2d78, 0x0011, 0x00fe, 0x0005,
-	0xaab0, 0xd2dc, 0x0150, 0x0016, 0xa998, 0x9284, 0x1000, 0xc0fd,
-	0x080c, 0x5352, 0x001e, 0x9085, 0x0001, 0x0005, 0x81ff, 0x0120,
-	0x2009, 0x0001, 0x0804, 0x3376, 0x080c, 0x53ae, 0x0120, 0x2009,
-	0x0007, 0x0804, 0x3376, 0x7984, 0x7ea8, 0x96b4, 0x00ff, 0x080c,
-	0x6256, 0x1904, 0x3379, 0x9186, 0x007f, 0x0138, 0x080c, 0x657a,
-	0x0120, 0x2009, 0x0009, 0x0804, 0x3376, 0x080c, 0x4894, 0x1120,
-	0x2009, 0x0002, 0x0804, 0x3376, 0xa867, 0x0000, 0xa868, 0xc0fd,
-	0xa86a, 0x2001, 0x0100, 0x8007, 0xa80a, 0x080c, 0xbd1e, 0x1120,
-	0x2009, 0x0003, 0x0804, 0x3376, 0x7007, 0x0003, 0x701f, 0x5191,
-	0x0005, 0xa808, 0x8007, 0x9086, 0x0100, 0x1120, 0x2009, 0x0004,
-	0x0804, 0x3376, 0xa8e0, 0xa866, 0xa810, 0x8007, 0x9084, 0x00ff,
-	0x800c, 0xa814, 0x8007, 0x9084, 0x00ff, 0x8004, 0x9080, 0x0002,
-	0x9108, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0,
-	0x9080, 0x0004, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x0804, 0x48e0,
-	0x080c, 0x4894, 0x1120, 0x2009, 0x0002, 0x0804, 0x3376, 0x7984,
-	0x9194, 0xff00, 0x918c, 0x00ff, 0x8217, 0x82ff, 0x1118, 0x7023,
-	0x198b, 0x0040, 0x92c6, 0x0001, 0x1118, 0x7023, 0x19a5, 0x0010,
-	0x0804, 0x3379, 0x2009, 0x001a, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98,
-	0xa85c, 0x9080, 0x0019, 0xaf60, 0x080c, 0x48dd, 0x701f, 0x51e1,
-	0x0005, 0x2001, 0x182d, 0x2003, 0x0001, 0xa85c, 0x9080, 0x0019,
-	0x2098, 0xa860, 0x20e0, 0x20a9, 0x001a, 0x7020, 0x20a0, 0x20e9,
-	0x0001, 0x4003, 0x0804, 0x3344, 0x080c, 0x4894, 0x1120, 0x2009,
-	0x0002, 0x0804, 0x3376, 0x7984, 0x9194, 0xff00, 0x918c, 0x00ff,
-	0x8217, 0x82ff, 0x1118, 0x2099, 0x198b, 0x0040, 0x92c6, 0x0001,
-	0x1118, 0x2099, 0x19a5, 0x0010, 0x0804, 0x3379, 0xa85c, 0x9080,
-	0x0019, 0x20a0, 0xa860, 0x20e8, 0x20a9, 0x001a, 0x20e1, 0x0001,
-	0x4003, 0x2009, 0x001a, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0xa85c,
-	0x9080, 0x0019, 0xaf60, 0x0804, 0x48e0, 0x7884, 0x908a, 0x1000,
-	0x1a04, 0x3379, 0x0126, 0x2091, 0x8000, 0x8003, 0x800b, 0x810b,
-	0x9108, 0x00c6, 0x2061, 0x19d2, 0x6142, 0x00ce, 0x012e, 0x0804,
-	0x3344, 0x00c6, 0x080c, 0x6faa, 0x1160, 0x080c, 0x728c, 0x080c,
-	0x5ce5, 0x9085, 0x0001, 0x080c, 0x6ff1, 0x080c, 0x6edc, 0x080c,
-	0x0db4, 0x2061, 0x1800, 0x6030, 0xc09d, 0x6032, 0x080c, 0x5ba4,
-	0x00ce, 0x0005, 0x00c6, 0x2001, 0x1800, 0x2004, 0x908e, 0x0000,
-	0x0904, 0x3376, 0x7884, 0x9005, 0x0188, 0x7888, 0x2061, 0x1974,
-	0x2c0c, 0x2062, 0x080c, 0x2a52, 0x01a0, 0x080c, 0x2a5a, 0x0188,
-	0x080c, 0x2a62, 0x0170, 0x2162, 0x0804, 0x3379, 0x2061, 0x0100,
-	0x6038, 0x9086, 0x0007, 0x1118, 0x2009, 0x0001, 0x0010, 0x2009,
-	0x0000, 0x7884, 0x9086, 0x0002, 0x1548, 0x2061, 0x0100, 0x6028,
-	0xc09c, 0x602a, 0x0026, 0x2011, 0x0003, 0x080c, 0x975b, 0x2011,
-	0x0002, 0x080c, 0x9765, 0x002e, 0x080c, 0x9673, 0x0036, 0x901e,
-	0x080c, 0x96e9, 0x003e, 0x60e3, 0x0000, 0x080c, 0xd8ee, 0x080c,
-	0xd909, 0x9085, 0x0001, 0x080c, 0x6ff1, 0x9006, 0x080c, 0x2b21,
-	0x2001, 0x1800, 0x2003, 0x0004, 0x6027, 0x0008, 0x00ce, 0x0804,
-	0x3344, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x3376, 0x080c,
-	0x53ae, 0x0120, 0x2009, 0x0007, 0x0804, 0x3376, 0x7984, 0x7ea8,
-	0x96b4, 0x00ff, 0x080c, 0x6256, 0x1904, 0x3379, 0x9186, 0x007f,
-	0x0138, 0x080c, 0x657a, 0x0120, 0x2009, 0x0009, 0x0804, 0x3376,
-	0x080c, 0x4894, 0x1120, 0x2009, 0x0002, 0x0804, 0x3376, 0xa867,
-	0x0000, 0xa868, 0xc0fd, 0xa86a, 0x080c, 0xbd21, 0x1120, 0x2009,
-	0x0003, 0x0804, 0x3376, 0x7007, 0x0003, 0x701f, 0x52e0, 0x0005,
-	0xa830, 0x9086, 0x0100, 0x1120, 0x2009, 0x0004, 0x0804, 0x3376,
+	0xae98, 0x0008, 0x7e84, 0x2608, 0x080c, 0x649f, 0x1108, 0x0008,
+	0x905e, 0x8bff, 0x0005, 0x0016, 0x7114, 0x81ff, 0x0128, 0x2148,
+	0xa904, 0x080c, 0x1063, 0x0cc8, 0x7116, 0x711a, 0x001e, 0x0005,
+	0x2031, 0x0001, 0x0010, 0x2031, 0x0000, 0x2061, 0x18b6, 0x2c44,
+	0xa66a, 0xa17a, 0xa772, 0xa076, 0xa28e, 0xa392, 0xa496, 0xa59a,
+	0x080c, 0x112e, 0x7007, 0x0002, 0x701f, 0x34e8, 0x0005, 0x00f6,
+	0x0126, 0x2091, 0x8000, 0x2079, 0x0000, 0x2001, 0x18ae, 0x2004,
+	0x9005, 0x1190, 0x0e04, 0x4b3c, 0x7a36, 0x7833, 0x0012, 0x7a82,
+	0x7b86, 0x7c8a, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084,
+	0x190c, 0x11e0, 0x0804, 0x4ba2, 0x0016, 0x0086, 0x0096, 0x00c6,
+	0x00e6, 0x2071, 0x189c, 0x7044, 0x9005, 0x1540, 0x7148, 0x9182,
+	0x0010, 0x0288, 0x7038, 0x2060, 0x080c, 0x1031, 0x0904, 0x4b9a,
+	0xa84b, 0x0000, 0x2900, 0x7046, 0x2001, 0x0002, 0x9080, 0x1fc8,
+	0x2005, 0xa846, 0x0098, 0x7038, 0x90e0, 0x0004, 0x2001, 0x18b8,
+	0x9c82, 0x18f8, 0x0210, 0x2061, 0x18b8, 0x2c00, 0x703a, 0x7148,
+	0x81ff, 0x1108, 0x703e, 0x8108, 0x714a, 0x0460, 0x7148, 0x8108,
+	0x714a, 0x7044, 0x2040, 0xa144, 0x2105, 0x0016, 0x908a, 0x0036,
+	0x1a0c, 0x0dfa, 0x2060, 0x001e, 0x8108, 0x2105, 0x9005, 0xa146,
+	0x1520, 0x080c, 0x1031, 0x1130, 0x8109, 0xa946, 0x7148, 0x8109,
+	0x714a, 0x00d8, 0x9006, 0xa806, 0xa84a, 0xa046, 0x2800, 0xa802,
+	0x2900, 0xa006, 0x7046, 0x2001, 0x0002, 0x9080, 0x1fc8, 0x2005,
+	0xa846, 0x0058, 0x2262, 0x6306, 0x640a, 0x00ee, 0x00ce, 0x009e,
+	0x008e, 0x001e, 0x012e, 0x00fe, 0x0005, 0x2c00, 0x9082, 0x001b,
+	0x0002, 0x4bc4, 0x4bc4, 0x4bc6, 0x4bc4, 0x4bc4, 0x4bc4, 0x4bca,
+	0x4bc4, 0x4bc4, 0x4bc4, 0x4bce, 0x4bc4, 0x4bc4, 0x4bc4, 0x4bd2,
+	0x4bc4, 0x4bc4, 0x4bc4, 0x4bd6, 0x4bc4, 0x4bc4, 0x4bc4, 0x4bda,
+	0x4bc4, 0x4bc4, 0x4bc4, 0x4bdf, 0x080c, 0x0dfa, 0xa276, 0xa37a,
+	0xa47e, 0x0898, 0xa286, 0xa38a, 0xa48e, 0x0878, 0xa296, 0xa39a,
+	0xa49e, 0x0858, 0xa2a6, 0xa3aa, 0xa4ae, 0x0838, 0xa2b6, 0xa3ba,
+	0xa4be, 0x0818, 0xa2c6, 0xa3ca, 0xa4ce, 0x0804, 0x4b9d, 0xa2d6,
+	0xa3da, 0xa4de, 0x0804, 0x4b9d, 0x00e6, 0x2071, 0x189c, 0x7048,
+	0x9005, 0x0904, 0x4c76, 0x0126, 0x2091, 0x8000, 0x0e04, 0x4c75,
+	0x00f6, 0x2079, 0x0000, 0x00c6, 0x0096, 0x0086, 0x0076, 0x9006,
+	0x2038, 0x7040, 0x2048, 0x9005, 0x0500, 0xa948, 0x2105, 0x0016,
+	0x908a, 0x0036, 0x1a0c, 0x0dfa, 0x2060, 0x001e, 0x8108, 0x2105,
+	0x9005, 0xa94a, 0x1904, 0x4c78, 0xa804, 0x9005, 0x090c, 0x0dfa,
+	0x7042, 0x2938, 0x2040, 0xa003, 0x0000, 0x2001, 0x0002, 0x9080,
+	0x1fc8, 0x2005, 0xa04a, 0x0804, 0x4c78, 0x703c, 0x2060, 0x2c14,
+	0x6304, 0x6408, 0x650c, 0x2200, 0x7836, 0x7833, 0x0012, 0x7882,
+	0x2300, 0x7886, 0x2400, 0x788a, 0x2091, 0x4080, 0x2001, 0x0089,
+	0x2004, 0xd084, 0x190c, 0x11e0, 0x87ff, 0x0118, 0x2748, 0x080c,
+	0x1063, 0x7048, 0x8001, 0x704a, 0x9005, 0x1170, 0x7040, 0x2048,
+	0x9005, 0x0128, 0x080c, 0x1063, 0x9006, 0x7042, 0x7046, 0x703b,
+	0x18b8, 0x703f, 0x18b8, 0x0420, 0x7040, 0x9005, 0x1508, 0x7238,
+	0x2c00, 0x9206, 0x0148, 0x9c80, 0x0004, 0x90fa, 0x18f8, 0x0210,
+	0x2001, 0x18b8, 0x703e, 0x00a0, 0x9006, 0x703e, 0x703a, 0x7044,
+	0x9005, 0x090c, 0x0dfa, 0x2048, 0xa800, 0x9005, 0x1de0, 0x2900,
+	0x7042, 0x2001, 0x0002, 0x9080, 0x1fc8, 0x2005, 0xa84a, 0x0000,
+	0x007e, 0x008e, 0x009e, 0x00ce, 0x00fe, 0x012e, 0x00ee, 0x0005,
+	0x2c00, 0x9082, 0x001b, 0x0002, 0x4c97, 0x4c97, 0x4c99, 0x4c97,
+	0x4c97, 0x4c97, 0x4c9e, 0x4c97, 0x4c97, 0x4c97, 0x4ca3, 0x4c97,
+	0x4c97, 0x4c97, 0x4ca8, 0x4c97, 0x4c97, 0x4c97, 0x4cad, 0x4c97,
+	0x4c97, 0x4c97, 0x4cb2, 0x4c97, 0x4c97, 0x4c97, 0x4cb7, 0x080c,
+	0x0dfa, 0xaa74, 0xab78, 0xac7c, 0x0804, 0x4c23, 0xaa84, 0xab88,
+	0xac8c, 0x0804, 0x4c23, 0xaa94, 0xab98, 0xac9c, 0x0804, 0x4c23,
+	0xaaa4, 0xaba8, 0xacac, 0x0804, 0x4c23, 0xaab4, 0xabb8, 0xacbc,
+	0x0804, 0x4c23, 0xaac4, 0xabc8, 0xaccc, 0x0804, 0x4c23, 0xaad4,
+	0xabd8, 0xacdc, 0x0804, 0x4c23, 0x0026, 0x080c, 0x55db, 0xd0c4,
+	0x0120, 0x2011, 0x8014, 0x080c, 0x4b1f, 0x002e, 0x0005, 0x81ff,
+	0x1904, 0x351a, 0x0126, 0x2091, 0x8000, 0x6030, 0xc08d, 0xc085,
+	0xc0ac, 0x6032, 0x080c, 0x7207, 0x1158, 0x080c, 0x7504, 0x080c,
+	0x5f2b, 0x9085, 0x0001, 0x080c, 0x724e, 0x080c, 0x7127, 0x0010,
+	0x080c, 0x5dea, 0x012e, 0x0804, 0x34e8, 0x81ff, 0x0120, 0x2009,
+	0x0001, 0x0804, 0x351a, 0x080c, 0x55ef, 0x0120, 0x2009, 0x0007,
+	0x0804, 0x351a, 0x080c, 0x67bb, 0x0120, 0x2009, 0x0008, 0x0804,
+	0x351a, 0x0026, 0x2011, 0x0010, 0x080c, 0x67e7, 0x002e, 0x0140,
+	0x7984, 0x080c, 0x6831, 0x1120, 0x2009, 0x4009, 0x0804, 0x351a,
+	0x7984, 0x080c, 0x643f, 0x1904, 0x351d, 0x080c, 0x4af2, 0x0904,
+	0x351d, 0x2b00, 0x7026, 0x080c, 0x67c3, 0x7888, 0x1170, 0x9084,
+	0x0005, 0x1158, 0x900e, 0x080c, 0x66bf, 0x1108, 0xc185, 0xb800,
+	0xd0bc, 0x0108, 0xc18d, 0x0804, 0x34e8, 0x080c, 0x4abf, 0x0904,
+	0x351a, 0x9006, 0xa866, 0xa832, 0xa868, 0xc0fd, 0xa86a, 0x080c,
+	0xc061, 0x0904, 0x351a, 0x7888, 0xd094, 0x0118, 0xb8bc, 0xc08d,
+	0xb8be, 0x7007, 0x0003, 0x701f, 0x4d87, 0x0005, 0x2061, 0x1800,
+	0x080c, 0x55ef, 0x2009, 0x0007, 0x1560, 0x080c, 0x67bb, 0x0118,
+	0x2009, 0x0008, 0x0430, 0xa998, 0x080c, 0x643f, 0x1530, 0x080c,
+	0x4af0, 0x0518, 0x080c, 0x67c3, 0xa89c, 0x1168, 0x9084, 0x0005,
+	0x1150, 0x900e, 0x080c, 0x66bf, 0x1108, 0xc185, 0xb800, 0xd0bc,
+	0x0108, 0xc18d, 0x00d0, 0xa868, 0xc0fc, 0xa86a, 0x080c, 0xc061,
+	0x11e0, 0xa89c, 0xd094, 0x0118, 0xb8bc, 0xc08d, 0xb8be, 0x2009,
+	0x0003, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006, 0x900e,
+	0x9085, 0x0001, 0x2001, 0x0030, 0x0005, 0xa897, 0x4000, 0xa99a,
+	0x9006, 0x918d, 0x0001, 0x2008, 0x0005, 0x9006, 0x0005, 0xa830,
+	0x2008, 0x918e, 0xdead, 0x1120, 0x2021, 0x4009, 0x0804, 0x34ea,
+	0x9086, 0x0100, 0x7024, 0x2058, 0x1110, 0x0804, 0x552f, 0x900e,
+	0x080c, 0x66bf, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d,
+	0x0804, 0x34e8, 0x080c, 0x55ef, 0x0120, 0x2009, 0x0007, 0x0804,
+	0x351a, 0x7f84, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x080c, 0x4abf,
+	0x1120, 0x2009, 0x0002, 0x0804, 0x351a, 0x900e, 0x2130, 0x7126,
+	0x7132, 0xa860, 0x20e8, 0x7036, 0xa85c, 0x9080, 0x0005, 0x702a,
+	0x20a0, 0x080c, 0x649f, 0x1904, 0x4e25, 0x080c, 0x67c3, 0x0120,
+	0x080c, 0x67cb, 0x1904, 0x4e25, 0x080c, 0x67bb, 0x1130, 0x080c,
+	0x66bf, 0x1118, 0xd79c, 0x0904, 0x4e25, 0xd794, 0x1110, 0xd784,
+	0x01a8, 0xb8b4, 0x20e0, 0xb8b8, 0x9080, 0x0006, 0x2098, 0x3400,
+	0xd794, 0x0160, 0x20a9, 0x0008, 0x4003, 0x2098, 0x20a0, 0x3d00,
+	0x20e0, 0x20a9, 0x0002, 0x080c, 0x48ce, 0x0048, 0x20a9, 0x0004,
+	0x4003, 0x2098, 0x20a0, 0x3d00, 0x20e0, 0x080c, 0x48ce, 0x4104,
+	0xd794, 0x0528, 0xb8b4, 0x20e0, 0xb8b8, 0x2060, 0x9c80, 0x0000,
+	0x2098, 0x20a9, 0x0002, 0x4003, 0x9c80, 0x0003, 0x2098, 0x20a9,
+	0x0001, 0x4005, 0x9c80, 0x0004, 0x2098, 0x3400, 0x20a9, 0x0002,
+	0x4003, 0x2098, 0x20a0, 0x3d00, 0x20e0, 0x080c, 0x48c1, 0x9c80,
+	0x0026, 0x2098, 0xb8b4, 0x20e0, 0x20a9, 0x0002, 0x4003, 0xd794,
+	0x0110, 0x96b0, 0x000b, 0x96b0, 0x0005, 0x8108, 0x080c, 0xa062,
+	0x0118, 0x9186, 0x0800, 0x0040, 0xd78c, 0x0120, 0x9186, 0x0800,
+	0x0170, 0x0018, 0x9186, 0x007e, 0x0150, 0xd794, 0x0118, 0x9686,
+	0x0020, 0x0010, 0x9686, 0x0028, 0x0150, 0x0804, 0x4dc1, 0x86ff,
+	0x1120, 0x7124, 0x810b, 0x0804, 0x34e8, 0x7033, 0x0001, 0x7122,
+	0x7024, 0x9600, 0x7026, 0x772e, 0x2061, 0x18b6, 0x2c44, 0xa06b,
+	0x0000, 0xa67a, 0x7034, 0xa072, 0x7028, 0xa076, 0xa28e, 0xa392,
+	0xa496, 0xa59a, 0x080c, 0x112e, 0x7007, 0x0002, 0x701f, 0x4e61,
+	0x0005, 0x7030, 0x9005, 0x1180, 0x7120, 0x7028, 0x20a0, 0x772c,
+	0x9036, 0x7034, 0x20e8, 0x2061, 0x18b6, 0x2c44, 0xa28c, 0xa390,
+	0xa494, 0xa598, 0x0804, 0x4dc1, 0x7124, 0x810b, 0x0804, 0x34e8,
+	0x2029, 0x007e, 0x7984, 0x7a88, 0x7b8c, 0x7c98, 0x9184, 0xff00,
+	0x8007, 0x90e2, 0x0020, 0x0a04, 0x351d, 0x9502, 0x0a04, 0x351d,
+	0x9184, 0x00ff, 0x90e2, 0x0020, 0x0a04, 0x351d, 0x9502, 0x0a04,
+	0x351d, 0x9284, 0xff00, 0x8007, 0x90e2, 0x0020, 0x0a04, 0x351d,
+	0x9502, 0x0a04, 0x351d, 0x9284, 0x00ff, 0x90e2, 0x0020, 0x0a04,
+	0x351d, 0x9502, 0x0a04, 0x351d, 0x9384, 0xff00, 0x8007, 0x90e2,
+	0x0020, 0x0a04, 0x351d, 0x9502, 0x0a04, 0x351d, 0x9384, 0x00ff,
+	0x90e2, 0x0020, 0x0a04, 0x351d, 0x9502, 0x0a04, 0x351d, 0x9484,
+	0xff00, 0x8007, 0x90e2, 0x0020, 0x0a04, 0x351d, 0x9502, 0x0a04,
+	0x351d, 0x9484, 0x00ff, 0x90e2, 0x0020, 0x0a04, 0x351d, 0x9502,
+	0x0a04, 0x351d, 0x2061, 0x1961, 0x6102, 0x6206, 0x630a, 0x640e,
+	0x0804, 0x34e8, 0x0006, 0x080c, 0x55db, 0xd0cc, 0x000e, 0x0005,
+	0x0006, 0x080c, 0x55df, 0xd0bc, 0x000e, 0x0005, 0x6170, 0x7a84,
+	0x6300, 0x82ff, 0x1118, 0x7986, 0x0804, 0x34e8, 0x83ff, 0x1904,
+	0x351d, 0x2001, 0xfff0, 0x9200, 0x1a04, 0x351d, 0x2019, 0xffff,
+	0x6074, 0x9302, 0x9200, 0x0a04, 0x351d, 0x7986, 0x6272, 0x0804,
+	0x34e8, 0x080c, 0x55ef, 0x1904, 0x351a, 0x7c88, 0x7d84, 0x7e98,
+	0x7f8c, 0x080c, 0x4abf, 0x0904, 0x351a, 0x900e, 0x901e, 0x7326,
+	0x7332, 0xa860, 0x20e8, 0x7036, 0xa85c, 0x9080, 0x0003, 0x702a,
+	0x20a0, 0x91d8, 0x1000, 0x2b5c, 0x8bff, 0x0178, 0x080c, 0x67c3,
+	0x0118, 0x080c, 0x67cb, 0x1148, 0x20a9, 0x0001, 0xb814, 0x4004,
+	0xb810, 0x4004, 0x4104, 0x9398, 0x0003, 0x8108, 0x9182, 0x0800,
+	0x0120, 0x9386, 0x003c, 0x0170, 0x0c20, 0x83ff, 0x1148, 0x7224,
+	0x900e, 0x2001, 0x0003, 0x080c, 0x84ff, 0x2208, 0x0804, 0x34e8,
+	0x7033, 0x0001, 0x7122, 0x7024, 0x9300, 0x7026, 0x2061, 0x18b6,
+	0x2c44, 0xa06b, 0x0000, 0xa37a, 0x7028, 0xa076, 0x7034, 0xa072,
+	0xa48e, 0xa592, 0xa696, 0xa79a, 0x080c, 0x112e, 0x7007, 0x0002,
+	0x701f, 0x4f53, 0x0005, 0x7030, 0x9005, 0x1178, 0x7120, 0x7028,
+	0x20a0, 0x901e, 0x7034, 0x20e8, 0x2061, 0x18b6, 0x2c44, 0xa48c,
+	0xa590, 0xa694, 0xa798, 0x0804, 0x4f11, 0x7224, 0x900e, 0x2001,
+	0x0003, 0x080c, 0x84ff, 0x2208, 0x0804, 0x34e8, 0x00f6, 0x00e6,
+	0x080c, 0x55ef, 0x2009, 0x0007, 0x1904, 0x4fe6, 0x2071, 0x189c,
+	0x745c, 0x84ff, 0x2009, 0x000e, 0x1904, 0x4fe6, 0xac9c, 0xad98,
+	0xaea4, 0xafa0, 0x0096, 0x080c, 0x104a, 0x2009, 0x0002, 0x0904,
+	0x4fe6, 0x2900, 0x705e, 0x900e, 0x901e, 0x7356, 0x7362, 0xa860,
+	0x7066, 0xa85c, 0x9080, 0x0003, 0x705a, 0x20a0, 0x91d8, 0x1000,
+	0x2b5c, 0x8bff, 0x0178, 0x080c, 0x67c3, 0x0118, 0x080c, 0x67cb,
+	0x1148, 0xb814, 0x20a9, 0x0001, 0x4004, 0xb810, 0x4004, 0x4104,
+	0x9398, 0x0003, 0x8108, 0x9182, 0x0800, 0x0120, 0x9386, 0x003c,
+	0x01e8, 0x0c20, 0x83ff, 0x11c0, 0x7254, 0x900e, 0x2001, 0x0003,
+	0x080c, 0x84ff, 0x2208, 0x009e, 0xa897, 0x4000, 0xa99a, 0x715c,
+	0x81ff, 0x090c, 0x0dfa, 0x2148, 0x080c, 0x1063, 0x9006, 0x705e,
+	0x918d, 0x0001, 0x2008, 0x0418, 0x7063, 0x0001, 0x7152, 0x7054,
+	0x9300, 0x7056, 0x2061, 0x18b7, 0x2c44, 0xa37a, 0x7058, 0xa076,
+	0x7064, 0xa072, 0xa48e, 0xa592, 0xa696, 0xa79a, 0xa09f, 0x4ff2,
+	0x000e, 0xa0a2, 0x080c, 0x112e, 0x9006, 0x0048, 0x009e, 0xa897,
+	0x4005, 0xa99a, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x00ee,
+	0x00fe, 0x0005, 0x00f6, 0xa0a0, 0x904d, 0x090c, 0x0dfa, 0x00e6,
+	0x2071, 0x189c, 0xa06c, 0x908e, 0x0100, 0x0138, 0xa87b, 0x0030,
+	0xa883, 0x0000, 0xa897, 0x4002, 0x00d8, 0x7060, 0x9005, 0x1158,
+	0x7150, 0x7058, 0x20a0, 0x901e, 0x7064, 0x20e8, 0xa48c, 0xa590,
+	0xa694, 0xa798, 0x0428, 0xa87b, 0x0000, 0xa883, 0x0000, 0xa897,
+	0x4000, 0x7254, 0x900e, 0x2001, 0x0003, 0x080c, 0x84ff, 0xaa9a,
+	0x715c, 0x81ff, 0x090c, 0x0dfa, 0x2148, 0x080c, 0x1063, 0x705f,
+	0x0000, 0xa0a0, 0x2048, 0x0126, 0x2091, 0x8000, 0x080c, 0x6ae9,
+	0x012e, 0xa09f, 0x0000, 0xa0a3, 0x0000, 0x00ee, 0x00fe, 0x0005,
+	0x91d8, 0x1000, 0x2b5c, 0x8bff, 0x0178, 0x080c, 0x67c3, 0x0118,
+	0x080c, 0x67cb, 0x1148, 0xb814, 0x20a9, 0x0001, 0x4004, 0xb810,
+	0x4004, 0x4104, 0x9398, 0x0003, 0x8108, 0x9182, 0x0800, 0x0120,
+	0x9386, 0x003c, 0x0518, 0x0c20, 0x83ff, 0x11f0, 0x7154, 0x810c,
+	0xa99a, 0xa897, 0x4000, 0x715c, 0x81ff, 0x090c, 0x0dfa, 0x2148,
+	0x080c, 0x1063, 0x9006, 0x705e, 0x918d, 0x0001, 0x2008, 0xa0a0,
+	0x2048, 0x0126, 0x2091, 0x8000, 0x080c, 0x6ae9, 0x012e, 0xa09f,
+	0x0000, 0xa0a3, 0x0000, 0x0070, 0x7063, 0x0001, 0x7152, 0x7054,
+	0x9300, 0x7056, 0xa37a, 0xa48e, 0xa592, 0xa696, 0xa79a, 0x080c,
+	0x112e, 0x9006, 0x00ee, 0x0005, 0x0096, 0xa88c, 0x90be, 0x7000,
+	0x0148, 0x90be, 0x7100, 0x0130, 0x90be, 0x7200, 0x0118, 0x009e,
+	0x0804, 0x351d, 0xa884, 0xa988, 0x080c, 0x276e, 0x1518, 0x080c,
+	0x643f, 0x1500, 0x7126, 0xbe12, 0xbd16, 0xae7c, 0x080c, 0x4abf,
+	0x01c8, 0x080c, 0x4abf, 0x01b0, 0x009e, 0xa867, 0x0000, 0xa868,
+	0xc0fd, 0xa86a, 0xa823, 0x0000, 0xa804, 0x2048, 0x080c, 0xbfe3,
+	0x1120, 0x2009, 0x0003, 0x0804, 0x351a, 0x7007, 0x0003, 0x701f,
+	0x50bf, 0x0005, 0x009e, 0x2009, 0x0002, 0x0804, 0x351a, 0x7124,
+	0x080c, 0x3286, 0xa820, 0x9086, 0x8001, 0x1120, 0x2009, 0x0004,
+	0x0804, 0x351a, 0x2900, 0x7022, 0xa804, 0x0096, 0x2048, 0x8906,
+	0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x009e, 0x9080,
+	0x0002, 0x0076, 0x0006, 0x2098, 0x20a0, 0x27e0, 0x27e8, 0x20a9,
+	0x002a, 0x080c, 0x0fae, 0xaa6c, 0xab70, 0xac74, 0xad78, 0x2061,
+	0x18b6, 0x2c44, 0xa06b, 0x0000, 0xae64, 0xaf8c, 0x97c6, 0x7000,
+	0x0118, 0x97c6, 0x7100, 0x1148, 0x96c2, 0x0004, 0x0600, 0x2009,
+	0x0004, 0x000e, 0x007e, 0x0804, 0x4b0b, 0x97c6, 0x7200, 0x11b8,
+	0x96c2, 0x0054, 0x02a0, 0x000e, 0x007e, 0x2061, 0x18b6, 0x2c44,
+	0xa076, 0xa772, 0xa07b, 0x002a, 0xa28e, 0xa392, 0xa496, 0xa59a,
+	0x080c, 0x112e, 0x7007, 0x0002, 0x701f, 0x511b, 0x0005, 0x000e,
+	0x007e, 0x0804, 0x351d, 0x7020, 0x2048, 0xa804, 0x2048, 0xa804,
+	0x2048, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0,
+	0x9080, 0x0002, 0x2098, 0x20a0, 0x27e0, 0x27e8, 0x20a9, 0x002a,
+	0x080c, 0x0fae, 0x2100, 0x2238, 0x2061, 0x18b6, 0x2c44, 0xa28c,
+	0xa390, 0xa494, 0xa598, 0x2009, 0x002a, 0x0804, 0x4b0b, 0x81ff,
+	0x1904, 0x351a, 0x798c, 0x2001, 0x1956, 0x918c, 0x8000, 0x2102,
+	0x080c, 0x4ad6, 0x0904, 0x351d, 0x080c, 0x67c3, 0x0120, 0x080c,
+	0x67cb, 0x1904, 0x351d, 0x080c, 0x6566, 0x0904, 0x351a, 0x0126,
+	0x2091, 0x8000, 0x080c, 0x662c, 0x012e, 0x0904, 0x351a, 0x2001,
+	0x1956, 0x2004, 0xd0fc, 0x1904, 0x34e8, 0x0804, 0x4533, 0xa9a0,
+	0x2001, 0x1956, 0x918c, 0x8000, 0xc18d, 0x2102, 0x080c, 0x4ae3,
+	0x01a0, 0x080c, 0x67c3, 0x0118, 0x080c, 0x67cb, 0x1170, 0x080c,
+	0x6566, 0x2009, 0x0002, 0x0128, 0x080c, 0x662c, 0x1170, 0x2009,
+	0x0003, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006, 0x900e,
+	0x9085, 0x0001, 0x2001, 0x0030, 0x0005, 0xa897, 0x4000, 0x2001,
+	0x1956, 0x2004, 0xd0fc, 0x1128, 0x080c, 0x55e3, 0x0110, 0x9006,
+	0x0018, 0x900e, 0x9085, 0x0001, 0x2001, 0x0000, 0x0005, 0x78a8,
+	0xd08c, 0x1118, 0xd084, 0x0904, 0x44a8, 0x080c, 0x4af2, 0x0904,
+	0x351d, 0x080c, 0x4abf, 0x1120, 0x2009, 0x0002, 0x0804, 0x351a,
+	0x080c, 0x67c3, 0x0130, 0x908e, 0x0004, 0x0118, 0x908e, 0x0005,
+	0x15a0, 0x78a8, 0xd08c, 0x0120, 0xb800, 0xc08c, 0xb802, 0x0028,
+	0x080c, 0x55db, 0xd0b4, 0x0904, 0x44e2, 0x7884, 0x908e, 0x007e,
+	0x0904, 0x44e2, 0x908e, 0x007f, 0x0904, 0x44e2, 0x908e, 0x0080,
+	0x0904, 0x44e2, 0xb800, 0xd08c, 0x1904, 0x44e2, 0xa867, 0x0000,
+	0xa868, 0xc0fd, 0xa86a, 0x080c, 0xc002, 0x1120, 0x2009, 0x0003,
+	0x0804, 0x351a, 0x7007, 0x0003, 0x701f, 0x51e7, 0x0005, 0x080c,
+	0x4af2, 0x0904, 0x351d, 0x0804, 0x44e2, 0x080c, 0x32df, 0x0108,
+	0x0005, 0x2009, 0x1833, 0x210c, 0x81ff, 0x0120, 0x2009, 0x0001,
+	0x0804, 0x351a, 0x080c, 0x55ef, 0x0120, 0x2009, 0x0007, 0x0804,
+	0x351a, 0x080c, 0x67bb, 0x0120, 0x2009, 0x0008, 0x0804, 0x351a,
+	0xb89c, 0xd0a4, 0x1118, 0xd0ac, 0x1904, 0x44e2, 0x9006, 0xa866,
+	0xa832, 0xa868, 0xc0fd, 0xa86a, 0x080c, 0xc061, 0x1120, 0x2009,
+	0x0003, 0x0804, 0x351a, 0x7007, 0x0003, 0x701f, 0x5220, 0x0005,
+	0xa830, 0x9086, 0x0100, 0x1120, 0x2009, 0x0004, 0x0804, 0x552f,
+	0x080c, 0x4af2, 0x0904, 0x351d, 0x0804, 0x51b9, 0x81ff, 0x2009,
+	0x0001, 0x1904, 0x351a, 0x080c, 0x55ef, 0x2009, 0x0007, 0x1904,
+	0x351a, 0x080c, 0x67bb, 0x0120, 0x2009, 0x0008, 0x0804, 0x351a,
+	0x080c, 0x4af2, 0x0904, 0x351d, 0x080c, 0x67c3, 0x2009, 0x0009,
+	0x1904, 0x351a, 0x080c, 0x4abf, 0x2009, 0x0002, 0x0904, 0x351a,
+	0x9006, 0xa866, 0xa832, 0xa868, 0xc0fd, 0xa86a, 0x7988, 0x9194,
+	0xff00, 0x918c, 0x00ff, 0x9006, 0x82ff, 0x1128, 0xc0ed, 0xa952,
+	0x798c, 0xa956, 0x0038, 0x928e, 0x0100, 0x1904, 0x351d, 0xc0e5,
+	0xa952, 0xa956, 0xa83e, 0x080c, 0xc2b4, 0x2009, 0x0003, 0x0904,
+	0x351a, 0x7007, 0x0003, 0x701f, 0x5276, 0x0005, 0xa830, 0x9086,
+	0x0100, 0x2009, 0x0004, 0x0904, 0x351a, 0x0804, 0x34e8, 0x7aa8,
+	0x9284, 0xc000, 0x0148, 0xd2ec, 0x01a0, 0x080c, 0x55ef, 0x1188,
+	0x2009, 0x0014, 0x0804, 0x351a, 0xd2dc, 0x1578, 0x81ff, 0x2009,
+	0x0001, 0x1904, 0x351a, 0x080c, 0x55ef, 0x2009, 0x0007, 0x1904,
+	0x351a, 0xd2f4, 0x0138, 0x9284, 0x5000, 0xc0d5, 0x080c, 0x55b5,
+	0x0804, 0x34e8, 0xd2fc, 0x0160, 0x080c, 0x4af2, 0x0904, 0x351d,
+	0x7984, 0x9284, 0x9000, 0xc0d5, 0x080c, 0x558a, 0x0804, 0x34e8,
+	0x080c, 0x4af2, 0x0904, 0x351d, 0xb804, 0x9084, 0x00ff, 0x9086,
+	0x0006, 0x2009, 0x0009, 0x1904, 0x5365, 0x080c, 0x4abf, 0x2009,
+	0x0002, 0x0904, 0x5365, 0xa85c, 0x9080, 0x001b, 0xaf60, 0x2009,
+	0x0008, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x080c, 0x4b08, 0x701f,
+	0x52d2, 0x0005, 0xa86c, 0x9086, 0x0500, 0x1138, 0xa870, 0x9005,
+	0x1120, 0xa874, 0x9084, 0xff00, 0x0110, 0x1904, 0x351d, 0xa866,
+	0xa832, 0xa868, 0xc0fd, 0xa86a, 0x080c, 0x4af2, 0x1110, 0x0804,
+	0x351d, 0x2009, 0x0043, 0x080c, 0xc31c, 0x2009, 0x0003, 0x0904,
+	0x5365, 0x7007, 0x0003, 0x701f, 0x52f6, 0x0005, 0xa830, 0x9086,
+	0x0100, 0x2009, 0x0004, 0x0904, 0x5365, 0x7984, 0x7aa8, 0x9284,
+	0x1000, 0xe085, 0x080c, 0x558a, 0x0804, 0x34e8, 0x00c6, 0xaab0,
+	0x9284, 0xc000, 0x0148, 0xd2ec, 0x0170, 0x080c, 0x55ef, 0x1158,
+	0x2009, 0x0014, 0x0804, 0x5354, 0x2061, 0x1800, 0x080c, 0x55ef,
+	0x2009, 0x0007, 0x15c8, 0xd2f4, 0x0130, 0x9284, 0x5000, 0xc0d5,
+	0x080c, 0x55b5, 0x0058, 0xd2fc, 0x0180, 0x080c, 0x4af0, 0x0590,
+	0xa998, 0x9284, 0x9000, 0xc0d5, 0x080c, 0x558a, 0xa87b, 0x0000,
+	0xa883, 0x0000, 0xa897, 0x4000, 0x0438, 0x080c, 0x4af0, 0x0510,
+	0x080c, 0x67c3, 0x2009, 0x0009, 0x11b8, 0xa8c4, 0x9086, 0x0500,
+	0x11c8, 0xa8c8, 0x9005, 0x11b0, 0xa8cc, 0x9084, 0xff00, 0x1190,
+	0x080c, 0x4af0, 0x1108, 0x0070, 0x2009, 0x004b, 0x080c, 0xc31c,
+	0x2009, 0x0003, 0x0108, 0x0078, 0x0431, 0x19c0, 0xa897, 0x4005,
+	0xa99a, 0x0010, 0xa897, 0x4006, 0x900e, 0x9085, 0x0001, 0x2001,
+	0x0030, 0x00ce, 0x0005, 0x9006, 0x0ce0, 0x7aa8, 0xd2dc, 0x0904,
+	0x351a, 0x0016, 0x7984, 0x9284, 0x1000, 0xc0fd, 0x080c, 0x558a,
+	0x001e, 0x1904, 0x351a, 0x0804, 0x34e8, 0x00f6, 0x2d78, 0xaab0,
+	0x0021, 0x00fe, 0x0005, 0xaab0, 0xc2d5, 0xd2dc, 0x0150, 0x0016,
+	0xa998, 0x9284, 0x1400, 0xc0fd, 0x080c, 0x558a, 0x001e, 0x9085,
+	0x0001, 0x0005, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x351a,
+	0x080c, 0x55ef, 0x0120, 0x2009, 0x0007, 0x0804, 0x351a, 0x7984,
+	0x7ea8, 0x96b4, 0x00ff, 0x080c, 0x649f, 0x1904, 0x351d, 0x9186,
+	0x007f, 0x0138, 0x080c, 0x67c3, 0x0120, 0x2009, 0x0009, 0x0804,
+	0x351a, 0x080c, 0x4abf, 0x1120, 0x2009, 0x0002, 0x0804, 0x351a,
+	0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, 0x2001, 0x0100, 0x8007,
+	0xa80a, 0x080c, 0xc01c, 0x1120, 0x2009, 0x0003, 0x0804, 0x351a,
+	0x7007, 0x0003, 0x701f, 0x53c5, 0x0005, 0xa808, 0x8007, 0x9086,
+	0x0100, 0x1120, 0x2009, 0x0004, 0x0804, 0x351a, 0xa8e0, 0xa866,
+	0xa810, 0x8007, 0x9084, 0x00ff, 0x800c, 0xa814, 0x8007, 0x9084,
+	0x00ff, 0x8004, 0x9080, 0x0002, 0x9108, 0x8906, 0x8006, 0x8007,
+	0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0004, 0x7a8c, 0x7b88,
+	0x7c9c, 0x7d98, 0x0804, 0x4b0b, 0x080c, 0x4abf, 0x1120, 0x2009,
+	0x0002, 0x0804, 0x351a, 0x7984, 0x9194, 0xff00, 0x918c, 0x00ff,
+	0x8217, 0x82ff, 0x1118, 0x7023, 0x198b, 0x0040, 0x92c6, 0x0001,
+	0x1118, 0x7023, 0x19a5, 0x0010, 0x0804, 0x351d, 0x2009, 0x001a,
+	0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0xa85c, 0x9080, 0x0019, 0xaf60,
+	0x080c, 0x4b08, 0x701f, 0x5415, 0x0005, 0x2001, 0x182d, 0x2003,
+	0x0001, 0xa85c, 0x9080, 0x0019, 0x2098, 0xa860, 0x20e0, 0x20a9,
+	0x001a, 0x7020, 0x20a0, 0x20e9, 0x0001, 0x4003, 0x0804, 0x34e8,
+	0x080c, 0x4abf, 0x1120, 0x2009, 0x0002, 0x0804, 0x351a, 0x7984,
+	0x9194, 0xff00, 0x918c, 0x00ff, 0x8217, 0x82ff, 0x1118, 0x2099,
+	0x198b, 0x0040, 0x92c6, 0x0001, 0x1118, 0x2099, 0x19a5, 0x0010,
+	0x0804, 0x351d, 0xa85c, 0x9080, 0x0019, 0x20a0, 0xa860, 0x20e8,
+	0x20a9, 0x001a, 0x20e1, 0x0001, 0x4003, 0x2009, 0x001a, 0x7a8c,
+	0x7b88, 0x7c9c, 0x7d98, 0xa85c, 0x9080, 0x0019, 0xaf60, 0x0804,
+	0x4b0b, 0x7884, 0x908a, 0x1000, 0x1a04, 0x351d, 0x0126, 0x2091,
+	0x8000, 0x8003, 0x800b, 0x810b, 0x9108, 0x00c6, 0x2061, 0x19d2,
+	0x6142, 0x00ce, 0x012e, 0x0804, 0x34e8, 0x00c6, 0x080c, 0x7207,
+	0x1160, 0x080c, 0x7504, 0x080c, 0x5f2b, 0x9085, 0x0001, 0x080c,
+	0x724e, 0x080c, 0x7127, 0x080c, 0x0dfa, 0x2061, 0x1800, 0x6030,
+	0xc09d, 0x6032, 0x080c, 0x5dea, 0x00ce, 0x0005, 0x00c6, 0x2001,
+	0x1800, 0x2004, 0x908e, 0x0000, 0x0904, 0x351a, 0x7884, 0x9005,
+	0x0188, 0x7888, 0x2061, 0x1974, 0x2c0c, 0x2062, 0x080c, 0x2b98,
+	0x01a0, 0x080c, 0x2ba0, 0x0188, 0x080c, 0x2ba8, 0x0170, 0x2162,
+	0x0804, 0x351d, 0x2061, 0x0100, 0x6038, 0x9086, 0x0007, 0x1118,
+	0x2009, 0x0001, 0x0010, 0x2009, 0x0000, 0x7884, 0x9086, 0x0002,
+	0x1568, 0x2061, 0x0100, 0x6028, 0xc09c, 0x602a, 0x0026, 0x2011,
+	0x0003, 0x080c, 0x9a0f, 0x2011, 0x0002, 0x080c, 0x9a19, 0x002e,
+	0x080c, 0x9927, 0x0036, 0x901e, 0x080c, 0x999d, 0x003e, 0x60e3,
+	0x0000, 0x080c, 0xdc13, 0x080c, 0xdc2e, 0x9085, 0x0001, 0x080c,
+	0x724e, 0x9006, 0x080c, 0x2c88, 0x2001, 0x1800, 0x2003, 0x0004,
+	0x2001, 0x197f, 0x2003, 0x0000, 0x6027, 0x0008, 0x00ce, 0x0804,
+	0x34e8, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x351a, 0x080c,
+	0x55ef, 0x0120, 0x2009, 0x0007, 0x0804, 0x351a, 0x7984, 0x7ea8,
+	0x96b4, 0x00ff, 0x080c, 0x649f, 0x1904, 0x351d, 0x9186, 0x007f,
+	0x0138, 0x080c, 0x67c3, 0x0120, 0x2009, 0x0009, 0x0804, 0x351a,
+	0x080c, 0x4abf, 0x1120, 0x2009, 0x0002, 0x0804, 0x351a, 0xa867,
+	0x0000, 0xa868, 0xc0fd, 0xa86a, 0x080c, 0xc01f, 0x1120, 0x2009,
+	0x0003, 0x0804, 0x351a, 0x7007, 0x0003, 0x701f, 0x5518, 0x0005,
+	0xa830, 0x9086, 0x0100, 0x1120, 0x2009, 0x0004, 0x0804, 0x351a,
 	0xa8e0, 0xa866, 0xa834, 0x8007, 0x800c, 0xa85c, 0x9080, 0x000c,
-	0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0xaf60, 0x0804, 0x48e0, 0xa898,
-	0x9086, 0x000d, 0x1904, 0x3376, 0x2021, 0x4005, 0x0126, 0x2091,
-	0x8000, 0x0e04, 0x5304, 0x0010, 0x012e, 0x0cc0, 0x7c36, 0x9486,
+	0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0xaf60, 0x0804, 0x4b0b, 0xa898,
+	0x9086, 0x000d, 0x1904, 0x351a, 0x2021, 0x4005, 0x0126, 0x2091,
+	0x8000, 0x0e04, 0x553c, 0x0010, 0x012e, 0x0cc0, 0x7c36, 0x9486,
 	0x4000, 0x0118, 0x7833, 0x0011, 0x0010, 0x7833, 0x0010, 0x7883,
 	0x4005, 0xa998, 0x7986, 0xa9a4, 0x799a, 0xa9a8, 0x799e, 0x080c,
-	0x48d0, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c,
-	0x1187, 0x7007, 0x0001, 0x2091, 0x5000, 0x700f, 0x0000, 0x012e,
+	0x4afb, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c,
+	0x11e0, 0x7007, 0x0001, 0x2091, 0x5000, 0x700f, 0x0000, 0x012e,
 	0x0005, 0x0126, 0x2091, 0x8000, 0x00c6, 0x2061, 0x19d2, 0x7984,
 	0x6152, 0x614e, 0x6057, 0x0000, 0x604b, 0x0009, 0x7898, 0x606a,
 	0x789c, 0x6066, 0x7888, 0x6062, 0x788c, 0x605e, 0x2001, 0x19e0,
 	0x2044, 0x2001, 0x19e7, 0xa076, 0xa060, 0xa072, 0xa07b, 0x0001,
 	0xa07f, 0x0002, 0xa06b, 0x0000, 0xa09f, 0x0000, 0x00ce, 0x012e,
-	0x0804, 0x3344, 0x0126, 0x2091, 0x8000, 0x00b6, 0x00c6, 0x90e4,
-	0xc000, 0x0128, 0x0006, 0x080c, 0xbb88, 0x000e, 0x1198, 0xd0e4,
-	0x0160, 0x9180, 0x1000, 0x2004, 0x905d, 0x0160, 0x080c, 0x5cff,
-	0x080c, 0x9dae, 0x0110, 0xb817, 0x0000, 0x9006, 0x00ce, 0x00be,
+	0x0804, 0x34e8, 0x0126, 0x2091, 0x8000, 0x00b6, 0x00c6, 0x90e4,
+	0xc000, 0x0168, 0x0006, 0xd0d4, 0x0130, 0x0036, 0x2019, 0x0029,
+	0x080c, 0x32a4, 0x003e, 0x080c, 0xbe84, 0x000e, 0x1198, 0xd0e4,
+	0x0160, 0x9180, 0x1000, 0x2004, 0x905d, 0x0160, 0x080c, 0x5f45,
+	0x080c, 0xa062, 0x0110, 0xb817, 0x0000, 0x9006, 0x00ce, 0x00be,
 	0x012e, 0x0005, 0x9085, 0x0001, 0x0cc8, 0x0126, 0x2091, 0x8000,
 	0x0156, 0x2010, 0x900e, 0x20a9, 0x0800, 0x0016, 0x9180, 0x1000,
-	0x2004, 0x9005, 0x0180, 0x9186, 0x007e, 0x0168, 0x9186, 0x007f,
-	0x0150, 0x9186, 0x0080, 0x0138, 0x9186, 0x00ff, 0x0120, 0x0026,
-	0x2200, 0x0801, 0x002e, 0x001e, 0x8108, 0x1f04, 0x537d, 0x015e,
-	0x012e, 0x0005, 0x2001, 0x185c, 0x2004, 0x0005, 0x2001, 0x187b,
-	0x2004, 0x0005, 0x0006, 0x2001, 0x1810, 0x2004, 0xd0d4, 0x000e,
-	0x0005, 0x2001, 0x180e, 0x2004, 0xd0b4, 0x0005, 0x2001, 0x1800,
-	0x2004, 0x9086, 0x0003, 0x0005, 0x0016, 0x00e6, 0x2071, 0x189c,
-	0x7108, 0x910d, 0x710a, 0x00ee, 0x001e, 0x0005, 0x79a4, 0x9182,
-	0x0081, 0x1a04, 0x3379, 0x810c, 0x0016, 0x080c, 0x4894, 0x080c,
-	0x0ef3, 0x2100, 0x2238, 0x7d84, 0x7c88, 0x7b8c, 0x7a90, 0x001e,
-	0x080c, 0x48dd, 0x701f, 0x53d5, 0x0005, 0x2079, 0x0000, 0x7d94,
-	0x7c98, 0x7ba8, 0x7aac, 0x79a4, 0x810c, 0x2061, 0x18b6, 0x2c44,
-	0xa770, 0xa074, 0x2071, 0x189c, 0x080c, 0x48e0, 0x701f, 0x53e9,
-	0x0005, 0x2061, 0x18b6, 0x2c44, 0x0016, 0x0026, 0xa270, 0xa174,
-	0x080c, 0x0efb, 0x002e, 0x001e, 0x080c, 0x0fa8, 0x9006, 0xa802,
-	0xa806, 0x0804, 0x3344, 0x0126, 0x0156, 0x0136, 0x0146, 0x01c6,
-	0x01d6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x2061, 0x0100, 0x2069,
-	0x0200, 0x2071, 0x1800, 0x6044, 0xd0a4, 0x11e8, 0xd084, 0x0118,
-	0x080c, 0x55a4, 0x0068, 0xd08c, 0x0118, 0x080c, 0x54ad, 0x0040,
-	0xd094, 0x0118, 0x080c, 0x547d, 0x0018, 0xd09c, 0x0108, 0x0099,
-	0x00fe, 0x00ee, 0x00de, 0x00ce, 0x01de, 0x01ce, 0x014e, 0x013e,
-	0x015e, 0x012e, 0x0005, 0x0016, 0x6128, 0xd19c, 0x1110, 0xc19d,
-	0x612a, 0x001e, 0x0c68, 0x0006, 0x7094, 0x9005, 0x000e, 0x0120,
-	0x7097, 0x0000, 0x708f, 0x0000, 0x624c, 0x9286, 0xf0f0, 0x1150,
-	0x6048, 0x9086, 0xf0f0, 0x0130, 0x624a, 0x6043, 0x0090, 0x6043,
-	0x0010, 0x0490, 0x9294, 0xff00, 0x9296, 0xf700, 0x0178, 0x7138,
-	0xd1a4, 0x1160, 0x6240, 0x9295, 0x0100, 0x6242, 0x9294, 0x0010,
-	0x0128, 0x2009, 0x00f7, 0x080c, 0x5c61, 0x00f0, 0x6040, 0x9084,
-	0x0010, 0x9085, 0x0140, 0x6042, 0x6043, 0x0000, 0x7083, 0x0000,
-	0x709f, 0x0001, 0x70c3, 0x0000, 0x70db, 0x0000, 0x2009, 0x1c80,
-	0x200b, 0x0000, 0x7093, 0x0000, 0x7087, 0x000f, 0x2009, 0x000f,
-	0x2011, 0x5b47, 0x080c, 0x80d1, 0x0005, 0x2001, 0x187d, 0x2004,
-	0xd08c, 0x0110, 0x705b, 0xffff, 0x7084, 0x9005, 0x1528, 0x2011,
-	0x5b47, 0x080c, 0x803f, 0x6040, 0x9094, 0x0010, 0x9285, 0x0020,
-	0x6042, 0x20a9, 0x00c8, 0x6044, 0xd08c, 0x1168, 0x1f04, 0x5493,
-	0x6242, 0x7097, 0x0000, 0x6040, 0x9094, 0x0010, 0x9285, 0x0080,
-	0x6042, 0x6242, 0x0048, 0x6242, 0x7097, 0x0000, 0x708b, 0x0000,
-	0x9006, 0x080c, 0x5cea, 0x0000, 0x0005, 0x7088, 0x908a, 0x0003,
-	0x1a0c, 0x0db4, 0x000b, 0x0005, 0x54b7, 0x5508, 0x55a3, 0x00f6,
-	0x0016, 0x6900, 0x918c, 0x0800, 0x708b, 0x0001, 0x2001, 0x015d,
-	0x2003, 0x0000, 0x6803, 0x00fc, 0x20a9, 0x0004, 0x6800, 0x9084,
-	0x00fc, 0x0120, 0x1f04, 0x54c6, 0x080c, 0x0db4, 0x68a0, 0x68a2,
-	0x689c, 0x689e, 0x6898, 0x689a, 0xa001, 0x918d, 0x1600, 0x6902,
-	0x001e, 0x6837, 0x0020, 0x080c, 0x5cc6, 0x2079, 0x1c00, 0x7833,
-	0x1101, 0x7837, 0x0000, 0x20e1, 0x0001, 0x2099, 0x1805, 0x20e9,
-	0x0001, 0x20a1, 0x1c0e, 0x20a9, 0x0004, 0x4003, 0x080c, 0x9c37,
-	0x20e1, 0x0001, 0x2099, 0x1c00, 0x20e9, 0x0000, 0x20a1, 0x0240,
-	0x20a9, 0x0014, 0x4003, 0x60c3, 0x000c, 0x600f, 0x0000, 0x080c,
-	0x5b78, 0x00fe, 0x9006, 0x708e, 0x6043, 0x0008, 0x6042, 0x0005,
-	0x00f6, 0x708c, 0x708f, 0x0000, 0x9025, 0x0904, 0x5580, 0x6020,
-	0xd0b4, 0x1904, 0x557e, 0x719c, 0x81ff, 0x0904, 0x556c, 0x9486,
-	0x000c, 0x1904, 0x5579, 0x9480, 0x0018, 0x8004, 0x20a8, 0x080c,
-	0x5cbf, 0x2011, 0x0260, 0x2019, 0x1c00, 0x220c, 0x2304, 0x9106,
-	0x11e8, 0x8210, 0x8318, 0x1f04, 0x5525, 0x6043, 0x0004, 0x2061,
-	0x0140, 0x605b, 0xbc94, 0x605f, 0xf0f0, 0x2061, 0x0100, 0x6043,
-	0x0006, 0x708b, 0x0002, 0x7097, 0x0002, 0x2009, 0x07d0, 0x2011,
-	0x5b4e, 0x080c, 0x80d1, 0x080c, 0x5cc6, 0x04c0, 0x080c, 0x5cbf,
-	0x2079, 0x0260, 0x7930, 0x918e, 0x1101, 0x1558, 0x7834, 0x9005,
-	0x1540, 0x7900, 0x918c, 0x00ff, 0x1118, 0x7804, 0x9005, 0x0190,
-	0x080c, 0x5cbf, 0x2011, 0x026e, 0x2019, 0x1805, 0x20a9, 0x0004,
-	0x220c, 0x2304, 0x9102, 0x0230, 0x11a0, 0x8210, 0x8318, 0x1f04,
-	0x5560, 0x0078, 0x709f, 0x0000, 0x080c, 0x5cbf, 0x20e1, 0x0000,
-	0x2099, 0x0260, 0x20e9, 0x0001, 0x20a1, 0x1c00, 0x20a9, 0x0014,
-	0x4003, 0x6043, 0x0008, 0x6043, 0x0000, 0x0010, 0x00fe, 0x0005,
-	0x6040, 0x9085, 0x0100, 0x6042, 0x6020, 0xd0b4, 0x1db8, 0x080c,
-	0x9c37, 0x20e1, 0x0001, 0x2099, 0x1c00, 0x20e9, 0x0000, 0x20a1,
-	0x0240, 0x20a9, 0x0014, 0x4003, 0x60c3, 0x000c, 0x2011, 0x19c9,
-	0x2013, 0x0000, 0x708f, 0x0000, 0x60a3, 0x0056, 0x60a7, 0x9575,
-	0x080c, 0x93be, 0x08d8, 0x0005, 0x7094, 0x908a, 0x001d, 0x1a0c,
-	0x0db4, 0x000b, 0x0005, 0x55d5, 0x55e8, 0x5611, 0x5631, 0x5657,
-	0x5686, 0x56ac, 0x56e4, 0x570a, 0x5738, 0x5773, 0x57ab, 0x57c9,
-	0x57f4, 0x5816, 0x5831, 0x583b, 0x586f, 0x5895, 0x58c4, 0x58ea,
-	0x5922, 0x5966, 0x59a3, 0x59c4, 0x5a1d, 0x5a3f, 0x5a6d, 0x5a6d,
-	0x00c6, 0x2061, 0x1800, 0x6003, 0x0007, 0x2061, 0x0100, 0x6004,
-	0x9084, 0xfff9, 0x6006, 0x00ce, 0x0005, 0x2061, 0x0140, 0x605b,
-	0xbc94, 0x605f, 0xf0f0, 0x2061, 0x0100, 0x6043, 0x0002, 0x7097,
-	0x0001, 0x2009, 0x07d0, 0x2011, 0x5b4e, 0x080c, 0x80d1, 0x0005,
-	0x00f6, 0x708c, 0x9086, 0x0014, 0x1510, 0x6042, 0x6020, 0xd0b4,
-	0x11f0, 0x080c, 0x5cbf, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1102,
-	0x11a0, 0x7834, 0x9005, 0x1188, 0x7a38, 0xd2fc, 0x0128, 0x70c0,
-	0x9005, 0x1110, 0x70c3, 0x0001, 0x2011, 0x5b4e, 0x080c, 0x803f,
-	0x7097, 0x0010, 0x080c, 0x583b, 0x0010, 0x708f, 0x0000, 0x00fe,
-	0x0005, 0x00f6, 0x7097, 0x0003, 0x6043, 0x0004, 0x2011, 0x5b4e,
-	0x080c, 0x803f, 0x080c, 0x5c43, 0x2079, 0x0240, 0x7833, 0x1102,
-	0x7837, 0x0000, 0x20a9, 0x0008, 0x9f88, 0x000e, 0x200b, 0x0000,
-	0x8108, 0x1f04, 0x5626, 0x60c3, 0x0014, 0x080c, 0x5b78, 0x00fe,
-	0x0005, 0x00f6, 0x708c, 0x9005, 0x0500, 0x2011, 0x5b4e, 0x080c,
-	0x803f, 0x9086, 0x0014, 0x11b8, 0x080c, 0x5cbf, 0x2079, 0x0260,
-	0x7a30, 0x9296, 0x1102, 0x1178, 0x7834, 0x9005, 0x1160, 0x7a38,
-	0xd2fc, 0x0128, 0x70c0, 0x9005, 0x1110, 0x70c3, 0x0001, 0x7097,
-	0x0004, 0x0029, 0x0010, 0x080c, 0x5c9b, 0x00fe, 0x0005, 0x00f6,
-	0x7097, 0x0005, 0x080c, 0x5c43, 0x2079, 0x0240, 0x7833, 0x1103,
-	0x7837, 0x0000, 0x080c, 0x5cbf, 0x080c, 0x5ca2, 0x1170, 0x7080,
-	0x9005, 0x1158, 0x7158, 0x9186, 0xffff, 0x0138, 0x2011, 0x0008,
-	0x080c, 0x5afb, 0x0168, 0x080c, 0x5c78, 0x20a9, 0x0008, 0x20e1,
-	0x0000, 0x2099, 0x026e, 0x20e9, 0x0000, 0x20a1, 0x024e, 0x4003,
-	0x60c3, 0x0014, 0x080c, 0x5b78, 0x00fe, 0x0005, 0x00f6, 0x708c,
-	0x9005, 0x0500, 0x2011, 0x5b4e, 0x080c, 0x803f, 0x9086, 0x0014,
-	0x11b8, 0x080c, 0x5cbf, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1103,
-	0x1178, 0x7834, 0x9005, 0x1160, 0x7a38, 0xd2fc, 0x0128, 0x70c0,
-	0x9005, 0x1110, 0x70c3, 0x0001, 0x7097, 0x0006, 0x0029, 0x0010,
-	0x080c, 0x5c9b, 0x00fe, 0x0005, 0x00f6, 0x7097, 0x0007, 0x080c,
-	0x5c43, 0x2079, 0x0240, 0x7833, 0x1104, 0x7837, 0x0000, 0x080c,
-	0x5cbf, 0x080c, 0x5ca2, 0x11b8, 0x7080, 0x9005, 0x11a0, 0x7160,
-	0x9186, 0xffff, 0x0180, 0x9180, 0x3145, 0x200d, 0x918c, 0xff00,
-	0x810f, 0x2011, 0x0008, 0x080c, 0x5afb, 0x0180, 0x080c, 0x4cac,
-	0x0110, 0x080c, 0x26d9, 0x20a9, 0x0008, 0x20e1, 0x0000, 0x2099,
+	0x2004, 0x9005, 0x0188, 0x9186, 0x007e, 0x0170, 0x9186, 0x007f,
+	0x0158, 0x9186, 0x0080, 0x0140, 0x9186, 0x00ff, 0x0128, 0x0026,
+	0x2200, 0x080c, 0x558a, 0x002e, 0x001e, 0x8108, 0x1f04, 0x55bd,
+	0x015e, 0x012e, 0x0005, 0x2001, 0x185c, 0x2004, 0x0005, 0x2001,
+	0x187b, 0x2004, 0x0005, 0x0006, 0x2001, 0x1810, 0x2004, 0xd0d4,
+	0x000e, 0x0005, 0x2001, 0x180e, 0x2004, 0xd0b4, 0x0005, 0x2001,
+	0x1800, 0x2004, 0x9086, 0x0003, 0x0005, 0x0016, 0x00e6, 0x2071,
+	0x189c, 0x7108, 0x910d, 0x710a, 0x00ee, 0x001e, 0x0005, 0x79a4,
+	0x9182, 0x0081, 0x1a04, 0x351d, 0x810c, 0x0016, 0x080c, 0x4abf,
+	0x0170, 0x080c, 0x0f39, 0x2100, 0x2238, 0x7d84, 0x7c88, 0x7b8c,
+	0x7a90, 0x001e, 0x080c, 0x4b08, 0x701f, 0x561b, 0x0005, 0x2009,
+	0x0002, 0x0804, 0x351a, 0x2079, 0x0000, 0x7d94, 0x7c98, 0x7ba8,
+	0x7aac, 0x79a4, 0x810c, 0x2061, 0x18b6, 0x2c44, 0xa770, 0xa074,
+	0x2071, 0x189c, 0x080c, 0x4b0b, 0x701f, 0x562f, 0x0005, 0x2061,
+	0x18b6, 0x2c44, 0x0016, 0x0026, 0xa270, 0xa174, 0x080c, 0x0f41,
+	0x002e, 0x001e, 0x080c, 0x0fee, 0x9006, 0xa802, 0xa806, 0x0804,
+	0x34e8, 0x0126, 0x0156, 0x0136, 0x0146, 0x01c6, 0x01d6, 0x00c6,
+	0x00d6, 0x00e6, 0x00f6, 0x2061, 0x0100, 0x2069, 0x0200, 0x2071,
+	0x1800, 0x6044, 0xd0a4, 0x11e8, 0xd084, 0x0118, 0x080c, 0x57ea,
+	0x0068, 0xd08c, 0x0118, 0x080c, 0x56f3, 0x0040, 0xd094, 0x0118,
+	0x080c, 0x56c3, 0x0018, 0xd09c, 0x0108, 0x0099, 0x00fe, 0x00ee,
+	0x00de, 0x00ce, 0x01de, 0x01ce, 0x014e, 0x013e, 0x015e, 0x012e,
+	0x0005, 0x0016, 0x6128, 0xd19c, 0x1110, 0xc19d, 0x612a, 0x001e,
+	0x0c68, 0x0006, 0x7094, 0x9005, 0x000e, 0x0120, 0x7097, 0x0000,
+	0x708f, 0x0000, 0x624c, 0x9286, 0xf0f0, 0x1150, 0x6048, 0x9086,
+	0xf0f0, 0x0130, 0x624a, 0x6043, 0x0090, 0x6043, 0x0010, 0x0490,
+	0x9294, 0xff00, 0x9296, 0xf700, 0x0178, 0x7138, 0xd1a4, 0x1160,
+	0x6240, 0x9295, 0x0100, 0x6242, 0x9294, 0x0010, 0x0128, 0x2009,
+	0x00f7, 0x080c, 0x5ea7, 0x00f0, 0x6040, 0x9084, 0x0010, 0x9085,
+	0x0140, 0x6042, 0x6043, 0x0000, 0x7083, 0x0000, 0x709f, 0x0001,
+	0x70c3, 0x0000, 0x70db, 0x0000, 0x2009, 0x1c80, 0x200b, 0x0000,
+	0x7093, 0x0000, 0x7087, 0x000f, 0x2009, 0x000f, 0x2011, 0x5d8d,
+	0x080c, 0x836c, 0x0005, 0x2001, 0x187d, 0x2004, 0xd08c, 0x0110,
+	0x705b, 0xffff, 0x7084, 0x9005, 0x1528, 0x2011, 0x5d8d, 0x080c,
+	0x82da, 0x6040, 0x9094, 0x0010, 0x9285, 0x0020, 0x6042, 0x20a9,
+	0x00c8, 0x6044, 0xd08c, 0x1168, 0x1f04, 0x56d9, 0x6242, 0x7097,
+	0x0000, 0x6040, 0x9094, 0x0010, 0x9285, 0x0080, 0x6042, 0x6242,
+	0x0048, 0x6242, 0x7097, 0x0000, 0x708b, 0x0000, 0x9006, 0x080c,
+	0x5f30, 0x0000, 0x0005, 0x7088, 0x908a, 0x0003, 0x1a0c, 0x0dfa,
+	0x000b, 0x0005, 0x56fd, 0x574e, 0x57e9, 0x00f6, 0x0016, 0x6900,
+	0x918c, 0x0800, 0x708b, 0x0001, 0x2001, 0x015d, 0x2003, 0x0000,
+	0x6803, 0x00fc, 0x20a9, 0x0004, 0x6800, 0x9084, 0x00fc, 0x0120,
+	0x1f04, 0x570c, 0x080c, 0x0dfa, 0x68a0, 0x68a2, 0x689c, 0x689e,
+	0x6898, 0x689a, 0xa001, 0x918d, 0x1600, 0x6902, 0x001e, 0x6837,
+	0x0020, 0x080c, 0x5f0c, 0x2079, 0x1c00, 0x7833, 0x1101, 0x7837,
+	0x0000, 0x20e1, 0x0001, 0x2099, 0x1805, 0x20e9, 0x0001, 0x20a1,
+	0x1c0e, 0x20a9, 0x0004, 0x4003, 0x080c, 0x9eeb, 0x20e1, 0x0001,
+	0x2099, 0x1c00, 0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9, 0x0014,
+	0x4003, 0x60c3, 0x000c, 0x600f, 0x0000, 0x080c, 0x5dbe, 0x00fe,
+	0x9006, 0x708e, 0x6043, 0x0008, 0x6042, 0x0005, 0x00f6, 0x708c,
+	0x708f, 0x0000, 0x9025, 0x0904, 0x57c6, 0x6020, 0xd0b4, 0x1904,
+	0x57c4, 0x719c, 0x81ff, 0x0904, 0x57b2, 0x9486, 0x000c, 0x1904,
+	0x57bf, 0x9480, 0x0018, 0x8004, 0x20a8, 0x080c, 0x5f05, 0x2011,
+	0x0260, 0x2019, 0x1c00, 0x220c, 0x2304, 0x9106, 0x11e8, 0x8210,
+	0x8318, 0x1f04, 0x576b, 0x6043, 0x0004, 0x2061, 0x0140, 0x605b,
+	0xbc94, 0x605f, 0xf0f0, 0x2061, 0x0100, 0x6043, 0x0006, 0x708b,
+	0x0002, 0x7097, 0x0002, 0x2009, 0x07d0, 0x2011, 0x5d94, 0x080c,
+	0x836c, 0x080c, 0x5f0c, 0x04c0, 0x080c, 0x5f05, 0x2079, 0x0260,
+	0x7930, 0x918e, 0x1101, 0x1558, 0x7834, 0x9005, 0x1540, 0x7900,
+	0x918c, 0x00ff, 0x1118, 0x7804, 0x9005, 0x0190, 0x080c, 0x5f05,
+	0x2011, 0x026e, 0x2019, 0x1805, 0x20a9, 0x0004, 0x220c, 0x2304,
+	0x9102, 0x0230, 0x11a0, 0x8210, 0x8318, 0x1f04, 0x57a6, 0x0078,
+	0x709f, 0x0000, 0x080c, 0x5f05, 0x20e1, 0x0000, 0x2099, 0x0260,
+	0x20e9, 0x0001, 0x20a1, 0x1c00, 0x20a9, 0x0014, 0x4003, 0x6043,
+	0x0008, 0x6043, 0x0000, 0x0010, 0x00fe, 0x0005, 0x6040, 0x9085,
+	0x0100, 0x6042, 0x6020, 0xd0b4, 0x1db8, 0x080c, 0x9eeb, 0x20e1,
+	0x0001, 0x2099, 0x1c00, 0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9,
+	0x0014, 0x4003, 0x60c3, 0x000c, 0x2011, 0x19c9, 0x2013, 0x0000,
+	0x708f, 0x0000, 0x60a3, 0x0056, 0x60a7, 0x9575, 0x080c, 0x964d,
+	0x08d8, 0x0005, 0x7094, 0x908a, 0x001d, 0x1a0c, 0x0dfa, 0x000b,
+	0x0005, 0x581b, 0x582e, 0x5857, 0x5877, 0x589d, 0x58cc, 0x58f2,
+	0x592a, 0x5950, 0x597e, 0x59b9, 0x59f1, 0x5a0f, 0x5a3a, 0x5a5c,
+	0x5a77, 0x5a81, 0x5ab5, 0x5adb, 0x5b0a, 0x5b30, 0x5b68, 0x5bac,
+	0x5be9, 0x5c0a, 0x5c63, 0x5c85, 0x5cb3, 0x5cb3, 0x00c6, 0x2061,
+	0x1800, 0x6003, 0x0007, 0x2061, 0x0100, 0x6004, 0x9084, 0xfff9,
+	0x6006, 0x00ce, 0x0005, 0x2061, 0x0140, 0x605b, 0xbc94, 0x605f,
+	0xf0f0, 0x2061, 0x0100, 0x6043, 0x0002, 0x7097, 0x0001, 0x2009,
+	0x07d0, 0x2011, 0x5d94, 0x080c, 0x836c, 0x0005, 0x00f6, 0x708c,
+	0x9086, 0x0014, 0x1510, 0x6042, 0x6020, 0xd0b4, 0x11f0, 0x080c,
+	0x5f05, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1102, 0x11a0, 0x7834,
+	0x9005, 0x1188, 0x7a38, 0xd2fc, 0x0128, 0x70c0, 0x9005, 0x1110,
+	0x70c3, 0x0001, 0x2011, 0x5d94, 0x080c, 0x82da, 0x7097, 0x0010,
+	0x080c, 0x5a81, 0x0010, 0x708f, 0x0000, 0x00fe, 0x0005, 0x00f6,
+	0x7097, 0x0003, 0x6043, 0x0004, 0x2011, 0x5d94, 0x080c, 0x82da,
+	0x080c, 0x5e89, 0x2079, 0x0240, 0x7833, 0x1102, 0x7837, 0x0000,
+	0x20a9, 0x0008, 0x9f88, 0x000e, 0x200b, 0x0000, 0x8108, 0x1f04,
+	0x586c, 0x60c3, 0x0014, 0x080c, 0x5dbe, 0x00fe, 0x0005, 0x00f6,
+	0x708c, 0x9005, 0x0500, 0x2011, 0x5d94, 0x080c, 0x82da, 0x9086,
+	0x0014, 0x11b8, 0x080c, 0x5f05, 0x2079, 0x0260, 0x7a30, 0x9296,
+	0x1102, 0x1178, 0x7834, 0x9005, 0x1160, 0x7a38, 0xd2fc, 0x0128,
+	0x70c0, 0x9005, 0x1110, 0x70c3, 0x0001, 0x7097, 0x0004, 0x0029,
+	0x0010, 0x080c, 0x5ee1, 0x00fe, 0x0005, 0x00f6, 0x7097, 0x0005,
+	0x080c, 0x5e89, 0x2079, 0x0240, 0x7833, 0x1103, 0x7837, 0x0000,
+	0x080c, 0x5f05, 0x080c, 0x5ee8, 0x1170, 0x7080, 0x9005, 0x1158,
+	0x7158, 0x9186, 0xffff, 0x0138, 0x2011, 0x0008, 0x080c, 0x5d41,
+	0x0168, 0x080c, 0x5ebe, 0x20a9, 0x0008, 0x20e1, 0x0000, 0x2099,
 	0x026e, 0x20e9, 0x0000, 0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014,
-	0x080c, 0x5b78, 0x00fe, 0x0005, 0x00f6, 0x708c, 0x9005, 0x0500,
-	0x2011, 0x5b4e, 0x080c, 0x803f, 0x9086, 0x0014, 0x11b8, 0x080c,
-	0x5cbf, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1104, 0x1178, 0x7834,
+	0x080c, 0x5dbe, 0x00fe, 0x0005, 0x00f6, 0x708c, 0x9005, 0x0500,
+	0x2011, 0x5d94, 0x080c, 0x82da, 0x9086, 0x0014, 0x11b8, 0x080c,
+	0x5f05, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1103, 0x1178, 0x7834,
 	0x9005, 0x1160, 0x7a38, 0xd2fc, 0x0128, 0x70c0, 0x9005, 0x1110,
-	0x70c3, 0x0001, 0x7097, 0x0008, 0x0029, 0x0010, 0x080c, 0x5c9b,
-	0x00fe, 0x0005, 0x00f6, 0x7097, 0x0009, 0x080c, 0x5c43, 0x2079,
-	0x0240, 0x7833, 0x1105, 0x7837, 0x0100, 0x080c, 0x5ca2, 0x1150,
-	0x7080, 0x9005, 0x1138, 0x080c, 0x5a6e, 0x1188, 0x9085, 0x0001,
-	0x080c, 0x26d9, 0x20a9, 0x0008, 0x080c, 0x5cbf, 0x20e1, 0x0000,
-	0x2099, 0x026e, 0x20e9, 0x0000, 0x20a1, 0x024e, 0x4003, 0x60c3,
-	0x0014, 0x080c, 0x5b78, 0x0010, 0x080c, 0x55c8, 0x00fe, 0x0005,
-	0x00f6, 0x708c, 0x9005, 0x05a8, 0x2011, 0x5b4e, 0x080c, 0x803f,
-	0x9086, 0x0014, 0x1560, 0x080c, 0x5cbf, 0x2079, 0x0260, 0x7a30,
-	0x9296, 0x1105, 0x1520, 0x7834, 0x9084, 0x0100, 0x2011, 0x0100,
-	0x921e, 0x1160, 0x7a38, 0xd2fc, 0x0128, 0x70c0, 0x9005, 0x1110,
-	0x70c3, 0x0001, 0x7097, 0x000a, 0x00b1, 0x0098, 0x9005, 0x1178,
+	0x70c3, 0x0001, 0x7097, 0x0006, 0x0029, 0x0010, 0x080c, 0x5ee1,
+	0x00fe, 0x0005, 0x00f6, 0x7097, 0x0007, 0x080c, 0x5e89, 0x2079,
+	0x0240, 0x7833, 0x1104, 0x7837, 0x0000, 0x080c, 0x5f05, 0x080c,
+	0x5ee8, 0x11b8, 0x7080, 0x9005, 0x11a0, 0x7160, 0x9186, 0xffff,
+	0x0180, 0x9180, 0x32e9, 0x200d, 0x918c, 0xff00, 0x810f, 0x2011,
+	0x0008, 0x080c, 0x5d41, 0x0180, 0x080c, 0x4ed8, 0x0110, 0x080c,
+	0x27d7, 0x20a9, 0x0008, 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9,
+	0x0000, 0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014, 0x080c, 0x5dbe,
+	0x00fe, 0x0005, 0x00f6, 0x708c, 0x9005, 0x0500, 0x2011, 0x5d94,
+	0x080c, 0x82da, 0x9086, 0x0014, 0x11b8, 0x080c, 0x5f05, 0x2079,
+	0x0260, 0x7a30, 0x9296, 0x1104, 0x1178, 0x7834, 0x9005, 0x1160,
 	0x7a38, 0xd2fc, 0x0128, 0x70c0, 0x9005, 0x1110, 0x70c3, 0x0001,
-	0x7093, 0x0000, 0x7097, 0x000e, 0x080c, 0x5816, 0x0010, 0x080c,
-	0x5c9b, 0x00fe, 0x0005, 0x00f6, 0x7097, 0x000b, 0x2011, 0x1c0e,
-	0x20e9, 0x0001, 0x22a0, 0x20a9, 0x0040, 0x2019, 0xffff, 0x4304,
-	0x080c, 0x5c43, 0x2079, 0x0240, 0x7833, 0x1106, 0x7837, 0x0000,
-	0x080c, 0x5ca2, 0x0118, 0x2013, 0x0000, 0x0020, 0x705c, 0x9085,
-	0x0100, 0x2012, 0x20a9, 0x0040, 0x2009, 0x024e, 0x2011, 0x1c0e,
-	0x220e, 0x8210, 0x8108, 0x9186, 0x0260, 0x1128, 0x6810, 0x8000,
-	0x6812, 0x2009, 0x0240, 0x1f04, 0x5798, 0x60c3, 0x0084, 0x080c,
-	0x5b78, 0x00fe, 0x0005, 0x00f6, 0x708c, 0x9005, 0x01c0, 0x2011,
-	0x5b4e, 0x080c, 0x803f, 0x9086, 0x0084, 0x1178, 0x080c, 0x5cbf,
-	0x2079, 0x0260, 0x7a30, 0x9296, 0x1106, 0x1138, 0x7834, 0x9005,
-	0x1120, 0x7097, 0x000c, 0x0029, 0x0010, 0x080c, 0x5c9b, 0x00fe,
-	0x0005, 0x00f6, 0x7097, 0x000d, 0x080c, 0x5c43, 0x2079, 0x0240,
-	0x7833, 0x1107, 0x7837, 0x0000, 0x080c, 0x5cbf, 0x20a9, 0x0040,
-	0x2011, 0x026e, 0x2009, 0x024e, 0x220e, 0x8210, 0x8108, 0x9186,
-	0x0260, 0x1150, 0x6810, 0x8000, 0x6812, 0x2009, 0x0240, 0x6814,
-	0x8000, 0x6816, 0x2011, 0x0260, 0x1f04, 0x57dc, 0x60c3, 0x0084,
-	0x080c, 0x5b78, 0x00fe, 0x0005, 0x00f6, 0x708c, 0x9005, 0x01e0,
-	0x2011, 0x5b4e, 0x080c, 0x803f, 0x9086, 0x0084, 0x1198, 0x080c,
-	0x5cbf, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1107, 0x1158, 0x7834,
-	0x9005, 0x1140, 0x7093, 0x0001, 0x080c, 0x5c15, 0x7097, 0x000e,
-	0x0029, 0x0010, 0x080c, 0x5c9b, 0x00fe, 0x0005, 0x918d, 0x0001,
-	0x080c, 0x5cea, 0x7097, 0x000f, 0x708f, 0x0000, 0x2061, 0x0140,
-	0x605b, 0xbc85, 0x605f, 0xb5b5, 0x2061, 0x0100, 0x6043, 0x0005,
-	0x6043, 0x0004, 0x2009, 0x07d0, 0x2011, 0x5b4e, 0x080c, 0x8033,
-	0x0005, 0x708c, 0x9005, 0x0130, 0x2011, 0x5b4e, 0x080c, 0x803f,
-	0x7097, 0x0000, 0x0005, 0x7097, 0x0011, 0x080c, 0x9c37, 0x080c,
-	0x5cbf, 0x20e1, 0x0000, 0x2099, 0x0260, 0x20e9, 0x0000, 0x20a1,
-	0x0240, 0x748c, 0x9480, 0x0018, 0x9080, 0x0007, 0x9084, 0x03f8,
-	0x8004, 0x20a8, 0x4003, 0x080c, 0x5ca2, 0x11a0, 0x7178, 0x81ff,
-	0x0188, 0x900e, 0x707c, 0x9084, 0x00ff, 0x0160, 0x080c, 0x2670,
-	0x9186, 0x007e, 0x0138, 0x9186, 0x0080, 0x0120, 0x2011, 0x0008,
-	0x080c, 0x5afb, 0x60c3, 0x0014, 0x080c, 0x5b78, 0x0005, 0x00f6,
-	0x708c, 0x9005, 0x0500, 0x2011, 0x5b4e, 0x080c, 0x803f, 0x9086,
-	0x0014, 0x11b8, 0x080c, 0x5cbf, 0x2079, 0x0260, 0x7a30, 0x9296,
-	0x1103, 0x1178, 0x7834, 0x9005, 0x1160, 0x7a38, 0xd2fc, 0x0128,
-	0x70c0, 0x9005, 0x1110, 0x70c3, 0x0001, 0x7097, 0x0012, 0x0029,
-	0x0010, 0x708f, 0x0000, 0x00fe, 0x0005, 0x00f6, 0x7097, 0x0013,
-	0x080c, 0x5c51, 0x2079, 0x0240, 0x7833, 0x1103, 0x7837, 0x0000,
-	0x080c, 0x5cbf, 0x080c, 0x5ca2, 0x1170, 0x7080, 0x9005, 0x1158,
-	0x7158, 0x9186, 0xffff, 0x0138, 0x2011, 0x0008, 0x080c, 0x5afb,
-	0x0168, 0x080c, 0x5c78, 0x20a9, 0x0008, 0x20e1, 0x0000, 0x2099,
-	0x026e, 0x20e9, 0x0000, 0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014,
-	0x080c, 0x5b78, 0x00fe, 0x0005, 0x00f6, 0x708c, 0x9005, 0x0500,
-	0x2011, 0x5b4e, 0x080c, 0x803f, 0x9086, 0x0014, 0x11b8, 0x080c,
-	0x5cbf, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1104, 0x1178, 0x7834,
-	0x9005, 0x1160, 0x7a38, 0xd2fc, 0x0128, 0x70c0, 0x9005, 0x1110,
-	0x70c3, 0x0001, 0x7097, 0x0014, 0x0029, 0x0010, 0x708f, 0x0000,
-	0x00fe, 0x0005, 0x00f6, 0x7097, 0x0015, 0x080c, 0x5c51, 0x2079,
-	0x0240, 0x7833, 0x1104, 0x7837, 0x0000, 0x080c, 0x5cbf, 0x080c,
-	0x5ca2, 0x11b8, 0x7080, 0x9005, 0x11a0, 0x7160, 0x9186, 0xffff,
-	0x0180, 0x9180, 0x3145, 0x200d, 0x918c, 0xff00, 0x810f, 0x2011,
-	0x0008, 0x080c, 0x5afb, 0x0180, 0x080c, 0x4cac, 0x0110, 0x080c,
-	0x26d9, 0x20a9, 0x0008, 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9,
-	0x0000, 0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014, 0x080c, 0x5b78,
-	0x00fe, 0x0005, 0x00f6, 0x708c, 0x9005, 0x05f0, 0x2011, 0x5b4e,
-	0x080c, 0x803f, 0x9086, 0x0014, 0x15a8, 0x080c, 0x5cbf, 0x2079,
-	0x0260, 0x7a30, 0x9296, 0x1105, 0x1568, 0x7834, 0x9084, 0x0100,
-	0x2011, 0x0100, 0x921e, 0x1168, 0x9085, 0x0001, 0x080c, 0x5cea,
+	0x7097, 0x0008, 0x0029, 0x0010, 0x080c, 0x5ee1, 0x00fe, 0x0005,
+	0x00f6, 0x7097, 0x0009, 0x080c, 0x5e89, 0x2079, 0x0240, 0x7833,
+	0x1105, 0x7837, 0x0100, 0x080c, 0x5ee8, 0x1150, 0x7080, 0x9005,
+	0x1138, 0x080c, 0x5cb4, 0x1188, 0x9085, 0x0001, 0x080c, 0x27d7,
+	0x20a9, 0x0008, 0x080c, 0x5f05, 0x20e1, 0x0000, 0x2099, 0x026e,
+	0x20e9, 0x0000, 0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014, 0x080c,
+	0x5dbe, 0x0010, 0x080c, 0x580e, 0x00fe, 0x0005, 0x00f6, 0x708c,
+	0x9005, 0x05a8, 0x2011, 0x5d94, 0x080c, 0x82da, 0x9086, 0x0014,
+	0x1560, 0x080c, 0x5f05, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1105,
+	0x1520, 0x7834, 0x9084, 0x0100, 0x2011, 0x0100, 0x921e, 0x1160,
 	0x7a38, 0xd2fc, 0x0128, 0x70c0, 0x9005, 0x1110, 0x70c3, 0x0001,
-	0x0080, 0x9005, 0x11b8, 0x7a38, 0xd2fc, 0x0128, 0x70c0, 0x9005,
-	0x1110, 0x70c3, 0x0001, 0x9085, 0x0001, 0x080c, 0x5cea, 0x7093,
-	0x0000, 0x7a38, 0xd2f4, 0x0110, 0x70db, 0x0008, 0x7097, 0x0016,
-	0x0029, 0x0010, 0x708f, 0x0000, 0x00fe, 0x0005, 0x080c, 0x9c37,
-	0x080c, 0x5cbf, 0x20e1, 0x0000, 0x2099, 0x0260, 0x20e9, 0x0000,
-	0x20a1, 0x0240, 0x20a9, 0x000e, 0x4003, 0x2011, 0x026d, 0x2204,
-	0x9084, 0x0100, 0x2011, 0x024d, 0x2012, 0x2011, 0x026e, 0x7097,
-	0x0017, 0x080c, 0x5ca2, 0x1150, 0x7080, 0x9005, 0x1138, 0x080c,
-	0x5a6e, 0x1188, 0x9085, 0x0001, 0x080c, 0x26d9, 0x20a9, 0x0008,
-	0x080c, 0x5cbf, 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9, 0x0000,
-	0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014, 0x080c, 0x5b78, 0x0010,
-	0x080c, 0x55c8, 0x0005, 0x00f6, 0x708c, 0x9005, 0x01d8, 0x2011,
-	0x5b4e, 0x080c, 0x803f, 0x9086, 0x0084, 0x1190, 0x080c, 0x5cbf,
-	0x2079, 0x0260, 0x7a30, 0x9296, 0x1106, 0x1150, 0x7834, 0x9005,
-	0x1138, 0x9006, 0x080c, 0x5cea, 0x7097, 0x0018, 0x0029, 0x0010,
-	0x708f, 0x0000, 0x00fe, 0x0005, 0x00f6, 0x7097, 0x0019, 0x080c,
-	0x5c51, 0x2079, 0x0240, 0x7833, 0x1106, 0x7837, 0x0000, 0x080c,
-	0x5cbf, 0x2009, 0x026e, 0x2039, 0x1c0e, 0x20a9, 0x0040, 0x213e,
-	0x8738, 0x8108, 0x9186, 0x0280, 0x1128, 0x6814, 0x8000, 0x6816,
-	0x2009, 0x0260, 0x1f04, 0x59d7, 0x2039, 0x1c0e, 0x080c, 0x5ca2,
-	0x11e8, 0x2728, 0x2514, 0x8207, 0x9084, 0x00ff, 0x8000, 0x2018,
-	0x9294, 0x00ff, 0x8007, 0x9205, 0x202a, 0x705c, 0x2310, 0x8214,
-	0x92a0, 0x1c0e, 0x2414, 0x938c, 0x0001, 0x0118, 0x9294, 0xff00,
-	0x0018, 0x9294, 0x00ff, 0x8007, 0x9215, 0x2222, 0x20a9, 0x0040,
-	0x2009, 0x024e, 0x270e, 0x8738, 0x8108, 0x9186, 0x0260, 0x1128,
-	0x6810, 0x8000, 0x6812, 0x2009, 0x0240, 0x1f04, 0x5a0a, 0x60c3,
-	0x0084, 0x080c, 0x5b78, 0x00fe, 0x0005, 0x00f6, 0x708c, 0x9005,
-	0x01e0, 0x2011, 0x5b4e, 0x080c, 0x803f, 0x9086, 0x0084, 0x1198,
-	0x080c, 0x5cbf, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1107, 0x1158,
-	0x7834, 0x9005, 0x1140, 0x7093, 0x0001, 0x080c, 0x5c15, 0x7097,
-	0x001a, 0x0029, 0x0010, 0x708f, 0x0000, 0x00fe, 0x0005, 0x9085,
-	0x0001, 0x080c, 0x5cea, 0x7097, 0x001b, 0x080c, 0x9c37, 0x080c,
-	0x5cbf, 0x2011, 0x0260, 0x2009, 0x0240, 0x748c, 0x9480, 0x0018,
-	0x9080, 0x0007, 0x9084, 0x03f8, 0x8004, 0x20a8, 0x220e, 0x8210,
-	0x8108, 0x9186, 0x0260, 0x1150, 0x6810, 0x8000, 0x6812, 0x2009,
-	0x0240, 0x6814, 0x8000, 0x6816, 0x2011, 0x0260, 0x1f04, 0x5a56,
-	0x60c3, 0x0084, 0x080c, 0x5b78, 0x0005, 0x0005, 0x0086, 0x0096,
-	0x2029, 0x185c, 0x252c, 0x20a9, 0x0008, 0x2041, 0x1c0e, 0x20e9,
-	0x0001, 0x28a0, 0x080c, 0x5cbf, 0x20e1, 0x0000, 0x2099, 0x026e,
-	0x4003, 0x20a9, 0x0008, 0x2011, 0x0007, 0xd5d4, 0x0108, 0x9016,
-	0x2800, 0x9200, 0x200c, 0x91a6, 0xffff, 0x1148, 0xd5d4, 0x0110,
-	0x8210, 0x0008, 0x8211, 0x1f04, 0x5a88, 0x0804, 0x5af7, 0x82ff,
-	0x1160, 0xd5d4, 0x0120, 0x91a6, 0x3fff, 0x0d90, 0x0020, 0x91a6,
-	0x3fff, 0x0904, 0x5af7, 0x918d, 0xc000, 0x20a9, 0x0010, 0x2019,
-	0x0001, 0xd5d4, 0x0110, 0x2019, 0x0010, 0x2120, 0xd5d4, 0x0110,
-	0x8423, 0x0008, 0x8424, 0x1240, 0xd5d4, 0x0110, 0x8319, 0x0008,
-	0x8318, 0x1f04, 0x5aae, 0x04d8, 0x23a8, 0x2021, 0x0001, 0x8426,
-	0x8425, 0x1f04, 0x5ac0, 0x2328, 0x8529, 0x92be, 0x0007, 0x0158,
-	0x0006, 0x2039, 0x0007, 0x2200, 0x973a, 0x000e, 0x27a8, 0x95a8,
-	0x0010, 0x1f04, 0x5acf, 0x755a, 0x95c8, 0x3145, 0x292d, 0x95ac,
-	0x00ff, 0x757e, 0x6532, 0x6536, 0x0016, 0x2508, 0x080c, 0x26b9,
-	0x001e, 0x60e7, 0x0000, 0x65ea, 0x2018, 0x2304, 0x9405, 0x201a,
-	0x7083, 0x0001, 0x20e9, 0x0000, 0x20a1, 0x024e, 0x20e1, 0x0001,
-	0x2898, 0x20a9, 0x0008, 0x4003, 0x9085, 0x0001, 0x0008, 0x9006,
-	0x009e, 0x008e, 0x0005, 0x0156, 0x01c6, 0x01d6, 0x0136, 0x0146,
-	0x22a8, 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9, 0x0000, 0x2011,
-	0x024e, 0x22a0, 0x4003, 0x014e, 0x013e, 0x01de, 0x01ce, 0x015e,
-	0x2118, 0x9026, 0x2001, 0x0007, 0x939a, 0x0010, 0x0218, 0x8420,
-	0x8001, 0x0cd0, 0x2118, 0x84ff, 0x0120, 0x939a, 0x0010, 0x8421,
-	0x1de0, 0x2021, 0x0001, 0x83ff, 0x0118, 0x8423, 0x8319, 0x1de8,
-	0x9238, 0x2029, 0x026e, 0x9528, 0x2504, 0x942c, 0x11b8, 0x9405,
-	0x203a, 0x715a, 0x91a0, 0x3145, 0x242d, 0x95ac, 0x00ff, 0x757e,
-	0x6532, 0x6536, 0x0016, 0x2508, 0x080c, 0x26b9, 0x001e, 0x60e7,
-	0x0000, 0x65ea, 0x7083, 0x0001, 0x9084, 0x0000, 0x0005, 0x00e6,
-	0x2071, 0x1800, 0x7087, 0x0000, 0x00ee, 0x0005, 0x00e6, 0x00f6,
-	0x2079, 0x0100, 0x2071, 0x0140, 0x080c, 0x5c04, 0x080c, 0x93c7,
-	0x7004, 0x9084, 0x4000, 0x0110, 0x080c, 0x2b31, 0x0126, 0x2091,
-	0x8000, 0x2071, 0x1825, 0x2073, 0x0000, 0x7840, 0x0026, 0x0016,
-	0x2009, 0x00f7, 0x080c, 0x5c61, 0x001e, 0x9094, 0x0010, 0x9285,
-	0x0080, 0x7842, 0x7a42, 0x002e, 0x012e, 0x00fe, 0x00ee, 0x0005,
-	0x0126, 0x2091, 0x8000, 0x080c, 0x29d7, 0x0228, 0x2011, 0x0101,
-	0x2204, 0xc0c5, 0x2012, 0x2011, 0x19c9, 0x2013, 0x0000, 0x708f,
-	0x0000, 0x012e, 0x60a3, 0x0056, 0x60a7, 0x9575, 0x080c, 0x93be,
-	0x6144, 0xd184, 0x0120, 0x7194, 0x918d, 0x2000, 0x0018, 0x7188,
-	0x918d, 0x1000, 0x2011, 0x1971, 0x2112, 0x2009, 0x07d0, 0x2011,
-	0x5b4e, 0x080c, 0x80d1, 0x0005, 0x0016, 0x0026, 0x00c6, 0x0126,
-	0x2091, 0x8000, 0x080c, 0x9db5, 0x2009, 0x00f7, 0x080c, 0x5c61,
-	0x2061, 0x19d2, 0x900e, 0x611a, 0x611e, 0x6172, 0x6176, 0x2061,
-	0x1800, 0x6003, 0x0001, 0x2061, 0x0100, 0x6043, 0x0090, 0x6043,
-	0x0010, 0x2009, 0x1971, 0x200b, 0x0000, 0x2009, 0x002d, 0x2011,
-	0x5bd0, 0x080c, 0x8033, 0x012e, 0x00ce, 0x002e, 0x001e, 0x0005,
-	0x00e6, 0x0006, 0x0126, 0x2091, 0x8000, 0x0471, 0x2071, 0x0100,
-	0x080c, 0x93c7, 0x2071, 0x0140, 0x7004, 0x9084, 0x4000, 0x0110,
-	0x080c, 0x2b31, 0x080c, 0x6fb2, 0x0188, 0x080c, 0x6fcd, 0x1170,
-	0x080c, 0x7296, 0x0016, 0x080c, 0x2788, 0x2001, 0x1945, 0x2102,
-	0x001e, 0x080c, 0x7291, 0x080c, 0x6edc, 0x0050, 0x2009, 0x0001,
-	0x080c, 0x2a70, 0x2001, 0x0001, 0x080c, 0x2619, 0x080c, 0x5ba4,
-	0x012e, 0x000e, 0x00ee, 0x0005, 0x2001, 0x180e, 0x2004, 0xd0bc,
-	0x0158, 0x0026, 0x0036, 0x2011, 0x8017, 0x2001, 0x1971, 0x201c,
-	0x080c, 0x48f4, 0x003e, 0x002e, 0x0005, 0x20a9, 0x0012, 0x20e9,
-	0x0001, 0x20a1, 0x1c80, 0x080c, 0x5cbf, 0x20e9, 0x0000, 0x2099,
-	0x026e, 0x0099, 0x20a9, 0x0020, 0x080c, 0x5cb9, 0x2099, 0x0260,
-	0x20a1, 0x1c92, 0x0051, 0x20a9, 0x000e, 0x080c, 0x5cbc, 0x2099,
-	0x0260, 0x20a1, 0x1cb2, 0x0009, 0x0005, 0x0016, 0x0026, 0x3410,
-	0x3308, 0x2104, 0x8007, 0x2012, 0x8108, 0x8210, 0x1f04, 0x5c39,
-	0x002e, 0x001e, 0x0005, 0x080c, 0x9c37, 0x20e1, 0x0001, 0x2099,
-	0x1c00, 0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9, 0x000c, 0x4003,
-	0x0005, 0x080c, 0x9c37, 0x080c, 0x5cbf, 0x20e1, 0x0000, 0x2099,
-	0x0260, 0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9, 0x000c, 0x4003,
-	0x0005, 0x00c6, 0x0006, 0x2061, 0x0100, 0x810f, 0x2001, 0x1833,
-	0x2004, 0x9005, 0x1138, 0x2001, 0x1817, 0x2004, 0x9084, 0x00ff,
-	0x9105, 0x0010, 0x9185, 0x00f7, 0x604a, 0x000e, 0x00ce, 0x0005,
-	0x0016, 0x0046, 0x080c, 0x6576, 0x0158, 0x9006, 0x2020, 0x2009,
-	0x002a, 0x080c, 0xd564, 0x2001, 0x180c, 0x200c, 0xc195, 0x2102,
-	0x2019, 0x002a, 0x900e, 0x080c, 0x2fb2, 0x080c, 0xc23b, 0x0140,
-	0x0036, 0x2019, 0xffff, 0x2021, 0x0007, 0x080c, 0x4a91, 0x003e,
-	0x004e, 0x001e, 0x0005, 0x080c, 0x5ba4, 0x7097, 0x0000, 0x708f,
-	0x0000, 0x0005, 0x0006, 0x2001, 0x180c, 0x2004, 0xd09c, 0x0100,
-	0x000e, 0x0005, 0x0006, 0x0016, 0x0126, 0x2091, 0x8000, 0x2001,
-	0x0101, 0x200c, 0x918d, 0x0006, 0x2102, 0x012e, 0x001e, 0x000e,
-	0x0005, 0x2009, 0x0001, 0x0020, 0x2009, 0x0002, 0x0008, 0x900e,
-	0x6814, 0x9084, 0xffc0, 0x910d, 0x6916, 0x0005, 0x00f6, 0x0156,
-	0x0146, 0x01d6, 0x9006, 0x20a9, 0x0080, 0x20e9, 0x0001, 0x20a1,
-	0x1c00, 0x4004, 0x2079, 0x1c00, 0x7803, 0x2200, 0x7807, 0x00ef,
-	0x780f, 0x00ef, 0x7813, 0x0138, 0x7823, 0xffff, 0x7827, 0xffff,
-	0x01de, 0x014e, 0x015e, 0x00fe, 0x0005, 0x2001, 0x1800, 0x2003,
-	0x0001, 0x0005, 0x2001, 0x197e, 0x0118, 0x2003, 0x0001, 0x0010,
-	0x2003, 0x0000, 0x0005, 0x0156, 0x20a9, 0x0800, 0x2009, 0x1000,
-	0x9006, 0x200a, 0x8108, 0x1f04, 0x5cf9, 0x015e, 0x0005, 0x00d6,
-	0x0036, 0x0156, 0x0136, 0x0146, 0x2069, 0x185b, 0x9006, 0xb802,
-	0xb8be, 0xb807, 0x0707, 0xb80a, 0xb80e, 0xb812, 0x9198, 0x3145,
-	0x231d, 0x939c, 0x00ff, 0xbb16, 0x0016, 0x0026, 0xb8b2, 0x080c,
-	0x9dae, 0x1120, 0x9192, 0x007e, 0x1208, 0xbbb2, 0x20a9, 0x0004,
-	0xb8b4, 0x20e8, 0xb9b8, 0x9198, 0x0006, 0x9006, 0x23a0, 0x4004,
-	0x20a9, 0x0004, 0x9198, 0x000a, 0x23a0, 0x4004, 0x002e, 0x001e,
-	0xb83e, 0xb842, 0xb84e, 0xb852, 0xb856, 0xb85a, 0xb85e, 0xb862,
-	0xb866, 0xb86a, 0xb86f, 0x0100, 0xb872, 0xb876, 0xb87a, 0xb88a,
-	0xb88e, 0xb893, 0x0008, 0xb896, 0xb89a, 0xb89e, 0xb8ae, 0xb9a2,
-	0x0096, 0xb8a4, 0x904d, 0x0110, 0x080c, 0x101d, 0xb8a7, 0x0000,
-	0x009e, 0x9006, 0xb84a, 0x6810, 0xb83a, 0x680c, 0xb846, 0x6814,
-	0x9084, 0x00ff, 0xb842, 0x014e, 0x013e, 0x015e, 0x003e, 0x00de,
-	0x0005, 0x0126, 0x2091, 0x8000, 0xa974, 0xae78, 0x9684, 0x3fff,
-	0x9082, 0x4000, 0x1a04, 0x5dcf, 0x9182, 0x0800, 0x1a04, 0x5dd3,
-	0x2001, 0x180c, 0x2004, 0x9084, 0x0003, 0x1904, 0x5dd9, 0x9188,
-	0x1000, 0x2104, 0x905d, 0x0518, 0xb804, 0x9084, 0x00ff, 0x908e,
-	0x0006, 0x1508, 0xb8a4, 0x900d, 0x1904, 0x5deb, 0xb850, 0x900d,
-	0x1148, 0xa802, 0x2900, 0xb852, 0xb84e, 0x080c, 0x8415, 0x9006,
-	0x012e, 0x0005, 0x00a6, 0x2150, 0x2900, 0xb002, 0xa803, 0x0000,
-	0x00ae, 0xb852, 0x0c90, 0x2001, 0x0005, 0x900e, 0x04b8, 0x2001,
-	0x0028, 0x900e, 0x0498, 0x9082, 0x0006, 0x1290, 0x080c, 0x9dae,
-	0x1160, 0xb8a0, 0x9084, 0xff80, 0x1140, 0xb900, 0xd1fc, 0x0990,
-	0x2001, 0x0029, 0x2009, 0x1000, 0x0408, 0x2001, 0x0028, 0x00a8,
-	0x2009, 0x180c, 0x210c, 0xd18c, 0x0118, 0x2001, 0x0004, 0x0068,
-	0xd184, 0x0118, 0x2001, 0x0004, 0x0040, 0x2001, 0x0029, 0xb900,
-	0xd1fc, 0x0118, 0x2009, 0x1000, 0x0048, 0x900e, 0x0038, 0x2001,
-	0x0029, 0x900e, 0x0018, 0x2001, 0x0029, 0x900e, 0x9005, 0x012e,
-	0x0005, 0x2001, 0x180c, 0x2004, 0xd084, 0x19d0, 0x9188, 0x1000,
-	0x2104, 0x905d, 0x09a8, 0x080c, 0x657a, 0x1990, 0xb800, 0xd0bc,
-	0x0978, 0x0804, 0x5d82, 0x080c, 0x63f2, 0x0904, 0x5d9b, 0x0804,
-	0x5d86, 0x00b6, 0x00e6, 0x0126, 0x2091, 0x8000, 0xa974, 0x9182,
-	0x0800, 0x1a04, 0x5e6c, 0x9188, 0x1000, 0x2104, 0x905d, 0x0904,
-	0x5e44, 0xb8a0, 0x9086, 0x007f, 0x0178, 0x080c, 0x6582, 0x0160,
-	0xa994, 0x81ff, 0x0130, 0x908e, 0x0004, 0x0130, 0x908e, 0x0005,
-	0x0118, 0x080c, 0x657a, 0x1598, 0xa87c, 0xd0fc, 0x01e0, 0xa894,
-	0x9005, 0x01c8, 0x2060, 0x0026, 0x2010, 0x080c, 0xbb29, 0x002e,
-	0x1120, 0x2001, 0x0008, 0x0804, 0x5e6e, 0x6020, 0x9086, 0x000a,
-	0x0120, 0x2001, 0x0008, 0x0804, 0x5e6e, 0x601a, 0x6003, 0x0008,
-	0x2900, 0x6016, 0x0058, 0x080c, 0x9dd9, 0x05e8, 0x2b00, 0x6012,
-	0x2900, 0x6016, 0x600b, 0xffff, 0x6023, 0x000a, 0x2009, 0x0003,
-	0x080c, 0x9ea9, 0x9006, 0x0458, 0x2001, 0x0028, 0x0438, 0x9082,
-	0x0006, 0x1290, 0x080c, 0x9dae, 0x1160, 0xb8a0, 0x9084, 0xff80,
-	0x1140, 0xb900, 0xd1fc, 0x0900, 0x2001, 0x0029, 0x2009, 0x1000,
-	0x00a8, 0x2001, 0x0028, 0x0090, 0x2009, 0x180c, 0x210c, 0xd18c,
-	0x0118, 0x2001, 0x0004, 0x0050, 0xd184, 0x0118, 0x2001, 0x0004,
-	0x0028, 0x2001, 0x0029, 0x0010, 0x2001, 0x0029, 0x9005, 0x012e,
-	0x00ee, 0x00be, 0x0005, 0x2001, 0x002c, 0x0cc0, 0x00f6, 0x00b6,
-	0x0126, 0x2091, 0x8000, 0xa8e0, 0x9005, 0x1550, 0xa8dc, 0x9082,
-	0x0101, 0x1630, 0xa8c8, 0x9005, 0x1518, 0xa8c4, 0x9082, 0x0101,
-	0x12f8, 0xa974, 0x2079, 0x1800, 0x9182, 0x0800, 0x12e8, 0x7830,
-	0x9084, 0x0003, 0x1130, 0xaa98, 0xab94, 0xa878, 0x9084, 0x0007,
-	0x00ea, 0x7930, 0xd18c, 0x0118, 0x2001, 0x0004, 0x0038, 0xd184,
-	0x0118, 0x2001, 0x0004, 0x0010, 0x2001, 0x0029, 0x900e, 0x0038,
-	0x2001, 0x002c, 0x900e, 0x0018, 0x2001, 0x0029, 0x900e, 0x9006,
-	0x0008, 0x9005, 0x012e, 0x00be, 0x00fe, 0x0005, 0x5f03, 0x5ebe,
-	0x5ed5, 0x5f03, 0x5f03, 0x5f03, 0x5f03, 0x5f03, 0x2100, 0x9082,
-	0x007e, 0x1278, 0x080c, 0x61f6, 0x0148, 0x9046, 0xb810, 0x9306,
-	0x1904, 0x5f0b, 0xb814, 0x9206, 0x15f0, 0x0028, 0xbb12, 0xba16,
-	0x0010, 0x080c, 0x47ae, 0x0150, 0x04b0, 0x080c, 0x6256, 0x1598,
-	0xb810, 0x9306, 0x1580, 0xb814, 0x9206, 0x1568, 0x080c, 0x9dd9,
-	0x0530, 0x2b00, 0x6012, 0x080c, 0xbfb5, 0x2900, 0x6016, 0x600b,
-	0xffff, 0x6023, 0x000a, 0xa878, 0x9086, 0x0001, 0x1170, 0x080c,
-	0x2fe7, 0x9006, 0x080c, 0x6193, 0x2001, 0x0002, 0x080c, 0x61a7,
-	0x2001, 0x0200, 0xb86e, 0xb893, 0x0002, 0x2009, 0x0003, 0x080c,
-	0x9ea9, 0x9006, 0x0068, 0x2001, 0x0001, 0x900e, 0x0038, 0x2001,
-	0x002c, 0x900e, 0x0018, 0x2001, 0x0028, 0x900e, 0x9005, 0x0000,
-	0x012e, 0x00be, 0x00fe, 0x0005, 0x00b6, 0x00f6, 0x00e6, 0x0126,
-	0x2091, 0x8000, 0xa894, 0x90c6, 0x0015, 0x0904, 0x60e4, 0x90c6,
-	0x0056, 0x0904, 0x60e8, 0x90c6, 0x0066, 0x0904, 0x60ec, 0x90c6,
-	0x0067, 0x0904, 0x60f0, 0x90c6, 0x0068, 0x0904, 0x60f4, 0x90c6,
-	0x0071, 0x0904, 0x60f8, 0x90c6, 0x0074, 0x0904, 0x60fc, 0x90c6,
-	0x007c, 0x0904, 0x6100, 0x90c6, 0x007e, 0x0904, 0x6104, 0x90c6,
-	0x0037, 0x0904, 0x6108, 0x9016, 0x2079, 0x1800, 0xa974, 0x9186,
-	0x00ff, 0x0904, 0x60df, 0x9182, 0x0800, 0x1a04, 0x60df, 0x080c,
-	0x6256, 0x1198, 0xb804, 0x9084, 0x00ff, 0x9082, 0x0006, 0x1268,
-	0xa894, 0x90c6, 0x006f, 0x0148, 0x080c, 0x9dae, 0x1904, 0x60c8,
-	0xb8a0, 0x9084, 0xff80, 0x1904, 0x60c8, 0xa894, 0x90c6, 0x006f,
-	0x0158, 0x90c6, 0x005e, 0x0904, 0x6028, 0x90c6, 0x0064, 0x0904,
-	0x6051, 0x2008, 0x0804, 0x5feb, 0xa998, 0xa8b0, 0x2040, 0x080c,
-	0x9dae, 0x1120, 0x9182, 0x007f, 0x0a04, 0x5feb, 0x9186, 0x00ff,
-	0x0904, 0x5feb, 0x9182, 0x0800, 0x1a04, 0x5feb, 0xaaa0, 0xab9c,
-	0x7878, 0x9306, 0x11a8, 0x787c, 0x0096, 0x924e, 0x1128, 0x2208,
-	0x2310, 0x009e, 0x0804, 0x5feb, 0x080c, 0x9dae, 0x1140, 0x99cc,
-	0xff00, 0x009e, 0x1128, 0x2208, 0x2310, 0x0804, 0x5feb, 0x009e,
-	0x080c, 0x47ae, 0x0904, 0x5ff4, 0x900e, 0x9016, 0x90c6, 0x4000,
-	0x1558, 0x0006, 0x080c, 0x6476, 0x1108, 0xc185, 0xb800, 0xd0bc,
-	0x0108, 0xc18d, 0x20a9, 0x0004, 0xa860, 0x20e8, 0xa85c, 0x9080,
-	0x0031, 0x20a0, 0xb8b4, 0x20e0, 0xb8b8, 0x9080, 0x0006, 0x2098,
-	0x080c, 0x0f68, 0x20a9, 0x0004, 0xa860, 0x20e8, 0xa85c, 0x9080,
-	0x0035, 0x20a0, 0xb8b4, 0x20e0, 0xb8b8, 0x9080, 0x000a, 0x2098,
-	0x080c, 0x0f68, 0x000e, 0x00c8, 0x90c6, 0x4007, 0x1110, 0x2408,
-	0x00a0, 0x90c6, 0x4008, 0x1118, 0x2708, 0x2610, 0x0070, 0x90c6,
-	0x4009, 0x1108, 0x0050, 0x90c6, 0x4006, 0x0138, 0x2001, 0x4005,
-	0x2009, 0x000a, 0x0010, 0x2001, 0x4006, 0xa896, 0xa99a, 0xaa9e,
-	0x2001, 0x0030, 0x900e, 0x0470, 0x080c, 0x9dd9, 0x1130, 0x2001,
-	0x4005, 0x2009, 0x0003, 0x9016, 0x0c80, 0x2b00, 0x6012, 0x080c,
-	0xbfb5, 0x2900, 0x6016, 0x6023, 0x0001, 0xa868, 0xd88c, 0x0108,
-	0xc0f5, 0xa86a, 0x0126, 0x2091, 0x8000, 0x080c, 0x2fe7, 0x012e,
-	0x9006, 0x080c, 0x6193, 0x2001, 0x0002, 0x080c, 0x61a7, 0x2009,
-	0x0002, 0x080c, 0x9ea9, 0xa8b0, 0xd094, 0x0118, 0xb8bc, 0xc08d,
-	0xb8be, 0x9006, 0x9005, 0x012e, 0x00ee, 0x00fe, 0x00be, 0x0005,
-	0x080c, 0x53ae, 0x0118, 0x2009, 0x0007, 0x00f8, 0xa998, 0xaeb0,
-	0x080c, 0x6256, 0x1904, 0x5fe6, 0x9186, 0x007f, 0x0130, 0x080c,
-	0x657a, 0x0118, 0x2009, 0x0009, 0x0080, 0x0096, 0x080c, 0x0feb,
-	0x1120, 0x009e, 0x2009, 0x0002, 0x0040, 0x2900, 0x009e, 0xa806,
-	0x080c, 0xbd21, 0x19b0, 0x2009, 0x0003, 0x2001, 0x4005, 0x0804,
-	0x5fed, 0xa998, 0xaeb0, 0x080c, 0x6256, 0x1904, 0x5fe6, 0x0096,
-	0x080c, 0x0feb, 0x1128, 0x009e, 0x2009, 0x0002, 0x0804, 0x60a5,
-	0x2900, 0x009e, 0xa806, 0x0096, 0x2048, 0x20a9, 0x002b, 0xb8b4,
-	0x20e0, 0xb8b8, 0x2098, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0002,
-	0x20a0, 0x4003, 0x20a9, 0x0008, 0x9080, 0x0006, 0x20a0, 0xbbb8,
-	0x9398, 0x0006, 0x2398, 0x080c, 0x0f68, 0x009e, 0xa87b, 0x0000,
-	0xa883, 0x0000, 0xa897, 0x4000, 0xd684, 0x1168, 0x080c, 0x539a,
-	0xd0b4, 0x1118, 0xa89b, 0x000b, 0x00e0, 0xb800, 0xd08c, 0x0118,
-	0xa89b, 0x000c, 0x00b0, 0x080c, 0x657a, 0x0118, 0xa89b, 0x0009,
-	0x0080, 0x080c, 0x53ae, 0x0118, 0xa89b, 0x0007, 0x0050, 0x080c,
-	0xbd04, 0x1904, 0x6021, 0x2009, 0x0003, 0x2001, 0x4005, 0x0804,
-	0x5fed, 0xa87b, 0x0030, 0xa897, 0x4005, 0xa804, 0x8006, 0x8006,
-	0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0002, 0x2009,
-	0x002b, 0xaaa0, 0xab9c, 0xaca8, 0xada4, 0x2031, 0x0000, 0x2041,
-	0x122f, 0x080c, 0xa332, 0x1904, 0x6021, 0x2009, 0x0002, 0x08e8,
-	0x2001, 0x0028, 0x900e, 0x0804, 0x6022, 0x2009, 0x180c, 0x210c,
-	0xd18c, 0x0118, 0x2001, 0x0004, 0x0038, 0xd184, 0x0118, 0x2001,
-	0x0004, 0x0010, 0x2001, 0x0029, 0x900e, 0x0804, 0x6022, 0x2001,
-	0x0029, 0x900e, 0x0804, 0x6022, 0x080c, 0x3574, 0x0804, 0x6023,
-	0x080c, 0x50d7, 0x0804, 0x6023, 0x080c, 0x4344, 0x0804, 0x6023,
-	0x080c, 0x43bd, 0x0804, 0x6023, 0x080c, 0x4419, 0x0804, 0x6023,
-	0x080c, 0x486a, 0x0804, 0x6023, 0x080c, 0x4b0f, 0x0804, 0x6023,
-	0x080c, 0x4d42, 0x0804, 0x6023, 0x080c, 0x4f3b, 0x0804, 0x6023,
-	0x080c, 0x3784, 0x0804, 0x6023, 0x00b6, 0xa974, 0xae78, 0x9684,
-	0x3fff, 0x9082, 0x4000, 0x1618, 0x9182, 0x0800, 0x1268, 0x9188,
-	0x1000, 0x2104, 0x905d, 0x0140, 0x080c, 0x657a, 0x1148, 0x00e9,
-	0x080c, 0x6381, 0x9006, 0x00b0, 0x2001, 0x0028, 0x900e, 0x0090,
-	0x9082, 0x0006, 0x1240, 0xb900, 0xd1fc, 0x0d88, 0x2001, 0x0029,
-	0x2009, 0x1000, 0x0038, 0x2001, 0x0029, 0x900e, 0x0018, 0x2001,
-	0x0029, 0x900e, 0x9005, 0x00be, 0x0005, 0x0126, 0x2091, 0x8000,
-	0xb850, 0x900d, 0x0150, 0x2900, 0x0096, 0x2148, 0xa802, 0x009e,
-	0xa803, 0x0000, 0xb852, 0x012e, 0x0005, 0x2900, 0xb852, 0xb84e,
-	0xa803, 0x0000, 0x0cc0, 0x0126, 0x2091, 0x8000, 0xb84c, 0x9005,
-	0x0170, 0x00e6, 0x2071, 0x19bf, 0x7004, 0x9086, 0x0002, 0x0168,
-	0x00ee, 0xb84c, 0xa802, 0x2900, 0xb84e, 0x012e, 0x0005, 0x2900,
-	0xb852, 0xb84e, 0xa803, 0x0000, 0x0cc0, 0x701c, 0x9b06, 0x1d80,
-	0xb84c, 0x00a6, 0x2050, 0xb000, 0xa802, 0x2900, 0xb002, 0x00ae,
-	0x00ee, 0x012e, 0x0005, 0x0126, 0x2091, 0x8000, 0xb84c, 0x904d,
-	0x0130, 0xa800, 0x9005, 0x1108, 0xb852, 0xb84e, 0x9905, 0x012e,
-	0x0005, 0xb84c, 0x904d, 0x0130, 0xa800, 0x9005, 0x1108, 0xb852,
-	0xb84e, 0x9905, 0x0005, 0x00b6, 0x0126, 0x00c6, 0x0026, 0x2091,
-	0x8000, 0x6210, 0x2258, 0xba00, 0x9005, 0x0110, 0xc285, 0x0008,
-	0xc284, 0xba02, 0x002e, 0x00ce, 0x012e, 0x00be, 0x0005, 0x00b6,
-	0x0126, 0x00c6, 0x2091, 0x8000, 0x6210, 0x2258, 0xba04, 0x0006,
-	0x9086, 0x0006, 0x1170, 0xb89c, 0xd0ac, 0x0158, 0x080c, 0x6576,
-	0x0140, 0x9284, 0xff00, 0x8007, 0x9086, 0x0007, 0x1110, 0x2011,
-	0x0600, 0x000e, 0x9294, 0xff00, 0x9215, 0xba06, 0x0006, 0x9086,
-	0x0006, 0x1120, 0xba90, 0x82ff, 0x090c, 0x0db4, 0x000e, 0x00ce,
-	0x012e, 0x00be, 0x0005, 0x00b6, 0x0126, 0x00c6, 0x2091, 0x8000,
-	0x6210, 0x2258, 0xba04, 0x0006, 0x9086, 0x0006, 0x1168, 0xb89c,
-	0xd0a4, 0x0150, 0x080c, 0x6572, 0x1138, 0x9284, 0x00ff, 0x9086,
-	0x0007, 0x1110, 0x2011, 0x0006, 0x000e, 0x9294, 0x00ff, 0x8007,
-	0x9215, 0xba06, 0x00ce, 0x012e, 0x00be, 0x0005, 0x9182, 0x0800,
-	0x0218, 0x9085, 0x0001, 0x0005, 0x00d6, 0x0026, 0x9190, 0x1000,
-	0x2204, 0x905d, 0x1180, 0x0096, 0x080c, 0x0feb, 0x2958, 0x009e,
-	0x0160, 0x2b00, 0x2012, 0xb85c, 0xb8ba, 0xb860, 0xb8b6, 0x9006,
-	0xb8a6, 0x080c, 0x5cff, 0x9006, 0x0010, 0x9085, 0x0001, 0x002e,
-	0x00de, 0x0005, 0x00b6, 0x0096, 0x0126, 0x2091, 0x8000, 0x0026,
-	0x9182, 0x0800, 0x0218, 0x9085, 0x0001, 0x0458, 0x00d6, 0x9190,
-	0x1000, 0x2204, 0x905d, 0x0518, 0x2013, 0x0000, 0xb8a4, 0x904d,
-	0x0110, 0x080c, 0x101d, 0x00d6, 0x00c6, 0xb8ac, 0x2060, 0x8cff,
-	0x0168, 0x600c, 0x0006, 0x6014, 0x2048, 0x080c, 0xbb3b, 0x0110,
-	0x080c, 0x0f9d, 0x080c, 0x9e2f, 0x00ce, 0x0c88, 0x00ce, 0x00de,
-	0x2b48, 0xb8b8, 0xb85e, 0xb8b4, 0xb862, 0x080c, 0x102d, 0x00de,
-	0x9006, 0x002e, 0x012e, 0x009e, 0x00be, 0x0005, 0x0016, 0x9182,
-	0x0800, 0x0218, 0x9085, 0x0001, 0x0030, 0x9188, 0x1000, 0x2104,
-	0x905d, 0x0dc0, 0x9006, 0x001e, 0x0005, 0x00d6, 0x0156, 0x0136,
-	0x0146, 0x9006, 0xb80a, 0xb80e, 0xb800, 0xc08c, 0xb802, 0x080c,
-	0x6faa, 0x1510, 0xb8a0, 0x9086, 0x007e, 0x0120, 0x080c, 0x9dae,
-	0x11d8, 0x0078, 0x7040, 0xd0e4, 0x01b8, 0x00c6, 0x2061, 0x195a,
-	0x7048, 0x2062, 0x704c, 0x6006, 0x7050, 0x600a, 0x7054, 0x600e,
-	0x00ce, 0x703c, 0x2069, 0x0140, 0x9005, 0x1110, 0x2001, 0x0001,
-	0x6886, 0x2069, 0x1800, 0x68b2, 0x7040, 0xb85e, 0x7048, 0xb862,
-	0x704c, 0xb866, 0x20e1, 0x0000, 0x2099, 0x0276, 0xb8b4, 0x20e8,
-	0xb8b8, 0x9088, 0x000a, 0x21a0, 0x20a9, 0x0004, 0x4003, 0x2099,
-	0x027a, 0x9088, 0x0006, 0x21a0, 0x20a9, 0x0004, 0x4003, 0x2069,
-	0x0200, 0x6817, 0x0001, 0x7040, 0xb86a, 0x7144, 0xb96e, 0x7048,
-	0xb872, 0x7050, 0xb876, 0x2069, 0x0200, 0x6817, 0x0000, 0xb8a0,
-	0x9086, 0x007e, 0x1110, 0x7144, 0xb96e, 0x9182, 0x0211, 0x1218,
-	0x2009, 0x0008, 0x0400, 0x9182, 0x0259, 0x1218, 0x2009, 0x0007,
-	0x00d0, 0x9182, 0x02c1, 0x1218, 0x2009, 0x0006, 0x00a0, 0x9182,
-	0x0349, 0x1218, 0x2009, 0x0005, 0x0070, 0x9182, 0x0421, 0x1218,
-	0x2009, 0x0004, 0x0040, 0x9182, 0x0581, 0x1218, 0x2009, 0x0003,
-	0x0010, 0x2009, 0x0002, 0xb992, 0x014e, 0x013e, 0x015e, 0x00de,
-	0x0005, 0x0016, 0x0026, 0x00e6, 0x2071, 0x0260, 0x7034, 0xb896,
-	0x703c, 0xb89a, 0x7054, 0xb89e, 0x0036, 0xbbbc, 0xc384, 0xba00,
-	0x2009, 0x187b, 0x210c, 0xd0bc, 0x0120, 0xd1ec, 0x0110, 0xc2ad,
-	0x0008, 0xc2ac, 0xd0c4, 0x0148, 0xd1e4, 0x0138, 0xc2bd, 0xd0cc,
-	0x0128, 0xd38c, 0x1108, 0xc385, 0x0008, 0xc2bc, 0xba02, 0xbbbe,
-	0x003e, 0x00ee, 0x002e, 0x001e, 0x0005, 0x0096, 0x0126, 0x2091,
-	0x8000, 0xb8a4, 0x904d, 0x0578, 0xa900, 0x81ff, 0x15c0, 0xaa04,
-	0x9282, 0x0010, 0x16c8, 0x0136, 0x0146, 0x01c6, 0x01d6, 0x8906,
-	0x8006, 0x8007, 0x908c, 0x003f, 0x21e0, 0x9084, 0xffc0, 0x9080,
-	0x0004, 0x2098, 0x2009, 0x0010, 0x20a9, 0x0001, 0x4002, 0x9086,
-	0xffff, 0x0120, 0x8109, 0x1dd0, 0x080c, 0x0db4, 0x3c00, 0x20e8,
-	0x3300, 0x8001, 0x20a0, 0x4604, 0x8210, 0xaa06, 0x01de, 0x01ce,
-	0x014e, 0x013e, 0x0060, 0x080c, 0x0feb, 0x0170, 0x2900, 0xb8a6,
-	0xa803, 0x0000, 0x080c, 0x6412, 0xa807, 0x0001, 0xae12, 0x9085,
-	0x0001, 0x012e, 0x009e, 0x0005, 0x9006, 0x0cd8, 0x0126, 0x2091,
-	0x8000, 0x0096, 0xb8a4, 0x904d, 0x0188, 0xa800, 0x9005, 0x1150,
-	0x080c, 0x6421, 0x1158, 0xa804, 0x908a, 0x0002, 0x0218, 0x8001,
-	0xa806, 0x0020, 0x080c, 0x101d, 0xb8a7, 0x0000, 0x009e, 0x012e,
-	0x0005, 0x0126, 0x2091, 0x8000, 0x080c, 0x8415, 0x012e, 0x0005,
-	0x901e, 0x0010, 0x2019, 0x0001, 0x900e, 0x0126, 0x2091, 0x8000,
-	0xb84c, 0x2048, 0xb800, 0xd0dc, 0x1170, 0x89ff, 0x0500, 0x83ff,
-	0x0120, 0xa878, 0x9606, 0x0158, 0x0030, 0xa86c, 0x9406, 0x1118,
-	0xa870, 0x9506, 0x0120, 0x2908, 0xa800, 0x2048, 0x0c70, 0x080c,
-	0x979a, 0xaa00, 0xb84c, 0x9906, 0x1110, 0xba4e, 0x0020, 0x00a6,
-	0x2150, 0xb202, 0x00ae, 0x82ff, 0x1110, 0xb952, 0x89ff, 0x012e,
-	0x0005, 0x9016, 0x0489, 0x1110, 0x2011, 0x0001, 0x0005, 0x080c,
-	0x6476, 0x0128, 0x080c, 0xbbf8, 0x0010, 0x9085, 0x0001, 0x0005,
-	0x080c, 0x6476, 0x0128, 0x080c, 0xbb9d, 0x0010, 0x9085, 0x0001,
-	0x0005, 0x080c, 0x6476, 0x0128, 0x080c, 0xbbf5, 0x0010, 0x9085,
-	0x0001, 0x0005, 0x080c, 0x6476, 0x0128, 0x080c, 0xbbbc, 0x0010,
-	0x9085, 0x0001, 0x0005, 0x080c, 0x6476, 0x0128, 0x080c, 0xbc39,
-	0x0010, 0x9085, 0x0001, 0x0005, 0xb8a4, 0x900d, 0x1118, 0x9085,
-	0x0001, 0x0005, 0x0136, 0x01c6, 0xa800, 0x9005, 0x11b8, 0x890e,
+	0x7097, 0x000a, 0x00b1, 0x0098, 0x9005, 0x1178, 0x7a38, 0xd2fc,
+	0x0128, 0x70c0, 0x9005, 0x1110, 0x70c3, 0x0001, 0x7093, 0x0000,
+	0x7097, 0x000e, 0x080c, 0x5a5c, 0x0010, 0x080c, 0x5ee1, 0x00fe,
+	0x0005, 0x00f6, 0x7097, 0x000b, 0x2011, 0x1c0e, 0x20e9, 0x0001,
+	0x22a0, 0x20a9, 0x0040, 0x2019, 0xffff, 0x4304, 0x080c, 0x5e89,
+	0x2079, 0x0240, 0x7833, 0x1106, 0x7837, 0x0000, 0x080c, 0x5ee8,
+	0x0118, 0x2013, 0x0000, 0x0020, 0x705c, 0x9085, 0x0100, 0x2012,
+	0x20a9, 0x0040, 0x2009, 0x024e, 0x2011, 0x1c0e, 0x220e, 0x8210,
+	0x8108, 0x9186, 0x0260, 0x1128, 0x6810, 0x8000, 0x6812, 0x2009,
+	0x0240, 0x1f04, 0x59de, 0x60c3, 0x0084, 0x080c, 0x5dbe, 0x00fe,
+	0x0005, 0x00f6, 0x708c, 0x9005, 0x01c0, 0x2011, 0x5d94, 0x080c,
+	0x82da, 0x9086, 0x0084, 0x1178, 0x080c, 0x5f05, 0x2079, 0x0260,
+	0x7a30, 0x9296, 0x1106, 0x1138, 0x7834, 0x9005, 0x1120, 0x7097,
+	0x000c, 0x0029, 0x0010, 0x080c, 0x5ee1, 0x00fe, 0x0005, 0x00f6,
+	0x7097, 0x000d, 0x080c, 0x5e89, 0x2079, 0x0240, 0x7833, 0x1107,
+	0x7837, 0x0000, 0x080c, 0x5f05, 0x20a9, 0x0040, 0x2011, 0x026e,
+	0x2009, 0x024e, 0x220e, 0x8210, 0x8108, 0x9186, 0x0260, 0x1150,
+	0x6810, 0x8000, 0x6812, 0x2009, 0x0240, 0x6814, 0x8000, 0x6816,
+	0x2011, 0x0260, 0x1f04, 0x5a22, 0x60c3, 0x0084, 0x080c, 0x5dbe,
+	0x00fe, 0x0005, 0x00f6, 0x708c, 0x9005, 0x01e0, 0x2011, 0x5d94,
+	0x080c, 0x82da, 0x9086, 0x0084, 0x1198, 0x080c, 0x5f05, 0x2079,
+	0x0260, 0x7a30, 0x9296, 0x1107, 0x1158, 0x7834, 0x9005, 0x1140,
+	0x7093, 0x0001, 0x080c, 0x5e5b, 0x7097, 0x000e, 0x0029, 0x0010,
+	0x080c, 0x5ee1, 0x00fe, 0x0005, 0x918d, 0x0001, 0x080c, 0x5f30,
+	0x7097, 0x000f, 0x708f, 0x0000, 0x2061, 0x0140, 0x605b, 0xbc85,
+	0x605f, 0xb5b5, 0x2061, 0x0100, 0x6043, 0x0005, 0x6043, 0x0004,
+	0x2009, 0x07d0, 0x2011, 0x5d94, 0x080c, 0x82ce, 0x0005, 0x708c,
+	0x9005, 0x0130, 0x2011, 0x5d94, 0x080c, 0x82da, 0x7097, 0x0000,
+	0x0005, 0x7097, 0x0011, 0x080c, 0x9eeb, 0x080c, 0x5f05, 0x20e1,
+	0x0000, 0x2099, 0x0260, 0x20e9, 0x0000, 0x20a1, 0x0240, 0x748c,
+	0x9480, 0x0018, 0x9080, 0x0007, 0x9084, 0x03f8, 0x8004, 0x20a8,
+	0x4003, 0x080c, 0x5ee8, 0x11a0, 0x7178, 0x81ff, 0x0188, 0x900e,
+	0x707c, 0x9084, 0x00ff, 0x0160, 0x080c, 0x276e, 0x9186, 0x007e,
+	0x0138, 0x9186, 0x0080, 0x0120, 0x2011, 0x0008, 0x080c, 0x5d41,
+	0x60c3, 0x0014, 0x080c, 0x5dbe, 0x0005, 0x00f6, 0x708c, 0x9005,
+	0x0500, 0x2011, 0x5d94, 0x080c, 0x82da, 0x9086, 0x0014, 0x11b8,
+	0x080c, 0x5f05, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1103, 0x1178,
+	0x7834, 0x9005, 0x1160, 0x7a38, 0xd2fc, 0x0128, 0x70c0, 0x9005,
+	0x1110, 0x70c3, 0x0001, 0x7097, 0x0012, 0x0029, 0x0010, 0x708f,
+	0x0000, 0x00fe, 0x0005, 0x00f6, 0x7097, 0x0013, 0x080c, 0x5e97,
+	0x2079, 0x0240, 0x7833, 0x1103, 0x7837, 0x0000, 0x080c, 0x5f05,
+	0x080c, 0x5ee8, 0x1170, 0x7080, 0x9005, 0x1158, 0x7158, 0x9186,
+	0xffff, 0x0138, 0x2011, 0x0008, 0x080c, 0x5d41, 0x0168, 0x080c,
+	0x5ebe, 0x20a9, 0x0008, 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9,
+	0x0000, 0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014, 0x080c, 0x5dbe,
+	0x00fe, 0x0005, 0x00f6, 0x708c, 0x9005, 0x0500, 0x2011, 0x5d94,
+	0x080c, 0x82da, 0x9086, 0x0014, 0x11b8, 0x080c, 0x5f05, 0x2079,
+	0x0260, 0x7a30, 0x9296, 0x1104, 0x1178, 0x7834, 0x9005, 0x1160,
+	0x7a38, 0xd2fc, 0x0128, 0x70c0, 0x9005, 0x1110, 0x70c3, 0x0001,
+	0x7097, 0x0014, 0x0029, 0x0010, 0x708f, 0x0000, 0x00fe, 0x0005,
+	0x00f6, 0x7097, 0x0015, 0x080c, 0x5e97, 0x2079, 0x0240, 0x7833,
+	0x1104, 0x7837, 0x0000, 0x080c, 0x5f05, 0x080c, 0x5ee8, 0x11b8,
+	0x7080, 0x9005, 0x11a0, 0x7160, 0x9186, 0xffff, 0x0180, 0x9180,
+	0x32e9, 0x200d, 0x918c, 0xff00, 0x810f, 0x2011, 0x0008, 0x080c,
+	0x5d41, 0x0180, 0x080c, 0x4ed8, 0x0110, 0x080c, 0x27d7, 0x20a9,
+	0x0008, 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9, 0x0000, 0x20a1,
+	0x024e, 0x4003, 0x60c3, 0x0014, 0x080c, 0x5dbe, 0x00fe, 0x0005,
+	0x00f6, 0x708c, 0x9005, 0x05f0, 0x2011, 0x5d94, 0x080c, 0x82da,
+	0x9086, 0x0014, 0x15a8, 0x080c, 0x5f05, 0x2079, 0x0260, 0x7a30,
+	0x9296, 0x1105, 0x1568, 0x7834, 0x9084, 0x0100, 0x2011, 0x0100,
+	0x921e, 0x1168, 0x9085, 0x0001, 0x080c, 0x5f30, 0x7a38, 0xd2fc,
+	0x0128, 0x70c0, 0x9005, 0x1110, 0x70c3, 0x0001, 0x0080, 0x9005,
+	0x11b8, 0x7a38, 0xd2fc, 0x0128, 0x70c0, 0x9005, 0x1110, 0x70c3,
+	0x0001, 0x9085, 0x0001, 0x080c, 0x5f30, 0x7093, 0x0000, 0x7a38,
+	0xd2f4, 0x0110, 0x70db, 0x0008, 0x7097, 0x0016, 0x0029, 0x0010,
+	0x708f, 0x0000, 0x00fe, 0x0005, 0x080c, 0x9eeb, 0x080c, 0x5f05,
+	0x20e1, 0x0000, 0x2099, 0x0260, 0x20e9, 0x0000, 0x20a1, 0x0240,
+	0x20a9, 0x000e, 0x4003, 0x2011, 0x026d, 0x2204, 0x9084, 0x0100,
+	0x2011, 0x024d, 0x2012, 0x2011, 0x026e, 0x7097, 0x0017, 0x080c,
+	0x5ee8, 0x1150, 0x7080, 0x9005, 0x1138, 0x080c, 0x5cb4, 0x1188,
+	0x9085, 0x0001, 0x080c, 0x27d7, 0x20a9, 0x0008, 0x080c, 0x5f05,
+	0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9, 0x0000, 0x20a1, 0x024e,
+	0x4003, 0x60c3, 0x0014, 0x080c, 0x5dbe, 0x0010, 0x080c, 0x580e,
+	0x0005, 0x00f6, 0x708c, 0x9005, 0x01d8, 0x2011, 0x5d94, 0x080c,
+	0x82da, 0x9086, 0x0084, 0x1190, 0x080c, 0x5f05, 0x2079, 0x0260,
+	0x7a30, 0x9296, 0x1106, 0x1150, 0x7834, 0x9005, 0x1138, 0x9006,
+	0x080c, 0x5f30, 0x7097, 0x0018, 0x0029, 0x0010, 0x708f, 0x0000,
+	0x00fe, 0x0005, 0x00f6, 0x7097, 0x0019, 0x080c, 0x5e97, 0x2079,
+	0x0240, 0x7833, 0x1106, 0x7837, 0x0000, 0x080c, 0x5f05, 0x2009,
+	0x026e, 0x2039, 0x1c0e, 0x20a9, 0x0040, 0x213e, 0x8738, 0x8108,
+	0x9186, 0x0280, 0x1128, 0x6814, 0x8000, 0x6816, 0x2009, 0x0260,
+	0x1f04, 0x5c1d, 0x2039, 0x1c0e, 0x080c, 0x5ee8, 0x11e8, 0x2728,
+	0x2514, 0x8207, 0x9084, 0x00ff, 0x8000, 0x2018, 0x9294, 0x00ff,
+	0x8007, 0x9205, 0x202a, 0x705c, 0x2310, 0x8214, 0x92a0, 0x1c0e,
+	0x2414, 0x938c, 0x0001, 0x0118, 0x9294, 0xff00, 0x0018, 0x9294,
+	0x00ff, 0x8007, 0x9215, 0x2222, 0x20a9, 0x0040, 0x2009, 0x024e,
+	0x270e, 0x8738, 0x8108, 0x9186, 0x0260, 0x1128, 0x6810, 0x8000,
+	0x6812, 0x2009, 0x0240, 0x1f04, 0x5c50, 0x60c3, 0x0084, 0x080c,
+	0x5dbe, 0x00fe, 0x0005, 0x00f6, 0x708c, 0x9005, 0x01e0, 0x2011,
+	0x5d94, 0x080c, 0x82da, 0x9086, 0x0084, 0x1198, 0x080c, 0x5f05,
+	0x2079, 0x0260, 0x7a30, 0x9296, 0x1107, 0x1158, 0x7834, 0x9005,
+	0x1140, 0x7093, 0x0001, 0x080c, 0x5e5b, 0x7097, 0x001a, 0x0029,
+	0x0010, 0x708f, 0x0000, 0x00fe, 0x0005, 0x9085, 0x0001, 0x080c,
+	0x5f30, 0x7097, 0x001b, 0x080c, 0x9eeb, 0x080c, 0x5f05, 0x2011,
+	0x0260, 0x2009, 0x0240, 0x748c, 0x9480, 0x0018, 0x9080, 0x0007,
+	0x9084, 0x03f8, 0x8004, 0x20a8, 0x220e, 0x8210, 0x8108, 0x9186,
+	0x0260, 0x1150, 0x6810, 0x8000, 0x6812, 0x2009, 0x0240, 0x6814,
+	0x8000, 0x6816, 0x2011, 0x0260, 0x1f04, 0x5c9c, 0x60c3, 0x0084,
+	0x080c, 0x5dbe, 0x0005, 0x0005, 0x0086, 0x0096, 0x2029, 0x185c,
+	0x252c, 0x20a9, 0x0008, 0x2041, 0x1c0e, 0x20e9, 0x0001, 0x28a0,
+	0x080c, 0x5f05, 0x20e1, 0x0000, 0x2099, 0x026e, 0x4003, 0x20a9,
+	0x0008, 0x2011, 0x0007, 0xd5d4, 0x0108, 0x9016, 0x2800, 0x9200,
+	0x200c, 0x91a6, 0xffff, 0x1148, 0xd5d4, 0x0110, 0x8210, 0x0008,
+	0x8211, 0x1f04, 0x5cce, 0x0804, 0x5d3d, 0x82ff, 0x1160, 0xd5d4,
+	0x0120, 0x91a6, 0x3fff, 0x0d90, 0x0020, 0x91a6, 0x3fff, 0x0904,
+	0x5d3d, 0x918d, 0xc000, 0x20a9, 0x0010, 0x2019, 0x0001, 0xd5d4,
+	0x0110, 0x2019, 0x0010, 0x2120, 0xd5d4, 0x0110, 0x8423, 0x0008,
+	0x8424, 0x1240, 0xd5d4, 0x0110, 0x8319, 0x0008, 0x8318, 0x1f04,
+	0x5cf4, 0x04d8, 0x23a8, 0x2021, 0x0001, 0x8426, 0x8425, 0x1f04,
+	0x5d06, 0x2328, 0x8529, 0x92be, 0x0007, 0x0158, 0x0006, 0x2039,
+	0x0007, 0x2200, 0x973a, 0x000e, 0x27a8, 0x95a8, 0x0010, 0x1f04,
+	0x5d15, 0x755a, 0x95c8, 0x32e9, 0x292d, 0x95ac, 0x00ff, 0x757e,
+	0x6532, 0x6536, 0x0016, 0x2508, 0x080c, 0x27b7, 0x001e, 0x60e7,
+	0x0000, 0x65ea, 0x2018, 0x2304, 0x9405, 0x201a, 0x7083, 0x0001,
+	0x20e9, 0x0000, 0x20a1, 0x024e, 0x20e1, 0x0001, 0x2898, 0x20a9,
+	0x0008, 0x4003, 0x9085, 0x0001, 0x0008, 0x9006, 0x009e, 0x008e,
+	0x0005, 0x0156, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x22a8, 0x20e1,
+	0x0000, 0x2099, 0x026e, 0x20e9, 0x0000, 0x2011, 0x024e, 0x22a0,
+	0x4003, 0x014e, 0x013e, 0x01de, 0x01ce, 0x015e, 0x2118, 0x9026,
+	0x2001, 0x0007, 0x939a, 0x0010, 0x0218, 0x8420, 0x8001, 0x0cd0,
+	0x2118, 0x84ff, 0x0120, 0x939a, 0x0010, 0x8421, 0x1de0, 0x2021,
+	0x0001, 0x83ff, 0x0118, 0x8423, 0x8319, 0x1de8, 0x9238, 0x2029,
+	0x026e, 0x9528, 0x2504, 0x942c, 0x11b8, 0x9405, 0x203a, 0x715a,
+	0x91a0, 0x32e9, 0x242d, 0x95ac, 0x00ff, 0x757e, 0x6532, 0x6536,
+	0x0016, 0x2508, 0x080c, 0x27b7, 0x001e, 0x60e7, 0x0000, 0x65ea,
+	0x7083, 0x0001, 0x9084, 0x0000, 0x0005, 0x00e6, 0x2071, 0x1800,
+	0x7087, 0x0000, 0x00ee, 0x0005, 0x00e6, 0x00f6, 0x2079, 0x0100,
+	0x2071, 0x0140, 0x080c, 0x5e4a, 0x080c, 0x9656, 0x7004, 0x9084,
+	0x4000, 0x0110, 0x080c, 0x2c98, 0x0126, 0x2091, 0x8000, 0x2071,
+	0x1825, 0x2073, 0x0000, 0x7840, 0x0026, 0x0016, 0x2009, 0x00f7,
+	0x080c, 0x5ea7, 0x001e, 0x9094, 0x0010, 0x9285, 0x0080, 0x7842,
+	0x7a42, 0x002e, 0x012e, 0x00fe, 0x00ee, 0x0005, 0x0126, 0x2091,
+	0x8000, 0x080c, 0x2afe, 0x0228, 0x2011, 0x0101, 0x2204, 0xc0c5,
+	0x2012, 0x2011, 0x19c9, 0x2013, 0x0000, 0x708f, 0x0000, 0x012e,
+	0x60a3, 0x0056, 0x60a7, 0x9575, 0x080c, 0x964d, 0x6144, 0xd184,
+	0x0120, 0x7194, 0x918d, 0x2000, 0x0018, 0x7188, 0x918d, 0x1000,
+	0x2011, 0x1971, 0x2112, 0x2009, 0x07d0, 0x2011, 0x5d94, 0x080c,
+	0x836c, 0x0005, 0x0016, 0x0026, 0x00c6, 0x0126, 0x2091, 0x8000,
+	0x080c, 0xa069, 0x2009, 0x00f7, 0x080c, 0x5ea7, 0x2061, 0x19d2,
+	0x900e, 0x611a, 0x611e, 0x6172, 0x6176, 0x2061, 0x1800, 0x6003,
+	0x0001, 0x2061, 0x0100, 0x6043, 0x0090, 0x6043, 0x0010, 0x2009,
+	0x1971, 0x200b, 0x0000, 0x2009, 0x002d, 0x2011, 0x5e16, 0x080c,
+	0x82ce, 0x012e, 0x00ce, 0x002e, 0x001e, 0x0005, 0x00e6, 0x0006,
+	0x0126, 0x2091, 0x8000, 0x0471, 0x2071, 0x0100, 0x080c, 0x9656,
+	0x2071, 0x0140, 0x7004, 0x9084, 0x4000, 0x0110, 0x080c, 0x2c98,
+	0x080c, 0x720f, 0x0188, 0x080c, 0x722a, 0x1170, 0x080c, 0x750e,
+	0x0016, 0x080c, 0x2886, 0x2001, 0x1945, 0x2102, 0x001e, 0x080c,
+	0x7509, 0x080c, 0x7127, 0x0050, 0x2009, 0x0001, 0x080c, 0x2bb6,
+	0x2001, 0x0001, 0x080c, 0x2717, 0x080c, 0x5dea, 0x012e, 0x000e,
+	0x00ee, 0x0005, 0x2001, 0x180e, 0x2004, 0xd0bc, 0x0158, 0x0026,
+	0x0036, 0x2011, 0x8017, 0x2001, 0x1971, 0x201c, 0x080c, 0x4b1f,
+	0x003e, 0x002e, 0x0005, 0x20a9, 0x0012, 0x20e9, 0x0001, 0x20a1,
+	0x1c80, 0x080c, 0x5f05, 0x20e9, 0x0000, 0x2099, 0x026e, 0x0099,
+	0x20a9, 0x0020, 0x080c, 0x5eff, 0x2099, 0x0260, 0x20a1, 0x1c92,
+	0x0051, 0x20a9, 0x000e, 0x080c, 0x5f02, 0x2099, 0x0260, 0x20a1,
+	0x1cb2, 0x0009, 0x0005, 0x0016, 0x0026, 0x3410, 0x3308, 0x2104,
+	0x8007, 0x2012, 0x8108, 0x8210, 0x1f04, 0x5e7f, 0x002e, 0x001e,
+	0x0005, 0x080c, 0x9eeb, 0x20e1, 0x0001, 0x2099, 0x1c00, 0x20e9,
+	0x0000, 0x20a1, 0x0240, 0x20a9, 0x000c, 0x4003, 0x0005, 0x080c,
+	0x9eeb, 0x080c, 0x5f05, 0x20e1, 0x0000, 0x2099, 0x0260, 0x20e9,
+	0x0000, 0x20a1, 0x0240, 0x20a9, 0x000c, 0x4003, 0x0005, 0x00c6,
+	0x0006, 0x2061, 0x0100, 0x810f, 0x2001, 0x1833, 0x2004, 0x9005,
+	0x1138, 0x2001, 0x1817, 0x2004, 0x9084, 0x00ff, 0x9105, 0x0010,
+	0x9185, 0x00f7, 0x604a, 0x000e, 0x00ce, 0x0005, 0x0016, 0x0046,
+	0x080c, 0x67bf, 0x0158, 0x9006, 0x2020, 0x2009, 0x002a, 0x080c,
+	0xd885, 0x2001, 0x180c, 0x200c, 0xc195, 0x2102, 0x2019, 0x002a,
+	0x900e, 0x080c, 0x3156, 0x080c, 0xc539, 0x0140, 0x0036, 0x2019,
+	0xffff, 0x2021, 0x0007, 0x080c, 0x4cbc, 0x003e, 0x004e, 0x001e,
+	0x0005, 0x080c, 0x5dea, 0x7097, 0x0000, 0x708f, 0x0000, 0x0005,
+	0x0006, 0x2001, 0x180c, 0x2004, 0xd09c, 0x0100, 0x000e, 0x0005,
+	0x0006, 0x0016, 0x0126, 0x2091, 0x8000, 0x2001, 0x0101, 0x200c,
+	0x918d, 0x0006, 0x2102, 0x012e, 0x001e, 0x000e, 0x0005, 0x2009,
+	0x0001, 0x0020, 0x2009, 0x0002, 0x0008, 0x900e, 0x6814, 0x9084,
+	0xffc0, 0x910d, 0x6916, 0x0005, 0x00f6, 0x0156, 0x0146, 0x01d6,
+	0x9006, 0x20a9, 0x0080, 0x20e9, 0x0001, 0x20a1, 0x1c00, 0x4004,
+	0x2079, 0x1c00, 0x7803, 0x2200, 0x7807, 0x00ef, 0x780f, 0x00ef,
+	0x7813, 0x0138, 0x7823, 0xffff, 0x7827, 0xffff, 0x01de, 0x014e,
+	0x015e, 0x00fe, 0x0005, 0x2001, 0x1800, 0x2003, 0x0001, 0x0005,
+	0x2001, 0x197e, 0x0118, 0x2003, 0x0001, 0x0010, 0x2003, 0x0000,
+	0x0005, 0x0156, 0x20a9, 0x0800, 0x2009, 0x1000, 0x9006, 0x200a,
+	0x8108, 0x1f04, 0x5f3f, 0x015e, 0x0005, 0x00d6, 0x0036, 0x0156,
+	0x0136, 0x0146, 0x2069, 0x185b, 0x9006, 0xb802, 0xb8be, 0xb807,
+	0x0707, 0xb80a, 0xb80e, 0xb812, 0x9198, 0x32e9, 0x231d, 0x939c,
+	0x00ff, 0xbb16, 0x0016, 0x0026, 0xb8b2, 0x080c, 0xa062, 0x1120,
+	0x9192, 0x007e, 0x1208, 0xbbb2, 0x20a9, 0x0004, 0xb8b4, 0x20e8,
+	0xb9b8, 0x9198, 0x0006, 0x9006, 0x23a0, 0x4004, 0x20a9, 0x0004,
+	0x9198, 0x000a, 0x23a0, 0x4004, 0x002e, 0x001e, 0xb83e, 0xb842,
+	0xb84e, 0xb852, 0xb856, 0xb85a, 0xb85e, 0xb862, 0xb866, 0xb86a,
+	0xb86f, 0x0100, 0xb872, 0xb876, 0xb87a, 0xb88a, 0xb88e, 0xb893,
+	0x0008, 0xb896, 0xb89a, 0xb89e, 0xb8ae, 0xb9a2, 0x0096, 0xb8a4,
+	0x904d, 0x0110, 0x080c, 0x1063, 0xb8a7, 0x0000, 0x009e, 0x9006,
+	0xb84a, 0x6810, 0xb83a, 0x680c, 0xb846, 0x6814, 0x9084, 0x00ff,
+	0xb842, 0x014e, 0x013e, 0x015e, 0x003e, 0x00de, 0x0005, 0x0126,
+	0x2091, 0x8000, 0xa974, 0xae78, 0x9684, 0x3fff, 0x9082, 0x4000,
+	0x1a04, 0x6015, 0x9182, 0x0800, 0x1a04, 0x6019, 0x2001, 0x180c,
+	0x2004, 0x9084, 0x0003, 0x1904, 0x601f, 0x9188, 0x1000, 0x2104,
+	0x905d, 0x0518, 0xb804, 0x9084, 0x00ff, 0x908e, 0x0006, 0x1508,
+	0xb8a4, 0x900d, 0x1904, 0x6031, 0xb850, 0x900d, 0x1148, 0xa802,
+	0x2900, 0xb852, 0xb84e, 0x080c, 0x8696, 0x9006, 0x012e, 0x0005,
+	0x00a6, 0x2150, 0x2900, 0xb002, 0xa803, 0x0000, 0x00ae, 0xb852,
+	0x0c90, 0x2001, 0x0005, 0x900e, 0x04b8, 0x2001, 0x0028, 0x900e,
+	0x0498, 0x9082, 0x0006, 0x1290, 0x080c, 0xa062, 0x1160, 0xb8a0,
+	0x9084, 0xff80, 0x1140, 0xb900, 0xd1fc, 0x0990, 0x2001, 0x0029,
+	0x2009, 0x1000, 0x0408, 0x2001, 0x0028, 0x00a8, 0x2009, 0x180c,
+	0x210c, 0xd18c, 0x0118, 0x2001, 0x0004, 0x0068, 0xd184, 0x0118,
+	0x2001, 0x0004, 0x0040, 0x2001, 0x0029, 0xb900, 0xd1fc, 0x0118,
+	0x2009, 0x1000, 0x0048, 0x900e, 0x0038, 0x2001, 0x0029, 0x900e,
+	0x0018, 0x2001, 0x0029, 0x900e, 0x9005, 0x012e, 0x0005, 0x2001,
+	0x180c, 0x2004, 0xd084, 0x19d0, 0x9188, 0x1000, 0x2104, 0x905d,
+	0x09a8, 0x080c, 0x67c3, 0x1990, 0xb800, 0xd0bc, 0x0978, 0x0804,
+	0x5fc8, 0x080c, 0x663b, 0x0904, 0x5fe1, 0x0804, 0x5fcc, 0x00b6,
+	0x00e6, 0x0126, 0x2091, 0x8000, 0xa974, 0x9182, 0x0800, 0x1a04,
+	0x60b5, 0x9188, 0x1000, 0x2104, 0x905d, 0x0904, 0x608d, 0xb8a0,
+	0x9086, 0x007f, 0x0190, 0xa87c, 0xd0fc, 0x1178, 0x080c, 0x67cb,
+	0x0160, 0xa994, 0x81ff, 0x0130, 0x908e, 0x0004, 0x0130, 0x908e,
+	0x0005, 0x0118, 0x080c, 0x67c3, 0x1598, 0xa87c, 0xd0fc, 0x01e0,
+	0xa894, 0x9005, 0x01c8, 0x2060, 0x0026, 0x2010, 0x080c, 0xbe25,
+	0x002e, 0x1120, 0x2001, 0x0008, 0x0804, 0x60b7, 0x6020, 0x9086,
+	0x000a, 0x0120, 0x2001, 0x0008, 0x0804, 0x60b7, 0x601a, 0x6003,
+	0x0008, 0x2900, 0x6016, 0x0058, 0x080c, 0xa08d, 0x05e8, 0x2b00,
+	0x6012, 0x2900, 0x6016, 0x600b, 0xffff, 0x6023, 0x000a, 0x2009,
+	0x0003, 0x080c, 0xa15d, 0x9006, 0x0458, 0x2001, 0x0028, 0x0438,
+	0x9082, 0x0006, 0x1290, 0x080c, 0xa062, 0x1160, 0xb8a0, 0x9084,
+	0xff80, 0x1140, 0xb900, 0xd1fc, 0x0900, 0x2001, 0x0029, 0x2009,
+	0x1000, 0x00a8, 0x2001, 0x0028, 0x0090, 0x2009, 0x180c, 0x210c,
+	0xd18c, 0x0118, 0x2001, 0x0004, 0x0050, 0xd184, 0x0118, 0x2001,
+	0x0004, 0x0028, 0x2001, 0x0029, 0x0010, 0x2001, 0x0029, 0x9005,
+	0x012e, 0x00ee, 0x00be, 0x0005, 0x2001, 0x002c, 0x0cc0, 0x00f6,
+	0x00b6, 0x0126, 0x2091, 0x8000, 0xa8e0, 0x9005, 0x1550, 0xa8dc,
+	0x9082, 0x0101, 0x1630, 0xa8c8, 0x9005, 0x1518, 0xa8c4, 0x9082,
+	0x0101, 0x12f8, 0xa974, 0x2079, 0x1800, 0x9182, 0x0800, 0x12e8,
+	0x7830, 0x9084, 0x0003, 0x1130, 0xaa98, 0xab94, 0xa878, 0x9084,
+	0x0007, 0x00ea, 0x7930, 0xd18c, 0x0118, 0x2001, 0x0004, 0x0038,
+	0xd184, 0x0118, 0x2001, 0x0004, 0x0010, 0x2001, 0x0029, 0x900e,
+	0x0038, 0x2001, 0x002c, 0x900e, 0x0018, 0x2001, 0x0029, 0x900e,
+	0x9006, 0x0008, 0x9005, 0x012e, 0x00be, 0x00fe, 0x0005, 0x614c,
+	0x6107, 0x611e, 0x614c, 0x614c, 0x614c, 0x614c, 0x614c, 0x2100,
+	0x9082, 0x007e, 0x1278, 0x080c, 0x643f, 0x0148, 0x9046, 0xb810,
+	0x9306, 0x1904, 0x6154, 0xb814, 0x9206, 0x15f0, 0x0028, 0xbb12,
+	0xba16, 0x0010, 0x080c, 0x49d9, 0x0150, 0x04b0, 0x080c, 0x649f,
+	0x1598, 0xb810, 0x9306, 0x1580, 0xb814, 0x9206, 0x1568, 0x080c,
+	0xa08d, 0x0530, 0x2b00, 0x6012, 0x080c, 0xc2b3, 0x2900, 0x6016,
+	0x600b, 0xffff, 0x6023, 0x000a, 0xa878, 0x9086, 0x0001, 0x1170,
+	0x080c, 0x318b, 0x9006, 0x080c, 0x63dc, 0x2001, 0x0002, 0x080c,
+	0x63f0, 0x2001, 0x0200, 0xb86e, 0xb893, 0x0002, 0x2009, 0x0003,
+	0x080c, 0xa15d, 0x9006, 0x0068, 0x2001, 0x0001, 0x900e, 0x0038,
+	0x2001, 0x002c, 0x900e, 0x0018, 0x2001, 0x0028, 0x900e, 0x9005,
+	0x0000, 0x012e, 0x00be, 0x00fe, 0x0005, 0x00b6, 0x00f6, 0x00e6,
+	0x0126, 0x2091, 0x8000, 0xa894, 0x90c6, 0x0015, 0x0904, 0x632d,
+	0x90c6, 0x0056, 0x0904, 0x6331, 0x90c6, 0x0066, 0x0904, 0x6335,
+	0x90c6, 0x0067, 0x0904, 0x6339, 0x90c6, 0x0068, 0x0904, 0x633d,
+	0x90c6, 0x0071, 0x0904, 0x6341, 0x90c6, 0x0074, 0x0904, 0x6345,
+	0x90c6, 0x007c, 0x0904, 0x6349, 0x90c6, 0x007e, 0x0904, 0x634d,
+	0x90c6, 0x0037, 0x0904, 0x6351, 0x9016, 0x2079, 0x1800, 0xa974,
+	0x9186, 0x00ff, 0x0904, 0x6328, 0x9182, 0x0800, 0x1a04, 0x6328,
+	0x080c, 0x649f, 0x1198, 0xb804, 0x9084, 0x00ff, 0x9082, 0x0006,
+	0x1268, 0xa894, 0x90c6, 0x006f, 0x0148, 0x080c, 0xa062, 0x1904,
+	0x6311, 0xb8a0, 0x9084, 0xff80, 0x1904, 0x6311, 0xa894, 0x90c6,
+	0x006f, 0x0158, 0x90c6, 0x005e, 0x0904, 0x6271, 0x90c6, 0x0064,
+	0x0904, 0x629a, 0x2008, 0x0804, 0x6234, 0xa998, 0xa8b0, 0x2040,
+	0x080c, 0xa062, 0x1120, 0x9182, 0x007f, 0x0a04, 0x6234, 0x9186,
+	0x00ff, 0x0904, 0x6234, 0x9182, 0x0800, 0x1a04, 0x6234, 0xaaa0,
+	0xab9c, 0x7878, 0x9306, 0x11a8, 0x787c, 0x0096, 0x924e, 0x1128,
+	0x2208, 0x2310, 0x009e, 0x0804, 0x6234, 0x080c, 0xa062, 0x1140,
+	0x99cc, 0xff00, 0x009e, 0x1128, 0x2208, 0x2310, 0x0804, 0x6234,
+	0x009e, 0x080c, 0x49d9, 0x0904, 0x623d, 0x900e, 0x9016, 0x90c6,
+	0x4000, 0x1558, 0x0006, 0x080c, 0x66bf, 0x1108, 0xc185, 0xb800,
+	0xd0bc, 0x0108, 0xc18d, 0x20a9, 0x0004, 0xa860, 0x20e8, 0xa85c,
+	0x9080, 0x0031, 0x20a0, 0xb8b4, 0x20e0, 0xb8b8, 0x9080, 0x0006,
+	0x2098, 0x080c, 0x0fae, 0x20a9, 0x0004, 0xa860, 0x20e8, 0xa85c,
+	0x9080, 0x0035, 0x20a0, 0xb8b4, 0x20e0, 0xb8b8, 0x9080, 0x000a,
+	0x2098, 0x080c, 0x0fae, 0x000e, 0x00c8, 0x90c6, 0x4007, 0x1110,
+	0x2408, 0x00a0, 0x90c6, 0x4008, 0x1118, 0x2708, 0x2610, 0x0070,
+	0x90c6, 0x4009, 0x1108, 0x0050, 0x90c6, 0x4006, 0x0138, 0x2001,
+	0x4005, 0x2009, 0x000a, 0x0010, 0x2001, 0x4006, 0xa896, 0xa99a,
+	0xaa9e, 0x2001, 0x0030, 0x900e, 0x0470, 0x080c, 0xa08d, 0x1130,
+	0x2001, 0x4005, 0x2009, 0x0003, 0x9016, 0x0c80, 0x2b00, 0x6012,
+	0x080c, 0xc2b3, 0x2900, 0x6016, 0x6023, 0x0001, 0xa868, 0xd88c,
+	0x0108, 0xc0f5, 0xa86a, 0x0126, 0x2091, 0x8000, 0x080c, 0x318b,
+	0x012e, 0x9006, 0x080c, 0x63dc, 0x2001, 0x0002, 0x080c, 0x63f0,
+	0x2009, 0x0002, 0x080c, 0xa15d, 0xa8b0, 0xd094, 0x0118, 0xb8bc,
+	0xc08d, 0xb8be, 0x9006, 0x9005, 0x012e, 0x00ee, 0x00fe, 0x00be,
+	0x0005, 0x080c, 0x55ef, 0x0118, 0x2009, 0x0007, 0x00f8, 0xa998,
+	0xaeb0, 0x080c, 0x649f, 0x1904, 0x622f, 0x9186, 0x007f, 0x0130,
+	0x080c, 0x67c3, 0x0118, 0x2009, 0x0009, 0x0080, 0x0096, 0x080c,
+	0x1031, 0x1120, 0x009e, 0x2009, 0x0002, 0x0040, 0x2900, 0x009e,
+	0xa806, 0x080c, 0xc01f, 0x19b0, 0x2009, 0x0003, 0x2001, 0x4005,
+	0x0804, 0x6236, 0xa998, 0xaeb0, 0x080c, 0x649f, 0x1904, 0x622f,
+	0x0096, 0x080c, 0x1031, 0x1128, 0x009e, 0x2009, 0x0002, 0x0804,
+	0x62ee, 0x2900, 0x009e, 0xa806, 0x0096, 0x2048, 0x20a9, 0x002b,
+	0xb8b4, 0x20e0, 0xb8b8, 0x2098, 0xa860, 0x20e8, 0xa85c, 0x9080,
+	0x0002, 0x20a0, 0x4003, 0x20a9, 0x0008, 0x9080, 0x0006, 0x20a0,
+	0xbbb8, 0x9398, 0x0006, 0x2398, 0x080c, 0x0fae, 0x009e, 0xa87b,
+	0x0000, 0xa883, 0x0000, 0xa897, 0x4000, 0xd684, 0x1168, 0x080c,
+	0x55db, 0xd0b4, 0x1118, 0xa89b, 0x000b, 0x00e0, 0xb800, 0xd08c,
+	0x0118, 0xa89b, 0x000c, 0x00b0, 0x080c, 0x67c3, 0x0118, 0xa89b,
+	0x0009, 0x0080, 0x080c, 0x55ef, 0x0118, 0xa89b, 0x0007, 0x0050,
+	0x080c, 0xc002, 0x1904, 0x626a, 0x2009, 0x0003, 0x2001, 0x4005,
+	0x0804, 0x6236, 0xa87b, 0x0030, 0xa897, 0x4005, 0xa804, 0x8006,
+	0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0002,
+	0x2009, 0x002b, 0xaaa0, 0xab9c, 0xaca8, 0xada4, 0x2031, 0x0000,
+	0x2041, 0x1288, 0x080c, 0xa5e6, 0x1904, 0x626a, 0x2009, 0x0002,
+	0x08e8, 0x2001, 0x0028, 0x900e, 0x0804, 0x626b, 0x2009, 0x180c,
+	0x210c, 0xd18c, 0x0118, 0x2001, 0x0004, 0x0038, 0xd184, 0x0118,
+	0x2001, 0x0004, 0x0010, 0x2001, 0x0029, 0x900e, 0x0804, 0x626b,
+	0x2001, 0x0029, 0x900e, 0x0804, 0x626b, 0x080c, 0x3718, 0x0804,
+	0x626c, 0x080c, 0x5306, 0x0804, 0x626c, 0x080c, 0x455e, 0x0804,
+	0x626c, 0x080c, 0x45d7, 0x0804, 0x626c, 0x080c, 0x4633, 0x0804,
+	0x626c, 0x080c, 0x4a95, 0x0804, 0x626c, 0x080c, 0x4d3e, 0x0804,
+	0x626c, 0x080c, 0x4f6e, 0x0804, 0x626c, 0x080c, 0x5167, 0x0804,
+	0x626c, 0x080c, 0x3941, 0x0804, 0x626c, 0x00b6, 0xa974, 0xae78,
+	0x9684, 0x3fff, 0x9082, 0x4000, 0x1618, 0x9182, 0x0800, 0x1268,
+	0x9188, 0x1000, 0x2104, 0x905d, 0x0140, 0x080c, 0x67c3, 0x1148,
+	0x00e9, 0x080c, 0x65ca, 0x9006, 0x00b0, 0x2001, 0x0028, 0x900e,
+	0x0090, 0x9082, 0x0006, 0x1240, 0xb900, 0xd1fc, 0x0d88, 0x2001,
+	0x0029, 0x2009, 0x1000, 0x0038, 0x2001, 0x0029, 0x900e, 0x0018,
+	0x2001, 0x0029, 0x900e, 0x9005, 0x00be, 0x0005, 0x0126, 0x2091,
+	0x8000, 0xb850, 0x900d, 0x0150, 0x2900, 0x0096, 0x2148, 0xa802,
+	0x009e, 0xa803, 0x0000, 0xb852, 0x012e, 0x0005, 0x2900, 0xb852,
+	0xb84e, 0xa803, 0x0000, 0x0cc0, 0x0126, 0x2091, 0x8000, 0xb84c,
+	0x9005, 0x0170, 0x00e6, 0x2071, 0x19bf, 0x7004, 0x9086, 0x0002,
+	0x0168, 0x00ee, 0xb84c, 0xa802, 0x2900, 0xb84e, 0x012e, 0x0005,
+	0x2900, 0xb852, 0xb84e, 0xa803, 0x0000, 0x0cc0, 0x701c, 0x9b06,
+	0x1d80, 0xb84c, 0x00a6, 0x2050, 0xb000, 0xa802, 0x2900, 0xb002,
+	0x00ae, 0x00ee, 0x012e, 0x0005, 0x0126, 0x2091, 0x8000, 0xb84c,
+	0x904d, 0x0130, 0xa800, 0x9005, 0x1108, 0xb852, 0xb84e, 0x9905,
+	0x012e, 0x0005, 0xb84c, 0x904d, 0x0130, 0xa800, 0x9005, 0x1108,
+	0xb852, 0xb84e, 0x9905, 0x0005, 0x00b6, 0x0126, 0x00c6, 0x0026,
+	0x2091, 0x8000, 0x6210, 0x2258, 0xba00, 0x9005, 0x0110, 0xc285,
+	0x0008, 0xc284, 0xba02, 0x002e, 0x00ce, 0x012e, 0x00be, 0x0005,
+	0x00b6, 0x0126, 0x00c6, 0x2091, 0x8000, 0x6210, 0x2258, 0xba04,
+	0x0006, 0x9086, 0x0006, 0x1170, 0xb89c, 0xd0ac, 0x0158, 0x080c,
+	0x67bf, 0x0140, 0x9284, 0xff00, 0x8007, 0x9086, 0x0007, 0x1110,
+	0x2011, 0x0600, 0x000e, 0x9294, 0xff00, 0x9215, 0xba06, 0x0006,
+	0x9086, 0x0006, 0x1120, 0xba90, 0x82ff, 0x090c, 0x0dfa, 0x000e,
+	0x00ce, 0x012e, 0x00be, 0x0005, 0x00b6, 0x0126, 0x00c6, 0x2091,
+	0x8000, 0x6210, 0x2258, 0xba04, 0x0006, 0x9086, 0x0006, 0x1168,
+	0xb89c, 0xd0a4, 0x0150, 0x080c, 0x67bb, 0x1138, 0x9284, 0x00ff,
+	0x9086, 0x0007, 0x1110, 0x2011, 0x0006, 0x000e, 0x9294, 0x00ff,
+	0x8007, 0x9215, 0xba06, 0x00ce, 0x012e, 0x00be, 0x0005, 0x9182,
+	0x0800, 0x0218, 0x9085, 0x0001, 0x0005, 0x00d6, 0x0026, 0x9190,
+	0x1000, 0x2204, 0x905d, 0x1180, 0x0096, 0x080c, 0x1031, 0x2958,
+	0x009e, 0x0160, 0x2b00, 0x2012, 0xb85c, 0xb8ba, 0xb860, 0xb8b6,
+	0x9006, 0xb8a6, 0x080c, 0x5f45, 0x9006, 0x0010, 0x9085, 0x0001,
+	0x002e, 0x00de, 0x0005, 0x00b6, 0x0096, 0x0126, 0x2091, 0x8000,
+	0x0026, 0x9182, 0x0800, 0x0218, 0x9085, 0x0001, 0x0458, 0x00d6,
+	0x9190, 0x1000, 0x2204, 0x905d, 0x0518, 0x2013, 0x0000, 0xb8a4,
+	0x904d, 0x0110, 0x080c, 0x1063, 0x00d6, 0x00c6, 0xb8ac, 0x2060,
+	0x8cff, 0x0168, 0x600c, 0x0006, 0x6014, 0x2048, 0x080c, 0xbe37,
+	0x0110, 0x080c, 0x0fe3, 0x080c, 0xa0e3, 0x00ce, 0x0c88, 0x00ce,
+	0x00de, 0x2b48, 0xb8b8, 0xb85e, 0xb8b4, 0xb862, 0x080c, 0x1073,
+	0x00de, 0x9006, 0x002e, 0x012e, 0x009e, 0x00be, 0x0005, 0x0016,
+	0x9182, 0x0800, 0x0218, 0x9085, 0x0001, 0x0030, 0x9188, 0x1000,
+	0x2104, 0x905d, 0x0dc0, 0x9006, 0x001e, 0x0005, 0x00d6, 0x0156,
+	0x0136, 0x0146, 0x9006, 0xb80a, 0xb80e, 0xb800, 0xc08c, 0xb802,
+	0x080c, 0x7207, 0x1510, 0xb8a0, 0x9086, 0x007e, 0x0120, 0x080c,
+	0xa062, 0x11d8, 0x0078, 0x7040, 0xd0e4, 0x01b8, 0x00c6, 0x2061,
+	0x195a, 0x7048, 0x2062, 0x704c, 0x6006, 0x7050, 0x600a, 0x7054,
+	0x600e, 0x00ce, 0x703c, 0x2069, 0x0140, 0x9005, 0x1110, 0x2001,
+	0x0001, 0x6886, 0x2069, 0x1800, 0x68b2, 0x7040, 0xb85e, 0x7048,
+	0xb862, 0x704c, 0xb866, 0x20e1, 0x0000, 0x2099, 0x0276, 0xb8b4,
+	0x20e8, 0xb8b8, 0x9088, 0x000a, 0x21a0, 0x20a9, 0x0004, 0x4003,
+	0x2099, 0x027a, 0x9088, 0x0006, 0x21a0, 0x20a9, 0x0004, 0x4003,
+	0x2069, 0x0200, 0x6817, 0x0001, 0x7040, 0xb86a, 0x7144, 0xb96e,
+	0x7048, 0xb872, 0x7050, 0xb876, 0x2069, 0x0200, 0x6817, 0x0000,
+	0xb8a0, 0x9086, 0x007e, 0x1110, 0x7144, 0xb96e, 0x9182, 0x0211,
+	0x1218, 0x2009, 0x0008, 0x0400, 0x9182, 0x0259, 0x1218, 0x2009,
+	0x0007, 0x00d0, 0x9182, 0x02c1, 0x1218, 0x2009, 0x0006, 0x00a0,
+	0x9182, 0x0349, 0x1218, 0x2009, 0x0005, 0x0070, 0x9182, 0x0421,
+	0x1218, 0x2009, 0x0004, 0x0040, 0x9182, 0x0581, 0x1218, 0x2009,
+	0x0003, 0x0010, 0x2009, 0x0002, 0xb992, 0x014e, 0x013e, 0x015e,
+	0x00de, 0x0005, 0x0016, 0x0026, 0x00e6, 0x2071, 0x0260, 0x7034,
+	0xb896, 0x703c, 0xb89a, 0x7054, 0xb89e, 0x0036, 0xbbbc, 0xc384,
+	0xba00, 0x2009, 0x187b, 0x210c, 0xd0bc, 0x0120, 0xd1ec, 0x0110,
+	0xc2ad, 0x0008, 0xc2ac, 0xd0c4, 0x0148, 0xd1e4, 0x0138, 0xc2bd,
+	0xd0cc, 0x0128, 0xd38c, 0x1108, 0xc385, 0x0008, 0xc2bc, 0xba02,
+	0xbbbe, 0x003e, 0x00ee, 0x002e, 0x001e, 0x0005, 0x0096, 0x0126,
+	0x2091, 0x8000, 0xb8a4, 0x904d, 0x0578, 0xa900, 0x81ff, 0x15c0,
+	0xaa04, 0x9282, 0x0010, 0x16c8, 0x0136, 0x0146, 0x01c6, 0x01d6,
+	0x8906, 0x8006, 0x8007, 0x908c, 0x003f, 0x21e0, 0x9084, 0xffc0,
+	0x9080, 0x0004, 0x2098, 0x2009, 0x0010, 0x20a9, 0x0001, 0x4002,
+	0x9086, 0xffff, 0x0120, 0x8109, 0x1dd0, 0x080c, 0x0dfa, 0x3c00,
+	0x20e8, 0x3300, 0x8001, 0x20a0, 0x4604, 0x8210, 0xaa06, 0x01de,
+	0x01ce, 0x014e, 0x013e, 0x0060, 0x080c, 0x1031, 0x0170, 0x2900,
+	0xb8a6, 0xa803, 0x0000, 0x080c, 0x665b, 0xa807, 0x0001, 0xae12,
+	0x9085, 0x0001, 0x012e, 0x009e, 0x0005, 0x9006, 0x0cd8, 0x0126,
+	0x2091, 0x8000, 0x0096, 0xb8a4, 0x904d, 0x0188, 0xa800, 0x9005,
+	0x1150, 0x080c, 0x666a, 0x1158, 0xa804, 0x908a, 0x0002, 0x0218,
+	0x8001, 0xa806, 0x0020, 0x080c, 0x1063, 0xb8a7, 0x0000, 0x009e,
+	0x012e, 0x0005, 0x0126, 0x2091, 0x8000, 0x080c, 0x8696, 0x012e,
+	0x0005, 0x901e, 0x0010, 0x2019, 0x0001, 0x900e, 0x0126, 0x2091,
+	0x8000, 0xb84c, 0x2048, 0xb800, 0xd0dc, 0x1170, 0x89ff, 0x0500,
+	0x83ff, 0x0120, 0xa878, 0x9606, 0x0158, 0x0030, 0xa86c, 0x9406,
+	0x1118, 0xa870, 0x9506, 0x0120, 0x2908, 0xa800, 0x2048, 0x0c70,
+	0x080c, 0x9a4e, 0xaa00, 0xb84c, 0x9906, 0x1110, 0xba4e, 0x0020,
+	0x00a6, 0x2150, 0xb202, 0x00ae, 0x82ff, 0x1110, 0xb952, 0x89ff,
+	0x012e, 0x0005, 0x9016, 0x0489, 0x1110, 0x2011, 0x0001, 0x0005,
+	0x080c, 0x66bf, 0x0128, 0x080c, 0xbef4, 0x0010, 0x9085, 0x0001,
+	0x0005, 0x080c, 0x66bf, 0x0128, 0x080c, 0xbe99, 0x0010, 0x9085,
+	0x0001, 0x0005, 0x080c, 0x66bf, 0x0128, 0x080c, 0xbef1, 0x0010,
+	0x9085, 0x0001, 0x0005, 0x080c, 0x66bf, 0x0128, 0x080c, 0xbeb8,
+	0x0010, 0x9085, 0x0001, 0x0005, 0x080c, 0x66bf, 0x0128, 0x080c,
+	0xbf37, 0x0010, 0x9085, 0x0001, 0x0005, 0xb8a4, 0x900d, 0x1118,
+	0x9085, 0x0001, 0x0005, 0x0136, 0x01c6, 0xa800, 0x9005, 0x11b8,
+	0x890e, 0x810e, 0x810f, 0x9184, 0x003f, 0x20e0, 0x9184, 0xffc0,
+	0x9080, 0x0004, 0x2098, 0x20a9, 0x0001, 0x2009, 0x0010, 0x4002,
+	0x9606, 0x0128, 0x8109, 0x1dd8, 0x9085, 0x0001, 0x0008, 0x9006,
+	0x01ce, 0x013e, 0x0005, 0x0146, 0x01d6, 0xa860, 0x20e8, 0xa85c,
+	0x9080, 0x0004, 0x20a0, 0x20a9, 0x0010, 0x2009, 0xffff, 0x4104,
+	0x01de, 0x014e, 0x0136, 0x01c6, 0xa800, 0x9005, 0x11b8, 0x890e,
 	0x810e, 0x810f, 0x9184, 0x003f, 0x20e0, 0x9184, 0xffc0, 0x9080,
 	0x0004, 0x2098, 0x20a9, 0x0001, 0x2009, 0x0010, 0x4002, 0x9606,
-	0x0128, 0x8109, 0x1dd8, 0x9085, 0x0001, 0x0008, 0x9006, 0x01ce,
-	0x013e, 0x0005, 0x0146, 0x01d6, 0xa860, 0x20e8, 0xa85c, 0x9080,
-	0x0004, 0x20a0, 0x20a9, 0x0010, 0x2009, 0xffff, 0x4104, 0x01de,
-	0x014e, 0x0136, 0x01c6, 0xa800, 0x9005, 0x11b8, 0x890e, 0x810e,
-	0x810f, 0x9184, 0x003f, 0x20e0, 0x9184, 0xffc0, 0x9080, 0x0004,
-	0x2098, 0x20a9, 0x0001, 0x2009, 0x0010, 0x4002, 0x9606, 0x0128,
-	0x8109, 0x1dd8, 0x9085, 0x0001, 0x0068, 0x0146, 0x01d6, 0x3300,
-	0x8001, 0x20a0, 0x3c00, 0x20e8, 0x2001, 0xffff, 0x4004, 0x01de,
-	0x014e, 0x9006, 0x01ce, 0x013e, 0x0005, 0x0096, 0x0126, 0x2091,
-	0x8000, 0xb8a4, 0x904d, 0x1128, 0x080c, 0x0feb, 0x0168, 0x2900,
-	0xb8a6, 0x080c, 0x6412, 0xa803, 0x0001, 0xa807, 0x0000, 0x9085,
-	0x0001, 0x012e, 0x009e, 0x0005, 0x9006, 0x0cd8, 0x0096, 0x0126,
-	0x2091, 0x8000, 0xb8a4, 0x904d, 0x0130, 0xb8a7, 0x0000, 0x080c,
-	0x101d, 0x9085, 0x0001, 0x012e, 0x009e, 0x0005, 0xb89c, 0xd0a4,
-	0x0005, 0x00b6, 0x00f6, 0x080c, 0x6faa, 0x01b0, 0x71c0, 0x81ff,
-	0x1198, 0x71d8, 0xd19c, 0x0180, 0x2001, 0x007e, 0x9080, 0x1000,
-	0x2004, 0x905d, 0x0148, 0xb804, 0x9084, 0x00ff, 0x9086, 0x0006,
-	0x1118, 0xb800, 0xc0ed, 0xb802, 0x2079, 0x185b, 0x7804, 0x00d0,
-	0x0156, 0x20a9, 0x007f, 0x900e, 0x0016, 0x080c, 0x6256, 0x1168,
-	0xb804, 0x9084, 0xff00, 0x8007, 0x9096, 0x0004, 0x0118, 0x9086,
-	0x0006, 0x1118, 0xb800, 0xc0ed, 0xb802, 0x001e, 0x8108, 0x1f04,
-	0x649c, 0x015e, 0x080c, 0x6538, 0x0120, 0x2001, 0x195d, 0x200c,
-	0x0030, 0x2079, 0x185b, 0x7804, 0x0030, 0x2009, 0x07d0, 0x2011,
-	0x64c6, 0x080c, 0x80d1, 0x00fe, 0x00be, 0x0005, 0x00b6, 0x2011,
-	0x64c6, 0x080c, 0x803f, 0x080c, 0x6538, 0x01d8, 0x2001, 0x107e,
-	0x2004, 0x2058, 0xb900, 0xc1ec, 0xb902, 0x080c, 0x6576, 0x0130,
-	0x2009, 0x07d0, 0x2011, 0x64c6, 0x080c, 0x80d1, 0x00e6, 0x2071,
-	0x1800, 0x9006, 0x707a, 0x705c, 0x707e, 0x080c, 0x2dc8, 0x00ee,
-	0x04b0, 0x0156, 0x00c6, 0x20a9, 0x007f, 0x900e, 0x0016, 0x080c,
-	0x6256, 0x1538, 0xb800, 0xd0ec, 0x0520, 0x0046, 0xbaa0, 0x2220,
-	0x9006, 0x2009, 0x0029, 0x080c, 0xd564, 0xb800, 0xc0e5, 0xc0ec,
-	0xb802, 0x080c, 0x6572, 0x2001, 0x0707, 0x1128, 0xb804, 0x9084,
-	0x00ff, 0x9085, 0x0700, 0xb806, 0x2019, 0x0029, 0x080c, 0x8582,
-	0x0076, 0x903e, 0x080c, 0x8470, 0x900e, 0x080c, 0xd2d5, 0x007e,
-	0x004e, 0x001e, 0x8108, 0x1f04, 0x64ee, 0x00ce, 0x015e, 0x00be,
-	0x0005, 0x00b6, 0x6010, 0x2058, 0xb800, 0xc0ec, 0xb802, 0x00be,
-	0x0005, 0x7810, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0ac, 0x0005,
-	0x6010, 0x00b6, 0x905d, 0x0108, 0xb800, 0x00be, 0xd0bc, 0x0005,
-	0x00b6, 0x00f6, 0x2001, 0x107e, 0x2004, 0x905d, 0x0110, 0xb800,
-	0xd0ec, 0x00fe, 0x00be, 0x0005, 0x0126, 0x0026, 0x2091, 0x8000,
-	0x0006, 0xbaa0, 0x9290, 0x1000, 0x2204, 0x9b06, 0x190c, 0x0db4,
-	0x000e, 0xba00, 0x9005, 0x0110, 0xc2fd, 0x0008, 0xc2fc, 0xba02,
-	0x002e, 0x012e, 0x0005, 0x2011, 0x1836, 0x2204, 0xd0cc, 0x0138,
-	0x2001, 0x195b, 0x200c, 0x2011, 0x6568, 0x080c, 0x80d1, 0x0005,
-	0x2011, 0x6568, 0x080c, 0x803f, 0x2011, 0x1836, 0x2204, 0xc0cc,
-	0x2012, 0x0005, 0x080c, 0x539a, 0xd0ac, 0x0005, 0x080c, 0x539a,
-	0xd0a4, 0x0005, 0x0016, 0xb904, 0x9184, 0x00ff, 0x908e, 0x0006,
-	0x001e, 0x0005, 0x0016, 0xb904, 0x9184, 0xff00, 0x8007, 0x908e,
-	0x0006, 0x001e, 0x0005, 0x00b6, 0x00f6, 0x080c, 0xc23b, 0x0158,
-	0x70d8, 0x9084, 0x0028, 0x0138, 0x2001, 0x107f, 0x2004, 0x905d,
-	0x0110, 0xb8bc, 0xd094, 0x00fe, 0x00be, 0x0005, 0x0006, 0x0016,
-	0x0036, 0x0046, 0x0076, 0x00b6, 0x2001, 0x1817, 0x203c, 0x9780,
-	0x3145, 0x203d, 0x97bc, 0xff00, 0x873f, 0x9006, 0x2018, 0x2008,
-	0x9284, 0x8000, 0x0110, 0x2019, 0x0001, 0x9294, 0x7fff, 0x2100,
-	0x9706, 0x0190, 0x91a0, 0x1000, 0x2404, 0x905d, 0x0168, 0xb804,
-	0x9084, 0x00ff, 0x9086, 0x0006, 0x1138, 0x83ff, 0x0118, 0xb89c,
-	0xd0a4, 0x0110, 0x8211, 0x0158, 0x8108, 0x83ff, 0x0120, 0x9182,
-	0x0800, 0x0e28, 0x0068, 0x9182, 0x007e, 0x0e08, 0x0048, 0x00be,
-	0x007e, 0x004e, 0x003e, 0x001e, 0x9085, 0x0001, 0x000e, 0x0005,
-	0x00be, 0x007e, 0x004e, 0x003e, 0x001e, 0x9006, 0x000e, 0x0005,
-	0x0046, 0x0056, 0x0076, 0x00b6, 0x2100, 0x9084, 0x7fff, 0x9080,
-	0x1000, 0x2004, 0x905d, 0x0130, 0xb804, 0x9084, 0x00ff, 0x9086,
-	0x0006, 0x0550, 0x9184, 0x8000, 0x0580, 0x2001, 0x1817, 0x203c,
-	0x9780, 0x3145, 0x203d, 0x97bc, 0xff00, 0x873f, 0x9006, 0x2020,
-	0x2400, 0x9706, 0x01a0, 0x94a8, 0x1000, 0x2504, 0x905d, 0x0178,
-	0xb804, 0x9084, 0x00ff, 0x9086, 0x0006, 0x1148, 0xb89c, 0xd0a4,
-	0x0130, 0xb814, 0x9206, 0x1118, 0xb810, 0x9306, 0x0128, 0x8420,
-	0x9482, 0x0800, 0x0e28, 0x0048, 0x918c, 0x7fff, 0x00be, 0x007e,
-	0x005e, 0x004e, 0x9085, 0x0001, 0x0005, 0x918c, 0x7fff, 0x00be,
-	0x007e, 0x005e, 0x004e, 0x9006, 0x0005, 0x2071, 0x190e, 0x7003,
-	0x0001, 0x7007, 0x0000, 0x9006, 0x7012, 0x7016, 0x701a, 0x701e,
-	0x700a, 0x7046, 0x0005, 0x0016, 0x00e6, 0x2071, 0x1921, 0x900e,
-	0x710a, 0x080c, 0x539a, 0xd0fc, 0x1140, 0x080c, 0x539a, 0x900e,
-	0xd09c, 0x0108, 0x8108, 0x7102, 0x0400, 0x2001, 0x187b, 0x200c,
-	0x9184, 0x0007, 0x9006, 0x0002, 0x664d, 0x664d, 0x664d, 0x664d,
-	0x664d, 0x6664, 0x6672, 0x664d, 0x7003, 0x0003, 0x2009, 0x187c,
-	0x210c, 0x9184, 0xff00, 0x8007, 0x9005, 0x1110, 0x2001, 0x0002,
-	0x7006, 0x0018, 0x7003, 0x0005, 0x0c88, 0x00ee, 0x001e, 0x0005,
-	0x00e6, 0x2071, 0x0050, 0x684c, 0x9005, 0x1150, 0x00e6, 0x2071,
-	0x190e, 0x7028, 0xc085, 0x702a, 0x00ee, 0x9085, 0x0001, 0x0488,
-	0x6844, 0x9005, 0x0158, 0x080c, 0x72fe, 0x6a60, 0x9200, 0x7002,
-	0x6864, 0x9101, 0x7006, 0x9006, 0x7012, 0x7016, 0x6860, 0x7002,
-	0x6864, 0x7006, 0x6868, 0x700a, 0x686c, 0x700e, 0x6844, 0x9005,
-	0x1110, 0x7012, 0x7016, 0x684c, 0x701a, 0x701c, 0x9085, 0x0040,
-	0x701e, 0x7037, 0x0019, 0x702b, 0x0001, 0x00e6, 0x2071, 0x190e,
-	0x7028, 0xc084, 0x702a, 0x7007, 0x0001, 0x700b, 0x0000, 0x00ee,
-	0x9006, 0x00ee, 0x0005, 0xa868, 0xd0fc, 0x11d8, 0x00e6, 0x0026,
-	0x2001, 0x1921, 0x2004, 0x9005, 0x0904, 0x68a5, 0xa87c, 0xd0bc,
-	0x1904, 0x68a5, 0xa978, 0xa874, 0x9105, 0x1904, 0x68a5, 0x2001,
-	0x1921, 0x2004, 0x0002, 0x68a5, 0x66fe, 0x673a, 0x673a, 0x68a5,
-	0x673a, 0x0005, 0xa868, 0xd0fc, 0x1500, 0x00e6, 0x0026, 0x2009,
-	0x1921, 0x210c, 0x81ff, 0x0904, 0x68a5, 0xa87c, 0xd0cc, 0x0904,
-	0x68a5, 0xa880, 0x9084, 0x00ff, 0x9086, 0x0001, 0x1904, 0x68a5,
-	0x9186, 0x0003, 0x0904, 0x673a, 0x9186, 0x0005, 0x0904, 0x673a,
-	0xa84f, 0x8021, 0xa853, 0x0017, 0x0028, 0x0005, 0xa84f, 0x8020,
-	0xa853, 0x0016, 0x2071, 0x190e, 0x701c, 0x9005, 0x1904, 0x6a59,
-	0x0e04, 0x6aa4, 0x2071, 0x0000, 0xa84c, 0x7082, 0xa850, 0x7032,
-	0xa86c, 0x7086, 0x7036, 0xa870, 0x708a, 0x2091, 0x4080, 0x2001,
-	0x0089, 0x2004, 0xd084, 0x190c, 0x1187, 0x2071, 0x1800, 0x2011,
-	0x0001, 0xa804, 0x900d, 0x702c, 0x1158, 0xa802, 0x2900, 0x702e,
-	0x70bc, 0x9200, 0x70be, 0x080c, 0x7f64, 0x002e, 0x00ee, 0x0005,
-	0x0096, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8,
-	0x009e, 0x0c58, 0xa84f, 0x0000, 0x00f6, 0x2079, 0x0050, 0x2071,
-	0x190e, 0xa803, 0x0000, 0x7010, 0x9005, 0x1904, 0x6829, 0x782c,
-	0x908c, 0x0780, 0x190c, 0x6bcb, 0x8004, 0x8004, 0x8004, 0x9084,
-	0x0003, 0x0002, 0x6758, 0x6829, 0x677d, 0x67c4, 0x080c, 0x0db4,
-	0x2071, 0x1800, 0x2900, 0x7822, 0xa804, 0x900d, 0x1170, 0x2071,
-	0x19d2, 0x703c, 0x9005, 0x1328, 0x2001, 0x1922, 0x2004, 0x8005,
-	0x703e, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x9016, 0x702c, 0x2148,
-	0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70bc,
-	0x9200, 0x70be, 0x080c, 0x7f64, 0x0c10, 0x2071, 0x1800, 0x2900,
-	0x7822, 0xa804, 0x900d, 0x1580, 0x7824, 0x00e6, 0x2071, 0x0040,
-	0x712c, 0xd19c, 0x1148, 0x2009, 0x182f, 0x210c, 0x918a, 0x0040,
-	0x0218, 0x7022, 0x00ee, 0x0058, 0x00ee, 0x2048, 0x702c, 0xa802,
-	0x2900, 0x702e, 0x70bc, 0x8000, 0x70be, 0x080c, 0x7f64, 0x782c,
-	0x9094, 0x0780, 0x190c, 0x6bcb, 0xd0a4, 0x19f0, 0x2071, 0x19d2,
-	0x703c, 0x9005, 0x1328, 0x2001, 0x1922, 0x2004, 0x8005, 0x703e,
-	0x00fe, 0x002e, 0x00ee, 0x0005, 0x9016, 0x702c, 0x2148, 0xa904,
-	0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70bc, 0x9200,
-	0x70be, 0x080c, 0x7f64, 0x0800, 0x0096, 0x00e6, 0x7824, 0x2048,
-	0x2071, 0x1800, 0x702c, 0xa802, 0x2900, 0x702e, 0x70bc, 0x8000,
-	0x70be, 0x080c, 0x7f64, 0x782c, 0x9094, 0x0780, 0x190c, 0x6bcb,
-	0xd0a4, 0x1d60, 0x00ee, 0x782c, 0x9094, 0x0780, 0x190c, 0x6bcb,
-	0xd09c, 0x11a0, 0x009e, 0x2900, 0x7822, 0xa804, 0x900d, 0x1560,
+	0x0128, 0x8109, 0x1dd8, 0x9085, 0x0001, 0x0068, 0x0146, 0x01d6,
+	0x3300, 0x8001, 0x20a0, 0x3c00, 0x20e8, 0x2001, 0xffff, 0x4004,
+	0x01de, 0x014e, 0x9006, 0x01ce, 0x013e, 0x0005, 0x0096, 0x0126,
+	0x2091, 0x8000, 0xb8a4, 0x904d, 0x1128, 0x080c, 0x1031, 0x0168,
+	0x2900, 0xb8a6, 0x080c, 0x665b, 0xa803, 0x0001, 0xa807, 0x0000,
+	0x9085, 0x0001, 0x012e, 0x009e, 0x0005, 0x9006, 0x0cd8, 0x0096,
+	0x0126, 0x2091, 0x8000, 0xb8a4, 0x904d, 0x0130, 0xb8a7, 0x0000,
+	0x080c, 0x1063, 0x9085, 0x0001, 0x012e, 0x009e, 0x0005, 0xb89c,
+	0xd0a4, 0x0005, 0x00b6, 0x00f6, 0x080c, 0x7207, 0x01b0, 0x71c0,
+	0x81ff, 0x1198, 0x71d8, 0xd19c, 0x0180, 0x2001, 0x007e, 0x9080,
+	0x1000, 0x2004, 0x905d, 0x0148, 0xb804, 0x9084, 0x00ff, 0x9086,
+	0x0006, 0x1118, 0xb800, 0xc0ed, 0xb802, 0x2079, 0x185b, 0x7804,
+	0x00d0, 0x0156, 0x20a9, 0x007f, 0x900e, 0x0016, 0x080c, 0x649f,
+	0x1168, 0xb804, 0x9084, 0xff00, 0x8007, 0x9096, 0x0004, 0x0118,
+	0x9086, 0x0006, 0x1118, 0xb800, 0xc0ed, 0xb802, 0x001e, 0x8108,
+	0x1f04, 0x66e5, 0x015e, 0x080c, 0x6781, 0x0120, 0x2001, 0x195d,
+	0x200c, 0x0030, 0x2079, 0x185b, 0x7804, 0x0030, 0x2009, 0x07d0,
+	0x2011, 0x670f, 0x080c, 0x836c, 0x00fe, 0x00be, 0x0005, 0x00b6,
+	0x2011, 0x670f, 0x080c, 0x82da, 0x080c, 0x6781, 0x01d8, 0x2001,
+	0x107e, 0x2004, 0x2058, 0xb900, 0xc1ec, 0xb902, 0x080c, 0x67bf,
+	0x0130, 0x2009, 0x07d0, 0x2011, 0x670f, 0x080c, 0x836c, 0x00e6,
+	0x2071, 0x1800, 0x9006, 0x707a, 0x705c, 0x707e, 0x080c, 0x2f6c,
+	0x00ee, 0x04b0, 0x0156, 0x00c6, 0x20a9, 0x007f, 0x900e, 0x0016,
+	0x080c, 0x649f, 0x1538, 0xb800, 0xd0ec, 0x0520, 0x0046, 0xbaa0,
+	0x2220, 0x9006, 0x2009, 0x0029, 0x080c, 0xd885, 0xb800, 0xc0e5,
+	0xc0ec, 0xb802, 0x080c, 0x67bb, 0x2001, 0x0707, 0x1128, 0xb804,
+	0x9084, 0x00ff, 0x9085, 0x0700, 0xb806, 0x2019, 0x0029, 0x080c,
+	0x8803, 0x0076, 0x903e, 0x080c, 0x86f1, 0x900e, 0x080c, 0xd5f6,
+	0x007e, 0x004e, 0x001e, 0x8108, 0x1f04, 0x6737, 0x00ce, 0x015e,
+	0x00be, 0x0005, 0x00b6, 0x6010, 0x2058, 0xb800, 0xc0ec, 0xb802,
+	0x00be, 0x0005, 0x7810, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0ac,
+	0x0005, 0x6010, 0x00b6, 0x905d, 0x0108, 0xb800, 0x00be, 0xd0bc,
+	0x0005, 0x00b6, 0x00f6, 0x2001, 0x107e, 0x2004, 0x905d, 0x0110,
+	0xb800, 0xd0ec, 0x00fe, 0x00be, 0x0005, 0x0126, 0x0026, 0x2091,
+	0x8000, 0x0006, 0xbaa0, 0x9290, 0x1000, 0x2204, 0x9b06, 0x190c,
+	0x0dfa, 0x000e, 0xba00, 0x9005, 0x0110, 0xc2fd, 0x0008, 0xc2fc,
+	0xba02, 0x002e, 0x012e, 0x0005, 0x2011, 0x1836, 0x2204, 0xd0cc,
+	0x0138, 0x2001, 0x195b, 0x200c, 0x2011, 0x67b1, 0x080c, 0x836c,
+	0x0005, 0x2011, 0x67b1, 0x080c, 0x82da, 0x2011, 0x1836, 0x2204,
+	0xc0cc, 0x2012, 0x0005, 0x080c, 0x55db, 0xd0ac, 0x0005, 0x080c,
+	0x55db, 0xd0a4, 0x0005, 0x0016, 0xb904, 0x9184, 0x00ff, 0x908e,
+	0x0006, 0x001e, 0x0005, 0x0016, 0xb904, 0x9184, 0xff00, 0x8007,
+	0x908e, 0x0006, 0x001e, 0x0005, 0x00b6, 0x00f6, 0x080c, 0xc539,
+	0x0158, 0x70d8, 0x9084, 0x0028, 0x0138, 0x2001, 0x107f, 0x2004,
+	0x905d, 0x0110, 0xb8bc, 0xd094, 0x00fe, 0x00be, 0x0005, 0x0006,
+	0x0016, 0x0036, 0x0046, 0x0076, 0x00b6, 0x2001, 0x1817, 0x203c,
+	0x9780, 0x32e9, 0x203d, 0x97bc, 0xff00, 0x873f, 0x9006, 0x2018,
+	0x2008, 0x9284, 0x8000, 0x0110, 0x2019, 0x0001, 0x9294, 0x7fff,
+	0x2100, 0x9706, 0x0190, 0x91a0, 0x1000, 0x2404, 0x905d, 0x0168,
+	0xb804, 0x9084, 0x00ff, 0x9086, 0x0006, 0x1138, 0x83ff, 0x0118,
+	0xb89c, 0xd0a4, 0x0110, 0x8211, 0x0158, 0x8108, 0x83ff, 0x0120,
+	0x9182, 0x0800, 0x0e28, 0x0068, 0x9182, 0x007e, 0x0e08, 0x0048,
+	0x00be, 0x007e, 0x004e, 0x003e, 0x001e, 0x9085, 0x0001, 0x000e,
+	0x0005, 0x00be, 0x007e, 0x004e, 0x003e, 0x001e, 0x9006, 0x000e,
+	0x0005, 0x0046, 0x0056, 0x0076, 0x00b6, 0x2100, 0x9084, 0x7fff,
+	0x9080, 0x1000, 0x2004, 0x905d, 0x0130, 0xb804, 0x9084, 0x00ff,
+	0x9086, 0x0006, 0x0550, 0x9184, 0x8000, 0x0580, 0x2001, 0x1817,
+	0x203c, 0x9780, 0x32e9, 0x203d, 0x97bc, 0xff00, 0x873f, 0x9006,
+	0x2020, 0x2400, 0x9706, 0x01a0, 0x94a8, 0x1000, 0x2504, 0x905d,
+	0x0178, 0xb804, 0x9084, 0x00ff, 0x9086, 0x0006, 0x1148, 0xb89c,
+	0xd0a4, 0x0130, 0xb814, 0x9206, 0x1118, 0xb810, 0x9306, 0x0128,
+	0x8420, 0x9482, 0x0800, 0x0e28, 0x0048, 0x918c, 0x7fff, 0x00be,
+	0x007e, 0x005e, 0x004e, 0x9085, 0x0001, 0x0005, 0x918c, 0x7fff,
+	0x00be, 0x007e, 0x005e, 0x004e, 0x9006, 0x0005, 0x2071, 0x190e,
+	0x7003, 0x0001, 0x7007, 0x0000, 0x9006, 0x7012, 0x7016, 0x701a,
+	0x701e, 0x700a, 0x7046, 0x0005, 0x0016, 0x00e6, 0x2071, 0x1921,
+	0x900e, 0x710a, 0x080c, 0x55db, 0xd0fc, 0x1140, 0x080c, 0x55db,
+	0x900e, 0xd09c, 0x0108, 0x8108, 0x7102, 0x0400, 0x2001, 0x187b,
+	0x200c, 0x9184, 0x0007, 0x9006, 0x0002, 0x6896, 0x6896, 0x6896,
+	0x6896, 0x6896, 0x68ad, 0x68bb, 0x6896, 0x7003, 0x0003, 0x2009,
+	0x187c, 0x210c, 0x9184, 0xff00, 0x8007, 0x9005, 0x1110, 0x2001,
+	0x0002, 0x7006, 0x0018, 0x7003, 0x0005, 0x0c88, 0x00ee, 0x001e,
+	0x0005, 0x00e6, 0x2071, 0x0050, 0x684c, 0x9005, 0x1150, 0x00e6,
+	0x2071, 0x190e, 0x7028, 0xc085, 0x702a, 0x00ee, 0x9085, 0x0001,
+	0x0488, 0x6844, 0x9005, 0x0158, 0x080c, 0x7576, 0x6a60, 0x9200,
+	0x7002, 0x6864, 0x9101, 0x7006, 0x9006, 0x7012, 0x7016, 0x6860,
+	0x7002, 0x6864, 0x7006, 0x6868, 0x700a, 0x686c, 0x700e, 0x6844,
+	0x9005, 0x1110, 0x7012, 0x7016, 0x684c, 0x701a, 0x701c, 0x9085,
+	0x0040, 0x701e, 0x7037, 0x0019, 0x702b, 0x0001, 0x00e6, 0x2071,
+	0x190e, 0x7028, 0xc084, 0x702a, 0x7007, 0x0001, 0x700b, 0x0000,
+	0x00ee, 0x9006, 0x00ee, 0x0005, 0xa868, 0xd0fc, 0x11d8, 0x00e6,
+	0x0026, 0x2001, 0x1921, 0x2004, 0x9005, 0x0904, 0x6aee, 0xa87c,
+	0xd0bc, 0x1904, 0x6aee, 0xa978, 0xa874, 0x9105, 0x1904, 0x6aee,
+	0x2001, 0x1921, 0x2004, 0x0002, 0x6aee, 0x6947, 0x6983, 0x6983,
+	0x6aee, 0x6983, 0x0005, 0xa868, 0xd0fc, 0x1500, 0x00e6, 0x0026,
+	0x2009, 0x1921, 0x210c, 0x81ff, 0x0904, 0x6aee, 0xa87c, 0xd0cc,
+	0x0904, 0x6aee, 0xa880, 0x9084, 0x00ff, 0x9086, 0x0001, 0x1904,
+	0x6aee, 0x9186, 0x0003, 0x0904, 0x6983, 0x9186, 0x0005, 0x0904,
+	0x6983, 0xa84f, 0x8021, 0xa853, 0x0017, 0x0028, 0x0005, 0xa84f,
+	0x8020, 0xa853, 0x0016, 0x2071, 0x190e, 0x701c, 0x9005, 0x1904,
+	0x6ca2, 0x0e04, 0x6ced, 0x2071, 0x0000, 0xa84c, 0x7082, 0xa850,
+	0x7032, 0xa86c, 0x7086, 0x7036, 0xa870, 0x708a, 0x2091, 0x4080,
+	0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11e0, 0x2071, 0x1800,
+	0x2011, 0x0001, 0xa804, 0x900d, 0x702c, 0x1158, 0xa802, 0x2900,
+	0x702e, 0x70bc, 0x9200, 0x70be, 0x080c, 0x81f0, 0x002e, 0x00ee,
+	0x0005, 0x0096, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff,
+	0x1dc8, 0x009e, 0x0c58, 0xa84f, 0x0000, 0x00f6, 0x2079, 0x0050,
+	0x2071, 0x190e, 0xa803, 0x0000, 0x7010, 0x9005, 0x1904, 0x6a72,
+	0x782c, 0x908c, 0x0780, 0x190c, 0x6e16, 0x8004, 0x8004, 0x8004,
+	0x9084, 0x0003, 0x0002, 0x69a1, 0x6a72, 0x69c6, 0x6a0d, 0x080c,
+	0x0dfa, 0x2071, 0x1800, 0x2900, 0x7822, 0xa804, 0x900d, 0x1170,
 	0x2071, 0x19d2, 0x703c, 0x9005, 0x1328, 0x2001, 0x1922, 0x2004,
-	0x8005, 0x703e, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x009e, 0x2908,
-	0x7010, 0x8000, 0x7012, 0x7018, 0x904d, 0x711a, 0x0110, 0xa902,
-	0x0008, 0x711e, 0x2148, 0xa804, 0x900d, 0x1170, 0x2071, 0x19d2,
-	0x703c, 0x9005, 0x1328, 0x2001, 0x1922, 0x2004, 0x8005, 0x703e,
-	0x00fe, 0x002e, 0x00ee, 0x0005, 0x2071, 0x1800, 0x9016, 0x702c,
+	0x8005, 0x703e, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x9016, 0x702c,
 	0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e,
-	0x70bc, 0x9200, 0x70be, 0x080c, 0x7f64, 0x00fe, 0x002e, 0x00ee,
-	0x0005, 0x2908, 0x7010, 0x8000, 0x7012, 0x7018, 0x904d, 0x711a,
-	0x0110, 0xa902, 0x0008, 0x711e, 0x2148, 0xa804, 0x900d, 0x1904,
-	0x687e, 0x782c, 0x9094, 0x0780, 0x190c, 0x6bcb, 0xd09c, 0x1198,
-	0x701c, 0x904d, 0x0180, 0x7010, 0x8001, 0x7012, 0x1108, 0x701a,
-	0xa800, 0x701e, 0x2900, 0x7822, 0x782c, 0x9094, 0x0780, 0x190c,
-	0x6bcb, 0xd09c, 0x0d68, 0x782c, 0x9094, 0x0780, 0x190c, 0x6bcb,
-	0xd0a4, 0x01b0, 0x00e6, 0x7824, 0x2048, 0x2071, 0x1800, 0x702c,
-	0xa802, 0x2900, 0x702e, 0x70bc, 0x8000, 0x70be, 0x080c, 0x7f64,
-	0x782c, 0x9094, 0x0780, 0x190c, 0x6bcb, 0xd0a4, 0x1d60, 0x00ee,
-	0x2071, 0x19d2, 0x703c, 0x9005, 0x1328, 0x2001, 0x1922, 0x2004,
-	0x8005, 0x703e, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x00e6, 0x2071,
-	0x1800, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900,
-	0x81ff, 0x1dc8, 0x702e, 0x70bc, 0x9200, 0x70be, 0x080c, 0x7f64,
-	0x00ee, 0x0804, 0x6839, 0xa868, 0xd0fc, 0x1904, 0x68e1, 0x0096,
-	0xa804, 0xa807, 0x0000, 0x904d, 0x190c, 0x0f9d, 0x009e, 0x0018,
-	0xa868, 0xd0fc, 0x15f0, 0x00e6, 0x0026, 0xa84f, 0x0000, 0x00f6,
-	0x2079, 0x0050, 0x2071, 0x1800, 0x70e8, 0x8001, 0x01d0, 0x1678,
-	0x2071, 0x190e, 0xa803, 0x0000, 0x7010, 0x9005, 0x1904, 0x69d7,
-	0x782c, 0x908c, 0x0780, 0x190c, 0x6bcb, 0x8004, 0x8004, 0x8004,
-	0x9084, 0x0003, 0x0002, 0x68e2, 0x69d7, 0x68fd, 0x696a, 0x080c,
-	0x0db4, 0x70eb, 0x0fa0, 0x71e4, 0x8107, 0x9106, 0x9094, 0x00c0,
-	0x9184, 0xff3f, 0x9205, 0x70e6, 0x3b08, 0x3a00, 0x9104, 0x918d,
-	0x00c0, 0x21d8, 0x9084, 0xff3f, 0x9205, 0x20d0, 0x0888, 0x70ea,
-	0x0878, 0x0005, 0x2071, 0x1800, 0x2900, 0x7822, 0xa804, 0x900d,
-	0x1120, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x9016, 0x702c, 0x2148,
+	0x70bc, 0x9200, 0x70be, 0x080c, 0x81f0, 0x0c10, 0x2071, 0x1800,
+	0x2900, 0x7822, 0xa804, 0x900d, 0x1580, 0x7824, 0x00e6, 0x2071,
+	0x0040, 0x712c, 0xd19c, 0x1148, 0x2009, 0x182f, 0x210c, 0x918a,
+	0x0040, 0x0218, 0x7022, 0x00ee, 0x0058, 0x00ee, 0x2048, 0x702c,
+	0xa802, 0x2900, 0x702e, 0x70bc, 0x8000, 0x70be, 0x080c, 0x81f0,
+	0x782c, 0x9094, 0x0780, 0x190c, 0x6e16, 0xd0a4, 0x19f0, 0x2071,
+	0x19d2, 0x703c, 0x9005, 0x1328, 0x2001, 0x1922, 0x2004, 0x8005,
+	0x703e, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x9016, 0x702c, 0x2148,
 	0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70bc,
-	0x9200, 0x70be, 0x080c, 0x7f64, 0x0c60, 0x2071, 0x1800, 0x2900,
-	0x7822, 0xa804, 0x900d, 0x1904, 0x6959, 0x7830, 0x8007, 0x9084,
-	0x001f, 0x9082, 0x0001, 0x1220, 0x00fe, 0x002e, 0x00ee, 0x0005,
-	0x7824, 0x00e6, 0x2071, 0x0040, 0x712c, 0xd19c, 0x1148, 0x2009,
-	0x182f, 0x210c, 0x918a, 0x0040, 0x0218, 0x7022, 0x00ee, 0x0058,
-	0x00ee, 0x2048, 0x702c, 0xa802, 0x2900, 0x702e, 0x70bc, 0x8000,
-	0x70be, 0x080c, 0x7f64, 0x782c, 0x9094, 0x0780, 0x190c, 0x6bcb,
-	0xd0a4, 0x19f0, 0x0e04, 0x6950, 0x7838, 0x7938, 0x910e, 0x1de0,
-	0x00d6, 0x2069, 0x0000, 0x6836, 0x6833, 0x0013, 0x00de, 0x2001,
-	0x191f, 0x200c, 0xc184, 0x2102, 0x2091, 0x4080, 0x2001, 0x0089,
-	0x2004, 0xd084, 0x190c, 0x1187, 0x00fe, 0x002e, 0x00ee, 0x0005,
-	0x2001, 0x191f, 0x200c, 0xc185, 0x2102, 0x00fe, 0x002e, 0x00ee,
-	0x0005, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900,
-	0x81ff, 0x1dc8, 0x702e, 0x70bc, 0x9200, 0x70be, 0x080c, 0x7f64,
-	0x0804, 0x6910, 0x0096, 0x00e6, 0x7824, 0x2048, 0x2071, 0x1800,
-	0x702c, 0xa802, 0x2900, 0x702e, 0x70bc, 0x8000, 0x70be, 0x080c,
-	0x7f64, 0x782c, 0x9094, 0x0780, 0x190c, 0x6bcb, 0xd0a4, 0x1d60,
-	0x00ee, 0x0e04, 0x69aa, 0x7838, 0x7938, 0x910e, 0x1de0, 0x00d6,
-	0x2069, 0x0000, 0x6836, 0x6833, 0x0013, 0x00de, 0x7044, 0xc084,
-	0x7046, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c,
-	0x1187, 0x782c, 0x9094, 0x0780, 0x190c, 0x6bcb, 0xd09c, 0x1170,
-	0x009e, 0x2900, 0x7822, 0xa804, 0x900d, 0x11e0, 0x00fe, 0x002e,
-	0x00ee, 0x0005, 0x7044, 0xc085, 0x7046, 0x0c58, 0x009e, 0x2908,
-	0x7010, 0x8000, 0x7012, 0x7018, 0x904d, 0x711a, 0x0110, 0xa902,
-	0x0008, 0x711e, 0x2148, 0xa804, 0x900d, 0x1120, 0x00fe, 0x002e,
-	0x00ee, 0x0005, 0x2071, 0x1800, 0x9016, 0x702c, 0x2148, 0xa904,
-	0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70bc, 0x9200,
-	0x70be, 0x080c, 0x7f64, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x2908,
-	0x7010, 0x8000, 0x7012, 0x7018, 0x904d, 0x711a, 0x0110, 0xa902,
-	0x0008, 0x711e, 0x2148, 0xa804, 0x900d, 0x1904, 0x6a44, 0x782c,
-	0x9094, 0x0780, 0x190c, 0x6bcb, 0xd09c, 0x11b0, 0x701c, 0x904d,
-	0x0198, 0xa84c, 0x9005, 0x1180, 0x7010, 0x8001, 0x7012, 0x1108,
+	0x9200, 0x70be, 0x080c, 0x81f0, 0x0800, 0x0096, 0x00e6, 0x7824,
+	0x2048, 0x2071, 0x1800, 0x702c, 0xa802, 0x2900, 0x702e, 0x70bc,
+	0x8000, 0x70be, 0x080c, 0x81f0, 0x782c, 0x9094, 0x0780, 0x190c,
+	0x6e16, 0xd0a4, 0x1d60, 0x00ee, 0x782c, 0x9094, 0x0780, 0x190c,
+	0x6e16, 0xd09c, 0x11a0, 0x009e, 0x2900, 0x7822, 0xa804, 0x900d,
+	0x1560, 0x2071, 0x19d2, 0x703c, 0x9005, 0x1328, 0x2001, 0x1922,
+	0x2004, 0x8005, 0x703e, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x009e,
+	0x2908, 0x7010, 0x8000, 0x7012, 0x7018, 0x904d, 0x711a, 0x0110,
+	0xa902, 0x0008, 0x711e, 0x2148, 0xa804, 0x900d, 0x1170, 0x2071,
+	0x19d2, 0x703c, 0x9005, 0x1328, 0x2001, 0x1922, 0x2004, 0x8005,
+	0x703e, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x2071, 0x1800, 0x9016,
+	0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8,
+	0x702e, 0x70bc, 0x9200, 0x70be, 0x080c, 0x81f0, 0x00fe, 0x002e,
+	0x00ee, 0x0005, 0x2908, 0x7010, 0x8000, 0x7012, 0x7018, 0x904d,
+	0x711a, 0x0110, 0xa902, 0x0008, 0x711e, 0x2148, 0xa804, 0x900d,
+	0x1904, 0x6ac7, 0x782c, 0x9094, 0x0780, 0x190c, 0x6e16, 0xd09c,
+	0x1198, 0x701c, 0x904d, 0x0180, 0x7010, 0x8001, 0x7012, 0x1108,
 	0x701a, 0xa800, 0x701e, 0x2900, 0x7822, 0x782c, 0x9094, 0x0780,
-	0x190c, 0x6bcb, 0xd09c, 0x0d50, 0x782c, 0x9094, 0x0780, 0x190c,
-	0x6bcb, 0xd0a4, 0x05a8, 0x00e6, 0x7824, 0x2048, 0x2071, 0x1800,
+	0x190c, 0x6e16, 0xd09c, 0x0d68, 0x782c, 0x9094, 0x0780, 0x190c,
+	0x6e16, 0xd0a4, 0x01b0, 0x00e6, 0x7824, 0x2048, 0x2071, 0x1800,
 	0x702c, 0xa802, 0x2900, 0x702e, 0x70bc, 0x8000, 0x70be, 0x080c,
-	0x7f64, 0x782c, 0x9094, 0x0780, 0x190c, 0x6bcb, 0xd0a4, 0x1d60,
-	0x00ee, 0x0e04, 0x6a3d, 0x7838, 0x7938, 0x910e, 0x1de0, 0x00d6,
-	0x2069, 0x0000, 0x6836, 0x6833, 0x0013, 0x00de, 0x7044, 0xc084,
-	0x7046, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c,
-	0x1187, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x7044, 0xc085, 0x7046,
-	0x00fe, 0x002e, 0x00ee, 0x0005, 0x00e6, 0x2071, 0x1800, 0x9016,
-	0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8,
-	0x702e, 0x70bc, 0x9200, 0x70be, 0x080c, 0x7f64, 0x00ee, 0x0804,
-	0x69e7, 0x2071, 0x190e, 0xa803, 0x0000, 0x2908, 0x7010, 0x8000,
-	0x7012, 0x7018, 0x904d, 0x711a, 0x0110, 0xa902, 0x0008, 0x711e,
-	0x2148, 0xa804, 0x900d, 0x1128, 0x1e04, 0x6a84, 0x002e, 0x00ee,
-	0x0005, 0x2071, 0x1800, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802,
-	0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70bc, 0x9200, 0x70be,
-	0x080c, 0x7f64, 0x0e04, 0x6a6e, 0x2071, 0x190e, 0x701c, 0x2048,
-	0xa84c, 0x900d, 0x0d18, 0x2071, 0x0000, 0x7182, 0xa850, 0x7032,
-	0xa86c, 0x7086, 0x7036, 0xa870, 0x708a, 0x2091, 0x4080, 0x2001,
-	0x0089, 0x2004, 0xd084, 0x190c, 0x1187, 0x2071, 0x190e, 0x080c,
-	0x6bb7, 0x002e, 0x00ee, 0x0005, 0x2071, 0x190e, 0xa803, 0x0000,
+	0x81f0, 0x782c, 0x9094, 0x0780, 0x190c, 0x6e16, 0xd0a4, 0x1d60,
+	0x00ee, 0x2071, 0x19d2, 0x703c, 0x9005, 0x1328, 0x2001, 0x1922,
+	0x2004, 0x8005, 0x703e, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x00e6,
+	0x2071, 0x1800, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210,
+	0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70bc, 0x9200, 0x70be, 0x080c,
+	0x81f0, 0x00ee, 0x0804, 0x6a82, 0xa868, 0xd0fc, 0x1904, 0x6b2a,
+	0x0096, 0xa804, 0xa807, 0x0000, 0x904d, 0x190c, 0x0fe3, 0x009e,
+	0x0018, 0xa868, 0xd0fc, 0x15f0, 0x00e6, 0x0026, 0xa84f, 0x0000,
+	0x00f6, 0x2079, 0x0050, 0x2071, 0x1800, 0x70e8, 0x8001, 0x01d0,
+	0x1678, 0x2071, 0x190e, 0xa803, 0x0000, 0x7010, 0x9005, 0x1904,
+	0x6c20, 0x782c, 0x908c, 0x0780, 0x190c, 0x6e16, 0x8004, 0x8004,
+	0x8004, 0x9084, 0x0003, 0x0002, 0x6b2b, 0x6c20, 0x6b46, 0x6bb3,
+	0x080c, 0x0dfa, 0x70eb, 0x0fa0, 0x71e4, 0x8107, 0x9106, 0x9094,
+	0x00c0, 0x9184, 0xff3f, 0x9205, 0x70e6, 0x3b08, 0x3a00, 0x9104,
+	0x918d, 0x00c0, 0x21d8, 0x9084, 0xff3f, 0x9205, 0x20d0, 0x0888,
+	0x70ea, 0x0878, 0x0005, 0x2071, 0x1800, 0x2900, 0x7822, 0xa804,
+	0x900d, 0x1120, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x9016, 0x702c,
+	0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e,
+	0x70bc, 0x9200, 0x70be, 0x080c, 0x81f0, 0x0c60, 0x2071, 0x1800,
+	0x2900, 0x7822, 0xa804, 0x900d, 0x1904, 0x6ba2, 0x7830, 0x8007,
+	0x9084, 0x001f, 0x9082, 0x0001, 0x1220, 0x00fe, 0x002e, 0x00ee,
+	0x0005, 0x7824, 0x00e6, 0x2071, 0x0040, 0x712c, 0xd19c, 0x1148,
+	0x2009, 0x182f, 0x210c, 0x918a, 0x0040, 0x0218, 0x7022, 0x00ee,
+	0x0058, 0x00ee, 0x2048, 0x702c, 0xa802, 0x2900, 0x702e, 0x70bc,
+	0x8000, 0x70be, 0x080c, 0x81f0, 0x782c, 0x9094, 0x0780, 0x190c,
+	0x6e16, 0xd0a4, 0x19f0, 0x0e04, 0x6b99, 0x7838, 0x7938, 0x910e,
+	0x1de0, 0x00d6, 0x2069, 0x0000, 0x6836, 0x6833, 0x0013, 0x00de,
+	0x2001, 0x191f, 0x200c, 0xc184, 0x2102, 0x2091, 0x4080, 0x2001,
+	0x0089, 0x2004, 0xd084, 0x190c, 0x11e0, 0x00fe, 0x002e, 0x00ee,
+	0x0005, 0x2001, 0x191f, 0x200c, 0xc185, 0x2102, 0x00fe, 0x002e,
+	0x00ee, 0x0005, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210,
+	0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70bc, 0x9200, 0x70be, 0x080c,
+	0x81f0, 0x0804, 0x6b59, 0x0096, 0x00e6, 0x7824, 0x2048, 0x2071,
+	0x1800, 0x702c, 0xa802, 0x2900, 0x702e, 0x70bc, 0x8000, 0x70be,
+	0x080c, 0x81f0, 0x782c, 0x9094, 0x0780, 0x190c, 0x6e16, 0xd0a4,
+	0x1d60, 0x00ee, 0x0e04, 0x6bf3, 0x7838, 0x7938, 0x910e, 0x1de0,
+	0x00d6, 0x2069, 0x0000, 0x6836, 0x6833, 0x0013, 0x00de, 0x7044,
+	0xc084, 0x7046, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084,
+	0x190c, 0x11e0, 0x782c, 0x9094, 0x0780, 0x190c, 0x6e16, 0xd09c,
+	0x1170, 0x009e, 0x2900, 0x7822, 0xa804, 0x900d, 0x11e0, 0x00fe,
+	0x002e, 0x00ee, 0x0005, 0x7044, 0xc085, 0x7046, 0x0c58, 0x009e,
 	0x2908, 0x7010, 0x8000, 0x7012, 0x7018, 0x904d, 0x711a, 0x0110,
-	0xa902, 0x0008, 0x711e, 0x2148, 0xa804, 0x900d, 0x1118, 0x002e,
+	0xa902, 0x0008, 0x711e, 0x2148, 0xa804, 0x900d, 0x1120, 0x00fe,
+	0x002e, 0x00ee, 0x0005, 0x2071, 0x1800, 0x9016, 0x702c, 0x2148,
+	0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70bc,
+	0x9200, 0x70be, 0x080c, 0x81f0, 0x00fe, 0x002e, 0x00ee, 0x0005,
+	0x2908, 0x7010, 0x8000, 0x7012, 0x7018, 0x904d, 0x711a, 0x0110,
+	0xa902, 0x0008, 0x711e, 0x2148, 0xa804, 0x900d, 0x1904, 0x6c8d,
+	0x782c, 0x9094, 0x0780, 0x190c, 0x6e16, 0xd09c, 0x11b0, 0x701c,
+	0x904d, 0x0198, 0xa84c, 0x9005, 0x1180, 0x7010, 0x8001, 0x7012,
+	0x1108, 0x701a, 0xa800, 0x701e, 0x2900, 0x7822, 0x782c, 0x9094,
+	0x0780, 0x190c, 0x6e16, 0xd09c, 0x0d50, 0x782c, 0x9094, 0x0780,
+	0x190c, 0x6e16, 0xd0a4, 0x05a8, 0x00e6, 0x7824, 0x2048, 0x2071,
+	0x1800, 0x702c, 0xa802, 0x2900, 0x702e, 0x70bc, 0x8000, 0x70be,
+	0x080c, 0x81f0, 0x782c, 0x9094, 0x0780, 0x190c, 0x6e16, 0xd0a4,
+	0x1d60, 0x00ee, 0x0e04, 0x6c86, 0x7838, 0x7938, 0x910e, 0x1de0,
+	0x00d6, 0x2069, 0x0000, 0x6836, 0x6833, 0x0013, 0x00de, 0x7044,
+	0xc084, 0x7046, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084,
+	0x190c, 0x11e0, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x7044, 0xc085,
+	0x7046, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x00e6, 0x2071, 0x1800,
+	0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff,
+	0x1dc8, 0x702e, 0x70bc, 0x9200, 0x70be, 0x080c, 0x81f0, 0x00ee,
+	0x0804, 0x6c30, 0x2071, 0x190e, 0xa803, 0x0000, 0x2908, 0x7010,
+	0x8000, 0x7012, 0x7018, 0x904d, 0x711a, 0x0110, 0xa902, 0x0008,
+	0x711e, 0x2148, 0xa804, 0x900d, 0x1128, 0x1e04, 0x6ccd, 0x002e,
 	0x00ee, 0x0005, 0x2071, 0x1800, 0x9016, 0x702c, 0x2148, 0xa904,
 	0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70bc, 0x9200,
-	0x70be, 0x080c, 0x7f64, 0x002e, 0x00ee, 0x0005, 0x0006, 0xa87c,
-	0x0006, 0xa867, 0x0103, 0x20a9, 0x001c, 0xa860, 0x20e8, 0xa85c,
-	0x9080, 0x001d, 0x20a0, 0x9006, 0x4004, 0x000e, 0x9084, 0x00ff,
-	0xa87e, 0x000e, 0xa87a, 0xa982, 0x0005, 0x2071, 0x190e, 0x7004,
-	0x0002, 0x6aef, 0x6af0, 0x6bb6, 0x6af0, 0x0db4, 0x6bb6, 0x0005,
-	0x2001, 0x1921, 0x2004, 0x0002, 0x6afa, 0x6afa, 0x6b4f, 0x6b50,
-	0x6afa, 0x6b50, 0x0126, 0x2091, 0x8000, 0x1e0c, 0x6bd6, 0x701c,
-	0x904d, 0x01e0, 0xa84c, 0x9005, 0x01d8, 0x0e04, 0x6b1e, 0xa94c,
-	0x2071, 0x0000, 0x7182, 0xa850, 0x7032, 0xa86c, 0x7086, 0x7036,
-	0xa870, 0x708a, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084,
-	0x190c, 0x1187, 0x2071, 0x190e, 0x080c, 0x6bb7, 0x012e, 0x0470,
-	0x2001, 0x005b, 0x2004, 0x9094, 0x0780, 0x190c, 0x6bcb, 0xd09c,
-	0x2071, 0x190e, 0x1510, 0x2071, 0x190e, 0x700f, 0x0001, 0xa964,
-	0x9184, 0x00ff, 0x9086, 0x0003, 0x1130, 0x810f, 0x918c, 0x00ff,
-	0x8101, 0x0108, 0x710e, 0x2900, 0x00d6, 0x2069, 0x0050, 0x6822,
-	0x00de, 0x2071, 0x190e, 0x701c, 0x2048, 0x7010, 0x8001, 0x7012,
-	0xa800, 0x701e, 0x9005, 0x1108, 0x701a, 0x012e, 0x0005, 0x0005,
-	0x00d6, 0x2008, 0x2069, 0x19d2, 0x683c, 0x9005, 0x0760, 0x0158,
-	0x9186, 0x0003, 0x0540, 0x2001, 0x1814, 0x2004, 0x2009, 0x1a9f,
-	0x210c, 0x9102, 0x1500, 0x0126, 0x2091, 0x8000, 0x2069, 0x0050,
-	0x693c, 0x6838, 0x9106, 0x0190, 0x0e04, 0x6b82, 0x2069, 0x0000,
-	0x6837, 0x8040, 0x6833, 0x0012, 0x6883, 0x8040, 0x2091, 0x4080,
-	0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x1187, 0x2069, 0x19d2,
-	0x683f, 0xffff, 0x012e, 0x00de, 0x0126, 0x2091, 0x8000, 0x1e0c,
-	0x6c37, 0x701c, 0x904d, 0x0540, 0x2001, 0x005b, 0x2004, 0x9094,
-	0x0780, 0x15c9, 0xd09c, 0x1500, 0x2071, 0x190e, 0x700f, 0x0001,
-	0xa964, 0x9184, 0x00ff, 0x9086, 0x0003, 0x1130, 0x810f, 0x918c,
-	0x00ff, 0x8101, 0x0108, 0x710e, 0x2900, 0x00d6, 0x2069, 0x0050,
-	0x6822, 0x00de, 0x701c, 0x2048, 0x7010, 0x8001, 0x7012, 0xa800,
-	0x701e, 0x9005, 0x1108, 0x701a, 0x012e, 0x0005, 0x0005, 0x0126,
-	0x2091, 0x8000, 0x701c, 0x904d, 0x0160, 0x7010, 0x8001, 0x7012,
-	0xa800, 0x701e, 0x9005, 0x1108, 0x701a, 0x012e, 0x080c, 0x101d,
-	0x0005, 0x012e, 0x0005, 0x2091, 0x8000, 0x0e04, 0x6bcd, 0x0006,
-	0x0016, 0x2001, 0x8004, 0x0006, 0x0804, 0x0dbd, 0x0096, 0x00f6,
-	0x2079, 0x0050, 0x7044, 0xd084, 0x01c0, 0xc084, 0x7046, 0x7838,
-	0x7938, 0x910e, 0x1de0, 0x00d6, 0x2069, 0x0000, 0x6836, 0x6833,
-	0x0013, 0x00de, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084,
-	0x190c, 0x1187, 0x00fe, 0x009e, 0x0005, 0x782c, 0x9094, 0x0780,
-	0x1991, 0xd0a4, 0x0db8, 0x00e6, 0x2071, 0x1800, 0x7824, 0x00e6,
-	0x2071, 0x0040, 0x712c, 0xd19c, 0x1148, 0x2009, 0x182f, 0x210c,
-	0x918a, 0x0040, 0x0218, 0x7022, 0x00ee, 0x0058, 0x00ee, 0x2048,
-	0x702c, 0xa802, 0x2900, 0x702e, 0x70bc, 0x8000, 0x70be, 0x080c,
-	0x7f64, 0x782c, 0x9094, 0x0780, 0x190c, 0x6bcb, 0xd0a4, 0x19f0,
-	0x7838, 0x7938, 0x910e, 0x1de0, 0x00d6, 0x2069, 0x0000, 0x6836,
-	0x6833, 0x0013, 0x00de, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004,
-	0xd084, 0x190c, 0x1187, 0x00ee, 0x00fe, 0x009e, 0x0005, 0x00f6,
-	0x2079, 0x0050, 0x7044, 0xd084, 0x01b8, 0xc084, 0x7046, 0x7838,
-	0x7938, 0x910e, 0x1de0, 0x00d6, 0x2069, 0x0000, 0x6836, 0x6833,
-	0x0013, 0x00de, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084,
-	0x190c, 0x1187, 0x00fe, 0x0005, 0x782c, 0x9094, 0x0780, 0x190c,
-	0x6bcb, 0xd0a4, 0x0db8, 0x00e6, 0x2071, 0x1800, 0x7824, 0x2048,
-	0x702c, 0xa802, 0x2900, 0x702e, 0x70bc, 0x8000, 0x70be, 0x080c,
-	0x7f64, 0x782c, 0x9094, 0x0780, 0x190c, 0x6bcb, 0xd0a4, 0x1d70,
-	0x00d6, 0x2069, 0x0050, 0x693c, 0x2069, 0x1921, 0x6808, 0x690a,
-	0x2069, 0x19d2, 0x9102, 0x1118, 0x683c, 0x9005, 0x1328, 0x2001,
-	0x1922, 0x200c, 0x810d, 0x693e, 0x00de, 0x00ee, 0x00fe, 0x0005,
-	0x7094, 0x908a, 0x0029, 0x1a0c, 0x0db4, 0x9082, 0x001d, 0x001b,
-	0x6027, 0x1e00, 0x0005, 0x6d5f, 0x6ce5, 0x6d01, 0x6d2b, 0x6d4e,
-	0x6d8e, 0x6da0, 0x6d01, 0x6d76, 0x6ca0, 0x6cce, 0x6c9f, 0x0005,
-	0x00d6, 0x2069, 0x0200, 0x6804, 0x9005, 0x1180, 0x6808, 0x9005,
-	0x1518, 0x7097, 0x0028, 0x2069, 0x1967, 0x2d04, 0x7002, 0x080c,
-	0x70e1, 0x6028, 0x9085, 0x0600, 0x602a, 0x00b0, 0x7097, 0x0028,
-	0x2069, 0x1967, 0x2d04, 0x7002, 0x6028, 0x9085, 0x0600, 0x602a,
-	0x00e6, 0x0036, 0x0046, 0x0056, 0x2071, 0x1a3a, 0x080c, 0x196a,
-	0x005e, 0x004e, 0x003e, 0x00ee, 0x00de, 0x0005, 0x00d6, 0x2069,
-	0x0200, 0x6804, 0x9005, 0x1178, 0x6808, 0x9005, 0x1160, 0x7097,
-	0x0028, 0x2069, 0x1967, 0x2d04, 0x7002, 0x080c, 0x717b, 0x6028,
-	0x9085, 0x0600, 0x602a, 0x00de, 0x0005, 0x0006, 0x2001, 0x0090,
-	0x080c, 0x2b21, 0x000e, 0x6124, 0xd1e4, 0x1190, 0x080c, 0x6e0d,
-	0xd1d4, 0x1160, 0xd1dc, 0x1138, 0xd1cc, 0x0150, 0x7097, 0x0020,
-	0x080c, 0x6e0d, 0x0028, 0x7097, 0x001d, 0x0010, 0x7097, 0x001f,
-	0x0005, 0x2001, 0x0088, 0x080c, 0x2b21, 0x6124, 0xd1cc, 0x11e8,
-	0xd1dc, 0x11c0, 0xd1e4, 0x1198, 0x9184, 0x1e00, 0x11d8, 0x080c,
-	0x198f, 0x60e3, 0x0001, 0x600c, 0xc0b4, 0x600e, 0x080c, 0x6fd6,
-	0x2001, 0x0080, 0x080c, 0x2b21, 0x7097, 0x0028, 0x0058, 0x7097,
-	0x001e, 0x0040, 0x7097, 0x001d, 0x0028, 0x7097, 0x0020, 0x0010,
-	0x7097, 0x001f, 0x0005, 0x080c, 0x198f, 0x60e3, 0x0001, 0x600c,
-	0xc0b4, 0x600e, 0x080c, 0x6fd6, 0x2001, 0x0080, 0x080c, 0x2b21,
-	0x6124, 0xd1d4, 0x1180, 0xd1dc, 0x1158, 0xd1e4, 0x1130, 0x9184,
-	0x1e00, 0x1158, 0x7097, 0x0028, 0x0040, 0x7097, 0x001e, 0x0028,
-	0x7097, 0x001d, 0x0010, 0x7097, 0x001f, 0x0005, 0x2001, 0x00a0,
-	0x080c, 0x2b21, 0x6124, 0xd1dc, 0x1138, 0xd1e4, 0x0138, 0x080c,
-	0x198f, 0x7097, 0x001e, 0x0010, 0x7097, 0x001d, 0x0005, 0x080c,
-	0x6e90, 0x6124, 0xd1dc, 0x1188, 0x080c, 0x6e0d, 0x0016, 0x080c,
-	0x198f, 0x001e, 0xd1d4, 0x1128, 0xd1e4, 0x0138, 0x7097, 0x001e,
-	0x0020, 0x7097, 0x001f, 0x080c, 0x6e0d, 0x0005, 0x0006, 0x2001,
-	0x00a0, 0x080c, 0x2b21, 0x000e, 0x6124, 0xd1d4, 0x1160, 0xd1cc,
-	0x1150, 0xd1dc, 0x1128, 0xd1e4, 0x0140, 0x7097, 0x001e, 0x0028,
-	0x7097, 0x001d, 0x0010, 0x7097, 0x0021, 0x0005, 0x080c, 0x6e90,
-	0x6124, 0xd1d4, 0x1150, 0xd1dc, 0x1128, 0xd1e4, 0x0140, 0x7097,
-	0x001e, 0x0028, 0x7097, 0x001d, 0x0010, 0x7097, 0x001f, 0x0005,
-	0x0006, 0x2001, 0x0090, 0x080c, 0x2b21, 0x000e, 0x6124, 0xd1d4,
-	0x1178, 0xd1cc, 0x1150, 0xd1dc, 0x1128, 0xd1e4, 0x0158, 0x7097,
-	0x001e, 0x0040, 0x7097, 0x001d, 0x0028, 0x7097, 0x0020, 0x0010,
-	0x7097, 0x001f, 0x0005, 0x0016, 0x00c6, 0x00d6, 0x00e6, 0x0126,
+	0x70be, 0x080c, 0x81f0, 0x0e04, 0x6cb7, 0x2071, 0x190e, 0x701c,
+	0x2048, 0xa84c, 0x900d, 0x0d18, 0x2071, 0x0000, 0x7182, 0xa850,
+	0x7032, 0xa86c, 0x7086, 0x7036, 0xa870, 0x708a, 0x2091, 0x4080,
+	0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11e0, 0x2071, 0x190e,
+	0x080c, 0x6e02, 0x002e, 0x00ee, 0x0005, 0x2071, 0x190e, 0xa803,
+	0x0000, 0x2908, 0x7010, 0x8000, 0x7012, 0x7018, 0x904d, 0x711a,
+	0x0110, 0xa902, 0x0008, 0x711e, 0x2148, 0xa804, 0x900d, 0x1118,
+	0x002e, 0x00ee, 0x0005, 0x2071, 0x1800, 0x9016, 0x702c, 0x2148,
+	0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70bc,
+	0x9200, 0x70be, 0x080c, 0x81f0, 0x002e, 0x00ee, 0x0005, 0x0006,
+	0xa87c, 0x0006, 0xa867, 0x0103, 0x20a9, 0x001c, 0xa860, 0x20e8,
+	0xa85c, 0x9080, 0x001d, 0x20a0, 0x9006, 0x4004, 0x000e, 0x9084,
+	0x00ff, 0xa87e, 0x000e, 0xa87a, 0xa982, 0x0005, 0x2071, 0x190e,
+	0x7004, 0x0002, 0x6d3a, 0x6d3b, 0x6e01, 0x6d3b, 0x6d38, 0x6e01,
+	0x080c, 0x0dfa, 0x0005, 0x2001, 0x1921, 0x2004, 0x0002, 0x6d45,
+	0x6d45, 0x6d9a, 0x6d9b, 0x6d45, 0x6d9b, 0x0126, 0x2091, 0x8000,
+	0x1e0c, 0x6e21, 0x701c, 0x904d, 0x01e0, 0xa84c, 0x9005, 0x01d8,
+	0x0e04, 0x6d69, 0xa94c, 0x2071, 0x0000, 0x7182, 0xa850, 0x7032,
+	0xa86c, 0x7086, 0x7036, 0xa870, 0x708a, 0x2091, 0x4080, 0x2001,
+	0x0089, 0x2004, 0xd084, 0x190c, 0x11e0, 0x2071, 0x190e, 0x080c,
+	0x6e02, 0x012e, 0x0470, 0x2001, 0x005b, 0x2004, 0x9094, 0x0780,
+	0x190c, 0x6e16, 0xd09c, 0x2071, 0x190e, 0x1510, 0x2071, 0x190e,
+	0x700f, 0x0001, 0xa964, 0x9184, 0x00ff, 0x9086, 0x0003, 0x1130,
+	0x810f, 0x918c, 0x00ff, 0x8101, 0x0108, 0x710e, 0x2900, 0x00d6,
+	0x2069, 0x0050, 0x6822, 0x00de, 0x2071, 0x190e, 0x701c, 0x2048,
+	0x7010, 0x8001, 0x7012, 0xa800, 0x701e, 0x9005, 0x1108, 0x701a,
+	0x012e, 0x0005, 0x0005, 0x00d6, 0x2008, 0x2069, 0x19d2, 0x683c,
+	0x9005, 0x0760, 0x0158, 0x9186, 0x0003, 0x0540, 0x2001, 0x1814,
+	0x2004, 0x2009, 0x1aa2, 0x210c, 0x9102, 0x1500, 0x0126, 0x2091,
+	0x8000, 0x2069, 0x0050, 0x693c, 0x6838, 0x9106, 0x0190, 0x0e04,
+	0x6dcd, 0x2069, 0x0000, 0x6837, 0x8040, 0x6833, 0x0012, 0x6883,
+	0x8040, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c,
+	0x11e0, 0x2069, 0x19d2, 0x683f, 0xffff, 0x012e, 0x00de, 0x0126,
+	0x2091, 0x8000, 0x1e0c, 0x6e82, 0x701c, 0x904d, 0x0540, 0x2001,
+	0x005b, 0x2004, 0x9094, 0x0780, 0x15c9, 0xd09c, 0x1500, 0x2071,
+	0x190e, 0x700f, 0x0001, 0xa964, 0x9184, 0x00ff, 0x9086, 0x0003,
+	0x1130, 0x810f, 0x918c, 0x00ff, 0x8101, 0x0108, 0x710e, 0x2900,
+	0x00d6, 0x2069, 0x0050, 0x6822, 0x00de, 0x701c, 0x2048, 0x7010,
+	0x8001, 0x7012, 0xa800, 0x701e, 0x9005, 0x1108, 0x701a, 0x012e,
+	0x0005, 0x0005, 0x0126, 0x2091, 0x8000, 0x701c, 0x904d, 0x0160,
+	0x7010, 0x8001, 0x7012, 0xa800, 0x701e, 0x9005, 0x1108, 0x701a,
+	0x012e, 0x080c, 0x1063, 0x0005, 0x012e, 0x0005, 0x2091, 0x8000,
+	0x0e04, 0x6e18, 0x0006, 0x0016, 0x2001, 0x8004, 0x0006, 0x0804,
+	0x0e03, 0x0096, 0x00f6, 0x2079, 0x0050, 0x7044, 0xd084, 0x01c0,
+	0xc084, 0x7046, 0x7838, 0x7938, 0x910e, 0x1de0, 0x00d6, 0x2069,
+	0x0000, 0x6836, 0x6833, 0x0013, 0x00de, 0x2091, 0x4080, 0x2001,
+	0x0089, 0x2004, 0xd084, 0x190c, 0x11e0, 0x00fe, 0x009e, 0x0005,
+	0x782c, 0x9094, 0x0780, 0x1991, 0xd0a4, 0x0db8, 0x00e6, 0x2071,
+	0x1800, 0x7824, 0x00e6, 0x2071, 0x0040, 0x712c, 0xd19c, 0x1148,
+	0x2009, 0x182f, 0x210c, 0x918a, 0x0040, 0x0218, 0x7022, 0x00ee,
+	0x0058, 0x00ee, 0x2048, 0x702c, 0xa802, 0x2900, 0x702e, 0x70bc,
+	0x8000, 0x70be, 0x080c, 0x81f0, 0x782c, 0x9094, 0x0780, 0x190c,
+	0x6e16, 0xd0a4, 0x19f0, 0x7838, 0x7938, 0x910e, 0x1de0, 0x00d6,
+	0x2069, 0x0000, 0x6836, 0x6833, 0x0013, 0x00de, 0x2091, 0x4080,
+	0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11e0, 0x00ee, 0x00fe,
+	0x009e, 0x0005, 0x00f6, 0x2079, 0x0050, 0x7044, 0xd084, 0x01b8,
+	0xc084, 0x7046, 0x7838, 0x7938, 0x910e, 0x1de0, 0x00d6, 0x2069,
+	0x0000, 0x6836, 0x6833, 0x0013, 0x00de, 0x2091, 0x4080, 0x2001,
+	0x0089, 0x2004, 0xd084, 0x190c, 0x11e0, 0x00fe, 0x0005, 0x782c,
+	0x9094, 0x0780, 0x190c, 0x6e16, 0xd0a4, 0x0db8, 0x00e6, 0x2071,
+	0x1800, 0x7824, 0x2048, 0x702c, 0xa802, 0x2900, 0x702e, 0x70bc,
+	0x8000, 0x70be, 0x080c, 0x81f0, 0x782c, 0x9094, 0x0780, 0x190c,
+	0x6e16, 0xd0a4, 0x1d70, 0x00d6, 0x2069, 0x0050, 0x693c, 0x2069,
+	0x1921, 0x6808, 0x690a, 0x2069, 0x19d2, 0x9102, 0x1118, 0x683c,
+	0x9005, 0x1328, 0x2001, 0x1922, 0x200c, 0x810d, 0x693e, 0x00de,
+	0x00ee, 0x00fe, 0x0005, 0x7094, 0x908a, 0x0029, 0x1a0c, 0x0dfa,
+	0x9082, 0x001d, 0x001b, 0x6027, 0x1e00, 0x0005, 0x6faa, 0x6f30,
+	0x6f4c, 0x6f76, 0x6f99, 0x6fd9, 0x6feb, 0x6f4c, 0x6fc1, 0x6eeb,
+	0x6f19, 0x6eea, 0x0005, 0x00d6, 0x2069, 0x0200, 0x6804, 0x9005,
+	0x1180, 0x6808, 0x9005, 0x1518, 0x7097, 0x0028, 0x2069, 0x1967,
+	0x2d04, 0x7002, 0x080c, 0x7359, 0x6028, 0x9085, 0x0600, 0x602a,
+	0x00b0, 0x7097, 0x0028, 0x2069, 0x1967, 0x2d04, 0x7002, 0x6028,
+	0x9085, 0x0600, 0x602a, 0x00e6, 0x0036, 0x0046, 0x0056, 0x2071,
+	0x1a3a, 0x080c, 0x19ff, 0x005e, 0x004e, 0x003e, 0x00ee, 0x00de,
+	0x0005, 0x00d6, 0x2069, 0x0200, 0x6804, 0x9005, 0x1178, 0x6808,
+	0x9005, 0x1160, 0x7097, 0x0028, 0x2069, 0x1967, 0x2d04, 0x7002,
+	0x080c, 0x73f3, 0x6028, 0x9085, 0x0600, 0x602a, 0x00de, 0x0005,
+	0x0006, 0x2001, 0x0090, 0x080c, 0x2c88, 0x000e, 0x6124, 0xd1e4,
+	0x1190, 0x080c, 0x7058, 0xd1d4, 0x1160, 0xd1dc, 0x1138, 0xd1cc,
+	0x0150, 0x7097, 0x0020, 0x080c, 0x7058, 0x0028, 0x7097, 0x001d,
+	0x0010, 0x7097, 0x001f, 0x0005, 0x2001, 0x0088, 0x080c, 0x2c88,
+	0x6124, 0xd1cc, 0x11e8, 0xd1dc, 0x11c0, 0xd1e4, 0x1198, 0x9184,
+	0x1e00, 0x11d8, 0x080c, 0x1a24, 0x60e3, 0x0001, 0x600c, 0xc0b4,
+	0x600e, 0x080c, 0x7233, 0x2001, 0x0080, 0x080c, 0x2c88, 0x7097,
+	0x0028, 0x0058, 0x7097, 0x001e, 0x0040, 0x7097, 0x001d, 0x0028,
+	0x7097, 0x0020, 0x0010, 0x7097, 0x001f, 0x0005, 0x080c, 0x1a24,
+	0x60e3, 0x0001, 0x600c, 0xc0b4, 0x600e, 0x080c, 0x7233, 0x2001,
+	0x0080, 0x080c, 0x2c88, 0x6124, 0xd1d4, 0x1180, 0xd1dc, 0x1158,
+	0xd1e4, 0x1130, 0x9184, 0x1e00, 0x1158, 0x7097, 0x0028, 0x0040,
+	0x7097, 0x001e, 0x0028, 0x7097, 0x001d, 0x0010, 0x7097, 0x001f,
+	0x0005, 0x2001, 0x00a0, 0x080c, 0x2c88, 0x6124, 0xd1dc, 0x1138,
+	0xd1e4, 0x0138, 0x080c, 0x1a24, 0x7097, 0x001e, 0x0010, 0x7097,
+	0x001d, 0x0005, 0x080c, 0x70db, 0x6124, 0xd1dc, 0x1188, 0x080c,
+	0x7058, 0x0016, 0x080c, 0x1a24, 0x001e, 0xd1d4, 0x1128, 0xd1e4,
+	0x0138, 0x7097, 0x001e, 0x0020, 0x7097, 0x001f, 0x080c, 0x7058,
+	0x0005, 0x0006, 0x2001, 0x00a0, 0x080c, 0x2c88, 0x000e, 0x6124,
+	0xd1d4, 0x1160, 0xd1cc, 0x1150, 0xd1dc, 0x1128, 0xd1e4, 0x0140,
+	0x7097, 0x001e, 0x0028, 0x7097, 0x001d, 0x0010, 0x7097, 0x0021,
+	0x0005, 0x080c, 0x70db, 0x6124, 0xd1d4, 0x1150, 0xd1dc, 0x1128,
+	0xd1e4, 0x0140, 0x7097, 0x001e, 0x0028, 0x7097, 0x001d, 0x0010,
+	0x7097, 0x001f, 0x0005, 0x0006, 0x2001, 0x0090, 0x080c, 0x2c88,
+	0x000e, 0x6124, 0xd1d4, 0x1178, 0xd1cc, 0x1150, 0xd1dc, 0x1128,
+	0xd1e4, 0x0158, 0x7097, 0x001e, 0x0040, 0x7097, 0x001d, 0x0028,
+	0x7097, 0x0020, 0x0010, 0x7097, 0x001f, 0x0005, 0x0016, 0x00c6,
+	0x00d6, 0x00e6, 0x0126, 0x2061, 0x0100, 0x2069, 0x0140, 0x2071,
+	0x1800, 0x2091, 0x8000, 0x080c, 0x7207, 0x11d8, 0x2001, 0x180c,
+	0x200c, 0xd1b4, 0x01b0, 0xc1b4, 0x2102, 0x6027, 0x0200, 0x080c,
+	0x2bb0, 0x6024, 0xd0cc, 0x0148, 0x2001, 0x00a0, 0x080c, 0x2c88,
+	0x080c, 0x7504, 0x080c, 0x5f2b, 0x0428, 0x6028, 0xc0cd, 0x602a,
+	0x0408, 0x080c, 0x7221, 0x0150, 0x080c, 0x7218, 0x1138, 0x2001,
+	0x0001, 0x080c, 0x2717, 0x080c, 0x71df, 0x00a0, 0x080c, 0x70d8,
+	0x0178, 0x2001, 0x0001, 0x080c, 0x2717, 0x7094, 0x9086, 0x001e,
+	0x0120, 0x7094, 0x9086, 0x0022, 0x1118, 0x7097, 0x0025, 0x0010,
+	0x7097, 0x0021, 0x012e, 0x00ee, 0x00de, 0x00ce, 0x001e, 0x0005,
+	0x0026, 0x2011, 0x7069, 0x080c, 0x83ae, 0x002e, 0x0016, 0x0026,
+	0x2009, 0x0064, 0x2011, 0x7069, 0x080c, 0x83a5, 0x002e, 0x001e,
+	0x0005, 0x00e6, 0x00f6, 0x0016, 0x080c, 0x9656, 0x2071, 0x1800,
+	0x080c, 0x7006, 0x001e, 0x00fe, 0x00ee, 0x0005, 0x0016, 0x0026,
+	0x0036, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x0126, 0x080c, 0x9656,
 	0x2061, 0x0100, 0x2069, 0x0140, 0x2071, 0x1800, 0x2091, 0x8000,
-	0x080c, 0x6faa, 0x11d8, 0x2001, 0x180c, 0x200c, 0xd1b4, 0x01b0,
-	0xc1b4, 0x2102, 0x6027, 0x0200, 0x080c, 0x2a6a, 0x6024, 0xd0cc,
-	0x0148, 0x2001, 0x00a0, 0x080c, 0x2b21, 0x080c, 0x728c, 0x080c,
-	0x5ce5, 0x0428, 0x6028, 0xc0cd, 0x602a, 0x0408, 0x080c, 0x6fc4,
-	0x0150, 0x080c, 0x6fbb, 0x1138, 0x2001, 0x0001, 0x080c, 0x2619,
-	0x080c, 0x6f82, 0x00a0, 0x080c, 0x6e8d, 0x0178, 0x2001, 0x0001,
-	0x080c, 0x2619, 0x7094, 0x9086, 0x001e, 0x0120, 0x7094, 0x9086,
-	0x0022, 0x1118, 0x7097, 0x0025, 0x0010, 0x7097, 0x0021, 0x012e,
-	0x00ee, 0x00de, 0x00ce, 0x001e, 0x0005, 0x0026, 0x2011, 0x6e1e,
-	0x080c, 0x8113, 0x002e, 0x0016, 0x0026, 0x2009, 0x0064, 0x2011,
-	0x6e1e, 0x080c, 0x810a, 0x002e, 0x001e, 0x0005, 0x00e6, 0x00f6,
-	0x0016, 0x080c, 0x93c7, 0x2071, 0x1800, 0x080c, 0x6dbb, 0x001e,
-	0x00fe, 0x00ee, 0x0005, 0x0016, 0x0026, 0x0036, 0x00c6, 0x00d6,
-	0x00e6, 0x00f6, 0x0126, 0x080c, 0x93c7, 0x2061, 0x0100, 0x2069,
-	0x0140, 0x2071, 0x1800, 0x2091, 0x8000, 0x6028, 0xc09c, 0x602a,
-	0x2011, 0x0003, 0x080c, 0x975b, 0x2011, 0x0002, 0x080c, 0x9765,
-	0x080c, 0x9673, 0x080c, 0x80bf, 0x0036, 0x901e, 0x080c, 0x96e9,
-	0x003e, 0x60e3, 0x0000, 0x080c, 0xd8ee, 0x080c, 0xd909, 0x2009,
-	0x0004, 0x080c, 0x2a70, 0x080c, 0x298b, 0x2001, 0x1800, 0x2003,
-	0x0004, 0x6027, 0x0008, 0x2011, 0x6e1e, 0x080c, 0x8113, 0x080c,
-	0x6fc4, 0x0118, 0x9006, 0x080c, 0x2b21, 0x080c, 0x0b8f, 0x2001,
-	0x0001, 0x080c, 0x2619, 0x012e, 0x00fe, 0x00ee, 0x00de, 0x00ce,
-	0x003e, 0x002e, 0x001e, 0x0005, 0x0026, 0x00e6, 0x2011, 0x6e2b,
-	0x2071, 0x19d2, 0x701c, 0x9206, 0x1118, 0x7018, 0x9005, 0x0110,
-	0x9085, 0x0001, 0x00ee, 0x002e, 0x0005, 0x6020, 0xd09c, 0x0005,
-	0x6800, 0x9084, 0xfffe, 0x9086, 0x00c0, 0x01b8, 0x2001, 0x00c0,
-	0x080c, 0x2b21, 0x0156, 0x20a9, 0x002d, 0x1d04, 0x6e9d, 0x2091,
-	0x6000, 0x1f04, 0x6e9d, 0x015e, 0x00d6, 0x2069, 0x1800, 0x6898,
-	0x8001, 0x0220, 0x0118, 0x689a, 0x00de, 0x0005, 0x689b, 0x0014,
-	0x68e4, 0xd0dc, 0x0dc8, 0x6800, 0x9086, 0x0001, 0x1da8, 0x080c,
-	0x811f, 0x0c90, 0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100, 0x2069,
-	0x0140, 0x2071, 0x1800, 0x080c, 0x729b, 0x2001, 0x1945, 0x2003,
-	0x0000, 0x9006, 0x7096, 0x60e2, 0x6886, 0x080c, 0x26e4, 0x9006,
-	0x080c, 0x2b21, 0x080c, 0x5ba4, 0x6027, 0xffff, 0x602b, 0x182f,
-	0x00ee, 0x00de, 0x00ce, 0x0005, 0x00c6, 0x00d6, 0x00e6, 0x2061,
-	0x0100, 0x2069, 0x0140, 0x2071, 0x1800, 0x2001, 0x1955, 0x200c,
-	0x9186, 0x0000, 0x0158, 0x9186, 0x0001, 0x0158, 0x9186, 0x0002,
-	0x0158, 0x9186, 0x0003, 0x0158, 0x0804, 0x6f72, 0x7097, 0x0022,
-	0x0040, 0x7097, 0x0021, 0x0028, 0x7097, 0x0023, 0x0010, 0x7097,
-	0x0024, 0x60e3, 0x0000, 0x6887, 0x0001, 0x2001, 0x0001, 0x080c,
-	0x26e4, 0x0026, 0x080c, 0x9db5, 0x002e, 0x7000, 0x908e, 0x0004,
-	0x0118, 0x602b, 0x0028, 0x0010, 0x602b, 0x0020, 0x0156, 0x0126,
-	0x2091, 0x8000, 0x20a9, 0x0005, 0x6024, 0xd0ac, 0x0150, 0x012e,
-	0x015e, 0x080c, 0xc23b, 0x0118, 0x9006, 0x080c, 0x2b4b, 0x0804,
-	0x6f7e, 0x6800, 0x9084, 0x00a1, 0xc0bd, 0x6802, 0x080c, 0x2a6a,
-	0x6904, 0xd1d4, 0x1140, 0x2001, 0x0100, 0x080c, 0x2b21, 0x1f04,
-	0x6f1c, 0x080c, 0x7001, 0x012e, 0x015e, 0x080c, 0x6fbb, 0x01a8,
-	0x6044, 0x9005, 0x0168, 0x6050, 0x0006, 0x9085, 0x0020, 0x6052,
-	0x080c, 0x7001, 0x9006, 0x8001, 0x1df0, 0x000e, 0x6052, 0x0028,
-	0x6804, 0xd0d4, 0x1110, 0x080c, 0x7001, 0x080c, 0xc23b, 0x0118,
-	0x9006, 0x080c, 0x2b4b, 0x0016, 0x0026, 0x7000, 0x908e, 0x0004,
-	0x0130, 0x2009, 0x00c8, 0x2011, 0x6e2b, 0x080c, 0x80d1, 0x002e,
-	0x001e, 0x080c, 0x7f5b, 0x7034, 0xc085, 0x7036, 0x2001, 0x1955,
-	0x2003, 0x0004, 0x080c, 0x6c88, 0x080c, 0x6fbb, 0x0138, 0x6804,
-	0xd0d4, 0x1120, 0xd0dc, 0x1100, 0x080c, 0x7291, 0x00ee, 0x00de,
-	0x00ce, 0x0005, 0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100, 0x2069,
-	0x0140, 0x2071, 0x1800, 0x080c, 0x7f72, 0x080c, 0x7f64, 0x080c,
-	0x729b, 0x2001, 0x1945, 0x2003, 0x0000, 0x9006, 0x7096, 0x60e2,
-	0x6886, 0x080c, 0x26e4, 0x9006, 0x080c, 0x2b21, 0x6043, 0x0090,
-	0x6043, 0x0010, 0x6027, 0xffff, 0x602b, 0x182f, 0x00ee, 0x00de,
-	0x00ce, 0x0005, 0x0006, 0x2001, 0x1954, 0x2004, 0x9086, 0xaaaa,
-	0x000e, 0x0005, 0x0006, 0x080c, 0x539e, 0x9084, 0x0030, 0x9086,
-	0x0000, 0x000e, 0x0005, 0x0006, 0x080c, 0x539e, 0x9084, 0x0030,
-	0x9086, 0x0030, 0x000e, 0x0005, 0x0006, 0x080c, 0x539e, 0x9084,
-	0x0030, 0x9086, 0x0010, 0x000e, 0x0005, 0x0006, 0x080c, 0x539e,
-	0x9084, 0x0030, 0x9086, 0x0020, 0x000e, 0x0005, 0x0036, 0x0016,
-	0x2001, 0x180c, 0x2004, 0x908c, 0x0013, 0x0180, 0x0020, 0x080c,
-	0x2704, 0x900e, 0x0028, 0x080c, 0x6572, 0x1dc8, 0x2009, 0x0002,
-	0x2019, 0x0028, 0x080c, 0x2fb2, 0x9006, 0x0019, 0x001e, 0x003e,
-	0x0005, 0x00e6, 0x2071, 0x180c, 0x2e04, 0x0130, 0x080c, 0xc234,
-	0x1128, 0x9085, 0x0010, 0x0010, 0x9084, 0xffef, 0x2072, 0x00ee,
-	0x0005, 0x6050, 0x0006, 0x60ec, 0x0006, 0x600c, 0x0006, 0x6004,
-	0x0006, 0x6028, 0x0006, 0x0016, 0x6138, 0x6050, 0x9084, 0xfbff,
-	0x9085, 0x2000, 0x6052, 0x613a, 0x20a9, 0x0012, 0x1d04, 0x7016,
-	0x2091, 0x6000, 0x1f04, 0x7016, 0x602f, 0x0100, 0x602f, 0x0000,
-	0x6050, 0x9085, 0x0400, 0x9084, 0xdfff, 0x6052, 0x613a, 0x001e,
-	0x602f, 0x0040, 0x602f, 0x0000, 0x000e, 0x602a, 0x000e, 0x6006,
+	0x6028, 0xc09c, 0x602a, 0x2011, 0x0003, 0x080c, 0x9a0f, 0x2011,
+	0x0002, 0x080c, 0x9a19, 0x080c, 0x9927, 0x080c, 0x835a, 0x0036,
+	0x901e, 0x080c, 0x999d, 0x003e, 0x60e3, 0x0000, 0x080c, 0xdc13,
+	0x080c, 0xdc2e, 0x2009, 0x0004, 0x080c, 0x2bb6, 0x080c, 0x2a89,
+	0x2001, 0x1800, 0x2003, 0x0004, 0x6027, 0x0008, 0x2011, 0x7069,
+	0x080c, 0x83ae, 0x080c, 0x7221, 0x0118, 0x9006, 0x080c, 0x2c88,
+	0x080c, 0x0b8f, 0x2001, 0x0001, 0x080c, 0x2717, 0x012e, 0x00fe,
+	0x00ee, 0x00de, 0x00ce, 0x003e, 0x002e, 0x001e, 0x0005, 0x0026,
+	0x00e6, 0x2011, 0x7076, 0x2071, 0x19d2, 0x701c, 0x9206, 0x1118,
+	0x7018, 0x9005, 0x0110, 0x9085, 0x0001, 0x00ee, 0x002e, 0x0005,
+	0x6020, 0xd09c, 0x0005, 0x6800, 0x9084, 0xfffe, 0x9086, 0x00c0,
+	0x01b8, 0x2001, 0x00c0, 0x080c, 0x2c88, 0x0156, 0x20a9, 0x002d,
+	0x1d04, 0x70e8, 0x2091, 0x6000, 0x1f04, 0x70e8, 0x015e, 0x00d6,
+	0x2069, 0x1800, 0x6898, 0x8001, 0x0220, 0x0118, 0x689a, 0x00de,
+	0x0005, 0x689b, 0x0014, 0x68e4, 0xd0dc, 0x0dc8, 0x6800, 0x9086,
+	0x0001, 0x1da8, 0x080c, 0x83ba, 0x0c90, 0x00c6, 0x00d6, 0x00e6,
+	0x2061, 0x0100, 0x2069, 0x0140, 0x2071, 0x1800, 0x080c, 0x7513,
+	0x2001, 0x1945, 0x2003, 0x0000, 0x9006, 0x7096, 0x60e2, 0x6886,
+	0x080c, 0x27e2, 0x9006, 0x080c, 0x2c88, 0x080c, 0x5dea, 0x6027,
+	0xffff, 0x602b, 0x182f, 0x00ee, 0x00de, 0x00ce, 0x0005, 0x00c6,
+	0x00d6, 0x00e6, 0x2061, 0x0100, 0x2069, 0x0140, 0x2071, 0x1800,
+	0x2001, 0x1955, 0x200c, 0x9186, 0x0000, 0x0158, 0x9186, 0x0001,
+	0x0158, 0x9186, 0x0002, 0x0158, 0x9186, 0x0003, 0x0158, 0x0804,
+	0x71cf, 0x7097, 0x0022, 0x0040, 0x7097, 0x0021, 0x0028, 0x7097,
+	0x0023, 0x0010, 0x7097, 0x0024, 0x60e3, 0x0000, 0x6887, 0x0001,
+	0x2001, 0x0001, 0x080c, 0x27e2, 0x0026, 0x080c, 0xa069, 0x002e,
+	0x7000, 0x908e, 0x0004, 0x0118, 0x602b, 0x0028, 0x0010, 0x602b,
+	0x0020, 0x0156, 0x0126, 0x2091, 0x8000, 0x20a9, 0x0005, 0x6024,
+	0xd0ac, 0x0150, 0x012e, 0x015e, 0x080c, 0xc539, 0x0118, 0x9006,
+	0x080c, 0x2cb2, 0x0804, 0x71db, 0x6800, 0x9084, 0x00a1, 0xc0bd,
+	0x6802, 0x080c, 0x2bb0, 0x6904, 0xd1d4, 0x1140, 0x2001, 0x0100,
+	0x080c, 0x2c88, 0x1f04, 0x7167, 0x080c, 0x725e, 0x012e, 0x015e,
+	0x080c, 0x7218, 0x0538, 0x6044, 0x9005, 0x01f8, 0x2001, 0x0100,
+	0x2004, 0x9086, 0x000a, 0x0158, 0x2011, 0x0114, 0x2204, 0x9085,
+	0x0100, 0x2012, 0x6050, 0x0006, 0x9085, 0x0020, 0x6052, 0x080c,
+	0x725e, 0x9006, 0x8001, 0x1df0, 0x2001, 0x0100, 0x2004, 0x9086,
+	0x000a, 0x0140, 0x000e, 0x6052, 0x0028, 0x6804, 0xd0d4, 0x1110,
+	0x080c, 0x725e, 0x080c, 0xc539, 0x0118, 0x9006, 0x080c, 0x2cb2,
+	0x0016, 0x0026, 0x7000, 0x908e, 0x0004, 0x0130, 0x2009, 0x00c8,
+	0x2011, 0x7076, 0x080c, 0x836c, 0x002e, 0x001e, 0x080c, 0x81e7,
+	0x7034, 0xc085, 0x7036, 0x2001, 0x1955, 0x2003, 0x0004, 0x080c,
+	0x6ed3, 0x080c, 0x7218, 0x0138, 0x6804, 0xd0d4, 0x1120, 0xd0dc,
+	0x1100, 0x080c, 0x7509, 0x00ee, 0x00de, 0x00ce, 0x0005, 0x00c6,
+	0x00d6, 0x00e6, 0x2061, 0x0100, 0x2069, 0x0140, 0x2071, 0x1800,
+	0x080c, 0x81fe, 0x080c, 0x81f0, 0x080c, 0x7513, 0x2001, 0x1945,
+	0x2003, 0x0000, 0x9006, 0x7096, 0x60e2, 0x6886, 0x080c, 0x27e2,
+	0x9006, 0x080c, 0x2c88, 0x6043, 0x0090, 0x6043, 0x0010, 0x6027,
+	0xffff, 0x602b, 0x182f, 0x00ee, 0x00de, 0x00ce, 0x0005, 0x0006,
+	0x2001, 0x1954, 0x2004, 0x9086, 0xaaaa, 0x000e, 0x0005, 0x0006,
+	0x080c, 0x55df, 0x9084, 0x0030, 0x9086, 0x0000, 0x000e, 0x0005,
+	0x0006, 0x080c, 0x55df, 0x9084, 0x0030, 0x9086, 0x0030, 0x000e,
+	0x0005, 0x0006, 0x080c, 0x55df, 0x9084, 0x0030, 0x9086, 0x0010,
+	0x000e, 0x0005, 0x0006, 0x080c, 0x55df, 0x9084, 0x0030, 0x9086,
+	0x0020, 0x000e, 0x0005, 0x0036, 0x0016, 0x2001, 0x180c, 0x2004,
+	0x908c, 0x0013, 0x0180, 0x0020, 0x080c, 0x2802, 0x900e, 0x0028,
+	0x080c, 0x67bb, 0x1dc8, 0x2009, 0x0002, 0x2019, 0x0028, 0x080c,
+	0x3156, 0x9006, 0x0019, 0x001e, 0x003e, 0x0005, 0x00e6, 0x2071,
+	0x180c, 0x2e04, 0x0130, 0x080c, 0xc532, 0x1128, 0x9085, 0x0010,
+	0x0010, 0x9084, 0xffef, 0x2072, 0x00ee, 0x0005, 0x6050, 0x0006,
+	0x60ec, 0x0006, 0x600c, 0x0006, 0x6004, 0x0006, 0x6028, 0x0006,
+	0x2001, 0x0100, 0x2004, 0x9086, 0x000a, 0x0510, 0x0016, 0x6138,
+	0x6050, 0x9084, 0xfbff, 0x9085, 0x2000, 0x6052, 0x613a, 0x20a9,
+	0x0012, 0x1d04, 0x7279, 0x2091, 0x6000, 0x1f04, 0x7279, 0x602f,
+	0x0100, 0x602f, 0x0000, 0x6050, 0x9085, 0x0400, 0x9084, 0xdfff,
+	0x6052, 0x613a, 0x001e, 0x602f, 0x0040, 0x602f, 0x0000, 0x00a0,
+	0x080c, 0x2cc2, 0x080c, 0x2cf5, 0x602f, 0x0100, 0x602f, 0x0000,
+	0x602f, 0x0040, 0x602f, 0x0000, 0x20a9, 0x0002, 0x080c, 0x2b91,
+	0x0026, 0x6027, 0x0040, 0x002e, 0x000e, 0x602a, 0x000e, 0x6006,
 	0x000e, 0x600e, 0x000e, 0x60ee, 0x60e3, 0x0000, 0x6887, 0x0001,
-	0x2001, 0x0001, 0x080c, 0x26e4, 0x2001, 0x00a0, 0x0006, 0x080c,
-	0xc23b, 0x000e, 0x0130, 0x080c, 0x2b3f, 0x9006, 0x080c, 0x2b4b,
-	0x0010, 0x080c, 0x2b21, 0x000e, 0x6052, 0x6050, 0x0006, 0xc0e5,
-	0x6052, 0x00f6, 0x2079, 0x0100, 0x080c, 0x29df, 0x00fe, 0x000e,
+	0x2001, 0x0001, 0x080c, 0x27e2, 0x2001, 0x00a0, 0x0006, 0x080c,
+	0xc539, 0x000e, 0x0130, 0x080c, 0x2ca6, 0x9006, 0x080c, 0x2cb2,
+	0x0010, 0x080c, 0x2c88, 0x000e, 0x6052, 0x6050, 0x0006, 0xc0e5,
+	0x6052, 0x00f6, 0x2079, 0x0100, 0x080c, 0x2b06, 0x00fe, 0x000e,
 	0x6052, 0x0005, 0x0156, 0x0016, 0x0026, 0x0036, 0x00c6, 0x00d6,
 	0x00e6, 0x2061, 0x0100, 0x2069, 0x0140, 0x2071, 0x1800, 0x6020,
 	0x9084, 0x0080, 0x0138, 0x2001, 0x180c, 0x200c, 0xc1c5, 0x2102,
-	0x0804, 0x70d3, 0x2001, 0x180c, 0x200c, 0xc1c4, 0x2102, 0x6028,
+	0x0804, 0x734b, 0x2001, 0x180c, 0x200c, 0xc1c4, 0x2102, 0x6028,
 	0x9084, 0xe1ff, 0x602a, 0x6027, 0x0200, 0x2001, 0x0090, 0x080c,
-	0x2b21, 0x20a9, 0x0366, 0x6024, 0xd0cc, 0x1518, 0x1d04, 0x7083,
-	0x2091, 0x6000, 0x1f04, 0x7083, 0x2011, 0x0003, 0x080c, 0x975b,
-	0x2011, 0x0002, 0x080c, 0x9765, 0x080c, 0x9673, 0x901e, 0x080c,
-	0x96e9, 0x2001, 0x00a0, 0x080c, 0x2b21, 0x080c, 0x728c, 0x080c,
-	0x5ce5, 0x080c, 0xc23b, 0x0110, 0x080c, 0x0d22, 0x9085, 0x0001,
-	0x0480, 0x080c, 0x198f, 0x60e3, 0x0000, 0x2001, 0x0002, 0x080c,
-	0x26e4, 0x60e2, 0x2001, 0x0080, 0x080c, 0x2b21, 0x20a9, 0x0366,
-	0x6027, 0x1e00, 0x2009, 0x1e00, 0x080c, 0x2a6a, 0x6024, 0x910c,
-	0x0138, 0x1d04, 0x70b8, 0x2091, 0x6000, 0x1f04, 0x70b8, 0x0820,
+	0x2c88, 0x20a9, 0x0366, 0x6024, 0xd0cc, 0x1518, 0x1d04, 0x72fb,
+	0x2091, 0x6000, 0x1f04, 0x72fb, 0x2011, 0x0003, 0x080c, 0x9a0f,
+	0x2011, 0x0002, 0x080c, 0x9a19, 0x080c, 0x9927, 0x901e, 0x080c,
+	0x999d, 0x2001, 0x00a0, 0x080c, 0x2c88, 0x080c, 0x7504, 0x080c,
+	0x5f2b, 0x080c, 0xc539, 0x0110, 0x080c, 0x0d68, 0x9085, 0x0001,
+	0x0480, 0x080c, 0x1a24, 0x60e3, 0x0000, 0x2001, 0x0002, 0x080c,
+	0x27e2, 0x60e2, 0x2001, 0x0080, 0x080c, 0x2c88, 0x20a9, 0x0366,
+	0x6027, 0x1e00, 0x2009, 0x1e00, 0x080c, 0x2bb0, 0x6024, 0x910c,
+	0x0138, 0x1d04, 0x7330, 0x2091, 0x6000, 0x1f04, 0x7330, 0x0820,
 	0x6028, 0x9085, 0x1e00, 0x602a, 0x70b0, 0x9005, 0x1118, 0x6887,
-	0x0001, 0x0008, 0x6886, 0x080c, 0xc23b, 0x0110, 0x080c, 0x0d22,
+	0x0001, 0x0008, 0x6886, 0x080c, 0xc539, 0x0110, 0x080c, 0x0d68,
 	0x9006, 0x00ee, 0x00de, 0x00ce, 0x003e, 0x002e, 0x001e, 0x015e,
 	0x0005, 0x0156, 0x0016, 0x0026, 0x0036, 0x00c6, 0x00d6, 0x00e6,
 	0x2061, 0x0100, 0x2071, 0x1800, 0x7000, 0x9086, 0x0003, 0x1168,
 	0x2001, 0x020b, 0x2004, 0x9084, 0x5540, 0x9086, 0x5540, 0x1128,
 	0x2069, 0x1a50, 0x2d04, 0x8000, 0x206a, 0x2069, 0x0140, 0x6020,
-	0x9084, 0x00c0, 0x0120, 0x6884, 0x9005, 0x1904, 0x7146, 0x2001,
-	0x0088, 0x080c, 0x2b21, 0x9006, 0x60e2, 0x6886, 0x080c, 0x26e4,
+	0x9084, 0x00c0, 0x0120, 0x6884, 0x9005, 0x1904, 0x73be, 0x2001,
+	0x0088, 0x080c, 0x2c88, 0x9006, 0x60e2, 0x6886, 0x080c, 0x27e2,
 	0x2069, 0x0200, 0x6804, 0x9005, 0x1118, 0x6808, 0x9005, 0x01c0,
 	0x6028, 0x9084, 0xfbff, 0x602a, 0x6027, 0x0400, 0x2069, 0x1967,
 	0x7000, 0x206a, 0x7097, 0x0026, 0x7003, 0x0001, 0x20a9, 0x0002,
-	0x1d04, 0x7128, 0x2091, 0x6000, 0x1f04, 0x7128, 0x0804, 0x7173,
+	0x1d04, 0x73a0, 0x2091, 0x6000, 0x1f04, 0x73a0, 0x0804, 0x73eb,
 	0x2069, 0x0140, 0x20a9, 0x0384, 0x6027, 0x1e00, 0x2009, 0x1e00,
-	0x080c, 0x2a6a, 0x6024, 0x910c, 0x0508, 0x9084, 0x1a00, 0x11f0,
-	0x1d04, 0x7134, 0x2091, 0x6000, 0x1f04, 0x7134, 0x2011, 0x0003,
-	0x080c, 0x975b, 0x2011, 0x0002, 0x080c, 0x9765, 0x080c, 0x9673,
-	0x901e, 0x080c, 0x96e9, 0x2001, 0x00a0, 0x080c, 0x2b21, 0x080c,
-	0x728c, 0x080c, 0x5ce5, 0x9085, 0x0001, 0x00a8, 0x2001, 0x0080,
-	0x080c, 0x2b21, 0x2069, 0x0140, 0x60e3, 0x0000, 0x70b0, 0x9005,
+	0x080c, 0x2bb0, 0x6024, 0x910c, 0x0508, 0x9084, 0x1a00, 0x11f0,
+	0x1d04, 0x73ac, 0x2091, 0x6000, 0x1f04, 0x73ac, 0x2011, 0x0003,
+	0x080c, 0x9a0f, 0x2011, 0x0002, 0x080c, 0x9a19, 0x080c, 0x9927,
+	0x901e, 0x080c, 0x999d, 0x2001, 0x00a0, 0x080c, 0x2c88, 0x080c,
+	0x7504, 0x080c, 0x5f2b, 0x9085, 0x0001, 0x00a8, 0x2001, 0x0080,
+	0x080c, 0x2c88, 0x2069, 0x0140, 0x60e3, 0x0000, 0x70b0, 0x9005,
 	0x1118, 0x6887, 0x0001, 0x0008, 0x6886, 0x2001, 0x0002, 0x080c,
-	0x26e4, 0x60e2, 0x9006, 0x00ee, 0x00de, 0x00ce, 0x003e, 0x002e,
+	0x27e2, 0x60e2, 0x9006, 0x00ee, 0x00de, 0x00ce, 0x003e, 0x002e,
 	0x001e, 0x015e, 0x0005, 0x0156, 0x0016, 0x0026, 0x0036, 0x00c6,
 	0x00d6, 0x00e6, 0x2061, 0x0100, 0x2071, 0x1800, 0x6020, 0x9084,
-	0x00c0, 0x01c8, 0x2011, 0x0003, 0x080c, 0x975b, 0x2011, 0x0002,
-	0x080c, 0x9765, 0x080c, 0x9673, 0x901e, 0x080c, 0x96e9, 0x2069,
-	0x0140, 0x2001, 0x00a0, 0x080c, 0x2b21, 0x080c, 0x728c, 0x080c,
-	0x5ce5, 0x0804, 0x720d, 0x2001, 0x180c, 0x200c, 0xd1b4, 0x1160,
-	0xc1b5, 0x2102, 0x080c, 0x6e13, 0x2069, 0x0140, 0x2001, 0x0080,
-	0x080c, 0x2b21, 0x60e3, 0x0000, 0x2069, 0x0200, 0x6804, 0x9005,
+	0x00c0, 0x01c8, 0x2011, 0x0003, 0x080c, 0x9a0f, 0x2011, 0x0002,
+	0x080c, 0x9a19, 0x080c, 0x9927, 0x901e, 0x080c, 0x999d, 0x2069,
+	0x0140, 0x2001, 0x00a0, 0x080c, 0x2c88, 0x080c, 0x7504, 0x080c,
+	0x5f2b, 0x0804, 0x7485, 0x2001, 0x180c, 0x200c, 0xd1b4, 0x1160,
+	0xc1b5, 0x2102, 0x080c, 0x705e, 0x2069, 0x0140, 0x2001, 0x0080,
+	0x080c, 0x2c88, 0x60e3, 0x0000, 0x2069, 0x0200, 0x6804, 0x9005,
 	0x1118, 0x6808, 0x9005, 0x0180, 0x6028, 0x9084, 0xfdff, 0x602a,
 	0x6027, 0x0200, 0x2069, 0x1967, 0x7000, 0x206a, 0x7097, 0x0027,
-	0x7003, 0x0001, 0x0804, 0x720d, 0x6027, 0x1e00, 0x2009, 0x1e00,
-	0x080c, 0x2a6a, 0x6024, 0x910c, 0x01c8, 0x9084, 0x1c00, 0x11b0,
-	0x1d04, 0x71cc, 0x0006, 0x0016, 0x00c6, 0x00d6, 0x00e6, 0x080c,
-	0x7fa3, 0x00ee, 0x00de, 0x00ce, 0x001e, 0x000e, 0x00e6, 0x2071,
+	0x7003, 0x0001, 0x0804, 0x7485, 0x6027, 0x1e00, 0x2009, 0x1e00,
+	0x080c, 0x2bb0, 0x6024, 0x910c, 0x01c8, 0x9084, 0x1c00, 0x11b0,
+	0x1d04, 0x7444, 0x0006, 0x0016, 0x00c6, 0x00d6, 0x00e6, 0x080c,
+	0x823e, 0x00ee, 0x00de, 0x00ce, 0x001e, 0x000e, 0x00e6, 0x2071,
 	0x19d2, 0x7070, 0x00ee, 0x9005, 0x19f8, 0x00f8, 0x0026, 0x2011,
-	0x6e2b, 0x080c, 0x803f, 0x2011, 0x6e1e, 0x080c, 0x8113, 0x002e,
+	0x7076, 0x080c, 0x82da, 0x2011, 0x7069, 0x080c, 0x83ae, 0x002e,
 	0x2069, 0x0140, 0x60e3, 0x0000, 0x70b0, 0x9005, 0x1118, 0x6887,
-	0x0001, 0x0008, 0x6886, 0x2001, 0x0002, 0x080c, 0x26e4, 0x60e2,
+	0x0001, 0x0008, 0x6886, 0x2001, 0x0002, 0x080c, 0x27e2, 0x60e2,
 	0x2001, 0x180c, 0x200c, 0xc1b4, 0x2102, 0x00ee, 0x00de, 0x00ce,
 	0x003e, 0x002e, 0x001e, 0x015e, 0x0005, 0x0156, 0x0016, 0x0026,
 	0x0036, 0x0046, 0x00c6, 0x00e6, 0x2061, 0x0100, 0x2071, 0x1800,
-	0x080c, 0xc234, 0x1904, 0x727a, 0x7130, 0xd184, 0x1170, 0x080c,
-	0x3140, 0x0138, 0xc18d, 0x7132, 0x2011, 0x185c, 0x2214, 0xd2ac,
-	0x1120, 0x7030, 0xd08c, 0x0904, 0x727a, 0x2011, 0x185c, 0x220c,
-	0x0438, 0x0016, 0x2019, 0x000e, 0x080c, 0xd4e0, 0x0156, 0x00b6,
+	0x080c, 0xc532, 0x1904, 0x74f2, 0x7130, 0xd184, 0x1170, 0x080c,
+	0x32e4, 0x0138, 0xc18d, 0x7132, 0x2011, 0x185c, 0x2214, 0xd2ac,
+	0x1120, 0x7030, 0xd08c, 0x0904, 0x74f2, 0x2011, 0x185c, 0x220c,
+	0x0438, 0x0016, 0x2019, 0x000e, 0x080c, 0xd801, 0x0156, 0x00b6,
 	0x20a9, 0x007f, 0x900e, 0x9186, 0x007e, 0x01a0, 0x9186, 0x0080,
-	0x0188, 0x080c, 0x6256, 0x1170, 0x2120, 0x9006, 0x0016, 0x2009,
-	0x000e, 0x080c, 0xd564, 0x2009, 0x0001, 0x2011, 0x0100, 0x080c,
-	0x8236, 0x001e, 0x8108, 0x1f04, 0x7243, 0x00be, 0x015e, 0x001e,
+	0x0188, 0x080c, 0x649f, 0x1170, 0x2120, 0x9006, 0x0016, 0x2009,
+	0x000e, 0x080c, 0xd885, 0x2009, 0x0001, 0x2011, 0x0100, 0x080c,
+	0x84d1, 0x001e, 0x8108, 0x1f04, 0x74bb, 0x00be, 0x015e, 0x001e,
 	0xd1ac, 0x1148, 0x0016, 0x2009, 0x0002, 0x2019, 0x0004, 0x080c,
-	0x2fb2, 0x001e, 0x0078, 0x0156, 0x00b6, 0x20a9, 0x007f, 0x900e,
-	0x080c, 0x6256, 0x1110, 0x080c, 0x5cff, 0x8108, 0x1f04, 0x7270,
-	0x00be, 0x015e, 0x080c, 0x198f, 0x080c, 0x9db5, 0x60e3, 0x0000,
-	0x080c, 0x5ce5, 0x080c, 0x6edc, 0x00ee, 0x00ce, 0x004e, 0x003e,
+	0x3156, 0x001e, 0x0078, 0x0156, 0x00b6, 0x20a9, 0x007f, 0x900e,
+	0x080c, 0x649f, 0x1110, 0x080c, 0x5f45, 0x8108, 0x1f04, 0x74e8,
+	0x00be, 0x015e, 0x080c, 0x1a24, 0x080c, 0xa069, 0x60e3, 0x0000,
+	0x080c, 0x5f2b, 0x080c, 0x7127, 0x00ee, 0x00ce, 0x004e, 0x003e,
 	0x002e, 0x001e, 0x015e, 0x0005, 0x2001, 0x1955, 0x2003, 0x0001,
 	0x0005, 0x2001, 0x1955, 0x2003, 0x0000, 0x0005, 0x2001, 0x1954,
 	0x2003, 0xaaaa, 0x0005, 0x2001, 0x1954, 0x2003, 0x0000, 0x0005,
-	0x2071, 0x18f8, 0x7003, 0x0000, 0x7007, 0x0000, 0x080c, 0x1004,
-	0x090c, 0x0db4, 0xa8ab, 0xdcb0, 0x2900, 0x704e, 0x080c, 0x1004,
-	0x090c, 0x0db4, 0xa8ab, 0xdcb0, 0x2900, 0x7052, 0xa867, 0x0000,
+	0x2071, 0x18f8, 0x7003, 0x0000, 0x7007, 0x0000, 0x080c, 0x104a,
+	0x090c, 0x0dfa, 0xa8ab, 0xdcb0, 0x2900, 0x704e, 0x080c, 0x104a,
+	0x090c, 0x0dfa, 0xa8ab, 0xdcb0, 0x2900, 0x7052, 0xa867, 0x0000,
 	0xa86b, 0x0001, 0xa89f, 0x0000, 0x0005, 0x00e6, 0x2071, 0x0040,
 	0x6848, 0x9005, 0x1118, 0x9085, 0x0001, 0x04b0, 0x6840, 0x9005,
 	0x0150, 0x04a1, 0x6a50, 0x9200, 0x7002, 0x6854, 0x9101, 0x7006,
@@ -3473,2043 +3552,2051 @@
 	0x6848, 0x701a, 0x701c, 0x9085, 0x0040, 0x701e, 0x2001, 0x0019,
 	0x7036, 0x702b, 0x0001, 0x2001, 0x0004, 0x200c, 0x918c, 0xfff7,
 	0x918d, 0x8000, 0x2102, 0x00d6, 0x2069, 0x18f8, 0x6807, 0x0001,
-	0x00de, 0x080c, 0x788e, 0x9006, 0x00ee, 0x0005, 0x900e, 0x0156,
-	0x20a9, 0x0006, 0x8003, 0x2011, 0x0100, 0x2214, 0x9296, 0x0008,
-	0x1110, 0x818d, 0x0010, 0x81f5, 0x3e08, 0x1f04, 0x7302, 0x015e,
-	0x0005, 0x2079, 0x0040, 0x2071, 0x18f8, 0x7004, 0x0002, 0x7321,
-	0x7322, 0x735a, 0x73b5, 0x74f6, 0x731f, 0x731f, 0x7520, 0x080c,
-	0x0db4, 0x0005, 0x2079, 0x0040, 0x782c, 0x908c, 0x0780, 0x190c,
-	0x791a, 0xd0a4, 0x01f8, 0x7824, 0x2048, 0x9006, 0xa802, 0xa806,
-	0xa864, 0x9084, 0x00ff, 0x908a, 0x0040, 0x0610, 0x00c0, 0x2001,
-	0x1800, 0x200c, 0x9186, 0x0003, 0x1168, 0x7004, 0x0002, 0x734a,
-	0x7324, 0x734a, 0x7348, 0x734a, 0x734a, 0x734a, 0x734a, 0x734a,
-	0x080c, 0x73b5, 0x782c, 0xd09c, 0x090c, 0x788e, 0x0005, 0x9082,
-	0x005a, 0x1218, 0x2100, 0x003b, 0x0c10, 0x080c, 0x73eb, 0x0c90,
-	0x00e3, 0x08e8, 0x0005, 0x73eb, 0x73eb, 0x73eb, 0x73eb, 0x73eb,
-	0x73eb, 0x73eb, 0x73eb, 0x740d, 0x73eb, 0x73eb, 0x73eb, 0x73eb,
-	0x73eb, 0x73eb, 0x73eb, 0x73eb, 0x73eb, 0x73eb, 0x73eb, 0x73eb,
-	0x73eb, 0x73eb, 0x73eb, 0x73eb, 0x73eb, 0x73eb, 0x73eb, 0x73f7,
-	0x73eb, 0x75f5, 0x73eb, 0x73eb, 0x73eb, 0x740d, 0x73eb, 0x73f7,
-	0x7636, 0x7677, 0x76be, 0x76d2, 0x73eb, 0x73eb, 0x740d, 0x73f7,
-	0x73eb, 0x73eb, 0x74ca, 0x777d, 0x7798, 0x73eb, 0x740d, 0x73eb,
-	0x73eb, 0x73eb, 0x73eb, 0x74c0, 0x7798, 0x73eb, 0x73eb, 0x73eb,
-	0x73eb, 0x73eb, 0x73eb, 0x73eb, 0x73eb, 0x73eb, 0x7421, 0x73eb,
-	0x73eb, 0x73eb, 0x73eb, 0x73eb, 0x73eb, 0x73eb, 0x73eb, 0x73eb,
-	0x78be, 0x73eb, 0x73eb, 0x73eb, 0x73eb, 0x73eb, 0x7435, 0x73eb,
-	0x73eb, 0x73eb, 0x73eb, 0x73eb, 0x73eb, 0x2079, 0x0040, 0x7004,
-	0x9086, 0x0003, 0x1198, 0x782c, 0x080c, 0x78b7, 0xd0a4, 0x0170,
-	0x7824, 0x2048, 0x9006, 0xa802, 0xa806, 0xa864, 0x9084, 0x00ff,
-	0x908a, 0x001a, 0x1210, 0x002b, 0x0c50, 0x00e9, 0x080c, 0x788e,
-	0x0005, 0x73eb, 0x73f7, 0x75e1, 0x73eb, 0x73f7, 0x73eb, 0x73f7,
-	0x73f7, 0x73eb, 0x73f7, 0x75e1, 0x73f7, 0x73f7, 0x73f7, 0x73f7,
-	0x73f7, 0x73eb, 0x73f7, 0x75e1, 0x73eb, 0x73eb, 0x73f7, 0x73eb,
-	0x73eb, 0x73eb, 0x73f7, 0x00e6, 0x2071, 0x18f8, 0x2009, 0x0400,
-	0x0071, 0x00ee, 0x0005, 0x2009, 0x1000, 0x0049, 0x0005, 0x2009,
-	0x2000, 0x0029, 0x0005, 0x2009, 0x0800, 0x0009, 0x0005, 0x7007,
-	0x0001, 0xa868, 0x9084, 0x00ff, 0x9105, 0xa86a, 0x0126, 0x2091,
-	0x8000, 0x080c, 0x68a0, 0x012e, 0x0005, 0xa864, 0x8007, 0x9084,
-	0x00ff, 0x0d08, 0x8001, 0x1120, 0x7007, 0x0001, 0x0804, 0x759f,
-	0x7007, 0x0003, 0x7012, 0x2900, 0x7016, 0x701a, 0x704b, 0x759f,
-	0x0005, 0xa864, 0x8007, 0x9084, 0x00ff, 0x0968, 0x8001, 0x1120,
-	0x7007, 0x0001, 0x0804, 0x75ba, 0x7007, 0x0003, 0x7012, 0x2900,
-	0x7016, 0x701a, 0x704b, 0x75ba, 0x0005, 0xa864, 0x8007, 0x9084,
-	0x00ff, 0x9086, 0x0001, 0x1904, 0x73f3, 0x7007, 0x0001, 0x2009,
-	0x1833, 0x210c, 0x81ff, 0x1904, 0x7497, 0xa994, 0x9186, 0x006f,
-	0x0188, 0x9186, 0x0074, 0x15b0, 0x0026, 0x2011, 0x0010, 0x080c,
-	0x659e, 0x002e, 0x0578, 0x0016, 0xa998, 0x080c, 0x65e8, 0x001e,
-	0x1548, 0x0400, 0x080c, 0x6faa, 0x0140, 0xa897, 0x4005, 0xa89b,
-	0x0016, 0x2001, 0x0030, 0x900e, 0x0438, 0x0026, 0x2011, 0x8008,
-	0x080c, 0x659e, 0x002e, 0x01b0, 0x0016, 0x0026, 0x0036, 0xa998,
-	0xaaa0, 0xab9c, 0x918d, 0x8000, 0x080c, 0x65e8, 0x003e, 0x002e,
-	0x001e, 0x1140, 0xa897, 0x4005, 0xa89b, 0x4009, 0x2001, 0x0030,
-	0x900e, 0x0050, 0xa868, 0x9084, 0x00ff, 0xa86a, 0xa883, 0x0000,
-	0x080c, 0x5f14, 0x1108, 0x0005, 0x0126, 0x2091, 0x8000, 0xa867,
-	0x0139, 0xa87a, 0xa982, 0x080c, 0x68a0, 0x012e, 0x0ca0, 0xa994,
-	0x9186, 0x0071, 0x0904, 0x7445, 0x9186, 0x0064, 0x0904, 0x7445,
-	0x9186, 0x007c, 0x0904, 0x7445, 0x9186, 0x0028, 0x0904, 0x7445,
-	0x9186, 0x0038, 0x0904, 0x7445, 0x9186, 0x0078, 0x0904, 0x7445,
-	0x9186, 0x005f, 0x0904, 0x7445, 0x9186, 0x0056, 0x0904, 0x7445,
-	0xa897, 0x4005, 0xa89b, 0x0001, 0x2001, 0x0030, 0x900e, 0x0860,
-	0xa87c, 0x9084, 0x00c0, 0x9086, 0x00c0, 0x1120, 0x7007, 0x0001,
-	0x0804, 0x77af, 0x2900, 0x7016, 0x701a, 0x20a9, 0x0004, 0xa860,
-	0x20e0, 0xa85c, 0x9080, 0x0030, 0x2098, 0x7050, 0x2040, 0xa060,
-	0x20e8, 0xa05c, 0x9080, 0x0023, 0x20a0, 0x4003, 0xa888, 0x7012,
-	0x9082, 0x0401, 0x1a04, 0x73fb, 0xaab4, 0x928a, 0x0002, 0x1a04,
-	0x73fb, 0x82ff, 0x1138, 0xa8b8, 0xa9bc, 0x9105, 0x0118, 0x2001,
-	0x755d, 0x0018, 0x9280, 0x7553, 0x2005, 0x7056, 0x7010, 0x9015,
-	0x0904, 0x753e, 0x080c, 0x1004, 0x1118, 0x7007, 0x0004, 0x0005,
-	0x2900, 0x7022, 0x7054, 0x2060, 0xe000, 0xa866, 0x7050, 0x2040,
-	0xa95c, 0xe004, 0x9100, 0xa076, 0xa860, 0xa072, 0xe008, 0x920a,
-	0x1210, 0x900e, 0x2200, 0x7112, 0xe20c, 0x8003, 0x800b, 0x9296,
-	0x0004, 0x0108, 0x9108, 0xa17a, 0x810b, 0xa17e, 0x080c, 0x10d5,
-	0xa06c, 0x908e, 0x0100, 0x0170, 0x9086, 0x0200, 0x0118, 0x7007,
-	0x0007, 0x0005, 0x7020, 0x2048, 0x080c, 0x101d, 0x7014, 0x2048,
-	0x0804, 0x73fb, 0x7020, 0x2048, 0x7018, 0xa802, 0xa807, 0x0000,
-	0x2908, 0x2048, 0xa906, 0x711a, 0x0804, 0x74f6, 0x7014, 0x2048,
-	0x7007, 0x0001, 0xa8b4, 0x9005, 0x1128, 0xa8b8, 0xa9bc, 0x9105,
-	0x0108, 0x00b9, 0xa864, 0x9084, 0x00ff, 0x9086, 0x001e, 0x0904,
-	0x77af, 0x0804, 0x759f, 0x7555, 0x7559, 0x0002, 0x001d, 0x0007,
-	0x0004, 0x000a, 0x001b, 0x0005, 0x0006, 0x000a, 0x001d, 0x0005,
-	0x0004, 0x0076, 0x0066, 0xafb8, 0xaebc, 0xa804, 0x2050, 0xb0c0,
-	0xb0e2, 0xb0bc, 0xb0de, 0xb0b8, 0xb0d2, 0xb0b4, 0xb0ce, 0xb6da,
-	0xb7d6, 0xb0b0, 0xb0ca, 0xb0ac, 0xb0c6, 0xb0a8, 0xb0ba, 0xb0a4,
-	0xb0b6, 0xb6c2, 0xb7be, 0xb0a0, 0xb0b2, 0xb09c, 0xb0ae, 0xb098,
-	0xb0a2, 0xb094, 0xb09e, 0xb6aa, 0xb7a6, 0xb090, 0xb09a, 0xb08c,
-	0xb096, 0xb088, 0xb08a, 0xb084, 0xb086, 0xb692, 0xb78e, 0xb080,
-	0xb082, 0xb07c, 0xb07e, 0xb078, 0xb072, 0xb074, 0xb06e, 0xb67a,
-	0xb776, 0xb004, 0x9055, 0x1958, 0x006e, 0x007e, 0x0005, 0x2009,
-	0x1833, 0x210c, 0x81ff, 0x1178, 0x080c, 0x5d61, 0x1108, 0x0005,
-	0x080c, 0x6ace, 0x0126, 0x2091, 0x8000, 0x080c, 0xbe2f, 0x080c,
-	0x68a0, 0x012e, 0x0ca0, 0x080c, 0xc234, 0x1d70, 0x2001, 0x0028,
-	0x900e, 0x0c70, 0x2009, 0x1833, 0x210c, 0x81ff, 0x11d8, 0xa888,
-	0x9005, 0x01e0, 0xa883, 0x0000, 0xa87c, 0xd0f4, 0x0120, 0x080c,
-	0x5e76, 0x1138, 0x0005, 0x9006, 0xa87a, 0x080c, 0x5df1, 0x1108,
-	0x0005, 0x0126, 0x2091, 0x8000, 0xa87a, 0xa982, 0x080c, 0x68a0,
-	0x012e, 0x0cb0, 0x2001, 0x0028, 0x900e, 0x0c98, 0x2001, 0x0000,
-	0x0c80, 0x7018, 0xa802, 0x2908, 0x2048, 0xa906, 0x711a, 0x7010,
-	0x8001, 0x7012, 0x0118, 0x7007, 0x0003, 0x0030, 0x7014, 0x2048,
-	0x7007, 0x0001, 0x7048, 0x080f, 0x0005, 0x00b6, 0x7007, 0x0001,
-	0xa974, 0xa878, 0x9084, 0x00ff, 0x9096, 0x0004, 0x0540, 0x20a9,
-	0x0001, 0x9096, 0x0001, 0x0190, 0x900e, 0x20a9, 0x0800, 0x9096,
-	0x0002, 0x0160, 0x9005, 0x11d8, 0xa974, 0x080c, 0x6256, 0x11b8,
-	0x0066, 0xae80, 0x080c, 0x6366, 0x006e, 0x0088, 0x0046, 0x2011,
-	0x180c, 0x2224, 0xc484, 0x2412, 0x004e, 0x00c6, 0x080c, 0x6256,
-	0x1110, 0x080c, 0x6466, 0x8108, 0x1f04, 0x761e, 0x00ce, 0xa87c,
-	0xd084, 0x1120, 0x080c, 0x101d, 0x00be, 0x0005, 0x0126, 0x2091,
-	0x8000, 0x080c, 0x68a0, 0x012e, 0x00be, 0x0005, 0x0126, 0x2091,
-	0x8000, 0x7007, 0x0001, 0x080c, 0x6576, 0x0580, 0x2061, 0x1a48,
-	0x6100, 0xd184, 0x0178, 0xa888, 0x9084, 0x00ff, 0x1550, 0x6000,
-	0xd084, 0x0520, 0x6004, 0x9005, 0x1538, 0x6003, 0x0000, 0x600b,
-	0x0000, 0x00c8, 0x2011, 0x0001, 0xa890, 0x9005, 0x1110, 0x2001,
-	0x001e, 0x8000, 0x6016, 0xa888, 0x9084, 0x00ff, 0x0178, 0x6006,
-	0xa888, 0x8007, 0x9084, 0x00ff, 0x0148, 0x600a, 0xa888, 0x8000,
-	0x1108, 0xc28d, 0x6202, 0x012e, 0x0804, 0x7878, 0x012e, 0x0804,
-	0x7872, 0x012e, 0x0804, 0x786c, 0x012e, 0x0804, 0x786f, 0x0126,
-	0x2091, 0x8000, 0x7007, 0x0001, 0x080c, 0x6576, 0x05e0, 0x2061,
-	0x1a48, 0x6000, 0xd084, 0x05b8, 0x6204, 0x6308, 0xd08c, 0x1530,
-	0xac78, 0x9484, 0x0003, 0x0170, 0xa988, 0x918c, 0x00ff, 0x8001,
-	0x1120, 0x2100, 0x9210, 0x0620, 0x0028, 0x8001, 0x1508, 0x2100,
-	0x9212, 0x02f0, 0x9484, 0x000c, 0x0188, 0xa988, 0x810f, 0x918c,
-	0x00ff, 0x9082, 0x0004, 0x1120, 0x2100, 0x9318, 0x0288, 0x0030,
-	0x9082, 0x0004, 0x1168, 0x2100, 0x931a, 0x0250, 0xa890, 0x9005,
-	0x0110, 0x8000, 0x6016, 0x6206, 0x630a, 0x012e, 0x0804, 0x7878,
-	0x012e, 0x0804, 0x7875, 0x012e, 0x0804, 0x7872, 0x0126, 0x2091,
-	0x8000, 0x7007, 0x0001, 0x2061, 0x1a48, 0x6300, 0xd38c, 0x1120,
-	0x6308, 0x8318, 0x0220, 0x630a, 0x012e, 0x0804, 0x7886, 0x012e,
-	0x0804, 0x7875, 0x00b6, 0x0126, 0x00c6, 0x2091, 0x8000, 0x7007,
-	0x0001, 0xa87c, 0xd0ac, 0x0148, 0x00c6, 0x2061, 0x1a48, 0x6000,
-	0x9084, 0xfcff, 0x6002, 0x00ce, 0x0440, 0xa888, 0x9005, 0x05d8,
-	0xa88c, 0x9065, 0x0598, 0x2001, 0x1833, 0x2004, 0x9005, 0x0118,
-	0x080c, 0x9e5f, 0x0068, 0x6017, 0xf400, 0x605b, 0x0000, 0xa97c,
-	0xd1a4, 0x0110, 0xa980, 0x615a, 0x2009, 0x0041, 0x080c, 0x9ea9,
-	0xa988, 0x918c, 0xff00, 0x9186, 0x2000, 0x1138, 0x0026, 0x900e,
-	0x2011, 0xfdff, 0x080c, 0x8236, 0x002e, 0xa87c, 0xd0c4, 0x0148,
-	0x2061, 0x1a48, 0x6000, 0xd08c, 0x1120, 0x6008, 0x8000, 0x0208,
-	0x600a, 0x00ce, 0x012e, 0x00be, 0x0804, 0x7878, 0x00ce, 0x012e,
-	0x00be, 0x0804, 0x7872, 0xa984, 0x9186, 0x002e, 0x0d30, 0x9186,
-	0x002d, 0x0d18, 0x9186, 0x0045, 0x0510, 0x9186, 0x002a, 0x1130,
-	0x2001, 0x180c, 0x200c, 0xc194, 0x2102, 0x08b8, 0x9186, 0x0020,
-	0x0158, 0x9186, 0x0029, 0x1d10, 0xa974, 0x080c, 0x6256, 0x1968,
-	0xb800, 0xc0e4, 0xb802, 0x0848, 0xa88c, 0x9065, 0x09b8, 0x6007,
-	0x0024, 0x2001, 0x195e, 0x2004, 0x601a, 0x0804, 0x770d, 0xa88c,
-	0x9065, 0x0960, 0x00e6, 0xa890, 0x9075, 0x2001, 0x1833, 0x2004,
-	0x9005, 0x0150, 0x080c, 0x9e5f, 0x8eff, 0x0118, 0x2e60, 0x080c,
-	0x9e5f, 0x00ee, 0x0804, 0x770d, 0x6024, 0xc0dc, 0xc0d5, 0x6026,
-	0x2e60, 0x6007, 0x003a, 0xa8a0, 0x9005, 0x0130, 0x6007, 0x003b,
-	0xa8a4, 0x602e, 0xa8a8, 0x6016, 0x6003, 0x0001, 0x080c, 0x83f8,
-	0x080c, 0x898b, 0x00ee, 0x0804, 0x770d, 0x2061, 0x1a48, 0x6000,
-	0xd084, 0x0190, 0xd08c, 0x1904, 0x7886, 0x0126, 0x2091, 0x8000,
-	0x6204, 0x8210, 0x0220, 0x6206, 0x012e, 0x0804, 0x7886, 0x012e,
-	0xa883, 0x0016, 0x0804, 0x787f, 0xa883, 0x0007, 0x0804, 0x787f,
-	0xa864, 0x8007, 0x9084, 0x00ff, 0x0130, 0x8001, 0x1138, 0x7007,
-	0x0001, 0x0069, 0x0005, 0x080c, 0x73f3, 0x0040, 0x7007, 0x0003,
-	0x7012, 0x2900, 0x7016, 0x701a, 0x704b, 0x77af, 0x0005, 0x00b6,
-	0x00e6, 0x0126, 0x2091, 0x8000, 0x903e, 0x2061, 0x1800, 0x61cc,
-	0x81ff, 0x1904, 0x7831, 0x6130, 0xd194, 0x1904, 0x785b, 0xa878,
-	0x2070, 0x9e82, 0x1cd0, 0x0a04, 0x7825, 0x6064, 0x9e02, 0x1a04,
-	0x7825, 0x7120, 0x9186, 0x0006, 0x1904, 0x7817, 0x7010, 0x905d,
-	0x0904, 0x7831, 0xb800, 0xd0e4, 0x1904, 0x7855, 0x2061, 0x1a48,
-	0x6100, 0x9184, 0x0301, 0x9086, 0x0001, 0x15a0, 0x7024, 0xd0dc,
-	0x1904, 0x785e, 0xa883, 0x0000, 0xa803, 0x0000, 0x2908, 0x7014,
-	0x9005, 0x1198, 0x7116, 0xa87c, 0xd0f4, 0x1904, 0x7861, 0x080c,
-	0x539a, 0xd09c, 0x1118, 0xa87c, 0xc0cc, 0xa87e, 0x2e60, 0x080c,
-	0x8156, 0x012e, 0x00ee, 0x00be, 0x0005, 0x2048, 0xa800, 0x9005,
-	0x1de0, 0xa902, 0x2148, 0xa87c, 0xd0f4, 0x1904, 0x7861, 0x012e,
-	0x00ee, 0x00be, 0x0005, 0x012e, 0x00ee, 0xa883, 0x0006, 0x00be,
-	0x0804, 0x787f, 0xd184, 0x0db8, 0xd1c4, 0x1190, 0x00a0, 0xa974,
-	0x080c, 0x6256, 0x15d0, 0xb800, 0xd0e4, 0x15b8, 0x7120, 0x9186,
-	0x0007, 0x1118, 0xa883, 0x0002, 0x0490, 0xa883, 0x0008, 0x0478,
-	0xa883, 0x000e, 0x0460, 0xa883, 0x0017, 0x0448, 0xa883, 0x0035,
-	0x0430, 0x080c, 0x539e, 0xd0fc, 0x01e8, 0xa878, 0x2070, 0x9e82,
-	0x1cd0, 0x02c0, 0x6064, 0x9e02, 0x12a8, 0x7120, 0x9186, 0x0006,
-	0x1188, 0x7010, 0x905d, 0x0170, 0xb800, 0xd0bc, 0x0158, 0x2039,
-	0x0001, 0x7000, 0x9086, 0x0007, 0x1904, 0x77bb, 0x7003, 0x0002,
-	0x0804, 0x77bb, 0xa883, 0x0028, 0x0010, 0xa883, 0x0029, 0x012e,
-	0x00ee, 0x00be, 0x0420, 0xa883, 0x002a, 0x0cc8, 0xa883, 0x0045,
-	0x0cb0, 0x2e60, 0x2019, 0x0002, 0x601b, 0x0014, 0x080c, 0xd11f,
-	0x012e, 0x00ee, 0x00be, 0x0005, 0x2009, 0x003e, 0x0058, 0x2009,
-	0x0004, 0x0040, 0x2009, 0x0006, 0x0028, 0x2009, 0x0016, 0x0010,
-	0x2009, 0x0001, 0xa884, 0x9084, 0xff00, 0x9105, 0xa886, 0x0126,
-	0x2091, 0x8000, 0x080c, 0x68a0, 0x012e, 0x0005, 0x080c, 0x101d,
-	0x0005, 0x00d6, 0x080c, 0x814d, 0x00de, 0x0005, 0x00d6, 0x00e6,
-	0x0126, 0x2091, 0x8000, 0x2071, 0x0040, 0x702c, 0xd084, 0x01d8,
-	0x908c, 0x0780, 0x190c, 0x791a, 0xd09c, 0x11a8, 0x2071, 0x1800,
-	0x70bc, 0x90ea, 0x0040, 0x0278, 0x8001, 0x70be, 0x702c, 0x2048,
-	0xa800, 0x702e, 0x9006, 0xa802, 0xa806, 0x2071, 0x0040, 0x2900,
-	0x7022, 0x702c, 0x0c28, 0x012e, 0x00ee, 0x00de, 0x0005, 0x0006,
-	0x9084, 0x0780, 0x190c, 0x791a, 0x000e, 0x0005, 0x00d6, 0x00c6,
-	0x0036, 0x0026, 0x0016, 0x00b6, 0x7007, 0x0001, 0xaa74, 0x9282,
-	0x0004, 0x1a04, 0x790b, 0xa97c, 0x9188, 0x1000, 0x2104, 0x905d,
-	0xb804, 0xd284, 0x0140, 0x05e8, 0x8007, 0x9084, 0x00ff, 0x9084,
-	0x0006, 0x1108, 0x04b0, 0x2b10, 0x080c, 0x9dd9, 0x1118, 0x080c,
-	0x9e7c, 0x05a8, 0x6212, 0xa874, 0x0002, 0x78e9, 0x78ee, 0x78f1,
-	0x78f7, 0x2019, 0x0002, 0x080c, 0xd4e0, 0x0060, 0x080c, 0xd47c,
-	0x0048, 0x2019, 0x0002, 0xa980, 0x080c, 0xd497, 0x0018, 0xa980,
-	0x080c, 0xd47c, 0x080c, 0x9e2f, 0xa887, 0x0000, 0x0126, 0x2091,
-	0x8000, 0x080c, 0x68a0, 0x012e, 0x00be, 0x001e, 0x002e, 0x003e,
-	0x00ce, 0x00de, 0x0005, 0xa887, 0x0006, 0x0c80, 0xa887, 0x0002,
-	0x0c68, 0xa887, 0x0005, 0x0c50, 0xa887, 0x0004, 0x0c38, 0xa887,
-	0x0007, 0x0c20, 0x2091, 0x8000, 0x0e04, 0x791c, 0x0006, 0x0016,
-	0x2001, 0x8003, 0x0006, 0x0804, 0x0dbd, 0x2001, 0x1833, 0x2004,
-	0x9005, 0x0005, 0x0005, 0x00f6, 0x2079, 0x0300, 0x2001, 0x0200,
-	0x200c, 0xc1e5, 0xc1dc, 0x2102, 0x2009, 0x0218, 0x210c, 0xd1ec,
-	0x1120, 0x080c, 0x14a9, 0x00fe, 0x0005, 0x2001, 0x020d, 0x2003,
-	0x0020, 0x781f, 0x0300, 0x00fe, 0x0005, 0x781c, 0xd08c, 0x0904,
-	0x799c, 0x68bc, 0x90aa, 0x0005, 0x0a04, 0x7f5b, 0x7d44, 0x7c40,
-	0x9584, 0x00f6, 0x1510, 0x9484, 0x7000, 0x0140, 0x908a, 0x2000,
-	0x1260, 0x9584, 0x0700, 0x8007, 0x0804, 0x79a3, 0x7000, 0x9084,
-	0xff00, 0x9086, 0x8100, 0x0da8, 0x00b0, 0x9484, 0x0fff, 0x1130,
-	0x7000, 0x9084, 0xff00, 0x9086, 0x8100, 0x11c0, 0x080c, 0xd8c6,
-	0x080c, 0x7e90, 0x7817, 0x0140, 0x00a8, 0x9584, 0x0076, 0x1118,
-	0x080c, 0x7eee, 0x19c0, 0xd5a4, 0x0148, 0x0046, 0x0056, 0x080c,
-	0x79fe, 0x080c, 0x21da, 0x005e, 0x004e, 0x0020, 0x080c, 0xd8c6,
-	0x7817, 0x0140, 0x080c, 0x6faa, 0x0168, 0x2001, 0x0111, 0x2004,
-	0xd08c, 0x0140, 0x688f, 0x0000, 0x2001, 0x0110, 0x2003, 0x0008,
-	0x2003, 0x0000, 0x080c, 0x79df, 0x2001, 0x19c8, 0x2004, 0x9005,
-	0x090c, 0x898b, 0x0005, 0x0002, 0x79b5, 0x7cb2, 0x79ac, 0x79ac,
-	0x79ac, 0x79ac, 0x79ac, 0x79ac, 0x7817, 0x0140, 0x2001, 0x19c8,
-	0x2004, 0x9005, 0x090c, 0x898b, 0x0005, 0x7000, 0x908c, 0xff00,
-	0x9194, 0xf000, 0x810f, 0x9484, 0x0fff, 0x688e, 0x9286, 0x2000,
-	0x1150, 0x6800, 0x9086, 0x0001, 0x1118, 0x080c, 0x53fb, 0x0070,
-	0x080c, 0x7a1e, 0x0058, 0x9286, 0x3000, 0x1118, 0x080c, 0x7bed,
-	0x0028, 0x9286, 0x8000, 0x1110, 0x080c, 0x7dc0, 0x7817, 0x0140,
-	0x2001, 0x19c8, 0x2004, 0x9005, 0x090c, 0x898b, 0x0005, 0x2001,
-	0x1810, 0x2004, 0xd08c, 0x0178, 0x2001, 0x1800, 0x2004, 0x9086,
-	0x0003, 0x1148, 0x0026, 0x0036, 0x2011, 0x8048, 0x2518, 0x080c,
-	0x48f4, 0x003e, 0x002e, 0x0005, 0x0036, 0x0046, 0x0056, 0x00f6,
-	0x2079, 0x0200, 0x2019, 0xfffe, 0x7c30, 0x0050, 0x0036, 0x0046,
-	0x0056, 0x00f6, 0x2079, 0x0200, 0x7d44, 0x7c40, 0x2019, 0xffff,
-	0x2001, 0x1810, 0x2004, 0xd08c, 0x0160, 0x2001, 0x1800, 0x2004,
-	0x9086, 0x0003, 0x1130, 0x0026, 0x2011, 0x8048, 0x080c, 0x48f4,
-	0x002e, 0x00fe, 0x005e, 0x004e, 0x003e, 0x0005, 0x00b6, 0x00c6,
-	0x7010, 0x9084, 0xff00, 0x8007, 0x9096, 0x0001, 0x0120, 0x9096,
-	0x0023, 0x1904, 0x7bbe, 0x9186, 0x0023, 0x15c0, 0x080c, 0x7e55,
-	0x0904, 0x7bbe, 0x6120, 0x9186, 0x0001, 0x0150, 0x9186, 0x0004,
-	0x0138, 0x9186, 0x0008, 0x0120, 0x9186, 0x000a, 0x1904, 0x7bbe,
-	0x7124, 0x610a, 0x7030, 0x908e, 0x0200, 0x1130, 0x2009, 0x0015,
-	0x080c, 0x9ea9, 0x0804, 0x7bbe, 0x908e, 0x0214, 0x0118, 0x908e,
-	0x0210, 0x1130, 0x2009, 0x0015, 0x080c, 0x9ea9, 0x0804, 0x7bbe,
-	0x908e, 0x0100, 0x1904, 0x7bbe, 0x7034, 0x9005, 0x1904, 0x7bbe,
-	0x2009, 0x0016, 0x080c, 0x9ea9, 0x0804, 0x7bbe, 0x9186, 0x0022,
-	0x1904, 0x7bbe, 0x7030, 0x908e, 0x0300, 0x1580, 0x68d8, 0xd0a4,
-	0x0528, 0xc0b5, 0x68da, 0x7100, 0x918c, 0x00ff, 0x697a, 0x7004,
-	0x687e, 0x00f6, 0x2079, 0x0100, 0x79e6, 0x78ea, 0x0006, 0x9084,
-	0x00ff, 0x0016, 0x2008, 0x080c, 0x26b9, 0x7932, 0x7936, 0x001e,
-	0x000e, 0x00fe, 0x080c, 0x2670, 0x695a, 0x703c, 0x00e6, 0x2071,
-	0x0140, 0x7086, 0x2071, 0x1800, 0x70b2, 0x00ee, 0x7034, 0x9005,
-	0x1904, 0x7bbe, 0x2009, 0x0017, 0x0804, 0x7b6e, 0x908e, 0x0400,
-	0x1190, 0x7034, 0x9005, 0x1904, 0x7bbe, 0x080c, 0x6faa, 0x0120,
-	0x2009, 0x001d, 0x0804, 0x7b6e, 0x68d8, 0xc0a5, 0x68da, 0x2009,
-	0x0030, 0x0804, 0x7b6e, 0x908e, 0x0500, 0x1140, 0x7034, 0x9005,
-	0x1904, 0x7bbe, 0x2009, 0x0018, 0x0804, 0x7b6e, 0x908e, 0x2010,
-	0x1120, 0x2009, 0x0019, 0x0804, 0x7b6e, 0x908e, 0x2110, 0x1120,
-	0x2009, 0x001a, 0x0804, 0x7b6e, 0x908e, 0x5200, 0x1140, 0x7034,
-	0x9005, 0x1904, 0x7bbe, 0x2009, 0x001b, 0x0804, 0x7b6e, 0x908e,
-	0x5000, 0x1140, 0x7034, 0x9005, 0x1904, 0x7bbe, 0x2009, 0x001c,
-	0x0804, 0x7b6e, 0x908e, 0x1300, 0x1120, 0x2009, 0x0034, 0x0804,
-	0x7b6e, 0x908e, 0x1200, 0x1140, 0x7034, 0x9005, 0x1904, 0x7bbe,
-	0x2009, 0x0024, 0x0804, 0x7b6e, 0x908c, 0xff00, 0x918e, 0x2400,
-	0x1170, 0x2009, 0x002d, 0x2001, 0x1810, 0x2004, 0xd09c, 0x0904,
-	0x7b6e, 0x080c, 0xc8e6, 0x1904, 0x7bbe, 0x0804, 0x7b6c, 0x908c,
-	0xff00, 0x918e, 0x5300, 0x1120, 0x2009, 0x002a, 0x0804, 0x7b6e,
-	0x908e, 0x0f00, 0x1120, 0x2009, 0x0020, 0x0804, 0x7b6e, 0x908e,
-	0x6104, 0x1528, 0x2029, 0x0205, 0x2011, 0x026d, 0x8208, 0x2204,
-	0x9082, 0x0004, 0x8004, 0x8004, 0x20a8, 0x2011, 0x8015, 0x211c,
-	0x8108, 0x0046, 0x2124, 0x080c, 0x48f4, 0x004e, 0x8108, 0x0f04,
-	0x7b3a, 0x9186, 0x0280, 0x1d88, 0x2504, 0x8000, 0x202a, 0x2009,
-	0x0260, 0x0c58, 0x202b, 0x0000, 0x2009, 0x0023, 0x0478, 0x908e,
-	0x6000, 0x1118, 0x2009, 0x003f, 0x0448, 0x908e, 0x7800, 0x1118,
-	0x2009, 0x0045, 0x0418, 0x908e, 0x1000, 0x1118, 0x2009, 0x004e,
-	0x00e8, 0x908e, 0x6300, 0x1118, 0x2009, 0x004a, 0x00b8, 0x908c,
-	0xff00, 0x918e, 0x5600, 0x1118, 0x2009, 0x004f, 0x0078, 0x908c,
-	0xff00, 0x918e, 0x5700, 0x1118, 0x2009, 0x0050, 0x0038, 0x2009,
-	0x001d, 0x6838, 0xd0d4, 0x0110, 0x2009, 0x004c, 0x0016, 0x2011,
-	0x0263, 0x2204, 0x8211, 0x220c, 0x080c, 0x2670, 0x1904, 0x7bc1,
-	0x080c, 0x61f6, 0x1904, 0x7bc1, 0xbe12, 0xbd16, 0x001e, 0x0016,
-	0x080c, 0x6faa, 0x01c0, 0x68d8, 0xd08c, 0x1148, 0x7000, 0x9084,
-	0x00ff, 0x1188, 0x7004, 0x9084, 0xff00, 0x1168, 0x0040, 0x6878,
-	0x9606, 0x1148, 0x687c, 0x9506, 0x9084, 0xff00, 0x1120, 0x9584,
-	0x00ff, 0xb8b2, 0x0080, 0xb8b0, 0x9005, 0x1168, 0x9186, 0x0046,
-	0x1150, 0x6878, 0x9606, 0x1138, 0x687c, 0x9506, 0x9084, 0xff00,
-	0x1110, 0x001e, 0x0098, 0x080c, 0x9dd9, 0x01a8, 0x2b08, 0x6112,
-	0x6023, 0x0004, 0x7120, 0x610a, 0x001e, 0x9186, 0x004c, 0x1110,
-	0x6023, 0x000a, 0x0016, 0x001e, 0x080c, 0x9ea9, 0x00ce, 0x00be,
-	0x0005, 0x001e, 0x0cd8, 0x2001, 0x180e, 0x2004, 0xd0ec, 0x0120,
-	0x2011, 0x8049, 0x080c, 0x48f4, 0x080c, 0x9e7c, 0x0d90, 0x2b08,
-	0x6112, 0x6023, 0x0004, 0x7120, 0x610a, 0x001e, 0x0016, 0x9186,
-	0x0017, 0x0118, 0x9186, 0x0030, 0x1128, 0x6007, 0x0009, 0x6017,
-	0x2900, 0x0020, 0x6007, 0x0051, 0x6017, 0x0000, 0x602f, 0x0009,
-	0x6003, 0x0001, 0x080c, 0x8440, 0x08a0, 0x080c, 0x310a, 0x1140,
-	0x7010, 0x9084, 0xff00, 0x8007, 0x908e, 0x0008, 0x1108, 0x0009,
-	0x0005, 0x00b6, 0x00c6, 0x0046, 0x7000, 0x908c, 0xff00, 0x810f,
-	0x9186, 0x0033, 0x11e8, 0x080c, 0x7e55, 0x0904, 0x7c4a, 0x7124,
-	0x610a, 0x7030, 0x908e, 0x0200, 0x1140, 0x7034, 0x9005, 0x15d0,
-	0x2009, 0x0015, 0x080c, 0x9ea9, 0x04a8, 0x908e, 0x0100, 0x1590,
-	0x7034, 0x9005, 0x1578, 0x2009, 0x0016, 0x080c, 0x9ea9, 0x0450,
-	0x9186, 0x0032, 0x1538, 0x7030, 0x908e, 0x1400, 0x1518, 0x2009,
-	0x0038, 0x0016, 0x2011, 0x0263, 0x2204, 0x8211, 0x220c, 0x080c,
-	0x2670, 0x11b8, 0x080c, 0x61f6, 0x11a0, 0xbe12, 0xbd16, 0x080c,
-	0x9dd9, 0x0178, 0x2b08, 0x6112, 0x080c, 0xbfb5, 0x6023, 0x0004,
-	0x7120, 0x610a, 0x001e, 0x080c, 0x9ea9, 0x080c, 0x898b, 0x0010,
-	0x00ce, 0x001e, 0x004e, 0x00ce, 0x00be, 0x0005, 0x00b6, 0x0046,
-	0x00e6, 0x00d6, 0x2028, 0x2130, 0x9696, 0x00ff, 0x11b8, 0x9592,
-	0xfffc, 0x02a0, 0x9596, 0xfffd, 0x1120, 0x2009, 0x007f, 0x0804,
-	0x7cac, 0x9596, 0xfffe, 0x1120, 0x2009, 0x007e, 0x0804, 0x7cac,
-	0x9596, 0xfffc, 0x1118, 0x2009, 0x0080, 0x04f0, 0x2011, 0x0000,
-	0x2019, 0x1836, 0x231c, 0xd3ac, 0x0130, 0x9026, 0x20a9, 0x0800,
-	0x2071, 0x1000, 0x0030, 0x2021, 0x0081, 0x20a9, 0x077f, 0x2071,
-	0x1081, 0x2e1c, 0x93dd, 0x0000, 0x1140, 0x82ff, 0x11d0, 0x9496,
-	0x00ff, 0x01b8, 0x2410, 0xc2fd, 0x00a0, 0xbf10, 0x2600, 0x9706,
-	0xb814, 0x1120, 0x9546, 0x1110, 0x2408, 0x00b0, 0x9745, 0x1148,
-	0x94c6, 0x007e, 0x0130, 0x94c6, 0x007f, 0x0118, 0x94c6, 0x0080,
-	0x1d20, 0x8420, 0x8e70, 0x1f04, 0x7c81, 0x82ff, 0x1118, 0x9085,
-	0x0001, 0x0018, 0xc2fc, 0x2208, 0x9006, 0x00de, 0x00ee, 0x004e,
-	0x00be, 0x0005, 0x7000, 0x908c, 0xff00, 0x810f, 0x9184, 0x000f,
-	0x0002, 0x7cc9, 0x7cc9, 0x7cc9, 0x7e67, 0x7cc9, 0x7cd2, 0x7cfd,
-	0x7d8b, 0x7cc9, 0x7cc9, 0x7cc9, 0x7cc9, 0x7cc9, 0x7cc9, 0x7cc9,
-	0x7cc9, 0x7817, 0x0140, 0x2001, 0x19c8, 0x2004, 0x9005, 0x090c,
-	0x898b, 0x0005, 0x00b6, 0x7110, 0xd1bc, 0x01e8, 0x7120, 0x2160,
-	0x9c8c, 0x0007, 0x11c0, 0x9c8a, 0x1cd0, 0x02a8, 0x6864, 0x9c02,
-	0x1290, 0x7008, 0x9084, 0x00ff, 0x6110, 0x2158, 0xb910, 0x9106,
-	0x1150, 0x700c, 0xb914, 0x9106, 0x1130, 0x7124, 0x610a, 0x2009,
-	0x0046, 0x080c, 0x9ea9, 0x7817, 0x0140, 0x2001, 0x19c8, 0x2004,
-	0x9005, 0x090c, 0x898b, 0x00be, 0x0005, 0x00b6, 0x00c6, 0x9484,
-	0x0fff, 0x0904, 0x7d61, 0x7110, 0xd1bc, 0x1904, 0x7d61, 0x7108,
-	0x700c, 0x2028, 0x918c, 0x00ff, 0x2130, 0x9094, 0xff00, 0x15b0,
-	0x81ff, 0x15a0, 0x9080, 0x3145, 0x200d, 0x918c, 0xff00, 0x810f,
-	0x2001, 0x0080, 0x9106, 0x0904, 0x7d61, 0x080c, 0x61f6, 0x1904,
-	0x7d61, 0xbe12, 0xbd16, 0xb800, 0xd0ec, 0x15d8, 0xba04, 0x9294,
-	0xff00, 0x9286, 0x0600, 0x11a0, 0x080c, 0x9dd9, 0x05e8, 0x2b08,
-	0x7028, 0x604a, 0x702c, 0x6046, 0x6112, 0x6023, 0x0006, 0x7120,
-	0x610a, 0x7130, 0x6156, 0x2009, 0x0044, 0x080c, 0xcb44, 0x0408,
-	0x080c, 0x657a, 0x1138, 0xb807, 0x0606, 0x0c30, 0x190c, 0x7c4e,
-	0x11c0, 0x0898, 0x080c, 0x9dd9, 0x2b08, 0x0198, 0x6112, 0x6023,
-	0x0004, 0x7120, 0x610a, 0x9286, 0x0400, 0x1118, 0x6007, 0x0005,
-	0x0010, 0x6007, 0x0001, 0x6003, 0x0001, 0x080c, 0x8440, 0x080c,
-	0x898b, 0x7817, 0x0140, 0x2001, 0x19c8, 0x2004, 0x9005, 0x090c,
-	0x898b, 0x00ce, 0x00be, 0x0005, 0x2001, 0x180e, 0x2004, 0xd0ec,
-	0x0120, 0x2011, 0x8049, 0x080c, 0x48f4, 0x080c, 0x9e7c, 0x0d48,
-	0x2b08, 0x6112, 0x6023, 0x0006, 0x7120, 0x610a, 0x7130, 0x6156,
-	0x6017, 0xf300, 0x6003, 0x0001, 0x6007, 0x0041, 0x080c, 0x83f8,
-	0x080c, 0x898b, 0x08b0, 0x00b6, 0x7110, 0xd1bc, 0x01e8, 0x7020,
-	0x2060, 0x9c84, 0x0007, 0x11c0, 0x9c82, 0x1cd0, 0x02a8, 0x6864,
-	0x9c02, 0x1290, 0x7008, 0x9084, 0x00ff, 0x6110, 0x2158, 0xb910,
-	0x9106, 0x1150, 0x700c, 0xb914, 0x9106, 0x1130, 0x7124, 0x610a,
-	0x2009, 0x0045, 0x080c, 0x9ea9, 0x7817, 0x0140, 0x2001, 0x19c8,
-	0x2004, 0x9005, 0x090c, 0x898b, 0x00be, 0x0005, 0x6120, 0x9186,
-	0x0002, 0x0128, 0x9186, 0x0005, 0x0110, 0x9085, 0x0001, 0x0005,
-	0x080c, 0x310a, 0x1168, 0x7010, 0x9084, 0xff00, 0x8007, 0x9086,
-	0x0000, 0x1130, 0x9184, 0x000f, 0x908a, 0x0006, 0x1208, 0x000b,
-	0x0005, 0x7dd7, 0x7dd8, 0x7dd7, 0x7dd7, 0x7e37, 0x7e46, 0x0005,
-	0x00b6, 0x7110, 0xd1bc, 0x0120, 0x702c, 0xd084, 0x0904, 0x7e35,
-	0x700c, 0x7108, 0x080c, 0x2670, 0x1904, 0x7e35, 0x080c, 0x61f6,
-	0x1904, 0x7e35, 0xbe12, 0xbd16, 0x7110, 0xd1bc, 0x01d8, 0x080c,
-	0x657a, 0x0118, 0x9086, 0x0004, 0x1588, 0x00c6, 0x080c, 0x7e55,
-	0x00ce, 0x05d8, 0x080c, 0x9dd9, 0x2b08, 0x05b8, 0x6112, 0x080c,
-	0xbfb5, 0x6023, 0x0002, 0x7120, 0x610a, 0x2009, 0x0088, 0x080c,
-	0x9ea9, 0x0458, 0x080c, 0x657a, 0x0148, 0x9086, 0x0004, 0x0130,
-	0x080c, 0x6582, 0x0118, 0x9086, 0x0004, 0x1180, 0x080c, 0x9dd9,
-	0x2b08, 0x01d8, 0x6112, 0x080c, 0xbfb5, 0x6023, 0x0005, 0x7120,
-	0x610a, 0x2009, 0x0088, 0x080c, 0x9ea9, 0x0078, 0x080c, 0x9dd9,
-	0x2b08, 0x0158, 0x6112, 0x080c, 0xbfb5, 0x6023, 0x0004, 0x7120,
-	0x610a, 0x2009, 0x0001, 0x080c, 0x9ea9, 0x00be, 0x0005, 0x7110,
-	0xd1bc, 0x0158, 0x00d1, 0x0148, 0x080c, 0x7db6, 0x1130, 0x7124,
-	0x610a, 0x2009, 0x0089, 0x080c, 0x9ea9, 0x0005, 0x7110, 0xd1bc,
-	0x0158, 0x0059, 0x0148, 0x080c, 0x7db6, 0x1130, 0x7124, 0x610a,
-	0x2009, 0x008a, 0x080c, 0x9ea9, 0x0005, 0x7020, 0x2060, 0x9c84,
-	0x0007, 0x1158, 0x9c82, 0x1cd0, 0x0240, 0x2001, 0x1819, 0x2004,
-	0x9c02, 0x1218, 0x9085, 0x0001, 0x0005, 0x9006, 0x0ce8, 0x00b6,
-	0x7110, 0xd1bc, 0x11d8, 0x7024, 0x2060, 0x9c84, 0x0007, 0x11b0,
-	0x9c82, 0x1cd0, 0x0298, 0x6864, 0x9c02, 0x1280, 0x7008, 0x9084,
-	0x00ff, 0x6110, 0x2158, 0xb910, 0x9106, 0x1140, 0x700c, 0xb914,
-	0x9106, 0x1120, 0x2009, 0x0051, 0x080c, 0x9ea9, 0x7817, 0x0140,
-	0x2001, 0x19c8, 0x2004, 0x9005, 0x090c, 0x898b, 0x00be, 0x0005,
-	0x2031, 0x0105, 0x0069, 0x0005, 0x2031, 0x0206, 0x0049, 0x0005,
-	0x2031, 0x0207, 0x0029, 0x0005, 0x2031, 0x0213, 0x0009, 0x0005,
-	0x00c6, 0x0096, 0x00f6, 0x7000, 0x9084, 0xf000, 0x9086, 0xc000,
-	0x05d0, 0x080c, 0x9dd9, 0x05b8, 0x0066, 0x00c6, 0x0046, 0x2011,
-	0x0263, 0x2204, 0x8211, 0x220c, 0x080c, 0x2670, 0x15a0, 0x080c,
-	0x61f6, 0x1588, 0xbe12, 0xbd16, 0x2b00, 0x004e, 0x00ce, 0x6012,
-	0x080c, 0xbfb5, 0x080c, 0x0feb, 0x0510, 0x2900, 0x605a, 0x9006,
-	0xa802, 0xa866, 0xac6a, 0xa85c, 0x90f8, 0x001b, 0x20a9, 0x000e,
-	0xa860, 0x20e8, 0x20e1, 0x0000, 0x2fa0, 0x2e98, 0x4003, 0x006e,
-	0x6616, 0x6007, 0x003e, 0x6023, 0x0001, 0x6003, 0x0001, 0x080c,
-	0x8440, 0x080c, 0x898b, 0x00fe, 0x009e, 0x00ce, 0x0005, 0x080c,
-	0x9e2f, 0x006e, 0x0cc0, 0x004e, 0x00ce, 0x0cc8, 0x00c6, 0x7000,
-	0x908c, 0xff00, 0x9184, 0xf000, 0x810f, 0x9086, 0x2000, 0x1904,
-	0x7f45, 0x9186, 0x0022, 0x15f0, 0x2001, 0x0111, 0x2004, 0x9005,
-	0x1904, 0x7f47, 0x7030, 0x908e, 0x0400, 0x0904, 0x7f47, 0x908e,
-	0x6000, 0x05e8, 0x908e, 0x5400, 0x05d0, 0x908e, 0x0300, 0x11d8,
-	0x2009, 0x1836, 0x210c, 0xd18c, 0x1590, 0xd1a4, 0x1580, 0x080c,
-	0x6538, 0x0588, 0x68ac, 0x9084, 0x00ff, 0x7100, 0x918c, 0x00ff,
-	0x9106, 0x1518, 0x687c, 0x69ac, 0x918c, 0xff00, 0x9105, 0x7104,
-	0x9106, 0x11d8, 0x00e0, 0x2009, 0x0103, 0x210c, 0xd1b4, 0x11a8,
-	0x908e, 0x5200, 0x09e8, 0x908e, 0x0500, 0x09d0, 0x908e, 0x5000,
-	0x09b8, 0x0058, 0x9186, 0x0023, 0x1140, 0x080c, 0x7e55, 0x0128,
-	0x6004, 0x9086, 0x0002, 0x0118, 0x0000, 0x9006, 0x0010, 0x9085,
-	0x0001, 0x00ce, 0x0005, 0x7030, 0x908e, 0x0300, 0x0118, 0x908e,
-	0x5200, 0x1d98, 0x2001, 0x1836, 0x2004, 0x9084, 0x0009, 0x9086,
-	0x0008, 0x0d68, 0x0c50, 0x00f6, 0x2079, 0x0200, 0x7800, 0xc0e5,
-	0xc0cc, 0x7802, 0x00fe, 0x0005, 0x00f6, 0x2079, 0x1800, 0x7834,
-	0xd084, 0x1130, 0x2079, 0x0200, 0x7800, 0x9085, 0x1200, 0x7802,
-	0x00fe, 0x0005, 0x00e6, 0x2071, 0x1800, 0x7034, 0xc084, 0x7036,
-	0x00ee, 0x0005, 0x2071, 0x19d2, 0x7003, 0x0003, 0x700f, 0x0361,
-	0x9006, 0x701a, 0x7072, 0x7012, 0x7017, 0x1cd0, 0x7007, 0x0000,
-	0x7026, 0x702b, 0x93dd, 0x7032, 0x7037, 0x9445, 0x703f, 0xffff,
-	0x7042, 0x7047, 0x5239, 0x704a, 0x705b, 0x80da, 0x080c, 0x1004,
-	0x090c, 0x0db4, 0x2900, 0x703a, 0xa867, 0x0003, 0xa86f, 0x0100,
-	0xa8ab, 0xdcb0, 0x0005, 0x2071, 0x19d2, 0x1d04, 0x802e, 0x2091,
-	0x6000, 0x700c, 0x8001, 0x700e, 0x1510, 0x2001, 0x187d, 0x2004,
-	0xd0c4, 0x0158, 0x3a00, 0xd08c, 0x1140, 0x20d1, 0x0000, 0x20d1,
-	0x0001, 0x20d1, 0x0000, 0x080c, 0x0db4, 0x700f, 0x0361, 0x7007,
-	0x0001, 0x0126, 0x2091, 0x8000, 0x080c, 0x811f, 0x7040, 0x900d,
-	0x0148, 0x8109, 0x7142, 0x1130, 0x7044, 0x080f, 0x0018, 0x0126,
-	0x2091, 0x8000, 0x7024, 0x900d, 0x0188, 0x7020, 0x8001, 0x7022,
-	0x1168, 0x7023, 0x0009, 0x8109, 0x7126, 0x9186, 0x03e8, 0x1110,
-	0x7028, 0x080f, 0x81ff, 0x1110, 0x7028, 0x080f, 0x7030, 0x900d,
-	0x0180, 0x702c, 0x8001, 0x702e, 0x1160, 0x702f, 0x0009, 0x8109,
-	0x7132, 0x0128, 0x9184, 0x007f, 0x090c, 0x954e, 0x0010, 0x7034,
-	0x080f, 0x703c, 0x9005, 0x0118, 0x0310, 0x8001, 0x703e, 0x704c,
-	0x900d, 0x0168, 0x7048, 0x8001, 0x704a, 0x1148, 0x704b, 0x0009,
-	0x8109, 0x714e, 0x1120, 0x7150, 0x714e, 0x7058, 0x080f, 0x7018,
-	0x900d, 0x01d8, 0x0016, 0x7070, 0x900d, 0x0158, 0x706c, 0x8001,
-	0x706e, 0x1138, 0x706f, 0x0009, 0x8109, 0x7172, 0x1110, 0x7074,
-	0x080f, 0x001e, 0x7008, 0x8001, 0x700a, 0x1138, 0x700b, 0x0009,
-	0x8109, 0x711a, 0x1110, 0x701c, 0x080f, 0x012e, 0x7004, 0x0002,
-	0x8056, 0x8057, 0x8073, 0x00e6, 0x2071, 0x19d2, 0x7018, 0x9005,
-	0x1120, 0x711a, 0x721e, 0x700b, 0x0009, 0x00ee, 0x0005, 0x00e6,
-	0x0006, 0x2071, 0x19d2, 0x701c, 0x9206, 0x1120, 0x701a, 0x701e,
-	0x7072, 0x7076, 0x000e, 0x00ee, 0x0005, 0x00e6, 0x2071, 0x19d2,
-	0xb888, 0x9102, 0x0208, 0xb98a, 0x00ee, 0x0005, 0x0005, 0x00b6,
-	0x7110, 0x080c, 0x6256, 0x1168, 0xb888, 0x8001, 0x0250, 0xb88a,
-	0x1140, 0x0126, 0x2091, 0x8000, 0x0016, 0x080c, 0x898b, 0x001e,
-	0x012e, 0x8108, 0x9182, 0x0800, 0x0218, 0x900e, 0x7007, 0x0002,
-	0x7112, 0x00be, 0x0005, 0x7014, 0x2060, 0x0126, 0x2091, 0x8000,
-	0x6040, 0x9005, 0x0128, 0x8001, 0x6042, 0x1110, 0x080c, 0xbe46,
-	0x6018, 0x9005, 0x0528, 0x8001, 0x601a, 0x1510, 0x6120, 0x9186,
-	0x0003, 0x0118, 0x9186, 0x0006, 0x11c8, 0x080c, 0xbb3b, 0x01b0,
-	0x6014, 0x2048, 0xa884, 0x908a, 0x199a, 0x0280, 0x9082, 0x1999,
-	0xa886, 0x908a, 0x199a, 0x0210, 0x2001, 0x1999, 0x8003, 0x800b,
-	0x810b, 0x9108, 0x611a, 0xa87c, 0xd0e4, 0x0110, 0x080c, 0xb827,
-	0x012e, 0x9c88, 0x0018, 0x7116, 0x2001, 0x1819, 0x2004, 0x9102,
-	0x0220, 0x7017, 0x1cd0, 0x7007, 0x0000, 0x0005, 0x00e6, 0x2071,
-	0x19d2, 0x7027, 0x07d0, 0x7023, 0x0009, 0x00ee, 0x0005, 0x2001,
-	0x19db, 0x2003, 0x0000, 0x0005, 0x00e6, 0x2071, 0x19d2, 0x7132,
-	0x702f, 0x0009, 0x00ee, 0x0005, 0x2011, 0x19de, 0x2013, 0x0000,
-	0x0005, 0x00e6, 0x2071, 0x19d2, 0x711a, 0x721e, 0x700b, 0x0009,
-	0x00ee, 0x0005, 0x0086, 0x0026, 0x7054, 0x8000, 0x7056, 0x2001,
-	0x19e0, 0x2044, 0xa06c, 0x9086, 0x0000, 0x0150, 0x7068, 0xa09a,
-	0x7064, 0xa096, 0x7060, 0xa092, 0x705c, 0xa08e, 0x080c, 0x10d5,
-	0x002e, 0x008e, 0x0005, 0x0006, 0x0016, 0x0096, 0x00a6, 0x00b6,
-	0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x0156, 0x080c, 0x7fa3, 0x015e,
-	0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x00ae, 0x009e, 0x001e,
-	0x000e, 0x0005, 0x00e6, 0x2071, 0x19d2, 0x7172, 0x7276, 0x706f,
-	0x0009, 0x00ee, 0x0005, 0x00e6, 0x0006, 0x2071, 0x19d2, 0x7074,
-	0x9206, 0x1110, 0x7072, 0x7076, 0x000e, 0x00ee, 0x0005, 0x2069,
-	0x1800, 0x69e4, 0xd1e4, 0x1518, 0x0026, 0xd1ec, 0x0140, 0x6a50,
-	0x6870, 0x9202, 0x0288, 0x8117, 0x9294, 0x00c0, 0x0088, 0x9184,
-	0x0007, 0x01a0, 0x8109, 0x9184, 0x0007, 0x0110, 0x69e6, 0x0070,
-	0x8107, 0x9084, 0x0007, 0x910d, 0x8107, 0x9106, 0x9094, 0x00c0,
-	0x9184, 0xff3f, 0x9205, 0x68e6, 0x080c, 0x0ecb, 0x002e, 0x0005,
-	0x00c6, 0x2061, 0x1a48, 0x00ce, 0x0005, 0x9184, 0x000f, 0x8003,
-	0x8003, 0x8003, 0x9080, 0x1a48, 0x2060, 0x0005, 0xa884, 0x908a,
-	0x199a, 0x1638, 0x9005, 0x1150, 0x00c6, 0x2061, 0x1a48, 0x6014,
-	0x00ce, 0x9005, 0x1130, 0x2001, 0x001e, 0x0018, 0x908e, 0xffff,
-	0x01b0, 0x8003, 0x800b, 0x810b, 0x9108, 0x611a, 0xa87c, 0x908c,
-	0x00c0, 0x918e, 0x00c0, 0x0904, 0x81e0, 0xd0b4, 0x1168, 0xd0bc,
-	0x1904, 0x81b9, 0x2009, 0x0006, 0x080c, 0x820d, 0x0005, 0x900e,
-	0x0c60, 0x2001, 0x1999, 0x08b0, 0xd0fc, 0x0160, 0x908c, 0x0003,
-	0x0120, 0x918e, 0x0003, 0x1904, 0x8207, 0x908c, 0x2020, 0x918e,
-	0x2020, 0x01a8, 0x6024, 0xd0d4, 0x11e8, 0x2009, 0x187d, 0x2104,
-	0xd084, 0x1138, 0x87ff, 0x1120, 0x2009, 0x0043, 0x0804, 0x9ea9,
-	0x0005, 0x87ff, 0x1de8, 0x2009, 0x0042, 0x0804, 0x9ea9, 0x6110,
-	0x00b6, 0x2158, 0xb900, 0x00be, 0xd1ac, 0x0d20, 0x6024, 0xc0cd,
-	0x6026, 0x0c00, 0xc0d4, 0x6026, 0xa890, 0x602e, 0xa88c, 0x6032,
-	0x08e0, 0xd0fc, 0x0160, 0x908c, 0x0003, 0x0120, 0x918e, 0x0003,
-	0x1904, 0x8207, 0x908c, 0x2020, 0x918e, 0x2020, 0x0170, 0x0076,
-	0x00f6, 0x2c78, 0x080c, 0x164a, 0x00fe, 0x007e, 0x87ff, 0x1120,
-	0x2009, 0x0042, 0x080c, 0x9ea9, 0x0005, 0x6110, 0x00b6, 0x2158,
-	0xb900, 0x00be, 0xd1ac, 0x0d58, 0x6124, 0xc1cd, 0x6126, 0x0c38,
-	0xd0fc, 0x0188, 0x908c, 0x2020, 0x918e, 0x2020, 0x01a8, 0x9084,
-	0x0003, 0x908e, 0x0002, 0x0148, 0x87ff, 0x1120, 0x2009, 0x0041,
-	0x080c, 0x9ea9, 0x0005, 0x00b9, 0x0ce8, 0x87ff, 0x1dd8, 0x2009,
-	0x0043, 0x080c, 0x9ea9, 0x0cb0, 0x6110, 0x00b6, 0x2158, 0xb900,
-	0x00be, 0xd1ac, 0x0d20, 0x6124, 0xc1cd, 0x6126, 0x0c00, 0x2009,
-	0x0004, 0x0019, 0x0005, 0x2009, 0x0001, 0x0096, 0x080c, 0xbb3b,
-	0x0518, 0x6014, 0x2048, 0xa982, 0xa800, 0x6016, 0x9186, 0x0001,
-	0x1188, 0xa97c, 0x918c, 0x8100, 0x918e, 0x8100, 0x1158, 0x00c6,
-	0x2061, 0x1a48, 0x6200, 0xd28c, 0x1120, 0x6204, 0x8210, 0x0208,
-	0x6206, 0x00ce, 0x080c, 0x66da, 0x6014, 0x904d, 0x0076, 0x2039,
-	0x0000, 0x190c, 0x8156, 0x007e, 0x009e, 0x0005, 0x0156, 0x00c6,
-	0x2061, 0x1a48, 0x6000, 0x81ff, 0x0110, 0x9205, 0x0008, 0x9204,
-	0x6002, 0x00ce, 0x015e, 0x0005, 0x6800, 0xd08c, 0x1138, 0x6808,
-	0x9005, 0x0120, 0x8001, 0x680a, 0x9085, 0x0001, 0x0005, 0x0126,
-	0x2091, 0x8000, 0x0036, 0x0046, 0x20a9, 0x0010, 0x9006, 0x8004,
-	0x2019, 0x0100, 0x231c, 0x93a6, 0x0008, 0x1118, 0x8086, 0x818e,
-	0x0020, 0x80f6, 0x3e00, 0x81f6, 0x3e08, 0x1208, 0x9200, 0x1f04,
-	0x8258, 0x93a6, 0x0008, 0x1118, 0x8086, 0x818e, 0x0020, 0x80f6,
-	0x3e00, 0x81f6, 0x3e08, 0x004e, 0x003e, 0x012e, 0x0005, 0x0126,
-	0x2091, 0x8000, 0x0076, 0x0156, 0x20a9, 0x0010, 0x9005, 0x0510,
-	0x911a, 0x1600, 0x8213, 0x2039, 0x0100, 0x273c, 0x97be, 0x0008,
-	0x1110, 0x818d, 0x0010, 0x81f5, 0x3e08, 0x0228, 0x911a, 0x1220,
-	0x1f04, 0x8282, 0x0028, 0x911a, 0x2308, 0x8210, 0x1f04, 0x8282,
-	0x0006, 0x3200, 0x9084, 0xefff, 0x2080, 0x000e, 0x015e, 0x007e,
-	0x012e, 0x0005, 0x0006, 0x3200, 0x9085, 0x1000, 0x0ca8, 0x0126,
-	0x2091, 0x2800, 0x2079, 0x19bf, 0x012e, 0x00d6, 0x2069, 0x19bf,
-	0x6803, 0x0005, 0x0156, 0x0146, 0x01d6, 0x20e9, 0x0000, 0x2069,
-	0x0200, 0x080c, 0x9c37, 0x0401, 0x080c, 0x9c22, 0x00e9, 0x080c,
-	0x9c25, 0x00d1, 0x080c, 0x9c28, 0x00b9, 0x080c, 0x9c2b, 0x00a1,
-	0x080c, 0x9c2e, 0x0089, 0x080c, 0x9c31, 0x0071, 0x080c, 0x9c34,
-	0x0059, 0x01de, 0x014e, 0x015e, 0x2069, 0x0004, 0x2d04, 0x9085,
-	0x8001, 0x206a, 0x00de, 0x0005, 0x20a9, 0x0020, 0x20a1, 0x0240,
-	0x2001, 0x0000, 0x4004, 0x0005, 0x00c6, 0x6027, 0x0001, 0x7804,
-	0x9084, 0x0007, 0x0002, 0x82f5, 0x8319, 0x8358, 0x82fb, 0x8319,
-	0x82f5, 0x82f3, 0x82f3, 0x080c, 0x0db4, 0x080c, 0x80bf, 0x080c,
-	0x898b, 0x00ce, 0x0005, 0x62c0, 0x82ff, 0x1110, 0x00ce, 0x0005,
-	0x2011, 0x5b4e, 0x080c, 0x803f, 0x7828, 0x9092, 0x00c8, 0x1228,
-	0x8000, 0x782a, 0x080c, 0x5b8e, 0x0c88, 0x62c0, 0x080c, 0x9c3b,
-	0x080c, 0x5b4e, 0x7807, 0x0003, 0x7827, 0x0000, 0x782b, 0x0000,
-	0x0c28, 0x080c, 0x80bf, 0x6220, 0xd2a4, 0x0160, 0x782b, 0x0000,
-	0x7824, 0x9065, 0x090c, 0x0db4, 0x2009, 0x0013, 0x080c, 0x9ea9,
-	0x00ce, 0x0005, 0x00c6, 0x7824, 0x9065, 0x090c, 0x0db4, 0x7828,
-	0x9092, 0xc350, 0x12c0, 0x8000, 0x782a, 0x00ce, 0x080c, 0x29d7,
-	0x0278, 0x00c6, 0x7924, 0x2160, 0x6010, 0x906d, 0x090c, 0x0db4,
-	0x7807, 0x0000, 0x7827, 0x0000, 0x00ce, 0x080c, 0x898b, 0x0c00,
-	0x080c, 0x93a3, 0x08e8, 0x2011, 0x0130, 0x2214, 0x080c, 0x9c3b,
-	0x080c, 0xd903, 0x2009, 0x0014, 0x080c, 0x9ea9, 0x00ce, 0x0880,
-	0x2001, 0x19db, 0x2003, 0x0000, 0x62c0, 0x82ff, 0x1160, 0x782b,
-	0x0000, 0x7824, 0x9065, 0x090c, 0x0db4, 0x2009, 0x0013, 0x080c,
-	0x9efb, 0x00ce, 0x0005, 0x00b6, 0x00c6, 0x00d6, 0x7824, 0x9005,
-	0x090c, 0x0db4, 0x7828, 0x9092, 0xc350, 0x1648, 0x8000, 0x782a,
-	0x00de, 0x00ce, 0x00be, 0x080c, 0x29d7, 0x02f0, 0x00b6, 0x00c6,
-	0x00d6, 0x781c, 0x905d, 0x090c, 0x0db4, 0xb800, 0xc0dc, 0xb802,
-	0x7924, 0x2160, 0x080c, 0x9e2f, 0xb93c, 0x81ff, 0x090c, 0x0db4,
-	0x8109, 0xb93e, 0x7807, 0x0000, 0x7827, 0x0000, 0x00de, 0x00ce,
-	0x00be, 0x080c, 0x898b, 0x0868, 0x080c, 0x93a3, 0x0850, 0x2011,
-	0x0130, 0x2214, 0x080c, 0x9c3b, 0x080c, 0xd903, 0x7824, 0x9065,
-	0x2009, 0x0014, 0x080c, 0x9ea9, 0x00de, 0x00ce, 0x00be, 0x0804,
-	0x8369, 0x00c6, 0x2001, 0x009b, 0x2004, 0xd0fc, 0x190c, 0x1d57,
-	0x6024, 0x6027, 0x0002, 0xd0f4, 0x1580, 0x62c8, 0x60c4, 0x9205,
-	0x1170, 0x783c, 0x9065, 0x0130, 0x2009, 0x0049, 0x080c, 0x9ea9,
-	0x00ce, 0x0005, 0x2011, 0x19de, 0x2013, 0x0000, 0x0cc8, 0x793c,
-	0x81ff, 0x0dc0, 0x7944, 0x9192, 0x7530, 0x12f0, 0x8108, 0x7946,
-	0x793c, 0x9188, 0x0008, 0x210c, 0x918e, 0x0006, 0x1138, 0x6014,
-	0x9084, 0x1984, 0x9085, 0x0012, 0x6016, 0x0c10, 0x6014, 0x9084,
-	0x1984, 0x9085, 0x0016, 0x6016, 0x08d8, 0x793c, 0x2160, 0x2009,
-	0x004a, 0x080c, 0x9ea9, 0x08a0, 0x7848, 0xc085, 0x784a, 0x0880,
-	0x0006, 0x0016, 0x00c6, 0x0126, 0x2091, 0x8000, 0x600f, 0x0000,
-	0x2c08, 0x2061, 0x19bf, 0x6020, 0x8000, 0x6022, 0x6010, 0x9005,
-	0x0148, 0x9080, 0x0003, 0x2102, 0x6112, 0x012e, 0x00ce, 0x001e,
-	0x000e, 0x0005, 0x6116, 0x6112, 0x0cc0, 0x00d6, 0x2069, 0x19bf,
-	0xb800, 0xd0d4, 0x0168, 0x6820, 0x8000, 0x6822, 0x9086, 0x0001,
-	0x1110, 0x2b00, 0x681e, 0x00de, 0x0804, 0x898b, 0x00de, 0x0005,
-	0xc0d5, 0xb802, 0x6818, 0x9005, 0x0168, 0xb856, 0xb85b, 0x0000,
-	0x0086, 0x0006, 0x2b00, 0x681a, 0x008e, 0xa05a, 0x008e, 0x2069,
-	0x19bf, 0x0c08, 0xb856, 0xb85a, 0x2b00, 0x681a, 0x681e, 0x08d8,
-	0x0006, 0x0016, 0x00c6, 0x0126, 0x2091, 0x8000, 0x600f, 0x0000,
-	0x2c08, 0x2061, 0x19bf, 0x6020, 0x8000, 0x6022, 0x6008, 0x9005,
-	0x0148, 0x9080, 0x0003, 0x2102, 0x610a, 0x012e, 0x00ce, 0x001e,
-	0x000e, 0x0005, 0x610e, 0x610a, 0x0cc0, 0x00c6, 0x600f, 0x0000,
-	0x2c08, 0x2061, 0x19bf, 0x6034, 0x9005, 0x0130, 0x9080, 0x0003,
-	0x2102, 0x6136, 0x00ce, 0x0005, 0x613a, 0x6136, 0x00ce, 0x0005,
-	0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x00b6, 0x0096, 0x0076, 0x0066,
-	0x0056, 0x0036, 0x0026, 0x0016, 0x0006, 0x0126, 0x902e, 0x2071,
-	0x19bf, 0x7638, 0x2660, 0x2678, 0x2091, 0x8000, 0x8cff, 0x0904,
-	0x84ec, 0x6010, 0x2058, 0xb8a0, 0x9206, 0x1904, 0x84e7, 0x87ff,
-	0x0120, 0x6054, 0x9106, 0x1904, 0x84e7, 0x703c, 0x9c06, 0x1178,
-	0x0036, 0x2019, 0x0001, 0x080c, 0x96e9, 0x7033, 0x0000, 0x9006,
-	0x703e, 0x7042, 0x7046, 0x704a, 0x003e, 0x2029, 0x0001, 0x7038,
-	0x9c36, 0x1110, 0x660c, 0x763a, 0x7034, 0x9c36, 0x1140, 0x2c00,
-	0x9f36, 0x0118, 0x2f00, 0x7036, 0x0010, 0x7037, 0x0000, 0x660c,
-	0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f,
-	0x0000, 0x080c, 0xbb3b, 0x01f0, 0x6014, 0x2048, 0x6020, 0x9086,
-	0x0003, 0x15b8, 0x6004, 0x9086, 0x0040, 0x090c, 0x98c4, 0xa867,
-	0x0103, 0xab7a, 0xa877, 0x0000, 0x0016, 0x0036, 0x0076, 0x080c,
-	0xbe2f, 0x080c, 0xd80d, 0x080c, 0x68a0, 0x007e, 0x003e, 0x001e,
-	0x080c, 0xbd24, 0x080c, 0x9e5f, 0x00ce, 0x0804, 0x8486, 0x2c78,
-	0x600c, 0x2060, 0x0804, 0x8486, 0x85ff, 0x0120, 0x0036, 0x080c,
-	0x8a68, 0x003e, 0x012e, 0x000e, 0x001e, 0x002e, 0x003e, 0x005e,
-	0x006e, 0x007e, 0x009e, 0x00be, 0x00ce, 0x00de, 0x00ee, 0x00fe,
-	0x0005, 0x6020, 0x9086, 0x0006, 0x1158, 0x0016, 0x0036, 0x0076,
-	0x080c, 0xd80d, 0x080c, 0xd50f, 0x007e, 0x003e, 0x001e, 0x0890,
-	0x6020, 0x9086, 0x000a, 0x0904, 0x84d1, 0x0804, 0x84ca, 0x0006,
-	0x0066, 0x0096, 0x00c6, 0x00d6, 0x00f6, 0x9036, 0x0126, 0x2091,
-	0x8000, 0x2079, 0x19bf, 0x7838, 0x9065, 0x0904, 0x856c, 0x600c,
-	0x0006, 0x600f, 0x0000, 0x783c, 0x9c06, 0x1168, 0x0036, 0x2019,
-	0x0001, 0x080c, 0x96e9, 0x7833, 0x0000, 0x901e, 0x7b3e, 0x7b42,
-	0x7b46, 0x7b4a, 0x003e, 0x080c, 0xbb3b, 0x0548, 0x6014, 0x2048,
-	0x6020, 0x9086, 0x0003, 0x1590, 0x3e08, 0x918e, 0x0002, 0x1188,
-	0x6010, 0x9005, 0x0170, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc,
-	0x0140, 0x6040, 0x9005, 0x11a8, 0x2001, 0x1960, 0x2004, 0x6042,
-	0x0080, 0x6004, 0x9086, 0x0040, 0x090c, 0x98c4, 0xa867, 0x0103,
-	0xab7a, 0xa877, 0x0000, 0x080c, 0x6893, 0x080c, 0xbd24, 0x080c,
-	0x9e5f, 0x000e, 0x0804, 0x8524, 0x7e3a, 0x7e36, 0x012e, 0x00fe,
-	0x00de, 0x00ce, 0x009e, 0x006e, 0x000e, 0x0005, 0x6020, 0x9086,
-	0x0006, 0x1118, 0x080c, 0xd50f, 0x0c50, 0x6020, 0x9086, 0x000a,
-	0x09f8, 0x08b8, 0x0016, 0x0026, 0x0086, 0x9046, 0x0099, 0x080c,
-	0x866b, 0x008e, 0x002e, 0x001e, 0x0005, 0x00f6, 0x0126, 0x2079,
-	0x19bf, 0x2091, 0x8000, 0x080c, 0x8702, 0x080c, 0x8790, 0x012e,
-	0x00fe, 0x0005, 0x00b6, 0x0096, 0x00f6, 0x00e6, 0x00d6, 0x00c6,
-	0x0066, 0x0016, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071, 0x19bf,
-	0x7614, 0x2660, 0x2678, 0x8cff, 0x0904, 0x8630, 0x6010, 0x2058,
-	0xb8a0, 0x9206, 0x1904, 0x862b, 0x88ff, 0x0120, 0x6054, 0x9106,
-	0x1904, 0x862b, 0x7024, 0x9c06, 0x1558, 0x2069, 0x0100, 0x6820,
-	0xd0a4, 0x1508, 0x080c, 0x80bf, 0x080c, 0x93c7, 0x68c3, 0x0000,
-	0x080c, 0x98c4, 0x7027, 0x0000, 0x0036, 0x2069, 0x0140, 0x6b04,
-	0x9384, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2b21, 0x9006,
-	0x080c, 0x2b21, 0x2069, 0x0100, 0x6824, 0xd084, 0x0110, 0x6827,
-	0x0001, 0x003e, 0x0028, 0x6003, 0x0009, 0x630a, 0x0804, 0x862b,
+	0x00de, 0x080c, 0x7afd, 0x9006, 0x00ee, 0x0005, 0x900e, 0x0156,
+	0x20a9, 0x0006, 0x8003, 0x818d, 0x1f04, 0x757a, 0x015e, 0x0005,
+	0x2079, 0x0040, 0x2071, 0x18f8, 0x7004, 0x0002, 0x7590, 0x7591,
+	0x75c9, 0x7624, 0x7765, 0x758e, 0x758e, 0x778f, 0x080c, 0x0dfa,
+	0x0005, 0x2079, 0x0040, 0x782c, 0x908c, 0x0780, 0x190c, 0x7b89,
+	0xd0a4, 0x01f8, 0x7824, 0x2048, 0x9006, 0xa802, 0xa806, 0xa864,
+	0x9084, 0x00ff, 0x908a, 0x0040, 0x0610, 0x00c0, 0x2001, 0x1800,
+	0x200c, 0x9186, 0x0003, 0x1168, 0x7004, 0x0002, 0x75b9, 0x7593,
+	0x75b9, 0x75b7, 0x75b9, 0x75b9, 0x75b9, 0x75b9, 0x75b9, 0x080c,
+	0x7624, 0x782c, 0xd09c, 0x090c, 0x7afd, 0x0005, 0x9082, 0x005a,
+	0x1218, 0x2100, 0x003b, 0x0c10, 0x080c, 0x765a, 0x0c90, 0x00e3,
+	0x08e8, 0x0005, 0x765a, 0x765a, 0x765a, 0x765a, 0x765a, 0x765a,
+	0x765a, 0x765a, 0x767c, 0x765a, 0x765a, 0x765a, 0x765a, 0x765a,
+	0x765a, 0x765a, 0x765a, 0x765a, 0x765a, 0x765a, 0x765a, 0x765a,
+	0x765a, 0x765a, 0x765a, 0x765a, 0x765a, 0x765a, 0x7666, 0x765a,
+	0x7864, 0x765a, 0x765a, 0x765a, 0x767c, 0x765a, 0x7666, 0x78a5,
+	0x78e6, 0x792d, 0x7941, 0x765a, 0x765a, 0x767c, 0x7666, 0x765a,
+	0x765a, 0x7739, 0x79ec, 0x7a07, 0x765a, 0x767c, 0x765a, 0x765a,
+	0x765a, 0x765a, 0x772f, 0x7a07, 0x765a, 0x765a, 0x765a, 0x765a,
+	0x765a, 0x765a, 0x765a, 0x765a, 0x765a, 0x7690, 0x765a, 0x765a,
+	0x765a, 0x765a, 0x765a, 0x765a, 0x765a, 0x765a, 0x765a, 0x7b2d,
+	0x765a, 0x765a, 0x765a, 0x765a, 0x765a, 0x76a4, 0x765a, 0x765a,
+	0x765a, 0x765a, 0x765a, 0x765a, 0x2079, 0x0040, 0x7004, 0x9086,
+	0x0003, 0x1198, 0x782c, 0x080c, 0x7b26, 0xd0a4, 0x0170, 0x7824,
+	0x2048, 0x9006, 0xa802, 0xa806, 0xa864, 0x9084, 0x00ff, 0x908a,
+	0x001a, 0x1210, 0x002b, 0x0c50, 0x00e9, 0x080c, 0x7afd, 0x0005,
+	0x765a, 0x7666, 0x7850, 0x765a, 0x7666, 0x765a, 0x7666, 0x7666,
+	0x765a, 0x7666, 0x7850, 0x7666, 0x7666, 0x7666, 0x7666, 0x7666,
+	0x765a, 0x7666, 0x7850, 0x765a, 0x765a, 0x7666, 0x765a, 0x765a,
+	0x765a, 0x7666, 0x00e6, 0x2071, 0x18f8, 0x2009, 0x0400, 0x0071,
+	0x00ee, 0x0005, 0x2009, 0x1000, 0x0049, 0x0005, 0x2009, 0x2000,
+	0x0029, 0x0005, 0x2009, 0x0800, 0x0009, 0x0005, 0x7007, 0x0001,
+	0xa868, 0x9084, 0x00ff, 0x9105, 0xa86a, 0x0126, 0x2091, 0x8000,
+	0x080c, 0x6ae9, 0x012e, 0x0005, 0xa864, 0x8007, 0x9084, 0x00ff,
+	0x0d08, 0x8001, 0x1120, 0x7007, 0x0001, 0x0804, 0x780e, 0x7007,
+	0x0003, 0x7012, 0x2900, 0x7016, 0x701a, 0x704b, 0x780e, 0x0005,
+	0xa864, 0x8007, 0x9084, 0x00ff, 0x0968, 0x8001, 0x1120, 0x7007,
+	0x0001, 0x0804, 0x7829, 0x7007, 0x0003, 0x7012, 0x2900, 0x7016,
+	0x701a, 0x704b, 0x7829, 0x0005, 0xa864, 0x8007, 0x9084, 0x00ff,
+	0x9086, 0x0001, 0x1904, 0x7662, 0x7007, 0x0001, 0x2009, 0x1833,
+	0x210c, 0x81ff, 0x1904, 0x7706, 0xa994, 0x9186, 0x006f, 0x0188,
+	0x9186, 0x0074, 0x15b0, 0x0026, 0x2011, 0x0010, 0x080c, 0x67e7,
+	0x002e, 0x0578, 0x0016, 0xa998, 0x080c, 0x6831, 0x001e, 0x1548,
+	0x0400, 0x080c, 0x7207, 0x0140, 0xa897, 0x4005, 0xa89b, 0x0016,
+	0x2001, 0x0030, 0x900e, 0x0438, 0x0026, 0x2011, 0x8008, 0x080c,
+	0x67e7, 0x002e, 0x01b0, 0x0016, 0x0026, 0x0036, 0xa998, 0xaaa0,
+	0xab9c, 0x918d, 0x8000, 0x080c, 0x6831, 0x003e, 0x002e, 0x001e,
+	0x1140, 0xa897, 0x4005, 0xa89b, 0x4009, 0x2001, 0x0030, 0x900e,
+	0x0050, 0xa868, 0x9084, 0x00ff, 0xa86a, 0xa883, 0x0000, 0x080c,
+	0x615d, 0x1108, 0x0005, 0x0126, 0x2091, 0x8000, 0xa867, 0x0139,
+	0xa87a, 0xa982, 0x080c, 0x6ae9, 0x012e, 0x0ca0, 0xa994, 0x9186,
+	0x0071, 0x0904, 0x76b4, 0x9186, 0x0064, 0x0904, 0x76b4, 0x9186,
+	0x007c, 0x0904, 0x76b4, 0x9186, 0x0028, 0x0904, 0x76b4, 0x9186,
+	0x0038, 0x0904, 0x76b4, 0x9186, 0x0078, 0x0904, 0x76b4, 0x9186,
+	0x005f, 0x0904, 0x76b4, 0x9186, 0x0056, 0x0904, 0x76b4, 0xa897,
+	0x4005, 0xa89b, 0x0001, 0x2001, 0x0030, 0x900e, 0x0860, 0xa87c,
+	0x9084, 0x00c0, 0x9086, 0x00c0, 0x1120, 0x7007, 0x0001, 0x0804,
+	0x7a1e, 0x2900, 0x7016, 0x701a, 0x20a9, 0x0004, 0xa860, 0x20e0,
+	0xa85c, 0x9080, 0x0030, 0x2098, 0x7050, 0x2040, 0xa060, 0x20e8,
+	0xa05c, 0x9080, 0x0023, 0x20a0, 0x4003, 0xa888, 0x7012, 0x9082,
+	0x0401, 0x1a04, 0x766a, 0xaab4, 0x928a, 0x0002, 0x1a04, 0x766a,
+	0x82ff, 0x1138, 0xa8b8, 0xa9bc, 0x9105, 0x0118, 0x2001, 0x77cc,
+	0x0018, 0x9280, 0x77c2, 0x2005, 0x7056, 0x7010, 0x9015, 0x0904,
+	0x77ad, 0x080c, 0x104a, 0x1118, 0x7007, 0x0004, 0x0005, 0x2900,
+	0x7022, 0x7054, 0x2060, 0xe000, 0xa866, 0x7050, 0x2040, 0xa95c,
+	0xe004, 0x9100, 0xa076, 0xa860, 0xa072, 0xe008, 0x920a, 0x1210,
+	0x900e, 0x2200, 0x7112, 0xe20c, 0x8003, 0x800b, 0x9296, 0x0004,
+	0x0108, 0x9108, 0xa17a, 0x810b, 0xa17e, 0x080c, 0x112e, 0xa06c,
+	0x908e, 0x0100, 0x0170, 0x9086, 0x0200, 0x0118, 0x7007, 0x0007,
+	0x0005, 0x7020, 0x2048, 0x080c, 0x1063, 0x7014, 0x2048, 0x0804,
+	0x766a, 0x7020, 0x2048, 0x7018, 0xa802, 0xa807, 0x0000, 0x2908,
+	0x2048, 0xa906, 0x711a, 0x0804, 0x7765, 0x7014, 0x2048, 0x7007,
+	0x0001, 0xa8b4, 0x9005, 0x1128, 0xa8b8, 0xa9bc, 0x9105, 0x0108,
+	0x00b9, 0xa864, 0x9084, 0x00ff, 0x9086, 0x001e, 0x0904, 0x7a1e,
+	0x0804, 0x780e, 0x77c4, 0x77c8, 0x0002, 0x001d, 0x0007, 0x0004,
+	0x000a, 0x001b, 0x0005, 0x0006, 0x000a, 0x001d, 0x0005, 0x0004,
+	0x0076, 0x0066, 0xafb8, 0xaebc, 0xa804, 0x2050, 0xb0c0, 0xb0e2,
+	0xb0bc, 0xb0de, 0xb0b8, 0xb0d2, 0xb0b4, 0xb0ce, 0xb6da, 0xb7d6,
+	0xb0b0, 0xb0ca, 0xb0ac, 0xb0c6, 0xb0a8, 0xb0ba, 0xb0a4, 0xb0b6,
+	0xb6c2, 0xb7be, 0xb0a0, 0xb0b2, 0xb09c, 0xb0ae, 0xb098, 0xb0a2,
+	0xb094, 0xb09e, 0xb6aa, 0xb7a6, 0xb090, 0xb09a, 0xb08c, 0xb096,
+	0xb088, 0xb08a, 0xb084, 0xb086, 0xb692, 0xb78e, 0xb080, 0xb082,
+	0xb07c, 0xb07e, 0xb078, 0xb072, 0xb074, 0xb06e, 0xb67a, 0xb776,
+	0xb004, 0x9055, 0x1958, 0x006e, 0x007e, 0x0005, 0x2009, 0x1833,
+	0x210c, 0x81ff, 0x1178, 0x080c, 0x5fa7, 0x1108, 0x0005, 0x080c,
+	0x6d17, 0x0126, 0x2091, 0x8000, 0x080c, 0xc12d, 0x080c, 0x6ae9,
+	0x012e, 0x0ca0, 0x080c, 0xc532, 0x1d70, 0x2001, 0x0028, 0x900e,
+	0x0c70, 0x2009, 0x1833, 0x210c, 0x81ff, 0x11d8, 0xa888, 0x9005,
+	0x01e0, 0xa883, 0x0000, 0xa87c, 0xd0f4, 0x0120, 0x080c, 0x60bf,
+	0x1138, 0x0005, 0x9006, 0xa87a, 0x080c, 0x6037, 0x1108, 0x0005,
+	0x0126, 0x2091, 0x8000, 0xa87a, 0xa982, 0x080c, 0x6ae9, 0x012e,
+	0x0cb0, 0x2001, 0x0028, 0x900e, 0x0c98, 0x2001, 0x0000, 0x0c80,
+	0x7018, 0xa802, 0x2908, 0x2048, 0xa906, 0x711a, 0x7010, 0x8001,
+	0x7012, 0x0118, 0x7007, 0x0003, 0x0030, 0x7014, 0x2048, 0x7007,
+	0x0001, 0x7048, 0x080f, 0x0005, 0x00b6, 0x7007, 0x0001, 0xa974,
+	0xa878, 0x9084, 0x00ff, 0x9096, 0x0004, 0x0540, 0x20a9, 0x0001,
+	0x9096, 0x0001, 0x0190, 0x900e, 0x20a9, 0x0800, 0x9096, 0x0002,
+	0x0160, 0x9005, 0x11d8, 0xa974, 0x080c, 0x649f, 0x11b8, 0x0066,
+	0xae80, 0x080c, 0x65af, 0x006e, 0x0088, 0x0046, 0x2011, 0x180c,
+	0x2224, 0xc484, 0x2412, 0x004e, 0x00c6, 0x080c, 0x649f, 0x1110,
+	0x080c, 0x66af, 0x8108, 0x1f04, 0x788d, 0x00ce, 0xa87c, 0xd084,
+	0x1120, 0x080c, 0x1063, 0x00be, 0x0005, 0x0126, 0x2091, 0x8000,
+	0x080c, 0x6ae9, 0x012e, 0x00be, 0x0005, 0x0126, 0x2091, 0x8000,
+	0x7007, 0x0001, 0x080c, 0x67bf, 0x0580, 0x2061, 0x1a48, 0x6100,
+	0xd184, 0x0178, 0xa888, 0x9084, 0x00ff, 0x1550, 0x6000, 0xd084,
+	0x0520, 0x6004, 0x9005, 0x1538, 0x6003, 0x0000, 0x600b, 0x0000,
+	0x00c8, 0x2011, 0x0001, 0xa890, 0x9005, 0x1110, 0x2001, 0x001e,
+	0x8000, 0x6016, 0xa888, 0x9084, 0x00ff, 0x0178, 0x6006, 0xa888,
+	0x8007, 0x9084, 0x00ff, 0x0148, 0x600a, 0xa888, 0x8000, 0x1108,
+	0xc28d, 0x6202, 0x012e, 0x0804, 0x7ae7, 0x012e, 0x0804, 0x7ae1,
+	0x012e, 0x0804, 0x7adb, 0x012e, 0x0804, 0x7ade, 0x0126, 0x2091,
+	0x8000, 0x7007, 0x0001, 0x080c, 0x67bf, 0x05e0, 0x2061, 0x1a48,
+	0x6000, 0xd084, 0x05b8, 0x6204, 0x6308, 0xd08c, 0x1530, 0xac78,
+	0x9484, 0x0003, 0x0170, 0xa988, 0x918c, 0x00ff, 0x8001, 0x1120,
+	0x2100, 0x9210, 0x0620, 0x0028, 0x8001, 0x1508, 0x2100, 0x9212,
+	0x02f0, 0x9484, 0x000c, 0x0188, 0xa988, 0x810f, 0x918c, 0x00ff,
+	0x9082, 0x0004, 0x1120, 0x2100, 0x9318, 0x0288, 0x0030, 0x9082,
+	0x0004, 0x1168, 0x2100, 0x931a, 0x0250, 0xa890, 0x9005, 0x0110,
+	0x8000, 0x6016, 0x6206, 0x630a, 0x012e, 0x0804, 0x7ae7, 0x012e,
+	0x0804, 0x7ae4, 0x012e, 0x0804, 0x7ae1, 0x0126, 0x2091, 0x8000,
+	0x7007, 0x0001, 0x2061, 0x1a48, 0x6300, 0xd38c, 0x1120, 0x6308,
+	0x8318, 0x0220, 0x630a, 0x012e, 0x0804, 0x7af5, 0x012e, 0x0804,
+	0x7ae4, 0x00b6, 0x0126, 0x00c6, 0x2091, 0x8000, 0x7007, 0x0001,
+	0xa87c, 0xd0ac, 0x0148, 0x00c6, 0x2061, 0x1a48, 0x6000, 0x9084,
+	0xfcff, 0x6002, 0x00ce, 0x0440, 0xa888, 0x9005, 0x05d8, 0xa88c,
+	0x9065, 0x0598, 0x2001, 0x1833, 0x2004, 0x9005, 0x0118, 0x080c,
+	0xa113, 0x0068, 0x6017, 0xf400, 0x605b, 0x0000, 0xa97c, 0xd1a4,
+	0x0110, 0xa980, 0x615a, 0x2009, 0x0041, 0x080c, 0xa15d, 0xa988,
+	0x918c, 0xff00, 0x9186, 0x2000, 0x1138, 0x0026, 0x900e, 0x2011,
+	0xfdff, 0x080c, 0x84d1, 0x002e, 0xa87c, 0xd0c4, 0x0148, 0x2061,
+	0x1a48, 0x6000, 0xd08c, 0x1120, 0x6008, 0x8000, 0x0208, 0x600a,
+	0x00ce, 0x012e, 0x00be, 0x0804, 0x7ae7, 0x00ce, 0x012e, 0x00be,
+	0x0804, 0x7ae1, 0xa984, 0x9186, 0x002e, 0x0d30, 0x9186, 0x002d,
+	0x0d18, 0x9186, 0x0045, 0x0510, 0x9186, 0x002a, 0x1130, 0x2001,
+	0x180c, 0x200c, 0xc194, 0x2102, 0x08b8, 0x9186, 0x0020, 0x0158,
+	0x9186, 0x0029, 0x1d10, 0xa974, 0x080c, 0x649f, 0x1968, 0xb800,
+	0xc0e4, 0xb802, 0x0848, 0xa88c, 0x9065, 0x09b8, 0x6007, 0x0024,
+	0x2001, 0x195e, 0x2004, 0x601a, 0x0804, 0x797c, 0xa88c, 0x9065,
+	0x0960, 0x00e6, 0xa890, 0x9075, 0x2001, 0x1833, 0x2004, 0x9005,
+	0x0150, 0x080c, 0xa113, 0x8eff, 0x0118, 0x2e60, 0x080c, 0xa113,
+	0x00ee, 0x0804, 0x797c, 0x6024, 0xc0dc, 0xc0d5, 0x6026, 0x2e60,
+	0x6007, 0x003a, 0xa8a0, 0x9005, 0x0130, 0x6007, 0x003b, 0xa8a4,
+	0x602e, 0xa8a8, 0x6016, 0x6003, 0x0001, 0x080c, 0x8679, 0x080c,
+	0x8c10, 0x00ee, 0x0804, 0x797c, 0x2061, 0x1a48, 0x6000, 0xd084,
+	0x0190, 0xd08c, 0x1904, 0x7af5, 0x0126, 0x2091, 0x8000, 0x6204,
+	0x8210, 0x0220, 0x6206, 0x012e, 0x0804, 0x7af5, 0x012e, 0xa883,
+	0x0016, 0x0804, 0x7aee, 0xa883, 0x0007, 0x0804, 0x7aee, 0xa864,
+	0x8007, 0x9084, 0x00ff, 0x0130, 0x8001, 0x1138, 0x7007, 0x0001,
+	0x0069, 0x0005, 0x080c, 0x7662, 0x0040, 0x7007, 0x0003, 0x7012,
+	0x2900, 0x7016, 0x701a, 0x704b, 0x7a1e, 0x0005, 0x00b6, 0x00e6,
+	0x0126, 0x2091, 0x8000, 0x903e, 0x2061, 0x1800, 0x61cc, 0x81ff,
+	0x1904, 0x7aa0, 0x6130, 0xd194, 0x1904, 0x7aca, 0xa878, 0x2070,
+	0x9e82, 0x1cd0, 0x0a04, 0x7a94, 0x6064, 0x9e02, 0x1a04, 0x7a94,
+	0x7120, 0x9186, 0x0006, 0x1904, 0x7a86, 0x7010, 0x905d, 0x0904,
+	0x7aa0, 0xb800, 0xd0e4, 0x1904, 0x7ac4, 0x2061, 0x1a48, 0x6100,
+	0x9184, 0x0301, 0x9086, 0x0001, 0x15a0, 0x7024, 0xd0dc, 0x1904,
+	0x7acd, 0xa883, 0x0000, 0xa803, 0x0000, 0x2908, 0x7014, 0x9005,
+	0x1198, 0x7116, 0xa87c, 0xd0f4, 0x1904, 0x7ad0, 0x080c, 0x55db,
+	0xd09c, 0x1118, 0xa87c, 0xc0cc, 0xa87e, 0x2e60, 0x080c, 0x83f1,
+	0x012e, 0x00ee, 0x00be, 0x0005, 0x2048, 0xa800, 0x9005, 0x1de0,
+	0xa902, 0x2148, 0xa87c, 0xd0f4, 0x1904, 0x7ad0, 0x012e, 0x00ee,
+	0x00be, 0x0005, 0x012e, 0x00ee, 0xa883, 0x0006, 0x00be, 0x0804,
+	0x7aee, 0xd184, 0x0db8, 0xd1c4, 0x1190, 0x00a0, 0xa974, 0x080c,
+	0x649f, 0x15d0, 0xb800, 0xd0e4, 0x15b8, 0x7120, 0x9186, 0x0007,
+	0x1118, 0xa883, 0x0002, 0x0490, 0xa883, 0x0008, 0x0478, 0xa883,
+	0x000e, 0x0460, 0xa883, 0x0017, 0x0448, 0xa883, 0x0035, 0x0430,
+	0x080c, 0x55df, 0xd0fc, 0x01e8, 0xa878, 0x2070, 0x9e82, 0x1cd0,
+	0x02c0, 0x6064, 0x9e02, 0x12a8, 0x7120, 0x9186, 0x0006, 0x1188,
+	0x7010, 0x905d, 0x0170, 0xb800, 0xd0bc, 0x0158, 0x2039, 0x0001,
+	0x7000, 0x9086, 0x0007, 0x1904, 0x7a2a, 0x7003, 0x0002, 0x0804,
+	0x7a2a, 0xa883, 0x0028, 0x0010, 0xa883, 0x0029, 0x012e, 0x00ee,
+	0x00be, 0x0420, 0xa883, 0x002a, 0x0cc8, 0xa883, 0x0045, 0x0cb0,
+	0x2e60, 0x2019, 0x0002, 0x601b, 0x0014, 0x080c, 0xd440, 0x012e,
+	0x00ee, 0x00be, 0x0005, 0x2009, 0x003e, 0x0058, 0x2009, 0x0004,
+	0x0040, 0x2009, 0x0006, 0x0028, 0x2009, 0x0016, 0x0010, 0x2009,
+	0x0001, 0xa884, 0x9084, 0xff00, 0x9105, 0xa886, 0x0126, 0x2091,
+	0x8000, 0x080c, 0x6ae9, 0x012e, 0x0005, 0x080c, 0x1063, 0x0005,
+	0x00d6, 0x080c, 0x83e8, 0x00de, 0x0005, 0x00d6, 0x00e6, 0x0126,
+	0x2091, 0x8000, 0x2071, 0x0040, 0x702c, 0xd084, 0x01d8, 0x908c,
+	0x0780, 0x190c, 0x7b89, 0xd09c, 0x11a8, 0x2071, 0x1800, 0x70bc,
+	0x90ea, 0x0040, 0x0278, 0x8001, 0x70be, 0x702c, 0x2048, 0xa800,
+	0x702e, 0x9006, 0xa802, 0xa806, 0x2071, 0x0040, 0x2900, 0x7022,
+	0x702c, 0x0c28, 0x012e, 0x00ee, 0x00de, 0x0005, 0x0006, 0x9084,
+	0x0780, 0x190c, 0x7b89, 0x000e, 0x0005, 0x00d6, 0x00c6, 0x0036,
+	0x0026, 0x0016, 0x00b6, 0x7007, 0x0001, 0xaa74, 0x9282, 0x0004,
+	0x1a04, 0x7b7a, 0xa97c, 0x9188, 0x1000, 0x2104, 0x905d, 0xb804,
+	0xd284, 0x0140, 0x05e8, 0x8007, 0x9084, 0x00ff, 0x9084, 0x0006,
+	0x1108, 0x04b0, 0x2b10, 0x080c, 0xa08d, 0x1118, 0x080c, 0xa130,
+	0x05a8, 0x6212, 0xa874, 0x0002, 0x7b58, 0x7b5d, 0x7b60, 0x7b66,
+	0x2019, 0x0002, 0x080c, 0xd801, 0x0060, 0x080c, 0xd79d, 0x0048,
+	0x2019, 0x0002, 0xa980, 0x080c, 0xd7b8, 0x0018, 0xa980, 0x080c,
+	0xd79d, 0x080c, 0xa0e3, 0xa887, 0x0000, 0x0126, 0x2091, 0x8000,
+	0x080c, 0x6ae9, 0x012e, 0x00be, 0x001e, 0x002e, 0x003e, 0x00ce,
+	0x00de, 0x0005, 0xa887, 0x0006, 0x0c80, 0xa887, 0x0002, 0x0c68,
+	0xa887, 0x0005, 0x0c50, 0xa887, 0x0004, 0x0c38, 0xa887, 0x0007,
+	0x0c20, 0x2091, 0x8000, 0x0e04, 0x7b8b, 0x0006, 0x0016, 0x2001,
+	0x8003, 0x0006, 0x0804, 0x0e03, 0x2001, 0x1833, 0x2004, 0x9005,
+	0x0005, 0x0005, 0x00f6, 0x2079, 0x0300, 0x2001, 0x0200, 0x200c,
+	0xc1e5, 0xc1dc, 0x2102, 0x2009, 0x0218, 0x210c, 0xd1ec, 0x1120,
+	0x080c, 0x151a, 0x00fe, 0x0005, 0x2001, 0x020d, 0x2003, 0x0020,
+	0x781f, 0x0300, 0x00fe, 0x0005, 0x781c, 0xd08c, 0x0904, 0x7c0b,
+	0x68bc, 0x90aa, 0x0005, 0x0a04, 0x81e7, 0x7d44, 0x7c40, 0x9584,
+	0x00f6, 0x1510, 0x9484, 0x7000, 0x0140, 0x908a, 0x2000, 0x1260,
+	0x9584, 0x0700, 0x8007, 0x0804, 0x7c12, 0x7000, 0x9084, 0xff00,
+	0x9086, 0x8100, 0x0da8, 0x00b0, 0x9484, 0x0fff, 0x1130, 0x7000,
+	0x9084, 0xff00, 0x9086, 0x8100, 0x11c0, 0x080c, 0xdbeb, 0x080c,
+	0x811c, 0x7817, 0x0140, 0x00a8, 0x9584, 0x0076, 0x1118, 0x080c,
+	0x817a, 0x19c0, 0xd5a4, 0x0148, 0x0046, 0x0056, 0x080c, 0x7c6d,
+	0x080c, 0x226f, 0x005e, 0x004e, 0x0020, 0x080c, 0xdbeb, 0x7817,
+	0x0140, 0x080c, 0x7207, 0x0168, 0x2001, 0x0111, 0x2004, 0xd08c,
+	0x0140, 0x688f, 0x0000, 0x2001, 0x0110, 0x2003, 0x0008, 0x2003,
+	0x0000, 0x080c, 0x7c4e, 0x2001, 0x19c8, 0x2004, 0x9005, 0x090c,
+	0x8c10, 0x0005, 0x0002, 0x7c24, 0x7f24, 0x7c1b, 0x7c1b, 0x7c1b,
+	0x7c1b, 0x7c1b, 0x7c1b, 0x7817, 0x0140, 0x2001, 0x19c8, 0x2004,
+	0x9005, 0x090c, 0x8c10, 0x0005, 0x7000, 0x908c, 0xff00, 0x9194,
+	0xf000, 0x810f, 0x9484, 0x0fff, 0x688e, 0x9286, 0x2000, 0x1150,
+	0x6800, 0x9086, 0x0001, 0x1118, 0x080c, 0x5641, 0x0070, 0x080c,
+	0x7c8d, 0x0058, 0x9286, 0x3000, 0x1118, 0x080c, 0x7e5c, 0x0028,
+	0x9286, 0x8000, 0x1110, 0x080c, 0x8043, 0x7817, 0x0140, 0x2001,
+	0x19c8, 0x2004, 0x9005, 0x090c, 0x8c10, 0x0005, 0x2001, 0x1810,
+	0x2004, 0xd08c, 0x0178, 0x2001, 0x1800, 0x2004, 0x9086, 0x0003,
+	0x1148, 0x0026, 0x0036, 0x2011, 0x8048, 0x2518, 0x080c, 0x4b1f,
+	0x003e, 0x002e, 0x0005, 0x0036, 0x0046, 0x0056, 0x00f6, 0x2079,
+	0x0200, 0x2019, 0xfffe, 0x7c30, 0x0050, 0x0036, 0x0046, 0x0056,
+	0x00f6, 0x2079, 0x0200, 0x7d44, 0x7c40, 0x2019, 0xffff, 0x2001,
+	0x1810, 0x2004, 0xd08c, 0x0160, 0x2001, 0x1800, 0x2004, 0x9086,
+	0x0003, 0x1130, 0x0026, 0x2011, 0x8048, 0x080c, 0x4b1f, 0x002e,
+	0x00fe, 0x005e, 0x004e, 0x003e, 0x0005, 0x00b6, 0x00c6, 0x7010,
+	0x9084, 0xff00, 0x8007, 0x9096, 0x0001, 0x0120, 0x9096, 0x0023,
+	0x1904, 0x7e2d, 0x9186, 0x0023, 0x15c0, 0x080c, 0x80e1, 0x0904,
+	0x7e2d, 0x6120, 0x9186, 0x0001, 0x0150, 0x9186, 0x0004, 0x0138,
+	0x9186, 0x0008, 0x0120, 0x9186, 0x000a, 0x1904, 0x7e2d, 0x7124,
+	0x610a, 0x7030, 0x908e, 0x0200, 0x1130, 0x2009, 0x0015, 0x080c,
+	0xa15d, 0x0804, 0x7e2d, 0x908e, 0x0214, 0x0118, 0x908e, 0x0210,
+	0x1130, 0x2009, 0x0015, 0x080c, 0xa15d, 0x0804, 0x7e2d, 0x908e,
+	0x0100, 0x1904, 0x7e2d, 0x7034, 0x9005, 0x1904, 0x7e2d, 0x2009,
+	0x0016, 0x080c, 0xa15d, 0x0804, 0x7e2d, 0x9186, 0x0022, 0x1904,
+	0x7e2d, 0x7030, 0x908e, 0x0300, 0x1580, 0x68d8, 0xd0a4, 0x0528,
+	0xc0b5, 0x68da, 0x7100, 0x918c, 0x00ff, 0x697a, 0x7004, 0x687e,
+	0x00f6, 0x2079, 0x0100, 0x79e6, 0x78ea, 0x0006, 0x9084, 0x00ff,
+	0x0016, 0x2008, 0x080c, 0x27b7, 0x7932, 0x7936, 0x001e, 0x000e,
+	0x00fe, 0x080c, 0x276e, 0x695a, 0x703c, 0x00e6, 0x2071, 0x0140,
+	0x7086, 0x2071, 0x1800, 0x70b2, 0x00ee, 0x7034, 0x9005, 0x1904,
+	0x7e2d, 0x2009, 0x0017, 0x0804, 0x7ddd, 0x908e, 0x0400, 0x1190,
+	0x7034, 0x9005, 0x1904, 0x7e2d, 0x080c, 0x7207, 0x0120, 0x2009,
+	0x001d, 0x0804, 0x7ddd, 0x68d8, 0xc0a5, 0x68da, 0x2009, 0x0030,
+	0x0804, 0x7ddd, 0x908e, 0x0500, 0x1140, 0x7034, 0x9005, 0x1904,
+	0x7e2d, 0x2009, 0x0018, 0x0804, 0x7ddd, 0x908e, 0x2010, 0x1120,
+	0x2009, 0x0019, 0x0804, 0x7ddd, 0x908e, 0x2110, 0x1120, 0x2009,
+	0x001a, 0x0804, 0x7ddd, 0x908e, 0x5200, 0x1140, 0x7034, 0x9005,
+	0x1904, 0x7e2d, 0x2009, 0x001b, 0x0804, 0x7ddd, 0x908e, 0x5000,
+	0x1140, 0x7034, 0x9005, 0x1904, 0x7e2d, 0x2009, 0x001c, 0x0804,
+	0x7ddd, 0x908e, 0x1300, 0x1120, 0x2009, 0x0034, 0x0804, 0x7ddd,
+	0x908e, 0x1200, 0x1140, 0x7034, 0x9005, 0x1904, 0x7e2d, 0x2009,
+	0x0024, 0x0804, 0x7ddd, 0x908c, 0xff00, 0x918e, 0x2400, 0x1170,
+	0x2009, 0x002d, 0x2001, 0x1810, 0x2004, 0xd09c, 0x0904, 0x7ddd,
+	0x080c, 0xcc07, 0x1904, 0x7e2d, 0x0804, 0x7ddb, 0x908c, 0xff00,
+	0x918e, 0x5300, 0x1120, 0x2009, 0x002a, 0x0804, 0x7ddd, 0x908e,
+	0x0f00, 0x1120, 0x2009, 0x0020, 0x0804, 0x7ddd, 0x908e, 0x6104,
+	0x1528, 0x2029, 0x0205, 0x2011, 0x026d, 0x8208, 0x2204, 0x9082,
+	0x0004, 0x8004, 0x8004, 0x20a8, 0x2011, 0x8015, 0x211c, 0x8108,
+	0x0046, 0x2124, 0x080c, 0x4b1f, 0x004e, 0x8108, 0x0f04, 0x7da9,
+	0x9186, 0x0280, 0x1d88, 0x2504, 0x8000, 0x202a, 0x2009, 0x0260,
+	0x0c58, 0x202b, 0x0000, 0x2009, 0x0023, 0x0478, 0x908e, 0x6000,
+	0x1118, 0x2009, 0x003f, 0x0448, 0x908e, 0x7800, 0x1118, 0x2009,
+	0x0045, 0x0418, 0x908e, 0x1000, 0x1118, 0x2009, 0x004e, 0x00e8,
+	0x908e, 0x6300, 0x1118, 0x2009, 0x004a, 0x00b8, 0x908c, 0xff00,
+	0x918e, 0x5600, 0x1118, 0x2009, 0x004f, 0x0078, 0x908c, 0xff00,
+	0x918e, 0x5700, 0x1118, 0x2009, 0x0050, 0x0038, 0x2009, 0x001d,
+	0x6838, 0xd0d4, 0x0110, 0x2009, 0x004c, 0x0016, 0x2011, 0x0263,
+	0x2204, 0x8211, 0x220c, 0x080c, 0x276e, 0x1904, 0x7e30, 0x080c,
+	0x643f, 0x1904, 0x7e30, 0xbe12, 0xbd16, 0x001e, 0x0016, 0x080c,
+	0x7207, 0x01c0, 0x68d8, 0xd08c, 0x1148, 0x7000, 0x9084, 0x00ff,
+	0x1188, 0x7004, 0x9084, 0xff00, 0x1168, 0x0040, 0x6878, 0x9606,
+	0x1148, 0x687c, 0x9506, 0x9084, 0xff00, 0x1120, 0x9584, 0x00ff,
+	0xb8b2, 0x0080, 0xb8b0, 0x9005, 0x1168, 0x9186, 0x0046, 0x1150,
+	0x6878, 0x9606, 0x1138, 0x687c, 0x9506, 0x9084, 0xff00, 0x1110,
+	0x001e, 0x0098, 0x080c, 0xa08d, 0x01a8, 0x2b08, 0x6112, 0x6023,
+	0x0004, 0x7120, 0x610a, 0x001e, 0x9186, 0x004c, 0x1110, 0x6023,
+	0x000a, 0x0016, 0x001e, 0x080c, 0xa15d, 0x00ce, 0x00be, 0x0005,
+	0x001e, 0x0cd8, 0x2001, 0x180e, 0x2004, 0xd0ec, 0x0120, 0x2011,
+	0x8049, 0x080c, 0x4b1f, 0x080c, 0xa130, 0x0d90, 0x2b08, 0x6112,
+	0x6023, 0x0004, 0x7120, 0x610a, 0x001e, 0x0016, 0x9186, 0x0017,
+	0x0118, 0x9186, 0x0030, 0x1128, 0x6007, 0x0009, 0x6017, 0x2900,
+	0x0020, 0x6007, 0x0051, 0x6017, 0x0000, 0x602f, 0x0009, 0x6003,
+	0x0001, 0x080c, 0x86c1, 0x08a0, 0x080c, 0x8206, 0x1158, 0x080c,
+	0x32ae, 0x1140, 0x7010, 0x9084, 0xff00, 0x8007, 0x908e, 0x0008,
+	0x1108, 0x0009, 0x0005, 0x00b6, 0x00c6, 0x0046, 0x7000, 0x908c,
+	0xff00, 0x810f, 0x9186, 0x0033, 0x11e8, 0x080c, 0x80e1, 0x0904,
+	0x7ebc, 0x7124, 0x610a, 0x7030, 0x908e, 0x0200, 0x1140, 0x7034,
+	0x9005, 0x15d0, 0x2009, 0x0015, 0x080c, 0xa15d, 0x04a8, 0x908e,
+	0x0100, 0x1590, 0x7034, 0x9005, 0x1578, 0x2009, 0x0016, 0x080c,
+	0xa15d, 0x0450, 0x9186, 0x0032, 0x1538, 0x7030, 0x908e, 0x1400,
+	0x1518, 0x2009, 0x0038, 0x0016, 0x2011, 0x0263, 0x2204, 0x8211,
+	0x220c, 0x080c, 0x276e, 0x11b8, 0x080c, 0x643f, 0x11a0, 0xbe12,
+	0xbd16, 0x080c, 0xa08d, 0x0178, 0x2b08, 0x6112, 0x080c, 0xc2b3,
+	0x6023, 0x0004, 0x7120, 0x610a, 0x001e, 0x080c, 0xa15d, 0x080c,
+	0x8c10, 0x0010, 0x00ce, 0x001e, 0x004e, 0x00ce, 0x00be, 0x0005,
+	0x00b6, 0x0046, 0x00e6, 0x00d6, 0x2028, 0x2130, 0x9696, 0x00ff,
+	0x11b8, 0x9592, 0xfffc, 0x02a0, 0x9596, 0xfffd, 0x1120, 0x2009,
+	0x007f, 0x0804, 0x7f1e, 0x9596, 0xfffe, 0x1120, 0x2009, 0x007e,
+	0x0804, 0x7f1e, 0x9596, 0xfffc, 0x1118, 0x2009, 0x0080, 0x04f0,
+	0x2011, 0x0000, 0x2019, 0x1836, 0x231c, 0xd3ac, 0x0130, 0x9026,
+	0x20a9, 0x0800, 0x2071, 0x1000, 0x0030, 0x2021, 0x0081, 0x20a9,
+	0x077f, 0x2071, 0x1081, 0x2e1c, 0x93dd, 0x0000, 0x1140, 0x82ff,
+	0x11d0, 0x9496, 0x00ff, 0x01b8, 0x2410, 0xc2fd, 0x00a0, 0xbf10,
+	0x2600, 0x9706, 0xb814, 0x1120, 0x9546, 0x1110, 0x2408, 0x00b0,
+	0x9745, 0x1148, 0x94c6, 0x007e, 0x0130, 0x94c6, 0x007f, 0x0118,
+	0x94c6, 0x0080, 0x1d20, 0x8420, 0x8e70, 0x1f04, 0x7ef3, 0x82ff,
+	0x1118, 0x9085, 0x0001, 0x0018, 0xc2fc, 0x2208, 0x9006, 0x00de,
+	0x00ee, 0x004e, 0x00be, 0x0005, 0x2001, 0x1836, 0x200c, 0x9184,
+	0x0080, 0x0110, 0xd18c, 0x0138, 0x7000, 0x908c, 0xff00, 0x810f,
+	0x9184, 0x000f, 0x004a, 0x7817, 0x0140, 0x2001, 0x19c8, 0x2004,
+	0x9005, 0x090c, 0x8c10, 0x0005, 0x7f4c, 0x7f4c, 0x7f4c, 0x80f3,
+	0x7f4c, 0x7f55, 0x7f80, 0x800e, 0x7f4c, 0x7f4c, 0x7f4c, 0x7f4c,
+	0x7f4c, 0x7f4c, 0x7f4c, 0x7f4c, 0x7817, 0x0140, 0x2001, 0x19c8,
+	0x2004, 0x9005, 0x090c, 0x8c10, 0x0005, 0x00b6, 0x7110, 0xd1bc,
+	0x01e8, 0x7120, 0x2160, 0x9c8c, 0x0007, 0x11c0, 0x9c8a, 0x1cd0,
+	0x02a8, 0x6864, 0x9c02, 0x1290, 0x7008, 0x9084, 0x00ff, 0x6110,
+	0x2158, 0xb910, 0x9106, 0x1150, 0x700c, 0xb914, 0x9106, 0x1130,
+	0x7124, 0x610a, 0x2009, 0x0046, 0x080c, 0xa15d, 0x7817, 0x0140,
+	0x2001, 0x19c8, 0x2004, 0x9005, 0x090c, 0x8c10, 0x00be, 0x0005,
+	0x00b6, 0x00c6, 0x9484, 0x0fff, 0x0904, 0x7fe4, 0x7110, 0xd1bc,
+	0x1904, 0x7fe4, 0x7108, 0x700c, 0x2028, 0x918c, 0x00ff, 0x2130,
+	0x9094, 0xff00, 0x15b0, 0x81ff, 0x15a0, 0x9080, 0x32e9, 0x200d,
+	0x918c, 0xff00, 0x810f, 0x2001, 0x0080, 0x9106, 0x0904, 0x7fe4,
+	0x080c, 0x643f, 0x1904, 0x7fe4, 0xbe12, 0xbd16, 0xb800, 0xd0ec,
+	0x15d8, 0xba04, 0x9294, 0xff00, 0x9286, 0x0600, 0x11a0, 0x080c,
+	0xa08d, 0x05e8, 0x2b08, 0x7028, 0x6046, 0x702c, 0x604a, 0x6112,
+	0x6023, 0x0006, 0x7120, 0x610a, 0x7130, 0x6156, 0x2009, 0x0044,
+	0x080c, 0xce65, 0x0408, 0x080c, 0x67c3, 0x1138, 0xb807, 0x0606,
+	0x0c30, 0x190c, 0x7ec0, 0x11c0, 0x0898, 0x080c, 0xa08d, 0x2b08,
+	0x0198, 0x6112, 0x6023, 0x0004, 0x7120, 0x610a, 0x9286, 0x0400,
+	0x1118, 0x6007, 0x0005, 0x0010, 0x6007, 0x0001, 0x6003, 0x0001,
+	0x080c, 0x86c1, 0x080c, 0x8c10, 0x7817, 0x0140, 0x2001, 0x19c8,
+	0x2004, 0x9005, 0x090c, 0x8c10, 0x00ce, 0x00be, 0x0005, 0x2001,
+	0x180e, 0x2004, 0xd0ec, 0x0120, 0x2011, 0x8049, 0x080c, 0x4b1f,
+	0x080c, 0xa130, 0x0d48, 0x2b08, 0x6112, 0x6023, 0x0006, 0x7120,
+	0x610a, 0x7130, 0x6156, 0x6017, 0xf300, 0x6003, 0x0001, 0x6007,
+	0x0041, 0x080c, 0x8679, 0x080c, 0x8c10, 0x08b0, 0x00b6, 0x7110,
+	0xd1bc, 0x01e8, 0x7020, 0x2060, 0x9c84, 0x0007, 0x11c0, 0x9c82,
+	0x1cd0, 0x02a8, 0x6864, 0x9c02, 0x1290, 0x7008, 0x9084, 0x00ff,
+	0x6110, 0x2158, 0xb910, 0x9106, 0x1150, 0x700c, 0xb914, 0x9106,
+	0x1130, 0x7124, 0x610a, 0x2009, 0x0045, 0x080c, 0xa15d, 0x7817,
+	0x0140, 0x2001, 0x19c8, 0x2004, 0x9005, 0x090c, 0x8c10, 0x00be,
+	0x0005, 0x6120, 0x9186, 0x0002, 0x0128, 0x9186, 0x0005, 0x0110,
+	0x9085, 0x0001, 0x0005, 0x080c, 0x8206, 0x1180, 0x080c, 0x32ae,
+	0x1168, 0x7010, 0x9084, 0xff00, 0x8007, 0x9086, 0x0000, 0x1130,
+	0x9184, 0x000f, 0x908a, 0x0006, 0x1208, 0x000b, 0x0005, 0x805d,
+	0x805e, 0x805d, 0x805d, 0x80c3, 0x80d2, 0x0005, 0x00b6, 0x700c,
+	0x7108, 0x080c, 0x276e, 0x1904, 0x80c1, 0x080c, 0x643f, 0x1904,
+	0x80c1, 0xbe12, 0xbd16, 0x7110, 0xd1bc, 0x0540, 0x702c, 0xd084,
+	0x1120, 0xb800, 0xd0bc, 0x1904, 0x80c1, 0x080c, 0x67c3, 0x0148,
+	0x9086, 0x0004, 0x0130, 0x080c, 0x67cb, 0x0118, 0x9086, 0x0004,
+	0x1588, 0x00c6, 0x080c, 0x80e1, 0x00ce, 0x05d8, 0x080c, 0xa08d,
+	0x2b08, 0x05b8, 0x6112, 0x080c, 0xc2b3, 0x6023, 0x0002, 0x7120,
+	0x610a, 0x2009, 0x0088, 0x080c, 0xa15d, 0x0458, 0x080c, 0x67c3,
+	0x0148, 0x9086, 0x0004, 0x0130, 0x080c, 0x67cb, 0x0118, 0x9086,
+	0x0004, 0x1180, 0x080c, 0xa08d, 0x2b08, 0x01d8, 0x6112, 0x080c,
+	0xc2b3, 0x6023, 0x0005, 0x7120, 0x610a, 0x2009, 0x0088, 0x080c,
+	0xa15d, 0x0078, 0x080c, 0xa08d, 0x2b08, 0x0158, 0x6112, 0x080c,
+	0xc2b3, 0x6023, 0x0004, 0x7120, 0x610a, 0x2009, 0x0001, 0x080c,
+	0xa15d, 0x00be, 0x0005, 0x7110, 0xd1bc, 0x0158, 0x00d1, 0x0148,
+	0x080c, 0x8039, 0x1130, 0x7124, 0x610a, 0x2009, 0x0089, 0x080c,
+	0xa15d, 0x0005, 0x7110, 0xd1bc, 0x0158, 0x0059, 0x0148, 0x080c,
+	0x8039, 0x1130, 0x7124, 0x610a, 0x2009, 0x008a, 0x080c, 0xa15d,
+	0x0005, 0x7020, 0x2060, 0x9c84, 0x0007, 0x1158, 0x9c82, 0x1cd0,
+	0x0240, 0x2001, 0x1819, 0x2004, 0x9c02, 0x1218, 0x9085, 0x0001,
+	0x0005, 0x9006, 0x0ce8, 0x00b6, 0x7110, 0xd1bc, 0x11d8, 0x7024,
+	0x2060, 0x9c84, 0x0007, 0x11b0, 0x9c82, 0x1cd0, 0x0298, 0x6864,
+	0x9c02, 0x1280, 0x7008, 0x9084, 0x00ff, 0x6110, 0x2158, 0xb910,
+	0x9106, 0x1140, 0x700c, 0xb914, 0x9106, 0x1120, 0x2009, 0x0051,
+	0x080c, 0xa15d, 0x7817, 0x0140, 0x2001, 0x19c8, 0x2004, 0x9005,
+	0x090c, 0x8c10, 0x00be, 0x0005, 0x2031, 0x0105, 0x0069, 0x0005,
+	0x2031, 0x0206, 0x0049, 0x0005, 0x2031, 0x0207, 0x0029, 0x0005,
+	0x2031, 0x0213, 0x0009, 0x0005, 0x00c6, 0x0096, 0x00f6, 0x7000,
+	0x9084, 0xf000, 0x9086, 0xc000, 0x05d0, 0x080c, 0xa08d, 0x05b8,
+	0x0066, 0x00c6, 0x0046, 0x2011, 0x0263, 0x2204, 0x8211, 0x220c,
+	0x080c, 0x276e, 0x15a0, 0x080c, 0x643f, 0x1588, 0xbe12, 0xbd16,
+	0x2b00, 0x004e, 0x00ce, 0x6012, 0x080c, 0xc2b3, 0x080c, 0x1031,
+	0x0510, 0x2900, 0x605a, 0x9006, 0xa802, 0xa866, 0xac6a, 0xa85c,
+	0x90f8, 0x001b, 0x20a9, 0x000e, 0xa860, 0x20e8, 0x20e1, 0x0000,
+	0x2fa0, 0x2e98, 0x4003, 0x006e, 0x6616, 0x6007, 0x003e, 0x6023,
+	0x0001, 0x6003, 0x0001, 0x080c, 0x86c1, 0x080c, 0x8c10, 0x00fe,
+	0x009e, 0x00ce, 0x0005, 0x080c, 0xa0e3, 0x006e, 0x0cc0, 0x004e,
+	0x00ce, 0x0cc8, 0x00c6, 0x7000, 0x908c, 0xff00, 0x9184, 0xf000,
+	0x810f, 0x9086, 0x2000, 0x1904, 0x81d1, 0x9186, 0x0022, 0x15f0,
+	0x2001, 0x0111, 0x2004, 0x9005, 0x1904, 0x81d3, 0x7030, 0x908e,
+	0x0400, 0x0904, 0x81d3, 0x908e, 0x6000, 0x05e8, 0x908e, 0x5400,
+	0x05d0, 0x908e, 0x0300, 0x11d8, 0x2009, 0x1836, 0x210c, 0xd18c,
+	0x1590, 0xd1a4, 0x1580, 0x080c, 0x6781, 0x0588, 0x68ac, 0x9084,
+	0x00ff, 0x7100, 0x918c, 0x00ff, 0x9106, 0x1518, 0x687c, 0x69ac,
+	0x918c, 0xff00, 0x9105, 0x7104, 0x9106, 0x11d8, 0x00e0, 0x2009,
+	0x0103, 0x210c, 0xd1b4, 0x11a8, 0x908e, 0x5200, 0x09e8, 0x908e,
+	0x0500, 0x09d0, 0x908e, 0x5000, 0x09b8, 0x0058, 0x9186, 0x0023,
+	0x1140, 0x080c, 0x80e1, 0x0128, 0x6004, 0x9086, 0x0002, 0x0118,
+	0x0000, 0x9006, 0x0010, 0x9085, 0x0001, 0x00ce, 0x0005, 0x7030,
+	0x908e, 0x0300, 0x0118, 0x908e, 0x5200, 0x1d98, 0x2001, 0x1836,
+	0x2004, 0x9084, 0x0009, 0x9086, 0x0008, 0x0d68, 0x0c50, 0x00f6,
+	0x2079, 0x0200, 0x7800, 0xc0e5, 0xc0cc, 0x7802, 0x00fe, 0x0005,
+	0x00f6, 0x2079, 0x1800, 0x7834, 0xd084, 0x1130, 0x2079, 0x0200,
+	0x7800, 0x9085, 0x1200, 0x7802, 0x00fe, 0x0005, 0x00e6, 0x2071,
+	0x1800, 0x7034, 0xc084, 0x7036, 0x00ee, 0x0005, 0x0016, 0x2001,
+	0x1836, 0x200c, 0x9184, 0x0080, 0x0118, 0xd18c, 0x0118, 0x9006,
+	0x001e, 0x0005, 0x9085, 0x0001, 0x0cd8, 0x2071, 0x19d2, 0x7003,
+	0x0003, 0x700f, 0x0361, 0x9006, 0x701a, 0x7072, 0x7012, 0x7017,
+	0x1cd0, 0x7007, 0x0000, 0x7026, 0x702b, 0x966c, 0x7032, 0x7037,
+	0x96d4, 0x703f, 0xffff, 0x7042, 0x7047, 0x546d, 0x704a, 0x705b,
+	0x8375, 0x080c, 0x104a, 0x090c, 0x0dfa, 0x2900, 0x703a, 0xa867,
+	0x0003, 0xa86f, 0x0100, 0xa8ab, 0xdcb0, 0x0005, 0x2071, 0x19d2,
+	0x1d04, 0x82c9, 0x2091, 0x6000, 0x700c, 0x8001, 0x700e, 0x1510,
+	0x2001, 0x187d, 0x2004, 0xd0c4, 0x0158, 0x3a00, 0xd08c, 0x1140,
+	0x20d1, 0x0000, 0x20d1, 0x0001, 0x20d1, 0x0000, 0x080c, 0x0dfa,
+	0x700f, 0x0361, 0x7007, 0x0001, 0x0126, 0x2091, 0x8000, 0x080c,
+	0x83ba, 0x7040, 0x900d, 0x0148, 0x8109, 0x7142, 0x1130, 0x7044,
+	0x080f, 0x0018, 0x0126, 0x2091, 0x8000, 0x7024, 0x900d, 0x0188,
+	0x7020, 0x8001, 0x7022, 0x1168, 0x7023, 0x0009, 0x8109, 0x7126,
+	0x9186, 0x03e8, 0x1110, 0x7028, 0x080f, 0x81ff, 0x1110, 0x7028,
+	0x080f, 0x7030, 0x900d, 0x0180, 0x702c, 0x8001, 0x702e, 0x1160,
+	0x702f, 0x0009, 0x8109, 0x7132, 0x0128, 0x9184, 0x007f, 0x090c,
+	0x9802, 0x0010, 0x7034, 0x080f, 0x703c, 0x9005, 0x0118, 0x0310,
+	0x8001, 0x703e, 0x704c, 0x900d, 0x0168, 0x7048, 0x8001, 0x704a,
+	0x1148, 0x704b, 0x0009, 0x8109, 0x714e, 0x1120, 0x7150, 0x714e,
+	0x7058, 0x080f, 0x7018, 0x900d, 0x01d8, 0x0016, 0x7070, 0x900d,
+	0x0158, 0x706c, 0x8001, 0x706e, 0x1138, 0x706f, 0x0009, 0x8109,
+	0x7172, 0x1110, 0x7074, 0x080f, 0x001e, 0x7008, 0x8001, 0x700a,
+	0x1138, 0x700b, 0x0009, 0x8109, 0x711a, 0x1110, 0x701c, 0x080f,
+	0x012e, 0x7004, 0x0002, 0x82f1, 0x82f2, 0x830e, 0x00e6, 0x2071,
+	0x19d2, 0x7018, 0x9005, 0x1120, 0x711a, 0x721e, 0x700b, 0x0009,
+	0x00ee, 0x0005, 0x00e6, 0x0006, 0x2071, 0x19d2, 0x701c, 0x9206,
+	0x1120, 0x701a, 0x701e, 0x7072, 0x7076, 0x000e, 0x00ee, 0x0005,
+	0x00e6, 0x2071, 0x19d2, 0xb888, 0x9102, 0x0208, 0xb98a, 0x00ee,
+	0x0005, 0x0005, 0x00b6, 0x7110, 0x080c, 0x649f, 0x1168, 0xb888,
+	0x8001, 0x0250, 0xb88a, 0x1140, 0x0126, 0x2091, 0x8000, 0x0016,
+	0x080c, 0x8c10, 0x001e, 0x012e, 0x8108, 0x9182, 0x0800, 0x0218,
+	0x900e, 0x7007, 0x0002, 0x7112, 0x00be, 0x0005, 0x7014, 0x2060,
+	0x0126, 0x2091, 0x8000, 0x6040, 0x9005, 0x0128, 0x8001, 0x6042,
+	0x1110, 0x080c, 0xc144, 0x6018, 0x9005, 0x0528, 0x8001, 0x601a,
+	0x1510, 0x6120, 0x9186, 0x0003, 0x0118, 0x9186, 0x0006, 0x11c8,
+	0x080c, 0xbe37, 0x01b0, 0x6014, 0x2048, 0xa884, 0x908a, 0x199a,
+	0x0280, 0x9082, 0x1999, 0xa886, 0x908a, 0x199a, 0x0210, 0x2001,
+	0x1999, 0x8003, 0x800b, 0x810b, 0x9108, 0x611a, 0xa87c, 0xd0e4,
+	0x0110, 0x080c, 0xbb23, 0x012e, 0x9c88, 0x0018, 0x7116, 0x2001,
+	0x1819, 0x2004, 0x9102, 0x0220, 0x7017, 0x1cd0, 0x7007, 0x0000,
+	0x0005, 0x00e6, 0x2071, 0x19d2, 0x7027, 0x07d0, 0x7023, 0x0009,
+	0x00ee, 0x0005, 0x2001, 0x19db, 0x2003, 0x0000, 0x0005, 0x00e6,
+	0x2071, 0x19d2, 0x7132, 0x702f, 0x0009, 0x00ee, 0x0005, 0x2011,
+	0x19de, 0x2013, 0x0000, 0x0005, 0x00e6, 0x2071, 0x19d2, 0x711a,
+	0x721e, 0x700b, 0x0009, 0x00ee, 0x0005, 0x0086, 0x0026, 0x7054,
+	0x8000, 0x7056, 0x2001, 0x19e0, 0x2044, 0xa06c, 0x9086, 0x0000,
+	0x0150, 0x7068, 0xa09a, 0x7064, 0xa096, 0x7060, 0xa092, 0x705c,
+	0xa08e, 0x080c, 0x112e, 0x002e, 0x008e, 0x0005, 0x0006, 0x0016,
+	0x0096, 0x00a6, 0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x0156,
+	0x080c, 0x823e, 0x015e, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be,
+	0x00ae, 0x009e, 0x001e, 0x000e, 0x0005, 0x00e6, 0x2071, 0x19d2,
+	0x7172, 0x7276, 0x706f, 0x0009, 0x00ee, 0x0005, 0x00e6, 0x0006,
+	0x2071, 0x19d2, 0x7074, 0x9206, 0x1110, 0x7072, 0x7076, 0x000e,
+	0x00ee, 0x0005, 0x2069, 0x1800, 0x69e4, 0xd1e4, 0x1518, 0x0026,
+	0xd1ec, 0x0140, 0x6a50, 0x6870, 0x9202, 0x0288, 0x8117, 0x9294,
+	0x00c0, 0x0088, 0x9184, 0x0007, 0x01a0, 0x8109, 0x9184, 0x0007,
+	0x0110, 0x69e6, 0x0070, 0x8107, 0x9084, 0x0007, 0x910d, 0x8107,
+	0x9106, 0x9094, 0x00c0, 0x9184, 0xff3f, 0x9205, 0x68e6, 0x080c,
+	0x0f11, 0x002e, 0x0005, 0x00c6, 0x2061, 0x1a48, 0x00ce, 0x0005,
+	0x9184, 0x000f, 0x8003, 0x8003, 0x8003, 0x9080, 0x1a48, 0x2060,
+	0x0005, 0xa884, 0x908a, 0x199a, 0x1638, 0x9005, 0x1150, 0x00c6,
+	0x2061, 0x1a48, 0x6014, 0x00ce, 0x9005, 0x1130, 0x2001, 0x001e,
+	0x0018, 0x908e, 0xffff, 0x01b0, 0x8003, 0x800b, 0x810b, 0x9108,
+	0x611a, 0xa87c, 0x908c, 0x00c0, 0x918e, 0x00c0, 0x0904, 0x847b,
+	0xd0b4, 0x1168, 0xd0bc, 0x1904, 0x8454, 0x2009, 0x0006, 0x080c,
+	0x84a8, 0x0005, 0x900e, 0x0c60, 0x2001, 0x1999, 0x08b0, 0xd0fc,
+	0x0160, 0x908c, 0x0003, 0x0120, 0x918e, 0x0003, 0x1904, 0x84a2,
+	0x908c, 0x2020, 0x918e, 0x2020, 0x01a8, 0x6024, 0xd0d4, 0x11e8,
+	0x2009, 0x187d, 0x2104, 0xd084, 0x1138, 0x87ff, 0x1120, 0x2009,
+	0x0043, 0x0804, 0xa15d, 0x0005, 0x87ff, 0x1de8, 0x2009, 0x0042,
+	0x0804, 0xa15d, 0x6110, 0x00b6, 0x2158, 0xb900, 0x00be, 0xd1ac,
+	0x0d20, 0x6024, 0xc0cd, 0x6026, 0x0c00, 0xc0d4, 0x6026, 0xa890,
+	0x602e, 0xa88c, 0x6032, 0x08e0, 0xd0fc, 0x0160, 0x908c, 0x0003,
+	0x0120, 0x918e, 0x0003, 0x1904, 0x84a2, 0x908c, 0x2020, 0x918e,
+	0x2020, 0x0170, 0x0076, 0x00f6, 0x2c78, 0x080c, 0x16db, 0x00fe,
+	0x007e, 0x87ff, 0x1120, 0x2009, 0x0042, 0x080c, 0xa15d, 0x0005,
+	0x6110, 0x00b6, 0x2158, 0xb900, 0x00be, 0xd1ac, 0x0d58, 0x6124,
+	0xc1cd, 0x6126, 0x0c38, 0xd0fc, 0x0188, 0x908c, 0x2020, 0x918e,
+	0x2020, 0x01a8, 0x9084, 0x0003, 0x908e, 0x0002, 0x0148, 0x87ff,
+	0x1120, 0x2009, 0x0041, 0x080c, 0xa15d, 0x0005, 0x00b9, 0x0ce8,
+	0x87ff, 0x1dd8, 0x2009, 0x0043, 0x080c, 0xa15d, 0x0cb0, 0x6110,
+	0x00b6, 0x2158, 0xb900, 0x00be, 0xd1ac, 0x0d20, 0x6124, 0xc1cd,
+	0x6126, 0x0c00, 0x2009, 0x0004, 0x0019, 0x0005, 0x2009, 0x0001,
+	0x0096, 0x080c, 0xbe37, 0x0518, 0x6014, 0x2048, 0xa982, 0xa800,
+	0x6016, 0x9186, 0x0001, 0x1188, 0xa97c, 0x918c, 0x8100, 0x918e,
+	0x8100, 0x1158, 0x00c6, 0x2061, 0x1a48, 0x6200, 0xd28c, 0x1120,
+	0x6204, 0x8210, 0x0208, 0x6206, 0x00ce, 0x080c, 0x6923, 0x6014,
+	0x904d, 0x0076, 0x2039, 0x0000, 0x190c, 0x83f1, 0x007e, 0x009e,
+	0x0005, 0x0156, 0x00c6, 0x2061, 0x1a48, 0x6000, 0x81ff, 0x0110,
+	0x9205, 0x0008, 0x9204, 0x6002, 0x00ce, 0x015e, 0x0005, 0x6800,
+	0xd08c, 0x1138, 0x6808, 0x9005, 0x0120, 0x8001, 0x680a, 0x9085,
+	0x0001, 0x0005, 0x0126, 0x2091, 0x8000, 0x0036, 0x0046, 0x20a9,
+	0x0010, 0x9006, 0x8004, 0x8086, 0x818e, 0x1208, 0x9200, 0x1f04,
+	0x84f3, 0x8086, 0x818e, 0x004e, 0x003e, 0x012e, 0x0005, 0x0126,
+	0x2091, 0x8000, 0x0076, 0x0156, 0x20a9, 0x0010, 0x9005, 0x01c8,
+	0x911a, 0x12b8, 0x8213, 0x818d, 0x0228, 0x911a, 0x1220, 0x1f04,
+	0x850a, 0x0028, 0x911a, 0x2308, 0x8210, 0x1f04, 0x850a, 0x0006,
+	0x3200, 0x9084, 0xefff, 0x2080, 0x000e, 0x015e, 0x007e, 0x012e,
+	0x0005, 0x0006, 0x3200, 0x9085, 0x1000, 0x0ca8, 0x0126, 0x2091,
+	0x2800, 0x2079, 0x19bf, 0x012e, 0x00d6, 0x2069, 0x19bf, 0x6803,
+	0x0005, 0x0156, 0x0146, 0x01d6, 0x20e9, 0x0000, 0x2069, 0x0200,
+	0x080c, 0x9eeb, 0x0401, 0x080c, 0x9ed6, 0x00e9, 0x080c, 0x9ed9,
+	0x00d1, 0x080c, 0x9edc, 0x00b9, 0x080c, 0x9edf, 0x00a1, 0x080c,
+	0x9ee2, 0x0089, 0x080c, 0x9ee5, 0x0071, 0x080c, 0x9ee8, 0x0059,
+	0x01de, 0x014e, 0x015e, 0x2069, 0x0004, 0x2d04, 0x9085, 0x8001,
+	0x206a, 0x00de, 0x0005, 0x20a9, 0x0020, 0x20a1, 0x0240, 0x2001,
+	0x0000, 0x4004, 0x0005, 0x00c6, 0x6027, 0x0001, 0x7804, 0x9084,
+	0x0007, 0x0002, 0x8574, 0x8598, 0x85d9, 0x857a, 0x8598, 0x8574,
+	0x8572, 0x8572, 0x080c, 0x0dfa, 0x080c, 0x835a, 0x080c, 0x8c10,
+	0x00ce, 0x0005, 0x62c0, 0x82ff, 0x1110, 0x00ce, 0x0005, 0x2011,
+	0x5d94, 0x080c, 0x82da, 0x7828, 0x9092, 0x00c8, 0x1228, 0x8000,
+	0x782a, 0x080c, 0x5dd4, 0x0c88, 0x62c0, 0x080c, 0x9eef, 0x080c,
+	0x5d94, 0x7807, 0x0003, 0x7827, 0x0000, 0x782b, 0x0000, 0x0c28,
+	0x080c, 0x835a, 0x6220, 0xd2a4, 0x0170, 0xd2cc, 0x0160, 0x782b,
+	0x0000, 0x7824, 0x9065, 0x090c, 0x0dfa, 0x2009, 0x0013, 0x080c,
+	0xa15d, 0x00ce, 0x0005, 0x00c6, 0x7824, 0x9065, 0x090c, 0x0dfa,
+	0x7828, 0x9092, 0xc350, 0x12c0, 0x8000, 0x782a, 0x00ce, 0x080c,
+	0x2afe, 0x0278, 0x00c6, 0x7924, 0x2160, 0x6010, 0x906d, 0x090c,
+	0x0dfa, 0x7807, 0x0000, 0x7827, 0x0000, 0x00ce, 0x080c, 0x8c10,
+	0x0c00, 0x080c, 0x9632, 0x08e8, 0x2011, 0x0130, 0x2214, 0x080c,
+	0x9eef, 0x080c, 0xdc28, 0x2009, 0x0014, 0x080c, 0xa15d, 0x00ce,
+	0x0880, 0x2001, 0x19db, 0x2003, 0x0000, 0x62c0, 0x82ff, 0x1160,
+	0x782b, 0x0000, 0x7824, 0x9065, 0x090c, 0x0dfa, 0x2009, 0x0013,
+	0x080c, 0xa1af, 0x00ce, 0x0005, 0x00b6, 0x00c6, 0x00d6, 0x7824,
+	0x9005, 0x090c, 0x0dfa, 0x7828, 0x9092, 0xc350, 0x1648, 0x8000,
+	0x782a, 0x00de, 0x00ce, 0x00be, 0x080c, 0x2afe, 0x02f0, 0x00b6,
+	0x00c6, 0x00d6, 0x781c, 0x905d, 0x090c, 0x0dfa, 0xb800, 0xc0dc,
+	0xb802, 0x7924, 0x2160, 0x080c, 0xa0e3, 0xb93c, 0x81ff, 0x090c,
+	0x0dfa, 0x8109, 0xb93e, 0x7807, 0x0000, 0x7827, 0x0000, 0x00de,
+	0x00ce, 0x00be, 0x080c, 0x8c10, 0x0868, 0x080c, 0x9632, 0x0850,
+	0x2011, 0x0130, 0x2214, 0x080c, 0x9eef, 0x080c, 0xdc28, 0x7824,
+	0x9065, 0x2009, 0x0014, 0x080c, 0xa15d, 0x00de, 0x00ce, 0x00be,
+	0x0804, 0x85ea, 0x00c6, 0x2001, 0x009b, 0x2004, 0xd0fc, 0x190c,
+	0x1dec, 0x6024, 0x6027, 0x0002, 0xd0f4, 0x1580, 0x62c8, 0x60c4,
+	0x9205, 0x1170, 0x783c, 0x9065, 0x0130, 0x2009, 0x0049, 0x080c,
+	0xa15d, 0x00ce, 0x0005, 0x2011, 0x19de, 0x2013, 0x0000, 0x0cc8,
+	0x793c, 0x81ff, 0x0dc0, 0x7944, 0x9192, 0x7530, 0x12f0, 0x8108,
+	0x7946, 0x793c, 0x9188, 0x0008, 0x210c, 0x918e, 0x0006, 0x1138,
+	0x6014, 0x9084, 0x1984, 0x9085, 0x0012, 0x6016, 0x0c10, 0x6014,
+	0x9084, 0x1984, 0x9085, 0x0016, 0x6016, 0x08d8, 0x793c, 0x2160,
+	0x2009, 0x004a, 0x080c, 0xa15d, 0x08a0, 0x7848, 0xc085, 0x784a,
+	0x0880, 0x0006, 0x0016, 0x00c6, 0x0126, 0x2091, 0x8000, 0x600f,
+	0x0000, 0x2c08, 0x2061, 0x19bf, 0x6020, 0x8000, 0x6022, 0x6010,
+	0x9005, 0x0148, 0x9080, 0x0003, 0x2102, 0x6112, 0x012e, 0x00ce,
+	0x001e, 0x000e, 0x0005, 0x6116, 0x6112, 0x0cc0, 0x00d6, 0x2069,
+	0x19bf, 0xb800, 0xd0d4, 0x0168, 0x6820, 0x8000, 0x6822, 0x9086,
+	0x0001, 0x1110, 0x2b00, 0x681e, 0x00de, 0x0804, 0x8c10, 0x00de,
+	0x0005, 0xc0d5, 0xb802, 0x6818, 0x9005, 0x0168, 0xb856, 0xb85b,
+	0x0000, 0x0086, 0x0006, 0x2b00, 0x681a, 0x008e, 0xa05a, 0x008e,
+	0x2069, 0x19bf, 0x0c08, 0xb856, 0xb85a, 0x2b00, 0x681a, 0x681e,
+	0x08d8, 0x0006, 0x0016, 0x00c6, 0x0126, 0x2091, 0x8000, 0x600f,
+	0x0000, 0x2c08, 0x2061, 0x19bf, 0x6020, 0x8000, 0x6022, 0x6008,
+	0x9005, 0x0148, 0x9080, 0x0003, 0x2102, 0x610a, 0x012e, 0x00ce,
+	0x001e, 0x000e, 0x0005, 0x610e, 0x610a, 0x0cc0, 0x00c6, 0x600f,
+	0x0000, 0x2c08, 0x2061, 0x19bf, 0x6034, 0x9005, 0x0130, 0x9080,
+	0x0003, 0x2102, 0x6136, 0x00ce, 0x0005, 0x613a, 0x6136, 0x00ce,
+	0x0005, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x00b6, 0x0096, 0x0076,
+	0x0066, 0x0056, 0x0036, 0x0026, 0x0016, 0x0006, 0x0126, 0x902e,
+	0x2071, 0x19bf, 0x7638, 0x2660, 0x2678, 0x2091, 0x8000, 0x8cff,
+	0x0904, 0x876d, 0x6010, 0x2058, 0xb8a0, 0x9206, 0x1904, 0x8768,
+	0x87ff, 0x0120, 0x6054, 0x9106, 0x1904, 0x8768, 0x703c, 0x9c06,
+	0x1178, 0x0036, 0x2019, 0x0001, 0x080c, 0x999d, 0x7033, 0x0000,
+	0x9006, 0x703e, 0x7042, 0x7046, 0x704a, 0x003e, 0x2029, 0x0001,
+	0x7038, 0x9c36, 0x1110, 0x660c, 0x763a, 0x7034, 0x9c36, 0x1140,
+	0x2c00, 0x9f36, 0x0118, 0x2f00, 0x7036, 0x0010, 0x7037, 0x0000,
+	0x660c, 0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678,
+	0x600f, 0x0000, 0x080c, 0xbe37, 0x01f0, 0x6014, 0x2048, 0x6020,
+	0x9086, 0x0003, 0x15b8, 0x6004, 0x9086, 0x0040, 0x090c, 0x9b78,
+	0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x0016, 0x0036, 0x0076,
+	0x080c, 0xc12d, 0x080c, 0xdb2e, 0x080c, 0x6ae9, 0x007e, 0x003e,
+	0x001e, 0x080c, 0xc022, 0x080c, 0xa113, 0x00ce, 0x0804, 0x8707,
+	0x2c78, 0x600c, 0x2060, 0x0804, 0x8707, 0x85ff, 0x0120, 0x0036,
+	0x080c, 0x8ced, 0x003e, 0x012e, 0x000e, 0x001e, 0x002e, 0x003e,
+	0x005e, 0x006e, 0x007e, 0x009e, 0x00be, 0x00ce, 0x00de, 0x00ee,
+	0x00fe, 0x0005, 0x6020, 0x9086, 0x0006, 0x1158, 0x0016, 0x0036,
+	0x0076, 0x080c, 0xdb2e, 0x080c, 0xd830, 0x007e, 0x003e, 0x001e,
+	0x0890, 0x6020, 0x9086, 0x000a, 0x0904, 0x8752, 0x0804, 0x874b,
+	0x0006, 0x0066, 0x0096, 0x00c6, 0x00d6, 0x00f6, 0x9036, 0x0126,
+	0x2091, 0x8000, 0x2079, 0x19bf, 0x7838, 0x9065, 0x0904, 0x87ed,
+	0x600c, 0x0006, 0x600f, 0x0000, 0x783c, 0x9c06, 0x1168, 0x0036,
+	0x2019, 0x0001, 0x080c, 0x999d, 0x7833, 0x0000, 0x901e, 0x7b3e,
+	0x7b42, 0x7b46, 0x7b4a, 0x003e, 0x080c, 0xbe37, 0x0548, 0x6014,
+	0x2048, 0x6020, 0x9086, 0x0003, 0x1590, 0x3e08, 0x918e, 0x0002,
+	0x1188, 0x6010, 0x9005, 0x0170, 0x00b6, 0x2058, 0xb800, 0x00be,
+	0xd0bc, 0x0140, 0x6040, 0x9005, 0x11a8, 0x2001, 0x1960, 0x2004,
+	0x6042, 0x0080, 0x6004, 0x9086, 0x0040, 0x090c, 0x9b78, 0xa867,
+	0x0103, 0xab7a, 0xa877, 0x0000, 0x080c, 0x6adc, 0x080c, 0xc022,
+	0x080c, 0xa113, 0x000e, 0x0804, 0x87a5, 0x7e3a, 0x7e36, 0x012e,
+	0x00fe, 0x00de, 0x00ce, 0x009e, 0x006e, 0x000e, 0x0005, 0x6020,
+	0x9086, 0x0006, 0x1118, 0x080c, 0xd830, 0x0c50, 0x6020, 0x9086,
+	0x000a, 0x09f8, 0x08b8, 0x0016, 0x0026, 0x0086, 0x9046, 0x0099,
+	0x080c, 0x88ee, 0x008e, 0x002e, 0x001e, 0x0005, 0x00f6, 0x0126,
+	0x2079, 0x19bf, 0x2091, 0x8000, 0x080c, 0x8985, 0x080c, 0x8a15,
+	0x012e, 0x00fe, 0x0005, 0x00b6, 0x0096, 0x00f6, 0x00e6, 0x00d6,
+	0x00c6, 0x0066, 0x0016, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071,
+	0x19bf, 0x7614, 0x2660, 0x2678, 0x8cff, 0x0904, 0x88b3, 0x6010,
+	0x2058, 0xb8a0, 0x9206, 0x1904, 0x88ae, 0x88ff, 0x0120, 0x6054,
+	0x9106, 0x1904, 0x88ae, 0x7024, 0x9c06, 0x1568, 0x2069, 0x0100,
+	0x6820, 0xd0a4, 0x0110, 0xd0cc, 0x1508, 0x080c, 0x835a, 0x080c,
+	0x9656, 0x68c3, 0x0000, 0x080c, 0x9b78, 0x7027, 0x0000, 0x0036,
+	0x2069, 0x0140, 0x6b04, 0x9384, 0x1000, 0x0138, 0x2001, 0x0100,
+	0x080c, 0x2c88, 0x9006, 0x080c, 0x2c88, 0x2069, 0x0100, 0x6824,
+	0xd084, 0x0110, 0x6827, 0x0001, 0x003e, 0x0028, 0x6003, 0x0009,
+	0x630a, 0x0804, 0x88ae, 0x7014, 0x9c36, 0x1110, 0x660c, 0x7616,
+	0x7010, 0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00, 0x7012,
+	0x0010, 0x7013, 0x0000, 0x660c, 0x0066, 0x2c00, 0x9f06, 0x0110,
+	0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000, 0x6014, 0x2048, 0x080c,
+	0xbe37, 0x01e8, 0x6020, 0x9086, 0x0003, 0x1580, 0x080c, 0xc03f,
+	0x1118, 0x080c, 0xaa81, 0x0098, 0xa867, 0x0103, 0xab7a, 0xa877,
+	0x0000, 0x0016, 0x0036, 0x0086, 0x080c, 0xc12d, 0x080c, 0xdb2e,
+	0x080c, 0x6ae9, 0x008e, 0x003e, 0x001e, 0x080c, 0xc022, 0x080c,
+	0xa113, 0x080c, 0x9a4e, 0x00ce, 0x0804, 0x882c, 0x2c78, 0x600c,
+	0x2060, 0x0804, 0x882c, 0x012e, 0x000e, 0x001e, 0x006e, 0x00ce,
+	0x00de, 0x00ee, 0x00fe, 0x009e, 0x00be, 0x0005, 0x6020, 0x9086,
+	0x0006, 0x1158, 0x0016, 0x0036, 0x0086, 0x080c, 0xdb2e, 0x080c,
+	0xd830, 0x008e, 0x003e, 0x001e, 0x08d0, 0x080c, 0xaa81, 0x6020,
+	0x9086, 0x0002, 0x1160, 0x6004, 0x0006, 0x9086, 0x0085, 0x000e,
+	0x0904, 0x8894, 0x9086, 0x008b, 0x0904, 0x8894, 0x0840, 0x6020,
+	0x9086, 0x0005, 0x1920, 0x6004, 0x0006, 0x9086, 0x0085, 0x000e,
+	0x09c8, 0x9086, 0x008b, 0x09b0, 0x0804, 0x88a7, 0x00b6, 0x00a6,
+	0x0096, 0x00c6, 0x0006, 0x0126, 0x2091, 0x8000, 0x9280, 0x1000,
+	0x2004, 0x905d, 0x0904, 0x897e, 0x00f6, 0x00e6, 0x00d6, 0x0066,
+	0x2071, 0x19bf, 0xbe54, 0x7018, 0x9b06, 0x1108, 0x761a, 0x701c,
+	0x9b06, 0x1130, 0x86ff, 0x1118, 0x7018, 0x701e, 0x0008, 0x761e,
+	0xb858, 0x904d, 0x0108, 0xae56, 0x96d5, 0x0000, 0x0110, 0x2900,
+	0xb05a, 0xb857, 0x0000, 0xb85b, 0x0000, 0xb800, 0xc0d4, 0xc0dc,
+	0xb802, 0x080c, 0x63d2, 0x0904, 0x897a, 0x7624, 0x86ff, 0x0904,
+	0x8969, 0x9680, 0x0005, 0x2004, 0x9906, 0x15d8, 0x00d6, 0x2069,
+	0x0100, 0x68c0, 0x9005, 0x0560, 0x080c, 0x835a, 0x080c, 0x9656,
+	0x68c3, 0x0000, 0x080c, 0x9b78, 0x7027, 0x0000, 0x0036, 0x2069,
+	0x0140, 0x6b04, 0x9384, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c,
+	0x2c88, 0x9006, 0x080c, 0x2c88, 0x2069, 0x0100, 0x6824, 0xd084,
+	0x0110, 0x6827, 0x0001, 0x003e, 0x00de, 0x00c6, 0xb83c, 0x9005,
+	0x0110, 0x8001, 0xb83e, 0x2660, 0x080c, 0xa113, 0x00ce, 0x0048,
+	0x00de, 0x00c6, 0x2660, 0x6003, 0x0009, 0x630a, 0x00ce, 0x0804,
+	0x8921, 0x89ff, 0x0158, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000,
+	0x080c, 0xc12d, 0x080c, 0xdb2e, 0x080c, 0x6ae9, 0x080c, 0x9a4e,
+	0x0804, 0x8921, 0x006e, 0x00de, 0x00ee, 0x00fe, 0x012e, 0x000e,
+	0x00ce, 0x009e, 0x00ae, 0x00be, 0x0005, 0x0096, 0x0006, 0x0066,
+	0x00c6, 0x00d6, 0x9036, 0x7814, 0x9065, 0x0904, 0x89e8, 0x600c,
+	0x0006, 0x600f, 0x0000, 0x7824, 0x9c06, 0x1580, 0x2069, 0x0100,
+	0x6820, 0xd0a4, 0x0110, 0xd0cc, 0x1508, 0x080c, 0x835a, 0x080c,
+	0x9656, 0x68c3, 0x0000, 0x080c, 0x9b78, 0x7827, 0x0000, 0x0036,
+	0x2069, 0x0140, 0x6b04, 0x9384, 0x1000, 0x0138, 0x2001, 0x0100,
+	0x080c, 0x2c88, 0x9006, 0x080c, 0x2c88, 0x2069, 0x0100, 0x6824,
+	0xd084, 0x0110, 0x6827, 0x0001, 0x003e, 0x0040, 0x080c, 0x6779,
+	0x1520, 0x6003, 0x0009, 0x630a, 0x2c30, 0x00f8, 0x6014, 0x2048,
+	0x080c, 0xbe35, 0x01b0, 0x6020, 0x9086, 0x0003, 0x1508, 0x080c,
+	0xc03f, 0x1118, 0x080c, 0xaa81, 0x0060, 0x080c, 0x6779, 0x1168,
+	0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c, 0x6ae9, 0x080c,
+	0xc022, 0x080c, 0xa113, 0x080c, 0x9a4e, 0x000e, 0x0804, 0x898c,
+	0x7e16, 0x7e12, 0x00de, 0x00ce, 0x006e, 0x000e, 0x009e, 0x0005,
+	0x6020, 0x9086, 0x0006, 0x1118, 0x080c, 0xd830, 0x0c50, 0x080c,
+	0xaa81, 0x6020, 0x9086, 0x0002, 0x1150, 0x6004, 0x0006, 0x9086,
+	0x0085, 0x000e, 0x0990, 0x9086, 0x008b, 0x0978, 0x08d0, 0x6020,
+	0x9086, 0x0005, 0x19b0, 0x6004, 0x0006, 0x9086, 0x0085, 0x000e,
+	0x0d18, 0x9086, 0x008b, 0x0d00, 0x0860, 0x0006, 0x0066, 0x0096,
+	0x00b6, 0x00c6, 0x00d6, 0x7818, 0x905d, 0x0904, 0x8a95, 0xb854,
+	0x0006, 0x9006, 0xb856, 0xb85a, 0xb800, 0xc0d4, 0xc0dc, 0xb802,
+	0x080c, 0x63d2, 0x0904, 0x8a92, 0x7e24, 0x86ff, 0x0904, 0x8a85,
+	0x9680, 0x0005, 0x2004, 0x9906, 0x1904, 0x8a85, 0x00d6, 0x2069,
+	0x0100, 0x68c0, 0x9005, 0x0904, 0x8a7c, 0x080c, 0x835a, 0x080c,
+	0x9656, 0x68c3, 0x0000, 0x080c, 0x9b78, 0x7827, 0x0000, 0x0036,
+	0x2069, 0x0140, 0x6b04, 0x9384, 0x1000, 0x0138, 0x2001, 0x0100,
+	0x080c, 0x2c88, 0x9006, 0x080c, 0x2c88, 0x2069, 0x0100, 0x6824,
+	0xd084, 0x0110, 0x6827, 0x0001, 0x003e, 0x00de, 0x00c6, 0x3e08,
+	0x918e, 0x0002, 0x1168, 0xb800, 0xd0bc, 0x0150, 0x9680, 0x0010,
+	0x200c, 0x81ff, 0x1518, 0x2009, 0x1960, 0x210c, 0x2102, 0x00f0,
+	0xb83c, 0x9005, 0x0110, 0x8001, 0xb83e, 0x2660, 0x600f, 0x0000,
+	0x080c, 0xa113, 0x00ce, 0x0048, 0x00de, 0x00c6, 0x2660, 0x6003,
+	0x0009, 0x630a, 0x00ce, 0x0804, 0x8a28, 0x89ff, 0x0138, 0xa867,
+	0x0103, 0xab7a, 0xa877, 0x0000, 0x080c, 0x6ae9, 0x080c, 0x9a4e,
+	0x0804, 0x8a28, 0x000e, 0x0804, 0x8a1c, 0x781e, 0x781a, 0x00de,
+	0x00ce, 0x00be, 0x009e, 0x006e, 0x000e, 0x0005, 0x00e6, 0x00d6,
+	0x0096, 0x0066, 0xb800, 0xd0dc, 0x01a0, 0xb84c, 0x904d, 0x0188,
+	0xa878, 0x9606, 0x1170, 0x2071, 0x19bf, 0x7024, 0x9035, 0x0148,
+	0x9080, 0x0005, 0x2004, 0x9906, 0x1120, 0xb800, 0xc0dc, 0xb802,
+	0x0029, 0x006e, 0x009e, 0x00de, 0x00ee, 0x0005, 0x00f6, 0x2079,
+	0x0100, 0x78c0, 0x9005, 0x1138, 0x00c6, 0x2660, 0x6003, 0x0009,
+	0x630a, 0x00ce, 0x04b8, 0x080c, 0x9656, 0x78c3, 0x0000, 0x080c,
+	0x9b78, 0x7027, 0x0000, 0x0036, 0x2079, 0x0140, 0x7b04, 0x9384,
+	0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2c88, 0x9006, 0x080c,
+	0x2c88, 0x2079, 0x0100, 0x7824, 0xd084, 0x0110, 0x7827, 0x0001,
+	0x080c, 0x9b78, 0x003e, 0x080c, 0x63d2, 0x00c6, 0xb83c, 0x9005,
+	0x0110, 0x8001, 0xb83e, 0x2660, 0x080c, 0xa0e3, 0x00ce, 0xa867,
+	0x0103, 0xab7a, 0xa877, 0x0000, 0x080c, 0xc12d, 0x080c, 0x6ae9,
+	0x080c, 0x9a4e, 0x00fe, 0x0005, 0x00b6, 0x00e6, 0x00c6, 0x2011,
+	0x0101, 0x2204, 0xc0c4, 0x2012, 0x2001, 0x180c, 0x2014, 0xc2e4,
+	0x2202, 0x2071, 0x19bf, 0x7004, 0x9084, 0x0007, 0x0002, 0x8b21,
+	0x8b25, 0x8b43, 0x8b6c, 0x8baa, 0x8b21, 0x8b3c, 0x8b1f, 0x080c,
+	0x0dfa, 0x00ce, 0x00ee, 0x00be, 0x0005, 0x7024, 0x9065, 0x0148,
+	0x7020, 0x8001, 0x7022, 0x600c, 0x9015, 0x0158, 0x7216, 0x600f,
+	0x0000, 0x7007, 0x0000, 0x7027, 0x0000, 0x00ce, 0x00ee, 0x00be,
+	0x0005, 0x7216, 0x7212, 0x0ca8, 0x7007, 0x0000, 0x7027, 0x0000,
+	0x7020, 0x9005, 0x0070, 0x6010, 0x2058, 0x080c, 0x63d2, 0xb800,
+	0xc0dc, 0xb802, 0x7007, 0x0000, 0x7027, 0x0000, 0x7020, 0x8001,
+	0x7022, 0x1148, 0x2001, 0x180c, 0x2014, 0xd2ec, 0x1180, 0x00ce,
+	0x00ee, 0x00be, 0x0005, 0xb854, 0x9015, 0x0120, 0x721e, 0x080c,
+	0x8c10, 0x0ca8, 0x7218, 0x721e, 0x080c, 0x8c10, 0x0c80, 0xc2ec,
+	0x2202, 0x080c, 0x8ced, 0x0c58, 0x7024, 0x9065, 0x05b8, 0x700c,
+	0x9c06, 0x1160, 0x080c, 0x9a4e, 0x600c, 0x9015, 0x0120, 0x720e,
+	0x600f, 0x0000, 0x0448, 0x720e, 0x720a, 0x0430, 0x7014, 0x9c06,
+	0x1160, 0x080c, 0x9a4e, 0x600c, 0x9015, 0x0120, 0x7216, 0x600f,
+	0x0000, 0x00d0, 0x7216, 0x7212, 0x00b8, 0x6020, 0x9086, 0x0003,
+	0x1198, 0x6010, 0x2058, 0x080c, 0x63d2, 0xb800, 0xc0dc, 0xb802,
+	0x080c, 0x9a4e, 0x701c, 0x9065, 0x0138, 0xb854, 0x9015, 0x0110,
+	0x721e, 0x0010, 0x7218, 0x721e, 0x7027, 0x0000, 0x00ce, 0x00ee,
+	0x00be, 0x0005, 0x7024, 0x9065, 0x0140, 0x080c, 0x9a4e, 0x600c,
+	0x9015, 0x0158, 0x720e, 0x600f, 0x0000, 0x080c, 0x9b78, 0x7027,
+	0x0000, 0x00ce, 0x00ee, 0x00be, 0x0005, 0x720e, 0x720a, 0x0ca8,
+	0x00d6, 0x2069, 0x19bf, 0x6830, 0x9084, 0x0003, 0x0002, 0x8bcd,
+	0x8bcf, 0x8bf3, 0x8bcb, 0x080c, 0x0dfa, 0x00de, 0x0005, 0x00c6,
+	0x6840, 0x9086, 0x0001, 0x01b8, 0x683c, 0x9065, 0x0130, 0x600c,
+	0x9015, 0x0170, 0x6a3a, 0x600f, 0x0000, 0x6833, 0x0000, 0x683f,
+	0x0000, 0x2011, 0x19de, 0x2013, 0x0000, 0x00ce, 0x00de, 0x0005,
+	0x683a, 0x6836, 0x0c90, 0x6843, 0x0000, 0x6838, 0x9065, 0x0d68,
+	0x6003, 0x0003, 0x0c50, 0x00c6, 0x9006, 0x6842, 0x6846, 0x684a,
+	0x683c, 0x9065, 0x0160, 0x600c, 0x9015, 0x0130, 0x6a3a, 0x600f,
+	0x0000, 0x683f, 0x0000, 0x0018, 0x683e, 0x683a, 0x6836, 0x00ce,
+	0x00de, 0x0005, 0x2001, 0x180c, 0x200c, 0xc1e5, 0x2102, 0x0005,
+	0x2001, 0x180c, 0x200c, 0xd1ec, 0x0120, 0xc1ec, 0x2102, 0x080c,
+	0x8ced, 0x2001, 0x19cb, 0x2004, 0x9086, 0x0001, 0x0d58, 0x00d6,
+	0x2069, 0x19bf, 0x6804, 0x9084, 0x0007, 0x0002, 0x8c30, 0x8cd5,
+	0x8cd5, 0x8cd5, 0x8cd5, 0x8cd7, 0x8cd5, 0x8c2e, 0x080c, 0x0dfa,
+	0x6820, 0x9005, 0x1110, 0x00de, 0x0005, 0x00c6, 0x680c, 0x9065,
+	0x0150, 0x6807, 0x0004, 0x6826, 0x682b, 0x0000, 0x080c, 0x8d44,
+	0x00ce, 0x00de, 0x0005, 0x6814, 0x9065, 0x0150, 0x6807, 0x0001,
+	0x6826, 0x682b, 0x0000, 0x080c, 0x8d44, 0x00ce, 0x00de, 0x0005,
+	0x00b6, 0x00e6, 0x6a1c, 0x92dd, 0x0000, 0x0904, 0x8cbf, 0xb84c,
+	0x900d, 0x0118, 0xb888, 0x9005, 0x01a0, 0xb854, 0x905d, 0x0120,
+	0x920e, 0x0904, 0x8cbf, 0x0028, 0x6818, 0x920e, 0x0904, 0x8cbf,
+	0x2058, 0xb84c, 0x900d, 0x0d88, 0xb888, 0x9005, 0x1d70, 0x2b00,
+	0x681e, 0xbb3c, 0xb838, 0x9302, 0x1e40, 0x080c, 0xa0ba, 0x0904,
+	0x8cbf, 0x8318, 0xbb3e, 0x6116, 0x2b10, 0x6212, 0x0096, 0x2148,
+	0xa880, 0x9084, 0x00ff, 0x605e, 0xa883, 0x0000, 0xa884, 0x009e,
+	0x908a, 0x199a, 0x0210, 0x2001, 0x1999, 0x8003, 0x801b, 0x831b,
+	0x9318, 0x631a, 0x6114, 0x0096, 0x2148, 0xa964, 0x009e, 0x918c,
+	0x00ff, 0x918e, 0x0048, 0x0538, 0x00f6, 0x2c78, 0x2061, 0x0100,
+	0xbab0, 0x629a, 0x2069, 0x0200, 0x2071, 0x0240, 0x080c, 0x9286,
+	0x2069, 0x19bf, 0xbb00, 0xc3dd, 0xbb02, 0x6807, 0x0002, 0x2f18,
+	0x6b26, 0x682b, 0x0000, 0x7823, 0x0003, 0x7803, 0x0001, 0x7807,
+	0x0040, 0x00fe, 0x00ee, 0x00be, 0x00ce, 0x00de, 0x0005, 0x00ee,
+	0x00be, 0x00ce, 0x0cd0, 0x6807, 0x0006, 0x2c18, 0x6b26, 0x6820,
+	0x8001, 0x6822, 0x682b, 0x0000, 0x080c, 0x63d2, 0x080c, 0x9f0f,
+	0x00ee, 0x00be, 0x00ce, 0x00de, 0x0005, 0x00de, 0x0005, 0x00c6,
+	0x680c, 0x9065, 0x0138, 0x6807, 0x0004, 0x6826, 0x682b, 0x0000,
+	0x080c, 0x8d44, 0x00ce, 0x00de, 0x0005, 0x2001, 0x180c, 0x2014,
+	0xc2ed, 0x2202, 0x00de, 0x00fe, 0x0005, 0x00f6, 0x00d6, 0x2069,
+	0x19bf, 0x6830, 0x9086, 0x0000, 0x1548, 0x2001, 0x180c, 0x2014,
+	0xd2e4, 0x0130, 0xc2e4, 0x2202, 0x080c, 0x8c1f, 0x2069, 0x19bf,
+	0x2001, 0x180c, 0x200c, 0xd1c4, 0x11e0, 0x6838, 0x907d, 0x01b0,
+	0x6a04, 0x9296, 0x0000, 0x1568, 0x6833, 0x0001, 0x683e, 0x6847,
+	0x0000, 0x684b, 0x0000, 0x0126, 0x00f6, 0x2091, 0x2400, 0x002e,
+	0x080c, 0x1b8a, 0x1158, 0x012e, 0x080c, 0x94b3, 0x00de, 0x00fe,
+	0x0005, 0xc1c4, 0x2102, 0x080c, 0x72d2, 0x08f8, 0x012e, 0x6843,
+	0x0000, 0x7803, 0x0002, 0x780c, 0x9015, 0x0140, 0x6a3a, 0x780f,
+	0x0000, 0x6833, 0x0000, 0x683f, 0x0000, 0x0c40, 0x683a, 0x6836,
+	0x0cc0, 0x6a04, 0x9296, 0x0006, 0x1904, 0x8ce5, 0x6a30, 0x9296,
+	0x0000, 0x0950, 0x0804, 0x8ce5, 0x6020, 0x9084, 0x000f, 0x000b,
+	0x0005, 0x8d58, 0x8d5d, 0x91b6, 0x924f, 0x8d5d, 0x91b6, 0x924f,
+	0x8d58, 0x8d5d, 0x8d58, 0x8d58, 0x8d58, 0x8d58, 0x8d58, 0x8d58,
+	0x080c, 0x8b04, 0x080c, 0x8c10, 0x0005, 0x00b6, 0x0156, 0x0136,
+	0x0146, 0x01c6, 0x01d6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x2069,
+	0x0200, 0x2071, 0x0240, 0x6004, 0x908a, 0x0053, 0x1a0c, 0x0dfa,
+	0x6110, 0x2158, 0xb9b0, 0x2c78, 0x2061, 0x0100, 0x619a, 0x908a,
+	0x0040, 0x1a04, 0x8dc9, 0x005b, 0x00fe, 0x00ee, 0x00de, 0x00ce,
+	0x01de, 0x01ce, 0x014e, 0x013e, 0x015e, 0x00be, 0x0005, 0x8f40,
+	0x8f7b, 0x8fa4, 0x9047, 0x9068, 0x906e, 0x907b, 0x9083, 0x908f,
+	0x9095, 0x90a6, 0x9095, 0x90fd, 0x9083, 0x9109, 0x910f, 0x908f,
+	0x910f, 0x911b, 0x8dc7, 0x8dc7, 0x8dc7, 0x8dc7, 0x8dc7, 0x8dc7,
+	0x8dc7, 0x8dc7, 0x8dc7, 0x8dc7, 0x8dc7, 0x9854, 0x9877, 0x9888,
+	0x98a8, 0x98da, 0x907b, 0x8dc7, 0x907b, 0x9095, 0x8dc7, 0x8fa4,
+	0x9047, 0x8dc7, 0x9c6f, 0x9095, 0x8dc7, 0x9c8b, 0x9095, 0x8dc7,
+	0x908f, 0x8f3a, 0x8dea, 0x8dc7, 0x9ca7, 0x9d14, 0x9def, 0x8dc7,
+	0x9dfc, 0x9078, 0x9e27, 0x8dc7, 0x98e4, 0x9e54, 0x8dc7, 0x080c,
+	0x0dfa, 0x2100, 0x005b, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x01de,
+	0x01ce, 0x014e, 0x013e, 0x015e, 0x00be, 0x0005, 0x8de8, 0x8de8,
+	0x8de8, 0x8e11, 0x8ebd, 0x8ec8, 0x8de8, 0x8de8, 0x8de8, 0x8f0f,
+	0x8f1b, 0x8e2c, 0x8de8, 0x8e47, 0x8e7b, 0x9fd6, 0xa01b, 0x9095,
+	0x080c, 0x0dfa, 0x00d6, 0x0096, 0x080c, 0x912e, 0x7003, 0x2414,
+	0x7007, 0x0018, 0x700b, 0x0800, 0x7814, 0x2048, 0xa83c, 0x700e,
+	0xa850, 0x7022, 0xa854, 0x7026, 0x60c3, 0x0018, 0x080c, 0x962a,
+	0x009e, 0x00de, 0x0005, 0x7810, 0x00b6, 0x2058, 0xb8a0, 0x00be,
+	0x080c, 0xa062, 0x1118, 0x9084, 0xff80, 0x0110, 0x9085, 0x0001,
+	0x0005, 0x00d6, 0x0096, 0x080c, 0x912e, 0x7003, 0x0500, 0x7814,
+	0x2048, 0xa874, 0x700a, 0xa878, 0x700e, 0xa87c, 0x7012, 0xa880,
+	0x7016, 0xa884, 0x701a, 0xa888, 0x701e, 0x60c3, 0x0010, 0x080c,
+	0x962a, 0x009e, 0x00de, 0x0005, 0x00d6, 0x0096, 0x080c, 0x912e,
+	0x7003, 0x0500, 0x7814, 0x2048, 0xa8cc, 0x700a, 0xa8d0, 0x700e,
+	0xa8d4, 0x7012, 0xa8d8, 0x7016, 0xa8dc, 0x701a, 0xa8e0, 0x701e,
+	0x60c3, 0x0010, 0x080c, 0x962a, 0x009e, 0x00de, 0x0005, 0x00d6,
+	0x0096, 0x0126, 0x2091, 0x8000, 0x080c, 0x912e, 0x20e9, 0x0000,
+	0x2001, 0x197b, 0x2003, 0x0000, 0x7814, 0x2048, 0xa814, 0x8003,
+	0x60c2, 0xa830, 0x20a8, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x001b,
+	0x2098, 0x2001, 0x197b, 0x0016, 0x200c, 0x2001, 0x0001, 0x080c,
+	0x22ef, 0x080c, 0xcb69, 0x9006, 0x080c, 0x22ef, 0x001e, 0xa804,
+	0x9005, 0x0110, 0x2048, 0x0c28, 0x04d9, 0x080c, 0x962a, 0x012e,
+	0x009e, 0x00de, 0x0005, 0x00d6, 0x0096, 0x0126, 0x2091, 0x8000,
+	0x080c, 0x9179, 0x20e9, 0x0000, 0x2001, 0x197b, 0x2003, 0x0000,
+	0x7814, 0x2048, 0xa86f, 0x0200, 0xa873, 0x0000, 0xa814, 0x8003,
+	0x60c2, 0xa830, 0x20a8, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x001b,
+	0x2098, 0x2001, 0x197b, 0x0016, 0x200c, 0x080c, 0xcb69, 0x001e,
+	0xa804, 0x9005, 0x0110, 0x2048, 0x0c60, 0x0051, 0x7814, 0x2048,
+	0x080c, 0x0fe3, 0x080c, 0x962a, 0x012e, 0x009e, 0x00de, 0x0005,
+	0x60c0, 0x8004, 0x9084, 0x0003, 0x9005, 0x0130, 0x9082, 0x0004,
+	0x20a3, 0x0000, 0x8000, 0x1de0, 0x0005, 0x080c, 0x912e, 0x7003,
+	0x7800, 0x7808, 0x8007, 0x700a, 0x60c3, 0x0008, 0x0804, 0x962a,
+	0x00d6, 0x00e6, 0x080c, 0x9179, 0x7814, 0x9084, 0xff00, 0x2073,
+	0x0200, 0x8e70, 0x8e70, 0x9095, 0x0010, 0x2272, 0x8e70, 0x2073,
+	0x0034, 0x8e70, 0x2069, 0x1805, 0x20a9, 0x0004, 0x2d76, 0x8d68,
+	0x8e70, 0x1f04, 0x8ede, 0x2069, 0x1801, 0x20a9, 0x0004, 0x2d76,
+	0x8d68, 0x8e70, 0x1f04, 0x8ee7, 0x2069, 0x198b, 0x9086, 0xdf00,
+	0x0110, 0x2069, 0x19a5, 0x20a9, 0x001a, 0x9e86, 0x0260, 0x1148,
+	0x00c6, 0x2061, 0x0200, 0x6010, 0x8000, 0x6012, 0x00ce, 0x2071,
+	0x0240, 0x2d04, 0x8007, 0x2072, 0x8d68, 0x8e70, 0x1f04, 0x8ef5,
+	0x60c3, 0x004c, 0x080c, 0x962a, 0x00ee, 0x00de, 0x0005, 0x080c,
+	0x912e, 0x7003, 0x6300, 0x7007, 0x0028, 0x7808, 0x700e, 0x60c3,
+	0x0008, 0x0804, 0x962a, 0x00d6, 0x0026, 0x0016, 0x080c, 0x9179,
+	0x7003, 0x0200, 0x7814, 0x700e, 0x00e6, 0x9ef0, 0x0004, 0x2009,
+	0x0001, 0x2011, 0x000c, 0x2073, 0x0800, 0x8e70, 0x2073, 0x0000,
+	0x00ee, 0x7206, 0x710a, 0x62c2, 0x080c, 0x962a, 0x001e, 0x002e,
+	0x00de, 0x0005, 0x2001, 0x1817, 0x2004, 0x609a, 0x0804, 0x962a,
+	0x080c, 0x912e, 0x7003, 0x5200, 0x2069, 0x185b, 0x6804, 0xd084,
+	0x0130, 0x6828, 0x0016, 0x080c, 0x27a1, 0x710e, 0x001e, 0x20a9,
+	0x0004, 0x20e1, 0x0001, 0x2099, 0x1805, 0x20e9, 0x0000, 0x20a1,
+	0x0250, 0x4003, 0x20a9, 0x0004, 0x2099, 0x1801, 0x20a1, 0x0254,
+	0x4003, 0x080c, 0xa062, 0x1120, 0xb8a0, 0x9082, 0x007f, 0x0248,
+	0x2001, 0x181e, 0x2004, 0x7032, 0x2001, 0x181f, 0x2004, 0x7036,
+	0x0030, 0x2001, 0x1817, 0x2004, 0x9084, 0x00ff, 0x7036, 0x60c3,
+	0x001c, 0x0804, 0x962a, 0x080c, 0x912e, 0x7003, 0x0500, 0x080c,
+	0xa062, 0x1120, 0xb8a0, 0x9082, 0x007f, 0x0248, 0x2001, 0x181e,
+	0x2004, 0x700a, 0x2001, 0x181f, 0x2004, 0x700e, 0x0030, 0x2001,
+	0x1817, 0x2004, 0x9084, 0x00ff, 0x700e, 0x20a9, 0x0004, 0x20e1,
+	0x0001, 0x2099, 0x1805, 0x20e9, 0x0000, 0x20a1, 0x0250, 0x4003,
+	0x60c3, 0x0010, 0x0804, 0x962a, 0x080c, 0x912e, 0x9006, 0x080c,
+	0x678d, 0xb8a0, 0x9086, 0x007e, 0x1130, 0x7003, 0x0400, 0x620c,
+	0xc2b4, 0x620e, 0x0058, 0x7814, 0x0096, 0x904d, 0x0120, 0x9006,
+	0xa89a, 0xa8a6, 0xa8aa, 0x009e, 0x7003, 0x0300, 0xb8a0, 0x9086,
+	0x007e, 0x1904, 0x900f, 0x00d6, 0x2069, 0x1944, 0x2001, 0x1836,
+	0x2004, 0xd0a4, 0x0178, 0x6800, 0x700a, 0x6808, 0x9084, 0x2000,
+	0x7012, 0x680c, 0x7016, 0x701f, 0x2710, 0x6818, 0x7022, 0x681c,
+	0x7026, 0x0080, 0x6800, 0x700a, 0x6804, 0x700e, 0x6808, 0x080c,
+	0x7207, 0x1118, 0x9084, 0x37ff, 0x0010, 0x9084, 0x3fff, 0x7012,
+	0x680c, 0x7016, 0x00de, 0x20a9, 0x0004, 0x20e1, 0x0001, 0x2099,
+	0x1805, 0x20e9, 0x0000, 0x20a1, 0x0256, 0x4003, 0x20a9, 0x0004,
+	0x2099, 0x1801, 0x20a1, 0x025a, 0x4003, 0x00d6, 0x080c, 0x9ed6,
+	0x2069, 0x194c, 0x2071, 0x024e, 0x6800, 0xc0dd, 0x7002, 0x080c,
+	0x55df, 0xd0e4, 0x0110, 0x680c, 0x700e, 0x00de, 0x04a0, 0x2001,
+	0x1836, 0x2004, 0xd0a4, 0x0168, 0x0016, 0x2009, 0x0002, 0x60e0,
+	0x9106, 0x0130, 0x2100, 0x60e3, 0x0000, 0x080c, 0x27e2, 0x61e2,
+	0x001e, 0x20e1, 0x0001, 0x2099, 0x1944, 0x20e9, 0x0000, 0x20a1,
+	0x024e, 0x20a9, 0x0008, 0x4003, 0x20a9, 0x0004, 0x2099, 0x1805,
+	0x20a1, 0x0256, 0x4003, 0x20a9, 0x0004, 0x2099, 0x1801, 0x20a1,
+	0x025a, 0x4003, 0x080c, 0x9ed6, 0x20a1, 0x024e, 0x20a9, 0x0008,
+	0x2099, 0x194c, 0x4003, 0x60c3, 0x0074, 0x0804, 0x962a, 0x080c,
+	0x912e, 0x7003, 0x2010, 0x7007, 0x0014, 0x700b, 0x0800, 0x700f,
+	0x2000, 0x9006, 0x00f6, 0x2079, 0x185b, 0x7904, 0x00fe, 0xd1ac,
+	0x1110, 0x9085, 0x0020, 0x0010, 0x9085, 0x0010, 0x9085, 0x0002,
+	0x00d6, 0x0804, 0x90de, 0x7026, 0x60c3, 0x0014, 0x0804, 0x962a,
+	0x080c, 0x912e, 0x7003, 0x5000, 0x0804, 0x8fbe, 0x080c, 0x912e,
+	0x7003, 0x2110, 0x7007, 0x0014, 0x60c3, 0x0014, 0x0804, 0x962a,
+	0x080c, 0x9170, 0x0010, 0x080c, 0x9179, 0x7003, 0x0200, 0x60c3,
+	0x0004, 0x0804, 0x962a, 0x080c, 0x9179, 0x7003, 0x0100, 0x700b,
+	0x0003, 0x700f, 0x2a00, 0x60c3, 0x0008, 0x0804, 0x962a, 0x080c,
+	0x9179, 0x7003, 0x0200, 0x0804, 0x8fbe, 0x080c, 0x9179, 0x7003,
+	0x0100, 0x782c, 0x9005, 0x0110, 0x700a, 0x0010, 0x700b, 0x0003,
+	0x7814, 0x700e, 0x60c3, 0x0008, 0x0804, 0x962a, 0x00d6, 0x080c,
+	0x9179, 0x7003, 0x0210, 0x7007, 0x0014, 0x700b, 0x0800, 0xb894,
+	0x9086, 0x0014, 0x1198, 0xb99c, 0x9184, 0x0030, 0x0190, 0xb998,
+	0x9184, 0xc000, 0x1140, 0xd1ec, 0x0118, 0x700f, 0x2100, 0x0058,
+	0x700f, 0x0100, 0x0040, 0x700f, 0x0400, 0x0028, 0x700f, 0x0700,
+	0x0010, 0x700f, 0x0800, 0x00f6, 0x2079, 0x185b, 0x7904, 0x00fe,
+	0xd1ac, 0x1110, 0x9085, 0x0020, 0x0010, 0x9085, 0x0010, 0x2009,
+	0x187d, 0x210c, 0xd184, 0x1110, 0x9085, 0x0002, 0x0026, 0x2009,
+	0x187b, 0x210c, 0xd1e4, 0x0150, 0xc0c5, 0xbabc, 0xd28c, 0x1108,
+	0xc0cd, 0x9094, 0x0030, 0x9296, 0x0010, 0x0140, 0xd1ec, 0x0130,
+	0x9094, 0x0030, 0x9296, 0x0010, 0x0108, 0xc0bd, 0x002e, 0x7026,
+	0x60c3, 0x0014, 0x00de, 0x0804, 0x962a, 0x080c, 0x9179, 0x7003,
+	0x0210, 0x7007, 0x0014, 0x700f, 0x0100, 0x60c3, 0x0014, 0x0804,
+	0x962a, 0x080c, 0x9179, 0x7003, 0x0200, 0x0804, 0x8f44, 0x080c,
+	0x9179, 0x7003, 0x0100, 0x700b, 0x0003, 0x700f, 0x2a00, 0x60c3,
+	0x0008, 0x0804, 0x962a, 0x080c, 0x9179, 0x7003, 0x0100, 0x700b,
+	0x000b, 0x60c3, 0x0008, 0x0804, 0x962a, 0x0026, 0x00d6, 0x0036,
+	0x0046, 0x2019, 0x3200, 0x2021, 0x0800, 0x0040, 0x0026, 0x00d6,
+	0x0036, 0x0046, 0x2019, 0x2200, 0x2021, 0x0100, 0x080c, 0x9eeb,
+	0xb810, 0x9305, 0x7002, 0xb814, 0x7006, 0x2069, 0x1800, 0x6878,
+	0x700a, 0x687c, 0x700e, 0x9485, 0x0029, 0x7012, 0x004e, 0x003e,
+	0x00de, 0x080c, 0x9618, 0x721a, 0x9f95, 0x0000, 0x7222, 0x7027,
+	0xffff, 0x2071, 0x024c, 0x002e, 0x0005, 0x0026, 0x080c, 0x9eeb,
+	0x7003, 0x02ff, 0x7007, 0xfffc, 0x00d6, 0x2069, 0x1800, 0x6878,
+	0x700a, 0x687c, 0x700e, 0x00de, 0x7013, 0x2029, 0x0c10, 0x7003,
+	0x0100, 0x7007, 0x0000, 0x700b, 0xfc02, 0x700f, 0x0000, 0x0005,
+	0x0026, 0x00d6, 0x0036, 0x0046, 0x2019, 0x3300, 0x2021, 0x0800,
+	0x0040, 0x0026, 0x00d6, 0x0036, 0x0046, 0x2019, 0x2300, 0x2021,
+	0x0100, 0x080c, 0x9eeb, 0xb810, 0x9305, 0x7002, 0xb814, 0x7006,
+	0x2069, 0x1800, 0xb810, 0x9005, 0x1140, 0xb814, 0x9005, 0x1128,
+	0x700b, 0x00ff, 0x700f, 0xfffe, 0x0020, 0x6878, 0x700a, 0x687c,
+	0x700e, 0x0000, 0x9485, 0x0098, 0x7012, 0x004e, 0x003e, 0x00de,
+	0x080c, 0x9618, 0x721a, 0x7a08, 0x7222, 0x2f10, 0x7226, 0x2071,
+	0x024c, 0x002e, 0x0005, 0x080c, 0x9618, 0x721a, 0x7a08, 0x7222,
+	0x7814, 0x7026, 0x2071, 0x024c, 0x002e, 0x0005, 0x00b6, 0x00c6,
+	0x00d6, 0x00e6, 0x00f6, 0x2069, 0x0200, 0x2071, 0x0240, 0x6004,
+	0x908a, 0x0085, 0x0a0c, 0x0dfa, 0x908a, 0x0092, 0x1a0c, 0x0dfa,
+	0x6110, 0x2158, 0xb9b0, 0x2c78, 0x2061, 0x0100, 0x619a, 0x9082,
+	0x0085, 0x0033, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x0005,
+	0x91e7, 0x91f6, 0x9201, 0x91e5, 0x91e5, 0x91e5, 0x91e7, 0x91e5,
+	0x91e5, 0x91e5, 0x91e5, 0x91e5, 0x91e5, 0x080c, 0x0dfa, 0x0411,
+	0x60c3, 0x0000, 0x0026, 0x080c, 0x2afe, 0x0228, 0x2011, 0x0101,
+	0x2204, 0xc0c5, 0x2012, 0x002e, 0x0804, 0x962a, 0x0431, 0x7808,
+	0x700a, 0x7814, 0x700e, 0x7017, 0xffff, 0x60c3, 0x000c, 0x0804,
+	0x962a, 0x04a1, 0x7003, 0x0003, 0x7007, 0x0300, 0x60c3, 0x0004,
+	0x0804, 0x962a, 0x0026, 0x080c, 0x9eeb, 0xb810, 0x9085, 0x8100,
+	0x7002, 0xb814, 0x7006, 0x2069, 0x1800, 0x6878, 0x700a, 0x687c,
+	0x700e, 0x7013, 0x0009, 0x0804, 0x9149, 0x0026, 0x080c, 0x9eeb,
+	0xb810, 0x9085, 0x8400, 0x7002, 0xb814, 0x7006, 0x2069, 0x1800,
+	0x6878, 0x700a, 0x687c, 0x700e, 0x2001, 0x0099, 0x7a20, 0x9296,
+	0x0005, 0x0108, 0xc0bc, 0x7012, 0x0804, 0x91ab, 0x0026, 0x080c,
+	0x9eeb, 0xb810, 0x9085, 0x8500, 0x7002, 0xb814, 0x7006, 0x2069,
+	0x1800, 0x6878, 0x700a, 0x687c, 0x700e, 0x2001, 0x0099, 0x7a20,
+	0x9296, 0x0005, 0x0108, 0xc0bc, 0x7012, 0x0804, 0x91ab, 0x00b6,
+	0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x2c78, 0x2069, 0x0200, 0x2071,
+	0x0240, 0x7804, 0x908a, 0x0040, 0x0a0c, 0x0dfa, 0x908a, 0x0054,
+	0x1a0c, 0x0dfa, 0x7910, 0x2158, 0xb9b0, 0x2061, 0x0100, 0x619a,
+	0x9082, 0x0040, 0x0033, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be,
+	0x0005, 0x9286, 0x9342, 0x9315, 0x9464, 0x9284, 0x9284, 0x9284,
+	0x9284, 0x9284, 0x9284, 0x9284, 0x9a2b, 0x9a33, 0x9a3b, 0x9a43,
+	0x9284, 0x9e33, 0x9284, 0x9a23, 0x080c, 0x0dfa, 0x0096, 0x780b,
+	0xffff, 0x080c, 0x92f1, 0x7914, 0x2148, 0xa978, 0x7956, 0xae64,
+	0x96b4, 0x00ff, 0x9686, 0x0008, 0x1148, 0xa8b4, 0x7032, 0xa8b8,
+	0x7036, 0xa8bc, 0x703a, 0xa8c0, 0x703e, 0x0008, 0x7132, 0xa97c,
+	0x9184, 0x000f, 0x1118, 0x2001, 0x0005, 0x0040, 0xd184, 0x0118,
+	0x2001, 0x0004, 0x0018, 0x9084, 0x0006, 0x8004, 0x2010, 0x785c,
+	0x9084, 0x00ff, 0x8007, 0x9205, 0x7042, 0xd1ac, 0x0158, 0x7047,
+	0x0002, 0x9686, 0x0008, 0x1118, 0x080c, 0x181c, 0x0010, 0x080c,
+	0x16db, 0x0050, 0xd1b4, 0x0118, 0x7047, 0x0001, 0x0028, 0x7047,
+	0x0000, 0x9016, 0x2230, 0x0010, 0xaab0, 0xaeac, 0x726a, 0x766e,
+	0x20a9, 0x0008, 0x20e9, 0x0000, 0xa860, 0x20e0, 0xa85c, 0x9080,
+	0x0023, 0x2098, 0x20a1, 0x0252, 0x2069, 0x0200, 0x6813, 0x0018,
+	0x4003, 0x6813, 0x0008, 0x60c3, 0x0020, 0x6017, 0x0009, 0x2001,
+	0x19db, 0x2003, 0x07d0, 0x2001, 0x19da, 0x2003, 0x0009, 0x009e,
+	0x0005, 0x6813, 0x0008, 0xba8c, 0x8210, 0xb8bc, 0xd084, 0x0128,
+	0x7a4a, 0x7b14, 0x7b46, 0x722e, 0x732a, 0x9294, 0x00ff, 0xba8e,
+	0x8217, 0x721a, 0xba10, 0x9295, 0x0600, 0x7202, 0xba14, 0x7206,
+	0x2069, 0x1800, 0x6a78, 0x720a, 0x6a7c, 0x720e, 0x7013, 0x0829,
+	0x2f10, 0x7222, 0x7027, 0xffff, 0x0005, 0x00d6, 0x0096, 0x0081,
+	0x7814, 0x2048, 0xa890, 0x7002, 0xa88c, 0x7006, 0xa8b0, 0x700a,
+	0xa8ac, 0x700e, 0x60c3, 0x000c, 0x009e, 0x00de, 0x0804, 0x962a,
+	0x6813, 0x0008, 0xb810, 0x9085, 0x0500, 0x7002, 0xb814, 0x7006,
+	0x2069, 0x1800, 0x6878, 0x700a, 0x687c, 0x700e, 0x7013, 0x0889,
+	0x080c, 0x9618, 0x721a, 0x7a08, 0x7222, 0x2f10, 0x7226, 0x2071,
+	0x024c, 0x0005, 0x00d6, 0x0096, 0x080c, 0x9442, 0x7814, 0x2048,
+	0x080c, 0xbe35, 0x1130, 0x7814, 0x9084, 0x0700, 0x8007, 0x0033,
+	0x0010, 0x9006, 0x001b, 0x009e, 0x00de, 0x0005, 0x9360, 0x93c9,
+	0x93d9, 0x93ff, 0x940b, 0x941c, 0x9424, 0x935e, 0x080c, 0x0dfa,
+	0x0016, 0x0036, 0xa97c, 0x918c, 0x0003, 0x0118, 0x9186, 0x0003,
+	0x1198, 0xaba8, 0x7824, 0xd0cc, 0x1168, 0x7316, 0xa898, 0x701a,
+	0xa894, 0x701e, 0x003e, 0x001e, 0x2001, 0x1989, 0x2004, 0x60c2,
+	0x0804, 0x962a, 0xc3e5, 0x0c88, 0x9186, 0x0001, 0x190c, 0x0dfa,
+	0xaba8, 0x7824, 0xd0cc, 0x1904, 0x93c6, 0x7316, 0xa898, 0x701a,
+	0xa894, 0x701e, 0xa8a4, 0x7026, 0xa8ac, 0x702e, 0x2009, 0x0018,
+	0x9384, 0x0300, 0x0570, 0xd3c4, 0x0110, 0xa8ac, 0x9108, 0xd3cc,
+	0x0110, 0xa8a4, 0x9108, 0x6810, 0x9085, 0x0010, 0x6812, 0x2011,
+	0x0258, 0x20e9, 0x0000, 0x22a0, 0x0156, 0x20a9, 0x0008, 0xa860,
+	0x20e0, 0xa85c, 0x9080, 0x002c, 0x2098, 0x4003, 0x6810, 0x8000,
+	0x6812, 0x2011, 0x0240, 0x22a0, 0x20a9, 0x0005, 0x4003, 0x6810,
+	0xc084, 0x6812, 0x015e, 0x9184, 0x0003, 0x0118, 0x2019, 0x0245,
+	0x201a, 0x61c2, 0x003e, 0x001e, 0x0804, 0x962a, 0xc3e5, 0x0804,
+	0x9385, 0x2011, 0x0008, 0x2001, 0x180f, 0x2004, 0xd0a4, 0x0110,
+	0x2011, 0x0028, 0x7824, 0xd0cc, 0x1110, 0x7216, 0x0470, 0x0ce8,
+	0xc2e5, 0x2011, 0x0302, 0x0016, 0x782c, 0x701a, 0x7930, 0x711e,
+	0x9105, 0x0108, 0xc2dd, 0x001e, 0x7824, 0xd0cc, 0x0108, 0xc2e5,
+	0x7216, 0x7027, 0x0012, 0x702f, 0x0008, 0x7043, 0x7000, 0x7047,
+	0x0500, 0x704f, 0x000a, 0x2069, 0x0200, 0x6813, 0x0009, 0x2071,
+	0x0240, 0x700b, 0x2500, 0x60c3, 0x0032, 0x0804, 0x962a, 0x2011,
+	0x0028, 0x7824, 0xd0cc, 0x1128, 0x7216, 0x60c3, 0x0018, 0x0804,
+	0x962a, 0x0cd0, 0xc2e5, 0x2011, 0x0100, 0x7824, 0xd0cc, 0x0108,
+	0xc2e5, 0x7216, 0x702f, 0x0008, 0x7858, 0x9084, 0x00ff, 0x7036,
+	0x60c3, 0x0020, 0x0804, 0x962a, 0x2011, 0x0008, 0x7824, 0xd0cc,
+	0x0108, 0xc2e5, 0x7216, 0x0c08, 0x0036, 0x7b14, 0x9384, 0xff00,
+	0x7816, 0x9384, 0x00ff, 0x8001, 0x1138, 0x7824, 0xd0cc, 0x0108,
+	0xc2e5, 0x7216, 0x003e, 0x0888, 0x0046, 0x2021, 0x0800, 0x0006,
+	0x7824, 0xd0cc, 0x000e, 0x0108, 0xc4e5, 0x7416, 0x004e, 0x701e,
+	0x003e, 0x0818, 0x00d6, 0x6813, 0x0008, 0xb810, 0x9085, 0x0700,
+	0x7002, 0xb814, 0x7006, 0x2069, 0x1800, 0x6878, 0x700a, 0x687c,
+	0x700e, 0x7824, 0xd0cc, 0x1168, 0x7013, 0x0898, 0x080c, 0x9618,
+	0x721a, 0x7a08, 0x7222, 0x2f10, 0x7226, 0x2071, 0x024c, 0x00de,
+	0x0005, 0x7013, 0x0889, 0x0c90, 0x0016, 0x7814, 0x9084, 0x0700,
+	0x8007, 0x0013, 0x001e, 0x0005, 0x9474, 0x9474, 0x9476, 0x9474,
+	0x9474, 0x9474, 0x9490, 0x9474, 0x080c, 0x0dfa, 0x7914, 0x918c,
+	0x08ff, 0x918d, 0xf600, 0x7916, 0x2009, 0x0003, 0x00b9, 0x2069,
+	0x185b, 0x6804, 0xd0bc, 0x0130, 0x682c, 0x9084, 0x00ff, 0x8007,
+	0x7032, 0x0010, 0x7033, 0x3f00, 0x60c3, 0x0001, 0x0804, 0x962a,
+	0x2009, 0x0003, 0x0019, 0x7033, 0x7f00, 0x0cb0, 0x0016, 0x080c,
+	0x9eeb, 0x001e, 0xb810, 0x9085, 0x0100, 0x7002, 0xb814, 0x7006,
+	0x2069, 0x1800, 0x6a78, 0x720a, 0x6a7c, 0x720e, 0x7013, 0x0888,
+	0x918d, 0x0008, 0x7116, 0x080c, 0x9618, 0x721a, 0x7a08, 0x7222,
+	0x2f10, 0x7226, 0x0005, 0x00b6, 0x0096, 0x00e6, 0x00d6, 0x00c6,
+	0x0056, 0x0046, 0x0036, 0x2061, 0x0100, 0x2071, 0x1800, 0x7810,
+	0x2058, 0xb8a0, 0x2028, 0xb910, 0xba14, 0x7378, 0x747c, 0x7820,
+	0x90be, 0x0006, 0x0904, 0x9587, 0x90be, 0x000a, 0x1904, 0x9543,
+	0xb8b0, 0x609e, 0x7814, 0x2048, 0xa87c, 0xd0fc, 0x0558, 0xaf90,
+	0x9784, 0xff00, 0x9105, 0x6062, 0x873f, 0x9784, 0xff00, 0x0006,
+	0x7814, 0x2048, 0xa878, 0xc0fc, 0x9005, 0x000e, 0x1160, 0xaf94,
+	0x87ff, 0x0198, 0x2039, 0x0098, 0x9705, 0x6072, 0x7808, 0x6082,
+	0x2f00, 0x6086, 0x0038, 0x9185, 0x2200, 0x6062, 0x6073, 0x0129,
+	0x6077, 0x0000, 0xb8b0, 0x609e, 0x0050, 0x2039, 0x0029, 0x9705,
+	0x6072, 0x0cc0, 0x9185, 0x0200, 0x6062, 0x6073, 0x2029, 0xa87c,
+	0xd0fc, 0x0118, 0xaf94, 0x87ff, 0x1120, 0x2f00, 0x6082, 0x7808,
+	0x6086, 0x6266, 0x636a, 0x646e, 0x6077, 0x0000, 0xb88c, 0x8000,
+	0x9084, 0x00ff, 0xb88e, 0x8007, 0x607a, 0x607f, 0x0000, 0xa838,
+	0x608a, 0xa834, 0x608e, 0xa848, 0x60c6, 0xa844, 0x60ca, 0xb86c,
+	0x60ce, 0x60af, 0x95d5, 0x60d7, 0x0000, 0x080c, 0x9ed0, 0x2009,
+	0x07d0, 0x60c4, 0x9084, 0xfff0, 0x9005, 0x0110, 0x2009, 0x1b58,
+	0x080c, 0x835f, 0x003e, 0x004e, 0x005e, 0x00ce, 0x00de, 0x00ee,
+	0x009e, 0x00be, 0x0005, 0x7804, 0x9086, 0x0040, 0x0904, 0x95c3,
+	0x9185, 0x0100, 0x6062, 0x6266, 0x636a, 0x646e, 0x6073, 0x0809,
+	0x6077, 0x0008, 0x60af, 0x95d5, 0x60d7, 0x0000, 0xb88c, 0x8000,
+	0x9084, 0x00ff, 0xb88e, 0x8007, 0x607a, 0x607f, 0x0000, 0x2f00,
+	0x6082, 0x7808, 0x6086, 0x7814, 0x2048, 0xa838, 0x608a, 0xa834,
+	0x608e, 0xa848, 0x60c6, 0xa844, 0x60ca, 0xb86c, 0x60ce, 0xbab0,
+	0x629e, 0x080c, 0x9ed0, 0x2009, 0x07d0, 0x60c4, 0x9084, 0xfff0,
+	0x9005, 0x0110, 0x2009, 0x1b58, 0x080c, 0x835f, 0x003e, 0x004e,
+	0x005e, 0x00ce, 0x00de, 0x00ee, 0x009e, 0x00be, 0x0005, 0x7814,
+	0x2048, 0xa87c, 0x9084, 0x0003, 0x9086, 0x0002, 0x0904, 0x95df,
+	0x9185, 0x0100, 0x6062, 0x6266, 0x636a, 0x646e, 0x6073, 0x0880,
+	0x6077, 0x0008, 0xb88c, 0x8000, 0x9084, 0x00ff, 0xb88e, 0x8007,
+	0x607a, 0x7838, 0x607e, 0x2f00, 0x6086, 0x7808, 0x6082, 0xa890,
+	0x608a, 0xa88c, 0x608e, 0xa8b0, 0x60c6, 0xa8ac, 0x60ca, 0xa8ac,
+	0x7930, 0x9108, 0x7932, 0xa8b0, 0x792c, 0x9109, 0x792e, 0xb86c,
+	0x60ce, 0x60af, 0x95d5, 0x60d7, 0x0000, 0xbab0, 0x629e, 0x080c,
+	0x9ead, 0x0804, 0x9573, 0xb8bc, 0xd084, 0x0148, 0xb88c, 0x7814,
+	0x2048, 0xb88c, 0x784a, 0xa836, 0x2900, 0xa83a, 0xb046, 0x9185,
+	0x0600, 0x6062, 0x6266, 0x636a, 0x646e, 0x6073, 0x0829, 0x6077,
+	0x0000, 0x60af, 0x9575, 0x60d7, 0x0000, 0x0804, 0x9556, 0x9185,
+	0x0700, 0x6062, 0x6266, 0x636a, 0x646e, 0x7824, 0xd0cc, 0x7826,
+	0x0118, 0x6073, 0x0889, 0x0010, 0x6073, 0x0898, 0x6077, 0x0000,
+	0xb88c, 0x8000, 0x9084, 0x00ff, 0xb88e, 0x8007, 0x607a, 0x607f,
+	0x0000, 0x2f00, 0x6086, 0x7808, 0x6082, 0xa838, 0x608a, 0xa834,
+	0x608e, 0xa848, 0x60c6, 0xa844, 0x60ca, 0xb86c, 0x60ce, 0x60af,
+	0x95d5, 0x60d7, 0x0000, 0xbab0, 0x629e, 0x7824, 0xd0cc, 0x0120,
+	0x080c, 0x9ed0, 0x0804, 0x9573, 0x080c, 0x9ead, 0x0804, 0x9573,
+	0x7a10, 0x00b6, 0x2258, 0xba8c, 0x8210, 0x9294, 0x00ff, 0xba8e,
+	0x00be, 0x8217, 0x0005, 0x00d6, 0x2069, 0x19bf, 0x6843, 0x0001,
+	0x00de, 0x0005, 0x60a3, 0x0056, 0x60a7, 0x9575, 0x00f1, 0x080c,
+	0x8351, 0x0005, 0x0016, 0x2001, 0x180c, 0x200c, 0x9184, 0x0600,
+	0x9086, 0x0600, 0x0128, 0x0089, 0x080c, 0x8351, 0x001e, 0x0005,
+	0xc1e5, 0x2001, 0x180c, 0x2102, 0x2001, 0x19c0, 0x2003, 0x0000,
+	0x2001, 0x19c8, 0x2003, 0x0000, 0x0c88, 0x0006, 0x6014, 0x9084,
+	0x1804, 0x9085, 0x0009, 0x6016, 0x000e, 0x0005, 0x0016, 0x00c6,
+	0x0006, 0x2061, 0x0100, 0x61a4, 0x60a7, 0x95f5, 0x6014, 0x9084,
+	0x1804, 0x9085, 0x0008, 0x6016, 0x000e, 0xa001, 0xa001, 0xa001,
+	0x61a6, 0x00ce, 0x001e, 0x0005, 0x00c6, 0x00d6, 0x0016, 0x0026,
+	0x2061, 0x0100, 0x2069, 0x0140, 0x080c, 0x7207, 0x11c0, 0x2001,
+	0x19db, 0x2004, 0x9005, 0x15d0, 0x080c, 0x72d2, 0x1160, 0x2061,
+	0x0100, 0x6020, 0xd0b4, 0x1120, 0x6024, 0xd084, 0x090c, 0x0dfa,
+	0x080c, 0x8351, 0x0458, 0x00c6, 0x2061, 0x19bf, 0x00c8, 0x6904,
+	0x9194, 0x4000, 0x0540, 0x0811, 0x080c, 0x2c98, 0x00c6, 0x2061,
+	0x19bf, 0x6128, 0x9192, 0x0008, 0x1258, 0x8108, 0x612a, 0x6124,
+	0x00ce, 0x81ff, 0x0198, 0x080c, 0x8351, 0x080c, 0x964d, 0x0070,
+	0x6124, 0x91e5, 0x0000, 0x0140, 0x080c, 0xdc28, 0x080c, 0x835a,
+	0x2009, 0x0014, 0x080c, 0xa15d, 0x00ce, 0x0000, 0x002e, 0x001e,
+	0x00de, 0x00ce, 0x0005, 0x2001, 0x19db, 0x2004, 0x9005, 0x1db0,
+	0x00c6, 0x2061, 0x19bf, 0x6128, 0x9192, 0x0003, 0x1e08, 0x8108,
+	0x612a, 0x00ce, 0x080c, 0x8351, 0x080c, 0x5dea, 0x2009, 0x185a,
+	0x2114, 0x8210, 0x220a, 0x0c10, 0x0096, 0x00c6, 0x00d6, 0x00e6,
+	0x0016, 0x0026, 0x080c, 0x8367, 0x2071, 0x19bf, 0x713c, 0x81ff,
+	0x0904, 0x974a, 0x2061, 0x0100, 0x2069, 0x0140, 0x080c, 0x7207,
+	0x1190, 0x0036, 0x2019, 0x0002, 0x080c, 0x999d, 0x003e, 0x713c,
+	0x2160, 0x080c, 0xdc28, 0x2009, 0x004a, 0x080c, 0xa15d, 0x080c,
+	0x72d2, 0x0804, 0x974a, 0x080c, 0x9756, 0x0904, 0x974a, 0x6904,
+	0xd1f4, 0x0904, 0x9751, 0x080c, 0x2c98, 0x00c6, 0x703c, 0x9065,
+	0x090c, 0x0dfa, 0x6020, 0x00ce, 0x9086, 0x0006, 0x1568, 0x61c8,
+	0x60c4, 0x9105, 0x1548, 0x2009, 0x180c, 0x2104, 0xd0d4, 0x0520,
+	0x6214, 0x9294, 0x1800, 0x1128, 0x6224, 0x9294, 0x0002, 0x1550,
+	0x0070, 0xc0d4, 0x200a, 0x0006, 0x2001, 0x0100, 0x2004, 0x9086,
+	0x000a, 0x000e, 0x0120, 0xd0cc, 0x0110, 0x080c, 0x2bca, 0x6014,
+	0x9084, 0xe7fd, 0x9085, 0x0010, 0x6016, 0x703c, 0x2060, 0x2009,
+	0x0049, 0x080c, 0xa15d, 0x0070, 0x0036, 0x2019, 0x0001, 0x080c,
+	0x999d, 0x003e, 0x713c, 0x2160, 0x080c, 0xdc28, 0x2009, 0x004a,
+	0x080c, 0xa15d, 0x002e, 0x001e, 0x00ee, 0x00de, 0x00ce, 0x009e,
+	0x0005, 0xd1ec, 0x1904, 0x9703, 0x0804, 0x9705, 0x00d6, 0x00c6,
+	0x0096, 0x703c, 0x9065, 0x090c, 0x0dfa, 0x2001, 0x0306, 0x200c,
+	0x9184, 0x0030, 0x0904, 0x97ff, 0x9184, 0x0048, 0x9086, 0x0008,
+	0x1904, 0x97ff, 0x2009, 0x0206, 0x2104, 0x2009, 0x0203, 0x210c,
+	0x9106, 0x1904, 0x97ff, 0x2009, 0x022a, 0x2104, 0x2009, 0x022f,
+	0x210c, 0x9116, 0x9084, 0x03ff, 0x918c, 0x03ff, 0x9294, 0x0400,
+	0x0110, 0x9102, 0x0030, 0x2010, 0x2100, 0x9202, 0x2009, 0x0228,
+	0x9102, 0x9082, 0x0005, 0x0250, 0x2008, 0x2001, 0x013b, 0x2004,
+	0x8004, 0x8004, 0x8004, 0x9102, 0x1a04, 0x97ff, 0x2009, 0x1a58,
+	0x2104, 0x8000, 0x0208, 0x200a, 0x2069, 0x0100, 0x6914, 0x918c,
+	0x0184, 0x918d, 0x0010, 0x6916, 0x69c8, 0x2011, 0x0020, 0x68c8,
+	0x9106, 0x1570, 0x8211, 0x1dd8, 0x2001, 0x0306, 0x2003, 0x4800,
+	0x2001, 0x009a, 0x2003, 0x0004, 0x2001, 0x1a3d, 0x2003, 0x0000,
+	0x2001, 0x1a46, 0x2003, 0x0000, 0x6a88, 0x698c, 0x2200, 0x9105,
+	0x1120, 0x2c10, 0x080c, 0x1afe, 0x0040, 0x6014, 0x2048, 0xaa3a,
+	0xa936, 0x6ac4, 0x69c8, 0xa946, 0xaa4a, 0x0126, 0x00c6, 0x2091,
+	0x2400, 0x002e, 0x080c, 0x1b8a, 0x190c, 0x0dfa, 0x012e, 0x0090,
+	0x2009, 0x1a59, 0x2104, 0x8000, 0x0208, 0x200a, 0x69c8, 0x2011,
+	0x0020, 0x8211, 0x1df0, 0x68c8, 0x9106, 0x1dc0, 0x69c4, 0x68c8,
+	0x9105, 0x0160, 0x6824, 0xd08c, 0x0110, 0x6827, 0x0002, 0x7048,
+	0xc085, 0x704a, 0x0079, 0x7048, 0xc084, 0x704a, 0x2009, 0x07d0,
+	0x080c, 0x835f, 0x9006, 0x009e, 0x00ce, 0x00de, 0x0005, 0x9085,
+	0x0001, 0x0cc8, 0x0026, 0x00e6, 0x2071, 0x19bf, 0x7048, 0xd084,
+	0x01c0, 0x713c, 0x81ff, 0x01a8, 0x2071, 0x0100, 0x9188, 0x0008,
+	0x2114, 0x928e, 0x0006, 0x1138, 0x7014, 0x9084, 0x1984, 0x9085,
+	0x0012, 0x7016, 0x0030, 0x7014, 0x9084, 0x1984, 0x9085, 0x0016,
+	0x7016, 0x00ee, 0x002e, 0x0005, 0x00b6, 0x00e6, 0x00d6, 0x00c6,
+	0x0066, 0x0056, 0x0046, 0x0006, 0x0126, 0x2091, 0x8000, 0x6010,
+	0x2058, 0xbca0, 0x2071, 0x19bf, 0x7018, 0x2058, 0x8bff, 0x0190,
+	0xb8a0, 0x9406, 0x0118, 0xb854, 0x2058, 0x0cc0, 0x6014, 0x0096,
+	0x2048, 0xac6c, 0xad70, 0xae78, 0x009e, 0x080c, 0x65d1, 0x0110,
+	0x9085, 0x0001, 0x012e, 0x000e, 0x004e, 0x005e, 0x006e, 0x00ce,
+	0x00de, 0x00ee, 0x00be, 0x0005, 0x080c, 0x912e, 0x7003, 0x1200,
+	0x7838, 0x7012, 0x783c, 0x7016, 0x00c6, 0x7820, 0x9086, 0x0004,
+	0x1148, 0x7810, 0x9005, 0x0130, 0x00b6, 0x2058, 0xb810, 0xb914,
+	0x00be, 0x0020, 0x2061, 0x1800, 0x6078, 0x617c, 0x9084, 0x00ff,
+	0x700a, 0x710e, 0x00ce, 0x60c3, 0x002c, 0x0804, 0x962a, 0x080c,
+	0x912e, 0x7003, 0x0f00, 0x7808, 0xd09c, 0x0128, 0xb810, 0x9084,
+	0x00ff, 0x700a, 0xb814, 0x700e, 0x60c3, 0x0008, 0x0804, 0x962a,
+	0x0156, 0x080c, 0x9179, 0x7003, 0x0200, 0x2011, 0x1848, 0x63f0,
+	0x2312, 0x20a9, 0x0006, 0x2011, 0x1840, 0x2019, 0x1841, 0x9ef0,
+	0x0002, 0x2376, 0x8e70, 0x2276, 0x8e70, 0x9398, 0x0002, 0x9290,
+	0x0002, 0x1f04, 0x9899, 0x60c3, 0x001c, 0x015e, 0x0804, 0x962a,
+	0x0016, 0x0026, 0x080c, 0x9155, 0x080c, 0x9167, 0x9e80, 0x0004,
+	0x20e9, 0x0000, 0x20a0, 0x7814, 0x0096, 0x2048, 0xa800, 0x2048,
+	0xa860, 0x20e0, 0xa85c, 0x9080, 0x0021, 0x2098, 0x009e, 0x7808,
+	0x9088, 0x0002, 0x21a8, 0x9192, 0x0010, 0x1250, 0x4003, 0x9080,
+	0x0004, 0x8003, 0x60c2, 0x080c, 0x962a, 0x002e, 0x001e, 0x0005,
+	0x20a9, 0x0010, 0x4003, 0x080c, 0x9ed6, 0x20a1, 0x0240, 0x22a8,
+	0x4003, 0x0c68, 0x080c, 0x912e, 0x7003, 0x6200, 0x7808, 0x700e,
+	0x60c3, 0x0008, 0x0804, 0x962a, 0x0016, 0x0026, 0x080c, 0x912e,
+	0x20e9, 0x0000, 0x20a1, 0x024c, 0x7814, 0x0096, 0x2048, 0xa800,
+	0x2048, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x0023, 0x2098, 0x009e,
+	0x7808, 0x9088, 0x0002, 0x21a8, 0x4003, 0x8003, 0x60c2, 0x080c,
+	0x962a, 0x002e, 0x001e, 0x0005, 0x00e6, 0x00c6, 0x0006, 0x0126,
+	0x2091, 0x8000, 0x2071, 0x19bf, 0x700c, 0x2060, 0x8cff, 0x0178,
+	0x080c, 0xc03f, 0x1110, 0x080c, 0xaa81, 0x600c, 0x0006, 0x080c,
+	0xc2ab, 0x080c, 0xa0e3, 0x080c, 0x9a4e, 0x00ce, 0x0c78, 0x2c00,
+	0x700e, 0x700a, 0x012e, 0x000e, 0x00ce, 0x00ee, 0x0005, 0x0126,
+	0x0156, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0026, 0x0016,
+	0x0006, 0x2091, 0x8000, 0x2001, 0x180c, 0x200c, 0x918c, 0xe7ff,
+	0x2102, 0x2069, 0x0100, 0x2079, 0x0140, 0x2071, 0x19bf, 0x7024,
+	0x2060, 0x8cff, 0x01f8, 0x080c, 0x9656, 0x6ac0, 0x68c3, 0x0000,
+	0x080c, 0x835a, 0x00c6, 0x2061, 0x0100, 0x080c, 0x9eef, 0x00ce,
+	0x20a9, 0x01f4, 0x0461, 0x2009, 0x0013, 0x080c, 0xa15d, 0x000e,
+	0x001e, 0x002e, 0x006e, 0x00ce, 0x00de, 0x00ee, 0x00fe, 0x015e,
+	0x012e, 0x0005, 0x2001, 0x1800, 0x2004, 0x9096, 0x0001, 0x0d78,
+	0x9096, 0x0004, 0x0d60, 0x080c, 0x835a, 0x6814, 0x9084, 0x0001,
+	0x0110, 0x68a7, 0x95f5, 0x6817, 0x0008, 0x68c3, 0x0000, 0x2011,
+	0x5d94, 0x080c, 0x82da, 0x20a9, 0x01f4, 0x0009, 0x08c0, 0x6824,
+	0xd094, 0x0140, 0x6827, 0x0004, 0x7804, 0x9084, 0x4000, 0x190c,
+	0x2c98, 0x0090, 0xd084, 0x0118, 0x6827, 0x0001, 0x0010, 0x1f04,
+	0x997f, 0x7804, 0x9084, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c,
+	0x2c88, 0x9006, 0x080c, 0x2c88, 0x0005, 0x0126, 0x0156, 0x00f6,
+	0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0026, 0x0016, 0x0006, 0x2091,
+	0x8000, 0x2001, 0x180c, 0x200c, 0x918c, 0xdbff, 0x2102, 0x2069,
+	0x0100, 0x2079, 0x0140, 0x2071, 0x19bf, 0x703c, 0x2060, 0x8cff,
+	0x0904, 0x9a04, 0x9386, 0x0002, 0x1128, 0x6814, 0x9084, 0x0002,
+	0x0904, 0x9a04, 0x68af, 0x95f5, 0x6817, 0x0010, 0x2009, 0x00fa,
+	0x8109, 0x1df0, 0x69c6, 0x68cb, 0x0008, 0x080c, 0x8367, 0x080c,
+	0x1f32, 0x2001, 0x0032, 0x6920, 0xd1bc, 0x0130, 0x8001, 0x1dd8,
+	0x692c, 0x918d, 0x0008, 0x692e, 0x20a9, 0x03e8, 0x6824, 0xd094,
+	0x0140, 0x6827, 0x0004, 0x7804, 0x9084, 0x4000, 0x190c, 0x2c98,
+	0x0090, 0xd08c, 0x0118, 0x6827, 0x0002, 0x0010, 0x1f04, 0x99de,
+	0x7804, 0x9084, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2c88,
+	0x9006, 0x080c, 0x2c88, 0x6827, 0x4000, 0x6824, 0x83ff, 0x1120,
+	0x2009, 0x0049, 0x080c, 0xa15d, 0x000e, 0x001e, 0x002e, 0x006e,
+	0x00ce, 0x00de, 0x00ee, 0x00fe, 0x015e, 0x012e, 0x0005, 0x00d6,
+	0x0126, 0x2091, 0x8000, 0x2069, 0x19bf, 0x6a06, 0x012e, 0x00de,
+	0x0005, 0x00d6, 0x0126, 0x2091, 0x8000, 0x2069, 0x19bf, 0x6a32,
+	0x012e, 0x00de, 0x0005, 0x080c, 0x92f1, 0x7854, 0x7032, 0x7042,
+	0x7047, 0x1000, 0x00f8, 0x080c, 0x92f1, 0x7854, 0x7032, 0x7042,
+	0x7047, 0x4000, 0x00b8, 0x080c, 0x92f1, 0x7854, 0x7032, 0x7042,
+	0x7047, 0x2000, 0x0078, 0x080c, 0x92f1, 0x7854, 0x7032, 0x7042,
+	0x7047, 0x0400, 0x0038, 0x080c, 0x92f1, 0x7854, 0x7032, 0x7042,
+	0x7047, 0x0200, 0x60c3, 0x0020, 0x0804, 0x962a, 0x00e6, 0x2071,
+	0x19bf, 0x7020, 0x9005, 0x0110, 0x8001, 0x7022, 0x00ee, 0x0005,
+	0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0076, 0x0066, 0x0006, 0x0126,
+	0x2091, 0x8000, 0x2071, 0x19bf, 0x7614, 0x2660, 0x2678, 0x2039,
+	0x0001, 0x87ff, 0x0904, 0x9af3, 0x8cff, 0x0904, 0x9af3, 0x6020,
+	0x9086, 0x0006, 0x1904, 0x9aee, 0x88ff, 0x0138, 0x2800, 0x9c06,
+	0x1904, 0x9aee, 0x2039, 0x0000, 0x0050, 0x6010, 0x9b06, 0x1904,
+	0x9aee, 0x85ff, 0x0120, 0x6054, 0x9106, 0x1904, 0x9aee, 0x7024,
+	0x9c06, 0x15b0, 0x2069, 0x0100, 0x68c0, 0x9005, 0x1160, 0x6824,
+	0xd084, 0x0148, 0x6827, 0x0001, 0x080c, 0x835a, 0x080c, 0x9b78,
+	0x7027, 0x0000, 0x0428, 0x080c, 0x835a, 0x6820, 0xd0b4, 0x0110,
+	0x68a7, 0x95f5, 0x6817, 0x0008, 0x68c3, 0x0000, 0x080c, 0x9b78,
+	0x7027, 0x0000, 0x0036, 0x2069, 0x0140, 0x6b04, 0x9384, 0x1000,
+	0x0138, 0x2001, 0x0100, 0x080c, 0x2c88, 0x9006, 0x080c, 0x2c88,
+	0x2069, 0x0100, 0x6824, 0xd084, 0x0110, 0x6827, 0x0001, 0x003e,
 	0x7014, 0x9c36, 0x1110, 0x660c, 0x7616, 0x7010, 0x9c36, 0x1140,
 	0x2c00, 0x9f36, 0x0118, 0x2f00, 0x7012, 0x0010, 0x7013, 0x0000,
 	0x660c, 0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678,
-	0x600f, 0x0000, 0x6014, 0x2048, 0x080c, 0xbb3b, 0x01e8, 0x6020,
-	0x9086, 0x0003, 0x1580, 0x080c, 0xbd41, 0x1118, 0x080c, 0xa7cd,
-	0x0098, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x0016, 0x0036,
-	0x0086, 0x080c, 0xbe2f, 0x080c, 0xd80d, 0x080c, 0x68a0, 0x008e,
-	0x003e, 0x001e, 0x080c, 0xbd24, 0x080c, 0x9e5f, 0x080c, 0x979a,
-	0x00ce, 0x0804, 0x85ab, 0x2c78, 0x600c, 0x2060, 0x0804, 0x85ab,
-	0x012e, 0x000e, 0x001e, 0x006e, 0x00ce, 0x00de, 0x00ee, 0x00fe,
-	0x009e, 0x00be, 0x0005, 0x6020, 0x9086, 0x0006, 0x1158, 0x0016,
-	0x0036, 0x0086, 0x080c, 0xd80d, 0x080c, 0xd50f, 0x008e, 0x003e,
-	0x001e, 0x08d0, 0x080c, 0xa7cd, 0x6020, 0x9086, 0x0002, 0x1160,
-	0x6004, 0x0006, 0x9086, 0x0085, 0x000e, 0x0904, 0x8611, 0x9086,
-	0x008b, 0x0904, 0x8611, 0x0840, 0x6020, 0x9086, 0x0005, 0x1920,
-	0x6004, 0x0006, 0x9086, 0x0085, 0x000e, 0x09c8, 0x9086, 0x008b,
-	0x09b0, 0x0804, 0x8624, 0x00b6, 0x00a6, 0x0096, 0x00c6, 0x0006,
-	0x0126, 0x2091, 0x8000, 0x9280, 0x1000, 0x2004, 0x905d, 0x0904,
-	0x86fb, 0x00f6, 0x00e6, 0x00d6, 0x0066, 0x2071, 0x19bf, 0xbe54,
-	0x7018, 0x9b06, 0x1108, 0x761a, 0x701c, 0x9b06, 0x1130, 0x86ff,
-	0x1118, 0x7018, 0x701e, 0x0008, 0x761e, 0xb858, 0x904d, 0x0108,
-	0xae56, 0x96d5, 0x0000, 0x0110, 0x2900, 0xb05a, 0xb857, 0x0000,
-	0xb85b, 0x0000, 0xb800, 0xc0d4, 0xc0dc, 0xb802, 0x080c, 0x6189,
-	0x0904, 0x86f7, 0x7624, 0x86ff, 0x0904, 0x86e6, 0x9680, 0x0005,
-	0x2004, 0x9906, 0x15d8, 0x00d6, 0x2069, 0x0100, 0x68c0, 0x9005,
-	0x0560, 0x080c, 0x80bf, 0x080c, 0x93c7, 0x68c3, 0x0000, 0x080c,
-	0x98c4, 0x7027, 0x0000, 0x0036, 0x2069, 0x0140, 0x6b04, 0x9384,
-	0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2b21, 0x9006, 0x080c,
-	0x2b21, 0x2069, 0x0100, 0x6824, 0xd084, 0x0110, 0x6827, 0x0001,
-	0x003e, 0x00de, 0x00c6, 0xb83c, 0x9005, 0x0110, 0x8001, 0xb83e,
-	0x2660, 0x080c, 0x9e5f, 0x00ce, 0x0048, 0x00de, 0x00c6, 0x2660,
-	0x6003, 0x0009, 0x630a, 0x00ce, 0x0804, 0x869e, 0x89ff, 0x0158,
-	0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c, 0xbe2f, 0x080c,
-	0xd80d, 0x080c, 0x68a0, 0x080c, 0x979a, 0x0804, 0x869e, 0x006e,
-	0x00de, 0x00ee, 0x00fe, 0x012e, 0x000e, 0x00ce, 0x009e, 0x00ae,
-	0x00be, 0x0005, 0x0096, 0x0006, 0x0066, 0x00c6, 0x00d6, 0x9036,
-	0x7814, 0x9065, 0x0904, 0x8763, 0x600c, 0x0006, 0x600f, 0x0000,
-	0x7824, 0x9c06, 0x1570, 0x2069, 0x0100, 0x6820, 0xd0a4, 0x1508,
-	0x080c, 0x80bf, 0x080c, 0x93c7, 0x68c3, 0x0000, 0x080c, 0x98c4,
-	0x7827, 0x0000, 0x0036, 0x2069, 0x0140, 0x6b04, 0x9384, 0x1000,
-	0x0138, 0x2001, 0x0100, 0x080c, 0x2b21, 0x9006, 0x080c, 0x2b21,
-	0x2069, 0x0100, 0x6824, 0xd084, 0x0110, 0x6827, 0x0001, 0x003e,
-	0x0040, 0x080c, 0x6530, 0x1520, 0x6003, 0x0009, 0x630a, 0x2c30,
-	0x00f8, 0x6014, 0x2048, 0x080c, 0xbb39, 0x01b0, 0x6020, 0x9086,
-	0x0003, 0x1508, 0x080c, 0xbd41, 0x1118, 0x080c, 0xa7cd, 0x0060,
-	0x080c, 0x6530, 0x1168, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000,
-	0x080c, 0x68a0, 0x080c, 0xbd24, 0x080c, 0x9e5f, 0x080c, 0x979a,
-	0x000e, 0x0804, 0x8709, 0x7e16, 0x7e12, 0x00de, 0x00ce, 0x006e,
-	0x000e, 0x009e, 0x0005, 0x6020, 0x9086, 0x0006, 0x1118, 0x080c,
-	0xd50f, 0x0c50, 0x080c, 0xa7cd, 0x6020, 0x9086, 0x0002, 0x1150,
-	0x6004, 0x0006, 0x9086, 0x0085, 0x000e, 0x0990, 0x9086, 0x008b,
-	0x0978, 0x08d0, 0x6020, 0x9086, 0x0005, 0x19b0, 0x6004, 0x0006,
-	0x9086, 0x0085, 0x000e, 0x0d18, 0x9086, 0x008b, 0x0d00, 0x0860,
-	0x0006, 0x0066, 0x0096, 0x00b6, 0x00c6, 0x00d6, 0x7818, 0x905d,
-	0x0904, 0x8810, 0xb854, 0x0006, 0x9006, 0xb856, 0xb85a, 0xb800,
-	0xc0d4, 0xc0dc, 0xb802, 0x080c, 0x6189, 0x0904, 0x880d, 0x7e24,
-	0x86ff, 0x0904, 0x8800, 0x9680, 0x0005, 0x2004, 0x9906, 0x1904,
-	0x8800, 0x00d6, 0x2069, 0x0100, 0x68c0, 0x9005, 0x0904, 0x87f7,
-	0x080c, 0x80bf, 0x080c, 0x93c7, 0x68c3, 0x0000, 0x080c, 0x98c4,
-	0x7827, 0x0000, 0x0036, 0x2069, 0x0140, 0x6b04, 0x9384, 0x1000,
-	0x0138, 0x2001, 0x0100, 0x080c, 0x2b21, 0x9006, 0x080c, 0x2b21,
-	0x2069, 0x0100, 0x6824, 0xd084, 0x0110, 0x6827, 0x0001, 0x003e,
-	0x00de, 0x00c6, 0x3e08, 0x918e, 0x0002, 0x1168, 0xb800, 0xd0bc,
-	0x0150, 0x9680, 0x0010, 0x200c, 0x81ff, 0x1518, 0x2009, 0x1960,
-	0x210c, 0x2102, 0x00f0, 0xb83c, 0x9005, 0x0110, 0x8001, 0xb83e,
-	0x2660, 0x600f, 0x0000, 0x080c, 0x9e5f, 0x00ce, 0x0048, 0x00de,
-	0x00c6, 0x2660, 0x6003, 0x0009, 0x630a, 0x00ce, 0x0804, 0x87a3,
-	0x89ff, 0x0138, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c,
-	0x68a0, 0x080c, 0x979a, 0x0804, 0x87a3, 0x000e, 0x0804, 0x8797,
-	0x781e, 0x781a, 0x00de, 0x00ce, 0x00be, 0x009e, 0x006e, 0x000e,
-	0x0005, 0x00e6, 0x00d6, 0x0096, 0x0066, 0xb800, 0xd0dc, 0x01a0,
-	0xb84c, 0x904d, 0x0188, 0xa878, 0x9606, 0x1170, 0x2071, 0x19bf,
-	0x7024, 0x9035, 0x0148, 0x9080, 0x0005, 0x2004, 0x9906, 0x1120,
-	0xb800, 0xc0dc, 0xb802, 0x0029, 0x006e, 0x009e, 0x00de, 0x00ee,
-	0x0005, 0x00f6, 0x2079, 0x0100, 0x78c0, 0x9005, 0x1138, 0x00c6,
-	0x2660, 0x6003, 0x0009, 0x630a, 0x00ce, 0x04b8, 0x080c, 0x93c7,
-	0x78c3, 0x0000, 0x080c, 0x98c4, 0x7027, 0x0000, 0x0036, 0x2079,
-	0x0140, 0x7b04, 0x9384, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c,
-	0x2b21, 0x9006, 0x080c, 0x2b21, 0x2079, 0x0100, 0x7824, 0xd084,
-	0x0110, 0x7827, 0x0001, 0x080c, 0x98c4, 0x003e, 0x080c, 0x6189,
-	0x00c6, 0xb83c, 0x9005, 0x0110, 0x8001, 0xb83e, 0x2660, 0x080c,
-	0x9e2f, 0x00ce, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c,
-	0xbe2f, 0x080c, 0x68a0, 0x080c, 0x979a, 0x00fe, 0x0005, 0x00b6,
-	0x00e6, 0x00c6, 0x2011, 0x0101, 0x2204, 0xc0c4, 0x2012, 0x2001,
-	0x180c, 0x2014, 0xc2e4, 0x2202, 0x2071, 0x19bf, 0x7004, 0x9084,
-	0x0007, 0x0002, 0x889c, 0x88a0, 0x88be, 0x88e7, 0x8925, 0x889c,
-	0x88b7, 0x889a, 0x080c, 0x0db4, 0x00ce, 0x00ee, 0x00be, 0x0005,
-	0x7024, 0x9065, 0x0148, 0x7020, 0x8001, 0x7022, 0x600c, 0x9015,
-	0x0158, 0x7216, 0x600f, 0x0000, 0x7007, 0x0000, 0x7027, 0x0000,
-	0x00ce, 0x00ee, 0x00be, 0x0005, 0x7216, 0x7212, 0x0ca8, 0x7007,
-	0x0000, 0x7027, 0x0000, 0x7020, 0x9005, 0x0070, 0x6010, 0x2058,
-	0x080c, 0x6189, 0xb800, 0xc0dc, 0xb802, 0x7007, 0x0000, 0x7027,
-	0x0000, 0x7020, 0x8001, 0x7022, 0x1148, 0x2001, 0x180c, 0x2014,
-	0xd2ec, 0x1180, 0x00ce, 0x00ee, 0x00be, 0x0005, 0xb854, 0x9015,
-	0x0120, 0x721e, 0x080c, 0x898b, 0x0ca8, 0x7218, 0x721e, 0x080c,
-	0x898b, 0x0c80, 0xc2ec, 0x2202, 0x080c, 0x8a68, 0x0c58, 0x7024,
-	0x9065, 0x05b8, 0x700c, 0x9c06, 0x1160, 0x080c, 0x979a, 0x600c,
-	0x9015, 0x0120, 0x720e, 0x600f, 0x0000, 0x0448, 0x720e, 0x720a,
-	0x0430, 0x7014, 0x9c06, 0x1160, 0x080c, 0x979a, 0x600c, 0x9015,
-	0x0120, 0x7216, 0x600f, 0x0000, 0x00d0, 0x7216, 0x7212, 0x00b8,
-	0x6020, 0x9086, 0x0003, 0x1198, 0x6010, 0x2058, 0x080c, 0x6189,
-	0xb800, 0xc0dc, 0xb802, 0x080c, 0x979a, 0x701c, 0x9065, 0x0138,
-	0xb854, 0x9015, 0x0110, 0x721e, 0x0010, 0x7218, 0x721e, 0x7027,
-	0x0000, 0x00ce, 0x00ee, 0x00be, 0x0005, 0x7024, 0x9065, 0x0140,
-	0x080c, 0x979a, 0x600c, 0x9015, 0x0158, 0x720e, 0x600f, 0x0000,
-	0x080c, 0x98c4, 0x7027, 0x0000, 0x00ce, 0x00ee, 0x00be, 0x0005,
-	0x720e, 0x720a, 0x0ca8, 0x00d6, 0x2069, 0x19bf, 0x6830, 0x9084,
-	0x0003, 0x0002, 0x8948, 0x894a, 0x896e, 0x8946, 0x080c, 0x0db4,
-	0x00de, 0x0005, 0x00c6, 0x6840, 0x9086, 0x0001, 0x01b8, 0x683c,
-	0x9065, 0x0130, 0x600c, 0x9015, 0x0170, 0x6a3a, 0x600f, 0x0000,
-	0x6833, 0x0000, 0x683f, 0x0000, 0x2011, 0x19de, 0x2013, 0x0000,
-	0x00ce, 0x00de, 0x0005, 0x683a, 0x6836, 0x0c90, 0x6843, 0x0000,
-	0x6838, 0x9065, 0x0d68, 0x6003, 0x0003, 0x0c50, 0x00c6, 0x9006,
-	0x6842, 0x6846, 0x684a, 0x683c, 0x9065, 0x0160, 0x600c, 0x9015,
-	0x0130, 0x6a3a, 0x600f, 0x0000, 0x683f, 0x0000, 0x0018, 0x683e,
-	0x683a, 0x6836, 0x00ce, 0x00de, 0x0005, 0x2001, 0x180c, 0x200c,
-	0xc1e5, 0x2102, 0x0005, 0x2001, 0x180c, 0x200c, 0xd1ec, 0x0120,
-	0xc1ec, 0x2102, 0x080c, 0x8a68, 0x2001, 0x19cb, 0x2004, 0x9086,
-	0x0001, 0x0d58, 0x00d6, 0x2069, 0x19bf, 0x6804, 0x9084, 0x0007,
-	0x0002, 0x89ab, 0x8a50, 0x8a50, 0x8a50, 0x8a50, 0x8a52, 0x8a50,
-	0x89a9, 0x080c, 0x0db4, 0x6820, 0x9005, 0x1110, 0x00de, 0x0005,
-	0x00c6, 0x680c, 0x9065, 0x0150, 0x6807, 0x0004, 0x6826, 0x682b,
-	0x0000, 0x080c, 0x8abf, 0x00ce, 0x00de, 0x0005, 0x6814, 0x9065,
-	0x0150, 0x6807, 0x0001, 0x6826, 0x682b, 0x0000, 0x080c, 0x8abf,
-	0x00ce, 0x00de, 0x0005, 0x00b6, 0x00e6, 0x6a1c, 0x92dd, 0x0000,
-	0x0904, 0x8a3a, 0xb84c, 0x900d, 0x0118, 0xb888, 0x9005, 0x01a0,
-	0xb854, 0x905d, 0x0120, 0x920e, 0x0904, 0x8a3a, 0x0028, 0x6818,
-	0x920e, 0x0904, 0x8a3a, 0x2058, 0xb84c, 0x900d, 0x0d88, 0xb888,
-	0x9005, 0x1d70, 0x2b00, 0x681e, 0xbb3c, 0xb838, 0x9302, 0x1e40,
-	0x080c, 0x9e06, 0x0904, 0x8a3a, 0x8318, 0xbb3e, 0x6116, 0x2b10,
-	0x6212, 0x0096, 0x2148, 0xa880, 0x9084, 0x00ff, 0x605e, 0xa883,
-	0x0000, 0xa884, 0x009e, 0x908a, 0x199a, 0x0210, 0x2001, 0x1999,
-	0x8003, 0x801b, 0x831b, 0x9318, 0x631a, 0x6114, 0x0096, 0x2148,
-	0xa964, 0x009e, 0x918c, 0x00ff, 0x918e, 0x0048, 0x0538, 0x00f6,
-	0x2c78, 0x2061, 0x0100, 0xbab0, 0x629a, 0x2069, 0x0200, 0x2071,
-	0x0240, 0x080c, 0x8ff7, 0x2069, 0x19bf, 0xbb00, 0xc3dd, 0xbb02,
-	0x6807, 0x0002, 0x2f18, 0x6b26, 0x682b, 0x0000, 0x7823, 0x0003,
-	0x7803, 0x0001, 0x7807, 0x0040, 0x00fe, 0x00ee, 0x00be, 0x00ce,
-	0x00de, 0x0005, 0x00ee, 0x00be, 0x00ce, 0x0cd0, 0x6807, 0x0006,
-	0x2c18, 0x6b26, 0x6820, 0x8001, 0x6822, 0x682b, 0x0000, 0x080c,
-	0x6189, 0x080c, 0x9c5b, 0x00ee, 0x00be, 0x00ce, 0x00de, 0x0005,
-	0x00de, 0x0005, 0x00c6, 0x680c, 0x9065, 0x0138, 0x6807, 0x0004,
-	0x6826, 0x682b, 0x0000, 0x080c, 0x8abf, 0x00ce, 0x00de, 0x0005,
-	0x2001, 0x180c, 0x2014, 0xc2ed, 0x2202, 0x00de, 0x00fe, 0x0005,
-	0x00f6, 0x00d6, 0x2069, 0x19bf, 0x6830, 0x9086, 0x0000, 0x1548,
-	0x2001, 0x180c, 0x2014, 0xd2e4, 0x0130, 0xc2e4, 0x2202, 0x080c,
-	0x899a, 0x2069, 0x19bf, 0x2001, 0x180c, 0x200c, 0xd1c4, 0x11e0,
-	0x6838, 0x907d, 0x01b0, 0x6a04, 0x9296, 0x0000, 0x1568, 0x6833,
-	0x0001, 0x683e, 0x6847, 0x0000, 0x684b, 0x0000, 0x0126, 0x00f6,
-	0x2091, 0x2400, 0x002e, 0x080c, 0x1af5, 0x1158, 0x012e, 0x080c,
-	0x9224, 0x00de, 0x00fe, 0x0005, 0xc1c4, 0x2102, 0x080c, 0x705a,
-	0x08f8, 0x012e, 0x6843, 0x0000, 0x7803, 0x0002, 0x780c, 0x9015,
-	0x0140, 0x6a3a, 0x780f, 0x0000, 0x6833, 0x0000, 0x683f, 0x0000,
-	0x0c40, 0x683a, 0x6836, 0x0cc0, 0x6a04, 0x9296, 0x0006, 0x1904,
-	0x8a60, 0x6a30, 0x9296, 0x0000, 0x0950, 0x0804, 0x8a60, 0x6020,
-	0x9084, 0x000f, 0x000b, 0x0005, 0x8ad3, 0x8ad8, 0x8f31, 0x8fc0,
-	0x8ad8, 0x8f31, 0x8fc0, 0x8ad3, 0x8ad8, 0x8ad3, 0x8ad3, 0x8ad3,
-	0x8ad3, 0x8ad3, 0x8ad3, 0x080c, 0x887f, 0x080c, 0x898b, 0x0005,
-	0x00b6, 0x0156, 0x0136, 0x0146, 0x01c6, 0x01d6, 0x00c6, 0x00d6,
-	0x00e6, 0x00f6, 0x2069, 0x0200, 0x2071, 0x0240, 0x6004, 0x908a,
-	0x0053, 0x1a0c, 0x0db4, 0x6110, 0x2158, 0xb9b0, 0x2c78, 0x2061,
-	0x0100, 0x619a, 0x908a, 0x0040, 0x1a04, 0x8b44, 0x005b, 0x00fe,
-	0x00ee, 0x00de, 0x00ce, 0x01de, 0x01ce, 0x014e, 0x013e, 0x015e,
-	0x00be, 0x0005, 0x8cbb, 0x8cf6, 0x8d1f, 0x8dc2, 0x8de3, 0x8de9,
-	0x8df6, 0x8dfe, 0x8e0a, 0x8e10, 0x8e21, 0x8e10, 0x8e78, 0x8dfe,
-	0x8e84, 0x8e8a, 0x8e0a, 0x8e8a, 0x8e96, 0x8b42, 0x8b42, 0x8b42,
-	0x8b42, 0x8b42, 0x8b42, 0x8b42, 0x8b42, 0x8b42, 0x8b42, 0x8b42,
-	0x95a0, 0x95c3, 0x95d4, 0x95f4, 0x9626, 0x8df6, 0x8b42, 0x8df6,
-	0x8e10, 0x8b42, 0x8d1f, 0x8dc2, 0x8b42, 0x99bb, 0x8e10, 0x8b42,
-	0x99d7, 0x8e10, 0x8b42, 0x8e0a, 0x8cb5, 0x8b65, 0x8b42, 0x99f3,
-	0x9a60, 0x9b3b, 0x8b42, 0x9b48, 0x8df3, 0x9b73, 0x8b42, 0x9630,
-	0x9ba0, 0x8b42, 0x080c, 0x0db4, 0x2100, 0x005b, 0x00fe, 0x00ee,
-	0x00de, 0x00ce, 0x01de, 0x01ce, 0x014e, 0x013e, 0x015e, 0x00be,
-	0x0005, 0x8b63, 0x8b63, 0x8b63, 0x8b8c, 0x8c38, 0x8c43, 0x8b63,
-	0x8b63, 0x8b63, 0x8c8a, 0x8c96, 0x8ba7, 0x8b63, 0x8bc2, 0x8bf6,
-	0x9d22, 0x9d67, 0x8e10, 0x080c, 0x0db4, 0x00d6, 0x0096, 0x080c,
-	0x8ea9, 0x7003, 0x2414, 0x7007, 0x0018, 0x700b, 0x0800, 0x7814,
-	0x2048, 0xa83c, 0x700e, 0xa850, 0x7022, 0xa854, 0x7026, 0x60c3,
-	0x0018, 0x080c, 0x939b, 0x009e, 0x00de, 0x0005, 0x7810, 0x00b6,
-	0x2058, 0xb8a0, 0x00be, 0x080c, 0x9dae, 0x1118, 0x9084, 0xff80,
-	0x0110, 0x9085, 0x0001, 0x0005, 0x00d6, 0x0096, 0x080c, 0x8ea9,
-	0x7003, 0x0500, 0x7814, 0x2048, 0xa874, 0x700a, 0xa878, 0x700e,
-	0xa87c, 0x7012, 0xa880, 0x7016, 0xa884, 0x701a, 0xa888, 0x701e,
-	0x60c3, 0x0010, 0x080c, 0x939b, 0x009e, 0x00de, 0x0005, 0x00d6,
-	0x0096, 0x080c, 0x8ea9, 0x7003, 0x0500, 0x7814, 0x2048, 0xa8cc,
-	0x700a, 0xa8d0, 0x700e, 0xa8d4, 0x7012, 0xa8d8, 0x7016, 0xa8dc,
-	0x701a, 0xa8e0, 0x701e, 0x60c3, 0x0010, 0x080c, 0x939b, 0x009e,
-	0x00de, 0x0005, 0x00d6, 0x0096, 0x0126, 0x2091, 0x8000, 0x080c,
-	0x8ea9, 0x20e9, 0x0000, 0x2001, 0x197b, 0x2003, 0x0000, 0x7814,
-	0x2048, 0xa814, 0x8003, 0x60c2, 0xa830, 0x20a8, 0xa860, 0x20e0,
-	0xa85c, 0x9080, 0x001b, 0x2098, 0x2001, 0x197b, 0x0016, 0x200c,
-	0x2001, 0x0001, 0x080c, 0x225a, 0x080c, 0xc848, 0x9006, 0x080c,
-	0x225a, 0x001e, 0xa804, 0x9005, 0x0110, 0x2048, 0x0c28, 0x04d9,
-	0x080c, 0x939b, 0x012e, 0x009e, 0x00de, 0x0005, 0x00d6, 0x0096,
-	0x0126, 0x2091, 0x8000, 0x080c, 0x8ef4, 0x20e9, 0x0000, 0x2001,
-	0x197b, 0x2003, 0x0000, 0x7814, 0x2048, 0xa86f, 0x0200, 0xa873,
-	0x0000, 0xa814, 0x8003, 0x60c2, 0xa830, 0x20a8, 0xa860, 0x20e0,
-	0xa85c, 0x9080, 0x001b, 0x2098, 0x2001, 0x197b, 0x0016, 0x200c,
-	0x080c, 0xc848, 0x001e, 0xa804, 0x9005, 0x0110, 0x2048, 0x0c60,
-	0x0051, 0x7814, 0x2048, 0x080c, 0x0f9d, 0x080c, 0x939b, 0x012e,
-	0x009e, 0x00de, 0x0005, 0x60c0, 0x8004, 0x9084, 0x0003, 0x9005,
-	0x0130, 0x9082, 0x0004, 0x20a3, 0x0000, 0x8000, 0x1de0, 0x0005,
-	0x080c, 0x8ea9, 0x7003, 0x7800, 0x7808, 0x8007, 0x700a, 0x60c3,
-	0x0008, 0x0804, 0x939b, 0x00d6, 0x00e6, 0x080c, 0x8ef4, 0x7814,
-	0x9084, 0xff00, 0x2073, 0x0200, 0x8e70, 0x8e70, 0x9095, 0x0010,
-	0x2272, 0x8e70, 0x2073, 0x0034, 0x8e70, 0x2069, 0x1805, 0x20a9,
-	0x0004, 0x2d76, 0x8d68, 0x8e70, 0x1f04, 0x8c59, 0x2069, 0x1801,
-	0x20a9, 0x0004, 0x2d76, 0x8d68, 0x8e70, 0x1f04, 0x8c62, 0x2069,
-	0x198b, 0x9086, 0xdf00, 0x0110, 0x2069, 0x19a5, 0x20a9, 0x001a,
-	0x9e86, 0x0260, 0x1148, 0x00c6, 0x2061, 0x0200, 0x6010, 0x8000,
-	0x6012, 0x00ce, 0x2071, 0x0240, 0x2d04, 0x8007, 0x2072, 0x8d68,
-	0x8e70, 0x1f04, 0x8c70, 0x60c3, 0x004c, 0x080c, 0x939b, 0x00ee,
-	0x00de, 0x0005, 0x080c, 0x8ea9, 0x7003, 0x6300, 0x7007, 0x0028,
-	0x7808, 0x700e, 0x60c3, 0x0008, 0x0804, 0x939b, 0x00d6, 0x0026,
-	0x0016, 0x080c, 0x8ef4, 0x7003, 0x0200, 0x7814, 0x700e, 0x00e6,
-	0x9ef0, 0x0004, 0x2009, 0x0001, 0x2011, 0x000c, 0x2073, 0x0800,
-	0x8e70, 0x2073, 0x0000, 0x00ee, 0x7206, 0x710a, 0x62c2, 0x080c,
-	0x939b, 0x001e, 0x002e, 0x00de, 0x0005, 0x2001, 0x1817, 0x2004,
-	0x609a, 0x0804, 0x939b, 0x080c, 0x8ea9, 0x7003, 0x5200, 0x2069,
-	0x185b, 0x6804, 0xd084, 0x0130, 0x6828, 0x0016, 0x080c, 0x26a3,
-	0x710e, 0x001e, 0x20a9, 0x0004, 0x20e1, 0x0001, 0x2099, 0x1805,
-	0x20e9, 0x0000, 0x20a1, 0x0250, 0x4003, 0x20a9, 0x0004, 0x2099,
-	0x1801, 0x20a1, 0x0254, 0x4003, 0x080c, 0x9dae, 0x1120, 0xb8a0,
-	0x9082, 0x007f, 0x0248, 0x2001, 0x181e, 0x2004, 0x7032, 0x2001,
-	0x181f, 0x2004, 0x7036, 0x0030, 0x2001, 0x1817, 0x2004, 0x9084,
-	0x00ff, 0x7036, 0x60c3, 0x001c, 0x0804, 0x939b, 0x080c, 0x8ea9,
-	0x7003, 0x0500, 0x080c, 0x9dae, 0x1120, 0xb8a0, 0x9082, 0x007f,
-	0x0248, 0x2001, 0x181e, 0x2004, 0x700a, 0x2001, 0x181f, 0x2004,
-	0x700e, 0x0030, 0x2001, 0x1817, 0x2004, 0x9084, 0x00ff, 0x700e,
-	0x20a9, 0x0004, 0x20e1, 0x0001, 0x2099, 0x1805, 0x20e9, 0x0000,
-	0x20a1, 0x0250, 0x4003, 0x60c3, 0x0010, 0x0804, 0x939b, 0x080c,
-	0x8ea9, 0x9006, 0x080c, 0x6544, 0xb8a0, 0x9086, 0x007e, 0x1130,
-	0x7003, 0x0400, 0x620c, 0xc2b4, 0x620e, 0x0058, 0x7814, 0x0096,
-	0x904d, 0x0120, 0x9006, 0xa89a, 0xa8a6, 0xa8aa, 0x009e, 0x7003,
-	0x0300, 0xb8a0, 0x9086, 0x007e, 0x1904, 0x8d8a, 0x00d6, 0x2069,
-	0x1944, 0x2001, 0x1836, 0x2004, 0xd0a4, 0x0178, 0x6800, 0x700a,
-	0x6808, 0x9084, 0x2000, 0x7012, 0x680c, 0x7016, 0x701f, 0x2710,
-	0x6818, 0x7022, 0x681c, 0x7026, 0x0080, 0x6800, 0x700a, 0x6804,
-	0x700e, 0x6808, 0x080c, 0x6faa, 0x1118, 0x9084, 0x37ff, 0x0010,
-	0x9084, 0x3fff, 0x7012, 0x680c, 0x7016, 0x00de, 0x20a9, 0x0004,
-	0x20e1, 0x0001, 0x2099, 0x1805, 0x20e9, 0x0000, 0x20a1, 0x0256,
-	0x4003, 0x20a9, 0x0004, 0x2099, 0x1801, 0x20a1, 0x025a, 0x4003,
-	0x00d6, 0x080c, 0x9c22, 0x2069, 0x194c, 0x2071, 0x024e, 0x6800,
-	0xc0dd, 0x7002, 0x080c, 0x539e, 0xd0e4, 0x0110, 0x680c, 0x700e,
-	0x00de, 0x04a0, 0x2001, 0x1836, 0x2004, 0xd0a4, 0x0168, 0x0016,
-	0x2009, 0x0002, 0x60e0, 0x9106, 0x0130, 0x2100, 0x60e3, 0x0000,
-	0x080c, 0x26e4, 0x61e2, 0x001e, 0x20e1, 0x0001, 0x2099, 0x1944,
-	0x20e9, 0x0000, 0x20a1, 0x024e, 0x20a9, 0x0008, 0x4003, 0x20a9,
-	0x0004, 0x2099, 0x1805, 0x20a1, 0x0256, 0x4003, 0x20a9, 0x0004,
-	0x2099, 0x1801, 0x20a1, 0x025a, 0x4003, 0x080c, 0x9c22, 0x20a1,
-	0x024e, 0x20a9, 0x0008, 0x2099, 0x194c, 0x4003, 0x60c3, 0x0074,
-	0x0804, 0x939b, 0x080c, 0x8ea9, 0x7003, 0x2010, 0x7007, 0x0014,
-	0x700b, 0x0800, 0x700f, 0x2000, 0x9006, 0x00f6, 0x2079, 0x185b,
-	0x7904, 0x00fe, 0xd1ac, 0x1110, 0x9085, 0x0020, 0x0010, 0x9085,
-	0x0010, 0x9085, 0x0002, 0x00d6, 0x0804, 0x8e59, 0x7026, 0x60c3,
-	0x0014, 0x0804, 0x939b, 0x080c, 0x8ea9, 0x7003, 0x5000, 0x0804,
-	0x8d39, 0x080c, 0x8ea9, 0x7003, 0x2110, 0x7007, 0x0014, 0x60c3,
-	0x0014, 0x0804, 0x939b, 0x080c, 0x8eeb, 0x0010, 0x080c, 0x8ef4,
-	0x7003, 0x0200, 0x60c3, 0x0004, 0x0804, 0x939b, 0x080c, 0x8ef4,
-	0x7003, 0x0100, 0x700b, 0x0003, 0x700f, 0x2a00, 0x60c3, 0x0008,
-	0x0804, 0x939b, 0x080c, 0x8ef4, 0x7003, 0x0200, 0x0804, 0x8d39,
-	0x080c, 0x8ef4, 0x7003, 0x0100, 0x782c, 0x9005, 0x0110, 0x700a,
-	0x0010, 0x700b, 0x0003, 0x7814, 0x700e, 0x60c3, 0x0008, 0x0804,
-	0x939b, 0x00d6, 0x080c, 0x8ef4, 0x7003, 0x0210, 0x7007, 0x0014,
-	0x700b, 0x0800, 0xb894, 0x9086, 0x0014, 0x1198, 0xb99c, 0x9184,
-	0x0030, 0x0190, 0xb998, 0x9184, 0xc000, 0x1140, 0xd1ec, 0x0118,
-	0x700f, 0x2100, 0x0058, 0x700f, 0x0100, 0x0040, 0x700f, 0x0400,
-	0x0028, 0x700f, 0x0700, 0x0010, 0x700f, 0x0800, 0x00f6, 0x2079,
-	0x185b, 0x7904, 0x00fe, 0xd1ac, 0x1110, 0x9085, 0x0020, 0x0010,
-	0x9085, 0x0010, 0x2009, 0x187d, 0x210c, 0xd184, 0x1110, 0x9085,
-	0x0002, 0x0026, 0x2009, 0x187b, 0x210c, 0xd1e4, 0x0150, 0xc0c5,
-	0xbabc, 0xd28c, 0x1108, 0xc0cd, 0x9094, 0x0030, 0x9296, 0x0010,
-	0x0140, 0xd1ec, 0x0130, 0x9094, 0x0030, 0x9296, 0x0010, 0x0108,
-	0xc0bd, 0x002e, 0x7026, 0x60c3, 0x0014, 0x00de, 0x0804, 0x939b,
-	0x080c, 0x8ef4, 0x7003, 0x0210, 0x7007, 0x0014, 0x700f, 0x0100,
-	0x60c3, 0x0014, 0x0804, 0x939b, 0x080c, 0x8ef4, 0x7003, 0x0200,
-	0x0804, 0x8cbf, 0x080c, 0x8ef4, 0x7003, 0x0100, 0x700b, 0x0003,
-	0x700f, 0x2a00, 0x60c3, 0x0008, 0x0804, 0x939b, 0x080c, 0x8ef4,
-	0x7003, 0x0100, 0x700b, 0x000b, 0x60c3, 0x0008, 0x0804, 0x939b,
-	0x0026, 0x00d6, 0x0036, 0x0046, 0x2019, 0x3200, 0x2021, 0x0800,
-	0x0040, 0x0026, 0x00d6, 0x0036, 0x0046, 0x2019, 0x2200, 0x2021,
-	0x0100, 0x080c, 0x9c37, 0xb810, 0x9305, 0x7002, 0xb814, 0x7006,
-	0x2069, 0x1800, 0x6878, 0x700a, 0x687c, 0x700e, 0x9485, 0x0029,
-	0x7012, 0x004e, 0x003e, 0x00de, 0x080c, 0x9389, 0x721a, 0x9f95,
-	0x0000, 0x7222, 0x7027, 0xffff, 0x2071, 0x024c, 0x002e, 0x0005,
-	0x0026, 0x080c, 0x9c37, 0x7003, 0x02ff, 0x7007, 0xfffc, 0x00d6,
-	0x2069, 0x1800, 0x6878, 0x700a, 0x687c, 0x700e, 0x00de, 0x7013,
-	0x2029, 0x0c10, 0x7003, 0x0100, 0x7007, 0x0000, 0x700b, 0xfc02,
-	0x700f, 0x0000, 0x0005, 0x0026, 0x00d6, 0x0036, 0x0046, 0x2019,
-	0x3300, 0x2021, 0x0800, 0x0040, 0x0026, 0x00d6, 0x0036, 0x0046,
-	0x2019, 0x2300, 0x2021, 0x0100, 0x080c, 0x9c37, 0xb810, 0x9305,
-	0x7002, 0xb814, 0x7006, 0x2069, 0x1800, 0xb810, 0x9005, 0x1140,
-	0xb814, 0x9005, 0x1128, 0x700b, 0x00ff, 0x700f, 0xfffe, 0x0020,
-	0x6878, 0x700a, 0x687c, 0x700e, 0x0000, 0x9485, 0x0098, 0x7012,
-	0x004e, 0x003e, 0x00de, 0x080c, 0x9389, 0x721a, 0x7a08, 0x7222,
-	0x2f10, 0x7226, 0x2071, 0x024c, 0x002e, 0x0005, 0x080c, 0x9389,
-	0x721a, 0x7a08, 0x7222, 0x7814, 0x7026, 0x2071, 0x024c, 0x002e,
-	0x0005, 0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x2069, 0x0200,
-	0x2071, 0x0240, 0x6004, 0x908a, 0x0085, 0x0a0c, 0x0db4, 0x908a,
-	0x0092, 0x1a0c, 0x0db4, 0x6110, 0x2158, 0xb9b0, 0x2c78, 0x2061,
-	0x0100, 0x619a, 0x9082, 0x0085, 0x0033, 0x00fe, 0x00ee, 0x00de,
-	0x00ce, 0x00be, 0x0005, 0x8f62, 0x8f71, 0x8f7c, 0x8f60, 0x8f60,
-	0x8f60, 0x8f62, 0x8f60, 0x8f60, 0x8f60, 0x8f60, 0x8f60, 0x8f60,
-	0x080c, 0x0db4, 0x0411, 0x60c3, 0x0000, 0x0026, 0x080c, 0x29d7,
-	0x0228, 0x2011, 0x0101, 0x2204, 0xc0c5, 0x2012, 0x002e, 0x0804,
-	0x939b, 0x0431, 0x7808, 0x700a, 0x7814, 0x700e, 0x7017, 0xffff,
-	0x60c3, 0x000c, 0x0804, 0x939b, 0x0479, 0x7003, 0x0003, 0x7007,
-	0x0300, 0x60c3, 0x0004, 0x0804, 0x939b, 0x0026, 0x080c, 0x9c37,
-	0xb810, 0x9085, 0x8100, 0x7002, 0xb814, 0x7006, 0x2069, 0x1800,
-	0x6878, 0x700a, 0x687c, 0x700e, 0x7013, 0x0009, 0x0804, 0x8ec4,
-	0x0026, 0x080c, 0x9c37, 0xb810, 0x9085, 0x8400, 0x7002, 0xb814,
-	0x7006, 0x2069, 0x1800, 0x6878, 0x700a, 0x687c, 0x700e, 0x2001,
-	0x0099, 0x7012, 0x0804, 0x8f26, 0x0026, 0x080c, 0x9c37, 0xb810,
-	0x9085, 0x8500, 0x7002, 0xb814, 0x7006, 0x2069, 0x1800, 0x6878,
-	0x700a, 0x687c, 0x700e, 0x2001, 0x0099, 0x7012, 0x0804, 0x8f26,
-	0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x2c78, 0x2069, 0x0200,
-	0x2071, 0x0240, 0x7804, 0x908a, 0x0040, 0x0a0c, 0x0db4, 0x908a,
-	0x0054, 0x1a0c, 0x0db4, 0x7910, 0x2158, 0xb9b0, 0x2061, 0x0100,
-	0x619a, 0x9082, 0x0040, 0x0033, 0x00fe, 0x00ee, 0x00de, 0x00ce,
-	0x00be, 0x0005, 0x8ff7, 0x90b3, 0x9086, 0x91d5, 0x8ff5, 0x8ff5,
-	0x8ff5, 0x8ff5, 0x8ff5, 0x8ff5, 0x8ff5, 0x9777, 0x977f, 0x9787,
-	0x978f, 0x8ff5, 0x9b7f, 0x8ff5, 0x976f, 0x080c, 0x0db4, 0x0096,
-	0x780b, 0xffff, 0x080c, 0x9062, 0x7914, 0x2148, 0xa978, 0x7956,
-	0xae64, 0x96b4, 0x00ff, 0x9686, 0x0008, 0x1148, 0xa8b4, 0x7032,
-	0xa8b8, 0x7036, 0xa8bc, 0x703a, 0xa8c0, 0x703e, 0x0008, 0x7132,
-	0xa97c, 0x9184, 0x000f, 0x1118, 0x2001, 0x0005, 0x0040, 0xd184,
-	0x0118, 0x2001, 0x0004, 0x0018, 0x9084, 0x0006, 0x8004, 0x2010,
-	0x785c, 0x9084, 0x00ff, 0x8007, 0x9205, 0x7042, 0xd1ac, 0x0158,
-	0x7047, 0x0002, 0x9686, 0x0008, 0x1118, 0x080c, 0x1789, 0x0010,
-	0x080c, 0x164a, 0x0050, 0xd1b4, 0x0118, 0x7047, 0x0001, 0x0028,
-	0x7047, 0x0000, 0x9016, 0x2230, 0x0010, 0xaab0, 0xaeac, 0x726a,
-	0x766e, 0x20a9, 0x0008, 0x20e9, 0x0000, 0xa860, 0x20e0, 0xa85c,
-	0x9080, 0x0023, 0x2098, 0x20a1, 0x0252, 0x2069, 0x0200, 0x6813,
-	0x0018, 0x4003, 0x6813, 0x0008, 0x60c3, 0x0020, 0x6017, 0x0009,
-	0x2001, 0x19db, 0x2003, 0x07d0, 0x2001, 0x19da, 0x2003, 0x0009,
-	0x009e, 0x0005, 0x6813, 0x0008, 0xba8c, 0x8210, 0xb8bc, 0xd084,
-	0x0128, 0x7a46, 0x7b14, 0x7b4a, 0x722e, 0x732a, 0x9294, 0x00ff,
-	0xba8e, 0x8217, 0x721a, 0xba10, 0x9295, 0x0600, 0x7202, 0xba14,
-	0x7206, 0x2069, 0x1800, 0x6a78, 0x720a, 0x6a7c, 0x720e, 0x7013,
-	0x0829, 0x2f10, 0x7222, 0x7027, 0xffff, 0x0005, 0x00d6, 0x0096,
-	0x0081, 0x7814, 0x2048, 0xa890, 0x7002, 0xa88c, 0x7006, 0xa8b0,
-	0x700a, 0xa8ac, 0x700e, 0x60c3, 0x000c, 0x009e, 0x00de, 0x0804,
-	0x939b, 0x6813, 0x0008, 0xb810, 0x9085, 0x0500, 0x7002, 0xb814,
+	0x89ff, 0x1168, 0x600f, 0x0000, 0x6014, 0x0096, 0x2048, 0x080c,
+	0xbe35, 0x0110, 0x080c, 0xd830, 0x009e, 0x080c, 0xa113, 0x080c,
+	0x9a4e, 0x88ff, 0x1190, 0x00ce, 0x0804, 0x9a69, 0x2c78, 0x600c,
+	0x2060, 0x0804, 0x9a69, 0x9006, 0x012e, 0x000e, 0x006e, 0x007e,
+	0x00ce, 0x00de, 0x00ee, 0x00fe, 0x0005, 0x601b, 0x0000, 0x00ce,
+	0x98c5, 0x0001, 0x0c88, 0x00f6, 0x00e6, 0x00d6, 0x0096, 0x00c6,
+	0x0066, 0x0026, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071, 0x19bf,
+	0x7638, 0x2660, 0x2678, 0x8cff, 0x0904, 0x9b67, 0x6020, 0x9086,
+	0x0006, 0x1904, 0x9b62, 0x87ff, 0x0128, 0x2700, 0x9c06, 0x1904,
+	0x9b62, 0x0040, 0x6010, 0x9b06, 0x15e8, 0x85ff, 0x0118, 0x6054,
+	0x9106, 0x15c0, 0x703c, 0x9c06, 0x1168, 0x0036, 0x2019, 0x0001,
+	0x080c, 0x999d, 0x7033, 0x0000, 0x9006, 0x703e, 0x7042, 0x7046,
+	0x704a, 0x003e, 0x7038, 0x9c36, 0x1110, 0x660c, 0x763a, 0x7034,
+	0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00, 0x7036, 0x0010,
+	0x7037, 0x0000, 0x660c, 0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e,
+	0x0008, 0x2678, 0x600f, 0x0000, 0x6014, 0x2048, 0x080c, 0xbe35,
+	0x0110, 0x080c, 0xd830, 0x080c, 0xa113, 0x87ff, 0x1198, 0x00ce,
+	0x0804, 0x9b13, 0x2c78, 0x600c, 0x2060, 0x0804, 0x9b13, 0x9006,
+	0x012e, 0x000e, 0x002e, 0x006e, 0x00ce, 0x009e, 0x00de, 0x00ee,
+	0x00fe, 0x0005, 0x601b, 0x0000, 0x00ce, 0x97bd, 0x0001, 0x0c80,
+	0x00e6, 0x2071, 0x19bf, 0x2001, 0x1800, 0x2004, 0x9086, 0x0002,
+	0x1118, 0x7007, 0x0005, 0x0010, 0x7007, 0x0000, 0x00ee, 0x0005,
+	0x00f6, 0x00e6, 0x00c6, 0x0066, 0x0026, 0x0006, 0x0126, 0x2091,
+	0x8000, 0x2071, 0x19bf, 0x2c10, 0x7638, 0x2660, 0x2678, 0x8cff,
+	0x0540, 0x2200, 0x9c06, 0x1508, 0x7038, 0x9c36, 0x1110, 0x660c,
+	0x763a, 0x7034, 0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00,
+	0x7036, 0x0010, 0x7037, 0x0000, 0x660c, 0x2c00, 0x9f06, 0x0110,
+	0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000, 0x6004, 0x9086, 0x0040,
+	0x090c, 0x8b04, 0x9085, 0x0001, 0x0020, 0x2c78, 0x600c, 0x2060,
+	0x08b0, 0x012e, 0x000e, 0x002e, 0x006e, 0x00ce, 0x00ee, 0x00fe,
+	0x0005, 0x0096, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0026,
+	0x0006, 0x0126, 0x2091, 0x8000, 0x2071, 0x19bf, 0x760c, 0x2660,
+	0x2678, 0x8cff, 0x0904, 0x9c5e, 0x6010, 0x00b6, 0x2058, 0xb8a0,
+	0x00be, 0x9206, 0x1904, 0x9c59, 0x7024, 0x9c06, 0x1520, 0x2069,
+	0x0100, 0x68c0, 0x9005, 0x0904, 0x9c30, 0x080c, 0x9656, 0x68c3,
+	0x0000, 0x080c, 0x9b78, 0x7027, 0x0000, 0x0036, 0x2069, 0x0140,
+	0x6b04, 0x9384, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2c88,
+	0x9006, 0x080c, 0x2c88, 0x2069, 0x0100, 0x6824, 0xd084, 0x0110,
+	0x6827, 0x0001, 0x003e, 0x700c, 0x9c36, 0x1110, 0x660c, 0x760e,
+	0x7008, 0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00, 0x700a,
+	0x0010, 0x700b, 0x0000, 0x660c, 0x0066, 0x2c00, 0x9f06, 0x0110,
+	0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000, 0x080c, 0xc02e, 0x1180,
+	0x080c, 0x31b4, 0x080c, 0xc03f, 0x1518, 0x080c, 0xaa81, 0x0400,
+	0x080c, 0x9b78, 0x6824, 0xd084, 0x09b0, 0x6827, 0x0001, 0x0898,
+	0x080c, 0xc03f, 0x1118, 0x080c, 0xaa81, 0x0090, 0x6014, 0x2048,
+	0x080c, 0xbe35, 0x0168, 0x6020, 0x9086, 0x0003, 0x1508, 0xa867,
+	0x0103, 0xab7a, 0xa877, 0x0000, 0x080c, 0x6adc, 0x080c, 0xc022,
+	0x080c, 0xc2ab, 0x080c, 0xa113, 0x080c, 0x9a4e, 0x00ce, 0x0804,
+	0x9bd9, 0x2c78, 0x600c, 0x2060, 0x0804, 0x9bd9, 0x012e, 0x000e,
+	0x002e, 0x006e, 0x00ce, 0x00de, 0x00ee, 0x00fe, 0x009e, 0x0005,
+	0x6020, 0x9086, 0x0006, 0x1d20, 0x080c, 0xd830, 0x0c08, 0x00d6,
+	0x080c, 0x9179, 0x7003, 0x0200, 0x7007, 0x0014, 0x60c3, 0x0014,
+	0x20e1, 0x0001, 0x2099, 0x1961, 0x20e9, 0x0000, 0x20a1, 0x0250,
+	0x20a9, 0x0004, 0x4003, 0x7023, 0x0004, 0x7027, 0x7878, 0x080c,
+	0x962a, 0x00de, 0x0005, 0x080c, 0x9179, 0x700b, 0x0800, 0x7814,
+	0x9084, 0xff00, 0x700e, 0x7814, 0x9084, 0x00ff, 0x7022, 0x782c,
+	0x7026, 0x7858, 0x9084, 0x00ff, 0x9085, 0x0200, 0x7002, 0x7858,
+	0x9084, 0xff00, 0x8007, 0x7006, 0x60c2, 0x0804, 0x962a, 0x00b6,
+	0x00d6, 0x0016, 0x00d6, 0x2f68, 0x2009, 0x0035, 0x080c, 0xc4b1,
+	0x00de, 0x1904, 0x9d0c, 0x080c, 0x912e, 0x7003, 0x1300, 0x782c,
+	0x080c, 0x9e12, 0x2068, 0x6820, 0x9086, 0x0003, 0x0560, 0x7810,
+	0x2058, 0xbaa0, 0x080c, 0xa062, 0x11d8, 0x9286, 0x007e, 0x1128,
+	0x700b, 0x00ff, 0x700f, 0xfffe, 0x0498, 0x9286, 0x007f, 0x1128,
+	0x700b, 0x00ff, 0x700f, 0xfffd, 0x0458, 0x9284, 0xff80, 0x0180,
+	0x9286, 0x0080, 0x1128, 0x700b, 0x00ff, 0x700f, 0xfffc, 0x0400,
+	0x92d8, 0x1000, 0x2b5c, 0xb810, 0x700a, 0xb814, 0x700e, 0x00c0,
+	0x6098, 0x700e, 0x00a8, 0x080c, 0xa062, 0x1130, 0x7810, 0x2058,
+	0xb8a0, 0x9082, 0x007e, 0x0250, 0x00d6, 0x2069, 0x181e, 0x2d04,
+	0x700a, 0x8d68, 0x2d04, 0x700e, 0x00de, 0x0010, 0x6034, 0x700e,
+	0x7838, 0x7012, 0x783c, 0x7016, 0x60c3, 0x000c, 0x001e, 0x00de,
+	0x080c, 0x962a, 0x00be, 0x0005, 0x781b, 0x0001, 0x7803, 0x0006,
+	0x001e, 0x00de, 0x00be, 0x0005, 0x792c, 0x9180, 0x0008, 0x200c,
+	0x9186, 0x0006, 0x01c0, 0x9186, 0x0003, 0x0904, 0x9d87, 0x9186,
+	0x0005, 0x0904, 0x9d6f, 0x9186, 0x0004, 0x05d8, 0x9186, 0x0008,
+	0x0904, 0x9d78, 0x7807, 0x0037, 0x782f, 0x0003, 0x7817, 0x1700,
+	0x080c, 0x9def, 0x0005, 0x080c, 0x9db0, 0x00d6, 0x0026, 0x792c,
+	0x2168, 0x2009, 0x4000, 0x6800, 0x0002, 0x9d50, 0x9d5b, 0x9d52,
+	0x9d5b, 0x9d57, 0x9d50, 0x9d50, 0x9d5b, 0x9d5b, 0x9d5b, 0x9d5b,
+	0x9d50, 0x9d50, 0x9d50, 0x9d50, 0x9d50, 0x9d5b, 0x9d50, 0x9d5b,
+	0x080c, 0x0dfa, 0x6824, 0xd0e4, 0x0110, 0xd0cc, 0x0110, 0x900e,
+	0x0010, 0x2009, 0x2000, 0x682c, 0x7022, 0x6830, 0x7026, 0x0804,
+	0x9da9, 0x080c, 0x9db0, 0x00d6, 0x0026, 0x792c, 0x2168, 0x2009,
+	0x4000, 0x6a00, 0x9286, 0x0002, 0x1108, 0x900e, 0x04d0, 0x080c,
+	0x9db0, 0x00d6, 0x0026, 0x792c, 0x2168, 0x2009, 0x4000, 0x0488,
+	0x04b9, 0x00d6, 0x0026, 0x792c, 0x2168, 0x2009, 0x4000, 0x9286,
+	0x0005, 0x0118, 0x9286, 0x0002, 0x1108, 0x900e, 0x0410, 0x0441,
+	0x00d6, 0x0026, 0x792c, 0x2168, 0x6814, 0x6924, 0xc185, 0x6926,
+	0x0096, 0x2048, 0xa9ac, 0xa834, 0x9112, 0xa9b0, 0xa838, 0x009e,
+	0x9103, 0x7022, 0x7226, 0x792c, 0x9180, 0x0000, 0x2004, 0x908e,
+	0x0002, 0x0130, 0x908e, 0x0004, 0x0118, 0x2009, 0x4000, 0x0008,
+	0x900e, 0x712a, 0x60c3, 0x0018, 0x002e, 0x00de, 0x0804, 0x962a,
+	0x00b6, 0x0036, 0x0046, 0x0056, 0x0066, 0x080c, 0x9179, 0x9006,
+	0x7003, 0x0200, 0x7938, 0x710a, 0x793c, 0x710e, 0x7810, 0x2058,
+	0xb8a0, 0x080c, 0xa062, 0x1118, 0x9092, 0x007e, 0x0268, 0x00d6,
+	0x2069, 0x181e, 0x2d2c, 0x8d68, 0x2d34, 0x90d8, 0x1000, 0x2b5c,
+	0xbb10, 0xbc14, 0x00de, 0x0028, 0x901e, 0x6498, 0x2029, 0x0000,
+	0x6634, 0x782c, 0x9080, 0x0008, 0x2004, 0x9086, 0x0003, 0x1128,
+	0x7512, 0x7616, 0x731a, 0x741e, 0x0020, 0x7312, 0x7416, 0x751a,
+	0x761e, 0x006e, 0x005e, 0x004e, 0x003e, 0x00be, 0x0005, 0x080c,
+	0x9179, 0x7003, 0x0100, 0x782c, 0x700a, 0x7814, 0x700e, 0x700e,
+	0x60c3, 0x0008, 0x0804, 0x962a, 0x080c, 0x9125, 0x7003, 0x1400,
+	0x7838, 0x700a, 0x0079, 0x783c, 0x700e, 0x782c, 0x7012, 0x7830,
+	0x7016, 0x7834, 0x9084, 0x00ff, 0x8007, 0x701a, 0x60c3, 0x0010,
+	0x0804, 0x962a, 0x00e6, 0x2071, 0x0240, 0x0006, 0x00f6, 0x2078,
+	0x7810, 0x00b6, 0x2058, 0xb8bc, 0xd084, 0x0120, 0x7844, 0x702a,
+	0x7848, 0x702e, 0x00be, 0x00fe, 0x000e, 0x00ee, 0x0005, 0x080c,
+	0x9170, 0x7003, 0x0100, 0x782c, 0x700a, 0x7814, 0x700e, 0x60c3,
+	0x0008, 0x0804, 0x962a, 0x0021, 0x60c3, 0x0000, 0x0804, 0x962a,
+	0x00d6, 0x080c, 0x9eeb, 0xb810, 0x9085, 0x0300, 0x7002, 0xb814,
 	0x7006, 0x2069, 0x1800, 0x6878, 0x700a, 0x687c, 0x700e, 0x7013,
-	0x0889, 0x080c, 0x9389, 0x721a, 0x7a08, 0x7222, 0x2f10, 0x7226,
-	0x2071, 0x024c, 0x0005, 0x00d6, 0x0096, 0x080c, 0x91b3, 0x7814,
-	0x2048, 0x080c, 0xbb39, 0x1130, 0x7814, 0x9084, 0x0700, 0x8007,
-	0x0033, 0x0010, 0x9006, 0x001b, 0x009e, 0x00de, 0x0005, 0x90d1,
-	0x913a, 0x914a, 0x9170, 0x917c, 0x918d, 0x9195, 0x90cf, 0x080c,
-	0x0db4, 0x0016, 0x0036, 0xa97c, 0x918c, 0x0003, 0x0118, 0x9186,
-	0x0003, 0x1198, 0xaba8, 0x7824, 0xd0cc, 0x1168, 0x7316, 0xa898,
-	0x701a, 0xa894, 0x701e, 0x003e, 0x001e, 0x2001, 0x1989, 0x2004,
-	0x60c2, 0x0804, 0x939b, 0xc3e5, 0x0c88, 0x9186, 0x0001, 0x190c,
-	0x0db4, 0xaba8, 0x7824, 0xd0cc, 0x1904, 0x9137, 0x7316, 0xa898,
-	0x701a, 0xa894, 0x701e, 0xa8a4, 0x7026, 0xa8ac, 0x702e, 0x2009,
-	0x0018, 0x9384, 0x0300, 0x0570, 0xd3c4, 0x0110, 0xa8ac, 0x9108,
-	0xd3cc, 0x0110, 0xa8a4, 0x9108, 0x6810, 0x9085, 0x0010, 0x6812,
-	0x2011, 0x0258, 0x20e9, 0x0000, 0x22a0, 0x0156, 0x20a9, 0x0008,
-	0xa860, 0x20e0, 0xa85c, 0x9080, 0x002c, 0x2098, 0x4003, 0x6810,
-	0x8000, 0x6812, 0x2011, 0x0240, 0x22a0, 0x20a9, 0x0005, 0x4003,
-	0x6810, 0xc084, 0x6812, 0x015e, 0x9184, 0x0003, 0x0118, 0x2019,
-	0x0245, 0x201a, 0x61c2, 0x003e, 0x001e, 0x0804, 0x939b, 0xc3e5,
-	0x0804, 0x90f6, 0x2011, 0x0008, 0x2001, 0x180f, 0x2004, 0xd0a4,
-	0x0110, 0x2011, 0x0028, 0x7824, 0xd0cc, 0x1110, 0x7216, 0x0470,
-	0x0ce8, 0xc2e5, 0x2011, 0x0302, 0x0016, 0x782c, 0x701a, 0x7930,
-	0x711e, 0x9105, 0x0108, 0xc2dd, 0x001e, 0x7824, 0xd0cc, 0x0108,
-	0xc2e5, 0x7216, 0x7027, 0x0012, 0x702f, 0x0008, 0x7043, 0x7000,
-	0x7047, 0x0500, 0x704f, 0x000a, 0x2069, 0x0200, 0x6813, 0x0009,
-	0x2071, 0x0240, 0x700b, 0x2500, 0x60c3, 0x0032, 0x0804, 0x939b,
-	0x2011, 0x0028, 0x7824, 0xd0cc, 0x1128, 0x7216, 0x60c3, 0x0018,
-	0x0804, 0x939b, 0x0cd0, 0xc2e5, 0x2011, 0x0100, 0x7824, 0xd0cc,
-	0x0108, 0xc2e5, 0x7216, 0x702f, 0x0008, 0x7858, 0x9084, 0x00ff,
-	0x7036, 0x60c3, 0x0020, 0x0804, 0x939b, 0x2011, 0x0008, 0x7824,
-	0xd0cc, 0x0108, 0xc2e5, 0x7216, 0x0c08, 0x0036, 0x7b14, 0x9384,
-	0xff00, 0x7816, 0x9384, 0x00ff, 0x8001, 0x1138, 0x7824, 0xd0cc,
-	0x0108, 0xc2e5, 0x7216, 0x003e, 0x0888, 0x0046, 0x2021, 0x0800,
-	0x0006, 0x7824, 0xd0cc, 0x000e, 0x0108, 0xc4e5, 0x7416, 0x004e,
-	0x701e, 0x003e, 0x0818, 0x00d6, 0x6813, 0x0008, 0xb810, 0x9085,
-	0x0700, 0x7002, 0xb814, 0x7006, 0x2069, 0x1800, 0x6878, 0x700a,
-	0x687c, 0x700e, 0x7824, 0xd0cc, 0x1168, 0x7013, 0x0898, 0x080c,
-	0x9389, 0x721a, 0x7a08, 0x7222, 0x2f10, 0x7226, 0x2071, 0x024c,
-	0x00de, 0x0005, 0x7013, 0x0889, 0x0c90, 0x0016, 0x7814, 0x9084,
-	0x0700, 0x8007, 0x0013, 0x001e, 0x0005, 0x91e5, 0x91e5, 0x91e7,
-	0x91e5, 0x91e5, 0x91e5, 0x9201, 0x91e5, 0x080c, 0x0db4, 0x7914,
-	0x918c, 0x08ff, 0x918d, 0xf600, 0x7916, 0x2009, 0x0003, 0x00b9,
-	0x2069, 0x185b, 0x6804, 0xd0bc, 0x0130, 0x682c, 0x9084, 0x00ff,
-	0x8007, 0x7032, 0x0010, 0x7033, 0x3f00, 0x60c3, 0x0001, 0x0804,
-	0x939b, 0x2009, 0x0003, 0x0019, 0x7033, 0x7f00, 0x0cb0, 0x0016,
-	0x080c, 0x9c37, 0x001e, 0xb810, 0x9085, 0x0100, 0x7002, 0xb814,
-	0x7006, 0x2069, 0x1800, 0x6a78, 0x720a, 0x6a7c, 0x720e, 0x7013,
-	0x0888, 0x918d, 0x0008, 0x7116, 0x080c, 0x9389, 0x721a, 0x7a08,
-	0x7222, 0x2f10, 0x7226, 0x0005, 0x00b6, 0x0096, 0x00e6, 0x00d6,
-	0x00c6, 0x0056, 0x0046, 0x0036, 0x2061, 0x0100, 0x2071, 0x1800,
-	0x7810, 0x2058, 0xb8a0, 0x2028, 0xb910, 0xba14, 0x7378, 0x747c,
-	0x7820, 0x90be, 0x0006, 0x0904, 0x92f8, 0x90be, 0x000a, 0x1904,
-	0x92b4, 0xb8b0, 0x609e, 0x7814, 0x2048, 0xa87c, 0xd0fc, 0x0558,
-	0xaf90, 0x9784, 0xff00, 0x9105, 0x6062, 0x873f, 0x9784, 0xff00,
-	0x0006, 0x7814, 0x2048, 0xa878, 0xc0fc, 0x9005, 0x000e, 0x1160,
-	0xaf94, 0x87ff, 0x0198, 0x2039, 0x0098, 0x9705, 0x6072, 0x7808,
-	0x6082, 0x2f00, 0x6086, 0x0038, 0x9185, 0x2200, 0x6062, 0x6073,
-	0x0129, 0x6077, 0x0000, 0xb8b0, 0x609e, 0x0050, 0x2039, 0x0029,
-	0x9705, 0x6072, 0x0cc0, 0x9185, 0x0200, 0x6062, 0x6073, 0x2029,
-	0xa87c, 0xd0fc, 0x0118, 0xaf94, 0x87ff, 0x1120, 0x2f00, 0x6082,
-	0x7808, 0x6086, 0x6266, 0x636a, 0x646e, 0x6077, 0x0000, 0xb88c,
-	0x8000, 0x9084, 0x00ff, 0xb88e, 0x8007, 0x607a, 0x607f, 0x0000,
-	0xa838, 0x608a, 0xa834, 0x608e, 0xa848, 0x60c6, 0xa844, 0x60ca,
-	0xb86c, 0x60ce, 0x60af, 0x95d5, 0x60d7, 0x0000, 0x080c, 0x9c1c,
-	0x2009, 0x07d0, 0x60c4, 0x9084, 0xfff0, 0x9005, 0x0110, 0x2009,
-	0x1b58, 0x080c, 0x80c4, 0x003e, 0x004e, 0x005e, 0x00ce, 0x00de,
-	0x00ee, 0x009e, 0x00be, 0x0005, 0x7804, 0x9086, 0x0040, 0x0904,
-	0x9334, 0x9185, 0x0100, 0x6062, 0x6266, 0x636a, 0x646e, 0x6073,
-	0x0809, 0x6077, 0x0008, 0x60af, 0x95d5, 0x60d7, 0x0000, 0xb88c,
-	0x8000, 0x9084, 0x00ff, 0xb88e, 0x8007, 0x607a, 0x607f, 0x0000,
-	0x2f00, 0x6082, 0x7808, 0x6086, 0x7814, 0x2048, 0xa838, 0x608a,
-	0xa834, 0x608e, 0xa848, 0x60c6, 0xa844, 0x60ca, 0xb86c, 0x60ce,
-	0xbab0, 0x629e, 0x080c, 0x9c1c, 0x2009, 0x07d0, 0x60c4, 0x9084,
-	0xfff0, 0x9005, 0x0110, 0x2009, 0x1b58, 0x080c, 0x80c4, 0x003e,
-	0x004e, 0x005e, 0x00ce, 0x00de, 0x00ee, 0x009e, 0x00be, 0x0005,
-	0x7814, 0x2048, 0xa87c, 0x9084, 0x0003, 0x9086, 0x0002, 0x0904,
-	0x9350, 0x9185, 0x0100, 0x6062, 0x6266, 0x636a, 0x646e, 0x6073,
-	0x0880, 0x6077, 0x0008, 0xb88c, 0x8000, 0x9084, 0x00ff, 0xb88e,
-	0x8007, 0x607a, 0x7838, 0x607e, 0x2f00, 0x6086, 0x7808, 0x6082,
-	0xa890, 0x608a, 0xa88c, 0x608e, 0xa8b0, 0x60c6, 0xa8ac, 0x60ca,
-	0xa8ac, 0x7930, 0x9108, 0x7932, 0xa8b0, 0x792c, 0x9109, 0x792e,
-	0xb86c, 0x60ce, 0x60af, 0x95d5, 0x60d7, 0x0000, 0xbab0, 0x629e,
-	0x080c, 0x9bf9, 0x0804, 0x92e4, 0xb8bc, 0xd084, 0x0148, 0xb88c,
-	0x7814, 0x2048, 0xb88c, 0x7846, 0xa836, 0x2900, 0xa83a, 0xb04a,
-	0x9185, 0x0600, 0x6062, 0x6266, 0x636a, 0x646e, 0x6073, 0x0829,
-	0x6077, 0x0000, 0x60af, 0x9575, 0x60d7, 0x0000, 0x0804, 0x92c7,
-	0x9185, 0x0700, 0x6062, 0x6266, 0x636a, 0x646e, 0x7824, 0xd0cc,
-	0x7826, 0x0118, 0x6073, 0x0889, 0x0010, 0x6073, 0x0898, 0x6077,
-	0x0000, 0xb88c, 0x8000, 0x9084, 0x00ff, 0xb88e, 0x8007, 0x607a,
-	0x607f, 0x0000, 0x2f00, 0x6086, 0x7808, 0x6082, 0xa838, 0x608a,
-	0xa834, 0x608e, 0xa848, 0x60c6, 0xa844, 0x60ca, 0xb86c, 0x60ce,
-	0x60af, 0x95d5, 0x60d7, 0x0000, 0xbab0, 0x629e, 0x7824, 0xd0cc,
-	0x0120, 0x080c, 0x9c1c, 0x0804, 0x92e4, 0x080c, 0x9bf9, 0x0804,
-	0x92e4, 0x7a10, 0x00b6, 0x2258, 0xba8c, 0x8210, 0x9294, 0x00ff,
-	0xba8e, 0x00be, 0x8217, 0x0005, 0x00d6, 0x2069, 0x19bf, 0x6843,
-	0x0001, 0x00de, 0x0005, 0x60a3, 0x0056, 0x60a7, 0x9575, 0x00f1,
-	0x080c, 0x80b6, 0x0005, 0x0016, 0x2001, 0x180c, 0x200c, 0x9184,
-	0x0600, 0x9086, 0x0600, 0x0128, 0x0089, 0x080c, 0x80b6, 0x001e,
-	0x0005, 0xc1e5, 0x2001, 0x180c, 0x2102, 0x2001, 0x19c0, 0x2003,
-	0x0000, 0x2001, 0x19c8, 0x2003, 0x0000, 0x0c88, 0x0006, 0x6014,
-	0x9084, 0x1804, 0x9085, 0x0009, 0x6016, 0x000e, 0x0005, 0x0016,
-	0x00c6, 0x0006, 0x2061, 0x0100, 0x61a4, 0x60a7, 0x95f5, 0x6014,
-	0x9084, 0x1804, 0x9085, 0x0008, 0x6016, 0x000e, 0xa001, 0xa001,
-	0xa001, 0x61a6, 0x00ce, 0x001e, 0x0005, 0x00c6, 0x00d6, 0x0016,
-	0x0026, 0x2061, 0x0100, 0x2069, 0x0140, 0x080c, 0x6faa, 0x11c0,
-	0x2001, 0x19db, 0x2004, 0x9005, 0x15d0, 0x080c, 0x705a, 0x1160,
-	0x2061, 0x0100, 0x6020, 0xd0b4, 0x1120, 0x6024, 0xd084, 0x090c,
-	0x0db4, 0x080c, 0x80b6, 0x0458, 0x00c6, 0x2061, 0x19bf, 0x00c8,
-	0x6904, 0x9194, 0x4000, 0x0540, 0x0811, 0x080c, 0x2b31, 0x00c6,
-	0x2061, 0x19bf, 0x6128, 0x9192, 0x0008, 0x1258, 0x8108, 0x612a,
-	0x6124, 0x00ce, 0x81ff, 0x0198, 0x080c, 0x80b6, 0x080c, 0x93be,
-	0x0070, 0x6124, 0x91e5, 0x0000, 0x0140, 0x080c, 0xd903, 0x080c,
-	0x80bf, 0x2009, 0x0014, 0x080c, 0x9ea9, 0x00ce, 0x0000, 0x002e,
-	0x001e, 0x00de, 0x00ce, 0x0005, 0x2001, 0x19db, 0x2004, 0x9005,
-	0x1db0, 0x00c6, 0x2061, 0x19bf, 0x6128, 0x9192, 0x0003, 0x1e08,
-	0x8108, 0x612a, 0x00ce, 0x080c, 0x80b6, 0x080c, 0x5ba4, 0x2009,
-	0x185a, 0x2114, 0x8210, 0x220a, 0x0c10, 0x0096, 0x00c6, 0x00d6,
-	0x00e6, 0x0016, 0x0026, 0x080c, 0x80cc, 0x2071, 0x19bf, 0x713c,
-	0x81ff, 0x0904, 0x94b3, 0x2061, 0x0100, 0x2069, 0x0140, 0x080c,
-	0x6faa, 0x1190, 0x0036, 0x2019, 0x0002, 0x080c, 0x96e9, 0x003e,
-	0x713c, 0x2160, 0x080c, 0xd903, 0x2009, 0x004a, 0x080c, 0x9ea9,
-	0x080c, 0x705a, 0x0804, 0x94b3, 0x080c, 0x94bf, 0x0904, 0x94b3,
-	0x6904, 0xd1f4, 0x0904, 0x94ba, 0x080c, 0x2b31, 0x00c6, 0x703c,
-	0x9065, 0x090c, 0x0db4, 0x6020, 0x00ce, 0x9086, 0x0006, 0x1528,
-	0x61c8, 0x60c4, 0x9105, 0x1508, 0x2009, 0x180c, 0x2104, 0xd0d4,
-	0x01e0, 0x6214, 0x9294, 0x1800, 0x1128, 0x6224, 0x9294, 0x0002,
-	0x1510, 0x0030, 0xc0d4, 0x200a, 0xd0cc, 0x0110, 0x080c, 0x2a84,
-	0x6014, 0x9084, 0xe7fd, 0x9085, 0x0010, 0x6016, 0x703c, 0x2060,
-	0x2009, 0x0049, 0x080c, 0x9ea9, 0x0070, 0x0036, 0x2019, 0x0001,
-	0x080c, 0x96e9, 0x003e, 0x713c, 0x2160, 0x080c, 0xd903, 0x2009,
-	0x004a, 0x080c, 0x9ea9, 0x002e, 0x001e, 0x00ee, 0x00de, 0x00ce,
-	0x009e, 0x0005, 0xd1ec, 0x1904, 0x9474, 0x0804, 0x9476, 0x00d6,
-	0x00c6, 0x0096, 0x703c, 0x9065, 0x090c, 0x0db4, 0x2001, 0x1836,
-	0x2004, 0xd09c, 0x1904, 0x954b, 0x2001, 0x0306, 0x200c, 0x9184,
-	0x0030, 0x0904, 0x954b, 0x9184, 0x0048, 0x9086, 0x0008, 0x1904,
-	0x954b, 0x2001, 0x020b, 0x2004, 0xd0fc, 0x0904, 0x954b, 0xd08c,
-	0x0904, 0x954b, 0x2009, 0x1a57, 0x2104, 0x8000, 0x0208, 0x200a,
-	0x2069, 0x0100, 0x6914, 0x918c, 0x0184, 0x918d, 0x0010, 0x6916,
-	0x69c8, 0x2011, 0x0020, 0x68c8, 0x9106, 0x1570, 0x8211, 0x1dd8,
-	0x2001, 0x0306, 0x2003, 0x4800, 0x2001, 0x009a, 0x2003, 0x0004,
-	0x2001, 0x1a3d, 0x2003, 0x0000, 0x2001, 0x1a46, 0x2003, 0x0000,
-	0x6a88, 0x698c, 0x2200, 0x9105, 0x1120, 0x2c10, 0x080c, 0x1a69,
-	0x0040, 0x6014, 0x2048, 0xaa3a, 0xa936, 0x6ac4, 0x69c8, 0xa946,
-	0xaa4a, 0x0126, 0x00c6, 0x2091, 0x2400, 0x002e, 0x080c, 0x1af5,
-	0x190c, 0x0db4, 0x012e, 0x0090, 0x2009, 0x1a58, 0x2104, 0x8000,
-	0x0208, 0x200a, 0x69c8, 0x2011, 0x0020, 0x8211, 0x1df0, 0x68c8,
-	0x9106, 0x1dc0, 0x69c4, 0x68c8, 0x9105, 0x0160, 0x6824, 0xd08c,
-	0x0110, 0x6827, 0x0002, 0x7048, 0xc085, 0x704a, 0x0079, 0x7048,
-	0xc084, 0x704a, 0x2009, 0x07d0, 0x080c, 0x80c4, 0x9006, 0x009e,
-	0x00ce, 0x00de, 0x0005, 0x9085, 0x0001, 0x0cc8, 0x0026, 0x00e6,
-	0x2071, 0x19bf, 0x7048, 0xd084, 0x01c0, 0x713c, 0x81ff, 0x01a8,
-	0x2071, 0x0100, 0x9188, 0x0008, 0x2114, 0x928e, 0x0006, 0x1138,
-	0x7014, 0x9084, 0x1984, 0x9085, 0x0012, 0x7016, 0x0030, 0x7014,
-	0x9084, 0x1984, 0x9085, 0x0016, 0x7016, 0x00ee, 0x002e, 0x0005,
-	0x00b6, 0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0056, 0x0046, 0x0006,
-	0x0126, 0x2091, 0x8000, 0x6010, 0x2058, 0xbca0, 0x2071, 0x19bf,
-	0x7018, 0x2058, 0x8bff, 0x0190, 0xb8a0, 0x9406, 0x0118, 0xb854,
-	0x2058, 0x0cc0, 0x6014, 0x0096, 0x2048, 0xac6c, 0xad70, 0xae78,
-	0x009e, 0x080c, 0x6388, 0x0110, 0x9085, 0x0001, 0x012e, 0x000e,
-	0x004e, 0x005e, 0x006e, 0x00ce, 0x00de, 0x00ee, 0x00be, 0x0005,
-	0x080c, 0x8ea9, 0x7003, 0x1200, 0x7838, 0x7012, 0x783c, 0x7016,
-	0x00c6, 0x7820, 0x9086, 0x0004, 0x1148, 0x7810, 0x9005, 0x0130,
-	0x00b6, 0x2058, 0xb810, 0xb914, 0x00be, 0x0020, 0x2061, 0x1800,
-	0x6078, 0x617c, 0x9084, 0x00ff, 0x700a, 0x710e, 0x00ce, 0x60c3,
-	0x002c, 0x0804, 0x939b, 0x080c, 0x8ea9, 0x7003, 0x0f00, 0x7808,
-	0xd09c, 0x0128, 0xb810, 0x9084, 0x00ff, 0x700a, 0xb814, 0x700e,
-	0x60c3, 0x0008, 0x0804, 0x939b, 0x0156, 0x080c, 0x8ef4, 0x7003,
-	0x0200, 0x2011, 0x1848, 0x63f0, 0x2312, 0x20a9, 0x0006, 0x2011,
-	0x1840, 0x2019, 0x1841, 0x9ef0, 0x0002, 0x2376, 0x8e70, 0x2276,
-	0x8e70, 0x9398, 0x0002, 0x9290, 0x0002, 0x1f04, 0x95e5, 0x60c3,
-	0x001c, 0x015e, 0x0804, 0x939b, 0x0016, 0x0026, 0x080c, 0x8ed0,
-	0x080c, 0x8ee2, 0x9e80, 0x0004, 0x20e9, 0x0000, 0x20a0, 0x7814,
-	0x0096, 0x2048, 0xa800, 0x2048, 0xa860, 0x20e0, 0xa85c, 0x9080,
-	0x0021, 0x2098, 0x009e, 0x7808, 0x9088, 0x0002, 0x21a8, 0x9192,
-	0x0010, 0x1250, 0x4003, 0x9080, 0x0004, 0x8003, 0x60c2, 0x080c,
-	0x939b, 0x002e, 0x001e, 0x0005, 0x20a9, 0x0010, 0x4003, 0x080c,
-	0x9c22, 0x20a1, 0x0240, 0x22a8, 0x4003, 0x0c68, 0x080c, 0x8ea9,
-	0x7003, 0x6200, 0x7808, 0x700e, 0x60c3, 0x0008, 0x0804, 0x939b,
-	0x0016, 0x0026, 0x080c, 0x8ea9, 0x20e9, 0x0000, 0x20a1, 0x024c,
-	0x7814, 0x0096, 0x2048, 0xa800, 0x2048, 0xa860, 0x20e0, 0xa85c,
-	0x9080, 0x0023, 0x2098, 0x009e, 0x7808, 0x9088, 0x0002, 0x21a8,
-	0x4003, 0x8003, 0x60c2, 0x080c, 0x939b, 0x002e, 0x001e, 0x0005,
-	0x00e6, 0x00c6, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071, 0x19bf,
-	0x700c, 0x2060, 0x8cff, 0x0178, 0x080c, 0xbd41, 0x1110, 0x080c,
-	0xa7cd, 0x600c, 0x0006, 0x080c, 0xbfad, 0x080c, 0x9e2f, 0x080c,
-	0x979a, 0x00ce, 0x0c78, 0x2c00, 0x700e, 0x700a, 0x012e, 0x000e,
-	0x00ce, 0x00ee, 0x0005, 0x0126, 0x0156, 0x00f6, 0x00e6, 0x00d6,
-	0x00c6, 0x0066, 0x0026, 0x0016, 0x0006, 0x2091, 0x8000, 0x2001,
-	0x180c, 0x200c, 0x918c, 0xe7ff, 0x2102, 0x2069, 0x0100, 0x2079,
-	0x0140, 0x2071, 0x19bf, 0x7024, 0x2060, 0x8cff, 0x01f8, 0x080c,
-	0x93c7, 0x6ac0, 0x68c3, 0x0000, 0x080c, 0x80bf, 0x00c6, 0x2061,
-	0x0100, 0x080c, 0x9c3b, 0x00ce, 0x20a9, 0x01f4, 0x0461, 0x2009,
-	0x0013, 0x080c, 0x9ea9, 0x000e, 0x001e, 0x002e, 0x006e, 0x00ce,
-	0x00de, 0x00ee, 0x00fe, 0x015e, 0x012e, 0x0005, 0x2001, 0x1800,
-	0x2004, 0x9096, 0x0001, 0x0d78, 0x9096, 0x0004, 0x0d60, 0x080c,
-	0x80bf, 0x6814, 0x9084, 0x0001, 0x0110, 0x68a7, 0x95f5, 0x6817,
-	0x0008, 0x68c3, 0x0000, 0x2011, 0x5b4e, 0x080c, 0x803f, 0x20a9,
-	0x01f4, 0x0009, 0x08c0, 0x6824, 0xd094, 0x0140, 0x6827, 0x0004,
-	0x7804, 0x9084, 0x4000, 0x190c, 0x2b31, 0x0090, 0xd084, 0x0118,
-	0x6827, 0x0001, 0x0010, 0x1f04, 0x96cb, 0x7804, 0x9084, 0x1000,
-	0x0138, 0x2001, 0x0100, 0x080c, 0x2b21, 0x9006, 0x080c, 0x2b21,
-	0x0005, 0x0126, 0x0156, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0066,
-	0x0026, 0x0016, 0x0006, 0x2091, 0x8000, 0x2001, 0x180c, 0x200c,
-	0x918c, 0xdbff, 0x2102, 0x2069, 0x0100, 0x2079, 0x0140, 0x2071,
-	0x19bf, 0x703c, 0x2060, 0x8cff, 0x0904, 0x9750, 0x9386, 0x0002,
-	0x1128, 0x6814, 0x9084, 0x0002, 0x0904, 0x9750, 0x68af, 0x95f5,
-	0x6817, 0x0010, 0x2009, 0x00fa, 0x8109, 0x1df0, 0x69c6, 0x68cb,
-	0x0008, 0x080c, 0x80cc, 0x080c, 0x1e9d, 0x2001, 0x0032, 0x6920,
-	0xd1bc, 0x0130, 0x8001, 0x1dd8, 0x692c, 0x918d, 0x0008, 0x692e,
-	0x20a9, 0x03e8, 0x6824, 0xd094, 0x0140, 0x6827, 0x0004, 0x7804,
-	0x9084, 0x4000, 0x190c, 0x2b31, 0x0090, 0xd08c, 0x0118, 0x6827,
-	0x0002, 0x0010, 0x1f04, 0x972a, 0x7804, 0x9084, 0x1000, 0x0138,
-	0x2001, 0x0100, 0x080c, 0x2b21, 0x9006, 0x080c, 0x2b21, 0x6827,
-	0x4000, 0x6824, 0x83ff, 0x1120, 0x2009, 0x0049, 0x080c, 0x9ea9,
-	0x000e, 0x001e, 0x002e, 0x006e, 0x00ce, 0x00de, 0x00ee, 0x00fe,
-	0x015e, 0x012e, 0x0005, 0x00d6, 0x0126, 0x2091, 0x8000, 0x2069,
-	0x19bf, 0x6a06, 0x012e, 0x00de, 0x0005, 0x00d6, 0x0126, 0x2091,
-	0x8000, 0x2069, 0x19bf, 0x6a32, 0x012e, 0x00de, 0x0005, 0x080c,
-	0x9062, 0x7854, 0x7032, 0x7042, 0x7047, 0x1000, 0x00f8, 0x080c,
-	0x9062, 0x7854, 0x7032, 0x7042, 0x7047, 0x4000, 0x00b8, 0x080c,
-	0x9062, 0x7854, 0x7032, 0x7042, 0x7047, 0x2000, 0x0078, 0x080c,
-	0x9062, 0x7854, 0x7032, 0x7042, 0x7047, 0x0400, 0x0038, 0x080c,
-	0x9062, 0x7854, 0x7032, 0x7042, 0x7047, 0x0200, 0x60c3, 0x0020,
-	0x0804, 0x939b, 0x00e6, 0x2071, 0x19bf, 0x7020, 0x9005, 0x0110,
-	0x8001, 0x7022, 0x00ee, 0x0005, 0x00f6, 0x00e6, 0x00d6, 0x00c6,
-	0x0076, 0x0066, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071, 0x19bf,
-	0x7614, 0x2660, 0x2678, 0x2039, 0x0001, 0x87ff, 0x0904, 0x983f,
-	0x8cff, 0x0904, 0x983f, 0x6020, 0x9086, 0x0006, 0x1904, 0x983a,
-	0x88ff, 0x0138, 0x2800, 0x9c06, 0x1904, 0x983a, 0x2039, 0x0000,
-	0x0050, 0x6010, 0x9b06, 0x1904, 0x983a, 0x85ff, 0x0120, 0x6054,
-	0x9106, 0x1904, 0x983a, 0x7024, 0x9c06, 0x15b0, 0x2069, 0x0100,
-	0x68c0, 0x9005, 0x1160, 0x6824, 0xd084, 0x0148, 0x6827, 0x0001,
-	0x080c, 0x80bf, 0x080c, 0x98c4, 0x7027, 0x0000, 0x0428, 0x080c,
-	0x80bf, 0x6820, 0xd0b4, 0x0110, 0x68a7, 0x95f5, 0x6817, 0x0008,
-	0x68c3, 0x0000, 0x080c, 0x98c4, 0x7027, 0x0000, 0x0036, 0x2069,
-	0x0140, 0x6b04, 0x9384, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c,
-	0x2b21, 0x9006, 0x080c, 0x2b21, 0x2069, 0x0100, 0x6824, 0xd084,
-	0x0110, 0x6827, 0x0001, 0x003e, 0x7014, 0x9c36, 0x1110, 0x660c,
-	0x7616, 0x7010, 0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00,
-	0x7012, 0x0010, 0x7013, 0x0000, 0x660c, 0x0066, 0x2c00, 0x9f06,
-	0x0110, 0x7e0e, 0x0008, 0x2678, 0x89ff, 0x1168, 0x600f, 0x0000,
-	0x6014, 0x0096, 0x2048, 0x080c, 0xbb39, 0x0110, 0x080c, 0xd50f,
-	0x009e, 0x080c, 0x9e5f, 0x080c, 0x979a, 0x88ff, 0x1190, 0x00ce,
-	0x0804, 0x97b5, 0x2c78, 0x600c, 0x2060, 0x0804, 0x97b5, 0x9006,
-	0x012e, 0x000e, 0x006e, 0x007e, 0x00ce, 0x00de, 0x00ee, 0x00fe,
-	0x0005, 0x601b, 0x0000, 0x00ce, 0x98c5, 0x0001, 0x0c88, 0x00f6,
-	0x00e6, 0x00d6, 0x0096, 0x00c6, 0x0066, 0x0026, 0x0006, 0x0126,
-	0x2091, 0x8000, 0x2071, 0x19bf, 0x7638, 0x2660, 0x2678, 0x8cff,
-	0x0904, 0x98b3, 0x6020, 0x9086, 0x0006, 0x1904, 0x98ae, 0x87ff,
-	0x0128, 0x2700, 0x9c06, 0x1904, 0x98ae, 0x0040, 0x6010, 0x9b06,
-	0x15e8, 0x85ff, 0x0118, 0x6054, 0x9106, 0x15c0, 0x703c, 0x9c06,
-	0x1168, 0x0036, 0x2019, 0x0001, 0x080c, 0x96e9, 0x7033, 0x0000,
-	0x9006, 0x703e, 0x7042, 0x7046, 0x704a, 0x003e, 0x7038, 0x9c36,
-	0x1110, 0x660c, 0x763a, 0x7034, 0x9c36, 0x1140, 0x2c00, 0x9f36,
-	0x0118, 0x2f00, 0x7036, 0x0010, 0x7037, 0x0000, 0x660c, 0x0066,
-	0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000,
-	0x6014, 0x2048, 0x080c, 0xbb39, 0x0110, 0x080c, 0xd50f, 0x080c,
-	0x9e5f, 0x87ff, 0x1198, 0x00ce, 0x0804, 0x985f, 0x2c78, 0x600c,
-	0x2060, 0x0804, 0x985f, 0x9006, 0x012e, 0x000e, 0x002e, 0x006e,
-	0x00ce, 0x009e, 0x00de, 0x00ee, 0x00fe, 0x0005, 0x601b, 0x0000,
-	0x00ce, 0x97bd, 0x0001, 0x0c80, 0x00e6, 0x2071, 0x19bf, 0x2001,
-	0x1800, 0x2004, 0x9086, 0x0002, 0x1118, 0x7007, 0x0005, 0x0010,
-	0x7007, 0x0000, 0x00ee, 0x0005, 0x00f6, 0x00e6, 0x00c6, 0x0066,
-	0x0026, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071, 0x19bf, 0x2c10,
-	0x7638, 0x2660, 0x2678, 0x8cff, 0x0540, 0x2200, 0x9c06, 0x1508,
-	0x7038, 0x9c36, 0x1110, 0x660c, 0x763a, 0x7034, 0x9c36, 0x1140,
-	0x2c00, 0x9f36, 0x0118, 0x2f00, 0x7036, 0x0010, 0x7037, 0x0000,
-	0x660c, 0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f,
-	0x0000, 0x6004, 0x9086, 0x0040, 0x090c, 0x887f, 0x9085, 0x0001,
-	0x0020, 0x2c78, 0x600c, 0x2060, 0x08b0, 0x012e, 0x000e, 0x002e,
-	0x006e, 0x00ce, 0x00ee, 0x00fe, 0x0005, 0x0096, 0x00f6, 0x00e6,
-	0x00d6, 0x00c6, 0x0066, 0x0026, 0x0006, 0x0126, 0x2091, 0x8000,
-	0x2071, 0x19bf, 0x760c, 0x2660, 0x2678, 0x8cff, 0x0904, 0x99aa,
-	0x6010, 0x00b6, 0x2058, 0xb8a0, 0x00be, 0x9206, 0x1904, 0x99a5,
+	0x0819, 0x080c, 0x9618, 0x721a, 0x2f10, 0x7222, 0x7a08, 0x7226,
+	0x2071, 0x024c, 0x00de, 0x0005, 0x00a9, 0x7914, 0x712a, 0x60c3,
+	0x0000, 0x60a7, 0x9575, 0x0026, 0x080c, 0x2afe, 0x0228, 0x2011,
+	0x0101, 0x2204, 0xc0c5, 0x2012, 0x002e, 0x080c, 0x964d, 0x080c,
+	0x8351, 0x0005, 0x0036, 0x0096, 0x00d6, 0x00e6, 0x7858, 0x2048,
+	0xaa7c, 0x9296, 0x00c0, 0x9294, 0xfffd, 0xaa7e, 0xaa80, 0x9294,
+	0x0300, 0xaa82, 0xa96c, 0x9194, 0x00ff, 0xab74, 0x9384, 0x00ff,
+	0x908d, 0xc200, 0xa96e, 0x9384, 0xff00, 0x9215, 0xaa76, 0xa870,
+	0xaa78, 0xa87a, 0xaa72, 0x00d6, 0x2069, 0x0200, 0x080c, 0x9eeb,
+	0x00de, 0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9, 0x000a, 0xa860,
+	0x20e0, 0xa85c, 0x9080, 0x001b, 0x2098, 0x4003, 0x60a3, 0x0035,
+	0xaa68, 0x9294, 0x7000, 0x9286, 0x3000, 0x0110, 0x60a3, 0x0037,
+	0x00ee, 0x00de, 0x009e, 0x003e, 0x0005, 0x900e, 0x7814, 0x0096,
+	0x2048, 0xa87c, 0xd0fc, 0x01c0, 0x9084, 0x0003, 0x11a8, 0x2001,
+	0x180c, 0x2004, 0xd0bc, 0x0180, 0x7824, 0xd0cc, 0x1168, 0xd0c4,
+	0x1158, 0xa8a8, 0x9005, 0x1140, 0x2001, 0x180c, 0x200c, 0xc1d5,
+	0x2102, 0x2009, 0x198a, 0x210c, 0x009e, 0x918d, 0x0092, 0x0010,
+	0x2009, 0x0096, 0x60ab, 0x0036, 0x6116, 0x0005, 0x2009, 0x0009,
+	0x00a0, 0x2009, 0x000a, 0x0088, 0x2009, 0x000b, 0x0070, 0x2009,
+	0x000c, 0x0058, 0x2009, 0x000d, 0x0040, 0x2009, 0x000e, 0x0028,
+	0x2009, 0x000f, 0x0010, 0x2009, 0x0008, 0x6912, 0x0005, 0x00d6,
+	0x9290, 0x0018, 0x8214, 0x20e9, 0x0000, 0x2069, 0x0200, 0x6813,
+	0x0000, 0x22a8, 0x9284, 0x00e0, 0x0128, 0x20a9, 0x0020, 0x9292,
+	0x0020, 0x0008, 0x9016, 0x20a1, 0x0240, 0x9006, 0x4004, 0x82ff,
+	0x0120, 0x6810, 0x8000, 0x6812, 0x0c60, 0x00de, 0x0005, 0x00d6,
+	0x0096, 0x6014, 0x2048, 0xa878, 0x6056, 0x9006, 0xa836, 0xa83a,
+	0xa99c, 0xa946, 0xa84a, 0x6023, 0x0003, 0x6007, 0x0040, 0x6003,
+	0x0003, 0x600b, 0xffff, 0xa817, 0x0001, 0xa842, 0xa83e, 0x2900,
+	0xa85a, 0xa813, 0x1fc6, 0x080c, 0x86de, 0x0126, 0x2091, 0x8000,
+	0x080c, 0x8ced, 0x012e, 0x009e, 0x00de, 0x0005, 0x00f6, 0x00e6,
+	0x00d6, 0x00c6, 0x00a6, 0x0096, 0x0066, 0x0126, 0x2091, 0x8000,
+	0x2071, 0x19bf, 0x760c, 0x2660, 0x2678, 0x8cff, 0x0904, 0x9fc2,
 	0x7024, 0x9c06, 0x1520, 0x2069, 0x0100, 0x68c0, 0x9005, 0x0904,
-	0x997c, 0x080c, 0x93c7, 0x68c3, 0x0000, 0x080c, 0x98c4, 0x7027,
+	0x9f94, 0x080c, 0x9656, 0x68c3, 0x0000, 0x080c, 0x9b78, 0x7027,
 	0x0000, 0x0036, 0x2069, 0x0140, 0x6b04, 0x9384, 0x1000, 0x0138,
-	0x2001, 0x0100, 0x080c, 0x2b21, 0x9006, 0x080c, 0x2b21, 0x2069,
+	0x2001, 0x0100, 0x080c, 0x2c88, 0x9006, 0x080c, 0x2c88, 0x2069,
 	0x0100, 0x6824, 0xd084, 0x0110, 0x6827, 0x0001, 0x003e, 0x700c,
 	0x9c36, 0x1110, 0x660c, 0x760e, 0x7008, 0x9c36, 0x1140, 0x2c00,
 	0x9f36, 0x0118, 0x2f00, 0x700a, 0x0010, 0x700b, 0x0000, 0x660c,
 	0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f,
-	0x0000, 0x080c, 0xbd30, 0x1180, 0x080c, 0x3010, 0x080c, 0xbd41,
-	0x1518, 0x080c, 0xa7cd, 0x0400, 0x080c, 0x98c4, 0x6824, 0xd084,
-	0x09b0, 0x6827, 0x0001, 0x0898, 0x080c, 0xbd41, 0x1118, 0x080c,
-	0xa7cd, 0x0090, 0x6014, 0x2048, 0x080c, 0xbb39, 0x0168, 0x6020,
-	0x9086, 0x0003, 0x1508, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000,
-	0x080c, 0x6893, 0x080c, 0xbd24, 0x080c, 0xbfad, 0x080c, 0x9e5f,
-	0x080c, 0x979a, 0x00ce, 0x0804, 0x9925, 0x2c78, 0x600c, 0x2060,
-	0x0804, 0x9925, 0x012e, 0x000e, 0x002e, 0x006e, 0x00ce, 0x00de,
-	0x00ee, 0x00fe, 0x009e, 0x0005, 0x6020, 0x9086, 0x0006, 0x1d20,
-	0x080c, 0xd50f, 0x0c08, 0x00d6, 0x080c, 0x8ef4, 0x7003, 0x0200,
-	0x7007, 0x0014, 0x60c3, 0x0014, 0x20e1, 0x0001, 0x2099, 0x1961,
-	0x20e9, 0x0000, 0x20a1, 0x0250, 0x20a9, 0x0004, 0x4003, 0x7023,
-	0x0004, 0x7027, 0x7878, 0x080c, 0x939b, 0x00de, 0x0005, 0x080c,
-	0x8ef4, 0x700b, 0x0800, 0x7814, 0x9084, 0xff00, 0x700e, 0x7814,
-	0x9084, 0x00ff, 0x7022, 0x782c, 0x7026, 0x7858, 0x9084, 0x00ff,
-	0x9085, 0x0200, 0x7002, 0x7858, 0x9084, 0xff00, 0x8007, 0x7006,
-	0x60c2, 0x0804, 0x939b, 0x00b6, 0x00d6, 0x0016, 0x00d6, 0x2f68,
-	0x2009, 0x0035, 0x080c, 0xc1b3, 0x00de, 0x1904, 0x9a58, 0x080c,
-	0x8ea9, 0x7003, 0x1300, 0x782c, 0x080c, 0x9b5e, 0x2068, 0x6820,
-	0x9086, 0x0003, 0x0560, 0x7810, 0x2058, 0xbaa0, 0x080c, 0x9dae,
-	0x11d8, 0x9286, 0x007e, 0x1128, 0x700b, 0x00ff, 0x700f, 0xfffe,
-	0x0498, 0x9286, 0x007f, 0x1128, 0x700b, 0x00ff, 0x700f, 0xfffd,
-	0x0458, 0x9284, 0xff80, 0x0180, 0x9286, 0x0080, 0x1128, 0x700b,
-	0x00ff, 0x700f, 0xfffc, 0x0400, 0x92d8, 0x1000, 0x2b5c, 0xb810,
-	0x700a, 0xb814, 0x700e, 0x00c0, 0x6098, 0x700e, 0x00a8, 0x080c,
-	0x9dae, 0x1130, 0x7810, 0x2058, 0xb8a0, 0x9082, 0x007e, 0x0250,
-	0x00d6, 0x2069, 0x181e, 0x2d04, 0x700a, 0x8d68, 0x2d04, 0x700e,
-	0x00de, 0x0010, 0x6034, 0x700e, 0x7838, 0x7012, 0x783c, 0x7016,
-	0x60c3, 0x000c, 0x001e, 0x00de, 0x080c, 0x939b, 0x00be, 0x0005,
-	0x781b, 0x0001, 0x7803, 0x0006, 0x001e, 0x00de, 0x00be, 0x0005,
-	0x792c, 0x9180, 0x0008, 0x200c, 0x9186, 0x0006, 0x01c0, 0x9186,
-	0x0003, 0x0904, 0x9ad3, 0x9186, 0x0005, 0x0904, 0x9abb, 0x9186,
-	0x0004, 0x05d8, 0x9186, 0x0008, 0x0904, 0x9ac4, 0x7807, 0x0037,
-	0x782f, 0x0003, 0x7817, 0x1700, 0x080c, 0x9b3b, 0x0005, 0x080c,
-	0x9afc, 0x00d6, 0x0026, 0x792c, 0x2168, 0x2009, 0x4000, 0x6800,
-	0x0002, 0x9a9c, 0x9aa7, 0x9a9e, 0x9aa7, 0x9aa3, 0x9a9c, 0x9a9c,
-	0x9aa7, 0x9aa7, 0x9aa7, 0x9aa7, 0x9a9c, 0x9a9c, 0x9a9c, 0x9a9c,
-	0x9a9c, 0x9aa7, 0x9a9c, 0x9aa7, 0x080c, 0x0db4, 0x6824, 0xd0e4,
-	0x0110, 0xd0cc, 0x0110, 0x900e, 0x0010, 0x2009, 0x2000, 0x682c,
-	0x7022, 0x6830, 0x7026, 0x0804, 0x9af5, 0x080c, 0x9afc, 0x00d6,
-	0x0026, 0x792c, 0x2168, 0x2009, 0x4000, 0x6a00, 0x9286, 0x0002,
-	0x1108, 0x900e, 0x04d0, 0x080c, 0x9afc, 0x00d6, 0x0026, 0x792c,
-	0x2168, 0x2009, 0x4000, 0x0488, 0x04b9, 0x00d6, 0x0026, 0x792c,
-	0x2168, 0x2009, 0x4000, 0x9286, 0x0005, 0x0118, 0x9286, 0x0002,
-	0x1108, 0x900e, 0x0410, 0x0441, 0x00d6, 0x0026, 0x792c, 0x2168,
-	0x6814, 0x6924, 0xc185, 0x6926, 0x0096, 0x2048, 0xa9ac, 0xa834,
-	0x9112, 0xa9b0, 0xa838, 0x009e, 0x9103, 0x7022, 0x7226, 0x792c,
-	0x9180, 0x0000, 0x2004, 0x908e, 0x0002, 0x0130, 0x908e, 0x0004,
-	0x0118, 0x2009, 0x4000, 0x0008, 0x900e, 0x712a, 0x60c3, 0x0018,
-	0x002e, 0x00de, 0x0804, 0x939b, 0x00b6, 0x0036, 0x0046, 0x0056,
-	0x0066, 0x080c, 0x8ef4, 0x9006, 0x7003, 0x0200, 0x7938, 0x710a,
-	0x793c, 0x710e, 0x7810, 0x2058, 0xb8a0, 0x080c, 0x9dae, 0x1118,
-	0x9092, 0x007e, 0x0268, 0x00d6, 0x2069, 0x181e, 0x2d2c, 0x8d68,
-	0x2d34, 0x90d8, 0x1000, 0x2b5c, 0xbb10, 0xbc14, 0x00de, 0x0028,
-	0x901e, 0x6498, 0x2029, 0x0000, 0x6634, 0x782c, 0x9080, 0x0008,
-	0x2004, 0x9086, 0x0003, 0x1128, 0x7512, 0x7616, 0x731a, 0x741e,
-	0x0020, 0x7312, 0x7416, 0x751a, 0x761e, 0x006e, 0x005e, 0x004e,
-	0x003e, 0x00be, 0x0005, 0x080c, 0x8ef4, 0x7003, 0x0100, 0x782c,
-	0x700a, 0x7814, 0x700e, 0x700e, 0x60c3, 0x0008, 0x0804, 0x939b,
-	0x080c, 0x8ea0, 0x7003, 0x1400, 0x7838, 0x700a, 0x0079, 0x783c,
-	0x700e, 0x782c, 0x7012, 0x7830, 0x7016, 0x7834, 0x9084, 0x00ff,
-	0x8007, 0x701a, 0x60c3, 0x0010, 0x0804, 0x939b, 0x00e6, 0x2071,
-	0x0240, 0x0006, 0x00f6, 0x2078, 0x7810, 0x00b6, 0x2058, 0xb8bc,
-	0xd084, 0x0120, 0x7848, 0x702a, 0x7844, 0x702e, 0x00be, 0x00fe,
-	0x000e, 0x00ee, 0x0005, 0x080c, 0x8eeb, 0x7003, 0x0100, 0x782c,
-	0x700a, 0x7814, 0x700e, 0x60c3, 0x0008, 0x0804, 0x939b, 0x0021,
-	0x60c3, 0x0000, 0x0804, 0x939b, 0x00d6, 0x080c, 0x9c37, 0xb810,
-	0x9085, 0x0300, 0x7002, 0xb814, 0x7006, 0x2069, 0x1800, 0x6878,
-	0x700a, 0x687c, 0x700e, 0x7013, 0x0819, 0x080c, 0x9389, 0x721a,
-	0x2f10, 0x7222, 0x7a08, 0x7226, 0x2071, 0x024c, 0x00de, 0x0005,
-	0x00a9, 0x7914, 0x712a, 0x60c3, 0x0000, 0x60a7, 0x9575, 0x0026,
-	0x080c, 0x29d7, 0x0228, 0x2011, 0x0101, 0x2204, 0xc0c5, 0x2012,
-	0x002e, 0x080c, 0x93be, 0x080c, 0x80b6, 0x0005, 0x0036, 0x0096,
-	0x00d6, 0x00e6, 0x7858, 0x2048, 0xaa7c, 0x9296, 0x00c0, 0x9294,
-	0xfffd, 0xaa7e, 0xaa80, 0x9294, 0x0300, 0xaa82, 0xa96c, 0x9194,
-	0x00ff, 0xab74, 0x9384, 0x00ff, 0x908d, 0xc200, 0xa96e, 0x9384,
-	0xff00, 0x9215, 0xaa76, 0xa870, 0xaa78, 0xa87a, 0xaa72, 0x00d6,
-	0x2069, 0x0200, 0x080c, 0x9c37, 0x00de, 0x20e9, 0x0000, 0x20a1,
-	0x0240, 0x20a9, 0x000a, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x001b,
-	0x2098, 0x4003, 0x60a3, 0x0035, 0xaa68, 0x9294, 0x7000, 0x9286,
-	0x3000, 0x0110, 0x60a3, 0x0037, 0x00ee, 0x00de, 0x009e, 0x003e,
-	0x0005, 0x900e, 0x7814, 0x0096, 0x2048, 0xa87c, 0xd0fc, 0x01c0,
-	0x9084, 0x0003, 0x11a8, 0x2001, 0x180c, 0x2004, 0xd0bc, 0x0180,
-	0x7824, 0xd0cc, 0x1168, 0xd0c4, 0x1158, 0xa8a8, 0x9005, 0x1140,
-	0x2001, 0x180c, 0x200c, 0xc1d5, 0x2102, 0x2009, 0x198a, 0x210c,
-	0x009e, 0x918d, 0x0092, 0x0010, 0x2009, 0x0096, 0x60ab, 0x0036,
-	0x6116, 0x0005, 0x2009, 0x0009, 0x00a0, 0x2009, 0x000a, 0x0088,
-	0x2009, 0x000b, 0x0070, 0x2009, 0x000c, 0x0058, 0x2009, 0x000d,
-	0x0040, 0x2009, 0x000e, 0x0028, 0x2009, 0x000f, 0x0010, 0x2009,
-	0x0008, 0x6912, 0x0005, 0x00d6, 0x9290, 0x0018, 0x8214, 0x20e9,
-	0x0000, 0x2069, 0x0200, 0x6813, 0x0000, 0x22a8, 0x9284, 0x00e0,
-	0x0128, 0x20a9, 0x0020, 0x9292, 0x0020, 0x0008, 0x9016, 0x20a1,
-	0x0240, 0x9006, 0x4004, 0x82ff, 0x0120, 0x6810, 0x8000, 0x6812,
-	0x0c60, 0x00de, 0x0005, 0x00d6, 0x0096, 0x6014, 0x2048, 0xa878,
-	0x6056, 0x9006, 0xa836, 0xa83a, 0xa99c, 0xa946, 0xa84a, 0x6023,
-	0x0003, 0x6007, 0x0040, 0x6003, 0x0003, 0x600b, 0xffff, 0xa817,
-	0x0001, 0xa842, 0xa83e, 0x2900, 0xa85a, 0xa813, 0x1f31, 0x080c,
-	0x845d, 0x0126, 0x2091, 0x8000, 0x080c, 0x8a68, 0x012e, 0x009e,
-	0x00de, 0x0005, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x00a6, 0x0096,
-	0x0066, 0x0126, 0x2091, 0x8000, 0x2071, 0x19bf, 0x760c, 0x2660,
-	0x2678, 0x8cff, 0x0904, 0x9d0e, 0x7024, 0x9c06, 0x1520, 0x2069,
-	0x0100, 0x68c0, 0x9005, 0x0904, 0x9ce0, 0x080c, 0x93c7, 0x68c3,
-	0x0000, 0x080c, 0x98c4, 0x7027, 0x0000, 0x0036, 0x2069, 0x0140,
-	0x6b04, 0x9384, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2b21,
-	0x9006, 0x080c, 0x2b21, 0x2069, 0x0100, 0x6824, 0xd084, 0x0110,
-	0x6827, 0x0001, 0x003e, 0x700c, 0x9c36, 0x1110, 0x660c, 0x760e,
-	0x7008, 0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00, 0x700a,
-	0x0010, 0x700b, 0x0000, 0x660c, 0x0066, 0x2c00, 0x9f06, 0x0110,
-	0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000, 0x080c, 0xbd30, 0x1180,
-	0x080c, 0x3010, 0x080c, 0xbd41, 0x1518, 0x080c, 0xa7cd, 0x0400,
-	0x080c, 0x98c4, 0x6824, 0xd084, 0x09b0, 0x6827, 0x0001, 0x0898,
-	0x080c, 0xbd41, 0x1118, 0x080c, 0xa7cd, 0x0090, 0x6014, 0x2048,
-	0x080c, 0xbb39, 0x0168, 0x6020, 0x9086, 0x0003, 0x1520, 0xa867,
-	0x0103, 0xab7a, 0xa877, 0x0000, 0x080c, 0x68a0, 0x080c, 0xbd24,
-	0x080c, 0xbfad, 0x080c, 0x9e5f, 0x080c, 0x979a, 0x00ce, 0x0804,
-	0x9c91, 0x2c78, 0x600c, 0x2060, 0x0804, 0x9c91, 0x700f, 0x0000,
-	0x700b, 0x0000, 0x012e, 0x006e, 0x009e, 0x00ae, 0x00ce, 0x00de,
-	0x00ee, 0x00fe, 0x0005, 0x6020, 0x9086, 0x0006, 0x1d08, 0x080c,
-	0xd50f, 0x08f0, 0x00d6, 0x0156, 0x080c, 0x8ef4, 0x7a14, 0x82ff,
-	0x0138, 0x7003, 0x0100, 0x700b, 0x0003, 0x60c3, 0x0008, 0x0490,
-	0x7003, 0x0200, 0x7007, 0x0000, 0x2069, 0x1800, 0x901e, 0x6800,
-	0x9086, 0x0004, 0x1110, 0xc38d, 0x0060, 0x080c, 0x6faa, 0x1110,
-	0xc3ad, 0x0008, 0xc3a5, 0x6ad8, 0xd29c, 0x1110, 0xd2ac, 0x0108,
-	0xc39d, 0x730e, 0x2011, 0x1848, 0x63f0, 0x2312, 0x20a9, 0x0006,
-	0x2011, 0x1840, 0x2019, 0x1841, 0x2071, 0x0250, 0x2376, 0x8e70,
-	0x2276, 0x8e70, 0x9398, 0x0002, 0x9290, 0x0002, 0x1f04, 0x9d56,
-	0x60c3, 0x0020, 0x080c, 0x939b, 0x015e, 0x00de, 0x0005, 0x0156,
-	0x080c, 0x8ef4, 0x7a14, 0x82ff, 0x0168, 0x9286, 0xffff, 0x0118,
-	0x9282, 0x000e, 0x1238, 0x7003, 0x0100, 0x700b, 0x0003, 0x60c3,
-	0x0008, 0x0488, 0x7003, 0x0200, 0x7007, 0x001c, 0x700f, 0x0001,
-	0x2011, 0x1995, 0x2204, 0x8007, 0x701a, 0x8210, 0x2204, 0x8007,
-	0x701e, 0x0421, 0x1120, 0xb8a0, 0x9082, 0x007f, 0x0248, 0x2001,
-	0x181e, 0x2004, 0x7022, 0x2001, 0x181f, 0x2004, 0x7026, 0x0030,
-	0x2001, 0x1817, 0x2004, 0x9084, 0x00ff, 0x7026, 0x20a9, 0x0004,
-	0x20e1, 0x0001, 0x2099, 0x1805, 0x20e9, 0x0000, 0x20a1, 0x0256,
-	0x4003, 0x60c3, 0x001c, 0x015e, 0x0804, 0x939b, 0x0006, 0x2001,
-	0x1836, 0x2004, 0xd0ac, 0x000e, 0x0005, 0x2011, 0x0003, 0x080c,
-	0x975b, 0x2011, 0x0002, 0x080c, 0x9765, 0x080c, 0x9673, 0x0036,
-	0x901e, 0x080c, 0x96e9, 0x003e, 0x0005, 0x2071, 0x188b, 0x7000,
-	0x9005, 0x0140, 0x2001, 0x0976, 0x2071, 0x1800, 0x7072, 0x7076,
-	0x7067, 0xffe0, 0x2071, 0x1800, 0x7070, 0x7052, 0x7057, 0x1cd0,
-	0x0005, 0x00e6, 0x0126, 0x2071, 0x1800, 0x2091, 0x8000, 0x7550,
-	0x9582, 0x0010, 0x0608, 0x7054, 0x2060, 0x6000, 0x9086, 0x0000,
-	0x0148, 0x9ce0, 0x0018, 0x7064, 0x9c02, 0x1208, 0x0cb0, 0x2061,
-	0x1cd0, 0x0c98, 0x6003, 0x0008, 0x8529, 0x7552, 0x9ca8, 0x0018,
-	0x7064, 0x9502, 0x1230, 0x7556, 0x9085, 0x0001, 0x012e, 0x00ee,
-	0x0005, 0x7057, 0x1cd0, 0x0cc0, 0x9006, 0x0cc0, 0x00e6, 0x2071,
-	0x1800, 0x7550, 0x9582, 0x0010, 0x0600, 0x7054, 0x2060, 0x6000,
-	0x9086, 0x0000, 0x0148, 0x9ce0, 0x0018, 0x7064, 0x9c02, 0x1208,
-	0x0cb0, 0x2061, 0x1cd0, 0x0c98, 0x6003, 0x0008, 0x8529, 0x7552,
-	0x9ca8, 0x0018, 0x7064, 0x9502, 0x1228, 0x7556, 0x9085, 0x0001,
-	0x00ee, 0x0005, 0x7057, 0x1cd0, 0x0cc8, 0x9006, 0x0cc8, 0x9c82,
-	0x1cd0, 0x0a0c, 0x0db4, 0x2001, 0x1819, 0x2004, 0x9c02, 0x1a0c,
-	0x0db4, 0x9006, 0x6006, 0x600a, 0x600e, 0x6016, 0x601a, 0x6012,
-	0x6023, 0x0000, 0x6003, 0x0000, 0x601e, 0x6056, 0x605a, 0x6026,
-	0x602a, 0x602e, 0x6032, 0x6036, 0x603a, 0x603e, 0x6042, 0x2061,
-	0x1800, 0x6050, 0x8000, 0x6052, 0x9086, 0x0001, 0x0108, 0x0005,
-	0x0126, 0x2091, 0x8000, 0x080c, 0x898b, 0x012e, 0x0cc0, 0x0006,
-	0x6000, 0x9086, 0x0000, 0x01b0, 0x601c, 0xd084, 0x190c, 0x191f,
-	0x6017, 0x0000, 0x6023, 0x0007, 0x2001, 0x195e, 0x2004, 0x0006,
-	0x9082, 0x0051, 0x000e, 0x0208, 0x8004, 0x601a, 0x080c, 0xd7c1,
-	0x6043, 0x0000, 0x000e, 0x0005, 0x00e6, 0x0126, 0x2071, 0x1800,
-	0x2091, 0x8000, 0x7550, 0x9582, 0x0001, 0x0608, 0x7054, 0x2060,
-	0x6000, 0x9086, 0x0000, 0x0148, 0x9ce0, 0x0018, 0x7064, 0x9c02,
-	0x1208, 0x0cb0, 0x2061, 0x1cd0, 0x0c98, 0x6003, 0x0008, 0x8529,
-	0x7552, 0x9ca8, 0x0018, 0x7064, 0x9502, 0x1230, 0x7556, 0x9085,
-	0x0001, 0x012e, 0x00ee, 0x0005, 0x7057, 0x1cd0, 0x0cc0, 0x9006,
-	0x0cc0, 0x6020, 0x9084, 0x000f, 0x0002, 0x9ebc, 0x9ec5, 0x9ee0,
-	0x9efb, 0xc261, 0xc27e, 0xc299, 0x9ebc, 0x9ec5, 0x9ebc, 0x9f17,
-	0x9ebc, 0x9ebc, 0x9ebc, 0x9ebc, 0x9186, 0x0013, 0x1128, 0x080c,
-	0x887f, 0x080c, 0x898b, 0x0005, 0x0005, 0x0066, 0x6000, 0x90b2,
-	0x0016, 0x1a0c, 0x0db4, 0x0013, 0x006e, 0x0005, 0x9ede, 0xa644,
-	0xa814, 0x9ede, 0xa8a2, 0xa1fa, 0x9ede, 0x9ede, 0xa5c6, 0xae46,
-	0x9ede, 0x9ede, 0x9ede, 0x9ede, 0x9ede, 0x9ede, 0x080c, 0x0db4,
-	0x0066, 0x6000, 0x90b2, 0x0016, 0x1a0c, 0x0db4, 0x0013, 0x006e,
-	0x0005, 0x9ef9, 0xb51d, 0x9ef9, 0x9ef9, 0x9ef9, 0x9ef9, 0x9ef9,
-	0x9ef9, 0xb4bf, 0xb69f, 0x9ef9, 0xb55e, 0xb5dd, 0xb55e, 0xb5dd,
-	0x9ef9, 0x080c, 0x0db4, 0x6000, 0x9082, 0x0016, 0x1a0c, 0x0db4,
-	0x6000, 0x0002, 0x9f15, 0xae8d, 0xaf72, 0xb0a2, 0xb24d, 0x9f15,
-	0x9f15, 0x9f15, 0xae61, 0xb44b, 0xb44e, 0x9f15, 0x9f15, 0x9f15,
-	0x9f15, 0xb47d, 0x9f15, 0x9f15, 0x9f15, 0x080c, 0x0db4, 0x0066,
-	0x6000, 0x90b2, 0x0016, 0x1a0c, 0x0db4, 0x0013, 0x006e, 0x0005,
-	0x9f30, 0x9f30, 0x9f73, 0xa012, 0xa0a7, 0x9f30, 0x9f30, 0x9f30,
-	0x9f32, 0x9f30, 0x9f30, 0x9f30, 0x9f30, 0x9f30, 0x9f30, 0x9f30,
-	0x080c, 0x0db4, 0x9186, 0x004c, 0x0588, 0x9186, 0x0003, 0x190c,
-	0x0db4, 0x0096, 0x601c, 0xc0ed, 0x601e, 0x6003, 0x0003, 0x6106,
-	0x6014, 0x2048, 0xa87c, 0x9084, 0xa000, 0xc0b5, 0xa87e, 0xa8ac,
-	0xa846, 0xa8b0, 0xa84a, 0x9006, 0xa836, 0xa83a, 0xa884, 0x9092,
-	0x199a, 0x0210, 0x2001, 0x1999, 0x8003, 0x8013, 0x8213, 0x9210,
-	0x621a, 0x009e, 0x2c10, 0x080c, 0x1a69, 0x080c, 0x845d, 0x0126,
-	0x2091, 0x8000, 0x080c, 0x8a68, 0x012e, 0x0005, 0x6010, 0x00b6,
-	0x2058, 0xbca0, 0x00be, 0x2c00, 0x080c, 0xa0c9, 0x080c, 0xc253,
-	0x6003, 0x0007, 0x0005, 0x00d6, 0x0096, 0x00f6, 0x2079, 0x1800,
-	0x7a8c, 0x6014, 0x2048, 0xa87c, 0xd0ec, 0x1110, 0x9290, 0x0018,
-	0xac78, 0xc4fc, 0x0046, 0xa8e0, 0x9005, 0x1140, 0xa8dc, 0x921a,
-	0x0140, 0x0220, 0xa87b, 0x0007, 0x2010, 0x0028, 0xa87b, 0x0015,
-	0x0010, 0xa87b, 0x0000, 0x8214, 0xa883, 0x0000, 0xaa02, 0x0006,
-	0x0016, 0x0026, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x2400, 0x9005,
-	0x1108, 0x009a, 0x2100, 0x9086, 0x0015, 0x1118, 0x2001, 0x0001,
-	0x0038, 0x2100, 0x9086, 0x0016, 0x0118, 0x2001, 0x0001, 0x002a,
-	0x94a4, 0x0007, 0x8423, 0x9405, 0x0002, 0x9fda, 0x9fda, 0x9fd5,
-	0x9fd8, 0x9fda, 0x9fd2, 0x9fc5, 0x9fc5, 0x9fc5, 0x9fc5, 0x9fc5,
-	0x9fc5, 0x9fc5, 0x9fc5, 0x9fc5, 0x9fc5, 0x00fe, 0x00ee, 0x00de,
-	0x00ce, 0x002e, 0x001e, 0x000e, 0x004e, 0x00fe, 0x009e, 0x00de,
-	0x080c, 0x0db4, 0x080c, 0xaa85, 0x0028, 0x080c, 0xaba8, 0x0010,
-	0x080c, 0xac97, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x002e, 0x001e,
-	0x2c00, 0xa896, 0x000e, 0x080c, 0xa187, 0x0530, 0xa804, 0xa80e,
-	0x00a6, 0x2050, 0xb100, 0x00ae, 0x8006, 0x8006, 0x8007, 0x90bc,
-	0x003f, 0x9084, 0xffc0, 0x9080, 0x0002, 0xaacc, 0xabd0, 0xacd4,
-	0xadd8, 0x2031, 0x0000, 0x2041, 0x1249, 0x080c, 0xa332, 0x0160,
-	0x000e, 0x9005, 0x0120, 0x00fe, 0x009e, 0x00de, 0x0005, 0x00fe,
-	0x009e, 0x00de, 0x0804, 0x9e2f, 0x2001, 0x002c, 0x900e, 0x080c,
-	0xa1ed, 0x0c70, 0x91b6, 0x0015, 0x0170, 0x91b6, 0x0016, 0x0158,
-	0x91b2, 0x0047, 0x0a0c, 0x0db4, 0x91b2, 0x0050, 0x1a0c, 0x0db4,
-	0x9182, 0x0047, 0x00ca, 0x2001, 0x0109, 0x2004, 0xd08c, 0x0198,
-	0x0126, 0x2091, 0x2800, 0x0006, 0x0016, 0x0026, 0x080c, 0x83b1,
-	0x002e, 0x001e, 0x000e, 0x012e, 0xa001, 0x6000, 0x9086, 0x0002,
-	0x1110, 0x0804, 0x9f73, 0x0005, 0xa045, 0xa045, 0xa047, 0xa07d,
-	0xa045, 0xa045, 0xa045, 0xa045, 0xa090, 0x080c, 0x0db4, 0x00d6,
-	0x0016, 0x0096, 0x080c, 0x893b, 0x080c, 0x8a68, 0x6003, 0x0004,
-	0x6114, 0x2148, 0xa87c, 0xd0fc, 0x01c0, 0xa878, 0xc0fc, 0x9005,
-	0x1158, 0xa894, 0x9005, 0x0140, 0x2001, 0x0000, 0x900e, 0x080c,
-	0xa1ed, 0x080c, 0x9e2f, 0x00a8, 0x6003, 0x0002, 0xa8a4, 0xa9a8,
-	0x9105, 0x1178, 0xa8ae, 0xa8b2, 0x0c78, 0xa87f, 0x0020, 0xa88c,
-	0xa88a, 0xa8a4, 0xa8ae, 0xa8a8, 0xa8b2, 0xa8c7, 0x0000, 0xa8cb,
-	0x0000, 0x009e, 0x001e, 0x00de, 0x0005, 0x080c, 0x893b, 0x00d6,
-	0x0096, 0x6114, 0x2148, 0x080c, 0xbb3b, 0x0120, 0xa87b, 0x0006,
-	0x080c, 0x68a0, 0x009e, 0x00de, 0x080c, 0x9e2f, 0x0804, 0x8a68,
-	0x080c, 0x893b, 0x080c, 0x2fe7, 0x080c, 0xc250, 0x00d6, 0x0096,
-	0x6114, 0x2148, 0x080c, 0xbb3b, 0x0120, 0xa87b, 0x0029, 0x080c,
-	0x68a0, 0x009e, 0x00de, 0x080c, 0x9e2f, 0x0804, 0x8a68, 0x9182,
-	0x0047, 0x0002, 0xa0b7, 0xa0b9, 0xa0b7, 0xa0b7, 0xa0b7, 0xa0b7,
-	0xa0b7, 0xa0b7, 0xa0b7, 0xa0b7, 0xa0b7, 0xa0b7, 0xa0b9, 0x080c,
-	0x0db4, 0x00d6, 0x0096, 0x080c, 0x1511, 0x6114, 0x2148, 0xa87b,
-	0x0000, 0xa883, 0x0000, 0x080c, 0x68a0, 0x009e, 0x00de, 0x0804,
-	0x9e2f, 0x0026, 0x0036, 0x0056, 0x0066, 0x0096, 0x00a6, 0x00f6,
-	0x0006, 0x080c, 0x0feb, 0x000e, 0x090c, 0x0db4, 0xa960, 0x21e8,
-	0xa95c, 0x9188, 0x0019, 0x21a0, 0x900e, 0x20a9, 0x0020, 0x4104,
-	0xa87a, 0x2079, 0x1800, 0x798c, 0x9188, 0x0018, 0x918c, 0x0fff,
-	0xa972, 0xac76, 0x2950, 0x00a6, 0x2001, 0x0205, 0x2003, 0x0000,
-	0x901e, 0x2029, 0x0001, 0x9182, 0x0034, 0x1228, 0x2011, 0x001f,
-	0x080c, 0xb724, 0x04c0, 0x2130, 0x2009, 0x0034, 0x2011, 0x001f,
-	0x080c, 0xb724, 0x96b2, 0x0034, 0xb004, 0x904d, 0x0110, 0x080c,
-	0x0f9d, 0x080c, 0x0feb, 0x01d0, 0x8528, 0xa867, 0x0110, 0xa86b,
-	0x0000, 0x2920, 0xb406, 0x968a, 0x003d, 0x1230, 0x2608, 0x2011,
-	0x001b, 0x080c, 0xb724, 0x00b8, 0x96b2, 0x003c, 0x2009, 0x003c,
-	0x2950, 0x2011, 0x001b, 0x080c, 0xb724, 0x0c18, 0x2001, 0x0205,
-	0x2003, 0x0000, 0x00ae, 0x852f, 0x95ad, 0x0050, 0xb566, 0xb070,
-	0xc0fd, 0xb072, 0x0048, 0x2001, 0x0205, 0x2003, 0x0000, 0x00ae,
-	0x852f, 0x95ad, 0x0050, 0xb566, 0x2a48, 0xa804, 0xa807, 0x0000,
-	0x0006, 0x080c, 0x68a0, 0x000e, 0x2048, 0x9005, 0x1db0, 0x00fe,
-	0x00ae, 0x009e, 0x006e, 0x005e, 0x003e, 0x002e, 0x0005, 0x00d6,
-	0x00f6, 0x0096, 0x0006, 0x080c, 0x0feb, 0x000e, 0x090c, 0x0db4,
-	0xa960, 0x21e8, 0xa95c, 0x9188, 0x0019, 0x21a0, 0x900e, 0x20a9,
-	0x0020, 0x4104, 0xaa66, 0xa87a, 0x2079, 0x1800, 0x798c, 0x810c,
-	0x9188, 0x000c, 0x9182, 0x001a, 0x0210, 0x2009, 0x001a, 0x21a8,
-	0x810b, 0xa972, 0xac76, 0x2e98, 0xa85c, 0x9080, 0x001f, 0x20a0,
-	0x2001, 0x0205, 0x200c, 0x918d, 0x0080, 0x2102, 0x4003, 0x2003,
-	0x0000, 0x080c, 0x68a0, 0x009e, 0x00fe, 0x00de, 0x0005, 0x0016,
-	0x00d6, 0x00f6, 0x0096, 0x0016, 0x2001, 0x0205, 0x200c, 0x918d,
-	0x0080, 0x2102, 0x001e, 0x2079, 0x0200, 0x2e98, 0xa87c, 0xd0ec,
-	0x0118, 0x9e80, 0x000c, 0x2098, 0x2021, 0x003e, 0x901e, 0x9282,
-	0x0020, 0x0218, 0x2011, 0x0020, 0x2018, 0x9486, 0x003e, 0x1170,
-	0x0096, 0x080c, 0x0feb, 0x2900, 0x009e, 0x05c0, 0xa806, 0x2048,
-	0xa860, 0x20e8, 0xa85c, 0x9080, 0x0002, 0x20a0, 0x3300, 0x908e,
-	0x0260, 0x0140, 0x2009, 0x0280, 0x9102, 0x920a, 0x0218, 0x2010,
-	0x2100, 0x9318, 0x2200, 0x9402, 0x1228, 0x2400, 0x9202, 0x2410,
-	0x9318, 0x9006, 0x2020, 0x22a8, 0xa800, 0x9200, 0xa802, 0x20e1,
-	0x0000, 0x4003, 0x83ff, 0x0180, 0x3300, 0x9086, 0x0280, 0x1130,
-	0x7814, 0x8000, 0x9085, 0x0080, 0x7816, 0x2e98, 0x2310, 0x84ff,
-	0x0904, 0xa19c, 0x0804, 0xa19e, 0x9085, 0x0001, 0x7817, 0x0000,
-	0x009e, 0x00fe, 0x00de, 0x001e, 0x0005, 0x00d6, 0x0036, 0x0096,
-	0x6314, 0x2348, 0xa87a, 0xa982, 0x080c, 0x6893, 0x009e, 0x003e,
-	0x00de, 0x0005, 0x91b6, 0x0015, 0x1118, 0x080c, 0x9e2f, 0x0030,
-	0x91b6, 0x0016, 0x190c, 0x0db4, 0x080c, 0x9e2f, 0x0005, 0x20a9,
-	0x000e, 0x20e1, 0x0000, 0x2e98, 0x6014, 0x0096, 0x2048, 0xa860,
-	0x20e8, 0xa85c, 0x20a0, 0x009e, 0x4003, 0x0136, 0x9080, 0x001b,
-	0x20a0, 0x2011, 0x0006, 0x20a9, 0x0001, 0x3418, 0x8318, 0x23a0,
-	0x4003, 0x3318, 0x8318, 0x2398, 0x8211, 0x1db8, 0x2011, 0x0006,
-	0x013e, 0x20a0, 0x3318, 0x8318, 0x2398, 0x4003, 0x3418, 0x8318,
-	0x23a0, 0x8211, 0x1db8, 0x0096, 0x080c, 0xbb3b, 0x0130, 0x6014,
-	0x2048, 0xa807, 0x0000, 0xa867, 0x0103, 0x009e, 0x0804, 0x9e2f,
-	0x0096, 0x00d6, 0x0036, 0x7330, 0x9386, 0x0200, 0x11a8, 0x6010,
-	0x00b6, 0x2058, 0xb8bf, 0x0000, 0x00be, 0x6014, 0x9005, 0x0130,
-	0x2048, 0xa807, 0x0000, 0xa867, 0x0103, 0xab32, 0x080c, 0x9e2f,
-	0x003e, 0x00de, 0x009e, 0x0005, 0x0011, 0x1d48, 0x0cc8, 0x0006,
-	0x0016, 0x080c, 0xc23b, 0x0188, 0x6014, 0x9005, 0x1170, 0x600b,
-	0x0003, 0x601b, 0x0000, 0x6043, 0x0000, 0x2009, 0x0022, 0x080c,
-	0xa61c, 0x9006, 0x001e, 0x000e, 0x0005, 0x9085, 0x0001, 0x0cd0,
-	0x0096, 0x0016, 0x20a9, 0x0014, 0x9e80, 0x000c, 0x20e1, 0x0000,
-	0x2098, 0x6014, 0x2048, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0002,
-	0x20a0, 0x4003, 0x2001, 0x0205, 0x2003, 0x0001, 0x2099, 0x0260,
-	0x20a9, 0x0016, 0x4003, 0x20a9, 0x000a, 0xa804, 0x2048, 0xa860,
+	0x0000, 0x080c, 0xc02e, 0x1180, 0x080c, 0x31b4, 0x080c, 0xc03f,
+	0x1518, 0x080c, 0xaa81, 0x0400, 0x080c, 0x9b78, 0x6824, 0xd084,
+	0x09b0, 0x6827, 0x0001, 0x0898, 0x080c, 0xc03f, 0x1118, 0x080c,
+	0xaa81, 0x0090, 0x6014, 0x2048, 0x080c, 0xbe35, 0x0168, 0x6020,
+	0x9086, 0x0003, 0x1520, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000,
+	0x080c, 0x6ae9, 0x080c, 0xc022, 0x080c, 0xc2ab, 0x080c, 0xa113,
+	0x080c, 0x9a4e, 0x00ce, 0x0804, 0x9f45, 0x2c78, 0x600c, 0x2060,
+	0x0804, 0x9f45, 0x700f, 0x0000, 0x700b, 0x0000, 0x012e, 0x006e,
+	0x009e, 0x00ae, 0x00ce, 0x00de, 0x00ee, 0x00fe, 0x0005, 0x6020,
+	0x9086, 0x0006, 0x1d08, 0x080c, 0xd830, 0x08f0, 0x00d6, 0x0156,
+	0x080c, 0x9179, 0x7a14, 0x82ff, 0x0138, 0x7003, 0x0100, 0x700b,
+	0x0003, 0x60c3, 0x0008, 0x0490, 0x7003, 0x0200, 0x7007, 0x0000,
+	0x2069, 0x1800, 0x901e, 0x6800, 0x9086, 0x0004, 0x1110, 0xc38d,
+	0x0060, 0x080c, 0x7207, 0x1110, 0xc3ad, 0x0008, 0xc3a5, 0x6ad8,
+	0xd29c, 0x1110, 0xd2ac, 0x0108, 0xc39d, 0x730e, 0x2011, 0x1848,
+	0x63f0, 0x2312, 0x20a9, 0x0006, 0x2011, 0x1840, 0x2019, 0x1841,
+	0x2071, 0x0250, 0x2376, 0x8e70, 0x2276, 0x8e70, 0x9398, 0x0002,
+	0x9290, 0x0002, 0x1f04, 0xa00a, 0x60c3, 0x0020, 0x080c, 0x962a,
+	0x015e, 0x00de, 0x0005, 0x0156, 0x080c, 0x9179, 0x7a14, 0x82ff,
+	0x0168, 0x9286, 0xffff, 0x0118, 0x9282, 0x000e, 0x1238, 0x7003,
+	0x0100, 0x700b, 0x0003, 0x60c3, 0x0008, 0x0488, 0x7003, 0x0200,
+	0x7007, 0x001c, 0x700f, 0x0001, 0x2011, 0x1995, 0x2204, 0x8007,
+	0x701a, 0x8210, 0x2204, 0x8007, 0x701e, 0x0421, 0x1120, 0xb8a0,
+	0x9082, 0x007f, 0x0248, 0x2001, 0x181e, 0x2004, 0x7022, 0x2001,
+	0x181f, 0x2004, 0x7026, 0x0030, 0x2001, 0x1817, 0x2004, 0x9084,
+	0x00ff, 0x7026, 0x20a9, 0x0004, 0x20e1, 0x0001, 0x2099, 0x1805,
+	0x20e9, 0x0000, 0x20a1, 0x0256, 0x4003, 0x60c3, 0x001c, 0x015e,
+	0x0804, 0x962a, 0x0006, 0x2001, 0x1836, 0x2004, 0xd0ac, 0x000e,
+	0x0005, 0x2011, 0x0003, 0x080c, 0x9a0f, 0x2011, 0x0002, 0x080c,
+	0x9a19, 0x080c, 0x9927, 0x0036, 0x901e, 0x080c, 0x999d, 0x003e,
+	0x0005, 0x2071, 0x188b, 0x7000, 0x9005, 0x0140, 0x2001, 0x0976,
+	0x2071, 0x1800, 0x7072, 0x7076, 0x7067, 0xffe0, 0x2071, 0x1800,
+	0x7070, 0x7052, 0x7057, 0x1cd0, 0x0005, 0x00e6, 0x0126, 0x2071,
+	0x1800, 0x2091, 0x8000, 0x7550, 0x9582, 0x0010, 0x0608, 0x7054,
+	0x2060, 0x6000, 0x9086, 0x0000, 0x0148, 0x9ce0, 0x0018, 0x7064,
+	0x9c02, 0x1208, 0x0cb0, 0x2061, 0x1cd0, 0x0c98, 0x6003, 0x0008,
+	0x8529, 0x7552, 0x9ca8, 0x0018, 0x7064, 0x9502, 0x1230, 0x7556,
+	0x9085, 0x0001, 0x012e, 0x00ee, 0x0005, 0x7057, 0x1cd0, 0x0cc0,
+	0x9006, 0x0cc0, 0x00e6, 0x2071, 0x1800, 0x7550, 0x9582, 0x0010,
+	0x0600, 0x7054, 0x2060, 0x6000, 0x9086, 0x0000, 0x0148, 0x9ce0,
+	0x0018, 0x7064, 0x9c02, 0x1208, 0x0cb0, 0x2061, 0x1cd0, 0x0c98,
+	0x6003, 0x0008, 0x8529, 0x7552, 0x9ca8, 0x0018, 0x7064, 0x9502,
+	0x1228, 0x7556, 0x9085, 0x0001, 0x00ee, 0x0005, 0x7057, 0x1cd0,
+	0x0cc8, 0x9006, 0x0cc8, 0x9c82, 0x1cd0, 0x0a0c, 0x0dfa, 0x2001,
+	0x1819, 0x2004, 0x9c02, 0x1a0c, 0x0dfa, 0x9006, 0x6006, 0x600a,
+	0x600e, 0x6016, 0x601a, 0x6012, 0x6023, 0x0000, 0x6003, 0x0000,
+	0x601e, 0x6056, 0x605a, 0x6026, 0x602a, 0x602e, 0x6032, 0x6036,
+	0x603a, 0x603e, 0x6042, 0x2061, 0x1800, 0x6050, 0x8000, 0x6052,
+	0x9086, 0x0001, 0x0108, 0x0005, 0x0126, 0x2091, 0x8000, 0x080c,
+	0x8c10, 0x012e, 0x0cc0, 0x0006, 0x6000, 0x9086, 0x0000, 0x01b0,
+	0x601c, 0xd084, 0x190c, 0x19b4, 0x6017, 0x0000, 0x6023, 0x0007,
+	0x2001, 0x195e, 0x2004, 0x0006, 0x9082, 0x0051, 0x000e, 0x0208,
+	0x8004, 0x601a, 0x080c, 0xdae2, 0x6043, 0x0000, 0x000e, 0x0005,
+	0x00e6, 0x0126, 0x2071, 0x1800, 0x2091, 0x8000, 0x7550, 0x9582,
+	0x0001, 0x0608, 0x7054, 0x2060, 0x6000, 0x9086, 0x0000, 0x0148,
+	0x9ce0, 0x0018, 0x7064, 0x9c02, 0x1208, 0x0cb0, 0x2061, 0x1cd0,
+	0x0c98, 0x6003, 0x0008, 0x8529, 0x7552, 0x9ca8, 0x0018, 0x7064,
+	0x9502, 0x1230, 0x7556, 0x9085, 0x0001, 0x012e, 0x00ee, 0x0005,
+	0x7057, 0x1cd0, 0x0cc0, 0x9006, 0x0cc0, 0x6020, 0x9084, 0x000f,
+	0x0002, 0xa170, 0xa179, 0xa194, 0xa1af, 0xc55f, 0xc57c, 0xc597,
+	0xa170, 0xa179, 0xa170, 0xa1cb, 0xa170, 0xa170, 0xa170, 0xa170,
+	0x9186, 0x0013, 0x1128, 0x080c, 0x8b04, 0x080c, 0x8c10, 0x0005,
+	0x0005, 0x0066, 0x6000, 0x90b2, 0x0016, 0x1a0c, 0x0dfa, 0x0013,
+	0x006e, 0x0005, 0xa192, 0xa8f8, 0xaac8, 0xa192, 0xab56, 0xa4ae,
+	0xa192, 0xa192, 0xa87a, 0xb0fa, 0xa192, 0xa192, 0xa192, 0xa192,
+	0xa192, 0xa192, 0x080c, 0x0dfa, 0x0066, 0x6000, 0x90b2, 0x0016,
+	0x1a0c, 0x0dfa, 0x0013, 0x006e, 0x0005, 0xa1ad, 0xb7e1, 0xa1ad,
+	0xa1ad, 0xa1ad, 0xa1ad, 0xa1ad, 0xa1ad, 0xb778, 0xb963, 0xa1ad,
+	0xb822, 0xb8a1, 0xb822, 0xb8a1, 0xa1ad, 0x080c, 0x0dfa, 0x6000,
+	0x9082, 0x0016, 0x1a0c, 0x0dfa, 0x6000, 0x0002, 0xa1c9, 0xb141,
+	0xb226, 0xb356, 0xb505, 0xa1c9, 0xa1c9, 0xa1c9, 0xb115, 0xb704,
+	0xb707, 0xa1c9, 0xa1c9, 0xa1c9, 0xa1c9, 0xb736, 0xa1c9, 0xa1c9,
+	0xa1c9, 0x080c, 0x0dfa, 0x0066, 0x6000, 0x90b2, 0x0016, 0x1a0c,
+	0x0dfa, 0x0013, 0x006e, 0x0005, 0xa1e4, 0xa1e4, 0xa227, 0xa2c6,
+	0xa35b, 0xa1e4, 0xa1e4, 0xa1e4, 0xa1e6, 0xa1e4, 0xa1e4, 0xa1e4,
+	0xa1e4, 0xa1e4, 0xa1e4, 0xa1e4, 0x080c, 0x0dfa, 0x9186, 0x004c,
+	0x0588, 0x9186, 0x0003, 0x190c, 0x0dfa, 0x0096, 0x601c, 0xc0ed,
+	0x601e, 0x6003, 0x0003, 0x6106, 0x6014, 0x2048, 0xa87c, 0x9084,
+	0xa000, 0xc0b5, 0xa87e, 0xa8ac, 0xa846, 0xa8b0, 0xa84a, 0x9006,
+	0xa836, 0xa83a, 0xa884, 0x9092, 0x199a, 0x0210, 0x2001, 0x1999,
+	0x8003, 0x8013, 0x8213, 0x9210, 0x621a, 0x009e, 0x2c10, 0x080c,
+	0x1afe, 0x080c, 0x86de, 0x0126, 0x2091, 0x8000, 0x080c, 0x8ced,
+	0x012e, 0x0005, 0x6010, 0x00b6, 0x2058, 0xbca0, 0x00be, 0x2c00,
+	0x080c, 0xa37d, 0x080c, 0xc551, 0x6003, 0x0007, 0x0005, 0x00d6,
+	0x0096, 0x00f6, 0x2079, 0x1800, 0x7a8c, 0x6014, 0x2048, 0xa87c,
+	0xd0ec, 0x1110, 0x9290, 0x0018, 0xac78, 0xc4fc, 0x0046, 0xa8e0,
+	0x9005, 0x1140, 0xa8dc, 0x921a, 0x0140, 0x0220, 0xa87b, 0x0007,
+	0x2010, 0x0028, 0xa87b, 0x0015, 0x0010, 0xa87b, 0x0000, 0x8214,
+	0xa883, 0x0000, 0xaa02, 0x0006, 0x0016, 0x0026, 0x00c6, 0x00d6,
+	0x00e6, 0x00f6, 0x2400, 0x9005, 0x1108, 0x009a, 0x2100, 0x9086,
+	0x0015, 0x1118, 0x2001, 0x0001, 0x0038, 0x2100, 0x9086, 0x0016,
+	0x0118, 0x2001, 0x0001, 0x002a, 0x94a4, 0x0007, 0x8423, 0x9405,
+	0x0002, 0xa28e, 0xa28e, 0xa289, 0xa28c, 0xa28e, 0xa286, 0xa279,
+	0xa279, 0xa279, 0xa279, 0xa279, 0xa279, 0xa279, 0xa279, 0xa279,
+	0xa279, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x002e, 0x001e, 0x000e,
+	0x004e, 0x00fe, 0x009e, 0x00de, 0x080c, 0x0dfa, 0x080c, 0xad39,
+	0x0028, 0x080c, 0xae5c, 0x0010, 0x080c, 0xaf4b, 0x00fe, 0x00ee,
+	0x00de, 0x00ce, 0x002e, 0x001e, 0x2c00, 0xa896, 0x000e, 0x080c,
+	0xa43b, 0x0530, 0xa804, 0xa80e, 0x00a6, 0x2050, 0xb100, 0x00ae,
+	0x8006, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080,
+	0x0002, 0xaacc, 0xabd0, 0xacd4, 0xadd8, 0x2031, 0x0000, 0x2041,
+	0x12a2, 0x080c, 0xa5e6, 0x0160, 0x000e, 0x9005, 0x0120, 0x00fe,
+	0x009e, 0x00de, 0x0005, 0x00fe, 0x009e, 0x00de, 0x0804, 0xa0e3,
+	0x2001, 0x002c, 0x900e, 0x080c, 0xa4a1, 0x0c70, 0x91b6, 0x0015,
+	0x0170, 0x91b6, 0x0016, 0x0158, 0x91b2, 0x0047, 0x0a0c, 0x0dfa,
+	0x91b2, 0x0050, 0x1a0c, 0x0dfa, 0x9182, 0x0047, 0x00ca, 0x2001,
+	0x0109, 0x2004, 0xd08c, 0x0198, 0x0126, 0x2091, 0x2800, 0x0006,
+	0x0016, 0x0026, 0x080c, 0x8632, 0x002e, 0x001e, 0x000e, 0x012e,
+	0xa001, 0x6000, 0x9086, 0x0002, 0x1110, 0x0804, 0xa227, 0x0005,
+	0xa2f9, 0xa2f9, 0xa2fb, 0xa331, 0xa2f9, 0xa2f9, 0xa2f9, 0xa2f9,
+	0xa344, 0x080c, 0x0dfa, 0x00d6, 0x0016, 0x0096, 0x080c, 0x8bc0,
+	0x080c, 0x8ced, 0x6003, 0x0004, 0x6114, 0x2148, 0xa87c, 0xd0fc,
+	0x01c0, 0xa878, 0xc0fc, 0x9005, 0x1158, 0xa894, 0x9005, 0x0140,
+	0x2001, 0x0000, 0x900e, 0x080c, 0xa4a1, 0x080c, 0xa0e3, 0x00a8,
+	0x6003, 0x0002, 0xa8a4, 0xa9a8, 0x9105, 0x1178, 0xa8ae, 0xa8b2,
+	0x0c78, 0xa87f, 0x0020, 0xa88c, 0xa88a, 0xa8a4, 0xa8ae, 0xa8a8,
+	0xa8b2, 0xa8c7, 0x0000, 0xa8cb, 0x0000, 0x009e, 0x001e, 0x00de,
+	0x0005, 0x080c, 0x8bc0, 0x00d6, 0x0096, 0x6114, 0x2148, 0x080c,
+	0xbe37, 0x0120, 0xa87b, 0x0006, 0x080c, 0x6ae9, 0x009e, 0x00de,
+	0x080c, 0xa0e3, 0x0804, 0x8ced, 0x080c, 0x8bc0, 0x080c, 0x318b,
+	0x080c, 0xc54e, 0x00d6, 0x0096, 0x6114, 0x2148, 0x080c, 0xbe37,
+	0x0120, 0xa87b, 0x0029, 0x080c, 0x6ae9, 0x009e, 0x00de, 0x080c,
+	0xa0e3, 0x0804, 0x8ced, 0x9182, 0x0047, 0x0002, 0xa36b, 0xa36d,
+	0xa36b, 0xa36b, 0xa36b, 0xa36b, 0xa36b, 0xa36b, 0xa36b, 0xa36b,
+	0xa36b, 0xa36b, 0xa36d, 0x080c, 0x0dfa, 0x00d6, 0x0096, 0x080c,
+	0x1582, 0x6114, 0x2148, 0xa87b, 0x0000, 0xa883, 0x0000, 0x080c,
+	0x6ae9, 0x009e, 0x00de, 0x0804, 0xa0e3, 0x0026, 0x0036, 0x0056,
+	0x0066, 0x0096, 0x00a6, 0x00f6, 0x0006, 0x080c, 0x1031, 0x000e,
+	0x090c, 0x0dfa, 0xa960, 0x21e8, 0xa95c, 0x9188, 0x0019, 0x21a0,
+	0x900e, 0x20a9, 0x0020, 0x4104, 0xa87a, 0x2079, 0x1800, 0x798c,
+	0x9188, 0x0018, 0x918c, 0x0fff, 0xa972, 0xac76, 0x2950, 0x00a6,
+	0x2001, 0x0205, 0x2003, 0x0000, 0x901e, 0x2029, 0x0001, 0x9182,
+	0x0034, 0x1228, 0x2011, 0x001f, 0x080c, 0xb9e8, 0x04c0, 0x2130,
+	0x2009, 0x0034, 0x2011, 0x001f, 0x080c, 0xb9e8, 0x96b2, 0x0034,
+	0xb004, 0x904d, 0x0110, 0x080c, 0x0fe3, 0x080c, 0x1031, 0x01d0,
+	0x8528, 0xa867, 0x0110, 0xa86b, 0x0000, 0x2920, 0xb406, 0x968a,
+	0x003d, 0x1230, 0x2608, 0x2011, 0x001b, 0x080c, 0xb9e8, 0x00b8,
+	0x96b2, 0x003c, 0x2009, 0x003c, 0x2950, 0x2011, 0x001b, 0x080c,
+	0xb9e8, 0x0c18, 0x2001, 0x0205, 0x2003, 0x0000, 0x00ae, 0x852f,
+	0x95ad, 0x0050, 0xb566, 0xb070, 0xc0fd, 0xb072, 0x0048, 0x2001,
+	0x0205, 0x2003, 0x0000, 0x00ae, 0x852f, 0x95ad, 0x0050, 0xb566,
+	0x2a48, 0xa804, 0xa807, 0x0000, 0x0006, 0x080c, 0x6ae9, 0x000e,
+	0x2048, 0x9005, 0x1db0, 0x00fe, 0x00ae, 0x009e, 0x006e, 0x005e,
+	0x003e, 0x002e, 0x0005, 0x00d6, 0x00f6, 0x0096, 0x0006, 0x080c,
+	0x1031, 0x000e, 0x090c, 0x0dfa, 0xa960, 0x21e8, 0xa95c, 0x9188,
+	0x0019, 0x21a0, 0x900e, 0x20a9, 0x0020, 0x4104, 0xaa66, 0xa87a,
+	0x2079, 0x1800, 0x798c, 0x810c, 0x9188, 0x000c, 0x9182, 0x001a,
+	0x0210, 0x2009, 0x001a, 0x21a8, 0x810b, 0xa972, 0xac76, 0x2e98,
+	0xa85c, 0x9080, 0x001f, 0x20a0, 0x2001, 0x0205, 0x200c, 0x918d,
+	0x0080, 0x2102, 0x4003, 0x2003, 0x0000, 0x080c, 0x6ae9, 0x009e,
+	0x00fe, 0x00de, 0x0005, 0x0016, 0x00d6, 0x00f6, 0x0096, 0x0016,
+	0x2001, 0x0205, 0x200c, 0x918d, 0x0080, 0x2102, 0x001e, 0x2079,
+	0x0200, 0x2e98, 0xa87c, 0xd0ec, 0x0118, 0x9e80, 0x000c, 0x2098,
+	0x2021, 0x003e, 0x901e, 0x9282, 0x0020, 0x0218, 0x2011, 0x0020,
+	0x2018, 0x9486, 0x003e, 0x1170, 0x0096, 0x080c, 0x1031, 0x2900,
+	0x009e, 0x05c0, 0xa806, 0x2048, 0xa860, 0x20e8, 0xa85c, 0x9080,
+	0x0002, 0x20a0, 0x3300, 0x908e, 0x0260, 0x0140, 0x2009, 0x0280,
+	0x9102, 0x920a, 0x0218, 0x2010, 0x2100, 0x9318, 0x2200, 0x9402,
+	0x1228, 0x2400, 0x9202, 0x2410, 0x9318, 0x9006, 0x2020, 0x22a8,
+	0xa800, 0x9200, 0xa802, 0x20e1, 0x0000, 0x4003, 0x83ff, 0x0180,
+	0x3300, 0x9086, 0x0280, 0x1130, 0x7814, 0x8000, 0x9085, 0x0080,
+	0x7816, 0x2e98, 0x2310, 0x84ff, 0x0904, 0xa450, 0x0804, 0xa452,
+	0x9085, 0x0001, 0x7817, 0x0000, 0x009e, 0x00fe, 0x00de, 0x001e,
+	0x0005, 0x00d6, 0x0036, 0x0096, 0x6314, 0x2348, 0xa87a, 0xa982,
+	0x080c, 0x6adc, 0x009e, 0x003e, 0x00de, 0x0005, 0x91b6, 0x0015,
+	0x1118, 0x080c, 0xa0e3, 0x0030, 0x91b6, 0x0016, 0x190c, 0x0dfa,
+	0x080c, 0xa0e3, 0x0005, 0x20a9, 0x000e, 0x20e1, 0x0000, 0x2e98,
+	0x6014, 0x0096, 0x2048, 0xa860, 0x20e8, 0xa85c, 0x20a0, 0x009e,
+	0x4003, 0x0136, 0x9080, 0x001b, 0x20a0, 0x2011, 0x0006, 0x20a9,
+	0x0001, 0x3418, 0x8318, 0x23a0, 0x4003, 0x3318, 0x8318, 0x2398,
+	0x8211, 0x1db8, 0x2011, 0x0006, 0x013e, 0x20a0, 0x3318, 0x8318,
+	0x2398, 0x4003, 0x3418, 0x8318, 0x23a0, 0x8211, 0x1db8, 0x0096,
+	0x080c, 0xbe37, 0x0130, 0x6014, 0x2048, 0xa807, 0x0000, 0xa867,
+	0x0103, 0x009e, 0x0804, 0xa0e3, 0x0096, 0x00d6, 0x0036, 0x7330,
+	0x9386, 0x0200, 0x11a8, 0x6010, 0x00b6, 0x2058, 0xb8bf, 0x0000,
+	0x00be, 0x6014, 0x9005, 0x0130, 0x2048, 0xa807, 0x0000, 0xa867,
+	0x0103, 0xab32, 0x080c, 0xa0e3, 0x003e, 0x00de, 0x009e, 0x0005,
+	0x0011, 0x1d48, 0x0cc8, 0x0006, 0x0016, 0x080c, 0xc539, 0x0188,
+	0x6014, 0x9005, 0x1170, 0x600b, 0x0003, 0x601b, 0x0000, 0x6043,
+	0x0000, 0x2009, 0x0022, 0x080c, 0xa8d0, 0x9006, 0x001e, 0x000e,
+	0x0005, 0x9085, 0x0001, 0x0cd0, 0x0096, 0x0016, 0x20a9, 0x0014,
+	0x9e80, 0x000c, 0x20e1, 0x0000, 0x2098, 0x6014, 0x2048, 0xa860,
 	0x20e8, 0xa85c, 0x9080, 0x0002, 0x20a0, 0x4003, 0x2001, 0x0205,
-	0x2003, 0x0002, 0x2099, 0x0260, 0x20a9, 0x0020, 0x4003, 0x2003,
-	0x0000, 0x6014, 0x2048, 0xa800, 0x2048, 0xa867, 0x0103, 0x080c,
-	0x9e2f, 0x001e, 0x009e, 0x0005, 0x0096, 0x0016, 0x900e, 0x7030,
-	0x9086, 0x0100, 0x0140, 0x7038, 0x9084, 0x00ff, 0x800c, 0x703c,
-	0x9084, 0x00ff, 0x8004, 0x9080, 0x0004, 0x9108, 0x810b, 0x2011,
-	0x0002, 0x2019, 0x000c, 0x6014, 0x2048, 0x080c, 0xb724, 0x080c,
-	0xbb3b, 0x0140, 0x6014, 0x2048, 0xa807, 0x0000, 0xa864, 0xa8e2,
-	0xa867, 0x0103, 0x080c, 0x9e2f, 0x001e, 0x009e, 0x0005, 0x0016,
-	0x0096, 0x7030, 0x9086, 0x0100, 0x1118, 0x2009, 0x0004, 0x0010,
-	0x7034, 0x800c, 0x810b, 0x2011, 0x000c, 0x2019, 0x000c, 0x6014,
-	0x2048, 0xa804, 0x0096, 0x9005, 0x0108, 0x2048, 0x080c, 0xb724,
-	0x009e, 0x080c, 0xbb3b, 0x0148, 0xa804, 0x9005, 0x1158, 0xa807,
-	0x0000, 0xa864, 0xa8e2, 0xa867, 0x0103, 0x080c, 0x9e2f, 0x009e,
-	0x001e, 0x0005, 0x0086, 0x2040, 0xa030, 0x8007, 0x9086, 0x0100,
-	0x1118, 0x080c, 0xa7cd, 0x00e0, 0xa034, 0x8007, 0x800c, 0x8806,
-	0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x000c,
-	0xa87b, 0x0000, 0xa883, 0x0000, 0xa897, 0x4000, 0xaaa0, 0xab9c,
-	0xaca8, 0xada4, 0x2031, 0x0000, 0x2041, 0x122f, 0x0019, 0x0d08,
-	0x008e, 0x0898, 0x0096, 0x0006, 0x080c, 0x0feb, 0x000e, 0x01b0,
-	0xa8ab, 0x0dcb, 0xa876, 0x000e, 0xa8a2, 0x0006, 0xae6a, 0x2800,
-	0xa89e, 0xa97a, 0xaf72, 0xaa8e, 0xab92, 0xac96, 0xad9a, 0x0086,
-	0x2940, 0x080c, 0x10d5, 0x008e, 0x9085, 0x0001, 0x009e, 0x0005,
-	0x00e6, 0x00d6, 0x0026, 0x7008, 0x9084, 0x00ff, 0x6210, 0x00b6,
-	0x2258, 0xba10, 0x00be, 0x9206, 0x1520, 0x700c, 0x6210, 0x00b6,
-	0x2258, 0xba14, 0x00be, 0x9206, 0x11e0, 0x6043, 0x0000, 0x2c68,
-	0x0016, 0x2009, 0x0035, 0x080c, 0xc1b3, 0x001e, 0x1158, 0x622c,
-	0x2268, 0x2071, 0x026c, 0x6b20, 0x9386, 0x0003, 0x0130, 0x9386,
-	0x0006, 0x0128, 0x080c, 0x9e2f, 0x0020, 0x0039, 0x0010, 0x080c,
-	0xa451, 0x002e, 0x00de, 0x00ee, 0x0005, 0x0096, 0x6814, 0x2048,
-	0x9186, 0x0015, 0x0904, 0xa439, 0x918e, 0x0016, 0x1904, 0xa44f,
-	0x700c, 0x908c, 0xff00, 0x9186, 0x1700, 0x0120, 0x9186, 0x0300,
-	0x1904, 0xa413, 0x89ff, 0x1138, 0x6800, 0x9086, 0x000f, 0x0904,
-	0xa3f6, 0x0804, 0xa44d, 0x6808, 0x9086, 0xffff, 0x1904, 0xa43b,
-	0xa87c, 0x9084, 0x0060, 0x9086, 0x0020, 0x1128, 0xa83c, 0xa940,
-	0x9105, 0x1904, 0xa43b, 0x6824, 0xd084, 0x1904, 0xa43b, 0xd0b4,
-	0x0158, 0x0016, 0x2001, 0x195e, 0x200c, 0x6018, 0x9102, 0x9082,
-	0x0005, 0x001e, 0x1a04, 0xa43b, 0x080c, 0xbd24, 0x685c, 0xa882,
-	0xa87c, 0xc0dc, 0xc0f4, 0xc0d4, 0xa87e, 0x0026, 0x900e, 0x6a18,
-	0x2001, 0x000a, 0x080c, 0x8277, 0xa884, 0x920a, 0x0208, 0x8011,
-	0xaa86, 0x82ff, 0x002e, 0x1138, 0x00c6, 0x2d60, 0x080c, 0xb84e,
-	0x00ce, 0x0804, 0xa44d, 0x00c6, 0xa868, 0xd0fc, 0x1118, 0x080c,
-	0x5d61, 0x0010, 0x080c, 0x610c, 0x00ce, 0x1904, 0xa43b, 0x00c6,
-	0x2d60, 0x080c, 0x9e2f, 0x00ce, 0x0804, 0xa44d, 0x00c6, 0x080c,
-	0x9e7c, 0x0198, 0x6017, 0x0000, 0x6810, 0x6012, 0x080c, 0xbfb5,
-	0x6023, 0x0003, 0x6904, 0x00c6, 0x2d60, 0x080c, 0x9e2f, 0x00ce,
-	0x080c, 0x9ea9, 0x00ce, 0x0804, 0xa44d, 0x2001, 0x1960, 0x2004,
-	0x6842, 0x00ce, 0x04d0, 0x7008, 0x9086, 0x000b, 0x11c8, 0x6010,
-	0x00b6, 0x2058, 0xb900, 0xc1bc, 0xb902, 0x00be, 0x00c6, 0x2d60,
-	0xa87b, 0x0003, 0x080c, 0xc1f5, 0x6007, 0x0085, 0x6003, 0x000b,
-	0x6023, 0x0002, 0x080c, 0x83f8, 0x080c, 0x898b, 0x00ce, 0x00e8,
-	0x700c, 0x9086, 0x2a00, 0x1138, 0x2001, 0x1960, 0x2004, 0x6842,
-	0x00a0, 0x0479, 0x00a0, 0x89ff, 0x090c, 0x0db4, 0x00c6, 0x00d6,
-	0x2d60, 0xa867, 0x0103, 0xa87b, 0x0003, 0x080c, 0x66bb, 0x080c,
-	0xbd24, 0x080c, 0x9e5f, 0x00de, 0x00ce, 0x080c, 0x9e2f, 0x009e,
-	0x0005, 0x9186, 0x0015, 0x1128, 0x2001, 0x1960, 0x2004, 0x6842,
-	0x0068, 0x918e, 0x0016, 0x1160, 0x00c6, 0x2d00, 0x2060, 0x080c,
-	0xd7c1, 0x080c, 0x820b, 0x080c, 0x9e2f, 0x00ce, 0x080c, 0x9e2f,
-	0x0005, 0x0026, 0x0036, 0x0046, 0x7228, 0xacb0, 0xabac, 0xd2f4,
-	0x0130, 0x2001, 0x1960, 0x2004, 0x6842, 0x0804, 0xa4cb, 0x00c6,
-	0x2d60, 0x080c, 0xb74f, 0x00ce, 0x6804, 0x9086, 0x0050, 0x1168,
-	0x00c6, 0x2d00, 0x2060, 0x6003, 0x0001, 0x6007, 0x0050, 0x080c,
-	0x83f8, 0x080c, 0x898b, 0x00ce, 0x04f0, 0x6800, 0x9086, 0x000f,
-	0x01a8, 0x89ff, 0x090c, 0x0db4, 0x6800, 0x9086, 0x0004, 0x1190,
-	0xa87c, 0xd0ac, 0x0178, 0xa843, 0x0fff, 0xa83f, 0x0fff, 0xa880,
-	0xc0fc, 0xa882, 0x2001, 0x0001, 0x6832, 0x0400, 0x2001, 0x0007,
-	0x6832, 0x00e0, 0xa87c, 0xd0b4, 0x1150, 0xd0ac, 0x0db8, 0x6824,
-	0xd0f4, 0x1d48, 0xa838, 0xa934, 0x9105, 0x0d80, 0x0c20, 0xd2ec,
-	0x1d68, 0x7024, 0x9306, 0x1118, 0x7020, 0x9406, 0x0d38, 0x7020,
-	0x683e, 0x7024, 0x683a, 0x2001, 0x0005, 0x6832, 0x080c, 0xbeac,
-	0x080c, 0x898b, 0x0010, 0x080c, 0x9e2f, 0x004e, 0x003e, 0x002e,
-	0x0005, 0x00e6, 0x00d6, 0x0026, 0x7008, 0x9084, 0x00ff, 0x6210,
-	0x00b6, 0x2258, 0xba10, 0x00be, 0x9206, 0x1904, 0xa536, 0x700c,
-	0x6210, 0x00b6, 0x2258, 0xba14, 0x00be, 0x9206, 0x1904, 0xa536,
-	0x6038, 0x2068, 0x6824, 0xc0dc, 0x6826, 0x6a20, 0x9286, 0x0007,
-	0x0904, 0xa536, 0x9286, 0x0002, 0x0904, 0xa536, 0x9286, 0x0000,
-	0x05e8, 0x6808, 0x633c, 0x9306, 0x15c8, 0x2071, 0x026c, 0x9186,
-	0x0015, 0x0570, 0x918e, 0x0016, 0x1100, 0x00c6, 0x6038, 0x2060,
-	0x6104, 0x9186, 0x004b, 0x01c0, 0x9186, 0x004c, 0x01a8, 0x9186,
-	0x004d, 0x0190, 0x9186, 0x004e, 0x0178, 0x9186, 0x0052, 0x0160,
-	0x6014, 0x0096, 0x2048, 0x080c, 0xbb3b, 0x090c, 0x0db4, 0xa87b,
-	0x0003, 0x009e, 0x080c, 0xc1f5, 0x6007, 0x0085, 0x6003, 0x000b,
-	0x6023, 0x0002, 0x080c, 0x83f8, 0x080c, 0x898b, 0x00ce, 0x0030,
-	0x6038, 0x2070, 0x2001, 0x1960, 0x2004, 0x7042, 0x080c, 0x9e2f,
-	0x002e, 0x00de, 0x00ee, 0x0005, 0x00b6, 0x0096, 0x00f6, 0x6014,
-	0x2048, 0x6010, 0x2058, 0x91b6, 0x0015, 0x0130, 0xba08, 0xbb0c,
-	0xbc00, 0xc48c, 0xbc02, 0x0460, 0x0096, 0x0156, 0x0036, 0x0026,
-	0x2b48, 0x9e90, 0x0010, 0x2019, 0x000a, 0x20a9, 0x0004, 0x080c,
-	0xae1c, 0x002e, 0x003e, 0x015e, 0x009e, 0x1904, 0xa5a5, 0x0096,
-	0x0156, 0x0036, 0x0026, 0x2b48, 0x9e90, 0x0014, 0x2019, 0x0006,
-	0x20a9, 0x0004, 0x080c, 0xae1c, 0x002e, 0x003e, 0x015e, 0x009e,
-	0x15a0, 0x7238, 0xba0a, 0x733c, 0xbb0e, 0xbc00, 0xc48d, 0xbc02,
-	0xa804, 0x9005, 0x1128, 0x00fe, 0x009e, 0x00be, 0x0804, 0xa233,
-	0x0096, 0x2048, 0xaa12, 0xab16, 0xac0a, 0x009e, 0x8006, 0x8006,
-	0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0002, 0x2009,
-	0x002b, 0xaaa0, 0xab9c, 0xaca8, 0xada4, 0x2031, 0x0000, 0x2041,
-	0x122f, 0x080c, 0xa332, 0x0130, 0x00fe, 0x009e, 0x080c, 0x9e2f,
-	0x00be, 0x0005, 0x080c, 0xa7cd, 0x0cb8, 0x2b78, 0x00f6, 0x080c,
-	0x2fe7, 0x080c, 0xc250, 0x00fe, 0x00c6, 0x080c, 0x9dd9, 0x2f00,
-	0x6012, 0x6017, 0x0000, 0x6023, 0x0001, 0x6007, 0x0001, 0x6003,
-	0x0001, 0x2001, 0x0007, 0x080c, 0x61a7, 0x080c, 0x61d3, 0x080c,
-	0x8440, 0x080c, 0x898b, 0x00ce, 0x0804, 0xa578, 0x2100, 0x91b2,
-	0x0053, 0x1a0c, 0x0db4, 0x91b2, 0x0040, 0x1a04, 0xa62e, 0x0002,
-	0xa61c, 0xa61c, 0xa612, 0xa61c, 0xa61c, 0xa61c, 0xa610, 0xa610,
-	0xa610, 0xa610, 0xa610, 0xa610, 0xa610, 0xa610, 0xa610, 0xa610,
-	0xa610, 0xa610, 0xa610, 0xa610, 0xa610, 0xa610, 0xa610, 0xa610,
-	0xa610, 0xa610, 0xa610, 0xa610, 0xa610, 0xa610, 0xa610, 0xa61c,
-	0xa610, 0xa61c, 0xa61c, 0xa610, 0xa610, 0xa610, 0xa610, 0xa610,
-	0xa612, 0xa610, 0xa610, 0xa610, 0xa610, 0xa610, 0xa610, 0xa610,
-	0xa610, 0xa610, 0xa61c, 0xa61c, 0xa610, 0xa610, 0xa610, 0xa610,
-	0xa610, 0xa610, 0xa610, 0xa610, 0xa610, 0xa61c, 0xa610, 0xa610,
-	0x080c, 0x0db4, 0x0066, 0x00b6, 0x6610, 0x2658, 0xb8bc, 0xc08c,
-	0xb8be, 0x00be, 0x006e, 0x0000, 0x6003, 0x0001, 0x6106, 0x9186,
-	0x0032, 0x0118, 0x080c, 0x8440, 0x0010, 0x080c, 0x83f8, 0x0126,
-	0x2091, 0x8000, 0x080c, 0x898b, 0x012e, 0x0005, 0x2600, 0x0002,
-	0xa642, 0xa642, 0xa642, 0xa61c, 0xa61c, 0xa642, 0xa642, 0xa642,
-	0xa642, 0xa61c, 0xa642, 0xa61c, 0xa642, 0xa61c, 0xa642, 0xa642,
-	0xa642, 0xa642, 0x080c, 0x0db4, 0x6004, 0x90b2, 0x0053, 0x1a0c,
-	0x0db4, 0x91b6, 0x0013, 0x0904, 0xa706, 0x91b6, 0x0027, 0x1904,
-	0xa6c1, 0x080c, 0x887f, 0x6004, 0x080c, 0xbd30, 0x01b0, 0x080c,
-	0xbd41, 0x01a8, 0x908e, 0x0021, 0x0904, 0xa6be, 0x908e, 0x0022,
-	0x1130, 0x080c, 0xa25f, 0x0904, 0xa6ba, 0x0804, 0xa6bb, 0x908e,
-	0x003d, 0x0904, 0xa6be, 0x0804, 0xa6b4, 0x080c, 0x3010, 0x2001,
-	0x0007, 0x080c, 0x61a7, 0x6010, 0x00b6, 0x2058, 0xb9a0, 0x00be,
-	0x080c, 0xa7cd, 0x9186, 0x007e, 0x1148, 0x2001, 0x1836, 0x2014,
-	0xc285, 0x080c, 0x6faa, 0x1108, 0xc2ad, 0x2202, 0x0036, 0x0026,
-	0x2019, 0x0028, 0x2110, 0x080c, 0xd81c, 0x002e, 0x003e, 0x0016,
-	0x0026, 0x0036, 0x2110, 0x2019, 0x0028, 0x080c, 0x8582, 0x0076,
-	0x903e, 0x080c, 0x8470, 0x6010, 0x00b6, 0x905d, 0x0100, 0x00be,
-	0x2c08, 0x080c, 0xd2d5, 0x007e, 0x003e, 0x002e, 0x001e, 0x080c,
-	0xc250, 0x0016, 0x080c, 0xbfad, 0x080c, 0x9e2f, 0x001e, 0x080c,
-	0x30e2, 0x080c, 0x898b, 0x0030, 0x080c, 0xbfad, 0x080c, 0x9e2f,
-	0x080c, 0x898b, 0x0005, 0x080c, 0xa7cd, 0x0cb0, 0x080c, 0xa809,
-	0x0c98, 0x9186, 0x0014, 0x1db0, 0x080c, 0x887f, 0x6004, 0x908e,
-	0x0022, 0x1118, 0x080c, 0xa25f, 0x0d68, 0x080c, 0x2fe7, 0x080c,
-	0xc250, 0x080c, 0xbd30, 0x1190, 0x080c, 0x3010, 0x6010, 0x00b6,
-	0x2058, 0xb9a0, 0x00be, 0x080c, 0xa7cd, 0x9186, 0x007e, 0x1128,
-	0x2001, 0x1836, 0x200c, 0xc185, 0x2102, 0x0870, 0x080c, 0xbd41,
-	0x1118, 0x080c, 0xa7cd, 0x0840, 0x6004, 0x908e, 0x0032, 0x1160,
-	0x00e6, 0x00f6, 0x2071, 0x189c, 0x2079, 0x0000, 0x080c, 0x3376,
-	0x00fe, 0x00ee, 0x0804, 0xa6b4, 0x6004, 0x908e, 0x0021, 0x0d48,
-	0x908e, 0x0022, 0x090c, 0xa7cd, 0x0804, 0xa6b4, 0x90b2, 0x0040,
-	0x1a04, 0xa7b6, 0x2008, 0x0002, 0xa74e, 0xa74f, 0xa752, 0xa755,
-	0xa758, 0xa75b, 0xa74c, 0xa74c, 0xa74c, 0xa74c, 0xa74c, 0xa74c,
-	0xa74c, 0xa74c, 0xa74c, 0xa74c, 0xa74c, 0xa74c, 0xa74c, 0xa74c,
-	0xa74c, 0xa74c, 0xa74c, 0xa74c, 0xa74c, 0xa74c, 0xa74c, 0xa74c,
-	0xa74c, 0xa74c, 0xa75e, 0xa76b, 0xa74c, 0xa76d, 0xa76b, 0xa74c,
-	0xa74c, 0xa74c, 0xa74c, 0xa74c, 0xa76b, 0xa76b, 0xa74c, 0xa74c,
-	0xa74c, 0xa74c, 0xa74c, 0xa74c, 0xa74c, 0xa74c, 0xa79d, 0xa76b,
-	0xa74c, 0xa767, 0xa74c, 0xa74c, 0xa74c, 0xa768, 0xa74c, 0xa74c,
-	0xa74c, 0xa76b, 0xa794, 0xa74c, 0x080c, 0x0db4, 0x00e0, 0x2001,
-	0x000b, 0x0420, 0x2001, 0x0003, 0x0408, 0x2001, 0x0005, 0x00f0,
-	0x2001, 0x0001, 0x00d8, 0x2001, 0x0009, 0x00c0, 0x080c, 0x887f,
-	0x6003, 0x0005, 0x080c, 0xc253, 0x080c, 0x898b, 0x0070, 0x0018,
-	0x0010, 0x080c, 0x61a7, 0x0804, 0xa7ae, 0x080c, 0x887f, 0x080c,
-	0xc253, 0x6003, 0x0004, 0x080c, 0x898b, 0x0005, 0x080c, 0x61a7,
-	0x080c, 0x887f, 0x6003, 0x0002, 0x0036, 0x2019, 0x1866, 0x2304,
-	0x9084, 0xff00, 0x1120, 0x2001, 0x195e, 0x201c, 0x0040, 0x8007,
-	0x909a, 0x0004, 0x0ec0, 0x8003, 0x801b, 0x831b, 0x9318, 0x631a,
-	0x003e, 0x080c, 0x898b, 0x0c08, 0x080c, 0x887f, 0x080c, 0xbfad,
-	0x080c, 0x9e2f, 0x080c, 0x898b, 0x08c0, 0x00e6, 0x00f6, 0x2071,
-	0x189c, 0x2079, 0x0000, 0x080c, 0x3376, 0x00fe, 0x00ee, 0x080c,
-	0x887f, 0x080c, 0x9e2f, 0x080c, 0x898b, 0x0838, 0x080c, 0x887f,
-	0x6003, 0x0002, 0x080c, 0xc253, 0x0804, 0x898b, 0x2600, 0x2008,
-	0x0002, 0xa7cb, 0xa7cb, 0xa7cb, 0xa7ae, 0xa7ae, 0xa7cb, 0xa7cb,
-	0xa7cb, 0xa7cb, 0xa7ae, 0xa7cb, 0xa7ae, 0xa7cb, 0xa7ae, 0xa7cb,
-	0xa7cb, 0xa7cb, 0xa7cb, 0x080c, 0x0db4, 0x00e6, 0x0096, 0x0026,
-	0x0016, 0x080c, 0xbb3b, 0x0568, 0x6014, 0x2048, 0xa864, 0x9086,
-	0x0139, 0x11a8, 0xa894, 0x9086, 0x0056, 0x1148, 0x080c, 0x5143,
-	0x0130, 0x2001, 0x0000, 0x900e, 0x2011, 0x4000, 0x0028, 0x2001,
-	0x0030, 0x900e, 0x2011, 0x4005, 0x080c, 0xc11a, 0x0090, 0xa868,
-	0xd0fc, 0x0178, 0xa807, 0x0000, 0x0016, 0x6004, 0x908e, 0x0021,
-	0x0168, 0x908e, 0x003d, 0x0150, 0x001e, 0xa867, 0x0103, 0xa833,
-	0x0100, 0x001e, 0x002e, 0x009e, 0x00ee, 0x0005, 0x001e, 0x0009,
-	0x0cc0, 0x0096, 0x6014, 0x2048, 0xa800, 0x2048, 0xa867, 0x0103,
-	0xa823, 0x8001, 0x009e, 0x0005, 0x00b6, 0x6610, 0x2658, 0xb804,
-	0x9084, 0x00ff, 0x90b2, 0x000c, 0x1a0c, 0x0db4, 0x6604, 0x96b6,
-	0x004d, 0x1120, 0x080c, 0xc039, 0x0804, 0xa891, 0x6604, 0x96b6,
-	0x0043, 0x1120, 0x080c, 0xc082, 0x0804, 0xa891, 0x6604, 0x96b6,
-	0x004b, 0x1120, 0x080c, 0xc0ae, 0x0804, 0xa891, 0x6604, 0x96b6,
-	0x0033, 0x1120, 0x080c, 0xbfcf, 0x0804, 0xa891, 0x6604, 0x96b6,
-	0x0028, 0x1120, 0x080c, 0xbd7f, 0x0804, 0xa891, 0x6604, 0x96b6,
-	0x0029, 0x1120, 0x080c, 0xbdc0, 0x0804, 0xa891, 0x6604, 0x96b6,
-	0x001f, 0x1118, 0x080c, 0xa207, 0x04e0, 0x6604, 0x96b6, 0x0000,
-	0x1118, 0x080c, 0xa53c, 0x04a8, 0x6604, 0x96b6, 0x0022, 0x1118,
-	0x080c, 0xa240, 0x0470, 0x6604, 0x96b6, 0x0035, 0x1118, 0x080c,
-	0xa350, 0x0438, 0x6604, 0x96b6, 0x0039, 0x1118, 0x080c, 0xa4d1,
-	0x0400, 0x6604, 0x96b6, 0x003d, 0x1118, 0x080c, 0xa278, 0x00c8,
-	0x6604, 0x96b6, 0x0044, 0x1118, 0x080c, 0xa2b4, 0x0090, 0x6604,
-	0x96b6, 0x0049, 0x1118, 0x080c, 0xa2df, 0x0058, 0x91b6, 0x0015,
-	0x1110, 0x0063, 0x0030, 0x91b6, 0x0016, 0x1128, 0x00be, 0x0804,
-	0xab51, 0x00be, 0x0005, 0x080c, 0x9ec4, 0x0cd8, 0xa8ae, 0xa8b1,
-	0xa8ae, 0xa8f5, 0xa8ae, 0xaa85, 0xab5e, 0xa8ae, 0xa8ae, 0xab2b,
-	0xa8ae, 0xab3f, 0x0096, 0x080c, 0x1511, 0x6014, 0x2048, 0xa800,
-	0x2048, 0xa867, 0x0103, 0x009e, 0x0804, 0x9e2f, 0xa001, 0xa001,
-	0x0005, 0x00e6, 0x2071, 0x1800, 0x708c, 0x9086, 0x0074, 0x1540,
-	0x080c, 0xd2a6, 0x11b0, 0x6010, 0x00b6, 0x2058, 0x7030, 0xd08c,
-	0x0128, 0xb800, 0xd0bc, 0x0110, 0xc0c5, 0xb802, 0x00e9, 0x00be,
-	0x2001, 0x0006, 0x080c, 0x61a7, 0x080c, 0x3010, 0x080c, 0x9e2f,
-	0x0088, 0x2001, 0x000a, 0x080c, 0x61a7, 0x080c, 0x3010, 0x6003,
-	0x0001, 0x6007, 0x0001, 0x080c, 0x8440, 0x080c, 0x898b, 0x0010,
-	0x080c, 0xaa70, 0x00ee, 0x0005, 0x00d6, 0xb800, 0xd084, 0x0158,
-	0x9006, 0x080c, 0x6193, 0x2069, 0x185b, 0x6804, 0x0020, 0x2001,
-	0x0006, 0x080c, 0x61d3, 0x00de, 0x0005, 0x00b6, 0x0096, 0x00d6,
-	0x2011, 0x1823, 0x2204, 0x9086, 0x0074, 0x1904, 0xaa47, 0x6010,
-	0x2058, 0xbaa0, 0x9286, 0x007e, 0x1120, 0x080c, 0xaca2, 0x0804,
-	0xa9ac, 0x00d6, 0x080c, 0x6faa, 0x0198, 0x0026, 0x2011, 0x0010,
-	0x080c, 0x659e, 0x002e, 0x05c8, 0x080c, 0x53ae, 0x1540, 0x6014,
-	0x2048, 0xa807, 0x0000, 0xa867, 0x0103, 0xa833, 0xdead, 0x00f8,
-	0x0026, 0x2011, 0x8008, 0x080c, 0x659e, 0x002e, 0x0530, 0x6014,
-	0x2048, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0039, 0x1140, 0x2001,
-	0x0030, 0x900e, 0x2011, 0x4009, 0x080c, 0xc11a, 0x0040, 0x6014,
-	0x2048, 0xa807, 0x0000, 0xa867, 0x0103, 0xa833, 0xdead, 0x6010,
-	0x2058, 0xb9a0, 0x0016, 0x080c, 0x3010, 0x080c, 0x9e2f, 0x001e,
-	0x080c, 0x30e2, 0x00de, 0x0804, 0xaa4a, 0x00de, 0x080c, 0xac97,
-	0x6010, 0x2058, 0xbaa0, 0x9286, 0x0080, 0x1510, 0x6014, 0x9005,
-	0x01a8, 0x2048, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0039, 0x1140,
-	0x2001, 0x0000, 0x900e, 0x2011, 0x4000, 0x080c, 0xc11a, 0x0030,
-	0xa807, 0x0000, 0xa867, 0x0103, 0xa833, 0x0200, 0x2001, 0x0006,
-	0x080c, 0x61a7, 0x080c, 0x3010, 0x080c, 0x9e2f, 0x0804, 0xaa4a,
-	0x080c, 0xaa58, 0x6014, 0x9005, 0x0190, 0x2048, 0xa868, 0xd0f4,
-	0x01e8, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0039, 0x1d08, 0x2001,
-	0x0000, 0x900e, 0x2011, 0x4000, 0x080c, 0xc11a, 0x08f8, 0x080c,
-	0xaa4e, 0x0160, 0x9006, 0x080c, 0x6193, 0x2001, 0x0004, 0x080c,
-	0x61d3, 0x2001, 0x0007, 0x080c, 0x61a7, 0x08a0, 0x2001, 0x0004,
-	0x080c, 0x61a7, 0x6003, 0x0001, 0x6007, 0x0003, 0x080c, 0x8440,
-	0x080c, 0x898b, 0x0804, 0xaa4a, 0xb85c, 0xd0e4, 0x01d0, 0x080c,
-	0xbf4f, 0x080c, 0x6faa, 0x0118, 0xd0dc, 0x1904, 0xa96e, 0x2011,
-	0x1836, 0x2204, 0xc0ad, 0x2012, 0x2001, 0x0002, 0x00f6, 0x2079,
-	0x0100, 0x78e3, 0x0000, 0x080c, 0x26e4, 0x78e2, 0x00fe, 0x0804,
-	0xa96e, 0x080c, 0xbf8c, 0x2011, 0x1836, 0x2204, 0xc0a5, 0x2012,
-	0x0006, 0x080c, 0xd3ff, 0x000e, 0x1904, 0xa96e, 0xc0b5, 0x2012,
-	0x2001, 0x0006, 0x080c, 0x61a7, 0x9006, 0x080c, 0x6193, 0x00c6,
-	0x2001, 0x180f, 0x2004, 0xd09c, 0x0520, 0x00f6, 0x2079, 0x0100,
-	0x00e6, 0x2071, 0x1800, 0x700c, 0x9084, 0x00ff, 0x78e6, 0x707a,
-	0x7010, 0x78ea, 0x707e, 0x908c, 0x00ff, 0x00ee, 0x780c, 0xc0b5,
-	0x780e, 0x00fe, 0x080c, 0x26b9, 0x00f6, 0x2100, 0x900e, 0x080c,
-	0x2670, 0x795a, 0x00fe, 0x9186, 0x0081, 0x01d8, 0x2009, 0x0081,
-	0x00c8, 0x2009, 0x00ef, 0x00f6, 0x2079, 0x0100, 0x79ea, 0x7932,
-	0x7936, 0x780c, 0xc0b5, 0x780e, 0x00fe, 0x080c, 0x26b9, 0x00f6,
-	0x2079, 0x1800, 0x797e, 0x2100, 0x900e, 0x080c, 0x2670, 0x795a,
-	0x00fe, 0x8108, 0x080c, 0x61f6, 0x2b00, 0x00ce, 0x1904, 0xa96e,
-	0x6012, 0x2009, 0x180f, 0x210c, 0xd19c, 0x0150, 0x2009, 0x027c,
-	0x210c, 0x918c, 0x00ff, 0xb912, 0x2009, 0x027d, 0x210c, 0xb916,
-	0x2001, 0x0002, 0x080c, 0x61a7, 0x6023, 0x0001, 0x6003, 0x0001,
-	0x6007, 0x0002, 0x080c, 0x8440, 0x080c, 0x898b, 0x0018, 0x080c,
-	0xa7cd, 0x0431, 0x00de, 0x009e, 0x00be, 0x0005, 0x2001, 0x1810,
-	0x2004, 0xd0a4, 0x0120, 0x2001, 0x185c, 0x2004, 0xd0ac, 0x0005,
-	0x00e6, 0x080c, 0xd875, 0x0190, 0x2071, 0x0260, 0x7108, 0x720c,
-	0x918c, 0x00ff, 0x1118, 0x9284, 0xff00, 0x0140, 0x6010, 0x2058,
-	0xb8a0, 0x9084, 0xff80, 0x1110, 0xb912, 0xba16, 0x00ee, 0x0005,
-	0x2030, 0x2001, 0x0007, 0x080c, 0x61a7, 0x080c, 0x53ae, 0x1120,
-	0x2001, 0x0007, 0x080c, 0x61d3, 0x080c, 0x3010, 0x6020, 0x9086,
-	0x000a, 0x1108, 0x0005, 0x0804, 0x9e2f, 0x00b6, 0x00e6, 0x0026,
-	0x0016, 0x2071, 0x1800, 0x708c, 0x9086, 0x0014, 0x1904, 0xab22,
-	0x00d6, 0x080c, 0x6faa, 0x0198, 0x0026, 0x2011, 0x0010, 0x080c,
-	0x659e, 0x002e, 0x05c8, 0x080c, 0x53ae, 0x1540, 0x6014, 0x2048,
-	0xa807, 0x0000, 0xa867, 0x0103, 0xa833, 0xdead, 0x00f8, 0x0026,
-	0x2011, 0x8008, 0x080c, 0x659e, 0x002e, 0x0530, 0x6014, 0x2048,
-	0xa864, 0x9084, 0x00ff, 0x9086, 0x0039, 0x1140, 0x2001, 0x0030,
-	0x900e, 0x2011, 0x4009, 0x080c, 0xc11a, 0x0040, 0x6014, 0x2048,
-	0xa807, 0x0000, 0xa867, 0x0103, 0xa833, 0xdead, 0x6010, 0x2058,
-	0xb9a0, 0x0016, 0x080c, 0x3010, 0x080c, 0x9e2f, 0x001e, 0x080c,
-	0x30e2, 0x00de, 0x0804, 0xab26, 0x00de, 0x080c, 0x53ae, 0x1170,
-	0x6014, 0x9005, 0x1158, 0x0036, 0x0046, 0x6010, 0x2058, 0xbba0,
-	0x2021, 0x0006, 0x080c, 0x4a91, 0x004e, 0x003e, 0x00d6, 0x6010,
-	0x2058, 0x080c, 0x62f1, 0x080c, 0xa8e4, 0x00de, 0x080c, 0xad68,
-	0x1588, 0x6010, 0x2058, 0xb890, 0x9005, 0x0560, 0x2001, 0x0006,
-	0x080c, 0x61a7, 0x0096, 0x6014, 0x904d, 0x01d0, 0xa864, 0x9084,
+	0x2003, 0x0001, 0x2099, 0x0260, 0x20a9, 0x0016, 0x4003, 0x20a9,
+	0x000a, 0xa804, 0x2048, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0002,
+	0x20a0, 0x4003, 0x2001, 0x0205, 0x2003, 0x0002, 0x2099, 0x0260,
+	0x20a9, 0x0020, 0x4003, 0x2003, 0x0000, 0x6014, 0x2048, 0xa800,
+	0x2048, 0xa867, 0x0103, 0x080c, 0xa0e3, 0x001e, 0x009e, 0x0005,
+	0x0096, 0x0016, 0x900e, 0x7030, 0x9086, 0x0100, 0x0140, 0x7038,
+	0x9084, 0x00ff, 0x800c, 0x703c, 0x9084, 0x00ff, 0x8004, 0x9080,
+	0x0004, 0x9108, 0x810b, 0x2011, 0x0002, 0x2019, 0x000c, 0x6014,
+	0x2048, 0x080c, 0xb9e8, 0x080c, 0xbe37, 0x0140, 0x6014, 0x2048,
+	0xa807, 0x0000, 0xa864, 0xa8e2, 0xa867, 0x0103, 0x080c, 0xa0e3,
+	0x001e, 0x009e, 0x0005, 0x0016, 0x0096, 0x7030, 0x9086, 0x0100,
+	0x1118, 0x2009, 0x0004, 0x0010, 0x7034, 0x800c, 0x810b, 0x2011,
+	0x000c, 0x2019, 0x000c, 0x6014, 0x2048, 0xa804, 0x0096, 0x9005,
+	0x0108, 0x2048, 0x080c, 0xb9e8, 0x009e, 0x080c, 0xbe37, 0x0148,
+	0xa804, 0x9005, 0x1158, 0xa807, 0x0000, 0xa864, 0xa8e2, 0xa867,
+	0x0103, 0x080c, 0xa0e3, 0x009e, 0x001e, 0x0005, 0x0086, 0x2040,
+	0xa030, 0x8007, 0x9086, 0x0100, 0x1118, 0x080c, 0xaa81, 0x00e0,
+	0xa034, 0x8007, 0x800c, 0x8806, 0x8006, 0x8007, 0x90bc, 0x003f,
+	0x9084, 0xffc0, 0x9080, 0x000c, 0xa87b, 0x0000, 0xa883, 0x0000,
+	0xa897, 0x4000, 0xaaa0, 0xab9c, 0xaca8, 0xada4, 0x2031, 0x0000,
+	0x2041, 0x1288, 0x0019, 0x0d08, 0x008e, 0x0898, 0x0096, 0x0006,
+	0x080c, 0x1031, 0x000e, 0x01b0, 0xa8ab, 0x0dcb, 0xa876, 0x000e,
+	0xa8a2, 0x0006, 0xae6a, 0x2800, 0xa89e, 0xa97a, 0xaf72, 0xaa8e,
+	0xab92, 0xac96, 0xad9a, 0x0086, 0x2940, 0x080c, 0x112e, 0x008e,
+	0x9085, 0x0001, 0x009e, 0x0005, 0x00e6, 0x00d6, 0x0026, 0x7008,
+	0x9084, 0x00ff, 0x6210, 0x00b6, 0x2258, 0xba10, 0x00be, 0x9206,
+	0x1520, 0x700c, 0x6210, 0x00b6, 0x2258, 0xba14, 0x00be, 0x9206,
+	0x11e0, 0x6043, 0x0000, 0x2c68, 0x0016, 0x2009, 0x0035, 0x080c,
+	0xc4b1, 0x001e, 0x1158, 0x622c, 0x2268, 0x2071, 0x026c, 0x6b20,
+	0x9386, 0x0003, 0x0130, 0x9386, 0x0006, 0x0128, 0x080c, 0xa0e3,
+	0x0020, 0x0039, 0x0010, 0x080c, 0xa705, 0x002e, 0x00de, 0x00ee,
+	0x0005, 0x0096, 0x6814, 0x2048, 0x9186, 0x0015, 0x0904, 0xa6ed,
+	0x918e, 0x0016, 0x1904, 0xa703, 0x700c, 0x908c, 0xff00, 0x9186,
+	0x1700, 0x0120, 0x9186, 0x0300, 0x1904, 0xa6c7, 0x89ff, 0x1138,
+	0x6800, 0x9086, 0x000f, 0x0904, 0xa6aa, 0x0804, 0xa701, 0x6808,
+	0x9086, 0xffff, 0x1904, 0xa6ef, 0xa87c, 0x9084, 0x0060, 0x9086,
+	0x0020, 0x1128, 0xa83c, 0xa940, 0x9105, 0x1904, 0xa6ef, 0x6824,
+	0xd084, 0x1904, 0xa6ef, 0xd0b4, 0x0158, 0x0016, 0x2001, 0x195e,
+	0x200c, 0x6018, 0x9102, 0x9082, 0x0005, 0x001e, 0x1a04, 0xa6ef,
+	0x080c, 0xc022, 0x685c, 0xa882, 0xa87c, 0xc0dc, 0xc0f4, 0xc0d4,
+	0xa87e, 0x0026, 0x900e, 0x6a18, 0x2001, 0x000a, 0x080c, 0x84ff,
+	0xa884, 0x920a, 0x0208, 0x8011, 0xaa86, 0x82ff, 0x002e, 0x1138,
+	0x00c6, 0x2d60, 0x080c, 0xbb4a, 0x00ce, 0x0804, 0xa701, 0x00c6,
+	0xa868, 0xd0fc, 0x1118, 0x080c, 0x5fa7, 0x0010, 0x080c, 0x6355,
+	0x00ce, 0x1904, 0xa6ef, 0x00c6, 0x2d60, 0x080c, 0xa0e3, 0x00ce,
+	0x0804, 0xa701, 0x00c6, 0x080c, 0xa130, 0x0198, 0x6017, 0x0000,
+	0x6810, 0x6012, 0x080c, 0xc2b3, 0x6023, 0x0003, 0x6904, 0x00c6,
+	0x2d60, 0x080c, 0xa0e3, 0x00ce, 0x080c, 0xa15d, 0x00ce, 0x0804,
+	0xa701, 0x2001, 0x1960, 0x2004, 0x6842, 0x00ce, 0x04d0, 0x7008,
+	0x9086, 0x000b, 0x11c8, 0x6010, 0x00b6, 0x2058, 0xb900, 0xc1bc,
+	0xb902, 0x00be, 0x00c6, 0x2d60, 0xa87b, 0x0003, 0x080c, 0xc4f3,
+	0x6007, 0x0085, 0x6003, 0x000b, 0x6023, 0x0002, 0x080c, 0x8679,
+	0x080c, 0x8c10, 0x00ce, 0x00e8, 0x700c, 0x9086, 0x2a00, 0x1138,
+	0x2001, 0x1960, 0x2004, 0x6842, 0x00a0, 0x0479, 0x00a0, 0x89ff,
+	0x090c, 0x0dfa, 0x00c6, 0x00d6, 0x2d60, 0xa867, 0x0103, 0xa87b,
+	0x0003, 0x080c, 0x6904, 0x080c, 0xc022, 0x080c, 0xa113, 0x00de,
+	0x00ce, 0x080c, 0xa0e3, 0x009e, 0x0005, 0x9186, 0x0015, 0x1128,
+	0x2001, 0x1960, 0x2004, 0x6842, 0x0068, 0x918e, 0x0016, 0x1160,
+	0x00c6, 0x2d00, 0x2060, 0x080c, 0xdae2, 0x080c, 0x84a6, 0x080c,
+	0xa0e3, 0x00ce, 0x080c, 0xa0e3, 0x0005, 0x0026, 0x0036, 0x0046,
+	0x7228, 0xacb0, 0xabac, 0xd2f4, 0x0130, 0x2001, 0x1960, 0x2004,
+	0x6842, 0x0804, 0xa77f, 0x00c6, 0x2d60, 0x080c, 0xba49, 0x00ce,
+	0x6804, 0x9086, 0x0050, 0x1168, 0x00c6, 0x2d00, 0x2060, 0x6003,
+	0x0001, 0x6007, 0x0050, 0x080c, 0x8679, 0x080c, 0x8c10, 0x00ce,
+	0x04f0, 0x6800, 0x9086, 0x000f, 0x01a8, 0x89ff, 0x090c, 0x0dfa,
+	0x6800, 0x9086, 0x0004, 0x1190, 0xa87c, 0xd0ac, 0x0178, 0xa843,
+	0x0fff, 0xa83f, 0x0fff, 0xa880, 0xc0fc, 0xa882, 0x2001, 0x0001,
+	0x6832, 0x0400, 0x2001, 0x0007, 0x6832, 0x00e0, 0xa87c, 0xd0b4,
+	0x1150, 0xd0ac, 0x0db8, 0x6824, 0xd0f4, 0x1d48, 0xa838, 0xa934,
+	0x9105, 0x0d80, 0x0c20, 0xd2ec, 0x1d68, 0x7024, 0x9306, 0x1118,
+	0x7020, 0x9406, 0x0d38, 0x7020, 0x683e, 0x7024, 0x683a, 0x2001,
+	0x0005, 0x6832, 0x080c, 0xc1aa, 0x080c, 0x8c10, 0x0010, 0x080c,
+	0xa0e3, 0x004e, 0x003e, 0x002e, 0x0005, 0x00e6, 0x00d6, 0x0026,
+	0x7008, 0x9084, 0x00ff, 0x6210, 0x00b6, 0x2258, 0xba10, 0x00be,
+	0x9206, 0x1904, 0xa7ea, 0x700c, 0x6210, 0x00b6, 0x2258, 0xba14,
+	0x00be, 0x9206, 0x1904, 0xa7ea, 0x6038, 0x2068, 0x6824, 0xc0dc,
+	0x6826, 0x6a20, 0x9286, 0x0007, 0x0904, 0xa7ea, 0x9286, 0x0002,
+	0x0904, 0xa7ea, 0x9286, 0x0000, 0x05e8, 0x6808, 0x633c, 0x9306,
+	0x15c8, 0x2071, 0x026c, 0x9186, 0x0015, 0x0570, 0x918e, 0x0016,
+	0x1100, 0x00c6, 0x6038, 0x2060, 0x6104, 0x9186, 0x004b, 0x01c0,
+	0x9186, 0x004c, 0x01a8, 0x9186, 0x004d, 0x0190, 0x9186, 0x004e,
+	0x0178, 0x9186, 0x0052, 0x0160, 0x6014, 0x0096, 0x2048, 0x080c,
+	0xbe37, 0x090c, 0x0dfa, 0xa87b, 0x0003, 0x009e, 0x080c, 0xc4f3,
+	0x6007, 0x0085, 0x6003, 0x000b, 0x6023, 0x0002, 0x080c, 0x8679,
+	0x080c, 0x8c10, 0x00ce, 0x0030, 0x6038, 0x2070, 0x2001, 0x1960,
+	0x2004, 0x7042, 0x080c, 0xa0e3, 0x002e, 0x00de, 0x00ee, 0x0005,
+	0x00b6, 0x0096, 0x00f6, 0x6014, 0x2048, 0x6010, 0x2058, 0x91b6,
+	0x0015, 0x0130, 0xba08, 0xbb0c, 0xbc00, 0xc48c, 0xbc02, 0x0460,
+	0x0096, 0x0156, 0x0036, 0x0026, 0x2b48, 0x9e90, 0x0010, 0x2019,
+	0x000a, 0x20a9, 0x0004, 0x080c, 0xb0d0, 0x002e, 0x003e, 0x015e,
+	0x009e, 0x1904, 0xa859, 0x0096, 0x0156, 0x0036, 0x0026, 0x2b48,
+	0x9e90, 0x0014, 0x2019, 0x0006, 0x20a9, 0x0004, 0x080c, 0xb0d0,
+	0x002e, 0x003e, 0x015e, 0x009e, 0x15a0, 0x7238, 0xba0a, 0x733c,
+	0xbb0e, 0xbc00, 0xc48d, 0xbc02, 0xa804, 0x9005, 0x1128, 0x00fe,
+	0x009e, 0x00be, 0x0804, 0xa4e7, 0x0096, 0x2048, 0xaa12, 0xab16,
+	0xac0a, 0x009e, 0x8006, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084,
+	0xffc0, 0x9080, 0x0002, 0x2009, 0x002b, 0xaaa0, 0xab9c, 0xaca8,
+	0xada4, 0x2031, 0x0000, 0x2041, 0x1288, 0x080c, 0xa5e6, 0x0130,
+	0x00fe, 0x009e, 0x080c, 0xa0e3, 0x00be, 0x0005, 0x080c, 0xaa81,
+	0x0cb8, 0x2b78, 0x00f6, 0x080c, 0x318b, 0x080c, 0xc54e, 0x00fe,
+	0x00c6, 0x080c, 0xa08d, 0x2f00, 0x6012, 0x6017, 0x0000, 0x6023,
+	0x0001, 0x6007, 0x0001, 0x6003, 0x0001, 0x2001, 0x0007, 0x080c,
+	0x63f0, 0x080c, 0x641c, 0x080c, 0x86c1, 0x080c, 0x8c10, 0x00ce,
+	0x0804, 0xa82c, 0x2100, 0x91b2, 0x0053, 0x1a0c, 0x0dfa, 0x91b2,
+	0x0040, 0x1a04, 0xa8e2, 0x0002, 0xa8d0, 0xa8d0, 0xa8c6, 0xa8d0,
+	0xa8d0, 0xa8d0, 0xa8c4, 0xa8c4, 0xa8c4, 0xa8c4, 0xa8c4, 0xa8c4,
+	0xa8c4, 0xa8c4, 0xa8c4, 0xa8c4, 0xa8c4, 0xa8c4, 0xa8c4, 0xa8c4,
+	0xa8c4, 0xa8c4, 0xa8c4, 0xa8c4, 0xa8c4, 0xa8c4, 0xa8c4, 0xa8c4,
+	0xa8c4, 0xa8c4, 0xa8c4, 0xa8d0, 0xa8c4, 0xa8d0, 0xa8d0, 0xa8c4,
+	0xa8c4, 0xa8c4, 0xa8c4, 0xa8c4, 0xa8c6, 0xa8c4, 0xa8c4, 0xa8c4,
+	0xa8c4, 0xa8c4, 0xa8c4, 0xa8c4, 0xa8c4, 0xa8c4, 0xa8d0, 0xa8d0,
+	0xa8c4, 0xa8c4, 0xa8c4, 0xa8c4, 0xa8c4, 0xa8c4, 0xa8c4, 0xa8c4,
+	0xa8c4, 0xa8d0, 0xa8c4, 0xa8c4, 0x080c, 0x0dfa, 0x0066, 0x00b6,
+	0x6610, 0x2658, 0xb8bc, 0xc08c, 0xb8be, 0x00be, 0x006e, 0x0000,
+	0x6003, 0x0001, 0x6106, 0x9186, 0x0032, 0x0118, 0x080c, 0x86c1,
+	0x0010, 0x080c, 0x8679, 0x0126, 0x2091, 0x8000, 0x080c, 0x8c10,
+	0x012e, 0x0005, 0x2600, 0x0002, 0xa8f6, 0xa8f6, 0xa8f6, 0xa8d0,
+	0xa8d0, 0xa8f6, 0xa8f6, 0xa8f6, 0xa8f6, 0xa8d0, 0xa8f6, 0xa8d0,
+	0xa8f6, 0xa8d0, 0xa8f6, 0xa8f6, 0xa8f6, 0xa8f6, 0x080c, 0x0dfa,
+	0x6004, 0x90b2, 0x0053, 0x1a0c, 0x0dfa, 0x91b6, 0x0013, 0x0904,
+	0xa9ba, 0x91b6, 0x0027, 0x1904, 0xa975, 0x080c, 0x8b04, 0x6004,
+	0x080c, 0xc02e, 0x01b0, 0x080c, 0xc03f, 0x01a8, 0x908e, 0x0021,
+	0x0904, 0xa972, 0x908e, 0x0022, 0x1130, 0x080c, 0xa513, 0x0904,
+	0xa96e, 0x0804, 0xa96f, 0x908e, 0x003d, 0x0904, 0xa972, 0x0804,
+	0xa968, 0x080c, 0x31b4, 0x2001, 0x0007, 0x080c, 0x63f0, 0x6010,
+	0x00b6, 0x2058, 0xb9a0, 0x00be, 0x080c, 0xaa81, 0x9186, 0x007e,
+	0x1148, 0x2001, 0x1836, 0x2014, 0xc285, 0x080c, 0x7207, 0x1108,
+	0xc2ad, 0x2202, 0x0036, 0x0026, 0x2019, 0x0028, 0x2110, 0x080c,
+	0xdb3d, 0x002e, 0x003e, 0x0016, 0x0026, 0x0036, 0x2110, 0x2019,
+	0x0028, 0x080c, 0x8803, 0x0076, 0x903e, 0x080c, 0x86f1, 0x6010,
+	0x00b6, 0x905d, 0x0100, 0x00be, 0x2c08, 0x080c, 0xd5f6, 0x007e,
+	0x003e, 0x002e, 0x001e, 0x080c, 0xc54e, 0x0016, 0x080c, 0xc2ab,
+	0x080c, 0xa0e3, 0x001e, 0x080c, 0x3286, 0x080c, 0x8c10, 0x0030,
+	0x080c, 0xc2ab, 0x080c, 0xa0e3, 0x080c, 0x8c10, 0x0005, 0x080c,
+	0xaa81, 0x0cb0, 0x080c, 0xaabd, 0x0c98, 0x9186, 0x0014, 0x1db0,
+	0x080c, 0x8b04, 0x6004, 0x908e, 0x0022, 0x1118, 0x080c, 0xa513,
+	0x0d68, 0x080c, 0x318b, 0x080c, 0xc54e, 0x080c, 0xc02e, 0x1190,
+	0x080c, 0x31b4, 0x6010, 0x00b6, 0x2058, 0xb9a0, 0x00be, 0x080c,
+	0xaa81, 0x9186, 0x007e, 0x1128, 0x2001, 0x1836, 0x200c, 0xc185,
+	0x2102, 0x0870, 0x080c, 0xc03f, 0x1118, 0x080c, 0xaa81, 0x0840,
+	0x6004, 0x908e, 0x0032, 0x1160, 0x00e6, 0x00f6, 0x2071, 0x189c,
+	0x2079, 0x0000, 0x080c, 0x351a, 0x00fe, 0x00ee, 0x0804, 0xa968,
+	0x6004, 0x908e, 0x0021, 0x0d48, 0x908e, 0x0022, 0x090c, 0xaa81,
+	0x0804, 0xa968, 0x90b2, 0x0040, 0x1a04, 0xaa6a, 0x2008, 0x0002,
+	0xaa02, 0xaa03, 0xaa06, 0xaa09, 0xaa0c, 0xaa0f, 0xaa00, 0xaa00,
+	0xaa00, 0xaa00, 0xaa00, 0xaa00, 0xaa00, 0xaa00, 0xaa00, 0xaa00,
+	0xaa00, 0xaa00, 0xaa00, 0xaa00, 0xaa00, 0xaa00, 0xaa00, 0xaa00,
+	0xaa00, 0xaa00, 0xaa00, 0xaa00, 0xaa00, 0xaa00, 0xaa12, 0xaa1f,
+	0xaa00, 0xaa21, 0xaa1f, 0xaa00, 0xaa00, 0xaa00, 0xaa00, 0xaa00,
+	0xaa1f, 0xaa1f, 0xaa00, 0xaa00, 0xaa00, 0xaa00, 0xaa00, 0xaa00,
+	0xaa00, 0xaa00, 0xaa51, 0xaa1f, 0xaa00, 0xaa1b, 0xaa00, 0xaa00,
+	0xaa00, 0xaa1c, 0xaa00, 0xaa00, 0xaa00, 0xaa1f, 0xaa48, 0xaa00,
+	0x080c, 0x0dfa, 0x00e0, 0x2001, 0x000b, 0x0420, 0x2001, 0x0003,
+	0x0408, 0x2001, 0x0005, 0x00f0, 0x2001, 0x0001, 0x00d8, 0x2001,
+	0x0009, 0x00c0, 0x080c, 0x8b04, 0x6003, 0x0005, 0x080c, 0xc551,
+	0x080c, 0x8c10, 0x0070, 0x0018, 0x0010, 0x080c, 0x63f0, 0x0804,
+	0xaa62, 0x080c, 0x8b04, 0x080c, 0xc551, 0x6003, 0x0004, 0x080c,
+	0x8c10, 0x0005, 0x080c, 0x63f0, 0x080c, 0x8b04, 0x6003, 0x0002,
+	0x0036, 0x2019, 0x1866, 0x2304, 0x9084, 0xff00, 0x1120, 0x2001,
+	0x195e, 0x201c, 0x0040, 0x8007, 0x909a, 0x0004, 0x0ec0, 0x8003,
+	0x801b, 0x831b, 0x9318, 0x631a, 0x003e, 0x080c, 0x8c10, 0x0c08,
+	0x080c, 0x8b04, 0x080c, 0xc2ab, 0x080c, 0xa0e3, 0x080c, 0x8c10,
+	0x08c0, 0x00e6, 0x00f6, 0x2071, 0x189c, 0x2079, 0x0000, 0x080c,
+	0x351a, 0x00fe, 0x00ee, 0x080c, 0x8b04, 0x080c, 0xa0e3, 0x080c,
+	0x8c10, 0x0838, 0x080c, 0x8b04, 0x6003, 0x0002, 0x080c, 0xc551,
+	0x0804, 0x8c10, 0x2600, 0x2008, 0x0002, 0xaa7f, 0xaa7f, 0xaa7f,
+	0xaa62, 0xaa62, 0xaa7f, 0xaa7f, 0xaa7f, 0xaa7f, 0xaa62, 0xaa7f,
+	0xaa62, 0xaa7f, 0xaa62, 0xaa7f, 0xaa7f, 0xaa7f, 0xaa7f, 0x080c,
+	0x0dfa, 0x00e6, 0x0096, 0x0026, 0x0016, 0x080c, 0xbe37, 0x0568,
+	0x6014, 0x2048, 0xa864, 0x9086, 0x0139, 0x11a8, 0xa894, 0x9086,
+	0x0056, 0x1148, 0x080c, 0x5375, 0x0130, 0x2001, 0x0000, 0x900e,
+	0x2011, 0x4000, 0x0028, 0x2001, 0x0030, 0x900e, 0x2011, 0x4005,
+	0x080c, 0xc418, 0x0090, 0xa868, 0xd0fc, 0x0178, 0xa807, 0x0000,
+	0x0016, 0x6004, 0x908e, 0x0021, 0x0168, 0x908e, 0x003d, 0x0150,
+	0x001e, 0xa867, 0x0103, 0xa833, 0x0100, 0x001e, 0x002e, 0x009e,
+	0x00ee, 0x0005, 0x001e, 0x0009, 0x0cc0, 0x0096, 0x6014, 0x2048,
+	0xa800, 0x2048, 0xa867, 0x0103, 0xa823, 0x8001, 0x009e, 0x0005,
+	0x00b6, 0x6610, 0x2658, 0xb804, 0x9084, 0x00ff, 0x90b2, 0x000c,
+	0x1a0c, 0x0dfa, 0x6604, 0x96b6, 0x004d, 0x1120, 0x080c, 0xc337,
+	0x0804, 0xab45, 0x6604, 0x96b6, 0x0043, 0x1120, 0x080c, 0xc380,
+	0x0804, 0xab45, 0x6604, 0x96b6, 0x004b, 0x1120, 0x080c, 0xc3ac,
+	0x0804, 0xab45, 0x6604, 0x96b6, 0x0033, 0x1120, 0x080c, 0xc2cd,
+	0x0804, 0xab45, 0x6604, 0x96b6, 0x0028, 0x1120, 0x080c, 0xc07d,
+	0x0804, 0xab45, 0x6604, 0x96b6, 0x0029, 0x1120, 0x080c, 0xc0be,
+	0x0804, 0xab45, 0x6604, 0x96b6, 0x001f, 0x1118, 0x080c, 0xa4bb,
+	0x04e0, 0x6604, 0x96b6, 0x0000, 0x1118, 0x080c, 0xa7f0, 0x04a8,
+	0x6604, 0x96b6, 0x0022, 0x1118, 0x080c, 0xa4f4, 0x0470, 0x6604,
+	0x96b6, 0x0035, 0x1118, 0x080c, 0xa604, 0x0438, 0x6604, 0x96b6,
+	0x0039, 0x1118, 0x080c, 0xa785, 0x0400, 0x6604, 0x96b6, 0x003d,
+	0x1118, 0x080c, 0xa52c, 0x00c8, 0x6604, 0x96b6, 0x0044, 0x1118,
+	0x080c, 0xa568, 0x0090, 0x6604, 0x96b6, 0x0049, 0x1118, 0x080c,
+	0xa593, 0x0058, 0x91b6, 0x0015, 0x1110, 0x0063, 0x0030, 0x91b6,
+	0x0016, 0x1128, 0x00be, 0x0804, 0xae05, 0x00be, 0x0005, 0x080c,
+	0xa178, 0x0cd8, 0xab62, 0xab65, 0xab62, 0xaba9, 0xab62, 0xad39,
+	0xae12, 0xab62, 0xab62, 0xaddf, 0xab62, 0xadf3, 0x0096, 0x080c,
+	0x1582, 0x6014, 0x2048, 0xa800, 0x2048, 0xa867, 0x0103, 0x009e,
+	0x0804, 0xa0e3, 0xa001, 0xa001, 0x0005, 0x00e6, 0x2071, 0x1800,
+	0x708c, 0x9086, 0x0074, 0x1540, 0x080c, 0xd5c7, 0x11b0, 0x6010,
+	0x00b6, 0x2058, 0x7030, 0xd08c, 0x0128, 0xb800, 0xd0bc, 0x0110,
+	0xc0c5, 0xb802, 0x00e9, 0x00be, 0x2001, 0x0006, 0x080c, 0x63f0,
+	0x080c, 0x31b4, 0x080c, 0xa0e3, 0x0088, 0x2001, 0x000a, 0x080c,
+	0x63f0, 0x080c, 0x31b4, 0x6003, 0x0001, 0x6007, 0x0001, 0x080c,
+	0x86c1, 0x080c, 0x8c10, 0x0010, 0x080c, 0xad24, 0x00ee, 0x0005,
+	0x00d6, 0xb800, 0xd084, 0x0158, 0x9006, 0x080c, 0x63dc, 0x2069,
+	0x185b, 0x6804, 0x0020, 0x2001, 0x0006, 0x080c, 0x641c, 0x00de,
+	0x0005, 0x00b6, 0x0096, 0x00d6, 0x2011, 0x1823, 0x2204, 0x9086,
+	0x0074, 0x1904, 0xacfb, 0x6010, 0x2058, 0xbaa0, 0x9286, 0x007e,
+	0x1120, 0x080c, 0xaf56, 0x0804, 0xac60, 0x00d6, 0x080c, 0x7207,
+	0x0198, 0x0026, 0x2011, 0x0010, 0x080c, 0x67e7, 0x002e, 0x05c8,
+	0x080c, 0x55ef, 0x1540, 0x6014, 0x2048, 0xa807, 0x0000, 0xa867,
+	0x0103, 0xa833, 0xdead, 0x00f8, 0x0026, 0x2011, 0x8008, 0x080c,
+	0x67e7, 0x002e, 0x0530, 0x6014, 0x2048, 0xa864, 0x9084, 0x00ff,
+	0x9086, 0x0039, 0x1140, 0x2001, 0x0030, 0x900e, 0x2011, 0x4009,
+	0x080c, 0xc418, 0x0040, 0x6014, 0x2048, 0xa807, 0x0000, 0xa867,
+	0x0103, 0xa833, 0xdead, 0x6010, 0x2058, 0xb9a0, 0x0016, 0x080c,
+	0x31b4, 0x080c, 0xa0e3, 0x001e, 0x080c, 0x3286, 0x00de, 0x0804,
+	0xacfe, 0x00de, 0x080c, 0xaf4b, 0x6010, 0x2058, 0xbaa0, 0x9286,
+	0x0080, 0x1510, 0x6014, 0x9005, 0x01a8, 0x2048, 0xa864, 0x9084,
 	0x00ff, 0x9086, 0x0039, 0x1140, 0x2001, 0x0000, 0x900e, 0x2011,
-	0x4000, 0x080c, 0xc11a, 0x0060, 0xa864, 0x9084, 0x00ff, 0x9086,
-	0x0029, 0x0130, 0xa807, 0x0000, 0xa867, 0x0103, 0xa833, 0x0200,
-	0x009e, 0x080c, 0x3010, 0x6020, 0x9086, 0x000a, 0x0138, 0x080c,
-	0x9e2f, 0x0020, 0x080c, 0xa7cd, 0x080c, 0xaa70, 0x001e, 0x002e,
-	0x00ee, 0x00be, 0x0005, 0x2011, 0x1823, 0x2204, 0x9086, 0x0014,
-	0x1160, 0x2001, 0x0002, 0x080c, 0x61a7, 0x6003, 0x0001, 0x6007,
-	0x0001, 0x080c, 0x8440, 0x0804, 0x898b, 0x0804, 0xaa70, 0x2030,
-	0x2011, 0x1823, 0x2204, 0x9086, 0x0004, 0x1148, 0x96b6, 0x000b,
-	0x1120, 0x2001, 0x0007, 0x080c, 0x61a7, 0x0804, 0x9e2f, 0x0804,
-	0xaa70, 0x0002, 0xa8ae, 0xab69, 0xa8ae, 0xaba8, 0xa8ae, 0xac53,
-	0xab5e, 0xa8ae, 0xa8ae, 0xac66, 0xa8ae, 0xac76, 0x6604, 0x9686,
-	0x0003, 0x0904, 0xaa85, 0x96b6, 0x001e, 0x1110, 0x080c, 0x9e2f,
-	0x0005, 0x00b6, 0x00d6, 0x00c6, 0x080c, 0xac86, 0x11a0, 0x9006,
-	0x080c, 0x6193, 0x080c, 0x2fe7, 0x080c, 0xc250, 0x2001, 0x0002,
-	0x080c, 0x61a7, 0x6003, 0x0001, 0x6007, 0x0002, 0x080c, 0x8440,
-	0x080c, 0x898b, 0x0408, 0x2009, 0x026e, 0x2104, 0x9086, 0x0009,
-	0x1160, 0x6010, 0x2058, 0xb840, 0x9084, 0x00ff, 0x9005, 0x0170,
-	0x8001, 0xb842, 0x601b, 0x000a, 0x0078, 0x2009, 0x026f, 0x2104,
-	0x9084, 0xff00, 0x9086, 0x1900, 0x1108, 0x08a0, 0x080c, 0x2fe7,
-	0x080c, 0xc250, 0x080c, 0xaa70, 0x00ce, 0x00de, 0x00be, 0x0005,
-	0x0096, 0x00b6, 0x0026, 0x9016, 0x080c, 0xac94, 0x00d6, 0x2069,
-	0x1954, 0x2d04, 0x9005, 0x0168, 0x6010, 0x2058, 0xb8a0, 0x9086,
-	0x007e, 0x1138, 0x2069, 0x181f, 0x2d04, 0x8000, 0x206a, 0x00de,
-	0x0010, 0x00de, 0x0088, 0x9006, 0x080c, 0x6193, 0x2001, 0x0002,
-	0x080c, 0x61a7, 0x6003, 0x0001, 0x6007, 0x0002, 0x080c, 0x8440,
-	0x080c, 0x898b, 0x0804, 0xac23, 0x080c, 0xbb3b, 0x01b0, 0x6014,
-	0x2048, 0xa864, 0x2010, 0x9086, 0x0139, 0x1138, 0x6007, 0x0016,
-	0x2001, 0x0002, 0x080c, 0xc174, 0x00b0, 0x6014, 0x2048, 0xa864,
-	0xd0fc, 0x0118, 0x2001, 0x0001, 0x0ca8, 0x2001, 0x180e, 0x2004,
-	0xd0dc, 0x0148, 0x6010, 0x2058, 0xb840, 0x9084, 0x00ff, 0x9005,
-	0x1110, 0x9006, 0x0c38, 0x080c, 0xa7cd, 0x2009, 0x026e, 0x2134,
-	0x96b4, 0x00ff, 0x9686, 0x0005, 0x0510, 0x9686, 0x000b, 0x01c8,
-	0x2009, 0x026f, 0x2104, 0x9084, 0xff00, 0x1118, 0x9686, 0x0009,
-	0x01b0, 0x9086, 0x1900, 0x1168, 0x9686, 0x0009, 0x0180, 0x2001,
-	0x0004, 0x080c, 0x61a7, 0x2001, 0x0028, 0x601a, 0x6007, 0x0052,
-	0x0010, 0x080c, 0xaa70, 0x002e, 0x00be, 0x009e, 0x0005, 0x9286,
-	0x0139, 0x0160, 0x6014, 0x2048, 0x080c, 0xbb3b, 0x0140, 0xa864,
-	0x9086, 0x0139, 0x0118, 0xa868, 0xd0fc, 0x0108, 0x0c50, 0x6010,
-	0x2058, 0xb840, 0x9084, 0x00ff, 0x9005, 0x0138, 0x8001, 0xb842,
-	0x601b, 0x000a, 0x6007, 0x0016, 0x08f0, 0xb8a0, 0x9086, 0x007e,
-	0x1138, 0x00e6, 0x2071, 0x1800, 0x080c, 0x5c78, 0x00ee, 0x0010,
-	0x080c, 0x2fe7, 0x0870, 0x080c, 0xac94, 0x1160, 0x2001, 0x0004,
-	0x080c, 0x61a7, 0x6003, 0x0001, 0x6007, 0x0003, 0x080c, 0x8440,
-	0x0804, 0x898b, 0x080c, 0xa7cd, 0x0804, 0xaa70, 0x0469, 0x1160,
-	0x2001, 0x0008, 0x080c, 0x61a7, 0x6003, 0x0001, 0x6007, 0x0005,
-	0x080c, 0x8440, 0x0804, 0x898b, 0x0804, 0xaa70, 0x00e9, 0x1160,
-	0x2001, 0x000a, 0x080c, 0x61a7, 0x6003, 0x0001, 0x6007, 0x0001,
-	0x080c, 0x8440, 0x0804, 0x898b, 0x0804, 0xaa70, 0x2009, 0x026e,
-	0x2104, 0x9086, 0x0003, 0x1138, 0x2009, 0x026f, 0x2104, 0x9084,
-	0xff00, 0x9086, 0x2a00, 0x0005, 0x9085, 0x0001, 0x0005, 0x00b6,
-	0x00c6, 0x0016, 0x6110, 0x2158, 0x080c, 0x6265, 0x001e, 0x00ce,
-	0x00be, 0x0005, 0x00b6, 0x00f6, 0x00e6, 0x00d6, 0x0036, 0x0016,
-	0x6010, 0x2058, 0x2009, 0x1836, 0x2104, 0x9085, 0x0003, 0x200a,
-	0x080c, 0xad3a, 0x0560, 0x2009, 0x1836, 0x2104, 0xc0cd, 0x200a,
-	0x080c, 0x6576, 0x0158, 0x9006, 0x2020, 0x2009, 0x002a, 0x080c,
-	0xd564, 0x2001, 0x180c, 0x200c, 0xc195, 0x2102, 0x2019, 0x002a,
-	0x2009, 0x0001, 0x080c, 0x2fb2, 0x00e6, 0x2071, 0x1800, 0x080c,
-	0x2dc8, 0x00ee, 0x00c6, 0x0156, 0x20a9, 0x0781, 0x2009, 0x007f,
-	0x080c, 0x30e2, 0x8108, 0x1f04, 0xacd8, 0x015e, 0x00ce, 0x080c,
-	0xac97, 0x2071, 0x0260, 0x2079, 0x0200, 0x7817, 0x0001, 0x2001,
-	0x1836, 0x200c, 0xc1c5, 0x7018, 0xd0fc, 0x0110, 0xd0dc, 0x0118,
-	0x7038, 0xd0dc, 0x1108, 0xc1c4, 0x7817, 0x0000, 0x2001, 0x1836,
-	0x2102, 0x2079, 0x0100, 0x2e04, 0x9084, 0x00ff, 0x2069, 0x181e,
-	0x206a, 0x78e6, 0x0006, 0x8e70, 0x2e04, 0x2069, 0x181f, 0x206a,
-	0x78ea, 0x7832, 0x7836, 0x2010, 0x9084, 0xff00, 0x001e, 0x9105,
-	0x2009, 0x182b, 0x200a, 0x2200, 0x9084, 0x00ff, 0x2008, 0x080c,
-	0x26b9, 0x080c, 0x6faa, 0x0170, 0x2071, 0x0260, 0x2069, 0x195a,
-	0x7048, 0x206a, 0x704c, 0x6806, 0x7050, 0x680a, 0x7054, 0x680e,
-	0x080c, 0xbf4f, 0x0040, 0x2001, 0x0006, 0x080c, 0x61a7, 0x080c,
-	0x3010, 0x080c, 0x9e2f, 0x001e, 0x003e, 0x00de, 0x00ee, 0x00fe,
-	0x00be, 0x0005, 0x0096, 0x0026, 0x0036, 0x00e6, 0x0156, 0x2019,
-	0x182b, 0x231c, 0x83ff, 0x01f0, 0x2071, 0x0260, 0x7200, 0x9294,
-	0x00ff, 0x7004, 0x9084, 0xff00, 0x9205, 0x9306, 0x1198, 0x2011,
-	0x0276, 0x20a9, 0x0004, 0x2b48, 0x2019, 0x000a, 0x080c, 0xae1c,
-	0x1148, 0x2011, 0x027a, 0x20a9, 0x0004, 0x2019, 0x0006, 0x080c,
-	0xae1c, 0x1100, 0x015e, 0x00ee, 0x003e, 0x002e, 0x009e, 0x0005,
-	0x00e6, 0x2071, 0x0260, 0x7034, 0x9086, 0x0014, 0x11a8, 0x7038,
-	0x9086, 0x0800, 0x1188, 0x703c, 0xd0ec, 0x0160, 0x9084, 0x0f00,
-	0x9086, 0x0100, 0x1138, 0x7054, 0xd0a4, 0x1110, 0xd0ac, 0x0110,
-	0x9006, 0x0010, 0x9085, 0x0001, 0x00ee, 0x0005, 0x00e6, 0x0096,
-	0x00c6, 0x0076, 0x0056, 0x0046, 0x0026, 0x0006, 0x0126, 0x2091,
-	0x8000, 0x2029, 0x19c8, 0x252c, 0x2021, 0x19ce, 0x2424, 0x2061,
-	0x1cd0, 0x2071, 0x1800, 0x7250, 0x7070, 0x9202, 0x1a04, 0xadf4,
-	0x080c, 0xd595, 0x0904, 0xaded, 0x6720, 0x9786, 0x0007, 0x0904,
-	0xaded, 0x2500, 0x9c06, 0x0904, 0xaded, 0x2400, 0x9c06, 0x05e8,
-	0x3e08, 0x9186, 0x0002, 0x1148, 0x6010, 0x9005, 0x0130, 0x00b6,
-	0x2058, 0xb800, 0x00be, 0xd0bc, 0x1580, 0x00c6, 0x6000, 0x9086,
-	0x0004, 0x1110, 0x080c, 0x191f, 0x9786, 0x000a, 0x0148, 0x080c,
-	0xbd41, 0x1130, 0x00ce, 0x080c, 0xa7cd, 0x080c, 0x9e5f, 0x00e8,
-	0x6014, 0x2048, 0x080c, 0xbb3b, 0x01a8, 0x9786, 0x0003, 0x1530,
-	0xa867, 0x0103, 0xa87c, 0xd0cc, 0x0130, 0x0096, 0xa878, 0x2048,
-	0x080c, 0x0f9d, 0x009e, 0xab7a, 0xa877, 0x0000, 0x080c, 0x6893,
-	0x080c, 0xbd24, 0x080c, 0x9e5f, 0x00ce, 0x9ce0, 0x0018, 0x7064,
-	0x9c02, 0x1210, 0x0804, 0xad9b, 0x012e, 0x000e, 0x002e, 0x004e,
-	0x005e, 0x007e, 0x00ce, 0x009e, 0x00ee, 0x0005, 0x9786, 0x0006,
-	0x1118, 0x080c, 0xd50f, 0x0c30, 0x9786, 0x000a, 0x0998, 0x0880,
-	0x220c, 0x2304, 0x9106, 0x1130, 0x8210, 0x8318, 0x1f04, 0xae08,
-	0x9006, 0x0005, 0x2304, 0x9102, 0x0218, 0x2001, 0x0001, 0x0008,
-	0x9006, 0x918d, 0x0001, 0x0005, 0x0136, 0x01c6, 0x0016, 0x8906,
-	0x8006, 0x8007, 0x908c, 0x003f, 0x21e0, 0x9084, 0xffc0, 0x9300,
-	0x2098, 0x3518, 0x20a9, 0x0001, 0x220c, 0x4002, 0x910e, 0x1140,
-	0x8210, 0x8319, 0x1dc8, 0x9006, 0x001e, 0x01ce, 0x013e, 0x0005,
-	0x220c, 0x9102, 0x0218, 0x2001, 0x0001, 0x0010, 0x2001, 0x0000,
-	0x918d, 0x0001, 0x001e, 0x01ce, 0x013e, 0x0005, 0x6004, 0x908a,
-	0x0053, 0x1a0c, 0x0db4, 0x080c, 0xbd30, 0x0120, 0x080c, 0xbd41,
-	0x0168, 0x0028, 0x080c, 0x3010, 0x080c, 0xbd41, 0x0138, 0x080c,
-	0x887f, 0x080c, 0x9e2f, 0x080c, 0x898b, 0x0005, 0x080c, 0xa7cd,
-	0x0cb0, 0x9182, 0x0054, 0x1220, 0x9182, 0x0040, 0x0208, 0x000a,
-	0x0005, 0xae7d, 0xae7d, 0xae7d, 0xae7d, 0xae7d, 0xae7d, 0xae7d,
-	0xae7d, 0xae7d, 0xae7d, 0xae7d, 0xae7f, 0xae7f, 0xae7f, 0xae7f,
-	0xae7d, 0xae7d, 0xae7d, 0xae7f, 0xae7d, 0x080c, 0x0db4, 0x600b,
-	0xffff, 0x6003, 0x0001, 0x6106, 0x080c, 0x83f8, 0x0126, 0x2091,
-	0x8000, 0x080c, 0x898b, 0x012e, 0x0005, 0x9186, 0x0013, 0x1128,
-	0x6004, 0x9082, 0x0040, 0x0804, 0xaf34, 0x9186, 0x0027, 0x1520,
-	0x080c, 0x887f, 0x080c, 0x2fe7, 0x080c, 0xc250, 0x0096, 0x6114,
-	0x2148, 0x080c, 0xbb3b, 0x0198, 0x080c, 0xbd41, 0x1118, 0x080c,
-	0xa7cd, 0x0068, 0xa867, 0x0103, 0xa87b, 0x0029, 0xa877, 0x0000,
-	0xa97c, 0xc1c5, 0xa97e, 0x080c, 0x68a0, 0x080c, 0xbd24, 0x009e,
-	0x080c, 0x9e2f, 0x0804, 0x898b, 0x9186, 0x0014, 0x1120, 0x6004,
-	0x9082, 0x0040, 0x04a0, 0x9186, 0x0046, 0x0150, 0x9186, 0x0045,
-	0x0138, 0x9186, 0x0053, 0x0120, 0x9186, 0x0048, 0x190c, 0x0db4,
-	0x2001, 0x0109, 0x2004, 0xd084, 0x0508, 0x0126, 0x2091, 0x2800,
-	0x0006, 0x0016, 0x0026, 0x0036, 0x00f6, 0x00e6, 0x00c6, 0x2079,
-	0x19bf, 0x2071, 0x1800, 0x2061, 0x0100, 0x080c, 0x82e4, 0x00ce,
-	0x00ee, 0x00fe, 0x003e, 0x002e, 0x001e, 0x000e, 0x012e, 0xa001,
-	0x6000, 0x9086, 0x0002, 0x1110, 0x0804, 0xaf72, 0x0005, 0x0002,
-	0xaf0e, 0xaf0c, 0xaf0c, 0xaf0c, 0xaf0c, 0xaf0c, 0xaf0c, 0xaf0c,
-	0xaf0c, 0xaf0c, 0xaf0c, 0xaf29, 0xaf29, 0xaf29, 0xaf29, 0xaf0c,
-	0xaf29, 0xaf0c, 0xaf29, 0xaf0c, 0x080c, 0x0db4, 0x080c, 0x887f,
-	0x0096, 0x6114, 0x2148, 0x080c, 0xbb3b, 0x0168, 0xa867, 0x0103,
-	0xa87b, 0x0006, 0xa877, 0x0000, 0xa880, 0xc0ec, 0xa882, 0x080c,
-	0x68a0, 0x080c, 0xbd24, 0x009e, 0x080c, 0x9e2f, 0x080c, 0x898b,
-	0x0005, 0x080c, 0x887f, 0x080c, 0xbd41, 0x090c, 0xa7cd, 0x080c,
-	0x9e2f, 0x080c, 0x898b, 0x0005, 0x0002, 0xaf4b, 0xaf49, 0xaf49,
-	0xaf49, 0xaf49, 0xaf49, 0xaf49, 0xaf49, 0xaf49, 0xaf49, 0xaf49,
-	0xaf62, 0xaf62, 0xaf62, 0xaf62, 0xaf49, 0xaf6c, 0xaf49, 0xaf62,
-	0xaf49, 0x080c, 0x0db4, 0x0096, 0x080c, 0x887f, 0x6014, 0x2048,
-	0x2001, 0x1960, 0x2004, 0x6042, 0xa97c, 0xd1ac, 0x0140, 0x6003,
-	0x0004, 0xa87c, 0x9085, 0x0400, 0xa87e, 0x009e, 0x0005, 0x6003,
-	0x0002, 0x0cb8, 0x080c, 0x887f, 0x080c, 0xc253, 0x080c, 0xc258,
-	0x6003, 0x000f, 0x0804, 0x898b, 0x080c, 0x887f, 0x080c, 0x9e2f,
-	0x0804, 0x898b, 0x9182, 0x0054, 0x1220, 0x9182, 0x0040, 0x0208,
-	0x000a, 0x0005, 0xaf8e, 0xaf8e, 0xaf8e, 0xaf8e, 0xaf8e, 0xaf90,
-	0xb06d, 0xaf8e, 0xb0a1, 0xaf8e, 0xaf8e, 0xaf8e, 0xaf8e, 0xaf8e,
-	0xaf8e, 0xaf8e, 0xaf8e, 0xaf8e, 0xaf8e, 0xb0a1, 0x080c, 0x0db4,
-	0x00b6, 0x0096, 0x6114, 0x2148, 0x7644, 0x96b4, 0x0fff, 0x86ff,
-	0x1528, 0x6010, 0x2058, 0xb800, 0xd0bc, 0x1904, 0xb05c, 0xa87b,
-	0x0000, 0xa867, 0x0103, 0xae76, 0xa87c, 0xd0ac, 0x0128, 0xa834,
-	0xa938, 0x9115, 0x190c, 0xb236, 0x080c, 0x66bb, 0x6210, 0x2258,
-	0xba3c, 0x82ff, 0x0110, 0x8211, 0xba3e, 0x7044, 0xd0e4, 0x1904,
-	0xb040, 0x080c, 0x9e2f, 0x009e, 0x00be, 0x0005, 0x968c, 0x0c00,
-	0x0150, 0x6010, 0x2058, 0xb800, 0xd0bc, 0x1904, 0xb044, 0x7348,
-	0xab92, 0x734c, 0xab8e, 0x968c, 0x00ff, 0x9186, 0x0002, 0x0508,
-	0x9186, 0x0028, 0x1118, 0xa87b, 0x001c, 0x00e8, 0xd6dc, 0x01a0,
-	0xa87b, 0x0015, 0xa87c, 0xd0ac, 0x0170, 0xa938, 0xaa34, 0x2100,
-	0x9205, 0x0148, 0x7048, 0x9106, 0x1118, 0x704c, 0x9206, 0x0118,
-	0xa992, 0xaa8e, 0xc6dc, 0x0038, 0xd6d4, 0x0118, 0xa87b, 0x0007,
-	0x0010, 0xa87b, 0x0000, 0xa867, 0x0103, 0xae76, 0x901e, 0xd6c4,
-	0x01d8, 0x9686, 0x0100, 0x1130, 0x7064, 0x9005, 0x1118, 0xc6c4,
-	0x0804, 0xaf97, 0x735c, 0xab86, 0x83ff, 0x0170, 0x938a, 0x0009,
-	0x0210, 0x2019, 0x0008, 0x0036, 0x2308, 0x2019, 0x0018, 0x2011,
-	0x0025, 0x080c, 0xb724, 0x003e, 0xd6cc, 0x0904, 0xafac, 0x7154,
-	0xa98a, 0x81ff, 0x0904, 0xafac, 0x9192, 0x0021, 0x1278, 0x8304,
-	0x9098, 0x0018, 0x2011, 0x0029, 0x080c, 0xb724, 0x2011, 0x0205,
-	0x2013, 0x0000, 0x080c, 0xc1e0, 0x0804, 0xafac, 0xa868, 0xd0fc,
-	0x0120, 0x2009, 0x0020, 0xa98a, 0x0c50, 0x00a6, 0x2950, 0x080c,
-	0xb6c3, 0x00ae, 0x080c, 0xc1e0, 0x080c, 0xb714, 0x0804, 0xafae,
-	0x080c, 0xbe39, 0x0804, 0xafbb, 0xa87c, 0xd0ac, 0x0904, 0xafc7,
-	0xa880, 0xd0bc, 0x1904, 0xafc7, 0x7348, 0xa838, 0x9306, 0x11c8,
-	0x734c, 0xa834, 0x931e, 0x0904, 0xafc7, 0xd6d4, 0x0190, 0xab38,
-	0x9305, 0x0904, 0xafc7, 0x0068, 0xa87c, 0xd0ac, 0x0904, 0xaf9f,
-	0xa838, 0xa934, 0x9105, 0x0904, 0xaf9f, 0xa880, 0xd0bc, 0x1904,
-	0xaf9f, 0x080c, 0xbe73, 0x0804, 0xafbb, 0x0096, 0x00f6, 0x6003,
-	0x0003, 0x6007, 0x0043, 0x2079, 0x026c, 0x7c04, 0x7b00, 0x7e0c,
-	0x7d08, 0x6014, 0x2048, 0xa87c, 0xd0ac, 0x0140, 0x6003, 0x0002,
-	0x00fe, 0x009e, 0x0005, 0x2130, 0x2228, 0x0058, 0x2400, 0xa9ac,
-	0x910a, 0x2300, 0xaab0, 0x9213, 0x2600, 0x9102, 0x2500, 0x9203,
-	0x0e90, 0xac36, 0xab3a, 0xae46, 0xad4a, 0x00fe, 0x6043, 0x0000,
-	0x2c10, 0x080c, 0x1a69, 0x080c, 0x845d, 0x080c, 0x8a68, 0x009e,
-	0x0005, 0x0005, 0x9182, 0x0054, 0x1220, 0x9182, 0x0040, 0x0208,
-	0x000a, 0x0005, 0xb0be, 0xb0be, 0xb0be, 0xb0be, 0xb0be, 0xb0c0,
-	0xb156, 0xb0be, 0xb0be, 0xb16d, 0xb1f9, 0xb0be, 0xb0be, 0xb0be,
-	0xb0be, 0xb20e, 0xb0be, 0xb0be, 0xb0be, 0xb0be, 0x080c, 0x0db4,
-	0x0076, 0x00a6, 0x00e6, 0x0096, 0x2071, 0x0260, 0x6114, 0x2150,
-	0x7644, 0xb676, 0x96b4, 0x0fff, 0xb77c, 0xc7e5, 0xb77e, 0x6210,
-	0x00b6, 0x2258, 0xba3c, 0x82ff, 0x0110, 0x8211, 0xba3e, 0x00be,
-	0x86ff, 0x0904, 0xb151, 0x9694, 0xff00, 0x9284, 0x0c00, 0x0120,
-	0x7048, 0xb092, 0x704c, 0xb08e, 0x9284, 0x0300, 0x0904, 0xb151,
-	0x080c, 0x0feb, 0x090c, 0x0db4, 0x2900, 0xb07a, 0xb77c, 0xc7cd,
-	0xb77e, 0xa867, 0x0103, 0xb068, 0xa86a, 0xb06c, 0xa86e, 0xb070,
-	0xa872, 0xae76, 0x968c, 0x0c00, 0x0120, 0x7348, 0xab92, 0x734c,
-	0xab8e, 0x968c, 0x00ff, 0x9186, 0x0002, 0x0180, 0x9186, 0x0028,
-	0x1118, 0xa87b, 0x001c, 0x0060, 0xd6dc, 0x0118, 0xa87b, 0x0015,
-	0x0038, 0xd6d4, 0x0118, 0xa87b, 0x0007, 0x0010, 0xa87b, 0x0000,
-	0xaf7e, 0xb080, 0xa882, 0xb084, 0xa886, 0x901e, 0xd6c4, 0x0190,
-	0x735c, 0xab86, 0x83ff, 0x0170, 0x938a, 0x0009, 0x0210, 0x2019,
-	0x0008, 0x0036, 0x2308, 0x2019, 0x0018, 0x2011, 0x0025, 0x080c,
-	0xb724, 0x003e, 0xd6cc, 0x01e8, 0x7154, 0xa98a, 0x81ff, 0x01c8,
-	0x9192, 0x0021, 0x1260, 0x8304, 0x9098, 0x0018, 0x2011, 0x0029,
-	0x080c, 0xb724, 0x2011, 0x0205, 0x2013, 0x0000, 0x0050, 0xb068,
-	0xd0fc, 0x0120, 0x2009, 0x0020, 0xa98a, 0x0c68, 0x2950, 0x080c,
-	0xb6c3, 0x009e, 0x00ee, 0x00ae, 0x007e, 0x0005, 0x00f6, 0x00a6,
-	0x6003, 0x0003, 0x2079, 0x026c, 0x7c04, 0x7b00, 0x7e0c, 0x7d08,
-	0x6014, 0x2050, 0xb436, 0xb33a, 0xb646, 0xb54a, 0x00ae, 0x00fe,
-	0x2c10, 0x080c, 0x1a69, 0x0804, 0x9394, 0x6003, 0x0002, 0x6004,
-	0x9086, 0x0040, 0x11c8, 0x0096, 0x6014, 0x2048, 0xa87c, 0xd0ac,
-	0x0160, 0x601c, 0xd084, 0x1130, 0x00f6, 0x2c00, 0x2078, 0x080c,
-	0x164a, 0x00fe, 0x6003, 0x0004, 0x0010, 0x6003, 0x0002, 0x009e,
-	0x080c, 0x887f, 0x080c, 0x898b, 0x0096, 0x2001, 0x1960, 0x2004,
-	0x6042, 0x080c, 0x893b, 0x080c, 0x8a68, 0x6114, 0x2148, 0xa97c,
-	0xd1e4, 0x0904, 0xb1f4, 0xd1cc, 0x05a8, 0xa978, 0xa868, 0xd0fc,
-	0x0538, 0x0016, 0xa87c, 0x0006, 0xa880, 0x0006, 0xa860, 0x20e8,
-	0xa85c, 0x9080, 0x0019, 0x20a0, 0x810e, 0x810e, 0x810f, 0x9184,
-	0x003f, 0x20e0, 0x9184, 0xffc0, 0x9080, 0x0019, 0x2098, 0x0156,
-	0x20a9, 0x0020, 0x4003, 0x015e, 0x000e, 0xa882, 0x000e, 0xa87e,
-	0x001e, 0xa874, 0x0006, 0x2148, 0x080c, 0x0f9d, 0x001e, 0x0440,
-	0x0016, 0x080c, 0x0f9d, 0x009e, 0xa974, 0x0016, 0x080c, 0xb714,
+	0x4000, 0x080c, 0xc418, 0x0030, 0xa807, 0x0000, 0xa867, 0x0103,
+	0xa833, 0x0200, 0x2001, 0x0006, 0x080c, 0x63f0, 0x080c, 0x31b4,
+	0x080c, 0xa0e3, 0x0804, 0xacfe, 0x080c, 0xad0c, 0x6014, 0x9005,
+	0x0190, 0x2048, 0xa868, 0xd0f4, 0x01e8, 0xa864, 0x9084, 0x00ff,
+	0x9086, 0x0039, 0x1d08, 0x2001, 0x0000, 0x900e, 0x2011, 0x4000,
+	0x080c, 0xc418, 0x08f8, 0x080c, 0xad02, 0x0160, 0x9006, 0x080c,
+	0x63dc, 0x2001, 0x0004, 0x080c, 0x641c, 0x2001, 0x0007, 0x080c,
+	0x63f0, 0x08a0, 0x2001, 0x0004, 0x080c, 0x63f0, 0x6003, 0x0001,
+	0x6007, 0x0003, 0x080c, 0x86c1, 0x080c, 0x8c10, 0x0804, 0xacfe,
+	0xb85c, 0xd0e4, 0x01d0, 0x080c, 0xc24d, 0x080c, 0x7207, 0x0118,
+	0xd0dc, 0x1904, 0xac22, 0x2011, 0x1836, 0x2204, 0xc0ad, 0x2012,
+	0x2001, 0x0002, 0x00f6, 0x2079, 0x0100, 0x78e3, 0x0000, 0x080c,
+	0x27e2, 0x78e2, 0x00fe, 0x0804, 0xac22, 0x080c, 0xc28a, 0x2011,
+	0x1836, 0x2204, 0xc0a5, 0x2012, 0x0006, 0x080c, 0xd720, 0x000e,
+	0x1904, 0xac22, 0xc0b5, 0x2012, 0x2001, 0x0006, 0x080c, 0x63f0,
+	0x9006, 0x080c, 0x63dc, 0x00c6, 0x2001, 0x180f, 0x2004, 0xd09c,
+	0x0520, 0x00f6, 0x2079, 0x0100, 0x00e6, 0x2071, 0x1800, 0x700c,
+	0x9084, 0x00ff, 0x78e6, 0x707a, 0x7010, 0x78ea, 0x707e, 0x908c,
+	0x00ff, 0x00ee, 0x780c, 0xc0b5, 0x780e, 0x00fe, 0x080c, 0x27b7,
+	0x00f6, 0x2100, 0x900e, 0x080c, 0x276e, 0x795a, 0x00fe, 0x9186,
+	0x0081, 0x01d8, 0x2009, 0x0081, 0x00c8, 0x2009, 0x00ef, 0x00f6,
+	0x2079, 0x0100, 0x79ea, 0x7932, 0x7936, 0x780c, 0xc0b5, 0x780e,
+	0x00fe, 0x080c, 0x27b7, 0x00f6, 0x2079, 0x1800, 0x797e, 0x2100,
+	0x900e, 0x080c, 0x276e, 0x795a, 0x00fe, 0x8108, 0x080c, 0x643f,
+	0x2b00, 0x00ce, 0x1904, 0xac22, 0x6012, 0x2009, 0x180f, 0x210c,
+	0xd19c, 0x0150, 0x2009, 0x027c, 0x210c, 0x918c, 0x00ff, 0xb912,
+	0x2009, 0x027d, 0x210c, 0xb916, 0x2001, 0x0002, 0x080c, 0x63f0,
+	0x6023, 0x0001, 0x6003, 0x0001, 0x6007, 0x0002, 0x080c, 0x86c1,
+	0x080c, 0x8c10, 0x0018, 0x080c, 0xaa81, 0x0431, 0x00de, 0x009e,
+	0x00be, 0x0005, 0x2001, 0x1810, 0x2004, 0xd0a4, 0x0120, 0x2001,
+	0x185c, 0x2004, 0xd0ac, 0x0005, 0x00e6, 0x080c, 0xdb96, 0x0190,
+	0x2071, 0x0260, 0x7108, 0x720c, 0x918c, 0x00ff, 0x1118, 0x9284,
+	0xff00, 0x0140, 0x6010, 0x2058, 0xb8a0, 0x9084, 0xff80, 0x1110,
+	0xb912, 0xba16, 0x00ee, 0x0005, 0x2030, 0x2001, 0x0007, 0x080c,
+	0x63f0, 0x080c, 0x55ef, 0x1120, 0x2001, 0x0007, 0x080c, 0x641c,
+	0x080c, 0x31b4, 0x6020, 0x9086, 0x000a, 0x1108, 0x0005, 0x0804,
+	0xa0e3, 0x00b6, 0x00e6, 0x0026, 0x0016, 0x2071, 0x1800, 0x708c,
+	0x9086, 0x0014, 0x1904, 0xadd6, 0x00d6, 0x080c, 0x7207, 0x0198,
+	0x0026, 0x2011, 0x0010, 0x080c, 0x67e7, 0x002e, 0x05c8, 0x080c,
+	0x55ef, 0x1540, 0x6014, 0x2048, 0xa807, 0x0000, 0xa867, 0x0103,
+	0xa833, 0xdead, 0x00f8, 0x0026, 0x2011, 0x8008, 0x080c, 0x67e7,
+	0x002e, 0x0530, 0x6014, 0x2048, 0xa864, 0x9084, 0x00ff, 0x9086,
+	0x0039, 0x1140, 0x2001, 0x0030, 0x900e, 0x2011, 0x4009, 0x080c,
+	0xc418, 0x0040, 0x6014, 0x2048, 0xa807, 0x0000, 0xa867, 0x0103,
+	0xa833, 0xdead, 0x6010, 0x2058, 0xb9a0, 0x0016, 0x080c, 0x31b4,
+	0x080c, 0xa0e3, 0x001e, 0x080c, 0x3286, 0x00de, 0x0804, 0xadda,
+	0x00de, 0x080c, 0x55ef, 0x1170, 0x6014, 0x9005, 0x1158, 0x0036,
+	0x0046, 0x6010, 0x2058, 0xbba0, 0x2021, 0x0006, 0x080c, 0x4cbc,
+	0x004e, 0x003e, 0x00d6, 0x6010, 0x2058, 0x080c, 0x653a, 0x080c,
+	0xab98, 0x00de, 0x080c, 0xb01c, 0x1588, 0x6010, 0x2058, 0xb890,
+	0x9005, 0x0560, 0x2001, 0x0006, 0x080c, 0x63f0, 0x0096, 0x6014,
+	0x904d, 0x01d0, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0039, 0x1140,
+	0x2001, 0x0000, 0x900e, 0x2011, 0x4000, 0x080c, 0xc418, 0x0060,
+	0xa864, 0x9084, 0x00ff, 0x9086, 0x0029, 0x0130, 0xa807, 0x0000,
+	0xa867, 0x0103, 0xa833, 0x0200, 0x009e, 0x080c, 0x31b4, 0x6020,
+	0x9086, 0x000a, 0x0138, 0x080c, 0xa0e3, 0x0020, 0x080c, 0xaa81,
+	0x080c, 0xad24, 0x001e, 0x002e, 0x00ee, 0x00be, 0x0005, 0x2011,
+	0x1823, 0x2204, 0x9086, 0x0014, 0x1160, 0x2001, 0x0002, 0x080c,
+	0x63f0, 0x6003, 0x0001, 0x6007, 0x0001, 0x080c, 0x86c1, 0x0804,
+	0x8c10, 0x0804, 0xad24, 0x2030, 0x2011, 0x1823, 0x2204, 0x9086,
+	0x0004, 0x1148, 0x96b6, 0x000b, 0x1120, 0x2001, 0x0007, 0x080c,
+	0x63f0, 0x0804, 0xa0e3, 0x0804, 0xad24, 0x0002, 0xab62, 0xae1d,
+	0xab62, 0xae5c, 0xab62, 0xaf07, 0xae12, 0xab62, 0xab62, 0xaf1a,
+	0xab62, 0xaf2a, 0x6604, 0x9686, 0x0003, 0x0904, 0xad39, 0x96b6,
+	0x001e, 0x1110, 0x080c, 0xa0e3, 0x0005, 0x00b6, 0x00d6, 0x00c6,
+	0x080c, 0xaf3a, 0x11a0, 0x9006, 0x080c, 0x63dc, 0x080c, 0x318b,
+	0x080c, 0xc54e, 0x2001, 0x0002, 0x080c, 0x63f0, 0x6003, 0x0001,
+	0x6007, 0x0002, 0x080c, 0x86c1, 0x080c, 0x8c10, 0x0408, 0x2009,
+	0x026e, 0x2104, 0x9086, 0x0009, 0x1160, 0x6010, 0x2058, 0xb840,
+	0x9084, 0x00ff, 0x9005, 0x0170, 0x8001, 0xb842, 0x601b, 0x000a,
+	0x0078, 0x2009, 0x026f, 0x2104, 0x9084, 0xff00, 0x9086, 0x1900,
+	0x1108, 0x08a0, 0x080c, 0x318b, 0x080c, 0xc54e, 0x080c, 0xad24,
+	0x00ce, 0x00de, 0x00be, 0x0005, 0x0096, 0x00b6, 0x0026, 0x9016,
+	0x080c, 0xaf48, 0x00d6, 0x2069, 0x1954, 0x2d04, 0x9005, 0x0168,
+	0x6010, 0x2058, 0xb8a0, 0x9086, 0x007e, 0x1138, 0x2069, 0x181f,
+	0x2d04, 0x8000, 0x206a, 0x00de, 0x0010, 0x00de, 0x0088, 0x9006,
+	0x080c, 0x63dc, 0x2001, 0x0002, 0x080c, 0x63f0, 0x6003, 0x0001,
+	0x6007, 0x0002, 0x080c, 0x86c1, 0x080c, 0x8c10, 0x0804, 0xaed7,
+	0x080c, 0xbe37, 0x01b0, 0x6014, 0x2048, 0xa864, 0x2010, 0x9086,
+	0x0139, 0x1138, 0x6007, 0x0016, 0x2001, 0x0002, 0x080c, 0xc472,
+	0x00b0, 0x6014, 0x2048, 0xa864, 0xd0fc, 0x0118, 0x2001, 0x0001,
+	0x0ca8, 0x2001, 0x180e, 0x2004, 0xd0dc, 0x0148, 0x6010, 0x2058,
+	0xb840, 0x9084, 0x00ff, 0x9005, 0x1110, 0x9006, 0x0c38, 0x080c,
+	0xaa81, 0x2009, 0x026e, 0x2134, 0x96b4, 0x00ff, 0x9686, 0x0005,
+	0x0510, 0x9686, 0x000b, 0x01c8, 0x2009, 0x026f, 0x2104, 0x9084,
+	0xff00, 0x1118, 0x9686, 0x0009, 0x01b0, 0x9086, 0x1900, 0x1168,
+	0x9686, 0x0009, 0x0180, 0x2001, 0x0004, 0x080c, 0x63f0, 0x2001,
+	0x0028, 0x601a, 0x6007, 0x0052, 0x0010, 0x080c, 0xad24, 0x002e,
+	0x00be, 0x009e, 0x0005, 0x9286, 0x0139, 0x0160, 0x6014, 0x2048,
+	0x080c, 0xbe37, 0x0140, 0xa864, 0x9086, 0x0139, 0x0118, 0xa868,
+	0xd0fc, 0x0108, 0x0c50, 0x6010, 0x2058, 0xb840, 0x9084, 0x00ff,
+	0x9005, 0x0138, 0x8001, 0xb842, 0x601b, 0x000a, 0x6007, 0x0016,
+	0x08f0, 0xb8a0, 0x9086, 0x007e, 0x1138, 0x00e6, 0x2071, 0x1800,
+	0x080c, 0x5ebe, 0x00ee, 0x0010, 0x080c, 0x318b, 0x0870, 0x080c,
+	0xaf48, 0x1160, 0x2001, 0x0004, 0x080c, 0x63f0, 0x6003, 0x0001,
+	0x6007, 0x0003, 0x080c, 0x86c1, 0x0804, 0x8c10, 0x080c, 0xaa81,
+	0x0804, 0xad24, 0x0469, 0x1160, 0x2001, 0x0008, 0x080c, 0x63f0,
+	0x6003, 0x0001, 0x6007, 0x0005, 0x080c, 0x86c1, 0x0804, 0x8c10,
+	0x0804, 0xad24, 0x00e9, 0x1160, 0x2001, 0x000a, 0x080c, 0x63f0,
+	0x6003, 0x0001, 0x6007, 0x0001, 0x080c, 0x86c1, 0x0804, 0x8c10,
+	0x0804, 0xad24, 0x2009, 0x026e, 0x2104, 0x9086, 0x0003, 0x1138,
+	0x2009, 0x026f, 0x2104, 0x9084, 0xff00, 0x9086, 0x2a00, 0x0005,
+	0x9085, 0x0001, 0x0005, 0x00b6, 0x00c6, 0x0016, 0x6110, 0x2158,
+	0x080c, 0x64ae, 0x001e, 0x00ce, 0x00be, 0x0005, 0x00b6, 0x00f6,
+	0x00e6, 0x00d6, 0x0036, 0x0016, 0x6010, 0x2058, 0x2009, 0x1836,
+	0x2104, 0x9085, 0x0003, 0x200a, 0x080c, 0xafee, 0x0560, 0x2009,
+	0x1836, 0x2104, 0xc0cd, 0x200a, 0x080c, 0x67bf, 0x0158, 0x9006,
+	0x2020, 0x2009, 0x002a, 0x080c, 0xd885, 0x2001, 0x180c, 0x200c,
+	0xc195, 0x2102, 0x2019, 0x002a, 0x2009, 0x0001, 0x080c, 0x3156,
+	0x00e6, 0x2071, 0x1800, 0x080c, 0x2f6c, 0x00ee, 0x00c6, 0x0156,
+	0x20a9, 0x0781, 0x2009, 0x007f, 0x080c, 0x3286, 0x8108, 0x1f04,
+	0xaf8c, 0x015e, 0x00ce, 0x080c, 0xaf4b, 0x2071, 0x0260, 0x2079,
+	0x0200, 0x7817, 0x0001, 0x2001, 0x1836, 0x200c, 0xc1c5, 0x7018,
+	0xd0fc, 0x0110, 0xd0dc, 0x0118, 0x7038, 0xd0dc, 0x1108, 0xc1c4,
+	0x7817, 0x0000, 0x2001, 0x1836, 0x2102, 0x2079, 0x0100, 0x2e04,
+	0x9084, 0x00ff, 0x2069, 0x181e, 0x206a, 0x78e6, 0x0006, 0x8e70,
+	0x2e04, 0x2069, 0x181f, 0x206a, 0x78ea, 0x7832, 0x7836, 0x2010,
+	0x9084, 0xff00, 0x001e, 0x9105, 0x2009, 0x182b, 0x200a, 0x2200,
+	0x9084, 0x00ff, 0x2008, 0x080c, 0x27b7, 0x080c, 0x7207, 0x0170,
+	0x2071, 0x0260, 0x2069, 0x195a, 0x7048, 0x206a, 0x704c, 0x6806,
+	0x7050, 0x680a, 0x7054, 0x680e, 0x080c, 0xc24d, 0x0040, 0x2001,
+	0x0006, 0x080c, 0x63f0, 0x080c, 0x31b4, 0x080c, 0xa0e3, 0x001e,
+	0x003e, 0x00de, 0x00ee, 0x00fe, 0x00be, 0x0005, 0x0096, 0x0026,
+	0x0036, 0x00e6, 0x0156, 0x2019, 0x182b, 0x231c, 0x83ff, 0x01f0,
+	0x2071, 0x0260, 0x7200, 0x9294, 0x00ff, 0x7004, 0x9084, 0xff00,
+	0x9205, 0x9306, 0x1198, 0x2011, 0x0276, 0x20a9, 0x0004, 0x2b48,
+	0x2019, 0x000a, 0x080c, 0xb0d0, 0x1148, 0x2011, 0x027a, 0x20a9,
+	0x0004, 0x2019, 0x0006, 0x080c, 0xb0d0, 0x1100, 0x015e, 0x00ee,
+	0x003e, 0x002e, 0x009e, 0x0005, 0x00e6, 0x2071, 0x0260, 0x7034,
+	0x9086, 0x0014, 0x11a8, 0x7038, 0x9086, 0x0800, 0x1188, 0x703c,
+	0xd0ec, 0x0160, 0x9084, 0x0f00, 0x9086, 0x0100, 0x1138, 0x7054,
+	0xd0a4, 0x1110, 0xd0ac, 0x0110, 0x9006, 0x0010, 0x9085, 0x0001,
+	0x00ee, 0x0005, 0x00e6, 0x0096, 0x00c6, 0x0076, 0x0056, 0x0046,
+	0x0026, 0x0006, 0x0126, 0x2091, 0x8000, 0x2029, 0x19c8, 0x252c,
+	0x2021, 0x19ce, 0x2424, 0x2061, 0x1cd0, 0x2071, 0x1800, 0x7250,
+	0x7070, 0x9202, 0x1a04, 0xb0a8, 0x080c, 0xd8b6, 0x0904, 0xb0a1,
+	0x6720, 0x9786, 0x0007, 0x0904, 0xb0a1, 0x2500, 0x9c06, 0x0904,
+	0xb0a1, 0x2400, 0x9c06, 0x05e8, 0x3e08, 0x9186, 0x0002, 0x1148,
+	0x6010, 0x9005, 0x0130, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc,
+	0x1580, 0x00c6, 0x6000, 0x9086, 0x0004, 0x1110, 0x080c, 0x19b4,
+	0x9786, 0x000a, 0x0148, 0x080c, 0xc03f, 0x1130, 0x00ce, 0x080c,
+	0xaa81, 0x080c, 0xa113, 0x00e8, 0x6014, 0x2048, 0x080c, 0xbe37,
+	0x01a8, 0x9786, 0x0003, 0x1530, 0xa867, 0x0103, 0xa87c, 0xd0cc,
+	0x0130, 0x0096, 0xa878, 0x2048, 0x080c, 0x0fe3, 0x009e, 0xab7a,
+	0xa877, 0x0000, 0x080c, 0x6adc, 0x080c, 0xc022, 0x080c, 0xa113,
+	0x00ce, 0x9ce0, 0x0018, 0x7064, 0x9c02, 0x1210, 0x0804, 0xb04f,
+	0x012e, 0x000e, 0x002e, 0x004e, 0x005e, 0x007e, 0x00ce, 0x009e,
+	0x00ee, 0x0005, 0x9786, 0x0006, 0x1118, 0x080c, 0xd830, 0x0c30,
+	0x9786, 0x000a, 0x09e0, 0x0880, 0x220c, 0x2304, 0x9106, 0x1130,
+	0x8210, 0x8318, 0x1f04, 0xb0bc, 0x9006, 0x0005, 0x2304, 0x9102,
+	0x0218, 0x2001, 0x0001, 0x0008, 0x9006, 0x918d, 0x0001, 0x0005,
+	0x0136, 0x01c6, 0x0016, 0x8906, 0x8006, 0x8007, 0x908c, 0x003f,
+	0x21e0, 0x9084, 0xffc0, 0x9300, 0x2098, 0x3518, 0x20a9, 0x0001,
+	0x220c, 0x4002, 0x910e, 0x1140, 0x8210, 0x8319, 0x1dc8, 0x9006,
+	0x001e, 0x01ce, 0x013e, 0x0005, 0x220c, 0x9102, 0x0218, 0x2001,
+	0x0001, 0x0010, 0x2001, 0x0000, 0x918d, 0x0001, 0x001e, 0x01ce,
+	0x013e, 0x0005, 0x6004, 0x908a, 0x0053, 0x1a0c, 0x0dfa, 0x080c,
+	0xc02e, 0x0120, 0x080c, 0xc03f, 0x0168, 0x0028, 0x080c, 0x31b4,
+	0x080c, 0xc03f, 0x0138, 0x080c, 0x8b04, 0x080c, 0xa0e3, 0x080c,
+	0x8c10, 0x0005, 0x080c, 0xaa81, 0x0cb0, 0x9182, 0x0054, 0x1220,
+	0x9182, 0x0040, 0x0208, 0x000a, 0x0005, 0xb131, 0xb131, 0xb131,
+	0xb131, 0xb131, 0xb131, 0xb131, 0xb131, 0xb131, 0xb131, 0xb131,
+	0xb133, 0xb133, 0xb133, 0xb133, 0xb131, 0xb131, 0xb131, 0xb133,
+	0xb131, 0x080c, 0x0dfa, 0x600b, 0xffff, 0x6003, 0x0001, 0x6106,
+	0x080c, 0x8679, 0x0126, 0x2091, 0x8000, 0x080c, 0x8c10, 0x012e,
+	0x0005, 0x9186, 0x0013, 0x1128, 0x6004, 0x9082, 0x0040, 0x0804,
+	0xb1e8, 0x9186, 0x0027, 0x1520, 0x080c, 0x8b04, 0x080c, 0x318b,
+	0x080c, 0xc54e, 0x0096, 0x6114, 0x2148, 0x080c, 0xbe37, 0x0198,
+	0x080c, 0xc03f, 0x1118, 0x080c, 0xaa81, 0x0068, 0xa867, 0x0103,
+	0xa87b, 0x0029, 0xa877, 0x0000, 0xa97c, 0xc1c5, 0xa97e, 0x080c,
+	0x6ae9, 0x080c, 0xc022, 0x009e, 0x080c, 0xa0e3, 0x0804, 0x8c10,
+	0x9186, 0x0014, 0x1120, 0x6004, 0x9082, 0x0040, 0x04a0, 0x9186,
+	0x0046, 0x0150, 0x9186, 0x0045, 0x0138, 0x9186, 0x0053, 0x0120,
+	0x9186, 0x0048, 0x190c, 0x0dfa, 0x2001, 0x0109, 0x2004, 0xd084,
+	0x0508, 0x0126, 0x2091, 0x2800, 0x0006, 0x0016, 0x0026, 0x0036,
+	0x00f6, 0x00e6, 0x00c6, 0x2079, 0x19bf, 0x2071, 0x1800, 0x2061,
+	0x0100, 0x080c, 0x8563, 0x00ce, 0x00ee, 0x00fe, 0x003e, 0x002e,
+	0x001e, 0x000e, 0x012e, 0xa001, 0x6000, 0x9086, 0x0002, 0x1110,
+	0x0804, 0xb226, 0x0005, 0x0002, 0xb1c2, 0xb1c0, 0xb1c0, 0xb1c0,
+	0xb1c0, 0xb1c0, 0xb1c0, 0xb1c0, 0xb1c0, 0xb1c0, 0xb1c0, 0xb1dd,
+	0xb1dd, 0xb1dd, 0xb1dd, 0xb1c0, 0xb1dd, 0xb1c0, 0xb1dd, 0xb1c0,
+	0x080c, 0x0dfa, 0x080c, 0x8b04, 0x0096, 0x6114, 0x2148, 0x080c,
+	0xbe37, 0x0168, 0xa867, 0x0103, 0xa87b, 0x0006, 0xa877, 0x0000,
+	0xa880, 0xc0ec, 0xa882, 0x080c, 0x6ae9, 0x080c, 0xc022, 0x009e,
+	0x080c, 0xa0e3, 0x080c, 0x8c10, 0x0005, 0x080c, 0x8b04, 0x080c,
+	0xc03f, 0x090c, 0xaa81, 0x080c, 0xa0e3, 0x080c, 0x8c10, 0x0005,
+	0x0002, 0xb1ff, 0xb1fd, 0xb1fd, 0xb1fd, 0xb1fd, 0xb1fd, 0xb1fd,
+	0xb1fd, 0xb1fd, 0xb1fd, 0xb1fd, 0xb216, 0xb216, 0xb216, 0xb216,
+	0xb1fd, 0xb220, 0xb1fd, 0xb216, 0xb1fd, 0x080c, 0x0dfa, 0x0096,
+	0x080c, 0x8b04, 0x6014, 0x2048, 0x2001, 0x1960, 0x2004, 0x6042,
+	0xa97c, 0xd1ac, 0x0140, 0x6003, 0x0004, 0xa87c, 0x9085, 0x0400,
+	0xa87e, 0x009e, 0x0005, 0x6003, 0x0002, 0x0cb8, 0x080c, 0x8b04,
+	0x080c, 0xc551, 0x080c, 0xc556, 0x6003, 0x000f, 0x0804, 0x8c10,
+	0x080c, 0x8b04, 0x080c, 0xa0e3, 0x0804, 0x8c10, 0x9182, 0x0054,
+	0x1220, 0x9182, 0x0040, 0x0208, 0x000a, 0x0005, 0xb242, 0xb242,
+	0xb242, 0xb242, 0xb242, 0xb244, 0xb321, 0xb242, 0xb355, 0xb242,
+	0xb242, 0xb242, 0xb242, 0xb242, 0xb242, 0xb242, 0xb242, 0xb242,
+	0xb242, 0xb355, 0x080c, 0x0dfa, 0x00b6, 0x0096, 0x6114, 0x2148,
+	0x7644, 0x96b4, 0x0fff, 0x86ff, 0x1528, 0x6010, 0x2058, 0xb800,
+	0xd0bc, 0x1904, 0xb310, 0xa87b, 0x0000, 0xa867, 0x0103, 0xae76,
+	0xa87c, 0xd0ac, 0x0128, 0xa834, 0xa938, 0x9115, 0x190c, 0xb4ee,
+	0x080c, 0x6904, 0x6210, 0x2258, 0xba3c, 0x82ff, 0x0110, 0x8211,
+	0xba3e, 0x7044, 0xd0e4, 0x1904, 0xb2f4, 0x080c, 0xa0e3, 0x009e,
+	0x00be, 0x0005, 0x968c, 0x0c00, 0x0150, 0x6010, 0x2058, 0xb800,
+	0xd0bc, 0x1904, 0xb2f8, 0x7348, 0xab92, 0x734c, 0xab8e, 0x968c,
+	0x00ff, 0x9186, 0x0002, 0x0508, 0x9186, 0x0028, 0x1118, 0xa87b,
+	0x001c, 0x00e8, 0xd6dc, 0x01a0, 0xa87b, 0x0015, 0xa87c, 0xd0ac,
+	0x0170, 0xa938, 0xaa34, 0x2100, 0x9205, 0x0148, 0x7048, 0x9106,
+	0x1118, 0x704c, 0x9206, 0x0118, 0xa992, 0xaa8e, 0xc6dc, 0x0038,
+	0xd6d4, 0x0118, 0xa87b, 0x0007, 0x0010, 0xa87b, 0x0000, 0xa867,
+	0x0103, 0xae76, 0x901e, 0xd6c4, 0x01d8, 0x9686, 0x0100, 0x1130,
+	0x7064, 0x9005, 0x1118, 0xc6c4, 0x0804, 0xb24b, 0x735c, 0xab86,
+	0x83ff, 0x0170, 0x938a, 0x0009, 0x0210, 0x2019, 0x0008, 0x0036,
+	0x2308, 0x2019, 0x0018, 0x2011, 0x0025, 0x080c, 0xb9e8, 0x003e,
+	0xd6cc, 0x0904, 0xb260, 0x7154, 0xa98a, 0x81ff, 0x0904, 0xb260,
+	0x9192, 0x0021, 0x1278, 0x8304, 0x9098, 0x0018, 0x2011, 0x0029,
+	0x080c, 0xb9e8, 0x2011, 0x0205, 0x2013, 0x0000, 0x080c, 0xc4de,
+	0x0804, 0xb260, 0xa868, 0xd0fc, 0x0120, 0x2009, 0x0020, 0xa98a,
+	0x0c50, 0x00a6, 0x2950, 0x080c, 0xb987, 0x00ae, 0x080c, 0xc4de,
+	0x080c, 0xb9d8, 0x0804, 0xb262, 0x080c, 0xc137, 0x0804, 0xb26f,
+	0xa87c, 0xd0ac, 0x0904, 0xb27b, 0xa880, 0xd0bc, 0x1904, 0xb27b,
+	0x7348, 0xa838, 0x9306, 0x11c8, 0x734c, 0xa834, 0x931e, 0x0904,
+	0xb27b, 0xd6d4, 0x0190, 0xab38, 0x9305, 0x0904, 0xb27b, 0x0068,
+	0xa87c, 0xd0ac, 0x0904, 0xb253, 0xa838, 0xa934, 0x9105, 0x0904,
+	0xb253, 0xa880, 0xd0bc, 0x1904, 0xb253, 0x080c, 0xc171, 0x0804,
+	0xb26f, 0x0096, 0x00f6, 0x6003, 0x0003, 0x6007, 0x0043, 0x2079,
+	0x026c, 0x7c04, 0x7b00, 0x7e0c, 0x7d08, 0x6014, 0x2048, 0xa87c,
+	0xd0ac, 0x0140, 0x6003, 0x0002, 0x00fe, 0x009e, 0x0005, 0x2130,
+	0x2228, 0x0058, 0x2400, 0xa9ac, 0x910a, 0x2300, 0xaab0, 0x9213,
+	0x2600, 0x9102, 0x2500, 0x9203, 0x0e90, 0xac36, 0xab3a, 0xae46,
+	0xad4a, 0x00fe, 0x6043, 0x0000, 0x2c10, 0x080c, 0x1afe, 0x080c,
+	0x86de, 0x080c, 0x8ced, 0x009e, 0x0005, 0x0005, 0x9182, 0x0054,
+	0x1220, 0x9182, 0x0040, 0x0208, 0x000a, 0x0005, 0xb372, 0xb372,
+	0xb372, 0xb372, 0xb372, 0xb374, 0xb40a, 0xb372, 0xb372, 0xb421,
+	0xb4b1, 0xb372, 0xb372, 0xb372, 0xb372, 0xb4c6, 0xb372, 0xb372,
+	0xb372, 0xb372, 0x080c, 0x0dfa, 0x0076, 0x00a6, 0x00e6, 0x0096,
+	0x2071, 0x0260, 0x6114, 0x2150, 0x7644, 0xb676, 0x96b4, 0x0fff,
+	0xb77c, 0xc7e5, 0xb77e, 0x6210, 0x00b6, 0x2258, 0xba3c, 0x82ff,
+	0x0110, 0x8211, 0xba3e, 0x00be, 0x86ff, 0x0904, 0xb405, 0x9694,
+	0xff00, 0x9284, 0x0c00, 0x0120, 0x7048, 0xb092, 0x704c, 0xb08e,
+	0x9284, 0x0300, 0x0904, 0xb405, 0x080c, 0x1031, 0x090c, 0x0dfa,
+	0x2900, 0xb07a, 0xb77c, 0xc7cd, 0xb77e, 0xa867, 0x0103, 0xb068,
+	0xa86a, 0xb06c, 0xa86e, 0xb070, 0xa872, 0xae76, 0x968c, 0x0c00,
+	0x0120, 0x7348, 0xab92, 0x734c, 0xab8e, 0x968c, 0x00ff, 0x9186,
+	0x0002, 0x0180, 0x9186, 0x0028, 0x1118, 0xa87b, 0x001c, 0x0060,
+	0xd6dc, 0x0118, 0xa87b, 0x0015, 0x0038, 0xd6d4, 0x0118, 0xa87b,
+	0x0007, 0x0010, 0xa87b, 0x0000, 0xaf7e, 0xb080, 0xa882, 0xb084,
+	0xa886, 0x901e, 0xd6c4, 0x0190, 0x735c, 0xab86, 0x83ff, 0x0170,
+	0x938a, 0x0009, 0x0210, 0x2019, 0x0008, 0x0036, 0x2308, 0x2019,
+	0x0018, 0x2011, 0x0025, 0x080c, 0xb9e8, 0x003e, 0xd6cc, 0x01e8,
+	0x7154, 0xa98a, 0x81ff, 0x01c8, 0x9192, 0x0021, 0x1260, 0x8304,
+	0x9098, 0x0018, 0x2011, 0x0029, 0x080c, 0xb9e8, 0x2011, 0x0205,
+	0x2013, 0x0000, 0x0050, 0xb068, 0xd0fc, 0x0120, 0x2009, 0x0020,
+	0xa98a, 0x0c68, 0x2950, 0x080c, 0xb987, 0x009e, 0x00ee, 0x00ae,
+	0x007e, 0x0005, 0x00f6, 0x00a6, 0x6003, 0x0003, 0x2079, 0x026c,
+	0x7c04, 0x7b00, 0x7e0c, 0x7d08, 0x6014, 0x2050, 0xb436, 0xb33a,
+	0xb646, 0xb54a, 0x00ae, 0x00fe, 0x2c10, 0x080c, 0x1afe, 0x0804,
+	0x9623, 0x6003, 0x0002, 0x6004, 0x9086, 0x0040, 0x11c8, 0x0096,
+	0x6014, 0x2048, 0xa87c, 0xd0ac, 0x0160, 0x601c, 0xd084, 0x1130,
+	0x00f6, 0x2c00, 0x2078, 0x080c, 0x16db, 0x00fe, 0x6003, 0x0004,
+	0x0010, 0x6003, 0x0002, 0x009e, 0x080c, 0x8b04, 0x080c, 0x8c10,
+	0x0096, 0x2001, 0x1960, 0x2004, 0x6042, 0x080c, 0x8bc0, 0x080c,
+	0x8ced, 0x6114, 0x2148, 0xa97c, 0xd1e4, 0x0904, 0xb4ac, 0xd1cc,
+	0x05c8, 0xa978, 0xa868, 0xd0fc, 0x0540, 0x0016, 0xa87c, 0x0006,
+	0xa880, 0x0006, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0019, 0x20a0,
+	0x810e, 0x810e, 0x810f, 0x9184, 0x003f, 0x20e0, 0x9184, 0xffc0,
+	0x9080, 0x0019, 0x2098, 0x0156, 0x20a9, 0x0020, 0x4003, 0x015e,
+	0x000e, 0xa882, 0x000e, 0xc0cc, 0xa87e, 0x001e, 0xa874, 0x0006,
+	0x2148, 0x080c, 0x0fe3, 0x001e, 0x0458, 0x0016, 0x080c, 0x0fe3,
+	0x009e, 0xa87c, 0xc0cc, 0xa87e, 0xa974, 0x0016, 0x080c, 0xb9d8,
 	0x001e, 0x00f0, 0xa867, 0x0103, 0xa974, 0x9184, 0x00ff, 0x90b6,
 	0x0002, 0x0180, 0x9086, 0x0028, 0x1118, 0xa87b, 0x001c, 0x0060,
 	0xd1dc, 0x0118, 0xa87b, 0x0015, 0x0038, 0xd1d4, 0x0118, 0xa87b,
-	0x0007, 0x0010, 0xa87b, 0x0000, 0x0016, 0x080c, 0x66bb, 0x001e,
-	0xd1e4, 0x1120, 0x080c, 0x9e2f, 0x009e, 0x0005, 0x080c, 0xbe39,
-	0x0cd8, 0x6004, 0x9086, 0x0040, 0x1120, 0x080c, 0x887f, 0x080c,
-	0x898b, 0x2019, 0x0001, 0x080c, 0x96e9, 0x6003, 0x0002, 0x080c,
-	0xc258, 0x080c, 0x893b, 0x080c, 0x8a68, 0x0005, 0x6004, 0x9086,
-	0x0040, 0x1120, 0x080c, 0x887f, 0x080c, 0x898b, 0x2019, 0x0001,
-	0x080c, 0x96e9, 0x080c, 0x893b, 0x080c, 0x2fe7, 0x080c, 0xc250,
-	0x0096, 0x6114, 0x2148, 0x080c, 0xbb3b, 0x0150, 0xa867, 0x0103,
-	0xa87b, 0x0029, 0xa877, 0x0000, 0x080c, 0x68a0, 0x080c, 0xbd24,
-	0x009e, 0x080c, 0x9e2f, 0x080c, 0x8a68, 0x0005, 0xa87b, 0x0015,
+	0x0007, 0x0010, 0xa87b, 0x0000, 0x0016, 0x080c, 0x6904, 0x001e,
+	0xd1e4, 0x1120, 0x080c, 0xa0e3, 0x009e, 0x0005, 0x080c, 0xc137,
+	0x0cd8, 0x6004, 0x9086, 0x0040, 0x1120, 0x080c, 0x8b04, 0x080c,
+	0x8c10, 0x2019, 0x0001, 0x080c, 0x999d, 0x6003, 0x0002, 0x080c,
+	0xc556, 0x080c, 0x8bc0, 0x080c, 0x8ced, 0x0005, 0x6004, 0x9086,
+	0x0040, 0x1120, 0x080c, 0x8b04, 0x080c, 0x8c10, 0x2019, 0x0001,
+	0x080c, 0x999d, 0x080c, 0x8bc0, 0x080c, 0x318b, 0x080c, 0xc54e,
+	0x0096, 0x6114, 0x2148, 0x080c, 0xbe37, 0x0150, 0xa867, 0x0103,
+	0xa87b, 0x0029, 0xa877, 0x0000, 0x080c, 0x6ae9, 0x080c, 0xc022,
+	0x009e, 0x080c, 0xa0e3, 0x080c, 0x8ced, 0x0005, 0xa87b, 0x0015,
 	0xd1fc, 0x0180, 0xa87b, 0x0007, 0x8002, 0x8000, 0x810a, 0x9189,
 	0x0000, 0x0006, 0x0016, 0x2009, 0x1a51, 0x2104, 0x8000, 0x200a,
 	0x001e, 0x000e, 0xa992, 0xa88e, 0x0005, 0x9182, 0x0054, 0x1220,
-	0x9182, 0x0040, 0x0208, 0x000a, 0x0005, 0xb269, 0xb269, 0xb269,
-	0xb269, 0xb269, 0xb26b, 0xb269, 0xb269, 0xb311, 0xb269, 0xb269,
-	0xb269, 0xb269, 0xb269, 0xb269, 0xb269, 0xb269, 0xb269, 0xb269,
-	0xb442, 0x080c, 0x0db4, 0x0076, 0x00a6, 0x00e6, 0x0096, 0x2071,
+	0x9182, 0x0040, 0x0208, 0x000a, 0x0005, 0xb521, 0xb521, 0xb521,
+	0xb521, 0xb521, 0xb523, 0xb521, 0xb521, 0xb5c9, 0xb521, 0xb521,
+	0xb521, 0xb521, 0xb521, 0xb521, 0xb521, 0xb521, 0xb521, 0xb521,
+	0xb6fb, 0x080c, 0x0dfa, 0x0076, 0x00a6, 0x00e6, 0x0096, 0x2071,
 	0x0260, 0x6114, 0x2150, 0x7644, 0xb676, 0x96b4, 0x0fff, 0xb77c,
 	0xc7e5, 0xb77e, 0x6210, 0x00b6, 0x2258, 0xba3c, 0x82ff, 0x0110,
-	0x8211, 0xba3e, 0x00be, 0x86ff, 0x0904, 0xb30a, 0x9694, 0xff00,
+	0x8211, 0xba3e, 0x00be, 0x86ff, 0x0904, 0xb5c2, 0x9694, 0xff00,
 	0x9284, 0x0c00, 0x0120, 0x7048, 0xb092, 0x704c, 0xb08e, 0x9284,
-	0x0300, 0x0904, 0xb30a, 0x9686, 0x0100, 0x1130, 0x7064, 0x9005,
-	0x1118, 0xc6c4, 0xb676, 0x0c38, 0x080c, 0x0feb, 0x090c, 0x0db4,
+	0x0300, 0x0904, 0xb5c2, 0x9686, 0x0100, 0x1130, 0x7064, 0x9005,
+	0x1118, 0xc6c4, 0xb676, 0x0c38, 0x080c, 0x1031, 0x090c, 0x0dfa,
 	0x2900, 0xb07a, 0xb77c, 0x97bd, 0x0200, 0xb77e, 0xa867, 0x0103,
 	0xb068, 0xa86a, 0xb06c, 0xa86e, 0xb070, 0xa872, 0x7044, 0x9084,
 	0xf000, 0x9635, 0xae76, 0x968c, 0x0c00, 0x0120, 0x7348, 0xab92,
@@ -5519,1384 +5606,1542 @@
 	0x0000, 0xaf7e, 0xb080, 0xa882, 0xb084, 0xa886, 0x901e, 0xd6c4,
 	0x0190, 0x735c, 0xab86, 0x83ff, 0x0170, 0x938a, 0x0009, 0x0210,
 	0x2019, 0x0008, 0x0036, 0x2308, 0x2019, 0x0018, 0x2011, 0x0025,
-	0x080c, 0xb724, 0x003e, 0xd6cc, 0x01e8, 0x7154, 0xa98a, 0x81ff,
+	0x080c, 0xb9e8, 0x003e, 0xd6cc, 0x01e8, 0x7154, 0xa98a, 0x81ff,
 	0x01c8, 0x9192, 0x0021, 0x1260, 0x8304, 0x9098, 0x0018, 0x2011,
-	0x0029, 0x080c, 0xb724, 0x2011, 0x0205, 0x2013, 0x0000, 0x0050,
+	0x0029, 0x080c, 0xb9e8, 0x2011, 0x0205, 0x2013, 0x0000, 0x0050,
 	0xb068, 0xd0fc, 0x0120, 0x2009, 0x0020, 0xa98a, 0x0c68, 0x2950,
-	0x080c, 0xb6c3, 0x080c, 0x18ed, 0x009e, 0x00ee, 0x00ae, 0x007e,
+	0x080c, 0xb987, 0x080c, 0x1982, 0x009e, 0x00ee, 0x00ae, 0x007e,
 	0x0005, 0x2001, 0x1960, 0x2004, 0x6042, 0x0096, 0x6114, 0x2148,
 	0xa83c, 0xa940, 0x9105, 0x1118, 0xa87c, 0xc0dc, 0xa87e, 0x6003,
-	0x0002, 0xa97c, 0xd1e4, 0x0904, 0xb43d, 0x6043, 0x0000, 0x6010,
+	0x0002, 0xa97c, 0xd1e4, 0x0904, 0xb6f6, 0x6043, 0x0000, 0x6010,
 	0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x1500, 0xd1cc, 0x0904,
-	0xb40c, 0xa978, 0xa868, 0xd0fc, 0x0904, 0xb3cd, 0x0016, 0xa87c,
+	0xb6c5, 0xa978, 0xa868, 0xd0fc, 0x0904, 0xb686, 0x0016, 0xa87c,
 	0x0006, 0xa880, 0x0006, 0x00a6, 0x2150, 0xb174, 0x9184, 0x00ff,
-	0x90b6, 0x0002, 0x0904, 0xb39b, 0x9086, 0x0028, 0x1904, 0xb387,
-	0xa87b, 0x001c, 0xb07b, 0x001c, 0x0804, 0xb3a3, 0x6024, 0xd0f4,
+	0x90b6, 0x0002, 0x0904, 0xb653, 0x9086, 0x0028, 0x1904, 0xb63f,
+	0xa87b, 0x001c, 0xb07b, 0x001c, 0x0804, 0xb65b, 0x6024, 0xd0f4,
 	0x11d0, 0xa838, 0xaa34, 0x9205, 0x09c8, 0xa838, 0xaa90, 0x9206,
 	0x1120, 0xa88c, 0xaa34, 0x9206, 0x0988, 0x6024, 0xd0d4, 0x1148,
 	0xa9ac, 0xa834, 0x9102, 0x603a, 0xa9b0, 0xa838, 0x9103, 0x603e,
 	0x6024, 0xc0f5, 0x6026, 0x6010, 0x00b6, 0x2058, 0xb83c, 0x8000,
 	0xb83e, 0x00be, 0x9006, 0xa876, 0xa892, 0xa88e, 0xa87c, 0xc0e4,
 	0xa87e, 0xd0cc, 0x0140, 0xc0cc, 0xa87e, 0x0096, 0xa878, 0x2048,
-	0x080c, 0x0f9d, 0x009e, 0x080c, 0xbe73, 0x0804, 0xb43d, 0xd1dc,
-	0x0158, 0xa87b, 0x0015, 0xb07b, 0x0015, 0x080c, 0xc103, 0x0118,
+	0x080c, 0x0fe3, 0x009e, 0x080c, 0xc171, 0x0804, 0xb6f6, 0xd1dc,
+	0x0158, 0xa87b, 0x0015, 0xb07b, 0x0015, 0x080c, 0xc401, 0x0118,
 	0xb174, 0xc1dc, 0xb176, 0x0078, 0xd1d4, 0x0128, 0xa87b, 0x0007,
 	0xb07b, 0x0007, 0x0040, 0xa87c, 0xd0ac, 0x0128, 0xa834, 0xa938,
-	0x9115, 0x190c, 0xb236, 0xa87c, 0xb07e, 0xa890, 0xb092, 0xa88c,
+	0x9115, 0x190c, 0xb4ee, 0xa87c, 0xb07e, 0xa890, 0xb092, 0xa88c,
 	0xb08e, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0019, 0x20a0, 0x20a9,
 	0x0020, 0x8a06, 0x8006, 0x8007, 0x9094, 0x003f, 0x22e0, 0x9084,
 	0xffc0, 0x9080, 0x0019, 0x2098, 0x4003, 0x00ae, 0x000e, 0xa882,
-	0x000e, 0xa87e, 0x080c, 0xc1e0, 0x001e, 0xa874, 0x0006, 0x2148,
-	0x080c, 0x0f9d, 0x001e, 0x0804, 0xb439, 0x0016, 0x00a6, 0x2150,
-	0xb174, 0x9184, 0x00ff, 0x90b6, 0x0002, 0x01e0, 0x9086, 0x0028,
-	0x1128, 0xa87b, 0x001c, 0xb07b, 0x001c, 0x00e0, 0xd1dc, 0x0158,
-	0xa87b, 0x0015, 0xb07b, 0x0015, 0x080c, 0xc103, 0x0118, 0xb174,
-	0xc1dc, 0xb176, 0x0078, 0xd1d4, 0x0128, 0xa87b, 0x0007, 0xb07b,
-	0x0007, 0x0040, 0xa87c, 0xd0ac, 0x0128, 0xa834, 0xa938, 0x9115,
-	0x190c, 0xb236, 0xa890, 0xb092, 0xa88c, 0xb08e, 0xa87c, 0xb07e,
-	0x00ae, 0x080c, 0x0f9d, 0x009e, 0x080c, 0xc1e0, 0xa974, 0x0016,
-	0x080c, 0xb714, 0x001e, 0x0468, 0xa867, 0x0103, 0xa974, 0x9184,
-	0x00ff, 0x90b6, 0x0002, 0x01b0, 0x9086, 0x0028, 0x1118, 0xa87b,
-	0x001c, 0x00d0, 0xd1dc, 0x0148, 0xa87b, 0x0015, 0x080c, 0xc103,
-	0x0118, 0xa974, 0xc1dc, 0xa976, 0x0078, 0xd1d4, 0x0118, 0xa87b,
-	0x0007, 0x0050, 0xa87b, 0x0000, 0xa87c, 0xd0ac, 0x0128, 0xa834,
-	0xa938, 0x9115, 0x190c, 0xb236, 0xa974, 0x0016, 0x080c, 0x66bb,
-	0x001e, 0xd1e4, 0x1120, 0x080c, 0x9e2f, 0x009e, 0x0005, 0x080c,
-	0xbe39, 0x0cd8, 0x6114, 0x0096, 0x2148, 0xa97c, 0xd1e4, 0x190c,
-	0x190b, 0x009e, 0x0005, 0x080c, 0x887f, 0x0010, 0x080c, 0x893b,
-	0x080c, 0xbb3b, 0x01f0, 0x0096, 0x6114, 0x2148, 0x080c, 0xbd41,
-	0x1118, 0x080c, 0xa7cd, 0x00a0, 0xa867, 0x0103, 0x2009, 0x180c,
-	0x210c, 0xd18c, 0x11b8, 0xd184, 0x1190, 0x6108, 0xa97a, 0x918e,
-	0x0029, 0x1110, 0x080c, 0xd80d, 0xa877, 0x0000, 0x080c, 0x68a0,
-	0x009e, 0x080c, 0x9e2f, 0x080c, 0x898b, 0x0804, 0x8a68, 0xa87b,
-	0x0004, 0x0c90, 0xa87b, 0x0004, 0x0c78, 0x9182, 0x0054, 0x1220,
-	0x9182, 0x0040, 0x0208, 0x000a, 0x0005, 0xb499, 0xb499, 0xb499,
-	0xb499, 0xb499, 0xb49b, 0xb499, 0xb499, 0xb499, 0xb499, 0xb499,
-	0xb499, 0xb499, 0xb499, 0xb499, 0xb499, 0xb499, 0xb499, 0xb499,
-	0xb499, 0x080c, 0x0db4, 0x080c, 0x53a2, 0x01f8, 0x6014, 0x7144,
-	0x918c, 0x0fff, 0x9016, 0xd1c4, 0x0118, 0x7264, 0x9294, 0x00ff,
-	0x0096, 0x904d, 0x0188, 0xa87b, 0x0000, 0xa864, 0x9086, 0x0139,
-	0x0128, 0xa867, 0x0103, 0xa976, 0xaa96, 0x0030, 0xa897, 0x4000,
-	0xa99a, 0xaa9e, 0x080c, 0x68a0, 0x009e, 0x0804, 0x9e2f, 0x9182,
-	0x0085, 0x0002, 0xb4d1, 0xb4cf, 0xb4cf, 0xb4dd, 0xb4cf, 0xb4cf,
-	0xb4cf, 0xb4cf, 0xb4cf, 0xb4cf, 0xb4cf, 0xb4cf, 0xb4cf, 0x080c,
-	0x0db4, 0x6003, 0x0001, 0x6106, 0x080c, 0x83f8, 0x0126, 0x2091,
-	0x8000, 0x080c, 0x898b, 0x012e, 0x0005, 0x0026, 0x0056, 0x00d6,
-	0x00e6, 0x2071, 0x0260, 0x7224, 0x6216, 0x7220, 0x080c, 0xbb29,
-	0x01a0, 0x2268, 0x6800, 0x9086, 0x0000, 0x0178, 0x6010, 0x6d10,
-	0x952e, 0x1158, 0x00c6, 0x2d60, 0x080c, 0xb74f, 0x00ce, 0x0128,
-	0x6803, 0x0002, 0x6007, 0x0086, 0x0010, 0x6007, 0x0087, 0x6003,
-	0x0001, 0x080c, 0x83f8, 0x080c, 0x898b, 0x7220, 0x080c, 0xbb29,
-	0x0178, 0x6810, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x0140,
-	0x6824, 0xd0ec, 0x0128, 0x00c6, 0x2d60, 0x080c, 0xbe73, 0x00ce,
-	0x00ee, 0x00de, 0x005e, 0x002e, 0x0005, 0x9186, 0x0013, 0x1160,
-	0x6004, 0x908a, 0x0085, 0x0a0c, 0x0db4, 0x908a, 0x0092, 0x1a0c,
-	0x0db4, 0x9082, 0x0085, 0x00e2, 0x9186, 0x0027, 0x0120, 0x9186,
-	0x0014, 0x190c, 0x0db4, 0x080c, 0x887f, 0x0096, 0x6014, 0x2048,
-	0x080c, 0xbb3b, 0x0140, 0xa867, 0x0103, 0xa877, 0x0000, 0xa87b,
-	0x0029, 0x080c, 0x68a0, 0x009e, 0x080c, 0x9e5f, 0x0804, 0x898b,
-	0xb555, 0xb557, 0xb557, 0xb555, 0xb555, 0xb555, 0xb555, 0xb555,
-	0xb555, 0xb555, 0xb555, 0xb555, 0xb555, 0x080c, 0x0db4, 0x080c,
-	0x887f, 0x080c, 0x9e5f, 0x080c, 0x898b, 0x0005, 0x9186, 0x0013,
-	0x1128, 0x6004, 0x9082, 0x0085, 0x2008, 0x04b8, 0x9186, 0x0027,
-	0x11f8, 0x080c, 0x887f, 0x080c, 0x2fe7, 0x080c, 0xc250, 0x0096,
-	0x6014, 0x2048, 0x080c, 0xbb3b, 0x0150, 0xa867, 0x0103, 0xa877,
-	0x0000, 0xa87b, 0x0029, 0x080c, 0x68a0, 0x080c, 0xbd24, 0x009e,
-	0x080c, 0x9e2f, 0x080c, 0x898b, 0x0005, 0x080c, 0x9ec4, 0x0ce0,
-	0x9186, 0x0014, 0x1dd0, 0x080c, 0x887f, 0x0096, 0x6014, 0x2048,
-	0x080c, 0xbb3b, 0x0d60, 0xa867, 0x0103, 0xa877, 0x0000, 0xa87b,
-	0x0006, 0xa880, 0xc0ec, 0xa882, 0x08f0, 0x0002, 0xb5ad, 0xb5ab,
-	0xb5ab, 0xb5ab, 0xb5ab, 0xb5ab, 0xb5c5, 0xb5ab, 0xb5ab, 0xb5ab,
-	0xb5ab, 0xb5ab, 0xb5ab, 0x080c, 0x0db4, 0x080c, 0x887f, 0x6034,
-	0x908c, 0xff00, 0x810f, 0x9186, 0x0039, 0x0118, 0x9186, 0x0035,
-	0x1118, 0x2001, 0x195e, 0x0010, 0x2001, 0x195f, 0x2004, 0x601a,
-	0x6003, 0x000c, 0x080c, 0x898b, 0x0005, 0x080c, 0x887f, 0x6034,
-	0x908c, 0xff00, 0x810f, 0x9186, 0x0039, 0x0118, 0x9186, 0x0035,
-	0x1118, 0x2001, 0x195e, 0x0010, 0x2001, 0x195f, 0x2004, 0x601a,
-	0x6003, 0x000e, 0x080c, 0x898b, 0x0005, 0x9182, 0x0092, 0x1220,
-	0x9182, 0x0085, 0x0208, 0x0012, 0x0804, 0x9ec4, 0xb5f3, 0xb5f3,
-	0xb5f3, 0xb5f3, 0xb5f5, 0xb642, 0xb5f3, 0xb5f3, 0xb5f3, 0xb5f3,
-	0xb5f3, 0xb5f3, 0xb5f3, 0x080c, 0x0db4, 0x0096, 0x6010, 0x00b6,
-	0x2058, 0xb800, 0x00be, 0xd0bc, 0x0168, 0x6034, 0x908c, 0xff00,
-	0x810f, 0x9186, 0x0039, 0x0118, 0x9186, 0x0035, 0x1118, 0x009e,
-	0x0804, 0xb656, 0x080c, 0xbb3b, 0x1118, 0x080c, 0xbd24, 0x0068,
-	0x6014, 0x2048, 0xa87c, 0xd0e4, 0x1110, 0x080c, 0xbd24, 0xa867,
-	0x0103, 0x080c, 0xc21b, 0x080c, 0x68a0, 0x00d6, 0x2c68, 0x080c,
-	0x9dd9, 0x01d0, 0x6003, 0x0001, 0x6007, 0x001e, 0x600b, 0xffff,
-	0x2009, 0x026e, 0x210c, 0x613a, 0x2009, 0x026f, 0x210c, 0x613e,
-	0x6910, 0x6112, 0x080c, 0xbfb5, 0x6954, 0x6156, 0x6023, 0x0001,
-	0x080c, 0x83f8, 0x080c, 0x898b, 0x2d60, 0x00de, 0x080c, 0x9e2f,
-	0x009e, 0x0005, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc,
-	0x05a0, 0x6034, 0x908c, 0xff00, 0x810f, 0x9186, 0x0035, 0x0130,
-	0x9186, 0x001e, 0x0118, 0x9186, 0x0039, 0x1538, 0x00d6, 0x2c68,
-	0x080c, 0xc1b3, 0x11f0, 0x080c, 0x9dd9, 0x01d8, 0x6106, 0x6003,
-	0x0001, 0x6023, 0x0001, 0x6910, 0x6112, 0x692c, 0x612e, 0x6930,
-	0x6132, 0x6934, 0x918c, 0x00ff, 0x6136, 0x6938, 0x613a, 0x693c,
-	0x613e, 0x6954, 0x6156, 0x080c, 0xbfb5, 0x080c, 0x83f8, 0x080c,
-	0x898b, 0x2d60, 0x00de, 0x0804, 0x9e2f, 0x0096, 0x6014, 0x2048,
-	0x080c, 0xbb3b, 0x01c8, 0xa867, 0x0103, 0xa880, 0xd0b4, 0x0128,
-	0xc0ec, 0xa882, 0xa87b, 0x0006, 0x0048, 0xd0bc, 0x0118, 0xa87b,
-	0x0002, 0x0020, 0xa87b, 0x0005, 0x080c, 0xbe35, 0xa877, 0x0000,
-	0x080c, 0x68a0, 0x080c, 0xbd24, 0x009e, 0x0804, 0x9e2f, 0x0016,
-	0x0096, 0x6014, 0x2048, 0x080c, 0xbb3b, 0x0140, 0xa867, 0x0103,
-	0xa87b, 0x0028, 0xa877, 0x0000, 0x080c, 0x68a0, 0x009e, 0x001e,
-	0x9186, 0x0013, 0x0148, 0x9186, 0x0014, 0x0130, 0x9186, 0x0027,
-	0x0118, 0x080c, 0x9ec4, 0x0030, 0x080c, 0x887f, 0x080c, 0x9e5f,
-	0x080c, 0x898b, 0x0005, 0x0056, 0x0066, 0x0096, 0x00a6, 0x2029,
-	0x0001, 0x9182, 0x0101, 0x1208, 0x0010, 0x2009, 0x0100, 0x2130,
-	0x8304, 0x9098, 0x0018, 0x2009, 0x0020, 0x2011, 0x0029, 0x080c,
-	0xb724, 0x96b2, 0x0020, 0xb004, 0x904d, 0x0110, 0x080c, 0x0f9d,
-	0x080c, 0x0feb, 0x0520, 0x8528, 0xa867, 0x0110, 0xa86b, 0x0000,
-	0x2920, 0xb406, 0x968a, 0x003d, 0x1228, 0x2608, 0x2011, 0x001b,
-	0x0499, 0x00a8, 0x96b2, 0x003c, 0x2009, 0x003c, 0x2950, 0x2011,
-	0x001b, 0x0451, 0x0c28, 0x2001, 0x0205, 0x2003, 0x0000, 0x00ae,
-	0x852f, 0x95ad, 0x0003, 0xb566, 0x95ac, 0x0000, 0x0048, 0x2001,
+	0x000e, 0xc0cc, 0xa87e, 0x080c, 0xc4de, 0x001e, 0xa874, 0x0006,
+	0x2148, 0x080c, 0x0fe3, 0x001e, 0x0804, 0xb6f2, 0x0016, 0x00a6,
+	0x2150, 0xb174, 0x9184, 0x00ff, 0x90b6, 0x0002, 0x01e0, 0x9086,
+	0x0028, 0x1128, 0xa87b, 0x001c, 0xb07b, 0x001c, 0x00e0, 0xd1dc,
+	0x0158, 0xa87b, 0x0015, 0xb07b, 0x0015, 0x080c, 0xc401, 0x0118,
+	0xb174, 0xc1dc, 0xb176, 0x0078, 0xd1d4, 0x0128, 0xa87b, 0x0007,
+	0xb07b, 0x0007, 0x0040, 0xa87c, 0xd0ac, 0x0128, 0xa834, 0xa938,
+	0x9115, 0x190c, 0xb4ee, 0xa890, 0xb092, 0xa88c, 0xb08e, 0xa87c,
+	0xb07e, 0x00ae, 0x080c, 0x0fe3, 0x009e, 0x080c, 0xc4de, 0xa974,
+	0x0016, 0x080c, 0xb9d8, 0x001e, 0x0468, 0xa867, 0x0103, 0xa974,
+	0x9184, 0x00ff, 0x90b6, 0x0002, 0x01b0, 0x9086, 0x0028, 0x1118,
+	0xa87b, 0x001c, 0x00d0, 0xd1dc, 0x0148, 0xa87b, 0x0015, 0x080c,
+	0xc401, 0x0118, 0xa974, 0xc1dc, 0xa976, 0x0078, 0xd1d4, 0x0118,
+	0xa87b, 0x0007, 0x0050, 0xa87b, 0x0000, 0xa87c, 0xd0ac, 0x0128,
+	0xa834, 0xa938, 0x9115, 0x190c, 0xb4ee, 0xa974, 0x0016, 0x080c,
+	0x6904, 0x001e, 0xd1e4, 0x1120, 0x080c, 0xa0e3, 0x009e, 0x0005,
+	0x080c, 0xc137, 0x0cd8, 0x6114, 0x0096, 0x2148, 0xa97c, 0xd1e4,
+	0x190c, 0x19a0, 0x009e, 0x0005, 0x080c, 0x8b04, 0x0010, 0x080c,
+	0x8bc0, 0x080c, 0xbe37, 0x01f0, 0x0096, 0x6114, 0x2148, 0x080c,
+	0xc03f, 0x1118, 0x080c, 0xaa81, 0x00a0, 0xa867, 0x0103, 0x2009,
+	0x180c, 0x210c, 0xd18c, 0x11b8, 0xd184, 0x1190, 0x6108, 0xa97a,
+	0x918e, 0x0029, 0x1110, 0x080c, 0xdb2e, 0xa877, 0x0000, 0x080c,
+	0x6ae9, 0x009e, 0x080c, 0xa0e3, 0x080c, 0x8c10, 0x0804, 0x8ced,
+	0xa87b, 0x0004, 0x0c90, 0xa87b, 0x0004, 0x0c78, 0x9182, 0x0054,
+	0x1220, 0x9182, 0x0040, 0x0208, 0x000a, 0x0005, 0xb752, 0xb752,
+	0xb752, 0xb752, 0xb752, 0xb754, 0xb752, 0xb752, 0xb752, 0xb752,
+	0xb752, 0xb752, 0xb752, 0xb752, 0xb752, 0xb752, 0xb752, 0xb752,
+	0xb752, 0xb752, 0x080c, 0x0dfa, 0x080c, 0x55e3, 0x01f8, 0x6014,
+	0x7144, 0x918c, 0x0fff, 0x9016, 0xd1c4, 0x0118, 0x7264, 0x9294,
+	0x00ff, 0x0096, 0x904d, 0x0188, 0xa87b, 0x0000, 0xa864, 0x9086,
+	0x0139, 0x0128, 0xa867, 0x0103, 0xa976, 0xaa96, 0x0030, 0xa897,
+	0x4000, 0xa99a, 0xaa9e, 0x080c, 0x6ae9, 0x009e, 0x0804, 0xa0e3,
+	0x9182, 0x0085, 0x0002, 0xb78a, 0xb788, 0xb788, 0xb796, 0xb788,
+	0xb788, 0xb788, 0xb788, 0xb788, 0xb788, 0xb788, 0xb788, 0xb788,
+	0x080c, 0x0dfa, 0x6003, 0x0001, 0x6106, 0x080c, 0x8679, 0x0126,
+	0x2091, 0x8000, 0x080c, 0x8c10, 0x012e, 0x0005, 0x0026, 0x0056,
+	0x00d6, 0x00e6, 0x2071, 0x0260, 0x7224, 0x6216, 0x7220, 0x080c,
+	0xbe25, 0x01f8, 0x2268, 0x6800, 0x9086, 0x0000, 0x01d0, 0x6010,
+	0x6d10, 0x952e, 0x11b0, 0x00c6, 0x2d60, 0x00d6, 0x080c, 0xba49,
+	0x00de, 0x00ce, 0x0158, 0x702c, 0xd084, 0x1118, 0x080c, 0xba13,
+	0x0010, 0x6803, 0x0002, 0x6007, 0x0086, 0x0028, 0x080c, 0xba35,
+	0x0d90, 0x6007, 0x0087, 0x6003, 0x0001, 0x080c, 0x8679, 0x080c,
+	0x8c10, 0x7220, 0x080c, 0xbe25, 0x0178, 0x6810, 0x00b6, 0x2058,
+	0xb800, 0x00be, 0xd0bc, 0x0140, 0x6824, 0xd0ec, 0x0128, 0x00c6,
+	0x2d60, 0x080c, 0xc171, 0x00ce, 0x00ee, 0x00de, 0x005e, 0x002e,
+	0x0005, 0x9186, 0x0013, 0x1160, 0x6004, 0x908a, 0x0085, 0x0a0c,
+	0x0dfa, 0x908a, 0x0092, 0x1a0c, 0x0dfa, 0x9082, 0x0085, 0x00e2,
+	0x9186, 0x0027, 0x0120, 0x9186, 0x0014, 0x190c, 0x0dfa, 0x080c,
+	0x8b04, 0x0096, 0x6014, 0x2048, 0x080c, 0xbe37, 0x0140, 0xa867,
+	0x0103, 0xa877, 0x0000, 0xa87b, 0x0029, 0x080c, 0x6ae9, 0x009e,
+	0x080c, 0xa113, 0x0804, 0x8c10, 0xb819, 0xb81b, 0xb81b, 0xb819,
+	0xb819, 0xb819, 0xb819, 0xb819, 0xb819, 0xb819, 0xb819, 0xb819,
+	0xb819, 0x080c, 0x0dfa, 0x080c, 0x8b04, 0x080c, 0xa113, 0x080c,
+	0x8c10, 0x0005, 0x9186, 0x0013, 0x1128, 0x6004, 0x9082, 0x0085,
+	0x2008, 0x04b8, 0x9186, 0x0027, 0x11f8, 0x080c, 0x8b04, 0x080c,
+	0x318b, 0x080c, 0xc54e, 0x0096, 0x6014, 0x2048, 0x080c, 0xbe37,
+	0x0150, 0xa867, 0x0103, 0xa877, 0x0000, 0xa87b, 0x0029, 0x080c,
+	0x6ae9, 0x080c, 0xc022, 0x009e, 0x080c, 0xa0e3, 0x080c, 0x8c10,
+	0x0005, 0x080c, 0xa178, 0x0ce0, 0x9186, 0x0014, 0x1dd0, 0x080c,
+	0x8b04, 0x0096, 0x6014, 0x2048, 0x080c, 0xbe37, 0x0d60, 0xa867,
+	0x0103, 0xa877, 0x0000, 0xa87b, 0x0006, 0xa880, 0xc0ec, 0xa882,
+	0x08f0, 0x0002, 0xb871, 0xb86f, 0xb86f, 0xb86f, 0xb86f, 0xb86f,
+	0xb889, 0xb86f, 0xb86f, 0xb86f, 0xb86f, 0xb86f, 0xb86f, 0x080c,
+	0x0dfa, 0x080c, 0x8b04, 0x6034, 0x908c, 0xff00, 0x810f, 0x9186,
+	0x0039, 0x0118, 0x9186, 0x0035, 0x1118, 0x2001, 0x195e, 0x0010,
+	0x2001, 0x195f, 0x2004, 0x601a, 0x6003, 0x000c, 0x080c, 0x8c10,
+	0x0005, 0x080c, 0x8b04, 0x6034, 0x908c, 0xff00, 0x810f, 0x9186,
+	0x0039, 0x0118, 0x9186, 0x0035, 0x1118, 0x2001, 0x195e, 0x0010,
+	0x2001, 0x195f, 0x2004, 0x601a, 0x6003, 0x000e, 0x080c, 0x8c10,
+	0x0005, 0x9182, 0x0092, 0x1220, 0x9182, 0x0085, 0x0208, 0x0012,
+	0x0804, 0xa178, 0xb8b7, 0xb8b7, 0xb8b7, 0xb8b7, 0xb8b9, 0xb906,
+	0xb8b7, 0xb8b7, 0xb8b7, 0xb8b7, 0xb8b7, 0xb8b7, 0xb8b7, 0x080c,
+	0x0dfa, 0x0096, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc,
+	0x0168, 0x6034, 0x908c, 0xff00, 0x810f, 0x9186, 0x0039, 0x0118,
+	0x9186, 0x0035, 0x1118, 0x009e, 0x0804, 0xb91a, 0x080c, 0xbe37,
+	0x1118, 0x080c, 0xc022, 0x0068, 0x6014, 0x2048, 0xa87c, 0xd0e4,
+	0x1110, 0x080c, 0xc022, 0xa867, 0x0103, 0x080c, 0xc519, 0x080c,
+	0x6ae9, 0x00d6, 0x2c68, 0x080c, 0xa08d, 0x01d0, 0x6003, 0x0001,
+	0x6007, 0x001e, 0x600b, 0xffff, 0x2009, 0x026e, 0x210c, 0x613a,
+	0x2009, 0x026f, 0x210c, 0x613e, 0x6910, 0x6112, 0x080c, 0xc2b3,
+	0x6954, 0x6156, 0x6023, 0x0001, 0x080c, 0x8679, 0x080c, 0x8c10,
+	0x2d60, 0x00de, 0x080c, 0xa0e3, 0x009e, 0x0005, 0x6010, 0x00b6,
+	0x2058, 0xb800, 0x00be, 0xd0bc, 0x05a0, 0x6034, 0x908c, 0xff00,
+	0x810f, 0x9186, 0x0035, 0x0130, 0x9186, 0x001e, 0x0118, 0x9186,
+	0x0039, 0x1538, 0x00d6, 0x2c68, 0x080c, 0xc4b1, 0x11f0, 0x080c,
+	0xa08d, 0x01d8, 0x6106, 0x6003, 0x0001, 0x6023, 0x0001, 0x6910,
+	0x6112, 0x692c, 0x612e, 0x6930, 0x6132, 0x6934, 0x918c, 0x00ff,
+	0x6136, 0x6938, 0x613a, 0x693c, 0x613e, 0x6954, 0x6156, 0x080c,
+	0xc2b3, 0x080c, 0x8679, 0x080c, 0x8c10, 0x2d60, 0x00de, 0x0804,
+	0xa0e3, 0x0096, 0x6014, 0x2048, 0x080c, 0xbe37, 0x01c8, 0xa867,
+	0x0103, 0xa880, 0xd0b4, 0x0128, 0xc0ec, 0xa882, 0xa87b, 0x0006,
+	0x0048, 0xd0bc, 0x0118, 0xa87b, 0x0002, 0x0020, 0xa87b, 0x0005,
+	0x080c, 0xc133, 0xa877, 0x0000, 0x080c, 0x6ae9, 0x080c, 0xc022,
+	0x009e, 0x0804, 0xa0e3, 0x0016, 0x0096, 0x6014, 0x2048, 0x080c,
+	0xbe37, 0x0140, 0xa867, 0x0103, 0xa87b, 0x0028, 0xa877, 0x0000,
+	0x080c, 0x6ae9, 0x009e, 0x001e, 0x9186, 0x0013, 0x0148, 0x9186,
+	0x0014, 0x0130, 0x9186, 0x0027, 0x0118, 0x080c, 0xa178, 0x0030,
+	0x080c, 0x8b04, 0x080c, 0xa113, 0x080c, 0x8c10, 0x0005, 0x0056,
+	0x0066, 0x0096, 0x00a6, 0x2029, 0x0001, 0x9182, 0x0101, 0x1208,
+	0x0010, 0x2009, 0x0100, 0x2130, 0x8304, 0x9098, 0x0018, 0x2009,
+	0x0020, 0x2011, 0x0029, 0x080c, 0xb9e8, 0x96b2, 0x0020, 0xb004,
+	0x904d, 0x0110, 0x080c, 0x0fe3, 0x080c, 0x1031, 0x0520, 0x8528,
+	0xa867, 0x0110, 0xa86b, 0x0000, 0x2920, 0xb406, 0x968a, 0x003d,
+	0x1228, 0x2608, 0x2011, 0x001b, 0x0499, 0x00a8, 0x96b2, 0x003c,
+	0x2009, 0x003c, 0x2950, 0x2011, 0x001b, 0x0451, 0x0c28, 0x2001,
 	0x0205, 0x2003, 0x0000, 0x00ae, 0x852f, 0x95ad, 0x0003, 0xb566,
-	0x009e, 0x006e, 0x005e, 0x0005, 0x00a6, 0x89ff, 0x0158, 0xa804,
-	0x9055, 0x0130, 0xa807, 0x0000, 0x080c, 0x68a0, 0x2a48, 0x0cb8,
-	0x080c, 0x68a0, 0x00ae, 0x0005, 0x00f6, 0x2079, 0x0200, 0x7814,
-	0x9085, 0x0080, 0x7816, 0xd184, 0x0108, 0x8108, 0x810c, 0x20a9,
-	0x0001, 0xa860, 0x20e8, 0xa85c, 0x9200, 0x20a0, 0x20e1, 0x0000,
-	0x2300, 0x9e00, 0x2098, 0x4003, 0x8318, 0x9386, 0x0020, 0x1148,
-	0x2018, 0x2300, 0x9e00, 0x2098, 0x7814, 0x8000, 0x9085, 0x0080,
-	0x7816, 0x8109, 0x1d80, 0x7817, 0x0000, 0x00fe, 0x0005, 0x0066,
-	0x0126, 0x2091, 0x8000, 0x2031, 0x0001, 0x6020, 0x9084, 0x000f,
-	0x0083, 0x012e, 0x006e, 0x0005, 0x0126, 0x2091, 0x8000, 0x0066,
-	0x2031, 0x0000, 0x6020, 0x9084, 0x000f, 0x001b, 0x006e, 0x012e,
-	0x0005, 0xb78a, 0xb78a, 0xb785, 0xb7ac, 0xb778, 0xb785, 0xb7ac,
-	0xb785, 0xb778, 0xb778, 0xb785, 0xb785, 0xb785, 0xb778, 0xb778,
-	0x080c, 0x0db4, 0x0036, 0x2019, 0x0010, 0x080c, 0xd11f, 0x6023,
-	0x0006, 0x6003, 0x0007, 0x003e, 0x0005, 0x9006, 0x0005, 0x9085,
-	0x0001, 0x0005, 0x0096, 0x86ff, 0x11d8, 0x6014, 0x2048, 0x080c,
-	0xbb3b, 0x01c0, 0xa864, 0x9086, 0x0139, 0x1128, 0xa87b, 0x0005,
-	0xa883, 0x0000, 0x0028, 0x900e, 0x2001, 0x0005, 0x080c, 0x6ace,
-	0x080c, 0xbe35, 0x080c, 0x6893, 0x080c, 0x9e5f, 0x9085, 0x0001,
-	0x009e, 0x0005, 0x9006, 0x0ce0, 0x6000, 0x908a, 0x0016, 0x1a0c,
-	0x0db4, 0x0002, 0xb7c2, 0xb7f0, 0xb7c4, 0xb811, 0xb7eb, 0xb7c2,
-	0xb785, 0xb78a, 0xb78a, 0xb785, 0xb785, 0xb785, 0xb785, 0xb785,
-	0xb785, 0xb785, 0x080c, 0x0db4, 0x86ff, 0x1510, 0x6020, 0x9086,
-	0x0006, 0x01f0, 0x0096, 0x6014, 0x2048, 0x080c, 0xbb3b, 0x0158,
-	0xa87c, 0xd0cc, 0x0130, 0x0096, 0xa878, 0x2048, 0x080c, 0x0f9d,
-	0x009e, 0x080c, 0xbe35, 0x009e, 0x080c, 0xc1f5, 0x6007, 0x0085,
-	0x6003, 0x000b, 0x6023, 0x0002, 0x080c, 0x83f8, 0x080c, 0x898b,
-	0x9085, 0x0001, 0x0005, 0x0066, 0x080c, 0x191f, 0x006e, 0x08a0,
-	0x00e6, 0x2071, 0x19bf, 0x7024, 0x9c06, 0x1120, 0x080c, 0x9673,
-	0x00ee, 0x0850, 0x6020, 0x9084, 0x000f, 0x9086, 0x0006, 0x1150,
-	0x0086, 0x0096, 0x2049, 0x0001, 0x2c40, 0x080c, 0x97a4, 0x009e,
-	0x008e, 0x0010, 0x080c, 0x9570, 0x00ee, 0x1904, 0xb7c4, 0x0804,
-	0xb785, 0x0036, 0x00e6, 0x2071, 0x19bf, 0x703c, 0x9c06, 0x1138,
-	0x901e, 0x080c, 0x96e9, 0x00ee, 0x003e, 0x0804, 0xb7c4, 0x080c,
-	0x98d4, 0x00ee, 0x003e, 0x1904, 0xb7c4, 0x0804, 0xb785, 0x00c6,
-	0x6020, 0x9084, 0x000f, 0x0013, 0x00ce, 0x0005, 0xb844, 0xb90f,
-	0xba79, 0xb84e, 0x9e5f, 0xb844, 0xd111, 0xc25d, 0xb90f, 0xb83d,
-	0xbb05, 0xb83d, 0xb83d, 0xb83d, 0xb83d, 0x080c, 0x0db4, 0x080c,
-	0xbd41, 0x1110, 0x080c, 0xa7cd, 0x0005, 0x080c, 0x887f, 0x080c,
-	0x898b, 0x0804, 0x9e2f, 0x601b, 0x0001, 0x0005, 0x080c, 0xbb3b,
-	0x0130, 0x6014, 0x0096, 0x2048, 0x2c00, 0xa896, 0x009e, 0x6000,
-	0x908a, 0x0016, 0x1a0c, 0x0db4, 0x0002, 0xb86d, 0xb86f, 0xb893,
-	0xb8a7, 0xb8cd, 0xb86d, 0xb844, 0xb844, 0xb844, 0xb8a7, 0xb8a7,
-	0xb86d, 0xb86d, 0xb86d, 0xb86d, 0xb8b1, 0x080c, 0x0db4, 0x00e6,
-	0x6014, 0x0096, 0x2048, 0xa880, 0xc0b5, 0xa882, 0x009e, 0x2071,
-	0x19bf, 0x7024, 0x9c06, 0x01a0, 0x080c, 0x9570, 0x080c, 0xc1f5,
-	0x6007, 0x0085, 0x6003, 0x000b, 0x6023, 0x0002, 0x2001, 0x195f,
-	0x2004, 0x601a, 0x080c, 0x83f8, 0x080c, 0x898b, 0x00ee, 0x0005,
-	0x601b, 0x0001, 0x0cd8, 0x0096, 0x6014, 0x2048, 0xa880, 0xc0b5,
-	0xa882, 0x009e, 0x080c, 0xc1f5, 0x6007, 0x0085, 0x6003, 0x000b,
-	0x6023, 0x0002, 0x080c, 0x83f8, 0x080c, 0x898b, 0x0005, 0x0096,
-	0x601b, 0x0001, 0x6014, 0x2048, 0xa880, 0xc0b5, 0xa882, 0x009e,
-	0x0005, 0x080c, 0x53a2, 0x01b8, 0x6014, 0x0096, 0x904d, 0x0190,
-	0xa864, 0xa867, 0x0103, 0xa87b, 0x0006, 0x9086, 0x0139, 0x1150,
-	0xa867, 0x0139, 0xa87b, 0x0030, 0xa897, 0x4005, 0xa89b, 0x0004,
-	0x080c, 0x68a0, 0x009e, 0x0804, 0x9e2f, 0x6014, 0x0096, 0x904d,
-	0x05c8, 0xa97c, 0xd1e4, 0x05b0, 0x2001, 0x180f, 0x2004, 0xd0c4,
-	0x0110, 0x009e, 0x0005, 0xa884, 0x009e, 0x8003, 0x800b, 0x810b,
-	0x9108, 0x611a, 0x2001, 0x0030, 0x2c08, 0x080c, 0x151a, 0x2001,
-	0x030c, 0x2004, 0x9086, 0x0041, 0x11a0, 0x6014, 0x0096, 0x904d,
-	0x090c, 0x0db4, 0xa880, 0xd0f4, 0x1130, 0xc0f5, 0xa882, 0x009e,
-	0x601b, 0x0002, 0x0070, 0x009e, 0x2001, 0x0037, 0x2c08, 0x080c,
-	0x151a, 0x6000, 0x9086, 0x0004, 0x1120, 0x2009, 0x0048, 0x080c,
-	0x9ea9, 0x0005, 0x009e, 0x080c, 0x191f, 0x0804, 0xb893, 0x6000,
-	0x908a, 0x0016, 0x1a0c, 0x0db4, 0x000b, 0x0005, 0xb926, 0xb84b,
-	0xb928, 0xb926, 0xb928, 0xb928, 0xb845, 0xb926, 0xb83f, 0xb83f,
-	0xb926, 0xb926, 0xb926, 0xb926, 0xb926, 0xb926, 0x080c, 0x0db4,
-	0x6010, 0x00b6, 0x2058, 0xb804, 0x9084, 0x00ff, 0x00be, 0x908a,
-	0x000c, 0x1a0c, 0x0db4, 0x00b6, 0x0013, 0x00be, 0x0005, 0xb943,
-	0xba10, 0xb945, 0xb985, 0xb945, 0xb985, 0xb945, 0xb953, 0xb943,
-	0xb985, 0xb943, 0xb974, 0x080c, 0x0db4, 0x6004, 0x908e, 0x0016,
-	0x05c0, 0x908e, 0x0004, 0x05a8, 0x908e, 0x0002, 0x0590, 0x908e,
-	0x0052, 0x0904, 0xba0c, 0x6004, 0x080c, 0xbd41, 0x0904, 0xba29,
-	0x908e, 0x0004, 0x1110, 0x080c, 0x3010, 0x908e, 0x0021, 0x0904,
-	0xba2d, 0x908e, 0x0022, 0x0904, 0xba74, 0x908e, 0x003d, 0x0904,
-	0xba2d, 0x908e, 0x0039, 0x0904, 0xba31, 0x908e, 0x0035, 0x0904,
-	0xba31, 0x908e, 0x001e, 0x0178, 0x908e, 0x0001, 0x1140, 0x6010,
-	0x2058, 0xb804, 0x9084, 0x00ff, 0x9086, 0x0006, 0x0110, 0x080c,
-	0x2fe7, 0x080c, 0xa7cd, 0x0804, 0x9e5f, 0x00c6, 0x00d6, 0x6104,
-	0x9186, 0x0016, 0x0904, 0xb9fd, 0x9186, 0x0002, 0x1904, 0xb9d2,
-	0x2001, 0x1836, 0x2004, 0xd08c, 0x11c8, 0x080c, 0x6faa, 0x11b0,
-	0x080c, 0xc23b, 0x0138, 0x080c, 0x6fcd, 0x1120, 0x080c, 0x6eba,
-	0x0804, 0xba5d, 0x2001, 0x1955, 0x2003, 0x0001, 0x2001, 0x1800,
-	0x2003, 0x0001, 0x080c, 0x6edc, 0x0804, 0xba5d, 0x6010, 0x2058,
-	0x2001, 0x1836, 0x2004, 0xd0ac, 0x1904, 0xba5d, 0xb8a0, 0x9084,
-	0xff80, 0x1904, 0xba5d, 0xb840, 0x9084, 0x00ff, 0x9005, 0x0190,
-	0x8001, 0xb842, 0x6017, 0x0000, 0x6023, 0x0007, 0x601b, 0x0398,
-	0x6043, 0x0000, 0x080c, 0x9dd9, 0x0128, 0x2b00, 0x6012, 0x6023,
-	0x0001, 0x0458, 0x00de, 0x00ce, 0x6004, 0x908e, 0x0002, 0x11a0,
-	0x6010, 0x2058, 0xb8a0, 0x9086, 0x007e, 0x1170, 0x2009, 0x1836,
-	0x2104, 0xc085, 0x200a, 0x00e6, 0x2071, 0x1800, 0x080c, 0x5c78,
-	0x00ee, 0x080c, 0xa7cd, 0x0030, 0x080c, 0xa7cd, 0x080c, 0x2fe7,
-	0x080c, 0xc250, 0x00e6, 0x0126, 0x2091, 0x8000, 0x080c, 0x3010,
-	0x012e, 0x00ee, 0x080c, 0x9e5f, 0x0005, 0x2001, 0x0002, 0x080c,
-	0x61a7, 0x6003, 0x0001, 0x6007, 0x0002, 0x080c, 0x8440, 0x080c,
-	0x898b, 0x00de, 0x00ce, 0x0c80, 0x080c, 0x3010, 0x0804, 0xb981,
-	0x00c6, 0x00d6, 0x6104, 0x9186, 0x0016, 0x0d38, 0x6010, 0x2058,
-	0xb840, 0x9084, 0x00ff, 0x9005, 0x0904, 0xb9d2, 0x8001, 0xb842,
-	0x6003, 0x0001, 0x080c, 0x8440, 0x080c, 0x898b, 0x00de, 0x00ce,
-	0x0898, 0x080c, 0xa7cd, 0x0804, 0xb983, 0x080c, 0xa809, 0x0804,
-	0xb983, 0x00d6, 0x2c68, 0x6104, 0x080c, 0xc1b3, 0x00de, 0x0118,
-	0x080c, 0x9e2f, 0x0408, 0x6004, 0x8007, 0x6134, 0x918c, 0x00ff,
-	0x9105, 0x6036, 0x6007, 0x0085, 0x6003, 0x000b, 0x6023, 0x0002,
-	0x603c, 0x600a, 0x2001, 0x195f, 0x2004, 0x601a, 0x602c, 0x2c08,
-	0x2060, 0x6024, 0xd0b4, 0x0108, 0xc085, 0xc0b5, 0x6026, 0x2160,
-	0x080c, 0x83f8, 0x080c, 0x898b, 0x0005, 0x00de, 0x00ce, 0x080c,
-	0xa7cd, 0x080c, 0x2fe7, 0x00e6, 0x0126, 0x2091, 0x8000, 0x080c,
-	0x3010, 0x6017, 0x0000, 0x6023, 0x0007, 0x601b, 0x0398, 0x6043,
-	0x0000, 0x012e, 0x00ee, 0x0005, 0x080c, 0xa25f, 0x1904, 0xba29,
-	0x0005, 0x6000, 0x908a, 0x0016, 0x1a0c, 0x0db4, 0x0096, 0x00d6,
-	0x001b, 0x00de, 0x009e, 0x0005, 0xba94, 0xba94, 0xba94, 0xba94,
-	0xba94, 0xba94, 0xba94, 0xba94, 0xba94, 0xb844, 0xba94, 0xb84b,
-	0xba96, 0xb84b, 0xbab0, 0xba94, 0x080c, 0x0db4, 0x6004, 0x9086,
-	0x008b, 0x01b0, 0x6034, 0x908c, 0xff00, 0x810f, 0x9186, 0x0035,
-	0x1130, 0x602c, 0x9080, 0x0009, 0x200c, 0xc185, 0x2102, 0x6007,
-	0x008b, 0x6003, 0x000d, 0x080c, 0x83f8, 0x080c, 0x898b, 0x0005,
-	0x080c, 0xc22f, 0x0118, 0x080c, 0xc242, 0x0010, 0x080c, 0xc250,
-	0x080c, 0xbd24, 0x080c, 0xbb3b, 0x0570, 0x080c, 0x2fe7, 0x080c,
-	0xbb3b, 0x0168, 0x6014, 0x2048, 0xa867, 0x0103, 0xa87b, 0x0006,
-	0xa877, 0x0000, 0xa880, 0xc0ed, 0xa882, 0x080c, 0x68a0, 0x2c68,
-	0x080c, 0x9dd9, 0x0150, 0x6810, 0x6012, 0x080c, 0xbfb5, 0x00c6,
-	0x2d60, 0x080c, 0x9e5f, 0x00ce, 0x0008, 0x2d60, 0x6017, 0x0000,
-	0x6023, 0x0001, 0x6007, 0x0001, 0x6003, 0x0001, 0x080c, 0x8440,
-	0x080c, 0x898b, 0x00c8, 0x080c, 0xc22f, 0x0138, 0x6034, 0x9086,
-	0x4000, 0x1118, 0x080c, 0x2fe7, 0x08d0, 0x6034, 0x908c, 0xff00,
-	0x810f, 0x9186, 0x0039, 0x0118, 0x9186, 0x0035, 0x1118, 0x080c,
-	0x2fe7, 0x0868, 0x080c, 0x9e5f, 0x0005, 0x6000, 0x908a, 0x0016,
-	0x1a0c, 0x0db4, 0x0002, 0xbb1b, 0xbb1b, 0xbb1d, 0xbb1d, 0xbb1d,
-	0xbb1b, 0xbb1b, 0x9e5f, 0xbb1b, 0xbb1b, 0xbb1b, 0xbb1b, 0xbb1b,
-	0xbb1b, 0xbb1b, 0xbb1b, 0x080c, 0x0db4, 0x080c, 0x98d4, 0x6114,
-	0x0096, 0x2148, 0xa87b, 0x0006, 0x080c, 0x68a0, 0x009e, 0x0804,
-	0x9e2f, 0x9284, 0x0007, 0x1158, 0x9282, 0x1cd0, 0x0240, 0x2001,
-	0x1819, 0x2004, 0x9202, 0x1218, 0x9085, 0x0001, 0x0005, 0x9006,
-	0x0ce8, 0x0096, 0x0028, 0x0096, 0x0006, 0x6014, 0x2048, 0x000e,
-	0x0006, 0x9984, 0xf000, 0x9086, 0xf000, 0x0110, 0x080c, 0x1096,
-	0x000e, 0x009e, 0x0005, 0x00e6, 0x00c6, 0x0036, 0x0006, 0x0126,
-	0x2091, 0x8000, 0x2061, 0x1cd0, 0x2071, 0x1800, 0x7350, 0x7070,
-	0x9302, 0x1640, 0x6020, 0x9206, 0x11f8, 0x080c, 0xc23b, 0x0180,
-	0x9286, 0x0001, 0x1168, 0x6004, 0x9086, 0x0004, 0x1148, 0x080c,
-	0x2fe7, 0x080c, 0xc250, 0x00c6, 0x080c, 0x9e5f, 0x00ce, 0x0060,
-	0x080c, 0xbf2f, 0x0148, 0x080c, 0xbd41, 0x1110, 0x080c, 0xa7cd,
-	0x00c6, 0x080c, 0x9e2f, 0x00ce, 0x9ce0, 0x0018, 0x7064, 0x9c02,
-	0x1208, 0x08a0, 0x012e, 0x000e, 0x003e, 0x00ce, 0x00ee, 0x0005,
-	0x00e6, 0x00c6, 0x0016, 0x9188, 0x1000, 0x210c, 0x81ff, 0x0128,
-	0x2061, 0x1a87, 0x6112, 0x080c, 0x2fe7, 0x9006, 0x0010, 0x9085,
-	0x0001, 0x001e, 0x00ce, 0x00ee, 0x0005, 0x00c6, 0x0126, 0x2091,
-	0x8000, 0x080c, 0x9dd9, 0x01b0, 0x6656, 0x2b00, 0x6012, 0x080c,
-	0x53a2, 0x0118, 0x080c, 0xbc68, 0x0168, 0x080c, 0xbfb5, 0x6023,
-	0x0003, 0x2009, 0x004b, 0x080c, 0x9ea9, 0x9085, 0x0001, 0x012e,
+	0x95ac, 0x0000, 0x0048, 0x2001, 0x0205, 0x2003, 0x0000, 0x00ae,
+	0x852f, 0x95ad, 0x0003, 0xb566, 0x009e, 0x006e, 0x005e, 0x0005,
+	0x00a6, 0x89ff, 0x0158, 0xa804, 0x9055, 0x0130, 0xa807, 0x0000,
+	0x080c, 0x6ae9, 0x2a48, 0x0cb8, 0x080c, 0x6ae9, 0x00ae, 0x0005,
+	0x00f6, 0x2079, 0x0200, 0x7814, 0x9085, 0x0080, 0x7816, 0xd184,
+	0x0108, 0x8108, 0x810c, 0x20a9, 0x0001, 0xa860, 0x20e8, 0xa85c,
+	0x9200, 0x20a0, 0x20e1, 0x0000, 0x2300, 0x9e00, 0x2098, 0x4003,
+	0x8318, 0x9386, 0x0020, 0x1148, 0x2018, 0x2300, 0x9e00, 0x2098,
+	0x7814, 0x8000, 0x9085, 0x0080, 0x7816, 0x8109, 0x1d80, 0x7817,
+	0x0000, 0x00fe, 0x0005, 0x6920, 0x9186, 0x0003, 0x0118, 0x9186,
+	0x0002, 0x11d0, 0x00c6, 0x00d6, 0x00e6, 0x2d60, 0x0096, 0x6014,
+	0x2048, 0x080c, 0xbe37, 0x0150, 0x2001, 0x0006, 0xa980, 0xc1d5,
+	0x080c, 0x6d17, 0x080c, 0x6adc, 0x080c, 0xc022, 0x009e, 0x080c,
+	0xa113, 0x00ee, 0x00de, 0x00ce, 0x0005, 0x00c6, 0x702c, 0xd084,
+	0x1170, 0x6008, 0x2060, 0x6020, 0x9086, 0x0002, 0x1140, 0x6104,
+	0x9186, 0x0085, 0x0118, 0x9186, 0x008b, 0x1108, 0x9006, 0x00ce,
+	0x0005, 0x0066, 0x0126, 0x2091, 0x8000, 0x2031, 0x0001, 0x6020,
+	0x9084, 0x000f, 0x0083, 0x012e, 0x006e, 0x0005, 0x0126, 0x2091,
+	0x8000, 0x0066, 0x2031, 0x0000, 0x6020, 0x9084, 0x000f, 0x001b,
+	0x006e, 0x012e, 0x0005, 0xba84, 0xba84, 0xba7f, 0xbaa6, 0xba72,
+	0xba7f, 0xbaa6, 0xba7f, 0xba72, 0xba72, 0xba7f, 0xba7f, 0xba7f,
+	0xba72, 0xba72, 0x080c, 0x0dfa, 0x0036, 0x2019, 0x0010, 0x080c,
+	0xd440, 0x6023, 0x0006, 0x6003, 0x0007, 0x003e, 0x0005, 0x9006,
+	0x0005, 0x9085, 0x0001, 0x0005, 0x0096, 0x86ff, 0x11d8, 0x6014,
+	0x2048, 0x080c, 0xbe37, 0x01c0, 0xa864, 0x9086, 0x0139, 0x1128,
+	0xa87b, 0x0005, 0xa883, 0x0000, 0x0028, 0x900e, 0x2001, 0x0005,
+	0x080c, 0x6d17, 0x080c, 0xc133, 0x080c, 0x6adc, 0x080c, 0xa113,
+	0x9085, 0x0001, 0x009e, 0x0005, 0x9006, 0x0ce0, 0x6000, 0x908a,
+	0x0016, 0x1a0c, 0x0dfa, 0x0002, 0xbabc, 0xbaec, 0xbabe, 0xbb0d,
+	0xbae7, 0xbabc, 0xba7f, 0xba84, 0xba84, 0xba7f, 0xba7f, 0xba7f,
+	0xba7f, 0xba7f, 0xba7f, 0xba7f, 0x080c, 0x0dfa, 0x86ff, 0x1520,
+	0x6020, 0x9086, 0x0006, 0x0500, 0x0096, 0x6014, 0x2048, 0x080c,
+	0xbe37, 0x0168, 0xa87c, 0xd0cc, 0x0140, 0x0096, 0xc0cc, 0xa87e,
+	0xa878, 0x2048, 0x080c, 0x0fe3, 0x009e, 0x080c, 0xc133, 0x009e,
+	0x080c, 0xc4f3, 0x6007, 0x0085, 0x6003, 0x000b, 0x6023, 0x0002,
+	0x080c, 0x8679, 0x080c, 0x8c10, 0x9085, 0x0001, 0x0005, 0x0066,
+	0x080c, 0x19b4, 0x006e, 0x0890, 0x00e6, 0x2071, 0x19bf, 0x7024,
+	0x9c06, 0x1120, 0x080c, 0x9927, 0x00ee, 0x0840, 0x6020, 0x9084,
+	0x000f, 0x9086, 0x0006, 0x1150, 0x0086, 0x0096, 0x2049, 0x0001,
+	0x2c40, 0x080c, 0x9a58, 0x009e, 0x008e, 0x0010, 0x080c, 0x9824,
+	0x00ee, 0x1904, 0xbabe, 0x0804, 0xba7f, 0x0036, 0x00e6, 0x2071,
+	0x19bf, 0x703c, 0x9c06, 0x1138, 0x901e, 0x080c, 0x999d, 0x00ee,
+	0x003e, 0x0804, 0xbabe, 0x080c, 0x9b88, 0x00ee, 0x003e, 0x1904,
+	0xbabe, 0x0804, 0xba7f, 0x00c6, 0x6020, 0x9084, 0x000f, 0x0013,
+	0x00ce, 0x0005, 0xbb40, 0xbc0b, 0xbd75, 0xbb4a, 0xa113, 0xbb40,
+	0xd432, 0xc55b, 0xbc0b, 0xbb39, 0xbe01, 0xbb39, 0xbb39, 0xbb39,
+	0xbb39, 0x080c, 0x0dfa, 0x080c, 0xc03f, 0x1110, 0x080c, 0xaa81,
+	0x0005, 0x080c, 0x8b04, 0x080c, 0x8c10, 0x0804, 0xa0e3, 0x601b,
+	0x0001, 0x0005, 0x080c, 0xbe37, 0x0130, 0x6014, 0x0096, 0x2048,
+	0x2c00, 0xa896, 0x009e, 0x6000, 0x908a, 0x0016, 0x1a0c, 0x0dfa,
+	0x0002, 0xbb69, 0xbb6b, 0xbb8f, 0xbba3, 0xbbc9, 0xbb69, 0xbb40,
+	0xbb40, 0xbb40, 0xbba3, 0xbba3, 0xbb69, 0xbb69, 0xbb69, 0xbb69,
+	0xbbad, 0x080c, 0x0dfa, 0x00e6, 0x6014, 0x0096, 0x2048, 0xa880,
+	0xc0b5, 0xa882, 0x009e, 0x2071, 0x19bf, 0x7024, 0x9c06, 0x01a0,
+	0x080c, 0x9824, 0x080c, 0xc4f3, 0x6007, 0x0085, 0x6003, 0x000b,
+	0x6023, 0x0002, 0x2001, 0x195f, 0x2004, 0x601a, 0x080c, 0x8679,
+	0x080c, 0x8c10, 0x00ee, 0x0005, 0x601b, 0x0001, 0x0cd8, 0x0096,
+	0x6014, 0x2048, 0xa880, 0xc0b5, 0xa882, 0x009e, 0x080c, 0xc4f3,
+	0x6007, 0x0085, 0x6003, 0x000b, 0x6023, 0x0002, 0x080c, 0x8679,
+	0x080c, 0x8c10, 0x0005, 0x0096, 0x601b, 0x0001, 0x6014, 0x2048,
+	0xa880, 0xc0b5, 0xa882, 0x009e, 0x0005, 0x080c, 0x55e3, 0x01b8,
+	0x6014, 0x0096, 0x904d, 0x0190, 0xa864, 0xa867, 0x0103, 0xa87b,
+	0x0006, 0x9086, 0x0139, 0x1150, 0xa867, 0x0139, 0xa87b, 0x0030,
+	0xa897, 0x4005, 0xa89b, 0x0004, 0x080c, 0x6ae9, 0x009e, 0x0804,
+	0xa0e3, 0x6014, 0x0096, 0x904d, 0x05c8, 0xa97c, 0xd1e4, 0x05b0,
+	0x2001, 0x180f, 0x2004, 0xd0c4, 0x0110, 0x009e, 0x0005, 0xa884,
+	0x009e, 0x8003, 0x800b, 0x810b, 0x9108, 0x611a, 0x2001, 0x0030,
+	0x2c08, 0x080c, 0x158b, 0x2001, 0x030c, 0x2004, 0x9086, 0x0041,
+	0x11a0, 0x6014, 0x0096, 0x904d, 0x090c, 0x0dfa, 0xa880, 0xd0f4,
+	0x1130, 0xc0f5, 0xa882, 0x009e, 0x601b, 0x0002, 0x0070, 0x009e,
+	0x2001, 0x0037, 0x2c08, 0x080c, 0x158b, 0x6000, 0x9086, 0x0004,
+	0x1120, 0x2009, 0x0048, 0x080c, 0xa15d, 0x0005, 0x009e, 0x080c,
+	0x19b4, 0x0804, 0xbb8f, 0x6000, 0x908a, 0x0016, 0x1a0c, 0x0dfa,
+	0x000b, 0x0005, 0xbc22, 0xbb47, 0xbc24, 0xbc22, 0xbc24, 0xbc24,
+	0xbb41, 0xbc22, 0xbb3b, 0xbb3b, 0xbc22, 0xbc22, 0xbc22, 0xbc22,
+	0xbc22, 0xbc22, 0x080c, 0x0dfa, 0x6010, 0x00b6, 0x2058, 0xb804,
+	0x9084, 0x00ff, 0x00be, 0x908a, 0x000c, 0x1a0c, 0x0dfa, 0x00b6,
+	0x0013, 0x00be, 0x0005, 0xbc3f, 0xbd0c, 0xbc41, 0xbc81, 0xbc41,
+	0xbc81, 0xbc41, 0xbc4f, 0xbc3f, 0xbc81, 0xbc3f, 0xbc70, 0x080c,
+	0x0dfa, 0x6004, 0x908e, 0x0016, 0x05c0, 0x908e, 0x0004, 0x05a8,
+	0x908e, 0x0002, 0x0590, 0x908e, 0x0052, 0x0904, 0xbd08, 0x6004,
+	0x080c, 0xc03f, 0x0904, 0xbd25, 0x908e, 0x0004, 0x1110, 0x080c,
+	0x31b4, 0x908e, 0x0021, 0x0904, 0xbd29, 0x908e, 0x0022, 0x0904,
+	0xbd70, 0x908e, 0x003d, 0x0904, 0xbd29, 0x908e, 0x0039, 0x0904,
+	0xbd2d, 0x908e, 0x0035, 0x0904, 0xbd2d, 0x908e, 0x001e, 0x0178,
+	0x908e, 0x0001, 0x1140, 0x6010, 0x2058, 0xb804, 0x9084, 0x00ff,
+	0x9086, 0x0006, 0x0110, 0x080c, 0x318b, 0x080c, 0xaa81, 0x0804,
+	0xa113, 0x00c6, 0x00d6, 0x6104, 0x9186, 0x0016, 0x0904, 0xbcf9,
+	0x9186, 0x0002, 0x1904, 0xbcce, 0x2001, 0x1836, 0x2004, 0xd08c,
+	0x11c8, 0x080c, 0x7207, 0x11b0, 0x080c, 0xc539, 0x0138, 0x080c,
+	0x722a, 0x1120, 0x080c, 0x7105, 0x0804, 0xbd59, 0x2001, 0x1955,
+	0x2003, 0x0001, 0x2001, 0x1800, 0x2003, 0x0001, 0x080c, 0x7127,
+	0x0804, 0xbd59, 0x6010, 0x2058, 0x2001, 0x1836, 0x2004, 0xd0ac,
+	0x1904, 0xbd59, 0xb8a0, 0x9084, 0xff80, 0x1904, 0xbd59, 0xb840,
+	0x9084, 0x00ff, 0x9005, 0x0190, 0x8001, 0xb842, 0x6017, 0x0000,
+	0x6023, 0x0007, 0x601b, 0x0398, 0x6043, 0x0000, 0x080c, 0xa08d,
+	0x0128, 0x2b00, 0x6012, 0x6023, 0x0001, 0x0458, 0x00de, 0x00ce,
+	0x6004, 0x908e, 0x0002, 0x11a0, 0x6010, 0x2058, 0xb8a0, 0x9086,
+	0x007e, 0x1170, 0x2009, 0x1836, 0x2104, 0xc085, 0x200a, 0x00e6,
+	0x2071, 0x1800, 0x080c, 0x5ebe, 0x00ee, 0x080c, 0xaa81, 0x0030,
+	0x080c, 0xaa81, 0x080c, 0x318b, 0x080c, 0xc54e, 0x00e6, 0x0126,
+	0x2091, 0x8000, 0x080c, 0x31b4, 0x012e, 0x00ee, 0x080c, 0xa113,
+	0x0005, 0x2001, 0x0002, 0x080c, 0x63f0, 0x6003, 0x0001, 0x6007,
+	0x0002, 0x080c, 0x86c1, 0x080c, 0x8c10, 0x00de, 0x00ce, 0x0c80,
+	0x080c, 0x31b4, 0x0804, 0xbc7d, 0x00c6, 0x00d6, 0x6104, 0x9186,
+	0x0016, 0x0d38, 0x6010, 0x2058, 0xb840, 0x9084, 0x00ff, 0x9005,
+	0x0904, 0xbcce, 0x8001, 0xb842, 0x6003, 0x0001, 0x080c, 0x86c1,
+	0x080c, 0x8c10, 0x00de, 0x00ce, 0x0898, 0x080c, 0xaa81, 0x0804,
+	0xbc7f, 0x080c, 0xaabd, 0x0804, 0xbc7f, 0x00d6, 0x2c68, 0x6104,
+	0x080c, 0xc4b1, 0x00de, 0x0118, 0x080c, 0xa0e3, 0x0408, 0x6004,
+	0x8007, 0x6134, 0x918c, 0x00ff, 0x9105, 0x6036, 0x6007, 0x0085,
+	0x6003, 0x000b, 0x6023, 0x0002, 0x603c, 0x600a, 0x2001, 0x195f,
+	0x2004, 0x601a, 0x602c, 0x2c08, 0x2060, 0x6024, 0xd0b4, 0x0108,
+	0xc085, 0xc0b5, 0x6026, 0x2160, 0x080c, 0x8679, 0x080c, 0x8c10,
+	0x0005, 0x00de, 0x00ce, 0x080c, 0xaa81, 0x080c, 0x318b, 0x00e6,
+	0x0126, 0x2091, 0x8000, 0x080c, 0x31b4, 0x6017, 0x0000, 0x6023,
+	0x0007, 0x601b, 0x0398, 0x6043, 0x0000, 0x012e, 0x00ee, 0x0005,
+	0x080c, 0xa513, 0x1904, 0xbd25, 0x0005, 0x6000, 0x908a, 0x0016,
+	0x1a0c, 0x0dfa, 0x0096, 0x00d6, 0x001b, 0x00de, 0x009e, 0x0005,
+	0xbd90, 0xbd90, 0xbd90, 0xbd90, 0xbd90, 0xbd90, 0xbd90, 0xbd90,
+	0xbd90, 0xbb40, 0xbd90, 0xbb47, 0xbd92, 0xbb47, 0xbdac, 0xbd90,
+	0x080c, 0x0dfa, 0x6004, 0x9086, 0x008b, 0x01b0, 0x6034, 0x908c,
+	0xff00, 0x810f, 0x9186, 0x0035, 0x1130, 0x602c, 0x9080, 0x0009,
+	0x200c, 0xc185, 0x2102, 0x6007, 0x008b, 0x6003, 0x000d, 0x080c,
+	0x8679, 0x080c, 0x8c10, 0x0005, 0x080c, 0xc52d, 0x0118, 0x080c,
+	0xc540, 0x0010, 0x080c, 0xc54e, 0x080c, 0xc022, 0x080c, 0xbe37,
+	0x0570, 0x080c, 0x318b, 0x080c, 0xbe37, 0x0168, 0x6014, 0x2048,
+	0xa867, 0x0103, 0xa87b, 0x0006, 0xa877, 0x0000, 0xa880, 0xc0ed,
+	0xa882, 0x080c, 0x6ae9, 0x2c68, 0x080c, 0xa08d, 0x0150, 0x6810,
+	0x6012, 0x080c, 0xc2b3, 0x00c6, 0x2d60, 0x080c, 0xa113, 0x00ce,
+	0x0008, 0x2d60, 0x6017, 0x0000, 0x6023, 0x0001, 0x6007, 0x0001,
+	0x6003, 0x0001, 0x080c, 0x86c1, 0x080c, 0x8c10, 0x00c8, 0x080c,
+	0xc52d, 0x0138, 0x6034, 0x9086, 0x4000, 0x1118, 0x080c, 0x318b,
+	0x08d0, 0x6034, 0x908c, 0xff00, 0x810f, 0x9186, 0x0039, 0x0118,
+	0x9186, 0x0035, 0x1118, 0x080c, 0x318b, 0x0868, 0x080c, 0xa113,
+	0x0005, 0x6000, 0x908a, 0x0016, 0x1a0c, 0x0dfa, 0x0002, 0xbe17,
+	0xbe17, 0xbe19, 0xbe19, 0xbe19, 0xbe17, 0xbe17, 0xa113, 0xbe17,
+	0xbe17, 0xbe17, 0xbe17, 0xbe17, 0xbe17, 0xbe17, 0xbe17, 0x080c,
+	0x0dfa, 0x080c, 0x9b88, 0x6114, 0x0096, 0x2148, 0xa87b, 0x0006,
+	0x080c, 0x6ae9, 0x009e, 0x0804, 0xa0e3, 0x9284, 0x0007, 0x1158,
+	0x9282, 0x1cd0, 0x0240, 0x2001, 0x1819, 0x2004, 0x9202, 0x1218,
+	0x9085, 0x0001, 0x0005, 0x9006, 0x0ce8, 0x0096, 0x0028, 0x0096,
+	0x0006, 0x6014, 0x2048, 0x000e, 0x0006, 0x9984, 0xf000, 0x9086,
+	0xf000, 0x0110, 0x080c, 0x10dc, 0x000e, 0x009e, 0x0005, 0x00e6,
+	0x00c6, 0x0036, 0x0006, 0x0126, 0x2091, 0x8000, 0x2061, 0x1cd0,
+	0x2071, 0x1800, 0x7350, 0x7070, 0x9302, 0x1640, 0x6020, 0x9206,
+	0x11f8, 0x080c, 0xc539, 0x0180, 0x9286, 0x0001, 0x1168, 0x6004,
+	0x9086, 0x0004, 0x1148, 0x080c, 0x318b, 0x080c, 0xc54e, 0x00c6,
+	0x080c, 0xa113, 0x00ce, 0x0060, 0x080c, 0xc22d, 0x0148, 0x080c,
+	0xc03f, 0x1110, 0x080c, 0xaa81, 0x00c6, 0x080c, 0xa0e3, 0x00ce,
+	0x9ce0, 0x0018, 0x7064, 0x9c02, 0x1208, 0x08a0, 0x012e, 0x000e,
+	0x003e, 0x00ce, 0x00ee, 0x0005, 0x00e6, 0x00c6, 0x0016, 0x9188,
+	0x1000, 0x210c, 0x81ff, 0x0128, 0x2061, 0x1a8a, 0x6112, 0x080c,
+	0x318b, 0x9006, 0x0010, 0x9085, 0x0001, 0x001e, 0x00ce, 0x00ee,
+	0x0005, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0xa08d, 0x01b0,
+	0x6656, 0x2b00, 0x6012, 0x080c, 0x55e3, 0x0118, 0x080c, 0xbf66,
+	0x0168, 0x080c, 0xc2b3, 0x6023, 0x0003, 0x2009, 0x004b, 0x080c,
+	0xa15d, 0x9085, 0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8,
+	0x00c6, 0x0126, 0x2091, 0x8000, 0xbaa0, 0x080c, 0xa130, 0x0560,
+	0x6057, 0x0000, 0x2b00, 0x6012, 0x080c, 0xc2b3, 0x6023, 0x0003,
+	0x0016, 0x080c, 0x8803, 0x0076, 0x903e, 0x080c, 0x86f1, 0x2c08,
+	0x080c, 0xd5f6, 0x007e, 0x001e, 0xd184, 0x0128, 0x080c, 0xa0e3,
+	0x9085, 0x0001, 0x0070, 0x080c, 0x55e3, 0x0128, 0xd18c, 0x1170,
+	0x080c, 0xbf66, 0x0148, 0x2009, 0x004c, 0x080c, 0xa15d, 0x9085,
+	0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x2900, 0x6016,
+	0x0c90, 0x2009, 0x004d, 0x0010, 0x2009, 0x004e, 0x00f6, 0x00c6,
+	0x0046, 0x0016, 0x080c, 0xa08d, 0x2c78, 0x05a0, 0x7e56, 0x2b00,
+	0x7812, 0x7823, 0x0003, 0x0016, 0x2021, 0x0005, 0x080c, 0xbf78,
+	0x001e, 0x9186, 0x004d, 0x0118, 0x9186, 0x004e, 0x0148, 0x2001,
+	0x1958, 0x200c, 0xd1fc, 0x0168, 0x2f60, 0x080c, 0xa0e3, 0x00d0,
+	0x2001, 0x1957, 0x200c, 0xd1fc, 0x0120, 0x2f60, 0x080c, 0xa0e3,
+	0x0088, 0x2f60, 0x080c, 0x55e3, 0x0138, 0xd18c, 0x1118, 0x04f1,
+	0x0148, 0x0010, 0x2900, 0x7816, 0x001e, 0x0016, 0x080c, 0xa15d,
+	0x9085, 0x0001, 0x001e, 0x004e, 0x00ce, 0x00fe, 0x0005, 0x00f6,
+	0x00c6, 0x0046, 0x080c, 0xa08d, 0x2c78, 0x0508, 0x7e56, 0x2b00,
+	0x7812, 0x7823, 0x0003, 0x0096, 0x2021, 0x0004, 0x0489, 0x009e,
+	0x2001, 0x1956, 0x200c, 0xd1fc, 0x0120, 0x2f60, 0x080c, 0xa0e3,
+	0x0060, 0x2f60, 0x080c, 0x55e3, 0x0120, 0xd18c, 0x1160, 0x0071,
+	0x0130, 0x2009, 0x0052, 0x080c, 0xa15d, 0x9085, 0x0001, 0x004e,
+	0x00ce, 0x00fe, 0x0005, 0x2900, 0x7816, 0x0c98, 0x00c6, 0x080c,
+	0x4abf, 0x00ce, 0x1120, 0x080c, 0xa0e3, 0x9006, 0x0005, 0xa867,
+	0x0000, 0xa86b, 0x8000, 0x2900, 0x6016, 0x9085, 0x0001, 0x0005,
+	0x0096, 0x0076, 0x0126, 0x2091, 0x8000, 0x080c, 0x65d3, 0x0158,
+	0x2001, 0xbf7d, 0x0006, 0x900e, 0x2400, 0x080c, 0x6d17, 0x080c,
+	0x6ae9, 0x000e, 0x0807, 0x2418, 0x080c, 0x8a9e, 0xbaa0, 0x0086,
+	0x2041, 0x0001, 0x2039, 0x0001, 0x2608, 0x080c, 0x881b, 0x008e,
+	0x080c, 0x86f1, 0x2f08, 0x2648, 0x080c, 0xd5f6, 0xb93c, 0x81ff,
+	0x090c, 0x88ee, 0x080c, 0x8c10, 0x012e, 0x007e, 0x009e, 0x0005,
+	0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0xa08d, 0x0190, 0x660a,
+	0x2b08, 0x6112, 0x080c, 0xc2b3, 0x6023, 0x0001, 0x2900, 0x6016,
+	0x2009, 0x001f, 0x080c, 0xa15d, 0x9085, 0x0001, 0x012e, 0x00ce,
+	0x0005, 0x9006, 0x0cd8, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c,
+	0xa130, 0x01b8, 0x660a, 0x2b08, 0x6112, 0x080c, 0xc2b3, 0x6023,
+	0x0008, 0x2900, 0x6016, 0x00f6, 0x2c78, 0x080c, 0x16db, 0x00fe,
+	0x2009, 0x0021, 0x080c, 0xa15d, 0x9085, 0x0001, 0x012e, 0x00ce,
+	0x0005, 0x9006, 0x0cd8, 0x2009, 0x003d, 0x00c6, 0x0126, 0x0016,
+	0x2091, 0x8000, 0x080c, 0xa08d, 0x0198, 0x660a, 0x2b08, 0x6112,
+	0x080c, 0xc2b3, 0x6023, 0x0001, 0x2900, 0x6016, 0x001e, 0x0016,
+	0x080c, 0xa15d, 0x9085, 0x0001, 0x001e, 0x012e, 0x00ce, 0x0005,
+	0x9006, 0x0cd0, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0xa130,
+	0x0188, 0x2b08, 0x6112, 0x080c, 0xc2b3, 0x6023, 0x0001, 0x2900,
+	0x6016, 0x2009, 0x0000, 0x080c, 0xa15d, 0x9085, 0x0001, 0x012e,
+	0x00ce, 0x0005, 0x9006, 0x0cd8, 0x2009, 0x0044, 0x0830, 0x2009,
+	0x0049, 0x0818, 0x0026, 0x00b6, 0x6210, 0x2258, 0xba3c, 0x82ff,
+	0x0110, 0x8211, 0xba3e, 0x00be, 0x002e, 0x0005, 0x0006, 0x0016,
+	0x6004, 0x908e, 0x0002, 0x0140, 0x908e, 0x0003, 0x0128, 0x908e,
+	0x0004, 0x0110, 0x9085, 0x0001, 0x001e, 0x000e, 0x0005, 0x0006,
+	0x0086, 0x0096, 0x6020, 0x9086, 0x0004, 0x01a8, 0x6014, 0x904d,
+	0x080c, 0xbe37, 0x0180, 0xa864, 0x9086, 0x0139, 0x0170, 0x6020,
+	0x90c6, 0x0003, 0x0140, 0x90c6, 0x0002, 0x0128, 0xa868, 0xd0fc,
+	0x0110, 0x9006, 0x0010, 0x9085, 0x0001, 0x009e, 0x008e, 0x000e,
+	0x0005, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0xa130, 0x0198,
+	0x2b08, 0x6112, 0x080c, 0xc2b3, 0x6023, 0x0001, 0x2900, 0x6016,
+	0x080c, 0x318b, 0x2009, 0x0028, 0x080c, 0xa15d, 0x9085, 0x0001,
+	0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x9186, 0x0015, 0x11a8,
+	0x2011, 0x1823, 0x2204, 0x9086, 0x0074, 0x1178, 0x00b6, 0x080c,
+	0xad0c, 0x00be, 0x080c, 0xaf4b, 0x6003, 0x0001, 0x6007, 0x0029,
+	0x080c, 0x86c1, 0x080c, 0x8c10, 0x0078, 0x6014, 0x0096, 0x2048,
+	0xa868, 0x009e, 0xd0fc, 0x0148, 0x2001, 0x0001, 0x080c, 0xc472,
+	0x080c, 0xaa81, 0x080c, 0xa0e3, 0x0005, 0x0096, 0x6014, 0x904d,
+	0x090c, 0x0dfa, 0xa87b, 0x0030, 0xa883, 0x0000, 0xa897, 0x4005,
+	0xa89b, 0x0004, 0xa867, 0x0139, 0x0126, 0x2091, 0x8000, 0x080c,
+	0x6ae9, 0x012e, 0x009e, 0x080c, 0xa0e3, 0x0c30, 0x0096, 0x9186,
+	0x0016, 0x1128, 0x2001, 0x0004, 0x080c, 0x63f0, 0x00e8, 0x9186,
+	0x0015, 0x1510, 0x2011, 0x1823, 0x2204, 0x9086, 0x0014, 0x11e0,
+	0x6010, 0x00b6, 0x2058, 0x080c, 0x653a, 0x00be, 0x080c, 0xb01c,
+	0x1198, 0x6010, 0x00b6, 0x2058, 0xb890, 0x00be, 0x9005, 0x0160,
+	0x2001, 0x0006, 0x080c, 0x63f0, 0x6014, 0x2048, 0xa868, 0xd0fc,
+	0x0170, 0x080c, 0xa4e7, 0x0048, 0x6014, 0x2048, 0xa868, 0xd0fc,
+	0x0528, 0x080c, 0xaa81, 0x080c, 0xa0e3, 0x009e, 0x0005, 0x6014,
+	0x6310, 0x2358, 0x904d, 0x090c, 0x0dfa, 0xa87b, 0x0000, 0xa883,
+	0x0000, 0xa897, 0x4000, 0x900e, 0x080c, 0x66bf, 0x1108, 0xc185,
+	0xb800, 0xd0bc, 0x0108, 0xc18d, 0xa99a, 0x0126, 0x2091, 0x8000,
+	0x080c, 0x6ae9, 0x012e, 0x080c, 0xa0e3, 0x08f8, 0x6014, 0x904d,
+	0x090c, 0x0dfa, 0xa87b, 0x0030, 0xa883, 0x0000, 0xa897, 0x4005,
+	0xa89b, 0x0004, 0xa867, 0x0139, 0x0126, 0x2091, 0x8000, 0x080c,
+	0x6ae9, 0x012e, 0x080c, 0xa0e3, 0x0840, 0xa878, 0x9086, 0x0005,
+	0x1108, 0x0009, 0x0005, 0xa880, 0xc0ad, 0xa882, 0x0005, 0x6043,
+	0x0000, 0x6017, 0x0000, 0x6003, 0x0001, 0x6007, 0x0050, 0x080c,
+	0x8679, 0x080c, 0x8c10, 0x0005, 0x00c6, 0x6010, 0x00b6, 0x2058,
+	0xb800, 0x00be, 0xd0bc, 0x0120, 0x6020, 0x9084, 0x000f, 0x0013,
+	0x00ce, 0x0005, 0xbb40, 0xc163, 0xc163, 0xc166, 0xd8d4, 0xd8ef,
+	0xd8f2, 0xbb40, 0xbb40, 0xbb40, 0xbb40, 0xbb40, 0xbb40, 0xbb40,
+	0xbb40, 0x080c, 0x0dfa, 0xa001, 0xa001, 0x0005, 0x0096, 0x6014,
+	0x904d, 0x0118, 0xa87c, 0xd0e4, 0x1110, 0x009e, 0x0010, 0x009e,
+	0x0005, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x0550,
+	0x2001, 0x1833, 0x2004, 0x9005, 0x1540, 0x00f6, 0x2c78, 0x080c,
+	0xa08d, 0x0508, 0x7810, 0x6012, 0x080c, 0xc2b3, 0x7820, 0x9086,
+	0x0003, 0x0128, 0x7808, 0x603a, 0x2f00, 0x603e, 0x0020, 0x7808,
+	0x603e, 0x2f00, 0x603a, 0x602e, 0x6023, 0x0001, 0x6007, 0x0035,
+	0x6003, 0x0001, 0x7954, 0x6156, 0x080c, 0x8679, 0x080c, 0x8c10,
+	0x2f60, 0x00fe, 0x0005, 0x2f60, 0x00fe, 0x2001, 0x1960, 0x2004,
+	0x6042, 0x0005, 0x0016, 0x0096, 0x6814, 0x2048, 0xa87c, 0xd0e4,
+	0x0180, 0xc0e4, 0xa87e, 0xa877, 0x0000, 0xa893, 0x0000, 0xa88f,
+	0x0000, 0xd0cc, 0x0130, 0xc0cc, 0xa87e, 0xa878, 0x2048, 0x080c,
+	0x0fe3, 0x6830, 0x6036, 0x908e, 0x0001, 0x0148, 0x6803, 0x0002,
+	0x9086, 0x0005, 0x0170, 0x9006, 0x602e, 0x6032, 0x00d0, 0x681c,
+	0xc085, 0x681e, 0x6803, 0x0004, 0x6824, 0xc0f4, 0x9085, 0x0c00,
+	0x6826, 0x6814, 0x2048, 0xa8ac, 0x6938, 0x9102, 0xa8b0, 0x693c,
+	0x9103, 0x1e48, 0x683c, 0x602e, 0x6838, 0x9084, 0xfffc, 0x683a,
+	0x6032, 0x2d00, 0x603a, 0x6808, 0x603e, 0x6910, 0x6112, 0x6954,
+	0x6156, 0x6023, 0x0001, 0x6007, 0x0039, 0x6003, 0x0001, 0x080c,
+	0x8679, 0x080c, 0x8c10, 0x009e, 0x001e, 0x0005, 0x6024, 0xd0d4,
+	0x0510, 0xd0f4, 0x11f8, 0x6038, 0x940a, 0x603c, 0x9303, 0x0230,
+	0x9105, 0x0120, 0x6024, 0xc0d4, 0xc0f5, 0x0098, 0x643a, 0x633e,
+	0xac3e, 0xab42, 0x0046, 0x0036, 0x2400, 0xacac, 0x9402, 0xa836,
+	0x2300, 0xabb0, 0x9303, 0xa83a, 0x003e, 0x004e, 0x6024, 0xc0d4,
+	0x0000, 0x6026, 0x0005, 0xd0f4, 0x1138, 0xa83c, 0x603a, 0xa840,
+	0x603e, 0x6024, 0xc0f5, 0x6026, 0x0005, 0x0006, 0x0016, 0x6004,
+	0x908e, 0x0034, 0x01b8, 0x908e, 0x0035, 0x01a0, 0x908e, 0x0036,
+	0x0188, 0x908e, 0x0037, 0x0170, 0x908e, 0x0038, 0x0158, 0x908e,
+	0x0039, 0x0140, 0x908e, 0x003a, 0x0128, 0x908e, 0x003b, 0x0110,
+	0x9085, 0x0001, 0x001e, 0x000e, 0x0005, 0x0006, 0x0016, 0x0026,
+	0x0036, 0x00e6, 0x2001, 0x195a, 0x200c, 0x8000, 0x2014, 0x2001,
+	0x0032, 0x080c, 0x84ff, 0x2001, 0x195e, 0x82ff, 0x1110, 0x2011,
+	0x0014, 0x2202, 0x2001, 0x195c, 0x200c, 0x8000, 0x2014, 0x2071,
+	0x1944, 0x711a, 0x721e, 0x2001, 0x0064, 0x080c, 0x84ff, 0x2001,
+	0x195f, 0x82ff, 0x1110, 0x2011, 0x0014, 0x2202, 0x2001, 0x1960,
+	0x9288, 0x000a, 0x2102, 0x2001, 0x1a6b, 0x2102, 0x2001, 0x0032,
+	0x080c, 0x158b, 0x080c, 0x67a4, 0x00ee, 0x003e, 0x002e, 0x001e,
+	0x000e, 0x0005, 0x0006, 0x0016, 0x00e6, 0x2001, 0x195e, 0x2003,
+	0x0028, 0x2001, 0x195f, 0x2003, 0x0014, 0x2071, 0x1944, 0x701b,
+	0x0000, 0x701f, 0x07d0, 0x2001, 0x1960, 0x2009, 0x001e, 0x2102,
+	0x2001, 0x1a6b, 0x2102, 0x2001, 0x0032, 0x080c, 0x158b, 0x00ee,
+	0x001e, 0x000e, 0x0005, 0x0096, 0x6058, 0x904d, 0x0110, 0x080c,
+	0x1063, 0x009e, 0x0005, 0x0005, 0x00c6, 0x0126, 0x2091, 0x8000,
+	0x080c, 0xa08d, 0x0180, 0x2b08, 0x6112, 0x0ca9, 0x6023, 0x0001,
+	0x2900, 0x6016, 0x2009, 0x0033, 0x080c, 0xa15d, 0x9085, 0x0001,
+	0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x0096, 0x00e6, 0x00f6,
+	0x2071, 0x1800, 0x9186, 0x0015, 0x1500, 0x708c, 0x9086, 0x0018,
+	0x11e0, 0x6014, 0x2048, 0xaa3c, 0xd2e4, 0x1160, 0x2c78, 0x080c,
+	0x8e03, 0x01d8, 0x7078, 0xaa50, 0x9206, 0x1160, 0x707c, 0xaa54,
+	0x9206, 0x1140, 0x6210, 0x00b6, 0x2258, 0xbaa0, 0x00be, 0x900e,
+	0x080c, 0x31d4, 0x080c, 0xa4e7, 0x0020, 0x080c, 0xaa81, 0x080c,
+	0xa0e3, 0x00fe, 0x00ee, 0x009e, 0x0005, 0x705c, 0xaa54, 0x9206,
+	0x0d48, 0x0c80, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0xa08d,
+	0x0188, 0x2b08, 0x6112, 0x080c, 0xc2b3, 0x6023, 0x0001, 0x2900,
+	0x6016, 0x2009, 0x004d, 0x080c, 0xa15d, 0x9085, 0x0001, 0x012e,
 	0x00ce, 0x0005, 0x9006, 0x0cd8, 0x00c6, 0x0126, 0x2091, 0x8000,
-	0xbaa0, 0x080c, 0x9e7c, 0x0560, 0x6057, 0x0000, 0x2b00, 0x6012,
-	0x080c, 0xbfb5, 0x6023, 0x0003, 0x0016, 0x080c, 0x8582, 0x0076,
-	0x903e, 0x080c, 0x8470, 0x2c08, 0x080c, 0xd2d5, 0x007e, 0x001e,
-	0xd184, 0x0128, 0x080c, 0x9e2f, 0x9085, 0x0001, 0x0070, 0x080c,
-	0x53a2, 0x0128, 0xd18c, 0x1170, 0x080c, 0xbc68, 0x0148, 0x2009,
-	0x004c, 0x080c, 0x9ea9, 0x9085, 0x0001, 0x012e, 0x00ce, 0x0005,
-	0x9006, 0x0cd8, 0x2900, 0x6016, 0x0c90, 0x2009, 0x004d, 0x0010,
-	0x2009, 0x004e, 0x00f6, 0x00c6, 0x0046, 0x0016, 0x080c, 0x9dd9,
-	0x2c78, 0x0590, 0x7e56, 0x2b00, 0x7812, 0x7823, 0x0003, 0x2021,
-	0x0005, 0x080c, 0xbc7a, 0x9186, 0x004d, 0x0118, 0x9186, 0x004e,
-	0x0148, 0x2001, 0x1958, 0x200c, 0xd1fc, 0x0168, 0x2f60, 0x080c,
-	0x9e2f, 0x00d0, 0x2001, 0x1957, 0x200c, 0xd1fc, 0x0120, 0x2f60,
-	0x080c, 0x9e2f, 0x0088, 0x2f60, 0x080c, 0x53a2, 0x0138, 0xd18c,
-	0x1118, 0x04f1, 0x0148, 0x0010, 0x2900, 0x7816, 0x001e, 0x0016,
-	0x080c, 0x9ea9, 0x9085, 0x0001, 0x001e, 0x004e, 0x00ce, 0x00fe,
-	0x0005, 0x00f6, 0x00c6, 0x0046, 0x080c, 0x9dd9, 0x2c78, 0x0508,
-	0x7e56, 0x2b00, 0x7812, 0x7823, 0x0003, 0x0096, 0x2021, 0x0004,
-	0x0489, 0x009e, 0x2001, 0x1956, 0x200c, 0xd1fc, 0x0120, 0x2f60,
-	0x080c, 0x9e2f, 0x0060, 0x2f60, 0x080c, 0x53a2, 0x0120, 0xd18c,
-	0x1160, 0x0071, 0x0130, 0x2009, 0x0052, 0x080c, 0x9ea9, 0x9085,
-	0x0001, 0x004e, 0x00ce, 0x00fe, 0x0005, 0x2900, 0x7816, 0x0c98,
-	0x00c6, 0x080c, 0x4894, 0x00ce, 0x1120, 0x080c, 0x9e2f, 0x9006,
-	0x0005, 0xa867, 0x0000, 0xa86b, 0x8000, 0x2900, 0x6016, 0x9085,
-	0x0001, 0x0005, 0x0096, 0x0076, 0x0126, 0x2091, 0x8000, 0x080c,
-	0x638a, 0x0158, 0x2001, 0xbc7f, 0x0006, 0x900e, 0x2400, 0x080c,
-	0x6ace, 0x080c, 0x68a0, 0x000e, 0x0807, 0x2418, 0x080c, 0x8819,
-	0xbaa0, 0x0086, 0x2041, 0x0001, 0x2039, 0x0001, 0x2608, 0x080c,
-	0x859a, 0x008e, 0x080c, 0x8470, 0x2f08, 0x2648, 0x080c, 0xd2d5,
-	0xb93c, 0x81ff, 0x090c, 0x866b, 0x080c, 0x898b, 0x012e, 0x007e,
-	0x009e, 0x0005, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0x9dd9,
-	0x0190, 0x660a, 0x2b08, 0x6112, 0x080c, 0xbfb5, 0x6023, 0x0001,
-	0x2900, 0x6016, 0x2009, 0x001f, 0x080c, 0x9ea9, 0x9085, 0x0001,
-	0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x00c6, 0x0126, 0x2091,
-	0x8000, 0x080c, 0x9e7c, 0x01b8, 0x660a, 0x2b08, 0x6112, 0x080c,
-	0xbfb5, 0x6023, 0x0008, 0x2900, 0x6016, 0x00f6, 0x2c78, 0x080c,
-	0x164a, 0x00fe, 0x2009, 0x0021, 0x080c, 0x9ea9, 0x9085, 0x0001,
-	0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x2009, 0x003d, 0x00c6,
-	0x0126, 0x0016, 0x2091, 0x8000, 0x080c, 0x9dd9, 0x0198, 0x660a,
-	0x2b08, 0x6112, 0x080c, 0xbfb5, 0x6023, 0x0001, 0x2900, 0x6016,
-	0x001e, 0x0016, 0x080c, 0x9ea9, 0x9085, 0x0001, 0x001e, 0x012e,
-	0x00ce, 0x0005, 0x9006, 0x0cd0, 0x00c6, 0x0126, 0x2091, 0x8000,
-	0x080c, 0x9e7c, 0x0188, 0x2b08, 0x6112, 0x080c, 0xbfb5, 0x6023,
-	0x0001, 0x2900, 0x6016, 0x2009, 0x0000, 0x080c, 0x9ea9, 0x9085,
-	0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x2009, 0x0044,
-	0x0830, 0x2009, 0x0049, 0x0818, 0x0026, 0x00b6, 0x6210, 0x2258,
-	0xba3c, 0x82ff, 0x0110, 0x8211, 0xba3e, 0x00be, 0x002e, 0x0005,
-	0x0006, 0x0016, 0x6004, 0x908e, 0x0002, 0x0140, 0x908e, 0x0003,
-	0x0128, 0x908e, 0x0004, 0x0110, 0x9085, 0x0001, 0x001e, 0x000e,
-	0x0005, 0x0006, 0x0086, 0x0096, 0x6020, 0x9086, 0x0004, 0x01a8,
-	0x6014, 0x904d, 0x080c, 0xbb3b, 0x0180, 0xa864, 0x9086, 0x0139,
-	0x0170, 0x6020, 0x90c6, 0x0003, 0x0140, 0x90c6, 0x0002, 0x0128,
-	0xa868, 0xd0fc, 0x0110, 0x9006, 0x0010, 0x9085, 0x0001, 0x009e,
-	0x008e, 0x000e, 0x0005, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c,
-	0x9e7c, 0x0198, 0x2b08, 0x6112, 0x080c, 0xbfb5, 0x6023, 0x0001,
-	0x2900, 0x6016, 0x080c, 0x2fe7, 0x2009, 0x0028, 0x080c, 0x9ea9,
-	0x9085, 0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x9186,
-	0x0015, 0x11a8, 0x2011, 0x1823, 0x2204, 0x9086, 0x0074, 0x1178,
-	0x00b6, 0x080c, 0xaa58, 0x00be, 0x080c, 0xac97, 0x6003, 0x0001,
-	0x6007, 0x0029, 0x080c, 0x8440, 0x080c, 0x898b, 0x0078, 0x6014,
-	0x0096, 0x2048, 0xa868, 0x009e, 0xd0fc, 0x0148, 0x2001, 0x0001,
-	0x080c, 0xc174, 0x080c, 0xa7cd, 0x080c, 0x9e2f, 0x0005, 0x0096,
-	0x6014, 0x904d, 0x090c, 0x0db4, 0xa87b, 0x0030, 0xa883, 0x0000,
-	0xa897, 0x4005, 0xa89b, 0x0004, 0xa867, 0x0139, 0x0126, 0x2091,
-	0x8000, 0x080c, 0x68a0, 0x012e, 0x009e, 0x080c, 0x9e2f, 0x0c30,
-	0x0096, 0x9186, 0x0016, 0x1128, 0x2001, 0x0004, 0x080c, 0x61a7,
-	0x00e8, 0x9186, 0x0015, 0x1510, 0x2011, 0x1823, 0x2204, 0x9086,
-	0x0014, 0x11e0, 0x6010, 0x00b6, 0x2058, 0x080c, 0x62f1, 0x00be,
-	0x080c, 0xad68, 0x1198, 0x6010, 0x00b6, 0x2058, 0xb890, 0x00be,
-	0x9005, 0x0160, 0x2001, 0x0006, 0x080c, 0x61a7, 0x6014, 0x2048,
-	0xa868, 0xd0fc, 0x0170, 0x080c, 0xa233, 0x0048, 0x6014, 0x2048,
-	0xa868, 0xd0fc, 0x0528, 0x080c, 0xa7cd, 0x080c, 0x9e2f, 0x009e,
-	0x0005, 0x6014, 0x6310, 0x2358, 0x904d, 0x090c, 0x0db4, 0xa87b,
-	0x0000, 0xa883, 0x0000, 0xa897, 0x4000, 0x900e, 0x080c, 0x6476,
-	0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d, 0xa99a, 0x0126,
-	0x2091, 0x8000, 0x080c, 0x68a0, 0x012e, 0x080c, 0x9e2f, 0x08f8,
-	0x6014, 0x904d, 0x090c, 0x0db4, 0xa87b, 0x0030, 0xa883, 0x0000,
-	0xa897, 0x4005, 0xa89b, 0x0004, 0xa867, 0x0139, 0x0126, 0x2091,
-	0x8000, 0x080c, 0x68a0, 0x012e, 0x080c, 0x9e2f, 0x0840, 0xa878,
-	0x9086, 0x0005, 0x1108, 0x0009, 0x0005, 0xa880, 0xc0ad, 0xa882,
-	0x0005, 0x6043, 0x0000, 0x6017, 0x0000, 0x6003, 0x0001, 0x6007,
-	0x0050, 0x080c, 0x83f8, 0x080c, 0x898b, 0x0005, 0x00c6, 0x6010,
-	0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x0120, 0x6020, 0x9084,
-	0x000f, 0x0013, 0x00ce, 0x0005, 0xb844, 0xbe65, 0xbe65, 0xbe68,
-	0xd5b3, 0xd5ce, 0xd5d1, 0xb844, 0xb844, 0xb844, 0xb844, 0xb844,
-	0xb844, 0xb844, 0xb844, 0x080c, 0x0db4, 0xa001, 0xa001, 0x0005,
-	0x0096, 0x6014, 0x904d, 0x0118, 0xa87c, 0xd0e4, 0x1110, 0x009e,
-	0x0010, 0x009e, 0x0005, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be,
-	0xd0bc, 0x0550, 0x2001, 0x1833, 0x2004, 0x9005, 0x1540, 0x00f6,
-	0x2c78, 0x080c, 0x9dd9, 0x0508, 0x7810, 0x6012, 0x080c, 0xbfb5,
-	0x7820, 0x9086, 0x0003, 0x0128, 0x7808, 0x603a, 0x2f00, 0x603e,
-	0x0020, 0x7808, 0x603e, 0x2f00, 0x603a, 0x602e, 0x6023, 0x0001,
-	0x6007, 0x0035, 0x6003, 0x0001, 0x7954, 0x6156, 0x080c, 0x83f8,
-	0x080c, 0x898b, 0x2f60, 0x00fe, 0x0005, 0x2f60, 0x00fe, 0x2001,
-	0x1960, 0x2004, 0x6042, 0x0005, 0x0016, 0x0096, 0x6814, 0x2048,
-	0xa87c, 0xd0e4, 0x0180, 0xc0e4, 0xa87e, 0xa877, 0x0000, 0xa893,
-	0x0000, 0xa88f, 0x0000, 0xd0cc, 0x0130, 0xc0cc, 0xa87e, 0xa878,
-	0x2048, 0x080c, 0x0f9d, 0x6830, 0x6036, 0x908e, 0x0001, 0x0148,
-	0x6803, 0x0002, 0x9086, 0x0005, 0x0170, 0x9006, 0x602e, 0x6032,
-	0x00d0, 0x681c, 0xc085, 0x681e, 0x6803, 0x0004, 0x6824, 0xc0f4,
-	0x9085, 0x0c00, 0x6826, 0x6814, 0x2048, 0xa8ac, 0x6938, 0x9102,
-	0xa8b0, 0x693c, 0x9103, 0x1e48, 0x683c, 0x602e, 0x6838, 0x9084,
-	0xfffc, 0x683a, 0x6032, 0x2d00, 0x603a, 0x6808, 0x603e, 0x6910,
-	0x6112, 0x6954, 0x6156, 0x6023, 0x0001, 0x6007, 0x0039, 0x6003,
-	0x0001, 0x080c, 0x83f8, 0x080c, 0x898b, 0x009e, 0x001e, 0x0005,
-	0x6024, 0xd0d4, 0x0510, 0xd0f4, 0x11f8, 0x6038, 0x940a, 0x603c,
-	0x9303, 0x0230, 0x9105, 0x0120, 0x6024, 0xc0d4, 0xc0f5, 0x0098,
-	0x643a, 0x633e, 0xac3e, 0xab42, 0x0046, 0x0036, 0x2400, 0xacac,
-	0x9402, 0xa836, 0x2300, 0xabb0, 0x9303, 0xa83a, 0x003e, 0x004e,
-	0x6024, 0xc0d4, 0x0000, 0x6026, 0x0005, 0xd0f4, 0x1138, 0xa83c,
-	0x603a, 0xa840, 0x603e, 0x6024, 0xc0f5, 0x6026, 0x0005, 0x0006,
-	0x0016, 0x6004, 0x908e, 0x0034, 0x01b8, 0x908e, 0x0035, 0x01a0,
-	0x908e, 0x0036, 0x0188, 0x908e, 0x0037, 0x0170, 0x908e, 0x0038,
-	0x0158, 0x908e, 0x0039, 0x0140, 0x908e, 0x003a, 0x0128, 0x908e,
-	0x003b, 0x0110, 0x9085, 0x0001, 0x001e, 0x000e, 0x0005, 0x0006,
-	0x0016, 0x0026, 0x0036, 0x00e6, 0x2001, 0x195a, 0x200c, 0x8000,
-	0x2014, 0x2001, 0x0032, 0x080c, 0x8277, 0x2001, 0x195e, 0x82ff,
-	0x1110, 0x2011, 0x0014, 0x2202, 0x2001, 0x195c, 0x200c, 0x8000,
-	0x2014, 0x2071, 0x1944, 0x711a, 0x721e, 0x2001, 0x0064, 0x080c,
-	0x8277, 0x2001, 0x195f, 0x82ff, 0x1110, 0x2011, 0x0014, 0x2202,
-	0x2001, 0x1960, 0x9288, 0x000a, 0x2102, 0x2001, 0x1a68, 0x2102,
-	0x2001, 0x0032, 0x080c, 0x151a, 0x080c, 0x655b, 0x00ee, 0x003e,
-	0x002e, 0x001e, 0x000e, 0x0005, 0x0006, 0x0016, 0x00e6, 0x2001,
-	0x195e, 0x2003, 0x0028, 0x2001, 0x195f, 0x2003, 0x0014, 0x2071,
-	0x1944, 0x701b, 0x0000, 0x701f, 0x07d0, 0x2001, 0x1960, 0x2009,
-	0x001e, 0x2102, 0x2001, 0x1a68, 0x2102, 0x2001, 0x0032, 0x080c,
-	0x151a, 0x00ee, 0x001e, 0x000e, 0x0005, 0x0096, 0x6058, 0x904d,
-	0x0110, 0x080c, 0x101d, 0x009e, 0x0005, 0x0005, 0x00c6, 0x0126,
-	0x2091, 0x8000, 0x080c, 0x9dd9, 0x0180, 0x2b08, 0x6112, 0x0ca9,
-	0x6023, 0x0001, 0x2900, 0x6016, 0x2009, 0x0033, 0x080c, 0x9ea9,
-	0x9085, 0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x0096,
-	0x00e6, 0x00f6, 0x2071, 0x1800, 0x9186, 0x0015, 0x1500, 0x708c,
-	0x9086, 0x0018, 0x11e0, 0x6014, 0x2048, 0xaa3c, 0xd2e4, 0x1160,
-	0x2c78, 0x080c, 0x8b7e, 0x01d8, 0x7078, 0xaa50, 0x9206, 0x1160,
-	0x707c, 0xaa54, 0x9206, 0x1140, 0x6210, 0x00b6, 0x2258, 0xbaa0,
-	0x00be, 0x900e, 0x080c, 0x3030, 0x080c, 0xa233, 0x0020, 0x080c,
-	0xa7cd, 0x080c, 0x9e2f, 0x00fe, 0x00ee, 0x009e, 0x0005, 0x705c,
-	0xaa54, 0x9206, 0x0d48, 0x0c80, 0x00c6, 0x0126, 0x2091, 0x8000,
-	0x080c, 0x9dd9, 0x0188, 0x2b08, 0x6112, 0x080c, 0xbfb5, 0x6023,
-	0x0001, 0x2900, 0x6016, 0x2009, 0x004d, 0x080c, 0x9ea9, 0x9085,
-	0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x00c6, 0x0126,
-	0x2091, 0x8000, 0x0016, 0x080c, 0x9dd9, 0x0180, 0x2b08, 0x6112,
-	0x080c, 0xbfb5, 0x6023, 0x0001, 0x2900, 0x6016, 0x001e, 0x080c,
-	0x9ea9, 0x9085, 0x0001, 0x012e, 0x00ce, 0x0005, 0x001e, 0x9006,
-	0x0cd0, 0x0016, 0x0026, 0x0036, 0x0046, 0x0056, 0x0066, 0x0096,
-	0x00e6, 0x00f6, 0x2071, 0x1800, 0x9186, 0x0015, 0x1568, 0x718c,
-	0x6014, 0x2048, 0xa814, 0x8003, 0x9106, 0x1530, 0x20e1, 0x0000,
-	0x2001, 0x1978, 0x2003, 0x0000, 0x6014, 0x2048, 0xa830, 0x20a8,
-	0x8906, 0x8006, 0x8007, 0x9094, 0x003f, 0x22e8, 0x9084, 0xffc0,
-	0x9080, 0x001b, 0x20a0, 0x2001, 0x1978, 0x0016, 0x200c, 0x080c,
-	0xc7fc, 0x001e, 0xa804, 0x9005, 0x0110, 0x2048, 0x0c38, 0x6014,
-	0x2048, 0xa867, 0x0103, 0x0010, 0x080c, 0xa7cd, 0x080c, 0x9e2f,
-	0x00fe, 0x00ee, 0x009e, 0x006e, 0x005e, 0x004e, 0x003e, 0x002e,
-	0x001e, 0x0005, 0x0096, 0x00e6, 0x00f6, 0x2071, 0x1800, 0x9186,
-	0x0015, 0x11b8, 0x708c, 0x9086, 0x0004, 0x1198, 0x6014, 0x2048,
-	0x2c78, 0x080c, 0x8b7e, 0x01a8, 0x7078, 0xaa74, 0x9206, 0x1130,
-	0x707c, 0xaa78, 0x9206, 0x1110, 0x080c, 0x2fe7, 0x080c, 0xa233,
-	0x0020, 0x080c, 0xa7cd, 0x080c, 0x9e2f, 0x00fe, 0x00ee, 0x009e,
-	0x0005, 0x705c, 0xaa78, 0x9206, 0x0d78, 0x0c80, 0x0096, 0x00e6,
-	0x00f6, 0x2071, 0x1800, 0x9186, 0x0015, 0x1550, 0x708c, 0x9086,
-	0x0004, 0x1530, 0x6014, 0x2048, 0x2c78, 0x080c, 0x8b7e, 0x05f0,
-	0x7078, 0xaacc, 0x9206, 0x1180, 0x707c, 0xaad0, 0x9206, 0x1160,
-	0x080c, 0x2fe7, 0x0016, 0xa998, 0xaab0, 0x9284, 0x1000, 0xc0fd,
-	0x080c, 0x5352, 0x001e, 0x0010, 0x080c, 0x5143, 0x080c, 0xbb3b,
-	0x0508, 0xa87b, 0x0000, 0xa883, 0x0000, 0xa897, 0x4000, 0x0080,
-	0x080c, 0xbb3b, 0x01b8, 0x6014, 0x2048, 0x080c, 0x5143, 0x1d70,
-	0xa87b, 0x0030, 0xa883, 0x0000, 0xa897, 0x4005, 0xa89b, 0x0004,
-	0x0126, 0x2091, 0x8000, 0xa867, 0x0139, 0x080c, 0x68a0, 0x012e,
-	0x080c, 0x9e2f, 0x00fe, 0x00ee, 0x009e, 0x0005, 0x705c, 0xaad0,
-	0x9206, 0x0930, 0x0888, 0x0016, 0x0026, 0xa87c, 0xd0ac, 0x0178,
-	0xa938, 0xaa34, 0x2100, 0x9205, 0x0150, 0xa890, 0x9106, 0x1118,
-	0xa88c, 0x9206, 0x0120, 0xa992, 0xaa8e, 0x9085, 0x0001, 0x002e,
-	0x001e, 0x0005, 0x00b6, 0x00d6, 0x0036, 0x080c, 0xbb3b, 0x0904,
-	0xc170, 0x0096, 0x6314, 0x2348, 0xa87a, 0xa982, 0x929e, 0x4000,
-	0x1580, 0x6310, 0x00c6, 0x2358, 0x2009, 0x0000, 0xa868, 0xd0f4,
-	0x1140, 0x080c, 0x6476, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108,
-	0xc18d, 0xaa96, 0xa99a, 0x20a9, 0x0004, 0xa860, 0x20e8, 0xa85c,
-	0x9080, 0x0031, 0x20a0, 0xb8b4, 0x20e0, 0xb8b8, 0x9080, 0x0006,
-	0x2098, 0x080c, 0x0f68, 0x20a9, 0x0004, 0xa85c, 0x9080, 0x0035,
-	0x20a0, 0xb8b8, 0x9080, 0x000a, 0x2098, 0x080c, 0x0f68, 0x00ce,
-	0x0090, 0xaa96, 0x3918, 0x9398, 0x0007, 0x231c, 0x6004, 0x9086,
-	0x0016, 0x0110, 0xa89b, 0x0004, 0xaba2, 0x6310, 0x2358, 0xb804,
-	0x9084, 0x00ff, 0xa89e, 0x080c, 0x6893, 0x6017, 0x0000, 0x009e,
-	0x003e, 0x00de, 0x00be, 0x0005, 0x0026, 0x0036, 0x0046, 0x00b6,
-	0x0096, 0x00f6, 0x6214, 0x2248, 0x6210, 0x2258, 0x2079, 0x0260,
-	0x9096, 0x0000, 0x11a0, 0xb814, 0x9084, 0x00ff, 0x900e, 0x080c,
-	0x2670, 0x2118, 0x831f, 0x939c, 0xff00, 0x7838, 0x9084, 0x00ff,
-	0x931d, 0x7c3c, 0x2011, 0x8018, 0x080c, 0x48f4, 0x00a8, 0x9096,
-	0x0001, 0x1148, 0x89ff, 0x0180, 0xa89b, 0x000d, 0x7838, 0xa8a6,
-	0x783c, 0xa8aa, 0x0048, 0x9096, 0x0002, 0x1130, 0xa89b, 0x000d,
-	0x7838, 0xa8a6, 0x783c, 0xa8aa, 0x00fe, 0x009e, 0x00be, 0x004e,
-	0x003e, 0x002e, 0x0005, 0x00c6, 0x0026, 0x0016, 0x9186, 0x0035,
-	0x0110, 0x6a38, 0x0008, 0x6a2c, 0x080c, 0xbb29, 0x01f0, 0x2260,
-	0x6120, 0x9186, 0x0003, 0x0118, 0x9186, 0x0006, 0x1190, 0x6838,
-	0x9206, 0x0140, 0x683c, 0x9206, 0x1160, 0x6108, 0x6838, 0x9106,
-	0x1140, 0x0020, 0x6008, 0x693c, 0x9106, 0x1118, 0x6010, 0x6910,
-	0x9106, 0x001e, 0x002e, 0x00ce, 0x0005, 0x9085, 0x0001, 0x0cc8,
-	0xa974, 0xd1cc, 0x0188, 0x918c, 0x00ff, 0x918e, 0x0002, 0x1160,
-	0xa9a8, 0x918c, 0x0f00, 0x810f, 0x918e, 0x0001, 0x1128, 0xa834,
-	0xa938, 0x9115, 0x190c, 0xb236, 0x0005, 0x0036, 0x2019, 0x0001,
-	0x0010, 0x0036, 0x901e, 0x0499, 0x01e0, 0x080c, 0xbb3b, 0x01c8,
-	0x080c, 0xbd24, 0x6037, 0x4000, 0x6014, 0x6017, 0x0000, 0x0096,
-	0x2048, 0xa87c, 0x080c, 0xbd41, 0x1118, 0x080c, 0xa7cd, 0x0040,
-	0xa867, 0x0103, 0xa877, 0x0000, 0x83ff, 0x1129, 0x080c, 0x68a0,
-	0x009e, 0x003e, 0x0005, 0xa880, 0xd0b4, 0x0128, 0xa87b, 0x0006,
-	0xc0ec, 0xa882, 0x0048, 0xd0bc, 0x0118, 0xa87b, 0x0002, 0x0020,
-	0xa87b, 0x0005, 0x080c, 0xbe35, 0xa877, 0x0000, 0x0005, 0x2001,
-	0x1810, 0x2004, 0xd0ec, 0x0005, 0x0006, 0x2001, 0x1810, 0x2004,
-	0xd0f4, 0x000e, 0x0005, 0x0006, 0x2001, 0x1810, 0x2004, 0xd0e4,
-	0x000e, 0x0005, 0x0036, 0x0046, 0x6010, 0x00b6, 0x2058, 0xbba0,
-	0x00be, 0x2021, 0x0007, 0x080c, 0x4a91, 0x004e, 0x003e, 0x0005,
-	0x0c51, 0x1d81, 0x0005, 0x2001, 0x195e, 0x2004, 0x601a, 0x0005,
-	0x2001, 0x1960, 0x2004, 0x6042, 0x0005, 0x080c, 0x9e2f, 0x0804,
-	0x898b, 0x00b6, 0x0066, 0x6000, 0x90b2, 0x0016, 0x1a0c, 0x0db4,
-	0x001b, 0x006e, 0x00be, 0x0005, 0xc27c, 0xc959, 0xcab4, 0xc27c,
-	0xc27c, 0xc27c, 0xc27c, 0xc27c, 0xc2b3, 0xcb38, 0xc27c, 0xc27c,
-	0xc27c, 0xc27c, 0xc27c, 0xc27c, 0x080c, 0x0db4, 0x0066, 0x6000,
-	0x90b2, 0x0016, 0x1a0c, 0x0db4, 0x0013, 0x006e, 0x0005, 0xc297,
-	0xd0aa, 0xc297, 0xc297, 0xc297, 0xc297, 0xc297, 0xc297, 0xd057,
-	0xd0fe, 0xc297, 0xd6ee, 0xd724, 0xd6ee, 0xd724, 0xc297, 0x080c,
-	0x0db4, 0x6000, 0x9082, 0x0016, 0x1a0c, 0x0db4, 0x6000, 0x000a,
-	0x0005, 0xc2b1, 0xcd16, 0xce08, 0xce2b, 0xceeb, 0xc2b1, 0xcfca,
-	0xcf73, 0xcb44, 0xd02d, 0xd042, 0xc2b1, 0xc2b1, 0xc2b1, 0xc2b1,
-	0xc2b1, 0x080c, 0x0db4, 0x91b2, 0x0053, 0x1a0c, 0x0db4, 0x2100,
-	0x91b2, 0x0040, 0x1a04, 0xc6fa, 0x0002, 0xc2fd, 0xc4eb, 0xc2fd,
-	0xc2fd, 0xc2fd, 0xc4f4, 0xc2fd, 0xc2fd, 0xc2fd, 0xc2fd, 0xc2fd,
-	0xc2fd, 0xc2fd, 0xc2fd, 0xc2fd, 0xc2fd, 0xc2fd, 0xc2fd, 0xc2fd,
-	0xc2fd, 0xc2fd, 0xc2fd, 0xc2fd, 0xc2ff, 0xc362, 0xc371, 0xc3d5,
-	0xc400, 0xc478, 0xc4d6, 0xc2fd, 0xc2fd, 0xc4f7, 0xc2fd, 0xc2fd,
-	0xc50c, 0xc519, 0xc2fd, 0xc2fd, 0xc2fd, 0xc2fd, 0xc2fd, 0xc59c,
-	0xc2fd, 0xc2fd, 0xc5b0, 0xc2fd, 0xc2fd, 0xc56b, 0xc2fd, 0xc2fd,
-	0xc2fd, 0xc5c8, 0xc2fd, 0xc2fd, 0xc2fd, 0xc645, 0xc2fd, 0xc2fd,
-	0xc2fd, 0xc2fd, 0xc2fd, 0xc2fd, 0xc6c2, 0x080c, 0x0db4, 0x080c,
-	0x6538, 0x1150, 0x2001, 0x1836, 0x2004, 0xd0cc, 0x1128, 0x9084,
-	0x0009, 0x9086, 0x0008, 0x1140, 0x6007, 0x0009, 0x602f, 0x0009,
-	0x6017, 0x0000, 0x0804, 0xc4e4, 0x080c, 0x6521, 0x00e6, 0x00c6,
-	0x0036, 0x0026, 0x0016, 0x6210, 0x2258, 0xbaa0, 0x0026, 0x2019,
-	0x0029, 0x080c, 0x8582, 0x0076, 0x903e, 0x080c, 0x8470, 0x2c08,
-	0x080c, 0xd2d5, 0x007e, 0x001e, 0x001e, 0x002e, 0x003e, 0x00ce,
-	0x00ee, 0x6610, 0x2658, 0x080c, 0x6265, 0xbe04, 0x9684, 0x00ff,
-	0x9082, 0x0006, 0x1268, 0x0016, 0x0026, 0x6210, 0x00b6, 0x2258,
-	0xbaa0, 0x00be, 0x2c08, 0x080c, 0xd89c, 0x002e, 0x001e, 0x1178,
-	0x080c, 0xd208, 0x1904, 0xc3cd, 0x080c, 0xd1a4, 0x1120, 0x6007,
-	0x0008, 0x0804, 0xc4e4, 0x6007, 0x0009, 0x0804, 0xc4e4, 0x080c,
-	0xd3ff, 0x0128, 0x080c, 0xd208, 0x0d78, 0x0804, 0xc3cd, 0x6017,
-	0x1900, 0x0c88, 0x080c, 0x310a, 0x1904, 0xc6f7, 0x6106, 0x080c,
-	0xd159, 0x6007, 0x0006, 0x0804, 0xc4e4, 0x6007, 0x0007, 0x0804,
-	0xc4e4, 0x080c, 0xd760, 0x1904, 0xc6f7, 0x080c, 0x310a, 0x1904,
-	0xc6f7, 0x00d6, 0x6610, 0x2658, 0xbe04, 0x9684, 0x00ff, 0x9082,
-	0x0006, 0x1220, 0x2001, 0x0001, 0x080c, 0x6193, 0x96b4, 0xff00,
-	0x8637, 0x9686, 0x0006, 0x0188, 0x9686, 0x0004, 0x0170, 0xbe04,
-	0x96b4, 0x00ff, 0x9686, 0x0006, 0x0140, 0x9686, 0x0004, 0x0128,
-	0x9686, 0x0005, 0x0110, 0x00de, 0x0480, 0x00e6, 0x2071, 0x0260,
-	0x7034, 0x9084, 0x0003, 0x1140, 0x7034, 0x9082, 0x0014, 0x0220,
-	0x7030, 0x9084, 0x0003, 0x0130, 0x00ee, 0x6017, 0x0000, 0x602f,
-	0x0007, 0x00b0, 0x00ee, 0x080c, 0xd26b, 0x1190, 0x9686, 0x0006,
-	0x1140, 0x0026, 0x6210, 0x2258, 0xbaa0, 0x900e, 0x080c, 0x3030,
-	0x002e, 0x080c, 0x62f1, 0x6007, 0x000a, 0x00de, 0x0804, 0xc4e4,
-	0x6007, 0x000b, 0x00de, 0x0804, 0xc4e4, 0x080c, 0x2fe7, 0x080c,
-	0xc250, 0x6007, 0x0001, 0x0804, 0xc4e4, 0x080c, 0xd760, 0x1904,
-	0xc6f7, 0x080c, 0x310a, 0x1904, 0xc6f7, 0x2071, 0x0260, 0x7034,
-	0x90b4, 0x0003, 0x1948, 0x90b2, 0x0014, 0x0a30, 0x7030, 0x9084,
-	0x0003, 0x1910, 0x6610, 0x2658, 0xbe04, 0x9686, 0x0707, 0x09e8,
-	0x0026, 0x6210, 0x2258, 0xbaa0, 0x900e, 0x080c, 0x3030, 0x002e,
-	0x6007, 0x000c, 0x2001, 0x0001, 0x080c, 0xd87c, 0x0804, 0xc4e4,
-	0x080c, 0x6538, 0x1140, 0x2001, 0x1836, 0x2004, 0x9084, 0x0009,
-	0x9086, 0x0008, 0x1110, 0x0804, 0xc30c, 0x080c, 0x6521, 0x6610,
-	0x2658, 0xbe04, 0x9684, 0x00ff, 0x9082, 0x0006, 0x06c0, 0x1138,
-	0x0026, 0x2001, 0x0006, 0x080c, 0x61d3, 0x002e, 0x0050, 0x96b4,
-	0xff00, 0x8637, 0x9686, 0x0004, 0x0120, 0x9686, 0x0006, 0x1904,
-	0xc3cd, 0x080c, 0xd278, 0x1120, 0x6007, 0x000e, 0x0804, 0xc4e4,
-	0x0046, 0x6410, 0x2458, 0xbca0, 0x0046, 0x080c, 0x2fe7, 0x080c,
-	0xc250, 0x004e, 0x0016, 0x9006, 0x2009, 0x185c, 0x210c, 0x0048,
-	0x2009, 0x0029, 0x080c, 0xd564, 0x6010, 0x2058, 0xb800, 0xc0e5,
-	0xb802, 0x001e, 0x004e, 0x6007, 0x0001, 0x0804, 0xc4e4, 0x2001,
-	0x0001, 0x080c, 0x6193, 0x0156, 0x0016, 0x0026, 0x0036, 0x20a9,
-	0x0004, 0x2019, 0x1805, 0x2011, 0x0270, 0x080c, 0xae08, 0x003e,
-	0x002e, 0x001e, 0x015e, 0x9005, 0x0168, 0x96b4, 0xff00, 0x8637,
-	0x9682, 0x0004, 0x0a04, 0xc3cd, 0x9682, 0x0007, 0x0a04, 0xc429,
-	0x0804, 0xc3cd, 0x6017, 0x1900, 0x6007, 0x0009, 0x0804, 0xc4e4,
-	0x080c, 0x6538, 0x1140, 0x2001, 0x1836, 0x2004, 0x9084, 0x0009,
-	0x9086, 0x0008, 0x1110, 0x0804, 0xc30c, 0x080c, 0x6521, 0x6610,
-	0x2658, 0xbe04, 0x9684, 0x00ff, 0x0006, 0x9086, 0x0001, 0x000e,
-	0x0170, 0x9082, 0x0006, 0x0690, 0x0150, 0x96b4, 0xff00, 0x8637,
-	0x9686, 0x0004, 0x0120, 0x9686, 0x0006, 0x1904, 0xc3cd, 0x080c,
-	0xd2a6, 0x1130, 0x080c, 0xd1a4, 0x1118, 0x6007, 0x0010, 0x04e0,
-	0x0046, 0x6410, 0x2458, 0xbca0, 0x0046, 0x080c, 0x2fe7, 0x080c,
-	0xc250, 0x004e, 0x0016, 0x9006, 0x2009, 0x185c, 0x210c, 0x0048,
-	0x2009, 0x0029, 0x080c, 0xd564, 0x6010, 0x2058, 0xb800, 0xc0e5,
-	0xb802, 0x001e, 0x004e, 0x6007, 0x0001, 0x00f0, 0x080c, 0xd3ff,
-	0x0140, 0x96b4, 0xff00, 0x8637, 0x9686, 0x0006, 0x0980, 0x0804,
-	0xc3cd, 0x6017, 0x1900, 0x6007, 0x0009, 0x0070, 0x080c, 0x310a,
-	0x1904, 0xc6f7, 0x080c, 0xd760, 0x1904, 0xc6f7, 0x080c, 0xc897,
-	0x1904, 0xc3cd, 0x6007, 0x0012, 0x6003, 0x0001, 0x080c, 0x8440,
-	0x080c, 0x898b, 0x0005, 0x6007, 0x0001, 0x6003, 0x0001, 0x080c,
-	0x8440, 0x080c, 0x898b, 0x0cb0, 0x6007, 0x0005, 0x0c68, 0x080c,
-	0xd760, 0x1904, 0xc6f7, 0x080c, 0x310a, 0x1904, 0xc6f7, 0x080c,
-	0xc897, 0x1904, 0xc3cd, 0x6007, 0x0020, 0x6003, 0x0001, 0x080c,
-	0x8440, 0x080c, 0x898b, 0x0005, 0x080c, 0x310a, 0x1904, 0xc6f7,
-	0x6007, 0x0023, 0x6003, 0x0001, 0x080c, 0x8440, 0x080c, 0x898b,
-	0x0005, 0x080c, 0xd760, 0x1904, 0xc6f7, 0x080c, 0x310a, 0x1904,
-	0xc6f7, 0x080c, 0xc897, 0x1904, 0xc3cd, 0x0016, 0x0026, 0x00e6,
-	0x2071, 0x0260, 0x7244, 0x9286, 0xffff, 0x0180, 0x2c08, 0x080c,
-	0xbb29, 0x01b0, 0x2260, 0x7240, 0x6008, 0x9206, 0x1188, 0x6010,
-	0x9190, 0x0004, 0x2214, 0x9206, 0x01b8, 0x0050, 0x7240, 0x2c08,
-	0x9006, 0x080c, 0xd536, 0x1180, 0x7244, 0x9286, 0xffff, 0x01b0,
-	0x2160, 0x6007, 0x0026, 0x6017, 0x1700, 0x7214, 0x9296, 0xffff,
-	0x1180, 0x6007, 0x0025, 0x0068, 0x6020, 0x9086, 0x0007, 0x1d80,
-	0x6004, 0x9086, 0x0024, 0x1110, 0x080c, 0x9e2f, 0x2160, 0x6007,
-	0x0025, 0x6003, 0x0001, 0x080c, 0x8440, 0x080c, 0x898b, 0x00ee,
-	0x002e, 0x001e, 0x0005, 0x2001, 0x0001, 0x080c, 0x6193, 0x0156,
-	0x0016, 0x0026, 0x0036, 0x20a9, 0x0004, 0x2019, 0x1805, 0x2011,
-	0x0276, 0x080c, 0xae08, 0x003e, 0x002e, 0x001e, 0x015e, 0x0120,
-	0x6007, 0x0031, 0x0804, 0xc4e4, 0x080c, 0xaa70, 0x080c, 0x6faa,
-	0x1190, 0x0006, 0x0026, 0x0036, 0x080c, 0x6fc4, 0x1138, 0x080c,
-	0x728c, 0x080c, 0x5ce5, 0x080c, 0x6edc, 0x0010, 0x080c, 0x6f82,
-	0x003e, 0x002e, 0x000e, 0x0005, 0x080c, 0x310a, 0x1904, 0xc6f7,
-	0x080c, 0xc897, 0x1904, 0xc3cd, 0x6106, 0x080c, 0xc8b3, 0x1120,
-	0x6007, 0x002b, 0x0804, 0xc4e4, 0x6007, 0x002c, 0x0804, 0xc4e4,
-	0x080c, 0xd760, 0x1904, 0xc6f7, 0x080c, 0x310a, 0x1904, 0xc6f7,
-	0x080c, 0xc897, 0x1904, 0xc3cd, 0x6106, 0x080c, 0xc8b8, 0x1120,
-	0x6007, 0x002e, 0x0804, 0xc4e4, 0x6007, 0x002f, 0x0804, 0xc4e4,
-	0x080c, 0x310a, 0x1904, 0xc6f7, 0x00e6, 0x00d6, 0x00c6, 0x6010,
-	0x2058, 0xb904, 0x9184, 0x00ff, 0x9086, 0x0006, 0x0158, 0x9184,
-	0xff00, 0x8007, 0x9086, 0x0006, 0x0128, 0x00ce, 0x00de, 0x00ee,
-	0x0804, 0xc4eb, 0x080c, 0x539e, 0xd0e4, 0x0904, 0xc642, 0x2071,
-	0x026c, 0x7010, 0x603a, 0x7014, 0x603e, 0x7108, 0x720c, 0x080c,
-	0x6576, 0x0140, 0x6010, 0x2058, 0xb810, 0x9106, 0x1118, 0xb814,
-	0x9206, 0x0510, 0x080c, 0x6572, 0x15b8, 0x2069, 0x1800, 0x687c,
-	0x9206, 0x1590, 0x6878, 0x9106, 0x1578, 0x7210, 0x080c, 0xbb29,
-	0x0590, 0x080c, 0xc782, 0x0578, 0x080c, 0xd5e0, 0x0560, 0x622e,
-	0x6007, 0x0036, 0x6003, 0x0001, 0x080c, 0x83f8, 0x080c, 0x898b,
-	0x00ce, 0x00de, 0x00ee, 0x0005, 0x7214, 0x9286, 0xffff, 0x0150,
-	0x080c, 0xbb29, 0x01c0, 0x9280, 0x0002, 0x2004, 0x7110, 0x9106,
-	0x1190, 0x08e0, 0x7210, 0x2c08, 0x9085, 0x0001, 0x080c, 0xd536,
-	0x2c10, 0x2160, 0x0140, 0x0890, 0x6007, 0x0037, 0x602f, 0x0009,
-	0x6017, 0x1500, 0x08b8, 0x6007, 0x0037, 0x602f, 0x0003, 0x6017,
-	0x1700, 0x0880, 0x6007, 0x0012, 0x0868, 0x080c, 0x310a, 0x1904,
-	0xc6f7, 0x6010, 0x2058, 0xb804, 0x9084, 0xff00, 0x8007, 0x9086,
-	0x0006, 0x1904, 0xc4eb, 0x00e6, 0x00d6, 0x00c6, 0x080c, 0x539e,
-	0xd0e4, 0x0904, 0xc6ba, 0x2069, 0x1800, 0x2071, 0x026c, 0x7008,
-	0x603a, 0x720c, 0x623e, 0x9286, 0xffff, 0x1150, 0x7208, 0x00c6,
-	0x2c08, 0x9085, 0x0001, 0x080c, 0xd536, 0x2c10, 0x00ce, 0x05e8,
-	0x080c, 0xbb29, 0x05d0, 0x7108, 0x9280, 0x0002, 0x2004, 0x9106,
-	0x15a0, 0x00c6, 0x0026, 0x2260, 0x080c, 0xb74f, 0x002e, 0x00ce,
-	0x7118, 0x918c, 0xff00, 0x810f, 0x9186, 0x0001, 0x0178, 0x9186,
-	0x0005, 0x0118, 0x9186, 0x0007, 0x1198, 0x9280, 0x0005, 0x2004,
-	0x9005, 0x0170, 0x080c, 0xc782, 0x0904, 0xc63b, 0x0056, 0x7510,
-	0x7614, 0x080c, 0xd5f9, 0x005e, 0x00ce, 0x00de, 0x00ee, 0x0005,
-	0x6007, 0x003b, 0x602f, 0x0009, 0x6017, 0x2a00, 0x6003, 0x0001,
-	0x080c, 0x83f8, 0x080c, 0x898b, 0x0c78, 0x6007, 0x003b, 0x602f,
-	0x0003, 0x6017, 0x0300, 0x6003, 0x0001, 0x080c, 0x83f8, 0x080c,
-	0x898b, 0x0c10, 0x6007, 0x003b, 0x602f, 0x000b, 0x6017, 0x0000,
-	0x0804, 0xc612, 0x00e6, 0x0026, 0x080c, 0x6538, 0x0550, 0x080c,
-	0x6521, 0x080c, 0xd7d2, 0x1518, 0x2071, 0x1800, 0x70d8, 0x9085,
-	0x0003, 0x70da, 0x00f6, 0x2079, 0x0100, 0x72ac, 0x9284, 0x00ff,
-	0x707a, 0x78e6, 0x9284, 0xff00, 0x727c, 0x9205, 0x707e, 0x78ea,
-	0x00fe, 0x70e3, 0x0000, 0x080c, 0x6576, 0x0120, 0x2011, 0x19d8,
-	0x2013, 0x07d0, 0xd0ac, 0x1128, 0x080c, 0x2dc8, 0x0010, 0x080c,
-	0xd804, 0x002e, 0x00ee, 0x080c, 0x9e2f, 0x0804, 0xc4ea, 0x080c,
-	0x9e2f, 0x0005, 0x2600, 0x0002, 0xc70e, 0xc70e, 0xc70e, 0xc70e,
-	0xc70e, 0xc710, 0xc70e, 0xc70e, 0xc70e, 0xc70e, 0xc72d, 0xc70e,
-	0xc70e, 0xc70e, 0xc73f, 0xc74c, 0xc77d, 0xc70e, 0x080c, 0x0db4,
-	0x080c, 0xd760, 0x1d20, 0x080c, 0x310a, 0x1d08, 0x080c, 0xc897,
-	0x1148, 0x7038, 0x6016, 0x6007, 0x0045, 0x6003, 0x0001, 0x080c,
-	0x8440, 0x0005, 0x080c, 0x2fe7, 0x080c, 0xc250, 0x6007, 0x0001,
-	0x6003, 0x0001, 0x080c, 0x8440, 0x0005, 0x080c, 0xd760, 0x1938,
-	0x080c, 0x310a, 0x1920, 0x080c, 0xc897, 0x1d60, 0x703c, 0x6016,
-	0x6007, 0x004a, 0x6003, 0x0001, 0x080c, 0x8440, 0x0005, 0x080c,
-	0xc79f, 0x0904, 0xc6f7, 0x6007, 0x004e, 0x6003, 0x0001, 0x080c,
-	0x8440, 0x080c, 0x898b, 0x0005, 0x6007, 0x004f, 0x6017, 0x0000,
-	0x7134, 0x918c, 0x00ff, 0x81ff, 0x0508, 0x9186, 0x0001, 0x1160,
-	0x7140, 0x2001, 0x1995, 0x2004, 0x9106, 0x11b0, 0x7144, 0x2001,
-	0x1996, 0x2004, 0x9106, 0x0190, 0x9186, 0x0002, 0x1168, 0x2011,
-	0x0276, 0x20a9, 0x0004, 0x6010, 0x0096, 0x2048, 0x2019, 0x000a,
-	0x080c, 0xae1c, 0x009e, 0x0110, 0x6017, 0x0001, 0x6003, 0x0001,
-	0x080c, 0x8440, 0x080c, 0x898b, 0x0005, 0x6007, 0x0050, 0x703c,
-	0x6016, 0x0ca0, 0x0016, 0x00e6, 0x2071, 0x0260, 0x00b6, 0x00c6,
-	0x2260, 0x6010, 0x2058, 0xb8bc, 0xd084, 0x0150, 0x7128, 0x6048,
-	0x9106, 0x1120, 0x712c, 0x6044, 0x9106, 0x0110, 0x9006, 0x0010,
-	0x9085, 0x0001, 0x00ce, 0x00be, 0x00ee, 0x001e, 0x0005, 0x0016,
-	0x0096, 0x0086, 0x00e6, 0x01c6, 0x01d6, 0x0126, 0x2091, 0x8000,
-	0x2071, 0x1800, 0x708c, 0x908a, 0x00f9, 0x16e8, 0x20e1, 0x0000,
-	0x2001, 0x1978, 0x2003, 0x0000, 0x080c, 0x1004, 0x05a0, 0x2900,
-	0x6016, 0x708c, 0x8004, 0xa816, 0x908a, 0x001e, 0x02d0, 0xa833,
-	0x001e, 0x20a9, 0x001e, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x001b,
-	0x20a0, 0x2001, 0x1978, 0x0016, 0x200c, 0x0471, 0x001e, 0x2940,
-	0x080c, 0x1004, 0x01c0, 0x2900, 0xa006, 0x2100, 0x81ff, 0x0180,
-	0x0c18, 0xa832, 0x20a8, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x001b,
-	0x20a0, 0x2001, 0x1978, 0x0016, 0x200c, 0x00b1, 0x001e, 0x0000,
-	0x9085, 0x0001, 0x0048, 0x2071, 0x1800, 0x708f, 0x0000, 0x6014,
-	0x2048, 0x080c, 0x0f9d, 0x9006, 0x012e, 0x01de, 0x01ce, 0x00ee,
-	0x008e, 0x009e, 0x001e, 0x0005, 0x0006, 0x0016, 0x0026, 0x0036,
-	0x00c6, 0x918c, 0xffff, 0x11a8, 0x080c, 0x224e, 0x2099, 0x026c,
-	0x2001, 0x0014, 0x3518, 0x9312, 0x1218, 0x23a8, 0x4003, 0x00f8,
-	0x20a8, 0x4003, 0x22a8, 0x8108, 0x080c, 0x224e, 0x2099, 0x0260,
-	0x0ca8, 0x080c, 0x224e, 0x2061, 0x1978, 0x6004, 0x2098, 0x6008,
-	0x3518, 0x9312, 0x1218, 0x23a8, 0x4003, 0x0048, 0x20a8, 0x4003,
-	0x22a8, 0x8108, 0x080c, 0x224e, 0x2099, 0x0260, 0x0ca8, 0x2061,
-	0x1978, 0x2019, 0x0280, 0x3300, 0x931e, 0x0110, 0x6006, 0x0020,
-	0x2001, 0x0260, 0x6006, 0x8108, 0x2162, 0x9292, 0x0021, 0x9296,
+	0x0016, 0x080c, 0xa08d, 0x0180, 0x2b08, 0x6112, 0x080c, 0xc2b3,
+	0x6023, 0x0001, 0x2900, 0x6016, 0x001e, 0x080c, 0xa15d, 0x9085,
+	0x0001, 0x012e, 0x00ce, 0x0005, 0x001e, 0x9006, 0x0cd0, 0x0016,
+	0x0026, 0x0036, 0x0046, 0x0056, 0x0066, 0x0096, 0x00e6, 0x00f6,
+	0x2071, 0x1800, 0x9186, 0x0015, 0x1568, 0x718c, 0x6014, 0x2048,
+	0xa814, 0x8003, 0x9106, 0x1530, 0x20e1, 0x0000, 0x2001, 0x1978,
+	0x2003, 0x0000, 0x6014, 0x2048, 0xa830, 0x20a8, 0x8906, 0x8006,
+	0x8007, 0x9094, 0x003f, 0x22e8, 0x9084, 0xffc0, 0x9080, 0x001b,
+	0x20a0, 0x2001, 0x1978, 0x0016, 0x200c, 0x080c, 0xcb1d, 0x001e,
+	0xa804, 0x9005, 0x0110, 0x2048, 0x0c38, 0x6014, 0x2048, 0xa867,
+	0x0103, 0x0010, 0x080c, 0xaa81, 0x080c, 0xa0e3, 0x00fe, 0x00ee,
+	0x009e, 0x006e, 0x005e, 0x004e, 0x003e, 0x002e, 0x001e, 0x0005,
+	0x0096, 0x00e6, 0x00f6, 0x2071, 0x1800, 0x9186, 0x0015, 0x11b8,
+	0x708c, 0x9086, 0x0004, 0x1198, 0x6014, 0x2048, 0x2c78, 0x080c,
+	0x8e03, 0x01a8, 0x7078, 0xaa74, 0x9206, 0x1130, 0x707c, 0xaa78,
+	0x9206, 0x1110, 0x080c, 0x318b, 0x080c, 0xa4e7, 0x0020, 0x080c,
+	0xaa81, 0x080c, 0xa0e3, 0x00fe, 0x00ee, 0x009e, 0x0005, 0x705c,
+	0xaa78, 0x9206, 0x0d78, 0x0c80, 0x0096, 0x00e6, 0x00f6, 0x2071,
+	0x1800, 0x9186, 0x0015, 0x1550, 0x708c, 0x9086, 0x0004, 0x1530,
+	0x6014, 0x2048, 0x2c78, 0x080c, 0x8e03, 0x05f0, 0x7078, 0xaacc,
+	0x9206, 0x1180, 0x707c, 0xaad0, 0x9206, 0x1160, 0x080c, 0x318b,
+	0x0016, 0xa998, 0xaab0, 0x9284, 0x1000, 0xc0fd, 0x080c, 0x558a,
+	0x001e, 0x0010, 0x080c, 0x5375, 0x080c, 0xbe37, 0x0508, 0xa87b,
+	0x0000, 0xa883, 0x0000, 0xa897, 0x4000, 0x0080, 0x080c, 0xbe37,
+	0x01b8, 0x6014, 0x2048, 0x080c, 0x5375, 0x1d70, 0xa87b, 0x0030,
+	0xa883, 0x0000, 0xa897, 0x4005, 0xa89b, 0x0004, 0x0126, 0x2091,
+	0x8000, 0xa867, 0x0139, 0x080c, 0x6ae9, 0x012e, 0x080c, 0xa0e3,
+	0x00fe, 0x00ee, 0x009e, 0x0005, 0x705c, 0xaad0, 0x9206, 0x0930,
+	0x0888, 0x0016, 0x0026, 0xa87c, 0xd0ac, 0x0178, 0xa938, 0xaa34,
+	0x2100, 0x9205, 0x0150, 0xa890, 0x9106, 0x1118, 0xa88c, 0x9206,
+	0x0120, 0xa992, 0xaa8e, 0x9085, 0x0001, 0x002e, 0x001e, 0x0005,
+	0x00b6, 0x00d6, 0x0036, 0x080c, 0xbe37, 0x0904, 0xc46e, 0x0096,
+	0x6314, 0x2348, 0xa87a, 0xa982, 0x929e, 0x4000, 0x1580, 0x6310,
+	0x00c6, 0x2358, 0x2009, 0x0000, 0xa868, 0xd0f4, 0x1140, 0x080c,
+	0x66bf, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d, 0xaa96,
+	0xa99a, 0x20a9, 0x0004, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0031,
+	0x20a0, 0xb8b4, 0x20e0, 0xb8b8, 0x9080, 0x0006, 0x2098, 0x080c,
+	0x0fae, 0x20a9, 0x0004, 0xa85c, 0x9080, 0x0035, 0x20a0, 0xb8b8,
+	0x9080, 0x000a, 0x2098, 0x080c, 0x0fae, 0x00ce, 0x0090, 0xaa96,
+	0x3918, 0x9398, 0x0007, 0x231c, 0x6004, 0x9086, 0x0016, 0x0110,
+	0xa89b, 0x0004, 0xaba2, 0x6310, 0x2358, 0xb804, 0x9084, 0x00ff,
+	0xa89e, 0x080c, 0x6adc, 0x6017, 0x0000, 0x009e, 0x003e, 0x00de,
+	0x00be, 0x0005, 0x0026, 0x0036, 0x0046, 0x00b6, 0x0096, 0x00f6,
+	0x6214, 0x2248, 0x6210, 0x2258, 0x2079, 0x0260, 0x9096, 0x0000,
+	0x11a0, 0xb814, 0x9084, 0x00ff, 0x900e, 0x080c, 0x276e, 0x2118,
+	0x831f, 0x939c, 0xff00, 0x7838, 0x9084, 0x00ff, 0x931d, 0x7c3c,
+	0x2011, 0x8018, 0x080c, 0x4b1f, 0x00a8, 0x9096, 0x0001, 0x1148,
+	0x89ff, 0x0180, 0xa89b, 0x000d, 0x7838, 0xa8a6, 0x783c, 0xa8aa,
+	0x0048, 0x9096, 0x0002, 0x1130, 0xa89b, 0x000d, 0x7838, 0xa8a6,
+	0x783c, 0xa8aa, 0x00fe, 0x009e, 0x00be, 0x004e, 0x003e, 0x002e,
+	0x0005, 0x00c6, 0x0026, 0x0016, 0x9186, 0x0035, 0x0110, 0x6a38,
+	0x0008, 0x6a2c, 0x080c, 0xbe25, 0x01f0, 0x2260, 0x6120, 0x9186,
+	0x0003, 0x0118, 0x9186, 0x0006, 0x1190, 0x6838, 0x9206, 0x0140,
+	0x683c, 0x9206, 0x1160, 0x6108, 0x6838, 0x9106, 0x1140, 0x0020,
+	0x6008, 0x693c, 0x9106, 0x1118, 0x6010, 0x6910, 0x9106, 0x001e,
+	0x002e, 0x00ce, 0x0005, 0x9085, 0x0001, 0x0cc8, 0xa974, 0xd1cc,
+	0x0188, 0x918c, 0x00ff, 0x918e, 0x0002, 0x1160, 0xa9a8, 0x918c,
+	0x0f00, 0x810f, 0x918e, 0x0001, 0x1128, 0xa834, 0xa938, 0x9115,
+	0x190c, 0xb4ee, 0x0005, 0x0036, 0x2019, 0x0001, 0x0010, 0x0036,
+	0x901e, 0x0499, 0x01e0, 0x080c, 0xbe37, 0x01c8, 0x080c, 0xc022,
+	0x6037, 0x4000, 0x6014, 0x6017, 0x0000, 0x0096, 0x2048, 0xa87c,
+	0x080c, 0xc03f, 0x1118, 0x080c, 0xaa81, 0x0040, 0xa867, 0x0103,
+	0xa877, 0x0000, 0x83ff, 0x1129, 0x080c, 0x6ae9, 0x009e, 0x003e,
+	0x0005, 0xa880, 0xd0b4, 0x0128, 0xa87b, 0x0006, 0xc0ec, 0xa882,
+	0x0048, 0xd0bc, 0x0118, 0xa87b, 0x0002, 0x0020, 0xa87b, 0x0005,
+	0x080c, 0xc133, 0xa877, 0x0000, 0x0005, 0x2001, 0x1810, 0x2004,
+	0xd0ec, 0x0005, 0x0006, 0x2001, 0x1810, 0x2004, 0xd0f4, 0x000e,
+	0x0005, 0x0006, 0x2001, 0x1810, 0x2004, 0xd0e4, 0x000e, 0x0005,
+	0x0036, 0x0046, 0x6010, 0x00b6, 0x2058, 0xbba0, 0x00be, 0x2021,
+	0x0007, 0x080c, 0x4cbc, 0x004e, 0x003e, 0x0005, 0x0c51, 0x1d81,
+	0x0005, 0x2001, 0x195e, 0x2004, 0x601a, 0x0005, 0x2001, 0x1960,
+	0x2004, 0x6042, 0x0005, 0x080c, 0xa0e3, 0x0804, 0x8c10, 0x00b6,
+	0x0066, 0x6000, 0x90b2, 0x0016, 0x1a0c, 0x0dfa, 0x001b, 0x006e,
+	0x00be, 0x0005, 0xc57a, 0xcc7a, 0xcdd5, 0xc57a, 0xc57a, 0xc57a,
+	0xc57a, 0xc57a, 0xc5b1, 0xce59, 0xc57a, 0xc57a, 0xc57a, 0xc57a,
+	0xc57a, 0xc57a, 0x080c, 0x0dfa, 0x0066, 0x6000, 0x90b2, 0x0016,
+	0x1a0c, 0x0dfa, 0x0013, 0x006e, 0x0005, 0xc595, 0xd3cb, 0xc595,
+	0xc595, 0xc595, 0xc595, 0xc595, 0xc595, 0xd378, 0xd41f, 0xc595,
+	0xda0f, 0xda45, 0xda0f, 0xda45, 0xc595, 0x080c, 0x0dfa, 0x6000,
+	0x9082, 0x0016, 0x1a0c, 0x0dfa, 0x6000, 0x000a, 0x0005, 0xc5af,
+	0xd037, 0xd129, 0xd14c, 0xd20c, 0xc5af, 0xd2eb, 0xd294, 0xce65,
+	0xd34e, 0xd363, 0xc5af, 0xc5af, 0xc5af, 0xc5af, 0xc5af, 0x080c,
+	0x0dfa, 0x91b2, 0x0053, 0x1a0c, 0x0dfa, 0x2100, 0x91b2, 0x0040,
+	0x1a04, 0xca1b, 0x0002, 0xc5fb, 0xc7e9, 0xc5fb, 0xc5fb, 0xc5fb,
+	0xc7f2, 0xc5fb, 0xc5fb, 0xc5fb, 0xc5fb, 0xc5fb, 0xc5fb, 0xc5fb,
+	0xc5fb, 0xc5fb, 0xc5fb, 0xc5fb, 0xc5fb, 0xc5fb, 0xc5fb, 0xc5fb,
+	0xc5fb, 0xc5fb, 0xc5fd, 0xc660, 0xc66f, 0xc6d3, 0xc6fe, 0xc776,
+	0xc7d4, 0xc5fb, 0xc5fb, 0xc7f5, 0xc5fb, 0xc5fb, 0xc80a, 0xc817,
+	0xc5fb, 0xc5fb, 0xc5fb, 0xc5fb, 0xc5fb, 0xc8bd, 0xc5fb, 0xc5fb,
+	0xc8d1, 0xc5fb, 0xc5fb, 0xc88c, 0xc5fb, 0xc5fb, 0xc5fb, 0xc8e9,
+	0xc5fb, 0xc5fb, 0xc5fb, 0xc966, 0xc5fb, 0xc5fb, 0xc5fb, 0xc5fb,
+	0xc5fb, 0xc5fb, 0xc9e3, 0x080c, 0x0dfa, 0x080c, 0x6781, 0x1150,
+	0x2001, 0x1836, 0x2004, 0xd0cc, 0x1128, 0x9084, 0x0009, 0x9086,
+	0x0008, 0x1140, 0x6007, 0x0009, 0x602f, 0x0009, 0x6017, 0x0000,
+	0x0804, 0xc7e2, 0x080c, 0x676a, 0x00e6, 0x00c6, 0x0036, 0x0026,
+	0x0016, 0x6210, 0x2258, 0xbaa0, 0x0026, 0x2019, 0x0029, 0x080c,
+	0x8803, 0x0076, 0x903e, 0x080c, 0x86f1, 0x2c08, 0x080c, 0xd5f6,
+	0x007e, 0x001e, 0x001e, 0x002e, 0x003e, 0x00ce, 0x00ee, 0x6610,
+	0x2658, 0x080c, 0x64ae, 0xbe04, 0x9684, 0x00ff, 0x9082, 0x0006,
+	0x1268, 0x0016, 0x0026, 0x6210, 0x00b6, 0x2258, 0xbaa0, 0x00be,
+	0x2c08, 0x080c, 0xdbbd, 0x002e, 0x001e, 0x1178, 0x080c, 0xd529,
+	0x1904, 0xc6cb, 0x080c, 0xd4c5, 0x1120, 0x6007, 0x0008, 0x0804,
+	0xc7e2, 0x6007, 0x0009, 0x0804, 0xc7e2, 0x080c, 0xd720, 0x0128,
+	0x080c, 0xd529, 0x0d78, 0x0804, 0xc6cb, 0x6017, 0x1900, 0x0c88,
+	0x080c, 0x32ae, 0x1904, 0xca18, 0x6106, 0x080c, 0xd47a, 0x6007,
+	0x0006, 0x0804, 0xc7e2, 0x6007, 0x0007, 0x0804, 0xc7e2, 0x080c,
+	0xda81, 0x1904, 0xca18, 0x080c, 0x32ae, 0x1904, 0xca18, 0x00d6,
+	0x6610, 0x2658, 0xbe04, 0x9684, 0x00ff, 0x9082, 0x0006, 0x1220,
+	0x2001, 0x0001, 0x080c, 0x63dc, 0x96b4, 0xff00, 0x8637, 0x9686,
+	0x0006, 0x0188, 0x9686, 0x0004, 0x0170, 0xbe04, 0x96b4, 0x00ff,
+	0x9686, 0x0006, 0x0140, 0x9686, 0x0004, 0x0128, 0x9686, 0x0005,
+	0x0110, 0x00de, 0x0480, 0x00e6, 0x2071, 0x0260, 0x7034, 0x9084,
+	0x0003, 0x1140, 0x7034, 0x9082, 0x0014, 0x0220, 0x7030, 0x9084,
+	0x0003, 0x0130, 0x00ee, 0x6017, 0x0000, 0x602f, 0x0007, 0x00b0,
+	0x00ee, 0x080c, 0xd58c, 0x1190, 0x9686, 0x0006, 0x1140, 0x0026,
+	0x6210, 0x2258, 0xbaa0, 0x900e, 0x080c, 0x31d4, 0x002e, 0x080c,
+	0x653a, 0x6007, 0x000a, 0x00de, 0x0804, 0xc7e2, 0x6007, 0x000b,
+	0x00de, 0x0804, 0xc7e2, 0x080c, 0x318b, 0x080c, 0xc54e, 0x6007,
+	0x0001, 0x0804, 0xc7e2, 0x080c, 0xda81, 0x1904, 0xca18, 0x080c,
+	0x32ae, 0x1904, 0xca18, 0x2071, 0x0260, 0x7034, 0x90b4, 0x0003,
+	0x1948, 0x90b2, 0x0014, 0x0a30, 0x7030, 0x9084, 0x0003, 0x1910,
+	0x6610, 0x2658, 0xbe04, 0x9686, 0x0707, 0x09e8, 0x0026, 0x6210,
+	0x2258, 0xbaa0, 0x900e, 0x080c, 0x31d4, 0x002e, 0x6007, 0x000c,
+	0x2001, 0x0001, 0x080c, 0xdb9d, 0x0804, 0xc7e2, 0x080c, 0x6781,
+	0x1140, 0x2001, 0x1836, 0x2004, 0x9084, 0x0009, 0x9086, 0x0008,
+	0x1110, 0x0804, 0xc60a, 0x080c, 0x676a, 0x6610, 0x2658, 0xbe04,
+	0x9684, 0x00ff, 0x9082, 0x0006, 0x06c0, 0x1138, 0x0026, 0x2001,
+	0x0006, 0x080c, 0x641c, 0x002e, 0x0050, 0x96b4, 0xff00, 0x8637,
+	0x9686, 0x0004, 0x0120, 0x9686, 0x0006, 0x1904, 0xc6cb, 0x080c,
+	0xd599, 0x1120, 0x6007, 0x000e, 0x0804, 0xc7e2, 0x0046, 0x6410,
+	0x2458, 0xbca0, 0x0046, 0x080c, 0x318b, 0x080c, 0xc54e, 0x004e,
+	0x0016, 0x9006, 0x2009, 0x185c, 0x210c, 0x0048, 0x2009, 0x0029,
+	0x080c, 0xd885, 0x6010, 0x2058, 0xb800, 0xc0e5, 0xb802, 0x001e,
+	0x004e, 0x6007, 0x0001, 0x0804, 0xc7e2, 0x2001, 0x0001, 0x080c,
+	0x63dc, 0x0156, 0x0016, 0x0026, 0x0036, 0x20a9, 0x0004, 0x2019,
+	0x1805, 0x2011, 0x0270, 0x080c, 0xb0bc, 0x003e, 0x002e, 0x001e,
+	0x015e, 0x9005, 0x0168, 0x96b4, 0xff00, 0x8637, 0x9682, 0x0004,
+	0x0a04, 0xc6cb, 0x9682, 0x0007, 0x0a04, 0xc727, 0x0804, 0xc6cb,
+	0x6017, 0x1900, 0x6007, 0x0009, 0x0804, 0xc7e2, 0x080c, 0x6781,
+	0x1140, 0x2001, 0x1836, 0x2004, 0x9084, 0x0009, 0x9086, 0x0008,
+	0x1110, 0x0804, 0xc60a, 0x080c, 0x676a, 0x6610, 0x2658, 0xbe04,
+	0x9684, 0x00ff, 0x0006, 0x9086, 0x0001, 0x000e, 0x0170, 0x9082,
+	0x0006, 0x0690, 0x0150, 0x96b4, 0xff00, 0x8637, 0x9686, 0x0004,
+	0x0120, 0x9686, 0x0006, 0x1904, 0xc6cb, 0x080c, 0xd5c7, 0x1130,
+	0x080c, 0xd4c5, 0x1118, 0x6007, 0x0010, 0x04e0, 0x0046, 0x6410,
+	0x2458, 0xbca0, 0x0046, 0x080c, 0x318b, 0x080c, 0xc54e, 0x004e,
+	0x0016, 0x9006, 0x2009, 0x185c, 0x210c, 0x0048, 0x2009, 0x0029,
+	0x080c, 0xd885, 0x6010, 0x2058, 0xb800, 0xc0e5, 0xb802, 0x001e,
+	0x004e, 0x6007, 0x0001, 0x00f0, 0x080c, 0xd720, 0x0140, 0x96b4,
+	0xff00, 0x8637, 0x9686, 0x0006, 0x0980, 0x0804, 0xc6cb, 0x6017,
+	0x1900, 0x6007, 0x0009, 0x0070, 0x080c, 0x32ae, 0x1904, 0xca18,
+	0x080c, 0xda81, 0x1904, 0xca18, 0x080c, 0xcbb8, 0x1904, 0xc6cb,
+	0x6007, 0x0012, 0x6003, 0x0001, 0x080c, 0x86c1, 0x080c, 0x8c10,
+	0x0005, 0x6007, 0x0001, 0x6003, 0x0001, 0x080c, 0x86c1, 0x080c,
+	0x8c10, 0x0cb0, 0x6007, 0x0005, 0x0c68, 0x080c, 0xda81, 0x1904,
+	0xca18, 0x080c, 0x32ae, 0x1904, 0xca18, 0x080c, 0xcbb8, 0x1904,
+	0xc6cb, 0x6007, 0x0020, 0x6003, 0x0001, 0x080c, 0x86c1, 0x080c,
+	0x8c10, 0x0005, 0x080c, 0x32ae, 0x1904, 0xca18, 0x6007, 0x0023,
+	0x6003, 0x0001, 0x080c, 0x86c1, 0x080c, 0x8c10, 0x0005, 0x080c,
+	0xda81, 0x1904, 0xca18, 0x080c, 0x32ae, 0x1904, 0xca18, 0x080c,
+	0xcbb8, 0x1904, 0xc6cb, 0x0016, 0x0026, 0x00e6, 0x2071, 0x0260,
+	0x2c08, 0x2011, 0x181f, 0x2214, 0x703c, 0x9206, 0x11e0, 0x2011,
+	0x181e, 0x2214, 0x7038, 0x9084, 0x00ff, 0x9206, 0x11a0, 0x7240,
+	0x080c, 0xbe25, 0x0570, 0x2260, 0x6008, 0x9086, 0xffff, 0x0120,
+	0x7244, 0x6008, 0x9206, 0x1528, 0x6020, 0x9086, 0x0007, 0x1508,
+	0x080c, 0xa0e3, 0x04a0, 0x7244, 0x9286, 0xffff, 0x0180, 0x2c08,
+	0x080c, 0xbe25, 0x01b0, 0x2260, 0x7240, 0x6008, 0x9206, 0x1188,
+	0x6010, 0x9190, 0x0004, 0x2214, 0x9206, 0x01b8, 0x0050, 0x7240,
+	0x2c08, 0x9006, 0x080c, 0xd857, 0x1180, 0x7244, 0x9286, 0xffff,
+	0x01b0, 0x2160, 0x6007, 0x0026, 0x6017, 0x1700, 0x7214, 0x9296,
+	0xffff, 0x1180, 0x6007, 0x0025, 0x0068, 0x6020, 0x9086, 0x0007,
+	0x1d80, 0x6004, 0x9086, 0x0024, 0x1110, 0x080c, 0xa0e3, 0x2160,
+	0x6007, 0x0025, 0x6003, 0x0001, 0x080c, 0x86c1, 0x080c, 0x8c10,
+	0x00ee, 0x002e, 0x001e, 0x0005, 0x2001, 0x0001, 0x080c, 0x63dc,
+	0x0156, 0x0016, 0x0026, 0x0036, 0x20a9, 0x0004, 0x2019, 0x1805,
+	0x2011, 0x0276, 0x080c, 0xb0bc, 0x003e, 0x002e, 0x001e, 0x015e,
+	0x0120, 0x6007, 0x0031, 0x0804, 0xc7e2, 0x080c, 0xad24, 0x080c,
+	0x7207, 0x1190, 0x0006, 0x0026, 0x0036, 0x080c, 0x7221, 0x1138,
+	0x080c, 0x7504, 0x080c, 0x5f2b, 0x080c, 0x7127, 0x0010, 0x080c,
+	0x71df, 0x003e, 0x002e, 0x000e, 0x0005, 0x080c, 0x32ae, 0x1904,
+	0xca18, 0x080c, 0xcbb8, 0x1904, 0xc6cb, 0x6106, 0x080c, 0xcbd4,
+	0x1120, 0x6007, 0x002b, 0x0804, 0xc7e2, 0x6007, 0x002c, 0x0804,
+	0xc7e2, 0x080c, 0xda81, 0x1904, 0xca18, 0x080c, 0x32ae, 0x1904,
+	0xca18, 0x080c, 0xcbb8, 0x1904, 0xc6cb, 0x6106, 0x080c, 0xcbd9,
+	0x1120, 0x6007, 0x002e, 0x0804, 0xc7e2, 0x6007, 0x002f, 0x0804,
+	0xc7e2, 0x080c, 0x32ae, 0x1904, 0xca18, 0x00e6, 0x00d6, 0x00c6,
+	0x6010, 0x2058, 0xb904, 0x9184, 0x00ff, 0x9086, 0x0006, 0x0158,
+	0x9184, 0xff00, 0x8007, 0x9086, 0x0006, 0x0128, 0x00ce, 0x00de,
+	0x00ee, 0x0804, 0xc7e9, 0x080c, 0x55df, 0xd0e4, 0x0904, 0xc963,
+	0x2071, 0x026c, 0x7010, 0x603a, 0x7014, 0x603e, 0x7108, 0x720c,
+	0x080c, 0x67bf, 0x0140, 0x6010, 0x2058, 0xb810, 0x9106, 0x1118,
+	0xb814, 0x9206, 0x0510, 0x080c, 0x67bb, 0x15b8, 0x2069, 0x1800,
+	0x687c, 0x9206, 0x1590, 0x6878, 0x9106, 0x1578, 0x7210, 0x080c,
+	0xbe25, 0x0590, 0x080c, 0xcaa3, 0x0578, 0x080c, 0xd901, 0x0560,
+	0x622e, 0x6007, 0x0036, 0x6003, 0x0001, 0x080c, 0x8679, 0x080c,
+	0x8c10, 0x00ce, 0x00de, 0x00ee, 0x0005, 0x7214, 0x9286, 0xffff,
+	0x0150, 0x080c, 0xbe25, 0x01c0, 0x9280, 0x0002, 0x2004, 0x7110,
+	0x9106, 0x1190, 0x08e0, 0x7210, 0x2c08, 0x9085, 0x0001, 0x080c,
+	0xd857, 0x2c10, 0x2160, 0x0140, 0x0890, 0x6007, 0x0037, 0x602f,
+	0x0009, 0x6017, 0x1500, 0x08b8, 0x6007, 0x0037, 0x602f, 0x0003,
+	0x6017, 0x1700, 0x0880, 0x6007, 0x0012, 0x0868, 0x080c, 0x32ae,
+	0x1904, 0xca18, 0x6010, 0x2058, 0xb804, 0x9084, 0xff00, 0x8007,
+	0x9086, 0x0006, 0x1904, 0xc7e9, 0x00e6, 0x00d6, 0x00c6, 0x080c,
+	0x55df, 0xd0e4, 0x0904, 0xc9db, 0x2069, 0x1800, 0x2071, 0x026c,
+	0x7008, 0x603a, 0x720c, 0x623e, 0x9286, 0xffff, 0x1150, 0x7208,
+	0x00c6, 0x2c08, 0x9085, 0x0001, 0x080c, 0xd857, 0x2c10, 0x00ce,
+	0x05e8, 0x080c, 0xbe25, 0x05d0, 0x7108, 0x9280, 0x0002, 0x2004,
+	0x9106, 0x15a0, 0x00c6, 0x0026, 0x2260, 0x080c, 0xba49, 0x002e,
+	0x00ce, 0x7118, 0x918c, 0xff00, 0x810f, 0x9186, 0x0001, 0x0178,
+	0x9186, 0x0005, 0x0118, 0x9186, 0x0007, 0x1198, 0x9280, 0x0005,
+	0x2004, 0x9005, 0x0170, 0x080c, 0xcaa3, 0x0904, 0xc95c, 0x0056,
+	0x7510, 0x7614, 0x080c, 0xd91a, 0x005e, 0x00ce, 0x00de, 0x00ee,
+	0x0005, 0x6007, 0x003b, 0x602f, 0x0009, 0x6017, 0x2a00, 0x6003,
+	0x0001, 0x080c, 0x8679, 0x080c, 0x8c10, 0x0c78, 0x6007, 0x003b,
+	0x602f, 0x0003, 0x6017, 0x0300, 0x6003, 0x0001, 0x080c, 0x8679,
+	0x080c, 0x8c10, 0x0c10, 0x6007, 0x003b, 0x602f, 0x000b, 0x6017,
+	0x0000, 0x0804, 0xc933, 0x00e6, 0x0026, 0x080c, 0x6781, 0x0550,
+	0x080c, 0x676a, 0x080c, 0xdaf3, 0x1518, 0x2071, 0x1800, 0x70d8,
+	0x9085, 0x0003, 0x70da, 0x00f6, 0x2079, 0x0100, 0x72ac, 0x9284,
+	0x00ff, 0x707a, 0x78e6, 0x9284, 0xff00, 0x727c, 0x9205, 0x707e,
+	0x78ea, 0x00fe, 0x70e3, 0x0000, 0x080c, 0x67bf, 0x0120, 0x2011,
+	0x19d8, 0x2013, 0x07d0, 0xd0ac, 0x1128, 0x080c, 0x2f6c, 0x0010,
+	0x080c, 0xdb25, 0x002e, 0x00ee, 0x080c, 0xa0e3, 0x0804, 0xc7e8,
+	0x080c, 0xa0e3, 0x0005, 0x2600, 0x0002, 0xca2f, 0xca2f, 0xca2f,
+	0xca2f, 0xca2f, 0xca31, 0xca2f, 0xca2f, 0xca2f, 0xca2f, 0xca4e,
+	0xca2f, 0xca2f, 0xca2f, 0xca60, 0xca6d, 0xca9e, 0xca2f, 0x080c,
+	0x0dfa, 0x080c, 0xda81, 0x1d20, 0x080c, 0x32ae, 0x1d08, 0x080c,
+	0xcbb8, 0x1148, 0x7038, 0x6016, 0x6007, 0x0045, 0x6003, 0x0001,
+	0x080c, 0x86c1, 0x0005, 0x080c, 0x318b, 0x080c, 0xc54e, 0x6007,
+	0x0001, 0x6003, 0x0001, 0x080c, 0x86c1, 0x0005, 0x080c, 0xda81,
+	0x1938, 0x080c, 0x32ae, 0x1920, 0x080c, 0xcbb8, 0x1d60, 0x703c,
+	0x6016, 0x6007, 0x004a, 0x6003, 0x0001, 0x080c, 0x86c1, 0x0005,
+	0x080c, 0xcac0, 0x0904, 0xca18, 0x6007, 0x004e, 0x6003, 0x0001,
+	0x080c, 0x86c1, 0x080c, 0x8c10, 0x0005, 0x6007, 0x004f, 0x6017,
+	0x0000, 0x7134, 0x918c, 0x00ff, 0x81ff, 0x0508, 0x9186, 0x0001,
+	0x1160, 0x7140, 0x2001, 0x1995, 0x2004, 0x9106, 0x11b0, 0x7144,
+	0x2001, 0x1996, 0x2004, 0x9106, 0x0190, 0x9186, 0x0002, 0x1168,
+	0x2011, 0x0276, 0x20a9, 0x0004, 0x6010, 0x0096, 0x2048, 0x2019,
+	0x000a, 0x080c, 0xb0d0, 0x009e, 0x0110, 0x6017, 0x0001, 0x6003,
+	0x0001, 0x080c, 0x86c1, 0x080c, 0x8c10, 0x0005, 0x6007, 0x0050,
+	0x703c, 0x6016, 0x0ca0, 0x0016, 0x00e6, 0x2071, 0x0260, 0x00b6,
+	0x00c6, 0x2260, 0x6010, 0x2058, 0xb8bc, 0xd084, 0x0150, 0x7128,
+	0x6044, 0x9106, 0x1120, 0x712c, 0x6048, 0x9106, 0x0110, 0x9006,
+	0x0010, 0x9085, 0x0001, 0x00ce, 0x00be, 0x00ee, 0x001e, 0x0005,
+	0x0016, 0x0096, 0x0086, 0x00e6, 0x01c6, 0x01d6, 0x0126, 0x2091,
+	0x8000, 0x2071, 0x1800, 0x708c, 0x908a, 0x00f9, 0x16e8, 0x20e1,
+	0x0000, 0x2001, 0x1978, 0x2003, 0x0000, 0x080c, 0x104a, 0x05a0,
+	0x2900, 0x6016, 0x708c, 0x8004, 0xa816, 0x908a, 0x001e, 0x02d0,
+	0xa833, 0x001e, 0x20a9, 0x001e, 0xa860, 0x20e8, 0xa85c, 0x9080,
+	0x001b, 0x20a0, 0x2001, 0x1978, 0x0016, 0x200c, 0x0471, 0x001e,
+	0x2940, 0x080c, 0x104a, 0x01c0, 0x2900, 0xa006, 0x2100, 0x81ff,
+	0x0180, 0x0c18, 0xa832, 0x20a8, 0xa860, 0x20e8, 0xa85c, 0x9080,
+	0x001b, 0x20a0, 0x2001, 0x1978, 0x0016, 0x200c, 0x00b1, 0x001e,
+	0x0000, 0x9085, 0x0001, 0x0048, 0x2071, 0x1800, 0x708f, 0x0000,
+	0x6014, 0x2048, 0x080c, 0x0fe3, 0x9006, 0x012e, 0x01de, 0x01ce,
+	0x00ee, 0x008e, 0x009e, 0x001e, 0x0005, 0x0006, 0x0016, 0x0026,
+	0x0036, 0x00c6, 0x918c, 0xffff, 0x11a8, 0x080c, 0x22e3, 0x2099,
+	0x026c, 0x2001, 0x0014, 0x3518, 0x9312, 0x1218, 0x23a8, 0x4003,
+	0x00f8, 0x20a8, 0x4003, 0x22a8, 0x8108, 0x080c, 0x22e3, 0x2099,
+	0x0260, 0x0ca8, 0x080c, 0x22e3, 0x2061, 0x1978, 0x6004, 0x2098,
+	0x6008, 0x3518, 0x9312, 0x1218, 0x23a8, 0x4003, 0x0048, 0x20a8,
+	0x4003, 0x22a8, 0x8108, 0x080c, 0x22e3, 0x2099, 0x0260, 0x0ca8,
+	0x2061, 0x1978, 0x2019, 0x0280, 0x3300, 0x931e, 0x0110, 0x6006,
+	0x0020, 0x2001, 0x0260, 0x6006, 0x8108, 0x2162, 0x9292, 0x0021,
+	0x9296, 0xffff, 0x620a, 0x00ce, 0x003e, 0x002e, 0x001e, 0x000e,
+	0x0005, 0x0006, 0x0016, 0x0026, 0x0036, 0x00c6, 0x81ff, 0x11b8,
+	0x080c, 0x22fb, 0x20a1, 0x024c, 0x2001, 0x0014, 0x3518, 0x9312,
+	0x1218, 0x23a8, 0x4003, 0x0418, 0x20a8, 0x4003, 0x82ff, 0x01f8,
+	0x22a8, 0x8108, 0x080c, 0x22fb, 0x20a1, 0x0240, 0x0c98, 0x080c,
+	0x22fb, 0x2061, 0x197b, 0x6004, 0x20a0, 0x6008, 0x3518, 0x9312,
+	0x1218, 0x23a8, 0x4003, 0x0058, 0x20a8, 0x4003, 0x82ff, 0x0138,
+	0x22a8, 0x8108, 0x080c, 0x22fb, 0x20a1, 0x0240, 0x0c98, 0x2061,
+	0x197b, 0x2019, 0x0260, 0x3400, 0x931e, 0x0110, 0x6006, 0x0020,
+	0x2001, 0x0240, 0x6006, 0x8108, 0x2162, 0x9292, 0x0021, 0x9296,
 	0xffff, 0x620a, 0x00ce, 0x003e, 0x002e, 0x001e, 0x000e, 0x0005,
-	0x0006, 0x0016, 0x0026, 0x0036, 0x00c6, 0x81ff, 0x11b8, 0x080c,
-	0x2266, 0x20a1, 0x024c, 0x2001, 0x0014, 0x3518, 0x9312, 0x1218,
-	0x23a8, 0x4003, 0x0418, 0x20a8, 0x4003, 0x82ff, 0x01f8, 0x22a8,
-	0x8108, 0x080c, 0x2266, 0x20a1, 0x0240, 0x0c98, 0x080c, 0x2266,
-	0x2061, 0x197b, 0x6004, 0x20a0, 0x6008, 0x3518, 0x9312, 0x1218,
-	0x23a8, 0x4003, 0x0058, 0x20a8, 0x4003, 0x82ff, 0x0138, 0x22a8,
-	0x8108, 0x080c, 0x2266, 0x20a1, 0x0240, 0x0c98, 0x2061, 0x197b,
-	0x2019, 0x0260, 0x3400, 0x931e, 0x0110, 0x6006, 0x0020, 0x2001,
-	0x0240, 0x6006, 0x8108, 0x2162, 0x9292, 0x0021, 0x9296, 0xffff,
-	0x620a, 0x00ce, 0x003e, 0x002e, 0x001e, 0x000e, 0x0005, 0x00b6,
-	0x0066, 0x6610, 0x2658, 0xbe04, 0x96b4, 0xff00, 0x8637, 0x9686,
-	0x0006, 0x0170, 0x9686, 0x0004, 0x0158, 0xbe04, 0x96b4, 0x00ff,
-	0x9686, 0x0006, 0x0128, 0x9686, 0x0004, 0x0110, 0x9085, 0x0001,
-	0x006e, 0x00be, 0x0005, 0x00d6, 0x080c, 0xc92f, 0x00de, 0x0005,
-	0x00d6, 0x080c, 0xc93c, 0x1520, 0x680c, 0x908c, 0xff00, 0x6820,
-	0x9084, 0x00ff, 0x9115, 0x6216, 0x6824, 0x602e, 0xd1e4, 0x0130,
-	0x9006, 0x080c, 0xd87c, 0x2009, 0x0001, 0x0078, 0xd1ec, 0x0180,
-	0x6920, 0x918c, 0x00ff, 0x6824, 0x080c, 0x2670, 0x1148, 0x2001,
-	0x0001, 0x080c, 0xd87c, 0x2110, 0x900e, 0x080c, 0x3030, 0x0018,
-	0x9085, 0x0001, 0x0008, 0x9006, 0x00de, 0x0005, 0x00b6, 0x00c6,
-	0x080c, 0x9e7c, 0x05a8, 0x0016, 0x0026, 0x00c6, 0x2011, 0x0263,
-	0x2204, 0x8211, 0x220c, 0x080c, 0x2670, 0x1578, 0x080c, 0x61f6,
-	0x1560, 0xbe12, 0xbd16, 0x00ce, 0x002e, 0x001e, 0x2b00, 0x6012,
-	0x080c, 0xd760, 0x11d8, 0x080c, 0x310a, 0x11c0, 0x080c, 0xc897,
-	0x0510, 0x2001, 0x0007, 0x080c, 0x61a7, 0x2001, 0x0007, 0x080c,
-	0x61d3, 0x6017, 0x0000, 0x6023, 0x0001, 0x6007, 0x0001, 0x6003,
-	0x0001, 0x080c, 0x8440, 0x080c, 0x898b, 0x0010, 0x080c, 0x9e2f,
-	0x9085, 0x0001, 0x00ce, 0x00be, 0x0005, 0x080c, 0x9e2f, 0x00ce,
-	0x002e, 0x001e, 0x0ca8, 0x080c, 0x9e2f, 0x9006, 0x0c98, 0x2069,
-	0x026d, 0x6800, 0x9082, 0x0010, 0x1228, 0x6017, 0x0000, 0x9085,
-	0x0001, 0x0008, 0x9006, 0x0005, 0x6017, 0x0000, 0x2069, 0x026c,
-	0x6808, 0x9084, 0xff00, 0x9086, 0x0800, 0x1190, 0x6904, 0x9186,
-	0x0018, 0x0118, 0x9186, 0x0014, 0x1158, 0x810f, 0x6800, 0x9084,
-	0x00ff, 0x910d, 0x615a, 0x908e, 0x0014, 0x0110, 0x908e, 0x0010,
-	0x0005, 0x6004, 0x90b2, 0x0053, 0x1a0c, 0x0db4, 0x91b6, 0x0013,
-	0x1130, 0x2008, 0x91b2, 0x0040, 0x1a04, 0xca84, 0x0092, 0x91b6,
-	0x0027, 0x0120, 0x91b6, 0x0014, 0x190c, 0x0db4, 0x2001, 0x0007,
-	0x080c, 0x61d3, 0x080c, 0x887f, 0x080c, 0x9e5f, 0x080c, 0x898b,
-	0x0005, 0xc9b9, 0xc9bb, 0xc9b9, 0xc9b9, 0xc9b9, 0xc9bb, 0xc9ca,
-	0xca7d, 0xca1c, 0xca7d, 0xca2e, 0xca7d, 0xc9ca, 0xca7d, 0xca75,
-	0xca7d, 0xca75, 0xca7d, 0xca7d, 0xc9b9, 0xc9b9, 0xc9b9, 0xc9b9,
-	0xc9b9, 0xc9b9, 0xc9b9, 0xc9b9, 0xc9b9, 0xc9b9, 0xc9b9, 0xc9bb,
-	0xc9b9, 0xca7d, 0xc9b9, 0xc9b9, 0xca7d, 0xc9b9, 0xca7a, 0xca7d,
-	0xc9b9, 0xc9b9, 0xc9b9, 0xc9b9, 0xca7d, 0xca7d, 0xc9b9, 0xca7d,
-	0xca7d, 0xc9b9, 0xc9c5, 0xc9b9, 0xc9b9, 0xc9b9, 0xc9b9, 0xca79,
-	0xca7d, 0xc9b9, 0xc9b9, 0xca7d, 0xca7d, 0xc9b9, 0xc9b9, 0xc9b9,
-	0xc9b9, 0x080c, 0x0db4, 0x080c, 0x887f, 0x080c, 0xc253, 0x6003,
-	0x0002, 0x080c, 0x898b, 0x0804, 0xca83, 0x9006, 0x080c, 0x6193,
-	0x0804, 0xca7d, 0x080c, 0x6572, 0x1904, 0xca7d, 0x9006, 0x080c,
-	0x6193, 0x6010, 0x2058, 0xb810, 0x9086, 0x00ff, 0x1140, 0x00f6,
-	0x2079, 0x1800, 0x78a4, 0x8000, 0x78a6, 0x00fe, 0x0428, 0x6010,
-	0x2058, 0xb8b0, 0x9005, 0x1178, 0x080c, 0xc23b, 0x1904, 0xca7d,
-	0x0036, 0x0046, 0xbba0, 0x2021, 0x0007, 0x080c, 0x4a91, 0x004e,
-	0x003e, 0x0804, 0xca7d, 0x080c, 0x313b, 0x1904, 0xca7d, 0x2001,
-	0x1800, 0x2004, 0x9086, 0x0002, 0x1138, 0x00f6, 0x2079, 0x1800,
-	0x78a4, 0x8000, 0x78a6, 0x00fe, 0x2001, 0x0002, 0x080c, 0x61a7,
-	0x080c, 0x887f, 0x6023, 0x0001, 0x6003, 0x0001, 0x6007, 0x0002,
-	0x080c, 0x8440, 0x080c, 0x898b, 0x6110, 0x2158, 0x2009, 0x0001,
-	0x080c, 0x804d, 0x0804, 0xca83, 0x6610, 0x2658, 0xbe04, 0x96b4,
-	0xff00, 0x8637, 0x9686, 0x0006, 0x0904, 0xca7d, 0x9686, 0x0004,
-	0x0904, 0xca7d, 0x2001, 0x0004, 0x0804, 0xca7b, 0x2001, 0x1800,
-	0x2004, 0x9086, 0x0003, 0x1158, 0x0036, 0x0046, 0x6010, 0x2058,
-	0xbba0, 0x2021, 0x0006, 0x080c, 0x4a91, 0x004e, 0x003e, 0x2001,
-	0x0006, 0x080c, 0xcaa1, 0x6610, 0x2658, 0xbe04, 0x0066, 0x96b4,
-	0xff00, 0x8637, 0x9686, 0x0006, 0x006e, 0x0168, 0x2001, 0x0006,
-	0x080c, 0x61d3, 0x9284, 0x00ff, 0x908e, 0x0007, 0x1120, 0x2001,
-	0x0006, 0x080c, 0x61a7, 0x080c, 0x6572, 0x11f8, 0x2001, 0x1836,
-	0x2004, 0xd0a4, 0x01d0, 0xbe04, 0x96b4, 0x00ff, 0x9686, 0x0006,
-	0x01a0, 0x00f6, 0x2079, 0x1800, 0x78a4, 0x8000, 0x78a6, 0x00fe,
-	0x0804, 0xca04, 0x2001, 0x0004, 0x0030, 0x2001, 0x0006, 0x0449,
-	0x0020, 0x0018, 0x0010, 0x080c, 0x61d3, 0x080c, 0x887f, 0x080c,
-	0x9e2f, 0x080c, 0x898b, 0x0005, 0x2600, 0x0002, 0xca98, 0xca98,
-	0xca98, 0xca98, 0xca98, 0xca9a, 0xca98, 0xca98, 0xca98, 0xca98,
-	0xca9a, 0xca98, 0xca98, 0xca98, 0xca9a, 0xca9a, 0xca9a, 0xca9a,
-	0x080c, 0x0db4, 0x080c, 0x887f, 0x080c, 0x9e2f, 0x080c, 0x898b,
-	0x0005, 0x0016, 0x00b6, 0x00d6, 0x6110, 0x2158, 0xb900, 0xd184,
-	0x0138, 0x080c, 0x61a7, 0x9006, 0x080c, 0x6193, 0x080c, 0x3010,
-	0x00de, 0x00be, 0x001e, 0x0005, 0x6610, 0x2658, 0xb804, 0x9084,
-	0xff00, 0x8007, 0x90b2, 0x000c, 0x1a0c, 0x0db4, 0x91b6, 0x0015,
-	0x1110, 0x003b, 0x0028, 0x91b6, 0x0016, 0x190c, 0x0db4, 0x006b,
-	0x0005, 0xa8ae, 0xa8ae, 0xa8ae, 0xa8ae, 0xcb36, 0xa8ae, 0xcb20,
-	0xcae1, 0xa8ae, 0xa8ae, 0xa8ae, 0xa8ae, 0xa8ae, 0xa8ae, 0xa8ae,
-	0xa8ae, 0xcb36, 0xa8ae, 0xcb20, 0xcb27, 0xa8ae, 0xa8ae, 0xa8ae,
-	0xa8ae, 0x00f6, 0x080c, 0x6572, 0x11d8, 0x080c, 0xc23b, 0x11c0,
-	0x6010, 0x905d, 0x01a8, 0xb8b0, 0x9005, 0x0190, 0x9006, 0x080c,
-	0x6193, 0x2001, 0x0002, 0x080c, 0x61a7, 0x6023, 0x0001, 0x6003,
-	0x0001, 0x6007, 0x0002, 0x080c, 0x8440, 0x080c, 0x898b, 0x00f0,
-	0x2011, 0x0263, 0x2204, 0x8211, 0x220c, 0x080c, 0x2670, 0x11b0,
-	0x080c, 0x6256, 0x0118, 0x080c, 0x9e2f, 0x0080, 0xb810, 0x0006,
-	0xb814, 0x0006, 0xb8b0, 0x0006, 0x080c, 0x5cff, 0x000e, 0xb8b2,
-	0x000e, 0xb816, 0x000e, 0xb812, 0x080c, 0x9e2f, 0x00fe, 0x0005,
-	0x6604, 0x96b6, 0x001e, 0x1110, 0x080c, 0x9e2f, 0x0005, 0x080c,
-	0xac94, 0x1148, 0x6003, 0x0001, 0x6007, 0x0001, 0x080c, 0x8440,
-	0x080c, 0x898b, 0x0010, 0x080c, 0x9e2f, 0x0005, 0x0804, 0x9e2f,
-	0x6004, 0x908a, 0x0053, 0x1a0c, 0x0db4, 0x080c, 0x887f, 0x080c,
-	0x9e5f, 0x080c, 0x898b, 0x0005, 0x9182, 0x0040, 0x0002, 0xcb5b,
-	0xcb5b, 0xcb5b, 0xcb5b, 0xcb5d, 0xcb5b, 0xcb5b, 0xcb5b, 0xcb5b,
-	0xcb5b, 0xcb5b, 0xcb5b, 0xcb5b, 0xcb5b, 0xcb5b, 0xcb5b, 0xcb5b,
-	0xcb5b, 0xcb5b, 0xcb5b, 0x080c, 0x0db4, 0x0096, 0x00b6, 0x00d6,
-	0x00e6, 0x00f6, 0x0046, 0x0026, 0x6210, 0x2258, 0xb8ac, 0x9005,
-	0x11a8, 0x6106, 0x2071, 0x0260, 0x7444, 0x94a4, 0xff00, 0x0904,
-	0xcbc3, 0x080c, 0xd870, 0x1170, 0x9486, 0x2000, 0x1158, 0x2009,
-	0x0001, 0x2011, 0x0200, 0x080c, 0x8236, 0x0020, 0x9026, 0x080c,
-	0xd7a5, 0x0c38, 0x080c, 0x0feb, 0x090c, 0x0db4, 0x6003, 0x0007,
-	0xa867, 0x010d, 0x9006, 0xa802, 0xa86a, 0xac8a, 0x2c00, 0xa88e,
-	0x6008, 0xa8e2, 0x6010, 0x2058, 0xb8a0, 0x7130, 0xa97a, 0x0016,
-	0xa876, 0xa87f, 0x0000, 0xa883, 0x0000, 0xa887, 0x0036, 0x080c,
-	0x68a0, 0x001e, 0x080c, 0xd870, 0x1904, 0xcc23, 0x9486, 0x2000,
-	0x1130, 0x2019, 0x0017, 0x080c, 0xd4e0, 0x0804, 0xcc23, 0x9486,
-	0x0200, 0x1120, 0x080c, 0xd47c, 0x0804, 0xcc23, 0x9486, 0x0400,
-	0x0120, 0x9486, 0x1000, 0x1904, 0xcc23, 0x2019, 0x0002, 0x080c,
-	0xd497, 0x0804, 0xcc23, 0x2069, 0x1a48, 0x6a00, 0xd284, 0x0904,
-	0xcc8d, 0x9284, 0x0300, 0x1904, 0xcc86, 0x6804, 0x9005, 0x0904,
-	0xcc6e, 0x2d78, 0x6003, 0x0007, 0x080c, 0x1004, 0x0904, 0xcc2f,
-	0x7800, 0xd08c, 0x1118, 0x7804, 0x8001, 0x7806, 0x6017, 0x0000,
-	0x2001, 0x180f, 0x2004, 0xd084, 0x1904, 0xcc91, 0x9006, 0xa802,
-	0xa867, 0x0116, 0xa86a, 0x6008, 0xa8e2, 0x2c00, 0xa87a, 0x6010,
-	0x2058, 0xb8a0, 0x7130, 0xa9b6, 0xa876, 0xb928, 0xa9ba, 0xb92c,
-	0xa9be, 0xb930, 0xa9c2, 0xb934, 0xa9c6, 0xa883, 0x003d, 0x7044,
-	0x9084, 0x0003, 0x9080, 0xcc2b, 0x2005, 0xa87e, 0x20a9, 0x000a,
-	0x2001, 0x0270, 0xaa5c, 0x9290, 0x0021, 0x2009, 0x0205, 0x200b,
-	0x0080, 0x20e1, 0x0000, 0xab60, 0x23e8, 0x2098, 0x22a0, 0x4003,
-	0x200b, 0x0000, 0x2001, 0x027a, 0x200c, 0xa9b2, 0x8000, 0x200c,
-	0xa9ae, 0x080c, 0x68a0, 0x002e, 0x004e, 0x00fe, 0x00ee, 0x00de,
-	0x00be, 0x009e, 0x0005, 0x0000, 0x0080, 0x0040, 0x0000, 0x2001,
-	0x1810, 0x2004, 0xd084, 0x0120, 0x080c, 0x0feb, 0x1904, 0xcbd8,
-	0x6017, 0xf100, 0x6003, 0x0001, 0x6007, 0x0041, 0x080c, 0x83f8,
-	0x080c, 0x898b, 0x0c00, 0x2069, 0x0260, 0x6848, 0x9084, 0xff00,
-	0x9086, 0x1200, 0x1198, 0x686c, 0x9084, 0x00ff, 0x0016, 0x6114,
-	0x918c, 0xf700, 0x910d, 0x6116, 0x001e, 0x6003, 0x0001, 0x6007,
-	0x0043, 0x080c, 0x83f8, 0x080c, 0x898b, 0x0828, 0x6868, 0x602e,
-	0x686c, 0x6032, 0x6017, 0xf200, 0x6003, 0x0001, 0x6007, 0x0041,
-	0x080c, 0x83f8, 0x080c, 0x898b, 0x0804, 0xcc23, 0x2001, 0x180e,
-	0x2004, 0xd0ec, 0x0120, 0x2011, 0x8049, 0x080c, 0x48f4, 0x6017,
-	0xf300, 0x0010, 0x6017, 0xf100, 0x6003, 0x0001, 0x6007, 0x0041,
-	0x080c, 0x83f8, 0x080c, 0x898b, 0x0804, 0xcc23, 0x6017, 0xf500,
-	0x0c98, 0x6017, 0xf600, 0x0804, 0xcc43, 0x6017, 0xf200, 0x0804,
-	0xcc43, 0xa867, 0x0146, 0xa86b, 0x0000, 0x6008, 0xa886, 0x2c00,
-	0xa87a, 0x7044, 0x9084, 0x0003, 0x9080, 0xcc2b, 0x2005, 0xa87e,
-	0x2928, 0x6010, 0x2058, 0xb8a0, 0xa876, 0xb828, 0xa88a, 0xb82c,
-	0xa88e, 0xb830, 0xa892, 0xb834, 0xa896, 0xa883, 0x003d, 0x2009,
-	0x0205, 0x2104, 0x9085, 0x0080, 0x200a, 0x20e1, 0x0000, 0x2011,
-	0x0210, 0x2214, 0x9294, 0x0fff, 0xaaa2, 0x9282, 0x0111, 0x1a0c,
-	0x0db4, 0x8210, 0x821c, 0x2001, 0x026c, 0x2098, 0xa860, 0x20e8,
-	0xa85c, 0x9080, 0x0029, 0x20a0, 0x2011, 0xcd0d, 0x2041, 0x0001,
-	0x223d, 0x9784, 0x00ff, 0x9322, 0x1208, 0x2300, 0x20a8, 0x4003,
-	0x931a, 0x0530, 0x8210, 0xd7fc, 0x1130, 0x8d68, 0x2d0a, 0x2001,
-	0x0260, 0x2098, 0x0c68, 0x2950, 0x080c, 0x1004, 0x0170, 0x2900,
-	0xb002, 0xa867, 0x0147, 0xa86b, 0x0000, 0xa860, 0x20e8, 0xa85c,
-	0x9080, 0x001b, 0x20a0, 0x8840, 0x08d8, 0x2548, 0xa800, 0x902d,
-	0x0118, 0x080c, 0x101d, 0x0cc8, 0x080c, 0x101d, 0x0804, 0xcc2f,
-	0x2548, 0x8847, 0x9885, 0x0046, 0xa866, 0x2009, 0x0205, 0x200b,
-	0x0000, 0x080c, 0xd50f, 0x0804, 0xcc23, 0x8010, 0x0004, 0x801a,
-	0x0006, 0x8018, 0x0008, 0x8016, 0x000a, 0x8014, 0x9186, 0x0013,
-	0x1160, 0x6004, 0x908a, 0x0054, 0x1a0c, 0x0db4, 0x9082, 0x0040,
-	0x0a0c, 0x0db4, 0x2008, 0x0804, 0xcdbf, 0x9186, 0x0051, 0x0108,
-	0x00c0, 0x2001, 0x0109, 0x2004, 0xd084, 0x0904, 0xcd6f, 0x0126,
-	0x2091, 0x2800, 0x0006, 0x0016, 0x0026, 0x080c, 0x82e4, 0x002e,
-	0x001e, 0x000e, 0x012e, 0x6000, 0x9086, 0x0002, 0x1580, 0x0804,
-	0xce08, 0x9186, 0x0027, 0x0530, 0x9186, 0x0048, 0x0128, 0x9186,
-	0x0014, 0x0500, 0x190c, 0x0db4, 0x2001, 0x0109, 0x2004, 0xd084,
-	0x01f0, 0x00c6, 0x0126, 0x2091, 0x2800, 0x00c6, 0x2061, 0x0100,
-	0x0006, 0x0016, 0x0026, 0x080c, 0x82e4, 0x002e, 0x001e, 0x000e,
-	0x00ce, 0x012e, 0x00ce, 0x6000, 0x9086, 0x0004, 0x190c, 0x0db4,
-	0x0804, 0xceeb, 0x6004, 0x9082, 0x0040, 0x2008, 0x001a, 0x080c,
-	0x9ec4, 0x0005, 0xcd86, 0xcd88, 0xcd88, 0xcdaf, 0xcd86, 0xcd86,
-	0xcd86, 0xcd86, 0xcd86, 0xcd86, 0xcd86, 0xcd86, 0xcd86, 0xcd86,
-	0xcd86, 0xcd86, 0xcd86, 0xcd86, 0xcd86, 0xcd86, 0x080c, 0x0db4,
-	0x080c, 0x887f, 0x080c, 0x898b, 0x0036, 0x0096, 0x6014, 0x904d,
-	0x01d8, 0x080c, 0xbb3b, 0x01c0, 0x6003, 0x0002, 0x6010, 0x00b6,
-	0x2058, 0xb800, 0x00be, 0xd0bc, 0x1178, 0x2019, 0x0004, 0x080c,
-	0xd50f, 0x6017, 0x0000, 0x6018, 0x9005, 0x1120, 0x2001, 0x195f,
-	0x2004, 0x601a, 0x6003, 0x0007, 0x009e, 0x003e, 0x0005, 0x0096,
-	0x080c, 0x887f, 0x080c, 0x898b, 0x080c, 0xbb3b, 0x0120, 0x6014,
-	0x2048, 0x080c, 0x101d, 0x080c, 0x9e5f, 0x009e, 0x0005, 0x0002,
-	0xcdd4, 0xcdeb, 0xcdd6, 0xce02, 0xcdd4, 0xcdd4, 0xcdd4, 0xcdd4,
-	0xcdd4, 0xcdd4, 0xcdd4, 0xcdd4, 0xcdd4, 0xcdd4, 0xcdd4, 0xcdd4,
-	0xcdd4, 0xcdd4, 0xcdd4, 0xcdd4, 0x080c, 0x0db4, 0x0096, 0x080c,
-	0x887f, 0x6014, 0x2048, 0xa87c, 0xd0b4, 0x0138, 0x6003, 0x0007,
-	0x2009, 0x0043, 0x080c, 0x9ea9, 0x0010, 0x6003, 0x0004, 0x080c,
-	0x898b, 0x009e, 0x0005, 0x080c, 0x887f, 0x080c, 0xbb3b, 0x0138,
-	0x6114, 0x0096, 0x2148, 0xa97c, 0x009e, 0xd1ec, 0x1138, 0x080c,
-	0x820b, 0x080c, 0x9e2f, 0x080c, 0x898b, 0x0005, 0x080c, 0xd769,
-	0x0db0, 0x0cc8, 0x080c, 0x887f, 0x2009, 0x0041, 0x0804, 0xcf73,
-	0x9182, 0x0040, 0x0002, 0xce1f, 0xce21, 0xce1f, 0xce1f, 0xce1f,
-	0xce1f, 0xce1f, 0xce1f, 0xce1f, 0xce1f, 0xce1f, 0xce1f, 0xce1f,
-	0xce1f, 0xce1f, 0xce1f, 0xce1f, 0xce22, 0xce1f, 0xce1f, 0x080c,
-	0x0db4, 0x0005, 0x00d6, 0x080c, 0x820b, 0x00de, 0x080c, 0xd7c1,
-	0x080c, 0x9e2f, 0x0005, 0x9182, 0x0040, 0x0002, 0xce42, 0xce42,
-	0xce42, 0xce42, 0xce42, 0xce42, 0xce42, 0xce42, 0xce42, 0xce44,
-	0xceb3, 0xce42, 0xce42, 0xce42, 0xce42, 0xceb3, 0xce42, 0xce42,
-	0xce42, 0xce42, 0x080c, 0x0db4, 0x2001, 0x0105, 0x2004, 0x9084,
-	0x1800, 0x01c8, 0x2001, 0x0132, 0x200c, 0x2001, 0x0131, 0x2004,
-	0x9105, 0x1904, 0xceb3, 0x2009, 0x180c, 0x2104, 0xd0d4, 0x0904,
-	0xceb3, 0xc0d4, 0x200a, 0x2009, 0x0105, 0x2104, 0x9084, 0xe7fd,
-	0x9085, 0x0010, 0x200a, 0x2001, 0x187b, 0x2004, 0xd0e4, 0x1528,
-	0x603b, 0x0000, 0x080c, 0x893b, 0x6014, 0x0096, 0x2048, 0xa87c,
-	0xd0fc, 0x0188, 0x908c, 0x0003, 0x918e, 0x0002, 0x0508, 0x2001,
-	0x180c, 0x2004, 0xd0d4, 0x11e0, 0x080c, 0x8a68, 0x2009, 0x0041,
-	0x009e, 0x0804, 0xcf73, 0x080c, 0x8a68, 0x6003, 0x0007, 0x601b,
-	0x0000, 0x080c, 0x820b, 0x009e, 0x0005, 0x2001, 0x0100, 0x2004,
-	0x9082, 0x0005, 0x0aa8, 0x2001, 0x011f, 0x2004, 0x603a, 0x0890,
-	0x2001, 0x180c, 0x200c, 0xc1d4, 0x2102, 0xd1cc, 0x0110, 0x080c,
-	0x2a84, 0x080c, 0x8a68, 0x6014, 0x2048, 0xa97c, 0xd1ec, 0x1130,
-	0x080c, 0x820b, 0x080c, 0x9e2f, 0x009e, 0x0005, 0x080c, 0xd769,
-	0x0db8, 0x009e, 0x0005, 0x2001, 0x180c, 0x200c, 0xc1d4, 0x2102,
-	0x0036, 0x080c, 0x893b, 0x080c, 0x8a68, 0x6014, 0x0096, 0x2048,
-	0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x0188, 0xa87c,
-	0x9084, 0x0003, 0x9086, 0x0002, 0x0140, 0xa8ac, 0x6330, 0x931a,
-	0x6332, 0xa8b0, 0x632c, 0x931b, 0x632e, 0x6003, 0x0002, 0x0080,
-	0x2019, 0x0004, 0x080c, 0xd50f, 0x6018, 0x9005, 0x1128, 0x2001,
-	0x195f, 0x2004, 0x8003, 0x601a, 0x6017, 0x0000, 0x6003, 0x0007,
-	0x009e, 0x003e, 0x0005, 0x9182, 0x0040, 0x0002, 0xcf02, 0xcf02,
-	0xcf02, 0xcf02, 0xcf02, 0xcf02, 0xcf02, 0xcf02, 0xcf04, 0xcf02,
-	0xcf02, 0xcf02, 0xcf02, 0xcf02, 0xcf02, 0xcf02, 0xcf02, 0xcf02,
-	0xcf02, 0xcf4f, 0x080c, 0x0db4, 0x6014, 0x0096, 0x2048, 0xa834,
-	0xaa38, 0x6110, 0x00b6, 0x2158, 0xb900, 0x00be, 0xd1bc, 0x1190,
-	0x920d, 0x1518, 0xa87c, 0xd0fc, 0x0128, 0x2009, 0x0041, 0x009e,
-	0x0804, 0xcf73, 0x6003, 0x0007, 0x601b, 0x0000, 0x080c, 0x820b,
-	0x009e, 0x0005, 0x6124, 0xd1f4, 0x1d58, 0x0006, 0x0046, 0xacac,
-	0x9422, 0xa9b0, 0x2200, 0x910b, 0x6030, 0x9420, 0x6432, 0x602c,
-	0x9109, 0x612e, 0x004e, 0x000e, 0x08d8, 0x6110, 0x00b6, 0x2158,
-	0xb900, 0x00be, 0xd1bc, 0x1178, 0x2009, 0x180e, 0x210c, 0xd19c,
-	0x0118, 0x6003, 0x0007, 0x0010, 0x6003, 0x0006, 0x00e9, 0x080c,
-	0x820d, 0x009e, 0x0005, 0x6003, 0x0002, 0x009e, 0x0005, 0x6024,
-	0xd0f4, 0x0128, 0x080c, 0x1511, 0x1904, 0xcf04, 0x0005, 0x6014,
-	0x0096, 0x2048, 0xa834, 0xa938, 0x009e, 0x9105, 0x1120, 0x080c,
-	0x1511, 0x1904, 0xcf04, 0x0005, 0xd2fc, 0x0140, 0x8002, 0x8000,
-	0x8212, 0x9291, 0x0000, 0x2009, 0x0009, 0x0010, 0x2009, 0x0015,
-	0xaa9a, 0xa896, 0x0005, 0x9182, 0x0040, 0x0208, 0x0062, 0x9186,
-	0x0013, 0x0120, 0x9186, 0x0014, 0x190c, 0x0db4, 0x6024, 0xd0dc,
-	0x090c, 0x0db4, 0x0005, 0xcf97, 0xcfa3, 0xcfaf, 0xcfbb, 0xcf97,
-	0xcf97, 0xcf97, 0xcf97, 0xcf9e, 0xcf99, 0xcf99, 0xcf97, 0xcf97,
-	0xcf97, 0xcf97, 0xcf99, 0xcf97, 0xcf99, 0xcf97, 0xcf9e, 0x080c,
-	0x0db4, 0x6024, 0xd0dc, 0x090c, 0x0db4, 0x0005, 0x6014, 0x9005,
-	0x190c, 0x0db4, 0x0005, 0x6003, 0x0001, 0x6106, 0x080c, 0x83f8,
-	0x0126, 0x2091, 0x8000, 0x080c, 0x898b, 0x012e, 0x0005, 0x6003,
-	0x0001, 0x6106, 0x080c, 0x83f8, 0x0126, 0x2091, 0x8000, 0x080c,
-	0x898b, 0x012e, 0x0005, 0x6003, 0x0003, 0x6106, 0x2c10, 0x080c,
-	0x1a69, 0x0126, 0x2091, 0x8000, 0x080c, 0x845d, 0x080c, 0x8a68,
-	0x012e, 0x0005, 0x0126, 0x2091, 0x8000, 0x0036, 0x0096, 0x9182,
-	0x0040, 0x0023, 0x009e, 0x003e, 0x012e, 0x0005, 0xcfea, 0xcfec,
-	0xcffe, 0xd018, 0xcfea, 0xcfea, 0xcfea, 0xcfea, 0xcfea, 0xcfea,
-	0xcfea, 0xcfea, 0xcfea, 0xcfea, 0xcfea, 0xcfea, 0xcfea, 0xcfea,
-	0xcfea, 0xcfea, 0x080c, 0x0db4, 0x6014, 0x2048, 0xa87c, 0xd0fc,
-	0x01f8, 0x909c, 0x0003, 0x939e, 0x0003, 0x01d0, 0x6003, 0x0001,
-	0x6106, 0x080c, 0x83f8, 0x080c, 0x898b, 0x0470, 0x6014, 0x2048,
-	0xa87c, 0xd0fc, 0x0168, 0x909c, 0x0003, 0x939e, 0x0003, 0x0140,
-	0x6003, 0x0001, 0x6106, 0x080c, 0x83f8, 0x080c, 0x898b, 0x00e0,
-	0x901e, 0x6316, 0x631a, 0x2019, 0x0004, 0x080c, 0xd50f, 0x00a0,
-	0x6014, 0x2048, 0xa87c, 0xd0fc, 0x0d98, 0x909c, 0x0003, 0x939e,
-	0x0003, 0x0d70, 0x6003, 0x0003, 0x6106, 0x2c10, 0x080c, 0x1a69,
-	0x080c, 0x845d, 0x080c, 0x8a68, 0x0005, 0x080c, 0x887f, 0x6114,
-	0x81ff, 0x0158, 0x0096, 0x2148, 0x080c, 0xd80d, 0x0036, 0x2019,
-	0x0029, 0x080c, 0xd50f, 0x003e, 0x009e, 0x080c, 0x9e5f, 0x080c,
-	0x898b, 0x0005, 0x080c, 0x893b, 0x6114, 0x81ff, 0x0158, 0x0096,
-	0x2148, 0x080c, 0xd80d, 0x0036, 0x2019, 0x0029, 0x080c, 0xd50f,
-	0x003e, 0x009e, 0x080c, 0x9e5f, 0x080c, 0x8a68, 0x0005, 0x9182,
-	0x0085, 0x0002, 0xd069, 0xd067, 0xd067, 0xd075, 0xd067, 0xd067,
-	0xd067, 0xd067, 0xd067, 0xd067, 0xd067, 0xd067, 0xd067, 0x080c,
-	0x0db4, 0x6003, 0x000b, 0x6106, 0x080c, 0x83f8, 0x0126, 0x2091,
-	0x8000, 0x080c, 0x898b, 0x012e, 0x0005, 0x0026, 0x00e6, 0x080c,
-	0xd760, 0x0118, 0x080c, 0x9e2f, 0x0450, 0x2071, 0x0260, 0x7224,
-	0x6216, 0x2001, 0x180e, 0x2004, 0xd0e4, 0x0150, 0x6010, 0x00b6,
-	0x2058, 0xbca0, 0x00be, 0x2c00, 0x2011, 0x014e, 0x080c, 0xa14f,
-	0x7220, 0x080c, 0xd3b5, 0x0118, 0x6007, 0x0086, 0x0040, 0x6007,
-	0x0087, 0x7224, 0x9296, 0xffff, 0x1110, 0x6007, 0x0086, 0x6003,
-	0x0001, 0x080c, 0x83f8, 0x080c, 0x898b, 0x080c, 0x8a68, 0x00ee,
-	0x002e, 0x0005, 0x9186, 0x0013, 0x1160, 0x6004, 0x908a, 0x0085,
-	0x0a0c, 0x0db4, 0x908a, 0x0092, 0x1a0c, 0x0db4, 0x9082, 0x0085,
-	0x00a2, 0x9186, 0x0027, 0x0130, 0x9186, 0x0014, 0x0118, 0x080c,
-	0x9ec4, 0x0050, 0x2001, 0x0007, 0x080c, 0x61d3, 0x080c, 0x887f,
-	0x080c, 0x9e5f, 0x080c, 0x898b, 0x0005, 0xd0da, 0xd0dc, 0xd0dc,
-	0xd0da, 0xd0da, 0xd0da, 0xd0da, 0xd0da, 0xd0da, 0xd0da, 0xd0da,
-	0xd0da, 0xd0da, 0x080c, 0x0db4, 0x080c, 0x887f, 0x080c, 0x9e5f,
-	0x080c, 0x898b, 0x0005, 0x9182, 0x0085, 0x0a0c, 0x0db4, 0x9182,
-	0x0092, 0x1a0c, 0x0db4, 0x9182, 0x0085, 0x0002, 0xd0fb, 0xd0fb,
-	0xd0fb, 0xd0fd, 0xd0fb, 0xd0fb, 0xd0fb, 0xd0fb, 0xd0fb, 0xd0fb,
-	0xd0fb, 0xd0fb, 0xd0fb, 0x080c, 0x0db4, 0x0005, 0x9186, 0x0013,
-	0x0148, 0x9186, 0x0014, 0x0130, 0x9186, 0x0027, 0x0118, 0x080c,
-	0x9ec4, 0x0030, 0x080c, 0x887f, 0x080c, 0x9e5f, 0x080c, 0x898b,
-	0x0005, 0x0036, 0x080c, 0xd7c1, 0x6043, 0x0000, 0x2019, 0x000b,
-	0x0031, 0x6023, 0x0006, 0x6003, 0x0007, 0x003e, 0x0005, 0x0126,
-	0x0036, 0x2091, 0x8000, 0x0086, 0x2c40, 0x0096, 0x904e, 0x080c,
-	0x97a4, 0x009e, 0x008e, 0x1550, 0x0076, 0x2c38, 0x080c, 0x984f,
-	0x007e, 0x1520, 0x6000, 0x9086, 0x0000, 0x0500, 0x6020, 0x9086,
-	0x0007, 0x01e0, 0x0096, 0x601c, 0xd084, 0x0140, 0x080c, 0xd7c1,
-	0x080c, 0xc253, 0x080c, 0x191f, 0x6023, 0x0007, 0x6014, 0x2048,
-	0x080c, 0xbb3b, 0x0110, 0x080c, 0xd50f, 0x009e, 0x6017, 0x0000,
-	0x080c, 0xd7c1, 0x6023, 0x0007, 0x080c, 0xc253, 0x003e, 0x012e,
-	0x0005, 0x00f6, 0x00c6, 0x00b6, 0x0036, 0x0156, 0x2079, 0x0260,
-	0x7938, 0x783c, 0x080c, 0x2670, 0x15c8, 0x0016, 0x00c6, 0x080c,
-	0x6256, 0x1590, 0x001e, 0x00c6, 0x2160, 0x080c, 0xc250, 0x00ce,
-	0x002e, 0x0026, 0x0016, 0x2019, 0x0029, 0x080c, 0x9915, 0x080c,
-	0x8582, 0x0076, 0x903e, 0x080c, 0x8470, 0x007e, 0x001e, 0x0076,
-	0x903e, 0x080c, 0xd2d5, 0x007e, 0x0026, 0xba04, 0x9294, 0xff00,
-	0x8217, 0x9286, 0x0006, 0x0118, 0x9286, 0x0004, 0x1118, 0xbaa0,
-	0x080c, 0x30a4, 0x002e, 0xbcb0, 0x001e, 0x080c, 0x5cff, 0xbe12,
-	0xbd16, 0xbcb2, 0x9006, 0x0010, 0x00ce, 0x001e, 0x015e, 0x003e,
-	0x00be, 0x00ce, 0x00fe, 0x0005, 0x00c6, 0x00d6, 0x00b6, 0x0016,
-	0x2009, 0x1823, 0x2104, 0x9086, 0x0074, 0x1904, 0xd1fd, 0x2069,
-	0x0260, 0x6944, 0x9182, 0x0100, 0x06e0, 0x6940, 0x9184, 0x8000,
-	0x0904, 0xd1fa, 0x2001, 0x1954, 0x2004, 0x9005, 0x1140, 0x6010,
-	0x2058, 0xb8b0, 0x9005, 0x0118, 0x9184, 0x0800, 0x0598, 0x6948,
-	0x918a, 0x0001, 0x0648, 0x080c, 0xd875, 0x0118, 0x6978, 0xd1fc,
-	0x11b8, 0x2009, 0x0205, 0x200b, 0x0001, 0x693c, 0x81ff, 0x1198,
-	0x6944, 0x9182, 0x0100, 0x02a8, 0x6940, 0x81ff, 0x1178, 0x6948,
-	0x918a, 0x0001, 0x0288, 0x6950, 0x918a, 0x0001, 0x0298, 0x00d0,
-	0x6017, 0x0100, 0x00a0, 0x6017, 0x0300, 0x0088, 0x6017, 0x0500,
-	0x0070, 0x6017, 0x0700, 0x0058, 0x6017, 0x0900, 0x0040, 0x6017,
-	0x0b00, 0x0028, 0x6017, 0x0f00, 0x0010, 0x6017, 0x2d00, 0x9085,
-	0x0001, 0x0008, 0x9006, 0x001e, 0x00be, 0x00de, 0x00ce, 0x0005,
-	0x00c6, 0x00b6, 0x0026, 0x0036, 0x0156, 0x6210, 0x2258, 0xbb04,
-	0x9394, 0x00ff, 0x9286, 0x0006, 0x0180, 0x9286, 0x0004, 0x0168,
-	0x9394, 0xff00, 0x8217, 0x9286, 0x0006, 0x0138, 0x9286, 0x0004,
-	0x0120, 0x080c, 0x6265, 0x0804, 0xd264, 0x2011, 0x0276, 0x20a9,
-	0x0004, 0x0096, 0x2b48, 0x2019, 0x000a, 0x080c, 0xae1c, 0x009e,
-	0x15a0, 0x2011, 0x027a, 0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019,
-	0x0006, 0x080c, 0xae1c, 0x009e, 0x1540, 0x0046, 0x0016, 0xbaa0,
-	0x2220, 0x9006, 0x2009, 0x185c, 0x210c, 0x0038, 0x2009, 0x0029,
-	0x080c, 0xd564, 0xb800, 0xc0e5, 0xb802, 0x2019, 0x0029, 0x080c,
-	0x8582, 0x0076, 0x2039, 0x0000, 0x080c, 0x8470, 0x2c08, 0x080c,
-	0xd2d5, 0x007e, 0x2001, 0x0007, 0x080c, 0x61d3, 0x2001, 0x0007,
-	0x080c, 0x61a7, 0x001e, 0x004e, 0x9006, 0x015e, 0x003e, 0x002e,
-	0x00be, 0x00ce, 0x0005, 0x00d6, 0x2069, 0x026e, 0x6800, 0x9086,
-	0x0800, 0x0118, 0x6017, 0x0000, 0x0008, 0x9006, 0x00de, 0x0005,
-	0x00b6, 0x00f6, 0x0016, 0x0026, 0x0036, 0x0156, 0x2079, 0x026c,
-	0x7930, 0x7834, 0x080c, 0x2670, 0x11d0, 0x080c, 0x6256, 0x11b8,
-	0x2011, 0x0270, 0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019, 0x000a,
-	0x080c, 0xae1c, 0x009e, 0x1158, 0x2011, 0x0274, 0x20a9, 0x0004,
-	0x0096, 0x2b48, 0x2019, 0x0006, 0x080c, 0xae1c, 0x009e, 0x015e,
-	0x003e, 0x002e, 0x001e, 0x00fe, 0x00be, 0x0005, 0x00b6, 0x0006,
-	0x0016, 0x0026, 0x0036, 0x0156, 0x2011, 0x0263, 0x2204, 0x8211,
-	0x220c, 0x080c, 0x2670, 0x11d0, 0x080c, 0x6256, 0x11b8, 0x2011,
-	0x0276, 0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019, 0x000a, 0x080c,
-	0xae1c, 0x009e, 0x1158, 0x2011, 0x027a, 0x20a9, 0x0004, 0x0096,
-	0x2b48, 0x2019, 0x0006, 0x080c, 0xae1c, 0x009e, 0x015e, 0x003e,
-	0x002e, 0x001e, 0x000e, 0x00be, 0x0005, 0x00e6, 0x00c6, 0x0086,
-	0x0076, 0x0066, 0x0056, 0x0046, 0x0026, 0x0126, 0x2091, 0x8000,
-	0x2740, 0x2029, 0x19c8, 0x252c, 0x2021, 0x19ce, 0x2424, 0x2061,
-	0x1cd0, 0x2071, 0x1800, 0x7650, 0x7070, 0x81ff, 0x0150, 0x0006,
-	0x9186, 0x1a87, 0x000e, 0x0128, 0x8001, 0x9602, 0x1a04, 0xd36e,
-	0x0018, 0x9606, 0x0904, 0xd36e, 0x2100, 0x9c06, 0x0904, 0xd365,
-	0x080c, 0xd5a5, 0x1904, 0xd365, 0x080c, 0xd892, 0x0904, 0xd365,
-	0x080c, 0xd595, 0x0904, 0xd365, 0x6720, 0x9786, 0x0001, 0x1148,
-	0x080c, 0x313b, 0x0904, 0xd389, 0x6004, 0x9086, 0x0000, 0x1904,
-	0xd389, 0x9786, 0x0004, 0x0904, 0xd389, 0x9786, 0x0007, 0x0904,
-	0xd365, 0x2500, 0x9c06, 0x0904, 0xd365, 0x2400, 0x9c06, 0x05e8,
-	0x88ff, 0x0118, 0x6054, 0x9906, 0x15c0, 0x0096, 0x6000, 0x9086,
-	0x0004, 0x1120, 0x0016, 0x080c, 0x191f, 0x001e, 0x9786, 0x000a,
-	0x0148, 0x080c, 0xbd41, 0x1130, 0x080c, 0xa7cd, 0x009e, 0x080c,
-	0x9e5f, 0x0418, 0x6014, 0x2048, 0x080c, 0xbb3b, 0x01d8, 0x9786,
-	0x0003, 0x1570, 0xa867, 0x0103, 0xa87c, 0xd0cc, 0x0130, 0x0096,
-	0xa878, 0x2048, 0x080c, 0x0f9d, 0x009e, 0xab7a, 0xa877, 0x0000,
-	0x080c, 0xd80d, 0x0016, 0x080c, 0xbe2f, 0x080c, 0x6893, 0x001e,
-	0x080c, 0xbd24, 0x009e, 0x080c, 0x9e5f, 0x9ce0, 0x0018, 0x2001,
-	0x1819, 0x2004, 0x9c02, 0x1210, 0x0804, 0xd2e9, 0x012e, 0x002e,
-	0x004e, 0x005e, 0x006e, 0x007e, 0x008e, 0x00ce, 0x00ee, 0x0005,
-	0x9786, 0x0006, 0x1150, 0x9386, 0x0005, 0x0128, 0x080c, 0xd80d,
-	0x080c, 0xd50f, 0x08f8, 0x009e, 0x0c00, 0x9786, 0x000a, 0x0920,
-	0x0808, 0x81ff, 0x09d0, 0x9180, 0x0001, 0x2004, 0x9086, 0x0018,
-	0x0130, 0x9180, 0x0001, 0x2004, 0x9086, 0x002d, 0x1970, 0x6000,
-	0x9086, 0x0002, 0x1950, 0x080c, 0xbd30, 0x0130, 0x080c, 0xbd41,
-	0x1920, 0x080c, 0xa7cd, 0x0038, 0x080c, 0x3010, 0x080c, 0xbd41,
-	0x1110, 0x080c, 0xa7cd, 0x080c, 0x9e5f, 0x0804, 0xd365, 0xa864,
-	0x9084, 0x00ff, 0x9086, 0x0039, 0x0005, 0x00c6, 0x00e6, 0x0016,
-	0x2c08, 0x2170, 0x9006, 0x080c, 0xd536, 0x001e, 0x0120, 0x6020,
-	0x9084, 0x000f, 0x001b, 0x00ee, 0x00ce, 0x0005, 0xd3d4, 0xd3d4,
-	0xd3d4, 0xd3d4, 0xd3d4, 0xd3d4, 0xd3d6, 0xd3d4, 0xd3d4, 0xd3d4,
-	0xd3d4, 0x9e5f, 0x9e5f, 0xd3d4, 0x9006, 0x0005, 0x0036, 0x0046,
-	0x0016, 0x7010, 0x00b6, 0x2058, 0xbca0, 0x00be, 0x2c00, 0x2009,
-	0x0020, 0x080c, 0xd564, 0x001e, 0x004e, 0x2019, 0x0002, 0x080c,
-	0xd11f, 0x003e, 0x9085, 0x0001, 0x0005, 0x0096, 0x080c, 0xbb3b,
-	0x0140, 0x6014, 0x904d, 0x080c, 0xb75c, 0x687b, 0x0005, 0x080c,
-	0x68a0, 0x009e, 0x080c, 0x9e5f, 0x9085, 0x0001, 0x0005, 0x2001,
-	0x0001, 0x080c, 0x6193, 0x0156, 0x0016, 0x0026, 0x0036, 0x20a9,
-	0x0004, 0x2019, 0x1805, 0x2011, 0x0276, 0x080c, 0xae08, 0x003e,
-	0x002e, 0x001e, 0x015e, 0x9005, 0x0005, 0x00f6, 0x00e6, 0x00c6,
-	0x0086, 0x0076, 0x0066, 0x00b6, 0x0126, 0x2091, 0x8000, 0x2740,
-	0x2061, 0x1cd0, 0x2079, 0x0001, 0x8fff, 0x0904, 0xd46f, 0x2071,
-	0x1800, 0x7650, 0x7070, 0x8001, 0x9602, 0x1a04, 0xd46f, 0x88ff,
-	0x0120, 0x2800, 0x9c06, 0x1590, 0x2078, 0x080c, 0xd595, 0x0570,
-	0x2400, 0x9c06, 0x0558, 0x6720, 0x9786, 0x0006, 0x1538, 0x9786,
-	0x0007, 0x0520, 0x88ff, 0x1140, 0x6010, 0x9b06, 0x11f8, 0x85ff,
-	0x0118, 0x6054, 0x9106, 0x11d0, 0x0096, 0x601c, 0xd084, 0x0140,
-	0x080c, 0xd7c1, 0x080c, 0xc253, 0x080c, 0x191f, 0x6023, 0x0007,
-	0x6014, 0x2048, 0x080c, 0xbb3b, 0x0120, 0x0046, 0x080c, 0xd50f,
-	0x004e, 0x009e, 0x080c, 0x9e5f, 0x88ff, 0x1198, 0x9ce0, 0x0018,
-	0x2001, 0x1819, 0x2004, 0x9c02, 0x1210, 0x0804, 0xd424, 0x9006,
-	0x012e, 0x00be, 0x006e, 0x007e, 0x008e, 0x00ce, 0x00ee, 0x00fe,
-	0x0005, 0x98c5, 0x0001, 0x0ca0, 0x00b6, 0x0076, 0x0056, 0x0086,
-	0x9046, 0x2029, 0x0001, 0x2c20, 0x2019, 0x0002, 0x6210, 0x2258,
-	0x0096, 0x904e, 0x080c, 0x97a4, 0x009e, 0x008e, 0x903e, 0x080c,
-	0x984f, 0x080c, 0xd415, 0x005e, 0x007e, 0x00be, 0x0005, 0x00b6,
-	0x0046, 0x0056, 0x0076, 0x00c6, 0x0156, 0x2c20, 0x2128, 0x20a9,
-	0x007f, 0x900e, 0x0016, 0x0036, 0x080c, 0x6256, 0x1190, 0x0056,
-	0x0086, 0x9046, 0x2508, 0x2029, 0x0001, 0x0096, 0x904e, 0x080c,
-	0x97a4, 0x009e, 0x008e, 0x903e, 0x080c, 0x984f, 0x080c, 0xd415,
-	0x005e, 0x003e, 0x001e, 0x8108, 0x1f04, 0xd4a2, 0x015e, 0x00ce,
-	0x007e, 0x005e, 0x004e, 0x00be, 0x0005, 0x00b6, 0x0076, 0x0056,
-	0x6210, 0x2258, 0x0086, 0x9046, 0x2029, 0x0001, 0x2019, 0x0048,
-	0x0096, 0x904e, 0x080c, 0x97a4, 0x009e, 0x008e, 0x903e, 0x080c,
-	0x984f, 0x2c20, 0x080c, 0xd415, 0x005e, 0x007e, 0x00be, 0x0005,
-	0x00b6, 0x0046, 0x0056, 0x0076, 0x00c6, 0x0156, 0x2c20, 0x20a9,
-	0x0800, 0x900e, 0x0016, 0x0036, 0x080c, 0x6256, 0x11a0, 0x0086,
-	0x9046, 0x2828, 0x0046, 0x2021, 0x0001, 0x080c, 0xd7a5, 0x004e,
-	0x0096, 0x904e, 0x080c, 0x97a4, 0x009e, 0x008e, 0x903e, 0x080c,
-	0x984f, 0x080c, 0xd415, 0x003e, 0x001e, 0x8108, 0x1f04, 0xd4ea,
-	0x015e, 0x00ce, 0x007e, 0x005e, 0x004e, 0x00be, 0x0005, 0x0016,
-	0x00f6, 0x080c, 0xbb39, 0x0198, 0xa864, 0x9084, 0x00ff, 0x9086,
-	0x0046, 0x0180, 0xa800, 0x907d, 0x0138, 0xa803, 0x0000, 0xab82,
-	0x080c, 0x68a0, 0x2f48, 0x0cb0, 0xab82, 0x080c, 0x68a0, 0x00fe,
-	0x001e, 0x0005, 0xa800, 0x907d, 0x0130, 0xa803, 0x0000, 0x080c,
-	0x68a0, 0x2f48, 0x0cb8, 0x080c, 0x68a0, 0x0c88, 0x00e6, 0x0046,
-	0x0036, 0x2061, 0x1cd0, 0x9005, 0x1138, 0x2071, 0x1800, 0x7450,
-	0x7070, 0x8001, 0x9402, 0x12d8, 0x2100, 0x9c06, 0x0168, 0x6000,
-	0x9086, 0x0000, 0x0148, 0x6008, 0x9206, 0x1130, 0x6010, 0x91a0,
-	0x0004, 0x2424, 0x9406, 0x0140, 0x9ce0, 0x0018, 0x2001, 0x1819,
-	0x2004, 0x9c02, 0x1220, 0x0c40, 0x9085, 0x0001, 0x0008, 0x9006,
-	0x003e, 0x004e, 0x00ee, 0x0005, 0x0096, 0x0006, 0x080c, 0x0feb,
-	0x000e, 0x090c, 0x0db4, 0xaae2, 0xa867, 0x010d, 0xa88e, 0x0026,
-	0x2010, 0x080c, 0xbb29, 0x2001, 0x0000, 0x0120, 0x2200, 0x9080,
-	0x0015, 0x2004, 0x002e, 0xa87a, 0x9186, 0x0020, 0x0110, 0xa8e3,
-	0xffff, 0xa986, 0xac76, 0xa87f, 0x0000, 0x2001, 0x1966, 0x2004,
-	0xa882, 0x9006, 0xa802, 0xa86a, 0xa88a, 0x0126, 0x2091, 0x8000,
-	0x080c, 0x68a0, 0x012e, 0x009e, 0x0005, 0x6700, 0x9786, 0x0000,
-	0x0158, 0x9786, 0x0001, 0x0140, 0x9786, 0x000a, 0x0128, 0x9786,
-	0x0009, 0x0110, 0x9085, 0x0001, 0x0005, 0x00e6, 0x6010, 0x9075,
-	0x0138, 0x00b6, 0x2058, 0xb8a0, 0x00be, 0x9206, 0x00ee, 0x0005,
-	0x9085, 0x0001, 0x0cd8, 0x0016, 0x6004, 0x908e, 0x001e, 0x11a0,
-	0x8007, 0x6134, 0x918c, 0x00ff, 0x9105, 0x6036, 0x6007, 0x0085,
-	0x6003, 0x000b, 0x6023, 0x0005, 0x2001, 0x195f, 0x2004, 0x601a,
-	0x080c, 0x83f8, 0x080c, 0x898b, 0x001e, 0x0005, 0xa001, 0xa001,
-	0x0005, 0x6024, 0xd0e4, 0x0158, 0xd0cc, 0x0118, 0x080c, 0xbe73,
-	0x0030, 0x080c, 0xd7c1, 0x080c, 0x820b, 0x080c, 0x9e2f, 0x0005,
-	0x9280, 0x0008, 0x2004, 0x9084, 0x000f, 0x0002, 0xd5f4, 0xd5f4,
-	0xd5f4, 0xd5f6, 0xd5f4, 0xd5f6, 0xd5f6, 0xd5f4, 0xd5f6, 0xd5f4,
-	0xd5f4, 0xd5f4, 0xd5f4, 0xd5f4, 0x9006, 0x0005, 0x9085, 0x0001,
-	0x0005, 0x9280, 0x0008, 0x2004, 0x9084, 0x000f, 0x0002, 0xd60d,
-	0xd60d, 0xd60d, 0xd60d, 0xd60d, 0xd60d, 0xd61a, 0xd60d, 0xd60d,
-	0xd60d, 0xd60d, 0xd60d, 0xd60d, 0xd60d, 0x6007, 0x003b, 0x602f,
-	0x0009, 0x6017, 0x2a00, 0x6003, 0x0001, 0x080c, 0x83f8, 0x080c,
-	0x898b, 0x0005, 0x0096, 0x00c6, 0x2260, 0x080c, 0xd7c1, 0x6043,
-	0x0000, 0x6024, 0xc0f4, 0xc0e4, 0x6026, 0x603b, 0x0000, 0x00ce,
-	0x00d6, 0x2268, 0x9186, 0x0007, 0x1904, 0xd673, 0x6814, 0x9005,
-	0x0138, 0x2048, 0xa87c, 0xd0fc, 0x1118, 0x00de, 0x009e, 0x08a8,
-	0x6007, 0x003a, 0x6003, 0x0001, 0x080c, 0x83f8, 0x080c, 0x898b,
-	0x00c6, 0x2d60, 0x6100, 0x9186, 0x0002, 0x1904, 0xd6ea, 0x6014,
-	0x9005, 0x1138, 0x6000, 0x9086, 0x0007, 0x190c, 0x0db4, 0x0804,
-	0xd6ea, 0x2048, 0x080c, 0xbb3b, 0x1130, 0x0028, 0x2048, 0xa800,
-	0x9005, 0x1de0, 0x2900, 0x2048, 0xa87c, 0x9084, 0x0003, 0x9086,
-	0x0002, 0x1168, 0xa87c, 0xc0dc, 0xc0f4, 0xa87e, 0xa880, 0xc0fc,
-	0xa882, 0x2009, 0x0043, 0x080c, 0xcf73, 0x0804, 0xd6ea, 0x2009,
-	0x0041, 0x0804, 0xd6e4, 0x9186, 0x0005, 0x15a0, 0x6814, 0x2048,
-	0xa87c, 0xd0bc, 0x1120, 0x00de, 0x009e, 0x0804, 0xd60d, 0xd0b4,
-	0x0128, 0xd0fc, 0x090c, 0x0db4, 0x0804, 0xd62e, 0x6007, 0x003a,
-	0x6003, 0x0001, 0x080c, 0x83f8, 0x080c, 0x898b, 0x00c6, 0x2d60,
-	0x6100, 0x9186, 0x0002, 0x0120, 0x9186, 0x0004, 0x1904, 0xd6ea,
-	0x6814, 0x2048, 0xa97c, 0xc1f4, 0xc1dc, 0xa97e, 0xa980, 0xc1fc,
-	0xc1bc, 0xa982, 0x00f6, 0x2c78, 0x080c, 0x164a, 0x00fe, 0x2009,
-	0x0042, 0x04d0, 0x0036, 0x080c, 0x0feb, 0x090c, 0x0db4, 0xa867,
-	0x010d, 0x9006, 0xa802, 0xa86a, 0xa88a, 0x2d18, 0xab8e, 0xa887,
-	0x0045, 0x2c00, 0xa892, 0x6038, 0xa8a2, 0x2360, 0x6024, 0xc0dd,
-	0x6026, 0x6010, 0x00b6, 0x2058, 0xb8a0, 0x00be, 0x2004, 0x6354,
-	0xab7a, 0xa876, 0x9006, 0xa87e, 0xa882, 0xad9a, 0xae96, 0xa89f,
-	0x0001, 0x080c, 0x68a0, 0x2019, 0x0045, 0x6008, 0x2068, 0x080c,
-	0xd11f, 0x2d00, 0x600a, 0x6023, 0x0006, 0x6003, 0x0007, 0x901e,
-	0x631a, 0x6342, 0x003e, 0x0038, 0x6043, 0x0000, 0x6003, 0x0007,
-	0x080c, 0xcf73, 0x00ce, 0x00de, 0x009e, 0x0005, 0x9186, 0x0013,
-	0x1128, 0x6004, 0x9082, 0x0085, 0x2008, 0x00c2, 0x9186, 0x0027,
-	0x1178, 0x080c, 0x887f, 0x0036, 0x0096, 0x6014, 0x2048, 0x2019,
-	0x0004, 0x080c, 0xd50f, 0x009e, 0x003e, 0x080c, 0x898b, 0x0005,
-	0x9186, 0x0014, 0x0d70, 0x080c, 0x9ec4, 0x0005, 0xd71d, 0xd71b,
-	0xd71b, 0xd71b, 0xd71b, 0xd71b, 0xd71d, 0xd71b, 0xd71b, 0xd71b,
-	0xd71b, 0xd71b, 0xd71b, 0x080c, 0x0db4, 0x080c, 0x887f, 0x6003,
-	0x000c, 0x080c, 0x898b, 0x0005, 0x9182, 0x0092, 0x1220, 0x9182,
-	0x0085, 0x0208, 0x001a, 0x080c, 0x9ec4, 0x0005, 0xd73b, 0xd73b,
-	0xd73b, 0xd73b, 0xd73d, 0xd75d, 0xd73b, 0xd73b, 0xd73b, 0xd73b,
-	0xd73b, 0xd73b, 0xd73b, 0x080c, 0x0db4, 0x00d6, 0x2c68, 0x080c,
-	0x9dd9, 0x01b0, 0x6003, 0x0001, 0x6007, 0x001e, 0x2009, 0x026e,
-	0x210c, 0x613a, 0x2009, 0x026f, 0x210c, 0x613e, 0x600b, 0xffff,
-	0x6910, 0x6112, 0x6023, 0x0004, 0x080c, 0x83f8, 0x080c, 0x898b,
-	0x2d60, 0x080c, 0x9e2f, 0x00de, 0x0005, 0x080c, 0x9e2f, 0x0005,
-	0x00e6, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0ec, 0x00ee,
-	0x0005, 0x2009, 0x187b, 0x210c, 0xd1ec, 0x05b0, 0x6003, 0x0002,
-	0x6024, 0xc0e5, 0x6026, 0xd0cc, 0x0150, 0x2001, 0x1960, 0x2004,
-	0x6042, 0x2009, 0x187b, 0x210c, 0xd1f4, 0x1520, 0x00a0, 0x2009,
-	0x187b, 0x210c, 0xd1f4, 0x0128, 0x6024, 0xc0e4, 0x6026, 0x9006,
-	0x00d8, 0x2001, 0x1960, 0x200c, 0x2001, 0x195e, 0x2004, 0x9100,
-	0x9080, 0x000a, 0x6042, 0x6010, 0x00b6, 0x2058, 0xb8ac, 0x00be,
-	0x0008, 0x2104, 0x9005, 0x0118, 0x9088, 0x0003, 0x0cd0, 0x2c0a,
-	0x600f, 0x0000, 0x9085, 0x0001, 0x0005, 0x0016, 0x00c6, 0x00e6,
-	0x6154, 0xb8ac, 0x2060, 0x8cff, 0x0180, 0x84ff, 0x1118, 0x6054,
-	0x9106, 0x1138, 0x600c, 0x2072, 0x080c, 0x820b, 0x080c, 0x9e2f,
-	0x0010, 0x9cf0, 0x0003, 0x2e64, 0x0c70, 0x00ee, 0x00ce, 0x001e,
-	0x0005, 0x00d6, 0x00b6, 0x6010, 0x2058, 0xb8ac, 0x2068, 0x9005,
-	0x0130, 0x9c06, 0x0110, 0x680c, 0x0cd0, 0x600c, 0x680e, 0x00be,
-	0x00de, 0x0005, 0x0026, 0x0036, 0x0156, 0x2011, 0x182b, 0x2204,
-	0x9084, 0x00ff, 0x2019, 0x026e, 0x2334, 0x9636, 0x1508, 0x8318,
-	0x2334, 0x2204, 0x9084, 0xff00, 0x9636, 0x11d0, 0x2011, 0x0270,
-	0x20a9, 0x0004, 0x6010, 0x0096, 0x2048, 0x2019, 0x000a, 0x080c,
-	0xae1c, 0x009e, 0x1168, 0x2011, 0x0274, 0x20a9, 0x0004, 0x6010,
-	0x0096, 0x2048, 0x2019, 0x0006, 0x080c, 0xae1c, 0x009e, 0x1100,
-	0x015e, 0x003e, 0x002e, 0x0005, 0x00e6, 0x2071, 0x1800, 0x080c,
-	0x5c78, 0x080c, 0x2dc8, 0x00ee, 0x0005, 0x00e6, 0x6010, 0x00b6,
-	0x2058, 0xb800, 0x00be, 0xd0fc, 0x0108, 0x0011, 0x00ee, 0x0005,
-	0xa880, 0xc0e5, 0xa882, 0x0005, 0x00e6, 0x00d6, 0x00c6, 0x0076,
-	0x0066, 0x0056, 0x0046, 0x0026, 0x0016, 0x0126, 0x2091, 0x8000,
-	0x2029, 0x19c8, 0x252c, 0x2021, 0x19ce, 0x2424, 0x2061, 0x1cd0,
-	0x2071, 0x1800, 0x7650, 0x7070, 0x9606, 0x0578, 0x6720, 0x9786,
-	0x0001, 0x0118, 0x9786, 0x0008, 0x1500, 0x2500, 0x9c06, 0x01e8,
-	0x2400, 0x9c06, 0x01d0, 0x080c, 0xd595, 0x01b8, 0x080c, 0xd5a5,
-	0x11a0, 0x6000, 0x9086, 0x0004, 0x1120, 0x0016, 0x080c, 0x191f,
-	0x001e, 0x080c, 0xbd30, 0x1110, 0x080c, 0x3010, 0x080c, 0xbd41,
-	0x1110, 0x080c, 0xa7cd, 0x080c, 0x9e5f, 0x9ce0, 0x0018, 0x2001,
-	0x1819, 0x2004, 0x9c02, 0x1208, 0x0858, 0x012e, 0x001e, 0x002e,
-	0x004e, 0x005e, 0x006e, 0x007e, 0x00ce, 0x00de, 0x00ee, 0x0005,
-	0x2001, 0x1810, 0x2004, 0xd0dc, 0x0005, 0x0006, 0x2001, 0x1836,
-	0x2004, 0xd09c, 0x000e, 0x0005, 0x0006, 0x0036, 0x0046, 0x080c,
-	0xc23b, 0x0168, 0x2019, 0xffff, 0x9005, 0x0128, 0x6010, 0x00b6,
-	0x2058, 0xbba0, 0x00be, 0x2021, 0x0004, 0x080c, 0x4a91, 0x004e,
-	0x003e, 0x000e, 0x6004, 0x9086, 0x0001, 0x1128, 0x080c, 0x9915,
-	0x080c, 0x9e5f, 0x9006, 0x0005, 0x00e6, 0x00c6, 0x00b6, 0x0046,
-	0x2061, 0x1cd0, 0x2071, 0x1800, 0x7450, 0x7070, 0x8001, 0x9402,
-	0x12b8, 0x2100, 0x9c06, 0x0148, 0x6000, 0x9086, 0x0000, 0x0128,
-	0x6010, 0x2058, 0xb8a0, 0x9206, 0x0140, 0x9ce0, 0x0018, 0x2001,
-	0x1819, 0x2004, 0x9c02, 0x1220, 0x0c60, 0x9085, 0x0001, 0x0008,
-	0x9006, 0x004e, 0x00be, 0x00ce, 0x00ee, 0x0005, 0x0126, 0x0006,
-	0x00e6, 0x0016, 0x2091, 0x8000, 0x2071, 0x1840, 0xd5a4, 0x0118,
-	0x7054, 0x8000, 0x7056, 0xd5b4, 0x0118, 0x7050, 0x8000, 0x7052,
-	0xd5ac, 0x0178, 0x2500, 0x9084, 0x0007, 0x908e, 0x0003, 0x0148,
-	0x908e, 0x0004, 0x0130, 0x908e, 0x0005, 0x0118, 0x2071, 0x184a,
-	0x0089, 0x001e, 0x00ee, 0x000e, 0x012e, 0x0005, 0x0126, 0x0006,
-	0x00e6, 0x2091, 0x8000, 0x2071, 0x1842, 0x0021, 0x00ee, 0x000e,
-	0x012e, 0x0005, 0x2e04, 0x8000, 0x2072, 0x1220, 0x8e70, 0x2e04,
-	0x8000, 0x2072, 0x0005, 0x00e6, 0x2071, 0x1840, 0x0c99, 0x00ee,
-	0x0005, 0x00e6, 0x2071, 0x1844, 0x0c69, 0x00ee, 0x0005, 0x0126,
-	0x0006, 0x00e6, 0x2091, 0x8000, 0x2071, 0x1840, 0x7064, 0x8000,
-	0x7066, 0x00ee, 0x000e, 0x012e, 0x0005, 0x0003, 0x000b, 0x04a6,
-	0x0000, 0xc000, 0x0001, 0x8064, 0x0008, 0x0010, 0x0000, 0x8066,
-	0x0000, 0x0101, 0x0008, 0x4407, 0x0003, 0x8060, 0x0000, 0x0400,
-	0x0000, 0x580d, 0x000b, 0x798e, 0x0003, 0x50db, 0x000b, 0x4c0a,
-	0x0003, 0xbac0, 0x0009, 0x008a, 0x0000, 0x0c0a, 0x000b, 0x15fe,
-	0x0008, 0x340a, 0x0003, 0xc4c0, 0x0009, 0x7000, 0x0000, 0xffa0,
-	0x0001, 0x2000, 0x0000, 0x1627, 0x0003, 0x808c, 0x0008, 0x0001,
-	0x0000, 0x0000, 0x0007, 0x4047, 0x000a, 0x808c, 0x0008, 0x0002,
-	0x0000, 0x0821, 0x0003, 0x4022, 0x0000, 0x0022, 0x000b, 0x4122,
-	0x0008, 0x4447, 0x0002, 0x0e4f, 0x000b, 0x0bfe, 0x0008, 0x11a0,
-	0x0001, 0x122d, 0x000b, 0x0ca0, 0x0001, 0x122d, 0x000b, 0x9180,
-	0x0001, 0x0004, 0x0000, 0x8060, 0x0000, 0x0400, 0x0000, 0x7f62,
-	0x0008, 0x8066, 0x0000, 0x0009, 0x0008, 0x4430, 0x000b, 0x808c,
-	0x0008, 0x0000, 0x0008, 0x0060, 0x0008, 0x8062, 0x0008, 0x0004,
-	0x0000, 0x8066, 0x0000, 0x0411, 0x0000, 0x4438, 0x0003, 0x03fe,
-	0x0000, 0x43e0, 0x0001, 0x0e2a, 0x000b, 0xc2c0, 0x0009, 0x00ff,
-	0x0008, 0x02e0, 0x0001, 0x0e2a, 0x000b, 0x9180, 0x0001, 0x0005,
-	0x0008, 0x8060, 0x0000, 0x0400, 0x0000, 0x7f62, 0x0008, 0x8066,
-	0x0000, 0x0019, 0x0000, 0x4447, 0x000b, 0x0240, 0x0002, 0x0a27,
-	0x000b, 0x00fe, 0x0000, 0x322a, 0x000b, 0x112a, 0x0000, 0x002e,
-	0x0008, 0x022c, 0x0008, 0x3a44, 0x0002, 0x0c0a, 0x000b, 0x808c,
-	0x0008, 0x0002, 0x0000, 0x1760, 0x0008, 0x8062, 0x0008, 0x000f,
-	0x0008, 0x8066, 0x0000, 0x0011, 0x0008, 0x4458, 0x0003, 0x01fe,
-	0x0008, 0x42e0, 0x0009, 0x0e1d, 0x0003, 0x00fe, 0x0000, 0x43e0,
-	0x0001, 0x0e1d, 0x0003, 0x1734, 0x0000, 0x1530, 0x0000, 0x1632,
-	0x0008, 0x0d2a, 0x0008, 0x9880, 0x0001, 0x0010, 0x0000, 0x8060,
-	0x0000, 0x0400, 0x0000, 0x7f62, 0x0008, 0x8066, 0x0000, 0x1e0a,
-	0x0008, 0x446a, 0x000b, 0x808a, 0x0008, 0x0003, 0x0008, 0x1a60,
-	0x0000, 0x8062, 0x0008, 0x0002, 0x0000, 0x5870, 0x000b, 0x8066,
-	0x0000, 0x3679, 0x0000, 0x4473, 0x0003, 0x5874, 0x0003, 0x3efe,
-	0x0008, 0x7f4f, 0x0002, 0x087a, 0x000b, 0x0d00, 0x0000, 0x0082,
-	0x0004, 0x8054, 0x0008, 0x0011, 0x0008, 0x8074, 0x0000, 0x1010,
-	0x0008, 0x1efe, 0x0000, 0x300a, 0x000b, 0x00b8, 0x0004, 0x000a,
-	0x000b, 0x00fe, 0x0000, 0x348a, 0x000b, 0x1a60, 0x0000, 0x8062,
-	0x0008, 0x0007, 0x0000, 0x8066, 0x0000, 0x0231, 0x0008, 0x4489,
-	0x0003, 0x03fe, 0x0000, 0x04d0, 0x0001, 0x0cb0, 0x0003, 0x82c0,
-	0x0001, 0x1f00, 0x0000, 0xffa0, 0x0001, 0x0400, 0x0000, 0x089f,
-	0x0003, 0x14b0, 0x0003, 0x01fe, 0x0008, 0x0580, 0x0009, 0x7f06,
-	0x0000, 0x02fe, 0x0008, 0xffc0, 0x0001, 0x00ff, 0x0008, 0x0690,
-	0x0001, 0x109f, 0x0003, 0x7f08, 0x0008, 0x84c0, 0x0001, 0xff00,
-	0x0008, 0x08b0, 0x000b, 0x00fe, 0x0000, 0x34a6, 0x0003, 0x8072,
-	0x0000, 0x1010, 0x0008, 0x3944, 0x0002, 0x08a1, 0x000b, 0x00aa,
-	0x000b, 0x8072, 0x0000, 0x2020, 0x0008, 0x3945, 0x000a, 0x08a6,
-	0x0003, 0x3946, 0x000a, 0x0cb7, 0x000b, 0x0000, 0x0007, 0x3943,
-	0x000a, 0x08b7, 0x0003, 0x00aa, 0x000b, 0x00fe, 0x0000, 0x34b5,
-	0x000b, 0x8072, 0x0000, 0x1000, 0x0000, 0x00b7, 0x000b, 0x8072,
-	0x0000, 0x2000, 0x0000, 0x4000, 0x000f, 0x1c60, 0x0000, 0x1b62,
-	0x0000, 0x8066, 0x0000, 0x0231, 0x0008, 0x44bc, 0x0003, 0x58bd,
-	0x0003, 0x0140, 0x0008, 0x0242, 0x0000, 0x1f43, 0x0002, 0x0ccb,
-	0x0003, 0x0d44, 0x0000, 0x0d46, 0x0008, 0x0348, 0x0008, 0x044a,
-	0x0008, 0x030a, 0x0008, 0x040c, 0x0000, 0x0d06, 0x0000, 0x0d08,
-	0x0008, 0x00cf, 0x000b, 0x0344, 0x0008, 0x0446, 0x0008, 0x0548,
-	0x0008, 0x064a, 0x0000, 0x58cf, 0x0003, 0x3efe, 0x0008, 0x7f4f,
-	0x0002, 0x08d6, 0x000b, 0x8000, 0x0000, 0x0001, 0x0000, 0x0082,
-	0x0004, 0x8054, 0x0008, 0x0001, 0x0000, 0x8074, 0x0000, 0x2020,
-	0x0008, 0x4000, 0x000f, 0x3a40, 0x000a, 0x0c0d, 0x0003, 0x2b24,
-	0x0008, 0x2b24, 0x0008, 0x58df, 0x000b, 0x8054, 0x0008, 0x0002,
-	0x0000, 0x1242, 0x0002, 0x092d, 0x000b, 0x3a45, 0x000a, 0x091c,
-	0x0003, 0x8072, 0x0000, 0x1000, 0x0000, 0x3945, 0x000a, 0x08ec,
-	0x000b, 0x8072, 0x0000, 0x3010, 0x0000, 0x1e10, 0x000a, 0x7f3c,
-	0x0000, 0x0917, 0x000b, 0x1d00, 0x0002, 0x7f3a, 0x0000, 0x0d60,
-	0x0000, 0x7f62, 0x0008, 0x8066, 0x0000, 0x0009, 0x0008, 0x44f5,
-	0x000b, 0x00fe, 0x0000, 0x3514, 0x000b, 0x1c60, 0x0000, 0x8062,
-	0x0008, 0x0001, 0x0000, 0x8066, 0x0000, 0x0009, 0x0008, 0x44fd,
-	0x0003, 0x00fe, 0x0000, 0x3204, 0x000b, 0x0038, 0x0000, 0x0060,
-	0x0008, 0x8062, 0x0008, 0x0019, 0x0000, 0x8066, 0x0000, 0x0009,
-	0x0008, 0x4506, 0x0003, 0x80c0, 0x0009, 0x00ff, 0x0008, 0x7f3e,
-	0x0008, 0x0d60, 0x0000, 0x0efe, 0x0008, 0x1f80, 0x0001, 0x7f62,
-	0x0008, 0x8066, 0x0000, 0x0009, 0x0008, 0x4510, 0x000b, 0x003a,
-	0x0008, 0x1dfe, 0x0000, 0x00f1, 0x0003, 0x0036, 0x0008, 0x00b8,
-	0x0004, 0x012d, 0x0003, 0x8074, 0x0000, 0x2000, 0x0000, 0x8072,
-	0x0000, 0x2000, 0x0000, 0x012d, 0x0003, 0x3a44, 0x0002, 0x0a30,
-	0x000b, 0x8074, 0x0000, 0x1000, 0x0000, 0x8072, 0x0000, 0x1000,
-	0x0000, 0x2d0e, 0x0000, 0x2d0e, 0x0000, 0x3601, 0x0003, 0x26fe,
-	0x0008, 0x26fe, 0x0008, 0x2700, 0x0008, 0x2700, 0x0008, 0x00d0,
-	0x0009, 0x0d3f, 0x0003, 0x8074, 0x0000, 0x4040, 0x0008, 0x592d,
-	0x000b, 0x50db, 0x000b, 0x3a46, 0x000a, 0x0d3f, 0x0003, 0x3a47,
-	0x0002, 0x093a, 0x000b, 0x8054, 0x0008, 0x0004, 0x0000, 0x8074,
-	0x0000, 0x8000, 0x0000, 0x8072, 0x0000, 0x3000, 0x0008, 0x0182,
-	0x0003, 0x92c0, 0x0009, 0x0fc8, 0x0000, 0x080a, 0x0003, 0x1246,
-	0x000a, 0x0dfb, 0x000b, 0x1a60, 0x0000, 0x8062, 0x0008, 0x0002,
-	0x0000, 0x8066, 0x0000, 0x362a, 0x0000, 0x4544, 0x0003, 0x2000,
-	0x0000, 0x2000, 0x0000, 0x2102, 0x0000, 0x2102, 0x0000, 0x2204,
-	0x0000, 0x2204, 0x0000, 0x2306, 0x0000, 0x2306, 0x0000, 0x2408,
-	0x0000, 0x2408, 0x0000, 0x250a, 0x0000, 0x250a, 0x0000, 0x260c,
-	0x0000, 0x260c, 0x0000, 0x270e, 0x0000, 0x270e, 0x0000, 0x2810,
-	0x0000, 0x2810, 0x0000, 0x2912, 0x0000, 0x2912, 0x0000, 0x1a60,
-	0x0000, 0x8062, 0x0008, 0x0007, 0x0000, 0x8066, 0x0000, 0x0052,
-	0x0000, 0x455e, 0x000b, 0x92c0, 0x0009, 0x0780, 0x0008, 0x0e17,
-	0x0003, 0x124b, 0x0002, 0x0967, 0x0003, 0x2e4d, 0x0002, 0x2e4d,
-	0x0002, 0x0a01, 0x0003, 0x3a46, 0x000a, 0x0d74, 0x0003, 0x5969,
-	0x000b, 0x8054, 0x0008, 0x0004, 0x0000, 0x1243, 0x000a, 0x097e,
-	0x000b, 0x8010, 0x0008, 0x000d, 0x0000, 0x01ef, 0x0004, 0x1810,
-	0x0000, 0x01ef, 0x0004, 0x017e, 0x0003, 0x194d, 0x000a, 0x0978,
-	0x000b, 0x1243, 0x000a, 0x0a0b, 0x0003, 0x5978, 0x000b, 0x8054,
-	0x0008, 0x0004, 0x0000, 0x01e4, 0x000c, 0x1810, 0x0000, 0x01ef,
-	0x0004, 0x8074, 0x0000, 0xf000, 0x0008, 0x8072, 0x0000, 0x3000,
-	0x0008, 0x0d30, 0x0000, 0x3a42, 0x0002, 0x0d88, 0x0003, 0x15fe,
-	0x0008, 0x3451, 0x000b, 0x000a, 0x000b, 0x8074, 0x0000, 0x0501,
-	0x0000, 0x8010, 0x0008, 0x000c, 0x0008, 0x01ef, 0x0004, 0x000a,
-	0x000b, 0xbbe0, 0x0009, 0x0030, 0x0008, 0x0d9e, 0x000b, 0x18fe,
-	0x0000, 0x3ce0, 0x0009, 0x099b, 0x0003, 0x15fe, 0x0008, 0x3ce0,
-	0x0009, 0x099b, 0x0003, 0x01df, 0x0004, 0x8076, 0x0008, 0x0040,
-	0x0000, 0x01dc, 0x000b, 0x8076, 0x0008, 0x0041, 0x0008, 0x01dc,
-	0x000b, 0xbbe0, 0x0009, 0x0032, 0x0000, 0x0da3, 0x0003, 0x3c1e,
-	0x0008, 0x01dc, 0x000b, 0xbbe0, 0x0009, 0x0037, 0x0000, 0x0dc1,
-	0x000b, 0x18fe, 0x0000, 0x3ce0, 0x0009, 0x0d9b, 0x000b, 0x8076,
-	0x0008, 0x0040, 0x0000, 0x1a60, 0x0000, 0x8062, 0x0008, 0x000d,
-	0x0000, 0x2604, 0x0008, 0x2604, 0x0008, 0x2706, 0x0008, 0x2706,
-	0x0008, 0x2808, 0x0000, 0x2808, 0x0000, 0x290a, 0x0000, 0x290a,
-	0x0000, 0x8066, 0x0000, 0x0422, 0x0000, 0x45b8, 0x0003, 0x01e4,
-	0x000c, 0x8054, 0x0008, 0x0004, 0x0000, 0x8074, 0x0000, 0xf000,
-	0x0008, 0x8072, 0x0000, 0xb000, 0x0000, 0x0182, 0x0003, 0xbbe0,
-	0x0009, 0x0038, 0x0000, 0x0dd3, 0x000b, 0x18fe, 0x0000, 0x3ce0,
-	0x0009, 0x09d0, 0x0003, 0x15fe, 0x0008, 0x3ce0, 0x0009, 0x0d97,
-	0x000b, 0x01df, 0x0004, 0x8076, 0x0008, 0x0040, 0x0000, 0x8072,
-	0x0000, 0x8000, 0x0000, 0x0227, 0x0003, 0x8076, 0x0008, 0x0042,
-	0x0008, 0x01dc, 0x000b, 0xbbe0, 0x0009, 0x0016, 0x0000, 0x0ddc,
-	0x000b, 0x3a44, 0x0002, 0x0c0c, 0x000b, 0x8072, 0x0000, 0x8000,
-	0x0000, 0x8000, 0x000f, 0x000a, 0x000b, 0x8072, 0x0000, 0x8000,
-	0x0000, 0x000a, 0x000b, 0x3d30, 0x000a, 0x7f00, 0x0000, 0xbc80,
-	0x0001, 0x0007, 0x0000, 0x01e8, 0x0003, 0x1930, 0x000a, 0x7f00,
-	0x0000, 0x9880, 0x0001, 0x0007, 0x0000, 0x8060, 0x0000, 0x0400,
-	0x0000, 0x7f62, 0x0008, 0x8066, 0x0000, 0x000a, 0x0008, 0x45ed,
-	0x0003, 0x4000, 0x000f, 0x21ef, 0x0003, 0x0870, 0x0008, 0x4000,
-	0x000f, 0xbac0, 0x0009, 0x0090, 0x0008, 0x09f8, 0x0003, 0x8074,
-	0x0000, 0x0706, 0x0000, 0x01fa, 0x0003, 0x8074, 0x0000, 0x0703,
-	0x0000, 0x4000, 0x000f, 0x8010, 0x0008, 0x0023, 0x0000, 0x0235,
-	0x0003, 0x8010, 0x0008, 0x0008, 0x0000, 0x0235, 0x0003, 0x8010,
-	0x0008, 0x0022, 0x0008, 0x0235, 0x0003, 0x01e4, 0x000c, 0x8010,
-	0x0008, 0x0007, 0x0000, 0x01ef, 0x0004, 0x1810, 0x0000, 0x01ef,
-	0x0004, 0x0241, 0x0003, 0x01e4, 0x000c, 0x8010, 0x0008, 0x001b,
-	0x0008, 0x01ef, 0x0004, 0x1810, 0x0000, 0x01ef, 0x0004, 0x8074,
-	0x0000, 0xf080, 0x0000, 0x8072, 0x0000, 0x3000, 0x0008, 0x0d30,
-	0x0000, 0x000a, 0x000b, 0x8010, 0x0008, 0x0009, 0x0008, 0x0235,
-	0x0003, 0x8010, 0x0008, 0x0005, 0x0008, 0x0235, 0x0003, 0x808c,
-	0x0008, 0x0001, 0x0000, 0x8010, 0x0008, 0x0004, 0x0000, 0x4143,
-	0x000a, 0x085f, 0x0003, 0x3a44, 0x0002, 0x0c0a, 0x000b, 0x0d2a,
-	0x0008, 0x0235, 0x0003, 0x8010, 0x0008, 0x0003, 0x0008, 0x0239,
-	0x0003, 0x8010, 0x0008, 0x000b, 0x0000, 0x0239, 0x0003, 0x8010,
-	0x0008, 0x0002, 0x0000, 0x0239, 0x0003, 0x3a47, 0x0002, 0x0d2d,
-	0x0003, 0x8010, 0x0008, 0x0006, 0x0008, 0x0239, 0x0003, 0x8074,
-	0x0000, 0xf000, 0x0008, 0x8072, 0x0000, 0x3000, 0x0008, 0x01ef,
-	0x0004, 0x01f2, 0x0004, 0x3a40, 0x000a, 0x080a, 0x0003, 0x8010,
-	0x0008, 0x000c, 0x0008, 0x01ef, 0x0004, 0x000a, 0x000b, 0x8074,
-	0x0000, 0xf080, 0x0000, 0x8072, 0x0000, 0x3000, 0x0008, 0x0d30,
-	0x0000, 0x2e4d, 0x0002, 0x2e4d, 0x0002, 0x0a4c, 0x0003, 0x8054,
-	0x0008, 0x0019, 0x0000, 0x000a, 0x000b, 0x8054, 0x0008, 0x0009,
-	0x0008, 0x000a, 0x000b, 0x3a44, 0x0002, 0x0c0a, 0x000b, 0x022a,
-	0x000b, 0x15b6, 0xf4ac, 0x0001, 0x0002, 0x0004, 0x0008, 0x0010,
-	0x0020, 0x0040, 0x0080, 0x0100, 0x0200, 0x0400, 0x0800, 0x1000,
-	0x2000, 0x4000, 0x8000, 0x2a9a
+	0x00b6, 0x0066, 0x6610, 0x2658, 0xbe04, 0x96b4, 0xff00, 0x8637,
+	0x9686, 0x0006, 0x0170, 0x9686, 0x0004, 0x0158, 0xbe04, 0x96b4,
+	0x00ff, 0x9686, 0x0006, 0x0128, 0x9686, 0x0004, 0x0110, 0x9085,
+	0x0001, 0x006e, 0x00be, 0x0005, 0x00d6, 0x080c, 0xcc50, 0x00de,
+	0x0005, 0x00d6, 0x080c, 0xcc5d, 0x1520, 0x680c, 0x908c, 0xff00,
+	0x6820, 0x9084, 0x00ff, 0x9115, 0x6216, 0x6824, 0x602e, 0xd1e4,
+	0x0130, 0x9006, 0x080c, 0xdb9d, 0x2009, 0x0001, 0x0078, 0xd1ec,
+	0x0180, 0x6920, 0x918c, 0x00ff, 0x6824, 0x080c, 0x276e, 0x1148,
+	0x2001, 0x0001, 0x080c, 0xdb9d, 0x2110, 0x900e, 0x080c, 0x31d4,
+	0x0018, 0x9085, 0x0001, 0x0008, 0x9006, 0x00de, 0x0005, 0x00b6,
+	0x00c6, 0x080c, 0xa130, 0x05a8, 0x0016, 0x0026, 0x00c6, 0x2011,
+	0x0263, 0x2204, 0x8211, 0x220c, 0x080c, 0x276e, 0x1578, 0x080c,
+	0x643f, 0x1560, 0xbe12, 0xbd16, 0x00ce, 0x002e, 0x001e, 0x2b00,
+	0x6012, 0x080c, 0xda81, 0x11d8, 0x080c, 0x32ae, 0x11c0, 0x080c,
+	0xcbb8, 0x0510, 0x2001, 0x0007, 0x080c, 0x63f0, 0x2001, 0x0007,
+	0x080c, 0x641c, 0x6017, 0x0000, 0x6023, 0x0001, 0x6007, 0x0001,
+	0x6003, 0x0001, 0x080c, 0x86c1, 0x080c, 0x8c10, 0x0010, 0x080c,
+	0xa0e3, 0x9085, 0x0001, 0x00ce, 0x00be, 0x0005, 0x080c, 0xa0e3,
+	0x00ce, 0x002e, 0x001e, 0x0ca8, 0x080c, 0xa0e3, 0x9006, 0x0c98,
+	0x2069, 0x026d, 0x6800, 0x9082, 0x0010, 0x1228, 0x6017, 0x0000,
+	0x9085, 0x0001, 0x0008, 0x9006, 0x0005, 0x6017, 0x0000, 0x2069,
+	0x026c, 0x6808, 0x9084, 0xff00, 0x9086, 0x0800, 0x1190, 0x6904,
+	0x9186, 0x0018, 0x0118, 0x9186, 0x0014, 0x1158, 0x810f, 0x6800,
+	0x9084, 0x00ff, 0x910d, 0x615a, 0x908e, 0x0014, 0x0110, 0x908e,
+	0x0010, 0x0005, 0x6004, 0x90b2, 0x0053, 0x1a0c, 0x0dfa, 0x91b6,
+	0x0013, 0x1130, 0x2008, 0x91b2, 0x0040, 0x1a04, 0xcda5, 0x0092,
+	0x91b6, 0x0027, 0x0120, 0x91b6, 0x0014, 0x190c, 0x0dfa, 0x2001,
+	0x0007, 0x080c, 0x641c, 0x080c, 0x8b04, 0x080c, 0xa113, 0x080c,
+	0x8c10, 0x0005, 0xccda, 0xccdc, 0xccda, 0xccda, 0xccda, 0xccdc,
+	0xcceb, 0xcd9e, 0xcd3d, 0xcd9e, 0xcd4f, 0xcd9e, 0xcceb, 0xcd9e,
+	0xcd96, 0xcd9e, 0xcd96, 0xcd9e, 0xcd9e, 0xccda, 0xccda, 0xccda,
+	0xccda, 0xccda, 0xccda, 0xccda, 0xccda, 0xccda, 0xccda, 0xccda,
+	0xccdc, 0xccda, 0xcd9e, 0xccda, 0xccda, 0xcd9e, 0xccda, 0xcd9b,
+	0xcd9e, 0xccda, 0xccda, 0xccda, 0xccda, 0xcd9e, 0xcd9e, 0xccda,
+	0xcd9e, 0xcd9e, 0xccda, 0xcce6, 0xccda, 0xccda, 0xccda, 0xccda,
+	0xcd9a, 0xcd9e, 0xccda, 0xccda, 0xcd9e, 0xcd9e, 0xccda, 0xccda,
+	0xccda, 0xccda, 0x080c, 0x0dfa, 0x080c, 0x8b04, 0x080c, 0xc551,
+	0x6003, 0x0002, 0x080c, 0x8c10, 0x0804, 0xcda4, 0x9006, 0x080c,
+	0x63dc, 0x0804, 0xcd9e, 0x080c, 0x67bb, 0x1904, 0xcd9e, 0x9006,
+	0x080c, 0x63dc, 0x6010, 0x2058, 0xb810, 0x9086, 0x00ff, 0x1140,
+	0x00f6, 0x2079, 0x1800, 0x78a4, 0x8000, 0x78a6, 0x00fe, 0x0428,
+	0x6010, 0x2058, 0xb8b0, 0x9005, 0x1178, 0x080c, 0xc539, 0x1904,
+	0xcd9e, 0x0036, 0x0046, 0xbba0, 0x2021, 0x0007, 0x080c, 0x4cbc,
+	0x004e, 0x003e, 0x0804, 0xcd9e, 0x080c, 0x32df, 0x1904, 0xcd9e,
+	0x2001, 0x1800, 0x2004, 0x9086, 0x0002, 0x1138, 0x00f6, 0x2079,
+	0x1800, 0x78a4, 0x8000, 0x78a6, 0x00fe, 0x2001, 0x0002, 0x080c,
+	0x63f0, 0x080c, 0x8b04, 0x6023, 0x0001, 0x6003, 0x0001, 0x6007,
+	0x0002, 0x080c, 0x86c1, 0x080c, 0x8c10, 0x6110, 0x2158, 0x2009,
+	0x0001, 0x080c, 0x82e8, 0x0804, 0xcda4, 0x6610, 0x2658, 0xbe04,
+	0x96b4, 0xff00, 0x8637, 0x9686, 0x0006, 0x0904, 0xcd9e, 0x9686,
+	0x0004, 0x0904, 0xcd9e, 0x2001, 0x0004, 0x0804, 0xcd9c, 0x2001,
+	0x1800, 0x2004, 0x9086, 0x0003, 0x1158, 0x0036, 0x0046, 0x6010,
+	0x2058, 0xbba0, 0x2021, 0x0006, 0x080c, 0x4cbc, 0x004e, 0x003e,
+	0x2001, 0x0006, 0x080c, 0xcdc2, 0x6610, 0x2658, 0xbe04, 0x0066,
+	0x96b4, 0xff00, 0x8637, 0x9686, 0x0006, 0x006e, 0x0168, 0x2001,
+	0x0006, 0x080c, 0x641c, 0x9284, 0x00ff, 0x908e, 0x0007, 0x1120,
+	0x2001, 0x0006, 0x080c, 0x63f0, 0x080c, 0x67bb, 0x11f8, 0x2001,
+	0x1836, 0x2004, 0xd0a4, 0x01d0, 0xbe04, 0x96b4, 0x00ff, 0x9686,
+	0x0006, 0x01a0, 0x00f6, 0x2079, 0x1800, 0x78a4, 0x8000, 0x78a6,
+	0x00fe, 0x0804, 0xcd25, 0x2001, 0x0004, 0x0030, 0x2001, 0x0006,
+	0x0449, 0x0020, 0x0018, 0x0010, 0x080c, 0x641c, 0x080c, 0x8b04,
+	0x080c, 0xa0e3, 0x080c, 0x8c10, 0x0005, 0x2600, 0x0002, 0xcdb9,
+	0xcdb9, 0xcdb9, 0xcdb9, 0xcdb9, 0xcdbb, 0xcdb9, 0xcdb9, 0xcdb9,
+	0xcdb9, 0xcdbb, 0xcdb9, 0xcdb9, 0xcdb9, 0xcdbb, 0xcdbb, 0xcdbb,
+	0xcdbb, 0x080c, 0x0dfa, 0x080c, 0x8b04, 0x080c, 0xa0e3, 0x080c,
+	0x8c10, 0x0005, 0x0016, 0x00b6, 0x00d6, 0x6110, 0x2158, 0xb900,
+	0xd184, 0x0138, 0x080c, 0x63f0, 0x9006, 0x080c, 0x63dc, 0x080c,
+	0x31b4, 0x00de, 0x00be, 0x001e, 0x0005, 0x6610, 0x2658, 0xb804,
+	0x9084, 0xff00, 0x8007, 0x90b2, 0x000c, 0x1a0c, 0x0dfa, 0x91b6,
+	0x0015, 0x1110, 0x003b, 0x0028, 0x91b6, 0x0016, 0x190c, 0x0dfa,
+	0x006b, 0x0005, 0xab62, 0xab62, 0xab62, 0xab62, 0xce57, 0xab62,
+	0xce41, 0xce02, 0xab62, 0xab62, 0xab62, 0xab62, 0xab62, 0xab62,
+	0xab62, 0xab62, 0xce57, 0xab62, 0xce41, 0xce48, 0xab62, 0xab62,
+	0xab62, 0xab62, 0x00f6, 0x080c, 0x67bb, 0x11d8, 0x080c, 0xc539,
+	0x11c0, 0x6010, 0x905d, 0x01a8, 0xb8b0, 0x9005, 0x0190, 0x9006,
+	0x080c, 0x63dc, 0x2001, 0x0002, 0x080c, 0x63f0, 0x6023, 0x0001,
+	0x6003, 0x0001, 0x6007, 0x0002, 0x080c, 0x86c1, 0x080c, 0x8c10,
+	0x00f0, 0x2011, 0x0263, 0x2204, 0x8211, 0x220c, 0x080c, 0x276e,
+	0x11b0, 0x080c, 0x649f, 0x0118, 0x080c, 0xa0e3, 0x0080, 0xb810,
+	0x0006, 0xb814, 0x0006, 0xb8b0, 0x0006, 0x080c, 0x5f45, 0x000e,
+	0xb8b2, 0x000e, 0xb816, 0x000e, 0xb812, 0x080c, 0xa0e3, 0x00fe,
+	0x0005, 0x6604, 0x96b6, 0x001e, 0x1110, 0x080c, 0xa0e3, 0x0005,
+	0x080c, 0xaf48, 0x1148, 0x6003, 0x0001, 0x6007, 0x0001, 0x080c,
+	0x86c1, 0x080c, 0x8c10, 0x0010, 0x080c, 0xa0e3, 0x0005, 0x0804,
+	0xa0e3, 0x6004, 0x908a, 0x0053, 0x1a0c, 0x0dfa, 0x080c, 0x8b04,
+	0x080c, 0xa113, 0x080c, 0x8c10, 0x0005, 0x9182, 0x0040, 0x0002,
+	0xce7c, 0xce7c, 0xce7c, 0xce7c, 0xce7e, 0xce7c, 0xce7c, 0xce7c,
+	0xce7c, 0xce7c, 0xce7c, 0xce7c, 0xce7c, 0xce7c, 0xce7c, 0xce7c,
+	0xce7c, 0xce7c, 0xce7c, 0xce7c, 0x080c, 0x0dfa, 0x0096, 0x00b6,
+	0x00d6, 0x00e6, 0x00f6, 0x0046, 0x0026, 0x6210, 0x2258, 0xb8ac,
+	0x9005, 0x11a8, 0x6106, 0x2071, 0x0260, 0x7444, 0x94a4, 0xff00,
+	0x0904, 0xcee4, 0x080c, 0xdb91, 0x1170, 0x9486, 0x2000, 0x1158,
+	0x2009, 0x0001, 0x2011, 0x0200, 0x080c, 0x84d1, 0x0020, 0x9026,
+	0x080c, 0xdac6, 0x0c38, 0x080c, 0x1031, 0x090c, 0x0dfa, 0x6003,
+	0x0007, 0xa867, 0x010d, 0x9006, 0xa802, 0xa86a, 0xac8a, 0x2c00,
+	0xa88e, 0x6008, 0xa8e2, 0x6010, 0x2058, 0xb8a0, 0x7130, 0xa97a,
+	0x0016, 0xa876, 0xa87f, 0x0000, 0xa883, 0x0000, 0xa887, 0x0036,
+	0x080c, 0x6ae9, 0x001e, 0x080c, 0xdb91, 0x1904, 0xcf44, 0x9486,
+	0x2000, 0x1130, 0x2019, 0x0017, 0x080c, 0xd801, 0x0804, 0xcf44,
+	0x9486, 0x0200, 0x1120, 0x080c, 0xd79d, 0x0804, 0xcf44, 0x9486,
+	0x0400, 0x0120, 0x9486, 0x1000, 0x1904, 0xcf44, 0x2019, 0x0002,
+	0x080c, 0xd7b8, 0x0804, 0xcf44, 0x2069, 0x1a48, 0x6a00, 0xd284,
+	0x0904, 0xcfae, 0x9284, 0x0300, 0x1904, 0xcfa7, 0x6804, 0x9005,
+	0x0904, 0xcf8f, 0x2d78, 0x6003, 0x0007, 0x080c, 0x104a, 0x0904,
+	0xcf50, 0x7800, 0xd08c, 0x1118, 0x7804, 0x8001, 0x7806, 0x6017,
+	0x0000, 0x2001, 0x180f, 0x2004, 0xd084, 0x1904, 0xcfb2, 0x9006,
+	0xa802, 0xa867, 0x0116, 0xa86a, 0x6008, 0xa8e2, 0x2c00, 0xa87a,
+	0x6010, 0x2058, 0xb8a0, 0x7130, 0xa9b6, 0xa876, 0xb928, 0xa9ba,
+	0xb92c, 0xa9be, 0xb930, 0xa9c2, 0xb934, 0xa9c6, 0xa883, 0x003d,
+	0x7044, 0x9084, 0x0003, 0x9080, 0xcf4c, 0x2005, 0xa87e, 0x20a9,
+	0x000a, 0x2001, 0x0270, 0xaa5c, 0x9290, 0x0021, 0x2009, 0x0205,
+	0x200b, 0x0080, 0x20e1, 0x0000, 0xab60, 0x23e8, 0x2098, 0x22a0,
+	0x4003, 0x200b, 0x0000, 0x2001, 0x027a, 0x200c, 0xa9b2, 0x8000,
+	0x200c, 0xa9ae, 0x080c, 0x6ae9, 0x002e, 0x004e, 0x00fe, 0x00ee,
+	0x00de, 0x00be, 0x009e, 0x0005, 0x0000, 0x0080, 0x0040, 0x0000,
+	0x2001, 0x1810, 0x2004, 0xd084, 0x0120, 0x080c, 0x1031, 0x1904,
+	0xcef9, 0x6017, 0xf100, 0x6003, 0x0001, 0x6007, 0x0041, 0x080c,
+	0x8679, 0x080c, 0x8c10, 0x0c00, 0x2069, 0x0260, 0x6848, 0x9084,
+	0xff00, 0x9086, 0x1200, 0x1198, 0x686c, 0x9084, 0x00ff, 0x0016,
+	0x6114, 0x918c, 0xf700, 0x910d, 0x6116, 0x001e, 0x6003, 0x0001,
+	0x6007, 0x0043, 0x080c, 0x8679, 0x080c, 0x8c10, 0x0828, 0x6868,
+	0x602e, 0x686c, 0x6032, 0x6017, 0xf200, 0x6003, 0x0001, 0x6007,
+	0x0041, 0x080c, 0x8679, 0x080c, 0x8c10, 0x0804, 0xcf44, 0x2001,
+	0x180e, 0x2004, 0xd0ec, 0x0120, 0x2011, 0x8049, 0x080c, 0x4b1f,
+	0x6017, 0xf300, 0x0010, 0x6017, 0xf100, 0x6003, 0x0001, 0x6007,
+	0x0041, 0x080c, 0x8679, 0x080c, 0x8c10, 0x0804, 0xcf44, 0x6017,
+	0xf500, 0x0c98, 0x6017, 0xf600, 0x0804, 0xcf64, 0x6017, 0xf200,
+	0x0804, 0xcf64, 0xa867, 0x0146, 0xa86b, 0x0000, 0x6008, 0xa886,
+	0x2c00, 0xa87a, 0x7044, 0x9084, 0x0003, 0x9080, 0xcf4c, 0x2005,
+	0xa87e, 0x2928, 0x6010, 0x2058, 0xb8a0, 0xa876, 0xb828, 0xa88a,
+	0xb82c, 0xa88e, 0xb830, 0xa892, 0xb834, 0xa896, 0xa883, 0x003d,
+	0x2009, 0x0205, 0x2104, 0x9085, 0x0080, 0x200a, 0x20e1, 0x0000,
+	0x2011, 0x0210, 0x2214, 0x9294, 0x0fff, 0xaaa2, 0x9282, 0x0111,
+	0x1a0c, 0x0dfa, 0x8210, 0x821c, 0x2001, 0x026c, 0x2098, 0xa860,
+	0x20e8, 0xa85c, 0x9080, 0x0029, 0x20a0, 0x2011, 0xd02e, 0x2041,
+	0x0001, 0x223d, 0x9784, 0x00ff, 0x9322, 0x1208, 0x2300, 0x20a8,
+	0x4003, 0x931a, 0x0530, 0x8210, 0xd7fc, 0x1130, 0x8d68, 0x2d0a,
+	0x2001, 0x0260, 0x2098, 0x0c68, 0x2950, 0x080c, 0x104a, 0x0170,
+	0x2900, 0xb002, 0xa867, 0x0147, 0xa86b, 0x0000, 0xa860, 0x20e8,
+	0xa85c, 0x9080, 0x001b, 0x20a0, 0x8840, 0x08d8, 0x2548, 0xa800,
+	0x902d, 0x0118, 0x080c, 0x1063, 0x0cc8, 0x080c, 0x1063, 0x0804,
+	0xcf50, 0x2548, 0x8847, 0x9885, 0x0046, 0xa866, 0x2009, 0x0205,
+	0x200b, 0x0000, 0x080c, 0xd830, 0x0804, 0xcf44, 0x8010, 0x0004,
+	0x801a, 0x0006, 0x8018, 0x0008, 0x8016, 0x000a, 0x8014, 0x9186,
+	0x0013, 0x1160, 0x6004, 0x908a, 0x0054, 0x1a0c, 0x0dfa, 0x9082,
+	0x0040, 0x0a0c, 0x0dfa, 0x2008, 0x0804, 0xd0e0, 0x9186, 0x0051,
+	0x0108, 0x00c0, 0x2001, 0x0109, 0x2004, 0xd084, 0x0904, 0xd090,
+	0x0126, 0x2091, 0x2800, 0x0006, 0x0016, 0x0026, 0x080c, 0x8563,
+	0x002e, 0x001e, 0x000e, 0x012e, 0x6000, 0x9086, 0x0002, 0x1580,
+	0x0804, 0xd129, 0x9186, 0x0027, 0x0530, 0x9186, 0x0048, 0x0128,
+	0x9186, 0x0014, 0x0500, 0x190c, 0x0dfa, 0x2001, 0x0109, 0x2004,
+	0xd084, 0x01f0, 0x00c6, 0x0126, 0x2091, 0x2800, 0x00c6, 0x2061,
+	0x0100, 0x0006, 0x0016, 0x0026, 0x080c, 0x8563, 0x002e, 0x001e,
+	0x000e, 0x00ce, 0x012e, 0x00ce, 0x6000, 0x9086, 0x0004, 0x190c,
+	0x0dfa, 0x0804, 0xd20c, 0x6004, 0x9082, 0x0040, 0x2008, 0x001a,
+	0x080c, 0xa178, 0x0005, 0xd0a7, 0xd0a9, 0xd0a9, 0xd0d0, 0xd0a7,
+	0xd0a7, 0xd0a7, 0xd0a7, 0xd0a7, 0xd0a7, 0xd0a7, 0xd0a7, 0xd0a7,
+	0xd0a7, 0xd0a7, 0xd0a7, 0xd0a7, 0xd0a7, 0xd0a7, 0xd0a7, 0x080c,
+	0x0dfa, 0x080c, 0x8b04, 0x080c, 0x8c10, 0x0036, 0x0096, 0x6014,
+	0x904d, 0x01d8, 0x080c, 0xbe37, 0x01c0, 0x6003, 0x0002, 0x6010,
+	0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x1178, 0x2019, 0x0004,
+	0x080c, 0xd830, 0x6017, 0x0000, 0x6018, 0x9005, 0x1120, 0x2001,
+	0x195f, 0x2004, 0x601a, 0x6003, 0x0007, 0x009e, 0x003e, 0x0005,
+	0x0096, 0x080c, 0x8b04, 0x080c, 0x8c10, 0x080c, 0xbe37, 0x0120,
+	0x6014, 0x2048, 0x080c, 0x1063, 0x080c, 0xa113, 0x009e, 0x0005,
+	0x0002, 0xd0f5, 0xd10c, 0xd0f7, 0xd123, 0xd0f5, 0xd0f5, 0xd0f5,
+	0xd0f5, 0xd0f5, 0xd0f5, 0xd0f5, 0xd0f5, 0xd0f5, 0xd0f5, 0xd0f5,
+	0xd0f5, 0xd0f5, 0xd0f5, 0xd0f5, 0xd0f5, 0x080c, 0x0dfa, 0x0096,
+	0x080c, 0x8b04, 0x6014, 0x2048, 0xa87c, 0xd0b4, 0x0138, 0x6003,
+	0x0007, 0x2009, 0x0043, 0x080c, 0xa15d, 0x0010, 0x6003, 0x0004,
+	0x080c, 0x8c10, 0x009e, 0x0005, 0x080c, 0x8b04, 0x080c, 0xbe37,
+	0x0138, 0x6114, 0x0096, 0x2148, 0xa97c, 0x009e, 0xd1ec, 0x1138,
+	0x080c, 0x84a6, 0x080c, 0xa0e3, 0x080c, 0x8c10, 0x0005, 0x080c,
+	0xda8a, 0x0db0, 0x0cc8, 0x080c, 0x8b04, 0x2009, 0x0041, 0x0804,
+	0xd294, 0x9182, 0x0040, 0x0002, 0xd140, 0xd142, 0xd140, 0xd140,
+	0xd140, 0xd140, 0xd140, 0xd140, 0xd140, 0xd140, 0xd140, 0xd140,
+	0xd140, 0xd140, 0xd140, 0xd140, 0xd140, 0xd143, 0xd140, 0xd140,
+	0x080c, 0x0dfa, 0x0005, 0x00d6, 0x080c, 0x84a6, 0x00de, 0x080c,
+	0xdae2, 0x080c, 0xa0e3, 0x0005, 0x9182, 0x0040, 0x0002, 0xd163,
+	0xd163, 0xd163, 0xd163, 0xd163, 0xd163, 0xd163, 0xd163, 0xd163,
+	0xd165, 0xd1d4, 0xd163, 0xd163, 0xd163, 0xd163, 0xd1d4, 0xd163,
+	0xd163, 0xd163, 0xd163, 0x080c, 0x0dfa, 0x2001, 0x0105, 0x2004,
+	0x9084, 0x1800, 0x01c8, 0x2001, 0x0132, 0x200c, 0x2001, 0x0131,
+	0x2004, 0x9105, 0x1904, 0xd1d4, 0x2009, 0x180c, 0x2104, 0xd0d4,
+	0x0904, 0xd1d4, 0xc0d4, 0x200a, 0x2009, 0x0105, 0x2104, 0x9084,
+	0xe7fd, 0x9085, 0x0010, 0x200a, 0x2001, 0x187b, 0x2004, 0xd0e4,
+	0x1528, 0x603b, 0x0000, 0x080c, 0x8bc0, 0x6014, 0x0096, 0x2048,
+	0xa87c, 0xd0fc, 0x0188, 0x908c, 0x0003, 0x918e, 0x0002, 0x0508,
+	0x2001, 0x180c, 0x2004, 0xd0d4, 0x11e0, 0x080c, 0x8ced, 0x2009,
+	0x0041, 0x009e, 0x0804, 0xd294, 0x080c, 0x8ced, 0x6003, 0x0007,
+	0x601b, 0x0000, 0x080c, 0x84a6, 0x009e, 0x0005, 0x2001, 0x0100,
+	0x2004, 0x9082, 0x0005, 0x0aa8, 0x2001, 0x011f, 0x2004, 0x603a,
+	0x0890, 0x2001, 0x180c, 0x200c, 0xc1d4, 0x2102, 0xd1cc, 0x0110,
+	0x080c, 0x2bca, 0x080c, 0x8ced, 0x6014, 0x2048, 0xa97c, 0xd1ec,
+	0x1130, 0x080c, 0x84a6, 0x080c, 0xa0e3, 0x009e, 0x0005, 0x080c,
+	0xda8a, 0x0db8, 0x009e, 0x0005, 0x2001, 0x180c, 0x200c, 0xc1d4,
+	0x2102, 0x0036, 0x080c, 0x8bc0, 0x080c, 0x8ced, 0x6014, 0x0096,
+	0x2048, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x0188,
+	0xa87c, 0x9084, 0x0003, 0x9086, 0x0002, 0x0140, 0xa8ac, 0x6330,
+	0x931a, 0x6332, 0xa8b0, 0x632c, 0x931b, 0x632e, 0x6003, 0x0002,
+	0x0080, 0x2019, 0x0004, 0x080c, 0xd830, 0x6018, 0x9005, 0x1128,
+	0x2001, 0x195f, 0x2004, 0x8003, 0x601a, 0x6017, 0x0000, 0x6003,
+	0x0007, 0x009e, 0x003e, 0x0005, 0x9182, 0x0040, 0x0002, 0xd223,
+	0xd223, 0xd223, 0xd223, 0xd223, 0xd223, 0xd223, 0xd223, 0xd225,
+	0xd223, 0xd223, 0xd223, 0xd223, 0xd223, 0xd223, 0xd223, 0xd223,
+	0xd223, 0xd223, 0xd270, 0x080c, 0x0dfa, 0x6014, 0x0096, 0x2048,
+	0xa834, 0xaa38, 0x6110, 0x00b6, 0x2158, 0xb900, 0x00be, 0xd1bc,
+	0x1190, 0x920d, 0x1518, 0xa87c, 0xd0fc, 0x0128, 0x2009, 0x0041,
+	0x009e, 0x0804, 0xd294, 0x6003, 0x0007, 0x601b, 0x0000, 0x080c,
+	0x84a6, 0x009e, 0x0005, 0x6124, 0xd1f4, 0x1d58, 0x0006, 0x0046,
+	0xacac, 0x9422, 0xa9b0, 0x2200, 0x910b, 0x6030, 0x9420, 0x6432,
+	0x602c, 0x9109, 0x612e, 0x004e, 0x000e, 0x08d8, 0x6110, 0x00b6,
+	0x2158, 0xb900, 0x00be, 0xd1bc, 0x1178, 0x2009, 0x180e, 0x210c,
+	0xd19c, 0x0118, 0x6003, 0x0007, 0x0010, 0x6003, 0x0006, 0x00e9,
+	0x080c, 0x84a8, 0x009e, 0x0005, 0x6003, 0x0002, 0x009e, 0x0005,
+	0x6024, 0xd0f4, 0x0128, 0x080c, 0x1582, 0x1904, 0xd225, 0x0005,
+	0x6014, 0x0096, 0x2048, 0xa834, 0xa938, 0x009e, 0x9105, 0x1120,
+	0x080c, 0x1582, 0x1904, 0xd225, 0x0005, 0xd2fc, 0x0140, 0x8002,
+	0x8000, 0x8212, 0x9291, 0x0000, 0x2009, 0x0009, 0x0010, 0x2009,
+	0x0015, 0xaa9a, 0xa896, 0x0005, 0x9182, 0x0040, 0x0208, 0x0062,
+	0x9186, 0x0013, 0x0120, 0x9186, 0x0014, 0x190c, 0x0dfa, 0x6024,
+	0xd0dc, 0x090c, 0x0dfa, 0x0005, 0xd2b8, 0xd2c4, 0xd2d0, 0xd2dc,
+	0xd2b8, 0xd2b8, 0xd2b8, 0xd2b8, 0xd2bf, 0xd2ba, 0xd2ba, 0xd2b8,
+	0xd2b8, 0xd2b8, 0xd2b8, 0xd2ba, 0xd2b8, 0xd2ba, 0xd2b8, 0xd2bf,
+	0x080c, 0x0dfa, 0x6024, 0xd0dc, 0x090c, 0x0dfa, 0x0005, 0x6014,
+	0x9005, 0x190c, 0x0dfa, 0x0005, 0x6003, 0x0001, 0x6106, 0x080c,
+	0x8679, 0x0126, 0x2091, 0x8000, 0x080c, 0x8c10, 0x012e, 0x0005,
+	0x6003, 0x0001, 0x6106, 0x080c, 0x8679, 0x0126, 0x2091, 0x8000,
+	0x080c, 0x8c10, 0x012e, 0x0005, 0x6003, 0x0003, 0x6106, 0x2c10,
+	0x080c, 0x1afe, 0x0126, 0x2091, 0x8000, 0x080c, 0x86de, 0x080c,
+	0x8ced, 0x012e, 0x0005, 0x0126, 0x2091, 0x8000, 0x0036, 0x0096,
+	0x9182, 0x0040, 0x0023, 0x009e, 0x003e, 0x012e, 0x0005, 0xd30b,
+	0xd30d, 0xd31f, 0xd339, 0xd30b, 0xd30b, 0xd30b, 0xd30b, 0xd30b,
+	0xd30b, 0xd30b, 0xd30b, 0xd30b, 0xd30b, 0xd30b, 0xd30b, 0xd30b,
+	0xd30b, 0xd30b, 0xd30b, 0x080c, 0x0dfa, 0x6014, 0x2048, 0xa87c,
+	0xd0fc, 0x01f8, 0x909c, 0x0003, 0x939e, 0x0003, 0x01d0, 0x6003,
+	0x0001, 0x6106, 0x080c, 0x8679, 0x080c, 0x8c10, 0x0470, 0x6014,
+	0x2048, 0xa87c, 0xd0fc, 0x0168, 0x909c, 0x0003, 0x939e, 0x0003,
+	0x0140, 0x6003, 0x0001, 0x6106, 0x080c, 0x8679, 0x080c, 0x8c10,
+	0x00e0, 0x901e, 0x6316, 0x631a, 0x2019, 0x0004, 0x080c, 0xd830,
+	0x00a0, 0x6014, 0x2048, 0xa87c, 0xd0fc, 0x0d98, 0x909c, 0x0003,
+	0x939e, 0x0003, 0x0d70, 0x6003, 0x0003, 0x6106, 0x2c10, 0x080c,
+	0x1afe, 0x080c, 0x86de, 0x080c, 0x8ced, 0x0005, 0x080c, 0x8b04,
+	0x6114, 0x81ff, 0x0158, 0x0096, 0x2148, 0x080c, 0xdb2e, 0x0036,
+	0x2019, 0x0029, 0x080c, 0xd830, 0x003e, 0x009e, 0x080c, 0xa113,
+	0x080c, 0x8c10, 0x0005, 0x080c, 0x8bc0, 0x6114, 0x81ff, 0x0158,
+	0x0096, 0x2148, 0x080c, 0xdb2e, 0x0036, 0x2019, 0x0029, 0x080c,
+	0xd830, 0x003e, 0x009e, 0x080c, 0xa113, 0x080c, 0x8ced, 0x0005,
+	0x9182, 0x0085, 0x0002, 0xd38a, 0xd388, 0xd388, 0xd396, 0xd388,
+	0xd388, 0xd388, 0xd388, 0xd388, 0xd388, 0xd388, 0xd388, 0xd388,
+	0x080c, 0x0dfa, 0x6003, 0x000b, 0x6106, 0x080c, 0x8679, 0x0126,
+	0x2091, 0x8000, 0x080c, 0x8c10, 0x012e, 0x0005, 0x0026, 0x00e6,
+	0x080c, 0xda81, 0x0118, 0x080c, 0xa0e3, 0x0450, 0x2071, 0x0260,
+	0x7224, 0x6216, 0x2001, 0x180e, 0x2004, 0xd0e4, 0x0150, 0x6010,
+	0x00b6, 0x2058, 0xbca0, 0x00be, 0x2c00, 0x2011, 0x014e, 0x080c,
+	0xa403, 0x7220, 0x080c, 0xd6d6, 0x0118, 0x6007, 0x0086, 0x0040,
+	0x6007, 0x0087, 0x7224, 0x9296, 0xffff, 0x1110, 0x6007, 0x0086,
+	0x6003, 0x0001, 0x080c, 0x8679, 0x080c, 0x8c10, 0x080c, 0x8ced,
+	0x00ee, 0x002e, 0x0005, 0x9186, 0x0013, 0x1160, 0x6004, 0x908a,
+	0x0085, 0x0a0c, 0x0dfa, 0x908a, 0x0092, 0x1a0c, 0x0dfa, 0x9082,
+	0x0085, 0x00a2, 0x9186, 0x0027, 0x0130, 0x9186, 0x0014, 0x0118,
+	0x080c, 0xa178, 0x0050, 0x2001, 0x0007, 0x080c, 0x641c, 0x080c,
+	0x8b04, 0x080c, 0xa113, 0x080c, 0x8c10, 0x0005, 0xd3fb, 0xd3fd,
+	0xd3fd, 0xd3fb, 0xd3fb, 0xd3fb, 0xd3fb, 0xd3fb, 0xd3fb, 0xd3fb,
+	0xd3fb, 0xd3fb, 0xd3fb, 0x080c, 0x0dfa, 0x080c, 0x8b04, 0x080c,
+	0xa113, 0x080c, 0x8c10, 0x0005, 0x9182, 0x0085, 0x0a0c, 0x0dfa,
+	0x9182, 0x0092, 0x1a0c, 0x0dfa, 0x9182, 0x0085, 0x0002, 0xd41c,
+	0xd41c, 0xd41c, 0xd41e, 0xd41c, 0xd41c, 0xd41c, 0xd41c, 0xd41c,
+	0xd41c, 0xd41c, 0xd41c, 0xd41c, 0x080c, 0x0dfa, 0x0005, 0x9186,
+	0x0013, 0x0148, 0x9186, 0x0014, 0x0130, 0x9186, 0x0027, 0x0118,
+	0x080c, 0xa178, 0x0030, 0x080c, 0x8b04, 0x080c, 0xa113, 0x080c,
+	0x8c10, 0x0005, 0x0036, 0x080c, 0xdae2, 0x6043, 0x0000, 0x2019,
+	0x000b, 0x0031, 0x6023, 0x0006, 0x6003, 0x0007, 0x003e, 0x0005,
+	0x0126, 0x0036, 0x2091, 0x8000, 0x0086, 0x2c40, 0x0096, 0x904e,
+	0x080c, 0x9a58, 0x009e, 0x008e, 0x1550, 0x0076, 0x2c38, 0x080c,
+	0x9b03, 0x007e, 0x1520, 0x6000, 0x9086, 0x0000, 0x0500, 0x6020,
+	0x9086, 0x0007, 0x01e0, 0x0096, 0x601c, 0xd084, 0x0140, 0x080c,
+	0xdae2, 0x080c, 0xc551, 0x080c, 0x19b4, 0x6023, 0x0007, 0x6014,
+	0x2048, 0x080c, 0xbe37, 0x0110, 0x080c, 0xd830, 0x009e, 0x6017,
+	0x0000, 0x080c, 0xdae2, 0x6023, 0x0007, 0x080c, 0xc551, 0x003e,
+	0x012e, 0x0005, 0x00f6, 0x00c6, 0x00b6, 0x0036, 0x0156, 0x2079,
+	0x0260, 0x7938, 0x783c, 0x080c, 0x276e, 0x15c8, 0x0016, 0x00c6,
+	0x080c, 0x649f, 0x1590, 0x001e, 0x00c6, 0x2160, 0x080c, 0xc54e,
+	0x00ce, 0x002e, 0x0026, 0x0016, 0x2019, 0x0029, 0x080c, 0x9bc9,
+	0x080c, 0x8803, 0x0076, 0x903e, 0x080c, 0x86f1, 0x007e, 0x001e,
+	0x0076, 0x903e, 0x080c, 0xd5f6, 0x007e, 0x0026, 0xba04, 0x9294,
+	0xff00, 0x8217, 0x9286, 0x0006, 0x0118, 0x9286, 0x0004, 0x1118,
+	0xbaa0, 0x080c, 0x3248, 0x002e, 0xbcb0, 0x001e, 0x080c, 0x5f45,
+	0xbe12, 0xbd16, 0xbcb2, 0x9006, 0x0010, 0x00ce, 0x001e, 0x015e,
+	0x003e, 0x00be, 0x00ce, 0x00fe, 0x0005, 0x00c6, 0x00d6, 0x00b6,
+	0x0016, 0x2009, 0x1823, 0x2104, 0x9086, 0x0074, 0x1904, 0xd51e,
+	0x2069, 0x0260, 0x6944, 0x9182, 0x0100, 0x06e0, 0x6940, 0x9184,
+	0x8000, 0x0904, 0xd51b, 0x2001, 0x1954, 0x2004, 0x9005, 0x1140,
+	0x6010, 0x2058, 0xb8b0, 0x9005, 0x0118, 0x9184, 0x0800, 0x0598,
+	0x6948, 0x918a, 0x0001, 0x0648, 0x080c, 0xdb96, 0x0118, 0x6978,
+	0xd1fc, 0x11b8, 0x2009, 0x0205, 0x200b, 0x0001, 0x693c, 0x81ff,
+	0x1198, 0x6944, 0x9182, 0x0100, 0x02a8, 0x6940, 0x81ff, 0x1178,
+	0x6948, 0x918a, 0x0001, 0x0288, 0x6950, 0x918a, 0x0001, 0x0298,
+	0x00d0, 0x6017, 0x0100, 0x00a0, 0x6017, 0x0300, 0x0088, 0x6017,
+	0x0500, 0x0070, 0x6017, 0x0700, 0x0058, 0x6017, 0x0900, 0x0040,
+	0x6017, 0x0b00, 0x0028, 0x6017, 0x0f00, 0x0010, 0x6017, 0x2d00,
+	0x9085, 0x0001, 0x0008, 0x9006, 0x001e, 0x00be, 0x00de, 0x00ce,
+	0x0005, 0x00c6, 0x00b6, 0x0026, 0x0036, 0x0156, 0x6210, 0x2258,
+	0xbb04, 0x9394, 0x00ff, 0x9286, 0x0006, 0x0180, 0x9286, 0x0004,
+	0x0168, 0x9394, 0xff00, 0x8217, 0x9286, 0x0006, 0x0138, 0x9286,
+	0x0004, 0x0120, 0x080c, 0x64ae, 0x0804, 0xd585, 0x2011, 0x0276,
+	0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019, 0x000a, 0x080c, 0xb0d0,
+	0x009e, 0x15a0, 0x2011, 0x027a, 0x20a9, 0x0004, 0x0096, 0x2b48,
+	0x2019, 0x0006, 0x080c, 0xb0d0, 0x009e, 0x1540, 0x0046, 0x0016,
+	0xbaa0, 0x2220, 0x9006, 0x2009, 0x185c, 0x210c, 0x0038, 0x2009,
+	0x0029, 0x080c, 0xd885, 0xb800, 0xc0e5, 0xb802, 0x2019, 0x0029,
+	0x080c, 0x8803, 0x0076, 0x2039, 0x0000, 0x080c, 0x86f1, 0x2c08,
+	0x080c, 0xd5f6, 0x007e, 0x2001, 0x0007, 0x080c, 0x641c, 0x2001,
+	0x0007, 0x080c, 0x63f0, 0x001e, 0x004e, 0x9006, 0x015e, 0x003e,
+	0x002e, 0x00be, 0x00ce, 0x0005, 0x00d6, 0x2069, 0x026e, 0x6800,
+	0x9086, 0x0800, 0x0118, 0x6017, 0x0000, 0x0008, 0x9006, 0x00de,
+	0x0005, 0x00b6, 0x00f6, 0x0016, 0x0026, 0x0036, 0x0156, 0x2079,
+	0x026c, 0x7930, 0x7834, 0x080c, 0x276e, 0x11d0, 0x080c, 0x649f,
+	0x11b8, 0x2011, 0x0270, 0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019,
+	0x000a, 0x080c, 0xb0d0, 0x009e, 0x1158, 0x2011, 0x0274, 0x20a9,
+	0x0004, 0x0096, 0x2b48, 0x2019, 0x0006, 0x080c, 0xb0d0, 0x009e,
+	0x015e, 0x003e, 0x002e, 0x001e, 0x00fe, 0x00be, 0x0005, 0x00b6,
+	0x0006, 0x0016, 0x0026, 0x0036, 0x0156, 0x2011, 0x0263, 0x2204,
+	0x8211, 0x220c, 0x080c, 0x276e, 0x11d0, 0x080c, 0x649f, 0x11b8,
+	0x2011, 0x0276, 0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019, 0x000a,
+	0x080c, 0xb0d0, 0x009e, 0x1158, 0x2011, 0x027a, 0x20a9, 0x0004,
+	0x0096, 0x2b48, 0x2019, 0x0006, 0x080c, 0xb0d0, 0x009e, 0x015e,
+	0x003e, 0x002e, 0x001e, 0x000e, 0x00be, 0x0005, 0x00e6, 0x00c6,
+	0x0086, 0x0076, 0x0066, 0x0056, 0x0046, 0x0026, 0x0126, 0x2091,
+	0x8000, 0x2740, 0x2029, 0x19c8, 0x252c, 0x2021, 0x19ce, 0x2424,
+	0x2061, 0x1cd0, 0x2071, 0x1800, 0x7650, 0x7070, 0x81ff, 0x0150,
+	0x0006, 0x9186, 0x1a8a, 0x000e, 0x0128, 0x8001, 0x9602, 0x1a04,
+	0xd68f, 0x0018, 0x9606, 0x0904, 0xd68f, 0x2100, 0x9c06, 0x0904,
+	0xd686, 0x080c, 0xd8c6, 0x1904, 0xd686, 0x080c, 0xdbb3, 0x0904,
+	0xd686, 0x080c, 0xd8b6, 0x0904, 0xd686, 0x6720, 0x9786, 0x0001,
+	0x1148, 0x080c, 0x32df, 0x0904, 0xd6aa, 0x6004, 0x9086, 0x0000,
+	0x1904, 0xd6aa, 0x9786, 0x0004, 0x0904, 0xd6aa, 0x9786, 0x0007,
+	0x0904, 0xd686, 0x2500, 0x9c06, 0x0904, 0xd686, 0x2400, 0x9c06,
+	0x05e8, 0x88ff, 0x0118, 0x6054, 0x9906, 0x15c0, 0x0096, 0x6000,
+	0x9086, 0x0004, 0x1120, 0x0016, 0x080c, 0x19b4, 0x001e, 0x9786,
+	0x000a, 0x0148, 0x080c, 0xc03f, 0x1130, 0x080c, 0xaa81, 0x009e,
+	0x080c, 0xa113, 0x0418, 0x6014, 0x2048, 0x080c, 0xbe37, 0x01d8,
+	0x9786, 0x0003, 0x1570, 0xa867, 0x0103, 0xa87c, 0xd0cc, 0x0130,
+	0x0096, 0xa878, 0x2048, 0x080c, 0x0fe3, 0x009e, 0xab7a, 0xa877,
+	0x0000, 0x080c, 0xdb2e, 0x0016, 0x080c, 0xc12d, 0x080c, 0x6adc,
+	0x001e, 0x080c, 0xc022, 0x009e, 0x080c, 0xa113, 0x9ce0, 0x0018,
+	0x2001, 0x1819, 0x2004, 0x9c02, 0x1210, 0x0804, 0xd60a, 0x012e,
+	0x002e, 0x004e, 0x005e, 0x006e, 0x007e, 0x008e, 0x00ce, 0x00ee,
+	0x0005, 0x9786, 0x0006, 0x1150, 0x9386, 0x0005, 0x0128, 0x080c,
+	0xdb2e, 0x080c, 0xd830, 0x08f8, 0x009e, 0x0c00, 0x9786, 0x000a,
+	0x0968, 0x0808, 0x81ff, 0x09d0, 0x9180, 0x0001, 0x2004, 0x9086,
+	0x0018, 0x0130, 0x9180, 0x0001, 0x2004, 0x9086, 0x002d, 0x1970,
+	0x6000, 0x9086, 0x0002, 0x1950, 0x080c, 0xc02e, 0x0130, 0x080c,
+	0xc03f, 0x1920, 0x080c, 0xaa81, 0x0038, 0x080c, 0x31b4, 0x080c,
+	0xc03f, 0x1110, 0x080c, 0xaa81, 0x080c, 0xa113, 0x0804, 0xd686,
+	0xa864, 0x9084, 0x00ff, 0x9086, 0x0039, 0x0005, 0x00c6, 0x00e6,
+	0x0016, 0x2c08, 0x2170, 0x9006, 0x080c, 0xd857, 0x001e, 0x0120,
+	0x6020, 0x9084, 0x000f, 0x001b, 0x00ee, 0x00ce, 0x0005, 0xd6f5,
+	0xd6f5, 0xd6f5, 0xd6f5, 0xd6f5, 0xd6f5, 0xd6f7, 0xd6f5, 0xd6f5,
+	0xd6f5, 0xd6f5, 0xa113, 0xa113, 0xd6f5, 0x9006, 0x0005, 0x0036,
+	0x0046, 0x0016, 0x7010, 0x00b6, 0x2058, 0xbca0, 0x00be, 0x2c00,
+	0x2009, 0x0020, 0x080c, 0xd885, 0x001e, 0x004e, 0x2019, 0x0002,
+	0x080c, 0xd440, 0x003e, 0x9085, 0x0001, 0x0005, 0x0096, 0x080c,
+	0xbe37, 0x0140, 0x6014, 0x904d, 0x080c, 0xba56, 0x687b, 0x0005,
+	0x080c, 0x6ae9, 0x009e, 0x080c, 0xa113, 0x9085, 0x0001, 0x0005,
+	0x2001, 0x0001, 0x080c, 0x63dc, 0x0156, 0x0016, 0x0026, 0x0036,
+	0x20a9, 0x0004, 0x2019, 0x1805, 0x2011, 0x0276, 0x080c, 0xb0bc,
+	0x003e, 0x002e, 0x001e, 0x015e, 0x9005, 0x0005, 0x00f6, 0x00e6,
+	0x00c6, 0x0086, 0x0076, 0x0066, 0x00b6, 0x0126, 0x2091, 0x8000,
+	0x2740, 0x2061, 0x1cd0, 0x2079, 0x0001, 0x8fff, 0x0904, 0xd790,
+	0x2071, 0x1800, 0x7650, 0x7070, 0x8001, 0x9602, 0x1a04, 0xd790,
+	0x88ff, 0x0120, 0x2800, 0x9c06, 0x1590, 0x2078, 0x080c, 0xd8b6,
+	0x0570, 0x2400, 0x9c06, 0x0558, 0x6720, 0x9786, 0x0006, 0x1538,
+	0x9786, 0x0007, 0x0520, 0x88ff, 0x1140, 0x6010, 0x9b06, 0x11f8,
+	0x85ff, 0x0118, 0x6054, 0x9106, 0x11d0, 0x0096, 0x601c, 0xd084,
+	0x0140, 0x080c, 0xdae2, 0x080c, 0xc551, 0x080c, 0x19b4, 0x6023,
+	0x0007, 0x6014, 0x2048, 0x080c, 0xbe37, 0x0120, 0x0046, 0x080c,
+	0xd830, 0x004e, 0x009e, 0x080c, 0xa113, 0x88ff, 0x1198, 0x9ce0,
+	0x0018, 0x2001, 0x1819, 0x2004, 0x9c02, 0x1210, 0x0804, 0xd745,
+	0x9006, 0x012e, 0x00be, 0x006e, 0x007e, 0x008e, 0x00ce, 0x00ee,
+	0x00fe, 0x0005, 0x98c5, 0x0001, 0x0ca0, 0x00b6, 0x0076, 0x0056,
+	0x0086, 0x9046, 0x2029, 0x0001, 0x2c20, 0x2019, 0x0002, 0x6210,
+	0x2258, 0x0096, 0x904e, 0x080c, 0x9a58, 0x009e, 0x008e, 0x903e,
+	0x080c, 0x9b03, 0x080c, 0xd736, 0x005e, 0x007e, 0x00be, 0x0005,
+	0x00b6, 0x0046, 0x0056, 0x0076, 0x00c6, 0x0156, 0x2c20, 0x2128,
+	0x20a9, 0x007f, 0x900e, 0x0016, 0x0036, 0x080c, 0x649f, 0x1190,
+	0x0056, 0x0086, 0x9046, 0x2508, 0x2029, 0x0001, 0x0096, 0x904e,
+	0x080c, 0x9a58, 0x009e, 0x008e, 0x903e, 0x080c, 0x9b03, 0x080c,
+	0xd736, 0x005e, 0x003e, 0x001e, 0x8108, 0x1f04, 0xd7c3, 0x015e,
+	0x00ce, 0x007e, 0x005e, 0x004e, 0x00be, 0x0005, 0x00b6, 0x0076,
+	0x0056, 0x6210, 0x2258, 0x0086, 0x9046, 0x2029, 0x0001, 0x2019,
+	0x0048, 0x0096, 0x904e, 0x080c, 0x9a58, 0x009e, 0x008e, 0x903e,
+	0x080c, 0x9b03, 0x2c20, 0x080c, 0xd736, 0x005e, 0x007e, 0x00be,
+	0x0005, 0x00b6, 0x0046, 0x0056, 0x0076, 0x00c6, 0x0156, 0x2c20,
+	0x20a9, 0x0800, 0x900e, 0x0016, 0x0036, 0x080c, 0x649f, 0x11a0,
+	0x0086, 0x9046, 0x2828, 0x0046, 0x2021, 0x0001, 0x080c, 0xdac6,
+	0x004e, 0x0096, 0x904e, 0x080c, 0x9a58, 0x009e, 0x008e, 0x903e,
+	0x080c, 0x9b03, 0x080c, 0xd736, 0x003e, 0x001e, 0x8108, 0x1f04,
+	0xd80b, 0x015e, 0x00ce, 0x007e, 0x005e, 0x004e, 0x00be, 0x0005,
+	0x0016, 0x00f6, 0x080c, 0xbe35, 0x0198, 0xa864, 0x9084, 0x00ff,
+	0x9086, 0x0046, 0x0180, 0xa800, 0x907d, 0x0138, 0xa803, 0x0000,
+	0xab82, 0x080c, 0x6ae9, 0x2f48, 0x0cb0, 0xab82, 0x080c, 0x6ae9,
+	0x00fe, 0x001e, 0x0005, 0xa800, 0x907d, 0x0130, 0xa803, 0x0000,
+	0x080c, 0x6ae9, 0x2f48, 0x0cb8, 0x080c, 0x6ae9, 0x0c88, 0x00e6,
+	0x0046, 0x0036, 0x2061, 0x1cd0, 0x9005, 0x1138, 0x2071, 0x1800,
+	0x7450, 0x7070, 0x8001, 0x9402, 0x12d8, 0x2100, 0x9c06, 0x0168,
+	0x6000, 0x9086, 0x0000, 0x0148, 0x6008, 0x9206, 0x1130, 0x6010,
+	0x91a0, 0x0004, 0x2424, 0x9406, 0x0140, 0x9ce0, 0x0018, 0x2001,
+	0x1819, 0x2004, 0x9c02, 0x1220, 0x0c40, 0x9085, 0x0001, 0x0008,
+	0x9006, 0x003e, 0x004e, 0x00ee, 0x0005, 0x0096, 0x0006, 0x080c,
+	0x1031, 0x000e, 0x090c, 0x0dfa, 0xaae2, 0xa867, 0x010d, 0xa88e,
+	0x0026, 0x2010, 0x080c, 0xbe25, 0x2001, 0x0000, 0x0120, 0x2200,
+	0x9080, 0x0015, 0x2004, 0x002e, 0xa87a, 0x9186, 0x0020, 0x0110,
+	0xa8e3, 0xffff, 0xa986, 0xac76, 0xa87f, 0x0000, 0x2001, 0x1966,
+	0x2004, 0xa882, 0x9006, 0xa802, 0xa86a, 0xa88a, 0x0126, 0x2091,
+	0x8000, 0x080c, 0x6ae9, 0x012e, 0x009e, 0x0005, 0x6700, 0x9786,
+	0x0000, 0x0158, 0x9786, 0x0001, 0x0140, 0x9786, 0x000a, 0x0128,
+	0x9786, 0x0009, 0x0110, 0x9085, 0x0001, 0x0005, 0x00e6, 0x6010,
+	0x9075, 0x0138, 0x00b6, 0x2058, 0xb8a0, 0x00be, 0x9206, 0x00ee,
+	0x0005, 0x9085, 0x0001, 0x0cd8, 0x0016, 0x6004, 0x908e, 0x001e,
+	0x11a0, 0x8007, 0x6134, 0x918c, 0x00ff, 0x9105, 0x6036, 0x6007,
+	0x0085, 0x6003, 0x000b, 0x6023, 0x0005, 0x2001, 0x195f, 0x2004,
+	0x601a, 0x080c, 0x8679, 0x080c, 0x8c10, 0x001e, 0x0005, 0xa001,
+	0xa001, 0x0005, 0x6024, 0xd0e4, 0x0158, 0xd0cc, 0x0118, 0x080c,
+	0xc171, 0x0030, 0x080c, 0xdae2, 0x080c, 0x84a6, 0x080c, 0xa0e3,
+	0x0005, 0x9280, 0x0008, 0x2004, 0x9084, 0x000f, 0x0002, 0xd915,
+	0xd915, 0xd915, 0xd917, 0xd915, 0xd917, 0xd917, 0xd915, 0xd917,
+	0xd915, 0xd915, 0xd915, 0xd915, 0xd915, 0x9006, 0x0005, 0x9085,
+	0x0001, 0x0005, 0x9280, 0x0008, 0x2004, 0x9084, 0x000f, 0x0002,
+	0xd92e, 0xd92e, 0xd92e, 0xd92e, 0xd92e, 0xd92e, 0xd93b, 0xd92e,
+	0xd92e, 0xd92e, 0xd92e, 0xd92e, 0xd92e, 0xd92e, 0x6007, 0x003b,
+	0x602f, 0x0009, 0x6017, 0x2a00, 0x6003, 0x0001, 0x080c, 0x8679,
+	0x080c, 0x8c10, 0x0005, 0x0096, 0x00c6, 0x2260, 0x080c, 0xdae2,
+	0x6043, 0x0000, 0x6024, 0xc0f4, 0xc0e4, 0x6026, 0x603b, 0x0000,
+	0x00ce, 0x00d6, 0x2268, 0x9186, 0x0007, 0x1904, 0xd994, 0x6814,
+	0x9005, 0x0138, 0x2048, 0xa87c, 0xd0fc, 0x1118, 0x00de, 0x009e,
+	0x08a8, 0x6007, 0x003a, 0x6003, 0x0001, 0x080c, 0x8679, 0x080c,
+	0x8c10, 0x00c6, 0x2d60, 0x6100, 0x9186, 0x0002, 0x1904, 0xda0b,
+	0x6014, 0x9005, 0x1138, 0x6000, 0x9086, 0x0007, 0x190c, 0x0dfa,
+	0x0804, 0xda0b, 0x2048, 0x080c, 0xbe37, 0x1130, 0x0028, 0x2048,
+	0xa800, 0x9005, 0x1de0, 0x2900, 0x2048, 0xa87c, 0x9084, 0x0003,
+	0x9086, 0x0002, 0x1168, 0xa87c, 0xc0dc, 0xc0f4, 0xa87e, 0xa880,
+	0xc0fc, 0xa882, 0x2009, 0x0043, 0x080c, 0xd294, 0x0804, 0xda0b,
+	0x2009, 0x0041, 0x0804, 0xda05, 0x9186, 0x0005, 0x15a0, 0x6814,
+	0x2048, 0xa87c, 0xd0bc, 0x1120, 0x00de, 0x009e, 0x0804, 0xd92e,
+	0xd0b4, 0x0128, 0xd0fc, 0x090c, 0x0dfa, 0x0804, 0xd94f, 0x6007,
+	0x003a, 0x6003, 0x0001, 0x080c, 0x8679, 0x080c, 0x8c10, 0x00c6,
+	0x2d60, 0x6100, 0x9186, 0x0002, 0x0120, 0x9186, 0x0004, 0x1904,
+	0xda0b, 0x6814, 0x2048, 0xa97c, 0xc1f4, 0xc1dc, 0xa97e, 0xa980,
+	0xc1fc, 0xc1bc, 0xa982, 0x00f6, 0x2c78, 0x080c, 0x16db, 0x00fe,
+	0x2009, 0x0042, 0x04d0, 0x0036, 0x080c, 0x1031, 0x090c, 0x0dfa,
+	0xa867, 0x010d, 0x9006, 0xa802, 0xa86a, 0xa88a, 0x2d18, 0xab8e,
+	0xa887, 0x0045, 0x2c00, 0xa892, 0x6038, 0xa8a2, 0x2360, 0x6024,
+	0xc0dd, 0x6026, 0x6010, 0x00b6, 0x2058, 0xb8a0, 0x00be, 0x2004,
+	0x6354, 0xab7a, 0xa876, 0x9006, 0xa87e, 0xa882, 0xad9a, 0xae96,
+	0xa89f, 0x0001, 0x080c, 0x6ae9, 0x2019, 0x0045, 0x6008, 0x2068,
+	0x080c, 0xd440, 0x2d00, 0x600a, 0x6023, 0x0006, 0x6003, 0x0007,
+	0x901e, 0x631a, 0x6342, 0x003e, 0x0038, 0x6043, 0x0000, 0x6003,
+	0x0007, 0x080c, 0xd294, 0x00ce, 0x00de, 0x009e, 0x0005, 0x9186,
+	0x0013, 0x1128, 0x6004, 0x9082, 0x0085, 0x2008, 0x00c2, 0x9186,
+	0x0027, 0x1178, 0x080c, 0x8b04, 0x0036, 0x0096, 0x6014, 0x2048,
+	0x2019, 0x0004, 0x080c, 0xd830, 0x009e, 0x003e, 0x080c, 0x8c10,
+	0x0005, 0x9186, 0x0014, 0x0d70, 0x080c, 0xa178, 0x0005, 0xda3e,
+	0xda3c, 0xda3c, 0xda3c, 0xda3c, 0xda3c, 0xda3e, 0xda3c, 0xda3c,
+	0xda3c, 0xda3c, 0xda3c, 0xda3c, 0x080c, 0x0dfa, 0x080c, 0x8b04,
+	0x6003, 0x000c, 0x080c, 0x8c10, 0x0005, 0x9182, 0x0092, 0x1220,
+	0x9182, 0x0085, 0x0208, 0x001a, 0x080c, 0xa178, 0x0005, 0xda5c,
+	0xda5c, 0xda5c, 0xda5c, 0xda5e, 0xda7e, 0xda5c, 0xda5c, 0xda5c,
+	0xda5c, 0xda5c, 0xda5c, 0xda5c, 0x080c, 0x0dfa, 0x00d6, 0x2c68,
+	0x080c, 0xa08d, 0x01b0, 0x6003, 0x0001, 0x6007, 0x001e, 0x2009,
+	0x026e, 0x210c, 0x613a, 0x2009, 0x026f, 0x210c, 0x613e, 0x600b,
+	0xffff, 0x6910, 0x6112, 0x6023, 0x0004, 0x080c, 0x8679, 0x080c,
+	0x8c10, 0x2d60, 0x080c, 0xa0e3, 0x00de, 0x0005, 0x080c, 0xa0e3,
+	0x0005, 0x00e6, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0ec,
+	0x00ee, 0x0005, 0x2009, 0x187b, 0x210c, 0xd1ec, 0x05b0, 0x6003,
+	0x0002, 0x6024, 0xc0e5, 0x6026, 0xd0cc, 0x0150, 0x2001, 0x1960,
+	0x2004, 0x6042, 0x2009, 0x187b, 0x210c, 0xd1f4, 0x1520, 0x00a0,
+	0x2009, 0x187b, 0x210c, 0xd1f4, 0x0128, 0x6024, 0xc0e4, 0x6026,
+	0x9006, 0x00d8, 0x2001, 0x1960, 0x200c, 0x2001, 0x195e, 0x2004,
+	0x9100, 0x9080, 0x000a, 0x6042, 0x6010, 0x00b6, 0x2058, 0xb8ac,
+	0x00be, 0x0008, 0x2104, 0x9005, 0x0118, 0x9088, 0x0003, 0x0cd0,
+	0x2c0a, 0x600f, 0x0000, 0x9085, 0x0001, 0x0005, 0x0016, 0x00c6,
+	0x00e6, 0x6154, 0xb8ac, 0x2060, 0x8cff, 0x0180, 0x84ff, 0x1118,
+	0x6054, 0x9106, 0x1138, 0x600c, 0x2072, 0x080c, 0x84a6, 0x080c,
+	0xa0e3, 0x0010, 0x9cf0, 0x0003, 0x2e64, 0x0c70, 0x00ee, 0x00ce,
+	0x001e, 0x0005, 0x00d6, 0x00b6, 0x6010, 0x2058, 0xb8ac, 0x2068,
+	0x9005, 0x0130, 0x9c06, 0x0110, 0x680c, 0x0cd0, 0x600c, 0x680e,
+	0x00be, 0x00de, 0x0005, 0x0026, 0x0036, 0x0156, 0x2011, 0x182b,
+	0x2204, 0x9084, 0x00ff, 0x2019, 0x026e, 0x2334, 0x9636, 0x1508,
+	0x8318, 0x2334, 0x2204, 0x9084, 0xff00, 0x9636, 0x11d0, 0x2011,
+	0x0270, 0x20a9, 0x0004, 0x6010, 0x0096, 0x2048, 0x2019, 0x000a,
+	0x080c, 0xb0d0, 0x009e, 0x1168, 0x2011, 0x0274, 0x20a9, 0x0004,
+	0x6010, 0x0096, 0x2048, 0x2019, 0x0006, 0x080c, 0xb0d0, 0x009e,
+	0x1100, 0x015e, 0x003e, 0x002e, 0x0005, 0x00e6, 0x2071, 0x1800,
+	0x080c, 0x5ebe, 0x080c, 0x2f6c, 0x00ee, 0x0005, 0x00e6, 0x6010,
+	0x00b6, 0x2058, 0xb800, 0x00be, 0xd0fc, 0x0108, 0x0011, 0x00ee,
+	0x0005, 0xa880, 0xc0e5, 0xa882, 0x0005, 0x00e6, 0x00d6, 0x00c6,
+	0x0076, 0x0066, 0x0056, 0x0046, 0x0026, 0x0016, 0x0126, 0x2091,
+	0x8000, 0x2029, 0x19c8, 0x252c, 0x2021, 0x19ce, 0x2424, 0x2061,
+	0x1cd0, 0x2071, 0x1800, 0x7650, 0x7070, 0x9606, 0x0578, 0x6720,
+	0x9786, 0x0001, 0x0118, 0x9786, 0x0008, 0x1500, 0x2500, 0x9c06,
+	0x01e8, 0x2400, 0x9c06, 0x01d0, 0x080c, 0xd8b6, 0x01b8, 0x080c,
+	0xd8c6, 0x11a0, 0x6000, 0x9086, 0x0004, 0x1120, 0x0016, 0x080c,
+	0x19b4, 0x001e, 0x080c, 0xc02e, 0x1110, 0x080c, 0x31b4, 0x080c,
+	0xc03f, 0x1110, 0x080c, 0xaa81, 0x080c, 0xa113, 0x9ce0, 0x0018,
+	0x2001, 0x1819, 0x2004, 0x9c02, 0x1208, 0x0858, 0x012e, 0x001e,
+	0x002e, 0x004e, 0x005e, 0x006e, 0x007e, 0x00ce, 0x00de, 0x00ee,
+	0x0005, 0x2001, 0x1810, 0x2004, 0xd0dc, 0x0005, 0x0006, 0x2001,
+	0x1836, 0x2004, 0xd09c, 0x000e, 0x0005, 0x0006, 0x0036, 0x0046,
+	0x080c, 0xc539, 0x0168, 0x2019, 0xffff, 0x9005, 0x0128, 0x6010,
+	0x00b6, 0x2058, 0xbba0, 0x00be, 0x2021, 0x0004, 0x080c, 0x4cbc,
+	0x004e, 0x003e, 0x000e, 0x6004, 0x9086, 0x0001, 0x1128, 0x080c,
+	0x9bc9, 0x080c, 0xa113, 0x9006, 0x0005, 0x00e6, 0x00c6, 0x00b6,
+	0x0046, 0x2061, 0x1cd0, 0x2071, 0x1800, 0x7450, 0x7070, 0x8001,
+	0x9402, 0x12d8, 0x2100, 0x9c06, 0x0168, 0x6000, 0x9086, 0x0000,
+	0x0148, 0x6010, 0x2058, 0xb8a0, 0x9206, 0x1120, 0x6004, 0x9086,
+	0x0002, 0x0140, 0x9ce0, 0x0018, 0x2001, 0x1819, 0x2004, 0x9c02,
+	0x1220, 0x0c40, 0x9085, 0x0001, 0x0008, 0x9006, 0x004e, 0x00be,
+	0x00ce, 0x00ee, 0x0005, 0x0126, 0x0006, 0x00e6, 0x0016, 0x2091,
+	0x8000, 0x2071, 0x1840, 0xd5a4, 0x0118, 0x7054, 0x8000, 0x7056,
+	0xd5b4, 0x0118, 0x7050, 0x8000, 0x7052, 0xd5ac, 0x0178, 0x2500,
+	0x9084, 0x0007, 0x908e, 0x0003, 0x0148, 0x908e, 0x0004, 0x0130,
+	0x908e, 0x0005, 0x0118, 0x2071, 0x184a, 0x0089, 0x001e, 0x00ee,
+	0x000e, 0x012e, 0x0005, 0x0126, 0x0006, 0x00e6, 0x2091, 0x8000,
+	0x2071, 0x1842, 0x0021, 0x00ee, 0x000e, 0x012e, 0x0005, 0x2e04,
+	0x8000, 0x2072, 0x1220, 0x8e70, 0x2e04, 0x8000, 0x2072, 0x0005,
+	0x00e6, 0x2071, 0x1840, 0x0c99, 0x00ee, 0x0005, 0x00e6, 0x2071,
+	0x1844, 0x0c69, 0x00ee, 0x0005, 0x0126, 0x0006, 0x00e6, 0x2091,
+	0x8000, 0x2071, 0x1840, 0x7064, 0x8000, 0x7066, 0x00ee, 0x000e,
+	0x012e, 0x0005, 0x0003, 0x000b, 0x04a6, 0x0000, 0xc000, 0x0001,
+	0x8064, 0x0008, 0x0010, 0x0000, 0x8066, 0x0000, 0x0101, 0x0008,
+	0x4407, 0x0003, 0x8060, 0x0000, 0x0400, 0x0000, 0x580d, 0x000b,
+	0x798e, 0x0003, 0x50db, 0x000b, 0x4c0a, 0x0003, 0xbac0, 0x0009,
+	0x008a, 0x0000, 0x0c0a, 0x000b, 0x15fe, 0x0008, 0x340a, 0x0003,
+	0xc4c0, 0x0009, 0x7000, 0x0000, 0xffa0, 0x0001, 0x2000, 0x0000,
+	0x1627, 0x0003, 0x808c, 0x0008, 0x0001, 0x0000, 0x0000, 0x0007,
+	0x4047, 0x000a, 0x808c, 0x0008, 0x0002, 0x0000, 0x0821, 0x0003,
+	0x4022, 0x0000, 0x0022, 0x000b, 0x4122, 0x0008, 0x4447, 0x0002,
+	0x0e4f, 0x000b, 0x0bfe, 0x0008, 0x11a0, 0x0001, 0x122d, 0x000b,
+	0x0ca0, 0x0001, 0x122d, 0x000b, 0x9180, 0x0001, 0x0004, 0x0000,
+	0x8060, 0x0000, 0x0400, 0x0000, 0x7f62, 0x0008, 0x8066, 0x0000,
+	0x0009, 0x0008, 0x4430, 0x000b, 0x808c, 0x0008, 0x0000, 0x0008,
+	0x0060, 0x0008, 0x8062, 0x0008, 0x0004, 0x0000, 0x8066, 0x0000,
+	0x0411, 0x0000, 0x4438, 0x0003, 0x03fe, 0x0000, 0x43e0, 0x0001,
+	0x0e2a, 0x000b, 0xc2c0, 0x0009, 0x00ff, 0x0008, 0x02e0, 0x0001,
+	0x0e2a, 0x000b, 0x9180, 0x0001, 0x0005, 0x0008, 0x8060, 0x0000,
+	0x0400, 0x0000, 0x7f62, 0x0008, 0x8066, 0x0000, 0x0019, 0x0000,
+	0x4447, 0x000b, 0x0240, 0x0002, 0x0a27, 0x000b, 0x00fe, 0x0000,
+	0x322a, 0x000b, 0x112a, 0x0000, 0x002e, 0x0008, 0x022c, 0x0008,
+	0x3a44, 0x0002, 0x0c0a, 0x000b, 0x808c, 0x0008, 0x0002, 0x0000,
+	0x1760, 0x0008, 0x8062, 0x0008, 0x000f, 0x0008, 0x8066, 0x0000,
+	0x0011, 0x0008, 0x4458, 0x0003, 0x01fe, 0x0008, 0x42e0, 0x0009,
+	0x0e1d, 0x0003, 0x00fe, 0x0000, 0x43e0, 0x0001, 0x0e1d, 0x0003,
+	0x1734, 0x0000, 0x1530, 0x0000, 0x1632, 0x0008, 0x0d2a, 0x0008,
+	0x9880, 0x0001, 0x0010, 0x0000, 0x8060, 0x0000, 0x0400, 0x0000,
+	0x7f62, 0x0008, 0x8066, 0x0000, 0x1e0a, 0x0008, 0x446a, 0x000b,
+	0x808a, 0x0008, 0x0003, 0x0008, 0x1a60, 0x0000, 0x8062, 0x0008,
+	0x0002, 0x0000, 0x5870, 0x000b, 0x8066, 0x0000, 0x3679, 0x0000,
+	0x4473, 0x0003, 0x5874, 0x0003, 0x3efe, 0x0008, 0x7f4f, 0x0002,
+	0x087a, 0x000b, 0x0d00, 0x0000, 0x0082, 0x0004, 0x8054, 0x0008,
+	0x0011, 0x0008, 0x8074, 0x0000, 0x1010, 0x0008, 0x1efe, 0x0000,
+	0x300a, 0x000b, 0x00b8, 0x0004, 0x000a, 0x000b, 0x00fe, 0x0000,
+	0x348a, 0x000b, 0x1a60, 0x0000, 0x8062, 0x0008, 0x0007, 0x0000,
+	0x8066, 0x0000, 0x0231, 0x0008, 0x4489, 0x0003, 0x03fe, 0x0000,
+	0x04d0, 0x0001, 0x0cb0, 0x0003, 0x82c0, 0x0001, 0x1f00, 0x0000,
+	0xffa0, 0x0001, 0x0400, 0x0000, 0x089f, 0x0003, 0x14b0, 0x0003,
+	0x01fe, 0x0008, 0x0580, 0x0009, 0x7f06, 0x0000, 0x02fe, 0x0008,
+	0xffc0, 0x0001, 0x00ff, 0x0008, 0x0690, 0x0001, 0x109f, 0x0003,
+	0x7f08, 0x0008, 0x84c0, 0x0001, 0xff00, 0x0008, 0x08b0, 0x000b,
+	0x00fe, 0x0000, 0x34a6, 0x0003, 0x8072, 0x0000, 0x1010, 0x0008,
+	0x3944, 0x0002, 0x08a1, 0x000b, 0x00aa, 0x000b, 0x8072, 0x0000,
+	0x2020, 0x0008, 0x3945, 0x000a, 0x08a6, 0x0003, 0x3946, 0x000a,
+	0x0cb7, 0x000b, 0x0000, 0x0007, 0x3943, 0x000a, 0x08b7, 0x0003,
+	0x00aa, 0x000b, 0x00fe, 0x0000, 0x34b5, 0x000b, 0x8072, 0x0000,
+	0x1000, 0x0000, 0x00b7, 0x000b, 0x8072, 0x0000, 0x2000, 0x0000,
+	0x4000, 0x000f, 0x1c60, 0x0000, 0x1b62, 0x0000, 0x8066, 0x0000,
+	0x0231, 0x0008, 0x44bc, 0x0003, 0x58bd, 0x0003, 0x0140, 0x0008,
+	0x0242, 0x0000, 0x1f43, 0x0002, 0x0ccb, 0x0003, 0x0d44, 0x0000,
+	0x0d46, 0x0008, 0x0348, 0x0008, 0x044a, 0x0008, 0x030a, 0x0008,
+	0x040c, 0x0000, 0x0d06, 0x0000, 0x0d08, 0x0008, 0x00cf, 0x000b,
+	0x0344, 0x0008, 0x0446, 0x0008, 0x0548, 0x0008, 0x064a, 0x0000,
+	0x58cf, 0x0003, 0x3efe, 0x0008, 0x7f4f, 0x0002, 0x08d6, 0x000b,
+	0x8000, 0x0000, 0x0001, 0x0000, 0x0082, 0x0004, 0x8054, 0x0008,
+	0x0001, 0x0000, 0x8074, 0x0000, 0x2020, 0x0008, 0x4000, 0x000f,
+	0x3a40, 0x000a, 0x0c0d, 0x0003, 0x2b24, 0x0008, 0x2b24, 0x0008,
+	0x58df, 0x000b, 0x8054, 0x0008, 0x0002, 0x0000, 0x1242, 0x0002,
+	0x092d, 0x000b, 0x3a45, 0x000a, 0x091c, 0x0003, 0x8072, 0x0000,
+	0x1000, 0x0000, 0x3945, 0x000a, 0x08ec, 0x000b, 0x8072, 0x0000,
+	0x3010, 0x0000, 0x1e10, 0x000a, 0x7f3c, 0x0000, 0x0917, 0x000b,
+	0x1d00, 0x0002, 0x7f3a, 0x0000, 0x0d60, 0x0000, 0x7f62, 0x0008,
+	0x8066, 0x0000, 0x0009, 0x0008, 0x44f5, 0x000b, 0x00fe, 0x0000,
+	0x3514, 0x000b, 0x1c60, 0x0000, 0x8062, 0x0008, 0x0001, 0x0000,
+	0x8066, 0x0000, 0x0009, 0x0008, 0x44fd, 0x0003, 0x00fe, 0x0000,
+	0x3204, 0x000b, 0x0038, 0x0000, 0x0060, 0x0008, 0x8062, 0x0008,
+	0x0019, 0x0000, 0x8066, 0x0000, 0x0009, 0x0008, 0x4506, 0x0003,
+	0x80c0, 0x0009, 0x00ff, 0x0008, 0x7f3e, 0x0008, 0x0d60, 0x0000,
+	0x0efe, 0x0008, 0x1f80, 0x0001, 0x7f62, 0x0008, 0x8066, 0x0000,
+	0x0009, 0x0008, 0x4510, 0x000b, 0x003a, 0x0008, 0x1dfe, 0x0000,
+	0x00f1, 0x0003, 0x0036, 0x0008, 0x00b8, 0x0004, 0x012d, 0x0003,
+	0x8074, 0x0000, 0x2000, 0x0000, 0x8072, 0x0000, 0x2000, 0x0000,
+	0x012d, 0x0003, 0x3a44, 0x0002, 0x0a30, 0x000b, 0x8074, 0x0000,
+	0x1000, 0x0000, 0x8072, 0x0000, 0x1000, 0x0000, 0x2d0e, 0x0000,
+	0x2d0e, 0x0000, 0x3601, 0x0003, 0x26fe, 0x0008, 0x26fe, 0x0008,
+	0x2700, 0x0008, 0x2700, 0x0008, 0x00d0, 0x0009, 0x0d3f, 0x0003,
+	0x8074, 0x0000, 0x4040, 0x0008, 0x592d, 0x000b, 0x50db, 0x000b,
+	0x3a46, 0x000a, 0x0d3f, 0x0003, 0x3a47, 0x0002, 0x093a, 0x000b,
+	0x8054, 0x0008, 0x0004, 0x0000, 0x8074, 0x0000, 0x8000, 0x0000,
+	0x8072, 0x0000, 0x3000, 0x0008, 0x0182, 0x0003, 0x92c0, 0x0009,
+	0x0fc8, 0x0000, 0x080a, 0x0003, 0x1246, 0x000a, 0x0dfb, 0x000b,
+	0x1a60, 0x0000, 0x8062, 0x0008, 0x0002, 0x0000, 0x8066, 0x0000,
+	0x362a, 0x0000, 0x4544, 0x0003, 0x2000, 0x0000, 0x2000, 0x0000,
+	0x2102, 0x0000, 0x2102, 0x0000, 0x2204, 0x0000, 0x2204, 0x0000,
+	0x2306, 0x0000, 0x2306, 0x0000, 0x2408, 0x0000, 0x2408, 0x0000,
+	0x250a, 0x0000, 0x250a, 0x0000, 0x260c, 0x0000, 0x260c, 0x0000,
+	0x270e, 0x0000, 0x270e, 0x0000, 0x2810, 0x0000, 0x2810, 0x0000,
+	0x2912, 0x0000, 0x2912, 0x0000, 0x1a60, 0x0000, 0x8062, 0x0008,
+	0x0007, 0x0000, 0x8066, 0x0000, 0x0052, 0x0000, 0x455e, 0x000b,
+	0x92c0, 0x0009, 0x0780, 0x0008, 0x0e17, 0x0003, 0x124b, 0x0002,
+	0x0967, 0x0003, 0x2e4d, 0x0002, 0x2e4d, 0x0002, 0x0a01, 0x0003,
+	0x3a46, 0x000a, 0x0d74, 0x0003, 0x5969, 0x000b, 0x8054, 0x0008,
+	0x0004, 0x0000, 0x1243, 0x000a, 0x097e, 0x000b, 0x8010, 0x0008,
+	0x000d, 0x0000, 0x01ef, 0x0004, 0x1810, 0x0000, 0x01ef, 0x0004,
+	0x017e, 0x0003, 0x194d, 0x000a, 0x0978, 0x000b, 0x1243, 0x000a,
+	0x0a0b, 0x0003, 0x5978, 0x000b, 0x8054, 0x0008, 0x0004, 0x0000,
+	0x01e4, 0x000c, 0x1810, 0x0000, 0x01ef, 0x0004, 0x8074, 0x0000,
+	0xf000, 0x0008, 0x8072, 0x0000, 0x3000, 0x0008, 0x0d30, 0x0000,
+	0x3a42, 0x0002, 0x0d88, 0x0003, 0x15fe, 0x0008, 0x3451, 0x000b,
+	0x000a, 0x000b, 0x8074, 0x0000, 0x0501, 0x0000, 0x8010, 0x0008,
+	0x000c, 0x0008, 0x01ef, 0x0004, 0x000a, 0x000b, 0xbbe0, 0x0009,
+	0x0030, 0x0008, 0x0d9e, 0x000b, 0x18fe, 0x0000, 0x3ce0, 0x0009,
+	0x099b, 0x0003, 0x15fe, 0x0008, 0x3ce0, 0x0009, 0x099b, 0x0003,
+	0x01df, 0x0004, 0x8076, 0x0008, 0x0040, 0x0000, 0x01dc, 0x000b,
+	0x8076, 0x0008, 0x0041, 0x0008, 0x01dc, 0x000b, 0xbbe0, 0x0009,
+	0x0032, 0x0000, 0x0da3, 0x0003, 0x3c1e, 0x0008, 0x01dc, 0x000b,
+	0xbbe0, 0x0009, 0x0037, 0x0000, 0x0dc1, 0x000b, 0x18fe, 0x0000,
+	0x3ce0, 0x0009, 0x0d9b, 0x000b, 0x8076, 0x0008, 0x0040, 0x0000,
+	0x1a60, 0x0000, 0x8062, 0x0008, 0x000d, 0x0000, 0x2604, 0x0008,
+	0x2604, 0x0008, 0x2706, 0x0008, 0x2706, 0x0008, 0x2808, 0x0000,
+	0x2808, 0x0000, 0x290a, 0x0000, 0x290a, 0x0000, 0x8066, 0x0000,
+	0x0422, 0x0000, 0x45b8, 0x0003, 0x01e4, 0x000c, 0x8054, 0x0008,
+	0x0004, 0x0000, 0x8074, 0x0000, 0xf000, 0x0008, 0x8072, 0x0000,
+	0xb000, 0x0000, 0x0182, 0x0003, 0xbbe0, 0x0009, 0x0038, 0x0000,
+	0x0dd3, 0x000b, 0x18fe, 0x0000, 0x3ce0, 0x0009, 0x09d0, 0x0003,
+	0x15fe, 0x0008, 0x3ce0, 0x0009, 0x0d97, 0x000b, 0x01df, 0x0004,
+	0x8076, 0x0008, 0x0040, 0x0000, 0x8072, 0x0000, 0x8000, 0x0000,
+	0x0227, 0x0003, 0x8076, 0x0008, 0x0042, 0x0008, 0x01dc, 0x000b,
+	0xbbe0, 0x0009, 0x0016, 0x0000, 0x0ddc, 0x000b, 0x3a44, 0x0002,
+	0x0c0c, 0x000b, 0x8072, 0x0000, 0x8000, 0x0000, 0x8000, 0x000f,
+	0x000a, 0x000b, 0x8072, 0x0000, 0x8000, 0x0000, 0x000a, 0x000b,
+	0x3d30, 0x000a, 0x7f00, 0x0000, 0xbc80, 0x0001, 0x0007, 0x0000,
+	0x01e8, 0x0003, 0x1930, 0x000a, 0x7f00, 0x0000, 0x9880, 0x0001,
+	0x0007, 0x0000, 0x8060, 0x0000, 0x0400, 0x0000, 0x7f62, 0x0008,
+	0x8066, 0x0000, 0x000a, 0x0008, 0x45ed, 0x0003, 0x4000, 0x000f,
+	0x21ef, 0x0003, 0x0870, 0x0008, 0x4000, 0x000f, 0xbac0, 0x0009,
+	0x0090, 0x0008, 0x09f8, 0x0003, 0x8074, 0x0000, 0x0706, 0x0000,
+	0x01fa, 0x0003, 0x8074, 0x0000, 0x0703, 0x0000, 0x4000, 0x000f,
+	0x8010, 0x0008, 0x0023, 0x0000, 0x0235, 0x0003, 0x8010, 0x0008,
+	0x0008, 0x0000, 0x0235, 0x0003, 0x8010, 0x0008, 0x0022, 0x0008,
+	0x0235, 0x0003, 0x01e4, 0x000c, 0x8010, 0x0008, 0x0007, 0x0000,
+	0x01ef, 0x0004, 0x1810, 0x0000, 0x01ef, 0x0004, 0x0241, 0x0003,
+	0x01e4, 0x000c, 0x8010, 0x0008, 0x001b, 0x0008, 0x01ef, 0x0004,
+	0x1810, 0x0000, 0x01ef, 0x0004, 0x8074, 0x0000, 0xf080, 0x0000,
+	0x8072, 0x0000, 0x3000, 0x0008, 0x0d30, 0x0000, 0x000a, 0x000b,
+	0x8010, 0x0008, 0x0009, 0x0008, 0x0235, 0x0003, 0x8010, 0x0008,
+	0x0005, 0x0008, 0x0235, 0x0003, 0x808c, 0x0008, 0x0001, 0x0000,
+	0x8010, 0x0008, 0x0004, 0x0000, 0x4143, 0x000a, 0x085f, 0x0003,
+	0x3a44, 0x0002, 0x0c0a, 0x000b, 0x0d2a, 0x0008, 0x0235, 0x0003,
+	0x8010, 0x0008, 0x0003, 0x0008, 0x0239, 0x0003, 0x8010, 0x0008,
+	0x000b, 0x0000, 0x0239, 0x0003, 0x8010, 0x0008, 0x0002, 0x0000,
+	0x0239, 0x0003, 0x3a47, 0x0002, 0x0d2d, 0x0003, 0x8010, 0x0008,
+	0x0006, 0x0008, 0x0239, 0x0003, 0x8074, 0x0000, 0xf000, 0x0008,
+	0x8072, 0x0000, 0x3000, 0x0008, 0x01ef, 0x0004, 0x01f2, 0x0004,
+	0x3a40, 0x000a, 0x080a, 0x0003, 0x8010, 0x0008, 0x000c, 0x0008,
+	0x01ef, 0x0004, 0x000a, 0x000b, 0x8074, 0x0000, 0xf080, 0x0000,
+	0x8072, 0x0000, 0x3000, 0x0008, 0x0d30, 0x0000, 0x2e4d, 0x0002,
+	0x2e4d, 0x0002, 0x0a4c, 0x0003, 0x8054, 0x0008, 0x0019, 0x0000,
+	0x000a, 0x000b, 0x8054, 0x0008, 0x0009, 0x0008, 0x000a, 0x000b,
+	0x3a44, 0x0002, 0x0c0a, 0x000b, 0x022a, 0x000b, 0x15b6, 0xf4ac,
+	0x0003, 0x000b, 0x0480, 0x0000, 0xc000, 0x0001, 0x8064, 0x0008,
+	0x0010, 0x0000, 0x8066, 0x0000, 0x0101, 0x0008, 0xc007, 0x0003,
+	0x8060, 0x0000, 0x0400, 0x0000, 0x580d, 0x000b, 0x7977, 0x0003,
+	0x50db, 0x000b, 0xc80a, 0x0003, 0xbac0, 0x0009, 0x008a, 0x0000,
+	0x880a, 0x000b, 0x15fe, 0x0008, 0xb00a, 0x0003, 0xc4c0, 0x0009,
+	0x7000, 0x0000, 0xffa0, 0x0001, 0x2000, 0x0000, 0x9214, 0x0003,
+	0x808c, 0x0008, 0x0001, 0x0000, 0x0000, 0x0007, 0x4047, 0x000a,
+	0x808c, 0x0008, 0x0002, 0x0000, 0x0821, 0x0003, 0x4022, 0x0000,
+	0x0022, 0x000b, 0x4122, 0x0008, 0x4447, 0x0002, 0x8a3c, 0x0003,
+	0x0bfe, 0x0008, 0x11a0, 0x0001, 0x121a, 0x0003, 0x0ca0, 0x0001,
+	0x121a, 0x0003, 0x9180, 0x0001, 0x0004, 0x0000, 0x8060, 0x0000,
+	0x0400, 0x0000, 0x7f62, 0x0008, 0x8066, 0x0000, 0x0009, 0x0008,
+	0xc030, 0x000b, 0x808c, 0x0008, 0x0000, 0x0008, 0x0060, 0x0008,
+	0x8062, 0x0008, 0x0004, 0x0000, 0x8066, 0x0000, 0x0411, 0x0000,
+	0xc038, 0x0003, 0x03fe, 0x0000, 0x43e0, 0x0001, 0x8a17, 0x0003,
+	0xc2c0, 0x0009, 0x00ff, 0x0008, 0x02e0, 0x0001, 0x8a17, 0x0003,
+	0x9180, 0x0001, 0x0005, 0x0008, 0x8060, 0x0000, 0x0400, 0x0000,
+	0x7f62, 0x0008, 0x8066, 0x0000, 0x0019, 0x0000, 0xc047, 0x000b,
+	0x0240, 0x0002, 0x0a14, 0x000b, 0x00fe, 0x0000, 0x3217, 0x0003,
+	0x112a, 0x0000, 0x002e, 0x0008, 0x022c, 0x0008, 0x3a44, 0x0002,
+	0x880a, 0x000b, 0x808c, 0x0008, 0x0002, 0x0000, 0x1760, 0x0008,
+	0x8062, 0x0008, 0x000f, 0x0008, 0x8066, 0x0000, 0x0011, 0x0008,
+	0xc058, 0x0003, 0x01fe, 0x0008, 0x42e0, 0x0009, 0x8a0a, 0x0003,
+	0x00fe, 0x0000, 0x43e0, 0x0001, 0x8a0a, 0x0003, 0x1734, 0x0000,
+	0x1530, 0x0000, 0x1632, 0x0008, 0x0d2a, 0x0008, 0x9880, 0x0001,
+	0x0010, 0x0000, 0x8060, 0x0000, 0x0400, 0x0000, 0x7f62, 0x0008,
+	0x8066, 0x0000, 0x1e0a, 0x0008, 0xc06a, 0x000b, 0x808a, 0x0008,
+	0x0003, 0x0008, 0x1a60, 0x0000, 0x8062, 0x0008, 0x0002, 0x0000,
+	0x5870, 0x000b, 0x8066, 0x0000, 0x3679, 0x0000, 0xc073, 0x0003,
+	0x5874, 0x0003, 0x3efe, 0x0008, 0x7f4f, 0x0002, 0x087a, 0x000b,
+	0x0d00, 0x0000, 0x0082, 0x0004, 0x8054, 0x0008, 0x0011, 0x0008,
+	0x8074, 0x0000, 0x1010, 0x0008, 0x1efe, 0x0000, 0x300a, 0x000b,
+	0x00b8, 0x0004, 0x000a, 0x000b, 0x00fe, 0x0000, 0xb08a, 0x000b,
+	0x1a60, 0x0000, 0x8062, 0x0008, 0x0007, 0x0000, 0x8066, 0x0000,
+	0x0231, 0x0008, 0xc089, 0x0003, 0x03fe, 0x0000, 0x04d0, 0x0001,
+	0x88b0, 0x0003, 0x82c0, 0x0001, 0x1f00, 0x0000, 0xffa0, 0x0001,
+	0x0400, 0x0000, 0x089f, 0x0003, 0x90b0, 0x0003, 0x01fe, 0x0008,
+	0x0580, 0x0009, 0x7f06, 0x0000, 0x02fe, 0x0008, 0xffc0, 0x0001,
+	0x00ff, 0x0008, 0x0690, 0x0001, 0x109f, 0x0003, 0x7f08, 0x0008,
+	0x84c0, 0x0001, 0xff00, 0x0008, 0x08b0, 0x000b, 0x00fe, 0x0000,
+	0xb0a6, 0x0003, 0x8072, 0x0000, 0x1010, 0x0008, 0x3944, 0x0002,
+	0x08a1, 0x000b, 0x00aa, 0x000b, 0x8072, 0x0000, 0x2020, 0x0008,
+	0x3945, 0x000a, 0x08a6, 0x0003, 0x3946, 0x000a, 0x88b7, 0x000b,
+	0x0000, 0x0007, 0x3943, 0x000a, 0x08b7, 0x0003, 0x00aa, 0x000b,
+	0x00fe, 0x0000, 0xb0b5, 0x000b, 0x8072, 0x0000, 0x1000, 0x0000,
+	0x00b7, 0x000b, 0x8072, 0x0000, 0x2000, 0x0000, 0x4000, 0x000f,
+	0x1c60, 0x0000, 0x1b62, 0x0000, 0x8066, 0x0000, 0x0231, 0x0008,
+	0xc0bc, 0x0003, 0x58bd, 0x0003, 0x0140, 0x0008, 0x0242, 0x0000,
+	0x1f43, 0x0002, 0x88cb, 0x0003, 0x0d44, 0x0000, 0x0d46, 0x0008,
+	0x0348, 0x0008, 0x044a, 0x0008, 0x030a, 0x0008, 0x040c, 0x0000,
+	0x0d06, 0x0000, 0x0d08, 0x0008, 0x00cf, 0x000b, 0x0344, 0x0008,
+	0x0446, 0x0008, 0x0548, 0x0008, 0x064a, 0x0000, 0x58cf, 0x0003,
+	0x3efe, 0x0008, 0x7f4f, 0x0002, 0x08d6, 0x000b, 0x8000, 0x0000,
+	0x0001, 0x0000, 0x0082, 0x0004, 0x8054, 0x0008, 0x0001, 0x0000,
+	0x8074, 0x0000, 0x2020, 0x0008, 0x4000, 0x000f, 0x3a40, 0x000a,
+	0x880d, 0x0003, 0xabd0, 0x0001, 0x0000, 0x0008, 0x7f24, 0x0000,
+	0x58e0, 0x000b, 0x8054, 0x0008, 0x0002, 0x0000, 0x1242, 0x0002,
+	0x0930, 0x000b, 0x3a45, 0x000a, 0x091d, 0x000b, 0x8072, 0x0000,
+	0x1000, 0x0000, 0x3945, 0x000a, 0x08ed, 0x0003, 0x8072, 0x0000,
+	0x3010, 0x0000, 0x1e10, 0x000a, 0x7f3c, 0x0000, 0x0918, 0x000b,
+	0x1d00, 0x0002, 0x7f3a, 0x0000, 0x0d60, 0x0000, 0x7f62, 0x0008,
+	0x8066, 0x0000, 0x0009, 0x0008, 0xc0f6, 0x000b, 0x00fe, 0x0000,
+	0xb115, 0x0003, 0x1c60, 0x0000, 0x8062, 0x0008, 0x0001, 0x0000,
+	0x8066, 0x0000, 0x0009, 0x0008, 0xc0fe, 0x0003, 0x00fe, 0x0000,
+	0x31f1, 0x000b, 0x0038, 0x0000, 0x0060, 0x0008, 0x8062, 0x0008,
+	0x0019, 0x0000, 0x8066, 0x0000, 0x0009, 0x0008, 0xc107, 0x000b,
+	0x80c0, 0x0009, 0x00ff, 0x0008, 0x7f3e, 0x0008, 0x0d60, 0x0000,
+	0x0efe, 0x0008, 0x1f80, 0x0001, 0x7f62, 0x0008, 0x8066, 0x0000,
+	0x0009, 0x0008, 0xc111, 0x0003, 0x003a, 0x0008, 0x1dfe, 0x0000,
+	0x00f2, 0x0003, 0x0036, 0x0008, 0x00b8, 0x0004, 0x0130, 0x0003,
+	0x8074, 0x0000, 0x2000, 0x0000, 0x8072, 0x0000, 0x2000, 0x0000,
+	0x0130, 0x0003, 0x3a44, 0x0002, 0x0a1d, 0x000b, 0x8074, 0x0000,
+	0x1000, 0x0000, 0x8072, 0x0000, 0x1000, 0x0000, 0xadd0, 0x0001,
+	0x0000, 0x0008, 0x7f0e, 0x0008, 0xb1ee, 0x000b, 0xa7d0, 0x0001,
+	0x0000, 0x0008, 0x7f00, 0x0000, 0xa6d0, 0x0009, 0x0000, 0x0008,
+	0x00d0, 0x0009, 0x8942, 0x0003, 0x8074, 0x0000, 0x4040, 0x0008,
+	0x5930, 0x000b, 0x50db, 0x000b, 0x3a46, 0x000a, 0x8942, 0x0003,
+	0x3a47, 0x0002, 0x093d, 0x0003, 0x8054, 0x0008, 0x0004, 0x0000,
+	0x8074, 0x0000, 0x8000, 0x0000, 0x8072, 0x0000, 0x3000, 0x0008,
+	0x016b, 0x000b, 0x92c0, 0x0009, 0x0fc8, 0x0000, 0x080a, 0x0003,
+	0x1246, 0x000a, 0x89e8, 0x0003, 0x1a60, 0x0000, 0x8062, 0x0008,
+	0x0002, 0x0000, 0x8066, 0x0000, 0x367a, 0x0000, 0xc147, 0x0003,
+	0x92c0, 0x0009, 0x0780, 0x0008, 0x8a04, 0x000b, 0x124b, 0x0002,
+	0x0950, 0x000b, 0x2e4d, 0x0002, 0x2e4d, 0x0002, 0x09ee, 0x000b,
+	0x3a46, 0x000a, 0x895d, 0x000b, 0x5952, 0x0003, 0x8054, 0x0008,
+	0x0004, 0x0000, 0x1243, 0x000a, 0x0967, 0x0003, 0x8010, 0x0008,
+	0x000d, 0x0000, 0x01dc, 0x0004, 0x1810, 0x0000, 0x01dc, 0x0004,
+	0x0167, 0x000b, 0x194d, 0x000a, 0x0961, 0x0003, 0x1243, 0x000a,
+	0x09f8, 0x0003, 0x5961, 0x0003, 0x8054, 0x0008, 0x0004, 0x0000,
+	0x01d1, 0x000c, 0x1810, 0x0000, 0x01dc, 0x0004, 0x8074, 0x0000,
+	0xf000, 0x0008, 0x8072, 0x0000, 0x3000, 0x0008, 0x0d30, 0x0000,
+	0x3a42, 0x0002, 0x8971, 0x0003, 0x15fe, 0x0008, 0xb051, 0x000b,
+	0x000a, 0x000b, 0x8074, 0x0000, 0x0501, 0x0000, 0x8010, 0x0008,
+	0x000c, 0x0008, 0x01dc, 0x0004, 0x000a, 0x000b, 0xbbe0, 0x0009,
+	0x0030, 0x0008, 0x8987, 0x0003, 0x18fe, 0x0000, 0x3ce0, 0x0009,
+	0x0984, 0x000b, 0x15fe, 0x0008, 0x3ce0, 0x0009, 0x0984, 0x000b,
+	0x01cc, 0x000c, 0x8076, 0x0008, 0x0040, 0x0000, 0x01c9, 0x0003,
+	0x8076, 0x0008, 0x0041, 0x0008, 0x01c9, 0x0003, 0xbbe0, 0x0009,
+	0x0032, 0x0000, 0x898c, 0x000b, 0x3c1e, 0x0008, 0x01c9, 0x0003,
+	0xbbe0, 0x0009, 0x0037, 0x0000, 0x89ae, 0x000b, 0x18fe, 0x0000,
+	0x3ce0, 0x0009, 0x8984, 0x0003, 0x8076, 0x0008, 0x0040, 0x0000,
+	0x1a60, 0x0000, 0x8062, 0x0008, 0x000d, 0x0000, 0xa6d0, 0x0009,
+	0x0000, 0x0008, 0x7f04, 0x0008, 0xa7d0, 0x0001, 0x0000, 0x0008,
+	0x7f06, 0x0000, 0xa8d0, 0x0001, 0x0000, 0x0008, 0x7f08, 0x0008,
+	0xa9d0, 0x0009, 0x0000, 0x0008, 0x7f0a, 0x0000, 0x8066, 0x0000,
+	0x0422, 0x0000, 0xc1a5, 0x0003, 0x01d1, 0x000c, 0x8054, 0x0008,
+	0x0004, 0x0000, 0x8074, 0x0000, 0xf000, 0x0008, 0x8072, 0x0000,
+	0xb000, 0x0000, 0x016b, 0x000b, 0xbbe0, 0x0009, 0x0038, 0x0000,
+	0x89c0, 0x0003, 0x18fe, 0x0000, 0x3ce0, 0x0009, 0x09bd, 0x000b,
+	0x15fe, 0x0008, 0x3ce0, 0x0009, 0x8980, 0x000b, 0x01cc, 0x000c,
+	0x8076, 0x0008, 0x0040, 0x0000, 0x8072, 0x0000, 0x8000, 0x0000,
+	0x0214, 0x0003, 0x8076, 0x0008, 0x0042, 0x0008, 0x01c9, 0x0003,
+	0xbbe0, 0x0009, 0x0016, 0x0000, 0x89c9, 0x0003, 0x3a44, 0x0002,
+	0x880c, 0x000b, 0x8072, 0x0000, 0x8000, 0x0000, 0x8000, 0x000f,
+	0x000a, 0x000b, 0x8072, 0x0000, 0x8000, 0x0000, 0x000a, 0x000b,
+	0x3d30, 0x000a, 0x7f00, 0x0000, 0xbc80, 0x0001, 0x0007, 0x0000,
+	0x01d5, 0x000b, 0x1930, 0x000a, 0x7f00, 0x0000, 0x9880, 0x0001,
+	0x0007, 0x0000, 0x8060, 0x0000, 0x0400, 0x0000, 0x7f62, 0x0008,
+	0x8066, 0x0000, 0x000a, 0x0008, 0xc1da, 0x000b, 0x4000, 0x000f,
+	0x21dc, 0x0003, 0x0870, 0x0008, 0x4000, 0x000f, 0xbac0, 0x0009,
+	0x0090, 0x0008, 0x09e5, 0x0003, 0x8074, 0x0000, 0x0706, 0x0000,
+	0x01e7, 0x0003, 0x8074, 0x0000, 0x0703, 0x0000, 0x4000, 0x000f,
+	0x8010, 0x0008, 0x0023, 0x0000, 0x0222, 0x0003, 0x8010, 0x0008,
+	0x0008, 0x0000, 0x0222, 0x0003, 0x8010, 0x0008, 0x0022, 0x0008,
+	0x0222, 0x0003, 0x01d1, 0x000c, 0x8010, 0x0008, 0x0007, 0x0000,
+	0x01dc, 0x0004, 0x1810, 0x0000, 0x01dc, 0x0004, 0x022e, 0x0003,
+	0x01d1, 0x000c, 0x8010, 0x0008, 0x001b, 0x0008, 0x01dc, 0x0004,
+	0x1810, 0x0000, 0x01dc, 0x0004, 0x8074, 0x0000, 0xf080, 0x0000,
+	0x8072, 0x0000, 0x3000, 0x0008, 0x0d30, 0x0000, 0x000a, 0x000b,
+	0x8010, 0x0008, 0x0009, 0x0008, 0x0222, 0x0003, 0x8010, 0x0008,
+	0x0005, 0x0008, 0x0222, 0x0003, 0x808c, 0x0008, 0x0001, 0x0000,
+	0x8010, 0x0008, 0x0004, 0x0000, 0x4143, 0x000a, 0x085f, 0x0003,
+	0x3a44, 0x0002, 0x880a, 0x000b, 0x0d2a, 0x0008, 0x0222, 0x0003,
+	0x8010, 0x0008, 0x0003, 0x0008, 0x0226, 0x000b, 0x8010, 0x0008,
+	0x000b, 0x0000, 0x0226, 0x000b, 0x8010, 0x0008, 0x0002, 0x0000,
+	0x0226, 0x000b, 0x3a47, 0x0002, 0x8930, 0x0003, 0x8010, 0x0008,
+	0x0006, 0x0008, 0x0226, 0x000b, 0x8074, 0x0000, 0xf000, 0x0008,
+	0x8072, 0x0000, 0x3000, 0x0008, 0x01dc, 0x0004, 0x01df, 0x0004,
+	0x3a40, 0x000a, 0x080a, 0x0003, 0x8010, 0x0008, 0x000c, 0x0008,
+	0x01dc, 0x0004, 0x000a, 0x000b, 0x8074, 0x0000, 0xf080, 0x0000,
+	0x8072, 0x0000, 0x3000, 0x0008, 0x0d30, 0x0000, 0x2e4d, 0x0002,
+	0x2e4d, 0x0002, 0x0a39, 0x000b, 0x8054, 0x0008, 0x0019, 0x0000,
+	0x000a, 0x000b, 0x8054, 0x0008, 0x0009, 0x0008, 0x000a, 0x000b,
+	0x3a44, 0x0002, 0x880a, 0x000b, 0x0217, 0x0003, 0xf4e5, 0xf482,
+	0x0001, 0x0002, 0x0004, 0x0008, 0x0010, 0x0020, 0x0040, 0x0080,
+	0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x2000, 0x4000, 0x8000,
+	0x6870
 };
 #ifdef UNIQUE_FW_NAME
-unsigned short fw2300flx_length01 = 0xd5d4;
+unsigned short fw2300flx_length01 = 0xdd79;
 #else
-unsigned short risc_code_length01 = 0xd5d4;
+unsigned short risc_code_length01 = 0xdd79;
 #endif
 
diff -Nru a/drivers/scsi/qla2xxx/ql6322.c b/drivers/scsi/qla2xxx/ql6322.c
--- a/drivers/scsi/qla2xxx/ql6322.c	2005-01-10 20:11:22 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,108 +0,0 @@
-/*
- * QLogic ISP6322 device driver for Linux 2.6.x
- * Copyright (C) 2003-2004 QLogic Corporation (www.qlogic.com)
- *
- * Released under GPL v2.
- */
-
-#include <linux/init.h>
-#include <linux/module.h>
-#include <linux/pci.h>
-
-#include "qla_def.h"
-
-static char qla_driver_name[] = "qla6322";
-
-extern unsigned char  fw2322flx_version[];
-extern unsigned char  fw2322flx_version_str[];
-extern unsigned short fw2322flx_addr01;
-extern unsigned short fw2322flx_code01[];
-extern unsigned short fw2322flx_length01;
-extern unsigned long rseqflx_code_addr01;
-extern unsigned short rseqflx_code01[];
-extern unsigned short rseqflx_code_length01;
-extern unsigned long xseqflx_code_addr01;
-extern unsigned short xseqflx_code01[];
-extern unsigned short xseqflx_code_length01;
-
-static struct qla_fw_info qla_fw_tbl[] = {
-	{
-		.addressing	= FW_INFO_ADDR_NORMAL,
-		.fwcode		= &fw2322flx_code01[0],
-		.fwlen		= &fw2322flx_length01,
-		.fwstart	= &fw2322flx_addr01,
-	},
-	{
-		.addressing	= FW_INFO_ADDR_EXTENDED,
-		.fwcode		= &rseqflx_code01[0],
-		.fwlen		= &rseqflx_code_length01,
-		.lfwstart	= &rseqflx_code_addr01,
-	},
-	{
-		.addressing	= FW_INFO_ADDR_EXTENDED,
-		.fwcode		= &xseqflx_code01[0],
-		.fwlen		= &xseqflx_code_length01,
-		.lfwstart	= &xseqflx_code_addr01,
-	},
-	{ FW_INFO_ADDR_NOMORE, },
-};
-
-static struct qla_board_info qla_board_tbl[] = {
-	{
-		.drv_name	= qla_driver_name,
-		.isp_name	= "ISP6322",
-		.fw_info	= qla_fw_tbl,
-	},
-};
-
-static struct pci_device_id qla6322_pci_tbl[] = {
-	{
-		.vendor		= PCI_VENDOR_ID_QLOGIC,
-		.device		= PCI_DEVICE_ID_QLOGIC_ISP6322,
-		.subvendor	= PCI_ANY_ID,
-		.subdevice	= PCI_ANY_ID,
-		.driver_data	= (unsigned long)&qla_board_tbl[0],
-	},
-	{0, 0},
-};
-MODULE_DEVICE_TABLE(pci, qla6322_pci_tbl);
-
-static int __devinit
-qla6322_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
-{
-	return qla2x00_probe_one(pdev,
-	    (struct qla_board_info *)id->driver_data);
-}
-
-static void __devexit
-qla6322_remove_one(struct pci_dev *pdev)
-{
-	qla2x00_remove_one(pdev);
-}
-
-static struct pci_driver qla6322_pci_driver = {
-	.name		= "qla6322",
-	.id_table	= qla6322_pci_tbl,
-	.probe		= qla6322_probe_one,
-	.remove		= __devexit_p(qla6322_remove_one),
-};
-
-static int __init
-qla6322_init(void)
-{
-	return pci_module_init(&qla6322_pci_driver);
-}
-
-static void __exit
-qla6322_exit(void)
-{
-	pci_unregister_driver(&qla6322_pci_driver);
-}
-
-module_init(qla6322_init);
-module_exit(qla6322_exit);
-
-MODULE_AUTHOR("QLogic Corporation");
-MODULE_DESCRIPTION("QLogic ISP6322 FC-SCSI Host Bus Adapter driver");
-MODULE_LICENSE("GPL");
-MODULE_VERSION(QLA2XXX_VERSION);
diff -Nru a/drivers/scsi/qla2xxx/ql6322_fw.c b/drivers/scsi/qla2xxx/ql6322_fw.c
--- a/drivers/scsi/qla2xxx/ql6322_fw.c	2005-01-10 20:11:23 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,7433 +0,0 @@
-/**************************************************************************
- *                  QLOGIC LINUX SOFTWARE
- *
- * QLogic ISP2x00 device driver for Linux 2.6.x
- * Copyright (C) 2003-2004 QLogic Corporation
- * (www.qlogic.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, 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.
- *
- *************************************************************************/
-
-/*
- *	Firmware Version 3.03.02 (16:54 Aug 10, 2004)
- */
-
-#ifdef UNIQUE_FW_NAME
-unsigned short fw2322flx_version = 3*1024+3;
-#else
-unsigned short risc_code_version = 3*1024+3;
-#endif
-
-#ifdef UNIQUE_FW_NAME
-unsigned char fw2322flx_version_str[] = {3, 3, 2};
-#else
-unsigned char firmware_version[] = {3, 3, 2};
-#endif
-
-#ifdef UNIQUE_FW_NAME
-#define fw2322flx_VERSION_STRING "3.03.02"
-#else
-#define FW_VERSION_STRING "3.03.02"
-#endif
-
-#ifdef UNIQUE_FW_NAME
-unsigned short fw2322flx_addr01 = 0x0800 ;
-#else
-unsigned short risc_code_addr01 = 0x0800 ;
-#endif
-
-#ifdef UNIQUE_FW_NAME
-unsigned short fw2322flx_code01[] = { 
-#else
-unsigned short risc_code01[] = { 
-#endif
-	0x0470, 0x0000, 0x0000, 0xce84, 0x0000, 0x0003, 0x0003, 0x0002,
-	0x0317, 0x2043, 0x4f50, 0x5952, 0x4947, 0x4854, 0x2032, 0x3030,
-	0x3120, 0x514c, 0x4f47, 0x4943, 0x2043, 0x4f52, 0x504f, 0x5241,
-	0x5449, 0x4f4e, 0x2049, 0x5350, 0x3233, 0x3030, 0x2046, 0x6972,
-	0x6d77, 0x6172, 0x6520, 0x2056, 0x6572, 0x7369, 0x6f6e, 0x2030,
-	0x332e, 0x3033, 0x2e30, 0x3220, 0x2020, 0x2020, 0x2400, 0x20a9,
-	0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2200, 0x20a9, 0x000f,
-	0x2001, 0x0000, 0x400f, 0x2091, 0x2400, 0x20a9, 0x000f, 0x2001,
-	0x0000, 0x400f, 0x2091, 0x2600, 0x20a9, 0x000f, 0x2001, 0x0000,
-	0x400f, 0x2091, 0x2800, 0x20a9, 0x000f, 0x2001, 0x0000, 0x400f,
-	0x2091, 0x2a00, 0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, 0x2091,
-	0x2c00, 0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2e00,
-	0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2000, 0x2001,
-	0x0000, 0x20c1, 0x0004, 0x20c9, 0x1cff, 0x2059, 0x0000, 0x2b78,
-	0x7883, 0x0004, 0x2089, 0x290c, 0x2051, 0x1800, 0x2a70, 0x20e1,
-	0x0001, 0x20e9, 0x0001, 0x2009, 0x0000, 0x080c, 0x0e4a, 0x00f6,
-	0x7888, 0x9005, 0x11f8, 0x2061, 0xc000, 0x080c, 0x1f21, 0x1170,
-	0x2079, 0x0300, 0x080c, 0x1f37, 0x2061, 0xe000, 0x080c, 0x1f21,
-	0x1128, 0x2079, 0x0380, 0x080c, 0x1f37, 0x0060, 0x00fe, 0x7883,
-	0x4010, 0x7837, 0x4010, 0x7833, 0x0010, 0x2091, 0x5000, 0x2091,
-	0x4080, 0x0cf8, 0x00fe, 0x2029, 0x26c0, 0x2031, 0xffff, 0x2039,
-	0x269c, 0x2021, 0x0050, 0x20e9, 0x0001, 0x20a1, 0x0000, 0x20a9,
-	0x0800, 0x900e, 0x4104, 0x20e9, 0x0001, 0x20a1, 0x1000, 0x900e,
-	0x2001, 0x0dc1, 0x9084, 0x0fff, 0x20a8, 0x4104, 0x2001, 0x0000,
-	0x9086, 0x0000, 0x0120, 0x21a8, 0x4104, 0x8001, 0x1de0, 0x756a,
-	0x766e, 0x7766, 0x7472, 0x7476, 0x00e6, 0x2071, 0x1b25, 0x2472,
-	0x00ee, 0x20a1, 0x1ddc, 0x716c, 0x810d, 0x810d, 0x810d, 0x810d,
-	0x918c, 0x000f, 0x2001, 0x0001, 0x9112, 0x900e, 0x21a8, 0x4104,
-	0x8211, 0x1de0, 0x716c, 0x3400, 0x8001, 0x9102, 0x0120, 0x0218,
-	0x20a8, 0x900e, 0x4104, 0x2009, 0x1800, 0x810d, 0x810d, 0x810d,
-	0x810d, 0x810d, 0x918c, 0x001f, 0x2001, 0x0001, 0x9112, 0x20e9,
-	0x0001, 0x20a1, 0x0800, 0x900e, 0x20a9, 0x0800, 0x4104, 0x8211,
-	0x1dd8, 0x080c, 0x0f47, 0x080c, 0x5d05, 0x080c, 0x9b7c, 0x080c,
-	0x10fe, 0x080c, 0x12ee, 0x080c, 0x1a7f, 0x080c, 0x8456, 0x080c,
-	0x0cf7, 0x080c, 0x1083, 0x080c, 0x329f, 0x080c, 0x73cd, 0x080c,
-	0x6745, 0x080c, 0x809d, 0x080c, 0x210e, 0x080c, 0x7a62, 0x080c,
-	0x1f50, 0x080c, 0x208e, 0x080c, 0x2103, 0x2091, 0x3009, 0x7883,
-	0x0000, 0x1004, 0x0941, 0x7880, 0x9086, 0x0002, 0x1190, 0x7883,
-	0x4000, 0x7837, 0x4000, 0x7833, 0x0010, 0x0e04, 0x0935, 0x2091,
-	0x5000, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c,
-	0x11d6, 0x2071, 0x1800, 0x7003, 0x0000, 0x2071, 0x1800, 0x7000,
-	0x908e, 0x0003, 0x1158, 0x080c, 0x49bf, 0x080c, 0x32c6, 0x080c,
-	0x7435, 0x080c, 0x6bdd, 0x080c, 0x80c6, 0x0c78, 0x000b, 0x0c98,
-	0x0962, 0x0963, 0x0afa, 0x0960, 0x0bab, 0x0cf6, 0x0cf6, 0x0cf6,
-	0x080c, 0x0d65, 0x0005, 0x0126, 0x00f6, 0x2091, 0x8000, 0x7000,
-	0x9086, 0x0001, 0x1904, 0x0acd, 0x080c, 0x0e9a, 0x080c, 0x70ba,
-	0x0150, 0x080c, 0x70dd, 0x15b0, 0x2079, 0x0100, 0x7828, 0x9085,
-	0x1800, 0x782a, 0x0478, 0x080c, 0x6feb, 0x7000, 0x9086, 0x0001,
-	0x1904, 0x0acd, 0x7094, 0x9086, 0x0028, 0x1904, 0x0acd, 0x080c,
-	0x8095, 0x080c, 0x8087, 0x2001, 0x0161, 0x2003, 0x0001, 0x2079,
-	0x0100, 0x2011, 0xffff, 0x080c, 0x28ac, 0x7a28, 0x9295, 0x5e2c,
-	0x7a2a, 0x2011, 0x6f30, 0x080c, 0x816c, 0x2011, 0x6f23, 0x080c,
-	0x8272, 0x2011, 0x5b5c, 0x080c, 0x816c, 0x2011, 0x8030, 0x901e,
-	0x7392, 0x04d0, 0x080c, 0x5409, 0x2079, 0x0100, 0x7844, 0x9005,
-	0x1904, 0x0acd, 0x2011, 0x5b5c, 0x080c, 0x816c, 0x2011, 0x6f30,
-	0x080c, 0x816c, 0x2011, 0x6f23, 0x080c, 0x8272, 0x2001, 0x0265,
-	0x2001, 0x0205, 0x2003, 0x0000, 0x7840, 0x9084, 0xfffb, 0x7842,
-	0x2001, 0x197e, 0x2004, 0x9005, 0x1140, 0x00c6, 0x2061, 0x0100,
-	0x080c, 0x5cad, 0x00ce, 0x0804, 0x0acd, 0x780f, 0x006b, 0x7a28,
-	0x080c, 0x70c2, 0x0118, 0x9295, 0x5e2c, 0x0010, 0x9295, 0x402c,
-	0x7a2a, 0x2011, 0x8010, 0x73d4, 0x2001, 0x197f, 0x2003, 0x0001,
-	0x080c, 0x2774, 0x080c, 0x48fa, 0x7244, 0xc284, 0x7246, 0x2001,
-	0x180c, 0x200c, 0xc1ac, 0xc1cc, 0x2102, 0x2001, 0x0390, 0x2003,
-	0x0400, 0x080c, 0x98c7, 0x080c, 0x91f8, 0x2011, 0x0004, 0x080c,
-	0xb880, 0x080c, 0x98e3, 0x080c, 0x6585, 0x080c, 0x70ba, 0x1120,
-	0x080c, 0x27d5, 0x0600, 0x0420, 0x080c, 0x5cb4, 0x0140, 0x7093,
-	0x0001, 0x70cf, 0x0000, 0x080c, 0x55d6, 0x0804, 0x0acd, 0x080c,
-	0x53a8, 0xd094, 0x01a8, 0x2001, 0x0390, 0x2003, 0x0404, 0x2011,
-	0x180c, 0x2204, 0xc0cd, 0x2012, 0x080c, 0x53ac, 0xd0d4, 0x1118,
-	0x080c, 0x27d5, 0x1270, 0x2011, 0x180c, 0x2204, 0xc0bc, 0x0088,
-	0x080c, 0x53ac, 0xd0d4, 0x1db8, 0x2011, 0x180c, 0x2204, 0xc0bd,
-	0x0040, 0x2011, 0x180c, 0x2204, 0xc0bd, 0x2012, 0x080c, 0x6682,
-	0x0008, 0x2012, 0x080c, 0x6648, 0x0120, 0x7a0c, 0xc2b4, 0x7a0e,
-	0x00a8, 0x707b, 0x0000, 0x080c, 0x70ba, 0x1130, 0x70ac, 0x9005,
-	0x1168, 0x080c, 0xbcdc, 0x0050, 0x080c, 0xbcdc, 0x70d8, 0xd09c,
-	0x1128, 0x70ac, 0x9005, 0x0110, 0x080c, 0x5c8a, 0x70e3, 0x0000,
-	0x70df, 0x0000, 0x70a3, 0x0000, 0x080c, 0x27dd, 0x0228, 0x2011,
-	0x0101, 0x2204, 0xc0c4, 0x2012, 0x72d8, 0x080c, 0x70ba, 0x1178,
-	0x9016, 0x0016, 0x2009, 0x0002, 0x2019, 0x1945, 0x211a, 0x001e,
-	0x705b, 0xffff, 0x705f, 0x00ef, 0x707f, 0x0000, 0x0020, 0x2019,
-	0x1945, 0x201b, 0x0000, 0x2079, 0x185b, 0x7804, 0xd0ac, 0x0108,
-	0xc295, 0x72da, 0x080c, 0x70ba, 0x0118, 0x9296, 0x0004, 0x0518,
-	0x2011, 0x0001, 0x080c, 0xb880, 0x70a7, 0x0000, 0x70ab, 0xffff,
-	0x7003, 0x0002, 0x00fe, 0x080c, 0x2e09, 0x080c, 0x98c7, 0x2011,
-	0x0005, 0x080c, 0x9324, 0x080c, 0x98e3, 0x080c, 0x70ba, 0x0148,
-	0x00c6, 0x2061, 0x0100, 0x0016, 0x2009, 0x0002, 0x61e2, 0x001e,
-	0x00ce, 0x012e, 0x00e0, 0x70a7, 0x0000, 0x70ab, 0xffff, 0x7003,
-	0x0002, 0x080c, 0x98c7, 0x2011, 0x0005, 0x080c, 0x9324, 0x080c,
-	0x98e3, 0x080c, 0x70ba, 0x0148, 0x00c6, 0x2061, 0x0100, 0x0016,
-	0x2009, 0x0002, 0x61e2, 0x001e, 0x00ce, 0x00fe, 0x012e, 0x0005,
-	0x00c6, 0x00b6, 0x080c, 0x70ba, 0x1118, 0x20a9, 0x0800, 0x0010,
-	0x20a9, 0x0782, 0x080c, 0x70ba, 0x1110, 0x900e, 0x0010, 0x2009,
-	0x007e, 0x86ff, 0x0138, 0x9180, 0x1000, 0x2004, 0x905d, 0x0110,
-	0xb800, 0xd0bc, 0x090c, 0x3136, 0x8108, 0x1f04, 0x0ae1, 0x707b,
-	0x0000, 0x707c, 0x9084, 0x00ff, 0x707e, 0x70af, 0x0000, 0x00be,
-	0x00ce, 0x0005, 0x00b6, 0x0126, 0x2091, 0x8000, 0x7000, 0x9086,
-	0x0002, 0x1904, 0x0ba8, 0x70a8, 0x9086, 0xffff, 0x0120, 0x080c,
-	0x2e09, 0x0804, 0x0ba8, 0x70d8, 0xd0ac, 0x1110, 0xd09c, 0x0520,
-	0xd084, 0x0510, 0x0006, 0x2001, 0x0103, 0x2003, 0x002b, 0x000e,
-	0xd08c, 0x01d0, 0x70dc, 0x9086, 0xffff, 0x0190, 0x080c, 0x2f94,
-	0x70d8, 0xd094, 0x1904, 0x0ba8, 0x2011, 0x0001, 0x080c, 0xbf8f,
-	0x0110, 0x2011, 0x0003, 0x901e, 0x080c, 0x2fce, 0x0804, 0x0ba8,
-	0x70e0, 0x9005, 0x1904, 0x0ba8, 0x70a4, 0x9005, 0x1904, 0x0ba8,
-	0x70d8, 0xd0a4, 0x0118, 0xd0b4, 0x0904, 0x0ba8, 0x080c, 0x6648,
-	0x1904, 0x0ba8, 0x080c, 0x669b, 0x1904, 0x0ba8, 0x080c, 0x6682,
-	0x01c0, 0x0156, 0x00c6, 0x20a9, 0x007f, 0x900e, 0x0016, 0x080c,
-	0x628f, 0x1118, 0xb800, 0xd0ec, 0x1138, 0x001e, 0x8108, 0x1f04,
-	0x0b4e, 0x00ce, 0x015e, 0x0028, 0x001e, 0x00ce, 0x015e, 0x0804,
-	0x0ba8, 0x0006, 0x2001, 0x0103, 0x2003, 0x006b, 0x000e, 0x2011,
-	0x198b, 0x080c, 0x0fb7, 0x2011, 0x19a5, 0x080c, 0x0fb7, 0x7030,
-	0xc08c, 0x7032, 0x7003, 0x0003, 0x70ab, 0xffff, 0x080c, 0x0e6e,
-	0x9006, 0x080c, 0x23fe, 0x0036, 0x0046, 0x2019, 0xffff, 0x2021,
-	0x0006, 0x080c, 0x4a97, 0x004e, 0x003e, 0x00f6, 0x2079, 0x0100,
-	0x080c, 0x70dd, 0x0150, 0x080c, 0x70ba, 0x7828, 0x0118, 0x9084,
-	0xe1ff, 0x0010, 0x9084, 0xffdf, 0x782a, 0x00fe, 0x080c, 0x98c7,
-	0x2001, 0x19c0, 0x2004, 0x9086, 0x0005, 0x1120, 0x2011, 0x0000,
-	0x080c, 0x9324, 0x2011, 0x0000, 0x080c, 0x932e, 0x080c, 0x98e3,
-	0x012e, 0x00be, 0x0005, 0x0016, 0x0026, 0x0046, 0x00f6, 0x0126,
-	0x2091, 0x8000, 0x2079, 0x0100, 0x7904, 0x918c, 0xfffd, 0x7906,
-	0x2009, 0x00f7, 0x080c, 0x5c73, 0x7940, 0x918c, 0x0010, 0x7942,
-	0x7924, 0xd1b4, 0x0120, 0x2011, 0x0040, 0x080c, 0x28ac, 0xd19c,
-	0x0120, 0x2011, 0x0008, 0x080c, 0x28ac, 0x0006, 0x0036, 0x0156,
-	0x0000, 0x2001, 0x197f, 0x2004, 0x9005, 0x1518, 0x080c, 0x2840,
-	0x1148, 0x2001, 0x0001, 0x080c, 0x27a3, 0x2001, 0x0001, 0x080c,
-	0x2786, 0x00b8, 0x080c, 0x2848, 0x1138, 0x9006, 0x080c, 0x27a3,
-	0x9006, 0x080c, 0x2786, 0x0068, 0x080c, 0x2850, 0x1d50, 0x2001,
-	0x1970, 0x2004, 0xd0fc, 0x0108, 0x0020, 0x080c, 0x259d, 0x0804,
-	0x0ca9, 0x080c, 0x28cf, 0x080c, 0x2902, 0x20a9, 0x003a, 0x1d04,
-	0x0bff, 0x080c, 0x8252, 0x1f04, 0x0bff, 0x080c, 0x70cb, 0x0148,
-	0x080c, 0x70dd, 0x1118, 0x080c, 0x73c8, 0x0050, 0x080c, 0x70c2,
-	0x0dd0, 0x080c, 0x73c3, 0x080c, 0x73b9, 0x080c, 0x6feb, 0x0020,
-	0x2009, 0x00f8, 0x080c, 0x5c73, 0x7850, 0xc0e5, 0x7852, 0x080c,
-	0x70ba, 0x0120, 0x7843, 0x0090, 0x7843, 0x0010, 0x2021, 0xe678,
-	0x2019, 0xea60, 0x0d0c, 0x8252, 0x7820, 0xd09c, 0x15a0, 0x080c,
-	0x70ba, 0x0904, 0x0c8b, 0x7824, 0xd0ac, 0x1904, 0x0cae, 0x080c,
-	0x70dd, 0x1548, 0x0046, 0x2021, 0x0320, 0x8421, 0x1df0, 0x004e,
-	0x2011, 0x1800, 0x080c, 0x28ac, 0x080c, 0x2858, 0x7824, 0x9084,
-	0x1800, 0x1168, 0x9484, 0x0fff, 0x1140, 0x2001, 0x1810, 0x2004,
-	0x9084, 0x9000, 0x0110, 0x080c, 0x0cd1, 0x8421, 0x1160, 0x1d04,
-	0x0c5b, 0x080c, 0x8252, 0x080c, 0x73c3, 0x080c, 0x73b9, 0x7003,
-	0x0001, 0x0804, 0x0cae, 0x8319, 0x1928, 0x2001, 0x1810, 0x2004,
-	0x9084, 0x9000, 0x0110, 0x080c, 0x0cd1, 0x1d04, 0x0c71, 0x080c,
-	0x8252, 0x2009, 0x1973, 0x2104, 0x9005, 0x0118, 0x8001, 0x200a,
-	0x1188, 0x200b, 0x000a, 0x2011, 0x0048, 0x080c, 0x28ac, 0x20a9,
-	0x0002, 0x080c, 0x2839, 0x7924, 0x080c, 0x2858, 0xd19c, 0x0110,
-	0x080c, 0x2774, 0x00f0, 0x080c, 0x70cb, 0x1140, 0x94a2, 0x03e8,
-	0x1128, 0x080c, 0x708e, 0x7003, 0x0001, 0x00c0, 0x2011, 0x1800,
-	0x080c, 0x28ac, 0x080c, 0x2858, 0x7824, 0x080c, 0x70d4, 0x0110,
-	0xd0ac, 0x1160, 0x9084, 0x1800, 0x0904, 0x0c63, 0x7003, 0x0001,
-	0x0028, 0x2001, 0x0001, 0x080c, 0x23fe, 0x00a0, 0x7850, 0xc0e4,
-	0x7852, 0x2009, 0x180c, 0x210c, 0xd19c, 0x1120, 0x7904, 0x918d,
-	0x0002, 0x7906, 0x2011, 0x0048, 0x080c, 0x28ac, 0x7828, 0x9085,
-	0x0028, 0x782a, 0x2001, 0x197f, 0x2003, 0x0000, 0x9006, 0x78f2,
-	0x015e, 0x003e, 0x000e, 0x012e, 0x00fe, 0x004e, 0x002e, 0x001e,
-	0x0005, 0x0006, 0x0016, 0x0026, 0x0036, 0x0046, 0x00b6, 0x00c6,
-	0x00d6, 0x00e6, 0x00f6, 0x0156, 0x0071, 0x0d0c, 0x8252, 0x015e,
-	0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x004e, 0x003e, 0x002e,
-	0x001e, 0x000e, 0x0005, 0x00e6, 0x2071, 0x189c, 0x7004, 0x9086,
-	0x0001, 0x1110, 0x080c, 0x32c6, 0x00ee, 0x0005, 0x0005, 0x2a70,
-	0x2061, 0x1983, 0x2063, 0x0003, 0x6007, 0x0003, 0x600b, 0x0002,
-	0x600f, 0x0317, 0x2001, 0x1954, 0x900e, 0x2102, 0x7192, 0x2001,
-	0x0100, 0x2004, 0x9082, 0x0002, 0x0218, 0x705b, 0xffff, 0x0008,
-	0x715a, 0x7063, 0xffff, 0x717a, 0x717e, 0x080c, 0xbcdc, 0x70eb,
-	0x00c0, 0x2061, 0x1944, 0x6003, 0x0909, 0x6106, 0x600b, 0x8800,
-	0x600f, 0x0200, 0x6013, 0x00ff, 0x6017, 0x000f, 0x611a, 0x601f,
-	0x07d0, 0x2061, 0x194c, 0x6003, 0x8000, 0x6106, 0x610a, 0x600f,
-	0x0200, 0x6013, 0x00ff, 0x6116, 0x601b, 0x0001, 0x611e, 0x2061,
-	0x1961, 0x6003, 0x514c, 0x6007, 0x4f47, 0x600b, 0x4943, 0x600f,
-	0x2020, 0x2001, 0x182b, 0x2102, 0x0005, 0x9016, 0x080c, 0x628f,
-	0x1178, 0xb804, 0x90c4, 0x00ff, 0x98c6, 0x0006, 0x0128, 0x90c4,
-	0xff00, 0x98c6, 0x0600, 0x1120, 0x9186, 0x0080, 0x0108, 0x8210,
-	0x8108, 0x9186, 0x0800, 0x1d50, 0x2208, 0x0005, 0x2091, 0x8000,
-	0x2079, 0x0000, 0x000e, 0x00f6, 0x0010, 0x2091, 0x8000, 0x0e04,
-	0x0d67, 0x0006, 0x0016, 0x2001, 0x8002, 0x0006, 0x2079, 0x0000,
-	0x000e, 0x7882, 0x7836, 0x001e, 0x798e, 0x000e, 0x788a, 0x000e,
-	0x7886, 0x3900, 0x789a, 0x7833, 0x0012, 0x2091, 0x5000, 0x0156,
-	0x00d6, 0x0036, 0x0026, 0x2079, 0x0300, 0x2069, 0x1afb, 0x7a08,
-	0x226a, 0x2069, 0x1afc, 0x7a18, 0x226a, 0x8d68, 0x7a1c, 0x226a,
-	0x782c, 0x2019, 0x1b09, 0x201a, 0x2019, 0x1b0c, 0x9016, 0x7808,
-	0xd09c, 0x0168, 0x7820, 0x201a, 0x8210, 0x8318, 0x9386, 0x1b25,
-	0x0108, 0x0ca8, 0x7808, 0xd09c, 0x0110, 0x2011, 0xdead, 0x2019,
-	0x1b0a, 0x782c, 0x201a, 0x8318, 0x221a, 0x7803, 0x0000, 0x2069,
-	0x1a51, 0x901e, 0x20a9, 0x0020, 0x7b26, 0x7a28, 0x226a, 0x8d68,
-	0x8318, 0x1f04, 0x0db4, 0x2069, 0x1a71, 0x2019, 0x0050, 0x20a9,
-	0x0020, 0x7b26, 0x7a28, 0x226a, 0x8d68, 0x8318, 0x1f04, 0x0dc1,
-	0x0491, 0x002e, 0x003e, 0x00de, 0x015e, 0x2079, 0x1800, 0x7803,
-	0x0005, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x0180,
-	0x2001, 0x19fa, 0x2004, 0x9005, 0x0128, 0x2001, 0x008b, 0x2004,
-	0xd0fc, 0x0dd8, 0x2001, 0x008a, 0x2003, 0x0002, 0x2003, 0x1001,
-	0x080c, 0x53b7, 0x1170, 0x080c, 0x0f08, 0x0110, 0x080c, 0x0e5b,
-	0x080c, 0x53b7, 0x1130, 0x2071, 0x1800, 0x2011, 0x8000, 0x080c,
-	0x0f1c, 0x0c70, 0x0005, 0x2001, 0x0382, 0x2004, 0x9084, 0x0007,
-	0x9086, 0x0001, 0x1120, 0x2001, 0x0015, 0x080c, 0x98b8, 0x2079,
-	0x0380, 0x2069, 0x1adb, 0x7818, 0x6802, 0x781c, 0x6806, 0x7840,
-	0x680a, 0x7844, 0x680e, 0x782c, 0x6812, 0x2019, 0x1ae6, 0x9016,
-	0x7808, 0xd09c, 0x0150, 0x7820, 0x201a, 0x8210, 0x8318, 0x8210,
-	0x9282, 0x0011, 0x0ea8, 0x2011, 0xdead, 0x6a2a, 0x7830, 0x681a,
-	0x7834, 0x681e, 0x7838, 0x6822, 0x783c, 0x6826, 0x7803, 0x0000,
-	0x2069, 0x1a9b, 0x901e, 0x20a9, 0x0020, 0x7b26, 0x7828, 0x206a,
-	0x8d68, 0x8318, 0x1f04, 0x0e35, 0x2069, 0x1abb, 0x2019, 0x00b0,
-	0x20a9, 0x0020, 0x7b26, 0x7828, 0x206a, 0x8d68, 0x8318, 0x1f04,
-	0x0e42, 0x0005, 0x918c, 0x03ff, 0x2001, 0x0003, 0x2004, 0x9084,
-	0x0600, 0x1118, 0x918d, 0x6c00, 0x0010, 0x918d, 0x6400, 0x2001,
-	0x017f, 0x2102, 0x0005, 0x0026, 0x0126, 0x2011, 0x0080, 0x080c,
-	0x0efa, 0x20a9, 0x0900, 0x080c, 0x0f30, 0x2011, 0x0040, 0x080c,
-	0x0efa, 0x20a9, 0x0900, 0x080c, 0x0f30, 0x0c78, 0x0026, 0x080c,
-	0x0f08, 0x1188, 0x2011, 0x010e, 0x2214, 0x9294, 0x0007, 0x9296,
-	0x0007, 0x0118, 0x2011, 0x0947, 0x0010, 0x2011, 0x1b47, 0x080c,
-	0x0f1c, 0x002e, 0x0005, 0x2011, 0x010e, 0x2214, 0x9294, 0x0007,
-	0x9296, 0x0007, 0x0118, 0x2011, 0xa880, 0x0010, 0x2011, 0x6840,
-	0xd0e4, 0x70ef, 0x0000, 0x1128, 0x70ef, 0x0fa0, 0x080c, 0x0f0d,
-	0x002e, 0x0005, 0x0026, 0x080c, 0x0f08, 0x0148, 0xd0a4, 0x1138,
-	0x2011, 0xcdd5, 0x0010, 0x2011, 0x0080, 0x080c, 0x0f0d, 0x002e,
-	0x0005, 0x0026, 0x70ef, 0x0000, 0x080c, 0x0f08, 0x1130, 0x2011,
-	0x8040, 0x080c, 0x0f1c, 0x002e, 0x0005, 0x080c, 0x2850, 0x1118,
-	0x2011, 0xcdc5, 0x0010, 0x2011, 0xcac2, 0x080c, 0x0f0d, 0x002e,
-	0x0005, 0x00e6, 0x0016, 0x0006, 0x2071, 0x1800, 0xd0b4, 0x70e8,
-	0x71e4, 0x1118, 0xc0e4, 0xc1f4, 0x0050, 0x0006, 0x3b00, 0x9084,
-	0xff3e, 0x20d8, 0x000e, 0x70ef, 0x0000, 0xc0e5, 0xc1f5, 0x0099,
-	0x000e, 0x001e, 0x00ee, 0x0005, 0x00e6, 0x2071, 0x1800, 0xd0e4,
-	0x70e8, 0x1110, 0xc0dc, 0x0008, 0xc0dd, 0x0016, 0x71e4, 0x0019,
-	0x001e, 0x00ee, 0x0005, 0x70ea, 0x71e6, 0x7000, 0x9084, 0x0007,
-	0x000b, 0x0005, 0x0ec0, 0x0e9a, 0x0e9a, 0x0e6e, 0x0ea9, 0x0e9a,
-	0x0e9a, 0x0ea9, 0xc284, 0x0016, 0x3b08, 0x3a00, 0x9104, 0x918d,
-	0x00c1, 0x21d8, 0x9084, 0xff3e, 0x9205, 0x20d0, 0x001e, 0x0005,
-	0x2001, 0x183a, 0x2004, 0xd0dc, 0x0005, 0x9e86, 0x1800, 0x190c,
-	0x0d65, 0x70e8, 0xd0e4, 0x0108, 0xc2e5, 0x72ea, 0xd0e4, 0x1118,
-	0x9294, 0x00c1, 0x08f9, 0x0005, 0x9e86, 0x1800, 0x190c, 0x0d65,
-	0x70e4, 0xd0f4, 0x0108, 0xc2f5, 0x72e6, 0xd0f4, 0x1140, 0x9284,
-	0x8000, 0x8005, 0xc284, 0x9215, 0x9294, 0x00c1, 0x0861, 0x0005,
-	0x1d04, 0x0f30, 0x2091, 0x6000, 0x1f04, 0x0f30, 0x0005, 0x890e,
-	0x810e, 0x810f, 0x9194, 0x003f, 0x918c, 0xffc0, 0x0005, 0x0006,
-	0x2200, 0x914d, 0x894f, 0x894d, 0x894d, 0x000e, 0x0005, 0x01d6,
-	0x0146, 0x0036, 0x0096, 0x2061, 0x188b, 0x600b, 0x0000, 0x600f,
-	0x0000, 0x6003, 0x0000, 0x6007, 0x0000, 0x2009, 0xffc0, 0x2105,
-	0x0006, 0x2001, 0xaaaa, 0x200f, 0x2019, 0x5555, 0x9016, 0x2049,
-	0x0bff, 0xab02, 0xa001, 0xa001, 0xa800, 0x9306, 0x1138, 0x2105,
-	0x9306, 0x0120, 0x8210, 0x99c8, 0x0400, 0x0c98, 0x000e, 0x200f,
-	0x2001, 0x189b, 0x928a, 0x000e, 0x1638, 0x928a, 0x0006, 0x2011,
-	0x0006, 0x1210, 0x2011, 0x0000, 0x2202, 0x9006, 0x2008, 0x82ff,
-	0x01b0, 0x8200, 0x600a, 0x600f, 0xffff, 0x6003, 0x0002, 0x6007,
-	0x0000, 0x0026, 0x2019, 0x0010, 0x9280, 0x0001, 0x20e8, 0x21a0,
-	0x21a8, 0x4104, 0x8319, 0x1de0, 0x8211, 0x1da0, 0x002e, 0x009e,
-	0x003e, 0x014e, 0x01de, 0x0005, 0x2011, 0x000e, 0x08e8, 0x0016,
-	0x0026, 0x0096, 0x3348, 0x080c, 0x0f37, 0x2100, 0x9300, 0x2098,
-	0x22e0, 0x009e, 0x002e, 0x001e, 0x0036, 0x3518, 0x20a9, 0x0001,
-	0x4002, 0x8007, 0x4004, 0x8319, 0x1dd8, 0x003e, 0x0005, 0x20e9,
-	0x0001, 0x71b4, 0x81ff, 0x11c0, 0x9006, 0x2009, 0x0200, 0x20a9,
-	0x0002, 0x9298, 0x0018, 0x23a0, 0x4001, 0x2009, 0x0700, 0x20a9,
-	0x0002, 0x9298, 0x0008, 0x23a0, 0x4001, 0x7078, 0x8007, 0x717c,
-	0x810f, 0x20a9, 0x0002, 0x4001, 0x9298, 0x000c, 0x23a0, 0x900e,
-	0x080c, 0x0d45, 0x2001, 0x0000, 0x810f, 0x20a9, 0x0002, 0x4001,
-	0x0005, 0x89ff, 0x0140, 0xa804, 0xa807, 0x0000, 0x0006, 0x080c,
-	0x1061, 0x009e, 0x0cb0, 0x0005, 0x00e6, 0x2071, 0x1800, 0x080c,
-	0x10da, 0x090c, 0x0d65, 0x00ee, 0x0005, 0x0086, 0x00e6, 0x0006,
-	0x0026, 0x0036, 0x0126, 0x2091, 0x8000, 0x00c9, 0x2071, 0x1800,
-	0x73bc, 0x702c, 0x9016, 0x9045, 0x0158, 0x8210, 0x9906, 0x090c,
-	0x0d65, 0x2300, 0x9202, 0x0120, 0x1a0c, 0x0d65, 0xa000, 0x0c98,
-	0x012e, 0x003e, 0x002e, 0x000e, 0x00ee, 0x008e, 0x0005, 0x0086,
-	0x00e6, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071, 0x190e, 0x7010,
-	0x9005, 0x0140, 0x7018, 0x9045, 0x0128, 0x9906, 0x090c, 0x0d65,
-	0xa000, 0x0cc8, 0x012e, 0x000e, 0x00ee, 0x008e, 0x0005, 0x00e6,
-	0x2071, 0x1800, 0x0126, 0x2091, 0x8000, 0x70bc, 0x8001, 0x0270,
-	0x70be, 0x702c, 0x2048, 0x9085, 0x0001, 0xa800, 0x702e, 0xa803,
-	0x0000, 0xa807, 0x0000, 0x012e, 0x00ee, 0x0005, 0x904e, 0x0cd8,
-	0x00e6, 0x0126, 0x2091, 0x8000, 0x2071, 0x1800, 0x70bc, 0x90ca,
-	0x0040, 0x0268, 0x8001, 0x70be, 0x702c, 0x2048, 0xa800, 0x702e,
-	0xa803, 0x0000, 0xa807, 0x0000, 0x012e, 0x00ee, 0x0005, 0x904e,
-	0x0cd8, 0x00e6, 0x0126, 0x2091, 0x8000, 0x0016, 0x890e, 0x810e,
-	0x810f, 0x9184, 0x003f, 0xa862, 0x9184, 0xffc0, 0xa85e, 0x001e,
-	0x0020, 0x00e6, 0x0126, 0x2091, 0x8000, 0x2071, 0x1800, 0x702c,
-	0xa802, 0x2900, 0x702e, 0x70bc, 0x8000, 0x70be, 0x080c, 0x8087,
-	0x012e, 0x00ee, 0x0005, 0x2071, 0x1800, 0x9026, 0x2009, 0x0000,
-	0x2049, 0x0400, 0x2900, 0x702e, 0x8940, 0x2800, 0xa802, 0xa95e,
-	0xa863, 0x0001, 0x8420, 0x9886, 0x0440, 0x0120, 0x2848, 0x9188,
-	0x0040, 0x0c90, 0x2071, 0x188b, 0x7000, 0x9005, 0x11a0, 0x2001,
-	0x049b, 0xa802, 0x2048, 0x2009, 0x26c0, 0x8940, 0x2800, 0xa802,
-	0xa95e, 0xa863, 0x0001, 0x8420, 0x9886, 0x0800, 0x0120, 0x2848,
-	0x9188, 0x0040, 0x0c90, 0x2071, 0x188b, 0x7104, 0x7200, 0x82ff,
-	0x01d0, 0x7308, 0x8318, 0x831f, 0x831b, 0x831b, 0x7312, 0x8319,
-	0x2001, 0x0800, 0xa802, 0x2048, 0x8900, 0xa802, 0x2040, 0xa95e,
-	0xaa62, 0x8420, 0x2300, 0x9906, 0x0130, 0x2848, 0x9188, 0x0040,
-	0x9291, 0x0000, 0x0c88, 0xa803, 0x0000, 0x2071, 0x1800, 0x74ba,
-	0x74be, 0x0005, 0x00e6, 0x0016, 0x9984, 0xfc00, 0x01e8, 0x908c,
-	0xf800, 0x1168, 0x9982, 0x0400, 0x02b8, 0x9982, 0x0440, 0x0278,
-	0x9982, 0x049b, 0x0288, 0x9982, 0x0800, 0x1270, 0x0040, 0x9982,
-	0x0800, 0x0250, 0x2071, 0x188b, 0x7010, 0x9902, 0x1228, 0x9085,
-	0x0001, 0x001e, 0x00ee, 0x0005, 0x9006, 0x0cd8, 0x00e6, 0x2071,
-	0x19f9, 0x7007, 0x0000, 0x9006, 0x701e, 0x7022, 0x7002, 0x2071,
-	0x0000, 0x7010, 0x9085, 0x8044, 0x7012, 0x2071, 0x0080, 0x9006,
-	0x702b, 0x0060, 0x20a9, 0x0040, 0x7022, 0x1f04, 0x1114, 0x702b,
-	0x0060, 0x702b, 0x0020, 0x20a9, 0x0040, 0x7022, 0x1f04, 0x111d,
-	0x702b, 0x0020, 0x00ee, 0x0005, 0x0126, 0x2091, 0x8000, 0x00e6,
-	0xa06f, 0x0000, 0x2071, 0x19f9, 0x701c, 0x9088, 0x1a03, 0x280a,
-	0x8000, 0x9084, 0x003f, 0x701e, 0x7120, 0x9106, 0x090c, 0x0d65,
-	0x7004, 0x9005, 0x1128, 0x00f6, 0x2079, 0x0080, 0x00a9, 0x00fe,
-	0x00ee, 0x012e, 0x0005, 0x0126, 0x2091, 0x8000, 0x00e6, 0x2071,
-	0x19f9, 0x7004, 0x9005, 0x1128, 0x00f6, 0x2079, 0x0080, 0x0021,
-	0x00fe, 0x00ee, 0x012e, 0x0005, 0x7004, 0x9086, 0x0000, 0x1110,
-	0x7007, 0x0006, 0x7000, 0x0002, 0x1166, 0x1164, 0x1164, 0x1164,
-	0x12dd, 0x12dd, 0x12dd, 0x12dd, 0x080c, 0x0d65, 0x701c, 0x7120,
-	0x9106, 0x1148, 0x792c, 0x9184, 0x0001, 0x1120, 0xd1fc, 0x1110,
-	0x7007, 0x0000, 0x0005, 0x0096, 0x9180, 0x1a03, 0x2004, 0x700a,
-	0x2048, 0x8108, 0x918c, 0x003f, 0x7122, 0x782b, 0x0026, 0xa88c,
-	0x7802, 0xa890, 0x7806, 0xa894, 0x780a, 0xa898, 0x780e, 0xa878,
-	0x700e, 0xa870, 0x7016, 0xa874, 0x701a, 0xa868, 0x009e, 0xd084,
-	0x0120, 0x7007, 0x0001, 0x0029, 0x0005, 0x7007, 0x0002, 0x00b1,
-	0x0005, 0x0016, 0x0026, 0x710c, 0x2011, 0x0040, 0x9182, 0x0040,
-	0x1210, 0x2110, 0x9006, 0x700e, 0x7212, 0x8203, 0x7812, 0x782b,
-	0x0020, 0x782b, 0x0041, 0x002e, 0x001e, 0x0005, 0x0016, 0x0026,
-	0x0136, 0x0146, 0x0156, 0x7014, 0x20e0, 0x7018, 0x2098, 0x20e9,
-	0x0000, 0x20a1, 0x0088, 0x782b, 0x0026, 0x710c, 0x2011, 0x0040,
-	0x9182, 0x0040, 0x1210, 0x2110, 0x9006, 0x700e, 0x22a8, 0x4006,
-	0x8203, 0x7812, 0x782b, 0x0020, 0x3300, 0x701a, 0x782b, 0x0001,
-	0x015e, 0x014e, 0x013e, 0x002e, 0x001e, 0x0005, 0x2009, 0x19f9,
-	0x2104, 0xc095, 0x200a, 0x080c, 0x1143, 0x0005, 0x0016, 0x00e6,
-	0x2071, 0x19f9, 0x00f6, 0x2079, 0x0080, 0x792c, 0xd1bc, 0x190c,
-	0x0d5e, 0x782b, 0x0002, 0xd1fc, 0x0120, 0x918c, 0x0700, 0x7004,
-	0x0023, 0x00fe, 0x00ee, 0x001e, 0x0005, 0x1154, 0x11fc, 0x1230,
-	0x0d65, 0x0d65, 0x12e9, 0x0d65, 0x918c, 0x0700, 0x1550, 0x0136,
-	0x0146, 0x0156, 0x7014, 0x20e8, 0x7018, 0x20a0, 0x20e1, 0x0000,
-	0x2099, 0x0088, 0x782b, 0x0040, 0x7010, 0x20a8, 0x4005, 0x3400,
-	0x701a, 0x015e, 0x014e, 0x013e, 0x700c, 0x9005, 0x0578, 0x7800,
-	0x7802, 0x7804, 0x7806, 0x080c, 0x1199, 0x0005, 0x7008, 0x0096,
-	0x2048, 0xa86f, 0x0100, 0x009e, 0x7007, 0x0000, 0x080c, 0x1154,
-	0x0005, 0x7008, 0x0096, 0x2048, 0xa86f, 0x0200, 0x009e, 0x0ca0,
-	0x918c, 0x0700, 0x1150, 0x700c, 0x9005, 0x0180, 0x7800, 0x7802,
-	0x7804, 0x7806, 0x080c, 0x11ae, 0x0005, 0x7008, 0x0096, 0x2048,
-	0xa86f, 0x0200, 0x009e, 0x7007, 0x0000, 0x0080, 0x0096, 0x7008,
-	0x2048, 0x7800, 0xa88e, 0x7804, 0xa892, 0x7808, 0xa896, 0x780c,
-	0xa89a, 0xa86f, 0x0100, 0x009e, 0x7007, 0x0000, 0x0096, 0x00d6,
-	0x7008, 0x2048, 0x2001, 0x18b7, 0x2004, 0x9906, 0x1128, 0xa89c,
-	0x080f, 0x00de, 0x009e, 0x00a0, 0x00de, 0x009e, 0x0096, 0x00d6,
-	0x7008, 0x2048, 0x0081, 0x0150, 0xa89c, 0x0086, 0x2940, 0x080f,
-	0x008e, 0x00de, 0x009e, 0x080c, 0x1143, 0x0005, 0x00de, 0x009e,
-	0x080c, 0x1143, 0x0005, 0xa8a8, 0xd08c, 0x0005, 0x0096, 0xa0a0,
-	0x904d, 0x090c, 0x0d65, 0xa06c, 0x908e, 0x0100, 0x0130, 0xa87b,
-	0x0030, 0xa883, 0x0000, 0xa897, 0x4002, 0x080c, 0x69a9, 0xa09f,
-	0x0000, 0xa0a3, 0x0000, 0x2848, 0x080c, 0x1061, 0x009e, 0x0005,
-	0x00a6, 0xa0a0, 0x904d, 0x090c, 0x0d65, 0xa06c, 0x908e, 0x0100,
-	0x0128, 0xa87b, 0x0001, 0xa883, 0x0000, 0x00c0, 0xa80c, 0x2050,
-	0xb004, 0x9005, 0x0198, 0xa80e, 0x2050, 0x8006, 0x8006, 0x8007,
-	0x908c, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0002, 0xa076, 0xa172,
-	0xb000, 0xa07a, 0x2810, 0x080c, 0x1124, 0x00e8, 0xa97c, 0xa894,
-	0x0016, 0x0006, 0x080c, 0x69a9, 0x000e, 0x001e, 0xd1fc, 0x1138,
-	0xd1f4, 0x0128, 0x00c6, 0x2060, 0x080c, 0x9be6, 0x00ce, 0x7008,
-	0x2048, 0xa89f, 0x0000, 0xa8a3, 0x0000, 0x080c, 0x1061, 0x7007,
-	0x0000, 0x080c, 0x1143, 0x00ae, 0x0005, 0x0126, 0x2091, 0x8000,
-	0x782b, 0x1001, 0x7007, 0x0005, 0x7000, 0xc094, 0x7002, 0x012e,
-	0x0005, 0x7007, 0x0000, 0x080c, 0x1154, 0x0005, 0x0126, 0x2091,
-	0x2200, 0x2079, 0x0300, 0x2071, 0x1a43, 0x7003, 0x0000, 0x78bf,
-	0x00f6, 0x0041, 0x7807, 0x0007, 0x7803, 0x0000, 0x7803, 0x0001,
-	0x012e, 0x0005, 0x00c6, 0x7803, 0x0000, 0x2001, 0x0165, 0x2003,
-	0x4198, 0x7808, 0xd09c, 0x0110, 0x7820, 0x0cd8, 0x2001, 0x1a44,
-	0x2003, 0x0000, 0x78ab, 0x0004, 0x78ac, 0xd0ac, 0x1de8, 0x78ab,
-	0x0002, 0x7807, 0x0007, 0x7827, 0x0030, 0x782b, 0x0400, 0x7827,
-	0x0031, 0x782b, 0x1a51, 0x781f, 0xff00, 0x781b, 0xff00, 0x2001,
-	0x0200, 0x2004, 0xd0dc, 0x0110, 0x781f, 0x0303, 0x2061, 0x1a51,
-	0x602f, 0x1ddc, 0x2001, 0x1819, 0x2004, 0x9082, 0x1ddc, 0x6032,
-	0x603b, 0x1d1c, 0x602b, 0x1a91, 0x6007, 0x1a71, 0x2061, 0x1a71,
-	0x00ce, 0x0005, 0x0126, 0x2091, 0x2200, 0x7908, 0x9184, 0x0070,
-	0x190c, 0x0d5e, 0xd19c, 0x05a0, 0x7820, 0x908c, 0xf000, 0x0540,
-	0x2060, 0x6020, 0x9086, 0x0003, 0x1550, 0x6000, 0x9086, 0x0004,
-	0x1530, 0x6114, 0x2148, 0xa876, 0xa87a, 0xa867, 0x0103, 0x080c,
-	0x67cb, 0x00b6, 0x6010, 0x2058, 0xba3c, 0x8211, 0x0208, 0xba3e,
-	0xb8c0, 0x9005, 0x190c, 0x63ba, 0x00be, 0x6044, 0xd0fc, 0x190c,
-	0x98f0, 0x080c, 0x9c0e, 0x7808, 0xd09c, 0x19b0, 0x012e, 0x0005,
-	0x908a, 0x0024, 0x1a0c, 0x0d65, 0x002b, 0x012e, 0x0005, 0x04b0,
-	0x012e, 0x0005, 0x13a6, 0x13cc, 0x13fc, 0x1401, 0x1405, 0x140a,
-	0x1432, 0x1436, 0x1444, 0x1448, 0x13a6, 0x14d4, 0x14d8, 0x153b,
-	0x13a6, 0x13a6, 0x13a6, 0x13a6, 0x13a6, 0x13a6, 0x13a6, 0x13a6,
-	0x13a6, 0x13a6, 0x13a6, 0x13a6, 0x13a6, 0x140c, 0x13a6, 0x13d4,
-	0x13f9, 0x13c0, 0x13a6, 0x13e0, 0x13aa, 0x13a8, 0x080c, 0x0d65,
-	0x080c, 0x0d5e, 0x080c, 0x1542, 0x2009, 0x1a50, 0x2104, 0x8000,
-	0x200a, 0x080c, 0x7b25, 0x080c, 0x1989, 0x0005, 0x6044, 0xd0fc,
-	0x190c, 0x98f0, 0x2009, 0x0055, 0x080c, 0x9c82, 0x012e, 0x0005,
-	0x080c, 0x1542, 0x2060, 0x6044, 0xd0fc, 0x190c, 0x98f0, 0x2009,
-	0x0055, 0x080c, 0x9c82, 0x0005, 0x2009, 0x0048, 0x080c, 0x1542,
-	0x2060, 0x080c, 0x9c82, 0x0005, 0x2009, 0x0054, 0x080c, 0x1542,
-	0x2060, 0x6044, 0xd0fc, 0x190c, 0x98f0, 0x080c, 0x9c82, 0x0005,
-	0x080c, 0x1542, 0x2060, 0x0056, 0x0066, 0x080c, 0x1542, 0x2028,
-	0x080c, 0x1542, 0x2030, 0x0036, 0x0046, 0x2021, 0x0000, 0x2418,
-	0x2009, 0x0056, 0x080c, 0x9c82, 0x004e, 0x003e, 0x006e, 0x005e,
-	0x0005, 0x080c, 0x1542, 0x0005, 0x7004, 0xc085, 0xc0b5, 0x7006,
-	0x0005, 0x7004, 0xc085, 0x7006, 0x0005, 0x080c, 0x1542, 0x080c,
-	0x15ff, 0x0005, 0x080c, 0x0d65, 0x080c, 0x1542, 0x2060, 0x6014,
-	0x0096, 0x2048, 0xa83b, 0xffff, 0x009e, 0x2009, 0x0048, 0x080c,
-	0x9c82, 0x2001, 0x015d, 0x2003, 0x0000, 0x2009, 0x03e8, 0x8109,
-	0x0160, 0x2001, 0x0201, 0x2004, 0x9005, 0x0dc8, 0x2001, 0x0218,
-	0x2004, 0xd0ec, 0x1110, 0x080c, 0x1547, 0x2001, 0x0307, 0x2003,
-	0x8000, 0x0005, 0x7004, 0xc095, 0x7006, 0x0005, 0x080c, 0x1542,
-	0x2060, 0x6014, 0x0096, 0x2048, 0xa83b, 0xffff, 0x009e, 0x2009,
-	0x0048, 0x080c, 0x9c82, 0x0005, 0x080c, 0x1542, 0x080c, 0x0d65,
-	0x080c, 0x1542, 0x080c, 0x14bf, 0x7827, 0x0018, 0x79ac, 0xd1dc,
-	0x0540, 0x7827, 0x0015, 0x7828, 0x782b, 0x0000, 0x9065, 0x0138,
-	0x2001, 0x020d, 0x2003, 0x0050, 0x2003, 0x0020, 0x0400, 0x7004,
-	0x9005, 0x1180, 0x78ab, 0x0004, 0x7827, 0x0018, 0x782b, 0x0000,
-	0xd1bc, 0x090c, 0x0d65, 0x2001, 0x020d, 0x2003, 0x0050, 0x2003,
-	0x0020, 0x0490, 0x78ab, 0x0004, 0x7803, 0x0001, 0x080c, 0x14d8,
-	0x0005, 0x7828, 0x782b, 0x0000, 0x9065, 0x090c, 0x0d65, 0x6014,
-	0x2048, 0x78ab, 0x0004, 0x918c, 0x0700, 0x01a8, 0x080c, 0x7b25,
-	0x080c, 0x1989, 0x080c, 0xb870, 0x0158, 0xa9ac, 0xa936, 0xa9b0,
-	0xa93a, 0xa83f, 0xffff, 0xa843, 0xffff, 0xa880, 0xc0bd, 0xa882,
-	0x080c, 0xb45e, 0x0005, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be,
-	0xd0bc, 0x6024, 0x190c, 0xbc71, 0x2029, 0x00c8, 0x8529, 0x0128,
-	0x2001, 0x0201, 0x2004, 0x9005, 0x0dc8, 0x7dbc, 0x080c, 0xd61c,
-	0xd5a4, 0x1118, 0x080c, 0x1547, 0x0005, 0x080c, 0x7b25, 0x080c,
-	0x1989, 0x0005, 0x781f, 0x0300, 0x7803, 0x0001, 0x0005, 0x0016,
-	0x0066, 0x0076, 0x00f6, 0x2079, 0x0300, 0x7908, 0x918c, 0x0007,
-	0x9186, 0x0003, 0x0120, 0x2001, 0x0016, 0x080c, 0x15b8, 0x00fe,
-	0x007e, 0x006e, 0x001e, 0x0005, 0x7004, 0xc09d, 0x7006, 0x0005,
-	0x7104, 0x9184, 0x0004, 0x190c, 0x0d65, 0xd184, 0x1189, 0xd19c,
-	0x0158, 0xc19c, 0x7106, 0x2001, 0x020d, 0x2003, 0x0050, 0x2003,
-	0x0020, 0x080c, 0x1547, 0x0005, 0x81ff, 0x190c, 0x0d65, 0x0005,
-	0xc184, 0xd1b4, 0xc1b4, 0x7106, 0x0016, 0x00e6, 0x15e0, 0x2071,
-	0x0200, 0x080c, 0x15f3, 0x6014, 0x9005, 0x05a8, 0x0096, 0x2048,
-	0xa864, 0x009e, 0x9084, 0x00ff, 0x908e, 0x0029, 0x0160, 0x908e,
-	0x0048, 0x1548, 0x601c, 0xd084, 0x11d8, 0x00f6, 0x2c78, 0x080c,
-	0x1669, 0x00fe, 0x00a8, 0x00f6, 0x2c78, 0x080c, 0x17b1, 0x00fe,
-	0x2009, 0x01f4, 0x8109, 0x0160, 0x2001, 0x0201, 0x2004, 0x9005,
-	0x0dc8, 0x2001, 0x0218, 0x2004, 0xd0ec, 0x1110, 0x0401, 0x0040,
-	0x2001, 0x020d, 0x2003, 0x0020, 0x080c, 0x1302, 0x7803, 0x0001,
-	0x00ee, 0x001e, 0x0005, 0x2001, 0x020d, 0x2003, 0x0050, 0x2003,
-	0x0020, 0x0069, 0x0ca8, 0x0031, 0x2060, 0x2009, 0x0053, 0x080c,
-	0x9c82, 0x0005, 0x7808, 0xd09c, 0x0de8, 0x7820, 0x0005, 0x080c,
-	0x14bf, 0x00d6, 0x2069, 0x0200, 0x2009, 0x01f4, 0x8109, 0x0510,
-	0x6804, 0x9005, 0x0dd8, 0x2001, 0x015d, 0x2003, 0x0000, 0x79bc,
-	0xd1a4, 0x1528, 0x79b8, 0x918c, 0x0fff, 0x0180, 0x9182, 0x0841,
-	0x1268, 0x9188, 0x0007, 0x918c, 0x0ff8, 0x810c, 0x810c, 0x810c,
-	0x080c, 0x15aa, 0x6827, 0x0001, 0x8109, 0x1dd0, 0x04d9, 0x6827,
-	0x0002, 0x04c1, 0x6804, 0x9005, 0x1130, 0x682c, 0xd0e4, 0x1500,
-	0x6804, 0x9005, 0x0de8, 0x79b8, 0xd1ec, 0x1130, 0x08c0, 0x080c,
-	0x7b25, 0x080c, 0x1989, 0x0090, 0x7827, 0x0015, 0x782b, 0x0000,
-	0x7827, 0x0018, 0x782b, 0x0000, 0x2001, 0x020d, 0x2003, 0x0020,
-	0x2001, 0x0307, 0x2003, 0x0300, 0x7803, 0x0001, 0x00de, 0x0005,
-	0x682c, 0x9084, 0x5400, 0x9086, 0x5400, 0x0d30, 0x7827, 0x0015,
-	0x782b, 0x0000, 0x7803, 0x0001, 0x6800, 0x9085, 0x1800, 0x6802,
-	0x00de, 0x0005, 0x6824, 0x9084, 0x0003, 0x1de0, 0x0005, 0x2001,
-	0x0030, 0x2c08, 0x621c, 0x0021, 0x7830, 0x9086, 0x0041, 0x0005,
-	0x00f6, 0x2079, 0x0300, 0x0006, 0x7808, 0xd09c, 0x0140, 0x0016,
-	0x0026, 0x00c6, 0x080c, 0x1342, 0x00ce, 0x002e, 0x001e, 0x000e,
-	0x0006, 0x7832, 0x7936, 0x7a3a, 0x781b, 0x8080, 0x0059, 0x1118,
-	0x000e, 0x00fe, 0x0005, 0x000e, 0x792c, 0x3900, 0x8000, 0x2004,
-	0x080c, 0x0d65, 0x2009, 0xff00, 0x8109, 0x0120, 0x7818, 0xd0bc,
-	0x1dd8, 0x0005, 0x9085, 0x0001, 0x0005, 0x7832, 0x7936, 0x7a3a,
-	0x781b, 0x8080, 0x0c79, 0x1108, 0x0005, 0x792c, 0x3900, 0x8000,
-	0x2004, 0x080c, 0x0d65, 0x7037, 0x0001, 0x7150, 0x7037, 0x0002,
-	0x7050, 0x2060, 0xd1bc, 0x1110, 0x7054, 0x2060, 0x0005, 0x00e6,
-	0x0016, 0x2071, 0x0200, 0x0c79, 0x6124, 0xd1dc, 0x01f8, 0x701c,
-	0xd08c, 0x0904, 0x165e, 0x7017, 0x0000, 0x2001, 0x0264, 0x2004,
-	0xd0bc, 0x0904, 0x165e, 0x2001, 0x0268, 0x00c6, 0x2064, 0x6104,
-	0x6038, 0x00ce, 0x918e, 0x0039, 0x1904, 0x165e, 0x9c06, 0x15f0,
-	0x0126, 0x2091, 0x2600, 0x080c, 0x7a7d, 0x012e, 0x7358, 0x745c,
-	0x6014, 0x905d, 0x0598, 0x2b48, 0x6010, 0x00b6, 0x2058, 0xb800,
-	0x00be, 0xd0bc, 0x190c, 0xbc4c, 0xab42, 0xac3e, 0x2001, 0x187d,
-	0x2004, 0xd0b4, 0x1170, 0x601c, 0xd0e4, 0x1158, 0x6010, 0x00b6,
-	0x2058, 0xb800, 0x00be, 0xd0bc, 0x1120, 0xa83b, 0x7fff, 0xa837,
-	0xffff, 0x080c, 0x1d3c, 0x1190, 0x080c, 0x180c, 0x2a00, 0xa816,
-	0x0130, 0x2800, 0xa80e, 0x2c05, 0xa80a, 0x2c00, 0xa812, 0x7037,
-	0x0020, 0x781f, 0x0300, 0x001e, 0x00ee, 0x0005, 0x7037, 0x0050,
-	0x7037, 0x0020, 0x001e, 0x00ee, 0x080c, 0x1547, 0x0005, 0x080c,
-	0x0d65, 0x0016, 0x2009, 0x00a0, 0x8109, 0xa001, 0xa001, 0xa001,
-	0x1dd8, 0x001e, 0x2cf0, 0x0126, 0x2091, 0x2200, 0x00c6, 0x3e60,
-	0x6014, 0x2048, 0x2940, 0x903e, 0x2730, 0xa864, 0x2068, 0xa81a,
-	0x9d84, 0x000f, 0x9088, 0x1d1c, 0x2165, 0x0002, 0x169d, 0x16ea,
-	0x169d, 0x169d, 0x169d, 0x16cc, 0x169d, 0x16a1, 0x1696, 0x16e1,
-	0x169d, 0x169d, 0x169d, 0x17a6, 0x16b5, 0x16ab, 0xa964, 0x918c,
-	0x00ff, 0x918e, 0x0048, 0x0904, 0x16e1, 0x9085, 0x0001, 0x0804,
-	0x179d, 0xa87c, 0xd0bc, 0x0dc8, 0xa890, 0xa842, 0xa88c, 0xa83e,
-	0xa888, 0x0804, 0x16f1, 0xa87c, 0xd0bc, 0x0d78, 0xa890, 0xa842,
-	0xa88c, 0xa83e, 0xa888, 0x0804, 0x1740, 0xa87c, 0xd0bc, 0x0d28,
-	0xa890, 0xa842, 0xa88c, 0xa83e, 0xa804, 0x9045, 0x090c, 0x0d65,
-	0xa164, 0xa91a, 0x91ec, 0x000f, 0x9d80, 0x1d1c, 0x2065, 0xa888,
-	0xd19c, 0x1904, 0x1740, 0x0428, 0xa87c, 0xd0ac, 0x0970, 0xa804,
-	0x9045, 0x090c, 0x0d65, 0xa164, 0xa91a, 0x91ec, 0x000f, 0x9d80,
-	0x1d1c, 0x2065, 0x9006, 0xa842, 0xa83e, 0xd19c, 0x1904, 0x1740,
-	0x0080, 0xa87c, 0xd0ac, 0x0904, 0x169d, 0x9006, 0xa842, 0xa83e,
-	0x0804, 0x1740, 0xa87c, 0xd0ac, 0x0904, 0x169d, 0x9006, 0xa842,
-	0xa83e, 0x2c05, 0x908a, 0x0036, 0x1a0c, 0x0d65, 0x9082, 0x001b,
-	0x0002, 0x1714, 0x1714, 0x1716, 0x1714, 0x1714, 0x1714, 0x171c,
-	0x1714, 0x1714, 0x1714, 0x1722, 0x1714, 0x1714, 0x1714, 0x1728,
-	0x1714, 0x1714, 0x1714, 0x172e, 0x1714, 0x1714, 0x1714, 0x1734,
-	0x1714, 0x1714, 0x1714, 0x173a, 0x080c, 0x0d65, 0xa574, 0xa478,
-	0xa37c, 0xa280, 0x0804, 0x1785, 0xa584, 0xa488, 0xa38c, 0xa290,
-	0x0804, 0x1785, 0xa594, 0xa498, 0xa39c, 0xa2a0, 0x0804, 0x1785,
-	0xa5a4, 0xa4a8, 0xa3ac, 0xa2b0, 0x0804, 0x1785, 0xa5b4, 0xa4b8,
-	0xa3bc, 0xa2c0, 0x0804, 0x1785, 0xa5c4, 0xa4c8, 0xa3cc, 0xa2d0,
-	0x0804, 0x1785, 0xa5d4, 0xa4d8, 0xa3dc, 0xa2e0, 0x0804, 0x1785,
-	0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0d65, 0x9082, 0x001b, 0x0002,
-	0x1763, 0x1761, 0x1761, 0x1761, 0x1761, 0x1761, 0x176a, 0x1761,
-	0x1761, 0x1761, 0x1761, 0x1761, 0x1771, 0x1761, 0x1761, 0x1761,
-	0x1761, 0x1761, 0x1778, 0x1761, 0x1761, 0x1761, 0x1761, 0x1761,
-	0x177f, 0x080c, 0x0d65, 0xa56c, 0xa470, 0xa774, 0xa678, 0xa37c,
-	0xa280, 0x00d8, 0xa584, 0xa488, 0xa78c, 0xa690, 0xa394, 0xa298,
-	0x00a0, 0xa59c, 0xa4a0, 0xa7a4, 0xa6a8, 0xa3ac, 0xa2b0, 0x0068,
-	0xa5b4, 0xa4b8, 0xa7bc, 0xa6c0, 0xa3c4, 0xa2c8, 0x0030, 0xa5cc,
-	0xa4d0, 0xa7d4, 0xa6d8, 0xa3dc, 0xa2e0, 0xab2e, 0xaa32, 0xad1e,
-	0xac22, 0xaf26, 0xae2a, 0xa988, 0x8c60, 0x2c1d, 0xa8ac, 0xaab0,
-	0xa836, 0xaa3a, 0x8109, 0xa916, 0x1158, 0x3e60, 0x601c, 0xc085,
-	0x601e, 0xa87c, 0xc0dd, 0xa87e, 0x9006, 0x00ce, 0x012e, 0x0005,
-	0x2800, 0xa80e, 0xab0a, 0x2c00, 0xa812, 0x0c78, 0x0804, 0x169d,
-	0x0016, 0x2009, 0x00a0, 0x8109, 0xa001, 0xa001, 0xa001, 0x1dd8,
-	0x001e, 0x2ff0, 0x0126, 0x2091, 0x2200, 0x00c6, 0x3e60, 0x6014,
-	0x2048, 0x2940, 0xa80e, 0x2061, 0x1d17, 0xa813, 0x1d17, 0x2c05,
-	0xa80a, 0xa964, 0xa91a, 0xa87c, 0xd0ac, 0x090c, 0x0d65, 0x9006,
-	0xa842, 0xa83e, 0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0d65, 0xadcc,
-	0xacd0, 0xafd4, 0xaed8, 0xabdc, 0xaae0, 0xab2e, 0xaa32, 0xad1e,
-	0xac22, 0xaf26, 0xae2a, 0xa8ac, 0xaab0, 0xa836, 0xaa3a, 0xa988,
-	0xa864, 0x9084, 0x00ff, 0x9086, 0x0008, 0x1120, 0x8109, 0xa916,
-	0x0128, 0x0078, 0x918a, 0x0002, 0xa916, 0x1158, 0x3e60, 0x601c,
-	0xc085, 0x601e, 0xa87c, 0xc0dd, 0xa87e, 0x9006, 0x00ce, 0x012e,
-	0x0005, 0xa804, 0x9045, 0x090c, 0x0d65, 0xa80e, 0xa064, 0xa81a,
-	0x9084, 0x000f, 0x9080, 0x1d1c, 0x2015, 0x82ff, 0x090c, 0x0d65,
-	0xaa12, 0x2205, 0xa80a, 0x0c10, 0x903e, 0x2730, 0xa880, 0xd0fc,
-	0x1190, 0x2d00, 0x0002, 0x1901, 0x1863, 0x1863, 0x1901, 0x1901,
-	0x18fb, 0x1901, 0x1863, 0x18b2, 0x18b2, 0x18b2, 0x1901, 0x1901,
-	0x1901, 0x18f8, 0x18b2, 0xc0fc, 0xa882, 0xab2c, 0xaa30, 0xad1c,
-	0xac20, 0xdd9c, 0x0904, 0x1903, 0x2c05, 0x908a, 0x0034, 0x1a0c,
-	0x0d65, 0x9082, 0x001b, 0x0002, 0x184f, 0x184d, 0x184d, 0x184d,
-	0x184d, 0x184d, 0x1853, 0x184d, 0x184d, 0x184d, 0x184d, 0x184d,
-	0x1857, 0x184d, 0x184d, 0x184d, 0x184d, 0x184d, 0x185b, 0x184d,
-	0x184d, 0x184d, 0x184d, 0x184d, 0x185f, 0x080c, 0x0d65, 0xa774,
-	0xa678, 0x0804, 0x1903, 0xa78c, 0xa690, 0x0804, 0x1903, 0xa7a4,
-	0xa6a8, 0x0804, 0x1903, 0xa7bc, 0xa6c0, 0x0804, 0x1903, 0xa7d4,
-	0xa6d8, 0x0804, 0x1903, 0x2c05, 0x908a, 0x0036, 0x1a0c, 0x0d65,
-	0x9082, 0x001b, 0x0002, 0x1886, 0x1886, 0x1888, 0x1886, 0x1886,
-	0x1886, 0x188e, 0x1886, 0x1886, 0x1886, 0x1894, 0x1886, 0x1886,
-	0x1886, 0x189a, 0x1886, 0x1886, 0x1886, 0x18a0, 0x1886, 0x1886,
-	0x1886, 0x18a6, 0x1886, 0x1886, 0x1886, 0x18ac, 0x080c, 0x0d65,
-	0xa574, 0xa478, 0xa37c, 0xa280, 0x0804, 0x1903, 0xa584, 0xa488,
-	0xa38c, 0xa290, 0x0804, 0x1903, 0xa594, 0xa498, 0xa39c, 0xa2a0,
-	0x0804, 0x1903, 0xa5a4, 0xa4a8, 0xa3ac, 0xa2b0, 0x0804, 0x1903,
-	0xa5b4, 0xa4b8, 0xa3bc, 0xa2c0, 0x0804, 0x1903, 0xa5c4, 0xa4c8,
-	0xa3cc, 0xa2d0, 0x0804, 0x1903, 0xa5d4, 0xa4d8, 0xa3dc, 0xa2e0,
-	0x0804, 0x1903, 0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0d65, 0x9082,
-	0x001b, 0x0002, 0x18d5, 0x18d3, 0x18d3, 0x18d3, 0x18d3, 0x18d3,
-	0x18dc, 0x18d3, 0x18d3, 0x18d3, 0x18d3, 0x18d3, 0x18e3, 0x18d3,
-	0x18d3, 0x18d3, 0x18d3, 0x18d3, 0x18ea, 0x18d3, 0x18d3, 0x18d3,
-	0x18d3, 0x18d3, 0x18f1, 0x080c, 0x0d65, 0xa56c, 0xa470, 0xa774,
-	0xa678, 0xa37c, 0xa280, 0x0438, 0xa584, 0xa488, 0xa78c, 0xa690,
-	0xa394, 0xa298, 0x0400, 0xa59c, 0xa4a0, 0xa7a4, 0xa6a8, 0xa3ac,
-	0xa2b0, 0x00c8, 0xa5b4, 0xa4b8, 0xa7bc, 0xa6c0, 0xa3c4, 0xa2c8,
-	0x0090, 0xa5cc, 0xa4d0, 0xa7d4, 0xa6d8, 0xa3dc, 0xa2e0, 0x0058,
-	0x9d86, 0x000e, 0x1130, 0x080c, 0x1cf2, 0x1904, 0x180c, 0x900e,
-	0x0050, 0x080c, 0x0d65, 0xab2e, 0xaa32, 0xad1e, 0xac22, 0xaf26,
-	0xae2a, 0x080c, 0x1cf2, 0x0005, 0x6014, 0x2048, 0x6118, 0x810c,
-	0x810c, 0x810c, 0x81ff, 0x1118, 0xa887, 0x0001, 0x0008, 0xa986,
-	0x601b, 0x0002, 0xa874, 0x9084, 0x00ff, 0x9084, 0x0008, 0x0150,
-	0x00e9, 0x6000, 0x9086, 0x0004, 0x1120, 0x2009, 0x0048, 0x080c,
-	0x9c82, 0x0005, 0xa974, 0xd1dc, 0x1108, 0x0005, 0xa934, 0xa88c,
-	0x9106, 0x1158, 0xa938, 0xa890, 0x9106, 0x1138, 0x601c, 0xc084,
-	0x601e, 0x2009, 0x0048, 0x0804, 0x9c82, 0x0005, 0x0126, 0x00c6,
-	0x2091, 0x2200, 0x00ce, 0x7908, 0x918c, 0x0007, 0x9186, 0x0000,
-	0x05b0, 0x9186, 0x0003, 0x0598, 0x6020, 0x6023, 0x0000, 0x0006,
-	0x2031, 0x0008, 0x00c6, 0x781f, 0x0808, 0x7808, 0xd09c, 0x0120,
-	0x080c, 0x1342, 0x8631, 0x1db8, 0x00ce, 0x781f, 0x0800, 0x2031,
-	0x0168, 0x00c6, 0x7808, 0xd09c, 0x190c, 0x1342, 0x00ce, 0x2001,
-	0x0038, 0x080c, 0x1a11, 0x7930, 0x9186, 0x0040, 0x0160, 0x9186,
-	0x0042, 0x190c, 0x0d65, 0x2001, 0x001e, 0x8001, 0x1df0, 0x8631,
-	0x1d40, 0x080c, 0x1a20, 0x000e, 0x6022, 0x012e, 0x0005, 0x080c,
-	0x1a0d, 0x7827, 0x0015, 0x7828, 0x9c06, 0x1db8, 0x782b, 0x0000,
-	0x0ca0, 0x00f6, 0x2079, 0x0300, 0x7803, 0x0000, 0x78ab, 0x0004,
-	0x00fe, 0x080c, 0x70ba, 0x1188, 0x2001, 0x0138, 0x2003, 0x0000,
-	0x2001, 0x0160, 0x2003, 0x0000, 0x2011, 0x012c, 0xa001, 0xa001,
-	0x8211, 0x1de0, 0x0059, 0x0804, 0x715f, 0x0479, 0x0039, 0x2001,
-	0x0160, 0x2502, 0x2001, 0x0138, 0x2202, 0x0005, 0x00e6, 0x2071,
-	0x0200, 0x080c, 0x2864, 0x2009, 0x003c, 0x080c, 0x207b, 0x2001,
-	0x015d, 0x2003, 0x0000, 0x7000, 0x9084, 0x003c, 0x1de0, 0x080c,
-	0x8087, 0x70a0, 0x70a2, 0x7098, 0x709a, 0x709c, 0x709e, 0x2001,
-	0x020d, 0x2003, 0x0020, 0x00f6, 0x2079, 0x0300, 0x080c, 0x1302,
-	0x7803, 0x0001, 0x00fe, 0x00ee, 0x0005, 0x2001, 0x0138, 0x2014,
-	0x2003, 0x0000, 0x2001, 0x0160, 0x202c, 0x2003, 0x0000, 0x080c,
-	0x70ba, 0x1108, 0x0005, 0x2021, 0x0260, 0x2001, 0x0141, 0x201c,
-	0xd3dc, 0x1168, 0x2001, 0x0109, 0x201c, 0x939c, 0x0048, 0x1160,
-	0x2001, 0x0111, 0x201c, 0x83ff, 0x1110, 0x8421, 0x1d70, 0x2001,
-	0x015d, 0x2003, 0x0000, 0x0005, 0x0046, 0x2021, 0x0019, 0x2003,
-	0x0048, 0xa001, 0xa001, 0x201c, 0x939c, 0x0048, 0x0120, 0x8421,
-	0x1db0, 0x004e, 0x0c60, 0x004e, 0x0c40, 0x601c, 0xc084, 0x601e,
-	0x0005, 0x2c08, 0x621c, 0x080c, 0x15b8, 0x7930, 0x0005, 0x2c08,
-	0x621c, 0x080c, 0x15e5, 0x7930, 0x0005, 0x8001, 0x1df0, 0x0005,
-	0x2031, 0x0005, 0x781c, 0x9084, 0x0007, 0x0170, 0x2001, 0x0038,
-	0x0c41, 0x9186, 0x0040, 0x0904, 0x1a7e, 0x2001, 0x001e, 0x0c69,
-	0x8631, 0x1d80, 0x080c, 0x0d65, 0x781f, 0x0202, 0x2001, 0x015d,
-	0x2003, 0x0000, 0x2001, 0x0b10, 0x0c01, 0x781c, 0xd084, 0x0110,
-	0x0861, 0x04e0, 0x2001, 0x0030, 0x0891, 0x9186, 0x0040, 0x0568,
-	0x781c, 0xd084, 0x1da8, 0x781f, 0x0101, 0x2001, 0x0014, 0x0869,
-	0x2001, 0x0037, 0x0821, 0x9186, 0x0040, 0x0140, 0x2001, 0x0030,
-	0x080c, 0x1a17, 0x9186, 0x0040, 0x190c, 0x0d65, 0x00d6, 0x2069,
-	0x0200, 0x692c, 0xd1f4, 0x1170, 0xd1c4, 0x0160, 0xd19c, 0x0130,
-	0x6800, 0x9085, 0x1800, 0x6802, 0x00de, 0x0080, 0x6908, 0x9184,
-	0x0007, 0x1db0, 0x00de, 0x781f, 0x0100, 0x791c, 0x9184, 0x0007,
-	0x090c, 0x0d65, 0xa001, 0xa001, 0x781f, 0x0200, 0x0005, 0x0126,
-	0x2091, 0x2400, 0x2079, 0x0380, 0x2001, 0x19bf, 0x2070, 0x012e,
-	0x0005, 0x2cf0, 0x0126, 0x2091, 0x2400, 0x3e60, 0x6014, 0x2048,
-	0xa964, 0xa91a, 0x918c, 0x00ff, 0x9184, 0x000f, 0x0002, 0x1ab3,
-	0x1ab3, 0x1ab3, 0x1ab3, 0x1ab3, 0x1ab3, 0x1ab3, 0x1ab3, 0x1aa7,
-	0x1ab5, 0x1ab3, 0x1ab3, 0x1ab3, 0x1ab3, 0x1ab3, 0x1ab3, 0x9086,
-	0x0008, 0x1148, 0xa87c, 0xd0b4, 0x0904, 0x1c25, 0x2011, 0x1d17,
-	0x2205, 0xab88, 0x0068, 0x080c, 0x0d65, 0xa87c, 0xd0b4, 0x0904,
-	0x1c25, 0x9184, 0x000f, 0x9080, 0x1d1c, 0x2015, 0x2205, 0xab88,
-	0x2908, 0xa80a, 0xa90e, 0xaa12, 0xab16, 0x9006, 0xa842, 0xa83e,
-	0x012e, 0x0005, 0x2cf0, 0x0126, 0x2091, 0x2400, 0x3e60, 0x6014,
-	0x2048, 0xa88c, 0xa990, 0xaaac, 0xabb0, 0xaa36, 0xab3a, 0xa83e,
-	0xa942, 0xa846, 0xa94a, 0xa964, 0x918c, 0x00ff, 0x9186, 0x001e,
-	0x0198, 0x2940, 0xa064, 0xa81a, 0x90ec, 0x000f, 0x9d80, 0x1d1c,
-	0x2065, 0x2c05, 0x2808, 0x2c10, 0xab88, 0xa80a, 0xa90e, 0xaa12,
-	0xab16, 0x012e, 0x3e60, 0x0005, 0xa804, 0x2040, 0x0c58, 0x2cf0,
-	0x0126, 0x2091, 0x2400, 0x3e60, 0x6014, 0x2048, 0xa97c, 0x2950,
-	0xd1dc, 0x1904, 0x1bef, 0xc1dd, 0xa97e, 0x9006, 0xa842, 0xa83e,
-	0xa988, 0x8109, 0xa916, 0xa964, 0xa91a, 0x9184, 0x000f, 0x9088,
-	0x1d1c, 0x2145, 0x0002, 0x1b23, 0x1b31, 0x1b23, 0x1b23, 0x1b23,
-	0x1b25, 0x1b23, 0x1b23, 0x1b86, 0x1b86, 0x1b23, 0x1b23, 0x1b23,
-	0x1b84, 0x1b23, 0x1b23, 0x080c, 0x0d65, 0xa804, 0x2050, 0xb164,
-	0xa91a, 0x9184, 0x000f, 0x9080, 0x1d1c, 0x2045, 0xd19c, 0x1904,
-	0x1b86, 0x9036, 0x2638, 0x2805, 0x908a, 0x0036, 0x1a0c, 0x0d65,
-	0x9082, 0x001b, 0x0002, 0x1b56, 0x1b56, 0x1b58, 0x1b56, 0x1b56,
-	0x1b56, 0x1b5e, 0x1b56, 0x1b56, 0x1b56, 0x1b64, 0x1b56, 0x1b56,
-	0x1b56, 0x1b6a, 0x1b56, 0x1b56, 0x1b56, 0x1b70, 0x1b56, 0x1b56,
-	0x1b56, 0x1b76, 0x1b56, 0x1b56, 0x1b56, 0x1b7c, 0x080c, 0x0d65,
-	0xb574, 0xb478, 0xb37c, 0xb280, 0x0804, 0x1bcb, 0xb584, 0xb488,
-	0xb38c, 0xb290, 0x0804, 0x1bcb, 0xb594, 0xb498, 0xb39c, 0xb2a0,
-	0x0804, 0x1bcb, 0xb5a4, 0xb4a8, 0xb3ac, 0xb2b0, 0x0804, 0x1bcb,
-	0xb5b4, 0xb4b8, 0xb3bc, 0xb2c0, 0x0804, 0x1bcb, 0xb5c4, 0xb4c8,
-	0xb3cc, 0xb2d0, 0x0804, 0x1bcb, 0xb5d4, 0xb4d8, 0xb3dc, 0xb2e0,
-	0x0804, 0x1bcb, 0x0804, 0x1bcb, 0x080c, 0x0d65, 0x2805, 0x908a,
-	0x0034, 0x1a0c, 0x0d65, 0x9082, 0x001b, 0x0002, 0x1ba9, 0x1ba7,
-	0x1ba7, 0x1ba7, 0x1ba7, 0x1ba7, 0x1bb0, 0x1ba7, 0x1ba7, 0x1ba7,
-	0x1ba7, 0x1ba7, 0x1bb7, 0x1ba7, 0x1ba7, 0x1ba7, 0x1ba7, 0x1ba7,
-	0x1bbe, 0x1ba7, 0x1ba7, 0x1ba7, 0x1ba7, 0x1ba7, 0x1bc5, 0x080c,
-	0x0d65, 0xb56c, 0xb470, 0xb774, 0xb678, 0xb37c, 0xb280, 0x00d8,
-	0xb584, 0xb488, 0xb78c, 0xb690, 0xb394, 0xb298, 0x00a0, 0xb59c,
-	0xb4a0, 0xb7a4, 0xb6a8, 0xb3ac, 0xb2b0, 0x0068, 0xb5b4, 0xb4b8,
-	0xb7bc, 0xb6c0, 0xb3c4, 0xb2c8, 0x0030, 0xb5cc, 0xb4d0, 0xb7d4,
-	0xb6d8, 0xb3dc, 0xb2e0, 0xab2e, 0xaa32, 0xad1e, 0xac22, 0xaf26,
-	0xae2a, 0xa988, 0x8109, 0xa916, 0x1118, 0x9006, 0x012e, 0x0005,
-	0x8840, 0x2805, 0x9005, 0x1168, 0xb004, 0x9005, 0x090c, 0x0d65,
-	0x2050, 0xb164, 0xa91a, 0x9184, 0x000f, 0x9080, 0x1d1c, 0x2045,
-	0x2805, 0x2810, 0x2a08, 0xa80a, 0xa90e, 0xaa12, 0x0c30, 0x3e60,
-	0x6344, 0xd3fc, 0x190c, 0x0d65, 0xa93c, 0xaa40, 0xa844, 0x9106,
-	0x1118, 0xa848, 0x9206, 0x0508, 0x2958, 0xab48, 0xac44, 0x2940,
-	0x080c, 0x1d3c, 0x1998, 0x2850, 0x2c40, 0xab14, 0xa880, 0xd0fc,
-	0x1140, 0xa810, 0x2005, 0xa80a, 0x2a00, 0xa80e, 0x2009, 0x8015,
-	0x0070, 0x00c6, 0x3e60, 0x6044, 0xc0a4, 0x9085, 0x8005, 0x6046,
-	0x00ce, 0x8319, 0xab16, 0x1904, 0x1bd8, 0x2009, 0x8005, 0x3e60,
-	0x6044, 0x9105, 0x6046, 0x0804, 0x1bd5, 0x080c, 0x0d65, 0x00f6,
-	0x00e6, 0x0096, 0x00c6, 0x0026, 0x704c, 0x9c06, 0x190c, 0x0d65,
-	0x2079, 0x0090, 0x2001, 0x0105, 0x2003, 0x0010, 0x782b, 0x0004,
-	0x7057, 0x0000, 0x6014, 0x2048, 0x080c, 0xb870, 0x0118, 0xa880,
-	0xc0bd, 0xa882, 0x6020, 0x9086, 0x0006, 0x1170, 0x2061, 0x0100,
-	0x62c8, 0x2001, 0x00fa, 0x8001, 0x1df0, 0x60c8, 0x9206, 0x1dc0,
-	0x60c4, 0xa89a, 0x60c8, 0xa896, 0x704c, 0x2060, 0x00c6, 0x080c,
-	0xb45e, 0x080c, 0x98c7, 0x00ce, 0x704c, 0x9c06, 0x1150, 0x2009,
-	0x0040, 0x080c, 0x207b, 0x080c, 0x94a4, 0x2011, 0x0000, 0x080c,
-	0x932e, 0x002e, 0x00ce, 0x009e, 0x00ee, 0x00fe, 0x0005, 0x00f6,
-	0x2079, 0x0090, 0x781c, 0x0006, 0x7818, 0x0006, 0x2079, 0x0100,
-	0x7a14, 0x9284, 0x1984, 0x9085, 0x0012, 0x7816, 0x2019, 0x1000,
-	0x8319, 0x090c, 0x0d65, 0x7820, 0xd0bc, 0x1dd0, 0x79c8, 0x000e,
-	0x9102, 0x001e, 0x0006, 0x0016, 0x79c4, 0x000e, 0x9103, 0x78c6,
-	0x000e, 0x78ca, 0x9284, 0x1984, 0x9085, 0x0012, 0x7816, 0x2079,
-	0x0090, 0x782b, 0x0008, 0x7057, 0x0000, 0x00fe, 0x0005, 0x00f6,
-	0x00e6, 0x2071, 0x19bf, 0x7054, 0x9086, 0x0000, 0x0904, 0x1ced,
-	0x2079, 0x0090, 0x2009, 0x0207, 0x210c, 0xd194, 0x01b8, 0x2009,
-	0x020c, 0x210c, 0x9184, 0x0003, 0x0188, 0x080c, 0xd665, 0x2001,
-	0x0133, 0x2004, 0x9005, 0x090c, 0x0d65, 0x0016, 0x2009, 0x0040,
-	0x080c, 0x207b, 0x001e, 0x2001, 0x020c, 0x2102, 0x2009, 0x0206,
-	0x2104, 0x2009, 0x0203, 0x210c, 0x9106, 0x1120, 0x2009, 0x0040,
-	0x080c, 0x207b, 0x782c, 0xd0fc, 0x09a8, 0x080c, 0x98e3, 0x782c,
-	0xd0fc, 0x1de8, 0x080c, 0x98c7, 0x7054, 0x9086, 0x0000, 0x1950,
-	0x782b, 0x0004, 0x782c, 0xd0ac, 0x1de8, 0x2009, 0x0040, 0x080c,
-	0x207b, 0x782b, 0x0002, 0x7057, 0x0000, 0x00ee, 0x00fe, 0x0005,
-	0x080c, 0x0d65, 0x8c60, 0x2c05, 0x9005, 0x0110, 0x8a51, 0x0005,
-	0xa004, 0x9005, 0x0168, 0xa85a, 0x2040, 0xa064, 0x9084, 0x000f,
-	0x9080, 0x1d1c, 0x2065, 0x8cff, 0x090c, 0x0d65, 0x8a51, 0x0005,
-	0x2050, 0x0005, 0x0000, 0x001d, 0x0021, 0x0025, 0x0029, 0x002d,
-	0x0031, 0x0035, 0x0000, 0x001b, 0x0021, 0x0027, 0x002d, 0x0033,
-	0x0000, 0x0000, 0x0023, 0x0000, 0x0000, 0x1d0f, 0x1d0b, 0x0000,
-	0x0000, 0x1d19, 0x0000, 0x1d0f, 0x1d16, 0x1d16, 0x1d13, 0x0000,
-	0x0000, 0x0000, 0x1d19, 0x1d16, 0x0000, 0x1d11, 0x1d11, 0x0000,
-	0x0000, 0x1d19, 0x0000, 0x1d11, 0x1d17, 0x1d17, 0x1d17, 0x0000,
-	0x0000, 0x0000, 0x1d19, 0x1d17, 0x00c6, 0x00d6, 0x0086, 0xab42,
-	0xac3e, 0xa888, 0x9055, 0x0904, 0x1f1b, 0x2940, 0xa064, 0x90ec,
-	0x000f, 0x9084, 0x00ff, 0x9086, 0x0008, 0x1118, 0x2061, 0x1d17,
-	0x00d0, 0x9de0, 0x1d1c, 0x9d86, 0x0007, 0x0130, 0x9d86, 0x000e,
-	0x0118, 0x9d86, 0x000f, 0x1120, 0xa08c, 0x9422, 0xa090, 0x931b,
-	0x2c05, 0x9065, 0x1140, 0x0310, 0x0804, 0x1f1b, 0xa004, 0x9045,
-	0x0904, 0x1f1b, 0x08d8, 0x2c05, 0x9005, 0x0904, 0x1e03, 0xdd9c,
-	0x1904, 0x1dbf, 0x908a, 0x0036, 0x1a0c, 0x0d65, 0x9082, 0x001b,
-	0x0002, 0x1d94, 0x1d94, 0x1d96, 0x1d94, 0x1d94, 0x1d94, 0x1d9c,
-	0x1d94, 0x1d94, 0x1d94, 0x1da2, 0x1d94, 0x1d94, 0x1d94, 0x1da8,
-	0x1d94, 0x1d94, 0x1d94, 0x1dae, 0x1d94, 0x1d94, 0x1d94, 0x1db4,
-	0x1d94, 0x1d94, 0x1d94, 0x1dba, 0x080c, 0x0d65, 0xa07c, 0x9422,
-	0xa080, 0x931b, 0x0804, 0x1df9, 0xa08c, 0x9422, 0xa090, 0x931b,
-	0x0804, 0x1df9, 0xa09c, 0x9422, 0xa0a0, 0x931b, 0x0804, 0x1df9,
-	0xa0ac, 0x9422, 0xa0b0, 0x931b, 0x0804, 0x1df9, 0xa0bc, 0x9422,
-	0xa0c0, 0x931b, 0x0804, 0x1df9, 0xa0cc, 0x9422, 0xa0d0, 0x931b,
-	0x0804, 0x1df9, 0xa0dc, 0x9422, 0xa0e0, 0x931b, 0x04d0, 0x908a,
-	0x0034, 0x1a0c, 0x0d65, 0x9082, 0x001b, 0x0002, 0x1de1, 0x1ddf,
-	0x1ddf, 0x1ddf, 0x1ddf, 0x1ddf, 0x1de6, 0x1ddf, 0x1ddf, 0x1ddf,
-	0x1ddf, 0x1ddf, 0x1deb, 0x1ddf, 0x1ddf, 0x1ddf, 0x1ddf, 0x1ddf,
-	0x1df0, 0x1ddf, 0x1ddf, 0x1ddf, 0x1ddf, 0x1ddf, 0x1df5, 0x080c,
-	0x0d65, 0xa07c, 0x9422, 0xa080, 0x931b, 0x0098, 0xa094, 0x9422,
-	0xa098, 0x931b, 0x0070, 0xa0ac, 0x9422, 0xa0b0, 0x931b, 0x0048,
-	0xa0c4, 0x9422, 0xa0c8, 0x931b, 0x0020, 0xa0dc, 0x9422, 0xa0e0,
-	0x931b, 0x0630, 0x2300, 0x9405, 0x0160, 0x8a51, 0x0904, 0x1f1b,
-	0x8c60, 0x0804, 0x1d6b, 0xa004, 0x9045, 0x0904, 0x1f1b, 0x0804,
-	0x1d46, 0x8a51, 0x0904, 0x1f1b, 0x8c60, 0x2c05, 0x9005, 0x1158,
-	0xa004, 0x9045, 0x0904, 0x1f1b, 0xa064, 0x90ec, 0x000f, 0x9de0,
-	0x1d1c, 0x2c05, 0x2060, 0xa880, 0xc0fc, 0xa882, 0x0804, 0x1f10,
-	0x2c05, 0x8422, 0x8420, 0x831a, 0x9399, 0x0000, 0xac2e, 0xab32,
-	0xdd9c, 0x1904, 0x1ead, 0x9082, 0x001b, 0x0002, 0x1e49, 0x1e49,
-	0x1e4b, 0x1e49, 0x1e49, 0x1e49, 0x1e59, 0x1e49, 0x1e49, 0x1e49,
-	0x1e67, 0x1e49, 0x1e49, 0x1e49, 0x1e75, 0x1e49, 0x1e49, 0x1e49,
-	0x1e83, 0x1e49, 0x1e49, 0x1e49, 0x1e91, 0x1e49, 0x1e49, 0x1e49,
-	0x1e9f, 0x080c, 0x0d65, 0xa17c, 0x2400, 0x9122, 0xa180, 0x2300,
-	0x911b, 0x0a0c, 0x0d65, 0xa074, 0x9420, 0xa078, 0x9319, 0x0804,
-	0x1f0b, 0xa18c, 0x2400, 0x9122, 0xa190, 0x2300, 0x911b, 0x0a0c,
-	0x0d65, 0xa084, 0x9420, 0xa088, 0x9319, 0x0804, 0x1f0b, 0xa19c,
-	0x2400, 0x9122, 0xa1a0, 0x2300, 0x911b, 0x0a0c, 0x0d65, 0xa094,
-	0x9420, 0xa098, 0x9319, 0x0804, 0x1f0b, 0xa1ac, 0x2400, 0x9122,
-	0xa1b0, 0x2300, 0x911b, 0x0a0c, 0x0d65, 0xa0a4, 0x9420, 0xa0a8,
-	0x9319, 0x0804, 0x1f0b, 0xa1bc, 0x2400, 0x9122, 0xa1c0, 0x2300,
-	0x911b, 0x0a0c, 0x0d65, 0xa0b4, 0x9420, 0xa0b8, 0x9319, 0x0804,
-	0x1f0b, 0xa1cc, 0x2400, 0x9122, 0xa1d0, 0x2300, 0x911b, 0x0a0c,
-	0x0d65, 0xa0c4, 0x9420, 0xa0c8, 0x9319, 0x0804, 0x1f0b, 0xa1dc,
-	0x2400, 0x9122, 0xa1e0, 0x2300, 0x911b, 0x0a0c, 0x0d65, 0xa0d4,
-	0x9420, 0xa0d8, 0x9319, 0x0804, 0x1f0b, 0x9082, 0x001b, 0x0002,
-	0x1ecb, 0x1ec9, 0x1ec9, 0x1ec9, 0x1ec9, 0x1ec9, 0x1ed8, 0x1ec9,
-	0x1ec9, 0x1ec9, 0x1ec9, 0x1ec9, 0x1ee5, 0x1ec9, 0x1ec9, 0x1ec9,
-	0x1ec9, 0x1ec9, 0x1ef2, 0x1ec9, 0x1ec9, 0x1ec9, 0x1ec9, 0x1ec9,
-	0x1eff, 0x080c, 0x0d65, 0xa17c, 0x2400, 0x9122, 0xa180, 0x2300,
-	0x911b, 0x0a0c, 0x0d65, 0xa06c, 0x9420, 0xa070, 0x9319, 0x0498,
-	0xa194, 0x2400, 0x9122, 0xa198, 0x2300, 0x911b, 0x0a0c, 0x0d65,
-	0xa084, 0x9420, 0xa088, 0x9319, 0x0430, 0xa1ac, 0x2400, 0x9122,
-	0xa1b0, 0x2300, 0x911b, 0x0a0c, 0x0d65, 0xa09c, 0x9420, 0xa0a0,
-	0x9319, 0x00c8, 0xa1c4, 0x2400, 0x9122, 0xa1c8, 0x2300, 0x911b,
-	0x0a0c, 0x0d65, 0xa0b4, 0x9420, 0xa0b8, 0x9319, 0x0060, 0xa1dc,
-	0x2400, 0x9122, 0xa1e0, 0x2300, 0x911b, 0x0a0c, 0x0d65, 0xa0cc,
-	0x9420, 0xa0d0, 0x9319, 0xac1e, 0xab22, 0xa880, 0xc0fd, 0xa882,
-	0x2800, 0xa85a, 0x2c00, 0xa812, 0x2a00, 0xa816, 0x000e, 0x000e,
-	0x000e, 0x9006, 0x0028, 0x008e, 0x00de, 0x00ce, 0x9085, 0x0001,
-	0x0005, 0x00c6, 0x610c, 0x0016, 0x9026, 0x2410, 0x6004, 0x9420,
-	0x9291, 0x0000, 0x2c04, 0x9210, 0x9ce0, 0x0002, 0x918a, 0x0002,
-	0x1da8, 0x9284, 0x000f, 0x9405, 0x001e, 0x00ce, 0x0005, 0x7803,
-	0x0003, 0x780f, 0x0000, 0x6004, 0x7812, 0x2c04, 0x7816, 0x9ce0,
-	0x0002, 0x918a, 0x0002, 0x1db8, 0x0005, 0x2001, 0x0005, 0x2004,
-	0xd0bc, 0x190c, 0x0d5e, 0xd094, 0x0110, 0x080c, 0x11de, 0x0005,
-	0x0126, 0x2091, 0x2600, 0x2079, 0x0200, 0x2071, 0x0260, 0x2069,
-	0x1800, 0x7817, 0x0000, 0x789b, 0x0814, 0x78a3, 0x0406, 0x789f,
-	0x0410, 0x2009, 0x013b, 0x200b, 0x0400, 0x781b, 0x0002, 0x783b,
-	0x001f, 0x7837, 0x0020, 0x7803, 0x1600, 0x012e, 0x0005, 0x2091,
-	0x2600, 0x781c, 0xd0a4, 0x190c, 0x2078, 0x7900, 0xd1dc, 0x1118,
-	0x9084, 0x0006, 0x001a, 0x9084, 0x000e, 0x0002, 0x1f96, 0x1f8e,
-	0x7a7d, 0x1f8e, 0x1f90, 0x1f90, 0x1f90, 0x1f90, 0x7a63, 0x1f8e,
-	0x1f92, 0x1f8e, 0x1f90, 0x1f8e, 0x1f90, 0x1f8e, 0x080c, 0x0d65,
-	0x0031, 0x0020, 0x080c, 0x7a63, 0x080c, 0x7a7d, 0x0005, 0x0006,
-	0x0016, 0x0026, 0x080c, 0xd665, 0x7930, 0x9184, 0x0003, 0x0510,
-	0x080c, 0x98c7, 0x2001, 0x19d2, 0x2004, 0x9005, 0x01a0, 0x2001,
-	0x0133, 0x2004, 0x9005, 0x090c, 0x0d65, 0x00c6, 0x2001, 0x19d2,
-	0x2064, 0x080c, 0x98e3, 0x080c, 0xb45e, 0x2009, 0x0040, 0x080c,
-	0x207b, 0x00ce, 0x0408, 0x2009, 0x0040, 0x080c, 0x207b, 0x080c,
-	0x98e3, 0x00d0, 0x9184, 0x0014, 0x01a0, 0x6a00, 0x9286, 0x0003,
-	0x0160, 0x080c, 0x70ba, 0x1138, 0x080c, 0x73b9, 0x080c, 0x5cf7,
-	0x080c, 0x6feb, 0x0010, 0x080c, 0x5bb2, 0x080c, 0x7b1b, 0x0041,
-	0x0018, 0x9184, 0x9540, 0x1dc8, 0x002e, 0x001e, 0x000e, 0x0005,
-	0x00e6, 0x0036, 0x0046, 0x0056, 0x2071, 0x1a43, 0x080c, 0x1989,
-	0x005e, 0x004e, 0x003e, 0x00ee, 0x0005, 0x0126, 0x2091, 0x2e00,
-	0x2071, 0x1800, 0x7128, 0x2001, 0x1947, 0x2102, 0x2001, 0x194f,
-	0x2102, 0x2001, 0x013b, 0x2102, 0x2079, 0x0200, 0x2001, 0x0201,
-	0x789e, 0x78a3, 0x0200, 0x9198, 0x0007, 0x831c, 0x831c, 0x831c,
-	0x9398, 0x0005, 0x2320, 0x9182, 0x0204, 0x1230, 0x2011, 0x0008,
-	0x8423, 0x8423, 0x8423, 0x0488, 0x9182, 0x024c, 0x1240, 0x2011,
-	0x0007, 0x8403, 0x8003, 0x9400, 0x9400, 0x9420, 0x0430, 0x9182,
-	0x02bc, 0x1238, 0x2011, 0x0006, 0x8403, 0x8003, 0x9400, 0x9420,
-	0x00e0, 0x9182, 0x034c, 0x1230, 0x2011, 0x0005, 0x8403, 0x8003,
-	0x9420, 0x0098, 0x9182, 0x042c, 0x1228, 0x2011, 0x0004, 0x8423,
-	0x8423, 0x0058, 0x9182, 0x059c, 0x1228, 0x2011, 0x0003, 0x8403,
-	0x9420, 0x0018, 0x2011, 0x0002, 0x8423, 0x9482, 0x0228, 0x8002,
-	0x8020, 0x8301, 0x9402, 0x0110, 0x0208, 0x8321, 0x8217, 0x8203,
-	0x9405, 0x789a, 0x012e, 0x0005, 0x0006, 0x00d6, 0x2069, 0x0200,
-	0x6814, 0x9084, 0xffc0, 0x910d, 0x6916, 0x00de, 0x000e, 0x0005,
-	0x00d6, 0x2069, 0x0200, 0x9005, 0x6810, 0x0110, 0xc0a5, 0x0008,
-	0xc0a4, 0x6812, 0x00de, 0x0005, 0x0006, 0x00d6, 0x2069, 0x0200,
-	0x6810, 0x9084, 0xfff8, 0x910d, 0x6912, 0x00de, 0x000e, 0x0005,
-	0x7938, 0x080c, 0x0d5e, 0x00f6, 0x2079, 0x0200, 0x7902, 0xa001,
-	0xa001, 0xa001, 0xa001, 0xa001, 0xa001, 0x7902, 0xa001, 0xa001,
-	0xa001, 0xa001, 0xa001, 0xa001, 0x00fe, 0x0005, 0x0126, 0x2091,
-	0x2800, 0x2061, 0x0100, 0x2071, 0x1800, 0x2009, 0x0000, 0x080c,
-	0x285e, 0x080c, 0x2774, 0x2001, 0x1975, 0x2003, 0x0700, 0x2001,
-	0x1976, 0x2003, 0x0700, 0x080c, 0x28cf, 0x9006, 0x080c, 0x27a3,
-	0x9006, 0x080c, 0x2786, 0x20a9, 0x0012, 0x1d04, 0x20ad, 0x2091,
-	0x6000, 0x1f04, 0x20ad, 0x602f, 0x0100, 0x602f, 0x0000, 0x6050,
-	0x9085, 0x0400, 0x9084, 0xdfff, 0x6052, 0x6224, 0x080c, 0x28ac,
-	0x080c, 0x2492, 0x2009, 0x00ef, 0x6132, 0x6136, 0x080c, 0x24a2,
-	0x60e7, 0x0000, 0x61ea, 0x60e3, 0x0002, 0x604b, 0xf7f7, 0x6043,
-	0x0000, 0x602f, 0x0080, 0x602f, 0x0000, 0x6007, 0x149f, 0x00c6,
-	0x2061, 0x0140, 0x608b, 0x000b, 0x608f, 0x10b8, 0x6093, 0x0000,
-	0x6097, 0x0198, 0x00ce, 0x6004, 0x9085, 0x8000, 0x6006, 0x60bb,
-	0x0000, 0x20a9, 0x0018, 0x60bf, 0x0000, 0x1f04, 0x20eb, 0x60bb,
-	0x0000, 0x60bf, 0x0108, 0x60bf, 0x0012, 0x60bf, 0x0320, 0x60bf,
-	0x0018, 0x601b, 0x00f0, 0x601f, 0x001e, 0x600f, 0x006b, 0x602b,
-	0x402c, 0x012e, 0x0005, 0x00f6, 0x2079, 0x0140, 0x78c3, 0x0080,
-	0x78c3, 0x0083, 0x78c3, 0x0000, 0x00fe, 0x0005, 0x2001, 0x1834,
-	0x2003, 0x0000, 0x2001, 0x1833, 0x2003, 0x0001, 0x0005, 0x0126,
-	0x2091, 0x2800, 0x0006, 0x0016, 0x0026, 0x6124, 0x6028, 0x910c,
-	0x9184, 0x5e2c, 0x1118, 0x9184, 0x0007, 0x002a, 0x9195, 0x0004,
-	0x9284, 0x0007, 0x0002, 0x2136, 0x2133, 0x2133, 0x2133, 0x2135,
-	0x2133, 0x2133, 0x2133, 0x080c, 0x0d65, 0x0029, 0x002e, 0x001e,
-	0x000e, 0x012e, 0x0005, 0x00a6, 0x6124, 0x6028, 0xd09c, 0x0118,
-	0xd19c, 0x1904, 0x2395, 0xd1f4, 0x190c, 0x0d5e, 0x080c, 0x70ba,
-	0x0904, 0x2193, 0x080c, 0xbf8f, 0x1120, 0x7000, 0x9086, 0x0003,
-	0x0580, 0x6024, 0x9084, 0x1800, 0x0560, 0x080c, 0x70dd, 0x0118,
-	0x080c, 0x70cb, 0x1530, 0x2011, 0x0020, 0x080c, 0x28ac, 0x6043,
-	0x0000, 0x080c, 0xbf8f, 0x0168, 0x080c, 0x70dd, 0x1150, 0x2001,
-	0x197f, 0x2003, 0x0001, 0x6027, 0x1800, 0x080c, 0x6f30, 0x0804,
-	0x2398, 0x70a0, 0x9005, 0x1150, 0x70a3, 0x0001, 0x00d6, 0x2069,
-	0x0140, 0x080c, 0x7111, 0x00de, 0x1904, 0x2398, 0x080c, 0x73c3,
-	0x0428, 0x080c, 0x70dd, 0x1590, 0x6024, 0x9084, 0x1800, 0x1108,
-	0x0468, 0x080c, 0x73c3, 0x080c, 0x73b9, 0x080c, 0x5cf7, 0x080c,
-	0x6feb, 0x0804, 0x2395, 0xd1ac, 0x1508, 0x6024, 0xd0dc, 0x1170,
-	0xd0e4, 0x1178, 0xd0d4, 0x1190, 0xd0cc, 0x0130, 0x7094, 0x9086,
-	0x0028, 0x1110, 0x080c, 0x729c, 0x0804, 0x2395, 0x080c, 0x73be,
-	0x0048, 0x2001, 0x1955, 0x2003, 0x0002, 0x0020, 0x080c, 0x71fa,
-	0x0804, 0x2395, 0x080c, 0x733e, 0x0804, 0x2395, 0xd1ac, 0x0904,
-	0x22af, 0x080c, 0x70ba, 0x11d0, 0x2011, 0x0020, 0x080c, 0x28ac,
-	0x0006, 0x0026, 0x0036, 0x080c, 0x70d4, 0x1158, 0x080c, 0x73b9,
-	0x080c, 0x5cf7, 0x080c, 0x6feb, 0x003e, 0x002e, 0x000e, 0x00ae,
-	0x0005, 0x003e, 0x002e, 0x000e, 0x080c, 0x708e, 0x0016, 0x0046,
-	0x00c6, 0x644c, 0x9486, 0xf0f0, 0x1138, 0x2061, 0x0100, 0x644a,
-	0x6043, 0x0090, 0x6043, 0x0010, 0x74d6, 0x948c, 0xff00, 0x7038,
-	0xd084, 0x0178, 0x9186, 0xf800, 0x1160, 0x7044, 0xd084, 0x1148,
-	0xc085, 0x7046, 0x0036, 0x2418, 0x2011, 0x8016, 0x080c, 0x48fa,
-	0x003e, 0x080c, 0xbf88, 0x1904, 0x2286, 0x9196, 0xff00, 0x05a8,
-	0x705c, 0x9084, 0x00ff, 0x810f, 0x81ff, 0x0110, 0x9116, 0x0568,
-	0x7130, 0xd184, 0x1550, 0x080c, 0x319a, 0x0128, 0xc18d, 0x7132,
-	0x080c, 0x6682, 0x1510, 0x6240, 0x9294, 0x0010, 0x0130, 0x6248,
-	0x9294, 0xff00, 0x9296, 0xff00, 0x01c0, 0x7030, 0xd08c, 0x0904,
-	0x2286, 0x7038, 0xd08c, 0x1140, 0x2001, 0x180c, 0x200c, 0xd1ac,
-	0x1904, 0x2286, 0xc1ad, 0x2102, 0x0036, 0x73d4, 0x2011, 0x8013,
-	0x080c, 0x48fa, 0x003e, 0x0804, 0x2286, 0x7038, 0xd08c, 0x1140,
-	0x2001, 0x180c, 0x200c, 0xd1ac, 0x1904, 0x2286, 0xc1ad, 0x2102,
-	0x0036, 0x73d4, 0x2011, 0x8013, 0x080c, 0x48fa, 0x003e, 0x7130,
-	0xc185, 0x7132, 0x2011, 0x185c, 0x220c, 0x00f0, 0x0016, 0x2009,
-	0x0001, 0x2011, 0x0100, 0x080c, 0x8401, 0x2019, 0x000e, 0x00c6,
-	0x2061, 0x0000, 0x080c, 0xd234, 0x00ce, 0x9484, 0x00ff, 0x9080,
-	0x319f, 0x200d, 0x918c, 0xff00, 0x810f, 0x2120, 0x9006, 0x2009,
-	0x000e, 0x080c, 0xd2bc, 0x001e, 0xd1ac, 0x1148, 0x0016, 0x2009,
-	0x0002, 0x2019, 0x0004, 0x080c, 0x2ff3, 0x001e, 0x0078, 0x0156,
-	0x00b6, 0x20a9, 0x007f, 0x900e, 0x080c, 0x628f, 0x1110, 0x080c,
-	0x5d11, 0x8108, 0x1f04, 0x227c, 0x00be, 0x015e, 0x00ce, 0x004e,
-	0x080c, 0x98c7, 0x080c, 0x9b6c, 0x080c, 0x98e3, 0x60e3, 0x0000,
-	0x001e, 0x2001, 0x1800, 0x2014, 0x9296, 0x0004, 0x1170, 0xd19c,
-	0x11b0, 0x2011, 0x180c, 0x2214, 0xd29c, 0x1120, 0x6204, 0x9295,
-	0x0002, 0x6206, 0x6228, 0xc29d, 0x622a, 0x2003, 0x0001, 0x2001,
-	0x1825, 0x2003, 0x0000, 0x2011, 0x0020, 0x080c, 0x28ac, 0xd194,
-	0x0904, 0x2395, 0x0016, 0x080c, 0x98c7, 0x6220, 0xd2b4, 0x0904,
-	0x233d, 0x080c, 0x821e, 0x080c, 0x8fd0, 0x2011, 0x0004, 0x080c,
-	0x28ac, 0x00f6, 0x2019, 0x19cb, 0x2304, 0x907d, 0x0904, 0x230a,
-	0x7804, 0x9086, 0x0032, 0x15f0, 0x00d6, 0x00c6, 0x00e6, 0x0096,
-	0x2069, 0x0140, 0x782c, 0x685e, 0x7808, 0x685a, 0x6043, 0x0002,
-	0x2001, 0x0003, 0x8001, 0x1df0, 0x6043, 0x0000, 0x2001, 0x003c,
-	0x8001, 0x1df0, 0x080c, 0x2882, 0x2001, 0x001e, 0x8001, 0x0240,
-	0x20a9, 0x0009, 0x080c, 0x2839, 0x6904, 0xd1dc, 0x1140, 0x0cb0,
-	0x2001, 0x0100, 0x080c, 0x2872, 0x9006, 0x080c, 0x2872, 0x080c,
-	0x8891, 0x080c, 0x98e3, 0x7814, 0x2048, 0xa867, 0x0103, 0x2f60,
-	0x080c, 0x9be6, 0x009e, 0x00ee, 0x00ce, 0x00de, 0x00fe, 0x001e,
-	0x00ae, 0x0005, 0x00fe, 0x00d6, 0x2069, 0x0140, 0x6804, 0x9084,
-	0x4000, 0x0110, 0x080c, 0x2882, 0x00de, 0x00c6, 0x2061, 0x19bf,
-	0x6034, 0x080c, 0xbf8f, 0x0120, 0x909a, 0x0003, 0x1258, 0x0018,
-	0x909a, 0x00c8, 0x1238, 0x8000, 0x6036, 0x00ce, 0x080c, 0x8fa8,
-	0x0804, 0x2392, 0x2061, 0x0100, 0x62c0, 0x080c, 0x97f8, 0x2019,
-	0x19cb, 0x2304, 0x9065, 0x0130, 0x6003, 0x0001, 0x2009, 0x0027,
-	0x080c, 0x9c82, 0x00ce, 0x0804, 0x2392, 0xd2bc, 0x05e0, 0x080c,
-	0x822b, 0x2011, 0x0004, 0x080c, 0x28ac, 0x00d6, 0x2069, 0x0140,
-	0x6804, 0x9084, 0x4000, 0x0110, 0x080c, 0x2882, 0x00de, 0x00c6,
-	0x2061, 0x19bf, 0x6050, 0x080c, 0xbf8f, 0x0120, 0x909a, 0x0003,
-	0x1638, 0x0018, 0x909a, 0x00c8, 0x1618, 0x8000, 0x6052, 0x604c,
-	0x00ce, 0x9005, 0x0578, 0x2009, 0x07d0, 0x080c, 0x8223, 0x9080,
-	0x0008, 0x2004, 0x9086, 0x0006, 0x1138, 0x2009, 0x1984, 0x2011,
-	0x0012, 0x080c, 0x28bb, 0x00f0, 0x2009, 0x1984, 0x2011, 0x0016,
-	0x080c, 0x28bb, 0x00b8, 0x2011, 0x0004, 0x080c, 0x28ac, 0x0090,
-	0x0036, 0x2019, 0x0001, 0x080c, 0x929d, 0x003e, 0x2019, 0x19d2,
-	0x2304, 0x9065, 0x0130, 0x2009, 0x004f, 0x6003, 0x0003, 0x080c,
-	0x9c82, 0x00ce, 0x080c, 0x98e3, 0x001e, 0xd19c, 0x0904, 0x23f7,
-	0x7038, 0xd0ac, 0x1558, 0x0016, 0x0156, 0x2011, 0x0008, 0x080c,
-	0x28ac, 0x080c, 0x28cf, 0x080c, 0x2902, 0x6050, 0xc0e5, 0x6052,
-	0x20a9, 0x0367, 0x1f04, 0x23c4, 0x1d04, 0x23ac, 0x080c, 0x8252,
-	0x6020, 0xd09c, 0x1db8, 0x00f6, 0x2079, 0x0100, 0x080c, 0x27e5,
-	0x00fe, 0x1d80, 0x6050, 0xc0e4, 0x6052, 0x2011, 0x0008, 0x080c,
-	0x28ac, 0x015e, 0x001e, 0x0498, 0x015e, 0x001e, 0x0016, 0x6028,
-	0xc09c, 0x602a, 0x080c, 0x98c7, 0x080c, 0x9b6c, 0x080c, 0x98e3,
-	0x60e3, 0x0000, 0x080c, 0xd644, 0x080c, 0xd65f, 0x080c, 0x53ac,
-	0xd0fc, 0x1138, 0x080c, 0xbf88, 0x1120, 0x9085, 0x0001, 0x080c,
-	0x7101, 0x9006, 0x080c, 0x2872, 0x2009, 0x0002, 0x080c, 0x285e,
-	0x00e6, 0x2071, 0x1800, 0x7003, 0x0004, 0x080c, 0x0ea9, 0x00ee,
-	0x2011, 0x0008, 0x080c, 0x28ac, 0x080c, 0x0bab, 0x001e, 0x918c,
-	0xffd0, 0x2110, 0x080c, 0x28ac, 0x00ae, 0x0005, 0x0006, 0x0016,
-	0x0026, 0x0036, 0x00e6, 0x00f6, 0x0126, 0x2091, 0x8000, 0x2071,
-	0x1800, 0x71cc, 0x70ce, 0x9116, 0x0904, 0x2451, 0x81ff, 0x01a0,
-	0x2009, 0x0000, 0x080c, 0x285e, 0x2011, 0x8011, 0x2019, 0x010e,
-	0x231c, 0x939e, 0x0007, 0x1118, 0x2019, 0x0001, 0x0010, 0x2019,
-	0x0000, 0x080c, 0x48fa, 0x0468, 0x2001, 0x1980, 0x200c, 0x81ff,
-	0x1140, 0x2001, 0x0109, 0x2004, 0xd0b4, 0x0118, 0x2019, 0x0003,
-	0x0008, 0x2118, 0x2011, 0x8012, 0x080c, 0x48fa, 0x080c, 0x0ea9,
-	0x080c, 0x53ac, 0xd0fc, 0x11a8, 0x080c, 0xbf88, 0x1190, 0x00c6,
-	0x080c, 0x24ed, 0x080c, 0x98c7, 0x080c, 0x91f8, 0x080c, 0x98e3,
-	0x2061, 0x0100, 0x2019, 0x0028, 0x2009, 0x0002, 0x080c, 0x2ff3,
-	0x00ce, 0x012e, 0x00fe, 0x00ee, 0x003e, 0x002e, 0x001e, 0x000e,
-	0x0005, 0x2028, 0x918c, 0x00ff, 0x2130, 0x9094, 0xff00, 0x11f0,
-	0x2011, 0x1836, 0x2214, 0xd2ac, 0x11c8, 0x81ff, 0x01e8, 0x2011,
-	0x181e, 0x2204, 0x9106, 0x1190, 0x2011, 0x181f, 0x2214, 0x9294,
-	0xff00, 0x9584, 0xff00, 0x9206, 0x1148, 0x2011, 0x181f, 0x2214,
-	0x9294, 0x00ff, 0x9584, 0x00ff, 0x9206, 0x1120, 0x2500, 0x080c,
-	0x7d73, 0x0048, 0x9584, 0x00ff, 0x9080, 0x319f, 0x200d, 0x918c,
-	0xff00, 0x810f, 0x9006, 0x0005, 0x9080, 0x319f, 0x200d, 0x918c,
-	0x00ff, 0x0005, 0x00d6, 0x2069, 0x0140, 0x2001, 0x1817, 0x2003,
-	0x00ef, 0x20a9, 0x0010, 0x9006, 0x6852, 0x6856, 0x1f04, 0x249d,
-	0x00de, 0x0005, 0x0006, 0x00d6, 0x0026, 0x2069, 0x0140, 0x2001,
-	0x1817, 0x2102, 0x8114, 0x8214, 0x8214, 0x8214, 0x20a9, 0x0010,
-	0x6853, 0x0000, 0x9006, 0x82ff, 0x1128, 0x9184, 0x000f, 0x9080,
-	0xd673, 0x2005, 0x6856, 0x8211, 0x1f04, 0x24b2, 0x002e, 0x00de,
-	0x000e, 0x0005, 0x00c6, 0x2061, 0x1800, 0x6030, 0x0110, 0xc09d,
-	0x0008, 0xc09c, 0x6032, 0x00ce, 0x0005, 0x0156, 0x00d6, 0x0026,
-	0x0016, 0x0006, 0x2069, 0x0140, 0x6980, 0x9116, 0x0180, 0x9112,
-	0x1230, 0x8212, 0x8210, 0x22a8, 0x2001, 0x0402, 0x0018, 0x22a8,
-	0x2001, 0x0404, 0x680e, 0x1f04, 0x24e2, 0x680f, 0x0000, 0x000e,
-	0x001e, 0x002e, 0x00de, 0x015e, 0x0005, 0x080c, 0x53a8, 0xd0c4,
-	0x0150, 0xd0a4, 0x0140, 0x9006, 0x0046, 0x2020, 0x2009, 0x002e,
-	0x080c, 0xd2bc, 0x004e, 0x0005, 0x00f6, 0x0016, 0x0026, 0x2079,
-	0x0140, 0x78c4, 0xd0dc, 0x0904, 0x2559, 0x080c, 0x27d5, 0x0660,
-	0x9084, 0x0700, 0x908e, 0x0600, 0x1120, 0x2011, 0x4000, 0x900e,
-	0x0458, 0x908e, 0x0500, 0x1120, 0x2011, 0x8000, 0x900e, 0x0420,
-	0x908e, 0x0400, 0x1120, 0x9016, 0x2009, 0x0001, 0x00e8, 0x908e,
-	0x0300, 0x1120, 0x9016, 0x2009, 0x0002, 0x00b0, 0x908e, 0x0200,
-	0x1120, 0x9016, 0x2009, 0x0004, 0x0078, 0x908e, 0x0100, 0x1548,
-	0x9016, 0x2009, 0x0008, 0x0040, 0x9084, 0x0700, 0x908e, 0x0300,
-	0x1500, 0x2011, 0x0030, 0x0058, 0x2300, 0x9080, 0x0020, 0x2018,
-	0x080c, 0x842f, 0x928c, 0xff00, 0x0110, 0x2011, 0x00ff, 0x2200,
-	0x8007, 0x9085, 0x004c, 0x78c2, 0x2009, 0x0138, 0x220a, 0x080c,
-	0x70ba, 0x1118, 0x2009, 0x1945, 0x220a, 0x002e, 0x001e, 0x00fe,
-	0x0005, 0x78c3, 0x0000, 0x0cc8, 0x0126, 0x2091, 0x2800, 0x0006,
-	0x0016, 0x0026, 0x2001, 0x0170, 0x200c, 0x8000, 0x2014, 0x9184,
-	0x0003, 0x0110, 0x080c, 0x0d5e, 0x002e, 0x001e, 0x000e, 0x012e,
-	0x0005, 0x2001, 0x0171, 0x2004, 0xd0dc, 0x0168, 0x2001, 0x0170,
-	0x200c, 0x918c, 0x00ff, 0x918e, 0x004c, 0x1128, 0x200c, 0x918c,
-	0xff00, 0x810f, 0x0005, 0x900e, 0x2001, 0x0227, 0x2004, 0x8007,
-	0x9084, 0x00ff, 0x8004, 0x9108, 0x2001, 0x0226, 0x2004, 0x8007,
-	0x9084, 0x00ff, 0x8004, 0x9108, 0x0005, 0x0018, 0x000c, 0x0018,
-	0x0020, 0x1000, 0x0800, 0x1000, 0x1800, 0x0156, 0x0006, 0x0016,
-	0x0026, 0x00e6, 0x2001, 0x1968, 0x2004, 0x908a, 0x0007, 0x1a0c,
-	0x0d65, 0x0033, 0x00ee, 0x002e, 0x001e, 0x000e, 0x015e, 0x0005,
-	0x25b7, 0x25d5, 0x25f9, 0x25fb, 0x2624, 0x2626, 0x2628, 0x2001,
-	0x0001, 0x080c, 0x23fe, 0x080c, 0x2823, 0x2001, 0x196a, 0x2003,
-	0x0000, 0x7828, 0x9084, 0xe1d7, 0x782a, 0x9006, 0x20a9, 0x0009,
-	0x080c, 0x27f1, 0x2001, 0x1968, 0x2003, 0x0006, 0x2009, 0x001e,
-	0x2011, 0x2629, 0x080c, 0x8230, 0x0005, 0x2009, 0x196d, 0x200b,
-	0x0000, 0x2001, 0x1972, 0x2003, 0x0036, 0x2001, 0x1971, 0x2003,
-	0x002a, 0x2001, 0x196a, 0x2003, 0x0001, 0x9006, 0x080c, 0x2786,
-	0x2001, 0xffff, 0x20a9, 0x0009, 0x080c, 0x27f1, 0x2001, 0x1968,
-	0x2003, 0x0006, 0x2009, 0x001e, 0x2011, 0x2629, 0x080c, 0x8230,
-	0x0005, 0x080c, 0x0d65, 0x2001, 0x1972, 0x2003, 0x0036, 0x2001,
-	0x196a, 0x2003, 0x0003, 0x7a38, 0x9294, 0x0005, 0x9296, 0x0004,
-	0x0110, 0x9006, 0x0010, 0x2001, 0x0001, 0x080c, 0x2786, 0x2001,
-	0x196e, 0x2003, 0x0000, 0x2001, 0xffff, 0x20a9, 0x0009, 0x080c,
-	0x27f1, 0x2001, 0x1968, 0x2003, 0x0006, 0x2009, 0x001e, 0x2011,
-	0x2629, 0x080c, 0x8230, 0x0005, 0x080c, 0x0d65, 0x080c, 0x0d65,
-	0x0005, 0x0006, 0x0016, 0x0026, 0x00e6, 0x00f6, 0x0156, 0x0126,
-	0x2091, 0x8000, 0x2079, 0x0100, 0x2001, 0x196a, 0x2004, 0x908a,
-	0x0007, 0x1a0c, 0x0d65, 0x0043, 0x012e, 0x015e, 0x00fe, 0x00ee,
-	0x002e, 0x001e, 0x000e, 0x0005, 0x264b, 0x266b, 0x26ab, 0x26db,
-	0x26ff, 0x270f, 0x2711, 0x080c, 0x27e5, 0x11b0, 0x7850, 0x9084,
-	0xefff, 0x7852, 0x2009, 0x1970, 0x2104, 0x7a38, 0x9294, 0x0005,
-	0x9296, 0x0004, 0x0110, 0xc08d, 0x0008, 0xc085, 0x200a, 0x2001,
-	0x1968, 0x2003, 0x0001, 0x0030, 0x080c, 0x2735, 0x2001, 0xffff,
-	0x080c, 0x25c6, 0x0005, 0x080c, 0x2713, 0x05e0, 0x2009, 0x1971,
-	0x2104, 0x8001, 0x200a, 0x080c, 0x27e5, 0x1178, 0x7850, 0x9084,
-	0xefff, 0x7852, 0x7a38, 0x9294, 0x0005, 0x9296, 0x0005, 0x0518,
-	0x2009, 0x1970, 0x2104, 0xc085, 0x200a, 0x2009, 0x196d, 0x2104,
-	0x8000, 0x200a, 0x9086, 0x0005, 0x0118, 0x080c, 0x271b, 0x00c0,
-	0x200b, 0x0000, 0x7a38, 0x9294, 0x0006, 0x9296, 0x0004, 0x0110,
-	0x9006, 0x0010, 0x2001, 0x0001, 0x080c, 0x27a3, 0x2001, 0x196a,
-	0x2003, 0x0002, 0x0028, 0x2001, 0x1968, 0x2003, 0x0003, 0x0010,
-	0x080c, 0x25e8, 0x0005, 0x080c, 0x2713, 0x0560, 0x2009, 0x1971,
-	0x2104, 0x8001, 0x200a, 0x080c, 0x27e5, 0x1168, 0x7850, 0x9084,
-	0xefff, 0x7852, 0x2001, 0x1968, 0x2003, 0x0003, 0x2001, 0x1969,
-	0x2003, 0x0000, 0x00b8, 0x2009, 0x1971, 0x2104, 0x9005, 0x1118,
-	0x080c, 0x2758, 0x0010, 0x080c, 0x2728, 0x080c, 0x271b, 0x2009,
-	0x196d, 0x200b, 0x0000, 0x2001, 0x196a, 0x2003, 0x0001, 0x080c,
-	0x25e8, 0x0000, 0x0005, 0x04b9, 0x0508, 0x080c, 0x27e5, 0x11b8,
-	0x7850, 0x9084, 0xefff, 0x7852, 0x2009, 0x196e, 0x2104, 0x8000,
-	0x200a, 0x9086, 0x0007, 0x0108, 0x0078, 0x2001, 0x1973, 0x2003,
-	0x000a, 0x2009, 0x1970, 0x2104, 0xc0fd, 0x200a, 0x0038, 0x0419,
-	0x2001, 0x196a, 0x2003, 0x0004, 0x080c, 0x2613, 0x0005, 0x0099,
-	0x0168, 0x080c, 0x27e5, 0x1138, 0x7850, 0x9084, 0xefff, 0x7852,
-	0x080c, 0x25ff, 0x0018, 0x0079, 0x080c, 0x2613, 0x0005, 0x080c,
-	0x0d65, 0x080c, 0x0d65, 0x2009, 0x1972, 0x2104, 0x8001, 0x200a,
-	0x090c, 0x2774, 0x0005, 0x7a38, 0x9294, 0x0005, 0x9296, 0x0005,
-	0x0110, 0x9006, 0x0010, 0x2001, 0x0001, 0x080c, 0x27a3, 0x0005,
-	0x7a38, 0x9294, 0x0006, 0x9296, 0x0006, 0x0110, 0x9006, 0x0010,
-	0x2001, 0x0001, 0x080c, 0x2786, 0x0005, 0x2009, 0x196d, 0x2104,
-	0x8000, 0x200a, 0x9086, 0x0005, 0x0108, 0x0068, 0x200b, 0x0000,
-	0x7a38, 0x9294, 0x0006, 0x9296, 0x0006, 0x0110, 0x9006, 0x0010,
-	0x2001, 0x0001, 0x04d9, 0x7a38, 0x9294, 0x0005, 0x9296, 0x0005,
-	0x0110, 0x9006, 0x0010, 0x2001, 0x0001, 0x080c, 0x27a3, 0x0005,
-	0x0086, 0x2001, 0x1970, 0x2004, 0x9084, 0x7fff, 0x090c, 0x0d65,
-	0x2009, 0x196f, 0x2144, 0x8846, 0x280a, 0x9844, 0x0dd8, 0xd08c,
-	0x1120, 0xd084, 0x1120, 0x080c, 0x0d65, 0x9006, 0x0010, 0x2001,
-	0x0001, 0x00a1, 0x008e, 0x0005, 0x0006, 0x0156, 0x2001, 0x1968,
-	0x20a9, 0x0009, 0x2003, 0x0000, 0x8000, 0x1f04, 0x277a, 0x2001,
-	0x196f, 0x2003, 0x8000, 0x015e, 0x000e, 0x0005, 0x00f6, 0x2079,
-	0x0100, 0x9085, 0x0000, 0x0158, 0x7838, 0x9084, 0xfff9, 0x9085,
-	0x0004, 0x783a, 0x2009, 0x1975, 0x210c, 0x795a, 0x0050, 0x7838,
-	0x9084, 0xfffb, 0x9085, 0x0006, 0x783a, 0x2009, 0x1976, 0x210c,
-	0x795a, 0x00fe, 0x0005, 0x00f6, 0x2079, 0x0100, 0x9085, 0x0000,
-	0x0158, 0x7838, 0x9084, 0xfffa, 0x9085, 0x0004, 0x783a, 0x7850,
-	0x9084, 0xfff0, 0x7852, 0x00f8, 0x7838, 0x9084, 0xfffb, 0x9085,
-	0x0005, 0x783a, 0x7850, 0x9084, 0xfff0, 0x0016, 0x2009, 0x017f,
-	0x210c, 0x918e, 0x0005, 0x0140, 0x2009, 0x0003, 0x210c, 0x918c,
-	0x0600, 0x918e, 0x0400, 0x0118, 0x9085, 0x000a, 0x0010, 0x9085,
-	0x0000, 0x001e, 0x7852, 0x00fe, 0x0005, 0x0006, 0x2001, 0x0100,
-	0x2004, 0x9082, 0x0007, 0x000e, 0x0005, 0x0006, 0x2001, 0x0100,
-	0x2004, 0x9082, 0x0009, 0x000e, 0x0005, 0x0156, 0x20a9, 0x0064,
-	0x7820, 0x080c, 0x2858, 0xd09c, 0x1110, 0x1f04, 0x27e8, 0x015e,
-	0x0005, 0x0126, 0x0016, 0x0006, 0x2091, 0x8000, 0x080c, 0x28cf,
-	0x080c, 0x2902, 0x000e, 0x2008, 0x9186, 0x0000, 0x1118, 0x783b,
-	0x0007, 0x0090, 0x9186, 0x0001, 0x1118, 0x783b, 0x0006, 0x0060,
-	0x9186, 0x0002, 0x1118, 0x783b, 0x0005, 0x0030, 0x9186, 0x0003,
-	0x1118, 0x783b, 0x0004, 0x0000, 0x0006, 0x1d04, 0x2815, 0x080c,
-	0x8252, 0x1f04, 0x2815, 0x7850, 0x9085, 0x1000, 0x7852, 0x000e,
-	0x001e, 0x012e, 0x0005, 0x080c, 0x2902, 0x0005, 0x0006, 0x0156,
-	0x00f6, 0x2079, 0x0100, 0x20a9, 0x000a, 0x7854, 0xd0ac, 0x1100,
-	0x7854, 0xd08c, 0x1110, 0x1f04, 0x2830, 0x00fe, 0x015e, 0x000e,
-	0x0005, 0x1d04, 0x2839, 0x080c, 0x8252, 0x1f04, 0x2839, 0x0005,
-	0x0006, 0x2001, 0x1974, 0x2004, 0x9086, 0x0000, 0x000e, 0x0005,
-	0x0006, 0x2001, 0x1974, 0x2004, 0x9086, 0x0001, 0x000e, 0x0005,
-	0x0006, 0x2001, 0x1974, 0x2004, 0x9086, 0x0002, 0x000e, 0x0005,
-	0xa001, 0xa001, 0xa001, 0xa001, 0xa001, 0x0005, 0x0006, 0x2001,
-	0x1980, 0x2102, 0x000e, 0x0005, 0x2009, 0x0171, 0x2104, 0xd0dc,
-	0x0140, 0x2009, 0x0170, 0x2104, 0x200b, 0x0080, 0xa001, 0xa001,
-	0x200a, 0x0005, 0x0016, 0x0026, 0x080c, 0x70d4, 0x0108, 0xc0bc,
-	0x2009, 0x0140, 0x2114, 0x9294, 0x0001, 0x9215, 0x220a, 0x002e,
-	0x001e, 0x0005, 0x0016, 0x0026, 0x2009, 0x0140, 0x2114, 0x9294,
-	0x0001, 0x9285, 0x1000, 0x200a, 0x220a, 0x002e, 0x001e, 0x0005,
-	0x0016, 0x0026, 0x2009, 0x0140, 0x2114, 0x9294, 0x0001, 0x9215,
-	0x220a, 0x002e, 0x001e, 0x0005, 0x0006, 0x0016, 0x2009, 0x0140,
-	0x2104, 0x1128, 0x080c, 0x70d4, 0x0110, 0xc0bc, 0x0008, 0xc0bd,
-	0x200a, 0x001e, 0x000e, 0x0005, 0x00f6, 0x2079, 0x0380, 0x7843,
-	0x0101, 0x7844, 0xd084, 0x1de8, 0x2001, 0x0109, 0x2202, 0x7843,
-	0x0100, 0x00fe, 0x0005, 0x00f6, 0x2079, 0x0380, 0x7843, 0x0202,
-	0x7844, 0xd08c, 0x1de8, 0x2079, 0x0100, 0x7814, 0x9104, 0x9205,
-	0x7a16, 0x2079, 0x0380, 0x7843, 0x0200, 0x00fe, 0x0005, 0x0016,
-	0x0026, 0x0036, 0x00c6, 0x2061, 0x0100, 0x6050, 0x9084, 0xfbff,
-	0x9085, 0x0040, 0x6052, 0x20a9, 0x0002, 0x080c, 0x2839, 0x6050,
-	0x9085, 0x0400, 0x9084, 0xff9f, 0x6052, 0x20a9, 0x0005, 0x080c,
-	0x2839, 0x6054, 0xd0bc, 0x090c, 0x0d65, 0x20a9, 0x0005, 0x080c,
-	0x2839, 0x6054, 0xd0ac, 0x090c, 0x0d65, 0x2009, 0x1987, 0x9084,
-	0x7e00, 0x8007, 0x8004, 0x8004, 0x200a, 0x00ce, 0x003e, 0x002e,
-	0x001e, 0x0005, 0x0006, 0x00c6, 0x2061, 0x0100, 0x6050, 0xc0cd,
-	0x6052, 0x00ce, 0x000e, 0x0005, 0x2e08, 0x2e08, 0x2a0c, 0x2a0c,
-	0x2a18, 0x2a18, 0x2a24, 0x2a24, 0x2a32, 0x2a32, 0x2a3e, 0x2a3e,
-	0x2a4c, 0x2a4c, 0x2a5a, 0x2a5a, 0x2a6c, 0x2a6c, 0x2a78, 0x2a78,
-	0x2a86, 0x2a86, 0x2aa4, 0x2aa4, 0x2ac4, 0x2ac4, 0x2a94, 0x2a94,
-	0x2ab4, 0x2ab4, 0x2ad2, 0x2ad2, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a,
-	0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a,
-	0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a,
-	0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a,
-	0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2ae4, 0x2ae4, 0x2af0, 0x2af0,
-	0x2afe, 0x2afe, 0x2b0c, 0x2b0c, 0x2b1c, 0x2b1c, 0x2b2a, 0x2b2a,
-	0x2b3a, 0x2b3a, 0x2b4a, 0x2b4a, 0x2b5c, 0x2b5c, 0x2b6a, 0x2b6a,
-	0x2b7a, 0x2b7a, 0x2b9c, 0x2b9c, 0x2bc0, 0x2bc0, 0x2b8a, 0x2b8a,
-	0x2bae, 0x2bae, 0x2bd0, 0x2bd0, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a,
-	0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a,
-	0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a,
-	0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a,
-	0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2be4, 0x2be4, 0x2bf0, 0x2bf0,
-	0x2bfe, 0x2bfe, 0x2c0c, 0x2c0c, 0x2c1c, 0x2c1c, 0x2c2a, 0x2c2a,
-	0x2c3a, 0x2c3a, 0x2c4a, 0x2c4a, 0x2c5c, 0x2c5c, 0x2c6a, 0x2c6a,
-	0x2c7a, 0x2c7a, 0x2c8a, 0x2c8a, 0x2c9c, 0x2c9c, 0x2cac, 0x2cac,
-	0x2cbe, 0x2cbe, 0x2cd0, 0x2cd0, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a,
-	0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a,
-	0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a,
-	0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a,
-	0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2ce4, 0x2ce4, 0x2cf2, 0x2cf2,
-	0x2d02, 0x2d02, 0x2d12, 0x2d12, 0x2d24, 0x2d24, 0x2d34, 0x2d34,
-	0x2d46, 0x2d46, 0x2d58, 0x2d58, 0x2d6c, 0x2d6c, 0x2d7c, 0x2d7c,
-	0x2d8e, 0x2d8e, 0x2da0, 0x2da0, 0x2db4, 0x2db4, 0x2dc5, 0x2dc5,
-	0x2dd8, 0x2dd8, 0x2deb, 0x2deb, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a,
-	0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a,
-	0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a,
-	0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a,
-	0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2117, 0x0804, 0x2e00,
-	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
-	0x080c, 0x1f45, 0x0804, 0x2e00, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x1f45, 0x080c, 0x2117,
-	0x0804, 0x2e00, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
-	0x0146, 0x0156, 0x080c, 0x1f6f, 0x0804, 0x2e00, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2117,
-	0x080c, 0x1f6f, 0x0804, 0x2e00, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x1f45, 0x080c, 0x1f6f,
-	0x0804, 0x2e00, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
-	0x0146, 0x0156, 0x080c, 0x1f45, 0x080c, 0x2117, 0x080c, 0x1f6f,
-	0x0804, 0x2e00, 0xa001, 0x0cf0, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x1342, 0x0804, 0x2e00,
-	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
-	0x080c, 0x2117, 0x080c, 0x1342, 0x0804, 0x2e00, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x1f45,
-	0x080c, 0x1342, 0x0804, 0x2e00, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2117, 0x080c, 0x1342,
-	0x080c, 0x1f6f, 0x0804, 0x2e00, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x1f45, 0x080c, 0x2117,
-	0x080c, 0x1342, 0x0804, 0x2e00, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x1f45, 0x080c, 0x1342,
-	0x080c, 0x1f6f, 0x0804, 0x2e00, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x1342, 0x080c, 0x1f6f,
-	0x0804, 0x2e00, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
-	0x0146, 0x0156, 0x080c, 0x1f45, 0x080c, 0x2117, 0x080c, 0x1342,
-	0x080c, 0x1f6f, 0x0804, 0x2e00, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x255c, 0x0804, 0x2e00,
-	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
-	0x080c, 0x255c, 0x080c, 0x2117, 0x0804, 0x2e00, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x255c,
-	0x080c, 0x1f45, 0x0804, 0x2e00, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x255c, 0x080c, 0x1f45,
-	0x080c, 0x2117, 0x0804, 0x2e00, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x255c, 0x080c, 0x1f6f,
-	0x0804, 0x2e00, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
-	0x0146, 0x0156, 0x080c, 0x255c, 0x080c, 0x2117, 0x080c, 0x1f6f,
-	0x0804, 0x2e00, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
-	0x0146, 0x0156, 0x080c, 0x255c, 0x080c, 0x1f45, 0x080c, 0x1f6f,
-	0x0804, 0x2e00, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
-	0x0146, 0x0156, 0x080c, 0x255c, 0x080c, 0x1f45, 0x080c, 0x2117,
-	0x080c, 0x1f6f, 0x0804, 0x2e00, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x255c, 0x080c, 0x1342,
-	0x0804, 0x2e00, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
-	0x0146, 0x0156, 0x080c, 0x255c, 0x080c, 0x2117, 0x080c, 0x1342,
-	0x0804, 0x2e00, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
-	0x0146, 0x0156, 0x080c, 0x255c, 0x080c, 0x1f45, 0x080c, 0x1342,
-	0x0804, 0x2e00, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
-	0x0146, 0x0156, 0x080c, 0x255c, 0x080c, 0x2117, 0x080c, 0x1342,
-	0x080c, 0x1f6f, 0x0804, 0x2e00, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x255c, 0x080c, 0x1f45,
-	0x080c, 0x2117, 0x080c, 0x1342, 0x0804, 0x2e00, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x255c,
-	0x080c, 0x1f45, 0x080c, 0x1342, 0x080c, 0x1f6f, 0x0804, 0x2e00,
-	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
-	0x080c, 0x255c, 0x080c, 0x1342, 0x080c, 0x1f6f, 0x0804, 0x2e00,
-	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
-	0x080c, 0x255c, 0x080c, 0x1f45, 0x080c, 0x2117, 0x080c, 0x1342,
-	0x080c, 0x1f6f, 0x0804, 0x2e00, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x992d, 0x0804, 0x2e00,
-	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
-	0x080c, 0x992d, 0x080c, 0x2117, 0x0804, 0x2e00, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x1f45,
-	0x080c, 0x992d, 0x0804, 0x2e00, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x1f45, 0x080c, 0x992d,
-	0x080c, 0x2117, 0x0804, 0x2e00, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x992d, 0x080c, 0x1f6f,
-	0x0804, 0x2e00, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
-	0x0146, 0x0156, 0x080c, 0x992d, 0x080c, 0x2117, 0x080c, 0x1f6f,
-	0x0804, 0x2e00, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
-	0x0146, 0x0156, 0x080c, 0x1f45, 0x080c, 0x992d, 0x080c, 0x1f6f,
-	0x0804, 0x2e00, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
-	0x0146, 0x0156, 0x080c, 0x1f45, 0x080c, 0x992d, 0x080c, 0x2117,
-	0x080c, 0x1f6f, 0x0804, 0x2e00, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x992d, 0x080c, 0x1342,
-	0x0804, 0x2e00, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
-	0x0146, 0x0156, 0x080c, 0x992d, 0x080c, 0x2117, 0x080c, 0x1342,
-	0x0804, 0x2e00, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
-	0x0146, 0x0156, 0x080c, 0x1f45, 0x080c, 0x992d, 0x080c, 0x1342,
-	0x0804, 0x2e00, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
-	0x0146, 0x0156, 0x080c, 0x1f45, 0x080c, 0x992d, 0x080c, 0x2117,
-	0x080c, 0x1342, 0x0804, 0x2e00, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x992d, 0x080c, 0x1342,
-	0x080c, 0x1f6f, 0x0804, 0x2e00, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x992d, 0x080c, 0x2117,
-	0x080c, 0x1342, 0x080c, 0x1f6f, 0x0804, 0x2e00, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x1f45,
-	0x080c, 0x992d, 0x080c, 0x1342, 0x080c, 0x1f6f, 0x0804, 0x2e00,
-	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
-	0x080c, 0x1f45, 0x080c, 0x992d, 0x080c, 0x2117, 0x080c, 0x1342,
-	0x080c, 0x1f6f, 0x0804, 0x2e00, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x255c, 0x080c, 0x992d,
-	0x0804, 0x2e00, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
-	0x0146, 0x0156, 0x080c, 0x255c, 0x080c, 0x992d, 0x080c, 0x2117,
-	0x0804, 0x2e00, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
-	0x0146, 0x0156, 0x080c, 0x255c, 0x080c, 0x1f45, 0x080c, 0x992d,
-	0x0804, 0x2e00, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136,
-	0x0146, 0x0156, 0x080c, 0x255c, 0x080c, 0x1f45, 0x080c, 0x992d,
-	0x080c, 0x2117, 0x0804, 0x2e00, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x255c, 0x080c, 0x992d,
-	0x080c, 0x1f6f, 0x0804, 0x2e00, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x255c, 0x080c, 0x992d,
-	0x080c, 0x2117, 0x080c, 0x1f6f, 0x0804, 0x2e00, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x255c,
-	0x080c, 0x1f45, 0x080c, 0x992d, 0x080c, 0x1f6f, 0x0804, 0x2e00,
-	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
-	0x080c, 0x255c, 0x080c, 0x1f45, 0x080c, 0x992d, 0x080c, 0x2117,
-	0x080c, 0x1f6f, 0x0804, 0x2e00, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x255c, 0x080c, 0x992d,
-	0x080c, 0x1342, 0x0804, 0x2e00, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x255c, 0x080c, 0x992d,
-	0x080c, 0x2117, 0x080c, 0x1342, 0x0804, 0x2e00, 0x0106, 0x0006,
-	0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x255c,
-	0x080c, 0x1f45, 0x080c, 0x992d, 0x080c, 0x1342, 0x0804, 0x2e00,
-	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
-	0x080c, 0x255c, 0x080c, 0x1f45, 0x080c, 0x992d, 0x080c, 0x2117,
-	0x080c, 0x1342, 0x0804, 0x2e00, 0x0106, 0x0006, 0x0126, 0x01c6,
-	0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x255c, 0x080c, 0x992d,
-	0x080c, 0x1342, 0x080c, 0x1f6f, 0x04d8, 0x0106, 0x0006, 0x0126,
-	0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x255c, 0x080c,
-	0x992d, 0x080c, 0x2117, 0x080c, 0x1342, 0x080c, 0x1f6f, 0x0440,
-	0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156,
-	0x080c, 0x255c, 0x080c, 0x1f45, 0x080c, 0x1342, 0x080c, 0x992d,
-	0x080c, 0x1f6f, 0x00a8, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6,
-	0x0136, 0x0146, 0x0156, 0x080c, 0x255c, 0x080c, 0x1f45, 0x080c,
-	0x992d, 0x080c, 0x2117, 0x080c, 0x1342, 0x080c, 0x1f6f, 0x0000,
-	0x015e, 0x014e, 0x013e, 0x01de, 0x01ce, 0x012e, 0x000e, 0x010e,
-	0x000d, 0x00b6, 0x00c6, 0x0026, 0x0046, 0x9026, 0x080c, 0x6648,
-	0x1904, 0x2f0f, 0x72d8, 0x2001, 0x1954, 0x2004, 0x9005, 0x1110,
-	0xd29c, 0x0148, 0xd284, 0x1138, 0xd2bc, 0x1904, 0x2f0f, 0x080c,
-	0x2f14, 0x0804, 0x2f0f, 0xd2cc, 0x1904, 0x2f0f, 0x080c, 0x70ba,
-	0x1120, 0x70ab, 0xffff, 0x0804, 0x2f0f, 0xd294, 0x0120, 0x70ab,
-	0xffff, 0x0804, 0x2f0f, 0x080c, 0x3195, 0x0160, 0x080c, 0xbf8f,
-	0x0128, 0x2001, 0x1817, 0x203c, 0x0804, 0x2ea1, 0x70ab, 0xffff,
-	0x0804, 0x2f0f, 0x2001, 0x1817, 0x203c, 0x7290, 0xd284, 0x0904,
-	0x2ea1, 0xd28c, 0x1904, 0x2ea1, 0x0036, 0x73a8, 0x938e, 0xffff,
-	0x1110, 0x2019, 0x0001, 0x8314, 0x92e0, 0x1d80, 0x2c04, 0x938c,
-	0x0001, 0x0120, 0x9084, 0xff00, 0x8007, 0x0010, 0x9084, 0x00ff,
-	0x970e, 0x05a8, 0x908e, 0x0000, 0x0590, 0x908e, 0x00ff, 0x1150,
-	0x7230, 0xd284, 0x1588, 0x7290, 0xc28d, 0x7292, 0x70ab, 0xffff,
-	0x003e, 0x0478, 0x0026, 0x2011, 0x0010, 0x080c, 0x66ae, 0x002e,
-	0x0118, 0x70ab, 0xffff, 0x0410, 0x900e, 0x080c, 0x2459, 0x080c,
-	0x622f, 0x11c0, 0x080c, 0x668a, 0x1168, 0x7030, 0xd08c, 0x0130,
-	0xb800, 0xd0bc, 0x0138, 0x080c, 0x6582, 0x0120, 0x080c, 0x2f2d,
-	0x0148, 0x0028, 0x080c, 0x3079, 0x080c, 0x2f59, 0x0118, 0x8318,
-	0x0804, 0x2e53, 0x73aa, 0x0010, 0x70ab, 0xffff, 0x003e, 0x0804,
-	0x2f0f, 0x9780, 0x319f, 0x203d, 0x97bc, 0xff00, 0x873f, 0x2041,
-	0x007e, 0x70a8, 0x9096, 0xffff, 0x1118, 0x900e, 0x28a8, 0x0050,
-	0x9812, 0x0220, 0x2008, 0x9802, 0x20a8, 0x0020, 0x70ab, 0xffff,
-	0x0804, 0x2f0f, 0x2700, 0x0156, 0x0016, 0x9106, 0x0904, 0x2f04,
-	0x0026, 0x2011, 0x0010, 0x080c, 0x66ae, 0x002e, 0x0120, 0x2009,
-	0xffff, 0x0804, 0x2f0c, 0xc484, 0x080c, 0x628f, 0x0138, 0x080c,
-	0xbf8f, 0x1590, 0x080c, 0x622f, 0x15b8, 0x0008, 0xc485, 0x080c,
-	0x668a, 0x1130, 0x7030, 0xd08c, 0x01f8, 0xb800, 0xd0bc, 0x11e0,
-	0x7290, 0xd28c, 0x0180, 0x080c, 0x668a, 0x9082, 0x0006, 0x02e0,
-	0xd484, 0x1118, 0x080c, 0x6253, 0x0028, 0x080c, 0x310b, 0x01a0,
-	0x080c, 0x3136, 0x0088, 0x080c, 0x3079, 0x080c, 0xbf8f, 0x1160,
-	0x080c, 0x2f59, 0x0188, 0x0040, 0x080c, 0xbf8f, 0x1118, 0x080c,
-	0x310b, 0x0110, 0x0451, 0x0140, 0x001e, 0x8108, 0x015e, 0x1f04,
-	0x2eba, 0x70ab, 0xffff, 0x0018, 0x001e, 0x015e, 0x71aa, 0x004e,
-	0x002e, 0x00ce, 0x00be, 0x0005, 0x00c6, 0x0016, 0x70ab, 0x0001,
-	0x2009, 0x007e, 0x080c, 0x622f, 0x1168, 0xb813, 0x00ff, 0xb817,
-	0xfffe, 0x080c, 0x3079, 0x04a9, 0x0128, 0x70d8, 0xc0bd, 0x70da,
-	0x080c, 0xbcdc, 0x001e, 0x00ce, 0x0005, 0x0016, 0x0076, 0x00d6,
-	0x00c6, 0x2001, 0x1860, 0x2004, 0x9084, 0x00ff, 0xb842, 0x080c,
-	0x9c55, 0x01d0, 0x2b00, 0x6012, 0x080c, 0xbd09, 0x6023, 0x0001,
-	0x9006, 0x080c, 0x61cc, 0x2001, 0x0000, 0x080c, 0x61e0, 0x0126,
-	0x2091, 0x8000, 0x70a4, 0x8000, 0x70a6, 0x012e, 0x2009, 0x0004,
-	0x080c, 0x9c82, 0x9085, 0x0001, 0x00ce, 0x00de, 0x007e, 0x001e,
-	0x0005, 0x0016, 0x0076, 0x00d6, 0x00c6, 0x2001, 0x1860, 0x2004,
-	0x9084, 0x00ff, 0xb842, 0x080c, 0x9c55, 0x0548, 0x2b00, 0x6012,
-	0xb800, 0xc0c4, 0xb802, 0xb8a0, 0x9086, 0x007e, 0x0140, 0xb804,
-	0x9084, 0x00ff, 0x9086, 0x0006, 0x1110, 0x080c, 0x302e, 0x080c,
-	0xbd09, 0x6023, 0x0001, 0x9006, 0x080c, 0x61cc, 0x2001, 0x0002,
-	0x080c, 0x61e0, 0x0126, 0x2091, 0x8000, 0x70a4, 0x8000, 0x70a6,
-	0x012e, 0x2009, 0x0002, 0x080c, 0x9c82, 0x9085, 0x0001, 0x00ce,
-	0x00de, 0x007e, 0x001e, 0x0005, 0x00b6, 0x00c6, 0x0026, 0x2009,
-	0x0080, 0x080c, 0x622f, 0x1140, 0xb813, 0x00ff, 0xb817, 0xfffc,
-	0x0039, 0x0110, 0x70df, 0xffff, 0x002e, 0x00ce, 0x00be, 0x0005,
-	0x0016, 0x0076, 0x00d6, 0x00c6, 0x080c, 0x9b90, 0x01d0, 0x2b00,
-	0x6012, 0x080c, 0xbd09, 0x6023, 0x0001, 0x9006, 0x080c, 0x61cc,
-	0x2001, 0x0002, 0x080c, 0x61e0, 0x0126, 0x2091, 0x8000, 0x70e0,
-	0x8000, 0x70e2, 0x012e, 0x2009, 0x0002, 0x080c, 0x9c82, 0x9085,
-	0x0001, 0x00ce, 0x00de, 0x007e, 0x001e, 0x0005, 0x00c6, 0x00d6,
-	0x0126, 0x2091, 0x8000, 0x2009, 0x007f, 0x080c, 0x622f, 0x11b8,
-	0xb813, 0x00ff, 0xb817, 0xfffd, 0xb8c7, 0x0004, 0x080c, 0x9b90,
-	0x0170, 0x2b00, 0x6012, 0x6316, 0x6023, 0x0001, 0x620a, 0x080c,
-	0xbd09, 0x2009, 0x0022, 0x080c, 0x9c82, 0x9085, 0x0001, 0x012e,
-	0x00de, 0x00ce, 0x0005, 0x00e6, 0x00c6, 0x0066, 0x0036, 0x0026,
-	0x00b6, 0x21f0, 0x080c, 0x98c7, 0x0106, 0x080c, 0x8663, 0x080c,
-	0x85de, 0x080c, 0x9818, 0x080c, 0xab55, 0x010e, 0x090c, 0x98e3,
-	0x3e08, 0x2130, 0x81ff, 0x0120, 0x20a9, 0x007e, 0x900e, 0x0018,
-	0x20a9, 0x007f, 0x900e, 0x0016, 0x080c, 0x628f, 0x1140, 0x9686,
-	0x0002, 0x1118, 0xb800, 0xd0bc, 0x1110, 0x080c, 0x5d11, 0x001e,
-	0x8108, 0x1f04, 0x3013, 0x9686, 0x0001, 0x190c, 0x3169, 0x00be,
-	0x002e, 0x003e, 0x006e, 0x00ce, 0x00ee, 0x0005, 0x00e6, 0x00c6,
-	0x0046, 0x0036, 0x0026, 0x0016, 0x00b6, 0x080c, 0x98c7, 0x0106,
-	0x6210, 0x2258, 0xbaa0, 0x0026, 0x2019, 0x0029, 0x080c, 0x8658,
-	0x0076, 0x2039, 0x0000, 0x080c, 0x853d, 0x2c08, 0x080c, 0xd011,
-	0x007e, 0x001e, 0x010e, 0x090c, 0x98e3, 0xba10, 0xbb14, 0xbc84,
-	0x080c, 0x5d11, 0xba12, 0xbb16, 0xbc86, 0x00be, 0x001e, 0x002e,
-	0x003e, 0x004e, 0x00ce, 0x00ee, 0x0005, 0x00e6, 0x0006, 0x00b6,
-	0x6010, 0x2058, 0xb8a0, 0x00be, 0x9086, 0x0080, 0x0150, 0x2071,
-	0x1800, 0x70a4, 0x9005, 0x0110, 0x8001, 0x70a6, 0x000e, 0x00ee,
-	0x0005, 0x2071, 0x1800, 0x70e0, 0x9005, 0x0dc0, 0x8001, 0x70e2,
-	0x0ca8, 0xb800, 0xc08c, 0xb802, 0x0005, 0x00f6, 0x00e6, 0x00c6,
-	0x00b6, 0x0046, 0x0036, 0x0026, 0x0016, 0x0156, 0x2178, 0x080c,
-	0x98c7, 0x0106, 0x81ff, 0x1118, 0x20a9, 0x0001, 0x0070, 0x080c,
-	0x53a8, 0xd0c4, 0x0138, 0x0030, 0x9006, 0x2020, 0x2009, 0x002d,
-	0x080c, 0xd2bc, 0x20a9, 0x0800, 0x9016, 0x0026, 0x928e, 0x007e,
-	0x0904, 0x30e7, 0x928e, 0x007f, 0x0904, 0x30e7, 0x928e, 0x0080,
-	0x05f0, 0x9288, 0x1000, 0x210c, 0x81ff, 0x05c8, 0x8fff, 0x1150,
-	0x2001, 0x1966, 0x0006, 0x2003, 0x0001, 0x080c, 0x30f8, 0x000e,
-	0x2003, 0x0000, 0x00b6, 0x00c6, 0x2158, 0x2001, 0x0001, 0x080c,
-	0x6654, 0x00ce, 0x00be, 0x2019, 0x0029, 0x080c, 0x8658, 0x0076,
-	0x2039, 0x0000, 0x080c, 0x853d, 0x00b6, 0x00c6, 0x0026, 0x2158,
-	0xba04, 0x9294, 0x00ff, 0x9286, 0x0006, 0x1118, 0xb807, 0x0404,
-	0x0028, 0x2001, 0x0004, 0x8007, 0x9215, 0xba06, 0x002e, 0x00ce,
-	0x00be, 0x0016, 0x2c08, 0x080c, 0xd011, 0x001e, 0x007e, 0x002e,
-	0x8210, 0x1f04, 0x309d, 0x010e, 0x090c, 0x98e3, 0x015e, 0x001e,
-	0x002e, 0x003e, 0x004e, 0x00be, 0x00ce, 0x00ee, 0x00fe, 0x0005,
-	0x0046, 0x0026, 0x0016, 0x080c, 0x53a8, 0xd0c4, 0x0140, 0xd0a4,
-	0x0130, 0x9006, 0x2220, 0x2009, 0x0029, 0x080c, 0xd2bc, 0x001e,
-	0x002e, 0x004e, 0x0005, 0x0016, 0x0026, 0x0036, 0x00c6, 0x7290,
-	0x82ff, 0x01e8, 0x080c, 0x6682, 0x11d0, 0x2100, 0x080c, 0x248c,
-	0x81ff, 0x01b8, 0x2019, 0x0001, 0x8314, 0x92e0, 0x1d80, 0x2c04,
-	0xd384, 0x0120, 0x9084, 0xff00, 0x8007, 0x0010, 0x9084, 0x00ff,
-	0x9116, 0x0138, 0x9096, 0x00ff, 0x0110, 0x8318, 0x0c68, 0x9085,
-	0x0001, 0x00ce, 0x003e, 0x002e, 0x001e, 0x0005, 0x0016, 0x00c6,
-	0x0126, 0x2091, 0x8000, 0x080c, 0x98c7, 0x0106, 0x0036, 0x2019,
-	0x0029, 0x00c1, 0x003e, 0x010e, 0x090c, 0x98e3, 0x9180, 0x1000,
-	0x2004, 0x9065, 0x0158, 0x0016, 0x00c6, 0x2061, 0x1b09, 0x001e,
-	0x6112, 0x080c, 0x302e, 0x001e, 0x080c, 0x6253, 0x012e, 0x00ce,
-	0x001e, 0x0005, 0x0016, 0x0026, 0x2110, 0x080c, 0x94e5, 0x080c,
-	0xd572, 0x002e, 0x001e, 0x0005, 0x2001, 0x1836, 0x2004, 0xd0cc,
-	0x0005, 0x00c6, 0x00b6, 0x080c, 0x70ba, 0x1118, 0x20a9, 0x0800,
-	0x0010, 0x20a9, 0x0782, 0x080c, 0x70ba, 0x1110, 0x900e, 0x0010,
-	0x2009, 0x007e, 0x9180, 0x1000, 0x2004, 0x905d, 0x0130, 0x86ff,
-	0x0110, 0xb800, 0xd0bc, 0x090c, 0x6253, 0x8108, 0x1f04, 0x317a,
-	0x2061, 0x1800, 0x607b, 0x0000, 0x607c, 0x9084, 0x00ff, 0x607e,
-	0x60af, 0x0000, 0x00be, 0x00ce, 0x0005, 0x2001, 0x187d, 0x2004,
-	0xd0bc, 0x0005, 0x2011, 0x185c, 0x2214, 0xd2ec, 0x0005, 0x7eef,
-	0x7de8, 0x7ce4, 0x80e2, 0x7be1, 0x80e0, 0x80dc, 0x80da, 0x7ad9,
-	0x80d6, 0x80d5, 0x80d4, 0x80d3, 0x80d2, 0x80d1, 0x79ce, 0x78cd,
-	0x80cc, 0x80cb, 0x80ca, 0x80c9, 0x80c7, 0x80c6, 0x77c5, 0x76c3,
-	0x80bc, 0x80ba, 0x75b9, 0x80b6, 0x74b5, 0x73b4, 0x72b3, 0x80b2,
-	0x80b1, 0x80ae, 0x71ad, 0x80ac, 0x70ab, 0x6faa, 0x6ea9, 0x80a7,
-	0x6da6, 0x6ca5, 0x6ba3, 0x6a9f, 0x699e, 0x689d, 0x809b, 0x8098,
-	0x6797, 0x6690, 0x658f, 0x6488, 0x6384, 0x6282, 0x8081, 0x8080,
-	0x617c, 0x607a, 0x8079, 0x5f76, 0x8075, 0x8074, 0x8073, 0x8072,
-	0x8071, 0x806e, 0x5e6d, 0x806c, 0x5d6b, 0x5c6a, 0x5b69, 0x8067,
-	0x5a66, 0x5965, 0x5863, 0x575c, 0x565a, 0x5559, 0x8056, 0x8055,
-	0x5454, 0x5353, 0x5252, 0x5151, 0x504e, 0x4f4d, 0x804c, 0x804b,
-	0x4e4a, 0x4d49, 0x8047, 0x4c46, 0x8045, 0x8043, 0x803c, 0x803a,
-	0x8039, 0x8036, 0x4b35, 0x8034, 0x4a33, 0x4932, 0x4831, 0x802e,
-	0x472d, 0x462c, 0x452b, 0x442a, 0x4329, 0x4227, 0x8026, 0x8025,
-	0x4123, 0x401f, 0x3f1e, 0x3e1d, 0x3d1b, 0x3c18, 0x8017, 0x8010,
-	0x3b0f, 0x3a08, 0x8004, 0x3902, 0x8001, 0x8000, 0x8000, 0x3800,
-	0x3700, 0x3600, 0x8000, 0x3500, 0x8000, 0x8000, 0x8000, 0x3400,
-	0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x3300, 0x3200,
-	0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x3100, 0x3000,
-	0x8000, 0x8000, 0x2f00, 0x8000, 0x2e00, 0x2d00, 0x2c00, 0x8000,
-	0x8000, 0x8000, 0x2b00, 0x8000, 0x2a00, 0x2900, 0x2800, 0x8000,
-	0x2700, 0x2600, 0x2500, 0x2400, 0x2300, 0x2200, 0x8000, 0x8000,
-	0x2100, 0x2000, 0x1f00, 0x1e00, 0x1d00, 0x1c00, 0x8000, 0x8000,
-	0x1b00, 0x1a00, 0x8000, 0x1900, 0x8000, 0x8000, 0x8000, 0x8000,
-	0x8000, 0x8000, 0x1800, 0x8000, 0x1700, 0x1600, 0x1500, 0x8000,
-	0x1400, 0x1300, 0x1200, 0x1100, 0x1000, 0x0f00, 0x8000, 0x8000,
-	0x0e00, 0x0d00, 0x0c00, 0x0b00, 0x0a00, 0x0900, 0x8000, 0x8000,
-	0x0800, 0x0700, 0x8000, 0x0600, 0x8000, 0x8000, 0x8000, 0x0500,
-	0x0400, 0x0300, 0x8000, 0x0200, 0x8000, 0x8000, 0x8000, 0x0100,
-	0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x0000, 0x8000,
-	0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
-	0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x2071,
-	0x189c, 0x7003, 0x0002, 0x9006, 0x7016, 0x701a, 0x704a, 0x704e,
-	0x700e, 0x7042, 0x7046, 0x703b, 0x18b8, 0x703f, 0x18b8, 0x7007,
-	0x0001, 0x080c, 0x1048, 0x090c, 0x0d65, 0x2900, 0x706a, 0xa867,
-	0x0002, 0xa8ab, 0xdcb0, 0x080c, 0x1048, 0x090c, 0x0d65, 0x2900,
-	0x706e, 0xa867, 0x0002, 0xa8ab, 0xdcb0, 0x0005, 0x2071, 0x189c,
-	0x7004, 0x0002, 0x32ce, 0x32cf, 0x32e2, 0x32f6, 0x0005, 0x1004,
-	0x32df, 0x0e04, 0x32df, 0x2079, 0x0000, 0x0126, 0x2091, 0x8000,
-	0x700c, 0x9005, 0x1128, 0x700f, 0x0001, 0x012e, 0x0468, 0x0005,
-	0x012e, 0x0ce8, 0x2079, 0x0000, 0x2061, 0x18b6, 0x2c4c, 0xa86c,
-	0x908e, 0x0100, 0x0128, 0x9086, 0x0200, 0x0904, 0x33ca, 0x0005,
-	0x7018, 0x2048, 0x2061, 0x1800, 0x701c, 0x0807, 0x7014, 0x2048,
-	0xa864, 0x9094, 0x00ff, 0x9296, 0x0029, 0x1120, 0xaa78, 0xd2fc,
-	0x0128, 0x0005, 0x9086, 0x0103, 0x0108, 0x0005, 0x2079, 0x0000,
-	0x2061, 0x1800, 0x701c, 0x0807, 0x2061, 0x1800, 0x7880, 0x908a,
-	0x0040, 0x1210, 0x61cc, 0x0042, 0x2100, 0x908a, 0x003f, 0x1a04,
-	0x33c7, 0x61cc, 0x0804, 0x335c, 0x339e, 0x33d6, 0x33c7, 0x33e0,
-	0x33ea, 0x33f0, 0x33f4, 0x3404, 0x3408, 0x341e, 0x3424, 0x342a,
-	0x3435, 0x3440, 0x344f, 0x345e, 0x346c, 0x3483, 0x349e, 0x33c7,
-	0x3547, 0x3585, 0x362a, 0x363b, 0x365e, 0x33c7, 0x33c7, 0x33c7,
-	0x3696, 0x36b6, 0x36bf, 0x36eb, 0x36f1, 0x33c7, 0x3737, 0x33c7,
-	0x33c7, 0x33c7, 0x33c7, 0x33c7, 0x3742, 0x374b, 0x3753, 0x3755,
-	0x33c7, 0x33c7, 0x33c7, 0x33c7, 0x33c7, 0x33c7, 0x3785, 0x33c7,
-	0x33c7, 0x33c7, 0x33c7, 0x33c7, 0x37a2, 0x37fd, 0x33c7, 0x33c7,
-	0x33c7, 0x33c7, 0x33c7, 0x33c7, 0x0002, 0x3827, 0x382a, 0x3889,
-	0x38a2, 0x38d2, 0x3b74, 0x33c7, 0x4f79, 0x33c7, 0x33c7, 0x33c7,
-	0x33c7, 0x33c7, 0x33c7, 0x33c7, 0x33c7, 0x341e, 0x3424, 0x4073,
-	0x53cc, 0x4089, 0x5008, 0x5059, 0x515c, 0x33c7, 0x51be, 0x51fa,
-	0x522b, 0x5337, 0x5258, 0x52b7, 0x33c7, 0x408d, 0x421d, 0x4233,
-	0x4258, 0x42bd, 0x4331, 0x4351, 0x43c8, 0x4424, 0x4480, 0x4483,
-	0x44a8, 0x451b, 0x4585, 0x458d, 0x46bf, 0x4824, 0x4858, 0x4aa2,
-	0x33c7, 0x4ac0, 0x4b7c, 0x4c52, 0x33c7, 0x33c7, 0x33c7, 0x33c7,
-	0x4cb8, 0x4cd3, 0x458d, 0x4f19, 0x714c, 0x0000, 0x2021, 0x4000,
-	0x080c, 0x48d6, 0x0126, 0x2091, 0x8000, 0x0e04, 0x33a8, 0x0010,
-	0x012e, 0x0cc0, 0x7c36, 0x9486, 0x4000, 0x0118, 0x7833, 0x0011,
-	0x0010, 0x7833, 0x0010, 0x7c82, 0x7986, 0x7a8a, 0x7b8e, 0x2091,
-	0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11d6, 0x7007,
-	0x0001, 0x2091, 0x5000, 0x700f, 0x0000, 0x012e, 0x0005, 0x2021,
-	0x4001, 0x08b0, 0x2021, 0x4002, 0x0898, 0x2021, 0x4003, 0x0880,
-	0x2021, 0x4005, 0x0868, 0x2021, 0x4006, 0x0850, 0x2039, 0x0001,
-	0x902e, 0x2520, 0x7b88, 0x7a8c, 0x7884, 0x7990, 0x0804, 0x48e3,
-	0x2039, 0x0001, 0x902e, 0x2520, 0x7b88, 0x7a8c, 0x7884, 0x7990,
-	0x0804, 0x48e6, 0x7984, 0x7888, 0x2114, 0x200a, 0x0804, 0x339e,
-	0x7984, 0x2114, 0x0804, 0x339e, 0x20e1, 0x0000, 0x2099, 0x0021,
-	0x20e9, 0x0000, 0x20a1, 0x0021, 0x20a9, 0x001f, 0x4003, 0x7984,
-	0x7a88, 0x7b8c, 0x0804, 0x339e, 0x7884, 0x2060, 0x0804, 0x3451,
-	0x2009, 0x0003, 0x2011, 0x0003, 0x2019, 0x0002, 0x789b, 0x0317,
-	0x7893, 0xffff, 0x2001, 0x188d, 0x2004, 0x9005, 0x0118, 0x7896,
-	0x0804, 0x339e, 0x7897, 0x0001, 0x0804, 0x339e, 0x2039, 0x0001,
-	0x7d98, 0x7c9c, 0x0804, 0x33da, 0x2039, 0x0001, 0x7d98, 0x7c9c,
-	0x0804, 0x33e4, 0x79a0, 0x9182, 0x0040, 0x0210, 0x0804, 0x33d3,
-	0x2138, 0x7d98, 0x7c9c, 0x0804, 0x33da, 0x79a0, 0x9182, 0x0040,
-	0x0210, 0x0804, 0x33d3, 0x2138, 0x7d98, 0x7c9c, 0x0804, 0x33e4,
-	0x79a0, 0x9182, 0x0040, 0x0210, 0x0804, 0x33d3, 0x21e8, 0x7984,
-	0x7888, 0x20a9, 0x0001, 0x21a0, 0x4004, 0x0804, 0x339e, 0x2061,
-	0x0800, 0xe10c, 0x9006, 0x2c15, 0x9200, 0x8c60, 0x8109, 0x1dd8,
-	0x2010, 0x9005, 0x0904, 0x339e, 0x0804, 0x33cd, 0x79a0, 0x9182,
-	0x0040, 0x0210, 0x0804, 0x33d3, 0x21e0, 0x20a9, 0x0001, 0x7984,
-	0x2198, 0x4012, 0x0804, 0x339e, 0x2069, 0x185b, 0x7884, 0x7990,
-	0x911a, 0x1a04, 0x33d3, 0x8019, 0x0904, 0x33d3, 0x684a, 0x6942,
-	0x788c, 0x6852, 0x7888, 0x6856, 0x9006, 0x685a, 0x685e, 0x080c,
-	0x73ea, 0x0804, 0x339e, 0x2069, 0x185b, 0x7884, 0x7994, 0x911a,
-	0x1a04, 0x33d3, 0x8019, 0x0904, 0x33d3, 0x684e, 0x6946, 0x788c,
-	0x6862, 0x7888, 0x6866, 0x9006, 0x686a, 0x686e, 0x0126, 0x2091,
-	0x8000, 0x080c, 0x6788, 0x012e, 0x0804, 0x339e, 0x902e, 0x2520,
-	0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x33d0, 0x7984, 0x7b88,
-	0x7a8c, 0x20a9, 0x0005, 0x20e9, 0x0001, 0x20a1, 0x18a4, 0x4101,
-	0x080c, 0x489a, 0x1120, 0x2009, 0x0002, 0x0804, 0x33d0, 0x2009,
-	0x0020, 0xa85c, 0x9080, 0x0019, 0xaf60, 0x080c, 0x48e3, 0x701f,
-	0x34c2, 0x0005, 0xa864, 0x2008, 0x9084, 0x00ff, 0x9096, 0x0011,
-	0x0168, 0x9096, 0x0019, 0x0150, 0x9096, 0x0015, 0x0138, 0x9096,
-	0x0048, 0x0120, 0x9096, 0x0029, 0x1904, 0x33d0, 0x810f, 0x918c,
-	0x00ff, 0x0904, 0x33d0, 0x7112, 0x7010, 0x8001, 0x0560, 0x7012,
-	0x080c, 0x489a, 0x1120, 0x2009, 0x0002, 0x0804, 0x33d0, 0x2009,
-	0x0020, 0x7068, 0x2040, 0xa28c, 0xa390, 0xa494, 0xa598, 0x9290,
-	0x0040, 0x9399, 0x0000, 0x94a1, 0x0000, 0x95a9, 0x0000, 0xa85c,
-	0x9080, 0x0019, 0xaf60, 0x080c, 0x48e3, 0x701f, 0x3500, 0x0005,
-	0xa864, 0x9084, 0x00ff, 0x9096, 0x0002, 0x0120, 0x9096, 0x000a,
-	0x1904, 0x33d0, 0x0888, 0x7014, 0x2048, 0xa868, 0xc0fd, 0xa86a,
-	0xa864, 0x9084, 0x00ff, 0x9096, 0x0029, 0x1160, 0xc2fd, 0xaa7a,
-	0x080c, 0x5dff, 0x0150, 0x0126, 0x2091, 0x8000, 0xa87a, 0xa982,
-	0x012e, 0x0050, 0x080c, 0x611a, 0x1128, 0x7007, 0x0003, 0x701f,
-	0x352c, 0x0005, 0x080c, 0x6bc6, 0x0126, 0x2091, 0x8000, 0x20a9,
-	0x0005, 0x20e1, 0x0001, 0x2099, 0x18a4, 0x400a, 0x2100, 0x9210,
-	0x9399, 0x0000, 0x94a1, 0x0000, 0x95a9, 0x0000, 0xa85c, 0x9080,
-	0x0019, 0x2009, 0x0020, 0x012e, 0xaf60, 0x0804, 0x48e6, 0x2091,
-	0x8000, 0x7837, 0x4000, 0x7833, 0x0010, 0x7883, 0x4000, 0x7887,
-	0x4953, 0x788b, 0x5020, 0x788f, 0x2020, 0x2009, 0x017f, 0x2104,
-	0x7892, 0x3f00, 0x7896, 0x2061, 0x0100, 0x6200, 0x2061, 0x0200,
-	0x603c, 0x8007, 0x9205, 0x789a, 0x2009, 0x04fd, 0x2104, 0x789e,
-	0x2091, 0x5000, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084,
-	0x0180, 0x2001, 0x19fa, 0x2004, 0x9005, 0x0128, 0x2001, 0x008b,
-	0x2004, 0xd0fc, 0x0dd8, 0x2001, 0x008a, 0x2003, 0x0002, 0x2003,
-	0x1001, 0x2071, 0x0080, 0x0804, 0x0427, 0x81ff, 0x1904, 0x33d0,
-	0x7984, 0x080c, 0x628f, 0x1904, 0x33d3, 0x7e98, 0x9684, 0x3fff,
-	0x9082, 0x4000, 0x1a04, 0x33d3, 0x7c88, 0x7d8c, 0x080c, 0x64c5,
-	0x080c, 0x6452, 0x1518, 0x2061, 0x1ddc, 0x0126, 0x2091, 0x8000,
-	0x6000, 0x9086, 0x0000, 0x0148, 0x6014, 0x904d, 0x0130, 0xa86c,
-	0x9406, 0x1118, 0xa870, 0x9506, 0x0150, 0x012e, 0x9ce0, 0x001c,
-	0x2001, 0x1819, 0x2004, 0x9c02, 0x1a04, 0x33d0, 0x0c30, 0x080c,
-	0xb45e, 0x012e, 0x0904, 0x33d0, 0x0804, 0x339e, 0x900e, 0x2001,
-	0x0005, 0x080c, 0x6bc6, 0x0126, 0x2091, 0x8000, 0x080c, 0xbb79,
-	0x080c, 0x69b5, 0x012e, 0x0804, 0x339e, 0x00a6, 0x2950, 0xb198,
-	0x080c, 0x628f, 0x1904, 0x3617, 0xb6a4, 0x9684, 0x3fff, 0x9082,
-	0x4000, 0x16e8, 0xb49c, 0xb5a0, 0x080c, 0x64c5, 0x080c, 0x646f,
-	0x1520, 0x2061, 0x1ddc, 0x0126, 0x2091, 0x8000, 0x6000, 0x9086,
-	0x0000, 0x0148, 0x6014, 0x904d, 0x0130, 0xa86c, 0x9406, 0x1118,
-	0xa870, 0x9506, 0x0158, 0x012e, 0x9ce0, 0x001c, 0x2001, 0x1819,
-	0x2004, 0x9c02, 0x2009, 0x000d, 0x12b0, 0x0c28, 0x080c, 0xb45e,
-	0x012e, 0x2009, 0x0003, 0x0178, 0x00e0, 0x900e, 0x2001, 0x0005,
-	0x080c, 0x6bc6, 0x0126, 0x2091, 0x8000, 0x080c, 0xbb79, 0x080c,
-	0x69a9, 0x012e, 0x0070, 0xb097, 0x4005, 0xb19a, 0x0010, 0xb097,
-	0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x2a48, 0x00ae,
-	0x0005, 0xb097, 0x4000, 0x9006, 0x918d, 0x0001, 0x2008, 0x2a48,
-	0x00ae, 0x0005, 0x81ff, 0x1904, 0x33d0, 0x080c, 0x48b1, 0x0904,
-	0x33d3, 0x080c, 0x6356, 0x0904, 0x33d0, 0x080c, 0x64cb, 0x0904,
-	0x33d0, 0x0804, 0x4348, 0x81ff, 0x1904, 0x33d0, 0x080c, 0x48cd,
-	0x0904, 0x33d3, 0x080c, 0x6559, 0x0904, 0x33d0, 0x2019, 0x0005,
-	0x79a8, 0x080c, 0x64e6, 0x0904, 0x33d0, 0x7888, 0x908a, 0x1000,
-	0x1a04, 0x33d3, 0x8003, 0x800b, 0x810b, 0x9108, 0x080c, 0x817a,
-	0x7984, 0xd184, 0x1904, 0x339e, 0x0804, 0x4348, 0x0126, 0x2091,
-	0x8000, 0x81ff, 0x0118, 0x2009, 0x0001, 0x0450, 0x2029, 0x07ff,
-	0x6458, 0x2400, 0x9506, 0x01f8, 0x2508, 0x080c, 0x628f, 0x11d8,
-	0x080c, 0x6559, 0x1128, 0x2009, 0x0002, 0x62bc, 0x2518, 0x00c0,
-	0x2019, 0x0004, 0x900e, 0x080c, 0x64e6, 0x1118, 0x2009, 0x0006,
-	0x0078, 0x7884, 0x908a, 0x1000, 0x1270, 0x8003, 0x800b, 0x810b,
-	0x9108, 0x080c, 0x817a, 0x8529, 0x1ae0, 0x012e, 0x0804, 0x339e,
-	0x012e, 0x0804, 0x33d0, 0x012e, 0x0804, 0x33d3, 0x080c, 0x48b1,
-	0x0904, 0x33d3, 0x080c, 0x6356, 0x0904, 0x33d0, 0x080c, 0x98c7,
-	0xbaa0, 0x2019, 0x0005, 0x00c6, 0x9066, 0x080c, 0x8658, 0x0076,
-	0x903e, 0x080c, 0x853d, 0x900e, 0x080c, 0xd011, 0x007e, 0x00ce,
-	0x080c, 0x98e3, 0x080c, 0x64c5, 0x0804, 0x339e, 0x080c, 0x48b1,
-	0x0904, 0x33d3, 0x080c, 0x64c5, 0x2208, 0x0804, 0x339e, 0x0156,
-	0x00d6, 0x00e6, 0x00c6, 0x2069, 0x190e, 0x6810, 0x6914, 0x910a,
-	0x1208, 0x900e, 0x6816, 0x9016, 0x901e, 0x2071, 0x19bf, 0x7028,
-	0x9065, 0x0118, 0x8210, 0x600c, 0x0cd8, 0x2300, 0x9218, 0x00ce,
-	0x00ee, 0x00de, 0x015e, 0x0804, 0x339e, 0x00f6, 0x0016, 0x907d,
-	0x0138, 0x9006, 0x8000, 0x2f0c, 0x81ff, 0x0110, 0x2178, 0x0cd0,
-	0x001e, 0x00fe, 0x0005, 0x2069, 0x190e, 0x6910, 0x62b8, 0x0804,
-	0x339e, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x33d0, 0x0126,
-	0x2091, 0x8000, 0x080c, 0x53bc, 0x0128, 0x2009, 0x0007, 0x012e,
-	0x0804, 0x33d0, 0x012e, 0x6158, 0x9190, 0x319f, 0x2215, 0x9294,
-	0x00ff, 0x6378, 0x83ff, 0x0108, 0x627c, 0x67d8, 0x97c4, 0x000a,
-	0x98c6, 0x000a, 0x1118, 0x2031, 0x0001, 0x00e8, 0x97c4, 0x0022,
-	0x98c6, 0x0022, 0x1118, 0x2031, 0x0003, 0x00a8, 0x97c4, 0x0012,
-	0x98c6, 0x0012, 0x1118, 0x2031, 0x0002, 0x0068, 0x080c, 0x70ba,
-	0x1118, 0x2031, 0x0004, 0x0038, 0xd79c, 0x0120, 0x2009, 0x0005,
-	0x0804, 0x33d0, 0x9036, 0x7e9a, 0x7f9e, 0x0804, 0x339e, 0x6148,
-	0x624c, 0x2019, 0x195e, 0x231c, 0x2001, 0x195f, 0x2004, 0x789a,
-	0x0804, 0x339e, 0x0126, 0x2091, 0x8000, 0x6138, 0x623c, 0x6340,
-	0x012e, 0x0804, 0x339e, 0x080c, 0x48cd, 0x0904, 0x33d3, 0xba44,
-	0xbb38, 0x0804, 0x339e, 0x080c, 0x0d65, 0x080c, 0x48cd, 0x2110,
-	0x0904, 0x33d3, 0xb804, 0x908c, 0x00ff, 0x918e, 0x0006, 0x0140,
-	0x9084, 0xff00, 0x9086, 0x0600, 0x2009, 0x0009, 0x1904, 0x33d0,
-	0x0126, 0x2091, 0x8000, 0x2019, 0x0005, 0x00c6, 0x9066, 0x080c,
-	0x98c7, 0x080c, 0x94e5, 0x080c, 0x8658, 0x0076, 0x903e, 0x080c,
-	0x853d, 0x900e, 0x080c, 0xd011, 0x007e, 0x00ce, 0x080c, 0x98e3,
-	0xb807, 0x0407, 0x012e, 0x0804, 0x339e, 0x6148, 0x624c, 0x7884,
-	0x604a, 0x7b88, 0x634e, 0x2069, 0x185b, 0x831f, 0x9305, 0x6816,
-	0x788c, 0x2069, 0x195e, 0x2d1c, 0x206a, 0x7e98, 0x9682, 0x0014,
-	0x1210, 0x2031, 0x07d0, 0x2069, 0x195f, 0x2d04, 0x266a, 0x789a,
-	0x0804, 0x339e, 0x0126, 0x2091, 0x8000, 0x6138, 0x7884, 0x603a,
-	0x910e, 0xd1b4, 0x190c, 0x0ec1, 0xd0c4, 0x01a8, 0x00d6, 0x78a8,
-	0x2009, 0x1975, 0x200a, 0x78ac, 0x2011, 0x1976, 0x2012, 0x2069,
-	0x0100, 0x6838, 0x9086, 0x0007, 0x1118, 0x2214, 0x6a5a, 0x0010,
-	0x210c, 0x695a, 0x00de, 0x7888, 0x603e, 0x2011, 0x0116, 0x220c,
-	0x7888, 0xd08c, 0x0118, 0x918d, 0x0040, 0x0010, 0x918c, 0xff7f,
-	0x2112, 0x6140, 0x788c, 0x6042, 0x910e, 0xd1e4, 0x190c, 0x0edc,
-	0x6040, 0xd0cc, 0x0120, 0x78b0, 0x2011, 0x0114, 0x2012, 0x012e,
-	0x0804, 0x339e, 0x00f6, 0x2079, 0x1800, 0x7a38, 0xa898, 0x9084,
-	0xfebf, 0x9215, 0xa89c, 0x9084, 0xfebf, 0x8002, 0x9214, 0x7838,
-	0x9084, 0x0140, 0x9215, 0x7a3a, 0xa897, 0x4000, 0x900e, 0x9085,
-	0x0001, 0x2001, 0x0000, 0x00fe, 0x0005, 0x7898, 0x9005, 0x01a8,
-	0x7888, 0x9025, 0x0904, 0x33d3, 0x788c, 0x902d, 0x0904, 0x33d3,
-	0x900e, 0x080c, 0x628f, 0x1120, 0xba44, 0xbb38, 0xbc46, 0xbd3a,
-	0x9186, 0x07ff, 0x0190, 0x8108, 0x0ca0, 0x080c, 0x48cd, 0x0904,
-	0x33d3, 0x7888, 0x900d, 0x0904, 0x33d3, 0x788c, 0x9005, 0x0904,
-	0x33d3, 0xba44, 0xb946, 0xbb38, 0xb83a, 0x0804, 0x339e, 0x2011,
-	0xbc09, 0x0010, 0x2011, 0xbc05, 0x080c, 0x53bc, 0x1904, 0x33d0,
-	0x00c6, 0x2061, 0x0100, 0x7984, 0x9186, 0x00ff, 0x1130, 0x2001,
-	0x1817, 0x2004, 0x9085, 0xff00, 0x0088, 0x9182, 0x007f, 0x16e0,
-	0x9188, 0x319f, 0x210d, 0x918c, 0x00ff, 0x2001, 0x1817, 0x2004,
-	0x0026, 0x9116, 0x002e, 0x0580, 0x810f, 0x9105, 0x0126, 0x2091,
-	0x8000, 0x0006, 0x080c, 0x9b90, 0x000e, 0x0510, 0x602e, 0x620a,
-	0x7984, 0x00b6, 0x080c, 0x6235, 0x2b08, 0x00be, 0x1500, 0x6112,
-	0x6023, 0x0001, 0x080c, 0x489a, 0x01d0, 0x9006, 0xa866, 0x7007,
-	0x0003, 0xa832, 0xa868, 0xc0fd, 0xa86a, 0x701f, 0x3882, 0x2900,
-	0x6016, 0x2009, 0x0032, 0x080c, 0x9c82, 0x012e, 0x00ce, 0x0005,
-	0x012e, 0x00ce, 0x0804, 0x33d0, 0x00ce, 0x0804, 0x33d3, 0x080c,
-	0x9be6, 0x0cb0, 0xa830, 0x9086, 0x0100, 0x0904, 0x33d0, 0x0804,
-	0x339e, 0x2061, 0x1a46, 0x0126, 0x2091, 0x8000, 0x6000, 0xd084,
-	0x0170, 0x6104, 0x6208, 0x2061, 0x1800, 0x6350, 0x6070, 0x789a,
-	0x60bc, 0x789e, 0x60b8, 0x78aa, 0x012e, 0x0804, 0x339e, 0x900e,
-	0x2110, 0x0c88, 0x81ff, 0x1904, 0x33d0, 0x080c, 0x70ba, 0x0904,
-	0x33d0, 0x0126, 0x2091, 0x8000, 0x6250, 0x6070, 0x9202, 0x0248,
-	0x9085, 0x0001, 0x080c, 0x24c2, 0x080c, 0x55d6, 0x012e, 0x0804,
-	0x339e, 0x012e, 0x0804, 0x33d3, 0x0006, 0x0016, 0x00c6, 0x00e6,
-	0x2001, 0x1981, 0x2070, 0x2061, 0x185b, 0x6008, 0x2072, 0x900e,
-	0x2011, 0x1400, 0x080c, 0x842f, 0x7206, 0x00ee, 0x00ce, 0x001e,
-	0x000e, 0x0005, 0x0126, 0x2091, 0x8000, 0x81ff, 0x0128, 0x012e,
-	0x2021, 0x400b, 0x0804, 0x33a0, 0x7884, 0xd0fc, 0x0148, 0x2001,
-	0x002a, 0x2004, 0x9082, 0x00e1, 0x0288, 0x012e, 0x0804, 0x33d3,
-	0x2001, 0x002a, 0x2004, 0x2069, 0x185b, 0x6908, 0x9102, 0x1230,
-	0x012e, 0x0804, 0x33d3, 0x012e, 0x0804, 0x33d0, 0x080c, 0x9b65,
-	0x0dd0, 0x7884, 0xd0fc, 0x0904, 0x394d, 0x00c6, 0x080c, 0x489a,
-	0x00ce, 0x0d88, 0xa867, 0x0000, 0x7884, 0xa80a, 0x7898, 0xa80e,
-	0x789c, 0xa812, 0x2001, 0x002e, 0x2004, 0xa81a, 0x2001, 0x002f,
-	0x2004, 0xa81e, 0x2001, 0x0030, 0x2004, 0xa822, 0x2001, 0x0031,
-	0x2004, 0xa826, 0x2001, 0x0034, 0x2004, 0xa82a, 0x2001, 0x0035,
-	0x2004, 0xa82e, 0x2001, 0x002a, 0x2004, 0x9080, 0x0003, 0x9084,
-	0x00fc, 0x8004, 0xa816, 0x080c, 0x3ad7, 0x0928, 0x7014, 0x2048,
-	0xad2c, 0xac28, 0xab1c, 0xaa18, 0xa930, 0xa808, 0xd0b4, 0x1120,
-	0x2029, 0x0000, 0x2021, 0x0000, 0x8906, 0x8006, 0x8007, 0x90bc,
-	0x003f, 0x9084, 0xffc0, 0x9080, 0x001b, 0x080c, 0x48e3, 0x701f,
-	0x3a14, 0x7023, 0x0001, 0x012e, 0x0005, 0x080c, 0x98c7, 0x0046,
-	0x0086, 0x0096, 0x00a6, 0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6,
-	0x080c, 0x38bc, 0x2001, 0x1977, 0x2003, 0x0000, 0x2021, 0x000a,
-	0x2061, 0x0100, 0x6104, 0x0016, 0x60bb, 0x0000, 0x60bf, 0x32e1,
-	0x60bf, 0x0012, 0x080c, 0x3b46, 0x080c, 0x3b05, 0x00f6, 0x00e6,
-	0x0086, 0x2940, 0x2071, 0x19bf, 0x2079, 0x0090, 0x00d6, 0x2069,
-	0x0000, 0x6884, 0xd0b4, 0x0140, 0x2001, 0x0035, 0x2004, 0x780e,
-	0x2001, 0x0034, 0x2004, 0x780a, 0x00de, 0x2011, 0x0001, 0x080c,
-	0x3eb7, 0x008e, 0x00ee, 0x00fe, 0x080c, 0x3de4, 0x080c, 0x3d11,
-	0x05b8, 0x2001, 0x020b, 0x2004, 0x9084, 0x0140, 0x1db8, 0x080c,
-	0x3f2b, 0x00f6, 0x2079, 0x0300, 0x78bc, 0x00fe, 0x908c, 0x0070,
-	0x1560, 0x2071, 0x0200, 0x7037, 0x0000, 0x7050, 0x9084, 0xff00,
-	0x9086, 0x3200, 0x1510, 0x7037, 0x0001, 0x7050, 0x9084, 0xff00,
-	0x9086, 0xe100, 0x11d0, 0x7037, 0x0000, 0x7054, 0x7037, 0x0000,
-	0x715c, 0x9106, 0x1190, 0x2001, 0x181f, 0x2004, 0x9106, 0x1168,
-	0x00c6, 0x2061, 0x0100, 0x6024, 0x9084, 0x1e00, 0x00ce, 0x0138,
-	0x080c, 0x3d1b, 0x080c, 0x3b00, 0x0058, 0x080c, 0x3b00, 0x080c,
-	0x3e4f, 0x080c, 0x3dda, 0x2001, 0x020b, 0x2004, 0xd0e4, 0x0dd8,
-	0x2001, 0x032a, 0x2003, 0x0004, 0x2061, 0x0100, 0x6027, 0x0002,
-	0x001e, 0x6106, 0x2011, 0x020d, 0x2013, 0x0020, 0x60bb, 0x0000,
-	0x60bf, 0x0108, 0x60bf, 0x0012, 0x2001, 0x0004, 0x200c, 0x918c,
-	0xfffd, 0x2102, 0x080c, 0x12ee, 0x2009, 0x0028, 0x080c, 0x207b,
-	0x2001, 0x0227, 0x200c, 0x2102, 0x080c, 0x98e3, 0x00fe, 0x00ee,
-	0x00de, 0x00ce, 0x00be, 0x00ae, 0x009e, 0x008e, 0x004e, 0x2001,
-	0x1977, 0x2004, 0x9005, 0x1118, 0x012e, 0x0804, 0x339e, 0x012e,
-	0x2021, 0x400c, 0x0804, 0x33a0, 0x0016, 0x0026, 0x0036, 0x0046,
-	0x0056, 0x0076, 0x0086, 0x0096, 0x00d6, 0x0156, 0x7014, 0x2048,
-	0x7020, 0x20a8, 0x8000, 0x7022, 0xa804, 0x9005, 0x0904, 0x3a70,
-	0x2048, 0x1f04, 0x3a24, 0x7068, 0x2040, 0xa28c, 0xa390, 0xa494,
-	0xa598, 0xa930, 0xa808, 0xd0b4, 0x1120, 0x2029, 0x0000, 0x2021,
-	0x0000, 0x0096, 0x7014, 0x2048, 0xa864, 0x009e, 0x9086, 0x0103,
-	0x0170, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0,
-	0x9080, 0x001b, 0x080c, 0x48e3, 0x701f, 0x3a14, 0x00b0, 0x8906,
-	0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x001b,
-	0x21a8, 0x27e0, 0x2098, 0x27e8, 0x20a0, 0x0006, 0x080c, 0x0fac,
-	0x000e, 0x080c, 0x48e6, 0x701f, 0x3a14, 0x015e, 0x00de, 0x009e,
-	0x008e, 0x007e, 0x005e, 0x004e, 0x003e, 0x002e, 0x001e, 0x0005,
-	0x7014, 0x2048, 0xa864, 0x9086, 0x0103, 0x1118, 0x701f, 0x3ad5,
-	0x0450, 0x7014, 0x2048, 0xa868, 0xc0fd, 0xa86a, 0x2009, 0x007f,
-	0x080c, 0x622f, 0x0110, 0x9006, 0x0030, 0xb813, 0x00ff, 0xb817,
-	0xfffd, 0x080c, 0xbd58, 0x015e, 0x00de, 0x009e, 0x008e, 0x007e,
-	0x005e, 0x004e, 0x003e, 0x002e, 0x001e, 0x0904, 0x33d0, 0x0016,
-	0x0026, 0x0036, 0x0046, 0x0056, 0x0076, 0x0086, 0x0096, 0x00d6,
-	0x0156, 0x701f, 0x3aa7, 0x7007, 0x0003, 0x0804, 0x3a65, 0xa830,
-	0x9086, 0x0100, 0x2021, 0x400c, 0x0904, 0x33a0, 0x0076, 0xad10,
-	0xac0c, 0xab24, 0xaa20, 0xa930, 0xa808, 0xd0b4, 0x1120, 0x2029,
-	0x0000, 0x2021, 0x0000, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f,
-	0x9084, 0xffc0, 0x9080, 0x001b, 0x21a8, 0x27e0, 0x2098, 0x27e8,
-	0x20a0, 0x0006, 0x080c, 0x0fac, 0x000e, 0x080c, 0x48e6, 0x007e,
-	0x701f, 0x3a14, 0x7023, 0x0001, 0x0005, 0x0804, 0x339e, 0x0156,
-	0x00c6, 0xa814, 0x908a, 0x001e, 0x0218, 0xa833, 0x001e, 0x0010,
-	0xa832, 0x0078, 0x81ff, 0x0168, 0x0016, 0x080c, 0x489a, 0x001e,
-	0x0130, 0xa800, 0x2040, 0xa008, 0xa80a, 0x2100, 0x0c58, 0x9006,
-	0x0010, 0x9085, 0x0001, 0x00ce, 0x015e, 0x0005, 0x0006, 0x00f6,
-	0x2079, 0x0000, 0x7880, 0x9086, 0x0044, 0x00fe, 0x000e, 0x0005,
-	0x2001, 0x1977, 0x2003, 0x0001, 0x0005, 0x00f6, 0x00e6, 0x00c6,
-	0x2061, 0x0200, 0x2001, 0x1982, 0x2004, 0x601a, 0x2061, 0x0100,
-	0x2001, 0x1981, 0x2004, 0x60ce, 0x6104, 0xc1ac, 0x6106, 0x080c,
-	0x489a, 0xa813, 0x0019, 0xa817, 0x0001, 0x2900, 0xa85a, 0x2001,
-	0x002e, 0x2004, 0xa866, 0x2001, 0x002f, 0x2004, 0xa86a, 0x2061,
-	0x0090, 0x2079, 0x0100, 0x2001, 0x1981, 0x2004, 0x6036, 0x2009,
-	0x0040, 0x080c, 0x207b, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8,
-	0xa86e, 0x601a, 0xa873, 0x0000, 0x601f, 0x0000, 0x78ca, 0x9006,
-	0x600a, 0x600e, 0x00ce, 0x00ee, 0x00fe, 0x0005, 0x00e6, 0x080c,
-	0x489a, 0x2940, 0xa013, 0x0019, 0xa017, 0x0001, 0x2800, 0xa05a,
-	0x2001, 0x0030, 0x2004, 0xa866, 0x2001, 0x0031, 0x2004, 0xa86a,
-	0x2001, 0x002a, 0x2004, 0x9084, 0xfff8, 0xa86e, 0xa873, 0x0000,
-	0x2001, 0x032a, 0x2003, 0x0004, 0x2001, 0x0300, 0x2003, 0x0000,
-	0x2001, 0x020d, 0x2003, 0x0000, 0x2001, 0x0004, 0x200c, 0x918d,
-	0x0002, 0x2102, 0x00ee, 0x0005, 0x0126, 0x2091, 0x8000, 0x81ff,
-	0x0148, 0x080c, 0x2850, 0x1130, 0x9006, 0x080c, 0x27a3, 0x9006,
-	0x080c, 0x2786, 0x7884, 0x9084, 0x0007, 0x0002, 0x3b91, 0x3b9a,
-	0x3ba3, 0x3b8e, 0x3b8e, 0x3b8e, 0x3b8e, 0x3b8e, 0x012e, 0x0804,
-	0x33d3, 0x2009, 0x0114, 0x2104, 0x9085, 0x0800, 0x200a, 0x080c,
-	0x3d65, 0x00c0, 0x2009, 0x0114, 0x2104, 0x9085, 0x4000, 0x200a,
-	0x080c, 0x3d65, 0x0078, 0x080c, 0x70ba, 0x1128, 0x012e, 0x2009,
-	0x0016, 0x0804, 0x33d0, 0x81ff, 0x0128, 0x012e, 0x2021, 0x400b,
-	0x0804, 0x33a0, 0x080c, 0x98c7, 0x0086, 0x0096, 0x00a6, 0x00b6,
-	0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x080c, 0x38bc, 0x2009, 0x0101,
-	0x210c, 0x0016, 0x7ec8, 0x7dcc, 0x9006, 0x2068, 0x2060, 0x2058,
-	0x080c, 0x4006, 0x080c, 0x3f56, 0x903e, 0x2720, 0x00f6, 0x00e6,
-	0x0086, 0x2940, 0x2071, 0x19bf, 0x2079, 0x0090, 0x00d6, 0x2069,
-	0x0000, 0x6884, 0xd0b4, 0x0120, 0x68d4, 0x780e, 0x68d0, 0x780a,
-	0x00de, 0x2011, 0x0001, 0x080c, 0x3eb7, 0x080c, 0x2858, 0x080c,
-	0x2858, 0x080c, 0x2858, 0x080c, 0x2858, 0x080c, 0x3eb7, 0x008e,
-	0x00ee, 0x00fe, 0x080c, 0x3de4, 0x2009, 0x9c40, 0x8109, 0x11b0,
-	0x080c, 0x3d1b, 0x2001, 0x0004, 0x200c, 0x918c, 0xfffd, 0x2102,
-	0x001e, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x00ae, 0x009e,
-	0x008e, 0x2009, 0x0017, 0x080c, 0x33d0, 0x0cf8, 0x2001, 0x020b,
-	0x2004, 0x9084, 0x0140, 0x1d10, 0x00f6, 0x2079, 0x0000, 0x7884,
-	0x00fe, 0xd0bc, 0x0178, 0x2001, 0x0201, 0x200c, 0x81ff, 0x0150,
-	0x080c, 0x3dc2, 0x2d00, 0x9c05, 0x9b05, 0x0120, 0x080c, 0x3d1b,
-	0x0804, 0x3cc4, 0x080c, 0x3f2b, 0x080c, 0x3e4f, 0x080c, 0x3da5,
-	0x080c, 0x3dda, 0x00f6, 0x2079, 0x0100, 0x7824, 0xd0ac, 0x0130,
-	0x8b58, 0x080c, 0x3d1b, 0x00fe, 0x0804, 0x3cc4, 0x00fe, 0x080c,
-	0x3d11, 0x1150, 0x8d68, 0x2001, 0x0032, 0x2602, 0x2001, 0x0033,
-	0x2502, 0x080c, 0x3d1b, 0x0080, 0x87ff, 0x0138, 0x2001, 0x0201,
-	0x2004, 0x9005, 0x1908, 0x8739, 0x0038, 0x2001, 0x1a43, 0x2004,
-	0x9086, 0x0000, 0x1904, 0x3c14, 0x2001, 0x032f, 0x2003, 0x00f6,
-	0x8631, 0x1208, 0x8529, 0x2500, 0x9605, 0x0904, 0x3cc4, 0x7884,
-	0xd0bc, 0x0128, 0x2d00, 0x9c05, 0x9b05, 0x1904, 0x3cc4, 0xa013,
-	0x0019, 0x2001, 0x032a, 0x2003, 0x0004, 0x7884, 0xd0ac, 0x1148,
-	0x2001, 0x1a43, 0x2003, 0x0003, 0x2001, 0x032a, 0x2003, 0x0009,
-	0x0030, 0xa017, 0x0001, 0x78b4, 0x9005, 0x0108, 0xa016, 0x2800,
-	0xa05a, 0x2009, 0x0040, 0x080c, 0x207b, 0x2900, 0xa85a, 0xa813,
-	0x0019, 0x7884, 0xd0a4, 0x1180, 0xa817, 0x0000, 0x00c6, 0x20a9,
-	0x0004, 0x2061, 0x0090, 0x602b, 0x0008, 0x2001, 0x0203, 0x2004,
-	0x1f04, 0x3c9b, 0x00ce, 0x0030, 0xa817, 0x0001, 0x78b0, 0x9005,
-	0x0108, 0xa816, 0x00f6, 0x00c6, 0x2079, 0x0100, 0x2061, 0x0090,
-	0x7827, 0x0002, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8, 0x601a,
-	0x0006, 0x2001, 0x002b, 0x2004, 0x601e, 0x78c6, 0x000e, 0x78ca,
-	0x00ce, 0x00fe, 0x0804, 0x3bce, 0x001e, 0x00c6, 0x2001, 0x032a,
-	0x2003, 0x0004, 0x2061, 0x0100, 0x6027, 0x0002, 0x6106, 0x2011,
-	0x020d, 0x2013, 0x0020, 0x2001, 0x0004, 0x200c, 0x918c, 0xfffd,
-	0x2102, 0x080c, 0x12ee, 0x7884, 0x9084, 0x0003, 0x9086, 0x0002,
-	0x01b0, 0x2009, 0x0028, 0x080c, 0x207b, 0x2001, 0x0227, 0x200c,
-	0x2102, 0x6050, 0x9084, 0xb7ff, 0x080c, 0x2902, 0x6052, 0x602f,
-	0x0000, 0x604b, 0xf7f7, 0x6043, 0x0090, 0x6043, 0x0010, 0x080c,
-	0x98e3, 0x00ce, 0x2d08, 0x2c10, 0x2b18, 0x2b00, 0x9c05, 0x9d05,
-	0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x00ae, 0x009e, 0x008e,
-	0x1118, 0x012e, 0x0804, 0x339e, 0x012e, 0x2021, 0x400c, 0x0804,
-	0x33a0, 0x9085, 0x0001, 0x1d04, 0x3d1a, 0x2091, 0x6000, 0x8420,
-	0x9486, 0x0064, 0x0005, 0x2001, 0x0105, 0x2003, 0x0010, 0x2001,
-	0x032a, 0x2003, 0x0004, 0x2001, 0x1a43, 0x2003, 0x0000, 0x0071,
-	0x2009, 0x0048, 0x080c, 0x207b, 0x2001, 0x0227, 0x2024, 0x2402,
-	0x2001, 0x0109, 0x2003, 0x4000, 0x9026, 0x0005, 0x00f6, 0x00e6,
-	0x2071, 0x19bf, 0x7054, 0x9086, 0x0000, 0x0520, 0x2079, 0x0090,
-	0x2009, 0x0206, 0x2104, 0x2009, 0x0203, 0x210c, 0x9106, 0x1120,
-	0x2009, 0x0040, 0x080c, 0x207b, 0x782c, 0xd0fc, 0x0d88, 0x080c,
-	0x3f2b, 0x7054, 0x9086, 0x0000, 0x1d58, 0x782b, 0x0004, 0x782c,
-	0xd0ac, 0x1de8, 0x2009, 0x0040, 0x080c, 0x207b, 0x782b, 0x0002,
-	0x7057, 0x0000, 0x00ee, 0x00fe, 0x0005, 0x00f6, 0x2079, 0x0100,
-	0x2001, 0x1817, 0x200c, 0x7932, 0x7936, 0x080c, 0x24a2, 0x080c,
-	0x28cf, 0x080c, 0x2902, 0x784b, 0xf7f7, 0x7843, 0x0090, 0x7843,
-	0x0010, 0x7850, 0xc0e5, 0x7852, 0x2019, 0x61a8, 0x7820, 0xd09c,
-	0x0110, 0x8319, 0x1dd8, 0x7850, 0xc0e4, 0x7852, 0x2011, 0x0048,
-	0x080c, 0x28ac, 0x7843, 0x0040, 0x2019, 0x01f4, 0xa001, 0xa001,
-	0x8319, 0x1de0, 0x2001, 0x0100, 0x080c, 0x2872, 0x2011, 0x0020,
-	0x080c, 0x28ac, 0x7843, 0x0000, 0x9006, 0x080c, 0x2872, 0x2011,
-	0x0048, 0x080c, 0x28ac, 0x00fe, 0x0005, 0x7884, 0xd0ac, 0x11c8,
-	0x00f6, 0x00e6, 0x2071, 0x1a43, 0x2079, 0x0320, 0x2001, 0x0201,
-	0x2004, 0x9005, 0x0160, 0x7000, 0x9086, 0x0000, 0x1140, 0x0051,
-	0xd0bc, 0x0108, 0x8738, 0x7003, 0x0003, 0x782b, 0x0019, 0x00ee,
-	0x00fe, 0x0005, 0x00f6, 0x2079, 0x0300, 0x78bc, 0x00fe, 0x908c,
-	0x0070, 0x0178, 0x2009, 0x0032, 0x260a, 0x2009, 0x0033, 0x250a,
-	0xd0b4, 0x0108, 0x8c60, 0xd0ac, 0x0108, 0x8d68, 0xd0a4, 0x0108,
-	0x8b58, 0x0005, 0x00f6, 0x2079, 0x0200, 0x781c, 0xd084, 0x0110,
-	0x7837, 0x0050, 0x00fe, 0x0005, 0x00e6, 0x2071, 0x0100, 0x2001,
-	0x1982, 0x2004, 0x70e2, 0x080c, 0x3af6, 0x1188, 0x2001, 0x181f,
-	0x2004, 0x2009, 0x181e, 0x210c, 0x918c, 0x00ff, 0x706e, 0x716a,
-	0x7066, 0x918d, 0x3200, 0x7162, 0x7073, 0xe109, 0x0080, 0x702c,
-	0x9085, 0x0002, 0x702e, 0x2009, 0x1817, 0x210c, 0x716e, 0x7063,
-	0x0100, 0x7166, 0x719e, 0x706b, 0x0000, 0x7073, 0x0809, 0x7077,
-	0x0008, 0x7078, 0x9080, 0x0100, 0x707a, 0x7080, 0x8000, 0x7082,
-	0x7087, 0xaaaa, 0x9006, 0x708a, 0x708e, 0x707e, 0x70d6, 0x70ab,
-	0x0036, 0x70af, 0x95d5, 0x7014, 0x9084, 0x1984, 0x9085, 0x0092,
-	0x7016, 0x080c, 0x3f2b, 0x00f6, 0x2071, 0x1a43, 0x2079, 0x0320,
-	0x00d6, 0x2069, 0x0000, 0x6884, 0xd0b4, 0x0120, 0x689c, 0x780e,
-	0x6898, 0x780a, 0x00de, 0x2009, 0x03e8, 0x8109, 0x1df0, 0x792c,
-	0xd1fc, 0x0110, 0x782b, 0x0004, 0x2011, 0x0011, 0x080c, 0x3eb7,
-	0x2011, 0x0001, 0x080c, 0x3eb7, 0x00fe, 0x00ee, 0x0005, 0x00f6,
-	0x00e6, 0x2071, 0x1a43, 0x2079, 0x0320, 0x792c, 0xd1fc, 0x0904,
-	0x3eb4, 0x782b, 0x0002, 0x9026, 0xd19c, 0x1904, 0x3eb0, 0x7000,
-	0x0002, 0x3eb4, 0x3e65, 0x3e95, 0x3eb0, 0xd1bc, 0x1170, 0xd1dc,
-	0x1190, 0x8001, 0x7002, 0x2011, 0x0001, 0x080c, 0x3eb7, 0x0904,
-	0x3eb4, 0x080c, 0x3eb7, 0x0804, 0x3eb4, 0x00f6, 0x2079, 0x0300,
-	0x78bf, 0x0000, 0x00fe, 0x7810, 0x7914, 0x782b, 0x0004, 0x7812,
-	0x7916, 0x2001, 0x0201, 0x200c, 0x81ff, 0x0de8, 0x080c, 0x3dc2,
-	0x2009, 0x0001, 0x00f6, 0x2079, 0x0300, 0x78b8, 0x00fe, 0xd0ec,
-	0x0110, 0x2009, 0x0011, 0x792a, 0x00f8, 0x8001, 0x7002, 0x9184,
-	0x0880, 0x1140, 0x782c, 0xd0fc, 0x1904, 0x3e59, 0x2011, 0x0001,
-	0x00b1, 0x0090, 0xa010, 0x9092, 0x0004, 0x9086, 0x0015, 0x1120,
-	0xa000, 0xa05a, 0x2011, 0x0031, 0xa212, 0xd1dc, 0x1960, 0x0828,
-	0x782b, 0x0004, 0x7003, 0x0000, 0x00ee, 0x00fe, 0x0005, 0xa014,
-	0x9005, 0x0550, 0x8001, 0x0036, 0x0096, 0xa016, 0xa058, 0x2048,
-	0xa010, 0x2009, 0x0031, 0x911a, 0x831c, 0x831c, 0x938a, 0x0007,
-	0x1a0c, 0x0d65, 0x9398, 0x3ee5, 0x231d, 0x083f, 0x9080, 0x0004,
-	0x7a2a, 0x7100, 0x8108, 0x7102, 0x009e, 0x003e, 0x908a, 0x0035,
-	0x1140, 0x0096, 0xa058, 0x2048, 0xa804, 0xa05a, 0x2001, 0x0019,
-	0x009e, 0xa012, 0x9085, 0x0001, 0x0005, 0x3f22, 0x3f19, 0x3f10,
-	0x3f07, 0x3efe, 0x3ef5, 0x3eec, 0xa964, 0x7902, 0xa968, 0x7906,
-	0xa96c, 0x7912, 0xa970, 0x7916, 0x0005, 0xa974, 0x7902, 0xa978,
-	0x7906, 0xa97c, 0x7912, 0xa980, 0x7916, 0x0005, 0xa984, 0x7902,
-	0xa988, 0x7906, 0xa98c, 0x7912, 0xa990, 0x7916, 0x0005, 0xa994,
-	0x7902, 0xa998, 0x7906, 0xa99c, 0x7912, 0xa9a0, 0x7916, 0x0005,
-	0xa9a4, 0x7902, 0xa9a8, 0x7906, 0xa9ac, 0x7912, 0xa9b0, 0x7916,
-	0x0005, 0xa9b4, 0x7902, 0xa9b8, 0x7906, 0xa9bc, 0x7912, 0xa9c0,
-	0x7916, 0x0005, 0xa9c4, 0x7902, 0xa9c8, 0x7906, 0xa9cc, 0x7912,
-	0xa9d0, 0x7916, 0x0005, 0x00f6, 0x00e6, 0x0086, 0x2071, 0x19bf,
-	0x2079, 0x0090, 0x792c, 0xd1fc, 0x01e8, 0x782b, 0x0002, 0x2940,
-	0x9026, 0x7054, 0x0002, 0x3f52, 0x3f3e, 0x3f49, 0x8001, 0x7056,
-	0xd19c, 0x1180, 0x2011, 0x0001, 0x080c, 0x3eb7, 0x190c, 0x3eb7,
-	0x0048, 0x8001, 0x7056, 0x782c, 0xd0fc, 0x1d38, 0x2011, 0x0001,
-	0x080c, 0x3eb7, 0x008e, 0x00ee, 0x00fe, 0x0005, 0x00f6, 0x00e6,
-	0x00c6, 0x0086, 0x2061, 0x0200, 0x2001, 0x1982, 0x2004, 0x601a,
-	0x2061, 0x0100, 0x2001, 0x1981, 0x2004, 0x60ce, 0x6104, 0xc1ac,
-	0x6106, 0x2001, 0x002c, 0x2004, 0x9005, 0x0520, 0x2038, 0x2001,
-	0x002e, 0x2024, 0x2001, 0x002f, 0x201c, 0x080c, 0x489a, 0xa813,
-	0x0019, 0xaf16, 0x2900, 0xa85a, 0x978a, 0x0007, 0x0220, 0x2138,
-	0x2009, 0x0007, 0x0010, 0x2708, 0x903e, 0x0096, 0xa858, 0x2048,
-	0xa85c, 0x9080, 0x0019, 0x009e, 0x080c, 0x3fce, 0x1d68, 0x2900,
-	0xa85a, 0x00d0, 0x080c, 0x489a, 0xa813, 0x0019, 0xa817, 0x0001,
-	0x2900, 0xa85a, 0x2001, 0x002e, 0x2004, 0xa866, 0x2001, 0x002f,
-	0x2004, 0xa86a, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8, 0xa86e,
-	0x2001, 0x002b, 0x2004, 0xa872, 0x2061, 0x0090, 0x2079, 0x0100,
-	0x2001, 0x1981, 0x2004, 0x6036, 0x2009, 0x0040, 0x080c, 0x207b,
-	0x2001, 0x002a, 0x2004, 0x9084, 0xfff8, 0x601a, 0x0006, 0x2001,
-	0x002b, 0x2004, 0x601e, 0x78c6, 0x000e, 0x78ca, 0x9006, 0x600a,
-	0x600e, 0x008e, 0x00ce, 0x00ee, 0x00fe, 0x0005, 0x00e6, 0x2071,
-	0x0080, 0xaa60, 0x22e8, 0x20a0, 0x20e1, 0x0000, 0x2099, 0x0088,
-	0x702b, 0x0026, 0x7402, 0x7306, 0x9006, 0x700a, 0x700e, 0x810b,
-	0x810b, 0x21a8, 0x810b, 0x7112, 0x702b, 0x0041, 0x702c, 0xd0fc,
-	0x0de8, 0x702b, 0x0002, 0x702b, 0x0040, 0x4005, 0x7400, 0x7304,
-	0x87ff, 0x0190, 0x0086, 0x0096, 0x2940, 0x0086, 0x080c, 0x489a,
-	0x008e, 0xa058, 0x00a6, 0x2050, 0x2900, 0xb006, 0xa05a, 0x00ae,
-	0x009e, 0x008e, 0x9085, 0x0001, 0x00ee, 0x0005, 0x00e6, 0x2001,
-	0x002d, 0x2004, 0x9005, 0x0528, 0x2038, 0x2001, 0x0030, 0x2024,
-	0x2001, 0x0031, 0x201c, 0x080c, 0x489a, 0x2940, 0xa813, 0x0019,
-	0xaf16, 0x2900, 0xa85a, 0x978a, 0x0007, 0x0220, 0x2138, 0x2009,
-	0x0007, 0x0010, 0x2708, 0x903e, 0x0096, 0xa858, 0x2048, 0xa85c,
-	0x9080, 0x0019, 0x009e, 0x080c, 0x3fce, 0x1d68, 0x2900, 0xa85a,
-	0x00d8, 0x080c, 0x489a, 0x2940, 0xa013, 0x0019, 0xa017, 0x0001,
-	0x2800, 0xa05a, 0x2001, 0x0030, 0x2004, 0xa066, 0x2001, 0x0031,
-	0x2004, 0xa06a, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8, 0xa06e,
-	0x2001, 0x002b, 0x2004, 0xa072, 0x2001, 0x032a, 0x2003, 0x0004,
-	0x7884, 0xd0ac, 0x1180, 0x2001, 0x0101, 0x200c, 0x918d, 0x0200,
-	0x2102, 0xa017, 0x0000, 0x2001, 0x1a43, 0x2003, 0x0003, 0x2001,
-	0x032a, 0x2003, 0x0009, 0x2001, 0x0300, 0x2003, 0x0000, 0x2001,
-	0x020d, 0x2003, 0x0000, 0x2001, 0x0004, 0x200c, 0x918d, 0x0002,
-	0x2102, 0x00ee, 0x0005, 0x0126, 0x2091, 0x8000, 0x20a9, 0x001b,
-	0x20a1, 0x1840, 0x20e9, 0x0001, 0x9006, 0x4004, 0x2009, 0x013c,
-	0x200a, 0x012e, 0x7880, 0x9086, 0x0052, 0x0108, 0x0005, 0x0804,
-	0x339e, 0x7d98, 0x7c9c, 0x0804, 0x34a0, 0x080c, 0x70ba, 0x190c,
-	0x5cbc, 0x2069, 0x185b, 0x2d00, 0x2009, 0x0030, 0x7a8c, 0x7b88,
-	0x7c9c, 0x7d98, 0x2039, 0x0001, 0x080c, 0x48e3, 0x701f, 0x40a1,
-	0x0005, 0x080c, 0x53b7, 0x1130, 0x3b00, 0x3a08, 0xc194, 0xc095,
-	0x20d8, 0x21d0, 0x2069, 0x185b, 0x6800, 0x9005, 0x0904, 0x33d3,
-	0x6804, 0xd094, 0x00c6, 0x2061, 0x0100, 0x6104, 0x0138, 0x6200,
-	0x9292, 0x0005, 0x0218, 0x918c, 0xffdf, 0x0010, 0x918d, 0x0020,
-	0x6106, 0x00ce, 0xd08c, 0x00c6, 0x2061, 0x0100, 0x6104, 0x0118,
-	0x918d, 0x0010, 0x0010, 0x918c, 0xffef, 0x6106, 0x00ce, 0xd084,
-	0x0158, 0x6a28, 0x928a, 0x007f, 0x1a04, 0x33d3, 0x9288, 0x319f,
-	0x210d, 0x918c, 0x00ff, 0x6162, 0xd0dc, 0x0130, 0x6828, 0x908a,
-	0x007f, 0x1a04, 0x33d3, 0x605a, 0x6888, 0x9084, 0x0030, 0x8004,
-	0x8004, 0x8004, 0x8004, 0x0006, 0x2009, 0x1989, 0x9080, 0x2595,
-	0x2005, 0x200a, 0x2008, 0x2001, 0x0018, 0x080c, 0x98b8, 0x2009,
-	0x0390, 0x200b, 0x0400, 0x000e, 0x2009, 0x198a, 0x9080, 0x2599,
-	0x2005, 0x200a, 0x6808, 0x908a, 0x0100, 0x0a04, 0x33d3, 0x908a,
-	0x0841, 0x1a04, 0x33d3, 0x9084, 0x0007, 0x1904, 0x33d3, 0x680c,
-	0x9005, 0x0904, 0x33d3, 0x6810, 0x9005, 0x0904, 0x33d3, 0x6848,
-	0x6940, 0x910a, 0x1a04, 0x33d3, 0x8001, 0x0904, 0x33d3, 0x684c,
-	0x6944, 0x910a, 0x1a04, 0x33d3, 0x8001, 0x0904, 0x33d3, 0x6814,
-	0x908c, 0x00ff, 0x614a, 0x8007, 0x9084, 0x00ff, 0x604e, 0x080c,
-	0x73ea, 0x080c, 0x6753, 0x080c, 0x6788, 0x6808, 0x602a, 0x080c,
-	0x1fed, 0x2009, 0x0170, 0x200b, 0x0080, 0xa001, 0xa001, 0x200b,
-	0x0000, 0x0036, 0x6b08, 0x080c, 0x24fc, 0x003e, 0x6000, 0x9086,
-	0x0000, 0x1904, 0x420d, 0x6818, 0x691c, 0x6a20, 0x6b24, 0x8007,
-	0x810f, 0x8217, 0x831f, 0x6016, 0x611a, 0x621e, 0x6322, 0x6c04,
-	0xd4f4, 0x0148, 0x6830, 0x6934, 0x6a38, 0x6b3c, 0x8007, 0x810f,
-	0x8217, 0x831f, 0x0010, 0x9084, 0xf0ff, 0x6006, 0x610a, 0x620e,
-	0x6312, 0x8007, 0x810f, 0x8217, 0x831f, 0x20a9, 0x0004, 0x20a1,
-	0x198b, 0x20e9, 0x0001, 0x4001, 0x20a9, 0x0004, 0x20a1, 0x19a5,
-	0x20e9, 0x0001, 0x4001, 0x080c, 0x82e3, 0x00c6, 0x900e, 0x20a9,
-	0x0001, 0x6b70, 0xd384, 0x01c8, 0x0020, 0x839d, 0x12b0, 0x3508,
-	0x8109, 0x080c, 0x79c1, 0x6878, 0x6016, 0x6874, 0x2008, 0x9084,
-	0xff00, 0x8007, 0x600a, 0x9184, 0x00ff, 0x6006, 0x8108, 0x1118,
-	0x6003, 0x0003, 0x0010, 0x6003, 0x0001, 0x1f04, 0x4185, 0x00ce,
-	0x00c6, 0x2061, 0x1974, 0x2063, 0x0001, 0x9006, 0x080c, 0x27a3,
-	0x9006, 0x080c, 0x2786, 0x0000, 0x00ce, 0x00e6, 0x2c70, 0x080c,
-	0x0ea9, 0x00ee, 0x6888, 0xd0ec, 0x0130, 0x2011, 0x0114, 0x2204,
-	0x9085, 0x0180, 0x2012, 0x6a80, 0x9284, 0x0030, 0x9086, 0x0030,
-	0x1128, 0x9294, 0xffcf, 0x9295, 0x0020, 0x6a82, 0x2001, 0x1954,
-	0x6a80, 0x9294, 0x0030, 0x928e, 0x0000, 0x0170, 0x928e, 0x0010,
-	0x0118, 0x928e, 0x0020, 0x0140, 0x2003, 0xaaaa, 0x080c, 0x2571,
-	0x2001, 0x1945, 0x2102, 0x0008, 0x2102, 0x00c6, 0x2061, 0x0100,
-	0x602f, 0x0040, 0x602f, 0x0000, 0x00ce, 0x080c, 0x70ba, 0x0128,
-	0x080c, 0x4cac, 0x0110, 0x080c, 0x24c2, 0x60d0, 0x9005, 0x01c0,
-	0x6003, 0x0001, 0x2009, 0x41f5, 0x00d0, 0x080c, 0x70ba, 0x1168,
-	0x2011, 0x6f30, 0x080c, 0x816c, 0x2011, 0x6f23, 0x080c, 0x8272,
-	0x080c, 0x73be, 0x080c, 0x6feb, 0x0040, 0x080c, 0x5bb2, 0x0028,
-	0x6003, 0x0004, 0x2009, 0x420d, 0x0010, 0x0804, 0x339e, 0x2001,
-	0x0170, 0x2004, 0x9084, 0x00ff, 0x9086, 0x004c, 0x1118, 0x2091,
-	0x31bd, 0x0817, 0x2091, 0x313d, 0x0817, 0x6000, 0x9086, 0x0000,
-	0x0904, 0x33d0, 0x2069, 0x185b, 0x7890, 0x6842, 0x7894, 0x6846,
-	0x2d00, 0x2009, 0x0030, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x2039,
-	0x0001, 0x0804, 0x48e6, 0x9006, 0x080c, 0x24c2, 0x81ff, 0x1904,
-	0x33d0, 0x080c, 0x70ba, 0x11b0, 0x080c, 0x73b9, 0x080c, 0x5cf7,
-	0x080c, 0x319a, 0x0118, 0x6130, 0xc18d, 0x6132, 0x080c, 0xbf8f,
-	0x0130, 0x080c, 0x70dd, 0x1118, 0x080c, 0x708e, 0x0038, 0x080c,
-	0x6feb, 0x0020, 0x080c, 0x5cbc, 0x080c, 0x5bb2, 0x0804, 0x339e,
-	0x81ff, 0x1904, 0x33d0, 0x080c, 0x70ba, 0x1110, 0x0804, 0x33d0,
-	0x6190, 0x81ff, 0x01a8, 0x704f, 0x0000, 0x2001, 0x1d80, 0x2009,
-	0x0040, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x0126, 0x2091, 0x8000,
-	0x2039, 0x0001, 0x080c, 0x48e6, 0x701f, 0x339c, 0x012e, 0x0005,
-	0x704f, 0x0001, 0x00d6, 0x2069, 0x1d80, 0x20a9, 0x0040, 0x20e9,
-	0x0001, 0x20a1, 0x1d80, 0x2019, 0xffff, 0x4304, 0x6558, 0x9588,
-	0x319f, 0x210d, 0x918c, 0x00ff, 0x216a, 0x900e, 0x2011, 0x0002,
-	0x2100, 0x9506, 0x01a8, 0x080c, 0x628f, 0x1190, 0xb814, 0x821c,
-	0x0238, 0x9398, 0x1d80, 0x9085, 0xff00, 0x8007, 0x201a, 0x0038,
-	0x9398, 0x1d80, 0x2324, 0x94a4, 0xff00, 0x9405, 0x201a, 0x8210,
-	0x8108, 0x9182, 0x0080, 0x1208, 0x0c18, 0x8201, 0x8007, 0x2d0c,
-	0x9105, 0x206a, 0x00de, 0x20a9, 0x0040, 0x20a1, 0x1d80, 0x2099,
-	0x1d80, 0x080c, 0x5c47, 0x0804, 0x4265, 0x080c, 0x48cd, 0x0904,
-	0x33d3, 0x080c, 0x489a, 0x1120, 0x2009, 0x0002, 0x0804, 0x33d0,
-	0x080c, 0x53a8, 0xd0b4, 0x0558, 0x7884, 0x908e, 0x007e, 0x0538,
-	0x908e, 0x007f, 0x0520, 0x908e, 0x0080, 0x0508, 0x080c, 0x3195,
-	0x1148, 0xb800, 0xd08c, 0x11d8, 0xb804, 0x9084, 0x00ff, 0x9086,
-	0x0006, 0x11a8, 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, 0x080c,
-	0xba3f, 0x1120, 0x2009, 0x0003, 0x0804, 0x33d0, 0x7007, 0x0003,
-	0x701f, 0x42f3, 0x0005, 0x080c, 0x48cd, 0x0904, 0x33d3, 0x20a9,
-	0x002b, 0xb8b4, 0x20e0, 0xb8b8, 0x2098, 0xa860, 0x20e8, 0xa85c,
-	0x9080, 0x0002, 0x20a0, 0x4003, 0x20a9, 0x0008, 0x9080, 0x0006,
-	0x20a0, 0xb8b4, 0x20e0, 0xb8b8, 0x9080, 0x0006, 0x2098, 0x080c,
-	0x0fac, 0x0070, 0x20a9, 0x0004, 0xa85c, 0x9080, 0x000a, 0x20a0,
-	0xb8b4, 0x20e0, 0xb8b8, 0x9080, 0x000a, 0x2098, 0x080c, 0x0fac,
-	0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080,
-	0x0002, 0x2009, 0x002b, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x0804,
-	0x48e6, 0x81ff, 0x1904, 0x33d0, 0x080c, 0x48b1, 0x0904, 0x33d3,
-	0x080c, 0x64d4, 0x0904, 0x33d0, 0x0058, 0xa878, 0x9005, 0x0120,
-	0x2009, 0x0004, 0x0804, 0x33d0, 0xa974, 0xaa94, 0x0804, 0x339e,
-	0x080c, 0x53b0, 0x0904, 0x339e, 0x701f, 0x433d, 0x7007, 0x0003,
-	0x0005, 0x81ff, 0x1904, 0x33d0, 0x7888, 0x908a, 0x1000, 0x1a04,
-	0x33d3, 0x080c, 0x48cd, 0x0904, 0x33d3, 0x080c, 0x668a, 0x0120,
-	0x080c, 0x6692, 0x1904, 0x33d3, 0x080c, 0x6559, 0x0904, 0x33d0,
-	0x2019, 0x0004, 0x900e, 0x080c, 0x64e6, 0x0904, 0x33d0, 0x7984,
-	0x7a88, 0x04c9, 0x08a8, 0xa89c, 0x908a, 0x1000, 0x12f8, 0x080c,
-	0x48cb, 0x01e0, 0x080c, 0x668a, 0x0118, 0x080c, 0x6692, 0x11b0,
-	0x080c, 0x6559, 0x2009, 0x0002, 0x0168, 0x2009, 0x0002, 0x2019,
-	0x0004, 0x080c, 0x64e6, 0x2009, 0x0003, 0x0120, 0xa998, 0xaa9c,
-	0x00d1, 0x0060, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006,
-	0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x0005, 0xa897, 0x4000,
-	0x080c, 0x53b0, 0x0110, 0x9006, 0x0018, 0x900e, 0x9085, 0x0001,
-	0x2001, 0x0000, 0x0005, 0x9186, 0x00ff, 0x0110, 0x0071, 0x0060,
-	0x2029, 0x007e, 0x2061, 0x1800, 0x6458, 0x2400, 0x9506, 0x0110,
-	0x2508, 0x0019, 0x8529, 0x1ec8, 0x0005, 0x080c, 0x628f, 0x1138,
-	0x2200, 0x8003, 0x800b, 0x810b, 0x9108, 0x080c, 0x817a, 0x0005,
-	0x81ff, 0x1904, 0x33d0, 0x798c, 0x2001, 0x1958, 0x918c, 0x8000,
-	0x2102, 0x080c, 0x48b1, 0x0904, 0x33d3, 0x080c, 0x668a, 0x0120,
-	0x080c, 0x6692, 0x1904, 0x33d3, 0x080c, 0x6356, 0x0904, 0x33d0,
-	0x080c, 0x64dd, 0x0904, 0x33d0, 0x2001, 0x1958, 0x2004, 0xd0fc,
-	0x1904, 0x339e, 0x0804, 0x4348, 0xa9a0, 0x2001, 0x1958, 0x918c,
-	0x8000, 0xc18d, 0x2102, 0x080c, 0x48be, 0x01a0, 0x080c, 0x668a,
-	0x0118, 0x080c, 0x6692, 0x1170, 0x080c, 0x6356, 0x2009, 0x0002,
-	0x0128, 0x080c, 0x64dd, 0x1170, 0x2009, 0x0003, 0xa897, 0x4005,
-	0xa99a, 0x0010, 0xa897, 0x4006, 0x900e, 0x9085, 0x0001, 0x2001,
-	0x0030, 0x0005, 0xa897, 0x4000, 0x2001, 0x1958, 0x2004, 0xd0fc,
-	0x1128, 0x080c, 0x53b0, 0x0110, 0x9006, 0x0018, 0x900e, 0x9085,
-	0x0001, 0x2001, 0x0000, 0x0005, 0x81ff, 0x1904, 0x33d0, 0x798c,
-	0x2001, 0x1957, 0x918c, 0x8000, 0x2102, 0x080c, 0x48b1, 0x0904,
-	0x33d3, 0x080c, 0x668a, 0x0120, 0x080c, 0x6692, 0x1904, 0x33d3,
-	0x080c, 0x6356, 0x0904, 0x33d0, 0x080c, 0x64cb, 0x0904, 0x33d0,
-	0x2001, 0x1957, 0x2004, 0xd0fc, 0x1904, 0x339e, 0x0804, 0x4348,
-	0xa9a0, 0x2001, 0x1957, 0x918c, 0x8000, 0xc18d, 0x2102, 0x080c,
-	0x48be, 0x01a0, 0x080c, 0x668a, 0x0118, 0x080c, 0x6692, 0x1170,
-	0x080c, 0x6356, 0x2009, 0x0002, 0x0128, 0x080c, 0x64cb, 0x1170,
-	0x2009, 0x0003, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006,
-	0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x0005, 0xa897, 0x4000,
-	0x2001, 0x1957, 0x2004, 0xd0fc, 0x1128, 0x080c, 0x53b0, 0x0110,
-	0x9006, 0x0018, 0x900e, 0x9085, 0x0001, 0x2001, 0x0000, 0x0005,
-	0x6100, 0x0804, 0x339e, 0x080c, 0x48cd, 0x0904, 0x33d3, 0x080c,
-	0x53bc, 0x1904, 0x33d0, 0x79a8, 0xd184, 0x1158, 0xb834, 0x8007,
-	0x789e, 0xb830, 0x8007, 0x789a, 0xbb2c, 0x831f, 0xba28, 0x8217,
-	0x0050, 0xb824, 0x8007, 0x789e, 0xb820, 0x8007, 0x789a, 0xbb1c,
-	0x831f, 0xba18, 0x8217, 0xb900, 0x918c, 0x0200, 0x0804, 0x339e,
-	0x78a8, 0x909c, 0x0003, 0xd0ac, 0x1150, 0xd0b4, 0x1140, 0x939a,
-	0x0003, 0x1a04, 0x33d0, 0x6258, 0x7884, 0x9206, 0x1550, 0x2031,
-	0x1848, 0x2009, 0x013c, 0x2136, 0x2001, 0x1840, 0x7a8c, 0x7b88,
-	0x7c9c, 0x7d98, 0x2039, 0x0001, 0x0006, 0x78a8, 0x9084, 0x0080,
-	0x1118, 0x000e, 0x0804, 0x48e6, 0x000e, 0x2031, 0x0000, 0x2061,
-	0x18b6, 0x2c44, 0xa66a, 0xa17a, 0xa772, 0xa076, 0xa28e, 0xa392,
-	0xa496, 0xa59a, 0x080c, 0x1124, 0x7007, 0x0002, 0x701f, 0x4501,
-	0x0005, 0x81ff, 0x1904, 0x33d0, 0x080c, 0x48cd, 0x0904, 0x33d3,
-	0x080c, 0x668a, 0x1904, 0x33d0, 0x00c6, 0x080c, 0x489a, 0x00ce,
-	0x0904, 0x33d0, 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, 0x7ea8,
-	0x080c, 0xb9e5, 0x0904, 0x33d0, 0x7007, 0x0003, 0x701f, 0x4505,
-	0x0005, 0x080c, 0x4073, 0x0804, 0x339e, 0xa830, 0x9086, 0x0100,
-	0x0904, 0x33d0, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084,
-	0xffc0, 0x9080, 0x001b, 0x2009, 0x000c, 0x7a8c, 0x7b88, 0x7c9c,
-	0x7d98, 0x0804, 0x48e6, 0x9006, 0x080c, 0x24c2, 0x78a8, 0x9084,
-	0x00ff, 0x9086, 0x00ff, 0x0118, 0x81ff, 0x1904, 0x33d0, 0x080c,
-	0x70ba, 0x0110, 0x080c, 0x5cbc, 0x7888, 0x908a, 0x1000, 0x1a04,
-	0x33d3, 0x7984, 0x9186, 0x00ff, 0x0138, 0x9182, 0x007f, 0x1a04,
-	0x33d3, 0x2100, 0x080c, 0x248c, 0x0026, 0x00c6, 0x0126, 0x2091,
-	0x8000, 0x2061, 0x19db, 0x601b, 0x0000, 0x601f, 0x0000, 0x6073,
-	0x0000, 0x6077, 0x0000, 0x080c, 0x70ba, 0x1158, 0x080c, 0x73b9,
-	0x080c, 0x5cf7, 0x9085, 0x0001, 0x080c, 0x7101, 0x080c, 0x6feb,
-	0x00f0, 0x080c, 0x98c7, 0x080c, 0x9b6c, 0x080c, 0x98e3, 0x2061,
-	0x0100, 0x2001, 0x1817, 0x2004, 0x9084, 0x00ff, 0x810f, 0x9105,
-	0x604a, 0x6043, 0x0090, 0x6043, 0x0010, 0x2009, 0x1971, 0x200b,
-	0x0000, 0x2009, 0x002d, 0x2011, 0x5be2, 0x080c, 0x8230, 0x7984,
-	0x080c, 0x70ba, 0x1110, 0x2009, 0x00ff, 0x7a88, 0x080c, 0x43ab,
-	0x012e, 0x00ce, 0x002e, 0x0804, 0x339e, 0x7984, 0x080c, 0x622f,
-	0x2b08, 0x1904, 0x33d3, 0x0804, 0x339e, 0x81ff, 0x0120, 0x2009,
-	0x0001, 0x0804, 0x33d0, 0x60d8, 0xd0ac, 0x1130, 0xd09c, 0x1120,
-	0x2009, 0x0005, 0x0804, 0x33d0, 0x080c, 0x489a, 0x1120, 0x2009,
-	0x0002, 0x0804, 0x33d0, 0x7984, 0x9192, 0x0021, 0x1a04, 0x33d3,
-	0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0xa85c, 0x9080, 0x0019, 0x702a,
-	0xaf60, 0x7736, 0x080c, 0x48e3, 0x701f, 0x45bd, 0x7880, 0x9086,
-	0x006e, 0x0110, 0x701f, 0x4e5e, 0x0005, 0x2009, 0x0080, 0x080c,
-	0x628f, 0x1118, 0x080c, 0x668a, 0x0120, 0x2021, 0x400a, 0x0804,
-	0x33a0, 0x00d6, 0x0096, 0xa964, 0xaa6c, 0xab70, 0xac74, 0xad78,
-	0xae7c, 0xa884, 0x90be, 0x0100, 0x0904, 0x4656, 0x90be, 0x0112,
-	0x0904, 0x4656, 0x90be, 0x0113, 0x0904, 0x4656, 0x90be, 0x0114,
-	0x0904, 0x4656, 0x90be, 0x0117, 0x0904, 0x4656, 0x90be, 0x011a,
-	0x0904, 0x4656, 0x90be, 0x011c, 0x0904, 0x4656, 0x90be, 0x0121,
-	0x0904, 0x463d, 0x90be, 0x0131, 0x0904, 0x463d, 0x90be, 0x0171,
-	0x0904, 0x4656, 0x90be, 0x0173, 0x0904, 0x4656, 0x90be, 0x01a1,
-	0x1128, 0xa894, 0x8007, 0xa896, 0x0804, 0x4661, 0x90be, 0x0212,
-	0x0904, 0x464a, 0x90be, 0x0213, 0x05e8, 0x90be, 0x0214, 0x0500,
-	0x90be, 0x0217, 0x0188, 0x90be, 0x021a, 0x1120, 0xa89c, 0x8007,
-	0xa89e, 0x04e0, 0x90be, 0x021f, 0x05c8, 0x90be, 0x0300, 0x05b0,
-	0x009e, 0x00de, 0x0804, 0x33d3, 0x7028, 0x9080, 0x0010, 0x2098,
-	0x20a0, 0x7034, 0x20e0, 0x20e8, 0x20a9, 0x0007, 0x080c, 0x469f,
-	0x7028, 0x9080, 0x000e, 0x2098, 0x20a0, 0x7034, 0x20e0, 0x20e8,
-	0x20a9, 0x0001, 0x080c, 0x469f, 0x00c8, 0x7028, 0x9080, 0x000c,
-	0x2098, 0x20a0, 0x7034, 0x20e0, 0x20e8, 0x20a9, 0x0001, 0x080c,
-	0x46ac, 0x00b8, 0x7028, 0x9080, 0x000e, 0x2098, 0x20a0, 0x7034,
-	0x20e0, 0x20e8, 0x20a9, 0x0001, 0x080c, 0x46ac, 0x7028, 0x9080,
-	0x000c, 0x2098, 0x20a0, 0x7034, 0x20e0, 0x20e8, 0x20a9, 0x0001,
-	0x04f1, 0x00c6, 0x080c, 0x489a, 0x0550, 0xa868, 0xc0fd, 0xa86a,
-	0xa867, 0x0119, 0x9006, 0xa882, 0xa87f, 0x0020, 0xa88b, 0x0001,
-	0x810b, 0xa9ae, 0xa8b2, 0xaab6, 0xabba, 0xacbe, 0xadc2, 0xa9c6,
-	0xa8ca, 0x00ce, 0x009e, 0x00de, 0xa866, 0xa822, 0xa868, 0xc0fd,
-	0xa86a, 0xa804, 0x2048, 0x080c, 0xba00, 0x1120, 0x2009, 0x0003,
-	0x0804, 0x33d0, 0x7007, 0x0003, 0x701f, 0x4696, 0x0005, 0x00ce,
-	0x009e, 0x00de, 0x2009, 0x0002, 0x0804, 0x33d0, 0xa820, 0x9086,
-	0x8001, 0x1904, 0x339e, 0x2009, 0x0004, 0x0804, 0x33d0, 0x0016,
-	0x0026, 0x3510, 0x20a9, 0x0002, 0x4002, 0x4104, 0x4004, 0x8211,
-	0x1dc8, 0x002e, 0x001e, 0x0005, 0x0016, 0x0026, 0x0036, 0x0046,
-	0x3520, 0x20a9, 0x0004, 0x4002, 0x4304, 0x4204, 0x4104, 0x4004,
-	0x8421, 0x1db8, 0x004e, 0x003e, 0x002e, 0x001e, 0x0005, 0x81ff,
-	0x0120, 0x2009, 0x0001, 0x0804, 0x33d0, 0x60d8, 0xd0ac, 0x1160,
-	0xd09c, 0x0120, 0x2009, 0x0016, 0x0804, 0x33d0, 0xd09c, 0x1120,
-	0x2009, 0x0005, 0x0804, 0x33d0, 0x7984, 0x78a8, 0x2040, 0x080c,
-	0x9b65, 0x1120, 0x9182, 0x007f, 0x0a04, 0x33d3, 0x9186, 0x00ff,
-	0x0904, 0x33d3, 0x9182, 0x0800, 0x1a04, 0x33d3, 0x7a8c, 0x7b88,
-	0x6078, 0x9306, 0x1158, 0x607c, 0x924e, 0x0904, 0x33d3, 0x080c,
-	0x9b65, 0x1120, 0x99cc, 0xff00, 0x0904, 0x33d3, 0x0126, 0x2091,
-	0x8000, 0x0026, 0x2011, 0x8008, 0x080c, 0x66ae, 0x002e, 0x0140,
-	0x918d, 0x8000, 0x080c, 0x66f8, 0x1118, 0x2001, 0x4009, 0x0458,
-	0x080c, 0x47b4, 0x0560, 0x90c6, 0x4000, 0x1170, 0x00c6, 0x0006,
-	0x900e, 0x080c, 0x6582, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108,
-	0xc18d, 0x000e, 0x00ce, 0x00b8, 0x90c6, 0x4007, 0x1110, 0x2408,
-	0x0090, 0x90c6, 0x4008, 0x1118, 0x2708, 0x2610, 0x0060, 0x90c6,
-	0x4009, 0x1108, 0x0040, 0x90c6, 0x4006, 0x1108, 0x0020, 0x2001,
-	0x4005, 0x2009, 0x000a, 0x2020, 0x012e, 0x0804, 0x33a0, 0x2b00,
-	0x7026, 0x0016, 0x00b6, 0x00c6, 0x00e6, 0x2c70, 0x080c, 0x9c55,
-	0x0904, 0x4781, 0x2b00, 0x6012, 0x080c, 0xbd09, 0x2e58, 0x00ee,
-	0x00e6, 0x00c6, 0x080c, 0x489a, 0x00ce, 0x2b70, 0x1158, 0x080c,
-	0x9be6, 0x00ee, 0x00ce, 0x00be, 0x001e, 0x012e, 0x2009, 0x0002,
-	0x0804, 0x33d0, 0x900e, 0xa966, 0xa96a, 0x2900, 0x6016, 0xa932,
-	0xa868, 0xc0fd, 0xd88c, 0x0108, 0xc0f5, 0xa86a, 0x080c, 0x302e,
-	0x6023, 0x0001, 0x9006, 0x080c, 0x61cc, 0x2001, 0x0002, 0x080c,
-	0x61e0, 0x2009, 0x0002, 0x080c, 0x9c82, 0x78a8, 0xd094, 0x0138,
-	0x00ee, 0x7024, 0x00e6, 0x2058, 0xb8c4, 0xc08d, 0xb8c6, 0x9085,
-	0x0001, 0x00ee, 0x00ce, 0x00be, 0x001e, 0x012e, 0x1120, 0x2009,
-	0x0003, 0x0804, 0x33d0, 0x7007, 0x0003, 0x701f, 0x4790, 0x0005,
-	0xa830, 0x2008, 0x918e, 0xdead, 0x1120, 0x2021, 0x4009, 0x0804,
-	0x33a0, 0x9086, 0x0100, 0x7024, 0x2058, 0x1138, 0x2009, 0x0004,
-	0xba04, 0x9294, 0x00ff, 0x0804, 0x5305, 0x900e, 0xa868, 0xd0f4,
-	0x1904, 0x339e, 0x080c, 0x6582, 0x1108, 0xc185, 0xb800, 0xd0bc,
-	0x0108, 0xc18d, 0x0804, 0x339e, 0x00e6, 0x00d6, 0x0096, 0x83ff,
-	0x0904, 0x47fc, 0x902e, 0x080c, 0x9b65, 0x0130, 0x9026, 0x20a9,
-	0x0800, 0x2071, 0x1000, 0x0030, 0x2021, 0x007f, 0x20a9, 0x0781,
-	0x2071, 0x107f, 0x2e04, 0x9005, 0x11b0, 0x2100, 0x9406, 0x15e8,
-	0x2428, 0x94ce, 0x007f, 0x1120, 0x92ce, 0xfffd, 0x1528, 0x0030,
-	0x94ce, 0x0080, 0x1130, 0x92ce, 0xfffc, 0x11f0, 0x93ce, 0x00ff,
-	0x11d8, 0xc5fd, 0x0450, 0x2058, 0xbf10, 0x2700, 0x9306, 0x11b8,
-	0xbe14, 0x2600, 0x9206, 0x1198, 0x2400, 0x9106, 0x1150, 0xd884,
-	0x0568, 0xd894, 0x1558, 0x080c, 0x668a, 0x1540, 0x2001, 0x4000,
-	0x0430, 0x2001, 0x4007, 0x0418, 0x2001, 0x4006, 0x0400, 0x2400,
-	0x9106, 0x1158, 0xbe14, 0x87ff, 0x1128, 0x86ff, 0x0948, 0x080c,
-	0x9b65, 0x1930, 0x2001, 0x4008, 0x0090, 0x8420, 0x8e70, 0x1f04,
-	0x47ca, 0x85ff, 0x1130, 0x2001, 0x4009, 0x0048, 0x2001, 0x0001,
-	0x0030, 0x080c, 0x622f, 0x1dd0, 0xbb12, 0xba16, 0x9006, 0x9005,
-	0x009e, 0x00de, 0x00ee, 0x0005, 0x81ff, 0x0120, 0x2009, 0x0001,
-	0x0804, 0x33d0, 0x080c, 0x489a, 0x1120, 0x2009, 0x0002, 0x0804,
-	0x33d0, 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, 0x7884, 0x9005,
-	0x0904, 0x33d3, 0x9096, 0x00ff, 0x0120, 0x9092, 0x0004, 0x1a04,
-	0x33d3, 0x2010, 0x2918, 0x080c, 0x2fce, 0x1120, 0x2009, 0x0003,
-	0x0804, 0x33d0, 0x7007, 0x0003, 0x701f, 0x484f, 0x0005, 0xa830,
-	0x9086, 0x0100, 0x1904, 0x339e, 0x2009, 0x0004, 0x0804, 0x33d0,
-	0x7984, 0x080c, 0x9b65, 0x1120, 0x9182, 0x007f, 0x0a04, 0x33d3,
-	0x9186, 0x00ff, 0x0904, 0x33d3, 0x9182, 0x0800, 0x1a04, 0x33d3,
-	0x2001, 0x9000, 0x080c, 0x5360, 0x1904, 0x33d0, 0x0804, 0x339e,
-	0xa998, 0x080c, 0x9b65, 0x1118, 0x9182, 0x007f, 0x0280, 0x9186,
-	0x00ff, 0x0168, 0x9182, 0x0800, 0x1250, 0x2001, 0x9000, 0x080c,
-	0x5360, 0x11a8, 0x0060, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897,
-	0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x0005, 0xa897,
-	0x4000, 0x900e, 0x9085, 0x0001, 0x2001, 0x0000, 0x0005, 0x2009,
-	0x000a, 0x0c48, 0x080c, 0x102f, 0x0198, 0x9006, 0xa802, 0x7014,
-	0x9005, 0x1120, 0x2900, 0x7016, 0x701a, 0x0040, 0x7018, 0xa802,
-	0x0086, 0x2040, 0x2900, 0xa006, 0x701a, 0x008e, 0x9085, 0x0001,
-	0x0005, 0x7984, 0x080c, 0x628f, 0x1130, 0x7e88, 0x9684, 0x3fff,
-	0x9082, 0x4000, 0x0208, 0x905e, 0x8bff, 0x0005, 0xa998, 0x080c,
-	0x628f, 0x1130, 0xae9c, 0x9684, 0x3fff, 0x9082, 0x4000, 0x0208,
-	0x905e, 0x8bff, 0x0005, 0xae98, 0x0008, 0x7e84, 0x2608, 0x080c,
-	0x628f, 0x1108, 0x0008, 0x905e, 0x8bff, 0x0005, 0x0016, 0x7114,
-	0x81ff, 0x0128, 0x2148, 0xa904, 0x080c, 0x1061, 0x0cc8, 0x7116,
-	0x711a, 0x001e, 0x0005, 0x2031, 0x0001, 0x0010, 0x2031, 0x0000,
-	0x2061, 0x18b6, 0x2c44, 0xa66a, 0xa17a, 0xa772, 0xa076, 0xa28e,
-	0xa392, 0xa496, 0xa59a, 0x080c, 0x1124, 0x7007, 0x0002, 0x701f,
-	0x339e, 0x0005, 0x00f6, 0x0126, 0x2091, 0x8000, 0x2079, 0x0000,
-	0x2001, 0x18ae, 0x2004, 0x9005, 0x1190, 0x0e04, 0x4917, 0x7a36,
-	0x7833, 0x0012, 0x7a82, 0x7b86, 0x7c8a, 0x2091, 0x4080, 0x2001,
-	0x0089, 0x2004, 0xd084, 0x190c, 0x11d6, 0x0804, 0x497d, 0x0016,
-	0x0086, 0x0096, 0x00c6, 0x00e6, 0x2071, 0x189c, 0x7044, 0x9005,
-	0x1540, 0x7148, 0x9182, 0x0010, 0x0288, 0x7038, 0x2060, 0x080c,
-	0x102f, 0x0904, 0x4975, 0xa84b, 0x0000, 0x2900, 0x7046, 0x2001,
-	0x0002, 0x9080, 0x1d1c, 0x2005, 0xa846, 0x0098, 0x7038, 0x90e0,
-	0x0004, 0x2001, 0x18b8, 0x9c82, 0x18f8, 0x0210, 0x2061, 0x18b8,
-	0x2c00, 0x703a, 0x7148, 0x81ff, 0x1108, 0x703e, 0x8108, 0x714a,
-	0x0460, 0x7148, 0x8108, 0x714a, 0x7044, 0x2040, 0xa144, 0x2105,
-	0x0016, 0x908a, 0x0036, 0x1a0c, 0x0d65, 0x2060, 0x001e, 0x8108,
-	0x2105, 0x9005, 0xa146, 0x1520, 0x080c, 0x102f, 0x1130, 0x8109,
-	0xa946, 0x7148, 0x8109, 0x714a, 0x00d8, 0x9006, 0xa806, 0xa84a,
-	0xa046, 0x2800, 0xa802, 0x2900, 0xa006, 0x7046, 0x2001, 0x0002,
-	0x9080, 0x1d1c, 0x2005, 0xa846, 0x0058, 0x2262, 0x6306, 0x640a,
-	0x00ee, 0x00ce, 0x009e, 0x008e, 0x001e, 0x012e, 0x00fe, 0x0005,
-	0x2c00, 0x9082, 0x001b, 0x0002, 0x499f, 0x499f, 0x49a1, 0x499f,
-	0x499f, 0x499f, 0x49a5, 0x499f, 0x499f, 0x499f, 0x49a9, 0x499f,
-	0x499f, 0x499f, 0x49ad, 0x499f, 0x499f, 0x499f, 0x49b1, 0x499f,
-	0x499f, 0x499f, 0x49b5, 0x499f, 0x499f, 0x499f, 0x49ba, 0x080c,
-	0x0d65, 0xa276, 0xa37a, 0xa47e, 0x0898, 0xa286, 0xa38a, 0xa48e,
-	0x0878, 0xa296, 0xa39a, 0xa49e, 0x0858, 0xa2a6, 0xa3aa, 0xa4ae,
-	0x0838, 0xa2b6, 0xa3ba, 0xa4be, 0x0818, 0xa2c6, 0xa3ca, 0xa4ce,
-	0x0804, 0x4978, 0xa2d6, 0xa3da, 0xa4de, 0x0804, 0x4978, 0x00e6,
-	0x2071, 0x189c, 0x7048, 0x9005, 0x0904, 0x4a51, 0x0126, 0x2091,
-	0x8000, 0x0e04, 0x4a50, 0x00f6, 0x2079, 0x0000, 0x00c6, 0x0096,
-	0x0086, 0x0076, 0x9006, 0x2038, 0x7040, 0x2048, 0x9005, 0x0500,
-	0xa948, 0x2105, 0x0016, 0x908a, 0x0036, 0x1a0c, 0x0d65, 0x2060,
-	0x001e, 0x8108, 0x2105, 0x9005, 0xa94a, 0x1904, 0x4a53, 0xa804,
-	0x9005, 0x090c, 0x0d65, 0x7042, 0x2938, 0x2040, 0xa003, 0x0000,
-	0x2001, 0x0002, 0x9080, 0x1d1c, 0x2005, 0xa04a, 0x0804, 0x4a53,
-	0x703c, 0x2060, 0x2c14, 0x6304, 0x6408, 0x650c, 0x2200, 0x7836,
-	0x7833, 0x0012, 0x7882, 0x2300, 0x7886, 0x2400, 0x788a, 0x2091,
-	0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11d6, 0x87ff,
-	0x0118, 0x2748, 0x080c, 0x1061, 0x7048, 0x8001, 0x704a, 0x9005,
-	0x1170, 0x7040, 0x2048, 0x9005, 0x0128, 0x080c, 0x1061, 0x9006,
-	0x7042, 0x7046, 0x703b, 0x18b8, 0x703f, 0x18b8, 0x0420, 0x7040,
-	0x9005, 0x1508, 0x7238, 0x2c00, 0x9206, 0x0148, 0x9c80, 0x0004,
-	0x90fa, 0x18f8, 0x0210, 0x2001, 0x18b8, 0x703e, 0x00a0, 0x9006,
-	0x703e, 0x703a, 0x7044, 0x9005, 0x090c, 0x0d65, 0x2048, 0xa800,
-	0x9005, 0x1de0, 0x2900, 0x7042, 0x2001, 0x0002, 0x9080, 0x1d1c,
-	0x2005, 0xa84a, 0x0000, 0x007e, 0x008e, 0x009e, 0x00ce, 0x00fe,
-	0x012e, 0x00ee, 0x0005, 0x2c00, 0x9082, 0x001b, 0x0002, 0x4a72,
-	0x4a72, 0x4a74, 0x4a72, 0x4a72, 0x4a72, 0x4a79, 0x4a72, 0x4a72,
-	0x4a72, 0x4a7e, 0x4a72, 0x4a72, 0x4a72, 0x4a83, 0x4a72, 0x4a72,
-	0x4a72, 0x4a88, 0x4a72, 0x4a72, 0x4a72, 0x4a8d, 0x4a72, 0x4a72,
-	0x4a72, 0x4a92, 0x080c, 0x0d65, 0xaa74, 0xab78, 0xac7c, 0x0804,
-	0x49fe, 0xaa84, 0xab88, 0xac8c, 0x0804, 0x49fe, 0xaa94, 0xab98,
-	0xac9c, 0x0804, 0x49fe, 0xaaa4, 0xaba8, 0xacac, 0x0804, 0x49fe,
-	0xaab4, 0xabb8, 0xacbc, 0x0804, 0x49fe, 0xaac4, 0xabc8, 0xaccc,
-	0x0804, 0x49fe, 0xaad4, 0xabd8, 0xacdc, 0x0804, 0x49fe, 0x0026,
-	0x080c, 0x53a8, 0xd0c4, 0x0120, 0x2011, 0x8014, 0x080c, 0x48fa,
-	0x002e, 0x0005, 0x81ff, 0x1904, 0x33d0, 0x0126, 0x2091, 0x8000,
-	0x6030, 0xc08d, 0xc085, 0xc0ac, 0x6032, 0x080c, 0x70ba, 0x1158,
-	0x080c, 0x73b9, 0x080c, 0x5cf7, 0x9085, 0x0001, 0x080c, 0x7101,
-	0x080c, 0x6feb, 0x0010, 0x080c, 0x5bb2, 0x012e, 0x0804, 0x339e,
-	0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x33d0, 0x080c, 0x53bc,
-	0x0120, 0x2009, 0x0007, 0x0804, 0x33d0, 0x080c, 0x6682, 0x0120,
-	0x2009, 0x0008, 0x0804, 0x33d0, 0x0026, 0x2011, 0x0010, 0x080c,
-	0x66ae, 0x002e, 0x0140, 0x7984, 0x080c, 0x66f8, 0x1120, 0x2009,
-	0x4009, 0x0804, 0x33d0, 0x7984, 0x080c, 0x622f, 0x1904, 0x33d3,
-	0x2b00, 0x7026, 0x080c, 0x668a, 0x7888, 0x1170, 0x9084, 0x0005,
-	0x1158, 0x900e, 0x080c, 0x6582, 0x1108, 0xc185, 0xb800, 0xd0bc,
-	0x0108, 0xc18d, 0x0804, 0x339e, 0x080c, 0x489a, 0x0904, 0x33d0,
-	0x9006, 0xa866, 0xa832, 0xa868, 0xc0fd, 0xa86a, 0x080c, 0xbaa7,
-	0x0904, 0x33d0, 0x7888, 0xd094, 0x0118, 0xb8c4, 0xc08d, 0xb8c6,
-	0x7007, 0x0003, 0x701f, 0x4b61, 0x0005, 0x2061, 0x1800, 0x080c,
-	0x53bc, 0x2009, 0x0007, 0x1578, 0x080c, 0x6682, 0x0118, 0x2009,
-	0x0008, 0x0448, 0x080c, 0x3195, 0x0120, 0xa998, 0x080c, 0x622f,
-	0x1530, 0x080c, 0x48cb, 0x0518, 0x080c, 0x668a, 0xa89c, 0x1168,
-	0x9084, 0x0005, 0x1150, 0x900e, 0x080c, 0x6582, 0x1108, 0xc185,
-	0xb800, 0xd0bc, 0x0108, 0xc18d, 0x00d0, 0xa868, 0xc0fc, 0xa86a,
-	0x080c, 0xbaa7, 0x11e0, 0xa89c, 0xd094, 0x0118, 0xb8c4, 0xc08d,
-	0xb8c6, 0x2009, 0x0003, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897,
-	0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x0005, 0xa897,
-	0x4000, 0xa99a, 0x9006, 0x918d, 0x0001, 0x2008, 0x0005, 0x9006,
-	0x0005, 0xa830, 0x2008, 0x918e, 0xdead, 0x1120, 0x2021, 0x4009,
-	0x0804, 0x33a0, 0x9086, 0x0100, 0x7024, 0x2058, 0x1110, 0x0804,
-	0x5305, 0x900e, 0x080c, 0x6582, 0x1108, 0xc185, 0xb800, 0xd0bc,
-	0x0108, 0xc18d, 0x0804, 0x339e, 0x080c, 0x53bc, 0x0120, 0x2009,
-	0x0007, 0x0804, 0x33d0, 0x7f84, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98,
-	0x080c, 0x489a, 0x1120, 0x2009, 0x0002, 0x0804, 0x33d0, 0x900e,
-	0x2130, 0x7126, 0x7132, 0xa860, 0x20e8, 0x7036, 0xa85c, 0x9080,
-	0x0005, 0x702a, 0x20a0, 0x080c, 0x628f, 0x1904, 0x4bff, 0x080c,
-	0x668a, 0x0120, 0x080c, 0x6692, 0x1904, 0x4bff, 0x080c, 0x6682,
-	0x1130, 0x080c, 0x6582, 0x1118, 0xd79c, 0x0904, 0x4bff, 0xd794,
-	0x1110, 0xd784, 0x01a8, 0xb8b4, 0x20e0, 0xb8b8, 0x9080, 0x0006,
-	0x2098, 0x3400, 0xd794, 0x0160, 0x20a9, 0x0008, 0x4003, 0x2098,
-	0x20a0, 0x3d00, 0x20e0, 0x20a9, 0x0002, 0x080c, 0x46ac, 0x0048,
-	0x20a9, 0x0004, 0x4003, 0x2098, 0x20a0, 0x3d00, 0x20e0, 0x080c,
-	0x46ac, 0x4104, 0xd794, 0x0528, 0xb8b4, 0x20e0, 0xb8b8, 0x2060,
-	0x9c80, 0x0000, 0x2098, 0x20a9, 0x0002, 0x4003, 0x9c80, 0x0003,
-	0x2098, 0x20a9, 0x0001, 0x4005, 0x9c80, 0x0004, 0x2098, 0x3400,
-	0x20a9, 0x0002, 0x4003, 0x2098, 0x20a0, 0x3d00, 0x20e0, 0x080c,
-	0x469f, 0x9c80, 0x0026, 0x2098, 0xb8b4, 0x20e0, 0x20a9, 0x0002,
-	0x4003, 0xd794, 0x0110, 0x96b0, 0x000b, 0x96b0, 0x0005, 0x8108,
-	0x080c, 0x9b65, 0x0118, 0x9186, 0x0800, 0x0040, 0xd78c, 0x0120,
-	0x9186, 0x0800, 0x0170, 0x0018, 0x9186, 0x007e, 0x0150, 0xd794,
-	0x0118, 0x9686, 0x0020, 0x0010, 0x9686, 0x0028, 0x0150, 0x0804,
-	0x4b9b, 0x86ff, 0x1120, 0x7124, 0x810b, 0x0804, 0x339e, 0x7033,
-	0x0001, 0x7122, 0x7024, 0x9600, 0x7026, 0x772e, 0x2061, 0x18b6,
-	0x2c44, 0xa06b, 0x0000, 0xa67a, 0x7034, 0xa072, 0x7028, 0xa076,
-	0xa28e, 0xa392, 0xa496, 0xa59a, 0x080c, 0x1124, 0x7007, 0x0002,
-	0x701f, 0x4c3b, 0x0005, 0x7030, 0x9005, 0x1180, 0x7120, 0x7028,
-	0x20a0, 0x772c, 0x9036, 0x7034, 0x20e8, 0x2061, 0x18b6, 0x2c44,
-	0xa28c, 0xa390, 0xa494, 0xa598, 0x0804, 0x4b9b, 0x7124, 0x810b,
-	0x0804, 0x339e, 0x2029, 0x007e, 0x7984, 0x7a88, 0x7b8c, 0x7c98,
-	0x9184, 0xff00, 0x8007, 0x90e2, 0x0020, 0x0a04, 0x33d3, 0x9502,
-	0x0a04, 0x33d3, 0x9184, 0x00ff, 0x90e2, 0x0020, 0x0a04, 0x33d3,
-	0x9502, 0x0a04, 0x33d3, 0x9284, 0xff00, 0x8007, 0x90e2, 0x0020,
-	0x0a04, 0x33d3, 0x9502, 0x0a04, 0x33d3, 0x9284, 0x00ff, 0x90e2,
-	0x0020, 0x0a04, 0x33d3, 0x9502, 0x0a04, 0x33d3, 0x9384, 0xff00,
-	0x8007, 0x90e2, 0x0020, 0x0a04, 0x33d3, 0x9502, 0x0a04, 0x33d3,
-	0x9384, 0x00ff, 0x90e2, 0x0020, 0x0a04, 0x33d3, 0x9502, 0x0a04,
-	0x33d3, 0x9484, 0xff00, 0x8007, 0x90e2, 0x0020, 0x0a04, 0x33d3,
-	0x9502, 0x0a04, 0x33d3, 0x9484, 0x00ff, 0x90e2, 0x0020, 0x0a04,
-	0x33d3, 0x9502, 0x0a04, 0x33d3, 0x2061, 0x1961, 0x6102, 0x6206,
-	0x630a, 0x640e, 0x0804, 0x339e, 0x0006, 0x080c, 0x53a8, 0xd0cc,
-	0x000e, 0x0005, 0x0006, 0x080c, 0x53ac, 0xd0bc, 0x000e, 0x0005,
-	0x6170, 0x7a84, 0x6300, 0x82ff, 0x1118, 0x7986, 0x0804, 0x339e,
-	0x83ff, 0x1904, 0x33d3, 0x2001, 0xfff0, 0x9200, 0x1a04, 0x33d3,
-	0x2019, 0xffff, 0x6074, 0x9302, 0x9200, 0x0a04, 0x33d3, 0x7986,
-	0x6272, 0x0804, 0x339e, 0x080c, 0x53bc, 0x1904, 0x33d0, 0x7c88,
-	0x7d84, 0x7e98, 0x7f8c, 0x080c, 0x489a, 0x0904, 0x33d0, 0x900e,
-	0x901e, 0x7326, 0x7332, 0xa860, 0x20e8, 0x7036, 0xa85c, 0x9080,
-	0x0003, 0x702a, 0x20a0, 0x91d8, 0x1000, 0x2b5c, 0x8bff, 0x0178,
-	0x080c, 0x668a, 0x0118, 0x080c, 0x6692, 0x1148, 0x20a9, 0x0001,
-	0xb814, 0x4004, 0xb810, 0x4004, 0x4104, 0x9398, 0x0003, 0x8108,
-	0x9182, 0x0800, 0x0120, 0x9386, 0x003c, 0x0170, 0x0c20, 0x83ff,
-	0x1148, 0x7224, 0x900e, 0x2001, 0x0003, 0x080c, 0x842f, 0x2208,
-	0x0804, 0x339e, 0x7033, 0x0001, 0x7122, 0x7024, 0x9300, 0x7026,
-	0x2061, 0x18b6, 0x2c44, 0xa06b, 0x0000, 0xa37a, 0x7028, 0xa076,
-	0x7034, 0xa072, 0xa48e, 0xa592, 0xa696, 0xa79a, 0x080c, 0x1124,
-	0x7007, 0x0002, 0x701f, 0x4d2d, 0x0005, 0x7030, 0x9005, 0x1178,
-	0x7120, 0x7028, 0x20a0, 0x901e, 0x7034, 0x20e8, 0x2061, 0x18b6,
-	0x2c44, 0xa48c, 0xa590, 0xa694, 0xa798, 0x0804, 0x4ceb, 0x7224,
-	0x900e, 0x2001, 0x0003, 0x080c, 0x842f, 0x2208, 0x0804, 0x339e,
-	0x00f6, 0x00e6, 0x080c, 0x53bc, 0x2009, 0x0007, 0x1904, 0x4dc0,
-	0x2071, 0x189c, 0x745c, 0x84ff, 0x2009, 0x000e, 0x1904, 0x4dc0,
-	0xac9c, 0xad98, 0xaea4, 0xafa0, 0x0096, 0x080c, 0x1048, 0x2009,
-	0x0002, 0x0904, 0x4dc0, 0x2900, 0x705e, 0x900e, 0x901e, 0x7356,
-	0x7362, 0xa860, 0x7066, 0xa85c, 0x9080, 0x0003, 0x705a, 0x20a0,
-	0x91d8, 0x1000, 0x2b5c, 0x8bff, 0x0178, 0x080c, 0x668a, 0x0118,
-	0x080c, 0x6692, 0x1148, 0xb814, 0x20a9, 0x0001, 0x4004, 0xb810,
-	0x4004, 0x4104, 0x9398, 0x0003, 0x8108, 0x9182, 0x0800, 0x0120,
-	0x9386, 0x003c, 0x01e8, 0x0c20, 0x83ff, 0x11c0, 0x7254, 0x900e,
-	0x2001, 0x0003, 0x080c, 0x842f, 0x2208, 0x009e, 0xa897, 0x4000,
-	0xa99a, 0x715c, 0x81ff, 0x090c, 0x0d65, 0x2148, 0x080c, 0x1061,
-	0x9006, 0x705e, 0x918d, 0x0001, 0x2008, 0x0418, 0x7063, 0x0001,
-	0x7152, 0x7054, 0x9300, 0x7056, 0x2061, 0x18b7, 0x2c44, 0xa37a,
-	0x7058, 0xa076, 0x7064, 0xa072, 0xa48e, 0xa592, 0xa696, 0xa79a,
-	0xa09f, 0x4dcc, 0x000e, 0xa0a2, 0x080c, 0x1124, 0x9006, 0x0048,
-	0x009e, 0xa897, 0x4005, 0xa99a, 0x900e, 0x9085, 0x0001, 0x2001,
-	0x0030, 0x00ee, 0x00fe, 0x0005, 0x00f6, 0xa0a0, 0x904d, 0x090c,
-	0x0d65, 0x00e6, 0x2071, 0x189c, 0xa06c, 0x908e, 0x0100, 0x0138,
-	0xa87b, 0x0030, 0xa883, 0x0000, 0xa897, 0x4002, 0x00d8, 0x7060,
-	0x9005, 0x1158, 0x7150, 0x7058, 0x20a0, 0x901e, 0x7064, 0x20e8,
-	0xa48c, 0xa590, 0xa694, 0xa798, 0x0428, 0xa87b, 0x0000, 0xa883,
-	0x0000, 0xa897, 0x4000, 0x7254, 0x900e, 0x2001, 0x0003, 0x080c,
-	0x842f, 0xaa9a, 0x715c, 0x81ff, 0x090c, 0x0d65, 0x2148, 0x080c,
-	0x1061, 0x705f, 0x0000, 0xa0a0, 0x2048, 0x0126, 0x2091, 0x8000,
-	0x080c, 0x69b5, 0x012e, 0xa09f, 0x0000, 0xa0a3, 0x0000, 0x00ee,
-	0x00fe, 0x0005, 0x91d8, 0x1000, 0x2b5c, 0x8bff, 0x0178, 0x080c,
-	0x668a, 0x0118, 0x080c, 0x6692, 0x1148, 0xb814, 0x20a9, 0x0001,
-	0x4004, 0xb810, 0x4004, 0x4104, 0x9398, 0x0003, 0x8108, 0x9182,
-	0x0800, 0x0120, 0x9386, 0x003c, 0x0518, 0x0c20, 0x83ff, 0x11f0,
-	0x7154, 0x810c, 0xa99a, 0xa897, 0x4000, 0x715c, 0x81ff, 0x090c,
-	0x0d65, 0x2148, 0x080c, 0x1061, 0x9006, 0x705e, 0x918d, 0x0001,
-	0x2008, 0xa0a0, 0x2048, 0x0126, 0x2091, 0x8000, 0x080c, 0x69b5,
-	0x012e, 0xa09f, 0x0000, 0xa0a3, 0x0000, 0x0070, 0x7063, 0x0001,
-	0x7152, 0x7054, 0x9300, 0x7056, 0xa37a, 0xa48e, 0xa592, 0xa696,
-	0xa79a, 0x080c, 0x1124, 0x9006, 0x00ee, 0x0005, 0x0096, 0xa88c,
-	0x90be, 0x7000, 0x0148, 0x90be, 0x7100, 0x0130, 0x90be, 0x7200,
-	0x0118, 0x009e, 0x0804, 0x33d3, 0xa884, 0xa988, 0x080c, 0x2459,
-	0x1518, 0x080c, 0x622f, 0x1500, 0x7126, 0xbe12, 0xbd16, 0xae7c,
-	0x080c, 0x489a, 0x01c8, 0x080c, 0x489a, 0x01b0, 0x009e, 0xa867,
-	0x0000, 0xa868, 0xc0fd, 0xa86a, 0xa823, 0x0000, 0xa804, 0x2048,
-	0x080c, 0xba20, 0x1120, 0x2009, 0x0003, 0x0804, 0x33d0, 0x7007,
-	0x0003, 0x701f, 0x4e99, 0x0005, 0x009e, 0x2009, 0x0002, 0x0804,
-	0x33d0, 0x7124, 0x080c, 0x3136, 0xa820, 0x9086, 0x8001, 0x1120,
-	0x2009, 0x0004, 0x0804, 0x33d0, 0x2900, 0x7022, 0xa804, 0x0096,
-	0x2048, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0,
-	0x009e, 0x9080, 0x0002, 0x0076, 0x0006, 0x2098, 0x20a0, 0x27e0,
-	0x27e8, 0x20a9, 0x002a, 0x080c, 0x0fac, 0xaa6c, 0xab70, 0xac74,
-	0xad78, 0x2061, 0x18b6, 0x2c44, 0xa06b, 0x0000, 0xae64, 0xaf8c,
-	0x97c6, 0x7000, 0x0118, 0x97c6, 0x7100, 0x1148, 0x96c2, 0x0004,
-	0x0600, 0x2009, 0x0004, 0x000e, 0x007e, 0x0804, 0x48e6, 0x97c6,
-	0x7200, 0x11b8, 0x96c2, 0x0054, 0x02a0, 0x000e, 0x007e, 0x2061,
-	0x18b6, 0x2c44, 0xa076, 0xa772, 0xa07b, 0x002a, 0xa28e, 0xa392,
-	0xa496, 0xa59a, 0x080c, 0x1124, 0x7007, 0x0002, 0x701f, 0x4ef5,
-	0x0005, 0x000e, 0x007e, 0x0804, 0x33d3, 0x7020, 0x2048, 0xa804,
-	0x2048, 0xa804, 0x2048, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f,
-	0x9084, 0xffc0, 0x9080, 0x0002, 0x2098, 0x20a0, 0x27e0, 0x27e8,
-	0x20a9, 0x002a, 0x080c, 0x0fac, 0x2100, 0x2238, 0x2061, 0x18b6,
-	0x2c44, 0xa28c, 0xa390, 0xa494, 0xa598, 0x2009, 0x002a, 0x0804,
-	0x48e6, 0x81ff, 0x1904, 0x33d0, 0x798c, 0x2001, 0x1956, 0x918c,
-	0x8000, 0x2102, 0x080c, 0x48b1, 0x0904, 0x33d3, 0x080c, 0x668a,
-	0x0120, 0x080c, 0x6692, 0x1904, 0x33d3, 0x080c, 0x6356, 0x0904,
-	0x33d0, 0x0126, 0x2091, 0x8000, 0x080c, 0x64ef, 0x012e, 0x0904,
-	0x33d0, 0x2001, 0x1956, 0x2004, 0xd0fc, 0x1904, 0x339e, 0x0804,
-	0x4348, 0xa9a0, 0x2001, 0x1956, 0x918c, 0x8000, 0xc18d, 0x2102,
-	0x080c, 0x48be, 0x01a0, 0x080c, 0x668a, 0x0118, 0x080c, 0x6692,
-	0x1170, 0x080c, 0x6356, 0x2009, 0x0002, 0x0128, 0x080c, 0x64ef,
-	0x1170, 0x2009, 0x0003, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897,
-	0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x0005, 0xa897,
-	0x4000, 0x2001, 0x1956, 0x2004, 0xd0fc, 0x1128, 0x080c, 0x53b0,
-	0x0110, 0x9006, 0x0018, 0x900e, 0x9085, 0x0001, 0x2001, 0x0000,
-	0x0005, 0x78a8, 0xd08c, 0x1118, 0xd084, 0x0904, 0x42bd, 0x080c,
-	0x48cd, 0x0904, 0x33d3, 0x080c, 0x489a, 0x1120, 0x2009, 0x0002,
-	0x0804, 0x33d0, 0x080c, 0x668a, 0x0130, 0x908e, 0x0004, 0x0118,
-	0x908e, 0x0005, 0x15a0, 0x78a8, 0xd08c, 0x0120, 0xb800, 0xc08c,
-	0xb802, 0x0028, 0x080c, 0x53a8, 0xd0b4, 0x0904, 0x42f7, 0x7884,
-	0x908e, 0x007e, 0x0904, 0x42f7, 0x908e, 0x007f, 0x0904, 0x42f7,
-	0x908e, 0x0080, 0x0904, 0x42f7, 0xb800, 0xd08c, 0x1904, 0x42f7,
-	0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, 0x080c, 0xba3f, 0x1120,
-	0x2009, 0x0003, 0x0804, 0x33d0, 0x7007, 0x0003, 0x701f, 0x4fc1,
-	0x0005, 0x080c, 0x48cd, 0x0904, 0x33d3, 0x0804, 0x42f7, 0x080c,
-	0x3195, 0x0108, 0x0005, 0x2009, 0x1833, 0x210c, 0x81ff, 0x0120,
-	0x2009, 0x0001, 0x0804, 0x33d0, 0x080c, 0x53bc, 0x0120, 0x2009,
-	0x0007, 0x0804, 0x33d0, 0x080c, 0x6682, 0x0120, 0x2009, 0x0008,
-	0x0804, 0x33d0, 0xb89c, 0xd0a4, 0x1118, 0xd0ac, 0x1904, 0x42f7,
-	0x9006, 0xa866, 0xa832, 0xa868, 0xc0fd, 0xa86a, 0x080c, 0xbaa7,
-	0x1120, 0x2009, 0x0003, 0x0804, 0x33d0, 0x7007, 0x0003, 0x701f,
-	0x4ffa, 0x0005, 0xa830, 0x9086, 0x0100, 0x1120, 0x2009, 0x0004,
-	0x0804, 0x5305, 0x080c, 0x48cd, 0x0904, 0x33d3, 0x0804, 0x4f93,
-	0x81ff, 0x2009, 0x0001, 0x1904, 0x33d0, 0x080c, 0x53bc, 0x2009,
-	0x0007, 0x1904, 0x33d0, 0x080c, 0x6682, 0x0120, 0x2009, 0x0008,
-	0x0804, 0x33d0, 0x080c, 0x48cd, 0x0904, 0x33d3, 0x080c, 0x668a,
-	0x2009, 0x0009, 0x1904, 0x33d0, 0x080c, 0x489a, 0x2009, 0x0002,
-	0x0904, 0x33d0, 0x9006, 0xa866, 0xa832, 0xa868, 0xc0fd, 0xa86a,
-	0x7988, 0x9194, 0xff00, 0x918c, 0x00ff, 0x9006, 0x82ff, 0x1128,
-	0xc0ed, 0xa952, 0x798c, 0xa956, 0x0038, 0x928e, 0x0100, 0x1904,
-	0x33d3, 0xc0e5, 0xa952, 0xa956, 0xa83e, 0x080c, 0xbd0a, 0x2009,
-	0x0003, 0x0904, 0x33d0, 0x7007, 0x0003, 0x701f, 0x5050, 0x0005,
-	0xa830, 0x9086, 0x0100, 0x2009, 0x0004, 0x0904, 0x33d0, 0x0804,
-	0x339e, 0x7aa8, 0x9284, 0xc000, 0x0148, 0xd2ec, 0x01a0, 0x080c,
-	0x53bc, 0x1188, 0x2009, 0x0014, 0x0804, 0x33d0, 0xd2dc, 0x1568,
-	0x81ff, 0x2009, 0x0001, 0x1904, 0x33d0, 0x080c, 0x53bc, 0x2009,
-	0x0007, 0x1904, 0x33d0, 0xd2f4, 0x0130, 0x9284, 0x5000, 0x080c,
-	0x5383, 0x0804, 0x339e, 0xd2fc, 0x0158, 0x080c, 0x48cd, 0x0904,
-	0x33d3, 0x7984, 0x9284, 0x9000, 0x080c, 0x5360, 0x0804, 0x339e,
-	0x080c, 0x48cd, 0x0904, 0x33d3, 0xb804, 0x9084, 0x00ff, 0x9086,
-	0x0006, 0x2009, 0x0009, 0x1904, 0x5139, 0x080c, 0x489a, 0x2009,
-	0x0002, 0x0904, 0x5139, 0xa85c, 0x9080, 0x001b, 0xaf60, 0x2009,
-	0x0008, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x080c, 0x48e3, 0x701f,
-	0x50aa, 0x0005, 0xa86c, 0x9086, 0x0500, 0x1138, 0xa870, 0x9005,
-	0x1120, 0xa874, 0x9084, 0xff00, 0x0110, 0x1904, 0x33d3, 0xa866,
-	0xa832, 0xa868, 0xc0fd, 0xa86a, 0x080c, 0x48cd, 0x1110, 0x0804,
-	0x33d3, 0x2009, 0x0043, 0x080c, 0xbd72, 0x2009, 0x0003, 0x0904,
-	0x5139, 0x7007, 0x0003, 0x701f, 0x50ce, 0x0005, 0xa830, 0x9086,
-	0x0100, 0x2009, 0x0004, 0x0904, 0x5139, 0x7984, 0x7aa8, 0x9284,
-	0x1000, 0x080c, 0x5360, 0x0804, 0x339e, 0x00c6, 0xaab0, 0x9284,
-	0xc000, 0x0140, 0xd2ec, 0x0168, 0x080c, 0x53bc, 0x1150, 0x2009,
-	0x0014, 0x04f0, 0x2061, 0x1800, 0x080c, 0x53bc, 0x2009, 0x0007,
-	0x15b8, 0xd2f4, 0x0128, 0x9284, 0x5000, 0x080c, 0x5383, 0x0050,
-	0xd2fc, 0x0178, 0x080c, 0x48cb, 0x0588, 0xa998, 0x9284, 0x9000,
-	0x080c, 0x5360, 0xa87b, 0x0000, 0xa883, 0x0000, 0xa897, 0x4000,
-	0x0438, 0x080c, 0x48cb, 0x0510, 0x080c, 0x668a, 0x2009, 0x0009,
-	0x11b8, 0xa8c4, 0x9086, 0x0500, 0x11c8, 0xa8c8, 0x9005, 0x11b0,
-	0xa8cc, 0x9084, 0xff00, 0x1190, 0x080c, 0x48cb, 0x1108, 0x0070,
-	0x2009, 0x004b, 0x080c, 0xbd72, 0x2009, 0x0003, 0x0108, 0x0078,
-	0x0429, 0x19c0, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006,
-	0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x00ce, 0x0005, 0x9006,
-	0x0ce0, 0x7aa8, 0xd2dc, 0x0904, 0x33d0, 0x0016, 0x7984, 0x9284,
-	0x1000, 0xc0fd, 0x080c, 0x5360, 0x001e, 0x1904, 0x33d0, 0x0804,
-	0x339e, 0x00f6, 0x2d78, 0x0011, 0x00fe, 0x0005, 0xaab0, 0xd2dc,
-	0x0150, 0x0016, 0xa998, 0x9284, 0x1000, 0xc0fd, 0x080c, 0x5360,
-	0x001e, 0x9085, 0x0001, 0x0005, 0x81ff, 0x0120, 0x2009, 0x0001,
-	0x0804, 0x33d0, 0x080c, 0x53bc, 0x0120, 0x2009, 0x0007, 0x0804,
-	0x33d0, 0x7984, 0x7ea8, 0x96b4, 0x00ff, 0x080c, 0x628f, 0x1904,
-	0x33d3, 0x9186, 0x007f, 0x0138, 0x080c, 0x668a, 0x0120, 0x2009,
-	0x0009, 0x0804, 0x33d0, 0x080c, 0x489a, 0x1120, 0x2009, 0x0002,
-	0x0804, 0x33d0, 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, 0x2001,
-	0x0100, 0x8007, 0xa80a, 0x080c, 0xba59, 0x1120, 0x2009, 0x0003,
-	0x0804, 0x33d0, 0x7007, 0x0003, 0x701f, 0x5197, 0x0005, 0xa808,
-	0x8007, 0x9086, 0x0100, 0x1120, 0x2009, 0x0004, 0x0804, 0x33d0,
-	0xa8e0, 0xa866, 0xa810, 0x8007, 0x9084, 0x00ff, 0x800c, 0xa814,
-	0x8007, 0x9084, 0x00ff, 0x8004, 0x9080, 0x0002, 0x9108, 0x8906,
-	0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0004,
-	0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x0804, 0x48e6, 0x080c, 0x489a,
-	0x1120, 0x2009, 0x0002, 0x0804, 0x33d0, 0x7984, 0x9194, 0xff00,
-	0x918c, 0x00ff, 0x8217, 0x82ff, 0x1118, 0x7023, 0x198b, 0x0040,
-	0x92c6, 0x0001, 0x1118, 0x7023, 0x19a5, 0x0010, 0x0804, 0x33d3,
-	0x2009, 0x001a, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0xa85c, 0x9080,
-	0x0019, 0xaf60, 0x080c, 0x48e3, 0x701f, 0x51e7, 0x0005, 0x2001,
-	0x182d, 0x2003, 0x0001, 0xa85c, 0x9080, 0x0019, 0x2098, 0xa860,
-	0x20e0, 0x20a9, 0x001a, 0x7020, 0x20a0, 0x20e9, 0x0001, 0x4003,
-	0x0804, 0x339e, 0x080c, 0x489a, 0x1120, 0x2009, 0x0002, 0x0804,
-	0x33d0, 0x7984, 0x9194, 0xff00, 0x918c, 0x00ff, 0x8217, 0x82ff,
-	0x1118, 0x2099, 0x198b, 0x0040, 0x92c6, 0x0001, 0x1118, 0x2099,
-	0x19a5, 0x0010, 0x0804, 0x33d3, 0xa85c, 0x9080, 0x0019, 0x20a0,
-	0xa860, 0x20e8, 0x20a9, 0x001a, 0x20e1, 0x0001, 0x4003, 0x2009,
-	0x001a, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0xa85c, 0x9080, 0x0019,
-	0xaf60, 0x0804, 0x48e6, 0x7884, 0x908a, 0x1000, 0x1a04, 0x33d3,
-	0x0126, 0x2091, 0x8000, 0x8003, 0x800b, 0x810b, 0x9108, 0x00c6,
-	0x2061, 0x19db, 0x6142, 0x00ce, 0x012e, 0x0804, 0x339e, 0x00c6,
-	0x080c, 0x70ba, 0x1160, 0x080c, 0x73b9, 0x080c, 0x5cf7, 0x9085,
-	0x0001, 0x080c, 0x7101, 0x080c, 0x6feb, 0x080c, 0x0d65, 0x2061,
-	0x1800, 0x6030, 0xc09d, 0x6032, 0x080c, 0x5bb2, 0x00ce, 0x0005,
-	0x00c6, 0x2001, 0x1800, 0x2004, 0x908e, 0x0000, 0x0904, 0x33d0,
-	0x7884, 0x9005, 0x0188, 0x7888, 0x2061, 0x1974, 0x2c0c, 0x2062,
-	0x080c, 0x2840, 0x01a0, 0x080c, 0x2848, 0x0188, 0x080c, 0x2850,
-	0x0170, 0x2162, 0x0804, 0x33d3, 0x2061, 0x0100, 0x6038, 0x9086,
-	0x0007, 0x1118, 0x2009, 0x0001, 0x0010, 0x2009, 0x0000, 0x7884,
-	0x9086, 0x0002, 0x1588, 0x2061, 0x0100, 0x6028, 0xc09c, 0x602a,
-	0x080c, 0x98c7, 0x0026, 0x2011, 0x0003, 0x080c, 0x9324, 0x2011,
-	0x0002, 0x080c, 0x932e, 0x002e, 0x080c, 0x921d, 0x0036, 0x901e,
-	0x080c, 0x929d, 0x003e, 0x080c, 0x98e3, 0x60e3, 0x0000, 0x080c,
-	0xd644, 0x080c, 0xd65f, 0x9085, 0x0001, 0x080c, 0x7101, 0x9006,
-	0x080c, 0x2872, 0x2001, 0x1800, 0x2003, 0x0004, 0x0026, 0x2011,
-	0x0008, 0x080c, 0x28ac, 0x002e, 0x00ce, 0x0804, 0x339e, 0x81ff,
-	0x0120, 0x2009, 0x0001, 0x0804, 0x33d0, 0x080c, 0x53bc, 0x0120,
-	0x2009, 0x0007, 0x0804, 0x33d0, 0x7984, 0x7ea8, 0x96b4, 0x00ff,
-	0x080c, 0x628f, 0x1904, 0x33d3, 0x9186, 0x007f, 0x0138, 0x080c,
-	0x668a, 0x0120, 0x2009, 0x0009, 0x0804, 0x33d0, 0x080c, 0x489a,
-	0x1120, 0x2009, 0x0002, 0x0804, 0x33d0, 0xa867, 0x0000, 0xa868,
-	0xc0fd, 0xa86a, 0x080c, 0xba5c, 0x1120, 0x2009, 0x0003, 0x0804,
-	0x33d0, 0x7007, 0x0003, 0x701f, 0x52ee, 0x0005, 0xa830, 0x9086,
-	0x0100, 0x1120, 0x2009, 0x0004, 0x0804, 0x33d0, 0xa8e0, 0xa866,
-	0xa834, 0x8007, 0x800c, 0xa85c, 0x9080, 0x000c, 0x7a8c, 0x7b88,
-	0x7c9c, 0x7d98, 0xaf60, 0x0804, 0x48e6, 0xa898, 0x9086, 0x000d,
-	0x1904, 0x33d0, 0x2021, 0x4005, 0x0126, 0x2091, 0x8000, 0x0e04,
-	0x5312, 0x0010, 0x012e, 0x0cc0, 0x7c36, 0x9486, 0x4000, 0x0118,
-	0x7833, 0x0011, 0x0010, 0x7833, 0x0010, 0x7883, 0x4005, 0xa998,
-	0x7986, 0xa9a4, 0x799a, 0xa9a8, 0x799e, 0x080c, 0x48d6, 0x2091,
-	0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11d6, 0x7007,
-	0x0001, 0x2091, 0x5000, 0x700f, 0x0000, 0x012e, 0x0005, 0x0126,
-	0x2091, 0x8000, 0x00c6, 0x2061, 0x19db, 0x7984, 0x6152, 0x614e,
-	0x6057, 0x0000, 0x604b, 0x0009, 0x7898, 0x606a, 0x789c, 0x6066,
-	0x7888, 0x6062, 0x788c, 0x605e, 0x2001, 0x19e9, 0x2044, 0x2001,
-	0x19f0, 0xa076, 0xa060, 0xa072, 0xa07b, 0x0001, 0xa07f, 0x0002,
-	0xa06b, 0x0000, 0xa09f, 0x0000, 0x00ce, 0x012e, 0x0804, 0x339e,
-	0x0126, 0x2091, 0x8000, 0x00b6, 0x00c6, 0x90e4, 0xc000, 0x0128,
-	0x0006, 0x080c, 0xb8bd, 0x000e, 0x1198, 0xd0e4, 0x0160, 0x9180,
-	0x1000, 0x2004, 0x905d, 0x0160, 0x080c, 0x5d11, 0x080c, 0x9b65,
-	0x0110, 0xb817, 0x0000, 0x9006, 0x00ce, 0x00be, 0x012e, 0x0005,
-	0x9085, 0x0001, 0x0cc8, 0x0126, 0x2091, 0x8000, 0x0156, 0x2010,
-	0x900e, 0x20a9, 0x0800, 0x0016, 0x9180, 0x1000, 0x2004, 0x9005,
-	0x0180, 0x9186, 0x007e, 0x0168, 0x9186, 0x007f, 0x0150, 0x9186,
-	0x0080, 0x0138, 0x9186, 0x00ff, 0x0120, 0x0026, 0x2200, 0x0801,
-	0x002e, 0x001e, 0x8108, 0x1f04, 0x538b, 0x015e, 0x012e, 0x0005,
-	0x2001, 0x185c, 0x2004, 0x0005, 0x2001, 0x187b, 0x2004, 0x0005,
-	0x0006, 0x2001, 0x1810, 0x2004, 0xd0d4, 0x000e, 0x0005, 0x2001,
-	0x180e, 0x2004, 0xd0b4, 0x0005, 0x2001, 0x1800, 0x2004, 0x9086,
-	0x0003, 0x0005, 0x0016, 0x00e6, 0x2071, 0x189c, 0x7108, 0x910d,
-	0x710a, 0x00ee, 0x001e, 0x0005, 0x79a4, 0x9182, 0x0081, 0x1a04,
-	0x33d3, 0x810c, 0x0016, 0x080c, 0x489a, 0x080c, 0x0f37, 0x2100,
-	0x2238, 0x7d84, 0x7c88, 0x7b8c, 0x7a90, 0x001e, 0x080c, 0x48e3,
-	0x701f, 0x53e3, 0x0005, 0x2079, 0x0000, 0x7d94, 0x7c98, 0x7ba8,
-	0x7aac, 0x79a4, 0x810c, 0x2061, 0x18b6, 0x2c44, 0xa770, 0xa074,
-	0x2071, 0x189c, 0x080c, 0x48e6, 0x701f, 0x53f7, 0x0005, 0x2061,
-	0x18b6, 0x2c44, 0x0016, 0x0026, 0xa270, 0xa174, 0x080c, 0x0f3f,
-	0x002e, 0x001e, 0x080c, 0x0fec, 0x9006, 0xa802, 0xa806, 0x0804,
-	0x339e, 0x0126, 0x0156, 0x0136, 0x0146, 0x01c6, 0x01d6, 0x00c6,
-	0x00d6, 0x00e6, 0x00f6, 0x2061, 0x0100, 0x2069, 0x0200, 0x2071,
-	0x1800, 0x6044, 0xd0a4, 0x11e8, 0xd084, 0x0118, 0x080c, 0x55b2,
-	0x0068, 0xd08c, 0x0118, 0x080c, 0x54bb, 0x0040, 0xd094, 0x0118,
-	0x080c, 0x548b, 0x0018, 0xd09c, 0x0108, 0x0099, 0x00fe, 0x00ee,
-	0x00de, 0x00ce, 0x01de, 0x01ce, 0x014e, 0x013e, 0x015e, 0x012e,
-	0x0005, 0x0016, 0x6128, 0xd19c, 0x1110, 0xc19d, 0x612a, 0x001e,
-	0x0c68, 0x0006, 0x7094, 0x9005, 0x000e, 0x0120, 0x7097, 0x0000,
-	0x708f, 0x0000, 0x624c, 0x9286, 0xf0f0, 0x1150, 0x6048, 0x9086,
-	0xf0f0, 0x0130, 0x624a, 0x6043, 0x0090, 0x6043, 0x0010, 0x0490,
-	0x9294, 0xff00, 0x9296, 0xf700, 0x0178, 0x7138, 0xd1a4, 0x1160,
-	0x6240, 0x9295, 0x0100, 0x6242, 0x9294, 0x0010, 0x0128, 0x2009,
-	0x00f7, 0x080c, 0x5c73, 0x00f0, 0x6040, 0x9084, 0x0010, 0x9085,
-	0x0140, 0x6042, 0x6043, 0x0000, 0x7083, 0x0000, 0x709f, 0x0001,
-	0x70c3, 0x0000, 0x70db, 0x0000, 0x2009, 0x1d80, 0x200b, 0x0000,
-	0x7093, 0x0000, 0x7087, 0x000f, 0x2009, 0x000f, 0x2011, 0x5b55,
-	0x080c, 0x8230, 0x0005, 0x2001, 0x187d, 0x2004, 0xd08c, 0x0110,
-	0x705b, 0xffff, 0x7084, 0x9005, 0x1528, 0x2011, 0x5b55, 0x080c,
-	0x816c, 0x6040, 0x9094, 0x0010, 0x9285, 0x0020, 0x6042, 0x20a9,
-	0x00c8, 0x6044, 0xd08c, 0x1168, 0x1f04, 0x54a1, 0x6242, 0x7097,
-	0x0000, 0x6040, 0x9094, 0x0010, 0x9285, 0x0080, 0x6042, 0x6242,
-	0x0048, 0x6242, 0x7097, 0x0000, 0x708b, 0x0000, 0x9006, 0x080c,
-	0x5cfc, 0x0000, 0x0005, 0x7088, 0x908a, 0x0003, 0x1a0c, 0x0d65,
-	0x000b, 0x0005, 0x54c5, 0x5516, 0x55b1, 0x00f6, 0x0016, 0x6900,
-	0x918c, 0x0800, 0x708b, 0x0001, 0x2001, 0x015d, 0x2003, 0x0000,
-	0x6803, 0x00fc, 0x20a9, 0x0004, 0x6800, 0x9084, 0x00fc, 0x0120,
-	0x1f04, 0x54d4, 0x080c, 0x0d65, 0x68a0, 0x68a2, 0x689c, 0x689e,
-	0x6898, 0x689a, 0xa001, 0x918d, 0x1600, 0x6902, 0x001e, 0x6837,
-	0x0020, 0x080c, 0x5cd8, 0x2079, 0x1d00, 0x7833, 0x1101, 0x7837,
-	0x0000, 0x20e1, 0x0001, 0x2099, 0x1805, 0x20e9, 0x0001, 0x20a1,
-	0x1d0e, 0x20a9, 0x0004, 0x4003, 0x080c, 0x97f4, 0x20e1, 0x0001,
-	0x2099, 0x1d00, 0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9, 0x0014,
-	0x4003, 0x60c3, 0x000c, 0x600f, 0x0000, 0x080c, 0x5b86, 0x00fe,
-	0x9006, 0x708e, 0x6043, 0x0008, 0x6042, 0x0005, 0x00f6, 0x708c,
-	0x708f, 0x0000, 0x9025, 0x0904, 0x558e, 0x6020, 0xd0b4, 0x1904,
-	0x558c, 0x719c, 0x81ff, 0x0904, 0x557a, 0x9486, 0x000c, 0x1904,
-	0x5587, 0x9480, 0x0018, 0x8004, 0x20a8, 0x080c, 0x5cd1, 0x2011,
-	0x0260, 0x2019, 0x1d00, 0x220c, 0x2304, 0x9106, 0x11e8, 0x8210,
-	0x8318, 0x1f04, 0x5533, 0x6043, 0x0004, 0x2061, 0x0140, 0x605b,
-	0xbc94, 0x605f, 0xf0f0, 0x2061, 0x0100, 0x6043, 0x0006, 0x708b,
-	0x0002, 0x7097, 0x0002, 0x2009, 0x07d0, 0x2011, 0x5b5c, 0x080c,
-	0x8230, 0x080c, 0x5cd8, 0x04c0, 0x080c, 0x5cd1, 0x2079, 0x0260,
-	0x7930, 0x918e, 0x1101, 0x1558, 0x7834, 0x9005, 0x1540, 0x7900,
-	0x918c, 0x00ff, 0x1118, 0x7804, 0x9005, 0x0190, 0x080c, 0x5cd1,
-	0x2011, 0x026e, 0x2019, 0x1805, 0x20a9, 0x0004, 0x220c, 0x2304,
-	0x9102, 0x0230, 0x11a0, 0x8210, 0x8318, 0x1f04, 0x556e, 0x0078,
-	0x709f, 0x0000, 0x080c, 0x5cd1, 0x20e1, 0x0000, 0x2099, 0x0260,
-	0x20e9, 0x0001, 0x20a1, 0x1d00, 0x20a9, 0x0014, 0x4003, 0x6043,
-	0x0008, 0x6043, 0x0000, 0x0010, 0x00fe, 0x0005, 0x6040, 0x9085,
-	0x0100, 0x6042, 0x6020, 0xd0b4, 0x1db8, 0x080c, 0x97f4, 0x20e1,
-	0x0001, 0x2099, 0x1d00, 0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9,
-	0x0014, 0x4003, 0x60c3, 0x000c, 0x2011, 0x19cc, 0x2013, 0x0000,
-	0x708f, 0x0000, 0x60a3, 0x0056, 0x60a7, 0x9575, 0x080c, 0x8fc3,
-	0x08d8, 0x0005, 0x7094, 0x908a, 0x001d, 0x1a0c, 0x0d65, 0x000b,
-	0x0005, 0x55e3, 0x55f6, 0x561f, 0x563f, 0x5665, 0x5694, 0x56ba,
-	0x56f2, 0x5718, 0x5746, 0x5781, 0x57b9, 0x57d7, 0x5802, 0x5824,
-	0x583f, 0x5849, 0x587d, 0x58a3, 0x58d2, 0x58f8, 0x5930, 0x5974,
-	0x59b1, 0x59d2, 0x5a2b, 0x5a4d, 0x5a7b, 0x5a7b, 0x00c6, 0x2061,
-	0x1800, 0x6003, 0x0007, 0x2061, 0x0100, 0x6004, 0x9084, 0xfff9,
-	0x6006, 0x00ce, 0x0005, 0x2061, 0x0140, 0x605b, 0xbc94, 0x605f,
-	0xf0f0, 0x2061, 0x0100, 0x6043, 0x0002, 0x7097, 0x0001, 0x2009,
-	0x07d0, 0x2011, 0x5b5c, 0x080c, 0x8230, 0x0005, 0x00f6, 0x708c,
-	0x9086, 0x0014, 0x1510, 0x6042, 0x6020, 0xd0b4, 0x11f0, 0x080c,
-	0x5cd1, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1102, 0x11a0, 0x7834,
-	0x9005, 0x1188, 0x7a38, 0xd2fc, 0x0128, 0x70c0, 0x9005, 0x1110,
-	0x70c3, 0x0001, 0x2011, 0x5b5c, 0x080c, 0x816c, 0x7097, 0x0010,
-	0x080c, 0x5849, 0x0010, 0x708f, 0x0000, 0x00fe, 0x0005, 0x00f6,
-	0x7097, 0x0003, 0x6043, 0x0004, 0x2011, 0x5b5c, 0x080c, 0x816c,
-	0x080c, 0x5c55, 0x2079, 0x0240, 0x7833, 0x1102, 0x7837, 0x0000,
-	0x20a9, 0x0008, 0x9f88, 0x000e, 0x200b, 0x0000, 0x8108, 0x1f04,
-	0x5634, 0x60c3, 0x0014, 0x080c, 0x5b86, 0x00fe, 0x0005, 0x00f6,
-	0x708c, 0x9005, 0x0500, 0x2011, 0x5b5c, 0x080c, 0x816c, 0x9086,
-	0x0014, 0x11b8, 0x080c, 0x5cd1, 0x2079, 0x0260, 0x7a30, 0x9296,
-	0x1102, 0x1178, 0x7834, 0x9005, 0x1160, 0x7a38, 0xd2fc, 0x0128,
-	0x70c0, 0x9005, 0x1110, 0x70c3, 0x0001, 0x7097, 0x0004, 0x0029,
-	0x0010, 0x080c, 0x5cad, 0x00fe, 0x0005, 0x00f6, 0x7097, 0x0005,
-	0x080c, 0x5c55, 0x2079, 0x0240, 0x7833, 0x1103, 0x7837, 0x0000,
-	0x080c, 0x5cd1, 0x080c, 0x5cb4, 0x1170, 0x7080, 0x9005, 0x1158,
-	0x7158, 0x9186, 0xffff, 0x0138, 0x2011, 0x0008, 0x080c, 0x5b09,
-	0x0168, 0x080c, 0x5c8a, 0x20a9, 0x0008, 0x20e1, 0x0000, 0x2099,
-	0x026e, 0x20e9, 0x0000, 0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014,
-	0x080c, 0x5b86, 0x00fe, 0x0005, 0x00f6, 0x708c, 0x9005, 0x0500,
-	0x2011, 0x5b5c, 0x080c, 0x816c, 0x9086, 0x0014, 0x11b8, 0x080c,
-	0x5cd1, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1103, 0x1178, 0x7834,
-	0x9005, 0x1160, 0x7a38, 0xd2fc, 0x0128, 0x70c0, 0x9005, 0x1110,
-	0x70c3, 0x0001, 0x7097, 0x0006, 0x0029, 0x0010, 0x080c, 0x5cad,
-	0x00fe, 0x0005, 0x00f6, 0x7097, 0x0007, 0x080c, 0x5c55, 0x2079,
-	0x0240, 0x7833, 0x1104, 0x7837, 0x0000, 0x080c, 0x5cd1, 0x080c,
-	0x5cb4, 0x11b8, 0x7080, 0x9005, 0x11a0, 0x7160, 0x9186, 0xffff,
-	0x0180, 0x9180, 0x319f, 0x200d, 0x918c, 0xff00, 0x810f, 0x2011,
-	0x0008, 0x080c, 0x5b09, 0x0180, 0x080c, 0x4cb2, 0x0110, 0x080c,
-	0x24c2, 0x20a9, 0x0008, 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9,
-	0x0000, 0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014, 0x080c, 0x5b86,
-	0x00fe, 0x0005, 0x00f6, 0x708c, 0x9005, 0x0500, 0x2011, 0x5b5c,
-	0x080c, 0x816c, 0x9086, 0x0014, 0x11b8, 0x080c, 0x5cd1, 0x2079,
-	0x0260, 0x7a30, 0x9296, 0x1104, 0x1178, 0x7834, 0x9005, 0x1160,
-	0x7a38, 0xd2fc, 0x0128, 0x70c0, 0x9005, 0x1110, 0x70c3, 0x0001,
-	0x7097, 0x0008, 0x0029, 0x0010, 0x080c, 0x5cad, 0x00fe, 0x0005,
-	0x00f6, 0x7097, 0x0009, 0x080c, 0x5c55, 0x2079, 0x0240, 0x7833,
-	0x1105, 0x7837, 0x0100, 0x080c, 0x5cb4, 0x1150, 0x7080, 0x9005,
-	0x1138, 0x080c, 0x5a7c, 0x1188, 0x9085, 0x0001, 0x080c, 0x24c2,
-	0x20a9, 0x0008, 0x080c, 0x5cd1, 0x20e1, 0x0000, 0x2099, 0x026e,
-	0x20e9, 0x0000, 0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014, 0x080c,
-	0x5b86, 0x0010, 0x080c, 0x55d6, 0x00fe, 0x0005, 0x00f6, 0x708c,
-	0x9005, 0x05a8, 0x2011, 0x5b5c, 0x080c, 0x816c, 0x9086, 0x0014,
-	0x1560, 0x080c, 0x5cd1, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1105,
-	0x1520, 0x7834, 0x9084, 0x0100, 0x2011, 0x0100, 0x921e, 0x1160,
-	0x7a38, 0xd2fc, 0x0128, 0x70c0, 0x9005, 0x1110, 0x70c3, 0x0001,
-	0x7097, 0x000a, 0x00b1, 0x0098, 0x9005, 0x1178, 0x7a38, 0xd2fc,
-	0x0128, 0x70c0, 0x9005, 0x1110, 0x70c3, 0x0001, 0x7093, 0x0000,
-	0x7097, 0x000e, 0x080c, 0x5824, 0x0010, 0x080c, 0x5cad, 0x00fe,
-	0x0005, 0x00f6, 0x7097, 0x000b, 0x2011, 0x1d0e, 0x20e9, 0x0001,
-	0x22a0, 0x20a9, 0x0040, 0x2019, 0xffff, 0x4304, 0x080c, 0x5c55,
-	0x2079, 0x0240, 0x7833, 0x1106, 0x7837, 0x0000, 0x080c, 0x5cb4,
-	0x0118, 0x2013, 0x0000, 0x0020, 0x705c, 0x9085, 0x0100, 0x2012,
-	0x20a9, 0x0040, 0x2009, 0x024e, 0x2011, 0x1d0e, 0x220e, 0x8210,
-	0x8108, 0x9186, 0x0260, 0x1128, 0x6810, 0x8000, 0x6812, 0x2009,
-	0x0240, 0x1f04, 0x57a6, 0x60c3, 0x0084, 0x080c, 0x5b86, 0x00fe,
-	0x0005, 0x00f6, 0x708c, 0x9005, 0x01c0, 0x2011, 0x5b5c, 0x080c,
-	0x816c, 0x9086, 0x0084, 0x1178, 0x080c, 0x5cd1, 0x2079, 0x0260,
-	0x7a30, 0x9296, 0x1106, 0x1138, 0x7834, 0x9005, 0x1120, 0x7097,
-	0x000c, 0x0029, 0x0010, 0x080c, 0x5cad, 0x00fe, 0x0005, 0x00f6,
-	0x7097, 0x000d, 0x080c, 0x5c55, 0x2079, 0x0240, 0x7833, 0x1107,
-	0x7837, 0x0000, 0x080c, 0x5cd1, 0x20a9, 0x0040, 0x2011, 0x026e,
-	0x2009, 0x024e, 0x220e, 0x8210, 0x8108, 0x9186, 0x0260, 0x1150,
-	0x6810, 0x8000, 0x6812, 0x2009, 0x0240, 0x6814, 0x8000, 0x6816,
-	0x2011, 0x0260, 0x1f04, 0x57ea, 0x60c3, 0x0084, 0x080c, 0x5b86,
-	0x00fe, 0x0005, 0x00f6, 0x708c, 0x9005, 0x01e0, 0x2011, 0x5b5c,
-	0x080c, 0x816c, 0x9086, 0x0084, 0x1198, 0x080c, 0x5cd1, 0x2079,
-	0x0260, 0x7a30, 0x9296, 0x1107, 0x1158, 0x7834, 0x9005, 0x1140,
-	0x7093, 0x0001, 0x080c, 0x5c27, 0x7097, 0x000e, 0x0029, 0x0010,
-	0x080c, 0x5cad, 0x00fe, 0x0005, 0x918d, 0x0001, 0x080c, 0x5cfc,
-	0x7097, 0x000f, 0x708f, 0x0000, 0x2061, 0x0140, 0x605b, 0xbc85,
-	0x605f, 0xb5b5, 0x2061, 0x0100, 0x6043, 0x0005, 0x6043, 0x0004,
-	0x2009, 0x07d0, 0x2011, 0x5b5c, 0x080c, 0x8160, 0x0005, 0x708c,
-	0x9005, 0x0130, 0x2011, 0x5b5c, 0x080c, 0x816c, 0x7097, 0x0000,
-	0x0005, 0x7097, 0x0011, 0x080c, 0x97f4, 0x080c, 0x5cd1, 0x20e1,
-	0x0000, 0x2099, 0x0260, 0x20e9, 0x0000, 0x20a1, 0x0240, 0x748c,
-	0x9480, 0x0018, 0x9080, 0x0007, 0x9084, 0x03f8, 0x8004, 0x20a8,
-	0x4003, 0x080c, 0x5cb4, 0x11a0, 0x7178, 0x81ff, 0x0188, 0x900e,
-	0x707c, 0x9084, 0x00ff, 0x0160, 0x080c, 0x2459, 0x9186, 0x007e,
-	0x0138, 0x9186, 0x0080, 0x0120, 0x2011, 0x0008, 0x080c, 0x5b09,
-	0x60c3, 0x0014, 0x080c, 0x5b86, 0x0005, 0x00f6, 0x708c, 0x9005,
-	0x0500, 0x2011, 0x5b5c, 0x080c, 0x816c, 0x9086, 0x0014, 0x11b8,
-	0x080c, 0x5cd1, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1103, 0x1178,
-	0x7834, 0x9005, 0x1160, 0x7a38, 0xd2fc, 0x0128, 0x70c0, 0x9005,
-	0x1110, 0x70c3, 0x0001, 0x7097, 0x0012, 0x0029, 0x0010, 0x708f,
-	0x0000, 0x00fe, 0x0005, 0x00f6, 0x7097, 0x0013, 0x080c, 0x5c63,
-	0x2079, 0x0240, 0x7833, 0x1103, 0x7837, 0x0000, 0x080c, 0x5cd1,
-	0x080c, 0x5cb4, 0x1170, 0x7080, 0x9005, 0x1158, 0x7158, 0x9186,
-	0xffff, 0x0138, 0x2011, 0x0008, 0x080c, 0x5b09, 0x0168, 0x080c,
-	0x5c8a, 0x20a9, 0x0008, 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9,
-	0x0000, 0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014, 0x080c, 0x5b86,
-	0x00fe, 0x0005, 0x00f6, 0x708c, 0x9005, 0x0500, 0x2011, 0x5b5c,
-	0x080c, 0x816c, 0x9086, 0x0014, 0x11b8, 0x080c, 0x5cd1, 0x2079,
-	0x0260, 0x7a30, 0x9296, 0x1104, 0x1178, 0x7834, 0x9005, 0x1160,
-	0x7a38, 0xd2fc, 0x0128, 0x70c0, 0x9005, 0x1110, 0x70c3, 0x0001,
-	0x7097, 0x0014, 0x0029, 0x0010, 0x708f, 0x0000, 0x00fe, 0x0005,
-	0x00f6, 0x7097, 0x0015, 0x080c, 0x5c63, 0x2079, 0x0240, 0x7833,
-	0x1104, 0x7837, 0x0000, 0x080c, 0x5cd1, 0x080c, 0x5cb4, 0x11b8,
-	0x7080, 0x9005, 0x11a0, 0x7160, 0x9186, 0xffff, 0x0180, 0x9180,
-	0x319f, 0x200d, 0x918c, 0xff00, 0x810f, 0x2011, 0x0008, 0x080c,
-	0x5b09, 0x0180, 0x080c, 0x4cb2, 0x0110, 0x080c, 0x24c2, 0x20a9,
-	0x0008, 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9, 0x0000, 0x20a1,
-	0x024e, 0x4003, 0x60c3, 0x0014, 0x080c, 0x5b86, 0x00fe, 0x0005,
-	0x00f6, 0x708c, 0x9005, 0x05f0, 0x2011, 0x5b5c, 0x080c, 0x816c,
-	0x9086, 0x0014, 0x15a8, 0x080c, 0x5cd1, 0x2079, 0x0260, 0x7a30,
-	0x9296, 0x1105, 0x1568, 0x7834, 0x9084, 0x0100, 0x2011, 0x0100,
-	0x921e, 0x1168, 0x9085, 0x0001, 0x080c, 0x5cfc, 0x7a38, 0xd2fc,
-	0x0128, 0x70c0, 0x9005, 0x1110, 0x70c3, 0x0001, 0x0080, 0x9005,
-	0x11b8, 0x7a38, 0xd2fc, 0x0128, 0x70c0, 0x9005, 0x1110, 0x70c3,
-	0x0001, 0x9085, 0x0001, 0x080c, 0x5cfc, 0x7093, 0x0000, 0x7a38,
-	0xd2f4, 0x0110, 0x70db, 0x0008, 0x7097, 0x0016, 0x0029, 0x0010,
-	0x708f, 0x0000, 0x00fe, 0x0005, 0x080c, 0x97f4, 0x080c, 0x5cd1,
-	0x20e1, 0x0000, 0x2099, 0x0260, 0x20e9, 0x0000, 0x20a1, 0x0240,
-	0x20a9, 0x000e, 0x4003, 0x2011, 0x026d, 0x2204, 0x9084, 0x0100,
-	0x2011, 0x024d, 0x2012, 0x2011, 0x026e, 0x7097, 0x0017, 0x080c,
-	0x5cb4, 0x1150, 0x7080, 0x9005, 0x1138, 0x080c, 0x5a7c, 0x1188,
-	0x9085, 0x0001, 0x080c, 0x24c2, 0x20a9, 0x0008, 0x080c, 0x5cd1,
-	0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9, 0x0000, 0x20a1, 0x024e,
-	0x4003, 0x60c3, 0x0014, 0x080c, 0x5b86, 0x0010, 0x080c, 0x55d6,
-	0x0005, 0x00f6, 0x708c, 0x9005, 0x01d8, 0x2011, 0x5b5c, 0x080c,
-	0x816c, 0x9086, 0x0084, 0x1190, 0x080c, 0x5cd1, 0x2079, 0x0260,
-	0x7a30, 0x9296, 0x1106, 0x1150, 0x7834, 0x9005, 0x1138, 0x9006,
-	0x080c, 0x5cfc, 0x7097, 0x0018, 0x0029, 0x0010, 0x708f, 0x0000,
-	0x00fe, 0x0005, 0x00f6, 0x7097, 0x0019, 0x080c, 0x5c63, 0x2079,
-	0x0240, 0x7833, 0x1106, 0x7837, 0x0000, 0x080c, 0x5cd1, 0x2009,
-	0x026e, 0x2039, 0x1d0e, 0x20a9, 0x0040, 0x213e, 0x8738, 0x8108,
-	0x9186, 0x0280, 0x1128, 0x6814, 0x8000, 0x6816, 0x2009, 0x0260,
-	0x1f04, 0x59e5, 0x2039, 0x1d0e, 0x080c, 0x5cb4, 0x11e8, 0x2728,
-	0x2514, 0x8207, 0x9084, 0x00ff, 0x8000, 0x2018, 0x9294, 0x00ff,
-	0x8007, 0x9205, 0x202a, 0x705c, 0x2310, 0x8214, 0x92a0, 0x1d0e,
-	0x2414, 0x938c, 0x0001, 0x0118, 0x9294, 0xff00, 0x0018, 0x9294,
-	0x00ff, 0x8007, 0x9215, 0x2222, 0x20a9, 0x0040, 0x2009, 0x024e,
-	0x270e, 0x8738, 0x8108, 0x9186, 0x0260, 0x1128, 0x6810, 0x8000,
-	0x6812, 0x2009, 0x0240, 0x1f04, 0x5a18, 0x60c3, 0x0084, 0x080c,
-	0x5b86, 0x00fe, 0x0005, 0x00f6, 0x708c, 0x9005, 0x01e0, 0x2011,
-	0x5b5c, 0x080c, 0x816c, 0x9086, 0x0084, 0x1198, 0x080c, 0x5cd1,
-	0x2079, 0x0260, 0x7a30, 0x9296, 0x1107, 0x1158, 0x7834, 0x9005,
-	0x1140, 0x7093, 0x0001, 0x080c, 0x5c27, 0x7097, 0x001a, 0x0029,
-	0x0010, 0x708f, 0x0000, 0x00fe, 0x0005, 0x9085, 0x0001, 0x080c,
-	0x5cfc, 0x7097, 0x001b, 0x080c, 0x97f4, 0x080c, 0x5cd1, 0x2011,
-	0x0260, 0x2009, 0x0240, 0x748c, 0x9480, 0x0018, 0x9080, 0x0007,
-	0x9084, 0x03f8, 0x8004, 0x20a8, 0x220e, 0x8210, 0x8108, 0x9186,
-	0x0260, 0x1150, 0x6810, 0x8000, 0x6812, 0x2009, 0x0240, 0x6814,
-	0x8000, 0x6816, 0x2011, 0x0260, 0x1f04, 0x5a64, 0x60c3, 0x0084,
-	0x080c, 0x5b86, 0x0005, 0x0005, 0x0086, 0x0096, 0x2029, 0x185c,
-	0x252c, 0x20a9, 0x0008, 0x2041, 0x1d0e, 0x20e9, 0x0001, 0x28a0,
-	0x080c, 0x5cd1, 0x20e1, 0x0000, 0x2099, 0x026e, 0x4003, 0x20a9,
-	0x0008, 0x2011, 0x0007, 0xd5d4, 0x0108, 0x9016, 0x2800, 0x9200,
-	0x200c, 0x91a6, 0xffff, 0x1148, 0xd5d4, 0x0110, 0x8210, 0x0008,
-	0x8211, 0x1f04, 0x5a96, 0x0804, 0x5b05, 0x82ff, 0x1160, 0xd5d4,
-	0x0120, 0x91a6, 0x3fff, 0x0d90, 0x0020, 0x91a6, 0x3fff, 0x0904,
-	0x5b05, 0x918d, 0xc000, 0x20a9, 0x0010, 0x2019, 0x0001, 0xd5d4,
-	0x0110, 0x2019, 0x0010, 0x2120, 0xd5d4, 0x0110, 0x8423, 0x0008,
-	0x8424, 0x1240, 0xd5d4, 0x0110, 0x8319, 0x0008, 0x8318, 0x1f04,
-	0x5abc, 0x04d8, 0x23a8, 0x2021, 0x0001, 0x8426, 0x8425, 0x1f04,
-	0x5ace, 0x2328, 0x8529, 0x92be, 0x0007, 0x0158, 0x0006, 0x2039,
-	0x0007, 0x2200, 0x973a, 0x000e, 0x27a8, 0x95a8, 0x0010, 0x1f04,
-	0x5add, 0x755a, 0x95c8, 0x319f, 0x292d, 0x95ac, 0x00ff, 0x757e,
-	0x6532, 0x6536, 0x0016, 0x2508, 0x080c, 0x24a2, 0x001e, 0x60e7,
-	0x0000, 0x65ea, 0x2018, 0x2304, 0x9405, 0x201a, 0x7083, 0x0001,
-	0x20e9, 0x0000, 0x20a1, 0x024e, 0x20e1, 0x0001, 0x2898, 0x20a9,
-	0x0008, 0x4003, 0x9085, 0x0001, 0x0008, 0x9006, 0x009e, 0x008e,
-	0x0005, 0x0156, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x22a8, 0x20e1,
-	0x0000, 0x2099, 0x026e, 0x20e9, 0x0000, 0x2011, 0x024e, 0x22a0,
-	0x4003, 0x014e, 0x013e, 0x01de, 0x01ce, 0x015e, 0x2118, 0x9026,
-	0x2001, 0x0007, 0x939a, 0x0010, 0x0218, 0x8420, 0x8001, 0x0cd0,
-	0x2118, 0x84ff, 0x0120, 0x939a, 0x0010, 0x8421, 0x1de0, 0x2021,
-	0x0001, 0x83ff, 0x0118, 0x8423, 0x8319, 0x1de8, 0x9238, 0x2029,
-	0x026e, 0x9528, 0x2504, 0x942c, 0x11b8, 0x9405, 0x203a, 0x715a,
-	0x91a0, 0x319f, 0x242d, 0x95ac, 0x00ff, 0x757e, 0x6532, 0x6536,
-	0x0016, 0x2508, 0x080c, 0x24a2, 0x001e, 0x60e7, 0x0000, 0x65ea,
-	0x7083, 0x0001, 0x9084, 0x0000, 0x0005, 0x00e6, 0x2071, 0x1800,
-	0x7087, 0x0000, 0x00ee, 0x0005, 0x00e6, 0x00f6, 0x2079, 0x0100,
-	0x2071, 0x0140, 0x080c, 0x5c16, 0x080c, 0x8fd0, 0x7004, 0x9084,
-	0x4000, 0x0110, 0x080c, 0x2882, 0x0126, 0x2091, 0x8000, 0x2071,
-	0x1825, 0x2073, 0x0000, 0x7840, 0x0026, 0x0016, 0x2009, 0x00f7,
-	0x080c, 0x5c73, 0x001e, 0x9094, 0x0010, 0x9285, 0x0080, 0x7842,
-	0x7a42, 0x002e, 0x012e, 0x00fe, 0x00ee, 0x0005, 0x0126, 0x2091,
-	0x8000, 0x080c, 0x27dd, 0x0228, 0x2011, 0x0101, 0x2204, 0xc0c5,
-	0x2012, 0x2011, 0x19cc, 0x2013, 0x0000, 0x708f, 0x0000, 0x012e,
-	0x60a3, 0x0056, 0x60a7, 0x9575, 0x080c, 0x8fc3, 0x6144, 0xd184,
-	0x0120, 0x7194, 0x918d, 0x2000, 0x0018, 0x7188, 0x918d, 0x1000,
-	0x2011, 0x1971, 0x2112, 0x2009, 0x07d0, 0x2011, 0x5b5c, 0x080c,
-	0x8230, 0x0005, 0x0016, 0x0026, 0x00c6, 0x0126, 0x2091, 0x8000,
-	0x080c, 0x98c7, 0x080c, 0x9b6c, 0x080c, 0x98e3, 0x2009, 0x00f7,
-	0x080c, 0x5c73, 0x2061, 0x19db, 0x900e, 0x611a, 0x611e, 0x6172,
-	0x6176, 0x2061, 0x1800, 0x6003, 0x0001, 0x2061, 0x0100, 0x6043,
-	0x0090, 0x6043, 0x0010, 0x2009, 0x1971, 0x200b, 0x0000, 0x2009,
-	0x002d, 0x2011, 0x5be2, 0x080c, 0x8160, 0x012e, 0x00ce, 0x002e,
-	0x001e, 0x0005, 0x00e6, 0x0006, 0x0126, 0x2091, 0x8000, 0x0471,
-	0x2071, 0x0100, 0x080c, 0x8fd0, 0x2071, 0x0140, 0x7004, 0x9084,
-	0x4000, 0x0110, 0x080c, 0x2882, 0x080c, 0x70c2, 0x0188, 0x080c,
-	0x70dd, 0x1170, 0x080c, 0x73c3, 0x0016, 0x080c, 0x2571, 0x2001,
-	0x1945, 0x2102, 0x001e, 0x080c, 0x73be, 0x080c, 0x6feb, 0x0050,
-	0x2009, 0x0001, 0x080c, 0x285e, 0x2001, 0x0001, 0x080c, 0x23fe,
-	0x080c, 0x5bb2, 0x012e, 0x000e, 0x00ee, 0x0005, 0x2001, 0x180e,
-	0x2004, 0xd0bc, 0x0158, 0x0026, 0x0036, 0x2011, 0x8017, 0x2001,
-	0x1971, 0x201c, 0x080c, 0x48fa, 0x003e, 0x002e, 0x0005, 0x20a9,
-	0x0012, 0x20e9, 0x0001, 0x20a1, 0x1d80, 0x080c, 0x5cd1, 0x20e9,
-	0x0000, 0x2099, 0x026e, 0x0099, 0x20a9, 0x0020, 0x080c, 0x5ccb,
-	0x2099, 0x0260, 0x20a1, 0x1d92, 0x0051, 0x20a9, 0x000e, 0x080c,
-	0x5cce, 0x2099, 0x0260, 0x20a1, 0x1db2, 0x0009, 0x0005, 0x0016,
-	0x0026, 0x3410, 0x3308, 0x2104, 0x8007, 0x2012, 0x8108, 0x8210,
-	0x1f04, 0x5c4b, 0x002e, 0x001e, 0x0005, 0x080c, 0x97f4, 0x20e1,
-	0x0001, 0x2099, 0x1d00, 0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9,
-	0x000c, 0x4003, 0x0005, 0x080c, 0x97f4, 0x080c, 0x5cd1, 0x20e1,
-	0x0000, 0x2099, 0x0260, 0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9,
-	0x000c, 0x4003, 0x0005, 0x00c6, 0x0006, 0x2061, 0x0100, 0x810f,
-	0x2001, 0x1833, 0x2004, 0x9005, 0x1138, 0x2001, 0x1817, 0x2004,
-	0x9084, 0x00ff, 0x9105, 0x0010, 0x9185, 0x00f7, 0x604a, 0x000e,
-	0x00ce, 0x0005, 0x0016, 0x0046, 0x080c, 0x6686, 0x0158, 0x9006,
-	0x2020, 0x2009, 0x002a, 0x080c, 0xd2bc, 0x2001, 0x180c, 0x200c,
-	0xc195, 0x2102, 0x2019, 0x002a, 0x900e, 0x080c, 0x2ff3, 0x080c,
-	0xbf8f, 0x0140, 0x0036, 0x2019, 0xffff, 0x2021, 0x0007, 0x080c,
-	0x4a97, 0x003e, 0x004e, 0x001e, 0x0005, 0x080c, 0x5bb2, 0x7097,
-	0x0000, 0x708f, 0x0000, 0x0005, 0x0006, 0x2001, 0x180c, 0x2004,
-	0xd09c, 0x0100, 0x000e, 0x0005, 0x0006, 0x0016, 0x0126, 0x2091,
-	0x8000, 0x2001, 0x0101, 0x200c, 0x918d, 0x0006, 0x2102, 0x012e,
-	0x001e, 0x000e, 0x0005, 0x2009, 0x0001, 0x0020, 0x2009, 0x0002,
-	0x0008, 0x900e, 0x6814, 0x9084, 0xffc0, 0x910d, 0x6916, 0x0005,
-	0x00f6, 0x0156, 0x0146, 0x01d6, 0x9006, 0x20a9, 0x0080, 0x20e9,
-	0x0001, 0x20a1, 0x1d00, 0x4004, 0x2079, 0x1d00, 0x7803, 0x2200,
-	0x7807, 0x00ef, 0x780f, 0x00ef, 0x7813, 0x0138, 0x7823, 0xffff,
-	0x7827, 0xffff, 0x01de, 0x014e, 0x015e, 0x00fe, 0x0005, 0x2001,
-	0x1800, 0x2003, 0x0001, 0x0005, 0x2001, 0x197e, 0x0118, 0x2003,
-	0x0001, 0x0010, 0x2003, 0x0000, 0x0005, 0x0156, 0x20a9, 0x0800,
-	0x2009, 0x1000, 0x9006, 0x200a, 0x8108, 0x1f04, 0x5d0b, 0x015e,
-	0x0005, 0x00d6, 0x0036, 0x0156, 0x0136, 0x0146, 0x2069, 0x185b,
-	0x9006, 0xb802, 0xb8c6, 0xb807, 0x0707, 0xb80a, 0xb80e, 0xb812,
-	0x9198, 0x319f, 0x231d, 0x939c, 0x00ff, 0xbb16, 0x0016, 0x0026,
-	0xb886, 0x080c, 0x9b65, 0x1120, 0x9192, 0x007e, 0x1208, 0xbb86,
-	0x20a9, 0x0004, 0xb8b4, 0x20e8, 0xb9b8, 0x9198, 0x0006, 0x9006,
-	0x23a0, 0x4004, 0x20a9, 0x0004, 0x9198, 0x000a, 0x23a0, 0x4004,
-	0x002e, 0x001e, 0xb83e, 0xb842, 0xb8be, 0xb8c2, 0xb85e, 0xb862,
-	0xb866, 0xb86a, 0xb86f, 0x0100, 0xb872, 0xb876, 0xb87a, 0xb88a,
-	0xb88e, 0xb893, 0x0008, 0xb896, 0xb89a, 0xb89e, 0xb8ae, 0xb9a2,
-	0x0096, 0xb8a4, 0x904d, 0x0110, 0x080c, 0x1061, 0xb8a7, 0x0000,
-	0x009e, 0x9006, 0xb84a, 0x6810, 0xb83a, 0x680c, 0xb846, 0x6814,
-	0x9084, 0x00ff, 0xb842, 0x014e, 0x013e, 0x015e, 0x003e, 0x00de,
-	0x0005, 0x0126, 0x2091, 0x8000, 0xa974, 0xae78, 0x9684, 0x3fff,
-	0x9082, 0x4000, 0x1a04, 0x5dcf, 0x9182, 0x0800, 0x1a04, 0x5dd3,
-	0x2001, 0x180c, 0x2004, 0x9084, 0x0003, 0x1904, 0x5dd9, 0x9188,
-	0x1000, 0x2104, 0x905d, 0x0198, 0xb804, 0x9084, 0x00ff, 0x908e,
-	0x0006, 0x1188, 0xb8a4, 0x900d, 0x1904, 0x5deb, 0x080c, 0x6149,
-	0x9006, 0x012e, 0x0005, 0x2001, 0x0005, 0x900e, 0x04b8, 0x2001,
-	0x0028, 0x900e, 0x0498, 0x9082, 0x0006, 0x1290, 0x080c, 0x9b65,
-	0x1160, 0xb8a0, 0x9084, 0xff80, 0x1140, 0xb900, 0xd1fc, 0x0d10,
-	0x2001, 0x0029, 0x2009, 0x1000, 0x0408, 0x2001, 0x0028, 0x00a8,
-	0x2009, 0x180c, 0x210c, 0xd18c, 0x0118, 0x2001, 0x0004, 0x0068,
-	0xd184, 0x0118, 0x2001, 0x0004, 0x0040, 0x2001, 0x0029, 0xb900,
-	0xd1fc, 0x0118, 0x2009, 0x1000, 0x0048, 0x900e, 0x0038, 0x2001,
-	0x0029, 0x900e, 0x0018, 0x2001, 0x0029, 0x900e, 0x9005, 0x012e,
-	0x0005, 0x2001, 0x180c, 0x2004, 0xd084, 0x19d0, 0x9188, 0x1000,
-	0x2104, 0x9065, 0x09a8, 0x080c, 0x668a, 0x1990, 0xb800, 0xd0bc,
-	0x0978, 0x0804, 0x5d92, 0x080c, 0x64fe, 0x0904, 0x5d9b, 0x0804,
-	0x5d96, 0x00e6, 0x2071, 0x19bf, 0x7004, 0x9086, 0x0002, 0x1128,
-	0x7030, 0x9080, 0x0004, 0x2004, 0x9b06, 0x00ee, 0x0005, 0x00b6,
-	0x00e6, 0x0126, 0x2091, 0x8000, 0xa974, 0x9182, 0x0800, 0x1a04,
-	0x5e7a, 0x9188, 0x1000, 0x2104, 0x905d, 0x0904, 0x5e52, 0xb8a0,
-	0x9086, 0x007f, 0x0178, 0x080c, 0x6692, 0x0160, 0xa994, 0x81ff,
-	0x0130, 0x908e, 0x0004, 0x0130, 0x908e, 0x0005, 0x0118, 0x080c,
-	0x668a, 0x1598, 0xa87c, 0xd0fc, 0x01e0, 0xa894, 0x9005, 0x01c8,
-	0x2060, 0x0026, 0x2010, 0x080c, 0xb85e, 0x002e, 0x1120, 0x2001,
-	0x0008, 0x0804, 0x5e7c, 0x6020, 0x9086, 0x000a, 0x0120, 0x2001,
-	0x0008, 0x0804, 0x5e7c, 0x601a, 0x6003, 0x0008, 0x2900, 0x6016,
-	0x0058, 0x080c, 0x9b90, 0x05e8, 0x2b00, 0x6012, 0x2900, 0x6016,
-	0x600b, 0xffff, 0x6023, 0x000a, 0x2009, 0x0003, 0x080c, 0x9c82,
-	0x9006, 0x0458, 0x2001, 0x0028, 0x0438, 0x9082, 0x0006, 0x1290,
-	0x080c, 0x9b65, 0x1160, 0xb8a0, 0x9084, 0xff80, 0x1140, 0xb900,
-	0xd1fc, 0x0900, 0x2001, 0x0029, 0x2009, 0x1000, 0x00a8, 0x2001,
-	0x0028, 0x0090, 0x2009, 0x180c, 0x210c, 0xd18c, 0x0118, 0x2001,
-	0x0004, 0x0050, 0xd184, 0x0118, 0x2001, 0x0004, 0x0028, 0x2001,
-	0x0029, 0x0010, 0x2001, 0x0029, 0x9005, 0x012e, 0x00ee, 0x00be,
-	0x0005, 0x2001, 0x002c, 0x0cc0, 0x00f6, 0x00b6, 0x0126, 0x2091,
-	0x8000, 0xa8e0, 0x9005, 0x1550, 0xa8dc, 0x9082, 0x0101, 0x1630,
-	0xa8c8, 0x9005, 0x1518, 0xa8c4, 0x9082, 0x0101, 0x12f8, 0xa974,
-	0x2079, 0x1800, 0x9182, 0x0800, 0x12e8, 0x7830, 0x9084, 0x0003,
-	0x1130, 0xaa98, 0xab94, 0xa878, 0x9084, 0x0007, 0x00ea, 0x7930,
-	0xd18c, 0x0118, 0x2001, 0x0004, 0x0038, 0xd184, 0x0118, 0x2001,
-	0x0004, 0x0010, 0x2001, 0x0029, 0x900e, 0x0038, 0x2001, 0x002c,
-	0x900e, 0x0018, 0x2001, 0x0029, 0x900e, 0x9006, 0x0008, 0x9005,
-	0x012e, 0x00be, 0x00fe, 0x0005, 0x5f11, 0x5ecc, 0x5ee3, 0x5f11,
-	0x5f11, 0x5f11, 0x5f11, 0x5f11, 0x2100, 0x9082, 0x007e, 0x1278,
-	0x080c, 0x622f, 0x0148, 0x9046, 0xb810, 0x9306, 0x1904, 0x5f19,
-	0xb814, 0x9206, 0x15f0, 0x0028, 0xbb12, 0xba16, 0x0010, 0x080c,
-	0x47b4, 0x0150, 0x04b0, 0x080c, 0x628f, 0x1598, 0xb810, 0x9306,
-	0x1580, 0xb814, 0x9206, 0x1568, 0x080c, 0x9b90, 0x0530, 0x2b00,
-	0x6012, 0x080c, 0xbd09, 0x2900, 0x6016, 0x600b, 0xffff, 0x6023,
-	0x000a, 0xa878, 0x9086, 0x0001, 0x1170, 0x080c, 0x302e, 0x9006,
-	0x080c, 0x61cc, 0x2001, 0x0002, 0x080c, 0x61e0, 0x2001, 0x0200,
-	0xb86e, 0xb893, 0x0002, 0x2009, 0x0003, 0x080c, 0x9c82, 0x9006,
-	0x0068, 0x2001, 0x0001, 0x900e, 0x0038, 0x2001, 0x002c, 0x900e,
-	0x0018, 0x2001, 0x0028, 0x900e, 0x9005, 0x0000, 0x012e, 0x00be,
-	0x00fe, 0x0005, 0x00b6, 0x00f6, 0x00e6, 0x0126, 0x2091, 0x8000,
-	0xa894, 0x90c6, 0x0015, 0x0904, 0x60f2, 0x90c6, 0x0056, 0x0904,
-	0x60f6, 0x90c6, 0x0066, 0x0904, 0x60fa, 0x90c6, 0x0067, 0x0904,
-	0x60fe, 0x90c6, 0x0068, 0x0904, 0x6102, 0x90c6, 0x0071, 0x0904,
-	0x6106, 0x90c6, 0x0074, 0x0904, 0x610a, 0x90c6, 0x007c, 0x0904,
-	0x610e, 0x90c6, 0x007e, 0x0904, 0x6112, 0x90c6, 0x0037, 0x0904,
-	0x6116, 0x9016, 0x2079, 0x1800, 0xa974, 0x9186, 0x00ff, 0x0904,
-	0x60ed, 0x9182, 0x0800, 0x1a04, 0x60ed, 0x080c, 0x628f, 0x1198,
-	0xb804, 0x9084, 0x00ff, 0x9082, 0x0006, 0x1268, 0xa894, 0x90c6,
-	0x006f, 0x0148, 0x080c, 0x9b65, 0x1904, 0x60d6, 0xb8a0, 0x9084,
-	0xff80, 0x1904, 0x60d6, 0xa894, 0x90c6, 0x006f, 0x0158, 0x90c6,
-	0x005e, 0x0904, 0x6036, 0x90c6, 0x0064, 0x0904, 0x605f, 0x2008,
-	0x0804, 0x5ff9, 0xa998, 0xa8b0, 0x2040, 0x080c, 0x9b65, 0x1120,
-	0x9182, 0x007f, 0x0a04, 0x5ff9, 0x9186, 0x00ff, 0x0904, 0x5ff9,
-	0x9182, 0x0800, 0x1a04, 0x5ff9, 0xaaa0, 0xab9c, 0x7878, 0x9306,
-	0x11a8, 0x787c, 0x0096, 0x924e, 0x1128, 0x2208, 0x2310, 0x009e,
-	0x0804, 0x5ff9, 0x080c, 0x9b65, 0x1140, 0x99cc, 0xff00, 0x009e,
-	0x1128, 0x2208, 0x2310, 0x0804, 0x5ff9, 0x009e, 0x080c, 0x47b4,
-	0x0904, 0x6002, 0x900e, 0x9016, 0x90c6, 0x4000, 0x1558, 0x0006,
-	0x080c, 0x6582, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d,
-	0x20a9, 0x0004, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0031, 0x20a0,
-	0xb8b4, 0x20e0, 0xb8b8, 0x9080, 0x0006, 0x2098, 0x080c, 0x0fac,
-	0x20a9, 0x0004, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0035, 0x20a0,
-	0xb8b4, 0x20e0, 0xb8b8, 0x9080, 0x000a, 0x2098, 0x080c, 0x0fac,
-	0x000e, 0x00c8, 0x90c6, 0x4007, 0x1110, 0x2408, 0x00a0, 0x90c6,
-	0x4008, 0x1118, 0x2708, 0x2610, 0x0070, 0x90c6, 0x4009, 0x1108,
-	0x0050, 0x90c6, 0x4006, 0x0138, 0x2001, 0x4005, 0x2009, 0x000a,
-	0x0010, 0x2001, 0x4006, 0xa896, 0xa99a, 0xaa9e, 0x2001, 0x0030,
-	0x900e, 0x0470, 0x080c, 0x9b90, 0x1130, 0x2001, 0x4005, 0x2009,
-	0x0003, 0x9016, 0x0c80, 0x2b00, 0x6012, 0x080c, 0xbd09, 0x2900,
-	0x6016, 0x6023, 0x0001, 0xa868, 0xd88c, 0x0108, 0xc0f5, 0xa86a,
-	0x0126, 0x2091, 0x8000, 0x080c, 0x302e, 0x012e, 0x9006, 0x080c,
-	0x61cc, 0x2001, 0x0002, 0x080c, 0x61e0, 0x2009, 0x0002, 0x080c,
-	0x9c82, 0xa8b0, 0xd094, 0x0118, 0xb8c4, 0xc08d, 0xb8c6, 0x9006,
-	0x9005, 0x012e, 0x00ee, 0x00fe, 0x00be, 0x0005, 0x080c, 0x53bc,
-	0x0118, 0x2009, 0x0007, 0x00f8, 0xa998, 0xaeb0, 0x080c, 0x628f,
-	0x1904, 0x5ff4, 0x9186, 0x007f, 0x0130, 0x080c, 0x668a, 0x0118,
-	0x2009, 0x0009, 0x0080, 0x0096, 0x080c, 0x102f, 0x1120, 0x009e,
-	0x2009, 0x0002, 0x0040, 0x2900, 0x009e, 0xa806, 0x080c, 0xba5c,
-	0x19b0, 0x2009, 0x0003, 0x2001, 0x4005, 0x0804, 0x5ffb, 0xa998,
-	0xaeb0, 0x080c, 0x628f, 0x1904, 0x5ff4, 0x0096, 0x080c, 0x102f,
-	0x1128, 0x009e, 0x2009, 0x0002, 0x0804, 0x60b3, 0x2900, 0x009e,
-	0xa806, 0x0096, 0x2048, 0x20a9, 0x002b, 0xb8b4, 0x20e0, 0xb8b8,
-	0x2098, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0002, 0x20a0, 0x4003,
-	0x20a9, 0x0008, 0x9080, 0x0006, 0x20a0, 0xbbb8, 0x9398, 0x0006,
-	0x2398, 0x080c, 0x0fac, 0x009e, 0xa87b, 0x0000, 0xa883, 0x0000,
-	0xa897, 0x4000, 0xd684, 0x1168, 0x080c, 0x53a8, 0xd0b4, 0x1118,
-	0xa89b, 0x000b, 0x00e0, 0xb800, 0xd08c, 0x0118, 0xa89b, 0x000c,
-	0x00b0, 0x080c, 0x668a, 0x0118, 0xa89b, 0x0009, 0x0080, 0x080c,
-	0x53bc, 0x0118, 0xa89b, 0x0007, 0x0050, 0x080c, 0xba3f, 0x1904,
-	0x602f, 0x2009, 0x0003, 0x2001, 0x4005, 0x0804, 0x5ffb, 0xa87b,
-	0x0030, 0xa897, 0x4005, 0xa804, 0x8006, 0x8006, 0x8007, 0x90bc,
-	0x003f, 0x9084, 0xffc0, 0x9080, 0x0002, 0x2009, 0x002b, 0xaaa0,
-	0xab9c, 0xaca8, 0xada4, 0x2031, 0x0000, 0x2041, 0x127e, 0x080c,
-	0xa0f3, 0x1904, 0x602f, 0x2009, 0x0002, 0x08e8, 0x2001, 0x0028,
-	0x900e, 0x0804, 0x6030, 0x2009, 0x180c, 0x210c, 0xd18c, 0x0118,
-	0x2001, 0x0004, 0x0038, 0xd184, 0x0118, 0x2001, 0x0004, 0x0010,
-	0x2001, 0x0029, 0x900e, 0x0804, 0x6030, 0x2001, 0x0029, 0x900e,
-	0x0804, 0x6030, 0x080c, 0x35cd, 0x0804, 0x6031, 0x080c, 0x50dd,
-	0x0804, 0x6031, 0x080c, 0x4373, 0x0804, 0x6031, 0x080c, 0x43ec,
-	0x0804, 0x6031, 0x080c, 0x4448, 0x0804, 0x6031, 0x080c, 0x4870,
-	0x0804, 0x6031, 0x080c, 0x4b15, 0x0804, 0x6031, 0x080c, 0x4d48,
-	0x0804, 0x6031, 0x080c, 0x4f41, 0x0804, 0x6031, 0x080c, 0x37e2,
-	0x0804, 0x6031, 0x00b6, 0xa974, 0xae78, 0x9684, 0x3fff, 0x9082,
-	0x4000, 0x1608, 0x9182, 0x0800, 0x1258, 0x9188, 0x1000, 0x2104,
-	0x905d, 0x0130, 0x080c, 0x668a, 0x1138, 0x00d9, 0x9006, 0x00b0,
-	0x2001, 0x0028, 0x900e, 0x0090, 0x9082, 0x0006, 0x1240, 0xb900,
-	0xd1fc, 0x0d98, 0x2001, 0x0029, 0x2009, 0x1000, 0x0038, 0x2001,
-	0x0029, 0x900e, 0x0018, 0x2001, 0x0029, 0x900e, 0x9005, 0x00be,
-	0x0005, 0xa877, 0x0000, 0xb8c0, 0x9005, 0x1904, 0x61c0, 0xb888,
-	0x9005, 0x1904, 0x61c0, 0xb838, 0xb93c, 0x9102, 0x1a04, 0x61c0,
-	0x2b10, 0x080c, 0x9bbd, 0x0904, 0x61bc, 0x8108, 0xb93e, 0x6212,
-	0x2900, 0x6016, 0x6023, 0x0003, 0x600b, 0xffff, 0x6007, 0x0040,
-	0xa878, 0x605e, 0xa880, 0x9084, 0x00ff, 0x6066, 0xa883, 0x0000,
-	0xa87c, 0xd0ac, 0x05c0, 0xc0dd, 0xa87e, 0xa888, 0x8001, 0x1568,
-	0x2001, 0x00f8, 0x8001, 0xa001, 0xa001, 0xa001, 0x1dd8, 0xa816,
-	0xa864, 0x9094, 0x00f7, 0x9296, 0x0011, 0x11f8, 0x9084, 0x00ff,
-	0xc0bd, 0x601e, 0xa8ac, 0xaab0, 0xa836, 0xaa3a, 0x2001, 0x000f,
-	0x8001, 0x1df0, 0x2001, 0x8004, 0x6003, 0x0004, 0x6046, 0x00f6,
-	0x2079, 0x0380, 0x7818, 0xd0bc, 0x1de8, 0x7833, 0x0010, 0x2c00,
-	0x7836, 0x781b, 0x8080, 0x00fe, 0x0005, 0x080c, 0x1669, 0x601c,
-	0xc0bd, 0x601e, 0x0c38, 0x0006, 0x2001, 0x00e8, 0x8001, 0xa001,
-	0xa001, 0xa001, 0x1dd8, 0x000e, 0xd0b4, 0x190c, 0x1af7, 0x2001,
-	0x8004, 0x6003, 0x0002, 0x08d0, 0x81ff, 0x1110, 0xb88b, 0x0001,
-	0x2908, 0xb8bc, 0xb9be, 0x9005, 0x1110, 0xb9c2, 0x0020, 0x0096,
-	0x2048, 0xa902, 0x009e, 0x0005, 0x00b6, 0x0126, 0x00c6, 0x0026,
-	0x2091, 0x8000, 0x6210, 0x2258, 0xba00, 0x9005, 0x0110, 0xc285,
-	0x0008, 0xc284, 0xba02, 0x002e, 0x00ce, 0x012e, 0x00be, 0x0005,
-	0x00b6, 0x0126, 0x00c6, 0x2091, 0x8000, 0x6210, 0x2258, 0xba04,
-	0x0006, 0x9086, 0x0006, 0x1170, 0xb89c, 0xd0ac, 0x0158, 0x080c,
-	0x6686, 0x0140, 0x9284, 0xff00, 0x8007, 0x9086, 0x0007, 0x1110,
-	0x2011, 0x0600, 0x000e, 0x9294, 0xff00, 0x9215, 0xba06, 0x0006,
-	0x9086, 0x0006, 0x1120, 0xba90, 0x82ff, 0x090c, 0x0d65, 0x000e,
-	0x00ce, 0x012e, 0x00be, 0x0005, 0x00b6, 0x0126, 0x00c6, 0x2091,
-	0x8000, 0x6210, 0x2258, 0xba04, 0x0006, 0x9086, 0x0006, 0x1168,
-	0xb89c, 0xd0a4, 0x0150, 0x080c, 0x6682, 0x1138, 0x9284, 0x00ff,
-	0x9086, 0x0007, 0x1110, 0x2011, 0x0006, 0x000e, 0x9294, 0x00ff,
-	0x8007, 0x9215, 0xba06, 0x00ce, 0x012e, 0x00be, 0x0005, 0x9182,
-	0x0800, 0x0218, 0x9085, 0x0001, 0x0005, 0x00d6, 0x0026, 0x9190,
-	0x1000, 0x2204, 0x905d, 0x1180, 0x0096, 0x080c, 0x102f, 0x2958,
-	0x009e, 0x0160, 0x2b00, 0x2012, 0xb85c, 0xb8ba, 0xb860, 0xb8b6,
-	0x9006, 0xb8a6, 0x080c, 0x5d11, 0x9006, 0x0010, 0x9085, 0x0001,
-	0x002e, 0x00de, 0x0005, 0x00b6, 0x0096, 0x0126, 0x2091, 0x8000,
-	0x0026, 0x9182, 0x0800, 0x0218, 0x9085, 0x0001, 0x0458, 0x00d6,
-	0x9190, 0x1000, 0x2204, 0x905d, 0x0518, 0x2013, 0x0000, 0xb8a4,
-	0x904d, 0x0110, 0x080c, 0x1061, 0x00d6, 0x00c6, 0xb8ac, 0x2060,
-	0x8cff, 0x0168, 0x600c, 0x0006, 0x6014, 0x2048, 0x080c, 0xb870,
-	0x0110, 0x080c, 0x0fe1, 0x080c, 0x9be6, 0x00ce, 0x0c88, 0x00ce,
-	0x00de, 0x2b48, 0xb8b8, 0xb85e, 0xb8b4, 0xb862, 0x080c, 0x1071,
-	0x00de, 0x9006, 0x002e, 0x012e, 0x009e, 0x00be, 0x0005, 0x0016,
-	0x9182, 0x0800, 0x0218, 0x9085, 0x0001, 0x0030, 0x9188, 0x1000,
-	0x2104, 0x905d, 0x0dc0, 0x9006, 0x001e, 0x0005, 0x00d6, 0x0156,
-	0x0136, 0x0146, 0x9006, 0xb80a, 0xb80e, 0xb800, 0xc08c, 0xb802,
-	0x080c, 0x70ba, 0x1510, 0xb8a0, 0x9086, 0x007e, 0x0120, 0x080c,
-	0x9b65, 0x11d8, 0x0078, 0x7040, 0xd0e4, 0x01b8, 0x00c6, 0x2061,
-	0x195a, 0x7048, 0x2062, 0x704c, 0x6006, 0x7050, 0x600a, 0x7054,
-	0x600e, 0x00ce, 0x703c, 0x2069, 0x0140, 0x9005, 0x1110, 0x2001,
-	0x0001, 0x6886, 0x2069, 0x1800, 0x68b2, 0x7040, 0xb85e, 0x7048,
-	0xb862, 0x704c, 0xb866, 0x20e1, 0x0000, 0x2099, 0x0276, 0xb8b4,
-	0x20e8, 0xb8b8, 0x9088, 0x000a, 0x21a0, 0x20a9, 0x0004, 0x4003,
-	0x2099, 0x027a, 0x9088, 0x0006, 0x21a0, 0x20a9, 0x0004, 0x4003,
-	0x2069, 0x0200, 0x6817, 0x0001, 0x7040, 0xb86a, 0x7144, 0xb96e,
-	0x7048, 0xb872, 0x7050, 0xb876, 0x2069, 0x0200, 0x6817, 0x0000,
-	0xb8a0, 0x9086, 0x007e, 0x1110, 0x7144, 0xb96e, 0x9182, 0x0211,
-	0x1218, 0x2009, 0x0008, 0x0400, 0x9182, 0x0259, 0x1218, 0x2009,
-	0x0007, 0x00d0, 0x9182, 0x02c1, 0x1218, 0x2009, 0x0006, 0x00a0,
-	0x9182, 0x0349, 0x1218, 0x2009, 0x0005, 0x0070, 0x9182, 0x0421,
-	0x1218, 0x2009, 0x0004, 0x0040, 0x9182, 0x0581, 0x1218, 0x2009,
-	0x0003, 0x0010, 0x2009, 0x0002, 0xb992, 0x014e, 0x013e, 0x015e,
-	0x00de, 0x0005, 0x0016, 0x0026, 0x00e6, 0x2071, 0x0260, 0x7034,
-	0xb896, 0x703c, 0xb89a, 0x7054, 0xb89e, 0x0036, 0xbbc4, 0xc384,
-	0xba00, 0x2009, 0x187b, 0x210c, 0xd0bc, 0x0120, 0xd1ec, 0x0110,
-	0xc2ad, 0x0008, 0xc2ac, 0xd0c4, 0x0148, 0xd1e4, 0x0138, 0xc2bd,
-	0xd0cc, 0x0128, 0xd38c, 0x1108, 0xc385, 0x0008, 0xc2bc, 0xba02,
-	0xbbc6, 0x003e, 0x00ee, 0x002e, 0x001e, 0x0005, 0x0096, 0x0126,
-	0x2091, 0x8000, 0xb8a4, 0x904d, 0x0578, 0xa900, 0x81ff, 0x15c0,
-	0xaa04, 0x9282, 0x0010, 0x16c8, 0x0136, 0x0146, 0x01c6, 0x01d6,
-	0x8906, 0x8006, 0x8007, 0x908c, 0x003f, 0x21e0, 0x9084, 0xffc0,
-	0x9080, 0x0004, 0x2098, 0x2009, 0x0010, 0x20a9, 0x0001, 0x4002,
-	0x9086, 0xffff, 0x0120, 0x8109, 0x1dd0, 0x080c, 0x0d65, 0x3c00,
-	0x20e8, 0x3300, 0x8001, 0x20a0, 0x4604, 0x8210, 0xaa06, 0x01de,
-	0x01ce, 0x014e, 0x013e, 0x0060, 0x080c, 0x102f, 0x0170, 0x2900,
-	0xb8a6, 0xa803, 0x0000, 0x080c, 0x651e, 0xa807, 0x0001, 0xae12,
-	0x9085, 0x0001, 0x012e, 0x009e, 0x0005, 0x9006, 0x0cd8, 0x0126,
-	0x2091, 0x8000, 0x0096, 0xb8a4, 0x904d, 0x0188, 0xa800, 0x9005,
-	0x1150, 0x080c, 0x652d, 0x1158, 0xa804, 0x908a, 0x0002, 0x0218,
-	0x8001, 0xa806, 0x0020, 0x080c, 0x1061, 0xb8a7, 0x0000, 0x009e,
-	0x012e, 0x0005, 0x0096, 0x00c6, 0xb888, 0x9005, 0x1904, 0x6413,
-	0xb8c0, 0x904d, 0x0904, 0x6413, 0x080c, 0x9bbd, 0x0904, 0x640f,
-	0x8210, 0xba3e, 0xa800, 0xb8c2, 0x9005, 0x1108, 0xb8be, 0x2b00,
-	0x6012, 0x2900, 0x6016, 0x6023, 0x0003, 0x600b, 0xffff, 0x6007,
-	0x0040, 0xa878, 0x605e, 0xa880, 0x9084, 0x00ff, 0x6066, 0xa883,
-	0x0000, 0xa87c, 0xd0ac, 0x01c8, 0xc0dd, 0xa87e, 0xa888, 0x8001,
-	0x1568, 0xa816, 0xa864, 0x9094, 0x00f7, 0x9296, 0x0011, 0x1530,
-	0x9084, 0x00ff, 0xc0bd, 0x601e, 0xa8ac, 0xaab0, 0xa836, 0xaa3a,
-	0x2001, 0x8004, 0x6003, 0x0004, 0x0030, 0x080c, 0x1af7, 0x2001,
-	0x8004, 0x6003, 0x0002, 0x6046, 0x2001, 0x0010, 0x2c08, 0x080c,
-	0x98b8, 0xb838, 0xba3c, 0x9202, 0x0a04, 0x63c0, 0x0020, 0x82ff,
-	0x1110, 0xb88b, 0x0001, 0x00ce, 0x009e, 0x0005, 0x080c, 0x1669,
-	0x601c, 0xc0bd, 0x601e, 0x08e0, 0x00b6, 0x0096, 0x0016, 0x20a9,
-	0x0800, 0x900e, 0x0016, 0x080c, 0x628f, 0x1158, 0xb8c0, 0x904d,
-	0x0140, 0x3e00, 0x9086, 0x0002, 0x1118, 0xb800, 0xd0bc, 0x1108,
-	0x0041, 0x001e, 0x8108, 0x1f04, 0x6422, 0x001e, 0x00be, 0x009e,
-	0x0005, 0x0096, 0x0016, 0xb8c0, 0x904d, 0x0188, 0xa800, 0xb8c2,
-	0x9005, 0x1108, 0xb8be, 0x9006, 0xa802, 0xa867, 0x0103, 0xab7a,
-	0xa877, 0x0000, 0x080c, 0xbb73, 0x080c, 0x69b5, 0x0c60, 0x001e,
-	0x009e, 0x0005, 0x0086, 0x9046, 0xb8c0, 0x904d, 0x01b0, 0xa86c,
-	0x9406, 0x1118, 0xa870, 0x9506, 0x0128, 0x2940, 0xa800, 0x904d,
-	0x0160, 0x0ca8, 0xa800, 0x88ff, 0x1128, 0xb8c2, 0x9005, 0x1118,
-	0xb8be, 0x0008, 0xa002, 0xa803, 0x0000, 0x008e, 0x0005, 0x901e,
-	0x0010, 0x2019, 0x0001, 0x0126, 0x2091, 0x8000, 0x00e6, 0x0096,
-	0x00c6, 0x0086, 0x0026, 0x2071, 0x19bf, 0x9046, 0x7028, 0x9065,
-	0x01e8, 0x6014, 0x2068, 0x83ff, 0x0120, 0x605c, 0x9606, 0x0158,
-	0x0030, 0xa86c, 0x9406, 0x1118, 0xa870, 0x9506, 0x0120, 0x2c40,
-	0x600c, 0x2060, 0x0c60, 0x600c, 0x0006, 0x0066, 0x2830, 0x080c,
-	0x9127, 0x006e, 0x000e, 0x83ff, 0x0508, 0x0c08, 0x9046, 0xb8c0,
-	0x904d, 0x01e0, 0x83ff, 0x0120, 0xa878, 0x9606, 0x0158, 0x0030,
-	0xa86c, 0x9406, 0x1118, 0xa870, 0x9506, 0x0120, 0x2940, 0xa800,
-	0x2048, 0x0c70, 0xb8c0, 0xaa00, 0x0026, 0x9906, 0x1110, 0xbac2,
-	0x0008, 0xa202, 0x000e, 0x83ff, 0x0108, 0x0c10, 0x002e, 0x008e,
-	0x00ce, 0x009e, 0x00ee, 0x012e, 0x0005, 0x9016, 0x0489, 0x1110,
-	0x2011, 0x0001, 0x0005, 0x080c, 0x6582, 0x0128, 0x080c, 0xb931,
-	0x0010, 0x9085, 0x0001, 0x0005, 0x080c, 0x6582, 0x0128, 0x080c,
-	0xb8d2, 0x0010, 0x9085, 0x0001, 0x0005, 0x080c, 0x6582, 0x0128,
-	0x080c, 0xb92e, 0x0010, 0x9085, 0x0001, 0x0005, 0x080c, 0x6582,
-	0x0128, 0x080c, 0xb8f1, 0x0010, 0x9085, 0x0001, 0x0005, 0x080c,
-	0x6582, 0x0128, 0x080c, 0xb972, 0x0010, 0x9085, 0x0001, 0x0005,
-	0xb8a4, 0x900d, 0x1118, 0x9085, 0x0001, 0x0005, 0x0136, 0x01c6,
-	0xa800, 0x9005, 0x11b8, 0x890e, 0x810e, 0x810f, 0x9184, 0x003f,
-	0x20e0, 0x9184, 0xffc0, 0x9080, 0x0004, 0x2098, 0x20a9, 0x0001,
-	0x2009, 0x0010, 0x4002, 0x9606, 0x0128, 0x8109, 0x1dd8, 0x9085,
-	0x0001, 0x0008, 0x9006, 0x01ce, 0x013e, 0x0005, 0x0146, 0x01d6,
-	0xa860, 0x20e8, 0xa85c, 0x9080, 0x0004, 0x20a0, 0x20a9, 0x0010,
-	0x2009, 0xffff, 0x4104, 0x01de, 0x014e, 0x0136, 0x01c6, 0xa800,
-	0x9005, 0x11b8, 0x890e, 0x810e, 0x810f, 0x9184, 0x003f, 0x20e0,
-	0x9184, 0xffc0, 0x9080, 0x0004, 0x2098, 0x20a9, 0x0001, 0x2009,
-	0x0010, 0x4002, 0x9606, 0x0128, 0x8109, 0x1dd8, 0x9085, 0x0001,
-	0x0068, 0x0146, 0x01d6, 0x3300, 0x8001, 0x20a0, 0x3c00, 0x20e8,
-	0x2001, 0xffff, 0x4004, 0x01de, 0x014e, 0x9006, 0x01ce, 0x013e,
-	0x0005, 0x0096, 0x0126, 0x2091, 0x8000, 0xb8a4, 0x904d, 0x1128,
-	0x080c, 0x102f, 0x0168, 0x2900, 0xb8a6, 0x080c, 0x651e, 0xa803,
-	0x0001, 0xa807, 0x0000, 0x9085, 0x0001, 0x012e, 0x009e, 0x0005,
-	0x9006, 0x0cd8, 0x0096, 0x0126, 0x2091, 0x8000, 0xb8a4, 0x904d,
-	0x0130, 0xb8a7, 0x0000, 0x080c, 0x1061, 0x9085, 0x0001, 0x012e,
-	0x009e, 0x0005, 0xb89c, 0xd0a4, 0x0005, 0x00b6, 0x00f6, 0x080c,
-	0x70ba, 0x01b0, 0x71c0, 0x81ff, 0x1198, 0x71d8, 0xd19c, 0x0180,
-	0x2001, 0x007e, 0x9080, 0x1000, 0x2004, 0x905d, 0x0148, 0xb804,
-	0x9084, 0x00ff, 0x9086, 0x0006, 0x1118, 0xb800, 0xc0ed, 0xb802,
-	0x2079, 0x185b, 0x7804, 0x00d0, 0x0156, 0x20a9, 0x007f, 0x900e,
-	0x0016, 0x080c, 0x628f, 0x1168, 0xb804, 0x9084, 0xff00, 0x8007,
-	0x9096, 0x0004, 0x0118, 0x9086, 0x0006, 0x1118, 0xb800, 0xc0ed,
-	0xb802, 0x001e, 0x8108, 0x1f04, 0x65a8, 0x015e, 0x080c, 0x6648,
-	0x0120, 0x2001, 0x195d, 0x200c, 0x0030, 0x2079, 0x185b, 0x7804,
-	0x0030, 0x2009, 0x07d0, 0x2011, 0x65d2, 0x080c, 0x8230, 0x00fe,
-	0x00be, 0x0005, 0x00b6, 0x2011, 0x65d2, 0x080c, 0x816c, 0x080c,
-	0x6648, 0x01d8, 0x2001, 0x107e, 0x2004, 0x2058, 0xb900, 0xc1ec,
-	0xb902, 0x080c, 0x6686, 0x0130, 0x2009, 0x07d0, 0x2011, 0x65d2,
-	0x080c, 0x8230, 0x00e6, 0x2071, 0x1800, 0x9006, 0x707a, 0x705c,
-	0x707e, 0x080c, 0x2e09, 0x00ee, 0x04d0, 0x0156, 0x00c6, 0x20a9,
-	0x007f, 0x900e, 0x0016, 0x080c, 0x628f, 0x1558, 0xb800, 0xd0ec,
-	0x0540, 0x0046, 0xbaa0, 0x2220, 0x9006, 0x2009, 0x0029, 0x080c,
-	0xd2bc, 0xb800, 0xc0e5, 0xc0ec, 0xb802, 0x080c, 0x6682, 0x2001,
-	0x0707, 0x1128, 0xb804, 0x9084, 0x00ff, 0x9085, 0x0700, 0xb806,
-	0x080c, 0x98c7, 0x2019, 0x0029, 0x080c, 0x8658, 0x0076, 0x903e,
-	0x080c, 0x853d, 0x900e, 0x080c, 0xd011, 0x007e, 0x004e, 0x080c,
-	0x98e3, 0x001e, 0x8108, 0x1f04, 0x65fa, 0x00ce, 0x015e, 0x00be,
-	0x0005, 0x00b6, 0x6010, 0x2058, 0xb800, 0xc0ec, 0xb802, 0x00be,
-	0x0005, 0x7810, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0ac, 0x0005,
-	0x6010, 0x00b6, 0x905d, 0x0108, 0xb800, 0x00be, 0xd0bc, 0x0005,
-	0x00b6, 0x00f6, 0x2001, 0x107e, 0x2004, 0x905d, 0x0110, 0xb800,
-	0xd0ec, 0x00fe, 0x00be, 0x0005, 0x0126, 0x0026, 0x2091, 0x8000,
-	0x0006, 0xbaa0, 0x9290, 0x1000, 0x2204, 0x9b06, 0x190c, 0x0d65,
-	0x000e, 0xba00, 0x9005, 0x0110, 0xc2fd, 0x0008, 0xc2fc, 0xba02,
-	0x002e, 0x012e, 0x0005, 0x2011, 0x1836, 0x2204, 0xd0cc, 0x0138,
-	0x2001, 0x195b, 0x200c, 0x2011, 0x6678, 0x080c, 0x8230, 0x0005,
-	0x2011, 0x6678, 0x080c, 0x816c, 0x2011, 0x1836, 0x2204, 0xc0cc,
-	0x2012, 0x0005, 0x080c, 0x53a8, 0xd0ac, 0x0005, 0x080c, 0x53a8,
-	0xd0a4, 0x0005, 0x0016, 0xb904, 0x9184, 0x00ff, 0x908e, 0x0006,
-	0x001e, 0x0005, 0x0016, 0xb904, 0x9184, 0xff00, 0x8007, 0x908e,
-	0x0006, 0x001e, 0x0005, 0x00b6, 0x00f6, 0x080c, 0xbf8f, 0x0158,
-	0x70d8, 0x9084, 0x0028, 0x0138, 0x2001, 0x107f, 0x2004, 0x905d,
-	0x0110, 0xb8c4, 0xd094, 0x00fe, 0x00be, 0x0005, 0x0006, 0x0016,
-	0x0036, 0x0046, 0x0076, 0x00b6, 0x2001, 0x1817, 0x203c, 0x9780,
-	0x319f, 0x203d, 0x97bc, 0xff00, 0x873f, 0x9006, 0x2018, 0x2008,
-	0x9284, 0x8000, 0x0110, 0x2019, 0x0001, 0x9294, 0x7fff, 0x2100,
-	0x9706, 0x0190, 0x91a0, 0x1000, 0x2404, 0x905d, 0x0168, 0xb804,
-	0x9084, 0x00ff, 0x9086, 0x0006, 0x1138, 0x83ff, 0x0118, 0xb89c,
-	0xd0a4, 0x0110, 0x8211, 0x0158, 0x8108, 0x83ff, 0x0120, 0x9182,
-	0x0800, 0x0e28, 0x0068, 0x9182, 0x007e, 0x0e08, 0x0048, 0x00be,
-	0x007e, 0x004e, 0x003e, 0x001e, 0x9085, 0x0001, 0x000e, 0x0005,
-	0x00be, 0x007e, 0x004e, 0x003e, 0x001e, 0x9006, 0x000e, 0x0005,
-	0x0046, 0x0056, 0x0076, 0x00b6, 0x2100, 0x9084, 0x7fff, 0x9080,
-	0x1000, 0x2004, 0x905d, 0x0130, 0xb804, 0x9084, 0x00ff, 0x9086,
-	0x0006, 0x0550, 0x9184, 0x8000, 0x0580, 0x2001, 0x1817, 0x203c,
-	0x9780, 0x319f, 0x203d, 0x97bc, 0xff00, 0x873f, 0x9006, 0x2020,
-	0x2400, 0x9706, 0x01a0, 0x94a8, 0x1000, 0x2504, 0x905d, 0x0178,
-	0xb804, 0x9084, 0x00ff, 0x9086, 0x0006, 0x1148, 0xb89c, 0xd0a4,
-	0x0130, 0xb814, 0x9206, 0x1118, 0xb810, 0x9306, 0x0128, 0x8420,
-	0x9482, 0x0800, 0x0e28, 0x0048, 0x918c, 0x7fff, 0x00be, 0x007e,
-	0x005e, 0x004e, 0x9085, 0x0001, 0x0005, 0x918c, 0x7fff, 0x00be,
-	0x007e, 0x005e, 0x004e, 0x9006, 0x0005, 0x2071, 0x190e, 0x7003,
-	0x0001, 0x7007, 0x0000, 0x9006, 0x7012, 0x7016, 0x701a, 0x701e,
-	0x700a, 0x7046, 0x0005, 0x0016, 0x00e6, 0x2071, 0x1921, 0x900e,
-	0x710a, 0x080c, 0x53a8, 0xd0fc, 0x1140, 0x080c, 0x53a8, 0x900e,
-	0xd09c, 0x0108, 0x8108, 0x7102, 0x0400, 0x2001, 0x187b, 0x200c,
-	0x9184, 0x0007, 0x9006, 0x0002, 0x675d, 0x675d, 0x675d, 0x675d,
-	0x675d, 0x6774, 0x6782, 0x675d, 0x7003, 0x0003, 0x2009, 0x187c,
-	0x210c, 0x9184, 0xff00, 0x8007, 0x9005, 0x1110, 0x2001, 0x0002,
-	0x7006, 0x0018, 0x7003, 0x0005, 0x0c88, 0x00ee, 0x001e, 0x0005,
-	0x00e6, 0x2071, 0x0050, 0x684c, 0x9005, 0x1150, 0x00e6, 0x2071,
-	0x190e, 0x7028, 0xc085, 0x702a, 0x00ee, 0x9085, 0x0001, 0x0488,
-	0x6844, 0x9005, 0x0158, 0x080c, 0x742b, 0x6a60, 0x9200, 0x7002,
-	0x6864, 0x9101, 0x7006, 0x9006, 0x7012, 0x7016, 0x6860, 0x7002,
-	0x6864, 0x7006, 0x6868, 0x700a, 0x686c, 0x700e, 0x6844, 0x9005,
-	0x1110, 0x7012, 0x7016, 0x684c, 0x701a, 0x701c, 0x9085, 0x0040,
-	0x701e, 0x7037, 0x0019, 0x702b, 0x0001, 0x00e6, 0x2071, 0x190e,
-	0x7028, 0xc084, 0x702a, 0x7007, 0x0001, 0x700b, 0x0000, 0x00ee,
-	0x9006, 0x00ee, 0x0005, 0xa868, 0xd0fc, 0x11d8, 0x00e6, 0x0026,
-	0x2001, 0x1921, 0x2004, 0x9005, 0x0904, 0x69ba, 0xa87c, 0xd0bc,
-	0x1904, 0x69ba, 0xa978, 0xa874, 0x9105, 0x1904, 0x69ba, 0x2001,
-	0x1921, 0x2004, 0x0002, 0x69ba, 0x680e, 0x684a, 0x684a, 0x69ba,
-	0x684a, 0x0005, 0xa868, 0xd0fc, 0x1500, 0x00e6, 0x0026, 0x2009,
-	0x1921, 0x210c, 0x81ff, 0x0904, 0x69ba, 0xa87c, 0xd0cc, 0x0904,
-	0x69ba, 0xa880, 0x9084, 0x00ff, 0x9086, 0x0001, 0x1904, 0x69ba,
-	0x9186, 0x0003, 0x0904, 0x684a, 0x9186, 0x0005, 0x0904, 0x684a,
-	0xa84f, 0x8021, 0xa853, 0x0017, 0x0028, 0x0005, 0xa84f, 0x8020,
-	0xa853, 0x0016, 0x2071, 0x190e, 0x701c, 0x9005, 0x1904, 0x6b51,
-	0x0e04, 0x6b9c, 0x2071, 0x0000, 0xa84c, 0x7082, 0xa850, 0x7032,
-	0xa86c, 0x7086, 0x7036, 0xa870, 0x708a, 0x2091, 0x4080, 0x2001,
-	0x0089, 0x2004, 0xd084, 0x190c, 0x11d6, 0x2071, 0x1800, 0x2011,
-	0x0001, 0xa804, 0x900d, 0x702c, 0x1158, 0xa802, 0x2900, 0x702e,
-	0x70bc, 0x9200, 0x70be, 0x080c, 0x8087, 0x002e, 0x00ee, 0x0005,
-	0x0096, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8,
-	0x009e, 0x0c58, 0xa84f, 0x0000, 0x00f6, 0x2079, 0x0050, 0x2071,
-	0x190e, 0xa803, 0x0000, 0x7010, 0x9005, 0x1904, 0x693f, 0x782c,
-	0x908c, 0x0780, 0x190c, 0x6cc3, 0x8004, 0x8004, 0x8004, 0x9084,
-	0x0003, 0x0002, 0x6868, 0x693f, 0x688d, 0x68da, 0x080c, 0x0d65,
-	0x2071, 0x1800, 0x2900, 0x7822, 0xa804, 0x900d, 0x1170, 0x2071,
-	0x19db, 0x703c, 0x9005, 0x1328, 0x2001, 0x1922, 0x2004, 0x8005,
-	0x703e, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x9016, 0x702c, 0x2148,
-	0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70bc,
-	0x9200, 0x70be, 0x080c, 0x8087, 0x0c10, 0x2071, 0x1800, 0x2900,
-	0x7822, 0xa804, 0x900d, 0x15a8, 0x7824, 0x00e6, 0x2071, 0x0040,
-	0x712c, 0xd19c, 0x1170, 0x2009, 0x182f, 0x210c, 0x918a, 0x0040,
-	0x0240, 0x7022, 0x2001, 0x1dc0, 0x200c, 0x8108, 0x2102, 0x00ee,
-	0x0058, 0x00ee, 0x2048, 0x702c, 0xa802, 0x2900, 0x702e, 0x70bc,
-	0x8000, 0x70be, 0x080c, 0x8087, 0x782c, 0x9094, 0x0780, 0x190c,
-	0x6cc3, 0xd0a4, 0x19c8, 0x2071, 0x19db, 0x703c, 0x9005, 0x1328,
-	0x2001, 0x1922, 0x2004, 0x8005, 0x703e, 0x00fe, 0x002e, 0x00ee,
-	0x0005, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900,
-	0x81ff, 0x1dc8, 0x702e, 0x70bc, 0x9200, 0x70be, 0x080c, 0x8087,
-	0x0804, 0x6894, 0x0096, 0x00e6, 0x7824, 0x2048, 0x2071, 0x1800,
-	0x702c, 0xa802, 0x2900, 0x702e, 0x70bc, 0x8000, 0x70be, 0x080c,
-	0x8087, 0x782c, 0x9094, 0x0780, 0x190c, 0x6cc3, 0xd0a4, 0x1d60,
-	0x00ee, 0x782c, 0x9094, 0x0780, 0x190c, 0x6cc3, 0xd09c, 0x11a0,
-	0x009e, 0x2900, 0x7822, 0xa804, 0x900d, 0x1560, 0x2071, 0x19db,
-	0x703c, 0x9005, 0x1328, 0x2001, 0x1922, 0x2004, 0x8005, 0x703e,
-	0x00fe, 0x002e, 0x00ee, 0x0005, 0x009e, 0x2908, 0x7010, 0x8000,
-	0x7012, 0x7018, 0x904d, 0x711a, 0x0110, 0xa902, 0x0008, 0x711e,
-	0x2148, 0xa804, 0x900d, 0x1170, 0x2071, 0x19db, 0x703c, 0x9005,
-	0x1328, 0x2001, 0x1922, 0x2004, 0x8005, 0x703e, 0x00fe, 0x002e,
-	0x00ee, 0x0005, 0x2071, 0x1800, 0x9016, 0x702c, 0x2148, 0xa904,
-	0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70bc, 0x9200,
-	0x70be, 0x080c, 0x8087, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x2908,
-	0x7010, 0x8000, 0x7012, 0x7018, 0x904d, 0x711a, 0x0110, 0xa902,
-	0x0008, 0x711e, 0x2148, 0xa804, 0x900d, 0x1904, 0x6994, 0x782c,
-	0x9094, 0x0780, 0x190c, 0x6cc3, 0xd09c, 0x1198, 0x701c, 0x904d,
-	0x0180, 0x7010, 0x8001, 0x7012, 0x1108, 0x701a, 0xa800, 0x701e,
-	0x2900, 0x7822, 0x782c, 0x9094, 0x0780, 0x190c, 0x6cc3, 0xd09c,
-	0x0d68, 0x782c, 0x9094, 0x0780, 0x190c, 0x6cc3, 0xd0a4, 0x01b0,
-	0x00e6, 0x7824, 0x2048, 0x2071, 0x1800, 0x702c, 0xa802, 0x2900,
-	0x702e, 0x70bc, 0x8000, 0x70be, 0x080c, 0x8087, 0x782c, 0x9094,
-	0x0780, 0x190c, 0x6cc3, 0xd0a4, 0x1d60, 0x00ee, 0x2071, 0x19db,
-	0x703c, 0x9005, 0x1328, 0x2001, 0x1922, 0x2004, 0x8005, 0x703e,
-	0x00fe, 0x002e, 0x00ee, 0x0005, 0x00e6, 0x2071, 0x1800, 0x9016,
-	0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8,
-	0x702e, 0x70bc, 0x9200, 0x70be, 0x080c, 0x8087, 0x00ee, 0x0804,
-	0x694f, 0xa868, 0xd0fc, 0x1560, 0x0096, 0xa804, 0xa807, 0x0000,
-	0x904d, 0x190c, 0x0fe1, 0x009e, 0x0018, 0xa868, 0xd0fc, 0x1500,
-	0x00e6, 0x0026, 0xa84f, 0x0000, 0x00f6, 0x2079, 0x0050, 0x2071,
-	0x190e, 0xa803, 0x0000, 0x7010, 0x9005, 0x1904, 0x6acf, 0x782c,
-	0x908c, 0x0780, 0x190c, 0x6cc3, 0x8004, 0x8004, 0x8004, 0x9084,
-	0x0003, 0x0002, 0x69d9, 0x6acf, 0x69f4, 0x6a62, 0x080c, 0x0d65,
-	0x0005, 0x2071, 0x1800, 0x2900, 0x7822, 0xa804, 0x900d, 0x1120,
-	0x00fe, 0x002e, 0x00ee, 0x0005, 0x9016, 0x702c, 0x2148, 0xa904,
-	0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70bc, 0x9200,
-	0x70be, 0x080c, 0x8087, 0x0c60, 0x2071, 0x1800, 0x2900, 0x7822,
-	0xa804, 0x900d, 0x1904, 0x6a51, 0x7830, 0xd0dc, 0x1120, 0x00fe,
-	0x002e, 0x00ee, 0x0005, 0x7824, 0x00e6, 0x2071, 0x0040, 0x712c,
-	0xd19c, 0x1170, 0x2009, 0x182f, 0x210c, 0x918a, 0x0040, 0x0240,
-	0x7022, 0x2001, 0x1dc0, 0x200c, 0x8108, 0x2102, 0x00ee, 0x0058,
-	0x00ee, 0x2048, 0x702c, 0xa802, 0x2900, 0x702e, 0x70bc, 0x8000,
-	0x70be, 0x080c, 0x8087, 0x782c, 0x9094, 0x0780, 0x190c, 0x6cc3,
-	0xd0a4, 0x19c8, 0x0e04, 0x6a48, 0x7838, 0x7938, 0x910e, 0x1de0,
-	0x00d6, 0x2069, 0x0000, 0x6836, 0x6833, 0x0013, 0x00de, 0x2001,
-	0x191f, 0x200c, 0xc184, 0x2102, 0x2091, 0x4080, 0x2001, 0x0089,
-	0x2004, 0xd084, 0x190c, 0x11d6, 0x00fe, 0x002e, 0x00ee, 0x0005,
-	0x2001, 0x191f, 0x200c, 0xc185, 0x2102, 0x00fe, 0x002e, 0x00ee,
-	0x0005, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900,
-	0x81ff, 0x1dc8, 0x702e, 0x70bc, 0x9200, 0x70be, 0x080c, 0x8087,
-	0x0804, 0x6a03, 0x0096, 0x00e6, 0x7824, 0x2048, 0x2071, 0x1800,
-	0x702c, 0xa802, 0x2900, 0x702e, 0x70bc, 0x8000, 0x70be, 0x080c,
-	0x8087, 0x782c, 0x9094, 0x0780, 0x190c, 0x6cc3, 0xd0a4, 0x1d60,
-	0x00ee, 0x0e04, 0x6aa2, 0x7838, 0x7938, 0x910e, 0x1de0, 0x00d6,
-	0x2069, 0x0000, 0x6836, 0x6833, 0x0013, 0x00de, 0x7044, 0xc084,
-	0x7046, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c,
-	0x11d6, 0x782c, 0x9094, 0x0780, 0x190c, 0x6cc3, 0xd09c, 0x1170,
-	0x009e, 0x2900, 0x7822, 0xa804, 0x900d, 0x11e0, 0x00fe, 0x002e,
-	0x00ee, 0x0005, 0x7044, 0xc085, 0x7046, 0x0c58, 0x009e, 0x2908,
-	0x7010, 0x8000, 0x7012, 0x7018, 0x904d, 0x711a, 0x0110, 0xa902,
-	0x0008, 0x711e, 0x2148, 0xa804, 0x900d, 0x1120, 0x00fe, 0x002e,
-	0x00ee, 0x0005, 0x2071, 0x1800, 0x9016, 0x702c, 0x2148, 0xa904,
-	0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70bc, 0x9200,
-	0x70be, 0x080c, 0x8087, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x2908,
-	0x7010, 0x8000, 0x7012, 0x7018, 0x904d, 0x711a, 0x0110, 0xa902,
-	0x0008, 0x711e, 0x2148, 0xa804, 0x900d, 0x1904, 0x6b3c, 0x782c,
-	0x9094, 0x0780, 0x190c, 0x6cc3, 0xd09c, 0x11b0, 0x701c, 0x904d,
-	0x0198, 0xa84c, 0x9005, 0x1180, 0x7010, 0x8001, 0x7012, 0x1108,
-	0x701a, 0xa800, 0x701e, 0x2900, 0x7822, 0x782c, 0x9094, 0x0780,
-	0x190c, 0x6cc3, 0xd09c, 0x0d50, 0x782c, 0x9094, 0x0780, 0x190c,
-	0x6cc3, 0xd0a4, 0x05a8, 0x00e6, 0x7824, 0x2048, 0x2071, 0x1800,
-	0x702c, 0xa802, 0x2900, 0x702e, 0x70bc, 0x8000, 0x70be, 0x080c,
-	0x8087, 0x782c, 0x9094, 0x0780, 0x190c, 0x6cc3, 0xd0a4, 0x1d60,
-	0x00ee, 0x0e04, 0x6b35, 0x7838, 0x7938, 0x910e, 0x1de0, 0x00d6,
-	0x2069, 0x0000, 0x6836, 0x6833, 0x0013, 0x00de, 0x7044, 0xc084,
-	0x7046, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c,
-	0x11d6, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x7044, 0xc085, 0x7046,
-	0x00fe, 0x002e, 0x00ee, 0x0005, 0x00e6, 0x2071, 0x1800, 0x9016,
-	0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8,
-	0x702e, 0x70bc, 0x9200, 0x70be, 0x080c, 0x8087, 0x00ee, 0x0804,
-	0x6adf, 0x2071, 0x190e, 0xa803, 0x0000, 0x2908, 0x7010, 0x8000,
-	0x7012, 0x7018, 0x904d, 0x711a, 0x0110, 0xa902, 0x0008, 0x711e,
-	0x2148, 0xa804, 0x900d, 0x1128, 0x1e04, 0x6b7c, 0x002e, 0x00ee,
-	0x0005, 0x2071, 0x1800, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802,
-	0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70bc, 0x9200, 0x70be,
-	0x080c, 0x8087, 0x0e04, 0x6b66, 0x2071, 0x190e, 0x701c, 0x2048,
-	0xa84c, 0x900d, 0x0d18, 0x2071, 0x0000, 0x7182, 0xa850, 0x7032,
-	0xa86c, 0x7086, 0x7036, 0xa870, 0x708a, 0x2091, 0x4080, 0x2001,
-	0x0089, 0x2004, 0xd084, 0x190c, 0x11d6, 0x2071, 0x190e, 0x080c,
-	0x6caf, 0x002e, 0x00ee, 0x0005, 0x2071, 0x190e, 0xa803, 0x0000,
-	0x2908, 0x7010, 0x8000, 0x7012, 0x7018, 0x904d, 0x711a, 0x0110,
-	0xa902, 0x0008, 0x711e, 0x2148, 0xa804, 0x900d, 0x1118, 0x002e,
-	0x00ee, 0x0005, 0x2071, 0x1800, 0x9016, 0x702c, 0x2148, 0xa904,
-	0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70bc, 0x9200,
-	0x70be, 0x080c, 0x8087, 0x002e, 0x00ee, 0x0005, 0x0006, 0xa87c,
-	0x0006, 0xa867, 0x0103, 0x20a9, 0x001c, 0xa860, 0x20e8, 0xa85c,
-	0x9080, 0x001d, 0x20a0, 0x9006, 0x4004, 0x000e, 0x9084, 0x00ff,
-	0xa87e, 0x000e, 0xa87a, 0xa982, 0x0005, 0x2071, 0x190e, 0x7004,
-	0x0002, 0x6be7, 0x6be8, 0x6cae, 0x6be8, 0x0d65, 0x6cae, 0x0005,
-	0x2001, 0x1921, 0x2004, 0x0002, 0x6bf2, 0x6bf2, 0x6c47, 0x6c48,
-	0x6bf2, 0x6c48, 0x0126, 0x2091, 0x8000, 0x1e0c, 0x6cce, 0x701c,
-	0x904d, 0x01e0, 0xa84c, 0x9005, 0x01d8, 0x0e04, 0x6c16, 0xa94c,
-	0x2071, 0x0000, 0x7182, 0xa850, 0x7032, 0xa86c, 0x7086, 0x7036,
-	0xa870, 0x708a, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084,
-	0x190c, 0x11d6, 0x2071, 0x190e, 0x080c, 0x6caf, 0x012e, 0x0470,
-	0x2001, 0x005b, 0x2004, 0x9094, 0x0780, 0x190c, 0x6cc3, 0xd09c,
-	0x2071, 0x190e, 0x1510, 0x2071, 0x190e, 0x700f, 0x0001, 0xa964,
-	0x9184, 0x00ff, 0x9086, 0x0003, 0x1130, 0x810f, 0x918c, 0x00ff,
-	0x8101, 0x0108, 0x710e, 0x2900, 0x00d6, 0x2069, 0x0050, 0x6822,
-	0x00de, 0x2071, 0x190e, 0x701c, 0x2048, 0x7010, 0x8001, 0x7012,
-	0xa800, 0x701e, 0x9005, 0x1108, 0x701a, 0x012e, 0x0005, 0x0005,
-	0x00d6, 0x2008, 0x2069, 0x19db, 0x683c, 0x9005, 0x0760, 0x0158,
-	0x9186, 0x0003, 0x0540, 0x2001, 0x1814, 0x2004, 0x2009, 0x1b25,
-	0x210c, 0x9102, 0x1500, 0x0126, 0x2091, 0x8000, 0x2069, 0x0050,
-	0x693c, 0x6838, 0x9106, 0x0190, 0x0e04, 0x6c7a, 0x2069, 0x0000,
-	0x6837, 0x8040, 0x6833, 0x0012, 0x6883, 0x8040, 0x2091, 0x4080,
-	0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11d6, 0x2069, 0x19db,
-	0x683f, 0xffff, 0x012e, 0x00de, 0x0126, 0x2091, 0x8000, 0x1e0c,
-	0x6d34, 0x701c, 0x904d, 0x0540, 0x2001, 0x005b, 0x2004, 0x9094,
-	0x0780, 0x15c9, 0xd09c, 0x1500, 0x2071, 0x190e, 0x700f, 0x0001,
-	0xa964, 0x9184, 0x00ff, 0x9086, 0x0003, 0x1130, 0x810f, 0x918c,
-	0x00ff, 0x8101, 0x0108, 0x710e, 0x2900, 0x00d6, 0x2069, 0x0050,
-	0x6822, 0x00de, 0x701c, 0x2048, 0x7010, 0x8001, 0x7012, 0xa800,
-	0x701e, 0x9005, 0x1108, 0x701a, 0x012e, 0x0005, 0x0005, 0x0126,
-	0x2091, 0x8000, 0x701c, 0x904d, 0x0160, 0x7010, 0x8001, 0x7012,
-	0xa800, 0x701e, 0x9005, 0x1108, 0x701a, 0x012e, 0x080c, 0x1061,
-	0x0005, 0x012e, 0x0005, 0x2091, 0x8000, 0x0e04, 0x6cc5, 0x0006,
-	0x0016, 0x2001, 0x8004, 0x0006, 0x0804, 0x0d6e, 0x0096, 0x00f6,
-	0x2079, 0x0050, 0x7044, 0xd084, 0x01c0, 0xc084, 0x7046, 0x7838,
-	0x7938, 0x910e, 0x1de0, 0x00d6, 0x2069, 0x0000, 0x6836, 0x6833,
-	0x0013, 0x00de, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084,
-	0x190c, 0x11d6, 0x00fe, 0x009e, 0x0005, 0x782c, 0x9094, 0x0780,
-	0x1991, 0xd0a4, 0x0db8, 0x00e6, 0x2071, 0x1800, 0x7824, 0x00e6,
-	0x2071, 0x0040, 0x712c, 0xd19c, 0x1170, 0x2009, 0x182f, 0x210c,
-	0x918a, 0x0040, 0x0240, 0x7022, 0x2001, 0x1dc0, 0x200c, 0x8108,
-	0x2102, 0x00ee, 0x0058, 0x00ee, 0x2048, 0x702c, 0xa802, 0x2900,
-	0x702e, 0x70bc, 0x8000, 0x70be, 0x080c, 0x8087, 0x782c, 0x9094,
-	0x0780, 0x190c, 0x6cc3, 0xd0a4, 0x19c8, 0x7838, 0x7938, 0x910e,
-	0x1de0, 0x00d6, 0x2069, 0x0000, 0x6836, 0x6833, 0x0013, 0x00de,
-	0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11d6,
-	0x00ee, 0x00fe, 0x009e, 0x0005, 0x00f6, 0x2079, 0x0050, 0x7044,
-	0xd084, 0x01b8, 0xc084, 0x7046, 0x7838, 0x7938, 0x910e, 0x1de0,
-	0x00d6, 0x2069, 0x0000, 0x6836, 0x6833, 0x0013, 0x00de, 0x2091,
-	0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11d6, 0x00fe,
-	0x0005, 0x782c, 0x9094, 0x0780, 0x190c, 0x6cc3, 0xd0a4, 0x0db8,
-	0x00e6, 0x2071, 0x1800, 0x7824, 0x2048, 0x702c, 0xa802, 0x2900,
-	0x702e, 0x70bc, 0x8000, 0x70be, 0x080c, 0x8087, 0x782c, 0x9094,
-	0x0780, 0x190c, 0x6cc3, 0xd0a4, 0x1d70, 0x00d6, 0x2069, 0x0050,
-	0x693c, 0x2069, 0x1921, 0x6808, 0x690a, 0x2069, 0x19db, 0x9102,
-	0x1118, 0x683c, 0x9005, 0x1328, 0x2001, 0x1922, 0x200c, 0x810d,
-	0x693e, 0x00de, 0x00ee, 0x00fe, 0x0005, 0x7094, 0x908a, 0x0029,
-	0x1a0c, 0x0d65, 0x9082, 0x001d, 0x003b, 0x0026, 0x2011, 0x1e00,
-	0x080c, 0x28ac, 0x002e, 0x0005, 0x6e60, 0x6de6, 0x6e02, 0x6e2c,
-	0x6e4f, 0x6e8f, 0x6ea1, 0x6e02, 0x6e77, 0x6da1, 0x6dcf, 0x6da0,
-	0x0005, 0x00d6, 0x2069, 0x0200, 0x6804, 0x9005, 0x1180, 0x6808,
-	0x9005, 0x1518, 0x7097, 0x0028, 0x2069, 0x1967, 0x2d04, 0x7002,
-	0x080c, 0x71fa, 0x6028, 0x9085, 0x0600, 0x602a, 0x00b0, 0x7097,
-	0x0028, 0x2069, 0x1967, 0x2d04, 0x7002, 0x6028, 0x9085, 0x0600,
-	0x602a, 0x00e6, 0x0036, 0x0046, 0x0056, 0x2071, 0x1a43, 0x080c,
-	0x1989, 0x005e, 0x004e, 0x003e, 0x00ee, 0x00de, 0x0005, 0x00d6,
-	0x2069, 0x0200, 0x6804, 0x9005, 0x1178, 0x6808, 0x9005, 0x1160,
-	0x7097, 0x0028, 0x2069, 0x1967, 0x2d04, 0x7002, 0x080c, 0x729c,
-	0x6028, 0x9085, 0x0600, 0x602a, 0x00de, 0x0005, 0x0006, 0x2001,
-	0x0090, 0x080c, 0x2872, 0x000e, 0x6124, 0xd1e4, 0x1190, 0x080c,
-	0x6f12, 0xd1d4, 0x1160, 0xd1dc, 0x1138, 0xd1cc, 0x0150, 0x7097,
-	0x0020, 0x080c, 0x6f12, 0x0028, 0x7097, 0x001d, 0x0010, 0x7097,
-	0x001f, 0x0005, 0x2001, 0x0088, 0x080c, 0x2872, 0x6124, 0xd1cc,
-	0x11e8, 0xd1dc, 0x11c0, 0xd1e4, 0x1198, 0x9184, 0x1e00, 0x11d8,
-	0x080c, 0x19ae, 0x60e3, 0x0001, 0x600c, 0xc0b4, 0x600e, 0x080c,
-	0x70e6, 0x2001, 0x0080, 0x080c, 0x2872, 0x7097, 0x0028, 0x0058,
-	0x7097, 0x001e, 0x0040, 0x7097, 0x001d, 0x0028, 0x7097, 0x0020,
-	0x0010, 0x7097, 0x001f, 0x0005, 0x080c, 0x19ae, 0x60e3, 0x0001,
-	0x600c, 0xc0b4, 0x600e, 0x080c, 0x70e6, 0x2001, 0x0080, 0x080c,
-	0x2872, 0x6124, 0xd1d4, 0x1180, 0xd1dc, 0x1158, 0xd1e4, 0x1130,
-	0x9184, 0x1e00, 0x1158, 0x7097, 0x0028, 0x0040, 0x7097, 0x001e,
-	0x0028, 0x7097, 0x001d, 0x0010, 0x7097, 0x001f, 0x0005, 0x2001,
-	0x00a0, 0x080c, 0x2872, 0x6124, 0xd1dc, 0x1138, 0xd1e4, 0x0138,
-	0x080c, 0x19ae, 0x7097, 0x001e, 0x0010, 0x7097, 0x001d, 0x0005,
-	0x080c, 0x6f9b, 0x6124, 0xd1dc, 0x1188, 0x080c, 0x6f12, 0x0016,
-	0x080c, 0x19ae, 0x001e, 0xd1d4, 0x1128, 0xd1e4, 0x0138, 0x7097,
-	0x001e, 0x0020, 0x7097, 0x001f, 0x080c, 0x6f12, 0x0005, 0x0006,
-	0x2001, 0x00a0, 0x080c, 0x2872, 0x000e, 0x6124, 0xd1d4, 0x1160,
-	0xd1cc, 0x1150, 0xd1dc, 0x1128, 0xd1e4, 0x0140, 0x7097, 0x001e,
-	0x0028, 0x7097, 0x001d, 0x0010, 0x7097, 0x0021, 0x0005, 0x080c,
-	0x6f9b, 0x6124, 0xd1d4, 0x1150, 0xd1dc, 0x1128, 0xd1e4, 0x0140,
-	0x7097, 0x001e, 0x0028, 0x7097, 0x001d, 0x0010, 0x7097, 0x001f,
-	0x0005, 0x0006, 0x2001, 0x0090, 0x080c, 0x2872, 0x000e, 0x6124,
-	0xd1d4, 0x1178, 0xd1cc, 0x1150, 0xd1dc, 0x1128, 0xd1e4, 0x0158,
-	0x7097, 0x001e, 0x0040, 0x7097, 0x001d, 0x0028, 0x7097, 0x0020,
-	0x0010, 0x7097, 0x001f, 0x0005, 0x0016, 0x00c6, 0x00d6, 0x00e6,
-	0x0126, 0x2061, 0x0100, 0x2069, 0x0140, 0x2071, 0x1800, 0x2091,
-	0x8000, 0x080c, 0x70ba, 0x11f8, 0x2001, 0x180c, 0x200c, 0xd1b4,
-	0x01d0, 0xc1b4, 0x2102, 0x0026, 0x2011, 0x0200, 0x080c, 0x28ac,
-	0x002e, 0x080c, 0x2858, 0x6024, 0xd0cc, 0x0148, 0x2001, 0x00a0,
-	0x080c, 0x2872, 0x080c, 0x73b9, 0x080c, 0x5cf7, 0x0428, 0x6028,
-	0xc0cd, 0x602a, 0x0408, 0x080c, 0x70d4, 0x0150, 0x080c, 0x70cb,
-	0x1138, 0x2001, 0x0001, 0x080c, 0x23fe, 0x080c, 0x708e, 0x00a0,
-	0x080c, 0x6f98, 0x0178, 0x2001, 0x0001, 0x080c, 0x23fe, 0x7094,
-	0x9086, 0x001e, 0x0120, 0x7094, 0x9086, 0x0022, 0x1118, 0x7097,
-	0x0025, 0x0010, 0x7097, 0x0021, 0x012e, 0x00ee, 0x00de, 0x00ce,
-	0x001e, 0x0005, 0x0026, 0x2011, 0x6f23, 0x080c, 0x8272, 0x002e,
-	0x0016, 0x0026, 0x2009, 0x0064, 0x2011, 0x6f23, 0x080c, 0x8269,
-	0x002e, 0x001e, 0x0005, 0x00e6, 0x00f6, 0x0016, 0x080c, 0x8fd0,
-	0x2071, 0x1800, 0x080c, 0x6ebc, 0x001e, 0x00fe, 0x00ee, 0x0005,
-	0x0016, 0x0026, 0x0036, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x0126,
-	0x080c, 0x8fd0, 0x2061, 0x0100, 0x2069, 0x0140, 0x2071, 0x1800,
-	0x2091, 0x8000, 0x6028, 0xc09c, 0x602a, 0x080c, 0x98c7, 0x2011,
-	0x0003, 0x080c, 0x9324, 0x2011, 0x0002, 0x080c, 0x932e, 0x080c,
-	0x921d, 0x080c, 0x821e, 0x0036, 0x901e, 0x080c, 0x929d, 0x003e,
-	0x080c, 0x98e3, 0x60e3, 0x0000, 0x080c, 0xd644, 0x080c, 0xd65f,
-	0x2009, 0x0004, 0x080c, 0x285e, 0x080c, 0x2774, 0x2001, 0x1800,
-	0x2003, 0x0004, 0x2011, 0x0008, 0x080c, 0x28ac, 0x2011, 0x6f23,
-	0x080c, 0x8272, 0x080c, 0x70d4, 0x0118, 0x9006, 0x080c, 0x2872,
-	0x080c, 0x0bab, 0x2001, 0x0001, 0x080c, 0x23fe, 0x012e, 0x00fe,
-	0x00ee, 0x00de, 0x00ce, 0x003e, 0x002e, 0x001e, 0x0005, 0x0026,
-	0x00e6, 0x2011, 0x6f30, 0x2071, 0x19db, 0x701c, 0x9206, 0x1118,
-	0x7018, 0x9005, 0x0110, 0x9085, 0x0001, 0x00ee, 0x002e, 0x0005,
-	0x6020, 0xd09c, 0x0005, 0x6800, 0x9084, 0xfffe, 0x9086, 0x00c0,
-	0x01b8, 0x2001, 0x00c0, 0x080c, 0x2872, 0x0156, 0x20a9, 0x002d,
-	0x1d04, 0x6fa8, 0x2091, 0x6000, 0x1f04, 0x6fa8, 0x015e, 0x00d6,
-	0x2069, 0x1800, 0x6898, 0x8001, 0x0220, 0x0118, 0x689a, 0x00de,
-	0x0005, 0x689b, 0x0014, 0x68e8, 0xd0dc, 0x0dc8, 0x6800, 0x9086,
-	0x0001, 0x1da8, 0x080c, 0x827e, 0x0c90, 0x00c6, 0x00d6, 0x00e6,
-	0x2061, 0x0100, 0x2069, 0x0140, 0x2071, 0x1800, 0x080c, 0x73c8,
-	0x2001, 0x1945, 0x2003, 0x0000, 0x9006, 0x7096, 0x60e2, 0x6886,
-	0x080c, 0x24cd, 0x9006, 0x080c, 0x2872, 0x080c, 0x5bb2, 0x0026,
-	0x2011, 0xffff, 0x080c, 0x28ac, 0x002e, 0x602b, 0x182c, 0x00ee,
-	0x00de, 0x00ce, 0x0005, 0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100,
-	0x2069, 0x0140, 0x2071, 0x1800, 0x2001, 0x1955, 0x200c, 0x9186,
-	0x0000, 0x0158, 0x9186, 0x0001, 0x0158, 0x9186, 0x0002, 0x0158,
-	0x9186, 0x0003, 0x0158, 0x0804, 0x707e, 0x7097, 0x0022, 0x0040,
-	0x7097, 0x0021, 0x0028, 0x7097, 0x0023, 0x0010, 0x7097, 0x0024,
-	0x60e3, 0x0000, 0x6887, 0x0001, 0x2001, 0x0001, 0x080c, 0x24cd,
-	0x080c, 0x98c7, 0x0026, 0x080c, 0x9b6c, 0x002e, 0x080c, 0x98e3,
-	0x7000, 0x908e, 0x0004, 0x0118, 0x602b, 0x0028, 0x0010, 0x602b,
-	0x0020, 0x0156, 0x0126, 0x2091, 0x8000, 0x20a9, 0x0005, 0x6024,
-	0xd0ac, 0x0150, 0x012e, 0x015e, 0x080c, 0xbf8f, 0x0118, 0x9006,
-	0x080c, 0x289c, 0x0804, 0x708a, 0x6800, 0x9084, 0x00a1, 0xc0bd,
-	0x6802, 0x080c, 0x2858, 0x6904, 0xd1d4, 0x1140, 0x2001, 0x0100,
-	0x080c, 0x2872, 0x1f04, 0x702f, 0x080c, 0x7111, 0x012e, 0x015e,
-	0x080c, 0x70cb, 0x0170, 0x6044, 0x9005, 0x0130, 0x080c, 0x7111,
-	0x9006, 0x8001, 0x1df0, 0x0028, 0x6804, 0xd0d4, 0x1110, 0x080c,
-	0x7111, 0x080c, 0xbf8f, 0x0118, 0x9006, 0x080c, 0x289c, 0x0016,
-	0x0026, 0x7000, 0x908e, 0x0004, 0x0130, 0x2009, 0x00c8, 0x2011,
-	0x6f30, 0x080c, 0x8230, 0x002e, 0x001e, 0x080c, 0x807e, 0x7034,
-	0xc085, 0x7036, 0x2001, 0x1955, 0x2003, 0x0004, 0x080c, 0x6d85,
-	0x080c, 0x70cb, 0x0138, 0x6804, 0xd0d4, 0x1120, 0xd0dc, 0x1100,
-	0x080c, 0x73be, 0x00ee, 0x00de, 0x00ce, 0x0005, 0x00c6, 0x00d6,
-	0x00e6, 0x2061, 0x0100, 0x2069, 0x0140, 0x2071, 0x1800, 0x080c,
-	0x8095, 0x080c, 0x8087, 0x080c, 0x73c8, 0x2001, 0x1945, 0x2003,
-	0x0000, 0x9006, 0x7096, 0x60e2, 0x6886, 0x080c, 0x24cd, 0x9006,
-	0x080c, 0x2872, 0x6043, 0x0090, 0x6043, 0x0010, 0x0026, 0x2011,
-	0xffff, 0x080c, 0x28ac, 0x002e, 0x602b, 0x182c, 0x00ee, 0x00de,
-	0x00ce, 0x0005, 0x0006, 0x2001, 0x1954, 0x2004, 0x9086, 0xaaaa,
-	0x000e, 0x0005, 0x0006, 0x080c, 0x53ac, 0x9084, 0x0030, 0x9086,
-	0x0000, 0x000e, 0x0005, 0x0006, 0x080c, 0x53ac, 0x9084, 0x0030,
-	0x9086, 0x0030, 0x000e, 0x0005, 0x0006, 0x080c, 0x53ac, 0x9084,
-	0x0030, 0x9086, 0x0010, 0x000e, 0x0005, 0x0006, 0x080c, 0x53ac,
-	0x9084, 0x0030, 0x9086, 0x0020, 0x000e, 0x0005, 0x0036, 0x0016,
-	0x2001, 0x180c, 0x2004, 0x908c, 0x0013, 0x0180, 0x0020, 0x080c,
-	0x24ed, 0x900e, 0x0028, 0x080c, 0x6682, 0x1dc8, 0x2009, 0x0002,
-	0x2019, 0x0028, 0x080c, 0x2ff3, 0x9006, 0x0019, 0x001e, 0x003e,
-	0x0005, 0x00e6, 0x2071, 0x180c, 0x2e04, 0x0130, 0x080c, 0xbf88,
-	0x1128, 0x9085, 0x0010, 0x0010, 0x9084, 0xffef, 0x2072, 0x00ee,
-	0x0005, 0x6050, 0x0006, 0x60ec, 0x0006, 0x600c, 0x0006, 0x6004,
-	0x0006, 0x6028, 0x0006, 0x080c, 0x28cf, 0x080c, 0x2902, 0x602f,
-	0x0100, 0x602f, 0x0000, 0x602f, 0x0040, 0x602f, 0x0000, 0x20a9,
-	0x0002, 0x080c, 0x2839, 0x0026, 0x2011, 0x0040, 0x080c, 0x28ac,
-	0x002e, 0x000e, 0x602a, 0x000e, 0x6006, 0x000e, 0x600e, 0x000e,
-	0x60ee, 0x60e3, 0x0000, 0x6887, 0x0001, 0x2001, 0x0001, 0x080c,
-	0x24cd, 0x2001, 0x00a0, 0x0006, 0x080c, 0xbf8f, 0x000e, 0x0130,
-	0x080c, 0x2890, 0x9006, 0x080c, 0x289c, 0x0010, 0x080c, 0x2872,
-	0x000e, 0x6052, 0x6050, 0x0006, 0xc0e5, 0x6052, 0x00f6, 0x2079,
-	0x0100, 0x080c, 0x27e5, 0x00fe, 0x000e, 0x6052, 0x0005, 0x0156,
-	0x0016, 0x0026, 0x0036, 0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100,
-	0x2069, 0x0140, 0x2071, 0x1800, 0x080c, 0x9925, 0x0158, 0x2001,
-	0x0386, 0x2004, 0xd0b4, 0x1130, 0x2001, 0x0016, 0x080c, 0x98b8,
-	0x0804, 0x71ec, 0x2001, 0x180c, 0x200c, 0xc1c4, 0x2102, 0x6028,
-	0x9084, 0xe1ff, 0x602a, 0x2011, 0x0200, 0x080c, 0x28ac, 0x2001,
-	0x0090, 0x080c, 0x2872, 0x20a9, 0x0366, 0x6024, 0xd0cc, 0x1558,
-	0x1d04, 0x718d, 0x2091, 0x6000, 0x1f04, 0x718d, 0x080c, 0x98c7,
-	0x2011, 0x0003, 0x080c, 0x9324, 0x2011, 0x0002, 0x080c, 0x932e,
-	0x080c, 0x921d, 0x901e, 0x080c, 0x929d, 0x2001, 0x0386, 0x2003,
-	0x7000, 0x080c, 0x98e3, 0x2001, 0x00a0, 0x080c, 0x2872, 0x080c,
-	0x73b9, 0x080c, 0x5cf7, 0x080c, 0xbf8f, 0x0110, 0x080c, 0x0cd1,
-	0x9085, 0x0001, 0x04b8, 0x080c, 0x19ae, 0x60e3, 0x0000, 0x2001,
-	0x0002, 0x080c, 0x24cd, 0x60e2, 0x2001, 0x0080, 0x080c, 0x2872,
-	0x20a9, 0x0366, 0x2011, 0x1e00, 0x080c, 0x28ac, 0x2009, 0x1e00,
-	0x080c, 0x2858, 0x6024, 0x910c, 0x0140, 0x1d04, 0x71ca, 0x2091,
-	0x6000, 0x1f04, 0x71ca, 0x0804, 0x7196, 0x2001, 0x0386, 0x2003,
-	0x7000, 0x6028, 0x9085, 0x1e00, 0x602a, 0x70b0, 0x9005, 0x1118,
-	0x6887, 0x0001, 0x0008, 0x6886, 0x080c, 0xbf8f, 0x0110, 0x080c,
-	0x0cd1, 0x9006, 0x00ee, 0x00de, 0x00ce, 0x003e, 0x002e, 0x001e,
-	0x015e, 0x0005, 0x0156, 0x0016, 0x0026, 0x0036, 0x00c6, 0x00d6,
-	0x00e6, 0x2061, 0x0100, 0x2071, 0x1800, 0x7000, 0x9086, 0x0003,
-	0x1168, 0x2001, 0x020b, 0x2004, 0x9084, 0x5540, 0x9086, 0x5540,
-	0x1128, 0x2069, 0x1a4e, 0x2d04, 0x8000, 0x206a, 0x2069, 0x0140,
-	0x6020, 0x9084, 0x00c0, 0x0120, 0x6884, 0x9005, 0x1904, 0x7263,
-	0x2001, 0x0088, 0x080c, 0x2872, 0x9006, 0x60e2, 0x6886, 0x080c,
-	0x24cd, 0x2069, 0x0200, 0x6804, 0x9005, 0x1118, 0x6808, 0x9005,
-	0x01d0, 0x6028, 0x9084, 0xfbff, 0x602a, 0x2011, 0x0400, 0x080c,
-	0x28ac, 0x2069, 0x1967, 0x7000, 0x206a, 0x7097, 0x0026, 0x7003,
-	0x0001, 0x20a9, 0x0002, 0x1d04, 0x7243, 0x2091, 0x6000, 0x1f04,
-	0x7243, 0x0804, 0x7294, 0x2069, 0x0140, 0x20a9, 0x0384, 0x2011,
-	0x1e00, 0x080c, 0x28ac, 0x2009, 0x1e00, 0x080c, 0x2858, 0x6024,
-	0x910c, 0x0528, 0x9084, 0x1a00, 0x1510, 0x1d04, 0x724f, 0x2091,
-	0x6000, 0x1f04, 0x724f, 0x080c, 0x98c7, 0x2011, 0x0003, 0x080c,
-	0x9324, 0x2011, 0x0002, 0x080c, 0x932e, 0x080c, 0x921d, 0x901e,
-	0x080c, 0x929d, 0x080c, 0x98e3, 0x2001, 0x00a0, 0x080c, 0x2872,
-	0x080c, 0x73b9, 0x080c, 0x5cf7, 0x9085, 0x0001, 0x00a8, 0x2001,
-	0x0080, 0x080c, 0x2872, 0x2069, 0x0140, 0x60e3, 0x0000, 0x70b0,
-	0x9005, 0x1118, 0x6887, 0x0001, 0x0008, 0x6886, 0x2001, 0x0002,
-	0x080c, 0x24cd, 0x60e2, 0x9006, 0x00ee, 0x00de, 0x00ce, 0x003e,
-	0x002e, 0x001e, 0x015e, 0x0005, 0x0156, 0x0016, 0x0026, 0x0036,
-	0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100, 0x2071, 0x1800, 0x6020,
-	0x9084, 0x00c0, 0x01e8, 0x080c, 0x98c7, 0x2011, 0x0003, 0x080c,
-	0x9324, 0x2011, 0x0002, 0x080c, 0x932e, 0x080c, 0x921d, 0x901e,
-	0x080c, 0x929d, 0x080c, 0x98e3, 0x2069, 0x0140, 0x2001, 0x00a0,
-	0x080c, 0x2872, 0x080c, 0x73b9, 0x080c, 0x5cf7, 0x0804, 0x7336,
-	0x2001, 0x180c, 0x200c, 0xd1b4, 0x1160, 0xc1b5, 0x2102, 0x080c,
-	0x6f18, 0x2069, 0x0140, 0x2001, 0x0080, 0x080c, 0x2872, 0x60e3,
-	0x0000, 0x2069, 0x0200, 0x6804, 0x9005, 0x1118, 0x6808, 0x9005,
-	0x0190, 0x6028, 0x9084, 0xfdff, 0x602a, 0x2011, 0x0200, 0x080c,
-	0x28ac, 0x2069, 0x1967, 0x7000, 0x206a, 0x7097, 0x0027, 0x7003,
-	0x0001, 0x0804, 0x7336, 0x2011, 0x1e00, 0x080c, 0x28ac, 0x2009,
-	0x1e00, 0x080c, 0x2858, 0x6024, 0x910c, 0x01c8, 0x9084, 0x1c00,
-	0x11b0, 0x1d04, 0x72f3, 0x0006, 0x0016, 0x00c6, 0x00d6, 0x00e6,
-	0x080c, 0x80c6, 0x00ee, 0x00de, 0x00ce, 0x001e, 0x000e, 0x00e6,
-	0x2071, 0x19db, 0x7070, 0x00ee, 0x9005, 0x19e8, 0x00f8, 0x0026,
-	0x2011, 0x6f30, 0x080c, 0x816c, 0x2011, 0x6f23, 0x080c, 0x8272,
-	0x002e, 0x2069, 0x0140, 0x60e3, 0x0000, 0x70b0, 0x9005, 0x1118,
-	0x6887, 0x0001, 0x0008, 0x6886, 0x2001, 0x0002, 0x080c, 0x24cd,
-	0x60e2, 0x2001, 0x180c, 0x200c, 0xc1b4, 0x2102, 0x00ee, 0x00de,
-	0x00ce, 0x003e, 0x002e, 0x001e, 0x015e, 0x0005, 0x0156, 0x0016,
-	0x0026, 0x0036, 0x0046, 0x00c6, 0x00e6, 0x2061, 0x0100, 0x2071,
-	0x1800, 0x080c, 0xbf88, 0x1904, 0x73a3, 0x7130, 0xd184, 0x1170,
-	0x080c, 0x319a, 0x0138, 0xc18d, 0x7132, 0x2011, 0x185c, 0x2214,
-	0xd2ac, 0x1120, 0x7030, 0xd08c, 0x0904, 0x73a3, 0x2011, 0x185c,
-	0x220c, 0x0438, 0x0016, 0x2019, 0x000e, 0x080c, 0xd234, 0x0156,
-	0x00b6, 0x20a9, 0x007f, 0x900e, 0x9186, 0x007e, 0x01a0, 0x9186,
-	0x0080, 0x0188, 0x080c, 0x628f, 0x1170, 0x2120, 0x9006, 0x0016,
-	0x2009, 0x000e, 0x080c, 0xd2bc, 0x2009, 0x0001, 0x2011, 0x0100,
-	0x080c, 0x8401, 0x001e, 0x8108, 0x1f04, 0x736c, 0x00be, 0x015e,
-	0x001e, 0xd1ac, 0x1148, 0x0016, 0x2009, 0x0002, 0x2019, 0x0004,
-	0x080c, 0x2ff3, 0x001e, 0x0078, 0x0156, 0x00b6, 0x20a9, 0x007f,
-	0x900e, 0x080c, 0x628f, 0x1110, 0x080c, 0x5d11, 0x8108, 0x1f04,
-	0x7399, 0x00be, 0x015e, 0x080c, 0x19ae, 0x080c, 0x98c7, 0x080c,
-	0x9b6c, 0x080c, 0x98e3, 0x60e3, 0x0000, 0x080c, 0x5cf7, 0x080c,
-	0x6feb, 0x00ee, 0x00ce, 0x004e, 0x003e, 0x002e, 0x001e, 0x015e,
-	0x0005, 0x2001, 0x1955, 0x2003, 0x0001, 0x0005, 0x2001, 0x1955,
-	0x2003, 0x0000, 0x0005, 0x2001, 0x1954, 0x2003, 0xaaaa, 0x0005,
-	0x2001, 0x1954, 0x2003, 0x0000, 0x0005, 0x2071, 0x18f8, 0x7003,
-	0x0000, 0x7007, 0x0000, 0x080c, 0x1048, 0x090c, 0x0d65, 0xa8ab,
-	0xdcb0, 0x2900, 0x704e, 0x080c, 0x1048, 0x090c, 0x0d65, 0xa8ab,
-	0xdcb0, 0x2900, 0x7052, 0xa867, 0x0000, 0xa86b, 0x0001, 0xa89f,
-	0x0000, 0x0005, 0x00e6, 0x2071, 0x0040, 0x6848, 0x9005, 0x1118,
-	0x9085, 0x0001, 0x04b0, 0x6840, 0x9005, 0x0150, 0x04a1, 0x6a50,
-	0x9200, 0x7002, 0x6854, 0x9101, 0x7006, 0x9006, 0x7012, 0x7016,
-	0x6850, 0x7002, 0x6854, 0x7006, 0x6858, 0x700a, 0x685c, 0x700e,
-	0x6840, 0x9005, 0x1110, 0x7012, 0x7016, 0x6848, 0x701a, 0x701c,
-	0x9085, 0x0040, 0x701e, 0x2001, 0x0019, 0x7036, 0x702b, 0x0001,
-	0x2001, 0x0004, 0x200c, 0x918c, 0xfff7, 0x918d, 0x8000, 0x2102,
-	0x00d6, 0x2069, 0x18f8, 0x6807, 0x0001, 0x00de, 0x080c, 0x79c6,
-	0x9006, 0x00ee, 0x0005, 0x900e, 0x0156, 0x20a9, 0x0006, 0x8003,
-	0x818d, 0x1f04, 0x742f, 0x015e, 0x0005, 0x2079, 0x0040, 0x2071,
-	0x18f8, 0x7004, 0x0002, 0x7445, 0x7446, 0x7492, 0x74ed, 0x762e,
-	0x7443, 0x7443, 0x7658, 0x080c, 0x0d65, 0x0005, 0x2079, 0x0040,
-	0x2001, 0x1dc0, 0x2003, 0x0000, 0x782c, 0x908c, 0x0780, 0x190c,
-	0x7a52, 0xd0a4, 0x0578, 0x2001, 0x1dc0, 0x2004, 0x9082, 0x0080,
-	0x1648, 0x1d04, 0x7463, 0x2001, 0x19de, 0x200c, 0x8109, 0x0510,
-	0x2091, 0x6000, 0x2102, 0x7824, 0x2048, 0x9006, 0xa802, 0xa806,
-	0xa864, 0x9084, 0x00ff, 0x908a, 0x0040, 0x0610, 0x00c0, 0x2001,
-	0x1800, 0x200c, 0x9186, 0x0003, 0x1168, 0x7004, 0x0002, 0x7482,
-	0x744c, 0x7482, 0x7480, 0x7482, 0x7482, 0x7482, 0x7482, 0x7482,
-	0x080c, 0x74ed, 0x782c, 0xd09c, 0x090c, 0x79c6, 0x0005, 0x9082,
-	0x005a, 0x1218, 0x2100, 0x003b, 0x0c10, 0x080c, 0x7523, 0x0c90,
-	0x00e3, 0x08e8, 0x0005, 0x7523, 0x7523, 0x7523, 0x7523, 0x7523,
-	0x7523, 0x7523, 0x7523, 0x7545, 0x7523, 0x7523, 0x7523, 0x7523,
-	0x7523, 0x7523, 0x7523, 0x7523, 0x7523, 0x7523, 0x7523, 0x7523,
-	0x7523, 0x7523, 0x7523, 0x7523, 0x7523, 0x7523, 0x7523, 0x752f,
-	0x7523, 0x772d, 0x7523, 0x7523, 0x7523, 0x7545, 0x7523, 0x752f,
-	0x776e, 0x77af, 0x77f6, 0x780a, 0x7523, 0x7523, 0x7545, 0x752f,
-	0x7523, 0x7523, 0x7602, 0x78b5, 0x78d0, 0x7523, 0x7545, 0x7523,
-	0x7523, 0x7523, 0x7523, 0x75f8, 0x78d0, 0x7523, 0x7523, 0x7523,
-	0x7523, 0x7523, 0x7523, 0x7523, 0x7523, 0x7523, 0x7559, 0x7523,
-	0x7523, 0x7523, 0x7523, 0x7523, 0x7523, 0x7523, 0x7523, 0x7523,
-	0x79f6, 0x7523, 0x7523, 0x7523, 0x7523, 0x7523, 0x756d, 0x7523,
-	0x7523, 0x7523, 0x7523, 0x7523, 0x7523, 0x2079, 0x0040, 0x7004,
-	0x9086, 0x0003, 0x1198, 0x782c, 0x080c, 0x79ef, 0xd0a4, 0x0170,
-	0x7824, 0x2048, 0x9006, 0xa802, 0xa806, 0xa864, 0x9084, 0x00ff,
-	0x908a, 0x001a, 0x1210, 0x002b, 0x0c50, 0x00e9, 0x080c, 0x79c6,
-	0x0005, 0x7523, 0x752f, 0x7719, 0x7523, 0x752f, 0x7523, 0x752f,
-	0x752f, 0x7523, 0x752f, 0x7719, 0x752f, 0x752f, 0x752f, 0x752f,
-	0x752f, 0x7523, 0x752f, 0x7719, 0x7523, 0x7523, 0x752f, 0x7523,
-	0x7523, 0x7523, 0x752f, 0x00e6, 0x2071, 0x18f8, 0x2009, 0x0400,
-	0x0071, 0x00ee, 0x0005, 0x2009, 0x1000, 0x0049, 0x0005, 0x2009,
-	0x2000, 0x0029, 0x0005, 0x2009, 0x0800, 0x0009, 0x0005, 0x7007,
-	0x0001, 0xa868, 0x9084, 0x00ff, 0x9105, 0xa86a, 0x0126, 0x2091,
-	0x8000, 0x080c, 0x69b5, 0x012e, 0x0005, 0xa864, 0x8007, 0x9084,
-	0x00ff, 0x0d08, 0x8001, 0x1120, 0x7007, 0x0001, 0x0804, 0x76d7,
-	0x7007, 0x0003, 0x7012, 0x2900, 0x7016, 0x701a, 0x704b, 0x76d7,
-	0x0005, 0xa864, 0x8007, 0x9084, 0x00ff, 0x0968, 0x8001, 0x1120,
-	0x7007, 0x0001, 0x0804, 0x76f2, 0x7007, 0x0003, 0x7012, 0x2900,
-	0x7016, 0x701a, 0x704b, 0x76f2, 0x0005, 0xa864, 0x8007, 0x9084,
-	0x00ff, 0x9086, 0x0001, 0x1904, 0x752b, 0x7007, 0x0001, 0x2009,
-	0x1833, 0x210c, 0x81ff, 0x1904, 0x75cf, 0xa994, 0x9186, 0x006f,
-	0x0188, 0x9186, 0x0074, 0x15b0, 0x0026, 0x2011, 0x0010, 0x080c,
-	0x66ae, 0x002e, 0x0578, 0x0016, 0xa998, 0x080c, 0x66f8, 0x001e,
-	0x1548, 0x0400, 0x080c, 0x70ba, 0x0140, 0xa897, 0x4005, 0xa89b,
-	0x0016, 0x2001, 0x0030, 0x900e, 0x0438, 0x0026, 0x2011, 0x8008,
-	0x080c, 0x66ae, 0x002e, 0x01b0, 0x0016, 0x0026, 0x0036, 0xa998,
-	0xaaa0, 0xab9c, 0x918d, 0x8000, 0x080c, 0x66f8, 0x003e, 0x002e,
-	0x001e, 0x1140, 0xa897, 0x4005, 0xa89b, 0x4009, 0x2001, 0x0030,
-	0x900e, 0x0050, 0xa868, 0x9084, 0x00ff, 0xa86a, 0xa883, 0x0000,
-	0x080c, 0x5f22, 0x1108, 0x0005, 0x0126, 0x2091, 0x8000, 0xa867,
-	0x0139, 0xa87a, 0xa982, 0x080c, 0x69b5, 0x012e, 0x0ca0, 0xa994,
-	0x9186, 0x0071, 0x0904, 0x757d, 0x9186, 0x0064, 0x0904, 0x757d,
-	0x9186, 0x007c, 0x0904, 0x757d, 0x9186, 0x0028, 0x0904, 0x757d,
-	0x9186, 0x0038, 0x0904, 0x757d, 0x9186, 0x0078, 0x0904, 0x757d,
-	0x9186, 0x005f, 0x0904, 0x757d, 0x9186, 0x0056, 0x0904, 0x757d,
-	0xa897, 0x4005, 0xa89b, 0x0001, 0x2001, 0x0030, 0x900e, 0x0860,
-	0xa87c, 0x9084, 0x00c0, 0x9086, 0x00c0, 0x1120, 0x7007, 0x0001,
-	0x0804, 0x78e7, 0x2900, 0x7016, 0x701a, 0x20a9, 0x0004, 0xa860,
-	0x20e0, 0xa85c, 0x9080, 0x0030, 0x2098, 0x7050, 0x2040, 0xa060,
-	0x20e8, 0xa05c, 0x9080, 0x0023, 0x20a0, 0x4003, 0xa888, 0x7012,
-	0x9082, 0x0401, 0x1a04, 0x7533, 0xaab4, 0x928a, 0x0002, 0x1a04,
-	0x7533, 0x82ff, 0x1138, 0xa8b8, 0xa9bc, 0x9105, 0x0118, 0x2001,
-	0x7695, 0x0018, 0x9280, 0x768b, 0x2005, 0x7056, 0x7010, 0x9015,
-	0x0904, 0x7676, 0x080c, 0x1048, 0x1118, 0x7007, 0x0004, 0x0005,
-	0x2900, 0x7022, 0x7054, 0x2060, 0xe000, 0xa866, 0x7050, 0x2040,
-	0xa95c, 0xe004, 0x9100, 0xa076, 0xa860, 0xa072, 0xe008, 0x920a,
-	0x1210, 0x900e, 0x2200, 0x7112, 0xe20c, 0x8003, 0x800b, 0x9296,
-	0x0004, 0x0108, 0x9108, 0xa17a, 0x810b, 0xa17e, 0x080c, 0x1124,
-	0xa06c, 0x908e, 0x0100, 0x0170, 0x9086, 0x0200, 0x0118, 0x7007,
-	0x0007, 0x0005, 0x7020, 0x2048, 0x080c, 0x1061, 0x7014, 0x2048,
-	0x0804, 0x7533, 0x7020, 0x2048, 0x7018, 0xa802, 0xa807, 0x0000,
-	0x2908, 0x2048, 0xa906, 0x711a, 0x0804, 0x762e, 0x7014, 0x2048,
-	0x7007, 0x0001, 0xa8b4, 0x9005, 0x1128, 0xa8b8, 0xa9bc, 0x9105,
-	0x0108, 0x00b9, 0xa864, 0x9084, 0x00ff, 0x9086, 0x001e, 0x0904,
-	0x78e7, 0x0804, 0x76d7, 0x768d, 0x7691, 0x0002, 0x001d, 0x0007,
-	0x0004, 0x000a, 0x001b, 0x0005, 0x0006, 0x000a, 0x001d, 0x0005,
-	0x0004, 0x0076, 0x0066, 0xafb8, 0xaebc, 0xa804, 0x2050, 0xb0c0,
-	0xb0e2, 0xb0bc, 0xb0de, 0xb0b8, 0xb0d2, 0xb0b4, 0xb0ce, 0xb6da,
-	0xb7d6, 0xb0b0, 0xb0ca, 0xb0ac, 0xb0c6, 0xb0a8, 0xb0ba, 0xb0a4,
-	0xb0b6, 0xb6c2, 0xb7be, 0xb0a0, 0xb0b2, 0xb09c, 0xb0ae, 0xb098,
-	0xb0a2, 0xb094, 0xb09e, 0xb6aa, 0xb7a6, 0xb090, 0xb09a, 0xb08c,
-	0xb096, 0xb088, 0xb08a, 0xb084, 0xb086, 0xb692, 0xb78e, 0xb080,
-	0xb082, 0xb07c, 0xb07e, 0xb078, 0xb072, 0xb074, 0xb06e, 0xb67a,
-	0xb776, 0xb004, 0x9055, 0x1958, 0x006e, 0x007e, 0x0005, 0x2009,
-	0x1833, 0x210c, 0x81ff, 0x1178, 0x080c, 0x5d71, 0x1108, 0x0005,
-	0x080c, 0x6bc6, 0x0126, 0x2091, 0x8000, 0x080c, 0xbb73, 0x080c,
-	0x69b5, 0x012e, 0x0ca0, 0x080c, 0xbf88, 0x1d70, 0x2001, 0x0028,
-	0x900e, 0x0c70, 0x2009, 0x1833, 0x210c, 0x81ff, 0x11d8, 0xa888,
-	0x9005, 0x01e0, 0xa883, 0x0000, 0xa87c, 0xd0f4, 0x0120, 0x080c,
-	0x5e84, 0x1138, 0x0005, 0x9006, 0xa87a, 0x080c, 0x5dff, 0x1108,
-	0x0005, 0x0126, 0x2091, 0x8000, 0xa87a, 0xa982, 0x080c, 0x69b5,
-	0x012e, 0x0cb0, 0x2001, 0x0028, 0x900e, 0x0c98, 0x2001, 0x0000,
-	0x0c80, 0x7018, 0xa802, 0x2908, 0x2048, 0xa906, 0x711a, 0x7010,
-	0x8001, 0x7012, 0x0118, 0x7007, 0x0003, 0x0030, 0x7014, 0x2048,
-	0x7007, 0x0001, 0x7048, 0x080f, 0x0005, 0x00b6, 0x7007, 0x0001,
-	0xa974, 0xa878, 0x9084, 0x00ff, 0x9096, 0x0004, 0x0540, 0x20a9,
-	0x0001, 0x9096, 0x0001, 0x0190, 0x900e, 0x20a9, 0x0800, 0x9096,
-	0x0002, 0x0160, 0x9005, 0x11d8, 0xa974, 0x080c, 0x628f, 0x11b8,
-	0x0066, 0xae80, 0x080c, 0x639f, 0x006e, 0x0088, 0x0046, 0x2011,
-	0x180c, 0x2224, 0xc484, 0x2412, 0x004e, 0x00c6, 0x080c, 0x628f,
-	0x1110, 0x080c, 0x6572, 0x8108, 0x1f04, 0x7756, 0x00ce, 0xa87c,
-	0xd084, 0x1120, 0x080c, 0x1061, 0x00be, 0x0005, 0x0126, 0x2091,
-	0x8000, 0x080c, 0x69b5, 0x012e, 0x00be, 0x0005, 0x0126, 0x2091,
-	0x8000, 0x7007, 0x0001, 0x080c, 0x6686, 0x0580, 0x2061, 0x1a46,
-	0x6100, 0xd184, 0x0178, 0xa888, 0x9084, 0x00ff, 0x1550, 0x6000,
-	0xd084, 0x0520, 0x6004, 0x9005, 0x1538, 0x6003, 0x0000, 0x600b,
-	0x0000, 0x00c8, 0x2011, 0x0001, 0xa890, 0x9005, 0x1110, 0x2001,
-	0x001e, 0x8000, 0x6016, 0xa888, 0x9084, 0x00ff, 0x0178, 0x6006,
-	0xa888, 0x8007, 0x9084, 0x00ff, 0x0148, 0x600a, 0xa888, 0x8000,
-	0x1108, 0xc28d, 0x6202, 0x012e, 0x0804, 0x79b0, 0x012e, 0x0804,
-	0x79aa, 0x012e, 0x0804, 0x79a4, 0x012e, 0x0804, 0x79a7, 0x0126,
-	0x2091, 0x8000, 0x7007, 0x0001, 0x080c, 0x6686, 0x05e0, 0x2061,
-	0x1a46, 0x6000, 0xd084, 0x05b8, 0x6204, 0x6308, 0xd08c, 0x1530,
-	0xac78, 0x9484, 0x0003, 0x0170, 0xa988, 0x918c, 0x00ff, 0x8001,
-	0x1120, 0x2100, 0x9210, 0x0620, 0x0028, 0x8001, 0x1508, 0x2100,
-	0x9212, 0x02f0, 0x9484, 0x000c, 0x0188, 0xa988, 0x810f, 0x918c,
-	0x00ff, 0x9082, 0x0004, 0x1120, 0x2100, 0x9318, 0x0288, 0x0030,
-	0x9082, 0x0004, 0x1168, 0x2100, 0x931a, 0x0250, 0xa890, 0x9005,
-	0x0110, 0x8000, 0x6016, 0x6206, 0x630a, 0x012e, 0x0804, 0x79b0,
-	0x012e, 0x0804, 0x79ad, 0x012e, 0x0804, 0x79aa, 0x0126, 0x2091,
-	0x8000, 0x7007, 0x0001, 0x2061, 0x1a46, 0x6300, 0xd38c, 0x1120,
-	0x6308, 0x8318, 0x0220, 0x630a, 0x012e, 0x0804, 0x79be, 0x012e,
-	0x0804, 0x79ad, 0x00b6, 0x0126, 0x00c6, 0x2091, 0x8000, 0x7007,
-	0x0001, 0xa87c, 0xd0ac, 0x0148, 0x00c6, 0x2061, 0x1a46, 0x6000,
-	0x9084, 0xfcff, 0x6002, 0x00ce, 0x0440, 0xa888, 0x9005, 0x05d8,
-	0xa88c, 0x9065, 0x0598, 0x2001, 0x1833, 0x2004, 0x9005, 0x0118,
-	0x080c, 0x9c20, 0x0068, 0x6017, 0xf400, 0x6063, 0x0000, 0xa97c,
-	0xd1a4, 0x0110, 0xa980, 0x6162, 0x2009, 0x0041, 0x080c, 0x9c82,
-	0xa988, 0x918c, 0xff00, 0x9186, 0x2000, 0x1138, 0x0026, 0x900e,
-	0x2011, 0xfdff, 0x080c, 0x8401, 0x002e, 0xa87c, 0xd0c4, 0x0148,
-	0x2061, 0x1a46, 0x6000, 0xd08c, 0x1120, 0x6008, 0x8000, 0x0208,
-	0x600a, 0x00ce, 0x012e, 0x00be, 0x0804, 0x79b0, 0x00ce, 0x012e,
-	0x00be, 0x0804, 0x79aa, 0xa984, 0x9186, 0x002e, 0x0d30, 0x9186,
-	0x002d, 0x0d18, 0x9186, 0x0045, 0x0510, 0x9186, 0x002a, 0x1130,
-	0x2001, 0x180c, 0x200c, 0xc194, 0x2102, 0x08b8, 0x9186, 0x0020,
-	0x0158, 0x9186, 0x0029, 0x1d10, 0xa974, 0x080c, 0x628f, 0x1968,
-	0xb800, 0xc0e4, 0xb802, 0x0848, 0xa88c, 0x9065, 0x09b8, 0x6007,
-	0x0024, 0x2001, 0x195e, 0x2004, 0x601a, 0x0804, 0x7845, 0xa88c,
-	0x9065, 0x0960, 0x00e6, 0xa890, 0x9075, 0x2001, 0x1833, 0x2004,
-	0x9005, 0x0150, 0x080c, 0x9c20, 0x8eff, 0x0118, 0x2e60, 0x080c,
-	0x9c20, 0x00ee, 0x0804, 0x7845, 0x6024, 0xc0dc, 0xc0d5, 0x6026,
-	0x2e60, 0x6007, 0x003a, 0xa8a0, 0x9005, 0x0130, 0x6007, 0x003b,
-	0xa8a4, 0x602e, 0xa8a8, 0x6016, 0x6003, 0x0001, 0x2009, 0x8020,
-	0x080c, 0x84e7, 0x00ee, 0x0804, 0x7845, 0x2061, 0x1a46, 0x6000,
-	0xd084, 0x0190, 0xd08c, 0x1904, 0x79be, 0x0126, 0x2091, 0x8000,
-	0x6204, 0x8210, 0x0220, 0x6206, 0x012e, 0x0804, 0x79be, 0x012e,
-	0xa883, 0x0016, 0x0804, 0x79b7, 0xa883, 0x0007, 0x0804, 0x79b7,
-	0xa864, 0x8007, 0x9084, 0x00ff, 0x0130, 0x8001, 0x1138, 0x7007,
-	0x0001, 0x0069, 0x0005, 0x080c, 0x752b, 0x0040, 0x7007, 0x0003,
-	0x7012, 0x2900, 0x7016, 0x701a, 0x704b, 0x78e7, 0x0005, 0x00b6,
-	0x00e6, 0x0126, 0x2091, 0x8000, 0x903e, 0x2061, 0x1800, 0x61cc,
-	0x81ff, 0x1904, 0x7969, 0x6130, 0xd194, 0x1904, 0x7993, 0xa878,
-	0x2070, 0x9e82, 0x1ddc, 0x0a04, 0x795d, 0x6064, 0x9e02, 0x1a04,
-	0x795d, 0x7120, 0x9186, 0x0006, 0x1904, 0x794f, 0x7010, 0x905d,
-	0x0904, 0x7969, 0xb800, 0xd0e4, 0x1904, 0x798d, 0x2061, 0x1a46,
-	0x6100, 0x9184, 0x0301, 0x9086, 0x0001, 0x15a0, 0x7024, 0xd0dc,
-	0x1904, 0x7996, 0xa883, 0x0000, 0xa803, 0x0000, 0x2908, 0x7014,
-	0x9005, 0x1198, 0x7116, 0xa87c, 0xd0f4, 0x1904, 0x7999, 0x080c,
-	0x53a8, 0xd09c, 0x1118, 0xa87c, 0xc0cc, 0xa87e, 0x2e60, 0x080c,
-	0x82f1, 0x012e, 0x00ee, 0x00be, 0x0005, 0x2048, 0xa800, 0x9005,
-	0x1de0, 0xa902, 0x2148, 0xa87c, 0xd0f4, 0x1904, 0x7999, 0x012e,
-	0x00ee, 0x00be, 0x0005, 0x012e, 0x00ee, 0xa883, 0x0006, 0x00be,
-	0x0804, 0x79b7, 0xd184, 0x0db8, 0xd1c4, 0x1190, 0x00a0, 0xa974,
-	0x080c, 0x628f, 0x15d0, 0xb800, 0xd0e4, 0x15b8, 0x7120, 0x9186,
-	0x0007, 0x1118, 0xa883, 0x0002, 0x0490, 0xa883, 0x0008, 0x0478,
-	0xa883, 0x000e, 0x0460, 0xa883, 0x0017, 0x0448, 0xa883, 0x0035,
-	0x0430, 0x080c, 0x53ac, 0xd0fc, 0x01e8, 0xa878, 0x2070, 0x9e82,
-	0x1ddc, 0x02c0, 0x6064, 0x9e02, 0x12a8, 0x7120, 0x9186, 0x0006,
-	0x1188, 0x7010, 0x905d, 0x0170, 0xb800, 0xd0bc, 0x0158, 0x2039,
-	0x0001, 0x7000, 0x9086, 0x0007, 0x1904, 0x78f3, 0x7003, 0x0002,
-	0x0804, 0x78f3, 0xa883, 0x0028, 0x0010, 0xa883, 0x0029, 0x012e,
-	0x00ee, 0x00be, 0x0420, 0xa883, 0x002a, 0x0cc8, 0xa883, 0x0045,
-	0x0cb0, 0x2e60, 0x2019, 0x0002, 0x601b, 0x0014, 0x080c, 0xce41,
-	0x012e, 0x00ee, 0x00be, 0x0005, 0x2009, 0x003e, 0x0058, 0x2009,
-	0x0004, 0x0040, 0x2009, 0x0006, 0x0028, 0x2009, 0x0016, 0x0010,
-	0x2009, 0x0001, 0xa884, 0x9084, 0xff00, 0x9105, 0xa886, 0x0126,
-	0x2091, 0x8000, 0x080c, 0x69b5, 0x012e, 0x0005, 0x080c, 0x1061,
-	0x0005, 0x00d6, 0x080c, 0x82e8, 0x00de, 0x0005, 0x00d6, 0x00e6,
-	0x0126, 0x2091, 0x8000, 0x2071, 0x0040, 0x702c, 0xd084, 0x01d8,
-	0x908c, 0x0780, 0x190c, 0x7a52, 0xd09c, 0x11a8, 0x2071, 0x1800,
-	0x70bc, 0x90ea, 0x0040, 0x0278, 0x8001, 0x70be, 0x702c, 0x2048,
-	0xa800, 0x702e, 0x9006, 0xa802, 0xa806, 0x2071, 0x0040, 0x2900,
-	0x7022, 0x702c, 0x0c28, 0x012e, 0x00ee, 0x00de, 0x0005, 0x0006,
-	0x9084, 0x0780, 0x190c, 0x7a52, 0x000e, 0x0005, 0x00d6, 0x00c6,
-	0x0036, 0x0026, 0x0016, 0x00b6, 0x7007, 0x0001, 0xaa74, 0x9282,
-	0x0004, 0x1a04, 0x7a43, 0xa97c, 0x9188, 0x1000, 0x2104, 0x905d,
-	0xb804, 0xd284, 0x0140, 0x05e8, 0x8007, 0x9084, 0x00ff, 0x9084,
-	0x0006, 0x1108, 0x04b0, 0x2b10, 0x080c, 0x9b90, 0x1118, 0x080c,
-	0x9c55, 0x05a8, 0x6212, 0xa874, 0x0002, 0x7a21, 0x7a26, 0x7a29,
-	0x7a2f, 0x2019, 0x0002, 0x080c, 0xd234, 0x0060, 0x080c, 0xd1c4,
-	0x0048, 0x2019, 0x0002, 0xa980, 0x080c, 0xd1e3, 0x0018, 0xa980,
-	0x080c, 0xd1c4, 0x080c, 0x9be6, 0xa887, 0x0000, 0x0126, 0x2091,
-	0x8000, 0x080c, 0x69b5, 0x012e, 0x00be, 0x001e, 0x002e, 0x003e,
-	0x00ce, 0x00de, 0x0005, 0xa887, 0x0006, 0x0c80, 0xa887, 0x0002,
-	0x0c68, 0xa887, 0x0005, 0x0c50, 0xa887, 0x0004, 0x0c38, 0xa887,
-	0x0007, 0x0c20, 0x2091, 0x8000, 0x0e04, 0x7a54, 0x0006, 0x0016,
-	0x2001, 0x8003, 0x0006, 0x0804, 0x0d6e, 0x2001, 0x1833, 0x2004,
-	0x9005, 0x0005, 0x0005, 0x00f6, 0x2079, 0x0300, 0x2001, 0x0200,
-	0x200c, 0xc1e5, 0xc1dc, 0x2102, 0x2009, 0x0218, 0x210c, 0xd1ec,
-	0x1120, 0x080c, 0x1547, 0x00fe, 0x0005, 0x2001, 0x020d, 0x2003,
-	0x0020, 0x781f, 0x0300, 0x00fe, 0x0005, 0x781c, 0xd08c, 0x0904,
-	0x7ad5, 0x68bc, 0x90aa, 0x0005, 0x0a04, 0x807e, 0x7d44, 0x7c40,
-	0xd59c, 0x190c, 0x0d65, 0x9584, 0x00f6, 0x1508, 0x9484, 0x7000,
-	0x0138, 0x908a, 0x2000, 0x1258, 0x9584, 0x0700, 0x8007, 0x04f0,
-	0x7000, 0x9084, 0xff00, 0x9086, 0x8100, 0x0db0, 0x00b0, 0x9484,
-	0x0fff, 0x1130, 0x7000, 0x9084, 0xff00, 0x9086, 0x8100, 0x11c0,
-	0x080c, 0xd61c, 0x080c, 0x7fb5, 0x7817, 0x0140, 0x00a8, 0x9584,
-	0x0076, 0x1118, 0x080c, 0x8011, 0x19c8, 0xd5a4, 0x0148, 0x0046,
-	0x0056, 0x080c, 0x7b25, 0x080c, 0x1fe0, 0x005e, 0x004e, 0x0020,
-	0x080c, 0xd61c, 0x7817, 0x0140, 0x080c, 0x70ba, 0x0168, 0x2001,
-	0x0111, 0x2004, 0xd08c, 0x0140, 0x688f, 0x0000, 0x2001, 0x0110,
-	0x2003, 0x0008, 0x2003, 0x0000, 0x0489, 0x0005, 0x0002, 0x7ae2,
-	0x7dd7, 0x7adf, 0x7adf, 0x7adf, 0x7adf, 0x7adf, 0x7adf, 0x7817,
-	0x0140, 0x0005, 0x7000, 0x908c, 0xff00, 0x9194, 0xf000, 0x810f,
-	0x9484, 0x0fff, 0x688e, 0x9286, 0x2000, 0x1150, 0x6800, 0x9086,
-	0x0001, 0x1118, 0x080c, 0x5409, 0x0070, 0x080c, 0x7b45, 0x0058,
-	0x9286, 0x3000, 0x1118, 0x080c, 0x7d14, 0x0028, 0x9286, 0x8000,
-	0x1110, 0x080c, 0x7eeb, 0x7817, 0x0140, 0x0005, 0x2001, 0x1810,
-	0x2004, 0xd08c, 0x0178, 0x2001, 0x1800, 0x2004, 0x9086, 0x0003,
-	0x1148, 0x0026, 0x0036, 0x2011, 0x8048, 0x2518, 0x080c, 0x48fa,
-	0x003e, 0x002e, 0x0005, 0x0036, 0x0046, 0x0056, 0x00f6, 0x2079,
-	0x0200, 0x2019, 0xfffe, 0x7c30, 0x0050, 0x0036, 0x0046, 0x0056,
-	0x00f6, 0x2079, 0x0200, 0x7d44, 0x7c40, 0x2019, 0xffff, 0x2001,
-	0x1810, 0x2004, 0xd08c, 0x0160, 0x2001, 0x1800, 0x2004, 0x9086,
-	0x0003, 0x1130, 0x0026, 0x2011, 0x8048, 0x080c, 0x48fa, 0x002e,
-	0x00fe, 0x005e, 0x004e, 0x003e, 0x0005, 0x00b6, 0x00c6, 0x7010,
-	0x9084, 0xff00, 0x8007, 0x9096, 0x0001, 0x0120, 0x9096, 0x0023,
-	0x1904, 0x7ce5, 0x9186, 0x0023, 0x15c0, 0x080c, 0x7f80, 0x0904,
-	0x7ce5, 0x6120, 0x9186, 0x0001, 0x0150, 0x9186, 0x0004, 0x0138,
-	0x9186, 0x0008, 0x0120, 0x9186, 0x000a, 0x1904, 0x7ce5, 0x7124,
-	0x610a, 0x7030, 0x908e, 0x0200, 0x1130, 0x2009, 0x0015, 0x080c,
-	0x9c82, 0x0804, 0x7ce5, 0x908e, 0x0214, 0x0118, 0x908e, 0x0210,
-	0x1130, 0x2009, 0x0015, 0x080c, 0x9c82, 0x0804, 0x7ce5, 0x908e,
-	0x0100, 0x1904, 0x7ce5, 0x7034, 0x9005, 0x1904, 0x7ce5, 0x2009,
-	0x0016, 0x080c, 0x9c82, 0x0804, 0x7ce5, 0x9186, 0x0022, 0x1904,
-	0x7ce5, 0x7030, 0x908e, 0x0300, 0x1580, 0x68d8, 0xd0a4, 0x0528,
-	0xc0b5, 0x68da, 0x7100, 0x918c, 0x00ff, 0x697a, 0x7004, 0x687e,
-	0x00f6, 0x2079, 0x0100, 0x79e6, 0x78ea, 0x0006, 0x9084, 0x00ff,
-	0x0016, 0x2008, 0x080c, 0x24a2, 0x7932, 0x7936, 0x001e, 0x000e,
-	0x00fe, 0x080c, 0x2459, 0x695a, 0x703c, 0x00e6, 0x2071, 0x0140,
-	0x7086, 0x2071, 0x1800, 0x70b2, 0x00ee, 0x7034, 0x9005, 0x1904,
-	0x7ce5, 0x2009, 0x0017, 0x0804, 0x7c95, 0x908e, 0x0400, 0x1190,
-	0x7034, 0x9005, 0x1904, 0x7ce5, 0x080c, 0x70ba, 0x0120, 0x2009,
-	0x001d, 0x0804, 0x7c95, 0x68d8, 0xc0a5, 0x68da, 0x2009, 0x0030,
-	0x0804, 0x7c95, 0x908e, 0x0500, 0x1140, 0x7034, 0x9005, 0x1904,
-	0x7ce5, 0x2009, 0x0018, 0x0804, 0x7c95, 0x908e, 0x2010, 0x1120,
-	0x2009, 0x0019, 0x0804, 0x7c95, 0x908e, 0x2110, 0x1120, 0x2009,
-	0x001a, 0x0804, 0x7c95, 0x908e, 0x5200, 0x1140, 0x7034, 0x9005,
-	0x1904, 0x7ce5, 0x2009, 0x001b, 0x0804, 0x7c95, 0x908e, 0x5000,
-	0x1140, 0x7034, 0x9005, 0x1904, 0x7ce5, 0x2009, 0x001c, 0x0804,
-	0x7c95, 0x908e, 0x1300, 0x1120, 0x2009, 0x0034, 0x0804, 0x7c95,
-	0x908e, 0x1200, 0x1140, 0x7034, 0x9005, 0x1904, 0x7ce5, 0x2009,
-	0x0024, 0x0804, 0x7c95, 0x908c, 0xff00, 0x918e, 0x2400, 0x1170,
-	0x2009, 0x002d, 0x2001, 0x1810, 0x2004, 0xd09c, 0x0904, 0x7c95,
-	0x080c, 0xc66b, 0x1904, 0x7ce5, 0x0804, 0x7c93, 0x908c, 0xff00,
-	0x918e, 0x5300, 0x1120, 0x2009, 0x002a, 0x0804, 0x7c95, 0x908e,
-	0x0f00, 0x1120, 0x2009, 0x0020, 0x0804, 0x7c95, 0x908e, 0x6104,
-	0x1528, 0x2029, 0x0205, 0x2011, 0x026d, 0x8208, 0x2204, 0x9082,
-	0x0004, 0x8004, 0x8004, 0x20a8, 0x2011, 0x8015, 0x211c, 0x8108,
-	0x0046, 0x2124, 0x080c, 0x48fa, 0x004e, 0x8108, 0x0f04, 0x7c61,
-	0x9186, 0x0280, 0x1d88, 0x2504, 0x8000, 0x202a, 0x2009, 0x0260,
-	0x0c58, 0x202b, 0x0000, 0x2009, 0x0023, 0x0478, 0x908e, 0x6000,
-	0x1118, 0x2009, 0x003f, 0x0448, 0x908e, 0x7800, 0x1118, 0x2009,
-	0x0045, 0x0418, 0x908e, 0x1000, 0x1118, 0x2009, 0x004e, 0x00e8,
-	0x908e, 0x6300, 0x1118, 0x2009, 0x004a, 0x00b8, 0x908c, 0xff00,
-	0x918e, 0x5600, 0x1118, 0x2009, 0x004f, 0x0078, 0x908c, 0xff00,
-	0x918e, 0x5700, 0x1118, 0x2009, 0x0050, 0x0038, 0x2009, 0x001d,
-	0x6838, 0xd0d4, 0x0110, 0x2009, 0x004c, 0x0016, 0x2011, 0x0263,
-	0x2204, 0x8211, 0x220c, 0x080c, 0x2459, 0x1904, 0x7ce8, 0x080c,
-	0x622f, 0x1904, 0x7ce8, 0xbe12, 0xbd16, 0x001e, 0x0016, 0x080c,
-	0x70ba, 0x01c0, 0x68d8, 0xd08c, 0x1148, 0x7000, 0x9084, 0x00ff,
-	0x1188, 0x7004, 0x9084, 0xff00, 0x1168, 0x0040, 0x6878, 0x9606,
-	0x1148, 0x687c, 0x9506, 0x9084, 0xff00, 0x1120, 0x9584, 0x00ff,
-	0xb886, 0x0080, 0xb884, 0x9005, 0x1168, 0x9186, 0x0046, 0x1150,
-	0x6878, 0x9606, 0x1138, 0x687c, 0x9506, 0x9084, 0xff00, 0x1110,
-	0x001e, 0x0098, 0x080c, 0x9b90, 0x01a8, 0x2b08, 0x6112, 0x6023,
-	0x0004, 0x7120, 0x610a, 0x001e, 0x9186, 0x004c, 0x1110, 0x6023,
-	0x000a, 0x0016, 0x001e, 0x080c, 0x9c82, 0x00ce, 0x00be, 0x0005,
-	0x001e, 0x0cd8, 0x2001, 0x180e, 0x2004, 0xd0ec, 0x0120, 0x2011,
-	0x8049, 0x080c, 0x48fa, 0x080c, 0x9c55, 0x0d90, 0x2b08, 0x6112,
-	0x6023, 0x0004, 0x7120, 0x610a, 0x001e, 0x0016, 0x9186, 0x0017,
-	0x0118, 0x9186, 0x0030, 0x1128, 0x6007, 0x0009, 0x6017, 0x2900,
-	0x0020, 0x6007, 0x0051, 0x6017, 0x0000, 0x602f, 0x0009, 0x6003,
-	0x0001, 0x080c, 0x84ee, 0x08a0, 0x080c, 0x3164, 0x1140, 0x7010,
-	0x9084, 0xff00, 0x8007, 0x908e, 0x0008, 0x1108, 0x0009, 0x0005,
-	0x00b6, 0x00c6, 0x0046, 0x7000, 0x908c, 0xff00, 0x810f, 0x9186,
-	0x0033, 0x11e8, 0x080c, 0x7f80, 0x0904, 0x7d6f, 0x7124, 0x610a,
-	0x7030, 0x908e, 0x0200, 0x1140, 0x7034, 0x9005, 0x15c0, 0x2009,
-	0x0015, 0x080c, 0x9c82, 0x0498, 0x908e, 0x0100, 0x1580, 0x7034,
-	0x9005, 0x1568, 0x2009, 0x0016, 0x080c, 0x9c82, 0x0440, 0x9186,
-	0x0032, 0x1528, 0x7030, 0x908e, 0x1400, 0x1508, 0x2009, 0x0038,
-	0x0016, 0x2011, 0x0263, 0x2204, 0x8211, 0x220c, 0x080c, 0x2459,
-	0x11a8, 0x080c, 0x622f, 0x1190, 0xbe12, 0xbd16, 0x080c, 0x9b90,
-	0x0168, 0x2b08, 0x6112, 0x080c, 0xbd09, 0x6023, 0x0004, 0x7120,
-	0x610a, 0x001e, 0x080c, 0x9c82, 0x0010, 0x00ce, 0x001e, 0x004e,
-	0x00ce, 0x00be, 0x0005, 0x00b6, 0x0046, 0x00e6, 0x00d6, 0x2028,
-	0x2130, 0x9696, 0x00ff, 0x11b8, 0x9592, 0xfffc, 0x02a0, 0x9596,
-	0xfffd, 0x1120, 0x2009, 0x007f, 0x0804, 0x7dd1, 0x9596, 0xfffe,
-	0x1120, 0x2009, 0x007e, 0x0804, 0x7dd1, 0x9596, 0xfffc, 0x1118,
-	0x2009, 0x0080, 0x04f0, 0x2011, 0x0000, 0x2019, 0x1836, 0x231c,
-	0xd3ac, 0x0130, 0x9026, 0x20a9, 0x0800, 0x2071, 0x1000, 0x0030,
-	0x2021, 0x0081, 0x20a9, 0x077f, 0x2071, 0x1081, 0x2e1c, 0x93dd,
-	0x0000, 0x1140, 0x82ff, 0x11d0, 0x9496, 0x00ff, 0x01b8, 0x2410,
-	0xc2fd, 0x00a0, 0xbf10, 0x2600, 0x9706, 0xb814, 0x1120, 0x9546,
-	0x1110, 0x2408, 0x00b0, 0x9745, 0x1148, 0x94c6, 0x007e, 0x0130,
-	0x94c6, 0x007f, 0x0118, 0x94c6, 0x0080, 0x1d20, 0x8420, 0x8e70,
-	0x1f04, 0x7da6, 0x82ff, 0x1118, 0x9085, 0x0001, 0x0018, 0xc2fc,
-	0x2208, 0x9006, 0x00de, 0x00ee, 0x004e, 0x00be, 0x0005, 0x7000,
-	0x908c, 0xff00, 0x810f, 0x9184, 0x000f, 0x0002, 0x7dee, 0x7dee,
-	0x7dee, 0x7f92, 0x7dee, 0x7df1, 0x7e16, 0x7e9f, 0x7dee, 0x7dee,
-	0x7dee, 0x7dee, 0x7dee, 0x7dee, 0x7dee, 0x7dee, 0x7817, 0x0140,
-	0x0005, 0x00b6, 0x7110, 0xd1bc, 0x01e8, 0x7120, 0x2160, 0x9c8c,
-	0x0003, 0x11c0, 0x9c8a, 0x1ddc, 0x02a8, 0x6864, 0x9c02, 0x1290,
-	0x7008, 0x9084, 0x00ff, 0x6110, 0x2158, 0xb910, 0x9106, 0x1150,
-	0x700c, 0xb914, 0x9106, 0x1130, 0x7124, 0x610a, 0x2009, 0x0046,
-	0x080c, 0x9c82, 0x7817, 0x0140, 0x00be, 0x0005, 0x00b6, 0x00c6,
-	0x9484, 0x0fff, 0x0904, 0x7e7b, 0x7110, 0xd1bc, 0x1904, 0x7e7b,
-	0x7108, 0x700c, 0x2028, 0x918c, 0x00ff, 0x2130, 0x9094, 0xff00,
-	0x15c8, 0x81ff, 0x15b8, 0x9080, 0x319f, 0x200d, 0x918c, 0xff00,
-	0x810f, 0x2001, 0x0080, 0x9106, 0x0904, 0x7e7b, 0x9182, 0x0801,
-	0x1a04, 0x7e7b, 0x9190, 0x1000, 0x2204, 0x905d, 0x05e0, 0xbe12,
-	0xbd16, 0xb800, 0xd0ec, 0x15b8, 0xba04, 0x9294, 0xff00, 0x9286,
-	0x0600, 0x1190, 0x080c, 0x9b90, 0x0598, 0x2b08, 0x7028, 0x6052,
-	0x702c, 0x604e, 0x6112, 0x6023, 0x0006, 0x7120, 0x610a, 0x7130,
-	0x615e, 0x080c, 0xc8d2, 0x00f8, 0x080c, 0x668a, 0x1138, 0xb807,
-	0x0606, 0x0c40, 0x190c, 0x7d73, 0x11b0, 0x0880, 0x080c, 0x9b90,
-	0x2b08, 0x0188, 0x6112, 0x6023, 0x0004, 0x7120, 0x610a, 0x9286,
-	0x0400, 0x1118, 0x6007, 0x0005, 0x0010, 0x6007, 0x0001, 0x6003,
-	0x0001, 0x080c, 0x84ee, 0x7817, 0x0140, 0x00ce, 0x00be, 0x0005,
-	0x2001, 0x180e, 0x2004, 0xd0ec, 0x0120, 0x2011, 0x8049, 0x080c,
-	0x48fa, 0x080c, 0x9c55, 0x0d78, 0x2b08, 0x6112, 0x6023, 0x0006,
-	0x7120, 0x610a, 0x7130, 0x615e, 0x6017, 0xf300, 0x6003, 0x0001,
-	0x6007, 0x0041, 0x2009, 0xa022, 0x080c, 0x84e7, 0x08e0, 0x00b6,
-	0x7110, 0xd1bc, 0x05d0, 0x7020, 0x2060, 0x9c84, 0x0003, 0x15a8,
-	0x9c82, 0x1ddc, 0x0690, 0x6864, 0x9c02, 0x1678, 0x9484, 0x0fff,
-	0x9082, 0x000c, 0x0650, 0x7008, 0x9084, 0x00ff, 0x6110, 0x2158,
-	0xb910, 0x9106, 0x1510, 0x700c, 0xb914, 0x9106, 0x11f0, 0x7124,
-	0x610a, 0x601c, 0xd0fc, 0x11c8, 0x2001, 0x0271, 0x2004, 0x9005,
-	0x1180, 0x9484, 0x0fff, 0x9082, 0x000c, 0x0158, 0x0066, 0x2031,
-	0x0100, 0xa001, 0xa001, 0x8631, 0x1de0, 0x006e, 0x601c, 0xd0fc,
-	0x1120, 0x2009, 0x0045, 0x080c, 0x9c82, 0x7817, 0x0140, 0x00be,
-	0x0005, 0x6120, 0x9186, 0x0002, 0x0128, 0x9186, 0x0005, 0x0110,
-	0x9085, 0x0001, 0x0005, 0x080c, 0x3164, 0x1168, 0x7010, 0x9084,
-	0xff00, 0x8007, 0x9086, 0x0000, 0x1130, 0x9184, 0x000f, 0x908a,
-	0x0006, 0x1208, 0x000b, 0x0005, 0x7f02, 0x7f03, 0x7f02, 0x7f02,
-	0x7f62, 0x7f71, 0x0005, 0x00b6, 0x7110, 0xd1bc, 0x0120, 0x702c,
-	0xd084, 0x0904, 0x7f60, 0x700c, 0x7108, 0x080c, 0x2459, 0x1904,
-	0x7f60, 0x080c, 0x622f, 0x1904, 0x7f60, 0xbe12, 0xbd16, 0x7110,
-	0xd1bc, 0x01d8, 0x080c, 0x668a, 0x0118, 0x9086, 0x0004, 0x1588,
-	0x00c6, 0x080c, 0x7f80, 0x00ce, 0x05d8, 0x080c, 0x9b90, 0x2b08,
-	0x05b8, 0x6112, 0x080c, 0xbd09, 0x6023, 0x0002, 0x7120, 0x610a,
-	0x2009, 0x0088, 0x080c, 0x9c82, 0x0458, 0x080c, 0x668a, 0x0148,
-	0x9086, 0x0004, 0x0130, 0x080c, 0x6692, 0x0118, 0x9086, 0x0004,
-	0x1180, 0x080c, 0x9b90, 0x2b08, 0x01d8, 0x6112, 0x080c, 0xbd09,
-	0x6023, 0x0005, 0x7120, 0x610a, 0x2009, 0x0088, 0x080c, 0x9c82,
-	0x0078, 0x080c, 0x9b90, 0x2b08, 0x0158, 0x6112, 0x080c, 0xbd09,
-	0x6023, 0x0004, 0x7120, 0x610a, 0x2009, 0x0001, 0x080c, 0x9c82,
-	0x00be, 0x0005, 0x7110, 0xd1bc, 0x0158, 0x00d1, 0x0148, 0x080c,
-	0x7ee1, 0x1130, 0x7124, 0x610a, 0x2009, 0x0089, 0x080c, 0x9c82,
-	0x0005, 0x7110, 0xd1bc, 0x0158, 0x0059, 0x0148, 0x080c, 0x7ee1,
-	0x1130, 0x7124, 0x610a, 0x2009, 0x008a, 0x080c, 0x9c82, 0x0005,
-	0x7020, 0x2060, 0x9c84, 0x0003, 0x1158, 0x9c82, 0x1ddc, 0x0240,
-	0x2001, 0x1819, 0x2004, 0x9c02, 0x1218, 0x9085, 0x0001, 0x0005,
-	0x9006, 0x0ce8, 0x00b6, 0x7110, 0xd1bc, 0x11d8, 0x7024, 0x2060,
-	0x9c84, 0x0003, 0x11b0, 0x9c82, 0x1ddc, 0x0298, 0x6864, 0x9c02,
-	0x1280, 0x7008, 0x9084, 0x00ff, 0x6110, 0x2158, 0xb910, 0x9106,
-	0x1140, 0x700c, 0xb914, 0x9106, 0x1120, 0x2009, 0x0051, 0x080c,
-	0x9c82, 0x7817, 0x0140, 0x00be, 0x0005, 0x2031, 0x0105, 0x0069,
-	0x0005, 0x2031, 0x0206, 0x0049, 0x0005, 0x2031, 0x0207, 0x0029,
-	0x0005, 0x2031, 0x0213, 0x0009, 0x0005, 0x00c6, 0x0096, 0x00f6,
-	0x7000, 0x9084, 0xf000, 0x9086, 0xc000, 0x05c0, 0x080c, 0x9b90,
-	0x05a8, 0x0066, 0x00c6, 0x0046, 0x2011, 0x0263, 0x2204, 0x8211,
-	0x220c, 0x080c, 0x2459, 0x1590, 0x080c, 0x622f, 0x1578, 0xbe12,
-	0xbd16, 0x2b00, 0x004e, 0x00ce, 0x6012, 0x080c, 0xbd09, 0x080c,
-	0x102f, 0x0500, 0x2900, 0x6062, 0x9006, 0xa802, 0xa866, 0xac6a,
-	0xa85c, 0x90f8, 0x001b, 0x20a9, 0x000e, 0xa860, 0x20e8, 0x20e1,
-	0x0000, 0x2fa0, 0x2e98, 0x4003, 0x006e, 0x6616, 0x6007, 0x003e,
-	0x6023, 0x0001, 0x6003, 0x0001, 0x080c, 0x84ee, 0x00fe, 0x009e,
-	0x00ce, 0x0005, 0x080c, 0x9be6, 0x006e, 0x0cc0, 0x004e, 0x00ce,
-	0x0cc8, 0x00c6, 0x7000, 0x908c, 0xff00, 0x9184, 0xf000, 0x810f,
-	0x9086, 0x2000, 0x1904, 0x8068, 0x9186, 0x0022, 0x15f0, 0x2001,
-	0x0111, 0x2004, 0x9005, 0x1904, 0x806a, 0x7030, 0x908e, 0x0400,
-	0x0904, 0x806a, 0x908e, 0x6000, 0x05e8, 0x908e, 0x5400, 0x05d0,
-	0x908e, 0x0300, 0x11d8, 0x2009, 0x1836, 0x210c, 0xd18c, 0x1590,
-	0xd1a4, 0x1580, 0x080c, 0x6648, 0x0588, 0x68ac, 0x9084, 0x00ff,
-	0x7100, 0x918c, 0x00ff, 0x9106, 0x1518, 0x687c, 0x69ac, 0x918c,
-	0xff00, 0x9105, 0x7104, 0x9106, 0x11d8, 0x00e0, 0x2009, 0x0103,
-	0x210c, 0xd1b4, 0x11a8, 0x908e, 0x5200, 0x09e8, 0x908e, 0x0500,
-	0x09d0, 0x908e, 0x5000, 0x09b8, 0x0058, 0x9186, 0x0023, 0x1140,
-	0x080c, 0x7f80, 0x0128, 0x6004, 0x9086, 0x0002, 0x0118, 0x0000,
-	0x9006, 0x0010, 0x9085, 0x0001, 0x00ce, 0x0005, 0x7030, 0x908e,
-	0x0300, 0x0118, 0x908e, 0x5200, 0x1d98, 0x2001, 0x1836, 0x2004,
-	0x9084, 0x0009, 0x9086, 0x0008, 0x0d68, 0x0c50, 0x00f6, 0x2079,
-	0x0200, 0x7800, 0xc0e5, 0xc0cc, 0x7802, 0x00fe, 0x0005, 0x00f6,
-	0x2079, 0x1800, 0x7834, 0xd084, 0x1130, 0x2079, 0x0200, 0x7800,
-	0x9085, 0x1200, 0x7802, 0x00fe, 0x0005, 0x00e6, 0x2071, 0x1800,
-	0x7034, 0xc084, 0x7036, 0x00ee, 0x0005, 0x2071, 0x19db, 0x7003,
-	0x0003, 0x700f, 0x0361, 0x9006, 0x701a, 0x7072, 0x7012, 0x7017,
-	0x1ddc, 0x7007, 0x0000, 0x7026, 0x702b, 0x8ff0, 0x7032, 0x7037,
-	0x906d, 0x703f, 0xffff, 0x7042, 0x7047, 0x523f, 0x704a, 0x705b,
-	0x8239, 0x080c, 0x1048, 0x090c, 0x0d65, 0x2900, 0x703a, 0xa867,
-	0x0003, 0xa86f, 0x0100, 0xa8ab, 0xdcb0, 0x0005, 0x2071, 0x19db,
-	0x1d04, 0x815b, 0x2091, 0x6000, 0x700c, 0x8001, 0x700e, 0x1560,
-	0x2001, 0x187d, 0x2004, 0xd0c4, 0x0158, 0x3a00, 0xd08c, 0x1140,
-	0x20d1, 0x0000, 0x20d1, 0x0001, 0x20d1, 0x0000, 0x080c, 0x0d65,
-	0x700f, 0x0361, 0x7007, 0x0001, 0x0126, 0x2091, 0x8000, 0x2069,
-	0x1800, 0x69e8, 0xd1e4, 0x1138, 0xd1dc, 0x1118, 0x080c, 0x82a7,
-	0x0010, 0x080c, 0x827e, 0x7040, 0x900d, 0x0148, 0x8109, 0x7142,
-	0x1130, 0x7044, 0x080f, 0x0018, 0x0126, 0x2091, 0x8000, 0x7024,
-	0x900d, 0x0188, 0x7020, 0x8001, 0x7022, 0x1168, 0x7023, 0x0009,
-	0x8109, 0x7126, 0x9186, 0x03e8, 0x1110, 0x7028, 0x080f, 0x81ff,
-	0x1110, 0x7028, 0x080f, 0x7030, 0x900d, 0x0180, 0x702c, 0x8001,
-	0x702e, 0x1160, 0x702f, 0x0009, 0x8109, 0x7132, 0x0128, 0x9184,
-	0x007f, 0x090c, 0x90f5, 0x0010, 0x7034, 0x080f, 0x703c, 0x9005,
-	0x0118, 0x0310, 0x8001, 0x703e, 0x704c, 0x900d, 0x0168, 0x7048,
-	0x8001, 0x704a, 0x1148, 0x704b, 0x0009, 0x8109, 0x714e, 0x1120,
-	0x7150, 0x714e, 0x7058, 0x080f, 0x7018, 0x900d, 0x01d8, 0x0016,
-	0x7070, 0x900d, 0x0158, 0x706c, 0x8001, 0x706e, 0x1138, 0x706f,
-	0x0009, 0x8109, 0x7172, 0x1110, 0x7074, 0x080f, 0x001e, 0x7008,
-	0x8001, 0x700a, 0x1138, 0x700b, 0x0009, 0x8109, 0x711a, 0x1110,
-	0x701c, 0x080f, 0x012e, 0x7004, 0x0002, 0x8183, 0x8184, 0x81ae,
-	0x00e6, 0x2071, 0x19db, 0x7018, 0x9005, 0x1120, 0x711a, 0x721e,
-	0x700b, 0x0009, 0x00ee, 0x0005, 0x00e6, 0x0006, 0x2071, 0x19db,
-	0x701c, 0x9206, 0x1120, 0x701a, 0x701e, 0x7072, 0x7076, 0x000e,
-	0x00ee, 0x0005, 0x00e6, 0x2071, 0x19db, 0xb888, 0x9102, 0x0208,
-	0xb98a, 0x00ee, 0x0005, 0x0005, 0x00b6, 0x2031, 0x0010, 0x7110,
-	0x080c, 0x628f, 0x11a8, 0xb888, 0x8001, 0x0290, 0xb88a, 0x1180,
-	0x0126, 0x2091, 0x8000, 0x0066, 0xb8c0, 0x9005, 0x0138, 0x0026,
-	0xba3c, 0x0016, 0x080c, 0x63ba, 0x001e, 0x002e, 0x006e, 0x012e,
-	0x8108, 0x9182, 0x0800, 0x1220, 0x8631, 0x0128, 0x7112, 0x0c00,
-	0x900e, 0x7007, 0x0002, 0x7112, 0x00be, 0x0005, 0x2031, 0x0010,
-	0x7014, 0x2060, 0x0126, 0x2091, 0x8000, 0x6048, 0x9005, 0x0128,
-	0x8001, 0x604a, 0x1110, 0x080c, 0xbb8a, 0x6018, 0x9005, 0x0904,
-	0x8200, 0x00f6, 0x2079, 0x0300, 0x7918, 0xd1b4, 0x1904, 0x8213,
-	0x781b, 0x2020, 0xa001, 0x7918, 0xd1b4, 0x0120, 0x781b, 0x2000,
-	0x0804, 0x8213, 0x8001, 0x601a, 0x0106, 0x781b, 0x2000, 0xa001,
-	0x7918, 0xd1ac, 0x1dd0, 0x010e, 0x00fe, 0x1510, 0x6120, 0x9186,
-	0x0003, 0x0118, 0x9186, 0x0006, 0x11c8, 0x080c, 0xb870, 0x01b0,
-	0x6014, 0x2048, 0xa884, 0x908a, 0x199a, 0x0280, 0x9082, 0x1999,
-	0xa886, 0x908a, 0x199a, 0x0210, 0x2001, 0x1999, 0x8003, 0x800b,
-	0x810b, 0x9108, 0x611a, 0x080c, 0xbfbb, 0x0110, 0x080c, 0xb551,
-	0x012e, 0x9c88, 0x001c, 0x7116, 0x2001, 0x1819, 0x2004, 0x9102,
-	0x1228, 0x8631, 0x0138, 0x2160, 0x0804, 0x81b2, 0x7017, 0x1ddc,
-	0x7007, 0x0000, 0x0005, 0x00fe, 0x0c58, 0x00e6, 0x2071, 0x19db,
-	0x7027, 0x07d0, 0x7023, 0x0009, 0x00ee, 0x0005, 0x2001, 0x19e4,
-	0x2003, 0x0000, 0x0005, 0x00e6, 0x2071, 0x19db, 0x7132, 0x702f,
-	0x0009, 0x00ee, 0x0005, 0x2011, 0x19e7, 0x2013, 0x0000, 0x0005,
-	0x00e6, 0x2071, 0x19db, 0x711a, 0x721e, 0x700b, 0x0009, 0x00ee,
-	0x0005, 0x0086, 0x0026, 0x7054, 0x8000, 0x7056, 0x2001, 0x19e9,
-	0x2044, 0xa06c, 0x9086, 0x0000, 0x0150, 0x7068, 0xa09a, 0x7064,
-	0xa096, 0x7060, 0xa092, 0x705c, 0xa08e, 0x080c, 0x1124, 0x002e,
-	0x008e, 0x0005, 0x0006, 0x0016, 0x0096, 0x00a6, 0x00b6, 0x00c6,
-	0x00d6, 0x00e6, 0x00f6, 0x0156, 0x080c, 0x80c6, 0x015e, 0x00fe,
-	0x00ee, 0x00de, 0x00ce, 0x00be, 0x00ae, 0x009e, 0x001e, 0x000e,
-	0x0005, 0x00e6, 0x2071, 0x19db, 0x7172, 0x7276, 0x706f, 0x0009,
-	0x00ee, 0x0005, 0x00e6, 0x0006, 0x2071, 0x19db, 0x7074, 0x9206,
-	0x1110, 0x7072, 0x7076, 0x000e, 0x00ee, 0x0005, 0x2069, 0x1800,
-	0x69e8, 0xd1e4, 0x1518, 0x0026, 0xd1ec, 0x0140, 0x6a50, 0x6870,
-	0x9202, 0x0288, 0x8117, 0x9294, 0x00c1, 0x0088, 0x9184, 0x0007,
-	0x01a0, 0x8109, 0x9184, 0x0007, 0x0110, 0x69ea, 0x0070, 0x8107,
-	0x9084, 0x0007, 0x910d, 0x8107, 0x9106, 0x9094, 0x00c1, 0x9184,
-	0xff3e, 0x9205, 0x68ea, 0x080c, 0x0efa, 0x002e, 0x0005, 0x69e4,
-	0x9184, 0x003f, 0x05b8, 0x8109, 0x9184, 0x003f, 0x01a8, 0x6a50,
-	0x6870, 0x9202, 0x0220, 0xd1bc, 0x0168, 0xc1bc, 0x0018, 0xd1bc,
-	0x1148, 0xc1bd, 0x2110, 0x00e6, 0x2071, 0x1800, 0x080c, 0x0f1c,
-	0x00ee, 0x0400, 0x69e6, 0x00f0, 0x0026, 0x8107, 0x9094, 0x0007,
-	0x0128, 0x8001, 0x8007, 0x9085, 0x0007, 0x0050, 0x2010, 0x8004,
-	0x8004, 0x8004, 0x9084, 0x0007, 0x9205, 0x8007, 0x9085, 0x0028,
-	0x9086, 0x0040, 0x2010, 0x00e6, 0x2071, 0x1800, 0x080c, 0x0f1c,
-	0x00ee, 0x002e, 0x0005, 0x00c6, 0x2061, 0x1a46, 0x00ce, 0x0005,
-	0x9184, 0x000f, 0x8003, 0x8003, 0x8003, 0x9080, 0x1a46, 0x2060,
-	0x0005, 0xa884, 0x908a, 0x199a, 0x1638, 0x9005, 0x1150, 0x00c6,
-	0x2061, 0x1a46, 0x6014, 0x00ce, 0x9005, 0x1130, 0x2001, 0x001e,
-	0x0018, 0x908e, 0xffff, 0x01b0, 0x8003, 0x800b, 0x810b, 0x9108,
-	0x611a, 0xa87c, 0x908c, 0x00c0, 0x918e, 0x00c0, 0x0904, 0x83ab,
-	0xd0b4, 0x1168, 0xd0bc, 0x1904, 0x8384, 0x2009, 0x0006, 0x080c,
-	0x83d8, 0x0005, 0x900e, 0x0c60, 0x2001, 0x1999, 0x08b0, 0xd0fc,
-	0x05e0, 0x908c, 0x2023, 0x1568, 0x87ff, 0x1558, 0xa9a8, 0x81ff,
-	0x1540, 0x6124, 0x918c, 0x0500, 0x1520, 0x6100, 0x918e, 0x0007,
-	0x1500, 0x2009, 0x187d, 0x210c, 0xd184, 0x11d8, 0x6003, 0x0003,
-	0x6007, 0x0043, 0x6047, 0xb035, 0x080c, 0x1aca, 0xa87c, 0xc0dd,
-	0xa87e, 0x600f, 0x0000, 0x00f6, 0x2079, 0x0380, 0x7818, 0xd0bc,
-	0x1de8, 0x7833, 0x0013, 0x2c00, 0x7836, 0x781b, 0x8080, 0x00fe,
-	0x0005, 0x908c, 0x0003, 0x0120, 0x918e, 0x0003, 0x1904, 0x83d2,
-	0x908c, 0x2020, 0x918e, 0x2020, 0x01a8, 0x6024, 0xd0d4, 0x11e8,
-	0x2009, 0x187d, 0x2104, 0xd084, 0x1138, 0x87ff, 0x1120, 0x2009,
-	0x0043, 0x0804, 0x9c82, 0x0005, 0x87ff, 0x1de8, 0x2009, 0x0042,
-	0x0804, 0x9c82, 0x6110, 0x00b6, 0x2158, 0xb900, 0x00be, 0xd1ac,
-	0x0d20, 0x6024, 0xc0cd, 0x6026, 0x0c00, 0xc0d4, 0x6026, 0xa890,
-	0x602e, 0xa88c, 0x6032, 0x08e0, 0xd0fc, 0x0160, 0x908c, 0x0003,
-	0x0120, 0x918e, 0x0003, 0x1904, 0x83d2, 0x908c, 0x2020, 0x918e,
-	0x2020, 0x0170, 0x0076, 0x00f6, 0x2c78, 0x080c, 0x1669, 0x00fe,
-	0x007e, 0x87ff, 0x1120, 0x2009, 0x0042, 0x080c, 0x9c82, 0x0005,
-	0x6110, 0x00b6, 0x2158, 0xb900, 0x00be, 0xd1ac, 0x0d58, 0x6124,
-	0xc1cd, 0x6126, 0x0c38, 0xd0fc, 0x0188, 0x908c, 0x2020, 0x918e,
-	0x2020, 0x01a8, 0x9084, 0x0003, 0x908e, 0x0002, 0x0148, 0x87ff,
-	0x1120, 0x2009, 0x0041, 0x080c, 0x9c82, 0x0005, 0x00b9, 0x0ce8,
-	0x87ff, 0x1dd8, 0x2009, 0x0043, 0x080c, 0x9c82, 0x0cb0, 0x6110,
-	0x00b6, 0x2158, 0xb900, 0x00be, 0xd1ac, 0x0d20, 0x6124, 0xc1cd,
-	0x6126, 0x0c00, 0x2009, 0x0004, 0x0019, 0x0005, 0x2009, 0x0001,
-	0x0096, 0x080c, 0xb870, 0x0518, 0x6014, 0x2048, 0xa982, 0xa800,
-	0x6016, 0x9186, 0x0001, 0x1188, 0xa97c, 0x918c, 0x8100, 0x918e,
-	0x8100, 0x1158, 0x00c6, 0x2061, 0x1a46, 0x6200, 0xd28c, 0x1120,
-	0x6204, 0x8210, 0x0208, 0x6206, 0x00ce, 0x080c, 0x67ea, 0x6014,
-	0x904d, 0x0076, 0x2039, 0x0000, 0x190c, 0x82f1, 0x007e, 0x009e,
-	0x0005, 0x0156, 0x00c6, 0x2061, 0x1a46, 0x6000, 0x81ff, 0x0110,
-	0x9205, 0x0008, 0x9204, 0x6002, 0x00ce, 0x015e, 0x0005, 0x6800,
-	0xd08c, 0x1138, 0x6808, 0x9005, 0x0120, 0x8001, 0x680a, 0x9085,
-	0x0001, 0x0005, 0x0126, 0x2091, 0x8000, 0x0036, 0x0046, 0x20a9,
-	0x0010, 0x9006, 0x8004, 0x8086, 0x818e, 0x1208, 0x9200, 0x1f04,
-	0x8423, 0x8086, 0x818e, 0x004e, 0x003e, 0x012e, 0x0005, 0x0126,
-	0x2091, 0x8000, 0x0076, 0x0156, 0x20a9, 0x0010, 0x9005, 0x01c8,
-	0x911a, 0x12b8, 0x8213, 0x818d, 0x0228, 0x911a, 0x1220, 0x1f04,
-	0x843a, 0x0028, 0x911a, 0x2308, 0x8210, 0x1f04, 0x843a, 0x0006,
-	0x3200, 0x9084, 0xefff, 0x2080, 0x000e, 0x015e, 0x007e, 0x012e,
-	0x0005, 0x0006, 0x3200, 0x9085, 0x1000, 0x0ca8, 0x0126, 0x2091,
-	0x2800, 0x2079, 0x19bf, 0x012e, 0x00d6, 0x2069, 0x19bf, 0x6803,
-	0x0005, 0x0156, 0x0146, 0x01d6, 0x20e9, 0x0000, 0x2069, 0x0200,
-	0x080c, 0x97f4, 0x04a9, 0x080c, 0x97df, 0x0491, 0x080c, 0x97e2,
-	0x0479, 0x080c, 0x97e5, 0x0461, 0x080c, 0x97e8, 0x0449, 0x080c,
-	0x97eb, 0x0431, 0x080c, 0x97ee, 0x0419, 0x080c, 0x97f1, 0x0401,
-	0x01de, 0x014e, 0x015e, 0x6857, 0x0000, 0x00f6, 0x2079, 0x0380,
-	0x00f9, 0x7807, 0x0003, 0x7803, 0x0000, 0x7803, 0x0001, 0x2069,
-	0x0004, 0x2d04, 0x9084, 0xfffe, 0x9085, 0x8000, 0x206a, 0x2069,
-	0x0100, 0x6828, 0x9084, 0xfffc, 0x682a, 0x00fe, 0x00de, 0x0005,
-	0x20a9, 0x0020, 0x20a1, 0x0240, 0x2001, 0x0000, 0x4004, 0x0005,
-	0x00c6, 0x7803, 0x0000, 0x9006, 0x7827, 0x0030, 0x782b, 0x0400,
-	0x7827, 0x0031, 0x782b, 0x1ac6, 0x781f, 0xff00, 0x781b, 0xff00,
-	0x2061, 0x1abb, 0x602f, 0x19bf, 0x6033, 0x1800, 0x6037, 0x19db,
-	0x603b, 0x1d1c, 0x603f, 0x1d2c, 0x6042, 0x6047, 0x1a91, 0x00ce,
-	0x0005, 0x2001, 0x0382, 0x2004, 0x9084, 0x0007, 0x9086, 0x0001,
-	0x01b0, 0x00c6, 0x6146, 0x600f, 0x0000, 0x2c08, 0x2061, 0x19bf,
-	0x602c, 0x8000, 0x602e, 0x601c, 0x9005, 0x0130, 0x9080, 0x0003,
-	0x2102, 0x611e, 0x00ce, 0x0005, 0x6122, 0x611e, 0x0cd8, 0x6146,
-	0x2c08, 0x2001, 0x0012, 0x080c, 0x98b8, 0x0005, 0x0016, 0x2009,
-	0x8020, 0x6146, 0x2c08, 0x2001, 0x0382, 0x2004, 0x9084, 0x0007,
-	0x9086, 0x0001, 0x1128, 0x2001, 0x0019, 0x080c, 0x98b8, 0x0088,
-	0x00c6, 0x2061, 0x19bf, 0x602c, 0x8000, 0x602e, 0x600c, 0x9005,
-	0x0128, 0x9080, 0x0003, 0x2102, 0x610e, 0x0010, 0x6112, 0x610e,
-	0x00ce, 0x001e, 0x0005, 0x2001, 0x0382, 0x2004, 0x9084, 0x0007,
-	0x9086, 0x0001, 0x0198, 0x00c6, 0x6146, 0x600f, 0x0000, 0x2c08,
-	0x2061, 0x19bf, 0x6044, 0x9005, 0x0130, 0x9080, 0x0003, 0x2102,
-	0x6146, 0x00ce, 0x0005, 0x614a, 0x6146, 0x0cd8, 0x6146, 0x600f,
-	0x0000, 0x2c08, 0x2001, 0x0013, 0x080c, 0x98b8, 0x0005, 0x6044,
-	0xd0dc, 0x0110, 0x080c, 0x948d, 0x0005, 0x00f6, 0x00e6, 0x00d6,
-	0x00c6, 0x00b6, 0x0096, 0x0076, 0x0066, 0x0056, 0x0036, 0x0026,
-	0x0016, 0x0006, 0x0126, 0x902e, 0x2071, 0x19bf, 0x7648, 0x2660,
-	0x2678, 0x2091, 0x8000, 0x8cff, 0x0904, 0x85ba, 0x6010, 0x2058,
-	0xb8a0, 0x9206, 0x1904, 0x85b5, 0x87ff, 0x0120, 0x605c, 0x9106,
-	0x1904, 0x85b5, 0x704c, 0x9c06, 0x1178, 0x0036, 0x2019, 0x0001,
-	0x080c, 0x929d, 0x703f, 0x0000, 0x9006, 0x704e, 0x706a, 0x7052,
-	0x706e, 0x003e, 0x2029, 0x0001, 0x0811, 0x7048, 0x9c36, 0x1110,
-	0x660c, 0x764a, 0x7044, 0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118,
-	0x2f00, 0x7046, 0x0010, 0x7047, 0x0000, 0x660c, 0x0066, 0x2c00,
-	0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000, 0x080c,
-	0xb870, 0x01f0, 0x6014, 0x2048, 0x6020, 0x9086, 0x0003, 0x1588,
-	0x6004, 0x9086, 0x0040, 0x090c, 0x948d, 0xa867, 0x0103, 0xab7a,
-	0xa877, 0x0000, 0x0016, 0x0036, 0x0076, 0x080c, 0xbb73, 0x080c,
-	0xd563, 0x080c, 0x69b5, 0x007e, 0x003e, 0x001e, 0x080c, 0xba5f,
-	0x080c, 0x9c20, 0x00ce, 0x0804, 0x8553, 0x2c78, 0x600c, 0x2060,
-	0x0804, 0x8553, 0x012e, 0x000e, 0x001e, 0x002e, 0x003e, 0x005e,
-	0x006e, 0x007e, 0x009e, 0x00be, 0x00ce, 0x00de, 0x00ee, 0x00fe,
-	0x0005, 0x6020, 0x9086, 0x0006, 0x1158, 0x0016, 0x0036, 0x0076,
-	0x080c, 0xd563, 0x080c, 0xd267, 0x007e, 0x003e, 0x001e, 0x08c0,
-	0x6020, 0x9086, 0x000a, 0x0918, 0x0804, 0x8598, 0x0006, 0x0066,
-	0x0096, 0x00c6, 0x00d6, 0x00f6, 0x9036, 0x0126, 0x2091, 0x8000,
-	0x2079, 0x19bf, 0x7848, 0x9065, 0x0904, 0x8642, 0x600c, 0x0006,
-	0x600f, 0x0000, 0x784c, 0x9c06, 0x11a0, 0x0036, 0x2019, 0x0001,
-	0x080c, 0x929d, 0x783f, 0x0000, 0x901e, 0x7b4e, 0x7b6a, 0x7b52,
-	0x7b6e, 0x003e, 0x000e, 0x9005, 0x1118, 0x600c, 0x600f, 0x0000,
-	0x0006, 0x00e6, 0x2f70, 0x080c, 0x8537, 0x00ee, 0x080c, 0xb870,
-	0x0548, 0x6014, 0x2048, 0x6020, 0x9086, 0x0003, 0x15a8, 0x3e08,
-	0x918e, 0x0002, 0x1188, 0x6010, 0x9005, 0x0170, 0x00b6, 0x2058,
-	0xb800, 0x00be, 0xd0bc, 0x0140, 0x6048, 0x9005, 0x11c0, 0x2001,
-	0x1960, 0x2004, 0x604a, 0x0098, 0x6004, 0x9086, 0x0040, 0x090c,
-	0x948d, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c, 0x69a9,
-	0x080c, 0xba5f, 0x6044, 0xc0fc, 0x6046, 0x080c, 0x9c20, 0x000e,
-	0x0804, 0x85eb, 0x7e4a, 0x7e46, 0x012e, 0x00fe, 0x00de, 0x00ce,
-	0x009e, 0x006e, 0x000e, 0x0005, 0x6020, 0x9086, 0x0006, 0x1118,
-	0x080c, 0xd267, 0x0c38, 0x6020, 0x9086, 0x000a, 0x09e0, 0x08a0,
-	0x0016, 0x0026, 0x0086, 0x9046, 0x00a9, 0x080c, 0x8749, 0x008e,
-	0x002e, 0x001e, 0x0005, 0x00f6, 0x0126, 0x2079, 0x19bf, 0x2091,
-	0x8000, 0x080c, 0x8792, 0x080c, 0x8826, 0x080c, 0x641c, 0x012e,
-	0x00fe, 0x0005, 0x00b6, 0x0096, 0x00f6, 0x00e6, 0x00d6, 0x00c6,
-	0x0066, 0x0016, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071, 0x19bf,
-	0x7620, 0x2660, 0x2678, 0x8cff, 0x0904, 0x870e, 0x6010, 0x2058,
-	0xb8a0, 0x9206, 0x1904, 0x8709, 0x88ff, 0x0120, 0x605c, 0x9106,
-	0x1904, 0x8709, 0x7030, 0x9c06, 0x1570, 0x2069, 0x0100, 0x6820,
-	0xd0a4, 0x1508, 0x080c, 0x821e, 0x080c, 0x8fd0, 0x68c3, 0x0000,
-	0x080c, 0x948d, 0x7033, 0x0000, 0x0036, 0x2069, 0x0140, 0x6b04,
-	0x9384, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2872, 0x9006,
-	0x080c, 0x2872, 0x2069, 0x0100, 0x6824, 0xd084, 0x0110, 0x6827,
-	0x0001, 0x003e, 0x0040, 0x7008, 0xc0ad, 0x700a, 0x6003, 0x0009,
-	0x630a, 0x0804, 0x8709, 0x7020, 0x9c36, 0x1110, 0x660c, 0x7622,
-	0x701c, 0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00, 0x701e,
-	0x0010, 0x701f, 0x0000, 0x660c, 0x0066, 0x2c00, 0x9f06, 0x0110,
-	0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000, 0x6044, 0xc0fc, 0x6046,
-	0x6014, 0x2048, 0x080c, 0xb870, 0x01e8, 0x6020, 0x9086, 0x0003,
-	0x1580, 0x080c, 0xba85, 0x1118, 0x080c, 0xa59c, 0x0098, 0xa867,
-	0x0103, 0xab7a, 0xa877, 0x0000, 0x0016, 0x0036, 0x0086, 0x080c,
-	0xbb73, 0x080c, 0xd563, 0x080c, 0x69b5, 0x008e, 0x003e, 0x001e,
-	0x080c, 0xba5f, 0x080c, 0x9c20, 0x080c, 0x9363, 0x00ce, 0x0804,
-	0x8683, 0x2c78, 0x600c, 0x2060, 0x0804, 0x8683, 0x012e, 0x000e,
-	0x001e, 0x006e, 0x00ce, 0x00de, 0x00ee, 0x00fe, 0x009e, 0x00be,
-	0x0005, 0x6020, 0x9086, 0x0006, 0x1158, 0x0016, 0x0036, 0x0086,
-	0x080c, 0xd563, 0x080c, 0xd267, 0x008e, 0x003e, 0x001e, 0x08d0,
-	0x080c, 0xa59c, 0x6020, 0x9086, 0x0002, 0x1160, 0x6004, 0x0006,
-	0x9086, 0x0085, 0x000e, 0x0904, 0x86ef, 0x9086, 0x008b, 0x0904,
-	0x86ef, 0x0840, 0x6020, 0x9086, 0x0005, 0x1920, 0x6004, 0x0006,
-	0x9086, 0x0085, 0x000e, 0x09c8, 0x9086, 0x008b, 0x09b0, 0x0804,
-	0x8702, 0x0006, 0x00f6, 0x00e6, 0x0096, 0x00b6, 0x00c6, 0x0066,
-	0x0016, 0x0126, 0x2091, 0x8000, 0x9280, 0x1000, 0x2004, 0x905d,
-	0x2079, 0x19bf, 0x9036, 0x7828, 0x2060, 0x8cff, 0x0538, 0x6010,
-	0x9b06, 0x1500, 0x6043, 0xffff, 0x080c, 0x9a83, 0x01d8, 0x610c,
-	0x0016, 0x080c, 0x9127, 0x6014, 0x2048, 0xa867, 0x0103, 0xab7a,
-	0xa877, 0x0000, 0x0016, 0x0036, 0x0086, 0x080c, 0xbb73, 0x080c,
-	0xd563, 0x080c, 0x69b5, 0x008e, 0x003e, 0x001e, 0x080c, 0x9c20,
-	0x00ce, 0x08d8, 0x2c30, 0x600c, 0x2060, 0x08b8, 0x080c, 0x6439,
-	0x012e, 0x001e, 0x006e, 0x00ce, 0x00be, 0x009e, 0x00ee, 0x00fe,
-	0x000e, 0x0005, 0x0096, 0x0006, 0x0066, 0x00c6, 0x00d6, 0x9036,
-	0x7820, 0x9065, 0x0904, 0x87f9, 0x600c, 0x0006, 0x6044, 0xc0fc,
-	0x6046, 0x600f, 0x0000, 0x7830, 0x9c06, 0x1588, 0x2069, 0x0100,
-	0x6820, 0xd0a4, 0x1508, 0x080c, 0x821e, 0x080c, 0x8fd0, 0x68c3,
-	0x0000, 0x080c, 0x948d, 0x7833, 0x0000, 0x0036, 0x2069, 0x0140,
-	0x6b04, 0x9384, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2872,
-	0x9006, 0x080c, 0x2872, 0x2069, 0x0100, 0x6824, 0xd084, 0x0110,
-	0x6827, 0x0001, 0x003e, 0x0058, 0x080c, 0x6640, 0x1538, 0x6003,
-	0x0009, 0x630a, 0x7808, 0xc0ad, 0x780a, 0x2c30, 0x00f8, 0x6014,
-	0x2048, 0x080c, 0xb86e, 0x01b0, 0x6020, 0x9086, 0x0003, 0x1508,
-	0x080c, 0xba85, 0x1118, 0x080c, 0xa59c, 0x0060, 0x080c, 0x6640,
-	0x1168, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c, 0x69b5,
-	0x080c, 0xba5f, 0x080c, 0x9c20, 0x080c, 0x9363, 0x000e, 0x0804,
-	0x8799, 0x7e22, 0x7e1e, 0x00de, 0x00ce, 0x006e, 0x000e, 0x009e,
-	0x0005, 0x6020, 0x9086, 0x0006, 0x1118, 0x080c, 0xd267, 0x0c50,
-	0x080c, 0xa59c, 0x6020, 0x9086, 0x0002, 0x1150, 0x6004, 0x0006,
-	0x9086, 0x0085, 0x000e, 0x0990, 0x9086, 0x008b, 0x0978, 0x08d0,
-	0x6020, 0x9086, 0x0005, 0x19b0, 0x6004, 0x0006, 0x9086, 0x0085,
-	0x000e, 0x0d18, 0x9086, 0x008b, 0x0d00, 0x0860, 0x0006, 0x0096,
-	0x00b6, 0x00c6, 0x0066, 0x9036, 0x7828, 0x9065, 0x0510, 0x6010,
-	0x2058, 0x600c, 0x0006, 0x3e08, 0x918e, 0x0002, 0x1118, 0xb800,
-	0xd0bc, 0x11a8, 0x6043, 0xffff, 0x080c, 0x9a83, 0x0180, 0x610c,
-	0x080c, 0x9127, 0x6014, 0x2048, 0xa867, 0x0103, 0xab7a, 0xa877,
-	0x0000, 0x080c, 0x69b5, 0x080c, 0x9c20, 0x000e, 0x08f0, 0x2c30,
-	0x0ce0, 0x006e, 0x00ce, 0x00be, 0x009e, 0x000e, 0x0005, 0x00e6,
-	0x00d6, 0x0096, 0x0066, 0x080c, 0x5df1, 0x11b0, 0x2071, 0x19bf,
-	0x7030, 0x9080, 0x0005, 0x2004, 0x904d, 0x0170, 0xa878, 0x9606,
-	0x1158, 0x2071, 0x19bf, 0x7030, 0x9035, 0x0130, 0x9080, 0x0005,
-	0x2004, 0x9906, 0x1108, 0x0029, 0x006e, 0x009e, 0x00de, 0x00ee,
-	0x0005, 0x00c6, 0x2660, 0x6043, 0xffff, 0x080c, 0x9a83, 0x0178,
-	0x080c, 0x9127, 0x6014, 0x2048, 0xa867, 0x0103, 0xab7a, 0xa877,
-	0x0000, 0x080c, 0xbb73, 0x080c, 0x69b5, 0x080c, 0x9c20, 0x00ce,
-	0x0005, 0x00b6, 0x00e6, 0x00c6, 0x080c, 0x98c7, 0x0106, 0x2071,
-	0x0101, 0x2e04, 0xc0c4, 0x2072, 0x6044, 0xd0fc, 0x1138, 0x010e,
-	0x090c, 0x98e3, 0x00ce, 0x00ee, 0x00be, 0x0005, 0x2071, 0x19bf,
-	0x7030, 0x9005, 0x0da0, 0x9c06, 0x190c, 0x0d65, 0x7036, 0x080c,
-	0x821e, 0x7004, 0x9084, 0x0007, 0x0002, 0x88bf, 0x88c1, 0x88c8,
-	0x88d2, 0x88e0, 0x88bf, 0x88cd, 0x88bd, 0x080c, 0x0d65, 0x0428,
-	0x0005, 0x080c, 0x9a6e, 0x7007, 0x0000, 0x7033, 0x0000, 0x00e8,
-	0x0066, 0x9036, 0x080c, 0x9127, 0x006e, 0x7007, 0x0000, 0x7033,
-	0x0000, 0x0098, 0x080c, 0x9a59, 0x0140, 0x080c, 0x9a6e, 0x0128,
-	0x0066, 0x9036, 0x080c, 0x9127, 0x006e, 0x7033, 0x0000, 0x0028,
-	0x080c, 0x9a59, 0x080c, 0x948d, 0x0000, 0x010e, 0x190c, 0x98e3,
-	0x00ce, 0x00ee, 0x00be, 0x0005, 0x00d6, 0x00c6, 0x080c, 0x98c7,
-	0x0106, 0x6044, 0xd0fc, 0x1130, 0x010e, 0x090c, 0x98e3, 0x00ce,
-	0x00de, 0x0005, 0x2069, 0x19bf, 0x684c, 0x9005, 0x0da8, 0x9c06,
-	0x190c, 0x0d65, 0x6852, 0x00e6, 0x2d70, 0x080c, 0x8537, 0x00ee,
-	0x080c, 0x822b, 0x0016, 0x2009, 0x0040, 0x080c, 0x207b, 0x001e,
-	0x683c, 0x9084, 0x0003, 0x0002, 0x891a, 0x891b, 0x8939, 0x8918,
-	0x080c, 0x0d65, 0x0460, 0x6868, 0x9086, 0x0001, 0x0190, 0x600c,
-	0x9015, 0x0160, 0x6a4a, 0x600f, 0x0000, 0x6044, 0xc0fc, 0x6046,
-	0x9006, 0x7042, 0x684e, 0x683f, 0x0000, 0x00c8, 0x684a, 0x6846,
-	0x0ca0, 0x686b, 0x0000, 0x6848, 0x9065, 0x0d78, 0x6003, 0x0002,
-	0x0c60, 0x9006, 0x686a, 0x6852, 0x686e, 0x600c, 0x9015, 0x0120,
-	0x6a4a, 0x600f, 0x0000, 0x0018, 0x684e, 0x684a, 0x6846, 0x684f,
-	0x0000, 0x010e, 0x190c, 0x98e3, 0x00ce, 0x00de, 0x0005, 0x0005,
-	0x6020, 0x9084, 0x000f, 0x000b, 0x0005, 0x8965, 0x8968, 0x8dc1,
-	0x8e50, 0x8968, 0x8dc1, 0x8e50, 0x8965, 0x8968, 0x8965, 0x8965,
-	0x8965, 0x8965, 0x8965, 0x8965, 0x8965, 0x080c, 0x8891, 0x0005,
-	0x00b6, 0x0156, 0x0136, 0x0146, 0x01c6, 0x01d6, 0x00c6, 0x00d6,
-	0x00e6, 0x00f6, 0x2069, 0x0200, 0x2071, 0x0240, 0x6004, 0x908a,
-	0x0053, 0x1a0c, 0x0d65, 0x6110, 0x2158, 0xb984, 0x2c78, 0x2061,
-	0x0100, 0x619a, 0x908a, 0x0040, 0x1a04, 0x89d4, 0x005b, 0x00fe,
-	0x00ee, 0x00de, 0x00ce, 0x01de, 0x01ce, 0x014e, 0x013e, 0x015e,
-	0x00be, 0x0005, 0x8b4b, 0x8b86, 0x8baf, 0x8c52, 0x8c73, 0x8c79,
-	0x8c86, 0x8c8e, 0x8c9a, 0x8ca0, 0x8cb1, 0x8ca0, 0x8d08, 0x8c8e,
-	0x8d14, 0x8d1a, 0x8c9a, 0x8d1a, 0x8d26, 0x89d2, 0x89d2, 0x89d2,
-	0x89d2, 0x89d2, 0x89d2, 0x89d2, 0x89d2, 0x89d2, 0x89d2, 0x89d2,
-	0x9148, 0x916b, 0x917c, 0x919c, 0x91ce, 0x8c86, 0x89d2, 0x8c86,
-	0x8ca0, 0x89d2, 0x8baf, 0x8c52, 0x89d2, 0x958b, 0x8ca0, 0x89d2,
-	0x95a7, 0x8ca0, 0x89d2, 0x8c9a, 0x8b45, 0x89f5, 0x89d2, 0x95c3,
-	0x9630, 0x9714, 0x89d2, 0x9721, 0x8c83, 0x974c, 0x89d2, 0x91d8,
-	0x9758, 0x89d2, 0x080c, 0x0d65, 0x2100, 0x005b, 0x00fe, 0x00ee,
-	0x00de, 0x00ce, 0x01de, 0x01ce, 0x014e, 0x013e, 0x015e, 0x00be,
-	0x0005, 0x89f3, 0x89f3, 0x89f3, 0x8a1c, 0x8ac8, 0x8ad3, 0x89f3,
-	0x89f3, 0x89f3, 0x8b1a, 0x8b26, 0x8a37, 0x89f3, 0x8a52, 0x8a86,
-	0x9ad9, 0x9b1e, 0x8ca0, 0x080c, 0x0d65, 0x00d6, 0x0096, 0x080c,
-	0x8d39, 0x7003, 0x2414, 0x7007, 0x0018, 0x700b, 0x0800, 0x7814,
-	0x2048, 0xa83c, 0x700e, 0xa850, 0x7022, 0xa854, 0x7026, 0x60c3,
-	0x0018, 0x080c, 0x8fa0, 0x009e, 0x00de, 0x0005, 0x7810, 0x00b6,
-	0x2058, 0xb8a0, 0x00be, 0x080c, 0x9b65, 0x1118, 0x9084, 0xff80,
-	0x0110, 0x9085, 0x0001, 0x0005, 0x00d6, 0x0096, 0x080c, 0x8d39,
-	0x7003, 0x0500, 0x7814, 0x2048, 0xa874, 0x700a, 0xa878, 0x700e,
-	0xa87c, 0x7012, 0xa880, 0x7016, 0xa884, 0x701a, 0xa888, 0x701e,
-	0x60c3, 0x0010, 0x080c, 0x8fa0, 0x009e, 0x00de, 0x0005, 0x00d6,
-	0x0096, 0x080c, 0x8d39, 0x7003, 0x0500, 0x7814, 0x2048, 0xa8cc,
-	0x700a, 0xa8d0, 0x700e, 0xa8d4, 0x7012, 0xa8d8, 0x7016, 0xa8dc,
-	0x701a, 0xa8e0, 0x701e, 0x60c3, 0x0010, 0x080c, 0x8fa0, 0x009e,
-	0x00de, 0x0005, 0x00d6, 0x0096, 0x0126, 0x2091, 0x8000, 0x080c,
-	0x8d39, 0x20e9, 0x0000, 0x2001, 0x197b, 0x2003, 0x0000, 0x7814,
-	0x2048, 0xa814, 0x8003, 0x60c2, 0xa830, 0x20a8, 0xa860, 0x20e0,
-	0xa85c, 0x9080, 0x001b, 0x2098, 0x2001, 0x197b, 0x0016, 0x200c,
-	0x2001, 0x0001, 0x080c, 0x2060, 0x080c, 0xc5cd, 0x9006, 0x080c,
-	0x2060, 0x001e, 0xa804, 0x9005, 0x0110, 0x2048, 0x0c28, 0x04d9,
-	0x080c, 0x8fa0, 0x012e, 0x009e, 0x00de, 0x0005, 0x00d6, 0x0096,
-	0x0126, 0x2091, 0x8000, 0x080c, 0x8d84, 0x20e9, 0x0000, 0x2001,
-	0x197b, 0x2003, 0x0000, 0x7814, 0x2048, 0xa86f, 0x0200, 0xa873,
-	0x0000, 0xa814, 0x8003, 0x60c2, 0xa830, 0x20a8, 0xa860, 0x20e0,
-	0xa85c, 0x9080, 0x001b, 0x2098, 0x2001, 0x197b, 0x0016, 0x200c,
-	0x080c, 0xc5cd, 0x001e, 0xa804, 0x9005, 0x0110, 0x2048, 0x0c60,
-	0x0051, 0x7814, 0x2048, 0x080c, 0x0fe1, 0x080c, 0x8fa0, 0x012e,
-	0x009e, 0x00de, 0x0005, 0x60c0, 0x8004, 0x9084, 0x0003, 0x9005,
-	0x0130, 0x9082, 0x0004, 0x20a3, 0x0000, 0x8000, 0x1de0, 0x0005,
-	0x080c, 0x8d39, 0x7003, 0x7800, 0x7808, 0x8007, 0x700a, 0x60c3,
-	0x0008, 0x0804, 0x8fa0, 0x00d6, 0x00e6, 0x080c, 0x8d84, 0x7814,
-	0x9084, 0xff00, 0x2073, 0x0200, 0x8e70, 0x8e70, 0x9095, 0x0010,
-	0x2272, 0x8e70, 0x2073, 0x0034, 0x8e70, 0x2069, 0x1805, 0x20a9,
-	0x0004, 0x2d76, 0x8d68, 0x8e70, 0x1f04, 0x8ae9, 0x2069, 0x1801,
-	0x20a9, 0x0004, 0x2d76, 0x8d68, 0x8e70, 0x1f04, 0x8af2, 0x2069,
-	0x198b, 0x9086, 0xdf00, 0x0110, 0x2069, 0x19a5, 0x20a9, 0x001a,
-	0x9e86, 0x0260, 0x1148, 0x00c6, 0x2061, 0x0200, 0x6010, 0x8000,
-	0x6012, 0x00ce, 0x2071, 0x0240, 0x2d04, 0x8007, 0x2072, 0x8d68,
-	0x8e70, 0x1f04, 0x8b00, 0x60c3, 0x004c, 0x080c, 0x8fa0, 0x00ee,
-	0x00de, 0x0005, 0x080c, 0x8d39, 0x7003, 0x6300, 0x7007, 0x0028,
-	0x7808, 0x700e, 0x60c3, 0x0008, 0x0804, 0x8fa0, 0x00d6, 0x0026,
-	0x0016, 0x080c, 0x8d84, 0x7003, 0x0200, 0x7814, 0x700e, 0x00e6,
-	0x9ef0, 0x0004, 0x2009, 0x0001, 0x2011, 0x000c, 0x2073, 0x0800,
-	0x8e70, 0x2073, 0x0000, 0x00ee, 0x7206, 0x710a, 0x62c2, 0x080c,
-	0x8fa0, 0x001e, 0x002e, 0x00de, 0x0005, 0x2001, 0x1817, 0x2004,
-	0x609a, 0x0804, 0x8fa0, 0x080c, 0x8d39, 0x7003, 0x5200, 0x2069,
-	0x185b, 0x6804, 0xd084, 0x0130, 0x6828, 0x0016, 0x080c, 0x248c,
-	0x710e, 0x001e, 0x20a9, 0x0004, 0x20e1, 0x0001, 0x2099, 0x1805,
-	0x20e9, 0x0000, 0x20a1, 0x0250, 0x4003, 0x20a9, 0x0004, 0x2099,
-	0x1801, 0x20a1, 0x0254, 0x4003, 0x080c, 0x9b65, 0x1120, 0xb8a0,
-	0x9082, 0x007f, 0x0248, 0x2001, 0x181e, 0x2004, 0x7032, 0x2001,
-	0x181f, 0x2004, 0x7036, 0x0030, 0x2001, 0x1817, 0x2004, 0x9084,
-	0x00ff, 0x7036, 0x60c3, 0x001c, 0x0804, 0x8fa0, 0x080c, 0x8d39,
-	0x7003, 0x0500, 0x080c, 0x9b65, 0x1120, 0xb8a0, 0x9082, 0x007f,
-	0x0248, 0x2001, 0x181e, 0x2004, 0x700a, 0x2001, 0x181f, 0x2004,
-	0x700e, 0x0030, 0x2001, 0x1817, 0x2004, 0x9084, 0x00ff, 0x700e,
-	0x20a9, 0x0004, 0x20e1, 0x0001, 0x2099, 0x1805, 0x20e9, 0x0000,
-	0x20a1, 0x0250, 0x4003, 0x60c3, 0x0010, 0x0804, 0x8fa0, 0x080c,
-	0x8d39, 0x9006, 0x080c, 0x6654, 0xb8a0, 0x9086, 0x007e, 0x1130,
-	0x7003, 0x0400, 0x620c, 0xc2b4, 0x620e, 0x0058, 0x7814, 0x0096,
-	0x904d, 0x0120, 0x9006, 0xa89a, 0xa8a6, 0xa8aa, 0x009e, 0x7003,
-	0x0300, 0xb8a0, 0x9086, 0x007e, 0x1904, 0x8c1a, 0x00d6, 0x2069,
-	0x1944, 0x2001, 0x1836, 0x2004, 0xd0a4, 0x0178, 0x6800, 0x700a,
-	0x6808, 0x9084, 0x2000, 0x7012, 0x680c, 0x7016, 0x701f, 0x2710,
-	0x6818, 0x7022, 0x681c, 0x7026, 0x0080, 0x6800, 0x700a, 0x6804,
-	0x700e, 0x6808, 0x080c, 0x70ba, 0x1118, 0x9084, 0x37ff, 0x0010,
-	0x9084, 0x3fff, 0x7012, 0x680c, 0x7016, 0x00de, 0x20a9, 0x0004,
-	0x20e1, 0x0001, 0x2099, 0x1805, 0x20e9, 0x0000, 0x20a1, 0x0256,
-	0x4003, 0x20a9, 0x0004, 0x2099, 0x1801, 0x20a1, 0x025a, 0x4003,
-	0x00d6, 0x080c, 0x97df, 0x2069, 0x194c, 0x2071, 0x024e, 0x6800,
-	0xc0dd, 0x7002, 0x080c, 0x53ac, 0xd0e4, 0x0110, 0x680c, 0x700e,
-	0x00de, 0x04a0, 0x2001, 0x1836, 0x2004, 0xd0a4, 0x0168, 0x0016,
-	0x2009, 0x0002, 0x60e0, 0x9106, 0x0130, 0x2100, 0x60e3, 0x0000,
-	0x080c, 0x24cd, 0x61e2, 0x001e, 0x20e1, 0x0001, 0x2099, 0x1944,
-	0x20e9, 0x0000, 0x20a1, 0x024e, 0x20a9, 0x0008, 0x4003, 0x20a9,
-	0x0004, 0x2099, 0x1805, 0x20a1, 0x0256, 0x4003, 0x20a9, 0x0004,
-	0x2099, 0x1801, 0x20a1, 0x025a, 0x4003, 0x080c, 0x97df, 0x20a1,
-	0x024e, 0x20a9, 0x0008, 0x2099, 0x194c, 0x4003, 0x60c3, 0x0074,
-	0x0804, 0x8fa0, 0x080c, 0x8d39, 0x7003, 0x2010, 0x7007, 0x0014,
-	0x700b, 0x0800, 0x700f, 0x2000, 0x9006, 0x00f6, 0x2079, 0x185b,
-	0x7904, 0x00fe, 0xd1ac, 0x1110, 0x9085, 0x0020, 0x0010, 0x9085,
-	0x0010, 0x9085, 0x0002, 0x00d6, 0x0804, 0x8ce9, 0x7026, 0x60c3,
-	0x0014, 0x0804, 0x8fa0, 0x080c, 0x8d39, 0x7003, 0x5000, 0x0804,
-	0x8bc9, 0x080c, 0x8d39, 0x7003, 0x2110, 0x7007, 0x0014, 0x60c3,
-	0x0014, 0x0804, 0x8fa0, 0x080c, 0x8d7b, 0x0010, 0x080c, 0x8d84,
-	0x7003, 0x0200, 0x60c3, 0x0004, 0x0804, 0x8fa0, 0x080c, 0x8d84,
-	0x7003, 0x0100, 0x700b, 0x0003, 0x700f, 0x2a00, 0x60c3, 0x0008,
-	0x0804, 0x8fa0, 0x080c, 0x8d84, 0x7003, 0x0200, 0x0804, 0x8bc9,
-	0x080c, 0x8d84, 0x7003, 0x0100, 0x782c, 0x9005, 0x0110, 0x700a,
-	0x0010, 0x700b, 0x0003, 0x7814, 0x700e, 0x60c3, 0x0008, 0x0804,
-	0x8fa0, 0x00d6, 0x080c, 0x8d84, 0x7003, 0x0210, 0x7007, 0x0014,
-	0x700b, 0x0800, 0xb894, 0x9086, 0x0014, 0x1198, 0xb99c, 0x9184,
-	0x0030, 0x0190, 0xb998, 0x9184, 0xc000, 0x1140, 0xd1ec, 0x0118,
-	0x700f, 0x2100, 0x0058, 0x700f, 0x0100, 0x0040, 0x700f, 0x0400,
-	0x0028, 0x700f, 0x0700, 0x0010, 0x700f, 0x0800, 0x00f6, 0x2079,
-	0x185b, 0x7904, 0x00fe, 0xd1ac, 0x1110, 0x9085, 0x0020, 0x0010,
-	0x9085, 0x0010, 0x2009, 0x187d, 0x210c, 0xd184, 0x1110, 0x9085,
-	0x0002, 0x0026, 0x2009, 0x187b, 0x210c, 0xd1e4, 0x0150, 0xc0c5,
-	0xbac4, 0xd28c, 0x1108, 0xc0cd, 0x9094, 0x0030, 0x9296, 0x0010,
-	0x0140, 0xd1ec, 0x0130, 0x9094, 0x0030, 0x9296, 0x0010, 0x0108,
-	0xc0bd, 0x002e, 0x7026, 0x60c3, 0x0014, 0x00de, 0x0804, 0x8fa0,
-	0x080c, 0x8d84, 0x7003, 0x0210, 0x7007, 0x0014, 0x700f, 0x0100,
-	0x60c3, 0x0014, 0x0804, 0x8fa0, 0x080c, 0x8d84, 0x7003, 0x0200,
-	0x0804, 0x8b4f, 0x080c, 0x8d84, 0x7003, 0x0100, 0x700b, 0x0003,
-	0x700f, 0x2a00, 0x60c3, 0x0008, 0x0804, 0x8fa0, 0x080c, 0x8d84,
-	0x7003, 0x0100, 0x700b, 0x000b, 0x60c3, 0x0008, 0x0804, 0x8fa0,
-	0x0026, 0x00d6, 0x0036, 0x0046, 0x2019, 0x3200, 0x2021, 0x0800,
-	0x0040, 0x0026, 0x00d6, 0x0036, 0x0046, 0x2019, 0x2200, 0x2021,
-	0x0100, 0x080c, 0x97f4, 0xb810, 0x9305, 0x7002, 0xb814, 0x7006,
-	0x2069, 0x1800, 0x6878, 0x700a, 0x687c, 0x700e, 0x9485, 0x0029,
-	0x7012, 0x004e, 0x003e, 0x00de, 0x080c, 0x8f94, 0x721a, 0x9f95,
-	0x0000, 0x7222, 0x7027, 0xffff, 0x2071, 0x024c, 0x002e, 0x0005,
-	0x0026, 0x080c, 0x97f4, 0x7003, 0x02ff, 0x7007, 0xfffc, 0x00d6,
-	0x2069, 0x1800, 0x6878, 0x700a, 0x687c, 0x700e, 0x00de, 0x7013,
-	0x2029, 0x0c10, 0x7003, 0x0100, 0x7007, 0x0000, 0x700b, 0xfc02,
-	0x700f, 0x0000, 0x0005, 0x0026, 0x00d6, 0x0036, 0x0046, 0x2019,
-	0x3300, 0x2021, 0x0800, 0x0040, 0x0026, 0x00d6, 0x0036, 0x0046,
-	0x2019, 0x2300, 0x2021, 0x0100, 0x080c, 0x97f4, 0xb810, 0x9305,
-	0x7002, 0xb814, 0x7006, 0x2069, 0x1800, 0xb810, 0x9005, 0x1140,
-	0xb814, 0x9005, 0x1128, 0x700b, 0x00ff, 0x700f, 0xfffe, 0x0020,
-	0x6878, 0x700a, 0x687c, 0x700e, 0x0000, 0x9485, 0x0098, 0x7012,
-	0x004e, 0x003e, 0x00de, 0x080c, 0x8f94, 0x721a, 0x7a08, 0x7222,
-	0x2f10, 0x7226, 0x2071, 0x024c, 0x002e, 0x0005, 0x080c, 0x8f94,
-	0x721a, 0x7a08, 0x7222, 0x7814, 0x7026, 0x2071, 0x024c, 0x002e,
-	0x0005, 0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x2069, 0x0200,
-	0x2071, 0x0240, 0x6004, 0x908a, 0x0085, 0x0a0c, 0x0d65, 0x908a,
-	0x0092, 0x1a0c, 0x0d65, 0x6110, 0x2158, 0xb984, 0x2c78, 0x2061,
-	0x0100, 0x619a, 0x9082, 0x0085, 0x0033, 0x00fe, 0x00ee, 0x00de,
-	0x00ce, 0x00be, 0x0005, 0x8df2, 0x8e01, 0x8e0c, 0x8df0, 0x8df0,
-	0x8df0, 0x8df2, 0x8df0, 0x8df0, 0x8df0, 0x8df0, 0x8df0, 0x8df0,
-	0x080c, 0x0d65, 0x0411, 0x60c3, 0x0000, 0x0026, 0x080c, 0x27dd,
-	0x0228, 0x2011, 0x0101, 0x2204, 0xc0c5, 0x2012, 0x002e, 0x0804,
-	0x8fa0, 0x0431, 0x7808, 0x700a, 0x7814, 0x700e, 0x7017, 0xffff,
-	0x60c3, 0x000c, 0x0804, 0x8fa0, 0x0479, 0x7003, 0x0003, 0x7007,
-	0x0300, 0x60c3, 0x0004, 0x0804, 0x8fa0, 0x0026, 0x080c, 0x97f4,
-	0xb810, 0x9085, 0x8100, 0x7002, 0xb814, 0x7006, 0x2069, 0x1800,
-	0x6878, 0x700a, 0x687c, 0x700e, 0x7013, 0x0009, 0x0804, 0x8d54,
-	0x0026, 0x080c, 0x97f4, 0xb810, 0x9085, 0x8400, 0x7002, 0xb814,
-	0x7006, 0x2069, 0x1800, 0x6878, 0x700a, 0x687c, 0x700e, 0x2001,
-	0x0099, 0x7012, 0x0804, 0x8db6, 0x0026, 0x080c, 0x97f4, 0xb810,
-	0x9085, 0x8500, 0x7002, 0xb814, 0x7006, 0x2069, 0x1800, 0x6878,
-	0x700a, 0x687c, 0x700e, 0x2001, 0x0099, 0x7012, 0x0804, 0x8db6,
-	0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x2c78, 0x2069, 0x0200,
-	0x2071, 0x0240, 0x7804, 0x908a, 0x0040, 0x0a0c, 0x0d65, 0x908a,
-	0x0057, 0x1a0c, 0x0d65, 0x7910, 0x2158, 0xb984, 0x2061, 0x0100,
-	0x619a, 0x9082, 0x0040, 0x0033, 0x00fe, 0x00ee, 0x00de, 0x00ce,
-	0x00be, 0x0005, 0x8e85, 0x8e85, 0x8e85, 0x8eab, 0x8e85, 0x8e85,
-	0x8e85, 0x8e85, 0x8e85, 0x8e85, 0x8e85, 0x9340, 0x9348, 0x9350,
-	0x9358, 0x8e85, 0x8e85, 0x8e85, 0x9338, 0x080c, 0x0d65, 0x6813,
-	0x0008, 0xba8c, 0x8210, 0xb8c4, 0xd084, 0x0128, 0x7a4e, 0x7b14,
-	0x7b52, 0x722e, 0x732a, 0x9294, 0x00ff, 0xba8e, 0x8217, 0x721a,
-	0xba10, 0x9295, 0x0600, 0x7202, 0xba14, 0x7206, 0x2069, 0x1800,
-	0x6a78, 0x720a, 0x6a7c, 0x720e, 0x7013, 0x0829, 0x2f10, 0x7222,
-	0x7027, 0xffff, 0x0005, 0x0016, 0x7814, 0x9084, 0x0700, 0x8007,
-	0x0013, 0x001e, 0x0005, 0x8ebb, 0x8ebb, 0x8ebd, 0x8ebb, 0x8ebb,
-	0x8ebb, 0x8ed7, 0x8ebb, 0x080c, 0x0d65, 0x7914, 0x918c, 0x08ff,
-	0x918d, 0xf600, 0x7916, 0x2009, 0x0003, 0x00b9, 0x2069, 0x185b,
-	0x6804, 0xd0bc, 0x0130, 0x682c, 0x9084, 0x00ff, 0x8007, 0x7032,
-	0x0010, 0x7033, 0x3f00, 0x60c3, 0x0001, 0x0804, 0x8fa0, 0x2009,
-	0x0003, 0x0019, 0x7033, 0x7f00, 0x0cb0, 0x0016, 0x080c, 0x97f4,
-	0x001e, 0xb810, 0x9085, 0x0100, 0x7002, 0xb814, 0x7006, 0x2069,
-	0x1800, 0x6a78, 0x720a, 0x6a7c, 0x720e, 0x7013, 0x0888, 0x918d,
-	0x0008, 0x7116, 0x080c, 0x8f94, 0x721a, 0x7a08, 0x7222, 0x2f10,
-	0x7226, 0x0005, 0x00b6, 0x0096, 0x00e6, 0x00d6, 0x00c6, 0x0056,
-	0x0046, 0x0036, 0x2061, 0x0100, 0x2071, 0x1800, 0x7810, 0x2058,
-	0xb8a0, 0x2028, 0xb910, 0xba14, 0x7378, 0x747c, 0x7820, 0x0002,
-	0x8f1f, 0x8f1f, 0x8f1f, 0x8f1f, 0x8f1f, 0x8f1f, 0x8f1f, 0x8f1f,
-	0x8f1f, 0x8f1f, 0x8f21, 0x8f1f, 0x8f1f, 0x8f1f, 0x8f1f, 0x080c,
-	0x0d65, 0xb884, 0x609e, 0x7814, 0x2048, 0xa87c, 0xd0fc, 0x0558,
-	0xaf90, 0x9784, 0xff00, 0x9105, 0x6062, 0x873f, 0x9784, 0xff00,
-	0x0006, 0x7814, 0x2048, 0xa878, 0xc0fc, 0x9005, 0x000e, 0x1160,
-	0xaf94, 0x87ff, 0x0198, 0x2039, 0x0098, 0x9705, 0x6072, 0x7808,
-	0x6082, 0x2f00, 0x6086, 0x0038, 0x9185, 0x2200, 0x6062, 0x6073,
-	0x0129, 0x6077, 0x0000, 0xb884, 0x609e, 0x0050, 0x2039, 0x0029,
-	0x9705, 0x6072, 0x0cc0, 0x9185, 0x0200, 0x6062, 0x6073, 0x2029,
-	0xa87c, 0xd0fc, 0x0118, 0xaf94, 0x87ff, 0x1120, 0x2f00, 0x6082,
-	0x7808, 0x6086, 0x6266, 0x636a, 0x646e, 0x6077, 0x0000, 0xb88c,
-	0x8000, 0x9084, 0x00ff, 0xb88e, 0x8007, 0x607a, 0x607f, 0x0000,
-	0xa848, 0x608a, 0xa844, 0x608e, 0xa838, 0x60c6, 0xa834, 0x60ca,
-	0xb86c, 0x60ce, 0x60af, 0x95d5, 0x60d7, 0x0000, 0x080c, 0x97d4,
-	0x2009, 0x07d0, 0x60c4, 0x9084, 0xfff0, 0x9005, 0x0110, 0x2009,
-	0x1b58, 0x080c, 0x8223, 0x003e, 0x004e, 0x005e, 0x00ce, 0x00de,
-	0x00ee, 0x009e, 0x00be, 0x0005, 0x7a40, 0x9294, 0x00ff, 0x8217,
-	0x0005, 0x00d6, 0x2069, 0x19bf, 0x686b, 0x0001, 0x00de, 0x0005,
-	0x60a3, 0x0056, 0x60a7, 0x9575, 0x00f1, 0x080c, 0x8215, 0x0005,
-	0x0016, 0x2001, 0x180c, 0x200c, 0x9184, 0x0600, 0x9086, 0x0600,
-	0x0128, 0x0089, 0x080c, 0x8215, 0x001e, 0x0005, 0xc1e5, 0x2001,
-	0x180c, 0x2102, 0x2001, 0x19c0, 0x2003, 0x0000, 0x2001, 0x19cb,
-	0x2003, 0x0000, 0x0c88, 0x0006, 0x0016, 0x0026, 0x2009, 0x1804,
-	0x2011, 0x0009, 0x080c, 0x28bb, 0x002e, 0x001e, 0x000e, 0x0005,
-	0x0016, 0x00c6, 0x0006, 0x080c, 0x98c7, 0x0106, 0x2061, 0x0100,
-	0x61a4, 0x60a7, 0x95f5, 0x0016, 0x0026, 0x2009, 0x1804, 0x2011,
-	0x0008, 0x080c, 0x28bb, 0x002e, 0x001e, 0x010e, 0x090c, 0x98e3,
-	0x000e, 0xa001, 0xa001, 0xa001, 0x61a6, 0x00ce, 0x001e, 0x0005,
-	0x00c6, 0x00d6, 0x0016, 0x0026, 0x2061, 0x0100, 0x2069, 0x0140,
-	0x080c, 0x70ba, 0x1510, 0x2001, 0x19e4, 0x2004, 0x9005, 0x1904,
-	0x904f, 0x080c, 0x715f, 0x11a8, 0x2069, 0x0380, 0x6843, 0x0101,
-	0x6844, 0xd084, 0x1de8, 0x2061, 0x0100, 0x6020, 0xd0b4, 0x1120,
-	0x6024, 0xd084, 0x090c, 0x0d65, 0x6843, 0x0100, 0x080c, 0x8215,
-	0x04b0, 0x00c6, 0x2061, 0x19bf, 0x00f0, 0x6904, 0x9194, 0x4000,
-	0x0598, 0x080c, 0x8fd0, 0x080c, 0x2882, 0x00c6, 0x2061, 0x19bf,
-	0x6134, 0x9192, 0x0008, 0x1278, 0x8108, 0x6136, 0x080c, 0x98c7,
-	0x6130, 0x080c, 0x98e3, 0x00ce, 0x81ff, 0x01c8, 0x080c, 0x8215,
-	0x080c, 0x8fc3, 0x00a0, 0x080c, 0x98c7, 0x6130, 0x91e5, 0x0000,
-	0x0150, 0x080c, 0xd659, 0x080c, 0x821e, 0x6003, 0x0001, 0x2009,
-	0x0014, 0x080c, 0x9c82, 0x080c, 0x98e3, 0x00ce, 0x0000, 0x002e,
-	0x001e, 0x00de, 0x00ce, 0x0005, 0x2001, 0x19e4, 0x2004, 0x9005,
-	0x1db0, 0x00c6, 0x2061, 0x19bf, 0x6134, 0x9192, 0x0003, 0x1ad8,
-	0x8108, 0x6136, 0x00ce, 0x080c, 0x8215, 0x080c, 0x5bb2, 0x2009,
-	0x185a, 0x2114, 0x8210, 0x220a, 0x0c10, 0x0096, 0x00c6, 0x00d6,
-	0x00e6, 0x0016, 0x0026, 0x080c, 0x822b, 0x080c, 0x98c7, 0x2001,
-	0x0387, 0x2003, 0x0202, 0x2071, 0x19bf, 0x714c, 0x81ff, 0x0904,
-	0x90e3, 0x2061, 0x0100, 0x2069, 0x0140, 0x080c, 0x70ba, 0x11c0,
-	0x0036, 0x2019, 0x0002, 0x080c, 0x929d, 0x003e, 0x714c, 0x2160,
-	0x080c, 0xd659, 0x2009, 0x004a, 0x6003, 0x0003, 0x080c, 0x9c82,
-	0x2001, 0x0386, 0x2003, 0x5040, 0x080c, 0x715f, 0x0804, 0x90e3,
-	0x6904, 0xd1f4, 0x0904, 0x90f0, 0x080c, 0x2882, 0x00c6, 0x704c,
-	0x9065, 0x090c, 0x0d65, 0x6020, 0x00ce, 0x9086, 0x0006, 0x1518,
-	0x61c8, 0x60c4, 0x9105, 0x11f8, 0x2009, 0x180c, 0x2104, 0xd0d4,
-	0x01d0, 0x6214, 0x9294, 0x1800, 0x1128, 0x6224, 0x9294, 0x0002,
-	0x1510, 0x0010, 0xc0d4, 0x200a, 0x6014, 0x9084, 0xe7fd, 0x9085,
-	0x0010, 0x6016, 0x704c, 0x2060, 0x080c, 0x88ec, 0x2009, 0x0049,
-	0x080c, 0x9c82, 0x0080, 0x0036, 0x2019, 0x0001, 0x080c, 0x929d,
-	0x003e, 0x714c, 0x2160, 0x080c, 0xd659, 0x2009, 0x004a, 0x6003,
-	0x0003, 0x080c, 0x9c82, 0x2001, 0x0387, 0x2003, 0x0200, 0x080c,
-	0x98e3, 0x002e, 0x001e, 0x00ee, 0x00de, 0x00ce, 0x009e, 0x0005,
-	0xd1ec, 0x1904, 0x90a4, 0x0804, 0x90a6, 0x0026, 0x00e6, 0x2071,
-	0x19bf, 0x706c, 0xd084, 0x01d0, 0xc084, 0x706e, 0x714c, 0x81ff,
-	0x01a8, 0x2071, 0x0100, 0x9188, 0x0008, 0x2114, 0x928e, 0x0006,
-	0x1138, 0x2009, 0x1984, 0x2011, 0x0012, 0x080c, 0x28bb, 0x0030,
-	0x2009, 0x1984, 0x2011, 0x0016, 0x080c, 0x28bb, 0x00ee, 0x002e,
-	0x0005, 0x9036, 0x2001, 0x19c9, 0x2004, 0x9005, 0x0128, 0x9c06,
-	0x0128, 0x2c30, 0x600c, 0x0cc8, 0x9085, 0x0001, 0x0005, 0x00f6,
-	0x2079, 0x19bf, 0x610c, 0x9006, 0x600e, 0x6044, 0xc0fc, 0x6046,
-	0x86ff, 0x1140, 0x7824, 0x9c06, 0x1118, 0x7826, 0x782a, 0x0050,
-	0x792a, 0x0040, 0x00c6, 0x2660, 0x610e, 0x00ce, 0x7824, 0x9c06,
-	0x1108, 0x7e26, 0x080c, 0x9363, 0x080c, 0xba5f, 0x00fe, 0x0005,
-	0x080c, 0x8d39, 0x7003, 0x1200, 0x7838, 0x7012, 0x783c, 0x7016,
-	0x00c6, 0x7820, 0x9086, 0x0004, 0x1148, 0x7810, 0x9005, 0x0130,
-	0x00b6, 0x2058, 0xb810, 0xb914, 0x00be, 0x0020, 0x2061, 0x1800,
-	0x6078, 0x617c, 0x9084, 0x00ff, 0x700a, 0x710e, 0x00ce, 0x60c3,
-	0x002c, 0x0804, 0x8fa0, 0x080c, 0x8d39, 0x7003, 0x0f00, 0x7808,
-	0xd09c, 0x0128, 0xb810, 0x9084, 0x00ff, 0x700a, 0xb814, 0x700e,
-	0x60c3, 0x0008, 0x0804, 0x8fa0, 0x0156, 0x080c, 0x8d84, 0x7003,
-	0x0200, 0x2011, 0x1848, 0x63f0, 0x2312, 0x20a9, 0x0006, 0x2011,
-	0x1840, 0x2019, 0x1841, 0x9ef0, 0x0002, 0x2376, 0x8e70, 0x2276,
-	0x8e70, 0x9398, 0x0002, 0x9290, 0x0002, 0x1f04, 0x918d, 0x60c3,
-	0x001c, 0x015e, 0x0804, 0x8fa0, 0x0016, 0x0026, 0x080c, 0x8d60,
-	0x080c, 0x8d72, 0x9e80, 0x0004, 0x20e9, 0x0000, 0x20a0, 0x7814,
-	0x0096, 0x2048, 0xa800, 0x2048, 0xa860, 0x20e0, 0xa85c, 0x9080,
-	0x0021, 0x2098, 0x009e, 0x7808, 0x9088, 0x0002, 0x21a8, 0x9192,
-	0x0010, 0x1250, 0x4003, 0x9080, 0x0004, 0x8003, 0x60c2, 0x080c,
-	0x8fa0, 0x002e, 0x001e, 0x0005, 0x20a9, 0x0010, 0x4003, 0x080c,
-	0x97df, 0x20a1, 0x0240, 0x22a8, 0x4003, 0x0c68, 0x080c, 0x8d39,
-	0x7003, 0x6200, 0x7808, 0x700e, 0x60c3, 0x0008, 0x0804, 0x8fa0,
-	0x0016, 0x0026, 0x080c, 0x8d39, 0x20e9, 0x0000, 0x20a1, 0x024c,
-	0x7814, 0x0096, 0x2048, 0xa800, 0x2048, 0xa860, 0x20e0, 0xa85c,
-	0x9080, 0x0023, 0x2098, 0x009e, 0x7808, 0x9088, 0x0002, 0x21a8,
-	0x4003, 0x8003, 0x60c2, 0x080c, 0x8fa0, 0x002e, 0x001e, 0x0005,
-	0x00e6, 0x00c6, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071, 0x19bf,
-	0x7010, 0x2060, 0x8cff, 0x0188, 0x080c, 0xba85, 0x1110, 0x080c,
-	0xa59c, 0x600c, 0x0006, 0x080c, 0xbd01, 0x600f, 0x0000, 0x080c,
-	0x9be6, 0x080c, 0x9363, 0x00ce, 0x0c68, 0x2c00, 0x7012, 0x700e,
-	0x012e, 0x000e, 0x00ce, 0x00ee, 0x0005, 0x0126, 0x0156, 0x00f6,
-	0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0026, 0x0016, 0x0006, 0x2091,
-	0x8000, 0x2001, 0x180c, 0x200c, 0x918c, 0xe7ff, 0x2102, 0x2069,
-	0x0100, 0x2079, 0x0140, 0x2071, 0x19bf, 0x7030, 0x2060, 0x8cff,
-	0x0548, 0x080c, 0x8fd0, 0x6ac0, 0x68c3, 0x0000, 0x080c, 0x821e,
-	0x00c6, 0x2061, 0x0100, 0x080c, 0x97f8, 0x00ce, 0x20a9, 0x01f4,
-	0x04b1, 0x080c, 0x8891, 0x6044, 0xd0ac, 0x1128, 0x2001, 0x1960,
-	0x2004, 0x604a, 0x0020, 0x2009, 0x0013, 0x080c, 0x9c82, 0x000e,
-	0x001e, 0x002e, 0x006e, 0x00ce, 0x00de, 0x00ee, 0x00fe, 0x015e,
-	0x012e, 0x0005, 0x2001, 0x1800, 0x2004, 0x9096, 0x0001, 0x0d78,
-	0x9096, 0x0004, 0x0d60, 0x080c, 0x821e, 0x6814, 0x9084, 0x0001,
-	0x0110, 0x68a7, 0x95f5, 0x6817, 0x0008, 0x68c3, 0x0000, 0x2011,
-	0x5b5c, 0x080c, 0x816c, 0x20a9, 0x01f4, 0x0009, 0x08c0, 0x6824,
-	0xd094, 0x0140, 0x6827, 0x0004, 0x7804, 0x9084, 0x4000, 0x190c,
-	0x2882, 0x0090, 0xd084, 0x0118, 0x6827, 0x0001, 0x0010, 0x1f04,
-	0x927f, 0x7804, 0x9084, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c,
-	0x2872, 0x9006, 0x080c, 0x2872, 0x0005, 0x0126, 0x0156, 0x00f6,
-	0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0026, 0x0016, 0x0006, 0x2091,
-	0x8000, 0x2001, 0x180c, 0x200c, 0x918c, 0xdbff, 0x2102, 0x2069,
-	0x0100, 0x2079, 0x0140, 0x2071, 0x0380, 0x701c, 0x0006, 0x701f,
-	0x0202, 0x2071, 0x19bf, 0x704c, 0x2060, 0x8cff, 0x0904, 0x9312,
-	0x9386, 0x0002, 0x1128, 0x6814, 0x9084, 0x0002, 0x0904, 0x9312,
-	0x68af, 0x95f5, 0x6817, 0x0010, 0x2009, 0x00fa, 0x8109, 0x1df0,
-	0x69c6, 0x68cb, 0x0008, 0x080c, 0x822b, 0x080c, 0x1c9f, 0x2001,
-	0x0032, 0x6920, 0xd1bc, 0x0130, 0x8001, 0x1dd8, 0x692c, 0x918d,
-	0x0008, 0x692e, 0x20a9, 0x03e8, 0x6824, 0xd094, 0x0140, 0x6827,
-	0x0004, 0x7804, 0x9084, 0x4000, 0x190c, 0x2882, 0x0090, 0xd08c,
-	0x0118, 0x6827, 0x0002, 0x0010, 0x1f04, 0x92e4, 0x7804, 0x9084,
-	0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2872, 0x9006, 0x080c,
-	0x2872, 0x6827, 0x4000, 0x6824, 0x83ff, 0x1160, 0x2009, 0x0049,
-	0x080c, 0x88ec, 0x6044, 0xd0ac, 0x1118, 0x6003, 0x0002, 0x0010,
-	0x080c, 0x9c82, 0x000e, 0x2071, 0x0380, 0xd08c, 0x1110, 0x701f,
-	0x0200, 0x000e, 0x001e, 0x002e, 0x006e, 0x00ce, 0x00de, 0x00ee,
-	0x00fe, 0x015e, 0x012e, 0x0005, 0x00d6, 0x0126, 0x2091, 0x8000,
-	0x2069, 0x19bf, 0x6a06, 0x012e, 0x00de, 0x0005, 0x00d6, 0x0126,
-	0x2091, 0x8000, 0x2069, 0x19bf, 0x6a3e, 0x012e, 0x00de, 0x0005,
-	0x080c, 0x8e87, 0x785c, 0x7032, 0x7042, 0x7047, 0x1000, 0x00f8,
-	0x080c, 0x8e87, 0x785c, 0x7032, 0x7042, 0x7047, 0x4000, 0x00b8,
-	0x080c, 0x8e87, 0x785c, 0x7032, 0x7042, 0x7047, 0x2000, 0x0078,
-	0x080c, 0x8e87, 0x785c, 0x7032, 0x7042, 0x7047, 0x0400, 0x0038,
-	0x080c, 0x8e87, 0x785c, 0x7032, 0x7042, 0x7047, 0x0200, 0x60c3,
-	0x0020, 0x0804, 0x8fa0, 0x00e6, 0x2071, 0x19bf, 0x702c, 0x9005,
-	0x0110, 0x8001, 0x702e, 0x00ee, 0x0005, 0x00f6, 0x00e6, 0x00d6,
-	0x00c6, 0x0076, 0x0066, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071,
-	0x19bf, 0x7620, 0x2660, 0x2678, 0x2039, 0x0001, 0x87ff, 0x0904,
-	0x9408, 0x8cff, 0x0904, 0x9408, 0x6020, 0x9086, 0x0006, 0x1904,
-	0x9403, 0x88ff, 0x0138, 0x2800, 0x9c06, 0x1904, 0x9403, 0x2039,
-	0x0000, 0x0050, 0x6010, 0x9b06, 0x1904, 0x9403, 0x85ff, 0x0120,
-	0x605c, 0x9106, 0x1904, 0x9403, 0x7030, 0x9c06, 0x15b0, 0x2069,
-	0x0100, 0x68c0, 0x9005, 0x1160, 0x6824, 0xd084, 0x0148, 0x6827,
-	0x0001, 0x080c, 0x821e, 0x080c, 0x948d, 0x7033, 0x0000, 0x0428,
-	0x080c, 0x821e, 0x6820, 0xd0b4, 0x0110, 0x68a7, 0x95f5, 0x6817,
-	0x0008, 0x68c3, 0x0000, 0x080c, 0x948d, 0x7033, 0x0000, 0x0036,
-	0x2069, 0x0140, 0x6b04, 0x9384, 0x1000, 0x0138, 0x2001, 0x0100,
-	0x080c, 0x2872, 0x9006, 0x080c, 0x2872, 0x2069, 0x0100, 0x6824,
-	0xd084, 0x0110, 0x6827, 0x0001, 0x003e, 0x7020, 0x9c36, 0x1110,
-	0x660c, 0x7622, 0x701c, 0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118,
-	0x2f00, 0x701e, 0x0010, 0x701f, 0x0000, 0x660c, 0x0066, 0x2c00,
-	0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x89ff, 0x1168, 0x600f,
-	0x0000, 0x6014, 0x0096, 0x2048, 0x080c, 0xb86e, 0x0110, 0x080c,
-	0xd267, 0x009e, 0x080c, 0x9c20, 0x080c, 0x9363, 0x88ff, 0x1190,
-	0x00ce, 0x0804, 0x937e, 0x2c78, 0x600c, 0x2060, 0x0804, 0x937e,
-	0x9006, 0x012e, 0x000e, 0x006e, 0x007e, 0x00ce, 0x00de, 0x00ee,
-	0x00fe, 0x0005, 0x601b, 0x0000, 0x00ce, 0x98c5, 0x0001, 0x0c88,
-	0x00f6, 0x00e6, 0x00d6, 0x0096, 0x00c6, 0x0066, 0x0026, 0x0006,
-	0x0126, 0x2091, 0x8000, 0x2071, 0x19bf, 0x7648, 0x2660, 0x2678,
-	0x8cff, 0x0904, 0x947c, 0x6020, 0x9086, 0x0006, 0x1904, 0x9477,
-	0x87ff, 0x0128, 0x2700, 0x9c06, 0x1904, 0x9477, 0x0040, 0x6010,
-	0x9b06, 0x15e8, 0x85ff, 0x0118, 0x605c, 0x9106, 0x15c0, 0x704c,
-	0x9c06, 0x1168, 0x0036, 0x2019, 0x0001, 0x080c, 0x929d, 0x703f,
-	0x0000, 0x9006, 0x704e, 0x706a, 0x7052, 0x706e, 0x003e, 0x7048,
-	0x9c36, 0x1110, 0x660c, 0x764a, 0x7044, 0x9c36, 0x1140, 0x2c00,
-	0x9f36, 0x0118, 0x2f00, 0x7046, 0x0010, 0x7047, 0x0000, 0x660c,
-	0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f,
-	0x0000, 0x6014, 0x2048, 0x080c, 0xb86e, 0x0110, 0x080c, 0xd267,
-	0x080c, 0x9c20, 0x87ff, 0x1198, 0x00ce, 0x0804, 0x9428, 0x2c78,
-	0x600c, 0x2060, 0x0804, 0x9428, 0x9006, 0x012e, 0x000e, 0x002e,
-	0x006e, 0x00ce, 0x009e, 0x00de, 0x00ee, 0x00fe, 0x0005, 0x601b,
-	0x0000, 0x00ce, 0x97bd, 0x0001, 0x0c80, 0x00e6, 0x2071, 0x19bf,
-	0x9006, 0x7032, 0x700a, 0x7004, 0x9086, 0x0003, 0x0158, 0x2001,
-	0x1800, 0x2004, 0x9086, 0x0002, 0x1118, 0x7007, 0x0005, 0x0010,
-	0x7007, 0x0000, 0x00ee, 0x0005, 0x00f6, 0x00e6, 0x00c6, 0x0066,
-	0x0026, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071, 0x19bf, 0x2c10,
-	0x7648, 0x2660, 0x2678, 0x8cff, 0x0540, 0x2200, 0x9c06, 0x1508,
-	0x7048, 0x9c36, 0x1110, 0x660c, 0x764a, 0x7044, 0x9c36, 0x1140,
-	0x2c00, 0x9f36, 0x0118, 0x2f00, 0x7046, 0x0010, 0x7047, 0x0000,
-	0x660c, 0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f,
-	0x0000, 0x6004, 0x9086, 0x0040, 0x090c, 0x8891, 0x9085, 0x0001,
-	0x0020, 0x2c78, 0x600c, 0x2060, 0x08b0, 0x012e, 0x000e, 0x002e,
-	0x006e, 0x00ce, 0x00ee, 0x00fe, 0x0005, 0x0096, 0x00f6, 0x00e6,
-	0x00d6, 0x00c6, 0x0066, 0x0026, 0x0006, 0x0126, 0x2091, 0x8000,
-	0x2071, 0x19bf, 0x7610, 0x2660, 0x2678, 0x8cff, 0x0904, 0x957a,
-	0x6010, 0x00b6, 0x2058, 0xb8a0, 0x00be, 0x9206, 0x1904, 0x9575,
-	0x7030, 0x9c06, 0x1520, 0x2069, 0x0100, 0x68c0, 0x9005, 0x0904,
-	0x954c, 0x080c, 0x8fd0, 0x68c3, 0x0000, 0x080c, 0x948d, 0x7033,
-	0x0000, 0x0036, 0x2069, 0x0140, 0x6b04, 0x9384, 0x1000, 0x0138,
-	0x2001, 0x0100, 0x080c, 0x2872, 0x9006, 0x080c, 0x2872, 0x2069,
-	0x0100, 0x6824, 0xd084, 0x0110, 0x6827, 0x0001, 0x003e, 0x7010,
-	0x9c36, 0x1110, 0x660c, 0x7612, 0x700c, 0x9c36, 0x1140, 0x2c00,
-	0x9f36, 0x0118, 0x2f00, 0x700e, 0x0010, 0x700f, 0x0000, 0x660c,
-	0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f,
-	0x0000, 0x080c, 0xba74, 0x1180, 0x080c, 0x305d, 0x080c, 0xba85,
-	0x1518, 0x080c, 0xa59c, 0x0400, 0x080c, 0x948d, 0x6824, 0xd084,
-	0x09b0, 0x6827, 0x0001, 0x0898, 0x080c, 0xba85, 0x1118, 0x080c,
-	0xa59c, 0x0090, 0x6014, 0x2048, 0x080c, 0xb86e, 0x0168, 0x6020,
-	0x9086, 0x0003, 0x1508, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000,
-	0x080c, 0x69a9, 0x080c, 0xba5f, 0x080c, 0xbd01, 0x080c, 0x9c20,
-	0x080c, 0x9363, 0x00ce, 0x0804, 0x94f5, 0x2c78, 0x600c, 0x2060,
-	0x0804, 0x94f5, 0x012e, 0x000e, 0x002e, 0x006e, 0x00ce, 0x00de,
-	0x00ee, 0x00fe, 0x009e, 0x0005, 0x6020, 0x9086, 0x0006, 0x1d20,
-	0x080c, 0xd267, 0x0c08, 0x00d6, 0x080c, 0x8d84, 0x7003, 0x0200,
-	0x7007, 0x0014, 0x60c3, 0x0014, 0x20e1, 0x0001, 0x2099, 0x1961,
-	0x20e9, 0x0000, 0x20a1, 0x0250, 0x20a9, 0x0004, 0x4003, 0x7023,
-	0x0004, 0x7027, 0x7878, 0x080c, 0x8fa0, 0x00de, 0x0005, 0x080c,
-	0x8d84, 0x700b, 0x0800, 0x7814, 0x9084, 0xff00, 0x700e, 0x7814,
-	0x9084, 0x00ff, 0x7022, 0x782c, 0x7026, 0x7860, 0x9084, 0x00ff,
-	0x9085, 0x0200, 0x7002, 0x7860, 0x9084, 0xff00, 0x8007, 0x7006,
-	0x60c2, 0x0804, 0x8fa0, 0x00b6, 0x00d6, 0x0016, 0x00d6, 0x2f68,
-	0x2009, 0x0035, 0x080c, 0xbf07, 0x00de, 0x1904, 0x9628, 0x080c,
-	0x8d39, 0x7003, 0x1300, 0x782c, 0x080c, 0x9737, 0x2068, 0x6820,
-	0x9086, 0x0003, 0x0560, 0x7810, 0x2058, 0xbaa0, 0x080c, 0x9b65,
-	0x11d8, 0x9286, 0x007e, 0x1128, 0x700b, 0x00ff, 0x700f, 0xfffe,
-	0x0498, 0x9286, 0x007f, 0x1128, 0x700b, 0x00ff, 0x700f, 0xfffd,
-	0x0458, 0x9284, 0xff80, 0x0180, 0x9286, 0x0080, 0x1128, 0x700b,
-	0x00ff, 0x700f, 0xfffc, 0x0400, 0x92d8, 0x1000, 0x2b5c, 0xb810,
-	0x700a, 0xb814, 0x700e, 0x00c0, 0xb884, 0x700e, 0x00a8, 0x080c,
-	0x9b65, 0x1130, 0x7810, 0x2058, 0xb8a0, 0x9082, 0x007e, 0x0250,
-	0x00d6, 0x2069, 0x181e, 0x2d04, 0x700a, 0x8d68, 0x2d04, 0x700e,
-	0x00de, 0x0010, 0x6034, 0x700e, 0x7838, 0x7012, 0x783c, 0x7016,
-	0x60c3, 0x000c, 0x001e, 0x00de, 0x080c, 0x8fa0, 0x00be, 0x0005,
-	0x781b, 0x0001, 0x7803, 0x0006, 0x001e, 0x00de, 0x00be, 0x0005,
-	0x792c, 0x9180, 0x0008, 0x200c, 0x9186, 0x0006, 0x01c0, 0x9186,
-	0x0003, 0x0904, 0x96a7, 0x9186, 0x0005, 0x0904, 0x968f, 0x9186,
-	0x0004, 0x05f0, 0x9186, 0x0008, 0x0904, 0x9698, 0x7807, 0x0037,
-	0x782f, 0x0003, 0x7817, 0x1700, 0x080c, 0x9714, 0x0005, 0x080c,
-	0x96d5, 0x00d6, 0x0026, 0x792c, 0x2168, 0x2009, 0x4000, 0x6800,
-	0x6a44, 0xd2fc, 0x11f8, 0x0002, 0x966f, 0x967a, 0x9671, 0x967a,
-	0x9676, 0x966f, 0x966f, 0x967a, 0x967a, 0x967a, 0x967a, 0x966f,
-	0x966f, 0x966f, 0x966f, 0x966f, 0x967a, 0x966f, 0x967a, 0x080c,
-	0x0d65, 0x6824, 0xd0e4, 0x0110, 0xd0cc, 0x0110, 0x900e, 0x0010,
-	0x2009, 0x2000, 0x682c, 0x7022, 0x6830, 0x7026, 0x0804, 0x96ce,
-	0x080c, 0x96d5, 0x00d6, 0x0026, 0x792c, 0x2168, 0x2009, 0x4000,
-	0x6a00, 0x9286, 0x0002, 0x1108, 0x900e, 0x0804, 0x96ce, 0x080c,
-	0x96d5, 0x00d6, 0x0026, 0x792c, 0x2168, 0x2009, 0x4000, 0x04b0,
-	0x04e1, 0x00d6, 0x0026, 0x792c, 0x2168, 0x2009, 0x4000, 0x9286,
-	0x0005, 0x0118, 0x9286, 0x0002, 0x1108, 0x900e, 0x0438, 0x0469,
-	0x00d6, 0x0026, 0x792c, 0x2168, 0x6814, 0x6924, 0xc185, 0x6926,
-	0x0096, 0x2048, 0xa9ac, 0xa834, 0x9112, 0xa9b0, 0xa838, 0x009e,
-	0x9103, 0x7022, 0x7226, 0x792c, 0x9180, 0x0011, 0x2004, 0xd0fc,
-	0x1148, 0x9180, 0x0000, 0x2004, 0x908e, 0x0002, 0x0130, 0x908e,
-	0x0004, 0x0118, 0x2009, 0x4000, 0x0008, 0x900e, 0x712a, 0x60c3,
-	0x0018, 0x002e, 0x00de, 0x0804, 0x8fa0, 0x00b6, 0x0036, 0x0046,
-	0x0056, 0x0066, 0x080c, 0x8d84, 0x9006, 0x7003, 0x0200, 0x7938,
-	0x710a, 0x793c, 0x710e, 0x7810, 0x2058, 0xb8a0, 0x080c, 0x9b65,
-	0x1118, 0x9092, 0x007e, 0x0268, 0x00d6, 0x2069, 0x181e, 0x2d2c,
-	0x8d68, 0x2d34, 0x90d8, 0x1000, 0x2b5c, 0xbb10, 0xbc14, 0x00de,
-	0x0028, 0x901e, 0xbc84, 0x2029, 0x0000, 0x6634, 0x782c, 0x9080,
-	0x0008, 0x2004, 0x9086, 0x0003, 0x1128, 0x7512, 0x7616, 0x731a,
-	0x741e, 0x0020, 0x7312, 0x7416, 0x751a, 0x761e, 0x006e, 0x005e,
-	0x004e, 0x003e, 0x00be, 0x0005, 0x080c, 0x8d84, 0x7003, 0x0100,
-	0x782c, 0x700a, 0x7814, 0x700e, 0x700e, 0x60c3, 0x0008, 0x0804,
-	0x8fa0, 0x080c, 0x8d30, 0x7003, 0x1400, 0x7838, 0x700a, 0x0079,
-	0x783c, 0x700e, 0x782c, 0x7012, 0x7830, 0x7016, 0x7834, 0x9084,
-	0x00ff, 0x8007, 0x701a, 0x60c3, 0x0010, 0x0804, 0x8fa0, 0x00e6,
-	0x2071, 0x0240, 0x0006, 0x00f6, 0x2078, 0x7810, 0x00b6, 0x2058,
-	0xb8c4, 0xd084, 0x0120, 0x7850, 0x702a, 0x784c, 0x702e, 0x00be,
-	0x00fe, 0x000e, 0x00ee, 0x0005, 0x080c, 0x8d7b, 0x7003, 0x0100,
-	0x782c, 0x700a, 0x7814, 0x700e, 0x60c3, 0x0008, 0x0804, 0x8fa0,
-	0x00a9, 0x7914, 0x712a, 0x60c3, 0x0000, 0x60a7, 0x9575, 0x0026,
-	0x080c, 0x27dd, 0x0228, 0x2011, 0x0101, 0x2204, 0xc0c5, 0x2012,
-	0x002e, 0x080c, 0x8fc3, 0x080c, 0x8215, 0x0005, 0x0036, 0x0096,
-	0x00d6, 0x00e6, 0x7860, 0x2048, 0xaa7c, 0x9296, 0x00c0, 0x9294,
-	0xfffd, 0xaa7e, 0xaa80, 0x9294, 0x0300, 0xaa82, 0xa96c, 0x9194,
-	0x00ff, 0xab74, 0x9384, 0x00ff, 0x908d, 0xc200, 0xa96e, 0x9384,
-	0xff00, 0x9215, 0xaa76, 0xa870, 0xaa78, 0xa87a, 0xaa72, 0x00d6,
-	0x2069, 0x0200, 0x080c, 0x97f4, 0x00de, 0x20e9, 0x0000, 0x20a1,
-	0x0240, 0x20a9, 0x000a, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x001b,
-	0x2098, 0x4003, 0x60a3, 0x0035, 0xaa68, 0x9294, 0x7000, 0x9286,
-	0x3000, 0x0110, 0x60a3, 0x0037, 0x00ee, 0x00de, 0x009e, 0x003e,
-	0x0005, 0x900e, 0x7814, 0x0096, 0x2048, 0xa87c, 0xd0fc, 0x01c0,
-	0x9084, 0x0003, 0x11a8, 0x2001, 0x180c, 0x2004, 0xd0bc, 0x0180,
-	0x7824, 0xd0cc, 0x1168, 0xd0c4, 0x1158, 0xa8a8, 0x9005, 0x1140,
-	0x2001, 0x180c, 0x200c, 0xc1d5, 0x2102, 0x2009, 0x198a, 0x210c,
-	0x009e, 0x918d, 0x0092, 0x0010, 0x2009, 0x0096, 0x60ab, 0x0036,
-	0x0026, 0x2110, 0x900e, 0x080c, 0x28bb, 0x002e, 0x0005, 0x2009,
-	0x0009, 0x00a0, 0x2009, 0x000a, 0x0088, 0x2009, 0x000b, 0x0070,
-	0x2009, 0x000c, 0x0058, 0x2009, 0x000d, 0x0040, 0x2009, 0x000e,
-	0x0028, 0x2009, 0x000f, 0x0010, 0x2009, 0x0008, 0x6912, 0x0005,
-	0x00d6, 0x9290, 0x0018, 0x8214, 0x20e9, 0x0000, 0x2069, 0x0200,
-	0x6813, 0x0000, 0x22a8, 0x9284, 0x00e0, 0x0128, 0x20a9, 0x0020,
-	0x9292, 0x0020, 0x0008, 0x9016, 0x20a1, 0x0240, 0x9006, 0x4004,
-	0x82ff, 0x0120, 0x6810, 0x8000, 0x6812, 0x0c60, 0x00de, 0x0005,
-	0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x00a6, 0x0096, 0x0066, 0x0126,
-	0x2091, 0x8000, 0x2071, 0x19bf, 0x7610, 0x2660, 0x2678, 0x8cff,
-	0x0904, 0x98a4, 0x7030, 0x9c06, 0x1520, 0x2069, 0x0100, 0x68c0,
-	0x9005, 0x0904, 0x9876, 0x080c, 0x8fd0, 0x68c3, 0x0000, 0x080c,
-	0x948d, 0x7033, 0x0000, 0x0036, 0x2069, 0x0140, 0x6b04, 0x9384,
-	0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2872, 0x9006, 0x080c,
-	0x2872, 0x2069, 0x0100, 0x6824, 0xd084, 0x0110, 0x6827, 0x0001,
-	0x003e, 0x7010, 0x9c36, 0x1110, 0x660c, 0x7612, 0x700c, 0x9c36,
-	0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00, 0x700e, 0x0010, 0x700f,
-	0x0000, 0x660c, 0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008,
-	0x2678, 0x600f, 0x0000, 0x080c, 0xba74, 0x1180, 0x080c, 0x305d,
-	0x080c, 0xba85, 0x1518, 0x080c, 0xa59c, 0x0400, 0x080c, 0x948d,
-	0x6824, 0xd084, 0x09b0, 0x6827, 0x0001, 0x0898, 0x080c, 0xba85,
-	0x1118, 0x080c, 0xa59c, 0x0090, 0x6014, 0x2048, 0x080c, 0xb86e,
-	0x0168, 0x6020, 0x9086, 0x0003, 0x1520, 0xa867, 0x0103, 0xab7a,
-	0xa877, 0x0000, 0x080c, 0x69b5, 0x080c, 0xba5f, 0x080c, 0xbd01,
-	0x080c, 0x9c20, 0x080c, 0x9363, 0x00ce, 0x0804, 0x9827, 0x2c78,
-	0x600c, 0x2060, 0x0804, 0x9827, 0x7013, 0x0000, 0x700f, 0x0000,
-	0x012e, 0x006e, 0x009e, 0x00ae, 0x00ce, 0x00de, 0x00ee, 0x00fe,
-	0x0005, 0x6020, 0x9086, 0x0006, 0x1d08, 0x080c, 0xd267, 0x08f0,
-	0x00f6, 0x0036, 0x2079, 0x0380, 0x7b18, 0xd3bc, 0x1de8, 0x7832,
-	0x7936, 0x7a3a, 0x781b, 0x8080, 0x003e, 0x00fe, 0x0005, 0x0016,
-	0x2001, 0x0382, 0x2004, 0x9084, 0x0007, 0x9086, 0x0001, 0x1188,
-	0x2001, 0x0015, 0x0c29, 0x2009, 0x1000, 0x2001, 0x0382, 0x2004,
-	0x9084, 0x0007, 0x9086, 0x0003, 0x0120, 0x8109, 0x1db0, 0x080c,
-	0x0d65, 0x001e, 0x0005, 0x2001, 0x0382, 0x2004, 0x9084, 0x0007,
-	0x9086, 0x0003, 0x1120, 0x2001, 0x0380, 0x2003, 0x0001, 0x0005,
-	0x0156, 0x0016, 0x0026, 0x00e6, 0x900e, 0x2071, 0x19bf, 0x0469,
-	0x0106, 0x0190, 0x7004, 0x9086, 0x0003, 0x0148, 0x20a9, 0x1000,
-	0x6044, 0xd0fc, 0x01d8, 0x1f04, 0x9900, 0x080c, 0x0d65, 0x080c,
-	0x98c7, 0x6044, 0xd0fc, 0x0190, 0x7030, 0x9c06, 0x1148, 0x080c,
-	0x8891, 0x6044, 0xd0dc, 0x0150, 0xc0dc, 0x6046, 0x700a, 0x7042,
-	0x704c, 0x9c06, 0x190c, 0x0d65, 0x080c, 0x88ec, 0x010e, 0x1919,
-	0x00ee, 0x002e, 0x001e, 0x015e, 0x0005, 0x2001, 0x0382, 0x2004,
-	0x9084, 0x0007, 0x9086, 0x0003, 0x0005, 0x0126, 0x2091, 0x2400,
-	0x7808, 0xd0a4, 0x190c, 0x0d5e, 0xd09c, 0x0128, 0x7820, 0x908c,
-	0xf000, 0x11b8, 0x0012, 0x012e, 0x0005, 0x994d, 0x998b, 0x99b2,
-	0x99e2, 0x99f2, 0x9a03, 0x9a12, 0x9a20, 0x9a31, 0x9a35, 0x994d,
-	0x994d, 0x994d, 0x994d, 0x994d, 0x994d, 0x080c, 0x0d65, 0x012e,
-	0x0005, 0x2060, 0x6044, 0xd0bc, 0x0140, 0xc0bc, 0x6046, 0x6000,
-	0x908a, 0x0016, 0x1a0c, 0x0d65, 0x0012, 0x012e, 0x0005, 0x9972,
-	0x9974, 0x9972, 0x997a, 0x9972, 0x9972, 0x9972, 0x9972, 0x9972,
-	0x9974, 0x9972, 0x9974, 0x9972, 0x9974, 0x9972, 0x9972, 0x9972,
-	0x9974, 0x9972, 0x080c, 0x0d65, 0x2009, 0x0013, 0x080c, 0x9c82,
-	0x012e, 0x0005, 0x6014, 0x2048, 0xa87c, 0xd0dc, 0x0130, 0x080c,
-	0x83d6, 0x080c, 0x9be6, 0x012e, 0x0005, 0x2009, 0x0049, 0x080c,
-	0x9c82, 0x012e, 0x0005, 0x080c, 0x98c7, 0x2001, 0x19e4, 0x2003,
-	0x0000, 0x7030, 0x9065, 0x090c, 0x0d65, 0x7034, 0x9092, 0x00c8,
-	0x1258, 0x8000, 0x7036, 0x7004, 0x9086, 0x0003, 0x0110, 0x7007,
-	0x0000, 0x781f, 0x0808, 0x0040, 0x080c, 0xd659, 0x6003, 0x0001,
-	0x2009, 0x0014, 0x080c, 0x9c82, 0x781f, 0x0100, 0x080c, 0x98e3,
-	0x012e, 0x0005, 0x080c, 0x98c7, 0x714c, 0x81ff, 0x1128, 0x2011,
-	0x19e7, 0x2013, 0x0000, 0x0400, 0x2061, 0x0100, 0x7150, 0x9192,
-	0x7530, 0x12b8, 0x8108, 0x7152, 0x714c, 0x9188, 0x0008, 0x210c,
-	0x918e, 0x0006, 0x1138, 0x6014, 0x9084, 0x1984, 0x9085, 0x0012,
-	0x6016, 0x0050, 0x6014, 0x9084, 0x1984, 0x9085, 0x0016, 0x6016,
-	0x0018, 0x706c, 0xc085, 0x706e, 0x781f, 0x0200, 0x080c, 0x98e3,
-	0x012e, 0x0005, 0x080c, 0x98c7, 0x714c, 0x2160, 0x6003, 0x0003,
-	0x2009, 0x004a, 0x080c, 0x9c82, 0x781f, 0x0200, 0x080c, 0x98e3,
-	0x012e, 0x0005, 0x7808, 0xd09c, 0x0de8, 0x7820, 0x2060, 0x6003,
-	0x0003, 0x080c, 0x98c7, 0x080c, 0x1c27, 0x781f, 0x0400, 0x080c,
-	0x98e3, 0x012e, 0x0005, 0x7808, 0xd09c, 0x0de8, 0x7820, 0x2060,
-	0x080c, 0x98c7, 0x080c, 0x1c6f, 0x781f, 0x0400, 0x080c, 0x98e3,
-	0x012e, 0x0005, 0x7030, 0x9065, 0x0148, 0x6044, 0xc0bc, 0x6046,
-	0x7104, 0x9186, 0x0003, 0x0110, 0x080c, 0x8950, 0x012e, 0x0005,
-	0x00f6, 0x703c, 0x9086, 0x0002, 0x0148, 0x704c, 0x907d, 0x0130,
-	0x7844, 0xc0bc, 0x7846, 0x080c, 0x8efa, 0x0000, 0x00fe, 0x012e,
-	0x0005, 0x080c, 0x715f, 0x012e, 0x0005, 0x080c, 0x0d65, 0x0005,
-	0x00e6, 0x2071, 0x19bf, 0x6044, 0xc0bc, 0x6046, 0xd0fc, 0x01b8,
-	0x704c, 0x9c06, 0x1190, 0x2019, 0x0001, 0x080c, 0x929d, 0x704f,
-	0x0000, 0x2001, 0x0109, 0x2004, 0xd08c, 0x1138, 0x2001, 0x0108,
-	0x2004, 0xd0bc, 0x1110, 0x703f, 0x0000, 0x080c, 0x94a4, 0x00ee,
-	0x0005, 0x0026, 0x7010, 0x9c06, 0x1178, 0x080c, 0x9363, 0x6044,
-	0xc0fc, 0x6046, 0x600c, 0x9015, 0x0120, 0x7212, 0x600f, 0x0000,
-	0x0010, 0x7212, 0x720e, 0x9006, 0x002e, 0x0005, 0x0026, 0x7020,
-	0x9c06, 0x1178, 0x080c, 0x9363, 0x6044, 0xc0fc, 0x6046, 0x600c,
-	0x9015, 0x0120, 0x7222, 0x600f, 0x0000, 0x0010, 0x7222, 0x721e,
-	0x9006, 0x002e, 0x0005, 0x00d6, 0x0036, 0x7830, 0x9c06, 0x1558,
-	0x2069, 0x0100, 0x68c0, 0x9005, 0x01f8, 0x080c, 0x821e, 0x080c,
-	0x8fd0, 0x68c3, 0x0000, 0x080c, 0x948d, 0x2069, 0x0140, 0x6b04,
-	0x9384, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2872, 0x9006,
-	0x080c, 0x2872, 0x2069, 0x0100, 0x6824, 0xd084, 0x0110, 0x6827,
-	0x0001, 0x9085, 0x0001, 0x0038, 0x7808, 0xc0ad, 0x780a, 0x6003,
-	0x0009, 0x630a, 0x9006, 0x003e, 0x00de, 0x0005, 0x0016, 0x0026,
-	0x0036, 0x6100, 0x2019, 0x0100, 0x2001, 0x0382, 0x2004, 0xd09c,
-	0x0190, 0x00c6, 0x0126, 0x2091, 0x2800, 0x0016, 0x0036, 0x080c,
-	0x992d, 0x003e, 0x001e, 0x012e, 0x00ce, 0x6200, 0x2200, 0x9106,
-	0x0d58, 0x2200, 0x0010, 0x8319, 0x1d38, 0x003e, 0x002e, 0x001e,
-	0x0005, 0x00d6, 0x0156, 0x080c, 0x8d84, 0x7a14, 0x82ff, 0x0138,
-	0x7003, 0x0100, 0x700b, 0x0003, 0x60c3, 0x0008, 0x0490, 0x7003,
-	0x0200, 0x7007, 0x0000, 0x2069, 0x1800, 0x901e, 0x6800, 0x9086,
-	0x0004, 0x1110, 0xc38d, 0x0060, 0x080c, 0x70ba, 0x1110, 0xc3ad,
-	0x0008, 0xc3a5, 0x6ad8, 0xd29c, 0x1110, 0xd2ac, 0x0108, 0xc39d,
-	0x730e, 0x2011, 0x1848, 0x63f0, 0x2312, 0x20a9, 0x0006, 0x2011,
-	0x1840, 0x2019, 0x1841, 0x2071, 0x0250, 0x2376, 0x8e70, 0x2276,
-	0x8e70, 0x9398, 0x0002, 0x9290, 0x0002, 0x1f04, 0x9b0d, 0x60c3,
-	0x0020, 0x080c, 0x8fa0, 0x015e, 0x00de, 0x0005, 0x0156, 0x080c,
-	0x8d84, 0x7a14, 0x82ff, 0x0168, 0x9286, 0xffff, 0x0118, 0x9282,
-	0x000e, 0x1238, 0x7003, 0x0100, 0x700b, 0x0003, 0x60c3, 0x0008,
-	0x0488, 0x7003, 0x0200, 0x7007, 0x001c, 0x700f, 0x0001, 0x2011,
-	0x1995, 0x2204, 0x8007, 0x701a, 0x8210, 0x2204, 0x8007, 0x701e,
-	0x0421, 0x1120, 0xb8a0, 0x9082, 0x007f, 0x0248, 0x2001, 0x181e,
-	0x2004, 0x7022, 0x2001, 0x181f, 0x2004, 0x7026, 0x0030, 0x2001,
-	0x1817, 0x2004, 0x9084, 0x00ff, 0x7026, 0x20a9, 0x0004, 0x20e1,
-	0x0001, 0x2099, 0x1805, 0x20e9, 0x0000, 0x20a1, 0x0256, 0x4003,
-	0x60c3, 0x001c, 0x015e, 0x0804, 0x8fa0, 0x0006, 0x2001, 0x1836,
-	0x2004, 0xd0ac, 0x000e, 0x0005, 0x2011, 0x0003, 0x080c, 0x9324,
-	0x2011, 0x0002, 0x080c, 0x932e, 0x080c, 0x921d, 0x0036, 0x901e,
-	0x080c, 0x929d, 0x003e, 0x0005, 0x2071, 0x188b, 0x7000, 0x9005,
-	0x0140, 0x2001, 0x0812, 0x2071, 0x1800, 0x7072, 0x7076, 0x7067,
-	0xffd4, 0x2071, 0x1800, 0x7070, 0x7052, 0x7057, 0x1ddc, 0x0005,
-	0x00e6, 0x0126, 0x2071, 0x1800, 0x2091, 0x8000, 0x7550, 0x9582,
-	0x0010, 0x0608, 0x7054, 0x2060, 0x6000, 0x9086, 0x0000, 0x0148,
-	0x9ce0, 0x001c, 0x7064, 0x9c02, 0x1208, 0x0cb0, 0x2061, 0x1ddc,
-	0x0c98, 0x6003, 0x0008, 0x8529, 0x7552, 0x9ca8, 0x001c, 0x7064,
-	0x9502, 0x1230, 0x7556, 0x9085, 0x0001, 0x012e, 0x00ee, 0x0005,
-	0x7057, 0x1ddc, 0x0cc0, 0x9006, 0x0cc0, 0x00e6, 0x2071, 0x1800,
-	0x7550, 0x9582, 0x0010, 0x0600, 0x7054, 0x2060, 0x6000, 0x9086,
-	0x0000, 0x0148, 0x9ce0, 0x001c, 0x7064, 0x9c02, 0x1208, 0x0cb0,
-	0x2061, 0x1ddc, 0x0c98, 0x6003, 0x0008, 0x8529, 0x7552, 0x9ca8,
-	0x001c, 0x7064, 0x9502, 0x1228, 0x7556, 0x9085, 0x0001, 0x00ee,
-	0x0005, 0x7057, 0x1ddc, 0x0cc8, 0x9006, 0x0cc8, 0x9c82, 0x1ddc,
-	0x0a0c, 0x0d65, 0x2001, 0x1819, 0x2004, 0x9c02, 0x1a0c, 0x0d65,
-	0x9006, 0x6006, 0x600a, 0x600e, 0x6016, 0x601a, 0x6012, 0x6023,
-	0x0000, 0x6003, 0x0000, 0x601e, 0x605e, 0x6062, 0x6026, 0x602a,
-	0x602e, 0x6032, 0x6036, 0x603a, 0x603e, 0x604a, 0x6046, 0x6042,
-	0x2061, 0x1800, 0x6050, 0x8000, 0x6052, 0x0005, 0x9006, 0x600e,
-	0x6016, 0x601a, 0x6012, 0x6022, 0x6002, 0x601e, 0x605e, 0x6062,
-	0x604a, 0x6046, 0x2061, 0x1800, 0x6050, 0x8000, 0x6052, 0x0005,
-	0x0006, 0x6000, 0x9086, 0x0000, 0x01d0, 0x601c, 0xd084, 0x190c,
-	0x193e, 0x6023, 0x0007, 0x2001, 0x195e, 0x2004, 0x0006, 0x9082,
-	0x0051, 0x000e, 0x0208, 0x8004, 0x601a, 0x080c, 0xd517, 0x604b,
-	0x0000, 0x6044, 0xd0fc, 0x1129, 0x9006, 0x6046, 0x6016, 0x000e,
-	0x0005, 0x080c, 0x98c7, 0x0106, 0x2001, 0x19d2, 0x2004, 0x9c06,
-	0x1130, 0x0036, 0x2019, 0x0001, 0x080c, 0x929d, 0x003e, 0x080c,
-	0x94a4, 0x010e, 0x090c, 0x98e3, 0x0005, 0x00e6, 0x0126, 0x2071,
-	0x1800, 0x2091, 0x8000, 0x7550, 0x9582, 0x0001, 0x0608, 0x7054,
-	0x2060, 0x6000, 0x9086, 0x0000, 0x0148, 0x9ce0, 0x001c, 0x7064,
-	0x9c02, 0x1208, 0x0cb0, 0x2061, 0x1ddc, 0x0c98, 0x6003, 0x0008,
-	0x8529, 0x7552, 0x9ca8, 0x001c, 0x7064, 0x9502, 0x1230, 0x7556,
-	0x9085, 0x0001, 0x012e, 0x00ee, 0x0005, 0x7057, 0x1ddc, 0x0cc0,
-	0x9006, 0x0cc0, 0x6020, 0x9084, 0x000f, 0x0002, 0x9c96, 0x9ca0,
-	0x9cbb, 0x9cd6, 0xbfe2, 0xbfff, 0xc01a, 0x9c96, 0x9ca0, 0x9c96,
-	0x9cf2, 0x9c96, 0x9c96, 0x9c96, 0x9c96, 0x9c96, 0x9186, 0x0013,
-	0x1130, 0x6044, 0xd0fc, 0x0110, 0x080c, 0x8891, 0x0005, 0x0005,
-	0x0066, 0x6000, 0x90b2, 0x0016, 0x1a0c, 0x0d65, 0x0013, 0x006e,
-	0x0005, 0x9cb9, 0xa40f, 0xa5e3, 0x9cb9, 0xa671, 0x9fbb, 0x9cb9,
-	0x9cb9, 0xa391, 0xac18, 0x9cb9, 0x9cb9, 0x9cb9, 0x9cb9, 0x9cb9,
-	0x9cb9, 0x080c, 0x0d65, 0x0066, 0x6000, 0x90b2, 0x0016, 0x1a0c,
-	0x0d65, 0x0013, 0x006e, 0x0005, 0x9cd4, 0xb220, 0x9cd4, 0x9cd4,
-	0x9cd4, 0x9cd4, 0x9cd4, 0x9cd4, 0xb1c2, 0xb3a3, 0x9cd4, 0xb25d,
-	0xb2e1, 0xb25d, 0xb2e1, 0x9cd4, 0x080c, 0x0d65, 0x6000, 0x9082,
-	0x0016, 0x1a0c, 0x0d65, 0x6000, 0x0002, 0x9cf0, 0xac62, 0xacf9,
-	0xae79, 0xaee8, 0x9cf0, 0x9cf0, 0x9cf0, 0xac31, 0xb143, 0xb146,
-	0x9cf0, 0x9cf0, 0x9cf0, 0x9cf0, 0xb176, 0x9cf0, 0x9cf0, 0x9cf0,
-	0x080c, 0x0d65, 0x0066, 0x6000, 0x90b2, 0x0016, 0x1a0c, 0x0d65,
-	0x0013, 0x006e, 0x0005, 0x9d0b, 0x9d0b, 0x9d49, 0x9de8, 0x9e68,
-	0x9d0b, 0x9d0b, 0x9d0b, 0x9d0d, 0x9d0b, 0x9d0b, 0x9d0b, 0x9d0b,
-	0x9d0b, 0x9d0b, 0x9d0b, 0x080c, 0x0d65, 0x9186, 0x004c, 0x0560,
-	0x9186, 0x0003, 0x190c, 0x0d65, 0x0096, 0x601c, 0xc0ed, 0x601e,
-	0x6003, 0x0003, 0x6106, 0x6014, 0x2048, 0xa87c, 0x9084, 0xa000,
-	0xc0b5, 0xa87e, 0xa8ac, 0xa836, 0xa8b0, 0xa83a, 0x9006, 0xa846,
-	0xa84a, 0xa884, 0x9092, 0x199a, 0x0210, 0x2001, 0x1999, 0x8003,
-	0x8013, 0x8213, 0x9210, 0x621a, 0x009e, 0x080c, 0x1a89, 0x2009,
-	0x8030, 0x080c, 0x852e, 0x0005, 0x6010, 0x00b6, 0x2058, 0xbca0,
-	0x00be, 0x2c00, 0x080c, 0x9e8a, 0x080c, 0xbfa7, 0x6003, 0x0007,
-	0x0005, 0x00d6, 0x0096, 0x00f6, 0x2079, 0x1800, 0x7a8c, 0x6014,
-	0x2048, 0xa87c, 0xd0ec, 0x1110, 0x9290, 0x0018, 0xac78, 0xc4fc,
-	0x0046, 0xa8e0, 0x9005, 0x1140, 0xa8dc, 0x921a, 0x0140, 0x0220,
-	0xa87b, 0x0007, 0x2010, 0x0028, 0xa87b, 0x0015, 0x0010, 0xa87b,
-	0x0000, 0x8214, 0xa883, 0x0000, 0xaa02, 0x0006, 0x0016, 0x0026,
-	0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x2400, 0x9005, 0x1108, 0x009a,
-	0x2100, 0x9086, 0x0015, 0x1118, 0x2001, 0x0001, 0x0038, 0x2100,
-	0x9086, 0x0016, 0x0118, 0x2001, 0x0001, 0x002a, 0x94a4, 0x0007,
-	0x8423, 0x9405, 0x0002, 0x9db0, 0x9db0, 0x9dab, 0x9dae, 0x9db0,
-	0x9da8, 0x9d9b, 0x9d9b, 0x9d9b, 0x9d9b, 0x9d9b, 0x9d9b, 0x9d9b,
-	0x9d9b, 0x9d9b, 0x9d9b, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x002e,
-	0x001e, 0x000e, 0x004e, 0x00fe, 0x009e, 0x00de, 0x080c, 0x0d65,
-	0x080c, 0xa854, 0x0028, 0x080c, 0xa977, 0x0010, 0x080c, 0xaa66,
-	0x00fe, 0x00ee, 0x00de, 0x00ce, 0x002e, 0x001e, 0x2c00, 0xa896,
-	0x000e, 0x080c, 0x9f48, 0x0530, 0xa804, 0xa80e, 0x00a6, 0x2050,
-	0xb100, 0x00ae, 0x8006, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084,
-	0xffc0, 0x9080, 0x0002, 0xaacc, 0xabd0, 0xacd4, 0xadd8, 0x2031,
-	0x0000, 0x2041, 0x1298, 0x080c, 0xa0f3, 0x0160, 0x000e, 0x9005,
-	0x0120, 0x00fe, 0x009e, 0x00de, 0x0005, 0x00fe, 0x009e, 0x00de,
-	0x0804, 0x9be6, 0x2001, 0x002c, 0x900e, 0x080c, 0x9fae, 0x0c70,
-	0x91b6, 0x0015, 0x0170, 0x91b6, 0x0016, 0x0158, 0x91b2, 0x0047,
-	0x0a0c, 0x0d65, 0x91b2, 0x0050, 0x1a0c, 0x0d65, 0x9182, 0x0047,
-	0x0042, 0x080c, 0x9ab6, 0x0120, 0x9086, 0x0002, 0x0904, 0x9d49,
-	0x0005, 0x9e0a, 0x9e0a, 0x9e0c, 0x9e3e, 0x9e0a, 0x9e0a, 0x9e0a,
-	0x9e0a, 0x9e51, 0x080c, 0x0d65, 0x00d6, 0x0016, 0x0096, 0x6003,
-	0x0004, 0x6114, 0x2148, 0xa87c, 0xd0fc, 0x01c0, 0xa878, 0xc0fc,
-	0x9005, 0x1158, 0xa894, 0x9005, 0x0140, 0x2001, 0x0000, 0x900e,
-	0x080c, 0x9fae, 0x080c, 0x9be6, 0x00a8, 0x6003, 0x0002, 0xa8a4,
-	0xa9a8, 0x9105, 0x1178, 0xa8ae, 0xa8b2, 0x0c78, 0xa87f, 0x0020,
-	0xa88c, 0xa88a, 0xa8a4, 0xa8ae, 0xa8a8, 0xa8b2, 0xa8c7, 0x0000,
-	0xa8cb, 0x0000, 0x009e, 0x001e, 0x00de, 0x0005, 0x080c, 0x88ec,
-	0x00d6, 0x0096, 0x6114, 0x2148, 0x080c, 0xb870, 0x0120, 0xa87b,
-	0x0006, 0x080c, 0x69b5, 0x009e, 0x00de, 0x080c, 0x9be6, 0x0804,
-	0x894f, 0x080c, 0x88ec, 0x080c, 0x302e, 0x080c, 0xbfa4, 0x00d6,
-	0x0096, 0x6114, 0x2148, 0x080c, 0xb870, 0x0120, 0xa87b, 0x0029,
-	0x080c, 0x69b5, 0x009e, 0x00de, 0x080c, 0x9be6, 0x0804, 0x894f,
-	0x9182, 0x0047, 0x0002, 0x9e78, 0x9e7a, 0x9e78, 0x9e78, 0x9e78,
-	0x9e78, 0x9e78, 0x9e78, 0x9e78, 0x9e78, 0x9e78, 0x9e78, 0x9e7a,
-	0x080c, 0x0d65, 0x00d6, 0x0096, 0x080c, 0x15af, 0x6114, 0x2148,
-	0xa87b, 0x0000, 0xa883, 0x0000, 0x080c, 0x69b5, 0x009e, 0x00de,
-	0x0804, 0x9be6, 0x0026, 0x0036, 0x0056, 0x0066, 0x0096, 0x00a6,
-	0x00f6, 0x0006, 0x080c, 0x102f, 0x000e, 0x090c, 0x0d65, 0xa960,
-	0x21e8, 0xa95c, 0x9188, 0x0019, 0x21a0, 0x900e, 0x20a9, 0x0020,
-	0x4104, 0xa87a, 0x2079, 0x1800, 0x798c, 0x9188, 0x0018, 0x918c,
-	0x0fff, 0xa972, 0xac76, 0x2950, 0x00a6, 0x2001, 0x0205, 0x2003,
-	0x0000, 0x901e, 0x2029, 0x0001, 0x9182, 0x0034, 0x1228, 0x2011,
-	0x001f, 0x080c, 0xb426, 0x04c0, 0x2130, 0x2009, 0x0034, 0x2011,
-	0x001f, 0x080c, 0xb426, 0x96b2, 0x0034, 0xb004, 0x904d, 0x0110,
-	0x080c, 0x0fe1, 0x080c, 0x102f, 0x01d0, 0x8528, 0xa867, 0x0110,
-	0xa86b, 0x0000, 0x2920, 0xb406, 0x968a, 0x003d, 0x1230, 0x2608,
-	0x2011, 0x001b, 0x080c, 0xb426, 0x00b8, 0x96b2, 0x003c, 0x2009,
-	0x003c, 0x2950, 0x2011, 0x001b, 0x080c, 0xb426, 0x0c18, 0x2001,
-	0x0205, 0x2003, 0x0000, 0x00ae, 0x852f, 0x95ad, 0x0050, 0xb566,
-	0xb070, 0xc0fd, 0xb072, 0x0048, 0x2001, 0x0205, 0x2003, 0x0000,
-	0x00ae, 0x852f, 0x95ad, 0x0050, 0xb566, 0x2a48, 0xa804, 0xa807,
-	0x0000, 0x0006, 0x080c, 0x69b5, 0x000e, 0x2048, 0x9005, 0x1db0,
-	0x00fe, 0x00ae, 0x009e, 0x006e, 0x005e, 0x003e, 0x002e, 0x0005,
-	0x00d6, 0x00f6, 0x0096, 0x0006, 0x080c, 0x102f, 0x000e, 0x090c,
-	0x0d65, 0xa960, 0x21e8, 0xa95c, 0x9188, 0x0019, 0x21a0, 0x900e,
-	0x20a9, 0x0020, 0x4104, 0xaa66, 0xa87a, 0x2079, 0x1800, 0x798c,
-	0x810c, 0x9188, 0x000c, 0x9182, 0x001a, 0x0210, 0x2009, 0x001a,
-	0x21a8, 0x810b, 0xa972, 0xac76, 0x2e98, 0xa85c, 0x9080, 0x001f,
-	0x20a0, 0x2001, 0x0205, 0x200c, 0x918d, 0x0080, 0x2102, 0x4003,
-	0x2003, 0x0000, 0x080c, 0x69b5, 0x009e, 0x00fe, 0x00de, 0x0005,
-	0x0016, 0x00d6, 0x00f6, 0x0096, 0x0016, 0x2001, 0x0205, 0x200c,
-	0x918d, 0x0080, 0x2102, 0x001e, 0x2079, 0x0200, 0x2e98, 0xa87c,
-	0xd0ec, 0x0118, 0x9e80, 0x000c, 0x2098, 0x2021, 0x003e, 0x901e,
-	0x9282, 0x0020, 0x0218, 0x2011, 0x0020, 0x2018, 0x9486, 0x003e,
-	0x1170, 0x0096, 0x080c, 0x102f, 0x2900, 0x009e, 0x05c0, 0xa806,
-	0x2048, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0002, 0x20a0, 0x3300,
-	0x908e, 0x0260, 0x0140, 0x2009, 0x0280, 0x9102, 0x920a, 0x0218,
-	0x2010, 0x2100, 0x9318, 0x2200, 0x9402, 0x1228, 0x2400, 0x9202,
-	0x2410, 0x9318, 0x9006, 0x2020, 0x22a8, 0xa800, 0x9200, 0xa802,
-	0x20e1, 0x0000, 0x4003, 0x83ff, 0x0180, 0x3300, 0x9086, 0x0280,
-	0x1130, 0x7814, 0x8000, 0x9085, 0x0080, 0x7816, 0x2e98, 0x2310,
-	0x84ff, 0x0904, 0x9f5d, 0x0804, 0x9f5f, 0x9085, 0x0001, 0x7817,
-	0x0000, 0x009e, 0x00fe, 0x00de, 0x001e, 0x0005, 0x00d6, 0x0036,
-	0x0096, 0x6314, 0x2348, 0xa87a, 0xa982, 0x080c, 0x69a9, 0x009e,
-	0x003e, 0x00de, 0x0005, 0x91b6, 0x0015, 0x1118, 0x080c, 0x9be6,
-	0x0030, 0x91b6, 0x0016, 0x190c, 0x0d65, 0x080c, 0x9be6, 0x0005,
-	0x20a9, 0x000e, 0x20e1, 0x0000, 0x2e98, 0x6014, 0x0096, 0x2048,
-	0xa860, 0x20e8, 0xa85c, 0x20a0, 0x009e, 0x4003, 0x0136, 0x9080,
-	0x001b, 0x20a0, 0x2011, 0x0006, 0x20a9, 0x0001, 0x3418, 0x8318,
-	0x23a0, 0x4003, 0x3318, 0x8318, 0x2398, 0x8211, 0x1db8, 0x2011,
-	0x0006, 0x013e, 0x20a0, 0x3318, 0x8318, 0x2398, 0x4003, 0x3418,
-	0x8318, 0x23a0, 0x8211, 0x1db8, 0x0096, 0x080c, 0xb870, 0x0130,
-	0x6014, 0x2048, 0xa807, 0x0000, 0xa867, 0x0103, 0x009e, 0x0804,
-	0x9be6, 0x0096, 0x00d6, 0x0036, 0x7330, 0x9386, 0x0200, 0x11a8,
-	0x6010, 0x00b6, 0x2058, 0xb8c7, 0x0000, 0x00be, 0x6014, 0x9005,
-	0x0130, 0x2048, 0xa807, 0x0000, 0xa867, 0x0103, 0xab32, 0x080c,
-	0x9be6, 0x003e, 0x00de, 0x009e, 0x0005, 0x0011, 0x1d48, 0x0cc8,
-	0x0006, 0x0016, 0x080c, 0xbf8f, 0x0188, 0x6014, 0x9005, 0x1170,
-	0x600b, 0x0003, 0x601b, 0x0000, 0x604b, 0x0000, 0x2009, 0x0022,
-	0x080c, 0xa3e7, 0x9006, 0x001e, 0x000e, 0x0005, 0x9085, 0x0001,
-	0x0cd0, 0x0096, 0x0016, 0x20a9, 0x0014, 0x9e80, 0x000c, 0x20e1,
-	0x0000, 0x2098, 0x6014, 0x2048, 0xa860, 0x20e8, 0xa85c, 0x9080,
-	0x0002, 0x20a0, 0x4003, 0x2001, 0x0205, 0x2003, 0x0001, 0x2099,
-	0x0260, 0x20a9, 0x0016, 0x4003, 0x20a9, 0x000a, 0xa804, 0x2048,
-	0xa860, 0x20e8, 0xa85c, 0x9080, 0x0002, 0x20a0, 0x4003, 0x2001,
-	0x0205, 0x2003, 0x0002, 0x2099, 0x0260, 0x20a9, 0x0020, 0x4003,
-	0x2003, 0x0000, 0x6014, 0x2048, 0xa800, 0x2048, 0xa867, 0x0103,
-	0x080c, 0x9be6, 0x001e, 0x009e, 0x0005, 0x0096, 0x0016, 0x900e,
-	0x7030, 0x9086, 0x0100, 0x0140, 0x7038, 0x9084, 0x00ff, 0x800c,
-	0x703c, 0x9084, 0x00ff, 0x8004, 0x9080, 0x0004, 0x9108, 0x810b,
-	0x2011, 0x0002, 0x2019, 0x000c, 0x6014, 0x2048, 0x080c, 0xb426,
-	0x080c, 0xb870, 0x0140, 0x6014, 0x2048, 0xa807, 0x0000, 0xa864,
-	0xa8e2, 0xa867, 0x0103, 0x080c, 0x9be6, 0x001e, 0x009e, 0x0005,
-	0x0016, 0x0096, 0x7030, 0x9086, 0x0100, 0x1118, 0x2009, 0x0004,
-	0x0010, 0x7034, 0x800c, 0x810b, 0x2011, 0x000c, 0x2019, 0x000c,
-	0x6014, 0x2048, 0xa804, 0x0096, 0x9005, 0x0108, 0x2048, 0x080c,
-	0xb426, 0x009e, 0x080c, 0xb870, 0x0148, 0xa804, 0x9005, 0x1158,
-	0xa807, 0x0000, 0xa864, 0xa8e2, 0xa867, 0x0103, 0x080c, 0x9be6,
-	0x009e, 0x001e, 0x0005, 0x0086, 0x2040, 0xa030, 0x8007, 0x9086,
-	0x0100, 0x1118, 0x080c, 0xa59c, 0x00e0, 0xa034, 0x8007, 0x800c,
-	0x8806, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080,
-	0x000c, 0xa87b, 0x0000, 0xa883, 0x0000, 0xa897, 0x4000, 0xaaa0,
-	0xab9c, 0xaca8, 0xada4, 0x2031, 0x0000, 0x2041, 0x127e, 0x0019,
-	0x0d08, 0x008e, 0x0898, 0x0096, 0x0006, 0x080c, 0x102f, 0x000e,
-	0x01b0, 0xa8ab, 0x0dcb, 0xa876, 0x000e, 0xa8a2, 0x0006, 0xae6a,
-	0x2800, 0xa89e, 0xa97a, 0xaf72, 0xaa8e, 0xab92, 0xac96, 0xad9a,
-	0x0086, 0x2940, 0x080c, 0x1124, 0x008e, 0x9085, 0x0001, 0x009e,
-	0x0005, 0x00e6, 0x00d6, 0x0026, 0x7008, 0x9084, 0x00ff, 0x6210,
-	0x00b6, 0x2258, 0xba10, 0x00be, 0x9206, 0x1520, 0x700c, 0x6210,
-	0x00b6, 0x2258, 0xba14, 0x00be, 0x9206, 0x11e0, 0x604b, 0x0000,
-	0x2c68, 0x0016, 0x2009, 0x0035, 0x080c, 0xbf07, 0x001e, 0x1158,
-	0x622c, 0x2268, 0x2071, 0x026c, 0x6b20, 0x9386, 0x0003, 0x0130,
-	0x9386, 0x0006, 0x0128, 0x080c, 0x9be6, 0x0020, 0x0039, 0x0010,
-	0x080c, 0xa21c, 0x002e, 0x00de, 0x00ee, 0x0005, 0x0096, 0x6814,
-	0x2048, 0x9186, 0x0015, 0x0904, 0xa1fb, 0x918e, 0x0016, 0x1904,
-	0xa21a, 0x700c, 0x908c, 0xff00, 0x9186, 0x1700, 0x0120, 0x9186,
-	0x0300, 0x1904, 0xa1d5, 0x89ff, 0x1138, 0x6800, 0x9086, 0x000f,
-	0x0904, 0xa1b7, 0x0804, 0xa218, 0x6808, 0x9086, 0xffff, 0x1904,
-	0xa1fd, 0xa87c, 0x9084, 0x0060, 0x9086, 0x0020, 0x1128, 0xa83c,
-	0xa940, 0x9105, 0x1904, 0xa1fd, 0x6824, 0xd084, 0x1904, 0xa1fd,
-	0xd0b4, 0x0158, 0x0016, 0x2001, 0x195e, 0x200c, 0x6018, 0x9102,
-	0x9082, 0x0005, 0x001e, 0x1a04, 0xa1fd, 0x080c, 0xba5f, 0x6864,
-	0xa882, 0xa87c, 0xc0dc, 0xc0f4, 0xc0d4, 0xa87e, 0x0026, 0x900e,
-	0x6a18, 0x2001, 0x000a, 0x080c, 0x842f, 0xa884, 0x920a, 0x0208,
-	0x8011, 0xaa86, 0x82ff, 0x002e, 0x1138, 0x00c6, 0x2d60, 0x080c,
-	0xb579, 0x00ce, 0x0804, 0xa218, 0x00c6, 0xa868, 0xd0fc, 0x1118,
-	0x080c, 0x5d71, 0x0010, 0x080c, 0x611a, 0x00ce, 0x1904, 0xa1fd,
-	0x00c6, 0x2d60, 0x080c, 0x9be6, 0x00ce, 0x0804, 0xa218, 0x00c6,
-	0x080c, 0x9c55, 0x0198, 0x6017, 0x0000, 0x6810, 0x6012, 0x080c,
-	0xbd09, 0x6023, 0x0003, 0x6904, 0x00c6, 0x2d60, 0x080c, 0x9be6,
-	0x00ce, 0x080c, 0x9c82, 0x00ce, 0x0804, 0xa218, 0x2001, 0x1960,
-	0x2004, 0x684a, 0x00ce, 0x0804, 0xa218, 0x7008, 0x9086, 0x000b,
-	0x11c8, 0x6010, 0x00b6, 0x2058, 0xb900, 0xc1bc, 0xb902, 0x00be,
-	0x00c6, 0x2d60, 0xa87b, 0x0003, 0x080c, 0xbf49, 0x6007, 0x0085,
-	0x6003, 0x000b, 0x6023, 0x0002, 0x2009, 0x8020, 0x080c, 0x84e7,
-	0x00ce, 0x0430, 0x700c, 0x9086, 0x2a00, 0x1138, 0x2001, 0x1960,
-	0x2004, 0x684a, 0x00e8, 0x04c1, 0x00e8, 0x89ff, 0x090c, 0x0d65,
-	0x00c6, 0x00d6, 0x2d60, 0xa867, 0x0103, 0xa87b, 0x0003, 0x080c,
-	0x67cb, 0x080c, 0xba5f, 0x080c, 0x9c20, 0x0026, 0x6010, 0x00b6,
-	0x2058, 0xba3c, 0x080c, 0x63ba, 0x00be, 0x002e, 0x00de, 0x00ce,
-	0x080c, 0x9be6, 0x009e, 0x0005, 0x9186, 0x0015, 0x1128, 0x2001,
-	0x1960, 0x2004, 0x684a, 0x0068, 0x918e, 0x0016, 0x1160, 0x00c6,
-	0x2d00, 0x2060, 0x080c, 0xd517, 0x080c, 0x83d6, 0x080c, 0x9be6,
-	0x00ce, 0x080c, 0x9be6, 0x0005, 0x0026, 0x0036, 0x0046, 0x7228,
-	0xacb0, 0xabac, 0xd2f4, 0x0130, 0x2001, 0x1960, 0x2004, 0x684a,
-	0x0804, 0xa296, 0x00c6, 0x2d60, 0x080c, 0xb451, 0x00ce, 0x6804,
-	0x9086, 0x0050, 0x1168, 0x00c6, 0x2d00, 0x2060, 0x6003, 0x0001,
-	0x6007, 0x0050, 0x2009, 0x8023, 0x080c, 0x84e7, 0x00ce, 0x04f0,
-	0x6800, 0x9086, 0x000f, 0x01a8, 0x89ff, 0x090c, 0x0d65, 0x6800,
-	0x9086, 0x0004, 0x1190, 0xa87c, 0xd0ac, 0x0178, 0xa843, 0x0fff,
-	0xa83f, 0x0fff, 0xa880, 0xc0fc, 0xa882, 0x2001, 0x0001, 0x6832,
-	0x0400, 0x2001, 0x0007, 0x6832, 0x00e0, 0xa87c, 0xd0b4, 0x1150,
-	0xd0ac, 0x0db8, 0x6824, 0xd0f4, 0x1d48, 0xa838, 0xa934, 0x9105,
-	0x0d80, 0x0c20, 0xd2ec, 0x1d68, 0x7024, 0x9306, 0x1118, 0x7020,
-	0x9406, 0x0d38, 0x7020, 0x683e, 0x7024, 0x683a, 0x2001, 0x0005,
-	0x6832, 0x080c, 0xbbf3, 0x080c, 0x894f, 0x0010, 0x080c, 0x9be6,
-	0x004e, 0x003e, 0x002e, 0x0005, 0x00e6, 0x00d6, 0x0026, 0x7008,
-	0x9084, 0x00ff, 0x6210, 0x00b6, 0x2258, 0xba10, 0x00be, 0x9206,
-	0x1904, 0xa301, 0x700c, 0x6210, 0x00b6, 0x2258, 0xba14, 0x00be,
-	0x9206, 0x1904, 0xa301, 0x6038, 0x2068, 0x6824, 0xc0dc, 0x6826,
-	0x6a20, 0x9286, 0x0007, 0x0904, 0xa301, 0x9286, 0x0002, 0x0904,
-	0xa301, 0x9286, 0x0000, 0x05e8, 0x6808, 0x633c, 0x9306, 0x15c8,
-	0x2071, 0x026c, 0x9186, 0x0015, 0x0570, 0x918e, 0x0016, 0x1100,
-	0x00c6, 0x6038, 0x2060, 0x6104, 0x9186, 0x004b, 0x01c0, 0x9186,
-	0x004c, 0x01a8, 0x9186, 0x004d, 0x0190, 0x9186, 0x004e, 0x0178,
-	0x9186, 0x0052, 0x0160, 0x6014, 0x0096, 0x2048, 0x080c, 0xb870,
-	0x090c, 0x0d65, 0xa87b, 0x0003, 0x009e, 0x080c, 0xbf49, 0x6007,
-	0x0085, 0x6003, 0x000b, 0x6023, 0x0002, 0x2009, 0x8020, 0x080c,
-	0x84e7, 0x00ce, 0x0030, 0x6038, 0x2070, 0x2001, 0x1960, 0x2004,
-	0x704a, 0x080c, 0x9be6, 0x002e, 0x00de, 0x00ee, 0x0005, 0x00b6,
-	0x0096, 0x00f6, 0x6014, 0x2048, 0x6010, 0x2058, 0x91b6, 0x0015,
-	0x0130, 0xba08, 0xbb0c, 0xbc00, 0xc48c, 0xbc02, 0x0460, 0x0096,
-	0x0156, 0x0036, 0x0026, 0x2b48, 0x9e90, 0x0010, 0x2019, 0x000a,
-	0x20a9, 0x0004, 0x080c, 0xabee, 0x002e, 0x003e, 0x015e, 0x009e,
-	0x1904, 0xa370, 0x0096, 0x0156, 0x0036, 0x0026, 0x2b48, 0x9e90,
-	0x0014, 0x2019, 0x0006, 0x20a9, 0x0004, 0x080c, 0xabee, 0x002e,
-	0x003e, 0x015e, 0x009e, 0x15a0, 0x7238, 0xba0a, 0x733c, 0xbb0e,
-	0xbc00, 0xc48d, 0xbc02, 0xa804, 0x9005, 0x1128, 0x00fe, 0x009e,
-	0x00be, 0x0804, 0x9ff4, 0x0096, 0x2048, 0xaa12, 0xab16, 0xac0a,
-	0x009e, 0x8006, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0,
-	0x9080, 0x0002, 0x2009, 0x002b, 0xaaa0, 0xab9c, 0xaca8, 0xada4,
-	0x2031, 0x0000, 0x2041, 0x127e, 0x080c, 0xa0f3, 0x0130, 0x00fe,
-	0x009e, 0x080c, 0x9be6, 0x00be, 0x0005, 0x080c, 0xa59c, 0x0cb8,
-	0x2b78, 0x00f6, 0x080c, 0x302e, 0x080c, 0xbfa4, 0x00fe, 0x00c6,
-	0x080c, 0x9b90, 0x2f00, 0x6012, 0x6017, 0x0000, 0x6023, 0x0001,
-	0x6007, 0x0001, 0x6003, 0x0001, 0x2001, 0x0007, 0x080c, 0x61e0,
-	0x080c, 0x620c, 0x080c, 0x84ee, 0x080c, 0x894f, 0x00ce, 0x0804,
-	0xa343, 0x2100, 0x91b2, 0x0053, 0x1a0c, 0x0d65, 0x91b2, 0x0040,
-	0x1a04, 0xa3f9, 0x0002, 0xa3e7, 0xa3e7, 0xa3dd, 0xa3e7, 0xa3e7,
-	0xa3e7, 0xa3db, 0xa3db, 0xa3db, 0xa3db, 0xa3db, 0xa3db, 0xa3db,
-	0xa3db, 0xa3db, 0xa3db, 0xa3db, 0xa3db, 0xa3db, 0xa3db, 0xa3db,
-	0xa3db, 0xa3db, 0xa3db, 0xa3db, 0xa3db, 0xa3db, 0xa3db, 0xa3db,
-	0xa3db, 0xa3db, 0xa3e7, 0xa3db, 0xa3e7, 0xa3e7, 0xa3db, 0xa3db,
-	0xa3db, 0xa3db, 0xa3db, 0xa3dd, 0xa3db, 0xa3db, 0xa3db, 0xa3db,
-	0xa3db, 0xa3db, 0xa3db, 0xa3db, 0xa3db, 0xa3e7, 0xa3e7, 0xa3db,
-	0xa3db, 0xa3db, 0xa3db, 0xa3db, 0xa3db, 0xa3db, 0xa3db, 0xa3db,
-	0xa3e7, 0xa3db, 0xa3db, 0x080c, 0x0d65, 0x0066, 0x00b6, 0x6610,
-	0x2658, 0xb8c4, 0xc08c, 0xb8c6, 0x00be, 0x006e, 0x0000, 0x6003,
-	0x0001, 0x6106, 0x9186, 0x0032, 0x0118, 0x080c, 0x84ee, 0x0010,
-	0x080c, 0x84e7, 0x0126, 0x2091, 0x8000, 0x080c, 0x894f, 0x012e,
-	0x0005, 0x2600, 0x0002, 0xa40d, 0xa40d, 0xa40d, 0xa3e7, 0xa3e7,
-	0xa40d, 0xa40d, 0xa40d, 0xa40d, 0xa3e7, 0xa40d, 0xa3e7, 0xa40d,
-	0xa3e7, 0xa40d, 0xa40d, 0xa40d, 0xa40d, 0x080c, 0x0d65, 0x6004,
-	0x90b2, 0x0053, 0x1a0c, 0x0d65, 0x91b6, 0x0013, 0x0904, 0xa4e4,
-	0x91b6, 0x0027, 0x1904, 0xa490, 0x080c, 0x8891, 0x6004, 0x080c,
-	0xba74, 0x01b0, 0x080c, 0xba85, 0x01a8, 0x908e, 0x0021, 0x0904,
-	0xa48d, 0x908e, 0x0022, 0x1130, 0x080c, 0xa020, 0x0904, 0xa489,
-	0x0804, 0xa48a, 0x908e, 0x003d, 0x0904, 0xa48d, 0x0804, 0xa483,
-	0x080c, 0x305d, 0x2001, 0x0007, 0x080c, 0x61e0, 0x6010, 0x00b6,
-	0x2058, 0xb9a0, 0x00be, 0x080c, 0xa59c, 0x9186, 0x007e, 0x1148,
-	0x2001, 0x1836, 0x2014, 0xc285, 0x080c, 0x70ba, 0x1108, 0xc2ad,
-	0x2202, 0x080c, 0x98c7, 0x0036, 0x0026, 0x2019, 0x0028, 0x2110,
-	0x080c, 0xd572, 0x002e, 0x003e, 0x0016, 0x0026, 0x0036, 0x2110,
-	0x2019, 0x0028, 0x080c, 0x8658, 0x0076, 0x903e, 0x080c, 0x853d,
-	0x6010, 0x00b6, 0x905d, 0x0100, 0x00be, 0x2c08, 0x080c, 0xd011,
-	0x007e, 0x003e, 0x002e, 0x001e, 0x080c, 0x98e3, 0x080c, 0xbfa4,
-	0x0016, 0x080c, 0xbd01, 0x080c, 0x9be6, 0x001e, 0x080c, 0x3136,
-	0x080c, 0x894f, 0x0030, 0x080c, 0xbd01, 0x080c, 0x9be6, 0x080c,
-	0x894f, 0x0005, 0x080c, 0xa59c, 0x0cb0, 0x080c, 0xa5d8, 0x0c98,
-	0x9186, 0x0015, 0x0118, 0x9186, 0x0016, 0x1140, 0x080c, 0x9ab6,
-	0x0d80, 0x9086, 0x0002, 0x0904, 0xa5e3, 0x0c58, 0x9186, 0x0014,
-	0x1d40, 0x080c, 0x8891, 0x6004, 0x908e, 0x0022, 0x1118, 0x080c,
-	0xa020, 0x09f8, 0x080c, 0x302e, 0x080c, 0xbfa4, 0x080c, 0xba74,
-	0x1190, 0x080c, 0x305d, 0x6010, 0x00b6, 0x2058, 0xb9a0, 0x00be,
-	0x080c, 0xa59c, 0x9186, 0x007e, 0x1128, 0x2001, 0x1836, 0x200c,
-	0xc185, 0x2102, 0x0800, 0x080c, 0xba85, 0x1120, 0x080c, 0xa59c,
-	0x0804, 0xa483, 0x6004, 0x908e, 0x0032, 0x1160, 0x00e6, 0x00f6,
-	0x2071, 0x189c, 0x2079, 0x0000, 0x080c, 0x33d0, 0x00fe, 0x00ee,
-	0x0804, 0xa483, 0x6004, 0x908e, 0x0021, 0x0d40, 0x908e, 0x0022,
-	0x090c, 0xa59c, 0x0804, 0xa483, 0x90b2, 0x0040, 0x1a04, 0xa585,
-	0x2008, 0x0002, 0xa52c, 0xa52d, 0xa530, 0xa533, 0xa536, 0xa539,
-	0xa52a, 0xa52a, 0xa52a, 0xa52a, 0xa52a, 0xa52a, 0xa52a, 0xa52a,
-	0xa52a, 0xa52a, 0xa52a, 0xa52a, 0xa52a, 0xa52a, 0xa52a, 0xa52a,
-	0xa52a, 0xa52a, 0xa52a, 0xa52a, 0xa52a, 0xa52a, 0xa52a, 0xa52a,
-	0xa53c, 0xa547, 0xa52a, 0xa548, 0xa547, 0xa52a, 0xa52a, 0xa52a,
-	0xa52a, 0xa52a, 0xa547, 0xa547, 0xa52a, 0xa52a, 0xa52a, 0xa52a,
-	0xa52a, 0xa52a, 0xa52a, 0xa52a, 0xa570, 0xa547, 0xa52a, 0xa543,
-	0xa52a, 0xa52a, 0xa52a, 0xa544, 0xa52a, 0xa52a, 0xa52a, 0xa547,
-	0xa56b, 0xa52a, 0x080c, 0x0d65, 0x00d0, 0x2001, 0x000b, 0x00f8,
-	0x2001, 0x0003, 0x00e0, 0x2001, 0x0005, 0x00c8, 0x2001, 0x0001,
-	0x00b0, 0x2001, 0x0009, 0x0098, 0x6003, 0x0005, 0x080c, 0xbfa7,
-	0x080c, 0x894f, 0x0058, 0x0018, 0x0010, 0x080c, 0x61e0, 0x04b8,
-	0x080c, 0xbfa7, 0x6003, 0x0004, 0x080c, 0x894f, 0x0005, 0x080c,
-	0x61e0, 0x6003, 0x0002, 0x0036, 0x2019, 0x1866, 0x2304, 0x9084,
-	0xff00, 0x1120, 0x2001, 0x195e, 0x201c, 0x0040, 0x8007, 0x909a,
-	0x0004, 0x0ec0, 0x8003, 0x801b, 0x831b, 0x9318, 0x631a, 0x003e,
-	0x080c, 0x894f, 0x0c18, 0x080c, 0xbd01, 0x080c, 0x9be6, 0x08f0,
-	0x00e6, 0x00f6, 0x2071, 0x189c, 0x2079, 0x0000, 0x080c, 0x33d0,
-	0x00fe, 0x00ee, 0x080c, 0x8891, 0x080c, 0x9be6, 0x0878, 0x6003,
-	0x0002, 0x080c, 0xbfa7, 0x0804, 0x894f, 0x2600, 0x2008, 0x0002,
-	0xa59a, 0xa59a, 0xa59a, 0xa57f, 0xa57f, 0xa59a, 0xa59a, 0xa59a,
-	0xa59a, 0xa57f, 0xa59a, 0xa57f, 0xa59a, 0xa57f, 0xa59a, 0xa59a,
-	0xa59a, 0xa59a, 0x080c, 0x0d65, 0x00e6, 0x0096, 0x0026, 0x0016,
-	0x080c, 0xb870, 0x0568, 0x6014, 0x2048, 0xa864, 0x9086, 0x0139,
-	0x11a8, 0xa894, 0x9086, 0x0056, 0x1148, 0x080c, 0x5149, 0x0130,
-	0x2001, 0x0000, 0x900e, 0x2011, 0x4000, 0x0028, 0x2001, 0x0030,
-	0x900e, 0x2011, 0x4005, 0x080c, 0xbe6e, 0x0090, 0xa868, 0xd0fc,
-	0x0178, 0xa807, 0x0000, 0x0016, 0x6004, 0x908e, 0x0021, 0x0168,
-	0x908e, 0x003d, 0x0150, 0x001e, 0xa867, 0x0103, 0xa833, 0x0100,
-	0x001e, 0x002e, 0x009e, 0x00ee, 0x0005, 0x001e, 0x0009, 0x0cc0,
-	0x0096, 0x6014, 0x2048, 0xa800, 0x2048, 0xa867, 0x0103, 0xa823,
-	0x8001, 0x009e, 0x0005, 0x00b6, 0x6610, 0x2658, 0xb804, 0x9084,
-	0x00ff, 0x90b2, 0x000c, 0x1a0c, 0x0d65, 0x6604, 0x96b6, 0x004d,
-	0x1120, 0x080c, 0xbd8d, 0x0804, 0xa660, 0x6604, 0x96b6, 0x0043,
-	0x1120, 0x080c, 0xbdd6, 0x0804, 0xa660, 0x6604, 0x96b6, 0x004b,
-	0x1120, 0x080c, 0xbe02, 0x0804, 0xa660, 0x6604, 0x96b6, 0x0033,
-	0x1120, 0x080c, 0xbd23, 0x0804, 0xa660, 0x6604, 0x96b6, 0x0028,
-	0x1120, 0x080c, 0xbac3, 0x0804, 0xa660, 0x6604, 0x96b6, 0x0029,
-	0x1120, 0x080c, 0xbb04, 0x0804, 0xa660, 0x6604, 0x96b6, 0x001f,
-	0x1118, 0x080c, 0x9fc8, 0x04e0, 0x6604, 0x96b6, 0x0000, 0x1118,
-	0x080c, 0xa307, 0x04a8, 0x6604, 0x96b6, 0x0022, 0x1118, 0x080c,
-	0xa001, 0x0470, 0x6604, 0x96b6, 0x0035, 0x1118, 0x080c, 0xa111,
-	0x0438, 0x6604, 0x96b6, 0x0039, 0x1118, 0x080c, 0xa29c, 0x0400,
-	0x6604, 0x96b6, 0x003d, 0x1118, 0x080c, 0xa039, 0x00c8, 0x6604,
-	0x96b6, 0x0044, 0x1118, 0x080c, 0xa075, 0x0090, 0x6604, 0x96b6,
-	0x0049, 0x1118, 0x080c, 0xa0a0, 0x0058, 0x91b6, 0x0015, 0x1110,
-	0x0063, 0x0030, 0x91b6, 0x0016, 0x1128, 0x00be, 0x0804, 0xa920,
-	0x00be, 0x0005, 0x080c, 0x9c9f, 0x0cd8, 0xa67d, 0xa680, 0xa67d,
-	0xa6c4, 0xa67d, 0xa854, 0xa92d, 0xa67d, 0xa67d, 0xa8fa, 0xa67d,
-	0xa90e, 0x0096, 0x080c, 0x15af, 0x6014, 0x2048, 0xa800, 0x2048,
-	0xa867, 0x0103, 0x009e, 0x0804, 0x9be6, 0xa001, 0xa001, 0x0005,
-	0x00e6, 0x2071, 0x1800, 0x708c, 0x9086, 0x0074, 0x1540, 0x080c,
-	0xcfe2, 0x11b0, 0x6010, 0x00b6, 0x2058, 0x7030, 0xd08c, 0x0128,
-	0xb800, 0xd0bc, 0x0110, 0xc0c5, 0xb802, 0x00e9, 0x00be, 0x2001,
-	0x0006, 0x080c, 0x61e0, 0x080c, 0x305d, 0x080c, 0x9be6, 0x0088,
-	0x2001, 0x000a, 0x080c, 0x61e0, 0x080c, 0x305d, 0x6003, 0x0001,
-	0x6007, 0x0001, 0x080c, 0x84ee, 0x080c, 0x894f, 0x0010, 0x080c,
-	0xa83f, 0x00ee, 0x0005, 0x00d6, 0xb800, 0xd084, 0x0158, 0x9006,
-	0x080c, 0x61cc, 0x2069, 0x185b, 0x6804, 0x0020, 0x2001, 0x0006,
-	0x080c, 0x620c, 0x00de, 0x0005, 0x00b6, 0x0096, 0x00d6, 0x2011,
-	0x1823, 0x2204, 0x9086, 0x0074, 0x1904, 0xa816, 0x6010, 0x2058,
-	0xbaa0, 0x9286, 0x007e, 0x1120, 0x080c, 0xaa71, 0x0804, 0xa77b,
-	0x00d6, 0x080c, 0x70ba, 0x0198, 0x0026, 0x2011, 0x0010, 0x080c,
-	0x66ae, 0x002e, 0x05c8, 0x080c, 0x53bc, 0x1540, 0x6014, 0x2048,
-	0xa807, 0x0000, 0xa867, 0x0103, 0xa833, 0xdead, 0x00f8, 0x0026,
-	0x2011, 0x8008, 0x080c, 0x66ae, 0x002e, 0x0530, 0x6014, 0x2048,
-	0xa864, 0x9084, 0x00ff, 0x9086, 0x0039, 0x1140, 0x2001, 0x0030,
-	0x900e, 0x2011, 0x4009, 0x080c, 0xbe6e, 0x0040, 0x6014, 0x2048,
-	0xa807, 0x0000, 0xa867, 0x0103, 0xa833, 0xdead, 0x6010, 0x2058,
-	0xb9a0, 0x0016, 0x080c, 0x305d, 0x080c, 0x9be6, 0x001e, 0x080c,
-	0x3136, 0x00de, 0x0804, 0xa819, 0x00de, 0x080c, 0xaa66, 0x6010,
-	0x2058, 0xbaa0, 0x9286, 0x0080, 0x1510, 0x6014, 0x9005, 0x01a8,
-	0x2048, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0039, 0x1140, 0x2001,
-	0x0000, 0x900e, 0x2011, 0x4000, 0x080c, 0xbe6e, 0x0030, 0xa807,
-	0x0000, 0xa867, 0x0103, 0xa833, 0x0200, 0x2001, 0x0006, 0x080c,
-	0x61e0, 0x080c, 0x305d, 0x080c, 0x9be6, 0x0804, 0xa819, 0x080c,
-	0xa827, 0x6014, 0x9005, 0x0190, 0x2048, 0xa868, 0xd0f4, 0x01e8,
-	0xa864, 0x9084, 0x00ff, 0x9086, 0x0039, 0x1d08, 0x2001, 0x0000,
-	0x900e, 0x2011, 0x4000, 0x080c, 0xbe6e, 0x08f8, 0x080c, 0xa81d,
-	0x0160, 0x9006, 0x080c, 0x61cc, 0x2001, 0x0004, 0x080c, 0x620c,
-	0x2001, 0x0007, 0x080c, 0x61e0, 0x08a0, 0x2001, 0x0004, 0x080c,
-	0x61e0, 0x6003, 0x0001, 0x6007, 0x0003, 0x080c, 0x84ee, 0x080c,
-	0x894f, 0x0804, 0xa819, 0xb85c, 0xd0e4, 0x01d0, 0x080c, 0xbc9b,
-	0x080c, 0x70ba, 0x0118, 0xd0dc, 0x1904, 0xa73d, 0x2011, 0x1836,
-	0x2204, 0xc0ad, 0x2012, 0x2001, 0x0002, 0x00f6, 0x2079, 0x0100,
-	0x78e3, 0x0000, 0x080c, 0x24cd, 0x78e2, 0x00fe, 0x0804, 0xa73d,
-	0x080c, 0xbcdc, 0x2011, 0x1836, 0x2204, 0xc0a5, 0x2012, 0x0006,
-	0x080c, 0xd147, 0x000e, 0x1904, 0xa73d, 0xc0b5, 0x2012, 0x2001,
-	0x0006, 0x080c, 0x61e0, 0x9006, 0x080c, 0x61cc, 0x00c6, 0x2001,
-	0x180f, 0x2004, 0xd09c, 0x0520, 0x00f6, 0x2079, 0x0100, 0x00e6,
-	0x2071, 0x1800, 0x700c, 0x9084, 0x00ff, 0x78e6, 0x707a, 0x7010,
-	0x78ea, 0x707e, 0x908c, 0x00ff, 0x00ee, 0x780c, 0xc0b5, 0x780e,
-	0x00fe, 0x080c, 0x24a2, 0x00f6, 0x2100, 0x900e, 0x080c, 0x2459,
-	0x795a, 0x00fe, 0x9186, 0x0081, 0x01d8, 0x2009, 0x0081, 0x00c8,
-	0x2009, 0x00ef, 0x00f6, 0x2079, 0x0100, 0x79ea, 0x7932, 0x7936,
-	0x780c, 0xc0b5, 0x780e, 0x00fe, 0x080c, 0x24a2, 0x00f6, 0x2079,
-	0x1800, 0x797e, 0x2100, 0x900e, 0x080c, 0x2459, 0x795a, 0x00fe,
-	0x8108, 0x080c, 0x622f, 0x2b00, 0x00ce, 0x1904, 0xa73d, 0x6012,
-	0x2009, 0x180f, 0x210c, 0xd19c, 0x0150, 0x2009, 0x027c, 0x210c,
-	0x918c, 0x00ff, 0xb912, 0x2009, 0x027d, 0x210c, 0xb916, 0x2001,
-	0x0002, 0x080c, 0x61e0, 0x6023, 0x0001, 0x6003, 0x0001, 0x6007,
-	0x0002, 0x080c, 0x84ee, 0x080c, 0x894f, 0x0018, 0x080c, 0xa59c,
-	0x0431, 0x00de, 0x009e, 0x00be, 0x0005, 0x2001, 0x1810, 0x2004,
-	0xd0a4, 0x0120, 0x2001, 0x185c, 0x2004, 0xd0ac, 0x0005, 0x00e6,
-	0x080c, 0xd5cb, 0x0190, 0x2071, 0x0260, 0x7108, 0x720c, 0x918c,
-	0x00ff, 0x1118, 0x9284, 0xff00, 0x0140, 0x6010, 0x2058, 0xb8a0,
-	0x9084, 0xff80, 0x1110, 0xb912, 0xba16, 0x00ee, 0x0005, 0x2030,
-	0x2001, 0x0007, 0x080c, 0x61e0, 0x080c, 0x53bc, 0x1120, 0x2001,
-	0x0007, 0x080c, 0x620c, 0x080c, 0x305d, 0x6020, 0x9086, 0x000a,
-	0x1108, 0x0005, 0x0804, 0x9be6, 0x00b6, 0x00e6, 0x0026, 0x0016,
-	0x2071, 0x1800, 0x708c, 0x9086, 0x0014, 0x1904, 0xa8f1, 0x00d6,
-	0x080c, 0x70ba, 0x0198, 0x0026, 0x2011, 0x0010, 0x080c, 0x66ae,
-	0x002e, 0x05c8, 0x080c, 0x53bc, 0x1540, 0x6014, 0x2048, 0xa807,
-	0x0000, 0xa867, 0x0103, 0xa833, 0xdead, 0x00f8, 0x0026, 0x2011,
-	0x8008, 0x080c, 0x66ae, 0x002e, 0x0530, 0x6014, 0x2048, 0xa864,
-	0x9084, 0x00ff, 0x9086, 0x0039, 0x1140, 0x2001, 0x0030, 0x900e,
-	0x2011, 0x4009, 0x080c, 0xbe6e, 0x0040, 0x6014, 0x2048, 0xa807,
-	0x0000, 0xa867, 0x0103, 0xa833, 0xdead, 0x6010, 0x2058, 0xb9a0,
-	0x0016, 0x080c, 0x305d, 0x080c, 0x9be6, 0x001e, 0x080c, 0x3136,
-	0x00de, 0x0804, 0xa8f5, 0x00de, 0x080c, 0x53bc, 0x1170, 0x6014,
-	0x9005, 0x1158, 0x0036, 0x0046, 0x6010, 0x2058, 0xbba0, 0x2021,
-	0x0006, 0x080c, 0x4a97, 0x004e, 0x003e, 0x00d6, 0x6010, 0x2058,
-	0x080c, 0x632a, 0x080c, 0xa6b3, 0x00de, 0x080c, 0xab37, 0x1588,
-	0x6010, 0x2058, 0xb890, 0x9005, 0x0560, 0x2001, 0x0006, 0x080c,
-	0x61e0, 0x0096, 0x6014, 0x904d, 0x01d0, 0xa864, 0x9084, 0x00ff,
-	0x9086, 0x0039, 0x1140, 0x2001, 0x0000, 0x900e, 0x2011, 0x4000,
-	0x080c, 0xbe6e, 0x0060, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0029,
-	0x0130, 0xa807, 0x0000, 0xa867, 0x0103, 0xa833, 0x0200, 0x009e,
-	0x080c, 0x305d, 0x6020, 0x9086, 0x000a, 0x0138, 0x080c, 0x9be6,
-	0x0020, 0x080c, 0xa59c, 0x080c, 0xa83f, 0x001e, 0x002e, 0x00ee,
-	0x00be, 0x0005, 0x2011, 0x1823, 0x2204, 0x9086, 0x0014, 0x1160,
-	0x2001, 0x0002, 0x080c, 0x61e0, 0x6003, 0x0001, 0x6007, 0x0001,
-	0x080c, 0x84ee, 0x0804, 0x894f, 0x0804, 0xa83f, 0x2030, 0x2011,
-	0x1823, 0x2204, 0x9086, 0x0004, 0x1148, 0x96b6, 0x000b, 0x1120,
-	0x2001, 0x0007, 0x080c, 0x61e0, 0x0804, 0x9be6, 0x0804, 0xa83f,
-	0x0002, 0xa67d, 0xa938, 0xa67d, 0xa977, 0xa67d, 0xaa22, 0xa92d,
-	0xa67d, 0xa67d, 0xaa35, 0xa67d, 0xaa45, 0x6604, 0x9686, 0x0003,
-	0x0904, 0xa854, 0x96b6, 0x001e, 0x1110, 0x080c, 0x9be6, 0x0005,
-	0x00b6, 0x00d6, 0x00c6, 0x080c, 0xaa55, 0x11a0, 0x9006, 0x080c,
-	0x61cc, 0x080c, 0x302e, 0x080c, 0xbfa4, 0x2001, 0x0002, 0x080c,
-	0x61e0, 0x6003, 0x0001, 0x6007, 0x0002, 0x080c, 0x84ee, 0x080c,
-	0x894f, 0x0408, 0x2009, 0x026e, 0x2104, 0x9086, 0x0009, 0x1160,
-	0x6010, 0x2058, 0xb840, 0x9084, 0x00ff, 0x9005, 0x0170, 0x8001,
-	0xb842, 0x601b, 0x000a, 0x0078, 0x2009, 0x026f, 0x2104, 0x9084,
-	0xff00, 0x9086, 0x1900, 0x1108, 0x08a0, 0x080c, 0x302e, 0x080c,
-	0xbfa4, 0x080c, 0xa83f, 0x00ce, 0x00de, 0x00be, 0x0005, 0x0096,
-	0x00b6, 0x0026, 0x9016, 0x080c, 0xaa63, 0x00d6, 0x2069, 0x1954,
-	0x2d04, 0x9005, 0x0168, 0x6010, 0x2058, 0xb8a0, 0x9086, 0x007e,
-	0x1138, 0x2069, 0x181f, 0x2d04, 0x8000, 0x206a, 0x00de, 0x0010,
-	0x00de, 0x0088, 0x9006, 0x080c, 0x61cc, 0x2001, 0x0002, 0x080c,
-	0x61e0, 0x6003, 0x0001, 0x6007, 0x0002, 0x080c, 0x84ee, 0x080c,
-	0x894f, 0x0804, 0xa9f2, 0x080c, 0xb870, 0x01b0, 0x6014, 0x2048,
-	0xa864, 0x2010, 0x9086, 0x0139, 0x1138, 0x6007, 0x0016, 0x2001,
-	0x0002, 0x080c, 0xbec8, 0x00b0, 0x6014, 0x2048, 0xa864, 0xd0fc,
-	0x0118, 0x2001, 0x0001, 0x0ca8, 0x2001, 0x180e, 0x2004, 0xd0dc,
-	0x0148, 0x6010, 0x2058, 0xb840, 0x9084, 0x00ff, 0x9005, 0x1110,
-	0x9006, 0x0c38, 0x080c, 0xa59c, 0x2009, 0x026e, 0x2134, 0x96b4,
-	0x00ff, 0x9686, 0x0005, 0x0510, 0x9686, 0x000b, 0x01c8, 0x2009,
-	0x026f, 0x2104, 0x9084, 0xff00, 0x1118, 0x9686, 0x0009, 0x01b0,
-	0x9086, 0x1900, 0x1168, 0x9686, 0x0009, 0x0180, 0x2001, 0x0004,
-	0x080c, 0x61e0, 0x2001, 0x0028, 0x601a, 0x6007, 0x0052, 0x0010,
-	0x080c, 0xa83f, 0x002e, 0x00be, 0x009e, 0x0005, 0x9286, 0x0139,
-	0x0160, 0x6014, 0x2048, 0x080c, 0xb870, 0x0140, 0xa864, 0x9086,
-	0x0139, 0x0118, 0xa868, 0xd0fc, 0x0108, 0x0c50, 0x6010, 0x2058,
-	0xb840, 0x9084, 0x00ff, 0x9005, 0x0138, 0x8001, 0xb842, 0x601b,
-	0x000a, 0x6007, 0x0016, 0x08f0, 0xb8a0, 0x9086, 0x007e, 0x1138,
-	0x00e6, 0x2071, 0x1800, 0x080c, 0x5c8a, 0x00ee, 0x0010, 0x080c,
-	0x302e, 0x0870, 0x080c, 0xaa63, 0x1160, 0x2001, 0x0004, 0x080c,
-	0x61e0, 0x6003, 0x0001, 0x6007, 0x0003, 0x080c, 0x84ee, 0x0804,
-	0x894f, 0x080c, 0xa59c, 0x0804, 0xa83f, 0x0469, 0x1160, 0x2001,
-	0x0008, 0x080c, 0x61e0, 0x6003, 0x0001, 0x6007, 0x0005, 0x080c,
-	0x84ee, 0x0804, 0x894f, 0x0804, 0xa83f, 0x00e9, 0x1160, 0x2001,
-	0x000a, 0x080c, 0x61e0, 0x6003, 0x0001, 0x6007, 0x0001, 0x080c,
-	0x84ee, 0x0804, 0x894f, 0x0804, 0xa83f, 0x2009, 0x026e, 0x2104,
-	0x9086, 0x0003, 0x1138, 0x2009, 0x026f, 0x2104, 0x9084, 0xff00,
-	0x9086, 0x2a00, 0x0005, 0x9085, 0x0001, 0x0005, 0x00b6, 0x00c6,
-	0x0016, 0x6110, 0x2158, 0x080c, 0x629e, 0x001e, 0x00ce, 0x00be,
-	0x0005, 0x00b6, 0x00f6, 0x00e6, 0x00d6, 0x0036, 0x0016, 0x6010,
-	0x2058, 0x2009, 0x1836, 0x2104, 0x9085, 0x0003, 0x200a, 0x080c,
-	0xab09, 0x0560, 0x2009, 0x1836, 0x2104, 0xc0cd, 0x200a, 0x080c,
-	0x6686, 0x0158, 0x9006, 0x2020, 0x2009, 0x002a, 0x080c, 0xd2bc,
-	0x2001, 0x180c, 0x200c, 0xc195, 0x2102, 0x2019, 0x002a, 0x2009,
-	0x0001, 0x080c, 0x2ff3, 0x00e6, 0x2071, 0x1800, 0x080c, 0x2e09,
-	0x00ee, 0x00c6, 0x0156, 0x20a9, 0x0781, 0x2009, 0x007f, 0x080c,
-	0x3136, 0x8108, 0x1f04, 0xaaa7, 0x015e, 0x00ce, 0x080c, 0xaa66,
-	0x2071, 0x0260, 0x2079, 0x0200, 0x7817, 0x0001, 0x2001, 0x1836,
-	0x200c, 0xc1c5, 0x7018, 0xd0fc, 0x0110, 0xd0dc, 0x0118, 0x7038,
-	0xd0dc, 0x1108, 0xc1c4, 0x7817, 0x0000, 0x2001, 0x1836, 0x2102,
-	0x2079, 0x0100, 0x2e04, 0x9084, 0x00ff, 0x2069, 0x181e, 0x206a,
-	0x78e6, 0x0006, 0x8e70, 0x2e04, 0x2069, 0x181f, 0x206a, 0x78ea,
-	0x7832, 0x7836, 0x2010, 0x9084, 0xff00, 0x001e, 0x9105, 0x2009,
-	0x182b, 0x200a, 0x2200, 0x9084, 0x00ff, 0x2008, 0x080c, 0x24a2,
-	0x080c, 0x70ba, 0x0170, 0x2071, 0x0260, 0x2069, 0x195a, 0x7048,
-	0x206a, 0x704c, 0x6806, 0x7050, 0x680a, 0x7054, 0x680e, 0x080c,
-	0xbc9b, 0x0040, 0x2001, 0x0006, 0x080c, 0x61e0, 0x080c, 0x305d,
-	0x080c, 0x9be6, 0x001e, 0x003e, 0x00de, 0x00ee, 0x00fe, 0x00be,
-	0x0005, 0x0096, 0x0026, 0x0036, 0x00e6, 0x0156, 0x2019, 0x182b,
-	0x231c, 0x83ff, 0x01f0, 0x2071, 0x0260, 0x7200, 0x9294, 0x00ff,
-	0x7004, 0x9084, 0xff00, 0x9205, 0x9306, 0x1198, 0x2011, 0x0276,
-	0x20a9, 0x0004, 0x2b48, 0x2019, 0x000a, 0x080c, 0xabee, 0x1148,
-	0x2011, 0x027a, 0x20a9, 0x0004, 0x2019, 0x0006, 0x080c, 0xabee,
-	0x1100, 0x015e, 0x00ee, 0x003e, 0x002e, 0x009e, 0x0005, 0x00e6,
-	0x2071, 0x0260, 0x7034, 0x9086, 0x0014, 0x11a8, 0x7038, 0x9086,
-	0x0800, 0x1188, 0x703c, 0xd0ec, 0x0160, 0x9084, 0x0f00, 0x9086,
-	0x0100, 0x1138, 0x7054, 0xd0a4, 0x1110, 0xd0ac, 0x0110, 0x9006,
-	0x0010, 0x9085, 0x0001, 0x00ee, 0x0005, 0x00e6, 0x0096, 0x00c6,
-	0x0076, 0x0056, 0x0046, 0x0026, 0x0006, 0x0126, 0x2091, 0x8000,
-	0x2029, 0x19cb, 0x252c, 0x2021, 0x19d2, 0x2424, 0x2061, 0x1ddc,
-	0x2071, 0x1800, 0x7250, 0x7070, 0x9202, 0x1a04, 0xabc6, 0x080c,
-	0xd2ed, 0x0904, 0xabbf, 0x6720, 0x9786, 0x0007, 0x0904, 0xabbf,
-	0x2500, 0x9c06, 0x0904, 0xabbf, 0x2400, 0x9c06, 0x0904, 0xabbf,
-	0x3e08, 0x9186, 0x0002, 0x1148, 0x6010, 0x9005, 0x0130, 0x00b6,
-	0x2058, 0xb800, 0x00be, 0xd0bc, 0x1590, 0x00c6, 0x6043, 0xffff,
-	0x6000, 0x9086, 0x0004, 0x1110, 0x080c, 0x193e, 0x9786, 0x000a,
-	0x0148, 0x080c, 0xba85, 0x1130, 0x00ce, 0x080c, 0xa59c, 0x080c,
-	0x9c20, 0x00e8, 0x6014, 0x2048, 0x080c, 0xb870, 0x01a8, 0x9786,
-	0x0003, 0x1530, 0xa867, 0x0103, 0xa87c, 0xd0cc, 0x0130, 0x0096,
-	0xa878, 0x2048, 0x080c, 0x0fe1, 0x009e, 0xab7a, 0xa877, 0x0000,
-	0x080c, 0x69a9, 0x080c, 0xba5f, 0x080c, 0x9c20, 0x00ce, 0x9ce0,
-	0x001c, 0x7064, 0x9c02, 0x1210, 0x0804, 0xab6a, 0x012e, 0x000e,
-	0x002e, 0x004e, 0x005e, 0x007e, 0x00ce, 0x009e, 0x00ee, 0x0005,
-	0x9786, 0x0006, 0x1118, 0x080c, 0xd267, 0x0c30, 0x9786, 0x000a,
-	0x0998, 0x0880, 0x220c, 0x2304, 0x9106, 0x1130, 0x8210, 0x8318,
-	0x1f04, 0xabda, 0x9006, 0x0005, 0x2304, 0x9102, 0x0218, 0x2001,
-	0x0001, 0x0008, 0x9006, 0x918d, 0x0001, 0x0005, 0x0136, 0x01c6,
-	0x0016, 0x8906, 0x8006, 0x8007, 0x908c, 0x003f, 0x21e0, 0x9084,
-	0xffc0, 0x9300, 0x2098, 0x3518, 0x20a9, 0x0001, 0x220c, 0x4002,
-	0x910e, 0x1140, 0x8210, 0x8319, 0x1dc8, 0x9006, 0x001e, 0x01ce,
-	0x013e, 0x0005, 0x220c, 0x9102, 0x0218, 0x2001, 0x0001, 0x0010,
-	0x2001, 0x0000, 0x918d, 0x0001, 0x001e, 0x01ce, 0x013e, 0x0005,
-	0x6004, 0x908a, 0x0053, 0x1a0c, 0x0d65, 0x080c, 0xba74, 0x0120,
-	0x080c, 0xba85, 0x0158, 0x0028, 0x080c, 0x305d, 0x080c, 0xba85,
-	0x0128, 0x080c, 0x8891, 0x080c, 0x9be6, 0x0005, 0x080c, 0xa59c,
-	0x0cc0, 0x9182, 0x0057, 0x1220, 0x9182, 0x0040, 0x0208, 0x000a,
-	0x0005, 0xac50, 0xac50, 0xac50, 0xac50, 0xac50, 0xac50, 0xac50,
-	0xac50, 0xac50, 0xac50, 0xac50, 0xac52, 0xac52, 0xac52, 0xac52,
-	0xac50, 0xac50, 0xac50, 0xac52, 0xac50, 0xac50, 0xac50, 0xac50,
-	0x080c, 0x0d65, 0x600b, 0xffff, 0x6003, 0x000f, 0x6106, 0x0126,
-	0x2091, 0x8000, 0x080c, 0xbfa7, 0x2009, 0x8000, 0x080c, 0x84e7,
-	0x012e, 0x0005, 0x9186, 0x0013, 0x1128, 0x6004, 0x9082, 0x0040,
-	0x0804, 0xacd7, 0x9186, 0x0027, 0x1520, 0x080c, 0x8891, 0x080c,
-	0x302e, 0x080c, 0xbfa4, 0x0096, 0x6114, 0x2148, 0x080c, 0xb870,
-	0x0198, 0x080c, 0xba85, 0x1118, 0x080c, 0xa59c, 0x0068, 0xa867,
-	0x0103, 0xa87b, 0x0029, 0xa877, 0x0000, 0xa97c, 0xc1c5, 0xa97e,
-	0x080c, 0x69b5, 0x080c, 0xba5f, 0x009e, 0x080c, 0x9be6, 0x0804,
-	0x894f, 0x9186, 0x0014, 0x1120, 0x6004, 0x9082, 0x0040, 0x0018,
-	0x080c, 0x0d65, 0x0005, 0x0002, 0xacb5, 0xacb3, 0xacb3, 0xacb3,
-	0xacb3, 0xacb3, 0xacb3, 0xacb3, 0xacb3, 0xacb3, 0xacb3, 0xacce,
-	0xacce, 0xacce, 0xacce, 0xacb3, 0xacce, 0xacb3, 0xacce, 0xacb3,
-	0xacb3, 0xacb3, 0xacb3, 0x080c, 0x0d65, 0x080c, 0x8891, 0x0096,
-	0x6114, 0x2148, 0x080c, 0xb870, 0x0168, 0xa867, 0x0103, 0xa87b,
-	0x0006, 0xa877, 0x0000, 0xa880, 0xc0ec, 0xa882, 0x080c, 0x69b5,
-	0x080c, 0xba5f, 0x009e, 0x080c, 0x9be6, 0x0005, 0x080c, 0x8891,
-	0x080c, 0xba85, 0x090c, 0xa59c, 0x080c, 0x9be6, 0x0005, 0x0002,
-	0xacf1, 0xacef, 0xacef, 0xacef, 0xacef, 0xacef, 0xacef, 0xacef,
-	0xacef, 0xacef, 0xacef, 0xacf3, 0xacf3, 0xacf3, 0xacf3, 0xacef,
-	0xacf5, 0xacef, 0xacf3, 0xacef, 0xacef, 0xacef, 0xacef, 0x080c,
-	0x0d65, 0x080c, 0x0d65, 0x080c, 0x0d65, 0x080c, 0x9be6, 0x0804,
-	0x894f, 0x9182, 0x0057, 0x1220, 0x9182, 0x0040, 0x0208, 0x000a,
-	0x0005, 0xad18, 0xad18, 0xad18, 0xad18, 0xad18, 0xad51, 0xae40,
-	0xad18, 0xae4c, 0xad18, 0xad18, 0xad18, 0xad18, 0xad18, 0xad18,
-	0xad18, 0xad18, 0xad18, 0xad18, 0xae4c, 0xad1a, 0xad18, 0xae4a,
-	0x080c, 0x0d65, 0x00b6, 0x0096, 0x6114, 0x2148, 0x6010, 0x2058,
-	0xb800, 0xd0bc, 0x1508, 0xa87b, 0x0000, 0xa867, 0x0103, 0xa877,
-	0x0000, 0xa87c, 0xd0ac, 0x0128, 0xa834, 0xa938, 0x9115, 0x190c,
-	0xaed1, 0x080c, 0x67cb, 0x6210, 0x2258, 0xba3c, 0x82ff, 0x0110,
-	0x8211, 0xba3e, 0xb8c0, 0x9005, 0x0110, 0x080c, 0x63ba, 0x080c,
-	0x9be6, 0x009e, 0x00be, 0x0005, 0xa87c, 0xd0ac, 0x09e0, 0xa838,
-	0xa934, 0x9105, 0x09c0, 0xa880, 0xd0bc, 0x19a8, 0x080c, 0xbbba,
-	0x0c80, 0x00b6, 0x0096, 0x6114, 0x2148, 0x601c, 0xd0fc, 0x1110,
-	0x7644, 0x0008, 0x9036, 0x96b4, 0x0fff, 0x86ff, 0x1590, 0x6010,
-	0x2058, 0xb800, 0xd0bc, 0x1904, 0xae2f, 0xa87b, 0x0000, 0xa867,
-	0x0103, 0xae76, 0xa87c, 0xd0ac, 0x0128, 0xa834, 0xa938, 0x9115,
-	0x190c, 0xaed1, 0x080c, 0x67cb, 0x6210, 0x2258, 0xba3c, 0x82ff,
-	0x0110, 0x8211, 0xba3e, 0xb8c0, 0x9005, 0x0110, 0x080c, 0x63ba,
-	0x601c, 0xd0fc, 0x1148, 0x7044, 0xd0e4, 0x1904, 0xae13, 0x080c,
-	0x9be6, 0x009e, 0x00be, 0x0005, 0x2009, 0x0211, 0x210c, 0x080c,
-	0x0d65, 0x968c, 0x0c00, 0x0150, 0x6010, 0x2058, 0xb800, 0xd0bc,
-	0x1904, 0xae17, 0x7348, 0xab92, 0x734c, 0xab8e, 0x968c, 0x00ff,
-	0x9186, 0x0002, 0x0508, 0x9186, 0x0028, 0x1118, 0xa87b, 0x001c,
-	0x00e8, 0xd6dc, 0x01a0, 0xa87b, 0x0015, 0xa87c, 0xd0ac, 0x0170,
-	0xa938, 0xaa34, 0x2100, 0x9205, 0x0148, 0x7048, 0x9106, 0x1118,
-	0x704c, 0x9206, 0x0118, 0xa992, 0xaa8e, 0xc6dc, 0x0038, 0xd6d4,
-	0x0118, 0xa87b, 0x0007, 0x0010, 0xa87b, 0x0000, 0xa867, 0x0103,
-	0xae76, 0x901e, 0xd6c4, 0x01d8, 0x9686, 0x0100, 0x1130, 0x7064,
-	0x9005, 0x1118, 0xc6c4, 0x0804, 0xad5d, 0x735c, 0xab86, 0x83ff,
-	0x0170, 0x938a, 0x0009, 0x0210, 0x2019, 0x0008, 0x0036, 0x2308,
-	0x2019, 0x0018, 0x2011, 0x0025, 0x080c, 0xb426, 0x003e, 0xd6cc,
-	0x0904, 0xad72, 0x7154, 0xa98a, 0x81ff, 0x0904, 0xad72, 0x9192,
-	0x0021, 0x1278, 0x8304, 0x9098, 0x0018, 0x2011, 0x0029, 0x080c,
-	0xb426, 0x2011, 0x0205, 0x2013, 0x0000, 0x080c, 0xbf34, 0x0804,
-	0xad72, 0xa868, 0xd0fc, 0x0120, 0x2009, 0x0020, 0xa98a, 0x0c50,
-	0x00a6, 0x2950, 0x080c, 0xb3c5, 0x00ae, 0x080c, 0xbf34, 0x080c,
-	0xb416, 0x0804, 0xad74, 0x080c, 0xbb7d, 0x0804, 0xad89, 0xa87c,
-	0xd0ac, 0x0904, 0xad9a, 0xa880, 0xd0bc, 0x1904, 0xad9a, 0x7348,
-	0xa838, 0x9306, 0x11c8, 0x734c, 0xa834, 0x931e, 0x0904, 0xad9a,
-	0xd6d4, 0x0190, 0xab38, 0x9305, 0x0904, 0xad9a, 0x0068, 0xa87c,
-	0xd0ac, 0x0904, 0xad65, 0xa838, 0xa934, 0x9105, 0x0904, 0xad65,
-	0xa880, 0xd0bc, 0x1904, 0xad65, 0x080c, 0xbbba, 0x0804, 0xad89,
-	0x00f6, 0x2079, 0x026c, 0x7c04, 0x7b00, 0x7e0c, 0x7d08, 0x00fe,
-	0x0021, 0x0005, 0x0011, 0x0005, 0x0005, 0x0096, 0x6003, 0x0002,
-	0x6007, 0x0043, 0x6014, 0x2048, 0xa87c, 0xd0ac, 0x0128, 0x009e,
-	0x0005, 0x2130, 0x2228, 0x0058, 0x2400, 0xa9ac, 0x910a, 0x2300,
-	0xaab0, 0x9213, 0x2600, 0x9102, 0x2500, 0x9203, 0x0e90, 0xac46,
-	0xab4a, 0xae36, 0xad3a, 0x6044, 0xd0fc, 0x190c, 0x98f0, 0x604b,
-	0x0000, 0x080c, 0x1af7, 0x1118, 0x6144, 0x080c, 0x8513, 0x009e,
-	0x0005, 0x9182, 0x0057, 0x1220, 0x9182, 0x0040, 0x0208, 0x000a,
-	0x0005, 0xae98, 0xae98, 0xae98, 0xae98, 0xae98, 0xae98, 0xae98,
-	0xae98, 0xae98, 0xae98, 0xae9a, 0xae98, 0xae98, 0xae98, 0xae98,
-	0xaeab, 0xae98, 0xae98, 0xae98, 0xae98, 0xaecf, 0xae98, 0xae98,
-	0x080c, 0x0d65, 0x6004, 0x9086, 0x0040, 0x1110, 0x080c, 0x8891,
-	0x2019, 0x0001, 0x080c, 0x929d, 0x6003, 0x0002, 0x080c, 0xbfac,
-	0x080c, 0x88ec, 0x0005, 0x6004, 0x9086, 0x0040, 0x1110, 0x080c,
-	0x8891, 0x2019, 0x0001, 0x080c, 0x929d, 0x080c, 0x88ec, 0x080c,
-	0x302e, 0x080c, 0xbfa4, 0x0096, 0x6114, 0x2148, 0x080c, 0xb870,
-	0x0150, 0xa867, 0x0103, 0xa87b, 0x0029, 0xa877, 0x0000, 0x080c,
-	0x69b5, 0x080c, 0xba5f, 0x009e, 0x080c, 0x9be6, 0x0005, 0x080c,
-	0x0d65, 0xa87b, 0x0015, 0xd1fc, 0x0180, 0xa87b, 0x0007, 0x8002,
-	0x8000, 0x810a, 0x9189, 0x0000, 0x0006, 0x0016, 0x2009, 0x1a4f,
-	0x2104, 0x8000, 0x200a, 0x001e, 0x000e, 0xa992, 0xa88e, 0x0005,
-	0x9182, 0x0057, 0x1220, 0x9182, 0x0040, 0x0208, 0x000a, 0x0005,
-	0xaf07, 0xaf07, 0xaf07, 0xaf07, 0xaf07, 0xaf09, 0xaf07, 0xaf07,
-	0xafc6, 0xaf07, 0xaf07, 0xaf07, 0xaf07, 0xaf07, 0xaf07, 0xaf07,
-	0xaf07, 0xaf07, 0xaf07, 0xb104, 0xaf07, 0xb10e, 0xaf07, 0x080c,
-	0x0d65, 0x601c, 0xd0bc, 0x0178, 0xd084, 0x0168, 0xd0f4, 0x0120,
-	0xc084, 0x601e, 0x0804, 0xacf9, 0x6114, 0x0096, 0x2148, 0xa87c,
-	0xc0e5, 0xa87e, 0x009e, 0x0076, 0x00a6, 0x00e6, 0x0096, 0x2071,
-	0x0260, 0x6114, 0x2150, 0x601c, 0xd0fc, 0x1110, 0x7644, 0x0008,
-	0x9036, 0xb676, 0x96b4, 0x0fff, 0xb77c, 0xc7e5, 0xb77e, 0x6210,
-	0x00b6, 0x2258, 0xba3c, 0x82ff, 0x0110, 0x8211, 0xba3e, 0x00be,
-	0x86ff, 0x0904, 0xafbf, 0x9694, 0xff00, 0x9284, 0x0c00, 0x0120,
-	0x7048, 0xb092, 0x704c, 0xb08e, 0x9284, 0x0300, 0x0904, 0xafbf,
-	0x9686, 0x0100, 0x1130, 0x7064, 0x9005, 0x1118, 0xc6c4, 0xb676,
-	0x0c38, 0x080c, 0x102f, 0x090c, 0x0d65, 0x2900, 0xb07a, 0xb77c,
-	0x97bd, 0x0200, 0xb77e, 0xa867, 0x0103, 0xb068, 0xa86a, 0xb06c,
-	0xa86e, 0xb070, 0xa872, 0x7044, 0x9084, 0xf000, 0x9635, 0xae76,
-	0x968c, 0x0c00, 0x0120, 0x7348, 0xab92, 0x734c, 0xab8e, 0x968c,
-	0x00ff, 0x9186, 0x0002, 0x0180, 0x9186, 0x0028, 0x1118, 0xa87b,
-	0x001c, 0x0060, 0xd6dc, 0x0118, 0xa87b, 0x0015, 0x0038, 0xd6d4,
-	0x0118, 0xa87b, 0x0007, 0x0010, 0xa87b, 0x0000, 0xaf7e, 0xb080,
-	0xa882, 0xb084, 0xa886, 0x901e, 0xd6c4, 0x0190, 0x735c, 0xab86,
-	0x83ff, 0x0170, 0x938a, 0x0009, 0x0210, 0x2019, 0x0008, 0x0036,
-	0x2308, 0x2019, 0x0018, 0x2011, 0x0025, 0x080c, 0xb426, 0x003e,
-	0xd6cc, 0x01e8, 0x7154, 0xa98a, 0x81ff, 0x01c8, 0x9192, 0x0021,
-	0x1260, 0x8304, 0x9098, 0x0018, 0x2011, 0x0029, 0x080c, 0xb426,
-	0x2011, 0x0205, 0x2013, 0x0000, 0x0050, 0xb068, 0xd0fc, 0x0120,
-	0x2009, 0x0020, 0xa98a, 0x0c68, 0x2950, 0x080c, 0xb3c5, 0x080c,
-	0x190c, 0x009e, 0x00ee, 0x00ae, 0x007e, 0x0005, 0x2001, 0x1960,
-	0x2004, 0x604a, 0x0096, 0x6114, 0x2148, 0xa83c, 0xa940, 0x9105,
-	0x1118, 0xa87c, 0xc0dc, 0xa87e, 0x6003, 0x0002, 0x080c, 0xbfb5,
-	0x0904, 0xb0ff, 0x604b, 0x0000, 0x6010, 0x00b6, 0x2058, 0xb800,
-	0x00be, 0xd0bc, 0x1500, 0xd1cc, 0x0904, 0xb0c4, 0xa978, 0xa868,
-	0xd0fc, 0x0904, 0xb085, 0x0016, 0xa87c, 0x0006, 0xa880, 0x0006,
-	0x00a6, 0x2150, 0xb174, 0x9184, 0x00ff, 0x90b6, 0x0002, 0x0904,
-	0xb053, 0x9086, 0x0028, 0x1904, 0xb03f, 0xa87b, 0x001c, 0xb07b,
-	0x001c, 0x0804, 0xb05b, 0x6024, 0xd0f4, 0x11d0, 0xa838, 0xaa34,
-	0x9205, 0x09c8, 0xa838, 0xaa90, 0x9206, 0x1120, 0xa88c, 0xaa34,
-	0x9206, 0x0988, 0x6024, 0xd0d4, 0x1148, 0xa9ac, 0xa834, 0x9102,
-	0x603a, 0xa9b0, 0xa838, 0x9103, 0x603e, 0x6024, 0xc0f5, 0x6026,
-	0x6010, 0x00b6, 0x2058, 0xb83c, 0x8000, 0xb83e, 0x00be, 0x601c,
-	0xc0fc, 0x601e, 0x9006, 0xa876, 0xa892, 0xa88e, 0xa87c, 0xc0e4,
-	0xa87e, 0xd0cc, 0x0140, 0xc0cc, 0xa87e, 0x0096, 0xa878, 0x2048,
-	0x080c, 0x0fe1, 0x009e, 0x080c, 0xbbba, 0x0804, 0xb0ff, 0xd1dc,
-	0x0158, 0xa87b, 0x0015, 0xb07b, 0x0015, 0x080c, 0xbe57, 0x0118,
-	0xb174, 0xc1dc, 0xb176, 0x0078, 0xd1d4, 0x0128, 0xa87b, 0x0007,
-	0xb07b, 0x0007, 0x0040, 0xa87c, 0xd0ac, 0x0128, 0xa834, 0xa938,
-	0x9115, 0x190c, 0xaed1, 0xa87c, 0xb07e, 0xa890, 0xb092, 0xa88c,
-	0xb08e, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0019, 0x20a0, 0x20a9,
-	0x0020, 0x8a06, 0x8006, 0x8007, 0x9094, 0x003f, 0x22e0, 0x9084,
-	0xffc0, 0x9080, 0x0019, 0x2098, 0x4003, 0x00ae, 0x000e, 0xa882,
-	0x000e, 0xa87e, 0x080c, 0xbf34, 0x001e, 0xa874, 0x0006, 0x2148,
-	0x080c, 0x0fe1, 0x001e, 0x0804, 0xb0f1, 0x0016, 0x00a6, 0x2150,
-	0xb174, 0x9184, 0x00ff, 0x90b6, 0x0002, 0x01e0, 0x9086, 0x0028,
-	0x1128, 0xa87b, 0x001c, 0xb07b, 0x001c, 0x00e0, 0xd1dc, 0x0158,
-	0xa87b, 0x0015, 0xb07b, 0x0015, 0x080c, 0xbe57, 0x0118, 0xb174,
-	0xc1dc, 0xb176, 0x0078, 0xd1d4, 0x0128, 0xa87b, 0x0007, 0xb07b,
-	0x0007, 0x0040, 0xa87c, 0xd0ac, 0x0128, 0xa834, 0xa938, 0x9115,
-	0x190c, 0xaed1, 0xa890, 0xb092, 0xa88c, 0xb08e, 0xa87c, 0xb07e,
-	0x00ae, 0x080c, 0x0fe1, 0x009e, 0x080c, 0xbf34, 0xa974, 0x0016,
-	0x080c, 0xb416, 0x001e, 0x0468, 0xa867, 0x0103, 0xa974, 0x9184,
-	0x00ff, 0x90b6, 0x0002, 0x01b0, 0x9086, 0x0028, 0x1118, 0xa87b,
-	0x001c, 0x00d0, 0xd1dc, 0x0148, 0xa87b, 0x0015, 0x080c, 0xbe57,
-	0x0118, 0xa974, 0xc1dc, 0xa976, 0x0078, 0xd1d4, 0x0118, 0xa87b,
-	0x0007, 0x0050, 0xa87b, 0x0000, 0xa87c, 0xd0ac, 0x0128, 0xa834,
-	0xa938, 0x9115, 0x190c, 0xaed1, 0xa974, 0x0016, 0x080c, 0x67cb,
-	0x001e, 0x6010, 0x00b6, 0x2058, 0xb8c0, 0x0016, 0x9005, 0x190c,
-	0x63ba, 0x001e, 0x00be, 0xd1e4, 0x1120, 0x080c, 0x9be6, 0x009e,
-	0x0005, 0x080c, 0xbb7d, 0x0cd8, 0x6114, 0x0096, 0x2148, 0xa97c,
-	0x080c, 0xbfb5, 0x190c, 0x192a, 0x009e, 0x0005, 0x0096, 0x6114,
-	0x2148, 0xa83c, 0xa940, 0x9105, 0x01e8, 0xa877, 0x0000, 0xa87b,
-	0x0000, 0xa867, 0x0103, 0x00b6, 0x6010, 0x2058, 0xa834, 0xa938,
-	0x9115, 0x11a0, 0x080c, 0x67cb, 0xba3c, 0x8211, 0x0208, 0xba3e,
-	0xb8c0, 0x9005, 0x0110, 0x080c, 0x63ba, 0x080c, 0x9be6, 0x00be,
-	0x009e, 0x0005, 0xa87c, 0xc0dc, 0xa87e, 0x08f8, 0xb800, 0xd0bc,
-	0x1120, 0xa834, 0x080c, 0xaed1, 0x0c28, 0xa880, 0xd0bc, 0x1dc8,
-	0x080c, 0xbbba, 0x0c60, 0x080c, 0x8891, 0x0010, 0x080c, 0x88ec,
-	0x601c, 0xd084, 0x0110, 0x080c, 0x193e, 0x080c, 0xb870, 0x01f0,
-	0x0096, 0x6114, 0x2148, 0x080c, 0xba85, 0x1118, 0x080c, 0xa59c,
-	0x00a0, 0xa867, 0x0103, 0x2009, 0x180c, 0x210c, 0xd18c, 0x1198,
-	0xd184, 0x1170, 0x6108, 0xa97a, 0x918e, 0x0029, 0x1110, 0x080c,
-	0xd563, 0xa877, 0x0000, 0x080c, 0x69b5, 0x009e, 0x0804, 0x9c20,
-	0xa87b, 0x0004, 0x0cb0, 0xa87b, 0x0004, 0x0c98, 0x9182, 0x0057,
-	0x1220, 0x9182, 0x0040, 0x0208, 0x000a, 0x0005, 0xb195, 0xb195,
-	0xb195, 0xb195, 0xb195, 0xb197, 0xb195, 0xb195, 0xb195, 0xb195,
-	0xb195, 0xb195, 0xb195, 0xb195, 0xb195, 0xb195, 0xb195, 0xb195,
-	0xb195, 0xb195, 0xb1bb, 0xb195, 0xb195, 0x080c, 0x0d65, 0x080c,
-	0x53b0, 0x01f8, 0x6014, 0x7144, 0x918c, 0x0fff, 0x9016, 0xd1c4,
-	0x0118, 0x7264, 0x9294, 0x00ff, 0x0096, 0x904d, 0x0188, 0xa87b,
-	0x0000, 0xa864, 0x9086, 0x0139, 0x0128, 0xa867, 0x0103, 0xa976,
-	0xaa96, 0x0030, 0xa897, 0x4000, 0xa99a, 0xaa9e, 0x080c, 0x69b5,
-	0x009e, 0x0804, 0x9be6, 0x080c, 0x53b0, 0x0dd8, 0x6014, 0x900e,
-	0x9016, 0x0c10, 0x9182, 0x0085, 0x0002, 0xb1d4, 0xb1d2, 0xb1d2,
-	0xb1e0, 0xb1d2, 0xb1d2, 0xb1d2, 0xb1d2, 0xb1d2, 0xb1d2, 0xb1d2,
-	0xb1d2, 0xb1d2, 0x080c, 0x0d65, 0x6003, 0x0001, 0x6106, 0x0126,
-	0x2091, 0x8000, 0x2009, 0x8020, 0x080c, 0x84e7, 0x012e, 0x0005,
-	0x0026, 0x0056, 0x00d6, 0x00e6, 0x2071, 0x0260, 0x7224, 0x6216,
-	0x7220, 0x080c, 0xb85e, 0x01a0, 0x2268, 0x6800, 0x9086, 0x0000,
-	0x0178, 0x6010, 0x6d10, 0x952e, 0x1158, 0x00c6, 0x2d60, 0x080c,
-	0xb451, 0x00ce, 0x0128, 0x6803, 0x0002, 0x6007, 0x0086, 0x0010,
-	0x6007, 0x0087, 0x6003, 0x0001, 0x2009, 0x8020, 0x080c, 0x84e7,
-	0x7220, 0x080c, 0xb85e, 0x0178, 0x6810, 0x00b6, 0x2058, 0xb800,
-	0x00be, 0xd0bc, 0x0140, 0x6824, 0xd0ec, 0x0128, 0x00c6, 0x2d60,
-	0x080c, 0xbbba, 0x00ce, 0x00ee, 0x00de, 0x005e, 0x002e, 0x0005,
-	0x9186, 0x0013, 0x1160, 0x6004, 0x908a, 0x0085, 0x0a0c, 0x0d65,
-	0x908a, 0x0092, 0x1a0c, 0x0d65, 0x9082, 0x0085, 0x00e2, 0x9186,
-	0x0027, 0x0120, 0x9186, 0x0014, 0x190c, 0x0d65, 0x080c, 0x8891,
-	0x0096, 0x6014, 0x2048, 0x080c, 0xb870, 0x0140, 0xa867, 0x0103,
-	0xa877, 0x0000, 0xa87b, 0x0029, 0x080c, 0x69b5, 0x009e, 0x080c,
-	0x9c20, 0x0804, 0x894f, 0xb258, 0xb25a, 0xb25a, 0xb258, 0xb258,
-	0xb258, 0xb258, 0xb258, 0xb258, 0xb258, 0xb258, 0xb258, 0xb258,
-	0x080c, 0x0d65, 0x080c, 0x9c20, 0x0005, 0x9186, 0x0013, 0x1130,
-	0x6004, 0x9082, 0x0085, 0x2008, 0x0804, 0xb2a9, 0x9186, 0x0027,
-	0x1558, 0x080c, 0x8891, 0x080c, 0x302e, 0x080c, 0xbfa4, 0x0096,
-	0x6014, 0x2048, 0x080c, 0xb870, 0x0150, 0xa867, 0x0103, 0xa877,
-	0x0000, 0xa87b, 0x0029, 0x080c, 0x69b5, 0x080c, 0xba5f, 0x009e,
-	0x080c, 0x9be6, 0x0005, 0x9186, 0x0089, 0x0118, 0x9186, 0x008a,
-	0x1140, 0x080c, 0x9ab6, 0x0128, 0x9086, 0x000c, 0x0904, 0xb2e1,
-	0x0000, 0x080c, 0x9c9f, 0x0c70, 0x9186, 0x0014, 0x1d60, 0x080c,
-	0x8891, 0x0096, 0x6014, 0x2048, 0x080c, 0xb870, 0x0d00, 0xa867,
-	0x0103, 0xa877, 0x0000, 0xa87b, 0x0006, 0xa880, 0xc0ec, 0xa882,
-	0x0890, 0x0002, 0xb2b9, 0xb2b7, 0xb2b7, 0xb2b7, 0xb2b7, 0xb2b7,
-	0xb2cd, 0xb2b7, 0xb2b7, 0xb2b7, 0xb2b7, 0xb2b7, 0xb2b7, 0x080c,
-	0x0d65, 0x6034, 0x908c, 0xff00, 0x810f, 0x9186, 0x0039, 0x0118,
-	0x9186, 0x0035, 0x1118, 0x2001, 0x195e, 0x0010, 0x2001, 0x195f,
-	0x2004, 0x601a, 0x6003, 0x000c, 0x0005, 0x6034, 0x908c, 0xff00,
-	0x810f, 0x9186, 0x0039, 0x0118, 0x9186, 0x0035, 0x1118, 0x2001,
-	0x195e, 0x0010, 0x2001, 0x195f, 0x2004, 0x601a, 0x6003, 0x000e,
-	0x0005, 0x9182, 0x0092, 0x1220, 0x9182, 0x0085, 0x0208, 0x0012,
-	0x0804, 0x9c9f, 0xb2f7, 0xb2f7, 0xb2f7, 0xb2f7, 0xb2f9, 0xb346,
-	0xb2f7, 0xb2f7, 0xb2f7, 0xb2f7, 0xb2f7, 0xb2f7, 0xb2f7, 0x080c,
-	0x0d65, 0x0096, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc,
-	0x0168, 0x6034, 0x908c, 0xff00, 0x810f, 0x9186, 0x0039, 0x0118,
-	0x9186, 0x0035, 0x1118, 0x009e, 0x0804, 0xb35a, 0x080c, 0xb870,
-	0x1118, 0x080c, 0xba5f, 0x0068, 0x6014, 0x2048, 0x080c, 0xbfbb,
-	0x1110, 0x080c, 0xba5f, 0xa867, 0x0103, 0x080c, 0xbf6f, 0x080c,
-	0x69b5, 0x00d6, 0x2c68, 0x080c, 0x9b90, 0x01d0, 0x6003, 0x0001,
-	0x6007, 0x001e, 0x600b, 0xffff, 0x2009, 0x026e, 0x210c, 0x613a,
-	0x2009, 0x026f, 0x210c, 0x613e, 0x6910, 0x6112, 0x080c, 0xbd09,
-	0x695c, 0x615e, 0x6023, 0x0001, 0x2009, 0x8020, 0x080c, 0x84e7,
-	0x2d60, 0x00de, 0x080c, 0x9be6, 0x009e, 0x0005, 0x6010, 0x00b6,
-	0x2058, 0xb800, 0x00be, 0xd0bc, 0x05a0, 0x6034, 0x908c, 0xff00,
-	0x810f, 0x9186, 0x0035, 0x0130, 0x9186, 0x001e, 0x0118, 0x9186,
-	0x0039, 0x1538, 0x00d6, 0x2c68, 0x080c, 0xbf07, 0x11f0, 0x080c,
-	0x9b90, 0x01d8, 0x6106, 0x6003, 0x0001, 0x6023, 0x0001, 0x6910,
-	0x6112, 0x692c, 0x612e, 0x6930, 0x6132, 0x6934, 0x918c, 0x00ff,
-	0x6136, 0x6938, 0x613a, 0x693c, 0x613e, 0x695c, 0x615e, 0x080c,
-	0xbd09, 0x2009, 0x8020, 0x080c, 0x84e7, 0x2d60, 0x00de, 0x0804,
-	0x9be6, 0x0096, 0x6014, 0x2048, 0x080c, 0xb870, 0x01c8, 0xa867,
-	0x0103, 0xa880, 0xd0b4, 0x0128, 0xc0ec, 0xa882, 0xa87b, 0x0006,
-	0x0048, 0xd0bc, 0x0118, 0xa87b, 0x0002, 0x0020, 0xa87b, 0x0005,
-	0x080c, 0xbb79, 0xa877, 0x0000, 0x080c, 0x69b5, 0x080c, 0xba5f,
-	0x009e, 0x0804, 0x9be6, 0x0016, 0x0096, 0x6014, 0x2048, 0x080c,
-	0xb870, 0x0140, 0xa867, 0x0103, 0xa87b, 0x0028, 0xa877, 0x0000,
-	0x080c, 0x69b5, 0x009e, 0x001e, 0x9186, 0x0013, 0x0158, 0x9186,
-	0x0014, 0x0130, 0x9186, 0x0027, 0x0118, 0x080c, 0x9c9f, 0x0020,
-	0x080c, 0x8891, 0x080c, 0x9c20, 0x0005, 0x0056, 0x0066, 0x0096,
-	0x00a6, 0x2029, 0x0001, 0x9182, 0x0101, 0x1208, 0x0010, 0x2009,
-	0x0100, 0x2130, 0x8304, 0x9098, 0x0018, 0x2009, 0x0020, 0x2011,
-	0x0029, 0x080c, 0xb426, 0x96b2, 0x0020, 0xb004, 0x904d, 0x0110,
-	0x080c, 0x0fe1, 0x080c, 0x102f, 0x0520, 0x8528, 0xa867, 0x0110,
-	0xa86b, 0x0000, 0x2920, 0xb406, 0x968a, 0x003d, 0x1228, 0x2608,
-	0x2011, 0x001b, 0x0499, 0x00a8, 0x96b2, 0x003c, 0x2009, 0x003c,
-	0x2950, 0x2011, 0x001b, 0x0451, 0x0c28, 0x2001, 0x0205, 0x2003,
-	0x0000, 0x00ae, 0x852f, 0x95ad, 0x0003, 0xb566, 0x95ac, 0x0000,
-	0x0048, 0x2001, 0x0205, 0x2003, 0x0000, 0x00ae, 0x852f, 0x95ad,
-	0x0003, 0xb566, 0x009e, 0x006e, 0x005e, 0x0005, 0x00a6, 0x89ff,
-	0x0158, 0xa804, 0x9055, 0x0130, 0xa807, 0x0000, 0x080c, 0x69b5,
-	0x2a48, 0x0cb8, 0x080c, 0x69b5, 0x00ae, 0x0005, 0x00f6, 0x2079,
-	0x0200, 0x7814, 0x9085, 0x0080, 0x7816, 0xd184, 0x0108, 0x8108,
-	0x810c, 0x20a9, 0x0001, 0xa860, 0x20e8, 0xa85c, 0x9200, 0x20a0,
-	0x20e1, 0x0000, 0x2300, 0x9e00, 0x2098, 0x4003, 0x8318, 0x9386,
-	0x0020, 0x1148, 0x2018, 0x2300, 0x9e00, 0x2098, 0x7814, 0x8000,
-	0x9085, 0x0080, 0x7816, 0x8109, 0x1d80, 0x7817, 0x0000, 0x00fe,
-	0x0005, 0x0066, 0x0126, 0x2091, 0x8000, 0x2031, 0x0001, 0x6020,
-	0x9084, 0x000f, 0x0083, 0x012e, 0x006e, 0x0005, 0x0126, 0x2091,
-	0x8000, 0x0066, 0x2031, 0x0000, 0x6020, 0x9084, 0x000f, 0x001b,
-	0x006e, 0x012e, 0x0005, 0xb4a3, 0xb4a3, 0xb49e, 0xb4c7, 0xb47b,
-	0xb49e, 0xb47d, 0xb49e, 0xb47b, 0xb47b, 0xb49e, 0xb49e, 0xb49e,
-	0xb47b, 0xb47b, 0xb47b, 0x080c, 0x0d65, 0x6010, 0x9080, 0x0000,
-	0x2004, 0xd0bc, 0x190c, 0xb4c7, 0x0036, 0x6014, 0x0096, 0x2048,
-	0xa880, 0x009e, 0xd0cc, 0x0118, 0x2019, 0x000c, 0x0038, 0xd094,
-	0x0118, 0x2019, 0x000d, 0x0010, 0x2019, 0x0010, 0x080c, 0xce41,
-	0x6023, 0x0006, 0x6003, 0x0007, 0x003e, 0x0005, 0x9006, 0x0005,
-	0x9085, 0x0001, 0x0005, 0x0096, 0x86ff, 0x11e8, 0x6014, 0x2048,
-	0x080c, 0xb870, 0x01d0, 0x6043, 0xffff, 0xa864, 0x9086, 0x0139,
-	0x1128, 0xa87b, 0x0005, 0xa883, 0x0000, 0x0028, 0x900e, 0x2001,
-	0x0005, 0x080c, 0x6bc6, 0x080c, 0xbb79, 0x080c, 0x69a9, 0x080c,
-	0x9c20, 0x9085, 0x0001, 0x009e, 0x0005, 0x9006, 0x0ce0, 0x080c,
-	0x98c7, 0x080c, 0xbfc9, 0x6000, 0x908a, 0x0016, 0x1a0c, 0x0d65,
-	0x002b, 0x0106, 0x080c, 0x98e3, 0x010e, 0x0005, 0xb4e6, 0xb514,
-	0xb4e8, 0xb53b, 0xb50f, 0xb4e6, 0xb49e, 0xb4a3, 0xb4a3, 0xb49e,
-	0xb49e, 0xb49e, 0xb49e, 0xb49e, 0xb49e, 0xb49e, 0x080c, 0x0d65,
-	0x86ff, 0x1510, 0x6020, 0x9086, 0x0006, 0x01f0, 0x0096, 0x6014,
-	0x2048, 0x080c, 0xb870, 0x0158, 0xa87c, 0xd0cc, 0x0130, 0x0096,
-	0xa878, 0x2048, 0x080c, 0x0fe1, 0x009e, 0x080c, 0xbb79, 0x009e,
-	0x080c, 0xbf49, 0x6007, 0x0085, 0x6003, 0x000b, 0x6023, 0x0002,
-	0x2009, 0x8020, 0x080c, 0x84c9, 0x9085, 0x0001, 0x0005, 0x0066,
-	0x080c, 0x193e, 0x006e, 0x08a0, 0x00e6, 0x2071, 0x19bf, 0x7030,
-	0x9c06, 0x1120, 0x080c, 0x921d, 0x00ee, 0x0850, 0x6020, 0x9084,
-	0x000f, 0x9086, 0x0006, 0x1150, 0x0086, 0x0096, 0x2049, 0x0001,
-	0x2c40, 0x080c, 0x936d, 0x009e, 0x008e, 0x0040, 0x0066, 0x080c,
-	0x9119, 0x190c, 0x0d65, 0x080c, 0x9127, 0x006e, 0x00ee, 0x1904,
-	0xb4e8, 0x0804, 0xb49e, 0x0036, 0x00e6, 0x2071, 0x19bf, 0x704c,
-	0x9c06, 0x1138, 0x901e, 0x080c, 0x929d, 0x00ee, 0x003e, 0x0804,
-	0xb4e8, 0x080c, 0x94a4, 0x00ee, 0x003e, 0x1904, 0xb4e8, 0x0804,
-	0xb49e, 0x00c6, 0x0066, 0x6020, 0x9084, 0x000f, 0x001b, 0x006e,
-	0x00ce, 0x0005, 0xb571, 0xb640, 0xb7aa, 0xb579, 0x9c20, 0xb571,
-	0xce33, 0xbfb1, 0xb640, 0xb56a, 0xb836, 0xb56a, 0xb56a, 0xb56a,
-	0xb56a, 0xb56a, 0x080c, 0x0d65, 0x080c, 0xba85, 0x1110, 0x080c,
-	0xa59c, 0x0005, 0x080c, 0x8891, 0x0804, 0x9be6, 0x601b, 0x0001,
-	0x0005, 0x080c, 0xb870, 0x0130, 0x6014, 0x0096, 0x2048, 0x2c00,
-	0xa896, 0x009e, 0x080c, 0x98c7, 0x080c, 0xbfc9, 0x6000, 0x908a,
-	0x0016, 0x1a0c, 0x0d65, 0x0013, 0x0804, 0x98e3, 0xb59e, 0xb5a0,
-	0xb5ca, 0xb5de, 0xb60b, 0xb59e, 0xb571, 0xb571, 0xb571, 0xb5e5,
-	0xb5e5, 0xb59e, 0xb59e, 0xb59e, 0xb59e, 0xb5ef, 0x080c, 0x0d65,
-	0x00e6, 0x6014, 0x0096, 0x2048, 0xa880, 0xc0b5, 0xa882, 0x009e,
-	0x2071, 0x19bf, 0x7030, 0x9c06, 0x01d0, 0x0066, 0x080c, 0x9119,
-	0x190c, 0x0d65, 0x080c, 0x9127, 0x006e, 0x080c, 0xbf49, 0x6007,
-	0x0085, 0x6003, 0x000b, 0x6023, 0x0002, 0x2001, 0x195f, 0x2004,
-	0x601a, 0x2009, 0x8020, 0x080c, 0x84c9, 0x00ee, 0x0005, 0x601b,
-	0x0001, 0x0cd8, 0x0096, 0x6014, 0x2048, 0xa880, 0xc0b5, 0xa882,
-	0x009e, 0x080c, 0xbf49, 0x6007, 0x0085, 0x6003, 0x000b, 0x6023,
-	0x0002, 0x2009, 0x8020, 0x080c, 0x84c9, 0x0005, 0x080c, 0x98c7,
-	0x080c, 0x9a38, 0x080c, 0x98e3, 0x0c28, 0x0096, 0x601b, 0x0001,
-	0x6014, 0x2048, 0xa880, 0xc0b5, 0xa882, 0x009e, 0x0005, 0x080c,
-	0x53b0, 0x01b8, 0x6014, 0x0096, 0x904d, 0x0190, 0xa864, 0xa867,
-	0x0103, 0xa87b, 0x0006, 0x9086, 0x0139, 0x1150, 0xa867, 0x0139,
-	0xa87b, 0x0030, 0xa897, 0x4005, 0xa89b, 0x0004, 0x080c, 0x69b5,
-	0x009e, 0x0804, 0x9be6, 0x6014, 0x0096, 0x904d, 0x0560, 0xa97c,
-	0xd1e4, 0x1158, 0x611c, 0xd1fc, 0x0530, 0x6110, 0x00b6, 0x2158,
-	0xb93c, 0x8109, 0x0208, 0xb93e, 0x00be, 0x080c, 0x98e3, 0x2001,
-	0x180f, 0x2004, 0xd0c4, 0x0110, 0x009e, 0x0005, 0xa884, 0x009e,
-	0x8003, 0x800b, 0x810b, 0x9108, 0x611a, 0x2001, 0x0037, 0x2c08,
-	0x080c, 0x15b8, 0x6000, 0x9086, 0x0004, 0x1120, 0x2009, 0x0048,
-	0x080c, 0x9c82, 0x0005, 0x009e, 0x080c, 0x193e, 0x0804, 0xb5ca,
-	0x6000, 0x908a, 0x0016, 0x1a0c, 0x0d65, 0x000b, 0x0005, 0xb657,
-	0xb576, 0xb659, 0xb657, 0xb659, 0xb659, 0xb572, 0xb657, 0xb56c,
-	0xb56c, 0xb657, 0xb657, 0xb657, 0xb657, 0xb657, 0xb657, 0x080c,
-	0x0d65, 0x6010, 0x00b6, 0x2058, 0xb804, 0x9084, 0x00ff, 0x00be,
-	0x908a, 0x000c, 0x1a0c, 0x0d65, 0x00b6, 0x0013, 0x00be, 0x0005,
-	0xb674, 0xb741, 0xb676, 0xb6b6, 0xb676, 0xb6b6, 0xb676, 0xb684,
-	0xb674, 0xb6b6, 0xb674, 0xb6a5, 0x080c, 0x0d65, 0x6004, 0x908e,
-	0x0016, 0x05c0, 0x908e, 0x0004, 0x05a8, 0x908e, 0x0002, 0x0590,
-	0x908e, 0x0052, 0x0904, 0xb73d, 0x6004, 0x080c, 0xba85, 0x0904,
-	0xb75a, 0x908e, 0x0004, 0x1110, 0x080c, 0x305d, 0x908e, 0x0021,
-	0x0904, 0xb75e, 0x908e, 0x0022, 0x0904, 0xb7a5, 0x908e, 0x003d,
-	0x0904, 0xb75e, 0x908e, 0x0039, 0x0904, 0xb762, 0x908e, 0x0035,
-	0x0904, 0xb762, 0x908e, 0x001e, 0x0178, 0x908e, 0x0001, 0x1140,
-	0x6010, 0x2058, 0xb804, 0x9084, 0x00ff, 0x9086, 0x0006, 0x0110,
-	0x080c, 0x302e, 0x080c, 0xa59c, 0x0804, 0x9c20, 0x00c6, 0x00d6,
-	0x6104, 0x9186, 0x0016, 0x0904, 0xb72e, 0x9186, 0x0002, 0x1904,
-	0xb703, 0x2001, 0x1836, 0x2004, 0xd08c, 0x11c8, 0x080c, 0x70ba,
-	0x11b0, 0x080c, 0xbf8f, 0x0138, 0x080c, 0x70dd, 0x1120, 0x080c,
-	0x6fc5, 0x0804, 0xb78e, 0x2001, 0x1955, 0x2003, 0x0001, 0x2001,
-	0x1800, 0x2003, 0x0001, 0x080c, 0x6feb, 0x0804, 0xb78e, 0x6010,
-	0x2058, 0x2001, 0x1836, 0x2004, 0xd0ac, 0x1904, 0xb78e, 0xb8a0,
-	0x9084, 0xff80, 0x1904, 0xb78e, 0xb840, 0x9084, 0x00ff, 0x9005,
-	0x0190, 0x8001, 0xb842, 0x6017, 0x0000, 0x6023, 0x0007, 0x601b,
-	0x0398, 0x604b, 0x0000, 0x080c, 0x9b90, 0x0128, 0x2b00, 0x6012,
-	0x6023, 0x0001, 0x0458, 0x00de, 0x00ce, 0x6004, 0x908e, 0x0002,
-	0x11a0, 0x6010, 0x2058, 0xb8a0, 0x9086, 0x007e, 0x1170, 0x2009,
-	0x1836, 0x2104, 0xc085, 0x200a, 0x00e6, 0x2071, 0x1800, 0x080c,
-	0x5c8a, 0x00ee, 0x080c, 0xa59c, 0x0030, 0x080c, 0xa59c, 0x080c,
-	0x302e, 0x080c, 0xbfa4, 0x00e6, 0x0126, 0x2091, 0x8000, 0x080c,
-	0x305d, 0x012e, 0x00ee, 0x080c, 0x9c20, 0x0005, 0x2001, 0x0002,
-	0x080c, 0x61e0, 0x6003, 0x0001, 0x6007, 0x0002, 0x080c, 0x84ee,
-	0x080c, 0x894f, 0x00de, 0x00ce, 0x0c80, 0x080c, 0x305d, 0x0804,
-	0xb6b2, 0x00c6, 0x00d6, 0x6104, 0x9186, 0x0016, 0x0d38, 0x6010,
-	0x2058, 0xb840, 0x9084, 0x00ff, 0x9005, 0x0904, 0xb703, 0x8001,
-	0xb842, 0x6003, 0x0001, 0x080c, 0x84ee, 0x080c, 0x894f, 0x00de,
-	0x00ce, 0x0898, 0x080c, 0xa59c, 0x0804, 0xb6b4, 0x080c, 0xa5d8,
-	0x0804, 0xb6b4, 0x00d6, 0x2c68, 0x6104, 0x080c, 0xbf07, 0x00de,
-	0x0118, 0x080c, 0x9be6, 0x0408, 0x6004, 0x8007, 0x6134, 0x918c,
-	0x00ff, 0x9105, 0x6036, 0x6007, 0x0085, 0x6003, 0x000b, 0x6023,
-	0x0002, 0x603c, 0x600a, 0x2001, 0x195f, 0x2004, 0x601a, 0x602c,
-	0x2c08, 0x2060, 0x6024, 0xd0b4, 0x0108, 0xc085, 0xc0b5, 0x6026,
-	0x2160, 0x2009, 0x8020, 0x080c, 0x84e7, 0x0005, 0x00de, 0x00ce,
-	0x080c, 0xa59c, 0x080c, 0x302e, 0x00e6, 0x0126, 0x2091, 0x8000,
-	0x080c, 0x305d, 0x6017, 0x0000, 0x6023, 0x0007, 0x601b, 0x0398,
-	0x604b, 0x0000, 0x012e, 0x00ee, 0x0005, 0x080c, 0xa020, 0x1904,
-	0xb75a, 0x0005, 0x6000, 0x908a, 0x0016, 0x1a0c, 0x0d65, 0x0096,
-	0x00d6, 0x001b, 0x00de, 0x009e, 0x0005, 0xb7c5, 0xb7c5, 0xb7c5,
-	0xb7c5, 0xb7c5, 0xb7c5, 0xb7c5, 0xb7c5, 0xb7c5, 0xb571, 0xb7c5,
-	0xb576, 0xb7c7, 0xb576, 0xb7e1, 0xb7c5, 0x080c, 0x0d65, 0x6004,
-	0x9086, 0x008b, 0x01b0, 0x6034, 0x908c, 0xff00, 0x810f, 0x9186,
-	0x0035, 0x1130, 0x602c, 0x9080, 0x0009, 0x200c, 0xc185, 0x2102,
-	0x6007, 0x008b, 0x6003, 0x000d, 0x2009, 0x8020, 0x080c, 0x84e7,
-	0x0005, 0x080c, 0xbf83, 0x0118, 0x080c, 0xbf96, 0x0010, 0x080c,
-	0xbfa4, 0x080c, 0xba5f, 0x080c, 0xb870, 0x0570, 0x080c, 0x302e,
-	0x080c, 0xb870, 0x0168, 0x6014, 0x2048, 0xa867, 0x0103, 0xa87b,
-	0x0006, 0xa877, 0x0000, 0xa880, 0xc0ed, 0xa882, 0x080c, 0x69b5,
-	0x2c68, 0x080c, 0x9b90, 0x0150, 0x6810, 0x6012, 0x080c, 0xbd09,
-	0x00c6, 0x2d60, 0x080c, 0x9c20, 0x00ce, 0x0008, 0x2d60, 0x6017,
-	0x0000, 0x6023, 0x0001, 0x6007, 0x0001, 0x6003, 0x0001, 0x080c,
-	0x84ee, 0x080c, 0x894f, 0x00c8, 0x080c, 0xbf83, 0x0138, 0x6034,
-	0x9086, 0x4000, 0x1118, 0x080c, 0x302e, 0x08d0, 0x6034, 0x908c,
-	0xff00, 0x810f, 0x9186, 0x0039, 0x0118, 0x9186, 0x0035, 0x1118,
-	0x080c, 0x302e, 0x0868, 0x080c, 0x9c20, 0x0005, 0x6000, 0x908a,
-	0x0016, 0x1a0c, 0x0d65, 0x0002, 0xb84c, 0xb84c, 0xb84e, 0xb84e,
-	0xb84e, 0xb84c, 0xb84c, 0x9c20, 0xb84c, 0xb84c, 0xb84c, 0xb84c,
-	0xb84c, 0xb84c, 0xb84c, 0xb84c, 0x080c, 0x0d65, 0x080c, 0x98c7,
-	0x080c, 0x9a38, 0x080c, 0x98e3, 0x6114, 0x0096, 0x2148, 0xa87b,
-	0x0006, 0x080c, 0x69b5, 0x009e, 0x0804, 0x9be6, 0x9284, 0x0003,
-	0x1158, 0x9282, 0x1ddc, 0x0240, 0x2001, 0x1819, 0x2004, 0x9202,
-	0x1218, 0x9085, 0x0001, 0x0005, 0x9006, 0x0ce8, 0x0096, 0x0028,
-	0x0096, 0x0006, 0x6014, 0x2048, 0x000e, 0x0006, 0x9984, 0xf000,
-	0x9086, 0xf000, 0x0110, 0x080c, 0x10da, 0x000e, 0x009e, 0x0005,
-	0x00e6, 0x00c6, 0x0036, 0x0006, 0x0126, 0x2091, 0x8000, 0x2061,
-	0x1ddc, 0x2071, 0x1800, 0x7350, 0x7070, 0x9302, 0x1640, 0x6020,
-	0x9206, 0x11f8, 0x080c, 0xbf8f, 0x0180, 0x9286, 0x0001, 0x1168,
-	0x6004, 0x9086, 0x0004, 0x1148, 0x080c, 0x302e, 0x080c, 0xbfa4,
-	0x00c6, 0x080c, 0x9c20, 0x00ce, 0x0060, 0x080c, 0xbc7b, 0x0148,
-	0x080c, 0xba85, 0x1110, 0x080c, 0xa59c, 0x00c6, 0x080c, 0x9be6,
-	0x00ce, 0x9ce0, 0x001c, 0x7064, 0x9c02, 0x1208, 0x08a0, 0x012e,
-	0x000e, 0x003e, 0x00ce, 0x00ee, 0x0005, 0x00e6, 0x00c6, 0x0016,
-	0x9188, 0x1000, 0x210c, 0x81ff, 0x0128, 0x2061, 0x1b09, 0x6112,
-	0x080c, 0x302e, 0x9006, 0x0010, 0x9085, 0x0001, 0x001e, 0x00ce,
-	0x00ee, 0x0005, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0x9b90,
-	0x01b0, 0x665e, 0x2b00, 0x6012, 0x080c, 0x53b0, 0x0118, 0x080c,
-	0xb9a1, 0x0168, 0x080c, 0xbd09, 0x6023, 0x0003, 0x2009, 0x004b,
-	0x080c, 0x9c82, 0x9085, 0x0001, 0x012e, 0x00ce, 0x0005, 0x9006,
-	0x0cd8, 0x00c6, 0x0126, 0x2091, 0x8000, 0xbaa0, 0x080c, 0x9c55,
-	0x0580, 0x605f, 0x0000, 0x2b00, 0x6012, 0x080c, 0xbd09, 0x6023,
-	0x0003, 0x0016, 0x080c, 0x98c7, 0x080c, 0x8658, 0x0076, 0x903e,
-	0x080c, 0x853d, 0x2c08, 0x080c, 0xd011, 0x007e, 0x080c, 0x98e3,
-	0x001e, 0xd184, 0x0128, 0x080c, 0x9be6, 0x9085, 0x0001, 0x0070,
-	0x080c, 0x53b0, 0x0128, 0xd18c, 0x1170, 0x080c, 0xb9a1, 0x0148,
-	0x2009, 0x004c, 0x080c, 0x9c82, 0x9085, 0x0001, 0x012e, 0x00ce,
-	0x0005, 0x9006, 0x0cd8, 0x2900, 0x6016, 0x0c90, 0x2009, 0x004d,
-	0x0010, 0x2009, 0x004e, 0x00f6, 0x00c6, 0x0046, 0x0016, 0x080c,
-	0x9b90, 0x2c78, 0x0590, 0x7e5e, 0x2b00, 0x7812, 0x7823, 0x0003,
-	0x2021, 0x0005, 0x080c, 0xb9b3, 0x9186, 0x004d, 0x0118, 0x9186,
-	0x004e, 0x0148, 0x2001, 0x1958, 0x200c, 0xd1fc, 0x0168, 0x2f60,
-	0x080c, 0x9be6, 0x00d0, 0x2001, 0x1957, 0x200c, 0xd1fc, 0x0120,
-	0x2f60, 0x080c, 0x9be6, 0x0088, 0x2f60, 0x080c, 0x53b0, 0x0138,
-	0xd18c, 0x1118, 0x04f1, 0x0148, 0x0010, 0x2900, 0x7816, 0x001e,
-	0x0016, 0x080c, 0x9c82, 0x9085, 0x0001, 0x001e, 0x004e, 0x00ce,
-	0x00fe, 0x0005, 0x00f6, 0x00c6, 0x0046, 0x080c, 0x9b90, 0x2c78,
-	0x0508, 0x7e5e, 0x2b00, 0x7812, 0x7823, 0x0003, 0x0096, 0x2021,
-	0x0004, 0x0489, 0x009e, 0x2001, 0x1956, 0x200c, 0xd1fc, 0x0120,
-	0x2f60, 0x080c, 0x9be6, 0x0060, 0x2f60, 0x080c, 0x53b0, 0x0120,
-	0xd18c, 0x1160, 0x0071, 0x0130, 0x2009, 0x0052, 0x080c, 0x9c82,
-	0x9085, 0x0001, 0x004e, 0x00ce, 0x00fe, 0x0005, 0x2900, 0x7816,
-	0x0c98, 0x00c6, 0x080c, 0x489a, 0x00ce, 0x1120, 0x080c, 0x9be6,
-	0x9006, 0x0005, 0xa867, 0x0000, 0xa86b, 0x8000, 0x2900, 0x6016,
-	0x9085, 0x0001, 0x0005, 0x0096, 0x0076, 0x0126, 0x2091, 0x8000,
-	0x080c, 0x98c7, 0x080c, 0x6471, 0x0158, 0x2001, 0xb9ba, 0x0006,
-	0x900e, 0x2400, 0x080c, 0x6bc6, 0x080c, 0x69b5, 0x000e, 0x0807,
-	0x2418, 0x080c, 0x8857, 0xbaa0, 0x0086, 0x2041, 0x0001, 0x2039,
-	0x0001, 0x2608, 0x080c, 0x8672, 0x008e, 0x080c, 0x853d, 0x2f08,
-	0x2648, 0x080c, 0xd011, 0xb93c, 0x81ff, 0x090c, 0x8749, 0x080c,
-	0x98e3, 0x012e, 0x007e, 0x009e, 0x0005, 0x00c6, 0x0126, 0x2091,
-	0x8000, 0x080c, 0x9b90, 0x0190, 0x660a, 0x2b08, 0x6112, 0x080c,
-	0xbd09, 0x6023, 0x0001, 0x2900, 0x6016, 0x2009, 0x001f, 0x080c,
-	0x9c82, 0x9085, 0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8,
-	0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0x9c55, 0x01b8, 0x660a,
-	0x2b08, 0x6112, 0x080c, 0xbd09, 0x6023, 0x0008, 0x2900, 0x6016,
-	0x00f6, 0x2c78, 0x080c, 0x1669, 0x00fe, 0x2009, 0x0021, 0x080c,
-	0x9c82, 0x9085, 0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8,
-	0x2009, 0x003d, 0x00c6, 0x0126, 0x0016, 0x2091, 0x8000, 0x080c,
-	0x9b90, 0x0198, 0x660a, 0x2b08, 0x6112, 0x080c, 0xbd09, 0x6023,
-	0x0001, 0x2900, 0x6016, 0x001e, 0x0016, 0x080c, 0x9c82, 0x9085,
-	0x0001, 0x001e, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd0, 0x00c6,
-	0x0126, 0x2091, 0x8000, 0x080c, 0x9c55, 0x0188, 0x2b08, 0x6112,
-	0x080c, 0xbd09, 0x6023, 0x0001, 0x2900, 0x6016, 0x2009, 0x0000,
-	0x080c, 0x9c82, 0x9085, 0x0001, 0x012e, 0x00ce, 0x0005, 0x9006,
-	0x0cd8, 0x2009, 0x0044, 0x0830, 0x2009, 0x0049, 0x0818, 0x0026,
-	0x00b6, 0x6210, 0x2258, 0xba3c, 0x82ff, 0x0118, 0x8211, 0xba3e,
-	0x1140, 0xb8c0, 0x9005, 0x0128, 0xb888, 0x9005, 0x1110, 0xb88b,
-	0x0001, 0x00be, 0x002e, 0x0005, 0x0006, 0x0016, 0x6004, 0x908e,
-	0x0002, 0x0140, 0x908e, 0x0003, 0x0128, 0x908e, 0x0004, 0x0110,
-	0x9085, 0x0001, 0x001e, 0x000e, 0x0005, 0x0006, 0x0086, 0x0096,
-	0x6020, 0x9086, 0x0004, 0x01a8, 0x6014, 0x904d, 0x080c, 0xb870,
-	0x0180, 0xa864, 0x9086, 0x0139, 0x0170, 0x6020, 0x90c6, 0x0003,
-	0x0140, 0x90c6, 0x0002, 0x0128, 0xa868, 0xd0fc, 0x0110, 0x9006,
-	0x0010, 0x9085, 0x0001, 0x009e, 0x008e, 0x000e, 0x0005, 0x00c6,
-	0x0126, 0x2091, 0x8000, 0x080c, 0x9c55, 0x0198, 0x2b08, 0x6112,
-	0x080c, 0xbd09, 0x6023, 0x0001, 0x2900, 0x6016, 0x080c, 0x302e,
-	0x2009, 0x0028, 0x080c, 0x9c82, 0x9085, 0x0001, 0x012e, 0x00ce,
-	0x0005, 0x9006, 0x0cd8, 0x9186, 0x0015, 0x11a8, 0x2011, 0x1823,
-	0x2204, 0x9086, 0x0074, 0x1178, 0x00b6, 0x080c, 0xa827, 0x00be,
-	0x080c, 0xaa66, 0x6003, 0x0001, 0x6007, 0x0029, 0x080c, 0x84ee,
-	0x080c, 0x894f, 0x0078, 0x6014, 0x0096, 0x2048, 0xa868, 0x009e,
-	0xd0fc, 0x0148, 0x2001, 0x0001, 0x080c, 0xbec8, 0x080c, 0xa59c,
-	0x080c, 0x9be6, 0x0005, 0x0096, 0x6014, 0x904d, 0x090c, 0x0d65,
-	0xa87b, 0x0030, 0xa883, 0x0000, 0xa897, 0x4005, 0xa89b, 0x0004,
-	0xa867, 0x0139, 0x0126, 0x2091, 0x8000, 0x080c, 0x69b5, 0x012e,
-	0x009e, 0x080c, 0x9be6, 0x0c30, 0x0096, 0x9186, 0x0016, 0x1128,
-	0x2001, 0x0004, 0x080c, 0x61e0, 0x00e8, 0x9186, 0x0015, 0x1510,
-	0x2011, 0x1823, 0x2204, 0x9086, 0x0014, 0x11e0, 0x6010, 0x00b6,
-	0x2058, 0x080c, 0x632a, 0x00be, 0x080c, 0xab37, 0x1198, 0x6010,
-	0x00b6, 0x2058, 0xb890, 0x00be, 0x9005, 0x0160, 0x2001, 0x0006,
-	0x080c, 0x61e0, 0x6014, 0x2048, 0xa868, 0xd0fc, 0x0170, 0x080c,
-	0x9ff4, 0x0048, 0x6014, 0x2048, 0xa868, 0xd0fc, 0x0528, 0x080c,
-	0xa59c, 0x080c, 0x9be6, 0x009e, 0x0005, 0x6014, 0x6310, 0x2358,
-	0x904d, 0x090c, 0x0d65, 0xa87b, 0x0000, 0xa883, 0x0000, 0xa897,
-	0x4000, 0x900e, 0x080c, 0x6582, 0x1108, 0xc185, 0xb800, 0xd0bc,
-	0x0108, 0xc18d, 0xa99a, 0x0126, 0x2091, 0x8000, 0x080c, 0x69b5,
-	0x012e, 0x080c, 0x9be6, 0x08f8, 0x6014, 0x904d, 0x090c, 0x0d65,
-	0xa87b, 0x0030, 0xa883, 0x0000, 0xa897, 0x4005, 0xa89b, 0x0004,
-	0xa867, 0x0139, 0x0126, 0x2091, 0x8000, 0x080c, 0x69b5, 0x012e,
-	0x080c, 0x9be6, 0x0840, 0xa878, 0x9086, 0x0005, 0x1108, 0x0009,
-	0x0005, 0xa880, 0xc0ad, 0xa882, 0x0005, 0x604b, 0x0000, 0x6017,
-	0x0000, 0x6003, 0x0001, 0x6007, 0x0050, 0x2009, 0x8023, 0x080c,
-	0x84e7, 0x0005, 0x00c6, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be,
-	0xd0bc, 0x0130, 0x0066, 0x6020, 0x9084, 0x000f, 0x001b, 0x006e,
-	0x00ce, 0x0005, 0xb571, 0xbbac, 0xbbac, 0xbbaf, 0xd30b, 0xd326,
-	0xd329, 0xb571, 0xb571, 0xb571, 0xb571, 0xb571, 0xb571, 0xb571,
-	0xb571, 0xb571, 0x080c, 0x0d65, 0xa001, 0xa001, 0x0005, 0x0096,
-	0x6014, 0x904d, 0x0118, 0xa87c, 0xd0e4, 0x1110, 0x009e, 0x0010,
-	0x009e, 0x0005, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc,
-	0x0550, 0x2001, 0x1833, 0x2004, 0x9005, 0x1540, 0x00f6, 0x2c78,
-	0x080c, 0x9b90, 0x0508, 0x7810, 0x6012, 0x080c, 0xbd09, 0x7820,
-	0x9086, 0x0003, 0x0128, 0x7808, 0x603a, 0x2f00, 0x603e, 0x0020,
-	0x7808, 0x603e, 0x2f00, 0x603a, 0x602e, 0x6023, 0x0001, 0x6007,
-	0x0035, 0x6003, 0x0001, 0x795c, 0x615e, 0x2009, 0x8020, 0x080c,
-	0x84e7, 0x2f60, 0x00fe, 0x0005, 0x2f60, 0x00fe, 0x2001, 0x1960,
-	0x2004, 0x604a, 0x0005, 0x0016, 0x0096, 0x6814, 0x2048, 0x681c,
-	0xd0fc, 0xc0fc, 0x681e, 0xa87c, 0x1108, 0xd0e4, 0x0180, 0xc0e4,
-	0xa87e, 0xa877, 0x0000, 0xa893, 0x0000, 0xa88f, 0x0000, 0xd0cc,
-	0x0130, 0xc0cc, 0xa87e, 0xa878, 0x2048, 0x080c, 0x0fe1, 0x6830,
-	0x6036, 0x908e, 0x0001, 0x0148, 0x6803, 0x0002, 0x9086, 0x0005,
-	0x0170, 0x9006, 0x602e, 0x6032, 0x00d0, 0x681c, 0xc085, 0x681e,
-	0x6803, 0x0004, 0x6824, 0xc0f4, 0x9085, 0x0c00, 0x6826, 0x6814,
-	0x2048, 0xa8ac, 0x6938, 0x9102, 0xa8b0, 0x693c, 0x9103, 0x1e48,
-	0x683c, 0x602e, 0x6838, 0x9084, 0xfffc, 0x683a, 0x6032, 0x2d00,
-	0x603a, 0x6808, 0x603e, 0x6910, 0x6112, 0x695c, 0x615e, 0x6023,
-	0x0001, 0x6007, 0x0039, 0x6003, 0x0001, 0x2009, 0x8020, 0x080c,
-	0x84e7, 0x009e, 0x001e, 0x0005, 0x6024, 0xd0d4, 0x0510, 0xd0f4,
-	0x11f8, 0x6038, 0x940a, 0x603c, 0x9303, 0x0230, 0x9105, 0x0120,
-	0x6024, 0xc0d4, 0xc0f5, 0x0098, 0x643a, 0x633e, 0xac3e, 0xab42,
-	0x0046, 0x0036, 0x2400, 0xacac, 0x9402, 0xa836, 0x2300, 0xabb0,
-	0x9303, 0xa83a, 0x003e, 0x004e, 0x6024, 0xc0d4, 0x0000, 0x6026,
-	0x0005, 0xd0f4, 0x1138, 0xa83c, 0x603a, 0xa840, 0x603e, 0x6024,
-	0xc0f5, 0x6026, 0x0005, 0x0006, 0x0016, 0x6004, 0x908e, 0x0034,
-	0x01b8, 0x908e, 0x0035, 0x01a0, 0x908e, 0x0036, 0x0188, 0x908e,
-	0x0037, 0x0170, 0x908e, 0x0038, 0x0158, 0x908e, 0x0039, 0x0140,
-	0x908e, 0x003a, 0x0128, 0x908e, 0x003b, 0x0110, 0x9085, 0x0001,
-	0x001e, 0x000e, 0x0005, 0x0006, 0x0016, 0x0026, 0x0036, 0x00e6,
-	0x2001, 0x195a, 0x200c, 0x8000, 0x2014, 0x2001, 0x0032, 0x080c,
-	0x842f, 0x2001, 0x195e, 0x82ff, 0x1110, 0x2011, 0x0014, 0x2202,
-	0x2001, 0x195c, 0x200c, 0x8000, 0x2014, 0x2071, 0x1944, 0x711a,
-	0x721e, 0x2001, 0x0064, 0x080c, 0x842f, 0x2001, 0x195f, 0x82ff,
-	0x1110, 0x2011, 0x0014, 0x2202, 0x2001, 0x1960, 0x9288, 0x000a,
-	0x2102, 0x2001, 0x0017, 0x080c, 0x98b8, 0x2001, 0x1a60, 0x2102,
-	0x2001, 0x0032, 0x080c, 0x15b8, 0x080c, 0x666b, 0x00ee, 0x003e,
-	0x002e, 0x001e, 0x000e, 0x0005, 0x0006, 0x0016, 0x00e6, 0x2001,
-	0x195e, 0x2003, 0x0028, 0x2001, 0x195f, 0x2003, 0x0014, 0x2071,
-	0x1944, 0x701b, 0x0000, 0x701f, 0x07d0, 0x2001, 0x1960, 0x2009,
-	0x001e, 0x2102, 0x2001, 0x0017, 0x080c, 0x98b8, 0x2001, 0x1a60,
-	0x2102, 0x2001, 0x0032, 0x080c, 0x15b8, 0x00ee, 0x001e, 0x000e,
-	0x0005, 0x0096, 0x6060, 0x904d, 0x0110, 0x080c, 0x1061, 0x009e,
-	0x0005, 0x0005, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0x9b90,
-	0x0180, 0x2b08, 0x6112, 0x0ca9, 0x6023, 0x0001, 0x2900, 0x6016,
-	0x2009, 0x0033, 0x080c, 0x9c82, 0x9085, 0x0001, 0x012e, 0x00ce,
-	0x0005, 0x9006, 0x0cd8, 0x0096, 0x00e6, 0x00f6, 0x2071, 0x1800,
-	0x9186, 0x0015, 0x1500, 0x708c, 0x9086, 0x0018, 0x11e0, 0x6014,
-	0x2048, 0xaa3c, 0xd2e4, 0x1160, 0x2c78, 0x080c, 0x8a0e, 0x01d8,
-	0x7078, 0xaa50, 0x9206, 0x1160, 0x707c, 0xaa54, 0x9206, 0x1140,
-	0x6210, 0x00b6, 0x2258, 0xbaa0, 0x00be, 0x900e, 0x080c, 0x307d,
-	0x080c, 0x9ff4, 0x0020, 0x080c, 0xa59c, 0x080c, 0x9be6, 0x00fe,
-	0x00ee, 0x009e, 0x0005, 0x705c, 0xaa54, 0x9206, 0x0d48, 0x0c80,
-	0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0x9b90, 0x0188, 0x2b08,
-	0x6112, 0x080c, 0xbd09, 0x6023, 0x0001, 0x2900, 0x6016, 0x2009,
-	0x004d, 0x080c, 0x9c82, 0x9085, 0x0001, 0x012e, 0x00ce, 0x0005,
-	0x9006, 0x0cd8, 0x00c6, 0x0126, 0x2091, 0x8000, 0x0016, 0x080c,
-	0x9b90, 0x0180, 0x2b08, 0x6112, 0x080c, 0xbd09, 0x6023, 0x0001,
-	0x2900, 0x6016, 0x001e, 0x080c, 0x9c82, 0x9085, 0x0001, 0x012e,
-	0x00ce, 0x0005, 0x001e, 0x9006, 0x0cd0, 0x0016, 0x0026, 0x0036,
-	0x0046, 0x0056, 0x0066, 0x0096, 0x00e6, 0x00f6, 0x2071, 0x1800,
-	0x9186, 0x0015, 0x1568, 0x718c, 0x6014, 0x2048, 0xa814, 0x8003,
-	0x9106, 0x1530, 0x20e1, 0x0000, 0x2001, 0x1978, 0x2003, 0x0000,
-	0x6014, 0x2048, 0xa830, 0x20a8, 0x8906, 0x8006, 0x8007, 0x9094,
-	0x003f, 0x22e8, 0x9084, 0xffc0, 0x9080, 0x001b, 0x20a0, 0x2001,
-	0x1978, 0x0016, 0x200c, 0x080c, 0xc581, 0x001e, 0xa804, 0x9005,
-	0x0110, 0x2048, 0x0c38, 0x6014, 0x2048, 0xa867, 0x0103, 0x0010,
-	0x080c, 0xa59c, 0x080c, 0x9be6, 0x00fe, 0x00ee, 0x009e, 0x006e,
-	0x005e, 0x004e, 0x003e, 0x002e, 0x001e, 0x0005, 0x0096, 0x00e6,
-	0x00f6, 0x2071, 0x1800, 0x9186, 0x0015, 0x11b8, 0x708c, 0x9086,
-	0x0004, 0x1198, 0x6014, 0x2048, 0x2c78, 0x080c, 0x8a0e, 0x01a8,
-	0x7078, 0xaa74, 0x9206, 0x1130, 0x707c, 0xaa78, 0x9206, 0x1110,
-	0x080c, 0x302e, 0x080c, 0x9ff4, 0x0020, 0x080c, 0xa59c, 0x080c,
-	0x9be6, 0x00fe, 0x00ee, 0x009e, 0x0005, 0x705c, 0xaa78, 0x9206,
-	0x0d78, 0x0c80, 0x0096, 0x00e6, 0x00f6, 0x2071, 0x1800, 0x9186,
-	0x0015, 0x1550, 0x708c, 0x9086, 0x0004, 0x1530, 0x6014, 0x2048,
-	0x2c78, 0x080c, 0x8a0e, 0x05f0, 0x7078, 0xaacc, 0x9206, 0x1180,
-	0x707c, 0xaad0, 0x9206, 0x1160, 0x080c, 0x302e, 0x0016, 0xa998,
-	0xaab0, 0x9284, 0x1000, 0xc0fd, 0x080c, 0x5360, 0x001e, 0x0010,
-	0x080c, 0x5149, 0x080c, 0xb870, 0x0508, 0xa87b, 0x0000, 0xa883,
-	0x0000, 0xa897, 0x4000, 0x0080, 0x080c, 0xb870, 0x01b8, 0x6014,
-	0x2048, 0x080c, 0x5149, 0x1d70, 0xa87b, 0x0030, 0xa883, 0x0000,
-	0xa897, 0x4005, 0xa89b, 0x0004, 0x0126, 0x2091, 0x8000, 0xa867,
-	0x0139, 0x080c, 0x69b5, 0x012e, 0x080c, 0x9be6, 0x00fe, 0x00ee,
-	0x009e, 0x0005, 0x705c, 0xaad0, 0x9206, 0x0930, 0x0888, 0x0016,
-	0x0026, 0xa87c, 0xd0ac, 0x0178, 0xa938, 0xaa34, 0x2100, 0x9205,
-	0x0150, 0xa890, 0x9106, 0x1118, 0xa88c, 0x9206, 0x0120, 0xa992,
-	0xaa8e, 0x9085, 0x0001, 0x002e, 0x001e, 0x0005, 0x00b6, 0x00d6,
-	0x0036, 0x080c, 0xb870, 0x0904, 0xbec4, 0x0096, 0x6314, 0x2348,
-	0xa87a, 0xa982, 0x929e, 0x4000, 0x1580, 0x6310, 0x00c6, 0x2358,
-	0x2009, 0x0000, 0xa868, 0xd0f4, 0x1140, 0x080c, 0x6582, 0x1108,
-	0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d, 0xaa96, 0xa99a, 0x20a9,
-	0x0004, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0031, 0x20a0, 0xb8b4,
-	0x20e0, 0xb8b8, 0x9080, 0x0006, 0x2098, 0x080c, 0x0fac, 0x20a9,
-	0x0004, 0xa85c, 0x9080, 0x0035, 0x20a0, 0xb8b8, 0x9080, 0x000a,
-	0x2098, 0x080c, 0x0fac, 0x00ce, 0x0090, 0xaa96, 0x3918, 0x9398,
-	0x0007, 0x231c, 0x6004, 0x9086, 0x0016, 0x0110, 0xa89b, 0x0004,
-	0xaba2, 0x6310, 0x2358, 0xb804, 0x9084, 0x00ff, 0xa89e, 0x080c,
-	0x69a9, 0x6017, 0x0000, 0x009e, 0x003e, 0x00de, 0x00be, 0x0005,
-	0x0026, 0x0036, 0x0046, 0x00b6, 0x0096, 0x00f6, 0x6214, 0x2248,
-	0x6210, 0x2258, 0x2079, 0x0260, 0x9096, 0x0000, 0x11a0, 0xb814,
-	0x9084, 0x00ff, 0x900e, 0x080c, 0x2459, 0x2118, 0x831f, 0x939c,
-	0xff00, 0x7838, 0x9084, 0x00ff, 0x931d, 0x7c3c, 0x2011, 0x8018,
-	0x080c, 0x48fa, 0x00a8, 0x9096, 0x0001, 0x1148, 0x89ff, 0x0180,
-	0xa89b, 0x000d, 0x7838, 0xa8a6, 0x783c, 0xa8aa, 0x0048, 0x9096,
-	0x0002, 0x1130, 0xa89b, 0x000d, 0x7838, 0xa8a6, 0x783c, 0xa8aa,
-	0x00fe, 0x009e, 0x00be, 0x004e, 0x003e, 0x002e, 0x0005, 0x00c6,
-	0x0026, 0x0016, 0x9186, 0x0035, 0x0110, 0x6a38, 0x0008, 0x6a2c,
-	0x080c, 0xb85e, 0x01f0, 0x2260, 0x6120, 0x9186, 0x0003, 0x0118,
-	0x9186, 0x0006, 0x1190, 0x6838, 0x9206, 0x0140, 0x683c, 0x9206,
-	0x1160, 0x6108, 0x6838, 0x9106, 0x1140, 0x0020, 0x6008, 0x693c,
-	0x9106, 0x1118, 0x6010, 0x6910, 0x9106, 0x001e, 0x002e, 0x00ce,
-	0x0005, 0x9085, 0x0001, 0x0cc8, 0xa974, 0xd1cc, 0x0188, 0x918c,
-	0x00ff, 0x918e, 0x0002, 0x1160, 0xa9a8, 0x918c, 0x0f00, 0x810f,
-	0x918e, 0x0001, 0x1128, 0xa834, 0xa938, 0x9115, 0x190c, 0xaed1,
-	0x0005, 0x0036, 0x2019, 0x0001, 0x0010, 0x0036, 0x901e, 0x0499,
-	0x01e0, 0x080c, 0xb870, 0x01c8, 0x080c, 0xba5f, 0x6037, 0x4000,
-	0x6014, 0x6017, 0x0000, 0x0096, 0x2048, 0xa87c, 0x080c, 0xba85,
-	0x1118, 0x080c, 0xa59c, 0x0040, 0xa867, 0x0103, 0xa877, 0x0000,
-	0x83ff, 0x1129, 0x080c, 0x69b5, 0x009e, 0x003e, 0x0005, 0xa880,
-	0xd0b4, 0x0128, 0xa87b, 0x0006, 0xc0ec, 0xa882, 0x0048, 0xd0bc,
-	0x0118, 0xa87b, 0x0002, 0x0020, 0xa87b, 0x0005, 0x080c, 0xbb79,
-	0xa877, 0x0000, 0x0005, 0x2001, 0x1810, 0x2004, 0xd0ec, 0x0005,
-	0x0006, 0x2001, 0x1810, 0x2004, 0xd0f4, 0x000e, 0x0005, 0x0006,
-	0x2001, 0x1810, 0x2004, 0xd0e4, 0x000e, 0x0005, 0x0036, 0x0046,
-	0x6010, 0x00b6, 0x2058, 0xbba0, 0x00be, 0x2021, 0x0007, 0x080c,
-	0x4a97, 0x004e, 0x003e, 0x0005, 0x0c51, 0x1d81, 0x0005, 0x2001,
-	0x195e, 0x2004, 0x601a, 0x0005, 0x2001, 0x1960, 0x2004, 0x604a,
-	0x0005, 0x080c, 0x9be6, 0x0804, 0x894f, 0x611c, 0xd1fc, 0xa97c,
-	0x1108, 0xd1e4, 0x0005, 0x601c, 0xd0fc, 0xa87c, 0x1108, 0xd0e4,
-	0x0005, 0x601c, 0xd0fc, 0xc0fc, 0x601e, 0xa87c, 0x1108, 0xd0e4,
-	0x0005, 0x6044, 0xd0fc, 0x1138, 0xd0bc, 0x0198, 0xc0bc, 0x6046,
-	0x6003, 0x0002, 0x0070, 0xd0ac, 0x1160, 0xd0dc, 0x1128, 0x908c,
-	0x000f, 0x9186, 0x0005, 0x1118, 0x6003, 0x0003, 0x0010, 0x6003,
-	0x0001, 0x0005, 0x00b6, 0x0066, 0x6000, 0x90b2, 0x0016, 0x1a0c,
-	0x0d65, 0x001b, 0x006e, 0x00be, 0x0005, 0xbffd, 0xc6dc, 0xc82b,
-	0xbffd, 0xbffd, 0xbffd, 0xbffd, 0xbffd, 0xc034, 0xc8af, 0xbffd,
-	0xbffd, 0xbffd, 0xbffd, 0xbffd, 0xbffd, 0x080c, 0x0d65, 0x0066,
-	0x6000, 0x90b2, 0x0016, 0x1a0c, 0x0d65, 0x0013, 0x006e, 0x0005,
-	0xc018, 0xcdd0, 0xc018, 0xc018, 0xc018, 0xc018, 0xc018, 0xc018,
-	0xcd7f, 0xce22, 0xc018, 0xd446, 0xd47a, 0xd446, 0xd47a, 0xc018,
-	0x080c, 0x0d65, 0x6000, 0x9082, 0x0016, 0x1a0c, 0x0d65, 0x6000,
-	0x000a, 0x0005, 0xc032, 0xca8c, 0xcb57, 0xcb7a, 0xcbf6, 0xc032,
-	0xccf1, 0xcc7e, 0xc8b9, 0xcd57, 0xcd6c, 0xc032, 0xc032, 0xc032,
-	0xc032, 0xc032, 0x080c, 0x0d65, 0x91b2, 0x0053, 0x1a0c, 0x0d65,
-	0x2100, 0x91b2, 0x0040, 0x1a04, 0xc47f, 0x0002, 0xc07e, 0xc270,
-	0xc07e, 0xc07e, 0xc07e, 0xc279, 0xc07e, 0xc07e, 0xc07e, 0xc07e,
-	0xc07e, 0xc07e, 0xc07e, 0xc07e, 0xc07e, 0xc07e, 0xc07e, 0xc07e,
-	0xc07e, 0xc07e, 0xc07e, 0xc07e, 0xc07e, 0xc080, 0xc0e7, 0xc0f6,
-	0xc15a, 0xc185, 0xc1fd, 0xc25b, 0xc07e, 0xc07e, 0xc27c, 0xc07e,
-	0xc07e, 0xc291, 0xc29e, 0xc07e, 0xc07e, 0xc07e, 0xc07e, 0xc07e,
-	0xc321, 0xc07e, 0xc07e, 0xc335, 0xc07e, 0xc07e, 0xc2f0, 0xc07e,
-	0xc07e, 0xc07e, 0xc34d, 0xc07e, 0xc07e, 0xc07e, 0xc3ca, 0xc07e,
-	0xc07e, 0xc07e, 0xc07e, 0xc07e, 0xc07e, 0xc447, 0x080c, 0x0d65,
-	0x080c, 0x6648, 0x1150, 0x2001, 0x1836, 0x2004, 0xd0cc, 0x1128,
-	0x9084, 0x0009, 0x9086, 0x0008, 0x1140, 0x6007, 0x0009, 0x602f,
-	0x0009, 0x6017, 0x0000, 0x0804, 0xc269, 0x080c, 0x6631, 0x00e6,
-	0x00c6, 0x0036, 0x0026, 0x0016, 0x6210, 0x2258, 0xbaa0, 0x0026,
-	0x2019, 0x0029, 0x080c, 0x98c7, 0x080c, 0x8658, 0x0076, 0x903e,
-	0x080c, 0x853d, 0x2c08, 0x080c, 0xd011, 0x007e, 0x001e, 0x080c,
-	0x98e3, 0x001e, 0x002e, 0x003e, 0x00ce, 0x00ee, 0x6610, 0x2658,
-	0x080c, 0x629e, 0xbe04, 0x9684, 0x00ff, 0x9082, 0x0006, 0x1268,
-	0x0016, 0x0026, 0x6210, 0x00b6, 0x2258, 0xbaa0, 0x00be, 0x2c08,
-	0x080c, 0xd5f2, 0x002e, 0x001e, 0x1178, 0x080c, 0xcf40, 0x1904,
-	0xc152, 0x080c, 0xcedc, 0x1120, 0x6007, 0x0008, 0x0804, 0xc269,
-	0x6007, 0x0009, 0x0804, 0xc269, 0x080c, 0xd147, 0x0128, 0x080c,
-	0xcf40, 0x0d78, 0x0804, 0xc152, 0x6017, 0x1900, 0x0c88, 0x080c,
-	0x3164, 0x1904, 0xc47c, 0x6106, 0x080c, 0xce8d, 0x6007, 0x0006,
-	0x0804, 0xc269, 0x6007, 0x0007, 0x0804, 0xc269, 0x080c, 0xd4b6,
-	0x1904, 0xc47c, 0x080c, 0x3164, 0x1904, 0xc47c, 0x00d6, 0x6610,
-	0x2658, 0xbe04, 0x9684, 0x00ff, 0x9082, 0x0006, 0x1220, 0x2001,
-	0x0001, 0x080c, 0x61cc, 0x96b4, 0xff00, 0x8637, 0x9686, 0x0006,
-	0x0188, 0x9686, 0x0004, 0x0170, 0xbe04, 0x96b4, 0x00ff, 0x9686,
-	0x0006, 0x0140, 0x9686, 0x0004, 0x0128, 0x9686, 0x0005, 0x0110,
-	0x00de, 0x0480, 0x00e6, 0x2071, 0x0260, 0x7034, 0x9084, 0x0003,
-	0x1140, 0x7034, 0x9082, 0x0014, 0x0220, 0x7030, 0x9084, 0x0003,
-	0x0130, 0x00ee, 0x6017, 0x0000, 0x602f, 0x0007, 0x00b0, 0x00ee,
-	0x080c, 0xcfa7, 0x1190, 0x9686, 0x0006, 0x1140, 0x0026, 0x6210,
-	0x2258, 0xbaa0, 0x900e, 0x080c, 0x307d, 0x002e, 0x080c, 0x632a,
-	0x6007, 0x000a, 0x00de, 0x0804, 0xc269, 0x6007, 0x000b, 0x00de,
-	0x0804, 0xc269, 0x080c, 0x302e, 0x080c, 0xbfa4, 0x6007, 0x0001,
-	0x0804, 0xc269, 0x080c, 0xd4b6, 0x1904, 0xc47c, 0x080c, 0x3164,
-	0x1904, 0xc47c, 0x2071, 0x0260, 0x7034, 0x90b4, 0x0003, 0x1948,
-	0x90b2, 0x0014, 0x0a30, 0x7030, 0x9084, 0x0003, 0x1910, 0x6610,
-	0x2658, 0xbe04, 0x9686, 0x0707, 0x09e8, 0x0026, 0x6210, 0x2258,
-	0xbaa0, 0x900e, 0x080c, 0x307d, 0x002e, 0x6007, 0x000c, 0x2001,
-	0x0001, 0x080c, 0xd5d2, 0x0804, 0xc269, 0x080c, 0x6648, 0x1140,
-	0x2001, 0x1836, 0x2004, 0x9084, 0x0009, 0x9086, 0x0008, 0x1110,
-	0x0804, 0xc08d, 0x080c, 0x6631, 0x6610, 0x2658, 0xbe04, 0x9684,
-	0x00ff, 0x9082, 0x0006, 0x06c0, 0x1138, 0x0026, 0x2001, 0x0006,
-	0x080c, 0x620c, 0x002e, 0x0050, 0x96b4, 0xff00, 0x8637, 0x9686,
-	0x0004, 0x0120, 0x9686, 0x0006, 0x1904, 0xc152, 0x080c, 0xcfb4,
-	0x1120, 0x6007, 0x000e, 0x0804, 0xc269, 0x0046, 0x6410, 0x2458,
-	0xbca0, 0x0046, 0x080c, 0x302e, 0x080c, 0xbfa4, 0x004e, 0x0016,
-	0x9006, 0x2009, 0x185c, 0x210c, 0x0048, 0x2009, 0x0029, 0x080c,
-	0xd2bc, 0x6010, 0x2058, 0xb800, 0xc0e5, 0xb802, 0x001e, 0x004e,
-	0x6007, 0x0001, 0x0804, 0xc269, 0x2001, 0x0001, 0x080c, 0x61cc,
-	0x0156, 0x0016, 0x0026, 0x0036, 0x20a9, 0x0004, 0x2019, 0x1805,
-	0x2011, 0x0270, 0x080c, 0xabda, 0x003e, 0x002e, 0x001e, 0x015e,
-	0x9005, 0x0168, 0x96b4, 0xff00, 0x8637, 0x9682, 0x0004, 0x0a04,
-	0xc152, 0x9682, 0x0007, 0x0a04, 0xc1ae, 0x0804, 0xc152, 0x6017,
-	0x1900, 0x6007, 0x0009, 0x0804, 0xc269, 0x080c, 0x6648, 0x1140,
-	0x2001, 0x1836, 0x2004, 0x9084, 0x0009, 0x9086, 0x0008, 0x1110,
-	0x0804, 0xc08d, 0x080c, 0x6631, 0x6610, 0x2658, 0xbe04, 0x9684,
-	0x00ff, 0x0006, 0x9086, 0x0001, 0x000e, 0x0170, 0x9082, 0x0006,
-	0x0690, 0x0150, 0x96b4, 0xff00, 0x8637, 0x9686, 0x0004, 0x0120,
-	0x9686, 0x0006, 0x1904, 0xc152, 0x080c, 0xcfe2, 0x1130, 0x080c,
-	0xcedc, 0x1118, 0x6007, 0x0010, 0x04e0, 0x0046, 0x6410, 0x2458,
-	0xbca0, 0x0046, 0x080c, 0x302e, 0x080c, 0xbfa4, 0x004e, 0x0016,
-	0x9006, 0x2009, 0x185c, 0x210c, 0x0048, 0x2009, 0x0029, 0x080c,
-	0xd2bc, 0x6010, 0x2058, 0xb800, 0xc0e5, 0xb802, 0x001e, 0x004e,
-	0x6007, 0x0001, 0x00f0, 0x080c, 0xd147, 0x0140, 0x96b4, 0xff00,
-	0x8637, 0x9686, 0x0006, 0x0980, 0x0804, 0xc152, 0x6017, 0x1900,
-	0x6007, 0x0009, 0x0070, 0x080c, 0x3164, 0x1904, 0xc47c, 0x080c,
-	0xd4b6, 0x1904, 0xc47c, 0x080c, 0xc61c, 0x1904, 0xc152, 0x6007,
-	0x0012, 0x6003, 0x0001, 0x080c, 0x84ee, 0x080c, 0x894f, 0x0005,
-	0x6007, 0x0001, 0x6003, 0x0001, 0x080c, 0x84ee, 0x080c, 0x894f,
-	0x0cb0, 0x6007, 0x0005, 0x0c68, 0x080c, 0xd4b6, 0x1904, 0xc47c,
-	0x080c, 0x3164, 0x1904, 0xc47c, 0x080c, 0xc61c, 0x1904, 0xc152,
-	0x6007, 0x0020, 0x6003, 0x0001, 0x080c, 0x84ee, 0x080c, 0x894f,
-	0x0005, 0x080c, 0x3164, 0x1904, 0xc47c, 0x6007, 0x0023, 0x6003,
-	0x0001, 0x080c, 0x84ee, 0x080c, 0x894f, 0x0005, 0x080c, 0xd4b6,
-	0x1904, 0xc47c, 0x080c, 0x3164, 0x1904, 0xc47c, 0x080c, 0xc61c,
-	0x1904, 0xc152, 0x0016, 0x0026, 0x00e6, 0x2071, 0x0260, 0x7244,
-	0x9286, 0xffff, 0x0180, 0x2c08, 0x080c, 0xb85e, 0x01b0, 0x2260,
-	0x7240, 0x6008, 0x9206, 0x1188, 0x6010, 0x9190, 0x0004, 0x2214,
-	0x9206, 0x01b8, 0x0050, 0x7240, 0x2c08, 0x9006, 0x080c, 0xd28e,
-	0x1180, 0x7244, 0x9286, 0xffff, 0x01b0, 0x2160, 0x6007, 0x0026,
-	0x6017, 0x1700, 0x7214, 0x9296, 0xffff, 0x1180, 0x6007, 0x0025,
-	0x0068, 0x6020, 0x9086, 0x0007, 0x1d80, 0x6004, 0x9086, 0x0024,
-	0x1110, 0x080c, 0x9be6, 0x2160, 0x6007, 0x0025, 0x6003, 0x0001,
-	0x080c, 0x84ee, 0x080c, 0x894f, 0x00ee, 0x002e, 0x001e, 0x0005,
-	0x2001, 0x0001, 0x080c, 0x61cc, 0x0156, 0x0016, 0x0026, 0x0036,
-	0x20a9, 0x0004, 0x2019, 0x1805, 0x2011, 0x0276, 0x080c, 0xabda,
-	0x003e, 0x002e, 0x001e, 0x015e, 0x0120, 0x6007, 0x0031, 0x0804,
-	0xc269, 0x080c, 0xa83f, 0x080c, 0x70ba, 0x1190, 0x0006, 0x0026,
-	0x0036, 0x080c, 0x70d4, 0x1138, 0x080c, 0x73b9, 0x080c, 0x5cf7,
-	0x080c, 0x6feb, 0x0010, 0x080c, 0x708e, 0x003e, 0x002e, 0x000e,
-	0x0005, 0x080c, 0x3164, 0x1904, 0xc47c, 0x080c, 0xc61c, 0x1904,
-	0xc152, 0x6106, 0x080c, 0xc638, 0x1120, 0x6007, 0x002b, 0x0804,
-	0xc269, 0x6007, 0x002c, 0x0804, 0xc269, 0x080c, 0xd4b6, 0x1904,
-	0xc47c, 0x080c, 0x3164, 0x1904, 0xc47c, 0x080c, 0xc61c, 0x1904,
-	0xc152, 0x6106, 0x080c, 0xc63d, 0x1120, 0x6007, 0x002e, 0x0804,
-	0xc269, 0x6007, 0x002f, 0x0804, 0xc269, 0x080c, 0x3164, 0x1904,
-	0xc47c, 0x00e6, 0x00d6, 0x00c6, 0x6010, 0x2058, 0xb904, 0x9184,
-	0x00ff, 0x9086, 0x0006, 0x0158, 0x9184, 0xff00, 0x8007, 0x9086,
-	0x0006, 0x0128, 0x00ce, 0x00de, 0x00ee, 0x0804, 0xc270, 0x080c,
-	0x53ac, 0xd0e4, 0x0904, 0xc3c7, 0x2071, 0x026c, 0x7010, 0x603a,
-	0x7014, 0x603e, 0x7108, 0x720c, 0x080c, 0x6686, 0x0140, 0x6010,
-	0x2058, 0xb810, 0x9106, 0x1118, 0xb814, 0x9206, 0x0510, 0x080c,
-	0x6682, 0x15b8, 0x2069, 0x1800, 0x687c, 0x9206, 0x1590, 0x6878,
-	0x9106, 0x1578, 0x7210, 0x080c, 0xb85e, 0x0590, 0x080c, 0xc507,
-	0x0578, 0x080c, 0xd338, 0x0560, 0x622e, 0x6007, 0x0036, 0x6003,
-	0x0001, 0x2009, 0x8020, 0x080c, 0x84e7, 0x00ce, 0x00de, 0x00ee,
-	0x0005, 0x7214, 0x9286, 0xffff, 0x0150, 0x080c, 0xb85e, 0x01c0,
-	0x9280, 0x0002, 0x2004, 0x7110, 0x9106, 0x1190, 0x08e0, 0x7210,
-	0x2c08, 0x9085, 0x0001, 0x080c, 0xd28e, 0x2c10, 0x2160, 0x0140,
-	0x0890, 0x6007, 0x0037, 0x602f, 0x0009, 0x6017, 0x1500, 0x08b8,
-	0x6007, 0x0037, 0x602f, 0x0003, 0x6017, 0x1700, 0x0880, 0x6007,
-	0x0012, 0x0868, 0x080c, 0x3164, 0x1904, 0xc47c, 0x6010, 0x2058,
-	0xb804, 0x9084, 0xff00, 0x8007, 0x9086, 0x0006, 0x1904, 0xc270,
-	0x00e6, 0x00d6, 0x00c6, 0x080c, 0x53ac, 0xd0e4, 0x0904, 0xc43f,
-	0x2069, 0x1800, 0x2071, 0x026c, 0x7008, 0x603a, 0x720c, 0x623e,
-	0x9286, 0xffff, 0x1150, 0x7208, 0x00c6, 0x2c08, 0x9085, 0x0001,
-	0x080c, 0xd28e, 0x2c10, 0x00ce, 0x05e8, 0x080c, 0xb85e, 0x05d0,
-	0x7108, 0x9280, 0x0002, 0x2004, 0x9106, 0x15a0, 0x00c6, 0x0026,
-	0x2260, 0x080c, 0xb451, 0x002e, 0x00ce, 0x7118, 0x918c, 0xff00,
-	0x810f, 0x9186, 0x0001, 0x0178, 0x9186, 0x0005, 0x0118, 0x9186,
-	0x0007, 0x1198, 0x9280, 0x0005, 0x2004, 0x9005, 0x0170, 0x080c,
-	0xc507, 0x0904, 0xc3c0, 0x0056, 0x7510, 0x7614, 0x080c, 0xd351,
-	0x005e, 0x00ce, 0x00de, 0x00ee, 0x0005, 0x6007, 0x003b, 0x602f,
-	0x0009, 0x6017, 0x2a00, 0x6003, 0x0001, 0x2009, 0x8020, 0x080c,
-	0x84e7, 0x0c78, 0x6007, 0x003b, 0x602f, 0x0003, 0x6017, 0x0300,
-	0x6003, 0x0001, 0x2009, 0x8020, 0x080c, 0x84e7, 0x0c10, 0x6007,
-	0x003b, 0x602f, 0x000b, 0x6017, 0x0000, 0x0804, 0xc397, 0x00e6,
-	0x0026, 0x080c, 0x6648, 0x0550, 0x080c, 0x6631, 0x080c, 0xd528,
-	0x1518, 0x2071, 0x1800, 0x70d8, 0x9085, 0x0003, 0x70da, 0x00f6,
-	0x2079, 0x0100, 0x72ac, 0x9284, 0x00ff, 0x707a, 0x78e6, 0x9284,
-	0xff00, 0x727c, 0x9205, 0x707e, 0x78ea, 0x00fe, 0x70e3, 0x0000,
-	0x080c, 0x6686, 0x0120, 0x2011, 0x19e1, 0x2013, 0x07d0, 0xd0ac,
-	0x1128, 0x080c, 0x2e09, 0x0010, 0x080c, 0xd55a, 0x002e, 0x00ee,
-	0x080c, 0x9be6, 0x0804, 0xc26f, 0x080c, 0x9be6, 0x0005, 0x2600,
-	0x0002, 0xc493, 0xc493, 0xc493, 0xc493, 0xc493, 0xc495, 0xc493,
-	0xc493, 0xc493, 0xc493, 0xc4b2, 0xc493, 0xc493, 0xc493, 0xc4c4,
-	0xc4d1, 0xc502, 0xc493, 0x080c, 0x0d65, 0x080c, 0xd4b6, 0x1d20,
-	0x080c, 0x3164, 0x1d08, 0x080c, 0xc61c, 0x1148, 0x7038, 0x6016,
-	0x6007, 0x0045, 0x6003, 0x0001, 0x080c, 0x84ee, 0x0005, 0x080c,
-	0x302e, 0x080c, 0xbfa4, 0x6007, 0x0001, 0x6003, 0x0001, 0x080c,
-	0x84ee, 0x0005, 0x080c, 0xd4b6, 0x1938, 0x080c, 0x3164, 0x1920,
-	0x080c, 0xc61c, 0x1d60, 0x703c, 0x6016, 0x6007, 0x004a, 0x6003,
-	0x0001, 0x080c, 0x84ee, 0x0005, 0x080c, 0xc524, 0x0904, 0xc47c,
-	0x6007, 0x004e, 0x6003, 0x0001, 0x080c, 0x84ee, 0x080c, 0x894f,
-	0x0005, 0x6007, 0x004f, 0x6017, 0x0000, 0x7134, 0x918c, 0x00ff,
-	0x81ff, 0x0508, 0x9186, 0x0001, 0x1160, 0x7140, 0x2001, 0x1995,
-	0x2004, 0x9106, 0x11b0, 0x7144, 0x2001, 0x1996, 0x2004, 0x9106,
-	0x0190, 0x9186, 0x0002, 0x1168, 0x2011, 0x0276, 0x20a9, 0x0004,
-	0x6010, 0x0096, 0x2048, 0x2019, 0x000a, 0x080c, 0xabee, 0x009e,
-	0x0110, 0x6017, 0x0001, 0x6003, 0x0001, 0x080c, 0x84ee, 0x080c,
-	0x894f, 0x0005, 0x6007, 0x0050, 0x703c, 0x6016, 0x0ca0, 0x0016,
-	0x00e6, 0x2071, 0x0260, 0x00b6, 0x00c6, 0x2260, 0x6010, 0x2058,
-	0xb8c4, 0xd084, 0x0150, 0x7128, 0x6050, 0x9106, 0x1120, 0x712c,
-	0x604c, 0x9106, 0x0110, 0x9006, 0x0010, 0x9085, 0x0001, 0x00ce,
-	0x00be, 0x00ee, 0x001e, 0x0005, 0x0016, 0x0096, 0x0086, 0x00e6,
-	0x01c6, 0x01d6, 0x0126, 0x2091, 0x8000, 0x2071, 0x1800, 0x708c,
-	0x908a, 0x00f9, 0x16e8, 0x20e1, 0x0000, 0x2001, 0x1978, 0x2003,
-	0x0000, 0x080c, 0x1048, 0x05a0, 0x2900, 0x6016, 0x708c, 0x8004,
-	0xa816, 0x908a, 0x001e, 0x02d0, 0xa833, 0x001e, 0x20a9, 0x001e,
-	0xa860, 0x20e8, 0xa85c, 0x9080, 0x001b, 0x20a0, 0x2001, 0x1978,
-	0x0016, 0x200c, 0x0471, 0x001e, 0x2940, 0x080c, 0x1048, 0x01c0,
-	0x2900, 0xa006, 0x2100, 0x81ff, 0x0180, 0x0c18, 0xa832, 0x20a8,
-	0xa860, 0x20e8, 0xa85c, 0x9080, 0x001b, 0x20a0, 0x2001, 0x1978,
-	0x0016, 0x200c, 0x00b1, 0x001e, 0x0000, 0x9085, 0x0001, 0x0048,
-	0x2071, 0x1800, 0x708f, 0x0000, 0x6014, 0x2048, 0x080c, 0x0fe1,
-	0x9006, 0x012e, 0x01de, 0x01ce, 0x00ee, 0x008e, 0x009e, 0x001e,
-	0x0005, 0x0006, 0x0016, 0x0026, 0x0036, 0x00c6, 0x918c, 0xffff,
-	0x11a8, 0x080c, 0x2054, 0x2099, 0x026c, 0x2001, 0x0014, 0x3518,
-	0x9312, 0x1218, 0x23a8, 0x4003, 0x00f8, 0x20a8, 0x4003, 0x22a8,
-	0x8108, 0x080c, 0x2054, 0x2099, 0x0260, 0x0ca8, 0x080c, 0x2054,
-	0x2061, 0x1978, 0x6004, 0x2098, 0x6008, 0x3518, 0x9312, 0x1218,
-	0x23a8, 0x4003, 0x0048, 0x20a8, 0x4003, 0x22a8, 0x8108, 0x080c,
-	0x2054, 0x2099, 0x0260, 0x0ca8, 0x2061, 0x1978, 0x2019, 0x0280,
-	0x3300, 0x931e, 0x0110, 0x6006, 0x0020, 0x2001, 0x0260, 0x6006,
-	0x8108, 0x2162, 0x9292, 0x0021, 0x9296, 0xffff, 0x620a, 0x00ce,
-	0x003e, 0x002e, 0x001e, 0x000e, 0x0005, 0x0006, 0x0016, 0x0026,
-	0x0036, 0x00c6, 0x81ff, 0x11b8, 0x080c, 0x206c, 0x20a1, 0x024c,
-	0x2001, 0x0014, 0x3518, 0x9312, 0x1218, 0x23a8, 0x4003, 0x0418,
-	0x20a8, 0x4003, 0x82ff, 0x01f8, 0x22a8, 0x8108, 0x080c, 0x206c,
-	0x20a1, 0x0240, 0x0c98, 0x080c, 0x206c, 0x2061, 0x197b, 0x6004,
-	0x20a0, 0x6008, 0x3518, 0x9312, 0x1218, 0x23a8, 0x4003, 0x0058,
-	0x20a8, 0x4003, 0x82ff, 0x0138, 0x22a8, 0x8108, 0x080c, 0x206c,
-	0x20a1, 0x0240, 0x0c98, 0x2061, 0x197b, 0x2019, 0x0260, 0x3400,
-	0x931e, 0x0110, 0x6006, 0x0020, 0x2001, 0x0240, 0x6006, 0x8108,
-	0x2162, 0x9292, 0x0021, 0x9296, 0xffff, 0x620a, 0x00ce, 0x003e,
-	0x002e, 0x001e, 0x000e, 0x0005, 0x00b6, 0x0066, 0x6610, 0x2658,
-	0xbe04, 0x96b4, 0xff00, 0x8637, 0x9686, 0x0006, 0x0170, 0x9686,
-	0x0004, 0x0158, 0xbe04, 0x96b4, 0x00ff, 0x9686, 0x0006, 0x0128,
-	0x9686, 0x0004, 0x0110, 0x9085, 0x0001, 0x006e, 0x00be, 0x0005,
-	0x00d6, 0x080c, 0xc6b2, 0x00de, 0x0005, 0x00d6, 0x080c, 0xc6bf,
-	0x1520, 0x680c, 0x908c, 0xff00, 0x6820, 0x9084, 0x00ff, 0x9115,
-	0x6216, 0x6824, 0x602e, 0xd1e4, 0x0130, 0x9006, 0x080c, 0xd5d2,
-	0x2009, 0x0001, 0x0078, 0xd1ec, 0x0180, 0x6920, 0x918c, 0x00ff,
-	0x6824, 0x080c, 0x2459, 0x1148, 0x2001, 0x0001, 0x080c, 0xd5d2,
-	0x2110, 0x900e, 0x080c, 0x307d, 0x0018, 0x9085, 0x0001, 0x0008,
-	0x9006, 0x00de, 0x0005, 0x00b6, 0x00c6, 0x080c, 0x9c55, 0x0598,
-	0x0016, 0x0026, 0x00c6, 0x2011, 0x0263, 0x2204, 0x8211, 0x220c,
-	0x080c, 0x2459, 0x1568, 0x080c, 0x622f, 0x1550, 0xbe12, 0xbd16,
-	0x00ce, 0x002e, 0x001e, 0x2b00, 0x6012, 0x080c, 0xd4b6, 0x11c8,
-	0x080c, 0x3164, 0x11b0, 0x080c, 0xc61c, 0x0500, 0x2001, 0x0007,
-	0x080c, 0x61e0, 0x2001, 0x0007, 0x080c, 0x620c, 0x6017, 0x0000,
-	0x6023, 0x0001, 0x6007, 0x0001, 0x6003, 0x0001, 0x080c, 0x84ee,
-	0x0010, 0x080c, 0x9be6, 0x9085, 0x0001, 0x00ce, 0x00be, 0x0005,
-	0x080c, 0x9be6, 0x00ce, 0x002e, 0x001e, 0x0ca8, 0x080c, 0x9be6,
-	0x9006, 0x0c98, 0x2069, 0x026d, 0x6800, 0x9082, 0x0010, 0x1228,
-	0x6017, 0x0000, 0x9085, 0x0001, 0x0008, 0x9006, 0x0005, 0x6017,
-	0x0000, 0x2069, 0x026c, 0x6808, 0x9084, 0xff00, 0x9086, 0x0800,
-	0x1190, 0x6904, 0x9186, 0x0018, 0x0118, 0x9186, 0x0014, 0x1158,
-	0x810f, 0x6800, 0x9084, 0x00ff, 0x910d, 0x6162, 0x908e, 0x0014,
-	0x0110, 0x908e, 0x0010, 0x0005, 0x6004, 0x90b2, 0x0053, 0x1a0c,
-	0x0d65, 0x91b6, 0x0013, 0x1130, 0x2008, 0x91b2, 0x0040, 0x1a04,
-	0xc7ff, 0x0092, 0x91b6, 0x0027, 0x0120, 0x91b6, 0x0014, 0x190c,
-	0x0d65, 0x2001, 0x0007, 0x080c, 0x620c, 0x080c, 0x8891, 0x080c,
-	0x9c20, 0x080c, 0x894f, 0x0005, 0xc73c, 0xc73e, 0xc73c, 0xc73c,
-	0xc73c, 0xc73e, 0xc74b, 0xc7fc, 0xc79b, 0xc7fc, 0xc7ad, 0xc7fc,
-	0xc74b, 0xc7fc, 0xc7f4, 0xc7fc, 0xc7f4, 0xc7fc, 0xc7fc, 0xc73c,
-	0xc73c, 0xc73c, 0xc73c, 0xc73c, 0xc73c, 0xc73c, 0xc73c, 0xc73c,
-	0xc73c, 0xc73c, 0xc73e, 0xc73c, 0xc7fc, 0xc73c, 0xc73c, 0xc7fc,
-	0xc73c, 0xc7f9, 0xc7fc, 0xc73c, 0xc73c, 0xc73c, 0xc73c, 0xc7fc,
-	0xc7fc, 0xc73c, 0xc7fc, 0xc7fc, 0xc73c, 0xc746, 0xc73c, 0xc73c,
-	0xc73c, 0xc73c, 0xc7f8, 0xc7fc, 0xc73c, 0xc73c, 0xc7fc, 0xc7fc,
-	0xc73c, 0xc73c, 0xc73c, 0xc73c, 0x080c, 0x0d65, 0x080c, 0xbfa7,
-	0x6003, 0x0002, 0x080c, 0x894f, 0x0804, 0xc7fe, 0x9006, 0x080c,
-	0x61cc, 0x0804, 0xc7fc, 0x080c, 0x6682, 0x1904, 0xc7fc, 0x9006,
-	0x080c, 0x61cc, 0x6010, 0x2058, 0xb810, 0x9086, 0x00ff, 0x1140,
-	0x00f6, 0x2079, 0x1800, 0x78a4, 0x8000, 0x78a6, 0x00fe, 0x0428,
-	0x6010, 0x2058, 0xb884, 0x9005, 0x1178, 0x080c, 0xbf8f, 0x1904,
-	0xc7fc, 0x0036, 0x0046, 0xbba0, 0x2021, 0x0007, 0x080c, 0x4a97,
-	0x004e, 0x003e, 0x0804, 0xc7fc, 0x080c, 0x3195, 0x1904, 0xc7fc,
-	0x2001, 0x1800, 0x2004, 0x9086, 0x0002, 0x1138, 0x00f6, 0x2079,
-	0x1800, 0x78a4, 0x8000, 0x78a6, 0x00fe, 0x2001, 0x0002, 0x080c,
-	0x61e0, 0x6023, 0x0001, 0x6003, 0x0001, 0x6007, 0x0002, 0x080c,
-	0x84ee, 0x080c, 0x894f, 0x6110, 0x2158, 0x2009, 0x0001, 0x080c,
-	0x817a, 0x0804, 0xc7fe, 0x6610, 0x2658, 0xbe04, 0x96b4, 0xff00,
-	0x8637, 0x9686, 0x0006, 0x0904, 0xc7fc, 0x9686, 0x0004, 0x0904,
-	0xc7fc, 0x2001, 0x0004, 0x0804, 0xc7fa, 0x2001, 0x1800, 0x2004,
-	0x9086, 0x0003, 0x1158, 0x0036, 0x0046, 0x6010, 0x2058, 0xbba0,
-	0x2021, 0x0006, 0x080c, 0x4a97, 0x004e, 0x003e, 0x2001, 0x0006,
-	0x080c, 0xc818, 0x6610, 0x2658, 0xbe04, 0x0066, 0x96b4, 0xff00,
-	0x8637, 0x9686, 0x0006, 0x006e, 0x0168, 0x2001, 0x0006, 0x080c,
-	0x620c, 0x9284, 0x00ff, 0x908e, 0x0007, 0x1120, 0x2001, 0x0006,
-	0x080c, 0x61e0, 0x080c, 0x6682, 0x11f8, 0x2001, 0x1836, 0x2004,
-	0xd0a4, 0x01d0, 0xbe04, 0x96b4, 0x00ff, 0x9686, 0x0006, 0x01a0,
-	0x00f6, 0x2079, 0x1800, 0x78a4, 0x8000, 0x78a6, 0x00fe, 0x0804,
-	0xc785, 0x2001, 0x0004, 0x0030, 0x2001, 0x0006, 0x0409, 0x0020,
-	0x0018, 0x0010, 0x080c, 0x620c, 0x080c, 0x9be6, 0x0005, 0x2600,
-	0x0002, 0xc813, 0xc813, 0xc813, 0xc813, 0xc813, 0xc815, 0xc813,
-	0xc813, 0xc813, 0xc813, 0xc815, 0xc813, 0xc813, 0xc813, 0xc815,
-	0xc815, 0xc815, 0xc815, 0x080c, 0x0d65, 0x080c, 0x9be6, 0x0005,
-	0x0016, 0x00b6, 0x00d6, 0x6110, 0x2158, 0xb900, 0xd184, 0x0138,
-	0x080c, 0x61e0, 0x9006, 0x080c, 0x61cc, 0x080c, 0x305d, 0x00de,
-	0x00be, 0x001e, 0x0005, 0x6610, 0x2658, 0xb804, 0x9084, 0xff00,
-	0x8007, 0x90b2, 0x000c, 0x1a0c, 0x0d65, 0x91b6, 0x0015, 0x1110,
-	0x003b, 0x0028, 0x91b6, 0x0016, 0x190c, 0x0d65, 0x006b, 0x0005,
-	0xa67d, 0xa67d, 0xa67d, 0xa67d, 0xc8ad, 0xa67d, 0xc897, 0xc858,
-	0xa67d, 0xa67d, 0xa67d, 0xa67d, 0xa67d, 0xa67d, 0xa67d, 0xa67d,
-	0xc8ad, 0xa67d, 0xc897, 0xc89e, 0xa67d, 0xa67d, 0xa67d, 0xa67d,
-	0x00f6, 0x080c, 0x6682, 0x11d8, 0x080c, 0xbf8f, 0x11c0, 0x6010,
-	0x905d, 0x01a8, 0xb884, 0x9005, 0x0190, 0x9006, 0x080c, 0x61cc,
-	0x2001, 0x0002, 0x080c, 0x61e0, 0x6023, 0x0001, 0x6003, 0x0001,
-	0x6007, 0x0002, 0x080c, 0x84ee, 0x080c, 0x894f, 0x00f0, 0x2011,
-	0x0263, 0x2204, 0x8211, 0x220c, 0x080c, 0x2459, 0x11b0, 0x080c,
-	0x628f, 0x0118, 0x080c, 0x9be6, 0x0080, 0xb810, 0x0006, 0xb814,
-	0x0006, 0xb884, 0x0006, 0x080c, 0x5d11, 0x000e, 0xb886, 0x000e,
-	0xb816, 0x000e, 0xb812, 0x080c, 0x9be6, 0x00fe, 0x0005, 0x6604,
-	0x96b6, 0x001e, 0x1110, 0x080c, 0x9be6, 0x0005, 0x080c, 0xaa63,
-	0x1148, 0x6003, 0x0001, 0x6007, 0x0001, 0x080c, 0x84ee, 0x080c,
-	0x894f, 0x0010, 0x080c, 0x9be6, 0x0005, 0x0804, 0x9be6, 0x6004,
-	0x908a, 0x0053, 0x1a0c, 0x0d65, 0x080c, 0x8891, 0x080c, 0x9c20,
-	0x0005, 0x9182, 0x0040, 0x0002, 0xc8d0, 0xc8d0, 0xc8d0, 0xc8d0,
-	0xc8d2, 0xc8d0, 0xc8d0, 0xc8d0, 0xc8d0, 0xc8d0, 0xc8d0, 0xc8d0,
-	0xc8d0, 0xc8d0, 0xc8d0, 0xc8d0, 0xc8d0, 0xc8d0, 0xc8d0, 0xc8d0,
-	0x080c, 0x0d65, 0x0096, 0x00b6, 0x00d6, 0x00e6, 0x00f6, 0x0046,
-	0x0026, 0x6210, 0x2258, 0xb8ac, 0x9005, 0x11b0, 0x6007, 0x0044,
-	0x2071, 0x0260, 0x7444, 0x94a4, 0xff00, 0x0904, 0xc939, 0x080c,
-	0xd5c6, 0x1170, 0x9486, 0x2000, 0x1158, 0x2009, 0x0001, 0x2011,
-	0x0200, 0x080c, 0x8401, 0x0020, 0x9026, 0x080c, 0xd4fb, 0x0c30,
-	0x080c, 0x102f, 0x090c, 0x0d65, 0x6003, 0x0007, 0xa867, 0x010d,
-	0x9006, 0xa802, 0xa86a, 0xac8a, 0x2c00, 0xa88e, 0x6008, 0xa8e2,
-	0x6010, 0x2058, 0xb8a0, 0x7130, 0xa97a, 0x0016, 0xa876, 0xa87f,
-	0x0000, 0xa883, 0x0000, 0xa887, 0x0036, 0x080c, 0x69b5, 0x001e,
-	0x080c, 0xd5c6, 0x1904, 0xc999, 0x9486, 0x2000, 0x1130, 0x2019,
-	0x0017, 0x080c, 0xd234, 0x0804, 0xc999, 0x9486, 0x0200, 0x1120,
-	0x080c, 0xd1c4, 0x0804, 0xc999, 0x9486, 0x0400, 0x0120, 0x9486,
-	0x1000, 0x1904, 0xc999, 0x2019, 0x0002, 0x080c, 0xd1e3, 0x0804,
-	0xc999, 0x2069, 0x1a46, 0x6a00, 0xd284, 0x0904, 0xca03, 0x9284,
-	0x0300, 0x1904, 0xc9fc, 0x6804, 0x9005, 0x0904, 0xc9e4, 0x2d78,
-	0x6003, 0x0007, 0x080c, 0x1048, 0x0904, 0xc9a5, 0x7800, 0xd08c,
-	0x1118, 0x7804, 0x8001, 0x7806, 0x6017, 0x0000, 0x2001, 0x180f,
-	0x2004, 0xd084, 0x1904, 0xca07, 0x9006, 0xa802, 0xa867, 0x0116,
-	0xa86a, 0x6008, 0xa8e2, 0x2c00, 0xa87a, 0x6010, 0x2058, 0xb8a0,
-	0x7130, 0xa9b6, 0xa876, 0xb928, 0xa9ba, 0xb92c, 0xa9be, 0xb930,
-	0xa9c2, 0xb934, 0xa9c6, 0xa883, 0x003d, 0x7044, 0x9084, 0x0003,
-	0x9080, 0xc9a1, 0x2005, 0xa87e, 0x20a9, 0x000a, 0x2001, 0x0270,
-	0xaa5c, 0x9290, 0x0021, 0x2009, 0x0205, 0x200b, 0x0080, 0x20e1,
-	0x0000, 0xab60, 0x23e8, 0x2098, 0x22a0, 0x4003, 0x200b, 0x0000,
-	0x2001, 0x027a, 0x200c, 0xa9b2, 0x8000, 0x200c, 0xa9ae, 0x080c,
-	0x69b8, 0x002e, 0x004e, 0x00fe, 0x00ee, 0x00de, 0x00be, 0x009e,
-	0x0005, 0x0000, 0x0080, 0x0040, 0x0000, 0x2001, 0x1810, 0x2004,
-	0xd084, 0x0120, 0x080c, 0x102f, 0x1904, 0xc94e, 0x6017, 0xf100,
-	0x6003, 0x0001, 0x6007, 0x0041, 0x2009, 0xa022, 0x080c, 0x84e7,
-	0x0c00, 0x2069, 0x0260, 0x6848, 0x9084, 0xff00, 0x9086, 0x1200,
-	0x1198, 0x686c, 0x9084, 0x00ff, 0x0016, 0x6114, 0x918c, 0xf700,
-	0x910d, 0x6116, 0x001e, 0x6003, 0x0001, 0x6007, 0x0043, 0x2009,
-	0xa025, 0x080c, 0x84e7, 0x0828, 0x6868, 0x602e, 0x686c, 0x6032,
-	0x6017, 0xf200, 0x6003, 0x0001, 0x6007, 0x0041, 0x2009, 0xa022,
-	0x080c, 0x84e7, 0x0804, 0xc999, 0x2001, 0x180e, 0x2004, 0xd0ec,
-	0x0120, 0x2011, 0x8049, 0x080c, 0x48fa, 0x6017, 0xf300, 0x0010,
-	0x6017, 0xf100, 0x6003, 0x0001, 0x6007, 0x0041, 0x2009, 0xa022,
-	0x080c, 0x84e7, 0x0804, 0xc999, 0x6017, 0xf500, 0x0c98, 0x6017,
-	0xf600, 0x0804, 0xc9b9, 0x6017, 0xf200, 0x0804, 0xc9b9, 0xa867,
-	0x0146, 0xa86b, 0x0000, 0x6008, 0xa886, 0x2c00, 0xa87a, 0x7044,
-	0x9084, 0x0003, 0x9080, 0xc9a1, 0x2005, 0xa87e, 0x2928, 0x6010,
-	0x2058, 0xb8a0, 0xa876, 0xb828, 0xa88a, 0xb82c, 0xa88e, 0xb830,
-	0xa892, 0xb834, 0xa896, 0xa883, 0x003d, 0x2009, 0x0205, 0x2104,
-	0x9085, 0x0080, 0x200a, 0x20e1, 0x0000, 0x2011, 0x0210, 0x2214,
-	0x9294, 0x0fff, 0xaaa2, 0x9282, 0x0111, 0x1a0c, 0x0d65, 0x8210,
-	0x821c, 0x2001, 0x026c, 0x2098, 0xa860, 0x20e8, 0xa85c, 0x9080,
-	0x0029, 0x20a0, 0x2011, 0xca83, 0x2041, 0x0001, 0x223d, 0x9784,
-	0x00ff, 0x9322, 0x1208, 0x2300, 0x20a8, 0x4003, 0x931a, 0x0530,
-	0x8210, 0xd7fc, 0x1130, 0x8d68, 0x2d0a, 0x2001, 0x0260, 0x2098,
-	0x0c68, 0x2950, 0x080c, 0x1048, 0x0170, 0x2900, 0xb002, 0xa867,
-	0x0147, 0xa86b, 0x0000, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x001b,
-	0x20a0, 0x8840, 0x08d8, 0x2548, 0xa800, 0x902d, 0x0118, 0x080c,
-	0x1061, 0x0cc8, 0x080c, 0x1061, 0x0804, 0xc9a5, 0x2548, 0x8847,
-	0x9885, 0x0046, 0xa866, 0x2009, 0x0205, 0x200b, 0x0000, 0x080c,
-	0xd267, 0x0804, 0xc999, 0x8010, 0x0004, 0x801a, 0x0006, 0x8018,
-	0x0008, 0x8016, 0x000a, 0x8014, 0x9186, 0x0013, 0x1160, 0x6004,
-	0x908a, 0x0057, 0x1a0c, 0x0d65, 0x9082, 0x0040, 0x0a0c, 0x0d65,
-	0x2008, 0x0804, 0xcb0f, 0x9186, 0x0051, 0x0108, 0x0040, 0x080c,
-	0x9ab6, 0x01e8, 0x9086, 0x0002, 0x0904, 0xcb57, 0x00c0, 0x9186,
-	0x0027, 0x0180, 0x9186, 0x0048, 0x0128, 0x9186, 0x0014, 0x0150,
-	0x190c, 0x0d65, 0x080c, 0x9ab6, 0x0150, 0x9086, 0x0004, 0x0904,
-	0xcbf6, 0x0028, 0x6004, 0x9082, 0x0040, 0x2008, 0x001a, 0x080c,
-	0x9c9f, 0x0005, 0xcad6, 0xcad8, 0xcad8, 0xcaff, 0xcad6, 0xcad6,
-	0xcad6, 0xcad6, 0xcad6, 0xcad6, 0xcad6, 0xcad6, 0xcad6, 0xcad6,
-	0xcad6, 0xcad6, 0xcad6, 0xcad6, 0xcad6, 0xcad6, 0x080c, 0x0d65,
-	0x080c, 0x8891, 0x080c, 0x894f, 0x0036, 0x0096, 0x6014, 0x904d,
-	0x01d8, 0x080c, 0xb870, 0x01c0, 0x6003, 0x0002, 0x6010, 0x00b6,
-	0x2058, 0xb800, 0x00be, 0xd0bc, 0x1178, 0x2019, 0x0004, 0x080c,
-	0xd267, 0x6017, 0x0000, 0x6018, 0x9005, 0x1120, 0x2001, 0x195f,
-	0x2004, 0x601a, 0x6003, 0x0007, 0x009e, 0x003e, 0x0005, 0x0096,
-	0x080c, 0x8891, 0x080c, 0x894f, 0x080c, 0xb870, 0x0120, 0x6014,
-	0x2048, 0x080c, 0x1061, 0x080c, 0x9c20, 0x009e, 0x0005, 0x0002,
-	0xcb24, 0xcb39, 0xcb26, 0xcb4e, 0xcb24, 0xcb24, 0xcb24, 0xcb24,
-	0xcb24, 0xcb24, 0xcb24, 0xcb24, 0xcb24, 0xcb24, 0xcb24, 0xcb24,
-	0xcb24, 0xcb24, 0xcb24, 0xcb24, 0x080c, 0x0d65, 0x0096, 0x6014,
-	0x2048, 0xa87c, 0xd0b4, 0x0138, 0x6003, 0x0007, 0x2009, 0x0043,
-	0x080c, 0x9c82, 0x0010, 0x6003, 0x0004, 0x080c, 0x894f, 0x009e,
-	0x0005, 0x080c, 0xb870, 0x0138, 0x6114, 0x0096, 0x2148, 0xa97c,
-	0x009e, 0xd1ec, 0x1138, 0x080c, 0x83d6, 0x080c, 0x9be6, 0x080c,
-	0x894f, 0x0005, 0x080c, 0xd4bf, 0x0db0, 0x0cc8, 0x6003, 0x0001,
-	0x6007, 0x0041, 0x2009, 0xa022, 0x080c, 0x84e7, 0x0005, 0x9182,
-	0x0040, 0x0002, 0xcb6e, 0xcb70, 0xcb6e, 0xcb6e, 0xcb6e, 0xcb6e,
-	0xcb6e, 0xcb6e, 0xcb6e, 0xcb6e, 0xcb6e, 0xcb6e, 0xcb6e, 0xcb6e,
-	0xcb6e, 0xcb6e, 0xcb6e, 0xcb71, 0xcb6e, 0xcb6e, 0x080c, 0x0d65,
-	0x0005, 0x00d6, 0x080c, 0x83d6, 0x00de, 0x080c, 0xd517, 0x080c,
-	0x9be6, 0x0005, 0x9182, 0x0040, 0x0002, 0xcb91, 0xcb91, 0xcb91,
-	0xcb91, 0xcb91, 0xcb91, 0xcb91, 0xcb91, 0xcb91, 0xcb93, 0xcbbe,
-	0xcb91, 0xcb91, 0xcb91, 0xcb91, 0xcbbe, 0xcb91, 0xcb91, 0xcb91,
-	0xcb91, 0x080c, 0x0d65, 0x6014, 0x0096, 0x2048, 0xa87c, 0xd0fc,
-	0x0168, 0x908c, 0x0003, 0x918e, 0x0002, 0x0180, 0x6144, 0xd1e4,
-	0x1168, 0x2009, 0x0041, 0x009e, 0x0804, 0xcc7e, 0x6003, 0x0007,
-	0x601b, 0x0000, 0x080c, 0x83d6, 0x009e, 0x0005, 0x6014, 0x2048,
-	0xa97c, 0xd1ec, 0x1130, 0x080c, 0x83d6, 0x080c, 0x9be6, 0x009e,
-	0x0005, 0x080c, 0xd4bf, 0x0db8, 0x009e, 0x0005, 0x2001, 0x180c,
-	0x200c, 0xc1d4, 0x2102, 0x0036, 0x080c, 0x88ec, 0x080c, 0x894f,
-	0x6014, 0x0096, 0x2048, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be,
-	0xd0bc, 0x0188, 0xa87c, 0x9084, 0x0003, 0x9086, 0x0002, 0x0140,
-	0xa8ac, 0x6330, 0x931a, 0x6332, 0xa8b0, 0x632c, 0x931b, 0x632e,
-	0x6003, 0x0002, 0x0080, 0x2019, 0x0004, 0x080c, 0xd267, 0x6018,
-	0x9005, 0x1128, 0x2001, 0x195f, 0x2004, 0x8003, 0x601a, 0x6017,
-	0x0000, 0x6003, 0x0007, 0x009e, 0x003e, 0x0005, 0x9182, 0x0040,
-	0x0002, 0xcc0d, 0xcc0d, 0xcc0d, 0xcc0d, 0xcc0d, 0xcc0d, 0xcc0d,
-	0xcc0d, 0xcc0f, 0xcc0d, 0xcc0d, 0xcc0d, 0xcc0d, 0xcc0d, 0xcc0d,
-	0xcc0d, 0xcc0d, 0xcc0d, 0xcc0d, 0xcc5a, 0x080c, 0x0d65, 0x6014,
-	0x0096, 0x2048, 0xa834, 0xaa38, 0x6110, 0x00b6, 0x2158, 0xb900,
-	0x00be, 0xd1bc, 0x1190, 0x920d, 0x1518, 0xa87c, 0xd0fc, 0x0128,
-	0x2009, 0x0041, 0x009e, 0x0804, 0xcc7e, 0x6003, 0x0007, 0x601b,
-	0x0000, 0x080c, 0x83d6, 0x009e, 0x0005, 0x6124, 0xd1f4, 0x1d58,
-	0x0006, 0x0046, 0xacac, 0x9422, 0xa9b0, 0x2200, 0x910b, 0x6030,
-	0x9420, 0x6432, 0x602c, 0x9109, 0x612e, 0x004e, 0x000e, 0x08d8,
-	0x6110, 0x00b6, 0x2158, 0xb900, 0x00be, 0xd1bc, 0x1178, 0x2009,
-	0x180e, 0x210c, 0xd19c, 0x0118, 0x6003, 0x0007, 0x0010, 0x6003,
-	0x0006, 0x00e9, 0x080c, 0x83d8, 0x009e, 0x0005, 0x6003, 0x0002,
-	0x009e, 0x0005, 0x6024, 0xd0f4, 0x0128, 0x080c, 0x15af, 0x1904,
-	0xcc0f, 0x0005, 0x6014, 0x0096, 0x2048, 0xa834, 0xa938, 0x009e,
-	0x9105, 0x1120, 0x080c, 0x15af, 0x1904, 0xcc0f, 0x0005, 0xd2fc,
-	0x0140, 0x8002, 0x8000, 0x8212, 0x9291, 0x0000, 0x2009, 0x0009,
-	0x0010, 0x2009, 0x0015, 0xaa9a, 0xa896, 0x0005, 0x9182, 0x0040,
-	0x0208, 0x0062, 0x9186, 0x0013, 0x0120, 0x9186, 0x0014, 0x190c,
-	0x0d65, 0x6024, 0xd0dc, 0x090c, 0x0d65, 0x0005, 0xcca2, 0xccae,
-	0xccba, 0xccc6, 0xcca2, 0xcca2, 0xcca2, 0xcca2, 0xcca9, 0xcca4,
-	0xcca4, 0xcca2, 0xcca2, 0xcca2, 0xcca2, 0xcca4, 0xcca2, 0xcca4,
-	0xcca2, 0xcca9, 0x080c, 0x0d65, 0x6024, 0xd0dc, 0x090c, 0x0d65,
-	0x0005, 0x6014, 0x9005, 0x190c, 0x0d65, 0x0005, 0x6003, 0x0001,
-	0x6106, 0x0126, 0x2091, 0x8000, 0x2009, 0xa022, 0x080c, 0x84c9,
-	0x012e, 0x0005, 0x6003, 0x0004, 0x6106, 0x0126, 0x2091, 0x8000,
-	0x2009, 0xa001, 0x080c, 0x84e7, 0x012e, 0x0005, 0x6003, 0x0003,
-	0x6106, 0x080c, 0x1aca, 0x0126, 0x2091, 0x8000, 0x6014, 0x0096,
-	0x2048, 0xa87c, 0xd0fc, 0x0188, 0x9084, 0x0003, 0x9086, 0x0002,
-	0x01a0, 0x6024, 0xd0cc, 0x1148, 0xd0c4, 0x1138, 0xa8a8, 0x9005,
-	0x1120, 0x6144, 0x918d, 0xb035, 0x0018, 0x6144, 0x918d, 0xa035,
-	0x009e, 0x080c, 0x852e, 0x012e, 0x0005, 0x6144, 0x918d, 0xa032,
-	0x0cb8, 0x0126, 0x2091, 0x8000, 0x0036, 0x0096, 0x9182, 0x0040,
-	0x0023, 0x009e, 0x003e, 0x012e, 0x0005, 0xcd11, 0xcd13, 0xcd28,
-	0xcd42, 0xcd11, 0xcd11, 0xcd11, 0xcd11, 0xcd11, 0xcd11, 0xcd11,
-	0xcd11, 0xcd11, 0xcd11, 0xcd11, 0xcd11, 0xcd11, 0xcd11, 0xcd11,
-	0xcd11, 0x080c, 0x0d65, 0x6014, 0x2048, 0xa87c, 0xd0fc, 0x0510,
-	0x909c, 0x0003, 0x939e, 0x0003, 0x01e8, 0x6003, 0x0001, 0x6106,
-	0x0126, 0x2091, 0x8000, 0x2009, 0xa022, 0x080c, 0x84e7, 0x0470,
-	0x6014, 0x2048, 0xa87c, 0xd0fc, 0x0168, 0x909c, 0x0003, 0x939e,
-	0x0003, 0x0140, 0x6003, 0x0001, 0x6106, 0x2009, 0xa001, 0x080c,
-	0x84e7, 0x00e0, 0x901e, 0x6316, 0x631a, 0x2019, 0x0004, 0x080c,
-	0xd267, 0x00a0, 0x6014, 0x2048, 0xa87c, 0xd0fc, 0x0d98, 0x909c,
-	0x0003, 0x939e, 0x0003, 0x0d70, 0x6003, 0x0003, 0x6106, 0x080c,
-	0x1aca, 0x6144, 0x918d, 0xa035, 0x080c, 0x852e, 0x0005, 0x080c,
-	0x8891, 0x6114, 0x81ff, 0x0158, 0x0096, 0x2148, 0x080c, 0xd563,
-	0x0036, 0x2019, 0x0029, 0x080c, 0xd267, 0x003e, 0x009e, 0x080c,
-	0x9c20, 0x080c, 0x894f, 0x0005, 0x080c, 0x88ec, 0x6114, 0x81ff,
-	0x0158, 0x0096, 0x2148, 0x080c, 0xd563, 0x0036, 0x2019, 0x0029,
-	0x080c, 0xd267, 0x003e, 0x009e, 0x080c, 0x9c20, 0x0005, 0x9182,
-	0x0085, 0x0002, 0xcd91, 0xcd8f, 0xcd8f, 0xcd9d, 0xcd8f, 0xcd8f,
-	0xcd8f, 0xcd8f, 0xcd8f, 0xcd8f, 0xcd8f, 0xcd8f, 0xcd8f, 0x080c,
-	0x0d65, 0x6003, 0x000b, 0x6106, 0x0126, 0x2091, 0x8000, 0x2009,
-	0x8020, 0x080c, 0x84e7, 0x012e, 0x0005, 0x0026, 0x00e6, 0x080c,
-	0xd4b6, 0x0118, 0x080c, 0x9be6, 0x0440, 0x2071, 0x0260, 0x7224,
-	0x6216, 0x2001, 0x180e, 0x2004, 0xd0e4, 0x0150, 0x6010, 0x00b6,
-	0x2058, 0xbca0, 0x00be, 0x2c00, 0x2011, 0x014e, 0x080c, 0x9f10,
-	0x7220, 0x080c, 0xd0fd, 0x0118, 0x6007, 0x0086, 0x0040, 0x6007,
-	0x0087, 0x7224, 0x9296, 0xffff, 0x1110, 0x6007, 0x0086, 0x6003,
-	0x0001, 0x2009, 0x8020, 0x080c, 0x84e7, 0x00ee, 0x002e, 0x0005,
-	0x9186, 0x0013, 0x1160, 0x6004, 0x908a, 0x0085, 0x0a0c, 0x0d65,
-	0x908a, 0x0092, 0x1a0c, 0x0d65, 0x9082, 0x0085, 0x00a2, 0x9186,
-	0x0027, 0x0130, 0x9186, 0x0014, 0x0118, 0x080c, 0x9c9f, 0x0050,
-	0x2001, 0x0007, 0x080c, 0x620c, 0x080c, 0x8891, 0x080c, 0x9c20,
-	0x080c, 0x894f, 0x0005, 0xce00, 0xce02, 0xce02, 0xce00, 0xce00,
-	0xce00, 0xce00, 0xce00, 0xce00, 0xce00, 0xce00, 0xce00, 0xce00,
-	0x080c, 0x0d65, 0x080c, 0x9c20, 0x080c, 0x894f, 0x0005, 0x9182,
-	0x0085, 0x0a0c, 0x0d65, 0x9182, 0x0092, 0x1a0c, 0x0d65, 0x9182,
-	0x0085, 0x0002, 0xce1f, 0xce1f, 0xce1f, 0xce21, 0xce1f, 0xce1f,
-	0xce1f, 0xce1f, 0xce1f, 0xce1f, 0xce1f, 0xce1f, 0xce1f, 0x080c,
-	0x0d65, 0x0005, 0x9186, 0x0013, 0x0148, 0x9186, 0x0014, 0x0130,
-	0x9186, 0x0027, 0x0118, 0x080c, 0x9c9f, 0x0020, 0x080c, 0x8891,
-	0x080c, 0x9c20, 0x0005, 0x0036, 0x080c, 0xd517, 0x604b, 0x0000,
-	0x2019, 0x000b, 0x0031, 0x6023, 0x0006, 0x6003, 0x0007, 0x003e,
-	0x0005, 0x0126, 0x0036, 0x2091, 0x8000, 0x2001, 0x0382, 0x2004,
-	0x9084, 0x0007, 0x0006, 0x9086, 0x0003, 0x0110, 0x080c, 0x98c7,
-	0x0086, 0x2c40, 0x0096, 0x904e, 0x080c, 0x936d, 0x009e, 0x008e,
-	0x1558, 0x0076, 0x2c38, 0x080c, 0x9418, 0x007e, 0x1528, 0x6000,
-	0x9086, 0x0000, 0x0508, 0x6020, 0x9086, 0x0007, 0x01e8, 0x0096,
-	0x601c, 0xd084, 0x0140, 0x080c, 0xd517, 0x080c, 0xbfa7, 0x080c,
-	0x193e, 0x6023, 0x0007, 0x6014, 0x2048, 0x080c, 0xb870, 0x0110,
-	0x080c, 0xd267, 0x009e, 0x9006, 0x6046, 0x6016, 0x080c, 0xd517,
-	0x6023, 0x0007, 0x080c, 0xbfa7, 0x000e, 0x9086, 0x0003, 0x0110,
-	0x080c, 0x98e3, 0x003e, 0x012e, 0x0005, 0x00f6, 0x00c6, 0x00b6,
-	0x0036, 0x0156, 0x2079, 0x0260, 0x7938, 0x783c, 0x080c, 0x2459,
-	0x15e8, 0x0016, 0x00c6, 0x080c, 0x628f, 0x15b0, 0x001e, 0x00c6,
-	0x2160, 0x080c, 0xbfa4, 0x00ce, 0x002e, 0x0026, 0x0016, 0x080c,
-	0x98c7, 0x2019, 0x0029, 0x080c, 0x94e5, 0x080c, 0x8658, 0x0076,
-	0x903e, 0x080c, 0x853d, 0x007e, 0x001e, 0x0076, 0x903e, 0x080c,
-	0xd011, 0x007e, 0x080c, 0x98e3, 0x0026, 0xba04, 0x9294, 0xff00,
-	0x8217, 0x9286, 0x0006, 0x0118, 0x9286, 0x0004, 0x1118, 0xbaa0,
-	0x080c, 0x30f8, 0x002e, 0xbc84, 0x001e, 0x080c, 0x5d11, 0xbe12,
-	0xbd16, 0xbc86, 0x9006, 0x0010, 0x00ce, 0x001e, 0x015e, 0x003e,
-	0x00be, 0x00ce, 0x00fe, 0x0005, 0x00c6, 0x00d6, 0x00b6, 0x0016,
-	0x2009, 0x1823, 0x2104, 0x9086, 0x0074, 0x1904, 0xcf35, 0x2069,
-	0x0260, 0x6944, 0x9182, 0x0100, 0x06e0, 0x6940, 0x9184, 0x8000,
-	0x0904, 0xcf32, 0x2001, 0x1954, 0x2004, 0x9005, 0x1140, 0x6010,
-	0x2058, 0xb884, 0x9005, 0x0118, 0x9184, 0x0800, 0x0598, 0x6948,
-	0x918a, 0x0001, 0x0648, 0x080c, 0xd5cb, 0x0118, 0x6978, 0xd1fc,
-	0x11b8, 0x2009, 0x0205, 0x200b, 0x0001, 0x693c, 0x81ff, 0x1198,
-	0x6944, 0x9182, 0x0100, 0x02a8, 0x6940, 0x81ff, 0x1178, 0x6948,
-	0x918a, 0x0001, 0x0288, 0x6950, 0x918a, 0x0001, 0x0298, 0x00d0,
-	0x6017, 0x0100, 0x00a0, 0x6017, 0x0300, 0x0088, 0x6017, 0x0500,
-	0x0070, 0x6017, 0x0700, 0x0058, 0x6017, 0x0900, 0x0040, 0x6017,
-	0x0b00, 0x0028, 0x6017, 0x0f00, 0x0010, 0x6017, 0x2d00, 0x9085,
-	0x0001, 0x0008, 0x9006, 0x001e, 0x00be, 0x00de, 0x00ce, 0x0005,
-	0x00c6, 0x00b6, 0x0026, 0x0036, 0x0156, 0x6210, 0x2258, 0xbb04,
-	0x9394, 0x00ff, 0x9286, 0x0006, 0x0180, 0x9286, 0x0004, 0x0168,
-	0x9394, 0xff00, 0x8217, 0x9286, 0x0006, 0x0138, 0x9286, 0x0004,
-	0x0120, 0x080c, 0x629e, 0x0804, 0xcfa0, 0x2011, 0x0276, 0x20a9,
-	0x0004, 0x0096, 0x2b48, 0x2019, 0x000a, 0x080c, 0xabee, 0x009e,
-	0x15c0, 0x2011, 0x027a, 0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019,
-	0x0006, 0x080c, 0xabee, 0x009e, 0x1560, 0x0046, 0x0016, 0xbaa0,
-	0x2220, 0x9006, 0x2009, 0x185c, 0x210c, 0x0038, 0x2009, 0x0029,
-	0x080c, 0xd2bc, 0xb800, 0xc0e5, 0xb802, 0x080c, 0x98c7, 0x2019,
-	0x0029, 0x080c, 0x8658, 0x0076, 0x2039, 0x0000, 0x080c, 0x853d,
-	0x2c08, 0x080c, 0xd011, 0x007e, 0x080c, 0x98e3, 0x2001, 0x0007,
-	0x080c, 0x620c, 0x2001, 0x0007, 0x080c, 0x61e0, 0x001e, 0x004e,
-	0x9006, 0x015e, 0x003e, 0x002e, 0x00be, 0x00ce, 0x0005, 0x00d6,
-	0x2069, 0x026e, 0x6800, 0x9086, 0x0800, 0x0118, 0x6017, 0x0000,
-	0x0008, 0x9006, 0x00de, 0x0005, 0x00b6, 0x00f6, 0x0016, 0x0026,
-	0x0036, 0x0156, 0x2079, 0x026c, 0x7930, 0x7834, 0x080c, 0x2459,
-	0x11d0, 0x080c, 0x628f, 0x11b8, 0x2011, 0x0270, 0x20a9, 0x0004,
-	0x0096, 0x2b48, 0x2019, 0x000a, 0x080c, 0xabee, 0x009e, 0x1158,
-	0x2011, 0x0274, 0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019, 0x0006,
-	0x080c, 0xabee, 0x009e, 0x015e, 0x003e, 0x002e, 0x001e, 0x00fe,
-	0x00be, 0x0005, 0x00b6, 0x0006, 0x0016, 0x0026, 0x0036, 0x0156,
-	0x2011, 0x0263, 0x2204, 0x8211, 0x220c, 0x080c, 0x2459, 0x11d0,
-	0x080c, 0x628f, 0x11b8, 0x2011, 0x0276, 0x20a9, 0x0004, 0x0096,
-	0x2b48, 0x2019, 0x000a, 0x080c, 0xabee, 0x009e, 0x1158, 0x2011,
-	0x027a, 0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019, 0x0006, 0x080c,
-	0xabee, 0x009e, 0x015e, 0x003e, 0x002e, 0x001e, 0x000e, 0x00be,
-	0x0005, 0x00e6, 0x00c6, 0x0086, 0x0076, 0x0066, 0x0056, 0x0046,
-	0x0026, 0x0126, 0x2091, 0x8000, 0x080c, 0x9925, 0x0106, 0x190c,
-	0x98c7, 0x2740, 0x2029, 0x19cb, 0x252c, 0x2021, 0x19d2, 0x2424,
-	0x2061, 0x1ddc, 0x2071, 0x1800, 0x7650, 0x7070, 0x81ff, 0x0150,
-	0x0006, 0x9186, 0x1b09, 0x000e, 0x0128, 0x8001, 0x9602, 0x1a04,
-	0xd0b2, 0x0018, 0x9606, 0x0904, 0xd0b2, 0x2100, 0x9c06, 0x0904,
-	0xd0a9, 0x080c, 0xd2fd, 0x1904, 0xd0a9, 0x080c, 0xd5e8, 0x0904,
-	0xd0a9, 0x080c, 0xd2ed, 0x0904, 0xd0a9, 0x6720, 0x9786, 0x0001,
-	0x1148, 0x080c, 0x3195, 0x0904, 0xd0d1, 0x6004, 0x9086, 0x0000,
-	0x1904, 0xd0d1, 0x9786, 0x0004, 0x0904, 0xd0d1, 0x9786, 0x0007,
-	0x0904, 0xd0a9, 0x2500, 0x9c06, 0x0904, 0xd0a9, 0x2400, 0x9c06,
-	0x0904, 0xd0a9, 0x88ff, 0x0118, 0x605c, 0x9906, 0x15d0, 0x0096,
-	0x6043, 0xffff, 0x6000, 0x9086, 0x0004, 0x1120, 0x0016, 0x080c,
-	0x193e, 0x001e, 0x9786, 0x000a, 0x0148, 0x080c, 0xba85, 0x1130,
-	0x080c, 0xa59c, 0x009e, 0x080c, 0x9c20, 0x0418, 0x6014, 0x2048,
-	0x080c, 0xb870, 0x01d8, 0x9786, 0x0003, 0x1588, 0xa867, 0x0103,
-	0xa87c, 0xd0cc, 0x0130, 0x0096, 0xa878, 0x2048, 0x080c, 0x0fe1,
-	0x009e, 0xab7a, 0xa877, 0x0000, 0x080c, 0xd563, 0x0016, 0x080c,
-	0xbb73, 0x080c, 0x69a9, 0x001e, 0x080c, 0xba5f, 0x009e, 0x080c,
-	0x9c20, 0x9ce0, 0x001c, 0x2001, 0x1819, 0x2004, 0x9c02, 0x1210,
-	0x0804, 0xd02a, 0x010e, 0x190c, 0x98e3, 0x012e, 0x002e, 0x004e,
-	0x005e, 0x006e, 0x007e, 0x008e, 0x00ce, 0x00ee, 0x0005, 0x9786,
-	0x0006, 0x1150, 0x9386, 0x0005, 0x0128, 0x080c, 0xd563, 0x080c,
-	0xd267, 0x08e0, 0x009e, 0x08e8, 0x9786, 0x000a, 0x0908, 0x0804,
-	0xd08e, 0x81ff, 0x09b0, 0x9180, 0x0001, 0x2004, 0x9086, 0x0018,
-	0x0130, 0x9180, 0x0001, 0x2004, 0x9086, 0x002d, 0x1950, 0x6000,
-	0x9086, 0x0002, 0x1930, 0x080c, 0xba74, 0x0130, 0x080c, 0xba85,
-	0x1900, 0x080c, 0xa59c, 0x0038, 0x080c, 0x305d, 0x080c, 0xba85,
-	0x1110, 0x080c, 0xa59c, 0x080c, 0x9c20, 0x0804, 0xd0a9, 0xa864,
-	0x9084, 0x00ff, 0x9086, 0x0039, 0x0005, 0x00c6, 0x00e6, 0x0016,
-	0x2c08, 0x2170, 0x9006, 0x080c, 0xd28e, 0x001e, 0x0120, 0x6020,
-	0x9084, 0x000f, 0x001b, 0x00ee, 0x00ce, 0x0005, 0xd11c, 0xd11c,
-	0xd11c, 0xd11c, 0xd11c, 0xd11c, 0xd11e, 0xd11c, 0xd11c, 0xd11c,
-	0xd11c, 0x9c20, 0x9c20, 0xd11c, 0x9006, 0x0005, 0x0036, 0x0046,
-	0x0016, 0x7010, 0x00b6, 0x2058, 0xbca0, 0x00be, 0x2c00, 0x2009,
-	0x0020, 0x080c, 0xd2bc, 0x001e, 0x004e, 0x2019, 0x0002, 0x080c,
-	0xce41, 0x003e, 0x9085, 0x0001, 0x0005, 0x0096, 0x080c, 0xb870,
-	0x0140, 0x6014, 0x904d, 0x080c, 0xb45e, 0x687b, 0x0005, 0x080c,
-	0x69b5, 0x009e, 0x080c, 0x9c20, 0x9085, 0x0001, 0x0005, 0x2001,
-	0x0001, 0x080c, 0x61cc, 0x0156, 0x0016, 0x0026, 0x0036, 0x20a9,
-	0x0004, 0x2019, 0x1805, 0x2011, 0x0276, 0x080c, 0xabda, 0x003e,
-	0x002e, 0x001e, 0x015e, 0x9005, 0x0005, 0x00f6, 0x00e6, 0x00c6,
-	0x0086, 0x0076, 0x0066, 0x00b6, 0x0126, 0x2091, 0x8000, 0x2740,
-	0x2061, 0x1ddc, 0x2079, 0x0001, 0x8fff, 0x0904, 0xd1b7, 0x2071,
-	0x1800, 0x7650, 0x7070, 0x8001, 0x9602, 0x1a04, 0xd1b7, 0x88ff,
-	0x0120, 0x2800, 0x9c06, 0x1590, 0x2078, 0x080c, 0xd2ed, 0x0570,
-	0x2400, 0x9c06, 0x0558, 0x6720, 0x9786, 0x0006, 0x1538, 0x9786,
-	0x0007, 0x0520, 0x88ff, 0x1140, 0x6010, 0x9b06, 0x11f8, 0x85ff,
-	0x0118, 0x605c, 0x9106, 0x11d0, 0x0096, 0x601c, 0xd084, 0x0140,
-	0x080c, 0xd517, 0x080c, 0xbfa7, 0x080c, 0x193e, 0x6023, 0x0007,
-	0x6014, 0x2048, 0x080c, 0xb870, 0x0120, 0x0046, 0x080c, 0xd267,
-	0x004e, 0x009e, 0x080c, 0x9c20, 0x88ff, 0x1198, 0x9ce0, 0x001c,
-	0x2001, 0x1819, 0x2004, 0x9c02, 0x1210, 0x0804, 0xd16c, 0x9006,
-	0x012e, 0x00be, 0x006e, 0x007e, 0x008e, 0x00ce, 0x00ee, 0x00fe,
-	0x0005, 0x98c5, 0x0001, 0x0ca0, 0x080c, 0x98c7, 0x00b6, 0x0076,
-	0x0056, 0x0086, 0x9046, 0x2029, 0x0001, 0x2c20, 0x2019, 0x0002,
-	0x6210, 0x2258, 0x0096, 0x904e, 0x080c, 0x936d, 0x009e, 0x008e,
-	0x903e, 0x080c, 0x9418, 0x080c, 0xd15d, 0x005e, 0x007e, 0x00be,
-	0x080c, 0x98e3, 0x0005, 0x080c, 0x98c7, 0x00b6, 0x0046, 0x0056,
-	0x0076, 0x00c6, 0x0156, 0x2c20, 0x2128, 0x20a9, 0x007f, 0x900e,
-	0x0016, 0x0036, 0x080c, 0x628f, 0x1190, 0x0056, 0x0086, 0x9046,
-	0x2508, 0x2029, 0x0001, 0x0096, 0x904e, 0x080c, 0x936d, 0x009e,
-	0x008e, 0x903e, 0x080c, 0x9418, 0x080c, 0xd15d, 0x005e, 0x003e,
-	0x001e, 0x8108, 0x1f04, 0xd1f0, 0x015e, 0x00ce, 0x007e, 0x005e,
-	0x004e, 0x00be, 0x080c, 0x98e3, 0x0005, 0x080c, 0x98c7, 0x00b6,
-	0x0076, 0x0056, 0x6210, 0x2258, 0x0086, 0x9046, 0x2029, 0x0001,
-	0x2019, 0x0048, 0x0096, 0x904e, 0x080c, 0x936d, 0x009e, 0x008e,
-	0x903e, 0x080c, 0x9418, 0x2c20, 0x080c, 0xd15d, 0x005e, 0x007e,
-	0x00be, 0x080c, 0x98e3, 0x0005, 0x080c, 0x98c7, 0x00b6, 0x0046,
-	0x0056, 0x0076, 0x00c6, 0x0156, 0x2c20, 0x20a9, 0x0800, 0x900e,
-	0x0016, 0x0036, 0x080c, 0x628f, 0x11a0, 0x0086, 0x9046, 0x2828,
-	0x0046, 0x2021, 0x0001, 0x080c, 0xd4fb, 0x004e, 0x0096, 0x904e,
-	0x080c, 0x936d, 0x009e, 0x008e, 0x903e, 0x080c, 0x9418, 0x080c,
-	0xd15d, 0x003e, 0x001e, 0x8108, 0x1f04, 0xd240, 0x015e, 0x00ce,
-	0x007e, 0x005e, 0x004e, 0x00be, 0x080c, 0x98e3, 0x0005, 0x0016,
-	0x00f6, 0x080c, 0xb86e, 0x0198, 0xa864, 0x9084, 0x00ff, 0x9086,
-	0x0046, 0x0180, 0xa800, 0x907d, 0x0138, 0xa803, 0x0000, 0xab82,
-	0x080c, 0x69b5, 0x2f48, 0x0cb0, 0xab82, 0x080c, 0x69b5, 0x00fe,
-	0x001e, 0x0005, 0xa800, 0x907d, 0x0130, 0xa803, 0x0000, 0x080c,
-	0x69b5, 0x2f48, 0x0cb8, 0x080c, 0x69b5, 0x0c88, 0x00e6, 0x0046,
-	0x0036, 0x2061, 0x1ddc, 0x9005, 0x1138, 0x2071, 0x1800, 0x7450,
-	0x7070, 0x8001, 0x9402, 0x12d8, 0x2100, 0x9c06, 0x0168, 0x6000,
-	0x9086, 0x0000, 0x0148, 0x6008, 0x9206, 0x1130, 0x6010, 0x91a0,
-	0x0004, 0x2424, 0x9406, 0x0140, 0x9ce0, 0x001c, 0x2001, 0x1819,
-	0x2004, 0x9c02, 0x1220, 0x0c40, 0x9085, 0x0001, 0x0008, 0x9006,
-	0x003e, 0x004e, 0x00ee, 0x0005, 0x0096, 0x0006, 0x080c, 0x102f,
-	0x000e, 0x090c, 0x0d65, 0xaae2, 0xa867, 0x010d, 0xa88e, 0x0026,
-	0x2010, 0x080c, 0xb85e, 0x2001, 0x0000, 0x0120, 0x2200, 0x9080,
-	0x0017, 0x2004, 0x002e, 0xa87a, 0x9186, 0x0020, 0x0110, 0xa8e3,
-	0xffff, 0xa986, 0xac76, 0xa87f, 0x0000, 0x2001, 0x1966, 0x2004,
-	0xa882, 0x9006, 0xa802, 0xa86a, 0xa88a, 0x0126, 0x2091, 0x8000,
-	0x080c, 0x69b5, 0x012e, 0x009e, 0x0005, 0x6700, 0x9786, 0x0000,
-	0x0158, 0x9786, 0x0001, 0x0140, 0x9786, 0x000a, 0x0128, 0x9786,
-	0x0009, 0x0110, 0x9085, 0x0001, 0x0005, 0x00e6, 0x6010, 0x9075,
-	0x0138, 0x00b6, 0x2058, 0xb8a0, 0x00be, 0x9206, 0x00ee, 0x0005,
-	0x9085, 0x0001, 0x0cd8, 0x0016, 0x6004, 0x908e, 0x001e, 0x11a0,
-	0x8007, 0x6134, 0x918c, 0x00ff, 0x9105, 0x6036, 0x6007, 0x0085,
-	0x6003, 0x000b, 0x6023, 0x0005, 0x2001, 0x195f, 0x2004, 0x601a,
-	0x2009, 0x8020, 0x080c, 0x84e7, 0x001e, 0x0005, 0xa001, 0xa001,
-	0x0005, 0x6024, 0xd0e4, 0x0158, 0xd0cc, 0x0118, 0x080c, 0xbbba,
-	0x0030, 0x080c, 0xd517, 0x080c, 0x83d6, 0x080c, 0x9be6, 0x0005,
-	0x9280, 0x0008, 0x2004, 0x9084, 0x000f, 0x0002, 0xd34c, 0xd34c,
-	0xd34c, 0xd34e, 0xd34c, 0xd34e, 0xd34e, 0xd34c, 0xd34e, 0xd34c,
-	0xd34c, 0xd34c, 0xd34c, 0xd34c, 0x9006, 0x0005, 0x9085, 0x0001,
-	0x0005, 0x9280, 0x0008, 0x2004, 0x9084, 0x000f, 0x0002, 0xd365,
-	0xd365, 0xd365, 0xd365, 0xd365, 0xd365, 0xd372, 0xd365, 0xd365,
-	0xd365, 0xd365, 0xd365, 0xd365, 0xd365, 0x6007, 0x003b, 0x602f,
-	0x0009, 0x6017, 0x2a00, 0x6003, 0x0001, 0x2009, 0x8020, 0x080c,
-	0x84e7, 0x0005, 0x0096, 0x00c6, 0x2260, 0x080c, 0xd517, 0x604b,
-	0x0000, 0x6024, 0xc0f4, 0xc0e4, 0x6026, 0x603b, 0x0000, 0x00ce,
-	0x00d6, 0x2268, 0x9186, 0x0007, 0x1904, 0xd3cb, 0x6814, 0x9005,
-	0x0138, 0x2048, 0xa87c, 0xd0fc, 0x1118, 0x00de, 0x009e, 0x08a8,
-	0x6007, 0x003a, 0x6003, 0x0001, 0x2009, 0x8020, 0x080c, 0x84e7,
-	0x00c6, 0x2d60, 0x6100, 0x9186, 0x0002, 0x1904, 0xd442, 0x6014,
-	0x9005, 0x1138, 0x6000, 0x9086, 0x0007, 0x190c, 0x0d65, 0x0804,
-	0xd442, 0x2048, 0x080c, 0xb870, 0x1130, 0x0028, 0x2048, 0xa800,
-	0x9005, 0x1de0, 0x2900, 0x2048, 0xa87c, 0x9084, 0x0003, 0x9086,
-	0x0002, 0x1168, 0xa87c, 0xc0dc, 0xc0f4, 0xa87e, 0xa880, 0xc0fc,
-	0xa882, 0x2009, 0x0043, 0x080c, 0xcc7e, 0x0804, 0xd442, 0x2009,
-	0x0041, 0x0804, 0xd43c, 0x9186, 0x0005, 0x15a0, 0x6814, 0x2048,
-	0xa87c, 0xd0bc, 0x1120, 0x00de, 0x009e, 0x0804, 0xd365, 0xd0b4,
-	0x0128, 0xd0fc, 0x090c, 0x0d65, 0x0804, 0xd386, 0x6007, 0x003a,
-	0x6003, 0x0001, 0x2009, 0x8020, 0x080c, 0x84e7, 0x00c6, 0x2d60,
-	0x6100, 0x9186, 0x0002, 0x0120, 0x9186, 0x0004, 0x1904, 0xd442,
-	0x6814, 0x2048, 0xa97c, 0xc1f4, 0xc1dc, 0xa97e, 0xa980, 0xc1fc,
-	0xc1bc, 0xa982, 0x00f6, 0x2c78, 0x080c, 0x1669, 0x00fe, 0x2009,
-	0x0042, 0x04d0, 0x0036, 0x080c, 0x102f, 0x090c, 0x0d65, 0xa867,
-	0x010d, 0x9006, 0xa802, 0xa86a, 0xa88a, 0x2d18, 0xab8e, 0xa887,
-	0x0045, 0x2c00, 0xa892, 0x6038, 0xa8a2, 0x2360, 0x6024, 0xc0dd,
-	0x6026, 0x6010, 0x00b6, 0x2058, 0xb8a0, 0x00be, 0x2004, 0x635c,
-	0xab7a, 0xa876, 0x9006, 0xa87e, 0xa882, 0xad9a, 0xae96, 0xa89f,
-	0x0001, 0x080c, 0x69b5, 0x2019, 0x0045, 0x6008, 0x2068, 0x080c,
-	0xce41, 0x2d00, 0x600a, 0x6023, 0x0006, 0x6003, 0x0007, 0x901e,
-	0x631a, 0x634a, 0x003e, 0x0038, 0x604b, 0x0000, 0x6003, 0x0007,
-	0x080c, 0xcc7e, 0x00ce, 0x00de, 0x009e, 0x0005, 0x9186, 0x0013,
-	0x1128, 0x6004, 0x9082, 0x0085, 0x2008, 0x00c2, 0x9186, 0x0027,
-	0x1178, 0x080c, 0x8891, 0x0036, 0x0096, 0x6014, 0x2048, 0x2019,
-	0x0004, 0x080c, 0xd267, 0x009e, 0x003e, 0x080c, 0x894f, 0x0005,
-	0x9186, 0x0014, 0x0d70, 0x080c, 0x9c9f, 0x0005, 0xd475, 0xd473,
-	0xd473, 0xd473, 0xd473, 0xd473, 0xd475, 0xd473, 0xd473, 0xd473,
-	0xd473, 0xd473, 0xd473, 0x080c, 0x0d65, 0x6003, 0x000c, 0x080c,
-	0x894f, 0x0005, 0x9182, 0x0092, 0x1220, 0x9182, 0x0085, 0x0208,
-	0x001a, 0x080c, 0x9c9f, 0x0005, 0xd491, 0xd491, 0xd491, 0xd491,
-	0xd493, 0xd4b3, 0xd491, 0xd491, 0xd491, 0xd491, 0xd491, 0xd491,
-	0xd491, 0x080c, 0x0d65, 0x00d6, 0x2c68, 0x080c, 0x9b90, 0x01b0,
-	0x6003, 0x0001, 0x6007, 0x001e, 0x2009, 0x026e, 0x210c, 0x613a,
-	0x2009, 0x026f, 0x210c, 0x613e, 0x600b, 0xffff, 0x6910, 0x6112,
-	0x6023, 0x0004, 0x2009, 0x8020, 0x080c, 0x84e7, 0x2d60, 0x080c,
-	0x9be6, 0x00de, 0x0005, 0x080c, 0x9be6, 0x0005, 0x00e6, 0x6010,
-	0x00b6, 0x2058, 0xb800, 0x00be, 0xd0ec, 0x00ee, 0x0005, 0x2009,
-	0x187b, 0x210c, 0xd1ec, 0x05b0, 0x6003, 0x0002, 0x6024, 0xc0e5,
-	0x6026, 0xd0cc, 0x0150, 0x2001, 0x1960, 0x2004, 0x604a, 0x2009,
-	0x187b, 0x210c, 0xd1f4, 0x1520, 0x00a0, 0x2009, 0x187b, 0x210c,
-	0xd1f4, 0x0128, 0x6024, 0xc0e4, 0x6026, 0x9006, 0x00d8, 0x2001,
-	0x1960, 0x200c, 0x2001, 0x195e, 0x2004, 0x9100, 0x9080, 0x000a,
-	0x604a, 0x6010, 0x00b6, 0x2058, 0xb8ac, 0x00be, 0x0008, 0x2104,
-	0x9005, 0x0118, 0x9088, 0x0003, 0x0cd0, 0x2c0a, 0x600f, 0x0000,
-	0x9085, 0x0001, 0x0005, 0x0016, 0x00c6, 0x00e6, 0x615c, 0xb8ac,
-	0x2060, 0x8cff, 0x0180, 0x84ff, 0x1118, 0x605c, 0x9106, 0x1138,
-	0x600c, 0x2072, 0x080c, 0x83d6, 0x080c, 0x9be6, 0x0010, 0x9cf0,
-	0x0003, 0x2e64, 0x0c70, 0x00ee, 0x00ce, 0x001e, 0x0005, 0x00d6,
-	0x00b6, 0x6010, 0x2058, 0xb8ac, 0x2068, 0x9005, 0x0130, 0x9c06,
-	0x0110, 0x680c, 0x0cd0, 0x600c, 0x680e, 0x00be, 0x00de, 0x0005,
-	0x0026, 0x0036, 0x0156, 0x2011, 0x182b, 0x2204, 0x9084, 0x00ff,
-	0x2019, 0x026e, 0x2334, 0x9636, 0x1508, 0x8318, 0x2334, 0x2204,
-	0x9084, 0xff00, 0x9636, 0x11d0, 0x2011, 0x0270, 0x20a9, 0x0004,
-	0x6010, 0x0096, 0x2048, 0x2019, 0x000a, 0x080c, 0xabee, 0x009e,
-	0x1168, 0x2011, 0x0274, 0x20a9, 0x0004, 0x6010, 0x0096, 0x2048,
-	0x2019, 0x0006, 0x080c, 0xabee, 0x009e, 0x1100, 0x015e, 0x003e,
-	0x002e, 0x0005, 0x00e6, 0x2071, 0x1800, 0x080c, 0x5c8a, 0x080c,
-	0x2e09, 0x00ee, 0x0005, 0x00e6, 0x6010, 0x00b6, 0x2058, 0xb800,
-	0x00be, 0xd0fc, 0x0108, 0x0011, 0x00ee, 0x0005, 0xa880, 0xc0e5,
-	0xa882, 0x0005, 0x00e6, 0x00d6, 0x00c6, 0x0076, 0x0066, 0x0056,
-	0x0046, 0x0026, 0x0016, 0x0126, 0x2091, 0x8000, 0x2029, 0x19cb,
-	0x252c, 0x2021, 0x19d2, 0x2424, 0x2061, 0x1ddc, 0x2071, 0x1800,
-	0x7650, 0x7070, 0x9606, 0x0578, 0x6720, 0x9786, 0x0001, 0x0118,
-	0x9786, 0x0008, 0x1500, 0x2500, 0x9c06, 0x01e8, 0x2400, 0x9c06,
-	0x01d0, 0x080c, 0xd2ed, 0x01b8, 0x080c, 0xd2fd, 0x11a0, 0x6000,
-	0x9086, 0x0004, 0x1120, 0x0016, 0x080c, 0x193e, 0x001e, 0x080c,
-	0xba74, 0x1110, 0x080c, 0x305d, 0x080c, 0xba85, 0x1110, 0x080c,
-	0xa59c, 0x080c, 0x9c20, 0x9ce0, 0x001c, 0x2001, 0x1819, 0x2004,
-	0x9c02, 0x1208, 0x0858, 0x012e, 0x001e, 0x002e, 0x004e, 0x005e,
-	0x006e, 0x007e, 0x00ce, 0x00de, 0x00ee, 0x0005, 0x2001, 0x1810,
-	0x2004, 0xd0dc, 0x0005, 0x0006, 0x2001, 0x1836, 0x2004, 0xd09c,
-	0x000e, 0x0005, 0x0006, 0x0036, 0x0046, 0x080c, 0xbf8f, 0x0168,
-	0x2019, 0xffff, 0x9005, 0x0128, 0x6010, 0x00b6, 0x2058, 0xbba0,
-	0x00be, 0x2021, 0x0004, 0x080c, 0x4a97, 0x004e, 0x003e, 0x000e,
-	0x6004, 0x9086, 0x0001, 0x1128, 0x080c, 0x94e5, 0x080c, 0x9c20,
-	0x9006, 0x0005, 0x00e6, 0x00c6, 0x00b6, 0x0046, 0x2061, 0x1ddc,
-	0x2071, 0x1800, 0x7450, 0x7070, 0x8001, 0x9402, 0x12b8, 0x2100,
-	0x9c06, 0x0148, 0x6000, 0x9086, 0x0000, 0x0128, 0x6010, 0x2058,
-	0xb8a0, 0x9206, 0x0140, 0x9ce0, 0x001c, 0x2001, 0x1819, 0x2004,
-	0x9c02, 0x1220, 0x0c60, 0x9085, 0x0001, 0x0008, 0x9006, 0x004e,
-	0x00be, 0x00ce, 0x00ee, 0x0005, 0x0126, 0x0006, 0x00e6, 0x0016,
-	0x2091, 0x8000, 0x2071, 0x1840, 0xd5a4, 0x0118, 0x7054, 0x8000,
-	0x7056, 0xd5b4, 0x0118, 0x7050, 0x8000, 0x7052, 0xd5ac, 0x0178,
-	0x2500, 0x9084, 0x0007, 0x908e, 0x0003, 0x0148, 0x908e, 0x0004,
-	0x0130, 0x908e, 0x0005, 0x0118, 0x2071, 0x184a, 0x0089, 0x001e,
-	0x00ee, 0x000e, 0x012e, 0x0005, 0x0126, 0x0006, 0x00e6, 0x2091,
-	0x8000, 0x2071, 0x1842, 0x0021, 0x00ee, 0x000e, 0x012e, 0x0005,
-	0x2e04, 0x8000, 0x2072, 0x1220, 0x8e70, 0x2e04, 0x8000, 0x2072,
-	0x0005, 0x00e6, 0x2071, 0x1840, 0x0c99, 0x00ee, 0x0005, 0x00e6,
-	0x2071, 0x1844, 0x0c69, 0x00ee, 0x0005, 0x0126, 0x0006, 0x00e6,
-	0x2091, 0x8000, 0x2071, 0x1840, 0x7064, 0x8000, 0x7066, 0x00ee,
-	0x000e, 0x012e, 0x0005, 0x0001, 0x0002, 0x0004, 0x0008, 0x0010,
-	0x0020, 0x0040, 0x0080, 0x0100, 0x0200, 0x0400, 0x0800, 0x1000,
-	0x2000, 0x4000, 0x8000, 0x8c0a
-};
-#ifdef UNIQUE_FW_NAME
-unsigned short fw2322flx_length01 = 0xce84;
-#else
-unsigned short risc_code_length01 = 0xce84;
-#endif
-
-/*
- *
- */
-
-unsigned long rseqflx_code_addr01 = 0x0001c000 ;
-unsigned short rseqflx_code01[] = { 
-0x000b, 0x0003, 0x0000, 0x072a, 0x0001, 0xc000, 0x0008, 0x8064,
-	0x0000, 0x0010, 0x0000, 0x8066, 0x0008, 0x0101, 0x0003, 0xc007,
-	0x0008, 0x80e0, 0x0008, 0xff00, 0x0000, 0x80e2, 0x0008, 0xff00,
-	0x0008, 0x0162, 0x0000, 0x8066, 0x0008, 0xa101, 0x000b, 0xc00f,
-	0x0008, 0x0d02, 0x0000, 0x8060, 0x0000, 0x0400, 0x000b, 0x60af,
-	0x0003, 0x5817, 0x0003, 0x7ac9, 0x0003, 0x5209, 0x000b, 0xc813,
-	0x0009, 0xbac0, 0x0000, 0x008a, 0x0003, 0x8813, 0x0000, 0x15fc,
-	0x000b, 0xb013, 0x0009, 0xc4c0, 0x0000, 0x7000, 0x0001, 0xffa0,
-	0x0000, 0x2000, 0x0003, 0x936d, 0x0008, 0x808c, 0x0000, 0x0001,
-	0x0007, 0x0000, 0x0007, 0x0000, 0x000a, 0x4047, 0x0008, 0x808c,
-	0x0000, 0x0002, 0x0007, 0x0000, 0x0003, 0x082d, 0x0000, 0x4022,
-	0x000b, 0x002e, 0x0008, 0x4122, 0x0002, 0x4447, 0x0003, 0x8b91,
-	0x0008, 0x0bfe, 0x0001, 0x11a0, 0x000b, 0x1373, 0x0001, 0x0ca0,
-	0x000b, 0x1373, 0x0001, 0x9180, 0x0000, 0x0004, 0x0000, 0x8060,
-	0x0000, 0x0400, 0x0008, 0x7f62, 0x0000, 0x8066, 0x0008, 0x0009,
-	0x000b, 0xc03c, 0x0008, 0x808c, 0x0008, 0x0000, 0x0008, 0x0060,
-	0x0008, 0x8062, 0x0000, 0x0004, 0x0000, 0x8066, 0x0000, 0x0411,
-	0x000b, 0xc044, 0x0000, 0x03fe, 0x0001, 0x43e0, 0x0003, 0x8b70,
-	0x0009, 0xc2c0, 0x0008, 0x00ff, 0x0001, 0x02e0, 0x0003, 0x8b70,
-	0x0001, 0x9180, 0x0008, 0x0005, 0x0000, 0x8060, 0x0000, 0x0400,
-	0x0008, 0x7f62, 0x0000, 0x8066, 0x0000, 0x0019, 0x000b, 0xc053,
-	0x0002, 0x0240, 0x000b, 0x0b6d, 0x0008, 0x00fc, 0x0003, 0x3370,
-	0x000a, 0x0244, 0x0003, 0x0865, 0x000c, 0x01e2, 0x0001, 0x9180,
-	0x0000, 0x0007, 0x0008, 0x7f62, 0x0000, 0x8060, 0x0000, 0x0400,
-	0x0002, 0x0234, 0x0008, 0x7f04, 0x0000, 0x8066, 0x0000, 0x040a,
-	0x0003, 0xc064, 0x0000, 0x112a, 0x0008, 0x002e, 0x0008, 0x022c,
-	0x0002, 0x3a44, 0x0003, 0x8813, 0x0008, 0x808c, 0x0000, 0x0002,
-	0x0008, 0x1760, 0x0008, 0x8062, 0x0008, 0x000f, 0x0000, 0x8066,
-	0x0008, 0x0011, 0x000b, 0xc071, 0x0008, 0x01fe, 0x0009, 0x42e0,
-	0x0003, 0x8b62, 0x0000, 0x00fe, 0x0001, 0x43e0, 0x0003, 0x8b62,
-	0x0000, 0x1734, 0x0000, 0x1530, 0x0008, 0x1632, 0x0008, 0x0d2a,
-	0x0001, 0x9880, 0x0008, 0x0012, 0x0000, 0x8060, 0x0000, 0x0400,
-	0x0008, 0x7f62, 0x0000, 0x8066, 0x0008, 0x1e0a, 0x0003, 0xc083,
-	0x0008, 0x808a, 0x0008, 0x0003, 0x0000, 0x1a60, 0x0008, 0x8062,
-	0x0000, 0x0002, 0x000b, 0x5889, 0x0000, 0x8066, 0x0000, 0x3679,
-	0x0003, 0xc08c, 0x0003, 0x588d, 0x0008, 0x8054, 0x0008, 0x0011,
-	0x0000, 0x8074, 0x0008, 0x1010, 0x0008, 0x1efc, 0x0003, 0x3013,
-	0x0004, 0x0096, 0x0003, 0x0013, 0x0000, 0x1c60, 0x0000, 0x1b62,
-	0x0000, 0x8066, 0x0008, 0x0231, 0x000b, 0xc09a, 0x000b, 0x589b,
-	0x0008, 0x0140, 0x0000, 0x0242, 0x0002, 0x1f43, 0x000b, 0x88a5,
-	0x0000, 0x0d44, 0x0008, 0x0d46, 0x0008, 0x0348, 0x0008, 0x044a,
-	0x000b, 0x00a9, 0x0008, 0x0344, 0x0008, 0x0446, 0x0008, 0x0548,
-	0x0000, 0x064a, 0x0003, 0x58a9, 0x0008, 0x8054, 0x0000, 0x0001,
-	0x0000, 0x8074, 0x0008, 0x2020, 0x000f, 0x4000, 0x0000, 0x4820,
-	0x0008, 0x0bfe, 0x0009, 0x10a0, 0x0003, 0x1110, 0x0001, 0x0ca0,
-	0x0003, 0x1110, 0x0000, 0x8060, 0x0000, 0x0400, 0x0009, 0x9080,
-	0x0000, 0x0008, 0x0008, 0x7f62, 0x0000, 0x8066, 0x0008, 0x0009,
-	0x0003, 0xc0bc, 0x0001, 0x80e0, 0x0008, 0x0003, 0x000b, 0x8910,
-	0x0000, 0x49b4, 0x0002, 0x4b4e, 0x000b, 0x8919, 0x0008, 0x808a,
-	0x0000, 0x0004, 0x0000, 0x18fe, 0x0001, 0x10e0, 0x000b, 0x88ca,
-	0x0002, 0x192f, 0x0008, 0x7f32, 0x0008, 0x15fe, 0x0001, 0x10e0,
-	0x000b, 0x88cf, 0x0002, 0x162f, 0x0008, 0x7f2c, 0x0000, 0x8060,
-	0x0000, 0x0400, 0x0009, 0x9080, 0x0000, 0x0007, 0x0008, 0x7f62,
-	0x0000, 0x8066, 0x0008, 0x0009, 0x0003, 0xc0d6, 0x000a, 0x004f,
-	0x000b, 0x8907, 0x000a, 0x0040, 0x000b, 0x08f1, 0x0002, 0x004e,
-	0x000b, 0x08f1, 0x0002, 0x0030, 0x0002, 0x7f2f, 0x0000, 0x7f00,
-	0x0000, 0x8066, 0x0008, 0x000a, 0x000b, 0xc0e2, 0x0008, 0x1010,
-	0x000c, 0x01c9, 0x000b, 0xb0ea, 0x0004, 0x0336, 0x0004, 0x01b3,
-	0x000b, 0x7814, 0x0003, 0x0013, 0x0000, 0x0806, 0x0008, 0x8010,
-	0x0000, 0x001f, 0x0004, 0x0336, 0x0000, 0x0310, 0x0004, 0x0336,
-	0x000b, 0x00e8, 0x000a, 0x002f, 0x0000, 0x7f00, 0x0000, 0x8066,
-	0x0008, 0x000a, 0x000b, 0xc0f5, 0x0004, 0x018c, 0x000a, 0x0040,
-	0x000b, 0x090a, 0x000c, 0x01f9, 0x0000, 0x8000, 0x0000, 0x0002,
-	0x0000, 0x8060, 0x0000, 0x0400, 0x0009, 0x9080, 0x0008, 0x0006,
-	0x0008, 0x7f62, 0x0000, 0x8066, 0x0008, 0x000a, 0x0003, 0xc103,
-	0x0000, 0x8072, 0x0000, 0x4000, 0x000b, 0x00e8, 0x0008, 0x8010,
-	0x0008, 0x001e, 0x0003, 0x010c, 0x0008, 0x8010, 0x0008, 0x001d,
-	0x0004, 0x0336, 0x0008, 0x1010, 0x0004, 0x0336, 0x000b, 0x0014,
-	0x0002, 0x4b4e, 0x0003, 0x0916, 0x0008, 0x808a, 0x0000, 0x0004,
-	0x000b, 0x6116, 0x000f, 0x8000, 0x0008, 0x808a, 0x0000, 0x0004,
-	0x000b, 0x0014, 0x0000, 0x8060, 0x0000, 0x0400, 0x0009, 0x9080,
-	0x0008, 0x0011, 0x0008, 0x7f62, 0x0000, 0x8066, 0x0008, 0x0009,
-	0x000b, 0xc120, 0x000a, 0x004f, 0x0003, 0x897d, 0x0000, 0x8060,
-	0x0000, 0x0400, 0x0009, 0x9080, 0x0008, 0x0005, 0x0008, 0x7f62,
-	0x0000, 0x8066, 0x0008, 0x0009, 0x000b, 0xc12a, 0x0008, 0x0060,
-	0x0008, 0x8062, 0x0000, 0x001f, 0x0000, 0x8066, 0x0000, 0x0209,
-	0x0003, 0xc130, 0x000a, 0x014b, 0x000b, 0x097d, 0x0008, 0x8062,
-	0x0008, 0x000f, 0x0000, 0x8066, 0x0000, 0x0211, 0x000b, 0xc137,
-	0x0008, 0x01fe, 0x0001, 0x02d0, 0x0003, 0x897d, 0x000c, 0x0195,
-	0x000b, 0x097d, 0x0008, 0x03a0, 0x0008, 0x8004, 0x0000, 0x0002,
-	0x0000, 0x8006, 0x0000, 0x0043, 0x0008, 0x4908, 0x0008, 0x808a,
-	0x0000, 0x0004, 0x0000, 0x8060, 0x0000, 0x0400, 0x0009, 0x9080,
-	0x0008, 0x0000, 0x0008, 0x7f62, 0x0000, 0x8066, 0x0008, 0x041a,
-	0x000b, 0xc14c, 0x000b, 0xe14d, 0x0008, 0x4908, 0x0008, 0x480a,
-	0x0008, 0x808a, 0x0000, 0x0004, 0x0008, 0x0060, 0x0008, 0x8062,
-	0x0008, 0x002b, 0x0000, 0x8066, 0x0000, 0x0411, 0x000b, 0xc157,
-	0x0008, 0x04fe, 0x0009, 0x02a0, 0x000b, 0x915e, 0x0002, 0x0500,
-	0x0003, 0x097a, 0x0003, 0x015f, 0x0000, 0x05fe, 0x0001, 0x03a0,
-	0x0003, 0x117a, 0x0000, 0x0d0c, 0x0008, 0x0d0e, 0x0008, 0x0d10,
-	0x0000, 0x0d12, 0x0008, 0x0060, 0x0008, 0x8062, 0x0000, 0x000d,
-	0x0000, 0x8066, 0x0008, 0x0832, 0x0003, 0xc16a, 0x0000, 0x800a,
-	0x0000, 0x8005, 0x0000, 0x8060, 0x0000, 0x0400, 0x0009, 0x9080,
-	0x0008, 0x0011, 0x0008, 0x7f62, 0x0000, 0x8066, 0x0008, 0x0a12,
-	0x0003, 0xc174, 0x0008, 0x5006, 0x0008, 0x100e, 0x000c, 0x01a0,
-	0x000b, 0x7814, 0x0003, 0x0013, 0x0008, 0x0208, 0x0008, 0x030a,
-	0x000b, 0x0161, 0x0004, 0x018c, 0x0008, 0x808a, 0x0000, 0x0004,
-	0x0008, 0x8010, 0x0008, 0x0021, 0x0004, 0x0336, 0x0008, 0x1010,
-	0x0004, 0x0336, 0x0000, 0x4810, 0x0004, 0x0336, 0x0008, 0x4910,
-	0x0004, 0x0336, 0x0008, 0x808a, 0x0000, 0x0004, 0x000b, 0x0014,
-	0x0000, 0x8060, 0x0000, 0x0400, 0x0009, 0x9080, 0x0000, 0x0002,
-	0x0008, 0x7f62, 0x0000, 0x8066, 0x0008, 0xb40a, 0x0003, 0xc193,
-	0x000f, 0x4000, 0x0000, 0x8060, 0x0000, 0x0400, 0x0000, 0x0a62,
-	0x0000, 0x8066, 0x0000, 0x0411, 0x0003, 0xc19a, 0x0002, 0x0210,
-	0x0001, 0xffc0, 0x0000, 0x0007, 0x0009, 0x03e0, 0x000f, 0x4000,
-	0x0000, 0x8060, 0x0000, 0x0400, 0x0001, 0x8380, 0x0000, 0x0002,
-	0x0009, 0x0a80, 0x0008, 0x7f62, 0x0000, 0x8066, 0x0000, 0x0e0a,
-	0x000b, 0xc1a8, 0x0002, 0x0300, 0x0001, 0xffc0, 0x0000, 0x0007,
-	0x0000, 0x7f06, 0x0002, 0x0a00, 0x0008, 0x7f62, 0x0000, 0x8066,
-	0x0008, 0x060a, 0x0003, 0xc1b1, 0x000f, 0x4000, 0x0000, 0x0da0,
-	0x0008, 0x0da2, 0x0008, 0x0da4, 0x0009, 0x8880, 0x0000, 0x0001,
-	0x0008, 0x7f62, 0x0000, 0x8060, 0x0000, 0x0400, 0x0000, 0x8066,
-	0x0008, 0xa012, 0x0000, 0x0da6, 0x0008, 0x0da8, 0x0000, 0x0daa,
-	0x0000, 0x0dac, 0x000b, 0xc1c1, 0x0009, 0x8880, 0x0008, 0x0009,
-	0x0008, 0x7f62, 0x0000, 0x8066, 0x0008, 0xa03a, 0x000b, 0xc1c7,
-	0x000f, 0x4000, 0x0009, 0x8880, 0x0008, 0x0005, 0x0000, 0x8060,
-	0x0000, 0x0400, 0x0008, 0x7f62, 0x0000, 0x8066, 0x0008, 0x0009,
-	0x000b, 0xc1d0, 0x0008, 0x0060, 0x0008, 0x8062, 0x0000, 0x000d,
-	0x0000, 0x8066, 0x0008, 0x0021, 0x000b, 0xc1d6, 0x0000, 0x00fe,
-	0x0001, 0x01d0, 0x000b, 0x89df, 0x0008, 0x02fe, 0x0009, 0x03d0,
-	0x0003, 0x09df, 0x0000, 0x0d06, 0x000f, 0x4000, 0x0000, 0x8006,
-	0x0000, 0x0001, 0x000f, 0x4000, 0x0008, 0x0060, 0x0008, 0x8062,
-	0x0008, 0x002b, 0x0000, 0x8066, 0x0008, 0xa041, 0x0003, 0xc1e7,
-	0x0002, 0x0243, 0x0003, 0x89ee, 0x0000, 0x54ac, 0x0000, 0x55ae,
-	0x0008, 0x0da8, 0x0000, 0x0daa, 0x0000, 0x50b0, 0x0000, 0x51b2,
-	0x0000, 0x0db4, 0x0008, 0x0db6, 0x0008, 0x0060, 0x0008, 0x8062,
-	0x0000, 0x0007, 0x0000, 0x8066, 0x0008, 0xa452, 0x000b, 0xc1f7,
-	0x000f, 0x4000, 0x000a, 0x3945, 0x0003, 0x8a03, 0x0000, 0x8072,
-	0x0008, 0x4040, 0x0007, 0x0000, 0x000a, 0x3945, 0x000b, 0x8a01,
-	0x000f, 0x4000, 0x0000, 0x8072, 0x0000, 0x4000, 0x0007, 0x0000,
-	0x0007, 0x0000, 0x0007, 0x0000, 0x000a, 0x3945, 0x0003, 0x09fb,
-	0x0003, 0x0203, 0x000a, 0x3a40, 0x000b, 0x8817, 0x0001, 0xabd0,
-	0x0008, 0x0000, 0x0000, 0x7f24, 0x0003, 0x5a0e, 0x0008, 0x8054,
-	0x0000, 0x0002, 0x0002, 0x1242, 0x0003, 0x0a54, 0x000a, 0x3a45,
-	0x0003, 0x0a43, 0x000a, 0x1e10, 0x0000, 0x7f3c, 0x0003, 0x0a40,
-	0x0002, 0x1d00, 0x0000, 0x7f3a, 0x0000, 0x0d60, 0x0008, 0x7f62,
-	0x0000, 0x8066, 0x0008, 0x0009, 0x0003, 0xc21e, 0x0008, 0x00fc,
-	0x0003, 0xb23d, 0x0000, 0x1c60, 0x0008, 0x8062, 0x0000, 0x0001,
-	0x0000, 0x8066, 0x0008, 0x0009, 0x000b, 0xc226, 0x0008, 0x00fc,
-	0x000b, 0x334b, 0x0000, 0x0038, 0x0008, 0x0060, 0x0008, 0x8062,
-	0x0000, 0x0019, 0x0000, 0x8066, 0x0008, 0x0009, 0x000b, 0xc22f,
-	0x0009, 0x80c0, 0x0008, 0x00ff, 0x0008, 0x7f3e, 0x0000, 0x0d60,
-	0x0008, 0x0efe, 0x0001, 0x1f80, 0x0008, 0x7f62, 0x0000, 0x8066,
-	0x0008, 0x0009, 0x0003, 0xc239, 0x0008, 0x003a, 0x0000, 0x1dfe,
-	0x000b, 0x021a, 0x0008, 0x0036, 0x0004, 0x0096, 0x000b, 0x0254,
-	0x0000, 0x8074, 0x0000, 0x2000, 0x000b, 0x0254, 0x0002, 0x3a44,
-	0x000b, 0x0b76, 0x0000, 0x8074, 0x0000, 0x1000, 0x0001, 0xadd0,
-	0x0008, 0x0000, 0x0008, 0x7f0e, 0x0003, 0xb348, 0x0001, 0xa7d0,
-	0x0008, 0x0000, 0x0000, 0x7f00, 0x0009, 0xa6d0, 0x0008, 0x0000,
-	0x0009, 0x00d0, 0x000b, 0x8a64, 0x0000, 0x8074, 0x0008, 0x4040,
-	0x0003, 0x5a54, 0x0003, 0x5209, 0x000a, 0x3a46, 0x000b, 0x8a64,
-	0x0002, 0x3a47, 0x000b, 0x0a5f, 0x0008, 0x8054, 0x0000, 0x0004,
-	0x0000, 0x8074, 0x0000, 0x8000, 0x0003, 0x02bd, 0x0009, 0x92c0,
-	0x0000, 0x0fc8, 0x000b, 0x0813, 0x000a, 0x1246, 0x000b, 0x8b42,
-	0x0000, 0x1a60, 0x0008, 0x8062, 0x0000, 0x0002, 0x0000, 0x8066,
-	0x0000, 0x367a, 0x0003, 0xc269, 0x0009, 0x92c0, 0x0008, 0x0780,
-	0x000b, 0x8b5c, 0x0002, 0x124b, 0x000b, 0x0a72, 0x0002, 0x2e4d,
-	0x0002, 0x2e4d, 0x0003, 0x0b48, 0x000a, 0x3a46, 0x000b, 0x8a7f,
-	0x000b, 0x5a74, 0x0008, 0x8054, 0x0000, 0x0004, 0x000a, 0x1243,
-	0x000b, 0x0abb, 0x0008, 0x8010, 0x0000, 0x000d, 0x0004, 0x0336,
-	0x0000, 0x1810, 0x0004, 0x0336, 0x0003, 0x02bb, 0x000a, 0x194d,
-	0x0003, 0x0a83, 0x000a, 0x1243, 0x000b, 0x0b52, 0x0003, 0x5a83,
-	0x0008, 0x8054, 0x0000, 0x0004, 0x000a, 0x192e, 0x0008, 0x7f32,
-	0x000a, 0x1947, 0x0003, 0x0ab5, 0x0002, 0x194f, 0x000b, 0x0a93,
-	0x0004, 0x032b, 0x0000, 0x1810, 0x000c, 0x01c9, 0x0003, 0xb2ae,
-	0x0004, 0x0336, 0x0004, 0x01b3, 0x0003, 0x02bb, 0x0000, 0x1a60,
-	0x0008, 0x8062, 0x0000, 0x001f, 0x0000, 0x8066, 0x0008, 0x0009,
-	0x000b, 0xc298, 0x000a, 0x004c, 0x000b, 0x8ab5, 0x0000, 0x8060,
-	0x0000, 0x0400, 0x0001, 0x9880, 0x0000, 0x0007, 0x0008, 0x7f62,
-	0x0000, 0x8066, 0x0000, 0x320a, 0x000b, 0xc2a2, 0x0000, 0x8060,
-	0x0000, 0x0400, 0x0001, 0x9880, 0x0008, 0x0012, 0x0008, 0x7f62,
-	0x0000, 0x8066, 0x0008, 0x1e0a, 0x0003, 0xc2aa, 0x0000, 0x1826,
-	0x0000, 0x1928, 0x0003, 0x02bb, 0x0000, 0x0806, 0x0008, 0x8010,
-	0x0000, 0x001f, 0x0004, 0x0336, 0x0000, 0x0310, 0x0004, 0x0336,
-	0x0003, 0x02bb, 0x0004, 0x032b, 0x0008, 0x8010, 0x0000, 0x0001,
-	0x0004, 0x0336, 0x0000, 0x1810, 0x0004, 0x0336, 0x0000, 0x8074,
-	0x0008, 0xf000, 0x0000, 0x0d30, 0x0002, 0x3a42, 0x0003, 0x8ac3,
-	0x0000, 0x15fc, 0x0003, 0xb06a, 0x0003, 0x0013, 0x0000, 0x8074,
-	0x0000, 0x0501, 0x0008, 0x8010, 0x0008, 0x000c, 0x0004, 0x0336,
-	0x0003, 0x0013, 0x0009, 0xbbe0, 0x0008, 0x0030, 0x000b, 0x8adf,
-	0x0000, 0x18fe, 0x0009, 0x3ce0, 0x0003, 0x0adc, 0x0008, 0x15fe,
-	0x0009, 0x3ce0, 0x0003, 0x0adc, 0x0008, 0x13fe, 0x0009, 0x3ce0,
-	0x0003, 0x8ad8, 0x0004, 0x0324, 0x0008, 0x0d26, 0x000b, 0x02d9,
-	0x000c, 0x0326, 0x0008, 0x8076, 0x0000, 0x0040, 0x000b, 0x0321,
-	0x0008, 0x8076, 0x0008, 0x0041, 0x000b, 0x0321, 0x0009, 0xbbe0,
-	0x0000, 0x0032, 0x0003, 0x8ae4, 0x0008, 0x3c1e, 0x000b, 0x0321,
-	0x0009, 0xbbe0, 0x0000, 0x0037, 0x000b, 0x8b06, 0x0000, 0x18fe,
-	0x0009, 0x3ce0, 0x000b, 0x8adc, 0x0008, 0x8076, 0x0000, 0x0040,
-	0x0000, 0x1a60, 0x0008, 0x8062, 0x0000, 0x000d, 0x0009, 0xa6d0,
-	0x0008, 0x0000, 0x0008, 0x7f04, 0x0001, 0xa7d0, 0x0008, 0x0000,
-	0x0000, 0x7f06, 0x0001, 0xa8d0, 0x0008, 0x0000, 0x0008, 0x7f08,
-	0x0009, 0xa9d0, 0x0008, 0x0000, 0x0000, 0x7f0a, 0x0000, 0x8066,
-	0x0000, 0x0422, 0x000b, 0xc2fd, 0x0004, 0x032b, 0x0008, 0x8054,
-	0x0000, 0x0004, 0x0000, 0x8074, 0x0008, 0xf000, 0x0000, 0x8072,
-	0x0000, 0x8000, 0x0003, 0x02bd, 0x0009, 0xbbe0, 0x0000, 0x0038,
-	0x000b, 0x8b18, 0x0000, 0x18fe, 0x0009, 0x3ce0, 0x000b, 0x0b15,
-	0x0008, 0x15fe, 0x0009, 0x3ce0, 0x0003, 0x8ad2, 0x000c, 0x0326,
-	0x0008, 0x8076, 0x0000, 0x0040, 0x0000, 0x8072, 0x0000, 0x8000,
-	0x0003, 0x036d, 0x0008, 0x8076, 0x0008, 0x0042, 0x000b, 0x0321,
-	0x0009, 0xbbe0, 0x0000, 0x0016, 0x000b, 0x8b21, 0x0002, 0x3a44,
-	0x0003, 0x8816, 0x0000, 0x8072, 0x0000, 0x8000, 0x000f, 0x8000,
-	0x0003, 0x0013, 0x0000, 0x8072, 0x0000, 0x8000, 0x0003, 0x0013,
-	0x0002, 0x1430, 0x000b, 0x0327, 0x000a, 0x3d30, 0x0000, 0x7f00,
-	0x0001, 0xbc80, 0x0000, 0x0007, 0x0003, 0x032f, 0x000a, 0x1930,
-	0x0000, 0x7f00, 0x0001, 0x9880, 0x0000, 0x0007, 0x0000, 0x8060,
-	0x0000, 0x0400, 0x0008, 0x7f62, 0x0000, 0x8066, 0x0008, 0x000a,
-	0x0003, 0xc334, 0x000f, 0x4000, 0x0003, 0x2336, 0x0008, 0x0870,
-	0x000f, 0x4000, 0x0009, 0xbac0, 0x0008, 0x0090, 0x0003, 0x0b3f,
-	0x0000, 0x8074, 0x0000, 0x0706, 0x000b, 0x0341, 0x0000, 0x8074,
-	0x0000, 0x0703, 0x000f, 0x4000, 0x0008, 0x8010, 0x0000, 0x0023,
-	0x000b, 0x037b, 0x0008, 0x8010, 0x0000, 0x0008, 0x000b, 0x037b,
-	0x0008, 0x8010, 0x0008, 0x0022, 0x000b, 0x037b, 0x0004, 0x032b,
-	0x0008, 0x8010, 0x0000, 0x0007, 0x0004, 0x0336, 0x0000, 0x1810,
-	0x0004, 0x0336, 0x0003, 0x0385, 0x0004, 0x032b, 0x0008, 0x8010,
-	0x0008, 0x001b, 0x0004, 0x0336, 0x0000, 0x1810, 0x0004, 0x0336,
-	0x0000, 0x8074, 0x0000, 0xf080, 0x0000, 0x0d30, 0x0003, 0x0013,
-	0x0008, 0x8010, 0x0008, 0x0009, 0x000b, 0x037b, 0x0008, 0x8010,
-	0x0008, 0x0005, 0x000b, 0x037b, 0x0008, 0x808c, 0x0000, 0x0001,
-	0x0007, 0x0000, 0x0008, 0x8010, 0x0000, 0x0004, 0x000a, 0x4143,
-	0x0003, 0x0878, 0x0002, 0x3a44, 0x0003, 0x8813, 0x0008, 0x0d2a,
-	0x000b, 0x037b, 0x0008, 0x8010, 0x0008, 0x0003, 0x000b, 0x037d,
-	0x0008, 0x8010, 0x0000, 0x000b, 0x000b, 0x037d, 0x0008, 0x8010,
-	0x0000, 0x0002, 0x000b, 0x037d, 0x0002, 0x3a47, 0x000b, 0x8a54,
-	0x0008, 0x8010, 0x0008, 0x0006, 0x000b, 0x037d, 0x0000, 0x8074,
-	0x0008, 0xf000, 0x0004, 0x0336, 0x0004, 0x0339, 0x000a, 0x3a40,
-	0x000b, 0x0813, 0x0008, 0x8010, 0x0008, 0x000c, 0x0004, 0x0336,
-	0x0003, 0x0013, 0x0000, 0x8074, 0x0000, 0xf080, 0x0000, 0x0d30,
-	0x0002, 0x2e4d, 0x0002, 0x2e4d, 0x0003, 0x0b8e, 0x0008, 0x8054,
-	0x0000, 0x0019, 0x0003, 0x0013, 0x0008, 0x8054, 0x0008, 0x0009,
-	0x0003, 0x0013, 0x0002, 0x3a44, 0x0003, 0x8813, 0x0003, 0x0370,
-	0xed0b, 0x60bf
-};
-unsigned short rseqflx_code_length01 = 0x072a;
-/*
- *
- */
-
-unsigned long xseqflx_code_addr01 = 0x0001e000 ;
-unsigned short xseqflx_code01[] = { 
-0x0013, 0x0003, 0x0000, 0x1036, 0x0001, 0xe000, 0x0005, 0x0032,
-	0x0000, 0x0010, 0x0015, 0x0033, 0x0010, 0xbb39, 0x000b, 0x8007,
-	0x0004, 0x0107, 0x0004, 0x0119, 0x0010, 0xc000, 0x0000, 0xc001,
-	0x0000, 0xc0b0, 0x0010, 0xc0b1, 0x0010, 0xc0b2, 0x0000, 0xc0b3,
-	0x0010, 0xc0b4, 0x0000, 0xc0b5, 0x0000, 0xc0b6, 0x0010, 0xc0b7,
-	0x0010, 0xc0b8, 0x0000, 0xc0b9, 0x0000, 0xc0ba, 0x0000, 0xc0c2,
-	0x0010, 0xc0c3, 0x0000, 0xc0c4, 0x0010, 0xc0c5, 0x0010, 0xc0c6,
-	0x0000, 0xc0c7, 0x0000, 0xc0c8, 0x0010, 0xc0c9, 0x0010, 0xc0ca,
-	0x0000, 0xc0cb, 0x0010, 0xc0cc, 0x0000, 0xc0cd, 0x0000, 0xc0ce,
-	0x0010, 0xc0cf, 0x0015, 0x0039, 0x0010, 0xff00, 0x0015, 0x003a,
-	0x0010, 0xff00, 0x0005, 0x00d0, 0x0010, 0xff00, 0x0015, 0x00d1,
-	0x0010, 0xff00, 0x0012, 0x3a40, 0x000b, 0x1031, 0x0002, 0x7940,
-	0x000b, 0x112b, 0x0002, 0x3a42, 0x001b, 0x1035, 0x0003, 0xb035,
-	0x0003, 0xa1d1, 0x0002, 0x3a41, 0x001b, 0x1039, 0x0012, 0x7941,
-	0x001b, 0x1306, 0x0013, 0xe051, 0x0012, 0xd042, 0x0003, 0x103f,
-	0x0000, 0x75ff, 0x0002, 0xff41, 0x000b, 0x1051, 0x0000, 0x0cfe,
-	0x0013, 0x6047, 0x0011, 0x02e8, 0x0010, 0x0000, 0x0003, 0x1390,
-	0x0011, 0x02e8, 0x0010, 0x0005, 0x0013, 0x141d, 0x0012, 0xd042,
-	0x0013, 0x104c, 0x0000, 0x75ff, 0x0012, 0xff40, 0x000b, 0x1051,
-	0x0000, 0x12fe, 0x0003, 0x6051, 0x0001, 0x0fe8, 0x0010, 0x0000,
-	0x0013, 0x160e, 0x0015, 0x0030, 0x0000, 0x0400, 0x0010, 0xc131,
-	0x0015, 0x0033, 0x0010, 0xb211, 0x001b, 0x8056, 0x0010, 0xb2ff,
-	0x0001, 0xb3e0, 0x000c, 0x10c9, 0x000b, 0xf02d, 0x0011, 0x3be8,
-	0x0000, 0x0010, 0x000b, 0x106e, 0x0000, 0x0afe, 0x001b, 0x6062,
-	0x0000, 0x3c0b, 0x0013, 0x006a, 0x0015, 0x0030, 0x0000, 0x0400,
-	0x0001, 0x0a88, 0x0010, 0x0003, 0x0000, 0xff31, 0x0015, 0x0033,
-	0x0010, 0x3c0a, 0x001b, 0x8069, 0x0010, 0x3c0a, 0x0002, 0x0c00,
-	0x0010, 0xff0c, 0x0013, 0x00c6, 0x0011, 0x3be8, 0x0010, 0x0012,
-	0x001b, 0x1081, 0x0010, 0x08fe, 0x001b, 0x6075, 0x0010, 0x3c09,
-	0x0013, 0x007d, 0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0888,
-	0x0010, 0x0003, 0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0x3c0a,
-	0x000b, 0x807c, 0x0000, 0x3c08, 0x0002, 0x0c00, 0x0010, 0xff0c,
-	0x0013, 0x00c6, 0x0011, 0x3be8, 0x0000, 0x0013, 0x001b, 0x1087,
-	0x0000, 0x3cb0, 0x0014, 0x00d9, 0x0013, 0x00c6, 0x0011, 0x3be8,
-	0x0000, 0x0019, 0x001b, 0x109a, 0x0010, 0x04fe, 0x000b, 0x608e,
-	0x0010, 0x3c05, 0x0013, 0x0096, 0x0015, 0x0030, 0x0000, 0x0400,
-	0x0011, 0x0488, 0x0010, 0x0003, 0x0000, 0xff31, 0x0015, 0x0033,
-	0x0010, 0x3c0a, 0x001b, 0x8095, 0x0000, 0x3c04, 0x0002, 0x0c00,
-	0x0010, 0xff0c, 0x0013, 0x00c6, 0x0011, 0x3be8, 0x0000, 0x0015,
-	0x001b, 0x10a6, 0x0004, 0x0110, 0x0014, 0x0122, 0x0015, 0x0039,
-	0x0000, 0x8000, 0x0017, 0x8000, 0x0004, 0x0107, 0x0004, 0x0119,
-	0x0014, 0x00f2, 0x0013, 0x002d, 0x0011, 0x3be8, 0x0000, 0x0016,
-	0x001b, 0x10b8, 0x0001, 0x0fe8, 0x0010, 0x0000, 0x0003, 0x10b2,
-	0x0001, 0x0fe8, 0x0000, 0x0002, 0x0003, 0x10b2, 0x0015, 0x0039,
-	0x0010, 0x1010, 0x0013, 0x00c6, 0x0015, 0x0039, 0x0000, 0x5040,
-	0x0015, 0x00b8, 0x0000, 0x0008, 0x0014, 0x0817, 0x0013, 0x00c6,
-	0x0011, 0x3be8, 0x0010, 0x0017, 0x001b, 0x10bd, 0x0010, 0x3cc3,
-	0x0013, 0x00c6, 0x0011, 0x3be8, 0x0010, 0x0018, 0x000b, 0x10c2,
-	0x0000, 0x3cc2, 0x0013, 0x00c6, 0x0005, 0x00ce, 0x0000, 0x0001,
-	0x0000, 0x3bcf, 0x0004, 0x07d9, 0x0015, 0x0039, 0x0000, 0x8000,
-	0x0013, 0x002d, 0x0001, 0xb288, 0x0000, 0x0002, 0x0001, 0xc180,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x80cf,
-	0x0002, 0xb200, 0x0011, 0xffc8, 0x0000, 0x0007, 0x0010, 0xffb2,
-	0x0010, 0xc131, 0x0015, 0x0033, 0x0010, 0xb20a, 0x0001, 0xb0d0,
-	0x001b, 0x80d8, 0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0xb088,
-	0x0000, 0x0010, 0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0xb109,
-	0x000b, 0x80e0, 0x0001, 0xb1e8, 0x0010, 0xffff, 0x0013, 0x10f1,
-	0x0000, 0x11fe, 0x000b, 0x60e8, 0x0000, 0xb012, 0x0013, 0x00f0,
-	0x0015, 0x0030, 0x0000, 0x0400, 0x0001, 0x1188, 0x0010, 0x0003,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb00a, 0x000b, 0x80ef,
-	0x0000, 0xb011, 0x0017, 0x4000, 0x0015, 0x0030, 0x0000, 0x0400,
-	0x0011, 0xbc88, 0x0010, 0x001e, 0x0000, 0xff31, 0x0015, 0x0033,
-	0x0000, 0xc411, 0x001b, 0x80f9, 0x0011, 0xbc88, 0x0010, 0x0017,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0xc609, 0x001b, 0x80ff,
-	0x0011, 0xbc88, 0x0010, 0x0036, 0x0000, 0xff31, 0x0015, 0x0033,
-	0x0000, 0xc709, 0x000b, 0x8105, 0x0017, 0x4000, 0x0015, 0x0030,
-	0x0000, 0x0400, 0x0001, 0xbb88, 0x0000, 0x0001, 0x0000, 0xff31,
-	0x0015, 0x0033, 0x0000, 0x0269, 0x001b, 0x810e, 0x0017, 0x4000,
-	0x0015, 0x0030, 0x0000, 0x0400, 0x0001, 0xbb88, 0x0000, 0x0001,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0x026a, 0x000b, 0x8117,
-	0x0017, 0x4000, 0x0015, 0x0030, 0x0000, 0x0400, 0x0001, 0xbb88,
-	0x0010, 0x000f, 0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0x0f59,
-	0x001b, 0x8120, 0x0017, 0x4000, 0x0015, 0x0030, 0x0000, 0x0400,
-	0x0001, 0xbb88, 0x0010, 0x000f, 0x0000, 0xff31, 0x0015, 0x0033,
-	0x0010, 0x0f5a, 0x001b, 0x8129, 0x0017, 0x4000, 0x0000, 0xd0ff,
-	0x0012, 0xff40, 0x000b, 0x1031, 0x0015, 0x00d1, 0x0010, 0x0101,
-	0x0003, 0x9130, 0x0005, 0x0079, 0x0000, 0x0001, 0x0003, 0x9133,
-	0x0015, 0x00d1, 0x0000, 0x0100, 0x0011, 0x02e8, 0x0000, 0x0002,
-	0x0013, 0x1156, 0x0011, 0x02e8, 0x0000, 0x0001, 0x0003, 0x116e,
-	0x0011, 0x02e8, 0x0000, 0x0004, 0x0003, 0x118c, 0x0011, 0x02e8,
-	0x0010, 0x0003, 0x0013, 0x11bd, 0x0005, 0x0002, 0x0010, 0x0000,
-	0x0000, 0xc00e, 0x0000, 0xc00d, 0x0010, 0xc003, 0x0015, 0x0030,
-	0x0000, 0x0400, 0x0001, 0xbd88, 0x0010, 0x0009, 0x0000, 0xff31,
-	0x0015, 0x0033, 0x0010, 0xc00a, 0x000b, 0x814e, 0x0000, 0xff31,
-	0x0015, 0x0033, 0x0010, 0xc00a, 0x001b, 0x8152, 0x0012, 0xd042,
-	0x0013, 0x1031, 0x0003, 0x004c, 0x0012, 0x7849, 0x0003, 0x11cb,
-	0x0010, 0x0dfe, 0x0003, 0x6144, 0x0012, 0x0c10, 0x0010, 0xff0c,
-	0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88, 0x0010, 0x0003,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb309, 0x000b, 0x8163,
-	0x0010, 0xb3fe, 0x0013, 0x616b, 0x0010, 0xb30b, 0x0015, 0x0033,
-	0x0010, 0xc00a, 0x000b, 0x8169, 0x0003, 0x01c0, 0x0000, 0xc00b,
-	0x0010, 0xc00a, 0x0003, 0x01c0, 0x0000, 0x78b0, 0x0012, 0xb044,
-	0x0003, 0x11cb, 0x0002, 0xb049, 0x0003, 0x11cb, 0x0010, 0x71ff,
-	0x0012, 0xff38, 0x0010, 0xff71, 0x0010, 0x0dfe, 0x0003, 0x6142,
-	0x0012, 0x0c10, 0x0010, 0xff0c, 0x0015, 0x0030, 0x0000, 0x0400,
-	0x0011, 0x0d88, 0x0010, 0x0003, 0x0000, 0xff31, 0x0015, 0x0033,
-	0x0000, 0xb309, 0x000b, 0x8181, 0x0010, 0xb3fe, 0x0013, 0x6189,
-	0x0000, 0xb309, 0x0015, 0x0033, 0x0010, 0xc00a, 0x000b, 0x8187,
-	0x0003, 0x01c0, 0x0010, 0xc009, 0x0000, 0xc008, 0x0003, 0x01c0,
-	0x0000, 0x78b0, 0x0012, 0xb044, 0x0003, 0x11cb, 0x0002, 0xb049,
-	0x0003, 0x11cb, 0x0010, 0x71ff, 0x0012, 0xff38, 0x0010, 0xff71,
-	0x0010, 0x0dfe, 0x0003, 0x6142, 0x0012, 0x0c10, 0x0010, 0xff0c,
-	0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88, 0x0010, 0x0003,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb309, 0x000b, 0x819f,
-	0x0010, 0xb3fe, 0x0013, 0x61a7, 0x0000, 0xb305, 0x0015, 0x0033,
-	0x0010, 0xc00a, 0x000b, 0x81a5, 0x0003, 0x01a9, 0x0010, 0xc005,
-	0x0000, 0xc004, 0x0002, 0x033f, 0x0002, 0xff27, 0x0000, 0x0db8,
-	0x0014, 0x0385, 0x0000, 0x0db8, 0x0014, 0x0817, 0x0015, 0x0030,
-	0x0000, 0x0400, 0x0011, 0xbc88, 0x0010, 0x0000, 0x0000, 0xff31,
-	0x0015, 0x0033, 0x0000, 0xb309, 0x001b, 0x81b6, 0x0011, 0xb3e8,
-	0x0000, 0x0002, 0x000b, 0x1142, 0x0005, 0x0002, 0x0010, 0x0005,
-	0x0003, 0x0144, 0x0012, 0x7849, 0x0003, 0x11cb, 0x0003, 0x0144,
-	0x0000, 0x0db8, 0x0012, 0x0345, 0x000b, 0x11c6, 0x0002, 0x033f,
-	0x0014, 0x0385, 0x0003, 0x0142, 0x0002, 0x033f, 0x0002, 0xff27,
-	0x0014, 0x0385, 0x0014, 0x0817, 0x0003, 0x0142, 0x0015, 0x00b8,
-	0x0000, 0x0001, 0x0015, 0x003a, 0x0010, 0x0101, 0x0014, 0x0817,
-	0x0003, 0x0153, 0x0001, 0x2bd8, 0x0010, 0x0000, 0x0000, 0xffba,
-	0x0013, 0xb1d4, 0x0005, 0x002a, 0x0000, 0x0002, 0x0001, 0xbac8,
-	0x0000, 0x0700, 0x001b, 0x12c1, 0x0011, 0x15e8, 0x0000, 0x0002,
-	0x0003, 0x1237, 0x0011, 0x15e8, 0x0000, 0x0001, 0x0003, 0x11e3,
-	0x0005, 0x0015, 0x0010, 0x0000, 0x0013, 0x021a, 0x0005, 0x0015,
-	0x0010, 0x0000, 0x0002, 0xba43, 0x0013, 0x121b, 0x0013, 0xb1e7,
-	0x0005, 0x002a, 0x0000, 0x0004, 0x0012, 0xba42, 0x0013, 0x1221,
-	0x0012, 0x104b, 0x001b, 0x121a, 0x0000, 0x1a30, 0x0005, 0x0031,
-	0x0000, 0x0002, 0x0015, 0x0033, 0x0000, 0x1b2a, 0x000b, 0x81f3,
-	0x0011, 0x20d8, 0x0010, 0x0000, 0x0000, 0xffb0, 0x0001, 0x21d8,
-	0x0010, 0x0000, 0x0010, 0xffb1, 0x0001, 0x22d8, 0x0010, 0x0000,
-	0x0010, 0xffb2, 0x0011, 0x23d8, 0x0010, 0x0000, 0x0000, 0xffb3,
-	0x0001, 0x24d8, 0x0010, 0x0000, 0x0010, 0xffb4, 0x0011, 0x25d8,
-	0x0010, 0x0000, 0x0000, 0xffb5, 0x0001, 0x28d8, 0x0010, 0x0000,
-	0x0010, 0xffb8, 0x0011, 0x29d8, 0x0010, 0x0000, 0x0000, 0xffb9,
-	0x0000, 0x1a30, 0x0005, 0x0031, 0x0000, 0x0007, 0x0015, 0x0033,
-	0x0010, 0xb032, 0x000b, 0x8211, 0x0000, 0x1a30, 0x0005, 0x0031,
-	0x0010, 0x000f, 0x0015, 0x0033, 0x0010, 0xb812, 0x000b, 0x8217,
-	0x0005, 0x0015, 0x0010, 0x0000, 0x0013, 0x0035, 0x0000, 0x1efe,
-	0x0013, 0x622f, 0x0014, 0x0266, 0x0000, 0x1efe, 0x000c, 0x6266,
-	0x0013, 0x021a, 0x0000, 0x1a30, 0x0005, 0x0031, 0x0000, 0x0020,
-	0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x8226, 0x0002, 0xb02f,
-	0x0000, 0xffb0, 0x0005, 0x0031, 0x0000, 0x0020, 0x0015, 0x0033,
-	0x0000, 0xb00a, 0x000b, 0x822d, 0x0003, 0x01ee, 0x0015, 0x00b8,
-	0x0010, 0x0005, 0x0014, 0x0817, 0x0000, 0x13b8, 0x0015, 0x003a,
-	0x0010, 0x0404, 0x0014, 0x0817, 0x0013, 0x021a, 0x0005, 0x0015,
-	0x0000, 0x0001, 0x0012, 0xba42, 0x0003, 0x1245, 0x0003, 0xb23b,
-	0x0001, 0x2bd8, 0x0010, 0x0000, 0x0012, 0xff4f, 0x000b, 0x11d1,
-	0x0002, 0xba43, 0x000b, 0x1221, 0x0000, 0x1efe, 0x000c, 0x6266,
-	0x0013, 0x021a, 0x0001, 0x28d8, 0x0010, 0x0000, 0x0010, 0xffb8,
-	0x0011, 0x29d8, 0x0010, 0x0000, 0x0000, 0xffb9, 0x0014, 0x02d7,
-	0x0002, 0x3a42, 0x001b, 0x121a, 0x0000, 0x1c30, 0x0015, 0x00ff,
-	0x0000, 0x0002, 0x0002, 0x1f43, 0x000b, 0x1256, 0x0001, 0xff88,
-	0x0000, 0x0002, 0x0013, 0x0258, 0x0001, 0xff88, 0x0000, 0x0004,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb011, 0x001b, 0x825b,
-	0x0000, 0xb0ff, 0x0011, 0x16a0, 0x0000, 0xff16, 0x001b, 0x2262,
-	0x0002, 0xb100, 0x0003, 0x0263, 0x0010, 0xb1ff, 0x0001, 0x17a0,
-	0x0010, 0xff17, 0x0003, 0x0221, 0x0000, 0x16ff, 0x0001, 0x18a0,
-	0x0010, 0xff00, 0x001b, 0x226d, 0x0002, 0x1700, 0x0013, 0x12c0,
-	0x0013, 0x026e, 0x0010, 0x17ff, 0x0011, 0x19a0, 0x0013, 0x22c0,
-	0x0011, 0x00d0, 0x0013, 0x12c0, 0x0000, 0x1c30, 0x0000, 0x1b31,
-	0x0015, 0x0033, 0x0000, 0xb131, 0x001b, 0x8276, 0x0013, 0xb277,
-	0x0000, 0xb120, 0x0010, 0xb221, 0x0002, 0x1f43, 0x001b, 0x1283,
-	0x0010, 0xc022, 0x0000, 0xc023, 0x0000, 0xb324, 0x0000, 0xb425,
-	0x0010, 0xb3b5, 0x0000, 0xb4b6, 0x0003, 0x0287, 0x0000, 0xb322,
-	0x0000, 0xb423, 0x0000, 0xb524, 0x0010, 0xb625, 0x0013, 0xb287,
-	0x0005, 0x002a, 0x0000, 0x0001, 0x0012, 0x1500, 0x0000, 0xff15,
-	0x0000, 0x16ff, 0x0001, 0xb580, 0x0000, 0xff16, 0x001b, 0x2292,
-	0x0002, 0x1700, 0x0003, 0x0293, 0x0010, 0x17ff, 0x0001, 0xb680,
-	0x0010, 0xff17, 0x0012, 0x1e10, 0x0010, 0xff1e, 0x0003, 0x62c0,
-	0x0002, 0x1d00, 0x0010, 0xff1d, 0x0010, 0xc030, 0x0000, 0xff31,
-	0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x829e, 0x0010, 0xb0fe,
-	0x000b, 0x62bf, 0x0000, 0x1c30, 0x0005, 0x0031, 0x0000, 0x0001,
-	0x0015, 0x0033, 0x0000, 0xb009, 0x000b, 0x82a6, 0x0010, 0xb0fe,
-	0x001b, 0x62ac, 0x0005, 0x00ce, 0x0010, 0x0005, 0x0013, 0x07d9,
-	0x0010, 0xb01c, 0x0000, 0x1c30, 0x0005, 0x0031, 0x0000, 0x0019,
-	0x0015, 0x0033, 0x0000, 0xb009, 0x000b, 0x82b2, 0x0001, 0xb0c8,
-	0x0010, 0x00ff, 0x0000, 0xff1f, 0x0010, 0xc030, 0x0011, 0xbe80,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009, 0x000b, 0x82bb,
-	0x0000, 0xb01d, 0x0010, 0x1dff, 0x0003, 0x029a, 0x0000, 0xb01b,
-	0x0017, 0x4000, 0x0002, 0x3a41, 0x0013, 0x12c9, 0x0013, 0xb2c3,
-	0x0005, 0x002a, 0x0000, 0x0004, 0x0005, 0x0015, 0x0010, 0x0000,
-	0x0013, 0x021a, 0x0000, 0x1a30, 0x0005, 0x0031, 0x0000, 0x0002,
-	0x0015, 0x0033, 0x0000, 0x1b2a, 0x001b, 0x82ce, 0x0015, 0x00b8,
-	0x0000, 0x0004, 0x0014, 0x0817, 0x0000, 0x13b8, 0x0015, 0x003a,
-	0x0010, 0x0404, 0x0014, 0x0817, 0x0013, 0x0039, 0x0002, 0x1e00,
-	0x0010, 0xff1e, 0x0012, 0x1d10, 0x0010, 0xff1d, 0x0010, 0xc030,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x82df,
-	0x0010, 0xb0fe, 0x001b, 0x6304, 0x0000, 0x1cff, 0x0001, 0x1ae0,
-	0x0013, 0x12ee, 0x0000, 0x1c30, 0x0005, 0x0031, 0x0010, 0x0000,
-	0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x82ea, 0x0010, 0xb0fe,
-	0x001b, 0x62ee, 0x0000, 0x1aff, 0x0000, 0xff1c, 0x0000, 0x1c30,
-	0x0005, 0x0031, 0x0000, 0x0019, 0x0015, 0x0033, 0x0000, 0xb009,
-	0x001b, 0x82f4, 0x0001, 0xb0c8, 0x0010, 0x000f, 0x0000, 0xff1f,
-	0x0001, 0xbf80, 0x0010, 0xff1d, 0x0010, 0xc030, 0x0000, 0xff31,
-	0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x82fe, 0x0010, 0xb0fe,
-	0x001b, 0x6304, 0x0005, 0x00ce, 0x0010, 0x0006, 0x0013, 0x07d9,
-	0x0000, 0xb01b, 0x0017, 0x4000, 0x0010, 0x79b0, 0x0000, 0xd0ff,
-	0x0012, 0xff40, 0x001b, 0x1039, 0x0015, 0x00d1, 0x0010, 0x0101,
-	0x0013, 0x930c, 0x0005, 0x0079, 0x0000, 0x0002, 0x0013, 0x930f,
-	0x0015, 0x00d1, 0x0000, 0x0100, 0x0010, 0x13fe, 0x0013, 0x6344,
-	0x0012, 0xb04e, 0x000b, 0x135d, 0x0012, 0x784a, 0x0003, 0x1363,
-	0x0000, 0x75ff, 0x0011, 0xffc8, 0x0010, 0x1800, 0x001b, 0x1363,
-	0x0001, 0x0fe8, 0x0000, 0x0001, 0x001b, 0x1328, 0x0015, 0x0030,
-	0x0000, 0x0400, 0x0011, 0x1388, 0x0000, 0x000e, 0x0000, 0xff31,
-	0x0015, 0x0033, 0x0000, 0x8f0a, 0x000b, 0x8326, 0x0013, 0x0369,
-	0x0001, 0x0fe8, 0x0000, 0x0002, 0x001b, 0x1333, 0x0015, 0x0030,
-	0x0000, 0x0400, 0x0005, 0x0031, 0x0000, 0x001a, 0x0015, 0x0033,
-	0x0010, 0xc00a, 0x000b, 0x8331, 0x0013, 0x0369, 0x0001, 0x0fe8,
-	0x0010, 0x0000, 0x0003, 0x133a, 0x0005, 0x00ce, 0x0000, 0x0007,
-	0x0010, 0x0fcf, 0x0013, 0x07d3, 0x0000, 0x13b8, 0x0002, 0x1045,
-	0x0003, 0x1342, 0x0012, 0x103f, 0x0002, 0xff27, 0x0014, 0x0385,
-	0x0014, 0x0817, 0x0013, 0x0344, 0x0012, 0x103f, 0x0014, 0x0385,
-	0x0015, 0x000f, 0x0010, 0x0000, 0x0002, 0x3944, 0x0003, 0x134d,
-	0x0015, 0x0039, 0x0000, 0x5040, 0x0015, 0x00b8, 0x0000, 0x0008,
-	0x0014, 0x0817, 0x0015, 0x0030, 0x0000, 0x0400, 0x0001, 0xbd88,
-	0x0010, 0x000c, 0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0xc00a,
-	0x000b, 0x8354, 0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0xc00a,
-	0x000b, 0x8358, 0x0010, 0xc014, 0x0000, 0xc013, 0x0000, 0xc010,
-	0x0013, 0x0039, 0x0015, 0x00b8, 0x0010, 0x0003, 0x0015, 0x003a,
-	0x0010, 0x0202, 0x0014, 0x0817, 0x0013, 0x035c, 0x0015, 0x00b8,
-	0x0000, 0x0002, 0x0015, 0x003a, 0x0010, 0x0202, 0x0014, 0x0817,
-	0x0013, 0x035c, 0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x1388,
-	0x0010, 0x0003, 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009,
-	0x000b, 0x8370, 0x0011, 0x1388, 0x0010, 0x0003, 0x0000, 0xff31,
-	0x0015, 0x0033, 0x0010, 0xc00a, 0x000b, 0x8376, 0x0010, 0xb0fe,
-	0x0013, 0x637b, 0x0000, 0xb012, 0x0013, 0x037d, 0x0010, 0xc012,
-	0x0010, 0xc011, 0x0012, 0x104b, 0x0003, 0x133a, 0x0002, 0x103b,
-	0x0010, 0xff03, 0x0005, 0x0002, 0x0010, 0x0000, 0x0000, 0xc00d,
-	0x0013, 0x033a, 0x0000, 0xffb0, 0x0010, 0xc3b1, 0x0015, 0x0030,
-	0x0000, 0x0400, 0x0001, 0xb888, 0x0010, 0x0011, 0x0000, 0xff31,
-	0x0015, 0x0033, 0x0000, 0xb012, 0x001b, 0x838e, 0x0017, 0x4000,
-	0x0012, 0x3a43, 0x0003, 0x139f, 0x0015, 0x003a, 0x0000, 0x0800,
-	0x0010, 0x0db0, 0x0013, 0x639f, 0x0000, 0x0bff, 0x0001, 0xb0e0,
-	0x0003, 0x13c5, 0x0010, 0x09ff, 0x0001, 0xb0e0, 0x0003, 0x13a9,
-	0x0010, 0x05ff, 0x0001, 0xb0e0, 0x0003, 0x13a3, 0x0000, 0xc00e,
-	0x0000, 0x05fe, 0x0013, 0x63a6, 0x0000, 0x050d, 0x0005, 0x0002,
-	0x0000, 0x0004, 0x0013, 0x03c0, 0x0000, 0x09fe, 0x0003, 0x63c2,
-	0x0000, 0x090d, 0x0005, 0x0002, 0x0000, 0x0001, 0x0014, 0x0424,
-	0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88, 0x0000, 0x0004,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xba09, 0x000b, 0x83b3,
-	0x0011, 0x03c8, 0x0010, 0x000f, 0x0000, 0xffb6, 0x0011, 0xb6e8,
-	0x0000, 0x0001, 0x0013, 0x14bb, 0x0011, 0xb6e8, 0x0000, 0x0002,
-	0x0013, 0x14dd, 0x0011, 0xb6e8, 0x0010, 0x0003, 0x0003, 0x15cc,
-	0x0014, 0x07de, 0x0013, 0x0423, 0x0010, 0x0bfe, 0x0013, 0x6423,
-	0x0010, 0x0b0d, 0x0005, 0x0002, 0x0000, 0x0002, 0x0014, 0x0424,
-	0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88, 0x0000, 0x0004,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xba09, 0x001b, 0x83cf,
-	0x0000, 0xb930, 0x0005, 0x0031, 0x0010, 0x0021, 0x0015, 0x0033,
-	0x0000, 0xb009, 0x000b, 0x83d5, 0x0001, 0xb0a8, 0x0000, 0x199a,
-	0x0003, 0x23db, 0x0005, 0x00b0, 0x0000, 0x1999, 0x0012, 0xb050,
-	0x0000, 0xffb0, 0x0002, 0xff50, 0x0002, 0xff50, 0x0001, 0xb080,
-	0x0000, 0xffb0, 0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88,
-	0x0010, 0x0006, 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb00a,
-	0x001b, 0x83e8, 0x0000, 0xb930, 0x0005, 0x0031, 0x0000, 0x0019,
-	0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x83ee, 0x0001, 0xb0c8,
-	0x0010, 0x00ff, 0x0001, 0xffe8, 0x0010, 0x0048, 0x000b, 0x1433,
-	0x0005, 0x0002, 0x0010, 0x0006, 0x0012, 0x0c10, 0x0010, 0xff0c,
-	0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88, 0x0010, 0x0003,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0xb109, 0x001b, 0x83ff,
-	0x0000, 0xb10b, 0x001b, 0x6403, 0x0010, 0xb10a, 0x0015, 0x0033,
-	0x0010, 0xc00a, 0x000b, 0x8405, 0x0002, 0x032b, 0x0010, 0xff03,
-	0x0011, 0x0d88, 0x0010, 0x0011, 0x0000, 0xff31, 0x0015, 0x0033,
-	0x0010, 0x030a, 0x001b, 0x840d, 0x0000, 0x11fe, 0x001b, 0x6412,
-	0x0000, 0x0d12, 0x0003, 0x041b, 0x0015, 0x0030, 0x0000, 0x0400,
-	0x0001, 0x1188, 0x0010, 0x0003, 0x0000, 0xff31, 0x0010, 0x0db0,
-	0x0015, 0x0033, 0x0000, 0xb00a, 0x001b, 0x841a, 0x0000, 0x0d11,
-	0x0013, 0x0423, 0x0000, 0x05fe, 0x0013, 0x6423, 0x0005, 0x0002,
-	0x0000, 0x0004, 0x0000, 0x050d, 0x0014, 0x07de, 0x0013, 0x0047,
-	0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88, 0x0010, 0x0011,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0x0309, 0x000b, 0x842b,
-	0x0011, 0x0d88, 0x0010, 0x0005, 0x0000, 0xff31, 0x0015, 0x0033,
-	0x0000, 0xb909, 0x001b, 0x8431, 0x0017, 0x4000, 0x0005, 0x00b6,
-	0x0010, 0x0600, 0x0004, 0x05fc, 0x0014, 0x04a5, 0x0000, 0xb05a,
-	0x0000, 0xb15b, 0x0005, 0x0054, 0x0010, 0x0829, 0x0010, 0x0d58,
-	0x0015, 0x0059, 0x0010, 0xffff, 0x0000, 0xb930, 0x0005, 0x0031,
-	0x0010, 0x001e, 0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x8443,
-	0x0000, 0xb05c, 0x0005, 0x0031, 0x0000, 0x001f, 0x0015, 0x0033,
-	0x0000, 0xb009, 0x001b, 0x8449, 0x0001, 0xb0c8, 0x0010, 0x000f,
-	0x000b, 0x1450, 0x0015, 0x00ff, 0x0010, 0x0005, 0x0013, 0x0458,
-	0x0002, 0xb040, 0x0013, 0x1455, 0x0015, 0x00ff, 0x0000, 0x0004,
-	0x0013, 0x0458, 0x0001, 0xb0c8, 0x0010, 0x0006, 0x0002, 0xff60,
-	0x0010, 0xffb2, 0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88,
-	0x0000, 0x0019, 0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0xb109,
-	0x000b, 0x8460, 0x0012, 0xb170, 0x0011, 0xffc8, 0x0010, 0xff00,
-	0x0011, 0xb2d0, 0x0010, 0xff60, 0x0002, 0xb045, 0x0003, 0x146b,
-	0x0015, 0x00b2, 0x0000, 0x0002, 0x0013, 0x0475, 0x0002, 0xb046,
-	0x0003, 0x1470, 0x0015, 0x00b2, 0x0000, 0x0001, 0x0013, 0x0475,
-	0x0015, 0x00b2, 0x0010, 0x0000, 0x0000, 0xc0b0, 0x0010, 0xc0b1,
-	0x0003, 0x047b, 0x0000, 0xb930, 0x0005, 0x0031, 0x0010, 0x002b,
-	0x0015, 0x0033, 0x0000, 0xb011, 0x001b, 0x847a, 0x0010, 0xb16a,
-	0x0010, 0xb06b, 0x0000, 0xb261, 0x0015, 0x0044, 0x0010, 0x0018,
-	0x0000, 0xb930, 0x0005, 0x0031, 0x0000, 0x0023, 0x0015, 0x0033,
-	0x0000, 0x6241, 0x001b, 0x8485, 0x0013, 0x9486, 0x0015, 0x00a0,
-	0x0000, 0x0020, 0x0012, 0xd041, 0x001b, 0x1489, 0x0015, 0x00d1,
-	0x0010, 0x0202, 0x0003, 0x948d, 0x0000, 0x75ff, 0x0011, 0xffc8,
-	0x0000, 0x1804, 0x0001, 0xffd8, 0x0010, 0x0009, 0x0003, 0x9493,
-	0x0000, 0xff75, 0x0003, 0x9495, 0x0015, 0x00d1, 0x0000, 0x0200,
-	0x0015, 0x0030, 0x0000, 0x0400, 0x0001, 0xbd88, 0x0000, 0x0008,
-	0x0000, 0xff31, 0x0015, 0x00b1, 0x0010, 0x07d0, 0x0005, 0x00b0,
-	0x0010, 0x0009, 0x0015, 0x0033, 0x0000, 0xb012, 0x000b, 0x84a3,
-	0x0013, 0x0423, 0x0000, 0xba30, 0x0005, 0x0031, 0x0000, 0x0031,
-	0x0015, 0x0033, 0x0000, 0xb009, 0x000b, 0x84aa, 0x0002, 0xb040,
-	0x0013, 0x14b8, 0x0000, 0xb7b0, 0x0000, 0xb9b1, 0x0015, 0x0030,
-	0x0000, 0x0400, 0x0011, 0x0d88, 0x0000, 0x0013, 0x0000, 0xff31,
-	0x0015, 0x0033, 0x0000, 0xb012, 0x001b, 0x84b6, 0x0013, 0x04ba,
-	0x0010, 0xc0b1, 0x0000, 0xc0b0, 0x0017, 0x4000, 0x0005, 0x00b6,
-	0x0010, 0x0500, 0x0004, 0x05fc, 0x0005, 0x0054, 0x0010, 0x0889,
-	0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88, 0x0000, 0x0002,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x84c7,
-	0x0010, 0xb058, 0x0000, 0x0d59, 0x0000, 0xb930, 0x0005, 0x0031,
-	0x0000, 0x0023, 0x0015, 0x0033, 0x0000, 0xb011, 0x000b, 0x84cf,
-	0x0010, 0xb15c, 0x0010, 0xb05d, 0x0005, 0x0031, 0x0010, 0x002b,
-	0x0015, 0x0033, 0x0000, 0xb011, 0x001b, 0x84d6, 0x0000, 0xb15e,
-	0x0000, 0xb05f, 0x0013, 0x94d9, 0x0015, 0x00a0, 0x0010, 0x000c,
-	0x0013, 0x05e1, 0x0005, 0x00b6, 0x0000, 0x0700, 0x0004, 0x05fc,
-	0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88, 0x0010, 0x0009,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0xb709, 0x000b, 0x84e7,
-	0x0012, 0xb749, 0x0013, 0x14ed, 0x0005, 0x0054, 0x0010, 0x0889,
-	0x0013, 0x04ef, 0x0005, 0x0054, 0x0010, 0x0898, 0x0015, 0x0030,
-	0x0000, 0x0400, 0x0011, 0x0d88, 0x0000, 0x0002, 0x0000, 0xff31,
-	0x0015, 0x0033, 0x0000, 0xb009, 0x000b, 0x84f6, 0x0010, 0xb058,
-	0x0000, 0x0d59, 0x0001, 0xb9a8, 0x0010, 0x00f0, 0x001b, 0x251d,
-	0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88, 0x0010, 0x0005,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x8503,
-	0x0001, 0xb0c8, 0x0000, 0xf700, 0x0000, 0xffb0, 0x0011, 0xb0e8,
-	0x0000, 0xf100, 0x0013, 0x1564, 0x0011, 0xb0e8, 0x0000, 0xf200,
-	0x0003, 0x1569, 0x0011, 0xb0e8, 0x0010, 0xf300, 0x0003, 0x158e,
-	0x0011, 0xb0e8, 0x0000, 0xf400, 0x0003, 0x1593, 0x0011, 0xb0e8,
-	0x0010, 0xf500, 0x0013, 0x1564, 0x0011, 0xb0e8, 0x0010, 0xf600,
-	0x0013, 0x15a4, 0x0005, 0x00ce, 0x0010, 0x0009, 0x0000, 0xb0cf,
-	0x0013, 0x07d3, 0x0000, 0xb930, 0x0005, 0x0031, 0x0000, 0x0025,
-	0x0015, 0x0033, 0x0000, 0xb039, 0x001b, 0x8522, 0x0012, 0xb749,
-	0x0003, 0x1527, 0x0002, 0xb52c, 0x0000, 0xffb5, 0x0000, 0xb162,
-	0x0000, 0xb063, 0x0005, 0x0031, 0x0000, 0x001f, 0x0015, 0x0033,
-	0x0000, 0xb309, 0x001b, 0x852d, 0x0001, 0xb3c8, 0x0010, 0x0003,
-	0x0003, 0x1535, 0x0010, 0xffb2, 0x0001, 0xffe8, 0x0010, 0x0003,
-	0x000b, 0x1537, 0x0000, 0xc2b7, 0x0013, 0x05c0, 0x0001, 0xb2e8,
-	0x0000, 0x0001, 0x0013, 0x153e, 0x0005, 0x00ce, 0x0010, 0x000a,
-	0x0010, 0xb2cf, 0x0013, 0x07d3, 0x0010, 0xb465, 0x0010, 0xb667,
-	0x0015, 0x00b7, 0x0010, 0x0018, 0x0001, 0xb5c8, 0x0010, 0x0300,
-	0x0003, 0x1563, 0x0012, 0xb548, 0x0013, 0x154a, 0x0000, 0xb6ff,
-	0x0011, 0xb780, 0x0010, 0xffb7, 0x0002, 0xb549, 0x0013, 0x154f,
-	0x0010, 0xb4ff, 0x0011, 0xb780, 0x0010, 0xffb7, 0x0015, 0x0044,
-	0x0010, 0x0018, 0x0005, 0x0031, 0x0000, 0x002c, 0x0015, 0x0033,
-	0x0000, 0x6841, 0x001b, 0x8555, 0x0015, 0x0044, 0x0000, 0x0019,
-	0x0005, 0x0031, 0x0000, 0x0034, 0x0015, 0x0033, 0x0000, 0x5029,
-	0x001b, 0x855c, 0x0015, 0x0044, 0x0000, 0x0008, 0x0011, 0xb7c8,
-	0x0010, 0x0003, 0x0003, 0x1563, 0x0010, 0xff55, 0x0013, 0x05c0,
-	0x0005, 0x00b5, 0x0000, 0x0008, 0x0015, 0x00b7, 0x0010, 0x0018,
-	0x0013, 0x05c0, 0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88,
-	0x0000, 0x000b, 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb011,
-	0x000b, 0x8570, 0x0010, 0xb1ff, 0x0001, 0xb0d0, 0x0013, 0x1579,
-	0x0005, 0x00b5, 0x0010, 0x0b02, 0x0010, 0xb062, 0x0010, 0xb163,
-	0x0013, 0x057b, 0x0005, 0x00b5, 0x0000, 0x0302, 0x0015, 0x0065,
-	0x0010, 0x0012, 0x0005, 0x0067, 0x0000, 0x0008, 0x0015, 0x006c,
-	0x0000, 0x7000, 0x0005, 0x006d, 0x0010, 0x0500, 0x0015, 0x006f,
-	0x0010, 0x000a, 0x0015, 0x0044, 0x0000, 0x0001, 0x0005, 0x0052,
-	0x0000, 0x2500, 0x0015, 0x0044, 0x0000, 0x0008, 0x0015, 0x00b7,
-	0x0000, 0x0032, 0x0013, 0x05c0, 0x0005, 0x00b5, 0x0010, 0x0028,
-	0x0015, 0x00b7, 0x0010, 0x0018, 0x0013, 0x05c0, 0x0005, 0x00b5,
-	0x0000, 0x0100, 0x0005, 0x0067, 0x0000, 0x0008, 0x0015, 0x0030,
-	0x0000, 0x0400, 0x0011, 0x0d88, 0x0010, 0x0018, 0x0000, 0xff31,
-	0x0015, 0x0033, 0x0000, 0xb009, 0x000b, 0x859e, 0x0001, 0xb0c8,
-	0x0010, 0x00ff, 0x0015, 0x00b7, 0x0000, 0x0020, 0x0013, 0x05c0,
-	0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88, 0x0010, 0x0005,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb609, 0x000b, 0x85ab,
-	0x0001, 0xb6c8, 0x0010, 0xff00, 0x0000, 0xffb0, 0x0015, 0x0033,
-	0x0000, 0xb00a, 0x001b, 0x85b1, 0x0001, 0xb6c8, 0x0010, 0x00ff,
-	0x0012, 0xff10, 0x000b, 0x15ba, 0x0000, 0xffb5, 0x0015, 0x00b7,
-	0x0010, 0x0018, 0x0013, 0x05c0, 0x0010, 0xff63, 0x0005, 0x00b5,
-	0x0000, 0x0800, 0x0015, 0x00b7, 0x0010, 0x0018, 0x0013, 0x05c0,
-	0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88, 0x0010, 0x0009,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009, 0x000b, 0x85c7,
-	0x0010, 0xb561, 0x0013, 0x95c9, 0x0010, 0xb7a0, 0x0013, 0x05e1,
-	0x0005, 0x00b6, 0x0010, 0x0300, 0x0004, 0x05fc, 0x0005, 0x0054,
-	0x0010, 0x0819, 0x0010, 0x0d58, 0x0015, 0x0030, 0x0000, 0x0400,
-	0x0011, 0x0d88, 0x0000, 0x0002, 0x0000, 0xff31, 0x0015, 0x0033,
-	0x0000, 0xb009, 0x000b, 0x85d9, 0x0000, 0xb059, 0x0013, 0x95db,
-	0x0010, 0xc0a0, 0x0010, 0x71ff, 0x0002, 0xff28, 0x0010, 0xff71,
-	0x0013, 0x05e1, 0x0012, 0xd041, 0x001b, 0x15e1, 0x0015, 0x00d1,
-	0x0010, 0x0202, 0x0000, 0x75ff, 0x0011, 0xffc8, 0x0000, 0x1804,
-	0x0001, 0xffd8, 0x0010, 0x0009, 0x0003, 0x95ea, 0x0000, 0xff75,
-	0x0003, 0x95ec, 0x0015, 0x00d1, 0x0000, 0x0200, 0x0015, 0x0030,
-	0x0000, 0x0400, 0x0001, 0xbd88, 0x0000, 0x0008, 0x0000, 0xff31,
-	0x0005, 0x00b0, 0x0010, 0x0009, 0x0015, 0x00b1, 0x0010, 0x07d0,
-	0x0015, 0x0033, 0x0000, 0xb012, 0x001b, 0x85fa, 0x0013, 0x0423,
-	0x0015, 0x0044, 0x0000, 0x0008, 0x0005, 0x0098, 0x0010, 0x0056,
-	0x0015, 0x0099, 0x0000, 0x9575, 0x0014, 0x079a, 0x0000, 0xb096,
-	0x0012, 0xb270, 0x0010, 0xff56, 0x0004, 0x07bc, 0x0010, 0xb052,
-	0x0010, 0xb153, 0x0000, 0xb6ff, 0x0011, 0xb2d0, 0x0010, 0xff50,
-	0x0010, 0xb351, 0x0017, 0x4000, 0x0015, 0x0030, 0x0000, 0x0400,
-	0x0001, 0x1288, 0x0010, 0x0011, 0x0000, 0xff31, 0x0015, 0x0033,
-	0x0000, 0x1009, 0x000b, 0x8615, 0x0015, 0x000f, 0x0000, 0x0001,
-	0x0010, 0xc014, 0x0000, 0x1213, 0x0015, 0x0030, 0x0000, 0x0400,
-	0x0011, 0x1388, 0x0000, 0x0004, 0x0000, 0xff31, 0x0015, 0x0033,
-	0x0000, 0xba09, 0x001b, 0x8621, 0x0015, 0x0030, 0x0000, 0x0400,
-	0x0011, 0x1388, 0x0010, 0x0005, 0x0000, 0xff31, 0x0015, 0x0033,
-	0x0000, 0x1a09, 0x000b, 0x8629, 0x0012, 0x104b, 0x000b, 0x1632,
-	0x0000, 0x1a30, 0x0005, 0x0031, 0x0000, 0x000b, 0x0015, 0x0033,
-	0x0000, 0x1621, 0x000b, 0x8631, 0x0010, 0x15fe, 0x001b, 0x663b,
-	0x0004, 0x0659, 0x0002, 0x3a42, 0x000b, 0x1658, 0x0001, 0x10c8,
-	0x0010, 0x000f, 0x001b, 0x16bb, 0x0003, 0x0657, 0x0015, 0x0030,
-	0x0000, 0x0400, 0x0011, 0x1388, 0x0010, 0x0003, 0x0000, 0xff31,
-	0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x8642, 0x0015, 0x0033,
-	0x0010, 0xc00a, 0x000b, 0x8645, 0x0010, 0xb0fe, 0x0003, 0x664a,
-	0x0000, 0xb012, 0x0003, 0x064c, 0x0010, 0xc012, 0x0010, 0xc011,
-	0x0015, 0x000f, 0x0010, 0x0000, 0x0002, 0x3944, 0x0003, 0x1655,
-	0x0015, 0x0039, 0x0000, 0x5040, 0x0015, 0x00b8, 0x0000, 0x0008,
-	0x0014, 0x0817, 0x0000, 0xc013, 0x0003, 0x0658, 0x0014, 0x0803,
-	0x0003, 0x0051, 0x0003, 0xb659, 0x0005, 0x002a, 0x0000, 0x0004,
-	0x0000, 0xba30, 0x0005, 0x0031, 0x0010, 0x001b, 0x0015, 0x0033,
-	0x0000, 0xb009, 0x000b, 0x8661, 0x0000, 0xc02c, 0x0000, 0xb02d,
-	0x0012, 0x104b, 0x0013, 0x167c, 0x0000, 0x1a30, 0x0005, 0x0031,
-	0x0000, 0x0023, 0x0015, 0x0033, 0x0000, 0xb129, 0x000b, 0x866b,
-	0x0000, 0xb120, 0x0010, 0xb221, 0x0000, 0xb322, 0x0000, 0xb423,
-	0x0000, 0xb524, 0x0000, 0xc025, 0x0010, 0xb526, 0x0010, 0xc027,
-	0x0010, 0xb516, 0x0010, 0xc017, 0x0000, 0xb518, 0x0000, 0xc019,
-	0x0010, 0xc028, 0x0000, 0xc029, 0x0010, 0xc01e, 0x0013, 0x06b2,
-	0x0012, 0x1044, 0x0003, 0x16ac, 0x0002, 0x1034, 0x0000, 0xff10,
-	0x0000, 0x1a30, 0x0005, 0x0031, 0x0000, 0x0002, 0x0015, 0x0033,
-	0x0000, 0x1b29, 0x000b, 0x8685, 0x0000, 0x1c30, 0x0000, 0x1b31,
-	0x0015, 0x0033, 0x0000, 0xb131, 0x000b, 0x868a, 0x0002, 0x1f43,
-	0x000b, 0x1691, 0x0010, 0xb3b5, 0x0000, 0xb4b6, 0x0000, 0xc0b3,
-	0x0010, 0xc0b4, 0x0000, 0xb120, 0x0010, 0xb221, 0x0000, 0xb322,
-	0x0000, 0xb423, 0x0000, 0xb524, 0x0010, 0xb625, 0x0010, 0xb516,
-	0x0000, 0xb617, 0x0000, 0x1826, 0x0000, 0x1927, 0x0000, 0x1a30,
-	0x0005, 0x0031, 0x0010, 0x000f, 0x0015, 0x0033, 0x0000, 0xb011,
-	0x001b, 0x86a0, 0x0000, 0xb028, 0x0000, 0xb129, 0x0012, 0x1e10,
-	0x0010, 0xff1e, 0x0013, 0x66b2, 0x0002, 0x1d00, 0x0010, 0xff1d,
-	0x0014, 0x029a, 0x0002, 0x3a42, 0x0003, 0x16b2, 0x0003, 0x06ba,
-	0x0000, 0x1a30, 0x0005, 0x0031, 0x0000, 0x0002, 0x0015, 0x0033,
-	0x0000, 0x1b79, 0x001b, 0x86b1, 0x0003, 0xb6b2, 0x0005, 0x002a,
-	0x0000, 0x0001, 0x0005, 0x0015, 0x0000, 0x0001, 0x0000, 0x1efe,
-	0x0003, 0x66ba, 0x0003, 0x0266, 0x0017, 0x4000, 0x0000, 0xba30,
-	0x0005, 0x0031, 0x0010, 0x001b, 0x0015, 0x0033, 0x0010, 0xb051,
-	0x001b, 0x86c0, 0x0000, 0xb0a3, 0x0010, 0xb697, 0x0010, 0xb946,
-	0x0015, 0x00a5, 0x0000, 0x0010, 0x0015, 0x0030, 0x0000, 0x0400,
-	0x0011, 0x1388, 0x0000, 0x0002, 0x0000, 0xff31, 0x0015, 0x0033,
-	0x0000, 0xb509, 0x000b, 0x86cd, 0x0004, 0x07bc, 0x0004, 0x07ab,
-	0x0012, 0xb470, 0x0010, 0xffb4, 0x0010, 0xb48e, 0x0010, 0xb08a,
-	0x0010, 0xb18b, 0x0012, 0x104d, 0x0003, 0x16d8, 0x0003, 0x0705,
-	0x0012, 0x104b, 0x0003, 0x16eb, 0x0005, 0x008c, 0x0010, 0x0829,
-	0x0010, 0xc08d, 0x0001, 0xb2d8, 0x0010, 0x0600, 0x0010, 0xff88,
-	0x0010, 0xb389, 0x0000, 0x1390, 0x0010, 0xb591, 0x0000, 0xc08f,
-	0x0010, 0x1ab9, 0x0014, 0x04a5, 0x0003, 0x96e6, 0x0010, 0xb092,
-	0x0010, 0xb193, 0x0003, 0x96e9, 0x0003, 0x0700, 0x0005, 0x008c,
-	0x0000, 0x0809, 0x0015, 0x008d, 0x0000, 0x0008, 0x0001, 0xb2d8,
-	0x0000, 0x0100, 0x0010, 0xff88, 0x0010, 0xb389, 0x0000, 0x1390,
-	0x0010, 0xb591, 0x0000, 0xc08f, 0x0000, 0x1a30, 0x0005, 0x0031,
-	0x0010, 0x000f, 0x0015, 0x0033, 0x0000, 0xb011, 0x000b, 0x86fb,
-	0x0013, 0x96fc, 0x0000, 0xb192, 0x0000, 0xb093, 0x0013, 0x96ff,
-	0x0010, 0x19a1, 0x0000, 0x18a2, 0x0015, 0x00b1, 0x0010, 0x0096,
-	0x0013, 0x0776, 0x0000, 0xb590, 0x0010, 0x1391, 0x0001, 0x10c8,
-	0x0010, 0x000f, 0x0001, 0xffe8, 0x0010, 0x0005, 0x0003, 0x172c,
-	0x0001, 0xb2d8, 0x0000, 0x0700, 0x0010, 0xff88, 0x0010, 0xb389,
-	0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x1388, 0x0010, 0x0009,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009, 0x000b, 0x8717,
-	0x0002, 0xb049, 0x0003, 0x171f, 0x0005, 0x008c, 0x0010, 0x0889,
-	0x0015, 0x00b1, 0x0010, 0x0096, 0x0013, 0x0723, 0x0005, 0x008c,
-	0x0010, 0x0898, 0x0015, 0x00b1, 0x0000, 0x0092, 0x0010, 0xc08d,
-	0x0000, 0xc08f, 0x0013, 0x9725, 0x0000, 0xc092, 0x0010, 0xc093,
-	0x0003, 0x9728, 0x0010, 0x19a1, 0x0000, 0x18a2, 0x0013, 0x0776,
-	0x0001, 0xb2d8, 0x0000, 0x0100, 0x0010, 0xff88, 0x0010, 0xb389,
-	0x0005, 0x008c, 0x0010, 0x0880, 0x0015, 0x008d, 0x0000, 0x0008,
-	0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x1388, 0x0000, 0x000e,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x873b,
-	0x0010, 0xb08f, 0x0000, 0xb590, 0x0010, 0x1391, 0x0000, 0x1a30,
-	0x0005, 0x0031, 0x0000, 0x000d, 0x0015, 0x0033, 0x0000, 0xb021,
-	0x000b, 0x8744, 0x0013, 0x9745, 0x0010, 0xb392, 0x0010, 0xb293,
-	0x0003, 0x9748, 0x0000, 0xb1a1, 0x0010, 0xb0a2, 0x0015, 0x0030,
-	0x0000, 0x0400, 0x0011, 0x1388, 0x0000, 0x000b, 0x0000, 0xff31,
-	0x0015, 0x0033, 0x0010, 0xb211, 0x001b, 0x8752, 0x0000, 0xb3ff,
-	0x0001, 0xb080, 0x0000, 0xffb3, 0x000b, 0x2759, 0x0002, 0xb200,
-	0x0003, 0x075a, 0x0010, 0xb2ff, 0x0011, 0xb180, 0x0010, 0xffb2,
-	0x0011, 0x1388, 0x0000, 0x000b, 0x0000, 0xff31, 0x0015, 0x0033,
-	0x0010, 0xb212, 0x001b, 0x8761, 0x0015, 0x00b1, 0x0000, 0x0092,
-	0x0002, 0x104c, 0x0013, 0x1774, 0x0011, 0xc2e8, 0x0010, 0x000c,
-	0x000b, 0x176c, 0x0015, 0x00ff, 0x0000, 0x0800, 0x0003, 0x0774,
-	0x0011, 0xc2e8, 0x0000, 0x0020, 0x000b, 0x1772, 0x0015, 0x00ff,
-	0x0010, 0x1800, 0x0003, 0x0774, 0x0015, 0x00ff, 0x0000, 0x1000,
-	0x0011, 0xb1d0, 0x0010, 0xffb1, 0x0015, 0x009a, 0x0010, 0x0036,
-	0x0005, 0x009b, 0x0000, 0x95d5, 0x0012, 0xd041, 0x001b, 0x177a,
-	0x0015, 0x00d1, 0x0010, 0x0202, 0x0003, 0x977e, 0x0012, 0x104e,
-	0x0003, 0x1783, 0x0012, 0xb12f, 0x0010, 0xffb1, 0x0000, 0xb175,
-	0x0003, 0x9784, 0x0015, 0x00d1, 0x0000, 0x0200, 0x0001, 0x19c8,
-	0x0010, 0xfff0, 0x000b, 0x178d, 0x0015, 0x00b1, 0x0010, 0x07d0,
-	0x0013, 0x078f, 0x0015, 0x00b1, 0x0000, 0x1b58, 0x0005, 0x00b0,
-	0x0010, 0x0009, 0x0015, 0x0030, 0x0000, 0x0400, 0x0001, 0xbd88,
-	0x0000, 0x000b, 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb012,
-	0x001b, 0x8798, 0x0003, 0x0658, 0x0000, 0xba30, 0x0005, 0x0031,
-	0x0010, 0x0021, 0x0015, 0x0033, 0x0010, 0xb019, 0x000b, 0x879f,
-	0x0002, 0xb200, 0x0011, 0xffc8, 0x0010, 0x00ff, 0x0010, 0xffb2,
-	0x0010, 0xb2b7, 0x0005, 0x0031, 0x0000, 0x0023, 0x0015, 0x0033,
-	0x0010, 0xb20a, 0x000b, 0x87a9, 0x0017, 0x4000, 0x0000, 0xba30,
-	0x0005, 0x0031, 0x0000, 0x0023, 0x0015, 0x0033, 0x0010, 0xb409,
-	0x001b, 0x87b0, 0x0002, 0xb400, 0x0011, 0xffc8, 0x0010, 0x00ff,
-	0x0010, 0xffb4, 0x0010, 0xb4b7, 0x0005, 0x0031, 0x0000, 0x0023,
-	0x0015, 0x0033, 0x0010, 0xb40a, 0x001b, 0x87ba, 0x0017, 0x4000,
-	0x0000, 0xba30, 0x0001, 0xc7c8, 0x0000, 0x0020, 0x001b, 0x17c8,
-	0x0005, 0x0031, 0x0010, 0x0028, 0x0015, 0x0033, 0x0010, 0xb209,
-	0x001b, 0x87c4, 0x0011, 0xb2c8, 0x0000, 0xff80, 0x0003, 0x17cb,
-	0x0010, 0xc4b0, 0x0010, 0xc5b1, 0x0013, 0x07cd, 0x0010, 0xc6b1,
-	0x0000, 0xc0b0, 0x0005, 0x0031, 0x0000, 0x0004, 0x0015, 0x0033,
-	0x0010, 0xb211, 0x000b, 0x87d1, 0x0017, 0x4000, 0x0015, 0x00b8,
-	0x0010, 0x0009, 0x0015, 0x003a, 0x0010, 0x0707, 0x0014, 0x0817,
-	0x0013, 0x002d, 0x0015, 0x00b8, 0x0010, 0x0009, 0x0015, 0x003a,
-	0x0010, 0x0707, 0x0003, 0x0817, 0x0004, 0x0110, 0x0015, 0x0030,
-	0x0000, 0x0400, 0x0011, 0x0d88, 0x0000, 0x0004, 0x0000, 0xff31,
-	0x0015, 0x0033, 0x0000, 0xba09, 0x001b, 0x87e6, 0x0014, 0x079a,
-	0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88, 0x0000, 0x0010,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0xb20a, 0x001b, 0x87ef,
-	0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88, 0x0010, 0x0011,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0x0309, 0x001b, 0x87f7,
-	0x0002, 0x0327, 0x0010, 0xffb2, 0x0011, 0x0d88, 0x0010, 0x0011,
-	0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0xb20a, 0x000b, 0x87ff,
-	0x0015, 0x00b8, 0x0010, 0x0006, 0x0003, 0x0817, 0x0014, 0x0122,
-	0x0014, 0x079a, 0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x1388,
-	0x0000, 0x0010, 0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0xb20a,
-	0x000b, 0x880c, 0x0012, 0x1027, 0x0010, 0xffb2, 0x0011, 0x1388,
-	0x0010, 0x0011, 0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0xb20a,
-	0x000b, 0x8814, 0x0015, 0x00b8, 0x0000, 0x0007, 0x0013, 0x4817,
-	0x0000, 0xb838, 0x0017, 0x4000, 0xa595, 0x1d35
-};
-unsigned short xseqflx_code_length01 = 0x1036;
diff -Nru a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
--- a/drivers/scsi/qla2xxx/qla_def.h	2005-01-10 20:11:19 -08:00
+++ b/drivers/scsi/qla2xxx/qla_def.h	2005-01-10 20:11:19 -08:00
@@ -89,13 +89,9 @@
 
 #if defined(CONFIG_SCSI_QLA6312) || defined(CONFIG_SCSI_QLA6312_MODULE)
 #define IS_QLA6312(ha)	((ha)->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP6312)
-#else
-#define IS_QLA6312(ha)	0
-#endif
-
-#if defined(CONFIG_SCSI_QLA6322) || defined(CONFIG_SCSI_QLA6322_MODULE)
 #define IS_QLA6322(ha)	((ha)->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP6322)
 #else
+#define IS_QLA6312(ha)	0
 #define IS_QLA6322(ha)	0
 #endif
 
@@ -346,6 +342,8 @@
 	volatile uint16_t nvram;	/* NVRAM register. */
 #define NVR_DESELECT		0
 #define NVR_BUSY		BIT_15
+#define NVR_WRT_ENABLE		BIT_14	/* Write enable */
+#define NVR_PR_ENABLE		BIT_13	/* Protection register enable */
 #define NVR_DATA_IN		BIT_3
 #define NVR_DATA_OUT		BIT_2
 #define NVR_SELECT		BIT_1
@@ -1026,9 +1024,27 @@
 	uint8_t	 special_options[2];
 
 	/* Reserved for expanded RISC parameter block */
-	uint8_t reserved_2[24];
+	uint8_t reserved_2[22];
 
 	/*
+	 * LSB BIT 0 = Tx Sensitivity 1G bit 0
+	 * LSB BIT 1 = Tx Sensitivity 1G bit 1
+	 * LSB BIT 2 = Tx Sensitivity 1G bit 2
+	 * LSB BIT 3 = Tx Sensitivity 1G bit 3
+	 * LSB BIT 4 = Rx Sensitivity 1G bit 0
+	 * LSB BIT 5 = Rx Sensitivity 1G bit 1
+	 * LSB BIT 6 = Rx Sensitivity 1G bit 2
+	 * LSB BIT 7 = Rx Sensitivity 1G bit 3
+	 *            
+	 * MSB BIT 0 = Tx Sensitivity 2G bit 0
+	 * MSB BIT 1 = Tx Sensitivity 2G bit 1
+	 * MSB BIT 2 = Tx Sensitivity 2G bit 2
+	 * MSB BIT 3 = Tx Sensitivity 2G bit 3
+	 * MSB BIT 4 = Rx Sensitivity 2G bit 0
+	 * MSB BIT 5 = Rx Sensitivity 2G bit 1
+	 * MSB BIT 6 = Rx Sensitivity 2G bit 2
+	 * MSB BIT 7 = Rx Sensitivity 2G bit 3
+	 *
 	 * LSB BIT 0 = Output Swing 1G bit 0
 	 * LSB BIT 1 = Output Swing 1G bit 1
 	 * LSB BIT 2 = Output Swing 1G bit 2
@@ -1047,7 +1063,7 @@
 	 * MSB BIT 6 =
 	 * MSB BIT 7 =
 	 */
-	uint8_t seriallink_options[2];
+	uint8_t seriallink_options[4];
 
 	/*
 	 * NVRAM host parameter block
@@ -1083,13 +1099,13 @@
 	uint8_t alternate_node_name[WWN_SIZE];
 
 	/*
-	 * BIT 0 = Boot Zoning
+	 * BIT 0 = Selective Login
 	 * BIT 1 = Alt-Boot Enable
-	 * BIT 2 = Report SCSI Path
-	 * BIT 3 = unused
-	 * BIT 4 = unused
-	 * BIT 5 = unused
-	 * BIT 6 = unused
+	 * BIT 2 =
+	 * BIT 3 = Boot Order List
+	 * BIT 4 =
+	 * BIT 5 = Selective LUN
+	 * BIT 6 =
 	 * BIT 7 = unused
 	 */
 	uint8_t efi_parameters;
@@ -1359,6 +1375,7 @@
 /*
  * Status entry status flags
  */
+#define SF_ABTS_TERMINATED	BIT_10
 #define SF_LOGOUT_SENT		BIT_13
 
 /*
@@ -1617,6 +1634,7 @@
     	spinlock_t q_lock;		/* Lun Lock */
 
 	unsigned long q_flag;
+#define LUN_MPIO_RESET_CNTS	1	/* Lun */
 #define LUN_MPIO_BUSY		2	/* Lun is changing paths  */
 #define LUN_EXEC_DELAYED	7	/* Lun execution is delayed */
 
@@ -1739,6 +1757,8 @@
 #define FCF_MSA_PORT_ACTIVE	BIT_20
 #define FCF_FAILBACK_DISABLE	BIT_21
 #define FCF_FAILOVER_DISABLE	BIT_22
+#define FCF_DSXXX_DEVICE	BIT_23
+#define FCF_AA_EVA_DEVICE	BIT_24
 
 /* No loop ID flag. */
 #define FC_NO_LOOP_ID		0x1000
@@ -2070,6 +2090,7 @@
 		uint32_t	enable_lip_reset	:1;
 		uint32_t	enable_lip_full_login	:1;
 		uint32_t	enable_target_reset	:1;
+		uint32_t	enable_led_scheme	:1;
 	} flags;
 
 	atomic_t	loop_state;
@@ -2105,6 +2126,7 @@
 #define FCPORT_RESCAN_NEEDED	21      /* IO descriptor processing needed */
 #define IODESC_PROCESS_NEEDED	22      /* IO descriptor processing needed */
 #define IOCTL_ERROR_RECOVERY	23      
+#define LOOP_RESET_NEEDED	24
 
 	uint32_t	device_flags;
 #define DFLG_LOCAL_DEVICES		BIT_0
@@ -2347,7 +2369,7 @@
 	uint32_t	fw_transfer_size;
 
 	uint16_t	fw_options[16];		/* slots: 1,2,3,10,11 */
-	uint8_t		fw_seriallink_options[2];
+	uint8_t		fw_seriallink_options[4];
 
 	/* Firmware dump information. */
 	void		*fw_dump;
diff -Nru a/drivers/scsi/qla2xxx/qla_devtbl.h b/drivers/scsi/qla2xxx/qla_devtbl.h
--- a/drivers/scsi/qla2xxx/qla_devtbl.h	2005-01-10 20:11:20 -08:00
+++ b/drivers/scsi/qla2xxx/qla_devtbl.h	2005-01-10 20:11:20 -08:00
@@ -1,9 +1,9 @@
-#define QLA_MODEL_NAMES         0x21
+#define QLA_MODEL_NAMES         0x32
 
 /*
  * Adapter model names.
  */
-char	*qla2x00_model_name[QLA_MODEL_NAMES] = {
+static char *qla2x00_model_name[QLA_MODEL_NAMES] = {
 	"QLA2340",	/* 0x100 */
 	"QLA2342",	/* 0x101 */
 	"QLA2344",	/* 0x102 */
@@ -19,27 +19,44 @@
 	"QLA2350",	/* 0x10c */
 	"QLA2352",	/* 0x10d */
 	"QLA2352",	/* 0x10e */
-	"HPQSVS ",	/* 0x10f */
-	"HPQSVS ",	/* 0x110 */
-	"QLA4010",	/* 0x111 */
-	"QLA4010",	/* 0x112 */
-	"QLA4010C",	/* 0x113 */
-	"QLA4010C",	/* 0x114 */
+	"HPQ SVS",	/* 0x10f */
+	"HPQ SVS",	/* 0x110 */
+	" ",		/* 0x111 */
+	" ",		/* 0x112 */
+	" ",		/* 0x113 */
+	" ",		/* 0x114 */
 	"QLA2360",	/* 0x115 */
 	"QLA2362",	/* 0x116 */
-	" ",		/* 0x117 */
-	" ",		/* 0x118 */
+	"QLE2360",	/* 0x117 */
+	"QLE2362",	/* 0x118 */
 	"QLA200",	/* 0x119 */
-	"QLA200C"	/* 0x11A */
-	"QLA200P"	/* 0x11B */
-	"QLA200P"	/* 0x11C */
-	"QLA4040"	/* 0x11D */
-	"QLA4040"	/* 0x11E */
-	"QLA4040C"	/* 0x11F */
-	"QLA4040C"	/* 0x120 */
+	"QLA200C",	/* 0x11a */
+	"QLA200P",	/* 0x11b */
+	"QLA200P",	/* 0x11c */
+	" ",		/* 0x11d */
+	" ",		/* 0x11e */
+	" ",		/* 0x11f */
+	" ",		/* 0x120 */
+	" ",		/* 0x121 */
+	" ",		/* 0x122 */
+	" ",		/* 0x123 */
+	" ",		/* 0x124 */
+	" ",		/* 0x125 */
+	" ",		/* 0x126 */
+	" ",		/* 0x127 */
+	" ",		/* 0x128 */
+	" ",		/* 0x129 */
+	" ",		/* 0x12a */
+	" ",		/* 0x12b */
+	" ",		/* 0x12c */
+	" ",		/* 0x12d */
+	" ",		/* 0x12e */
+	"QLA210",	/* 0x12f */
+	"EMC 250",	/* 0x130 */
+	"HP A7538A"	/* 0x131 */
 };
 
-char	*qla2x00_model_desc[QLA_MODEL_NAMES] = {
+static char *qla2x00_model_desc[QLA_MODEL_NAMES] = {
 	"133MHz PCI-X to 2Gb FC, Single Channel",	/* 0x100 */
 	"133MHz PCI-X to 2Gb FC, Dual Channel",		/* 0x101 */
 	"133MHz PCI-X to 2Gb FC, Quad Channel",		/* 0x102 */
@@ -57,20 +74,37 @@
 	" ",						/* 0x10e */
 	"HPQ SVS HBA- Initiator device",		/* 0x10f */
 	"HPQ SVS HBA- Target device",			/* 0x110 */
-	"Optical- 133MHz to 1Gb iSCSI- networking",	/* 0x111 */
-	"Optical- 133MHz to 1Gb iSCSI- storage",	/* 0x112 */
-	"Copper- 133MHz to 1Gb iSCSI- networking",	/* 0x113 */
-	"Copper- 133MHz to 1Gb iSCSI- storage",		/* 0x114 */
+	" ",						/* 0x111 */
+	" ",						/* 0x112 */
+	" ",						/* 0x113 */
+	" ",						/* 0x114 */
 	"133MHz PCI-X to 2Gb FC Single Channel",	/* 0x115 */
 	"133MHz PCI-X to 2Gb FC Dual Channel",		/* 0x116 */
-	" ",						/* 0x117 */
-	" ",						/* 0x118 */
+	"PCI-Express to 2Gb FC, Single Channel",	/* 0x117 */
+	"PCI-Express to 2Gb FC, Dual Channel",		/* 0x118 */
 	"133MHz PCI-X to 2Gb FC Optical",		/* 0x119 */
-	"133MHz PCI-X to 2Gb FC Copper"			/* 0x11A */
-	"133MHz PCI-X to 2Gb FC SFP"			/* 0x11B */
-	"133MHz PCI-X to 2Gb FC SFP"			/* 0x11C */
-	"Optical- 133MHz to 1Gb NIC with IPSEC",	/* 0x11D */
-	"Optical- 133MHz to 1Gb iSCSI with IPSEC",	/* 0x11E */
-	"Copper- 133MHz to 1Gb NIC with IPSEC",		/* 0x11F */
-	"Copper- 133MHz to 1Gb iSCSI with IPSEC",	/* 0x120 */
+	"133MHz PCI-X to 2Gb FC Copper",		/* 0x11a */
+	"133MHz PCI-X to 2Gb FC SFP",			/* 0x11b */
+	"133MHz PCI-X to 2Gb FC SFP",			/* 0x11c */
+	" ",						/* 0x11d */
+	" ",						/* 0x11e */
+	" ",						/* 0x11f */
+	" ",						/* 0x120 */
+	" ",						/* 0x121 */
+	" ",						/* 0x122 */
+	" ",						/* 0x123 */
+	" ",						/* 0x124 */
+	" ",						/* 0x125 */
+	" ",						/* 0x126 */
+	" ",						/* 0x127 */
+	" ",						/* 0x128 */
+	" ",						/* 0x129 */
+	" ",						/* 0x12a */
+	" ",						/* 0x12b */
+	" ",						/* 0x12c */
+	" ",						/* 0x12d */
+	" ",						/* 0x12e */
+	"133MHz PCI-X to 2Gb FC SFF",			/* 0x12f */
+	"133MHz PCI-X to 2Gb FC SFF",			/* 0x130 */
+	"HP 1p2g QLA2340"				/* 0x131 */
 };
diff -Nru a/drivers/scsi/qla2xxx/qla_gbl.h b/drivers/scsi/qla2xxx/qla_gbl.h
--- a/drivers/scsi/qla2xxx/qla_gbl.h	2005-01-10 20:11:23 -08:00
+++ b/drivers/scsi/qla2xxx/qla_gbl.h	2005-01-10 20:11:23 -08:00
@@ -45,12 +45,9 @@
 extern void qla2x00_rescan_fcports(scsi_qla_host_t *);
 
 extern void qla2x00_tgt_free(scsi_qla_host_t *ha, uint16_t t);
-extern os_tgt_t *qla2x00_tgt_alloc(scsi_qla_host_t *, uint16_t);
-extern os_lun_t * qla2x00_lun_alloc(scsi_qla_host_t *, uint16_t, uint16_t);
 
 extern int qla2x00_abort_isp(scsi_qla_host_t *);
 
-
 /*
  * Global Data in qla_os.c source file.
  */
@@ -82,9 +79,6 @@
 
 extern void qla2x00_cmd_timeout(srb_t *);
 
-extern int qla2x00_queuecommand(struct scsi_cmnd *,
-    void (*)(struct scsi_cmnd *));
-
 extern int __qla2x00_suspend_lun(scsi_qla_host_t *, os_lun_t *, int, int, int);
 
 extern void qla2x00_done(scsi_qla_host_t *);
@@ -92,17 +86,11 @@
 extern void qla2x00_flush_failover_q(scsi_qla_host_t *, os_lun_t *);
 extern void qla2x00_reset_lun_fo_counts(scsi_qla_host_t *, os_lun_t *);
 
-extern int qla2x00_check_tgt_status(scsi_qla_host_t *, struct scsi_cmnd *);
-extern int qla2x00_check_port_status(scsi_qla_host_t *, fc_port_t *);
-
 extern void qla2x00_extend_timeout(struct scsi_cmnd *, int);
-extern srb_t * qla2x00_get_new_sp (scsi_qla_host_t *ha);
 
 extern void qla2x00_mark_device_lost(scsi_qla_host_t *, fc_port_t *, int);
 extern void qla2x00_mark_all_devices_lost(scsi_qla_host_t *);
 
-extern int qla2x00_get_prop_xstr(scsi_qla_host_t *, char *, uint8_t *, int);
-
 extern void qla2x00_abort_queues(scsi_qla_host_t *, uint8_t);
 
 extern void qla2x00_blink_led(scsi_qla_host_t *);
@@ -112,8 +100,6 @@
 /*
  * Global Function Prototypes in qla_iocb.c source file.
  */
-extern request_t *qla2x00_req_pkt(scsi_qla_host_t *);
-extern request_t *qla2x00_ms_req_pkt(scsi_qla_host_t *, srb_t *);
 extern void qla2x00_isp_cmd(scsi_qla_host_t *);
 
 extern uint16_t qla2x00_calc_iocbs_32(uint16_t);
@@ -128,9 +114,6 @@
  * Global Function Prototypes in qla_mbx.c source file.
  */
 extern int
-qla2x00_mailbox_command(scsi_qla_host_t *, mbx_cmd_t *);
-
-extern int
 qla2x00_load_ram(scsi_qla_host_t *, dma_addr_t, uint16_t, uint16_t);
 
 extern int
@@ -150,13 +133,6 @@
 qla2x00_set_fw_options(scsi_qla_host_t *, uint16_t *);
 
 extern int
-qla2x00_read_ram_word(scsi_qla_host_t *, uint16_t, uint16_t *);
-extern int
-qla2x00_write_ram_word(scsi_qla_host_t *, uint16_t, uint16_t);
-extern int
-qla2x00_write_ram_word_ext(scsi_qla_host_t *, uint32_t, uint16_t);
-
-extern int
 qla2x00_mbx_reg_test(scsi_qla_host_t *);
 
 extern int
@@ -168,9 +144,6 @@
 extern int
 qla2x00_abort_command(scsi_qla_host_t *, srb_t *);
 
-extern int
-qla2x00_abort_device(scsi_qla_host_t *, uint16_t, uint16_t);
-
 #if USE_ABORT_TGT
 extern int
 qla2x00_abort_target(fc_port_t *fcport);
@@ -198,9 +171,6 @@
 extern int
 qla2x00_get_port_name(scsi_qla_host_t *, uint16_t, uint8_t *, uint8_t);
 
-extern uint8_t
-qla2x00_get_link_status(scsi_qla_host_t *, uint16_t, link_stat_t *, uint16_t *);
-
 extern int
 qla2x00_lip_reset(scsi_qla_host_t *);
 
@@ -224,19 +194,6 @@
 qla2x00_get_id_list(scsi_qla_host_t *, void *, dma_addr_t, uint16_t *);
 
 extern int
-qla2x00_lun_reset(scsi_qla_host_t *, uint16_t, uint16_t);
-
-extern int
-qla2x00_send_rnid_mbx(scsi_qla_host_t *, uint16_t, uint8_t, dma_addr_t,
-    size_t, uint16_t *);
-
-extern int
-qla2x00_set_rnid_params_mbx(scsi_qla_host_t *, dma_addr_t, size_t, uint16_t *);
-
-extern int
-qla2x00_get_rnid_params_mbx(scsi_qla_host_t *, dma_addr_t, size_t, uint16_t *);
-
-extern int
 qla2x00_get_resource_cnts(scsi_qla_host_t *, uint16_t *, uint16_t *, uint16_t *,
     uint16_t *);
 
@@ -255,6 +212,7 @@
  */
 extern void qla2x00_lock_nvram_access(scsi_qla_host_t *);
 extern void qla2x00_unlock_nvram_access(scsi_qla_host_t *);
+extern void qla2x00_release_nvram_protection(scsi_qla_host_t *);
 extern uint16_t qla2x00_get_nvram_word(scsi_qla_host_t *, uint32_t);
 extern void qla2x00_write_nvram_word(scsi_qla_host_t *, uint32_t, uint16_t);
 /*
diff -Nru a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
--- a/drivers/scsi/qla2xxx/qla_init.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/scsi/qla2xxx/qla_init.c	2005-01-10 20:11:22 -08:00
@@ -68,23 +68,10 @@
     fc_lun_t *);
 static void qla2x00_lun_free(scsi_qla_host_t *, uint16_t, uint16_t);
 
-static int qla2x00_bstr_to_hex(char *, uint8_t *, int);
-static int qla2x00_find_propname(scsi_qla_host_t *,
-    char *, char *, char *, int);
-#if 0
-static void qla2x00_get_lun_mask_from_config(scsi_qla_host_t *, fc_port_t *,
-    uint16_t, uint16_t);
-static int qla2x00_get_prop_16chars(scsi_qla_host_t *,
-    char *, char *, char *);
-static void qla2x00_get_properties(scsi_qla_host_t *, char *);
-
-static void qla2x00_cfg_persistent_binding(scsi_qla_host_t *);
-static os_tgt_t *qla2x00_persistent_bind(scsi_qla_host_t *, uint8_t *,
-    uint8_t *, port_id_t *, uint16_t);
-#endif
-
 static int qla2x00_restart_isp(scsi_qla_host_t *);
 static void qla2x00_reset_adapter(scsi_qla_host_t *);
+static os_tgt_t *qla2x00_tgt_alloc(scsi_qla_host_t *, uint16_t);
+static os_lun_t *qla2x00_lun_alloc(scsi_qla_host_t *, uint16_t, uint16_t);
 
 /****************************************************************************/
 /*                QLogic ISP2x00 Hardware Support Functions.                */
@@ -140,18 +127,6 @@
 
 	qla_printk(KERN_INFO, ha, "Verifying loaded RISC code...\n");
 
-#if 0
-	/*
-	 * If the user specified a device configuration on the command line
-	 * then use it as the configuration.  Otherwise, we scan for all
-	 * devices.
-	 */
-	if (ql2xdevconf) {
-		ha->cmdline = ql2xdevconf;
-		qla2x00_get_properties(ha, ql2xdevconf);
-	}
-#endif
-
 	retry = 10;
 	/*
 	 * Try to configure the loop.
@@ -853,7 +828,7 @@
 static void
 qla2x00_update_fw_options(scsi_qla_host_t *ha)
 {
-	uint16_t swing, emphasis;
+	uint16_t swing, emphasis, tx_sens, rx_sens;
 
 	memset(ha->fw_options, 0, sizeof(ha->fw_options));
 	qla2x00_get_fw_options(ha, ha->fw_options);
@@ -868,24 +843,54 @@
 	    sizeof(ha->fw_seriallink_options)));
 
 	ha->fw_options[1] &= ~FO1_SET_EMPHASIS_SWING;
-	if (ha->fw_seriallink_options[1] & BIT_2)
+	if (ha->fw_seriallink_options[3] & BIT_2) {
 		ha->fw_options[1] |= FO1_SET_EMPHASIS_SWING;
 
-	/*  1G settings */
-	swing = ha->fw_seriallink_options[0] & (BIT_2 | BIT_1 | BIT_0);
-	emphasis = ha->fw_seriallink_options[0] & (BIT_4 | BIT_3);
-	emphasis >>= 3;
-	ha->fw_options[10] = (emphasis << 14) | (swing << 8) | 0x3;
-	/*  2G settings */
-	swing = ha->fw_seriallink_options[0] & (BIT_7 | BIT_6 | BIT_5);
-	swing >>= 5;
-	emphasis = ha->fw_seriallink_options[1] & (BIT_1 | BIT_0);
-	ha->fw_options[11] = (emphasis << 14) | (swing << 8) | 0x3;
+		/*  1G settings */
+		swing = ha->fw_seriallink_options[2] & (BIT_2 | BIT_1 | BIT_0);
+		emphasis = (ha->fw_seriallink_options[2] &
+		    (BIT_4 | BIT_3)) >> 3;
+		tx_sens = ha->fw_seriallink_options[0] &
+		    (BIT_3 | BIT_2 | BIT_1 | BIT_0); 
+		rx_sens = (ha->fw_seriallink_options[0] &
+		    (BIT_7 | BIT_6 | BIT_5 | BIT_4)) >> 4;
+		ha->fw_options[10] = (emphasis << 14) | (swing << 8);
+		if (IS_QLA2300(ha) || IS_QLA2312(ha) || IS_QLA6312(ha)) {
+			if (rx_sens == 0x0)
+				rx_sens = 0x3;
+			ha->fw_options[10] |= (tx_sens << 4) | rx_sens;
+		} else if (IS_QLA2322(ha) || IS_QLA6322(ha))
+			ha->fw_options[10] |= BIT_5 |
+			    ((rx_sens & (BIT_1 | BIT_0)) << 2) |
+			    (tx_sens & (BIT_1 | BIT_0));
+
+		/*  2G settings */
+		swing = (ha->fw_seriallink_options[2] &
+		    (BIT_7 | BIT_6 | BIT_5)) >> 5;
+		emphasis = ha->fw_seriallink_options[3] & (BIT_1 | BIT_0);
+		tx_sens = ha->fw_seriallink_options[1] &
+		    (BIT_3 | BIT_2 | BIT_1 | BIT_0); 
+		rx_sens = (ha->fw_seriallink_options[1] &
+		    (BIT_7 | BIT_6 | BIT_5 | BIT_4)) >> 4;
+		ha->fw_options[11] = (emphasis << 14) | (swing << 8);
+		if (IS_QLA2300(ha) || IS_QLA2312(ha) || IS_QLA6312(ha)) {
+			if (rx_sens == 0x0)
+				rx_sens = 0x3;
+			ha->fw_options[11] |= (tx_sens << 4) | rx_sens;
+		} else if (IS_QLA2322(ha) || IS_QLA6322(ha))
+			ha->fw_options[11] |= BIT_5 |
+			    ((rx_sens & (BIT_1 | BIT_0)) << 2) |
+			    (tx_sens & (BIT_1 | BIT_0));
+	}
 
 	/* FCP2 options. */
 	/*  Return command IOCBs without waiting for an ABTS to complete. */
 	ha->fw_options[3] |= BIT_13;
 
+	/* LED scheme. */
+	if (ha->flags.enable_led_scheme)
+		ha->fw_options[2] |= BIT_12;
+
 	/* Update firmware options. */
 	qla2x00_set_fw_options(ha, ha->fw_options);
 }
@@ -1094,6 +1099,7 @@
 	if (rval != QLA_SUCCESS) {
 		qla_printk(KERN_WARNING, ha,
 		    "ERROR -- Unable to get host loop ID.\n");
+		set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags);
 		return (rval);
 	}
 
@@ -1394,12 +1400,13 @@
 	ha->flags.enable_lip_reset = ((nv->host_p[1] & BIT_1) ? 1 : 0);
 	ha->flags.enable_lip_full_login = ((nv->host_p[1] & BIT_2) ? 1 : 0);
 	ha->flags.enable_target_reset = ((nv->host_p[1] & BIT_3) ? 1 : 0);
+	ha->flags.enable_led_scheme = ((nv->efi_parameters & BIT_3) ? 1 : 0);
 
 	ha->operating_mode =
 	    (icb->add_firmware_options[0] & (BIT_6 | BIT_5 | BIT_4)) >> 4;
 
-	ha->fw_seriallink_options[0] = nv->seriallink_options[0];
-	ha->fw_seriallink_options[1] = nv->seriallink_options[1];
+	memcpy(ha->fw_seriallink_options, nv->seriallink_options,
+	    sizeof(ha->fw_seriallink_options));
 
 	/* save HBA serial number */
 	ha->serial0 = icb->port_name[5];
@@ -1947,6 +1954,9 @@
 		return;
 	}
 
+	/* Always add a fc_lun_t structure for lun 0 -- mid-layer requirement */
+	qla2x00_add_lun(fcport, 0);
+
 	/* If report LUN works, exit. */
 	if (qla2x00_rpt_lun_discovery(ha, fcport, inq, inq_dma) !=
 	    QLA_SUCCESS) {
@@ -1992,9 +2002,6 @@
 	if (rval != QLA_SUCCESS)
 		return (rval);
 
-	/* Always add a fc_lun_t structure for lun 0 -- mid-layer requirement */
-	qla2x00_add_lun(fcport, 0);
-
 	/* Configure LUN list. */
 	len = be32_to_cpu(ha->rlc_rsp->list.hdr.len);
 	len /= 8;
@@ -2130,6 +2137,7 @@
     inq_cmd_rsp_t *inq, dma_addr_t inq_dma) 
 {
 	fc_lun_t *fclun;
+	uint8_t	  device_type;
 
 	/* Bypass LUNs that failed. */
 	if (qla2x00_inquiry(ha, fcport, lun, inq, inq_dma) != QLA_SUCCESS) {
@@ -2138,8 +2146,8 @@
 
 		return (NULL);
 	}
-
-	switch (inq->inq[0]) {
+	device_type = (inq->inq[0] & 0x1f);
+	switch (device_type) {
 	case TYPE_DISK:
 	case TYPE_PROCESSOR:
 	case TYPE_WORM:
@@ -2157,11 +2165,11 @@
 	default:
 		DEBUG2(printk("scsi(%ld): Unsupported lun type -- "
 		    "loop id=0x%04x lun=%d type=%x\n",
-		    ha->host_no, fcport->loop_id, lun, inq->inq[0]));
+		    ha->host_no, fcport->loop_id, lun, device_type));
 		return (NULL);
 	}
 
-	fcport->device_type = inq->inq[0];
+	fcport->device_type = device_type;
 	fclun = qla2x00_add_lun(fcport, lun);
 
 	if (fclun != NULL) {
@@ -2520,7 +2528,7 @@
 {
 	int		rval;
 	uint16_t	loop_id;
-	fc_port_t	*fcport, *new_fcport;
+	fc_port_t	*fcport, *new_fcport, *fcptemp;
 	int		found;
 
 	sw_info_t	*swl;
@@ -2594,6 +2602,15 @@
 			/* Send GA_NXT to the switch */
 			rval = qla2x00_ga_nxt(ha, new_fcport);
 			if (rval != QLA_SUCCESS) {
+				qla_printk(KERN_WARNING, ha,
+				    "SNS scan failed -- assuming zero-entry "
+				    "result...\n");
+				list_for_each_entry_safe(fcport, fcptemp,
+				    new_fcports, list) {
+					list_del(&fcport->list);
+					kfree(fcport);
+				}
+				rval = QLA_SUCCESS;
 				break;
 			}
 		}
@@ -3024,9 +3041,9 @@
 			 */
 			*next_loopid = fcport->loop_id;
 			qla2x00_fabric_logout(ha, fcport->loop_id);
-			fcport->loop_id = FC_NO_LOOP_ID;
+			qla2x00_mark_device_lost(ha, fcport, 1);
 
-			rval = 3;
+			rval = 1;
 			break;
 		} else {
 			/*
@@ -3043,7 +3060,7 @@
 			fcport->loop_id = FC_NO_LOOP_ID;
 			atomic_set(&fcport->state, FCS_DEVICE_DEAD);
 
-			rval = 1;
+			rval = 3;
 			break;
 		}
 	}
@@ -3391,10 +3408,6 @@
 		tq->fcport = fcport;
 		set_bit(TQF_ONLINE, &tq->flags);
 		tq->port_down_retry_count = ha->port_down_retry_count;
-
-#if 0
-		qla2x00_get_lun_mask_from_config(ha, fcport, tgt, 0);
-#endif
 	}
 
 	if (tgt == MAX_TARGETS) {
@@ -3467,7 +3480,7 @@
  * Context:
  *	Kernel context.
  */
-os_tgt_t *
+static os_tgt_t *
 qla2x00_tgt_alloc(scsi_qla_host_t *ha, uint16_t tgt) 
 {
 	os_tgt_t	*tq;
@@ -3561,7 +3574,7 @@
  * Context:
  *	Kernel context.
  */
-os_lun_t *
+static os_lun_t *
 qla2x00_lun_alloc(scsi_qla_host_t *ha, uint16_t tgt, uint16_t lun) 
 {
 	os_lun_t	*lq;
@@ -3583,7 +3596,7 @@
 			DEBUG2(printk("scsi(%ld): Alloc Lun %d @ tgt %d.\n",
 			    ha->host_no, lun, tgt));
 
-			memset(lq, 0, sizeof (os_lun_t));
+			memset(lq, 0, sizeof(os_lun_t));
 			LUN_Q(ha, tgt, lun) = lq;
 
 			/*
@@ -3636,482 +3649,6 @@
 
 	return;
 }
-
-
-#if 0
-/*
- * qla2x00_get_lun_mask_from_config
- *      Get lun mask from the configuration parameters.
- *      Bit order is little endian.
- *
- * Input:
- * ha  -- Host adapter
- * tgt  -- target/device number
- * port -- pointer to port
- */
-static void
-qla2x00_get_lun_mask_from_config(scsi_qla_host_t *ha,
-    fc_port_t *fcport, uint16_t tgt, uint16_t dev_no) 
-{
-	char		propbuf[60]; /* size of search string */
-	int		rval, lun, bit;
-	lun_bit_mask_t	lun_mask, *mask_ptr = &lun_mask;
-
-	/* Get "target-N-device-N-lun-mask" as a 256 bit lun_mask*/
-	sprintf(propbuf, "scsi-qla%ld-tgt-%d-di-%d-lun-disabled",
-	    ha->instance, tgt, dev_no);
-
-	rval = qla2x00_get_prop_xstr(ha, propbuf,
-	    (uint8_t *)&lun_mask, sizeof(lun_bit_mask_t));
-	if (rval == sizeof(lun_bit_mask_t)) {
-		memset(&fcport->lun_mask, 0, sizeof(lun_bit_mask_t));
-		for (lun = 8 * sizeof(lun_bit_mask_t) - 1, bit = 0;
-		    lun >= 0; lun--, bit++) {
-			if (EXT_IS_LUN_BIT_SET(mask_ptr, lun))
-				EXT_SET_LUN_BIT((&fcport->lun_mask), bit);
-		}
-
-		DEBUG3(printk("scsi(%ld): returning lun mask for fcport "
-		    "%02x%02x%02x%02x%02x%02x%02x%02x:\n",
-		    ha->host_no,
-		    fcport->port_name[0], fcport->port_name[1],
-		    fcport->port_name[2], fcport->port_name[3],
-		    fcport->port_name[4], fcport->port_name[5],
-		    fcport->port_name[6], fcport->port_name[7]));
-		DEBUG3(qla2x00_dump_buffer((uint8_t *)&fcport->lun_mask,
-		    sizeof(lun_bit_mask_t));)
-	}
-}
-#endif
-
-/*
- * qla2x00_bstr_to_hex
- *	Convert hex byte string to number.
- *
- * Input:
- *	s = byte string pointer.
- *	bp = byte pointer for number.
- *	size = number of bytes.
- *
- * Context:
- *	Kernel/Interrupt context.
- */
-static int
-qla2x00_bstr_to_hex(char *s, uint8_t *bp, int size) 
-{
-	int		cnt;
-	uint8_t		n;
-
-	for (cnt = 0; *s != '\0' && cnt / 2 < size; cnt++) {
-		if (*s >= 'A' && *s <= 'F') {
-			n = (*s++ - 'A') + 10;
-		} else if (*s >= 'a' && *s <= 'f') {
-			n = (*s++ - 'a') + 10;
-		} else if (*s >= '0' && *s <= '9') {
-			n = *s++ - '0';
-		} else {
-			cnt = 0;
-			break;
-		}
-
-		if (cnt & BIT_0)
-			*bp++ |= n;
-		else
-			*bp = n << 4;
-	}
-
-	/* fixme(dg) Need to swap data little endian */
-
-	return (cnt / 2);
-}
-
-/*
- * qla2x00_get_prop_xstr
- *      Get a string property value for the specified property name and
- *      convert from the property string found in the configuration file,
- *      which are ASCII characters representing nibbles, 2 characters represent
- *      the hexdecimal value for a byte in the byte array.
- *      The byte array is initialized to zero.
- *      The resulting converted value is in big endian format (MSB at byte0).
- *
- * Input:
- *      ha = adapter state pointer.
- *      propname = property name pointer.
- *      propval  = pointer where to store converted property val.
- *      size = max or expected size of 'propval' array.
- *
- * Returns:
- *      0 = empty value string or invalid character in string
- *      >0 = count of characters converted
- *      -1 = property not found
- *
- * Context:
- *      Kernel context.
- */
-int
-qla2x00_get_prop_xstr(scsi_qla_host_t *ha, 
-		char *propname, uint8_t *propval, int size) 
-{
-	char		*propstr;
-	int		rval = -1;
-	static char	buf[LINESIZE];
-
-	/* Get the requested property string */
-	rval = qla2x00_find_propname(ha, propname, buf, ha->cmdline, size*2);
-	DEBUG3(printk("%s(): Ret rval from find propname = %d\n",
-			__func__,
-			rval);)
-
-	propstr = &buf[0];
-	if (*propstr == '=')
-		propstr++;   /* ignore equal sign */
-
-	if (rval == 0) {  /* not found */
-		return (-1);
-	}
-
-	rval = qla2x00_bstr_to_hex(propstr, (uint8_t *)propval, size);
-	if (rval == 0) {
-		/* Invalid character in value string */
-		qla_printk(KERN_INFO, ha,
-			"%s(): %s Invalid hex string for property\n",
-			__func__,
-			propname);
-		qla_printk(KERN_INFO, ha,
-			" Invalid string - %s\n", 
-			propstr);
-	}
-
-	return (rval);
-}
-
-/*
- * qla2x00_find_propname
- *	Get property in database.
- *
- * Input:
- *	ha = adapter structure pointer.
- *      db = pointer to database
- *      propstr = pointer to dest array for string
- *	propname = name of property to search for.
- *	siz = size of property
- *
- * Returns:
- *	0 = no property
- *      size = index of property
- *
- * Context:
- *	Kernel context.
- */
-static int
-qla2x00_find_propname(scsi_qla_host_t *ha, 
-			char *propname, char *propstr, 
-			char *db, int siz) 
-{
-	char	*cp;
-
-	/* find the specified string */
-	if (db) {
-		/* find the property name */
-		if ((cp = strstr(db,propname)) != NULL) {
-			while ((*cp)  && *cp != '=')
-				cp++;
-			if (*cp) {
-				strncpy(propstr, cp, siz+1);
-				propstr[siz+1] = '\0';
-				DEBUG(printk("qla2x00_find_propname: found "
-						"property = {%s}\n",
-						propstr);)
-				return (siz);   /* match */
-			}
-		}
-	}
-
-	return (0);
-}
-
-#if 0
-/*
- * qla2x00_get_prop_16chars
- *	Get an 8-byte property value for the specified property name by
- *      converting from the property string found in the configuration file.
- *      The resulting converted value is in big endian format (MSB at byte0).
- *
- * Input:
- *	ha = adapter state pointer.
- *	propname = property name pointer.
- *	propval  = pointer to location for the converted property val.
- *      db = pointer to database
- *
- * Returns:
- *	0 = value returned successfully.
- *
- * Context:
- *	Kernel context.
- */
-static int
-qla2x00_get_prop_16chars(scsi_qla_host_t *ha,
-				char *propname, char *propval, char *db) 
-{
-	char		*propstr;
-	int		i, k;
-	int		rval;
-	uint8_t		nval;
-	uint8_t		*pchar;
-	uint8_t		*ret_byte;
-	uint8_t		*tmp_byte;
-	uint8_t		*retval = (uint8_t*)propval;
-	uint8_t		tmpval[8] = {0, 0, 0, 0, 0, 0, 0, 0};
-	uint16_t	max_byte_cnt = 8; /* 16 chars = 8 bytes */
-	uint16_t	max_strlen = 16;
-	static char	buf[LINESIZE];
-
-	rval = qla2x00_find_propname(ha, propname, buf, db, max_strlen);
-
-	propstr = &buf[0];
-	if (*propstr == '=')
-		propstr++;   /* ignore equal sign */
-
-	if (rval == 0) {
-		return (1);
-	}
-
-	/* Convert string to numbers. */
-	pchar = (uint8_t *)propstr;
-	tmp_byte = (uint8_t *)tmpval;
-
-	rval = 0;
-	for (i = 0; i < max_strlen; i++) {
-		/*
-		 * Check for invalid character, two at a time,
-		 * then convert them starting with first byte.
-		 */
-
-		if ((pchar[i] >= '0') && (pchar[i] <= '9')) {
-			nval = pchar[i] - '0';
-		} else if ((pchar[i] >= 'A') && (pchar[i] <= 'F')) {
-			nval = pchar[i] - 'A' + 10;
-		} else if ((pchar[i] >= 'a') && (pchar[i] <= 'f')) {
-			nval = pchar[i] - 'a' + 10;
-		} else {
-			/* invalid character */
-			rval = 1;
-			break;
-		}
-
-		if (i & BIT_0) {
-			*tmp_byte = *tmp_byte | nval;
-			tmp_byte++;
-		} else {
-			*tmp_byte = *tmp_byte | nval << 4;
-		}
-	}
-
-	if (rval != 0) {
-		/* Encountered invalid character. */
-		return (rval);
-	}
-
-	/* Copy over the converted value. */
-	ret_byte = retval;
-	tmp_byte = tmpval;
-
-	i = max_byte_cnt;
-	k = 0;
-	while (i--) {
-		*ret_byte++ = *tmp_byte++;
-	}
-
-	/* big endian retval[0]; */
-	return (0);
-}
-
-/*
-* qla2x00_get_properties
-*	Find all properties for the specified adapeter in
-*      command line.
-*
-* Input:
-*	ha = adapter block pointer.
-*	cmdline = pointer to command line string
-*
-* Context:
-*	Kernel context.
-*/
-static void
-qla2x00_get_properties(scsi_qla_host_t *ha, char *cmdline) 
-{
-	int	rval;
-	static char propbuf[LINESIZE];
-	uint8_t fc_name[8];
-
-	/* Adapter FC node names. */
-	sprintf(propbuf, "scsi-qla%d-adapter-node", (int) ha->instance);
-	rval = qla2x00_get_prop_16chars(ha, propbuf, fc_name, cmdline);
-	if (rval == QLA_SUCCESS)
-		memcpy(ha->init_cb->node_name, fc_name, WWN_SIZE);
-
-	/* DG 04/07 check portname of adapter */
-	sprintf(propbuf, "scsi-qla%d-adapter-port", (int)ha->instance);
-	rval = qla2x00_get_prop_16chars(ha, propbuf, fc_name, cmdline);
-	if (rval == QLA_SUCCESS &&
-	    memcmp(ha->init_cb->port_name, fc_name, WWN_SIZE)) {
-		/*
-		 * Adapter port name is WWN, and cannot be changed.
-		 * Inform users of the mismatch, then just continue driver
-		 * loading using the original adapter port name in NVRAM.
-		 */
-		qla_printk(KERN_WARNING, ha,
-		    "Found mismatch in adapter port names.\n");
-		qla_printk(KERN_INFO, ha,
-		    "       qla%ld port name found in NVRAM -> "
-		    "%02x%02x%02x%02x%02x%02x%02x%02x\n",
-		    ha->instance,
-		    ha->init_cb->port_name[0],
-		    ha->init_cb->port_name[1],
-		    ha->init_cb->port_name[2],
-		    ha->init_cb->port_name[3],
-		    ha->init_cb->port_name[4],
-		    ha->init_cb->port_name[5],
-		    ha->init_cb->port_name[6],
-		    ha->init_cb->port_name[7]);
-		qla_printk(KERN_INFO, ha,
-		    "      qla%ld port name found on command line -> "
-		    "%02x%02x%02x%02x%02x%02x%02x%02x\n",
-		    ha->instance,
-		    fc_name[0], fc_name[1], fc_name[2], fc_name[3],
-		    fc_name[4], fc_name[5], fc_name[6], fc_name[7]);
-		qla_printk(KERN_INFO, ha,
-		    "      Using port name from NVRAM.\n");
-	}
-
-	qla2x00_cfg_persistent_binding(ha);
-}
-
-/*
- * qla2x00_cfg_persistent_binding
- *	Get driver configuration file target persistent binding entries.
- *
- * Input:
- *	ha = adapter block pointer.
- *
- * Context:
- *	Kernel context.
- */
-static void
-qla2x00_cfg_persistent_binding(scsi_qla_host_t *ha) 
-{
-	int		rval;
-	static char	propbuf[LINESIZE];
-	char		*cmdline = ha->cmdline;
-	uint16_t	tgt;
-	port_id_t	d_id;
-	uint8_t		portid[3];
-	uint8_t		port_name[8];
-
-	for (tgt = 0; tgt < MAX_TARGETS; tgt++) {
-		if (ha->binding_type == BIND_BY_PORT_ID) {
-			sprintf(propbuf, "scsi-qla%d-tgt-%d-di-0-pid",
-			    (int)ha->instance, tgt);
-			rval = qla2x00_get_prop_xstr(ha,
-			    propbuf, portid, sizeof(portid));
-			if (rval != sizeof(portid))
-				continue;
-			
-			memset(&d_id, 0, sizeof(port_id_t));
-			d_id.r.d_id[0] = portid[2];
-			d_id.r.d_id[1] = portid[1];
-			d_id.r.d_id[2] = portid[0];
-		} else {
-			sprintf(propbuf, "scsi-qla%d-tgt-%d-di-0-port",
-			    (int)ha->instance, tgt);
-			rval = qla2x00_get_prop_16chars(ha,
-			    propbuf, port_name, cmdline);
-			if (rval != QLA_SUCCESS)
-				continue;
-
-			/* Fallthru since port_name already populated */
-		}
-
-		/*
-		 * Create target context for device.
-		 */
-		if (ha->binding_type == BIND_BY_PORT_ID) {
-			qla2x00_persistent_bind(ha, NULL, NULL, &d_id, tgt);
-		} else {
-			qla2x00_persistent_bind(ha, NULL, port_name, NULL, tgt);
-		}
-	}
-}
-
-/*
- * qla2x00_persistent_bind
- *	Allocates target and fcport.
- *
- * Input:
- *	ha:		adapter state pointer.
- *	node_name:	node name pointer.
- *	port_name:	port name pointer.
- *	d_id:		port ID pointer.
- *	tgt:		OS target number.
- *
- * Returns:
- *	success = target queue pointer.
- *	failure = NULL.
- *
- * Context:
- *	Kernel context.
- */
-static os_tgt_t *
-qla2x00_persistent_bind(scsi_qla_host_t *ha, uint8_t *node_name,
-    uint8_t *port_name, port_id_t *d_id, uint16_t tgt)
-{
-	os_tgt_t	*tq;
-	uint16_t	tgt2;
-
-	/*
-	 * Check for duplicates.
-	 */
-	for (tgt2 = 0; tgt2 < MAX_TARGETS; tgt2++) {
-		if ((tq = TGT_Q(ha, tgt2)) == NULL) {
-			continue;
-		}
-
-		if (ha->binding_type == BIND_BY_PORT_ID) {
-			if (tq->d_id.b24 != d_id->b24) {
-				continue;
-			}
-		} else if (memcmp(tq->port_name, port_name, WWN_SIZE) != 0) {
-			continue;
-		}
-
-		qla_printk(KERN_WARNING, ha,
-		    "Duplicate persistent bindings found for "
-		    "WWPN: %02x%02x%02x%02x%02x%02x%02x%02x.\n", 
-		    port_name[0], port_name[1], port_name[2], port_name[3],
-		    port_name[4], port_name[5], port_name[6], port_name[7]);
-
-		return (tq);
-	}
-
-	tq = qla2x00_tgt_alloc(ha, tgt);
-	if (tq == NULL) {
-		return (NULL);
-	}
-
-	if (node_name != NULL) {
-		memcpy(tq->node_name, node_name, WWN_SIZE);
-	}
-	if (port_name != NULL) {
-		memcpy(tq->port_name, port_name, WWN_SIZE);
-	}
-	if (d_id != NULL) {
-		tq->d_id.b24 = d_id->b24;
-	}
-
-	return (tq);
-}
-#endif
 
 /*
 *  qla2x00_abort_isp
diff -Nru a/drivers/scsi/qla2xxx/qla_iocb.c b/drivers/scsi/qla2xxx/qla_iocb.c
--- a/drivers/scsi/qla2xxx/qla_iocb.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/scsi/qla2xxx/qla_iocb.c	2005-01-10 20:11:20 -08:00
@@ -27,6 +27,7 @@
 static inline uint16_t qla2x00_get_cmd_direction(struct scsi_cmnd *cmd);
 static inline cont_entry_t *qla2x00_prep_cont_type0_iocb(scsi_qla_host_t *);
 static inline cont_a64_entry_t *qla2x00_prep_cont_type1_iocb(scsi_qla_host_t *);
+static request_t *qla2x00_req_pkt(scsi_qla_host_t *ha);
 
 /**
  * qla2x00_get_cmd_direction() - Determine control_flag data direction.
@@ -544,7 +545,7 @@
  *
  * Returns NULL if function failed, else, a pointer to the request packet.
  */
-request_t *
+static request_t *
 qla2x00_req_pkt(scsi_qla_host_t *ha)
 {
 	device_reg_t __iomem *reg = ha->iobase;
@@ -593,100 +594,6 @@
 		/* During init we issue marker directly */
 		if (!ha->marker_needed)
 			qla2x00_poll(ha);
-
-		spin_lock_irq(&ha->hardware_lock);
-	}
-	if (!pkt) {
-		DEBUG2_3(printk("%s(): **** FAILED ****\n", __func__));
-	}
-
-	return (pkt);
-}
-
-/**
- * qla2x00_ms_req_pkt() - Retrieve a Management Server request packet from
- * 				the request ring.
- * @ha: HA context
- * @sp: pointer to handle post function call
- *
- * Note: The caller must hold the hardware lock before calling this routine.
- *
- * Returns NULL if function failed, else, a pointer to the request packet.
- */
-request_t *
-qla2x00_ms_req_pkt(scsi_qla_host_t *ha, srb_t  *sp)
-{
-	device_reg_t __iomem *reg = ha->iobase;
-	request_t	*pkt = NULL;
-	uint16_t	cnt, i, index;
-	uint32_t	*dword_ptr;
-	uint32_t	timer;
-	uint8_t		found = 0;
-	uint16_t	req_cnt = 1;
-
-	/* Wait 1 second for slot. */
-	for (timer = HZ; timer; timer--) {
-		if ((req_cnt + 2) >= ha->req_q_cnt) {
-			/* Calculate number of free request entries. */
-			cnt = qla2x00_debounce_register(ISP_REQ_Q_OUT(ha, reg));
-			if (ha->req_ring_index < cnt) {
-				ha->req_q_cnt = cnt - ha->req_ring_index;
-			} else {
-				ha->req_q_cnt = ha->request_q_length -
-				    (ha->req_ring_index - cnt);
-			}
-		}
-
-		/* Check for room in outstanding command list. */
-		cnt = ha->current_outstanding_cmd;
-		for (index = 1; index < MAX_OUTSTANDING_COMMANDS; index++) {
-			cnt++;
-			if (cnt == MAX_OUTSTANDING_COMMANDS)
-				cnt = 1;
-
-			if (ha->outstanding_cmds[cnt] == 0) {
-				found = 1;
-				ha->current_outstanding_cmd = cnt;
-				break;
-			}
-		}
-
-		/* If room for request in request ring. */
-		if (found && (req_cnt + 2) < ha->req_q_cnt) {
-			pkt = ha->request_ring_ptr;
-
-			/* Zero out packet. */
-			dword_ptr = (uint32_t *)pkt;
-			for (i = 0; i < REQUEST_ENTRY_SIZE / 4; i++ )
-				*dword_ptr++ = 0;
-
-			DEBUG5(printk("%s(): putting sp=%p in "
-			    "outstanding_cmds[%x]\n",
-			    __func__,
-			    sp, cnt));
-
-			ha->outstanding_cmds[cnt] = sp;
-
-			/* save the handle */
-			sp->cmd->host_scribble = (unsigned char *) (u_long) cnt;
-			CMD_SP(sp->cmd) = (void *)sp;
-
-			ha->req_q_cnt--;
-			pkt->handle = (uint32_t)cnt;
-
-			/* Set system defined field. */
-			pkt->sys_define = (uint8_t)ha->req_ring_index;
-			pkt->entry_status = 0;
-
-			break;
-		}
-
-		/* Release ring specific lock */
-		spin_unlock(&ha->hardware_lock);
-		udelay(20);
-
-		/* Check for pending interrupts. */
-		qla2x00_poll(ha);
 
 		spin_lock_irq(&ha->hardware_lock);
 	}
diff -Nru a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
--- a/drivers/scsi/qla2xxx/qla_isr.c	2005-01-10 20:11:24 -08:00
+++ b/drivers/scsi/qla2xxx/qla_isr.c	2005-01-10 20:11:24 -08:00
@@ -376,7 +376,14 @@
 			qla2100_fw_dump(ha, 1);
 		else
 	    		qla2300_fw_dump(ha, 1);
-		set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags);
+
+		if (mb[1] == 0) {
+			qla_printk(KERN_INFO, ha,
+			    "Unrecoverable Hardware Error: adapter marked "
+			    "OFFLINE!\n");
+			ha->flags.online = 0;
+		} else
+			set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags);
 		break;
 
 	case MBA_REQ_TRANSFER_ERR:	/* Request Transfer Error */
@@ -561,8 +568,8 @@
 			rscn_fcport = qla2x00_alloc_rscn_fcport(ha, GFP_ATOMIC);
 			if (rscn_fcport) {
 				DEBUG14(printk("scsi(%ld): Port Update -- "
-				    "creating RSCN fcport %p for login.\n",
-				    ha->host_no, rscn_fcport));
+				    "creating RSCN fcport %p for %x/%x.\n",
+				    ha->host_no, rscn_fcport, mb[1], mb[2]));
 
 				rscn_fcport->loop_id = mb[1];
 				rscn_fcport->d_id.b24 = INVALID_PORT_ID;
@@ -583,11 +590,13 @@
 		}
 
 		/*
-		 * If PORT UPDATE is global (received LIP_OCCURRED/LIP_RESET
+		 * If PORT UPDATE is global (recieved LIP_OCCURED/LIP_RESET
 		 * event etc. earlier indicating loop is down) then process
 		 * it.  Otherwise ignore it and Wait for RSCN to come in.
 		 */
-		if (atomic_read(&ha->loop_state) != LOOP_DOWN) {
+		atomic_set(&ha->loop_down_timer, 0);
+		if (atomic_read(&ha->loop_state) != LOOP_DOWN &&
+		    atomic_read(&ha->loop_state) != LOOP_DEAD) {
 			DEBUG2(printk("scsi(%ld): Asynchronous PORT UPDATE "
 			    "ignored.\n", ha->host_no));
 			break;
@@ -604,7 +613,6 @@
 		 */
 		atomic_set(&ha->loop_state, LOOP_UP);
 
-		atomic_set(&ha->loop_down_timer, 0);
 		qla2x00_mark_all_devices_lost(ha);
 
 		ha->flags.rscn_queue_overflow = 1;
@@ -1196,8 +1204,9 @@
 
 	case CS_TIMEOUT:
 		DEBUG2(printk(KERN_INFO
-		    "scsi(%ld:%d:%d:%d): TIMEOUT status detected 0x%x-0x%x.\n",
-		    ha->host_no, b, t, l, comp_status, scsi_status));
+		    "scsi(%ld:%d:%d:%d): TIMEOUT status detected 0x%x-0x%x "
+		    "sflags=%x.\n", ha->host_no, b, t, l, comp_status,
+		    scsi_status, le16_to_cpu(pkt->status_flags)));
 
 		cp->result = DID_BUS_BUSY << 16;
 
diff -Nru a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
--- a/drivers/scsi/qla2xxx/qla_mbx.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/scsi/qla2xxx/qla_mbx.c	2005-01-10 20:11:19 -08:00
@@ -53,7 +53,7 @@
  * Context:
  *	Kernel context.
  */
-int
+static int
 qla2x00_mailbox_command(scsi_qla_host_t *ha, mbx_cmd_t *mcp)
 {
 	int		rval;
@@ -676,135 +676,6 @@
 }
 
 /*
- * qla2x00_read_ram_word
- *
- * Input:
- *	ha = adapter block pointer.
- *
- * Returns:
- *	qla2x00 local function return status code.
- *
- * Context:
- *	Kernel context.
- */
-int
-qla2x00_read_ram_word(scsi_qla_host_t *ha, uint16_t addr, uint16_t *data)
-{
-	int rval;
-	mbx_cmd_t mc;
-	mbx_cmd_t *mcp = &mc;
-
-	DEBUG11(printk("qla2x00_read_ram_word(%ld): entered.\n", ha->host_no);)
-
-	mcp->mb[0] = MBC_READ_RAM_WORD;
-	mcp->mb[1] = addr;
-	mcp->out_mb = MBX_1|MBX_0;
-	mcp->in_mb = MBX_0|MBX_2;
-	mcp->tov = 30;
-	mcp->flags = 0;
-	rval = qla2x00_mailbox_command(ha, mcp);
-
-	if (rval != QLA_SUCCESS) {
-		/*EMPTY*/
-		DEBUG2_3_11(printk("qla2x00_read_ram_word(%ld): failed=%x.\n",
-		    ha->host_no, rval);)
-	} else {
-		*data = mcp->mb[2];
-		DEBUG11(printk("qla2x00_read_ram_word(%ld): done.\n",
-		    ha->host_no);)
-	}
-
-	return rval;
-}
-
-/*
- * qla2x00_write_ram_word
- *
- * Input:
- *	ha = adapter block pointer.
- *
- * Returns:
- *	qla2x00 local function return status code.
- *
- * Context:
- *	Kernel context.
- */
-int
-qla2x00_write_ram_word(scsi_qla_host_t *ha, uint16_t addr, uint16_t data)
-{
-	int rval;
-	mbx_cmd_t mc;
-	mbx_cmd_t *mcp = &mc;
-
-	DEBUG11(printk("qla2x00_write_ram_word(%ld): entered.\n",
-	    ha->host_no);)
-
-	mcp->mb[0] = MBC_WRITE_RAM_WORD;
-	mcp->mb[1] = addr;
-	mcp->mb[2] = data;
-	mcp->out_mb = MBX_2|MBX_1|MBX_0;
-	mcp->in_mb = MBX_0;
-	mcp->tov = 30;
-	mcp->flags = 0;
-	rval = qla2x00_mailbox_command(ha, mcp);
-
-	if (rval != QLA_SUCCESS) {
-		/*EMPTY*/
-		DEBUG2_3_11(printk("qla2x00_write_ram_word(%ld): failed=%x.\n",
-		    ha->host_no, rval);)
-	} else {
-		/*EMPTY*/
-		DEBUG11(printk("qla2x00_write_ram_word(%ld): done.\n",
-		    ha->host_no);)
-	}
-
-	return rval;
-}
-
-/*
- * qla2x00_write_ram_word_ext
- *
- * Input:
- *	ha = adapter block pointer.
- *
- * Returns:
- *	qla2x00 local function return status code.
- *
- * Context:
- *	Kernel context.
- */
-int
-qla2x00_write_ram_word_ext(scsi_qla_host_t *ha, uint32_t addr, uint16_t data)
-{
-	int rval;
-	mbx_cmd_t mc;
-	mbx_cmd_t *mcp = &mc;
-
-	DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no));
-
-	mcp->mb[0] = MBC_WRITE_RAM_WORD_EXTENDED;
-	mcp->mb[1] = LSW(addr);
-	mcp->mb[2] = data;
-	mcp->mb[8] = MSW(addr);
-	mcp->out_mb = MBX_8|MBX_2|MBX_1|MBX_0;
-	mcp->in_mb = MBX_0;
-	mcp->tov = 30;
-	mcp->flags = 0;
-	rval = qla2x00_mailbox_command(ha, mcp);
-
-	if (rval != QLA_SUCCESS) {
-		/*EMPTY*/
-		DEBUG2_3_11(printk("%s(%ld): failed=%x.\n", __func__,
-		    ha->host_no, rval));
-	} else {
-		/*EMPTY*/
-		DEBUG11(printk("%s(%ld): done.\n", __func__, ha->host_no));
-	}
-
-	return rval;
-}
-
-/*
  * qla2x00_mbx_reg_test
  *	Mailbox register wrap test.
  *
@@ -1032,62 +903,6 @@
 	return rval;
 }
 
-/*
- * qla2x00_abort_device
- *
- * Input:
- *	ha = adapter block pointer.
- *      loop_id  = FC loop ID
- *      lun  = SCSI LUN.
- *
- * Returns:
- *	qla2x00 local function return status code.
- *
- * Context:
- *	Kernel context.
- */
-int
-qla2x00_abort_device(scsi_qla_host_t *ha, uint16_t loop_id, uint16_t lun)
-{
-	int rval;
-	mbx_cmd_t mc;
-	mbx_cmd_t *mcp = &mc;
-
-	DEBUG11(printk("qla2x00_abort_device(%ld): entered.\n", ha->host_no);)
-
-	mcp->mb[0] = MBC_ABORT_DEVICE;
-	if (HAS_EXTENDED_IDS(ha))
-		mcp->mb[1] = loop_id;
-	else
-		mcp->mb[1] = loop_id << 8;
-	mcp->mb[2] = lun;
-	mcp->out_mb = MBX_2|MBX_1|MBX_0;
-	mcp->in_mb = MBX_0;
-	mcp->tov = 30;
-	mcp->flags = 0;
-	rval = qla2x00_mailbox_command(ha, mcp);
-
-	/* Issue marker command. */
-	qla2x00_marker(ha, loop_id, lun, MK_SYNC_ID_LUN);
-
-	if (rval != QLA_SUCCESS) {
-		qla_printk(KERN_WARNING, ha,
-		    "Failed Abort Device Mailbox command. Scheduling ISP "
-		    "abort.\n");
-		set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags);
-		if (ha->dpc_wait && !ha->dpc_active) 
-			up(ha->dpc_wait);
-		DEBUG2_3_11(printk("qla2x00_abort_device(%ld): failed=%x.\n",
-		    ha->host_no, rval);)
-	} else {
-		/*EMPTY*/
-		DEBUG11(printk("qla2x00_abort_device(%ld): done.\n",
-		    ha->host_no);)
-	}
-
-	return rval;
-}
-
 #if USE_ABORT_TGT
 /*
  * qla2x00_abort_target
@@ -1599,101 +1414,6 @@
 }
 
 /*
- * qla2x00_get_link_status
- *
- * Input:
- *	ha = adapter block pointer.
- *	loop_id = device loop ID.
- *	ret_buf = pointer to link status return buffer.
- *
- * Returns:
- *	0 = success.
- *	BIT_0 = mem alloc error.
- *	BIT_1 = mailbox error.
- */
-uint8_t
-qla2x00_get_link_status(scsi_qla_host_t *ha, uint16_t loop_id,
-    link_stat_t *ret_buf, uint16_t *status)
-{
-	int rval;
-	mbx_cmd_t mc;
-	mbx_cmd_t *mcp = &mc;
-	link_stat_t *stat_buf;
-	dma_addr_t stat_buf_dma;
-
-	DEBUG11(printk("qla2x00_get_link_status(%ld): entered.\n",
-	    ha->host_no);)
-
-	stat_buf = dma_pool_alloc(ha->s_dma_pool, GFP_ATOMIC, &stat_buf_dma);
-	if (stat_buf == NULL) {
-		DEBUG2_3_11(printk("qla2x00_get_link_status(%ld): Failed to "
-		    "allocate memory.\n", ha->host_no));
-		return BIT_0;
-	}
-	memset(stat_buf, 0, sizeof(link_stat_t));
-
-	mcp->mb[0] = MBC_GET_LINK_STATUS;
-	mcp->out_mb = MBX_7|MBX_6|MBX_3|MBX_2|MBX_1|MBX_0;
-	if (HAS_EXTENDED_IDS(ha)) {
-		mcp->mb[1] = loop_id;
-		mcp->mb[10] = 0;
-		mcp->out_mb |= MBX_10;
-	} else {
-		mcp->mb[1] = loop_id << 8;
-	}
-	mcp->mb[2] = MSW(stat_buf_dma);
-	mcp->mb[3] = LSW(stat_buf_dma);
-	mcp->mb[6] = MSW(MSD(stat_buf_dma));
-	mcp->mb[7] = LSW(MSD(stat_buf_dma));
-
-	mcp->in_mb = MBX_0;
-	mcp->tov = 30;
-	mcp->flags = IOCTL_CMD;
-	rval = qla2x00_mailbox_command(ha, mcp);
-
-	if (rval == QLA_SUCCESS) {
-		if (mcp->mb[0] != MBS_COMMAND_COMPLETE) {
-			DEBUG2_3_11(printk("qla2x00_get_link_status(%ld): cmd "
-			    "failed. mbx0=%x.\n", ha->host_no, mcp->mb[0]);)
-			status[0] = mcp->mb[0];
-			rval = BIT_1;
-		} else {
-			/* copy over data -- firmware data is LE. */
-			ret_buf->link_fail_cnt =
-			    le32_to_cpu(stat_buf->link_fail_cnt);
-			ret_buf->loss_sync_cnt =
-			    le32_to_cpu(stat_buf->loss_sync_cnt);
-			ret_buf->loss_sig_cnt =
-			    le32_to_cpu(stat_buf->loss_sig_cnt);
-			ret_buf->prim_seq_err_cnt =
-			    le32_to_cpu(stat_buf->prim_seq_err_cnt);
-			ret_buf->inval_xmit_word_cnt =
-			    le32_to_cpu(stat_buf->inval_xmit_word_cnt);
-			ret_buf->inval_crc_cnt =
-			    le32_to_cpu(stat_buf->inval_crc_cnt);
-
-			DEBUG11(printk("qla2x00_get_link_status(%ld): stat "
-			    "dump: fail_cnt=%d loss_sync=%d loss_sig=%d "
-			    "seq_err=%d inval_xmt_word=%d inval_crc=%d.\n",
-			    ha->host_no,
-			    stat_buf->link_fail_cnt, stat_buf->loss_sync_cnt,
-			    stat_buf->loss_sig_cnt, stat_buf->prim_seq_err_cnt,
-			    stat_buf->inval_xmit_word_cnt,
-			    stat_buf->inval_crc_cnt);)
-		}
-	} else {
-		/* Failed. */
-		DEBUG2_3_11(printk("qla2x00_get_link_status(%ld): failed=%x.\n",
-		    ha->host_no, rval);)
-		rval = BIT_1;
-	}
-
-	dma_pool_free(ha->s_dma_pool, stat_buf, stat_buf_dma);
-
-	return rval;
-}
-
-/*
  * qla2x00_lip_reset
  *	Issue LIP reset mailbox command.
  *
@@ -2108,227 +1828,6 @@
 	}
 
 	return rval;
-}
-
-/*
- * qla2x00_lun_reset
- *	Issue lun reset mailbox command.
- *
- * Input:
- *	ha = adapter block pointer.
- *	loop_id = device loop ID.
- *      lun = lun to be reset.
- *	TARGET_QUEUE_LOCK must be released.
- *	ADAPTER_STATE_LOCK must be released.
- *
- * Returns:
- *	qla2x00 local function return status code.
- *
- * Context:
- *	Kernel context.
- */
-int
-qla2x00_lun_reset(scsi_qla_host_t *ha, uint16_t loop_id, uint16_t lun)
-{
-	int		rval;
-	mbx_cmd_t	mc;
-	mbx_cmd_t	*mcp = &mc;
-
-	mcp->mb[0] = MBC_LUN_RESET;
-	if (HAS_EXTENDED_IDS(ha))
-		mcp->mb[1] = loop_id;
-	else
-		mcp->mb[1] = loop_id << 8;
-	mcp->mb[2] = lun;
-	mcp->out_mb = MBX_2|MBX_1|MBX_0;
-	mcp->in_mb = MBX_0;
-	mcp->tov = 30;
-	mcp->flags = 0;
-	rval = qla2x00_mailbox_command(ha, mcp);
-
-	if (rval != QLA_SUCCESS) {
-		/*EMPTY*/
-		printk(KERN_WARNING "qla2x00_lun_reset(%d): failed = %d",
-		    (int)ha->instance, rval);
-	} else {
-		/*EMPTY*/
-	}
-
-	return rval;
-}
-
-/*
- * qla2x00_send_rnid_mbx
- *	Issue RNID ELS using mailbox command
- *
- * Input:
- *	ha = adapter state pointer.
- *	loop_id = loop ID of the target device.
- *	data_fmt = currently supports only 0xDF.
- *	buffer = buffer pointer.
- *	buf_size = size of buffer.
- *	mb_reg = pointer to return mailbox registers.
- *
- * Returns:
- *	qla2x00 local function return status code.
- *
- * Context:
- *	Kernel context.
- */
-int
-qla2x00_send_rnid_mbx(scsi_qla_host_t *ha, uint16_t loop_id, uint8_t data_fmt,
-    dma_addr_t buf_phys_addr, size_t buf_size, uint16_t *mb_reg)
-{
-	int		rval;
-	mbx_cmd_t	mc;
-	mbx_cmd_t	*mcp = &mc;
-
-	DEBUG11(printk("qla2x00_send_rnid_mbx(%ld): entered.\n",
-	    ha->host_no);)
-
-	mcp->mb[0] = MBC_SEND_RNID_ELS;
-	mcp->out_mb = MBX_7|MBX_6|MBX_3|MBX_2|MBX_1|MBX_0;
-	if (HAS_EXTENDED_IDS(ha)) {
-		mcp->mb[1] = loop_id;
-		mcp->mb[10] = data_fmt;
-		mcp->out_mb |= MBX_10;
-	} else {
-		mcp->mb[1] = (loop_id << 8) | data_fmt;
-	}
-	mcp->mb[2] = MSW(buf_phys_addr);
-	mcp->mb[3] = LSW(buf_phys_addr);
-	mcp->mb[6] = MSW(MSD(buf_phys_addr));
-	mcp->mb[7] = LSW(MSD(buf_phys_addr));
-
-	mcp->in_mb = MBX_1|MBX_0;
-	mcp->buf_size = buf_size;
-	mcp->flags = MBX_DMA_IN;
-	mcp->tov = 30;
-	rval = qla2x00_mailbox_command(ha, mcp);
-
-	if (rval != QLA_SUCCESS) {
-		memcpy(mb_reg, mcp->mb, 2 * 2); /* 2 status regs */
-
-		DEBUG2_3_11(printk("qla2x00_send_rnid_mbx(%ld): failed=%x "
-		    "mb[1]=%x.\n",
-		    ha->host_no, mcp->mb[0], mcp->mb[1]);)
-	} else {
-		/*EMPTY*/
-	 	DEBUG11(printk("qla2x00_send_rnid_mbx(%ld): done.\n",
-		     ha->host_no);)
-	}
-
-	return (rval);
-}
-
-/*
- * qla2x00_set_rnid_params_mbx
- *	Set RNID parameters using mailbox command
- *
- * Input:
- *	ha = adapter state pointer.
- *	buffer = buffer pointer.
- *	buf_size = size of buffer.
- *	mb_reg = pointer to return mailbox registers.
- *
- * Returns:
- *	qla2x00 local function return status code.
- *
- * Context:
- *	Kernel context.
- */
-int
-qla2x00_set_rnid_params_mbx(scsi_qla_host_t *ha, dma_addr_t buf_phys_addr,
-    size_t buf_size, uint16_t *mb_reg)
-{
-	int		rval;
-	mbx_cmd_t	mc;
-	mbx_cmd_t	*mcp = &mc;
-
-	DEBUG11(printk("qla2x00_set_rnid_params_mbx(%ld): entered.\n",
-	    ha->host_no);)
-
-	mcp->mb[0] = MBC_SET_RNID_PARAMS;
-	mcp->mb[1] = 0;
-	mcp->mb[2] = MSW(buf_phys_addr);
-	mcp->mb[3] = LSW(buf_phys_addr);
-	mcp->mb[6] = MSW(MSD(buf_phys_addr));
-	mcp->mb[7] = LSW(MSD(buf_phys_addr));
-	mcp->out_mb = MBX_7|MBX_6|MBX_3|MBX_2|MBX_1|MBX_0;
-	mcp->in_mb = MBX_1|MBX_0;
-	mcp->buf_size = buf_size;
-	mcp->flags = MBX_DMA_OUT;
-	mcp->tov = 30;
-	rval = qla2x00_mailbox_command(ha, mcp);
-
-	if (rval != QLA_SUCCESS) {
-		memcpy(mb_reg, mcp->mb, 2 * 2); /* 2 status regs */
-
-		DEBUG2_3_11(printk("qla2x00_set_rnid_params_mbx(%ld): "
-		    "failed=%x mb[1]=%x.\n", ha->host_no, mcp->mb[0],
-		    mcp->mb[1]);)
-	} else {
-		/*EMPTY*/
-		DEBUG11(printk("qla2x00_set_rnid_params_mbx(%ld): done.\n",
-		    ha->host_no);)
-	}
-
-	return (rval);
-}
-
-/*
- * qla2x00_get_rnid_params_mbx
- *	Get RNID parameters using mailbox command
- *
- * Input:
- *	ha = adapter state pointer.
- *	buffer = buffer pointer.
- *	buf_size = size of buffer.
- *	mb_reg = pointer to return mailbox registers.
- *
- * Returns:
- *	qla2x00 local function return status code.
- *
- * Context:
- *	Kernel context.
- */
-int
-qla2x00_get_rnid_params_mbx(scsi_qla_host_t *ha, dma_addr_t buf_phys_addr,
-    size_t buf_size, uint16_t *mb_reg)
-{
-	int		rval;
-	mbx_cmd_t	mc;
-	mbx_cmd_t	*mcp = &mc;
-
-	DEBUG11(printk("qla2x00_get_rnid_params_mbx(%ld): entered.\n",
-	    ha->host_no);)
-
-	mcp->mb[0] = MBC_GET_RNID_PARAMS;
-	mcp->mb[1] = 0;
-	mcp->mb[2] = MSW(buf_phys_addr);
-	mcp->mb[3] = LSW(buf_phys_addr);
-	mcp->mb[6] = MSW(MSD(buf_phys_addr));
-	mcp->mb[7] = LSW(MSD(buf_phys_addr));
-	mcp->out_mb = MBX_7|MBX_6|MBX_3|MBX_2|MBX_1|MBX_0;
-	mcp->in_mb = MBX_1|MBX_0;
-	mcp->buf_size = buf_size;
-	mcp->flags = MBX_DMA_IN;
-	mcp->tov = 30;
-	rval = qla2x00_mailbox_command(ha, mcp);
-
-	if (rval != QLA_SUCCESS) {
-		memcpy(mb_reg, mcp->mb, 2 * 2); /* 2 status regs */
-
-		DEBUG2_3_11(printk("qla2x00_get_rnid_params_mbx(%ld): "
-		    "failed=%x mb[1]=%x.\n", ha->host_no, mcp->mb[0],
-		    mcp->mb[1]);)
-	} else {
-		/*EMPTY*/
-		DEBUG11(printk("qla2x00_get_rnid_params_mbx(%ld): done.\n",
-		    ha->host_no);)
-	}
-
-	return (rval);
 }
 
 /*
diff -Nru a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
--- a/drivers/scsi/qla2xxx/qla_os.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/scsi/qla2xxx/qla_os.c	2005-01-10 20:11:23 -08:00
@@ -151,6 +151,8 @@
  * SCSI host template entry points 
  */
 static int qla2xxx_slave_configure(struct scsi_device * device);
+static int qla2x00_queuecommand(struct scsi_cmnd *cmd,
+		void (*fn)(struct scsi_cmnd *));
 static int qla2xxx_eh_abort(struct scsi_cmnd *);
 static int qla2xxx_eh_device_reset(struct scsi_cmnd *);
 static int qla2xxx_eh_bus_reset(struct scsi_cmnd *);
@@ -396,8 +398,9 @@
 
 static uint8_t qla2x00_mem_alloc(scsi_qla_host_t *);
 static void qla2x00_mem_free(scsi_qla_host_t *ha);
-int qla2x00_allocate_sp_pool( scsi_qla_host_t *ha);
-void qla2x00_free_sp_pool(scsi_qla_host_t *ha);
+static int qla2x00_allocate_sp_pool( scsi_qla_host_t *ha);
+static void qla2x00_free_sp_pool(scsi_qla_host_t *ha);
+static srb_t *qla2x00_get_new_sp(scsi_qla_host_t *ha);
 
 static ssize_t qla2x00_sysfs_read_fw_dump(struct kobject *, char *, loff_t,
     size_t);
@@ -428,13 +431,6 @@
 	.write = qla2x00_sysfs_write_nvram,
 };
 
-
-int
-qla2x00_set_info(char *buffer, int length, struct Scsi_Host *shost)
-{
-	return (-ENOSYS);  /* Currently this is a no-op */
-}
-
 /* -------------------------------------------------------------------------- */
 
 
@@ -570,6 +566,7 @@
 	/* Write NVRAM. */
 	spin_lock_irqsave(&ha->hardware_lock, flags);
 	qla2x00_lock_nvram_access(ha);
+	qla2x00_release_nvram_protection(ha);
  	witer = (uint16_t *)buf;
 	for (cnt = 0; cnt < count / 2; cnt++) {
 		qla2x00_write_nvram_word(ha, cnt+ha->nvram_base,
@@ -583,7 +580,7 @@
 }
 
 /* -------------------------------------------------------------------------- */
-char *
+static char *
 qla2x00_get_pci_info_str(struct scsi_qla_host *ha, char *str)
 {
 	static char *pci_bus_modes[] = {
@@ -663,7 +660,7 @@
 * interrupt handler may call this routine as part of request-completion
 * handling).
 **************************************************************************/
-int
+static int
 qla2x00_queuecommand(struct scsi_cmnd *cmd, void (*fn)(struct scsi_cmnd *))
 {
 	fc_port_t	*fcport;
@@ -754,7 +751,7 @@
 	cmd->host_scribble = (unsigned char *)handle;
 
 	/* Bookkeeping information */
-	sp->r_start = jiffies;       /* time the request was received */
+	sp->r_start = jiffies;		/* Time the request was recieved. */
 	sp->u_start = 0;
 
 	/* Setup device queue pointers. */
@@ -794,7 +791,6 @@
 	} else
 		sp->flags |= SRB_TAPE;
 
-
 	DEBUG5(printk("scsi(%ld:%2d:%2d): (queuecmd) queue sp = %p, "
 	    "flags=0x%x fo retry=%d, pid=%ld\n",
 	    ha->host_no, t, l, sp, sp->flags, sp->fo_retry_cnt,
@@ -836,6 +832,7 @@
 		spin_lock_irq(ha->host->host_lock);
 		return (0);
 	}
+
 	if (tq && test_bit(TQF_SUSPENDED, &tq->flags) &&
 	    (sp->flags & SRB_TAPE) == 0) {
 		/* If target suspended put incoming I/O in retry_q. */
@@ -956,7 +953,7 @@
  *    Success (Adapter is online) : 0
  *    Failed  (Adapter is offline/disabled) : 1
  */
-int 
+static int 
 qla2x00_wait_for_hba_online(scsi_qla_host_t *ha)
 {
 	int 	 return_status;
@@ -1290,7 +1287,7 @@
 *
 * Note:
 **************************************************************************/
-int
+static int
 qla2x00_eh_wait_for_pending_target_commands(scsi_qla_host_t *ha, unsigned int t)
 {
 	int	cnt;
@@ -1502,7 +1499,7 @@
 *
 * Note:
 **************************************************************************/
-int
+static int
 qla2x00_eh_wait_for_pending_commands(scsi_qla_host_t *ha)
 {
 	int	cnt;
@@ -2322,7 +2319,7 @@
 		    "%s: has data been written to the file. \n",
 		    __func__);)
 
-		return (qla2x00_set_info(buffer, length, shost));
+		return -ENOSYS;
 	}
 
 	if (start) {
@@ -2342,8 +2339,6 @@
 
 	copy_info(&info, "Driver version %s\n", qla2x00_version_str);
 
-	copy_info(&info, "Entry address = %p\n", qla2x00_set_info);
-
 	tmp_sn = ((ha->serial0 & 0x1f) << 16) | (ha->serial2 << 8) | 
 	    ha->serial1;
 	copy_info(&info, "ISP: %s, Serial# %c%05d\n",
@@ -3146,7 +3141,7 @@
  * 
  * Note: Sets the ref_count for non Null sp to one.
  */
-int
+static int
 qla2x00_allocate_sp_pool(scsi_qla_host_t *ha) 
 {
 	int      rval;
@@ -3165,7 +3160,7 @@
  *  This routine frees all adapter allocated memory.
  *  
  */
-void
+static void
 qla2x00_free_sp_pool( scsi_qla_host_t *ha) 
 {
 	if (ha->srb_mempool) {
@@ -3626,7 +3621,7 @@
  * output:
  *        srb_t * or NULL
  */
-srb_t *
+static srb_t *
 qla2x00_get_new_sp(scsi_qla_host_t *ha)
 {
 	srb_t *sp;
@@ -3911,9 +3906,9 @@
 	if (sp->state == SRB_PENDING_STATE) {
 		__del_from_pending_queue(vis_ha, sp);
 		DEBUG2(printk("scsi(%ld): Found in Pending queue pid %ld, "
-		    "State = %x., fcport state=%d jiffies=%lx\n",
+		    "State = %x., fcport state=%d sjiffs=%lx njiffs=%lx\n",
 		    vis_ha->host_no, cmd->serial_number, sp->state,
-		    atomic_read(&fcport->state), jiffies));
+		    atomic_read(&fcport->state), sp->r_start, jiffies));
 
 		/*
 		 * If FC_DEVICE is marked as dead return the cmd with
@@ -3980,8 +3975,7 @@
 
 	if (processed) {
 		qla2x00_done(dest_ha);
-
-		 return;
+		return;
 	}
 
 	spin_lock_irqsave(&dest_ha->list_lock, cpu_flags);
@@ -4146,13 +4140,13 @@
 
 			default:
 				DEBUG2(printk("scsi(%ld:%d:%d) %s: did_error "
-				    "= %d, comp-scsi= 0x%x-0x%x.\n",
+				    "= %d, comp-scsi= 0x%x-0x%x pid=%ld.\n",
 				    vis_ha->host_no,
 				    cmd->device->id, cmd->device->lun,
 				    __func__,
 				    host_byte(cmd->result),
 				    CMD_COMPL_STATUS(cmd),
-				    CMD_SCSI_STATUS(cmd)));
+				    CMD_SCSI_STATUS(cmd), cmd->serial_number));
 				break;
 		}
 
@@ -4273,11 +4267,10 @@
 			test_bit(ABORT_ISP_ACTIVE, &dest_ha->dpc_flags) ||
 			atomic_read(&dest_ha->loop_state) != LOOP_READY)) {
 
-			DEBUG3(printk("scsi(%ld): port=(0x%x) retry_q(%d) "
-			    "loop state = %d, loop counter = 0x%x dpc flags "
-			    "= 0x%lx\n",
-			    dest_ha->host_no,
-			    fcport->loop_id,
+			DEBUG3(printk("scsi(%ld): pid=%ld port=0x%x state=%d "
+			    "loop state=%d, loop counter=0x%x "
+			    "dpc_flags=0x%lx\n", sp->cmd->serial_number,
+			    dest_ha->host_no, fcport->loop_id,
 			    atomic_read(&fcport->state),
 			    atomic_read(&dest_ha->loop_state),
 			    atomic_read(&dest_ha->loop_down_timer),
@@ -4327,105 +4320,6 @@
 	}
 }
 
-
-/**************************************************************************
-*   qla2x00_check_tgt_status
-*
-* Description:
-*     Checks to see if the target or loop is down.
-*
-* Input:
-*     cmd - pointer to Scsi cmd structure
-*
-* Returns:
-*   1 - if target is present
-*   0 - if target is not present
-*
-**************************************************************************/
-int
-qla2x00_check_tgt_status(scsi_qla_host_t *ha, struct scsi_cmnd *cmd)
-{
-	os_lun_t        *lq;
-	unsigned int	b, t, l;
-	fc_port_t	*fcport;
-
-	/* Generate LU queue on bus, target, LUN */
-	b = cmd->device->channel;
-	t = cmd->device->id;
-	l = cmd->device->lun;
-
-	if ((lq = GET_LU_Q(ha,t,l)) == NULL) {
-		return (QLA_FUNCTION_FAILED);
-	}
-
-	fcport = lq->fclun->fcport;
-
-	if (TGT_Q(ha, t) == NULL ||
-	    l >= ha->max_luns ||
-	    atomic_read(&fcport->state) == FCS_DEVICE_DEAD ||
-	    atomic_read(&ha->loop_state) == LOOP_DEAD ||
-	    (!atomic_read(&ha->loop_down_timer) &&
-		atomic_read(&ha->loop_state) == LOOP_DOWN) ||
-	    test_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags) ||
-	    test_bit(ISP_ABORT_NEEDED, &ha->dpc_flags) ||
-	    atomic_read(&ha->loop_state) != LOOP_READY) {
-
-		DEBUG(printk(KERN_INFO
-		    "scsi(%ld:%2d:%2d:%2d): %s connection is down\n",
-		    ha->host_no,
-		    b, t, l,
-		    __func__));
-
-		cmd->result = DID_NO_CONNECT << 16;
-		return (QLA_FUNCTION_FAILED);
-	}
-	return (QLA_SUCCESS);
-}
-
-/**************************************************************************
-*   qla2x00_check_port_status
-*
-* Description:
-*     Checks to see if the port or loop is down.
-*
-* Input:
-*     fcport - pointer to fc_port_t structure.
-*
-* Returns:
-*   1 - if port is present
-*   0 - if port is not present
-*
-**************************************************************************/
-int
-qla2x00_check_port_status(scsi_qla_host_t *ha, fc_port_t *fcport)
-{
-	if (fcport == NULL) {
-		return (QLA_FUNCTION_FAILED);
-	}
-
-	if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD ||
-	    atomic_read(&ha->loop_state) == LOOP_DEAD) {
-		return (QLA_FUNCTION_FAILED);
-	}
-
-	if ((atomic_read(&fcport->state) != FCS_ONLINE) || 
-	    (!atomic_read(&ha->loop_down_timer) &&
-		atomic_read(&ha->loop_state) == LOOP_DOWN) ||
-	    (test_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags)) ||
-	    test_bit(CFG_ACTIVE, &ha->cfg_flags) ||
-	    test_bit(ISP_ABORT_NEEDED, &ha->dpc_flags) ||
-	    atomic_read(&ha->loop_state) != LOOP_READY) {
-
-		DEBUG(printk(KERN_INFO
-		    "scsi(%ld): Connection is down. fcport=%p.\n",
-		    ha->host_no, fcport));
-
-		return (QLA_BUSY);
-	}
-
-	return (QLA_SUCCESS);
-}
-
 /* XXX(hch): crude hack to emulate a down_timeout() */
 int
 qla2x00_down_timeout(struct semaphore *sema, unsigned long timeout)
@@ -4530,9 +4424,7 @@
 	if (!qla2xxx_transport_template)
 		return -ENODEV;
 
-	printk(KERN_INFO
-	    "QLogic Fibre Channel HBA Driver (%p)\n", qla2x00_set_info);
-
+	printk(KERN_INFO "QLogic Fibre Channel HBA Driver\n");
 	return 0;
 }
 
diff -Nru a/drivers/scsi/qla2xxx/qla_rscn.c b/drivers/scsi/qla2xxx/qla_rscn.c
--- a/drivers/scsi/qla2xxx/qla_rscn.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/scsi/qla2xxx/qla_rscn.c	2005-01-10 20:11:18 -08:00
@@ -85,7 +85,7 @@
 /** 
  * Mailbox IOCB callback array.
  **/
-int (*iocb_function_cb_list[LAST_IOCB_CB])
+static int (*iocb_function_cb_list[LAST_IOCB_CB])
 	(scsi_qla_host_t *, struct io_descriptor *, struct mbx_entry *) = {
 
 	qla2x00_send_abort_iocb_cb,
diff -Nru a/drivers/scsi/qla2xxx/qla_sup.c b/drivers/scsi/qla2xxx/qla_sup.c
--- a/drivers/scsi/qla2xxx/qla_sup.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/scsi/qla2xxx/qla_sup.c	2005-01-10 20:11:16 -08:00
@@ -26,7 +26,6 @@
 static void qla2x00_nv_deselect(scsi_qla_host_t *);
 static void qla2x00_nv_write(scsi_qla_host_t *, uint16_t);
 
-
 /*
  * NVRAM support routines
  */
@@ -80,6 +79,56 @@
 }
 
 /**
+ * qla2x00_release_nvram_protection() - 
+ * @ha: HA context
+ */
+void
+qla2x00_release_nvram_protection(scsi_qla_host_t *ha)
+{
+	device_reg_t *reg;
+	uint32_t word;
+
+	reg = ha->iobase;
+
+	/* Release NVRAM write protection. */
+	if (IS_QLA2322(ha) || IS_QLA6322(ha)) {
+		/* Write enable. */
+		qla2x00_nv_write(ha, NVR_DATA_OUT);
+		qla2x00_nv_write(ha, 0);
+		qla2x00_nv_write(ha, 0);
+		for (word = 0; word < 8; word++)
+			qla2x00_nv_write(ha, NVR_DATA_OUT);
+
+		qla2x00_nv_deselect(ha);
+
+		/* Enable protection register. */
+		qla2x00_nv_write(ha, NVR_PR_ENABLE | NVR_DATA_OUT);
+		qla2x00_nv_write(ha, NVR_PR_ENABLE);
+		qla2x00_nv_write(ha, NVR_PR_ENABLE);
+		for (word = 0; word < 8; word++)
+			qla2x00_nv_write(ha, NVR_DATA_OUT | NVR_PR_ENABLE);
+
+		qla2x00_nv_deselect(ha);
+
+		/* Clear protection register (ffff is cleared). */
+		qla2x00_nv_write(ha, NVR_PR_ENABLE | NVR_DATA_OUT);
+		qla2x00_nv_write(ha, NVR_PR_ENABLE | NVR_DATA_OUT);
+		qla2x00_nv_write(ha, NVR_PR_ENABLE | NVR_DATA_OUT);
+		for (word = 0; word < 8; word++)
+			qla2x00_nv_write(ha, NVR_DATA_OUT | NVR_PR_ENABLE);
+
+		qla2x00_nv_deselect(ha);
+
+		/* Wait for NVRAM to become ready. */
+		WRT_REG_WORD(&reg->nvram, NVR_SELECT);
+		do {
+			NVRAM_DELAY();
+			word = RD_REG_WORD(&reg->nvram);
+		} while ((word & NVR_DATA_IN) == 0);
+	}
+}
+
+/**
  * qla2x00_get_nvram_word() - Calculates word position in NVRAM and calls the
  *	request routine to get the word from NVRAM.
  * @ha: HA context
@@ -123,29 +172,6 @@
 
 	qla2x00_nv_deselect(ha);
 
-	/* Erase Location */
-	nv_cmd = (addr << 16) | NV_ERASE_OP;
-	nv_cmd <<= 5;
-	for (count = 0; count < 11; count++) {
-		if (nv_cmd & BIT_31)
-			qla2x00_nv_write(ha, NVR_DATA_OUT);
-		else
-			qla2x00_nv_write(ha, 0);
-
-		nv_cmd <<= 1;
-	}
-
-	qla2x00_nv_deselect(ha);
-
-	/* Wait for Erase to Finish */
-	WRT_REG_WORD(&reg->nvram, NVR_SELECT);
-	do {
-		NVRAM_DELAY();
-		word = RD_REG_WORD(&reg->nvram);
-	} while ((word & NVR_DATA_IN) == 0);
-
-	qla2x00_nv_deselect(ha);
-
 	/* Write data */
 	nv_cmd = (addr << 16) | NV_WRITE_OP;
 	nv_cmd |= data;
@@ -220,14 +246,14 @@
 		if (reg_data & NVR_DATA_IN)
 			data |= BIT_0;
 		WRT_REG_WORD(&reg->nvram, NVR_SELECT);
-		NVRAM_DELAY();
 		RD_REG_WORD(&reg->nvram);	/* PCI Posting. */
+		NVRAM_DELAY();
 	}
 
 	/* Deselect chip. */
 	WRT_REG_WORD(&reg->nvram, NVR_DESELECT);
-	NVRAM_DELAY();
 	RD_REG_WORD(&reg->nvram);		/* PCI Posting. */
+	NVRAM_DELAY();
 
 	return (data);
 }
@@ -236,14 +262,14 @@
  * qla2x00_nv_write() - Clean NVRAM operations.
  * @ha: HA context
  */
-void
+static void
 qla2x00_nv_deselect(scsi_qla_host_t *ha)
 {
 	device_reg_t __iomem *reg = ha->iobase;
 
 	WRT_REG_WORD(&reg->nvram, NVR_DESELECT);
-	NVRAM_DELAY();
 	RD_REG_WORD(&reg->nvram);		/* PCI Posting. */
+	NVRAM_DELAY();
 }
 
 /**
@@ -251,19 +277,20 @@
  * @ha: HA context
  * @data: Serial interface selector
  */
-void
+static void
 qla2x00_nv_write(scsi_qla_host_t *ha, uint16_t data)
 {
 	device_reg_t __iomem *reg = ha->iobase;
 
-	WRT_REG_WORD(&reg->nvram, data | NVR_SELECT);
-	NVRAM_DELAY();
+	WRT_REG_WORD(&reg->nvram, data | NVR_SELECT | NVR_WRT_ENABLE);
 	RD_REG_WORD(&reg->nvram);		/* PCI Posting. */
-	WRT_REG_WORD(&reg->nvram, data | NVR_SELECT | NVR_CLOCK);
 	NVRAM_DELAY();
+	WRT_REG_WORD(&reg->nvram, data | NVR_SELECT| NVR_CLOCK |
+	    NVR_WRT_ENABLE);
 	RD_REG_WORD(&reg->nvram);		/* PCI Posting. */
-	WRT_REG_WORD(&reg->nvram, data | NVR_SELECT);
 	NVRAM_DELAY();
+	WRT_REG_WORD(&reg->nvram, data | NVR_SELECT | NVR_WRT_ENABLE);
 	RD_REG_WORD(&reg->nvram);		/* PCI Posting. */
+	NVRAM_DELAY();
 }
 
diff -Nru a/drivers/scsi/qla2xxx/qla_version.h b/drivers/scsi/qla2xxx/qla_version.h
--- a/drivers/scsi/qla2xxx/qla_version.h	2005-01-10 20:11:18 -08:00
+++ b/drivers/scsi/qla2xxx/qla_version.h	2005-01-10 20:11:18 -08:00
@@ -19,9 +19,9 @@
 /*
  * Driver version 
  */
-#define QLA2XXX_VERSION      "8.00.00b21-k"
+#define QLA2XXX_VERSION      "8.00.02b4-k"
 
 #define QLA_DRIVER_MAJOR_VER	8
 #define QLA_DRIVER_MINOR_VER	0
-#define QLA_DRIVER_PATCH_VER	0
-#define QLA_DRIVER_BETA_VER	21
+#define QLA_DRIVER_PATCH_VER	2
+#define QLA_DRIVER_BETA_VER	4
diff -Nru a/drivers/scsi/qlogicfas.c b/drivers/scsi/qlogicfas.c
--- a/drivers/scsi/qlogicfas.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/scsi/qlogicfas.c	2005-01-10 20:11:23 -08:00
@@ -137,8 +137,8 @@
 static struct qlogicfas408_priv *cards;
 static int iobase[MAX_QLOGICFAS];
 static int irq[MAX_QLOGICFAS] = { [0 ... MAX_QLOGICFAS-1] = -1 };
-MODULE_PARM(iobase, "1-" __MODULE_STRING(MAX_QLOGICFAS) "i");
-MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_QLOGICFAS) "i");
+module_param_array(iobase, int, NULL, 0);
+module_param_array(irq, int, NULL, 0);
 MODULE_PARM_DESC(iobase, "I/O address");
 MODULE_PARM_DESC(irq, "IRQ");
 
diff -Nru a/drivers/scsi/sata_uli.c b/drivers/scsi/sata_uli.c
--- a/drivers/scsi/sata_uli.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/scsi/sata_uli.c	2005-01-10 20:11:22 -08:00
@@ -32,16 +32,18 @@
 #include <linux/libata.h>
 
 #define DRV_NAME	"sata_uli"
-#define DRV_VERSION	"0.2"
+#define DRV_VERSION	"0.5"
 
 enum {
 	uli_5289		= 0,
 	uli_5287		= 1,
+	uli_5281		= 2,
 
 	/* PCI configuration registers */
-	ULI_SCR_BASE		= 0x90, /* sata0 phy SCR registers */
-	ULI_SATA1_OFS		= 0x10, /* offset from sata0->sata1 phy regs */
-
+	ULI5287_BASE		= 0x90, /* sata0 phy SCR registers */
+	ULI5287_OFFS		= 0x10, /* offset from sata0->sata1 phy regs */
+	ULI5281_BASE		= 0x60, /* sata0 phy SCR  registers */
+	ULI5281_OFFS		= 0x60, /* offset from sata0->sata1 phy regs */
 };
 
 static int uli_init_one (struct pci_dev *pdev, const struct pci_device_id *ent);
@@ -51,6 +53,7 @@
 static struct pci_device_id uli_pci_tbl[] = {
 	{ PCI_VENDOR_ID_AL, 0x5289, PCI_ANY_ID, PCI_ANY_ID, 0, 0, uli_5289 },
 	{ PCI_VENDOR_ID_AL, 0x5287, PCI_ANY_ID, PCI_ANY_ID, 0, 0, uli_5287 },
+	{ PCI_VENDOR_ID_AL, 0x5281, PCI_ANY_ID, PCI_ANY_ID, 0, 0, uli_5281 },
 	{ }	/* terminate list */
 };
 
@@ -125,33 +128,15 @@
 MODULE_DEVICE_TABLE(pci, uli_pci_tbl);
 MODULE_VERSION(DRV_VERSION);
 
-static unsigned int get_scr_cfg_addr(unsigned int port_no, unsigned int sc_reg)
+static unsigned int get_scr_cfg_addr(struct ata_port *ap, unsigned int sc_reg)
 {
-	unsigned int addr = ULI_SCR_BASE + (4 * sc_reg);
-
-	switch (port_no) {
-	case 0:
-		break;
-	case 1:
-		addr += ULI_SATA1_OFS;
-		break;
-	case 2:
-		addr += ULI_SATA1_OFS*4;
-		break;
-	case 3:
-		addr += ULI_SATA1_OFS*5;
-		break;
-	default:
-		BUG();
-		break;
-	}
-	return addr;
+	return ap->ioaddr.scr_addr + (4 * sc_reg);
 }
 
 static u32 uli_scr_cfg_read (struct ata_port *ap, unsigned int sc_reg)
 {
 	struct pci_dev *pdev = to_pci_dev(ap->host_set->dev);
-	unsigned int cfg_addr = get_scr_cfg_addr(ap->port_no, sc_reg);
+	unsigned int cfg_addr = get_scr_cfg_addr(ap, sc_reg);
 	u32 val;
 
 	pci_read_config_dword(pdev, cfg_addr, &val);
@@ -161,7 +146,7 @@
 static void uli_scr_cfg_write (struct ata_port *ap, unsigned int scr, u32 val)
 {
 	struct pci_dev *pdev = to_pci_dev(ap->host_set->dev);
-	unsigned int cfg_addr = get_scr_cfg_addr(ap->port_no, scr);
+	unsigned int cfg_addr = get_scr_cfg_addr(ap, scr);
 
 	pci_write_config_dword(pdev, cfg_addr, val);
 }
@@ -222,9 +207,11 @@
 		rc = -ENOMEM;
 		goto err_out_regions;
 	}
-
+	
 	switch (board_idx) {
 	case uli_5287:
+		probe_ent->port[0].scr_addr = ULI5287_BASE;
+		probe_ent->port[1].scr_addr = ULI5287_BASE + ULI5287_OFFS;
        		probe_ent->n_ports = 4;
 
        		probe_ent->port[2].cmd_addr = pci_resource_start(pdev, 0) + 8;
@@ -232,19 +219,27 @@
 		probe_ent->port[2].ctl_addr =
 			(pci_resource_start(pdev, 1) | ATA_PCI_CTL_OFS) + 4;
 		probe_ent->port[2].bmdma_addr = pci_resource_start(pdev, 4) + 16;
+		probe_ent->port[2].scr_addr = ULI5287_BASE + ULI5287_OFFS*4;
 
 		probe_ent->port[3].cmd_addr = pci_resource_start(pdev, 2) + 8;
 		probe_ent->port[3].altstatus_addr =
 		probe_ent->port[3].ctl_addr =
 			(pci_resource_start(pdev, 3) | ATA_PCI_CTL_OFS) + 4;
 		probe_ent->port[3].bmdma_addr = pci_resource_start(pdev, 4) + 24;
+		probe_ent->port[3].scr_addr = ULI5287_BASE + ULI5287_OFFS*5;
 
 		ata_std_ports(&probe_ent->port[2]);
 		ata_std_ports(&probe_ent->port[3]);
 		break;
 
 	case uli_5289:
-		/* do nothing; ata_pci_init_native_mode did it all */
+		probe_ent->port[0].scr_addr = ULI5287_BASE;
+		probe_ent->port[1].scr_addr = ULI5287_BASE + ULI5287_OFFS;
+		break;
+
+	case uli_5281:
+		probe_ent->port[0].scr_addr = ULI5281_BASE;
+		probe_ent->port[1].scr_addr = ULI5281_BASE + ULI5281_OFFS;
 		break;
 
 	default:
diff -Nru a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
--- a/drivers/scsi/scsi.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/scsi/scsi.c	2005-01-10 20:11:19 -08:00
@@ -98,6 +98,9 @@
  * After the system is up, you may enable logging via the /proc interface.
  */
 unsigned int scsi_logging_level;
+#if defined(CONFIG_SCSI_LOGGING)
+EXPORT_SYMBOL(scsi_logging_level);
+#endif
 
 const char *const scsi_device_types[MAX_SCSI_DEVICE_CODE] = {
 	"Direct-Access    ",
@@ -115,6 +118,7 @@
 	"RAID             ",
 	"Enclosure        ",
 };
+EXPORT_SYMBOL(scsi_device_types);
 
 /*
  * Function:    scsi_allocate_request
@@ -147,6 +151,7 @@
 
 	return sreq;
 }
+EXPORT_SYMBOL(scsi_allocate_request);
 
 void __scsi_release_request(struct scsi_request *sreq)
 {
@@ -187,6 +192,7 @@
 	__scsi_release_request(sreq);
 	kfree(sreq);
 }
+EXPORT_SYMBOL(scsi_release_request);
 
 struct scsi_host_cmd_pool {
 	kmem_cache_t	*slab;
@@ -269,6 +275,7 @@
 
 	return cmd;
 }				
+EXPORT_SYMBOL(scsi_get_command);
 
 /*
  * Function:	scsi_put_command()
@@ -305,6 +312,7 @@
 
 	put_device(&sdev->sdev_gendev);
 }
+EXPORT_SYMBOL(scsi_put_command);
 
 /*
  * Function:	scsi_setup_command_freelist()
@@ -606,9 +614,7 @@
 				printk("queuecommand : command too long.\n"));
 		cmd->result = (DID_ABORT << 16);
 
-		spin_lock_irqsave(host->host_lock, flags);
 		scsi_done(cmd);
-		spin_unlock_irqrestore(host->host_lock, flags);
 		goto out;
 	}
 
@@ -961,6 +967,7 @@
 	spin_unlock(sdev->request_queue->queue_lock);
 	spin_unlock_irqrestore(&device_request_lock, flags);
 }
+EXPORT_SYMBOL(scsi_adjust_queue_depth);
 
 /*
  * Function:	scsi_track_queue_full()
@@ -1011,6 +1018,7 @@
 		scsi_adjust_queue_depth(sdev, MSG_SIMPLE_TAG, depth);
 	return depth;
 }
+EXPORT_SYMBOL(scsi_track_queue_full);
 
 /**
  * scsi_device_get  -  get an addition reference to a scsi_device
@@ -1177,6 +1185,7 @@
 
 	return 0;
 }
+EXPORT_SYMBOL(scsi_device_cancel);
 
 #ifdef CONFIG_HOTPLUG_CPU
 static int scsi_cpu_notify(struct notifier_block *self,
diff -Nru a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
--- a/drivers/scsi/scsi_debug.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/scsi/scsi_debug.c	2005-01-10 20:11:20 -08:00
@@ -55,8 +55,8 @@
 #include "scsi_logging.h"
 #include "scsi_debug.h"
 
-#define SCSI_DEBUG_VERSION "1.74"
-static const char * scsi_debug_version_date = "20040829";
+#define SCSI_DEBUG_VERSION "1.75"
+static const char * scsi_debug_version_date = "20041023";
 
 /* Additional Sense Code (ASC) used */
 #define NO_ADDED_SENSE 0x0
@@ -82,7 +82,7 @@
 #define DEF_EVERY_NTH   0
 #define DEF_NUM_PARTS   0
 #define DEF_OPTS   0
-#define DEF_SCSI_LEVEL   4    /* SPC-2 */
+#define DEF_SCSI_LEVEL   5    /* INQUIRY, byte2 [5->SPC-3] */
 #define DEF_PTYPE   0
 #define DEF_D_SENSE   0
 
@@ -95,6 +95,13 @@
  *   - a no response is simulated if SCSI_DEBUG_OPT_TIMEOUT is set
  *   - a RECOVERED_ERROR is simulated on successful read and write
  *     commands if SCSI_DEBUG_OPT_RECOVERED_ERR is set.
+ *
+ * When "every_nth" < 0 then after "- every_nth" commands:
+ *   - a no response is simulated if SCSI_DEBUG_OPT_TIMEOUT is set
+ *   - a RECOVERED_ERROR is simulated on successful read and write
+ *     commands if SCSI_DEBUG_OPT_RECOVERED_ERR is set.
+ * This will continue until some other action occurs (e.g. the user
+ * writing a new value (other than -1 or 1) to every_nth via sysfs).
  */
 
 /* when 1==SCSI_DEBUG_OPT_MEDIUM_ERR, a medium error is simulated at this
@@ -195,14 +202,12 @@
 	.cmd_per_lun =		3,
 	.max_sectors =		4096,
 	.unchecked_isa_dma = 	0,
-	.use_clustering = 	ENABLE_CLUSTERING,
+	.use_clustering = 	DISABLE_CLUSTERING,
 	.module =		THIS_MODULE,
 };
 
 static unsigned char * fake_storep;	/* ramdisk storage */
 
-static unsigned char spare_buff[SDEBUG_SENSE_LEN];
-
 static int num_aborts = 0;
 static int num_dev_resets = 0;
 static int num_bus_resets = 0;
@@ -228,21 +233,28 @@
 		(DRIVER_SENSE << 24) | SAM_STAT_CHECK_CONDITION;
 
 /* function declarations */
-static int resp_inquiry(unsigned char * cmd, int target, unsigned char * buff,
-			int bufflen, struct sdebug_dev_info * devip);
-static int resp_mode_sense(unsigned char * cmd, int target,
-			   unsigned char * buff, int bufflen,
+static int resp_inquiry(struct scsi_cmnd * SCpnt, int target,
+			struct sdebug_dev_info * devip);
+static int resp_requests(struct scsi_cmnd * SCpnt,
+			 struct sdebug_dev_info * devip);
+static int resp_readcap(struct scsi_cmnd * SCpnt,
+			struct sdebug_dev_info * devip);
+static int resp_mode_sense(struct scsi_cmnd * SCpnt, int target,
 			   struct sdebug_dev_info * devip);
 static int resp_read(struct scsi_cmnd * SCpnt, int upper_blk, int block,
 		     int num, struct sdebug_dev_info * devip);
 static int resp_write(struct scsi_cmnd * SCpnt, int upper_blk, int block,
 		      int num, struct sdebug_dev_info * devip);
-static int resp_report_luns(unsigned char * cmd, unsigned char * buff,
-			    int bufflen, struct sdebug_dev_info * devip);
+static int resp_report_luns(struct scsi_cmnd * SCpnt,
+			    struct sdebug_dev_info * devip);
+static int fill_from_dev_buffer(struct scsi_cmnd * scp, unsigned char * arr,
+                                int arr_len);
+static int fetch_to_dev_buffer(struct scsi_cmnd * scp, unsigned char * arr,
+                               int max_arr_len);
 static void timer_intr_handler(unsigned long);
 static struct sdebug_dev_info * devInfoReg(struct scsi_device * sdev);
 static void mk_sense_buffer(struct sdebug_dev_info * devip, int key,
-			    int asc, int asq, int inbandLen);
+			    int asc, int asq);
 static int check_reset(struct scsi_cmnd * SCpnt,
 		       struct sdebug_dev_info * devip);
 static int schedule_resp(struct scsi_cmnd * cmnd,
@@ -264,49 +276,20 @@
 static struct device pseudo_primary;
 static struct bus_type pseudo_lld_bus;
 
-static unsigned char * scatg2virt(const struct scatterlist * sclp)
-{
-	if (NULL == sclp)
-		return NULL;
-	else if (sclp->page)
-		return (unsigned char *)page_address(sclp->page) +
-		       sclp->offset;
-	else
-		return NULL;
-}
 
 static
 int scsi_debug_queuecommand(struct scsi_cmnd * SCpnt, done_funct_t done)
 {
 	unsigned char *cmd = (unsigned char *) SCpnt->cmnd;
 	int block, upper_blk, num, k;
-	unsigned char *buff;
 	int errsts = 0;
 	int target = SCpnt->device->id;
-	int bufflen = SCpnt->request_bufflen;
-	unsigned long capac;
 	struct sdebug_dev_info * devip = NULL;
-	unsigned char * sbuff;
 	int inj_recovered = 0;
 
 	if (done == NULL)
 		return 0;	/* assume mid level reprocessing command */
 
-	if (SCpnt->use_sg) { /* just use first element */
-		struct scatterlist *sgpnt = (struct scatterlist *)
-						SCpnt->request_buffer;
-
-		buff = scatg2virt(&sgpnt[0]);
-		bufflen = sgpnt[0].length;
-		/* READ and WRITE process scatterlist themselves */
-	}
-	else
-		buff = (unsigned char *) SCpnt->request_buffer;
-	if (NULL == buff) {
-		buff = spare_buff;	/* assume cmd moves no data */
-		bufflen = SDEBUG_SENSE_LEN;
-	}
-
 	if ((SCSI_DEBUG_OPT_NOISE & scsi_debug_opts) && cmd) {
 		printk(KERN_INFO "scsi_debug: cmd ");
 		for (k = 0, num = SCpnt->cmd_len; k < num; ++k)
@@ -328,9 +311,11 @@
 		return schedule_resp(SCpnt, NULL, done,
 				     DID_NO_CONNECT << 16, 0);
 
-        if ((scsi_debug_every_nth > 0) &&
-            (++scsi_debug_cmnd_count >= scsi_debug_every_nth)) {
-                scsi_debug_cmnd_count =0;
+        if ((scsi_debug_every_nth != 0) &&
+            (++scsi_debug_cmnd_count >= abs(scsi_debug_every_nth))) {
+                scsi_debug_cmnd_count = 0;
+		if (scsi_debug_every_nth < -1)
+			scsi_debug_every_nth = -1;
 		if (SCSI_DEBUG_OPT_TIMEOUT & scsi_debug_opts)
 			return 0; /* ignore command causing timeout */
 		else if (SCSI_DEBUG_OPT_RECOVERED_ERR & scsi_debug_opts)
@@ -339,23 +324,14 @@
 
 	switch (*cmd) {
 	case INQUIRY:     /* mandatory, ignore unit attention */
-		errsts = resp_inquiry(cmd, target, buff, bufflen, devip);
+		errsts = resp_inquiry(SCpnt, target, devip);
 		break;
 	case REQUEST_SENSE:	/* mandatory, ignore unit attention */
-		if (devip) {
-			sbuff = devip->sense_buff;
-			memcpy(buff, sbuff, (bufflen < SDEBUG_SENSE_LEN) ?
-					     bufflen : SDEBUG_SENSE_LEN);
-			mk_sense_buffer(devip, 0, NO_ADDED_SENSE, 0, 7);
-		} else {
-			memset(buff, 0, bufflen);
-			buff[0] = 0x70;
-		}
+		errsts = resp_requests(SCpnt, devip);
 		break;
 	case REZERO_UNIT:	/* actually this is REWIND for SSC */
 	case START_STOP:
 		errsts = check_reset(SCpnt, devip);
-		memset(buff, 0, bufflen);
 		break;
 	case ALLOW_MEDIUM_REMOVAL:
 		if ((errsts = check_reset(SCpnt, devip)))
@@ -366,40 +342,24 @@
 		break;
 	case SEND_DIAGNOSTIC:     /* mandatory */
 		errsts = check_reset(SCpnt, devip);
-		memset(buff, 0, bufflen);
 		break;
 	case TEST_UNIT_READY:     /* mandatory */
 		errsts = check_reset(SCpnt, devip);
-		memset(buff, 0, bufflen);
 		break;
         case RESERVE:
 		errsts = check_reset(SCpnt, devip);
-		memset(buff, 0, bufflen);
                 break;
         case RESERVE_10:
 		errsts = check_reset(SCpnt, devip);
-		memset(buff, 0, bufflen);
                 break;
         case RELEASE:
 		errsts = check_reset(SCpnt, devip);
-		memset(buff, 0, bufflen);
                 break;
         case RELEASE_10:
 		errsts = check_reset(SCpnt, devip);
-		memset(buff, 0, bufflen);
                 break;
 	case READ_CAPACITY:
-		errsts = check_reset(SCpnt, devip);
-		memset(buff, 0, bufflen);
-		if (bufflen > 7) {
-			capac = (unsigned long)sdebug_capacity - 1;
-			buff[0] = (capac >> 24);
-			buff[1] = (capac >> 16) & 0xff;
-			buff[2] = (capac >> 8) & 0xff;
-			buff[3] = capac & 0xff;
-			buff[6] = (SECT_SIZE_PER(target) >> 8) & 0xff;
-			buff[7] = SECT_SIZE_PER(target) & 0xff;
-		}
+		errsts = resp_readcap(SCpnt, devip);
 		break;
 	case READ_16:
 	case READ_12:
@@ -432,12 +392,15 @@
 		errsts = resp_read(SCpnt, upper_blk, block, num, devip);
 		if (inj_recovered && (0 == errsts)) {
 			mk_sense_buffer(devip, RECOVERED_ERROR,
-					THRESHHOLD_EXCEEDED, 0, 18);
+					THRESHHOLD_EXCEEDED, 0);
 			errsts = check_condition_result;
 		}
 		break;
 	case REPORT_LUNS:	/* mandatory, ignore unit attention */
-		errsts = resp_report_luns(cmd, buff, bufflen, devip);
+		errsts = resp_report_luns(SCpnt, devip);
+		break;
+	case VERIFY:		/* 10 byte SBC-2 command */
+		errsts = check_reset(SCpnt, devip);
 		break;
 	case WRITE_16:
 	case WRITE_12:
@@ -470,19 +433,16 @@
 		errsts = resp_write(SCpnt, upper_blk, block, num, devip);
 		if (inj_recovered && (0 == errsts)) {
 			mk_sense_buffer(devip, RECOVERED_ERROR,
-					THRESHHOLD_EXCEEDED, 0, 18);
+					THRESHHOLD_EXCEEDED, 0);
 			errsts = check_condition_result;
 		}
 		break;
 	case MODE_SENSE:
 	case MODE_SENSE_10:
-		if ((errsts = check_reset(SCpnt, devip)))
-			break;
-		errsts = resp_mode_sense(cmd, target, buff, bufflen, devip);
+		errsts = resp_mode_sense(SCpnt, target, devip);
 		break;
 	case SYNCHRONIZE_CACHE:
 		errsts = check_reset(SCpnt, devip);
-		memset(buff, 0, bufflen);
 		break;
 	default:
 		if (SCSI_DEBUG_OPT_NOISE & scsi_debug_opts)
@@ -490,7 +450,7 @@
 			       "supported\n", *cmd);
 		if ((errsts = check_reset(SCpnt, devip)))
 			break;	/* Unit attention takes precedence */
-		mk_sense_buffer(devip, ILLEGAL_REQUEST, INVALID_OPCODE, 0, 18);
+		mk_sense_buffer(devip, ILLEGAL_REQUEST, INVALID_OPCODE, 0);
 		errsts = check_condition_result;
 		break;
 	}
@@ -513,18 +473,105 @@
 			printk(KERN_INFO "scsi_debug: Reporting Unit "
 			       "attention: power on reset\n");
 		devip->reset = 0;
-		mk_sense_buffer(devip, UNIT_ATTENTION, POWERON_RESET, 0, 18);
+		mk_sense_buffer(devip, UNIT_ATTENTION, POWERON_RESET, 0);
 		return check_condition_result;
 	}
 	return 0;
 }
 
-#define SDEBUG_LONG_INQ_SZ 96
-#define SDEBUG_MAX_INQ_ARR_SZ 128
+/* Returns 0 if ok else (DID_ERROR << 16). Sets scp->resid . */
+static int fill_from_dev_buffer(struct scsi_cmnd * scp, unsigned char * arr,
+				int arr_len)
+{
+	int k, req_len, act_len, len, active;
+	void * kaddr;
+	void * kaddr_off;
+	struct scatterlist * sgpnt;
+
+	if (0 == scp->request_bufflen)
+		return 0;
+	if (NULL == scp->request_buffer)
+		return (DID_ERROR << 16);
+	if (! ((scp->sc_data_direction == DMA_BIDIRECTIONAL) ||
+	      (scp->sc_data_direction == DMA_FROM_DEVICE)))
+		return (DID_ERROR << 16);
+	if (0 == scp->use_sg) {
+		req_len = scp->request_bufflen;
+		act_len = (req_len < arr_len) ? req_len : arr_len;
+		memcpy(scp->request_buffer, arr, act_len);
+		scp->resid = req_len - act_len;
+		return 0;
+	}
+	sgpnt = (struct scatterlist *)scp->request_buffer;
+	active = 1;
+	for (k = 0, req_len = 0, act_len = 0; k < scp->use_sg; ++k, ++sgpnt) {
+		if (active) {
+			kaddr = (unsigned char *)
+				kmap_atomic(sgpnt->page, KM_USER0);
+			if (NULL == kaddr)
+				return (DID_ERROR << 16);
+			kaddr_off = (unsigned char *)kaddr + sgpnt->offset;
+			len = sgpnt->length;
+			if ((req_len + len) > arr_len) {
+				active = 0;
+				len = arr_len - req_len;
+			}
+			memcpy(kaddr_off, arr + req_len, len);
+			kunmap_atomic(kaddr, KM_USER0);
+			act_len += len;
+		}
+		req_len += sgpnt->length;
+	}
+	scp->resid = req_len - act_len;
+	return 0;
+}
 
-static const char * vendor_id = "Linux   ";
-static const char * product_id = "scsi_debug      ";
-static const char * product_rev = "0004";
+/* Returns number of bytes fetched into 'arr' or -1 if error. */
+static int fetch_to_dev_buffer(struct scsi_cmnd * scp, unsigned char * arr,
+			       int max_arr_len)
+{
+	int k, req_len, len, fin;
+	void * kaddr;
+	void * kaddr_off;
+	struct scatterlist * sgpnt;
+
+	if (0 == scp->request_bufflen)
+		return 0;
+	if (NULL == scp->request_buffer)
+		return -1;
+	if (! ((scp->sc_data_direction == DMA_BIDIRECTIONAL) ||
+	      (scp->sc_data_direction == DMA_TO_DEVICE)))
+		return -1;
+	if (0 == scp->use_sg) {
+		req_len = scp->request_bufflen;
+		len = (req_len < max_arr_len) ? req_len : max_arr_len;
+		memcpy(arr, scp->request_buffer, len);
+		return len;
+	}
+	sgpnt = (struct scatterlist *)scp->request_buffer;
+	for (k = 0, req_len = 0, fin = 0; k < scp->use_sg; ++k, ++sgpnt) {
+		kaddr = (unsigned char *)kmap_atomic(sgpnt->page, KM_USER0);
+		if (NULL == kaddr)
+			return -1;
+		kaddr_off = (unsigned char *)kaddr + sgpnt->offset;
+		len = sgpnt->length;
+		if ((req_len + len) > max_arr_len) {
+			len = max_arr_len - req_len;
+			fin = 1;
+		}
+		memcpy(arr + req_len, kaddr_off, len);
+		kunmap_atomic(kaddr, KM_USER0);
+		if (fin)
+			return req_len + len;
+		req_len += sgpnt->length;
+	}
+	return req_len;
+}
+
+
+static const char * inq_vendor_id = "Linux   ";
+static const char * inq_product_id = "scsi_debug      ";
+static const char * inq_product_rev = "0004";
 
 static int inquiry_evpd_83(unsigned char * arr, int dev_id_num,
 			   const char * dev_id_str, int dev_id_str_len)
@@ -536,8 +583,8 @@
 	arr[0] = 0x2;	/* ASCII */
 	arr[1] = 0x1;
 	arr[2] = 0x0;
-	memcpy(&arr[4], vendor_id, 8);
-	memcpy(&arr[12], product_id, 16);
+	memcpy(&arr[4], inq_vendor_id, 8);
+	memcpy(&arr[12], inq_product_id, 16);
 	memcpy(&arr[28], dev_id_str, dev_id_str_len);
 	num = 8 + 16 + dev_id_str_len;
 	arr[3] = num;
@@ -558,24 +605,25 @@
 	return num + 12;
 }
 
-static int resp_inquiry(unsigned char * cmd, int target, unsigned char * buff,
-			int bufflen, struct sdebug_dev_info * devip)
+
+#define SDEBUG_LONG_INQ_SZ 96
+#define SDEBUG_MAX_INQ_ARR_SZ 128
+
+static int resp_inquiry(struct scsi_cmnd * scp, int target,
+			struct sdebug_dev_info * devip)
 {
 	unsigned char pq_pdt;
 	unsigned char arr[SDEBUG_MAX_INQ_ARR_SZ];
-	int min_len = bufflen > SDEBUG_MAX_INQ_ARR_SZ ?
-			SDEBUG_MAX_INQ_ARR_SZ : bufflen;
+	unsigned char *cmd = (unsigned char *)scp->cmnd;
+	int alloc_len;
 
-	if (bufflen < cmd[4])
-		printk(KERN_INFO "scsi_debug: inquiry: bufflen=%d "
-		       "< alloc_length=%d\n", bufflen, (int)cmd[4]);
-	memset(buff, 0, bufflen);
+	alloc_len = (cmd[3] << 8) + cmd[4];
 	memset(arr, 0, SDEBUG_MAX_INQ_ARR_SZ);
 	pq_pdt = (scsi_debug_ptype & 0x1f);
 	arr[0] = pq_pdt;
 	if (0x2 & cmd[1]) {  /* CMDDT bit set */
 		mk_sense_buffer(devip, ILLEGAL_REQUEST, INVALID_FIELD_IN_CDB,
-			       	0, 18);
+			       	0);
 		return check_condition_result;
 	} else if (0x1 & cmd[1]) {  /* EVPD bit set */
 		int dev_id_num, len;
@@ -600,11 +648,11 @@
 		} else {
 			/* Illegal request, invalid field in cdb */
 			mk_sense_buffer(devip, ILLEGAL_REQUEST,
-					INVALID_FIELD_IN_CDB, 0, 18);
+					INVALID_FIELD_IN_CDB, 0);
 			return check_condition_result;
 		}
-		memcpy(buff, arr, min_len);
-		return 0;
+		return fill_from_dev_buffer(scp, arr,
+			    min(alloc_len, SDEBUG_MAX_INQ_ARR_SZ));
 	}
 	/* drops through here for a standard inquiry */
 	arr[1] = DEV_REMOVEABLE(target) ? 0x80 : 0;	/* Removable disk */
@@ -612,20 +660,67 @@
 	arr[3] = 2;    /* response_data_format==2 */
 	arr[4] = SDEBUG_LONG_INQ_SZ - 5;
 	arr[6] = 0x1; /* claim: ADDR16 */
+	/* arr[6] |= 0x40; ... claim: EncServ (enclosure services) */
 	arr[7] = 0x3a; /* claim: WBUS16, SYNC, LINKED + CMDQUE */
-	memcpy(&arr[8], vendor_id, 8);
-	memcpy(&arr[16], product_id, 16);
-	memcpy(&arr[32], product_rev, 4);
+	memcpy(&arr[8], inq_vendor_id, 8);
+	memcpy(&arr[16], inq_product_id, 16);
+	memcpy(&arr[32], inq_product_rev, 4);
 	/* version descriptors (2 bytes each) follow */
 	arr[58] = 0x0; arr[59] = 0x40; /* SAM-2 */
-	arr[60] = 0x2; arr[61] = 0x60; /* SPC-2 */
+	arr[60] = 0x3; arr[61] = 0x0;  /* SPC-3 */
 	if (scsi_debug_ptype == 0) {
-	    arr[62] = 0x1; arr[63] = 0x80; /* SBC */
+		arr[62] = 0x1; arr[63] = 0x80; /* SBC */
 	} else if (scsi_debug_ptype == 1) {
-	    arr[62] = 0x2; arr[63] = 0x00; /* SSC */
+		arr[62] = 0x2; arr[63] = 0x00; /* SSC */
 	}
-	memcpy(buff, arr, min_len);
-	return 0;
+	return fill_from_dev_buffer(scp, arr,
+			    min(alloc_len, SDEBUG_LONG_INQ_SZ));
+}
+
+static int resp_requests(struct scsi_cmnd * scp,
+			 struct sdebug_dev_info * devip)
+{
+	unsigned char * sbuff;
+	unsigned char *cmd = (unsigned char *)scp->cmnd;
+	unsigned char arr[SDEBUG_SENSE_LEN];
+	int len = 18;
+
+	memset(arr, 0, SDEBUG_SENSE_LEN);
+	if (devip->reset == 1)
+		mk_sense_buffer(devip, 0, NO_ADDED_SENSE, 0);
+	sbuff = devip->sense_buff;
+	if ((cmd[1] & 1) && (! scsi_debug_dsense)) {
+		/* DESC bit set and sense_buff in fixed format */
+		arr[0] = 0x72;
+		arr[1] = sbuff[2];     /* sense key */
+		arr[2] = sbuff[12];    /* asc */
+		arr[3] = sbuff[13];    /* ascq */
+		len = 8;
+	} else
+		memcpy(arr, sbuff, SDEBUG_SENSE_LEN);
+	mk_sense_buffer(devip, 0, NO_ADDED_SENSE, 0);
+	return fill_from_dev_buffer(scp, arr, len);
+}
+
+#define SDEBUG_READCAP_ARR_SZ 8
+static int resp_readcap(struct scsi_cmnd * scp,
+			struct sdebug_dev_info * devip)
+{
+	unsigned char arr[SDEBUG_READCAP_ARR_SZ];
+	unsigned long capac;
+	int errsts;
+
+	if ((errsts = check_reset(scp, devip)))
+		return errsts;
+	memset(arr, 0, SDEBUG_READCAP_ARR_SZ);
+	capac = (unsigned long)sdebug_capacity - 1;
+	arr[0] = (capac >> 24);
+	arr[1] = (capac >> 16) & 0xff;
+	arr[2] = (capac >> 8) & 0xff;
+	arr[3] = capac & 0xff;
+	arr[6] = (SECT_SIZE_PER(target) >> 8) & 0xff;
+	arr[7] = SECT_SIZE_PER(target) & 0xff;
+	return fill_from_dev_buffer(scp, arr, SDEBUG_READCAP_ARR_SZ);
 }
 
 /* <<Following mode page info copied from ST318451LW>> */
@@ -706,34 +801,29 @@
 
 #define SDEBUG_MAX_MSENSE_SZ 256
 
-static int resp_mode_sense(unsigned char * cmd, int target,
-			   unsigned char * buff, int bufflen,
+static int resp_mode_sense(struct scsi_cmnd * scp, int target,
 			   struct sdebug_dev_info * devip)
 {
 	unsigned char dbd;
 	int pcontrol, pcode, subpcode;
 	unsigned char dev_spec;
-	int alloc_len, msense_6, offset, len;
+	int alloc_len, msense_6, offset, len, errsts;
 	unsigned char * ap;
 	unsigned char arr[SDEBUG_MAX_MSENSE_SZ];
-	int min_len = bufflen > SDEBUG_MAX_MSENSE_SZ ?
-			SDEBUG_MAX_MSENSE_SZ : bufflen;
+	unsigned char *cmd = (unsigned char *)scp->cmnd;
 
-	SCSI_LOG_LLQUEUE(3, printk("Mode sense ...(%p %d)\n", buff, bufflen));
+	if ((errsts = check_reset(scp, devip)))
+		return errsts;
 	dbd = cmd[1] & 0x8;
 	pcontrol = (cmd[2] & 0xc0) >> 6;
 	pcode = cmd[2] & 0x3f;
 	subpcode = cmd[3];
 	msense_6 = (MODE_SENSE == cmd[0]);
 	alloc_len = msense_6 ? cmd[4] : ((cmd[7] << 8) | cmd[8]);
-	if (bufflen < alloc_len)
-		printk(KERN_INFO "scsi_debug: mode_sense: bufflen=%d "
-		       "< alloc_length=%d\n", bufflen, alloc_len);
-	memset(buff, 0, bufflen);
 	memset(arr, 0, SDEBUG_MAX_MSENSE_SZ);
 	if (0x3 == pcontrol) {  /* Saving values not supported */
 		mk_sense_buffer(devip, ILLEGAL_REQUEST, SAVING_PARAMS_UNSUP,
-			       	0, 18);
+			       	0);
 		return check_condition_result;
 	}
 	dev_spec = DEV_READONLY(target) ? 0x80 : 0x0;
@@ -748,7 +838,7 @@
 
 	if (0 != subpcode) { /* TODO: Control Extension page */
 		mk_sense_buffer(devip, ILLEGAL_REQUEST, INVALID_FIELD_IN_CDB,
-			       	0, 18);
+			       	0);
 		return check_condition_result;
 	}
 	switch (pcode) {
@@ -787,146 +877,104 @@
 		break;
 	default:
 		mk_sense_buffer(devip, ILLEGAL_REQUEST, INVALID_FIELD_IN_CDB,
-			       	0, 18);
+			       	0);
 		return check_condition_result;
 	}
 	if (msense_6)
 		arr[0] = offset - 1;
 	else {
-		offset -= 2;
-		arr[0] = (offset >> 8) & 0xff;
-		arr[1] = offset & 0xff;
+		arr[0] = ((offset - 2) >> 8) & 0xff;
+		arr[1] = (offset - 2) & 0xff;
 	}
-	memcpy(buff, arr, min_len);
-	return 0;
+	return fill_from_dev_buffer(scp, arr, min(alloc_len, offset));
 }
 
 static int resp_read(struct scsi_cmnd * SCpnt, int upper_blk, int block,
 		     int num, struct sdebug_dev_info * devip)
 {
-        unsigned char *buff = (unsigned char *) SCpnt->request_buffer;
-        int nbytes, sgcount;
-        struct scatterlist *sgpnt = NULL;
-        int bufflen = SCpnt->request_bufflen;
 	unsigned long iflags;
+	int ret;
 
 	if (upper_blk || (block + num > sdebug_capacity)) {
 		mk_sense_buffer(devip, ILLEGAL_REQUEST, ADDR_OUT_OF_RANGE,
-				0, 18);
+				0);
 		return check_condition_result;
 	}
 	if ((SCSI_DEBUG_OPT_MEDIUM_ERR & scsi_debug_opts) &&
 	    (block <= OPT_MEDIUM_ERR_ADDR) &&
 	    ((block + num) > OPT_MEDIUM_ERR_ADDR)) {
 		mk_sense_buffer(devip, MEDIUM_ERROR, UNRECOVERED_READ_ERR,
-				0, 18);
+				0);
 		/* claim unrecoverable read error */
 		return check_condition_result;
 	}
 	read_lock_irqsave(&atomic_rw, iflags);
-        sgcount = 0;
-	nbytes = bufflen;
-	/* printk(KERN_INFO "scsi_debug_read: block=%d, tot_bufflen=%d\n",
-	       block, bufflen); */
-	if (SCpnt->use_sg) {
-		sgcount = 0;
-		sgpnt = (struct scatterlist *) buff;
-		buff = scatg2virt(&sgpnt[sgcount]);
-		bufflen = sgpnt[sgcount].length;
-	}
-	do {
-		memcpy(buff, fake_storep + (block * SECT_SIZE), bufflen);
-		nbytes -= bufflen;
-		if (SCpnt->use_sg) {
-			block += bufflen >> POW2_SECT_SIZE;
-			sgcount++;
-			if (nbytes) {
-				buff = scatg2virt(&sgpnt[sgcount]);
-				bufflen = sgpnt[sgcount].length;
-			}
-		} else if (nbytes > 0)
-			printk(KERN_WARNING "scsi_debug:resp_read: unexpected "
-			       "nbytes=%d\n", nbytes);
-	} while (nbytes);
+	ret = fill_from_dev_buffer(SCpnt, fake_storep + (block * SECT_SIZE),
+			   	   num * SECT_SIZE);
 	read_unlock_irqrestore(&atomic_rw, iflags);
-	return 0;
+	return ret;
 }
 
 static int resp_write(struct scsi_cmnd * SCpnt, int upper_blk, int block,
 		      int num, struct sdebug_dev_info * devip)
 {
-        unsigned char *buff = (unsigned char *) SCpnt->request_buffer;
-        int nbytes, sgcount;
-        struct scatterlist *sgpnt = NULL;
-        int bufflen = SCpnt->request_bufflen;
 	unsigned long iflags;
+	int res;
 
 	if (upper_blk || (block + num > sdebug_capacity)) {
 		mk_sense_buffer(devip, ILLEGAL_REQUEST, ADDR_OUT_OF_RANGE,
-			       	0, 18);
+			       	0);
 		return check_condition_result;
 	}
 
 	write_lock_irqsave(&atomic_rw, iflags);
-        sgcount = 0;
-	nbytes = bufflen;
-	if (SCpnt->use_sg) {
-		sgcount = 0;
-		sgpnt = (struct scatterlist *) buff;
-		buff = scatg2virt(&sgpnt[sgcount]);
-		bufflen = sgpnt[sgcount].length;
-	}
-	do {
-		memcpy(fake_storep + (block * SECT_SIZE), buff, bufflen);
-
-		nbytes -= bufflen;
-		if (SCpnt->use_sg) {
-			block += bufflen >> POW2_SECT_SIZE;
-			sgcount++;
-			if (nbytes) {
-				buff = scatg2virt(&sgpnt[sgcount]);
-				bufflen = sgpnt[sgcount].length;
-			}
-		} else if (nbytes > 0)
-			printk(KERN_WARNING "scsi_debug:resp_write: "
-			       "unexpected nbytes=%d\n", nbytes);
-	} while (nbytes);
+	res = fetch_to_dev_buffer(SCpnt, fake_storep + (block * SECT_SIZE),
+			   	  num * SECT_SIZE);
 	write_unlock_irqrestore(&atomic_rw, iflags);
+	if (-1 == res)
+		return (DID_ERROR << 16);
+	else if ((res < (num * SECT_SIZE)) &&
+		 (SCSI_DEBUG_OPT_NOISE & scsi_debug_opts))
+		printk(KERN_INFO "scsi_debug: write: cdb indicated=%d, "
+		       " IO sent=%d bytes\n", num * SECT_SIZE, res);
 	return 0;
 }
 
-static int resp_report_luns(unsigned char * cmd, unsigned char * buff,
-			    int bufflen, struct sdebug_dev_info * devip)
+#define SDEBUG_RLUN_ARR_SZ 128
+
+static int resp_report_luns(struct scsi_cmnd * scp,
+			    struct sdebug_dev_info * devip)
 {
 	unsigned int alloc_len;
 	int lun_cnt, i, upper;
+	unsigned char *cmd = (unsigned char *)scp->cmnd;
 	int select_report = (int)cmd[2];
 	struct scsi_lun *one_lun;
+	unsigned char arr[SDEBUG_RLUN_ARR_SZ];
 
 	alloc_len = cmd[9] + (cmd[8] << 8) + (cmd[7] << 16) + (cmd[6] << 24);
 	if ((alloc_len < 16) || (select_report > 2)) {
 		mk_sense_buffer(devip, ILLEGAL_REQUEST, INVALID_FIELD_IN_CDB,
-			       	0, 18);
+			       	0);
 		return check_condition_result;
 	}
-	if (bufflen > 8) { /* can produce response with up to 16k luns
-			      (lun 0 to lun 16383) */
-		memset(buff, 0, bufflen);
-		lun_cnt = scsi_debug_max_luns;
-		buff[2] = ((sizeof(struct scsi_lun) * lun_cnt) >> 8) & 0xff;
-		buff[3] = (sizeof(struct scsi_lun) * lun_cnt) & 0xff;
-		lun_cnt = min((int)((bufflen - 8) / sizeof(struct scsi_lun)),
-			      lun_cnt);
-		one_lun = (struct scsi_lun *) &buff[8];
-		for (i = 0; i < lun_cnt; i++) {
-			upper = (i >> 8) & 0x3f;
-			if (upper)
-				one_lun[i].scsi_lun[0] =
-				    (upper | (SAM2_LUN_ADDRESS_METHOD << 6));
-			one_lun[i].scsi_lun[1] = i & 0xff;
-		}
+	/* can produce response with up to 16k luns (lun 0 to lun 16383) */
+	memset(arr, 0, SDEBUG_RLUN_ARR_SZ);
+	lun_cnt = scsi_debug_max_luns;
+	arr[2] = ((sizeof(struct scsi_lun) * lun_cnt) >> 8) & 0xff;
+	arr[3] = (sizeof(struct scsi_lun) * lun_cnt) & 0xff;
+	lun_cnt = min((int)((SDEBUG_RLUN_ARR_SZ - 8) /
+			    sizeof(struct scsi_lun)), lun_cnt);
+	one_lun = (struct scsi_lun *) &arr[8];
+	for (i = 0; i < lun_cnt; i++) {
+		upper = (i >> 8) & 0x3f;
+		if (upper)
+			one_lun[i].scsi_lun[0] =
+			    (upper | (SAM2_LUN_ADDRESS_METHOD << 6));
+		one_lun[i].scsi_lun[1] = i & 0xff;
 	}
-	return 0;
+	return fill_from_dev_buffer(scp, arr,
+				    min((int)alloc_len, SDEBUG_RLUN_ARR_SZ));
 }
 
 /* When timer goes off this function is called. */
@@ -1041,14 +1089,19 @@
 		open_devip->reset = 1;
 		open_devip->used = 1;
 		memset(open_devip->sense_buff, 0, SDEBUG_SENSE_LEN);
-		open_devip->sense_buff[0] = 0x70;
+		if (scsi_debug_dsense)
+			open_devip->sense_buff[0] = 0x72;
+		else {
+			open_devip->sense_buff[0] = 0x70;
+			open_devip->sense_buff[7] = 0xa;
+		}
 		return open_devip;
         }
         return NULL;
 }
 
 static void mk_sense_buffer(struct sdebug_dev_info * devip, int key,
-			    int asc, int asq, int inbandLen)
+			    int asc, int asq)
 {
 	unsigned char * sbuff;
 
@@ -1060,11 +1113,9 @@
 		sbuff[2] = asc;
 		sbuff[3] = asq;
 	} else {
-		if (inbandLen > SDEBUG_SENSE_LEN)
-			inbandLen = SDEBUG_SENSE_LEN;
 		sbuff[0] = 0x70;  /* fixed, current */
 		sbuff[2] = key;
-		sbuff[7] = (inbandLen > 7) ? (inbandLen - 8) : 0;
+		sbuff[7] = 0xa;	  /* implies 18 byte sense buffer */
 		sbuff[12] = asc;
 		sbuff[13] = asq;
 	}
@@ -1355,7 +1406,7 @@
 MODULE_PARM_DESC(num_tgts, "number of SCSI targets per host to simulate");
 MODULE_PARM_DESC(opts, "1->noise, 2->medium_error, 4->...");
 MODULE_PARM_DESC(ptype, "SCSI peripheral type(def=0[disk])");
-MODULE_PARM_DESC(scsi_level, "SCSI level to simulate(def=4[SPC-2])");
+MODULE_PARM_DESC(scsi_level, "SCSI level to simulate(def=5[SPC-3])");
 
 
 static char sdebug_info[256];
@@ -1391,7 +1442,7 @@
 		if (1 != sscanf(arr, "%d", &pos))
 			return -EINVAL;
 		scsi_debug_opts = pos;
-		if (scsi_debug_every_nth > 0)
+		if (scsi_debug_every_nth != 0)
                         scsi_debug_cmnd_count = 0;
 		return length;
 	}
@@ -1547,7 +1598,7 @@
 {
         int nth;
 
-	if ((count > 0) && (1 == sscanf(buf, "%d", &nth)) && (nth >= 0)) {
+	if ((count > 0) && (1 == sscanf(buf, "%d", &nth))) {
 		scsi_debug_every_nth = nth;
 		scsi_debug_cmnd_count = 0;
 		return count;
diff -Nru a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
--- a/drivers/scsi/scsi_error.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/scsi/scsi_error.c	2005-01-10 20:11:15 -08:00
@@ -125,6 +125,7 @@
 
 	add_timer(&scmd->eh_timeout);
 }
+EXPORT_SYMBOL(scsi_add_timer);
 
 /**
  * scsi_delete_timer - Delete/cancel timer for a given function.
@@ -152,6 +153,7 @@
 
 	return rtn;
 }
+EXPORT_SYMBOL(scsi_delete_timer);
 
 /**
  * scsi_times_out - Timeout function for normal scsi commands.
@@ -214,6 +216,7 @@
 
 	return online;
 }
+EXPORT_SYMBOL(scsi_block_when_processing_errors);
 
 #ifdef CONFIG_SCSI_LOGGING
 /**
@@ -268,16 +271,42 @@
  *
  * Return value:
  * 	SUCCESS or FAILED or NEEDS_RETRY
+ *
+ * Notes:
+ *	When a deferred error is detected the current command has
+ *	not been executed and needs retrying.
  **/
 static int scsi_check_sense(struct scsi_cmnd *scmd)
 {
-	if (!SCSI_SENSE_VALID(scmd))
-		return FAILED;
+	struct scsi_sense_hdr sshdr;
 
-	if (scmd->sense_buffer[2] & 0xe0)
-		return SUCCESS;
+	if (! scsi_command_normalize_sense(scmd, &sshdr))
+		return FAILED;	/* no valid sense data */
 
-	switch (scmd->sense_buffer[2] & 0xf) {
+	if (scsi_sense_is_deferred(&sshdr))
+		return NEEDS_RETRY;
+
+	/*
+	 * Previous logic looked for FILEMARK, EOM or ILI which are
+	 * mainly associated with tapes and returned SUCCESS.
+	 */
+	if (sshdr.response_code == 0x70) {
+		/* fixed format */
+		if (scmd->sense_buffer[2] & 0xe0)
+			return SUCCESS;
+	} else {
+		/*
+		 * descriptor format: look for "stream commands sense data
+		 * descriptor" (see SSC-3). Assume single sense data
+		 * descriptor. Ignore ILI from SBC-2 READ LONG and WRITE LONG.
+		 */
+		if ((sshdr.additional_length > 3) &&
+		    (scmd->sense_buffer[8] == 0x4) &&
+		    (scmd->sense_buffer[11] & 0xe0))
+			return SUCCESS;
+	}
+
+	switch (sshdr.sense_key) {
 	case NO_SENSE:
 		return SUCCESS;
 	case RECOVERED_ERROR:
@@ -301,19 +330,15 @@
 		 * if the device is in the process of becoming ready, we 
 		 * should retry.
 		 */
-		if ((scmd->sense_buffer[12] == 0x04) &&
-			(scmd->sense_buffer[13] == 0x01)) {
+		if ((sshdr.asc == 0x04) && (sshdr.ascq == 0x01))
 			return NEEDS_RETRY;
-		}
 		/*
 		 * if the device is not started, we need to wake
 		 * the error handler to start the motor
 		 */
 		if (scmd->device->allow_restart &&
-		    (scmd->sense_buffer[12] == 0x04) &&
-		    (scmd->sense_buffer[13] == 0x02)) {
+		    (sshdr.asc == 0x04) && (sshdr.ascq == 0x02))
 			return FAILED;
-		}
 		return SUCCESS;
 
 		/* these three are not supported */
@@ -1358,7 +1383,8 @@
 		return SUCCESS;
 
 	case RESERVATION_CONFLICT:
-		printk("scsi%d (%d,%d,%d) : reservation conflict\n",
+		printk(KERN_INFO "scsi: reservation conflict: host"
+                                " %d channel %d id %d lun %d\n",
 		       scmd->device->host->host_no, scmd->device->channel,
 		       scmd->device->id, scmd->device->lun);
 		return SUCCESS; /* causes immediate i/o error */
@@ -1729,6 +1755,7 @@
 		}
 	}
 }
+EXPORT_SYMBOL(scsi_report_bus_reset);
 
 /*
  * Function:    scsi_report_device_reset()
@@ -1764,6 +1791,7 @@
 		}
 	}
 }
+EXPORT_SYMBOL(scsi_report_device_reset);
 
 static void
 scsi_reset_provider_done_command(struct scsi_cmnd *scmd)
@@ -1843,6 +1871,7 @@
 	scsi_next_command(scmd);
 	return rtn;
 }
+EXPORT_SYMBOL(scsi_reset_provider);
 
 /**
  * scsi_normalize_sense - normalize main elements from either fixed or
diff -Nru a/drivers/scsi/scsi_ioctl.c b/drivers/scsi/scsi_ioctl.c
--- a/drivers/scsi/scsi_ioctl.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/scsi/scsi_ioctl.c	2005-01-10 20:11:22 -08:00
@@ -21,6 +21,7 @@
 #include <scsi/scsi_ioctl.h>
 #include <scsi/scsi_request.h>
 #include <scsi/sg.h>
+#include <scsi/scsi_dbg.h>
 
 #include "scsi_logging.h"
 
@@ -94,12 +95,13 @@
 {
 	struct scsi_request *sreq;
 	int result;
+	struct scsi_sense_hdr sshdr;
 
 	SCSI_LOG_IOCTL(1, printk("Trying ioctl with scsi command %d\n", *cmd));
 
 	sreq = scsi_allocate_request(sdev, GFP_KERNEL);
 	if (!sreq) {
-		printk("SCSI internal ioctl failed, no memory\n");
+		printk(KERN_WARNING "SCSI internal ioctl failed, no memory\n");
 		return -ENOMEM;
 	}
 
@@ -108,17 +110,21 @@
 
 	SCSI_LOG_IOCTL(2, printk("Ioctl returned  0x%x\n", sreq->sr_result));
 
-	if (driver_byte(sreq->sr_result)) {
-		switch (sreq->sr_sense_buffer[2] & 0xf) {
+	if ((driver_byte(sreq->sr_result) & DRIVER_SENSE) &&
+	    (scsi_request_normalize_sense(sreq, &sshdr))) {
+		switch (sshdr.sense_key) {
 		case ILLEGAL_REQUEST:
 			if (cmd[0] == ALLOW_MEDIUM_REMOVAL)
 				sdev->lockable = 0;
 			else
-				printk("SCSI device (ioctl) reports ILLEGAL REQUEST.\n");
+				printk(KERN_INFO "ioctl_internal_command: "
+				       "ILLEGAL REQUEST asc=0x%x ascq=0x%x\n",
+				       sshdr.asc, sshdr.ascq);
 			break;
 		case NOT_READY:	/* This happens if there is no disc in drive */
 			if (sdev->removable && (cmd[0] != TEST_UNIT_READY)) {
-				printk(KERN_INFO "Device not ready.  Make sure there is a disc in the drive.\n");
+				printk(KERN_INFO "Device not ready. Make sure"
+				       " there is a disc in the drive.\n");
 				break;
 			}
 		case UNIT_ATTENTION:
@@ -128,16 +134,15 @@
 				break;
 			}
 		default:	/* Fall through for non-removable media */
-			printk("SCSI error: host %d id %d lun %d return code = %x\n",
+			printk(KERN_INFO "ioctl_internal_command: <%d %d %d "
+			       "%d> return code = %x\n",
 			       sdev->host->host_no,
+			       sdev->channel,
 			       sdev->id,
 			       sdev->lun,
 			       sreq->sr_result);
-			printk("\tSense class %x, sense error %x, extended sense %x\n",
-			       sense_class(sreq->sr_sense_buffer[0]),
-			       sense_error(sreq->sr_sense_buffer[0]),
-			       sreq->sr_sense_buffer[2] & 0xf);
-
+			scsi_print_req_sense("   ", sreq);
+			break;
 		}
 	}
 
@@ -168,6 +173,7 @@
 		sdev->locked = (state == SCSI_REMOVAL_PREVENT);
 	return ret;
 }
+EXPORT_SYMBOL(scsi_set_medium_removal);
 
 /*
  * This interface is deprecated - users should use the scsi generic (sg)
@@ -349,6 +355,7 @@
 	kfree(buf);
 	return result;
 }
+EXPORT_SYMBOL(scsi_ioctl_send_command);
 
 /*
  * The scsi_ioctl_get_pci() function places into arg the value
@@ -401,7 +408,8 @@
 	case SCSI_IOCTL_SYNC:
 	case SCSI_IOCTL_START_UNIT:
 	case SCSI_IOCTL_STOP_UNIT:
-		printk(KERN_WARNING "program %s is using a deprecated SCSI ioctl, please convert it to SG_IO\n", current->comm);
+		printk(KERN_WARNING "program %s is using a deprecated SCSI "
+		       "ioctl, please convert it to SG_IO\n", current->comm);
 		break;
 	default:
 		break;
@@ -457,6 +465,7 @@
 	}
 	return -EINVAL;
 }
+EXPORT_SYMBOL(scsi_ioctl);
 
 /*
  * the scsi_nonblock_ioctl() function is designed for ioctls which may
diff -Nru a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
--- a/drivers/scsi/scsi_lib.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/scsi/scsi_lib.c	2005-01-10 20:11:19 -08:00
@@ -233,7 +233,8 @@
 	 */
 	scsi_insert_special_req(sreq, 1);
 }
- 
+EXPORT_SYMBOL(scsi_do_req);
+
 static void scsi_wait_done(struct scsi_cmnd *cmd)
 {
 	struct request *req = cmd->request;
@@ -267,6 +268,7 @@
 
 	__scsi_release_request(sreq);
 }
+EXPORT_SYMBOL(scsi_wait_req);
 
 /*
  * Function:    scsi_init_cmd_errh()
@@ -718,7 +720,7 @@
 			clear_errors = 0;
 			if (scsi_command_normalize_sense(cmd, &sshdr)) {
 				/*
-				 * SG_IO wants to know about deferred errors
+				 * SG_IO wants current and deferred errors
 				 */
 				int len = 8 + cmd->sense_buffer[7];
 
@@ -844,9 +846,10 @@
 			cmd = scsi_end_request(cmd, 0, this_count, 1);
 			return;
 		case VOLUME_OVERFLOW:
-			printk("scsi%d: ERROR on channel %d, id %d, lun %d, CDB: ",
-			       cmd->device->host->host_no, (int) cmd->device->channel,
-			       (int) cmd->device->id, (int) cmd->device->lun);
+			printk(KERN_INFO "Volume overflow <%d %d %d %d> CDB: ",
+			       cmd->device->host->host_no,
+			       (int)cmd->device->channel,
+			       (int)cmd->device->id, (int)cmd->device->lun);
 			__scsi_print_command(cmd->data_cmnd);
 			scsi_print_sense("", cmd);
 			cmd = scsi_end_request(cmd, 0, block_bytes, 1);
@@ -865,8 +868,8 @@
 		return;
 	}
 	if (result) {
-		printk("SCSI error : <%d %d %d %d> return code = 0x%x\n",
-		       cmd->device->host->host_no,
+		printk(KERN_INFO "SCSI error : <%d %d %d %d> return code "
+		       "= 0x%x\n", cmd->device->host->host_no,
 		       cmd->device->channel,
 		       cmd->device->id,
 		       cmd->device->lun, result);
@@ -884,6 +887,7 @@
 		cmd = scsi_end_request(cmd, 0, block_bytes, 1);
 	}
 }
+EXPORT_SYMBOL(scsi_io_completion);
 
 /*
  * Function:    scsi_init_io()
@@ -1344,6 +1348,7 @@
 
 	return bounce_limit;
 }
+EXPORT_SYMBOL(scsi_calculate_bounce_limit);
 
 struct request_queue *scsi_alloc_queue(struct scsi_device *sdev)
 {
@@ -1393,6 +1398,7 @@
 {
 	shost->host_self_blocked = 1;
 }
+EXPORT_SYMBOL(scsi_block_requests);
 
 /*
  * Function:    scsi_unblock_requests()
@@ -1419,6 +1425,7 @@
 	shost->host_self_blocked = 0;
 	scsi_run_host_queues(shost);
 }
+EXPORT_SYMBOL(scsi_unblock_requests);
 
 int __init scsi_init_queue(void)
 {
@@ -1553,6 +1560,7 @@
 
 	return sreq->sr_result;
 }
+EXPORT_SYMBOL(__scsi_mode_sense);
 
 /**
  *	scsi_mode_sense - issue a mode sense, falling back from 10 to 
@@ -1587,6 +1595,7 @@
 
 	return ret;
 }
+EXPORT_SYMBOL(scsi_mode_sense);
 
 int
 scsi_test_unit_ready(struct scsi_device *sdev, int timeout, int retries)
@@ -1604,12 +1613,15 @@
 	sreq->sr_data_direction = DMA_NONE;
 	scsi_wait_req(sreq, cmd, NULL, 0, timeout, retries);
 
-	if ((driver_byte(sreq->sr_result) & DRIVER_SENSE) &&
-	    ((sreq->sr_sense_buffer[2] & 0x0f) == UNIT_ATTENTION ||
-	     (sreq->sr_sense_buffer[2] & 0x0f) == NOT_READY) &&
-	    sdev->removable) {
-		sdev->changed = 1;
-		sreq->sr_result = 0;
+	if ((driver_byte(sreq->sr_result) & DRIVER_SENSE) && sdev->removable) {
+		struct scsi_sense_hdr sshdr;
+
+		if ((scsi_request_normalize_sense(sreq, &sshdr)) &&
+		    ((sshdr.sense_key == UNIT_ATTENTION) ||
+		     (sshdr.sense_key == NOT_READY))) {
+			sdev->changed = 1;
+			sreq->sr_result = 0;
+		}
 	}
 	result = sreq->sr_result;
 	scsi_release_request(sreq);
@@ -1668,6 +1680,7 @@
 		case SDEV_CREATED:
 		case SDEV_RUNNING:
 		case SDEV_QUIESCE:
+		case SDEV_BLOCK:
 			break;
 		default:
 			goto illegal;
@@ -1710,11 +1723,12 @@
 	return 0;
 
  illegal:
-	dev_printk(KERN_ERR, &sdev->sdev_gendev,
-		   "Illegal state transition %s->%s\n",
-		   scsi_device_state_name(oldstate),
-		   scsi_device_state_name(state));
-	WARN_ON(1);
+	SCSI_LOG_ERROR_RECOVERY(1, 
+				dev_printk(KERN_ERR, &sdev->sdev_gendev,
+					   "Illegal state transition %s->%s\n",
+					   scsi_device_state_name(oldstate),
+					   scsi_device_state_name(state))
+				);
 	return -EINVAL;
 }
 EXPORT_SYMBOL(scsi_device_set_state);
diff -Nru a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
--- a/drivers/scsi/scsi_scan.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/scsi/scsi_scan.c	2005-01-10 20:11:21 -08:00
@@ -39,6 +39,7 @@
 #include <scsi/scsi_host.h>
 #include <scsi/scsi_request.h>
 #include <scsi/scsi_transport.h>
+#include <scsi/scsi_eh.h>
 
 #include "scsi_priv.h"
 #include "scsi_logging.h"
@@ -253,6 +254,11 @@
 	sdev->request_queue->queuedata = sdev;
 	scsi_adjust_queue_depth(sdev, 0, sdev->host->cmd_per_lun);
 
+	if (shost->transportt->device_setup) {
+		if (shost->transportt->device_setup(sdev))
+			goto out_free_queue;
+	}
+
 	if (shost->hostt->slave_alloc) {
 		ret = shost->hostt->slave_alloc(sdev);
 		if (ret) {
@@ -262,15 +268,10 @@
 			 */
 			if (ret == -ENXIO)
 				display_failure_msg = 0;
-			goto out_free_queue;
+			goto out_device_destroy;
 		}
 	}
 
-	if (shost->transportt->device_setup) {
-		if (shost->transportt->device_setup(sdev))
-			goto out_cleanup_slave;
-	}
-
 	if (scsi_sysfs_device_initialize(sdev) != 0)
 		goto out_cleanup_slave;
 
@@ -290,6 +291,9 @@
 out_cleanup_slave:
 	if (shost->hostt->slave_destroy)
 		shost->hostt->slave_destroy(sdev);
+out_device_destroy:
+	if (shost->transportt->device_destroy)
+		shost->transportt->device_destroy(sdev);
 out_free_queue:
 	scsi_free_queue(sdev->request_queue);
 out_free_dev:
@@ -322,6 +326,7 @@
 	int first_inquiry_len, try_inquiry_len, next_inquiry_len;
 	int response_len = 0;
 	int pass, count;
+	struct scsi_sense_hdr sshdr;
 
 	*bflags = 0;
 
@@ -357,17 +362,20 @@
 				sreq->sr_result));
 
 		if (sreq->sr_result) {
-
-			/* not-ready to ready transition or power-on - good */
-			/* dpg: bogus? INQUIRY never returns UNIT_ATTENTION */
-			/* Supposedly, but many buggy devices do so anyway. */
+			/*
+			 * not-ready to ready transition [asc/ascq=0x28/0x0]
+			 * or power-on, reset [asc/ascq=0x29/0x0], continue.
+			 * INQUIRY should not yield UNIT_ATTENTION
+			 * but many buggy devices do so anyway. 
+			 */
 			if ((driver_byte(sreq->sr_result) & DRIVER_SENSE) &&
-					(sreq->sr_sense_buffer[2] & 0xf) ==
-						UNIT_ATTENTION &&
-					(sreq->sr_sense_buffer[12] == 0x28 ||
-					 sreq->sr_sense_buffer[12] == 0x29) &&
-					sreq->sr_sense_buffer[13] == 0)
-				continue;
+			    scsi_request_normalize_sense(sreq, &sshdr)) {
+				if ((sshdr.sense_key == UNIT_ATTENTION) &&
+				    ((sshdr.asc == 0x28) ||
+				     (sshdr.asc == 0x29)) &&
+				    (sshdr.ascq == 0))
+					continue;
+			}
 		}
 		break;
 	}
@@ -741,6 +749,8 @@
 	} else {
 		if (sdev->host->hostt->slave_destroy)
 			sdev->host->hostt->slave_destroy(sdev);
+		if (sdev->host->transportt->device_destroy)
+			sdev->host->transportt->device_destroy(sdev);
 		put_device(&sdev->sdev_gendev);
 	}
  out:
@@ -893,6 +903,7 @@
 	struct scsi_lun *lunp, *lun_data;
 	struct scsi_request *sreq;
 	u8 *data;
+	struct scsi_sense_hdr sshdr;
 
 	/*
 	 * Only support SCSI-3 and up devices if BLIST_NOREPORTLUN is not set.
@@ -970,9 +981,12 @@
 				" %s (try %d) result 0x%x\n", sreq->sr_result
 				?  "failed" : "successful", retries,
 				sreq->sr_result));
-		if (sreq->sr_result == 0 ||
-		    sreq->sr_sense_buffer[2] != UNIT_ATTENTION)
+		if (sreq->sr_result == 0)
 			break;
+		else if (scsi_request_normalize_sense(sreq, &sshdr)) {
+			if (sshdr.sense_key != UNIT_ATTENTION)
+				break;
+		}
 	}
 
 	if (sreq->sr_result) {
@@ -1082,6 +1096,7 @@
 
 	return sdev;
 }
+EXPORT_SYMBOL(__scsi_add_device);
 
 void scsi_rescan_device(struct device *dev)
 {
@@ -1097,6 +1112,7 @@
 		module_put(drv->owner);
 	}
 }
+EXPORT_SYMBOL(scsi_rescan_device);
 
 /**
  * scsi_scan_target - scan a target id, possibly including all LUNs on the
@@ -1225,6 +1241,20 @@
 	scsi_scan_host_selected(shost, SCAN_WILD_CARD, SCAN_WILD_CARD,
 				SCAN_WILD_CARD, 0);
 }
+EXPORT_SYMBOL(scsi_scan_host);
+
+/**
+ * scsi_scan_single_target - scan the given SCSI target
+ * @shost:         adapter to scan
+ * @chan:          channel to scan
+ * @id:            target id to scan
+ **/
+void scsi_scan_single_target(struct Scsi_Host *shost, 
+	unsigned int chan, unsigned int id)
+{
+	scsi_scan_host_selected(shost, chan, id, SCAN_WILD_CARD, 1);
+}
+EXPORT_SYMBOL(scsi_scan_single_target);
 
 void scsi_forget_host(struct Scsi_Host *shost)
 {
@@ -1279,6 +1309,7 @@
 	}
 	return sdev;
 }
+EXPORT_SYMBOL(scsi_get_host_dev);
 
 /*
  * Function:    scsi_free_host_dev()
@@ -1299,5 +1330,9 @@
 
 	if (sdev->host->hostt->slave_destroy)
 		sdev->host->hostt->slave_destroy(sdev);
+	if (sdev->host->transportt->device_destroy)
+		sdev->host->transportt->device_destroy(sdev);
 	put_device(&sdev->sdev_gendev);
 }
+EXPORT_SYMBOL(scsi_free_host_dev);
+
diff -Nru a/drivers/scsi/scsi_syms.c b/drivers/scsi/scsi_syms.c
--- a/drivers/scsi/scsi_syms.c	2005-01-10 20:11:19 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,97 +0,0 @@
-/*
- * We should not even be trying to compile this if we are not doing
- * a module.
- */
-#include <linux/config.h>
-#include <linux/module.h>
-
-#include <scsi/scsi.h>
-#include <scsi/scsi_dbg.h>
-#include <scsi/scsi_device.h>
-#include <scsi/scsi_driver.h>
-#include <scsi/scsi_eh.h>
-#include <scsi/scsi_host.h>
-#include <scsi/scsi_ioctl.h>
-#include <scsi/scsi_request.h>
-#include <scsi/scsicam.h>
-
-#include "scsi_logging.h"
-
-
-/*
- * This source file contains the symbol table used by scsi loadable
- * modules.
- */
-EXPORT_SYMBOL(scsi_register_driver);
-EXPORT_SYMBOL(scsi_register_interface);
-EXPORT_SYMBOL(scsi_host_alloc);
-EXPORT_SYMBOL(scsi_add_host);
-EXPORT_SYMBOL(scsi_scan_host);
-EXPORT_SYMBOL(scsi_remove_host);
-EXPORT_SYMBOL(scsi_host_get);
-EXPORT_SYMBOL(scsi_host_put);
-EXPORT_SYMBOL(scsi_host_lookup);
-EXPORT_SYMBOL(scsi_register);
-EXPORT_SYMBOL(scsi_unregister);
-EXPORT_SYMBOL(scsicam_bios_param);
-EXPORT_SYMBOL(scsi_partsize);
-EXPORT_SYMBOL(scsi_bios_ptable);
-EXPORT_SYMBOL(scsi_ioctl);
-EXPORT_SYMBOL(scsi_print_command);
-EXPORT_SYMBOL(__scsi_print_command);
-EXPORT_SYMBOL(scsi_print_sense);
-EXPORT_SYMBOL(scsi_print_req_sense);
-EXPORT_SYMBOL(scsi_print_msg);
-EXPORT_SYMBOL(scsi_print_status);
-EXPORT_SYMBOL(scsi_sense_key_string);
-EXPORT_SYMBOL(scsi_extd_sense_format);
-EXPORT_SYMBOL(scsi_block_when_processing_errors);
-EXPORT_SYMBOL(scsi_ioctl_send_command);
-EXPORT_SYMBOL(scsi_set_medium_removal);
-#if defined(CONFIG_SCSI_LOGGING)	/* { */
-EXPORT_SYMBOL(scsi_logging_level);
-#endif
-
-EXPORT_SYMBOL(scsi_allocate_request);
-EXPORT_SYMBOL(scsi_release_request);
-EXPORT_SYMBOL(scsi_wait_req);
-EXPORT_SYMBOL(scsi_do_req);
-EXPORT_SYMBOL(scsi_get_command);
-EXPORT_SYMBOL(scsi_put_command);
-
-EXPORT_SYMBOL(scsi_report_bus_reset);
-EXPORT_SYMBOL(scsi_report_device_reset);
-EXPORT_SYMBOL(scsi_block_requests);
-EXPORT_SYMBOL(scsi_unblock_requests);
-EXPORT_SYMBOL(scsi_adjust_queue_depth);
-EXPORT_SYMBOL(scsi_track_queue_full);
-
-EXPORT_SYMBOL(scsi_get_host_dev);
-EXPORT_SYMBOL(scsi_free_host_dev);
-
-EXPORT_SYMBOL(scsi_io_completion);
-
-EXPORT_SYMBOL(__scsi_add_device);
-EXPORT_SYMBOL(scsi_remove_device);
-EXPORT_SYMBOL(scsi_device_cancel);
-
-EXPORT_SYMBOL(__scsi_mode_sense);
-EXPORT_SYMBOL(scsi_mode_sense);
-
-/*
- * This symbol is for the highlevel drivers (e.g. sg) only.
- */
-EXPORT_SYMBOL(scsi_reset_provider);
-
-EXPORT_SYMBOL(scsi_device_types);
-
-/*
- * This is for st to find the bounce limit
- */
-EXPORT_SYMBOL(scsi_calculate_bounce_limit);
-
-/*
- * Externalize timers so that HBAs can safely start/restart commands.
- */
-EXPORT_SYMBOL(scsi_add_timer);
-EXPORT_SYMBOL(scsi_delete_timer);
diff -Nru a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
--- a/drivers/scsi/scsi_sysfs.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/scsi/scsi_sysfs.c	2005-01-10 20:11:17 -08:00
@@ -15,6 +15,7 @@
 #include <scsi/scsi.h>
 #include <scsi/scsi_device.h>
 #include <scsi/scsi_host.h>
+#include <scsi/scsi_tcq.h>
 #include <scsi/scsi_transport.h>
 
 #include "scsi_priv.h"
@@ -169,7 +170,10 @@
 
 	if (delete) {
 		struct scsi_target *starget = to_scsi_target(parent);
+		struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
 		if (!starget->create) {
+			if (shost->transportt->target_destroy)
+				shost->transportt->target_destroy(starget);
 			device_del(parent);
 			if (starget->transport_classdev.class)
 				class_device_unregister(&starget->transport_classdev);
@@ -388,13 +392,30 @@
 	return snprintf(buf, 20, "%s\n", name);
 }
 
-DEVICE_ATTR(state, S_IRUGO | S_IWUSR, show_state_field, store_state_field);
+static DEVICE_ATTR(state, S_IRUGO | S_IWUSR, show_state_field, store_state_field);
+
+static ssize_t
+show_queue_type_field(struct device *dev, char *buf)
+{
+	struct scsi_device *sdev = to_scsi_device(dev);
+	const char *name = "none";
+
+	if (sdev->ordered_tags)
+		name = "ordered";
+	else if (sdev->simple_tags)
+		name = "simple";
+
+	return snprintf(buf, 20, "%s\n", name);
+}
+
+static DEVICE_ATTR(queue_type, S_IRUGO, show_queue_type_field, NULL);
 
 
 /* Default template for device attributes.  May NOT be modified */
 static struct device_attribute *scsi_sysfs_sdev_attrs[] = {
 	&dev_attr_device_blocked,
 	&dev_attr_queue_depth,
+	&dev_attr_queue_type,
 	&dev_attr_type,
 	&dev_attr_scsi_level,
 	&dev_attr_vendor,
@@ -407,6 +428,77 @@
 	NULL
 };
 
+static ssize_t sdev_store_queue_depth_rw(struct device *dev, const char *buf,
+					 size_t count)
+{
+	int depth, retval;
+	struct scsi_device *sdev = to_scsi_device(dev);
+	struct scsi_host_template *sht = sdev->host->hostt;
+
+	if (!sht->change_queue_depth)
+		return -EINVAL;
+
+	depth = simple_strtoul(buf, NULL, 0);
+
+	if (depth < 1)
+		return -EINVAL;
+
+	retval = sht->change_queue_depth(sdev, depth);
+	if (retval < 0)
+		return retval;
+
+	return count;
+}
+
+static struct device_attribute sdev_attr_queue_depth_rw =
+	__ATTR(queue_depth, S_IRUGO | S_IWUSR, sdev_show_queue_depth,
+	       sdev_store_queue_depth_rw);
+
+static ssize_t sdev_store_queue_type_rw(struct device *dev, const char *buf,
+					size_t count)
+{
+	struct scsi_device *sdev = to_scsi_device(dev);
+	struct scsi_host_template *sht = sdev->host->hostt;
+	int tag_type = 0, retval;
+	int prev_tag_type = scsi_get_tag_type(sdev);
+
+	if (!sdev->tagged_supported || !sht->change_queue_type)
+		return -EINVAL;
+
+	if (strncmp(buf, "ordered", 7) == 0)
+		tag_type = MSG_ORDERED_TAG;
+	else if (strncmp(buf, "simple", 6) == 0)
+		tag_type = MSG_SIMPLE_TAG;
+	else if (strncmp(buf, "none", 4) != 0)
+		return -EINVAL;
+
+	if (tag_type == prev_tag_type)
+		return count;
+
+	retval = sht->change_queue_type(sdev, tag_type);
+	if (retval < 0)
+		return retval;
+
+	return count;
+}
+
+static struct device_attribute sdev_attr_queue_type_rw =
+	__ATTR(queue_type, S_IRUGO | S_IWUSR, show_queue_type_field,
+	       sdev_store_queue_type_rw);
+
+static struct device_attribute *attr_changed_internally(
+		struct Scsi_Host *shost,
+		struct device_attribute * attr)
+{
+	if (!strcmp("queue_depth", attr->attr.name)
+	    && shost->hostt->change_queue_depth)
+		return &sdev_attr_queue_depth_rw;
+	else if (!strcmp("queue_type", attr->attr.name)
+	    && shost->hostt->change_queue_type)
+		return &sdev_attr_queue_type_rw;
+	return attr;
+}
+
 
 static struct device_attribute *attr_overridden(
 		struct device_attribute **attrs,
@@ -547,8 +639,10 @@
 	for (i = 0; scsi_sysfs_sdev_attrs[i]; i++) {
 		if (!attr_overridden(sdev->host->hostt->sdev_attrs,
 					scsi_sysfs_sdev_attrs[i])) {
-			error = device_create_file(&sdev->sdev_gendev,
-					scsi_sysfs_sdev_attrs[i]);
+			struct device_attribute * attr = 
+				attr_changed_internally(sdev->host, 
+							scsi_sysfs_sdev_attrs[i]);
+			error = device_create_file(&sdev->sdev_gendev, attr);
 			if (error) {
 				scsi_remove_device(sdev);
 				goto out;
@@ -601,11 +695,14 @@
 	scsi_device_set_state(sdev, SDEV_DEL);
 	if (sdev->host->hostt->slave_destroy)
 		sdev->host->hostt->slave_destroy(sdev);
+	if (sdev->host->transportt->device_destroy)
+		sdev->host->transportt->device_destroy(sdev);
 	put_device(&sdev->sdev_gendev);
 
 out:
 	up(&shost->scan_mutex);
 }
+EXPORT_SYMBOL(scsi_remove_device);
 
 int scsi_register_driver(struct device_driver *drv)
 {
@@ -613,6 +710,7 @@
 
 	return driver_register(drv);
 }
+EXPORT_SYMBOL(scsi_register_driver);
 
 int scsi_register_interface(struct class_interface *intf)
 {
@@ -620,6 +718,7 @@
 
 	return class_interface_register(intf);
 }
+EXPORT_SYMBOL(scsi_register_interface);
 
 
 static struct class_device_attribute *class_attr_overridden(
@@ -708,6 +807,14 @@
  			if (error)
 				return error;
  		}
+
+		if (shost->transportt->host_statistics) {
+			error = sysfs_create_group(
+					&shost->transport_classdev.kobj,
+					shost->transportt->host_statistics);
+			if (error)
+				return error;
+		}
  	}
 
 	return 0;
diff -Nru a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c
--- a/drivers/scsi/scsi_transport_fc.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/scsi/scsi_transport_fc.c	2005-01-10 20:11:16 -08:00
@@ -27,13 +27,168 @@
 
 #define FC_PRINTK(x, l, f, a...)	printk(l "scsi(%d:%d:%d:%d): " f, (x)->host->host_no, (x)->channel, (x)->id, (x)->lun , ##a)
 
+/*
+ * Redefine so that we can have same named attributes in the
+ * sdev/starget/host objects.
+ */
+#define FC_CLASS_DEVICE_ATTR(_prefix,_name,_mode,_show,_store)		\
+struct class_device_attribute class_device_attr_##_prefix##_##_name = 	\
+	__ATTR(_name,_mode,_show,_store)
+
+#define fc_enum_name_search(title, table_type, table)			\
+static const char *get_fc_##title##_name(enum table_type table_key)	\
+{									\
+	int i;								\
+	char *name = NULL;						\
+									\
+	for (i = 0; i < sizeof(table)/sizeof(table[0]); i++) {		\
+		if (table[i].value == table_key) {			\
+			name = table[i].name;				\
+			break;						\
+		}							\
+	}								\
+	return name;							\
+}
+
+#define fc_enum_name_match(title, table_type, table)			\
+static int get_fc_##title##_match(const char *table_key,		\
+		enum table_type *value)					\
+{									\
+	int i;								\
+									\
+	for (i = 0; i < sizeof(table)/sizeof(table[0]); i++) {		\
+		if (strncmp(table_key, table[i].name,			\
+				table[i].matchlen) == 0) {		\
+			*value = table[i].value;			\
+			return 0; /* success */				\
+		}							\
+	}								\
+	return 1; /* failure */						\
+}
+
+
+/* Convert fc_port_type values to ascii string name */
+static struct {
+	enum fc_port_type	value;
+	char			*name;
+} fc_port_type_names[] = {
+	{ FC_PORTTYPE_UNKNOWN,		"Unknown" },
+	{ FC_PORTTYPE_OTHER,		"Other" },
+	{ FC_PORTTYPE_NOTPRESENT,	"Not Present" },
+	{ FC_PORTTYPE_NPORT,	"NPort (fabric via point-to-point)" },
+	{ FC_PORTTYPE_NLPORT,	"NLPort (fabric via loop)" },
+	{ FC_PORTTYPE_LPORT,	"LPort (private loop)" },
+	{ FC_PORTTYPE_PTP,	"Point-To-Point (direct nport connection" },
+};
+fc_enum_name_search(port_type, fc_port_type, fc_port_type_names)
+#define FC_PORTTYPE_MAX_NAMELEN		50
+
+
+/* Convert fc_port_state values to ascii string name */
+static struct {
+	enum fc_port_state	value;
+	char			*name;
+} fc_port_state_names[] = {
+	{ FC_PORTSTATE_UNKNOWN,		"Unknown" },
+	{ FC_PORTSTATE_ONLINE,		"Online" },
+	{ FC_PORTSTATE_OFFLINE,		"Offline" },
+	{ FC_PORTSTATE_BYPASSED,	"Bypassed" },
+	{ FC_PORTSTATE_DIAGNOSTICS,	"Diagnostics" },
+	{ FC_PORTSTATE_LINKDOWN,	"Linkdown" },
+	{ FC_PORTSTATE_ERROR,		"Error" },
+	{ FC_PORTSTATE_LOOPBACK,	"Loopback" },
+};
+fc_enum_name_search(port_state, fc_port_state, fc_port_state_names)
+#define FC_PORTSTATE_MAX_NAMELEN	20
+
+
+/* Convert fc_tgtid_binding_type values to ascii string name */
+static struct {
+	enum fc_tgtid_binding_type	value;
+	char				*name;
+	int				matchlen;
+} fc_tgtid_binding_type_names[] = {
+	{ FC_TGTID_BIND_BY_WWPN, "wwpn (World Wide Port Name)", 4 },
+	{ FC_TGTID_BIND_BY_WWNN, "wwnn (World Wide Node Name)", 4 },
+	{ FC_TGTID_BIND_BY_ID, "fcportid (FC Address)", 8 },
+};
+fc_enum_name_search(tgtid_bind_type, fc_tgtid_binding_type,
+		fc_tgtid_binding_type_names)
+fc_enum_name_match(tgtid_bind_type, fc_tgtid_binding_type,
+		fc_tgtid_binding_type_names)
+#define FC_BINDTYPE_MAX_NAMELEN	30
+
+
+#define fc_bitfield_name_search(title, table)			\
+static ssize_t							\
+get_fc_##title##_names(u32 table_key, char *buf)		\
+{								\
+	char *prefix = "";					\
+	ssize_t len = 0;					\
+	int i;							\
+								\
+	for (i = 0; i < sizeof(table)/sizeof(table[0]); i++) {	\
+		if (table[i].value & table_key) {		\
+			len += sprintf(buf + len, "%s%s",	\
+				prefix, table[i].name);		\
+			prefix = ", ";				\
+		}						\
+	}							\
+	len += sprintf(buf + len, "\n");			\
+	return len;						\
+}
+
+
+/* Convert fc_cos bit values to ascii string name */
+static struct {
+	u32 			value;
+	char			*name;
+} fc_cos_names[] = {
+	{ FC_COS_CLASS1,	"Class 1" },
+	{ FC_COS_CLASS2,	"Class 2" },
+	{ FC_COS_CLASS3,	"Class 3" },
+	{ FC_COS_CLASS4,	"Class 4" },
+	{ FC_COS_CLASS6,	"Class 6" },
+};
+fc_bitfield_name_search(cos, fc_cos_names)
+
+
+/* Convert fc_port_speed bit values to ascii string name */
+static struct {
+	u32 			value;
+	char			*name;
+} fc_port_speed_names[] = {
+	{ FC_PORTSPEED_1GBIT,		"1 Gbit" },
+	{ FC_PORTSPEED_2GBIT,		"2 Gbit" },
+	{ FC_PORTSPEED_4GBIT,		"4 Gbit" },
+	{ FC_PORTSPEED_10GBIT,		"10 Gbit" },
+	{ FC_PORTSPEED_NOT_NEGOTIATED,	"Not Negotiated" },
+};
+fc_bitfield_name_search(port_speed, fc_port_speed_names)
+
+
+static int
+show_fc_fc4s (char *buf, u8 *fc4_list)
+{
+	int i, len=0;
+
+	for (i = 0; i < FC_FC4_LIST_SIZE; i++, fc4_list++)
+		len += sprintf(buf + len , "0x%02x ", *fc4_list);
+	len += sprintf(buf + len, "\n");
+	return len;
+}
+
+
+
 static void transport_class_release(struct class_device *class_dev);
 static void host_class_release(struct class_device *class_dev);
+static void fc_timeout_blocked_host(void *data);
+static void fc_timeout_blocked_tgt(void *data);
 
 #define FC_STARGET_NUM_ATTRS 	4	/* increase this if you add attributes */
 #define FC_STARGET_OTHER_ATTRS 	0	/* increase this if you add "always on"
 					 * attributes */
-#define FC_HOST_NUM_ATTRS	1
+#define FC_HOST_NUM_ATTRS	15
 
 struct fc_internal {
 	struct scsi_transport_template t;
@@ -87,10 +242,18 @@
 	fc_starget_port_name(starget) = -1;
 	fc_starget_port_id(starget) = -1;
 	fc_starget_dev_loss_tmo(starget) = -1;
-	init_timer(&fc_starget_dev_loss_timer(starget));
+	INIT_WORK(&fc_starget_dev_loss_work(starget),
+		  fc_timeout_blocked_tgt, starget);
 	return 0;
 }
 
+static void fc_destroy_starget(struct scsi_target *starget)
+{
+	/* Stop the target timer */
+	if (cancel_delayed_work(&fc_starget_dev_loss_work(starget)))
+		flush_scheduled_work();
+}
+
 static int fc_setup_host_transport_attrs(struct Scsi_Host *shost)
 {
 	/* 
@@ -98,11 +261,39 @@
 	 * failure cases.  The scsi lldd is responsible for initializing
 	 * all transport attributes to valid values per host.
 	 */
-	fc_host_link_down_tmo(shost) = -1;
-	init_timer(&fc_host_link_down_timer(shost));
+	fc_host_node_name(shost) = -1;
+	fc_host_port_name(shost) = -1;
+	fc_host_supported_classes(shost) = FC_COS_UNSPECIFIED;
+	memset(fc_host_supported_fc4s(shost), 0,
+		sizeof(fc_host_supported_fc4s(shost)));
+	memset(fc_host_symbolic_name(shost), 0,
+		sizeof(fc_host_symbolic_name(shost)));
+	fc_host_supported_speeds(shost) = FC_PORTSPEED_UNKNOWN;
+	fc_host_maxframe_size(shost) = -1;
+
+	fc_host_port_id(shost) = -1;
+	fc_host_port_type(shost) = FC_PORTTYPE_UNKNOWN;
+	fc_host_port_state(shost) = FC_PORTSTATE_UNKNOWN;
+	memset(fc_host_active_fc4s(shost), 0,
+		sizeof(fc_host_active_fc4s(shost)));
+	fc_host_speed(shost) = FC_PORTSPEED_UNKNOWN;
+	fc_host_fabric_name(shost) = -1;
+ 	fc_host_link_down_tmo(shost) = -1;
+
+	fc_host_tgtid_bind_type(shost) = FC_TGTID_BIND_BY_WWPN;
+
+	INIT_WORK(&fc_host_link_down_work(shost),
+		  fc_timeout_blocked_host, shost);
 	return 0;
 }
 
+static void fc_destroy_host(struct Scsi_Host *shost)
+{
+	/* Stop the host timer */
+	if (cancel_delayed_work(&fc_host_link_down_work(shost)))
+		flush_scheduled_work();
+}
+
 static void transport_class_release(struct class_device *class_dev)
 {
 	struct scsi_target *starget = transport_class_to_starget(class_dev);
@@ -117,7 +308,7 @@
 
 
 /*
- * Remote Port Attribute Management
+ * Remote Port (Target) Attribute Management
  */
 
 #define fc_starget_show_function(field, format_string, cast)		\
@@ -126,12 +317,11 @@
 {									\
 	struct scsi_target *starget = transport_class_to_starget(cdev);	\
 	struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);	\
-	struct fc_starget_attrs *tp;					\
 	struct fc_internal *i = to_fc_internal(shost->transportt);	\
-	tp = (struct fc_starget_attrs *)&starget->starget_data;		\
 	if (i->f->get_starget_##field)					\
 		i->f->get_starget_##field(starget);			\
-	return snprintf(buf, 20, format_string, cast tp->field);	\
+	return snprintf(buf, 20, format_string, 			\
+		cast fc_starget_##field(starget)); 			\
 }
 
 #define fc_starget_store_function(field, format_string)			\
@@ -151,23 +341,23 @@
 
 #define fc_starget_rd_attr(field, format_string)			\
 	fc_starget_show_function(field, format_string, )		\
-static CLASS_DEVICE_ATTR(field, S_IRUGO,				\
+static FC_CLASS_DEVICE_ATTR(starget, field, S_IRUGO,			\
 			 show_fc_starget_##field, NULL)
 
 #define fc_starget_rd_attr_cast(field, format_string, cast)		\
 	fc_starget_show_function(field, format_string, (cast))		\
-static CLASS_DEVICE_ATTR(field, S_IRUGO,				\
+static FC_CLASS_DEVICE_ATTR(starget, field, S_IRUGO,			\
 			  show_fc_starget_##field, NULL)
 
 #define fc_starget_rw_attr(field, format_string)			\
 	fc_starget_show_function(field, format_string, )		\
 	fc_starget_store_function(field, format_string)			\
-static CLASS_DEVICE_ATTR(field, S_IRUGO | S_IWUSR,			\
+static FC_CLASS_DEVICE_ATTR(starget, field, S_IRUGO | S_IWUSR,		\
 			show_fc_starget_##field,			\
 			store_fc_starget_##field)
 
 #define SETUP_STARGET_ATTRIBUTE_RD(field)				\
-	i->private_starget_attrs[count] = class_device_attr_##field;	\
+	i->private_starget_attrs[count] = class_device_attr_starget_##field; \
 	i->private_starget_attrs[count].attr.mode = S_IRUGO;		\
 	i->private_starget_attrs[count].store = NULL;			\
 	i->starget_attrs[count] = &i->private_starget_attrs[count];	\
@@ -175,7 +365,7 @@
 		count++
 
 #define SETUP_STARGET_ATTRIBUTE_RW(field)				\
-	i->private_starget_attrs[count] = class_device_attr_##field;	\
+	i->private_starget_attrs[count] = class_device_attr_starget_##field; \
 	if (!i->f->set_starget_##field) {				\
 		i->private_starget_attrs[count].attr.mode = S_IRUGO;	\
 		i->private_starget_attrs[count].store = NULL;		\
@@ -191,21 +381,20 @@
 fc_starget_rw_attr(dev_loss_tmo, "%d\n");
 
 
+
 /*
  * Host Attribute Management
  */
 
-#define fc_host_show_function(field, format_string, cast)		\
+#define fc_host_show_function(field, format_string, sz, cast)		\
 static ssize_t								\
 show_fc_host_##field (struct class_device *cdev, char *buf)		\
 {									\
 	struct Scsi_Host *shost = transport_class_to_shost(cdev);	\
-	struct fc_host_attrs *tp;					\
 	struct fc_internal *i = to_fc_internal(shost->transportt);	\
-	tp = (struct fc_host_attrs *)shost->shost_data;		\
 	if (i->f->get_host_##field)					\
 		i->f->get_host_##field(shost);				\
-	return snprintf(buf, 20, format_string, cast tp->field);	\
+	return snprintf(buf, sz, format_string, cast fc_host_##field(shost)); \
 }
 
 #define fc_host_store_function(field, format_string)			\
@@ -222,23 +411,39 @@
 	return count;							\
 }
 
-#define fc_host_rd_attr(field, format_string)				\
-	fc_host_show_function(field, format_string, )			\
-static CLASS_DEVICE_ATTR(host_##field, S_IRUGO,				\
+#define fc_host_rd_attr(field, format_string, sz)			\
+	fc_host_show_function(field, format_string, sz, )		\
+static FC_CLASS_DEVICE_ATTR(host, field, S_IRUGO,			\
 			 show_fc_host_##field, NULL)
 
-#define fc_host_rd_attr_cast(field, format_string, cast)		\
-	fc_host_show_function(field, format_string, (cast))		\
-static CLASS_DEVICE_ATTR(host_##field, S_IRUGO,				\
+#define fc_host_rd_attr_cast(field, format_string, sz, cast)		\
+	fc_host_show_function(field, format_string, sz, (cast))		\
+static FC_CLASS_DEVICE_ATTR(host, field, S_IRUGO,			\
 			  show_fc_host_##field, NULL)
 
-#define fc_host_rw_attr(field, format_string)				\
-	fc_host_show_function(field, format_string, )			\
+#define fc_host_rw_attr(field, format_string, sz)			\
+	fc_host_show_function(field, format_string, sz, )		\
 	fc_host_store_function(field, format_string)			\
-static CLASS_DEVICE_ATTR(host_##field, S_IRUGO | S_IWUSR,		\
+static FC_CLASS_DEVICE_ATTR(host, field, S_IRUGO | S_IWUSR,		\
 			show_fc_host_##field,				\
 			store_fc_host_##field)
 
+#define fc_host_rd_enum_attr(title, maxlen)				\
+static ssize_t								\
+show_fc_host_##title (struct class_device *cdev, char *buf)		\
+{									\
+	struct Scsi_Host *shost = transport_class_to_shost(cdev);	\
+	struct fc_internal *i = to_fc_internal(shost->transportt);	\
+	const char *name;						\
+	if (i->f->get_host_##title)					\
+		i->f->get_host_##title(shost);				\
+	name = get_fc_##title##_name(fc_host_##title(shost));		\
+	if (!name)							\
+		return -EINVAL;						\
+	return snprintf(buf, maxlen, "%s\n", name);			\
+}									\
+static FC_CLASS_DEVICE_ATTR(host, title, S_IRUGO, show_fc_host_##title, NULL)
+
 #define SETUP_HOST_ATTRIBUTE_RD(field)					\
 	i->private_host_attrs[count] = class_device_attr_host_##field;	\
 	i->private_host_attrs[count].attr.mode = S_IRUGO;		\
@@ -257,8 +462,259 @@
 	if (i->f->show_host_##field)					\
 		count++
 
-/* The FC Tranport Host Attributes: */
-fc_host_rw_attr(link_down_tmo, "%d\n");
+
+#define fc_private_host_show_function(field, format_string, sz, cast)	\
+static ssize_t								\
+show_fc_host_##field (struct class_device *cdev, char *buf)		\
+{									\
+	struct Scsi_Host *shost = transport_class_to_shost(cdev);	\
+	return snprintf(buf, sz, format_string, cast fc_host_##field(shost)); \
+}
+
+#define fc_private_host_rd_attr(field, format_string, sz)		\
+	fc_private_host_show_function(field, format_string, sz, )	\
+static FC_CLASS_DEVICE_ATTR(host, field, S_IRUGO,			\
+			 show_fc_host_##field, NULL)
+
+#define fc_private_host_rd_attr_cast(field, format_string, sz, cast)	\
+	fc_private_host_show_function(field, format_string, sz, (cast)) \
+static FC_CLASS_DEVICE_ATTR(host, field, S_IRUGO,			\
+			  show_fc_host_##field, NULL)
+
+#define SETUP_PRIVATE_HOST_ATTRIBUTE_RD(field)			\
+	i->private_host_attrs[count] = class_device_attr_host_##field;	\
+	i->private_host_attrs[count].attr.mode = S_IRUGO;		\
+	i->private_host_attrs[count].store = NULL;			\
+	i->host_attrs[count] = &i->private_host_attrs[count];		\
+	count++
+
+#define SETUP_PRIVATE_HOST_ATTRIBUTE_RW(field)			\
+	i->private_host_attrs[count] = class_device_attr_host_##field;	\
+	i->host_attrs[count] = &i->private_host_attrs[count];		\
+	count++
+
+
+/* Fixed Host Attributes */
+
+static ssize_t
+show_fc_host_supported_classes (struct class_device *cdev, char *buf)
+{
+	struct Scsi_Host *shost = transport_class_to_shost(cdev);
+
+	if (fc_host_supported_classes(shost) == FC_COS_UNSPECIFIED)
+		return snprintf(buf, 20, "unspecified\n");
+
+	return get_fc_cos_names(fc_host_supported_classes(shost), buf);
+}
+static FC_CLASS_DEVICE_ATTR(host, supported_classes, S_IRUGO,
+		show_fc_host_supported_classes, NULL);
+
+static ssize_t
+show_fc_host_supported_fc4s (struct class_device *cdev, char *buf)
+{
+	struct Scsi_Host *shost = transport_class_to_shost(cdev);
+	return (ssize_t)show_fc_fc4s(buf, fc_host_supported_fc4s(shost));
+}
+static FC_CLASS_DEVICE_ATTR(host, supported_fc4s, S_IRUGO,
+		show_fc_host_supported_fc4s, NULL);
+
+static ssize_t
+show_fc_host_supported_speeds (struct class_device *cdev, char *buf)
+{
+	struct Scsi_Host *shost = transport_class_to_shost(cdev);
+
+	if (fc_host_supported_speeds(shost) == FC_PORTSPEED_UNKNOWN)
+		return snprintf(buf, 20, "unknown\n");
+
+	return get_fc_port_speed_names(fc_host_supported_speeds(shost), buf);
+}
+static FC_CLASS_DEVICE_ATTR(host, supported_speeds, S_IRUGO,
+		show_fc_host_supported_speeds, NULL);
+
+
+fc_private_host_rd_attr_cast(node_name, "0x%llx\n", 20, unsigned long long);
+fc_private_host_rd_attr_cast(port_name, "0x%llx\n", 20, unsigned long long);
+fc_private_host_rd_attr(symbolic_name, "%s\n", (FC_SYMBOLIC_NAME_SIZE +1));
+fc_private_host_rd_attr(maxframe_size, "%u bytes\n", 20);
+
+
+/* Dynamic Host Attributes */
+
+static ssize_t
+show_fc_host_active_fc4s (struct class_device *cdev, char *buf)
+{
+	struct Scsi_Host *shost = transport_class_to_shost(cdev);
+	struct fc_internal *i = to_fc_internal(shost->transportt);
+
+	if (i->f->get_host_active_fc4s)
+		i->f->get_host_active_fc4s(shost);
+
+	return (ssize_t)show_fc_fc4s(buf, fc_host_active_fc4s(shost));
+}
+static FC_CLASS_DEVICE_ATTR(host, active_fc4s, S_IRUGO,
+		show_fc_host_active_fc4s, NULL);
+
+static ssize_t
+show_fc_host_speed (struct class_device *cdev, char *buf)
+{
+	struct Scsi_Host *shost = transport_class_to_shost(cdev);
+	struct fc_internal *i = to_fc_internal(shost->transportt);
+
+	if (i->f->get_host_speed)
+		i->f->get_host_speed(shost);
+
+	if (fc_host_speed(shost) == FC_PORTSPEED_UNKNOWN)
+		return snprintf(buf, 20, "unknown\n");
+
+	return get_fc_port_speed_names(fc_host_speed(shost), buf);
+}
+static FC_CLASS_DEVICE_ATTR(host, speed, S_IRUGO,
+		show_fc_host_speed, NULL);
+
+
+fc_host_rd_attr(port_id, "0x%06x\n", 20);
+fc_host_rd_enum_attr(port_type, FC_PORTTYPE_MAX_NAMELEN);
+fc_host_rd_enum_attr(port_state, FC_PORTSTATE_MAX_NAMELEN);
+fc_host_rd_attr_cast(fabric_name, "0x%llx\n", 20, unsigned long long);
+fc_host_rw_attr(link_down_tmo, "%d\n", 20);
+
+
+/* Private Host Attributes */
+
+static ssize_t
+show_fc_private_host_tgtid_bind_type(struct class_device *cdev, char *buf)
+{
+	struct Scsi_Host *shost = transport_class_to_shost(cdev);
+	const char *name;
+
+	name = get_fc_tgtid_bind_type_name(fc_host_tgtid_bind_type(shost));
+	if (!name)
+		return -EINVAL;
+	return snprintf(buf, FC_BINDTYPE_MAX_NAMELEN, "%s\n", name);
+}
+
+static ssize_t
+store_fc_private_host_tgtid_bind_type(struct class_device *cdev,
+	const char *buf, size_t count)
+{
+	struct Scsi_Host *shost = transport_class_to_shost(cdev);
+	enum fc_tgtid_binding_type val;
+
+	if (get_fc_tgtid_bind_type_match(buf, &val))
+		return -EINVAL;
+	fc_host_tgtid_bind_type(shost) = val;
+	return count;
+}
+
+static FC_CLASS_DEVICE_ATTR(host, tgtid_bind_type, S_IRUGO | S_IWUSR,
+			show_fc_private_host_tgtid_bind_type,
+			store_fc_private_host_tgtid_bind_type);
+
+/*
+ * Host Statistics Management
+ */
+
+/* Show a given an attribute in the statistics group */
+static ssize_t
+fc_stat_show(const struct class_device *cdev, char *buf, unsigned long offset)
+{
+	struct Scsi_Host *shost = transport_class_to_shost(cdev);
+	struct fc_internal *i = to_fc_internal(shost->transportt);
+	struct fc_host_statistics *stats;
+	ssize_t ret = -ENOENT;
+
+	if (offset > sizeof(struct fc_host_statistics) ||
+	    offset % sizeof(u64) != 0)
+		WARN_ON(1);
+
+	if (i->f->get_fc_host_stats) {
+		stats = (i->f->get_fc_host_stats)(shost);
+		if (stats)
+			ret = snprintf(buf, 20, "0x%llx\n",
+			      (unsigned long long)*(u64 *)(((u8 *) stats) + offset));
+	}
+	return ret;
+}
+
+
+/* generate a read-only statistics attribute */
+#define fc_host_statistic(name)						\
+static ssize_t show_fcstat_##name(struct class_device *cd, char *buf) 	\
+{									\
+	return fc_stat_show(cd, buf, 					\
+			    offsetof(struct fc_host_statistics, name));	\
+}									\
+static FC_CLASS_DEVICE_ATTR(host, name, S_IRUGO, show_fcstat_##name, NULL)
+
+fc_host_statistic(seconds_since_last_reset);
+fc_host_statistic(tx_frames);
+fc_host_statistic(tx_words);
+fc_host_statistic(rx_frames);
+fc_host_statistic(rx_words);
+fc_host_statistic(lip_count);
+fc_host_statistic(nos_count);
+fc_host_statistic(error_frames);
+fc_host_statistic(dumped_frames);
+fc_host_statistic(link_failure_count);
+fc_host_statistic(loss_of_sync_count);
+fc_host_statistic(loss_of_signal_count);
+fc_host_statistic(prim_seq_protocol_err_count);
+fc_host_statistic(invalid_tx_word_count);
+fc_host_statistic(invalid_crc_count);
+fc_host_statistic(fcp_input_requests);
+fc_host_statistic(fcp_output_requests);
+fc_host_statistic(fcp_control_requests);
+fc_host_statistic(fcp_input_megabytes);
+fc_host_statistic(fcp_output_megabytes);
+
+static ssize_t
+fc_reset_statistics(struct class_device *cdev, const char *buf,
+			   size_t count)
+{
+	struct Scsi_Host *shost = transport_class_to_shost(cdev);
+	struct fc_internal *i = to_fc_internal(shost->transportt);
+
+	/* ignore any data value written to the attribute */
+	if (i->f->reset_fc_host_stats) {
+		i->f->reset_fc_host_stats(shost);
+		return count;
+	}
+
+	return -ENOENT;
+}
+static FC_CLASS_DEVICE_ATTR(host, reset_statistics, S_IWUSR, NULL,
+				fc_reset_statistics);
+
+
+static struct attribute *fc_statistics_attrs[] = {
+	&class_device_attr_host_seconds_since_last_reset.attr,
+	&class_device_attr_host_tx_frames.attr,
+	&class_device_attr_host_tx_words.attr,
+	&class_device_attr_host_rx_frames.attr,
+	&class_device_attr_host_rx_words.attr,
+	&class_device_attr_host_lip_count.attr,
+	&class_device_attr_host_nos_count.attr,
+	&class_device_attr_host_error_frames.attr,
+	&class_device_attr_host_dumped_frames.attr,
+	&class_device_attr_host_link_failure_count.attr,
+	&class_device_attr_host_loss_of_sync_count.attr,
+	&class_device_attr_host_loss_of_signal_count.attr,
+	&class_device_attr_host_prim_seq_protocol_err_count.attr,
+	&class_device_attr_host_invalid_tx_word_count.attr,
+	&class_device_attr_host_invalid_crc_count.attr,
+	&class_device_attr_host_fcp_input_requests.attr,
+	&class_device_attr_host_fcp_output_requests.attr,
+	&class_device_attr_host_fcp_control_requests.attr,
+	&class_device_attr_host_fcp_input_megabytes.attr,
+	&class_device_attr_host_fcp_output_megabytes.attr,
+	&class_device_attr_host_reset_statistics.attr,
+	NULL
+};
+
+static struct attribute_group fc_statistics_group = {
+	.name = "statistics",
+	.attrs = fc_statistics_attrs,
+};
 
 
 
@@ -277,12 +733,18 @@
 	i->t.target_attrs = &i->starget_attrs[0];
 	i->t.target_class = &fc_transport_class;
 	i->t.target_setup = &fc_setup_starget_transport_attrs;
+	i->t.target_destroy = &fc_destroy_starget;
 	i->t.target_size = sizeof(struct fc_starget_attrs);
 
 	i->t.host_attrs = &i->host_attrs[0];
 	i->t.host_class = &fc_host_class;
 	i->t.host_setup = &fc_setup_host_transport_attrs;
+	i->t.host_destroy = &fc_destroy_host;
 	i->t.host_size = sizeof(struct fc_host_attrs);
+
+	if (ft->get_fc_host_stats)
+		i->t.host_statistics = &fc_statistics_group;
+
 	i->f = ft;
 
 	
@@ -303,11 +765,26 @@
 
 	/* setup host attributes */
 	count=0;
+	SETUP_HOST_ATTRIBUTE_RD(node_name);
+	SETUP_HOST_ATTRIBUTE_RD(port_name);
+	SETUP_HOST_ATTRIBUTE_RD(supported_classes);
+	SETUP_HOST_ATTRIBUTE_RD(supported_fc4s);
+	SETUP_HOST_ATTRIBUTE_RD(symbolic_name);
+	SETUP_HOST_ATTRIBUTE_RD(supported_speeds);
+	SETUP_HOST_ATTRIBUTE_RD(maxframe_size);
+
+	SETUP_HOST_ATTRIBUTE_RD(port_id);
+	SETUP_HOST_ATTRIBUTE_RD(port_type);
+	SETUP_HOST_ATTRIBUTE_RD(port_state);
+	SETUP_HOST_ATTRIBUTE_RD(active_fc4s);
+	SETUP_HOST_ATTRIBUTE_RD(speed);
+	SETUP_HOST_ATTRIBUTE_RD(fabric_name);
 	SETUP_HOST_ATTRIBUTE_RW(link_down_tmo);
 
-	BUG_ON(count > FC_HOST_NUM_ATTRS);
+	/* Transport-managed attributes */
+	SETUP_PRIVATE_HOST_ATTRIBUTE_RW(tgtid_bind_type);
 
-	/* Setup the always-on attributes here */
+	BUG_ON(count > FC_HOST_NUM_ATTRS);
 
 	i->host_attrs[count] = NULL;
 
@@ -353,7 +830,7 @@
  *			 that fail to recover in the alloted time.
  * @data:	scsi target that failed to reappear in the alloted time.
  **/
-static void fc_timeout_blocked_tgt(unsigned long data)
+static void fc_timeout_blocked_tgt(void  *data)
 {
 	struct scsi_target *starget = (struct scsi_target *)data;
 
@@ -388,7 +865,7 @@
 fc_target_block(struct scsi_target *starget)
 {
 	int timeout = fc_starget_dev_loss_tmo(starget);
-	struct timer_list *timer = &fc_starget_dev_loss_timer(starget);
+	struct work_struct *work = &fc_starget_dev_loss_work(starget);
 
 	if (timeout < 0 || timeout > SCSI_DEVICE_BLOCK_MAX_TIMEOUT)
 		return -EINVAL;
@@ -396,10 +873,7 @@
 	device_for_each_child(&starget->dev, NULL, fc_device_block);
 
 	/* The scsi lld blocks this target for the timeout period only. */
-	timer->data = (unsigned long)starget;
-	timer->expires = jiffies + timeout * HZ;
-	timer->function = fc_timeout_blocked_tgt;
-	add_timer(timer);
+	schedule_delayed_work(work, timeout * HZ);
 
 	return 0;
 }
@@ -424,7 +898,8 @@
 	 * failure as the state machine state change will validate the
 	 * transaction. 
 	 */
-	del_timer_sync(&fc_starget_dev_loss_timer(starget));
+	if (cancel_delayed_work(&fc_starget_dev_loss_work(starget)))
+		flush_scheduled_work();
 
 	device_for_each_child(&starget->dev, NULL, fc_device_unblock);
 }
@@ -436,7 +911,7 @@
  * @data:	scsi host that failed to recover its devices in the alloted
  *		time.
  **/
-static void fc_timeout_blocked_host(unsigned long data)
+static void fc_timeout_blocked_host(void  *data)
 {
 	struct Scsi_Host *shost = (struct Scsi_Host *)data;
 	struct scsi_device *sdev;
@@ -475,7 +950,7 @@
 {
 	struct scsi_device *sdev;
 	int timeout = fc_host_link_down_tmo(shost);
-	struct timer_list *timer = &fc_host_link_down_timer(shost);
+	struct work_struct *work = &fc_host_link_down_work(shost);
 
 	if (timeout < 0 || timeout > SCSI_DEVICE_BLOCK_MAX_TIMEOUT)
 		return -EINVAL;
@@ -484,11 +959,7 @@
 		scsi_internal_device_block(sdev);
 	}
 
-	/* The scsi lld blocks this host for the timeout period only. */
-	timer->data = (unsigned long)shost;
-	timer->expires = jiffies + timeout * HZ;
-	timer->function = fc_timeout_blocked_host;
-	add_timer(timer);
+	schedule_delayed_work(work, timeout * HZ);
 
 	return 0;
 }
@@ -516,7 +987,9 @@
 	 * failure as the state machine state change will validate the
 	 * transaction.
 	 */
-	del_timer_sync(&fc_host_link_down_timer(shost));
+	if (cancel_delayed_work(&fc_host_link_down_work(shost)))
+		flush_scheduled_work();
+
 	shost_for_each_device(sdev, shost) {
 		scsi_internal_device_unblock(sdev);
 	}
diff -Nru a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/scsi/scsi_transport_iscsi.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,355 @@
+/* 
+ * iSCSI transport class definitions
+ *
+ * Copyright (C) IBM Corporation, 2004
+ * Copyright (C) Mike Christie, 2004
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+#include <linux/module.h>
+#include <scsi/scsi.h>
+#include <scsi/scsi_host.h>
+#include <scsi/scsi_device.h>
+#include <scsi/scsi_transport.h>
+#include <scsi/scsi_transport_iscsi.h>
+
+#define ISCSI_SESSION_ATTRS 20
+#define ISCSI_HOST_ATTRS 2
+
+struct iscsi_internal {
+	struct scsi_transport_template t;
+	struct iscsi_function_template *fnt;
+	/*
+	 * We do not have any private or other attrs.
+	 */
+	struct class_device_attribute *session_attrs[ISCSI_SESSION_ATTRS + 1];
+	struct class_device_attribute *host_attrs[ISCSI_HOST_ATTRS + 1];
+};
+
+#define to_iscsi_internal(tmpl) container_of(tmpl, struct iscsi_internal, t)
+
+static void iscsi_transport_class_release(struct class_device *class_dev)
+{
+	struct scsi_target *starget = transport_class_to_starget(class_dev);
+	put_device(&starget->dev);
+}
+
+struct class iscsi_transport_class = {
+	.name = "iscsi_transport_class",
+	.release = iscsi_transport_class_release,
+};
+
+static void iscsi_host_class_release(struct class_device *class_dev)
+{
+	struct Scsi_Host *shost = transport_class_to_shost(class_dev);
+	put_device(&shost->shost_gendev);
+}
+
+struct class iscsi_host_class = {
+	.name = "iscsi_host",
+	.release = iscsi_host_class_release,
+};
+
+/*
+ * iSCSI target and session attrs
+ */
+#define iscsi_session_show_fn(field, format)				\
+									\
+static ssize_t								\
+show_session_##field(struct class_device *cdev, char *buf)		\
+{									\
+	struct scsi_target *starget = transport_class_to_starget(cdev);	\
+	struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);	\
+	struct iscsi_internal *i = to_iscsi_internal(shost->transportt); \
+									\
+	if (i->fnt->get_##field)					\
+		i->fnt->get_##field(starget);				\
+	return snprintf(buf, 20, format"\n", iscsi_##field(starget));	\
+}
+
+#define iscsi_session_rd_attr(field, format)				\
+	iscsi_session_show_fn(field, format)				\
+static CLASS_DEVICE_ATTR(field, S_IRUGO, show_session_##field, NULL);
+
+iscsi_session_rd_attr(tpgt, "%hu");
+iscsi_session_rd_attr(tsih, "%2x");
+iscsi_session_rd_attr(max_recv_data_segment_len, "%u");
+iscsi_session_rd_attr(max_burst_len, "%u");
+iscsi_session_rd_attr(first_burst_len, "%u");
+iscsi_session_rd_attr(def_time2wait, "%hu");
+iscsi_session_rd_attr(def_time2retain, "%hu");
+iscsi_session_rd_attr(max_outstanding_r2t, "%hu");
+iscsi_session_rd_attr(erl, "%d");
+
+
+#define iscsi_session_show_bool_fn(field)				\
+									\
+static ssize_t								\
+show_session_bool_##field(struct class_device *cdev, char *buf)		\
+{									\
+	struct scsi_target *starget = transport_class_to_starget(cdev);	\
+	struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);	\
+	struct iscsi_internal *i = to_iscsi_internal(shost->transportt); \
+									\
+	if (i->fnt->get_##field)					\
+		i->fnt->get_##field(starget);				\
+									\
+	if (iscsi_##field(starget))					\
+		return sprintf(buf, "Yes\n");				\
+	return sprintf(buf, "No\n");					\
+}
+
+#define iscsi_session_rd_bool_attr(field)				\
+	iscsi_session_show_bool_fn(field)				\
+static CLASS_DEVICE_ATTR(field, S_IRUGO, show_session_bool_##field, NULL);
+
+iscsi_session_rd_bool_attr(initial_r2t);
+iscsi_session_rd_bool_attr(immediate_data);
+iscsi_session_rd_bool_attr(data_pdu_in_order);
+iscsi_session_rd_bool_attr(data_sequence_in_order);
+
+#define iscsi_session_show_digest_fn(field)				\
+									\
+static ssize_t								\
+show_##field(struct class_device *cdev, char *buf)			\
+{									\
+	struct scsi_target *starget = transport_class_to_starget(cdev);	\
+	struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);	\
+	struct iscsi_internal *i = to_iscsi_internal(shost->transportt); \
+									\
+	if (i->fnt->get_##field)					\
+		i->fnt->get_##field(starget);				\
+									\
+	if (iscsi_##field(starget))					\
+		return sprintf(buf, "CRC32C\n");			\
+	return sprintf(buf, "None\n");					\
+}
+
+#define iscsi_session_rd_digest_attr(field)				\
+	iscsi_session_show_digest_fn(field)				\
+static CLASS_DEVICE_ATTR(field, S_IRUGO, show_##field, NULL);
+
+iscsi_session_rd_digest_attr(header_digest);
+iscsi_session_rd_digest_attr(data_digest);
+
+static ssize_t
+show_port(struct class_device *cdev, char *buf)
+{
+	struct scsi_target *starget = transport_class_to_starget(cdev);
+	struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
+	struct iscsi_internal *i = to_iscsi_internal(shost->transportt);
+
+	if (i->fnt->get_port)
+		i->fnt->get_port(starget);
+
+	return snprintf(buf, 20, "%hu\n", ntohs(iscsi_port(starget)));
+}
+static CLASS_DEVICE_ATTR(port, S_IRUGO, show_port, NULL);
+
+static ssize_t
+show_ip_address(struct class_device *cdev, char *buf)
+{
+	struct scsi_target *starget = transport_class_to_starget(cdev);
+	struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
+	struct iscsi_internal *i = to_iscsi_internal(shost->transportt);
+
+	if (i->fnt->get_ip_address)
+		i->fnt->get_ip_address(starget);
+
+	if (iscsi_addr_type(starget) == AF_INET)
+		return sprintf(buf, "%u.%u.%u.%u\n",
+			       NIPQUAD(iscsi_sin_addr(starget)));
+	else if(iscsi_addr_type(starget) == AF_INET6)
+		return sprintf(buf, "%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
+			       NIP6(iscsi_sin6_addr(starget)));
+	return -EINVAL;
+}
+static CLASS_DEVICE_ATTR(ip_address, S_IRUGO, show_ip_address, NULL);
+
+static ssize_t
+show_isid(struct class_device *cdev, char *buf)
+{
+	struct scsi_target *starget = transport_class_to_starget(cdev);
+	struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
+	struct iscsi_internal *i = to_iscsi_internal(shost->transportt);
+
+	if (i->fnt->get_isid)
+		i->fnt->get_isid(starget);
+
+	return sprintf(buf, "%02x%02x%02x%02x%02x%02x\n",
+		       iscsi_isid(starget)[0], iscsi_isid(starget)[1],
+		       iscsi_isid(starget)[2], iscsi_isid(starget)[3],
+		       iscsi_isid(starget)[4], iscsi_isid(starget)[5]);
+}
+static CLASS_DEVICE_ATTR(isid, S_IRUGO, show_isid, NULL);
+
+/*
+ * This is used for iSCSI names. Normally, we follow
+ * the transport class convention of having the lld
+ * set the field, but in these cases the value is
+ * too large.
+ */
+#define iscsi_session_show_str_fn(field)				\
+									\
+static ssize_t								\
+show_session_str_##field(struct class_device *cdev, char *buf)		\
+{									\
+	ssize_t ret = 0;						\
+	struct scsi_target *starget = transport_class_to_starget(cdev);	\
+	struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);	\
+	struct iscsi_internal *i = to_iscsi_internal(shost->transportt); \
+									\
+	if (i->fnt->get_##field)					\
+		ret = i->fnt->get_##field(starget, buf, PAGE_SIZE);	\
+	return ret;							\
+}
+
+#define iscsi_session_rd_str_attr(field)				\
+	iscsi_session_show_str_fn(field)				\
+static CLASS_DEVICE_ATTR(field, S_IRUGO, show_session_str_##field, NULL);
+
+iscsi_session_rd_str_attr(target_name);
+iscsi_session_rd_str_attr(target_alias);
+
+/*
+ * iSCSI host attrs
+ */
+
+/*
+ * Again, this is used for iSCSI names. Normally, we follow
+ * the transport class convention of having the lld set
+ * the field, but in these cases the value is too large.
+ */
+#define iscsi_host_show_str_fn(field)					\
+									\
+static ssize_t								\
+show_host_str_##field(struct class_device *cdev, char *buf)		\
+{									\
+	int ret = 0;							\
+	struct Scsi_Host *shost = transport_class_to_shost(cdev);	\
+	struct iscsi_internal *i = to_iscsi_internal(shost->transportt); \
+									\
+	if (i->fnt->get_##field)					\
+		ret = i->fnt->get_##field(shost, buf, PAGE_SIZE);	\
+	return ret;							\
+}
+
+#define iscsi_host_rd_str_attr(field)					\
+	iscsi_host_show_str_fn(field)					\
+static CLASS_DEVICE_ATTR(field, S_IRUGO, show_host_str_##field, NULL);
+
+iscsi_host_rd_str_attr(initiator_name);
+iscsi_host_rd_str_attr(initiator_alias);
+
+#define SETUP_SESSION_RD_ATTR(field)					\
+	if (i->fnt->show_##field) {					\
+		i->session_attrs[count] = &class_device_attr_##field;	\
+		count++;						\
+	}
+
+#define SETUP_HOST_RD_ATTR(field)					\
+	if (i->fnt->show_##field) {					\
+		i->host_attrs[count] = &class_device_attr_##field;	\
+		count++;						\
+	}
+
+struct scsi_transport_template *
+iscsi_attach_transport(struct iscsi_function_template *fnt)
+{
+	struct iscsi_internal *i = kmalloc(sizeof(struct iscsi_internal),
+					   GFP_KERNEL);
+	int count = 0;
+
+	if (unlikely(!i))
+		return NULL;
+
+	memset(i, 0, sizeof(struct iscsi_internal));
+	i->fnt = fnt;
+
+	i->t.target_attrs = &i->session_attrs[0];
+	i->t.target_class = &iscsi_transport_class;
+	i->t.target_setup = NULL;
+	i->t.target_size = sizeof(struct iscsi_class_session);
+
+	SETUP_SESSION_RD_ATTR(tsih);
+	SETUP_SESSION_RD_ATTR(isid);
+	SETUP_SESSION_RD_ATTR(header_digest);
+	SETUP_SESSION_RD_ATTR(data_digest);
+	SETUP_SESSION_RD_ATTR(target_name);
+	SETUP_SESSION_RD_ATTR(target_alias);
+	SETUP_SESSION_RD_ATTR(port);
+	SETUP_SESSION_RD_ATTR(tpgt);
+	SETUP_SESSION_RD_ATTR(ip_address);
+	SETUP_SESSION_RD_ATTR(initial_r2t);
+	SETUP_SESSION_RD_ATTR(immediate_data);
+	SETUP_SESSION_RD_ATTR(max_recv_data_segment_len);
+	SETUP_SESSION_RD_ATTR(max_burst_len);
+	SETUP_SESSION_RD_ATTR(first_burst_len);
+	SETUP_SESSION_RD_ATTR(def_time2wait);
+	SETUP_SESSION_RD_ATTR(def_time2retain);
+	SETUP_SESSION_RD_ATTR(max_outstanding_r2t);
+	SETUP_SESSION_RD_ATTR(data_pdu_in_order);
+	SETUP_SESSION_RD_ATTR(data_sequence_in_order);
+	SETUP_SESSION_RD_ATTR(erl);
+
+	BUG_ON(count > ISCSI_SESSION_ATTRS);
+	i->session_attrs[count] = NULL;
+
+	i->t.host_attrs = &i->host_attrs[0];
+	i->t.host_class = &iscsi_host_class;
+	i->t.host_setup = NULL;
+	i->t.host_size = 0;
+
+	count = 0;
+	SETUP_HOST_RD_ATTR(initiator_name);
+	SETUP_HOST_RD_ATTR(initiator_alias);
+
+	BUG_ON(count > ISCSI_HOST_ATTRS);
+	i->host_attrs[count] = NULL;
+
+	return &i->t;
+}
+
+EXPORT_SYMBOL(iscsi_attach_transport);
+
+void iscsi_release_transport(struct scsi_transport_template *t)
+{
+	struct iscsi_internal *i = to_iscsi_internal(t);
+	kfree(i);
+}
+
+EXPORT_SYMBOL(iscsi_release_transport);
+
+static __init int iscsi_transport_init(void)
+{
+	int err = class_register(&iscsi_transport_class);
+
+	if (err)
+		return err;
+	return class_register(&iscsi_host_class);
+}
+
+static void __exit iscsi_transport_exit(void)
+{
+	class_unregister(&iscsi_host_class);
+	class_unregister(&iscsi_transport_class);
+}
+
+module_init(iscsi_transport_init);
+module_exit(iscsi_transport_exit);
+
+MODULE_AUTHOR("Mike Christie");
+MODULE_DESCRIPTION("iSCSI Transport Attributes");
+MODULE_LICENSE("GPL");
diff -Nru a/drivers/scsi/scsicam.c b/drivers/scsi/scsicam.c
--- a/drivers/scsi/scsicam.c	2005-01-10 20:11:24 -08:00
+++ b/drivers/scsi/scsicam.c	2005-01-10 20:11:24 -08:00
@@ -41,6 +41,7 @@
 	}
 	return res;
 }
+EXPORT_SYMBOL(scsi_bios_ptable);
 
 /*
  * Function : int scsicam_bios_param (struct block_device *bdev, ector_t capacity, int *ip)
@@ -94,6 +95,7 @@
 
 	return 0;
 }
+EXPORT_SYMBOL(scsicam_bios_param);
 
 /*
  * Function : static int scsi_partsize(unsigned char *buf, unsigned long 
@@ -175,6 +177,7 @@
 	}
 	return -1;
 }
+EXPORT_SYMBOL(scsi_partsize);
 
 /*
  * Function : static int setsize(unsigned long capacity,unsigned int *cyls,
diff -Nru a/drivers/scsi/sim710.c b/drivers/scsi/sim710.c
--- a/drivers/scsi/sim710.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/scsi/sim710.c	2005-01-10 20:11:21 -08:00
@@ -53,7 +53,7 @@
 MODULE_DESCRIPTION("Simple NCR53C710 driver");
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(sim710, "s");
+module_param(sim710, charp, 0);
 
 #ifdef MODULE
 #define ARG_SEP ' '
diff -Nru a/drivers/scsi/sr.c b/drivers/scsi/sr.c
--- a/drivers/scsi/sr.c	2005-01-10 20:11:24 -08:00
+++ b/drivers/scsi/sr.c	2005-01-10 20:11:24 -08:00
@@ -59,9 +59,6 @@
 #include "sr.h"
 
 
-MODULE_PARM(xa_test, "i");	/* see sr_ioctl.c */
-
-
 #define SR_DISKS	256
 
 #define MAX_RETRIES	3
diff -Nru a/drivers/scsi/sr_ioctl.c b/drivers/scsi/sr_ioctl.c
--- a/drivers/scsi/sr_ioctl.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/scsi/sr_ioctl.c	2005-01-10 20:11:20 -08:00
@@ -29,6 +29,9 @@
  * It is off by default and can be turned on with this module parameter */
 static int xa_test = 0;
 
+module_param(xa_test, int, S_IRUGO | S_IWUSR);
+
+
 #define IOCTL_RETRIES 3
 
 /* ATAPI drives don't have a SCMD_PLAYAUDIO_TI command.  When these drives
diff -Nru a/drivers/serial/8250.c b/drivers/serial/8250.c
--- a/drivers/serial/8250.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/serial/8250.c	2005-01-10 20:11:16 -08:00
@@ -31,6 +31,7 @@
 #include <linux/init.h>
 #include <linux/console.h>
 #include <linux/sysrq.h>
+#include <linux/mca.h>
 #include <linux/delay.h>
 #include <linux/device.h>
 #include <linux/tty.h>
@@ -1861,13 +1862,11 @@
 	int probeflags = PROBE_ANY;
 	int ret;
 
-#ifdef CONFIG_MCA
 	/*
 	 * Don't probe for MCA ports on non-MCA machines.
 	 */
 	if (up->port.flags & UPF_BOOT_ONLYMCA && !MCA_bus)
 		return;
-#endif
 
 	/*
 	 * Find the region that we can probe for.  This in turn
diff -Nru a/drivers/serial/8250_pnp.c b/drivers/serial/8250_pnp.c
--- a/drivers/serial/8250_pnp.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/serial/8250_pnp.c	2005-01-10 20:11:15 -08:00
@@ -250,6 +250,8 @@
 	/* Kortex International */
 	/* KORTEX 14400 Externe PnP */
 	{	"ROK0100",		0	},
+	/* Rockwell 28.8 */
+	{	"ROK4120",		0	},
 	/* Viking Components, Inc */
 	/* Viking 28.8 INTERNAL Fax+Data+Voice PnP */
 	{	"ROK4920",		0	},
diff -Nru a/drivers/serial/icom.c b/drivers/serial/icom.c
--- a/drivers/serial/icom.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/serial/icom.c	2005-01-10 20:11:17 -08:00
@@ -1656,7 +1656,6 @@
 	int ret;
 
 	spin_lock_init(&icom_lock);
-	icom_lock = (spinlock_t) SPIN_LOCK_UNLOCKED;
 
 	ret = uart_register_driver(&icom_uart_driver);
 	if (ret)
diff -Nru a/drivers/serial/mcfserial.c b/drivers/serial/mcfserial.c
--- a/drivers/serial/mcfserial.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/serial/mcfserial.c	2005-01-10 20:11:18 -08:00
@@ -58,11 +58,16 @@
  *	keep going.  Perhaps one day the cflag settings for the
  *	console can be used instead.
  */
-#if defined(CONFIG_ARNEWSH) || defined(CONFIG_MOTOROLA) || defined(CONFIG_senTec)
+#if defined(CONFIG_ARNEWSH) || defined(CONFIG_MOTOROLA) || defined(CONFIG_senTec) || defined(CONFIG_SNEHA)
 #define	CONSOLE_BAUD_RATE	19200
 #define	DEFAULT_CBAUD		B19200
 #endif
 
+#if defined(CONFIG_HW_FEITH)
+  #define	CONSOLE_BAUD_RATE	38400
+  #define	DEFAULT_CBAUD		B38400
+#endif
+
 #ifndef CONSOLE_BAUD_RATE
 #define	CONSOLE_BAUD_RATE	9600
 #define	DEFAULT_CBAUD		B9600
@@ -86,8 +91,8 @@
 #undef SERIAL_DEBUG_OPEN
 #undef SERIAL_DEBUG_FLOW
 
-#ifdef CONFIG_M5282
-#define	IRQBASE	77
+#if defined(CONFIG_M527x) || defined(CONFIG_M528x)
+#define	IRQBASE	(MCFINT_VECBASE+MCFINT_UART0)
 #else
 #define	IRQBASE	73
 #endif
@@ -337,20 +342,24 @@
 #endif
 
 		tty->flip.count++;
-		if (status & MCFUART_USR_RXERR)
+		if (status & MCFUART_USR_RXERR) {
 			uartp[MCFUART_UCR] = MCFUART_UCR_CMDRESETERR;
-		if (status & MCFUART_USR_RXBREAK) {
-			info->stats.rxbreak++;
-			*tty->flip.flag_buf_ptr++ = TTY_BREAK;
-		} else if (status & MCFUART_USR_RXPARITY) {
-			info->stats.rxparity++;
-			*tty->flip.flag_buf_ptr++ = TTY_PARITY;
-		} else if (status & MCFUART_USR_RXOVERRUN) {
-			info->stats.rxoverrun++;
-			*tty->flip.flag_buf_ptr++ = TTY_OVERRUN;
-		} else if (status & MCFUART_USR_RXFRAMING) {
-			info->stats.rxframing++;
-			*tty->flip.flag_buf_ptr++ = TTY_FRAME;
+			if (status & MCFUART_USR_RXBREAK) {
+				info->stats.rxbreak++;
+				*tty->flip.flag_buf_ptr++ = TTY_BREAK;
+			} else if (status & MCFUART_USR_RXPARITY) {
+				info->stats.rxparity++;
+				*tty->flip.flag_buf_ptr++ = TTY_PARITY;
+			} else if (status & MCFUART_USR_RXOVERRUN) {
+				info->stats.rxoverrun++;
+				*tty->flip.flag_buf_ptr++ = TTY_OVERRUN;
+			} else if (status & MCFUART_USR_RXFRAMING) {
+				info->stats.rxframing++;
+				*tty->flip.flag_buf_ptr++ = TTY_FRAME;
+			} else {
+				/* This should never happen... */
+				*tty->flip.flag_buf_ptr++ = 0;
+			}
 		} else {
 			*tty->flip.flag_buf_ptr++ = 0;
 		}
@@ -724,13 +733,25 @@
 	if (serial_paranoia_check(info, tty->name, "mcfrs_flush_chars"))
 		return;
 
+	uartp = (volatile unsigned char *) info->addr;
+
+	/*
+	 * re-enable receiver interrupt
+	 */
+	local_irq_save(flags);
+	if ((!(info->imr & MCFUART_UIR_RXREADY)) &&
+	    (info->flags & ASYNC_INITIALIZED) ) {
+		info->imr |= MCFUART_UIR_RXREADY;
+		uartp[MCFUART_UIMR] = info->imr;
+	}
+	local_irq_restore(flags);
+
 	if (info->xmit_cnt <= 0 || tty->stopped || tty->hw_stopped ||
 	    !info->xmit_buf)
 		return;
 
 	/* Enable transmitter */
 	local_irq_save(flags);
-	uartp = info->addr;
 	info->imr |= MCFUART_UIR_TXREADY;
 	uartp[MCFUART_UIMR] = info->imr;
 	local_irq_restore(flags);
@@ -984,7 +1005,7 @@
 
 	local_irq_save(flags);
 	uartp[MCFUART_UCR] = MCFUART_UCR_CMDBREAKSTART;
-	schedule_timeout(jiffies + duration);
+	schedule_timeout(duration);
 	uartp[MCFUART_UCR] = MCFUART_UCR_CMDBREAKSTOP;
 	local_irq_restore(flags);
 }
@@ -1506,7 +1527,7 @@
 	*portp = (*portp & ~0x000000ff) | 0x00000055;
 	portp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_PDCNT);
 	*portp = (*portp & ~0x000003fc) | 0x000002a8;
-#elif defined(CONFIG_M5282)
+#elif defined(CONFIG_M527x) || defined(CONFIG_M528x)
 	volatile unsigned char *icrp, *uartp;
 	volatile unsigned long *imrp;
 
@@ -1518,7 +1539,7 @@
 
 	imrp = (volatile unsigned long *) (MCF_MBAR + MCFICM_INTC0 +
 		MCFINTC_IMRL);
-	*imrp &= ~((1 << (info->irq - 64)) | 1);
+	*imrp &= ~((1 << (info->irq - MCFINT_VECBASE)) | 1);
 #else
 	volatile unsigned char	*icrp, *uartp;
 
diff -Nru a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c
--- a/drivers/serial/mpc52xx_uart.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/serial/mpc52xx_uart.c	2005-01-10 20:11:18 -08:00
@@ -640,7 +640,7 @@
 	
 	/* Basic port init. Needed since we use some uart_??? func before
 	 * real init for early access */
-	port->lock	= SPIN_LOCK_UNLOCKED;
+	spin_lock_init(&port->lock);
 	port->uartclk	= __res.bi_ipbfreq / 2; /* Look at CTLR doc */
 	port->ops	= &mpc52xx_uart_ops;
 	port->mapbase	= MPC52xx_PSCx(co->index);
@@ -724,7 +724,7 @@
 	port = &mpc52xx_uart_ports[idx];
 
 	/* Init the port structure */
-	port->lock	= SPIN_LOCK_UNLOCKED;
+	spin_lock_init(&port->lock);
 	port->mapbase	= ocp->def->paddr;
 	port->irq	= ocp->def->irq;
 	port->uartclk	= __res.bi_ipbfreq / 2; /* Look at CTLR doc */
diff -Nru a/drivers/serial/sn_console.c b/drivers/serial/sn_console.c
--- a/drivers/serial/sn_console.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/serial/sn_console.c	2005-01-10 20:11:18 -08:00
@@ -853,7 +853,7 @@
 		return -ENODEV;
 	}
 
-	sal_console_port.sc_port.lock = SPIN_LOCK_UNLOCKED;
+	spin_lock_init(&sal_console_port.sc_port.lock);
 
 	/* Setup the port struct with the minimum needed */
 	sal_console_port.sc_port.membase = (char *)1;	/* just needs to be non-zero */
diff -Nru a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c
--- a/drivers/serial/sunsu.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/serial/sunsu.c	2005-01-10 20:11:17 -08:00
@@ -1285,7 +1285,9 @@
 
 static int __init sunsu_kbd_ms_init(struct uart_sunsu_port *up, int channel)
 {
+#ifdef CONFIG_SERIO
 	struct serio *serio;
+#endif
 
 	up->port.line = channel;
 	up->port.type = PORT_UNKNOWN;
diff -Nru a/drivers/telephony/ixj.c b/drivers/telephony/ixj.c
--- a/drivers/telephony/ixj.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/telephony/ixj.c	2005-01-10 20:11:16 -08:00
@@ -285,7 +285,7 @@
 static int hertz = HZ;
 static int samplerate = 100;
 
-MODULE_PARM(ixjdebug, "i");
+module_param(ixjdebug, int, 0);
 
 /************************************************************************
 *
@@ -406,14 +406,10 @@
 	return 0;
 }
 
-static IXJ_REGFUNC ixj_DownloadG729 = &Stub;
-static IXJ_REGFUNC ixj_DownloadTS85 = &Stub;
 static IXJ_REGFUNC ixj_PreRead = &Stub;
 static IXJ_REGFUNC ixj_PostRead = &Stub;
 static IXJ_REGFUNC ixj_PreWrite = &Stub;
 static IXJ_REGFUNC ixj_PostWrite = &Stub;
-static IXJ_REGFUNC ixj_PreIoctl = &Stub;
-static IXJ_REGFUNC ixj_PostIoctl = &Stub;
 
 static void ixj_read_frame(IXJ *j);
 static void ixj_write_frame(IXJ *j);
@@ -792,97 +788,6 @@
 	return 0;
 }
 
-static int ixj_register(int index, IXJ_REGFUNC regfunc)
-{
-	int cnt;
-	int retval = 0;
-	switch (index) {
-	case G729LOADER:
-		ixj_DownloadG729 = regfunc;
-		for (cnt = 0; cnt < IXJMAX; cnt++) {
-			IXJ *j = get_ixj(cnt);
-			while(test_and_set_bit(cnt, (void *)&j->busyflags) != 0) {
-				set_current_state(TASK_INTERRUPTIBLE);
-				schedule_timeout(1);
-			}
-			ixj_DownloadG729(j, 0L);
-			clear_bit(cnt, &j->busyflags);
-		}
-		break;
-	case TS85LOADER:
-		ixj_DownloadTS85 = regfunc;
-		for (cnt = 0; cnt < IXJMAX; cnt++) {
-			IXJ *j = get_ixj(cnt);
-			while(test_and_set_bit(cnt, (void *)&j->busyflags) != 0) {
-				set_current_state(TASK_INTERRUPTIBLE);
-				schedule_timeout(1);
-			}
-			ixj_DownloadTS85(j, 0L);
-			clear_bit(cnt, &j->busyflags);
-		}
-		break;
-	case PRE_READ:
-		ixj_PreRead = regfunc;
-		break;
-	case POST_READ:
-		ixj_PostRead = regfunc;
-		break;
-	case PRE_WRITE:
-		ixj_PreWrite = regfunc;
-		break;
-	case POST_WRITE:
-		ixj_PostWrite = regfunc;
-		break;
-	case PRE_IOCTL:
-		ixj_PreIoctl = regfunc;
-		break;
-	case POST_IOCTL:
-		ixj_PostIoctl = regfunc;
-		break;
-	default:
-		retval = 1;
-	}
-	return retval;
-}
-
-EXPORT_SYMBOL(ixj_register);
-
-static int ixj_unregister(int index)
-{
-	int retval = 0;
-	switch (index) {
-	case G729LOADER:
-		ixj_DownloadG729 = &Stub;
-		break;
-	case TS85LOADER:
-		ixj_DownloadTS85 = &Stub;
-		break;
-	case PRE_READ:
-		ixj_PreRead = &Stub;
-		break;
-	case POST_READ:
-		ixj_PostRead = &Stub;
-		break;
-	case PRE_WRITE:
-		ixj_PreWrite = &Stub;
-		break;
-	case POST_WRITE:
-		ixj_PostWrite = &Stub;
-		break;
-	case PRE_IOCTL:
-		ixj_PreIoctl = &Stub;
-		break;
-	case POST_IOCTL:
-		ixj_PostIoctl = &Stub;
-		break;
-	default:
-		retval = 1;
-	}
-	return retval;
-}
-
-EXPORT_SYMBOL(ixj_unregister);
-
 static void ixj_init_timer(IXJ *j)
 {
 	init_timer(&j->timer);
@@ -2257,7 +2162,7 @@
 	return 0;
 }
 
-int ixj_release(struct inode *inode, struct file *file_p)
+static int ixj_release(struct inode *inode, struct file *file_p)
 {
 	IXJ_TONE ti;
 	int cnt;
@@ -6785,7 +6690,7 @@
 	return fasync_helper(fd, file_p, mode, &j->async_queue);
 }
 
-struct file_operations ixj_fops =
+static struct file_operations ixj_fops =
 {
         .owner          = THIS_MODULE,
         .read           = ixj_enhanced_read,
@@ -7707,8 +7612,8 @@
 	0,
 };
 
-MODULE_PARM(dspio, "1-" __MODULE_STRING(IXJMAX) "i");
-MODULE_PARM(xio, "1-" __MODULE_STRING(IXJMAX) "i");
+module_param_array(dspio, int, NULL, 0);
+module_param_array(xio, int, NULL, 0);
 MODULE_DESCRIPTION("Quicknet VoIP Telephony card module - www.quicknet.net");
 MODULE_AUTHOR("Ed Okerson <eokerson@quicknet.net>");
 MODULE_LICENSE("GPL");
@@ -7735,7 +7640,7 @@
 	return res;
 }
 
-int __init ixj_probe_isapnp(int *cnt)
+static int __init ixj_probe_isapnp(int *cnt)
 {               
 	int probe = 0;
 	int func = 0x110;
@@ -7815,7 +7720,7 @@
 	return probe;
 }
                         
-int __init ixj_probe_isa(int *cnt)
+static int __init ixj_probe_isa(int *cnt)
 {
 	int i, probe;
 
@@ -7839,7 +7744,7 @@
 	return 0;
 }
 
-int __init ixj_probe_pci(int *cnt)
+static int __init ixj_probe_pci(int *cnt)
 {
 	struct pci_dev *pci = NULL;   
 	int i, probe = 0;
diff -Nru a/drivers/usb/Makefile b/drivers/usb/Makefile
--- a/drivers/usb/Makefile	2005-01-10 20:11:22 -08:00
+++ b/drivers/usb/Makefile	2005-01-10 20:11:22 -08:00
@@ -9,7 +9,7 @@
 obj-$(CONFIG_USB_EHCI_HCD)	+= host/
 obj-$(CONFIG_USB_OHCI_HCD)	+= host/
 obj-$(CONFIG_USB_UHCI_HCD)	+= host/
-obj-$(CONFIG_USB_SL811HS)	+= host/
+obj-$(CONFIG_USB_SL811_HCD)	+= host/
 obj-$(CONFIG_ETRAX_USB_HOST)	+= host/
 
 obj-$(CONFIG_USB_ACM)		+= class/
@@ -49,7 +49,6 @@
 obj-$(CONFIG_USB_RTL8150)	+= net/
 obj-$(CONFIG_USB_USBNET)	+= net/
 
-obj-$(CONFIG_USB_DC2XX)		+= image/
 obj-$(CONFIG_USB_HPUSBSCSI)	+= image/
 obj-$(CONFIG_USB_MDC800)	+= image/
 obj-$(CONFIG_USB_MICROTEK)	+= image/
@@ -65,7 +64,6 @@
 obj-$(CONFIG_USB_LEGOTOWER)	+= misc/
 obj-$(CONFIG_USB_RIO500)	+= misc/
 obj-$(CONFIG_USB_TEST)		+= misc/
-obj-$(CONFIG_USB_TIGL)		+= misc/
 obj-$(CONFIG_USB_USS720)	+= misc/
 obj-$(CONFIG_USB_PHIDGETSERVO)	+= misc/
 
diff -Nru a/drivers/usb/README b/drivers/usb/README
--- a/drivers/usb/README	2005-01-10 20:11:22 -08:00
+++ b/drivers/usb/README	2005-01-10 20:11:22 -08:00
@@ -1,14 +1,37 @@
+To understand all the Linux-USB framework, you'll use these resources:
+
+    * This source code.  This is necessarily an evolving work, and
+      includes kerneldoc that should help you get a current overview.
+      ("make pdfdocs", and then look at "usb.pdf" for host side and
+      "gadget.pdf" for peripheral side.)  Also, Documentation/usb has
+      more information.
+
+    * The USB 2.0 specification (from www.usb.org), with supplements
+      such as those for USB OTG and the various device classes.
+      The USB specification has a good overview chapter, and USB
+      peripherals conform to the widely known "Chapter 9".
+
+    * Chip specifications for USB controllers.  Examples include
+      host controllers (on PCs, servers, and more); peripheral
+      controllers (in devices with Linux firmware, like printers or
+      cell phones); and hard-wired peripherals like Ethernet adapters.
+
+    * Specifications for other protocols implemented by USB peripheral
+      functions.  Some are vendor-specific; others are vendor-neutral
+      but just standardized outside of the www.usb.org team.
+
 Here is a list of what each subdirectory here is, and what is contained in
 them.
 
 core/		- This is for the core USB host code, including the
-		  usbfs files.
+		  usbfs files and the hub class driver ("khubd").
 
-host/		- This is for all of the USB host drivers.  This
-		  includes UHCI, OHCI, EHCI, and any others that might
-		  be created in the future.
+host/		- This is for USB host controller drivers.  This
+		  includes UHCI, OHCI, EHCI, and others that might
+		  be used with more specialized "embedded" systems.
 
-gadget/		- This is for all of the USB device controller drivers. 
+gadget/		- This is for USB peripheral controller drivers and
+		  the various gadget drivers which talk to them.
 
 
 Individual USB driver directories.  A new driver should be added to the
diff -Nru a/drivers/usb/atm/speedtch.c b/drivers/usb/atm/speedtch.c
--- a/drivers/usb/atm/speedtch.c	2005-01-10 20:11:24 -08:00
+++ b/drivers/usb/atm/speedtch.c	2005-01-10 20:11:24 -08:00
@@ -44,30 +44,10 @@
 
 #include "usb_atm.h"
 
-/*
-#define DEBUG
-#define VERBOSE_DEBUG
-*/
-
-#if !defined (DEBUG) && defined (CONFIG_USB_DEBUG)
-#	define DEBUG
-#endif
-
-#include <linux/usb.h>
-
 #if defined(CONFIG_FW_LOADER) || defined(CONFIG_FW_LOADER_MODULE)
 #	define USE_FW_LOADER
 #endif
 
-#ifdef VERBOSE_DEBUG
-static int udsl_print_packet(const unsigned char *data, int len);
-#define PACKETDEBUG(arg...)	udsl_print_packet (arg)
-#define vdbg(arg...)		dbg (arg)
-#else
-#define PACKETDEBUG(arg...)
-#define vdbg(arg...)
-#endif
-
 #define DRIVER_AUTHOR	"Johan Verrept, Duncan Sands <duncan.sands@free.fr>"
 #define DRIVER_VERSION	"1.8"
 #define DRIVER_DESC	"Alcatel SpeedTouch USB driver version " DRIVER_VERSION
@@ -594,7 +574,7 @@
 				  const struct firmware **fw_p)
 {
 	char buf[24];
-	const u16 bcdDevice = instance->u.usb_dev->descriptor.bcdDevice;
+	const u16 bcdDevice = le16_to_cpu(instance->u.usb_dev->descriptor.bcdDevice);
 	const u8 major_revision = bcdDevice >> 8;
 	const u8 minor_revision = bcdDevice & 0xff;
 
@@ -737,11 +717,12 @@
 	int ret, i;
 	char buf7[SIZE_7];
 
-	dbg("speedtch_usb_probe: trying device with vendor=0x%x, product=0x%x, ifnum %d", dev->descriptor.idVendor, dev->descriptor.idProduct, ifnum);
+	dbg("speedtch_usb_probe: trying device with vendor=0x%x, product=0x%x, ifnum %d",
+	    le16_to_cpu(dev->descriptor.idVendor),
+	    le16_to_cpu(dev->descriptor.idProduct), ifnum);
 
-	if ((dev->descriptor.bDeviceClass != USB_CLASS_VENDOR_SPEC) ||
-	    (dev->descriptor.idVendor != SPEEDTOUCH_VENDORID) ||
-	    (dev->descriptor.idProduct != SPEEDTOUCH_PRODUCTID) || (ifnum != 1))
+	if ((dev->descriptor.bDeviceClass != USB_CLASS_VENDOR_SPEC) || 
+	    (ifnum != 1))
 		return -ENODEV;
 
 	dbg("speedtch_usb_probe: device accepted");
diff -Nru a/drivers/usb/atm/usb_atm.c b/drivers/usb/atm/usb_atm.c
--- a/drivers/usb/atm/usb_atm.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/usb/atm/usb_atm.c	2005-01-10 20:11:23 -08:00
@@ -83,23 +83,6 @@
 
 #include "usb_atm.h"
 
-/*
-#define DEBUG
-#define VERBOSE_DEBUG
-*/
-
-#if !defined (DEBUG) && defined (CONFIG_USB_DEBUG)
-#	define DEBUG
-#endif
-
-#include <linux/usb.h>
-
-#ifdef DEBUG
-#define UDSL_ASSERT(x)	BUG_ON(!(x))
-#else
-#define UDSL_ASSERT(x)	do { if (!(x)) warn("failed assertion '" #x "' at line %d", __LINE__); } while(0)
-#endif
-
 #ifdef VERBOSE_DEBUG
 static int udsl_print_packet(const unsigned char *data, int len);
 #define PACKETDEBUG(arg...)	udsl_print_packet (arg)
diff -Nru a/drivers/usb/atm/usb_atm.h b/drivers/usb/atm/usb_atm.h
--- a/drivers/usb/atm/usb_atm.h	2005-01-10 20:11:21 -08:00
+++ b/drivers/usb/atm/usb_atm.h	2005-01-10 20:11:21 -08:00
@@ -21,12 +21,29 @@
  *
  ******************************************************************************/
 
+#include <linux/config.h>
 #include <linux/list.h>
-#include <linux/usb.h>
 #include <linux/kref.h>
 #include <linux/atm.h>
 #include <linux/atmdev.h>
 #include <asm/semaphore.h>
+
+/*
+#define DEBUG
+#define VERBOSE_DEBUG
+*/
+
+#if !defined (DEBUG) && defined (CONFIG_USB_DEBUG)
+#	define DEBUG
+#endif
+
+#include <linux/usb.h>
+
+#ifdef DEBUG
+#define UDSL_ASSERT(x)	BUG_ON(!(x))
+#else
+#define UDSL_ASSERT(x)	do { if (!(x)) warn("failed assertion '" #x "' at line %d", __LINE__); } while(0)
+#endif
 
 #define UDSL_MAX_RCV_URBS		4
 #define UDSL_MAX_SND_URBS		4
diff -Nru a/drivers/usb/class/audio.c b/drivers/usb/class/audio.c
--- a/drivers/usb/class/audio.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/usb/class/audio.c	2005-01-10 20:11:23 -08:00
@@ -2971,7 +2971,8 @@
 			}
 			format = (fmt[5] == 2) ? (AFMT_U16_LE | AFMT_U8) : (AFMT_S16_LE | AFMT_S8);
 			/* Dallas DS4201 workaround */
-			if (dev->descriptor.idVendor == 0x04fa && dev->descriptor.idProduct == 0x4201)
+			if (le16_to_cpu(dev->descriptor.idVendor) == 0x04fa && 
+			    le16_to_cpu(dev->descriptor.idProduct) == 0x4201)
 				format = (AFMT_S16_LE | AFMT_S8);
 			fmt = find_csinterface_descriptor(buffer, buflen, NULL, FORMAT_TYPE, asifout, i);
 			if (!fmt) {
@@ -3716,7 +3717,7 @@
 		if (alt->desc.bNumEndpoints > 0) {
 			/* Check all endpoints; should they all have a bandwidth of 0 ? */
 			for (k = 0; k < alt->desc.bNumEndpoints; k++) {
-				if (alt->endpoint[k].desc.wMaxPacketSize > 0) {
+				if (le16_to_cpu(alt->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;
 				}
@@ -3800,7 +3801,7 @@
 	 * find which configuration number is active
 	 */
 	buffer = dev->rawdescriptors[dev->actconfig - dev->config];
-	buflen = dev->actconfig->desc.wTotalLength;
+	buflen = le16_to_cpu(dev->actconfig->desc.wTotalLength);
 	s = usb_audio_parsecontrol(dev, buffer, buflen, intf->altsetting->desc.bInterfaceNumber);
 	if (s) {
 		usb_set_intfdata (intf, s);
diff -Nru a/drivers/usb/class/bluetty.c b/drivers/usb/class/bluetty.c
--- a/drivers/usb/class/bluetty.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/usb/class/bluetty.c	2005-01-10 20:11:21 -08:00
@@ -1086,7 +1086,7 @@
 		err("No free urbs available");
 		goto probe_error;
 	}
-	bluetooth->bulk_in_buffer_size = buffer_size = endpoint->wMaxPacketSize;
+	bluetooth->bulk_in_buffer_size = buffer_size = le16_to_cpu(endpoint->wMaxPacketSize);
 	bluetooth->bulk_in_endpointAddress = endpoint->bEndpointAddress;
 	bluetooth->bulk_in_buffer = kmalloc (buffer_size, GFP_KERNEL);
 	if (!bluetooth->bulk_in_buffer) {
@@ -1098,7 +1098,7 @@
 
 	endpoint = bulk_out_endpoint[0];
 	bluetooth->bulk_out_endpointAddress = endpoint->bEndpointAddress;
-	bluetooth->bulk_out_buffer_size = endpoint->wMaxPacketSize * 2;
+	bluetooth->bulk_out_buffer_size = le16_to_cpu(endpoint->wMaxPacketSize) * 2;
 
 	endpoint = interrupt_in_endpoint[0];
 	bluetooth->interrupt_in_urb = usb_alloc_urb(0, GFP_KERNEL);
@@ -1106,7 +1106,7 @@
 		err("No free urbs available");
 		goto probe_error;
 	}
-	bluetooth->interrupt_in_buffer_size = buffer_size = endpoint->wMaxPacketSize;
+	bluetooth->interrupt_in_buffer_size = buffer_size = le16_to_cpu(endpoint->wMaxPacketSize);
 	bluetooth->interrupt_in_endpointAddress = endpoint->bEndpointAddress;
 	bluetooth->interrupt_in_interval = endpoint->bInterval;
 	bluetooth->interrupt_in_buffer = kmalloc (buffer_size, GFP_KERNEL);
diff -Nru a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
--- a/drivers/usb/class/cdc-acm.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/usb/class/cdc-acm.c	2005-01-10 20:11:20 -08:00
@@ -532,7 +532,17 @@
 	u8 call_management_function = 0;
 	int call_interface_num = -1;
 	int data_interface_num;
+	unsigned long quirks;
 
+	/* handle quirks deadly to normal probing*/
+	quirks = (unsigned long)id->driver_info;
+	if (quirks == NO_UNION_NORMAL) {
+		data_interface = usb_ifnum_to_if(usb_dev, 1);
+		control_interface = usb_ifnum_to_if(usb_dev, 0);
+		goto skip_normal_probe;
+	}
+	
+	/* normal probing*/
 	if (!buffer) {
 		err("Wierd descriptor references");
 		return -EINVAL;
@@ -607,6 +617,7 @@
 		if (data_interface_num != call_interface_num)
 			dev_dbg(&intf->dev,"Seperate call control interface. That is not fully supported.");
 
+skip_normal_probe:
 	if (usb_interface_claimed(data_interface)) { /* valid in this context */
 		dev_dbg(&intf->dev,"The data interface isn't available\n");
 		return -EBUSY;
@@ -657,9 +668,9 @@
 	}
 	memset(acm, 0, sizeof(struct acm));
 
-	ctrlsize = epctrl->wMaxPacketSize;
-	readsize = epread->wMaxPacketSize;
-	acm->writesize = epwrite->wMaxPacketSize;
+	ctrlsize = le16_to_cpu(epctrl->wMaxPacketSize);
+	readsize = le16_to_cpu(epread->wMaxPacketSize);
+	acm->writesize = le16_to_cpu(epwrite->wMaxPacketSize);
 	acm->control = control_interface;
 	acm->data = data_interface;
 	acm->minor = minor;
@@ -805,6 +816,10 @@
  */
 
 static struct usb_device_id acm_ids[] = {
+	/* quirky and broken devices */
+	{ USB_DEVICE(0x0870, 0x0001), /* Metricom GS Modem */
+	.driver_info = NO_UNION_NORMAL, /* has no union descriptor */
+	},
 	/* control interfaces with various AT-command sets */
 	{ USB_INTERFACE_INFO(USB_CLASS_COMM, 2, 1) },
 	{ USB_INTERFACE_INFO(USB_CLASS_COMM, 2, 2) },
diff -Nru a/drivers/usb/class/cdc-acm.h b/drivers/usb/class/cdc-acm.h
--- a/drivers/usb/class/cdc-acm.h	2005-01-10 20:11:23 -08:00
+++ b/drivers/usb/class/cdc-acm.h	2005-01-10 20:11:23 -08:00
@@ -125,4 +125,5 @@
 
 #define CDC_DATA_INTERFACE_TYPE	0x0a
 
-
+/* constants describing various quirks and errors */
+#define NO_UNION_NORMAL			1
diff -Nru a/drivers/usb/class/usb-midi.c b/drivers/usb/class/usb-midi.c
--- a/drivers/usb/class/usb-midi.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/usb/class/usb-midi.c	2005-01-10 20:11:15 -08:00
@@ -1306,8 +1306,8 @@
 		return NULL;
 	}
 	u->deviceName = NULL;
-	u->idVendor = d->descriptor.idVendor;
-	u->idProduct = d->descriptor.idProduct;
+	u->idVendor = le16_to_cpu(d->descriptor.idVendor);
+	u->idProduct = le16_to_cpu(d->descriptor.idProduct);
 	u->interface = ifnum;
 	u->altSetting = altSetting;
 	u->in[0].endpoint = -1;
@@ -1661,11 +1661,11 @@
 		} 
 		/* Failsafe */
 		if ( !u->deviceName[0] ) {
-			if ( d->descriptor.idVendor == USB_VENDOR_ID_ROLAND ) {
+			if (le16_to_cpu(d->descriptor.idVendor) == USB_VENDOR_ID_ROLAND ) {
 				strcpy(u->deviceName, "Unknown Roland");
-			} else if ( d->descriptor.idVendor == USB_VENDOR_ID_STEINBERG  ) {
+			} else if (le16_to_cpu(d->descriptor.idVendor) == USB_VENDOR_ID_STEINBERG  ) {
 				strcpy(u->deviceName, "Unknown Steinberg");
-			} else if ( d->descriptor.idVendor == USB_VENDOR_ID_YAMAHA ) {
+			} else if (le16_to_cpu(d->descriptor.idVendor) == USB_VENDOR_ID_YAMAHA ) {
 				strcpy(u->deviceName, "Unknown Yamaha");
 			} else {
 				strcpy(u->deviceName, "Unknown");
@@ -1782,7 +1782,7 @@
 	int alts=-1;
 	int ret;
 
-	if (d->descriptor.idVendor != USB_VENDOR_ID_YAMAHA) {
+	if (le16_to_cpu(d->descriptor.idVendor) != USB_VENDOR_ID_YAMAHA) {
 		return -EINVAL;
 	}
 
@@ -1799,11 +1799,12 @@
 	}
 
 	printk(KERN_INFO "usb-midi: Found YAMAHA USB-MIDI device on dev %04x:%04x, iface %d\n",
-	       d->descriptor.idVendor, d->descriptor.idProduct, ifnum);
+	       le16_to_cpu(d->descriptor.idVendor),
+	       le16_to_cpu(d->descriptor.idProduct), ifnum);
 
 	i = d->actconfig - d->config;
 	buffer = d->rawdescriptors[i];
-	bufSize = d->actconfig->desc.wTotalLength;
+	bufSize = le16_to_cpu(d->actconfig->desc.wTotalLength);
 
 	u = parse_descriptor( d, buffer, bufSize, ifnum, alts, 1);
 	if ( u == NULL ) {
@@ -1833,8 +1834,8 @@
 	for ( i=0; i<VENDOR_SPECIFIC_USB_MIDI_DEVICES ; i++ ) {
 		u=&(usb_midi_devices[i]);
     
-		if ( d->descriptor.idVendor != u->idVendor ||
-		     d->descriptor.idProduct != u->idProduct ||
+		if ( le16_to_cpu(d->descriptor.idVendor) != u->idVendor ||
+		     le16_to_cpu(d->descriptor.idProduct) != u->idProduct ||
 		     ifnum != u->interface )
 			continue;
 
@@ -1875,7 +1876,8 @@
 	}
 
 	printk(KERN_INFO "usb-midi: Found MIDISTREAMING on dev %04x:%04x, iface %d\n",
-	       d->descriptor.idVendor, d->descriptor.idProduct, ifnum);
+	       le16_to_cpu(d->descriptor.idVendor), 
+	       le16_to_cpu(d->descriptor.idProduct), ifnum);
 
 
 	/* From USB Spec v2.0, Section 9.5.
@@ -1890,7 +1892,7 @@
 
 	i = d->actconfig - d->config;
 	buffer = d->rawdescriptors[i];
-	bufSize = d->actconfig->desc.wTotalLength;
+	bufSize = le16_to_cpu(d->actconfig->desc.wTotalLength);
 
 	u = parse_descriptor( d, buffer, bufSize, ifnum, alts, 0);
 	if ( u == NULL ) {
@@ -1915,8 +1917,8 @@
 {
 	struct usb_midi_device u;
 
-	if ( d->descriptor.idVendor != uvendor ||
-	     d->descriptor.idProduct != uproduct ||
+	if ( le16_to_cpu(d->descriptor.idVendor) != uvendor ||
+	     le16_to_cpu(d->descriptor.idProduct) != uproduct ||
 	     ifnum != uinterface ) {
 		return -EINVAL;
 	}
diff -Nru a/drivers/usb/class/usb-midi.h b/drivers/usb/class/usb-midi.h
--- a/drivers/usb/class/usb-midi.h	2005-01-10 20:11:20 -08:00
+++ b/drivers/usb/class/usb-midi.h	2005-01-10 20:11:20 -08:00
@@ -63,8 +63,8 @@
 struct usb_midi_device {
 	char  *deviceName;
 
-	int    idVendor;
-	int    idProduct;
+	u16    idVendor;
+	u16    idProduct;
 	int    interface;
 	int    altSetting; /* -1: auto detect */
 
diff -Nru a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c
--- a/drivers/usb/class/usblp.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/usb/class/usblp.c	2005-01-10 20:11:17 -08:00
@@ -527,7 +527,7 @@
 
 			case IOCNR_HP_SET_CHANNEL:
 				if (_IOC_DIR(cmd) != _IOC_WRITE ||
-				    usblp->dev->descriptor.idVendor != 0x03F0 ||
+				    le16_to_cpu(usblp->dev->descriptor.idVendor) != 0x03F0 ||
 				    usblp->quirks & USBLP_QUIRK_BIDIR) {
 					retval = -EINVAL;
 					goto done;
@@ -574,8 +574,8 @@
 					goto done;
 				}
 
-				twoints[0] = usblp->dev->descriptor.idVendor;
-				twoints[1] = usblp->dev->descriptor.idProduct;
+				twoints[0] = le16_to_cpu(usblp->dev->descriptor.idVendor);
+				twoints[1] = le16_to_cpu(usblp->dev->descriptor.idProduct);
 				if (copy_to_user((void __user *)arg,
 						(unsigned char *)twoints,
 						sizeof(twoints))) {
@@ -910,15 +910,15 @@
 
 	/* Lookup quirks for this printer. */
 	usblp->quirks = usblp_quirks(
-		dev->descriptor.idVendor,
-		dev->descriptor.idProduct);
+		le16_to_cpu(dev->descriptor.idVendor),
+		le16_to_cpu(dev->descriptor.idProduct));
 
 	/* Analyze and pick initial alternate settings and endpoints. */
 	protocol = usblp_select_alts(usblp);
 	if (protocol < 0) {
 		dbg("incompatible printer-class device 0x%4.4X/0x%4.4X",
-			dev->descriptor.idVendor,
-			dev->descriptor.idProduct);
+			le16_to_cpu(dev->descriptor.idVendor),
+			le16_to_cpu(dev->descriptor.idProduct));
 		goto abort;
 	}
 
@@ -938,8 +938,9 @@
 		usblp->minor, usblp->bidir ? "Bi" : "Uni", dev->devnum,
 		usblp->ifnum,
 		usblp->protocol[usblp->current_protocol].alt_setting,
-		usblp->current_protocol, usblp->dev->descriptor.idVendor,
-		usblp->dev->descriptor.idProduct);
+		usblp->current_protocol,
+		le16_to_cpu(usblp->dev->descriptor.idVendor),
+		le16_to_cpu(usblp->dev->descriptor.idProduct));
 
 	usb_set_intfdata (intf, usblp);
 
diff -Nru a/drivers/usb/core/config.c b/drivers/usb/core/config.c
--- a/drivers/usb/core/config.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/usb/core/config.c	2005-01-10 20:11:15 -08:00
@@ -87,7 +87,7 @@
 	++ifp->desc.bNumEndpoints;
 
 	memcpy(&endpoint->desc, d, n);
-	le16_to_cpus(&endpoint->desc.wMaxPacketSize);
+	INIT_LIST_HEAD(&endpoint->urb_list);
 
 	/* Skip over any Class Specific or Vendor Specific descriptors;
 	 * find the next endpoint or interface descriptor */
@@ -319,7 +319,7 @@
 
 	}	/* for ((buffer2 = buffer, size2 = size); ...) */
 	size = buffer2 - buffer;
-	config->desc.wTotalLength = buffer2 - buffer0;
+	config->desc.wTotalLength = cpu_to_le16(buffer2 - buffer0);
 
 	if (n != nintf)
 		dev_warn(ddev, "config %d has %d interface%s, different from "
diff -Nru a/drivers/usb/core/devices.c b/drivers/usb/core/devices.c
--- a/drivers/usb/core/devices.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/usb/core/devices.c	2005-01-10 20:11:23 -08:00
@@ -180,7 +180,7 @@
 	in = (desc->bEndpointAddress & USB_DIR_IN);
 	dir = in ? 'I' : 'O';
 	if (speed == USB_SPEED_HIGH) {
-		switch (desc->wMaxPacketSize & (0x03 << 11)) {
+		switch (le16_to_cpu(desc->wMaxPacketSize) & (0x03 << 11)) {
 		case 1 << 11:	bandwidth = 2; break;
 		case 2 << 11:	bandwidth = 3; break;
 		}
@@ -227,7 +227,7 @@
 
 	start += sprintf(start, format_endpt, desc->bEndpointAddress, dir,
 			 desc->bmAttributes, type,
-			 (desc->wMaxPacketSize & 0x07ff) * bandwidth,
+			 (le16_to_cpu(desc->wMaxPacketSize) & 0x07ff) * bandwidth,
 			 interval, unit);
 	return start;
 }
@@ -335,10 +335,13 @@
  */
 static char *usb_dump_device_descriptor(char *start, char *end, const struct usb_device_descriptor *desc)
 {
+	u16 bcdUSB = le16_to_cpu(desc->bcdUSB);
+	u16 bcdDevice = le16_to_cpu(desc->bcdDevice);
+
 	if (start > end)
 		return start;
 	start += sprintf (start, format_device1,
-			  desc->bcdUSB >> 8, desc->bcdUSB & 0xff,
+			  bcdUSB >> 8, bcdUSB & 0xff,
 			  desc->bDeviceClass,
 			  class_decode (desc->bDeviceClass),
 			  desc->bDeviceSubClass,
@@ -348,8 +351,9 @@
 	if (start > end)
 		return start;
 	start += sprintf(start, format_device2,
-			 desc->idVendor, desc->idProduct,
-			 desc->bcdDevice >> 8, desc->bcdDevice & 0xff);
+			 le16_to_cpu(desc->idVendor),
+			 le16_to_cpu(desc->idProduct),
+			 bcdDevice >> 8, bcdDevice & 0xff);
 	return start;
 }
 
diff -Nru a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
--- a/drivers/usb/core/devio.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/usb/core/devio.c	2005-01-10 20:11:19 -08:00
@@ -148,7 +148,7 @@
 			/* The descriptor may claim to be longer than it
 			 * really is.  Here is the actual allocated length. */
 			unsigned alloclen =
-				dev->config[i].desc.wTotalLength;
+				le16_to_cpu(dev->config[i].desc.wTotalLength);
 
 			len = length - (*ppos - pos);
 			if (len > nbytes)
@@ -807,7 +807,7 @@
 {
 	struct usbdevfs_urb uurb;
 	struct usbdevfs_iso_packet_desc *isopkt = NULL;
-	struct usb_endpoint_descriptor *ep_desc;
+	struct usb_host_endpoint *ep;
 	struct async *as;
 	struct usb_ctrlrequest *dr = NULL;
 	unsigned int u, totlen, isofrmlen;
@@ -828,14 +828,17 @@
 		if ((ret = checkintf(ps, ifnum)))
 			return ret;
 	}
+	if ((uurb.endpoint & ~USB_ENDPOINT_DIR_MASK) != 0)
+		ep = ps->dev->ep_in [uurb.endpoint & USB_ENDPOINT_NUMBER_MASK];
+	else
+		ep = ps->dev->ep_out [uurb.endpoint & USB_ENDPOINT_NUMBER_MASK];
+	if (!ep)
+		return -ENOENT;
 	switch(uurb.type) {
 	case USBDEVFS_URB_TYPE_CONTROL:
-		if ((uurb.endpoint & ~USB_ENDPOINT_DIR_MASK) != 0) {
-			if (!(ep_desc = usb_epnum_to_ep_desc(ps->dev, uurb.endpoint)))
-				return -ENOENT;
-			if ((ep_desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) != USB_ENDPOINT_XFER_CONTROL)
-				return -EINVAL;
-		}
+		if ((ep->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
+				!= USB_ENDPOINT_XFER_CONTROL)
+			return -EINVAL;
 		/* min 8 byte setup packet, max arbitrary */
 		if (uurb.buffer_length < 8 || uurb.buffer_length > PAGE_SIZE)
 			return -EINVAL;
@@ -864,6 +867,12 @@
 		break;
 
 	case USBDEVFS_URB_TYPE_BULK:
+		switch (ep->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) {
+		case USB_ENDPOINT_XFER_CONTROL:
+		case USB_ENDPOINT_XFER_ISOC:
+			return -EINVAL;
+		/* allow single-shot interrupt transfers, at bogus rates */
+		}
 		uurb.number_of_packets = 0;
 		if (uurb.buffer_length > MAX_USBFS_BUFFER_SIZE)
 			return -EINVAL;
@@ -875,9 +884,10 @@
 		/* arbitrary limit */
 		if (uurb.number_of_packets < 1 || uurb.number_of_packets > 128)
 			return -EINVAL;
-		if (!(ep_desc = usb_epnum_to_ep_desc(ps->dev, uurb.endpoint)))
-			return -ENOENT;
-		interval = 1 << min (15, ep_desc->bInterval - 1);
+		if ((ep->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
+				!= USB_ENDPOINT_XFER_ISOC)
+			return -EINVAL;
+		interval = 1 << min (15, ep->desc.bInterval - 1);
 		isofrmlen = sizeof(struct usbdevfs_iso_packet_desc) * uurb.number_of_packets;
 		if (!(isopkt = kmalloc(isofrmlen, GFP_KERNEL)))
 			return -ENOMEM;
@@ -901,12 +911,13 @@
 
 	case USBDEVFS_URB_TYPE_INTERRUPT:
 		uurb.number_of_packets = 0;
-		if (!(ep_desc = usb_epnum_to_ep_desc(ps->dev, uurb.endpoint)))
-			return -ENOENT;
+		if ((ep->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
+				!= USB_ENDPOINT_XFER_INT)
+			return -EINVAL;
 		if (ps->dev->speed == USB_SPEED_HIGH)
-			interval = 1 << min (15, ep_desc->bInterval - 1);
+			interval = 1 << min (15, ep->desc.bInterval - 1);
 		else
-			interval = ep_desc->bInterval;
+			interval = ep->desc.bInterval;
 		if (uurb.buffer_length > MAX_USBFS_BUFFER_SIZE)
 			return -EINVAL;
 		if (!access_ok((uurb.endpoint & USB_DIR_IN) ? VERIFY_WRITE : VERIFY_READ, uurb.buffer, uurb.buffer_length))
@@ -1110,6 +1121,7 @@
 	int			retval = 0;
 	struct usb_interface    *intf = NULL;
 	struct usb_driver       *driver = NULL;
+	int			i;
 
 	/* get input parameters and alloc buffer */
 	if (copy_from_user(&ctrl, arg, sizeof (ctrl)))
@@ -1141,6 +1153,16 @@
 
 	/* disconnect kernel driver from interface */
 	case USBDEVFS_DISCONNECT:
+
+		/* don't allow the user to unbind the hub driver from
+		 * a hub with children to manage */
+		for (i = 0; i < ps->dev->maxchild; ++i) {
+			if (ps->dev->children[i])
+				retval = -EBUSY;
+		}
+		if (retval)
+			break;
+
 		down_write(&usb_bus_type.subsys.rwsem);
 		if (intf->dev.driver) {
 			driver = to_usb_driver(intf->dev.driver);
diff -Nru a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c
--- a/drivers/usb/core/hcd-pci.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/usb/core/hcd-pci.c	2005-01-10 20:11:19 -08:00
@@ -124,7 +124,7 @@
 	// driver->reset(), later on, will transfer device from
 	// control by SMM/BIOS to control by Linux (if needed)
 
-	hcd = driver->hcd_alloc ();
+	hcd = usb_create_hcd (driver);
 	if (hcd == NULL){
 		dev_dbg (&dev->dev, "hcd alloc fail\n");
 		retval = -ENOMEM;
@@ -144,20 +144,16 @@
 	hcd->region = region;
 
 	pci_set_drvdata (dev, hcd);
-	hcd->driver = driver;
-	hcd->description = driver->description;
 	hcd->self.bus_name = pci_name(dev);
 #ifdef CONFIG_PCI_NAMES
 	hcd->product_desc = dev->pretty_name;
-#else
-	if (hcd->product_desc == NULL)
-		hcd->product_desc = "USB Host Controller";
 #endif
 	hcd->self.controller = &dev->dev;
 
 	if ((retval = hcd_buffer_create (hcd)) != 0) {
 clean_3:
-		kfree (hcd);
+		pci_set_drvdata (dev, NULL);
+		usb_put_hcd (hcd);
 		goto clean_2;
 	}
 
@@ -168,7 +164,6 @@
 		dev_err (hcd->self.controller, "can't reset\n");
 		goto clean_3;
 	}
-	hcd->state = USB_STATE_HALT;
 
 	pci_set_master (dev);
 #ifndef __sparc__
@@ -177,7 +172,7 @@
 	bufp = __irq_itoa(dev->irq);
 #endif
 	retval = request_irq (dev->irq, usb_hcd_irq, SA_SHIRQ,
-				hcd->description, hcd);
+				hcd->driver->description, hcd);
 	if (retval != 0) {
 		dev_err (hcd->self.controller,
 				"request interrupt %s failed\n", bufp);
@@ -189,14 +184,6 @@
 		(driver->flags & HCD_MEMORY) ? "pci mem" : "io base",
 		resource);
 
-	usb_bus_init (&hcd->self);
-	hcd->self.op = &usb_hcd_operations;
-	hcd->self.release = &usb_hcd_release;
-	hcd->self.hcpriv = (void *) hcd;
-	init_timer (&hcd->rh_timer);
-
-	INIT_LIST_HEAD (&hcd->dev_list);
-
 	usb_register_bus (&hcd->self);
 
 	if ((retval = driver->start (hcd)) < 0) {
@@ -411,7 +398,7 @@
 		pci_set_power_state (dev, 0);
 	dev->dev.power.power_state = 0;
 	retval = request_irq (dev->irq, usb_hcd_irq, SA_SHIRQ,
-				hcd->description, hcd);
+				hcd->driver->description, hcd);
 	if (retval < 0) {
 		dev_err (hcd->self.controller,
 			"can't restore IRQ after resume!\n");
diff -Nru a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
--- a/drivers/usb/core/hcd.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/usb/core/hcd.c	2005-01-10 20:11:19 -08:00
@@ -120,16 +120,16 @@
 static const u8 usb2_rh_dev_descriptor [18] = {
 	0x12,       /*  __u8  bLength; */
 	0x01,       /*  __u8  bDescriptorType; Device */
-	0x00, 0x02, /*  __u16 bcdUSB; v2.0 */
+	0x00, 0x02, /*  __le16 bcdUSB; v2.0 */
 
 	0x09,	    /*  __u8  bDeviceClass; HUB_CLASSCODE */
 	0x00,	    /*  __u8  bDeviceSubClass; */
 	0x01,       /*  __u8  bDeviceProtocol; [ usb 2.0 single TT ]*/
 	0x08,       /*  __u8  bMaxPacketSize0; 8 Bytes */
 
-	0x00, 0x00, /*  __u16 idVendor; */
- 	0x00, 0x00, /*  __u16 idProduct; */
-	KERNEL_VER, KERNEL_REL, /*  __u16 bcdDevice */
+	0x00, 0x00, /*  __le16 idVendor; */
+ 	0x00, 0x00, /*  __le16 idProduct; */
+	KERNEL_VER, KERNEL_REL, /*  __le16 bcdDevice */
 
 	0x03,       /*  __u8  iManufacturer; */
 	0x02,       /*  __u8  iProduct; */
@@ -143,16 +143,16 @@
 static const u8 usb11_rh_dev_descriptor [18] = {
 	0x12,       /*  __u8  bLength; */
 	0x01,       /*  __u8  bDescriptorType; Device */
-	0x10, 0x01, /*  __u16 bcdUSB; v1.1 */
+	0x10, 0x01, /*  __le16 bcdUSB; v1.1 */
 
 	0x09,	    /*  __u8  bDeviceClass; HUB_CLASSCODE */
 	0x00,	    /*  __u8  bDeviceSubClass; */
 	0x00,       /*  __u8  bDeviceProtocol; [ low/full speeds only ] */
 	0x08,       /*  __u8  bMaxPacketSize0; 8 Bytes */
 
-	0x00, 0x00, /*  __u16 idVendor; */
- 	0x00, 0x00, /*  __u16 idProduct; */
-	KERNEL_VER, KERNEL_REL, /*  __u16 bcdDevice */
+	0x00, 0x00, /*  __le16 idVendor; */
+ 	0x00, 0x00, /*  __le16 idProduct; */
+	KERNEL_VER, KERNEL_REL, /*  __le16 bcdDevice */
 
 	0x03,       /*  __u8  iManufacturer; */
 	0x02,       /*  __u8  iProduct; */
@@ -170,7 +170,7 @@
 	/* one configuration */
 	0x09,       /*  __u8  bLength; */
 	0x02,       /*  __u8  bDescriptorType; Configuration */
-	0x19, 0x00, /*  __u16 wTotalLength; */
+	0x19, 0x00, /*  __le16 wTotalLength; */
 	0x01,       /*  __u8  bNumInterfaces; (1) */
 	0x01,       /*  __u8  bConfigurationValue; */
 	0x00,       /*  __u8  iConfiguration; */
@@ -208,7 +208,7 @@
 	0x05,       /*  __u8  ep_bDescriptorType; Endpoint */
 	0x81,       /*  __u8  ep_bEndpointAddress; IN Endpoint 1 */
  	0x03,       /*  __u8  ep_bmAttributes; Interrupt */
- 	0x02, 0x00, /*  __u16 ep_wMaxPacketSize; 1 + (MAX_ROOT_PORTS / 8) */
+ 	0x02, 0x00, /*  __le16 ep_wMaxPacketSize; 1 + (MAX_ROOT_PORTS / 8) */
 	0xff        /*  __u8  ep_bInterval; (255ms -- usb 2.0 spec) */
 };
 
@@ -217,7 +217,7 @@
 	/* one configuration */
 	0x09,       /*  __u8  bLength; */
 	0x02,       /*  __u8  bDescriptorType; Configuration */
-	0x19, 0x00, /*  __u16 wTotalLength; */
+	0x19, 0x00, /*  __le16 wTotalLength; */
 	0x01,       /*  __u8  bNumInterfaces; (1) */
 	0x01,       /*  __u8  bConfigurationValue; */
 	0x00,       /*  __u8  iConfiguration; */
@@ -255,7 +255,7 @@
 	0x05,       /*  __u8  ep_bDescriptorType; Endpoint */
 	0x81,       /*  __u8  ep_bEndpointAddress; IN Endpoint 1 */
  	0x03,       /*  __u8  ep_bmAttributes; Interrupt */
- 	0x02, 0x00, /*  __u16 ep_wMaxPacketSize; 1 + (MAX_ROOT_PORTS / 8) */
+ 	0x02, 0x00, /*  __le16 ep_wMaxPacketSize; 1 + (MAX_ROOT_PORTS / 8) */
 	0x0c        /*  __u8  ep_bInterval; (256ms -- usb 2.0 spec) */
 };
 
@@ -312,7 +312,7 @@
  	// id 3 == vendor description
 	} else if (id == 3) {
                 sprintf (buf, "%s %s %s", UTS_SYSNAME, UTS_RELEASE,
-			hcd->description);
+			hcd->driver->description);
 
 	// unsupported IDs --> "protocol stall"
 	} else
@@ -676,6 +676,8 @@
 	bus->bandwidth_isoc_reqs = 0;
 
 	INIT_LIST_HEAD (&bus->bus_list);
+
+	class_device_initialize(&bus->class_dev);
 }
 EXPORT_SYMBOL (usb_bus_init);
 
@@ -734,7 +736,7 @@
 	snprintf(bus->class_dev.class_id, BUS_ID_SIZE, "usb%d", busnum);
 	bus->class_dev.class = &usb_host_class;
 	bus->class_dev.dev = bus->controller;
-	retval = class_device_register(&bus->class_dev);
+	retval = class_device_add(&bus->class_dev);
 	if (retval) {
 		clear_bit(busnum, busmap.busmap);
 		up(&usb_bus_list_lock);
@@ -807,7 +809,7 @@
 	down (&usb_bus_list_lock);
 	usb_dev->bus->root_hub = usb_dev;
 
-	usb_dev->epmaxpacketin[0] = usb_dev->epmaxpacketout[0] = 64;
+	usb_dev->ep0.desc.wMaxPacketSize = __constant_cpu_to_le16(64);
 	retval = usb_get_device_descriptor(usb_dev, USB_DT_DEVICE_SIZE);
 	if (retval != sizeof usb_dev->descriptor) {
 		usb_dev->bus->root_hub = NULL;
@@ -1018,40 +1020,6 @@
 
 /*-------------------------------------------------------------------------*/
 
-/* called from khubd, or root hub init threads for hcd-private init */
-static int hcd_alloc_dev (struct usb_device *udev)
-{
-	struct hcd_dev		*dev;
-	struct usb_hcd		*hcd;
-	unsigned long		flags;
-
-	if (!udev || udev->hcpriv)
-		return -EINVAL;
-	if (!udev->bus || !udev->bus->hcpriv)
-		return -ENODEV;
-	hcd = udev->bus->hcpriv;
-	if (hcd->state == USB_STATE_QUIESCING)
-		return -ENOLINK;
-
-	dev = (struct hcd_dev *) kmalloc (sizeof *dev, GFP_KERNEL);
-	if (dev == NULL)
-		return -ENOMEM;
-	memset (dev, 0, sizeof *dev);
-
-	INIT_LIST_HEAD (&dev->dev_list);
-	INIT_LIST_HEAD (&dev->urb_list);
-
-	spin_lock_irqsave (&hcd_data_lock, flags);
-	list_add (&dev->dev_list, &hcd->dev_list);
-	// refcount is implicit
-	udev->hcpriv = dev;
-	spin_unlock_irqrestore (&hcd_data_lock, flags);
-
-	return 0;
-}
-
-/*-------------------------------------------------------------------------*/
-
 static void urb_unlink (struct urb *urb)
 {
 	unsigned long		flags;
@@ -1079,10 +1047,12 @@
 {
 	int			status;
 	struct usb_hcd		*hcd = urb->dev->bus->hcpriv;
-	struct hcd_dev		*dev = urb->dev->hcpriv;
+	struct usb_host_endpoint *ep;
 	unsigned long		flags;
 
-	if (!hcd || !dev)
+	ep = (usb_pipein(urb->pipe) ? urb->dev->ep_in : urb->dev->ep_out)
+			[usb_pipeendpoint(urb->pipe)];
+	if (!hcd || !ep)
 		return -ENODEV;
 
 	/*
@@ -1109,7 +1079,7 @@
 	case USB_STATE_RUNNING:
 	case USB_STATE_RESUMING:
 		usb_get_dev (urb->dev);
-		list_add_tail (&urb->urb_list, &dev->urb_list);
+		list_add_tail (&urb->urb_list, &ep->urb_list);
 		status = 0;
 		break;
 	default:
@@ -1163,7 +1133,7 @@
 					    : DMA_TO_DEVICE);
 	}
 
-	status = hcd->driver->urb_enqueue (hcd, urb, mem_flags);
+	status = hcd->driver->urb_enqueue (hcd, ep, urb, mem_flags);
 done:
 	if (unlikely (status)) {
 		urb_unlink (urb);
@@ -1222,7 +1192,7 @@
  */
 static int hcd_unlink_urb (struct urb *urb, int status)
 {
-	struct hcd_dev			*dev;
+	struct usb_host_endpoint	*ep;
 	struct usb_hcd			*hcd = NULL;
 	struct device			*sys = NULL;
 	unsigned long			flags;
@@ -1231,6 +1201,12 @@
 
 	if (!urb)
 		return -EINVAL;
+	if (!urb->dev || !urb->dev->bus)
+		return -ENODEV;
+	ep = (usb_pipein(urb->pipe) ? urb->dev->ep_in : urb->dev->ep_out)
+			[usb_pipeendpoint(urb->pipe)];
+	if (!ep)
+		return -ENODEV;
 
 	/*
 	 * we contend for urb->status with the hcd core,
@@ -1246,15 +1222,9 @@
 	spin_lock_irqsave (&urb->lock, flags);
 	spin_lock (&hcd_data_lock);
 
-	if (!urb->dev || !urb->dev->bus) {
-		retval = -ENODEV;
-		goto done;
-	}
-
-	dev = urb->dev->hcpriv;
 	sys = &urb->dev->dev;
 	hcd = urb->dev->bus->hcpriv;
-	if (!dev || !hcd) {
+	if (hcd == NULL) {
 		retval = -ENODEV;
 		goto done;
 	}
@@ -1266,7 +1236,7 @@
 	WARN_ON (!HCD_IS_RUNNING (hcd->state) && hcd->state != USB_STATE_HALT);
 
 	/* insist the urb is still queued */
-	list_for_each(tmp, &dev->urb_list) {
+	list_for_each(tmp, &ep->urb_list) {
 		if (tmp == &urb->urb_list)
 			break;
 	}
@@ -1283,13 +1253,14 @@
 		goto done;
 	}
 
-	/* PCI IRQ setup can easily be broken so that USB controllers
+	/* IRQ setup can easily be broken so that USB controllers
 	 * never get completion IRQs ... maybe even the ones we need to
-	 * finish unlinking the initial failed usb_set_address().
+	 * finish unlinking the initial failed usb_set_address()
+	 * or device descriptor fetch.
 	 */
 	if (!hcd->saw_irq && hcd->self.root_hub != urb->dev) {
 		dev_warn (hcd->self.controller, "Unlink after no-IRQ?  "
-			"Different ACPI or APIC settings may help."
+			"Controller is probably using the wrong IRQ."
 			"\n");
 		hcd->saw_irq = 1;
 	}
@@ -1318,46 +1289,36 @@
  * the hcd to make sure all endpoint state is gone from hardware. use for
  * set_configuration, set_interface, driver removal, physical disconnect.
  *
- * example:  a qh stored in hcd_dev.ep[], holding state related to endpoint
+ * example:  a qh stored in ep->hcpriv, holding state related to endpoint
  * type, maxpacket size, toggle, halt status, and scheduling.
  */
-static void hcd_endpoint_disable (struct usb_device *udev, int endpoint)
+static void
+hcd_endpoint_disable (struct usb_device *udev, struct usb_host_endpoint *ep)
 {
-	struct hcd_dev	*dev;
-	struct usb_hcd	*hcd;
-	struct urb	*urb;
-	unsigned	epnum = endpoint & USB_ENDPOINT_NUMBER_MASK;
+	struct usb_hcd		*hcd;
+	struct urb		*urb;
 
-	dev = udev->hcpriv;
 	hcd = udev->bus->hcpriv;
 
 	WARN_ON (!HCD_IS_RUNNING (hcd->state) && hcd->state != USB_STATE_HALT);
 
 	local_irq_disable ();
 
-rescan:
-	/* (re)block new requests, as best we can */
-	if (endpoint & USB_DIR_IN)
-		udev->epmaxpacketin [epnum] = 0;
-	else
-		udev->epmaxpacketout [epnum] = 0;
+	/* FIXME move most of this into message.c as part of its
+	 * endpoint disable logic
+	 */
 
-	/* then kill any current requests */
+	/* ep is already gone from udev->ep_{in,out}[]; no more submits */
+rescan:
 	spin_lock (&hcd_data_lock);
-	list_for_each_entry (urb, &dev->urb_list, urb_list) {
-		int	tmp = urb->pipe;
-
-		/* ignore urbs for other endpoints */
-		if (usb_pipeendpoint (tmp) != epnum)
-			continue;
-		/* NOTE assumption that only ep0 is a control endpoint */
-		if (epnum != 0 && ((tmp ^ endpoint) & USB_DIR_IN))
-			continue;
+	list_for_each_entry (urb, &ep->urb_list, urb_list) {
+		int	tmp;
 
 		/* another cpu may be in hcd, spinning on hcd_data_lock
 		 * to giveback() this urb.  the races here should be
 		 * small, but a full fix needs a new "can't submit"
 		 * urb state.
+		 * FIXME urb->reject should allow that...
 		 */
 		if (urb->status != -EINPROGRESS)
 			continue;
@@ -1399,7 +1360,7 @@
 	 */
 	might_sleep ();
 	if (hcd->driver->endpoint_disable)
-		hcd->driver->endpoint_disable (hcd, dev, endpoint);
+		hcd->driver->endpoint_disable (hcd, ep);
 }
 
 /*-------------------------------------------------------------------------*/
@@ -1469,57 +1430,13 @@
 
 /*-------------------------------------------------------------------------*/
 
-/* called by khubd, rmmod, apmd, or other thread for hcd-private cleanup.
- * we're guaranteed that the device is fully quiesced.  also, that each
- * endpoint has been hcd_endpoint_disabled.
- */
-
-static int hcd_free_dev (struct usb_device *udev)
-{
-	struct hcd_dev		*dev;
-	struct usb_hcd		*hcd;
-	unsigned long		flags;
-
-	if (!udev || !udev->hcpriv)
-		return -EINVAL;
-
-	if (!udev->bus || !udev->bus->hcpriv)
-		return -ENODEV;
-
-	// should udev->devnum == -1 ??
-
-	dev = udev->hcpriv;
-	hcd = udev->bus->hcpriv;
-
-	/* device driver problem with refcounts? */
-	if (!list_empty (&dev->urb_list)) {
-		dev_dbg (hcd->self.controller, "free busy dev, %s devnum %d (bug!)\n",
-			hcd->self.bus_name, udev->devnum);
-		return -EINVAL;
-	}
-
-	spin_lock_irqsave (&hcd_data_lock, flags);
-	list_del (&dev->dev_list);
-	udev->hcpriv = NULL;
-	spin_unlock_irqrestore (&hcd_data_lock, flags);
-
-	kfree (dev);
-	return 0;
-}
-
 /*
  * usb_hcd_operations - adapts usb_bus framework to HCD framework (bus glue)
- *
- * When registering a USB bus through the HCD framework code, use this
- * usb_operations vector.  The PCI glue layer does so automatically; only
- * bus glue for non-PCI system busses will need to use this.
  */
-struct usb_operations usb_hcd_operations = {
-	.allocate =		hcd_alloc_dev,
+static struct usb_operations usb_hcd_operations = {
 	.get_frame_number =	hcd_get_frame_number,
 	.submit_urb =		hcd_submit_urb,
 	.unlink_urb =		hcd_unlink_urb,
-	.deallocate =		hcd_free_dev,
 	.buffer_alloc =		hcd_buffer_alloc,
 	.buffer_free =		hcd_buffer_free,
 	.disable =		hcd_endpoint_disable,
@@ -1528,7 +1445,6 @@
 	.hub_resume =		hcd_hub_resume,
 #endif
 };
-EXPORT_SYMBOL (usb_hcd_operations);
 
 /*-------------------------------------------------------------------------*/
 
@@ -1630,11 +1546,51 @@
 
 /*-------------------------------------------------------------------------*/
 
-void usb_hcd_release(struct usb_bus *bus)
+static void hcd_release (struct usb_bus *bus)
 {
 	struct usb_hcd *hcd;
 
-	hcd = container_of (bus, struct usb_hcd, self);
+	hcd = container_of(bus, struct usb_hcd, self);
 	kfree(hcd);
 }
-EXPORT_SYMBOL (usb_hcd_release);
+
+/**
+ * usb_create_hcd - create and initialize an HCD structure
+ * @driver: HC driver that will use this hcd
+ * Context: !in_interrupt()
+ *
+ * Allocate a struct usb_hcd, with extra space at the end for the
+ * HC driver's private data.  Initialize the generic members of the
+ * hcd structure.
+ *
+ * If memory is unavailable, returns NULL.
+ */
+struct usb_hcd *usb_create_hcd (const struct hc_driver *driver)
+{
+	struct usb_hcd *hcd;
+
+	hcd = kcalloc(1, sizeof(*hcd) + driver->hcd_priv_size, GFP_KERNEL);
+	if (!hcd)
+		return NULL;
+
+	usb_bus_init(&hcd->self);
+	hcd->self.op = &usb_hcd_operations;
+	hcd->self.hcpriv = hcd;
+	hcd->self.release = &hcd_release;
+
+	init_timer(&hcd->rh_timer);
+
+	hcd->driver = driver;
+	hcd->product_desc = (driver->product_desc) ? driver->product_desc :
+			"USB Host Controller";
+	hcd->state = USB_STATE_HALT;
+
+	return hcd;
+}
+EXPORT_SYMBOL (usb_create_hcd);
+
+void usb_put_hcd (struct usb_hcd *hcd)
+{
+	usb_bus_put(&hcd->self);
+}
+EXPORT_SYMBOL (usb_put_hcd);
diff -Nru a/drivers/usb/core/hcd.h b/drivers/usb/core/hcd.h
--- a/drivers/usb/core/hcd.h	2005-01-10 20:11:18 -08:00
+++ b/drivers/usb/core/hcd.h	2005-01-10 20:11:18 -08:00
@@ -63,15 +63,13 @@
 	struct usb_bus		self;		/* hcd is-a bus */
 
 	const char		*product_desc;	/* product/vendor string */
-	const char		*description;	/* "ehci-hcd" etc */
 
 	struct timer_list	rh_timer;	/* drives root hub */
-	struct list_head	dev_list;	/* devices on this bus */
 
 	/*
 	 * hardware info/state
 	 */
-	struct hc_driver	*driver;	/* hw-specific hooks */
+	const struct hc_driver	*driver;	/* hw-specific hooks */
 	unsigned		saw_irq : 1;
 	unsigned		can_wakeup:1;	/* hw supports wakeup? */
 	unsigned		remote_wakeup:1;/* sw should use wakeup? */
@@ -104,6 +102,12 @@
 	 * input size of periodic table to an interrupt scheduler. 
 	 * (ohci 32, uhci 1024, ehci 256/512/1024).
 	 */
+
+	/* The HC driver's private data is stored at the end of
+	 * this structure.
+	 */
+	unsigned long hcd_priv[0]
+			__attribute__ ((aligned (sizeof(unsigned long))));
 };
 
 /* 2.4 does this a bit differently ... */
@@ -113,14 +117,6 @@
 }
 
 
-struct hcd_dev {	/* usb_device.hcpriv points to this */
-	struct list_head	dev_list;	/* on this hcd */
-	struct list_head	urb_list;	/* pending on this dev */
-
-	/* per-configuration HC/HCD state, such as QH or ED */
-	void			*ep[32];
-};
-
 // urb.hcpriv is really hardware-specific
 
 struct hcd_timeout {	/* timeouts we allocate */
@@ -136,8 +132,6 @@
  */
 
 struct usb_operations {
-	int (*allocate)(struct usb_device *);
-	int (*deallocate)(struct usb_device *);
 	int (*get_frame_number) (struct usb_device *usb_dev);
 	int (*submit_urb) (struct urb *urb, int mem_flags);
 	int (*unlink_urb) (struct urb *urb, int status);
@@ -149,7 +143,8 @@
 	void (*buffer_free)(struct usb_bus *bus, size_t size,
 			void *addr, dma_addr_t dma);
 
-	void (*disable)(struct usb_device *udev, int bEndpointAddress);
+	void (*disable)(struct usb_device *udev,
+			struct usb_host_endpoint *ep);
 
 	/* global suspend/resume of bus */
 	int (*hub_suspend)(struct usb_bus *);
@@ -162,6 +157,8 @@
 
 struct hc_driver {
 	const char	*description;	/* "ehci-hcd" etc */
+	const char	*product_desc;	/* product/vendor string */
+	size_t		hcd_priv_size;	/* size of private data */
 
 	/* irq handler */
 	irqreturn_t	(*irq) (struct usb_hcd *hcd, struct pt_regs *regs);
@@ -190,23 +187,16 @@
 	/* return current frame number */
 	int	(*get_frame_number) (struct usb_hcd *hcd);
 
-	/* memory lifecycle */
-	/* Note: The absence of hcd_free reflects a temporary situation;
-	 * in the near future hcd_alloc will disappear as well and all
-	 * allocations/deallocations will be handled by usbcore.  For the
-	 * moment, drivers are required to return a pointer that the core
-	 * can pass to kfree, i.e., the struct usb_hcd must be the _first_
-	 * member of a larger driver-specific structure. */
-	struct usb_hcd	*(*hcd_alloc) (void);
-
 	/* manage i/o requests, device state */
-	int	(*urb_enqueue) (struct usb_hcd *hcd, struct urb *urb,
+	int	(*urb_enqueue) (struct usb_hcd *hcd,
+					struct usb_host_endpoint *ep,
+					struct urb *urb,
 					int mem_flags);
 	int	(*urb_dequeue) (struct usb_hcd *hcd, struct urb *urb);
 
 	/* hw synch, freeing endpoint resources that urb_dequeue can't */
 	void 	(*endpoint_disable)(struct usb_hcd *hcd,
-			struct hcd_dev *dev, int bEndpointAddress);
+			struct usb_host_endpoint *ep);
 
 	/* root hub support */
 	int		(*hub_status_data) (struct usb_hcd *hcd, char *buf);
@@ -221,6 +211,10 @@
 extern void usb_hcd_giveback_urb (struct usb_hcd *hcd, struct urb *urb, struct pt_regs *regs);
 extern void usb_bus_init (struct usb_bus *bus);
 
+extern struct usb_hcd *usb_create_hcd (const struct hc_driver *driver);
+extern void usb_put_hcd (struct usb_hcd *hcd);
+
+
 #ifdef CONFIG_PCI
 struct pci_dev;
 struct pci_device_id;
@@ -245,7 +239,6 @@
 	void *addr, dma_addr_t dma);
 
 /* generic bus glue, needed for host controllers that don't use PCI */
-extern struct usb_operations usb_hcd_operations;
 extern irqreturn_t usb_hcd_irq (int irq, void *__hcd, struct pt_regs *r);
 extern void usb_hc_died (struct usb_hcd *hcd);
 
@@ -364,8 +357,6 @@
 
 	return usb_register_root_hub (usb_dev, hcd->self.controller);
 }
-
-extern void usb_hcd_release (struct usb_bus *);
 
 extern void usb_set_device_state(struct usb_device *udev,
 		enum usb_device_state new_state);
diff -Nru a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
--- a/drivers/usb/core/hub.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/usb/core/hub.c	2005-01-10 20:11:18 -08:00
@@ -94,10 +94,10 @@
 }
 #endif
 
-/* for dev_info, dev_dbg, etc */
-static inline struct device *hubdev (struct usb_device *hdev)
+/* Note that hdev or one of its children must be locked! */
+static inline struct usb_hub *hdev_to_hub(struct usb_device *hdev)
 {
-	return &hdev->actconfig->interface[0]->dev;
+	return usb_get_intfdata(hdev->actconfig->interface[0]);
 }
 
 /* USB 2.0 spec Section 11.24.4.5 */
@@ -128,19 +128,21 @@
 /*
  * USB 2.0 spec Section 11.24.2.2
  */
-static int clear_port_feature(struct usb_device *hdev, int port, int feature)
+static int clear_port_feature(struct usb_device *hdev, int port1, int feature)
 {
 	return usb_control_msg(hdev, usb_sndctrlpipe(hdev, 0),
-		USB_REQ_CLEAR_FEATURE, USB_RT_PORT, feature, port, NULL, 0, HZ);
+		USB_REQ_CLEAR_FEATURE, USB_RT_PORT, feature, port1,
+		NULL, 0, HZ);
 }
 
 /*
  * USB 2.0 spec Section 11.24.2.13
  */
-static int set_port_feature(struct usb_device *hdev, int port, int feature)
+static int set_port_feature(struct usb_device *hdev, int port1, int feature)
 {
 	return usb_control_msg(hdev, usb_sndctrlpipe(hdev, 0),
-		USB_REQ_SET_FEATURE, USB_RT_PORT, feature, port, NULL, 0, HZ);
+		USB_REQ_SET_FEATURE, USB_RT_PORT, feature, port1,
+		NULL, 0, HZ);
 }
 
 /*
@@ -148,17 +150,17 @@
  * for info about using port indicators
  */
 static void set_port_led(
-	struct usb_device *hdev,
-	int port,
+	struct usb_hub *hub,
+	int port1,
 	int selector
 )
 {
-	int status = set_port_feature(hdev, (selector << 8) | port,
+	int status = set_port_feature(hub->hdev, (selector << 8) | port1,
 			USB_PORT_FEAT_INDICATOR);
 	if (status < 0)
-		dev_dbg (hubdev (hdev),
+		dev_dbg (hub->intfdev,
 			"port %d indicator %s status %d\n",
-			port,
+			port1,
 			({ char *s; switch (selector) {
 			case HUB_LED_AMBER: s = "amber"; break;
 			case HUB_LED_GREEN: s = "green"; break;
@@ -226,13 +228,13 @@
 		}
 		if (selector != HUB_LED_AUTO)
 			changed = 1;
-		set_port_led(hdev, i + 1, selector);
+		set_port_led(hub, i + 1, selector);
 		hub->indicator[i] = mode;
 	}
 	if (!changed && blinkenlights) {
 		cursor++;
 		cursor %= hub->descriptor->bNbrPorts;
-		set_port_led(hdev, cursor + 1, HUB_LED_GREEN);
+		set_port_led(hub, cursor + 1, HUB_LED_GREEN);
 		hub->indicator[cursor] = INDICATOR_CYCLE;
 		changed++;
 	}
@@ -240,26 +242,40 @@
 		schedule_delayed_work(&hub->leds, LED_CYCLE_PERIOD);
 }
 
+/* use a short timeout for hub/port status fetches */
+#define	USB_STS_TIMEOUT		1
+#define	USB_STS_RETRIES		5
+
 /*
  * USB 2.0 spec Section 11.24.2.6
  */
 static int get_hub_status(struct usb_device *hdev,
 		struct usb_hub_status *data)
 {
-	return usb_control_msg(hdev, usb_rcvctrlpipe(hdev, 0),
-		USB_REQ_GET_STATUS, USB_DIR_IN | USB_RT_HUB, 0, 0,
-		data, sizeof(*data), HZ * USB_CTRL_GET_TIMEOUT);
+	int i, status = -ETIMEDOUT;
+
+	for (i = 0; i < USB_STS_RETRIES && status == -ETIMEDOUT; i++) {
+		status = usb_control_msg(hdev, usb_rcvctrlpipe(hdev, 0),
+			USB_REQ_GET_STATUS, USB_DIR_IN | USB_RT_HUB, 0, 0,
+			data, sizeof(*data), HZ * USB_STS_TIMEOUT);
+	}
+	return status;
 }
 
 /*
  * USB 2.0 spec Section 11.24.2.7
  */
-static int get_port_status(struct usb_device *hdev, int port,
+static int get_port_status(struct usb_device *hdev, int port1,
 		struct usb_port_status *data)
 {
-	return usb_control_msg(hdev, usb_rcvctrlpipe(hdev, 0),
-		USB_REQ_GET_STATUS, USB_DIR_IN | USB_RT_PORT, 0, port,
-		data, sizeof(*data), HZ * USB_CTRL_GET_TIMEOUT);
+	int i, status = -ETIMEDOUT;
+
+	for (i = 0; i < USB_STS_RETRIES && status == -ETIMEDOUT; i++) {
+		status = usb_control_msg(hdev, usb_rcvctrlpipe(hdev, 0),
+			USB_REQ_GET_STATUS, USB_DIR_IN | USB_RT_PORT, 0, port1,
+			data, sizeof(*data), HZ * USB_STS_TIMEOUT);
+	}
+	return status;
 }
 
 static void kick_khubd(struct usb_hub *hub)
@@ -291,7 +307,7 @@
 
 	default:		/* presumably an error */
 		/* Cause a hub reset after 10 consecutive errors */
-		dev_dbg (&hub->intf->dev, "transfer --> %d\n", urb->status);
+		dev_dbg (hub->intfdev, "transfer --> %d\n", urb->status);
 		if ((++hub->nerrors < 10) || hub->error)
 			goto resubmit;
 		hub->error = urb->status;
@@ -318,7 +334,7 @@
 
 	if ((status = usb_submit_urb (hub->urb, GFP_ATOMIC)) != 0
 			&& status != -ENODEV && status != -EPERM)
-		dev_err (&hub->intf->dev, "resubmit --> %d\n", status);
+		dev_err (hub->intfdev, "resubmit --> %d\n", status);
 }
 
 /* USB 2.0 spec Section 11.24.2.3 */
@@ -414,13 +430,13 @@
 
 static void hub_power_on(struct usb_hub *hub)
 {
-	int i;
+	int port1;
 
 	/* if hub supports power switching, enable power on each port */
 	if ((hub->descriptor->wHubCharacteristics & HUB_CHAR_LPSM) < 2) {
-		dev_dbg(&hub->intf->dev, "enabling power on all ports\n");
-		for (i = 0; i < hub->descriptor->bNbrPorts; i++)
-			set_port_feature(hub->hdev, i + 1,
+		dev_dbg(hub->intfdev, "enabling power on all ports\n");
+		for (port1 = 1; port1 <= hub->descriptor->bNbrPorts; port1++)
+			set_port_feature(hub->hdev, port1,
 					USB_PORT_FEAT_POWER);
 	}
 
@@ -446,12 +462,12 @@
 	hub->quiescing = 0;
 	status = usb_submit_urb(hub->urb, GFP_NOIO);
 	if (status < 0)
-		dev_err(&hub->intf->dev, "activate --> %d\n", status);
+		dev_err(hub->intfdev, "activate --> %d\n", status);
 	if (hub->has_indicators && blinkenlights)
 		schedule_delayed_work(&hub->leds, LED_CYCLE_PERIOD);
 
 	/* scan all ports ASAP */
-	hub->event_bits[0] = ~0;
+	hub->event_bits[0] = (1UL << (hub->descriptor->bNbrPorts + 1)) - 1;
 	kick_khubd(hub);
 }
 
@@ -462,7 +478,7 @@
 
 	ret = get_hub_status(hub->hdev, &hub->status->hub);
 	if (ret < 0)
-		dev_err (&hub->intf->dev,
+		dev_err (hub->intfdev,
 			"%s failed (err = %d)\n", __FUNCTION__, ret);
 	else {
 		*status = le16_to_cpu(hub->status->hub.wHubStatus);
@@ -476,7 +492,7 @@
 	struct usb_endpoint_descriptor *endpoint)
 {
 	struct usb_device *hdev = hub->hdev;
-	struct device *hub_dev = &hub->intf->dev;
+	struct device *hub_dev = hub->intfdev;
 	u16 hubstatus, hubchange;
 	unsigned int pipe;
 	int maxp, ret;
@@ -674,7 +690,7 @@
 		hub->indicator [0] = INDICATOR_CYCLE;
 
 	hub_power_on(hub);
-	hub->change_bits[0] = ~0;
+	hub->change_bits[0] = (1UL << (hub->descriptor->bNbrPorts + 1)) - 2;
 	hub_activate(hub);
 	return 0;
 
@@ -735,18 +751,16 @@
 	struct usb_endpoint_descriptor *endpoint;
 	struct usb_device *hdev;
 	struct usb_hub *hub;
-	struct device *hub_dev;
 
 	desc = intf->cur_altsetting;
 	hdev = interface_to_usbdev(intf);
-	hub_dev = &intf->dev;
 
 	/* Some hubs have a subclass of 1, which AFAICT according to the */
 	/*  specs is not defined, but it works */
 	if ((desc->desc.bInterfaceSubClass != 0) &&
 	    (desc->desc.bInterfaceSubClass != 1)) {
 descriptor_error:
-		dev_err (hub_dev, "bad descriptor, ignoring hub\n");
+		dev_err (&intf->dev, "bad descriptor, ignoring hub\n");
 		return -EIO;
 	}
 
@@ -766,18 +780,18 @@
 		goto descriptor_error;
 
 	/* We found a hub */
-	dev_info (hub_dev, "USB hub found\n");
+	dev_info (&intf->dev, "USB hub found\n");
 
 	hub = kmalloc(sizeof(*hub), GFP_KERNEL);
 	if (!hub) {
-		dev_dbg (hub_dev, "couldn't kmalloc hub struct\n");
+		dev_dbg (&intf->dev, "couldn't kmalloc hub struct\n");
 		return -ENOMEM;
 	}
 
 	memset(hub, 0, sizeof(*hub));
 
 	INIT_LIST_HEAD(&hub->event_list);
-	hub->intf = intf;
+	hub->intfdev = &intf->dev;
 	hub->hdev = hdev;
 	INIT_WORK(&hub->leds, led_work, hub);
 
@@ -802,10 +816,9 @@
 	switch (code) {
 	case USBDEVFS_HUB_PORTINFO: {
 		struct usbdevfs_hub_portinfo *info = user_data;
-		unsigned long flags;
 		int i;
 
-		spin_lock_irqsave(&hub_event_lock, flags);
+		spin_lock_irq(&device_state_lock);
 		if (hdev->devnum <= 0)
 			info->nports = 0;
 		else {
@@ -818,7 +831,7 @@
 						hdev->children[i]->devnum;
 			}
 		}
-		spin_unlock_irqrestore(&hub_event_lock, flags);
+		spin_unlock_irq(&device_state_lock);
 
 		return info->nports + 1;
 		}
@@ -829,9 +842,9 @@
 }
 
 /* caller has locked the hub device */
-static void hub_pre_reset(struct usb_device *hdev)
+static void hub_pre_reset(struct usb_hub *hub)
 {
-	struct usb_hub *hub = usb_get_intfdata(hdev->actconfig->interface[0]);
+	struct usb_device *hdev = hub->hdev;
 	int i;
 
 	for (i = 0; i < hdev->maxchild; ++i) {
@@ -842,10 +855,8 @@
 }
 
 /* caller has locked the hub device */
-static void hub_post_reset(struct usb_device *hdev)
+static void hub_post_reset(struct usb_hub *hub)
 {
-	struct usb_hub *hub = usb_get_intfdata(hdev->actconfig->interface[0]);
-
 	hub_activate(hub);
 	hub_power_on(hub);
 }
@@ -890,7 +901,7 @@
 			 */
 			down(&udev->serialize);
 			up(&hdev->serialize);
-			return t;
+			return t + 1;
 		}
 	}
 	usb_unlock_device(hdev);
@@ -1178,25 +1189,25 @@
 
 		/* descriptor may appear anywhere in config */
 		if (__usb_get_extra_descriptor (udev->rawdescriptors[0],
-					udev->config[0].desc.wTotalLength,
+					le16_to_cpu(udev->config[0].desc.wTotalLength),
 					USB_DT_OTG, (void **) &desc) == 0) {
 			if (desc->bmAttributes & USB_OTG_HNP) {
-				unsigned		port;
+				unsigned		port1;
 				struct usb_device	*root = udev->parent;
 				
-				for (port = 0; port < root->maxchild; port++) {
-					if (root->children[port] == udev)
+				for (port1 = 1; port1 <= root->maxchild;
+						port1++) {
+					if (root->children[port1-1] == udev)
 						break;
 				}
-				port++;
 
 				dev_info(&udev->dev,
 					"Dual-Role OTG device on %sHNP port\n",
-					(port == bus->otg_port)
+					(port1 == bus->otg_port)
 						? "" : "non-");
 
 				/* enable HNP before suspend, it's simpler */
-				if (port == bus->otg_port)
+				if (port1 == bus->otg_port)
 					bus->b_hnp_enable = 1;
 				err = usb_control_msg(udev,
 					usb_sndctrlpipe(udev, 0),
@@ -1225,9 +1236,9 @@
 		 */
 		if (udev->bus->b_hnp_enable || udev->bus->is_b_host) {
 			static int __usb_suspend_device (struct usb_device *,
-						int port, u32 state);
+						int port1, u32 state);
 			err = __usb_suspend_device(udev,
-					udev->bus->otg_port - 1,
+					udev->bus->otg_port,
 					PM_SUSPEND_MEM);
 			if (err < 0)
 				dev_dbg(&udev->dev, "HNP fail, %d\n", err);
@@ -1275,18 +1286,14 @@
 }
 
 
-static int hub_port_status(struct usb_device *hdev, int port,
+static int hub_port_status(struct usb_hub *hub, int port1,
 			       u16 *status, u16 *change)
 {
-	struct usb_hub *hub = usb_get_intfdata(hdev->actconfig->interface[0]);
 	int ret;
 
-	if (!hub)
-		return -ENODEV;
-
-	ret = get_port_status(hdev, port + 1, &hub->status->port);
+	ret = get_port_status(hub->hdev, port1, &hub->status->port);
 	if (ret < 0)
-		dev_err (&hub->intf->dev,
+		dev_err (hub->intfdev,
 			"%s failed (err = %d)\n", __FUNCTION__, ret);
 	else {
 		*status = le16_to_cpu(hub->status->port.wPortStatus);
@@ -1307,7 +1314,7 @@
 #define HUB_LONG_RESET_TIME	200
 #define HUB_RESET_TIMEOUT	500
 
-static int hub_port_wait_reset(struct usb_device *hdev, int port,
+static int hub_port_wait_reset(struct usb_hub *hub, int port1,
 				struct usb_device *udev, unsigned int delay)
 {
 	int delay_time, ret;
@@ -1321,7 +1328,7 @@
 		msleep(delay);
 
 		/* read and decode port status */
-		ret = hub_port_status(hdev, port, &portstatus, &portchange);
+		ret = hub_port_status(hub, port1, &portstatus, &portchange);
 		if (ret < 0)
 			return ret;
 
@@ -1349,36 +1356,37 @@
 		if (delay_time >= 2 * HUB_SHORT_RESET_TIME)
 			delay = HUB_LONG_RESET_TIME;
 
-		dev_dbg (hubdev (hdev),
+		dev_dbg (hub->intfdev,
 			"port %d not reset yet, waiting %dms\n",
-			port + 1, delay);
+			port1, delay);
 	}
 
 	return -EBUSY;
 }
 
-static int hub_port_reset(struct usb_device *hdev, int port,
+static int hub_port_reset(struct usb_hub *hub, int port1,
 				struct usb_device *udev, unsigned int delay)
 {
 	int i, status;
-	struct device *hub_dev = hubdev (hdev);
 
 	/* Reset the port */
 	for (i = 0; i < PORT_RESET_TRIES; i++) {
-		status = set_port_feature(hdev, port + 1, USB_PORT_FEAT_RESET);
+		status = set_port_feature(hub->hdev,
+				port1, USB_PORT_FEAT_RESET);
 		if (status)
-			dev_err(hub_dev, "cannot reset port %d (err = %d)\n",
-					port + 1, status);
+			dev_err(hub->intfdev,
+					"cannot reset port %d (err = %d)\n",
+					port1, status);
 		else
-			status = hub_port_wait_reset(hdev, port, udev, delay);
+			status = hub_port_wait_reset(hub, port1, udev, delay);
 
 		/* return on disconnect or reset */
 		switch (status) {
 		case 0:
 		case -ENOTCONN:
 		case -ENODEV:
-			clear_port_feature(hdev,
-				port + 1, USB_PORT_FEAT_C_RESET);
+			clear_port_feature(hub->hdev,
+				port1, USB_PORT_FEAT_C_RESET);
 			/* FIXME need disconnect() for NOTATTACHED device */
 			usb_set_device_state(udev, status
 					? USB_STATE_NOTATTACHED
@@ -1386,31 +1394,32 @@
 			return status;
 		}
 
-		dev_dbg (hub_dev,
+		dev_dbg (hub->intfdev,
 			"port %d not enabled, trying reset again...\n",
-			port + 1);
+			port1);
 		delay = HUB_LONG_RESET_TIME;
 	}
 
-	dev_err (hub_dev,
+	dev_err (hub->intfdev,
 		"Cannot enable port %i.  Maybe the USB cable is bad?\n",
-		port + 1);
+		port1);
 
 	return status;
 }
 
-static int hub_port_disable(struct usb_device *hdev, int port)
+static int hub_port_disable(struct usb_hub *hub, int port1, int set_state)
 {
+	struct usb_device *hdev = hub->hdev;
 	int ret;
 
-	if (hdev->children[port]) {
-		usb_set_device_state(hdev->children[port],
+	if (hdev->children[port1-1] && set_state) {
+		usb_set_device_state(hdev->children[port1-1],
 				USB_STATE_NOTATTACHED);
 	}
-	ret = clear_port_feature(hdev, port + 1, USB_PORT_FEAT_ENABLE);
+	ret = clear_port_feature(hdev, port1, USB_PORT_FEAT_ENABLE);
 	if (ret)
-		dev_err(hubdev(hdev), "cannot disable port %d (err = %d)\n",
-			port + 1, ret);
+		dev_err(hub->intfdev, "cannot disable port %d (err = %d)\n",
+			port1, ret);
 
 	return ret;
 }
@@ -1420,12 +1429,10 @@
  * time later khubd will disconnect() any existing usb_device on the port
  * and will re-enumerate if there actually is a device attached.
  */
-static void hub_port_logical_disconnect(struct usb_device *hdev, int port)
+static void hub_port_logical_disconnect(struct usb_hub *hub, int port1)
 {
-	struct usb_hub *hub;
-
-	dev_dbg(hubdev(hdev), "logical disconnect on port %d\n", port + 1);
-	hub_port_disable(hdev, port);
+	dev_dbg(hub->intfdev, "logical disconnect on port %d\n", port1);
+	hub_port_disable(hub, port1, 1);
 
 	/* FIXME let caller ask to power down the port:
 	 *  - some devices won't enumerate without a VBUS power cycle
@@ -1436,8 +1443,7 @@
 	 * Powerdown must be optional, because of reset/DFU.
 	 */
 
-	hub = usb_get_intfdata(hdev->actconfig->interface[0]);
-	set_bit(port, hub->change_bits);
+	set_bit(port1, hub->change_bits);
  	kick_khubd(hub);
 }
 
@@ -1454,13 +1460,12 @@
  * tree above them to deliver data, such as a keypress or packet.  In
  * some cases, this wakes the USB host.
  */
-static int hub_port_suspend(struct usb_device *hdev, int port)
+static int hub_port_suspend(struct usb_hub *hub, int port1,
+		struct usb_device *udev)
 {
-	int			status;
-	struct usb_device	*udev;
+	int	status;
 
-	udev = hdev->children[port];
-	// dev_dbg(hubdev(hdev), "suspend port %d\n", port + 1);
+	// dev_dbg(hub->intfdev, "suspend port %d\n", port1);
 
 	/* enable remote wakeup when appropriate; this lets the device
 	 * wake up the upstream hub (including maybe the root hub).
@@ -1485,11 +1490,11 @@
 	}
 
 	/* see 7.1.7.6 */
-	status = set_port_feature(hdev, port + 1, USB_PORT_FEAT_SUSPEND);
+	status = set_port_feature(hub->hdev, port1, USB_PORT_FEAT_SUSPEND);
 	if (status) {
-		dev_dbg(hubdev(hdev),
+		dev_dbg(hub->intfdev,
 			"can't suspend port %d, status %d\n",
-			port + 1, status);
+			port1, status);
 		/* paranoia:  "should not happen" */
 		(void) usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
 				USB_REQ_CLEAR_FEATURE, USB_RECIP_DEVICE,
@@ -1499,7 +1504,7 @@
 	} else {
 		/* device has up to 10 msec to fully suspend */
 		dev_dbg(&udev->dev, "usb suspend\n");
-		udev->state = USB_STATE_SUSPENDED;
+		usb_set_device_state(udev, USB_STATE_SUSPENDED);
 		msleep(10);
 	}
 	return status;
@@ -1519,13 +1524,13 @@
  * Linux (2.6) currently has NO mechanisms to initiate that:  no khubd
  * timer, no SRP, no requests through sysfs.
  */
-int __usb_suspend_device (struct usb_device *udev, int port, u32 state)
+int __usb_suspend_device (struct usb_device *udev, int port1, u32 state)
 {
 	int	status;
 
 	/* caller owns the udev device lock */
-	if (port < 0)
-		return port;
+	if (port1 < 0)
+		return port1;
 
 	if (udev->state == USB_STATE_SUSPENDED
 			|| udev->state == USB_STATE_NOTATTACHED) {
@@ -1606,8 +1611,11 @@
 		} else
 			status = -EOPNOTSUPP;
 	} else
-		status = hub_port_suspend(udev->parent, port);
+		status = hub_port_suspend(hdev_to_hub(udev->parent), port1,
+				udev);
 
+	if (status == 0)
+		udev->dev.power.power_state = state;
 	return status;
 }
 EXPORT_SYMBOL(__usb_suspend_device);
@@ -1632,13 +1640,13 @@
  */
 int usb_suspend_device(struct usb_device *udev, u32 state)
 {
-	int	port, status;
+	int	port1, status;
 
-	port = locktree(udev);
-	if (port < 0)
-		return port;
+	port1 = locktree(udev);
+	if (port1 < 0)
+		return port1;
 
-	status = __usb_suspend_device(udev, port, state);
+	status = __usb_suspend_device(udev, port1, state);
 	usb_unlock_device(udev);
 	return status;
 }
@@ -1661,9 +1669,10 @@
 	 * first two on the host side; they'd be inside hub_port_init()
 	 * during many timeouts, but khubd can't suspend until later.
 	 */
-	udev->state = udev->actconfig
-		? USB_STATE_CONFIGURED
-		: USB_STATE_ADDRESS;
+	usb_set_device_state(udev, udev->actconfig
+			? USB_STATE_CONFIGURED
+			: USB_STATE_ADDRESS);
+	udev->dev.power.power_state = PM_SUSPEND_ON;
 
  	/* 10.5.4.5 says be sure devices in the tree are still there.
  	 * For now let's assume the device didn't go crazy on resume,
@@ -1731,26 +1740,26 @@
 }
 
 static int
-hub_port_resume(struct usb_device *hdev, int port)
+hub_port_resume(struct usb_hub *hub, int port1, struct usb_device *udev)
 {
-	int			status;
-	struct usb_device	*udev;
+	int	status;
 
-	udev = hdev->children[port];
-	// dev_dbg(hubdev(hdev), "resume port %d\n", port + 1);
+	// dev_dbg(hub->intfdev, "resume port %d\n", port1);
 
 	/* see 7.1.7.7; affects power usage, but not budgeting */
-	status = clear_port_feature(hdev, port + 1, USB_PORT_FEAT_SUSPEND);
+	status = clear_port_feature(hub->hdev,
+			port1, USB_PORT_FEAT_SUSPEND);
 	if (status) {
-		dev_dbg(&hdev->actconfig->interface[0]->dev,
+		dev_dbg(hub->intfdev,
 			"can't resume port %d, status %d\n",
-			port + 1, status);
+			port1, status);
 	} else {
 		u16		devstatus;
 		u16		portchange;
 
 		/* drive resume for at least 20 msec */
-		dev_dbg(&udev->dev, "RESUME\n");
+		if (udev)
+			dev_dbg(&udev->dev, "RESUME\n");
 		msleep(25);
 
 #define LIVE_FLAGS	( USB_PORT_STAT_POWER \
@@ -1762,23 +1771,24 @@
 		 * sequence.
 		 */
 		devstatus = portchange = 0;
-		status = hub_port_status(hdev, port,
+		status = hub_port_status(hub, port1,
 				&devstatus, &portchange);
 		if (status < 0
 				|| (devstatus & LIVE_FLAGS) != LIVE_FLAGS
 				|| (devstatus & USB_PORT_STAT_SUSPEND) != 0
 				) {
-			dev_dbg(&hdev->actconfig->interface[0]->dev,
+			dev_dbg(hub->intfdev,
 				"port %d status %04x.%04x after resume, %d\n",
-				port + 1, portchange, devstatus, status);
+				port1, portchange, devstatus, status);
 		} else {
 			/* TRSMRCY = 10 msec */
 			msleep(10);
-			status = finish_port_resume(udev);
+			if (udev)
+				status = finish_port_resume(udev);
 		}
 	}
 	if (status < 0)
-		hub_port_logical_disconnect(hdev, port);
+		hub_port_logical_disconnect(hub, port1);
 
 	return status;
 }
@@ -1800,11 +1810,11 @@
  */
 int usb_resume_device(struct usb_device *udev)
 {
-	int			port, status;
+	int	port1, status;
 
-	port = locktree(udev);
-	if (port < 0)
-		return port;
+	port1 = locktree(udev);
+	if (port1 < 0)
+		return port1;
 
 	/* "global resume" of the HC-to-USB interface (root hub), or
 	 * selective resume of one hub-to-device port
@@ -1824,7 +1834,8 @@
 		}
 	} else if (udev->state == USB_STATE_SUSPENDED) {
 		// NOTE this fails if parent is also suspended...
-		status = hub_port_resume(udev->parent, port);
+		status = hub_port_resume(hdev_to_hub(udev->parent),
+				port1, udev);
 	} else {
 		status = 0;
 	}
@@ -1866,25 +1877,25 @@
 {
 	struct usb_hub		*hub = usb_get_intfdata (intf);
 	struct usb_device	*hdev = hub->hdev;
-	unsigned		port;
+	unsigned		port1;
 	int			status;
 
 	/* stop khubd and related activity */
 	hub_quiesce(hub);
 
 	/* then suspend every port */
-	for (port = 0; port < hdev->maxchild; port++) {
+	for (port1 = 1; port1 <= hdev->maxchild; port1++) {
 		struct usb_device	*udev;
 
-		udev = hdev->children [port];
+		udev = hdev->children [port1-1];
 		if (!udev)
 			continue;
 		down(&udev->serialize);
-		status = __usb_suspend_device(udev, port, state);
+		status = __usb_suspend_device(udev, port1, state);
 		up(&udev->serialize);
 		if (status < 0)
 			dev_dbg(&intf->dev, "suspend port %d --> %d\n",
-				port, status);
+				port1, status);
 	}
 
 	intf->dev.power.power_state = state;
@@ -1895,21 +1906,21 @@
 {
 	struct usb_device	*hdev = interface_to_usbdev(intf);
 	struct usb_hub		*hub = usb_get_intfdata (intf);
-	unsigned		port;
+	unsigned		port1;
 	int			status;
 
 	if (intf->dev.power.power_state == PM_SUSPEND_ON)
 		return 0;
 
-	for (port = 0; port < hdev->maxchild; port++) {
+	for (port1 = 1; port1 <= hdev->maxchild; port1++) {
 		struct usb_device	*udev;
 		u16			portstat, portchange;
 
-		udev = hdev->children [port];
-		status = hub_port_status(hdev, port, &portstat, &portchange);
+		udev = hdev->children [port1-1];
+		status = hub_port_status(hub, port1, &portstat, &portchange);
 		if (status == 0) {
 			if (portchange & USB_PORT_STAT_C_SUSPEND) {
-				clear_port_feature(hdev, port + 1,
+				clear_port_feature(hdev, port1,
 					USB_PORT_FEAT_C_SUSPEND);
 				portchange &= ~USB_PORT_STAT_C_SUSPEND;
 			}
@@ -1923,13 +1934,13 @@
 			continue;
 		down (&udev->serialize);
 		if (portstat & USB_PORT_STAT_SUSPEND)
-			status = hub_port_resume(hdev, port);
+			status = hub_port_resume(hub, port1, udev);
 		else {
 			status = finish_port_resume(udev);
 			if (status < 0) {
 				dev_dbg(&intf->dev, "resume port %d --> %d\n",
-					port + 1, status);
-				hub_port_logical_disconnect(hdev, port);
+					port1, status);
+				hub_port_logical_disconnect(hub, port1);
 			}
 		}
 		up(&udev->serialize);
@@ -1983,7 +1994,7 @@
 #define HUB_DEBOUNCE_STEP	  25
 #define HUB_DEBOUNCE_STABLE	 100
 
-static int hub_port_debounce(struct usb_device *hdev, int port)
+static int hub_port_debounce(struct usb_hub *hub, int port1)
 {
 	int ret;
 	int total_time, stable_time = 0;
@@ -1991,7 +2002,7 @@
 	unsigned connection = 0xffff;
 
 	for (total_time = 0; ; total_time += HUB_DEBOUNCE_STEP) {
-		ret = hub_port_status(hdev, port, &portstatus, &portchange);
+		ret = hub_port_status(hub, port1, &portstatus, &portchange);
 		if (ret < 0)
 			return ret;
 
@@ -2006,7 +2017,7 @@
 		}
 
 		if (portchange & USB_PORT_STAT_C_CONNECTION) {
-			clear_port_feature(hdev, port+1,
+			clear_port_feature(hub->hdev, port1,
 					USB_PORT_FEAT_C_CONNECTION);
 		}
 
@@ -2015,15 +2026,22 @@
 		msleep(HUB_DEBOUNCE_STEP);
 	}
 
-	dev_dbg (hubdev (hdev),
+	dev_dbg (hub->intfdev,
 		"debounce: port %d: total %dms stable %dms status 0x%x\n",
-		port + 1, total_time, stable_time, portstatus);
+		port1, total_time, stable_time, portstatus);
 
 	if (stable_time < HUB_DEBOUNCE_STABLE)
 		return -ETIMEDOUT;
 	return portstatus;
 }
 
+static void ep0_reinit(struct usb_device *udev)
+{
+	usb_disable_endpoint(udev, 0 + USB_DIR_IN);
+	usb_disable_endpoint(udev, 0 + USB_DIR_OUT);
+	udev->ep_in[0] = udev->ep_out[0] = &udev->ep0;
+}
+
 #define usb_sndaddr0pipe()	(PIPE_CONTROL << 30)
 #define usb_rcvaddr0pipe()	((PIPE_CONTROL << 30) | USB_DIR_IN)
 
@@ -2041,12 +2059,8 @@
 		USB_REQ_SET_ADDRESS, 0, udev->devnum, 0,
 		NULL, 0, HZ * USB_CTRL_SET_TIMEOUT);
 	if (retval == 0) {
-		int m = udev->epmaxpacketin[0];
-
 		usb_set_device_state(udev, USB_STATE_ADDRESS);
-		usb_disable_endpoint(udev, 0 + USB_DIR_IN);
-		usb_disable_endpoint(udev, 0 + USB_DIR_OUT);
-		udev->epmaxpacketin[0] = udev->epmaxpacketout[0] = m;
+		ep0_reinit(udev);
 	}
 	return retval;
 }
@@ -2061,11 +2075,12 @@
  * pointers, it's not necessary to lock the device.
  */
 static int
-hub_port_init (struct usb_device *hdev, struct usb_device *udev, int port,
+hub_port_init (struct usb_hub *hub, struct usb_device *udev, int port1,
 		int retry_counter)
 {
 	static DECLARE_MUTEX(usb_address0_sem);
 
+	struct usb_device	*hdev = hub->hdev;
 	int			i, j, retval;
 	unsigned		delay = HUB_SHORT_RESET_TIME;
 	enum usb_device_speed	oldspeed = udev->speed;
@@ -2075,7 +2090,7 @@
 	 */
 	if (!hdev->parent) {
 		delay = HUB_ROOT_RESET_TIME;
-		if (port + 1 == hdev->bus->otg_port)
+		if (port1 == hdev->bus->otg_port)
 			hdev->bus->b_hnp_enable = 0;
 	}
 
@@ -2087,7 +2102,7 @@
 	down(&usb_address0_sem);
 
 	/* Reset the device; full speed may morph to high speed */
-	retval = hub_port_reset(hdev, port, udev, delay);
+	retval = hub_port_reset(hub, port1, udev, delay);
 	if (retval < 0)		/* error or disconnect */
 		goto fail;
 				/* success, speed is known */
@@ -2104,22 +2119,21 @@
 	 */
 	switch (udev->speed) {
 	case USB_SPEED_HIGH:		/* fixed at 64 */
-		i = 64;
+		udev->ep0.desc.wMaxPacketSize = __constant_cpu_to_le16(64);
 		break;
 	case USB_SPEED_FULL:		/* 8, 16, 32, or 64 */
 		/* to determine the ep0 maxpacket size, try to read
 		 * the device descriptor to get bMaxPacketSize0 and
 		 * then correct our initial guess.
 		 */
-		i = 64;
+		udev->ep0.desc.wMaxPacketSize = __constant_cpu_to_le16(64);
 		break;
 	case USB_SPEED_LOW:		/* fixed at 8 */
-		i = 8;
+		udev->ep0.desc.wMaxPacketSize = __constant_cpu_to_le16(8);
 		break;
 	default:
 		goto fail;
 	}
-	udev->epmaxpacketin[0] = udev->epmaxpacketout[0] = i;
  
 	dev_info (&udev->dev,
 			"%s %s speed USB device using %s and address %d\n",
@@ -2139,11 +2153,8 @@
 		udev->ttport = hdev->ttport;
 	} else if (udev->speed != USB_SPEED_HIGH
 			&& hdev->speed == USB_SPEED_HIGH) {
-		struct usb_hub *hub;
-
-		hub = usb_get_intfdata(hdev->actconfig->interface[0]);
 		udev->tt = &hub->tt;
-		udev->ttport = port + 1;
+		udev->ttport = port1;
 	}
  
 	/* Why interleave GET_DESCRIPTOR and SET_ADDRESS this way?
@@ -2161,6 +2172,7 @@
 	for (i = 0; i < GET_DESCRIPTOR_TRIES; (++i, msleep(100))) {
 		if (USE_NEW_SCHEME(retry_counter)) {
 			struct usb_device_descriptor *buf;
+			int r = 0;
 
 #define GET_DESCRIPTOR_BUFSIZE	64
 			buf = kmalloc(GET_DESCRIPTOR_BUFSIZE, GFP_NOIO);
@@ -2174,18 +2186,25 @@
 			 * so that recalcitrant full-speed devices with
 			 * 8- or 16-byte ep0-maxpackets won't slow things
 			 * down tremendously by NAKing the unexpectedly
-			 * early status stage.
+			 * early status stage.  Also, retry on length 0
+			 * or stall; some devices are flakey.
 			 */
-			j = usb_control_msg(udev, usb_rcvaddr0pipe(),
+			for (j = 0; j < 3; ++j) {
+				r = usb_control_msg(udev, usb_rcvaddr0pipe(),
 					USB_REQ_GET_DESCRIPTOR, USB_DIR_IN,
 					USB_DT_DEVICE << 8, 0,
 					buf, GET_DESCRIPTOR_BUFSIZE,
 					(i ? HZ * USB_CTRL_GET_TIMEOUT : HZ));
+				if (r == 0 || r == -EPIPE)
+					continue;
+				if (r < 0)
+					break;
+			}
 			udev->descriptor.bMaxPacketSize0 =
 					buf->bMaxPacketSize0;
 			kfree(buf);
 
-			retval = hub_port_reset(hdev, port, udev, delay);
+			retval = hub_port_reset(hub, port1, udev, delay);
 			if (retval < 0)		/* error or disconnect */
 				goto fail;
 			if (oldspeed != udev->speed) {
@@ -2194,10 +2213,13 @@
 				retval = -ENODEV;
 				goto fail;
 			}
-			if (udev->descriptor.bMaxPacketSize0 == 0) {
+			switch (udev->descriptor.bMaxPacketSize0) {
+			case 64: case 32: case 16: case 8:
+				break;
+			default:
 				dev_err(&udev->dev, "device descriptor "
 						"read/%s, error %d\n",
-						"64", j);
+						"64", r);
 				retval = -EMSGSIZE;
 				continue;
 			}
@@ -2240,13 +2262,17 @@
 	if (retval)
 		goto fail;
 
-	/* Should we verify that the value is valid? */
 	i = udev->descriptor.bMaxPacketSize0;
-	if (udev->epmaxpacketin[0] != i) {
+	if (le16_to_cpu(udev->ep0.desc.wMaxPacketSize) != i) {
+		if (udev->speed != USB_SPEED_FULL ||
+				!(i == 8 || i == 16 || i == 32 || i == 64)) {
+			dev_err(&udev->dev, "ep0 maxpacket = %d\n", i);
+			retval = -EMSGSIZE;
+			goto fail;
+		}
 		dev_dbg(&udev->dev, "ep0 maxpacket = %d\n", i);
-		usb_disable_endpoint(udev, 0 + USB_DIR_IN);
-		usb_disable_endpoint(udev, 0 + USB_DIR_OUT);
-		udev->epmaxpacketin[0] = udev->epmaxpacketout[0] = i;
+		udev->ep0.desc.wMaxPacketSize = cpu_to_le16(i);
+		ep0_reinit(udev);
 	}
   
 	retval = usb_get_device_descriptor(udev, USB_DT_DEVICE_SIZE);
@@ -2261,12 +2287,14 @@
 	retval = 0;
 
 fail:
+	if (retval)
+		hub_port_disable(hub, port1, 0);
 	up(&usb_address0_sem);
 	return retval;
 }
 
 static void
-check_highspeed (struct usb_hub *hub, struct usb_device *udev, int port)
+check_highspeed (struct usb_hub *hub, struct usb_device *udev, int port1)
 {
 	struct usb_qualifier_descriptor	*qual;
 	int				status;
@@ -2282,7 +2310,7 @@
 			"connect to a high speed hub\n");
 		/* hub LEDs are probably harder to miss than syslog */
 		if (hub->has_indicators) {
-			hub->indicator[port] = INDICATOR_GREEN_BLINK;
+			hub->indicator[port1-1] = INDICATOR_GREEN_BLINK;
 			schedule_work (&hub->leds);
 		}
 	}
@@ -2324,7 +2352,7 @@
 		remaining -= delta;
 	}
 	if (remaining < 0) {
-		dev_warn(&hub->intf->dev,
+		dev_warn(hub->intfdev,
 			"%dmA over power budget!\n",
 			-2 * remaining);
 		remaining = 0;
@@ -2340,26 +2368,26 @@
  *		a firmware download)
  * caller already locked the hub
  */
-static void hub_port_connect_change(struct usb_hub *hub, int port,
+static void hub_port_connect_change(struct usb_hub *hub, int port1,
 					u16 portstatus, u16 portchange)
 {
 	struct usb_device *hdev = hub->hdev;
-	struct device *hub_dev = &hub->intf->dev;
+	struct device *hub_dev = hub->intfdev;
 	int status, i;
  
 	dev_dbg (hub_dev,
 		"port %d, status %04x, change %04x, %s\n",
-		port + 1, portstatus, portchange, portspeed (portstatus));
+		port1, portstatus, portchange, portspeed (portstatus));
 
 	if (hub->has_indicators) {
-		set_port_led(hdev, port + 1, HUB_LED_AUTO);
-		hub->indicator[port] = INDICATOR_AUTO;
+		set_port_led(hub, port1, HUB_LED_AUTO);
+		hub->indicator[port1-1] = INDICATOR_AUTO;
 	}
  
 	/* Disconnect any existing devices under this port */
-	if (hdev->children[port])
-		usb_disconnect(&hdev->children[port]);
-	clear_bit(port, hub->change_bits);
+	if (hdev->children[port1-1])
+		usb_disconnect(&hdev->children[port1-1]);
+	clear_bit(port1, hub->change_bits);
 
 #ifdef	CONFIG_USB_OTG
 	/* during HNP, don't repeat the debounce */
@@ -2368,11 +2396,11 @@
 #endif
 
 	if (portchange & USB_PORT_STAT_C_CONNECTION) {
-		status = hub_port_debounce(hdev, port);
+		status = hub_port_debounce(hub, port1);
 		if (status < 0) {
 			dev_err (hub_dev,
 				"connect-debounce failed, port %d disabled\n",
-				port+1);
+				port1);
 			goto done;
 		}
 		portstatus = status;
@@ -2385,7 +2413,7 @@
 		if ((hub->descriptor->wHubCharacteristics
 					& HUB_CHAR_LPSM) < 2
 				&& !(portstatus & (1 << USB_PORT_FEAT_POWER)))
-			set_port_feature(hdev, port + 1, USB_PORT_FEAT_POWER);
+			set_port_feature(hdev, port1, USB_PORT_FEAT_POWER);
  
 		if (portstatus & USB_PORT_STAT_ENABLE)
   			goto done;
@@ -2393,11 +2421,15 @@
 	}
 
 #ifdef  CONFIG_USB_SUSPEND
-	/* If something is connected, but the port is suspended, wake it up.. */
+	/* If something is connected, but the port is suspended, wake it up. */
 	if (portstatus & USB_PORT_STAT_SUSPEND) {
-		status = hub_port_resume(hdev, port);
-		if (status < 0)
-			dev_dbg(hub_dev, "can't clear suspend on port %d; %d\n", port+1, status);
+		status = hub_port_resume(hub, port1, NULL);
+		if (status < 0) {
+			dev_dbg(hub_dev,
+				"can't clear suspend on port %d; %d\n",
+				port1, status);
+			goto done;
+		}
 	}
 #endif
 
@@ -2407,10 +2439,11 @@
 		/* reallocate for each attempt, since references
 		 * to the previous one can escape in various ways
 		 */
-		udev = usb_alloc_dev(hdev, hdev->bus, port);
+		udev = usb_alloc_dev(hdev, hdev->bus, port1);
 		if (!udev) {
 			dev_err (hub_dev,
-				"couldn't allocate port %d usb_device\n", port+1);
+				"couldn't allocate port %d usb_device\n",
+				port1);
 			goto done;
 		}
 
@@ -2425,7 +2458,7 @@
 		}
 
 		/* reset and get descriptor */
-		status = hub_port_init(hdev, udev, port, i);
+		status = hub_port_init(hub, udev, port1, i);
 		if (status < 0)
 			goto loop;
 
@@ -2443,7 +2476,7 @@
 					&devstat);
 			if (status < 0) {
 				dev_dbg(&udev->dev, "get status %d ?\n", status);
-				goto loop;
+				goto loop_disable;
 			}
 			cpu_to_le16s(&devstat);
 			if ((devstat & (1 << USB_DEVICE_SELF_POWERED)) == 0) {
@@ -2451,20 +2484,20 @@
 					"can't connect bus-powered hub "
 					"to this port\n");
 				if (hub->has_indicators) {
-					hub->indicator[port] =
+					hub->indicator[port1-1] =
 						INDICATOR_AMBER_BLINK;
 					schedule_work (&hub->leds);
 				}
 				status = -ENOTCONN;	/* Don't retry */
-				goto loop;
+				goto loop_disable;
 			}
 		}
  
 		/* check for devices running slower than they could */
-		if (udev->descriptor.bcdUSB >= 0x0200
+		if (le16_to_cpu(udev->descriptor.bcdUSB) >= 0x0200
 				&& udev->speed == USB_SPEED_FULL
 				&& highspeed_hubs != 0)
-			check_highspeed (hub, udev, port);
+			check_highspeed (hub, udev, port1);
 
 		/* Store the parent's children[] pointer.  At this point
 		 * udev becomes globally accessible, although presumably
@@ -2481,7 +2514,7 @@
 		if (hdev->state == USB_STATE_NOTATTACHED)
 			status = -ENOTCONN;
 		else
-			hdev->children[port] = udev;
+			hdev->children[port1-1] = udev;
 		spin_unlock_irq(&device_state_lock);
 
 		/* Run it through the hoops (find a driver, etc) */
@@ -2489,14 +2522,14 @@
 			status = usb_new_device(udev);
 			if (status) {
 				spin_lock_irq(&device_state_lock);
-				hdev->children[port] = NULL;
+				hdev->children[port1-1] = NULL;
 				spin_unlock_irq(&device_state_lock);
 			}
 		}
 
 		up (&udev->serialize);
 		if (status)
-			goto loop;
+			goto loop_disable;
 
 		status = hub_power_remaining(hub);
 		if (status)
@@ -2506,10 +2539,10 @@
 
 		return;
 
+loop_disable:
+		hub_port_disable(hub, port1, 1);
 loop:
-		hub_port_disable(hdev, port);
-		usb_disable_endpoint(udev, 0 + USB_DIR_IN);
-		usb_disable_endpoint(udev, 0 + USB_DIR_OUT);
+		ep0_reinit(udev);
 		release_address(udev);
 		usb_put_dev(udev);
 		if (status == -ENOTCONN)
@@ -2517,13 +2550,14 @@
 	}
  
 done:
-	hub_port_disable(hdev, port);
+	hub_port_disable(hub, port1, 1);
 }
 
 static void hub_events(void)
 {
 	struct list_head *tmp;
 	struct usb_device *hdev;
+	struct usb_interface *intf;
 	struct usb_hub *hub;
 	struct device *hub_dev;
 	u16 hubstatus;
@@ -2553,10 +2587,8 @@
 
 		hub = list_entry(tmp, struct usb_hub, event_list);
 		hdev = hub->hdev;
-		hub_dev = &hub->intf->dev;
-
-		usb_get_dev(hdev);
-		spin_unlock_irq(&hub_event_lock);
+		intf = to_usb_interface(hub->intfdev);
+		hub_dev = &intf->dev;
 
 		dev_dbg(hub_dev, "state %d ports %d chg %04x evt %04x\n",
 				hdev->state, hub->descriptor
@@ -2566,14 +2598,16 @@
 				(u16) hub->change_bits[0],
 				(u16) hub->event_bits[0]);
 
+		usb_get_intf(intf);
+		spin_unlock_irq(&hub_event_lock);
+
 		/* Lock the device, then check to see if we were
 		 * disconnected while waiting for the lock to succeed. */
-		if (locktree(hdev) < 0)
-			break;
-		if (hdev->state != USB_STATE_CONFIGURED ||
-				!hdev->actconfig ||
-				hub != usb_get_intfdata(
-					hdev->actconfig->interface[0]))
+		if (locktree(hdev) < 0) {
+			usb_put_intf(intf);
+			continue;
+		}
+		if (hub != usb_get_intfdata(intf) || hub->quiescing)
 			goto loop;
 
 		if (hub->error) {
@@ -2592,20 +2626,20 @@
 		}
 
 		/* deal with port status changes */
-		for (i = 0; i < hub->descriptor->bNbrPorts; i++) {
+		for (i = 1; i <= hub->descriptor->bNbrPorts; i++) {
 			connect_change = test_bit(i, hub->change_bits);
-			if (!test_and_clear_bit(i+1, hub->event_bits) &&
+			if (!test_and_clear_bit(i, hub->event_bits) &&
 					!connect_change)
 				continue;
 
-			ret = hub_port_status(hdev, i,
+			ret = hub_port_status(hub, i,
 					&portstatus, &portchange);
 			if (ret < 0)
 				continue;
 
 			if (portchange & USB_PORT_STAT_C_CONNECTION) {
-				clear_port_feature(hdev,
-					i + 1, USB_PORT_FEAT_C_CONNECTION);
+				clear_port_feature(hdev, i,
+					USB_PORT_FEAT_C_CONNECTION);
 				connect_change = 1;
 			}
 
@@ -2614,9 +2648,9 @@
 					dev_dbg (hub_dev,
 						"port %d enable change, "
 						"status %08x\n",
-						i + 1, portstatus);
-				clear_port_feature(hdev,
-					i + 1, USB_PORT_FEAT_C_ENABLE);
+						i, portstatus);
+				clear_port_feature(hdev, i,
+					USB_PORT_FEAT_C_ENABLE);
 
 				/*
 				 * EM interference sometimes causes badly
@@ -2626,47 +2660,48 @@
 				 */
 				if (!(portstatus & USB_PORT_STAT_ENABLE)
 				    && !connect_change
-				    && hdev->children[i]) {
+				    && hdev->children[i-1]) {
 					dev_err (hub_dev,
 					    "port %i "
 					    "disabled by hub (EMI?), "
 					    "re-enabling...\n",
-						i + 1);
+						i);
 					connect_change = 1;
 				}
 			}
 
 			if (portchange & USB_PORT_STAT_C_SUSPEND) {
-				clear_port_feature(hdev, i + 1,
+				clear_port_feature(hdev, i,
 					USB_PORT_FEAT_C_SUSPEND);
-				if (hdev->children[i]) {
-					ret = remote_wakeup(hdev->children[i]);
+				if (hdev->children[i-1]) {
+					ret = remote_wakeup(hdev->
+							children[i-1]);
 					if (ret < 0)
 						connect_change = 1;
 				} else {
 					ret = -ENODEV;
-					hub_port_disable(hdev, i);
+					hub_port_disable(hub, i, 1);
 				}
 				dev_dbg (hub_dev,
 					"resume on port %d, status %d\n",
-					i + 1, ret);
+					i, ret);
 			}
 			
 			if (portchange & USB_PORT_STAT_C_OVERCURRENT) {
 				dev_err (hub_dev,
 					"over-current change on port %d\n",
-					i + 1);
-				clear_port_feature(hdev,
-					i + 1, USB_PORT_FEAT_C_OVER_CURRENT);
+					i);
+				clear_port_feature(hdev, i,
+					USB_PORT_FEAT_C_OVER_CURRENT);
 				hub_power_on(hub);
 			}
 
 			if (portchange & USB_PORT_STAT_C_RESET) {
 				dev_dbg (hub_dev,
 					"reset change on port %d\n",
-					i + 1);
-				clear_port_feature(hdev,
-					i + 1, USB_PORT_FEAT_C_RESET);
+					i);
+				clear_port_feature(hdev, i,
+					USB_PORT_FEAT_C_RESET);
 			}
 
 			if (connect_change)
@@ -2694,7 +2729,7 @@
 
 loop:
 		usb_unlock_device(hdev);
-		usb_put_dev(hdev);
+		usb_put_intf(intf);
 
         } /* end while (1) */
 }
@@ -2793,8 +2828,8 @@
 	struct usb_config_descriptor	*buf;
 
 	for (index = 0; index < udev->descriptor.bNumConfigurations; index++) {
-		if (len < udev->config[index].desc.wTotalLength)
-			len = udev->config[index].desc.wTotalLength;
+		if (len < le16_to_cpu(udev->config[index].desc.wTotalLength))
+			len = le16_to_cpu(udev->config[index].desc.wTotalLength);
 	}
 	buf = kmalloc (len, SLAB_KERNEL);
 	if (buf == 0) {
@@ -2804,7 +2839,7 @@
 	}
 	for (index = 0; index < udev->descriptor.bNumConfigurations; index++) {
 		int length;
-		int old_length = udev->config[index].desc.wTotalLength;
+		int old_length = le16_to_cpu(udev->config[index].desc.wTotalLength);
 
 		length = usb_get_descriptor(udev, USB_DT_CONFIG, index, buf,
 				old_length);
@@ -2851,10 +2886,11 @@
  */
 int usb_reset_device(struct usb_device *udev)
 {
-	struct usb_device *parent = udev->parent;
-	struct usb_device_descriptor descriptor = udev->descriptor;
-	int i, ret = 0, port = -1;
-	int udev_is_a_hub = 0;
+	struct usb_device		*parent_hdev = udev->parent;
+	struct usb_hub			*parent_hub;
+	struct usb_device_descriptor	descriptor = udev->descriptor;
+	struct usb_hub			*hub = NULL;
+	int 				i, ret = 0, port1 = -1;
 
 	if (udev->state == USB_STATE_NOTATTACHED ||
 			udev->state == USB_STATE_SUSPENDED) {
@@ -2863,39 +2899,39 @@
 		return -EINVAL;
 	}
 
-	if (!parent) {
+	if (!parent_hdev) {
 		/* this requires hcd-specific logic; see OHCI hc_restart() */
 		dev_dbg(&udev->dev, "%s for root hub!\n", __FUNCTION__);
 		return -EISDIR;
 	}
 
-	for (i = 0; i < parent->maxchild; i++)
-		if (parent->children[i] == udev) {
-			port = i;
+	for (i = 0; i < parent_hdev->maxchild; i++)
+		if (parent_hdev->children[i] == udev) {
+			port1 = i + 1;
 			break;
 		}
 
-	if (port < 0) {
+	if (port1 < 0) {
 		/* If this ever happens, it's very bad */
 		dev_err(&udev->dev, "Can't locate device's port!\n");
 		return -ENOENT;
 	}
+	parent_hub = hdev_to_hub(parent_hdev);
 
 	/* If we're resetting an active hub, take some special actions */
 	if (udev->actconfig &&
 			udev->actconfig->interface[0]->dev.driver ==
-			&hub_driver.driver) {
-		udev_is_a_hub = 1;
-		hub_pre_reset(udev);
+				&hub_driver.driver &&
+			(hub = hdev_to_hub(udev)) != NULL) {
+		hub_pre_reset(hub);
 	}
 
 	for (i = 0; i < SET_CONFIG_TRIES; ++i) {
 
 		/* ep0 maxpacket size may change; let the HCD know about it.
 		 * Other endpoints will be handled by re-enumeration. */
-		usb_disable_endpoint(udev, 0 + USB_DIR_IN);
-		usb_disable_endpoint(udev, 0 + USB_DIR_OUT);
-		ret = hub_port_init(parent, udev, port, i);
+		ep0_reinit(udev);
+		ret = hub_port_init(parent_hub, udev, port1, i);
 		if (ret >= 0)
 			break;
 	}
@@ -2946,11 +2982,11 @@
 	}
 
 done:
-	if (udev_is_a_hub)
-		hub_post_reset(udev);
+	if (hub)
+		hub_post_reset(hub);
 	return 0;
  
 re_enumerate:
-	hub_port_logical_disconnect(parent, port);
+	hub_port_logical_disconnect(parent_hub, port1);
 	return -ENODEV;
 }
diff -Nru a/drivers/usb/core/hub.h b/drivers/usb/core/hub.h
--- a/drivers/usb/core/hub.h	2005-01-10 20:11:16 -08:00
+++ b/drivers/usb/core/hub.h	2005-01-10 20:11:16 -08:00
@@ -186,7 +186,7 @@
 extern void usb_hub_tt_clear_buffer (struct usb_device *dev, int pipe);
 
 struct usb_hub {
-	struct usb_interface	*intf;		/* the "real" device */
+	struct device		*intfdev;	/* the "interface" device */
 	struct usb_device	*hdev;
 	struct urb		*urb;		/* for interrupt polling pipe */
 
diff -Nru a/drivers/usb/core/inode.c b/drivers/usb/core/inode.c
--- a/drivers/usb/core/inode.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/usb/core/inode.c	2005-01-10 20:11:16 -08:00
@@ -434,6 +434,7 @@
 	sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
 	sb->s_magic = USBDEVICE_SUPER_MAGIC;
 	sb->s_op = &usbfs_ops;
+	sb->s_time_gran = 1;
 	inode = usbfs_get_inode(sb, S_IFDIR | 0755, 0);
 
 	if (!inode) {
@@ -695,7 +696,7 @@
 	for (i = 0; i < dev->descriptor.bNumConfigurations; ++i) {
 		struct usb_config_descriptor *config =
 			(struct usb_config_descriptor *)dev->rawdescriptors[i];
-		i_size += le16_to_cpu ((__force __le16)config->wTotalLength);
+		i_size += le16_to_cpu(config->wTotalLength);
 	}
 	if (dev->usbfs_dentry->d_inode)
 		dev->usbfs_dentry->d_inode->i_size = i_size;
diff -Nru a/drivers/usb/core/message.c b/drivers/usb/core/message.c
--- a/drivers/usb/core/message.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/usb/core/message.c	2005-01-10 20:11:17 -08:00
@@ -796,13 +796,8 @@
 		return -ENOMEM;
 
 	ret = usb_get_descriptor(dev, USB_DT_DEVICE, 0, desc, size);
-	if (ret >= 0) {
-		le16_to_cpus(&desc->bcdUSB);
-		le16_to_cpus(&desc->idVendor);
-		le16_to_cpus(&desc->idProduct);
-		le16_to_cpus(&desc->bcdDevice);
+	if (ret >= 0) 
 		memcpy(&dev->descriptor, desc, size);
-	}
 	kfree(desc);
 	return ret;
 }
@@ -918,16 +913,21 @@
  */
 void usb_disable_endpoint(struct usb_device *dev, unsigned int epaddr)
 {
-	if (dev && dev->bus && dev->bus->op && dev->bus->op->disable)
-		dev->bus->op->disable(dev, epaddr);
-	else {
-		unsigned int epnum = epaddr & USB_ENDPOINT_NUMBER_MASK;
-
-		if (usb_endpoint_out(epaddr))
-			dev->epmaxpacketout[epnum] = 0;
-		else
-			dev->epmaxpacketin[epnum] = 0;
+	unsigned int epnum = epaddr & USB_ENDPOINT_NUMBER_MASK;
+	struct usb_host_endpoint *ep;
+
+	if (!dev)
+		return;
+
+	if (usb_endpoint_out(epaddr)) {
+		ep = dev->ep_out[epnum];
+		dev->ep_out[epnum] = NULL;
+	} else {
+		ep = dev->ep_in[epnum];
+		dev->ep_in[epnum] = NULL;
 	}
+	if (ep && dev->bus && dev->bus->op && dev->bus->op->disable)
+		dev->bus->op->disable(dev, ep);
 }
 
 /**
@@ -1002,27 +1002,27 @@
 /*
  * usb_enable_endpoint - Enable an endpoint for USB communications
  * @dev: the device whose interface is being enabled
- * @epd: pointer to the endpoint descriptor
+ * @ep: the endpoint
  *
- * Resets the endpoint toggle and stores its maxpacket value.
+ * Resets the endpoint toggle, and sets dev->ep_{in,out} pointers.
  * For control endpoints, both the input and output sides are handled.
  */
-void usb_enable_endpoint(struct usb_device *dev,
-		struct usb_endpoint_descriptor *epd)
+static void
+usb_enable_endpoint(struct usb_device *dev, struct usb_host_endpoint *ep)
 {
-	int maxsize = epd->wMaxPacketSize;
-	unsigned int epaddr = epd->bEndpointAddress;
+	unsigned int epaddr = ep->desc.bEndpointAddress;
 	unsigned int epnum = epaddr & USB_ENDPOINT_NUMBER_MASK;
-	int is_control = ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) ==
-				USB_ENDPOINT_XFER_CONTROL);
+	int is_control;
 
+	is_control = ((ep->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
+			== USB_ENDPOINT_XFER_CONTROL);
 	if (usb_endpoint_out(epaddr) || is_control) {
 		usb_settoggle(dev, epnum, 1, 0);
-		dev->epmaxpacketout[epnum] = maxsize;
+		dev->ep_out[epnum] = ep;
 	}
 	if (!usb_endpoint_out(epaddr) || is_control) {
 		usb_settoggle(dev, epnum, 0, 0);
-		dev->epmaxpacketin[epnum] = maxsize;
+		dev->ep_in[epnum] = ep;
 	}
 }
 
@@ -1040,7 +1040,7 @@
 	int i;
 
 	for (i = 0; i < alt->desc.bNumEndpoints; ++i)
-		usb_enable_endpoint(dev, &alt->endpoint[i].desc);
+		usb_enable_endpoint(dev, &alt->endpoint[i]);
 }
 
 /**
diff -Nru a/drivers/usb/core/otg_whitelist.h b/drivers/usb/core/otg_whitelist.h
--- a/drivers/usb/core/otg_whitelist.h	2005-01-10 20:11:23 -08:00
+++ b/drivers/usb/core/otg_whitelist.h	2005-01-10 20:11:23 -08:00
@@ -55,8 +55,8 @@
 		return 1;
 
 	/* HNP test device is _never_ targeted (see OTG spec 6.6.6) */
-	if (dev->descriptor.idVendor == 0x1a0a
-			&& dev->descriptor.idProduct == 0xbadd)
+	if ((le16_to_cpu(dev->descriptor.idVendor) == 0x1a0a && 
+	     le16_to_cpu(dev->descriptor.idProduct) == 0xbadd))
 		return 0;
 
 	/* NOTE: can't use usb_match_id() since interface caches
@@ -64,21 +64,21 @@
 	 */
 	for (id = whitelist_table; id->match_flags; id++) {
 		if ((id->match_flags & USB_DEVICE_ID_MATCH_VENDOR) &&
-		    id->idVendor != dev->descriptor.idVendor)
+		    id->idVendor != le16_to_cpu(dev->descriptor.idVendor))
 			continue;
 
 		if ((id->match_flags & USB_DEVICE_ID_MATCH_PRODUCT) &&
-		    id->idProduct != dev->descriptor.idProduct)
+		    id->idProduct != le16_to_cpu(dev->descriptor.idProduct))
 			continue;
 
 		/* No need to test id->bcdDevice_lo != 0, since 0 is never
 		   greater than any unsigned number. */
 		if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_LO) &&
-		    (id->bcdDevice_lo > dev->descriptor.bcdDevice))
+		    (id->bcdDevice_lo > le16_to_cpu(dev->descriptor.bcdDevice)))
 			continue;
 
 		if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_HI) &&
-		    (id->bcdDevice_hi < dev->descriptor.bcdDevice))
+		    (id->bcdDevice_hi < le16_to_cpu(dev->descriptor.bcdDevice)))
 			continue;
 
 		if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_CLASS) &&
@@ -101,8 +101,8 @@
 
 	/* OTG MESSAGE: report errors here, customize to match your product */
 	dev_err(&dev->dev, "device v%04x p%04x is not supported\n",
-			dev->descriptor.idVendor,
-			dev->descriptor.idProduct);
+		le16_to_cpu(dev->descriptor.idVendor),
+		le16_to_cpu(dev->descriptor.idProduct));
 #ifdef	CONFIG_USB_OTG_WHITELIST
 	return 0;
 #else
diff -Nru a/drivers/usb/core/sysfs.c b/drivers/usb/core/sysfs.c
--- a/drivers/usb/core/sysfs.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/usb/core/sysfs.c	2005-01-10 20:11:17 -08:00
@@ -149,10 +149,11 @@
 show_version (struct device *dev, char *buf)
 {
 	struct usb_device *udev;
+	u16 bcdUSB;
 
-	udev = to_usb_device (dev);
-	return sprintf (buf, "%2x.%02x\n", udev->descriptor.bcdUSB >> 8, 
-			udev->descriptor.bcdUSB & 0xff);
+	udev = to_usb_device(dev);
+	bcdUSB = le16_to_cpu(udev->descriptor.bcdUSB);
+	return sprintf(buf, "%2x.%02x\n", bcdUSB >> 8, bcdUSB & 0xff);
 }
 static DEVICE_ATTR(version, S_IRUGO, show_version, NULL);
 
@@ -167,6 +168,22 @@
 static DEVICE_ATTR(maxchild, S_IRUGO, show_maxchild, NULL);
 
 /* Descriptor fields */
+#define usb_descriptor_attr_le16(field, format_string)			\
+static ssize_t								\
+show_##field (struct device *dev, char *buf)				\
+{									\
+	struct usb_device *udev;					\
+									\
+	udev = to_usb_device (dev);					\
+	return sprintf (buf, format_string, 				\
+			le16_to_cpu(udev->descriptor.field));		\
+}									\
+static DEVICE_ATTR(field, S_IRUGO, show_##field, NULL);
+
+usb_descriptor_attr_le16(idVendor, "%04x\n")
+usb_descriptor_attr_le16(idProduct, "%04x\n")
+usb_descriptor_attr_le16(bcdDevice, "%04x\n")
+
 #define usb_descriptor_attr(field, format_string)			\
 static ssize_t								\
 show_##field (struct device *dev, char *buf)				\
@@ -178,9 +195,6 @@
 }									\
 static DEVICE_ATTR(field, S_IRUGO, show_##field, NULL);
 
-usb_descriptor_attr (idVendor, "%04x\n")
-usb_descriptor_attr (idProduct, "%04x\n")
-usb_descriptor_attr (bcdDevice, "%04x\n")
 usb_descriptor_attr (bDeviceClass, "%02x\n")
 usb_descriptor_attr (bDeviceSubClass, "%02x\n")
 usb_descriptor_attr (bDeviceProtocol, "%02x\n")
diff -Nru a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c
--- a/drivers/usb/core/urb.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/usb/core/urb.c	2005-01-10 20:11:20 -08:00
@@ -265,7 +265,7 @@
 	max = usb_maxpacket (dev, pipe, is_out);
 	if (max <= 0) {
 		dev_dbg(&dev->dev,
-			"bogus endpoint ep%d%s in %s (bad maxpacket %d)",
+			"bogus endpoint ep%d%s in %s (bad maxpacket %d)\n",
 			usb_pipeendpoint (pipe), is_out ? "out" : "in",
 			__FUNCTION__, max);
 		return -EMSGSIZE;
diff -Nru a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
--- a/drivers/usb/core/usb.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/usb/core/usb.c	2005-01-10 20:11:19 -08:00
@@ -267,44 +267,6 @@
 }
 
 /**
- * usb_epnum_to_ep_desc - get the endpoint object with a given endpoint number
- * @dev: the device whose current configuration+altsettings is considered
- * @epnum: the desired endpoint, masked with USB_DIR_IN as appropriate.
- *
- * This walks the device descriptor for the currently active configuration,
- * and returns a pointer to the endpoint with that particular endpoint
- * number, or null.
- *
- * Note that interface descriptors are not required to list endpoint
- * numbers in any standardized order, so that it would be wrong to
- * assume that ep2in precedes either ep5in, ep2out, or even ep1out.
- * 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_host_config *config = dev->actconfig;
-	int i, k;
-
-	if (!config)
-		return NULL;
-	for (i = 0; i < config->desc.bNumInterfaces; i++) {
-		struct usb_interface		*intf;
-		struct usb_host_interface	*alt;
-
-		/* only endpoints in current altsetting are active */
-		intf = config->interface[i];
-		alt = intf->cur_altsetting;
-
-		for (k = 0; k < alt->desc.bNumEndpoints; k++)
-			if (epnum == alt->endpoint[k].desc.bEndpointAddress)
-				return &alt->endpoint[k].desc;
-	}
-
-	return NULL;
-}
-
-/**
  * usb_driver_claim_interface - bind a driver to an interface
  * @driver: the driver to be bound
  * @iface: the interface to which it will be bound; must be in the
@@ -461,21 +423,21 @@
 	       id->driver_info; id++) {
 
 		if ((id->match_flags & USB_DEVICE_ID_MATCH_VENDOR) &&
-		    id->idVendor != dev->descriptor.idVendor)
+		    id->idVendor != le16_to_cpu(dev->descriptor.idVendor))
 			continue;
 
 		if ((id->match_flags & USB_DEVICE_ID_MATCH_PRODUCT) &&
-		    id->idProduct != dev->descriptor.idProduct)
+		    id->idProduct != le16_to_cpu(dev->descriptor.idProduct))
 			continue;
 
 		/* No need to test id->bcdDevice_lo != 0, since 0 is never
 		   greater than any unsigned number. */
 		if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_LO) &&
-		    (id->bcdDevice_lo > dev->descriptor.bcdDevice))
+		    (id->bcdDevice_lo > le16_to_cpu(dev->descriptor.bcdDevice)))
 			continue;
 
 		if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_HI) &&
-		    (id->bcdDevice_hi < dev->descriptor.bcdDevice))
+		    (id->bcdDevice_hi < le16_to_cpu(dev->descriptor.bcdDevice)))
 			continue;
 
 		if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_CLASS) &&
@@ -626,9 +588,9 @@
 	if (add_hotplug_env_var(envp, num_envp, &i,
 				buffer, buffer_size, &length,
 				"PRODUCT=%x/%x/%x",
-				usb_dev->descriptor.idVendor,
-				usb_dev->descriptor.idProduct,
-				usb_dev->descriptor.bcdDevice))
+				le16_to_cpu(usb_dev->descriptor.idVendor),
+				le16_to_cpu(usb_dev->descriptor.idProduct),
+				le16_to_cpu(usb_dev->descriptor.bcdDevice)))
 		return -ENOMEM;
 
 	/* class-based driver binding models */
@@ -684,8 +646,6 @@
 
 	udev = to_usb_device(dev);
 
-	if (udev->bus && udev->bus->op && udev->bus->op->deallocate)
-		udev->bus->op->deallocate(udev);
 	usb_destroy_configuration(udev);
 	usb_bus_put(udev->bus);
 	kfree (udev);
@@ -695,7 +655,7 @@
  * usb_alloc_dev - usb device constructor (usbcore-internal)
  * @parent: hub to which device is connected; null to allocate a root hub
  * @bus: bus used to access the device
- * @port: zero based index of port; ignored for root hubs
+ * @port1: one-based index of port; ignored for root hubs
  * Context: !in_interrupt ()
  *
  * Only hub drivers (including virtual root hub drivers for host
@@ -704,7 +664,7 @@
  * This call may not be used in a non-sleeping context.
  */
 struct usb_device *
-usb_alloc_dev(struct usb_device *parent, struct usb_bus *bus, unsigned port)
+usb_alloc_dev(struct usb_device *parent, struct usb_bus *bus, unsigned port1)
 {
 	struct usb_device *dev;
 
@@ -728,6 +688,12 @@
 	dev->dev.release = usb_release_dev;
 	dev->state = USB_STATE_ATTACHED;
 
+	INIT_LIST_HEAD(&dev->ep0.urb_list);
+	dev->ep0.desc.bLength = USB_DT_ENDPOINT_SIZE;
+	dev->ep0.desc.bDescriptorType = USB_DT_ENDPOINT;
+	/* ep0 maxpacket comes later, from device descriptor */
+	dev->ep_in[0] = dev->ep_out[0] = &dev->ep0;
+
 	/* Save readable and stable topology id, distinguishing devices
 	 * by location for diagnostics, tools, driver model, etc.  The
 	 * string is a path along hub ports, from the root.  Each device's
@@ -745,10 +711,10 @@
 		/* match any labeling on the hubs; it's one-based */
 		if (parent->devpath [0] == '0')
 			snprintf (dev->devpath, sizeof dev->devpath,
-				"%d", port + 1);
+				"%d", port1);
 		else
 			snprintf (dev->devpath, sizeof dev->devpath,
-				"%s.%d", parent->devpath, port + 1);
+				"%s.%d", parent->devpath, port1);
 
 		dev->dev.parent = &parent->dev;
 		sprintf (&dev->dev.bus_id[0], "%d-%s",
@@ -763,13 +729,6 @@
 
 	init_MUTEX(&dev->serialize);
 
-	if (dev->bus->op->allocate)
-		if (dev->bus->op->allocate(dev)) {
-			usb_bus_put(bus);
-			kfree(dev);
-			return NULL;
-		}
-
 	return dev;
 }
 
@@ -1000,12 +959,12 @@
 	int child;
 
 	dev_dbg(&dev->dev, "check for vendor %04x, product %04x ...\n",
-	    dev->descriptor.idVendor,
-	    dev->descriptor.idProduct);
+	    le16_to_cpu(dev->descriptor.idVendor),
+	    le16_to_cpu(dev->descriptor.idProduct));
 
 	/* see if this device matches */
-	if ((dev->descriptor.idVendor == vendor_id) &&
-	    (dev->descriptor.idProduct == product_id)) {
+	if ((vendor_id == le16_to_cpu(dev->descriptor.idVendor)) &&
+	    (product_id == le16_to_cpu(dev->descriptor.idProduct))) {
 		dev_dbg (&dev->dev, "matched this device!\n");
 		ret_dev = usb_get_dev(dev);
 		goto exit;
@@ -1533,7 +1492,6 @@
  * These symbols are exported for device (or host controller)
  * driver modules to use.
  */
-EXPORT_SYMBOL(usb_epnum_to_ep_desc);
 
 EXPORT_SYMBOL(usb_register);
 EXPORT_SYMBOL(usb_deregister);
diff -Nru a/drivers/usb/core/usb.h b/drivers/usb/core/usb.h
--- a/drivers/usb/core/usb.h	2005-01-10 20:11:17 -08:00
+++ b/drivers/usb/core/usb.h	2005-01-10 20:11:17 -08:00
@@ -13,8 +13,6 @@
 extern void usb_release_interface_cache(struct kref *ref);
 extern void usb_disable_device (struct usb_device *dev, int skip_ep0);
 
-extern void usb_enable_endpoint (struct usb_device *dev,
-		struct usb_endpoint_descriptor *epd);
 extern void usb_enable_interface (struct usb_device *dev,
 		struct usb_interface *intf);
 
diff -Nru a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
--- a/drivers/usb/gadget/Kconfig	2005-01-10 20:11:17 -08:00
+++ b/drivers/usb/gadget/Kconfig	2005-01-10 20:11:17 -08:00
@@ -39,6 +39,9 @@
 	   If in doubt, say "N" and don't enable these drivers; most people
 	   don't have this kind of hardware (except maybe inside Linux PDAs).
 
+	   For more information, see <http://www.linux-usb.org/gadget> and
+	   the kernel DocBook documentation for this API.
+
 config USB_GADGET_DEBUG_FILES
 	boolean "Debugging information files"
 	depends on USB_GADGET && PROC_FS
@@ -59,6 +62,8 @@
 	help
 	   A USB device uses a controller to talk to its host.
 	   Systems should have only one such upstream link.
+	   Many controller drivers are platform-specific; these
+	   often need board-specific hooks.
 
 config USB_GADGET_NET2280
 	boolean "NetChip 2280"
@@ -234,6 +239,21 @@
 	tristate "USB Gadget Drivers"
 	depends on USB_GADGET
 	default USB_ETH
+	help
+	  A Linux "Gadget Driver" talks to the USB Peripheral Controller
+	  driver through the abstract "gadget" API.  Some other operating
+	  systems call these "client" drivers, of which "class drivers"
+	  are a subset (implementing a USB device class specification).
+	  A gadget driver implements one or more USB functions using
+	  the peripheral hardware.
+
+	  Gadget drivers are hardware-neutral, or "platform independent",
+	  except that they sometimes must understand quirks or limitations
+	  of the particular controllers they work with.  For example, when
+	  a controller doesn't support alternate configurations or provide
+	  enough of the right types of endpoints, the gadget driver might
+	  not be able work with that controller, or might need to implement
+	  a less common variant of a device class protocol.
 
 # this first set of drivers all depend on bulk-capable hardware.
 
@@ -273,7 +293,7 @@
 	  one serve as the USB host instead (in the "B-Host" role).
 
 config USB_ETH
-	tristate "Ethernet Gadget"
+	tristate "Ethernet Gadget (with CDC Ethernet support)"
 	depends on NET
 	help
 	  This driver implements Ethernet style communication, in either
@@ -314,6 +334,11 @@
 	   If you say "y" here, the Ethernet gadget driver will try to provide
 	   a second device configuration, supporting RNDIS to talk to such
 	   Microsoft USB hosts.
+	   
+	   To make MS-Windows work with this, use Documentation/usb/linux.inf
+	   as the "driver info file".  For versions of MS-Windows older than
+	   XP, you'll need to download drivers from Microsoft's website; a URL
+	   is given in comments found in that info file.
 
 config USB_GADGETFS
 	tristate "Gadget Filesystem (EXPERIMENTAL)"
@@ -352,13 +377,19 @@
 	  normal operation.
 
 config USB_G_SERIAL
-	tristate "Serial Gadget"
+	tristate "Serial Gadget (with CDC ACM support)"
 	help
 	  The Serial Gadget talks to the Linux-USB generic serial driver.
+	  This driver supports a CDC-ACM module option, which can be used
+	  to interoperate with MS-Windows hosts or with the Linux-USB
+	  "cdc-acm" driver.
 
 	  Say "y" to link the driver statically, or "m" to build a
 	  dynamically linked module called "g_serial".
 
+	  For more information, see Documentation/usb/gadget_serial.txt
+	  which includes instructions and a "driver info file" needed to
+	  make MS-Windows work with this driver.
 
 
 # put drivers that need isochronous transfer support (for audio
diff -Nru a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c
--- a/drivers/usb/gadget/dummy_hcd.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/usb/gadget/dummy_hcd.c	2005-01-10 20:11:15 -08:00
@@ -65,7 +65,7 @@
 
 
 #define DRIVER_DESC	"USB Host+Gadget Emulator"
-#define DRIVER_VERSION	"29 Oct 2004"
+#define DRIVER_VERSION	"17 Dec 2004"
 
 static const char	driver_name [] = "dummy_hcd";
 static const char	driver_desc [] = "USB Host+Gadget Emulator";
@@ -143,8 +143,12 @@
 
 #define FIFO_SIZE		64
 
+struct urbp {
+	struct urb		*urb;
+	struct list_head	urbp_list;
+};
+
 struct dummy {
-	struct usb_hcd			hcd;		/* must come first! */
 	spinlock_t			lock;
 
 	/*
@@ -168,16 +172,22 @@
 	unsigned long			re_timeout;
 
 	struct usb_device		*udev;
+	struct list_head		urbp_list;
 };
 
 static inline struct dummy *hcd_to_dummy (struct usb_hcd *hcd)
 {
-	return container_of(hcd, struct dummy, hcd);
+	return (struct dummy *) (hcd->hcd_priv);
+}
+
+static inline struct usb_hcd *dummy_to_hcd (struct dummy *dum)
+{
+	return container_of((void *) dum, struct usb_hcd, hcd_priv);
 }
 
 static inline struct device *dummy_dev (struct dummy *dum)
 {
-	return dum->hcd.self.controller;
+	return dummy_to_hcd(dum)->self.controller;
 }
 
 static inline struct dummy *ep_to_dummy (struct dummy_ep *ep)
@@ -237,7 +247,7 @@
 	dum = ep_to_dummy (ep);
 	if (!dum->driver || !is_enabled (dum))
 		return -ESHUTDOWN;
-	max = desc->wMaxPacketSize & 0x3ff;
+	max = le16_to_cpu(desc->wMaxPacketSize) & 0x3ff;
 
 	/* drivers must not request bad settings, since lower levels
 	 * (hardware or its drivers) may not check.  some endpoints
@@ -365,7 +375,7 @@
 	dum = ep_to_dummy (ep);
 
 	spin_lock_irqsave (&dum->lock, flags);
-	ep->desc = 0;
+	ep->desc = NULL;
 	retval = 0;
 	nuke (dum, ep);
 	spin_unlock_irqrestore (&dum->lock, flags);
@@ -381,12 +391,12 @@
 	struct dummy_request	*req;
 
 	if (!_ep)
-		return 0;
+		return NULL;
 	ep = usb_ep_to_dummy_ep (_ep);
 
 	req = kmalloc (sizeof *req, mem_flags);
 	if (!req)
-		return 0;
+		return NULL;
 	memset (req, 0, sizeof *req);
 	INIT_LIST_HEAD (&req->queue);
 	return &req->req;
@@ -422,7 +432,7 @@
 	dum = ep_to_dummy (ep);
 
 	if (!dum->driver)
-		return 0;
+		return NULL;
 	retval = kmalloc (bytes, mem_flags);
 	*dma = (dma_addr_t) retval;
 	return retval;
@@ -506,7 +516,7 @@
 	struct dummy		*dum;
 	int			retval = -EINVAL;
 	unsigned long		flags;
-	struct dummy_request	*req = 0;
+	struct dummy_request	*req = NULL;
 
 	if (!_ep || !_req)
 		return retval;
@@ -720,7 +730,7 @@
 		ep->ep.maxpacket = ~0;
 		ep->last_io = jiffies;
 		ep->gadget = &dum->gadget;
-		ep->desc = 0;
+		ep->desc = NULL;
 		INIT_LIST_HEAD (&ep->queue);
 	}
 
@@ -734,8 +744,8 @@
 	dev_dbg (dummy_dev(dum), "binding gadget driver '%s'\n",
 			driver->driver.name);
 	if ((retval = driver->bind (&dum->gadget)) != 0) {
-		dum->driver = 0;
-		dum->gadget.dev.driver = 0;
+		dum->driver = NULL;
+		dum->gadget.dev.driver = NULL;
 		return retval;
 	}
 
@@ -797,7 +807,7 @@
 	spin_unlock_irqrestore (&dum->lock, flags);
 
 	driver->unbind (&dum->gadget);
-	dum->driver = 0;
+	dum->driver = NULL;
 
 	device_release_driver (&dum->gadget.dev);
 
@@ -830,16 +840,23 @@
  */
 
 static int dummy_urb_enqueue (
-	struct usb_hcd	*hcd,
-	struct urb	*urb,
-	int		mem_flags
+	struct usb_hcd			*hcd,
+	struct usb_host_endpoint	*ep,
+	struct urb			*urb,
+	int				mem_flags
 ) {
 	struct dummy	*dum;
+	struct urbp	*urbp;
 	unsigned long	flags;
 
 	if (!urb->transfer_buffer && urb->transfer_buffer_length)
 		return -EINVAL;
 
+	urbp = kmalloc (sizeof *urbp, mem_flags);
+	if (!urbp)
+		return -ENOMEM;
+	urbp->urb = urb;
+
 	dum = hcd_to_dummy (hcd);
 	spin_lock_irqsave (&dum->lock, flags);
 
@@ -849,7 +866,8 @@
 	} else if (unlikely (dum->udev != urb->dev))
 		dev_err (dummy_dev(dum), "usb_device address has changed!\n");
 
-	urb->hcpriv = dum;
+	list_add_tail (&urbp->urbp_list, &dum->urbp_list);
+	urb->hcpriv = urbp;
 	if (usb_pipetype (urb->pipe) == PIPE_CONTROL)
 		urb->error_count = 1;		/* mark as a new urb */
 
@@ -1007,7 +1025,7 @@
 		int	tmp;
 
 		/* high bandwidth mode */
-		tmp = ep->desc->wMaxPacketSize;
+		tmp = le16_to_cpu(ep->desc->wMaxPacketSize);
 		tmp = le16_to_cpu (tmp);
 		tmp = (tmp >> 11) & 0x03;
 		tmp *= 8 /* applies to entire frame */;
@@ -1055,8 +1073,7 @@
 static void dummy_timer (unsigned long _dum)
 {
 	struct dummy		*dum = (struct dummy *) _dum;
-	struct hcd_dev		*hdev;
-	struct list_head	*entry, *tmp;
+	struct urbp		*urbp, *tmp;
 	unsigned long		flags;
 	int			limit, total;
 	int			i;
@@ -1088,7 +1105,6 @@
 		spin_unlock_irqrestore (&dum->lock, flags);
 		return;
 	}
-	hdev = dum->udev->hcpriv;
 
 	for (i = 0; i < DUMMY_ENDPOINTS; i++) {
 		if (!ep_name [i])
@@ -1097,14 +1113,14 @@
 	}
 
 restart:
-	list_for_each_safe (entry, tmp, &hdev->urb_list) {
+	list_for_each_entry_safe (urbp, tmp, &dum->urbp_list, urbp_list) {
 		struct urb		*urb;
 		struct dummy_request	*req;
 		u8			address;
-		struct dummy_ep		*ep = 0;
+		struct dummy_ep		*ep = NULL;
 		int			type;
 
-		urb = list_entry (entry, struct urb, urb_list);
+		urb = urbp->urb;
 		if (urb->status != -EINPROGRESS) {
 			/* likely it was just unlinked */
 			goto return_urb;
@@ -1349,19 +1365,21 @@
 			continue;
 
 return_urb:
-		urb->hcpriv = 0;
+		urb->hcpriv = NULL;
+		list_del (&urbp->urbp_list);
+		kfree (urbp);
 		if (ep)
 			ep->already_seen = ep->setup_stage = 0;
 
 		spin_unlock (&dum->lock);
-		usb_hcd_giveback_urb (&dum->hcd, urb, 0);
+		usb_hcd_giveback_urb (dummy_to_hcd(dum), urb, NULL);
 		spin_lock (&dum->lock);
 
 		goto restart;
 	}
 
 	/* want a 1 msec delay here */
-	if (!list_empty (&hdev->urb_list))
+	if (!list_empty (&dum->urbp_list))
 		mod_timer (&dum->timer, jiffies + msecs_to_jiffies(1));
 	else {
 		usb_put_dev (dum->udev);
@@ -1556,20 +1574,6 @@
 
 /*-------------------------------------------------------------------------*/
 
-static struct usb_hcd *dummy_alloc (void)
-{
-	struct dummy		*dum;
-
-	dum = kmalloc (sizeof *dum, SLAB_KERNEL);
-	if (dum == NULL)
-		return NULL;
-	the_controller = dum;
-	memset (dum, 0, sizeof *dum);
-	return &dum->hcd;
-}
-
-/*-------------------------------------------------------------------------*/
-
 static inline ssize_t
 show_urb (char *buf, size_t size, struct urb *urb)
 {
@@ -1601,21 +1605,17 @@
 {
 	struct usb_hcd		*hcd = dev_get_drvdata (dev);
 	struct dummy		*dum = hcd_to_dummy (hcd);
-	struct urb		*urb;
+	struct urbp		*urbp;
 	size_t			size = 0;
 	unsigned long		flags;
-	struct hcd_dev		*hdev;
 
 	spin_lock_irqsave (&dum->lock, flags);
-	if (dum->udev) {
-		hdev = dum->udev->hcpriv;
-		list_for_each_entry (urb, &hdev->urb_list, urb_list) {
-			size_t		temp;
-
-			temp = show_urb (buf, PAGE_SIZE - size, urb);
-			buf += temp;
-			size += temp;
-		}
+	list_for_each_entry (urbp, &dum->urbp_list, urbp_list) {
+		size_t		temp;
+
+		temp = show_urb (buf, PAGE_SIZE - size, urbp->urb);
+		buf += temp;
+		size += temp;
 	}
 	spin_unlock_irqrestore (&dum->lock, flags);
 
@@ -1642,7 +1642,9 @@
 	dum->timer.function = dummy_timer;
 	dum->timer.data = (unsigned long) dum;
 
-	root = usb_alloc_dev (0, &hcd->self, 0);
+	INIT_LIST_HEAD (&dum->urbp_list);
+
+	root = usb_alloc_dev (NULL, &hcd->self, 0);
 	if (!root)
 		return -ENOMEM;
 
@@ -1694,18 +1696,19 @@
 
 static int dummy_h_get_frame (struct usb_hcd *hcd)
 {
-	return dummy_g_get_frame (0);
+	return dummy_g_get_frame (NULL);
 }
 
 static const struct hc_driver dummy_hcd = {
 	.description =		(char *) driver_name,
+	.product_desc =		"Dummy host controller",
+	.hcd_priv_size =	sizeof(struct dummy),
+
 	.flags =		HCD_USB2,
 
 	.start =		dummy_start,
 	.stop =			dummy_stop,
 
-	.hcd_alloc = 		dummy_alloc,
-
 	.urb_enqueue = 		dummy_urb_enqueue,
 	.urb_dequeue = 		dummy_urb_dequeue,
 
@@ -1725,7 +1728,7 @@
 
 	dev_info (dev, "%s, driver " DRIVER_VERSION "\n", driver_desc);
 
-	hcd = dummy_alloc ();
+	hcd = usb_create_hcd (&dummy_hcd);
 	if (hcd == NULL) {
 		dev_dbg (dev, "hcd_alloc failed\n");
 		return -ENOMEM;
@@ -1733,9 +1736,8 @@
 
 	dev_set_drvdata (dev, hcd);
 	dum = hcd_to_dummy (hcd);
+	the_controller = dum;
 
-	hcd->driver = (struct hc_driver *) &dummy_hcd;
-	hcd->description = dummy_hcd.description;
 	hcd->self.controller = dev;
 
 	/* FIXME don't require the pci-based buffer/alloc impls;
@@ -1748,15 +1750,7 @@
 		goto err1;
 	}
 
-	usb_bus_init (&hcd->self);
-	hcd->self.op = &usb_hcd_operations;
-	hcd->self.release = &usb_hcd_release;
-	hcd->self.hcpriv = hcd;
 	hcd->self.bus_name = dev->bus_id;
-	hcd->product_desc = "Dummy host controller";
-
-	INIT_LIST_HEAD (&hcd->dev_list);
-
 	usb_register_bus (&hcd->self);
 
 	if ((retval = dummy_start (hcd)) < 0) 
@@ -1764,7 +1758,7 @@
 	return retval;
 
 err1:
-	kfree (hcd);
+	usb_put_hcd (hcd);
 	dev_set_drvdata (dev, NULL);
 	return retval;
 }
diff -Nru a/drivers/usb/gadget/epautoconf.c b/drivers/usb/gadget/epautoconf.c
--- a/drivers/usb/gadget/epautoconf.c	2005-01-10 20:11:24 -08:00
+++ b/drivers/usb/gadget/epautoconf.c	2005-01-10 20:11:24 -08:00
@@ -55,6 +55,9 @@
  *
  * Type suffixes are "-bulk", "-iso", or "-int".  Numbers are decimal.
  * Less common restrictions are implied by gadget_is_*().
+ *
+ * NOTE:  each endpoint is unidirectional, as specified by its USB
+ * descriptor; and isn't specific to a configuration or altsetting.
  */
 static int __init
 ep_matches (
diff -Nru a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c
--- a/drivers/usb/gadget/file_storage.c	2005-01-10 20:11:24 -08:00
+++ b/drivers/usb/gadget/file_storage.c	2005-01-10 20:11:24 -08:00
@@ -3132,7 +3132,7 @@
 	if ((rc = enable_endpoint(fsg, fsg->bulk_out, d)) != 0)
 		goto reset;
 	fsg->bulk_out_enabled = 1;
-	fsg->bulk_out_maxpacket = d->wMaxPacketSize;
+	fsg->bulk_out_maxpacket = le16_to_cpu(d->wMaxPacketSize);
 
 	if (transport_is_cbi()) {
 		d = ep_desc(fsg->gadget, &fs_intr_in_desc, &hs_intr_in_desc);
diff -Nru a/drivers/usb/gadget/inode.c b/drivers/usb/gadget/inode.c
--- a/drivers/usb/gadget/inode.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/usb/gadget/inode.c	2005-01-10 20:11:21 -08:00
@@ -2022,6 +2022,7 @@
 	sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
 	sb->s_magic = GADGETFS_MAGIC;
 	sb->s_op = &gadget_fs_operations;
+	sb->s_time_gran = 1;
 
 	/* root inode */
 	inode = gadgetfs_make_inode (sb,
diff -Nru a/drivers/usb/gadget/omap_udc.c b/drivers/usb/gadget/omap_udc.c
--- a/drivers/usb/gadget/omap_udc.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/usb/gadget/omap_udc.c	2005-01-10 20:11:17 -08:00
@@ -1,5 +1,5 @@
 /*
- * omap_udc.c -- for OMAP 1610 udc, with OTG support
+ * omap_udc.c -- for OMAP full speed udc; most chips support OTG.
  *
  * Copyright (C) 2004 Texas Instruments, Inc.
  * Copyright (C) 2004 David Brownell
diff -Nru a/drivers/usb/gadget/serial.c b/drivers/usb/gadget/serial.c
--- a/drivers/usb/gadget/serial.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/usb/gadget/serial.c	2005-01-10 20:11:21 -08:00
@@ -2322,11 +2322,11 @@
 					wake_up_interruptible(&port->port_tty->read_wait);
 					wake_up_interruptible(&port->port_tty->write_wait);
 				}
+				spin_unlock_irqrestore(&port->port_lock, flags);
 			} else {
 				kfree(port);
 			}
 
-			spin_unlock_irqrestore(&port->port_lock, flags);
 		}
 	}
 }
diff -Nru a/drivers/usb/host/ehci-dbg.c b/drivers/usb/host/ehci-dbg.c
--- a/drivers/usb/host/ehci-dbg.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/usb/host/ehci-dbg.c	2005-01-10 20:11:21 -08:00
@@ -19,13 +19,13 @@
 /* this file is part of ehci-hcd.c */
 
 #define ehci_dbg(ehci, fmt, args...) \
-	dev_dbg ((ehci)->hcd.self.controller , fmt , ## args )
+	dev_dbg (ehci_to_hcd(ehci)->self.controller , fmt , ## args )
 #define ehci_err(ehci, fmt, args...) \
-	dev_err ((ehci)->hcd.self.controller , fmt , ## args )
+	dev_err (ehci_to_hcd(ehci)->self.controller , fmt , ## args )
 #define ehci_info(ehci, fmt, args...) \
-	dev_info ((ehci)->hcd.self.controller , fmt , ## args )
+	dev_info (ehci_to_hcd(ehci)->self.controller , fmt , ## args )
 #define ehci_warn(ehci, fmt, args...) \
-	dev_warn ((ehci)->hcd.self.controller , fmt , ## args )
+	dev_warn (ehci_to_hcd(ehci)->self.controller , fmt , ## args )
 
 #ifdef EHCI_VERBOSE_DEBUG
 #	define vdbg dbg
@@ -657,7 +657,7 @@
 		"EHCI %x.%02x, hcd state %d\n",
 		hcd->self.controller->bus->name,
 		hcd->self.controller->bus_id,
-		i >> 8, i & 0x0ff, ehci->hcd.state);
+		i >> 8, i & 0x0ff, hcd->state);
 	size -= temp;
 	next += temp;
 
@@ -733,18 +733,22 @@
 }
 static CLASS_DEVICE_ATTR (registers, S_IRUGO, show_registers, NULL);
 
-static inline void create_debug_files (struct ehci_hcd *bus)
+static inline void create_debug_files (struct ehci_hcd *ehci)
 {
-	class_device_create_file(&bus->hcd.self.class_dev, &class_device_attr_async);
-	class_device_create_file(&bus->hcd.self.class_dev, &class_device_attr_periodic);
-	class_device_create_file(&bus->hcd.self.class_dev, &class_device_attr_registers);
+	struct class_device *cldev = &ehci_to_hcd(ehci)->self.class_dev;
+
+	class_device_create_file(cldev, &class_device_attr_async);
+	class_device_create_file(cldev, &class_device_attr_periodic);
+	class_device_create_file(cldev, &class_device_attr_registers);
 }
 
-static inline void remove_debug_files (struct ehci_hcd *bus)
+static inline void remove_debug_files (struct ehci_hcd *ehci)
 {
-	class_device_remove_file(&bus->hcd.self.class_dev, &class_device_attr_async);
-	class_device_remove_file(&bus->hcd.self.class_dev, &class_device_attr_periodic);
-	class_device_remove_file(&bus->hcd.self.class_dev, &class_device_attr_registers);
+	struct class_device *cldev = &ehci_to_hcd(ehci)->self.class_dev;
+
+	class_device_remove_file(cldev, &class_device_attr_async);
+	class_device_remove_file(cldev, &class_device_attr_periodic);
+	class_device_remove_file(cldev, &class_device_attr_registers);
 }
 
 #endif /* STUB_DEBUG_FILES */
diff -Nru a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
--- a/drivers/usb/host/ehci-hcd.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/usb/host/ehci-hcd.c	2005-01-10 20:11:20 -08:00
@@ -97,7 +97,7 @@
  * 2001-June	Works with usb-storage and NEC EHCI on 2.4
  */
 
-#define DRIVER_VERSION "26 Oct 2004"
+#define DRIVER_VERSION "10 Dec 2004"
 #define DRIVER_AUTHOR "David Brownell"
 #define DRIVER_DESC "USB 2.0 'Enhanced' Host Controller (EHCI) Driver"
 
@@ -124,11 +124,16 @@
 #define EHCI_ASYNC_JIFFIES	(HZ/20)		/* async idle timeout */
 #define EHCI_SHRINK_JIFFIES	(HZ/200)	/* async qh unlink delay */
 
-/* Initial IRQ latency:  lower than default */
+/* Initial IRQ latency:  faster than hw default */
 static int log2_irq_thresh = 0;		// 0 to 6
 module_param (log2_irq_thresh, int, S_IRUGO);
 MODULE_PARM_DESC (log2_irq_thresh, "log2 IRQ latency, 1-64 microframes");
 
+/* initial park setting:  slower than hw default */
+static unsigned park = 0;
+module_param (park, uint, S_IRUGO);
+MODULE_PARM_DESC (park, "park setting; 1-3 back-to-back async packets");
+
 #define	INTR_MASK (STS_IAA | STS_FATAL | STS_PCD | STS_ERR | STS_INT)
 
 /*-------------------------------------------------------------------------*/
@@ -194,7 +199,7 @@
 	command |= CMD_RESET;
 	dbg_cmd (ehci, "reset", command);
 	writel (command, &ehci->regs->command);
-	ehci->hcd.state = USB_STATE_HALT;
+	ehci_to_hcd(ehci)->state = USB_STATE_HALT;
 	ehci->next_statechange = jiffies;
 	return handshake (&ehci->regs->command, CMD_RESET, 0, 250 * 1000);
 }
@@ -205,7 +210,7 @@
 	u32	temp;
 
 #ifdef DEBUG
-	if (!HCD_IS_RUNNING (ehci->hcd.state))
+	if (!HCD_IS_RUNNING (ehci_to_hcd(ehci)->state))
 		BUG ();
 #endif
 
@@ -214,7 +219,7 @@
 	temp &= STS_ASS | STS_PSS;
 	if (handshake (&ehci->regs->status, STS_ASS | STS_PSS,
 				temp, 16 * 125) != 0) {
-		ehci->hcd.state = USB_STATE_HALT;
+		ehci_to_hcd(ehci)->state = USB_STATE_HALT;
 		return;
 	}
 
@@ -226,7 +231,7 @@
 	/* hardware can take 16 microframes to turn off ... */
 	if (handshake (&ehci->regs->status, STS_ASS | STS_PSS,
 				0, 16 * 125) != 0) {
-		ehci->hcd.state = USB_STATE_HALT;
+		ehci_to_hcd(ehci)->state = USB_STATE_HALT;
 		return;
 	}
 }
@@ -280,7 +285,8 @@
 {
 	if (cap & (1 << 16)) {
 		int msec = 5000;
-		struct pci_dev *pdev = to_pci_dev(ehci->hcd.self.controller);
+		struct pci_dev *pdev =
+				to_pci_dev(ehci_to_hcd(ehci)->self.controller);
 
 		/* request handoff to OS */
 		cap |= 1 << 24;
@@ -338,7 +344,7 @@
 #ifdef	CONFIG_PCI
 	/* EHCI 0.96 and later may have "extended capabilities" */
 	if (hcd->self.controller->bus == &pci_bus_type) {
-		struct pci_dev	*pdev = to_pci_dev(ehci->hcd.self.controller);
+		struct pci_dev	*pdev = to_pci_dev(hcd->self.controller);
 
 		/* AMD8111 EHCI doesn't work, according to AMD errata */
 		if ((pdev->vendor == PCI_VENDOR_ID_AMD)
@@ -353,7 +359,7 @@
 	while (temp && count--) {
 		u32		cap;
 
-		pci_read_config_dword (to_pci_dev(ehci->hcd.self.controller),
+		pci_read_config_dword (to_pci_dev(hcd->self.controller),
 				temp, &cap);
 		ehci_dbg (ehci, "capability %04x at %02x\n", cap, temp);
 		switch (cap & 0xff) {
@@ -500,17 +506,30 @@
 		writel (0, &ehci->regs->segment);
 #if 0
 // this is deeply broken on almost all architectures
-		if (!pci_set_dma_mask (to_pci_dev(ehci->hcd.self.controller), 0xffffffffffffffffULL))
+		if (!pci_set_dma_mask (to_pci_dev(hcd->self.controller), 0xffffffffffffffffULL))
 			ehci_info (ehci, "enabled 64bit PCI DMA\n");
 #endif
 	}
 
 	/* clear interrupt enables, set irq latency */
-	temp = readl (&ehci->regs->command) & 0x0fff;
 	if (log2_irq_thresh < 0 || log2_irq_thresh > 6)
 		log2_irq_thresh = 0;
-	temp |= 1 << (16 + log2_irq_thresh);
-	// if hc can park (ehci >= 0.96), default is 3 packets per async QH 
+	temp = 1 << (16 + log2_irq_thresh);
+	if (HCC_CANPARK(hcc_params)) {
+		/* HW default park == 3, on hardware that supports it (like
+		 * NVidia and ALI silicon), maximizes throughput on the async
+		 * schedule by avoiding QH fetches between transfers.
+		 *
+		 * With fast usb storage devices and NForce2, "park" seems to
+		 * make problems:  throughput reduction (!), data errors...
+		 */
+		if (park) {
+			park = min (park, (unsigned) 3);
+			temp |= CMD_PARK;
+			temp |= park << 8;
+		}
+		ehci_info (ehci, "park %d\n", park);
+	}
 	if (HCC_PGM_FRAMELISTLEN (hcc_params)) {
 		/* periodic schedule size can be smaller than default */
 		temp &= ~(3 << 2);
@@ -522,7 +541,6 @@
 		default:	BUG ();
 		}
 	}
-	temp &= ~(CMD_IAAD | CMD_ASE | CMD_PSE),
 	// Philips, Intel, and maybe others need CMD_RUN before the
 	// root hub will detect new devices (why?); NEC doesn't
 	temp |= CMD_RUN;
@@ -553,7 +571,7 @@
 		register_reboot_notifier (&ehci->reboot_notifier);
 	}
 
-	ehci->hcd.state = USB_STATE_RUNNING;
+	hcd->state = USB_STATE_RUNNING;
 	writel (FLAG_CF, &ehci->regs->configured_flag);
 	readl (&ehci->regs->command);	/* unblock posted write */
 
@@ -610,7 +628,7 @@
 	del_timer_sync (&ehci->watchdog);
 
 	spin_lock_irq(&ehci->lock);
-	if (HCD_IS_RUNNING (ehci->hcd.state))
+	if (HCD_IS_RUNNING (hcd->state))
 		ehci_quiesce (ehci);
 
 	ehci_reset (ehci);
@@ -777,8 +795,9 @@
 	 * misplace IRQs, and should let us run completely without IRQs.
 	 * such lossage has been observed on both VT6202 and VT8235. 
 	 */
-	if (HCD_IS_RUNNING (ehci->hcd.state) && (ehci->async->qh_next.ptr != 0
-			|| ehci->periodic_sched != 0))
+	if (HCD_IS_RUNNING (ehci_to_hcd(ehci)->state) &&
+			(ehci->async->qh_next.ptr != 0 ||
+			 ehci->periodic_sched != 0))
 		timer_action (ehci, TIMER_IO_WATCHDOG);
 }
 
@@ -835,7 +854,7 @@
 	}
 
 	/* remote wakeup [4.3.1] */
-	if ((status & STS_PCD) && ehci->hcd.remote_wakeup) {
+	if ((status & STS_PCD) && hcd->remote_wakeup) {
 		unsigned	i = HCS_N_PORTS (ehci->hcs_params);
 
 		/* resume root hub? */
@@ -856,7 +875,7 @@
 			 * stop that signaling.
 			 */
 			ehci->reset_done [i] = jiffies + msecs_to_jiffies (20);
-			mod_timer (&ehci->hcd.rh_timer,
+			mod_timer (&hcd->rh_timer,
 					ehci->reset_done [i] + 1);
 			ehci_dbg (ehci, "port %d remote wakeup\n", i + 1);
 		}
@@ -864,13 +883,20 @@
 
 	/* PCI errors [4.15.2.4] */
 	if (unlikely ((status & STS_FATAL) != 0)) {
-		ehci_err (ehci, "fatal error\n");
+		/* bogus "fatal" IRQs appear on some chips... why?  */
+		status = readl (&ehci->regs->status);
+		dbg_cmd (ehci, "fatal", readl (&ehci->regs->command));
+		dbg_status (ehci, "fatal", status);
+		if (status & STS_HALT) {
+			ehci_err (ehci, "fatal error\n");
 dead:
-		ehci_reset (ehci);
-		/* generic layer kills/unlinks all urbs, then
-		 * uses ehci_stop to clean up the rest
-		 */
-		bh = 1;
+			ehci_reset (ehci);
+			writel (0, &ehci->regs->configured_flag);
+			/* generic layer kills/unlinks all urbs, then
+			 * uses ehci_stop to clean up the rest
+			 */
+			bh = 1;
+		}
 	}
 
 	if (bh)
@@ -895,6 +921,7 @@
  */
 static int ehci_urb_enqueue (
 	struct usb_hcd	*hcd,
+	struct usb_host_endpoint *ep,
 	struct urb	*urb,
 	int		mem_flags
 ) {
@@ -909,12 +936,12 @@
 	default:
 		if (!qh_urb_transaction (ehci, urb, &qtd_list, mem_flags))
 			return -ENOMEM;
-		return submit_async (ehci, urb, &qtd_list, mem_flags);
+		return submit_async (ehci, ep, urb, &qtd_list, mem_flags);
 
 	case PIPE_INTERRUPT:
 		if (!qh_urb_transaction (ehci, urb, &qtd_list, mem_flags))
 			return -ENOMEM;
-		return intr_submit (ehci, urb, &qtd_list, mem_flags);
+		return intr_submit (ehci, ep, urb, &qtd_list, mem_flags);
 
 	case PIPE_ISOCHRONOUS:
 		if (urb->dev->speed == USB_SPEED_HIGH)
@@ -929,7 +956,7 @@
 	/* if we need to use IAA and it's busy, defer */
 	if (qh->qh_state == QH_STATE_LINKED
 			&& ehci->reclaim
-			&& HCD_IS_RUNNING (ehci->hcd.state)) {
+			&& HCD_IS_RUNNING (ehci_to_hcd(ehci)->state)) {
 		struct ehci_qh		*last;
 
 		for (last = ehci->reclaim;
@@ -940,7 +967,7 @@
 		last->reclaim = qh;
 
 	/* bypass IAA if the hc can't care */
-	} else if (!HCD_IS_RUNNING (ehci->hcd.state) && ehci->reclaim)
+	} else if (!HCD_IS_RUNNING (ehci_to_hcd(ehci)->state) && ehci->reclaim)
 		end_unlink_async (ehci, NULL);
 
 	/* something else might have unlinked the qh by now */
@@ -973,16 +1000,22 @@
 		qh = (struct ehci_qh *) urb->hcpriv;
 		if (!qh)
 			break;
-		if (qh->qh_state == QH_STATE_LINKED) {
-			/* messy, can spin or block a microframe ... */
-			intr_deschedule (ehci, qh, 1);
-			/* qh_state == IDLE */
+		switch (qh->qh_state) {
+		case QH_STATE_LINKED:
+			intr_deschedule (ehci, qh);
+			/* FALL THROUGH */
+		case QH_STATE_IDLE:
+			qh_completions (ehci, qh, NULL);
+			break;
+		default:
+			ehci_dbg (ehci, "bogus qh %p state %d\n",
+					qh, qh->qh_state);
+			goto done;
 		}
-		qh_completions (ehci, qh, NULL);
 
 		/* reschedule QH iff another request is queued */
 		if (!list_empty (&qh->qtd_list)
-				&& HCD_IS_RUNNING (ehci->hcd.state)) {
+				&& HCD_IS_RUNNING (hcd->state)) {
 			int status;
 
 			status = qh_schedule (ehci, qh);
@@ -1005,6 +1038,7 @@
 		// completion irqs can wait up to 1024 msec,
 		break;
 	}
+done:
 	spin_unlock_irqrestore (&ehci->lock, flags);
 	return 0;
 }
@@ -1014,23 +1048,18 @@
 // bulk qh holds the data toggle
 
 static void
-ehci_endpoint_disable (struct usb_hcd *hcd, struct hcd_dev *dev, int ep)
+ehci_endpoint_disable (struct usb_hcd *hcd, struct usb_host_endpoint *ep)
 {
 	struct ehci_hcd		*ehci = hcd_to_ehci (hcd);
-	int			epnum;
 	unsigned long		flags;
 	struct ehci_qh		*qh, *tmp;
 
 	/* ASSERT:  any requests/urbs are being unlinked */
 	/* ASSERT:  nobody can be submitting urbs for this any more */
 
-	epnum = ep & USB_ENDPOINT_NUMBER_MASK;
-	if (epnum != 0 && (ep & USB_DIR_IN))
-		epnum |= 0x10;
-
 rescan:
 	spin_lock_irqsave (&ehci->lock, flags);
-	qh = (struct ehci_qh *) dev->ep [epnum];
+	qh = ep->hcpriv;
 	if (!qh)
 		goto done;
 
@@ -1042,7 +1071,7 @@
 		goto idle_timeout;
 	}
 
-	if (!HCD_IS_RUNNING (ehci->hcd.state))
+	if (!HCD_IS_RUNNING (hcd->state))
 		qh->qh_state = QH_STATE_IDLE;
 	switch (qh->qh_state) {
 	case QH_STATE_LINKED:
@@ -1072,12 +1101,12 @@
 		/* caller was supposed to have unlinked any requests;
 		 * that's not our job.  just leak this memory.
 		 */
-		ehci_err (ehci, "qh %p (#%d) state %d%s\n",
-			qh, epnum, qh->qh_state,
+		ehci_err (ehci, "qh %p (#%02x) state %d%s\n",
+			qh, ep->desc.bEndpointAddress, qh->qh_state,
 			list_empty (&qh->qtd_list) ? "" : "(has tds)");
 		break;
 	}
-	dev->ep[epnum] = NULL;
+	ep->hcpriv = NULL;
 done:
 	spin_unlock_irqrestore (&ehci->lock, flags);
 	return;
@@ -1087,6 +1116,8 @@
 
 static const struct hc_driver ehci_driver = {
 	.description =		hcd_name,
+	.product_desc =		"EHCI Host Controller",
+	.hcd_priv_size =	sizeof(struct ehci_hcd),
 
 	/*
 	 * generic hardware linkage
@@ -1104,11 +1135,6 @@
 	.resume =		ehci_resume,
 #endif
 	.stop =			ehci_stop,
-
-	/*
-	 * memory lifecycle (except per-request)
-	 */
-	.hcd_alloc =		ehci_hcd_alloc,
 
 	/*
 	 * managing i/o requests and associated device resources
diff -Nru a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c
--- a/drivers/usb/host/ehci-hub.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/usb/host/ehci-hub.c	2005-01-10 20:11:22 -08:00
@@ -44,7 +44,7 @@
 	/* stop schedules, clean any completed work */
 	if (HCD_IS_RUNNING(hcd->state)) {
 		ehci_quiesce (ehci);
-		ehci->hcd.state = USB_STATE_QUIESCING;
+		hcd->state = USB_STATE_QUIESCING;
 	}
 	ehci->command = readl (&ehci->regs->command);
 	if (ehci->reclaim)
@@ -59,7 +59,7 @@
 
 		if ((t1 & PORT_PE) && !(t1 & PORT_OWNER))
 			t2 |= PORT_SUSPEND;
-		if (ehci->hcd.remote_wakeup)
+		if (hcd->remote_wakeup)
 			t2 |= PORT_WKOC_E|PORT_WKDISC_E|PORT_WKCONN_E;
 		else
 			t2 &= ~(PORT_WKOC_E|PORT_WKDISC_E|PORT_WKCONN_E);
@@ -73,7 +73,7 @@
 
 	/* turn off now-idle HC */
 	ehci_halt (ehci);
-	ehci->hcd.state = HCD_STATE_SUSPENDED;
+	hcd->state = HCD_STATE_SUSPENDED;
 
 	ehci->next_statechange = jiffies + msecs_to_jiffies(10);
 	spin_unlock_irq (&ehci->lock);
@@ -145,7 +145,7 @@
 	}
 
 	ehci->next_statechange = jiffies + msecs_to_jiffies(5);
-	ehci->hcd.state = USB_STATE_RUNNING;
+	hcd->state = USB_STATE_RUNNING;
 
 	/* Now we can safely re-enable irqs */
 	if (intr_enable)
@@ -212,7 +212,7 @@
 	unsigned long	flags;
 
 	/* if !USB_SUSPEND, root hub timers won't get shut down ... */
-	if (!HCD_IS_RUNNING(ehci->hcd.state))
+	if (!HCD_IS_RUNNING(hcd->state))
 		return 0;
 
 	/* init status to no-changes */
@@ -499,7 +499,7 @@
 			if ((temp & PORT_PE) == 0
 					|| (temp & PORT_RESET) != 0)
 				goto error;
-			if (ehci->hcd.remote_wakeup)
+			if (hcd->remote_wakeup)
 				temp |= PORT_WAKE_BITS;
 			writel (temp | PORT_SUSPEND,
 				&ehci->regs->port_status [wIndex]);
diff -Nru a/drivers/usb/host/ehci-mem.c b/drivers/usb/host/ehci-mem.c
--- a/drivers/usb/host/ehci-mem.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/usb/host/ehci-mem.c	2005-01-10 20:11:22 -08:00
@@ -32,25 +32,6 @@
  */
 
 /*-------------------------------------------------------------------------*/
-/* 
- * Allocator / cleanup for the per device structure
- * Called by hcd init / removal code
- */
-static struct usb_hcd *ehci_hcd_alloc (void)
-{
-	struct ehci_hcd *ehci;
-
-	ehci = (struct ehci_hcd *)
-		kmalloc (sizeof (struct ehci_hcd), GFP_KERNEL);
-	if (ehci != 0) {
-		memset (ehci, 0, sizeof (struct ehci_hcd));
-		ehci->hcd.product_desc = "EHCI Host Controller";
-		return &ehci->hcd;
-	}
-	return NULL;
-}
-
-/*-------------------------------------------------------------------------*/
 
 /* Allocate the key transfer structures from the previously allocated pool */
 
@@ -169,7 +150,7 @@
 	ehci->sitd_pool = NULL;
 
 	if (ehci->periodic)
-		dma_free_coherent (ehci->hcd.self.controller,
+		dma_free_coherent (ehci_to_hcd(ehci)->self.controller,
 			ehci->periodic_size * sizeof (u32),
 			ehci->periodic, ehci->periodic_dma);
 	ehci->periodic = NULL;
@@ -187,7 +168,7 @@
 
 	/* QTDs for control/bulk/intr transfers */
 	ehci->qtd_pool = dma_pool_create ("ehci_qtd", 
-			ehci->hcd.self.controller,
+			ehci_to_hcd(ehci)->self.controller,
 			sizeof (struct ehci_qtd),
 			32 /* byte alignment (for hw parts) */,
 			4096 /* can't cross 4K */);
@@ -197,7 +178,7 @@
 
 	/* QHs for control/bulk/intr transfers */
 	ehci->qh_pool = dma_pool_create ("ehci_qh", 
-			ehci->hcd.self.controller,
+			ehci_to_hcd(ehci)->self.controller,
 			sizeof (struct ehci_qh),
 			32 /* byte alignment (for hw parts) */,
 			4096 /* can't cross 4K */);
@@ -211,7 +192,7 @@
 
 	/* ITD for high speed ISO transfers */
 	ehci->itd_pool = dma_pool_create ("ehci_itd", 
-			ehci->hcd.self.controller,
+			ehci_to_hcd(ehci)->self.controller,
 			sizeof (struct ehci_itd),
 			32 /* byte alignment (for hw parts) */,
 			4096 /* can't cross 4K */);
@@ -221,7 +202,7 @@
 
 	/* SITD for full/low speed split ISO transfers */
 	ehci->sitd_pool = dma_pool_create ("ehci_sitd", 
-			ehci->hcd.self.controller,
+			ehci_to_hcd(ehci)->self.controller,
 			sizeof (struct ehci_sitd),
 			32 /* byte alignment (for hw parts) */,
 			4096 /* can't cross 4K */);
@@ -231,7 +212,7 @@
 
 	/* Hardware periodic table */
 	ehci->periodic = (__le32 *)
-		dma_alloc_coherent (ehci->hcd.self.controller,
+		dma_alloc_coherent (ehci_to_hcd(ehci)->self.controller,
 			ehci->periodic_size * sizeof(__le32),
 			&ehci->periodic_dma, 0);
 	if (ehci->periodic == 0) {
diff -Nru a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c
--- a/drivers/usb/host/ehci-q.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/usb/host/ehci-q.c	2005-01-10 20:11:21 -08:00
@@ -200,7 +200,7 @@
 					|| QTD_CERR(token) == 0)
 				&& (!ehci_is_ARC(ehci)
                 	                || urb->dev->tt->hub !=
-						ehci->hcd.self.root_hub)) {
+					   ehci_to_hcd(ehci)->self.root_hub)) {
 #ifdef DEBUG
 			struct usb_device *tt = urb->dev->tt->hub;
 			dev_dbg (&tt->dev,
@@ -225,7 +225,7 @@
 		if ((qh->hw_info2 & __constant_cpu_to_le32 (0x00ff)) != 0) {
 
 			/* ... update hc-wide periodic stats (for usbfs) */
-			hcd_to_bus (&ehci->hcd)->bandwidth_int_reqs--;
+			ehci_to_hcd(ehci)->self.bandwidth_int_reqs--;
 		}
 		qh_put (qh);
 	}
@@ -262,14 +262,13 @@
 
 	/* complete() can reenter this HCD */
 	spin_unlock (&ehci->lock);
-	usb_hcd_giveback_urb (&ehci->hcd, urb, regs);
+	usb_hcd_giveback_urb (ehci_to_hcd(ehci), urb, regs);
 	spin_lock (&ehci->lock);
 }
 
 static void start_unlink_async (struct ehci_hcd *ehci, struct ehci_qh *qh);
 
-static void intr_deschedule (struct ehci_hcd *ehci,
-				struct ehci_qh *qh, int wait);
+static void intr_deschedule (struct ehci_hcd *ehci, struct ehci_qh *qh);
 static int qh_schedule (struct ehci_hcd *ehci, struct ehci_qh *qh);
 
 /*
@@ -348,13 +347,13 @@
 
 		/* stop scanning when we reach qtds the hc is using */
 		} else if (likely (!stopped
-				&& HCD_IS_RUNNING (ehci->hcd.state))) {
+				&& HCD_IS_RUNNING (ehci_to_hcd(ehci)->state))) {
 			break;
 
 		} else {
 			stopped = 1;
 
-			if (unlikely (!HCD_IS_RUNNING (ehci->hcd.state)))
+			if (unlikely (!HCD_IS_RUNNING (ehci_to_hcd(ehci)->state)))
 				urb->status = -ESHUTDOWN;
 
 			/* ignore active urbs unless some previous qtd
@@ -428,7 +427,7 @@
 			 * except maybe high bandwidth ...
 			 */
 			if (qh->period) {
-				intr_deschedule (ehci, qh, 1);
+				intr_deschedule (ehci, qh);
 				(void) qh_schedule (ehci, qh);
 			} else
 				start_unlink_async (ehci, qh);
@@ -664,9 +663,12 @@
 			qh->c_usecs = 0;
 			qh->gap_uf = 0;
 
-			/* FIXME handle HS periods of less than 1 frame. */
 			qh->period = urb->interval >> 3;
-			if (qh->period < 1) {
+			if (qh->period == 0 && urb->interval != 1) {
+				/* NOTE interval 2 or 4 uframes could work.
+				 * But interval 1 scheduling is simpler, and
+				 * includes high bandwidth.
+				 */
 				dbg ("intr period %d uframes, NYET!",
 						urb->interval);
 				goto done;
@@ -715,7 +717,8 @@
 		 * root hub tt, leave it zeroed.
 		 */
 		if (!ehci_is_ARC(ehci)
-				|| urb->dev->tt->hub != ehci->hcd.self.root_hub)
+				|| urb->dev->tt->hub !=
+					ehci_to_hcd(ehci)->self.root_hub)
 			info2 |= urb->dev->tt->hub->devnum << 16;
 
 		/* NOTE:  if (PIPE_INTERRUPT) { scheduler sets c-mask } */
@@ -776,7 +779,7 @@
 			(void) handshake (&ehci->regs->status, STS_ASS, 0, 150);
 			cmd |= CMD_ASE | CMD_RUN;
 			writel (cmd, &ehci->regs->command);
-			ehci->hcd.state = USB_STATE_RUNNING;
+			ehci_to_hcd(ehci)->state = USB_STATE_RUNNING;
 			/* posted write need not be known to HC yet ... */
 		}
 	}
@@ -832,26 +835,8 @@
 			qtd = list_entry (qtd_list->next, struct ehci_qtd,
 					qtd_list);
 
-		/* control qh may need patching after enumeration */
+		/* control qh may need patching ... */
 		if (unlikely (epnum == 0)) {
-			/* set_address changes the address */
-			if ((qh->hw_info1 & QH_ADDR_MASK) == 0)
-				qh->hw_info1 |= cpu_to_le32 (
-						usb_pipedevice (urb->pipe));
-
-			/* for full speed, ep0 maxpacket can grow */
-			else if (!(qh->hw_info1
-					& __constant_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);
-				}
-			}
 
                         /* usb_reset_device() briefly reverts to address 0 */
                         if (usb_pipedevice (urb->pipe) == 0)
@@ -908,33 +893,30 @@
 static int
 submit_async (
 	struct ehci_hcd		*ehci,
+	struct usb_host_endpoint *ep,
 	struct urb		*urb,
 	struct list_head	*qtd_list,
 	int			mem_flags
 ) {
 	struct ehci_qtd		*qtd;
-	struct hcd_dev		*dev;
 	int			epnum;
 	unsigned long		flags;
 	struct ehci_qh		*qh = NULL;
 
 	qtd = list_entry (qtd_list->next, struct ehci_qtd, qtd_list);
-	dev = (struct hcd_dev *)urb->dev->hcpriv;
-	epnum = usb_pipeendpoint (urb->pipe);
-	if (usb_pipein (urb->pipe) && !usb_pipecontrol (urb->pipe))
-		epnum |= 0x10;
+	epnum = ep->desc.bEndpointAddress;
 
 #ifdef EHCI_URB_TRACE
 	ehci_dbg (ehci,
 		"%s %s urb %p ep%d%s len %d, qtd %p [qh %p]\n",
 		__FUNCTION__, urb->dev->devpath, urb,
-		epnum & 0x0f, usb_pipein (urb->pipe) ? "in" : "out",
+		epnum & 0x0f, (epnum & USB_DIR_IN) ? "in" : "out",
 		urb->transfer_buffer_length,
-		qtd, dev ? dev->ep [epnum] : (void *)~0);
+		qtd, ep->hcpriv);
 #endif
 
 	spin_lock_irqsave (&ehci->lock, flags);
-	qh = qh_append_tds (ehci, urb, qtd_list, epnum, &dev->ep [epnum]);
+	qh = qh_append_tds (ehci, urb, qtd_list, epnum, &ep->hcpriv);
 
 	/* Control/bulk operations through TTs don't need scheduling,
 	 * the HC and TT handle it when the TT has a buffer ready.
@@ -976,7 +958,7 @@
 	qh_completions (ehci, qh, regs);
 
 	if (!list_empty (&qh->qtd_list)
-			&& HCD_IS_RUNNING (ehci->hcd.state))
+			&& HCD_IS_RUNNING (ehci_to_hcd(ehci)->state))
 		qh_link_async (ehci, qh);
 	else {
 		qh_put (qh);		// refcount from async list
@@ -984,7 +966,7 @@
 		/* it's not free to turn the async schedule on/off; leave it
 		 * active but idle for a while once it empties.
 		 */
-		if (HCD_IS_RUNNING (ehci->hcd.state)
+		if (HCD_IS_RUNNING (ehci_to_hcd(ehci)->state)
 				&& ehci->async->qh_next.qh == 0)
 			timer_action (ehci, TIMER_ASYNC_OFF);
 	}
@@ -1018,7 +1000,7 @@
 	/* stop async schedule right now? */
 	if (unlikely (qh == ehci->async)) {
 		/* can't get here without STS_ASS set */
-		if (ehci->hcd.state != USB_STATE_HALT) {
+		if (ehci_to_hcd(ehci)->state != USB_STATE_HALT) {
 			writel (cmd & ~CMD_ASE, &ehci->regs->command);
 			wmb ();
 			// handshake later, if we need to
@@ -1038,7 +1020,7 @@
 	prev->qh_next = qh->qh_next;
 	wmb ();
 
-	if (unlikely (ehci->hcd.state == USB_STATE_HALT)) {
+	if (unlikely (ehci_to_hcd(ehci)->state == USB_STATE_HALT)) {
 		/* if (unlikely (qh->reclaim != 0))
 		 * 	this will recurse, probably not much
 		 */
diff -Nru a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c
--- a/drivers/usb/host/ehci-sched.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/usb/host/ehci-sched.c	2005-01-10 20:11:17 -08:00
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001-2003 by David Brownell
+ * Copyright (c) 2001-2004 by David Brownell
  * Copyright (c) 2003 Michal Sojka, for high-speed iso transfers
  * 
  * This program is free software; you can redistribute it and/or modify it
@@ -59,39 +59,28 @@
 	}
 }
 
-/* returns true after successful unlink */
 /* caller must hold ehci->lock */
-static int periodic_unlink (struct ehci_hcd *ehci, unsigned frame, void *ptr)
+static void periodic_unlink (struct ehci_hcd *ehci, unsigned frame, void *ptr)
 {
 	union ehci_shadow	*prev_p = &ehci->pshadow [frame];
 	__le32			*hw_p = &ehci->periodic [frame];
 	union ehci_shadow	here = *prev_p;
-	union ehci_shadow	*next_p;
 
 	/* find predecessor of "ptr"; hw and shadow lists are in sync */
 	while (here.ptr && here.ptr != ptr) {
 		prev_p = periodic_next_shadow (prev_p, Q_NEXT_TYPE (*hw_p));
-		hw_p = &here.qh->hw_next;
+		hw_p = here.hw_next;
 		here = *prev_p;
 	}
 	/* an interrupt entry (at list end) could have been shared */
-	if (!here.ptr) {
-		dbg ("entry %p no longer on frame [%d]", ptr, frame);
-		return 0;
-	}
-	// vdbg ("periodic unlink %p from frame %d", ptr, frame);
+	if (!here.ptr)
+		return;
 
-	/* update hardware list ... HC may still know the old structure, so
-	 * don't change hw_next until it'll have purged its cache
+	/* update shadow and hardware lists ... the old "next" pointers
+	 * from ptr may still be in use, the caller updates them.
 	 */
-	next_p = periodic_next_shadow (&here, Q_NEXT_TYPE (*hw_p));
-	*hw_p = here.qh->hw_next;
-
-	/* unlink from shadow list; HCD won't see old structure again */
-	*prev_p = *next_p;
-	next_p->ptr = NULL;
-
-	return 1;
+	*prev_p = *periodic_next_shadow (&here, Q_NEXT_TYPE (*hw_p));
+	*hw_p = *here.hw_next;
 }
 
 /* how many of the uframe's 125 usecs are allocated? */
@@ -114,7 +103,8 @@
 			hw_p = &q->qh->hw_next;
 			q = &q->qh->qh_next;
 			break;
-		case Q_TYPE_FSTN:
+		// case Q_TYPE_FSTN:
+		default:
 			/* for "save place" FSTNs, count the relevant INTR
 			 * bandwidth from the previous frame
 			 */
@@ -149,13 +139,11 @@
 			hw_p = &q->sitd->hw_next;
 			q = &q->sitd->sitd_next;
 			break;
-		default:
-			BUG ();
 		}
 	}
 #ifdef	DEBUG
 	if (usecs > 100)
-		err ("overallocated uframe %d, periodic is %d usecs",
+		ehci_err (ehci, "uframe %d sched overrun: %d usecs\n",
 			frame * 8 + uframe, usecs);
 #endif
 	return usecs;
@@ -261,14 +249,14 @@
 	 */
 	status = handshake (&ehci->regs->status, STS_PSS, 0, 9 * 125);
 	if (status != 0) {
-		ehci->hcd.state = USB_STATE_HALT;
+		ehci_to_hcd(ehci)->state = USB_STATE_HALT;
 		return status;
 	}
 
 	cmd = readl (&ehci->regs->command) | CMD_PSE;
 	writel (cmd, &ehci->regs->command);
 	/* posted write ... PSS happens later */
-	ehci->hcd.state = USB_STATE_RUNNING;
+	ehci_to_hcd(ehci)->state = USB_STATE_RUNNING;
 
 	/* make sure ehci_work scans these */
 	ehci->next_uframe = readl (&ehci->regs->frame_index)
@@ -286,7 +274,7 @@
 	 */
 	status = handshake (&ehci->regs->status, STS_PSS, STS_PSS, 9 * 125);
 	if (status != 0) {
-		ehci->hcd.state = USB_STATE_HALT;
+		ehci_to_hcd(ehci)->state = USB_STATE_HALT;
 		return status;
 	}
 
@@ -300,64 +288,143 @@
 
 /*-------------------------------------------------------------------------*/
 
-// FIXME microframe periods not yet handled
+/* periodic schedule slots have iso tds (normal or split) first, then a
+ * sparse tree for active interrupt transfers.
+ *
+ * this just links in a qh; caller guarantees uframe masks are set right.
+ * no FSTN support (yet; ehci 0.96+)
+ */
+static int qh_link_periodic (struct ehci_hcd *ehci, struct ehci_qh *qh)
+{
+	unsigned	i;
+	unsigned	period = qh->period;
 
-static void intr_deschedule (
-	struct ehci_hcd	*ehci,
-	struct ehci_qh	*qh,
-	int		wait
-) {
-	int		status;
-	unsigned	frame = qh->start;
+	dev_dbg (&qh->dev->dev,
+		"link qh%d-%04x/%p start %d [%d/%d us]\n",
+		period, le32_to_cpup (&qh->hw_info2) & 0xffff,
+		qh, qh->start, qh->usecs, qh->c_usecs);
+
+	/* high bandwidth, or otherwise every microframe */
+	if (period == 0)
+		period = 1;
+
+	for (i = qh->start; i < ehci->periodic_size; i += period) {
+		union ehci_shadow	*prev = &ehci->pshadow [i];
+		u32			*hw_p = &ehci->periodic [i];
+		union ehci_shadow	here = *prev;
+		u32			type = 0;
 
-	do {
-		periodic_unlink (ehci, frame, qh);
-		qh_put (qh);
-		frame += qh->period;
-	} while (frame < ehci->periodic_size);
+		/* skip the iso nodes at list head */
+		while (here.ptr) {
+			type = Q_NEXT_TYPE (*hw_p);
+			if (type == Q_TYPE_QH)
+				break;
+			prev = periodic_next_shadow (prev, type);
+			hw_p = &here.qh->hw_next;
+			here = *prev;
+		}
+
+		/* sorting each branch by period (slow-->fast)
+		 * enables sharing interior tree nodes
+		 */
+		while (here.ptr && qh != here.qh) {
+			if (qh->period > here.qh->period)
+				break;
+			prev = &here.qh->qh_next;
+			hw_p = &here.qh->hw_next;
+			here = *prev;
+		}
+		/* link in this qh, unless some earlier pass did that */
+		if (qh != here.qh) {
+			qh->qh_next = here;
+			if (here.qh)
+				qh->hw_next = *hw_p;
+			wmb ();
+			prev->qh = qh;
+			*hw_p = QH_NEXT (qh->qh_dma);
+		}
+	}
+	qh->qh_state = QH_STATE_LINKED;
+	qh_get (qh);
+
+	/* update per-qh bandwidth for usbfs */
+	ehci_to_hcd(ehci)->self.bandwidth_allocated += qh->period
+		? ((qh->usecs + qh->c_usecs) / qh->period)
+		: (qh->usecs * 8);
 
+	/* maybe enable periodic schedule processing */
+	if (!ehci->periodic_sched++)
+		return enable_periodic (ehci);
+
+	return 0;
+}
+
+static void qh_unlink_periodic (struct ehci_hcd *ehci, struct ehci_qh *qh)
+{
+	unsigned	i;
+	unsigned	period;
+
+	// FIXME:
+	// IF this isn't high speed
+	//   and this qh is active in the current uframe
+	//   (and overlay token SplitXstate is false?)
+	// THEN
+	//   qh->hw_info1 |= __constant_cpu_to_le32 (1 << 7 /* "ignore" */);
+
+	/* high bandwidth, or otherwise part of every microframe */
+	if ((period = qh->period) == 0)
+		period = 1;
+
+	for (i = qh->start; i < ehci->periodic_size; i += period)
+		periodic_unlink (ehci, i, qh);
+
+	/* update per-qh bandwidth for usbfs */
+	ehci_to_hcd(ehci)->self.bandwidth_allocated -= qh->period
+		? ((qh->usecs + qh->c_usecs) / qh->period)
+		: (qh->usecs * 8);
+
+	dev_dbg (&qh->dev->dev,
+		"unlink qh%d-%04x/%p start %d [%d/%d us]\n",
+		qh->period, le32_to_cpup (&qh->hw_info2) & 0xffff,
+		qh, qh->start, qh->usecs, qh->c_usecs);
+
+	/* qh->qh_next still "live" to HC */
 	qh->qh_state = QH_STATE_UNLINK;
 	qh->qh_next.ptr = NULL;
-	ehci->periodic_sched--;
+	qh_put (qh);
 
 	/* maybe turn off periodic schedule */
+	ehci->periodic_sched--;
 	if (!ehci->periodic_sched)
-		status = disable_periodic (ehci);
-	else {
-		status = 0;
-		ehci_vdbg (ehci, "periodic schedule still enabled\n");
-	}
+		(void) disable_periodic (ehci);
+}
 
-	/*
-	 * If the hc may be looking at this qh, then delay a uframe
-	 * (yeech!) to be sure it's done.
-	 * No other threads may be mucking with this qh.
+static void intr_deschedule (struct ehci_hcd *ehci, struct ehci_qh *qh)
+{
+	unsigned	wait;
+
+	qh_unlink_periodic (ehci, qh);
+
+	/* simple/paranoid:  always delay, expecting the HC needs to read
+	 * qh->hw_next or finish a writeback after SPLIT/CSPLIT ... and
+	 * expect khubd to clean up after any CSPLITs we won't issue.
+	 * active high speed queues may need bigger delays...
 	 */
-	if (((ehci_get_frame (&ehci->hcd) - frame) % qh->period) == 0) {
-		if (wait) {
-			udelay (125);
-			qh->hw_next = EHCI_LIST_END;
-		} else {
-			/* we may not be IDLE yet, but if the qh is empty
-			 * the race is very short.  then if qh also isn't
-			 * rescheduled soon, it won't matter.  otherwise...
-			 */
-			ehci_vdbg (ehci, "intr_deschedule...\n");
-		}
-	} else
-		qh->hw_next = EHCI_LIST_END;
+	if (list_empty (&qh->qtd_list)
+			|| (__constant_cpu_to_le32 (0x0ff << 8)
+					& qh->hw_info2) != 0)
+		wait = 2;
+	else
+		wait = 55;	/* worst case: 3 * 1024 */
 
+	udelay (wait);
 	qh->qh_state = QH_STATE_IDLE;
-
-	/* update per-qh bandwidth utilization (for usbfs) */
-	hcd_to_bus (&ehci->hcd)->bandwidth_allocated -= 
-		(qh->usecs + qh->c_usecs) / qh->period;
-
-	ehci_dbg (ehci, "descheduled qh%d/%p frame=%d count=%d, urbs=%d\n",
-		qh->period, qh, frame,
-		atomic_read (&qh->kref.refcount), ehci->periodic_sched);
+	qh->hw_next = EHCI_LIST_END;
+	wmb ();
 }
 
+/*-------------------------------------------------------------------------*/
+
 static int check_period (
 	struct ehci_hcd *ehci, 
 	unsigned	frame,
@@ -365,6 +432,8 @@
 	unsigned	period,
 	unsigned	usecs
 ) {
+	int		claimed;
+
 	/* complete split running into next frame?
 	 * given FSTN support, we could sometimes check...
 	 */
@@ -377,22 +446,26 @@
 	 */
 	usecs = 100 - usecs;
 
-	do {
-		int	claimed;
-
-// FIXME delete when intr_submit handles non-empty queues
-// this gives us a one intr/frame limit (vs N/uframe)
-// ... and also lets us avoid tracking split transactions
-// that might collide at a given TT/hub.
-		if (ehci->pshadow [frame].ptr)
-			return 0;
-
-		claimed = periodic_usecs (ehci, frame, uframe);
-		if (claimed > usecs)
-			return 0;
+	/* we "know" 2 and 4 uframe intervals were rejected; so
+	 * for period 0, check _every_ microframe in the schedule.
+	 */
+	if (unlikely (period == 0)) {
+		do {
+			for (uframe = 0; uframe < 7; uframe++) {
+				claimed = periodic_usecs (ehci, frame, uframe);
+				if (claimed > usecs)
+					return 0;
+			}
+		} while ((frame += 1) < ehci->periodic_size);
 
-// FIXME update to handle sub-frame periods
-	} while ((frame += period) < ehci->periodic_size);
+	/* just check the specified uframe, at that period */
+	} else {
+		do {
+			claimed = periodic_usecs (ehci, frame, uframe);
+			if (claimed > usecs)
+				return 0;
+		} while ((frame += period) < ehci->periodic_size);
+	}
 
 	// success!
 	return 1;
@@ -407,6 +480,10 @@
 )
 {
     	int		retval = -ENOSPC;
+	u8		mask;
+
+	if (qh->c_usecs && uframe >= 6)		/* FSTN territory? */
+		goto done;
 
 	if (!check_period (ehci, frame, uframe, qh->period, qh->usecs))
 		goto done;
@@ -416,33 +493,33 @@
 		goto done;
 	}
 
-	/* This is a split transaction; check the bandwidth available for
-	 * the completion too.  Check both worst and best case gaps: worst
-	 * case is SPLIT near uframe end, and CSPLIT near start ... best is
-	 * vice versa.  Difference can be almost two uframe times, but we
-	 * reserve unnecessary bandwidth (waste it) this way.  (Actually
-	 * even better cases exist, like immediate device NAK.)
-	 *
-	 * FIXME don't even bother unless we know this TT is idle in that
-	 * range of uframes ... for now, check_period() allows only one
-	 * interrupt transfer per frame, so needn't check "TT busy" status
-	 * when scheduling a split (QH, SITD, or FSTN).
-	 *
-	 * FIXME ehci 0.96 and above can use FSTNs
+	/* Make sure this tt's buffer is also available for CSPLITs.
+	 * We pessimize a bit; probably the typical full speed case
+	 * doesn't need the second CSPLIT.
+	 * 
+	 * NOTE:  both SPLIT and CSPLIT could be checked in just
+	 * one smart pass...
 	 */
-	if (!check_period (ehci, frame, uframe + qh->gap_uf + 1,
-				qh->period, qh->c_usecs))
-		goto done;
-	if (!check_period (ehci, frame, uframe + qh->gap_uf,
-				qh->period, qh->c_usecs))
-		goto done;
+	mask = 0x03 << (uframe + qh->gap_uf);
+	*c_maskp = cpu_to_le32 (mask << 8);
 
-	*c_maskp = cpu_to_le32 (0x03 << (8 + uframe + qh->gap_uf));
-	retval = 0;
+	mask |= 1 << uframe;
+	if (tt_no_collision (ehci, qh->period, qh->dev, frame, mask)) {
+		if (!check_period (ehci, frame, uframe + qh->gap_uf + 1,
+					qh->period, qh->c_usecs))
+			goto done;
+		if (!check_period (ehci, frame, uframe + qh->gap_uf,
+					qh->period, qh->c_usecs))
+			goto done;
+		retval = 0;
+	}
 done:
 	return retval;
 }
 
+/* "first fit" scheduling policy used the first time through,
+ * or when the previous schedule slot can't be re-used.
+ */
 static int qh_schedule (struct ehci_hcd *ehci, struct ehci_qh *qh)
 {
 	int 		status;
@@ -469,62 +546,46 @@
 	 * uframes have enough periodic bandwidth available.
 	 */
 	if (status) {
-		frame = qh->period - 1;
-		do {
-			for (uframe = 0; uframe < 8; uframe++) {
-				status = check_intr_schedule (ehci,
-						frame, uframe, qh,
-						&c_mask);
-				if (status == 0)
-					break;
-			}
-		} while (status && frame--);
+		/* "normal" case, uframing flexible except with splits */
+		if (qh->period) {
+			frame = qh->period - 1;
+			do {
+				for (uframe = 0; uframe < 8; uframe++) {
+					status = check_intr_schedule (ehci,
+							frame, uframe, qh,
+							&c_mask);
+					if (status == 0)
+						break;
+				}
+			} while (status && frame--);
+
+		/* qh->period == 0 means every uframe */
+		} else {
+			frame = 0;
+			status = check_intr_schedule (ehci, 0, 0, qh, &c_mask);
+		}
 		if (status)
 			goto done;
 		qh->start = frame;
 
 		/* reset S-frame and (maybe) C-frame masks */
-		qh->hw_info2 &= ~__constant_cpu_to_le32(0xffff);
-		qh->hw_info2 |= cpu_to_le32 (1 << uframe) | c_mask;
+		qh->hw_info2 &= __constant_cpu_to_le32 (~0xffff);
+		qh->hw_info2 |= qh->period
+			? cpu_to_le32 (1 << uframe)
+			: __constant_cpu_to_le32 (0xff);
+		qh->hw_info2 |= c_mask;
 	} else
 		ehci_dbg (ehci, "reused qh %p schedule\n", qh);
 
 	/* stuff into the periodic schedule */
-	qh->qh_state = QH_STATE_LINKED;
-	ehci_dbg(ehci,
-		"scheduled qh%d/%p usecs %d/%d starting %d.%d (gap %d)\n",
-		qh->period, qh, qh->usecs, qh->c_usecs,
-		frame, uframe, qh->gap_uf);
-	do {
-		if (unlikely (ehci->pshadow [frame].ptr != 0)) {
-
-// FIXME -- just link toward the end, before any qh with a shorter period,
-// AND accommodate it already having been linked here (after some other qh)
-// AS WELL AS updating the schedule checking logic
-
-			BUG ();
-		} else {
-			ehci->pshadow [frame].qh = qh_get (qh);
-			ehci->periodic [frame] =
-				QH_NEXT (qh->qh_dma);
-		}
-		wmb ();
-		frame += qh->period;
-	} while (frame < ehci->periodic_size);
-
-	/* update per-qh bandwidth for usbfs */
-	hcd_to_bus (&ehci->hcd)->bandwidth_allocated += 
-		(qh->usecs + qh->c_usecs) / qh->period;
-
-	/* maybe enable periodic schedule processing */
-	if (!ehci->periodic_sched++)
-		status = enable_periodic (ehci);
+ 	status = qh_link_periodic (ehci, qh);
 done:
 	return status;
 }
 
 static int intr_submit (
 	struct ehci_hcd		*ehci,
+	struct usb_host_endpoint *ep,
 	struct urb		*urb,
 	struct list_head	*qtd_list,
 	int			mem_flags
@@ -532,23 +593,17 @@
 	unsigned		epnum;
 	unsigned long		flags;
 	struct ehci_qh		*qh;
-	struct hcd_dev		*dev;
-	int			is_input;
 	int			status = 0;
 	struct list_head	empty;
 
 	/* get endpoint and transfer/schedule data */
-	epnum = usb_pipeendpoint (urb->pipe);
-	is_input = usb_pipein (urb->pipe);
-	if (is_input)
-		epnum |= 0x10;
+	epnum = ep->desc.bEndpointAddress;
 
 	spin_lock_irqsave (&ehci->lock, flags);
-	dev = (struct hcd_dev *)urb->dev->hcpriv;
 
 	/* get qh and force any scheduling errors */
 	INIT_LIST_HEAD (&empty);
-	qh = qh_append_tds (ehci, urb, &empty, epnum, &dev->ep [epnum]);
+	qh = qh_append_tds (ehci, urb, &empty, epnum, &ep->hcpriv);
 	if (qh == 0) {
 		status = -ENOMEM;
 		goto done;
@@ -559,11 +614,11 @@
 	}
 
 	/* then queue the urb's tds to the qh */
-	qh = qh_append_tds (ehci, urb, qtd_list, epnum, &dev->ep [epnum]);
+	qh = qh_append_tds (ehci, urb, qtd_list, epnum, &ep->hcpriv);
 	BUG_ON (qh == 0);
 
 	/* ... update usbfs periodic stats */
-	hcd_to_bus (&ehci->hcd)->bandwidth_int_reqs++;
+	ehci_to_hcd(ehci)->self.bandwidth_int_reqs++;
 
 done:
 	spin_unlock_irqrestore (&ehci->lock, flags);
@@ -614,11 +669,10 @@
 	 */
 	epnum = usb_pipeendpoint (pipe);
 	is_input = usb_pipein (pipe) ? USB_DIR_IN : 0;
+	maxp = usb_maxpacket(dev, pipe, !is_input);
 	if (is_input) {
-		maxp = dev->epmaxpacketin [epnum];
 		buf1 = (1 << 11);
 	} else {
-		maxp = dev->epmaxpacketout [epnum];
 		buf1 = 0;
 	}
 
@@ -690,7 +744,6 @@
 	 */
 	if (stream->refcount == 1) {
 		int		is_in;
-		struct hcd_dev	*dev = stream->udev->hcpriv;
 
 		// BUG_ON (!list_empty(&stream->td_list));
 
@@ -720,7 +773,7 @@
 
 		is_in = (stream->bEndpointAddress & USB_DIR_IN) ? 0x10 : 0;
 		stream->bEndpointAddress &= 0x0f;
-		dev->ep[is_in + stream->bEndpointAddress] = NULL;
+		stream->ep->hcpriv = NULL;
 
 		if (stream->rescheduled) {
 			ehci_info (ehci, "ep%d%s-iso rescheduled "
@@ -747,24 +800,25 @@
 iso_stream_find (struct ehci_hcd *ehci, struct urb *urb)
 {
 	unsigned		epnum;
-	struct hcd_dev		*dev;
 	struct ehci_iso_stream	*stream;
+	struct usb_host_endpoint *ep;
 	unsigned long		flags;
 
 	epnum = usb_pipeendpoint (urb->pipe);
 	if (usb_pipein(urb->pipe))
-		epnum += 0x10;
+		ep = urb->dev->ep_in[epnum];
+	else
+		ep = urb->dev->ep_out[epnum];
 
 	spin_lock_irqsave (&ehci->lock, flags);
-
-	dev = (struct hcd_dev *)urb->dev->hcpriv;
-	stream = dev->ep [epnum];
+	stream = ep->hcpriv;
 
 	if (unlikely (stream == 0)) {
 		stream = iso_stream_alloc(GFP_ATOMIC);
 		if (likely (stream != 0)) {
 			/* dev->ep owns the initial refcount */
-			dev->ep[epnum] = stream;
+			ep->hcpriv = stream;
+			stream->ep = ep;
 			iso_stream_init(stream, urb->dev, urb->pipe,
 					urb->interval);
 		}
@@ -772,8 +826,8 @@
 	/* if dev->ep [epnum] is a QH, info1.maxpacket is nonzero */
 	} else if (unlikely (stream->hw_info1 != 0)) {
 		ehci_dbg (ehci, "dev %s ep%d%s, not iso??\n",
-			urb->dev->devpath, epnum & 0x0f,
-			(epnum & 0x10) ? "in" : "out");
+			urb->dev->devpath, epnum,
+			usb_pipein(urb->pipe) ? "in" : "out");
 		stream = NULL;
 	}
 
@@ -786,7 +840,7 @@
 
 /*-------------------------------------------------------------------------*/
 
-/* ehci_iso_sched ops can be shared, ITD-only, or SITD-only */
+/* ehci_iso_sched ops can be ITD-only or SITD-only */
 
 static struct ehci_iso_sched *
 iso_sched_alloc (unsigned packets, int mem_flags)
@@ -1204,7 +1258,7 @@
 	next_uframe = stream->next_uframe % mod;
 
 	if (unlikely (list_empty(&stream->td_list))) {
-		hcd_to_bus (&ehci->hcd)->bandwidth_allocated
+		ehci_to_hcd(ehci)->self.bandwidth_allocated
 				+= stream->bandwidth;
 		ehci_vdbg (ehci,
 			"schedule devp %s ep%d%s-iso period %d start %d.%d\n",
@@ -1214,7 +1268,7 @@
 			next_uframe >> 3, next_uframe & 0x7);
 		stream->start = jiffies;
 	}
-	hcd_to_bus (&ehci->hcd)->bandwidth_isoc_reqs++;
+	ehci_to_hcd(ehci)->self.bandwidth_isoc_reqs++;
 
 	/* fill iTDs uframe by uframe */
 	for (packet = 0, itd = NULL; packet < urb->number_of_packets; ) {
@@ -1336,10 +1390,10 @@
 	ehci->periodic_sched--;
 	if (unlikely (!ehci->periodic_sched))
 		(void) disable_periodic (ehci);
-	hcd_to_bus (&ehci->hcd)->bandwidth_isoc_reqs--;
+	ehci_to_hcd(ehci)->self.bandwidth_isoc_reqs--;
 
 	if (unlikely (list_empty (&stream->td_list))) {
-		hcd_to_bus (&ehci->hcd)->bandwidth_allocated
+		ehci_to_hcd(ehci)->self.bandwidth_allocated
 				-= stream->bandwidth;
 		ehci_vdbg (ehci,
 			"deschedule devp %s ep%d%s-iso\n",
@@ -1589,7 +1643,7 @@
 
 	if (list_empty(&stream->td_list)) {
 		/* usbfs ignores TT bandwidth */
-		hcd_to_bus (&ehci->hcd)->bandwidth_allocated
+		ehci_to_hcd(ehci)->self.bandwidth_allocated
 				+= stream->bandwidth;
 		ehci_vdbg (ehci,
 			"sched dev%s ep%d%s-iso [%d] %dms/%04x\n",
@@ -1599,7 +1653,7 @@
 			stream->interval, le32_to_cpu (stream->splits));
 		stream->start = jiffies;
 	}
-	hcd_to_bus (&ehci->hcd)->bandwidth_isoc_reqs++;
+	ehci_to_hcd(ehci)->self.bandwidth_isoc_reqs++;
 
 	/* fill sITDs frame by frame */
 	for (packet = 0, sitd = NULL;
@@ -1699,10 +1753,10 @@
 	ehci->periodic_sched--;
 	if (!ehci->periodic_sched)
 		(void) disable_periodic (ehci);
-	hcd_to_bus (&ehci->hcd)->bandwidth_isoc_reqs--;
+	ehci_to_hcd(ehci)->self.bandwidth_isoc_reqs--;
 
 	if (list_empty (&stream->td_list)) {
-		hcd_to_bus (&ehci->hcd)->bandwidth_allocated
+		ehci_to_hcd(ehci)->self.bandwidth_allocated
 				-= stream->bandwidth;
 		ehci_vdbg (ehci,
 			"deschedule devp %s ep%d%s-iso\n",
@@ -1806,7 +1860,7 @@
 	 * Touches as few pages as possible:  cache-friendly.
 	 */
 	now_uframe = ehci->next_uframe;
-	if (HCD_IS_RUNNING (ehci->hcd.state))
+	if (HCD_IS_RUNNING (ehci_to_hcd(ehci)->state))
 		clock = readl (&ehci->regs->frame_index);
 	else
 		clock = now_uframe + mod - 1;
@@ -1840,7 +1894,7 @@
 			union ehci_shadow	temp;
 			int			live;
 
-			live = HCD_IS_RUNNING (ehci->hcd.state);
+			live = HCD_IS_RUNNING (ehci_to_hcd(ehci)->state);
 			switch (type) {
 			case Q_TYPE_QH:
 				/* handle any completions */
@@ -1849,7 +1903,7 @@
 				q = q.qh->qh_next;
 				modified = qh_completions (ehci, temp.qh, regs);
 				if (unlikely (list_empty (&temp.qh->qtd_list)))
-					intr_deschedule (ehci, temp.qh, 0);
+					intr_deschedule (ehci, temp.qh);
 				qh_put (temp.qh);
 				break;
 			case Q_TYPE_FSTN:
@@ -1929,7 +1983,7 @@
 		if (now_uframe == clock) {
 			unsigned	now;
 
-			if (!HCD_IS_RUNNING (ehci->hcd.state))
+			if (!HCD_IS_RUNNING (ehci_to_hcd(ehci)->state))
 				break;
 			ehci->next_uframe = now_uframe;
 			now = readl (&ehci->regs->frame_index) % mod;
diff -Nru a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
--- a/drivers/usb/host/ehci.h	2005-01-10 20:11:22 -08:00
+++ b/drivers/usb/host/ehci.h	2005-01-10 20:11:22 -08:00
@@ -36,7 +36,7 @@
 
 /* ehci_hcd->lock guards shared data against other CPUs:
  *   ehci_hcd:	async, reclaim, periodic (and shadow), ...
- *   hcd_dev:	ep[]
+ *   usb_host_endpoint: hcpriv
  *   ehci_qh:	qh_next, qtd_list
  *   ehci_qtd:	qtd_list
  *
@@ -47,13 +47,6 @@
 #define	EHCI_MAX_ROOT_PORTS	15		/* see HCS_N_PORTS */
 
 struct ehci_hcd {			/* one per controller */
-
-	/* glue to PCI and HCD framework */
-	struct usb_hcd		hcd;		/* must come first! */
-	struct ehci_caps __iomem *caps;
-	struct ehci_regs __iomem *regs;
-	__u32			hcs_params;	/* cached register copy */
-
 	spinlock_t		lock;
 
 	/* async schedule support */
@@ -91,6 +84,11 @@
 
 	unsigned		is_arc_rh_tt:1;	/* ARC roothub with TT */
 
+	/* glue to PCI and HCD framework */
+	struct ehci_caps __iomem *caps;
+	struct ehci_regs __iomem *regs;
+	__u32			hcs_params;	/* cached register copy */
+
 	/* irq statistics */
 #ifdef EHCI_STATS
 	struct ehci_stats	stats;
@@ -100,8 +98,15 @@
 #endif
 };
 
-/* unwrap an HCD pointer to get an EHCI_HCD pointer */ 
-#define hcd_to_ehci(hcd_ptr) container_of(hcd_ptr, struct ehci_hcd, hcd)
+/* convert between an HCD pointer and the corresponding EHCI_HCD */ 
+static inline struct ehci_hcd *hcd_to_ehci (struct usb_hcd *hcd)
+{
+	return (struct ehci_hcd *) (hcd->hcd_priv);
+}
+static inline struct usb_hcd *ehci_to_hcd (struct ehci_hcd *ehci)
+{
+	return container_of ((void *) ehci, struct usb_hcd, hcd_priv);
+}
 
 
 enum ehci_timer_action {
@@ -259,6 +264,30 @@
 #define PORT_CONNECT	(1<<0)		/* device connected */
 } __attribute__ ((packed));
 
+/* Appendix C, Debug port ... intended for use with special "debug devices"
+ * that can help if there's no serial console.  (nonstandard enumeration.)
+ */
+struct ehci_dbg_port {
+	u32	control;
+#define DBGP_OWNER	(1<<30)
+#define DBGP_ENABLED	(1<<28)
+#define DBGP_DONE	(1<<16)
+#define DBGP_INUSE	(1<<10)
+#define DBGP_ERRCODE(x)	(((x)>>7)&0x0f)
+#	define DBGP_ERR_BAD	1
+#	define DBGP_ERR_SIGNAL	2
+#define DBGP_ERROR	(1<<6)
+#define DBGP_GO		(1<<5)
+#define DBGP_OUT	(1<<4)
+#define DBGP_LEN(x)	(((x)>>0)&0x0f)
+	u32	pids;
+#define DBGP_PID_GET(x)		(((x)>>16)&0xff)
+#define DBGP_PID_SET(data,tok)	(((data)<<8)|(tok));
+	u32	data03;
+	u32	data47;
+	u32	address;
+#define DBGP_EPADDR(dev,ep)	(((dev)<<8)|(ep));
+} __attribute__ ((packed));
 
 /*-------------------------------------------------------------------------*/
 
@@ -430,6 +459,7 @@
 	struct list_head	td_list;	/* queued itds/sitds */
 	struct list_head	free_list;	/* list of unused itds/sitds */
 	struct usb_device	*udev;
+ 	struct usb_host_endpoint *ep;
 
 	/* output of (re)scheduling */
 	unsigned long		start;		/* jiffies */
diff -Nru a/drivers/usb/host/hc_crisv10.c b/drivers/usb/host/hc_crisv10.c
--- a/drivers/usb/host/hc_crisv10.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/usb/host/hc_crisv10.c	2005-01-10 20:11:22 -08:00
@@ -113,17 +113,17 @@
 {
 	0x12,  /*  __u8  bLength; */
 	0x01,  /*  __u8  bDescriptorType; Device */
-	0x00,  /*  __u16 bcdUSB; v1.0 */
+	0x00,  /*  __le16 bcdUSB; v1.0 */
 	0x01,
 	0x09,  /*  __u8  bDeviceClass; HUB_CLASSCODE */
 	0x00,  /*  __u8  bDeviceSubClass; */
 	0x00,  /*  __u8  bDeviceProtocol; */
 	0x08,  /*  __u8  bMaxPacketSize0; 8 Bytes */
-	0x00,  /*  __u16 idVendor; */
+	0x00,  /*  __le16 idVendor; */
 	0x00,
-	0x00,  /*  __u16 idProduct; */
+	0x00,  /*  __le16 idProduct; */
 	0x00,
-	0x00,  /*  __u16 bcdDevice; */
+	0x00,  /*  __le16 bcdDevice; */
 	0x00,
 	0x00,  /*  __u8  iManufacturer; */
 	0x02,  /*  __u8  iProduct; */
@@ -136,7 +136,7 @@
 {
 	0x09,  /*  __u8  bLength; */
 	0x02,  /*  __u8  bDescriptorType; Configuration */
-	0x19,  /*  __u16 wTotalLength; */
+	0x19,  /*  __le16 wTotalLength; */
 	0x00,
 	0x01,  /*  __u8  bNumInterfaces; */
 	0x01,  /*  __u8  bConfigurationValue; */
@@ -160,7 +160,7 @@
 	0x05,  /*  __u8  ep_bDescriptorType; Endpoint */
 	0x81,  /*  __u8  ep_bEndpointAddress; IN Endpoint 1 */
 	0x03,  /*  __u8  ep_bmAttributes; Interrupt */
-	0x08,  /*  __u16 ep_wMaxPacketSize; 8 Bytes */
+	0x08,  /*  __le16 ep_wMaxPacketSize; 8 Bytes */
 	0x00,
 	0xff   /*  __u8  ep_bInterval; 255 ms */
 };
@@ -479,8 +479,6 @@
 static int etrax_usb_submit_urb(struct urb *urb, int mem_flags);
 static int etrax_usb_unlink_urb(struct urb *urb, int status);
 static int etrax_usb_get_frame_number(struct usb_device *usb_dev);
-static int etrax_usb_allocate_dev(struct usb_device *usb_dev);
-static int etrax_usb_deallocate_dev(struct usb_device *usb_dev);
 
 static irqreturn_t etrax_usb_tx_interrupt(int irq, void *vhc, struct pt_regs *regs);
 static irqreturn_t etrax_usb_rx_interrupt(int irq, void *vhc, struct pt_regs *regs);
@@ -512,8 +510,6 @@
 
 static struct usb_operations etrax_usb_device_operations =
 {
-	.allocate = etrax_usb_allocate_dev,
-	.deallocate = etrax_usb_deallocate_dev,
 	.get_frame_number = etrax_usb_get_frame_number,
 	.submit_urb = etrax_usb_submit_urb,
 	.unlink_urb = etrax_usb_unlink_urb,
@@ -1579,20 +1575,6 @@
 	return (*R_USB_FM_NUMBER & 0x7ff);
 }
 
-static int etrax_usb_allocate_dev(struct usb_device *usb_dev)
-{
-	DBFENTER;
-	DBFEXIT;
-	return 0;
-}
-
-static int etrax_usb_deallocate_dev(struct usb_device *usb_dev)
-{
-	DBFENTER;
-	DBFEXIT;
-	return 0;
-}
-
 static irqreturn_t etrax_usb_tx_interrupt(int irq, void *vhc, struct pt_regs *regs)
 {
 	DBFENTER;
@@ -4546,7 +4528,7 @@
         usb_rh->speed = USB_SPEED_FULL;
         usb_rh->devnum = 1;
         hc->bus->devnum_next = 2;
-        usb_rh->epmaxpacketin[0] = usb_rh->epmaxpacketout[0] = 64;
+        usb_rh->ep0.desc.wMaxPacketSize = __const_cpu_to_le16(64);
         usb_get_device_descriptor(usb_rh, USB_DT_DEVICE_SIZE);
 	usb_new_device(usb_rh);
 
diff -Nru a/drivers/usb/host/ohci-dbg.c b/drivers/usb/host/ohci-dbg.c
--- a/drivers/usb/host/ohci-dbg.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/usb/host/ohci-dbg.c	2005-01-10 20:11:22 -08:00
@@ -676,19 +676,23 @@
 static CLASS_DEVICE_ATTR (registers, S_IRUGO, show_registers, NULL);
 
 
-static inline void create_debug_files (struct ohci_hcd *bus)
+static inline void create_debug_files (struct ohci_hcd *ohci)
 {
-	class_device_create_file(&bus->hcd.self.class_dev, &class_device_attr_async);
-	class_device_create_file(&bus->hcd.self.class_dev, &class_device_attr_periodic);
-	class_device_create_file(&bus->hcd.self.class_dev, &class_device_attr_registers);
-	ohci_dbg (bus, "created debug files\n");
+	struct class_device *cldev = &ohci_to_hcd(ohci)->self.class_dev;
+
+	class_device_create_file(cldev, &class_device_attr_async);
+	class_device_create_file(cldev, &class_device_attr_periodic);
+	class_device_create_file(cldev, &class_device_attr_registers);
+	ohci_dbg (ohci, "created debug files\n");
 }
 
-static inline void remove_debug_files (struct ohci_hcd *bus)
+static inline void remove_debug_files (struct ohci_hcd *ohci)
 {
-	class_device_remove_file(&bus->hcd.self.class_dev, &class_device_attr_async);
-	class_device_remove_file(&bus->hcd.self.class_dev, &class_device_attr_periodic);
-	class_device_remove_file(&bus->hcd.self.class_dev, &class_device_attr_registers);
+	struct class_device *cldev = &ohci_to_hcd(ohci)->self.class_dev;
+
+	class_device_remove_file(cldev, &class_device_attr_async);
+	class_device_remove_file(cldev, &class_device_attr_periodic);
+	class_device_remove_file(cldev, &class_device_attr_registers);
 }
 
 #endif
diff -Nru a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
--- a/drivers/usb/host/ohci-hcd.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/usb/host/ohci-hcd.c	2005-01-10 20:11:16 -08:00
@@ -165,6 +165,7 @@
  */
 static int ohci_urb_enqueue (
 	struct usb_hcd	*hcd,
+	struct usb_host_endpoint *ep,
 	struct urb	*urb,
 	int		mem_flags
 ) {
@@ -181,7 +182,7 @@
 #endif
 	
 	/* every endpoint has a ed, locate and maybe (re)initialize it */
-	if (! (ed = ed_get (ohci, urb->dev, pipe, urb->interval)))
+	if (! (ed = ed_get (ohci, ep, urb->dev, pipe, urb->interval)))
 		return -ENOMEM;
 
 	/* for the private part of the URB we need the number of TDs (size) */
@@ -239,7 +240,7 @@
 	spin_lock_irqsave (&ohci->lock, flags);
 
 	/* don't submit to a dead HC */
-	if (!HCD_IS_RUNNING(ohci->hcd.state)) {
+	if (!HCD_IS_RUNNING(hcd->state)) {
 		retval = -ENODEV;
 		goto fail;
 	}
@@ -307,7 +308,7 @@
 #endif		  
 
 	spin_lock_irqsave (&ohci->lock, flags);
- 	if (HCD_IS_RUNNING(ohci->hcd.state)) {
+ 	if (HCD_IS_RUNNING(hcd->state)) {
 		urb_priv_t  *urb_priv;
 
 		/* Unless an IRQ completed the unlink while it was being
@@ -338,28 +339,23 @@
  */
 
 static void
-ohci_endpoint_disable (struct usb_hcd *hcd, struct hcd_dev *dev, int ep)
+ohci_endpoint_disable (struct usb_hcd *hcd, struct usb_host_endpoint *ep)
 {
 	struct ohci_hcd		*ohci = hcd_to_ohci (hcd);
-	int			epnum = ep & USB_ENDPOINT_NUMBER_MASK;
 	unsigned long		flags;
-	struct ed		*ed;
+	struct ed		*ed = ep->hcpriv;
 	unsigned		limit = 1000;
 
 	/* ASSERT:  any requests/urbs are being unlinked */
 	/* ASSERT:  nobody can be submitting urbs for this any more */
 
-	epnum <<= 1;
-	if (epnum != 0 && !(ep & USB_DIR_IN))
-		epnum |= 1;
+	if (!ed)
+		return;
 
 rescan:
 	spin_lock_irqsave (&ohci->lock, flags);
-	ed = dev->ep [epnum];
-	if (!ed)
-		goto done;
 
-	if (!HCD_IS_RUNNING (ohci->hcd.state)) {
+	if (!HCD_IS_RUNNING (hcd->state)) {
 sanitize:
 		ed->state = ED_IDLE;
 		finish_unlinks (ohci, 0, NULL);
@@ -387,14 +383,13 @@
 		/* caller was supposed to have unlinked any requests;
 		 * that's not our job.  can't recover; must leak ed.
 		 */
-		ohci_err (ohci, "leak ed %p (#%d) state %d%s\n",
-			ed, epnum, ed->state,
+		ohci_err (ohci, "leak ed %p (#%02x) state %d%s\n",
+			ed, ep->desc.bEndpointAddress, ed->state,
 			list_empty (&ed->td_list) ? "" : " (has tds)");
 		td_free (ohci, ed->dummy);
 		break;
 	}
-	dev->ep [epnum] = NULL;
-done:
+	ep->hcpriv = NULL;
 	spin_unlock_irqrestore (&ohci->lock, flags);
 	return;
 }
@@ -421,17 +416,18 @@
 
 static int ohci_init (struct ohci_hcd *ohci)
 {
-	u32 temp;
 	int ret;
 
 	disable (ohci);
-	ohci->regs = ohci->hcd.regs;
+	ohci->regs = ohci_to_hcd(ohci)->regs;
 	ohci->next_statechange = jiffies;
 
 #ifndef IR_DISABLE
 	/* SMM owns the HC?  not for long! */
 	if (!no_handshake && ohci_readl (ohci,
 					&ohci->regs->control) & OHCI_CTRL_IR) {
+		u32 temp;
+
 		ohci_dbg (ohci, "USB HC TakeOver from BIOS/SMM\n");
 
 		/* this timeout is arbitrary.  we make it long, so systems
@@ -445,7 +441,8 @@
 		while (ohci_readl (ohci, &ohci->regs->control) & OHCI_CTRL_IR) {
 			msleep (10);
 			if (--temp == 0) {
-				ohci_err (ohci, "USB HC TakeOver failed!\n");
+				ohci_err (ohci, "USB HC takeover failed!"
+					"  (BIOS/SMM bug)\n");
 				return -EBUSY;
 			}
 		}
@@ -461,13 +458,13 @@
 	if (ohci->hcca)
 		return 0;
 
-	ohci->hcca = dma_alloc_coherent (ohci->hcd.self.controller,
+	ohci->hcca = dma_alloc_coherent (ohci_to_hcd(ohci)->self.controller,
 			sizeof *ohci->hcca, &ohci->hcca_dma, 0);
 	if (!ohci->hcca)
 		return -ENOMEM;
 
 	if ((ret = ohci_mem_init (ohci)) < 0)
-		ohci_stop (&ohci->hcd);
+		ohci_stop (ohci_to_hcd(ohci));
 
 	return ret;
 
@@ -512,7 +509,7 @@
 
 	if (ohci->hc_control & OHCI_CTRL_RWC
 			&& !(ohci->flags & OHCI_QUIRK_AMD756))
-		ohci->hcd.can_wakeup = 1;
+		ohci_to_hcd(ohci)->can_wakeup = 1;
 
 	switch (ohci->hc_control & OHCI_CTRL_HCFS) {
 	case OHCI_USB_OPER:
@@ -610,7 +607,7 @@
 	ohci->hc_control &= OHCI_CTRL_RWC;
  	ohci->hc_control |= OHCI_CONTROL_INIT | OHCI_USB_OPER;
  	ohci_writel (ohci, ohci->hc_control, &ohci->regs->control);
-	ohci->hcd.state = USB_STATE_RUNNING;
+	ohci_to_hcd(ohci)->state = USB_STATE_RUNNING;
 
 	/* wake on ConnectStatusChange, matching external hubs */
 	ohci_writel (ohci, RH_HS_DRWE, &ohci->regs->roothub.status);
@@ -650,12 +647,12 @@
 
 	// POTPGT delay is bits 24-31, in 2 ms units.
 	mdelay ((roothub_a (ohci) >> 23) & 0x1fe);
-	bus = hcd_to_bus (&ohci->hcd);
-	ohci->hcd.state = USB_STATE_RUNNING;
+	bus = &ohci_to_hcd(ohci)->self;
+	ohci_to_hcd(ohci)->state = USB_STATE_RUNNING;
 
 	ohci_dump (ohci, 1);
 
-	udev = hcd_to_bus (&ohci->hcd)->root_hub;
+	udev = bus->root_hub;
 	if (udev) {
 		return 0;
 	}
@@ -670,7 +667,7 @@
 	}
 
 	udev->speed = USB_SPEED_FULL;
-	if (hcd_register_root (udev, &ohci->hcd) != 0) {
+	if (hcd_register_root (udev, ohci_to_hcd(ohci)) != 0) {
 		usb_put_dev (udev);
 		disable (ohci);
 		ohci->hc_control &= ~OHCI_CTRL_HCFS;
@@ -745,11 +742,11 @@
 	if (ohci->ed_rm_list)
 		finish_unlinks (ohci, ohci_frame_no(ohci), ptregs);
 	if ((ints & OHCI_INTR_SF) != 0 && !ohci->ed_rm_list
-			&& HCD_IS_RUNNING(ohci->hcd.state))
+			&& HCD_IS_RUNNING(hcd->state))
 		ohci_writel (ohci, OHCI_INTR_SF, &regs->intrdisable);	
 	spin_unlock (&ohci->lock);
 
-	if (HCD_IS_RUNNING(ohci->hcd.state)) {
+	if (HCD_IS_RUNNING(hcd->state)) {
 		ohci_writel (ohci, ints, &regs->intrstatus);
 		ohci_writel (ohci, OHCI_INTR_MIE, &regs->intrenable);	
 		// flush those writes
@@ -767,7 +764,7 @@
 
 	ohci_dbg (ohci, "stop %s controller (state 0x%02x)\n",
 		hcfs2string (ohci->hc_control & OHCI_CTRL_HCFS),
-		ohci->hcd.state);
+		hcd->state);
 	ohci_dump (ohci, 1);
 
 	flush_scheduled_work();
@@ -778,7 +775,7 @@
 	remove_debug_files (ohci);
 	ohci_mem_cleanup (ohci);
 	if (ohci->hcca) {
-		dma_free_coherent (ohci->hcd.self.controller, 
+		dma_free_coherent (hcd->self.controller, 
 				sizeof *ohci->hcca, 
 				ohci->hcca, ohci->hcca_dma);
 		ohci->hcca = NULL;
@@ -797,7 +794,7 @@
 	int temp;
 	int i;
 	struct urb_priv *priv;
-	struct usb_device *root = ohci->hcd.self.root_hub;
+	struct usb_device *root = ohci_to_hcd(ohci)->self.root_hub;
 
 	/* mark any devices gone, so they do nothing till khubd disconnects.
 	 * recycle any "live" eds/tds (and urbs) right away.
@@ -907,14 +904,4 @@
       || defined (CONFIG_PXA27x) \
 	)
 #error "missing bus glue for ohci-hcd"
-#endif
-
-#if	!defined(HAVE_HNP) && defined(CONFIG_USB_OTG)
-
-#warning non-OTG configuration, too many HCDs
-
-static void start_hnp(struct ohci_hcd *ohci)
-{
-	/* "can't happen" */
-}
 #endif
diff -Nru a/drivers/usb/host/ohci-hub.c b/drivers/usb/host/ohci-hub.c
--- a/drivers/usb/host/ohci-hub.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/usb/host/ohci-hub.c	2005-01-10 20:11:16 -08:00
@@ -73,7 +73,7 @@
 	ohci_dbg (ohci, "suspend root hub\n");
 
 	/* First stop any processing */
-	ohci->hcd.state = USB_STATE_QUIESCING;
+	hcd->state = USB_STATE_QUIESCING;
 	if (ohci->hc_control & OHCI_SCHED_ENABLES) {
 		int		limit;
 
@@ -103,7 +103,7 @@
 			&ohci->regs->intrstatus);
 
 	/* maybe resume can wake root hub */
-	if (ohci->hcd.remote_wakeup)
+	if (hcd->remote_wakeup)
 		ohci->hc_control |= OHCI_CTRL_RWE;
 	else
 		ohci->hc_control &= ~OHCI_CTRL_RWE;
@@ -119,7 +119,7 @@
 
 done:
 	if (status == 0)
-		ohci->hcd.state = HCD_STATE_SUSPENDED;
+		hcd->state = HCD_STATE_SUSPENDED;
 	spin_unlock_irqrestore (&ohci->lock, flags);
 	return status;
 }
@@ -198,7 +198,7 @@
 	}
 
 	/* Some controllers (lucent) need extra-long delays */
-	ohci->hcd.state = USB_STATE_RESUMING;
+	hcd->state = USB_STATE_RESUMING;
 	mdelay (20 /* usb 11.5.1.10 */ + 15);
 
 	temp = ohci_readl (ohci, &ohci->regs->control);
@@ -231,7 +231,7 @@
 	msleep (3);
 
 	temp = OHCI_CONTROL_INIT | OHCI_USB_OPER;
-	if (ohci->hcd.can_wakeup)
+	if (hcd->can_wakeup)
 		temp |= OHCI_CTRL_RWC;
 	ohci->hc_control = temp;
 	ohci_writel (ohci, temp, &ohci->regs->control);
@@ -261,8 +261,7 @@
 			temp |= OHCI_BLF;
 		}
 	}
-	if (hcd_to_bus (&ohci->hcd)->bandwidth_isoc_reqs
-			|| hcd_to_bus (&ohci->hcd)->bandwidth_int_reqs)
+	if (hcd->self.bandwidth_isoc_reqs || hcd->self.bandwidth_int_reqs)
 		enables |= OHCI_CTRL_PLE|OHCI_CTRL_IE;
 	if (enables) {
 		ohci_dbg (ohci, "restarting schedules ... %08x\n", enables);
@@ -273,7 +272,7 @@
 		(void) ohci_readl (ohci, &ohci->regs->control);
 	}
 
-	ohci->hcd.state = USB_STATE_RUNNING;
+	hcd->state = USB_STATE_RUNNING;
 	return 0;
 }
 
@@ -314,7 +313,7 @@
 	 * letting khubd or root hub timer see state changes.
 	 */
 	if ((ohci->hc_control & OHCI_CTRL_HCFS) != OHCI_USB_OPER
-			|| !HCD_IS_RUNNING(ohci->hcd.state)) {
+			|| !HCD_IS_RUNNING(hcd->state)) {
 		can_suspend = 0;
 		goto done;
 	}
@@ -356,7 +355,7 @@
 		 */
 		if (!(status & RH_PS_CCS))
 			continue;
-		if ((status & RH_PS_PSS) && ohci->hcd.remote_wakeup)
+		if ((status & RH_PS_PSS) && hcd->remote_wakeup)
 			continue;
 		can_suspend = 0;
 	}
@@ -378,8 +377,8 @@
 			&& usb_trylock_device (hcd->self.root_hub)
 			) {
 		ohci_vdbg (ohci, "autosuspend\n");
-		(void) ohci_hub_suspend (&ohci->hcd);
-		ohci->hcd.state = USB_STATE_RUNNING;
+		(void) ohci_hub_suspend (hcd);
+		hcd->state = USB_STATE_RUNNING;
 		usb_unlock_device (hcd->self.root_hub);
 	}
 #endif
@@ -613,8 +612,8 @@
 		switch (wValue) {
 		case USB_PORT_FEAT_SUSPEND:
 #ifdef	CONFIG_USB_OTG
-			if (ohci->hcd.self.otg_port == (wIndex + 1)
-					&& ohci->hcd.self.b_hnp_enable)
+			if (hcd->self.otg_port == (wIndex + 1)
+					&& hcd->self.b_hnp_enable)
 				start_hnp(ohci);
 			else
 #endif
diff -Nru a/drivers/usb/host/ohci-lh7a404.c b/drivers/usb/host/ohci-lh7a404.c
--- a/drivers/usb/host/ohci-lh7a404.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/usb/host/ohci-lh7a404.c	2005-01-10 20:11:22 -08:00
@@ -106,23 +106,22 @@
 		retval = -ENOMEM;
 		goto err1;
 	}
-	
 
-	hcd = driver->hcd_alloc ();
-	if (hcd == NULL){
-		pr_debug ("hcd_alloc failed");
+	if(dev->resource[1].flags != IORESOURCE_IRQ){
+		pr_debug ("resource[1] is not IORESOURCE_IRQ");
 		retval = -ENOMEM;
 		goto err1;
 	}
+	
 
-	if(dev->resource[1].flags != IORESOURCE_IRQ){
-		pr_debug ("resource[1] is not IORESOURCE_IRQ");
+	hcd = usb_create_hcd (driver);
+	if (hcd == NULL){
+		pr_debug ("hcd_alloc failed");
 		retval = -ENOMEM;
 		goto err1;
 	}
+	ohci_hcd_init(hcd_to_ohci(hcd));
 
-	hcd->driver = (struct hc_driver *) driver;
-	hcd->description = driver->description;
 	hcd->irq = dev->resource[1].start;
 	hcd->regs = addr;
 	hcd->self.controller = &dev->dev;
@@ -130,29 +129,21 @@
 	retval = hcd_buffer_create (hcd);
 	if (retval != 0) {
 		pr_debug ("pool alloc fail");
-		goto err1;
+		goto err2;
 	}
 
 	retval = request_irq (hcd->irq, usb_hcd_lh7a404_hcim_irq, SA_INTERRUPT,
-			      hcd->description, hcd);
+			      hcd->driver->description, hcd);
 	if (retval != 0) {
 		pr_debug("request_irq failed");
 		retval = -EBUSY;
-		goto err2;
+		goto err3;
 	}
 
 	pr_debug ("%s (LH7A404) at 0x%p, irq %d",
-	     hcd->description, hcd->regs, hcd->irq);
+		hcd->driver->description, hcd->regs, hcd->irq);
 
-	usb_bus_init (&hcd->self);
-	hcd->self.op = &usb_hcd_operations;
-	hcd->self.release = &usb_hcd_release;
-	hcd->self.hcpriv = (void *) hcd;
 	hcd->self.bus_name = "lh7a404";
-	hcd->product_desc = "LH7A404 OHCI";
-
-	INIT_LIST_HEAD (&hcd->dev_list);
-
 	usb_register_bus (&hcd->self);
 
 	if ((retval = driver->start (hcd)) < 0)
@@ -164,10 +155,11 @@
 	*hcd_out = hcd;
 	return 0;
 
- err2:
+ err3:
 	hcd_buffer_destroy (hcd);
+ err2:
+	usb_put_hcd(hcd);
  err1:
-	kfree(hcd);
 	lh7a404_stop_hc(dev);
 	release_mem_region(dev->resource[0].start,
 				dev->resource[0].end
@@ -228,7 +220,7 @@
 		return ret;
 
 	if ((ret = ohci_run (ohci)) < 0) {
-		err ("can't start %s", ohci->hcd.self.bus_name);
+		err ("can't start %s", hcd->self.bus_name);
 		ohci_stop (hcd);
 		return ret;
 	}
@@ -239,6 +231,8 @@
 
 static const struct hc_driver ohci_lh7a404_hc_driver = {
 	.description =		hcd_name,
+	.product_desc =		"LH7A404 OHCI",
+	.hcd_priv_size =	sizeof(struct ohci_hcd),
 
 	/*
 	 * generic hardware linkage
@@ -255,11 +249,6 @@
 	/* resume:		ohci_lh7a404_resume,   -- tbd */
 #endif /*CONFIG_PM*/
 	.stop =			ohci_stop,
-
-	/*
-	 * memory lifecycle (except per-request)
-	 */
-	.hcd_alloc =		ohci_hcd_alloc,
 
 	/*
 	 * managing i/o requests and associated device resources
diff -Nru a/drivers/usb/host/ohci-mem.c b/drivers/usb/host/ohci-mem.c
--- a/drivers/usb/host/ohci-mem.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/usb/host/ohci-mem.c	2005-01-10 20:11:20 -08:00
@@ -23,34 +23,27 @@
 
 /*-------------------------------------------------------------------------*/
 
-static struct usb_hcd *ohci_hcd_alloc (void)
+static void ohci_hcd_init (struct ohci_hcd *ohci)
 {
-	struct ohci_hcd *ohci;
-
-	ohci = (struct ohci_hcd *) kmalloc (sizeof *ohci, GFP_KERNEL);
-	if (ohci != 0) {
-		memset (ohci, 0, sizeof (struct ohci_hcd));
-		ohci->hcd.product_desc = "OHCI Host Controller";
-		ohci->next_statechange = jiffies;
-		spin_lock_init (&ohci->lock);
-		INIT_LIST_HEAD (&ohci->pending);
-		INIT_WORK (&ohci->rh_resume, ohci_rh_resume, &ohci->hcd);
-		return &ohci->hcd;
-	}
-	return NULL;
+	ohci->next_statechange = jiffies;
+	spin_lock_init (&ohci->lock);
+	INIT_LIST_HEAD (&ohci->pending);
+	INIT_WORK (&ohci->rh_resume, ohci_rh_resume, ohci_to_hcd(ohci));
 }
 
 /*-------------------------------------------------------------------------*/
 
 static int ohci_mem_init (struct ohci_hcd *ohci)
 {
-	ohci->td_cache = dma_pool_create ("ohci_td", ohci->hcd.self.controller,
+	ohci->td_cache = dma_pool_create ("ohci_td",
+		ohci_to_hcd(ohci)->self.controller,
 		sizeof (struct td),
 		32 /* byte alignment */,
 		0 /* no page-crossing issues */);
 	if (!ohci->td_cache)
 		return -ENOMEM;
-	ohci->ed_cache = dma_pool_create ("ohci_ed", ohci->hcd.self.controller,
+	ohci->ed_cache = dma_pool_create ("ohci_ed",
+		ohci_to_hcd(ohci)->self.controller,
 		sizeof (struct ed),
 		16 /* byte alignment */,
 		0 /* no page-crossing issues */);
diff -Nru a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c
--- a/drivers/usb/host/ohci-omap.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/usb/host/ohci-omap.c	2005-01-10 20:11:20 -08:00
@@ -157,7 +157,7 @@
 
 static void start_hnp(struct ohci_hcd *ohci)
 {
-	const unsigned	port = ohci->hcd.self.otg_port - 1;
+	const unsigned	port = ohci_to_hcd(ohci)->self.otg_port - 1;
 	unsigned long	flags;
 
 	otg_start_hnp(ohci->transceiver);
@@ -181,7 +181,7 @@
 	dev_dbg(&pdev->dev, "starting USB Controller\n");
 
 	if (config->otg) {
-		ohci->hcd.self.otg_port = config->otg;
+		ohci_to_hcd(ohci)->self.otg_port = config->otg;
 		/* default/minimum OTG power budget:  8 mA */
 		ohci->power_budget = 8;
 	}
@@ -198,7 +198,7 @@
 		ohci->transceiver = otg_get_transceiver();
 		if (ohci->transceiver) {
 			int	status = otg_set_host(ohci->transceiver,
-						&ohci->hcd.self);
+						&ohci_to_hcd(ohci)->self);
 			dev_dbg(&pdev->dev, "init %s transceiver, status %d\n",
 					ohci->transceiver->label, status);
 			if (status) {
@@ -293,7 +293,7 @@
 		return -EBUSY;
 	}
 
-	hcd = driver->hcd_alloc ();
+	hcd = usb_create_hcd (driver);
 	if (hcd == NULL){
 		dev_dbg(&pdev->dev, "hcd_alloc failed\n");
 		retval = -ENOMEM;
@@ -301,41 +301,33 @@
 	}
 	dev_set_drvdata(&pdev->dev, hcd);
 	ohci = hcd_to_ohci(hcd);
+	ohci_hcd_init(ohci);
 
-	hcd->driver = (struct hc_driver *) driver;
-	hcd->description = driver->description;
 	hcd->irq = pdev->resource[1].start;
 	hcd->regs = (void *)pdev->resource[0].start;
 	hcd->self.controller = &pdev->dev;
 
 	retval = omap_start_hc(ohci, pdev);
 	if (retval < 0)
-		goto err1;
+		goto err2;
 
 	retval = hcd_buffer_create (hcd);
 	if (retval != 0) {
 		dev_dbg(&pdev->dev, "pool alloc fail\n");
-		goto err1;
+		goto err2;
 	}
 
 	retval = request_irq (hcd->irq, usb_hcd_irq, 
-			      SA_INTERRUPT, hcd->description, hcd);
+			      SA_INTERRUPT, hcd->driver->description, hcd);
 	if (retval != 0) {
 		dev_dbg(&pdev->dev, "request_irq failed\n");
 		retval = -EBUSY;
-		goto err2;
+		goto err3;
 	}
 
 	dev_info(&pdev->dev, "at 0x%p, irq %d\n", hcd->regs, hcd->irq);
 
-	usb_bus_init (&hcd->self);
-	hcd->self.op = &usb_hcd_operations;
-	hcd->self.release = &usb_hcd_release;
-	hcd->self.hcpriv = (void *) hcd;
 	hcd->self.bus_name = pdev->dev.bus_id;
-	hcd->product_desc = "OMAP OHCI";
-
-	INIT_LIST_HEAD (&hcd->dev_list);
 	usb_register_bus (&hcd->self);
 
 	if ((retval = driver->start (hcd)) < 0) 
@@ -346,16 +338,17 @@
 
 	return 0;
 
- err2:
+ err3:
 	hcd_buffer_destroy (hcd);
+ err2:
+	dev_set_drvdata(&pdev->dev, NULL);
+	usb_put_hcd(hcd);
  err1:
-	kfree(hcd);
 	omap_stop_hc(pdev);
 
 	release_mem_region(pdev->resource[0].start, 
 			   pdev->resource[0].end - pdev->resource[0].start + 1);
 
-	dev_set_drvdata(&pdev->dev, 0);
 	return retval;
 }
 
@@ -419,7 +412,7 @@
 		writel(OHCI_CTRL_RWC, &ohci->regs->control);
 
 	if ((ret = ohci_run (ohci)) < 0) {
-		err ("can't start %s", ohci->hcd.self.bus_name);
+		err ("can't start %s", hcd->self.bus_name);
 		ohci_stop (hcd);
 		return ret;
 	}
@@ -430,6 +423,8 @@
 
 static const struct hc_driver ohci_omap_hc_driver = {
 	.description =		hcd_name,
+	.product_desc =		"OMAP OHCI",
+	.hcd_priv_size =	sizeof(struct ohci_hcd),
 
 	/*
 	 * generic hardware linkage
@@ -444,11 +439,6 @@
 	.stop =			ohci_stop,
 
 	/*
-	 * memory lifecycle (except per-request)
-	 */
-	.hcd_alloc =		ohci_hcd_alloc,
-
-	/*
 	 * managing i/o requests and associated device resources
 	 */
 	.urb_enqueue =		ohci_urb_enqueue,
@@ -513,19 +503,20 @@
 		return 0;
 
 	dev_dbg(dev, "suspend to %d\n", state);
-	down(&ohci->hcd.self.root_hub->serialize);
-	status = ohci_hub_suspend(&ohci->hcd);
+	down(&ohci_to_hcd(ohci)->self.root_hub->serialize);
+	status = ohci_hub_suspend(ohci_to_hcd(ohci));
 	if (status == 0) {
 		if (state >= 4) {
 			/* power off + reset */
 			OTG_SYSCON_2_REG &= ~UHOST_EN;
-			ohci->hcd.self.root_hub->state = USB_STATE_SUSPENDED;
+			ohci_to_hcd(ohci)->self.root_hub->state =
+					USB_STATE_SUSPENDED;
 			state = 4;
 		}
-		ohci->hcd.state = HCD_STATE_SUSPENDED;
+		ohci_to_hcd(ohci)->state = HCD_STATE_SUSPENDED;
 		dev->power.power_state = state;
 	}
-	up(&ohci->hcd.self.root_hub->serialize);
+	up(&ohci_to_hcd(ohci)->self.root_hub->serialize);
 	return status;
 }
 
@@ -547,11 +538,11 @@
 		dev_dbg(dev, "resume from %d\n", dev->power.power_state);
 #ifdef	CONFIG_USB_SUSPEND
 		/* get extra cleanup even if remote wakeup isn't in use */
-		status = usb_resume_device(ohci->hcd.self.root_hub);
+		status = usb_resume_device(ohci_to_hcd(ohci)->self.root_hub);
 #else
-		down(&ohci->hcd.self.root_hub->serialize);
-		status = ohci_hub_resume(&ohci->hcd);
-		up(&ohci->hcd.self.root_hub->serialize);
+		down(&ohci_to_hcd(ohci)->self.root_hub->serialize);
+		status = ohci_hub_resume(ohci_to_hcd(ohci));
+		up(&ohci_to_hcd(ohci)->self.root_hub->serialize);
 #endif
 		if (status == 0)
 			dev->power.power_state = 0;
diff -Nru a/drivers/usb/host/ohci-pci.c b/drivers/usb/host/ohci-pci.c
--- a/drivers/usb/host/ohci-pci.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/usb/host/ohci-pci.c	2005-01-10 20:11:21 -08:00
@@ -35,6 +35,7 @@
 {
 	struct ohci_hcd	*ohci = hcd_to_ohci (hcd);
 
+	ohci_hcd_init (ohci);
 	return ohci_init (ohci);
 }
 
@@ -172,6 +173,8 @@
 
 static const struct hc_driver ohci_pci_hc_driver = {
 	.description =		hcd_name,
+	.product_desc =		"OHCI Host Controller",
+	.hcd_priv_size =	sizeof(struct ohci_hcd),
 
 	/*
 	 * generic hardware linkage
@@ -189,11 +192,6 @@
 	.resume =		ohci_pci_resume,
 #endif
 	.stop =			ohci_stop,
-
-	/*
-	 * memory lifecycle (except per-request)
-	 */
-	.hcd_alloc =		ohci_hcd_alloc,
 
 	/*
 	 * managing i/o requests and associated device resources
diff -Nru a/drivers/usb/host/ohci-pxa27x.c b/drivers/usb/host/ohci-pxa27x.c
--- a/drivers/usb/host/ohci-pxa27x.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/usb/host/ohci-pxa27x.c	2005-01-10 20:11:19 -08:00
@@ -206,21 +206,20 @@
 		goto err1;
 	}
 
-	hcd = driver->hcd_alloc ();
-	if (hcd == NULL){
-		pr_debug ("hcd_alloc failed");
+	if(dev->resource[1].flags != IORESOURCE_IRQ){
+		pr_debug ("resource[1] is not IORESOURCE_IRQ");
 		retval = -ENOMEM;
 		goto err1;
 	}
 
-	if(dev->resource[1].flags != IORESOURCE_IRQ){
-		pr_debug ("resource[1] is not IORESOURCE_IRQ");
+	hcd = usb_create_hcd (driver);
+	if (hcd == NULL){
+		pr_debug ("hcd_alloc failed");
 		retval = -ENOMEM;
 		goto err1;
 	}
+	ohci_hcd_init(hcd_to_ohci(hcd));
 
-	hcd->driver = (struct hc_driver *) driver;
-	hcd->description = driver->description;
 	hcd->irq = dev->resource[1].start;
 	hcd->regs = addr;
 	hcd->self.controller = &dev->dev;
@@ -228,29 +227,21 @@
 	retval = hcd_buffer_create (hcd);
 	if (retval != 0) {
 		pr_debug ("pool alloc fail");
-		goto err1;
+		goto err2;
 	}
 
 	retval = request_irq (hcd->irq, usb_hcd_irq, SA_INTERRUPT,
-			      hcd->description, hcd);
+			      hcd->driver->description, hcd);
 	if (retval != 0) {
 		pr_debug("request_irq(%d) failed with retval %d\n",hcd->irq,retval);
 		retval = -EBUSY;
-		goto err2;
+		goto err3;
 	}
 
 	pr_debug ("%s (pxa27x) at 0x%p, irq %d",
-	     hcd->description, hcd->regs, hcd->irq);
+		hcd->driver->description, hcd->regs, hcd->irq);
 
-	usb_bus_init (&hcd->self);
-	hcd->self.op = &usb_hcd_operations;
-	hcd->self.release = &usb_hcd_release;
-	hcd->self.hcpriv = (void *) hcd;
 	hcd->self.bus_name = "pxa27x";
-	hcd->product_desc = "PXA27x OHCI";
-
-	INIT_LIST_HEAD (&hcd->dev_list);
-
 	usb_register_bus (&hcd->self);
 
 	if ((retval = driver->start (hcd)) < 0) {
@@ -261,10 +252,11 @@
 	*hcd_out = hcd;
 	return 0;
 
- err2:
+ err3:
 	hcd_buffer_destroy (hcd);
+ err2:
+	usb_put_hcd(hcd);
  err1:
-	kfree(hcd);
 	pxa27x_stop_hc(dev);
 	release_mem_region(dev->resource[0].start,
 				dev->resource[0].end
@@ -325,7 +317,7 @@
 		return ret;
 
 	if ((ret = ohci_run (ohci)) < 0) {
-		err ("can't start %s", ohci->hcd.self.bus_name);
+		err ("can't start %s", hcd->self.bus_name);
 		ohci_stop (hcd);
 		return ret;
 	}
@@ -337,6 +329,8 @@
 
 static const struct hc_driver ohci_pxa27x_hc_driver = {
 	.description =		hcd_name,
+	.product_desc =		"PXA27x OHCI",
+	.hcd_priv_size =	sizeof(struct ohci_hcd),
 
 	/*
 	 * generic hardware linkage
@@ -349,11 +343,6 @@
 	 */
 	.start =		ohci_pxa27x_start,
 	.stop =			ohci_stop,
-
-	/*
-	 * memory lifecycle (except per-request)
-	 */
-	.hcd_alloc =		ohci_hcd_alloc,
 
 	/*
 	 * managing i/o requests and associated device resources
diff -Nru a/drivers/usb/host/ohci-q.c b/drivers/usb/host/ohci-q.c
--- a/drivers/usb/host/ohci-q.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/usb/host/ohci-q.c	2005-01-10 20:11:22 -08:00
@@ -60,10 +60,10 @@
 
 	switch (usb_pipetype (urb->pipe)) {
 	case PIPE_ISOCHRONOUS:
-		hcd_to_bus (&ohci->hcd)->bandwidth_isoc_reqs--;
+		ohci_to_hcd(ohci)->self.bandwidth_isoc_reqs--;
 		break;
 	case PIPE_INTERRUPT:
-		hcd_to_bus (&ohci->hcd)->bandwidth_int_reqs--;
+		ohci_to_hcd(ohci)->self.bandwidth_int_reqs--;
 		break;
 	}
 
@@ -73,12 +73,12 @@
 
 	/* urb->complete() can reenter this HCD */
 	spin_unlock (&ohci->lock);
-	usb_hcd_giveback_urb (&ohci->hcd, urb, regs);
+	usb_hcd_giveback_urb (ohci_to_hcd(ohci), urb, regs);
 	spin_lock (&ohci->lock);
 
 	/* stop periodic dma if it's not needed */
-	if (hcd_to_bus (&ohci->hcd)->bandwidth_isoc_reqs == 0
-			&& hcd_to_bus (&ohci->hcd)->bandwidth_int_reqs == 0) {
+	if (ohci_to_hcd(ohci)->self.bandwidth_isoc_reqs == 0
+			&& ohci_to_hcd(ohci)->self.bandwidth_int_reqs == 0) {
 		ohci->hc_control &= ~(OHCI_CTRL_PLE|OHCI_CTRL_IE);
 		ohci_writel (ohci, ohci->hc_control, &ohci->regs->control);
 	}
@@ -163,7 +163,7 @@
 		}
 		ohci->load [i] += ed->load;
 	}
-	hcd_to_bus (&ohci->hcd)->bandwidth_allocated += ed->load / ed->interval;
+	ohci_to_hcd(ohci)->self.bandwidth_allocated += ed->load / ed->interval;
 }
 
 /* link an ed into one of the HC chains */
@@ -172,7 +172,7 @@
 {	 
 	int	branch;
 
-	if (ohci->hcd.state == USB_STATE_QUIESCING)
+	if (ohci_to_hcd(ohci)->state == USB_STATE_QUIESCING)
 		return -EAGAIN;
 
 	ed->state = ED_OPER;
@@ -276,7 +276,7 @@
 		}
 		ohci->load [i] -= ed->load;
 	}	
-	hcd_to_bus (&ohci->hcd)->bandwidth_allocated -= ed->load / ed->interval;
+	ohci_to_hcd(ohci)->self.bandwidth_allocated -= ed->load / ed->interval;
 
 	ohci_vdbg (ohci, "unlink %sed %p branch %d [%dus.], interval %d\n",
 		(ed->hwINFO & cpu_to_hc32 (ohci, ED_ISO)) ? "iso " : "",
@@ -386,37 +386,30 @@
 /*-------------------------------------------------------------------------*/
 
 /* get and maybe (re)init an endpoint. init _should_ be done only as part
- * of usb_set_configuration() or usb_set_interface() ... but the USB stack
- * isn't very stateful, so we re-init whenever the HC isn't looking.
+ * of enumeration, usb_set_configuration() or usb_set_interface().
  */
 static struct ed *ed_get (
 	struct ohci_hcd		*ohci,
+	struct usb_host_endpoint *ep,
 	struct usb_device	*udev,
 	unsigned int		pipe,
 	int			interval
 ) {
-	int			is_out = !usb_pipein (pipe);
-	int			type = usb_pipetype (pipe);
-	struct hcd_dev		*dev = (struct hcd_dev *) udev->hcpriv;
 	struct ed		*ed; 
-	unsigned		ep;
 	unsigned long		flags;
 
-	ep = usb_pipeendpoint (pipe) << 1;
-	if (type != PIPE_CONTROL && is_out)
-		ep |= 1;
-
 	spin_lock_irqsave (&ohci->lock, flags);
 
-	if (!(ed = dev->ep [ep])) {
+	if (!(ed = ep->hcpriv)) {
 		struct td	*td;
+		int		is_out;
+		u32		info;
 
 		ed = ed_alloc (ohci, GFP_ATOMIC);
 		if (!ed) {
 			/* out of memory */
 			goto done;
 		}
-		dev->ep [ep] = ed;
 
   		/* dummy td; end of td list for ed */
 		td = td_alloc (ohci, GFP_ATOMIC);
@@ -430,38 +423,39 @@
 		ed->hwTailP = cpu_to_hc32 (ohci, td->td_dma);
 		ed->hwHeadP = ed->hwTailP;	/* ED_C, ED_H zeroed */
 		ed->state = ED_IDLE;
-		ed->type = type;
-	}
 
-	/* NOTE: only ep0 currently needs this "re"init logic, during
-	 * enumeration (after set_address).
-	 */
-  	if (ed->state == ED_IDLE) {
-		u32	info;
+		is_out = !(ep->desc.bEndpointAddress & USB_DIR_IN);
 
+		/* FIXME usbcore changes dev->devnum before SET_ADDRESS
+		 * suceeds ... otherwise we wouldn't need "pipe".
+		 */
 		info = usb_pipedevice (pipe);
-		info |= (ep >> 1) << 7;
-		info |= usb_maxpacket (udev, pipe, is_out) << 16;
+		ed->type = usb_pipetype(pipe);
+
+		info |= (ep->desc.bEndpointAddress & ~USB_DIR_IN) << 7;
+		info |= le16_to_cpu(ep->desc.wMaxPacketSize) << 16;
 		if (udev->speed == USB_SPEED_LOW)
 			info |= ED_LOWSPEED;
 		/* only control transfers store pids in tds */
-		if (type != PIPE_CONTROL) {
+		if (ed->type != PIPE_CONTROL) {
 			info |= is_out ? ED_OUT : ED_IN;
-			if (type != PIPE_BULK) {
+			if (ed->type != PIPE_BULK) {
 				/* periodic transfers... */
-				if (type == PIPE_ISOCHRONOUS)
+				if (ed->type == PIPE_ISOCHRONOUS)
 					info |= ED_ISO;
 				else if (interval > 32)	/* iso can be bigger */
 					interval = 32;
 				ed->interval = interval;
 				ed->load = usb_calc_bus_time (
 					udev->speed, !is_out,
-					type == PIPE_ISOCHRONOUS,
-					usb_maxpacket (udev, pipe, is_out))
+					ed->type == PIPE_ISOCHRONOUS,
+					le16_to_cpu(ep->desc.wMaxPacketSize))
 						/ 1000;
 			}
 		}
 		ed->hwINFO = cpu_to_hc32(ohci, info);
+
+		ep->hcpriv = ed;
 	}
 
 done:
@@ -625,8 +619,8 @@
 	 */
 	case PIPE_INTERRUPT:
 		/* ... and periodic urbs have extra accounting */
-		periodic = hcd_to_bus (&ohci->hcd)->bandwidth_int_reqs++ == 0
-			&& hcd_to_bus (&ohci->hcd)->bandwidth_isoc_reqs == 0;
+		periodic = ohci_to_hcd(ohci)->self.bandwidth_int_reqs++ == 0
+			&& ohci_to_hcd(ohci)->self.bandwidth_isoc_reqs == 0;
 		/* FALLTHROUGH */
 	case PIPE_BULK:
 		info = is_out
@@ -694,8 +688,8 @@
 				data + urb->iso_frame_desc [cnt].offset,
 				urb->iso_frame_desc [cnt].length, urb, cnt);
 		}
-		periodic = hcd_to_bus (&ohci->hcd)->bandwidth_isoc_reqs++ == 0
-			&& hcd_to_bus (&ohci->hcd)->bandwidth_int_reqs == 0;
+		periodic = ohci_to_hcd(ohci)->self.bandwidth_isoc_reqs++ == 0
+			&& ohci_to_hcd(ohci)->self.bandwidth_int_reqs == 0;
 		break;
 	}
 
@@ -926,7 +920,7 @@
 		/* only take off EDs that the HC isn't using, accounting for
 		 * frame counter wraps and EDs with partially retired TDs
 		 */
-		if (likely (regs && HCD_IS_RUNNING(ohci->hcd.state))) {
+		if (likely (regs && HCD_IS_RUNNING(ohci_to_hcd(ohci)->state))) {
 			if (tick_before (tick, ed->tick)) {
 skip_ed:
 				last = &ed->ed_next;
@@ -1008,7 +1002,7 @@
 
 		/* but if there's work queued, reschedule */
 		if (!list_empty (&ed->td_list)) {
-			if (HCD_IS_RUNNING(ohci->hcd.state))
+			if (HCD_IS_RUNNING(ohci_to_hcd(ohci)->state))
 				ed_schedule (ohci, ed);
 		}
 
@@ -1017,8 +1011,8 @@
    	}
 
 	/* maybe reenable control and bulk lists */ 
-	if (HCD_IS_RUNNING(ohci->hcd.state)
-			&& ohci->hcd.state != USB_STATE_QUIESCING
+	if (HCD_IS_RUNNING(ohci_to_hcd(ohci)->state)
+			&& ohci_to_hcd(ohci)->state != USB_STATE_QUIESCING
 			&& !ohci->ed_rm_list) {
 		u32	command = 0, control = 0;
 
diff -Nru a/drivers/usb/host/ohci-sa1111.c b/drivers/usb/host/ohci-sa1111.c
--- a/drivers/usb/host/ohci-sa1111.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/usb/host/ohci-sa1111.c	2005-01-10 20:11:19 -08:00
@@ -162,15 +162,14 @@
 
 	sa1111_start_hc(dev);
 
-	hcd = driver->hcd_alloc ();
+	hcd = usb_create_hcd (driver);
 	if (hcd == NULL){
 		dbg ("hcd_alloc failed");
 		retval = -ENOMEM;
 		goto err1;
 	}
+	ohci_hcd_init(hcd_to_ohci(hcd));
 
-	hcd->driver = (struct hc_driver *) driver;
-	hcd->description = driver->description;
 	hcd->irq = dev->irq[1];
 	hcd->regs = dev->mapbase;
 	hcd->self.controller = &dev->dev;
@@ -178,29 +177,21 @@
 	retval = hcd_buffer_create (hcd);
 	if (retval != 0) {
 		dbg ("pool alloc fail");
-		goto err1;
+		goto err2;
 	}
 
 	retval = request_irq (hcd->irq, usb_hcd_sa1111_hcim_irq, SA_INTERRUPT,
-			      hcd->description, hcd);
+			      hcd->driver->description, hcd);
 	if (retval != 0) {
 		dbg("request_irq failed");
 		retval = -EBUSY;
-		goto err2;
+		goto err3;
 	}
 
 	info ("%s (SA-1111) at 0x%p, irq %d\n",
-	      hcd->description, hcd->regs, hcd->irq);
+		hcd->driver->description, hcd->regs, hcd->irq);
 
-	usb_bus_init (&hcd->self);
-	hcd->self.op = &usb_hcd_operations;
-	hcd->self.release = &usb_hcd_release;
-	hcd->self.hcpriv = (void *) hcd;
 	hcd->self.bus_name = "sa1111";
-	hcd->product_desc = "SA-1111 OHCI";
-
-	INIT_LIST_HEAD (&hcd->dev_list);
-
 	usb_register_bus (&hcd->self);
 
 	if ((retval = driver->start (hcd)) < 0) 
@@ -212,10 +203,11 @@
 	*hcd_out = hcd;
 	return 0;
 
- err2:
+ err3:
 	hcd_buffer_destroy (hcd);
+ err2:
+	usb_put_hcd(hcd);
  err1:
-	kfree(hcd);
 	sa1111_stop_hc(dev);
 	release_mem_region(dev->res.start, dev->res.end - dev->res.start + 1);
 	return retval;
@@ -271,7 +263,7 @@
 		return ret;
 
 	if ((ret = ohci_run (ohci)) < 0) {
-		err ("can't start %s", ohci->hcd.self.bus_name);
+		err ("can't start %s", hcd->self.bus_name);
 		ohci_stop (hcd);
 		return ret;
 	}
@@ -282,6 +274,8 @@
 
 static const struct hc_driver ohci_sa1111_hc_driver = {
 	.description =		hcd_name,
+	.product_desc =		"SA-1111 OHCI",
+	.hcd_priv_size =	sizeof(struct ohci_hcd),
 
 	/*
 	 * generic hardware linkage
diff -Nru a/drivers/usb/host/ohci.h b/drivers/usb/host/ohci.h
--- a/drivers/usb/host/ohci.h	2005-01-10 20:11:23 -08:00
+++ b/drivers/usb/host/ohci.h	2005-01-10 20:11:23 -08:00
@@ -345,11 +345,6 @@
  */
 
 struct ohci_hcd {
-	/*
-	 * framework state
-	 */
-	struct usb_hcd		hcd;		/* must come first! */
-
 	spinlock_t		lock;
 
 	/*
@@ -405,7 +400,15 @@
 
 };
 
-#define hcd_to_ohci(hcd_ptr) container_of(hcd_ptr, struct ohci_hcd, hcd)
+/* convert between an hcd pointer and the corresponding ohci_hcd */
+static inline struct ohci_hcd *hcd_to_ohci (struct usb_hcd *hcd)
+{
+	return (struct ohci_hcd *) (hcd->hcd_priv);
+}
+static inline struct usb_hcd *ohci_to_hcd (const struct ohci_hcd *ohci)
+{
+	return container_of ((void *) ohci, struct usb_hcd, hcd_priv);
+}
 
 /*-------------------------------------------------------------------------*/
 
@@ -414,13 +417,13 @@
 #endif	/* DEBUG */
 
 #define ohci_dbg(ohci, fmt, args...) \
-	dev_dbg ((ohci)->hcd.self.controller , fmt , ## args )
+	dev_dbg (ohci_to_hcd(ohci)->self.controller , fmt , ## args )
 #define ohci_err(ohci, fmt, args...) \
-	dev_err ((ohci)->hcd.self.controller , fmt , ## args )
+	dev_err (ohci_to_hcd(ohci)->self.controller , fmt , ## args )
 #define ohci_info(ohci, fmt, args...) \
-	dev_info ((ohci)->hcd.self.controller , fmt , ## args )
+	dev_info (ohci_to_hcd(ohci)->self.controller , fmt , ## args )
 #define ohci_warn(ohci, fmt, args...) \
-	dev_warn ((ohci)->hcd.self.controller , fmt , ## args )
+	dev_warn (ohci_to_hcd(ohci)->self.controller , fmt , ## args )
 
 #ifdef OHCI_VERBOSE_DEBUG
 #	define ohci_vdbg ohci_dbg
@@ -553,7 +556,7 @@
 
 static inline void disable (struct ohci_hcd *ohci)
 {
-	ohci->hcd.state = USB_STATE_HALT;
+	ohci_to_hcd(ohci)->state = USB_STATE_HALT;
 }
 
 #define	FI			0x2edf		/* 12000 bits per frame (-1) */
diff -Nru a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c
--- a/drivers/usb/host/sl811-hcd.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/usb/host/sl811-hcd.c	2005-01-10 20:11:17 -08:00
@@ -67,7 +67,7 @@
 MODULE_DESCRIPTION("SL811HS USB Host Controller Driver");
 MODULE_LICENSE("GPL");
 
-#define DRIVER_VERSION	"06 Dec 2004"
+#define DRIVER_VERSION	"15 Dec 2004"
 
 
 #ifndef DEBUG
@@ -90,10 +90,12 @@
 
 /*-------------------------------------------------------------------------*/
 
-static irqreturn_t sl811h_irq(int irq, void *_sl811, struct pt_regs *regs);
+static irqreturn_t sl811h_irq(int irq, void *_hcd, struct pt_regs *regs);
 
 static void port_power(struct sl811 *sl811, int is_on)
 {
+	struct usb_hcd	*hcd = sl811_to_hcd(sl811);
+
 	/* hub is inactive unless the port is powered */
 	if (is_on) {
 		if (sl811->port1 & (1 << USB_PORT_FEAT_POWER))
@@ -101,12 +103,12 @@
 
 		sl811->port1 = (1 << USB_PORT_FEAT_POWER);
 		sl811->irq_enable = SL11H_INTMASK_INSRMV;
-		sl811->hcd.self.controller->power.power_state = PM_SUSPEND_ON;
+		hcd->self.controller->power.power_state = PM_SUSPEND_ON;
 	} else {
 		sl811->port1 = 0;
 		sl811->irq_enable = 0;
-		sl811->hcd.state = USB_STATE_HALT;
-		sl811->hcd.self.controller->power.power_state = PM_SUSPEND_DISK;
+		hcd->state = USB_STATE_HALT;
+		hcd->self.controller->power.power_state = PM_SUSPEND_DISK;
 	}
 	sl811->ctrl1 = 0;
 	sl811_write(sl811, SL11H_IRQ_ENABLE, 0);
@@ -115,12 +117,12 @@
 	if (sl811->board && sl811->board->port_power) {
 		/* switch VBUS, at 500mA unless hub power budget gets set */
 		DBG("power %s\n", is_on ? "on" : "off");
-		sl811->board->port_power(sl811->hcd.self.controller, is_on);
+		sl811->board->port_power(hcd->self.controller, is_on);
 	}
 
 	/* reset as thoroughly as we can */
 	if (sl811->board && sl811->board->reset)
-		sl811->board->reset(sl811->hcd.self.controller);
+		sl811->board->reset(hcd->self.controller);
 
 	sl811_write(sl811, SL11H_IRQ_ENABLE, 0);
 	sl811_write(sl811, SL11H_CTLREG1, sl811->ctrl1);
@@ -314,7 +316,6 @@
 static struct sl811h_ep	*start(struct sl811 *sl811, u8 bank)
 {
 	struct sl811h_ep	*ep;
-	struct sl811h_req	*req;
 	struct urb		*urb;
 	int			fclock;
 	u8			control;
@@ -348,13 +349,12 @@
 					struct sl811h_ep, schedule);
 	}
 
-	if (unlikely(list_empty(&ep->queue))) {
+	if (unlikely(list_empty(&ep->hep->urb_list))) {
 		DBG("empty %p queue?\n", ep);
 		return NULL;
 	}
 
-	req = container_of(ep->queue.next, struct sl811h_req, queue);
-	urb = req->urb;
+	urb = container_of(ep->hep->urb_list.next, struct urb, urb_list);
 	control = ep->defctrl;
 
 	/* if this frame doesn't have enough time left to transfer this
@@ -432,17 +432,12 @@
 static void finish_request(
 	struct sl811		*sl811,
 	struct sl811h_ep	*ep,
-	struct sl811h_req	*req,
+	struct urb		*urb,
 	struct pt_regs		*regs,
 	int			status
 ) __releases(sl811->lock) __acquires(sl811->lock)
 {
 	unsigned		i;
-	struct urb		*urb = req->urb;
-
-	list_del(&req->queue);
-	kfree(req);
-	urb->hcpriv = NULL;
 
 	if (usb_pipecontrol(urb->pipe))
 		ep->nextpid = USB_PID_SETUP;
@@ -453,11 +448,11 @@
 	spin_unlock(&urb->lock);
 
 	spin_unlock(&sl811->lock);
-	usb_hcd_giveback_urb(&sl811->hcd, urb, regs);
+	usb_hcd_giveback_urb(sl811_to_hcd(sl811), urb, regs);
 	spin_lock(&sl811->lock);
 
 	/* leave active endpoints in the schedule */
-	if (!list_empty(&ep->queue))
+	if (!list_empty(&ep->hep->urb_list))
 		return;
 
 	/* async deschedule? */
@@ -482,7 +477,7 @@
 	}	
 	ep->branch = PERIODIC_SIZE;
 	sl811->periodic_count--;
-	hcd_to_bus(&sl811->hcd)->bandwidth_allocated
+	sl811_to_hcd(sl811)->self.bandwidth_allocated
 		-= ep->load / ep->period;
 	if (ep == sl811->next_periodic)
 		sl811->next_periodic = ep->next;
@@ -496,7 +491,6 @@
 done(struct sl811 *sl811, struct sl811h_ep *ep, u8 bank, struct pt_regs *regs)
 {
 	u8			status;
-	struct sl811h_req	*req;
 	struct urb		*urb;
 	int			urbstat = -EINPROGRESS;
 
@@ -505,8 +499,7 @@
 
 	status = sl811_read(sl811, bank + SL11H_PKTSTATREG);
 
-	req = container_of(ep->queue.next, struct sl811h_req, queue);
-	urb = req->urb;
+	urb = container_of(ep->hep->urb_list.next, struct urb, urb_list);
 
 	/* we can safely ignore NAKs */
 	if (status & SL11H_STATMASK_NAK) {
@@ -577,7 +570,7 @@
 					urb->status = urbstat;
 				spin_unlock(&urb->lock);
 
-				req = NULL;
+				urb = NULL;
 				ep->nextpid = USB_PID_ACK;
 			}
 			break;
@@ -618,9 +611,8 @@
 				bank, status, ep, urbstat);
 	}
 
-	if ((urbstat != -EINPROGRESS || urb->status != -EINPROGRESS)
-			&& req)
-		finish_request(sl811, ep, req, regs, urbstat);
+	if (urb && (urbstat != -EINPROGRESS || urb->status != -EINPROGRESS))
+		finish_request(sl811, ep, urb, regs, urbstat);
 }
 
 static inline u8 checkdone(struct sl811 *sl811)
@@ -643,7 +635,7 @@
 		ctl = sl811_read(sl811, SL811_EP_B(SL11H_HOSTCTLREG));
 		if (ctl & SL11H_HCTLMASK_ARM)
 			sl811_write(sl811, SL811_EP_B(SL11H_HOSTCTLREG), 0);
-		DBG("%s DONE_B: ctrl %02x sts %02x\n", ctl,
+		DBG("%s DONE_B: ctrl %02x sts %02x\n",
 			(ctl & SL11H_HCTLMASK_ARM) ? "timeout" : "lost",
 			ctl,
 			sl811_read(sl811, SL811_EP_B(SL11H_PKTSTATREG)));
@@ -653,9 +645,10 @@
 	return irqstat;
 }
 
-static irqreturn_t sl811h_irq(int irq, void *_sl811, struct pt_regs *regs)
+static irqreturn_t sl811h_irq(int irq, void *_hcd, struct pt_regs *regs)
 {
-	struct sl811	*sl811 = _sl811;
+	struct usb_hcd	*hcd = _hcd;
+	struct sl811	*sl811 = hcd_to_sl811(hcd);
 	u8		irqstat;
 	irqreturn_t	ret = IRQ_NONE;
 	unsigned	retries = 5;
@@ -732,8 +725,8 @@
 		if (sl811->active_a) {
 			sl811_write(sl811, SL811_EP_A(SL11H_HOSTCTLREG), 0);
 			finish_request(sl811, sl811->active_a,
-				container_of(sl811->active_a->queue.next,
-					struct sl811h_req, queue),
+				container_of(sl811->active_a->hep->urb_list.next,
+					struct urb, urb_list),
 				NULL, -ESHUTDOWN);
 			sl811->active_a = NULL;
 		}
@@ -741,8 +734,8 @@
 		if (sl811->active_b) {
 			sl811_write(sl811, SL811_EP_B(SL11H_HOSTCTLREG), 0);
 			finish_request(sl811, sl811->active_b,
-				container_of(sl811->active_b->queue.next,
-					struct sl811h_req, queue),
+				container_of(sl811->active_b->hep->urb_list.next,
+					struct urb, urb_list),
 				NULL, -ESHUTDOWN);
 			sl811->active_b = NULL;
 		}
@@ -767,7 +760,7 @@
 		if (sl811->port1 & (1 << USB_PORT_FEAT_ENABLE))
 			start_transfer(sl811);
 		ret = IRQ_HANDLED;
-		sl811->hcd.saw_irq = 1;
+		hcd->saw_irq = 1;
 		if (retries--)
 			goto retry;
 	}
@@ -816,19 +809,18 @@
 /*-------------------------------------------------------------------------*/
 
 static int sl811h_urb_enqueue(
-	struct usb_hcd	*hcd,
-	struct urb	*urb,
-	int		mem_flags
+	struct usb_hcd		*hcd,
+	struct usb_host_endpoint *hep,
+	struct urb		*urb,
+	int			mem_flags
 ) {
 	struct sl811		*sl811 = hcd_to_sl811(hcd);
 	struct usb_device	*udev = urb->dev;
-	struct hcd_dev		*hdev = (struct hcd_dev *) udev->hcpriv;
 	unsigned int		pipe = urb->pipe;
 	int			is_out = !usb_pipein(pipe);
 	int			type = usb_pipetype(pipe);
 	int			epnum = usb_pipeendpoint(pipe);
 	struct sl811h_ep	*ep = NULL;
-	struct sl811h_req	*req;
 	unsigned long		flags;
 	int			i;
 	int			retval = 0;
@@ -838,36 +830,27 @@
 		return -ENOSPC;
 #endif
 
-	/* avoid all allocations within spinlocks: request or endpoint */
-	urb->hcpriv = req = kmalloc(sizeof *req, mem_flags);
-	if (!req)
-		return -ENOMEM;
-	req->urb = urb;
-
-	i = epnum << 1;
-	if (i && is_out)
-		i |= 1;
-	if (!hdev->ep[i])
+	/* avoid all allocations within spinlocks */
+	if (!hep->hcpriv)
 		ep = kcalloc(1, sizeof *ep, mem_flags);
 
 	spin_lock_irqsave(&sl811->lock, flags);
 
 	/* don't submit to a dead or disabled port */
 	if (!(sl811->port1 & (1 << USB_PORT_FEAT_ENABLE))
-			|| !HCD_IS_RUNNING(sl811->hcd.state)) {
+			|| !HCD_IS_RUNNING(hcd->state)) {
 		retval = -ENODEV;
 		goto fail;
 	}
 
-	if (hdev->ep[i]) {
+	if (hep->hcpriv) {
 		kfree(ep);
-		ep = hdev->ep[i];
+		ep = hep->hcpriv;
 	} else if (!ep) {
 		retval = -ENOMEM;
 		goto fail;
 
 	} else {
-		INIT_LIST_HEAD(&ep->queue);
 		INIT_LIST_HEAD(&ep->schedule);
 		ep->udev = usb_get_dev(udev);
 		ep->epnum = epnum;
@@ -911,7 +894,7 @@
 			break;
 		}
 
-		hdev->ep[i] = ep;
+		hep->hcpriv = ep;
 	}
 
 	/* maybe put endpoint into schedule */
@@ -957,8 +940,7 @@
 			sl811->load[i] += ep->load;
 		}
 		sl811->periodic_count++;
-		hcd_to_bus(&sl811->hcd)->bandwidth_allocated
-				+= ep->load / ep->period;
+		hcd->self.bandwidth_allocated += ep->load / ep->period;
 		sofirq_on(sl811);
 	}
 
@@ -966,47 +948,38 @@
 	spin_lock(&urb->lock);
 	if (urb->status != -EINPROGRESS) {
 		spin_unlock(&urb->lock);
-		finish_request(sl811, ep, req, NULL, 0);
-		req = NULL;
+		finish_request(sl811, ep, urb, NULL, 0);
 		retval = 0;
 		goto fail;
 	}
-	list_add_tail(&req->queue, &ep->queue);
+	urb->hcpriv = hep;
 	spin_unlock(&urb->lock);
 
 	start_transfer(sl811);
 	sl811_write(sl811, SL11H_IRQ_ENABLE, sl811->irq_enable);
 fail:
 	spin_unlock_irqrestore(&sl811->lock, flags);
-	if (retval)
-		kfree(req);
 	return retval;
 }
 
 static int sl811h_urb_dequeue(struct usb_hcd *hcd, struct urb *urb)
 {
 	struct sl811		*sl811 = hcd_to_sl811(hcd);
-	struct usb_device	*udev = urb->dev;
-	struct hcd_dev		*hdev = (struct hcd_dev *) udev->hcpriv;
-	unsigned int		pipe = urb->pipe;
-	int			is_out = !usb_pipein(pipe);
+	struct usb_host_endpoint *hep = urb->hcpriv;
 	unsigned long		flags;
-	unsigned		i;
 	struct sl811h_ep	*ep;
-	struct sl811h_req	*req = urb->hcpriv;
 	int			retval = 0;
 
-	i = usb_pipeendpoint(pipe) << 1;
-	if (i && is_out)
-		i |= 1;
+	if (!hep)
+		return -EINVAL;
 
 	spin_lock_irqsave(&sl811->lock, flags);
-	ep = hdev->ep[i];
+	ep = hep->hcpriv;
 	if (ep) {
 		/* finish right away if this urb can't be active ...
 		 * note that some drivers wrongly expect delays
 		 */
-		if (ep->queue.next != &req->queue) {
+		if (ep->hep->urb_list.next != &urb->urb_list) {
 			/* not front of queue?  never active */
 
 		/* for active transfers, we expect an IRQ */
@@ -1022,7 +995,7 @@
 						0);
 				sl811->active_a = NULL;
 			} else
-				req = NULL;
+				urb = NULL;
 #ifdef	USE_B
 		} else if (sl811->active_b == ep) {
 			if (time_before_eq(sl811->jiffies_a, jiffies)) {
@@ -1036,14 +1009,14 @@
 						0);
 				sl811->active_b = NULL;
 			} else
-				req = NULL;
+				urb = NULL;
 #endif
 		} else {
 			/* front of queue for inactive endpoint */
 		}
 
-		if (req)
-			finish_request(sl811, ep, req, NULL, 0);
+		if (urb)
+			finish_request(sl811, ep, urb, NULL, 0);
 		else
 			VDBG("dequeue, urb %p active %s; wait4irq\n", urb,
 				(sl811->active_a == ep) ? "A" : "B");
@@ -1054,33 +1027,22 @@
 }
 
 static void
-sl811h_endpoint_disable(struct usb_hcd *hcd, struct hcd_dev *hdev, int epnum)
+sl811h_endpoint_disable(struct usb_hcd *hcd, struct usb_host_endpoint *hep)
 {
-	struct sl811		*sl811 = hcd_to_sl811(hcd);
-	struct sl811h_ep	*ep;
-	unsigned long		flags;
-	int			i;
-
-	i = (epnum & 0xf) << 1;
-	if (epnum && !(epnum & USB_DIR_IN))
-		i |= 1;
-
-	spin_lock_irqsave(&sl811->lock, flags);
-	ep = hdev->ep[i];
-	hdev->ep[i] = NULL;
-	spin_unlock_irqrestore(&sl811->lock, flags);
+	struct sl811h_ep	*ep = hep->hcpriv;
 
-	if (ep) {
-		/* assume we'd just wait for the irq */
-		if (!list_empty(&ep->queue))
-			msleep(3);
-		if (!list_empty(&ep->queue))
-			WARN("ep %p not empty?\n", ep);
+	if (!ep)
+		return;
 
-		usb_put_dev(ep->udev);
-		kfree(ep);
-	}
-	return;
+	/* assume we'd just wait for the irq */
+	if (!list_empty(&hep->urb_list))
+		msleep(3);
+	if (!list_empty(&hep->urb_list))
+		WARN("ep %p not empty?\n", ep);
+
+	usb_put_dev(ep->udev);
+	kfree(ep);
+	hep->hcpriv = 0;
 }
 
 static int
@@ -1436,7 +1398,7 @@
 	unsigned		i;
 
 	seq_printf(s, "%s\n%s version %s\nportstatus[1] = %08x\n",
-		sl811->hcd.product_desc,
+		sl811_to_hcd(sl811)->product_desc,
 		hcd_name, DRIVER_VERSION,
 		sl811->port1);
 
@@ -1481,7 +1443,7 @@
 		sl811_read(sl811, SL811_EP_B(SL11H_PKTSTATREG)));
 	seq_printf(s, "\n");
 	list_for_each_entry (ep, &sl811->async, schedule) {
-		struct sl811h_req	*req;
+		struct urb		*urb;
 
 		seq_printf(s, "%s%sqh%p, ep%d%s, maxpacket %d"
 					" nak %d err %d\n",
@@ -1497,10 +1459,10 @@
 			}; s;}),
 			ep->maxpacket,
 			ep->nak_count, ep->error_count);
-		list_for_each_entry (req, &ep->queue, queue) {
-			seq_printf(s, "  urb%p, %d/%d\n", req->urb,
-				req->urb->actual_length,
-				req->urb->transfer_buffer_length);
+		list_for_each_entry (urb, &ep->hep->urb_list, urb_list) {
+			seq_printf(s, "  urb%p, %d/%d\n", urb,
+				urb->actual_length,
+				urb->transfer_buffer_length);
 		}
 	}
 	if (!list_empty(&sl811->async))
@@ -1584,7 +1546,7 @@
 	struct sl811	*sl811 = hcd_to_sl811(hcd);
 	unsigned long	flags;
 
-	del_timer_sync(&sl811->hcd.rh_timer);
+	del_timer_sync(&hcd->rh_timer);
 
 	spin_lock_irqsave(&sl811->lock, flags);
 	port_power(sl811, 0);
@@ -1599,7 +1561,7 @@
 
 	/* chip has been reset, VBUS power is off */
 
-	udev = usb_alloc_dev(NULL, &sl811->hcd.self, 0);
+	udev = usb_alloc_dev(NULL, &hcd->self, 0);
 	if (!udev)
 		return -ENOMEM;
 
@@ -1607,9 +1569,9 @@
 	hcd->state = USB_STATE_RUNNING;
 
 	if (sl811->board)
-		sl811->hcd.can_wakeup = sl811->board->can_wakeup;
+		hcd->can_wakeup = sl811->board->can_wakeup;
 
-	if (hcd_register_root(udev, &sl811->hcd) != 0) {
+	if (hcd_register_root(udev, hcd) != 0) {
 		usb_put_dev(udev);
 		sl811h_stop(hcd);
 		return -ENODEV;
@@ -1625,6 +1587,7 @@
 
 static struct hc_driver sl811h_hc_driver = {
 	.description =		hcd_name,
+	.hcd_priv_size =	sizeof(struct sl811),
 
 	/*
 	 * generic hardware linkage
@@ -1658,35 +1621,32 @@
 sl811h_remove(struct device *dev)
 {
 	struct sl811		*sl811 = dev_get_drvdata(dev);
+	struct usb_hcd		*hcd = sl811_to_hcd(sl811);
 	struct platform_device	*pdev;
 	struct resource		*res;
 
 	pdev = container_of(dev, struct platform_device, dev);
 
-	if (HCD_IS_RUNNING(sl811->hcd.state))
-		sl811->hcd.state = USB_STATE_QUIESCING;
+	if (HCD_IS_RUNNING(hcd->state))
+		hcd->state = USB_STATE_QUIESCING;
 
-	usb_disconnect(&sl811->hcd.self.root_hub);
+	usb_disconnect(&hcd->self.root_hub);
 	remove_debug_file(sl811);
-	sl811h_stop(&sl811->hcd);
+	sl811h_stop(hcd);
 
-	if (!list_empty(&sl811->hcd.self.bus_list))
-		usb_deregister_bus(&sl811->hcd.self);
+	usb_deregister_bus(&hcd->self);
 
-	if (sl811->hcd.irq >= 0)
-		free_irq(sl811->hcd.irq, sl811);
+	free_irq(hcd->irq, hcd);
 
-	if (sl811->data_reg)
-		iounmap(sl811->data_reg);
+	iounmap(sl811->data_reg);
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
 	release_mem_region(res->start, 1);
 
-	if (sl811->addr_reg) 
-		iounmap(sl811->addr_reg);
+	iounmap(sl811->addr_reg);
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	release_mem_region(res->start, 1);
 
-	kfree(sl811);
+	usb_put_hcd(hcd);
 	return 0;
 }
 
@@ -1695,13 +1655,15 @@
 static int __init
 sl811h_probe(struct device *dev)
 {
+	struct usb_hcd		*hcd;
 	struct sl811		*sl811;
 	struct platform_device	*pdev;
 	struct resource		*addr, *data;
 	int			irq;
-	int			status;
+	void __iomem		*addr_reg;
+	void __iomem		*data_reg;
+	int			retval;
 	u8			tmp;
-	unsigned long		flags;
 
 	/* basic sanity checks first.  board-specific init logic should
 	 * have initialized these three resources and probably board
@@ -1724,37 +1686,39 @@
 		return -EINVAL;
 	}
 
-	if (!request_mem_region(addr->start, 1, hcd_name))
-		return -EBUSY;
+	if (!request_mem_region(addr->start, 1, hcd_name)) {
+		retval = -EBUSY;
+		goto err1;
+	}
+	addr_reg = ioremap(addr->start, resource_len(addr));
+	if (addr_reg == NULL) {
+		retval = -ENOMEM;
+		goto err2;
+	}
+
 	if (!request_mem_region(data->start, 1, hcd_name)) {
-		release_mem_region(addr->start, 1);
-		return -EBUSY;
+		retval = -EBUSY;
+		goto err3;
+	}
+	data_reg = ioremap(data->start, resource_len(addr));
+	if (data_reg == NULL) {
+		retval = -ENOMEM;
+		goto err4;
 	}
 
 	/* allocate and initialize hcd */
-	sl811 = kcalloc(1, sizeof *sl811, GFP_KERNEL);
-	if (!sl811)
-		return 0;
+	hcd = usb_create_hcd(&sl811h_hc_driver);
+	if (!hcd) {
+		retval = 0;
+		goto err5;
+	}
+	sl811 = hcd_to_sl811(hcd);
 	dev_set_drvdata(dev, sl811);
 
-	usb_bus_init(&sl811->hcd.self);
-	sl811->hcd.self.controller = dev;
-	sl811->hcd.self.bus_name = dev->bus_id;
-	sl811->hcd.self.op = &usb_hcd_operations;
-	sl811->hcd.self.hcpriv = sl811;
-
-	// NOTE: 2.6.11 starts to change the hcd glue layer some more,
-	// eventually letting us eliminate struct sl811h_req and a
-	// lot of the boilerplate code here 
-
-	INIT_LIST_HEAD(&sl811->hcd.dev_list);
-	sl811->hcd.self.release = &usb_hcd_release;
-
-	sl811->hcd.description = sl811h_hc_driver.description;
-	init_timer(&sl811->hcd.rh_timer);
-	sl811->hcd.driver = &sl811h_hc_driver;
-	sl811->hcd.irq = -1;
-	sl811->hcd.state = USB_STATE_HALT;
+	hcd->self.controller = dev;
+	hcd->self.bus_name = dev->bus_id;
+	hcd->irq = irq;
+	hcd->regs = addr_reg;
 
 	spin_lock_init(&sl811->lock);
 	INIT_LIST_HEAD(&sl811->async);
@@ -1762,36 +1726,27 @@
 	init_timer(&sl811->timer);
 	sl811->timer.function = sl811h_timer;
 	sl811->timer.data = (unsigned long) sl811;
+	sl811->addr_reg = addr_reg;
+	sl811->data_reg = data_reg;
 
-	sl811->addr_reg = ioremap(addr->start, resource_len(addr));
-	if (sl811->addr_reg == NULL) {
-		status = -ENOMEM;
-		goto fail;
-	}
-	sl811->data_reg = ioremap(data->start, resource_len(addr));
-	if (sl811->data_reg == NULL) {
-		status = -ENOMEM;
-		goto fail;
-	}
-
-	spin_lock_irqsave(&sl811->lock, flags);
+	spin_lock_irq(&sl811->lock);
 	port_power(sl811, 0);
-	spin_unlock_irqrestore(&sl811->lock, flags);
+	spin_unlock_irq(&sl811->lock);
 	msleep(200);
 
 	tmp = sl811_read(sl811, SL11H_HWREVREG);
 	switch (tmp >> 4) {
 	case 1:
-		sl811->hcd.product_desc = "SL811HS v1.2";
+		hcd->product_desc = "SL811HS v1.2";
 		break;
 	case 2:
-		sl811->hcd.product_desc = "SL811HS v1.5";
+		hcd->product_desc = "SL811HS v1.5";
 		break;
 	default:
 		/* reject case 0, SL11S is less functional */
 		DBG("chiprev %02x\n", tmp);
-		status = -ENXIO;
-		goto fail;
+		retval = -ENXIO;
+		goto err6;
 	}
 
 	/* sl811s would need a different handler for this irq */
@@ -1799,25 +1754,41 @@
 	/* Cypress docs say the IRQ is IRQT_HIGH ... */
 	set_irq_type(irq, IRQT_RISING);
 #endif
-	status = request_irq(irq, sl811h_irq, SA_INTERRUPT, hcd_name, sl811);
-	if (status < 0)
-		goto fail;
-	sl811->hcd.irq = irq;
+	retval = request_irq(irq, sl811h_irq, SA_INTERRUPT,
+			hcd->driver->description, hcd);
+	if (retval != 0)
+		goto err6;
+
+	INFO("%s, irq %d\n", hcd->product_desc, irq);
+
+	retval = usb_register_bus(&hcd->self);
+	if (retval < 0)
+		goto err7;
+
+	retval = sl811h_start(hcd);
+	if (retval < 0)
+		goto err8;
 
-	INFO("%s, irq %d\n", sl811->hcd.product_desc, irq);
+	create_debug_file(sl811);
+	return 0;
 
-	status = usb_register_bus(&sl811->hcd.self);
-	if (status < 0)
-		goto fail;
-	status = sl811h_start(&sl811->hcd);
-	if (status == 0) {
-		create_debug_file(sl811);
-		return 0;
-	}
-fail:
-	sl811h_remove(dev);
-	DBG("init error, %d\n", status);
-	return status;
+ err8:
+	usb_deregister_bus(&hcd->self);
+ err7:
+	free_irq(hcd->irq, hcd);
+ err6:
+	usb_put_hcd(hcd);
+ err5:
+	iounmap(data_reg);
+ err4:
+	release_mem_region(data->start, 1);
+ err3:
+	iounmap(addr_reg);
+ err2:
+	release_mem_region(addr->start, 1);
+ err1:
+	DBG("init error, %d\n", retval);
+	return retval;
 }
 
 #ifdef	CONFIG_PM
@@ -1837,7 +1808,7 @@
 		return retval;
 
 	if (state <= PM_SUSPEND_MEM)
-		retval = sl811h_hub_suspend(&sl811->hcd);
+		retval = sl811h_hub_suspend(sl811_to_hcd(sl811));
 	else
 		port_power(sl811, 0);
 	if (retval == 0)
@@ -1857,14 +1828,14 @@
 	 * let's assume it'd only be powered to enable remote wakeup.
 	 */
 	if (dev->power.power_state > PM_SUSPEND_MEM
-			|| !sl811->hcd.can_wakeup) {
+			|| !sl811_to_hcd(sl811)->can_wakeup) {
 		sl811->port1 = 0;
 		port_power(sl811, 1);
 		return 0;
 	}
 
 	dev->power.power_state = PM_SUSPEND_ON;
-	return sl811h_hub_resume(&sl811->hcd);
+	return sl811h_hub_resume(sl811_to_hcd(sl811));
 }
 
 #else
diff -Nru a/drivers/usb/host/sl811.h b/drivers/usb/host/sl811.h
--- a/drivers/usb/host/sl811.h	2005-01-10 20:11:19 -08:00
+++ b/drivers/usb/host/sl811.h	2005-01-10 20:11:19 -08:00
@@ -118,7 +118,6 @@
 #define	PERIODIC_SIZE		(1 << LOG2_PERIODIC_SIZE)
 
 struct sl811 {
-	struct usb_hcd		hcd;
 	spinlock_t		lock;
 	void __iomem		*addr_reg;
 	void __iomem		*data_reg;
@@ -158,11 +157,16 @@
 
 static inline struct sl811 *hcd_to_sl811(struct usb_hcd *hcd)
 {
-	return container_of(hcd, struct sl811, hcd);
+	return (struct sl811 *) (hcd->hcd_priv);
+}
+
+static inline struct usb_hcd *sl811_to_hcd(struct sl811 *sl811)
+{
+	return container_of((void *) sl811, struct usb_hcd, hcd_priv);
 }
 
 struct sl811h_ep {
-	struct list_head	queue;
+	struct usb_host_endpoint *hep;
 	struct usb_device	*udev;
 
 	u8			defctrl;
@@ -182,14 +186,6 @@
 
 	/* async schedule */
 	struct list_head	schedule;
-};
-
-struct sl811h_req {
-	/* FIXME usbcore should maintain endpoints' urb queues
-	 * directly in 'struct usb_host_endpoint'
-	 */
-	struct urb		*urb;
-	struct list_head	queue;
 };
 
 /*-------------------------------------------------------------------------*/
diff -Nru a/drivers/usb/host/uhci-debug.c b/drivers/usb/host/uhci-debug.c
--- a/drivers/usb/host/uhci-debug.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/usb/host/uhci-debug.c	2005-01-10 20:11:16 -08:00
@@ -11,7 +11,7 @@
 
 #include <linux/config.h>
 #include <linux/kernel.h>
-#include <linux/proc_fs.h>
+#include <linux/debugfs.h>
 #include <linux/smp_lock.h>
 #include <asm/io.h>
 
@@ -496,19 +496,18 @@
 
 #define MAX_OUTPUT	(64 * 1024)
 
-static struct proc_dir_entry *uhci_proc_root = NULL;
+static struct dentry *uhci_debugfs_root = NULL;
 
-struct uhci_proc {
+struct uhci_debug {
 	int size;
 	char *data;
 	struct uhci_hcd *uhci;
 };
 
-static int uhci_proc_open(struct inode *inode, struct file *file)
+static int uhci_debug_open(struct inode *inode, struct file *file)
 {
-	const struct proc_dir_entry *dp = PDE(inode);
-	struct uhci_hcd *uhci = dp->data;
-	struct uhci_proc *up;
+	struct uhci_hcd *uhci = inode->u.generic_ip;
+	struct uhci_debug *up;
 	int ret = -ENOMEM;
 
 	lock_kernel();
@@ -532,9 +531,9 @@
 	return ret;
 }
 
-static loff_t uhci_proc_lseek(struct file *file, loff_t off, int whence)
+static loff_t uhci_debug_lseek(struct file *file, loff_t off, int whence)
 {
-	struct uhci_proc *up;
+	struct uhci_debug *up;
 	loff_t new = -1;
 
 	lock_kernel();
@@ -556,16 +555,16 @@
 	return (file->f_pos = new);
 }
 
-static ssize_t uhci_proc_read(struct file *file, char __user *buf,
+static ssize_t uhci_debug_read(struct file *file, char __user *buf,
 				size_t nbytes, loff_t *ppos)
 {
-	struct uhci_proc *up = file->private_data;
+	struct uhci_debug *up = file->private_data;
 	return simple_read_from_buffer(buf, nbytes, ppos, up->data, up->size);
 }
 
-static int uhci_proc_release(struct inode *inode, struct file *file)
+static int uhci_debug_release(struct inode *inode, struct file *file)
 {
-	struct uhci_proc *up = file->private_data;
+	struct uhci_debug *up = file->private_data;
 
 	kfree(up->data);
 	kfree(up);
@@ -573,11 +572,10 @@
 	return 0;
 }
 
-static struct file_operations uhci_proc_operations = {
-	.open =		uhci_proc_open,
-	.llseek =	uhci_proc_lseek,
-	.read =		uhci_proc_read,
-//	write:		uhci_proc_write,
-	.release =	uhci_proc_release,
+static struct file_operations uhci_debug_operations = {
+	.open =		uhci_debug_open,
+	.llseek =	uhci_debug_lseek,
+	.read =		uhci_debug_read,
+	.release =	uhci_debug_release,
 };
 #endif
diff -Nru a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c
--- a/drivers/usb/host/uhci-hcd.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/usb/host/uhci-hcd.c	2005-01-10 20:11:22 -08:00
@@ -46,7 +46,7 @@
 #include <linux/unistd.h>
 #include <linux/interrupt.h>
 #include <linux/spinlock.h>
-#include <linux/proc_fs.h>
+#include <linux/debugfs.h>
 #include <linux/pm.h>
 #include <linux/dmapool.h>
 #include <linux/dma-mapping.h>
@@ -74,7 +74,7 @@
  * debug = 0, no debugging messages
  * debug = 1, dump failed URB's except for stalls
  * debug = 2, dump all failed URB's (including stalls)
- *            show all queues in /proc/driver/uhci/[pci_addr]
+ *            show all queues in /debug/uhci/[pci_addr]
  * debug = 3, show all TD's in URB's when dumping
  */
 #ifdef DEBUG
@@ -1255,7 +1255,9 @@
 	return NULL;
 }
 
-static int uhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, int mem_flags)
+static int uhci_urb_enqueue(struct usb_hcd *hcd,
+		struct usb_host_endpoint *ep,
+		struct urb *urb, int mem_flags)
 {
 	int ret;
 	struct uhci_hcd *uhci = hcd_to_uhci(hcd);
@@ -1889,7 +1891,7 @@
 	uhci->state_end = jiffies + HZ;
 	outw(USBCMD_RS | USBCMD_CF | USBCMD_MAXP, io_addr + USBCMD);
 
-        uhci->hcd.state = USB_STATE_RUNNING;
+        uhci_to_hcd(uhci)->state = USB_STATE_RUNNING;
 	return 0;
 }
 
@@ -1927,12 +1929,10 @@
 		uhci->fl = NULL;
 	}
 
-#ifdef CONFIG_PROC_FS
-	if (uhci->proc_entry) {
-		remove_proc_entry(uhci->hcd.self.bus_name, uhci_proc_root);
-		uhci->proc_entry = NULL;
+	if (uhci->dentry) {
+		debugfs_remove(uhci->dentry);
+		uhci->dentry = NULL;
 	}
-#endif
 }
 
 static int uhci_reset(struct usb_hcd *hcd)
@@ -1972,25 +1972,17 @@
 	unsigned io_size;
 	dma_addr_t dma_handle;
 	struct usb_device *udev;
-#ifdef CONFIG_PROC_FS
-	struct proc_dir_entry *ent;
-#endif
+	struct dentry *dentry;
 
 	io_size = pci_resource_len(to_pci_dev(uhci_dev(uhci)), hcd->region);
 
-#ifdef CONFIG_PROC_FS
-	ent = create_proc_entry(hcd->self.bus_name, S_IFREG|S_IRUGO|S_IWUSR, uhci_proc_root);
-	if (!ent) {
-		dev_err(uhci_dev(uhci), "couldn't create uhci proc entry\n");
+	dentry = debugfs_create_file(hcd->self.bus_name, S_IFREG|S_IRUGO|S_IWUSR, uhci_debugfs_root, uhci, &uhci_debug_operations);
+	if (!dentry) {
+		dev_err(uhci_dev(uhci), "couldn't create uhci debugfs entry\n");
 		retval = -ENOMEM;
-		goto err_create_proc_entry;
+		goto err_create_debug_entry;
 	}
-
-	ent->data = uhci;
-	ent->proc_fops = &uhci_proc_operations;
-	ent->size = 0;
-	uhci->proc_entry = ent;
-#endif
+	uhci->dentry = dentry;
 
 	uhci->fsbr = 0;
 	uhci->fsbrtimeout = 0;
@@ -2149,7 +2141,7 @@
 
 	udev->speed = USB_SPEED_FULL;
 
-	if (hcd_register_root(udev, &uhci->hcd) != 0) {
+	if (hcd_register_root(udev, hcd) != 0) {
 		dev_err(uhci_dev(uhci), "unable to start root hub\n");
 		retval = -ENOMEM;
 		goto err_start_root_hub;
@@ -2192,13 +2184,10 @@
 	uhci->fl = NULL;
 
 err_alloc_fl:
-#ifdef CONFIG_PROC_FS
-	remove_proc_entry(hcd->self.bus_name, uhci_proc_root);
-	uhci->proc_entry = NULL;
-
-err_create_proc_entry:
-#endif
+	debugfs_remove(uhci->dentry);
+	uhci->dentry = NULL;
 
+err_create_debug_entry:
 	return retval;
 }
 
@@ -2275,62 +2264,18 @@
 		if ((rc = start_hc(uhci)) != 0)
 			return rc;
 	}
-	uhci->hcd.state = USB_STATE_RUNNING;
+	hcd->state = USB_STATE_RUNNING;
 	return 0;
 }
 #endif
 
-static struct usb_hcd *uhci_hcd_alloc(void)
-{
-	struct uhci_hcd *uhci;
-
-	uhci = (struct uhci_hcd *)kmalloc(sizeof(*uhci), GFP_KERNEL);
-	if (!uhci)
-		return NULL;
-
-	memset(uhci, 0, sizeof(*uhci));
-	uhci->hcd.product_desc = "UHCI Host Controller";
-	return &uhci->hcd;
-}
-
-/* Are there any URBs for a particular device/endpoint on a given list? */
-static int urbs_for_ep_list(struct list_head *head,
-		struct hcd_dev *hdev, int ep)
-{
-	struct urb_priv *urbp;
-
-	list_for_each_entry(urbp, head, urb_list) {
-		struct urb *urb = urbp->urb;
-
-		if (hdev == urb->dev->hcpriv && ep ==
-				(usb_pipeendpoint(urb->pipe) |
-				 usb_pipein(urb->pipe)))
-			return 1;
-	}
-	return 0;
-}
-
-/* Are there any URBs for a particular device/endpoint? */
-static int urbs_for_ep(struct uhci_hcd *uhci, struct hcd_dev *hdev, int ep)
-{
-	int rc;
-
-	spin_lock_irq(&uhci->schedule_lock);
-	rc = (urbs_for_ep_list(&uhci->urb_list, hdev, ep) ||
-			urbs_for_ep_list(&uhci->complete_list, hdev, ep) ||
-			urbs_for_ep_list(&uhci->urb_remove_list, hdev, ep));
-	spin_unlock_irq(&uhci->schedule_lock);
-	return rc;
-}
-
 /* Wait until all the URBs for a particular device/endpoint are gone */
 static void uhci_hcd_endpoint_disable(struct usb_hcd *hcd,
-		struct hcd_dev *hdev, int endpoint)
+		struct usb_host_endpoint *ep)
 {
 	struct uhci_hcd *uhci = hcd_to_uhci(hcd);
 
-	wait_event_interruptible(uhci->waitqh,
-			!urbs_for_ep(uhci, hdev, endpoint));
+	wait_event_interruptible(uhci->waitqh, list_empty(&ep->urb_list));
 }
 
 static int uhci_hcd_get_frame_number(struct usb_hcd *hcd)
@@ -2342,6 +2287,8 @@
 
 static const struct hc_driver uhci_driver = {
 	.description =		hcd_name,
+	.product_desc =		"UHCI Host Controller",
+	.hcd_priv_size =	sizeof(struct uhci_hcd),
 
 	/* Generic hardware linkage */
 	.irq =			uhci_irq,
@@ -2356,8 +2303,6 @@
 #endif
 	.stop =			uhci_stop,
 
-	.hcd_alloc =		uhci_hcd_alloc,
-
 	.urb_enqueue =		uhci_urb_enqueue,
 	.urb_dequeue =		uhci_urb_dequeue,
 
@@ -2405,11 +2350,9 @@
 			goto errbuf_failed;
 	}
 
-#ifdef CONFIG_PROC_FS
-	uhci_proc_root = create_proc_entry("driver/uhci", S_IFDIR, NULL);
-	if (!uhci_proc_root)
-		goto proc_failed;
-#endif
+	uhci_debugfs_root = debugfs_create_dir("uhci", NULL);
+	if (!uhci_debugfs_root)
+		goto debug_failed;
 
 	uhci_up_cachep = kmem_cache_create("uhci_urb_priv",
 		sizeof(struct urb_priv), 0, 0, NULL, NULL);
@@ -2427,12 +2370,9 @@
 		warn("not all urb_priv's were freed!");
 
 up_failed:
+	debugfs_remove(uhci_debugfs_root);
 
-#ifdef CONFIG_PROC_FS
-	remove_proc_entry("driver/uhci", NULL);
-
-proc_failed:
-#endif
+debug_failed:
 	if (errbuf)
 		kfree(errbuf);
 
@@ -2448,9 +2388,7 @@
 	if (kmem_cache_destroy(uhci_up_cachep))
 		warn("not all urb_priv's were freed!");
 
-#ifdef CONFIG_PROC_FS
-	remove_proc_entry("driver/uhci", NULL);
-#endif
+	debugfs_remove(uhci_debugfs_root);
 
 	if (errbuf)
 		kfree(errbuf);
diff -Nru a/drivers/usb/host/uhci-hcd.h b/drivers/usb/host/uhci-hcd.h
--- a/drivers/usb/host/uhci-hcd.h	2005-01-10 20:11:21 -08:00
+++ b/drivers/usb/host/uhci-hcd.h	2005-01-10 20:11:21 -08:00
@@ -314,9 +314,6 @@
 	UHCI_RESUMING_2
 };
 
-#define hcd_to_uhci(hcd_ptr) container_of(hcd_ptr, struct uhci_hcd, hcd)
-#define uhci_dev(u)	((u)->hcd.self.controller)
-
 /*
  * This describes the full uhci information.
  *
@@ -324,12 +321,9 @@
  * a subset of what the full implementation needs.
  */
 struct uhci_hcd {
-	struct usb_hcd hcd;		/* must come first! */
 
-#ifdef CONFIG_PROC_FS
-	/* procfs */
-	struct proc_dir_entry *proc_entry;
-#endif
+	/* debugfs */
+	struct dentry *dentry;
 
 	/* Grabbed from PCI */
 	unsigned long io_addr;
@@ -382,6 +376,18 @@
 
 	wait_queue_head_t waitqh;		/* endpoint_disable waiters */
 };
+
+/* Convert between a usb_hcd pointer and the corresponding uhci_hcd */
+static inline struct uhci_hcd *hcd_to_uhci(struct usb_hcd *hcd)
+{
+	return (struct uhci_hcd *) (hcd->hcd_priv);
+}
+static inline struct usb_hcd *uhci_to_hcd(struct uhci_hcd *uhci)
+{
+	return container_of((void *) uhci, struct usb_hcd, hcd_priv);
+}
+
+#define uhci_dev(u)	(uhci_to_hcd(u)->self.controller)
 
 struct urb_priv {
 	struct list_head urb_list;
diff -Nru a/drivers/usb/image/Kconfig b/drivers/usb/image/Kconfig
--- a/drivers/usb/image/Kconfig	2005-01-10 20:11:16 -08:00
+++ b/drivers/usb/image/Kconfig	2005-01-10 20:11:16 -08:00
@@ -31,7 +31,7 @@
 
 config USB_HPUSBSCSI
 	tristate "HP53xx USB scanner support"
-	depends on USB && SCSI
+	depends on USB && SCSI && BROKEN
 	help
 	  Say Y here if you want support for the HP 53xx series of scanners
 	  and the Minolta Scan Dual.
diff -Nru a/drivers/usb/image/mdc800.c b/drivers/usb/image/mdc800.c
--- a/drivers/usb/image/mdc800.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/usb/image/mdc800.c	2005-01-10 20:11:19 -08:00
@@ -182,12 +182,47 @@
 /* Specification of the Endpoints */
 static struct usb_endpoint_descriptor mdc800_ed [4] =
 {
-	{ 0,0, 0x01, 0x02,  8, 0,0,0 },
-	{ 0,0, 0x82, 0x03,  8, 0,0,0 },
-	{ 0,0, 0x03, 0x02, 64, 0,0,0 },
-	{ 0,0, 0x84, 0x02, 64, 0,0,0 }
+	{ 
+		.bLength = 		0,
+		.bDescriptorType =	0,
+		.bEndpointAddress =	0x01,
+		.bmAttributes = 	0x02,
+		.wMaxPacketSize =	__constant_cpu_to_le16(8),
+		.bInterval = 		0,
+		.bRefresh = 		0,
+		.bSynchAddress = 	0,
+	},
+	{
+		.bLength = 		0,
+		.bDescriptorType = 	0,
+		.bEndpointAddress = 	0x82,
+		.bmAttributes = 	0x03,
+		.wMaxPacketSize = 	__constant_cpu_to_le16(8),
+		.bInterval = 		0,
+		.bRefresh = 		0,
+		.bSynchAddress = 	0,
+	},
+	{
+		.bLength = 		0,
+		.bDescriptorType = 	0,
+		.bEndpointAddress = 	0x03,
+		.bmAttributes = 	0x02,
+		.wMaxPacketSize = 	__constant_cpu_to_le16(64),
+		.bInterval = 		0,
+		.bRefresh = 		0,
+		.bSynchAddress = 	0,
+	},
+	{
+		.bLength = 		0,
+		.bDescriptorType = 	0,
+		.bEndpointAddress = 	0x84,
+		.bmAttributes = 	0x02,
+		.wMaxPacketSize = 	__constant_cpu_to_le16(64),
+		.bInterval = 		0,
+		.bRefresh = 		0,
+		.bSynchAddress = 	0,
+	},
 };
-
 
 /* The Variable used by the driver */
 static struct mdc800_data* mdc800;
diff -Nru a/drivers/usb/image/microtek.c b/drivers/usb/image/microtek.c
--- a/drivers/usb/image/microtek.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/usb/image/microtek.c	2005-01-10 20:11:23 -08:00
@@ -715,8 +715,8 @@
 	MTS_DEBUG( "usb-device descriptor at %x\n", (int)dev );
 
 	MTS_DEBUG( "product id = 0x%x, vendor id = 0x%x\n",
-		   (int)dev->descriptor.idProduct,
-		   (int)dev->descriptor.idVendor );
+		   le16_to_cpu(dev->descriptor.idProduct),
+		   le16_to_cpu(dev->descriptor.idVendor) );
 
 	MTS_DEBUG_GOT_HERE();
 
diff -Nru a/drivers/usb/input/aiptek.c b/drivers/usb/input/aiptek.c
--- a/drivers/usb/input/aiptek.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/usb/input/aiptek.c	2005-01-10 20:11:21 -08:00
@@ -2137,9 +2137,9 @@
 	aiptek->inputdev.name = "Aiptek";
 	aiptek->inputdev.phys = aiptek->features.usbPath;
 	aiptek->inputdev.id.bustype = BUS_USB;
-	aiptek->inputdev.id.vendor = usbdev->descriptor.idVendor;
-	aiptek->inputdev.id.product = usbdev->descriptor.idProduct;
-	aiptek->inputdev.id.version = usbdev->descriptor.bcdDevice;
+	aiptek->inputdev.id.vendor = le16_to_cpu(usbdev->descriptor.idVendor);
+	aiptek->inputdev.id.product = le16_to_cpu(usbdev->descriptor.idProduct);
+	aiptek->inputdev.id.version = le16_to_cpu(usbdev->descriptor.bcdDevice);
 
 	aiptek->usbdev = usbdev;
 	aiptek->ifnum = intf->altsetting[0].desc.bInterfaceNumber;
diff -Nru a/drivers/usb/input/ati_remote.c b/drivers/usb/input/ati_remote.c
--- a/drivers/usb/input/ati_remote.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/usb/input/ati_remote.c	2005-01-10 20:11:21 -08:00
@@ -672,9 +672,9 @@
 	idev->phys = ati_remote->phys;
 	
 	idev->id.bustype = BUS_USB;		
-	idev->id.vendor = ati_remote->udev->descriptor.idVendor;
-	idev->id.product = ati_remote->udev->descriptor.idProduct;
-	idev->id.version = ati_remote->udev->descriptor.bcdDevice;
+	idev->id.vendor = le16_to_cpu(ati_remote->udev->descriptor.idVendor);
+	idev->id.product = le16_to_cpu(ati_remote->udev->descriptor.idProduct);
+	idev->id.version = le16_to_cpu(ati_remote->udev->descriptor.bcdDevice);
 }
 
 static int ati_remote_initialize(struct ati_remote *ati_remote)
@@ -729,13 +729,6 @@
 	char path[64];
 	char *buf = NULL;
 
-	/* See if the offered device matches what we can accept */
-	if ((udev->descriptor.idVendor != ATI_REMOTE_VENDOR_ID) ||
-		( (udev->descriptor.idProduct != ATI_REMOTE_PRODUCT_ID) &&
-		  (udev->descriptor.idProduct != LOLA_REMOTE_PRODUCT_ID) &&
-		  (udev->descriptor.idProduct != MEDION_REMOTE_PRODUCT_ID) ))
-		return -ENODEV;
-
 	/* Allocate and clear an ati_remote struct */
 	if (!(ati_remote = kmalloc(sizeof (struct ati_remote), GFP_KERNEL)))
 		return -ENOMEM;
@@ -763,7 +756,7 @@
 		retval = -ENODEV;
 		goto error;
 	}
-	if (ati_remote->endpoint_in->wMaxPacketSize == 0) {
+	if (le16_to_cpu(ati_remote->endpoint_in->wMaxPacketSize) == 0) {
 		err("%s: endpoint_in message size==0? \n", __FUNCTION__);
 		retval = -ENODEV;
 		goto error;
@@ -803,8 +796,8 @@
 
 	if (!strlen(ati_remote->name))
 		sprintf(ati_remote->name, DRIVER_DESC "(%04x,%04x)",
-			ati_remote->udev->descriptor.idVendor, 
-			ati_remote->udev->descriptor.idProduct);
+			le16_to_cpu(ati_remote->udev->descriptor.idVendor), 
+			le16_to_cpu(ati_remote->udev->descriptor.idProduct));
 
 	/* Device Hardware Initialization - fills in ati_remote->idev from udev. */
 	retval = ati_remote_initialize(ati_remote);
diff -Nru a/drivers/usb/input/hid-core.c b/drivers/usb/input/hid-core.c
--- a/drivers/usb/input/hid-core.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/usb/input/hid-core.c	2005-01-10 20:11:19 -08:00
@@ -1281,9 +1281,14 @@
 static int hid_get_class_descriptor(struct usb_device *dev, int ifnum,
 		unsigned char type, void *buf, int size)
 {
-	return usb_control_msg(dev, usb_rcvctrlpipe(dev, 0),
-		USB_REQ_GET_DESCRIPTOR, USB_RECIP_INTERFACE | USB_DIR_IN,
-		(type << 8), ifnum, buf, size, HZ * USB_CTRL_GET_TIMEOUT);
+	int result, retries = 4;
+	do {
+		result = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0),
+				USB_REQ_GET_DESCRIPTOR, USB_RECIP_INTERFACE | USB_DIR_IN,
+				(type << 8), ifnum, buf, size, HZ * USB_CTRL_GET_TIMEOUT);
+		retries--;
+	} while (result < 0 && retries);
+	return result;
 }
 
 int hid_open(struct hid_device *hid)
@@ -1314,7 +1319,7 @@
 	struct hid_report_enum *report_enum;
 	struct hid_report *report;
 	struct list_head *list;
-	int err, ret;
+	int err, ret, size;
 
 	/*
 	 * The Set_Idle request is supposed to affect only the
@@ -1337,6 +1342,10 @@
 	list = report_enum->report_list.next;
 	while (list != &report_enum->report_list) {
 		report = (struct hid_report *) list;
+		size = ((report->size - 1) >> 3) + 1 + report_enum->numbered;
+		if (size > HID_BUFFER_SIZE) size = HID_BUFFER_SIZE;
+		if (size > hid->urbin->transfer_buffer_length)
+			hid->urbin->transfer_buffer_length = size;
 		hid_submit_report(hid, report, USB_DIR_IN);
 		list = list->next;
 	}
@@ -1460,11 +1469,11 @@
 #define USB_DEVICE_ID_1_PHIDGETSERVO_20	0x8101
 #define USB_DEVICE_ID_4_PHIDGETSERVO_20	0x8104
 
-#define USB_VENDOR_ID_CODEMERCS        0x07c0
-#define USB_DEVICE_ID_CODEMERCS_IOW40  0x1500
-#define USB_DEVICE_ID_CODEMERCS_IOW24  0x1501
-#define USB_DEVICE_ID_CODEMERCS_IOW48  0x1502
-#define USB_DEVICE_ID_CODEMERCS_IOW28  0x1503
+#define USB_VENDOR_ID_CODEMERCS		0x07c0
+#define USB_DEVICE_ID_CODEMERCS_IOW40	0x1500
+#define USB_DEVICE_ID_CODEMERCS_IOW24	0x1501
+#define USB_DEVICE_ID_CODEMERCS_IOW48	0x1502
+#define USB_DEVICE_ID_CODEMERCS_IOW28	0x1503
 
 #define USB_VENDOR_ID_DELORME		0x1163
 #define USB_DEVICE_ID_DELORME_EARTHMATE 0x0100
@@ -1485,8 +1494,16 @@
 	{ USB_VENDOR_ID_BERKSHIRE, USB_DEVICE_ID_BERKSHIRE_PCWD, HID_QUIRK_IGNORE },
 	{ USB_VENDOR_ID_CODEMERCS, USB_DEVICE_ID_CODEMERCS_IOW40, HID_QUIRK_IGNORE },
 	{ USB_VENDOR_ID_CODEMERCS, USB_DEVICE_ID_CODEMERCS_IOW24, HID_QUIRK_IGNORE },
+	{ USB_VENDOR_ID_CODEMERCS, USB_DEVICE_ID_CODEMERCS_IOW48, HID_QUIRK_IGNORE },
+	{ USB_VENDOR_ID_CODEMERCS, USB_DEVICE_ID_CODEMERCS_IOW28, HID_QUIRK_IGNORE },
+	
 	{ USB_VENDOR_ID_ESSENTIAL_REALITY, USB_DEVICE_ID_ESSENTIAL_REALITY_P5, HID_QUIRK_IGNORE },
 	{ USB_VENDOR_ID_KBGEAR, USB_DEVICE_ID_KBGEAR_JAMSTUDIO, HID_QUIRK_IGNORE },
+	{ USB_VENDOR_ID_GLAB, USB_DEVICE_ID_4_PHIDGETSERVO_30, HID_QUIRK_IGNORE },
+	{ USB_VENDOR_ID_GLAB, USB_DEVICE_ID_1_PHIDGETSERVO_30, HID_QUIRK_IGNORE },
+	{ USB_VENDOR_ID_GLAB, USB_DEVICE_ID_8_8_8_IF_KIT, HID_QUIRK_IGNORE },
+	{ USB_VENDOR_ID_GLAB, USB_DEVICE_ID_0_0_4_IF_KIT, HID_QUIRK_IGNORE },
+	{ USB_VENDOR_ID_GLAB, USB_DEVICE_ID_0_8_8_IF_KIT, HID_QUIRK_IGNORE },
 	{ USB_VENDOR_ID_GRIFFIN, USB_DEVICE_ID_POWERMATE, HID_QUIRK_IGNORE },
 	{ USB_VENDOR_ID_GRIFFIN, USB_DEVICE_ID_SOUNDKNOB, HID_QUIRK_IGNORE },
 	{ USB_VENDOR_ID_MGE, USB_DEVICE_ID_MGE_UPS, HID_QUIRK_IGNORE },
@@ -1522,15 +1539,9 @@
 	{ USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2 + 7, HID_QUIRK_IGNORE },
 	{ USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_VOLITO, HID_QUIRK_IGNORE },
 	{ USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PTU, HID_QUIRK_IGNORE },
-
-	{ USB_VENDOR_ID_GLAB, USB_DEVICE_ID_4_PHIDGETSERVO_30, HID_QUIRK_IGNORE },
-	{ USB_VENDOR_ID_GLAB, USB_DEVICE_ID_1_PHIDGETSERVO_30, HID_QUIRK_IGNORE },
-	{ USB_VENDOR_ID_GLAB, USB_DEVICE_ID_8_8_8_IF_KIT, HID_QUIRK_IGNORE },
-	{ USB_VENDOR_ID_GLAB, USB_DEVICE_ID_0_0_4_IF_KIT, HID_QUIRK_IGNORE },
-	{ USB_VENDOR_ID_GLAB, USB_DEVICE_ID_0_8_8_IF_KIT, HID_QUIRK_IGNORE },
-
 	{ USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_4_PHIDGETSERVO_20, HID_QUIRK_IGNORE },
 	{ USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_1_PHIDGETSERVO_20, HID_QUIRK_IGNORE },
+	
 
 	{ USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_UC100KM, HID_QUIRK_NOGET },
 	{ USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_CS124U, HID_QUIRK_NOGET },
@@ -1539,8 +1550,8 @@
 	{ USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_4PORTKVMC, HID_QUIRK_NOGET },
 	{ USB_VENDOR_ID_TANGTOP, USB_DEVICE_ID_TANGTOP_USBPS2, HID_QUIRK_NOGET },
 
-	{ USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_WCP32PU, HID_QUIRK_2WHEEL_MOUSE_HACK_BACK },
-	{ USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_MOUSE, HID_QUIRK_2WHEEL_MOUSE_HACK_EXTRA },
+	{ USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_WCP32PU, HID_QUIRK_2WHEEL_MOUSE_HACK_7 },
+	{ USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_MOUSE, HID_QUIRK_2WHEEL_MOUSE_HACK_5 },
 	{ USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_HIDCOM, HID_QUIRK_IGNORE },
 
 	{ USB_VENDOR_ID_ALPS, USB_DEVICE_ID_IBM_GAMEPAD, HID_QUIRK_BADPAD },
@@ -1599,8 +1610,8 @@
 	int n;
 
 	for (n = 0; hid_blacklist[n].idVendor; n++)
-		if ((hid_blacklist[n].idVendor == dev->descriptor.idVendor) &&
-			(hid_blacklist[n].idProduct == dev->descriptor.idProduct))
+		if ((hid_blacklist[n].idVendor == le16_to_cpu(dev->descriptor.idVendor)) &&
+			(hid_blacklist[n].idProduct == le16_to_cpu(dev->descriptor.idProduct)))
 				quirks = hid_blacklist[n].quirks;
 
 	if (quirks & HID_QUIRK_IGNORE)
@@ -1669,17 +1680,12 @@
 			interval = 1 << (interval - 1);
 
 		if (endpoint->bEndpointAddress & USB_DIR_IN) {
-			int len;
-
 			if (hid->urbin)
 				continue;
 			if (!(hid->urbin = usb_alloc_urb(0, GFP_KERNEL)))
 				goto fail;
 			pipe = usb_rcvintpipe(dev, endpoint->bEndpointAddress);
-			len = usb_maxpacket(dev, pipe, 0);
-			if (len > HID_BUFFER_SIZE)
-				len = HID_BUFFER_SIZE;
-			usb_fill_int_urb(hid->urbin, dev, pipe, hid->inbuf, len,
+			usb_fill_int_urb(hid->urbin, dev, pipe, hid->inbuf, 0,
 					 hid_irq_in, hid, interval);
 			hid->urbin->transfer_dma = hid->inbuf_dma;
 			hid->urbin->transfer_flags |=(URB_NO_TRANSFER_DMA_MAP | URB_ASYNC_UNLINK);
@@ -1724,7 +1730,9 @@
 	} else if (usb_string(dev, dev->descriptor.iProduct, buf, 128) > 0) {
 			snprintf(hid->name, 128, "%s", buf);
 	} else
-		snprintf(hid->name, 128, "%04x:%04x", dev->descriptor.idVendor, dev->descriptor.idProduct);
+		snprintf(hid->name, 128, "%04x:%04x", 
+			 le16_to_cpu(dev->descriptor.idVendor),
+			 le16_to_cpu(dev->descriptor.idProduct));
 
 	usb_make_path(dev, buf, 64);
 	snprintf(hid->phys, 64, "%s/input%d", buf,
diff -Nru a/drivers/usb/input/hid-debug.h b/drivers/usb/input/hid-debug.h
--- a/drivers/usb/input/hid-debug.h	2005-01-10 20:11:19 -08:00
+++ b/drivers/usb/input/hid-debug.h	2005-01-10 20:11:19 -08:00
@@ -27,6 +27,8 @@
  * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic
  */
 
+#include <linux/input.h>
+
 struct hid_usage_entry {
 	unsigned  page;
 	unsigned  usage;
@@ -323,7 +325,7 @@
 	printk(".");
 	for (p = hid_usage_table; p->description; p++)
 		if (p->page == (usage >> 16)) {
-			for(++p; p->description && p->page != 0; p++)
+			for(++p; p->description && p->usage != 0; p++)
 				if (p->usage == (usage & 0xffff)) {
 					printk("%s", p->description);
 					return;
@@ -461,4 +463,264 @@
 	printk("hid-debug: input ");
 	resolv_usage(usage->hid);
 	printk(" = %d\n", value);
+}
+
+
+static char *events[EV_MAX + 1] = {
+	[0 ... EV_MAX] = NULL,
+	[EV_SYN] = "Sync",			[EV_KEY] = "Key",
+	[EV_REL] = "Relative",			[EV_ABS] = "Absolute",
+	[EV_MSC] = "Misc",			[EV_LED] = "LED",
+	[EV_SND] = "Sound",			[EV_REP] = "Repeat",
+	[EV_FF] = "ForceFeedback",		[EV_PWR] = "Power",
+	[EV_FF_STATUS] = "ForceFeedbackStatus",
+};
+
+static char *syncs[2] = {
+	[0 ... 1] = NULL,
+	[SYN_REPORT] = "Report",		[SYN_CONFIG] = "Config",
+};
+static char *keys[KEY_MAX + 1] = {
+	[0 ... KEY_MAX] = NULL,
+	[KEY_RESERVED] = "Reserved",		[KEY_ESC] = "Esc",
+	[KEY_1] = "1",				[KEY_2] = "2",
+	[KEY_3] = "3",				[KEY_4] = "4",
+	[KEY_5] = "5",				[KEY_6] = "6",
+	[KEY_7] = "7",				[KEY_8] = "8",
+	[KEY_9] = "9",				[KEY_0] = "0",
+	[KEY_MINUS] = "Minus",			[KEY_EQUAL] = "Equal",
+	[KEY_BACKSPACE] = "Backspace",		[KEY_TAB] = "Tab",
+	[KEY_Q] = "Q",				[KEY_W] = "W",
+	[KEY_E] = "E",				[KEY_R] = "R",
+	[KEY_T] = "T",				[KEY_Y] = "Y",
+	[KEY_U] = "U",				[KEY_I] = "I",
+	[KEY_O] = "O",				[KEY_P] = "P",
+	[KEY_LEFTBRACE] = "LeftBrace",		[KEY_RIGHTBRACE] = "RightBrace",
+	[KEY_ENTER] = "Enter",			[KEY_LEFTCTRL] = "LeftControl",
+	[KEY_A] = "A",				[KEY_S] = "S",
+	[KEY_D] = "D",				[KEY_F] = "F",
+	[KEY_G] = "G",				[KEY_H] = "H",
+	[KEY_J] = "J",				[KEY_K] = "K",
+	[KEY_L] = "L",				[KEY_SEMICOLON] = "Semicolon",
+	[KEY_APOSTROPHE] = "Apostrophe",	[KEY_GRAVE] = "Grave",
+	[KEY_LEFTSHIFT] = "LeftShift",		[KEY_BACKSLASH] = "BackSlash",
+	[KEY_Z] = "Z",				[KEY_X] = "X",
+	[KEY_C] = "C",				[KEY_V] = "V",
+	[KEY_B] = "B",				[KEY_N] = "N",
+	[KEY_M] = "M",				[KEY_COMMA] = "Comma",
+	[KEY_DOT] = "Dot",			[KEY_SLASH] = "Slash",
+	[KEY_RIGHTSHIFT] = "RightShift",	[KEY_KPASTERISK] = "KPAsterisk",
+	[KEY_LEFTALT] = "LeftAlt",		[KEY_SPACE] = "Space",
+	[KEY_CAPSLOCK] = "CapsLock",		[KEY_F1] = "F1",
+	[KEY_F2] = "F2",			[KEY_F3] = "F3",
+	[KEY_F4] = "F4",			[KEY_F5] = "F5",
+	[KEY_F6] = "F6",			[KEY_F7] = "F7",
+	[KEY_F8] = "F8",			[KEY_F9] = "F9",
+	[KEY_F10] = "F10",			[KEY_NUMLOCK] = "NumLock",
+	[KEY_SCROLLLOCK] = "ScrollLock",	[KEY_KP7] = "KP7",
+	[KEY_KP8] = "KP8",			[KEY_KP9] = "KP9",
+	[KEY_KPMINUS] = "KPMinus",		[KEY_KP4] = "KP4",
+	[KEY_KP5] = "KP5",			[KEY_KP6] = "KP6",
+	[KEY_KPPLUS] = "KPPlus",		[KEY_KP1] = "KP1",
+	[KEY_KP2] = "KP2",			[KEY_KP3] = "KP3",
+	[KEY_KP0] = "KP0",			[KEY_KPDOT] = "KPDot",
+	[KEY_ZENKAKUHANKAKU] = "Zenkaku/Hankaku", [KEY_102ND] = "102nd",
+	[KEY_F11] = "F11",			[KEY_F12] = "F12",
+	[KEY_RO] = "RO",			[KEY_KATAKANA] = "Katakana",
+	[KEY_HIRAGANA] = "HIRAGANA",		[KEY_HENKAN] = "Henkan",
+	[KEY_KATAKANAHIRAGANA] = "Katakana/Hiragana", [KEY_MUHENKAN] = "Muhenkan",
+	[KEY_KPJPCOMMA] = "KPJpComma",		[KEY_KPENTER] = "KPEnter",
+	[KEY_RIGHTCTRL] = "RightCtrl",		[KEY_KPSLASH] = "KPSlash",
+	[KEY_SYSRQ] = "SysRq",			[KEY_RIGHTALT] = "RightAlt",
+	[KEY_LINEFEED] = "LineFeed",		[KEY_HOME] = "Home",
+	[KEY_UP] = "Up",			[KEY_PAGEUP] = "PageUp",
+	[KEY_LEFT] = "Left",			[KEY_RIGHT] = "Right",
+	[KEY_END] = "End",			[KEY_DOWN] = "Down",
+	[KEY_PAGEDOWN] = "PageDown",		[KEY_INSERT] = "Insert",
+	[KEY_DELETE] = "Delete",		[KEY_MACRO] = "Macro",
+	[KEY_MUTE] = "Mute",			[KEY_VOLUMEDOWN] = "VolumeDown",
+	[KEY_VOLUMEUP] = "VolumeUp",		[KEY_POWER] = "Power",
+	[KEY_KPEQUAL] = "KPEqual",		[KEY_KPPLUSMINUS] = "KPPlusMinus",
+	[KEY_PAUSE] = "Pause",			[KEY_KPCOMMA] = "KPComma",
+	[KEY_HANGUEL] = "Hanguel",		[KEY_HANJA] = "Hanja",
+	[KEY_YEN] = "Yen",			[KEY_LEFTMETA] = "LeftMeta",
+	[KEY_RIGHTMETA] = "RightMeta",		[KEY_COMPOSE] = "Compose",
+	[KEY_STOP] = "Stop",			[KEY_AGAIN] = "Again",
+	[KEY_PROPS] = "Props",			[KEY_UNDO] = "Undo",
+	[KEY_FRONT] = "Front",			[KEY_COPY] = "Copy",
+	[KEY_OPEN] = "Open",			[KEY_PASTE] = "Paste",
+	[KEY_FIND] = "Find",			[KEY_CUT] = "Cut",
+	[KEY_HELP] = "Help",			[KEY_MENU] = "Menu",
+	[KEY_CALC] = "Calc",			[KEY_SETUP] = "Setup",
+	[KEY_SLEEP] = "Sleep",			[KEY_WAKEUP] = "WakeUp",
+	[KEY_FILE] = "File",			[KEY_SENDFILE] = "SendFile",
+	[KEY_DELETEFILE] = "DeleteFile",	[KEY_XFER] = "X-fer",
+	[KEY_PROG1] = "Prog1",			[KEY_PROG2] = "Prog2",
+	[KEY_WWW] = "WWW",			[KEY_MSDOS] = "MSDOS",
+	[KEY_COFFEE] = "Coffee",		[KEY_DIRECTION] = "Direction",
+	[KEY_CYCLEWINDOWS] = "CycleWindows",	[KEY_MAIL] = "Mail",
+	[KEY_BOOKMARKS] = "Bookmarks",		[KEY_COMPUTER] = "Computer",
+	[KEY_BACK] = "Back",			[KEY_FORWARD] = "Forward",
+	[KEY_CLOSECD] = "CloseCD",		[KEY_EJECTCD] = "EjectCD",
+	[KEY_EJECTCLOSECD] = "EjectCloseCD",	[KEY_NEXTSONG] = "NextSong",
+	[KEY_PLAYPAUSE] = "PlayPause",		[KEY_PREVIOUSSONG] = "PreviousSong",
+	[KEY_STOPCD] = "StopCD",		[KEY_RECORD] = "Record",
+	[KEY_REWIND] = "Rewind",		[KEY_PHONE] = "Phone",
+	[KEY_ISO] = "ISOKey",			[KEY_CONFIG] = "Config",
+	[KEY_HOMEPAGE] = "HomePage",		[KEY_REFRESH] = "Refresh",
+	[KEY_EXIT] = "Exit",			[KEY_MOVE] = "Move",
+	[KEY_EDIT] = "Edit",			[KEY_SCROLLUP] = "ScrollUp",
+	[KEY_SCROLLDOWN] = "ScrollDown",	[KEY_KPLEFTPAREN] = "KPLeftParenthesis",
+	[KEY_KPRIGHTPAREN] = "KPRightParenthesis", [KEY_F13] = "F13",
+	[KEY_F14] = "F14",			[KEY_F15] = "F15",
+	[KEY_F16] = "F16",			[KEY_F17] = "F17",
+	[KEY_F18] = "F18",			[KEY_F19] = "F19",
+	[KEY_F20] = "F20",			[KEY_F21] = "F21",
+	[KEY_F22] = "F22",			[KEY_F23] = "F23",
+	[KEY_F24] = "F24",			[KEY_PLAYCD] = "PlayCD",
+	[KEY_PAUSECD] = "PauseCD",		[KEY_PROG3] = "Prog3",
+	[KEY_PROG4] = "Prog4",			[KEY_SUSPEND] = "Suspend",
+	[KEY_CLOSE] = "Close",			[KEY_PLAY] = "Play",
+	[KEY_FASTFORWARD] = "Fast Forward",	[KEY_BASSBOOST] = "Bass Boost",
+	[KEY_PRINT] = "Print",			[KEY_HP] = "HP",
+	[KEY_CAMERA] = "Camera",		[KEY_SOUND] = "Sound",
+	[KEY_QUESTION] = "Question",		[KEY_EMAIL] = "Email",
+	[KEY_CHAT] = "Chat",			[KEY_SEARCH] = "Search",
+	[KEY_CONNECT] = "Connect",		[KEY_FINANCE] = "Finance",
+	[KEY_SPORT] = "Sport",			[KEY_SHOP] = "Shop",
+	[KEY_ALTERASE] = "Alternate Erase",	[KEY_CANCEL] = "Cancel",
+	[KEY_BRIGHTNESSDOWN] = "Brightness down", [KEY_BRIGHTNESSUP] = "Brightness up",
+	[KEY_MEDIA] = "Media",			[KEY_UNKNOWN] = "Unknown",
+	[BTN_0] = "Btn0",			[BTN_1] = "Btn1",
+	[BTN_2] = "Btn2",			[BTN_3] = "Btn3",
+	[BTN_4] = "Btn4",			[BTN_5] = "Btn5",
+	[BTN_6] = "Btn6",			[BTN_7] = "Btn7",
+	[BTN_8] = "Btn8",			[BTN_9] = "Btn9",
+	[BTN_LEFT] = "LeftBtn",			[BTN_RIGHT] = "RightBtn",
+	[BTN_MIDDLE] = "MiddleBtn",		[BTN_SIDE] = "SideBtn",
+	[BTN_EXTRA] = "ExtraBtn",		[BTN_FORWARD] = "ForwardBtn",
+	[BTN_BACK] = "BackBtn",			[BTN_TASK] = "TaskBtn",
+	[BTN_TRIGGER] = "Trigger",		[BTN_THUMB] = "ThumbBtn",
+	[BTN_THUMB2] = "ThumbBtn2",		[BTN_TOP] = "TopBtn",
+	[BTN_TOP2] = "TopBtn2",			[BTN_PINKIE] = "PinkieBtn",
+	[BTN_BASE] = "BaseBtn",			[BTN_BASE2] = "BaseBtn2",
+	[BTN_BASE3] = "BaseBtn3",		[BTN_BASE4] = "BaseBtn4",
+	[BTN_BASE5] = "BaseBtn5",		[BTN_BASE6] = "BaseBtn6",
+	[BTN_DEAD] = "BtnDead",			[BTN_A] = "BtnA",
+	[BTN_B] = "BtnB",			[BTN_C] = "BtnC",
+	[BTN_X] = "BtnX",			[BTN_Y] = "BtnY",
+	[BTN_Z] = "BtnZ",			[BTN_TL] = "BtnTL",
+	[BTN_TR] = "BtnTR",			[BTN_TL2] = "BtnTL2",
+	[BTN_TR2] = "BtnTR2",			[BTN_SELECT] = "BtnSelect",
+	[BTN_START] = "BtnStart",		[BTN_MODE] = "BtnMode",
+	[BTN_THUMBL] = "BtnThumbL",		[BTN_THUMBR] = "BtnThumbR",
+	[BTN_TOOL_PEN] = "ToolPen",		[BTN_TOOL_RUBBER] = "ToolRubber",
+	[BTN_TOOL_BRUSH] = "ToolBrush",		[BTN_TOOL_PENCIL] = "ToolPencil",
+	[BTN_TOOL_AIRBRUSH] = "ToolAirbrush",	[BTN_TOOL_FINGER] = "ToolFinger",
+	[BTN_TOOL_MOUSE] = "ToolMouse",		[BTN_TOOL_LENS] = "ToolLens",
+	[BTN_TOUCH] = "Touch",			[BTN_STYLUS] = "Stylus",
+	[BTN_STYLUS2] = "Stylus2",		[BTN_TOOL_DOUBLETAP] = "Tool Doubletap",
+	[BTN_TOOL_TRIPLETAP] = "Tool Tripletap", [BTN_GEAR_DOWN] = "WheelBtn",
+	[BTN_GEAR_UP] = "Gear up",		[KEY_OK] = "Ok",
+	[KEY_SELECT] = "Select",		[KEY_GOTO] = "Goto",
+	[KEY_CLEAR] = "Clear",			[KEY_POWER2] = "Power2",
+	[KEY_OPTION] = "Option",		[KEY_INFO] = "Info",
+	[KEY_TIME] = "Time",			[KEY_VENDOR] = "Vendor",
+	[KEY_ARCHIVE] = "Archive",		[KEY_PROGRAM] = "Program",
+	[KEY_CHANNEL] = "Channel",		[KEY_FAVORITES] = "Favorites",
+	[KEY_EPG] = "EPG",			[KEY_PVR] = "PVR",
+	[KEY_MHP] = "MHP",			[KEY_LANGUAGE] = "Language",
+	[KEY_TITLE] = "Title",			[KEY_SUBTITLE] = "Subtitle",
+	[KEY_ANGLE] = "Angle",			[KEY_ZOOM] = "Zoom",
+	[KEY_MODE] = "Mode",			[KEY_KEYBOARD] = "Keyboard",
+	[KEY_SCREEN] = "Screen",		[KEY_PC] = "PC",
+	[KEY_TV] = "TV",			[KEY_TV2] = "TV2",
+	[KEY_VCR] = "VCR",			[KEY_VCR2] = "VCR2",
+	[KEY_SAT] = "Sat",			[KEY_SAT2] = "Sat2",
+	[KEY_CD] = "CD",			[KEY_TAPE] = "Tape",
+	[KEY_RADIO] = "Radio",			[KEY_TUNER] = "Tuner",
+	[KEY_PLAYER] = "Player",		[KEY_TEXT] = "Text",
+	[KEY_DVD] = "DVD",			[KEY_AUX] = "Aux",
+	[KEY_MP3] = "MP3",			[KEY_AUDIO] = "Audio",
+	[KEY_VIDEO] = "Video",			[KEY_DIRECTORY] = "Directory",
+	[KEY_LIST] = "List",			[KEY_MEMO] = "Memo",
+	[KEY_CALENDAR] = "Calendar",		[KEY_RED] = "Red",
+	[KEY_GREEN] = "Green",			[KEY_YELLOW] = "Yellow",
+	[KEY_BLUE] = "Blue",			[KEY_CHANNELUP] = "ChannelUp",
+	[KEY_CHANNELDOWN] = "ChannelDown",	[KEY_FIRST] = "First",
+	[KEY_LAST] = "Last",			[KEY_AB] = "AB",
+	[KEY_NEXT] = "Next",			[KEY_RESTART] = "Restart",
+	[KEY_SLOW] = "Slow",			[KEY_SHUFFLE] = "Shuffle",
+	[KEY_BREAK] = "Break",			[KEY_PREVIOUS] = "Previous",
+	[KEY_DIGITS] = "Digits",		[KEY_TEEN] = "TEEN",
+	[KEY_TWEN] = "TWEN",			[KEY_DEL_EOL] = "Delete EOL",
+	[KEY_DEL_EOS] = "Delete EOS",		[KEY_INS_LINE] = "Insert line",
+	[KEY_DEL_LINE] = "Delete line",
+};
+
+static char *absval[5] = { "Value", "Min  ", "Max  ", "Fuzz ", "Flat " };
+
+static char *relatives[REL_MAX + 1] = {
+	[0 ... REL_MAX] = NULL,
+	[REL_X] = "X",			[REL_Y] = "Y",
+	[REL_Z] = "Z",			[REL_HWHEEL] = "HWheel",
+	[REL_DIAL] = "Dial",		[REL_WHEEL] = "Wheel", 
+	[REL_MISC] = "Misc",	
+};
+
+static char *absolutes[ABS_MAX + 1] = {
+	[0 ... ABS_MAX] = NULL,
+	[ABS_X] = "X",			[ABS_Y] = "Y",
+	[ABS_Z] = "Z",			[ABS_RX] = "Rx",
+	[ABS_RY] = "Ry",		[ABS_RZ] = "Rz",
+	[ABS_THROTTLE] = "Throttle",	[ABS_RUDDER] = "Rudder",
+	[ABS_WHEEL] = "Wheel",		[ABS_GAS] = "Gas",
+	[ABS_BRAKE] = "Brake",		[ABS_HAT0X] = "Hat0X",
+	[ABS_HAT0Y] = "Hat0Y",		[ABS_HAT1X] = "Hat1X",
+	[ABS_HAT1Y] = "Hat1Y",		[ABS_HAT2X] = "Hat2X",
+	[ABS_HAT2Y] = "Hat2Y",		[ABS_HAT3X] = "Hat3X",
+	[ABS_HAT3Y] = "Hat 3Y",		[ABS_PRESSURE] = "Pressure",
+	[ABS_DISTANCE] = "Distance",	[ABS_TILT_X] = "XTilt",
+	[ABS_TILT_Y] = "YTilt",		[ABS_TOOL_WIDTH] = "Tool Width",
+	[ABS_VOLUME] = "Volume",	[ABS_MISC] = "Misc",
+};
+
+static char *misc[MSC_MAX + 1] = {
+	[ 0 ... MSC_MAX] = NULL,
+	[MSC_SERIAL] = "Serial",	[MSC_PULSELED] = "Pulseled",
+	[MSC_GESTURE] = "Gesture",	[MSC_RAW] = "RawData"
+};
+
+static char *leds[LED_MAX + 1] = {
+	[0 ... LED_MAX] = NULL,
+	[LED_NUML] = "NumLock",		[LED_CAPSL] = "CapsLock", 
+	[LED_SCROLLL] = "ScrollLock",	[LED_COMPOSE] = "Compose",
+	[LED_KANA] = "Kana",		[LED_SLEEP] = "Sleep", 
+	[LED_SUSPEND] = "Suspend",	[LED_MUTE] = "Mute",
+	[LED_MISC] = "Misc",
+};
+
+static char *repeats[REP_MAX + 1] = {
+	[0 ... REP_MAX] = NULL,
+	[REP_DELAY] = "Delay",		[REP_PERIOD] = "Period"
+};
+
+static char *sounds[SND_MAX + 1] = {
+	[0 ... SND_MAX] = NULL,
+	[SND_CLICK] = "Click",		[SND_BELL] = "Bell",
+	[SND_TONE] = "Tone"
+};
+
+static char **names[EV_MAX + 1] = {
+	[0 ... EV_MAX] = NULL,
+	[EV_SYN] = syncs,			[EV_KEY] = keys,
+	[EV_REL] = relatives,			[EV_ABS] = absolutes,
+	[EV_MSC] = misc,			[EV_LED] = leds,
+	[EV_SND] = sounds,			[EV_REP] = repeats,
+};
+
+static void resolv_event(__u8 type, __u16 code) {
+
+	printk("%s.%s", events[type] ? events[type] : "?",
+		names[type] ? (names[type][code] ? names[type][code] : "?") : "?");
 }
diff -Nru a/drivers/usb/input/hid-ff.c b/drivers/usb/input/hid-ff.c
--- a/drivers/usb/input/hid-ff.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/usb/input/hid-ff.c	2005-01-10 20:11:19 -08:00
@@ -82,8 +82,8 @@
 {
 	struct hid_ff_initializer *init;
 
-	init = hid_get_ff_init(hid->dev->descriptor.idVendor,
-			       hid->dev->descriptor.idProduct);
+	init = hid_get_ff_init(le16_to_cpu(hid->dev->descriptor.idVendor),
+			       le16_to_cpu(hid->dev->descriptor.idProduct));
 
 	if (!init) {
 		dbg("hid_ff_init could not find initializer");
diff -Nru a/drivers/usb/input/hid-input.c b/drivers/usb/input/hid-input.c
--- a/drivers/usb/input/hid-input.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/usb/input/hid-input.c	2005-01-10 20:11:18 -08:00
@@ -32,6 +32,8 @@
 #include <linux/input.h>
 #include <linux/usb.h>
 
+#undef DEBUG
+
 #include "hid.h"
 
 #define unk	KEY_UNKNOWN
@@ -60,114 +62,130 @@
 	__s32 y;
 }  hid_hat_to_axis[] = {{ 0, 0}, { 0,-1}, { 1,-1}, { 1, 0}, { 1, 1}, { 0, 1}, {-1, 1}, {-1, 0}, {-1,-1}};
 
-static struct input_dev *find_input(struct hid_device *hid, struct hid_field *field)
-{
-	struct list_head *lh;
-	struct hid_input *hidinput;
-
-	list_for_each (lh, &hid->inputs) {
-		int i;
-
-		hidinput = list_entry(lh, struct hid_input, list);
-
-		if (! hidinput->report)
-			continue;
-
-		for (i = 0; i < hidinput->report->maxfield; i++)
-			if (hidinput->report->field[i] == field)
-				return &hidinput->input;
-	}
-
-	/* Assume we only have one input and use it */
-	if (!list_empty(&hid->inputs)) {
-		hidinput = list_entry(hid->inputs.next, struct hid_input, list);
-		return &hidinput->input;
-	}
-
-	/* This is really a bug */
-	return NULL;
-}
+#define map_abs(c)	do { usage->code = c; usage->type = EV_ABS; bit = input->absbit; max = ABS_MAX; } while (0)
+#define map_rel(c)	do { usage->code = c; usage->type = EV_REL; bit = input->relbit; max = REL_MAX; } while (0)
+#define map_key(c)	do { usage->code = c; usage->type = EV_KEY; bit = input->keybit; max = KEY_MAX; } while (0)
+#define map_led(c)	do { usage->code = c; usage->type = EV_LED; bit = input->ledbit; max = LED_MAX; } while (0)
+#define map_ff(c)	do { usage->code = c; usage->type = EV_FF;  bit = input->ffbit;  max =  FF_MAX; } while (0)
+
+#define map_abs_clear(c)	do { map_abs(c); clear_bit(c, bit); } while (0)
+#define map_key_clear(c)	do { map_key(c); clear_bit(c, bit); } while (0)
+#define map_ff_effect(c)	do { set_bit(c, input->ffbit); } while (0)
 
 static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_field *field,
 				     struct hid_usage *usage)
 {
 	struct input_dev *input = &hidinput->input;
 	struct hid_device *device = hidinput->input.private;
-	int max;
-	int is_abs = 0;
+	int max, code;
 	unsigned long *bit;
 
+	field->hidinput = hidinput;
+
+#ifdef DEBUG
+	printk(KERN_DEBUG "Mapping: ");
+	resolv_usage(usage->hid);
+	printk(" ---> ");
+#endif
+
+	if (field->flags & HID_MAIN_ITEM_CONSTANT)
+		goto ignore;
+
 	switch (usage->hid & HID_USAGE_PAGE) {
 
+		case HID_UP_UNDEFINED:
+			goto ignore;
+
 		case HID_UP_KEYBOARD:
 
 			set_bit(EV_REP, input->evbit);
-			usage->type = EV_KEY; bit = input->keybit; max = KEY_MAX;
 
 			if ((usage->hid & HID_USAGE) < 256) {
-				if (!(usage->code = hid_keyboard[usage->hid & HID_USAGE]))
-					return;
-				clear_bit(usage->code, bit);
+				if (!hid_keyboard[usage->hid & HID_USAGE]) goto ignore;
+				map_key_clear(hid_keyboard[usage->hid & HID_USAGE]);
 			} else
-				usage->code = KEY_UNKNOWN;
+				map_key(KEY_UNKNOWN);
 
 			break;
 
 		case HID_UP_BUTTON:
 
-			usage->code = ((usage->hid - 1) & 0xf) + 0x100;
-			usage->type = EV_KEY; bit = input->keybit; max = KEY_MAX;
+			code = ((usage->hid - 1) & 0xf);
 
 			switch (field->application) {
-				case HID_GD_GAMEPAD:  usage->code += 0x10;
-				case HID_GD_JOYSTICK: usage->code += 0x10;
-				case HID_GD_MOUSE:    usage->code += 0x10; break;
+				case HID_GD_MOUSE:
+				case HID_GD_POINTER:  code += 0x110; break;
+				case HID_GD_JOYSTICK: code += 0x120; break;
+				case HID_GD_GAMEPAD:  code += 0x130; break;
 				default:
-					if (field->physical == HID_GD_POINTER)
-						usage->code += 0x10;
-					break;
+					switch (field->physical) {
+						case HID_GD_MOUSE:
+						case HID_GD_POINTER:  code += 0x110; break;
+						case HID_GD_JOYSTICK: code += 0x120; break;
+						case HID_GD_GAMEPAD:  code += 0x130; break;
+						default:              code += 0x100;
+					}
 			}
+
+			map_key(code);
 			break;
 
 		case HID_UP_GENDESK:
 
 			if ((usage->hid & 0xf0) == 0x80) {	/* SystemControl */
 				switch (usage->hid & 0xf) {
-					case 0x1: usage->code = KEY_POWER;  break;
-					case 0x2: usage->code = KEY_SLEEP;  break;
-					case 0x3: usage->code = KEY_WAKEUP; break;
-					default: usage->code = KEY_UNKNOWN; break;
+					case 0x1: map_key_clear(KEY_POWER);  break;
+					case 0x2: map_key_clear(KEY_SLEEP);  break;
+					case 0x3: map_key_clear(KEY_WAKEUP); break;
+					default: goto unknown;
 				}
-				usage->type = EV_KEY; bit = input->keybit; max = KEY_MAX;
 				break;
 			}
 
-			usage->code = usage->hid & 0xf;
-
-			if (field->report_size == 1) {
-				usage->code = BTN_MISC;
-				usage->type = EV_KEY; bit = input->keybit; max = KEY_MAX;
+			if ((usage->hid & 0xf0) == 0x90) {	/* D-pad */
+				switch (usage->hid) {
+					case HID_GD_UP:	   usage->hat_dir = 1; break;
+					case HID_GD_DOWN:  usage->hat_dir = 5; break;
+					case HID_GD_RIGHT: usage->hat_dir = 3; break;
+					case HID_GD_LEFT:  usage->hat_dir = 7; break;
+					default: goto unknown;
+				}
+				if (field->dpad) {
+					map_abs(field->dpad);
+					goto ignore;
+				}
+				map_abs(ABS_HAT0X);
 				break;
 			}
 
-			if (field->flags & HID_MAIN_ITEM_RELATIVE) {
-				usage->type = EV_REL; bit = input->relbit; max = REL_MAX;
-				break;
-			}
+			switch (usage->hid) {
+
+				/* These usage IDs map directly to the usage codes. */
+				case HID_GD_X: case HID_GD_Y: case HID_GD_Z:
+				case HID_GD_RX: case HID_GD_RY: case HID_GD_RZ:
+				case HID_GD_SLIDER: case HID_GD_DIAL: case HID_GD_WHEEL:
+					if (field->flags & HID_MAIN_ITEM_RELATIVE) 
+						map_rel(usage->hid & 0xf);
+					else
+						map_abs(usage->hid & 0xf);
+					break;
+
+				case HID_GD_HATSWITCH:
+					usage->hat_min = field->logical_minimum;
+					usage->hat_max = field->logical_maximum;
+					map_abs(ABS_HAT0X);
+					break;
 
-			usage->type = EV_ABS; bit = input->absbit; max = ABS_MAX;
+				case HID_GD_START:	map_key_clear(BTN_START);	break;
+				case HID_GD_SELECT:	map_key_clear(BTN_SELECT);	break;
 
-			if (usage->hid == HID_GD_HATSWITCH) {
-				usage->code = ABS_HAT0X;
-				usage->hat_min = field->logical_minimum;
-				usage->hat_max = field->logical_maximum;
+				default: goto unknown;
 			}
+
 			break;
 
 		case HID_UP_LED:
-
-			usage->code = (usage->hid - 1) & 0xf;
-			usage->type = EV_LED; bit = input->ledbit; max = LED_MAX;
+			map_led((usage->hid - 1) & 0xf);
 			break;
 
 		case HID_UP_DIGITIZER:
@@ -175,49 +193,36 @@
 			switch (usage->hid & 0xff) {
 
 				case 0x30: /* TipPressure */
-
 					if (!test_bit(BTN_TOUCH, input->keybit)) {
 						device->quirks |= HID_QUIRK_NOTOUCH;
 						set_bit(EV_KEY, input->evbit);
 						set_bit(BTN_TOUCH, input->keybit);
 					}
-					usage->type = EV_ABS; bit = input->absbit; max = ABS_MAX;
-					usage->code = ABS_PRESSURE;
-					clear_bit(usage->code, bit);
+
+					map_abs_clear(ABS_PRESSURE);
 					break;
 
 				case 0x32: /* InRange */
-
-					usage->type = EV_KEY; bit = input->keybit; max = KEY_MAX;
 					switch (field->physical & 0xff) {
-						case 0x21: usage->code = BTN_TOOL_MOUSE; break;
-						case 0x22: usage->code = BTN_TOOL_FINGER; break;
-						default: usage->code = BTN_TOOL_PEN; break;
+						case 0x21: map_key(BTN_TOOL_MOUSE); break;
+						case 0x22: map_key(BTN_TOOL_FINGER); break;
+						default: map_key(BTN_TOOL_PEN); break;
 					}
 					break;
 
 				case 0x3c: /* Invert */
-
-					usage->type = EV_KEY; bit = input->keybit; max = KEY_MAX;
-					usage->code = BTN_TOOL_RUBBER;
-					clear_bit(usage->code, bit);
+					map_key_clear(BTN_TOOL_RUBBER);
 					break;
 
 				case 0x33: /* Touch */
 				case 0x42: /* TipSwitch */
 				case 0x43: /* TipSwitch2 */
-
 					device->quirks &= ~HID_QUIRK_NOTOUCH;
-					usage->type = EV_KEY; bit = input->keybit; max = KEY_MAX;
-					usage->code = BTN_TOUCH;
-					clear_bit(usage->code, bit);
+					map_key_clear(BTN_TOUCH);
 					break;
 
 				case 0x44: /* BarrelSwitch */
-
-					usage->type = EV_KEY; bit = input->keybit; max = KEY_MAX;
-					usage->code = BTN_STYLUS;
-					clear_bit(usage->code, bit);
+					map_key_clear(BTN_STYLUS);
 					break;
 
 				default:  goto unknown;
@@ -228,54 +233,42 @@
 
 			set_bit(EV_REP, input->evbit);
 			switch (usage->hid & HID_USAGE) {
-				case 0x000: usage->code = 0; break;
-				case 0x034: usage->code = KEY_SLEEP;		break;
-				case 0x036: usage->code = BTN_MISC;		break;
-				case 0x08a: usage->code = KEY_WWW;		break;
-				case 0x095: usage->code = KEY_HELP;		break;
-
-				case 0x0b0: usage->code = KEY_PLAY;		break;
-				case 0x0b1: usage->code = KEY_PAUSE;		break;
-				case 0x0b2: usage->code = KEY_RECORD;		break;
-				case 0x0b3: usage->code = KEY_FASTFORWARD;	break;
-				case 0x0b4: usage->code = KEY_REWIND;		break;
-				case 0x0b5: usage->code = KEY_NEXTSONG;		break;
-				case 0x0b6: usage->code = KEY_PREVIOUSSONG;	break;
-				case 0x0b7: usage->code = KEY_STOPCD;		break;
-				case 0x0b8: usage->code = KEY_EJECTCD;		break;
-				case 0x0cd: usage->code = KEY_PLAYPAUSE;	break;
-			        case 0x0e0: is_abs = 1;
-					    usage->code = ABS_VOLUME;
-					    break;
-				case 0x0e2: usage->code = KEY_MUTE;		break;
-				case 0x0e5: usage->code = KEY_BASSBOOST;	break;
-				case 0x0e9: usage->code = KEY_VOLUMEUP;		break;
-				case 0x0ea: usage->code = KEY_VOLUMEDOWN;	break;
-
-				case 0x183: usage->code = KEY_CONFIG;		break;
-				case 0x18a: usage->code = KEY_MAIL;		break;
-				case 0x192: usage->code = KEY_CALC;		break;
-				case 0x194: usage->code = KEY_FILE;		break;
-				case 0x21a: usage->code = KEY_UNDO;		break;
-				case 0x21b: usage->code = KEY_COPY;		break;
-				case 0x21c: usage->code = KEY_CUT;		break;
-				case 0x21d: usage->code = KEY_PASTE;		break;
-
-				case 0x221: usage->code = KEY_FIND;		break;
-				case 0x223: usage->code = KEY_HOMEPAGE;		break;
-				case 0x224: usage->code = KEY_BACK;		break;
-				case 0x225: usage->code = KEY_FORWARD;		break;
-				case 0x226: usage->code = KEY_STOP;		break;
-				case 0x227: usage->code = KEY_REFRESH;		break;
-				case 0x22a: usage->code = KEY_BOOKMARKS;	break;
-
-				default:    usage->code = KEY_UNKNOWN;		break;
-			}
-
-			if (is_abs) {
-			        usage->type = EV_ABS; bit = input->absbit; max = ABS_MAX;
-			} else  {
-				usage->type = EV_KEY; bit = input->keybit; max = KEY_MAX;
+				case 0x000: goto ignore;
+				case 0x034: map_key_clear(KEY_SLEEP);		break;
+				case 0x036: map_key_clear(BTN_MISC);		break;
+				case 0x08a: map_key_clear(KEY_WWW);		break;
+				case 0x095: map_key_clear(KEY_HELP);		break;
+				case 0x0b0: map_key_clear(KEY_PLAY);		break;
+				case 0x0b1: map_key_clear(KEY_PAUSE);		break;
+				case 0x0b2: map_key_clear(KEY_RECORD);		break;
+				case 0x0b3: map_key_clear(KEY_FASTFORWARD);	break;
+				case 0x0b4: map_key_clear(KEY_REWIND);		break;
+				case 0x0b5: map_key_clear(KEY_NEXTSONG);	break;
+				case 0x0b6: map_key_clear(KEY_PREVIOUSSONG);	break;
+				case 0x0b7: map_key_clear(KEY_STOPCD);		break;
+				case 0x0b8: map_key_clear(KEY_EJECTCD);		break;
+				case 0x0cd: map_key_clear(KEY_PLAYPAUSE);	break;
+			        case 0x0e0: map_abs_clear(ABS_VOLUME);		break;
+				case 0x0e2: map_key_clear(KEY_MUTE);		break;
+				case 0x0e5: map_key_clear(KEY_BASSBOOST);	break;
+				case 0x0e9: map_key_clear(KEY_VOLUMEUP);	break;
+				case 0x0ea: map_key_clear(KEY_VOLUMEDOWN);	break;
+				case 0x183: map_key_clear(KEY_CONFIG);		break;
+				case 0x18a: map_key_clear(KEY_MAIL);		break;
+				case 0x192: map_key_clear(KEY_CALC);		break;
+				case 0x194: map_key_clear(KEY_FILE);		break;
+				case 0x21a: map_key_clear(KEY_UNDO);		break;
+				case 0x21b: map_key_clear(KEY_COPY);		break;
+				case 0x21c: map_key_clear(KEY_CUT);		break;
+				case 0x21d: map_key_clear(KEY_PASTE);		break;
+				case 0x221: map_key_clear(KEY_FIND);		break;
+				case 0x223: map_key_clear(KEY_HOMEPAGE);	break;
+				case 0x224: map_key_clear(KEY_BACK);		break;
+				case 0x225: map_key_clear(KEY_FORWARD);		break;
+				case 0x226: map_key_clear(KEY_STOP);		break;
+				case 0x227: map_key_clear(KEY_REFRESH);		break;
+				case 0x22a: map_key_clear(KEY_BOOKMARKS);	break;
+				default:    goto unknown;
 			}
 			break;
 
@@ -283,114 +276,82 @@
 
 			set_bit(EV_REP, input->evbit);
 			switch (usage->hid & HID_USAGE) {
-			        case 0x021: usage->code = KEY_PRINT;            break;
-				case 0x070: usage->code = KEY_HP;		break;
-				case 0x071: usage->code = KEY_CAMERA;		break;
-				case 0x072: usage->code = KEY_SOUND;		break;
-				case 0x073: usage->code = KEY_QUESTION;		break;
-
-				case 0x080: usage->code = KEY_EMAIL;		break;
-				case 0x081: usage->code = KEY_CHAT;		break;
-				case 0x082: usage->code = KEY_SEARCH;		break;
-				case 0x083: usage->code = KEY_CONNECT;	        break;
-				case 0x084: usage->code = KEY_FINANCE;		break;
-				case 0x085: usage->code = KEY_SPORT;		break;
-				case 0x086: usage->code = KEY_SHOP;	        break;
-
-				default:    usage->code = KEY_UNKNOWN;		break;
-
+			        case 0x021: map_key_clear(KEY_PRINT);           break;
+				case 0x070: map_key_clear(KEY_HP);		break;
+				case 0x071: map_key_clear(KEY_CAMERA);		break;
+				case 0x072: map_key_clear(KEY_SOUND);		break;
+				case 0x073: map_key_clear(KEY_QUESTION);	break;
+				case 0x080: map_key_clear(KEY_EMAIL);		break;
+				case 0x081: map_key_clear(KEY_CHAT);		break;
+				case 0x082: map_key_clear(KEY_SEARCH);		break;
+				case 0x083: map_key_clear(KEY_CONNECT);	        break;
+				case 0x084: map_key_clear(KEY_FINANCE);		break;
+				case 0x085: map_key_clear(KEY_SPORT);		break;
+				case 0x086: map_key_clear(KEY_SHOP);	        break;
+				default:    goto unknown;
 			}
-
-			usage->type = EV_KEY; bit = input->keybit; max = KEY_MAX;
 			break;
 			
 		case HID_UP_PID:
 
-			usage->type = EV_FF; bit = input->ffbit; max = FF_MAX;
-			
+			set_bit(EV_FF, input->evbit);
 			switch(usage->hid & HID_USAGE) {
-				case 0x26: set_bit(FF_CONSTANT, input->ffbit); break;
-				case 0x27: set_bit(FF_RAMP,     input->ffbit); break;
-				case 0x28: set_bit(FF_CUSTOM,   input->ffbit); break;
-				case 0x30: set_bit(FF_SQUARE,   input->ffbit);
-				           set_bit(FF_PERIODIC, input->ffbit); break;
-				case 0x31: set_bit(FF_SINE,     input->ffbit);
-				           set_bit(FF_PERIODIC, input->ffbit); break;
-				case 0x32: set_bit(FF_TRIANGLE, input->ffbit);
-				           set_bit(FF_PERIODIC, input->ffbit); break;
-				case 0x33: set_bit(FF_SAW_UP,   input->ffbit);
-				           set_bit(FF_PERIODIC, input->ffbit); break;
-				case 0x34: set_bit(FF_SAW_DOWN, input->ffbit);
-				           set_bit(FF_PERIODIC, input->ffbit); break;
-				case 0x40: set_bit(FF_SPRING,   input->ffbit); break;
-				case 0x41: set_bit(FF_DAMPER,   input->ffbit); break;
-				case 0x42: set_bit(FF_INERTIA , input->ffbit); break;
-				case 0x43: set_bit(FF_FRICTION, input->ffbit); break;
-				case 0x7e: usage->code = FF_GAIN;       break;
-				case 0x83:  /* Simultaneous Effects Max */
-					input->ff_effects_max = (field->value[0]);
-					dbg("Maximum Effects - %d",input->ff_effects_max);
-					break;
-				case 0x98:  /* Device Control */
-					usage->code = FF_AUTOCENTER;    break;
-				case 0xa4:  /* Safety Switch */
-					usage->code = BTN_DEAD;
-					bit = input->keybit;
-					usage->type = EV_KEY;
-					max = KEY_MAX;
-					dbg("Safety Switch Report\n");
-					break;
-				case 0x9f: /* Device Paused */
-				case 0xa0: /* Actuators Enabled */
-					dbg("Not telling the input API about ");
-					resolv_usage(usage->hid);
-					return;
+				case 0x26: map_ff_effect(FF_CONSTANT);	goto ignore;
+				case 0x27: map_ff_effect(FF_RAMP);	goto ignore;
+				case 0x28: map_ff_effect(FF_CUSTOM);	goto ignore;
+				case 0x30: map_ff_effect(FF_SQUARE);	map_ff_effect(FF_PERIODIC); goto ignore;
+				case 0x31: map_ff_effect(FF_SINE);	map_ff_effect(FF_PERIODIC); goto ignore;
+				case 0x32: map_ff_effect(FF_TRIANGLE);	map_ff_effect(FF_PERIODIC); goto ignore;
+				case 0x33: map_ff_effect(FF_SAW_UP);	map_ff_effect(FF_PERIODIC); goto ignore;
+				case 0x34: map_ff_effect(FF_SAW_DOWN);	map_ff_effect(FF_PERIODIC); goto ignore;
+				case 0x40: map_ff_effect(FF_SPRING);	goto ignore;
+				case 0x41: map_ff_effect(FF_DAMPER);	goto ignore;
+				case 0x42: map_ff_effect(FF_INERTIA);	goto ignore;
+				case 0x43: map_ff_effect(FF_FRICTION);	goto ignore;
+				case 0x7e: map_ff(FF_GAIN);		break;
+				case 0x83: input->ff_effects_max = field->value[0]; goto ignore;
+				case 0x98: map_ff(FF_AUTOCENTER);	break;
+				case 0xa4: map_key_clear(BTN_DEAD);	break;
+				default: goto ignore;
 			}
 			break;
+
 		default:
 		unknown:
-			resolv_usage(usage->hid);
-
 			if (field->report_size == 1) {
-
 				if (field->report->type == HID_OUTPUT_REPORT) {
-					usage->code = LED_MISC;
-					usage->type = EV_LED; bit = input->ledbit; max = LED_MAX;
+					map_led(LED_MISC);
 					break;
 				}
-
-				usage->code = BTN_MISC;
-				usage->type = EV_KEY; bit = input->keybit; max = KEY_MAX;
+				map_key(BTN_MISC);
 				break;
 			}
-
 			if (field->flags & HID_MAIN_ITEM_RELATIVE) {
-				usage->code = REL_MISC;
-				usage->type = EV_REL; bit = input->relbit; max = REL_MAX;
+				map_rel(REL_MISC);
 				break;
 			}
-
-			usage->code = ABS_MISC;
-			usage->type = EV_ABS; bit = input->absbit; max = ABS_MAX;
+			map_abs(ABS_MISC);
 			break;
 	}
 
 	set_bit(usage->type, input->evbit);
-	if ((usage->type == EV_REL)
-			&& (device->quirks & (HID_QUIRK_2WHEEL_MOUSE_HACK_BACK
-				| HID_QUIRK_2WHEEL_MOUSE_HACK_EXTRA))
-			&& (usage->code == REL_WHEEL)) {
-		set_bit(REL_HWHEEL, bit);
-	}
 
-	while (usage->code <= max && test_and_set_bit(usage->code, bit)) {
+	while (usage->code <= max && test_and_set_bit(usage->code, bit))
 		usage->code = find_next_zero_bit(bit, max + 1, usage->code);
-	}
 
 	if (usage->code > max)
-		return;
+		goto ignore;
+
+	if ((device->quirks & (HID_QUIRK_2WHEEL_MOUSE_HACK_7 | HID_QUIRK_2WHEEL_MOUSE_HACK_5)) &&
+		 (usage->type == EV_REL) && (usage->code == REL_WHEEL)) 
+			set_bit(REL_HWHEEL, bit);
+
+	if (((device->quirks & HID_QUIRK_2WHEEL_MOUSE_HACK_5) && (usage->hid == 0x00090005))
+		|| ((device->quirks & HID_QUIRK_2WHEEL_MOUSE_HACK_7) && (usage->hid == 0x00090007)))
+		goto ignore;
 
 	if (usage->type == EV_ABS) {
+
 		int a = field->logical_minimum;
 		int b = field->logical_maximum;
 
@@ -399,61 +360,69 @@
 			b = field->logical_maximum = 255;
 		}
 		
-		input->absmin[usage->code] = a;
-		input->absmax[usage->code] = b;
-		input->absfuzz[usage->code] = 0;
-		input->absflat[usage->code] = 0;
-
-		if (field->application == HID_GD_GAMEPAD || field->application == HID_GD_JOYSTICK) {
-			input->absfuzz[usage->code] = (b - a) >> 8;
-			input->absflat[usage->code] = (b - a) >> 4;
-		}
+		if (field->application == HID_GD_GAMEPAD || field->application == HID_GD_JOYSTICK)
+			input_set_abs_params(input, usage->code, a, b, (b - a) >> 8, (b - a) >> 4);
+		else	input_set_abs_params(input, usage->code, a, b, 0, 0);
+		
 	}
 
-	if (usage->hat_min != usage->hat_max) {
+	if (usage->hat_min < usage->hat_max || usage->hat_dir) {
 		int i;
 		for (i = usage->code; i < usage->code + 2 && i <= max; i++) {
-			input->absmax[i] = 1;
-			input->absmin[i] = -1;
-			input->absfuzz[i] = 0;
-			input->absflat[i] = 0;
+			input_set_abs_params(input, i, -1, 1, 0, 0);
+			set_bit(i, input->absbit);
 		}
-		set_bit(usage->code + 1, input->absbit);
+		if (usage->hat_dir && !field->dpad)
+			field->dpad = usage->code;
 	}
+
+#ifdef DEBUG
+	resolv_event(usage->type, usage->code);
+	printk("\n");
+#endif
+	return;
+
+ignore:
+#ifdef DEBUG
+	printk("IGNORED\n");
+#endif
+	return;
 }
 
 void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct hid_usage *usage, __s32 value, struct pt_regs *regs)
 {
-	struct input_dev *input = find_input(hid, field);
+	struct input_dev *input = &field->hidinput->input;
 	int *quirks = &hid->quirks;
 
 	if (!input)
 		return;
 
+	if (!usage->type)
+		return;
+
 	input_regs(input, regs);
 
-	if (((hid->quirks & HID_QUIRK_2WHEEL_MOUSE_HACK_EXTRA) && (usage->code == BTN_EXTRA))
-		|| ((hid->quirks & HID_QUIRK_2WHEEL_MOUSE_HACK_BACK) && (usage->code == BTN_BACK))) {
-		if (value)
-			hid->quirks |= HID_QUIRK_2WHEEL_MOUSE_HACK_ON;
-		else
-			hid->quirks &= ~HID_QUIRK_2WHEEL_MOUSE_HACK_ON;
+	if (((hid->quirks & HID_QUIRK_2WHEEL_MOUSE_HACK_5) && (usage->hid == 0x00090005))
+		|| ((hid->quirks & HID_QUIRK_2WHEEL_MOUSE_HACK_7) && (usage->hid == 0x00090007))) {
+		if (value) hid->quirks |=  HID_QUIRK_2WHEEL_MOUSE_HACK_ON;
+		else       hid->quirks &= ~HID_QUIRK_2WHEEL_MOUSE_HACK_ON;
 		return;
 	}
 
-	if ((hid->quirks & HID_QUIRK_2WHEEL_MOUSE_HACK_ON)
-			&& (usage->code == REL_WHEEL)) {
+	if ((hid->quirks & HID_QUIRK_2WHEEL_MOUSE_HACK_ON) && (usage->code == REL_WHEEL)) {
 		input_event(input, usage->type, REL_HWHEEL, value);
 		return;
 	}
 
-	if (usage->hat_min != usage->hat_max ) { /* FIXME: hat_max can be 0 and hat_min 1 */
-		value = (value - usage->hat_min) * 8 / (usage->hat_max - usage->hat_min + 1) + 1;
-		if (value < 0 || value > 8) value = 0;
-		input_event(input, usage->type, usage->code    , hid_hat_to_axis[value].x);
-		input_event(input, usage->type, usage->code + 1, hid_hat_to_axis[value].y);
-		return;
-	}
+	if (usage->hat_min < usage->hat_max || usage->hat_dir) { 
+		int hat_dir = usage->hat_dir;
+		if (!hat_dir)
+			hat_dir = (value - usage->hat_min) * 8 / (usage->hat_max - usage->hat_min + 1) + 1;
+		if (hat_dir < 0 || hat_dir > 8) hat_dir = 0;
+		input_event(input, usage->type, usage->code    , hid_hat_to_axis[hat_dir].x);
+                input_event(input, usage->type, usage->code + 1, hid_hat_to_axis[hat_dir].y);
+                return;
+        }
 
 	if (usage->hid == (HID_UP_DIGITIZER | 0x003c)) { /* Invert */
 		*quirks = value ? (*quirks | HID_QUIRK_INVERT) : (*quirks & ~HID_QUIRK_INVERT);
@@ -481,6 +450,7 @@
 		dbg("Maximum Effects - %d",input->ff_effects_max);
 		return;
 	}
+
 	if (usage->hid == (HID_UP_PID | 0x7fUL)) {
 		dbg("PID Pool Report\n");
 		return;
@@ -556,9 +526,10 @@
 	INIT_LIST_HEAD(&hid->inputs);
 
 	for (i = 0; i < hid->maxcollection; i++)
-		if (hid->collection[i].type == HID_COLLECTION_APPLICATION &&
-		    IS_INPUT_APPLICATION(hid->collection[i].usage))
-			break;
+		if (hid->collection[i].type == HID_COLLECTION_APPLICATION ||
+		    hid->collection[i].type == HID_COLLECTION_PHYSICAL)
+		    	if (IS_INPUT_APPLICATION(hid->collection[i].usage))
+				break;
 
 	if (i == hid->maxcollection)
 		return -1;
@@ -593,9 +564,9 @@
 				hidinput->input.phys = hid->phys;
 				hidinput->input.uniq = hid->uniq;
 				hidinput->input.id.bustype = BUS_USB;
-				hidinput->input.id.vendor = dev->descriptor.idVendor;
-				hidinput->input.id.product = dev->descriptor.idProduct;
-				hidinput->input.id.version = dev->descriptor.bcdDevice;
+				hidinput->input.id.vendor = le16_to_cpu(dev->descriptor.idVendor);
+				hidinput->input.id.product = le16_to_cpu(dev->descriptor.idProduct);
+				hidinput->input.id.version = le16_to_cpu(dev->descriptor.bcdDevice);
 				hidinput->input.dev = &hid->intf->dev;
 			}
 
diff -Nru a/drivers/usb/input/hid-lgff.c b/drivers/usb/input/hid-lgff.c
--- a/drivers/usb/input/hid-lgff.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/usb/input/hid-lgff.c	2005-01-10 20:11:21 -08:00
@@ -251,8 +251,8 @@
 {
 	struct device_type* dev = devices;
 	signed short* ff;
-	u16 idVendor = hid->dev->descriptor.idVendor;
-	u16 idProduct = hid->dev->descriptor.idProduct;
+	u16 idVendor = le16_to_cpu(hid->dev->descriptor.idVendor);
+	u16 idProduct = le16_to_cpu(hid->dev->descriptor.idProduct);
 	struct hid_input *hidinput = list_entry(hid->inputs.next, struct hid_input, list);
 
 	while (dev->idVendor && (idVendor != dev->idVendor || idProduct != dev->idProduct))
diff -Nru a/drivers/usb/input/hid.h b/drivers/usb/input/hid.h
--- a/drivers/usb/input/hid.h	2005-01-10 20:11:15 -08:00
+++ b/drivers/usb/input/hid.h	2005-01-10 20:11:15 -08:00
@@ -171,6 +171,7 @@
 
 #define HID_USAGE_PAGE		0xffff0000
 
+#define HID_UP_UNDEFINED	0x00000000
 #define HID_UP_GENDESK 		0x00010000
 #define HID_UP_KEYBOARD 	0x00070000
 #define HID_UP_LED 		0x00080000
@@ -187,7 +188,36 @@
 #define HID_GD_MOUSE		0x00010002
 #define HID_GD_JOYSTICK		0x00010004
 #define HID_GD_GAMEPAD		0x00010005
+#define HID_GD_KEYBOARD		0x00010006
+#define HID_GD_KEYPAD		0x00010007
+#define HID_GD_MULTIAXIS	0x00010008
+#define HID_GD_X		0x00010030
+#define HID_GD_Y		0x00010031
+#define HID_GD_Z		0x00010032
+#define HID_GD_RX		0x00010033
+#define HID_GD_RY		0x00010034
+#define HID_GD_RZ		0x00010035
+#define HID_GD_SLIDER		0x00010036
+#define HID_GD_DIAL		0x00010037
+#define HID_GD_WHEEL		0x00010038
 #define HID_GD_HATSWITCH	0x00010039
+#define HID_GD_BUFFER		0x0001003a
+#define HID_GD_BYTECOUNT	0x0001003b
+#define HID_GD_MOTION		0x0001003c
+#define HID_GD_START		0x0001003d
+#define HID_GD_SELECT		0x0001003e
+#define HID_GD_VX		0x00010040
+#define HID_GD_VY		0x00010041
+#define HID_GD_VZ		0x00010042
+#define HID_GD_VBRX		0x00010043
+#define HID_GD_VBRY		0x00010044
+#define HID_GD_VBRZ		0x00010045
+#define HID_GD_VNO		0x00010046
+#define HID_GD_FEATURE		0x00010047
+#define HID_GD_UP		0x00010090
+#define HID_GD_DOWN		0x00010091
+#define HID_GD_RIGHT		0x00010092
+#define HID_GD_LEFT		0x00010093
 
 /*
  * HID report types --- Ouch! HID spec says 1 2 3!
@@ -208,8 +238,8 @@
 #define HID_QUIRK_HIDDEV			0x010
 #define HID_QUIRK_BADPAD			0x020
 #define HID_QUIRK_MULTI_INPUT			0x040
-#define HID_QUIRK_2WHEEL_MOUSE_HACK_BACK	0x080
-#define HID_QUIRK_2WHEEL_MOUSE_HACK_EXTRA	0x100
+#define HID_QUIRK_2WHEEL_MOUSE_HACK_7		0x080
+#define HID_QUIRK_2WHEEL_MOUSE_HACK_5		0x100
 #define HID_QUIRK_2WHEEL_MOUSE_HACK_ON		0x200
 
 /*
@@ -262,12 +292,16 @@
 struct hid_usage {
 	unsigned  hid;			/* hid usage code */
 	unsigned  collection_index;	/* index into collection array */
+	/* hidinput data */
 	__u16     code;			/* input driver code */
 	__u8      type;			/* input driver type */
 	__s8	  hat_min;		/* hat switch fun */
 	__s8	  hat_max;		/* ditto */
+	__s8	  hat_dir;		/* ditto */
 };
 
+struct hid_input;
+
 struct hid_field {
 	unsigned  physical;		/* physical usage for this field */
 	unsigned  logical;		/* logical usage for this field */
@@ -288,6 +322,9 @@
 	unsigned  unit;
 	struct hid_report *report;	/* associated report */
 	unsigned index;			/* index into report->field[] */
+	/* hidinput data */
+	struct hid_input *hidinput;	/* associated input structure */
+	__u16 dpad;			/* dpad input code */
 };
 
 #define HID_MAX_FIELDS 64
@@ -423,6 +460,7 @@
 #define hid_dump_device(c)	do { } while (0)
 #define hid_dump_field(a,b)	do { } while (0)
 #define resolv_usage(a)		do { } while (0)
+#define resolv_event(a,b)	do { } while (0)
 #endif
 
 #endif
@@ -430,7 +468,7 @@
 #ifdef CONFIG_USB_HIDINPUT
 /* Applications from HID Usage Tables 4/8/99 Version 1.1 */
 /* We ignore a few input applications that are not widely used */
-#define IS_INPUT_APPLICATION(a) (((a >= 0x00010000) && (a <= 0x00010008)) || ( a == 0x00010080) || ( a == 0x000c0001))
+#define IS_INPUT_APPLICATION(a) (((a >= 0x00010000) && (a <= 0x00010008)) || (a == 0x00010080) || (a == 0x000c0001))
 extern void hidinput_hid_event(struct hid_device *, struct hid_field *, struct hid_usage *, __s32, struct pt_regs *regs);
 extern void hidinput_report_event(struct hid_device *hid, struct hid_report *report);
 extern int hidinput_connect(struct hid_device *);
diff -Nru a/drivers/usb/input/hiddev.c b/drivers/usb/input/hiddev.c
--- a/drivers/usb/input/hiddev.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/usb/input/hiddev.c	2005-01-10 20:11:18 -08:00
@@ -423,9 +423,9 @@
 		dinfo.busnum = dev->bus->busnum;
 		dinfo.devnum = dev->devnum;
 		dinfo.ifnum = hid->ifnum;
-		dinfo.vendor = dev->descriptor.idVendor;
-		dinfo.product = dev->descriptor.idProduct;
-		dinfo.version = dev->descriptor.bcdDevice;
+		dinfo.vendor = le16_to_cpu(dev->descriptor.idVendor);
+		dinfo.product = le16_to_cpu(dev->descriptor.idProduct);
+		dinfo.version = le16_to_cpu(dev->descriptor.bcdDevice);
 		dinfo.num_applications = hid->maxapplication;
 		if (copy_to_user(user_arg, &dinfo, sizeof(dinfo)))
 			return -EFAULT;
diff -Nru a/drivers/usb/input/kbtab.c b/drivers/usb/input/kbtab.c
--- a/drivers/usb/input/kbtab.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/usb/input/kbtab.c	2005-01-10 20:11:15 -08:00
@@ -175,9 +175,9 @@
 	kbtab->dev.name = "KB Gear Tablet";
 	kbtab->dev.phys = kbtab->phys;
 	kbtab->dev.id.bustype = BUS_USB;
-	kbtab->dev.id.vendor = dev->descriptor.idVendor;
-	kbtab->dev.id.product = dev->descriptor.idProduct;
-	kbtab->dev.id.version = dev->descriptor.bcdDevice;
+	kbtab->dev.id.vendor = le16_to_cpu(dev->descriptor.idVendor);
+	kbtab->dev.id.product = le16_to_cpu(dev->descriptor.idProduct);
+	kbtab->dev.id.version = le16_to_cpu(dev->descriptor.bcdDevice);
 	kbtab->dev.dev = &intf->dev;
 	kbtab->usbdev = dev;
 
diff -Nru a/drivers/usb/input/mtouchusb.c b/drivers/usb/input/mtouchusb.c
--- a/drivers/usb/input/mtouchusb.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/usb/input/mtouchusb.c	2005-01-10 20:11:19 -08:00
@@ -223,9 +223,9 @@
         mtouch->input.name = mtouch->name;
         mtouch->input.phys = mtouch->phys;
         mtouch->input.id.bustype = BUS_USB;
-        mtouch->input.id.vendor = udev->descriptor.idVendor;
-        mtouch->input.id.product = udev->descriptor.idProduct;
-        mtouch->input.id.version = udev->descriptor.bcdDevice;
+        mtouch->input.id.vendor = le16_to_cpu(udev->descriptor.idVendor);
+        mtouch->input.id.product = le16_to_cpu(udev->descriptor.idProduct);
+        mtouch->input.id.version = le16_to_cpu(udev->descriptor.bcdDevice);
         mtouch->input.dev = &intf->dev;
 
         mtouch->input.evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);
diff -Nru a/drivers/usb/input/powermate.c b/drivers/usb/input/powermate.c
--- a/drivers/usb/input/powermate.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/usb/input/powermate.c	2005-01-10 20:11:20 -08:00
@@ -375,12 +375,13 @@
 		return -EIO; /* failure */
 	}
 
-	switch (udev->descriptor.idProduct) {
+	switch (le16_to_cpu(udev->descriptor.idProduct)) {
 	case POWERMATE_PRODUCT_NEW: pm->input.name = pm_name_powermate; break;
 	case POWERMATE_PRODUCT_OLD: pm->input.name = pm_name_soundknob; break;
 	default: 
-	  pm->input.name = pm_name_soundknob;
-	  printk(KERN_WARNING "powermate: unknown product id %04x\n", udev->descriptor.idProduct);
+		pm->input.name = pm_name_soundknob;
+		printk(KERN_WARNING "powermate: unknown product id %04x\n",
+		       le16_to_cpu(udev->descriptor.idProduct));
 	}
 
 	pm->input.private = pm;
@@ -389,9 +390,9 @@
 	pm->input.relbit[LONG(REL_DIAL)] = BIT(REL_DIAL);
 	pm->input.mscbit[LONG(MSC_PULSELED)] = BIT(MSC_PULSELED);
 	pm->input.id.bustype = BUS_USB;
-	pm->input.id.vendor = udev->descriptor.idVendor;
-	pm->input.id.product = udev->descriptor.idProduct;
-	pm->input.id.version = udev->descriptor.bcdDevice;
+	pm->input.id.vendor = le16_to_cpu(udev->descriptor.idVendor);
+	pm->input.id.product = le16_to_cpu(udev->descriptor.idProduct);
+	pm->input.id.version = le16_to_cpu(udev->descriptor.bcdDevice);
 	pm->input.event = powermate_input_event;
 	pm->input.dev = &intf->dev;
 
diff -Nru a/drivers/usb/input/touchkitusb.c b/drivers/usb/input/touchkitusb.c
--- a/drivers/usb/input/touchkitusb.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/usb/input/touchkitusb.c	2005-01-10 20:11:17 -08:00
@@ -211,9 +211,9 @@
 	touchkit->input.name = touchkit->name;
 	touchkit->input.phys = touchkit->phys;
 	touchkit->input.id.bustype = BUS_USB;
-	touchkit->input.id.vendor = udev->descriptor.idVendor;
-	touchkit->input.id.product = udev->descriptor.idProduct;
-	touchkit->input.id.version = udev->descriptor.bcdDevice;
+	touchkit->input.id.vendor = le16_to_cpu(udev->descriptor.idVendor);
+	touchkit->input.id.product = le16_to_cpu(udev->descriptor.idProduct);
+	touchkit->input.id.version = le16_to_cpu(udev->descriptor.bcdDevice);
 	touchkit->input.dev = &intf->dev;
 
 	touchkit->input.evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);
diff -Nru a/drivers/usb/input/usbkbd.c b/drivers/usb/input/usbkbd.c
--- a/drivers/usb/input/usbkbd.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/usb/input/usbkbd.c	2005-01-10 20:11:22 -08:00
@@ -296,9 +296,9 @@
 	kbd->dev.name = kbd->name;
 	kbd->dev.phys = kbd->phys;	
 	kbd->dev.id.bustype = BUS_USB;
-	kbd->dev.id.vendor = dev->descriptor.idVendor;
-	kbd->dev.id.product = dev->descriptor.idProduct;
-	kbd->dev.id.version = dev->descriptor.bcdDevice;
+	kbd->dev.id.vendor = le16_to_cpu(dev->descriptor.idVendor);
+	kbd->dev.id.product = le16_to_cpu(dev->descriptor.idProduct);
+	kbd->dev.id.version = le16_to_cpu(dev->descriptor.bcdDevice);
 	kbd->dev.dev = &iface->dev;
 
 	if (!(buf = kmalloc(63, GFP_KERNEL))) {
diff -Nru a/drivers/usb/input/usbmouse.c b/drivers/usb/input/usbmouse.c
--- a/drivers/usb/input/usbmouse.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/usb/input/usbmouse.c	2005-01-10 20:11:22 -08:00
@@ -180,9 +180,9 @@
 	mouse->dev.name = mouse->name;
 	mouse->dev.phys = mouse->phys;
 	mouse->dev.id.bustype = BUS_USB;
-	mouse->dev.id.vendor = dev->descriptor.idVendor;
-	mouse->dev.id.product = dev->descriptor.idProduct;
-	mouse->dev.id.version = dev->descriptor.bcdDevice;
+	mouse->dev.id.vendor = le16_to_cpu(dev->descriptor.idVendor);
+	mouse->dev.id.product = le16_to_cpu(dev->descriptor.idProduct);
+	mouse->dev.id.version = le16_to_cpu(dev->descriptor.bcdDevice);
 	mouse->dev.dev = &intf->dev;
 
 	if (!(buf = kmalloc(63, GFP_KERNEL))) {
diff -Nru a/drivers/usb/input/wacom.c b/drivers/usb/input/wacom.c
--- a/drivers/usb/input/wacom.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/usb/input/wacom.c	2005-01-10 20:11:16 -08:00
@@ -692,9 +692,9 @@
 	wacom->dev.name = wacom->features->name;
 	wacom->dev.phys = wacom->phys;
 	wacom->dev.id.bustype = BUS_USB;
-	wacom->dev.id.vendor = dev->descriptor.idVendor;
-	wacom->dev.id.product = dev->descriptor.idProduct;
-	wacom->dev.id.version = dev->descriptor.bcdDevice;
+	wacom->dev.id.vendor = le16_to_cpu(dev->descriptor.idVendor);
+	wacom->dev.id.product = le16_to_cpu(dev->descriptor.idProduct);
+	wacom->dev.id.version = le16_to_cpu(dev->descriptor.bcdDevice);
 	wacom->dev.dev = &intf->dev;
 	wacom->usbdev = dev;
 
diff -Nru a/drivers/usb/input/xpad.c b/drivers/usb/input/xpad.c
--- a/drivers/usb/input/xpad.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/usb/input/xpad.c	2005-01-10 20:11:19 -08:00
@@ -226,8 +226,8 @@
 	int i;
 	
 	for (i = 0; xpad_device[i].idVendor; i++) {
-		if ((udev->descriptor.idVendor == xpad_device[i].idVendor) &&
-		    (udev->descriptor.idProduct == xpad_device[i].idProduct))
+		if ((le16_to_cpu(udev->descriptor.idVendor) == xpad_device[i].idVendor) &&
+		    (le16_to_cpu(udev->descriptor.idProduct) == xpad_device[i].idProduct))
 			break;
 	}
 	
@@ -264,9 +264,9 @@
 	xpad->udev = udev;
 	
 	xpad->dev.id.bustype = BUS_USB;
-	xpad->dev.id.vendor = udev->descriptor.idVendor;
-	xpad->dev.id.product = udev->descriptor.idProduct;
-	xpad->dev.id.version = udev->descriptor.bcdDevice;
+	xpad->dev.id.vendor = le16_to_cpu(udev->descriptor.idVendor);
+	xpad->dev.id.product = le16_to_cpu(udev->descriptor.idProduct);
+	xpad->dev.id.version = le16_to_cpu(udev->descriptor.bcdDevice);
 	xpad->dev.dev = &intf->dev;
 	xpad->dev.private = xpad;
 	xpad->dev.name = xpad_device[i].name;
diff -Nru a/drivers/usb/media/Makefile b/drivers/usb/media/Makefile
--- a/drivers/usb/media/Makefile	2005-01-10 20:11:15 -08:00
+++ b/drivers/usb/media/Makefile	2005-01-10 20:11:15 -08:00
@@ -2,7 +2,7 @@
 # Makefile for USB Media drivers
 #
 
-sn9c102-objs	:= sn9c102_core.o sn9c102_pas106b.o sn9c102_tas5110c1b.o sn9c102_tas5130d1b.o sn9c102_pas202bcb.o
+sn9c102-objs	:= sn9c102_core.o sn9c102_hv7131d.o sn9c102_mi0343.o sn9c102_pas106b.o sn9c102_pas202bcb.o sn9c102_tas5110c1b.o sn9c102_tas5130d1b.o
 
 obj-$(CONFIG_USB_DABUSB)	+= dabusb.o
 obj-$(CONFIG_USB_DSBR)		+= dsbr100.o
diff -Nru a/drivers/usb/media/dabusb.c b/drivers/usb/media/dabusb.c
--- a/drivers/usb/media/dabusb.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/usb/media/dabusb.c	2005-01-10 20:11:19 -08:00
@@ -724,13 +724,16 @@
 	pdabusb_t s;
 
 	dbg("dabusb: probe: vendor id 0x%x, device id 0x%x ifnum:%d",
-	  usbdev->descriptor.idVendor, usbdev->descriptor.idProduct, intf->altsetting->desc.bInterfaceNumber);
+	    le16_to_cpu(usbdev->descriptor.idVendor),
+	    le16_to_cpu(usbdev->descriptor.idProduct),
+	    intf->altsetting->desc.bInterfaceNumber);
 
 	/* We don't handle multiple configurations */
 	if (usbdev->descriptor.bNumConfigurations != 1)
 		return -ENODEV;
 
-	if (intf->altsetting->desc.bInterfaceNumber != _DABUSB_IF && usbdev->descriptor.idProduct == 0x9999)
+	if (intf->altsetting->desc.bInterfaceNumber != _DABUSB_IF &&
+	    le16_to_cpu(usbdev->descriptor.idProduct) == 0x9999)
 		return -ENODEV;
 
 
@@ -746,7 +749,7 @@
 		err("reset_configuration failed");
 		goto reject;
 	}
-	if (usbdev->descriptor.idProduct == 0x2131) {
+	if (le16_to_cpu(usbdev->descriptor.idProduct) == 0x2131) {
 		dabusb_loadmem (s, NULL);
 		goto reject;
 	}
diff -Nru a/drivers/usb/media/ibmcam.c b/drivers/usb/media/ibmcam.c
--- a/drivers/usb/media/ibmcam.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/usb/media/ibmcam.c	2005-01-10 20:11:17 -08:00
@@ -3659,17 +3659,8 @@
 	if (dev->descriptor.bNumConfigurations != 1)
 		return -ENODEV;
 
-	/* Is it an IBM camera? */
-	if (dev->descriptor.idVendor != IBMCAM_VENDOR_ID)
-		return -ENODEV;
-	if ((dev->descriptor.idProduct != IBMCAM_PRODUCT_ID) &&
-	    (dev->descriptor.idProduct != VEO_800C_PRODUCT_ID) &&
-	    (dev->descriptor.idProduct != VEO_800D_PRODUCT_ID) &&
-	    (dev->descriptor.idProduct != NETCAM_PRODUCT_ID))
-		return -ENODEV;
-
 	/* Check the version/revision */
-	switch (dev->descriptor.bcdDevice) {
+	switch (le16_to_cpu(dev->descriptor.bcdDevice)) {
 	case 0x0002:
 		if (ifnum != 2)
 			return -ENODEV;
@@ -3678,8 +3669,8 @@
 	case 0x030A:
 		if (ifnum != 0)
 			return -ENODEV;
-		if ((dev->descriptor.idProduct == NETCAM_PRODUCT_ID) ||
-		    (dev->descriptor.idProduct == VEO_800D_PRODUCT_ID))
+		if ((le16_to_cpu(dev->descriptor.idProduct) == NETCAM_PRODUCT_ID) ||
+		    (le16_to_cpu(dev->descriptor.idProduct) == VEO_800D_PRODUCT_ID))
 			model = IBMCAM_MODEL_4;
 		else
 			model = IBMCAM_MODEL_2;
@@ -3691,14 +3682,14 @@
 		break;
 	default:
 		err("IBM camera with revision 0x%04x is not supported.",
-			dev->descriptor.bcdDevice);
+			le16_to_cpu(dev->descriptor.bcdDevice));
 		return -ENODEV;
 	}
 
 	/* Print detailed info on what we found so far */
 	do {
 		char *brand = NULL;
-		switch (dev->descriptor.idProduct) {
+		switch (le16_to_cpu(dev->descriptor.idProduct)) {
 		case NETCAM_PRODUCT_ID:
 			brand = "IBM NetCamera";
 			break;
@@ -3714,7 +3705,7 @@
 			break;
 		}
 		info("%s USB camera found (model %d, rev. 0x%04x)",
-		     brand, model, dev->descriptor.bcdDevice);
+		     brand, model, le16_to_cpu(dev->descriptor.bcdDevice));
 	} while (0);
 
 	/* Validate found interface: must have one ISO endpoint */
@@ -3752,7 +3743,7 @@
 			err("Interface %d. has ISO OUT endpoint!", ifnum);
 			return -ENODEV;
 		}
-		if (endpoint->wMaxPacketSize == 0) {
+		if (le16_to_cpu(endpoint->wMaxPacketSize) == 0) {
 			if (inactInterface < 0)
 				inactInterface = i;
 			else {
@@ -3762,7 +3753,7 @@
 		} else {
 			if (actInterface < 0) {
 				actInterface = i;
-				maxPS = endpoint->wMaxPacketSize;
+				maxPS = le16_to_cpu(endpoint->wMaxPacketSize);
 				if (debug > 0)
 					info("Active setting=%d. maxPS=%d.", i, maxPS);
 			} else
diff -Nru a/drivers/usb/media/konicawc.c b/drivers/usb/media/konicawc.c
--- a/drivers/usb/media/konicawc.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/usb/media/konicawc.c	2005-01-10 20:11:15 -08:00
@@ -390,7 +390,7 @@
 				spd_to_iface[cam->speed]);
 	if (!interface)
 		return -ENXIO;
-	pktsz = interface->endpoint[1].desc.wMaxPacketSize;
+	pktsz = le16_to_cpu(interface->endpoint[1].desc.wMaxPacketSize);
 	DEBUG(1, "pktsz = %d", pktsz);
 	if (!CAMERA_IS_OPERATIONAL(uvd)) {
 		err("Camera is not operational");
@@ -732,7 +732,7 @@
 	if (dev->descriptor.bNumConfigurations != 1)
 		return -ENODEV;
 
-	info("Konica Webcam (rev. 0x%04x)", dev->descriptor.bcdDevice);
+	info("Konica Webcam (rev. 0x%04x)", le16_to_cpu(dev->descriptor.bcdDevice));
 	RESTRICT_TO_RANGE(speed, 0, MAX_SPEED);
 
 	/* Validate found interface: must have one ISO endpoint */
@@ -756,7 +756,7 @@
 		}
 		endpoint = &interface->endpoint[1].desc;
 		DEBUG(1, "found endpoint: addr: 0x%2.2x maxps = 0x%4.4x",
-		    endpoint->bEndpointAddress, endpoint->wMaxPacketSize);
+		    endpoint->bEndpointAddress, le16_to_cpu(endpoint->wMaxPacketSize));
 		if (video_ep == 0)
 			video_ep = endpoint->bEndpointAddress;
 		else if (video_ep != endpoint->bEndpointAddress) {
@@ -773,7 +773,7 @@
 			    interface->desc.bInterfaceNumber);
 			return -ENODEV;
 		}
-		if (endpoint->wMaxPacketSize == 0) {
+		if (le16_to_cpu(endpoint->wMaxPacketSize) == 0) {
 			if (inactInterface < 0)
 				inactInterface = i;
 			else {
@@ -786,8 +786,8 @@
 				actInterface = i;
 			}
 		}
-		if(endpoint->wMaxPacketSize > maxPS)
-			maxPS = endpoint->wMaxPacketSize;
+		if (le16_to_cpu(endpoint->wMaxPacketSize) > maxPS)
+			maxPS = le16_to_cpu(endpoint->wMaxPacketSize);
 	}
 	if(actInterface == -1) {
 		err("Cant find required endpoint");
@@ -846,9 +846,9 @@
 		cam->input.evbit[0] = BIT(EV_KEY);
 		cam->input.keybit[LONG(BTN_0)] = BIT(BTN_0);
 		cam->input.id.bustype = BUS_USB;
-		cam->input.id.vendor = dev->descriptor.idVendor;
-		cam->input.id.product = dev->descriptor.idProduct;
-		cam->input.id.version = dev->descriptor.bcdDevice;
+		cam->input.id.vendor = le16_to_cpu(dev->descriptor.idVendor);
+		cam->input.id.product = le16_to_cpu(dev->descriptor.idProduct);
+		cam->input.id.version = le16_to_cpu(dev->descriptor.bcdDevice);
 		input_register_device(&cam->input);
 		
 		usb_make_path(dev, cam->input_physname, 56);
diff -Nru a/drivers/usb/media/ov511.c b/drivers/usb/media/ov511.c
--- a/drivers/usb/media/ov511.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/usb/media/ov511.c	2005-01-10 20:11:17 -08:00
@@ -3908,15 +3908,11 @@
 		ov->fbuf = NULL;
 	}
 
-	if (ov->rawfbuf) {
-		vfree(ov->rawfbuf);
-		ov->rawfbuf = NULL;
-	}
+	vfree(ov->rawfbuf);
+	ov->rawfbuf = NULL;
 
-	if (ov->tempfbuf) {
-		vfree(ov->tempfbuf);
-		ov->tempfbuf = NULL;
-	}
+	vfree(ov->tempfbuf);
+	ov->tempfbuf = NULL;
 
 	for (i = 0; i < OV511_NUMSBUF; i++) {
 		if (ov->sbuf[i].data) {
@@ -5596,7 +5592,7 @@
 		if (ifp) {
 			alt = usb_altnum_to_altsetting(ifp, 7);
 			if (alt)
-				mxps = alt->endpoint[0].desc.wMaxPacketSize;
+				mxps = le16_to_cpu(alt->endpoint[0].desc.wMaxPacketSize);
 		}
 
 		/* Some OV518s have packet numbering by default, some don't */
@@ -5825,7 +5821,7 @@
 	ov->auto_gain = autogain;
 	ov->auto_exp = autoexp;
 
-	switch (dev->descriptor.idProduct) {
+	switch (le16_to_cpu(dev->descriptor.idProduct)) {
 	case PROD_OV511:
 		ov->bridge = BRG_OV511;
 		ov->bclass = BCL_OV511;
@@ -5843,13 +5839,13 @@
 		ov->bclass = BCL_OV518;
 		break;
 	case PROD_ME2CAM:
-		if (dev->descriptor.idVendor != VEND_MATTEL)
+		if (le16_to_cpu(dev->descriptor.idVendor) != VEND_MATTEL)
 			goto error;
 		ov->bridge = BRG_OV511PLUS;
 		ov->bclass = BCL_OV511;
 		break;
 	default:
-		err("Unknown product ID 0x%04x", dev->descriptor.idProduct);
+		err("Unknown product ID 0x%04x", le16_to_cpu(dev->descriptor.idProduct));
 		goto error;
 	}
 
diff -Nru a/drivers/usb/media/se401.c b/drivers/usb/media/se401.c
--- a/drivers/usb/media/se401.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/usb/media/se401.c	2005-01-10 20:11:17 -08:00
@@ -1315,20 +1315,20 @@
         interface = &intf->cur_altsetting->desc;
 
         /* Is it an se401? */
-        if (dev->descriptor.idVendor == 0x03e8 &&
-            dev->descriptor.idProduct == 0x0004) {
+        if (le16_to_cpu(dev->descriptor.idVendor) == 0x03e8 &&
+            le16_to_cpu(dev->descriptor.idProduct) == 0x0004) {
                 camera_name="Endpoints/Aox SE401";
-        } else if (dev->descriptor.idVendor == 0x0471 &&
-            dev->descriptor.idProduct == 0x030b) {
+        } else if (le16_to_cpu(dev->descriptor.idVendor) == 0x0471 &&
+            le16_to_cpu(dev->descriptor.idProduct) == 0x030b) {
                 camera_name="Philips PCVC665K";
-        } else if (dev->descriptor.idVendor == 0x047d &&
-	    dev->descriptor.idProduct == 0x5001) {
+        } else if (le16_to_cpu(dev->descriptor.idVendor) == 0x047d &&
+	    le16_to_cpu(dev->descriptor.idProduct) == 0x5001) {
 		camera_name="Kensington VideoCAM 67014";
-        } else if (dev->descriptor.idVendor == 0x047d &&
-	    dev->descriptor.idProduct == 0x5002) {
+        } else if (le16_to_cpu(dev->descriptor.idVendor) == 0x047d &&
+	    le16_to_cpu(dev->descriptor.idProduct) == 0x5002) {
 		camera_name="Kensington VideoCAM 6701(5/7)";
-        } else if (dev->descriptor.idVendor == 0x047d &&
-	    dev->descriptor.idProduct == 0x5003) {
+        } else if (le16_to_cpu(dev->descriptor.idVendor) == 0x047d &&
+	    le16_to_cpu(dev->descriptor.idProduct) == 0x5003) {
 		camera_name="Kensington VideoCAM 67016";
 		button=0;
 	} else
@@ -1354,7 +1354,7 @@
         se401->iface = interface->bInterfaceNumber;
         se401->camera_name = camera_name;
 
-	info("firmware version: %02x", dev->descriptor.bcdDevice & 255);
+	info("firmware version: %02x", le16_to_cpu(dev->descriptor.bcdDevice) & 255);
 
         if (se401_init(se401, button)) {
 		kfree(se401);
diff -Nru a/drivers/usb/media/sn9c102.h b/drivers/usb/media/sn9c102.h
--- a/drivers/usb/media/sn9c102.h	2005-01-10 20:11:19 -08:00
+++ b/drivers/usb/media/sn9c102.h	2005-01-10 20:11:19 -08:00
@@ -46,8 +46,8 @@
 #define SN9C102_URBS              2
 #define SN9C102_ISO_PACKETS       7
 #define SN9C102_ALTERNATE_SETTING 8
-#define SN9C102_URB_TIMEOUT       msecs_to_jiffies(3)
-#define SN9C102_CTRL_TIMEOUT      msecs_to_jiffies(100)
+#define SN9C102_URB_TIMEOUT       msecs_to_jiffies(2 * SN9C102_ISO_PACKETS)
+#define SN9C102_CTRL_TIMEOUT      msecs_to_jiffies(300)
 
 /*****************************************************************************/
 
@@ -55,8 +55,8 @@
 #define SN9C102_MODULE_AUTHOR   "(C) 2004 Luca Risolia"
 #define SN9C102_AUTHOR_EMAIL    "<luca.risolia@studio.unibo.it>"
 #define SN9C102_MODULE_LICENSE  "GPL"
-#define SN9C102_MODULE_VERSION  "1:1.19"
-#define SN9C102_MODULE_VERSION_CODE  KERNEL_VERSION(1, 0, 19)
+#define SN9C102_MODULE_VERSION  "1:1.20"
+#define SN9C102_MODULE_VERSION_CODE  KERNEL_VERSION(1, 0, 20)
 
 enum sn9c102_bridge {
 	BRIDGE_SN9C101 = 0x01,
@@ -101,8 +101,12 @@
 	STREAM_ON,
 };
 
+typedef char sn9c102_sof_header_t[12];
+typedef char sn9c102_eof_header_t[4];
+
 struct sn9c102_sysfs_attr {
 	u8 reg, i2c_reg;
+	sn9c102_sof_header_t frame_header;
 };
 
 static DECLARE_MUTEX(sn9c102_sysfs_lock);
@@ -131,6 +135,7 @@
 	struct v4l2_jpegcompression compression;
 
 	struct sn9c102_sysfs_attr sysfs;
+	sn9c102_sof_header_t sof_header;
 	u16 reg[32];
 
 	enum sn9c102_dev_state state;
diff -Nru a/drivers/usb/media/sn9c102_core.c b/drivers/usb/media/sn9c102_core.c
--- a/drivers/usb/media/sn9c102_core.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/usb/media/sn9c102_core.c	2005-01-10 20:11:15 -08:00
@@ -82,9 +82,6 @@
 
 /*****************************************************************************/
 
-typedef char sn9c102_sof_header_t[12];
-typedef char sn9c102_eof_header_t[4];
-
 static sn9c102_sof_header_t sn9c102_sof_header[] = {
 	{0xff, 0xff, 0x00, 0xc4, 0xc4, 0x96, 0x00},
 	{0xff, 0xff, 0x00, 0xc4, 0xc4, 0x96, 0x01},
@@ -277,9 +274,9 @@
 		if (r & 0x04)
 			return 0;
 		if (sensor->frequency & SN9C102_I2C_400KHZ)
-			udelay(5*8);
+			udelay(5*16);
 		else
-			udelay(16*8);
+			udelay(16*16);
 	}
 	return -EBUSY;
 }
@@ -306,18 +303,19 @@
 
 
 int 
-sn9c102_i2c_try_read(struct sn9c102_device* cam,
-                     struct sn9c102_sensor* sensor, u8 address)
+sn9c102_i2c_try_raw_read(struct sn9c102_device* cam,
+                         struct sn9c102_sensor* sensor, u8 data0, u8 data1,
+                         u8 n, u8 buffer[])
 {
 	struct usb_device* udev = cam->usbdev;
 	u8* data = cam->control_buffer;
 	int err = 0, res;
 
-	/* Write cycle - address */
+	/* Write cycle */
 	data[0] = ((sensor->interface == SN9C102_I2C_2WIRES) ? 0x80 : 0) |
 	          ((sensor->frequency & SN9C102_I2C_400KHZ) ? 0x01 : 0) | 0x10;
-	data[1] = sensor->slave_write_id;
-	data[2] = address;
+	data[1] = data0; /* I2C slave id */
+	data[2] = data1; /* address */
 	data[7] = 0x10;
 	res = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), 0x08, 0x41,
 	                      0x08, 0, data, 8, SN9C102_CTRL_TIMEOUT);
@@ -326,11 +324,11 @@
 
 	err += sn9c102_i2c_wait(cam, sensor);
 
-	/* Read cycle - 1 byte */
+	/* Read cycle - n bytes */
 	data[0] = ((sensor->interface == SN9C102_I2C_2WIRES) ? 0x80 : 0) |
 	          ((sensor->frequency & SN9C102_I2C_400KHZ) ? 0x01 : 0) |
-	          0x10 | 0x02;
-	data[1] = sensor->slave_read_id;
+	          (n << 4) | 0x02;
+	data[1] = data0;
 	data[7] = 0x10;
 	res = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), 0x08, 0x41,
 	                      0x08, 0, data, 8, SN9C102_CTRL_TIMEOUT);
@@ -339,7 +337,7 @@
 
 	err += sn9c102_i2c_wait(cam, sensor);
 
-	/* The read byte will be placed in data[4] */
+	/* The first read byte will be placed in data[4] */
 	res = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), 0x00, 0xc1,
 	                      0x0a, 0, data, 5, SN9C102_CTRL_TIMEOUT);
 	if (res < 0)
@@ -347,12 +345,18 @@
 
 	err += sn9c102_i2c_detect_read_error(cam, sensor);
 
-	if (err)
+	PDBGG("I2C read: address 0x%02X, first read byte: 0x%02X", data1,
+	      data[4])
+
+	if (err) {
 		DBG(3, "I2C read failed for %s image sensor", sensor->name)
+		return -1;
+	}
 
-	PDBGG("I2C read: address 0x%02X, value: 0x%02X", address, data[4])
+	if (buffer)
+		memcpy(buffer, data, sizeof(buffer));
 
-	return err ? -1 : (int)data[4];
+	return (int)data[4];
 }
 
 
@@ -395,12 +399,21 @@
 }
 
 
+int
+sn9c102_i2c_try_read(struct sn9c102_device* cam,
+                     struct sn9c102_sensor* sensor, u8 address)
+{
+	return sn9c102_i2c_try_raw_read(cam, sensor, sensor->i2c_slave_id,
+	                                address, 1, NULL);
+}
+
+
 int 
 sn9c102_i2c_try_write(struct sn9c102_device* cam,
                       struct sn9c102_sensor* sensor, u8 address, u8 value)
 {
 	return sn9c102_i2c_try_raw_write(cam, sensor, 3, 
-	                                 sensor->slave_write_id, address,
+	                                 sensor->i2c_slave_id, address,
 	                                 value, 0, 0, 0);
 }
 
@@ -433,9 +446,11 @@
 	for (i = 0; (len >= soflen) && (i <= len - soflen); i++)
 		for (j = 0; j < n; j++)
 			/* It's enough to compare 7 bytes */
-			if (!memcmp(mem + i, sn9c102_sof_header[j], 7))
-				/* Skips the header */
+			if (!memcmp(mem + i, sn9c102_sof_header[j], 7)) {
+				memcpy(cam->sof_header, mem + i, soflen);
+				/* Skip the header */
 				return mem + i + soflen;
+			}
 
 	return NULL;
 }
@@ -563,6 +578,9 @@
 						(*f) = NULL;
 					spin_unlock_irqrestore(&cam->queue_lock
 					                       , lock_flags);
+					memcpy(cam->sysfs.frame_header,
+					       cam->sof_header,
+					       sizeof(sn9c102_sof_header_t));
 					DBG(3, "Video frame captured: "
 					       "%lu bytes", (unsigned long)(b))
 
@@ -746,15 +764,14 @@
 	                         (cam->stream == STREAM_OFF) ||
 	                         (cam->state & DEV_DISCONNECTED),
 	                         SN9C102_URB_TIMEOUT);
-	if (err) {
+	if (cam->state & DEV_DISCONNECTED)
+		return -ENODEV;
+	else if (err) {
 		cam->state |= DEV_MISCONFIGURED;
-		DBG(1, "The camera is misconfigured. To use "
-		       "it, close and open /dev/video%d "
-		       "again.", cam->v4ldev->minor)
+		DBG(1, "The camera is misconfigured. To use it, close and "
+		       "open /dev/video%d again.", cam->v4ldev->minor)
 		return err;
 	}
-	if (cam->state & DEV_DISCONNECTED)
-		return -ENODEV;
 
 	return 0;
 }
@@ -894,6 +911,11 @@
 		return -ENODEV;
 	}
 
+	if (!(cam->sensor->sysfs_ops & SN9C102_I2C_WRITE)) {
+		up(&sn9c102_sysfs_lock);
+		return -ENOSYS;
+	}
+
 	value = sn9c102_strtou8(buf, len, &count);
 	if (!count) {
 		up(&sn9c102_sysfs_lock);
@@ -937,7 +959,7 @@
 	up(&sn9c102_sysfs_lock);
 
 	return count;
-} 
+}
 
 
 static ssize_t 
@@ -988,7 +1010,7 @@
 		return -ENODEV;
 	}
 
-	if (cam->sensor->slave_read_id == SN9C102_I2C_SLAVEID_UNAVAILABLE) {
+	if (!(cam->sensor->sysfs_ops & SN9C102_I2C_READ)) {
 		up(&sn9c102_sysfs_lock);
 		return -ENOSYS;
 	}
@@ -1129,6 +1151,24 @@
 }
 
 
+static ssize_t sn9c102_show_frame_header(struct class_device* cd, char* buf)
+{
+	struct sn9c102_device* cam;
+	ssize_t count;
+
+	cam = video_get_drvdata(to_video_device(cd));
+	if (!cam)
+		return -ENODEV;
+
+	count = sizeof(cam->sysfs.frame_header);
+	memcpy(buf, cam->sysfs.frame_header, count);
+
+	DBG(3, "Frame header, read bytes: %zd", count)
+
+	return count;
+} 
+
+
 static CLASS_DEVICE_ATTR(reg, S_IRUGO | S_IWUSR,
                          sn9c102_show_reg, sn9c102_store_reg);
 static CLASS_DEVICE_ATTR(val, S_IRUGO | S_IWUSR,
@@ -1140,6 +1180,8 @@
 static CLASS_DEVICE_ATTR(green, S_IWUGO, NULL, sn9c102_store_green);
 static CLASS_DEVICE_ATTR(blue, S_IWUGO, NULL, sn9c102_store_blue);
 static CLASS_DEVICE_ATTR(red, S_IWUGO, NULL, sn9c102_store_red);
+static CLASS_DEVICE_ATTR(frame_header, S_IRUGO,
+                         sn9c102_show_frame_header, NULL);
 
 
 static void sn9c102_create_sysfs(struct sn9c102_device* cam)
@@ -1148,14 +1190,14 @@
 
 	video_device_create_file(v4ldev, &class_device_attr_reg);
 	video_device_create_file(v4ldev, &class_device_attr_val);
+	video_device_create_file(v4ldev, &class_device_attr_frame_header);
 	if (cam->bridge == BRIDGE_SN9C101 || cam->bridge == BRIDGE_SN9C102)
 		video_device_create_file(v4ldev, &class_device_attr_green);
 	else if (cam->bridge == BRIDGE_SN9C103) {
 		video_device_create_file(v4ldev, &class_device_attr_blue);
 		video_device_create_file(v4ldev, &class_device_attr_red);
 	}
-	if (cam->sensor->slave_write_id != SN9C102_I2C_SLAVEID_UNAVAILABLE ||
-	    cam->sensor->slave_read_id != SN9C102_I2C_SLAVEID_UNAVAILABLE) {
+	if (cam->sensor->sysfs_ops) {
 		video_device_create_file(v4ldev, &class_device_attr_i2c_reg);
 		video_device_create_file(v4ldev, &class_device_attr_i2c_val);
 	}
@@ -1164,11 +1206,11 @@
 /*****************************************************************************/
 
 static int
-sn9c102_set_format(struct sn9c102_device* cam, struct v4l2_pix_format* fmt)
+sn9c102_set_pix_format(struct sn9c102_device* cam, struct v4l2_pix_format* pix)
 {
 	int err = 0;
 
-	if (fmt->pixelformat == V4L2_PIX_FMT_SN9C10X)
+	if (pix->pixelformat == V4L2_PIX_FMT_SN9C10X)
 		err += sn9c102_write_reg(cam, cam->reg[0x18] | 0x80, 0x18);
 	else
 		err += sn9c102_write_reg(cam, cam->reg[0x18] & 0x7f, 0x18);
@@ -1273,7 +1315,9 @@
 		cam->compression.quality =  cam->reg[0x17] & 0x01 ? 0 : 1;
 	else
 		err += sn9c102_set_compression(cam, &cam->compression);
-	err += sn9c102_set_format(cam, &s->pix_format);
+	err += sn9c102_set_pix_format(cam, &s->pix_format);
+	if (s->set_pix_format)
+		err += s->set_pix_format(cam, &s->pix_format);
 	if (err)
 		return err;
 
@@ -2077,8 +2121,10 @@
 
 		sn9c102_release_buffers(cam);
 
-		err += sn9c102_set_format(cam, pix);
+		err += sn9c102_set_pix_format(cam, pix);
 		err += sn9c102_set_crop(cam, &rect);
+		if (s->set_pix_format)
+			err += s->set_pix_format(cam, pix);
 		if (s->set_crop)
 			err += s->set_crop(cam, &rect);
 		err += sn9c102_set_scale(cam, scale);
@@ -2450,8 +2496,8 @@
 
 	n = sizeof(sn9c102_id_table)/sizeof(sn9c102_id_table[0]);
 	for (i = 0; i < n-1; i++)
-		if (udev->descriptor.idVendor==sn9c102_id_table[i].idVendor &&
-		    udev->descriptor.idProduct==sn9c102_id_table[i].idProduct)
+		if (le16_to_cpu(udev->descriptor.idVendor) == sn9c102_id_table[i].idVendor &&
+		    le16_to_cpu(udev->descriptor.idProduct) == sn9c102_id_table[i].idProduct)
 			break;
 	if (i == n-1)
 		return -ENODEV;
@@ -2551,6 +2597,7 @@
 	DBG(2, "V4L2 device registered as /dev/video%d", cam->v4ldev->minor)
 
 	sn9c102_create_sysfs(cam);
+	DBG(2, "Optional device control through 'sysfs' interface ready")
 
 	usb_set_intfdata(intf, cam);
 
diff -Nru a/drivers/usb/media/sn9c102_hv7131d.c b/drivers/usb/media/sn9c102_hv7131d.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/usb/media/sn9c102_hv7131d.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,271 @@
+/***************************************************************************
+ * Plug-in for HV7131D image sensor connected to the SN9C10x PC Camera     *
+ * Controllers                                                             *
+ *                                                                         *
+ * Copyright (C) 2004 by Luca Risolia <luca.risolia@studio.unibo.it>       *
+ *                                                                         *
+ * 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 "sn9c102_sensor.h"
+
+
+static struct sn9c102_sensor hv7131d;
+
+
+static int hv7131d_init(struct sn9c102_device* cam)
+{
+	int err = 0;
+
+	err += sn9c102_write_reg(cam, 0x00, 0x10);
+	err += sn9c102_write_reg(cam, 0x00, 0x11);
+	err += sn9c102_write_reg(cam, 0x00, 0x14);
+	err += sn9c102_write_reg(cam, 0x60, 0x17);
+	err += sn9c102_write_reg(cam, 0x0e, 0x18);
+	err += sn9c102_write_reg(cam, 0xf2, 0x19);
+
+	err += sn9c102_i2c_write(cam, 0x01, 0x04);
+	err += sn9c102_i2c_write(cam, 0x02, 0x00);
+	err += sn9c102_i2c_write(cam, 0x28, 0x00);
+
+	return err;
+}
+
+
+static int hv7131d_get_ctrl(struct sn9c102_device* cam, 
+                            struct v4l2_control* ctrl)
+{
+	switch (ctrl->id) {
+	case V4L2_CID_EXPOSURE:
+		{
+			int r1 = sn9c102_i2c_read(cam, 0x26),
+			    r2 = sn9c102_i2c_read(cam, 0x27);
+			if (r1 < 0 || r2 < 0)
+				return -EIO;
+			ctrl->value = (r1 << 8) | (r2 & 0xff);
+		}
+		return 0;
+	case V4L2_CID_RED_BALANCE:
+		if ((ctrl->value = sn9c102_i2c_read(cam, 0x31)) < 0)
+			return -EIO;
+		ctrl->value = 0x3f - (ctrl->value & 0x3f);
+		return 0;
+	case V4L2_CID_BLUE_BALANCE:
+		if ((ctrl->value = sn9c102_i2c_read(cam, 0x33)) < 0)
+			return -EIO;
+		ctrl->value = 0x3f - (ctrl->value & 0x3f);
+		return 0;
+	case SN9C102_V4L2_CID_GREEN_BALANCE:
+		if ((ctrl->value = sn9c102_i2c_read(cam, 0x32)) < 0)
+			return -EIO;
+		ctrl->value = 0x3f - (ctrl->value & 0x3f);
+		return 0;
+	case SN9C102_V4L2_CID_RESET_LEVEL:
+		if ((ctrl->value = sn9c102_i2c_read(cam, 0x30)) < 0)
+			return -EIO;
+		ctrl->value &= 0x3f;
+		return 0;
+	case SN9C102_V4L2_CID_PIXEL_BIAS_VOLTAGE:
+		if ((ctrl->value = sn9c102_i2c_read(cam, 0x34)) < 0)
+			return -EIO;
+		ctrl->value &= 0x07;
+		return 0;
+	default:
+		return -EINVAL;
+	}
+}
+
+
+static int hv7131d_set_ctrl(struct sn9c102_device* cam, 
+                            const struct v4l2_control* ctrl)
+{
+	int err = 0;
+
+	switch (ctrl->id) {
+	case V4L2_CID_EXPOSURE:
+		err += sn9c102_i2c_write(cam, 0x26, ctrl->value >> 8);
+		err += sn9c102_i2c_write(cam, 0x27, ctrl->value & 0xff);
+		break;
+	case V4L2_CID_RED_BALANCE:
+		err += sn9c102_i2c_write(cam, 0x31, 0x3f - ctrl->value);
+		break;
+	case V4L2_CID_BLUE_BALANCE:
+		err += sn9c102_i2c_write(cam, 0x33, 0x3f - ctrl->value);
+		break;
+	case SN9C102_V4L2_CID_GREEN_BALANCE:
+		err += sn9c102_i2c_write(cam, 0x32, 0x3f - ctrl->value);
+		break;
+	case SN9C102_V4L2_CID_RESET_LEVEL:
+		err += sn9c102_i2c_write(cam, 0x30, ctrl->value);
+		break;
+	case SN9C102_V4L2_CID_PIXEL_BIAS_VOLTAGE:
+		err += sn9c102_i2c_write(cam, 0x34, ctrl->value);
+		break;
+	default:
+		return -EINVAL;
+	}
+
+	return err ? -EIO : 0;
+}
+
+
+static int hv7131d_set_crop(struct sn9c102_device* cam, 
+                            const struct v4l2_rect* rect)
+{
+	struct sn9c102_sensor* s = &hv7131d;
+	int err = 0;
+	u8 h_start = (u8)(rect->left - s->cropcap.bounds.left) + 2,
+	   v_start = (u8)(rect->top - s->cropcap.bounds.top) + 2;
+
+	err += sn9c102_write_reg(cam, h_start, 0x12);
+	err += sn9c102_write_reg(cam, v_start, 0x13);
+
+	return err;
+}
+
+
+static int hv7131d_set_pix_format(struct sn9c102_device* cam, 
+                                  const struct v4l2_pix_format* pix)
+{
+	int err = 0;
+
+	if (pix->pixelformat == V4L2_PIX_FMT_SN9C10X)
+		err += sn9c102_write_reg(cam, 0x42, 0x19);
+	else
+		err += sn9c102_write_reg(cam, 0xf2, 0x19);
+
+	return err;
+}
+
+
+static struct sn9c102_sensor hv7131d = {
+	.name = "HV7131D",
+	.maintainer = "Luca Risolia <luca.risolia@studio.unibo.it>",
+	.sysfs_ops = SN9C102_I2C_READ | SN9C102_I2C_WRITE,
+	.frequency = SN9C102_I2C_100KHZ,
+	.interface = SN9C102_I2C_2WIRES,
+	.i2c_slave_id = 0x11,
+	.init = &hv7131d_init,
+	.qctrl = {
+		{
+			.id = V4L2_CID_EXPOSURE,
+			.type = V4L2_CTRL_TYPE_INTEGER,
+			.name = "exposure",
+			.minimum = 0x0250,
+			.maximum = 0xffff,
+			.step = 0x0001,
+			.default_value = 0x0250,
+			.flags = 0,
+		},
+		{
+			.id = V4L2_CID_RED_BALANCE,
+			.type = V4L2_CTRL_TYPE_INTEGER,
+			.name = "red balance",
+			.minimum = 0x00,
+			.maximum = 0x3f,
+			.step = 0x01,
+			.default_value = 0x00,
+			.flags = 0,
+		},
+		{
+			.id = V4L2_CID_BLUE_BALANCE,
+			.type = V4L2_CTRL_TYPE_INTEGER,
+			.name = "blue balance",
+			.minimum = 0x00,
+			.maximum = 0x3f,
+			.step = 0x01,
+			.default_value = 0x20,
+			.flags = 0,
+		},
+		{
+			.id = SN9C102_V4L2_CID_GREEN_BALANCE,
+			.type = V4L2_CTRL_TYPE_INTEGER,
+			.name = "green balance",
+			.minimum = 0x00,
+			.maximum = 0x3f,
+			.step = 0x01,
+			.default_value = 0x1e,
+			.flags = 0,
+		},
+		{
+			.id = SN9C102_V4L2_CID_RESET_LEVEL,
+			.type = V4L2_CTRL_TYPE_INTEGER,
+			.name = "reset level",
+			.minimum = 0x19,
+			.maximum = 0x3f,
+			.step = 0x01,
+			.default_value = 0x30,
+			.flags = 0,
+		},
+		{
+			.id = SN9C102_V4L2_CID_PIXEL_BIAS_VOLTAGE,
+			.type = V4L2_CTRL_TYPE_INTEGER,
+			.name = "pixel bias voltage",
+			.minimum = 0x00,
+			.maximum = 0x07,
+			.step = 0x01,
+			.default_value = 0x02,
+			.flags = 0,
+		},
+	},
+	.get_ctrl = &hv7131d_get_ctrl,
+	.set_ctrl = &hv7131d_set_ctrl,
+	.cropcap = {
+		.bounds = {
+			.left = 0,
+			.top = 0,
+			.width = 640,
+			.height = 480,
+		},
+		.defrect = {
+			.left = 0,
+			.top = 0,
+			.width = 640,
+			.height = 480,
+		},
+	},
+	.set_crop = &hv7131d_set_crop,
+	.pix_format = {
+		.width = 640,
+		.height = 480,
+		.pixelformat = V4L2_PIX_FMT_SBGGR8,
+		.priv = 8,
+	},
+	.set_pix_format = &hv7131d_set_pix_format
+};
+
+
+int sn9c102_probe_hv7131d(struct sn9c102_device* cam)
+{
+	int r0 = 0, r1 = 0, err = 0;
+
+	err += sn9c102_write_reg(cam, 0x01, 0x01);
+	err += sn9c102_write_reg(cam, 0x00, 0x01);
+	err += sn9c102_write_reg(cam, 0x28, 0x17);
+	if (err)
+		return -EIO;
+
+	r0 = sn9c102_i2c_try_read(cam, &hv7131d, 0x00);
+	r1 = sn9c102_i2c_try_read(cam, &hv7131d, 0x01);
+	if (r0 < 0 || r1 < 0)
+		return -EIO;
+
+	if (r0 != 0x00 && r1 != 0x04)
+		return -ENODEV;
+
+	sn9c102_attach_sensor(cam, &hv7131d);
+
+	return 0;
+}
diff -Nru a/drivers/usb/media/sn9c102_mi0343.c b/drivers/usb/media/sn9c102_mi0343.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/usb/media/sn9c102_mi0343.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,363 @@
+/***************************************************************************
+ * Plug-in for MI-0343 image sensor connected to the SN9C10x PC Camera     *
+ * Controllers                                                             *
+ *                                                                         *
+ * Copyright (C) 2004 by Luca Risolia <luca.risolia@studio.unibo.it>       *
+ *                                                                         *
+ * 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 "sn9c102_sensor.h"
+
+
+static struct sn9c102_sensor mi0343;
+static u8 mi0343_i2c_data[5+1];
+
+
+static int mi0343_init(struct sn9c102_device* cam)
+{
+	int err = 0;
+
+	err += sn9c102_write_reg(cam, 0x00, 0x10);
+	err += sn9c102_write_reg(cam, 0x00, 0x11);
+	err += sn9c102_write_reg(cam, 0x0a, 0x14);
+	err += sn9c102_write_reg(cam, 0x40, 0x01);
+	err += sn9c102_write_reg(cam, 0x20, 0x17);
+	err += sn9c102_write_reg(cam, 0x07, 0x18);
+	err += sn9c102_write_reg(cam, 0xa0, 0x19);
+
+	err += sn9c102_i2c_try_raw_write(cam, &mi0343, 4, mi0343.i2c_slave_id,
+	                                 0x0d, 0x00, 0x01, 0, 0);
+	err += sn9c102_i2c_try_raw_write(cam, &mi0343, 4, mi0343.i2c_slave_id,
+	                                 0x0d, 0x00, 0x00, 0, 0);
+	err += sn9c102_i2c_try_raw_write(cam, &mi0343, 4, mi0343.i2c_slave_id,
+	                                 0x03, 0x01, 0xe1, 0, 0);
+	err += sn9c102_i2c_try_raw_write(cam, &mi0343, 4, mi0343.i2c_slave_id,
+	                                 0x04, 0x02, 0x81, 0, 0);
+	err += sn9c102_i2c_try_raw_write(cam, &mi0343, 4, mi0343.i2c_slave_id,
+	                                 0x05, 0x00, 0x17, 0, 0);
+	err += sn9c102_i2c_try_raw_write(cam, &mi0343, 4, mi0343.i2c_slave_id,
+	                                 0x06, 0x00, 0x11, 0, 0);
+	err += sn9c102_i2c_try_raw_write(cam, &mi0343, 4, mi0343.i2c_slave_id,
+	                                 0x62, 0x04, 0x9a, 0, 0);
+
+	return err;
+}
+
+
+static int mi0343_get_ctrl(struct sn9c102_device* cam, 
+                           struct v4l2_control* ctrl)
+{
+	switch (ctrl->id) {
+	case V4L2_CID_EXPOSURE:
+		if (sn9c102_i2c_try_raw_read(cam, &mi0343, mi0343.i2c_slave_id,
+		                             0x09, 2+1, mi0343_i2c_data) < 0)
+			return -EIO;
+		ctrl->value = mi0343_i2c_data[2];
+		return 0;
+	case V4L2_CID_GAIN:
+		if (sn9c102_i2c_try_raw_read(cam, &mi0343, mi0343.i2c_slave_id,
+		                             0x35, 2+1, mi0343_i2c_data) < 0)
+			return -EIO;
+		break;
+	case V4L2_CID_HFLIP:
+		if (sn9c102_i2c_try_raw_read(cam, &mi0343, mi0343.i2c_slave_id,
+		                             0x20, 2+1, mi0343_i2c_data) < 0)
+			return -EIO;
+		ctrl->value = mi0343_i2c_data[3] & 0x20 ? 1 : 0;
+		return 0;
+	case V4L2_CID_VFLIP:
+		if (sn9c102_i2c_try_raw_read(cam, &mi0343, mi0343.i2c_slave_id,
+		                             0x20, 2+1, mi0343_i2c_data) < 0)
+			return -EIO;
+		ctrl->value = mi0343_i2c_data[3] & 0x80 ? 1 : 0;
+		return 0;
+	case V4L2_CID_RED_BALANCE:
+		if (sn9c102_i2c_try_raw_read(cam, &mi0343, mi0343.i2c_slave_id,
+		                             0x2d, 2+1, mi0343_i2c_data) < 0)
+			return -EIO;
+		break;
+	case V4L2_CID_BLUE_BALANCE:
+		if (sn9c102_i2c_try_raw_read(cam, &mi0343, mi0343.i2c_slave_id,
+		                             0x2c, 2+1, mi0343_i2c_data) < 0)
+			return -EIO;
+		break;
+	case SN9C102_V4L2_CID_GREEN_BALANCE:
+		if (sn9c102_i2c_try_raw_read(cam, &mi0343, mi0343.i2c_slave_id,
+		                             0x2e, 2+1, mi0343_i2c_data) < 0)
+			return -EIO;
+		break;
+	default:
+		return -EINVAL;
+	}
+
+	switch (ctrl->id) {
+	case V4L2_CID_GAIN:
+	case V4L2_CID_RED_BALANCE:
+	case V4L2_CID_BLUE_BALANCE:
+	case SN9C102_V4L2_CID_GREEN_BALANCE:
+		ctrl->value = mi0343_i2c_data[3] | (mi0343_i2c_data[2] << 8);
+		if (ctrl->value >= 0x10 && ctrl->value <= 0x3f)
+			ctrl->value -= 0x10;
+		else if (ctrl->value >= 0x60 && ctrl->value <= 0x7f)
+			ctrl->value -= 0x60;
+		else if (ctrl->value >= 0xe0 && ctrl->value <= 0xff)
+			ctrl->value -= 0xe0;
+	}
+
+	return 0;
+}
+
+
+static int mi0343_set_ctrl(struct sn9c102_device* cam, 
+                           const struct v4l2_control* ctrl)
+{
+	u16 reg = 0;
+	int err = 0;
+
+	switch (ctrl->id) {
+	case V4L2_CID_GAIN:
+	case V4L2_CID_RED_BALANCE:
+	case V4L2_CID_BLUE_BALANCE:
+	case SN9C102_V4L2_CID_GREEN_BALANCE:
+		if (ctrl->value <= (0x3f-0x10))
+			reg = 0x10 + ctrl->value;
+		else if (ctrl->value <= ((0x3f-0x10) + (0x7f-0x60)))
+			reg = 0x60 + (ctrl->value - (0x3f-0x10));
+		else
+			reg = 0xe0 + (ctrl->value - (0x3f-0x10) - (0x7f-0x60));
+		break;
+	}
+
+	switch (ctrl->id) {
+	case V4L2_CID_EXPOSURE:
+		err += sn9c102_i2c_try_raw_write(cam, &mi0343, 4,
+		                                 mi0343.i2c_slave_id,
+		                                 0x09, ctrl->value, 0x00,
+		                                 0, 0);
+		break;
+	case V4L2_CID_GAIN:
+		err += sn9c102_i2c_try_raw_write(cam, &mi0343, 4,
+		                                 mi0343.i2c_slave_id,
+		                                 0x35, reg >> 8, reg & 0xff,
+		                                 0, 0);
+		break;
+	case V4L2_CID_HFLIP:
+		err += sn9c102_i2c_try_raw_write(cam, &mi0343, 4,
+		                                 mi0343.i2c_slave_id,
+		                                 0x20, ctrl->value ? 0x40:0x00,
+		                                 ctrl->value ? 0x20:0x00,
+		                                 0, 0);
+		break;
+	case V4L2_CID_VFLIP:
+		err += sn9c102_i2c_try_raw_write(cam, &mi0343, 4,
+		                                 mi0343.i2c_slave_id,
+		                                 0x20, ctrl->value ? 0x80:0x00,
+		                                 ctrl->value ? 0x80:0x00,
+		                                 0, 0);
+		break;
+	case V4L2_CID_RED_BALANCE:
+		err += sn9c102_i2c_try_raw_write(cam, &mi0343, 4,
+		                                 mi0343.i2c_slave_id,
+		                                 0x2d, reg >> 8, reg & 0xff,
+		                                 0, 0);
+		break;
+	case V4L2_CID_BLUE_BALANCE:
+		err += sn9c102_i2c_try_raw_write(cam, &mi0343, 4,
+		                                 mi0343.i2c_slave_id,
+		                                 0x2c, reg >> 8, reg & 0xff,
+		                                 0, 0);
+		break;
+	case SN9C102_V4L2_CID_GREEN_BALANCE:
+		err += sn9c102_i2c_try_raw_write(cam, &mi0343, 4,
+		                                 mi0343.i2c_slave_id,
+		                                 0x2b, reg >> 8, reg & 0xff,
+		                                 0, 0);
+		err += sn9c102_i2c_try_raw_write(cam, &mi0343, 4,
+		                                 mi0343.i2c_slave_id,
+		                                 0x2e, reg >> 8, reg & 0xff,
+		                                 0, 0);
+		break;
+	default:
+		return -EINVAL;
+	}
+
+	return err ? -EIO : 0;
+}
+
+
+static int mi0343_set_crop(struct sn9c102_device* cam, 
+                            const struct v4l2_rect* rect)
+{
+	struct sn9c102_sensor* s = &mi0343;
+	int err = 0;
+	u8 h_start = (u8)(rect->left - s->cropcap.bounds.left) + 0,
+	   v_start = (u8)(rect->top - s->cropcap.bounds.top) + 2;
+
+	err += sn9c102_write_reg(cam, h_start, 0x12);
+	err += sn9c102_write_reg(cam, v_start, 0x13);
+
+	return err;
+}
+
+
+static int mi0343_set_pix_format(struct sn9c102_device* cam, 
+                                 const struct v4l2_pix_format* pix)
+{
+	int err = 0;
+
+	if (pix->pixelformat == V4L2_PIX_FMT_SN9C10X) {
+		err += sn9c102_i2c_try_raw_write(cam, &mi0343, 4,
+		                                 mi0343.i2c_slave_id,
+		                                 0x0a, 0x00, 0x03, 0, 0);
+		err += sn9c102_write_reg(cam, 0x20, 0x19);
+	} else {
+		err += sn9c102_i2c_try_raw_write(cam, &mi0343, 4,
+		                                 mi0343.i2c_slave_id,
+		                                 0x0a, 0x00, 0x05, 0, 0);
+		err += sn9c102_write_reg(cam, 0xa0, 0x19);
+	}
+
+	return err;
+}
+
+
+static struct sn9c102_sensor mi0343 = {
+	.name = "MI-0343",
+	.maintainer = "Luca Risolia <luca.risolia@studio.unibo.it>",
+	.frequency = SN9C102_I2C_100KHZ,
+	.interface = SN9C102_I2C_2WIRES,
+	.i2c_slave_id = 0x5d,
+	.init = &mi0343_init,
+	.qctrl = {
+		{
+			.id = V4L2_CID_EXPOSURE,
+			.type = V4L2_CTRL_TYPE_INTEGER,
+			.name = "exposure",
+			.minimum = 0x00,
+			.maximum = 0x0f,
+			.step = 0x01,
+			.default_value = 0x06,
+			.flags = 0,
+		},
+		{
+			.id = V4L2_CID_GAIN,
+			.type = V4L2_CTRL_TYPE_INTEGER,
+			.name = "global gain",
+			.minimum = 0x00,
+			.maximum = (0x3f-0x10)+(0x7f-0x60)+(0xff-0xe0),/*0x6d*/
+			.step = 0x01,
+			.default_value = 0x00,
+			.flags = 0,
+		},
+		{
+			.id = V4L2_CID_HFLIP,
+			.type = V4L2_CTRL_TYPE_BOOLEAN,
+			.name = "horizontal mirror",
+			.minimum = 0,
+			.maximum = 1,
+			.step = 1,
+			.default_value = 0,
+			.flags = 0,
+		},
+		{
+			.id = V4L2_CID_VFLIP,
+			.type = V4L2_CTRL_TYPE_BOOLEAN,
+			.name = "vertical mirror",
+			.minimum = 0,
+			.maximum = 1,
+			.step = 1,
+			.default_value = 0,
+			.flags = 0,
+		},
+		{
+			.id = V4L2_CID_RED_BALANCE,
+			.type = V4L2_CTRL_TYPE_INTEGER,
+			.name = "red balance",
+			.minimum = 0x00,
+			.maximum = (0x3f-0x10)+(0x7f-0x60)+(0xff-0xe0),
+			.step = 0x01,
+			.default_value = 0x00,
+			.flags = 0,
+		},
+		{
+			.id = V4L2_CID_BLUE_BALANCE,
+			.type = V4L2_CTRL_TYPE_INTEGER,
+			.name = "blue balance",
+			.minimum = 0x00,
+			.maximum = (0x3f-0x10)+(0x7f-0x60)+(0xff-0xe0),
+			.step = 0x01,
+			.default_value = 0x00,
+			.flags = 0,
+		},
+		{
+			.id = SN9C102_V4L2_CID_GREEN_BALANCE,
+			.type = V4L2_CTRL_TYPE_INTEGER,
+			.name = "green balance",
+			.minimum = 0x00,
+			.maximum = ((0x3f-0x10)+(0x7f-0x60)+(0xff-0xe0)),
+			.step = 0x01,
+			.default_value = 0x00,
+			.flags = 0,
+		},
+	},
+	.get_ctrl = &mi0343_get_ctrl,
+	.set_ctrl = &mi0343_set_ctrl,
+	.cropcap = {
+		.bounds = {
+			.left = 0,
+			.top = 0,
+			.width = 640,
+			.height = 480,
+		},
+		.defrect = {
+			.left = 0,
+			.top = 0,
+			.width = 640,
+			.height = 480,
+		},
+	},
+	.set_crop = &mi0343_set_crop,
+	.pix_format = {
+		.width = 640,
+		.height = 480,
+		.pixelformat = V4L2_PIX_FMT_SBGGR8,
+		.priv = 8,
+	},
+	.set_pix_format = &mi0343_set_pix_format
+};
+
+
+int sn9c102_probe_mi0343(struct sn9c102_device* cam)
+{
+	int err = 0;
+
+	err += sn9c102_write_reg(cam, 0x01, 0x01);
+	err += sn9c102_write_reg(cam, 0x00, 0x01);
+	err += sn9c102_write_reg(cam, 0x28, 0x17);
+	if (err)
+		return -EIO;
+
+	if (sn9c102_i2c_try_raw_read(cam, &mi0343, mi0343.i2c_slave_id, 0x00,
+	                             2, mi0343_i2c_data) < 0)
+		return -EIO;
+
+	if (mi0343_i2c_data[4] != 0x32 && mi0343_i2c_data[3] != 0xe3)
+		return -ENODEV;
+
+	sn9c102_attach_sensor(cam, &mi0343);
+
+	return 0;
+}
diff -Nru a/drivers/usb/media/sn9c102_pas106b.c b/drivers/usb/media/sn9c102_pas106b.c
--- a/drivers/usb/media/sn9c102_pas106b.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/usb/media/sn9c102_pas106b.c	2005-01-10 20:11:16 -08:00
@@ -96,11 +96,6 @@
 			return -EIO;
 		ctrl->value &= 0xf8;
 		return 0;
-	case SN9C102_V4L2_CID_DAC_SIGN:
-		if ((ctrl->value = sn9c102_i2c_read(cam, 0x07)) < 0)
-			return -EIO;
-		ctrl->value &= 0x01;
-		return 0;
 	default:
 		return -EINVAL;
 	}
@@ -136,13 +131,6 @@
 	case SN9C102_V4L2_CID_DAC_MAGNITUDE:
 		err += sn9c102_i2c_write(cam, 0x08, ctrl->value << 3);
 		break;
-	case SN9C102_V4L2_CID_DAC_SIGN:
-		{
-			int r;
-			err += (r = sn9c102_i2c_read(cam, 0x07)) < 0 ? r : 0;
-			err += sn9c102_i2c_write(cam, 0x07, r | ctrl->value);
-		}
-		break;
 	default:
 		return -EINVAL;
 	}
@@ -167,13 +155,27 @@
 }
 
 
+static int pas106b_set_pix_format(struct sn9c102_device* cam, 
+                                  const struct v4l2_pix_format* pix)
+{
+	int err = 0;
+
+	if (pix->pixelformat == V4L2_PIX_FMT_SN9C10X)
+		err += sn9c102_write_reg(cam, 0x2c, 0x17);
+	else
+		err += sn9c102_write_reg(cam, 0x20, 0x17);
+
+	return err;
+}
+
+
 static struct sn9c102_sensor pas106b = {
 	.name = "PAS106B",
 	.maintainer = "Luca Risolia <luca.risolia@studio.unibo.it>",
+	.sysfs_ops = SN9C102_I2C_READ | SN9C102_I2C_WRITE,
 	.frequency = SN9C102_I2C_400KHZ | SN9C102_I2C_100KHZ,
 	.interface = SN9C102_I2C_2WIRES,
-	.slave_read_id = 0x40,
-	.slave_write_id = 0x40,
+	.i2c_slave_id = 0x40,
 	.init = &pas106b_init,
 	.qctrl = {
 		{
@@ -182,7 +184,7 @@
 			.name = "exposure",
 			.minimum = 0x125,
 			.maximum = 0xfff,
-			.step = 0x01,
+			.step = 0x001,
 			.default_value = 0x140,
 			.flags = 0,
 		},
@@ -246,16 +248,6 @@
 			.default_value = 0x01,
 			.flags = 0,
 		},
-		{
-			.id = SN9C102_V4L2_CID_DAC_SIGN,
-			.type = V4L2_CTRL_TYPE_BOOLEAN,
-			.name = "DAC sign",
-			.minimum = 0x00,
-			.maximum = 0x01,
-			.step = 0x01,
-			.default_value = 0x00,
-			.flags = 0,
-		},
 	},
 	.get_ctrl = &pas106b_get_ctrl,
 	.set_ctrl = &pas106b_set_ctrl,
@@ -279,7 +271,8 @@
 		.height = 288,
 		.pixelformat = V4L2_PIX_FMT_SBGGR8,
 		.priv = 8, /* we use this field as 'bits per pixel' */
-	}
+	},
+	.set_pix_format = &pas106b_set_pix_format
 };
 
 
diff -Nru a/drivers/usb/media/sn9c102_pas202bcb.c b/drivers/usb/media/sn9c102_pas202bcb.c
--- a/drivers/usb/media/sn9c102_pas202bcb.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/usb/media/sn9c102_pas202bcb.c	2005-01-10 20:11:21 -08:00
@@ -6,7 +6,7 @@
  *                       <medaglia@undl.org.br>                            *
  *                       http://cadu.homelinux.com:8080/                   *
  *                                                                         *
- * DAC Magnitude, DAC sign, exposure and green gain controls added by      *
+ * DAC Magnitude, exposure and green gain controls added by                *
  * Luca Risolia <luca.risolia@studio.unibo.it>                             *
  *                                                                         *
  * This program is free software; you can redistribute it and/or modify    *
@@ -95,17 +95,26 @@
 		if ((ctrl->value = sn9c102_i2c_read(cam, 0x0c)) < 0)
 			return -EIO;
 		return 0;
-	case SN9C102_V4L2_CID_DAC_SIGN:
-		if ((ctrl->value = sn9c102_i2c_read(cam, 0x0b)) < 0)
-			return -EIO;
-		ctrl->value &= 0x01;
-		return 0;
 	default:
 		return -EINVAL;
 	}
 }
 
 
+static int pas202bcb_set_pix_format(struct sn9c102_device* cam, 
+                                    const struct v4l2_pix_format* pix)
+{
+	int err = 0;
+
+	if (pix->pixelformat == V4L2_PIX_FMT_SN9C10X)
+		err += sn9c102_write_reg(cam, 0x24, 0x17);
+	else
+		err += sn9c102_write_reg(cam, 0x20, 0x17);
+
+	return err;
+}
+
+
 static int pas202bcb_set_ctrl(struct sn9c102_device* cam, 
                               const struct v4l2_control* ctrl)
 {
@@ -131,13 +140,6 @@
 	case SN9C102_V4L2_CID_DAC_MAGNITUDE:
 		err += sn9c102_i2c_write(cam, 0x0c, ctrl->value);
 		break;
-	case SN9C102_V4L2_CID_DAC_SIGN:
-		{
-			int r;
-			err += (r = sn9c102_i2c_read(cam, 0x0b)) < 0 ? r : 0;
-			err += sn9c102_i2c_write(cam, 0x0b, r | ctrl->value);
-		}
-		break;
 	default:
 		return -EINVAL;
 	}
@@ -166,10 +168,10 @@
 	.name = "PAS202BCB",
 	.maintainer = "Carlos Eduardo Medaglia Dyonisio "
 	              "<medaglia@undl.org.br>",
+	.sysfs_ops = SN9C102_I2C_READ | SN9C102_I2C_WRITE,
 	.frequency = SN9C102_I2C_400KHZ | SN9C102_I2C_100KHZ,
 	.interface = SN9C102_I2C_2WIRES,
-	.slave_read_id = 0x40,
-	.slave_write_id = 0x40,
+	.i2c_slave_id = 0x40,
 	.init = &pas202bcb_init,
 	.qctrl = {
 		{
@@ -178,7 +180,7 @@
 			.name = "exposure",
 			.minimum = 0x01e5,
 			.maximum = 0x3fff,
-			.step = 0x01,
+			.step = 0x0001,
 			.default_value = 0x01e5,
 			.flags = 0,
 		},
@@ -232,16 +234,6 @@
 			.default_value = 0x04,
 			.flags = 0,
 		},
-		{
-			.id = SN9C102_V4L2_CID_DAC_SIGN,
-			.type = V4L2_CTRL_TYPE_BOOLEAN,
-			.name = "DAC sign",
-			.minimum = 0x00,
-			.maximum = 0x01,
-			.step = 0x01,
-			.default_value = 0x01,
-			.flags = 0,
-		},
 	},
 	.get_ctrl = &pas202bcb_get_ctrl,
 	.set_ctrl = &pas202bcb_set_ctrl,
@@ -265,7 +257,8 @@
 		.height = 480,
 		.pixelformat = V4L2_PIX_FMT_SBGGR8,
 		.priv = 8,
-	}
+	},
+	.set_pix_format = &pas202bcb_set_pix_format
 };
 
 
@@ -286,7 +279,7 @@
 
 	r0 = sn9c102_i2c_try_read(cam, &pas202bcb, 0x00);
 	r1 = sn9c102_i2c_try_read(cam, &pas202bcb, 0x01);
-	
+
 	if (r0 < 0 || r1 < 0)
 		return -EIO;
 
diff -Nru a/drivers/usb/media/sn9c102_sensor.h b/drivers/usb/media/sn9c102_sensor.h
--- a/drivers/usb/media/sn9c102_sensor.h	2005-01-10 20:11:17 -08:00
+++ b/drivers/usb/media/sn9c102_sensor.h	2005-01-10 20:11:17 -08:00
@@ -62,6 +62,8 @@
    ahead.
    Functions must return 0 on success, the appropriate error otherwise.
 */
+extern int sn9c102_probe_hv7131d(struct sn9c102_device* cam);
+extern int sn9c102_probe_mi0343(struct sn9c102_device* cam);
 extern int sn9c102_probe_pas106b(struct sn9c102_device* cam);
 extern int sn9c102_probe_pas202bcb(struct sn9c102_device* cam);
 extern int sn9c102_probe_tas5110c1b(struct sn9c102_device* cam);
@@ -74,8 +76,10 @@
 */
 #define SN9C102_SENSOR_TABLE                                                  \
 static int (*sn9c102_sensor_table[])(struct sn9c102_device*) = {              \
+	&sn9c102_probe_mi0343, /* strong detection based on SENSOR ids */     \
 	&sn9c102_probe_pas106b, /* strong detection based on SENSOR ids */    \
 	&sn9c102_probe_pas202bcb, /* strong detection based on SENSOR ids */  \
+	&sn9c102_probe_hv7131d, /* strong detection based on SENSOR ids */    \
 	&sn9c102_probe_tas5110c1b, /* detection based on USB pid/vid */       \
 	&sn9c102_probe_tas5130d1b, /* detection based on USB pid/vid */       \
 	NULL,                                                                 \
@@ -97,7 +101,7 @@
 	{ USB_DEVICE(0x0c45, 0x6025), }, /* TAS5130D1B and TAS5110C1B */      \
 	{ USB_DEVICE(0x0c45, 0x6028), }, /* PAS202BCB */                      \
 	{ USB_DEVICE(0x0c45, 0x6029), }, /* PAS106B */                        \
-	{ USB_DEVICE(0x0c45, 0x602a), }, /* HV7131[D|E1] */                   \
+	{ USB_DEVICE(0x0c45, 0x602a), }, /* HV7131D */                        \
 	{ USB_DEVICE(0x0c45, 0x602b), }, /* MI-0343 */                        \
 	{ USB_DEVICE(0x0c45, 0x602c), }, /* OV7620 */                         \
 	{ USB_DEVICE(0x0c45, 0x6030), }, /* MI03x */                          \
@@ -147,15 +151,23 @@
                                 u8 address);
 
 /*
-   This must be used if and only if the sensor doesn't implement the standard
-   I2C protocol. There a number of good reasons why you must use the 
-   single-byte versions of this function: do not abuse. It writes n bytes, 
-   from data0 to datan, (registers 0x09 - 0x09+n of SN9C10X chip).
+   These must be used if and only if the sensor doesn't implement the standard
+   I2C protocol. There are a number of good reasons why you must use the 
+   single-byte versions of these functions: do not abuse. The first function
+   writes n bytes, from data0 to datan, to registers 0x09 - 0x09+n of SN9C10X
+   chip. The second one programs the registers 0x09 and 0x10 with data0 and
+   data1, and places the n bytes read from the sensor register table in the
+   buffer pointed by 'buffer'. Both the functions return -1 on error; the write
+   version returns 0 on success, while the read version returns the first read
+   byte.
 */
 extern int sn9c102_i2c_try_raw_write(struct sn9c102_device* cam,
                                      struct sn9c102_sensor* sensor, u8 n, 
                                      u8 data0, u8 data1, u8 data2, u8 data3,
                                      u8 data4, u8 data5);
+extern int sn9c102_i2c_try_raw_read(struct sn9c102_device* cam,
+                                    struct sn9c102_sensor* sensor, u8 data0,
+                                    u8 data1, u8 n, u8 buffer[]);
 
 /* To be used after the sensor struct has been attached to the camera struct */
 extern int sn9c102_i2c_write(struct sn9c102_device*, u8 address, u8 value);
@@ -166,16 +178,21 @@
 extern int sn9c102_pread_reg(struct sn9c102_device*, u16 index);
 
 /*
-   NOTE: there are no debugging functions here. To uniform the output you must
-   use the dev_info()/dev_warn()/dev_err() macros defined in device.h, already
-   included here, the argument being the struct device 'dev' of the sensor
-   structure. Do NOT use these macros before the sensor is attached or the
-   kernel will crash! However you should not need to notify the user about
+   NOTE: there are no exported debugging functions. To uniform the output you
+   must use the dev_info()/dev_warn()/dev_err() macros defined in device.h,
+   already included here, the argument being the struct device 'dev' of the
+   sensor structure. Do NOT use these macros before the sensor is attached or
+   the kernel will crash! However, you should not need to notify the user about
    common errors or other messages, since this is done by the master module.
 */
 
 /*****************************************************************************/
 
+enum sn9c102_i2c_sysfs_ops {
+	SN9C102_I2C_READ = 0x01,
+	SN9C102_I2C_WRITE = 0x02,
+};
+
 enum sn9c102_i2c_frequency { /* sensors may support both the frequencies */
 	SN9C102_I2C_100KHZ = 0x01,
 	SN9C102_I2C_400KHZ = 0x02,
@@ -186,13 +203,13 @@
 	SN9C102_I2C_3WIRES,
 };
 
-#define SN9C102_I2C_SLAVEID_FICTITIOUS 0xff
-#define SN9C102_I2C_SLAVEID_UNAVAILABLE 0x00
-
 struct sn9c102_sensor {
 	char name[32], /* sensor name */
 	     maintainer[64]; /* name of the mantainer <email> */
 
+	/* Supported operations through the 'sysfs' interface */
+	enum sn9c102_i2c_sysfs_ops sysfs_ops;
+
 	/*
 	   These sensor capabilities must be provided if the SN9C10X controller
 	   needs to communicate through the sensor serial interface by using
@@ -202,10 +219,10 @@
 	enum sn9c102_i2c_interface interface;
 
 	/*
-	   These identifiers must be provided if the image sensor implements
+	   This identifier must be provided if the image sensor implements
 	   the standard I2C protocol.
 	*/
-	u8 slave_read_id, slave_write_id; /* reg. 0x09 */
+	u8 i2c_slave_id; /* reg. 0x09 */
 
 	/*
 	   NOTE: Where not noted,most of the functions below are not mandatory.
@@ -215,7 +232,7 @@
 
 	int (*init)(struct sn9c102_device* cam);
 	/*
-	   This function is called after the sensor has been attached. 
+	   This function will be called after the sensor has been attached. 
 	   It should be used to initialize the sensor only, but may also
 	   configure part of the SN9C10X chip if necessary. You don't need to
 	   setup picture settings like brightness, contrast, etc.. here, if
@@ -315,6 +332,14 @@
 	           matches the RGB bayer sequence (i.e. BGBGBG...GRGRGR).
 	*/
 
+	int (*set_pix_format)(struct sn9c102_device* cam,
+	                      const struct v4l2_pix_format* pix);
+	/*
+	   To be called on VIDIOC_S_FMT, when switching from the SBGGR8 to
+	   SN9C10X pixel format or viceversa. On error return the corresponding
+	   error code without rolling back.
+	*/
+
 	const struct device* dev;
 	/*
 	   This is the argument for dev_err(), dev_info() and dev_warn(). It
@@ -341,7 +366,8 @@
 
 /* Private ioctl's for control settings supported by some image sensors */
 #define SN9C102_V4L2_CID_DAC_MAGNITUDE V4L2_CID_PRIVATE_BASE
-#define SN9C102_V4L2_CID_DAC_SIGN V4L2_CID_PRIVATE_BASE + 1
-#define SN9C102_V4L2_CID_GREEN_BALANCE V4L2_CID_PRIVATE_BASE + 2
+#define SN9C102_V4L2_CID_GREEN_BALANCE V4L2_CID_PRIVATE_BASE + 1
+#define SN9C102_V4L2_CID_RESET_LEVEL V4L2_CID_PRIVATE_BASE + 2
+#define SN9C102_V4L2_CID_PIXEL_BIAS_VOLTAGE V4L2_CID_PRIVATE_BASE + 3
 
 #endif /* _SN9C102_SENSOR_H_ */
diff -Nru a/drivers/usb/media/sn9c102_tas5110c1b.c b/drivers/usb/media/sn9c102_tas5110c1b.c
--- a/drivers/usb/media/sn9c102_tas5110c1b.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/usb/media/sn9c102_tas5110c1b.c	2005-01-10 20:11:15 -08:00
@@ -93,7 +93,21 @@
 	/* Don't change ! */
 	err += sn9c102_write_reg(cam, 0x14, 0x1a);
 	err += sn9c102_write_reg(cam, 0x0a, 0x1b);
-	err += sn9c102_write_reg(cam, 0xfb, 0x19);
+	err += sn9c102_write_reg(cam, sn9c102_pread_reg(cam, 0x19), 0x19);
+
+	return err;
+}
+
+
+static int tas5110c1b_set_pix_format(struct sn9c102_device* cam, 
+                                     const struct v4l2_pix_format* pix)
+{
+	int err = 0;
+
+	if (pix->pixelformat == V4L2_PIX_FMT_SN9C10X)
+		err += sn9c102_write_reg(cam, 0x2b, 0x19);
+	else
+		err += sn9c102_write_reg(cam, 0xfb, 0x19);
 
 	return err;
 }
@@ -102,10 +116,9 @@
 static struct sn9c102_sensor tas5110c1b = {
 	.name = "TAS5110C1B",
 	.maintainer = "Luca Risolia <luca.risolia@studio.unibo.it>",
+	.sysfs_ops = SN9C102_I2C_WRITE,
 	.frequency = SN9C102_I2C_100KHZ,
 	.interface = SN9C102_I2C_3WIRES,
-	.slave_read_id = SN9C102_I2C_SLAVEID_UNAVAILABLE,
-	.slave_write_id = SN9C102_I2C_SLAVEID_FICTITIOUS,
 	.init = &tas5110c1b_init,
 	.qctrl = {
 		{
@@ -141,7 +154,8 @@
 		.height = 288,
 		.pixelformat = V4L2_PIX_FMT_SBGGR8,
 		.priv = 8,
-	}
+	},
+	.set_pix_format = &tas5110c1b_set_pix_format
 };
 
 
@@ -151,9 +165,9 @@
 	sn9c102_attach_sensor(cam, &tas5110c1b);
 
 	/* Sensor detection is based on USB pid/vid */
-	if (tas5110c1b.usbdev->descriptor.idProduct != 0x6001 &&
-	    tas5110c1b.usbdev->descriptor.idProduct != 0x6005 &&
-	    tas5110c1b.usbdev->descriptor.idProduct != 0x60ab)
+	if (le16_to_cpu(tas5110c1b.usbdev->descriptor.idProduct) != 0x6001 &&
+	    le16_to_cpu(tas5110c1b.usbdev->descriptor.idProduct) != 0x6005 &&
+	    le16_to_cpu(tas5110c1b.usbdev->descriptor.idProduct) != 0x60ab)
 		return -ENODEV;
 
 	return 0;
diff -Nru a/drivers/usb/media/sn9c102_tas5130d1b.c b/drivers/usb/media/sn9c102_tas5130d1b.c
--- a/drivers/usb/media/sn9c102_tas5130d1b.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/usb/media/sn9c102_tas5130d1b.c	2005-01-10 20:11:19 -08:00
@@ -98,7 +98,21 @@
 	/* Do NOT change! */
 	err += sn9c102_write_reg(cam, 0x1f, 0x1a);
 	err += sn9c102_write_reg(cam, 0x1a, 0x1b);
-	err += sn9c102_write_reg(cam, 0xf3, 0x19);
+	err += sn9c102_write_reg(cam, sn9c102_pread_reg(cam, 0x19), 0x19);
+
+	return err;
+}
+
+
+static int tas5130d1b_set_pix_format(struct sn9c102_device* cam, 
+                                     const struct v4l2_pix_format* pix)
+{
+	int err = 0;
+
+	if (pix->pixelformat == V4L2_PIX_FMT_SN9C10X)
+		err += sn9c102_write_reg(cam, 0x63, 0x19);
+	else
+		err += sn9c102_write_reg(cam, 0xf3, 0x19);
 
 	return err;
 }
@@ -107,10 +121,9 @@
 static struct sn9c102_sensor tas5130d1b = {
 	.name = "TAS5130D1B",
 	.maintainer = "Luca Risolia <luca.risolia@studio.unibo.it>",
+	.sysfs_ops = SN9C102_I2C_WRITE,
 	.frequency = SN9C102_I2C_100KHZ,
 	.interface = SN9C102_I2C_3WIRES,
-	.slave_read_id = SN9C102_I2C_SLAVEID_UNAVAILABLE,
-	.slave_write_id = SN9C102_I2C_SLAVEID_FICTITIOUS,
 	.init = &tas5130d1b_init,
 	.qctrl = {
 		{
@@ -156,7 +169,8 @@
 		.height = 480,
 		.pixelformat = V4L2_PIX_FMT_SBGGR8,
 		.priv = 8,
-	}
+	},
+	.set_pix_format = &tas5130d1b_set_pix_format
 };
 
 
@@ -166,8 +180,8 @@
 	sn9c102_attach_sensor(cam, &tas5130d1b);
 
 	/* Sensor detection is based on USB pid/vid */
-	if (tas5130d1b.usbdev->descriptor.idProduct != 0x6025 &&
-	    tas5130d1b.usbdev->descriptor.idProduct != 0x60aa)
+	if (le16_to_cpu(tas5130d1b.usbdev->descriptor.idProduct) != 0x6025 &&
+	    le16_to_cpu(tas5130d1b.usbdev->descriptor.idProduct) != 0x60aa)
 		return -ENODEV;
 
 	return 0;
diff -Nru a/drivers/usb/media/stv680.c b/drivers/usb/media/stv680.c
--- a/drivers/usb/media/stv680.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/usb/media/stv680.c	2005-01-10 20:11:20 -08:00
@@ -1371,7 +1371,8 @@
 
 	interface = &intf->altsetting[0];
 	/* Is it a STV680? */
-	if ((dev->descriptor.idVendor == USB_PENCAM_VENDOR_ID) && (dev->descriptor.idProduct == USB_PENCAM_PRODUCT_ID)) {
+	if ((le16_to_cpu(dev->descriptor.idVendor) == USB_PENCAM_VENDOR_ID) &&
+	    (le16_to_cpu(dev->descriptor.idProduct) == USB_PENCAM_PRODUCT_ID)) {
 		camera_name = "STV0680";
 		PDEBUG (0, "STV(i): STV0680 camera found.");
 	} else {
diff -Nru a/drivers/usb/media/ultracam.c b/drivers/usb/media/ultracam.c
--- a/drivers/usb/media/ultracam.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/usb/media/ultracam.c	2005-01-10 20:11:17 -08:00
@@ -524,12 +524,8 @@
 	if (dev->descriptor.bNumConfigurations != 1)
 		return -ENODEV;
 
-	/* Is it an IBM camera? */
-	if ((dev->descriptor.idVendor != ULTRACAM_VENDOR_ID) ||
-	    (dev->descriptor.idProduct != ULTRACAM_PRODUCT_ID))
-		return -ENODEV;
-
-	info("IBM Ultra camera found (rev. 0x%04x)", dev->descriptor.bcdDevice);
+	info("IBM Ultra camera found (rev. 0x%04x)",
+		le16_to_cpu(dev->descriptor.bcdDevice));
 
 	/* Validate found interface: must have one ISO endpoint */
 	nas = intf->num_altsetting;
@@ -569,7 +565,7 @@
 			    interface->desc.bInterfaceNumber);
 			return -ENODEV;
 		}
-		if (endpoint->wMaxPacketSize == 0) {
+		if (le16_to_cpu(endpoint->wMaxPacketSize) == 0) {
 			if (inactInterface < 0)
 				inactInterface = i;
 			else {
@@ -579,15 +575,15 @@
 		} else {
 			if (actInterface < 0) {
 				actInterface = i;
-				maxPS = endpoint->wMaxPacketSize;
+				maxPS = le16_to_cpu(endpoint->wMaxPacketSize);
 				if (debug > 0)
 					info("Active setting=%d. maxPS=%d.", i, maxPS);
 			} else {
 				/* Got another active alt. setting */
-				if (maxPS < endpoint->wMaxPacketSize) {
+				if (maxPS < le16_to_cpu(endpoint->wMaxPacketSize)) {
 					/* This one is better! */
 					actInterface = i;
-					maxPS = endpoint->wMaxPacketSize;
+					maxPS = le16_to_cpu(endpoint->wMaxPacketSize);
 					if (debug > 0) {
 						info("Even better ctive setting=%d. maxPS=%d.",
 						     i, maxPS);
diff -Nru a/drivers/usb/media/vicam.c b/drivers/usb/media/vicam.c
--- a/drivers/usb/media/vicam.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/usb/media/vicam.c	2005-01-10 20:11:18 -08:00
@@ -1281,12 +1281,6 @@
 	const struct usb_endpoint_descriptor *endpoint;
 	struct vicam_camera *cam;
 	
-	/* See if the device offered us matches what we can accept */
-	if ((dev->descriptor.idVendor != USB_VICAM_VENDOR_ID) ||
-	    (dev->descriptor.idProduct != USB_VICAM_PRODUCT_ID)) {
-		return -ENODEV;
-	}
-
 	printk(KERN_INFO "ViCam based webcam connected\n");
 
 	interface = intf->cur_altsetting;
diff -Nru a/drivers/usb/media/w9968cf.c b/drivers/usb/media/w9968cf.c
--- a/drivers/usb/media/w9968cf.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/usb/media/w9968cf.c	2005-01-10 20:11:21 -08:00
@@ -3516,11 +3516,11 @@
 	u8 sc = 0; /* number of simultaneous cameras */
 	static unsigned short dev_nr = 0; /* we are handling device number n */
 
-	if (udev->descriptor.idVendor  == winbond_id_table[0].idVendor &&
-	    udev->descriptor.idProduct == winbond_id_table[0].idProduct)
+	if (le16_to_cpu(udev->descriptor.idVendor)  == winbond_id_table[0].idVendor &&
+	    le16_to_cpu(udev->descriptor.idProduct) == winbond_id_table[0].idProduct)
 		mod_id = W9968CF_MOD_CLVBWGP; /* see camlist[] table */
-	else if (udev->descriptor.idVendor  == winbond_id_table[1].idVendor &&
-	         udev->descriptor.idProduct == winbond_id_table[1].idProduct)
+	else if (le16_to_cpu(udev->descriptor.idVendor)  == winbond_id_table[1].idVendor &&
+	         le16_to_cpu(udev->descriptor.idProduct) == winbond_id_table[1].idProduct)
 		mod_id = W9968CF_MOD_GENERIC; /* see camlist[] table */
 	else
 		return -ENODEV;
diff -Nru a/drivers/usb/misc/Kconfig b/drivers/usb/misc/Kconfig
--- a/drivers/usb/misc/Kconfig	2005-01-10 20:11:22 -08:00
+++ b/drivers/usb/misc/Kconfig	2005-01-10 20:11:22 -08:00
@@ -32,26 +32,6 @@
 	  To compile this driver as a module, choose M here: the
 	  module will be called emi26.
 
-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.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called tiglusb.
-
-	  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
diff -Nru a/drivers/usb/misc/Makefile b/drivers/usb/misc/Makefile
--- a/drivers/usb/misc/Makefile	2005-01-10 20:11:19 -08:00
+++ b/drivers/usb/misc/Makefile	2005-01-10 20:11:19 -08:00
@@ -14,5 +14,4 @@
 obj-$(CONFIG_USB_PHIDGETSERVO)	+= phidgetservo.o
 obj-$(CONFIG_USB_RIO500)	+= rio500.o
 obj-$(CONFIG_USB_TEST)		+= usbtest.o
-obj-$(CONFIG_USB_TIGL)		+= tiglusb.o
 obj-$(CONFIG_USB_USS720)	+= uss720.o
diff -Nru a/drivers/usb/misc/auerswald.c b/drivers/usb/misc/auerswald.c
--- a/drivers/usb/misc/auerswald.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/usb/misc/auerswald.c	2005-01-10 20:11:18 -08:00
@@ -1123,16 +1123,16 @@
 static int auerswald_int_open (pauerswald_t cp)
 {
         int ret;
-	struct usb_endpoint_descriptor *ep;
+	struct usb_host_endpoint *ep;
 	int irqsize;
 	dbg ("auerswald_int_open");
 
-	ep = usb_epnum_to_ep_desc (cp->usbdev, USB_DIR_IN | AU_IRQENDP);
+	ep = cp->usbdev->ep_in[AU_IRQENDP];
 	if (!ep) {
 		ret = -EFAULT;
   		goto intoend;
     	}
-	irqsize = ep->wMaxPacketSize;
+	irqsize = le16_to_cpu(ep->desc.wMaxPacketSize);
 	cp->irqsize = irqsize;
 
 	/* allocate the urb and data buffer */
@@ -1151,7 +1151,9 @@
                 }
         }
         /* setup urb */
-        usb_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->desc.bInterval);
         /* start the urb */
 	cp->inturbp->status = 0;	/* needed! */
 	ret = usb_submit_urb (cp->inturbp, GFP_KERNEL);
@@ -1929,11 +1931,8 @@
 	int ret;
 
 	dbg ("probe: vendor id 0x%x, device id 0x%x",
-	     usbdev->descriptor.idVendor, usbdev->descriptor.idProduct);
-
-	/* See if the device offered us matches that we can accept */
-	if (usbdev->descriptor.idVendor != ID_AUERSWALD)
-		return -ENODEV;
+	     le16_to_cpu(usbdev->descriptor.idVendor),
+	     le16_to_cpu(usbdev->descriptor.idProduct));
 
         /* we use only the first -and only- interface */
         if (intf->altsetting->desc.bInterfaceNumber != 0)
@@ -1967,7 +1966,7 @@
 	cp->dtindex = intf->minor;
 
 	/* Get the usb version of the device */
-	cp->version = cp->usbdev->descriptor.bcdDevice;
+	cp->version = le16_to_cpu(cp->usbdev->descriptor.bcdDevice);
 	dbg ("Version is %X", cp->version);
 
 	/* allow some time to settle the device */
diff -Nru a/drivers/usb/misc/emi26.c b/drivers/usb/misc/emi26.c
--- a/drivers/usb/misc/emi26.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/usb/misc/emi26.c	2005-01-10 20:11:17 -08:00
@@ -213,11 +213,9 @@
 	struct usb_device *dev = interface_to_usbdev(intf);
 
 	info("%s start", __FUNCTION__); 
-	
-	if((dev->descriptor.idVendor == EMI26_VENDOR_ID) && (dev->descriptor.idProduct == EMI26_PRODUCT_ID)) {
-		emi26_load_firmware(dev);
-	}
-	
+
+	emi26_load_firmware(dev);
+
 	/* do not return the driver context, let real audio driver do that */
 	return -EIO;
 }
diff -Nru a/drivers/usb/misc/emi62.c b/drivers/usb/misc/emi62.c
--- a/drivers/usb/misc/emi62.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/usb/misc/emi62.c	2005-01-10 20:11:22 -08:00
@@ -255,10 +255,8 @@
 
 	info("%s start", __FUNCTION__); 
 
-	if((dev->descriptor.idVendor == EMI62_VENDOR_ID) && (dev->descriptor.idProduct == EMI62_PRODUCT_ID)) {
-		emi62_load_firmware(dev);
-	}
-	
+	emi62_load_firmware(dev);
+
 	/* do not return the driver context, let real audio driver do that */
 	return -EIO;
 }
diff -Nru a/drivers/usb/misc/legousbtower.c b/drivers/usb/misc/legousbtower.c
--- a/drivers/usb/misc/legousbtower.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/usb/misc/legousbtower.c	2005-01-10 20:11:18 -08:00
@@ -405,7 +405,7 @@
 			  dev->udev,
 			  usb_rcvintpipe(dev->udev, dev->interrupt_in_endpoint->bEndpointAddress),
 			  dev->interrupt_in_buffer,
-			  dev->interrupt_in_endpoint->wMaxPacketSize,
+			  le16_to_cpu(dev->interrupt_in_endpoint->wMaxPacketSize),
 			  tower_interrupt_in_callback,
 			  dev,
 			  dev->interrupt_in_interval);
@@ -859,13 +859,6 @@
 		info ("udev is NULL.");
 	}
 
-	/* See if the device offered us matches what we can accept */
-	if ((udev->descriptor.idVendor != LEGO_USB_TOWER_VENDOR_ID) ||
-	    (udev->descriptor.idProduct != LEGO_USB_TOWER_PRODUCT_ID)) {
-		return -ENODEV;
-	}
-
-
 	/* allocate memory for our device state and intialize it */
 
 	dev = kmalloc (sizeof(struct lego_usb_tower), GFP_KERNEL);
@@ -931,7 +924,7 @@
 		err("Couldn't allocate read_buffer");
 		goto error;
 	}
-	dev->interrupt_in_buffer = kmalloc (dev->interrupt_in_endpoint->wMaxPacketSize, GFP_KERNEL);
+	dev->interrupt_in_buffer = kmalloc (le16_to_cpu(dev->interrupt_in_endpoint->wMaxPacketSize), GFP_KERNEL);
 	if (!dev->interrupt_in_buffer) {
 		err("Couldn't allocate interrupt_in_buffer");
 		goto error;
diff -Nru a/drivers/usb/misc/tiglusb.c b/drivers/usb/misc/tiglusb.c
--- a/drivers/usb/misc/tiglusb.c	2005-01-10 20:11:15 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,592 +0,0 @@
-/* Hey EMACS -*- linux-c -*-
- *
- * tiglusb -- Texas Instruments' USB GraphLink (aka SilverLink) driver.
- * Target: Texas Instruments graphing calculators (http://lpg.ticalc.org).
- *
- * Copyright (C) 2001-2004:
- *   Romain Lievin <roms@tilp.info>
- *   Julien BLACHE <jb@technologeek.org>
- * under the terms of the GNU General Public License.
- *
- * Based on dabusb.c, printer.c & scanner.c
- *
- * Please see the file: Documentation/usb/silverlink.txt
- * and the website at:  http://lpg.ticalc.org/prj_usb/
- * for more info.
- *
- * History:
- *   1.0x, Romain & Julien: initial submit.
- *   1.03, Greg Kroah: modifications.
- *   1.04, Julien: clean-up & fixes; Romain: 2.4 backport.
- *   1.05, Randy Dunlap: bug fix with the timeout parameter (divide-by-zero).
- *   1.06, Romain: synched with 2.5, version/firmware changed (confusing).
- *   1.07, Romain: fixed bad use of usb_clear_halt (invalid argument);
- *          timeout argument checked in ioctl + clean-up.
- *   1.08, Romain: added support of USB port embedded on some TI's handhelds.
- */
-
-#include <linux/module.h>
-#include <linux/socket.h>
-#include <linux/slab.h>
-#include <linux/init.h>
-#include <asm/uaccess.h>
-#include <linux/delay.h>
-#include <linux/usb.h>
-#include <linux/smp_lock.h>
-#include <linux/devfs_fs_kernel.h>
-#include <linux/device.h>
-
-#include <linux/ticable.h>
-#include "tiglusb.h"
-
-/*
- * Version Information
- */
-#define DRIVER_VERSION "1.08"
-#define DRIVER_AUTHOR  "Romain Lievin <roms@tilp.info> & Julien Blache <jb@jblache.org>"
-#define DRIVER_DESC    "TI-GRAPH LINK USB (aka SilverLink) driver"
-#define DRIVER_LICENSE "GPL"
-
-/* ----- global variables --------------------------------------------- */
-
-static tiglusb_t tiglusb[MAXTIGL];
-static int timeout = TIMAXTIME;	/* timeout in tenth of seconds     */
-static struct class_simple *tiglusb_class;
-
-/*---------- misc functions ------------------------------------------- */
-
-/*
- * Re-initialize device
- */
-static inline int
-clear_device (struct usb_device *dev)
-{
-	if (usb_reset_configuration (dev) < 0) {
-		err ("clear_device failed");
-		return -1;
-	}
-
-	return 0;
-}
-
-/* 
- * Clear input & output pipes (endpoints)
- */
-static inline int
-clear_pipes (struct usb_device *dev)
-{
-	unsigned int pipe;
-
-	pipe = usb_sndbulkpipe (dev, 2);
-	if (usb_clear_halt (dev, pipe)) {
-		err ("clear_pipe (w), request failed");
-		return -1;
-	}
-
-	pipe = usb_rcvbulkpipe (dev, 1);
-	if (usb_clear_halt (dev, pipe)) {
-		err ("clear_pipe (r), request failed");
-		return -1;
-	}
-
-	return 0;
-}
-
-/* ----- file operations functions--------------------------------------- */
-
-static int
-tiglusb_open (struct inode *inode, struct file *filp)
-{
-	int devnum = iminor(inode);
-	ptiglusb_t s;
-
-	if (devnum < TIUSB_MINOR || devnum >= (TIUSB_MINOR + MAXTIGL))
-		return -EIO;
-
-	s = &tiglusb[devnum - TIUSB_MINOR];
-
-	if (down_interruptible (&s->mutex)) {
-		return -ERESTARTSYS;
-	}
-
-	while (!s->dev || s->opened) {
-		up (&s->mutex);
-
-		if (filp->f_flags & O_NONBLOCK) {
-			return -EBUSY;
-		}
-
-		msleep_interruptible(500);
-
-		if (signal_pending (current)) {
-			return -EAGAIN;
-		}
-
-		if (down_interruptible (&s->mutex)) {
-			return -ERESTARTSYS;
-		}
-	}
-
-	s->opened = 1;
-	up (&s->mutex);
-
-	filp->f_pos = 0;
-	filp->private_data = s;
-
-	return nonseekable_open(inode, filp);
-}
-
-static int
-tiglusb_release (struct inode *inode, struct file *filp)
-{
-	ptiglusb_t s = (ptiglusb_t) filp->private_data;
-
-	if (down_interruptible (&s->mutex)) {
-		return -ERESTARTSYS;
-	}
-
-	s->state = _stopped;
-	up (&s->mutex);
-
-	if (!s->remove_pending)
-		clear_device (s->dev);
-	else
-		wake_up (&s->remove_ok);
-
-	s->opened = 0;
-
-	return 0;
-}
-
-static ssize_t
-tiglusb_read (struct file *filp, char __user *buf, size_t count, loff_t * f_pos)
-{
-	ptiglusb_t s = (ptiglusb_t) filp->private_data;
-	ssize_t ret = 0;
-	int bytes_to_read = 0;
-	int bytes_read = 0;
-	int result = 0;
-	char *buffer;
-	unsigned int pipe;
-
-	if (*f_pos)
-		return -ESPIPE;
-
-	if (s->remove_pending)
-		return -EIO;
-
-	if (!s->dev)
-		return -EIO;
-
-	buffer = kmalloc (s->max_ps, GFP_KERNEL);
-	if (!buffer)
-		return -ENOMEM;
-
-	bytes_to_read = (count >= s->max_ps) ? s->max_ps : count;
-
-	pipe = usb_rcvbulkpipe (s->dev, 1);
-	result = usb_bulk_msg (s->dev, pipe, buffer, bytes_to_read,
-			       &bytes_read, (HZ * timeout) / 10);
-	if (result == -ETIMEDOUT) {	/* NAK */
-		if (!bytes_read)
-			dbg ("quirk !");
-		warn ("tiglusb_read, NAK received.");
-		ret = result;
-		goto out;
-	} else if (result == -EPIPE) {	/* STALL -- shouldn't happen */
-		warn ("clear_halt request to remove STALL condition.");
-		if (usb_clear_halt (s->dev, pipe))
-			err ("clear_halt, request failed");
-		clear_device (s->dev);
-		ret = result;
-		goto out;
-	} else if (result < 0) {	/* We should not get any I/O errors */
-		err ("funky result: %d. Please notify maintainer.", result);
-		ret = -EIO;
-		goto out;
-	}
-
-	if (copy_to_user (buf, buffer, bytes_read)) {
-		ret = -EFAULT;
-	}
-
-      out:
-	kfree(buffer);
-	return ret ? ret : bytes_read;
-}
-
-static ssize_t
-tiglusb_write (struct file *filp, const char __user *buf, size_t count, loff_t * f_pos)
-{
-	ptiglusb_t s = (ptiglusb_t) filp->private_data;
-	ssize_t ret = 0;
-	int bytes_to_write = 0;
-	int bytes_written = 0;
-	int result = 0;
-	char *buffer;
-	unsigned int pipe;
-
-	if (*f_pos)
-		return -ESPIPE;
-
-	if (s->remove_pending)
-		return -EIO;
-
-	if (!s->dev)
-		return -EIO;
-
-	buffer = kmalloc (s->max_ps, GFP_KERNEL);
-	if (!buffer)
-		return -ENOMEM;
-
-	bytes_to_write = (count >= s->max_ps) ? s->max_ps : count;
-	if (copy_from_user (buffer, buf, bytes_to_write)) {
-		ret = -EFAULT;
-		goto out;
-	}
-
-	pipe = usb_sndbulkpipe (s->dev, 2);
-	result = usb_bulk_msg (s->dev, pipe, buffer, bytes_to_write,
-			       &bytes_written, (HZ * timeout) / 10);
-
-	if (result == -ETIMEDOUT) {	/* NAK */
-		warn ("tiglusb_write, NAK received.");
-		ret = result;
-		goto out;
-	} else if (result == -EPIPE) {	/* STALL -- shouldn't happen */
-		warn ("clear_halt request to remove STALL condition.");
-		if (usb_clear_halt (s->dev, pipe))
-			err ("clear_halt, request failed");
-		clear_device (s->dev);
-		ret = result;
-		goto out;
-	} else if (result < 0) {	/* We should not get any I/O errors */
-		warn ("funky result: %d. Please notify maintainer.", result);
-		ret = -EIO;
-		goto out;
-	}
-
-	if (bytes_written != bytes_to_write) {
-		ret = -EIO;
-	}
-
-      out:
-	kfree(buffer);
-	return ret ? ret : bytes_written;
-}
-
-static int
-tiglusb_ioctl (struct inode *inode, struct file *filp,
-	       unsigned int cmd, unsigned long arg)
-{
-	ptiglusb_t s = (ptiglusb_t) filp->private_data;
-	int ret = 0;
-
-	if (s->remove_pending)
-		return -EIO;
-
-	if (down_interruptible (&s->mutex)) {
-		return -ERESTARTSYS;
-	}
-
-	if (!s->dev) {
-		up (&s->mutex);
-		return -EIO;
-	}
-
-	switch (cmd) {
-	case IOCTL_TIUSB_TIMEOUT:
-		if (arg > 0)
-			timeout = arg;
-		else
-			ret = -EINVAL;
-		break;
-	case IOCTL_TIUSB_RESET_DEVICE:
-		if (clear_device (s->dev))
-			ret = -EIO;
-		break;
-	case IOCTL_TIUSB_RESET_PIPES:
-		if (clear_pipes (s->dev))
-			ret = -EIO;
-		break;
-	case IOCTL_TIUSB_GET_MAXPS:
-                if (copy_to_user((int __user *) arg, &s->max_ps, sizeof(int)))
-                        return -EFAULT;
-                break;
-        case IOCTL_TIUSB_GET_DEVID:
-                if (copy_to_user((int __user *) arg, &s->dev->descriptor.idProduct,
-                                 sizeof(int)))
-                        return -EFAULT;
-                break;
-	default:
-		ret = -ENOTTY;
-		break;
-	}
-
-	up (&s->mutex);
-
-	return ret;
-}
-
-/* ----- kernel module registering ------------------------------------ */
-
-static struct file_operations tiglusb_fops = {
-	.owner =	THIS_MODULE,
-	.llseek =	no_llseek,
-	.read =		tiglusb_read,
-	.write =	tiglusb_write,
-	.ioctl =	tiglusb_ioctl,
-	.open =		tiglusb_open,
-	.release =	tiglusb_release,
-};
-
-/* --- initialisation code ------------------------------------- */
-
-static int
-tiglusb_probe (struct usb_interface *intf,
-	       const struct usb_device_id *id)
-{
-	struct usb_device *dev = interface_to_usbdev(intf);
-	int minor = -1;
-	int i, err = 0;
-	ptiglusb_t s;
-	struct usb_host_config *conf;
-        struct usb_host_interface *ifdata = NULL;
-        int max_ps;
-
-	dbg ("probing vendor id 0x%x, device id 0x%x",
-	     dev->descriptor.idVendor, dev->descriptor.idProduct);
-
-	/*
-	 * We don't handle multiple configurations. As of version 0x0103 of
-	 * the TIGL hardware, there's only 1 configuration.
-	 */
-
-	if (dev->descriptor.bNumConfigurations != 1) {
-		err = -ENODEV;
-		goto out;
-	}
-
-	if (dev->descriptor.idVendor != 0x451) {
-		err = -ENODEV;
-		goto out;
-	}
-
-	if ((dev->descriptor.idProduct != 0xe001) &&
-            (dev->descriptor.idProduct != 0xe004) &&
-            (dev->descriptor.idProduct != 0xe008)) {
-                err = -ENODEV;
-                goto out;
-        }
-
-	/*
-         * TI introduced some new handhelds with embedded USB port.
-         * Port advertises same config as SilverLink cable but with a 
-	 * different maximum packet size (64 rather than 32).
-         */
-
-        conf = dev->actconfig;
-        ifdata = conf->interface[0]->cur_altsetting;
-        max_ps = ifdata->endpoint[0].desc.wMaxPacketSize;
-
-        info("max packet size of %d/%d bytes\n",
-             ifdata->endpoint[0].desc.wMaxPacketSize,
-             ifdata->endpoint[1].desc.wMaxPacketSize);
-
-	/*
-	 * Find a tiglusb struct
-	 */
-	for (i = 0; i < MAXTIGL; i++) {
-		ptiglusb_t s = &tiglusb[i];
-		if (!s->dev) {
-			minor = i;
-			break;
-		}
-	}
-
-	if (minor == -1) {
-		err = -ENODEV;
-		goto out;
-	}
-
-	s = &tiglusb[minor];
-
-	down (&s->mutex);
-	s->remove_pending = 0;
-	s->dev = dev;
-	s->max_ps = max_ps;
-	up (&s->mutex);
-	dbg ("bound to interface");
-
-	class_simple_device_add(tiglusb_class, MKDEV(TIUSB_MAJOR, TIUSB_MINOR + s->minor),
-			NULL, "usb%d", s->minor);
-	err = devfs_mk_cdev(MKDEV(TIUSB_MAJOR, TIUSB_MINOR) + s->minor,
-			S_IFCHR | S_IRUGO | S_IWUGO,
-			"ticables/usb/%d", s->minor);
-
-	if (err)
-		goto out_class;
-
-	/* Display firmware version */
-	info ("firmware revision %i.%02x",
-		dev->descriptor.bcdDevice >> 8,
-		dev->descriptor.bcdDevice & 0xff);
-
-	usb_set_intfdata (intf, s);
-	err = 0;
-	goto out;
-
-out_class:
-	class_simple_device_remove(MKDEV(TIUSB_MAJOR, TIUSB_MINOR + s->minor));
-out:
-	return err;
-}
-
-static void
-tiglusb_disconnect (struct usb_interface *intf)
-{
-	wait_queue_t __wait;
-	ptiglusb_t s = usb_get_intfdata (intf);
-	
-	init_waitqueue_entry(&__wait, current);
-	
-
-	usb_set_intfdata (intf, NULL);
-	if (!s || !s->dev) {
-		info ("bogus disconnect");
-		return;
-	}
-
-	s->remove_pending = 1;
-	wake_up (&s->wait);
-	add_wait_queue(&s->wait, &__wait);
-	set_current_state(TASK_UNINTERRUPTIBLE);
-	if (s->state == _started)
-		schedule();
-	current->state = TASK_RUNNING;
-	remove_wait_queue(&s->wait, &__wait);
-	down (&s->mutex);
-	s->dev = NULL;
-	s->opened = 0;
-
-	class_simple_device_remove(MKDEV(TIUSB_MAJOR, TIUSB_MINOR + s->minor));
-	devfs_remove("ticables/usb/%d", s->minor);
-
-	info ("device %d removed", s->minor);
-
-	up (&s->mutex);
-}
-
-static struct usb_device_id tiglusb_ids[] = {
-	{USB_DEVICE (0x0451, 0xe001)},
-	{}
-};
-
-MODULE_DEVICE_TABLE (usb, tiglusb_ids);
-
-static struct usb_driver tiglusb_driver = {
-	.owner =	THIS_MODULE,
-	.name =		"tiglusb",
-	.probe =	tiglusb_probe,
-	.disconnect =	tiglusb_disconnect,
-	.id_table =	tiglusb_ids,
-};
-
-/* --- initialisation code ------------------------------------- */
-
-#ifndef MODULE
-/*
- * You can use 'tiusb=timeout' to set timeout.
- */
-static int __init
-tiglusb_setup (char *str)
-{
-	int ints[2];
-
-	str = get_options (str, ARRAY_SIZE (ints), ints);
-
-	if (ints[0] > 0) {
-		if (ints[1] > 0)
-			timeout = ints[1];
-		else
-			info ("tiglusb: wrong timeout value (0), using default value.");
-	}
-
-	return 1;
-}
-#endif
-
-static int __init
-tiglusb_init (void)
-{
-	unsigned u;
-	int result, err = 0;
-
-	/* initialize struct */
-	for (u = 0; u < MAXTIGL; u++) {
-		ptiglusb_t s = &tiglusb[u];
-		memset (s, 0, sizeof (tiglusb_t));
-		init_MUTEX (&s->mutex);
-		s->dev = NULL;
-		s->minor = u;
-		s->opened = 0;
-		init_waitqueue_head (&s->wait);
-		init_waitqueue_head (&s->remove_ok);
-	}
-
-	/* register device */
-	if (register_chrdev (TIUSB_MAJOR, "tiglusb", &tiglusb_fops)) {
-		err ("unable to get major %d", TIUSB_MAJOR);
-		err = -EIO;
-		goto out;
-	}
-
-	/* Use devfs, tree: /dev/ticables/usb/[0..3] */
-	devfs_mk_dir ("ticables/usb");
-
-	tiglusb_class = class_simple_create(THIS_MODULE, "tiglusb");
-	if (IS_ERR(tiglusb_class)) {
-		err = PTR_ERR(tiglusb_class);
-		goto out_chrdev;
-	}
-	/* register USB module */
-	result = usb_register (&tiglusb_driver);
-	if (result < 0) {
-		err = -1;
-		goto out_chrdev;
-	}
-
-	info (DRIVER_DESC ", version " DRIVER_VERSION);
-
-	err = 0;
-	goto out;
-
-out_chrdev:
-	unregister_chrdev (TIUSB_MAJOR, "tiglusb");
-out:
-	return err;
-}
-
-static void __exit
-tiglusb_cleanup (void)
-{
-	usb_deregister (&tiglusb_driver);
-	class_simple_destroy(tiglusb_class);
-	devfs_remove("ticables/usb");
-	unregister_chrdev (TIUSB_MAJOR, "tiglusb");
-}
-
-/* --------------------------------------------------------------------- */
-
-__setup ("tiusb=", tiglusb_setup);
-module_init (tiglusb_init);
-module_exit (tiglusb_cleanup);
-
-MODULE_AUTHOR (DRIVER_AUTHOR);
-MODULE_DESCRIPTION (DRIVER_DESC);
-MODULE_LICENSE (DRIVER_LICENSE);
-
-module_param(timeout, int, 0);
-MODULE_PARM_DESC (timeout, "Timeout in tenths of seconds (default=1.5 seconds)");
-
-/* --------------------------------------------------------------------- */
diff -Nru a/drivers/usb/misc/tiglusb.h b/drivers/usb/misc/tiglusb.h
--- a/drivers/usb/misc/tiglusb.h	2005-01-10 20:11:23 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,43 +0,0 @@
-/* Hey EMACS -*- linux-c -*-
- *
- * tiglusb - low level driver for SilverLink cable
- *
- * Copyright (C) 2000-2002, Romain Lievin <roms@lpg.ticalc.org>
- * under the terms of the GNU General Public License.
- *
- * Redistribution of this file is permitted under the terms of the GNU
- * Public License (GPL)
- */
-
-#ifndef _TIGLUSB_H
-#define _TIGLUSB_H
-
-/*
- * Max. number of devices supported
- */
-#define MAXTIGL		16
-
-/*
- * The driver context...
- */
-
-typedef enum { _stopped=0, _started } driver_state_t;
-
-typedef struct
-{
-	struct usb_device	*dev;		/* USB device handle */
-	struct semaphore	mutex;		/* locks this struct */
-
-	wait_queue_head_t	wait;		/* for timed waits */
-	wait_queue_head_t	remove_ok;
-
-	int		minor;			/* which minor dev #? */
-
-	driver_state_t	state;			/* started/stopped */
-	int		opened;			/* tru if open */
-	int	remove_pending;
-
-	int             max_ps;                 /* max packet size */
-} tiglusb_t, *ptiglusb_t;
-
-#endif
diff -Nru a/drivers/usb/misc/usblcd.c b/drivers/usb/misc/usblcd.c
--- a/drivers/usb/misc/usblcd.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/usb/misc/usblcd.c	2005-01-10 20:11:15 -08:00
@@ -74,7 +74,7 @@
 	  unsigned long arg)
 {
 	struct lcd_usb_data *lcd = &lcd_instance;
-	int i;
+	u16 bcdDevice;
 	char buf[30];
 
 	/* Sanity check to make sure lcd is connected, powered, etc */
@@ -85,9 +85,12 @@
 
 	switch (cmd) {
 	case IOCTL_GET_HARD_VERSION:
-		i = (lcd->lcd_dev)->descriptor.bcdDevice;
-		sprintf(buf,"%1d%1d.%1d%1d",(i & 0xF000)>>12,(i & 0xF00)>>8,
-			(i & 0xF0)>>4,(i & 0xF));
+		bcdDevice = le16_to_cpu((lcd->lcd_dev)->descriptor.bcdDevice);
+		sprintf(buf,"%1d%1d.%1d%1d",
+			(bcdDevice & 0xF000)>>12,
+			(bcdDevice & 0xF00)>>8,
+			(bcdDevice & 0xF0)>>4,
+			(bcdDevice & 0xF));
 		if (copy_to_user((void __user *)arg,buf,strlen(buf))!=0)
 			return -EFAULT;
 		break;
@@ -258,7 +261,7 @@
 	int i;
 	int retval;
 
-	if (dev->descriptor.idProduct != 0x0001  ) {
+	if (le16_to_cpu(dev->descriptor.idProduct) != 0x0001) {
 		warn(KERN_INFO "USBLCD model not supported.");
 		return -ENODEV;
 	}
@@ -268,7 +271,7 @@
 		return -ENODEV;
 	}
 
-	i = dev->descriptor.bcdDevice;
+	i = le16_to_cpu(dev->descriptor.bcdDevice);
 
 	info("USBLCD Version %1d%1d.%1d%1d found at address %d",
 		(i & 0xF000)>>12,(i & 0xF00)>>8,(i & 0xF0)>>4,(i & 0xF),
diff -Nru a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c
--- a/drivers/usb/misc/usbtest.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/usb/misc/usbtest.c	2005-01-10 20:11:22 -08:00
@@ -527,10 +527,9 @@
 		return 0;
 	}
 
-	le16_to_cpus (&config->wTotalLength);
-	if (config->wTotalLength == len)		/* read it all */
+	if (le16_to_cpu(config->wTotalLength) == len)		/* read it all */
 		return 1;
-	if (config->wTotalLength >= TBUF_SIZE)		/* max partial read */
+	if (le16_to_cpu(config->wTotalLength) >= TBUF_SIZE)		/* max partial read */
 		return 1;
 	dbg ("bogus config descriptor read size");
 	return 0;
@@ -636,7 +635,7 @@
 	}
 
 	/* and sometimes [9.2.6.6] speed dependent descriptors */
-	if (udev->descriptor.bcdUSB == 0x0200) {	/* pre-swapped */
+	if (le16_to_cpu(udev->descriptor.bcdUSB) == 0x0200) {
 		struct usb_qualifier_descriptor		*d = NULL;
 
 		/* device qualifier [9.6.2] */
@@ -954,13 +953,13 @@
 		case 13:	// short read, resembling case 10
 			req.wValue = cpu_to_le16 ((USB_DT_CONFIG << 8) | 0);
 			// last data packet "should" be DATA1, not DATA0
-			len = 1024 - udev->epmaxpacketin [0];
+			len = 1024 - udev->descriptor.bMaxPacketSize0;
 			expected = -EREMOTEIO;
 			break;
 		case 14:	// short read; try to fill the last packet
 			req.wValue = cpu_to_le16 ((USB_DT_DEVICE << 8) | 0);
 			// device descriptor size == 18 bytes 
-			len = udev->epmaxpacketin [0];
+			len = udev->descriptor.bMaxPacketSize0;
 			switch (len) {
 			case 8:		len = 24; break;
 			case 16:	len = 32; break;
@@ -1372,8 +1371,8 @@
 
 	if (bytes < 0 || !desc)
 		return NULL;
-	maxp = 0x7ff & desc->wMaxPacketSize;
-	maxp *= 1 + (0x3 & (desc->wMaxPacketSize >> 11));
+	maxp = 0x7ff & le16_to_cpu(desc->wMaxPacketSize);
+	maxp *= 1 + (0x3 & (le16_to_cpu(desc->wMaxPacketSize) >> 11));
 	packets = (bytes + maxp - 1) / maxp;
 
 	urb = usb_alloc_urb (packets, SLAB_KERNEL);
@@ -1433,7 +1432,7 @@
 		"... iso period %d %sframes, wMaxPacket %04x\n",
 		1 << (desc->bInterval - 1),
 		(udev->speed == USB_SPEED_HIGH) ? "micro" : "",
-		desc->wMaxPacketSize);
+		le16_to_cpu(desc->wMaxPacketSize));
 
 	for (i = 0; i < param->sglen; i++) {
 		urbs [i] = iso_alloc_urb (udev, pipe, desc,
@@ -1842,13 +1841,13 @@
 	/* specify devices by module parameters? */
 	if (id->match_flags == 0) {
 		/* vendor match required, product match optional */
-		if (!vendor || udev->descriptor.idVendor != (u16)vendor)
+		if (!vendor || le16_to_cpu(udev->descriptor.idVendor) != (u16)vendor)
 			return -ENODEV;
-		if (product && udev->descriptor.idProduct != (u16)product)
+		if (product && le16_to_cpu(udev->descriptor.idProduct) != (u16)product)
 			return -ENODEV;
 		dbg ("matched module params, vend=0x%04x prod=0x%04x",
-				udev->descriptor.idVendor,
-				udev->descriptor.idProduct);
+				le16_to_cpu(udev->descriptor.idVendor),
+				le16_to_cpu(udev->descriptor.idProduct));
 	}
 #endif
 
diff -Nru a/drivers/usb/misc/uss720.c b/drivers/usb/misc/uss720.c
--- a/drivers/usb/misc/uss720.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/usb/misc/uss720.c	2005-01-10 20:11:15 -08:00
@@ -544,7 +544,8 @@
 	int i;
 
 	printk(KERN_DEBUG "uss720: probe: vendor id 0x%x, device id 0x%x\n",
-	       usbdev->descriptor.idVendor, usbdev->descriptor.idProduct);
+	       le16_to_cpu(usbdev->descriptor.idVendor),
+	       le16_to_cpu(usbdev->descriptor.idProduct));
 
 	/* our known interfaces have 3 alternate settings */
 	if (intf->num_altsetting != 3)
diff -Nru a/drivers/usb/net/catc.c b/drivers/usb/net/catc.c
--- a/drivers/usb/net/catc.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/usb/net/catc.c	2005-01-10 20:11:18 -08:00
@@ -800,8 +800,9 @@
 	}
 
 	/* The F5U011 has the same vendor/product as the netmate but a device version of 0x130 */
-	if (usbdev->descriptor.idVendor == 0x0423 && usbdev->descriptor.idProduct == 0xa &&
-	   catc->usbdev->descriptor.bcdDevice == 0x0130	) {
+	if (le16_to_cpu(usbdev->descriptor.idVendor) == 0x0423 && 
+	    le16_to_cpu(usbdev->descriptor.idProduct) == 0xa &&
+	    le16_to_cpu(catc->usbdev->descriptor.bcdDevice) == 0x0130) {
 		dbg("Testing for f5u011");
 		catc->is_f5u011 = 1;		
 		atomic_set(&catc->recq_sz, 0);
diff -Nru a/drivers/usb/net/kaweth.c b/drivers/usb/net/kaweth.c
--- a/drivers/usb/net/kaweth.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/usb/net/kaweth.c	2005-01-10 20:11:21 -08:00
@@ -160,6 +160,7 @@
 	{ USB_DEVICE(0x1342, 0x0204) }, /* Mobility USB-Ethernet Adapter */
 	{ USB_DEVICE(0x13d2, 0x0400) }, /* Shark Pocket Adapter */
 	{ USB_DEVICE(0x1485, 0x0001) },	/* Silicom U2E */
+	{ USB_DEVICE(0x1485, 0x0002) }, /* Psion Dacom Gold Port Ethernet */
 	{ USB_DEVICE(0x1645, 0x0005) }, /* Entrega E45 */
 	{ USB_DEVICE(0x1645, 0x0008) }, /* Entrega USB Ethernet Adapter */
 	{ USB_DEVICE(0x1645, 0x8005) }, /* PortGear Ethernet Adapter */
@@ -903,9 +904,9 @@
 
 	kaweth_dbg("Kawasaki Device Probe (Device number:%d): 0x%4.4x:0x%4.4x:0x%4.4x",
 		 dev->devnum,
-		 (int)dev->descriptor.idVendor,
-		 (int)dev->descriptor.idProduct,
-		 (int)dev->descriptor.bcdDevice);
+		 le16_to_cpu(dev->descriptor.idVendor),
+		 le16_to_cpu(dev->descriptor.idProduct),
+		 le16_to_cpu(dev->descriptor.bcdDevice));
 
 	kaweth_dbg("Device at %p", dev);
 
@@ -933,7 +934,7 @@
 	 * downloaded. Don't try to do it again, or we'll hang the device.
 	 */
 
-	if (dev->descriptor.bcdDevice >> 8) {
+	if (le16_to_cpu(dev->descriptor.bcdDevice) >> 8) {
 		kaweth_info("Firmware present in device.");
 	} else {
 		/* Download the firmware */
diff -Nru a/drivers/usb/net/usbnet.c b/drivers/usb/net/usbnet.c
--- a/drivers/usb/net/usbnet.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/usb/net/usbnet.c	2005-01-10 20:11:19 -08:00
@@ -1298,7 +1298,7 @@
 	struct gl_packet	packets;
 };
 
-#ifdef	GENLINK_ACK
+#ifdef	GENELINK_ACK
 
 // FIXME:  this code is incomplete, not debugged; it doesn't
 // handle interrupts correctly.  interrupts should be generic
diff -Nru a/drivers/usb/serial/Kconfig b/drivers/usb/serial/Kconfig
--- a/drivers/usb/serial/Kconfig	2005-01-10 20:11:21 -08:00
+++ b/drivers/usb/serial/Kconfig	2005-01-10 20:11:21 -08:00
@@ -202,6 +202,19 @@
 	  To compile this driver as a module, choose M here: the
 	  module will be called io_ti.
 
+config USB_SERIAL_GARMIN
+       tristate "Garmin GPS driver"
+       depends on USB_SERIAL
+       help
+         Say Y here if you want to connect to your Garmin GPS.
+         Should work with most Garmin GPS devices which have a native USB port.
+
+         See <http://sourceforge.net/projects/garmin-gps> for the latest
+         version of the driver.
+
+         To compile this driver as a module, choose M here: the
+         module will be called garmin_gps.
+
 config USB_SERIAL_IPW
         tristate "USB IPWireless (3G UMTS TDD) Driver (EXPERIMENTAL)"
 	depends on USB_SERIAL && EXPERIMENTAL
@@ -379,6 +392,16 @@
 config USB_SERIAL_SAFE_PADDED
 	bool "USB Secure Encapsulated Driver - Padded"
 	depends on USB_SERIAL_SAFE
+
+config USB_SERIAL_TI
+	tristate "USB TI 3410/5052 Serial Driver"
+	depends on USB_SERIAL
+	help
+	  Say Y here if you want to use the TI USB 3410 or 5052
+	  serial devices.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called ti_usb_3410_5052.
 
 config USB_SERIAL_CYBERJACK
 	tristate "USB REINER SCT cyberJack pinpad/e-com chipcard reader (EXPERIMENTAL)"
diff -Nru a/drivers/usb/serial/Makefile b/drivers/usb/serial/Makefile
--- a/drivers/usb/serial/Makefile	2005-01-10 20:11:16 -08:00
+++ b/drivers/usb/serial/Makefile	2005-01-10 20:11:16 -08:00
@@ -19,6 +19,7 @@
 obj-$(CONFIG_USB_SERIAL_EDGEPORT_TI)		+= io_ti.o
 obj-$(CONFIG_USB_SERIAL_EMPEG)			+= empeg.o
 obj-$(CONFIG_USB_SERIAL_FTDI_SIO)		+= ftdi_sio.o
+obj-$(CONFIG_USB_SERIAL_GARMIN)			+= garmin_gps.o
 obj-$(CONFIG_USB_SERIAL_IPAQ)			+= ipaq.o
 obj-$(CONFIG_USB_SERIAL_IPW)			+= ipw.o
 obj-$(CONFIG_USB_SERIAL_IR)			+= ir-usb.o
@@ -30,6 +31,7 @@
 obj-$(CONFIG_USB_SERIAL_OMNINET)		+= omninet.o
 obj-$(CONFIG_USB_SERIAL_PL2303)			+= pl2303.o
 obj-$(CONFIG_USB_SERIAL_SAFE)			+= safe_serial.o
+obj-$(CONFIG_USB_SERIAL_TI)			+= ti_usb_3410_5052.o
 obj-$(CONFIG_USB_SERIAL_VISOR)			+= visor.o
 obj-$(CONFIG_USB_SERIAL_WHITEHEAT)		+= whiteheat.o
 obj-$(CONFIG_USB_SERIAL_XIRCOM)			+= keyspan_pda.o
diff -Nru a/drivers/usb/serial/belkin_sa.c b/drivers/usb/serial/belkin_sa.c
--- a/drivers/usb/serial/belkin_sa.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/usb/serial/belkin_sa.c	2005-01-10 20:11:19 -08:00
@@ -181,8 +181,8 @@
 	priv->last_lsr = 0;
 	priv->last_msr = 0;
 	/* see comments at top of file */
-	priv->bad_flow_control = (dev->descriptor.bcdDevice <= 0x0206) ? 1 : 0;
-	info("bcdDevice: %04x, bfc: %d", dev->descriptor.bcdDevice, priv->bad_flow_control);
+	priv->bad_flow_control = (le16_to_cpu(dev->descriptor.bcdDevice) <= 0x0206) ? 1 : 0;
+	info("bcdDevice: %04x, bfc: %d", le16_to_cpu(dev->descriptor.bcdDevice), priv->bad_flow_control);
 
 	init_waitqueue_head(&serial->port[0]->write_wait);
 	usb_set_serial_port_data(serial->port[0], priv);
diff -Nru a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
--- a/drivers/usb/serial/ftdi_sio.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/usb/serial/ftdi_sio.c	2005-01-10 20:11:21 -08:00
@@ -1174,6 +1174,135 @@
 
 } /* set_serial_info */
 
+
+/*
+ * ***************************************************************************
+ * Sysfs Attribute
+ * ***************************************************************************
+ */
+
+ssize_t show_latency_timer(struct device *dev, char *buf)
+{
+	struct usb_serial_port *port = to_usb_serial_port(dev);
+	struct ftdi_private *priv = usb_get_serial_port_data(port);
+	struct usb_device *udev;
+	unsigned short latency = 0;
+	int rv = 0;
+	
+	udev = to_usb_device(dev);
+	
+	dbg("%s",__FUNCTION__);
+	
+	rv = usb_control_msg(udev,
+			     usb_rcvctrlpipe(udev, 0),
+			     FTDI_SIO_GET_LATENCY_TIMER_REQUEST,
+			     FTDI_SIO_GET_LATENCY_TIMER_REQUEST_TYPE,
+			     0, priv->interface, 
+			     (char*) &latency, 1, WDR_TIMEOUT);
+	
+	if (rv < 0) {
+		dev_err(dev, "Unable to read latency timer: %i", rv);
+		return -EIO;
+	}
+	return sprintf(buf, "%i\n", latency);
+}
+
+/* Write a new value of the latency timer, in units of milliseconds. */
+ssize_t store_latency_timer(struct device *dev, const char *valbuf, size_t count)
+{
+	struct usb_serial_port *port = to_usb_serial_port(dev);
+	struct ftdi_private *priv = usb_get_serial_port_data(port);
+	struct usb_device *udev;
+	char buf[1];
+	int v = simple_strtoul(valbuf, NULL, 10);
+	int rv = 0;
+	
+	udev = to_usb_device(dev);
+	
+	dbg("%s: setting latency timer = %i", __FUNCTION__, v);
+	
+	rv = usb_control_msg(udev,
+			     usb_sndctrlpipe(udev, 0),
+			     FTDI_SIO_SET_LATENCY_TIMER_REQUEST,
+			     FTDI_SIO_SET_LATENCY_TIMER_REQUEST_TYPE,
+			     v, priv->interface, 
+			     buf, 0, WDR_TIMEOUT);
+	
+	if (rv < 0) {
+		dev_err(dev, "Unable to write latency timer: %i", rv);
+		return -EIO;
+	}
+	
+	return count;
+}
+
+/* Write an event character directly to the FTDI register.  The ASCII
+   value is in the low 8 bits, with the enable bit in the 9th bit. */
+ssize_t store_event_char(struct device *dev, const char *valbuf, size_t count)
+{
+	struct usb_serial_port *port = to_usb_serial_port(dev);
+	struct ftdi_private *priv = usb_get_serial_port_data(port);
+	struct usb_device *udev;
+	char buf[1];
+	int v = simple_strtoul(valbuf, NULL, 10);
+	int rv = 0;
+	
+	udev = to_usb_device(dev);
+	
+	dbg("%s: setting event char = %i", __FUNCTION__, v);
+	
+	rv = usb_control_msg(udev,
+			     usb_sndctrlpipe(udev, 0),
+			     FTDI_SIO_SET_EVENT_CHAR_REQUEST,
+			     FTDI_SIO_SET_EVENT_CHAR_REQUEST_TYPE,
+			     v, priv->interface, 
+			     buf, 0, WDR_TIMEOUT);
+	
+	if (rv < 0) {
+		dbg("Unable to write event character: %i", rv);
+		return -EIO;
+	}
+	
+	return count;
+}
+
+static DEVICE_ATTR(latency_timer, S_IWUGO | S_IRUGO, show_latency_timer, store_latency_timer);
+static DEVICE_ATTR(event_char, S_IWUGO, NULL, store_event_char);
+
+void create_sysfs_attrs(struct usb_serial *serial)
+{	
+	struct ftdi_private *priv;
+	struct usb_device *udev;
+
+	dbg("%s",__FUNCTION__);
+	
+	priv = usb_get_serial_port_data(serial->port[0]);
+	udev = serial->dev;
+	
+	if (priv->chip_type == FT232BM) {
+		dbg("sysfs attributes for FT232BM");
+		device_create_file(&udev->dev, &dev_attr_event_char);
+		device_create_file(&udev->dev, &dev_attr_latency_timer);
+	}
+}
+
+void remove_sysfs_attrs(struct usb_serial *serial)
+{
+	struct ftdi_private *priv;
+	struct usb_device *udev;
+
+	dbg("%s",__FUNCTION__);	
+
+	priv = usb_get_serial_port_data(serial->port[0]);
+	udev = serial->dev;
+	
+	if (priv->chip_type == FT232BM) {
+		device_remove_file(&udev->dev, &dev_attr_event_char);
+		device_remove_file(&udev->dev, &dev_attr_latency_timer);
+	}
+	
+}
+
 /*
  * ***************************************************************************
  * FTDI driver specific functions
@@ -1291,6 +1420,8 @@
 	priv->chip_type = FT232BM;
 	priv->baud_base = 48000000 / 2; /* Would be / 16, but FT232BM supports multiple of 0.125 divisor fractions! */
 	
+	create_sysfs_attrs(serial);
+
 	return (0);
 } /* ftdi_FT232BM_startup */
 
@@ -1384,6 +1515,8 @@
 
 	dbg("%s", __FUNCTION__);
 
+	remove_sysfs_attrs(serial);
+	
 	/* all open ports are closed at this point 
          *    (by usbserial.c:__serial_close, which calls ftdi_close)  
 	 */
@@ -1518,7 +1651,7 @@
 	dbg("%s port %d, %d bytes", __FUNCTION__, port->number, count);
 
 	if (count == 0) {
-		err("write request of 0 bytes");
+		dbg("write request of 0 bytes");
 		return 0;
 	}
 	
diff -Nru a/drivers/usb/serial/ftdi_sio.h b/drivers/usb/serial/ftdi_sio.h
--- a/drivers/usb/serial/ftdi_sio.h	2005-01-10 20:11:22 -08:00
+++ b/drivers/usb/serial/ftdi_sio.h	2005-01-10 20:11:22 -08:00
@@ -249,6 +249,8 @@
 #define FTDI_SIO_GET_MODEM_STATUS	5 /* Retrieve current value of modern status register */
 #define FTDI_SIO_SET_EVENT_CHAR	6 /* Set the event character */
 #define FTDI_SIO_SET_ERROR_CHAR	7 /* Set the error character */
+#define FTDI_SIO_SET_LATENCY_TIMER	9 /* Set the latency timer */
+#define FTDI_SIO_GET_LATENCY_TIMER	10 /* Get the latency timer */
 
 /* Port interface code for FT2232C */
 #define INTERFACE_A		1
@@ -502,6 +504,55 @@
  * and the lValue field contains the XON character.
  */  
  
+/*
+ * FTDI_SIO_GET_LATENCY_TIMER
+ *
+ * Set the timeout interval. The FTDI collects data from the slave
+ * device, transmitting it to the host when either A) 62 bytes are
+ * received, or B) the timeout interval has elapsed and the buffer
+ * contains at least 1 byte.  Setting this value to a small number
+ * can dramatically improve performance for applications which send
+ * small packets, since the default value is 16ms.
+ */
+#define  FTDI_SIO_GET_LATENCY_TIMER_REQUEST FTDI_SIO_GET_LATENCY_TIMER
+#define  FTDI_SIO_GET_LATENCY_TIMER_REQUEST_TYPE 0xC0
+
+/* 
+ *  BmRequestType:   1100 0000b
+ *  bRequest:        FTDI_SIO_GET_LATENCY_TIMER
+ *  wValue:          0
+ *  wIndex:          Port
+ *  wLength:         0
+ *  Data:            latency (on return)
+ */
+
+/* 
+ * FTDI_SIO_SET_LATENCY_TIMER
+ *
+ * Set the timeout interval. The FTDI collects data from the slave
+ * device, transmitting it to the host when either A) 62 bytes are
+ * received, or B) the timeout interval has elapsed and the buffer
+ * contains at least 1 byte.  Setting this value to a small number
+ * can dramatically improve performance for applications which send
+ * small packets, since the default value is 16ms.
+ */
+#define  FTDI_SIO_SET_LATENCY_TIMER_REQUEST FTDI_SIO_SET_LATENCY_TIMER
+#define  FTDI_SIO_SET_LATENCY_TIMER_REQUEST_TYPE 0x40
+
+/* 
+ *  BmRequestType:   0100 0000b
+ *  bRequest:        FTDI_SIO_SET_LATENCY_TIMER
+ *  wValue:          Latency (milliseconds)
+ *  wIndex:          Port
+ *  wLength:         0
+ *  Data:            None
+ *
+ * wValue:
+ *   B0..7   Latency timer
+ *   B8..15  0
+ *
+ */
+
 /*
  * FTDI_SIO_SET_EVENT_CHAR 
  *
diff -Nru a/drivers/usb/serial/garmin_gps.c b/drivers/usb/serial/garmin_gps.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/usb/serial/garmin_gps.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,1541 @@
+/*
+ * Garmin GPS driver
+ *
+ * Copyright (C) 2004 Hermann Kneissel hkneissel@t-online.de
+ *
+ * The latest version of the driver can be found at
+ * http://sourceforge.net/projects/garmin-gps/
+ *
+ * This driver has been derived from v2.1 of the visor driver.
+ *
+ * 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 USA
+ */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/timer.h>
+#include <linux/tty.h>
+#include <linux/tty_driver.h>
+#include <linux/tty_flip.h>
+#include <linux/module.h>
+#include <linux/spinlock.h>
+#include <asm/uaccess.h>
+#include <linux/usb.h>
+
+/* the mode to be set when the port ist opened */
+static int initial_mode = 1;
+
+/* debug flag */
+static int debug = 0;
+
+#include "usb-serial.h"
+
+#define GARMIN_VENDOR_ID             0x091E
+
+/*
+ * Version Information
+ */
+
+#define VERSION_MAJOR	0
+#define VERSION_MINOR	23
+
+#define _STR(s) #s
+#define _DRIVER_VERSION(a,b) "v" _STR(a) "." _STR(b)
+#define DRIVER_VERSION _DRIVER_VERSION(VERSION_MAJOR, VERSION_MINOR)
+#define DRIVER_AUTHOR "hermann kneissel"
+#define DRIVER_DESC "garmin gps driver"
+
+/* error codes returned by the driver */
+#define EINVPKT	1000	/* invalid packet structure */
+
+
+// size of the header of a packet using the usb protocol
+#define GARMIN_PKTHDR_LENGTH	12
+
+// max. possible size of a packet using the serial protocol 
+#define MAX_SERIAL_PKT_SIZ (3+255+3)
+
+// max. possible size of a packet with worst case stuffing
+#define MAX_SERIAL_PKT_SIZ_STUFFED MAX_SERIAL_PKT_SIZ+256
+
+// size of a buffer able to hold a complete (no stuffing) packet
+// (the document protocol does not contain packets with a larger
+//  size, but in theory a packet may be 64k+12 bytes - if in
+//  later protocol versions larger packet sizes occur, this value
+//  should be increased accordingly, so the input buffer is always 
+//  large enough the store a complete packet inclusive header)
+#define GPS_IN_BUFSIZ  (GARMIN_PKTHDR_LENGTH+MAX_SERIAL_PKT_SIZ) 
+
+// size of a buffer able to hold a complete (incl. stuffing) packet
+#define GPS_OUT_BUFSIZ (GARMIN_PKTHDR_LENGTH+MAX_SERIAL_PKT_SIZ_STUFFED) 
+
+// where to place the packet id of a serial packet, so we can
+// prepend the usb-packet header without the need to move the
+// packets data
+#define GSP_INITIAL_OFFSET (GARMIN_PKTHDR_LENGTH-2)
+
+// max. size of incoming private packets (header+1 param)
+#define PRIVPKTSIZ (GARMIN_PKTHDR_LENGTH+4)
+
+#define GARMIN_LAYERID_TRANSPORT  0
+#define GARMIN_LAYERID_APPL      20
+// our own layer-id to use for some control mechanisms
+#define GARMIN_LAYERID_PRIVATE	0x01106E4B
+
+#define GARMIN_PKTID_PVT_DATA	51
+#define GARMIN_PKTID_L001_COMMAND_DATA 10
+
+#define CMND_ABORT_TRANSFER 0
+
+// packet ids used in private layer
+#define PRIV_PKTID_SET_DEBUG	1
+#define PRIV_PKTID_SET_MODE	2
+#define PRIV_PKTID_INFO_REQ	3
+#define PRIV_PKTID_INFO_RESP	4
+#define PRIV_PKTID_RESET_REQ	5
+#define PRIV_PKTID_SET_DEF_MODE	6
+
+
+#define ETX	0x03
+#define DLE	0x10
+#define ACK	0x06
+#define NAK	0x15
+
+/* structure used to queue incoming packets */
+struct garmin_packet {
+	struct list_head  list;
+	int               seq;
+	int               size; // the real size of the data array, always > 0
+	__u8              data[1];
+};
+
+/* structure used to keep the current state of the driver */
+struct garmin_data {
+	__u8   state;
+	__u16  flags;
+	__u8   mode;
+	__u8   ignorePkts;
+	__u8   count;
+	__u8   pkt_id;
+	__u32  serial_num;
+	struct timer_list timer;
+	struct usb_serial_port *port;
+	int    seq_counter;
+	int    insize;
+	int    outsize;
+	__u8   inbuffer [GPS_IN_BUFSIZ];  /* tty -> usb */
+	__u8   outbuffer[GPS_OUT_BUFSIZ]; /* usb -> tty */
+	__u8   privpkt[4*6];
+	spinlock_t lock;
+	struct list_head pktlist;
+};
+
+
+#define STATE_NEW            0
+#define STATE_INITIAL_DELAY  1
+#define STATE_TIMEOUT        2
+#define STATE_SESSION_REQ1   3
+#define STATE_SESSION_REQ2   4
+#define STATE_ACTIVE         5
+
+#define STATE_RESET	     8
+#define STATE_DISCONNECTED   9
+#define STATE_WAIT_TTY_ACK  10
+#define STATE_GSP_WAIT_DATA 11
+
+#define MODE_NATIVE          0
+#define MODE_GARMIN_SERIAL   1
+
+// Flags used in garmin_data.flags:
+#define FLAGS_SESSION_REPLY_MASK  0x00C0
+#define FLAGS_SESSION_REPLY1_SEEN 0x0080
+#define FLAGS_SESSION_REPLY2_SEEN 0x0040
+#define FLAGS_BULK_IN_ACTIVE      0x0020
+#define FLAGS_THROTTLED           0x0010
+#define CLEAR_HALT_REQUIRED       0x0001
+
+#define FLAGS_QUEUING             0x0100
+#define FLAGS_APP_RESP_SEEN       0x0200
+#define FLAGS_APP_REQ_SEEN        0x0400
+#define FLAGS_DROP_DATA           0x0800
+
+#define FLAGS_GSP_SKIP            0x1000
+#define FLAGS_GSP_DLESEEN         0x2000
+
+
+
+
+
+
+/* function prototypes */
+static void gsp_next_packet(struct garmin_data * garmin_data_p);
+static int  garmin_write_bulk(struct usb_serial_port *port,
+			     const unsigned char *buf, int count);
+
+/* some special packets to be send or received */
+static unsigned char const GARMIN_START_SESSION_REQ[]
+	= { 0, 0, 0, 0,  5, 0, 0, 0, 0, 0, 0, 0 };
+static unsigned char const GARMIN_START_SESSION_REQ2[]
+	= { 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0 };
+static unsigned char const GARMIN_START_SESSION_REPLY[]
+	= { 0, 0, 0, 0,  6, 0, 0, 0, 4, 0, 0, 0 };
+static unsigned char const GARMIN_SESSION_ACTIVE_REPLY[]
+	= { 0, 0, 0, 0, 17, 0, 0, 0, 4, 0, 0, 0, 0, 16, 0, 0 };
+static unsigned char const GARMIN_BULK_IN_AVAIL_REPLY[]
+	= { 0, 0, 0, 0,  2, 0, 0, 0, 0, 0, 0, 0 };
+static unsigned char const GARMIN_APP_LAYER_REPLY[]
+	= { 0x14, 0, 0, 0 };
+static unsigned char const GARMIN_START_PVT_REQ[]
+	= { 20, 0, 0, 0,  10, 0, 0, 0, 2, 0, 0, 0, 49, 0 };
+static unsigned char const GARMIN_STOP_PVT_REQ[]
+	= { 20, 0, 0, 0,  10, 0, 0, 0, 2, 0, 0, 0, 50, 0 };
+static unsigned char const GARMIN_STOP_TRANSFER_REQ[]
+	= { 20, 0, 0, 0,  10, 0, 0, 0, 2, 0, 0, 0, 0, 0 };
+static unsigned char const GARMIN_STOP_TRANSFER_REQ_V2[]
+	= { 20, 0, 0, 0,  10, 0, 0, 0, 1, 0, 0, 0, 0 };
+static unsigned char const PRIVATE_REQ[]
+	=    { 0x4B, 0x6E, 0x10, 0x01,  0xFF, 0, 0, 0, 0xFF, 0, 0, 0 };
+
+
+
+static struct usb_device_id id_table [] = {
+	/* the same device id seems to be used by all usb enabled gps devices */
+	{ USB_DEVICE(GARMIN_VENDOR_ID, 3 ) },
+	{ }					/* Terminating entry */
+};
+
+MODULE_DEVICE_TABLE (usb, id_table);
+
+static struct usb_driver garmin_driver = {
+	.owner =	THIS_MODULE,
+	.name =		"garmin_gps",
+	.probe =	usb_serial_probe,
+	.disconnect =	usb_serial_disconnect,
+	.id_table =	id_table,
+};
+
+
+static inline int noResponseFromAppLayer(struct garmin_data * garmin_data_p)
+{
+	return ((garmin_data_p->flags
+				& (FLAGS_APP_REQ_SEEN|FLAGS_APP_RESP_SEEN))
+	        == FLAGS_APP_REQ_SEEN);
+}
+
+
+static inline int getLayerId(const __u8 *usbPacket)
+{
+	return __le32_to_cpup((__le32 *)(usbPacket));
+}
+
+static inline int getPacketId(const __u8 *usbPacket)
+{
+	return __le32_to_cpup((__le32 *)(usbPacket+4));
+}
+
+static inline int getDataLength(const __u8 *usbPacket)
+{
+	return __le32_to_cpup((__le32 *)(usbPacket+8));
+}
+
+
+/*
+ * check if the usb-packet in buf contains an abort-transfer command.
+ * (if yes, all queued data will be dropped)
+ */
+static inline int isAbortTrfCmnd(const unsigned char *buf)
+{
+	if (0 == memcmp(buf, GARMIN_STOP_TRANSFER_REQ, 
+	                sizeof(GARMIN_STOP_TRANSFER_REQ)) ||
+	    0 == memcmp(buf, GARMIN_STOP_TRANSFER_REQ_V2, 
+	                sizeof(GARMIN_STOP_TRANSFER_REQ_V2)))
+		return 1;
+	else
+		return 0;
+}
+
+
+
+static void send_to_tty(struct usb_serial_port *port,
+                        char *data, unsigned int actual_length)
+{
+	struct tty_struct *tty = port->tty;
+	int i;
+
+	if (tty && actual_length) {
+
+		usb_serial_debug_data(debug, &port->dev, 
+					__FUNCTION__, actual_length, data);
+
+		for (i = 0; i < actual_length ; ++i) {
+			/* if we insert more than TTY_FLIPBUF_SIZE characters,
+			   we drop them. */
+			if(tty->flip.count >= TTY_FLIPBUF_SIZE) {
+				tty_flip_buffer_push(tty);
+			}
+			/* this doesn't actually push the data through unless
+			   tty->low_latency is set */
+			tty_insert_flip_char(tty, data[i], 0);
+		}
+		tty_flip_buffer_push(tty);
+	}
+}
+
+
+/******************************************************************************
+ * packet queue handling
+ ******************************************************************************/
+
+/*
+ * queue a received (usb-)packet for later processing
+ */
+static int pkt_add(struct garmin_data * garmin_data_p,
+                   unsigned char *data, unsigned int data_length)
+{
+	int result = 0;
+	unsigned long flags;
+	struct garmin_packet *pkt;
+
+	/* process only packets containg data ... */
+	if (data_length) {
+		garmin_data_p->flags |= FLAGS_QUEUING;
+		pkt = kmalloc(sizeof(struct garmin_packet)+data_length,
+		              GFP_ATOMIC);
+		if (pkt == 0) {
+			dev_err(&garmin_data_p->port->dev, "out of memory\n");
+			return 0;
+		}
+		pkt->size = data_length;
+		memcpy(pkt->data, data, data_length);
+
+		spin_lock_irqsave(&garmin_data_p->lock, flags);
+		result = list_empty(&garmin_data_p->pktlist);
+		pkt->seq = garmin_data_p->seq_counter++;
+		list_add_tail(&pkt->list, &garmin_data_p->pktlist);
+		spin_unlock_irqrestore(&garmin_data_p->lock, flags);
+
+		/* in serial mode, if someone is waiting for data from
+		   the device, iconvert and send the next packet to tty. */
+		if (result && (garmin_data_p->state == STATE_GSP_WAIT_DATA)) {
+			gsp_next_packet(garmin_data_p);
+		}
+	}
+	return result;
+}
+
+
+/* get the next pending packet */
+static struct garmin_packet *pkt_pop(struct garmin_data * garmin_data_p)
+{
+	unsigned long flags;
+	struct garmin_packet *result = NULL;
+
+	spin_lock_irqsave(&garmin_data_p->lock, flags);
+	if (!list_empty(&garmin_data_p->pktlist)) {
+		result = (struct garmin_packet *)garmin_data_p->pktlist.next;
+		list_del(&result->list);
+	}
+	spin_unlock_irqrestore(&garmin_data_p->lock, flags);
+	return result;
+}
+
+
+/* free up all queued data */
+static void pkt_clear(struct garmin_data * garmin_data_p)
+{
+	unsigned long flags;
+	struct garmin_packet *result = NULL;
+
+	dbg("%s", __FUNCTION__);
+
+	spin_lock_irqsave(&garmin_data_p->lock, flags);
+	while (!list_empty(&garmin_data_p->pktlist)) {
+		result = (struct garmin_packet *)garmin_data_p->pktlist.next;
+		list_del(&result->list);
+		kfree(result);
+	}
+	spin_unlock_irqrestore(&garmin_data_p->lock, flags);
+}
+
+
+/******************************************************************************
+ * garmin serial protocol handling handling
+ ******************************************************************************/
+
+/* send an ack packet back to the tty */
+static int gsp_send_ack(struct garmin_data * garmin_data_p, __u8 pkt_id)
+{
+	__u8 pkt[10];
+        __u8 cksum = 0;
+        __u8 *ptr = pkt;
+        unsigned  l = 0;
+
+	dbg("%s - pkt-id: 0x%X.", __FUNCTION__, 0xFF & pkt_id);
+
+	*ptr++ = DLE;
+	*ptr++ = ACK;
+	cksum += ACK;
+
+	*ptr++ = 2;
+	cksum += 2;
+
+	*ptr++ = pkt_id;
+	cksum += pkt_id;
+
+	if (pkt_id == DLE) {
+		*ptr++ = DLE;
+	}
+
+	*ptr++ = 0;
+	*ptr++ = 0xFF & (-cksum);
+	*ptr++ = DLE;
+	*ptr++ = ETX;
+
+	l = ptr-pkt;
+
+	send_to_tty(garmin_data_p->port, pkt, l);
+	return 0;
+}
+
+
+
+/*
+ * called for a complete packet received from tty layer
+ *
+ * the complete packet (pkzid ... cksum) is in garmin_data_p->inbuf starting
+ * at GSP_INITIAL_OFFSET.
+ *
+ * count - number of bytes in the input buffer including space reserved for
+ *         the usb header: GSP_INITIAL_OFFSET + number of bytes in packet 
+ *         (including pkt-id, data-length a. cksum)
+ */
+static int gsp_rec_packet(struct garmin_data * garmin_data_p, int count)
+{
+	const __u8* recpkt = garmin_data_p->inbuffer+GSP_INITIAL_OFFSET;
+        __le32 *usbdata = (__le32 *) garmin_data_p->inbuffer;
+
+	int cksum = 0;
+	int n = 0;
+	int pktid = recpkt[0];
+	int size = recpkt[1];
+
+	usb_serial_debug_data(debug, &garmin_data_p->port->dev,
+			       __FUNCTION__, count-GSP_INITIAL_OFFSET, recpkt);
+
+	if (size != (count-GSP_INITIAL_OFFSET-3)) {
+		dbg("%s - invalid size, expected %d bytes, got %d",
+			__FUNCTION__, size, (count-GSP_INITIAL_OFFSET-3));
+		return -EINVPKT;
+	}
+
+	cksum += *recpkt++;
+	cksum += *recpkt++;
+
+	// sanity check, remove after test ...
+	if ((__u8*)&(usbdata[3]) != recpkt) {
+		dbg("%s - ptr mismatch %p - %p",
+			__FUNCTION__, &(usbdata[4]), recpkt);
+		return -EINVPKT;
+	}
+
+	while (n < size) {
+		cksum += *recpkt++;
+		n++;
+	}
+
+       if ((0xff & (cksum + *recpkt)) != 0) {
+                dbg("%s - invalid checksum, expected %02x, got %02x",
+                        __FUNCTION__, 0xff & -cksum, 0xff & *recpkt);
+                return -EINVPKT;
+        }
+
+	usbdata[0] = __cpu_to_le32(GARMIN_LAYERID_APPL);
+	usbdata[1] = __cpu_to_le32(pktid);
+	usbdata[2] = __cpu_to_le32(size);
+
+	garmin_write_bulk (garmin_data_p->port, garmin_data_p->inbuffer,
+			   GARMIN_PKTHDR_LENGTH+size);
+
+	/* if this was an abort-transfer command, flush all
+	   queued data. */
+	if (isAbortTrfCmnd(garmin_data_p->inbuffer)) {
+		garmin_data_p->flags |= FLAGS_DROP_DATA;
+		pkt_clear(garmin_data_p);
+	}
+
+	return count;
+}
+
+
+
+/*
+ * Called for data received from tty
+ *
+ * buf contains the data read, it may span more than one packet or even
+ * incomplete packets
+ *
+ * input record should be a serial-record, but it may not be complete.
+ * Copy it into our local buffer, until an etx is seen (or an error
+ * occurs).
+ * Once the record is complete, convert into a usb packet and send it
+ * to the bulk pipe, send an ack back to the tty.
+ *
+ * If the input is an ack, just send the last queued packet to the
+ * tty layer.
+ *
+ * if the input is an abort command, drop all queued data.
+ */
+
+static int gsp_receive(struct garmin_data * garmin_data_p,
+                       const unsigned char *buf, int count)
+{
+	int offs = 0;
+	int ack_or_nak_seen = 0;
+	int i = 0;
+	__u8 *dest = garmin_data_p->inbuffer;
+	int size = garmin_data_p->insize;
+	// dleSeen: set if last byte read was a DLE
+	int dleSeen = garmin_data_p->flags & FLAGS_GSP_DLESEEN;
+	// skip: if set, skip incoming data until possible start of
+	//       new packet
+	int skip = garmin_data_p->flags & FLAGS_GSP_SKIP;
+	__u8 data;
+
+	dbg("%s - dle=%d skip=%d size=%d count=%d",
+		__FUNCTION__, dleSeen, skip, size, count);
+
+	if (size == 0) {
+		size = GSP_INITIAL_OFFSET;
+	}
+
+	while (offs < count) {
+
+		data = *(buf+offs);
+		offs ++;
+
+		if (data == DLE) {
+			if (skip) { /* start of a new pkt */
+				skip = 0;
+				size = GSP_INITIAL_OFFSET;
+				dleSeen = 1;
+			} else if (dleSeen) {
+				dest[size++] = data;
+				dleSeen = 0;
+			} else {
+				dleSeen = 1;
+			}
+		} else if (data == ETX) {
+			if (dleSeen) {
+				/* packet complete */
+
+				data = dest[GSP_INITIAL_OFFSET];
+
+				if (data == ACK) {
+					ack_or_nak_seen = ACK;
+					dbg("ACK packet complete.");
+				} else if (data == NAK) {
+					ack_or_nak_seen = NAK;
+					dbg("NAK packet complete.");
+				} else {
+					dbg("packet complete "
+						        "- id=0x%X.",
+						        0xFF & data);
+					gsp_rec_packet(garmin_data_p, size);
+				}
+
+				skip = 1;
+				size = GSP_INITIAL_OFFSET;
+				dleSeen = 0;
+			} else {
+				dest[size++] = data;
+			}
+		} else if (!skip) {
+
+			if (dleSeen) {
+				dbg("non-masked DLE at %d - restarting", i);
+				size = GSP_INITIAL_OFFSET;
+				dleSeen = 0;
+			}
+
+			dest[size++] = data;
+		}
+
+		if (size >= GPS_IN_BUFSIZ) {
+			dbg("%s - packet too large.", __FUNCTION__);
+			skip = 1;
+			size = GSP_INITIAL_OFFSET;
+			dleSeen = 0;
+		}
+	}
+
+	garmin_data_p->insize = size;
+
+	// copy flags back to structure
+	if (skip)
+		garmin_data_p->flags |= FLAGS_GSP_SKIP;
+	else
+		garmin_data_p->flags &= ~FLAGS_GSP_SKIP;
+
+	if (dleSeen)
+		garmin_data_p->flags |= FLAGS_GSP_DLESEEN;
+	else
+		garmin_data_p->flags &= ~FLAGS_GSP_DLESEEN;
+
+	if (ack_or_nak_seen) {
+		garmin_data_p->state = STATE_GSP_WAIT_DATA;
+		gsp_next_packet(garmin_data_p);
+	}
+
+	return count;
+}
+
+
+
+
+/*
+ * Sends a usb packet to the tty
+ *
+ * Assumes, that all packages and at an usb-packet boundary.
+ *
+ * return <0 on error, 0 if packet is incomplete or > 0 if packet was sent
+ */
+int gsp_send(struct garmin_data * garmin_data_p, const unsigned char *buf,
+              int count)
+{
+	const unsigned char *src;
+	unsigned char *dst;
+	int pktid = 0;
+	int datalen = 0;
+	int cksum = 0;
+	int i=0;
+	int k;
+
+	dbg("%s - state %d - %d bytes.", __FUNCTION__,
+	         garmin_data_p->state, count);
+
+	k = garmin_data_p->outsize;
+	if ((k+count) > GPS_OUT_BUFSIZ) {
+		dbg("packet too large");
+		garmin_data_p->outsize = 0;
+		return -4;
+	}
+
+	memcpy(garmin_data_p->outbuffer+k, buf, count);
+	k += count;
+	garmin_data_p->outsize = k;
+
+	if (k >= GARMIN_PKTHDR_LENGTH) {
+		pktid  = getPacketId(garmin_data_p->outbuffer);
+		datalen= getDataLength(garmin_data_p->outbuffer);
+		i = GARMIN_PKTHDR_LENGTH + datalen;
+		if (k < i)
+			return 0;
+	} else {
+		return 0;
+	}
+
+	dbg("%s - %d bytes in buffer, %d bytes in pkt.", __FUNCTION__,
+	         k, i);
+
+	/* garmin_data_p->outbuffer now contains a complete packet */
+
+	usb_serial_debug_data(debug, &garmin_data_p->port->dev,
+		                   __FUNCTION__, k, garmin_data_p->outbuffer);
+
+	garmin_data_p->outsize = 0;
+
+	if (GARMIN_LAYERID_APPL != getLayerId(garmin_data_p->outbuffer)) {
+		dbg("not an application packet (%d)", 
+		        getLayerId(garmin_data_p->outbuffer));
+		return -1;
+	}
+
+	if (pktid > 255) {
+		dbg("packet-id %d too large", pktid);
+		return -2;
+	}
+
+	if (datalen > 255) {
+		dbg("packet-size %d too large", datalen);
+		return -3;
+	}
+
+	/* the serial protocol should be able to handle this packet */
+
+	k = 0;
+	src = garmin_data_p->outbuffer+GARMIN_PKTHDR_LENGTH;
+	for (i=0; i<datalen; i++) {
+		if (*src++ == DLE)
+			k++;
+	}
+
+	src = garmin_data_p->outbuffer+GARMIN_PKTHDR_LENGTH;
+	if (k > (GARMIN_PKTHDR_LENGTH-2)) {
+		/* can't add stuffing DLEs in place, move data to end 
+                   of buffer ... */
+		dst = garmin_data_p->outbuffer+GPS_OUT_BUFSIZ-datalen;
+		memcpy(dst, src, datalen);
+		src = dst;
+	}
+
+	dst = garmin_data_p->outbuffer;
+
+	*dst++ = DLE;
+	*dst++ = pktid;
+	cksum += pktid;
+	*dst++ = datalen;
+	cksum += datalen;
+	if (datalen == DLE)
+		*dst++ = DLE;
+
+	for (i=0; i<datalen; i++) {
+		__u8 c = *src++;
+		*dst++ = c;
+		cksum += c;
+		if (c == DLE)
+			*dst++ = DLE;
+	}
+		
+	cksum = 0xFF & -cksum;
+	*dst++ = cksum;
+	if (cksum == DLE)
+		*dst++ = DLE;
+	*dst++ = DLE;
+	*dst++ = ETX;
+
+	i = dst-garmin_data_p->outbuffer;
+
+	send_to_tty(garmin_data_p->port, garmin_data_p->outbuffer, i);
+
+	garmin_data_p->pkt_id = pktid;
+	garmin_data_p->state  = STATE_WAIT_TTY_ACK;
+
+	return i;
+}
+
+
+
+
+
+/*
+ * Process the next pending data packet - if there is one
+ */
+static void gsp_next_packet(struct garmin_data * garmin_data_p)
+{
+	struct garmin_packet *pkt = NULL;
+
+	while ((pkt = pkt_pop(garmin_data_p)) != 0) {
+		dbg("%s - next pkt: %d", __FUNCTION__, pkt->seq);
+		if (gsp_send(garmin_data_p, pkt->data, pkt->size) > 0) {
+			kfree(pkt);
+			return;
+		}
+		kfree(pkt);
+	}
+}
+
+
+
+
+/******************************************************************************
+ * garmin native mode
+ ******************************************************************************/
+
+
+/*
+ * Called for data received from tty
+ *
+ * The input data is expected to be in garmin usb-packet format.
+ *
+ * buf contains the data read, it may span more than one packet
+ * or even incomplete packets
+ */
+static int nat_receive(struct garmin_data * garmin_data_p,
+                       const unsigned char *buf, int count)
+{
+	__u8 * dest;
+	int offs = 0;
+	int result = count;
+	int len;
+
+	while (offs < count) {
+		// if buffer contains header, copy rest of data
+		if (garmin_data_p->insize >= GARMIN_PKTHDR_LENGTH)
+			len = GARMIN_PKTHDR_LENGTH
+			      +getDataLength(garmin_data_p->inbuffer);
+		else
+			len = GARMIN_PKTHDR_LENGTH;
+
+		if (len >= GPS_IN_BUFSIZ) {
+			/* seem to be an invalid packet, ignore rest of input */
+			dbg("%s - packet size too large: %d",
+			        __FUNCTION__, len);
+			garmin_data_p->insize = 0;
+			count = 0;
+			result = -EINVPKT;
+		} else {
+			len -= garmin_data_p->insize;
+			if (len > (count-offs))
+				len = (count-offs);
+			if (len > 0) {
+				dest = garmin_data_p->inbuffer
+				       	+garmin_data_p->insize;
+				memcpy(dest, buf+offs, len);
+				garmin_data_p->insize += len;
+				offs += len;
+			}
+		}
+
+		/* do we have a complete packet ? */
+		if (garmin_data_p->insize >= GARMIN_PKTHDR_LENGTH) {
+			len = GARMIN_PKTHDR_LENGTH+
+			   getDataLength(garmin_data_p->inbuffer);
+			if (garmin_data_p->insize >= len) {
+				garmin_write_bulk (garmin_data_p->port,
+				                   garmin_data_p->inbuffer,
+				                   len);
+				garmin_data_p->insize = 0;
+
+				/* if this was an abort-transfer command,
+				   flush all queued data. */
+				if (isAbortTrfCmnd(garmin_data_p->inbuffer)) {
+					garmin_data_p->flags |= FLAGS_DROP_DATA;
+					pkt_clear(garmin_data_p);
+				}
+			}
+		}
+	}
+	return result;
+}
+
+
+/******************************************************************************
+ * private packets
+ ******************************************************************************/
+
+static void priv_status_resp(struct usb_serial_port *port)
+{
+	struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
+	__le32 *pkt = (__le32 *)garmin_data_p->privpkt;
+
+	pkt[0] = __cpu_to_le32(GARMIN_LAYERID_PRIVATE);
+	pkt[1] = __cpu_to_le32(PRIV_PKTID_INFO_RESP);
+	pkt[2] = __cpu_to_le32(12);
+	pkt[3] = __cpu_to_le32(VERSION_MAJOR << 16 | VERSION_MINOR);
+	pkt[4] = __cpu_to_le32(garmin_data_p->mode);
+	pkt[5] = __cpu_to_le32(garmin_data_p->serial_num);
+
+	send_to_tty(port, (__u8*)pkt, 6*4);
+}
+
+
+/******************************************************************************
+ * Garmin specific driver functions
+ ******************************************************************************/
+
+static int process_resetdev_request(struct usb_serial_port *port)
+{
+	int status;
+	struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
+
+	garmin_data_p->flags &= ~(CLEAR_HALT_REQUIRED);
+	garmin_data_p->state = STATE_RESET;
+	garmin_data_p->serial_num = 0;
+
+	usb_kill_urb (port->interrupt_in_urb);
+	dbg("%s - usb_reset_device", __FUNCTION__ );
+	status = usb_reset_device(port->serial->dev);
+	if (status)
+		dbg("%s - usb_reset_device failed: %d",
+			__FUNCTION__, status);
+	return status;
+}
+
+
+
+/*
+ * clear all cached data
+ */
+static int garmin_clear(struct garmin_data * garmin_data_p)
+{
+	int status = 0;
+
+	struct usb_serial_port *port = garmin_data_p->port;
+
+	if (port != 0 && garmin_data_p->flags & FLAGS_APP_RESP_SEEN) {
+		/* send a terminate command */
+		status = garmin_write_bulk(port, GARMIN_STOP_TRANSFER_REQ,
+		                           sizeof(GARMIN_STOP_TRANSFER_REQ));
+	}
+
+	/* flush all queued data */
+	pkt_clear(garmin_data_p);
+
+	garmin_data_p->insize = 0;
+	garmin_data_p->outsize = 0;
+
+	return status;
+}
+
+
+
+
+
+
+static int garmin_init_session(struct usb_serial_port *port)
+{
+	struct usb_serial *serial = port->serial;
+	struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
+	int status = 0;
+
+	if (status == 0) {
+		usb_kill_urb (port->interrupt_in_urb);
+
+		dbg("%s - adding interrupt input", __FUNCTION__);
+		port->interrupt_in_urb->dev = serial->dev;
+		status = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
+		if (status)
+			dev_err(&serial->dev->dev,
+			        "%s - failed submitting interrupt urb,"
+				" error %d\n",
+			        __FUNCTION__, status);
+	}
+
+	if (status == 0) {
+		dbg("%s - starting session ...", __FUNCTION__);
+		garmin_data_p->state = STATE_ACTIVE;
+		status = garmin_write_bulk(port, GARMIN_START_SESSION_REQ,
+		                           sizeof(GARMIN_START_SESSION_REQ));
+
+		if (status >= 0) {
+
+			garmin_data_p->ignorePkts++;
+
+			/* not needed, but the win32 driver does it too ... */
+			status = garmin_write_bulk(port,
+						   GARMIN_START_SESSION_REQ2,
+			                           sizeof(GARMIN_START_SESSION_REQ2));
+			if (status >= 0) {
+				status = 0;
+				garmin_data_p->ignorePkts++;
+			}
+		}
+	}
+
+	return status;
+}
+
+
+
+
+
+static int garmin_open (struct usb_serial_port *port, struct file *filp)
+{
+	int status = 0;
+	struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
+
+	dbg("%s - port %d", __FUNCTION__, port->number);
+
+	/*
+	 * Force low_latency on so that our tty_push actually forces the data
+	 * through, otherwise it is scheduled, and with high data rates (like
+	 * with OHCI) data can get lost.
+	 */
+	if (port->tty)
+		port->tty->low_latency = 1;
+
+	garmin_data_p->mode  = initial_mode;
+	garmin_data_p->count = 0;
+	garmin_data_p->flags = 0;
+
+	/* shutdown any bulk reads that might be going on */
+	usb_kill_urb (port->write_urb);
+	usb_kill_urb (port->read_urb);
+
+	if (garmin_data_p->state == STATE_RESET) {
+		status = garmin_init_session(port);
+	}
+
+	garmin_data_p->state = STATE_ACTIVE;
+
+	return status;
+}
+
+
+static void garmin_close (struct usb_serial_port *port, struct file * filp)
+{
+	struct usb_serial *serial = port->serial;
+	struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
+
+	dbg("%s - port %d - mode=%d state=%d flags=0x%X", __FUNCTION__,
+		port->number, garmin_data_p->mode,
+		garmin_data_p->state, garmin_data_p->flags);
+
+	if (!serial)
+		return;
+
+	garmin_clear(garmin_data_p);
+
+	/* shutdown our urbs */
+	usb_kill_urb (port->read_urb);
+	usb_kill_urb (port->write_urb);
+
+	if (noResponseFromAppLayer(garmin_data_p) ||
+	    ((garmin_data_p->flags & CLEAR_HALT_REQUIRED) != 0)) {
+		process_resetdev_request(port);
+		garmin_data_p->state = STATE_RESET;
+	} else {
+		garmin_data_p->state = STATE_DISCONNECTED;
+	}
+}
+
+
+static void garmin_write_bulk_callback (struct urb *urb, struct pt_regs *regs)
+{
+	struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
+	struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
+
+	/* free up the transfer buffer, as usb_free_urb() does not do this */
+	kfree (urb->transfer_buffer);
+
+	dbg("%s - port %d", __FUNCTION__, port->number);
+
+	if (urb->status) {
+		dbg("%s - nonzero write bulk status received: %d",
+			__FUNCTION__, urb->status);
+		garmin_data_p->flags |= CLEAR_HALT_REQUIRED;
+	}
+
+	schedule_work(&port->work);
+}
+
+
+static int garmin_write_bulk (struct usb_serial_port *port,
+                              const unsigned char *buf, int count)
+{
+	struct usb_serial *serial = port->serial;
+	struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
+	struct urb *urb;
+	unsigned char *buffer;
+	int status;
+
+	dbg("%s - port %d, state %d", __FUNCTION__, port->number,
+		garmin_data_p->state);
+
+	garmin_data_p->flags &= ~FLAGS_DROP_DATA;
+
+	buffer = kmalloc (count, GFP_ATOMIC);
+	if (!buffer) {
+		dev_err(&port->dev, "out of memory\n");
+		return -ENOMEM;
+	}
+
+	urb = usb_alloc_urb(0, GFP_ATOMIC);
+	if (!urb) {
+		dev_err(&port->dev, "no more free urbs\n");
+		kfree (buffer);
+		return -ENOMEM;
+	}
+
+	memcpy (buffer, buf, count);
+
+	usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, buffer);
+
+	usb_fill_bulk_urb (urb, serial->dev,
+			 	usb_sndbulkpipe (serial->dev,
+				port->bulk_out_endpointAddress),
+				buffer, count,
+				garmin_write_bulk_callback, port);
+	urb->transfer_flags |= URB_ZERO_PACKET;
+
+	if (GARMIN_LAYERID_APPL == getLayerId(buffer)) {
+		garmin_data_p->flags |= FLAGS_APP_REQ_SEEN;
+		if (garmin_data_p->mode == MODE_GARMIN_SERIAL)  {
+			pkt_clear(garmin_data_p);
+			garmin_data_p->state = STATE_GSP_WAIT_DATA;
+		}
+	}
+
+	/* send it down the pipe */
+	status = usb_submit_urb(urb, GFP_ATOMIC);
+	if (status) {
+		dev_err(&port->dev,
+		        "%s - usb_submit_urb(write bulk) "
+		        "failed with status = %d\n",
+				__FUNCTION__, status);
+		count = status;
+	} else {
+
+		if (GARMIN_LAYERID_APPL == getLayerId(buffer)
+		    && (garmin_data_p->mode == MODE_GARMIN_SERIAL))  {
+
+			gsp_send_ack(garmin_data_p, buffer[4]);
+		}
+	}
+
+	/* we are done with this urb, so let the host driver
+	 * really free it when it is finished with it */
+	usb_free_urb (urb);
+
+	return count;
+}
+
+
+
+static int garmin_write (struct usb_serial_port *port,
+                         const unsigned char *buf, int count)
+{
+	int pktid, pktsiz, len;
+	struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
+	__le32 *privpkt = (__le32 *)garmin_data_p->privpkt;
+
+	usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, buf);
+
+	/* check for our private packets */
+	if (count >= GARMIN_PKTHDR_LENGTH) {
+
+		len = PRIVPKTSIZ;
+		if (count < len)
+			len = count;
+
+		memcpy(garmin_data_p->privpkt, buf, len);
+
+		pktsiz = getDataLength(garmin_data_p->privpkt);
+		pktid  = getPacketId(garmin_data_p->privpkt);
+
+		if (count == (GARMIN_PKTHDR_LENGTH+pktsiz)
+		    && GARMIN_LAYERID_PRIVATE == getLayerId(garmin_data_p->privpkt)) {
+
+			dbg("%s - processing private request %d",
+				__FUNCTION__, pktid);
+
+			// drop all unfinished transfers
+			garmin_clear(garmin_data_p);
+
+			switch(pktid) {
+
+			case PRIV_PKTID_SET_DEBUG:
+				if (pktsiz != 4)
+					return -EINVPKT;
+				debug = __le32_to_cpu(privpkt[3]);
+				dbg("%s - debug level set to 0x%X",
+					__FUNCTION__, debug);
+				break;
+
+			case PRIV_PKTID_SET_MODE:
+				if (pktsiz != 4)
+					return -EINVPKT;
+				garmin_data_p->mode = __le32_to_cpu(privpkt[3]);
+				dbg("%s - mode set to %d",
+					__FUNCTION__, garmin_data_p->mode);
+				break;
+
+			case PRIV_PKTID_INFO_REQ:
+				priv_status_resp(port);
+				break;
+
+			case PRIV_PKTID_RESET_REQ:
+				garmin_data_p->flags |= FLAGS_APP_REQ_SEEN;
+				break;
+
+			case PRIV_PKTID_SET_DEF_MODE:
+				if (pktsiz != 4)
+					return -EINVPKT;
+				initial_mode = __le32_to_cpu(privpkt[3]);
+				dbg("%s - initial_mode set to %d",
+					__FUNCTION__,
+					garmin_data_p->mode);
+				break;
+			}
+			return count;
+		}
+	}
+
+	if (garmin_data_p->mode == MODE_GARMIN_SERIAL) {
+		return gsp_receive(garmin_data_p, buf, count);
+	} else {	/* MODE_NATIVE */
+		return nat_receive(garmin_data_p, buf, count);
+	}
+}
+
+
+static int garmin_write_room (struct usb_serial_port *port)
+{
+	/*
+	 * Report back the bytes currently available in the output buffer.
+	 */
+	struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
+	return GPS_OUT_BUFSIZ-garmin_data_p->outsize;
+}
+
+
+static int garmin_chars_in_buffer (struct usb_serial_port *port)
+{
+	/*
+	 * Report back the number of bytes currently in our input buffer.
+         * Will this lock up the driver - the buffer contains an incomplete
+         * package which will not be written to the device until it
+         * has been completed ?
+         */
+	//struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
+	//return garmin_data_p->insize;
+	return 0;
+}
+
+
+static void garmin_read_process(struct garmin_data * garmin_data_p,
+				 unsigned char *data, unsigned data_length)
+{
+	if (garmin_data_p->flags & FLAGS_DROP_DATA) {
+		/* abort-transfer cmd is actice */
+		dbg("%s - pkt dropped", __FUNCTION__);
+	} else if (garmin_data_p->state != STATE_DISCONNECTED &&
+	           garmin_data_p->state != STATE_RESET ) {
+
+		/* remember any appl.layer packets, so we know
+		   if a reset is required or not when closing
+		   the device */
+		if (0 == memcmp(data, GARMIN_APP_LAYER_REPLY,
+		                sizeof(GARMIN_APP_LAYER_REPLY)))
+			garmin_data_p->flags |= FLAGS_APP_RESP_SEEN;
+
+		/* if throttling is active or postprecessing is required
+		   put the received data in th input queue, otherwise
+		   send it directly to the tty port */
+		if (garmin_data_p->flags & FLAGS_QUEUING) {
+			pkt_add(garmin_data_p, data, data_length);
+		} else if (garmin_data_p->mode == MODE_GARMIN_SERIAL) {
+			if (getLayerId(data) == GARMIN_LAYERID_APPL) {
+				pkt_add(garmin_data_p, data, data_length);
+			}
+		} else {
+			send_to_tty(garmin_data_p->port, data, data_length);
+		}
+	}
+}
+
+
+static void garmin_read_bulk_callback (struct urb *urb, struct pt_regs *regs)
+{
+	struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
+	struct usb_serial *serial =  port->serial;
+	struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
+	unsigned char *data = urb->transfer_buffer;
+	int status;
+
+	dbg("%s - port %d", __FUNCTION__, port->number);
+
+	if (!serial) {
+		dbg("%s - bad serial pointer, exiting", __FUNCTION__);
+		return;
+	}
+
+	if (urb->status) {
+		dbg("%s - nonzero read bulk status received: %d",
+			__FUNCTION__, urb->status);
+		return;
+	}
+
+	usb_serial_debug_data(debug, &port->dev, 
+				__FUNCTION__, urb->actual_length, data);
+
+	garmin_read_process(garmin_data_p, data, urb->actual_length);
+
+	/* Continue trying to read until nothing more is received  */
+	if (urb->actual_length > 0) {
+		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,
+			   garmin_read_bulk_callback, port);
+		status = usb_submit_urb(port->read_urb, GFP_ATOMIC);
+		if (status)
+			dev_err(&port->dev,
+				"%s - failed resubmitting read urb, error %d\n",
+			        __FUNCTION__, status);
+	}
+	return;
+}
+
+
+static void garmin_read_int_callback (struct urb *urb, struct pt_regs *regs)
+{
+	int status;
+	struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
+	struct usb_serial *serial = port->serial;
+	struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
+	unsigned char *data = urb->transfer_buffer;
+
+	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);
+		return;
+	}
+
+	usb_serial_debug_data(debug, &port->dev, __FUNCTION__, 
+				urb->actual_length, urb->transfer_buffer);
+
+	if (urb->actual_length == sizeof(GARMIN_BULK_IN_AVAIL_REPLY) &&
+	    0 == memcmp(data, GARMIN_BULK_IN_AVAIL_REPLY,
+		        sizeof(GARMIN_BULK_IN_AVAIL_REPLY))) {
+
+		dbg("%s - bulk data available.", __FUNCTION__);
+
+		/* bulk data available */
+		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,
+				garmin_read_bulk_callback, port);
+		status = usb_submit_urb(port->read_urb, GFP_KERNEL);
+		if (status) {
+			dev_err(&port->dev,
+				"%s - failed submitting read urb, error %d\n",
+			__FUNCTION__, status);
+		}
+
+	} else if (urb->actual_length == (4+sizeof(GARMIN_START_SESSION_REPLY))
+			 && 0 == memcmp(data, GARMIN_START_SESSION_REPLY,
+			                sizeof(GARMIN_START_SESSION_REPLY))) {
+
+		garmin_data_p->flags |= FLAGS_SESSION_REPLY1_SEEN;
+
+		/* save the serial number */
+		garmin_data_p->serial_num 
+			= __le32_to_cpup((__le32*)(data+GARMIN_PKTHDR_LENGTH));
+
+		dbg("%s - start-of-session reply seen - serial %u.",
+			__FUNCTION__, garmin_data_p->serial_num);
+	}
+
+	if (garmin_data_p->ignorePkts) {
+		/* this reply belongs to a request generated by the driver,
+		   ignore it. */
+		dbg("%s - pkt ignored (%d)",
+			__FUNCTION__, garmin_data_p->ignorePkts);
+		garmin_data_p->ignorePkts--;
+	} else {
+		garmin_read_process(garmin_data_p, data, urb->actual_length);
+	}
+
+	port->interrupt_in_urb->dev = port->serial->dev;
+	status = usb_submit_urb (urb, GFP_ATOMIC);
+	if (status)
+		dev_err(&urb->dev->dev,
+			"%s - Error %d submitting interrupt urb\n",
+			__FUNCTION__, status);
+}
+
+
+/*
+ * Sends the next queued packt to the tty port (garmin native mode only)
+ * and then sets a timer to call itself again until all queued data
+ * is sent.
+ */
+static int garmin_flush_queue(struct garmin_data * garmin_data_p)
+{
+	struct garmin_packet *pkt;
+
+	if ((garmin_data_p->flags & FLAGS_THROTTLED) == 0) {
+		pkt = pkt_pop(garmin_data_p);
+		if (pkt != 0) {
+
+			send_to_tty(garmin_data_p->port, pkt->data, pkt->size);
+			kfree(pkt);
+			mod_timer(&garmin_data_p->timer, (1)+jiffies);
+
+		} else {
+			garmin_data_p->flags &= ~FLAGS_QUEUING;
+		}
+	}
+	return 0;
+}
+
+
+static void garmin_throttle (struct usb_serial_port *port)
+{
+	struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
+
+	dbg("%s - port %d", __FUNCTION__, port->number);
+	/* set flag, data received will be put into a queue
+	   for later processing */
+	garmin_data_p->flags |= FLAGS_QUEUING|FLAGS_THROTTLED;
+}
+
+
+static void garmin_unthrottle (struct usb_serial_port *port)
+{
+	struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
+
+	dbg("%s - port %d", __FUNCTION__, port->number);
+	garmin_data_p->flags &= ~FLAGS_THROTTLED;
+
+	/* in native mode send queued data to tty, in
+	   serial mode nothing needs to be done here */
+	if (garmin_data_p->mode == MODE_NATIVE)
+		garmin_flush_queue(garmin_data_p);
+}
+
+
+
+/*
+ * The timer is currently only used to send queued packets to
+ * the tty in cases where the protocol provides no own handshaking
+ * to initiate the transfer.
+ */
+static void timeout_handler(unsigned long data)
+{
+	struct garmin_data *garmin_data_p = (struct garmin_data *) data;
+
+	/* send the next queued packet to the tty port */
+	if (garmin_data_p->mode == MODE_NATIVE)
+		if (garmin_data_p->flags & FLAGS_QUEUING)
+			garmin_flush_queue(garmin_data_p);
+}
+
+
+
+static int garmin_attach (struct usb_serial *serial)
+{
+	int status = 0;
+	struct usb_serial_port *port = serial->port[0];
+	struct garmin_data * garmin_data_p = NULL;
+
+	dbg("%s", __FUNCTION__);
+
+	garmin_data_p = kmalloc (sizeof(struct garmin_data), GFP_KERNEL);
+	if (garmin_data_p == NULL) {
+		dev_err(&port->dev, "%s - Out of memory\n", __FUNCTION__);
+		return -ENOMEM;
+	}
+	memset (garmin_data_p, 0, sizeof(struct garmin_data));
+	init_timer(&garmin_data_p->timer);
+	spin_lock_init(&garmin_data_p->lock);
+	INIT_LIST_HEAD(&garmin_data_p->pktlist);
+	//garmin_data_p->timer.expires = jiffies + session_timeout;
+	garmin_data_p->timer.data = (unsigned long)garmin_data_p;
+	garmin_data_p->timer.function = timeout_handler;
+	garmin_data_p->port = port;
+	garmin_data_p->state = 0;
+	garmin_data_p->count = 0;
+	usb_set_serial_port_data(port, garmin_data_p);
+
+	status = garmin_init_session(port);
+
+	return status;
+}
+
+
+static void garmin_shutdown (struct usb_serial *serial)
+{
+	struct usb_serial_port *port = serial->port[0];
+	struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
+
+	dbg("%s", __FUNCTION__);
+
+	usb_kill_urb (port->interrupt_in_urb);
+	del_timer_sync(&garmin_data_p->timer);
+	kfree (garmin_data_p);
+	usb_set_serial_port_data(port, NULL);
+}
+
+
+
+
+
+
+
+/* All of the device info needed */
+static struct usb_serial_device_type garmin_device = {
+	.owner               = THIS_MODULE,
+	.name                = "Garmin GPS usb/tty",
+	.short_name          = "garmin_gps",
+	.id_table            = id_table,
+	.num_interrupt_in    = 1,
+	.num_bulk_in         = 1,
+	.num_bulk_out        = 1,
+	.num_ports           = 1,
+	.open                = garmin_open,
+	.close               = garmin_close,
+	.throttle            = garmin_throttle,
+	.unthrottle          = garmin_unthrottle,
+	.attach              = garmin_attach,
+	.shutdown            = garmin_shutdown,
+	.write               = garmin_write,
+	.write_room          = garmin_write_room,
+	.chars_in_buffer     = garmin_chars_in_buffer,
+	.write_bulk_callback = garmin_write_bulk_callback,
+	.read_bulk_callback  = garmin_read_bulk_callback,
+	.read_int_callback   = garmin_read_int_callback,
+};
+
+
+static int __init garmin_init (void)
+{
+	int retval;
+
+	retval = usb_serial_register(&garmin_device);
+	if (retval)
+		goto failed_garmin_register;
+	retval = usb_register(&garmin_driver);
+	if (retval)
+		goto failed_usb_register;
+	info(DRIVER_DESC " " DRIVER_VERSION);
+
+	return 0;
+failed_usb_register:
+	usb_serial_deregister(&garmin_device);
+failed_garmin_register:
+	return retval;
+}
+
+
+static void __exit garmin_exit (void)
+{
+	usb_deregister (&garmin_driver);
+	usb_serial_deregister (&garmin_device);
+}
+
+
+
+
+module_init(garmin_init);
+module_exit(garmin_exit);
+
+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
+MODULE_LICENSE("GPL");
+
+module_param(debug, bool, S_IWUSR | S_IRUGO);
+MODULE_PARM_DESC(debug, "Debug enabled or not");
+module_param(initial_mode, int, S_IRUGO);
+MODULE_PARM_DESC(initial_mode, "Initial mode");
+
diff -Nru a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c
--- a/drivers/usb/serial/io_edgeport.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/usb/serial/io_edgeport.c	2005-01-10 20:11:16 -08:00
@@ -659,7 +659,7 @@
 
 	memset (product_info, 0, sizeof(struct edgeport_product_info));
 
-	product_info->ProductId		= (__u16)(edge_serial->serial->dev->descriptor.idProduct & ~ION_DEVICE_ID_80251_NETCHIP);
+	product_info->ProductId		= (__u16)(le16_to_cpu(edge_serial->serial->dev->descriptor.idProduct) & ~ION_DEVICE_ID_80251_NETCHIP);
 	product_info->NumPorts		= edge_serial->manuf_descriptor.NumPorts;
 	product_info->ProdInfoVer	= 0;
 
@@ -675,7 +675,7 @@
 	memcpy(product_info->ManufactureDescDate, edge_serial->manuf_descriptor.DescDate, sizeof(edge_serial->manuf_descriptor.DescDate));
 
 	// check if this is 2nd generation hardware
-	if (edge_serial->serial->dev->descriptor.idProduct & ION_DEVICE_ID_80251_NETCHIP) {
+	if (le16_to_cpu(edge_serial->serial->dev->descriptor.idProduct) & ION_DEVICE_ID_80251_NETCHIP) {
 		product_info->FirmwareMajorVersion	= OperationalCodeImageVersion_GEN2.MajorVersion;
 		product_info->FirmwareMinorVersion	= OperationalCodeImageVersion_GEN2.MinorVersion;
 		product_info->FirmwareBuildNumber	= cpu_to_le16(OperationalCodeImageVersion_GEN2.BuildNumber);
diff -Nru a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c
--- a/drivers/usb/serial/io_ti.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/usb/serial/io_ti.c	2005-01-10 20:11:22 -08:00
@@ -1342,9 +1342,9 @@
 	if (status)
 		return status;
 
-	if (serial->serial->dev->descriptor.idVendor != USB_VENDOR_ID_ION) {
+	if (le16_to_cpu(serial->serial->dev->descriptor.idVendor) != USB_VENDOR_ID_ION) {
 		dbg ("%s - VID = 0x%x", __FUNCTION__,
-		     serial->serial->dev->descriptor.idVendor);
+		     le16_to_cpu(serial->serial->dev->descriptor.idVendor));
 		serial->TI_I2C_Type = DTK_ADDR_SPACE_I2C_TYPE_II;
 		goto StayInBootMode;
 	}
diff -Nru a/drivers/usb/serial/keyspan.c b/drivers/usb/serial/keyspan.c
--- a/drivers/usb/serial/keyspan.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/usb/serial/keyspan.c	2005-01-10 20:11:16 -08:00
@@ -1174,16 +1174,16 @@
 	char				*fw_name;
 
 	dbg("Keyspan startup version %04x product %04x",
-	    serial->dev->descriptor.bcdDevice,
-	    serial->dev->descriptor.idProduct); 
+	    le16_to_cpu(serial->dev->descriptor.bcdDevice),
+	    le16_to_cpu(serial->dev->descriptor.idProduct));
 	
-	if ((serial->dev->descriptor.bcdDevice & 0x8000) != 0x8000) {
+	if ((le16_to_cpu(serial->dev->descriptor.bcdDevice) & 0x8000) != 0x8000) {
 		dbg("Firmware already loaded.  Quitting.");
 		return(1);
 	}
 
 		/* Select firmware image on the basis of idProduct */
-	switch (serial->dev->descriptor.idProduct) {
+	switch (le16_to_cpu(serial->dev->descriptor.idProduct)) {
 	case keyspan_usa28_pre_product_id:
 		record = &keyspan_usa28_firmware[0];
 		fw_name = "USA28";
@@ -2248,10 +2248,10 @@
 	dbg("%s", __FUNCTION__);
 
 	for (i = 0; (d_details = keyspan_devices[i]) != NULL; ++i)
-		if (d_details->product_id == serial->dev->descriptor.idProduct)
+		if (d_details->product_id == le16_to_cpu(serial->dev->descriptor.idProduct))
 			break;
 	if (d_details == NULL) {
-		dev_err(&serial->dev->dev, "%s - unknown product id %x\n", __FUNCTION__, serial->dev->descriptor.idProduct);
+		dev_err(&serial->dev->dev, "%s - unknown product id %x\n", __FUNCTION__, le16_to_cpu(serial->dev->descriptor.idProduct));
 		return 1;
 	}
 
diff -Nru a/drivers/usb/serial/keyspan_pda.c b/drivers/usb/serial/keyspan_pda.c
--- a/drivers/usb/serial/keyspan_pda.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/usb/serial/keyspan_pda.c	2005-01-10 20:11:20 -08:00
@@ -713,12 +713,12 @@
 	response = ezusb_set_reset(serial, 1);
 
 #ifdef KEYSPAN
-	if (serial->dev->descriptor.idVendor == KEYSPAN_VENDOR_ID)
+	if (le16_to_cpu(serial->dev->descriptor.idVendor) == KEYSPAN_VENDOR_ID)
 		record = &keyspan_pda_firmware[0];
 #endif
 #ifdef XIRCOM
-	if ((serial->dev->descriptor.idVendor == XIRCOM_VENDOR_ID) ||
-	    (serial->dev->descriptor.idVendor == ENTREGRA_VENDOR_ID))
+	if ((le16_to_cpu(serial->dev->descriptor.idVendor) == XIRCOM_VENDOR_ID) ||
+	    (le16_to_cpu(serial->dev->descriptor.idVendor) == ENTREGRA_VENDOR_ID))
 		record = &xircom_pgs_firmware[0];
 #endif
 	if (record == NULL) {
diff -Nru a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c
--- a/drivers/usb/serial/kobil_sct.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/usb/serial/kobil_sct.c	2005-01-10 20:11:22 -08:00
@@ -155,7 +155,7 @@
 
 	priv->filled = 0;
 	priv->cur_pos = 0;
-	priv->device_type = serial->product;
+	priv->device_type = le16_to_cpu(serial->dev->descriptor.idProduct);
 	priv->line_state = 0;
 
 	switch (priv->device_type){
diff -Nru a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c
--- a/drivers/usb/serial/mct_u232.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/usb/serial/mct_u232.c	2005-01-10 20:11:20 -08:00
@@ -82,21 +82,10 @@
 /*
  * Version Information
  */
-#define DRIVER_VERSION "v1.2"
+#define DRIVER_VERSION "z2.0"		/* Linux in-kernel version */
 #define DRIVER_AUTHOR "Wolfgang Grandegger <wolfgang@ces.ch>"
 #define DRIVER_DESC "Magic Control Technology USB-RS232 converter driver"
 
-/*
- * Some not properly written applications do not handle the return code of
- * write() correctly. This can result in character losses. A work-a-round
- * can be compiled in with the following definition. This work-a-round
- * should _NOT_ be part of an 'official' kernel release, of course!
- */
-#undef FIX_WRITE_RETURN_CODE_PROBLEM
-#ifdef FIX_WRITE_RETURN_CODE_PROBLEM
-static int write_blocking; /* disabled by default */
-#endif
-
 static int debug;
 
 /*
@@ -108,12 +97,6 @@
 					  struct file *filp);
 static void mct_u232_close	         (struct usb_serial_port *port,
 					  struct file *filp);
-#ifdef FIX_WRITE_RETURN_CODE_PROBLEM
-static int  mct_u232_write	         (struct usb_serial_port *port,
-					  const unsigned char *buf,
-					  int count);
-static void mct_u232_write_bulk_callback (struct urb *urb, struct pt_regs *regs);
-#endif
 static void mct_u232_read_int_callback   (struct urb *urb, struct pt_regs *regs);
 static void mct_u232_set_termios         (struct usb_serial_port *port,
 					  struct termios * old);
@@ -151,7 +134,7 @@
 
 static struct usb_serial_device_type mct_u232_device = {
 	.owner =	     THIS_MODULE,
-	.name =		     "Magic Control Technology USB-RS232",
+	.name =		     "MCT U232",
 	.short_name =	     "mct_u232",
 	.id_table =	     id_table_combined,
 	.num_interrupt_in =  2,
@@ -160,10 +143,6 @@
 	.num_ports =	     1,
 	.open =		     mct_u232_open,
 	.close =	     mct_u232_close,
-#ifdef FIX_WRITE_RETURN_CODE_PROBLEM
-	.write =	     mct_u232_write,
-	.write_bulk_callback = mct_u232_write_bulk_callback,
-#endif
 	.read_int_callback = mct_u232_read_int_callback,
 	.ioctl =	     mct_u232_ioctl,
 	.set_termios =	     mct_u232_set_termios,
@@ -194,9 +173,10 @@
  * we do not know how to support. We ignore them for the moment.
  * XXX Rate-limit the error message, it's user triggerable.
  */
-static int mct_u232_calculate_baud_rate(struct usb_serial *serial, int value) {
-	if (serial->dev->descriptor.idProduct == MCT_U232_SITECOM_PID
-	  || serial->dev->descriptor.idProduct == MCT_U232_BELKIN_F5U109_PID) {
+static int mct_u232_calculate_baud_rate(struct usb_serial *serial, int value)
+{
+	if (le16_to_cpu(serial->dev->descriptor.idProduct) == MCT_U232_SITECOM_PID
+	  || le16_to_cpu(serial->dev->descriptor.idProduct) == MCT_U232_BELKIN_F5U109_PID) {
 		switch (value) {
 		case    B300: return 0x01;
 		case    B600: return 0x02; /* this one not tested */
@@ -366,15 +346,11 @@
 	struct mct_u232_private *priv;
 	struct usb_serial_port *port, *rport;
 
-	/* allocate the private data structure */
 	priv = kmalloc(sizeof(struct mct_u232_private), GFP_KERNEL);
 	if (!priv)
 		return -ENOMEM;
-	/* set initial values for control structures */
+	memset(priv, 0, sizeof(struct mct_u232_private));
 	spin_lock_init(&priv->lock);
-	priv->control_state = 0;
-	priv->last_lsr = 0;
-	priv->last_msr = 0;
 	usb_set_serial_port_data(serial->port[0], priv);
 
 	init_waitqueue_head(&serial->port[0]->write_wait);
@@ -404,8 +380,10 @@
 	for (i=0; i < serial->num_ports; ++i) {
 		/* My special items, the standard routines free my urbs */
 		priv = usb_get_serial_port_data(serial->port[i]);
-		if (priv)
+		if (priv) {
+			usb_set_serial_port_data(serial->port[i], NULL);
 			kfree(priv);
+		}
 	}
 } /* mct_u232_shutdown */
 
@@ -426,7 +404,7 @@
 	 * it seems to be able to accept only 16 bytes (and that's what
 	 * SniffUSB says too...)
 	 */
-	if (serial->dev->descriptor.idProduct == MCT_U232_SITECOM_PID)
+	if (le16_to_cpu(serial->dev->descriptor.idProduct) == MCT_U232_SITECOM_PID)
 		port->bulk_out_size = 16;
 
 	/* Do a defined restart: the normal serial device seems to 
@@ -459,14 +437,16 @@
 	port->read_urb->dev = port->serial->dev;
 	retval = usb_submit_urb(port->read_urb, GFP_KERNEL);
 	if (retval) {
-		err("usb_submit_urb(read bulk) failed");
+		err("usb_submit_urb(read bulk) failed pipe 0x%x err %d",
+		    port->read_urb->pipe, retval);
 		goto exit;
 	}
 
 	port->interrupt_in_urb->dev = port->serial->dev;
 	retval = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
 	if (retval)
-		err(" usb_submit_urb(read int) failed");
+		err(" usb_submit_urb(read int) failed pipe 0x%x err %d",
+		    port->interrupt_in_urb->pipe, retval);
 
 exit:
 	return 0;
@@ -486,101 +466,6 @@
 } /* mct_u232_close */
 
 
-#ifdef FIX_WRITE_RETURN_CODE_PROBLEM
-/* The generic routines work fine otherwise */
-
-static int mct_u232_write (struct usb_serial_port *port,
-			   const unsigned char *buf, int count)
-{
-	struct usb_serial *serial = port->serial;
-	int result, bytes_sent, size;
-
-	dbg("%s - port %d", __FUNCTION__, port->number);
-
-	if (count == 0) {
-		dbg("%s - write request of 0 bytes", __FUNCTION__);
-		return (0);
-	}
-
-	/* only do something if we have a bulk out endpoint */
-	if (!serial->num_bulk_out)
-		return(0);
-	
-	/* another write is still pending? */
-	if (port->write_urb->status == -EINPROGRESS) {
-		dbg("%s - already writing", __FUNCTION__);
-		return (0);
-	}
-		
-	bytes_sent = 0;
-	while (count > 0) {
-		size = (count > port->bulk_out_size) ? port->bulk_out_size : count;
-		
-		usb_serial_debug_data(debug, &port->dev, __FUNCTION__, size, buf);
-		
-		memcpy (port->write_urb->transfer_buffer, buf, size);
-		
-		/* set up our urb */
-		usb_fill_bulk_urb(port->write_urb, serial->dev,
-			      usb_sndbulkpipe(serial->dev,
-					      port->bulk_out_endpointAddress),
-			      port->write_urb->transfer_buffer, size,
-			      ((serial->type->write_bulk_callback) ?
-			       serial->type->write_bulk_callback :
-			       mct_u232_write_bulk_callback),
-			      port);
-		
-		/* send the data out the bulk port */
-		result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
-		if (result) {
-			err("%s - failed submitting write urb, error %d", __FUNCTION__, result);
-			return result;
-		}
-
-		bytes_sent += size;
-		if (write_blocking)
-			interruptible_sleep_on(&port->write_wait);
-		else
-			break;
-
-		buf += size;
-		count -= size;
-	}
-	
-	return bytes_sent;
-} /* mct_u232_write */
-
-static void mct_u232_write_bulk_callback (struct urb *urb, struct pt_regs *regs)
-{
-	struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
-	struct usb_serial *serial = port->serial;
-       	struct tty_struct *tty = port->tty;
-
-	dbg("%s - port %d", __FUNCTION__, port->number);
-	
-	if (!serial) {
-		dbg("%s - bad serial pointer, exiting", __FUNCTION__);
-		return;
-	}
-
-	if (urb->status) {
-		dbg("%s - nonzero write bulk status received: %d", __FUNCTION__,
-		    urb->status);
-		return;
-	}
-
-	if (write_blocking) {
-		wake_up_interruptible(&port->write_wait);
-		tty_wakeup(tty);
-	} else {
-		/* from generic_write_bulk_callback */
-		schedule_work(&port->work);
-	}
-
-	return;
-} /* mct_u232_write_bulk_callback */
-#endif
-
 static void mct_u232_read_int_callback (struct urb *urb, struct pt_regs *regs)
 {
 	struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
@@ -591,8 +476,6 @@
 	int status;
 	unsigned long flags;
 
-        dbg("%s - port %d", __FUNCTION__, port->number);
-
 	switch (urb->status) {
 	case 0:
 		/* success */
@@ -612,7 +495,8 @@
 		dbg("%s - bad serial pointer, exiting", __FUNCTION__);
 		return;
 	}
-	
+
+        dbg("%s - port %d", __FUNCTION__, port->number);
 	usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data);
 
 	/*
@@ -893,12 +777,5 @@
 MODULE_DESCRIPTION( DRIVER_DESC );
 MODULE_LICENSE("GPL");
 
-#ifdef FIX_WRITE_RETURN_CODE_PROBLEM
-module_param(write_blocking, int, 0);
-MODULE_PARM_DESC(write_blocking, 
-		 "The write function will block to write out all data");
-#endif
-
 module_param(debug, bool, S_IRUGO | S_IWUSR);
 MODULE_PARM_DESC(debug, "Debug enabled or not");
-
diff -Nru a/drivers/usb/serial/ti_fw_3410.h b/drivers/usb/serial/ti_fw_3410.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/usb/serial/ti_fw_3410.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,885 @@
+/* vi: ts=8 sw=8
+ *
+ * TI 3410 USB Serial Driver Firmware Header
+ *
+ * Copyright (C) 2004 Texas Instruments
+ *
+ * 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 _TI_FW_3410_H_
+#define _TI_FW_3410_H_
+
+/* firmware 9/10/04 FW3410_Special_StartWdogOnStartPort */
+
+static unsigned char ti_fw_3410[] = {
+0xC2, 0x35,	/* firmware image length excluding header, little endian */
+0x00, 		/* placeholder for checksum */
+
+0x02,0x00,0x1e,0x02,0x1a,0xdb,0xff,0xff,0xff,0xff,0xff,0x02,0x32,0xcb,0xff,0xff,
+0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x02,0x33,0x76,0x75,0x81,
+0xce,0x90,0xfd,0xe8,0x85,0x83,0xa0,0x12,0x34,0xea,0xec,0x4d,0x60,0x6a,0x78,0xab,
+0x80,0x03,0x76,0x00,0x18,0xb8,0x9c,0xfa,0x78,0x7f,0x80,0x03,0x76,0x00,0x18,0xb8,
+0x65,0xfa,0x78,0x20,0x80,0x03,0x76,0x00,0x18,0xb8,0x20,0xfa,0x90,0xfd,0xdd,0xae,
+0x83,0xaf,0x82,0x90,0xfb,0xf8,0x12,0x00,0xa1,0x60,0x05,0xe4,0xf0,0xa3,0x80,0xf6,
+0x90,0xfd,0xe8,0xa8,0x82,0x90,0xfd,0xe8,0xa9,0x82,0xe8,0xc3,0x99,0x50,0x05,0x76,
+0x00,0x08,0x80,0xf6,0x90,0x00,0xff,0x12,0x00,0xaa,0x90,0x01,0x03,0x12,0x00,0xaa,
+0x90,0x01,0x07,0x12,0x00,0xaa,0x90,0x01,0x0b,0x12,0x00,0xc8,0x90,0x01,0x11,0x12,
+0x00,0xc8,0x90,0x01,0x17,0x12,0x00,0xc8,0x75,0xd0,0x00,0x12,0x33,0xc8,0x02,0x01,
+0x1d,0xef,0x65,0x82,0x70,0x03,0xee,0x65,0x83,0x22,0xe4,0x93,0xf8,0x74,0x01,0x93,
+0xf9,0x74,0x02,0x93,0xfe,0x74,0x03,0x93,0xf5,0x82,0x8e,0x83,0xe8,0x69,0x70,0x01,
+0x22,0xe4,0x93,0xf6,0xa3,0x08,0x80,0xf4,0xe4,0x93,0xfc,0x74,0x01,0x93,0xfd,0x74,
+0x02,0x93,0xfe,0x74,0x03,0x93,0xff,0x74,0x04,0x93,0xf8,0x74,0x05,0x93,0xf5,0x82,
+0x88,0x83,0x12,0x00,0xa1,0x70,0x01,0x22,0xe4,0x93,0xa3,0xa8,0x83,0xa9,0x82,0x8c,
+0x83,0x8d,0x82,0xf0,0xa3,0xac,0x83,0xad,0x82,0x88,0x83,0x89,0x82,0x80,0xe3,0x21,
+0x21,0x04,0x92,0x80,0x80,0x04,0x92,0xac,0xae,0x04,0x92,0xfd,0xe8,0x04,0x94,0x04,
+0x94,0xfb,0xf3,0x04,0x99,0x04,0x94,0xfb,0xf3,0x04,0xf9,0x04,0xf9,0x80,0xfe,0xd0,
+0xf0,0x30,0xf0,0x09,0x20,0xf3,0x03,0xf6,0x80,0x10,0xf7,0x80,0x0d,0x30,0xf1,0x09,
+0x20,0xf3,0x03,0xf2,0x80,0x04,0xf3,0x80,0x01,0xf0,0x20,0xf4,0x04,0xfc,0xd0,0xe0,
+0xcc,0x22,0xcc,0xc0,0xe0,0x12,0x01,0x5a,0x02,0x01,0x4b,0xbc,0x00,0x05,0xd0,0xf0,
+0xac,0xf0,0x22,0xc3,0x13,0xdc,0xfc,0x02,0x01,0x21,0xbf,0x00,0x09,0xed,0x25,0x82,
+0x75,0xf0,0x01,0xf8,0xe6,0x22,0xbf,0x01,0x0f,0xed,0x25,0x82,0xf5,0x82,0xee,0x35,
+0x83,0xf5,0x83,0x75,0xf0,0x04,0xe0,0x22,0xed,0x25,0x82,0x75,0xf0,0x02,0xf8,0xe2,
+0x22,0xd0,0x83,0xd0,0x82,0xf5,0xf0,0xc3,0xe4,0x93,0xa3,0xc5,0xf0,0x95,0xf0,0xc0,
+0xe0,0xc3,0xd0,0xf0,0xe4,0x93,0xa3,0x95,0xf0,0x40,0x12,0xa3,0xa3,0xc3,0xe5,0xf0,
+0x33,0x50,0x02,0x05,0x83,0x25,0x82,0xf5,0x82,0x50,0x02,0x05,0x83,0x74,0x01,0x93,
+0xc0,0xe0,0xe4,0x93,0xc0,0xe0,0x22,0xd0,0x83,0xd0,0x82,0xf5,0xf0,0xe4,0x93,0x70,
+0x09,0x74,0x01,0x93,0x70,0x04,0xa3,0xa3,0x80,0x0c,0x74,0x02,0x93,0x65,0xf0,0x60,
+0x05,0xa3,0xa3,0xa3,0x80,0xe7,0x74,0x01,0x93,0xc0,0xe0,0xe4,0x93,0xc0,0xe0,0x22,
+0x12,0x02,0x5b,0x02,0x01,0xf2,0x12,0x02,0xaf,0x02,0x01,0xf2,0x12,0x02,0xd3,0x02,
+0x01,0xf2,0x30,0xe0,0x07,0x20,0xe3,0x02,0xe6,0x22,0xe7,0x22,0x30,0xe1,0x07,0x20,
+0xe3,0x02,0xe2,0x22,0xe3,0x22,0x30,0xe2,0x02,0xe0,0x22,0xe4,0x93,0x22,0x12,0x02,
+0xd3,0x02,0x02,0x1a,0x12,0x02,0xaf,0x02,0x02,0x1a,0xab,0xf0,0x12,0x02,0x24,0xcb,
+0xc5,0xf0,0xcb,0x22,0x30,0xe0,0x10,0x20,0xe3,0x06,0xe6,0xf5,0xf0,0x08,0xe6,0x22,
+0xe7,0xf5,0xf0,0x09,0xe7,0x19,0x22,0x30,0xe1,0x10,0x20,0xe3,0x06,0xe2,0xf5,0xf0,
+0x08,0xe2,0x22,0xe3,0xf5,0xf0,0x09,0xe3,0x19,0x22,0x30,0xe2,0x06,0xe0,0xf5,0xf0,
+0xa3,0xe0,0x22,0xe4,0x93,0xf5,0xf0,0x74,0x01,0x93,0x22,0xbb,0x00,0x03,0x74,0x09,
+0x22,0xbb,0x01,0x07,0x89,0x82,0x8a,0x83,0x74,0x04,0x22,0xbb,0x02,0x07,0x89,0x82,
+0x8a,0x83,0x74,0x10,0x22,0x74,0x0a,0x22,0x02,0x02,0x7b,0xbb,0x00,0x07,0xe9,0x25,
+0x82,0xf8,0x74,0x01,0x22,0xbb,0x01,0x0d,0xe9,0x25,0x82,0xf5,0x82,0xea,0x35,0x83,
+0xf5,0x83,0x74,0x04,0x22,0xbb,0x02,0x0d,0xe9,0x25,0x82,0xf5,0x82,0xea,0x35,0x83,
+0xf5,0x83,0x74,0x10,0x22,0xe9,0x25,0x82,0xf8,0x74,0x02,0x22,0x02,0x02,0xaf,0xbf,
+0x00,0x05,0xed,0xf8,0x74,0x01,0x22,0xbf,0x01,0x07,0x8d,0x82,0x8e,0x83,0x74,0x04,
+0x22,0xbf,0x02,0x07,0x8d,0x82,0x8e,0x83,0x74,0x10,0x22,0xed,0xf8,0x74,0x02,0x22,
+0x02,0x02,0xd3,0xbf,0x00,0x07,0xed,0x25,0x82,0xf8,0x74,0x01,0x22,0xbf,0x01,0x0d,
+0xed,0x25,0x82,0xf5,0x82,0xee,0x35,0x83,0xf5,0x83,0x74,0x04,0x22,0xbf,0x02,0x0d,
+0xed,0x25,0x82,0xf5,0x82,0xee,0x35,0x83,0xf5,0x83,0x74,0x10,0x22,0xed,0x25,0x82,
+0xf8,0x74,0x02,0x22,0x02,0x03,0x07,0xc0,0xe0,0x12,0x02,0x5b,0x02,0x03,0x1f,0xc0,
+0xe0,0x12,0x02,0xaf,0x02,0x03,0x1f,0xc0,0xe0,0x12,0x02,0xd3,0x02,0x03,0x1f,0x30,
+0xe0,0x0b,0x20,0xe3,0x04,0xd0,0xe0,0xf6,0x22,0xd0,0xe0,0xf7,0x22,0x30,0xe1,0x0b,
+0x20,0xe3,0x04,0xd0,0xe0,0xf2,0x22,0xd0,0xe0,0xf3,0x22,0xd0,0xe0,0xf0,0x22,0xc9,
+0xcd,0xc9,0xca,0xce,0xca,0xcb,0xcf,0xcb,0x12,0x03,0x52,0xed,0xf9,0xee,0xfa,0xef,
+0xfb,0x22,0xbb,0x00,0x2f,0xbf,0x00,0x0a,0xfa,0xed,0xf8,0xe7,0xf6,0x08,0x09,0xda,
+0xfa,0x22,0xbf,0x01,0x12,0x8d,0x82,0x8e,0x83,0xf8,0x02,0x03,0x6f,0x09,0xa3,0xe7,
+0xf0,0xd8,0xfa,0x22,0x02,0x03,0x7a,0xfa,0xed,0xf8,0xe7,0xf2,0x08,0x09,0xda,0xfa,
+0x22,0x02,0x03,0x84,0xbb,0x01,0x4d,0xbf,0x00,0x14,0x89,0x82,0x8a,0x83,0xf9,0xed,
+0xf8,0x02,0x03,0x96,0x08,0xa3,0xe0,0xf6,0xd9,0xfa,0x22,0x02,0x03,0xa7,0xbf,0x01,
+0x22,0x8d,0x82,0x8e,0x83,0xfb,0x08,0xc9,0xc5,0x82,0xc9,0xca,0xc5,0x83,0xca,0xe0,
+0xa3,0xc9,0xc5,0x82,0xc9,0xca,0xc5,0x83,0xca,0xf0,0xa3,0xdb,0xea,0xd8,0xe8,0x22,
+0x02,0x03,0xca,0x8d,0x82,0x8e,0x83,0xf9,0xed,0xf8,0xe0,0xf2,0x08,0xa3,0xd9,0xfa,
+0x22,0x02,0x03,0xd4,0xbb,0x02,0x4d,0xbf,0x00,0x12,0x89,0x82,0x8a,0x83,0xf9,0xed,
+0xf8,0x02,0x03,0xe6,0x08,0xa3,0xe4,0x93,0xf6,0xd9,0xf9,0x22,0xbf,0x01,0x23,0x8d,
+0x82,0x8e,0x83,0xfb,0x08,0xc9,0xc5,0x82,0xc9,0xca,0xc5,0x83,0xca,0xe4,0x93,0xa3,
+0xc9,0xc5,0x82,0xc9,0xca,0xc5,0x83,0xca,0xf0,0xa3,0xdb,0xe9,0xd8,0xe7,0x22,0x02,
+0x04,0x19,0x89,0x82,0x8a,0x83,0xf9,0xed,0xf8,0xe4,0x93,0xf2,0x08,0xa3,0xd9,0xf9,
+0x22,0x02,0x04,0x2a,0xbf,0x00,0x0d,0xfa,0xed,0xf8,0xe3,0xf6,0x08,0x09,0xda,0xfa,
+0x22,0x02,0x04,0x34,0xbf,0x01,0x12,0x8d,0x82,0x8e,0x83,0xf8,0x02,0x04,0x41,0x09,
+0xa3,0xe3,0xf0,0xd8,0xfa,0x22,0x02,0x04,0x4c,0xfa,0xed,0xf8,0xe3,0xf2,0x08,0x09,
+0xda,0xfa,0x22,0x02,0x04,0x56,0xe6,0xfb,0x08,0xe6,0xfa,0x08,0xe6,0xf9,0x04,0xf6,
+0x18,0x70,0x01,0x06,0x22,0xe6,0xff,0x08,0xe6,0xfe,0x08,0xe6,0xfd,0x22,0xef,0xf0,
+0xa3,0xee,0xf0,0xa3,0xed,0xf0,0x22,0xeb,0xf0,0xa3,0xea,0xf0,0xa3,0xe9,0xf0,0x22,
+0xe0,0xff,0xa3,0xe0,0xfe,0xa3,0xe0,0xfd,0x22,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,
+0xf9,0x22,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0xf9,0x00,0x61,0x05,0x68,0x00,
+0x26,0x05,0x8f,0x00,0x33,0x0a,0x00,0x00,0x61,0x0a,0x6c,0x00,0x66,0x15,0x1d,0x00,
+0x61,0x0c,0xf0,0x00,0x61,0x09,0xa0,0x00,0x61,0x09,0xd7,0x00,0x61,0x0d,0xb7,0x00,
+0x61,0x0b,0xe8,0x00,0x61,0x0a,0x13,0x00,0x61,0x0a,0x48,0x00,0x61,0x17,0x15,0x00,
+0x33,0x17,0x28,0x00,0x34,0x1d,0xf6,0x00,0x43,0x1e,0xa1,0x00,0x44,0x20,0x0e,0x00,
+0x44,0x1f,0xfc,0x00,0x47,0x1e,0xc8,0x00,0x47,0x1f,0x6d,0x00,0x4d,0x1f,0xbe,0x00,
+0x4f,0x1e,0xea,0x00,0x58,0x32,0x56,0x00,0x61,0x7c,0xcc,0x7d,0xff,0x12,0x1c,0xa7,
+0x22,0x90,0xff,0xfc,0xe0,0x20,0xe7,0x2d,0xc2,0xaf,0xae,0x59,0xaf,0x58,0x75,0x5a,
+0x20,0xe5,0x5a,0x14,0xc5,0x5a,0x60,0x19,0xe4,0xfe,0x7f,0x05,0xee,0x4f,0xce,0x24,
+0xff,0xce,0xcf,0x34,0xff,0xcf,0x60,0x07,0xe4,0x90,0xff,0x92,0xf0,0x80,0xed,0x80,
+0xe0,0x8e,0x59,0x8f,0x58,0x22,0x12,0x05,0x01,0x7d,0x07,0x7c,0xb7,0x12,0x32,0x72,
+0x7d,0x0f,0x7c,0x6e,0x12,0x32,0x8c,0x78,0x9d,0x7a,0x06,0xe4,0xf6,0x08,0xda,0xfc,
+0x7a,0x06,0x12,0x05,0xc4,0x7c,0x03,0x12,0x0e,0x4c,0x12,0x21,0x4a,0xe4,0xfe,0xff,
+0x7c,0x0f,0x12,0x31,0xfb,0xd2,0xa8,0x22,0x12,0x30,0xe6,0xe4,0x90,0xfc,0x38,0xf0,
+0x90,0xff,0xf0,0xe0,0x30,0xe4,0x08,0x74,0x01,0x90,0xfc,0x39,0xf0,0x80,0x05,0xe4,
+0x90,0xfc,0x39,0xf0,0x7d,0x0a,0x7c,0x00,0x12,0x25,0x26,0x12,0x31,0x69,0x22,0x12,
+0x30,0xe6,0x90,0xfc,0x39,0xe0,0x14,0x70,0x0e,0x90,0xff,0xf0,0xe0,0x44,0x10,0xf0,
+0x7c,0x00,0x12,0x25,0xbf,0x80,0x19,0x90,0xfc,0x39,0xe0,0x70,0x0e,0x90,0xff,0xf0,
+0xe0,0x54,0xef,0xf0,0x7c,0x00,0x12,0x25,0xbf,0x80,0x05,0x7c,0x17,0x12,0x25,0xbf,
+0x12,0x31,0x69,0x22,0x90,0xff,0xf0,0xe0,0x54,0xab,0xf0,0x90,0xff,0xf0,0xe0,0x44,
+0x20,0xf0,0x22,0x8c,0x37,0x8d,0x36,0x78,0x82,0xed,0xf6,0x08,0xec,0xf6,0xed,0xfe,
+0xec,0xfd,0x7f,0x01,0x90,0x00,0x05,0x12,0x01,0xec,0x78,0x80,0xf6,0x78,0x82,0xe6,
+0xfd,0x08,0xe6,0xfc,0xed,0xfe,0xec,0xfd,0x7f,0x01,0x90,0x00,0x04,0x12,0x01,0xec,
+0x54,0x0f,0xfc,0x7d,0x80,0x12,0x17,0x46,0x78,0x80,0xe6,0x70,0x0d,0xad,0x3a,0xae,
+0x39,0xaf,0x38,0xe4,0x12,0x03,0x0f,0x7c,0x08,0x22,0x90,0xff,0xf0,0xe0,0x54,0xfe,
+0xf0,0x90,0xff,0xf0,0xe0,0x54,0xfd,0xf0,0x80,0x1e,0x78,0x82,0xe6,0xfd,0x08,0xe6,
+0xfc,0xed,0xfe,0xec,0xfd,0x7f,0x01,0x90,0x00,0x08,0x12,0x02,0x0e,0x25,0xe0,0x44,
+0x01,0x90,0xff,0xf3,0xf0,0x02,0x06,0xd0,0x78,0x82,0xe6,0xfd,0x08,0xe6,0xfc,0xed,
+0xfe,0xec,0xfd,0x7f,0x01,0x90,0x00,0x06,0x12,0x02,0x0e,0x54,0xfe,0x90,0xff,0xf3,
+0xf0,0x80,0x2b,0x78,0x82,0xe6,0xfd,0x08,0xe6,0xfc,0xed,0xfe,0xec,0xfd,0x7f,0x01,
+0x90,0x00,0x08,0x12,0x02,0x0e,0xfa,0xeb,0x90,0xff,0xf1,0xf0,0x12,0x08,0xbf,0x40,
+0x0d,0xad,0x3a,0xae,0x39,0xaf,0x38,0xe4,0x12,0x03,0x0f,0x7c,0x18,0x22,0x78,0x82,
+0xe6,0xfd,0x08,0xe6,0xfc,0xed,0xfe,0xec,0xfd,0x7f,0x01,0x90,0x00,0x08,0x12,0x02,
+0x0e,0x90,0xff,0xf1,0xf0,0x12,0x08,0xbf,0x40,0x0d,0xad,0x3a,0xae,0x39,0xaf,0x38,
+0xe4,0x12,0x03,0x0f,0x7c,0x18,0x22,0x78,0x82,0xe6,0xfd,0x08,0xe6,0xfc,0xed,0xfe,
+0xec,0xfd,0x7f,0x01,0x90,0x00,0x06,0x12,0x02,0x0e,0x44,0x01,0x90,0xff,0xf3,0xf0,
+0x78,0x83,0xe6,0x24,0x03,0xf6,0x18,0xe6,0x34,0x00,0xf6,0x78,0x80,0xe6,0x24,0xfe,
+0x50,0x09,0x90,0xff,0xf0,0xe0,0x54,0xfd,0xf0,0x80,0x07,0x90,0xff,0xf0,0xe0,0x44,
+0x02,0xf0,0xe4,0x90,0xff,0xf1,0xf0,0x78,0x81,0x76,0x00,0x78,0x80,0xe6,0x24,0xff,
+0xfc,0xe4,0x34,0xff,0xfd,0x78,0x81,0xe6,0x7f,0x00,0xfe,0xec,0xd3,0x9e,0xef,0x64,
+0x80,0xcd,0x64,0x80,0x9d,0x40,0x2f,0x12,0x08,0xa4,0x40,0x0f,0x78,0x81,0xe6,0xad,
+0x3a,0xae,0x39,0xaf,0x38,0x12,0x03,0x0f,0x7c,0x18,0x22,0x90,0xff,0xf2,0xe0,0xfc,
+0x78,0x82,0x86,0x83,0x08,0x86,0x82,0xec,0xf0,0x78,0x81,0x06,0xa3,0x78,0x82,0xa6,
+0x83,0x08,0xa6,0x82,0x80,0xb5,0x12,0x08,0xa4,0x40,0x0f,0x78,0x81,0xe6,0xad,0x3a,
+0xae,0x39,0xaf,0x38,0x12,0x03,0x0f,0x7c,0x18,0x22,0x90,0xff,0xf2,0xe0,0xfc,0x78,
+0x82,0x86,0x83,0x08,0x86,0x82,0xec,0xf0,0x78,0x80,0xe6,0xad,0x3a,0xae,0x39,0xaf,
+0x38,0x12,0x03,0x0f,0x7c,0x00,0x22,0x8c,0x37,0x8d,0x36,0x78,0x82,0xed,0xf6,0x08,
+0xec,0xf6,0xed,0xfe,0xec,0xfd,0x7f,0x01,0x90,0x00,0x05,0x12,0x01,0xec,0x78,0x81,
+0xf6,0x78,0x82,0xe6,0xfd,0x08,0xe6,0xfc,0xed,0xfe,0xec,0xfd,0x7f,0x01,0x90,0x00,
+0x04,0x12,0x01,0xec,0x54,0x0f,0xfc,0x7d,0x81,0x12,0x17,0x46,0x78,0x81,0xe6,0x70,
+0x03,0x7c,0x08,0x22,0x90,0xff,0xf0,0xe0,0x54,0xfe,0xf0,0x90,0xff,0xf0,0xe0,0x54,
+0xfd,0xf0,0x80,0x1b,0x78,0x82,0xe6,0xfd,0x08,0xe6,0xfc,0xed,0xfe,0xec,0xfd,0x7f,
+0x01,0x90,0x00,0x08,0x12,0x02,0x0e,0x25,0xe0,0x90,0xff,0xf3,0xf0,0x80,0x5b,0x78,
+0x82,0xe6,0xfd,0x08,0xe6,0xfc,0xed,0xfe,0xec,0xfd,0x7f,0x01,0x90,0x00,0x06,0x12,
+0x02,0x0e,0x54,0xfe,0x90,0xff,0xf3,0xf0,0x80,0x21,0x78,0x82,0xe6,0xfd,0x08,0xe6,
+0xfc,0xed,0xfe,0xec,0xfd,0x7f,0x01,0x90,0x00,0x08,0x12,0x02,0x0e,0xfa,0xeb,0x90,
+0xff,0xf1,0xf0,0x12,0x08,0xbf,0x40,0x03,0x7c,0x18,0x22,0x78,0x82,0xe6,0xfd,0x08,
+0xe6,0xfc,0xed,0xfe,0xec,0xfd,0x7f,0x01,0x90,0x00,0x08,0x12,0x02,0x0e,0x90,0xff,
+0xf1,0xf0,0x12,0x08,0xbf,0x40,0x03,0x7c,0x18,0x22,0x78,0x83,0xe6,0x24,0x0a,0xf6,
+0x18,0xe6,0x34,0x00,0xf6,0x78,0x80,0x76,0x00,0x78,0x81,0xe6,0x24,0xff,0xfc,0xe4,
+0x34,0xff,0xfd,0x78,0x80,0xe6,0x7f,0x00,0xfe,0xec,0xd3,0x9e,0xef,0x64,0x80,0xcd,
+0x64,0x80,0x9d,0x40,0x21,0x78,0x82,0x86,0x83,0x08,0x86,0x82,0xe0,0x90,0xff,0xf1,
+0xf0,0x12,0x08,0xbf,0x40,0x03,0x7c,0x18,0x22,0x78,0x80,0x06,0x78,0x83,0x06,0xe6,
+0x18,0x70,0x01,0x06,0x80,0xc3,0x90,0xff,0xf0,0xe0,0x44,0x01,0xf0,0x78,0x82,0x86,
+0x83,0x08,0x86,0x82,0xe0,0x90,0xff,0xf1,0xf0,0x12,0x08,0xbf,0x40,0x03,0x7c,0x18,
+0x22,0x7c,0x00,0x22,0x90,0xff,0xf0,0xe0,0x20,0xe7,0x12,0x90,0xff,0xf0,0xe0,0x30,
+0xe5,0x09,0x90,0xff,0xf0,0xe0,0x44,0x20,0xf0,0xc3,0x22,0x80,0xe7,0xd3,0x22,0x90,
+0xff,0xf0,0xe0,0x20,0xe3,0x12,0x90,0xff,0xf0,0xe0,0x30,0xe5,0x09,0x90,0xff,0xf0,
+0xe0,0x44,0x20,0xf0,0xc3,0x22,0x80,0xe7,0xd3,0x22,0x8c,0x42,0x8d,0x41,0x7c,0x00,
+0xed,0x54,0xf0,0xfd,0xec,0x70,0x03,0xed,0x64,0x30,0x70,0x05,0x75,0x3e,0x03,0x80,
+0x03,0x75,0x3e,0x04,0xac,0x3e,0x12,0x0f,0x69,0x75,0x83,0x00,0x85,0x83,0x40,0xe5,
+0x41,0x54,0x0f,0xf5,0x3f,0xe5,0x40,0x70,0x04,0xe5,0x3f,0x64,0x03,0x70,0x35,0xe5,
+0x3e,0x24,0xfd,0x75,0xf0,0x0a,0xa4,0x24,0x02,0xf5,0x82,0xe4,0x34,0xfc,0xf5,0x83,
+0xe0,0x30,0xe6,0x05,0x12,0x10,0x4b,0x80,0x19,0xe5,0x3e,0x24,0x9d,0xf8,0xc6,0x54,
+0xfb,0xf6,0x78,0xa9,0xe6,0x24,0x05,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0x74,
+0x0f,0xf0,0x80,0x59,0xe5,0x40,0x70,0x04,0xe5,0x3f,0x64,0x04,0x70,0x48,0xe5,0x3e,
+0x24,0xfd,0x75,0xf0,0x0a,0xa4,0x24,0x02,0xf5,0x82,0xe4,0x34,0xfc,0xf5,0x83,0xe0,
+0x30,0xe5,0x07,0xac,0x42,0xad,0x41,0x12,0x1c,0x3c,0xe5,0x42,0x30,0xe2,0x15,0x78,
+0xad,0xe6,0x30,0xe0,0x0f,0x78,0xad,0xe6,0x30,0xe1,0x09,0xe4,0xff,0x04,0xfe,0x7c,
+0x04,0x12,0x31,0xfb,0x78,0xa9,0xe6,0x24,0x06,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,
+0x83,0x74,0x0f,0xf0,0x80,0x07,0xe4,0xfc,0x7d,0xee,0x12,0x1c,0x3c,0xc2,0x03,0x22,
+0x12,0x30,0xe6,0x12,0x0f,0x69,0x78,0xa9,0xe6,0x24,0x06,0xf5,0x82,0x18,0xe6,0x34,
+0x00,0xf5,0x83,0xe0,0x90,0xfc,0x38,0xf0,0x78,0xa9,0xe6,0x24,0x05,0xf5,0x82,0x18,
+0xe6,0x34,0x00,0xf5,0x83,0xe0,0x90,0xfc,0x39,0xf0,0xc2,0x03,0x7d,0x02,0x7c,0x00,
+0x12,0x25,0x26,0x12,0x31,0x69,0x22,0x12,0x30,0xe6,0x78,0x95,0xec,0xf6,0xec,0x24,
+0x9d,0xf8,0xe6,0x30,0xe1,0x07,0x7c,0x13,0x12,0x25,0xbf,0x80,0x0f,0x90,0xfc,0x39,
+0xe0,0xfd,0x78,0x95,0xe6,0xfc,0x12,0x13,0xc8,0x12,0x25,0xbf,0x12,0x31,0x69,0x22,
+0x12,0x30,0xe6,0x78,0x95,0xec,0xf6,0x7d,0x00,0x12,0x0f,0x09,0x12,0x25,0xbf,0x12,
+0x31,0x69,0x22,0x12,0x30,0xe6,0x78,0x95,0xec,0xf6,0xec,0x24,0x9d,0xf8,0xe6,0x30,
+0xe2,0x07,0x7c,0x13,0x12,0x25,0xbf,0x80,0x1b,0x78,0x95,0xe6,0x24,0x9d,0xf8,0xe6,
+0x20,0xe1,0x07,0x7c,0x12,0x12,0x25,0xbf,0x80,0x0a,0x78,0x95,0xe6,0xfc,0x12,0x13,
+0xec,0x12,0x25,0xbf,0x12,0x31,0x69,0x22,0x12,0x30,0xe6,0x78,0x95,0xec,0xf6,0xec,
+0x24,0x9d,0xf8,0xe6,0x20,0xe2,0x07,0x7c,0x11,0x12,0x25,0xbf,0x80,0x0a,0x78,0x95,
+0xe6,0xfc,0x12,0x14,0xed,0x12,0x25,0xbf,0x12,0x31,0x69,0x22,0x12,0x30,0xe6,0x78,
+0x95,0xec,0xf6,0x12,0x0f,0x69,0x78,0xa9,0xe6,0x24,0x09,0xf5,0x82,0x18,0xe6,0x34,
+0x00,0xf5,0x83,0xe0,0x90,0xfc,0x3f,0xf0,0x78,0xa9,0xe6,0x24,0x0a,0xf5,0x82,0x18,
+0xe6,0x34,0x00,0xf5,0x83,0xe0,0x90,0xfc,0x40,0xf0,0x78,0xa9,0xe6,0x24,0x03,0xf5,
+0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0xfc,0x78,0xa9,0xe6,0x24,0x04,0xf5,0x82,
+0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0xf5,0x62,0x78,0xa9,0xe6,0x24,0x02,0xf5,0x82,
+0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0xf5,0x63,0x8c,0x61,0xe4,0xec,0x33,0x33,0x54,
+0x01,0x78,0x95,0xf6,0x60,0x08,0xe5,0x62,0x30,0xe1,0x03,0x78,0x95,0x06,0x78,0x95,
+0xe6,0x90,0xfc,0x41,0xf0,0x78,0xa7,0xe6,0x24,0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,
+0xf5,0x83,0xe0,0xfd,0xa3,0xe0,0x54,0x0c,0xfc,0xed,0x54,0xe6,0x8c,0x65,0xf5,0x64,
+0xe5,0x61,0x30,0xe5,0x03,0x43,0x65,0x01,0xe5,0x62,0x20,0xe5,0x0e,0xe5,0x61,0x54,
+0x7f,0x70,0x08,0xe5,0x61,0x20,0xe7,0x03,0x43,0x65,0x02,0xe5,0x61,0x30,0xe3,0x03,
+0x43,0x65,0x10,0xe5,0x61,0x30,0xe2,0x03,0x43,0x65,0x20,0xe5,0x61,0x54,0x03,0x60,
+0x03,0x43,0x65,0x40,0xe5,0x61,0x30,0xe1,0x03,0x43,0x65,0x80,0xe5,0x61,0x30,0xe4,
+0x03,0x43,0x64,0x01,0xe5,0x61,0x30,0xe6,0x03,0x43,0x64,0x08,0xe5,0x62,0x20,0xe4,
+0x0e,0xe5,0x61,0x54,0x7f,0x70,0x08,0xe5,0x61,0x20,0xe7,0x03,0x43,0x64,0x10,0x53,
+0x65,0xfb,0x53,0x64,0x79,0xad,0x64,0xe5,0x65,0x90,0xfc,0x3a,0xcd,0xf0,0xa3,0xcd,
+0xf0,0xe5,0x63,0x30,0xe3,0x0d,0xe5,0x63,0x54,0x30,0xc4,0x54,0x0f,0x90,0xfc,0x3d,
+0xf0,0x80,0x05,0xe4,0x90,0xfc,0x3d,0xf0,0xe5,0x63,0x54,0x03,0x90,0xfc,0x3c,0xf0,
+0xe5,0x63,0x54,0x04,0xc3,0x13,0x90,0xfc,0x3e,0xf0,0x90,0xfc,0x3c,0xe0,0x70,0x0e,
+0x7d,0x35,0x7e,0xfc,0x7f,0x01,0x74,0x01,0x90,0x00,0x09,0x12,0x01,0x42,0x78,0xa9,
+0xe6,0x24,0x08,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x7c,0x00,0xfd,0x78,
+0xa9,0xe6,0x24,0x07,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x7f,0x00,0x4c,
+0xfe,0xef,0x4d,0x90,0xfc,0x38,0xf0,0xa3,0xce,0xf0,0xce,0xc2,0x03,0x7d,0x0a,0x7c,
+0x00,0x12,0x25,0x26,0x12,0x31,0x69,0x22,0x12,0x30,0xe6,0x78,0x95,0xec,0xf6,0x78,
+0x9a,0x76,0x01,0x08,0x76,0xfc,0x08,0x76,0x38,0x78,0x97,0x76,0x0c,0x78,0x9a,0x12,
+0x04,0x65,0x12,0x02,0x14,0x78,0x98,0xcb,0xf6,0xcb,0x08,0xf6,0x7f,0x00,0xef,0x24,
+0xea,0x40,0x1f,0xe4,0xef,0x25,0xe0,0x90,0x35,0x2c,0xfd,0x93,0xcd,0x04,0x93,0x78,
+0x99,0x66,0x70,0x03,0xed,0x18,0x66,0x70,0x06,0x78,0x97,0x76,0x00,0x80,0x03,0x0f,
+0x80,0xdc,0x78,0x96,0xef,0xf6,0x78,0x9a,0x12,0x04,0x65,0x90,0x00,0x02,0x12,0x02,
+0x0e,0x78,0x98,0xcb,0xf6,0xcb,0x08,0xf6,0x54,0x04,0xcb,0x54,0x86,0x4b,0x60,0x04,
+0x78,0x97,0x76,0x0b,0x78,0x99,0xe6,0x30,0xe3,0x13,0x78,0x9a,0x12,0x04,0x65,0x90,
+0x00,0x05,0x12,0x01,0xec,0x24,0xfb,0x50,0x04,0x78,0x97,0x76,0x0d,0x78,0x99,0xe6,
+0x54,0xc0,0x7d,0x00,0x64,0xc0,0x4d,0x70,0x04,0x78,0x97,0x76,0x0b,0x78,0x9a,0x12,
+0x04,0x65,0x90,0x00,0x04,0x12,0x01,0xec,0x24,0xfc,0x50,0x04,0x78,0x97,0x76,0x0f,
+0x78,0x9a,0x12,0x04,0x65,0x90,0x00,0x06,0x12,0x01,0xec,0x24,0xfd,0x50,0x04,0x78,
+0x97,0x76,0x0e,0x78,0x9a,0x12,0x04,0x65,0x90,0x00,0x09,0x12,0x01,0xec,0x24,0xfd,
+0x50,0x04,0x78,0x97,0x76,0x0a,0x78,0x97,0xe6,0x70,0x2a,0x78,0x95,0xe6,0xfc,0x12,
+0x0f,0x69,0x78,0x9a,0x12,0x04,0x65,0x78,0xa7,0xe6,0xf9,0x78,0xa6,0xe6,0xfa,0x7b,
+0x01,0x74,0x0a,0x78,0x00,0x12,0x03,0x3f,0xc2,0x03,0x78,0x95,0xe6,0xfc,0x12,0x11,
+0x07,0x78,0x97,0xec,0xf6,0x78,0x97,0xe6,0xfc,0x12,0x25,0xbf,0x12,0x31,0x69,0x22,
+0x12,0x30,0xe6,0x78,0x95,0xec,0xf6,0x12,0x0f,0x69,0x78,0x95,0xe6,0x24,0xfd,0x75,
+0xf0,0x0a,0xa4,0x24,0x14,0xf5,0x82,0xe4,0x34,0xfc,0xf5,0x83,0xac,0x82,0xad,0x83,
+0x78,0xa6,0x86,0x83,0x08,0x86,0x82,0xec,0xf9,0xed,0xfa,0x7b,0x0a,0x78,0x01,0x12,
+0x03,0xa7,0xc2,0x03,0x78,0x95,0xe6,0xfc,0x12,0x11,0x07,0x12,0x31,0x69,0x22,0x8d,
+0x2b,0x8c,0x2a,0xed,0x60,0x40,0x75,0x27,0x01,0x75,0x29,0x48,0x75,0x28,0xff,0xe5,
+0x2a,0x24,0xfd,0xfc,0xe4,0x34,0xff,0xfd,0xec,0x7c,0x03,0x25,0xe0,0xcd,0x33,0xcd,
+0xdc,0xf9,0xfc,0xe5,0x29,0x2c,0xf5,0x29,0xe5,0x28,0x3d,0xf5,0x28,0xad,0x29,0xae,
+0x28,0xaf,0x27,0x74,0x80,0x90,0x00,0x06,0x12,0x03,0x17,0x74,0x80,0x90,0x00,0x02,
+0x12,0x03,0x17,0x12,0x0f,0xb7,0xe5,0x2b,0x14,0x60,0x3b,0x75,0x27,0x01,0x75,0x29,
+0x08,0x75,0x28,0xff,0xe5,0x2a,0x24,0xfd,0xfc,0xe4,0x34,0xff,0xfd,0xec,0x7c,0x03,
+0x25,0xe0,0xcd,0x33,0xcd,0xdc,0xf9,0xfc,0xe5,0x29,0x2c,0xf5,0x29,0xe5,0x28,0x3d,
+0xf5,0x28,0xad,0x29,0xae,0x28,0xaf,0x27,0xe4,0x90,0x00,0x06,0x12,0x03,0x17,0xe4,
+0x90,0x00,0x02,0x12,0x03,0x17,0x22,0x12,0x30,0xe6,0x78,0x95,0xec,0xf6,0xec,0x24,
+0x9d,0xf8,0xe6,0x30,0xe2,0x09,0x78,0x95,0xe6,0xfc,0x12,0x14,0xed,0xd2,0x00,0x78,
+0x95,0xe6,0xfc,0x12,0x0f,0x69,0x78,0x96,0x76,0x00,0x90,0xfc,0x39,0xe0,0x30,0xe7,
+0x04,0x78,0x96,0x76,0x01,0x78,0x96,0xe6,0xfd,0x78,0x95,0xe6,0xfc,0x12,0x0d,0x2f,
+0xc2,0x03,0x30,0x00,0x07,0x78,0x95,0xe6,0xfc,0x12,0x13,0xec,0x7c,0x00,0x12,0x25,
+0xbf,0x12,0x31,0x69,0x22,0x78,0xa9,0xe6,0x24,0x04,0xf5,0x82,0x18,0xe6,0x34,0x00,
+0xf5,0x83,0xe0,0x44,0x01,0xf0,0x78,0xa9,0xe6,0x24,0x04,0xf5,0x82,0x18,0xe6,0x34,
+0x00,0xf5,0x83,0xe0,0x30,0xe0,0x02,0x80,0xed,0x78,0xa9,0xe6,0x24,0x0b,0xf5,0x82,
+0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x54,0xf8,0xf0,0x78,0xa9,0xe6,0x24,0x02,0xf5,
+0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x44,0x80,0xf0,0x22,0xc2,0x03,0x8c,0x58,
+0x12,0x0f,0x69,0x78,0xa6,0x86,0x83,0x08,0x86,0x82,0x79,0x5d,0x7a,0x35,0x7b,0x0a,
+0x78,0x01,0x12,0x03,0xf5,0x12,0x0e,0x05,0xac,0x58,0x7d,0x02,0x12,0x0d,0x2f,0xc2,
+0x03,0xac,0x58,0x12,0x11,0x07,0x22,0x8d,0x53,0x8e,0x52,0x8f,0x51,0x8c,0x50,0x12,
+0x0f,0x69,0x75,0x4f,0x00,0x78,0xa9,0xe6,0x24,0x05,0xf5,0x82,0x18,0xe6,0x34,0x00,
+0xf5,0x83,0xe0,0x20,0xe4,0x1f,0xe5,0x4f,0x24,0xf6,0x40,0x19,0x05,0x4f,0xc2,0x03,
+0x7c,0x18,0x12,0x32,0xa9,0x90,0xff,0x93,0xe0,0x44,0x01,0xf0,0xb2,0xb3,0xac,0x50,
+0x12,0x0f,0x69,0x80,0xd0,0x78,0xa9,0xe6,0x24,0x05,0xf5,0x82,0x18,0xe6,0x34,0x00,
+0xf5,0x83,0xe0,0x20,0xe4,0x05,0xc2,0x03,0x7c,0x02,0x22,0x78,0xa9,0xe6,0x24,0x05,
+0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x54,0x0f,0x60,0x16,0x78,0xa9,0xe6,
+0x24,0x05,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x54,0x0f,0xf0,0xc2,0x03,
+0x7c,0x01,0x22,0x78,0xa8,0x86,0x83,0x08,0x86,0x82,0xe0,0xad,0x53,0xae,0x52,0xaf,
+0x51,0x12,0x03,0x0f,0xc2,0x03,0x7c,0x00,0x22,0x8d,0x31,0x8c,0x30,0x12,0x14,0xed,
+0xe5,0x31,0x60,0x0f,0xe5,0x30,0xb4,0x03,0x0a,0x7c,0x01,0x12,0x24,0xee,0x7c,0x81,
+0x12,0x24,0xee,0xac,0x30,0x12,0x0f,0x69,0xe5,0x31,0x60,0x1a,0x78,0xaa,0x86,0x83,
+0x08,0x86,0x82,0xe0,0x54,0xe7,0xf0,0xa3,0xa3,0xa3,0xa3,0xe0,0x54,0xe7,0xf0,0xac,
+0x30,0x7d,0x02,0x12,0x0d,0x2f,0x78,0xa6,0x86,0x83,0x08,0x86,0x82,0x79,0x67,0x7a,
+0x35,0x7b,0x0a,0x78,0x01,0x12,0x03,0xf5,0xc2,0x03,0xe5,0x30,0x24,0x9d,0xf8,0xc6,
+0x54,0xfd,0xf6,0xac,0x30,0x12,0x11,0x07,0x22,0x8c,0x26,0x30,0x03,0x05,0x12,0x32,
+0x48,0x80,0xf8,0x7c,0x0a,0x12,0x31,0x5b,0xd2,0x03,0xe5,0x26,0x24,0xfd,0x78,0xa3,
+0xf6,0x70,0x07,0x78,0xaa,0x76,0xff,0x08,0x76,0xe0,0x78,0xa3,0xe6,0x75,0xf0,0x10,
+0xa4,0xad,0xf0,0xfc,0x24,0xa0,0x78,0xa9,0xf6,0xed,0x34,0xff,0x18,0xf6,0x78,0xa3,
+0xe6,0x75,0xf0,0x0a,0xa4,0x24,0x00,0xfc,0xe4,0x34,0xfc,0xfd,0x78,0xa6,0xed,0xf6,
+0x08,0xec,0xf6,0x12,0x31,0xf4,0x22,0x78,0xa9,0xe6,0x24,0x02,0xf5,0x82,0x18,0xe6,
+0x34,0x00,0xf5,0x83,0xe0,0x30,0xe7,0x22,0x78,0xa9,0xe6,0x24,0x02,0xf5,0x82,0x18,
+0xe6,0x34,0x00,0xf5,0x83,0xe0,0x54,0x7f,0xf0,0x78,0xa9,0xe6,0x24,0x02,0xf5,0x82,
+0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x44,0x80,0xf0,0x22,0x78,0xaa,0x86,0x83,0x08,
+0x86,0x82,0xe0,0x54,0x7f,0xf0,0xad,0x83,0xe5,0x82,0x24,0x04,0xfc,0xe4,0x3d,0x8c,
+0x82,0xf5,0x83,0xe0,0x54,0x7f,0xf0,0x78,0xa9,0xe6,0x24,0x0b,0xf5,0x82,0x18,0xe6,
+0x34,0x00,0xf5,0x83,0xe0,0x54,0xf8,0xf0,0x78,0xab,0xe6,0x24,0x01,0xf5,0x82,0x18,
+0xe6,0x34,0x00,0xf5,0x83,0xe0,0x44,0x03,0xf0,0x78,0xab,0xe6,0x24,0x05,0xf5,0x82,
+0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x44,0x03,0xf0,0x78,0xa9,0xe6,0x24,0x05,0xf5,
+0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0x74,0x0f,0xf0,0x22,0x78,0xaa,0x86,0x83,0x08,
+0x86,0x82,0xe0,0x54,0x3f,0xf0,0xad,0x83,0xe5,0x82,0x24,0x04,0xfc,0xe4,0x3d,0x8c,
+0x82,0xf5,0x83,0xe0,0x54,0x3f,0xf0,0x78,0xa3,0xe6,0x24,0xa4,0xf8,0xe6,0xfc,0x78,
+0xab,0xe6,0x24,0x01,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xec,0xf0,0x78,0xa3,
+0xe6,0x24,0xa4,0xf8,0xe6,0xfc,0x78,0xab,0xe6,0x24,0x05,0xf5,0x82,0x18,0xe6,0x34,
+0x00,0xf5,0x83,0xec,0xf0,0x78,0xa9,0xe6,0x24,0x0b,0xf5,0x82,0x18,0xe6,0x34,0x00,
+0xf5,0x83,0xe0,0x54,0xfb,0x44,0x02,0xf5,0x26,0x78,0xa7,0xe6,0x24,0x02,0xf5,0x82,
+0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x30,0xe5,0x03,0x43,0x26,0x01,0x78,0xa9,0xe6,
+0x24,0x05,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x30,0xe0,0x03,0x12,0x0f,
+0xb7,0xe5,0x26,0xfc,0x78,0xa9,0xe6,0x24,0x0b,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,
+0x83,0xec,0xf0,0x78,0xa9,0xe6,0x24,0x05,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,
+0x74,0x0f,0xf0,0x78,0xaa,0x86,0x83,0x08,0x86,0x82,0xe0,0x44,0x80,0xf0,0xa3,0xa3,
+0xa3,0xa3,0xe0,0x44,0x80,0xf0,0x22,0x8c,0x2a,0x12,0x0f,0x69,0x78,0xa7,0xe6,0x24,
+0x08,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0xfc,0x78,0xa9,0xe6,0x24,0x0a,
+0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xec,0xf0,0x78,0xa7,0xe6,0x24,0x07,0xf5,
+0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0xfc,0x78,0xa9,0xe6,0x24,0x09,0xf5,0x82,
+0x18,0xe6,0x34,0x00,0xf5,0x83,0xec,0xf0,0x78,0xa6,0x86,0x83,0x08,0x86,0x82,0xe0,
+0xfd,0xa3,0xe0,0xfc,0xed,0xfe,0x78,0xa9,0xe6,0x24,0x08,0xf5,0x82,0x18,0xe6,0x34,
+0x00,0xf5,0x83,0xee,0xf0,0xec,0xfe,0x78,0xa9,0xe6,0x24,0x07,0xf5,0x82,0x18,0xe6,
+0x34,0x00,0xf5,0x83,0xee,0xf0,0x8c,0x29,0x8d,0x28,0xc3,0xec,0x94,0x05,0xed,0x94,
+0x0c,0x40,0x05,0x75,0x27,0x7c,0x80,0x33,0xd3,0xe5,0x29,0x94,0x01,0xe5,0x28,0x94,
+0x03,0x40,0x05,0x75,0x27,0x3c,0x80,0x23,0xd3,0xe5,0x29,0x94,0x81,0xe5,0x28,0x94,
+0x01,0x40,0x05,0x75,0x27,0x18,0x80,0x13,0xd3,0xe5,0x29,0x94,0x60,0xe5,0x28,0x94,
+0x00,0x40,0x05,0x75,0x27,0x0c,0x80,0x03,0x75,0x27,0x08,0xaf,0x27,0xe4,0xef,0x54,
+0x7c,0x44,0x83,0xff,0x8f,0x27,0xe5,0x27,0xfc,0x78,0xab,0xe6,0x24,0x01,0xf5,0x82,
+0x18,0xe6,0x34,0x00,0xf5,0x83,0xec,0xf0,0xe5,0x27,0xfc,0x78,0xab,0xe6,0x24,0x05,
+0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xec,0xf0,0xe5,0x27,0xfc,0x78,0xa3,0xe6,
+0x24,0xa4,0xf8,0xec,0xf6,0x78,0xa9,0xe6,0x24,0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,
+0xf5,0x83,0xe0,0xf5,0x27,0x78,0xa7,0xe6,0x24,0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,
+0xf5,0x83,0xa3,0xe0,0x30,0xe3,0x17,0x53,0x27,0xc7,0x78,0xa7,0xe6,0x24,0x05,0xf5,
+0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x90,0x35,0x58,0x93,0x42,0x27,0x53,0x27,
+0xfb,0x78,0xa7,0xe6,0x24,0x06,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x60,
+0x03,0x43,0x27,0x04,0x53,0x27,0xfc,0x78,0xa7,0xe6,0x24,0x04,0xf5,0x82,0x18,0xe6,
+0x34,0x00,0xf5,0x83,0xe0,0x42,0x27,0x43,0x27,0x80,0xe5,0x27,0xfc,0x78,0xa9,0xe6,
+0x24,0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xec,0xf0,0x78,0xa9,0xe6,0x24,
+0x04,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0xf5,0x27,0x78,0xa7,0xe6,0x24,
+0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xa3,0xe0,0x30,0xe1,0x05,0x53,0x27,
+0xdf,0x80,0x03,0x43,0x27,0x20,0x78,0xa7,0xe6,0x24,0x02,0xf5,0x82,0x18,0xe6,0x34,
+0x00,0xf5,0x83,0xe0,0x30,0xe4,0x05,0x53,0x27,0xef,0x80,0x03,0x43,0x27,0x10,0x78,
+0xa7,0xe6,0x24,0x09,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0xb4,0x02,0x03,
+0x43,0x27,0x02,0xe5,0x27,0xfc,0x78,0xa9,0xe6,0x24,0x04,0xf5,0x82,0x18,0xe6,0x34,
+0x00,0xf5,0x83,0xec,0xf0,0x78,0xa9,0xe6,0x24,0x03,0xf5,0x82,0x18,0xe6,0x34,0x00,
+0xf5,0x83,0xe0,0xf5,0x27,0x78,0xa7,0xe6,0x24,0x09,0xf5,0x82,0x18,0xe6,0x34,0x00,
+0xf5,0x83,0xe0,0x70,0x05,0x53,0x27,0x7f,0x80,0x03,0x43,0x27,0x80,0x78,0xa7,0xe6,
+0x24,0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xa3,0xe0,0x30,0xe0,0x05,0x43,
+0x27,0x20,0x80,0x03,0x53,0x27,0xdf,0x78,0xa7,0xe6,0x24,0x02,0xf5,0x82,0x18,0xe6,
+0x34,0x00,0xf5,0x83,0xe0,0x30,0xe3,0x05,0x43,0x27,0x40,0x80,0x03,0x53,0x27,0xbf,
+0x78,0xa7,0xe6,0x24,0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x30,0xe0,
+0x05,0x43,0x27,0x10,0x80,0x03,0x53,0x27,0xef,0x78,0xa7,0xe6,0x24,0x02,0xf5,0x82,
+0x18,0xe6,0x34,0x00,0xf5,0x83,0xa3,0xe0,0x30,0xe4,0x05,0x43,0x27,0x08,0x80,0x03,
+0x53,0x27,0xf7,0x78,0xa7,0xe6,0x24,0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,
+0xa3,0xe0,0x30,0xe5,0x05,0x43,0x27,0x04,0x80,0x03,0x53,0x27,0xfb,0x78,0xa7,0xe6,
+0x24,0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xa3,0xe0,0x30,0xe6,0x05,0x43,
+0x27,0x01,0x80,0x03,0x53,0x27,0xfe,0x78,0xa7,0xe6,0x24,0x02,0xf5,0x82,0x18,0xe6,
+0x34,0x00,0xf5,0x83,0xa3,0xe0,0x30,0xe7,0x05,0x43,0x27,0x02,0x80,0x03,0x53,0x27,
+0xfd,0xe5,0x27,0xfc,0x78,0xa9,0xe6,0x24,0x03,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,
+0x83,0xec,0xf0,0xc2,0x03,0x7c,0x00,0x22,0x8d,0x27,0x8c,0x26,0xed,0x54,0x03,0x14,
+0x60,0x03,0x7c,0x10,0x22,0xe5,0x27,0x54,0x7c,0x24,0xfc,0x40,0x03,0x7c,0x0b,0x22,
+0xe5,0x26,0x24,0x9d,0xf8,0xc6,0x44,0x02,0xf6,0x7c,0x00,0x22,0x8c,0x30,0x12,0x0f,
+0x69,0xe5,0x30,0x24,0x9d,0xf8,0xe6,0x20,0xe2,0x4f,0xac,0x30,0x7d,0x02,0x12,0x0d,
+0x2f,0xe5,0x30,0x24,0xfe,0x44,0x28,0xfc,0x78,0xaa,0x86,0x83,0x08,0x86,0x82,0xec,
+0xf0,0xaf,0x83,0xe5,0x82,0x24,0x04,0xfe,0xe4,0x3f,0xff,0xec,0x8e,0x82,0x8f,0x83,
+0xf0,0x7c,0x03,0x8c,0x2c,0xe5,0x2c,0xfc,0x78,0xab,0xe6,0x24,0x01,0xf5,0x82,0x18,
+0xe6,0x34,0x00,0xf5,0x83,0xec,0xf0,0xe5,0x2c,0xfc,0x78,0xab,0xe6,0x24,0x05,0xf5,
+0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xec,0xf0,0x75,0x2d,0x01,0x75,0x2f,0x48,0x75,
+0x2e,0xff,0xe5,0x30,0x24,0xfd,0xfc,0xe4,0x34,0xff,0xfd,0xec,0x7c,0x03,0x25,0xe0,
+0xcd,0x33,0xcd,0xdc,0xf9,0xfc,0xe5,0x2f,0x2c,0xf5,0x2f,0xe5,0x2e,0x3d,0xf5,0x2e,
+0x78,0xab,0xe6,0x24,0x04,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x54,0xe7,
+0xf5,0x2c,0xad,0x2f,0xae,0x2e,0xaf,0x2d,0xe4,0x90,0x00,0x02,0x12,0x03,0x17,0xe4,
+0x90,0x00,0x06,0x12,0x03,0x17,0x12,0x01,0xe6,0x30,0xe5,0x03,0x43,0x2c,0x10,0xe5,
+0x2c,0xfc,0x78,0xab,0xe6,0x24,0x04,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xec,
+0xf0,0x12,0x10,0x4b,0x78,0xa9,0xe6,0x24,0x06,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,
+0x83,0xe0,0xc2,0x03,0xfc,0xe5,0x30,0x24,0x9d,0xf8,0xc6,0x44,0x04,0xf6,0x8c,0x2c,
+0xe5,0x30,0x54,0x0f,0xc4,0x54,0xf0,0x7e,0x00,0xff,0xee,0xef,0x44,0x04,0x7d,0x00,
+0xff,0xec,0x4e,0xfc,0xed,0x4f,0xfd,0x12,0x1c,0xa7,0x7c,0x00,0x22,0x8c,0x2f,0x12,
+0x0f,0x69,0x12,0x0f,0xeb,0x78,0xaa,0x86,0x83,0x08,0x86,0x82,0xe0,0x54,0x08,0xf0,
+0xa3,0xa3,0xa3,0xa3,0xe0,0x54,0x08,0xf0,0xac,0x2f,0x7d,0x02,0x12,0x0d,0x2f,0xc2,
+0x03,0xe5,0x2f,0x24,0x9d,0xf8,0xc6,0x54,0xfb,0xf6,0x7c,0x00,0x22,0x12,0x30,0xe6,
+0x78,0x96,0xec,0xf6,0xec,0x24,0x9d,0xf8,0xe6,0x30,0xe1,0x0a,0x7d,0x00,0x7c,0x13,
+0x12,0x25,0x26,0x12,0x31,0x69,0x78,0x96,0xe6,0x24,0x9d,0xf8,0xc6,0x44,0x01,0xf6,
+0x78,0x96,0xe6,0xfc,0x12,0x0f,0x69,0x78,0x96,0xe6,0x24,0xfd,0x75,0xf0,0x0a,0xa4,
+0x24,0x14,0xf5,0x82,0xe4,0x34,0xfc,0xf5,0x83,0x78,0xa6,0xe6,0xfa,0x08,0xe6,0xf9,
+0x7b,0x0a,0x78,0x01,0x12,0x03,0xa7,0x78,0xa6,0x86,0x83,0x08,0x86,0x82,0x79,0x67,
+0x7a,0x35,0x7b,0x0a,0x78,0x01,0x12,0x03,0xf5,0x12,0x0f,0xb7,0xc2,0x03,0x78,0x96,
+0xe6,0xfc,0x12,0x11,0x07,0x78,0x95,0xec,0xf6,0xec,0x60,0x0a,0x7d,0x00,0x7c,0x08,
+0x12,0x25,0x26,0x12,0x31,0x69,0x78,0x96,0xe6,0xfc,0x12,0x0f,0x69,0x78,0xa9,0xe6,
+0x24,0x04,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x44,0x10,0x54,0xdf,0xfc,
+0x78,0xa9,0xe6,0x24,0x04,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xec,0xf0,0x78,
+0x95,0xec,0xf6,0xc2,0x03,0x7c,0xc8,0x12,0x32,0xa9,0x78,0x96,0xe6,0xfc,0x12,0x0f,
+0x69,0x78,0xa9,0xe6,0x24,0x04,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x54,
+0xef,0xf0,0xc2,0x03,0x7c,0xc8,0x12,0x32,0xa9,0x78,0x96,0xe6,0xfc,0x12,0x0f,0x69,
+0x78,0xa9,0xe6,0x24,0x04,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x44,0x10,
+0xf0,0xc2,0x03,0x7c,0xc8,0x12,0x32,0xa9,0x78,0x96,0xe6,0xfc,0x12,0x0f,0x69,0x78,
+0xa9,0xe6,0x24,0x04,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x44,0x20,0xf0,
+0xc2,0x03,0x7c,0xf0,0x12,0x32,0xa9,0x78,0x96,0xe6,0xfc,0x12,0x0f,0x69,0x78,0xa9,
+0xe6,0x24,0x05,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x30,0xe4,0x15,0xc2,
+0x03,0x78,0x96,0xe6,0x44,0x10,0x7f,0x00,0xfe,0x7c,0x07,0x12,0x31,0xfb,0x12,0x31,
+0x69,0x02,0x17,0x14,0x78,0xa9,0xe6,0x24,0x04,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,
+0x83,0xe0,0x54,0xcf,0xf0,0xc2,0x03,0x7c,0xc8,0x12,0x32,0xa9,0x78,0x96,0xe6,0xfc,
+0x12,0x0f,0x69,0x78,0xa9,0xe6,0x24,0x04,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,
+0xe0,0x44,0x30,0xf0,0xc2,0x03,0x7c,0xf0,0x12,0x32,0xa9,0x78,0x96,0xe6,0xfc,0x12,
+0x0f,0x69,0x78,0xa9,0xe6,0x24,0x05,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,
+0x30,0xe4,0x14,0xc2,0x03,0x78,0x96,0xe6,0x44,0x10,0x7f,0x00,0xfe,0x7c,0x07,0x12,
+0x31,0xfb,0x12,0x31,0x69,0x80,0x5d,0x78,0xa9,0xe6,0x24,0x04,0xf5,0x82,0x18,0xe6,
+0x34,0x00,0xf5,0x83,0xe0,0x54,0xef,0xf0,0x78,0xa9,0xe6,0x24,0x04,0xf5,0x82,0x18,
+0xe6,0x34,0x00,0xf5,0x83,0xe0,0x54,0xdf,0xf0,0x78,0x96,0xe6,0x24,0xfd,0x75,0xf0,
+0x0a,0xa4,0x24,0x14,0xf5,0x82,0xe4,0x34,0xfc,0xf5,0x83,0xac,0x82,0xad,0x83,0x78,
+0xa6,0x86,0x83,0x08,0x86,0x82,0xec,0xf9,0xed,0xfa,0x7b,0x0a,0x78,0x01,0x12,0x03,
+0xa7,0xc2,0x03,0x78,0x96,0xe6,0xfc,0x12,0x11,0x07,0x7d,0x00,0x7c,0x0b,0x12,0x25,
+0x26,0x12,0x31,0x69,0x22,0x12,0x30,0xe6,0xe4,0x90,0xfc,0x39,0xf0,0x7d,0x02,0x7c,
+0x00,0x12,0x25,0x26,0x12,0x31,0x69,0x22,0x12,0x30,0xe6,0x7c,0x00,0x12,0x25,0xbf,
+0x12,0x31,0x69,0x22,0x74,0x3c,0x90,0xfb,0xe0,0xf0,0x74,0x3e,0x90,0xfb,0xe0,0xf0,
+0xe4,0x90,0xfc,0x28,0xf0,0x22,0x8d,0x35,0x8c,0x34,0xec,0xb4,0x01,0x02,0x80,0x03,
+0xd3,0x40,0x02,0x80,0x28,0xb4,0x02,0x02,0x80,0x03,0xd3,0x40,0x08,0xa8,0x35,0xc6,
+0x25,0xe0,0xf6,0x80,0x18,0xb4,0x04,0x02,0x80,0x03,0xd3,0x40,0x0a,0xa8,0x35,0xc6,
+0x25,0xe0,0x25,0xe0,0xf6,0x80,0x06,0xa8,0x35,0x76,0x00,0x80,0x00,0x22,0x8c,0x3c,
+0x8d,0x3b,0xed,0xfe,0xec,0xfd,0x7f,0x01,0x75,0x66,0x06,0x75,0x67,0x00,0x90,0xfc,
+0x29,0x12,0x04,0x6e,0x12,0x01,0xe6,0xb4,0x80,0x02,0x80,0x06,0xd3,0x50,0x03,0x02,
+0x18,0x47,0x90,0xfc,0x29,0x12,0x04,0x80,0x90,0x00,0x03,0x12,0x01,0xec,0x54,0xf0,
+0xb4,0x30,0x02,0x80,0x03,0xd3,0x40,0x5f,0x90,0xfc,0x29,0x12,0x04,0x80,0x90,0x00,
+0x08,0x12,0x02,0x0e,0xfa,0xfd,0xeb,0xfe,0x7f,0x01,0x90,0xfc,0x2c,0x12,0x04,0x6e,
+0xee,0xcd,0x90,0x35,0x71,0xfc,0xe4,0x93,0xff,0x74,0x01,0x93,0xfe,0xf9,0xef,0xfa,
+0x7b,0x01,0xea,0xff,0xe9,0xfe,0xec,0xc3,0x9e,0xed,0x9f,0x40,0x25,0x90,0x35,0x73,
+0xe4,0x93,0xfd,0x74,0x01,0x93,0xfc,0xed,0xfe,0xec,0xfd,0x7f,0x01,0xee,0xcd,0xfc,
+0x90,0xfc,0x2e,0xe0,0xd3,0x9c,0x90,0xfc,0x2d,0xe0,0x9d,0x50,0x05,0x75,0x66,0x80,
+0x80,0x33,0x12,0x19,0x65,0x80,0x2e,0xb4,0x60,0x02,0x80,0x03,0xd3,0x40,0x0b,0xac,
+0x3c,0xad,0x3b,0x12,0x07,0x77,0x8c,0x66,0x80,0x1b,0xb4,0x10,0x03,0xb3,0x40,0x10,
+0xc3,0xb4,0x20,0x03,0xb3,0x40,0x09,0xc3,0xb4,0x40,0x02,0x80,0x03,0xd3,0x40,0x00,
+0x75,0x66,0x81,0x80,0x00,0x80,0x75,0xb4,0x81,0x02,0x80,0x03,0xd3,0x40,0x6b,0x90,
+0xfc,0x29,0x12,0x04,0x80,0x90,0x00,0x03,0x12,0x01,0xec,0x54,0xf0,0xb4,0x30,0x02,
+0x80,0x03,0xd3,0x40,0x1d,0x90,0xfc,0x29,0x12,0x04,0x80,0x90,0x00,0x08,0x12,0x02,
+0x0e,0xfa,0xfd,0xeb,0xfe,0x7f,0x01,0x90,0xfc,0x2f,0x12,0x04,0x6e,0x12,0x18,0xcf,
+0x80,0x36,0xb4,0x60,0x02,0x80,0x03,0xd3,0x40,0x13,0x75,0x3a,0x67,0xe4,0xf5,0x39,
+0xf5,0x38,0xac,0x3c,0xad,0x3b,0x12,0x05,0xd3,0x8c,0x66,0x80,0x1b,0xb4,0x10,0x03,
+0xb3,0x40,0x10,0xc3,0xb4,0x20,0x03,0xb3,0x40,0x09,0xc3,0xb4,0x40,0x02,0x80,0x03,
+0xd3,0x40,0x00,0x75,0x66,0x81,0x80,0x00,0x80,0x02,0x80,0x00,0xe5,0x66,0xfc,0x90,
+0xfc,0x29,0x12,0x04,0x80,0xec,0x90,0x00,0x02,0x12,0x03,0x17,0xac,0x67,0x22,0x90,
+0xfc,0x29,0x12,0x04,0x80,0x90,0x00,0x04,0x12,0x01,0xec,0x60,0x04,0x74,0x01,0x80,
+0x01,0xe4,0xa2,0xe0,0x92,0x01,0x90,0xfc,0x29,0x12,0x04,0x80,0xed,0x24,0x03,0xfd,
+0x50,0x01,0x0e,0x90,0xfc,0x2c,0x12,0x04,0x6e,0x90,0xfc,0x29,0x12,0x04,0x80,0x90,
+0x00,0x05,0x12,0x01,0xec,0xf5,0x67,0x90,0x00,0x04,0x12,0x01,0xec,0x54,0x0f,0xfc,
+0x7d,0x67,0x12,0x17,0x46,0xe5,0x67,0x70,0x04,0x75,0x66,0x08,0x22,0x75,0x66,0x00,
+0x78,0x84,0x76,0x00,0x78,0x84,0xe6,0xc3,0x95,0x67,0x50,0x38,0x90,0xfc,0x2f,0x12,
+0x04,0x80,0x12,0x01,0xe6,0xfc,0x90,0xfc,0x2c,0x12,0x04,0x80,0xec,0x12,0x03,0x0f,
+0x30,0x01,0x0e,0x90,0xfc,0x31,0xe0,0x04,0xf0,0x90,0xfc,0x30,0x70,0x03,0xe0,0x04,
+0xf0,0x78,0x84,0x06,0x90,0xfc,0x2e,0xe0,0x04,0xf0,0x90,0xfc,0x2d,0x70,0x03,0xe0,
+0x04,0xf0,0x80,0xc0,0x22,0x90,0xfc,0x2a,0xe0,0xfd,0xa3,0xe0,0xfc,0xed,0xfe,0xec,
+0xfd,0x7f,0x01,0xed,0x24,0x0a,0xfd,0x50,0x01,0x0e,0x90,0xfc,0x32,0x12,0x04,0x6e,
+0x90,0xfc,0x29,0x12,0x04,0x80,0x90,0x00,0x04,0x12,0x01,0xec,0x54,0x0f,0xb4,0x01,
+0x02,0x80,0x03,0xd3,0x40,0x17,0x90,0xfc,0x32,0x12,0x04,0x80,0x0d,0xed,0x70,0x01,
+0x0e,0x90,0xfc,0x2f,0x12,0x04,0x6e,0x78,0x88,0x76,0x01,0x80,0x4e,0xb4,0x02,0x02,
+0x80,0x03,0xd3,0x40,0x19,0x90,0xfc,0x32,0x12,0x04,0x80,0xed,0x24,0x02,0xfd,0x50,
+0x01,0x0e,0x90,0xfc,0x2f,0x12,0x04,0x6e,0x78,0x88,0x76,0x02,0x80,0x2d,0xb4,0x04,
+0x02,0x80,0x03,0xd3,0x40,0x19,0x90,0xfc,0x32,0x12,0x04,0x80,0xed,0x24,0x04,0xfd,
+0x50,0x01,0x0e,0x90,0xfc,0x2f,0x12,0x04,0x6e,0x78,0x88,0x76,0x04,0x80,0x0c,0xb4,
+0x00,0x02,0x80,0x03,0xd3,0x40,0x00,0x75,0x66,0x08,0x22,0x90,0xfc,0x29,0x12,0x04,
+0x80,0x90,0x00,0x05,0x12,0x01,0xec,0xf5,0x67,0x78,0x85,0x76,0x00,0x78,0x85,0xe6,
+0xc3,0x95,0x67,0x40,0x03,0x02,0x1a,0xcd,0x78,0x86,0x76,0x00,0x78,0x86,0xe6,0xc3,
+0x78,0x88,0x96,0x50,0x76,0x90,0xfc,0x2c,0x12,0x04,0x80,0x12,0x01,0xe6,0xfc,0x90,
+0xfc,0x32,0x12,0x04,0x89,0x12,0x01,0xe0,0xf4,0x5c,0xfc,0x12,0x01,0xe0,0xf8,0x90,
+0xfc,0x2f,0x12,0x04,0x80,0xe8,0xc0,0xe0,0x12,0x01,0xe6,0xc8,0xd0,0xe0,0xc8,0x58,
+0x4c,0xfc,0x90,0xfc,0x2c,0x12,0x04,0x80,0xec,0x12,0x03,0x0f,0x78,0x87,0xec,0xf6,
+0x90,0xfc,0x31,0xe0,0x04,0xf0,0x90,0xfc,0x30,0x70,0x03,0xe0,0x04,0xf0,0x09,0xe9,
+0x70,0x01,0x0a,0x90,0xfc,0x32,0x12,0x04,0x77,0x90,0xfc,0x29,0x12,0x04,0x80,0x90,
+0x00,0x04,0x12,0x01,0xec,0x30,0xe4,0x0e,0x90,0xfc,0x2e,0xe0,0x04,0xf0,0x90,0xfc,
+0x2d,0x70,0x03,0xe0,0x04,0xf0,0x78,0x86,0x06,0x80,0x81,0x78,0x88,0xe6,0xfd,0xe4,
+0xfe,0xff,0xee,0xcd,0xfc,0x90,0xfc,0x31,0xe0,0x2c,0xf0,0x90,0xfc,0x30,0xe0,0x3d,
+0xf0,0x78,0x88,0xe6,0xfd,0xe4,0xfe,0xff,0xee,0xcd,0xfc,0x90,0xfc,0x34,0xe0,0x2c,
+0xf0,0x90,0xfc,0x33,0xe0,0x3d,0xf0,0x78,0x85,0x06,0x02,0x1a,0x0d,0x75,0x66,0x00,
+0x22,0xe5,0x3d,0x05,0x3d,0x04,0x70,0x02,0xb2,0xb0,0x22,0xc0,0xe0,0xc0,0xf0,0xc0,
+0x82,0xc0,0x83,0xc0,0xd0,0xe8,0xc0,0xe0,0xe9,0xc0,0xe0,0xea,0xc0,0xe0,0xeb,0xc0,
+0xe0,0xec,0xc0,0xe0,0xed,0xc0,0xe0,0xee,0xc0,0xe0,0xef,0xc0,0xe0,0x90,0xff,0x92,
+0xe0,0x12,0x01,0xb7,0x1b,0x29,0x30,0x1b,0x29,0x32,0x1b,0x38,0x38,0x1b,0x4a,0x3a,
+0x1b,0x5c,0x3e,0x1b,0x74,0x44,0x1b,0x68,0x46,0x1b,0x80,0x50,0x1b,0xc2,0x52,0x1b,
+0xa1,0x54,0x1b,0xe3,0x56,0x00,0x00,0x1c,0x04,0x90,0xff,0x92,0xe0,0x7f,0x00,0xfe,
+0x7c,0x01,0x12,0x31,0xfb,0x02,0x1c,0x14,0xe4,0xff,0x04,0xfe,0x7c,0x03,0x12,0x31,
+0xfb,0x74,0x20,0x90,0xff,0xfe,0xf0,0x02,0x1c,0x14,0xe4,0xff,0x04,0xfe,0x7c,0x02,
+0x12,0x31,0xfb,0x74,0x40,0x90,0xff,0xfe,0xf0,0x02,0x1c,0x14,0xe4,0xff,0x04,0xfe,
+0x7c,0x04,0x12,0x31,0xfb,0x02,0x1c,0x14,0xe4,0xff,0x04,0xfe,0x7c,0x05,0x12,0x31,
+0xfb,0x02,0x1c,0x14,0xe4,0xff,0x04,0xfe,0x7c,0x06,0x12,0x31,0xfb,0x02,0x1c,0x14,
+0x90,0xff,0xa5,0xe0,0x7d,0x00,0x90,0xfb,0xf8,0xcd,0xf0,0xa3,0xcd,0xf0,0x90,0xfb,
+0xf9,0xe0,0xfc,0xf5,0x83,0x90,0xfb,0xf8,0xe0,0x44,0x33,0xfd,0x12,0x1c,0xa7,0x80,
+0x73,0x90,0xff,0xb5,0xe0,0x7d,0x00,0x90,0xfb,0xfa,0xcd,0xf0,0xa3,0xcd,0xf0,0x90,
+0xfb,0xfb,0xe0,0xfc,0xf5,0x83,0x90,0xfb,0xfa,0xe0,0x44,0x43,0xfd,0x12,0x1c,0xa7,
+0x80,0x52,0x90,0xff,0xa6,0xe0,0x7d,0x00,0x90,0xfb,0xfc,0xcd,0xf0,0xa3,0xcd,0xf0,
+0x90,0xfb,0xfd,0xe0,0xfc,0xf5,0x83,0x90,0xfb,0xfc,0xe0,0x44,0x34,0xfd,0x12,0x1c,
+0xa7,0x80,0x31,0x90,0xff,0xb6,0xe0,0x7d,0x00,0x90,0xfb,0xfe,0xcd,0xf0,0xa3,0xcd,
+0xf0,0x90,0xfb,0xff,0xe0,0xfc,0xf5,0x83,0x90,0xfb,0xfe,0xe0,0x44,0x44,0xfd,0x12,
+0x1c,0xa7,0x80,0x10,0x90,0xff,0x92,0xe0,0x7d,0x00,0xfc,0xed,0x44,0xaa,0xfd,0x12,
+0x1c,0xa7,0x80,0x00,0xe4,0x90,0xff,0x92,0xf0,0xd0,0xe0,0xff,0xd0,0xe0,0xfe,0xd0,
+0xe0,0xfd,0xd0,0xe0,0xfc,0xd0,0xe0,0xfb,0xd0,0xe0,0xfa,0xd0,0xe0,0xf9,0xd0,0xe0,
+0xf8,0xd0,0xd0,0xd0,0x83,0xd0,0x82,0xd0,0xf0,0xd0,0xe0,0x32,0x05,0x81,0x05,0x81,
+0x05,0x81,0x05,0x81,0xa8,0x81,0x18,0x18,0x18,0xed,0xf6,0x08,0xec,0xf6,0x90,0xff,
+0x5a,0xe0,0x20,0xe7,0x02,0x80,0xf7,0x90,0xff,0x59,0xe0,0x7d,0x00,0xa8,0x81,0x18,
+0xcd,0xf6,0xcd,0x08,0xf6,0x7d,0x03,0xa8,0x81,0xe6,0x18,0xfc,0xe6,0xcc,0x25,0xe0,
+0xcc,0x33,0xcc,0xdd,0xf9,0xcc,0xf6,0xcc,0x08,0xf6,0xa8,0x81,0x18,0xe6,0x44,0xf8,
+0xf6,0xa8,0x81,0x18,0x18,0x18,0xe6,0xfd,0x08,0xe6,0xfc,0xa8,0x81,0x18,0x86,0x83,
+0x08,0x86,0x82,0xed,0xf0,0xa3,0xec,0xf0,0x74,0x02,0x90,0xff,0x5a,0xf0,0x15,0x81,
+0x15,0x81,0x15,0x81,0x15,0x81,0x22,0xe5,0x81,0x24,0x05,0xf5,0x81,0xe4,0xa8,0x81,
+0x18,0xf6,0xa8,0x81,0x18,0x18,0x18,0x18,0xed,0xf6,0x08,0xec,0xf6,0x90,0xfb,0xf5,
+0xe0,0x24,0xf8,0x50,0x03,0x02,0x1d,0xc8,0xe4,0xa8,0x81,0x18,0x18,0xf6,0xa8,0x81,
+0x18,0xe6,0xfe,0xa8,0x81,0x18,0x18,0x18,0x18,0xe6,0xfd,0x08,0xe6,0xfc,0x7f,0x00,
+0xef,0x24,0xf8,0x40,0x4d,0xe4,0xef,0x25,0xe0,0x24,0x7d,0xf5,0x82,0xe4,0x34,0xfc,
+0xf5,0x83,0xe0,0xfb,0xa3,0xe0,0x6c,0x70,0x03,0xfa,0xeb,0x6d,0x70,0x09,0x74,0x01,
+0xa8,0x81,0x18,0x18,0xf6,0x80,0x2b,0xe4,0xef,0x25,0xe0,0x24,0x7d,0xf5,0x82,0xe4,
+0x34,0xfc,0xf5,0x83,0x7a,0x00,0xe0,0x54,0xf0,0xcc,0xf8,0xcc,0xcd,0xf9,0xcd,0xfb,
+0x78,0x00,0xe9,0x54,0xf0,0xf9,0xea,0x68,0x70,0x02,0xeb,0x69,0x70,0x01,0x0e,0x0f,
+0x80,0xae,0xa8,0x81,0x18,0xee,0xf6,0xa8,0x81,0x18,0x18,0x18,0x18,0xed,0xf6,0x08,
+0xec,0xf6,0xa8,0x81,0xef,0xf6,0xa8,0x81,0x18,0x18,0xe6,0x70,0x79,0xa8,0x81,0x18,
+0xe6,0x24,0xf7,0x40,0x71,0xa8,0x81,0x18,0x18,0x18,0x18,0xe6,0x54,0x0f,0xa8,0x81,
+0xf6,0x64,0x04,0x60,0x17,0xa8,0x81,0xe6,0x64,0x03,0x60,0x10,0xa8,0x81,0x18,0x18,
+0x18,0x18,0xe6,0xfd,0x08,0xe6,0xfc,0x12,0x1c,0x3c,0x80,0x4a,0x7c,0x0a,0x12,0x31,
+0x5b,0xa8,0x81,0x18,0x18,0x18,0x18,0xe6,0xfd,0x08,0xe6,0xfc,0x90,0xfb,0xf4,0xe0,
+0x25,0xe0,0x24,0x7d,0xf5,0x82,0xe4,0x34,0xfc,0xf5,0x83,0xed,0xf0,0xa3,0xec,0xf0,
+0x90,0xfb,0xf4,0xe0,0xff,0xe4,0xef,0x04,0x54,0x07,0xff,0x90,0xfb,0xf4,0xf0,0x90,
+0xfb,0xf5,0xe0,0x04,0xf0,0x12,0x31,0xf4,0x90,0xfb,0xf6,0xe0,0x70,0x08,0xe4,0xfe,
+0xff,0x7c,0x0f,0x12,0x31,0xfb,0x80,0x27,0x90,0xfb,0xf7,0xe0,0x04,0xf0,0x54,0x3f,
+0x70,0x1d,0x90,0xfb,0xf7,0xe0,0x44,0xfe,0x7d,0x00,0xfc,0x90,0xfb,0xf4,0xe0,0x25,
+0xe0,0x24,0x7d,0xf5,0x82,0xe4,0x34,0xfc,0xf5,0x83,0xed,0xf0,0xa3,0xec,0xf0,0xe5,
+0x81,0x24,0xfb,0xf5,0x81,0x22,0x78,0x8b,0x76,0x00,0x78,0x8c,0x76,0x00,0x74,0x01,
+0x90,0xfb,0xf6,0xf0,0x12,0x30,0xe6,0x90,0xfb,0xf5,0xe0,0x60,0x57,0x7c,0x0a,0x12,
+0x31,0x5b,0x90,0xfb,0xf3,0xe0,0x25,0xe0,0x24,0x7d,0xf5,0x82,0xe4,0x34,0xfc,0xf5,
+0x83,0xe0,0xfd,0xa3,0xe0,0xfc,0x90,0xfb,0xf3,0xe0,0x25,0xe0,0x24,0x7d,0xf5,0x82,
+0xe4,0x34,0xfc,0xf5,0x83,0xe4,0xf0,0xa3,0xf0,0x90,0xfb,0xf3,0xe0,0xff,0xe4,0xef,
+0x04,0x54,0x07,0xff,0x90,0xfb,0xf3,0xf0,0x90,0xfb,0xf5,0xe0,0x14,0xf0,0x78,0x89,
+0xed,0xf6,0x08,0xec,0xf6,0x12,0x31,0xf4,0x78,0x89,0xe6,0xfd,0x08,0xe6,0xfc,0x12,
+0x08,0xda,0x80,0xa3,0x12,0x32,0x48,0x90,0xff,0x93,0xe0,0x44,0x01,0xf0,0xb2,0xb3,
+0x78,0x8b,0x06,0xb6,0x00,0x11,0x78,0x8b,0x76,0x00,0x78,0x8c,0xe6,0xf4,0x04,0x04,
+0xa2,0xe0,0x92,0xb4,0x78,0x8c,0xf6,0x02,0x1e,0x07,0xe4,0x90,0xfb,0xf6,0xf0,0x90,
+0xfb,0xf5,0xe0,0x7d,0x00,0xfc,0xed,0x44,0xcf,0xfd,0x12,0x1c,0x3c,0x12,0x31,0x69,
+0x22,0x12,0x30,0xe6,0xe5,0x70,0x64,0x49,0x45,0x6f,0x60,0x15,0x90,0xff,0x83,0xe0,
+0x54,0x0f,0x7d,0x00,0xd3,0x95,0x70,0xed,0x95,0x6f,0x50,0x05,0x12,0x2f,0x2f,0x80,
+0x03,0x12,0x2f,0xff,0x12,0x31,0x69,0x22,0x12,0x30,0xe6,0xe5,0x70,0x64,0x49,0x45,
+0x6f,0x60,0x05,0x12,0x30,0x39,0x80,0x0e,0x90,0xff,0x80,0xe0,0x44,0x08,0xf0,0x90,
+0xff,0x83,0xe0,0x54,0x7f,0xf0,0x12,0x31,0x69,0x22,0x12,0x30,0xe6,0x8c,0x54,0xec,
+0x54,0xf0,0xb4,0x10,0x15,0x75,0x6a,0x35,0x75,0x69,0xfc,0x75,0x68,0x01,0xe5,0x6a,
+0x24,0x03,0xf5,0x6a,0xe5,0x69,0x34,0x00,0xf5,0x69,0xe4,0xf5,0x57,0xf5,0x56,0xe5,
+0x56,0xc3,0x94,0x01,0x50,0x27,0xe5,0x54,0x54,0x0f,0xfc,0xad,0x6a,0xae,0x69,0xaf,
+0x68,0x12,0x0e,0x77,0x8c,0x55,0xec,0x60,0x02,0x80,0x12,0x05,0x6a,0xe5,0x6a,0x70,
+0x02,0x05,0x69,0x05,0x57,0xe5,0x57,0x70,0x02,0x05,0x56,0x80,0xd2,0xe5,0x54,0x54,
+0x0f,0x24,0x9d,0xf8,0xc6,0x54,0xfe,0xf6,0xe5,0x54,0x54,0x0f,0x7f,0x00,0xfe,0x7c,
+0x12,0x12,0x31,0xfb,0xe5,0x55,0x14,0x70,0x09,0x7d,0x00,0x7c,0x09,0x12,0x25,0x26,
+0x80,0x07,0xad,0x57,0x7c,0x00,0x12,0x25,0x26,0x12,0x31,0x69,0x22,0x12,0x30,0xe6,
+0x90,0xff,0xfc,0xe0,0x44,0x02,0xf0,0x90,0xff,0x00,0xe0,0x30,0xe7,0x13,0x90,0xff,
+0x83,0xe0,0x44,0x80,0xf0,0x43,0x6d,0x80,0x90,0xff,0xfc,0xe0,0x44,0x01,0xf0,0x80,
+0x11,0x90,0xff,0x82,0xe0,0x44,0x08,0xf0,0x53,0x6d,0x7f,0x90,0xff,0xfc,0xe0,0x54,
+0xfe,0xf0,0x90,0xff,0x81,0xe0,0x44,0x80,0xf0,0x12,0x25,0xd9,0x90,0xff,0xfe,0xe0,
+0x44,0x05,0xf0,0x90,0xff,0xfc,0xe0,0x54,0xfd,0xf0,0x12,0x31,0x69,0x22,0x12,0x30,
+0xe6,0x7c,0x01,0x12,0x32,0xa9,0x78,0xad,0xe6,0x44,0x02,0xf6,0x74,0xfe,0xfc,0x04,
+0xfd,0x12,0x1c,0xa7,0x90,0xff,0x5a,0xe0,0x30,0xe7,0x02,0x80,0xf7,0xe4,0xf5,0x4e,
+0x75,0x4d,0x10,0xac,0x4e,0xad,0x4d,0xe5,0x4e,0x15,0x4e,0x70,0x02,0x15,0x4d,0xec,
+0x4d,0x60,0x02,0x80,0xee,0x43,0x87,0x01,0x12,0x31,0x69,0x22,0x12,0x30,0xe6,0x7c,
+0x02,0x12,0x31,0x75,0x78,0xad,0xe6,0x54,0xfd,0xf6,0x12,0x31,0x69,0x22,0x12,0x30,
+0xe6,0x78,0xad,0xe6,0x30,0xe0,0x2c,0x78,0xad,0xe6,0x30,0xe1,0x26,0x78,0xad,0xe6,
+0xfc,0xf5,0x83,0x18,0xe6,0x44,0xf0,0xfd,0x12,0x1c,0x3c,0x90,0xff,0xfc,0xe0,0x44,
+0x20,0xf0,0x7c,0x02,0x12,0x32,0xa9,0x78,0xad,0xe6,0x54,0xfd,0xf6,0x74,0x1a,0x90,
+0xff,0xfe,0xf0,0x78,0xad,0xe6,0xfc,0xf5,0x83,0x18,0xe6,0x44,0xf1,0xfd,0x12,0x1c,
+0x3c,0x12,0x31,0x69,0x22,0x75,0x6d,0x00,0x90,0xff,0xff,0xe0,0x60,0x03,0x43,0x6d,
+0x01,0x75,0x6e,0x00,0xe4,0xf5,0x6c,0xf5,0x6b,0xe4,0xf5,0x6f,0x75,0x70,0x49,0x74,
+0x84,0x90,0xff,0x82,0xf0,0x74,0x84,0x90,0xff,0x80,0xf0,0x74,0x80,0x90,0xff,0x58,
+0xf0,0x74,0x80,0x90,0xff,0x5a,0xf0,0xad,0x46,0xaf,0x45,0x7e,0x00,0xee,0x24,0xfe,
+0x50,0x03,0x02,0x21,0x24,0xe4,0xee,0x75,0xf0,0x07,0xa4,0x24,0x7f,0xf5,0x82,0xe4,
+0x34,0xf8,0xf5,0x83,0xe0,0xff,0xe4,0xef,0x54,0x80,0xfd,0xe4,0xef,0x54,0x0f,0x14,
+0xff,0xed,0x60,0x38,0xe4,0xef,0x75,0xf0,0x08,0xa4,0x24,0x48,0xf5,0x82,0xe4,0x34,
+0xff,0xf5,0x83,0x74,0x90,0xf0,0xe4,0xef,0x75,0xf0,0x08,0xa4,0x24,0x4a,0xf5,0x82,
+0xe4,0x34,0xff,0xf5,0x83,0x74,0x80,0xf0,0xe4,0xef,0x75,0xf0,0x08,0xa4,0x24,0x4e,
+0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0x74,0x80,0xf0,0x80,0x34,0xe4,0xef,0x75,0xf0,
+0x08,0xa4,0x24,0x08,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0x74,0x90,0xf0,0xe4,0xef,
+0x75,0xf0,0x08,0xa4,0x24,0x0a,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xe4,0xf0,0xe4,
+0xef,0x75,0xf0,0x08,0xa4,0x24,0x0e,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xe4,0xf0,
+0x0e,0x02,0x20,0x8d,0x8d,0x46,0x8e,0x44,0x8f,0x45,0x74,0x7f,0x90,0xff,0xfd,0xf0,
+0x74,0x90,0x90,0xff,0xfc,0xf0,0x22,0x8c,0x58,0xec,0x24,0xf6,0x50,0x06,0xe5,0x58,
+0x24,0x37,0xfc,0x22,0xe5,0x58,0x24,0x30,0xfc,0x22,0x12,0x25,0x23,0xec,0x70,0x03,
+0x02,0x22,0x5e,0x75,0x5c,0x03,0xae,0x5b,0x7f,0x00,0xe5,0x5c,0x15,0x5c,0x64,0x80,
+0x24,0x7f,0x50,0x35,0xef,0x24,0x00,0xf5,0x82,0xe4,0x34,0xfb,0xf5,0x83,0xe0,0xfe,
+0x24,0xfe,0x50,0x1e,0xef,0x7d,0x00,0xfc,0xe4,0xfb,0x74,0x74,0xc3,0x9c,0xfa,0xeb,
+0x9d,0xfb,0xee,0x7d,0x00,0xfc,0xea,0xc3,0x9c,0xed,0x64,0x80,0xcb,0x64,0x80,0x9b,
+0x50,0x02,0x80,0x05,0xef,0x2e,0xff,0x80,0xc1,0x8e,0x5b,0x8f,0x5a,0xe5,0x5c,0x64,
+0x80,0x24,0x7f,0x50,0x03,0x02,0x22,0x5e,0xe5,0x5a,0x24,0x8e,0x50,0x03,0x02,0x22,
+0x5e,0x85,0x5a,0x5d,0x75,0x5b,0x00,0xae,0x5a,0xaf,0x5b,0x90,0x35,0x9c,0xe4,0x93,
+0xf5,0x5c,0xe5,0x5c,0x15,0x5c,0x64,0x80,0x24,0x7f,0x50,0x18,0xee,0x24,0x00,0xf5,
+0x82,0xe4,0x34,0xfb,0xf5,0x83,0xe0,0xfc,0xef,0x90,0x35,0x9c,0x93,0x6c,0x70,0x04,
+0x0e,0x0f,0x80,0xde,0x8e,0x5a,0x8f,0x5b,0xe5,0x5c,0x64,0x80,0x24,0x7f,0x40,0x6e,
+0x75,0x5e,0x01,0x75,0x60,0xe8,0x75,0x5f,0xff,0xe5,0x5d,0x24,0x02,0xf5,0x5a,0x75,
+0x5c,0x07,0xe5,0x5c,0x33,0x40,0x57,0xad,0x60,0xae,0x5f,0xaf,0x5e,0xe5,0x5c,0xf5,
+0x82,0x33,0x95,0xe0,0xf5,0x83,0x12,0x01,0xec,0xc4,0x54,0x0f,0xfc,0x12,0x21,0x37,
+0xe5,0x5a,0x24,0x00,0xf5,0x82,0xe4,0x34,0xfb,0xf5,0x83,0xec,0xf0,0x05,0x5a,0x05,
+0x5a,0xad,0x60,0xae,0x5f,0xaf,0x5e,0xe5,0x5c,0xf5,0x82,0x33,0x95,0xe0,0xf5,0x83,
+0x12,0x01,0xec,0x54,0x0f,0xfc,0x12,0x21,0x37,0xe5,0x5a,0x24,0x00,0xf5,0x82,0xe4,
+0x34,0xfb,0xf5,0x83,0xec,0xf0,0x05,0x5a,0x05,0x5a,0x15,0x5c,0x80,0xa4,0x74,0x02,
+0x90,0xf8,0x51,0xf0,0x90,0xf8,0x6b,0x79,0x75,0x7a,0x35,0x7b,0x27,0x78,0x01,0x12,
+0x03,0xf5,0x75,0x6a,0x35,0x75,0x69,0xfc,0x75,0x68,0x01,0xe4,0x90,0xff,0x83,0xf0,
+0x74,0x80,0x90,0xff,0x81,0xf0,0x75,0x59,0x02,0xe5,0x59,0x75,0xf0,0x07,0xa4,0x24,
+0x7f,0xf5,0x82,0xe4,0x34,0xf8,0xf5,0x83,0xe0,0x78,0x8f,0xf6,0xfc,0x54,0x0f,0x14,
+0xfc,0x78,0x8f,0xec,0xf6,0xe5,0x59,0x75,0xf0,0x07,0xa4,0x24,0x81,0xf5,0x82,0xe4,
+0x34,0xf8,0xf5,0x83,0xe0,0x78,0x92,0x76,0xfd,0x08,0x76,0xe8,0xfc,0x78,0x8f,0xe6,
+0x75,0xf0,0x08,0xa4,0x24,0x48,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xe4,0xf0,0x78,
+0x8f,0xe6,0x75,0xf0,0x08,0xa4,0x24,0x4f,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xec,
+0xf0,0x78,0x92,0xe6,0xff,0x08,0xe6,0x7e,0x03,0xcf,0xc3,0x13,0xcf,0x13,0xde,0xf9,
+0xfe,0x78,0x8f,0xe6,0x75,0xf0,0x08,0xa4,0x24,0x49,0xf5,0x82,0xe4,0x34,0xff,0xf5,
+0x83,0xee,0xf0,0x78,0x8f,0xe6,0x75,0xf0,0x08,0xa4,0x24,0x4a,0xf5,0x82,0xe4,0x34,
+0xff,0xf5,0x83,0x74,0x80,0xf0,0x78,0x90,0xec,0xf6,0x7d,0x00,0x78,0x93,0xe6,0x2c,
+0xf6,0x18,0xe6,0x3d,0xf6,0x78,0x92,0xe6,0xfd,0x08,0xe6,0x7c,0x03,0xcd,0xc3,0x13,
+0xcd,0x13,0xdc,0xf9,0xfc,0x78,0x8f,0xe6,0x75,0xf0,0x08,0xa4,0x24,0x4d,0xf5,0x82,
+0xe4,0x34,0xff,0xf5,0x83,0xec,0xf0,0x78,0x8f,0xe6,0x75,0xf0,0x08,0xa4,0x24,0x4e,
+0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xe4,0xf0,0x78,0x92,0xe6,0xfd,0x08,0xe6,0xfc,
+0x78,0x8f,0xe6,0xff,0x7e,0x00,0xee,0x24,0xfe,0x50,0x03,0x02,0x24,0xdd,0xe4,0xee,
+0x75,0xf0,0x07,0xa4,0x24,0x7f,0xf5,0x82,0xe4,0x34,0xf8,0xf5,0x83,0xe0,0xff,0xe4,
+0xef,0x54,0x80,0xfa,0xe4,0xef,0x54,0x0f,0x14,0xff,0xe4,0xee,0x75,0xf0,0x07,0xa4,
+0x24,0x81,0xf5,0x82,0xe4,0x34,0xf8,0xf5,0x83,0xe0,0x78,0x90,0xf6,0xe4,0xee,0x13,
+0x13,0x54,0x80,0x24,0xf0,0xf8,0xe4,0x34,0xfd,0xf9,0xe8,0xfc,0xe9,0xfd,0x8a,0x5a,
+0xea,0x70,0x03,0x02,0x24,0x4a,0xe4,0xef,0x75,0xf0,0x08,0xa4,0x24,0x48,0xf5,0x82,
+0xe4,0x34,0xff,0xf5,0x83,0xe4,0xf0,0x78,0x90,0xe6,0xfa,0xe4,0xef,0x75,0xf0,0x08,
+0xa4,0x24,0x4f,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xea,0xf0,0xed,0xfb,0xec,0x7a,
+0x03,0xcb,0xc3,0x13,0xcb,0x13,0xda,0xf9,0xfa,0xe4,0xef,0x75,0xf0,0x08,0xa4,0x24,
+0x49,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xea,0xf0,0x78,0x90,0xe6,0x7b,0x00,0xfa,
+0xec,0x2a,0xfc,0xed,0x3b,0xfd,0xfb,0xec,0x7a,0x03,0xcb,0xc3,0x13,0xcb,0x13,0xda,
+0xf9,0xfa,0xe4,0xef,0x75,0xf0,0x08,0xa4,0x24,0x4d,0xf5,0x82,0xe4,0x34,0xff,0xf5,
+0x83,0xea,0xf0,0xe4,0xef,0x75,0xf0,0x08,0xa4,0x24,0x4a,0xf5,0x82,0xe4,0x34,0xff,
+0xf5,0x83,0x74,0x80,0xf0,0xe4,0xef,0x75,0xf0,0x08,0xa4,0x24,0x4e,0xf5,0x82,0xe4,
+0x34,0xff,0xf5,0x83,0x74,0x80,0xf0,0x02,0x24,0xd9,0xe4,0xef,0x75,0xf0,0x08,0xa4,
+0x24,0x08,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xe4,0xf0,0x78,0x90,0xe6,0xfa,0xe4,
+0xef,0x75,0xf0,0x08,0xa4,0x24,0x0f,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xea,0xf0,
+0xed,0xfb,0xec,0x7a,0x03,0xcb,0xc3,0x13,0xcb,0x13,0xda,0xf9,0xfa,0xe4,0xef,0x75,
+0xf0,0x08,0xa4,0x24,0x09,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xea,0xf0,0x78,0x90,
+0xe6,0x7b,0x00,0xfa,0xec,0x2a,0xfc,0xed,0x3b,0xfd,0xfb,0xec,0x7a,0x03,0xcb,0xc3,
+0x13,0xcb,0x13,0xda,0xf9,0xfa,0xe4,0xef,0x75,0xf0,0x08,0xa4,0x24,0x0d,0xf5,0x82,
+0xe4,0x34,0xff,0xf5,0x83,0xea,0xf0,0xe4,0xef,0x75,0xf0,0x08,0xa4,0x24,0x0a,0xf5,
+0x82,0xe4,0x34,0xff,0xf5,0x83,0xe4,0xf0,0xe4,0xef,0x75,0xf0,0x08,0xa4,0x24,0x0e,
+0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xe4,0xf0,0x0e,0x02,0x23,0x66,0x8e,0x59,0x78,
+0x92,0xed,0xf6,0x08,0xec,0xf6,0x78,0x8f,0xef,0xf6,0x12,0x20,0x55,0x22,0x8c,0x26,
+0xec,0x30,0xe7,0x18,0xe5,0x26,0x54,0x0f,0x14,0x75,0xf0,0x08,0xa4,0x24,0x48,0xf5,
+0x82,0xe4,0x34,0xff,0xf5,0x83,0xe0,0x54,0xdf,0xf0,0x80,0x16,0xe5,0x26,0x54,0x0f,
+0x14,0x75,0xf0,0x08,0xa4,0x24,0x08,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xe0,0x54,
+0xdf,0xf0,0x22,0x7c,0x00,0x22,0xec,0x90,0xfc,0x37,0xf0,0x8c,0x24,0xed,0x24,0x03,
+0xf5,0x25,0x7d,0x00,0xd3,0x95,0x72,0xed,0x95,0x71,0x40,0x03,0x85,0x72,0x25,0xe5,
+0x25,0x24,0xb7,0x50,0x09,0x75,0x25,0x03,0x74,0x02,0x90,0xfc,0x37,0xf0,0xac,0x25,
+0x12,0x30,0x24,0x22,0xe4,0xf5,0x6c,0xf5,0x6b,0x12,0x25,0x5d,0x22,0x90,0xfc,0x35,
+0xe0,0x65,0x73,0x60,0x0e,0x74,0x04,0x90,0xfc,0x37,0xf0,0xe4,0xf5,0x6b,0x75,0x6c,
+0x03,0x80,0x46,0x7d,0x73,0xe4,0xfe,0xff,0x79,0x35,0x7a,0xfc,0x7b,0x01,0x74,0x05,
+0x78,0x00,0x12,0x03,0x3f,0xe5,0x6c,0x24,0x03,0xf5,0x6c,0xe5,0x6b,0x34,0x00,0xf5,
+0x6b,0xe5,0x6c,0xd3,0x95,0x72,0xe5,0x6b,0x95,0x71,0x40,0x06,0x85,0x72,0x6c,0x85,
+0x71,0x6b,0xd3,0xe5,0x6c,0x94,0x48,0xe5,0x6b,0x94,0x00,0x40,0x0c,0x74,0x02,0x90,
+0xfc,0x37,0xf0,0xe4,0xf5,0x6b,0x75,0x6c,0x03,0xac,0x6c,0x12,0x30,0x24,0x22,0xec,
+0x90,0xfc,0x37,0xf0,0xe4,0xf5,0x6c,0xf5,0x6b,0x8c,0x32,0xec,0x60,0x05,0x12,0x30,
+0x15,0x80,0x05,0x7c,0x00,0x12,0x30,0x24,0x22,0x90,0xff,0x93,0xe0,0x44,0x01,0xf0,
+0xb2,0xb3,0x90,0xff,0x04,0xe0,0xf5,0x4a,0x90,0xff,0x06,0xe0,0xfd,0xa3,0xe0,0xed,
+0x7d,0x00,0xfc,0x7d,0x00,0xfc,0x90,0xff,0x06,0xe0,0xff,0xa3,0xe0,0x7e,0x00,0xff,
+0xe4,0xfe,0xec,0x4e,0xfc,0xed,0x4f,0xfd,0xc3,0xec,0x94,0x48,0xed,0x94,0x00,0x50,
+0x22,0x90,0xff,0x06,0xe0,0xfd,0xa3,0xe0,0xed,0x7d,0x00,0xfc,0x7d,0x00,0xfc,0x90,
+0xff,0x06,0xe0,0xff,0xa3,0xe0,0x7e,0x00,0xff,0xe4,0xfe,0xec,0x4e,0xfc,0xed,0x4f,
+0xfd,0x80,0x04,0xe4,0xfd,0x7c,0x48,0x8c,0x72,0x8d,0x71,0x90,0xff,0x02,0xe0,0xfd,
+0xa3,0xe0,0xed,0x7d,0x00,0xfc,0x7d,0x00,0xfc,0x90,0xff,0x02,0xe0,0xff,0xa3,0xe0,
+0x7e,0x00,0xff,0xe4,0xfe,0xec,0x4e,0xf5,0x4c,0xed,0x4f,0xf5,0x4b,0x75,0x6a,0x35,
+0x75,0x69,0xfc,0x75,0x68,0x01,0x7d,0x35,0x7e,0xfc,0x7f,0x01,0x79,0x73,0xe4,0xfa,
+0xfb,0x74,0x05,0x78,0x00,0x12,0x03,0x3f,0x75,0x49,0x00,0xe5,0x49,0x24,0xfe,0x40,
+0x19,0xad,0x6a,0xae,0x69,0xaf,0x68,0xe4,0x12,0x03,0x0f,0x05,0x49,0x0d,0xed,0x70,
+0x01,0x0e,0x8d,0x6a,0x8e,0x69,0x8f,0x68,0x80,0xe1,0x75,0x6a,0x35,0x75,0x69,0xfc,
+0x75,0x68,0x01,0x90,0xff,0x00,0xe0,0x54,0x60,0xb4,0x00,0x02,0x80,0x06,0xd3,0x50,
+0x03,0x02,0x2c,0x6d,0xe5,0x4a,0x54,0x0f,0xf5,0x49,0xe5,0x4a,0x54,0x80,0xa2,0xe0,
+0x92,0x02,0x90,0xff,0x01,0xe0,0x12,0x01,0x81,0x00,0x0b,0x2c,0x68,0x26,0xe5,0x28,
+0x03,0x2c,0x68,0x29,0x0f,0x2c,0x68,0x29,0xf2,0x2a,0x26,0x2b,0x8d,0x2b,0x90,0x2b,
+0xd0,0x2c,0x11,0x2c,0x3f,0xe5,0x6d,0x30,0xe7,0x0e,0xe5,0x4c,0x45,0x4b,0x70,0x08,
+0xe5,0x72,0x64,0x02,0x45,0x71,0x60,0x03,0x02,0x2c,0x6a,0x90,0xff,0x00,0xe0,0x54,
+0x1f,0xb4,0x00,0x02,0x80,0x03,0xd3,0x40,0x29,0xe5,0x4a,0x60,0x03,0x02,0x28,0x00,
+0xad,0x6a,0xae,0x69,0xaf,0x68,0x74,0x01,0x12,0x03,0x0f,0x78,0xad,0xe6,0x30,0xe0,
+0x0b,0xad,0x6a,0xae,0x69,0xaf,0x68,0x74,0x02,0x12,0x03,0x0f,0x7c,0x02,0x12,0x30,
+0x24,0x22,0xb4,0x01,0x02,0x80,0x03,0xd3,0x40,0x1b,0xe5,0x6d,0x20,0xe1,0x07,0xe5,
+0x4a,0x60,0x03,0x02,0x28,0x00,0xe5,0x4a,0x24,0xfe,0x50,0x03,0x02,0x28,0x00,0x7c,
+0x02,0x12,0x30,0x24,0x22,0xb4,0x02,0x02,0x80,0x06,0xd3,0x50,0x03,0x02,0x27,0xfe,
+0xe5,0x6d,0x20,0xe1,0x0d,0xe5,0x4a,0x60,0x09,0xe5,0x4a,0x64,0x80,0x60,0x03,0x02,
+0x28,0x00,0xac,0x4a,0x12,0x30,0xab,0x40,0x03,0x02,0x28,0x00,0xe5,0x49,0x70,0x25,
+0x30,0x02,0x11,0x90,0xff,0x80,0xe0,0x54,0x08,0xad,0x6a,0xae,0x69,0xaf,0x68,0x12,
+0x03,0x0f,0x80,0x0f,0x90,0xff,0x82,0xe0,0x54,0x08,0xad,0x6a,0xae,0x69,0xaf,0x68,
+0x12,0x03,0x0f,0x80,0x3d,0x15,0x49,0x30,0x02,0x1d,0xe5,0x49,0x75,0xf0,0x08,0xa4,
+0x24,0x48,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xe0,0x54,0x08,0xad,0x6a,0xae,0x69,
+0xaf,0x68,0x12,0x03,0x0f,0x80,0x1b,0xe5,0x49,0x75,0xf0,0x08,0xa4,0x24,0x08,0xf5,
+0x82,0xe4,0x34,0xff,0xf5,0x83,0xe0,0x54,0x08,0xad,0x6a,0xae,0x69,0xaf,0x68,0x12,
+0x03,0x0f,0xad,0x6a,0xae,0x69,0xaf,0x68,0x12,0x01,0xe6,0x60,0x0b,0xad,0x6a,0xae,
+0x69,0xaf,0x68,0x74,0x01,0x12,0x03,0x0f,0x7c,0x02,0x12,0x30,0x24,0x22,0x80,0x00,
+0x02,0x2c,0x6a,0xe5,0x6d,0x20,0xe7,0x06,0xe5,0x72,0x45,0x71,0x60,0x03,0x02,0x2c,
+0x6a,0x90,0xff,0x00,0xe0,0x54,0x1f,0xb4,0x00,0x02,0x80,0x03,0xd3,0x40,0x1a,0xe5,
+0x4c,0x14,0x45,0x4b,0x70,0x04,0xe5,0x4a,0x60,0x03,0x02,0x29,0x0c,0x78,0xad,0xe6,
+0x54,0xfe,0xf6,0x7c,0x00,0x12,0x30,0x24,0x22,0xb4,0x01,0x02,0x80,0x03,0xd3,0x40,
+0x2a,0xe5,0x6d,0x20,0xe1,0x08,0xe5,0x6d,0x20,0xe0,0x03,0x02,0x29,0x0c,0xe5,0x6d,
+0x30,0xe0,0x04,0xe5,0x4a,0x70,0x0b,0xe5,0x6d,0x30,0xe1,0x09,0xe5,0x4a,0x24,0xfe,
+0x50,0x03,0x02,0x29,0x0c,0x7c,0x00,0x12,0x30,0x24,0x22,0xb4,0x02,0x02,0x80,0x06,
+0xd3,0x50,0x03,0x02,0x29,0x0a,0xe5,0x4c,0x45,0x4b,0x60,0x03,0x02,0x29,0x0c,0xac,
+0x4a,0x12,0x30,0xab,0x40,0x03,0x02,0x29,0x0c,0xe5,0x6d,0x20,0xe1,0x07,0xe5,0x6d,
+0x20,0xe0,0x02,0x80,0x77,0xe5,0x6d,0x30,0xe0,0x06,0xe5,0x49,0x60,0x02,0x80,0x6c,
+0xe5,0x49,0x70,0x0f,0x90,0xff,0x82,0xe0,0x54,0xf7,0xf0,0x90,0xff,0x80,0xe0,0x54,
+0xf7,0xf0,0x22,0xe5,0x49,0xb4,0x01,0x02,0x80,0x03,0xd3,0x40,0x09,0x7d,0x01,0x7c,
+0x03,0x12,0x0f,0x09,0x80,0x11,0xb4,0x02,0x02,0x80,0x03,0xd3,0x40,0x09,0x7d,0x01,
+0x7c,0x04,0x12,0x0f,0x09,0x80,0x00,0x15,0x49,0x30,0x02,0x15,0xe5,0x49,0x75,0xf0,
+0x08,0xa4,0x24,0x48,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xe0,0x54,0xf7,0xf0,0x80,
+0x13,0xe5,0x49,0x75,0xf0,0x08,0xa4,0x24,0x08,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,
+0xe0,0x54,0xf7,0xf0,0x7c,0x00,0x12,0x30,0x24,0x22,0x80,0x00,0x02,0x2c,0x6a,0xe5,
+0x6d,0x20,0xe7,0x06,0xe5,0x72,0x45,0x71,0x60,0x03,0x02,0x2c,0x6a,0x90,0xff,0x00,
+0xe0,0x54,0x1f,0xb4,0x00,0x02,0x80,0x03,0xd3,0x40,0x1a,0xe5,0x4c,0x14,0x45,0x4b,
+0x70,0x04,0xe5,0x4a,0x60,0x03,0x02,0x29,0xef,0x78,0xad,0xe6,0x44,0x01,0xf6,0x7c,
+0x00,0x12,0x30,0x24,0x22,0xb4,0x01,0x02,0x80,0x03,0xd3,0x40,0x29,0xe5,0x6d,0x20,
+0xe1,0x08,0xe5,0x6d,0x20,0xe0,0x03,0x02,0x29,0xef,0xe5,0x6d,0x30,0xe0,0x04,0xe5,
+0x49,0x70,0x0b,0xe5,0x6d,0x30,0xe1,0x08,0xe5,0x49,0x24,0xfe,0x50,0x02,0x80,0x7f,
+0x7c,0x00,0x12,0x30,0x24,0x22,0xb4,0x02,0x02,0x80,0x03,0xd3,0x40,0x6f,0xe5,0x4c,
+0x45,0x4b,0x60,0x02,0x80,0x69,0xac,0x4a,0x12,0x30,0xab,0x40,0x02,0x80,0x60,0xe5,
+0x6d,0x20,0xe1,0x07,0xe5,0x6d,0x20,0xe0,0x02,0x80,0x54,0xe5,0x49,0x70,0x14,0x30,
+0x02,0x09,0x90,0xff,0x80,0xe0,0x44,0x08,0xf0,0x80,0x07,0x90,0xff,0x82,0xe0,0x44,
+0x08,0xf0,0x22,0xe5,0x6d,0x30,0xe1,0x33,0x15,0x49,0x30,0x02,0x15,0xe5,0x49,0x75,
+0xf0,0x08,0xa4,0x24,0x48,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xe0,0x44,0x08,0xf0,
+0x80,0x13,0xe5,0x49,0x75,0xf0,0x08,0xa4,0x24,0x08,0xf5,0x82,0xe4,0x34,0xff,0xf5,
+0x83,0xe0,0x44,0x08,0xf0,0x7c,0x00,0x12,0x30,0x24,0x22,0x80,0x02,0x80,0x00,0x02,
+0x2c,0x6a,0xe5,0x6d,0x20,0xe7,0x12,0xe5,0x72,0x45,0x71,0x70,0x0c,0xe5,0x4a,0x70,
+0x08,0x90,0xff,0x00,0xe0,0x54,0x1f,0x60,0x03,0x02,0x2c,0x6a,0xe5,0x4c,0x90,0xff,
+0xff,0xf0,0x90,0xff,0xff,0xe0,0x60,0x05,0x43,0x6d,0x01,0x80,0x03,0x53,0x6d,0xfe,
+0x7c,0x00,0x12,0x30,0x24,0x22,0xe5,0x6d,0x30,0xe7,0x0e,0xe5,0x72,0x45,0x71,0x60,
+0x08,0x90,0xff,0x00,0xe0,0x54,0x1f,0x60,0x03,0x02,0x2c,0x6a,0xad,0x4b,0xe5,0x4c,
+0xed,0x7d,0x00,0xfc,0x7d,0x00,0xfc,0xbd,0x00,0x02,0x80,0x03,0x02,0x2b,0x88,0xb4,
+0x01,0x02,0x80,0x03,0xd3,0x40,0x32,0xe5,0x4a,0x70,0x05,0xe5,0x4c,0xfc,0x60,0x03,
+0x02,0x2b,0x8a,0x75,0x6a,0x40,0x75,0x69,0xf8,0x75,0x68,0x01,0xd3,0xe5,0x72,0x94,
+0x12,0xe5,0x71,0x94,0x00,0x40,0x06,0xe4,0xfd,0x7c,0x12,0x80,0x04,0xac,0x72,0xad,
+0x71,0x8c,0x70,0x8d,0x6f,0x12,0x30,0x39,0x22,0xb4,0x02,0x02,0x80,0x03,0xd3,0x40,
+0x59,0xe5,0x4a,0x60,0x03,0x02,0x2b,0x8a,0xe5,0x4c,0xfc,0x70,0x27,0x75,0x6a,0x52,
+0x75,0x69,0xf8,0x75,0x68,0x01,0xd3,0xe5,0x72,0x94,0x19,0xe5,0x71,0x94,0x00,0x40,
+0x06,0xe4,0xfd,0x7c,0x19,0x80,0x04,0xac,0x72,0xad,0x71,0x8c,0x70,0x8d,0x6f,0x12,
+0x30,0x39,0x80,0x25,0x75,0x6a,0x6b,0x75,0x69,0xf8,0x75,0x68,0x01,0xd3,0xe5,0x72,
+0x94,0x27,0xe5,0x71,0x94,0x00,0x40,0x06,0xe4,0xfd,0x7c,0x27,0x80,0x04,0xac,0x72,
+0xad,0x71,0x8c,0x70,0x8d,0x6f,0x12,0x30,0x39,0x22,0xb4,0x03,0x02,0x80,0x06,0xd3,
+0x50,0x03,0x02,0x2b,0x88,0xe5,0x4c,0xf5,0x49,0x70,0x0f,0x90,0xff,0x04,0xe0,0xfd,
+0xa3,0xe0,0x4d,0x60,0x03,0x02,0x2b,0x8a,0x80,0x18,0x90,0xfb,0x02,0xe0,0xfd,0xa3,
+0xe0,0xfc,0x90,0xff,0x05,0xe0,0x6c,0x70,0x07,0x90,0xff,0x04,0xe0,0x6d,0x60,0x02,
+0x80,0x68,0xe4,0xf5,0x70,0xf5,0x6f,0x7f,0x00,0xe5,0x49,0x14,0xc5,0x49,0x60,0x0f,
+0xef,0x24,0x00,0xf5,0x82,0xe4,0x34,0xfb,0xf5,0x83,0xe0,0x2f,0xff,0x80,0xea,0x8f,
+0x4a,0xe5,0x4a,0x24,0x00,0xf5,0x82,0xe4,0x34,0xfb,0xf5,0x83,0xe0,0x7d,0x00,0xd3,
+0x95,0x72,0xed,0x95,0x71,0x40,0x06,0xac,0x72,0xad,0x71,0x80,0x0f,0xe5,0x4a,0x24,
+0x00,0xf5,0x82,0xe4,0x34,0xfb,0xf5,0x83,0xe0,0x7d,0x00,0xfc,0x8c,0x70,0x8d,0x6f,
+0xe5,0x4a,0x24,0x00,0xfc,0xe4,0x34,0xfb,0xfd,0xfe,0xec,0xfd,0x7f,0x01,0x8d,0x6a,
+0x8e,0x69,0x8f,0x68,0x12,0x30,0x39,0x22,0x80,0x00,0x02,0x2c,0x6a,0x02,0x2c,0x6a,
+0xe5,0x6d,0x30,0xe7,0x19,0xe5,0x72,0x14,0x45,0x71,0x70,0x12,0xe5,0x4a,0x70,0x0e,
+0xe5,0x4c,0x45,0x4b,0x70,0x08,0x90,0xff,0x00,0xe0,0x54,0x1f,0x60,0x03,0x02,0x2c,
+0x6a,0xe5,0x6d,0x20,0xe0,0x08,0xe5,0x6d,0x20,0xe1,0x03,0x02,0x2c,0x6a,0x75,0x6a,
+0x6e,0xe4,0xf5,0x69,0xf5,0x68,0xe4,0xf5,0x6f,0x04,0xf5,0x70,0x12,0x30,0x39,0x22,
+0xe5,0x6d,0x20,0xe7,0x12,0xe5,0x72,0x45,0x71,0x70,0x0c,0xe5,0x4a,0x70,0x08,0x90,
+0xff,0x00,0xe0,0x54,0x1f,0x60,0x03,0x02,0x2c,0x6a,0xe5,0x6d,0x20,0xe0,0x07,0xe5,
+0x6d,0x20,0xe1,0x02,0x80,0x74,0x85,0x4c,0x6e,0xe5,0x6e,0x70,0x08,0x43,0x6d,0x01,
+0x53,0x6d,0xfd,0x80,0x06,0x53,0x6d,0xfe,0x43,0x6d,0x02,0x7c,0x00,0x12,0x30,0x24,
+0x22,0xe5,0x6d,0x30,0xe7,0x1a,0xe5,0x72,0x14,0x45,0x71,0x70,0x13,0xe5,0x4a,0x70,
+0x0f,0xe5,0x4c,0x45,0x4b,0x70,0x09,0x90,0xff,0x00,0xe0,0x54,0x1f,0x14,0x60,0x02,
+0x80,0x38,0xe5,0x6d,0x20,0xe1,0x02,0x80,0x31,0x7c,0x01,0x12,0x30,0x24,0x22,0xe5,
+0x6d,0x20,0xe7,0x15,0xe5,0x72,0x45,0x71,0x70,0x0f,0xe5,0x4c,0x45,0x4b,0x70,0x09,
+0x90,0xff,0x00,0xe0,0x54,0x1f,0x14,0x60,0x02,0x80,0x0f,0xe5,0x6d,0x20,0xe1,0x02,
+0x80,0x08,0x7c,0x00,0x12,0x30,0x24,0x22,0x80,0x00,0x02,0x2f,0x2b,0xb4,0x40,0x02,
+0x80,0x06,0xd3,0x50,0x03,0x02,0x2f,0x21,0x90,0xff,0x01,0xe0,0x90,0xfc,0x35,0xf0,
+0xe5,0x4a,0x90,0xfc,0x36,0xf0,0xe4,0x90,0xfc,0x37,0xf0,0xe5,0x6a,0x24,0x03,0xf5,
+0x6a,0xe5,0x69,0x34,0x00,0xf5,0x69,0xad,0x4b,0xe5,0x4c,0x85,0x6a,0x82,0x85,0x69,
+0x83,0xcd,0xf0,0xa3,0xcd,0xf0,0x90,0xff,0x01,0xe0,0x12,0x01,0xb7,0x2c,0xd8,0x01,
+0x2c,0xfe,0x02,0x2d,0x28,0x03,0x2d,0x52,0x04,0x2d,0xa0,0x05,0x2d,0xdd,0x06,0x2e,
+0x03,0x07,0x2e,0x29,0x08,0x2e,0x55,0x09,0x2e,0x7b,0x0b,0x2e,0xa1,0x0c,0x2e,0xb0,
+0x80,0x2e,0xb0,0x81,0x00,0x00,0x2f,0x0e,0xe5,0x6d,0x20,0xe7,0x06,0x7c,0x05,0x12,
+0x25,0xbf,0x22,0x7d,0x24,0x7e,0x35,0x7f,0x02,0x79,0x38,0x7a,0xfc,0x7b,0x01,0x74,
+0x08,0x78,0x00,0x12,0x03,0x3f,0x7d,0x08,0x7c,0x00,0x12,0x25,0x26,0x22,0xe5,0x6d,
+0x20,0xe7,0x06,0x7c,0x05,0x12,0x25,0xbf,0x22,0xe5,0x4a,0xb4,0x03,0x00,0x40,0x10,
+0xb4,0x05,0x00,0x50,0x0b,0xe5,0x4a,0x7f,0x00,0xfe,0x7c,0x10,0x12,0x31,0xfb,0x22,
+0x7d,0x00,0x7c,0x07,0x12,0x25,0x26,0x22,0xe5,0x6d,0x20,0xe7,0x06,0x7c,0x05,0x12,
+0x25,0xbf,0x22,0xe5,0x4a,0xb4,0x03,0x00,0x40,0x10,0xb4,0x05,0x00,0x50,0x0b,0xe5,
+0x4a,0x7f,0x00,0xfe,0x7c,0x11,0x12,0x31,0xfb,0x22,0x7d,0x00,0x7c,0x07,0x12,0x25,
+0x26,0x22,0xe5,0x6d,0x20,0xe7,0x06,0x7c,0x05,0x12,0x25,0xbf,0x22,0xe5,0x4a,0xb4,
+0x05,0x02,0x80,0x03,0xd3,0x40,0x0a,0xe4,0xff,0x04,0xfe,0x7c,0x0a,0x12,0x31,0xfb,
+0x22,0xb4,0x01,0x02,0x80,0x03,0xd3,0x40,0x0a,0xe4,0xff,0x04,0xfe,0x7c,0x08,0x12,
+0x31,0xfb,0x22,0xb4,0x03,0x00,0x40,0x10,0xb4,0x05,0x00,0x50,0x0b,0xe5,0x4a,0x7f,
+0x00,0xfe,0x7c,0x13,0x12,0x31,0xfb,0x22,0x7d,0x00,0x7c,0x07,0x12,0x25,0x26,0x22,
+0xe5,0x6d,0x20,0xe7,0x34,0xd3,0xe5,0x72,0x94,0x48,0xe5,0x71,0x94,0x00,0x50,0x06,
+0xe5,0x72,0x45,0x71,0x70,0x06,0x7c,0x02,0x12,0x25,0xbf,0x22,0xe5,0x4a,0xb4,0x01,
+0x03,0xb3,0x40,0x0b,0xc3,0xb4,0x03,0x00,0x40,0x09,0xb4,0x06,0x00,0x50,0x04,0x12,
+0x30,0xd1,0x22,0x7c,0x07,0x12,0x25,0xbf,0x22,0x12,0x25,0x5d,0x22,0xe5,0x6d,0x20,
+0xe7,0x1d,0xe5,0x4a,0xb4,0x03,0x00,0x40,0x10,0xb4,0x05,0x00,0x50,0x0b,0xe5,0x4a,
+0x7f,0x00,0xfe,0x7c,0x16,0x12,0x31,0xfb,0x22,0x7c,0x07,0x12,0x25,0xbf,0x22,0x12,
+0x25,0x5d,0x22,0xe5,0x6d,0x20,0xe7,0x1d,0xe5,0x4a,0xb4,0x03,0x00,0x40,0x10,0xb4,
+0x05,0x00,0x50,0x0b,0xe5,0x4a,0x7f,0x00,0xfe,0x7c,0x19,0x12,0x31,0xfb,0x22,0x7c,
+0x07,0x12,0x25,0xbf,0x22,0x12,0x25,0x5d,0x22,0xe5,0x6d,0x20,0xe7,0x23,0x74,0x81,
+0x90,0xff,0x93,0xf0,0xe5,0x4a,0xb4,0x03,0x00,0x40,0x10,0xb4,0x05,0x00,0x50,0x0b,
+0xe5,0x4a,0x7f,0x00,0xfe,0x7c,0x17,0x12,0x31,0xfb,0x22,0x7c,0x07,0x12,0x25,0xbf,
+0x22,0x12,0x25,0x5d,0x22,0xe5,0x6d,0x20,0xe7,0x1d,0xe5,0x4a,0xb4,0x03,0x00,0x40,
+0x10,0xb4,0x05,0x00,0x50,0x0b,0xe5,0x4a,0x7f,0x00,0xfe,0x7c,0x18,0x12,0x31,0xfb,
+0x22,0x7c,0x07,0x12,0x25,0xbf,0x22,0x12,0x25,0x5d,0x22,0xe5,0x6d,0x20,0xe7,0x1d,
+0xe5,0x4a,0xb4,0x03,0x00,0x40,0x10,0xb4,0x05,0x00,0x50,0x0b,0xe5,0x4a,0x7f,0x00,
+0xfe,0x7c,0x15,0x12,0x31,0xfb,0x22,0x7c,0x07,0x12,0x25,0xbf,0x22,0x12,0x25,0x5d,
+0x22,0xe5,0x6d,0x20,0xe7,0x06,0x7c,0x07,0x12,0x25,0xbf,0x22,0x12,0x25,0x5d,0x22,
+0xe5,0x6d,0x30,0xe7,0x20,0x90,0xff,0x00,0xe0,0x54,0x1f,0x70,0x10,0x90,0xff,0x01,
+0xe0,0xb4,0x80,0x05,0x12,0x25,0x54,0x80,0x03,0x12,0x25,0x5d,0x22,0x7d,0x00,0x7c,
+0x05,0x12,0x25,0x26,0x22,0x90,0xff,0x00,0xe0,0x54,0x1f,0x60,0x06,0x7c,0x05,0x12,
+0x25,0xbf,0x22,0xd3,0xe5,0x72,0x94,0x48,0xe5,0x71,0x94,0x00,0x50,0x0b,0xc3,0xe5,
+0x72,0x94,0x07,0xe5,0x71,0x94,0x00,0x50,0x06,0x7c,0x03,0x12,0x25,0xbf,0x22,0xe5,
+0x4a,0xb4,0x05,0x04,0x12,0x30,0xd1,0x22,0x7c,0x07,0x12,0x25,0xbf,0x22,0xe5,0x6d,
+0x30,0xe7,0x08,0x7d,0x00,0x7c,0x05,0x12,0x25,0x26,0x22,0x7c,0x05,0x12,0x25,0xbf,
+0x22,0xb4,0x20,0x02,0x80,0x03,0xd3,0x40,0x00,0x80,0x00,0x12,0x2f,0xff,0x22,0x75,
+0x43,0x00,0x90,0xff,0x83,0xe0,0x54,0x0f,0xd3,0x95,0x43,0x40,0x24,0xe5,0x43,0x24,
+0xf0,0xf5,0x82,0xe4,0x34,0xfe,0xf5,0x83,0xe0,0xad,0x6a,0xae,0x69,0xaf,0x68,0x12,
+0x03,0x0f,0x05,0x43,0x0d,0xed,0x70,0x01,0x0e,0x8d,0x6a,0x8e,0x69,0x8f,0x68,0x80,
+0xd1,0xe5,0x43,0x7d,0x00,0xfc,0xc3,0xe5,0x70,0x9c,0xf5,0x70,0xe5,0x6f,0x9d,0xf5,
+0x6f,0xe5,0x70,0x45,0x6f,0x60,0x06,0xe4,0x90,0xff,0x83,0xf0,0x22,0x90,0xff,0x82,
+0xe0,0x44,0x08,0xf0,0xe4,0xf5,0x6f,0x75,0x70,0x49,0x90,0xfc,0x35,0xe0,0xb4,0x05,
+0x02,0x80,0x03,0xd3,0x40,0x40,0x90,0xfc,0x36,0xe0,0xf5,0x43,0xb4,0x05,0x02,0x80,
+0x03,0xd3,0x40,0x0a,0xe4,0xff,0x04,0xfe,0x7c,0x0b,0x12,0x31,0xfb,0x22,0xb4,0x01,
+0x02,0x80,0x03,0xd3,0x40,0x0a,0xe4,0xff,0x04,0xfe,0x7c,0x09,0x12,0x31,0xfb,0x22,
+0xb4,0x03,0x00,0x40,0x10,0xb4,0x05,0x00,0x50,0x0b,0xe5,0x43,0x7f,0x00,0xfe,0x7c,
+0x14,0x12,0x31,0xfb,0x22,0x22,0xb4,0x80,0x00,0x40,0x23,0xb4,0x82,0x00,0x50,0x1e,
+0x7c,0x35,0x7d,0xfc,0x12,0x17,0x7e,0x7d,0x00,0x8c,0x6c,0x8d,0x6b,0x90,0xfc,0x37,
+0xe0,0x60,0x05,0x12,0x2f,0xff,0x80,0x05,0x7c,0x00,0x12,0x30,0x24,0x22,0x22,0x90,
+0xff,0x83,0xe0,0x54,0x7f,0xf0,0x90,0xff,0x82,0xe0,0x44,0x08,0xf0,0x90,0xff,0x80,
+0xe0,0x44,0x08,0xf0,0x22,0x90,0xff,0x82,0xe0,0x44,0x08,0xf0,0x90,0xff,0x80,0xe0,
+0x44,0x08,0xf0,0x22,0x8c,0x23,0x7d,0x00,0x8c,0x70,0x8d,0x6f,0x75,0x6a,0x35,0x75,
+0x69,0xfc,0x75,0x68,0x01,0x12,0x30,0x39,0x22,0x90,0xff,0x83,0xe0,0x54,0x7f,0xf0,
+0xe5,0x70,0x64,0x49,0x45,0x6f,0x70,0x01,0x22,0xc3,0xe5,0x70,0x94,0x08,0xe5,0x6f,
+0x94,0x00,0x40,0x15,0x75,0x21,0x08,0xe5,0x21,0x7d,0x00,0xfc,0xc3,0xe5,0x70,0x9c,
+0xf5,0x70,0xe5,0x6f,0x9d,0xf5,0x6f,0x80,0x09,0x85,0x70,0x21,0xe4,0xf5,0x6f,0x75,
+0x70,0x49,0x75,0x22,0x00,0xe5,0x22,0xc3,0x95,0x21,0x50,0x26,0xad,0x6a,0xae,0x69,
+0xaf,0x68,0x12,0x01,0xe6,0xfc,0xe5,0x22,0x24,0xf8,0xf5,0x82,0xe4,0x34,0xfe,0xf5,
+0x83,0xec,0xf0,0x05,0x22,0x0d,0xed,0x70,0x01,0x0e,0x8d,0x6a,0x8e,0x69,0x8f,0x68,
+0x80,0xd3,0xe5,0x21,0x54,0x7f,0x90,0xff,0x81,0xf0,0x22,0x8c,0x48,0x7f,0x00,0xef,
+0x24,0xfd,0x40,0x19,0xe4,0xef,0x75,0xf0,0x07,0xa4,0x24,0x7f,0xf5,0x82,0xe4,0x34,
+0xf8,0xf5,0x83,0xe0,0x65,0x48,0x70,0x02,0xd3,0x22,0x0f,0x80,0xe2,0x8f,0x47,0xc3,
+0x22,0x85,0x72,0x70,0x85,0x71,0x6f,0x90,0xff,0x82,0xe0,0x54,0xf7,0xf0,0x90,0xff,
+0x83,0xe0,0x54,0x7f,0xf0,0x22,0xc0,0x00,0xc0,0x01,0xc0,0x02,0xc0,0x06,0xc0,0x07,
+0xe5,0x78,0x24,0x08,0xf8,0x86,0x06,0x53,0x06,0x7f,0x7c,0xff,0x12,0x31,0x5b,0x7c,
+0x00,0x7d,0x00,0xe5,0x7b,0x60,0x46,0xff,0x90,0xfd,0x95,0xe0,0x54,0x7f,0x6e,0x70,
+0x0f,0xc0,0x83,0xc0,0x82,0xa3,0xe0,0xfd,0xa3,0xe0,0xfc,0xa3,0x15,0x7b,0x80,0x07,
+0xa3,0xa3,0xa3,0xdf,0xe6,0x80,0x26,0xdf,0x06,0xd0,0x82,0xd0,0x83,0x80,0x1e,0xe0,
+0xf8,0xa3,0xe0,0xf9,0xa3,0xe0,0xfa,0xd0,0x82,0xd0,0x83,0xe8,0xf0,0xa3,0xe9,0xf0,
+0xa3,0xea,0xf0,0xa3,0xc0,0x83,0xc0,0x82,0xa3,0xa3,0xa3,0x80,0xda,0x12,0x31,0xf4,
+0xd0,0x07,0xd0,0x06,0xd0,0x02,0xd0,0x01,0xd0,0x00,0x22,0x85,0xa8,0x7a,0x75,0xa8,
+0x88,0xec,0x70,0x02,0x7c,0x3f,0x8c,0x79,0x22,0xe5,0x78,0x24,0x08,0xf8,0x76,0x00,
+0x12,0x32,0x48,0x80,0xfb,0xc0,0x00,0xc0,0x01,0xc0,0x02,0xc0,0x06,0xc0,0x07,0xae,
+0x04,0x7c,0xff,0x12,0x31,0x5b,0xe5,0x7b,0x60,0x42,0xff,0x90,0xfd,0x95,0xe0,0x54,
+0x7f,0x6e,0x70,0x0b,0xc0,0x83,0xc0,0x82,0xa3,0xa3,0xa3,0x15,0x7b,0x80,0x07,0xa3,
+0xa3,0xa3,0xdf,0xea,0x80,0x26,0xdf,0x06,0xd0,0x82,0xd0,0x83,0x80,0xd8,0xe0,0xf8,
+0xa3,0xe0,0xf9,0xa3,0xe0,0xfa,0xd0,0x82,0xd0,0x83,0xe8,0xf0,0xa3,0xe9,0xf0,0xa3,
+0xea,0xf0,0xa3,0xc0,0x83,0xc0,0x82,0xa3,0xa3,0xa3,0x80,0xda,0x78,0x08,0x08,0x79,
+0x18,0x09,0x7c,0x01,0xe6,0x54,0x7f,0x6e,0x70,0x06,0x76,0x00,0x77,0x00,0x80,0x06,
+0x08,0x09,0x0c,0xbc,0x08,0xee,0x12,0x31,0xf4,0xd0,0x07,0xd0,0x06,0xd0,0x02,0xd0,
+0x01,0xd0,0x00,0x22,0x75,0x79,0x00,0x85,0x7a,0xa8,0x22,0xc0,0xf0,0xc0,0x82,0xc0,
+0x83,0xc3,0xe5,0x7b,0x24,0xe8,0x50,0x05,0x12,0x32,0x48,0x80,0xf4,0xec,0x60,0x31,
+0x90,0x35,0x23,0xe4,0x93,0xc3,0x9c,0x40,0x28,0xc0,0x04,0x7c,0xff,0x12,0x31,0x5b,
+0xd0,0x04,0x43,0x04,0x80,0xe5,0x7b,0x75,0xf0,0x03,0xa4,0x24,0x95,0xf5,0x82,0xe4,
+0x34,0xfd,0xf5,0x83,0xec,0xf0,0xef,0xa3,0xf0,0xee,0xa3,0xf0,0x05,0x7b,0x12,0x31,
+0xf4,0xd0,0x83,0xd0,0x82,0xd0,0xf0,0x22,0xc0,0x04,0x7c,0x20,0xd2,0x8c,0xd2,0x8d,
+0xd5,0x04,0xfd,0xd0,0x04,0x22,0x75,0xa8,0x00,0x75,0x88,0x00,0x75,0xb8,0x00,0x75,
+0xf0,0x00,0x75,0xd0,0x00,0xe4,0xf8,0x90,0x00,0x00,0xf6,0x08,0xb8,0x00,0xfb,0x02,
+0x00,0x00,0xc3,0xed,0x94,0x02,0x50,0x04,0x7d,0x03,0x7c,0xe8,0xec,0xf4,0xfc,0xed,
+0xf4,0xfd,0x0c,0xbc,0x00,0x01,0x0d,0x8c,0x7f,0x8d,0x7e,0x22,0xc3,0xec,0x94,0xbc,
+0xed,0x94,0x02,0x50,0x04,0x7d,0x07,0x7c,0xd0,0xec,0xf4,0xfc,0xed,0xf4,0xfd,0x0c,
+0xbc,0x00,0x01,0x0d,0x8c,0x7d,0x8d,0x7c,0x22,0xec,0x70,0x01,0x22,0xc0,0x00,0xe5,
+0x78,0x24,0x18,0xf8,0xa6,0x04,0xe5,0x78,0x24,0x08,0xf8,0xc6,0x54,0x7f,0xf6,0xe6,
+0x30,0xe7,0x03,0xd0,0x00,0x22,0x12,0x32,0x48,0x80,0xf4,0xc2,0x8c,0x85,0x7c,0x8c,
+0x85,0x7d,0x8a,0xd2,0x8c,0xc0,0xe0,0xc0,0xd0,0xc0,0xf0,0xc0,0x82,0xc0,0x83,0xc0,
+0x00,0xc0,0x01,0xc0,0x02,0xc0,0x03,0xc0,0x04,0xc0,0x05,0xc0,0x06,0xc0,0x07,0x12,
+0x1a,0xd1,0xe5,0x78,0x24,0x08,0xf8,0xe6,0x60,0x24,0xe5,0x78,0x24,0x10,0xf8,0xa6,
+0x81,0xe5,0x78,0x75,0xf0,0x21,0xa4,0x24,0x8d,0xf5,0x82,0xe4,0x34,0xfc,0xf5,0x83,
+0x78,0xae,0xe5,0x81,0x04,0xc3,0x98,0xf9,0xe6,0xf0,0x08,0xa3,0xd9,0xfa,0x74,0x08,
+0x25,0x78,0xf8,0x05,0x78,0x08,0xe6,0x54,0x80,0x70,0x0c,0xe5,0x78,0xb4,0x07,0xf3,
+0x78,0x08,0x75,0x78,0x00,0x80,0xef,0xe5,0x78,0x24,0x10,0xf8,0x86,0x81,0xe5,0x78,
+0x75,0xf0,0x21,0xa4,0x24,0x8d,0xf5,0x82,0xe4,0x34,0xfc,0xf5,0x83,0x78,0xae,0xe5,
+0x81,0x04,0xc3,0x98,0xf9,0xe0,0xf6,0x08,0xa3,0xd9,0xfa,0xd0,0x07,0xd0,0x06,0xd0,
+0x05,0xd0,0x04,0xd0,0x03,0xd0,0x02,0xd0,0x01,0xd0,0x00,0xd0,0x83,0xd0,0x82,0xd0,
+0xf0,0xd0,0xd0,0xd0,0xe0,0x32,0xc0,0xe0,0xc0,0xd0,0xc0,0x00,0xc0,0x01,0xc0,0x02,
+0xc2,0x8e,0x85,0x7e,0x8d,0x85,0x7f,0x8b,0xd2,0x8e,0x78,0x19,0x79,0x09,0x7a,0x07,
+0xe7,0x70,0x04,0xa6,0x00,0x80,0x0b,0xe6,0x60,0x08,0x16,0xe6,0x70,0x04,0xe7,0x44,
+0x80,0xf7,0x08,0x09,0xda,0xea,0xe5,0x79,0x60,0x13,0x14,0xf5,0x79,0x70,0x0e,0xe5,
+0x78,0x24,0x08,0xf8,0x76,0x00,0x12,0x31,0xf4,0xd2,0x8c,0xd2,0x8d,0xd0,0x02,0xd0,
+0x01,0xd0,0x00,0xd0,0xd0,0xd0,0xe0,0x32,0x75,0x81,0xad,0x74,0x2a,0x90,0xff,0x93,
+0xf0,0x75,0x7f,0x30,0x75,0x7e,0xf8,0x75,0x7d,0x60,0x75,0x7c,0xf0,0x12,0x05,0x36,
+0x12,0x34,0x7c,0x12,0x17,0x34,0x90,0xff,0x93,0xe0,0x44,0x01,0xf0,0xb2,0xb3,0x12,
+0x34,0xa6,0x12,0x32,0x56,0x80,0xda,0x22,0xc0,0x00,0x7c,0x01,0xec,0x24,0x08,0xf8,
+0xe6,0x60,0x09,0x0c,0xbc,0x08,0xf5,0x12,0x32,0x48,0x80,0xee,0xd0,0x00,0x22,0xc0,
+0xf0,0xc0,0x82,0xc0,0x83,0xc0,0x00,0xc0,0x06,0xc0,0x07,0xed,0x24,0x10,0xf8,0x76,
+0xbc,0xed,0x75,0xf0,0x21,0xa4,0x24,0x8d,0xf5,0x82,0xe4,0x34,0xfc,0xf5,0x83,0xc0,
+0x82,0xc0,0x83,0xa3,0xa3,0xe4,0x78,0x0d,0xf0,0xa3,0xd8,0xfc,0xec,0x54,0x7f,0x75,
+0xf0,0x02,0xa4,0x24,0xef,0xf5,0x82,0xe5,0xf0,0x34,0x34,0xf5,0x83,0xe4,0x93,0xfe,
+0x74,0x01,0x93,0xf5,0x82,0x8e,0x83,0xe4,0x93,0xfe,0x74,0x01,0x93,0xff,0xd0,0x83,
+0xd0,0x82,0xef,0xf0,0xa3,0xee,0xf0,0xed,0x24,0x08,0xf8,0xec,0x44,0x80,0xf6,0xd0,
+0x07,0xd0,0x06,0xd0,0x00,0xd0,0x83,0xd0,0x82,0xd0,0xf0,0x22,0x75,0x78,0x00,0x75,
+0x7b,0x00,0x7a,0x08,0x79,0x18,0x78,0x08,0x76,0x00,0x77,0x00,0x08,0x09,0xda,0xf8,
+0xe4,0x78,0x08,0x74,0x80,0x44,0x7f,0xf6,0x74,0x01,0x44,0x10,0xf5,0x89,0x75,0xb8,
+0x08,0xd2,0xab,0xd2,0xa9,0x22,0x75,0x81,0xad,0xd2,0x8e,0xd2,0x8c,0xd2,0xaf,0xe5,
+0x7b,0x60,0x32,0xff,0x90,0xfd,0x95,0xe0,0x54,0x80,0x60,0x24,0x78,0x08,0x79,0x08,
+0xe0,0x54,0x7f,0xfa,0x7b,0x00,0xe6,0x54,0x7f,0xb5,0x02,0x02,0x7b,0xff,0x08,0xd9,
+0xf5,0xeb,0x70,0x0c,0xea,0xf0,0x12,0x33,0xf8,0xad,0x04,0xac,0x02,0x12,0x34,0x0f,
+0xa3,0xa3,0xa3,0xdf,0xd2,0x12,0x32,0x48,0x80,0xc5,0x7c,0x01,0x7d,0x00,0x22,0x04,
+0xf5,0x04,0xe9,0x04,0xed,0x04,0xe1,0x04,0xdd,0x04,0xd9,0x04,0xe5,0x04,0xf1,0x04,
+0x9d,0x04,0xa1,0x04,0xcd,0x04,0xd1,0x04,0x99,0x04,0x99,0x04,0x99,0x04,0xd5,0x04,
+0xb5,0x04,0xad,0x04,0xb1,0x04,0xa9,0x04,0xc1,0x04,0xbd,0x04,0xb9,0x04,0xc5,0x04,
+0xc9,0x04,0xa5,0x19,0x01,0x03,0x00,0x22,0x00,0x48,0x02,0x00,0x48,0x0e,0x30,0x14,
+0x20,0xc8,0x1a,0xd0,0x18,0x0a,0x0c,0x05,0x06,0x02,0x03,0x01,0x02,0x00,0x01,0xce,
+0x01,0x81,0x01,0x00,0x00,0xc0,0x00,0x80,0x00,0x60,0x00,0x30,0x00,0x18,0x00,0x10,
+0x00,0x08,0x00,0x04,0x00,0x02,0x00,0x01,0x00,0x08,0x18,0x38,0x28,0x0c,0x05,0x10,
+0x0a,0x02,0x00,0x00,0x00,0x00,0x00,0x03,0x01,0x10,0x0a,0x02,0x00,0x00,0x00,0x00,
+0x00,0xfb,0xe0,0xfb,0xf2,0x09,0x02,0x27,0x00,0x01,0x02,0x00,0xa0,0x32,0x09,0x04,
+0x00,0x00,0x03,0xff,0x00,0x00,0x00,0x07,0x05,0x81,0x02,0x40,0x00,0x00,0x07,0x05,
+0x01,0x02,0x40,0x00,0x00,0x07,0x05,0x83,0x03,0x02,0x00,0x01,0x22,0x03,0x54,0x00,
+0x55,0x00,0x53,0x00,0x42,0x00,0x33,0x00,0x34,0x00,0x31,0x00,0x30,0x00,0x20,0x00,
+0x20,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x00,0x00,
+0x00,0x00,
+};
+
+#endif /* ifndef _TI_FW_3410_H_ */
diff -Nru a/drivers/usb/serial/ti_fw_5052.h b/drivers/usb/serial/ti_fw_5052.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/usb/serial/ti_fw_5052.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,885 @@
+/* vi: ts=8 sw=8
+ *
+ * TI 5052 USB Serial Driver Firmware Header
+ *
+ * Copyright (C) 2004 Texas Instruments
+ *
+ * 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 _TI_FW_5052_H_
+#define _TI_FW_5052_H_
+
+/* firmware 9/18/04 */
+
+static unsigned char ti_fw_5052[] = {
+0xC1, 0x35,	/* firmware image length excluding header, little endian */
+0x00, 		/* placeholder for checksum */
+
+0x02,0x00,0x1e,0x02,0x1b,0x32,0xff,0xff,0xff,0xff,0xff,0x02,0x32,0x6a,0xff,0xff,
+0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x02,0x33,0x15,0x75,0x81,
+0xc8,0x90,0xfe,0xf0,0x85,0x83,0xa0,0x12,0x34,0x7d,0xec,0x4d,0x60,0x6a,0x78,0xa5,
+0x80,0x03,0x76,0x00,0x18,0xb8,0x96,0xfa,0x78,0x79,0x80,0x03,0x76,0x00,0x18,0xb8,
+0x5f,0xfa,0x78,0x20,0x80,0x03,0x76,0x00,0x18,0xb8,0x20,0xfa,0x90,0xfe,0xe5,0xae,
+0x83,0xaf,0x82,0x90,0xfd,0x00,0x12,0x00,0xa1,0x60,0x05,0xe4,0xf0,0xa3,0x80,0xf6,
+0x90,0xfe,0xf0,0xa8,0x82,0x90,0xfe,0xf0,0xa9,0x82,0xe8,0xc3,0x99,0x50,0x05,0x76,
+0x00,0x08,0x80,0xf6,0x90,0x00,0xff,0x12,0x00,0xaa,0x90,0x01,0x03,0x12,0x00,0xaa,
+0x90,0x01,0x07,0x12,0x00,0xaa,0x90,0x01,0x0b,0x12,0x00,0xc8,0x90,0x01,0x11,0x12,
+0x00,0xc8,0x90,0x01,0x17,0x12,0x00,0xc8,0x75,0xd0,0x00,0x12,0x33,0x67,0x02,0x01,
+0x1d,0xef,0x65,0x82,0x70,0x03,0xee,0x65,0x83,0x22,0xe4,0x93,0xf8,0x74,0x01,0x93,
+0xf9,0x74,0x02,0x93,0xfe,0x74,0x03,0x93,0xf5,0x82,0x8e,0x83,0xe8,0x69,0x70,0x01,
+0x22,0xe4,0x93,0xf6,0xa3,0x08,0x80,0xf4,0xe4,0x93,0xfc,0x74,0x01,0x93,0xfd,0x74,
+0x02,0x93,0xfe,0x74,0x03,0x93,0xff,0x74,0x04,0x93,0xf8,0x74,0x05,0x93,0xf5,0x82,
+0x88,0x83,0x12,0x00,0xa1,0x70,0x01,0x22,0xe4,0x93,0xa3,0xa8,0x83,0xa9,0x82,0x8c,
+0x83,0x8d,0x82,0xf0,0xa3,0xac,0x83,0xad,0x82,0x88,0x83,0x89,0x82,0x80,0xe3,0x21,
+0x21,0x04,0x92,0x7a,0x7a,0x04,0x92,0xa6,0xa8,0x04,0x92,0xfe,0xf0,0x04,0x94,0x04,
+0x94,0xfb,0xfb,0x04,0x99,0x04,0x94,0xfb,0xfb,0x04,0xf9,0x04,0xf9,0x80,0xfe,0xd0,
+0xf0,0x30,0xf0,0x09,0x20,0xf3,0x03,0xf6,0x80,0x10,0xf7,0x80,0x0d,0x30,0xf1,0x09,
+0x20,0xf3,0x03,0xf2,0x80,0x04,0xf3,0x80,0x01,0xf0,0x20,0xf4,0x04,0xfc,0xd0,0xe0,
+0xcc,0x22,0xcc,0xc0,0xe0,0x12,0x01,0x5a,0x02,0x01,0x4b,0xbc,0x00,0x05,0xd0,0xf0,
+0xac,0xf0,0x22,0xc3,0x13,0xdc,0xfc,0x02,0x01,0x21,0xbf,0x00,0x09,0xed,0x25,0x82,
+0x75,0xf0,0x01,0xf8,0xe6,0x22,0xbf,0x01,0x0f,0xed,0x25,0x82,0xf5,0x82,0xee,0x35,
+0x83,0xf5,0x83,0x75,0xf0,0x04,0xe0,0x22,0xed,0x25,0x82,0x75,0xf0,0x02,0xf8,0xe2,
+0x22,0xd0,0x83,0xd0,0x82,0xf5,0xf0,0xc3,0xe4,0x93,0xa3,0xc5,0xf0,0x95,0xf0,0xc0,
+0xe0,0xc3,0xd0,0xf0,0xe4,0x93,0xa3,0x95,0xf0,0x40,0x12,0xa3,0xa3,0xc3,0xe5,0xf0,
+0x33,0x50,0x02,0x05,0x83,0x25,0x82,0xf5,0x82,0x50,0x02,0x05,0x83,0x74,0x01,0x93,
+0xc0,0xe0,0xe4,0x93,0xc0,0xe0,0x22,0xd0,0x83,0xd0,0x82,0xf5,0xf0,0xe4,0x93,0x70,
+0x09,0x74,0x01,0x93,0x70,0x04,0xa3,0xa3,0x80,0x0c,0x74,0x02,0x93,0x65,0xf0,0x60,
+0x05,0xa3,0xa3,0xa3,0x80,0xe7,0x74,0x01,0x93,0xc0,0xe0,0xe4,0x93,0xc0,0xe0,0x22,
+0x12,0x02,0x5b,0x02,0x01,0xf2,0x12,0x02,0xaf,0x02,0x01,0xf2,0x12,0x02,0xd3,0x02,
+0x01,0xf2,0x30,0xe0,0x07,0x20,0xe3,0x02,0xe6,0x22,0xe7,0x22,0x30,0xe1,0x07,0x20,
+0xe3,0x02,0xe2,0x22,0xe3,0x22,0x30,0xe2,0x02,0xe0,0x22,0xe4,0x93,0x22,0x12,0x02,
+0xd3,0x02,0x02,0x1a,0x12,0x02,0xaf,0x02,0x02,0x1a,0xab,0xf0,0x12,0x02,0x24,0xcb,
+0xc5,0xf0,0xcb,0x22,0x30,0xe0,0x10,0x20,0xe3,0x06,0xe6,0xf5,0xf0,0x08,0xe6,0x22,
+0xe7,0xf5,0xf0,0x09,0xe7,0x19,0x22,0x30,0xe1,0x10,0x20,0xe3,0x06,0xe2,0xf5,0xf0,
+0x08,0xe2,0x22,0xe3,0xf5,0xf0,0x09,0xe3,0x19,0x22,0x30,0xe2,0x06,0xe0,0xf5,0xf0,
+0xa3,0xe0,0x22,0xe4,0x93,0xf5,0xf0,0x74,0x01,0x93,0x22,0xbb,0x00,0x03,0x74,0x09,
+0x22,0xbb,0x01,0x07,0x89,0x82,0x8a,0x83,0x74,0x04,0x22,0xbb,0x02,0x07,0x89,0x82,
+0x8a,0x83,0x74,0x10,0x22,0x74,0x0a,0x22,0x02,0x02,0x7b,0xbb,0x00,0x07,0xe9,0x25,
+0x82,0xf8,0x74,0x01,0x22,0xbb,0x01,0x0d,0xe9,0x25,0x82,0xf5,0x82,0xea,0x35,0x83,
+0xf5,0x83,0x74,0x04,0x22,0xbb,0x02,0x0d,0xe9,0x25,0x82,0xf5,0x82,0xea,0x35,0x83,
+0xf5,0x83,0x74,0x10,0x22,0xe9,0x25,0x82,0xf8,0x74,0x02,0x22,0x02,0x02,0xaf,0xbf,
+0x00,0x05,0xed,0xf8,0x74,0x01,0x22,0xbf,0x01,0x07,0x8d,0x82,0x8e,0x83,0x74,0x04,
+0x22,0xbf,0x02,0x07,0x8d,0x82,0x8e,0x83,0x74,0x10,0x22,0xed,0xf8,0x74,0x02,0x22,
+0x02,0x02,0xd3,0xbf,0x00,0x07,0xed,0x25,0x82,0xf8,0x74,0x01,0x22,0xbf,0x01,0x0d,
+0xed,0x25,0x82,0xf5,0x82,0xee,0x35,0x83,0xf5,0x83,0x74,0x04,0x22,0xbf,0x02,0x0d,
+0xed,0x25,0x82,0xf5,0x82,0xee,0x35,0x83,0xf5,0x83,0x74,0x10,0x22,0xed,0x25,0x82,
+0xf8,0x74,0x02,0x22,0x02,0x03,0x07,0xc0,0xe0,0x12,0x02,0x5b,0x02,0x03,0x1f,0xc0,
+0xe0,0x12,0x02,0xaf,0x02,0x03,0x1f,0xc0,0xe0,0x12,0x02,0xd3,0x02,0x03,0x1f,0x30,
+0xe0,0x0b,0x20,0xe3,0x04,0xd0,0xe0,0xf6,0x22,0xd0,0xe0,0xf7,0x22,0x30,0xe1,0x0b,
+0x20,0xe3,0x04,0xd0,0xe0,0xf2,0x22,0xd0,0xe0,0xf3,0x22,0xd0,0xe0,0xf0,0x22,0xc9,
+0xcd,0xc9,0xca,0xce,0xca,0xcb,0xcf,0xcb,0x12,0x03,0x52,0xed,0xf9,0xee,0xfa,0xef,
+0xfb,0x22,0xbb,0x00,0x2f,0xbf,0x00,0x0a,0xfa,0xed,0xf8,0xe7,0xf6,0x08,0x09,0xda,
+0xfa,0x22,0xbf,0x01,0x12,0x8d,0x82,0x8e,0x83,0xf8,0x02,0x03,0x6f,0x09,0xa3,0xe7,
+0xf0,0xd8,0xfa,0x22,0x02,0x03,0x7a,0xfa,0xed,0xf8,0xe7,0xf2,0x08,0x09,0xda,0xfa,
+0x22,0x02,0x03,0x84,0xbb,0x01,0x4d,0xbf,0x00,0x14,0x89,0x82,0x8a,0x83,0xf9,0xed,
+0xf8,0x02,0x03,0x96,0x08,0xa3,0xe0,0xf6,0xd9,0xfa,0x22,0x02,0x03,0xa7,0xbf,0x01,
+0x22,0x8d,0x82,0x8e,0x83,0xfb,0x08,0xc9,0xc5,0x82,0xc9,0xca,0xc5,0x83,0xca,0xe0,
+0xa3,0xc9,0xc5,0x82,0xc9,0xca,0xc5,0x83,0xca,0xf0,0xa3,0xdb,0xea,0xd8,0xe8,0x22,
+0x02,0x03,0xca,0x8d,0x82,0x8e,0x83,0xf9,0xed,0xf8,0xe0,0xf2,0x08,0xa3,0xd9,0xfa,
+0x22,0x02,0x03,0xd4,0xbb,0x02,0x4d,0xbf,0x00,0x12,0x89,0x82,0x8a,0x83,0xf9,0xed,
+0xf8,0x02,0x03,0xe6,0x08,0xa3,0xe4,0x93,0xf6,0xd9,0xf9,0x22,0xbf,0x01,0x23,0x8d,
+0x82,0x8e,0x83,0xfb,0x08,0xc9,0xc5,0x82,0xc9,0xca,0xc5,0x83,0xca,0xe4,0x93,0xa3,
+0xc9,0xc5,0x82,0xc9,0xca,0xc5,0x83,0xca,0xf0,0xa3,0xdb,0xe9,0xd8,0xe7,0x22,0x02,
+0x04,0x19,0x89,0x82,0x8a,0x83,0xf9,0xed,0xf8,0xe4,0x93,0xf2,0x08,0xa3,0xd9,0xf9,
+0x22,0x02,0x04,0x2a,0xbf,0x00,0x0d,0xfa,0xed,0xf8,0xe3,0xf6,0x08,0x09,0xda,0xfa,
+0x22,0x02,0x04,0x34,0xbf,0x01,0x12,0x8d,0x82,0x8e,0x83,0xf8,0x02,0x04,0x41,0x09,
+0xa3,0xe3,0xf0,0xd8,0xfa,0x22,0x02,0x04,0x4c,0xfa,0xed,0xf8,0xe3,0xf2,0x08,0x09,
+0xda,0xfa,0x22,0x02,0x04,0x56,0xe6,0xfb,0x08,0xe6,0xfa,0x08,0xe6,0xf9,0x04,0xf6,
+0x18,0x70,0x01,0x06,0x22,0xe6,0xff,0x08,0xe6,0xfe,0x08,0xe6,0xfd,0x22,0xef,0xf0,
+0xa3,0xee,0xf0,0xa3,0xed,0xf0,0x22,0xeb,0xf0,0xa3,0xea,0xf0,0xa3,0xe9,0xf0,0x22,
+0xe0,0xff,0xa3,0xe0,0xfe,0xa3,0xe0,0xfd,0x22,0xe0,0xfb,0xa3,0xe0,0xfa,0xa3,0xe0,
+0xf9,0x22,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0xf9,0x00,0x5b,0x05,0x73,0x00,
+0x26,0x05,0x9a,0x00,0x33,0x0a,0x0b,0x00,0x5b,0x0a,0x77,0x00,0x60,0x15,0x52,0x00,
+0x5b,0x0c,0xfb,0x00,0x5b,0x09,0xab,0x00,0x5b,0x09,0xe2,0x00,0x5b,0x0d,0xc2,0x00,
+0x5b,0x0b,0xf3,0x00,0x5b,0x0a,0x1e,0x00,0x5b,0x0a,0x53,0x00,0x5b,0x17,0x4a,0x00,
+0x33,0x17,0x60,0x00,0x34,0x1e,0x4d,0x00,0x43,0x1e,0xf0,0x00,0x44,0x20,0x5d,0x00,
+0x44,0x20,0x4b,0x00,0x47,0x1f,0x17,0x00,0x47,0x1f,0xbc,0x00,0x4d,0x20,0x0d,0x00,
+0x4f,0x1f,0x39,0x00,0x58,0x31,0xf5,0x00,0x5b,0x7c,0xcc,0x7d,0xff,0x12,0x1c,0xfe,
+0x22,0x74,0x90,0x90,0xff,0x91,0xf0,0x90,0xff,0xfc,0xe0,0x20,0xe7,0x2d,0xc2,0xaf,
+0xae,0x59,0xaf,0x58,0x75,0x5a,0x20,0xe5,0x5a,0x14,0xc5,0x5a,0x60,0x19,0xe4,0xfe,
+0x7f,0x05,0xee,0x4f,0xce,0x24,0xff,0xce,0xcf,0x34,0xff,0xcf,0x60,0x07,0xe4,0x90,
+0xff,0x92,0xf0,0x80,0xed,0x80,0xe0,0x8e,0x59,0x8f,0x58,0x22,0x12,0x05,0x01,0x7d,
+0x07,0x7c,0xb7,0x12,0x32,0x11,0x7d,0x0f,0x7c,0x6e,0x12,0x32,0x2b,0x78,0x97,0x7a,
+0x06,0xe4,0xf6,0x08,0xda,0xfc,0x7a,0x06,0x12,0x05,0xcf,0x7c,0x03,0x12,0x0e,0x57,
+0x7c,0x04,0x12,0x0e,0x57,0x12,0x21,0x8b,0xe4,0xfe,0xff,0x7c,0x0f,0x12,0x31,0x9a,
+0xd2,0xa8,0x22,0x12,0x30,0x85,0xe4,0x90,0xfd,0x40,0xf0,0x90,0xff,0xf0,0xe0,0x30,
+0xe4,0x08,0x74,0x01,0x90,0xfd,0x41,0xf0,0x80,0x05,0xe4,0x90,0xfd,0x41,0xf0,0x7d,
+0x0a,0x7c,0x00,0x12,0x24,0xb1,0x12,0x31,0x08,0x22,0x12,0x30,0x85,0x90,0xfd,0x41,
+0xe0,0x14,0x70,0x0e,0x90,0xff,0xf0,0xe0,0x44,0x10,0xf0,0x7c,0x00,0x12,0x25,0x4a,
+0x80,0x19,0x90,0xfd,0x41,0xe0,0x70,0x0e,0x90,0xff,0xf0,0xe0,0x54,0xef,0xf0,0x7c,
+0x00,0x12,0x25,0x4a,0x80,0x05,0x7c,0x17,0x12,0x25,0x4a,0x12,0x31,0x08,0x22,0x90,
+0xff,0xf0,0xe0,0x54,0xab,0xf0,0x90,0xff,0xf0,0xe0,0x44,0x20,0xf0,0x22,0x8c,0x37,
+0x8d,0x36,0x78,0x7c,0xed,0xf6,0x08,0xec,0xf6,0xed,0xfe,0xec,0xfd,0x7f,0x01,0x90,
+0x00,0x05,0x12,0x01,0xec,0x78,0x7a,0xf6,0x78,0x7c,0xe6,0xfd,0x08,0xe6,0xfc,0xed,
+0xfe,0xec,0xfd,0x7f,0x01,0x90,0x00,0x04,0x12,0x01,0xec,0x54,0x0f,0xfc,0x7d,0x7a,
+0x12,0x17,0x9d,0x78,0x7a,0xe6,0x70,0x0d,0xad,0x3a,0xae,0x39,0xaf,0x38,0xe4,0x12,
+0x03,0x0f,0x7c,0x08,0x22,0x90,0xff,0xf0,0xe0,0x54,0xfe,0xf0,0x90,0xff,0xf0,0xe0,
+0x54,0xfd,0xf0,0x80,0x1e,0x78,0x7c,0xe6,0xfd,0x08,0xe6,0xfc,0xed,0xfe,0xec,0xfd,
+0x7f,0x01,0x90,0x00,0x08,0x12,0x02,0x0e,0x25,0xe0,0x44,0x01,0x90,0xff,0xf3,0xf0,
+0x02,0x06,0xdb,0x78,0x7c,0xe6,0xfd,0x08,0xe6,0xfc,0xed,0xfe,0xec,0xfd,0x7f,0x01,
+0x90,0x00,0x06,0x12,0x02,0x0e,0x54,0xfe,0x90,0xff,0xf3,0xf0,0x80,0x2b,0x78,0x7c,
+0xe6,0xfd,0x08,0xe6,0xfc,0xed,0xfe,0xec,0xfd,0x7f,0x01,0x90,0x00,0x08,0x12,0x02,
+0x0e,0xfa,0xeb,0x90,0xff,0xf1,0xf0,0x12,0x08,0xca,0x40,0x0d,0xad,0x3a,0xae,0x39,
+0xaf,0x38,0xe4,0x12,0x03,0x0f,0x7c,0x18,0x22,0x78,0x7c,0xe6,0xfd,0x08,0xe6,0xfc,
+0xed,0xfe,0xec,0xfd,0x7f,0x01,0x90,0x00,0x08,0x12,0x02,0x0e,0x90,0xff,0xf1,0xf0,
+0x12,0x08,0xca,0x40,0x0d,0xad,0x3a,0xae,0x39,0xaf,0x38,0xe4,0x12,0x03,0x0f,0x7c,
+0x18,0x22,0x78,0x7c,0xe6,0xfd,0x08,0xe6,0xfc,0xed,0xfe,0xec,0xfd,0x7f,0x01,0x90,
+0x00,0x06,0x12,0x02,0x0e,0x44,0x01,0x90,0xff,0xf3,0xf0,0x78,0x7d,0xe6,0x24,0x03,
+0xf6,0x18,0xe6,0x34,0x00,0xf6,0x78,0x7a,0xe6,0x24,0xfe,0x50,0x09,0x90,0xff,0xf0,
+0xe0,0x54,0xfd,0xf0,0x80,0x07,0x90,0xff,0xf0,0xe0,0x44,0x02,0xf0,0xe4,0x90,0xff,
+0xf1,0xf0,0x78,0x7b,0x76,0x00,0x78,0x7a,0xe6,0x24,0xff,0xfc,0xe4,0x34,0xff,0xfd,
+0x78,0x7b,0xe6,0x7f,0x00,0xfe,0xec,0xd3,0x9e,0xef,0x64,0x80,0xcd,0x64,0x80,0x9d,
+0x40,0x2f,0x12,0x08,0xaf,0x40,0x0f,0x78,0x7b,0xe6,0xad,0x3a,0xae,0x39,0xaf,0x38,
+0x12,0x03,0x0f,0x7c,0x18,0x22,0x90,0xff,0xf2,0xe0,0xfc,0x78,0x7c,0x86,0x83,0x08,
+0x86,0x82,0xec,0xf0,0x78,0x7b,0x06,0xa3,0x78,0x7c,0xa6,0x83,0x08,0xa6,0x82,0x80,
+0xb5,0x12,0x08,0xaf,0x40,0x0f,0x78,0x7b,0xe6,0xad,0x3a,0xae,0x39,0xaf,0x38,0x12,
+0x03,0x0f,0x7c,0x18,0x22,0x90,0xff,0xf2,0xe0,0xfc,0x78,0x7c,0x86,0x83,0x08,0x86,
+0x82,0xec,0xf0,0x78,0x7a,0xe6,0xad,0x3a,0xae,0x39,0xaf,0x38,0x12,0x03,0x0f,0x7c,
+0x00,0x22,0x8c,0x37,0x8d,0x36,0x78,0x7c,0xed,0xf6,0x08,0xec,0xf6,0xed,0xfe,0xec,
+0xfd,0x7f,0x01,0x90,0x00,0x05,0x12,0x01,0xec,0x78,0x7b,0xf6,0x78,0x7c,0xe6,0xfd,
+0x08,0xe6,0xfc,0xed,0xfe,0xec,0xfd,0x7f,0x01,0x90,0x00,0x04,0x12,0x01,0xec,0x54,
+0x0f,0xfc,0x7d,0x7b,0x12,0x17,0x9d,0x78,0x7b,0xe6,0x70,0x03,0x7c,0x08,0x22,0x90,
+0xff,0xf0,0xe0,0x54,0xfe,0xf0,0x90,0xff,0xf0,0xe0,0x54,0xfd,0xf0,0x80,0x1b,0x78,
+0x7c,0xe6,0xfd,0x08,0xe6,0xfc,0xed,0xfe,0xec,0xfd,0x7f,0x01,0x90,0x00,0x08,0x12,
+0x02,0x0e,0x25,0xe0,0x90,0xff,0xf3,0xf0,0x80,0x5b,0x78,0x7c,0xe6,0xfd,0x08,0xe6,
+0xfc,0xed,0xfe,0xec,0xfd,0x7f,0x01,0x90,0x00,0x06,0x12,0x02,0x0e,0x54,0xfe,0x90,
+0xff,0xf3,0xf0,0x80,0x21,0x78,0x7c,0xe6,0xfd,0x08,0xe6,0xfc,0xed,0xfe,0xec,0xfd,
+0x7f,0x01,0x90,0x00,0x08,0x12,0x02,0x0e,0xfa,0xeb,0x90,0xff,0xf1,0xf0,0x12,0x08,
+0xca,0x40,0x03,0x7c,0x18,0x22,0x78,0x7c,0xe6,0xfd,0x08,0xe6,0xfc,0xed,0xfe,0xec,
+0xfd,0x7f,0x01,0x90,0x00,0x08,0x12,0x02,0x0e,0x90,0xff,0xf1,0xf0,0x12,0x08,0xca,
+0x40,0x03,0x7c,0x18,0x22,0x78,0x7d,0xe6,0x24,0x0a,0xf6,0x18,0xe6,0x34,0x00,0xf6,
+0x78,0x7a,0x76,0x00,0x78,0x7b,0xe6,0x24,0xff,0xfc,0xe4,0x34,0xff,0xfd,0x78,0x7a,
+0xe6,0x7f,0x00,0xfe,0xec,0xd3,0x9e,0xef,0x64,0x80,0xcd,0x64,0x80,0x9d,0x40,0x21,
+0x78,0x7c,0x86,0x83,0x08,0x86,0x82,0xe0,0x90,0xff,0xf1,0xf0,0x12,0x08,0xca,0x40,
+0x03,0x7c,0x18,0x22,0x78,0x7a,0x06,0x78,0x7d,0x06,0xe6,0x18,0x70,0x01,0x06,0x80,
+0xc3,0x90,0xff,0xf0,0xe0,0x44,0x01,0xf0,0x78,0x7c,0x86,0x83,0x08,0x86,0x82,0xe0,
+0x90,0xff,0xf1,0xf0,0x12,0x08,0xca,0x40,0x03,0x7c,0x18,0x22,0x7c,0x00,0x22,0x90,
+0xff,0xf0,0xe0,0x20,0xe7,0x12,0x90,0xff,0xf0,0xe0,0x30,0xe5,0x09,0x90,0xff,0xf0,
+0xe0,0x44,0x20,0xf0,0xc3,0x22,0x80,0xe7,0xd3,0x22,0x90,0xff,0xf0,0xe0,0x20,0xe3,
+0x12,0x90,0xff,0xf0,0xe0,0x30,0xe5,0x09,0x90,0xff,0xf0,0xe0,0x44,0x20,0xf0,0xc3,
+0x22,0x80,0xe7,0xd3,0x22,0x8c,0x42,0x8d,0x41,0x7c,0x00,0xed,0x54,0xf0,0xfd,0xec,
+0x70,0x03,0xed,0x64,0x30,0x70,0x05,0x75,0x3e,0x03,0x80,0x03,0x75,0x3e,0x04,0xac,
+0x3e,0x12,0x0f,0x7c,0x75,0x83,0x00,0x85,0x83,0x40,0xe5,0x41,0x54,0x0f,0xf5,0x3f,
+0xe5,0x40,0x70,0x04,0xe5,0x3f,0x64,0x03,0x70,0x35,0xe5,0x3e,0x24,0xfd,0x75,0xf0,
+0x0a,0xa4,0x24,0x0a,0xf5,0x82,0xe4,0x34,0xfd,0xf5,0x83,0xe0,0x30,0xe6,0x05,0x12,
+0x10,0x67,0x80,0x19,0xe5,0x3e,0x24,0x97,0xf8,0xc6,0x54,0xfb,0xf6,0x78,0xa3,0xe6,
+0x24,0x05,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0x74,0x0f,0xf0,0x80,0x59,0xe5,
+0x40,0x70,0x04,0xe5,0x3f,0x64,0x04,0x70,0x48,0xe5,0x3e,0x24,0xfd,0x75,0xf0,0x0a,
+0xa4,0x24,0x0a,0xf5,0x82,0xe4,0x34,0xfd,0xf5,0x83,0xe0,0x30,0xe5,0x07,0xac,0x42,
+0xad,0x41,0x12,0x1c,0x93,0xe5,0x42,0x30,0xe2,0x15,0x78,0xa7,0xe6,0x30,0xe0,0x0f,
+0x78,0xa7,0xe6,0x30,0xe1,0x09,0xe4,0xff,0x04,0xfe,0x7c,0x04,0x12,0x31,0x9a,0x78,
+0xa3,0xe6,0x24,0x06,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0x74,0x0f,0xf0,0x80,
+0x07,0xe4,0xfc,0x7d,0xee,0x12,0x1c,0x93,0xc2,0x03,0x22,0x12,0x30,0x85,0x12,0x0f,
+0x7c,0x78,0xa3,0xe6,0x24,0x06,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x90,
+0xfd,0x40,0xf0,0x78,0xa3,0xe6,0x24,0x05,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,
+0xe0,0x90,0xfd,0x41,0xf0,0xc2,0x03,0x7d,0x02,0x7c,0x00,0x12,0x24,0xb1,0x12,0x31,
+0x08,0x22,0x12,0x30,0x85,0x78,0x8f,0xec,0xf6,0xec,0x24,0x97,0xf8,0xe6,0x30,0xe1,
+0x07,0x7c,0x13,0x12,0x25,0x4a,0x80,0x0f,0x90,0xfd,0x41,0xe0,0xfd,0x78,0x8f,0xe6,
+0xfc,0x12,0x13,0xfd,0x12,0x25,0x4a,0x12,0x31,0x08,0x22,0x12,0x30,0x85,0x78,0x8f,
+0xec,0xf6,0x7d,0x00,0x12,0x0f,0x0b,0x12,0x25,0x4a,0x12,0x31,0x08,0x22,0x12,0x30,
+0x85,0x78,0x8f,0xec,0xf6,0xec,0x24,0x97,0xf8,0xe6,0x30,0xe2,0x07,0x7c,0x13,0x12,
+0x25,0x4a,0x80,0x1b,0x78,0x8f,0xe6,0x24,0x97,0xf8,0xe6,0x20,0xe1,0x07,0x7c,0x12,
+0x12,0x25,0x4a,0x80,0x0a,0x78,0x8f,0xe6,0xfc,0x12,0x14,0x21,0x12,0x25,0x4a,0x12,
+0x31,0x08,0x22,0x12,0x30,0x85,0x78,0x8f,0xec,0xf6,0xec,0x24,0x97,0xf8,0xe6,0x20,
+0xe2,0x07,0x7c,0x11,0x12,0x25,0x4a,0x80,0x0a,0x78,0x8f,0xe6,0xfc,0x12,0x15,0x22,
+0x12,0x25,0x4a,0x12,0x31,0x08,0x22,0x12,0x30,0x85,0x78,0x8f,0xec,0xf6,0x12,0x0f,
+0x7c,0x78,0xa3,0xe6,0x24,0x09,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x90,
+0xfd,0x47,0xf0,0x78,0xa3,0xe6,0x24,0x0a,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,
+0xe0,0x90,0xfd,0x48,0xf0,0x78,0xa3,0xe6,0x24,0x03,0xf5,0x82,0x18,0xe6,0x34,0x00,
+0xf5,0x83,0xe0,0xfc,0x78,0xa3,0xe6,0x24,0x04,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,
+0x83,0xe0,0xf5,0x5c,0x78,0xa3,0xe6,0x24,0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,
+0x83,0xe0,0xf5,0x5d,0x8c,0x5b,0xe4,0xec,0x33,0x33,0x54,0x01,0x78,0x8f,0xf6,0x60,
+0x08,0xe5,0x5c,0x30,0xe1,0x03,0x78,0x8f,0x06,0x78,0x8f,0xe6,0x90,0xfd,0x49,0xf0,
+0x78,0xa1,0xe6,0x24,0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0xfd,0xa3,
+0xe0,0x54,0x0c,0xfc,0xed,0x54,0xe6,0x8c,0x5f,0xf5,0x5e,0xe5,0x5b,0x30,0xe5,0x03,
+0x43,0x5f,0x01,0xe5,0x5c,0x20,0xe5,0x0e,0xe5,0x5b,0x54,0x7f,0x70,0x08,0xe5,0x5b,
+0x20,0xe7,0x03,0x43,0x5f,0x02,0xe5,0x5b,0x30,0xe3,0x03,0x43,0x5f,0x10,0xe5,0x5b,
+0x30,0xe2,0x03,0x43,0x5f,0x20,0xe5,0x5b,0x54,0x03,0x60,0x03,0x43,0x5f,0x40,0xe5,
+0x5b,0x30,0xe1,0x03,0x43,0x5f,0x80,0xe5,0x5b,0x30,0xe4,0x03,0x43,0x5e,0x01,0xe5,
+0x5b,0x30,0xe6,0x03,0x43,0x5e,0x08,0xe5,0x5c,0x20,0xe4,0x0e,0xe5,0x5b,0x54,0x7f,
+0x70,0x08,0xe5,0x5b,0x20,0xe7,0x03,0x43,0x5e,0x10,0x53,0x5f,0xfb,0x53,0x5e,0xf9,
+0xad,0x5e,0xe5,0x5f,0x90,0xfd,0x42,0xcd,0xf0,0xa3,0xcd,0xf0,0xe5,0x5d,0x30,0xe3,
+0x0d,0xe5,0x5d,0x54,0x30,0xc4,0x54,0x0f,0x90,0xfd,0x45,0xf0,0x80,0x05,0xe4,0x90,
+0xfd,0x45,0xf0,0xe5,0x5d,0x54,0x03,0x90,0xfd,0x44,0xf0,0xe5,0x5d,0x54,0x04,0xc3,
+0x13,0x90,0xfd,0x46,0xf0,0x90,0xfd,0x44,0xe0,0x70,0x0e,0x7d,0x3d,0x7e,0xfd,0x7f,
+0x01,0x74,0x01,0x90,0x00,0x09,0x12,0x01,0x42,0x78,0xa3,0xe6,0x24,0x08,0xf5,0x82,
+0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x7c,0x00,0xfd,0x78,0xa3,0xe6,0x24,0x07,0xf5,
+0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x7f,0x00,0x4c,0xfe,0xef,0x4d,0x90,0xfd,
+0x40,0xf0,0xa3,0xce,0xf0,0xce,0xc2,0x03,0x7d,0x0a,0x7c,0x00,0x12,0x24,0xb1,0x12,
+0x31,0x08,0x22,0x12,0x30,0x85,0x78,0x8f,0xec,0xf6,0x78,0x94,0x76,0x01,0x08,0x76,
+0xfd,0x08,0x76,0x40,0x78,0x91,0x76,0x0c,0x78,0x94,0x12,0x04,0x65,0x12,0x02,0x14,
+0x78,0x92,0xcb,0xf6,0xcb,0x08,0xf6,0x7f,0x00,0xef,0x24,0xeb,0x40,0x1f,0xe4,0xef,
+0x25,0xe0,0x90,0x34,0xbf,0xfd,0x93,0xcd,0x04,0x93,0x78,0x93,0x66,0x70,0x03,0xed,
+0x18,0x66,0x70,0x06,0x78,0x91,0x76,0x00,0x80,0x03,0x0f,0x80,0xdc,0x78,0x90,0xef,
+0xf6,0x78,0x94,0x12,0x04,0x65,0x90,0x00,0x02,0x12,0x02,0x0e,0x78,0x92,0xcb,0xf6,
+0xcb,0x08,0xf6,0x54,0x04,0xcb,0x54,0x06,0x4b,0x60,0x04,0x78,0x91,0x76,0x0b,0x78,
+0x93,0xe6,0x30,0xe3,0x13,0x78,0x94,0x12,0x04,0x65,0x90,0x00,0x05,0x12,0x01,0xec,
+0x24,0xfb,0x50,0x04,0x78,0x91,0x76,0x0d,0x78,0x93,0xe6,0x54,0xc0,0x7d,0x00,0x64,
+0xc0,0x4d,0x70,0x04,0x78,0x91,0x76,0x0b,0x78,0x94,0x12,0x04,0x65,0x90,0x00,0x04,
+0x12,0x01,0xec,0x24,0xfc,0x50,0x04,0x78,0x91,0x76,0x0f,0x78,0x94,0x12,0x04,0x65,
+0x90,0x00,0x06,0x12,0x01,0xec,0x24,0xfd,0x50,0x04,0x78,0x91,0x76,0x0e,0x78,0x94,
+0x12,0x04,0x65,0x90,0x00,0x09,0x12,0x01,0xec,0x24,0xfd,0x50,0x04,0x78,0x91,0x76,
+0x0a,0x78,0x91,0xe6,0x70,0x2a,0x78,0x8f,0xe6,0xfc,0x12,0x0f,0x7c,0x78,0x94,0x12,
+0x04,0x65,0x78,0xa1,0xe6,0xf9,0x78,0xa0,0xe6,0xfa,0x7b,0x01,0x74,0x0a,0x78,0x00,
+0x12,0x03,0x3f,0xc2,0x03,0x78,0x8f,0xe6,0xfc,0x12,0x11,0x23,0x78,0x91,0xec,0xf6,
+0x78,0x91,0xe6,0xfc,0x12,0x25,0x4a,0x12,0x31,0x08,0x22,0x12,0x30,0x85,0x78,0x8f,
+0xec,0xf6,0x12,0x0f,0x7c,0x78,0x8f,0xe6,0x24,0xfd,0x75,0xf0,0x0a,0xa4,0x24,0x1c,
+0xf5,0x82,0xe4,0x34,0xfd,0xf5,0x83,0xac,0x82,0xad,0x83,0x78,0xa0,0x86,0x83,0x08,
+0x86,0x82,0xec,0xf9,0xed,0xfa,0x7b,0x0a,0x78,0x01,0x12,0x03,0xa7,0xc2,0x03,0x78,
+0x8f,0xe6,0xfc,0x12,0x11,0x23,0x12,0x31,0x08,0x22,0x8d,0x2b,0x8c,0x2a,0xed,0x60,
+0x40,0x75,0x27,0x01,0x75,0x29,0x48,0x75,0x28,0xff,0xe5,0x2a,0x24,0xfd,0xfc,0xe4,
+0x34,0xff,0xfd,0xec,0x7c,0x03,0x25,0xe0,0xcd,0x33,0xcd,0xdc,0xf9,0xfc,0xe5,0x29,
+0x2c,0xf5,0x29,0xe5,0x28,0x3d,0xf5,0x28,0xad,0x29,0xae,0x28,0xaf,0x27,0x74,0x80,
+0x90,0x00,0x06,0x12,0x03,0x17,0x74,0x80,0x90,0x00,0x02,0x12,0x03,0x17,0x12,0x0f,
+0xd3,0xe5,0x2b,0x14,0x60,0x3b,0x75,0x27,0x01,0x75,0x29,0x08,0x75,0x28,0xff,0xe5,
+0x2a,0x24,0xfd,0xfc,0xe4,0x34,0xff,0xfd,0xec,0x7c,0x03,0x25,0xe0,0xcd,0x33,0xcd,
+0xdc,0xf9,0xfc,0xe5,0x29,0x2c,0xf5,0x29,0xe5,0x28,0x3d,0xf5,0x28,0xad,0x29,0xae,
+0x28,0xaf,0x27,0xe4,0x90,0x00,0x06,0x12,0x03,0x17,0xe4,0x90,0x00,0x02,0x12,0x03,
+0x17,0x22,0x12,0x30,0x85,0x78,0x8f,0xec,0xf6,0xec,0x24,0x97,0xf8,0xe6,0x30,0xe2,
+0x09,0x78,0x8f,0xe6,0xfc,0x12,0x15,0x22,0xd2,0x00,0x78,0x8f,0xe6,0xfc,0x12,0x0f,
+0x7c,0x78,0x90,0x76,0x00,0x90,0xfd,0x41,0xe0,0x30,0xe7,0x04,0x78,0x90,0x76,0x01,
+0x78,0x90,0xe6,0xfd,0x78,0x8f,0xe6,0xfc,0x12,0x0d,0x3a,0xc2,0x03,0x30,0x00,0x07,
+0x78,0x8f,0xe6,0xfc,0x12,0x14,0x21,0x7c,0x00,0x12,0x25,0x4a,0x12,0x31,0x08,0x22,
+0x78,0xa3,0xe6,0x24,0x04,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x44,0x01,
+0xf0,0x78,0xa3,0xe6,0x24,0x04,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x30,
+0xe0,0x02,0x80,0xed,0x78,0xa3,0xe6,0x24,0x0b,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,
+0x83,0xe0,0x54,0xf8,0xf0,0x78,0xa3,0xe6,0x24,0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,
+0xf5,0x83,0xe0,0x44,0x80,0xf0,0x22,0xc2,0x03,0x8c,0x58,0x12,0x0f,0x7c,0x78,0xa0,
+0x86,0x83,0x08,0x86,0x82,0x79,0xee,0x7a,0x34,0x7b,0x0a,0x78,0x01,0x12,0x03,0xf5,
+0x12,0x0e,0x10,0xac,0x58,0x7d,0x02,0x12,0x0d,0x3a,0xc2,0x03,0xac,0x58,0x12,0x11,
+0x23,0x22,0x8d,0x53,0x8e,0x52,0x8f,0x51,0x8c,0x50,0x12,0x0f,0x7c,0x75,0x4f,0x00,
+0x78,0xa3,0xe6,0x24,0x05,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x20,0xe4,
+0x16,0xe5,0x4f,0x24,0xf6,0x40,0x10,0x05,0x4f,0xc2,0x03,0x7c,0x18,0x12,0x32,0x48,
+0xac,0x50,0x12,0x0f,0x7c,0x80,0xd9,0x78,0xa3,0xe6,0x24,0x05,0xf5,0x82,0x18,0xe6,
+0x34,0x00,0xf5,0x83,0xe0,0x20,0xe4,0x05,0xc2,0x03,0x7c,0x02,0x22,0x78,0xa3,0xe6,
+0x24,0x05,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x54,0x0f,0x60,0x16,0x78,
+0xa3,0xe6,0x24,0x05,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x54,0x0f,0xf0,
+0xc2,0x03,0x7c,0x01,0x22,0x78,0xa2,0x86,0x83,0x08,0x86,0x82,0xe0,0xad,0x53,0xae,
+0x52,0xaf,0x51,0x12,0x03,0x0f,0xc2,0x03,0x7c,0x00,0x22,0x8d,0x31,0x8c,0x30,0x12,
+0x15,0x22,0xe5,0x31,0x60,0x20,0xe5,0x30,0xb4,0x03,0x0c,0x7c,0x01,0x12,0x24,0x7c,
+0x7c,0x81,0x12,0x24,0x7c,0x80,0x0f,0xe5,0x30,0xb4,0x04,0x0a,0x7c,0x02,0x12,0x24,
+0x7c,0x7c,0x82,0x12,0x24,0x7c,0xac,0x30,0x12,0x0f,0x7c,0xe5,0x31,0x60,0x1a,0x78,
+0xa4,0x86,0x83,0x08,0x86,0x82,0xe0,0x54,0xe7,0xf0,0xa3,0xa3,0xa3,0xa3,0xe0,0x54,
+0xe7,0xf0,0xac,0x30,0x7d,0x02,0x12,0x0d,0x3a,0x78,0xa0,0x86,0x83,0x08,0x86,0x82,
+0x79,0xf8,0x7a,0x34,0x7b,0x0a,0x78,0x01,0x12,0x03,0xf5,0xc2,0x03,0xe5,0x30,0x24,
+0x97,0xf8,0xc6,0x54,0xfd,0xf6,0xac,0x30,0x12,0x11,0x23,0x22,0x8c,0x26,0x30,0x03,
+0x05,0x12,0x31,0xe7,0x80,0xf8,0x7c,0x0a,0x12,0x30,0xfa,0xd2,0x03,0xe5,0x26,0x24,
+0xfd,0x78,0x9d,0xf6,0x70,0x09,0x78,0xa4,0x76,0xff,0x08,0x76,0xe0,0x80,0x07,0x78,
+0xa4,0x76,0xff,0x08,0x76,0xe2,0x78,0x9d,0xe6,0x75,0xf0,0x10,0xa4,0xad,0xf0,0xfc,
+0x24,0xa0,0x78,0xa3,0xf6,0xed,0x34,0xff,0x18,0xf6,0x78,0x9d,0xe6,0x75,0xf0,0x0a,
+0xa4,0x24,0x08,0xfc,0xe4,0x34,0xfd,0xfd,0x78,0xa0,0xed,0xf6,0x08,0xec,0xf6,0x12,
+0x31,0x93,0x22,0x78,0xa3,0xe6,0x24,0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,
+0xe0,0x30,0xe7,0x22,0x78,0xa3,0xe6,0x24,0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,
+0x83,0xe0,0x54,0x7f,0xf0,0x78,0xa3,0xe6,0x24,0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,
+0xf5,0x83,0xe0,0x44,0x80,0xf0,0x22,0x78,0xa4,0x86,0x83,0x08,0x86,0x82,0xe0,0x54,
+0x7f,0xf0,0xad,0x83,0xe5,0x82,0x24,0x04,0xfc,0xe4,0x3d,0x8c,0x82,0xf5,0x83,0xe0,
+0x54,0x7f,0xf0,0x78,0xa3,0xe6,0x24,0x0b,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,
+0xe0,0x54,0xf8,0xf0,0x78,0xa5,0xe6,0x24,0x01,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,
+0x83,0xe0,0x44,0x03,0xf0,0x78,0xa5,0xe6,0x24,0x05,0xf5,0x82,0x18,0xe6,0x34,0x00,
+0xf5,0x83,0xe0,0x44,0x03,0xf0,0x78,0xa3,0xe6,0x24,0x05,0xf5,0x82,0x18,0xe6,0x34,
+0x00,0xf5,0x83,0x74,0x0f,0xf0,0x22,0x78,0xa4,0x86,0x83,0x08,0x86,0x82,0xe0,0x54,
+0x3f,0xf0,0xad,0x83,0xe5,0x82,0x24,0x04,0xfc,0xe4,0x3d,0x8c,0x82,0xf5,0x83,0xe0,
+0x54,0x3f,0xf0,0x78,0x9d,0xe6,0x24,0x9e,0xf8,0xe6,0xfc,0x78,0xa5,0xe6,0x24,0x01,
+0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xec,0xf0,0x78,0x9d,0xe6,0x24,0x9e,0xf8,
+0xe6,0xfc,0x78,0xa5,0xe6,0x24,0x05,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xec,
+0xf0,0x78,0xa3,0xe6,0x24,0x0b,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x54,
+0xfb,0x44,0x02,0xf5,0x26,0x78,0xa1,0xe6,0x24,0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,
+0xf5,0x83,0xe0,0x30,0xe5,0x03,0x43,0x26,0x01,0x78,0xa3,0xe6,0x24,0x05,0xf5,0x82,
+0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x30,0xe0,0x03,0x12,0x0f,0xd3,0xe5,0x26,0xfc,
+0x78,0xa3,0xe6,0x24,0x0b,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xec,0xf0,0x78,
+0xa3,0xe6,0x24,0x05,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0x74,0x0f,0xf0,0x78,
+0xa4,0x86,0x83,0x08,0x86,0x82,0xe0,0x44,0x80,0xf0,0xa3,0xa3,0xa3,0xa3,0xe0,0x44,
+0x80,0xf0,0x22,0x8c,0x2a,0x12,0x0f,0x7c,0x78,0xa1,0xe6,0x24,0x08,0xf5,0x82,0x18,
+0xe6,0x34,0x00,0xf5,0x83,0xe0,0xfc,0x78,0xa3,0xe6,0x24,0x0a,0xf5,0x82,0x18,0xe6,
+0x34,0x00,0xf5,0x83,0xec,0xf0,0x78,0xa1,0xe6,0x24,0x07,0xf5,0x82,0x18,0xe6,0x34,
+0x00,0xf5,0x83,0xe0,0xfc,0x78,0xa3,0xe6,0x24,0x09,0xf5,0x82,0x18,0xe6,0x34,0x00,
+0xf5,0x83,0xec,0xf0,0x78,0xa0,0x86,0x83,0x08,0x86,0x82,0xe0,0xfd,0xa3,0xe0,0xfc,
+0xed,0xfe,0x78,0xa3,0xe6,0x24,0x08,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xee,
+0xf0,0xec,0xfe,0x78,0xa3,0xe6,0x24,0x07,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,
+0xee,0xf0,0x8c,0x29,0x8d,0x28,0xc3,0xec,0x94,0x02,0xed,0x94,0x06,0x40,0x05,0x75,
+0x27,0x7c,0x80,0x33,0xd3,0xe5,0x29,0x94,0x81,0xe5,0x28,0x94,0x01,0x40,0x05,0x75,
+0x27,0x3c,0x80,0x23,0xd3,0xe5,0x29,0x94,0xc0,0xe5,0x28,0x94,0x00,0x40,0x05,0x75,
+0x27,0x18,0x80,0x13,0xd3,0xe5,0x29,0x94,0x30,0xe5,0x28,0x94,0x00,0x40,0x05,0x75,
+0x27,0x0c,0x80,0x03,0x75,0x27,0x08,0xaf,0x27,0xe4,0xef,0x54,0x7c,0x44,0x83,0xff,
+0x8f,0x27,0xe5,0x27,0xfc,0x78,0xa5,0xe6,0x24,0x01,0xf5,0x82,0x18,0xe6,0x34,0x00,
+0xf5,0x83,0xec,0xf0,0xe5,0x27,0xfc,0x78,0xa5,0xe6,0x24,0x05,0xf5,0x82,0x18,0xe6,
+0x34,0x00,0xf5,0x83,0xec,0xf0,0xe5,0x27,0xfc,0x78,0x9d,0xe6,0x24,0x9e,0xf8,0xec,
+0xf6,0x78,0xa3,0xe6,0x24,0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0xf5,
+0x27,0x78,0xa1,0xe6,0x24,0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xa3,0xe0,
+0x30,0xe3,0x17,0x53,0x27,0xc7,0x78,0xa1,0xe6,0x24,0x05,0xf5,0x82,0x18,0xe6,0x34,
+0x00,0xf5,0x83,0xe0,0x90,0x34,0xe9,0x93,0x42,0x27,0x78,0xa1,0xe6,0x24,0x02,0xf5,
+0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x30,0xe7,0x05,0x43,0x27,0x40,0x80,0x03,
+0x53,0x27,0xbf,0x53,0x27,0xfb,0x78,0xa1,0xe6,0x24,0x06,0xf5,0x82,0x18,0xe6,0x34,
+0x00,0xf5,0x83,0xe0,0x60,0x03,0x43,0x27,0x04,0x53,0x27,0xfc,0x78,0xa1,0xe6,0x24,
+0x04,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x42,0x27,0x43,0x27,0x80,0xe5,
+0x27,0xfc,0x78,0xa3,0xe6,0x24,0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xec,
+0xf0,0x78,0xa3,0xe6,0x24,0x04,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0xf5,
+0x27,0x78,0xa1,0xe6,0x24,0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xa3,0xe0,
+0x30,0xe1,0x05,0x53,0x27,0xdf,0x80,0x03,0x43,0x27,0x20,0x78,0xa1,0xe6,0x24,0x02,
+0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x30,0xe4,0x05,0x53,0x27,0xef,0x80,
+0x03,0x43,0x27,0x10,0x78,0xa1,0xe6,0x24,0x09,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,
+0x83,0xe0,0xb4,0x02,0x03,0x43,0x27,0x02,0xe5,0x27,0xfc,0x78,0xa3,0xe6,0x24,0x04,
+0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xec,0xf0,0x78,0xa3,0xe6,0x24,0x03,0xf5,
+0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0xf5,0x27,0x78,0xa1,0xe6,0x24,0x09,0xf5,
+0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x70,0x05,0x53,0x27,0x7f,0x80,0x03,0x43,
+0x27,0x80,0x78,0xa1,0xe6,0x24,0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xa3,
+0xe0,0x30,0xe0,0x05,0x43,0x27,0x20,0x80,0x03,0x53,0x27,0xdf,0x78,0xa1,0xe6,0x24,
+0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x30,0xe3,0x05,0x43,0x27,0x40,
+0x80,0x03,0x53,0x27,0xbf,0x78,0xa1,0xe6,0x24,0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,
+0xf5,0x83,0xe0,0x30,0xe0,0x05,0x43,0x27,0x10,0x80,0x03,0x53,0x27,0xef,0x78,0xa1,
+0xe6,0x24,0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xa3,0xe0,0x30,0xe4,0x05,
+0x43,0x27,0x08,0x80,0x03,0x53,0x27,0xf7,0x78,0xa1,0xe6,0x24,0x02,0xf5,0x82,0x18,
+0xe6,0x34,0x00,0xf5,0x83,0xa3,0xe0,0x30,0xe5,0x05,0x43,0x27,0x04,0x80,0x03,0x53,
+0x27,0xfb,0x78,0xa1,0xe6,0x24,0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xa3,
+0xe0,0x30,0xe6,0x05,0x43,0x27,0x01,0x80,0x03,0x53,0x27,0xfe,0x78,0xa1,0xe6,0x24,
+0x02,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xa3,0xe0,0x30,0xe7,0x05,0x43,0x27,
+0x02,0x80,0x03,0x53,0x27,0xfd,0xe5,0x27,0xfc,0x78,0xa3,0xe6,0x24,0x03,0xf5,0x82,
+0x18,0xe6,0x34,0x00,0xf5,0x83,0xec,0xf0,0xc2,0x03,0x7c,0x00,0x22,0x8d,0x27,0x8c,
+0x26,0xed,0x54,0x03,0x14,0x60,0x03,0x7c,0x10,0x22,0xe5,0x27,0x54,0x7c,0x24,0xfc,
+0x40,0x03,0x7c,0x0b,0x22,0xe5,0x26,0x24,0x97,0xf8,0xc6,0x44,0x02,0xf6,0x7c,0x00,
+0x22,0x8c,0x30,0x12,0x0f,0x7c,0xe5,0x30,0x24,0x97,0xf8,0xe6,0x20,0xe2,0x4f,0xac,
+0x30,0x7d,0x02,0x12,0x0d,0x3a,0xe5,0x30,0x24,0xfe,0x44,0x28,0xfc,0x78,0xa4,0x86,
+0x83,0x08,0x86,0x82,0xec,0xf0,0xaf,0x83,0xe5,0x82,0x24,0x04,0xfe,0xe4,0x3f,0xff,
+0xec,0x8e,0x82,0x8f,0x83,0xf0,0x7c,0x03,0x8c,0x2c,0xe5,0x2c,0xfc,0x78,0xa5,0xe6,
+0x24,0x01,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xec,0xf0,0xe5,0x2c,0xfc,0x78,
+0xa5,0xe6,0x24,0x05,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xec,0xf0,0x75,0x2d,
+0x01,0x75,0x2f,0x48,0x75,0x2e,0xff,0xe5,0x30,0x24,0xfd,0xfc,0xe4,0x34,0xff,0xfd,
+0xec,0x7c,0x03,0x25,0xe0,0xcd,0x33,0xcd,0xdc,0xf9,0xfc,0xe5,0x2f,0x2c,0xf5,0x2f,
+0xe5,0x2e,0x3d,0xf5,0x2e,0x78,0xa5,0xe6,0x24,0x04,0xf5,0x82,0x18,0xe6,0x34,0x00,
+0xf5,0x83,0xe0,0x54,0xe7,0xf5,0x2c,0xad,0x2f,0xae,0x2e,0xaf,0x2d,0xe4,0x90,0x00,
+0x02,0x12,0x03,0x17,0xe4,0x90,0x00,0x06,0x12,0x03,0x17,0x12,0x01,0xe6,0x30,0xe5,
+0x03,0x43,0x2c,0x10,0xe5,0x2c,0xfc,0x78,0xa5,0xe6,0x24,0x04,0xf5,0x82,0x18,0xe6,
+0x34,0x00,0xf5,0x83,0xec,0xf0,0x12,0x10,0x67,0x78,0xa3,0xe6,0x24,0x06,0xf5,0x82,
+0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0xc2,0x03,0xfc,0xe5,0x30,0x24,0x97,0xf8,0xc6,
+0x44,0x04,0xf6,0x8c,0x2c,0xe5,0x30,0x54,0x0f,0xc4,0x54,0xf0,0x7e,0x00,0xff,0xee,
+0xef,0x44,0x04,0x7d,0x00,0xff,0xec,0x4e,0xfc,0xed,0x4f,0xfd,0x12,0x1c,0xfe,0x7c,
+0x00,0x22,0x8c,0x2f,0x12,0x0f,0x7c,0x12,0x10,0x07,0x78,0xa4,0x86,0x83,0x08,0x86,
+0x82,0xe0,0x54,0x08,0xf0,0xa3,0xa3,0xa3,0xa3,0xe0,0x54,0x08,0xf0,0xac,0x2f,0x7d,
+0x02,0x12,0x0d,0x3a,0xc2,0x03,0xe5,0x2f,0x24,0x97,0xf8,0xc6,0x54,0xfb,0xf6,0x7c,
+0x00,0x22,0x12,0x30,0x85,0x78,0x90,0xec,0xf6,0xec,0x24,0x97,0xf8,0xe6,0x30,0xe1,
+0x0a,0x7d,0x00,0x7c,0x13,0x12,0x24,0xb1,0x12,0x31,0x08,0x78,0x90,0xe6,0x24,0x97,
+0xf8,0xc6,0x44,0x01,0xf6,0x78,0x90,0xe6,0xfc,0x12,0x0f,0x7c,0x78,0x90,0xe6,0x24,
+0xfd,0x75,0xf0,0x0a,0xa4,0x24,0x1c,0xf5,0x82,0xe4,0x34,0xfd,0xf5,0x83,0x78,0xa0,
+0xe6,0xfa,0x08,0xe6,0xf9,0x7b,0x0a,0x78,0x01,0x12,0x03,0xa7,0x78,0xa0,0x86,0x83,
+0x08,0x86,0x82,0x79,0xf8,0x7a,0x34,0x7b,0x0a,0x78,0x01,0x12,0x03,0xf5,0x12,0x0f,
+0xd3,0xc2,0x03,0x78,0x90,0xe6,0xfc,0x12,0x11,0x23,0x78,0x8f,0xec,0xf6,0xec,0x60,
+0x0a,0x7d,0x00,0x7c,0x08,0x12,0x24,0xb1,0x12,0x31,0x08,0x78,0x90,0xe6,0xfc,0x12,
+0x0f,0x7c,0x78,0xa3,0xe6,0x24,0x04,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,
+0x44,0x10,0x54,0xdf,0xfc,0x78,0xa3,0xe6,0x24,0x04,0xf5,0x82,0x18,0xe6,0x34,0x00,
+0xf5,0x83,0xec,0xf0,0x78,0x8f,0xec,0xf6,0xc2,0x03,0x7c,0xc8,0x12,0x32,0x48,0x78,
+0x90,0xe6,0xfc,0x12,0x0f,0x7c,0x78,0xa3,0xe6,0x24,0x04,0xf5,0x82,0x18,0xe6,0x34,
+0x00,0xf5,0x83,0xe0,0x54,0xef,0xf0,0xc2,0x03,0x7c,0xc8,0x12,0x32,0x48,0x78,0x90,
+0xe6,0xfc,0x12,0x0f,0x7c,0x78,0xa3,0xe6,0x24,0x04,0xf5,0x82,0x18,0xe6,0x34,0x00,
+0xf5,0x83,0xe0,0x44,0x10,0xf0,0xc2,0x03,0x7c,0xc8,0x12,0x32,0x48,0x78,0x90,0xe6,
+0xfc,0x12,0x0f,0x7c,0x78,0xa3,0xe6,0x24,0x04,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,
+0x83,0xe0,0x44,0x20,0xf0,0xc2,0x03,0x7c,0xf0,0x12,0x32,0x48,0x78,0x90,0xe6,0xfc,
+0x12,0x0f,0x7c,0x78,0xa3,0xe6,0x24,0x05,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,
+0xe0,0x30,0xe4,0x15,0xc2,0x03,0x78,0x90,0xe6,0x44,0x10,0x7f,0x00,0xfe,0x7c,0x07,
+0x12,0x31,0x9a,0x12,0x31,0x08,0x02,0x17,0x49,0x78,0xa3,0xe6,0x24,0x04,0xf5,0x82,
+0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x54,0xcf,0xf0,0xc2,0x03,0x7c,0xc8,0x12,0x32,
+0x48,0x78,0x90,0xe6,0xfc,0x12,0x0f,0x7c,0x78,0xa3,0xe6,0x24,0x04,0xf5,0x82,0x18,
+0xe6,0x34,0x00,0xf5,0x83,0xe0,0x44,0x30,0xf0,0xc2,0x03,0x7c,0xf0,0x12,0x32,0x48,
+0x78,0x90,0xe6,0xfc,0x12,0x0f,0x7c,0x78,0xa3,0xe6,0x24,0x05,0xf5,0x82,0x18,0xe6,
+0x34,0x00,0xf5,0x83,0xe0,0x30,0xe4,0x14,0xc2,0x03,0x78,0x90,0xe6,0x44,0x10,0x7f,
+0x00,0xfe,0x7c,0x07,0x12,0x31,0x9a,0x12,0x31,0x08,0x80,0x5d,0x78,0xa3,0xe6,0x24,
+0x04,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x54,0xef,0xf0,0x78,0xa3,0xe6,
+0x24,0x04,0xf5,0x82,0x18,0xe6,0x34,0x00,0xf5,0x83,0xe0,0x54,0xdf,0xf0,0x78,0x90,
+0xe6,0x24,0xfd,0x75,0xf0,0x0a,0xa4,0x24,0x1c,0xf5,0x82,0xe4,0x34,0xfd,0xf5,0x83,
+0xac,0x82,0xad,0x83,0x78,0xa0,0x86,0x83,0x08,0x86,0x82,0xec,0xf9,0xed,0xfa,0x7b,
+0x0a,0x78,0x01,0x12,0x03,0xa7,0xc2,0x03,0x78,0x90,0xe6,0xfc,0x12,0x11,0x23,0x7d,
+0x00,0x7c,0x0b,0x12,0x24,0xb1,0x12,0x31,0x08,0x22,0x12,0x30,0x85,0x90,0xff,0x91,
+0xe0,0x90,0xfd,0x41,0xf0,0x7d,0x02,0x7c,0x00,0x12,0x24,0xb1,0x12,0x31,0x08,0x22,
+0x12,0x30,0x85,0x90,0xfd,0x40,0xe0,0xf4,0xfc,0x90,0xff,0x91,0xe0,0x5c,0xf5,0x33,
+0x90,0xfd,0x41,0xe0,0xfc,0x90,0xfd,0x40,0xe0,0x5c,0x42,0x33,0xe5,0x33,0x90,0xff,
+0x91,0xf0,0x7c,0x00,0x12,0x25,0x4a,0x12,0x31,0x08,0x22,0x74,0x3c,0x90,0xfb,0xe8,
+0xf0,0x74,0x3e,0x90,0xfb,0xe8,0xf0,0xe4,0x90,0xfd,0x30,0xf0,0x22,0x8d,0x35,0x8c,
+0x34,0xec,0xb4,0x01,0x02,0x80,0x03,0xd3,0x40,0x02,0x80,0x28,0xb4,0x02,0x02,0x80,
+0x03,0xd3,0x40,0x08,0xa8,0x35,0xc6,0x25,0xe0,0xf6,0x80,0x18,0xb4,0x04,0x02,0x80,
+0x03,0xd3,0x40,0x0a,0xa8,0x35,0xc6,0x25,0xe0,0x25,0xe0,0xf6,0x80,0x06,0xa8,0x35,
+0x76,0x00,0x80,0x00,0x22,0x8c,0x3c,0x8d,0x3b,0xed,0xfe,0xec,0xfd,0x7f,0x01,0x75,
+0x60,0x06,0x75,0x61,0x00,0x90,0xfd,0x31,0x12,0x04,0x6e,0x12,0x01,0xe6,0xb4,0x80,
+0x02,0x80,0x06,0xd3,0x50,0x03,0x02,0x18,0x9e,0x90,0xfd,0x31,0x12,0x04,0x80,0x90,
+0x00,0x03,0x12,0x01,0xec,0x54,0xf0,0xb4,0x30,0x02,0x80,0x03,0xd3,0x40,0x5f,0x90,
+0xfd,0x31,0x12,0x04,0x80,0x90,0x00,0x08,0x12,0x02,0x0e,0xfa,0xfd,0xeb,0xfe,0x7f,
+0x01,0x90,0xfd,0x34,0x12,0x04,0x6e,0xee,0xcd,0x90,0x35,0x02,0xfc,0xe4,0x93,0xff,
+0x74,0x01,0x93,0xfe,0xf9,0xef,0xfa,0x7b,0x01,0xea,0xff,0xe9,0xfe,0xec,0xc3,0x9e,
+0xed,0x9f,0x40,0x25,0x90,0x35,0x04,0xe4,0x93,0xfd,0x74,0x01,0x93,0xfc,0xed,0xfe,
+0xec,0xfd,0x7f,0x01,0xee,0xcd,0xfc,0x90,0xfd,0x36,0xe0,0xd3,0x9c,0x90,0xfd,0x35,
+0xe0,0x9d,0x50,0x05,0x75,0x60,0x80,0x80,0x33,0x12,0x19,0xbc,0x80,0x2e,0xb4,0x60,
+0x02,0x80,0x03,0xd3,0x40,0x0b,0xac,0x3c,0xad,0x3b,0x12,0x07,0x82,0x8c,0x60,0x80,
+0x1b,0xb4,0x10,0x03,0xb3,0x40,0x10,0xc3,0xb4,0x20,0x03,0xb3,0x40,0x09,0xc3,0xb4,
+0x40,0x02,0x80,0x03,0xd3,0x40,0x00,0x75,0x60,0x81,0x80,0x00,0x80,0x75,0xb4,0x81,
+0x02,0x80,0x03,0xd3,0x40,0x6b,0x90,0xfd,0x31,0x12,0x04,0x80,0x90,0x00,0x03,0x12,
+0x01,0xec,0x54,0xf0,0xb4,0x30,0x02,0x80,0x03,0xd3,0x40,0x1d,0x90,0xfd,0x31,0x12,
+0x04,0x80,0x90,0x00,0x08,0x12,0x02,0x0e,0xfa,0xfd,0xeb,0xfe,0x7f,0x01,0x90,0xfd,
+0x37,0x12,0x04,0x6e,0x12,0x19,0x26,0x80,0x36,0xb4,0x60,0x02,0x80,0x03,0xd3,0x40,
+0x13,0x75,0x3a,0x61,0xe4,0xf5,0x39,0xf5,0x38,0xac,0x3c,0xad,0x3b,0x12,0x05,0xde,
+0x8c,0x60,0x80,0x1b,0xb4,0x10,0x03,0xb3,0x40,0x10,0xc3,0xb4,0x20,0x03,0xb3,0x40,
+0x09,0xc3,0xb4,0x40,0x02,0x80,0x03,0xd3,0x40,0x00,0x75,0x60,0x81,0x80,0x00,0x80,
+0x02,0x80,0x00,0xe5,0x60,0xfc,0x90,0xfd,0x31,0x12,0x04,0x80,0xec,0x90,0x00,0x02,
+0x12,0x03,0x17,0xac,0x61,0x22,0x90,0xfd,0x31,0x12,0x04,0x80,0x90,0x00,0x04,0x12,
+0x01,0xec,0x60,0x04,0x74,0x01,0x80,0x01,0xe4,0xa2,0xe0,0x92,0x01,0x90,0xfd,0x31,
+0x12,0x04,0x80,0xed,0x24,0x03,0xfd,0x50,0x01,0x0e,0x90,0xfd,0x34,0x12,0x04,0x6e,
+0x90,0xfd,0x31,0x12,0x04,0x80,0x90,0x00,0x05,0x12,0x01,0xec,0xf5,0x61,0x90,0x00,
+0x04,0x12,0x01,0xec,0x54,0x0f,0xfc,0x7d,0x61,0x12,0x17,0x9d,0xe5,0x61,0x70,0x04,
+0x75,0x60,0x08,0x22,0x75,0x60,0x00,0x78,0x7e,0x76,0x00,0x78,0x7e,0xe6,0xc3,0x95,
+0x61,0x50,0x38,0x90,0xfd,0x37,0x12,0x04,0x80,0x12,0x01,0xe6,0xfc,0x90,0xfd,0x34,
+0x12,0x04,0x80,0xec,0x12,0x03,0x0f,0x30,0x01,0x0e,0x90,0xfd,0x39,0xe0,0x04,0xf0,
+0x90,0xfd,0x38,0x70,0x03,0xe0,0x04,0xf0,0x78,0x7e,0x06,0x90,0xfd,0x36,0xe0,0x04,
+0xf0,0x90,0xfd,0x35,0x70,0x03,0xe0,0x04,0xf0,0x80,0xc0,0x22,0x90,0xfd,0x32,0xe0,
+0xfd,0xa3,0xe0,0xfc,0xed,0xfe,0xec,0xfd,0x7f,0x01,0xed,0x24,0x0a,0xfd,0x50,0x01,
+0x0e,0x90,0xfd,0x3a,0x12,0x04,0x6e,0x90,0xfd,0x31,0x12,0x04,0x80,0x90,0x00,0x04,
+0x12,0x01,0xec,0x54,0x0f,0xb4,0x01,0x02,0x80,0x03,0xd3,0x40,0x17,0x90,0xfd,0x3a,
+0x12,0x04,0x80,0x0d,0xed,0x70,0x01,0x0e,0x90,0xfd,0x37,0x12,0x04,0x6e,0x78,0x82,
+0x76,0x01,0x80,0x4e,0xb4,0x02,0x02,0x80,0x03,0xd3,0x40,0x19,0x90,0xfd,0x3a,0x12,
+0x04,0x80,0xed,0x24,0x02,0xfd,0x50,0x01,0x0e,0x90,0xfd,0x37,0x12,0x04,0x6e,0x78,
+0x82,0x76,0x02,0x80,0x2d,0xb4,0x04,0x02,0x80,0x03,0xd3,0x40,0x19,0x90,0xfd,0x3a,
+0x12,0x04,0x80,0xed,0x24,0x04,0xfd,0x50,0x01,0x0e,0x90,0xfd,0x37,0x12,0x04,0x6e,
+0x78,0x82,0x76,0x04,0x80,0x0c,0xb4,0x00,0x02,0x80,0x03,0xd3,0x40,0x00,0x75,0x60,
+0x08,0x22,0x90,0xfd,0x31,0x12,0x04,0x80,0x90,0x00,0x05,0x12,0x01,0xec,0xf5,0x61,
+0x78,0x7f,0x76,0x00,0x78,0x7f,0xe6,0xc3,0x95,0x61,0x40,0x03,0x02,0x1b,0x24,0x78,
+0x80,0x76,0x00,0x78,0x80,0xe6,0xc3,0x78,0x82,0x96,0x50,0x76,0x90,0xfd,0x34,0x12,
+0x04,0x80,0x12,0x01,0xe6,0xfc,0x90,0xfd,0x3a,0x12,0x04,0x89,0x12,0x01,0xe0,0xf4,
+0x5c,0xfc,0x12,0x01,0xe0,0xf8,0x90,0xfd,0x37,0x12,0x04,0x80,0xe8,0xc0,0xe0,0x12,
+0x01,0xe6,0xc8,0xd0,0xe0,0xc8,0x58,0x4c,0xfc,0x90,0xfd,0x34,0x12,0x04,0x80,0xec,
+0x12,0x03,0x0f,0x78,0x81,0xec,0xf6,0x90,0xfd,0x39,0xe0,0x04,0xf0,0x90,0xfd,0x38,
+0x70,0x03,0xe0,0x04,0xf0,0x09,0xe9,0x70,0x01,0x0a,0x90,0xfd,0x3a,0x12,0x04,0x77,
+0x90,0xfd,0x31,0x12,0x04,0x80,0x90,0x00,0x04,0x12,0x01,0xec,0x30,0xe4,0x0e,0x90,
+0xfd,0x36,0xe0,0x04,0xf0,0x90,0xfd,0x35,0x70,0x03,0xe0,0x04,0xf0,0x78,0x80,0x06,
+0x80,0x81,0x78,0x82,0xe6,0xfd,0xe4,0xfe,0xff,0xee,0xcd,0xfc,0x90,0xfd,0x39,0xe0,
+0x2c,0xf0,0x90,0xfd,0x38,0xe0,0x3d,0xf0,0x78,0x82,0xe6,0xfd,0xe4,0xfe,0xff,0xee,
+0xcd,0xfc,0x90,0xfd,0x3c,0xe0,0x2c,0xf0,0x90,0xfd,0x3b,0xe0,0x3d,0xf0,0x78,0x7f,
+0x06,0x02,0x1a,0x64,0x75,0x60,0x00,0x22,0xe5,0x3d,0x05,0x3d,0x04,0x70,0x02,0xb2,
+0xb0,0x22,0xc0,0xe0,0xc0,0xf0,0xc0,0x82,0xc0,0x83,0xc0,0xd0,0xe8,0xc0,0xe0,0xe9,
+0xc0,0xe0,0xea,0xc0,0xe0,0xeb,0xc0,0xe0,0xec,0xc0,0xe0,0xed,0xc0,0xe0,0xee,0xc0,
+0xe0,0xef,0xc0,0xe0,0x90,0xff,0x92,0xe0,0x12,0x01,0xb7,0x1b,0x80,0x30,0x1b,0x80,
+0x32,0x1b,0x8f,0x38,0x1b,0xa1,0x3a,0x1b,0xb3,0x3e,0x1b,0xcb,0x44,0x1b,0xbf,0x46,
+0x1b,0xd7,0x50,0x1c,0x19,0x52,0x1b,0xf8,0x54,0x1c,0x3a,0x56,0x00,0x00,0x1c,0x5b,
+0x90,0xff,0x92,0xe0,0x7f,0x00,0xfe,0x7c,0x01,0x12,0x31,0x9a,0x02,0x1c,0x6b,0xe4,
+0xff,0x04,0xfe,0x7c,0x03,0x12,0x31,0x9a,0x74,0x20,0x90,0xff,0xfe,0xf0,0x02,0x1c,
+0x6b,0xe4,0xff,0x04,0xfe,0x7c,0x02,0x12,0x31,0x9a,0x74,0x40,0x90,0xff,0xfe,0xf0,
+0x02,0x1c,0x6b,0xe4,0xff,0x04,0xfe,0x7c,0x04,0x12,0x31,0x9a,0x02,0x1c,0x6b,0xe4,
+0xff,0x04,0xfe,0x7c,0x05,0x12,0x31,0x9a,0x02,0x1c,0x6b,0xe4,0xff,0x04,0xfe,0x7c,
+0x06,0x12,0x31,0x9a,0x02,0x1c,0x6b,0x90,0xff,0xa5,0xe0,0x7d,0x00,0x90,0xfd,0x00,
+0xcd,0xf0,0xa3,0xcd,0xf0,0x90,0xfd,0x01,0xe0,0xfc,0xf5,0x83,0x90,0xfd,0x00,0xe0,
+0x44,0x33,0xfd,0x12,0x1c,0xfe,0x80,0x73,0x90,0xff,0xb5,0xe0,0x7d,0x00,0x90,0xfd,
+0x02,0xcd,0xf0,0xa3,0xcd,0xf0,0x90,0xfd,0x03,0xe0,0xfc,0xf5,0x83,0x90,0xfd,0x02,
+0xe0,0x44,0x43,0xfd,0x12,0x1c,0xfe,0x80,0x52,0x90,0xff,0xa6,0xe0,0x7d,0x00,0x90,
+0xfd,0x04,0xcd,0xf0,0xa3,0xcd,0xf0,0x90,0xfd,0x05,0xe0,0xfc,0xf5,0x83,0x90,0xfd,
+0x04,0xe0,0x44,0x34,0xfd,0x12,0x1c,0xfe,0x80,0x31,0x90,0xff,0xb6,0xe0,0x7d,0x00,
+0x90,0xfd,0x06,0xcd,0xf0,0xa3,0xcd,0xf0,0x90,0xfd,0x07,0xe0,0xfc,0xf5,0x83,0x90,
+0xfd,0x06,0xe0,0x44,0x44,0xfd,0x12,0x1c,0xfe,0x80,0x10,0x90,0xff,0x92,0xe0,0x7d,
+0x00,0xfc,0xed,0x44,0xaa,0xfd,0x12,0x1c,0xfe,0x80,0x00,0xe4,0x90,0xff,0x92,0xf0,
+0xd0,0xe0,0xff,0xd0,0xe0,0xfe,0xd0,0xe0,0xfd,0xd0,0xe0,0xfc,0xd0,0xe0,0xfb,0xd0,
+0xe0,0xfa,0xd0,0xe0,0xf9,0xd0,0xe0,0xf8,0xd0,0xd0,0xd0,0x83,0xd0,0x82,0xd0,0xf0,
+0xd0,0xe0,0x32,0x05,0x81,0x05,0x81,0x05,0x81,0x05,0x81,0xa8,0x81,0x18,0x18,0x18,
+0xed,0xf6,0x08,0xec,0xf6,0x90,0xff,0x6a,0xe0,0x20,0xe7,0x02,0x80,0xf7,0x90,0xff,
+0x69,0xe0,0x7d,0x00,0xa8,0x81,0x18,0xcd,0xf6,0xcd,0x08,0xf6,0x7d,0x03,0xa8,0x81,
+0xe6,0x18,0xfc,0xe6,0xcc,0x25,0xe0,0xcc,0x33,0xcc,0xdd,0xf9,0xcc,0xf6,0xcc,0x08,
+0xf6,0xa8,0x81,0x18,0xe6,0x44,0xf8,0xf6,0xa8,0x81,0x18,0x18,0x18,0xe6,0xfd,0x08,
+0xe6,0xfc,0xa8,0x81,0x18,0x86,0x83,0x08,0x86,0x82,0xed,0xf0,0xa3,0xec,0xf0,0x74,
+0x02,0x90,0xff,0x6a,0xf0,0x15,0x81,0x15,0x81,0x15,0x81,0x15,0x81,0x22,0xe5,0x81,
+0x24,0x05,0xf5,0x81,0xe4,0xa8,0x81,0x18,0xf6,0xa8,0x81,0x18,0x18,0x18,0x18,0xed,
+0xf6,0x08,0xec,0xf6,0x90,0xfb,0xfd,0xe0,0x24,0xf8,0x50,0x03,0x02,0x1e,0x1f,0xe4,
+0xa8,0x81,0x18,0x18,0xf6,0xa8,0x81,0x18,0xe6,0xfe,0xa8,0x81,0x18,0x18,0x18,0x18,
+0xe6,0xfd,0x08,0xe6,0xfc,0x7f,0x00,0xef,0x24,0xf8,0x40,0x4d,0xe4,0xef,0x25,0xe0,
+0x24,0x85,0xf5,0x82,0xe4,0x34,0xfd,0xf5,0x83,0xe0,0xfb,0xa3,0xe0,0x6c,0x70,0x03,
+0xfa,0xeb,0x6d,0x70,0x09,0x74,0x01,0xa8,0x81,0x18,0x18,0xf6,0x80,0x2b,0xe4,0xef,
+0x25,0xe0,0x24,0x85,0xf5,0x82,0xe4,0x34,0xfd,0xf5,0x83,0x7a,0x00,0xe0,0x54,0xf0,
+0xcc,0xf8,0xcc,0xcd,0xf9,0xcd,0xfb,0x78,0x00,0xe9,0x54,0xf0,0xf9,0xea,0x68,0x70,
+0x02,0xeb,0x69,0x70,0x01,0x0e,0x0f,0x80,0xae,0xa8,0x81,0x18,0xee,0xf6,0xa8,0x81,
+0x18,0x18,0x18,0x18,0xed,0xf6,0x08,0xec,0xf6,0xa8,0x81,0xef,0xf6,0xa8,0x81,0x18,
+0x18,0xe6,0x70,0x79,0xa8,0x81,0x18,0xe6,0x24,0xf7,0x40,0x71,0xa8,0x81,0x18,0x18,
+0x18,0x18,0xe6,0x54,0x0f,0xa8,0x81,0xf6,0x64,0x04,0x60,0x17,0xa8,0x81,0xe6,0x64,
+0x03,0x60,0x10,0xa8,0x81,0x18,0x18,0x18,0x18,0xe6,0xfd,0x08,0xe6,0xfc,0x12,0x1c,
+0x93,0x80,0x4a,0x7c,0x0a,0x12,0x30,0xfa,0xa8,0x81,0x18,0x18,0x18,0x18,0xe6,0xfd,
+0x08,0xe6,0xfc,0x90,0xfb,0xfc,0xe0,0x25,0xe0,0x24,0x85,0xf5,0x82,0xe4,0x34,0xfd,
+0xf5,0x83,0xed,0xf0,0xa3,0xec,0xf0,0x90,0xfb,0xfc,0xe0,0xff,0xe4,0xef,0x04,0x54,
+0x07,0xff,0x90,0xfb,0xfc,0xf0,0x90,0xfb,0xfd,0xe0,0x04,0xf0,0x12,0x31,0x93,0x90,
+0xfb,0xfe,0xe0,0x70,0x08,0xe4,0xfe,0xff,0x7c,0x0f,0x12,0x31,0x9a,0x80,0x27,0x90,
+0xfb,0xff,0xe0,0x04,0xf0,0x54,0x3f,0x70,0x1d,0x90,0xfb,0xff,0xe0,0x44,0xfe,0x7d,
+0x00,0xfc,0x90,0xfb,0xfc,0xe0,0x25,0xe0,0x24,0x85,0xf5,0x82,0xe4,0x34,0xfd,0xf5,
+0x83,0xed,0xf0,0xa3,0xec,0xf0,0xe5,0x81,0x24,0xfb,0xf5,0x81,0x22,0x78,0x85,0x76,
+0x00,0x78,0x86,0x76,0x00,0x74,0x01,0x90,0xfb,0xfe,0xf0,0x12,0x30,0x85,0x90,0xfb,
+0xfd,0xe0,0x60,0x59,0x7c,0x0a,0x12,0x30,0xfa,0x90,0xfb,0xfb,0xe0,0x25,0xe0,0x24,
+0x85,0xf5,0x82,0xe4,0x34,0xfd,0xf5,0x83,0xe0,0xfd,0xa3,0xe0,0xfc,0x90,0xfb,0xfb,
+0xe0,0x25,0xe0,0x24,0x85,0xf5,0x82,0xe4,0x34,0xfd,0xf5,0x83,0xe4,0xf0,0xa3,0xf0,
+0x90,0xfb,0xfb,0xe0,0xff,0xe4,0xef,0x04,0x54,0x07,0xff,0x90,0xfb,0xfb,0xf0,0x90,
+0xfb,0xfd,0xe0,0x14,0xf0,0x78,0x83,0xed,0xf6,0x08,0xec,0xf6,0x12,0x31,0x93,0xb2,
+0xb3,0x78,0x83,0xe6,0xfd,0x08,0xe6,0xfc,0x12,0x08,0xe5,0x80,0xa1,0x12,0x31,0xe7,
+0x78,0x85,0x06,0xb6,0x00,0x11,0x78,0x85,0x76,0x00,0x78,0x86,0xe6,0xf4,0x04,0x04,
+0xa2,0xe0,0x92,0xb4,0x78,0x86,0xf6,0x80,0x85,0xe4,0x90,0xfb,0xfe,0xf0,0x90,0xfb,
+0xfd,0xe0,0x7d,0x00,0xfc,0xed,0x44,0xcf,0xfd,0x12,0x1c,0x93,0x12,0x31,0x08,0x22,
+0x12,0x30,0x85,0xe5,0x6a,0x64,0x49,0x45,0x69,0x60,0x15,0x90,0xff,0x83,0xe0,0x54,
+0x0f,0x7d,0x00,0xd3,0x95,0x6a,0xed,0x95,0x69,0x50,0x05,0x12,0x2e,0xce,0x80,0x03,
+0x12,0x2f,0x9e,0x12,0x31,0x08,0x22,0x12,0x30,0x85,0xe5,0x6a,0x64,0x49,0x45,0x69,
+0x60,0x05,0x12,0x2f,0xd8,0x80,0x0e,0x90,0xff,0x80,0xe0,0x44,0x08,0xf0,0x90,0xff,
+0x83,0xe0,0x54,0x7f,0xf0,0x12,0x31,0x08,0x22,0x12,0x30,0x85,0x8c,0x54,0xec,0x54,
+0xf0,0xb4,0x10,0x15,0x75,0x64,0x3d,0x75,0x63,0xfd,0x75,0x62,0x01,0xe5,0x64,0x24,
+0x03,0xf5,0x64,0xe5,0x63,0x34,0x00,0xf5,0x63,0xe4,0xf5,0x57,0xf5,0x56,0xe5,0x56,
+0xc3,0x94,0x01,0x50,0x27,0xe5,0x54,0x54,0x0f,0xfc,0xad,0x64,0xae,0x63,0xaf,0x62,
+0x12,0x0e,0x82,0x8c,0x55,0xec,0x60,0x02,0x80,0x12,0x05,0x64,0xe5,0x64,0x70,0x02,
+0x05,0x63,0x05,0x57,0xe5,0x57,0x70,0x02,0x05,0x56,0x80,0xd2,0xe5,0x54,0x54,0x0f,
+0x24,0x97,0xf8,0xc6,0x54,0xfe,0xf6,0xe5,0x54,0x54,0x0f,0x7f,0x00,0xfe,0x7c,0x12,
+0x12,0x31,0x9a,0xe5,0x55,0x14,0x70,0x09,0x7d,0x00,0x7c,0x09,0x12,0x24,0xb1,0x80,
+0x07,0xad,0x57,0x7c,0x00,0x12,0x24,0xb1,0x12,0x31,0x08,0x22,0x12,0x30,0x85,0x90,
+0xff,0xfc,0xe0,0x44,0x02,0xf0,0x90,0xff,0x00,0xe0,0x30,0xe7,0x13,0x90,0xff,0x83,
+0xe0,0x44,0x80,0xf0,0x43,0x67,0x80,0x90,0xff,0xfc,0xe0,0x44,0x01,0xf0,0x80,0x11,
+0x90,0xff,0x82,0xe0,0x44,0x08,0xf0,0x53,0x67,0x7f,0x90,0xff,0xfc,0xe0,0x54,0xfe,
+0xf0,0x90,0xff,0x81,0xe0,0x44,0x80,0xf0,0x12,0x25,0x64,0x90,0xff,0xfe,0xe0,0x44,
+0x05,0xf0,0x90,0xff,0xfc,0xe0,0x54,0xfd,0xf0,0x12,0x31,0x08,0x22,0x12,0x30,0x85,
+0x7c,0x01,0x12,0x32,0x48,0x78,0xa7,0xe6,0x44,0x02,0xf6,0x74,0xfe,0xfc,0x04,0xfd,
+0x12,0x1c,0xfe,0x90,0xff,0x6a,0xe0,0x30,0xe7,0x02,0x80,0xf7,0xe4,0xf5,0x4e,0x75,
+0x4d,0x10,0xac,0x4e,0xad,0x4d,0xe5,0x4e,0x15,0x4e,0x70,0x02,0x15,0x4d,0xec,0x4d,
+0x60,0x02,0x80,0xee,0x43,0x87,0x01,0x12,0x31,0x08,0x22,0x12,0x30,0x85,0x7c,0x02,
+0x12,0x31,0x14,0x78,0xa7,0xe6,0x54,0xfd,0xf6,0x12,0x31,0x08,0x22,0x12,0x30,0x85,
+0x78,0xa7,0xe6,0x30,0xe0,0x2c,0x78,0xa7,0xe6,0x30,0xe1,0x26,0x78,0xa7,0xe6,0xfc,
+0xf5,0x83,0x18,0xe6,0x44,0xf0,0xfd,0x12,0x1c,0x93,0x90,0xff,0xfc,0xe0,0x44,0x20,
+0xf0,0x7c,0x02,0x12,0x32,0x48,0x78,0xa7,0xe6,0x54,0xfd,0xf6,0x74,0x1a,0x90,0xff,
+0xfe,0xf0,0x78,0xa7,0xe6,0xfc,0xf5,0x83,0x18,0xe6,0x44,0xf1,0xfd,0x12,0x1c,0x93,
+0x12,0x31,0x08,0x22,0x75,0x67,0x00,0x75,0x68,0x00,0xe4,0xf5,0x66,0xf5,0x65,0xe4,
+0xf5,0x69,0x75,0x6a,0x49,0x74,0x84,0x90,0xff,0x82,0xf0,0x74,0x84,0x90,0xff,0x80,
+0xf0,0x74,0x80,0x90,0xff,0x68,0xf0,0x74,0x80,0x90,0xff,0x6a,0xf0,0xad,0x46,0xaf,
+0x45,0x7e,0x00,0xee,0x24,0xfc,0x50,0x03,0x02,0x21,0x6a,0xe4,0xee,0x75,0xf0,0x07,
+0xa4,0x24,0x3f,0xf5,0x82,0xe4,0x34,0xfc,0xf5,0x83,0xe0,0xff,0xe4,0xef,0x54,0x80,
+0xfd,0xe4,0xef,0x54,0x0f,0x14,0xff,0xed,0x60,0x38,0xe4,0xef,0x75,0xf0,0x08,0xa4,
+0x24,0x48,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0x74,0x90,0xf0,0xe4,0xef,0x75,0xf0,
+0x08,0xa4,0x24,0x4a,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0x74,0x80,0xf0,0xe4,0xef,
+0x75,0xf0,0x08,0xa4,0x24,0x4e,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0x74,0x80,0xf0,
+0x80,0x34,0xe4,0xef,0x75,0xf0,0x08,0xa4,0x24,0x08,0xf5,0x82,0xe4,0x34,0xff,0xf5,
+0x83,0x74,0x90,0xf0,0xe4,0xef,0x75,0xf0,0x08,0xa4,0x24,0x0a,0xf5,0x82,0xe4,0x34,
+0xff,0xf5,0x83,0xe4,0xf0,0xe4,0xef,0x75,0xf0,0x08,0xa4,0x24,0x0e,0xf5,0x82,0xe4,
+0x34,0xff,0xf5,0x83,0xe4,0xf0,0x0e,0x02,0x20,0xd3,0x8d,0x46,0x8e,0x44,0x8f,0x45,
+0x74,0x7f,0x90,0xff,0xfd,0xf0,0x74,0x90,0x90,0xff,0xfc,0xf0,0x90,0xfc,0x19,0xe0,
+0x30,0xe6,0x07,0x90,0xff,0xfc,0xe0,0x44,0x04,0xf0,0x22,0x90,0xfc,0x0d,0xe0,0x14,
+0x70,0x04,0x90,0xfc,0x0c,0xe0,0x70,0x39,0x90,0xfc,0x00,0x79,0x06,0x7a,0x35,0x7b,
+0x12,0x78,0x01,0x12,0x03,0xf5,0x7f,0x00,0xef,0x33,0x40,0x15,0xef,0x90,0x35,0x4d,
+0x93,0xfc,0xef,0x24,0x80,0xf5,0x82,0xe4,0x34,0xfc,0xf5,0x83,0xec,0xf0,0x0f,0x80,
+0xe7,0x8f,0x59,0x90,0xfc,0x2b,0x79,0x18,0x7a,0x35,0x7b,0x35,0x78,0x01,0x12,0x03,
+0xf5,0xe4,0x90,0xff,0xff,0xf0,0x74,0x51,0x90,0xff,0xfa,0xf0,0x74,0x04,0x90,0xff,
+0xfb,0xf0,0x74,0x53,0x90,0xff,0xf8,0xf0,0x74,0x51,0x90,0xff,0xf9,0xf0,0x74,0x55,
+0x90,0xff,0xf7,0xf0,0x74,0x93,0x90,0xff,0xf6,0xf0,0x74,0x32,0x90,0xff,0xf5,0xf0,
+0x75,0x64,0x3d,0x75,0x63,0xfd,0x75,0x62,0x01,0xe4,0x90,0xff,0x83,0xf0,0x74,0x80,
+0x90,0xff,0x81,0xf0,0x75,0x58,0x04,0xe5,0x58,0x75,0xf0,0x07,0xa4,0x24,0x3f,0xf5,
+0x82,0xe4,0x34,0xfc,0xf5,0x83,0xe0,0x78,0x89,0xf6,0xfc,0x54,0x0f,0x14,0xfc,0x78,
+0x89,0xec,0xf6,0xe5,0x58,0x75,0xf0,0x07,0xa4,0x24,0x41,0xf5,0x82,0xe4,0x34,0xfc,
+0xf5,0x83,0xe0,0x78,0x8c,0x76,0xf8,0x08,0x76,0x00,0xfc,0x78,0x89,0xe6,0x75,0xf0,
+0x08,0xa4,0x24,0x48,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xe4,0xf0,0x78,0x89,0xe6,
+0x75,0xf0,0x08,0xa4,0x24,0x4f,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xec,0xf0,0x78,
+0x8c,0xe6,0xff,0x08,0xe6,0x7e,0x03,0xcf,0xc3,0x13,0xcf,0x13,0xde,0xf9,0xfe,0x78,
+0x89,0xe6,0x75,0xf0,0x08,0xa4,0x24,0x49,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xee,
+0xf0,0x78,0x89,0xe6,0x75,0xf0,0x08,0xa4,0x24,0x4a,0xf5,0x82,0xe4,0x34,0xff,0xf5,
+0x83,0x74,0x80,0xf0,0x78,0x8a,0xec,0xf6,0x7d,0x00,0x78,0x8d,0xe6,0x2c,0xf6,0x18,
+0xe6,0x3d,0xf6,0x78,0x8c,0xe6,0xfd,0x08,0xe6,0x7c,0x03,0xcd,0xc3,0x13,0xcd,0x13,
+0xdc,0xf9,0xfc,0x78,0x89,0xe6,0x75,0xf0,0x08,0xa4,0x24,0x4d,0xf5,0x82,0xe4,0x34,
+0xff,0xf5,0x83,0xec,0xf0,0x78,0x89,0xe6,0x75,0xf0,0x08,0xa4,0x24,0x4e,0xf5,0x82,
+0xe4,0x34,0xff,0xf5,0x83,0xe4,0xf0,0x78,0x8c,0xe6,0xfd,0x08,0xe6,0xfc,0x78,0x89,
+0xe6,0xff,0x7e,0x00,0xee,0x24,0xfc,0x50,0x03,0x02,0x24,0x6b,0xe4,0xee,0x75,0xf0,
+0x07,0xa4,0x24,0x3f,0xf5,0x82,0xe4,0x34,0xfc,0xf5,0x83,0xe0,0xff,0xe4,0xef,0x54,
+0x80,0xfa,0xe4,0xef,0x54,0x0f,0x14,0xff,0xe4,0xee,0x75,0xf0,0x07,0xa4,0x24,0x41,
+0xf5,0x82,0xe4,0x34,0xfc,0xf5,0x83,0xe0,0x78,0x8a,0xf6,0xee,0x75,0xf0,0x80,0xa4,
+0x24,0x08,0xf8,0xe5,0xf0,0x34,0xf8,0xf9,0xe8,0xfc,0xe9,0xfd,0x8a,0x59,0xea,0x70,
+0x03,0x02,0x23,0xd8,0xe4,0xef,0x75,0xf0,0x08,0xa4,0x24,0x48,0xf5,0x82,0xe4,0x34,
+0xff,0xf5,0x83,0xe4,0xf0,0x78,0x8a,0xe6,0xfa,0xe4,0xef,0x75,0xf0,0x08,0xa4,0x24,
+0x4f,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xea,0xf0,0xed,0xfb,0xec,0x7a,0x03,0xcb,
+0xc3,0x13,0xcb,0x13,0xda,0xf9,0xfa,0xe4,0xef,0x75,0xf0,0x08,0xa4,0x24,0x49,0xf5,
+0x82,0xe4,0x34,0xff,0xf5,0x83,0xea,0xf0,0x78,0x8a,0xe6,0x7b,0x00,0xfa,0xec,0x2a,
+0xfc,0xed,0x3b,0xfd,0xfb,0xec,0x7a,0x03,0xcb,0xc3,0x13,0xcb,0x13,0xda,0xf9,0xfa,
+0xe4,0xef,0x75,0xf0,0x08,0xa4,0x24,0x4d,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xea,
+0xf0,0xe4,0xef,0x75,0xf0,0x08,0xa4,0x24,0x4a,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,
+0x74,0x80,0xf0,0xe4,0xef,0x75,0xf0,0x08,0xa4,0x24,0x4e,0xf5,0x82,0xe4,0x34,0xff,
+0xf5,0x83,0x74,0x80,0xf0,0x02,0x24,0x67,0xe4,0xef,0x75,0xf0,0x08,0xa4,0x24,0x08,
+0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xe4,0xf0,0x78,0x8a,0xe6,0xfa,0xe4,0xef,0x75,
+0xf0,0x08,0xa4,0x24,0x0f,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xea,0xf0,0xed,0xfb,
+0xec,0x7a,0x03,0xcb,0xc3,0x13,0xcb,0x13,0xda,0xf9,0xfa,0xe4,0xef,0x75,0xf0,0x08,
+0xa4,0x24,0x09,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xea,0xf0,0x78,0x8a,0xe6,0x7b,
+0x00,0xfa,0xec,0x2a,0xfc,0xed,0x3b,0xfd,0xfb,0xec,0x7a,0x03,0xcb,0xc3,0x13,0xcb,
+0x13,0xda,0xf9,0xfa,0xe4,0xef,0x75,0xf0,0x08,0xa4,0x24,0x0d,0xf5,0x82,0xe4,0x34,
+0xff,0xf5,0x83,0xea,0xf0,0xe4,0xef,0x75,0xf0,0x08,0xa4,0x24,0x0a,0xf5,0x82,0xe4,
+0x34,0xff,0xf5,0x83,0xe4,0xf0,0xe4,0xef,0x75,0xf0,0x08,0xa4,0x24,0x0e,0xf5,0x82,
+0xe4,0x34,0xff,0xf5,0x83,0xe4,0xf0,0x0e,0x02,0x22,0xf4,0x8e,0x58,0x78,0x8c,0xed,
+0xf6,0x08,0xec,0xf6,0x78,0x89,0xef,0xf6,0x12,0x20,0xa4,0x22,0x8c,0x26,0xec,0x30,
+0xe7,0x18,0xe5,0x26,0x54,0x0f,0x14,0x75,0xf0,0x08,0xa4,0x24,0x48,0xf5,0x82,0xe4,
+0x34,0xff,0xf5,0x83,0xe0,0x54,0xdf,0xf0,0x80,0x16,0xe5,0x26,0x54,0x0f,0x14,0x75,
+0xf0,0x08,0xa4,0x24,0x08,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xe0,0x54,0xdf,0xf0,
+0x22,0xec,0x90,0xfd,0x3f,0xf0,0x8c,0x24,0xed,0x24,0x03,0xf5,0x25,0x7d,0x00,0xd3,
+0x95,0x6c,0xed,0x95,0x6b,0x40,0x03,0x85,0x6c,0x25,0xe5,0x25,0x24,0xb7,0x50,0x09,
+0x75,0x25,0x03,0x74,0x02,0x90,0xfd,0x3f,0xf0,0xac,0x25,0x12,0x2f,0xc3,0x22,0xe4,
+0xf5,0x66,0xf5,0x65,0x12,0x24,0xe8,0x22,0x90,0xfd,0x3d,0xe0,0x65,0x6d,0x60,0x0e,
+0x74,0x04,0x90,0xfd,0x3f,0xf0,0xe4,0xf5,0x65,0x75,0x66,0x03,0x80,0x46,0x7d,0x6d,
+0xe4,0xfe,0xff,0x79,0x3d,0x7a,0xfd,0x7b,0x01,0x74,0x05,0x78,0x00,0x12,0x03,0x3f,
+0xe5,0x66,0x24,0x03,0xf5,0x66,0xe5,0x65,0x34,0x00,0xf5,0x65,0xe5,0x66,0xd3,0x95,
+0x6c,0xe5,0x65,0x95,0x6b,0x40,0x06,0x85,0x6c,0x66,0x85,0x6b,0x65,0xd3,0xe5,0x66,
+0x94,0x48,0xe5,0x65,0x94,0x00,0x40,0x0c,0x74,0x02,0x90,0xfd,0x3f,0xf0,0xe4,0xf5,
+0x65,0x75,0x66,0x03,0xac,0x66,0x12,0x2f,0xc3,0x22,0xec,0x90,0xfd,0x3f,0xf0,0xe4,
+0xf5,0x66,0xf5,0x65,0x8c,0x32,0xec,0x60,0x05,0x12,0x2f,0xb4,0x80,0x05,0x7c,0x00,
+0x12,0x2f,0xc3,0x22,0x90,0xff,0x04,0xe0,0xf5,0x4a,0x90,0xff,0x06,0xe0,0xfd,0xa3,
+0xe0,0xed,0x7d,0x00,0xfc,0x7d,0x00,0xfc,0x90,0xff,0x06,0xe0,0xff,0xa3,0xe0,0x7e,
+0x00,0xff,0xe4,0xfe,0xec,0x4e,0xfc,0xed,0x4f,0xfd,0xc3,0xec,0x94,0x48,0xed,0x94,
+0x00,0x50,0x22,0x90,0xff,0x06,0xe0,0xfd,0xa3,0xe0,0xed,0x7d,0x00,0xfc,0x7d,0x00,
+0xfc,0x90,0xff,0x06,0xe0,0xff,0xa3,0xe0,0x7e,0x00,0xff,0xe4,0xfe,0xec,0x4e,0xfc,
+0xed,0x4f,0xfd,0x80,0x04,0xe4,0xfd,0x7c,0x48,0x8c,0x6c,0x8d,0x6b,0x90,0xff,0x02,
+0xe0,0xfd,0xa3,0xe0,0xed,0x7d,0x00,0xfc,0x7d,0x00,0xfc,0x90,0xff,0x02,0xe0,0xff,
+0xa3,0xe0,0x7e,0x00,0xff,0xe4,0xfe,0xec,0x4e,0xf5,0x4c,0xed,0x4f,0xf5,0x4b,0x75,
+0x64,0x3d,0x75,0x63,0xfd,0x75,0x62,0x01,0x7d,0x3d,0x7e,0xfd,0x7f,0x01,0x79,0x6d,
+0xe4,0xfa,0xfb,0x74,0x05,0x78,0x00,0x12,0x03,0x3f,0x75,0x49,0x00,0xe5,0x49,0x24,
+0xfe,0x40,0x19,0xad,0x64,0xae,0x63,0xaf,0x62,0xe4,0x12,0x03,0x0f,0x05,0x49,0x0d,
+0xed,0x70,0x01,0x0e,0x8d,0x64,0x8e,0x63,0x8f,0x62,0x80,0xe1,0x75,0x64,0x3d,0x75,
+0x63,0xfd,0x75,0x62,0x01,0x90,0xff,0x00,0xe0,0x54,0x60,0xb4,0x00,0x02,0x80,0x06,
+0xd3,0x50,0x03,0x02,0x2c,0x12,0xe5,0x4a,0x54,0x0f,0xf5,0x49,0xe5,0x4a,0x54,0x80,
+0xa2,0xe0,0x92,0x02,0x90,0xff,0x01,0xe0,0x12,0x01,0x81,0x00,0x0b,0x2c,0x0d,0x26,
+0x67,0x27,0x85,0x2c,0x0d,0x28,0x91,0x2c,0x0d,0x29,0x74,0x29,0xa8,0x2b,0x0f,0x2b,
+0x12,0x2b,0x52,0x2b,0xb6,0x2b,0xe4,0xe5,0x67,0x30,0xe7,0x0e,0xe5,0x4c,0x45,0x4b,
+0x70,0x08,0xe5,0x6c,0x64,0x02,0x45,0x6b,0x60,0x03,0x02,0x2c,0x0f,0x90,0xff,0x00,
+0xe0,0x54,0x1f,0xb4,0x00,0x02,0x80,0x03,0xd3,0x40,0x29,0xe5,0x4a,0x60,0x03,0x02,
+0x27,0x82,0xad,0x64,0xae,0x63,0xaf,0x62,0x74,0x01,0x12,0x03,0x0f,0x78,0xa7,0xe6,
+0x30,0xe0,0x0b,0xad,0x64,0xae,0x63,0xaf,0x62,0x74,0x02,0x12,0x03,0x0f,0x7c,0x02,
+0x12,0x2f,0xc3,0x22,0xb4,0x01,0x02,0x80,0x03,0xd3,0x40,0x1b,0xe5,0x67,0x20,0xe1,
+0x07,0xe5,0x4a,0x60,0x03,0x02,0x27,0x82,0xe5,0x4a,0x24,0xfe,0x50,0x03,0x02,0x27,
+0x82,0x7c,0x02,0x12,0x2f,0xc3,0x22,0xb4,0x02,0x02,0x80,0x06,0xd3,0x50,0x03,0x02,
+0x27,0x80,0xe5,0x67,0x20,0xe1,0x0d,0xe5,0x4a,0x60,0x09,0xe5,0x4a,0x64,0x80,0x60,
+0x03,0x02,0x27,0x82,0xac,0x4a,0x12,0x30,0x4a,0x40,0x03,0x02,0x27,0x82,0xe5,0x49,
+0x70,0x25,0x30,0x02,0x11,0x90,0xff,0x80,0xe0,0x54,0x08,0xad,0x64,0xae,0x63,0xaf,
+0x62,0x12,0x03,0x0f,0x80,0x0f,0x90,0xff,0x82,0xe0,0x54,0x08,0xad,0x64,0xae,0x63,
+0xaf,0x62,0x12,0x03,0x0f,0x80,0x3d,0x15,0x49,0x30,0x02,0x1d,0xe5,0x49,0x75,0xf0,
+0x08,0xa4,0x24,0x48,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xe0,0x54,0x08,0xad,0x64,
+0xae,0x63,0xaf,0x62,0x12,0x03,0x0f,0x80,0x1b,0xe5,0x49,0x75,0xf0,0x08,0xa4,0x24,
+0x08,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xe0,0x54,0x08,0xad,0x64,0xae,0x63,0xaf,
+0x62,0x12,0x03,0x0f,0xad,0x64,0xae,0x63,0xaf,0x62,0x12,0x01,0xe6,0x60,0x0b,0xad,
+0x64,0xae,0x63,0xaf,0x62,0x74,0x01,0x12,0x03,0x0f,0x7c,0x02,0x12,0x2f,0xc3,0x22,
+0x80,0x00,0x02,0x2c,0x0f,0xe5,0x67,0x20,0xe7,0x06,0xe5,0x6c,0x45,0x6b,0x60,0x03,
+0x02,0x2c,0x0f,0x90,0xff,0x00,0xe0,0x54,0x1f,0xb4,0x00,0x02,0x80,0x03,0xd3,0x40,
+0x1a,0xe5,0x4c,0x14,0x45,0x4b,0x70,0x04,0xe5,0x4a,0x60,0x03,0x02,0x28,0x8e,0x78,
+0xa7,0xe6,0x54,0xfe,0xf6,0x7c,0x00,0x12,0x2f,0xc3,0x22,0xb4,0x01,0x02,0x80,0x03,
+0xd3,0x40,0x2a,0xe5,0x67,0x20,0xe1,0x08,0xe5,0x67,0x20,0xe0,0x03,0x02,0x28,0x8e,
+0xe5,0x67,0x30,0xe0,0x04,0xe5,0x4a,0x70,0x0b,0xe5,0x67,0x30,0xe1,0x09,0xe5,0x4a,
+0x24,0xfe,0x50,0x03,0x02,0x28,0x8e,0x7c,0x00,0x12,0x2f,0xc3,0x22,0xb4,0x02,0x02,
+0x80,0x06,0xd3,0x50,0x03,0x02,0x28,0x8c,0xe5,0x4c,0x45,0x4b,0x60,0x03,0x02,0x28,
+0x8e,0xac,0x4a,0x12,0x30,0x4a,0x40,0x03,0x02,0x28,0x8e,0xe5,0x67,0x20,0xe1,0x07,
+0xe5,0x67,0x20,0xe0,0x02,0x80,0x77,0xe5,0x67,0x30,0xe0,0x06,0xe5,0x49,0x60,0x02,
+0x80,0x6c,0xe5,0x49,0x70,0x0f,0x90,0xff,0x82,0xe0,0x54,0xf7,0xf0,0x90,0xff,0x80,
+0xe0,0x54,0xf7,0xf0,0x22,0xe5,0x49,0xb4,0x01,0x02,0x80,0x03,0xd3,0x40,0x09,0x7d,
+0x01,0x7c,0x03,0x12,0x0f,0x0b,0x80,0x11,0xb4,0x02,0x02,0x80,0x03,0xd3,0x40,0x09,
+0x7d,0x01,0x7c,0x04,0x12,0x0f,0x0b,0x80,0x00,0x15,0x49,0x30,0x02,0x15,0xe5,0x49,
+0x75,0xf0,0x08,0xa4,0x24,0x48,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xe0,0x54,0xf7,
+0xf0,0x80,0x13,0xe5,0x49,0x75,0xf0,0x08,0xa4,0x24,0x08,0xf5,0x82,0xe4,0x34,0xff,
+0xf5,0x83,0xe0,0x54,0xf7,0xf0,0x7c,0x00,0x12,0x2f,0xc3,0x22,0x80,0x00,0x02,0x2c,
+0x0f,0xe5,0x67,0x20,0xe7,0x06,0xe5,0x6c,0x45,0x6b,0x60,0x03,0x02,0x2c,0x0f,0x90,
+0xff,0x00,0xe0,0x54,0x1f,0xb4,0x00,0x02,0x80,0x03,0xd3,0x40,0x1a,0xe5,0x4c,0x14,
+0x45,0x4b,0x70,0x04,0xe5,0x4a,0x60,0x03,0x02,0x29,0x71,0x78,0xa7,0xe6,0x44,0x01,
+0xf6,0x7c,0x00,0x12,0x2f,0xc3,0x22,0xb4,0x01,0x02,0x80,0x03,0xd3,0x40,0x29,0xe5,
+0x67,0x20,0xe1,0x08,0xe5,0x67,0x20,0xe0,0x03,0x02,0x29,0x71,0xe5,0x67,0x30,0xe0,
+0x04,0xe5,0x49,0x70,0x0b,0xe5,0x67,0x30,0xe1,0x08,0xe5,0x49,0x24,0xfe,0x50,0x02,
+0x80,0x7f,0x7c,0x00,0x12,0x2f,0xc3,0x22,0xb4,0x02,0x02,0x80,0x03,0xd3,0x40,0x6f,
+0xe5,0x4c,0x45,0x4b,0x60,0x02,0x80,0x69,0xac,0x4a,0x12,0x30,0x4a,0x40,0x02,0x80,
+0x60,0xe5,0x67,0x20,0xe1,0x07,0xe5,0x67,0x20,0xe0,0x02,0x80,0x54,0xe5,0x49,0x70,
+0x14,0x30,0x02,0x09,0x90,0xff,0x80,0xe0,0x44,0x08,0xf0,0x80,0x07,0x90,0xff,0x82,
+0xe0,0x44,0x08,0xf0,0x22,0xe5,0x67,0x30,0xe1,0x33,0x15,0x49,0x30,0x02,0x15,0xe5,
+0x49,0x75,0xf0,0x08,0xa4,0x24,0x48,0xf5,0x82,0xe4,0x34,0xff,0xf5,0x83,0xe0,0x44,
+0x08,0xf0,0x80,0x13,0xe5,0x49,0x75,0xf0,0x08,0xa4,0x24,0x08,0xf5,0x82,0xe4,0x34,
+0xff,0xf5,0x83,0xe0,0x44,0x08,0xf0,0x7c,0x00,0x12,0x2f,0xc3,0x22,0x80,0x02,0x80,
+0x00,0x02,0x2c,0x0f,0xe5,0x67,0x20,0xe7,0x12,0xe5,0x6c,0x45,0x6b,0x70,0x0c,0xe5,
+0x4a,0x70,0x08,0x90,0xff,0x00,0xe0,0x54,0x1f,0x60,0x03,0x02,0x2c,0x0f,0xe5,0x4c,
+0x90,0xff,0xff,0xf0,0x90,0xff,0xff,0xe0,0x60,0x05,0x43,0x67,0x01,0x80,0x03,0x53,
+0x67,0xfe,0x7c,0x00,0x12,0x2f,0xc3,0x22,0xe5,0x67,0x30,0xe7,0x0e,0xe5,0x6c,0x45,
+0x6b,0x60,0x08,0x90,0xff,0x00,0xe0,0x54,0x1f,0x60,0x03,0x02,0x2c,0x0f,0xad,0x4b,
+0xe5,0x4c,0xed,0x7d,0x00,0xfc,0x7d,0x00,0xfc,0xbd,0x00,0x02,0x80,0x03,0x02,0x2b,
+0x0a,0xb4,0x01,0x02,0x80,0x03,0xd3,0x40,0x32,0xe5,0x4a,0x70,0x05,0xe5,0x4c,0xfc,
+0x60,0x03,0x02,0x2b,0x0c,0x75,0x64,0x00,0x75,0x63,0xfc,0x75,0x62,0x01,0xd3,0xe5,
+0x6c,0x94,0x12,0xe5,0x6b,0x94,0x00,0x40,0x06,0xe4,0xfd,0x7c,0x12,0x80,0x04,0xac,
+0x6c,0xad,0x6b,0x8c,0x6a,0x8d,0x69,0x12,0x2f,0xd8,0x22,0xb4,0x02,0x02,0x80,0x03,
+0xd3,0x40,0x59,0xe5,0x4a,0x60,0x03,0x02,0x2b,0x0c,0xe5,0x4c,0xfc,0x70,0x27,0x75,
+0x64,0x12,0x75,0x63,0xfc,0x75,0x62,0x01,0xd3,0xe5,0x6c,0x94,0x19,0xe5,0x6b,0x94,
+0x00,0x40,0x06,0xe4,0xfd,0x7c,0x19,0x80,0x04,0xac,0x6c,0xad,0x6b,0x8c,0x6a,0x8d,
+0x69,0x12,0x2f,0xd8,0x80,0x25,0x75,0x64,0x2b,0x75,0x63,0xfc,0x75,0x62,0x01,0xd3,
+0xe5,0x6c,0x94,0x35,0xe5,0x6b,0x94,0x00,0x40,0x06,0xe4,0xfd,0x7c,0x35,0x80,0x04,
+0xac,0x6c,0xad,0x6b,0x8c,0x6a,0x8d,0x69,0x12,0x2f,0xd8,0x22,0xb4,0x03,0x02,0x80,
+0x06,0xd3,0x50,0x03,0x02,0x2b,0x0a,0xe5,0x4c,0xf5,0x49,0x70,0x0f,0x90,0xff,0x04,
+0xe0,0xfd,0xa3,0xe0,0x4d,0x60,0x03,0x02,0x2b,0x0c,0x80,0x18,0x90,0xfc,0x82,0xe0,
+0xfd,0xa3,0xe0,0xfc,0x90,0xff,0x05,0xe0,0x6c,0x70,0x07,0x90,0xff,0x04,0xe0,0x6d,
+0x60,0x02,0x80,0x68,0xe4,0xf5,0x6a,0xf5,0x69,0x7f,0x00,0xe5,0x49,0x14,0xc5,0x49,
+0x60,0x0f,0xef,0x24,0x80,0xf5,0x82,0xe4,0x34,0xfc,0xf5,0x83,0xe0,0x2f,0xff,0x80,
+0xea,0x8f,0x4a,0xe5,0x4a,0x24,0x80,0xf5,0x82,0xe4,0x34,0xfc,0xf5,0x83,0xe0,0x7d,
+0x00,0xd3,0x95,0x6c,0xed,0x95,0x6b,0x40,0x06,0xac,0x6c,0xad,0x6b,0x80,0x0f,0xe5,
+0x4a,0x24,0x80,0xf5,0x82,0xe4,0x34,0xfc,0xf5,0x83,0xe0,0x7d,0x00,0xfc,0x8c,0x6a,
+0x8d,0x69,0xe5,0x4a,0x24,0x80,0xfc,0xe4,0x34,0xfc,0xfd,0xfe,0xec,0xfd,0x7f,0x01,
+0x8d,0x64,0x8e,0x63,0x8f,0x62,0x12,0x2f,0xd8,0x22,0x80,0x00,0x02,0x2c,0x0f,0x02,
+0x2c,0x0f,0xe5,0x67,0x30,0xe7,0x19,0xe5,0x6c,0x14,0x45,0x6b,0x70,0x12,0xe5,0x4a,
+0x70,0x0e,0xe5,0x4c,0x45,0x4b,0x70,0x08,0x90,0xff,0x00,0xe0,0x54,0x1f,0x60,0x03,
+0x02,0x2c,0x0f,0xe5,0x67,0x20,0xe0,0x08,0xe5,0x67,0x20,0xe1,0x03,0x02,0x2c,0x0f,
+0x75,0x64,0x68,0xe4,0xf5,0x63,0xf5,0x62,0xe4,0xf5,0x69,0x04,0xf5,0x6a,0x12,0x2f,
+0xd8,0x22,0xe5,0x67,0x20,0xe7,0x27,0xe5,0x6c,0x45,0x6b,0x70,0x21,0xe5,0x4a,0x70,
+0x1d,0xe5,0x4c,0x64,0x02,0x45,0x4b,0x60,0x0d,0xe5,0x4c,0x14,0x45,0x4b,0x60,0x06,
+0xe5,0x4c,0x45,0x4b,0x70,0x08,0x90,0xff,0x00,0xe0,0x54,0x1f,0x60,0x03,0x02,0x2c,
+0x0f,0xe5,0x67,0x20,0xe0,0x08,0xe5,0x67,0x20,0xe1,0x03,0x02,0x2c,0x0f,0x85,0x4c,
+0x68,0xe5,0x68,0x70,0x08,0x43,0x67,0x01,0x53,0x67,0xfd,0x80,0x13,0xe5,0x68,0x64,
+0x02,0x60,0x07,0xe5,0x68,0x14,0x60,0x02,0x80,0x65,0x53,0x67,0xfe,0x43,0x67,0x02,
+0x7c,0x00,0x12,0x2f,0xc3,0x22,0xe5,0x67,0x30,0xe7,0x1a,0xe5,0x6c,0x14,0x45,0x6b,
+0x70,0x13,0xe5,0x4a,0x70,0x0f,0xe5,0x4c,0x45,0x4b,0x70,0x09,0x90,0xff,0x00,0xe0,
+0x54,0x1f,0x14,0x60,0x02,0x80,0x38,0xe5,0x67,0x20,0xe1,0x02,0x80,0x31,0x7c,0x01,
+0x12,0x2f,0xc3,0x22,0xe5,0x67,0x20,0xe7,0x15,0xe5,0x6c,0x45,0x6b,0x70,0x0f,0xe5,
+0x4c,0x45,0x4b,0x70,0x09,0x90,0xff,0x00,0xe0,0x54,0x1f,0x14,0x60,0x02,0x80,0x0f,
+0xe5,0x67,0x20,0xe1,0x02,0x80,0x08,0x7c,0x00,0x12,0x2f,0xc3,0x22,0x80,0x00,0x02,
+0x2e,0xca,0xb4,0x40,0x02,0x80,0x06,0xd3,0x50,0x03,0x02,0x2e,0xc0,0x90,0xff,0x01,
+0xe0,0x90,0xfd,0x3d,0xf0,0xe5,0x4a,0x90,0xfd,0x3e,0xf0,0xe4,0x90,0xfd,0x3f,0xf0,
+0xe5,0x64,0x24,0x03,0xf5,0x64,0xe5,0x63,0x34,0x00,0xf5,0x63,0xad,0x4b,0xe5,0x4c,
+0x85,0x64,0x82,0x85,0x63,0x83,0xcd,0xf0,0xa3,0xcd,0xf0,0x90,0xff,0x01,0xe0,0x12,
+0x01,0xb7,0x2c,0x7d,0x01,0x2c,0xa3,0x02,0x2c,0xcd,0x03,0x2c,0xf7,0x04,0x2d,0x45,
+0x05,0x2d,0x82,0x06,0x2d,0xa8,0x07,0x2d,0xce,0x08,0x2d,0xf4,0x09,0x2e,0x1a,0x0b,
+0x2e,0x40,0x0c,0x2e,0x4f,0x80,0x2e,0x4f,0x81,0x00,0x00,0x2e,0xad,0xe5,0x67,0x20,
+0xe7,0x06,0x7c,0x05,0x12,0x25,0x4a,0x22,0x7d,0xb7,0x7e,0x34,0x7f,0x02,0x79,0x40,
+0x7a,0xfd,0x7b,0x01,0x74,0x08,0x78,0x00,0x12,0x03,0x3f,0x7d,0x08,0x7c,0x00,0x12,
+0x24,0xb1,0x22,0xe5,0x67,0x20,0xe7,0x06,0x7c,0x05,0x12,0x25,0x4a,0x22,0xe5,0x4a,
+0xb4,0x03,0x00,0x40,0x10,0xb4,0x05,0x00,0x50,0x0b,0xe5,0x4a,0x7f,0x00,0xfe,0x7c,
+0x10,0x12,0x31,0x9a,0x22,0x7d,0x00,0x7c,0x07,0x12,0x24,0xb1,0x22,0xe5,0x67,0x20,
+0xe7,0x06,0x7c,0x05,0x12,0x25,0x4a,0x22,0xe5,0x4a,0xb4,0x03,0x00,0x40,0x10,0xb4,
+0x05,0x00,0x50,0x0b,0xe5,0x4a,0x7f,0x00,0xfe,0x7c,0x11,0x12,0x31,0x9a,0x22,0x7d,
+0x00,0x7c,0x07,0x12,0x24,0xb1,0x22,0xe5,0x67,0x20,0xe7,0x06,0x7c,0x05,0x12,0x25,
+0x4a,0x22,0xe5,0x4a,0xb4,0x05,0x02,0x80,0x03,0xd3,0x40,0x0a,0xe4,0xff,0x04,0xfe,
+0x7c,0x0a,0x12,0x31,0x9a,0x22,0xb4,0x01,0x02,0x80,0x03,0xd3,0x40,0x0a,0xe4,0xff,
+0x04,0xfe,0x7c,0x08,0x12,0x31,0x9a,0x22,0xb4,0x03,0x00,0x40,0x10,0xb4,0x05,0x00,
+0x50,0x0b,0xe5,0x4a,0x7f,0x00,0xfe,0x7c,0x13,0x12,0x31,0x9a,0x22,0x7d,0x00,0x7c,
+0x07,0x12,0x24,0xb1,0x22,0xe5,0x67,0x20,0xe7,0x34,0xd3,0xe5,0x6c,0x94,0x48,0xe5,
+0x6b,0x94,0x00,0x50,0x06,0xe5,0x6c,0x45,0x6b,0x70,0x06,0x7c,0x02,0x12,0x25,0x4a,
+0x22,0xe5,0x4a,0xb4,0x01,0x03,0xb3,0x40,0x0b,0xc3,0xb4,0x03,0x00,0x40,0x09,0xb4,
+0x06,0x00,0x50,0x04,0x12,0x30,0x70,0x22,0x7c,0x07,0x12,0x25,0x4a,0x22,0x12,0x24,
+0xe8,0x22,0xe5,0x67,0x20,0xe7,0x1d,0xe5,0x4a,0xb4,0x03,0x00,0x40,0x10,0xb4,0x05,
+0x00,0x50,0x0b,0xe5,0x4a,0x7f,0x00,0xfe,0x7c,0x16,0x12,0x31,0x9a,0x22,0x7c,0x07,
+0x12,0x25,0x4a,0x22,0x12,0x24,0xe8,0x22,0xe5,0x67,0x20,0xe7,0x1d,0xe5,0x4a,0xb4,
+0x03,0x00,0x40,0x10,0xb4,0x05,0x00,0x50,0x0b,0xe5,0x4a,0x7f,0x00,0xfe,0x7c,0x19,
+0x12,0x31,0x9a,0x22,0x7c,0x07,0x12,0x25,0x4a,0x22,0x12,0x24,0xe8,0x22,0xe5,0x67,
+0x20,0xe7,0x1d,0xe5,0x4a,0xb4,0x03,0x00,0x40,0x10,0xb4,0x05,0x00,0x50,0x0b,0xe5,
+0x4a,0x7f,0x00,0xfe,0x7c,0x17,0x12,0x31,0x9a,0x22,0x7c,0x07,0x12,0x25,0x4a,0x22,
+0x12,0x24,0xe8,0x22,0xe5,0x67,0x20,0xe7,0x1d,0xe5,0x4a,0xb4,0x03,0x00,0x40,0x10,
+0xb4,0x05,0x00,0x50,0x0b,0xe5,0x4a,0x7f,0x00,0xfe,0x7c,0x18,0x12,0x31,0x9a,0x22,
+0x7c,0x07,0x12,0x25,0x4a,0x22,0x12,0x24,0xe8,0x22,0xe5,0x67,0x20,0xe7,0x1d,0xe5,
+0x4a,0xb4,0x03,0x00,0x40,0x10,0xb4,0x05,0x00,0x50,0x0b,0xe5,0x4a,0x7f,0x00,0xfe,
+0x7c,0x15,0x12,0x31,0x9a,0x22,0x7c,0x07,0x12,0x25,0x4a,0x22,0x12,0x24,0xe8,0x22,
+0xe5,0x67,0x20,0xe7,0x06,0x7c,0x07,0x12,0x25,0x4a,0x22,0x12,0x24,0xe8,0x22,0xe5,
+0x67,0x30,0xe7,0x20,0x90,0xff,0x00,0xe0,0x54,0x1f,0x70,0x10,0x90,0xff,0x01,0xe0,
+0xb4,0x80,0x05,0x12,0x24,0xdf,0x80,0x03,0x12,0x24,0xe8,0x22,0x7d,0x00,0x7c,0x05,
+0x12,0x24,0xb1,0x22,0x90,0xff,0x00,0xe0,0x54,0x1f,0x60,0x06,0x7c,0x05,0x12,0x25,
+0x4a,0x22,0xd3,0xe5,0x6c,0x94,0x48,0xe5,0x6b,0x94,0x00,0x50,0x0b,0xc3,0xe5,0x6c,
+0x94,0x07,0xe5,0x6b,0x94,0x00,0x50,0x06,0x7c,0x03,0x12,0x25,0x4a,0x22,0xe5,0x4a,
+0xb4,0x05,0x04,0x12,0x30,0x70,0x22,0x7c,0x07,0x12,0x25,0x4a,0x22,0xe5,0x67,0x30,
+0xe7,0x08,0x7d,0x00,0x7c,0x05,0x12,0x24,0xb1,0x22,0x7c,0x05,0x12,0x25,0x4a,0x22,
+0xb4,0x20,0x02,0x80,0x03,0xd3,0x40,0x00,0x80,0x00,0x12,0x2f,0x9e,0x22,0x75,0x43,
+0x00,0x90,0xff,0x83,0xe0,0x54,0x0f,0xd3,0x95,0x43,0x40,0x24,0xe5,0x43,0x24,0xf0,
+0xf5,0x82,0xe4,0x34,0xfe,0xf5,0x83,0xe0,0xad,0x64,0xae,0x63,0xaf,0x62,0x12,0x03,
+0x0f,0x05,0x43,0x0d,0xed,0x70,0x01,0x0e,0x8d,0x64,0x8e,0x63,0x8f,0x62,0x80,0xd1,
+0xe5,0x43,0x7d,0x00,0xfc,0xc3,0xe5,0x6a,0x9c,0xf5,0x6a,0xe5,0x69,0x9d,0xf5,0x69,
+0xe5,0x6a,0x45,0x69,0x60,0x06,0xe4,0x90,0xff,0x83,0xf0,0x22,0x90,0xff,0x82,0xe0,
+0x44,0x08,0xf0,0xe4,0xf5,0x69,0x75,0x6a,0x49,0x90,0xfd,0x3d,0xe0,0xb4,0x05,0x02,
+0x80,0x03,0xd3,0x40,0x40,0x90,0xfd,0x3e,0xe0,0xf5,0x43,0xb4,0x05,0x02,0x80,0x03,
+0xd3,0x40,0x0a,0xe4,0xff,0x04,0xfe,0x7c,0x0b,0x12,0x31,0x9a,0x22,0xb4,0x01,0x02,
+0x80,0x03,0xd3,0x40,0x0a,0xe4,0xff,0x04,0xfe,0x7c,0x09,0x12,0x31,0x9a,0x22,0xb4,
+0x03,0x00,0x40,0x10,0xb4,0x05,0x00,0x50,0x0b,0xe5,0x43,0x7f,0x00,0xfe,0x7c,0x14,
+0x12,0x31,0x9a,0x22,0x22,0xb4,0x80,0x00,0x40,0x23,0xb4,0x82,0x00,0x50,0x1e,0x7c,
+0x3d,0x7d,0xfd,0x12,0x17,0xd5,0x7d,0x00,0x8c,0x66,0x8d,0x65,0x90,0xfd,0x3f,0xe0,
+0x60,0x05,0x12,0x2f,0x9e,0x80,0x05,0x7c,0x00,0x12,0x2f,0xc3,0x22,0x22,0x90,0xff,
+0x83,0xe0,0x54,0x7f,0xf0,0x90,0xff,0x82,0xe0,0x44,0x08,0xf0,0x90,0xff,0x80,0xe0,
+0x44,0x08,0xf0,0x22,0x90,0xff,0x82,0xe0,0x44,0x08,0xf0,0x90,0xff,0x80,0xe0,0x44,
+0x08,0xf0,0x22,0x8c,0x23,0x7d,0x00,0x8c,0x6a,0x8d,0x69,0x75,0x64,0x3d,0x75,0x63,
+0xfd,0x75,0x62,0x01,0x12,0x2f,0xd8,0x22,0x90,0xff,0x83,0xe0,0x54,0x7f,0xf0,0xe5,
+0x6a,0x64,0x49,0x45,0x69,0x70,0x01,0x22,0xc3,0xe5,0x6a,0x94,0x08,0xe5,0x69,0x94,
+0x00,0x40,0x15,0x75,0x21,0x08,0xe5,0x21,0x7d,0x00,0xfc,0xc3,0xe5,0x6a,0x9c,0xf5,
+0x6a,0xe5,0x69,0x9d,0xf5,0x69,0x80,0x09,0x85,0x6a,0x21,0xe4,0xf5,0x69,0x75,0x6a,
+0x49,0x75,0x22,0x00,0xe5,0x22,0xc3,0x95,0x21,0x50,0x26,0xad,0x64,0xae,0x63,0xaf,
+0x62,0x12,0x01,0xe6,0xfc,0xe5,0x22,0x24,0xf8,0xf5,0x82,0xe4,0x34,0xfe,0xf5,0x83,
+0xec,0xf0,0x05,0x22,0x0d,0xed,0x70,0x01,0x0e,0x8d,0x64,0x8e,0x63,0x8f,0x62,0x80,
+0xd3,0xe5,0x21,0x54,0x7f,0x90,0xff,0x81,0xf0,0x22,0x8c,0x48,0x7f,0x00,0xef,0x24,
+0xfb,0x40,0x19,0xe4,0xef,0x75,0xf0,0x07,0xa4,0x24,0x3f,0xf5,0x82,0xe4,0x34,0xfc,
+0xf5,0x83,0xe0,0x65,0x48,0x70,0x02,0xd3,0x22,0x0f,0x80,0xe2,0x8f,0x47,0xc3,0x22,
+0x85,0x6c,0x6a,0x85,0x6b,0x69,0x90,0xff,0x82,0xe0,0x54,0xf7,0xf0,0x90,0xff,0x83,
+0xe0,0x54,0x7f,0xf0,0x22,0xc0,0x00,0xc0,0x01,0xc0,0x02,0xc0,0x06,0xc0,0x07,0xe5,
+0x72,0x24,0x08,0xf8,0x86,0x06,0x53,0x06,0x7f,0x7c,0xff,0x12,0x30,0xfa,0x7c,0x00,
+0x7d,0x00,0xe5,0x75,0x60,0x46,0xff,0x90,0xfe,0x9d,0xe0,0x54,0x7f,0x6e,0x70,0x0f,
+0xc0,0x83,0xc0,0x82,0xa3,0xe0,0xfd,0xa3,0xe0,0xfc,0xa3,0x15,0x75,0x80,0x07,0xa3,
+0xa3,0xa3,0xdf,0xe6,0x80,0x26,0xdf,0x06,0xd0,0x82,0xd0,0x83,0x80,0x1e,0xe0,0xf8,
+0xa3,0xe0,0xf9,0xa3,0xe0,0xfa,0xd0,0x82,0xd0,0x83,0xe8,0xf0,0xa3,0xe9,0xf0,0xa3,
+0xea,0xf0,0xa3,0xc0,0x83,0xc0,0x82,0xa3,0xa3,0xa3,0x80,0xda,0x12,0x31,0x93,0xd0,
+0x07,0xd0,0x06,0xd0,0x02,0xd0,0x01,0xd0,0x00,0x22,0x85,0xa8,0x74,0x75,0xa8,0x88,
+0xec,0x70,0x02,0x7c,0x3f,0x8c,0x73,0x22,0xe5,0x72,0x24,0x08,0xf8,0x76,0x00,0x12,
+0x31,0xe7,0x80,0xfb,0xc0,0x00,0xc0,0x01,0xc0,0x02,0xc0,0x06,0xc0,0x07,0xae,0x04,
+0x7c,0xff,0x12,0x30,0xfa,0xe5,0x75,0x60,0x42,0xff,0x90,0xfe,0x9d,0xe0,0x54,0x7f,
+0x6e,0x70,0x0b,0xc0,0x83,0xc0,0x82,0xa3,0xa3,0xa3,0x15,0x75,0x80,0x07,0xa3,0xa3,
+0xa3,0xdf,0xea,0x80,0x26,0xdf,0x06,0xd0,0x82,0xd0,0x83,0x80,0xd8,0xe0,0xf8,0xa3,
+0xe0,0xf9,0xa3,0xe0,0xfa,0xd0,0x82,0xd0,0x83,0xe8,0xf0,0xa3,0xe9,0xf0,0xa3,0xea,
+0xf0,0xa3,0xc0,0x83,0xc0,0x82,0xa3,0xa3,0xa3,0x80,0xda,0x78,0x08,0x08,0x79,0x18,
+0x09,0x7c,0x01,0xe6,0x54,0x7f,0x6e,0x70,0x06,0x76,0x00,0x77,0x00,0x80,0x06,0x08,
+0x09,0x0c,0xbc,0x08,0xee,0x12,0x31,0x93,0xd0,0x07,0xd0,0x06,0xd0,0x02,0xd0,0x01,
+0xd0,0x00,0x22,0x75,0x73,0x00,0x85,0x74,0xa8,0x22,0xc0,0xf0,0xc0,0x82,0xc0,0x83,
+0xc3,0xe5,0x75,0x24,0xe8,0x50,0x05,0x12,0x31,0xe7,0x80,0xf4,0xec,0x60,0x31,0x90,
+0x34,0xb6,0xe4,0x93,0xc3,0x9c,0x40,0x28,0xc0,0x04,0x7c,0xff,0x12,0x30,0xfa,0xd0,
+0x04,0x43,0x04,0x80,0xe5,0x75,0x75,0xf0,0x03,0xa4,0x24,0x9d,0xf5,0x82,0xe4,0x34,
+0xfe,0xf5,0x83,0xec,0xf0,0xef,0xa3,0xf0,0xee,0xa3,0xf0,0x05,0x75,0x12,0x31,0x93,
+0xd0,0x83,0xd0,0x82,0xd0,0xf0,0x22,0xc0,0x04,0x7c,0x20,0xd2,0x8c,0xd2,0x8d,0xd5,
+0x04,0xfd,0xd0,0x04,0x22,0x75,0xa8,0x00,0x75,0x88,0x00,0x75,0xb8,0x00,0x75,0xf0,
+0x00,0x75,0xd0,0x00,0xe4,0xf8,0x90,0x00,0x00,0xf6,0x08,0xb8,0x00,0xfb,0x02,0x00,
+0x00,0xc3,0xed,0x94,0x02,0x50,0x04,0x7d,0x03,0x7c,0xe8,0xec,0xf4,0xfc,0xed,0xf4,
+0xfd,0x0c,0xbc,0x00,0x01,0x0d,0x8c,0x79,0x8d,0x78,0x22,0xc3,0xec,0x94,0xbc,0xed,
+0x94,0x02,0x50,0x04,0x7d,0x07,0x7c,0xd0,0xec,0xf4,0xfc,0xed,0xf4,0xfd,0x0c,0xbc,
+0x00,0x01,0x0d,0x8c,0x77,0x8d,0x76,0x22,0xec,0x70,0x01,0x22,0xc0,0x00,0xe5,0x72,
+0x24,0x18,0xf8,0xa6,0x04,0xe5,0x72,0x24,0x08,0xf8,0xc6,0x54,0x7f,0xf6,0xe6,0x30,
+0xe7,0x03,0xd0,0x00,0x22,0x12,0x31,0xe7,0x80,0xf4,0xc2,0x8c,0x85,0x76,0x8c,0x85,
+0x77,0x8a,0xd2,0x8c,0xc0,0xe0,0xc0,0xd0,0xc0,0xf0,0xc0,0x82,0xc0,0x83,0xc0,0x00,
+0xc0,0x01,0xc0,0x02,0xc0,0x03,0xc0,0x04,0xc0,0x05,0xc0,0x06,0xc0,0x07,0x12,0x1b,
+0x28,0xe5,0x72,0x24,0x08,0xf8,0xe6,0x60,0x24,0xe5,0x72,0x24,0x10,0xf8,0xa6,0x81,
+0xe5,0x72,0x75,0xf0,0x21,0xa4,0x24,0x95,0xf5,0x82,0xe4,0x34,0xfd,0xf5,0x83,0x78,
+0xa8,0xe5,0x81,0x04,0xc3,0x98,0xf9,0xe6,0xf0,0x08,0xa3,0xd9,0xfa,0x74,0x08,0x25,
+0x72,0xf8,0x05,0x72,0x08,0xe6,0x54,0x80,0x70,0x0c,0xe5,0x72,0xb4,0x07,0xf3,0x78,
+0x08,0x75,0x72,0x00,0x80,0xef,0xe5,0x72,0x24,0x10,0xf8,0x86,0x81,0xe5,0x72,0x75,
+0xf0,0x21,0xa4,0x24,0x95,0xf5,0x82,0xe4,0x34,0xfd,0xf5,0x83,0x78,0xa8,0xe5,0x81,
+0x04,0xc3,0x98,0xf9,0xe0,0xf6,0x08,0xa3,0xd9,0xfa,0xd0,0x07,0xd0,0x06,0xd0,0x05,
+0xd0,0x04,0xd0,0x03,0xd0,0x02,0xd0,0x01,0xd0,0x00,0xd0,0x83,0xd0,0x82,0xd0,0xf0,
+0xd0,0xd0,0xd0,0xe0,0x32,0xc0,0xe0,0xc0,0xd0,0xc0,0x00,0xc0,0x01,0xc0,0x02,0xc2,
+0x8e,0x85,0x78,0x8d,0x85,0x79,0x8b,0xd2,0x8e,0x78,0x19,0x79,0x09,0x7a,0x07,0xe7,
+0x70,0x04,0xa6,0x00,0x80,0x0b,0xe6,0x60,0x08,0x16,0xe6,0x70,0x04,0xe7,0x44,0x80,
+0xf7,0x08,0x09,0xda,0xea,0xe5,0x73,0x60,0x13,0x14,0xf5,0x73,0x70,0x0e,0xe5,0x72,
+0x24,0x08,0xf8,0x76,0x00,0x12,0x31,0x93,0xd2,0x8c,0xd2,0x8d,0xd0,0x02,0xd0,0x01,
+0xd0,0x00,0xd0,0xd0,0xd0,0xe0,0x32,0x75,0x81,0xa7,0x75,0x90,0x00,0x75,0x79,0x30,
+0x75,0x78,0xf8,0x75,0x77,0x60,0x75,0x76,0xf0,0x12,0x05,0x3c,0x12,0x34,0x0f,0x12,
+0x17,0x8b,0x12,0x34,0x39,0x12,0x31,0xf5,0x80,0xe3,0x22,0xc0,0x00,0x7c,0x01,0xec,
+0x24,0x08,0xf8,0xe6,0x60,0x09,0x0c,0xbc,0x08,0xf5,0x12,0x31,0xe7,0x80,0xee,0xd0,
+0x00,0x22,0xc0,0xf0,0xc0,0x82,0xc0,0x83,0xc0,0x00,0xc0,0x06,0xc0,0x07,0xed,0x24,
+0x10,0xf8,0x76,0xb6,0xed,0x75,0xf0,0x21,0xa4,0x24,0x95,0xf5,0x82,0xe4,0x34,0xfd,
+0xf5,0x83,0xc0,0x82,0xc0,0x83,0xa3,0xa3,0xe4,0x78,0x0d,0xf0,0xa3,0xd8,0xfc,0xec,
+0x54,0x7f,0x75,0xf0,0x02,0xa4,0x24,0x82,0xf5,0x82,0xe5,0xf0,0x34,0x34,0xf5,0x83,
+0xe4,0x93,0xfe,0x74,0x01,0x93,0xf5,0x82,0x8e,0x83,0xe4,0x93,0xfe,0x74,0x01,0x93,
+0xff,0xd0,0x83,0xd0,0x82,0xef,0xf0,0xa3,0xee,0xf0,0xed,0x24,0x08,0xf8,0xec,0x44,
+0x80,0xf6,0xd0,0x07,0xd0,0x06,0xd0,0x00,0xd0,0x83,0xd0,0x82,0xd0,0xf0,0x22,0x75,
+0x72,0x00,0x75,0x75,0x00,0x7a,0x08,0x79,0x18,0x78,0x08,0x76,0x00,0x77,0x00,0x08,
+0x09,0xda,0xf8,0xe4,0x78,0x08,0x74,0x80,0x44,0x7f,0xf6,0x74,0x01,0x44,0x10,0xf5,
+0x89,0x75,0xb8,0x08,0xd2,0xab,0xd2,0xa9,0x22,0x75,0x81,0xa7,0xd2,0x8e,0xd2,0x8c,
+0xd2,0xaf,0xe5,0x75,0x60,0x32,0xff,0x90,0xfe,0x9d,0xe0,0x54,0x80,0x60,0x24,0x78,
+0x08,0x79,0x08,0xe0,0x54,0x7f,0xfa,0x7b,0x00,0xe6,0x54,0x7f,0xb5,0x02,0x02,0x7b,
+0xff,0x08,0xd9,0xf5,0xeb,0x70,0x0c,0xea,0xf0,0x12,0x33,0x8b,0xad,0x04,0xac,0x02,
+0x12,0x33,0xa2,0xa3,0xa3,0xa3,0xdf,0xd2,0x12,0x31,0xe7,0x80,0xc5,0x7c,0x01,0x7d,
+0x00,0x22,0x04,0xf5,0x04,0xe9,0x04,0xed,0x04,0xe1,0x04,0xdd,0x04,0xd9,0x04,0xe5,
+0x04,0xf1,0x04,0x9d,0x04,0xa1,0x04,0xcd,0x04,0xd1,0x04,0x99,0x04,0x99,0x04,0x99,
+0x04,0xd5,0x04,0xb5,0x04,0xad,0x04,0xb1,0x04,0xa9,0x04,0xc1,0x04,0xbd,0x04,0xb9,
+0x04,0xc5,0x04,0xc9,0x04,0xa5,0x19,0x01,0x03,0x00,0x22,0x00,0x48,0x02,0x00,0x24,
+0x0f,0x18,0x0a,0x10,0x64,0x0d,0x68,0x0c,0x05,0x06,0x02,0x03,0x01,0x01,0x81,0x01,
+0x00,0x00,0xe7,0x00,0xc0,0x00,0x80,0x00,0x60,0x00,0x40,0x00,0x30,0x00,0x18,0x00,
+0x0c,0x00,0x08,0x00,0x04,0x00,0x02,0x00,0x01,0x00,0x08,0x18,0x38,0x28,0x06,0x02,
+0x10,0x0a,0x02,0x00,0x00,0x00,0x00,0x00,0x01,0x81,0x10,0x0a,0x02,0x00,0x00,0x00,
+0x00,0x00,0xfb,0xe8,0xfb,0xfa,0x12,0x01,0x10,0x01,0xff,0x00,0x00,0x08,0x51,0x04,
+0x5f,0x50,0x16,0x01,0x01,0x02,0x00,0x02,0x09,0x02,0x35,0x00,0x01,0x02,0x00,0xe0,
+0x00,0x09,0x04,0x00,0x00,0x05,0xff,0x00,0x00,0x00,0x07,0x05,0x81,0x02,0x40,0x00,
+0x00,0x07,0x05,0x01,0x02,0x40,0x00,0x00,0x07,0x05,0x82,0x02,0x40,0x00,0x00,0x07,
+0x05,0x02,0x02,0x40,0x00,0x00,0x07,0x05,0x85,0x03,0x02,0x00,0x01,0x04,0x03,0x09,
+0x04,0x24,0x03,0x54,0x00,0x65,0x00,0x78,0x00,0x61,0x00,0x73,0x00,0x20,0x00,0x49,
+0x00,0x6e,0x00,0x73,0x00,0x74,0x00,0x72,0x00,0x75,0x00,0x6d,0x00,0x65,0x00,0x6e,
+0x00,0x74,0x00,0x73,0x00,0x2a,0x03,0x54,0x00,0x55,0x00,0x53,0x00,0x42,0x00,0x35,
+0x00,0x30,0x00,0x35,0x00,0x32,0x00,0x20,0x00,0x53,0x00,0x65,0x00,0x72,0x00,0x69,
+0x00,0x61,0x00,0x6c,0x00,0x20,0x00,0x50,0x00,0x6f,0x00,0x72,0x00,0x74,0x00,0x22,
+0x03,0x54,0x00,0x55,0x00,0x53,0x00,0x42,0x00,0x35,0x00,0x30,0x00,0x35,0x00,0x32,
+0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x20,
+0x00,
+};
+
+#endif /* ifndef _TI_FW_5052_H_ */
diff -Nru a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/usb/serial/ti_usb_3410_5052.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,1842 @@
+/* vi: ts=8 sw=8
+ *
+ * TI 3410/5052 USB Serial Driver
+ *
+ * Copyright (C) 2004 Texas Instruments
+ *
+ * This driver is based on the Linux io_ti driver, which is
+ *   Copyright (C) 2000-2002 Inside Out Networks
+ *   Copyright (C) 2001-2002 Greg Kroah-Hartman
+ *
+ * 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.
+ *
+ * For questions or problems with this driver, contact Texas Instruments
+ * technical support, or Al Borchers <alborchers@steinerpoint.com>, or
+ * Peter Berger <pberger@brimson.com>.
+ * 
+ * This driver needs this hotplug script in /etc/hotplug/usb/ti_usb_3410_5052
+ * or in /etc/hotplug.d/usb/ti_usb_3410_5052.hotplug to set the device
+ * configuration.
+ *
+ * #!/bin/bash
+ *
+ * BOOT_CONFIG=1
+ * ACTIVE_CONFIG=2
+ *
+ * if [[ "$ACTION" != "add" ]]
+ * then
+ * 	exit
+ * fi
+ *
+ * CONFIG_PATH=/sys${DEVPATH%/?*}/bConfigurationValue
+ *
+ * if [[ 0`cat $CONFIG_PATH` -ne $BOOT_CONFIG ]]
+ * then
+ * 	exit
+ * fi
+ *
+ * PRODUCT=${PRODUCT%/?*}		# delete version
+ * VENDOR_ID=`printf "%d" 0x${PRODUCT%/?*}`
+ * PRODUCT_ID=`printf "%d" 0x${PRODUCT#*?/}`
+ *
+ * PARAM_PATH=/sys/module/ti_usb_3410_5052/parameters
+ *
+ * function scan() {
+ * 	s=$1
+ * 	shift
+ * 	for i
+ * 	do
+ * 		if [[ $s -eq $i ]]
+ * 		then
+ * 			return 0
+ * 		fi
+ * 	done
+ * 	return 1
+ * }
+ *
+ * IFS=$IFS,
+ *
+ * if (scan $VENDOR_ID 1105 `cat $PARAM_PATH/vendor_3410` &&
+ * scan $PRODUCT_ID 13328 `cat $PARAM_PATH/product_3410`) ||
+ * (scan $VENDOR_ID 1105 `cat $PARAM_PATH/vendor_5052` &&
+ * scan $PRODUCT_ID 20562 20818 20570 20575 `cat $PARAM_PATH/product_5052`)
+ * then
+ * 	echo $ACTIVE_CONFIG > $CONFIG_PATH
+ * fi
+ */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/tty.h>
+#include <linux/tty_driver.h>
+#include <linux/tty_flip.h>
+#include <linux/module.h>
+#include <linux/spinlock.h>
+#include <linux/ioctl.h>
+#include <linux/serial.h>
+#include <linux/circ_buf.h>
+#include <asm/uaccess.h>
+#include <asm/semaphore.h>
+#include <linux/usb.h>
+
+#include "usb-serial.h"
+#include "ti_usb_3410_5052.h"
+#include "ti_fw_3410.h"		/* firmware image for 3410 */
+#include "ti_fw_5052.h"		/* firmware image for 5052 */
+
+
+/* Defines */
+
+#define TI_DRIVER_VERSION	"v0.9"
+#define TI_DRIVER_AUTHOR	"Al Borchers <alborchers@steinerpoint.com>"
+#define TI_DRIVER_DESC		"TI USB 3410/5052 Serial Driver"
+
+#define TI_FIRMWARE_BUF_SIZE	16284
+
+#define TI_WRITE_BUF_SIZE	1024
+
+#define TI_TRANSFER_TIMEOUT	2
+
+#define TI_DEFAULT_LOW_LATENCY	0
+#define TI_DEFAULT_CLOSING_WAIT	4000		/* in .01 secs */
+
+/* supported setserial flags */
+#define TI_SET_SERIAL_FLAGS	(ASYNC_LOW_LATENCY)
+
+/* read urb states */
+#define TI_READ_URB_RUNNING	0
+#define TI_READ_URB_STOPPING	1
+#define TI_READ_URB_STOPPED	2
+
+#define TI_EXTRA_VID_PID_COUNT	5
+
+
+/* Structures */
+
+struct ti_port {
+	int			tp_is_open;
+	__u8			tp_msr;
+	__u8			tp_lsr;
+	__u8			tp_shadow_mcr;
+	__u8			tp_uart_mode;	/* 232 or 485 modes */
+	unsigned int		tp_uart_base_addr;
+	int			tp_flags;
+	int			tp_closing_wait;/* in .01 secs */
+	struct async_icount	tp_icount;
+	wait_queue_head_t	tp_msr_wait;	/* wait for msr change */
+	wait_queue_head_t	tp_write_wait;
+	struct ti_device	*tp_tdev;
+	struct usb_serial_port	*tp_port;
+	spinlock_t		tp_lock;
+	int			tp_read_urb_state;
+	int			tp_write_urb_in_use;
+	struct circ_buf		*tp_write_buf;
+};
+
+struct ti_device {
+	struct semaphore	td_open_close_sem;
+	int			td_open_port_count;
+	struct usb_serial	*td_serial;
+	int			td_is_3410;
+	int			td_urb_error;
+};
+
+
+/* Function Declarations */
+
+static int ti_startup(struct usb_serial *serial);
+static void ti_shutdown(struct usb_serial *serial);
+static int ti_open(struct usb_serial_port *port, struct file *file);
+static void ti_close(struct usb_serial_port *port, struct file *file);
+static int ti_write(struct usb_serial_port *port, const unsigned char *data,
+	int count);
+static int ti_write_room(struct usb_serial_port *port);
+static int ti_chars_in_buffer(struct usb_serial_port *port);
+static void ti_throttle(struct usb_serial_port *port);
+static void ti_unthrottle(struct usb_serial_port *port);
+static int ti_ioctl(struct usb_serial_port *port, struct file *file, unsigned int cmd, unsigned long arg);
+static void ti_set_termios(struct usb_serial_port *port,
+	struct termios *old_termios);
+static int ti_tiocmget(struct usb_serial_port *port, struct file *file);
+static int ti_tiocmset(struct usb_serial_port *port, struct file *file,
+	unsigned int set, unsigned int clear);
+static void ti_break(struct usb_serial_port *port, int break_state);
+static void ti_interrupt_callback(struct urb *urb, struct pt_regs *regs);
+static void ti_bulk_in_callback(struct urb *urb, struct pt_regs *regs);
+static void ti_bulk_out_callback(struct urb *urb, struct pt_regs *regs);
+
+static void ti_recv(struct device *dev, struct tty_struct *tty,
+	unsigned char *data, int length);
+static void ti_send(struct ti_port *tport);
+static int ti_set_mcr(struct ti_port *tport, unsigned int mcr);
+static int ti_get_lsr(struct ti_port *tport);
+static int ti_get_serial_info(struct ti_port *tport,
+	struct serial_struct __user *ret_arg);
+static int ti_set_serial_info(struct ti_port *tport,
+	struct serial_struct __user *new_arg);
+static void ti_handle_new_msr(struct ti_port *tport, __u8 msr);
+
+static void ti_drain(struct ti_port *tport, unsigned long timeout, int flush);
+
+static void ti_stop_read(struct ti_port *tport, struct tty_struct *tty);
+static int ti_restart_read(struct ti_port *tport, struct tty_struct *tty);
+
+static int ti_command_out_sync(struct ti_device *tdev, __u8 command,
+	__u16 moduleid, __u16 value, __u8 *data, int size);
+static int ti_command_in_sync(struct ti_device *tdev, __u8 command,
+	__u16 moduleid, __u16 value, __u8 *data, int size);
+
+static int ti_write_byte(struct ti_device *tdev, unsigned long addr,
+	__u8 mask, __u8 byte);
+
+static int ti_download_firmware(struct ti_device *tdev,
+	unsigned char *firmware, unsigned int firmware_size);
+
+/* circular buffer */
+static struct circ_buf *ti_buf_alloc(void);
+static void ti_buf_free(struct circ_buf *cb);
+static void ti_buf_clear(struct circ_buf *cb);
+static int ti_buf_data_avail(struct circ_buf *cb);
+static int ti_buf_space_avail(struct circ_buf *cb);
+static int ti_buf_put(struct circ_buf *cb, const char *buf, int count);
+static int ti_buf_get(struct circ_buf *cb, char *buf, int count);
+
+
+/* Data */
+
+/* module parameters */
+static int debug;
+static int low_latency = TI_DEFAULT_LOW_LATENCY;
+static int closing_wait = TI_DEFAULT_CLOSING_WAIT;
+static ushort vendor_3410[TI_EXTRA_VID_PID_COUNT];
+static int vendor_3410_count;
+static ushort product_3410[TI_EXTRA_VID_PID_COUNT];
+static int product_3410_count;
+static ushort vendor_5052[TI_EXTRA_VID_PID_COUNT];
+static int vendor_5052_count;
+static ushort product_5052[TI_EXTRA_VID_PID_COUNT];
+static int product_5052_count;
+
+/* supported devices */
+/* the array dimension is the number of default entries plus */
+/* TI_EXTRA_VID_PID_COUNT user defined entries plus 1 terminating */
+/* null entry */
+static struct usb_device_id ti_id_table_3410[1+TI_EXTRA_VID_PID_COUNT+1] = {
+	{ USB_DEVICE(TI_VENDOR_ID, TI_3410_PRODUCT_ID) },
+};
+
+static struct usb_device_id ti_id_table_5052[4+TI_EXTRA_VID_PID_COUNT+1] = {
+	{ USB_DEVICE(TI_VENDOR_ID, TI_5052_BOOT_PRODUCT_ID) },
+	{ USB_DEVICE(TI_VENDOR_ID, TI_5152_BOOT_PRODUCT_ID) },
+	{ USB_DEVICE(TI_VENDOR_ID, TI_5052_EEPROM_PRODUCT_ID) },
+	{ USB_DEVICE(TI_VENDOR_ID, TI_5052_FIRMWARE_PRODUCT_ID) },
+};
+
+static struct usb_device_id ti_id_table_combined[] = {
+	{ USB_DEVICE(TI_VENDOR_ID, TI_3410_PRODUCT_ID) },
+	{ USB_DEVICE(TI_VENDOR_ID, TI_5052_BOOT_PRODUCT_ID) },
+	{ USB_DEVICE(TI_VENDOR_ID, TI_5152_BOOT_PRODUCT_ID) },
+	{ USB_DEVICE(TI_VENDOR_ID, TI_5052_EEPROM_PRODUCT_ID) },
+	{ USB_DEVICE(TI_VENDOR_ID, TI_5052_FIRMWARE_PRODUCT_ID) },
+	{ }
+};
+
+static struct usb_driver ti_usb_driver = {
+	.owner			= THIS_MODULE,
+	.name			= "ti_usb_3410_5052",
+	.probe			= usb_serial_probe,
+	.disconnect		= usb_serial_disconnect,
+	.id_table		= ti_id_table_combined,
+};
+
+static struct usb_serial_device_type ti_1port_device = {
+	.owner			= THIS_MODULE,
+	.name			= "TI USB 3410 1 port adapter",
+	.id_table		= ti_id_table_3410,
+	.num_interrupt_in	= 1,
+	.num_bulk_in		= 1,
+	.num_bulk_out		= 1,
+	.num_ports		= 1,
+	.attach			= ti_startup,
+	.shutdown		= ti_shutdown,
+	.open			= ti_open,
+	.close			= ti_close,
+	.write			= ti_write,
+	.write_room		= ti_write_room,
+	.chars_in_buffer	= ti_chars_in_buffer,
+	.throttle		= ti_throttle,
+	.unthrottle		= ti_unthrottle,
+	.ioctl			= ti_ioctl,
+	.set_termios		= ti_set_termios,
+	.tiocmget		= ti_tiocmget,
+	.tiocmset		= ti_tiocmset,
+	.break_ctl		= ti_break,
+	.read_int_callback	= ti_interrupt_callback,
+	.read_bulk_callback	= ti_bulk_in_callback,
+	.write_bulk_callback	= ti_bulk_out_callback,
+};
+
+static struct usb_serial_device_type ti_2port_device = {
+	.owner			= THIS_MODULE,
+	.name			= "TI USB 5052 2 port adapter",
+	.id_table		= ti_id_table_5052,
+	.num_interrupt_in	= 1,
+	.num_bulk_in		= 2,
+	.num_bulk_out		= 2,
+	.num_ports		= 2,
+	.attach			= ti_startup,
+	.shutdown		= ti_shutdown,
+	.open			= ti_open,
+	.close			= ti_close,
+	.write			= ti_write,
+	.write_room		= ti_write_room,
+	.chars_in_buffer	= ti_chars_in_buffer,
+	.throttle		= ti_throttle,
+	.unthrottle		= ti_unthrottle,
+	.ioctl			= ti_ioctl,
+	.set_termios		= ti_set_termios,
+	.tiocmget		= ti_tiocmget,
+	.tiocmset		= ti_tiocmset,
+	.break_ctl		= ti_break,
+	.read_int_callback	= ti_interrupt_callback,
+	.read_bulk_callback	= ti_bulk_in_callback,
+	.write_bulk_callback	= ti_bulk_out_callback,
+};
+
+
+/* Module */
+
+MODULE_AUTHOR(TI_DRIVER_AUTHOR);
+MODULE_DESCRIPTION(TI_DRIVER_DESC);
+MODULE_VERSION(TI_DRIVER_VERSION);
+MODULE_LICENSE("GPL");
+
+module_param(debug, bool, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(debug, "Enable debugging, 0=no, 1=yes");
+
+module_param(low_latency, bool, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(low_latency, "TTY low_latency flag, 0=off, 1=on, default is off");
+
+module_param(closing_wait, int, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(closing_wait, "Maximum wait for data to drain in close, in .01 secs, default is 4000");
+
+module_param_array(vendor_3410, ushort, &vendor_3410_count, S_IRUGO);
+MODULE_PARM_DESC(vendor_3410, "Vendor ids for 3410 based devices, 1-5 short integers");
+module_param_array(product_3410, ushort, &product_3410_count, S_IRUGO);
+MODULE_PARM_DESC(product_3410, "Product ids for 3410 based devices, 1-5 short integers");
+module_param_array(vendor_5052, ushort, &vendor_5052_count, S_IRUGO);
+MODULE_PARM_DESC(vendor_5052, "Vendor ids for 5052 based devices, 1-5 short integers");
+module_param_array(product_5052, ushort, &product_5052_count, S_IRUGO);
+MODULE_PARM_DESC(product_5052, "Product ids for 5052 based devices, 1-5 short integers");
+
+MODULE_DEVICE_TABLE(usb, ti_id_table_combined);
+
+
+/* Functions */
+
+static int __init ti_init(void)
+{
+	int i,j;
+	int ret;
+
+
+	/* insert extra vendor and product ids */
+	j = sizeof(ti_id_table_3410)/sizeof(struct usb_device_id)
+		- TI_EXTRA_VID_PID_COUNT - 1;
+	for (i=0; i<min(vendor_3410_count,product_3410_count); i++,j++) {
+		ti_id_table_3410[j].idVendor = vendor_3410[i];
+		ti_id_table_3410[j].idProduct = product_3410[i];
+		ti_id_table_3410[j].match_flags = USB_DEVICE_ID_MATCH_DEVICE;
+	}
+	j = sizeof(ti_id_table_5052)/sizeof(struct usb_device_id)
+		- TI_EXTRA_VID_PID_COUNT - 1;
+	for (i=0; i<min(vendor_5052_count,product_5052_count); i++,j++) {
+		ti_id_table_5052[j].idVendor = vendor_5052[i];
+		ti_id_table_5052[j].idProduct = product_5052[i];
+		ti_id_table_5052[j].match_flags = USB_DEVICE_ID_MATCH_DEVICE;
+	}
+
+	ret = usb_serial_register(&ti_1port_device);
+	if (ret)
+		goto failed_1port;
+	ret = usb_serial_register(&ti_2port_device);
+	if (ret)
+		goto failed_2port;
+
+	ret = usb_register(&ti_usb_driver);
+	if (ret)
+		goto failed_usb;
+
+	info(TI_DRIVER_DESC " " TI_DRIVER_VERSION);
+
+	return 0;
+
+failed_usb:
+	usb_serial_deregister(&ti_2port_device);
+failed_2port:
+	usb_serial_deregister(&ti_1port_device);
+failed_1port:
+	return ret;
+}
+
+
+static void __exit ti_exit(void)
+{
+	usb_serial_deregister(&ti_1port_device);
+	usb_serial_deregister(&ti_2port_device);
+	usb_deregister(&ti_usb_driver);
+}
+
+
+module_init(ti_init);
+module_exit(ti_exit);
+
+
+static int ti_startup(struct usb_serial *serial)
+{
+	struct ti_device *tdev;
+	struct ti_port *tport;
+	struct usb_device *dev = serial->dev;
+	int status;
+	int i;
+
+
+	dbg("%s - product 0x%4X, num configurations %d, configuration value %d",
+	    __FUNCTION__, le16_to_cpu(dev->descriptor.idProduct),
+	    dev->descriptor.bNumConfigurations,
+	    dev->actconfig->desc.bConfigurationValue);
+
+	/* create device structure */
+	tdev = kmalloc(sizeof(struct ti_device), GFP_KERNEL);
+	if (tdev == NULL) {
+		dev_err(&dev->dev, "%s - out of memory\n", __FUNCTION__);
+		return -ENOMEM;
+	}
+	memset(tdev, 0, sizeof(struct ti_device));
+	sema_init(&tdev->td_open_close_sem, 1);
+	tdev->td_serial = serial;
+	usb_set_serial_data(serial, tdev);
+
+	/* determine device type */
+	if (usb_match_id(serial->interface, ti_id_table_3410))
+		tdev->td_is_3410 = 1;
+	dbg("%s - device type is %s", __FUNCTION__, tdev->td_is_3410 ? "3410" : "5052");
+
+	/* if we have only 1 configuration, download firmware */
+	if (dev->descriptor.bNumConfigurations == 1) {
+
+		if (tdev->td_is_3410)
+			status = ti_download_firmware(tdev, ti_fw_3410,
+				sizeof(ti_fw_3410));
+		else
+			status = ti_download_firmware(tdev, ti_fw_5052,
+				sizeof(ti_fw_5052));
+		if (status)
+			goto free_tdev;
+
+		/* 3410 must be reset, 5052 resets itself */
+		if (tdev->td_is_3410) {
+			msleep_interruptible(100);
+			usb_reset_device(dev);
+		}
+
+		status = -ENODEV;
+		goto free_tdev;
+	} 
+
+	/* the second configuration must be set (in sysfs by hotplug script) */
+	if (dev->actconfig->desc.bConfigurationValue == TI_BOOT_CONFIG) {
+		status = -ENODEV;
+		goto free_tdev;
+	}
+
+	/* set up port structures */
+	for (i = 0; i < serial->num_ports; ++i) {
+		tport = kmalloc(sizeof(struct ti_port), GFP_KERNEL);
+		if (tport == NULL) {
+			dev_err(&dev->dev, "%s - out of memory\n", __FUNCTION__);
+			status = -ENOMEM;
+			goto free_tports;
+		}
+		memset(tport, 0, sizeof(struct ti_port));
+		spin_lock_init(&tport->tp_lock);
+		tport->tp_uart_base_addr = (i == 0 ? TI_UART1_BASE_ADDR : TI_UART2_BASE_ADDR);
+		tport->tp_flags = low_latency ? ASYNC_LOW_LATENCY : 0;
+		tport->tp_closing_wait = closing_wait;
+		init_waitqueue_head(&tport->tp_msr_wait);
+		init_waitqueue_head(&tport->tp_write_wait);
+		tport->tp_write_buf = ti_buf_alloc();
+		if (tport->tp_write_buf == NULL) {
+			dev_err(&dev->dev, "%s - out of memory\n", __FUNCTION__);
+			kfree(tport);
+			status = -ENOMEM;
+			goto free_tports;
+		}
+		tport->tp_port = serial->port[i];
+		tport->tp_tdev = tdev;
+		usb_set_serial_port_data(serial->port[i], tport);
+		tport->tp_uart_mode = 0;	/* default is RS232 */
+	}
+	
+	return 0;
+
+free_tports:
+	for (--i; i>=0; --i) {
+		tport = usb_get_serial_port_data(serial->port[i]);
+		ti_buf_free(tport->tp_write_buf);
+		kfree(tport);
+		usb_set_serial_port_data(serial->port[i], NULL);
+	}
+free_tdev:
+	kfree(tdev);
+	usb_set_serial_data(serial, NULL);
+	return status;
+}
+
+
+static void ti_shutdown(struct usb_serial *serial)
+{
+	int i;
+	struct ti_device *tdev = usb_get_serial_data(serial);
+	struct ti_port *tport;
+
+	dbg("%s", __FUNCTION__);
+
+	for (i=0; i < serial->num_ports; ++i) {
+		tport = usb_get_serial_port_data(serial->port[i]);
+		if (tport) {
+			ti_buf_free(tport->tp_write_buf);
+			kfree(tport);
+			usb_set_serial_port_data(serial->port[i], NULL);
+		}
+	}
+
+	if (tdev)
+		kfree(tdev);
+	usb_set_serial_data(serial, NULL);
+}
+
+
+static int ti_open(struct usb_serial_port *port, struct file *file)
+{
+	struct ti_port *tport = usb_get_serial_port_data(port);
+	struct ti_device *tdev;
+	struct usb_device *dev;
+	struct urb *urb;
+	int port_number;
+	int status;
+	__u16 open_settings = (__u8)(TI_PIPE_MODE_CONTINOUS | 
+			     TI_PIPE_TIMEOUT_ENABLE | 
+			     (TI_TRANSFER_TIMEOUT << 2));
+
+	dbg("%s - port %d", __FUNCTION__, port->number);
+
+	if (tport == NULL)
+		return -ENODEV;
+
+	dev = port->serial->dev;
+	tdev = tport->tp_tdev;
+
+	/* only one open on any port on a device at a time */
+	if (down_interruptible(&tdev->td_open_close_sem))
+		return -ERESTARTSYS;
+
+	if (port->tty)
+		port->tty->low_latency = 
+			(tport->tp_flags & ASYNC_LOW_LATENCY) ? 1 : 0;
+
+	port_number = port->number - port->serial->minor;
+
+	memset(&(tport->tp_icount), 0x00, sizeof(tport->tp_icount));
+
+	tport->tp_msr = 0;
+	tport->tp_shadow_mcr |= (TI_MCR_RTS | TI_MCR_DTR);
+
+	/* start interrupt urb the first time a port is opened on this device */
+	if (tdev->td_open_port_count == 0) {
+		dbg("%s - start interrupt in urb", __FUNCTION__);
+		urb = tdev->td_serial->port[0]->interrupt_in_urb;
+		if (!urb) {
+			dev_err(&port->dev, "%s - no interrupt urb\n", __FUNCTION__);
+			status = -EINVAL;
+			goto up_sem;
+		}
+		urb->complete = ti_interrupt_callback;
+		urb->context = tdev;
+		urb->dev = dev;
+		status = usb_submit_urb(urb, GFP_KERNEL);
+		if (status) {
+			dev_err(&port->dev, "%s - submit interrupt urb failed, %d\n", __FUNCTION__, status);
+			goto up_sem;
+		}
+	}
+
+	ti_set_termios(port, NULL);
+
+	dbg("%s - sending TI_OPEN_PORT", __FUNCTION__);
+	status = ti_command_out_sync(tdev, TI_OPEN_PORT,
+		(__u8)(TI_UART1_PORT + port_number), open_settings, NULL, 0);
+	if (status) {
+		dev_err(&port->dev, "%s - cannot send open command, %d\n", __FUNCTION__, status);
+		goto unlink_int_urb;
+	}
+
+	dbg("%s - sending TI_START_PORT", __FUNCTION__);
+	status = ti_command_out_sync(tdev, TI_START_PORT,
+		(__u8)(TI_UART1_PORT + port_number), 0, NULL, 0);
+	if (status) {
+		dev_err(&port->dev, "%s - cannot send start command, %d\n", __FUNCTION__, status);
+		goto unlink_int_urb;
+	}
+
+	dbg("%s - sending TI_PURGE_PORT", __FUNCTION__);
+	status = ti_command_out_sync(tdev, TI_PURGE_PORT,
+		(__u8)(TI_UART1_PORT + port_number), TI_PURGE_INPUT, NULL, 0);
+	if (status) {
+		dev_err(&port->dev, "%s - cannot clear input buffers, %d\n", __FUNCTION__, status);
+		goto unlink_int_urb;
+	}
+	status = ti_command_out_sync(tdev, TI_PURGE_PORT,
+		(__u8)(TI_UART1_PORT + port_number), TI_PURGE_OUTPUT, NULL, 0);
+	if (status) {
+		dev_err(&port->dev, "%s - cannot clear output buffers, %d\n", __FUNCTION__, status);
+		goto unlink_int_urb;
+	}
+
+	/* reset the data toggle on the bulk endpoints to work around bug in
+	 * host controllers where things get out of sync some times */
+	usb_clear_halt(dev, port->write_urb->pipe);
+	usb_clear_halt(dev, port->read_urb->pipe);
+
+	ti_set_termios(port, NULL);
+
+	dbg("%s - sending TI_OPEN_PORT (2)", __FUNCTION__);
+	status = ti_command_out_sync(tdev, TI_OPEN_PORT,
+		(__u8)(TI_UART1_PORT + port_number), open_settings, NULL, 0);
+	if (status) {
+		dev_err(&port->dev, "%s - cannot send open command (2), %d\n", __FUNCTION__, status);
+		goto unlink_int_urb;
+	}
+
+	dbg("%s - sending TI_START_PORT (2)", __FUNCTION__);
+	status = ti_command_out_sync(tdev, TI_START_PORT,
+		(__u8)(TI_UART1_PORT + port_number), 0, NULL, 0);
+	if (status) {
+		dev_err(&port->dev, "%s - cannot send start command (2), %d\n", __FUNCTION__, status);
+		goto unlink_int_urb;
+	}
+
+	/* start read urb */
+	dbg("%s - start read urb", __FUNCTION__);
+	urb = port->read_urb;
+	if (!urb) {
+		dev_err(&port->dev, "%s - no read urb\n", __FUNCTION__);
+		status = -EINVAL;
+		goto unlink_int_urb;
+	}
+	tport->tp_read_urb_state = TI_READ_URB_RUNNING;
+	urb->complete = ti_bulk_in_callback;
+	urb->context = tport;
+	urb->dev = dev;
+	status = usb_submit_urb(urb, GFP_KERNEL);
+	if (status) {
+		dev_err(&port->dev, "%s - submit read urb failed, %d\n", __FUNCTION__, status);
+		goto unlink_int_urb;
+	}
+
+	tport->tp_is_open = 1;
+	++tdev->td_open_port_count;
+
+	goto up_sem;
+
+unlink_int_urb:
+	if (tdev->td_open_port_count == 0)
+		usb_kill_urb(port->serial->port[0]->interrupt_in_urb);
+up_sem:
+	up(&tdev->td_open_close_sem);
+	dbg("%s - exit %d", __FUNCTION__, status);
+	return status;
+}
+
+
+static void ti_close(struct usb_serial_port *port, struct file *file)
+{
+	struct ti_device *tdev;
+	struct ti_port *tport;
+	int port_number;
+	int status;
+	int do_up;
+
+	dbg("%s - port %d", __FUNCTION__, port->number);
+			 
+	tdev = usb_get_serial_data(port->serial);
+	tport = usb_get_serial_port_data(port);
+	if (tdev == NULL || tport == NULL)
+		return;
+
+	tport->tp_is_open = 0;
+
+	ti_drain(tport, (tport->tp_closing_wait*HZ)/100, 1);
+
+	usb_kill_urb(port->read_urb);
+	usb_kill_urb(port->write_urb);
+	tport->tp_write_urb_in_use = 0;
+
+	port_number = port->number - port->serial->minor;
+
+	dbg("%s - sending TI_CLOSE_PORT", __FUNCTION__);
+	status = ti_command_out_sync(tdev, TI_CLOSE_PORT,
+		     (__u8)(TI_UART1_PORT + port_number), 0, NULL, 0);
+	if (status)
+		dev_err(&port->dev, "%s - cannot send close port command, %d\n" , __FUNCTION__, status);
+
+	/* if down is interrupted, continue anyway */
+	do_up = !down_interruptible(&tdev->td_open_close_sem);
+	--tport->tp_tdev->td_open_port_count;
+	if (tport->tp_tdev->td_open_port_count <= 0) {
+		/* last port is closed, shut down interrupt urb */
+		usb_kill_urb(port->serial->port[0]->interrupt_in_urb);
+		tport->tp_tdev->td_open_port_count = 0;
+	}
+	if (do_up)
+		up(&tdev->td_open_close_sem);
+
+	dbg("%s - exit", __FUNCTION__);
+}
+
+
+static int ti_write(struct usb_serial_port *port, const unsigned char *data,
+	int count)
+{
+	struct ti_port *tport = usb_get_serial_port_data(port);
+	unsigned long flags;
+
+	dbg("%s - port %d", __FUNCTION__, port->number);
+
+	if (count == 0) {
+		dbg("%s - write request of 0 bytes", __FUNCTION__);
+		return 0;
+	}
+
+	if (tport == NULL || !tport->tp_is_open)
+		return -ENODEV;
+
+	spin_lock_irqsave(&tport->tp_lock, flags);
+	count = ti_buf_put(tport->tp_write_buf, data, count);
+	spin_unlock_irqrestore(&tport->tp_lock, flags);
+
+	ti_send(tport);
+
+	return count;
+}
+
+
+static int ti_write_room(struct usb_serial_port *port)
+{
+	struct ti_port *tport = usb_get_serial_port_data(port);
+	int room = 0;
+	unsigned long flags;
+
+	dbg("%s - port %d", __FUNCTION__, port->number);
+
+	if (tport == NULL)
+		return -ENODEV;
+	
+	spin_lock_irqsave(&tport->tp_lock, flags);
+	room = ti_buf_space_avail(tport->tp_write_buf);
+	spin_unlock_irqrestore(&tport->tp_lock, flags);
+
+	dbg("%s - returns %d", __FUNCTION__, room);
+	return room;
+}
+
+
+static int ti_chars_in_buffer(struct usb_serial_port *port)
+{
+	struct ti_port *tport = usb_get_serial_port_data(port);
+	int chars = 0;
+	unsigned long flags;
+
+	dbg("%s - port %d", __FUNCTION__, port->number);
+
+	if (tport == NULL)
+		return -ENODEV;
+
+	spin_lock_irqsave(&tport->tp_lock, flags);
+	chars = ti_buf_data_avail(tport->tp_write_buf);
+	spin_unlock_irqrestore(&tport->tp_lock, flags);
+
+	dbg("%s - returns %d", __FUNCTION__, chars);
+	return chars;
+}
+
+
+static void ti_throttle(struct usb_serial_port *port)
+{
+	struct ti_port *tport = usb_get_serial_port_data(port);
+	struct tty_struct *tty;
+
+	dbg("%s - port %d", __FUNCTION__, port->number);
+
+	if (tport == NULL)
+		return;
+
+	tty = port->tty;
+	if (!tty) {
+		dbg("%s - no tty", __FUNCTION__);
+		return;
+	}
+
+	if (I_IXOFF(tty) || C_CRTSCTS(tty))
+		ti_stop_read(tport, tty);
+
+}
+
+
+static void ti_unthrottle(struct usb_serial_port *port)
+{
+	struct ti_port *tport = usb_get_serial_port_data(port);
+	struct tty_struct *tty;
+	int status;
+
+	dbg("%s - port %d", __FUNCTION__, port->number);
+
+	if (tport == NULL)
+		return;
+
+	tty = port->tty;
+	if (!tty) {
+		dbg("%s - no tty", __FUNCTION__);
+		return;
+	}
+
+	if (I_IXOFF(tty) || C_CRTSCTS(tty)) {
+		status = ti_restart_read(tport, tty);
+		if (status)
+			dev_err(&port->dev, "%s - cannot restart read, %d\n", __FUNCTION__, status);
+	}
+}
+
+
+static int ti_ioctl(struct usb_serial_port *port, struct file *file,
+	unsigned int cmd, unsigned long arg)
+{
+	struct ti_port *tport = usb_get_serial_port_data(port);
+	struct async_icount cnow;
+	struct async_icount cprev;
+
+	dbg("%s - port %d, cmd = 0x%04X", __FUNCTION__, port->number, cmd);
+
+	if (tport == NULL)
+		return -ENODEV;
+
+	switch (cmd) {
+		case TIOCGSERIAL:
+			dbg("%s - (%d) TIOCGSERIAL", __FUNCTION__, port->number);
+			return ti_get_serial_info(tport, (struct serial_struct __user *)arg);
+			break;
+
+		case TIOCSSERIAL:
+			dbg("%s - (%d) TIOCSSERIAL", __FUNCTION__, port->number);
+			return ti_set_serial_info(tport, (struct serial_struct __user *)arg);
+			break;
+
+		case TIOCMIWAIT:
+			dbg("%s - (%d) TIOCMIWAIT", __FUNCTION__, port->number);
+			cprev = tport->tp_icount;
+			while (1) {
+				interruptible_sleep_on(&tport->tp_msr_wait);
+				if (signal_pending(current))
+					return -ERESTARTSYS;
+				cnow = tport->tp_icount;
+				if (cnow.rng == cprev.rng && cnow.dsr == cprev.dsr &&
+				    cnow.dcd == cprev.dcd && cnow.cts == cprev.cts)
+					return -EIO; /* no change => error */
+				if (((arg & TIOCM_RNG) && (cnow.rng != cprev.rng)) ||
+				    ((arg & TIOCM_DSR) && (cnow.dsr != cprev.dsr)) ||
+				    ((arg & TIOCM_CD)  && (cnow.dcd != cprev.dcd)) ||
+				    ((arg & TIOCM_CTS) && (cnow.cts != cprev.cts)) ) {
+					return 0;
+				}
+				cprev = cnow;
+			}
+			break;
+
+		case TIOCGICOUNT:
+			dbg("%s - (%d) TIOCGICOUNT RX=%d, TX=%d", __FUNCTION__, port->number, tport->tp_icount.rx, tport->tp_icount.tx);
+			if (copy_to_user((void __user *)arg, &tport->tp_icount, sizeof(tport->tp_icount)))
+				return -EFAULT;
+			return 0;
+	}
+
+	return -ENOIOCTLCMD;
+}
+
+
+static void ti_set_termios(struct usb_serial_port *port,
+	struct termios *old_termios)
+{
+	struct ti_port *tport = usb_get_serial_port_data(port);
+	struct tty_struct *tty = port->tty;
+	struct ti_uart_config *config;
+	tcflag_t cflag,iflag;
+	int baud;
+	int status;
+	int port_number = port->number - port->serial->minor;
+	unsigned int mcr;
+
+	dbg("%s - port %d", __FUNCTION__, port->number);
+
+	if (!tty || !tty->termios) {
+		dbg("%s - no tty or termios", __FUNCTION__);
+		return;
+	}
+
+	cflag = tty->termios->c_cflag;
+	iflag = tty->termios->c_iflag;
+
+	if (old_termios && cflag == old_termios->c_cflag
+	&& iflag == old_termios->c_iflag) {
+		dbg("%s - nothing to change", __FUNCTION__);
+		return;
+	}
+
+	dbg("%s - clfag %08x, iflag %08x", __FUNCTION__, cflag, iflag);
+
+	if (old_termios)
+		dbg("%s - old clfag %08x, old iflag %08x", __FUNCTION__, old_termios->c_cflag, old_termios->c_iflag);
+
+	if (tport == NULL)
+		return;
+
+	config = kmalloc(sizeof(*config), GFP_KERNEL);
+	if (!config) {
+		dev_err(&port->dev, "%s - out of memory\n", __FUNCTION__);
+		return;
+	}
+
+	config->wFlags = 0;
+
+	/* these flags must be set */
+	config->wFlags |= TI_UART_ENABLE_MS_INTS;
+	config->wFlags |= TI_UART_ENABLE_AUTO_START_DMA;
+	config->bUartMode = (__u8)(tport->tp_uart_mode);
+
+	switch (cflag & CSIZE) {
+		case CS5:
+			    config->bDataBits = TI_UART_5_DATA_BITS;
+			    break;
+		case CS6:
+			    config->bDataBits = TI_UART_6_DATA_BITS;
+			    break;
+		case CS7:
+			    config->bDataBits = TI_UART_7_DATA_BITS;
+			    break;
+		default:
+		case CS8:
+			    config->bDataBits = TI_UART_8_DATA_BITS;
+			    break;
+	}
+
+	if (cflag & PARENB) {
+		if (cflag & PARODD) {
+			config->wFlags |= TI_UART_ENABLE_PARITY_CHECKING;
+			config->bParity = TI_UART_ODD_PARITY;
+		} else {
+			config->wFlags |= TI_UART_ENABLE_PARITY_CHECKING;
+			config->bParity = TI_UART_EVEN_PARITY;
+		}
+	} else {
+		config->wFlags &= ~TI_UART_ENABLE_PARITY_CHECKING;
+		config->bParity = TI_UART_NO_PARITY; 	
+	}
+
+	if (cflag & CSTOPB)
+		config->bStopBits = TI_UART_2_STOP_BITS;
+	else
+		config->bStopBits = TI_UART_1_STOP_BITS;
+
+	if (cflag & CRTSCTS) {
+		/* RTS flow control must be off to drop RTS for baud rate B0 */
+		if ((cflag & CBAUD) != B0)
+			config->wFlags |= TI_UART_ENABLE_RTS_IN;
+		config->wFlags |= TI_UART_ENABLE_CTS_OUT;
+	} else {
+		tty->hw_stopped = 0;
+		ti_restart_read(tport, tty);
+	}
+
+	if (I_IXOFF(tty) || I_IXON(tty)) {
+		config->cXon  = START_CHAR(tty);
+		config->cXoff = STOP_CHAR(tty);
+
+		if (I_IXOFF(tty))
+			config->wFlags |= TI_UART_ENABLE_X_IN;
+		else
+			ti_restart_read(tport, tty);
+
+		if (I_IXON(tty))
+			config->wFlags |= TI_UART_ENABLE_X_OUT;
+	}
+
+	baud = tty_get_baud_rate(tty);
+	if (!baud) baud = 9600;
+	if (tport->tp_tdev->td_is_3410)
+		config->wBaudRate = (__u16)((923077 + baud/2) / baud);
+	else
+		config->wBaudRate = (__u16)((461538 + baud/2) / baud);
+
+	dbg("%s - BaudRate=%d, wBaudRate=%d, wFlags=0x%04X, bDataBits=%d, bParity=%d, bStopBits=%d, cXon=%d, cXoff=%d, bUartMode=%d",
+	__FUNCTION__, baud, config->wBaudRate, config->wFlags, config->bDataBits, config->bParity, config->bStopBits, config->cXon, config->cXoff, config->bUartMode);
+
+	cpu_to_be16s(&config->wBaudRate);
+	cpu_to_be16s(&config->wFlags);
+
+	status = ti_command_out_sync(tport->tp_tdev, TI_SET_CONFIG,
+		(__u8)(TI_UART1_PORT + port_number), 0, (__u8 *)config,
+		sizeof(*config));
+	if (status)
+		dev_err(&port->dev, "%s - cannot set config on port %d, %d\n", __FUNCTION__, port_number, status);
+
+	/* SET_CONFIG asserts RTS and DTR, reset them correctly */
+	mcr = tport->tp_shadow_mcr;
+	/* if baud rate is B0, clear RTS and DTR */
+	if ((cflag & CBAUD) == B0)
+		mcr &= ~(TI_MCR_DTR | TI_MCR_RTS);
+	status = ti_set_mcr(tport, mcr);
+	if (status)
+		dev_err(&port->dev, "%s - cannot set modem control on port %d, %d\n", __FUNCTION__, port_number, status);
+
+	kfree(config);
+}
+
+
+static int ti_tiocmget(struct usb_serial_port *port, struct file *file)
+{
+	struct ti_port *tport = usb_get_serial_port_data(port);
+	unsigned int result;
+	unsigned int msr;
+	unsigned int mcr;
+
+	dbg("%s - port %d", __FUNCTION__, port->number);
+
+	if (tport == NULL)
+		return -ENODEV;
+
+	msr = tport->tp_msr;
+	mcr = tport->tp_shadow_mcr;
+
+	result = ((mcr & TI_MCR_DTR) ? TIOCM_DTR : 0)
+		| ((mcr & TI_MCR_RTS) ? TIOCM_RTS : 0)
+		| ((mcr & TI_MCR_LOOP) ? TIOCM_LOOP : 0)
+		| ((msr & TI_MSR_CTS) ? TIOCM_CTS : 0)
+		| ((msr & TI_MSR_CD) ? TIOCM_CAR : 0)
+		| ((msr & TI_MSR_RI) ? TIOCM_RI : 0)
+		| ((msr & TI_MSR_DSR) ? TIOCM_DSR : 0);
+
+	dbg("%s - 0x%04X", __FUNCTION__, result);
+
+	return result;
+}
+
+
+static int ti_tiocmset(struct usb_serial_port *port, struct file *file,
+	unsigned int set, unsigned int clear)
+{
+	struct ti_port *tport = usb_get_serial_port_data(port);
+	unsigned int mcr;
+
+	dbg("%s - port %d", __FUNCTION__, port->number);
+
+	if (tport == NULL)
+		return -ENODEV;
+
+	mcr = tport->tp_shadow_mcr;
+
+	if (set & TIOCM_RTS)
+		mcr |= TI_MCR_RTS;
+	if (set & TIOCM_DTR)
+		mcr |= TI_MCR_DTR;
+	if (set & TIOCM_LOOP)
+		mcr |= TI_MCR_LOOP;
+
+	if (clear & TIOCM_RTS)
+		mcr &= ~TI_MCR_RTS;
+	if (clear & TIOCM_DTR)
+		mcr &= ~TI_MCR_DTR;
+	if (clear & TIOCM_LOOP)
+		mcr &= ~TI_MCR_LOOP;
+
+	return ti_set_mcr(tport, mcr);
+}
+
+
+static void ti_break(struct usb_serial_port *port, int break_state)
+{
+	struct ti_port *tport = usb_get_serial_port_data(port);
+	int status;
+
+	dbg("%s - state = %d", __FUNCTION__, break_state);
+
+	if (tport == NULL)
+		return;
+
+	ti_drain(tport, (tport->tp_closing_wait*HZ)/100, 0);
+
+	status = ti_write_byte(tport->tp_tdev,
+		tport->tp_uart_base_addr + TI_UART_OFFSET_LCR,
+		TI_LCR_BREAK, break_state == -1 ? TI_LCR_BREAK : 0);
+
+	if (status)
+		dbg("%s - error setting break, %d", __FUNCTION__, status);
+}
+
+
+static void ti_interrupt_callback(struct urb *urb, struct pt_regs *regs)
+{
+	struct ti_device *tdev = (struct ti_device *)urb->context;
+	struct usb_serial_port *port;
+	struct usb_serial *serial = tdev->td_serial;
+	struct ti_port *tport;
+	struct device *dev = &urb->dev->dev;
+	unsigned char *data = urb->transfer_buffer;
+	int length = urb->actual_length;
+	int port_number;
+	int function;
+	int status;
+	__u8 msr;
+
+	dbg("%s", __FUNCTION__);
+
+	switch (urb->status) {
+	case 0:
+		break;
+	case -ECONNRESET:
+	case -ENOENT:
+	case -ESHUTDOWN:
+		dbg("%s - urb shutting down, %d", __FUNCTION__, urb->status);
+		tdev->td_urb_error = 1;
+		return;
+	default:
+		dev_err(dev, "%s - nonzero urb status, %d\n", __FUNCTION__, urb->status);
+		tdev->td_urb_error = 1;
+		goto exit;
+	}
+
+	if (length != 2) {
+		dbg("%s - bad packet size, %d", __FUNCTION__, length);
+		goto exit;
+	}
+
+	if (data[0] == TI_CODE_HARDWARE_ERROR) {
+		dev_err(dev, "%s - hardware error, %d\n", __FUNCTION__, data[1]);
+		goto exit;
+	}
+
+	port_number = TI_GET_PORT_FROM_CODE(data[0]);
+	function = TI_GET_FUNC_FROM_CODE(data[0]);
+
+	dbg("%s - port_number %d, function %d, data 0x%02X", __FUNCTION__, port_number, function, data[1]);
+
+	if (port_number >= serial->num_ports) {
+		dev_err(dev, "%s - bad port number, %d\n", __FUNCTION__, port_number);
+		goto exit;
+	}
+
+	port = serial->port[port_number];
+
+	tport = usb_get_serial_port_data(port);
+	if (!tport)
+		goto exit;
+
+	switch (function) {
+	case TI_CODE_DATA_ERROR:
+		dev_err(dev, "%s - DATA ERROR, port %d, data 0x%02X\n", __FUNCTION__, port_number, data[1]);
+		break;
+
+	case TI_CODE_MODEM_STATUS:
+		msr = data[1];
+		dbg("%s - port %d, msr 0x%02X", __FUNCTION__, port_number, msr);
+		ti_handle_new_msr(tport, msr);
+		break;
+
+	default:
+		dev_err(dev, "%s - unknown interrupt code, 0x%02X\n", __FUNCTION__, data[1]);
+		break;
+	}
+
+exit:
+	status = usb_submit_urb(urb, GFP_ATOMIC);
+	if (status)
+		dev_err(dev, "%s - resubmit interrupt urb failed, %d\n", __FUNCTION__, status);
+}
+
+
+static void ti_bulk_in_callback(struct urb *urb, struct pt_regs *regs)
+{
+	struct ti_port *tport = (struct ti_port *)urb->context;
+	struct usb_serial_port *port = tport->tp_port;
+	struct device *dev = &urb->dev->dev;
+	int status = 0;
+
+	dbg("%s", __FUNCTION__);
+
+	switch (urb->status) {
+	case 0:
+		break;
+	case -ECONNRESET:
+	case -ENOENT:
+	case -ESHUTDOWN:
+		dbg("%s - urb shutting down, %d", __FUNCTION__, urb->status);
+		tport->tp_tdev->td_urb_error = 1;
+		wake_up_interruptible(&tport->tp_write_wait);
+		return;
+	default:
+		dev_err(dev, "%s - nonzero urb status, %d\n", __FUNCTION__, urb->status );
+		tport->tp_tdev->td_urb_error = 1;
+		wake_up_interruptible(&tport->tp_write_wait);
+	}
+
+	if (urb->status == -EPIPE)
+		goto exit;
+
+	if (urb->status) {
+		dev_err(dev, "%s - stopping read!\n", __FUNCTION__);
+		return;
+	}
+
+	if (port->tty && urb->actual_length) {
+		usb_serial_debug_data(debug, dev, __FUNCTION__,
+			urb->actual_length, urb->transfer_buffer);
+
+		if (!tport->tp_is_open)
+			dbg("%s - port closed, dropping data", __FUNCTION__);
+		else
+			ti_recv(&urb->dev->dev, port->tty, urb->transfer_buffer,
+				urb->actual_length);
+
+		spin_lock(&tport->tp_lock);
+		tport->tp_icount.rx += urb->actual_length;
+		spin_unlock(&tport->tp_lock);
+	}
+
+exit:
+	/* continue to read unless stopping */
+	spin_lock(&tport->tp_lock);
+	if (tport->tp_read_urb_state == TI_READ_URB_RUNNING) {
+		urb->dev = port->serial->dev;
+		status = usb_submit_urb(urb, GFP_ATOMIC);
+	} else if (tport->tp_read_urb_state == TI_READ_URB_STOPPING) {
+		tport->tp_read_urb_state = TI_READ_URB_STOPPED;
+	}
+	spin_unlock(&tport->tp_lock);
+	if (status)
+		dev_err(dev, "%s - resubmit read urb failed, %d\n", __FUNCTION__, status);
+}
+
+
+static void ti_bulk_out_callback(struct urb *urb, struct pt_regs *regs)
+{
+	struct ti_port *tport = (struct ti_port *)urb->context;
+	struct usb_serial_port *port = tport->tp_port;
+	struct device *dev = &urb->dev->dev;
+
+	dbg("%s - port %d", __FUNCTION__, port->number);
+
+	tport->tp_write_urb_in_use = 0;
+
+	switch (urb->status) {
+	case 0:
+		break;
+	case -ECONNRESET:
+	case -ENOENT:
+	case -ESHUTDOWN:
+		dbg("%s - urb shutting down, %d", __FUNCTION__, urb->status);
+		tport->tp_tdev->td_urb_error = 1;
+		wake_up_interruptible(&tport->tp_write_wait);
+		return;
+	default:
+		dev_err(dev, "%s - nonzero urb status, %d\n", __FUNCTION__, urb->status);
+		tport->tp_tdev->td_urb_error = 1;
+		wake_up_interruptible(&tport->tp_write_wait);
+	}
+
+	/* send any buffered data */
+	ti_send(tport);
+}
+
+
+static void ti_recv(struct device *dev, struct tty_struct *tty,
+	unsigned char *data, int length)
+{
+	int cnt;
+
+	do {
+		if (tty->flip.count >= TTY_FLIPBUF_SIZE) {
+			tty_flip_buffer_push(tty);
+			if (tty->flip.count >= TTY_FLIPBUF_SIZE) {
+				dev_err(dev, "%s - dropping data, %d bytes lost\n", __FUNCTION__, length);
+				return;
+			}
+		}
+		cnt = min(length, TTY_FLIPBUF_SIZE - tty->flip.count);
+		memcpy(tty->flip.char_buf_ptr, data, cnt);
+		memset(tty->flip.flag_buf_ptr, 0, cnt);
+		tty->flip.char_buf_ptr += cnt;
+		tty->flip.flag_buf_ptr += cnt;
+		tty->flip.count += cnt;
+		data += cnt;
+		length -= cnt;
+	} while (length > 0);
+
+	tty_flip_buffer_push(tty);
+}
+
+
+static void ti_send(struct ti_port *tport)
+{
+	int count, result;
+	struct usb_serial_port *port = tport->tp_port;
+	struct tty_struct *tty = port->tty;
+	unsigned long flags;
+
+
+	dbg("%s - port %d", __FUNCTION__, port->number);
+
+	spin_lock_irqsave(&tport->tp_lock, flags);
+
+	if (tport->tp_write_urb_in_use) {
+		spin_unlock_irqrestore(&tport->tp_lock, flags);
+		return;
+	}
+
+	count = ti_buf_get(tport->tp_write_buf,
+				port->write_urb->transfer_buffer,
+				port->bulk_out_size);
+
+	if (count == 0) {
+		spin_unlock_irqrestore(&tport->tp_lock, flags);
+		return;
+	}
+
+	tport->tp_write_urb_in_use = 1;
+
+	spin_unlock_irqrestore(&tport->tp_lock, flags);
+
+	usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, port->write_urb->transfer_buffer);
+
+	usb_fill_bulk_urb(port->write_urb, port->serial->dev,
+			   usb_sndbulkpipe(port->serial->dev,
+					    port->bulk_out_endpointAddress),
+			   port->write_urb->transfer_buffer, count,
+			   ti_bulk_out_callback, tport);
+
+	result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
+	if (result) {
+		dev_err(&port->dev, "%s - submit write urb failed, %d\n", __FUNCTION__, result);
+		tport->tp_write_urb_in_use = 0; 
+		/* TODO: reschedule ti_send */
+	} else {
+		spin_lock_irqsave(&tport->tp_lock, flags);
+		tport->tp_icount.tx += count;
+		spin_unlock_irqrestore(&tport->tp_lock, flags);
+	}
+
+	/* more room in the buffer for new writes, wakeup */
+	if (tty)
+		tty_wakeup(tty);
+	wake_up_interruptible(&tport->tp_write_wait);
+}
+
+
+static int ti_set_mcr(struct ti_port *tport, unsigned int mcr)
+{
+	int status;
+
+	status = ti_write_byte(tport->tp_tdev,
+		tport->tp_uart_base_addr + TI_UART_OFFSET_MCR,
+		TI_MCR_RTS | TI_MCR_DTR | TI_MCR_LOOP, mcr);
+
+	if (!status)
+		tport->tp_shadow_mcr = mcr;
+
+	return status;
+}
+
+
+static int ti_get_lsr(struct ti_port *tport)
+{
+	int size,status;
+	struct ti_device *tdev = tport->tp_tdev;
+	struct usb_serial_port *port = tport->tp_port;
+	int port_number = port->number - port->serial->minor;
+	struct ti_port_status *data;
+
+	dbg("%s - port %d", __FUNCTION__, port->number);
+
+	size = sizeof(struct ti_port_status);
+	data = kmalloc(size, GFP_KERNEL);
+	if (!data) {
+		dev_err(&port->dev, "%s - out of memory\n", __FUNCTION__);
+		return -ENOMEM;
+	}
+
+	status = ti_command_in_sync(tdev, TI_GET_PORT_STATUS,
+		(__u8)(TI_UART1_PORT+port_number), 0, (__u8 *)data, size);
+	if (status) {
+		dev_err(&port->dev, "%s - get port status command failed, %d\n", __FUNCTION__, status);
+		goto free_data;
+	}
+
+	dbg("%s - lsr 0x%02X", __FUNCTION__, data->bLSR);
+
+	tport->tp_lsr = data->bLSR;
+
+free_data:
+	kfree(data);
+	return status;
+}
+
+
+static int ti_get_serial_info(struct ti_port *tport,
+	struct serial_struct __user *ret_arg)
+{
+	struct usb_serial_port *port = tport->tp_port;
+	struct serial_struct ret_serial;
+
+	if (!ret_arg)
+		return -EFAULT;
+
+	memset(&ret_serial, 0, sizeof(ret_serial));
+
+	ret_serial.type = PORT_16550A;
+	ret_serial.line = port->serial->minor;
+	ret_serial.port = port->number - port->serial->minor;
+	ret_serial.flags = tport->tp_flags;
+	ret_serial.xmit_fifo_size = TI_WRITE_BUF_SIZE;
+	ret_serial.baud_base = tport->tp_tdev->td_is_3410 ? 921600 : 460800;
+	ret_serial.closing_wait = tport->tp_closing_wait;
+
+	if (copy_to_user(ret_arg, &ret_serial, sizeof(*ret_arg)))
+		return -EFAULT;
+
+	return 0;
+}
+
+
+static int ti_set_serial_info(struct ti_port *tport,
+	struct serial_struct __user *new_arg)
+{
+	struct usb_serial_port *port = tport->tp_port;
+	struct serial_struct new_serial;
+
+	if (copy_from_user(&new_serial, new_arg, sizeof(new_serial)))
+		return -EFAULT;
+
+	tport->tp_flags = new_serial.flags & TI_SET_SERIAL_FLAGS;
+	if (port->tty)
+		port->tty->low_latency =
+			(tport->tp_flags & ASYNC_LOW_LATENCY) ? 1 : 0;
+	tport->tp_closing_wait = new_serial.closing_wait;
+
+	return 0;
+}
+
+
+static void ti_handle_new_msr(struct ti_port *tport, __u8 msr)
+{
+	struct async_icount *icount;
+	struct tty_struct *tty;
+	unsigned long flags;
+
+	dbg("%s - msr 0x%02X", __FUNCTION__, msr);
+
+	if (msr & TI_MSR_DELTA_MASK) {
+		spin_lock_irqsave(&tport->tp_lock, flags);
+		icount = &tport->tp_icount;
+		if (msr & TI_MSR_DELTA_CTS)
+			icount->cts++;
+		if (msr & TI_MSR_DELTA_DSR)
+			icount->dsr++;
+		if (msr & TI_MSR_DELTA_CD)
+			icount->dcd++;
+		if (msr & TI_MSR_DELTA_RI)
+			icount->rng++;
+		wake_up_interruptible(&tport->tp_msr_wait);
+		spin_unlock_irqrestore(&tport->tp_lock, flags);
+	}
+
+	tport->tp_msr = msr & TI_MSR_MASK;
+
+	/* handle CTS flow control */
+	tty = tport->tp_port->tty;
+	if (tty && C_CRTSCTS(tty)) {
+		if (msr & TI_MSR_CTS) {
+			tty->hw_stopped = 0;
+			tty_wakeup(tty);
+		} else {
+			tty->hw_stopped = 1;
+		}
+	}
+}
+
+
+static void ti_drain(struct ti_port *tport, unsigned long timeout, int flush)
+{
+	struct ti_device *tdev = tport->tp_tdev;
+	struct usb_serial_port *port = tport->tp_port;
+	wait_queue_t wait;
+	unsigned long flags;
+
+	dbg("%s - port %d", __FUNCTION__, port->number);
+
+	spin_lock_irqsave(&tport->tp_lock, flags);
+
+	/* wait for data to drain from the buffer */
+	tdev->td_urb_error = 0;
+	init_waitqueue_entry(&wait, current);
+	add_wait_queue(&tport->tp_write_wait, &wait);
+	for (;;) {
+		set_current_state(TASK_INTERRUPTIBLE);
+		if (ti_buf_data_avail(tport->tp_write_buf) == 0
+		|| timeout == 0 || signal_pending(current)
+		|| tdev->td_urb_error
+		|| !usb_get_intfdata(port->serial->interface))  /* disconnect */
+			break;
+		spin_unlock_irqrestore(&tport->tp_lock, flags);
+		timeout = schedule_timeout(timeout);
+		spin_lock_irqsave(&tport->tp_lock, flags);
+	}
+	set_current_state(TASK_RUNNING);
+	remove_wait_queue(&tport->tp_write_wait, &wait);
+
+	/* flush any remaining data in the buffer */
+	if (flush)
+		ti_buf_clear(tport->tp_write_buf);
+
+	spin_unlock_irqrestore(&tport->tp_lock, flags);
+
+	/* wait for data to drain from the device */
+	/* wait for empty tx register, plus 20 ms */
+	timeout += jiffies;
+	tport->tp_lsr &= ~TI_LSR_TX_EMPTY;
+	while ((long)(jiffies - timeout) < 0 && !signal_pending(current)
+	&& !(tport->tp_lsr&TI_LSR_TX_EMPTY) && !tdev->td_urb_error
+	&& usb_get_intfdata(port->serial->interface)) {  /* not disconnected */
+		if (ti_get_lsr(tport))
+			break;
+		msleep_interruptible(20);
+	}
+}
+
+
+static void ti_stop_read(struct ti_port *tport, struct tty_struct *tty)
+{
+	unsigned long flags;
+
+	spin_lock_irqsave(&tport->tp_lock, flags);
+
+	if (tport->tp_read_urb_state == TI_READ_URB_RUNNING)
+		tport->tp_read_urb_state = TI_READ_URB_STOPPING;
+
+	spin_unlock_irqrestore(&tport->tp_lock, flags);
+}
+
+
+static int ti_restart_read(struct ti_port *tport, struct tty_struct *tty)
+{
+	struct urb *urb;
+	int status = 0;
+	unsigned long flags;
+
+	spin_lock_irqsave(&tport->tp_lock, flags);
+
+	if (tport->tp_read_urb_state == TI_READ_URB_STOPPED) {
+		urb = tport->tp_port->read_urb;
+		urb->complete = ti_bulk_in_callback;
+		urb->context = tport;
+		urb->dev = tport->tp_port->serial->dev;
+		status = usb_submit_urb(urb, GFP_KERNEL);
+	}
+	tport->tp_read_urb_state = TI_READ_URB_RUNNING;
+
+	spin_unlock_irqrestore(&tport->tp_lock, flags);
+
+	return status;
+}
+
+
+static int ti_command_out_sync(struct ti_device *tdev, __u8 command,
+	__u16 moduleid, __u16 value, __u8 *data, int size)
+{
+	int status;
+
+	status = usb_control_msg(tdev->td_serial->dev,
+		usb_sndctrlpipe(tdev->td_serial->dev, 0), command,
+		(USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_OUT),
+		value, moduleid, data, size, HZ);
+
+	if (status == size)
+		status = 0;
+
+	if (status > 0)
+		status = -ECOMM;
+
+	return status;
+}
+
+
+static int ti_command_in_sync(struct ti_device *tdev, __u8 command,
+	__u16 moduleid, __u16 value, __u8 *data, int size)
+{
+	int status;
+
+	status = usb_control_msg(tdev->td_serial->dev,
+		usb_rcvctrlpipe(tdev->td_serial->dev, 0), command,
+		(USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN),
+		value, moduleid, data, size, HZ);
+
+	if (status == size)
+		status = 0;
+
+	if (status > 0)
+		status = -ECOMM;
+
+	return status;
+}
+
+
+static int ti_write_byte(struct ti_device *tdev, unsigned long addr,
+	__u8 mask, __u8 byte)
+{
+	int status;
+	unsigned int size;
+	struct ti_write_data_bytes *data;
+	struct device *dev = &tdev->td_serial->dev->dev;
+
+	dbg("%s - addr 0x%08lX, mask 0x%02X, byte 0x%02X", __FUNCTION__, addr, mask, byte);
+
+	size = sizeof(struct ti_write_data_bytes) + 2;
+	data = kmalloc(size, GFP_KERNEL);
+	if (!data) {
+		dev_err(dev, "%s - out of memory\n", __FUNCTION__);
+		return -ENOMEM;
+	}
+
+	data->bAddrType = TI_RW_DATA_ADDR_XDATA;
+	data->bDataType = TI_RW_DATA_BYTE;
+	data->bDataCounter = 1;
+	data->wBaseAddrHi = cpu_to_be16(addr>>16);
+	data->wBaseAddrLo = cpu_to_be16(addr);
+	data->bData[0] = mask;
+	data->bData[1] = byte;
+
+	status = ti_command_out_sync(tdev, TI_WRITE_DATA, TI_RAM_PORT, 0,
+		(__u8 *)data, size);
+
+	if (status < 0)
+		dev_err(dev, "%s - failed, %d\n", __FUNCTION__, status);
+
+	kfree(data);
+
+	return status;
+}
+
+
+static int ti_download_firmware(struct ti_device *tdev,
+	unsigned char *firmware, unsigned int firmware_size)
+{
+	int status = 0;
+	int buffer_size;
+	int pos;
+	int len;
+	int done;
+	__u8 cs = 0;
+	__u8 *buffer;
+	struct usb_device *dev = tdev->td_serial->dev;
+	struct ti_firmware_header *header;
+	unsigned int pipe = usb_sndbulkpipe(dev,
+		tdev->td_serial->port[0]->bulk_out_endpointAddress);
+
+
+	buffer_size = TI_FIRMWARE_BUF_SIZE + sizeof(struct ti_firmware_header);
+	buffer = kmalloc(buffer_size, GFP_KERNEL);
+	if (!buffer) {
+		dev_err(&dev->dev, "%s - out of memory\n", __FUNCTION__);
+		return -ENOMEM;
+	}
+
+	memcpy(buffer, firmware, firmware_size);
+	memset(buffer+firmware_size, 0xff, buffer_size-firmware_size);
+
+	for(pos = sizeof(struct ti_firmware_header); pos < buffer_size; pos++)
+		cs = (__u8)(cs + buffer[pos]);
+
+	header = (struct ti_firmware_header *)buffer;
+	header->wLength = cpu_to_le16((__u16)(buffer_size - sizeof(struct ti_firmware_header)));
+	header->bCheckSum = cs;
+
+	dbg("%s - downloading firmware", __FUNCTION__);
+	for (pos = 0; pos < buffer_size; pos += done) {
+		len = min(buffer_size - pos, TI_DOWNLOAD_MAX_PACKET_SIZE);
+		status = usb_bulk_msg(dev, pipe, buffer+pos, len, &done, HZ);
+		if (status)
+			break;
+	}
+
+	kfree(buffer);
+
+	if (status) {
+		dev_err(&dev->dev, "%s - error downloading firmware, %d\n", __FUNCTION__, status);
+		return status;
+	}
+
+	dbg("%s - download successful", __FUNCTION__);
+
+	return 0;
+}
+
+
+/* Circular Buffer Functions */
+
+/*
+ * ti_buf_alloc
+ *
+ * Allocate a circular buffer and all associated memory.
+ */
+
+static struct circ_buf *ti_buf_alloc(void)
+{
+	struct circ_buf *cb;
+
+	cb = (struct circ_buf *)kmalloc(sizeof(struct circ_buf), GFP_KERNEL);
+	if (cb == NULL)
+		return NULL;
+
+	cb->buf = kmalloc(TI_WRITE_BUF_SIZE, GFP_KERNEL);
+	if (cb->buf == NULL) {
+		kfree(cb);
+		return NULL;
+	}
+
+	ti_buf_clear(cb);
+
+	return cb;
+}
+
+
+/*
+ * ti_buf_free
+ *
+ * Free the buffer and all associated memory.
+ */
+
+static void ti_buf_free(struct circ_buf *cb)
+{
+	kfree(cb->buf);
+	kfree(cb);
+}
+
+
+/*
+ * ti_buf_clear
+ *
+ * Clear out all data in the circular buffer.
+ */
+
+static void ti_buf_clear(struct circ_buf *cb)
+{
+	cb->head = cb->tail = 0;
+}
+
+
+/*
+ * ti_buf_data_avail
+ *
+ * Return the number of bytes of data available in the circular
+ * buffer.
+ */
+
+static int ti_buf_data_avail(struct circ_buf *cb)
+{
+	return CIRC_CNT(cb->head,cb->tail,TI_WRITE_BUF_SIZE);
+}
+
+
+/*
+ * ti_buf_space_avail
+ *
+ * Return the number of bytes of space available in the circular
+ * buffer.
+ */
+
+static int ti_buf_space_avail(struct circ_buf *cb)
+{
+	return CIRC_SPACE(cb->head,cb->tail,TI_WRITE_BUF_SIZE);
+}
+
+
+/*
+ * ti_buf_put
+ *
+ * Copy data data from a user buffer and put it into the circular buffer.
+ * Restrict to the amount of space available.
+ *
+ * Return the number of bytes copied.
+ */
+
+static int ti_buf_put(struct circ_buf *cb, const char *buf, int count)
+{
+	int c, ret = 0;
+
+	while (1) {
+		c = CIRC_SPACE_TO_END(cb->head, cb->tail, TI_WRITE_BUF_SIZE);
+		if (count < c)
+			c = count;
+		if (c <= 0)
+			break;
+		memcpy(cb->buf + cb->head, buf, c);
+		cb->head = (cb->head + c) & (TI_WRITE_BUF_SIZE-1);
+		buf += c;
+		count -= c;
+		ret += c;
+	}
+
+	return ret;
+}
+
+
+/*
+ * ti_buf_get
+ *
+ * Get data from the circular buffer and copy to the given buffer.
+ * Restrict to the amount of data available.
+ *
+ * Return the number of bytes copied.
+ */
+
+static int ti_buf_get(struct circ_buf *cb, char *buf, int count)
+{
+	int c, ret = 0;
+
+	while (1) {
+		c = CIRC_CNT_TO_END(cb->head, cb->tail, TI_WRITE_BUF_SIZE);
+		if (count < c)
+			c = count;
+		if (c <= 0)
+			break;
+		memcpy(buf, cb->buf + cb->tail, c);
+		cb->tail = (cb->tail + c) & (TI_WRITE_BUF_SIZE-1);
+		buf += c;
+		count -= c;
+		ret += c;
+	}
+
+	return ret;
+}
diff -Nru a/drivers/usb/serial/ti_usb_3410_5052.h b/drivers/usb/serial/ti_usb_3410_5052.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/usb/serial/ti_usb_3410_5052.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,224 @@
+/* vi: ts=8 sw=8
+ *
+ * TI 3410/5052 USB Serial Driver Header
+ *
+ * Copyright (C) 2004 Texas Instruments
+ *
+ * This driver is based on the Linux io_ti driver, which is
+ *   Copyright (C) 2000-2002 Inside Out Networks
+ *   Copyright (C) 2001-2002 Greg Kroah-Hartman
+ *
+ * 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.
+ *
+ * For questions or problems with this driver, contact Texas Instruments
+ * technical support, or Al Borchers <alborchers@steinerpoint.com>, or
+ * Peter Berger <pberger@brimson.com>.
+ */
+
+#ifndef _TI_3410_5052_H_
+#define _TI_3410_5052_H_
+
+/* Configuration ids */
+#define TI_BOOT_CONFIG			1
+#define TI_ACTIVE_CONFIG		2
+
+/* Vendor and product ids */
+#define TI_VENDOR_ID			0x0451
+#define TI_3410_PRODUCT_ID		0x3410
+#define TI_5052_BOOT_PRODUCT_ID		0x5052	/* no EEPROM, no firmware */
+#define TI_5152_BOOT_PRODUCT_ID		0x5152	/* no EEPROM, no firmware */
+#define TI_5052_EEPROM_PRODUCT_ID	0x505A	/* EEPROM, no firmware */
+#define TI_5052_FIRMWARE_PRODUCT_ID	0x505F	/* firmware is running */
+
+/* Commands */
+#define TI_GET_VERSION			0x01
+#define TI_GET_PORT_STATUS		0x02
+#define TI_GET_PORT_DEV_INFO		0x03
+#define TI_GET_CONFIG			0x04
+#define TI_SET_CONFIG			0x05
+#define TI_OPEN_PORT			0x06
+#define TI_CLOSE_PORT			0x07
+#define TI_START_PORT			0x08
+#define TI_STOP_PORT			0x09
+#define TI_TEST_PORT			0x0A
+#define TI_PURGE_PORT			0x0B
+#define TI_RESET_EXT_DEVICE		0x0C
+#define TI_WRITE_DATA			0x80
+#define TI_READ_DATA			0x81
+#define TI_REQ_TYPE_CLASS		0x82
+
+/* Module identifiers */
+#define TI_I2C_PORT			0x01
+#define TI_IEEE1284_PORT		0x02
+#define TI_UART1_PORT			0x03
+#define TI_UART2_PORT			0x04
+#define TI_RAM_PORT			0x05
+
+/* Modem status */
+#define TI_MSR_DELTA_CTS		0x01
+#define TI_MSR_DELTA_DSR		0x02
+#define TI_MSR_DELTA_RI			0x04
+#define TI_MSR_DELTA_CD			0x08
+#define TI_MSR_CTS			0x10
+#define TI_MSR_DSR			0x20
+#define TI_MSR_RI			0x40
+#define TI_MSR_CD			0x80
+#define TI_MSR_DELTA_MASK		0x0F
+#define TI_MSR_MASK			0xF0
+
+/* Line status */
+#define TI_LSR_OVERRUN_ERROR		0x01
+#define TI_LSR_PARITY_ERROR		0x02
+#define TI_LSR_FRAMING_ERROR		0x04
+#define TI_LSR_BREAK			0x08
+#define TI_LSR_ERROR			0x0F
+#define TI_LSR_RX_FULL			0x10
+#define TI_LSR_TX_EMPTY			0x20
+
+/* Line control */
+#define TI_LCR_BREAK			0x40
+
+/* Modem control */
+#define TI_MCR_LOOP			0x04
+#define TI_MCR_DTR			0x10
+#define TI_MCR_RTS			0x20
+
+/* Mask settings */
+#define TI_UART_ENABLE_RTS_IN		0x0001
+#define TI_UART_DISABLE_RTS		0x0002
+#define TI_UART_ENABLE_PARITY_CHECKING	0x0008
+#define TI_UART_ENABLE_DSR_OUT		0x0010
+#define TI_UART_ENABLE_CTS_OUT		0x0020
+#define TI_UART_ENABLE_X_OUT		0x0040
+#define TI_UART_ENABLE_XA_OUT		0x0080
+#define TI_UART_ENABLE_X_IN		0x0100
+#define TI_UART_ENABLE_DTR_IN		0x0800
+#define TI_UART_DISABLE_DTR		0x1000
+#define TI_UART_ENABLE_MS_INTS		0x2000
+#define TI_UART_ENABLE_AUTO_START_DMA	0x4000
+
+/* Parity */
+#define TI_UART_NO_PARITY		0x00
+#define TI_UART_ODD_PARITY		0x01
+#define TI_UART_EVEN_PARITY		0x02
+#define TI_UART_MARK_PARITY		0x03
+#define TI_UART_SPACE_PARITY		0x04
+
+/* Stop bits */
+#define TI_UART_1_STOP_BITS		0x00
+#define TI_UART_1_5_STOP_BITS		0x01
+#define TI_UART_2_STOP_BITS		0x02
+
+/* Bits per character */
+#define TI_UART_5_DATA_BITS		0x00
+#define TI_UART_6_DATA_BITS		0x01
+#define TI_UART_7_DATA_BITS		0x02
+#define TI_UART_8_DATA_BITS		0x03
+
+/* 232/485 modes */
+#define TI_UART_232			0x00
+#define TI_UART_485_RECEIVER_DISABLED	0x01
+#define TI_UART_485_RECEIVER_ENABLED	0x02
+
+/* Pipe transfer mode and timeout */
+#define TI_PIPE_MODE_CONTINOUS		0x01
+#define TI_PIPE_MODE_MASK		0x03
+#define TI_PIPE_TIMEOUT_MASK		0x7C
+#define TI_PIPE_TIMEOUT_ENABLE		0x80
+
+/* Config struct */
+struct ti_uart_config {
+	__u16	wBaudRate;
+	__u16	wFlags;
+	__u8	bDataBits;
+	__u8	bParity;
+	__u8	bStopBits;
+	char	cXon;
+	char	cXoff;
+	__u8	bUartMode;
+} __attribute__((packed));
+
+/* Get port status */
+struct ti_port_status {
+	__u8	bCmdCode;
+	__u8	bModuleId;
+	__u8	bErrorCode;
+	__u8	bMSR;
+	__u8	bLSR;
+} __attribute__((packed));
+
+/* Purge modes */
+#define TI_PURGE_OUTPUT			0x00
+#define TI_PURGE_INPUT			0x80
+
+/* Read/Write data */
+#define TI_RW_DATA_ADDR_SFR		0x10
+#define TI_RW_DATA_ADDR_IDATA		0x20
+#define TI_RW_DATA_ADDR_XDATA		0x30
+#define TI_RW_DATA_ADDR_CODE		0x40
+#define TI_RW_DATA_ADDR_GPIO		0x50
+#define TI_RW_DATA_ADDR_I2C		0x60
+#define TI_RW_DATA_ADDR_FLASH		0x70
+#define TI_RW_DATA_ADDR_DSP		0x80
+
+#define TI_RW_DATA_UNSPECIFIED		0x00
+#define TI_RW_DATA_BYTE			0x01
+#define TI_RW_DATA_WORD			0x02
+#define TI_RW_DATA_DOUBLE_WORD		0x04
+
+struct ti_write_data_bytes {
+	__u8	bAddrType;
+	__u8	bDataType;
+	__u8	bDataCounter;
+	__be16	wBaseAddrHi;
+	__be16	wBaseAddrLo;
+	__u8	bData[0];
+} __attribute__((packed));
+
+struct ti_read_data_request {
+	__u8	bAddrType;
+	__u8	bDataType;
+	__u8	bDataCounter;
+	__be16	wBaseAddrHi;
+	__be16	wBaseAddrLo;
+} __attribute__((packed));
+
+struct ti_read_data_bytes {
+	__u8	bCmdCode;
+	__u8	bModuleId;
+	__u8	bErrorCode;
+	__u8	bData[0];
+} __attribute__((packed));
+
+/* Interrupt struct */
+struct ti_interrupt {
+	__u8	bICode;
+	__u8	bIInfo;
+} __attribute__((packed));
+
+/* Interrupt codes */
+#define TI_GET_PORT_FROM_CODE(c)	(((c) >> 4) - 3)
+#define TI_GET_FUNC_FROM_CODE(c)	((c) & 0x0f)
+#define TI_CODE_HARDWARE_ERROR		0xFF
+#define TI_CODE_DATA_ERROR		0x03
+#define TI_CODE_MODEM_STATUS		0x04
+
+/* Download firmware max packet size */
+#define TI_DOWNLOAD_MAX_PACKET_SIZE	64
+
+/* Firmware image header */
+struct ti_firmware_header {
+	__le16	wLength;
+	__u8	bCheckSum;
+} __attribute__((packed));
+
+/* UART addresses */
+#define TI_UART1_BASE_ADDR		0xFFA0	/* UART 1 base address */
+#define TI_UART2_BASE_ADDR		0xFFB0	/* UART 2 base address */
+#define TI_UART_OFFSET_LCR		0x0002	/* UART MCR register offset */
+#define TI_UART_OFFSET_MCR		0x0004	/* UART MCR register offset */
+
+#endif /* _TI_3410_5052_H_ */
diff -Nru a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
--- a/drivers/usb/serial/usb-serial.c	2005-01-10 20:11:24 -08:00
+++ b/drivers/usb/serial/usb-serial.c	2005-01-10 20:11:24 -08:00
@@ -721,7 +721,9 @@
 		if (serial->type->owner)
 			length += sprintf (page+length, " module:%s", module_name(serial->type->owner));
 		length += sprintf (page+length, " name:\"%s\"", serial->type->name);
-		length += sprintf (page+length, " vendor:%04x product:%04x", serial->vendor, serial->product);
+		length += sprintf (page+length, " vendor:%04x product:%04x", 
+				   le16_to_cpu(serial->dev->descriptor.idVendor), 
+				   le16_to_cpu(serial->dev->descriptor.idProduct));
 		length += sprintf (page+length, " num_ports:%d", serial->num_ports);
 		length += sprintf (page+length, " port:%d", i - serial->minor + 1);
 
@@ -834,8 +836,6 @@
 	serial->dev = usb_get_dev(dev);
 	serial->type = type;
 	serial->interface = interface;
-	serial->vendor = dev->descriptor.idVendor;
-	serial->product = dev->descriptor.idProduct;
 	kref_init(&serial->kref);
 
 	return serial;
@@ -959,10 +959,10 @@
 #if defined(CONFIG_USB_SERIAL_PL2303) || defined(CONFIG_USB_SERIAL_PL2303_MODULE)
 	/* BEGIN HORRIBLE HACK FOR PL2303 */ 
 	/* this is needed due to the looney way its endpoints are set up */
-	if (((dev->descriptor.idVendor == PL2303_VENDOR_ID) &&
-	     (dev->descriptor.idProduct == PL2303_PRODUCT_ID)) ||
-	    ((dev->descriptor.idVendor == ATEN_VENDOR_ID) &&
-	     (dev->descriptor.idProduct == ATEN_PRODUCT_ID))) {
+	if (((le16_to_cpu(dev->descriptor.idVendor) == PL2303_VENDOR_ID) &&
+	     (le16_to_cpu(dev->descriptor.idProduct) == PL2303_PRODUCT_ID)) ||
+	    ((le16_to_cpu(dev->descriptor.idVendor) == ATEN_VENDOR_ID) &&
+	     (le16_to_cpu(dev->descriptor.idProduct) == ATEN_PRODUCT_ID))) {
 		if (interface != dev->actconfig->interface[0]) {
 			/* check out the endpoints of the other interface*/
 			iface_desc = dev->actconfig->interface[0]->cur_altsetting;
@@ -1060,7 +1060,7 @@
 			dev_err(&interface->dev, "No free urbs available\n");
 			goto probe_error;
 		}
-		buffer_size = endpoint->wMaxPacketSize;
+		buffer_size = le16_to_cpu(endpoint->wMaxPacketSize);
 		port->bulk_in_size = buffer_size;
 		port->bulk_in_endpointAddress = endpoint->bEndpointAddress;
 		port->bulk_in_buffer = kmalloc (buffer_size, GFP_KERNEL);
@@ -1084,7 +1084,7 @@
 			dev_err(&interface->dev, "No free urbs available\n");
 			goto probe_error;
 		}
-		buffer_size = endpoint->wMaxPacketSize;
+		buffer_size = le16_to_cpu(endpoint->wMaxPacketSize);
 		port->bulk_out_size = buffer_size;
 		port->bulk_out_endpointAddress = endpoint->bEndpointAddress;
 		port->bulk_out_buffer = kmalloc (buffer_size, GFP_KERNEL);
@@ -1109,7 +1109,7 @@
 				dev_err(&interface->dev, "No free urbs available\n");
 				goto probe_error;
 			}
-			buffer_size = endpoint->wMaxPacketSize;
+			buffer_size = le16_to_cpu(endpoint->wMaxPacketSize);
 			port->interrupt_in_endpointAddress = endpoint->bEndpointAddress;
 			port->interrupt_in_buffer = kmalloc (buffer_size, GFP_KERNEL);
 			if (!port->interrupt_in_buffer) {
@@ -1136,7 +1136,7 @@
 				dev_err(&interface->dev, "No free urbs available\n");
 				goto probe_error;
 			}
-			buffer_size = endpoint->wMaxPacketSize;
+			buffer_size = le16_to_cpu(endpoint->wMaxPacketSize);
 			port->interrupt_out_size = buffer_size;
 			port->interrupt_out_endpointAddress = endpoint->bEndpointAddress;
 			port->interrupt_out_buffer = kmalloc (buffer_size, GFP_KERNEL);
@@ -1238,13 +1238,20 @@
 
 void usb_serial_disconnect(struct usb_interface *interface)
 {
+	int i;
 	struct usb_serial *serial = usb_get_intfdata (interface);
 	struct device *dev = &interface->dev;
+	struct usb_serial_port *port;
 
 	dbg ("%s", __FUNCTION__);
 
 	usb_set_intfdata (interface, NULL);
 	if (serial) {
+		for (i = 0; i < serial->num_ports; ++i) {
+			port = serial->port[i];
+			if (port && port->tty)
+				tty_hangup(port->tty);
+		}
 		/* let the last holder of this object 
 		 * cause it to be cleaned up */
 		kref_put(&serial->kref, destroy_serial);
diff -Nru a/drivers/usb/serial/usb-serial.h b/drivers/usb/serial/usb-serial.h
--- a/drivers/usb/serial/usb-serial.h	2005-01-10 20:11:23 -08:00
+++ b/drivers/usb/serial/usb-serial.h	2005-01-10 20:11:23 -08:00
@@ -148,8 +148,6 @@
  * @num_interrupt_out: number of interrupt out endpoints we have
  * @num_bulk_in: number of bulk in endpoints we have
  * @num_bulk_out: number of bulk out endpoints we have
- * @vendor: vendor id of this device
- * @product: product id of this device
  * @port: array of struct usb_serial_port structures for the different ports.
  * @private: place to put any driver specific information that is needed.  The
  *	usb-serial driver is required to manage this data, the usb-serial core
@@ -167,8 +165,6 @@
 	char				num_interrupt_out;
 	char				num_bulk_in;
 	char				num_bulk_out;
-	__u16				vendor;
-	__u16				product;
 	struct usb_serial_port *	port[MAX_NUM_PORTS];
 	struct kref			kref;
 	void *				private;
diff -Nru a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c
--- a/drivers/usb/serial/visor.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/usb/serial/visor.c	2005-01-10 20:11:17 -08:00
@@ -734,9 +734,7 @@
 	if (retval == sizeof(*connection_info)) {
 	        connection_info = (struct visor_connection_info *)transfer_buffer;
 
-		le16_to_cpus(&connection_info->num_ports);
-		num_ports = connection_info->num_ports;
-
+		num_ports = le16_to_cpu(connection_info->num_ports);
 		for (i = 0; i < num_ports; ++i) {
 			switch (connection_info->connections[i].port_function_id) {
 				case VISOR_FUNCTION_GENERIC:
@@ -926,8 +924,8 @@
 
 	/* Only do this endpoint hack for the Handspring devices with
 	 * interrupt in endpoints, which for now are the Treo devices. */
-	if (!((serial->dev->descriptor.idVendor == HANDSPRING_VENDOR_ID) ||
-	      (serial->dev->descriptor.idVendor == KYOCERA_VENDOR_ID)) ||
+	if (!((le16_to_cpu(serial->dev->descriptor.idVendor) == HANDSPRING_VENDOR_ID) ||
+	      (le16_to_cpu(serial->dev->descriptor.idVendor) == KYOCERA_VENDOR_ID)) ||
 	    (serial->num_interrupt_in == 0))
 		goto generic_startup;
 
diff -Nru a/drivers/usb/serial/visor.h b/drivers/usb/serial/visor.h
--- a/drivers/usb/serial/visor.h	2005-01-10 20:11:22 -08:00
+++ b/drivers/usb/serial/visor.h	2005-01-10 20:11:22 -08:00
@@ -89,7 +89,7 @@
  * VISOR_GET_CONNECTION_INFORMATION returns data in the following format
  ****************************************************************************/
 struct visor_connection_info {
-	__u16	num_ports;
+	__le16	num_ports;
 	struct {
 		__u8	port_function_id;
 		__u8	port;
@@ -135,12 +135,12 @@
 struct palm_ext_connection_info {
 	__u8 num_ports;		
 	__u8 endpoint_numbers_different;
-	__u16 reserved1;
+	__le16 reserved1;
 	struct {
 		__u32 port_function_id;
 		__u8 port;
 		__u8 end_point_info;
-		__u16 reserved;
+		__le16 reserved;
 	} connections[2];
 };
 
diff -Nru a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c
--- a/drivers/usb/storage/scsiglue.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/usb/storage/scsiglue.c	2005-01-10 20:11:19 -08:00
@@ -118,7 +118,7 @@
 	 * works okay and that's what Windows does.  But we'll be
 	 * conservative; people can always use the sysfs interface to
 	 * increase max_sectors. */
-	if (us->pusb_dev->descriptor.idVendor == USB_VENDOR_ID_GENESYS &&
+	if (le16_to_cpu(us->pusb_dev->descriptor.idVendor) == USB_VENDOR_ID_GENESYS &&
 			sdev->request_queue->max_sectors > 64)
 		blk_queue_max_sectors(sdev->request_queue, 64);
 
diff -Nru a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c
--- a/drivers/usb/storage/transport.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/usb/storage/transport.c	2005-01-10 20:11:18 -08:00
@@ -954,6 +954,13 @@
 	int result;
 	int fake_sense = 0;
 	unsigned int cswlen;
+	unsigned int cbwlen = US_BULK_CB_WRAP_LEN;
+
+	/* Take care of BULK32 devices; set extra byte to 0 */
+	if ( unlikely(us->flags & US_FL_BULK32)) {
+		cbwlen = 32;
+		us->iobuf[31] = 0;
+	}
 
 	/* set up the command wrapper */
 	bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN);
@@ -976,7 +983,7 @@
 			(bcb->Lun >> 4), (bcb->Lun & 0x0F), 
 			bcb->Length);
 	result = usb_stor_bulk_transfer_buf(us, us->send_bulk_pipe,
-				bcb, US_BULK_CB_WRAP_LEN, NULL);
+				bcb, cbwlen, NULL);
 	US_DEBUGP("Bulk command transfer result=%d\n", result);
 	if (result != USB_STOR_XFER_GOOD)
 		return USB_STOR_TRANSPORT_ERROR;
@@ -985,9 +992,10 @@
 	/* send/receive data payload, if there is any */
 
 	/* Genesys Logic interface chips need a 100us delay between the
-	 * command phase and the data phase */
-	if (us->pusb_dev->descriptor.idVendor == USB_VENDOR_ID_GENESYS)
-		udelay(100);
+	 * command phase and the data phase.  Some devices need a little
+	 * more than that, probably because of clock rate inaccuracies. */
+	if (le16_to_cpu(us->pusb_dev->descriptor.idVendor) == USB_VENDOR_ID_GENESYS)
+		udelay(110);
 
 	if (transfer_length) {
 		unsigned int pipe = srb->sc_data_direction == DMA_FROM_DEVICE ? 
diff -Nru a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
--- a/drivers/usb/storage/unusual_devs.h	2005-01-10 20:11:21 -08:00
+++ b/drivers/usb/storage/unusual_devs.h	2005-01-10 20:11:21 -08:00
@@ -249,6 +249,17 @@
 		"CD-RW Device",
 		US_SC_8020, US_PR_CB, NULL, 0),
 
+/* Entry and supporting patch by Theodore Kilgore <kilgota@auburn.edu>.
+ * Device uses standards-violating 32-byte Bulk Command Block Wrappers and
+ * reports itself as "Proprietary SCSI Bulk." Cf. device entry 0x084d:0x0011.
+ */
+
+UNUSUAL_DEV(  0x04fc, 0x80c2, 0x0100, 0x0100,
+		"Kobian Mercury",
+		"Binocam DCB-132",
+		US_SC_DEVICE, US_PR_DEVICE, NULL,
+		US_FL_BULK32),
+
 /* Reported by Bob Sass <rls@vectordb.com> -- only rev 1.33 tested */
 UNUSUAL_DEV(  0x050d, 0x0115, 0x0133, 0x0133,
 		"Belkin",
@@ -310,14 +321,14 @@
 		"Sony",
 		"DSC-S30/S70/S75/505V/F505/F707/F717/P8", 
 		US_SC_SCSI, US_PR_DEVICE, NULL,
-		US_FL_SINGLE_LUN | US_FL_MODE_XLATE ),
+		US_FL_SINGLE_LUN ),
 
 /* This entry is needed because the device reports Sub=ff */
 UNUSUAL_DEV(  0x054c, 0x0010, 0x0500, 0x0500, 
                "Sony",
                "DSC-T1", 
                US_SC_8070, US_PR_DEVICE, NULL,
-               US_FL_SINGLE_LUN | US_FL_MODE_XLATE ),
+               US_FL_SINGLE_LUN ),
 
 
 /* Reported by wim@geeks.nl */
@@ -346,14 +357,14 @@
 		"Sony",
 		"Handycam",
 		US_SC_SCSI, US_PR_DEVICE, NULL,
-		US_FL_SINGLE_LUN | US_FL_MODE_XLATE),
+		US_FL_SINGLE_LUN ),
 
 /* Submitted by Rajesh Kumble Nayak <nayak@obs-nice.fr> */
 UNUSUAL_DEV(  0x054c, 0x002e, 0x0500, 0x0500, 
 		"Sony",
 		"Handycam HC-85",
 		US_SC_UFI, US_PR_DEVICE, NULL,
-		US_FL_SINGLE_LUN | US_FL_MODE_XLATE),
+		US_FL_SINGLE_LUN ),
 
 UNUSUAL_DEV(  0x054c, 0x0032, 0x0000, 0x9999,
 		"Sony",
@@ -483,7 +494,7 @@
 		"Lexar",
 		"Jumpshot USB CF Reader",
 		US_SC_SCSI, US_PR_JUMPSHOT, NULL,
-		US_FL_NEED_OVERRIDE | US_FL_MODE_XLATE ),
+		US_FL_NEED_OVERRIDE ),
 #endif
 
 /* Reported by Blake Matheny <bmatheny@purdue.edu> */
@@ -499,7 +510,7 @@
 		"Vivitar",
 		"Vivicam 35Xx",
 		US_SC_SCSI, US_PR_BULK, NULL,
-		US_FL_FIX_INQUIRY | US_FL_MODE_XLATE),
+		US_FL_FIX_INQUIRY ),
 
 UNUSUAL_DEV(  0x0644, 0x0000, 0x0100, 0x0100, 
 		"TEAC",
@@ -521,6 +532,20 @@
 		US_SC_DEVICE, US_PR_DEVICE, NULL,
 		US_FL_FIX_CAPACITY ),
 
+/* Reported by Alex Butcher <alex.butcher@assursys.co.uk> */
+UNUSUAL_DEV( 0x067b, 0x3507, 0x0001, 0x0001,
+		"Prolific Technology Inc.",
+		"ATAPI-6 Bridge Controller",
+		US_SC_DEVICE, US_PR_DEVICE, NULL,
+		US_FL_FIX_CAPACITY ),
+
+/* Reported by Alex Butcher <alex.butcher@assursys.co.uk> */
+UNUSUAL_DEV( 0x067b, 0x3507, 0x0001, 0x0001,
+		"Prolific Technology Inc.",
+		"ATAPI-6 Bridge Controller",
+		US_SC_DEVICE, US_PR_DEVICE, NULL,
+		US_FL_FIX_CAPACITY ),
+
 /* Submitted by Benny Sjostrand <benny@hostmobility.com> */
 UNUSUAL_DEV( 0x0686, 0x4011, 0x0001, 0x0001,
 		"Minolta",
@@ -609,48 +634,48 @@
 		"Datafab",
 		"MDCFE-B USB CF Reader",
 		US_SC_SCSI, US_PR_DATAFAB, NULL,
-		US_FL_MODE_XLATE ),
+		0 ),
 
-	/*
-	 * The following Datafab-based devices may or may not work
-	 * using the current driver...the 0xffff is arbitrary since I
-	 * don't know what device versions exist for these guys.
-	 *
-	 * The 0xa003 and 0xa004 devices in particular I'm curious about.
-	 * I'm told they exist but so far nobody has come forward to say that
-	 * they work with this driver.  Given the success we've had getting
-	 * other Datafab-based cards operational with this driver, I've decided
-	 * to leave these two devices in the list.
-	 */
+/*
+ * The following Datafab-based devices may or may not work
+ * using the current driver...the 0xffff is arbitrary since I
+ * don't know what device versions exist for these guys.
+ *
+ * The 0xa003 and 0xa004 devices in particular I'm curious about.
+ * I'm told they exist but so far nobody has come forward to say that
+ * they work with this driver.  Given the success we've had getting
+ * other Datafab-based cards operational with this driver, I've decided
+ * to leave these two devices in the list.
+ */
 UNUSUAL_DEV( 0x07c4, 0xa001, 0x0000, 0xffff,
 		"SIIG/Datafab",
 		"SIIG/Datafab Memory Stick+CF Reader/Writer",
 		US_SC_SCSI, US_PR_DATAFAB, NULL,
-		US_FL_MODE_XLATE ),
+		0 ),
 
 UNUSUAL_DEV( 0x07c4, 0xa003, 0x0000, 0xffff,
 		"Datafab/Unknown",
 		"Datafab-based Reader",
 		US_SC_SCSI, US_PR_DATAFAB, NULL,
-		US_FL_MODE_XLATE ),
+		0 ),
 
 UNUSUAL_DEV( 0x07c4, 0xa004, 0x0000, 0xffff,
 		"Datafab/Unknown",
 		"Datafab-based Reader",
 		US_SC_SCSI, US_PR_DATAFAB, NULL,
-		US_FL_MODE_XLATE ),
+		0 ),
 
 UNUSUAL_DEV( 0x07c4, 0xa005, 0x0000, 0xffff,
 		"PNY/Datafab",
 		"PNY/Datafab CF+SM Reader",
 		US_SC_SCSI, US_PR_DATAFAB, NULL,
-		US_FL_MODE_XLATE ),
+		0 ),
 
 UNUSUAL_DEV( 0x07c4, 0xa006, 0x0000, 0xffff,
 		"Simple Tech/Datafab",
 		"Simple Tech/Datafab CF+SM Reader",
 		US_SC_SCSI, US_PR_DATAFAB, NULL,
-		US_FL_MODE_XLATE ),
+		0 ),
 #endif
 		
 #ifdef CONFIG_USB_STORAGE_SDDR55
@@ -668,7 +693,7 @@
 		"Datafab Systems, Inc.",
 		"USB to CF + SM Combo (LC1)",
 		US_SC_SCSI, US_PR_DATAFAB, NULL,
-		US_FL_MODE_XLATE ),
+		0 ),
 #endif
 #ifdef CONFIG_USB_STORAGE_SDDR55
 /* SM part - aeb <Andries.Brouwer@cwi.nl> */
@@ -715,14 +740,18 @@
 		US_SC_DEVICE, US_PR_DEVICE, NULL,
 		US_FL_FIX_INQUIRY),
 
-/* Aiptek PocketCAM 3Mega
- * Nicolas DUPEUX <nicolas@dupeux.net> 
+/* Entry and supporting patch by Theodore Kilgore <kilgota@auburn.edu>.
+ * Flag will support Bulk devices which use a standards-violating 32-byte
+ * Command Block Wrapper. Here, the "DC2MEGA" cameras (several brands) with
+ * Grandtech GT892x chip, which request "Proprietary SCSI Bulk" support.
  */
-UNUSUAL_DEV(  0x08ca, 0x2011, 0x0000, 0x9999,
-		"AIPTEK",
-		"PocketCAM 3Mega",
+
+UNUSUAL_DEV(  0x084d, 0x0011, 0x0110, 0x0110,
+		"Grandtech",
+		"DC2MEGA",
 		US_SC_DEVICE, US_PR_DEVICE, NULL,
-		US_FL_MODE_XLATE ),
+		US_FL_BULK32),
+
 
 /* Entry needed for flags. Moreover, all devices with this ID use
  * bulk-only transport, but _some_ falsely report Control/Bulk instead.
@@ -733,14 +762,14 @@
 		"Trumpion",
 		"t33520 USB Flash Card Controller",
 		US_SC_DEVICE, US_PR_BULK, NULL,
-		US_FL_NEED_OVERRIDE | US_FL_MODE_XLATE),
+		US_FL_NEED_OVERRIDE ),
 
 /* Trumpion Microelectronics MP3 player (felipe_alfaro@linuxmail.org) */
 UNUSUAL_DEV( 0x090a, 0x1200, 0x0000, 0x9999,
 		"Trumpion",
 		"MP3 player",
 		US_SC_RBC, US_PR_BULK, NULL,
-		US_FL_MODE_XLATE),
+		0 ),
 
 /* aeb */
 UNUSUAL_DEV( 0x090c, 0x1132, 0x0000, 0xffff,
@@ -749,12 +778,6 @@
 		US_SC_DEVICE, US_PR_DEVICE, NULL,
 		US_FL_FIX_CAPACITY ),
 
-UNUSUAL_DEV(  0x097a, 0x0001, 0x0000, 0x0001,
-		"Minds@Work",
-		"Digital Wallet",
- 		US_SC_DEVICE, US_PR_DEVICE, NULL,
-		US_FL_MODE_XLATE ),
-
 /* This Pentax still camera is not conformant
  * to the USB storage specification: -
  * - It does not like the INQUIRY command. So we must handle this command
@@ -858,17 +881,6 @@
 		"UCR-61S2B",
 		US_SC_DEVICE, US_PR_DEVICE, usb_stor_ucr61s2b_init,
 		0 ),
-
-/* Reported by Dan Pilone <pilone@slac.com>
- * The device needs the flags only.
- * Also reported by Brian Hall <brihall@pcisys.net>, again for flags.
- * I also suspect this device may have a broken serial number.
- */
-UNUSUAL_DEV(  0x1065, 0x2136, 0x0000, 0x9999,
-		"CCYU TECHNOLOGY",
-		"EasyDisk Portable Device",
-		US_SC_DEVICE, US_PR_DEVICE, NULL,
-		US_FL_MODE_XLATE ),
 
 /* Reported by Kotrla Vitezslav <kotrla@ceb.cz> */
 UNUSUAL_DEV(  0x1370, 0x6828, 0x0110, 0x0110,
diff -Nru a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c
--- a/drivers/usb/storage/usb.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/usb/storage/usb.c	2005-01-10 20:11:17 -08:00
@@ -263,16 +263,17 @@
 			      available from the device."). */
 		memset(data+8,0,28);
 	} else {
+		u16 bcdDevice = le16_to_cpu(us->pusb_dev->descriptor.bcdDevice);
 		memcpy(data+8, us->unusual_dev->vendorName, 
 			strlen(us->unusual_dev->vendorName) > 8 ? 8 :
 			strlen(us->unusual_dev->vendorName));
 		memcpy(data+16, us->unusual_dev->productName, 
 			strlen(us->unusual_dev->productName) > 16 ? 16 :
 			strlen(us->unusual_dev->productName));
-		data[32] = 0x30 + ((us->pusb_dev->descriptor.bcdDevice>>12) & 0x0F);
-		data[33] = 0x30 + ((us->pusb_dev->descriptor.bcdDevice>>8) & 0x0F);
-		data[34] = 0x30 + ((us->pusb_dev->descriptor.bcdDevice>>4) & 0x0F);
-		data[35] = 0x30 + ((us->pusb_dev->descriptor.bcdDevice) & 0x0F);
+		data[32] = 0x30 + ((bcdDevice>>12) & 0x0F);
+		data[33] = 0x30 + ((bcdDevice>>8) & 0x0F);
+		data[34] = 0x30 + ((bcdDevice>>4) & 0x0F);
+		data[35] = 0x30 + ((bcdDevice) & 0x0F);
 	}
 
 	usb_stor_set_xfer_buf(data, data_len, us->srb);
@@ -436,9 +437,9 @@
 	us->pusb_intf = intf;
 	us->ifnum = intf->cur_altsetting->desc.bInterfaceNumber;
 	US_DEBUGP("Vendor: 0x%04x, Product: 0x%04x, Revision: 0x%04x\n",
-			us->pusb_dev->descriptor.idVendor,
-			us->pusb_dev->descriptor.idProduct,
-			us->pusb_dev->descriptor.bcdDevice);
+			le16_to_cpu(us->pusb_dev->descriptor.idVendor),
+			le16_to_cpu(us->pusb_dev->descriptor.idProduct),
+			le16_to_cpu(us->pusb_dev->descriptor.bcdDevice));
 	US_DEBUGP("Interface Subclass: 0x%02x, Protocol: 0x%02x\n",
 			intf->cur_altsetting->desc.bInterfaceSubClass,
 			intf->cur_altsetting->desc.bInterfaceProtocol);
@@ -507,8 +508,9 @@
 				" has %s in unusual_devs.h\n"
 				"   Please send a copy of this message to "
 				"<linux-usb-devel@lists.sourceforge.net>\n",
-				ddesc->idVendor, ddesc->idProduct,
-				ddesc->bcdDevice,
+				le16_to_cpu(ddesc->idVendor),
+				le16_to_cpu(ddesc->idProduct),
+				le16_to_cpu(ddesc->bcdDevice),
 				idesc->bInterfaceSubClass,
 				idesc->bInterfaceProtocol,
 				msgs[msg]);
diff -Nru a/drivers/usb/storage/usb.h b/drivers/usb/storage/usb.h
--- a/drivers/usb/storage/usb.h	2005-01-10 20:11:20 -08:00
+++ b/drivers/usb/storage/usb.h	2005-01-10 20:11:20 -08:00
@@ -74,6 +74,7 @@
 #define US_FL_FIX_INQUIRY     0x00000040 /* INQUIRY response needs faking   */
 #define US_FL_FIX_CAPACITY    0x00000080 /* READ CAPACITY response too big  */
 #define US_FL_IGNORE_RESIDUE  0x00000100 /* reported residue is wrong	    */
+#define US_FL_BULK32          0x00000200 /* Uses 32-byte CBW length         */
 
 /* Dynamic flag definitions: used in set_bit() etc. */
 #define US_FLIDX_URB_ACTIVE	18  /* 0x00040000  current_urb is in use  */
diff -Nru a/drivers/usb/usb-skeleton.c b/drivers/usb/usb-skeleton.c
--- a/drivers/usb/usb-skeleton.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/usb/usb-skeleton.c	2005-01-10 20:11:18 -08:00
@@ -260,7 +260,7 @@
 		    ((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
 					== USB_ENDPOINT_XFER_BULK)) {
 			/* we found a bulk in endpoint */
-			buffer_size = endpoint->wMaxPacketSize;
+			buffer_size = le16_to_cpu(endpoint->wMaxPacketSize);
 			dev->bulk_in_size = buffer_size;
 			dev->bulk_in_endpointAddr = endpoint->bEndpointAddress;
 			dev->bulk_in_buffer = kmalloc(buffer_size, GFP_KERNEL);
diff -Nru a/drivers/video/amba-clcd.c b/drivers/video/amba-clcd.c
--- a/drivers/video/amba-clcd.c	2005-01-10 20:11:24 -08:00
+++ b/drivers/video/amba-clcd.c	2005-01-10 20:11:24 -08:00
@@ -16,6 +16,7 @@
 #include <linux/string.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
+#include <linux/mm.h>
 #include <linux/fb.h>
 #include <linux/init.h>
 #include <linux/ioport.h>
@@ -300,6 +301,22 @@
 	return 0;
 }
 
+static int clcdfb_mmap(struct fb_info *info, struct file *file,
+		       struct vm_area_struct *vma)
+{
+	struct clcd_fb *fb = to_clcd(info);
+	unsigned long len, off = vma->vm_pgoff << PAGE_SHIFT;
+	int ret = -EINVAL;
+
+	len = info->fix.smem_len;
+
+	if (off <= len && vma->vm_end - vma->vm_start <= len - off &&
+	    fb->board->mmap)
+		ret = fb->board->mmap(fb, vma);
+
+	return ret;
+}
+
 static struct fb_ops clcdfb_ops = {
 	.owner		= THIS_MODULE,
 	.fb_check_var	= clcdfb_check_var,
@@ -310,6 +327,7 @@
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
 	.fb_cursor	= soft_cursor,
+	.fb_mmap	= clcdfb_mmap,
 };
 
 static int clcdfb_register(struct clcd_fb *fb)
diff -Nru a/drivers/video/aty/Makefile b/drivers/video/aty/Makefile
--- a/drivers/video/aty/Makefile	2005-01-10 20:11:17 -08:00
+++ b/drivers/video/aty/Makefile	2005-01-10 20:11:17 -08:00
@@ -5,6 +5,8 @@
 atyfb-y				:= atyfb_base.o mach64_accel.o mach64_cursor.o
 atyfb-$(CONFIG_FB_ATY_GX)	+= mach64_gx.o
 atyfb-$(CONFIG_FB_ATY_CT)	+= mach64_ct.o
+atyfb-$(CONFIG_FB_ATY_XL_INIT)  += xlinit.o
+
 atyfb-objs			:= $(atyfb-y)
 
 radeonfb-y			:= radeon_base.o radeon_pm.o radeon_monitor.o radeon_accel.o
diff -Nru a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c
--- a/drivers/video/aty/aty128fb.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/video/aty/aty128fb.c	2005-01-10 20:11:19 -08:00
@@ -452,7 +452,6 @@
 static void __init aty128_get_pllinfo(struct aty128fb_par *par,
 				      void __iomem *bios);
 static void __init __iomem *aty128_map_ROM(struct pci_dev *pdev, const struct aty128fb_par *par);
-static void __init aty128_unmap_ROM(struct pci_dev *dev, void __iomem * rom);
 #endif
 static void aty128_timings(struct aty128fb_par *par);
 static void aty128_init_engine(struct aty128fb_par *par);
@@ -788,30 +787,12 @@
 
 
 #ifndef __sparc__
-static void __init aty128_unmap_ROM(struct pci_dev *dev, void __iomem * rom)
-{
-	struct resource *r = &dev->resource[PCI_ROM_RESOURCE];
-	
-	iounmap(rom);
-	
-	/* Release the ROM resource if we used it in the first place */
-	if (r->parent && r->flags & PCI_ROM_ADDRESS_ENABLE) {
-		release_resource(r);
-		r->flags &= ~PCI_ROM_ADDRESS_ENABLE;
-		r->end -= r->start;
-		r->start = 0;
-	}
-	/* This will disable and set address to unassigned */
-	pci_write_config_dword(dev, dev->rom_base_reg, 0);
-}
-
-
 static void __iomem * __init aty128_map_ROM(const struct aty128fb_par *par, struct pci_dev *dev)
 {
-	struct resource *r;
 	u16 dptr;
 	u8 rom_type;
 	void __iomem *bios;
+	size_t rom_size;
 
     	/* Fix from ATI for problem with Rage128 hardware not leaving ROM enabled */
     	unsigned int temp;
@@ -821,26 +802,13 @@
 	aty_st_le32(RAGE128_MPP_TB_CONFIG, temp);
 	temp = aty_ld_le32(RAGE128_MPP_TB_CONFIG);
 
-	/* no need to search for the ROM, just ask the card where it is. */
-	r = &dev->resource[PCI_ROM_RESOURCE];
+	bios = pci_map_rom(dev, &rom_size);
 
-	/* assign the ROM an address if it doesn't have one */
-	if (r->parent == NULL)
-		pci_assign_resource(dev, PCI_ROM_RESOURCE);
-	
-	/* enable if needed */
-	if (!(r->flags & PCI_ROM_ADDRESS_ENABLE)) {
-		pci_write_config_dword(dev, dev->rom_base_reg,
-				       r->start | PCI_ROM_ADDRESS_ENABLE);
-		r->flags |= PCI_ROM_ADDRESS_ENABLE;
-	}
-	
-	bios = ioremap(r->start, r->end - r->start + 1);
 	if (!bios) {
 		printk(KERN_ERR "aty128fb: ROM failed to map\n");
 		return NULL;
 	}
-	
+
 	/* Very simple test to make sure it appeared */
 	if (BIOS_IN16(0) != 0xaa55) {
 		printk(KERN_ERR "aty128fb: Invalid ROM signature %x should be 0xaa55\n",
@@ -899,7 +867,7 @@
 	return bios;
 
  failed:
-	aty128_unmap_ROM(dev, bios);
+	pci_unmap_rom(dev, bios);
 	return NULL;
 }
 
@@ -1959,7 +1927,7 @@
 	else {
 		printk(KERN_INFO "aty128fb: Rage128 BIOS located\n");
 		aty128_get_pllinfo(par, bios);
-		aty128_unmap_ROM(pdev, bios);
+		pci_unmap_rom(pdev, bios);
 	}
 #endif /* __sparc__ */
 
diff -Nru a/drivers/video/aty/atyfb.h b/drivers/video/aty/atyfb.h
--- a/drivers/video/aty/atyfb.h	2005-01-10 20:11:20 -08:00
+++ b/drivers/video/aty/atyfb.h	2005-01-10 20:11:20 -08:00
@@ -83,13 +83,13 @@
 	u8 pll_gen_cntl;
 	u8 mclk_fb_div;
 	u8 mclk_fb_mult; /* 2 ro 4 */
-/*	u8 sclk_fb_div;*/
+	u8 sclk_fb_div;
 	u8 pll_vclk_cntl;
 	u8 vclk_post_div;
 	u8 vclk_fb_div;
 	u8 pll_ext_cntl;
-/*	u8 ext_vpll_cntl;
-	u8 spll_cntl2;*/
+	u8 ext_vpll_cntl;
+	u8 spll_cntl2;
 	u32 dsp_config; /* Mach64 GTB DSP */
 	u32 dsp_on_off; /* Mach64 GTB DSP */
 	u32 dsp_loop_latency;
@@ -215,7 +215,6 @@
 #define M64F_XL_DLL		0x00080000
 #define M64F_MFB_FORCE_4	0x00100000
 #define M64F_HW_TRIPLE		0x00200000
-
     /*
      *  Register access
      */
@@ -246,6 +245,19 @@
 #endif
 }
 
+static inline void aty_st_le16(int regindex, u16 val,
+			       const struct atyfb_par *par)
+{
+	/* Hack for bloc 1, should be cleanly optimized by compiler */
+	if (regindex >= 0x400)
+		regindex -= 0x800;
+#ifdef CONFIG_ATARI
+	out_le16((volatile u16 *)(par->ati_regbase + regindex), val);
+#else
+	writel(val, par->ati_regbase + regindex);
+#endif
+}
+
 static inline u8 aty_ld_8(int regindex, const struct atyfb_par *par)
 {
 	/* Hack for bloc 1, should be cleanly optimized by compiler */
@@ -343,4 +355,6 @@
 
 extern void aty_reset_engine(const struct atyfb_par *par);
 extern void aty_init_engine(struct atyfb_par *par, struct fb_info *info);
-
+extern int  atyfb_xl_init(struct fb_info *info);
+extern void aty_st_pll_ct(int offset, u8 val, const struct atyfb_par *par);
+extern u8   aty_ld_pll_ct(int offset, const struct atyfb_par *par);
diff -Nru a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c
--- a/drivers/video/aty/atyfb_base.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/video/aty/atyfb_base.c	2005-01-10 20:11:21 -08:00
@@ -2279,9 +2279,12 @@
 		par->dac_ops = &aty_dac_ct;
 		par->pll_ops = &aty_pll_ct;
 		par->bus_type = PCI;
+#ifdef CONFIG_FB_ATY_XL_INIT
+		if (IS_XL(par->pci_id))
+			atyfb_xl_init(info);
+#endif
 		par->ram_type = (aty_ld_le32(CONFIG_STAT0, par) & 0x07);
 		ramname = aty_ct_ram[par->ram_type];
-
 		/* for many chips, the mclk is 67 MHz for SDRAM, 63 MHz otherwise */
 		if (par->pll_limits.mclk == 67 && par->ram_type < SDRAM)
 			par->pll_limits.mclk = 63;
diff -Nru a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c
--- a/drivers/video/aty/radeon_base.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/video/aty/radeon_base.c	2005-01-10 20:11:18 -08:00
@@ -263,30 +263,17 @@
 
 static void __devexit radeon_unmap_ROM(struct radeonfb_info *rinfo, struct pci_dev *dev)
 {
-	// leave it disabled and unassigned
-	struct resource *r = &dev->resource[PCI_ROM_RESOURCE];
-	
 	if (!rinfo->bios_seg)
 		return;
-	iounmap(rinfo->bios_seg);
-	
-	/* Release the ROM resource if we used it in the first place */
-	if (r->parent && r->flags & PCI_ROM_ADDRESS_ENABLE) {
-		release_resource(r);
-		r->flags &= ~PCI_ROM_ADDRESS_ENABLE;
-		r->end -= r->start;
-		r->start = 0;
-	}
-	/* This will disable and set address to unassigned */
-	pci_write_config_dword(dev, dev->rom_base_reg, 0);
+	pci_unmap_rom(dev, rinfo->bios_seg);
 }
 
 static int __devinit radeon_map_ROM(struct radeonfb_info *rinfo, struct pci_dev *dev)
 {
 	void __iomem *rom;
-	struct resource *r;
 	u16 dptr;
 	u8 rom_type;
+	size_t rom_size;
 
 	/* If this is a primary card, there is a shadow copy of the
 	 * ROM somewhere in the first meg. We will just ignore the copy
@@ -301,21 +288,7 @@
 	OUTREG(MPP_TB_CONFIG, temp);
 	temp = INREG(MPP_TB_CONFIG);
                                                                                                           
-	/* no need to search for the ROM, just ask the card where it is. */
-	r = &dev->resource[PCI_ROM_RESOURCE];
-	
-	/* assign the ROM an address if it doesn't have one */
-	if (r->parent == NULL)
-		pci_assign_resource(dev, PCI_ROM_RESOURCE);
-	
-	/* enable if needed */
-	if (!(r->flags & PCI_ROM_ADDRESS_ENABLE)) {
-		pci_write_config_dword(dev, dev->rom_base_reg,
-				       r->start | PCI_ROM_ADDRESS_ENABLE);
-		r->flags |= PCI_ROM_ADDRESS_ENABLE;
-	}
-	
-	rom = ioremap(r->start, r->end - r->start + 1);
+	rom = pci_map_rom(dev, &rom_size);
 	if (!rom) {
 		printk(KERN_ERR "radeonfb: ROM failed to map\n");
 		return -ENOMEM;
diff -Nru a/drivers/video/aty/xlinit.c b/drivers/video/aty/xlinit.c
--- a/drivers/video/aty/xlinit.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/video/aty/xlinit.c	2005-01-10 20:11:18 -08:00
@@ -105,19 +105,6 @@
 	{ 0x37,	0x00000000 }
 };
 
-static inline u32 aty_ld_lcd(u8 lcd_reg, struct atyfb_par *par)
-{
-	aty_st_8(LCD_INDEX, lcd_reg, par);
-	return aty_ld_le32(LCD_DATA, par);
-}
-
-static inline void aty_st_lcd(u8 lcd_reg, u32 val,
-			      struct atyfb_par *par)
-{
-	aty_st_8(LCD_INDEX, lcd_reg, par);
-	aty_st_le32(LCD_DATA, val, par);
-}
-
 static void reset_gui(struct atyfb_par *par)
 {
 	aty_st_8(GEN_TEST_CNTL+1, 0x01, par);
@@ -205,7 +192,7 @@
 		// the MCLK, XCLK are 120MHz on victoria card
 		par->mclk_per = 1000000/120;
 		par->xclk_per = 1000000/120;
-		par->features &= ~M64F_MFB_TIMES_4;
+		par->features &= ~M64F_MFB_FORCE_4;
 	}
 	
 	/*
diff -Nru a/drivers/video/cg6.c b/drivers/video/cg6.c
--- a/drivers/video/cg6.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/video/cg6.c	2005-01-10 20:11:17 -08:00
@@ -689,6 +689,9 @@
 	all->par.physbase = sdev->reg_addrs[0].phys_addr;
 
 	sbusfb_fill_var(&all->info.var, sdev->prom_node, 8);
+	all->info.var.red.length = 8;
+	all->info.var.green.length = 8;
+	all->info.var.blue.length = 8;
 
 	linebytes = prom_getintdefault(sdev->prom_node, "linebytes",
 				       all->info.var.xres);
@@ -732,6 +735,7 @@
 		return;
 	}
 
+	fb_set_cmap(&all->info.cmap, &all->info);
 	cg6_init_fix(&all->info, linebytes);
 
 	if (register_framebuffer(&all->info) < 0) {
diff -Nru a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
--- a/drivers/video/console/fbcon.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/video/console/fbcon.c	2005-01-10 20:11:21 -08:00
@@ -2000,44 +2000,20 @@
 				int blank)
 {
 	if (blank) {
-		if (info->fix.visual == FB_VISUAL_DIRECTCOLOR ||
-		    info->fix.visual == FB_VISUAL_PSEUDOCOLOR) {
-			struct fb_cmap cmap;
-			u16 *black;
-
-			black = kmalloc(sizeof(u16) * info->cmap.len,
-					GFP_KERNEL);
-			if (black) {
-				memset(black, 0, info->cmap.len * sizeof(u16));
-				cmap.red = cmap.green = cmap.blue = black;
-				cmap.transp = info->cmap.transp ? black : NULL;
-				cmap.start = info->cmap.start;
-				cmap.len = info->cmap.len;
-				fb_set_cmap(&cmap, info);
-			}
-
-			kfree(black);
-		} else {
-			unsigned short charmask = vc->vc_hi_font_mask ?
-				0x1ff : 0xff;
-			unsigned short oldc;
-
-			oldc = vc->vc_video_erase_char;
-			vc->vc_video_erase_char &= charmask;
-			fbcon_clear(vc, 0, 0, vc->vc_rows, vc->vc_cols);
-			vc->vc_video_erase_char = oldc;
-		}
-	} else {
-		if (info->fix.visual == FB_VISUAL_DIRECTCOLOR ||
-		    info->fix.visual == FB_VISUAL_PSEUDOCOLOR)
-			fb_set_cmap(&info->cmap, info);
+		unsigned short charmask = vc->vc_hi_font_mask ?
+			0x1ff : 0xff;
+		unsigned short oldc;
+
+		oldc = vc->vc_video_erase_char;
+		vc->vc_video_erase_char &= charmask;
+		fbcon_clear(vc, 0, 0, vc->vc_rows, vc->vc_cols);
+		vc->vc_video_erase_char = oldc;
 	}
 }
 
 static int fbcon_blank(struct vc_data *vc, int blank, int mode_switch)
 {
 	struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]];
-	struct fbcon_ops *ops = info->fbcon_par;
 	int active = !fbcon_is_inactive(vc, info);
 
 	if (mode_switch) {
@@ -2061,19 +2037,21 @@
 	}
 
  	if (active) {
- 		int ret = -1;
+		struct fbcon_ops *ops = info->fbcon_par;
 
  		fbcon_cursor(vc, blank ? CM_ERASE : CM_DRAW);
  		ops->cursor_flash = (!blank);
 
- 		if (info->fbops->fb_blank)
- 			ret = info->fbops->fb_blank(blank, info);
+ 		if (ops->blank_state != blank) {
+ 			if (info->fbops->fb_blank &&
+ 			    info->fbops->fb_blank(blank, info))
+ 				fbcon_generic_blank(vc, info, blank);
 
- 		if (ret)
- 			fbcon_generic_blank(vc, info, blank);
+ 			ops->blank_state = blank;
+ 		}
 
  		if (!blank)
-  			update_screen(vc->vc_num);
+ 			update_screen(vc->vc_num);
  	}
 
  	return 0;
@@ -2580,14 +2558,12 @@
 	struct display *p;
 	int rows, cols;
 
-	if (!ops)
+	if (!ops || ops->currcon < 0 || vt_cons[ops->currcon]->vc_mode !=
+	    KD_TEXT || registered_fb[con2fb_map[ops->currcon]] != info)
 		return;
 
 	vc = vc_cons[ops->currcon].d;
 
-	if (ops->currcon < 0 || vt_cons[ops->currcon]->vc_mode !=
-	    KD_TEXT)
-		return;
 	p = &fb_display[vc->vc_num];
 
 	info->var.xoffset = info->var.yoffset = p->yscroll = 0;
@@ -2665,6 +2641,32 @@
 	return ret;
 }
 
+static void fbcon_fb_blanked(struct fb_info *info, int blank)
+{
+	struct fbcon_ops *ops = info->fbcon_par;
+	int valid = 1;
+
+	if (!ops || ops->currcon < 0 ||
+	    vt_cons[ops->currcon]->vc_mode != KD_TEXT ||
+	    registered_fb[con2fb_map[ops->currcon]] != info)
+		valid = 0;
+
+	if (valid) {
+		struct vc_data *vc;
+
+		vc = vc_cons[ops->currcon].d;
+
+		if (CON_IS_VISIBLE(vc)) {
+			ops->blank_state = blank;
+
+			if (blank)
+				do_blank_screen(0);
+			else
+				do_unblank_screen(0);
+		}
+	}
+}
+
 static int fbcon_event_notify(struct notifier_block *self, 
 			      unsigned long action, void *data)
 {
@@ -2699,6 +2701,9 @@
 	case FB_EVENT_GET_CONSOLE_MAP:
 		con2fb = event->data;
 		con2fb->framebuffer = con2fb_map[con2fb->console - 1];
+		break;
+	case FB_EVENT_BLANK:
+		fbcon_fb_blanked(info, *(int *)event->data);
 		break;
 	}
 
diff -Nru a/drivers/video/console/fbcon.h b/drivers/video/console/fbcon.h
--- a/drivers/video/console/fbcon.h	2005-01-10 20:11:21 -08:00
+++ b/drivers/video/console/fbcon.h	2005-01-10 20:11:21 -08:00
@@ -66,6 +66,7 @@
         int    currcon;	                /* Current VC. */
 	int    cursor_flash;
 	int    cursor_reset;
+	int    blank_state;
 	char  *cursor_data;
 };
     /*
diff -Nru a/drivers/video/console/mdacon.c b/drivers/video/console/mdacon.c
--- a/drivers/video/console/mdacon.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/video/console/mdacon.c	2005-01-10 20:11:19 -08:00
@@ -64,7 +64,6 @@
 
 /* current hardware state */
 
-static int	mda_origin_loc=-1;
 static int	mda_cursor_loc=-1;
 static int	mda_cursor_size_from=-1;
 static int	mda_cursor_size_to=-1;
@@ -79,8 +78,8 @@
 
 static struct vc_data	*mda_display_fg = NULL;
 
-MODULE_PARM(mda_first_vc, "1-255i");
-MODULE_PARM(mda_last_vc,  "1-255i");
+module_param(mda_first_vc, int, 0);
+module_param(mda_last_vc, int, 0);
 
 /* MDA register values
  */
@@ -147,16 +146,6 @@
 	return val;
 }
 #endif
-
-static inline void mda_set_origin(unsigned int location)
-{
-	if (mda_origin_loc == location)
-		return;
-
-	write_mda_w(location >> 1, 0x0c);
-
-	mda_origin_loc = location;
-}
 
 static inline void mda_set_cursor(unsigned int location) 
 {
diff -Nru a/drivers/video/console/sticore.c b/drivers/video/console/sticore.c
--- a/drivers/video/console/sticore.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/video/console/sticore.c	2005-01-10 20:11:17 -08:00
@@ -817,7 +817,7 @@
 	}
 		    
 	memset(sti, 0, sizeof(*sti));
-	sti->lock = SPIN_LOCK_UNLOCKED;
+	spin_lock_init(&sti->lock);
 
 test_rom:
 	/* if we can't read the ROM, bail out early.  Not being able
diff -Nru a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c
--- a/drivers/video/console/vgacon.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/video/console/vgacon.c	2005-01-10 20:11:18 -08:00
@@ -49,6 +49,7 @@
 #include <linux/spinlock.h>
 #include <linux/ioport.h>
 #include <linux/init.h>
+#include <linux/smp_lock.h>
 #include <video/vga.h>
 #include <asm/io.h>
 
@@ -763,6 +764,7 @@
 		charmap += 4 * cmapsz;
 #endif
 
+	unlock_kernel();
 	spin_lock_irq(&vga_lock);
 	/* First, the Sequencer */
 	vga_wseq(state->vgabase, VGA_SEQ_RESET, 0x1);
@@ -848,6 +850,7 @@
 		vga_wattr(state->vgabase, VGA_AR_ENABLE_DISPLAY, 0);	
 	}
 	spin_unlock_irq(&vga_lock);
+	lock_kernel();
 	return 0;
 }
 
diff -Nru a/drivers/video/cyber2000fb.c b/drivers/video/cyber2000fb.c
--- a/drivers/video/cyber2000fb.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/video/cyber2000fb.c	2005-01-10 20:11:17 -08:00
@@ -94,7 +94,7 @@
 
 static char default_font_storage[40];
 static char *default_font = "Acorn8x8";
-MODULE_PARM(default_font, "s");
+module_param(default_font, charp, 0);
 MODULE_PARM_DESC(default_font, "Default font name");
 
 /*
diff -Nru a/drivers/video/fbmem.c b/drivers/video/fbmem.c
--- a/drivers/video/fbmem.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/video/fbmem.c	2005-01-10 20:11:15 -08:00
@@ -715,8 +715,9 @@
 
 		if ((var->activate & FB_ACTIVATE_MASK) == FB_ACTIVATE_NOW) {
 			struct fb_videomode mode;
-			info->var = *var;
+			int err = 0;
 
+			info->var = *var;
 			if (info->fbops->fb_set_par)
 				info->fbops->fb_set_par(info);
 
@@ -728,15 +729,16 @@
 
 			if (info->modelist.prev && info->modelist.next &&
 			    !list_empty(&info->modelist))
-				fb_add_videomode(&mode, &info->modelist);
+				err = fb_add_videomode(&mode, &info->modelist);
 
-			if (info->flags & FBINFO_MISC_MODECHANGEUSER) {
+			if (!err && info->flags & FBINFO_MISC_USEREVENT) {
 				struct fb_event event;
 
-				info->flags &= ~FBINFO_MISC_MODECHANGEUSER;
+				info->flags &= ~FBINFO_MISC_USEREVENT;
 				event.info = info;
 				notifier_call_chain(&fb_notifier_list,
-						    FB_EVENT_MODE_CHANGE, &event);
+						    FB_EVENT_MODE_CHANGE,
+						    &event);
 			}
 		}
 	}
@@ -746,15 +748,23 @@
 int
 fb_blank(struct fb_info *info, int blank)
 {	
-	int err = -EINVAL;
-	
+ 	int ret = -EINVAL;
+
  	if (blank > FB_BLANK_POWERDOWN)
  		blank = FB_BLANK_POWERDOWN;
 
 	if (info->fbops->fb_blank)
- 		err = info->fbops->fb_blank(blank, info);
+ 		ret = info->fbops->fb_blank(blank, info);
 
-	return err;
+ 	if (!ret) {
+		struct fb_event event;
+
+		event.info = info;
+		event.data = &blank;
+		notifier_call_chain(&fb_notifier_list, FB_EVENT_BLANK, &event);
+	}
+
+ 	return ret;
 }
 
 static int 
@@ -782,9 +792,9 @@
 		if (copy_from_user(&var, argp, sizeof(var)))
 			return -EFAULT;
 		acquire_console_sem();
-		info->flags |= FBINFO_MISC_MODECHANGEUSER;
+		info->flags |= FBINFO_MISC_USEREVENT;
 		i = fb_set_var(info, &var);
-		info->flags &= ~FBINFO_MISC_MODECHANGEUSER;
+		info->flags &= ~FBINFO_MISC_USEREVENT;
 		release_console_sem();
 		if (i) return i;
 		if (copy_to_user(argp, &var, sizeof(var)))
@@ -846,7 +856,9 @@
 					   &event);
 	case FBIOBLANK:
 		acquire_console_sem();
+		info->flags |= FBINFO_MISC_USEREVENT;
 		i = fb_blank(info, arg);
+		info->flags &= ~FBINFO_MISC_USEREVENT;
 		release_console_sem();
 		return i;
 	default:
@@ -938,7 +950,8 @@
 	vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
 #elif defined(__hppa__)
 	pgprot_val(vma->vm_page_prot) |= _PAGE_NO_CACHE;
-#elif defined(__ia64__) || defined(__arm__) || defined(__sh__)
+#elif defined(__ia64__) || defined(__arm__) || defined(__sh__) || \
+      defined(__m32r__)
 	vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
 #else
 #warning What do we have to do here??
@@ -1166,7 +1179,7 @@
 	}
 	return 0;
 }
-module_init(fbmem_init);
+subsys_initcall(fbmem_init);
 
 static char *video_options[FB_MAX];
 static int ofonly;
@@ -1224,19 +1237,32 @@
  *
  */
 
+extern const char *global_mode_option;
+
 int __init video_setup(char *options)
 {
-	int i;
+	int i, global = 0;
 
 	if (!options || !*options)
-		return 0;
+ 		global = 1;
+
+ 	if (!global && !strncmp(options, "ofonly", 6)) {
+ 		ofonly = 1;
+ 		global = 1;
+ 	}
+
+ 	if (!global && !strstr(options, "fb:")) {
+ 		global_mode_option = options;
+ 		global = 1;
+ 	}
+
+ 	if (!global) {
+ 		for (i = 0; i < FB_MAX; i++) {
+ 			if (video_options[i] == NULL) {
+ 				video_options[i] = options;
+ 				break;
+ 			}
 
-	for (i = 0; i < FB_MAX; i++) {
-		if (!strncmp(options, "ofonly", 6))
-			ofonly = 1;
-		if (video_options[i] == NULL) {
-			video_options[i] = options;
-			break;
 		}
 	}
 
diff -Nru a/drivers/video/fbmon.c b/drivers/video/fbmon.c
--- a/drivers/video/fbmon.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/video/fbmon.c	2005-01-10 20:11:22 -08:00
@@ -50,6 +50,7 @@
 #endif
 
 #define FBMON_FIX_HEADER 1
+#define FBMON_FIX_INPUT  2
 
 #ifdef CONFIG_FB_MODE_HELPERS
 struct broken_edid {
@@ -60,9 +61,16 @@
 
 static struct broken_edid brokendb[] = {
 	/* DEC FR-PCXAV-YZ */
-	{ .manufacturer = "DEC",
-	  .model        = 0x073a,
-	  .fix          = FBMON_FIX_HEADER,
+	{
+		.manufacturer = "DEC",
+		.model        = 0x073a,
+		.fix          = FBMON_FIX_HEADER,
+	},
+	/* ViewSonic PF775a */
+	{
+		.manufacturer = "VSC",
+		.model        = 0x5a44,
+		.fix          = FBMON_FIX_INPUT,
 	},
 };
 
@@ -81,9 +89,10 @@
   while (i-- && (*--s == 0x20)) *s = 0;
 }
 
-static void fix_broken_edid(unsigned char *edid)
+static void fix_edid(unsigned char *edid)
 {
 	unsigned char *block = edid + ID_MANUFACTURER_NAME, manufacturer[4];
+	unsigned char *b;
 	u32 model, i;
 
 	manufacturer[0] = ((block[0] & 0x7c) >> 2) + '@';
@@ -96,15 +105,25 @@
 	for (i = 0; i < ARRAY_SIZE(brokendb); i++) {
 		if (!strncmp(manufacturer, brokendb[i].manufacturer, 4) &&
 			brokendb[i].model == model) {
+
+			printk("fbmon: The EDID Block of "
+			       "Manufacturer: %s Model: 0x%x is known to "
+			       "be broken,\n",  manufacturer, model);
 			switch (brokendb[i].fix) {
 			case FBMON_FIX_HEADER:
-				printk("fbmon: The EDID header of "
-				       "Manufacturer: %s Model: 0x%x is "
-				       "known to be broken,\n"
-				       "fbmon: trying a header "
-				       "reconstruct\n", manufacturer, model);
+				printk("fbmon: trying a header "
+				       "reconstruct\n");
 				memcpy(edid, edid_v1_header, 8);
 				break;
+			case FBMON_FIX_INPUT:
+				printk("fbmon: trying to fix input type\n");
+				b = edid + EDID_STRUCT_DISPLAY;
+				/* Only if display is GTF capable will
+				   the input type be reset to analog */
+				if (b[4] & 0x01) {
+					b[0] &= ~0x80;
+					edid[127] += 0x80;
+				}
 			}
 		}
 	}
@@ -113,6 +132,9 @@
 static int edid_checksum(unsigned char *edid)
 {
 	unsigned char i, csum = 0, all_null = 0;
+	int err = 0;
+
+	fix_edid(edid);
 
 	for (i = 0; i < EDID_LENGTH; i++) {
 		csum += edid[i];
@@ -121,38 +143,23 @@
 
 	if (csum == 0x00 && all_null) {
 		/* checksum passed, everything's good */
-		return 1;
+		err = 1;
 	}
 
-	fix_broken_edid(edid);
-	csum = all_null = 0;
-	for (i = 0; i < EDID_LENGTH; i++) {
-		csum += edid[i];
-		all_null |= edid[i];
-	}
-	if (csum != 0x00 || !all_null) {
-		printk("EDID checksum failed, aborting\n");
-		return 0;
-	}
-	return 1;
+	return err;
 }
 
 static int edid_check_header(unsigned char *edid)
 {
-	int i, fix = 0;
+	int i, err = 1;
 
-	for (i = 0; i < 8; i++) {
-		if (edid[i] != edid_v1_header[i])
-			fix = 1;
-	}
-	if (!fix)
-		return 1;
+	fix_edid(edid);
 
-	fix_broken_edid(edid);
 	for (i = 0; i < 8; i++) {
 		if (edid[i] != edid_v1_header[i])
-			return 0;
+			err = 0;
 	}
+
 	return 1;
 }
 
diff -Nru a/drivers/video/hgafb.c b/drivers/video/hgafb.c
--- a/drivers/video/hgafb.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/video/hgafb.c	2005-01-10 20:11:21 -08:00
@@ -618,7 +618,7 @@
 MODULE_DESCRIPTION("FBDev driver for Hercules Graphics Adaptor");
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(nologo, "i");
+module_param(nologo, bool, 0);
 MODULE_PARM_DESC(nologo, "Disables startup logo if != 0 (default=0)");
 module_init(hgafb_init);
 
diff -Nru a/drivers/video/i810/i810_accel.c b/drivers/video/i810/i810_accel.c
--- a/drivers/video/i810/i810_accel.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/video/i810/i810_accel.c	2005-01-10 20:11:16 -08:00
@@ -252,49 +252,6 @@
 	end_iring(par);
 }
 
-/**
- * mono_src_copy_blit - color expand from video memory to framebuffer
- * @dwidth: width of destination
- * @dheight: height of destination
- * @dpitch: pixels per line of the buffer
- * @qsize: size of bitmap in quad words
- * @dest: address of first byte of pixel;
- * @rop: raster operation
- * @blit_bpp: pixelformat to use which can be different from the 
- *            framebuffer's pixelformat
- * @src: address of image data
- * @bg: backgound color
- * @fg: forground color
- * @par: pointer to i810fb_par structure
- *
- * DESCRIPTION:
- * A color expand operation where the  source data is in video memory. 
- * Useful for drawing text. 
- *
- * REQUIREMENT:
- * The end of a scanline must be padded to the next word.
- */
-static inline void mono_src_copy_blit(int dwidth, int dheight, int dpitch, 
-				      int qsize, int blit_bpp, int rop, 
-				      int dest, int src, int bg,
-				      int fg, struct fb_info *info)
-{
-	struct i810fb_par *par = (struct i810fb_par *) info->par;
-
-	if (begin_iring(info, 32 + IRING_PAD)) return;
-
-	PUT_RING(BLIT | MONO_SOURCE_COPY_BLIT | 6);
-	PUT_RING(DYN_COLOR_EN | blit_bpp | rop << 16 | dpitch | 1 << 27);
-	PUT_RING(dheight << 16 | dwidth);
-	PUT_RING(dest);
-	PUT_RING(qsize - 1);
-	PUT_RING(src);
-	PUT_RING(bg);
-	PUT_RING(fg);
-
-	end_iring(par);
-}
-
 static inline void load_front(int offset, struct fb_info *info)
 {
 	struct i810fb_par *par = (struct i810fb_par *) info->par;
diff -Nru a/drivers/video/intelfb/intelfbdrv.c b/drivers/video/intelfb/intelfbdrv.c
--- a/drivers/video/intelfb/intelfbdrv.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/video/intelfb/intelfbdrv.c	2005-01-10 20:11:21 -08:00
@@ -1234,8 +1234,7 @@
 static int
 intelfb_set_par(struct fb_info *info)
 {
-	struct intelfb_hwstate hw;
-
+ 	struct intelfb_hwstate *hw;
         struct intelfb_info *dinfo = GET_DINFO(info);
 
 	if (FIXED_MODE(dinfo)) {
@@ -1243,6 +1242,10 @@
 		return -EINVAL;
 	}
 
+ 	hw = kmalloc(sizeof(*hw), GFP_ATOMIC);
+ 	if (!hw)
+ 		return -ENOMEM;
+
 	DBG_MSG("intelfb_set_par (%dx%d-%d)\n", info->var.xres,
 		info->var.yres, info->var.bits_per_pixel);
 
@@ -1251,15 +1254,15 @@
 	if (dinfo->accel)
 		intelfbhw_2d_stop(dinfo);
 
-	hw = dinfo->save_state;
-	if (intelfbhw_mode_to_hw(dinfo, &hw, &info->var))
-		return -EINVAL;
-	if (intelfbhw_program_mode(dinfo, &hw, 0))
-		return -EINVAL;
+ 	memcpy(hw, &dinfo->save_state, sizeof(*hw));
+ 	if (intelfbhw_mode_to_hw(dinfo, hw, &info->var))
+ 		goto invalid_mode;
+ 	if (intelfbhw_program_mode(dinfo, hw, 0))
+ 		goto invalid_mode;
 
 #if REGDUMP > 0
-	intelfbhw_read_hw_state(dinfo, &hw, 0);
-	intelfbhw_print_hw_state(dinfo, &hw);
+ 	intelfbhw_read_hw_state(dinfo, hw, 0);
+ 	intelfbhw_print_hw_state(dinfo, hw);
 #endif
 
 	update_dinfo(dinfo, &info->var);
@@ -1278,7 +1281,11 @@
 	} else {
 		info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
 	}
+	kfree(hw);
 	return 0;
+invalid_mode:
+	kfree(hw);
+	return -EINVAL;
 }
 
 static int
diff -Nru a/drivers/video/matrox/matroxfb_base.c b/drivers/video/matrox/matroxfb_base.c
--- a/drivers/video/matrox/matroxfb_base.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/video/matrox/matroxfb_base.c	2005-01-10 20:11:20 -08:00
@@ -2459,84 +2459,84 @@
 MODULE_DESCRIPTION("Accelerated FBDev driver for Matrox Millennium/Mystique/G100/G200/G400/G450/G550");
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(mem, "i");
+module_param(mem, int, 0);
 MODULE_PARM_DESC(mem, "Size of available memory in MB, KB or B (2,4,8,12,16MB, default=autodetect)");
-MODULE_PARM(disabled, "i");
+module_param(disabled, int, 0);
 MODULE_PARM_DESC(disabled, "Disabled (0 or 1=disabled) (default=0)");
-MODULE_PARM(noaccel, "i");
+module_param(noaccel, int, 0);
 MODULE_PARM_DESC(noaccel, "Do not use accelerating engine (0 or 1=disabled) (default=0)");
-MODULE_PARM(nopan, "i");
+module_param(nopan, int, 0);
 MODULE_PARM_DESC(nopan, "Disable pan on startup (0 or 1=disabled) (default=0)");
-MODULE_PARM(no_pci_retry, "i");
+module_param(no_pci_retry, int, 0);
 MODULE_PARM_DESC(no_pci_retry, "PCI retries enabled (0 or 1=disabled) (default=0)");
-MODULE_PARM(novga, "i");
+module_param(novga, int, 0);
 MODULE_PARM_DESC(novga, "VGA I/O (0x3C0-0x3DF) disabled (0 or 1=disabled) (default=0)");
-MODULE_PARM(nobios, "i");
+module_param(nobios, int, 0);
 MODULE_PARM_DESC(nobios, "Disables ROM BIOS (0 or 1=disabled) (default=do not change BIOS state)");
-MODULE_PARM(noinit, "i");
+module_param(noinit, int, 0);
 MODULE_PARM_DESC(noinit, "Disables W/SG/SD-RAM and bus interface initialization (0 or 1=do not initialize) (default=0)");
-MODULE_PARM(memtype, "i");
+module_param(memtype, int, 0);
 MODULE_PARM_DESC(memtype, "Memory type for G200/G400 (see Documentation/fb/matroxfb.txt for explanation) (default=3 for G200, 0 for G400)");
-MODULE_PARM(mtrr, "i");
+module_param(mtrr, int, 0);
 MODULE_PARM_DESC(mtrr, "This speeds up video memory accesses (0=disabled or 1) (default=1)");
-MODULE_PARM(sgram, "i");
+module_param(sgram, int, 0);
 MODULE_PARM_DESC(sgram, "Indicates that G100/G200/G400 has SGRAM memory (0=SDRAM, 1=SGRAM) (default=0)");
-MODULE_PARM(inv24, "i");
+module_param(inv24, int, 0);
 MODULE_PARM_DESC(inv24, "Inverts clock polarity for 24bpp and loop frequency > 100MHz (default=do not invert polarity)");
-MODULE_PARM(inverse, "i");
+module_param(inverse, int, 0);
 MODULE_PARM_DESC(inverse, "Inverse (0 or 1) (default=0)");
 #ifdef CONFIG_FB_MATROX_MULTIHEAD
-MODULE_PARM(dev, "i");
+module_param(dev, int, 0);
 MODULE_PARM_DESC(dev, "Multihead support, attach to device ID (0..N) (default=all working)");
 #else
-MODULE_PARM(dev, "i");
+module_param(dev, int, 0);
 MODULE_PARM_DESC(dev, "Multihead support, attach to device ID (0..N) (default=first working)");
 #endif
-MODULE_PARM(vesa, "i");
+module_param(vesa, int, 0);
 MODULE_PARM_DESC(vesa, "Startup videomode (0x000-0x1FF) (default=0x101)");
-MODULE_PARM(xres, "i");
+module_param(xres, int, 0);
 MODULE_PARM_DESC(xres, "Horizontal resolution (px), overrides xres from vesa (default=vesa)");
-MODULE_PARM(yres, "i");
+module_param(yres, int, 0);
 MODULE_PARM_DESC(yres, "Vertical resolution (scans), overrides yres from vesa (default=vesa)");
-MODULE_PARM(upper, "i");
+module_param(upper, int, 0);
 MODULE_PARM_DESC(upper, "Upper blank space (scans), overrides upper from vesa (default=vesa)");
-MODULE_PARM(lower, "i");
+module_param(lower, int, 0);
 MODULE_PARM_DESC(lower, "Lower blank space (scans), overrides lower from vesa (default=vesa)");
-MODULE_PARM(vslen, "i");
+module_param(vslen, int, 0);
 MODULE_PARM_DESC(vslen, "Vertical sync length (scans), overrides lower from vesa (default=vesa)");
-MODULE_PARM(left, "i");
+module_param(left, int, 0);
 MODULE_PARM_DESC(left, "Left blank space (px), overrides left from vesa (default=vesa)");
-MODULE_PARM(right, "i");
+module_param(right, int, 0);
 MODULE_PARM_DESC(right, "Right blank space (px), overrides right from vesa (default=vesa)");
-MODULE_PARM(hslen, "i");
+module_param(hslen, int, 0);
 MODULE_PARM_DESC(hslen, "Horizontal sync length (px), overrides hslen from vesa (default=vesa)");
-MODULE_PARM(pixclock, "i");
+module_param(pixclock, int, 0);
 MODULE_PARM_DESC(pixclock, "Pixelclock (ns), overrides pixclock from vesa (default=vesa)");
-MODULE_PARM(sync, "i");
+module_param(sync, int, 0);
 MODULE_PARM_DESC(sync, "Sync polarity, overrides sync from vesa (default=vesa)");
-MODULE_PARM(depth, "i");
+module_param(depth, int, 0);
 MODULE_PARM_DESC(depth, "Color depth (0=text,8,15,16,24,32) (default=vesa)");
-MODULE_PARM(maxclk, "i");
+module_param(maxclk, int, 0);
 MODULE_PARM_DESC(maxclk, "Startup maximal clock, 0-999MHz, 1000-999999kHz, 1000000-INF Hz");
-MODULE_PARM(fh, "i");
+module_param(fh, int, 0);
 MODULE_PARM_DESC(fh, "Startup horizontal frequency, 0-999kHz, 1000-INF Hz");
-MODULE_PARM(fv, "i");
+module_param(fv, int, 0);
 MODULE_PARM_DESC(fv, "Startup vertical frequency, 0-INF Hz\n"
 "You should specify \"fv:max_monitor_vsync,fh:max_monitor_hsync,maxclk:max_monitor_dotclock\"\n");
-MODULE_PARM(grayscale, "i");
+module_param(grayscale, int, 0);
 MODULE_PARM_DESC(grayscale, "Sets display into grayscale. Works perfectly with paletized videomode (4, 8bpp), some limitations apply to 16, 24 and 32bpp videomodes (default=nograyscale)");
-MODULE_PARM(cross4MB, "i");
+module_param(cross4MB, int, 0);
 MODULE_PARM_DESC(cross4MB, "Specifies that 4MB boundary can be in middle of line. (default=autodetected)");
-MODULE_PARM(dfp, "i");
+module_param(dfp, int, 0);
 MODULE_PARM_DESC(dfp, "Specifies whether to use digital flat panel interface of G200/G400 (0 or 1) (default=0)");
-MODULE_PARM(dfp_type, "i");
+module_param(dfp_type, int, 0);
 MODULE_PARM_DESC(dfp_type, "Specifies DFP interface type (0 to 255) (default=read from hardware)");
-MODULE_PARM(outputs, "c8");
+module_param_string(outputs, outputs, sizeof(outputs), 0);
 MODULE_PARM_DESC(outputs, "Specifies which CRTC is mapped to which output (string of up to three letters, consisting of 0 (disabled), 1 (CRTC1), 2 (CRTC2)) (default=111 for Gx50, 101 for G200/G400 with DFP, and 100 for all other devices)");
 #ifdef CONFIG_PPC_PMAC
-MODULE_PARM(vmode, "i");
+module_param(vmode, int, 0);
 MODULE_PARM_DESC(vmode, "Specify the vmode mode number that should be used (640x480 default)");
-MODULE_PARM(cmode, "i");
+module_param(cmode, int, 0);
 MODULE_PARM_DESC(cmode, "Specify the video depth that should be used (8bit default)");
 #endif
 
diff -Nru a/drivers/video/matrox/matroxfb_crtc2.c b/drivers/video/matrox/matroxfb_crtc2.c
--- a/drivers/video/matrox/matroxfb_crtc2.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/video/matrox/matroxfb_crtc2.c	2005-01-10 20:11:21 -08:00
@@ -21,7 +21,7 @@
 
 static int mem = 8192;
 
-MODULE_PARM(mem, "i");
+module_param(mem, int, 0);
 MODULE_PARM_DESC(mem, "Memory size reserved for dualhead (default=8MB)");
 
 /* **************************************************** */
diff -Nru a/drivers/video/modedb.c b/drivers/video/modedb.c
--- a/drivers/video/modedb.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/video/modedb.c	2005-01-10 20:11:18 -08:00
@@ -29,9 +29,7 @@
 #define DPRINTK(fmt, args...)
 #endif
 
-
-const char *global_mode_option = NULL;
-
+const char *global_mode_option;
 
     /*
      *  Standard video mode definitions (taken from XFree86)
diff -Nru a/drivers/video/neofb.c b/drivers/video/neofb.c
--- a/drivers/video/neofb.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/video/neofb.c	2005-01-10 20:11:20 -08:00
@@ -152,11 +152,6 @@
 };
 #endif
 
-static inline u32 read_le32(int regindex, const struct neofb_par *par)
-{
-	return readl(par->neo2200 + par->cursorOff + regindex);
-}
-
 static inline void write_le32(int regindex, u32 val, const struct neofb_par *par)
 {
 	writel(val, par->neo2200 + par->cursorOff + regindex);
diff -Nru a/drivers/video/pm2fb.c b/drivers/video/pm2fb.c
--- a/drivers/video/pm2fb.c	2005-01-10 20:11:23 -08:00
+++ b/drivers/video/pm2fb.c	2005-01-10 20:11:23 -08:00
@@ -11,11 +11,11 @@
  * and additional input from James Simmon's port of Hannu Mallat's tdfx
  * driver.
  *
- * $Id$
- *
- * I have a Creative Graphics Blaster Exxtreme card - pm2fb on x86.
- * I have no access to other pm2fb implementations, and cannot test
- * on them. Therefore for now I am omitting Sparc and CVision code.
+ * I have a Creative Graphics Blaster Exxtreme card - pm2fb on x86.  I
+ * have no access to other pm2fb implementations. Sparc (and thus
+ * hopefully other big-endian) devices now work, thanks to a lot of
+ * testing work by Ron Murray. I have no access to CVision hardware,
+ * and therefore for now I am omitting the CVision code.
  *
  * Multiple boards support has been on the TODO list for ages.
  * Don't expect this to change.
@@ -29,6 +29,7 @@
 
 #include <linux/config.h>
 #include <linux/module.h>
+#include <linux/moduleparam.h>
 #include <linux/kernel.h>
 #include <linux/errno.h>
 #include <linux/string.h>
@@ -47,10 +48,6 @@
 #error	"The endianness of the target host has not been defined."
 #endif
 
-#if defined(__BIG_ENDIAN) && !defined(__sparc__)
-#define PM2FB_BE_APERTURE
-#endif
-
 #if !defined(CONFIG_PCI)
 #error "Only generic PCI cards supported."
 #endif
@@ -63,16 +60,6 @@
 #endif
 
 /*
- * The 2.4 driver calls reset_card() at init time, where it also sets the
- * initial mode. I don't think the driver should touch the chip until
- * the console sets a video mode. So I was calling this at the start
- * of setting a mode. However, certainly on 1280x1024 depth 16 on my
- * PCI Graphics Blaster Exxtreme this causes the display to smear
- * slightly.  I don't know why. Guesses to jim.hague@acm.org.
- */
-#undef RESET_CARD_ON_MODE_SET
-
-/*
  * Driver data 
  */
 static char *mode __initdata = NULL;
@@ -101,6 +88,9 @@
 	unsigned char	__iomem *v_regs;/* virtual address of p_regs */
 	u32 	   	memclock;	/* memclock */
 	u32		video;		/* video flags before blanking */
+	u32		mem_config;	/* MemConfig reg at probe */
+	u32		mem_control;	/* MemControl reg at probe */
+	u32		boot_address;	/* BootAddress reg at probe */
 };
 
 /*
@@ -118,8 +108,7 @@
 };
 
 /*
- * Default video mode. In case the modedb doesn't work, or we're
- * a module (in which case modedb doesn't really work).
+ * Default video mode. In case the modedb doesn't work.
  */
 static struct fb_var_screeninfo pm2fb_var __initdata = {
 	/* "640x480, 8 bpp @ 60 Hz */
@@ -201,13 +190,6 @@
 	pm2_WR(p, index, v);
 }
 
-inline static u32 pm2v_RDAC_RD(struct pm2fb_par* p, s32 idx)
-{
-	pm2_WR(p, PM2VR_RD_INDEX_LOW, idx & 0xff);
-	mb();
-	return pm2_RD(p, PM2VR_RD_INDEXED_DATA);
-}
-
 inline static void pm2v_RDAC_WR(struct pm2fb_par* p, s32 idx, u32 v)
 {
 	pm2_WR(p, PM2VR_RD_INDEX_LOW, idx & 0xff);
@@ -350,7 +332,6 @@
 	}
 }
 
-#ifdef RESET_CARD_ON_MODE_SET
 static void reset_card(struct pm2fb_par* p)
 {
 	if (p->type == PM2_TYPE_PERMEDIA2V)
@@ -365,8 +346,14 @@
 	pm2_WR(p, PM2R_FIFO_DISCON, 1);
 	mb();
 #endif
+
+	/* Restore stashed memory config information from probe */
+	WAIT_FIFO(p, 3);
+	pm2_WR(p, PM2R_MEM_CONTROL, p->mem_control);
+	pm2_WR(p, PM2R_BOOT_ADDRESS, p->boot_address);
+	wmb();
+	pm2_WR(p, PM2R_MEM_CONFIG, p->mem_config);
 }
-#endif
 
 static void reset_config(struct pm2fb_par* p)
 {
@@ -426,27 +413,36 @@
 
 static void set_aperture(struct pm2fb_par* p, u32 depth)
 {
+	/*
+	 * The hardware is little-endian. When used in big-endian
+	 * hosts, the on-chip aperture settings are used where
+	 * possible to translate from host to card byte order.
+	 */
 	WAIT_FIFO(p, 4);
 #ifdef __LITTLE_ENDIAN
-	pm2_WR(p, PM2R_APERTURE_ONE, 0);
-	pm2_WR(p, PM2R_APERTURE_TWO, 0);
+	pm2_WR(p, PM2R_APERTURE_ONE, PM2F_APERTURE_STANDARD);
 #else
 	switch (depth) {
-	case 8:
-	case 24:
-		pm2_WR(p, PM2R_APERTURE_ONE, 0);
-		pm2_WR(p, PM2R_APERTURE_TWO, 1);
+	case 24:	/* RGB->BGR */
+		/*
+		 * We can't use the aperture to translate host to
+		 * card byte order here, so we switch to BGR mode
+		 * in pm2fb_set_par().
+		 */
+	case 8:		/* B->B */
+		pm2_WR(p, PM2R_APERTURE_ONE, PM2F_APERTURE_STANDARD);
 		break;
-	case 16:
-		pm2_WR(p, PM2R_APERTURE_ONE, 2);
-		pm2_WR(p, PM2R_APERTURE_TWO, 1);
+	case 16:	/* HL->LH */
+		pm2_WR(p, PM2R_APERTURE_ONE, PM2F_APERTURE_HALFWORDSWAP);
 		break;
-	case 32:
-		pm2_WR(p, PM2R_APERTURE_ONE, 1);
-		pm2_WR(p, PM2R_APERTURE_TWO, 1);
+	case 32:	/* RGBA->ABGR */
+		pm2_WR(p, PM2R_APERTURE_ONE, PM2F_APERTURE_BYTESWAP);
 		break;
 	}
 #endif
+
+	// We don't use aperture two, so this may be superflous
+	pm2_WR(p, PM2R_APERTURE_TWO, PM2F_APERTURE_STANDARD);
 }
 
 static void set_color(struct pm2fb_par* p, unsigned char regno,
@@ -462,6 +458,28 @@
 	pm2_WR(p, PM2R_RD_PALETTE_DATA, b);
 }
 
+static void set_memclock(struct pm2fb_par* par, u32 clk)
+{
+	int i;
+	unsigned char m, n, p;
+
+	pm2_mnp(clk, &m, &n, &p);
+	WAIT_FIFO(par, 10);
+	pm2_RDAC_WR(par, PM2I_RD_MEMORY_CLOCK_3, 6);
+	wmb();
+	pm2_RDAC_WR(par, PM2I_RD_MEMORY_CLOCK_1, m);
+	pm2_RDAC_WR(par, PM2I_RD_MEMORY_CLOCK_2, n);
+	wmb();
+	pm2_RDAC_WR(par, PM2I_RD_MEMORY_CLOCK_3, 8|p);
+	wmb();
+	pm2_RDAC_RD(par, PM2I_RD_MEMORY_CLOCK_STATUS);
+	rmb();
+	for (i = 256;
+	     i && !(pm2_RD(par, PM2R_RD_INDEXED_DATA) & PM2F_PLL_LOCKED);
+	     i--)
+		;
+}
+
 static void set_pixclock(struct pm2fb_par* par, u32 clk)
 {
 	int i;
@@ -618,15 +636,23 @@
 		var->blue.offset  = 0;
 		var->blue.length  = 5;
 		break;
-	case 24:
+	case 32:
+		var->transp.offset = 24;
+		var->transp.length = 8;
 		var->red.offset	  = 16;
 		var->green.offset = 8;
 		var->blue.offset  = 0;
 		var->red.length = var->green.length = var->blue.length = 8;
-	case 32:
+		break;
+	case 24:
+#ifdef __BIG_ENDIAN
+		var->red.offset   = 0;
+		var->blue.offset  = 16;
+#else
 		var->red.offset   = 16;
-		var->green.offset = 8;
 		var->blue.offset  = 0;
+#endif
+		var->green.offset = 8;
 		var->red.length = var->green.length = var->blue.length = 8;
 		break;
 	}
@@ -656,18 +682,18 @@
 	u32 stride;
 	u32 base;
 	u32 video = 0;
-	u32 clrmode = PM2F_RD_COLOR_MODE_RGB;
+	u32 clrmode = PM2F_RD_COLOR_MODE_RGB | PM2F_RD_GUI_ACTIVE;
 	u32 txtmap = 0;
 	u32 pixsize = 0;
 	u32 clrformat = 0;
 	u32 xres;
 	int data64;
 
-#ifdef RESET_CARD_ON_MODE_SET
 	reset_card(par);
-#endif
 	reset_config(par);
 	clear_palette(par);
+	if ( par->memclock )
+		set_memclock(par, par->memclock);
     
 	width = (info->var.xres_virtual + 7) & ~7;
 	height = info->var.yres_virtual;
@@ -751,24 +777,21 @@
 		break;
 	case 16:
 		pm2_WR(par, PM2R_FB_READ_PIXEL, 1);
-		clrmode |= PM2F_RD_TRUECOLOR | 0x06;
+		clrmode |= PM2F_RD_TRUECOLOR | PM2F_RD_PIXELFORMAT_RGB565;
 		txtmap = PM2F_TEXTEL_SIZE_16;
 		pixsize = 1;
 		clrformat = 0x70;
 		break;
 	case 32:
 		pm2_WR(par, PM2R_FB_READ_PIXEL, 2);
-		clrmode |= PM2F_RD_TRUECOLOR | 0x08;
+		clrmode |= PM2F_RD_TRUECOLOR | PM2F_RD_PIXELFORMAT_RGBA8888;
 		txtmap = PM2F_TEXTEL_SIZE_32;
 		pixsize = 2;
 		clrformat = 0x20;
 		break;
 	case 24:
 		pm2_WR(par, PM2R_FB_READ_PIXEL, 4);
-		clrmode |= PM2F_RD_TRUECOLOR | 0x09;
-#ifndef PM2FB_BE_APERTURE
-		clrmode &= ~PM2F_RD_COLOR_MODE_RGB;
-#endif
+		clrmode |= PM2F_RD_TRUECOLOR | PM2F_RD_PIXELFORMAT_RGB888;
 		txtmap = PM2F_TEXTEL_SIZE_24;
 		pixsize = 4;
 		clrformat = 0x20;
@@ -799,8 +822,7 @@
 	WAIT_FIFO(par, 4);
 	switch (par->type) {
 	case PM2_TYPE_PERMEDIA2:
-		pm2_RDAC_WR(par, PM2I_RD_COLOR_MODE,
-			    PM2F_RD_COLOR_MODE_RGB | PM2F_RD_GUI_ACTIVE | clrmode);
+		pm2_RDAC_WR(par, PM2I_RD_COLOR_MODE, clrmode);
 		break;
 	case PM2_TYPE_PERMEDIA2V:
 		pm2v_RDAC_WR(par, PM2VI_RD_PIXEL_SIZE, pixsize);
@@ -1034,7 +1056,6 @@
 	struct pm2fb_par *default_par;
 	struct fb_info *info;
 	int size, err;
-	u32 pci_mem_config;
 	int err_retval = -ENXIO;
 
 	err = pci_enable_device(pdev);
@@ -1067,9 +1088,15 @@
 	pm2fb_fix.mmio_start = pci_resource_start(pdev, 0);
 	pm2fb_fix.mmio_len = PM2_REGS_SIZE;
 
-#ifdef PM2FB_BE_APERTURE
+#if defined(__BIG_ENDIAN)
+	/*
+	 * PM2 has a 64k register file, mapped twice in 128k. Lower
+	 * map is little-endian, upper map is big-endian.
+	 */
 	pm2fb_fix.mmio_start += PM2_REGS_SIZE;
+	DPRINTK("Adjusting register base for big-endian.\n");
 #endif
+	DPRINTK("Register base at 0x%lx\n", pm2fb_fix.mmio_start);
     
 	/* Registers - request region and map it. */
 	if ( !request_mem_region(pm2fb_fix.mmio_start, pm2fb_fix.mmio_len,
@@ -1086,9 +1113,16 @@
 		goto err_exit_neither;
 	}
 
+	/* Stash away memory register info for use when we reset the board */
+	default_par->mem_control = pm2_RD(default_par, PM2R_MEM_CONTROL);
+	default_par->boot_address = pm2_RD(default_par, PM2R_BOOT_ADDRESS);
+	default_par->mem_config = pm2_RD(default_par, PM2R_MEM_CONFIG);
+	DPRINTK("MemControl 0x%x BootAddress 0x%x MemConfig 0x%x\n",
+		default_par->mem_control, default_par->boot_address,
+		default_par->mem_config);
+
 	/* Now work out how big lfb is going to be. */
-	pci_mem_config = RD32(default_par->v_regs, PM2R_MEM_CONFIG);
-	switch(pci_mem_config & PM2F_MEM_CONFIG_RAM_MASK) {
+	switch(default_par->mem_config & PM2F_MEM_CONFIG_RAM_MASK) {
 	case PM2F_MEM_BANKS_1:
 		default_par->fb_size=0x200000;
 		break;
@@ -1126,13 +1160,11 @@
 	info->flags		= FBINFO_DEFAULT |
                                   FBINFO_HWACCEL_YPAN;
 
-#ifndef MODULE
 	if (!mode)
 		mode = "640x480@60";
 	 
 	err = fb_find_mode(&info->var, info, mode, NULL, 0, NULL, 8); 
 	if (!err || err == 4)
-#endif
 		info->var = pm2fb_var;
 
 	if (fb_alloc_cmap(&info->cmap, 256, 0) < 0)
@@ -1230,6 +1262,7 @@
 	return pci_module_init(&pm2fb_driver);
 }
 
+#ifdef MODULE
 /*
  *  Cleanup
  */
@@ -1238,11 +1271,13 @@
 {
 	pci_unregister_driver(&pm2fb_driver);
 }
+#endif
 
 /*
  *  Setup
  */
 
+#ifndef MODULE
 /**
  * Parse user speficied options.
  *
@@ -1268,6 +1303,7 @@
 	}
 	return 0;
 }
+#endif
 
 
 /* ------------------------------------------------------------------------- */
@@ -1277,12 +1313,18 @@
 
 
 module_init(pm2fb_init);
+
+#ifdef MODULE
 module_exit(pm2fb_exit);
 
-MODULE_PARM(mode,"s");
-MODULE_PARM(lowhsync,"i");
-MODULE_PARM(lowvsync,"i");
+module_param(mode, charp, 0);
+MODULE_PARM_DESC(mode, "Preferred video mode e.g. '648x480-8@60'");
+module_param(lowhsync, bool, 0);
+MODULE_PARM_DESC(lowhsync, "Force horizontal sync low regardless of mode");
+module_param(lowvsync, bool, 0);
+MODULE_PARM_DESC(lowvsync, "Force vertical sync low regardless of mode");
 
 MODULE_AUTHOR("Jim Hague <jim.hague@acm.org>");
 MODULE_DESCRIPTION("Permedia2 framebuffer device driver");
 MODULE_LICENSE("GPL");
+#endif
diff -Nru a/drivers/video/pxafb.c b/drivers/video/pxafb.c
--- a/drivers/video/pxafb.c	2005-01-10 20:11:18 -08:00
+++ b/drivers/video/pxafb.c	2005-01-10 20:11:18 -08:00
@@ -394,6 +394,20 @@
 	return 0;
 }
 
+static int pxafb_mmap(struct fb_info *info, struct file *file,
+		      struct vm_area_struct *vma)
+{
+	struct pxafb_info *fbi = (struct pxafb_info *)info;
+	unsigned long off = vma->vm_pgoff << PAGE_SHIFT;
+
+	if (off < info->fix.smem_len) {
+		vma->vm_pgoff += 1;
+		return dma_mmap_writecombine(fbi->dev, vma, fbi->map_cpu,
+					     fbi->map_dma, fbi->map_size);
+	}
+	return -EINVAL;
+}
+
 static struct fb_ops pxafb_ops = {
 	.owner		= THIS_MODULE,
 	.fb_check_var	= pxafb_check_var,
@@ -404,6 +418,7 @@
 	.fb_imageblit	= cfb_imageblit,
 	.fb_blank	= pxafb_blank,
 	.fb_cursor	= soft_cursor,
+	.fb_mmap	= pxafb_mmap,
 };
 
 /*
diff -Nru a/drivers/video/radeonfb.c b/drivers/video/radeonfb.c
--- a/drivers/video/radeonfb.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/video/radeonfb.c	2005-01-10 20:11:22 -08:00
@@ -621,30 +621,6 @@
 #define radeon_engine_reset()		_radeon_engine_reset(rinfo)
 
 
-static __inline__ u8 radeon_get_post_div_bitval(int post_div)
-{
-        switch (post_div) {
-                case 1:
-                        return 0x00;
-                case 2: 
-                        return 0x01;
-                case 3: 
-                        return 0x04;
-                case 4:
-                        return 0x02;
-                case 6:
-                        return 0x06;
-                case 8:
-                        return 0x03;
-                case 12:
-                        return 0x07;
-                default:
-                        return 0x02;
-        }
-}
-
-
-
 static __inline__ int round_div(int num, int den)
 {
         return (num + (den / 2)) / den;
diff -Nru a/drivers/video/riva/fbdev.c b/drivers/video/riva/fbdev.c
--- a/drivers/video/riva/fbdev.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/video/riva/fbdev.c	2005-01-10 20:11:21 -08:00
@@ -152,6 +152,9 @@
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
 	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_440,
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+	// NF2/IGP version, GeForce 4 MX, NV18
+	{ PCI_VENDOR_ID_NVIDIA, 0x01f0,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
 	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_420,
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
 	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_440_GO,
@@ -1769,17 +1772,19 @@
 static int __devinit riva_get_EDID_i2c(struct fb_info *info)
 {
 	struct riva_par *par = (struct riva_par *) info->par;
+	struct fb_var_screeninfo var;
 	int i;
 
 	NVTRACE_ENTER();
 	riva_create_i2c_busses(par);
-	for (i = par->bus; i >= 1; i--) {
-		riva_probe_i2c_connector(par, i, &par->EDID);
-		if (par->EDID) {
+	for (i = 0; i < par->bus; i++) {
+		riva_probe_i2c_connector(par, i+1, &par->EDID);
+		if (par->EDID && !fb_parse_edid(par->EDID, &var)) {
 			printk(PFX "Found EDID Block from BUS %i\n", i);
 			break;
 		}
 	}
+
 	NVTRACE_LEAVE();
 	return (par->EDID) ? 1 : 0;
 }
diff -Nru a/drivers/video/riva/rivafb-i2c.c b/drivers/video/riva/rivafb-i2c.c
--- a/drivers/video/riva/rivafb-i2c.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/video/riva/rivafb-i2c.c	2005-01-10 20:11:19 -08:00
@@ -19,6 +19,7 @@
 #include <linux/delay.h>
 #include <linux/pci.h>
 #include <linux/fb.h>
+#include <linux/jiffies.h>
 
 #include <asm/io.h>
 
@@ -106,8 +107,7 @@
 	chan->algo.getsda		= riva_gpio_getsda;
 	chan->algo.getscl		= riva_gpio_getscl;
 	chan->algo.udelay		= 40;
-	chan->algo.mdelay               = 5;
-	chan->algo.timeout		= 20;
+	chan->algo.timeout		= msecs_to_jiffies(2);
 	chan->algo.data 		= chan;
 
 	i2c_set_adapdata(&chan->adapter, chan);
@@ -127,39 +127,18 @@
 
 void riva_create_i2c_busses(struct riva_par *par)
 {
+	par->bus = 3;
+
 	par->chan[0].par	= par;
 	par->chan[1].par	= par;
 	par->chan[2].par        = par;
 
-	par->bus = 0;
-
-	switch ((par->pdev->device >> 4) & 0xff) {
-	case 0x17:
-	case 0x18:
-	case 0x25:
-	case 0x28:
-	case 0x30:
-	case 0x31:
-	case 0x32:
-	case 0x33:
-	case 0x34:
-		par->chan[2].ddc_base   = 0x50;
-		par->bus++;
-		riva_setup_i2c_bus(&par->chan[2], "BUS3");
-	case 0x04:
-	case 0x05:
-	case 0x10:
-	case 0x11:
-	case 0x15:
-	case 0x20:
-		par->chan[1].ddc_base	= 0x36;
-		par->bus++;
-		riva_setup_i2c_bus(&par->chan[1], "BUS2");
-	case 0x03:
-		par->chan[0].ddc_base	= 0x3e;
-		par->bus++;
-		riva_setup_i2c_bus(&par->chan[0], "BUS1");
-	}
+	par->chan[0].ddc_base = 0x3e;
+	par->chan[1].ddc_base = 0x36;
+	par->chan[2].ddc_base = 0x50;
+	riva_setup_i2c_bus(&par->chan[0], "BUS1");
+	riva_setup_i2c_bus(&par->chan[1], "BUS2");
+	riva_setup_i2c_bus(&par->chan[2], "BUS3");
 }
 
 void riva_delete_i2c_busses(struct riva_par *par)
@@ -172,6 +151,9 @@
 		i2c_bit_del_bus(&par->chan[1].adapter);
 	par->chan[1].par = NULL;
 
+	if (par->chan[2].par)
+		i2c_bit_del_bus(&par->chan[2].adapter);
+	par->chan[2].par = NULL;
 }
 
 static u8 *riva_do_probe_i2c_edid(struct riva_i2c_chan *chan)
diff -Nru a/drivers/video/sa1100fb.c b/drivers/video/sa1100fb.c
--- a/drivers/video/sa1100fb.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/video/sa1100fb.c	2005-01-10 20:11:17 -08:00
@@ -393,7 +393,7 @@
 	.left_margin	= 2,		.upper_margin	= 0,
 	.right_margin	= 1,		.lower_margin	= 0,
 
-	.sync		= FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, 
+	.sync		= FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
 
 	.lccr0		= LCCR0_Color | LCCR0_Dual | LCCR0_Pas,
 	.lccr3		= LCCR3_ACBsDiv(512),
@@ -814,6 +814,33 @@
 	return 0;
 }
 
+static int sa1100fb_mmap(struct fb_info *info, struct file *file,
+			 struct vm_area_struct *vma)
+{
+	struct sa1100fb_info *fbi = (struct sa1100fb_info *)info;
+	unsigned long start, len, off = vma->vm_pgoff << PAGE_SHIFT;
+
+	if (off < info->fix.smem_len) {
+		vma->vm_pgoff += 1; /* skip over the palette */
+		return dma_mmap_writecombine(fbi->dev, vma, fbi->map_cpu,
+					     fbi->map_dma, fbi->map_size);
+	}
+
+	start = info->fix.mmio_start;
+	len = PAGE_ALIGN((start & ~PAGE_MASK) + info->fix.mmio_len);
+
+	if ((vma->vm_end - vma->vm_start + off) > len)
+		return -EINVAL;
+
+	off += start & PAGE_MASK;
+	vma->vm_pgoff = off >> PAGE_SHIFT;
+	vma->vm_flags |= VM_IO;
+	vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
+	return io_remap_page_range(vma, vma->vm_start, off,
+				   vma->vm_end - vma->vm_start,
+				   vma->vm_page_prot);
+}
+
 static struct fb_ops sa1100fb_ops = {
 	.owner		= THIS_MODULE,
 	.fb_check_var	= sa1100fb_check_var,
@@ -825,6 +852,7 @@
 	.fb_imageblit	= cfb_imageblit,
 	.fb_blank	= sa1100fb_blank,
 	.fb_cursor	= soft_cursor,
+	.fb_mmap	= sa1100fb_mmap,
 };
 
 /*
@@ -1024,7 +1052,7 @@
 	if (machine_is_shannon()) {
 		GPDR |= SHANNON_GPIO_DISP_EN;
 		GPSR |= SHANNON_GPIO_DISP_EN;
-	}	
+	}
 
 	DPRINTK("DBAR1 = 0x%08x\n", DBAR1);
 	DPRINTK("DBAR2 = 0x%08x\n", DBAR2);
diff -Nru a/drivers/video/savage/savagefb-i2c.c b/drivers/video/savage/savagefb-i2c.c
--- a/drivers/video/savage/savagefb-i2c.c	2005-01-10 20:11:21 -08:00
+++ b/drivers/video/savage/savagefb-i2c.c	2005-01-10 20:11:21 -08:00
@@ -163,12 +163,15 @@
 		udelay(20);
 
 		rc = add_bus(&chan->adapter);
+
 		if (rc == 0)
 			dev_dbg(&chan->par->pcidev->dev,
 				"I2C bus %s registered.\n", name);
 		else
 			dev_warn(&chan->par->pcidev->dev,
 				 "Failed to register I2C bus %s.\n", name);
+
+		symbol_put(i2c_bit_add_bus);
 	} else
 		chan->par = NULL;
 
@@ -212,8 +215,10 @@
 	int (*del_bus)(struct i2c_adapter *) =
 		symbol_get(i2c_bit_del_bus);
 
-	if (del_bus && par->chan.par)
+	if (del_bus && par->chan.par) {
 		del_bus(&par->chan.adapter);
+		symbol_put(i2c_bit_del_bus);
+	}
 
 	par->chan.par = NULL;
 }
@@ -239,6 +244,7 @@
 
 	if (transfer && chan->par) {
 		buf = kmalloc(EDID_LENGTH, GFP_KERNEL);
+
 		if (buf) {
 			msgs[1].buf = buf;
 
@@ -249,6 +255,8 @@
 				buf = NULL;
 			}
 		}
+
+		symbol_put(i2c_transfer);
 	}
 
 	return buf;
diff -Nru a/drivers/video/sis/300vtbl.h b/drivers/video/sis/300vtbl.h
--- a/drivers/video/sis/300vtbl.h	2005-01-10 20:11:16 -08:00
+++ b/drivers/video/sis/300vtbl.h	2005-01-10 20:11:16 -08:00
@@ -35,7 +35,7 @@
  * * 3) The name of the author may not be used to endorse or promote products
  * *    derived from this software without specific prior written permission.
  * *
- * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESSED OR
+ * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  * * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  * * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
@@ -80,12 +80,12 @@
 	{0x2e,0x0a1b,0x0101,SIS_RI_640x480,  0x00,0x00,0x00,0x00,0x08,-1},
 	{0x2f,0x021b,0x0100,SIS_RI_640x400,  0x00,0x00,0x00,0x00,0x10,-1},  /* 640x400x8 */
 	{0x30,0x2a1b,0x0103,SIS_RI_800x600,  0x00,0x00,0x00,0x00,0x00,-1},
-	{0x31,0x0a1b,0x0000,SIS_RI_720x480,  0x00,0x00,0x00,0x00,0x11,-1},  /* 720x480x8 */
-	{0x32,0x2a1b,0x0000,SIS_RI_720x576,  0x00,0x00,0x00,0x00,0x12,-1},  /* 720x576x8 */
-	{0x33,0x0a1d,0x0000,SIS_RI_720x480,  0x00,0x00,0x00,0x00,0x11,-1},  /* 720x480x16 */
-	{0x34,0x2a1d,0x0000,SIS_RI_720x576,  0x00,0x00,0x00,0x00,0x12,-1},  /* 720x576x16 */
-	{0x35,0x0a1f,0x0000,SIS_RI_720x480,  0x00,0x00,0x00,0x00,0x11,-1},  /* 720x480x32 */
-	{0x36,0x2a1f,0x0000,SIS_RI_720x576,  0x00,0x00,0x00,0x00,0x12,-1},  /* 720x576x32 */
+	{0x31,0x4a1b,0x0000,SIS_RI_720x480,  0x00,0x00,0x00,0x00,0x11,-1},  /* 720x480x8 */
+	{0x32,0x6a1b,0x0000,SIS_RI_720x576,  0x00,0x00,0x00,0x00,0x12,-1},  /* 720x576x8 */
+	{0x33,0x4a1d,0x0000,SIS_RI_720x480,  0x00,0x00,0x00,0x00,0x11,-1},  /* 720x480x16 */
+	{0x34,0x6a1d,0x0000,SIS_RI_720x576,  0x00,0x00,0x00,0x00,0x12,-1},  /* 720x576x16 */
+	{0x35,0x4a1f,0x0000,SIS_RI_720x480,  0x00,0x00,0x00,0x00,0x11,-1},  /* 720x480x32 */
+	{0x36,0x6a1f,0x0000,SIS_RI_720x576,  0x00,0x00,0x00,0x00,0x12,-1},  /* 720x576x32 */
 	{0x37,0x0212,0x0104,SIS_RI_1024x768, 0x00,0x00,0x00,0x00,0x13,-1},  /* 1024x768x? */
 	{0x38,0x0a1b,0x0105,SIS_RI_1024x768, 0x00,0x00,0x00,0x00,0x13,-1},  /* 1024x768x8 */
 	{0x3a,0x0e3b,0x0107,SIS_RI_1280x1024,0x00,0x00,0x00,0x00,0x1a,-1},  /* 1280x1024x8 */
@@ -121,48 +121,48 @@
 	{0x6b,0x07ff,0x0000,SIS_RI_1920x1440,0x00,0x00,0x00,0x00,0x27,-1},
 	{0x6c,0x067b,0x0000,SIS_RI_2048x1536,0x00,0x00,0x00,0x00,0x28,-1},  /* 2048x1536x8 - not in BIOS! */
 	{0x6d,0x06fd,0x0000,SIS_RI_2048x1536,0x00,0x00,0x00,0x00,0x28,-1},  /* 2048x1536x16 - not in BIOS! */
-	{0x70,0x2a1b,0x0000,SIS_RI_800x480,  0x00,0x00,0x07,0x00,0x2d,-1},  /* 800x480x8 */
-	{0x71,0x0a1b,0x0000,SIS_RI_1024x576, 0x00,0x00,0x00,0x00,0x30,-1},  /* 1024x576x8 */
-	{0x74,0x0a1d,0x0000,SIS_RI_1024x576, 0x00,0x00,0x00,0x00,0x30,-1},  /* 1024x576x16 */
+	{0x70,0x6a1b,0x0000,SIS_RI_800x480,  0x00,0x00,0x07,0x00,0x2d,-1},  /* 800x480x8 */
+	{0x71,0x4a1b,0x0000,SIS_RI_1024x576, 0x00,0x00,0x00,0x00,0x30,-1},  /* 1024x576x8 */
+	{0x74,0x4a1d,0x0000,SIS_RI_1024x576, 0x00,0x00,0x00,0x00,0x30,-1},  /* 1024x576x16 */
 	{0x75,0x0e3d,0x0000,SIS_RI_1280x720, 0x00,0x00,0x00,0x00,0x33,-1},  /* 1280x720x16 */
-	{0x76,0x2a1f,0x0000,SIS_RI_800x480,  0x00,0x00,0x07,0x00,0x2d,-1},  /* 800x480x32 */
-	{0x77,0x0a3f,0x0000,SIS_RI_1024x576, 0x00,0x00,0x00,0x00,0x30,-1},  /* 1024x576x32 */
+	{0x76,0x6a1f,0x0000,SIS_RI_800x480,  0x00,0x00,0x07,0x00,0x2d,-1},  /* 800x480x32 */
+	{0x77,0x4a3f,0x0000,SIS_RI_1024x576, 0x00,0x00,0x00,0x00,0x30,-1},  /* 1024x576x32 */
 	{0x78,0x0eff,0x0000,SIS_RI_1280x720, 0x00,0x00,0x00,0x00,0x33,-1},  /* 1280x720x32 */
 	{0x79,0x0e3b,0x0000,SIS_RI_1280x720, 0x00,0x00,0x00,0x00,0x33,-1},  /* 1280x720x8 */
-	{0x7a,0x2a1d,0x0000,SIS_RI_800x480,  0x00,0x00,0x07,0x00,0x2d,-1},  /* 800x480x16 */
+	{0x7a,0x6a1d,0x0000,SIS_RI_800x480,  0x00,0x00,0x07,0x00,0x2d,-1},  /* 800x480x16 */
 	{0x7c,0x0a3b,0x0000,SIS_RI_1280x960, 0x00,0x00,0x00,0x00,0x29,-1},  /* 1280x960x8 */
 	{0x7d,0x0a7d,0x0000,SIS_RI_1280x960, 0x00,0x00,0x00,0x00,0x29,-1},  /* 1280x960x16 */
 	{0x7e,0x0aff,0x0000,SIS_RI_1280x960, 0x00,0x00,0x00,0x00,0x29,-1},  /* 1280x960x32 */
-	{0x20,0x0a1b,0x0000,SIS_RI_1024x600, 0x00,0x00,0x00,0x00,0x2b,-1},  /* 1024x600 */
-	{0x21,0x0a3d,0x0000,SIS_RI_1024x600, 0x00,0x00,0x00,0x00,0x2b,-1},
-	{0x22,0x0a7f,0x0000,SIS_RI_1024x600, 0x00,0x00,0x00,0x00,0x2b,-1},
-	{0x23,0x0a1b,0x0000,SIS_RI_1152x768, 0x00,0x00,0x00,0x00,0x2c,-1},  /* 1152x768 */
-	{0x24,0x0a3d,0x0000,SIS_RI_1152x768, 0x00,0x00,0x00,0x00,0x2c,-1},
-	{0x25,0x0a7f,0x0000,SIS_RI_1152x768, 0x00,0x00,0x00,0x00,0x2c,-1},
-	{0x29,0x0e1b,0x0000,SIS_RI_1152x864, 0x00,0x00,0x00,0x00,0x36,-1},  /* 1152x864 */
-	{0x2a,0x0e3d,0x0000,SIS_RI_1152x864, 0x00,0x00,0x00,0x00,0x36,-1},
-	{0x2b,0x0e7f,0x0000,SIS_RI_1152x864, 0x00,0x00,0x00,0x00,0x36,-1},
-	{0x39,0x2a1b,0x0000,SIS_RI_848x480,  0x00,0x00,0x00,0x00,0x38,-1},  /* 848x480 */
-	{0x3b,0x2a3d,0x0000,SIS_RI_848x480,  0x00,0x00,0x00,0x00,0x38,-1},
-	{0x3e,0x2a7f,0x0000,SIS_RI_848x480,  0x00,0x00,0x00,0x00,0x38,-1},
-	{0x3f,0x2a1b,0x0000,SIS_RI_856x480,  0x00,0x00,0x00,0x00,0x3a,-1},  /* 856x480 */
-	{0x42,0x2a3d,0x0000,SIS_RI_856x480,  0x00,0x00,0x00,0x00,0x3a,-1},
-	{0x45,0x2a7f,0x0000,SIS_RI_856x480,  0x00,0x00,0x00,0x00,0x3a,-1},
-	{0x48,0x223b,0x0000,SIS_RI_1360x768, 0x00,0x00,0x00,0x00,0x3c,-1},  /* 1360x768 */
-	{0x4b,0x227d,0x0000,SIS_RI_1360x768, 0x00,0x00,0x00,0x00,0x3c,-1},
-	{0x4e,0x22ff,0x0000,SIS_RI_1360x768, 0x00,0x00,0x00,0x00,0x3c,-1},
+	{0x20,0x4a1b,0x0000,SIS_RI_1024x600, 0x00,0x00,0x00,0x00,0x2b,-1},  /* 1024x600 */
+	{0x21,0x4a3d,0x0000,SIS_RI_1024x600, 0x00,0x00,0x00,0x00,0x2b,-1},
+	{0x22,0x4a7f,0x0000,SIS_RI_1024x600, 0x00,0x00,0x00,0x00,0x2b,-1},
+	{0x23,0x4a1b,0x0000,SIS_RI_1152x768, 0x00,0x00,0x00,0x00,0x2c,-1},  /* 1152x768 */
+	{0x24,0x4a3d,0x0000,SIS_RI_1152x768, 0x00,0x00,0x00,0x00,0x2c,-1},
+	{0x25,0x4a7f,0x0000,SIS_RI_1152x768, 0x00,0x00,0x00,0x00,0x2c,-1},
+	{0x29,0x4e1b,0x0000,SIS_RI_1152x864, 0x00,0x00,0x00,0x00,0x36,-1},  /* 1152x864 */
+	{0x2a,0x4e3d,0x0000,SIS_RI_1152x864, 0x00,0x00,0x00,0x00,0x36,-1},
+	{0x2b,0x4e7f,0x0000,SIS_RI_1152x864, 0x00,0x00,0x00,0x00,0x36,-1},
+	{0x39,0x6a1b,0x0000,SIS_RI_848x480,  0x00,0x00,0x00,0x00,0x39,-1},  /* 848x480 */
+	{0x3b,0x6a3d,0x0000,SIS_RI_848x480,  0x00,0x00,0x00,0x00,0x39,-1},
+	{0x3e,0x6a7f,0x0000,SIS_RI_848x480,  0x00,0x00,0x00,0x00,0x39,-1},
+	{0x3f,0x6a1b,0x0000,SIS_RI_856x480,  0x00,0x00,0x00,0x00,0x3b,-1},  /* 856x480 */
+	{0x42,0x6a3d,0x0000,SIS_RI_856x480,  0x00,0x00,0x00,0x00,0x3b,-1},
+	{0x45,0x6a7f,0x0000,SIS_RI_856x480,  0x00,0x00,0x00,0x00,0x3b,-1},
+	{0x48,0x6a3b,0x0000,SIS_RI_1360x768, 0x00,0x00,0x00,0x00,0x3d,-1},  /* 1360x768 */
+	{0x4b,0x6a7d,0x0000,SIS_RI_1360x768, 0x00,0x00,0x00,0x00,0x3d,-1},
+	{0x4e,0x6aff,0x0000,SIS_RI_1360x768, 0x00,0x00,0x00,0x00,0x3d,-1},
 	{0x4f,0x921f,0x0000,SIS_RI_320x200,  0x00,0x00,0x00,0x00,0x23,-1},  /* 320x200x32 */
 	{0x53,0x921f,0x0000,SIS_RI_320x240,  0x00,0x00,0x00,0x00,0x24,-1},  /* 320x240x32 */
 	{0x54,0xb21f,0x0000,SIS_RI_400x300,  0x00,0x00,0x00,0x00,0x25,-1},  /* 400x300x32 */
-	{0x55,0x2e3b,0x0000,SIS_RI_1280x768, 0x00,0x00,0x00,0x00,0x3d,-1},  /* 1280x768   */
-	{0x5a,0x2e7d,0x0000,SIS_RI_1280x768, 0x00,0x00,0x00,0x00,0x3d,-1},
-	{0x5b,0x2eff,0x0000,SIS_RI_1280x768, 0x00,0x00,0x00,0x00,0x3d,-1},
-	{0x5f,0x2a1b,0x0000,SIS_RI_768x576,  0x00,0x00,0x00,0x00,0x3e,-1},  /* 768x576x8 */
-	{0x60,0x2a1d,0x0000,SIS_RI_768x576,  0x00,0x00,0x00,0x00,0x3e,-1},  /* 768x576x16 */
-	{0x61,0x2a1f,0x0000,SIS_RI_768x576,  0x00,0x00,0x00,0x00,0x3e,-1},  /* 768x576x32 */
-	{0x67,0x2e3b,0x0000,SIS_RI_1360x1024,0x00,0x00,0x00,0x00,0x3f,-1},  /* 1360x1024x8 (BARCO) */
-	{0x6f,0x2e7d,0x0000,SIS_RI_1360x1024,0x00,0x00,0x00,0x00,0x3f,-1},  /* 1360x1024x16 (BARCO) */
-	{0x72,0x2eff,0x0000,SIS_RI_1360x1024,0x00,0x00,0x00,0x00,0x3f,-1},  /* 1360x1024x32 (BARCO) */
+	{0x55,0x2e3b,0x0000,SIS_RI_1280x768, 0x00,0x00,0x00,0x00,0x3e,-1},  /* 1280x768   */
+	{0x5a,0x2e7d,0x0000,SIS_RI_1280x768, 0x00,0x00,0x00,0x00,0x3e,-1},
+	{0x5b,0x2eff,0x0000,SIS_RI_1280x768, 0x00,0x00,0x00,0x00,0x3e,-1},
+	{0x5f,0x6a1b,0x0000,SIS_RI_768x576,  0x00,0x00,0x00,0x00,0x3f,-1},  /* 768x576x8 */
+	{0x60,0x6a1d,0x0000,SIS_RI_768x576,  0x00,0x00,0x00,0x00,0x3f,-1},  /* 768x576x16 */
+	{0x61,0x6a1f,0x0000,SIS_RI_768x576,  0x00,0x00,0x00,0x00,0x3f,-1},  /* 768x576x32 */
+	{0x67,0x6e3b,0x0000,SIS_RI_1360x1024,0x00,0x00,0x00,0x00,0x40,-1},  /* 1360x1024x8 (BARCO) */
+	{0x6f,0x6e7d,0x0000,SIS_RI_1360x1024,0x00,0x00,0x00,0x00,0x40,-1},  /* 1360x1024x16 (BARCO) */
+	{0x72,0x6eff,0x0000,SIS_RI_1360x1024,0x00,0x00,0x00,0x00,0x40,-1},  /* 1360x1024x32 (BARCO) */
 	{0xff,0x0000,0xffff,0,               0x00,0x00,0x00,0x00,0x00}
 };
 
@@ -170,34 +170,34 @@
 {
 	{0x085f,0x0d,0x03,0x05,0x05,0x6a, 800, 600, 0}, /* 00 */
 	{0x0467,0x0e,0x44,0x05,0x05,0x6a, 800, 600, 0}, /* 01 */
-	{0x0067,0x0f,0x07,0x48,0x00,0x6a, 800, 600, 0}, /* 02 - CRT1CRTC was 0x4f */
-	{0x0067,0x10,0x06,0x8b,0x00,0x6a, 800, 600, 0}, /* 03 */
-	{0x0147,0x11,0x08,0x00,0x00,0x6a, 800, 600, 0}, /* 04 */
-	{0x0147,0x12,0x0c,0x00,0x00,0x6a, 800, 600, 0}, /* 05 */
-	{0x0047,0x11,0x4e,0x00,0x00,0x6a, 800, 600, 0}, /* 06 - CRT1CRTC was 0x51 */
-	{0x0047,0x11,0x13,0x00,0x00,0x6a, 800, 600, 0}, /* 07 */
+	{0x0067,0x0f,0x07,0x48,0x05,0x6a, 800, 600, 0}, /* 02 - CRT1CRTC was 0x4f */
+	{0x0067,0x10,0x06,0x8b,0x05,0x6a, 800, 600, 0}, /* 03 */
+	{0x0147,0x11,0x08,0x00,0x05,0x6a, 800, 600, 0}, /* 04 */
+	{0x0147,0x12,0x0c,0x00,0x05,0x6a, 800, 600, 0}, /* 05 */
+	{0x0047,0x11,0x4e,0x00,0x05,0x6a, 800, 600, 0}, /* 06 - CRT1CRTC was 0x51 */
+	{0x0047,0x11,0x13,0x00,0x05,0x6a, 800, 600, 0}, /* 07 */
 	{0xc85f,0x05,0x00,0x04,0x04,0x2e, 640, 480, 0}, /* 08 */
 	{0xc067,0x06,0x02,0x04,0x04,0x2e, 640, 480, 0}, /* 09 */
 	{0xc067,0x07,0x02,0x47,0x04,0x2e, 640, 480, 0}, /* 0a */
 	{0xc067,0x08,0x03,0x8a,0x04,0x2e, 640, 480, 0}, /* 0b */
-	{0xc047,0x09,0x05,0x00,0x00,0x2e, 640, 480, 0}, /* 0c */
-	{0xc047,0x0a,0x08,0x00,0x00,0x2e, 640, 480, 0}, /* 0d */
-	{0xc047,0x0b,0x0a,0x00,0x00,0x2e, 640, 480, 0}, /* 0e */
-	{0xc047,0x0c,0x10,0x00,0x00,0x2e, 640, 480, 0}, /* 0f */
+	{0xc047,0x09,0x05,0x00,0x04,0x2e, 640, 480, 0}, /* 0c */
+	{0xc047,0x0a,0x08,0x00,0x04,0x2e, 640, 480, 0}, /* 0d */
+	{0xc047,0x0b,0x0a,0x00,0x04,0x2e, 640, 480, 0}, /* 0e */
+	{0xc047,0x0c,0x10,0x00,0x04,0x2e, 640, 480, 0}, /* 0f */
 	{0x487f,0x04,0x00,0x00,0x00,0x2f, 640, 400, 0}, /* 10 */
-	{0xc04f,0x31,0x01,0x06,0x00,0x31, 720, 480, 0}, /* 11 */
-	{0x004f,0x32,0x03,0x06,0x00,0x32, 720, 576, 0}, /* 12 */
-	{0x0187,0x15,0x05,0x00,0x00,0x37,1024, 768, 0}, /* 13 */
+	{0xc06f,0x31,0x01,0x06,0x13,0x31, 720, 480, 0}, /* 11 */
+	{0x006f,0x32,0x03,0x06,0x14,0x32, 720, 576, 0}, /* 12 */
+	{0x0187,0x15,0x05,0x00,0x06,0x37,1024, 768, 0}, /* 13 */
         {0xc877,0x16,0x09,0x06,0x06,0x37,1024, 768, 0}, /* 14 */
 	{0xc067,0x17,0x0b,0x49,0x06,0x37,1024, 768, 0}, /* 15 - CRT1CRTC was 0x97 */
 	{0x0267,0x18,0x0d,0x00,0x06,0x37,1024, 768, 0}, /* 16 */
-	{0x0047,0x19,0x11,0x8c,0x00,0x37,1024, 768, 0}, /* 17 - CRT1CRTC was 0x59 */
-	{0x0047,0x1a,0x52,0x00,0x00,0x37,1024, 768, 0}, /* 18 */
-	{0x0007,0x1b,0x16,0x00,0x00,0x37,1024, 768, 0}, /* 19 - CRT1CRTC was 0x5b */
-	{0x0387,0x1c,0x4d,0x00,0x00,0x3a,1280,1024, 0}, /* 1a - CRT1CRTC was 0x5c */
-	{0x0077,0x1d,0x14,0x07,0x00,0x3a,1280,1024, 0}, /* 1b */
-	{0x0047,0x1e,0x17,0x00,0x00,0x3a,1280,1024, 0}, /* 1c */
-	{0x0007,0x1f,0x98,0x00,0x00,0x3a,1280,1024, 0}, /* 1d */
+	{0x0047,0x19,0x11,0x8c,0x06,0x37,1024, 768, 0}, /* 17 - CRT1CRTC was 0x59 */
+	{0x0047,0x1a,0x52,0x00,0x06,0x37,1024, 768, 0}, /* 18 */
+	{0x0007,0x1b,0x16,0x00,0x06,0x37,1024, 768, 0}, /* 19 - CRT1CRTC was 0x5b */
+	{0x0387,0x1c,0x4d,0x00,0x07,0x3a,1280,1024, 0}, /* 1a - CRT1CRTC was 0x5c */
+	{0x0077,0x1d,0x14,0x07,0x07,0x3a,1280,1024, 0}, /* 1b */
+	{0x0047,0x1e,0x17,0x00,0x07,0x3a,1280,1024, 0}, /* 1c */
+	{0x0007,0x1f,0x98,0x00,0x07,0x3a,1280,1024, 0}, /* 1d */
 	{0x0007,0x20,0x59,0x00,0x00,0x3c,1600,1200, 0}, /* 1e - CRT1CRTC was 0x60 */
 	{0x0007,0x21,0x5a,0x00,0x00,0x3c,1600,1200, 0}, /* 1f */
 	{0x0007,0x22,0x1b,0x00,0x00,0x3c,1600,1200, 0}, /* 20 */
@@ -213,25 +213,26 @@
 	{0x0027,0x45,0x3c,0x08,0x0a,0x6e,1280, 960, 0}, /* 2a - 1280x960-85 */
 	{0xc077,0x33,0x09,0x06,0x00,0x20,1024, 600, 0}, /* 2b */
 	{0xc077,0x34,0x0b,0x06,0x00,0x23,1152, 768, 0}, /* 2c */	/* VCLK 0x09 */
-	{0x0057,0x35,0x27,0x08,0x00,0x70, 800, 480, 0}, /* 2d */
-	{0x0047,0x36,0x37,0x08,0x00,0x70, 800, 480, 0}, /* 2e */
-	{0x0047,0x37,0x08,0x08,0x00,0x70, 800, 480, 0}, /* 2f */
-	{0x0057,0x38,0x09,0x09,0x00,0x71,1024, 576, 0}, /* 30 */
-	{0x0047,0x39,0x38,0x09,0x00,0x71,1024, 576, 0}, /* 31 */
-	{0x0047,0x3a,0x11,0x09,0x00,0x71,1024, 576, 0}, /* 32 */
-	{0x0057,0x3b,0x39,0x0a,0x00,0x75,1280, 720, 0}, /* 33 */
-	{0x0047,0x3c,0x3a,0x0a,0x00,0x75,1280, 720, 0}, /* 34 */
-	{0x0007,0x3d,0x3b,0x0a,0x00,0x75,1280, 720, 0}, /* 35 */
-	{0x0047,0x3e,0x34,0x06,0x00,0x29,1152, 864, 0}, /* 36 1152x864-75Hz */
-	{0x0047,0x44,0x3a,0x06,0x00,0x29,1152, 864, 0}, /* 37 1152x864-85Hz */
-	{0x00c7,0x3f,0x28,0x00,0x00,0x39, 848, 480, 0}, /* 38 848x480-38Hzi */
-	{0xc067,0x40,0x3d,0x0b,0x0b,0x39, 848, 480, 0}, /* 39 848x480-60Hz  */
-	{0x00c7,0x41,0x28,0x00,0x00,0x3f, 856, 480, 0}, /* 3a 856x480-38Hzi */
-	{0xc047,0x42,0x28,0x00,0x00,0x3f, 856, 480, 0}, /* 3b 856x480-60Hz  */
-	{0x0067,0x43,0x3e,0x0c,0x0b,0x48,1360, 768, 0}, /* 3c 1360x768-60Hz */
-	{0x0077,0x46,0x3f,0x08,0x00,0x55,1280, 768, 0}, /* 3d 1280x768-60Hz */
-	{0x004f,0x47,0x03,0x06,0x00,0x5f, 768, 576, 0}, /* 3e 768x576 */
-	{0x0027,0x48,0x13,0x08,0x08,0x67,1360,1024, 0}, /* 3f 1360x1024-59Hz (BARCO1366 only) */
+	{0x0077,0x35,0x27,0x08,0x18,0x70, 800, 480, 0}, /* 2d */
+	{0x0047,0x36,0x37,0x08,0x18,0x70, 800, 480, 0}, /* 2e */
+	{0x0047,0x37,0x08,0x08,0x18,0x70, 800, 480, 0}, /* 2f */
+	{0x0077,0x38,0x09,0x09,0x19,0x71,1024, 576, 0}, /* 30 */
+	{0x0047,0x39,0x38,0x09,0x19,0x71,1024, 576, 0}, /* 31 */
+	{0x0047,0x3a,0x11,0x09,0x19,0x71,1024, 576, 0}, /* 32 */
+	{0x0077,0x3b,0x39,0x0a,0x0c,0x75,1280, 720, 0}, /* 33 */
+	{0x0047,0x3c,0x3a,0x0a,0x0c,0x75,1280, 720, 0}, /* 34 */
+	{0x0007,0x3d,0x3b,0x0a,0x0c,0x75,1280, 720, 0}, /* 35 */
+	{0x0067,0x49,0x35,0x06,0x1a,0x29,1152, 864, 0}, /* 36 1152x864-60Hz  */
+	{0x0067,0x3e,0x34,0x06,0x1a,0x29,1152, 864, 0}, /* 37 1152x864-75Hz */
+	{0x0047,0x44,0x3a,0x06,0x1a,0x29,1152, 864, 0}, /* 38 1152x864-85Hz */
+	{0x00c7,0x3f,0x28,0x00,0x16,0x39, 848, 480, 0}, /* 39 848x480-38Hzi */
+	{0xc067,0x40,0x3d,0x0b,0x16,0x39, 848, 480, 0}, /* 3a 848x480-60Hz  */
+	{0x00c7,0x41,0x28,0x00,0x17,0x3f, 856, 480, 0}, /* 3b 856x480-38Hzi */
+	{0xc047,0x42,0x28,0x00,0x17,0x3f, 856, 480, 0}, /* 3c 856x480-60Hz  */
+	{0x0067,0x43,0x3e,0x0c,0x1b,0x48,1360, 768, 0}, /* 3d 1360x768-60Hz */
+	{0x0077,0x46,0x3f,0x08,0x08,0x55,1280, 768, 0}, /* 3e 1280x768-60Hz */
+	{0x006f,0x47,0x03,0x06,0x15,0x5f, 768, 576, 0}, /* 3f 768x576 */
+	{0x0027,0x48,0x13,0x08,0x00,0x67,1360,1024, 0}, /* 40 1360x1024-59Hz (BARCO1366 only) */
 	{0xffff,   0,   0,   0,   0,   0,   0,   0, 0}
 };
 
@@ -378,7 +379,7 @@
   0xe0,0x83,0xdf,0xdf,0xfc,0x10,0x00,0x01,
   0x00}},
  {{0x65,0x4f,0x4f,0x89,0x57,0x9f,0xfb,0x1f,
-  0xe6,0x8a,0xdf,0xdf,0xfc,0x10,0x00,0x01,    /* TW: Corrected VDE, VBE */
+  0xe6,0x8a,0xdf,0xdf,0xfc,0x10,0x00,0x01,    /* Corrected VDE, VBE */
   0x00}},
  {{0x7b,0x63,0x63,0x9f,0x6a,0x93,0x6f,0xf0,
   0x58,0x8a,0x57,0x57,0x70,0x20,0x00,0x05,
@@ -558,13 +559,16 @@
    0x01}}, /* 0x45 */
  {{0xce,0x9f,0x9f,0x92,0xa9,0x17,0x20,0xf5,  /* 1280x768-60 */
    0x03,0x88,0xff,0xff,0x21,0x10,0x00,0x07,
-   0x01}},  /* 0x46 */
+   0x01}}, /* 0x46 */
  {{0x7b,0x5f,0x63,0x9f,0x6a,0x93,0x6f,0xf0,  /* 768x576 */
    0x58,0x8a,0x3f,0x57,0x70,0x20,0x00,0x05,
-   0x01}},  /* 0x47 */
+   0x01}}, /* 0x47 */
  {{0xce,0xa9,0xa9,0x92,0xb1,0x07,0x28,0x52,  /* 1360x1024 (Barco iQ Pro R300) */
    0x02,0x8e,0xff,0x00,0x29,0x0d,0x00,0x03,
-   0x00}}   /* 0x48 */
+   0x00}}, /* 0x48 */
+ {{0xcd,0x8f,0x8f,0x91,0x9b,0x1b,0x7a,0xff,  /* 1152x864-60 */
+   0x64,0x8c,0x5f,0x62,0x7b,0x10,0x00,0x07,
+   0x41}}  /* 0x49 */
 };
 
 static const SiS_MCLKDataStruct  SiS300_MCLKData_630[] =
@@ -646,7 +650,7 @@
 	{ 0x52,0x4a, 36}, /* 0x32 */  /* CH/PAL 800x600 5/6 */
 	{ 0x34,0x61, 95}, /* 0x33 */
 	{ 0x78,0x27,108}, /* 0x34 */  /* Replacement for index 0x14 for 630 (?) */
-	{ 0xce,0x25,189}, /* 0x35 */  /* Replacement for index 0x1b for 730 (and 540?) */
+	{ 0x70,0x28, 90}, /* 0x35 */  /* 1152x864@60 */
 	{ 0x45,0x6b, 21}, /* 0x36 */  /* Chrontel SuperOverscan */
 	{ 0x52,0xe2, 49}, /* 0x37 */  /* 16:9 modes  */
 	{ 0x2b,0x61, 78}, /* 0x38 */  /* 16:9 modes  */
@@ -656,20 +660,19 @@
 	{ 0x52,0x07,149}, /* 0x3c */  /* 1280x960-85 */
 	{ 0x62,0xc6, 34}, /* 0x3d */  /* 848x480-60  */
 	{ 0x30,0x23, 88}, /* 0x3e */  /* 1360x768-60 */
-#if 0
-	{ 0x3f,0x64, 46}, /* 0x3f */  /* 640x480-100 */
-#endif
         { 0x70,0x29, 81}, /* 0x3f */  /* 1280x768-60 */
-	{ 0x72,0x2a, 76}, /* 0x40 */  /* test for SiS730 */
+	{ 0x72,0x2a, 76}, /* 0x40 */  /* test for SiS730 --- LIMIT for table (&0x3f) */
 	{ 0x15,0x21, 79}, /* 0x41 */  /* test for SiS730 */
 	{ 0xa1,0x42,108}, /* 0x42 */  /* 1280x960 LCD */
 	{ 0x37,0x61,100}, /* 0x43 */  /* 1280x960 LCD */
 	{ 0xe3,0x9a,106}, /* 0x44 */  /* 1360x1024 - special for Barco iQ R300 */
 	{ 0xe2,0x46,135}, /* 0x45 */  /* 1280x1024-75, better clock for VGA2 */
-	{    0,   0,  0}  /* 0x46 custom (will be filled out) */
+	{ 0x70,0x29, 81}, /* 0x46 */  /* unused */
+	{    0,   0,  0}, /* 0x47 custom (will be filled out) */
+	{ 0xce,0x25,189}  /* 0x48 */  /* Replacement for index 0x1b for 730 (and 540?) */
 };
 
-#ifndef LINUX_XF86
+#ifdef LINUX_KERNEL
 static UCHAR SiS300_SR07 = 0x10;
 #endif
 
@@ -685,7 +688,7 @@
 	{0x00,0x00,0x00,0x00}
 };
 
-#ifndef LINUX_XF86
+#ifdef LINUX_KERNEL
 static UCHAR SiS300_SR1F = 0x00;
 static UCHAR SiS300_SR21 = 0x16;
 static UCHAR SiS300_SR22 = 0xb2;
diff -Nru a/drivers/video/sis/310vtbl.h b/drivers/video/sis/310vtbl.h
--- a/drivers/video/sis/310vtbl.h	2005-01-10 20:11:20 -08:00
+++ b/drivers/video/sis/310vtbl.h	2005-01-10 20:11:20 -08:00
@@ -35,7 +35,7 @@
  * * 3) The name of the author may not be used to endorse or promote products
  * *    derived from this software without specific prior written permission.
  * *
- * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESSED OR
+ * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  * * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  * * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
@@ -145,33 +145,36 @@
 	{0x29,0x4e1b,0x0000,SIS_RI_1152x864, 0x00,0x00,0x00,0x00,0x43,-1}, /* 1152x864 */
 	{0x2a,0x4e3d,0x0000,SIS_RI_1152x864, 0x00,0x00,0x00,0x00,0x43,-1},
 	{0x2b,0x4e7f,0x0000,SIS_RI_1152x864, 0x00,0x00,0x00,0x00,0x43,-1},
-	{0x39,0x6a1b,0x0000,SIS_RI_848x480,  0x00,0x00,0x00,0x00,0x45,-1}, /* 848x480 */
-	{0x3b,0x6a3d,0x0000,SIS_RI_848x480,  0x00,0x00,0x00,0x00,0x45,-1},
-	{0x3e,0x6a7f,0x0000,SIS_RI_848x480,  0x00,0x00,0x00,0x00,0x45,-1},
-	{0x3f,0x6a1b,0x0000,SIS_RI_856x480,  0x00,0x00,0x00,0x00,0x47,-1}, /* 856x480 */
-	{0x42,0x6a3d,0x0000,SIS_RI_856x480,  0x00,0x00,0x00,0x00,0x47,-1},
-	{0x45,0x6a7f,0x0000,SIS_RI_856x480,  0x00,0x00,0x00,0x00,0x47,-1},
-	{0x48,0x6a3b,0x0000,SIS_RI_1360x768, 0x00,0x00,0x00,0x00,0x49,-1}, /* 1360x768 */
-	{0x4b,0x6a7d,0x0000,SIS_RI_1360x768, 0x00,0x00,0x00,0x00,0x49,-1},
-	{0x4e,0x6aff,0x0000,SIS_RI_1360x768, 0x00,0x00,0x00,0x00,0x49,-1},
+	{0x39,0x6a1b,0x0000,SIS_RI_848x480,  0x00,0x00,0x00,0x00,0x46,-1}, /* 848x480 */
+	{0x3b,0x6a3d,0x0000,SIS_RI_848x480,  0x00,0x00,0x00,0x00,0x46,-1},
+	{0x3e,0x6a7f,0x0000,SIS_RI_848x480,  0x00,0x00,0x00,0x00,0x46,-1},
+	{0x3f,0x6a1b,0x0000,SIS_RI_856x480,  0x00,0x00,0x00,0x00,0x48,-1}, /* 856x480 */
+	{0x42,0x6a3d,0x0000,SIS_RI_856x480,  0x00,0x00,0x00,0x00,0x48,-1},
+	{0x45,0x6a7f,0x0000,SIS_RI_856x480,  0x00,0x00,0x00,0x00,0x48,-1},
+	{0x48,0x6a3b,0x0000,SIS_RI_1360x768, 0x00,0x00,0x00,0x00,0x4a,-1}, /* 1360x768 */
+	{0x4b,0x6a7d,0x0000,SIS_RI_1360x768, 0x00,0x00,0x00,0x00,0x4a,-1},
+	{0x4e,0x6aff,0x0000,SIS_RI_1360x768, 0x00,0x00,0x00,0x00,0x4a,-1},
 	{0x4f,0x9a1f,0x0000,SIS_RI_320x200,  0x00,0x00,0x04,0x04,0x25, 0}, /* 320x200x32 */
 	{0x53,0x9a1f,0x0000,SIS_RI_320x240,  0x00,0x00,0x04,0x04,0x26, 2}, /* 320x240x32 */
 	{0x54,0xba1f,0x0000,SIS_RI_400x300,  0x00,0x00,0x07,0x07,0x27, 3}, /* 400x300x32 */
-	{0x5f,0x6a1b,0x0000,SIS_RI_768x576,  0x00,0x00,0x06,0x06,0x4a,-1}, /* 768x576 */
-	{0x60,0x6a1d,0x0000,SIS_RI_768x576,  0x00,0x00,0x06,0x06,0x4a,-1},
-	{0x61,0x6a3f,0x0000,SIS_RI_768x576,  0x00,0x00,0x06,0x06,0x4a,-1},
-	{0x14,0x0e3b,0x0000,SIS_RI_1280x800, 0x00,0x00,0x00,0x00,0x4b, 7}, /* 1280x800 */
-	{0x15,0x0e7d,0x0000,SIS_RI_1280x800, 0x00,0x00,0x00,0x00,0x4b, 7},
-	{0x16,0x0eff,0x0000,SIS_RI_1280x800, 0x00,0x00,0x00,0x00,0x4b, 7},
-	{0x17,0x0e3b,0x0000,SIS_RI_1680x1050,0x00,0x00,0x00,0x00,0x4c, 9}, /* 1680x1050 */
-	{0x18,0x0e7d,0x0000,SIS_RI_1680x1050,0x00,0x00,0x00,0x00,0x4c, 9},
-	{0x19,0x0eff,0x0000,SIS_RI_1680x1050,0x00,0x00,0x00,0x00,0x4c, 9},
-	{0x2c,0x267b,0x0000,SIS_RI_1920x1080,0x00,0x00,0x00,0x00,0x4d,-1}, /* 1920x1080(i) */
-	{0x2d,0x26fd,0x0000,SIS_RI_1920x1080,0x00,0x00,0x00,0x00,0x4d,-1},
-	{0x73,0x27ff,0x0000,SIS_RI_1920x1080,0x00,0x00,0x00,0x00,0x4d,-1},
-	{0x1d,0x6a1b,0x0000,SIS_RI_960x540,  0x00,0x00,0x00,0x00,0x4e,-1}, /* 960x540 */
-	{0x1e,0x6a3d,0x0000,SIS_RI_960x540,  0x00,0x00,0x00,0x00,0x4e,-1},
-	{0x1f,0x6a7f,0x0000,SIS_RI_960x540,  0x00,0x00,0x00,0x00,0x4e,-1},
+	{0x5f,0x6a1b,0x0000,SIS_RI_768x576,  0x00,0x00,0x06,0x06,0x4b,-1}, /* 768x576 */
+	{0x60,0x6a1d,0x0000,SIS_RI_768x576,  0x00,0x00,0x06,0x06,0x4b,-1},
+	{0x61,0x6a3f,0x0000,SIS_RI_768x576,  0x00,0x00,0x06,0x06,0x4b,-1},
+	{0x14,0x0e3b,0x0000,SIS_RI_1280x800, 0x00,0x00,0x00,0x00,0x4c, 7}, /* 1280x800 */
+	{0x15,0x0e7d,0x0000,SIS_RI_1280x800, 0x00,0x00,0x00,0x00,0x4c, 7},
+	{0x16,0x0eff,0x0000,SIS_RI_1280x800, 0x00,0x00,0x00,0x00,0x4c, 7},
+	{0x17,0x0e3b,0x0000,SIS_RI_1680x1050,0x00,0x00,0x00,0x00,0x4d, 9}, /* 1680x1050 */
+	{0x18,0x0e7d,0x0000,SIS_RI_1680x1050,0x00,0x00,0x00,0x00,0x4d, 9},
+	{0x19,0x0eff,0x0000,SIS_RI_1680x1050,0x00,0x00,0x00,0x00,0x4d, 9},
+	{0x2c,0x267b,0x0000,SIS_RI_1920x1080,0x00,0x00,0x00,0x00,0x4e,-1}, /* 1920x1080(i) */
+	{0x2d,0x26fd,0x0000,SIS_RI_1920x1080,0x00,0x00,0x00,0x00,0x4e,-1},
+	{0x73,0x27ff,0x0000,SIS_RI_1920x1080,0x00,0x00,0x00,0x00,0x4e,-1},
+	{0x1d,0x6a1b,0x0000,SIS_RI_960x540,  0x00,0x00,0x00,0x00,0x4f,-1}, /* 960x540 */
+	{0x1e,0x6a3d,0x0000,SIS_RI_960x540,  0x00,0x00,0x00,0x00,0x4f,-1},
+	{0x1f,0x6a7f,0x0000,SIS_RI_960x540,  0x00,0x00,0x00,0x00,0x4f,-1},
+	{0x20,0x6a1b,0x0000,SIS_RI_960x600,  0x00,0x00,0x00,0x00,0x50,-1}, /* 960x600 */
+	{0x21,0x6a3d,0x0000,SIS_RI_960x600,  0x00,0x00,0x00,0x00,0x50,-1},
+	{0x22,0x6a7f,0x0000,SIS_RI_960x600,  0x00,0x00,0x00,0x00,0x50,-1},
 	{0xff,0x0000,0x0000,0,               0x00,0x00,0x00,0x00,0x00,-1}
 };
 
@@ -244,21 +247,89 @@
         {0x0077,0x42,0x5b,0x08,0x11,0x23,1280, 768, 0x30}, /* 0x40 */    /* 0x5b was 0x12 */
 	{0x0127,0x43,0x4d,0x08,0x0b,0x26,1400,1050, 0x30}, /* 0x41 */
 	{0x0207,0x4b,0x5a,0x08,0x0b,0x26,1400,1050, 0x30}, /* 0x42 1400x1050-75Hz */
-	{0x0127,0x44,0x19,0x00,0x1a,0x29,1152, 864, 0x30}, /* 0x43 1152x864-75Hz  */
-	{0x0127,0x4a,0x1e,0x00,0x1a,0x29,1152, 864, 0x30}, /* 0x44 1152x864-85Hz  */
-	{0x0087,0x45,0x57,0x00,0x16,0x39, 848, 480, 0x30}, /* 0x45 848x480-38Hzi  */
-	{0xc067,0x46,0x55,0x0b,0x16,0x39, 848, 480, 0x30}, /* 0x46 848x480-60Hz   */
-	{0x0087,0x47,0x57,0x00,0x17,0x3f, 856, 480, 0x30}, /* 0x47 856x480-38Hzi  */
-	{0xc067,0x48,0x57,0x00,0x17,0x3f, 856, 480, 0x30}, /* 0x48 856x480-60Hz   */
-	{0x0067,0x49,0x58,0x0c,0x1b,0x48,1360, 768, 0x30}, /* 0x49 1360x768-60Hz  */
-	{0x006f,0x4d,0x03,0x06,0x15,0x5f, 768, 576, 0x30}, /* 0x4a 768x576-56Hz   */
-	{0x0067,0x4f,0x5c,0x08,0x0d,0x14,1280, 800, 0x30}, /* 0x4b 1280x800-60Hz  */
-	{0x0067,0x50,0x5d,0x0c,0x0e,0x17,1680,1050, 0x30}, /* 0x4c 1680x1050-60Hz */
-	{0x0087,0x51,0x69,0x00,0x00,0x2c,1920,1080, 0x30}, /* 0x4d 1920x1080 60Hzi */
-	{0x0067,0x52,0x6a,0x00,0x1c,0x1d, 960, 540, 0x30}, /* 0x4e 960x540 60Hz */
+	{0x0127,0x54,0x6d,0x00,0x1a,0x29,1152, 864, 0x30}, /* 0x43 1152x864-60Hz  */
+	{0x0127,0x44,0x19,0x00,0x1a,0x29,1152, 864, 0x30}, /* 0x44 1152x864-75Hz  */
+	{0x0127,0x4a,0x1e,0x00,0x1a,0x29,1152, 864, 0x30}, /* 0x45 1152x864-85Hz  */
+	{0x0087,0x45,0x57,0x00,0x16,0x39, 848, 480, 0x30}, /* 0x46 848x480-38Hzi  */
+	{0xc067,0x46,0x55,0x0b,0x16,0x39, 848, 480, 0x30}, /* 0x47 848x480-60Hz   */
+	{0x0087,0x47,0x57,0x00,0x17,0x3f, 856, 480, 0x30}, /* 0x48 856x480-38Hzi  */
+	{0xc067,0x48,0x57,0x00,0x17,0x3f, 856, 480, 0x30}, /* 0x49 856x480-60Hz   */
+	{0x0067,0x49,0x58,0x0c,0x1b,0x48,1360, 768, 0x30}, /* 0x4a 1360x768-60Hz  */
+	{0x006f,0x4d,0x03,0x06,0x15,0x5f, 768, 576, 0x30}, /* 0x4b 768x576-56Hz   */
+	{0x0067,0x4f,0x5c,0x08,0x0d,0x14,1280, 800, 0x30}, /* 0x4c 1280x800-60Hz  */
+	{0x0067,0x50,0x5d,0x0c,0x0e,0x17,1680,1050, 0x30}, /* 0x4d 1680x1050-60Hz */
+	{0x0087,0x51,0x69,0x00,0x00,0x2c,1920,1080, 0x30}, /* 0x4e 1920x1080 60Hzi */
+	{0x0067,0x52,0x6a,0x00,0x1c,0x1d, 960, 540, 0x30}, /* 0x4f 960x540 60Hz */
+	{0x0077,0x53,0x6b,0x0b,0x1d,0x20, 960, 600, 0x30}, /* 0x50 960x600 60Hz */
 	{0xffff,0x00,0x00,0x00,0x00,0x00,   0,   0,    0}
 };
 
+#ifdef LINUX_XF86
+static const struct {
+	UCHAR  Ext_ModeID;     /* ModeID in new ROM */
+	UCHAR  Ext_MyModeID;   /* corresponding ModeID in my tables (0 = identical) */
+	USHORT Ext_VESAID;     /* corresponding VESA ID in new ROM */
+} SiS_EModeIDTable661[] = {
+        { 0x6a, 0x00, 0x0102 },
+	{ 0x1d, 0x20, 0x0000 },
+	{ 0x1e, 0x21, 0x0000 },
+	{ 0x1f, 0x22, 0x0000 },
+	{ 0x20, 0x29, 0x0000 },
+	{ 0x21, 0x2a, 0x0000 },
+	{ 0x22, 0x2b, 0x0000 },
+	{ 0x23, 0x00, 0x011c },
+	{ 0x24, 0x00, 0x011d },
+	{ 0x25, 0x00, 0x011e },
+	{ 0x26, 0x00, 0x011f },
+	{ 0x27, 0x00, 0x0120 },
+	{ 0x28, 0x00, 0x0121 },
+	{ 0x2a, 0x14, 0x013d },
+	{ 0x2b, 0x15, 0x013e },
+	{ 0x2c, 0x16, 0x013f },
+	{ 0x2e, 0x00, 0x0101 },
+	{ 0x2f, 0x00, 0x0100 },
+	{ 0x30, 0x00, 0x0103 },
+	{ 0x37, 0x00, 0x0104 },
+	{ 0x38, 0x00, 0x0105 },
+	{ 0x3a, 0x00, 0x0107 },
+	{ 0x3c, 0x00, 0x0125 },
+	{ 0x3d, 0x00, 0x0126 },
+	{ 0x40, 0x00, 0x010d },
+	{ 0x41, 0x00, 0x010e },
+	{ 0x43, 0x00, 0x0110 },
+	{ 0x44, 0x00, 0x0111 },
+	{ 0x46, 0x00, 0x0113 },
+	{ 0x47, 0x00, 0x0114 },
+	{ 0x49, 0x00, 0x0116 },
+	{ 0x4a, 0x00, 0x0117 },
+	{ 0x4c, 0x00, 0x0119 },
+	{ 0x4d, 0x00, 0x011a },
+	{ 0x50, 0x00, 0x0127 },
+	{ 0x51, 0x00, 0x0128 },
+	{ 0x52, 0x00, 0x0129 },
+	{ 0x56, 0x00, 0x012a },
+	{ 0x57, 0x00, 0x012b },
+	{ 0x58, 0x00, 0x012c },
+	{ 0x59, 0x00, 0x012d },
+	{ 0x5a, 0x17, 0x012e },
+	{ 0x5b, 0x18, 0x012f },
+	{ 0x5c, 0x19, 0x0130 },
+	{ 0x5d, 0x00, 0x0131 },
+	{ 0x62, 0x00, 0x0112 },
+	{ 0x63, 0x00, 0x0115 },
+	{ 0x64, 0x00, 0x0118 },
+	{ 0x65, 0x00, 0x011b },
+	{ 0x66, 0x00, 0x0132 },
+	{ 0x75, 0x00, 0x013a },
+	{ 0x78, 0x00, 0x013b },
+	{ 0x79, 0x00, 0x013c },
+	{ 0x7b, 0x7c, 0x0136 },
+	{ 0x7c, 0x7d, 0x0137 },
+	{ 0x7d, 0x7e, 0x0138 },
+	{ 0xff, 0xff, 0xffff }
+};
+#endif
+
 static const SiS_CRT1TableStruct SiS310_CRT1Table[]=
 {
  {{0x2d,0x27,0x28,0x90,0x2c,0x80,0xbf,0x1f,
@@ -524,7 +595,13 @@
    0x61}},  /* 0x51 */
  {{0x85,0x77,0x77,0x89,0x7d,0x01,0x31,0xf0, /* 960x540-60 */
    0x1e,0x84,0x1b,0x1c,0x32,0x00,0x00,0x02,
-   0x41}}   /* 0x52 */
+   0x41}},  /* 0x52 */
+ {{0x87,0x77,0x77,0x8b,0x81,0x0b,0x68,0xf0, /* 960x600-60 */
+   0x5a,0x80,0x57,0x57,0x69,0x00,0x00,0x02,
+   0x01}},  /* 0x53 */
+ {{0xcd,0x8f,0x8f,0x91,0x9b,0x1b,0x7a,0xff, /* 1152x864-60 */
+   0x64,0x8c,0x5f,0x62,0x7b,0x10,0x00,0x07,
+   0x41}}   /* 0x54 */
 };
 
 static const SiS_MCLKDataStruct SiS310_MCLKData_0_315[] =
@@ -587,6 +664,30 @@
 	{ 0x37,0x21,0x82,200}
 };
 
+static const SiS_MCLKDataStruct SiS310_MCLKData_0_761[] =
+{
+	{ 0x37,0x22,0x82,133},  /* Preliminary */
+	{ 0x5c,0x23,0x82,166},
+	{ 0x65,0x23,0x82,183},
+	{ 0x7c,0x08,0x82,200},
+	{ 0x29,0x21,0x82,150},
+	{ 0x5c,0x23,0x82,166},
+	{ 0x65,0x23,0x82,183},
+	{ 0x37,0x21,0x82,200}
+};
+
+static const SiS_MCLKDataStruct SiS310_MCLKData_0_340[] =
+{
+	{ 0x79,0x06,0x01,250},
+	{ 0x7c,0x08,0x01,200},
+	{ 0x7c,0x08,0x80,200},
+	{ 0x79,0x06,0x80,250},
+	{ 0x29,0x01,0x81,300},
+	{ 0x29,0x01,0x81,300},
+	{ 0x29,0x01,0x81,300},
+	{ 0x29,0x01,0x81,300}
+};
+
 static const SiS_MCLKDataStruct SiS310_MCLKData_1[] = /* ECLK */
 {
         { 0x29,0x21,0x82,150},
@@ -599,6 +700,18 @@
 	{ 0x37,0x22,0x82,133}
 };
 
+static const SiS_MCLKDataStruct SiS310_MCLKData_1_340[] =
+{
+	{ 0x7c,0x08,0x01,200},
+	{ 0x7c,0x08,0x01,200},
+	{ 0x7c,0x08,0x80,200},
+	{ 0x79,0x06,0x80,250},
+	{ 0x29,0x01,0x81,300},
+	{ 0x29,0x01,0x81,300},
+	{ 0x29,0x01,0x81,300},
+	{ 0x29,0x01,0x81,300}
+};
+
 static SiS_VCLKDataStruct SiS310_VCLKData[]=
 {
 	{ 0x1b,0xe1, 25}, /* 0x00 */
@@ -707,7 +820,10 @@
 	{ 0x76,0xe7, 27}, /* 0x67 720x480@60 */
 	{ 0x5f,0xc6, 33}, /* 0x68 720/768x576@60 */
 	{ 0x52,0x27, 75}, /* 0x69 1920x1080i 60Hz interlaced */
-	{ 0x7c,0x6b, 38}  /* 0x6a 960x540@60 */
+	{ 0x7c,0x6b, 38}, /* 0x6a 960x540@60 */
+	{ 0xe3,0x56, 41}, /* 0x6b 960x600@60 */
+	{ 0x45,0x25, 83}, /* 0x6c 1280x800 */
+	{ 0x70,0x28, 90}  /* 0x6d 1152x864@60 */
 };
 
 static SiS_VBVCLKDataStruct SiS310_VBVCLKData[]=
@@ -809,22 +925,25 @@
 	{ 0x30,0x23, 88}, /* 0x58 1360x768-62 (is 60Hz!) TEMP, UNUSED */
 	{ 0x52,0x07,149}, /* 0x59 1280x960-85  */
 	{ 0x56,0x07,156}, /* 0x5a 1400x1050-75 */
-   	{ 0x70,0x29, 81}, /* 0x5b 1280x768 LCD */
-	{ 0x45,0x25, 83}, /* 0x5c 1280x800 LCD - (was 0x9c,0x62, 69 - wrong?) */
+   	{ 0x70,0x29, 81}, /* 0x5b 1280x768 LCD (TMDS) */
+	{ 0xce,0x1e, 73}, /* 0x5c 1280x800_2 LCD (SiS LVDS) - (CRT1: 45 25 83) */
 	{ 0xbe,0x44,121}, /* 0x5d 1680x1050 LCD */
 	{ 0x70,0x24,162}, /* 0x5e 1600x1200 LCD */
-	{ 0x52,0x27, 75}, /* 0x5f 1280x720 LCD TMDS + HDTV (correct) */
-	{ 0x63,0x46, 68}, /* 0x60 1280x768_2 */
-	{ 0x31,0x42, 79}, /* 0x61 1280x768_3 - temp */
+	{ 0x52,0x27, 75}, /* 0x5f 1280x720 (TMDS + HDTV) (correct) */
+	{ 0xc8,0x48, 77}, /* 0x60 1280x768_2 (SiS LVDS) */
+	{ 0x31,0x42, 79}, /* 0x61 1280x768_3 (SiS LVDS) - temp */
 	{    0,   0,  0}, /* 0x62 - custom (will be filled out at run-time) */
-	{ 0x5a,0x64, 65}, /* 0x63 1280x720 (LCD LVDS) */
+	{ 0x9c,0x62, 69}, /* 0x63 1280x720 (SiS LVDS) */
 	{ 0x70,0x28, 90}, /* 0x64 1152x864@60 */
 	{ 0x41,0xc4, 32}, /* 0x65 848x480@60 */
 	{ 0x5c,0xc6, 32}, /* 0x66 856x480@60 */
 	{ 0x76,0xe7, 27}, /* 0x67 720x480@60 */
 	{ 0x5f,0xc6, 33}, /* 0x68 720/768x576@60 */
 	{ 0x52,0x27, 75}, /* 0x69 1920x1080i 60Hz interlaced (UNUSED) */
-	{ 0x7c,0x6b, 38}  /* 0x6a 960x540@60 */
+	{ 0x7c,0x6b, 38}, /* 0x6a 960x540@60 */
+	{ 0xe3,0x56, 41}, /* 0x6b 960x600@60 */
+	{ 0x9c,0x62, 69}, /* 0x6c 1280x800 (SiS TMDS) (special) */
+	{ 0x70,0x28, 90}  /* 0x6d 1152x864@60 */
 };
 
 static const DRAM4Type SiS310_SR15[8] = {
@@ -838,7 +957,7 @@
 	{0x00,0xa5,0xfb,0xf6}
 };
 
-#ifndef LINUX_XF86
+#ifdef LINUX_KERNEL
 
 static UCHAR SiS310_SR07 = 0x18;
 
diff -Nru a/drivers/video/sis/init.c b/drivers/video/sis/init.c
--- a/drivers/video/sis/init.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/video/sis/init.c	2005-01-10 20:11:17 -08:00
@@ -38,7 +38,7 @@
  * * 3) The name of the author may not be used to endorse or promote products
  * *    derived from this software without specific prior written permission.
  * *
- * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESSED OR
+ * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  * * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  * * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
@@ -135,8 +135,8 @@
    SiS_Pr->SiS_LCD1280x720Data      = SiS_LCD1280x720Data;
    SiS_Pr->SiS_StLCD1280x768_2Data  = SiS_StLCD1280x768_2Data;
    SiS_Pr->SiS_ExtLCD1280x768_2Data = SiS_ExtLCD1280x768_2Data;
-   SiS_Pr->SiS_LCD1280x768_3Data    = SiS_LCD1280x768_3Data;
    SiS_Pr->SiS_LCD1280x800Data      = SiS_LCD1280x800Data;
+   SiS_Pr->SiS_LCD1280x800_2Data    = SiS_LCD1280x800_2Data;
    SiS_Pr->SiS_LCD1280x960Data      = SiS_LCD1280x960Data;
    SiS_Pr->SiS_StLCD1400x1050Data   = SiS_StLCD1400x1050Data;
    SiS_Pr->SiS_ExtLCD1400x1050Data  = SiS_ExtLCD1400x1050Data;
@@ -217,34 +217,6 @@
 {
    InitCommonPointer(SiS_Pr, HwInfo);
 
-   SiS_StandTable[0x04].CRTC[4] = 0x2b;
-   SiS_StandTable[0x05].CRTC[4] = 0x2b;
-   SiS_StandTable[0x06].CRTC[4] = 0x54;
-   SiS_StandTable[0x06].CRTC[5] = 0x80;
-   SiS_StandTable[0x0d].CRTC[4] = 0x2b;
-   SiS_StandTable[0x0e].CRTC[4] = 0x54;
-   SiS_StandTable[0x0e].CRTC[5] = 0x80;
-   SiS_StandTable[0x11].CRTC[4] = 0x54;
-   SiS_StandTable[0x11].CRTC[5] = 0x80;
-   SiS_StandTable[0x11].CRTC[16] = 0x83;
-   SiS_StandTable[0x11].CRTC[17] = 0x85;
-   SiS_StandTable[0x12].CRTC[4] = 0x54;
-   SiS_StandTable[0x12].CRTC[5] = 0x80;
-   SiS_StandTable[0x12].CRTC[16] = 0x83;
-   SiS_StandTable[0x12].CRTC[17] = 0x85;
-   SiS_StandTable[0x13].CRTC[5] = 0xa0;
-   SiS_StandTable[0x17].CRTC[5] = 0xa0;
-   SiS_StandTable[0x1a].CRTC[4] = 0x54;
-   SiS_StandTable[0x1a].CRTC[5] = 0x80;
-   SiS_StandTable[0x1a].CRTC[16] = 0xea;
-   SiS_StandTable[0x1a].CRTC[17] = 0x8c;
-   SiS_StandTable[0x1b].CRTC[4] = 0x54;
-   SiS_StandTable[0x1b].CRTC[5] = 0x80;
-   SiS_StandTable[0x1b].CRTC[16] = 0xea;
-   SiS_StandTable[0x1b].CRTC[17] = 0x8c;
-   SiS_StandTable[0x1c].CRTC[4] = 0x54;
-   SiS_StandTable[0x1c].CRTC[5] = 0x80;
-
    SiS_Pr->SiS_SModeIDTable  = SiS300_SModeIDTable;
    SiS_Pr->SiS_VBModeIDTable = SiS300_VBModeIDTable;
    SiS_Pr->SiS_EModeIDTable  = SiS300_EModeIDTable;
@@ -260,7 +232,7 @@
 
    SiS_Pr->SiS_SR15  = SiS300_SR15;
 
-#ifndef LINUX_XF86
+#ifdef LINUX_KERNEL
    SiS_Pr->pSiS_SR07 = &SiS300_SR07;
    SiS_Pr->SiS_CR40  = SiS300_CR40;
    SiS_Pr->SiS_CR49  = SiS300_CR49;
@@ -399,39 +371,15 @@
 {
    InitCommonPointer(SiS_Pr, HwInfo);
 
-   SiS_StandTable[0x04].CRTC[4] = 0x2c;
-   SiS_StandTable[0x05].CRTC[4] = 0x2c;
-   SiS_StandTable[0x06].CRTC[4] = 0x55;
-   SiS_StandTable[0x06].CRTC[5] = 0x81;
-   SiS_StandTable[0x0d].CRTC[4] = 0x2c;
-   SiS_StandTable[0x0e].CRTC[4] = 0x55;
-   SiS_StandTable[0x0e].CRTC[5] = 0x81;
-   SiS_StandTable[0x11].CRTC[4] = 0x55;
-   SiS_StandTable[0x11].CRTC[5] = 0x81;
-   SiS_StandTable[0x11].CRTC[16] = 0x82;
-   SiS_StandTable[0x11].CRTC[17] = 0x84;
-   SiS_StandTable[0x12].CRTC[4] = 0x55;
-   SiS_StandTable[0x12].CRTC[5] = 0x81;
-   SiS_StandTable[0x12].CRTC[16] = 0x82;
-   SiS_StandTable[0x12].CRTC[17] = 0x84;
-   SiS_StandTable[0x13].CRTC[5] = 0xb1;
-   SiS_StandTable[0x17].CRTC[5] = 0xb1;
-   SiS_StandTable[0x1a].CRTC[4] = 0x55;
-   SiS_StandTable[0x1a].CRTC[5] = 0x81;
-   SiS_StandTable[0x1a].CRTC[16] = 0xe9;
-   SiS_StandTable[0x1a].CRTC[17] = 0x8b;
-   SiS_StandTable[0x1b].CRTC[4] = 0x55;
-   SiS_StandTable[0x1b].CRTC[5] = 0x81;
-   SiS_StandTable[0x1b].CRTC[16] = 0xe9;
-   SiS_StandTable[0x1b].CRTC[17] = 0x8b;
-   SiS_StandTable[0x1c].CRTC[4] = 0x55;
-   SiS_StandTable[0x1c].CRTC[5] = 0x81;
-
    SiS_Pr->SiS_SModeIDTable  = SiS310_SModeIDTable;
    SiS_Pr->SiS_EModeIDTable  = SiS310_EModeIDTable;
    SiS_Pr->SiS_RefIndex      = (SiS_Ext2Struct *)SiS310_RefIndex;
    SiS_Pr->SiS_CRT1Table     = SiS310_CRT1Table;
-   if(HwInfo->jChipType >= SIS_760) {
+   if(HwInfo->jChipType >= SIS_340) {
+      SiS_Pr->SiS_MCLKData_0 = SiS310_MCLKData_0_340;  /* 340 */
+   } else if(HwInfo->jChipType >= SIS_761) {
+      SiS_Pr->SiS_MCLKData_0 = SiS310_MCLKData_0_761;  /* 761 - preliminary */
+   } else if(HwInfo->jChipType >= SIS_760) {
       SiS_Pr->SiS_MCLKData_0 = SiS310_MCLKData_0_760;  /* 760 */
    } else if(HwInfo->jChipType >= SIS_661) {
       SiS_Pr->SiS_MCLKData_0 = SiS310_MCLKData_0_660;  /* 661/741 */
@@ -442,13 +390,17 @@
    } else {
       SiS_Pr->SiS_MCLKData_0 = SiS310_MCLKData_0_315;  /* 315 */
    }
-   SiS_Pr->SiS_MCLKData_1    = SiS310_MCLKData_1;
+   if(HwInfo->jChipType >= SIS_340) {
+      SiS_Pr->SiS_MCLKData_1    = SiS310_MCLKData_1_340;
+   } else {
+      SiS_Pr->SiS_MCLKData_1    = SiS310_MCLKData_1;
+   }
    SiS_Pr->SiS_VCLKData      = SiS310_VCLKData;
    SiS_Pr->SiS_VBVCLKData    = SiS310_VBVCLKData;
 
    SiS_Pr->SiS_SR15  = SiS310_SR15;
 
-#ifndef LINUX_XF86
+#ifdef LINUX_KERNEL
    SiS_Pr->pSiS_SR07 = &SiS310_SR07;
    SiS_Pr->SiS_CR40  = SiS310_CR40;
    SiS_Pr->SiS_CR49  = SiS310_CR49;
@@ -592,6 +544,8 @@
    case SIS_741:
    case SIS_660:
    case SIS_760:
+   case SIS_761:
+   case SIS_340:
       InitTo310Pointer(SiS_Pr, HwInfo);
       break;
 #endif
@@ -612,6 +566,7 @@
 /*            HELPER: Get ModeID             */
 /*********************************************/
 
+#ifdef LINUX_XF86
 USHORT
 SiS_GetModeID(int VGAEngine, ULONG VBFlags, int HDisplay, int VDisplay,
               int Depth, BOOLEAN FSTN, int LCDwidth, int LCDheight)
@@ -628,10 +583,14 @@
           }
           break;
      case 400:
-          if(VDisplay == 300) ModeIndex = ModeIndex_400x300[Depth];
+          if((!(VBFlags & CRT1_LCDA)) || ((LCDwidth >= 800) && (LCDwidth >= 600))) {
+             if(VDisplay == 300) ModeIndex = ModeIndex_400x300[Depth];
+	  }
           break;
      case 512:
-          if(VDisplay == 384) ModeIndex = ModeIndex_512x384[Depth];
+          if((!(VBFlags & CRT1_LCDA)) || ((LCDwidth >= 1024) && (LCDwidth >= 768))) {
+             if(VDisplay == 384) ModeIndex = ModeIndex_512x384[Depth];
+	  }
           break;
      case 640:
           if(VDisplay == 480)      ModeIndex = ModeIndex_640x480[Depth];
@@ -656,67 +615,58 @@
 	  break;
      case 960:
 	  if(VGAEngine == SIS_315_VGA) {
-	     if(VDisplay == 540) ModeIndex = ModeIndex_960x540[Depth];
+	     if(VDisplay == 540)      ModeIndex = ModeIndex_960x540[Depth];
+	     else if(VDisplay == 600) ModeIndex = ModeIndex_960x600[Depth];
 	  }
 	  break;
      case 1024:
-          if(VDisplay == 768)      ModeIndex = ModeIndex_1024x768[Depth];
-	  else if(VDisplay == 576) ModeIndex = ModeIndex_1024x576[Depth];
-	  else if((!(VBFlags & CRT1_LCDA)) && (VGAEngine == SIS_300_VGA)) {
-	     if(VDisplay == 600) ModeIndex = ModeIndex_1024x600[Depth];
+          if(VDisplay == 576)      ModeIndex = ModeIndex_1024x576[Depth];
+          else if(VDisplay == 768) ModeIndex = ModeIndex_1024x768[Depth];
+	  else if(VGAEngine == SIS_300_VGA) {
+	     if(VDisplay == 600)   ModeIndex = ModeIndex_1024x600[Depth];
 	  }
           break;
      case 1152:
           if(VDisplay == 864) ModeIndex = ModeIndex_1152x864[Depth];
-          if((!(VBFlags & CRT1_LCDA)) && (VGAEngine == SIS_300_VGA)) {
+          if(VGAEngine == SIS_300_VGA) {
 	     if(VDisplay == 768) ModeIndex = ModeIndex_1152x768[Depth];
 	  }
 	  break;
      case 1280:
-          if(VDisplay == 1024) ModeIndex = ModeIndex_1280x1024[Depth];
-	  else if(VDisplay == 800) {
-	     if(VGAEngine == SIS_315_VGA) {
-	        if((VBFlags & CRT1_LCDA) && (LCDwidth == 1280) && (LCDheight == 800)) {
-	           ModeIndex = ModeIndex_1280x800[Depth];
-	        } else if(!(VBFlags & CRT1_LCDA)) {
-	           ModeIndex = ModeIndex_1280x800[Depth];
-	        }
-	     }
-	  } else if(VDisplay == 720) {
-	     if((VBFlags & CRT1_LCDA) && (LCDwidth == 1280) && (LCDheight == 720)) {
-	        ModeIndex = ModeIndex_1280x720[Depth];
-	     } else if(!(VBFlags & CRT1_LCDA)) {
-	        ModeIndex = ModeIndex_1280x720[Depth];
+          switch(VDisplay) {
+	  case 720:
+	     ModeIndex = ModeIndex_1280x720[Depth];
+	     break;
+	  case 768:
+	     if(VGAEngine == SIS_300_VGA) {
+	        ModeIndex = ModeIndex_300_1280x768[Depth];
+	     } else {
+	        ModeIndex = ModeIndex_310_1280x768[Depth];
 	     }
-	  } else if(!(VBFlags & CRT1_LCDA)) {
-             if(VDisplay == 960) ModeIndex = ModeIndex_1280x960[Depth];
-	     else if(VDisplay == 768) {
-	        if(VGAEngine == SIS_300_VGA) {
-	           ModeIndex = ModeIndex_300_1280x768[Depth];
-	        } else {
-	           ModeIndex = ModeIndex_310_1280x768[Depth];
-	        }
+	     break;
+	  case 800:
+	     if(VGAEngine == SIS_315_VGA) {
+	        ModeIndex = ModeIndex_1280x800[Depth];
 	     }
+	     break;
+	  case 960:
+	     ModeIndex = ModeIndex_1280x960[Depth];
+	     break;
+	  case 1024:
+	     ModeIndex = ModeIndex_1280x1024[Depth];
+	     break;
 	  }
           break;
      case 1360:
           if(VDisplay == 768) ModeIndex = ModeIndex_1360x768[Depth];
-          if(!(VBFlags & CRT1_LCDA)) {
-	     if(VGAEngine == SIS_300_VGA) {
-	        if(VDisplay == 1024) ModeIndex = ModeIndex_300_1360x1024[Depth];
-             }
-	  }
+	  if(VGAEngine == SIS_300_VGA) {
+	     if(VDisplay == 1024) ModeIndex = ModeIndex_300_1360x1024[Depth];
+          }
           break;
      case 1400:
           if(VGAEngine == SIS_315_VGA) {
 	     if(VDisplay == 1050) {
-	        if((VBFlags & CRT1_LCDA) &&
-	           (((LCDwidth == 1400) && (LCDheight == 1050)) ||
-		    ((LCDwidth == 1600) && (LCDheight == 1200)))) {
-	           ModeIndex = ModeIndex_1400x1050[Depth];
-	        } else if(!(VBFlags & CRT1_LCDA)) {
-	           ModeIndex = ModeIndex_1400x1050[Depth];
-	        }
+	        ModeIndex = ModeIndex_1400x1050[Depth];
 	     }
 	  }
           break;
@@ -729,28 +679,25 @@
 	  }
           break;
      case 1920:
-          if(!(VBFlags & CRT1_LCDA)) {
-	     if(VGAEngine == SIS_315_VGA) {
-	        if(VDisplay == 1080) ModeIndex = ModeIndex_1920x1080[Depth];
-	     }
-             if(VDisplay == 1440) ModeIndex = ModeIndex_1920x1440[Depth];
+          if(VDisplay == 1440)    ModeIndex = ModeIndex_1920x1440[Depth];
+	  else if(VGAEngine == SIS_315_VGA) {
+	     if(VDisplay == 1080) ModeIndex = ModeIndex_1920x1080[Depth];
 	  }
           break;
      case 2048:
-          if(!(VBFlags & CRT1_LCDA)) {
-             if(VDisplay == 1536) {
-                if(VGAEngine == SIS_300_VGA) {
-	            ModeIndex = ModeIndex_300_2048x1536[Depth];
-  	        } else {
-	            ModeIndex = ModeIndex_310_2048x1536[Depth];
-                }
-	     }
+          if(VDisplay == 1536) {
+             if(VGAEngine == SIS_300_VGA) {
+	         ModeIndex = ModeIndex_300_2048x1536[Depth];
+  	     } else {
+	         ModeIndex = ModeIndex_310_2048x1536[Depth];
+             }
 	  }
           break;
    }
 
    return(ModeIndex);
 }
+#endif
 
 USHORT
 SiS_GetModeID_LCD(int VGAEngine, ULONG VBFlags, int HDisplay, int VDisplay,
@@ -783,7 +730,7 @@
 	case 512:
 	     if(CustomT != CUT_PANEL848) {
 	        if(!((VGAEngine == SIS_300_VGA) && (VBFlags & VB_TRUMPION))) {
-		   if(LCDwidth != 1024 || LCDheight != 600) {
+		   if(LCDwidth >= 1024 && LCDwidth != 1152 && LCDheight >= 768) {
 		      if(VDisplay == 384) {
 		         ModeIndex = ModeIndex_512x384[Depth];
 		      }
@@ -826,9 +773,6 @@
 	        if((VDisplay == 768) && (LCDheight == 768)) {
 		   ModeIndex = ModeIndex_310_1280x768[Depth];
 		}
-		if((VDisplay == 800) && (LCDheight == 800)) {
-		   ModeIndex = ModeIndex_310_1280x768[Depth];
-		}
 	     }
 	     break;
 	case 1360:
@@ -862,10 +806,14 @@
 	     else if(VDisplay == 240) ModeIndex = ModeIndex_320x240[Depth];
              break;
      	case 400:
-             if(VDisplay == 300) ModeIndex = ModeIndex_400x300[Depth];
+	     if(LCDwidth >= 800 && LCDheight >= 600) {
+                if(VDisplay == 300) ModeIndex = ModeIndex_400x300[Depth];
+	     }
              break;
 	case 512:
-	     if(VDisplay == 384) ModeIndex = ModeIndex_512x384[Depth];
+	     if(LCDwidth >= 1024 && LCDheight >= 768 && LCDwidth != 1152) {
+	        if(VDisplay == 384) ModeIndex = ModeIndex_512x384[Depth];
+	     }
 	     break;
 	case 640:
 	     if(VDisplay == 480)      ModeIndex = ModeIndex_640x480[Depth];
@@ -900,7 +848,8 @@
 	     break;
 	case 960:
 	     if(VGAEngine == SIS_315_VGA) {
-	        if(VDisplay == 540) ModeIndex = ModeIndex_960x540[Depth];
+	        if(VDisplay == 540)      ModeIndex = ModeIndex_960x540[Depth];
+		else if(VDisplay == 600) ModeIndex = ModeIndex_960x600[Depth];
 	     }
 	     break;
 	case 1024:
@@ -915,32 +864,27 @@
 	     }
 	     break;
 	case 1280:
-	     if(VDisplay == 1024) ModeIndex = ModeIndex_1280x1024[Depth];
-	     else if(VDisplay == 768) {
-		if((LCDheight == 768) ||  (LCDwidth == 1680) ||
-		   (VBFlags & VB_SISTMDS)) {
-		   if(VGAEngine == SIS_300_VGA) {
-		      ModeIndex = ModeIndex_300_1280x768[Depth];
-		   } else {
-		      ModeIndex = ModeIndex_310_1280x768[Depth];
-		   }
-		}
-	     } else if(VDisplay == 960) {
-	        if((LCDheight == 960) || (VBFlags & VB_SISTMDS)) {
-		   ModeIndex = ModeIndex_1280x960[Depth];
+	     switch(VDisplay) {
+	     case 720:
+	        ModeIndex = ModeIndex_1280x720[Depth];
+	     case 768:
+	        if(VGAEngine == SIS_300_VGA) {
+		   ModeIndex = ModeIndex_300_1280x768[Depth];
+		} else {
+		   ModeIndex = ModeIndex_310_1280x768[Depth];
 		}
-	     } else if(VGAEngine == SIS_315_VGA) {
-	        if(VDisplay == 800) {
-		   if((LCDheight == 800) || (LCDwidth == 1680) ||
-		      (VBFlags & VB_SISTMDS)) {
-		      ModeIndex = ModeIndex_1280x800[Depth];
-		   }
-		} else if(VDisplay == 720) {
-		   if((LCDheight == 720) || (LCDwidth == 1680) || (LCDwidth == 1400) ||
-		      (VBFlags & VB_SISTMDS)) {
-		      ModeIndex = ModeIndex_1280x720[Depth];
-		   }
+		break;
+	     case 800:
+	        if(VGAEngine == SIS_315_VGA) {
+		   ModeIndex = ModeIndex_1280x800[Depth];
 		}
+		break;
+	     case 960:
+	        ModeIndex = ModeIndex_1280x960[Depth];
+		break;
+	     case 1024:
+	        ModeIndex = ModeIndex_1280x1024[Depth];
+		break;
 	     }
 	     break;
 	case 1360:
@@ -950,27 +894,27 @@
 	     break;
 	case 1400:
 	     if(VGAEngine == SIS_315_VGA) {
-	        if(VBFlags & (VB_301B | VB_301C | VB_302B | VB_302LV | VB_302ELV)) {
-		   if((LCDwidth == 1400) || (LCDwidth == 1600) || (LCDwidth == 1680)) {
-		      ModeIndex = ModeIndex_1400x1050[Depth];
-		   }
+	        if(VBFlags & (VB_301C | VB_302LV | VB_302ELV)) {
+		   if(VDisplay == 1050) ModeIndex = ModeIndex_1400x1050[Depth];
 		}
 	     }
 	     break;
 	case 1600:
 	     if(VGAEngine == SIS_315_VGA) {
-	        if(VBFlags & (VB_301C | VB_302B | VB_302LV | VB_302ELV)) {
+	        if(VBFlags & (VB_301C | VB_302LV | VB_302ELV)) {
 	           if(VDisplay == 1200) ModeIndex = ModeIndex_1600x1200[Depth];
 		}
 	     }
 	     break;
+#ifndef VB_FORBID_CRT2LCD_OVER_1600
 	case 1680:
 	     if(VGAEngine == SIS_315_VGA) {
-	        if(VBFlags & (VB_301C | VB_302B | VB_302LV | VB_302ELV)) {
+	        if(VBFlags & (VB_301C | VB_302LV | VB_302ELV)) {
 	           if(VDisplay == 1050) ModeIndex = ModeIndex_1680x1050[Depth];
 		}
 	     }
 	     break;
+#endif
       }
    }
 
@@ -1030,8 +974,7 @@
 	case 720:
 	     if((!(VBFlags & TV_HIVISION)) && (!((VBFlags & TV_YPBPR) && (VBFlags & TV_YPBPR1080I)))) {
                 if(VDisplay == 480) {
-		   /* if((VBFlags & TV_YPBPR) || (VBFlags & (TV_NTSC | TV_PALM))) */
-                      ModeIndex = ModeIndex_720x480[Depth];
+                   ModeIndex = ModeIndex_720x480[Depth];
                 } else if(VDisplay == 576) {
 		   if( ((VBFlags & TV_YPBPR) && (VBFlags & TV_YPBPR750P)) ||
 		       ((!(VBFlags & (TV_YPBPR | TV_PALM))) && (VBFlags & TV_PAL)) )
@@ -1055,6 +998,15 @@
 		}
 	     }
 	     break;
+	case 960:
+	     if(VGAEngine == SIS_315_VGA) {
+	        if(VDisplay == 600) {
+		   if((VBFlags & TV_HIVISION) || ((VBFlags & TV_YPBPR) && (VBFlags & TV_YPBPR1080I))) {
+		      ModeIndex = ModeIndex_960x600[Depth];
+		   }
+		}
+	     }
+	     break;
 	case 1024:
 	     if(VDisplay == 768) {
 		if(VBFlags & (VB_301B|VB_301C|VB_302B|VB_301LV|VB_302LV|VB_302ELV)) {
@@ -1126,7 +1078,8 @@
 		break;
 	case 960:
 		if(VGAEngine == SIS_315_VGA) {
-		   if(VDisplay == 540) ModeIndex = ModeIndex_960x540[Depth];
+		   if(VDisplay == 540)      ModeIndex = ModeIndex_960x540[Depth];
+		   else if(VDisplay == 600) ModeIndex = ModeIndex_960x600[Depth];
 		}
 		break;
 	case 1024:
@@ -1407,6 +1360,8 @@
    case SIS_741:
    case SIS_660:
    case SIS_760:
+   case SIS_761:
+   case SIS_340:
       SiS_SetReg(SiS_Pr->SiS_P3c4,0x20,0xa1);
       /*  - Enable 2D (0x40)
        *  - Enable 3D (0x02)
@@ -1477,6 +1432,8 @@
    case SIS_741:
    case SIS_660:
    case SIS_760:
+   case SIS_761:
+   case SIS_340:
         temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x38);
       	temp = (temp & 0xe0) >> 5;
       	if((temp >= 2) && (temp <= 3)) 	SiS_Pr->SiS_IF_DEF_LVDS = 1;
@@ -1515,7 +1472,10 @@
    UCHAR  *ROMAddr  = HwInfo->pjVirtualRomBase;
    USHORT romversoffs, romvmaj = 1, romvmin = 0;
 
-   if(HwInfo->jChipType >= SIS_661) {
+   if(HwInfo->jChipType >= SIS_761) {
+      /* I very much assume 761 and 340 will use new layout */
+      return TRUE;
+   } else if(HwInfo->jChipType >= SIS_661) {
       if((ROMAddr[0x1a] == 'N') &&
          (ROMAddr[0x1b] == 'e') &&
          (ROMAddr[0x1c] == 'w') &&
@@ -1569,14 +1529,21 @@
          /* 315/330 series stick to the standard(s) */
 	 SiS_Pr->SiS_UseROM = TRUE;
 	 if((SiS_Pr->SiS_ROMNew = SiSDetermineROMLayout661(SiS_Pr, HwInfo))) {
+	    SiS_Pr->SiS_EMIOffset = 14;
+	    SiS_Pr->SiS661LCD2TableSize = 36;
 	    /* Find out about LCD data table entry size */
 	    if((romptr = SISGETROMW(0x0102))) {
 	       if(ROMAddr[romptr + (32 * 16)] == 0xff)
 	          SiS_Pr->SiS661LCD2TableSize = 32;
 	       else if(ROMAddr[romptr + (34 * 16)] == 0xff)
 	          SiS_Pr->SiS661LCD2TableSize = 34;
-	       else if(ROMAddr[romptr + (36 * 16)] == 0xff)
-	          SiS_Pr->SiS661LCD2TableSize = 36;  /* 0.94 final */
+	       else if(ROMAddr[romptr + (36 * 16)] == 0xff)	   /* 0.94 */
+	          SiS_Pr->SiS661LCD2TableSize = 36;
+	       else if( (ROMAddr[romptr + (38 * 16)] == 0xff) ||   /* 2.00.00 - 2.02.00 */
+	       	 	(ROMAddr[0x6F] & 0x01) ) {		   /* 2.03.00+ */
+		  SiS_Pr->SiS661LCD2TableSize = 38;
+		  SiS_Pr->SiS_EMIOffset = 16;
+	       }
 	    }
 	 }
       }
@@ -1661,7 +1628,7 @@
 void
 SiS_GetVBType(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
 {
-  USHORT flag=0, rev=0, nolcd=0;
+  USHORT flag=0, rev=0, nolcd=0, p4_0f, p4_25, p4_27;
 
   SiS_Pr->SiS_VBType = 0;
 
@@ -1697,13 +1664,27 @@
 	SiS_Pr->SiS_VBType = VB_SIS301LV;
      }
   }
+  if(SiS_Pr->SiS_VBType & (VB_301C | VB_301LV | VB_302LV | VB_302ELV)) {
+     p4_0f = SiS_GetReg(SiS_Pr->SiS_Part4Port,0x0f);
+     p4_25 = SiS_GetReg(SiS_Pr->SiS_Part4Port,0x25);
+     p4_27 = SiS_GetReg(SiS_Pr->SiS_Part4Port,0x27);
+     SiS_SetRegAND(SiS_Pr->SiS_Part4Port,0x0f,0x7f);
+     SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x25,0x08);
+     SiS_SetRegAND(SiS_Pr->SiS_Part4Port,0x27,0xfd);
+     if(SiS_GetReg(SiS_Pr->SiS_Part4Port,0x26) & 0x08) {
+        SiS_Pr->SiS_VBType |= VB_UMC;
+     }
+     SiS_SetReg(SiS_Pr->SiS_Part4Port,0x27,p4_27);
+     SiS_SetReg(SiS_Pr->SiS_Part4Port,0x25,p4_25);
+     SiS_SetReg(SiS_Pr->SiS_Part4Port,0x0f,p4_0f);
+  }
 }
 
 /*********************************************/
 /*           HELPER: Check RAM size          */
 /*********************************************/
 
-#ifndef LINUX_XF86
+#ifdef LINUX_KERNEL
 static BOOLEAN
 SiS_CheckMemorySize(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,
                     USHORT ModeNo, USHORT ModeIdIndex)
@@ -1743,7 +1724,10 @@
    if((*SiS_Pr->pSiS_SoftSetting) & SoftDRAMType) {
      data = (*SiS_Pr->pSiS_SoftSetting) & 0x03;
    } else {
-     if(HwInfo->jChipType >= SIS_661) {
+     if(HwInfo->jChipType >= SIS_340) {
+        /* TODO */
+	data = 0;
+     } if(HwInfo->jChipType >= SIS_661) {
         data = SiS_GetReg(SiS_Pr->SiS_P3d4,0x78) & 0x07;
 	if(SiS_Pr->SiS_ROMNew) {
 	   data = ((SiS_GetReg(SiS_Pr->SiS_P3d4,0x78) & 0xc0) >> 6);
@@ -1771,10 +1755,10 @@
    return data;
 }
 
-USHORT
+static USHORT
 SiS_GetMCLK(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
 {
-  UCHAR  *ROMAddr  = HwInfo->pjVirtualRomBase;
+  UCHAR  *ROMAddr = HwInfo->pjVirtualRomBase;
   USHORT index;
 
   index = SiS_Get310DRAMType(SiS_Pr, HwInfo);
@@ -1796,26 +1780,26 @@
 /*           HELPER: ClearBuffer             */
 /*********************************************/
 
-#ifndef LINUX_XF86
+#ifdef LINUX_KERNEL
 static void
 SiS_ClearBuffer(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, USHORT ModeNo)
 {
-  UCHAR   *VideoMemoryAddress = HwInfo->pjVideoMemoryAddress;
-  ULONG   AdapterMemorySize  = (ULONG)HwInfo->ulVideoMemorySize;
-  USHORT  *pBuffer;
+  UCHAR SISIOMEMTYPE *VideoMemoryAddress = HwInfo->pjVideoMemoryAddress;
+  ULONG  AdapterMemorySize = HwInfo->ulVideoMemorySize;
+  USHORT SISIOMEMTYPE *pBuffer;
   int i;
 
   if(SiS_Pr->SiS_ModeType >= ModeEGA) {
      if(ModeNo > 0x13) {
         SiS_SetMemory(VideoMemoryAddress, AdapterMemorySize, 0);
      } else {
-        pBuffer = (USHORT *)VideoMemoryAddress;
-        for(i=0; i<0x4000; i++) pBuffer[i] = 0x0000;
+        pBuffer = (USHORT SISIOMEMTYPE *)VideoMemoryAddress;
+        for(i=0; i<0x4000; i++) writew(0x0000, &pBuffer[i]);
      }
   } else {
      if(SiS_Pr->SiS_ModeType < ModeCGA) {
-        pBuffer = (USHORT *)VideoMemoryAddress;
-        for(i=0; i<0x4000; i++) pBuffer[i] = 0x0720;
+        pBuffer = (USHORT SISIOMEMTYPE *)VideoMemoryAddress;
+        for(i=0; i<0x4000; i++) writew(0x0720, &pBuffer[i]);
      } else {
         SiS_SetMemory(VideoMemoryAddress, 0x8000, 0);
      }
@@ -1927,25 +1911,26 @@
 static void
 SiS_SetupCR5x(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
 {
-   if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) {
-      if(IS_SIS650) {
-	 SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x51,0x1f);
-	 if(IS_SIS651) SiS_SetRegOR(SiS_Pr->SiS_P3d4,0x51,0x20);
-	 SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x56,0xe7);
-      } else if(IS_SIS661741660760) {
-         SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x61,0xf7);
-	 SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x51,0x1f);
-	 SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x56,0xe7);
-	 if(!SiS_Pr->SiS_ROMNew) {
-	    SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x3a,0xef);
-	 }
-      }
-   }
+    if(IS_SIS650) {
+       if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) {
+	  SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x51,0x1f);
+	  if(IS_SIS651) SiS_SetRegOR(SiS_Pr->SiS_P3d4,0x51,0x20);
+	  SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x56,0xe7);
+       }
+    } else if(IS_SIS661741660760) {
+       SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x61,0xf7);
+       SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x51,0x1f);
+       SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x56,0xe7);
+       if(!SiS_Pr->SiS_ROMNew) {
+	  SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x3a,0xef);
+       }
+    }
 }
 
 static void
 SiS_HandleCRT1(SiS_Private *SiS_Pr)
 {
+  /* Enable CRT1 gating */
   SiS_SetRegAND(SiS_Pr->SiS_P3d4,SiS_Pr->SiS_MyCR63,0xbf);
 #if 0
   if(!(SiS_GetReg(SiS_Pr->SiS_P3c4,0x15) & 0x01)) {
@@ -1978,7 +1963,7 @@
     	modeflag = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
   }
 
-  index = (modeflag & ModeInfoFlag) - ModeEGA;
+  index = (modeflag & ModeTypeMask) - ModeEGA;
   if(index < 0) index = 0;
   return(ColorDepth[index]);
 }
@@ -2736,7 +2721,7 @@
      data2 = (data2 & 0xC0) >> 5;
      data2 <<= 8;
 
-#ifndef LINUX_XF86
+#ifdef LINUX_KERNEL
      SiS_SetRegLong(0xcf8,0x80000050);
      eax = SiS_GetRegLong(0xcfc);
      eax &= 0xfffff9ff;
@@ -2758,7 +2743,7 @@
      data2 = (data2 & 0x0f00) | ((data2 & 0x3000) >> 8);
      data2 <<= 20;
 
-#ifndef LINUX_XF86
+#ifdef LINUX_KERNEL
      SiS_SetRegLong(0xcf8,0x800000A0);
      eax = SiS_GetRegLong(0xcfc);
      eax &= 0x00ffffff;
@@ -2777,7 +2762,7 @@
      data2 = (data2 & 0xf0) >> 4;
      data2 <<= 24;
 
-#ifndef LINUX_XF86
+#ifdef LINUX_KERNEL
      SiS_SetRegLong(0xcf8,0x80000050);
      eax = SiS_GetRegLong(0xcfc);
      eax &= 0xf0ffffff;
@@ -2795,7 +2780,7 @@
      data2 &= 0x0f;
      data2 <<= 24;
 
-#ifndef LINUX_XF86
+#ifdef LINUX_KERNEL
      SiS_SetRegLong(0xcf8,0x800000A0);
      eax = SiS_GetRegLong(0xcfc);
      eax &= 0xf0ffffff;
@@ -3079,6 +3064,8 @@
 	}
      }
      SiS_SetReg(SiS_Pr->SiS_P3c4,0x17,data);
+  } else if(HwInfo->jChipType == SIS_340) {
+     /* TODO */
   }
 #endif
 
@@ -3327,7 +3314,7 @@
 
   SiS_LoadDAC(SiS_Pr, HwInfo, ModeNo, ModeIdIndex);
 
-#ifndef LINUX_XF86
+#ifdef LINUX_KERNEL
   if(SiS_Pr->SiS_flag_clearbuffer) {
      SiS_ClearBuffer(SiS_Pr,HwInfo,ModeNo);
   }
@@ -3340,7 +3327,7 @@
 }
 
 /*********************************************/
-/*         HELPER: RESET VIDEO BRIDGE        */
+/*       HELPER: VIDEO BRIDGE PROG CLK       */
 /*********************************************/
 
 static void
@@ -3349,17 +3336,16 @@
    UCHAR  *ROMAddr  = HwInfo->pjVirtualRomBase;
    USHORT temp;
 
+   /* VB programming clock */
    if(SiS_Pr->SiS_UseROM) {
       if(HwInfo->jChipType < SIS_330) {
          temp = ROMAddr[VB310Data_1_2_Offset] | 0x40;
 	 if(SiS_Pr->SiS_ROMNew) temp = ROMAddr[0x80] | 0x40;
-         SiS_SetReg(SiS_Pr->SiS_Part1Port,0x02,temp);
+	 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x02,temp);
       } else if(HwInfo->jChipType >= SIS_661) {
-         temp = ROMAddr[0x7e];
-         if(SiS_Pr->SiS_ROMNew) temp = ROMAddr[0x80];
-         if(HwInfo->jChipType >= SIS_660)                  temp |= 0x40;
-         else if(SiS_GetReg(SiS_Pr->SiS_P3d4,0x7b) >= 100) temp |= 0x40;
-         SiS_SetReg(SiS_Pr->SiS_Part1Port,0x02,temp);
+         temp = ROMAddr[0x7e] | 0x40;
+         if(SiS_Pr->SiS_ROMNew) temp = ROMAddr[0x80] | 0x40;
+	 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x02,temp);
       }
    }
 }
@@ -3453,7 +3439,7 @@
    USHORT  ModeIdIndex;
    SISIOADDRESS BaseAddr = HwInfo->ulIOAddress;
    unsigned char backupreg=0;
-#ifndef LINUX_XF86
+#ifdef LINUX_KERNEL
    USHORT  KeepLockReg;
    ULONG   temp;
 
@@ -3482,13 +3468,13 @@
    SiS_Pr->SiS_flag_clearbuffer = 0;
 
    if(!SiS_Pr->UseCustomMode) {
-#ifndef LINUX_XF86
+#ifdef LINUX_KERNEL
       if(!(ModeNo & 0x80)) SiS_Pr->SiS_flag_clearbuffer = 1;
 #endif
       ModeNo &= 0x7f;
    }
 
-#ifndef LINUX_XF86
+#ifdef LINUX_KERNEL
    KeepLockReg = SiS_GetReg(SiS_Pr->SiS_P3c4,0x05);
 #endif
    SiS_SetReg(SiS_Pr->SiS_P3c4,0x05,0x86);
@@ -3523,7 +3509,7 @@
    SiS_GetLCDResInfo(SiS_Pr, ModeNo, ModeIdIndex, HwInfo);
    SiS_SetLowModeTest(SiS_Pr, ModeNo, HwInfo);
 
-#ifndef LINUX_XF86
+#ifdef LINUX_KERNEL
    /* 3. Check memory size (Kernel framebuffer driver only) */
    temp = SiS_CheckMemorySize(SiS_Pr, HwInfo, ModeNo, ModeIdIndex);
    if(!temp) return(0);
@@ -3612,7 +3598,7 @@
    }
 #endif
 
-#ifndef LINUX_XF86  /* We never lock registers in XF86 */
+#ifdef LINUX_KERNEL  /* We never lock registers in XF86 */
    if(KeepLockReg == 0xA1) SiS_SetReg(SiS_Pr->SiS_P3c4,0x05,0x86);
    else SiS_SetReg(SiS_Pr->SiS_P3c4,0x05,0x00);
 #endif
@@ -3630,27 +3616,28 @@
 SiSBIOSSetMode(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, ScrnInfoPtr pScrn,
                DisplayModePtr mode, BOOLEAN IsCustom)
 {
-   SISPtr  pSiS = SISPTR(pScrn);
-   UShort  ModeNo=0;
+   SISPtr pSiS = SISPTR(pScrn);
+   UShort ModeNo = 0;
 
    SiS_Pr->UseCustomMode = FALSE;
 
    if((IsCustom) && (SiS_CheckBuildCustomMode(pScrn, mode, pSiS->VBFlags))) {
 
-         xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 3, "Setting custom mode %dx%d\n",
+      xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 3, "Setting custom mode %dx%d\n",
 	 	SiS_Pr->CHDisplay,
 		(mode->Flags & V_INTERLACE ? SiS_Pr->CVDisplay * 2 :
 		   (mode->Flags & V_DBLSCAN ? SiS_Pr->CVDisplay / 2 :
 		      SiS_Pr->CVDisplay)));
 
-	 return(SiSSetMode(SiS_Pr, HwInfo, pScrn, ModeNo, TRUE));
+   } else {
 
-   }
+      /* Don't need vbflags here; checks done earlier */
+      ModeNo = SiS_GetModeNumber(pScrn, mode, 0);
+      if(!ModeNo) return FALSE;
 
-   ModeNo = SiS_CalcModeIndex(pScrn, mode, pSiS->VBFlags, pSiS->HaveCustomModes);
-   if(!ModeNo) return FALSE;
+      xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 3, "Setting standard mode 0x%x\n", ModeNo);
 
-   xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 3, "Setting standard mode 0x%x\n", ModeNo);
+   }
 
    return(SiSSetMode(SiS_Pr, HwInfo, pScrn, ModeNo, TRUE));
 }
@@ -3675,9 +3662,8 @@
    SiS_Pr->UseCustomMode = FALSE;
 
    /* Remember: Custom modes for CRT2 are ONLY supported
-    * 		-) on 315/330 series,
-    *           -) on the 30x/B/C, and
-    *           -) if CRT2 is LCD or VGA
+    *     -) on the 30x/B/C, and
+    *     -) if CRT2 is LCD or VGA, or CRT1 is LCDA
     */
 
    if((IsCustom) && (SiS_CheckBuildCustomMode(pScrn, mode, pSiS->VBFlags))) {
@@ -3686,13 +3672,7 @@
 
    } else {
 
-         BOOLEAN havecustommodes = pSiS->HaveCustomModes;
-
-#ifdef SISMERGED
-	 if(pSiS->MergedFB) havecustommodes = pSiS->HaveCustomModes2;
-#endif
-
-         ModeNo = SiS_CalcModeIndex(pScrn, mode, pSiS->VBFlags, havecustommodes);
+         ModeNo = SiS_GetModeNumber(pScrn, mode, 0);
          if(!ModeNo) return FALSE;
 
    }
@@ -3731,7 +3711,7 @@
    }
 #endif
 
-   /* We don't clear the buffer under X */
+   /* We don't clear the buffer in X */
    SiS_Pr->SiS_flag_clearbuffer=0;
 
    if(SiS_Pr->UseCustomMode) {
@@ -3870,7 +3850,7 @@
 
    } else {
 
-         ModeNo = SiS_CalcModeIndex(pScrn, mode, pSiS->VBFlags, pSiS->HaveCustomModes);
+         ModeNo = SiS_GetModeNumber(pScrn, mode, 0);
          if(!ModeNo) return FALSE;
 
          xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 3,
@@ -3889,7 +3869,7 @@
    SiSSetLVDSetc(SiS_Pr, HwInfo);
    SiSDetermineROMUsage(SiS_Pr, HwInfo);
 
-   /* We don't clear the buffer under X */
+   /* We don't clear the buffer in X */
    SiS_Pr->SiS_flag_clearbuffer = 0;
 
    SiS_SetReg(SiS_Pr->SiS_P3c4,0x05,0x86);
@@ -4267,18 +4247,12 @@
 #endif
 }
 
-/* ================ XFREE86 ================= */
-
-/* Helper functions */
-
 #ifdef LINUX_XF86
 
-USHORT
-SiS_CheckBuildCustomMode(ScrnInfoPtr pScrn, DisplayModePtr mode, int VBFlags)
+void
+SiS_MakeClockRegs(ScrnInfoPtr pScrn, int clock, UCHAR *p2b, UCHAR *p2c)
 {
-   SISPtr pSiS = SISPTR(pScrn);
-   int    out_n, out_dn, out_div, out_sbit, out_scale;
-   int    depth = pSiS->CurrentLayout.bitsPerPixel;
+   int          out_n, out_dn, out_div, out_sbit, out_scale;
    unsigned int vclk[5];
 
 #define Midx         0
@@ -4287,6 +4261,50 @@
 #define Pidx         3
 #define PSNidx       4
 
+   if(SiS_compute_vclk(clock, &out_n, &out_dn, &out_div, &out_sbit, &out_scale)) {
+      (*p2b) = (out_div == 2) ? 0x80 : 0x00;
+      (*p2b) |= ((out_n - 1) & 0x7f);
+      (*p2c) = (out_dn - 1) & 0x1f;
+      (*p2c) |= (((out_scale - 1) & 3) << 5);
+      (*p2c) |= ((out_sbit & 0x01) << 7);
+#ifdef TWDEBUG
+      xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Clock %d: n %d dn %d div %d sb %d sc %d\n",
+        	 clock, out_n, out_dn, out_div, out_sbit, out_scale);
+#endif
+   } else {
+      SiSCalcClock(pScrn, clock, 2, vclk);
+      (*p2b) = (vclk[VLDidx] == 2) ? 0x80 : 0x00;
+      (*p2b) |= (vclk[Midx] - 1) & 0x7f;
+      (*p2c) = (vclk[Nidx] - 1) & 0x1f;
+      if(vclk[Pidx] <= 4) {
+         /* postscale 1,2,3,4 */
+         (*p2c) |= ((vclk[Pidx] - 1) & 3) << 5;
+      } else {
+         /* postscale 6,8 */
+         (*p2c) |= (((vclk[Pidx] / 2) - 1) & 3) << 5;
+	 (*p2c) |= 0x80;
+      }
+#ifdef TWDEBUG
+      xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Clock %d: n %d dn %d div %d sc %d\n",
+        	 clock, vclk[Midx], vclk[Nidx], vclk[VLDidx], vclk[Pidx]);
+#endif
+   }
+}
+
+#endif
+
+/* ================ XFREE86/X.ORG ================= */
+
+/* Helper functions */
+
+#ifdef LINUX_XF86
+
+USHORT
+SiS_CheckBuildCustomMode(ScrnInfoPtr pScrn, DisplayModePtr mode, int VBFlags)
+{
+   SISPtr pSiS = SISPTR(pScrn);
+   int    depth = pSiS->CurrentLayout.bitsPerPixel;
+
    pSiS->SiS_Pr->CModeFlag = 0;
    
    pSiS->SiS_Pr->CDClock = mode->Clock;
@@ -4322,34 +4340,7 @@
    pSiS->SiS_Pr->CVBlankStart = pSiS->SiS_Pr->CVSyncStart - 1;
    pSiS->SiS_Pr->CVBlankEnd = pSiS->SiS_Pr->CVTotal;
 
-   if(SiS_compute_vclk(pSiS->SiS_Pr->CDClock, &out_n, &out_dn, &out_div, &out_sbit, &out_scale)) {
-      pSiS->SiS_Pr->CSR2B = (out_div == 2) ? 0x80 : 0x00;
-      pSiS->SiS_Pr->CSR2B |= ((out_n - 1) & 0x7f);
-      pSiS->SiS_Pr->CSR2C = (out_dn - 1) & 0x1f;
-      pSiS->SiS_Pr->CSR2C |= (((out_scale - 1) & 3) << 5);
-      pSiS->SiS_Pr->CSR2C |= ((out_sbit & 0x01) << 7);
-#ifdef TWDEBUG
-      xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Clock %d: n %d dn %d div %d sb %d sc %d\n",
-        	pSiS->SiS_Pr->CDClock, out_n, out_dn, out_div, out_sbit, out_scale);
-#endif
-   } else {
-      SiSCalcClock(pScrn, pSiS->SiS_Pr->CDClock, 2, vclk);
-      pSiS->SiS_Pr->CSR2B = (vclk[VLDidx] == 2) ? 0x80 : 0x00;
-      pSiS->SiS_Pr->CSR2B |= (vclk[Midx] - 1) & 0x7f;
-      pSiS->SiS_Pr->CSR2C = (vclk[Nidx] - 1) & 0x1f;
-      if(vclk[Pidx] <= 4) {
-         /* postscale 1,2,3,4 */
-         pSiS->SiS_Pr->CSR2C |= ((vclk[Pidx] - 1) & 3) << 5;
-      } else {
-         /* postscale 6,8 */
-         pSiS->SiS_Pr->CSR2C |= (((vclk[Pidx] / 2) - 1) & 3) << 5;
-	 pSiS->SiS_Pr->CSR2C |= 0x80;
-      }
-#ifdef TWDEBUG
-      xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Clock %d: n %d dn %d div %d sc %d\n",
-        	pSiS->SiS_Pr->CDClock, vclk[Midx], vclk[Nidx], vclk[VLDidx], vclk[Pidx]);
-#endif
-   }
+   SiS_MakeClockRegs(pScrn, pSiS->SiS_Pr->CDClock, &pSiS->SiS_Pr->CSR2B, &pSiS->SiS_Pr->CSR2C);
 
    pSiS->SiS_Pr->CSRClock = (pSiS->SiS_Pr->CDClock / 1000) + 1;
 
@@ -4407,7 +4398,41 @@
    return 1;
 }
 
-/* Build a list of supported modes */
+int
+SiS_FindPanelFromDB(SISPtr pSiS, USHORT panelvendor, USHORT panelproduct, int *maxx, int *maxy, int *prefx, int *prefy)
+{
+   int i, j;
+   BOOLEAN done = FALSE;
+
+   i = 0;
+   while((!done) && (SiS_PlasmaTable[i].vendor) && panelvendor) {
+      if(SiS_PlasmaTable[i].vendor == panelvendor) {
+         for(j=0; j<SiS_PlasmaTable[i].productnum; j++) {
+	    if(SiS_PlasmaTable[i].product[j] == panelproduct) {
+	       if(SiS_PlasmaTable[i].maxx && SiS_PlasmaTable[i].maxy) {
+	          (*maxx) = (int)SiS_PlasmaTable[i].maxx;
+		  (*maxy) = (int)SiS_PlasmaTable[i].maxy;
+		  (*prefx) = (int)SiS_PlasmaTable[i].prefx;
+		  (*prefy) = (int)SiS_PlasmaTable[i].prefy;
+		  done = TRUE;
+		  xf86DrvMsg(pSiS->pScrn->scrnIndex, X_PROBED,
+	       	        "Identified %s, correcting max X res %d, max Y res %d\n",
+			 SiS_PlasmaTable[i].plasmaname,
+		         SiS_PlasmaTable[i].maxx, SiS_PlasmaTable[i].maxy);
+	          break;
+	       }
+ 	    }
+	 }
+      }
+      i++;
+   }
+   return (done) ? 1 : 0;
+}
+
+/* Build a list of supported modes:
+ * Built-in modes for which we have all data are M_T_DEFAULT,
+ * modes derived from DDC or database data are M_T_BUILTIN
+ */
 DisplayModePtr
 SiSBuildBuiltInModeList(ScrnInfoPtr pScrn, BOOLEAN includelcdmodes, BOOLEAN isfordvi)
 {
@@ -4717,27 +4742,6 @@
 	 current->VTotal >>= 1;
       }
 
-#if 0
-      if((backup = xalloc(sizeof(DisplayModeRec)))) {
-         if(!pSiS->backupmodelist) pSiS->backupmodelist = backup;
-	 else {
-	    pSiS->backupmodelist->next = backup;
-	    backup->prev = pSiS->backupmodelist;
-	 }
-	 backup->next = NULL;
-	 backup->HDisplay = current->HDisplay;
-         backup->HSyncStart = current->HSyncStart;
-         backup->HSyncEnd = current->HSyncEnd;
-         backup->HTotal = current->HTotal;
-         backup->VDisplay = current->VDisplay;
-         backup->VSyncStart = current->VSyncStart;
-         backup->VSyncEnd = current->VSyncEnd;
-         backup->VTotal = current->VTotal;
-	 backup->Flags = current->Flags;
-	 backup->Clock = current->Clock;
-      }
-#endif
-
 #ifdef TWDEBUG
       xf86DrvMsg(pScrn->scrnIndex, X_INFO,
       	"Built-in: %s %.2f %d %d %d %d %d %d %d %d\n",
@@ -4781,10 +4785,18 @@
 		     if(!(SiS_PlasmaTable[i].plasmamodes[k] & 0x40)) continue;
 		  }
 
+		  l = SiS_PlasmaTable[i].plasmamodes[k] & 0x3f;
+
+		  if(pSiS->VBFlags & (VB_301|VB_301B|VB_302B|VB_301LV)) {
+		     if(isfordvi) {
+		        if(SiS_PlasmaMode[l].VDisplay > 1024) continue;
+		     }
+		  }
+
 	          if(!(new = xalloc(sizeof(DisplayModeRec)))) return first;
 
                   memset(new, 0, sizeof(DisplayModeRec));
-                  if(!(new->name = xalloc(10))) {
+                  if(!(new->name = xalloc(12))) {
       		     xfree(new);
 		     return first;
                   }
@@ -4798,10 +4810,9 @@
 
 		  pSiS->AddedPlasmaModes = TRUE;
 
-		  l = SiS_PlasmaTable[i].plasmamodes[k] & 0x3f;
-
-	          sprintf(current->name, "%dx%d", SiS_PlasmaMode[l].HDisplay,
-                                                  SiS_PlasmaMode[l].VDisplay);
+		  strcpy(current->name, SiS_PlasmaMode[l].name);
+	          /* sprintf(current->name, "%dx%d", SiS_PlasmaMode[l].HDisplay,
+                                                  SiS_PlasmaMode[l].VDisplay); */
 
                   current->status = MODE_OK;
 
@@ -4849,6 +4860,9 @@
 	          if(current->VDisplay > pSiS->LCDheight)
 		     pSiS->LCDheight = pSiS->SiS_Pr->CP_MaxY = current->VDisplay;
 
+		  xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
+		  	"\tAdding \"%s\" to list of built-in modes\n", current->name);
+
                }
 	       done = TRUE;
 	       break;
@@ -4938,12 +4952,12 @@
 
 }
 
-/* Build a list of supported modes */
+/* Translate a mode number into the VESA pendant */
 int
 SiSTranslateToVESA(ScrnInfoPtr pScrn, int modenumber)
 {
-   SISPtr         pSiS = SISPTR(pScrn);
-   int i;
+   SISPtr pSiS = SISPTR(pScrn);
+   int    i = 0;
 
    /* Initialize our pointers */
    if(pSiS->VGAEngine == SIS_300_VGA) {
@@ -4962,15 +4976,48 @@
 
    if(modenumber <= 0x13) return modenumber;
 
-   i = 0;
-   while(pSiS->SiS_Pr->SiS_EModeIDTable[i].Ext_ModeID != 0xff) {
-      if(pSiS->SiS_Pr->SiS_EModeIDTable[i].Ext_ModeID == modenumber) {
-         return (int)pSiS->SiS_Pr->SiS_EModeIDTable[i].Ext_VESAID;
+#ifdef SIS315H
+   if(pSiS->ROM661New) {
+      while(SiS_EModeIDTable661[i].Ext_ModeID != 0xff) {
+         if(SiS_EModeIDTable661[i].Ext_ModeID == modenumber) {
+            return (int)SiS_EModeIDTable661[i].Ext_VESAID;
+         }
+         i++;
       }
-      i++;
+   } else {
+#endif
+      while(pSiS->SiS_Pr->SiS_EModeIDTable[i].Ext_ModeID != 0xff) {
+         if(pSiS->SiS_Pr->SiS_EModeIDTable[i].Ext_ModeID == modenumber) {
+            return (int)pSiS->SiS_Pr->SiS_EModeIDTable[i].Ext_VESAID;
+         }
+         i++;
+      }
+#ifdef SIS315H
    }
+#endif
    return -1;
 }
+
+/* Translate a new BIOS mode number into the driver's pendant */
+int
+SiSTranslateToOldMode(int modenumber)
+{
+#ifdef SIS315H
+   int    i = 0;
+
+   while(SiS_EModeIDTable661[i].Ext_ModeID != 0xff) {
+      if(SiS_EModeIDTable661[i].Ext_ModeID == modenumber) {
+         if(SiS_EModeIDTable661[i].Ext_MyModeID)
+            return (int)SiS_EModeIDTable661[i].Ext_MyModeID;
+	 else
+	    return modenumber;
+      }
+      i++;
+   }
+#endif
+   return modenumber;
+}
+
 #endif  /* Xfree86 */
 
 #ifdef LINUX_KERNEL
diff -Nru a/drivers/video/sis/init.h b/drivers/video/sis/init.h
--- a/drivers/video/sis/init.h	2005-01-10 20:11:21 -08:00
+++ b/drivers/video/sis/init.h	2005-01-10 20:11:22 -08:00
@@ -35,7 +35,7 @@
  * * 3) The name of the author may not be used to endorse or promote products
  * *    derived from this software without specific prior written permission.
  * *
- * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESSED OR
+ * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  * * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  * * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
@@ -54,21 +54,16 @@
 #define _INIT_
 
 #include "osdef.h"
-
 #include "initdef.h"
-#include "vgatypes.h"
-#include "vstruct.h"
 
 #ifdef LINUX_XF86
-#include "xf86.h"
-#include "xf86Pci.h"
-#include "xf86PciInfo.h"
-#include "xf86_OSproc.h"
 #include "sis.h"
 #include "sis_regs.h"
 #endif
 
 #ifdef LINUX_KERNEL
+#include "vgatypes.h"
+#include "vstruct.h"
 #ifdef SIS_CP
 #undef SIS_CP
 #endif
@@ -85,43 +80,44 @@
 #endif
 
 /* Mode numbers */
-const USHORT  ModeIndex_320x200[]      = {0x59, 0x41, 0x00, 0x4f};
-const USHORT  ModeIndex_320x240[]      = {0x50, 0x56, 0x00, 0x53};
-const USHORT  ModeIndex_320x240_FSTN[] = {0x5a, 0x5b, 0x00, 0x00};  /* FSTN */
-const USHORT  ModeIndex_400x300[]      = {0x51, 0x57, 0x00, 0x54};
-const USHORT  ModeIndex_512x384[]      = {0x52, 0x58, 0x00, 0x5c};
-const USHORT  ModeIndex_640x400[]      = {0x2f, 0x5d, 0x00, 0x5e};
-const USHORT  ModeIndex_640x480[]      = {0x2e, 0x44, 0x00, 0x62};
-const USHORT  ModeIndex_720x480[]      = {0x31, 0x33, 0x00, 0x35};
-const USHORT  ModeIndex_720x576[]      = {0x32, 0x34, 0x00, 0x36};
-const USHORT  ModeIndex_768x576[]      = {0x5f, 0x60, 0x00, 0x61};
-const USHORT  ModeIndex_800x480[]      = {0x70, 0x7a, 0x00, 0x76};
-const USHORT  ModeIndex_800x600[]      = {0x30, 0x47, 0x00, 0x63};
-const USHORT  ModeIndex_848x480[]      = {0x39, 0x3b, 0x00, 0x3e};
-const USHORT  ModeIndex_856x480[]      = {0x3f, 0x42, 0x00, 0x45};
-const USHORT  ModeIndex_960x540[]      = {0x1d, 0x1e, 0x00, 0x1f};  /* 315 series only */
-const USHORT  ModeIndex_1024x768[]     = {0x38, 0x4a, 0x00, 0x64};
-const USHORT  ModeIndex_1024x576[]     = {0x71, 0x74, 0x00, 0x77};
-const USHORT  ModeIndex_1024x600[]     = {0x20, 0x21, 0x00, 0x22};  /* 300 series only */
-const USHORT  ModeIndex_1280x1024[]    = {0x3a, 0x4d, 0x00, 0x65};
-const USHORT  ModeIndex_1280x960[]     = {0x7c, 0x7d, 0x00, 0x7e};
-const USHORT  ModeIndex_1152x768[]     = {0x23, 0x24, 0x00, 0x25};  /* 300 series only */
-const USHORT  ModeIndex_1152x864[]     = {0x29, 0x2a, 0x00, 0x2b};
-const USHORT  ModeIndex_300_1280x768[] = {0x55, 0x5a, 0x00, 0x5b};
-const USHORT  ModeIndex_310_1280x768[] = {0x23, 0x24, 0x00, 0x25};
-const USHORT  ModeIndex_1280x720[]     = {0x79, 0x75, 0x00, 0x78};
-const USHORT  ModeIndex_1280x800[]     = {0x14, 0x15, 0x00, 0x16};
-const USHORT  ModeIndex_1360x768[]     = {0x48, 0x4b, 0x00, 0x4e};
-const USHORT  ModeIndex_300_1360x1024[]= {0x67, 0x6f, 0x00, 0x72};  /* 300 series, BARCO only */
-const USHORT  ModeIndex_1400x1050[]    = {0x26, 0x27, 0x00, 0x28};  /* 315 series only */
-const USHORT  ModeIndex_1680x1050[]    = {0x17, 0x18, 0x00, 0x19};  /* 315 series only */
-const USHORT  ModeIndex_1600x1200[]    = {0x3c, 0x3d, 0x00, 0x66};
-const USHORT  ModeIndex_1920x1080[]    = {0x2c, 0x2d, 0x00, 0x73};  /* 315 series only */
-const USHORT  ModeIndex_1920x1440[]    = {0x68, 0x69, 0x00, 0x6b};
-const USHORT  ModeIndex_300_2048x1536[]= {0x6c, 0x6d, 0x00, 0x00};
-const USHORT  ModeIndex_310_2048x1536[]= {0x6c, 0x6d, 0x00, 0x6e};
+static const USHORT ModeIndex_320x200[]      = {0x59, 0x41, 0x00, 0x4f};
+static const USHORT ModeIndex_320x240[]      = {0x50, 0x56, 0x00, 0x53};
+static const USHORT ModeIndex_320x240_FSTN[] = {0x5a, 0x5b, 0x00, 0x00};  /* FSTN */
+static const USHORT ModeIndex_400x300[]      = {0x51, 0x57, 0x00, 0x54};
+static const USHORT ModeIndex_512x384[]      = {0x52, 0x58, 0x00, 0x5c};
+static const USHORT ModeIndex_640x400[]      = {0x2f, 0x5d, 0x00, 0x5e};
+static const USHORT ModeIndex_640x480[]      = {0x2e, 0x44, 0x00, 0x62};
+static const USHORT ModeIndex_720x480[]      = {0x31, 0x33, 0x00, 0x35};
+static const USHORT ModeIndex_720x576[]      = {0x32, 0x34, 0x00, 0x36};
+static const USHORT ModeIndex_768x576[]      = {0x5f, 0x60, 0x00, 0x61};
+static const USHORT ModeIndex_800x480[]      = {0x70, 0x7a, 0x00, 0x76};
+static const USHORT ModeIndex_800x600[]      = {0x30, 0x47, 0x00, 0x63};
+static const USHORT ModeIndex_848x480[]      = {0x39, 0x3b, 0x00, 0x3e};
+static const USHORT ModeIndex_856x480[]      = {0x3f, 0x42, 0x00, 0x45};
+static const USHORT ModeIndex_960x540[]      = {0x1d, 0x1e, 0x00, 0x1f};  /* 315 series only */
+static const USHORT ModeIndex_960x600[]      = {0x20, 0x21, 0x00, 0x22};  /* 315 series only */
+static const USHORT ModeIndex_1024x768[]     = {0x38, 0x4a, 0x00, 0x64};
+static const USHORT ModeIndex_1024x576[]     = {0x71, 0x74, 0x00, 0x77};
+static const USHORT ModeIndex_1024x600[]     = {0x20, 0x21, 0x00, 0x22};  /* 300 series only */
+static const USHORT ModeIndex_1280x1024[]    = {0x3a, 0x4d, 0x00, 0x65};
+static const USHORT ModeIndex_1280x960[]     = {0x7c, 0x7d, 0x00, 0x7e};
+static const USHORT ModeIndex_1152x768[]     = {0x23, 0x24, 0x00, 0x25};  /* 300 series only */
+static const USHORT ModeIndex_1152x864[]     = {0x29, 0x2a, 0x00, 0x2b};
+static const USHORT ModeIndex_300_1280x768[] = {0x55, 0x5a, 0x00, 0x5b};
+static const USHORT ModeIndex_310_1280x768[] = {0x23, 0x24, 0x00, 0x25};
+static const USHORT ModeIndex_1280x720[]     = {0x79, 0x75, 0x00, 0x78};
+static const USHORT ModeIndex_1280x800[]     = {0x14, 0x15, 0x00, 0x16};
+static const USHORT ModeIndex_1360x768[]     = {0x48, 0x4b, 0x00, 0x4e};
+static const USHORT ModeIndex_300_1360x1024[]= {0x67, 0x6f, 0x00, 0x72};  /* 300 series, BARCO only */
+static const USHORT ModeIndex_1400x1050[]    = {0x26, 0x27, 0x00, 0x28};  /* 315 series only */
+static const USHORT ModeIndex_1680x1050[]    = {0x17, 0x18, 0x00, 0x19};  /* 315 series only */
+static const USHORT ModeIndex_1600x1200[]    = {0x3c, 0x3d, 0x00, 0x66};
+static const USHORT ModeIndex_1920x1080[]    = {0x2c, 0x2d, 0x00, 0x73};  /* 315 series only */
+static const USHORT ModeIndex_1920x1440[]    = {0x68, 0x69, 0x00, 0x6b};
+static const USHORT ModeIndex_300_2048x1536[]= {0x6c, 0x6d, 0x00, 0x00};
+static const USHORT ModeIndex_310_2048x1536[]= {0x6c, 0x6d, 0x00, 0x6e};
 
-const USHORT SiS_DRAMType[17][5]={
+static const USHORT SiS_DRAMType[17][5]={
 	{0x0C,0x0A,0x02,0x40,0x39},
 	{0x0D,0x0A,0x01,0x40,0x48},
 	{0x0C,0x09,0x02,0x20,0x35},
@@ -141,7 +137,7 @@
 	{0x09,0x08,0x01,0x01,0x00}
 };
 
-const USHORT SiS_SDRDRAM_TYPE[13][5] =
+static const USHORT SiS_SDRDRAM_TYPE[13][5] =
 {
 	{ 2,12, 9,64,0x35},
 	{ 1,13, 9,64,0x44},
@@ -158,7 +154,7 @@
 	{ 1, 9, 8, 2,0x00}
 };
 
-const USHORT SiS_DDRDRAM_TYPE[4][5] =
+static const USHORT SiS_DDRDRAM_TYPE[4][5] =
 {
 	{ 2,12, 9,64,0x35},
 	{ 2,12, 8,32,0x31},
@@ -166,7 +162,7 @@
 	{ 2, 9, 8, 4,0x01}
 };
 
-const USHORT SiS_MDA_DAC[] =
+static const USHORT SiS_MDA_DAC[] =
 {
 	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
         0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
@@ -178,7 +174,7 @@
         0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F
 };
 
-const USHORT SiS_CGA_DAC[] =
+static const USHORT SiS_CGA_DAC[] =
 {
         0x00,0x10,0x04,0x14,0x01,0x11,0x09,0x15,
         0x00,0x10,0x04,0x14,0x01,0x11,0x09,0x15,
@@ -190,7 +186,7 @@
         0x2A,0x3A,0x2E,0x3E,0x2B,0x3B,0x2F,0x3F
 };
 
-const USHORT SiS_EGA_DAC[] =
+static const USHORT SiS_EGA_DAC[] =
 {
         0x00,0x10,0x04,0x14,0x01,0x11,0x05,0x15,
         0x20,0x30,0x24,0x34,0x21,0x31,0x25,0x35,
@@ -202,7 +198,7 @@
         0x2A,0x3A,0x2E,0x3E,0x2B,0x3B,0x2F,0x3F
 };
 
-const USHORT SiS_VGA_DAC[] =
+static const USHORT SiS_VGA_DAC[] =
 {
 	0x00,0x10,0x04,0x14,0x01,0x11,0x09,0x15,
 	0x2A,0x3A,0x2E,0x3E,0x2B,0x3B,0x2F,0x3F,
@@ -259,11 +255,12 @@
 	{ 1680,1050, 8,16},   /* 0x1d */
 	{ 1280, 800, 8,16},   /* 0x1e */
 	{ 1920,1080, 8,16},   /* 0x1f */
-	{  960, 540, 8,16}    /* 0x20 */
+	{  960, 540, 8,16},   /* 0x20 */
+	{  960, 600, 8,16}    /* 0x21 */
 };
 
 #if defined(SIS300) || defined(SIS315H)
-static SiS_StandTableStruct SiS_StandTable[]=
+static const SiS_StandTableStruct SiS_StandTable[]=
 {
 /* 0x00: MD_0_200 */
  {
@@ -907,7 +904,8 @@
  {    5,   4, 0x627,0x464,0x670,0x3c0,0x128,  0, 0, 0x00,0x00,0x00,0x00},  /* 1280x1024 */
  {    4,   1, 0x41a,0x233,0x60c,0x3c0,0x143,128, 0, 0x00,0x00,0x00,0x00},  /* 800x480   */
  {    5,   2, 0x578,0x293,0x670,0x3c0,0x032,  0, 0, 0x00,0x00,0x00,0x00},  /* 1024x576  */
- {    8,   5, 0x6d6,0x323,0x670,0x3c0,0x128,  0, 0, 0x00,0x00,0x00,0x00}   /* 1280x720  */
+ {    8,   5, 0x6d6,0x323,0x670,0x3c0,0x128,  0, 0, 0x00,0x00,0x00,0x00},  /* 1280x720  */
+ {  137,  32, 0x3d4,0x233,0x663,0x3bf,0x143,  0, 0, 0x00,0x00,0x00,0x00}   /* 960x600  */
 };
 
 static const SiS_TVDataStruct  SiS_St525pData[] =
@@ -930,67 +928,41 @@
 
 static const SiS_TVDataStruct  SiS_Ext750pData[] =
 {
-#if 1
  {  143,  65, 0x35a,0x1bb,0x4f6,0x1b8,0x0ab,  0, 0x0ab, 0x00,0x00,0x00,0x00},
  {   88,  35, 0x35a,0x189,0x4f6,0x1b8,0x0ab,  0, 0x0ab, 0x00,0x00,0x00,0x00},
  {   18,   5, 0x339,0x1ae,0x500,0x2d0,0x05c,  0, 0x05c, 0x00,0x00,0x00,0x00},
  {  143,  70, 0x39c,0x189,0x4f6,0x1b8,0x05c,  0, 0x05c, 0x00,0x00,0x00,0x00},
  {   99,  32, 0x320,0x1fe,0x500,0x2d0,   50,  0,     0, 0x00,0x00,0x00,0x00},  /* 640x480  */
  {    5,   4, 0x5d8,0x29e,0x500,0x2a8,   50,  0,     0, 0x00,0x00,0x00,0x00},  /* 800x600  */
-#if 0
- {    2,   1, 0x35a,0x1f7,0x4f6,0x1e0,    0,128,     0, 0x00,0x00,0x00,0x00},  /* 720x480  */
-#endif
  {   99,  32, 0x320,0x1fe,0x500,0x2d0,   50,  0,     0, 0x00,0x00,0x00,0x00},  /* 720x480 test WORKS */
  {   68,  64, 0x55f,0x346,0x500,0x2a8,0x27e,  0,     0, 0x00,0x00,0x00,0x00},  /* 1024x768 */
  {    5,   2, 0x3a7,0x226,0x500,0x2a8,    0,128,     0, 0x00,0x00,0x00,0x00},  /* 720x576  */
  {   25,  24, 0x5d8,0x2f3,0x460,0x2a8,   50,  0,     0, 0x00,0x00,0x00,0x00}   /* 1280x720 WORKS */
-#endif
-#if 0
- {    3,   1, 0x3a7,0x1d6,0x500,0x2a8,   50,  0,     0, 0x00,0x00,0x00,0x00},
- {   24,   7, 0x3a7,0x1a4,0x500,0x2a8,   50,  0,     0, 0x00,0x00,0x00,0x00},
- {    3,   1, 0x3a7,0x1d6,0x500,0x2a8,   50,  0,     0, 0x00,0x00,0x00,0x00},
- {   24,   7, 0x3a7,0x1a4,0x500,0x2a8,   50,  0,     0, 0x00,0x00,0x00,0x00},
- {   99,  32, 0x320,0x1fe,0x500,0x2d0,   50,  0,     0, 0x00,0x00,0x00,0x00},  /* 640x480   */
- {    5,   4, 0x5d8,0x29e,0x500,0x2a8,   50,  0,     0, 0x00,0x00,0x00,0x00},  /* 800x600   */
- {    2,   1, 0x35a,0x1f7,0x4f6,0x1e0,    0,128,     0, 0x00,0x00,0x00,0x00},  /* 720x480   */
- {   68,  64, 0x55f,0x346,0x500,0x2a8,0x27e,  0,     0, 0x00,0x00,0x00,0x00},  /* 1024x768  */
- {   25,  24, 0x5d8,0x2f3,0x460,0x2a8,   50,  0,     0, 0x00,0x00,0x00,0x00}   /* 1280x720  */
-#endif
-#if 0
- {  136,  35, 0x339,0x181,0x460,0x2a8,   50,  0,     0, 0x00,0x00,0x00,0x00},  /* TEST (0.93) BAD */
- {   17,   6, 0x339,0x203,0x460,0x2a8,   50,  0,    50, 0x00,0x00,0x00,0x00},
- {  136,  35, 0x339,0x181,0x460,0x2a8,   50,  0,    50, 0x00,0x00,0x00,0x00},
- {   17,   6, 0x339,0x203,0x460,0x2a8,   50,  0,    50, 0x00,0x00,0x00,0x00},
- {   85,  46, 0x3f4,0x27b,0x460,0x2a8,   50,  0,     0, 0x00,0x00,0x00,0x00},  /* 640x480   */
- {   17,  16, 0x55f,0x323,0x460,0x2a8,0x2b6,  0,     0, 0x00,0x00,0x00,0x00},  /* 800x600   */
- {  136,  35, 0x339,0x181,0x460,0x2a8,   50,  0,     0, 0x00,0x00,0x00,0x00},  /* 720x480   */
- {  187,  74, 0x39d,0x203,0x460,0x2a8,   50,  0,     0, 0x00,0x00,0x00,0x00},  /* 1024x768  */
- {   25,  24, 0x5d8,0x2f3,0x460,0x2a8,   50,  0,    50, 0x00,0x00,0x00,0x00}   /* 1280x720  */
-#endif
 };
 
-static const SiS_LCDDataStruct  SiS_LCD1280x720Data[] =
+static const SiS_LCDDataStruct  SiS_LCD1280x720Data[] =  /* 2.03.00 */
 {
-	{  14,    5,  864,  432, 1344,  806 }, /* 640x400 */
-	{  16,    5,  864,  378, 1344,  806 },
-	{  14,    5,  864,  432, 1344,  806 },
-	{  16,    5,  864,  378, 1344,  806 },
-	{  24,   11,  924,  523, 1344,  806 }, /* 640x480 */
-	{   7,    5, 1152,  664, 1344,  806 }, /* 800x600 */
-	{   0,    0,    0,    0,    0,    0 },
+	{  44,   15,  864,  430, 1408,  806 }, /* 640x400 */
+	{ 128,   35,  792,  385, 1408,  806 },
+	{  44,   15,  864,  430, 1408,  806 },
+	{ 128,   35,  792,  385, 1408,  806 },
+	{  22,    9,  864,  516, 1408,  806 }, /* 640x480 */
+	{   8,    5, 1056,  655, 1408,  806 }, /* 800x600 */
+	{   0,    0,    0,    0,    0,    0 }, /* 1024x768 */
+	{   0,    0,    0,    0,    0,    0 }, /* 1280x1024 */
 	{   0,    0,    0,    0,    0,    0 },
 	{   0,    0,    0,    0,    0,    0 },
-	{   0,    0,    0,    0,    0,    0 },
-	{   1,    1, 1344,  806, 1344,  806 }  /* 1280x720 */
+	{   1,    1, 1408,  806, 1408,  806 }  /* 1280x720 */
 };
 
 /* About 1280x768: For TMDS, Panel_1280x768 will only be set if
  * the panel is a Fujitsu 7911 (VL-17WDX8) (with clock 81, 1688x802)
  * Other TMDS panels of this resolution will be treated as custom.
- * For LVDS, we know two types. Data follows:
+ * For LVDS, we know another type (_2).
+ * (Note: 1280x768_3 is now special for SiS301/NetVista
  */
 
-static const SiS_LCDDataStruct  SiS_StLCD1280x768_2Data[] =
+static const SiS_LCDDataStruct  SiS_StLCD1280x768_2Data[] = /* 2.03.00 */
 {
 	{  64,   21,  858,  434, 1408,  806 }, /* 640x400 */
 	{  32,    9,  858,  372, 1408,  806 },
@@ -1000,22 +972,27 @@
 	{  64,   51, 1364,  663, 1408,  806 }, /* 800x600 */
 	{  88,   81, 1296,  806, 1408,  806 }, /* 1024x768 */
 	{   0,    0,    0,    0,    0,    0 },
-	{   1,    1, 1408,  806, 1408,  806 }  /* 1280x768 */
+	{   1,    1, 1408,  806, 1408,  806 }, /* 1280x768 */
+	{   0,    0,    0,    0,    0,    0 },
+	{  16,   15, 1600,  750, 1600,  806 }  /* 1280x720 - from Ext */
 };
 
-static const SiS_LCDDataStruct  SiS_ExtLCD1280x768_2Data[] =
+static const SiS_LCDDataStruct  SiS_ExtLCD1280x768_2Data[] = /* 2.03.00 */
 {
-	{  64,   25, 1056,  422, 1408,  806 }, /*, 664 */
-	{ 128,   39,  884,  396, 1408,  806 }, /*, 640 */
-	{  64,   25, 1056,  422, 1408,  806 }, /*, 664 */
-	{ 128,   39,  884,  396, 1408,  806 }, /*, 640 */
-	{  32,   15, 1056,  513, 1408,  806 }, /*, 664 */
-	{ 176,  125, 1280,  640, 1408,  806 }, /*, 768 */
-	{  88,   81, 1296,  806, 1408,  806 },
+	{  16,    5,  960,  410, 1600,  806 }, /* 640x400 */
+	{  64,   21, 1152,  364, 1600,  806 },
+	{  16,    5,  960,  410, 1600,  806 },
+	{  64,   21, 1152,  364, 1600,  806 },
+	{  32,   13, 1040,  493, 1600,  806 }, /* 640x480 */
+	{  16,    9, 1152,  618, 1600,  806 }, /* 800x600 */
+	{  25,   21, 1344,  796, 1600,  806 }, /* 1024x768 */
+	{   0,    0,    0,    0,    0,    0 },
+	{   1,    1, 1600,  806, 1600,  806 }, /* 1280x768 */
 	{   0,    0,    0,    0,    0,    0 },
-	{   1,    1, 1408,  806, 1408,  806 }
+	{  16,   15, 1600,  750, 1600,  806 }  /* 1280x720 */
 };
 
+#if 0  /* Not used; _3 now reserved for NetVista (SiS301) */
 static const SiS_LCDDataStruct  SiS_LCD1280x768_3Data[] =
 {
 	{  64,   25, 1056,  422, 1664,  798 },			/* 640x400 */
@@ -1026,20 +1003,40 @@
 	{ 176,  125, 1280,  640, 1408,  806 }, /* ,768 */	/* 800x600 */
 	{  64,   61, 1342,  806, 1408,  806 },			/* 1024x768 */
 	{   0,    0,    0,    0,    0,    0 },
-	{   1,    1, 1408,  806, 1408,  806 }			/* 1280x768 */
+	{   1,    1, 1408,  806, 1408,  806 },			/* 1280x768 */
+	{   0,    0,    0,    0,    0,    0 },
+	{  16,   15, 1600,  750, 1600,  806 }  /* 1280x720  from above */
 };
+#endif
 
-static const SiS_LCDDataStruct  SiS_LCD1280x800Data[] =
+static const SiS_LCDDataStruct  SiS_LCD1280x800Data[] = /* 0.93.12a (TMDS) */
 {
-	{ 128,   51, 1122,  412, 1408,  816 }, /* 640x400 */
+	{ 128,   51, 1122,  412, 1408,  816 },  /* 640x400 */
 	{ 128,   49, 1232,  361, 1408,  816 },
 	{ 128,   51, 1122,  412, 1408,  816 },
 	{ 128,   49, 1232,  361, 1408,  816 },
-	{   8,    3,  880,  491, 1408,  816 }, /* 640x480 */
-	{  11,    6, 1024,  612, 1408,  816 }, /* 800x600 */
-	{  22,   21, 1400,  784, 1408,  816 }, /* 1024x768 */
-	{   0,    0,    0,    0,    0,    0 },
-	{   1,    1, 1408,  816, 1408,  816 }  /* 1280x800 */
+	{   8,    3,  880,  491, 1408,  816 },  /* 640x480 */
+	{  11,    6, 1024,  612, 1408,  816 },  /* 800x600 */
+	{  22,   21, 1400,  784, 1408,  816 },  /* 1024x768 */
+	{   0,    0,    0,    0,    0,    0 },  /* 1280x1024 */
+	{   1,    1, 1408,  816, 1408,  816 },  /* 1280x800 */
+	{   0,    0,    0,    0,    0,    0 },  /* 1280x768 (patch index) */
+	{   0,    0,    0,    0,    0,    0 }   /* 1280x720 */
+};
+
+static const SiS_LCDDataStruct  SiS_LCD1280x800_2Data[] = /* 2.03.00 (LVDS) */
+{
+	{  97,   42, 1344,  409, 1552,  812 }, /* 640x400 */
+	{  97,   35, 1280,  358, 1552,  812 },
+	{  97,   42, 1344,  409, 1552,  812 },
+	{  97,   35, 1280,  358, 1552,  812 },
+	{  97,   39, 1040,  488, 1552,  812 }, /* 640x480 */
+	{ 194,  105, 1120,  608, 1552,  812 }, /* 800x600 */
+	{  97,   84, 1400,  780, 1552,  812 }, /* 1024x768 */
+	{   0,    0,    0,    0,    0,    0 }, /* 1280x1024 */
+	{   1,    1, 1552,  812, 1552,  812 }, /* 1280x800 */
+	{  97,   96, 1600,  780, 1552,  812 }, /* 1280x768 - patch index */
+	{  97,   90, 1600,  730, 1552,  812 }  /* 1280x720 */
 };
 
 static const SiS_LCDDataStruct  SiS_LCD1280x960Data[] =
@@ -1097,9 +1094,9 @@
 	{  95,   64, 1750,  784, 1900, 1066 }, /*  6 1024x768 */
 	{  95,   94, 1900, 1055, 1900, 1066 }, /*  7 1280x1024 */
 	{  41,   31, 1900,  806, 1900, 1066 }, /*  8 1280x768 */
-	{  95,   69, 1800,  817, 1900, 1066 }, /*  9 1280x800 patch */
+	{  95,   69, 1800,  817, 1900, 1066 }, /*  9 1280x800 patch index */
 	{  13,    9, 1900,  739, 1900, 1066 }, /* 10 1280x720 */
-	{  95,   94, 1880, 1066, 1900, 1066 }, /* 11 1400x1050 patch */
+	{  95,   94, 1880, 1066, 1900, 1066 }, /* 11 1400x1050 patch index */
 	{   1,    1, 1900, 1066, 1900, 1066 }  /* 12 1680x1050 */
 };
 
@@ -1148,12 +1145,12 @@
 	{ 1, 1,1800,1000,1800,1000 },  /* 0x0a: 1280x960  */
 	{ 1, 1,1688,1066,1688,1066 },  /* 0x0b: 1400x1050 */
 	{ 1, 1,1650, 750,1650, 750 },  /* 0x0c: 1280x720 (TMDS, projector)  */
-	{ 1, 1,1656, 841,1656, 841 },  /* 0x0d: 1280x800 (was: 1408, 816) */
+	{ 1, 1,1552, 812,1552, 812 },  /* 0x0d: 1280x800_2 (LVDS) (was: 1408,816/ 1656,841) */
 	{ 1, 1,1900,1066,1900,1066 },  /* 0x0e: 1680x1050 (LVDS) */
-	{ 1, 1,1408, 806,1408, 806 },  /* 0x0f: 1280x768_2 */
-	{ 1, 1,1664, 798,1664, 798 },  /* 0x10: 1280x768_3 */
-	{ 1, 1,1688, 802,1688, 802 },  /* 0x11: 1280x768: Std, TMDS only */
-	{ 1, 1,1344, 806,1344, 806 },  /* 0x12: 1280x720 (LVDS)  */
+	{ 1, 1,1660, 806,1660, 806 },  /* 0x0f: 1280x768_2 (LVDS) */
+	{ 1, 1,1664, 798,1664, 798 },  /* 0x10: 1280x768_3 (NetVista SiS 301) - TODO */
+	{ 1, 1,1688, 802,1688, 802 },  /* 0x11: 1280x768   (TMDS Fujitsu) */
+	{ 1, 1,1408, 806,1408, 806 },  /* 0x12: 1280x720 (LVDS) */
 	{ 1, 1, 896, 497, 896, 497 },  /* 0x13: 720x480 */
 	{ 1, 1, 912, 597, 912, 597 },  /* 0x14: 720x576 */
 	{ 1, 1, 912, 597, 912, 597 },  /* 0x15: 768x576 */
@@ -1163,10 +1160,11 @@
 	{ 1, 1,1328, 739,1328, 739 },  /* 0x19: 1024x576 */
 	{ 1, 1,1680, 892,1680, 892 },  /* 0x1a: 1152x864 */
 	{ 1, 1,1808, 808,1808, 808 },  /* 0x1b: 1360x768 */
-	{ 1, 1,1104, 563,1104, 563 }   /* 0x1c: 960x540 */
+	{ 1, 1,1104, 563,1104, 563 },  /* 0x1c: 960x540 */
+	{ 1, 1,1120, 618,1120, 618 },  /* 0x1d: 960x600 */
+	{ 1, 1,1408, 816,1408, 816 }   /* 0x1f: 1280x800 (TMDS special) */
 };
 
-
 /**************************************************************/
 /* LVDS ----------------------------------------------------- */
 /**************************************************************/
@@ -1207,7 +1205,6 @@
 	{ 800, 525, 800, 525}    /* pseudo */
 };
 
-
 static const SiS_LVDSDataStruct  SiS_LVDS800x600Data_1[]=
 {
 	{ 848, 433,1060, 629},
@@ -1221,12 +1218,6 @@
 
 static const SiS_LVDSDataStruct  SiS_LVDS800x600Data_2[]=
 {
-	{1056, 628,1056, 628},
-	{1056, 628,1056, 628},
-	{1056, 628,1056, 628},
-	{1056, 628,1056, 628},
-	{1056, 628,1056, 628},
-	{1056, 628,1056, 628},
 	{1056, 628,1056, 628}
 };
 
@@ -1243,13 +1234,7 @@
 
 static const SiS_LVDSDataStruct  SiS_LVDS1024x768Data_2[]=
 {
-	{1344, 806,1344, 806},
-	{1344, 806,1344, 806},
-	{1344, 806,1344, 806},
-	{1344, 806,1344, 806},
-	{1344, 806,1344, 806},
-	{1344, 806,1344, 806},
-	{1344, 806,1344, 806},
+	{1344, 806,1344, 806}
 };
 
 static const SiS_LVDSDataStruct  SiS_LVDS1280x1024Data_1[]=
@@ -1266,13 +1251,6 @@
 
 static const SiS_LVDSDataStruct  SiS_LVDS1280x1024Data_2[]=
 {
-	{1688,1066,1688,1066},
-	{1688,1066,1688,1066},
-	{1688,1066,1688,1066},
-	{1688,1066,1688,1066},
-	{1688,1066,1688,1066},
-	{1688,1066,1688,1066},
-	{1688,1066,1688,1066},
 	{1688,1066,1688,1066}
 };
 
@@ -1291,15 +1269,7 @@
 
 static const SiS_LVDSDataStruct  SiS_LVDS1400x1050Data_2[]=
 {
-        {1688,1066, 1688,1066},
-	{1688,1066, 1688,1066},
-	{1688,1066, 1688,1066},
-	{1688,1066, 1688,1066},
-	{1688,1066, 1688,1066},
-	{1688,1066, 1688,1066},
-	{1688,1066, 1688,1066},
-	{1688,1066, 1688,1066},
-	{1688,1066, 1688,1066},
+        {1688,1066, 1688,1066}
 };
 
 static const SiS_LVDSDataStruct  SiS_LVDS1600x1200Data_1[]=
@@ -1314,32 +1284,11 @@
 	{1728,1144, 2048,1320},
 	{1848,1170, 2048,1320},
 	{2048,1320, 2048,1320}
-#if 0
-        {1088, 450, 2048,1250},
-	{1088, 400, 2048,1250},
-	{1088, 450, 2048,1250},
-	{1088, 400, 2048,1250},
-	{1088, 530, 2048,1250},
-	{1248, 650, 2048,1250},
-	{1472, 818, 2048,1250},
-	{1728,1066, 2048,1250},
-	{1848,1066, 2048,1250},
-	{2048,1250, 2048,1250}
-#endif
 };
 
 static const SiS_LVDSDataStruct  SiS_LVDS1600x1200Data_2[]=
 {
-        {2048,1320, 2048,1320},
-	{2048,1320, 2048,1320},
-	{2048,1320, 2048,1320},
-	{2048,1320, 2048,1320},
-	{2048,1320, 2048,1320},
-	{2048,1320, 2048,1320},
-	{2048,1320, 2048,1320},
-	{2048,1320, 2048,1320},
-	{2048,1320, 2048,1320},
-	{2048,1320, 2048,1320}
+        {2048,1320, 2048,1320}
 };
 
 static const SiS_LVDSDataStruct  SiS_LVDS1280x960Data_1[]=
@@ -1357,15 +1306,7 @@
 
 static const SiS_LVDSDataStruct  SiS_LVDS1280x960Data_2[]=
 {
-	{1344, 806,1344, 806},
-	{1344, 806,1344, 806},
-	{1344, 806,1344, 806},
-	{1344, 806,1344, 806},
-	{1344, 806,1344, 806},
-	{1344, 806,1344, 806},
-	{1344, 806,1344, 806},
-	{ 800, 449,1280, 801},
-	{ 800, 525,1280, 813}
+	{1344, 806,1344, 806}
 };
 
 static const SiS_LVDSDataStruct  SiS_LVDS1280x768Data_1[]=
@@ -1383,14 +1324,6 @@
 
 static const SiS_LVDSDataStruct  SiS_LVDS1280x768Data_2[]=
 {
-	{1408, 806, 1408, 806},
-	{1408, 806, 1408, 806},
-	{1408, 806, 1408, 806},
-	{1408, 806, 1408, 806},
-	{1408, 806, 1408, 806},
-	{1408, 806, 1408, 806},
-	{1408, 806, 1408, 806},
-	{1408, 806, 1408, 806},
 	{1408, 806, 1408, 806}
 };
 
@@ -1407,12 +1340,6 @@
 
 static const SiS_LVDSDataStruct  SiS_LVDS1024x600Data_2[] =
 {
-	{1344, 800,1344, 800},
-	{1344, 800,1344, 800},
-	{1344, 800,1344, 800},
-	{1344, 800,1344, 800},
-	{1344, 800,1344, 800},
-	{1344, 800,1344, 800},
 	{1344, 800,1344, 800}
 };
 
@@ -1429,12 +1356,6 @@
 
 static const SiS_LVDSDataStruct  SiS_LVDS1152x768Data_2[] =
 {
-	{1344, 806,1344, 806},
-	{1344, 806,1344, 806},
-	{1344, 806,1344, 806},
-	{1344, 806,1344, 806},
-	{1344, 806,1344, 806},
-	{1344, 806,1344, 806},
 	{1344, 806,1344, 806}
 };
 
@@ -1445,12 +1366,11 @@
 	{ 800, 449,  800, 449},
 	{ 900, 449,  900, 449},
 	{ 900, 449,  900, 449},
-	{ 800, 525,  800, 525},  /*  640x480   */
-	{1056, 628, 1056, 628},  /*  800x600   */
-	{1344, 806, 1344, 806},  /* 1024x768   */
-	{1688,1066, 1688,1066},  /* 1280x1024  */  /* INSERTED ! */
- 	{1688, 806, 1688, 806},  /* 1280x768   */
-	/* No other panels ! */
+	{ 800, 525,  800, 525},  /*  640x480  */
+	{1056, 628, 1056, 628},  /*  800x600  */
+	{1344, 806, 1344, 806},  /* 1024x768  */
+	{1688,1066, 1688,1066},  /* 1280x1024 */  /* INSERTED */
+ 	{1688, 806, 1688, 806},  /* 1280x768  */
 };
 
 /* Custom data for Barco iQ R series */
@@ -1496,13 +1416,7 @@
 /* Custom data for Barco iQ G series */
 static const SiS_LVDSDataStruct  SiS_LVDSBARCO1024Data_2[]=
 {
-	{1344, 806,1344, 806},
-	{1344, 806,1344, 806},
-	{1344, 806,1344, 806},
-	{1344, 806,1344, 806},
-	{1344, 806,1344, 806},
-	{1344, 806,1344, 806},
-	{1344, 806,1344, 806},
+	{1344, 806,1344, 806}
 };
 
 /* Custom data for 848x480 parallel panel */
@@ -1589,10 +1503,10 @@
 
 static const SiS_LVDSDesStruct  SiS_CHTVUPALDesData[]=
 {
-	{256,   0},
-	{256,   0},
-	{256,   0},
-	{256,   0},
+	{256,  0},
+	{256,  0},
+	{256,  0},
+	{256,  0},
 	{ 0,   0},
 	{ 0,   0},
 	{ 0,   0}
@@ -1600,10 +1514,10 @@
 
 static const SiS_LVDSDesStruct  SiS_CHTVOPALDesData[]=
 {
-	{256,   0},
-	{256,   0},
-	{256,   0},
-	{256,   0},
+	{256,  0},
+	{256,  0},
+	{256,  0},
+	{256,  0},
 	{ 0,   0},
 	{ 0,   0},
 	{ 0,   0}
@@ -2105,6 +2019,8 @@
 /* COMMON --------------------------------------------------- */
 /**************************************************************/
 
+#ifdef LINUX_XF86
+
 #define SIS_PL_HSYNCP 0x01
 #define SIS_PL_HSYNCN 0x02
 #define SIS_PL_VSYNCP 0x04
@@ -2127,6 +2043,8 @@
    USHORT product[5];
    const char *DDCnames[5];
    const char *plasmaname;
+   USHORT maxx,maxy;
+   USHORT prefx, prefy;
    UCHAR  modenum;
    UCHAR  plasmamodes[20];  /* | 0x80 = DVI-capable, | 0x40 = analog */
 } SiS_PlasmaTables;
@@ -2237,14 +2155,51 @@
         848, 1068, 20,  40,	/* differs from DDC data, better centered */
         480,  516,  3,   5,	/* won't work assumingly, because data is % 8 */
       SIS_PL_HSYNCN | SIS_PL_VSYNCN },
+   {  "1280x720",		/* 21: WIDE720(60) (aka "750p") (Panasonic) */
+      74300,
+      1280, 1650,110,  40,
+       720,  750,  5,   5,
+      SIS_PL_HSYNCP | SIS_PL_VSYNCP },
+   {  "1280x768",		/* 22: 1280x768@56.5 (Panasonic) */
+      76200,			/* (According to manual not supported for HDMI; but works) */
+      1280, 1680, 16,  24,
+       768,  802,  2,   5,
+      SIS_PL_HSYNCP | SIS_PL_VSYNCP },
+   {  "1280x720@50",		/* 23: WIDE720(50) (aka "750p") (Panasonic) */
+      74300,			/* Panasonic states 45.0kHz. Not possible. This one works (with some overscan) */
+      1280, 1980,400,  80,
+       720,  750,  1,   2,
+      SIS_PL_HSYNCP | SIS_PL_VSYNCP },
+   {  "720x480",		/* 24: 720x480 (aka "525p" and "480p") (Panasonic) */
+      27000,
+       720,  856, 40,  32,
+       480,  525,  1,   3,
+      SIS_PL_HSYNCP | SIS_PL_VSYNCP },
+   {  "720x576",		/* 25: 720x576 (aka "625p"and "576p") (Panasonic) */
+      27500,
+       720,  864, 16,  64,
+       576,  625,  5,   6,
+      SIS_PL_HSYNCP | SIS_PL_VSYNCP },
+   {  "1280x720@50",		/* 26: WIDE720(50) (aka "750p") (Generic) */
+      74300,
+      1280, 1980,400,  80,
+       720,  750,  5,   5,
+      SIS_PL_HSYNCP | SIS_PL_VSYNCP },
 };
 
+/*
+27.00  720 755 791 858  480 480 484 525
+27.50  720 732 795 864  576 581 587 625
+*/
+
 static const SiS_PlasmaTables SiS_PlasmaTable[] = {
 #if 0  /* Product IDs missing */
    { 0x38a3, 4,
      { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 },
      { "", "", "", "", "" },
      "NEC PlasmaSync 42VP4/42VP4D/42VP4G/42VP4DG",
+     0, 0,
+     0, 0,
      11,   /* All DVI, except 0, 7, 13 */
      { 0|0x40, 1|0xc0, 2|0xc0, 4|0xc0, 7|0x40, 9|0xc0,10|0xc0,11|0xc0,13|0x40,14|0xc0,
       17|0xc0, 0     , 0     , 0     , 0     , 0     , 0     , 0     , 0     , 0       }
@@ -2255,6 +2210,8 @@
      { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 },
      { "", "", "", "", "" },
      "NEC PlasmaSync 42PD1/50PD1/50PD2",
+     0, 0,
+     0, 0,
      5,   /* DVI entirely unknown */
      { 0|0x40, 1|0xc0, 2|0xc0, 4|0xc0, 9|0xc0, 0     , 0     , 0     , 0     , 0     ,
        0     , 0     , 0     , 0     , 0     , 0     , 0     , 0     , 0     , 0       }
@@ -2263,6 +2220,8 @@
      { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 },
      { "", "", "", "", "" },
      "NEC PlasmaSync 42PD3",
+     0, 0,
+     0, 0,
      10,   /* DVI entirely unknown */
      { 0|0x40, 1|0xc0, 2|0xc0, 3|0xc0, 4|0xc0, 5|0xc0, 6|0xc0, 7|0x40, 8|0xc0, 9|0xc0,
        0     , 0     , 0     , 0     , 0     , 0     , 0     , 0     , 0     , 0       }
@@ -2271,6 +2230,8 @@
      { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 },
      { "", "", "", "", "" },
      "NEC PlasmaSync 42VM3/61XM1",
+     0, 0,
+     0, 0,
      11,  /* DVI entirely unknown */
      { 0|0x40, 1|0xc0, 2|0xc0, 3|0xc0, 4|0xc0, 5|0xc0, 6|0xc0, 8|0xc0, 9|0xc0,11|0xc0,
       17|0xc0, 0     , 0     , 0     , 0     , 0     , 0     , 0     , 0     , 0       }
@@ -2279,6 +2240,8 @@
      { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 },
      { "", "", "", "", "" },
      "NEC PlasmaSync 42MP1/42MP2",
+     0, 0,
+     0, 0,
      6,   /* DVI entirely unknown */
      { 0|0x40, 1|0xc0, 2|0xc0, 4|0xc0, 9|0xc0,11|0xc0, 0     , 0     , 0     , 0     ,
        0     , 0     , 0     , 0     , 0     , 0     , 0     , 0     , 0     , 0       }
@@ -2287,6 +2250,8 @@
      { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 },
      { "", "", "", "", "" },
      "NEC PlasmaSync 50MP1",
+     0, 0,
+     0, 0,
      10,   /* DVI entirely unknown */
      { 0|0x40, 1|0xc0, 2|0xc0, 4|0xc0, 7|0x40, 9|0xc0,10|0xc0,11|0xc0,13|0x40,14|0xc0,
        0     , 0     , 0     , 0     , 0     , 0     , 0     , 0     , 0     , 0       }
@@ -2296,6 +2261,8 @@
      { 0xa482, 0xa483, 0x0000, 0x0000, 0x0000 },
      { "PX-42VM", "", "", "", "" },
      "NEC PlasmaSync 42MP3/42MP4/50MP2/61MP1",
+     0, 0,
+     0, 0,
      11,   /* All DVI except 0, 7, 13, 17 */
      { 0|0x40, 1|0xc0, 2|0xc0, 4|0xc0, 7|0x40, 9|0xc0,10|0xc0,11|0xc0,13|0x40,14|0xc0,
       17|0x40, 0     , 0     , 0     , 0     , 0     , 0     , 0     , 0     , 0       }
@@ -2305,6 +2272,8 @@
      { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 },
      { "", "", "", "", "" },
      "NEC PlasmaSync 3300W",
+     0, 0,
+     0, 0,
      3,
      { 0|0x40, 1|0xc0,18|0xc0, 0     , 0     , 0     , 0     , 0     , 0     , 0     ,
        0     , 0     , 0     , 0     , 0     , 0     , 0     , 0     , 0     , 0       }
@@ -2321,6 +2290,8 @@
      { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 },
      { "", "", "", "", "" },
      "NEC PlasmaSync 4210W",
+     0, 0,
+     0, 0,
      6,   /* DVI entirely unknown */
      { 0|0x40, 1|0xc0, 2|0xc0, 4|0xc0, 9|0xc0,11|0xc0, 0     , 0     , 0     , 0     ,
        0     , 0     , 0     , 0     , 0     , 0     , 0     , 0     , 0     , 0       }
@@ -2329,6 +2300,8 @@
      { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 },
      { "", "", "", "", "" },
      "NEC PlasmaSync 5000W",
+     0, 0,
+     0, 0,
      7,   /* DVI entirely unknown */
      { 0|0x40, 1|0xc0, 2|0xc0, 4|0xc0, 7|0x40, 9|0xc0,11|0xc0, 0     , 0     , 0     ,
        0     , 0     , 0     , 0     , 0     , 0     , 0     , 0     , 0     , 0       }
@@ -2338,6 +2311,8 @@
      { 0x000c, 0x000b, 0x0000, 0x0000, 0x0000 },
      { "", "", "", "", "" },
      "Pioneer 503CMX/PDA-5002",
+     0, 0,
+     0, 0,
      6,   /* DVI unknown */
      { 1|0xc0, 2|0xc0, 9|0xc0,11|0xc0,12|0xc0,15|0xc0, 0     , 0     , 0     , 0     ,
        0     , 0     , 0     , 0     , 0     , 0     , 0     , 0     , 0     , 0       }
@@ -2346,6 +2321,8 @@
      { 0xa00e, 0x0000, 0x0000, 0x0000, 0x0000 },
      { "", "", "", "", "" },
      "Panasonic TH-42",
+     0, 0,
+     0, 0,
      5,   /* No DVI output */
      { 1|0x40, 2|0x40, 4|0x40, 9|0x40,15|0x40, 0     , 0     , 0     , 0     , 0     ,
        0     , 0     , 0     , 0     , 0     , 0     , 0     , 0     , 0     , 0       }
@@ -2354,15 +2331,50 @@
      { 0xa005, 0x0000, 0x0000, 0x0000, 0x0000 },
      { "TH-42PW*4", "", "", "", "" },
      "Panasonic TH-42PW5",
+     0, 0,
+     0, 0,
      1,   /* No special modes otherwise; no DVI. */
      {20|0x40,19|0x40, 0     , 0     , 0     , 0     , 0     , 0     , 0     , 0     ,
        0     , 0     , 0     , 0     , 0     , 0     , 0     , 0     , 0     , 0       }
    },
+   { 0x4c2e, 1,
+     { 0x9b05, 0x0000, 0x0000, 0x0000, 0x0000 },
+     { "PLV-Z2", "", "", "", "" },
+     "Sanyo PLV-Z2 (non HDCP-mode)", 	/* HDCP mode would be id 9b06, but not needed */
+     1280, 768,				/* as it then advertises correct size */
+     1280, 720,
+     1,   /* 1280x720, no special modes otherwise */
+     {21|0xc0, 0     , 0     , 0     , 0     , 0     , 0     , 0     , 0     , 0     ,
+       0     , 0     , 0     , 0     , 0     , 0     , 0     , 0     , 0     , 0       }
+   },
+   { 0x34a9, 1,
+     { 0xd034, 0x0000, 0x0000, 0x0000, 0x0000 },
+     { "AE500U (DVI-D)", "", "", "", "" },
+     "Panasonic AE500U",
+     1280, 768,
+     1280, 720,
+     1,   /* 1280x720, no special modes otherwise */
+     {21|0xc0, 0     , 0     , 0     , 0     , 0     , 0     , 0     , 0     , 0     ,
+       0     , 0     , 0     , 0     , 0     , 0     , 0     , 0     , 0     , 0       }
+   },
+   { 0x34a9, 1,
+     { 0xd043, 0x0000, 0x0000, 0x0000, 0x0000 },
+     { "AE700U (HDMI)", "", "", "", "" },
+     "Panasonic AE700U",
+     1360, 768,
+     1280, 720,
+     6,   /* 1280x720/60, 1280x720/50, 1280x768@56(digital/analog), 720x480, 720x576 */
+     {21|0xc0,23|0xc0,22|0x80,13|0x40,24|0x80,25|0x80, 0     , 0     , 0     , 0     ,
+       0     , 0     , 0     , 0     , 0     , 0     , 0     , 0     , 0     , 0       }
+   },
    { 0x0000 }
 };
+#endif
 
+#ifdef LINUX_XF86
 USHORT  SiS_GetModeID(int VGAEngine, ULONG VBFlags, int HDisplay, int VDisplay,
 			  int Depth, BOOLEAN FSTN, int LCDwith, int LCDheight);
+#endif
 USHORT  SiS_GetModeID_LCD(int VGAEngine, ULONG VBFlags, int HDisplay, int VDisplay, int Depth, BOOLEAN FSTN,
                           USHORT CustomT, int LCDwith, int LCDheight);
 USHORT  SiS_GetModeID_TV(int VGAEngine, ULONG VBFlags, int HDisplay, int VDisplay, int Depth);
@@ -2376,9 +2388,9 @@
 UCHAR 	SiS_GetRegByte(SISIOADDRESS port);
 USHORT	SiS_GetRegShort(SISIOADDRESS port);
 ULONG	SiS_GetRegLong(SISIOADDRESS port);
-void	SiS_SetRegANDOR(SISIOADDRESS Port,USHORT Index,USHORT DataAND,USHORT DataOR);
-void 	SiS_SetRegAND(SISIOADDRESS Port,USHORT Index,USHORT DataAND);
-void	SiS_SetRegOR(SISIOADDRESS Port,USHORT Index,USHORT DataOR);
+void	SiS_SetRegANDOR(SISIOADDRESS Port, USHORT Index, USHORT DataAND, USHORT DataOR);
+void 	SiS_SetRegAND(SISIOADDRESS Port,USHORT Index, USHORT DataAND);
+void	SiS_SetRegOR(SISIOADDRESS Port,USHORT Index, USHORT DataOR);
 void	SiS_DisplayOn(SiS_Private *SiS_Pr);
 void	SiS_DisplayOff(SiS_Private *SiS_Pr);
 void	SiSRegInit(SiS_Private *SiS_Pr, SISIOADDRESS BaseAddr);
@@ -2387,14 +2399,14 @@
 void	SiS_SetEnableDstn(SiS_Private *SiS_Pr, int enable);
 void	SiS_SetEnableFstn(SiS_Private *SiS_Pr, int enable);
 void	SiS_GetVBType(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
-USHORT	SiS_GetMCLK(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
 BOOLEAN	SiS_SearchModeID(SiS_Private *SiS_Pr, USHORT *ModeNo, USHORT *ModeIdIndex);
 UCHAR	SiS_GetModePtr(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex);
 USHORT	SiS_GetColorDepth(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex);
-USHORT	SiS_GetOffset(SiS_Private *SiS_Pr,USHORT ModeNo,USHORT ModeIdIndex,
-              USHORT RefreshRateTableIndex,PSIS_HW_INFO HwInfo);
+USHORT	SiS_GetOffset(SiS_Private *SiS_Pr,USHORT ModeNo, USHORT ModeIdIndex,
+              USHORT RefreshRateTableIndex, PSIS_HW_INFO HwInfo);
 void	SiS_LoadDAC(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, USHORT ModeNo, USHORT ModeIdIndex);
-void	SiS_CalcLCDACRT1Timing(SiS_Private *SiS_Pr,USHORT ModeNo,USHORT ModeIdIndex);
+void	SiS_CalcLCDACRT1Timing(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex);
+
 #ifdef LINUX_XF86
 BOOLEAN	SiSSetMode(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,ScrnInfoPtr pScrn,USHORT ModeNo, BOOLEAN dosetpitch);
 BOOLEAN	SiSBIOSSetMode(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, ScrnInfoPtr pScrn,
@@ -2404,51 +2416,56 @@
 BOOLEAN	SiSBIOSSetModeCRT1(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, ScrnInfoPtr pScrn,
                DisplayModePtr mode, BOOLEAN IsCustom);
 int	SiSTranslateToVESA(ScrnInfoPtr pScrn, int modenumber);
+int	SiSTranslateToOldMode(int modenumber);
 BOOLEAN	SiS_GetPanelID(SiS_Private *SiS_Pr, PSIS_HW_INFO);
 USHORT 	SiS_CheckBuildCustomMode(ScrnInfoPtr pScrn, DisplayModePtr mode, int VBFlags);
 DisplayModePtr SiSBuildBuiltInModeList(ScrnInfoPtr pScrn, BOOLEAN includelcdmodes, BOOLEAN isfordvi);
+int 	SiS_FindPanelFromDB(SISPtr pSiS, USHORT panelvendor, USHORT panelproduct, int *maxx, int *maxy, int *prefx, int *prefy);
+void    SiS_MakeClockRegs(ScrnInfoPtr pScrn, int clock, UCHAR *p2b, UCHAR *p2c);
 #else
 BOOLEAN	SiSSetMode(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,USHORT ModeNo);
 #endif
+
 #ifdef LINUX_KERNEL
-int    sisfb_mode_rate_to_dclock(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,
-			      unsigned char modeno, unsigned char rateindex);
-int    sisfb_mode_rate_to_ddata(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,
-			 unsigned char modeno, unsigned char rateindex,
-			 struct fb_var_screeninfo *var);
+int    	sisfb_mode_rate_to_dclock(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,
+			      UCHAR modeno, UCHAR rateindex);
+int    	sisfb_mode_rate_to_ddata(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,
+			UCHAR modeno, UCHAR rateindex,
+			struct fb_var_screeninfo *var);
 BOOLEAN sisfb_gettotalfrommode(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,
-		       unsigned char modeno, int *htotal, int *vtotal, unsigned char rateindex);
+		       	UCHAR modeno, int *htotal, int *vtotal, UCHAR rateindex);
 #endif
 
-extern void      SiS_GetVBInfo(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex,
-			       PSIS_HW_INFO HwInfo, int chkcrt2mode);
-extern void      SiS_GetLCDResInfo(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex,
-			           PSIS_HW_INFO HwInfo);
-extern void      SiS_SetYPbPr(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
-extern void 	 SiS_SetTVMode(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex, PSIS_HW_INFO HwInfo);
-extern void      SiS_UnLockCRT2(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
-extern void      SiS_LockCRT2(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
-extern void      SiS_DisableBridge(SiS_Private *, PSIS_HW_INFO);
-extern BOOLEAN   SiS_SetCRT2Group(SiS_Private *, PSIS_HW_INFO, USHORT);
-extern USHORT    SiS_GetRatePtr(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex,
-                                PSIS_HW_INFO HwInfo);
-extern void      SiS_WaitRetrace1(SiS_Private *SiS_Pr);
-extern USHORT    SiS_GetResInfo(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex);
-extern USHORT    SiS_GetCH700x(SiS_Private *SiS_Pr, USHORT tempax);
-extern USHORT    SiS_GetVCLK2Ptr(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex,
-                                 USHORT RefreshRateTableIndex, PSIS_HW_INFO HwInfo);
-extern BOOLEAN   SiS_IsVAMode(SiS_Private *, PSIS_HW_INFO);
-extern BOOLEAN   SiS_IsDualEdge(SiS_Private *, PSIS_HW_INFO);
+/* init301.c: */
+extern void     SiS_GetVBInfo(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex,
+			       	PSIS_HW_INFO HwInfo, int chkcrt2mode);
+extern void     SiS_GetLCDResInfo(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex,
+			       	PSIS_HW_INFO HwInfo);
+extern void     SiS_SetYPbPr(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
+extern void 	SiS_SetTVMode(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex, PSIS_HW_INFO HwInfo);
+extern void     SiS_UnLockCRT2(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
+extern void     SiS_LockCRT2(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
+extern void     SiS_DisableBridge(SiS_Private *, PSIS_HW_INFO);
+extern BOOLEAN  SiS_SetCRT2Group(SiS_Private *, PSIS_HW_INFO, USHORT);
+extern USHORT   SiS_GetRatePtr(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex,
+                               	PSIS_HW_INFO HwInfo);
+extern void     SiS_WaitRetrace1(SiS_Private *SiS_Pr);
+extern USHORT   SiS_GetResInfo(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex);
+extern USHORT   SiS_GetCH700x(SiS_Private *SiS_Pr, USHORT tempax);
+extern USHORT   SiS_GetVCLK2Ptr(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex,
+                               	USHORT RefreshRateTableIndex, PSIS_HW_INFO HwInfo);
+extern BOOLEAN  SiS_IsVAMode(SiS_Private *, PSIS_HW_INFO);
+extern BOOLEAN  SiS_IsDualEdge(SiS_Private *, PSIS_HW_INFO);
 
 #ifdef LINUX_XF86
+/* From other sis driver modules: */
 extern int      SiS_compute_vclk(int Clock, int *out_n, int *out_dn, int *out_div,
-	     	 		 int *out_sbit, int *out_scale);
+	     	 	 	int *out_sbit, int *out_scale);
 extern void 	SiSCalcClock(ScrnInfoPtr pScrn, int clock, int max_VLD, unsigned int *vclk);
 
-extern unsigned char SiS_GetSetBIOSScratch(ScrnInfoPtr pScrn, USHORT offset, unsigned char value);
-extern unsigned char SiS_GetSetModeID(ScrnInfoPtr pScrn, unsigned char id);
-extern USHORT 	     SiS_CalcModeIndex(ScrnInfoPtr pScrn, DisplayModePtr mode, unsigned long VBFlags,
-					BOOLEAN hcm);
+extern UCHAR   	SiS_GetSetBIOSScratch(ScrnInfoPtr pScrn, USHORT offset, UCHAR value);
+extern UCHAR   	SiS_GetSetModeID(ScrnInfoPtr pScrn, UCHAR id);
+extern USHORT 	SiS_GetModeNumber(ScrnInfoPtr pScrn, DisplayModePtr mode, ULONG VBFlags);
 #endif
 
 #endif
diff -Nru a/drivers/video/sis/init301.c b/drivers/video/sis/init301.c
--- a/drivers/video/sis/init301.c	2005-01-10 20:11:16 -08:00
+++ b/drivers/video/sis/init301.c	2005-01-10 20:11:16 -08:00
@@ -133,17 +133,29 @@
 {
    UCHAR  *ROMAddr = HwInfo->pjVirtualRomBase;
    UCHAR  *myptr = NULL;
-   USHORT romindex = 0;
+   USHORT romindex = 0, reg = 0, idx = 0;
 
-   /* Use the BIOS tables only for LVDS panels; DVI is unreliable
+   /* Use the BIOS tables only for LVDS panels; TMDS is unreliable
     * due to the variaty of panels the BIOS doesn't know about.
+    * Exception: If the BIOS has better knowledge (such as in case
+    * of machines with a 301C and a panel that does not support DDC)
+    * use the BIOS data as well.
     */
 
-   if((SiS_Pr->SiS_ROMNew) && (SiS_Pr->SiS_VBType & VB_SIS301LV302LV)) {
-      myptr = (UCHAR *)SiS_LCDStruct661;
+   if((SiS_Pr->SiS_ROMNew) &&
+      ((SiS_Pr->SiS_VBType & VB_SIS301LV302LV) || (!SiS_Pr->PanelSelfDetected))) {
+
+      if(HwInfo->jChipType < SIS_661) reg = 0x3c;
+      else                            reg = 0x7d;
+
+      idx = (SiS_GetReg(SiS_Pr->SiS_P3d4,reg) & 0x1f) * 26;
+
+      if(idx < (8*26)) {
+         myptr = (UCHAR *)&SiS_LCDStruct661[idx];
+      }
       romindex = SISGETROMW(0x100);
       if(romindex) {
-         romindex += ((SiS_GetReg(SiS_Pr->SiS_P3d4,0x7d) & 0x1f) * 26);
+         romindex += idx;
          myptr = &ROMAddr[romindex];
       }
    }
@@ -156,11 +168,15 @@
    UCHAR  *ROMAddr = HwInfo->pjVirtualRomBase;
    USHORT romptr = 0;
 
-   /* Use the BIOS tables only for LVDS panels; DVI is unreliable
+   /* Use the BIOS tables only for LVDS panels; TMDS is unreliable
     * due to the variaty of panels the BIOS doesn't know about.
+    * Exception: If the BIOS has better knowledge (such as in case
+    * of machines with a 301C and a panel that does not support DDC)
+    * use the BIOS data as well.
     */
 
-   if((SiS_Pr->SiS_ROMNew) && (SiS_Pr->SiS_VBType & VB_SIS301LV302LV)) {
+   if((SiS_Pr->SiS_ROMNew) &&
+      ((SiS_Pr->SiS_VBType & VB_SIS301LV302LV) || (!SiS_Pr->PanelSelfDetected))) {
       romptr = SISGETROMW(0x102);
       romptr += ((SiS_GetReg(SiS_Pr->SiS_P3d4,0x36) >> 4) * SiS_Pr->SiS661LCD2TableSize);
    }
@@ -175,12 +191,11 @@
 
 static BOOLEAN
 SiS_AdjustCRT2Rate(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex,
-                   USHORT RefreshRateTableIndex, USHORT *i,
-		   PSIS_HW_INFO HwInfo)
+                   USHORT RRTI, USHORT *i, PSIS_HW_INFO HwInfo)
 {
   USHORT checkmask=0,modeid,infoflag;
 
-  modeid = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex + (*i)].ModeID;
+  modeid = SiS_Pr->SiS_RefIndex[RRTI + (*i)].ModeID;
 
   if(SiS_Pr->SiS_VBType & VB_SISVB) {
 
@@ -241,8 +256,8 @@
   }
 
   /* Look backwards in table for matching CRT2 mode */
-  for(; SiS_Pr->SiS_RefIndex[RefreshRateTableIndex+(*i)].ModeID == modeid; (*i)--) {
-     infoflag = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex + (*i)].Ext_InfoFlag;
+  for(; SiS_Pr->SiS_RefIndex[RRTI + (*i)].ModeID == modeid; (*i)--) {
+     infoflag = SiS_Pr->SiS_RefIndex[RRTI + (*i)].Ext_InfoFlag;
      if(infoflag & checkmask) return TRUE;
      if((*i) == 0) break;
   }
@@ -251,13 +266,11 @@
    * for a matching CRT2 mode if no mode was found yet.
    */
   for((*i) = 0; ; (*i)++) {
-     if(SiS_Pr->SiS_RefIndex[RefreshRateTableIndex + (*i)].ModeID != modeid) {
-     	return FALSE;
-     }
-     infoflag = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex + (*i)].Ext_InfoFlag;
+     if(SiS_Pr->SiS_RefIndex[RRTI + (*i)].ModeID != modeid) break;
+     infoflag = SiS_Pr->SiS_RefIndex[RRTI + (*i)].Ext_InfoFlag;
      if(infoflag & checkmask) return TRUE;
   }
-  return TRUE;
+  return FALSE;
 }
 
 /*********************************************/
@@ -273,7 +286,7 @@
 			       0x01, 0x01, 0x01, 0x01,
 			       0x01, 0x01, 0x01, 0x01,
 			       0x00, 0x00, 0x00, 0x00 };
-  USHORT RefreshRateTableIndex,i,backup_i;
+  USHORT RRTI,i,backup_i;
   USHORT modeflag,index,temp,backupindex;
 
   /* Do NOT check for UseCustomMode here, will skrew up FIFO */
@@ -318,23 +331,23 @@
      }
   }
 
-  RefreshRateTableIndex = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].REFindex;
-  ModeNo = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].ModeID;
+  RRTI = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].REFindex;
+  ModeNo = SiS_Pr->SiS_RefIndex[RRTI].ModeID;
 
   if(HwInfo->jChipType >= SIS_315H) {
      if(!(SiS_Pr->SiS_VBInfo & DriverMode)) {
         if( (SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_VESAID == 0x105) ||
             (SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_VESAID == 0x107) ) {
-           if(backupindex <= 1) RefreshRateTableIndex++;
+           if(backupindex <= 1) RRTI++;
         }
      }
   }
 
   i = 0;
   do {
-     if(SiS_Pr->SiS_RefIndex[RefreshRateTableIndex + i].ModeID != ModeNo) break;
-     temp = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex + i].Ext_InfoFlag;
-     temp &= ModeInfoFlag;
+     if(SiS_Pr->SiS_RefIndex[RRTI + i].ModeID != ModeNo) break;
+     temp = SiS_Pr->SiS_RefIndex[RRTI + i].Ext_InfoFlag;
+     temp &= ModeTypeMask;
      if(temp < SiS_Pr->SiS_ModeType) break;
      i++;
      index--;
@@ -342,7 +355,7 @@
 
   if(!(SiS_Pr->SiS_VBInfo & SetCRT2ToRAMDAC)) {
      if(SiS_Pr->SiS_VBInfo & SetInSlaveMode) {
-      	temp = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex + i - 1].Ext_InfoFlag;
+      	temp = SiS_Pr->SiS_RefIndex[RRTI + i - 1].Ext_InfoFlag;
       	if(temp & InterlaceMode) i++;
      }
   }
@@ -351,12 +364,12 @@
 
   if((SiS_Pr->SiS_SetFlag & ProgrammingCRT2) && (!(SiS_Pr->SiS_VBInfo & DisableCRT2Display))) {
      backup_i = i;
-     if(!(SiS_AdjustCRT2Rate(SiS_Pr, ModeNo, ModeIdIndex, RefreshRateTableIndex, &i, HwInfo))) {
+     if(!(SiS_AdjustCRT2Rate(SiS_Pr, ModeNo, ModeIdIndex, RRTI, &i, HwInfo))) {
 	i = backup_i;
      }
   }
 
-  return(RefreshRateTableIndex + i);
+  return(RRTI + i);
 }
 
 /*********************************************/
@@ -383,12 +396,12 @@
 static BOOLEAN
 SiS_CR36BIOSWord23b(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
 {
-  UCHAR *ROMAddr = (UCHAR *)HwInfo->pjVirtualRomBase;
+  UCHAR  *ROMAddr = HwInfo->pjVirtualRomBase;
   USHORT temp,temp1;
 
   if(SiS_Pr->SiS_UseROM) {
      if((ROMAddr[0x233] == 0x12) && (ROMAddr[0x234] == 0x34)) {
-        temp = 1 << ((SiS_GetReg(SiS_Pr->SiS_P3d4,0x36) & 0xff) >> 4);
+        temp = 1 << ((SiS_GetReg(SiS_Pr->SiS_P3d4,0x36) >> 4) & 0x0f);
         temp1 = SISGETROMW(0x23b);
         if(temp1 & temp) return TRUE;
      }
@@ -399,12 +412,12 @@
 static BOOLEAN
 SiS_CR36BIOSWord23d(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
 {
-  UCHAR *ROMAddr = (UCHAR *)HwInfo->pjVirtualRomBase;
+  UCHAR  *ROMAddr = HwInfo->pjVirtualRomBase;
   USHORT temp,temp1;
 
   if(SiS_Pr->SiS_UseROM) {
      if((ROMAddr[0x233] == 0x12) && (ROMAddr[0x234] == 0x34)) {
-        temp = 1 << ((SiS_GetReg(SiS_Pr->SiS_P3d4,0x36) & 0xff) >> 4);
+        temp = 1 << ((SiS_GetReg(SiS_Pr->SiS_P3d4,0x36) >> 4) & 0x0f);
         temp1 = SISGETROMW(0x23d);
         if(temp1 & temp) return TRUE;
      }
@@ -478,6 +491,7 @@
 
       PanelID = SiS_GetReg(SiS_Pr->SiS_P3d4,0x36);
       if(SiS_Pr->SiS_VBType & VB_SISVB) {
+         if(SiS_Pr->SiS_VBType & VB_SIS301) PanelID &= 0xf7;
          if(!(SiS_GetReg(SiS_Pr->SiS_P3c4,0x18) & 0x10)) PanelID = 0x12;
       }
       DelayIndex = PanelID >> 4;
@@ -507,7 +521,8 @@
 
       if((HwInfo->jChipType >= SIS_661)    ||
          (HwInfo->jChipType <= SIS_315PRO) ||
-	 (HwInfo->jChipType == SIS_330)) {
+	 (HwInfo->jChipType == SIS_330)    ||
+	 (SiS_Pr->SiS_ROMNew)) {
 
          if(!(DelayTime & 0x01)) {
 	    SiS_DDC2Delay(SiS_Pr, 0x1000);
@@ -920,7 +935,7 @@
 
    if(!(SiS_Pr->SiS_ChSW)) return;
 
-#ifndef LINUX_XF86
+#ifdef LINUX_KERNEL
    SiS_SetRegLong(0xcf8,0x80000874);		       /* get ACPI base */
    acpibase = SiS_GetRegLong(0xcfc);
 #else
@@ -956,7 +971,7 @@
 
   SiS_Pr->SiS_SetFlag = 0;
 
-  SiS_Pr->SiS_ModeType = modeflag & ModeInfoFlag;
+  SiS_Pr->SiS_ModeType = modeflag & ModeTypeMask;
 
   tempbx = 0;
   if(SiS_BridgeIsOn(SiS_Pr)) {
@@ -981,7 +996,7 @@
 
 #ifdef SIS315H
 	if(HwInfo->jChipType >= SIS_315H) {
-    	   if(SiS_Pr->SiS_VBType & (VB_SIS301C|VB_SIS302B|VB_SIS301LV|VB_SIS302LV|VB_SIS302ELV)) {
+    	   if(SiS_Pr->SiS_VBType & VB_SISLCDA) {
 	      if(ModeNo == 0x03) {
 	         /* Mode 0x03 is never in driver mode */
 		 SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x31,0xbf);
@@ -1012,13 +1027,13 @@
 	   if(HwInfo->jChipType >= SIS_661) {
 	      tempbx &= ~(SetCRT2ToYPbPr525750 | SetCRT2ToHiVision);
 	      temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x38);
-	      if(SiS_Pr->SiS_VBType & (VB_SIS301C|VB_SIS301LV|VB_SIS302LV|VB_SIS302ELV)) {
+	      if(SiS_Pr->SiS_VBType & VB_SISYPBPR) {
 	         if(temp & 0x04) {
 		    temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x35) & 0xe0;
 		    if(temp == 0x60) tempbx |= SetCRT2ToHiVision;
 		    else             tempbx |= SetCRT2ToYPbPr525750;
 		 }
-	      } else if(SiS_Pr->SiS_VBType & (VB_SIS301 | VB_SIS301B | VB_SIS302B)) {
+	      } else if(SiS_Pr->SiS_VBType & VB_SISHIVISION) {
 	         if(temp & 0x04) {
 		    temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x35) & 0xe0;
 		    if(temp == 0x60) tempbx |= SetCRT2ToHiVision;
@@ -1445,7 +1460,7 @@
    USHORT temp = SiS_Pr->SiS_LCDResInfo;
    /* Translate my LCDResInfo to BIOS value */
    if(temp == Panel_1280x768_2)  temp = Panel_1280x768;
-   if(temp == Panel_1280x768_3)  temp = Panel_1280x768;
+   if(temp == Panel_1280x800_2)  temp = Panel_1280x800;
    return temp;
 }
 
@@ -1501,20 +1516,36 @@
 #endif
 }
 
+static void
+SiS_CheckScaling(SiS_Private *SiS_Pr, USHORT resinfo, const UCHAR *nonscalingmodes)
+{
+    int i = 0;
+    while(nonscalingmodes[i] != 0xff) {
+        if(nonscalingmodes[i++] == resinfo) {
+	   if((SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) ||
+	      (SiS_Pr->UsePanelScaler == -1)) {
+	      SiS_Pr->SiS_LCDInfo |= DontExpandLCD;
+	   }
+	   break;
+	}
+    }
+}
+
 void
 SiS_GetLCDResInfo(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex,
 		  PSIS_HW_INFO HwInfo)
 {
 #ifdef SIS300
-  UCHAR  *ROMAddr = HwInfo->pjVirtualRomBase;
+  UCHAR *ROMAddr = HwInfo->pjVirtualRomBase;
+  const unsigned char SiS300SeriesLCDRes[] =
+          { 0,  1,  2,  3,  7,  4,  5,  8,
+	    0,  0, 10,  0,  0,  0,  0, 15 };
 #endif
 #ifdef SIS315H
-  UCHAR  *myptr = NULL;
+  UCHAR   *myptr = NULL;
 #endif
-  USHORT temp,modeflag,resinfo=0;
-  const unsigned char SiS300SeriesLCDRes[] =
-         { 0,  1,  2,  3,  7,  4,  5,  8,
-	   0,  0, 10,  0,  0,  0,  0, 15 };
+  USHORT  temp,modeflag,resinfo=0,modexres=0,modeyres=0;
+  BOOLEAN panelcanscale = FALSE;
 
   SiS_Pr->SiS_LCDResInfo  = 0;
   SiS_Pr->SiS_LCDTypeInfo = 0;
@@ -1534,10 +1565,14 @@
   } else {
      modeflag = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
      resinfo = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_RESINFO;
+     modexres = SiS_Pr->SiS_ModeResInfo[resinfo].HTotal;
+     modeyres = SiS_Pr->SiS_ModeResInfo[resinfo].VTotal;
   }
 
   temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x36);
-  if(!temp) return;
+
+  /* For broken BIOSes: Assume 1024x768 */
+  if(temp == 0) temp = 0x02;
 
   if((HwInfo->jChipType >= SIS_661) || (SiS_Pr->SiS_ROMNew)) {
      SiS_Pr->SiS_LCDTypeInfo = (SiS_GetReg(SiS_Pr->SiS_P3d4,0x39) & 0x7c) >> 2;
@@ -1547,24 +1582,31 @@
      SiS_Pr->SiS_LCDTypeInfo = (temp & 0x0F) - 1;
   }
   temp &= 0x0f;
+#ifdef SIS300
   if(HwInfo->jChipType < SIS_315H) {
+     /* Very old BIOSes only know 7 sizes (NetVista 2179, 1.01g) */
+     if(SiS_Pr->SiS_VBType & VB_SIS301) {
+        if(temp < 0x0f) temp &= 0x07;
+     }
      /* Translate 300 series LCDRes to 315 series for unified usage */
      temp = SiS300SeriesLCDRes[temp];
   }
+#endif
 
+  /* Translate to our internal types */
   if(HwInfo->jChipType == SIS_550) {
      if(temp == Panel310_640x480_2) temp = Panel_640x480_2;
      if(temp == Panel310_640x480_3) temp = Panel_640x480_3;
   }
 
-  if(SiS_Pr->SiS_VBType & VB_SIS301LV302LV) {	/* SiS LVDS */
+  if(SiS_Pr->SiS_VBType & VB_SISLVDS) {	/* SiS LVDS */
      if(temp == Panel310_1280x768) {
         temp = Panel_1280x768_2;
-#ifdef SIS315H
-	if((myptr = GetLCDStructPtr661(SiS_Pr, HwInfo))) {
-	   if((myptr[8] | (myptr[9] << 8)) == 798) temp = Panel_1280x768_3;
+     }
+     if(SiS_Pr->SiS_ROMNew) {
+        if(temp == Panel661_1280x800) {
+	   temp = Panel_1280x800_2;
 	}
-#endif
      }
   }
 
@@ -1586,6 +1628,77 @@
 	SiS_Pr->SiS_LCDResInfo = SiS_Pr->SiS_PanelMinLVDS;
   }
 
+  temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x37);
+  SiS_Pr->SiS_LCDInfo = temp & ~0x000e;
+  /* Need temp below! */
+
+  /* These can't scale no matter what */
+  switch(SiS_Pr->SiS_LCDResInfo) {
+  case Panel_1280x960:
+      SiS_Pr->SiS_LCDInfo &= ~DontExpandLCD;
+  }
+
+  panelcanscale = (SiS_Pr->SiS_LCDInfo & DontExpandLCD) ? TRUE : FALSE;
+
+  if(!SiS_Pr->UsePanelScaler)          SiS_Pr->SiS_LCDInfo &= ~DontExpandLCD;
+  else if(SiS_Pr->UsePanelScaler == 1) SiS_Pr->SiS_LCDInfo |= DontExpandLCD;
+
+  /* Dual link, Pass 1:1 BIOS default, etc. */
+#ifdef SIS315H
+  if(HwInfo->jChipType >= SIS_661) {
+     if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) {
+        if(temp & 0x08) SiS_Pr->SiS_LCDInfo |= LCDPass11;
+     }
+     if(SiS_Pr->SiS_VBType & (VB_SIS302LV | VB_SIS302ELV)) {
+        if(SiS_Pr->SiS_ROMNew) {
+	   if(temp & 0x02) SiS_Pr->SiS_LCDInfo |= LCDDualLink;
+	} else if((myptr = GetLCDStructPtr661(SiS_Pr, HwInfo))) {
+           if(myptr[2] & 0x01) SiS_Pr->SiS_LCDInfo |= LCDDualLink;
+	}
+     }
+  } else if(HwInfo->jChipType >= SIS_315H) {
+     if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) {
+        if(SiS_GetReg(SiS_Pr->SiS_P3d4,0x39) & 0x01) SiS_Pr->SiS_LCDInfo |= LCDPass11;
+     }
+     if((SiS_Pr->SiS_ROMNew) && (!(SiS_Pr->PanelSelfDetected))) {
+        SiS_Pr->SiS_LCDInfo &= ~(LCDRGB18Bit);
+	temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x35);
+        if(temp & 0x01) SiS_Pr->SiS_LCDInfo |= LCDRGB18Bit;
+	if(SiS_Pr->SiS_VBType & (VB_SIS302LV | VB_SIS302ELV)) {
+	   if(temp & 0x02) SiS_Pr->SiS_LCDInfo |= LCDDualLink;
+	}
+     } else if(!(SiS_Pr->SiS_ROMNew)) {
+        if(SiS_Pr->SiS_VBType & (VB_SIS302LV | VB_SIS302ELV)) {
+           if((SiS_Pr->SiS_CustomT == CUT_CLEVO1024) &&
+	      (SiS_Pr->SiS_LCDResInfo == Panel_1024x768)) {
+	      SiS_Pr->SiS_LCDInfo |= LCDDualLink;
+	   }
+           if((SiS_Pr->SiS_LCDResInfo == Panel_1280x1024) ||
+	      (SiS_Pr->SiS_LCDResInfo == Panel_1400x1050) ||
+              (SiS_Pr->SiS_LCDResInfo == Panel_1600x1200) ||
+	      (SiS_Pr->SiS_LCDResInfo == Panel_1680x1050)) {
+	      SiS_Pr->SiS_LCDInfo |= LCDDualLink;
+	   }
+        }
+     }
+  }
+#endif
+
+  /* Pass 1:1 */
+  if((SiS_Pr->SiS_IF_DEF_LVDS == 1) || (SiS_Pr->SiS_VBType & VB_NoLCD)) {
+     /* Always center screen on LVDS (if scaling is disabled) */
+     SiS_Pr->SiS_LCDInfo &= ~LCDPass11;
+  } else if(SiS_Pr->SiS_VBType & VB_SISVB) {
+     if(SiS_Pr->SiS_VBType & VB_SISLVDS) {
+        /* Always center screen on SiS LVDS (if scaling is disabled) */
+        SiS_Pr->SiS_LCDInfo &= ~LCDPass11;
+     } else {
+        /* By default, pass 1:1 on SiS TMDS (if scaling is supported) */
+        if(panelcanscale)             SiS_Pr->SiS_LCDInfo |= LCDPass11;
+        if(SiS_Pr->CenterScreen == 1) SiS_Pr->SiS_LCDInfo &= ~LCDPass11;
+     }
+  }
+
   SiS_Pr->PanelVCLKIdx300 = VCLK65_300;
   SiS_Pr->PanelVCLKIdx315 = VCLK108_2_315;
 
@@ -1654,31 +1767,37 @@
 			    SiS_GetLCDInfoBIOS(SiS_Pr, HwInfo);
 			    break;
      case Panel_1280x768:   SiS_Pr->PanelXRes = 1280; SiS_Pr->PanelYRes =  768;
-     			    SiS_Pr->PanelHT   = 1688; SiS_Pr->PanelVT   =  802;
-			    SiS_Pr->PanelHRS  =   48; SiS_Pr->PanelHRS  =  112;
-			    SiS_Pr->PanelVRS  =    3; SiS_Pr->PanelVRE  =    6;
-			    SiS_Pr->PanelVCLKIdx300 = VCLK81_300;
-			    SiS_Pr->PanelVCLKIdx315 = VCLK81_315;
+     			    if(SiS_Pr->SiS_IF_DEF_LVDS == 1) {
+			       SiS_Pr->PanelHT   = 1408; SiS_Pr->PanelVT   =  806;
+			       SiS_Pr->PanelVCLKIdx300 = VCLK81_300; /* ? */
+			       SiS_Pr->PanelVCLKIdx315 = VCLK81_315; /* ? */
+			    } else {
+     			       SiS_Pr->PanelHT   = 1688; SiS_Pr->PanelVT   =  802;
+			       SiS_Pr->PanelHRS  =   48; SiS_Pr->PanelHRS  =  112;
+			       SiS_Pr->PanelVRS  =    3; SiS_Pr->PanelVRE  =    6;
+			       SiS_Pr->PanelVCLKIdx300 = VCLK81_300;
+			       SiS_Pr->PanelVCLKIdx315 = VCLK81_315;
+			    }
 			    break;
      case Panel_1280x768_2: SiS_Pr->PanelXRes = 1280; SiS_Pr->PanelYRes =  768;
-     			    SiS_Pr->PanelHT   = 1408; SiS_Pr->PanelVT   =  806;
-			    SiS_Pr->PanelHRS  =   16; SiS_Pr->PanelHRE  =   64;
+     			    SiS_Pr->PanelHT   = 1660; SiS_Pr->PanelVT   =  806;
+			    SiS_Pr->PanelHRS  =   48; SiS_Pr->PanelHRE  =  112;
 			    SiS_Pr->PanelVRS  =    3; SiS_Pr->PanelVRE  =    6;
 			    SiS_Pr->PanelVCLKIdx315 = VCLK_1280x768_2;
 			    SiS_GetLCDInfoBIOS(SiS_Pr, HwInfo);
 			    break;
-     case Panel_1280x768_3: SiS_Pr->PanelXRes = 1280; SiS_Pr->PanelYRes =  768;
-     			    SiS_Pr->PanelHT   = 1664; SiS_Pr->PanelVT   =  798;
-			    SiS_Pr->PanelHRS   =  64; SiS_Pr->PanelHRE  =  128;
-			    SiS_Pr->PanelVRS   =   3; SiS_Pr->PanelVRE  =    7;
-			    SiS_Pr->PanelVCLKIdx315 = VCLK_1280x768_3;
+     case Panel_1280x800:   SiS_Pr->PanelXRes = 1280; SiS_Pr->PanelYRes =  800;
+     			    SiS_Pr->PanelHT   = 1408; SiS_Pr->PanelVT   =  816;
+			    SiS_Pr->PanelHRS   =  21; SiS_Pr->PanelHRE  =   24;
+			    SiS_Pr->PanelVRS   =   4; SiS_Pr->PanelVRE  =    3;
+			    SiS_Pr->PanelVCLKIdx315 = VCLK_1280x800_315;
 			    SiS_GetLCDInfoBIOS(SiS_Pr, HwInfo);
 			    break;
-     case Panel_1280x800:   SiS_Pr->PanelXRes = 1280; SiS_Pr->PanelYRes =  800;
-     			    SiS_Pr->PanelHT   = 1656; SiS_Pr->PanelVT   =  841;  /* 1408, 816 */
-			    SiS_Pr->PanelHRS   =  32; SiS_Pr->PanelHRE  =  312;  /*   16,  64 */
-			    SiS_Pr->PanelVRS   =  16; SiS_Pr->PanelVRE  =    8;  /*    4,   3 */
-			    SiS_Pr->PanelVCLKIdx315 = VCLK83_315;
+     case Panel_1280x800_2: SiS_Pr->PanelXRes = 1280; SiS_Pr->PanelYRes =  800;
+     			    SiS_Pr->PanelHT   = 1552; SiS_Pr->PanelVT   =  812;
+			    SiS_Pr->PanelHRS   =  48; SiS_Pr->PanelHRE  =  112;
+			    SiS_Pr->PanelVRS   =   4; SiS_Pr->PanelVRE  =    3;
+			    SiS_Pr->PanelVCLKIdx315 = VCLK_1280x800_315_2;
 			    SiS_GetLCDInfoBIOS(SiS_Pr, HwInfo);
 			    break;
      case Panel_1280x960:   SiS_Pr->PanelXRes = 1280; SiS_Pr->PanelYRes =  960;
@@ -1719,6 +1838,12 @@
 			    SiS_Pr->PanelVCLKIdx315 = VCLK121_315;
 			    SiS_GetLCDInfoBIOS(SiS_Pr, HwInfo);
 			    break;
+     case Panel_Barco1366:  SiS_Pr->PanelXRes = 1360; SiS_Pr->PanelYRes = 1024;
+     			    SiS_Pr->PanelHT   = 1688; SiS_Pr->PanelVT   = 1066;
+     			    break;
+     case Panel_848x480:    SiS_Pr->PanelXRes =  848; SiS_Pr->PanelYRes =  480;
+     			    SiS_Pr->PanelHT   = 1088; SiS_Pr->PanelVT   =  525;
+     			    break;
      case Panel_Custom:     SiS_Pr->PanelXRes = SiS_Pr->CP_MaxX;
     			    SiS_Pr->PanelYRes = SiS_Pr->CP_MaxY;
 			    SiS_Pr->PanelHT   = SiS_Pr->CHTotal;
@@ -1736,63 +1861,185 @@
 			       SiS_Pr->PanelHRE -= SiS_Pr->PanelHRS;
 			       SiS_Pr->PanelVRS -= SiS_Pr->PanelYRes;
 			       SiS_Pr->PanelVRE -= SiS_Pr->PanelVRS;
+			       if(SiS_Pr->CP_PrefClock) {
+			          int idx;
+			          SiS_Pr->PanelVCLKIdx315 = VCLK_CUSTOM_315;
+				  SiS_Pr->PanelVCLKIdx300 = VCLK_CUSTOM_300;
+				  if(HwInfo->jChipType < SIS_315H) idx = VCLK_CUSTOM_300;
+				  else				   idx = VCLK_CUSTOM_315;
+      			          SiS_Pr->SiS_VCLKData[idx].CLOCK =
+	 		             SiS_Pr->SiS_VBVCLKData[idx].CLOCK = SiS_Pr->CP_PrefClock;
+      			          SiS_Pr->SiS_VCLKData[idx].SR2B =
+  	 			     SiS_Pr->SiS_VBVCLKData[idx].Part4_A = SiS_Pr->CP_PrefSR2B;
+      			          SiS_Pr->SiS_VCLKData[idx].SR2C =
+	 			     SiS_Pr->SiS_VBVCLKData[idx].Part4_B = SiS_Pr->CP_PrefSR2C;
+			       }
 			    }
 			    break;
-     case Panel_Barco1366:  SiS_Pr->PanelXRes = 1360; SiS_Pr->PanelYRes = 1024;
-     			    SiS_Pr->PanelHT   = 1688; SiS_Pr->PanelVT   = 1066;
-     			    break;
-     case Panel_848x480:    SiS_Pr->PanelXRes =  848; SiS_Pr->PanelYRes =  480;
-     			    SiS_Pr->PanelHT   = 1088; SiS_Pr->PanelVT   =  525;
-     			    break;
      default:		    SiS_Pr->PanelXRes = 1024; SiS_Pr->PanelYRes =  768;
      			    SiS_Pr->PanelHT   = 1344; SiS_Pr->PanelVT   =  806;
 			    break;
   }
 
-  temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x37);
-  SiS_Pr->SiS_LCDInfo = temp & ~0x000e;
+  /* Special cases */
+  if( (SiS_Pr->SiS_IF_DEF_FSTN)              ||
+      (SiS_Pr->SiS_IF_DEF_DSTN)              ||
+      (SiS_Pr->SiS_CustomT == CUT_BARCO1366) ||
+      (SiS_Pr->SiS_CustomT == CUT_BARCO1024) ||
+      (SiS_Pr->SiS_CustomT == CUT_PANEL848) ) {
+     SiS_Pr->PanelHRS = 999;
+     SiS_Pr->PanelHRE = 999;
+  }
 
-  if(!(SiS_Pr->UsePanelScaler))        SiS_Pr->SiS_LCDInfo &= ~DontExpandLCD;
-  else if(SiS_Pr->UsePanelScaler == 1) SiS_Pr->SiS_LCDInfo |= DontExpandLCD;
+  if( (SiS_Pr->SiS_CustomT == CUT_BARCO1366) ||
+      (SiS_Pr->SiS_CustomT == CUT_BARCO1024) ||
+      (SiS_Pr->SiS_CustomT == CUT_PANEL848) ) {
+     SiS_Pr->PanelVRS = 999;
+     SiS_Pr->PanelVRE = 999;
+  }
 
-#ifdef SIS315H
-  if(HwInfo->jChipType >= SIS_661) {
-     if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) {
-        if(temp & 0x08) SiS_Pr->SiS_LCDInfo |= LCDPass11;
+  /* DontExpand overrule */
+  if((SiS_Pr->SiS_VBType & VB_SISVB) && (!(SiS_Pr->SiS_VBType & VB_NoLCD))) {
+
+     if((SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) && (modeflag & NoSupportLCDScale)) {
+	/* No scaling for this mode on any panel (LCD=CRT2)*/
+	SiS_Pr->SiS_LCDInfo |= DontExpandLCD;
      }
-     if(SiS_Pr->SiS_VBType & (VB_SIS302LV | VB_SIS302ELV)) {
-        if(SiS_Pr->SiS_ROMNew) {
-	   if(temp & 0x02) SiS_Pr->SiS_LCDInfo |= LCDDualLink;
-	} else if((myptr = GetLCDStructPtr661(SiS_Pr, HwInfo))) {
-           if(myptr[2] & 0x01) SiS_Pr->SiS_LCDInfo |= LCDDualLink;
+
+     switch(SiS_Pr->SiS_LCDResInfo) {
+
+     case Panel_Custom:
+     case Panel_1152x864:
+     case Panel_1280x768:	/* TMDS only */
+        SiS_Pr->SiS_LCDInfo |= DontExpandLCD;
+	break;
+
+     case Panel_800x600: {
+        static const UCHAR nonscalingmodes[] = {
+	   SIS_RI_720x480, SIS_RI_720x576, SIS_RI_768x576, SIS_RI_800x480, 0xff
+	};
+	SiS_CheckScaling(SiS_Pr, resinfo, nonscalingmodes);
+	break;
+     }
+     case Panel_1024x768: {
+        static const UCHAR nonscalingmodes[] = {
+	   SIS_RI_720x480, SIS_RI_720x576, SIS_RI_768x576, SIS_RI_800x480, SIS_RI_848x480,
+	   SIS_RI_856x480, SIS_RI_960x540, SIS_RI_960x600, SIS_RI_1024x576,SIS_RI_1024x600,
+	   0xff
+	};
+	SiS_CheckScaling(SiS_Pr, resinfo, nonscalingmodes);
+	break;
+     }
+     case Panel_1280x720: {
+        static const UCHAR nonscalingmodes[] = {
+	   SIS_RI_720x480, SIS_RI_720x576, SIS_RI_768x576, SIS_RI_800x480, SIS_RI_848x480,
+	   SIS_RI_856x480, SIS_RI_960x540, SIS_RI_960x600, SIS_RI_1024x576,SIS_RI_1024x600,
+	   0xff
+	};
+	SiS_CheckScaling(SiS_Pr, resinfo, nonscalingmodes);
+	if(SiS_Pr->PanelHT == 1650) {
+	   SiS_Pr->SiS_LCDInfo |= DontExpandLCD;
 	}
+	break;
      }
-  } else if(HwInfo->jChipType >= SIS_315H) {
-     if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) {
-        if(SiS_GetReg(SiS_Pr->SiS_P3d4,0x39) & 0x01) SiS_Pr->SiS_LCDInfo |= LCDPass11;
+     case Panel_1280x768_2: {  /* LVDS only */
+        static const UCHAR nonscalingmodes[] = {
+	   SIS_RI_720x480, SIS_RI_720x576, SIS_RI_768x576, SIS_RI_800x480, SIS_RI_848x480,
+	   SIS_RI_856x480, SIS_RI_960x540, SIS_RI_960x600, SIS_RI_1024x576,SIS_RI_1024x600,
+	   SIS_RI_1152x768,0xff
+	};
+	SiS_CheckScaling(SiS_Pr, resinfo, nonscalingmodes);
+	switch(resinfo) {
+	case SIS_RI_1280x720:  if(SiS_Pr->UsePanelScaler == -1) {
+	      			  SiS_Pr->SiS_LCDInfo |= DontExpandLCD;
+	   		       }
+	   		       break;
+	}
+        break;
      }
-     if((SiS_Pr->SiS_ROMNew) && (!(SiS_Pr->PanelSelfDetected))) {
-        SiS_Pr->SiS_LCDInfo &= ~(LCDRGB18Bit);
-	temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x35);
-        if(temp & 0x01) SiS_Pr->SiS_LCDInfo |= LCDRGB18Bit;
-	if(SiS_Pr->SiS_VBType & (VB_SIS302LV | VB_SIS302ELV)) {
-	   if(temp & 0x02) SiS_Pr->SiS_LCDInfo |= LCDDualLink;
+     case Panel_1280x800: {  	/* SiS TMDS special (Averatec 6200 series) */
+        static const UCHAR nonscalingmodes[] = {
+	   SIS_RI_720x480, SIS_RI_720x576, SIS_RI_768x576, SIS_RI_800x480, SIS_RI_848x480,
+	   SIS_RI_856x480, SIS_RI_960x540, SIS_RI_960x600, SIS_RI_1024x576,SIS_RI_1024x600,
+	   SIS_RI_1152x768,SIS_RI_1280x720,SIS_RI_1280x768,0xff
+	};
+	SiS_CheckScaling(SiS_Pr, resinfo, nonscalingmodes);
+        break;
+     }
+     case Panel_1280x800_2:  { 	/* SiS LVDS */
+        static const UCHAR nonscalingmodes[] = {
+	   SIS_RI_720x480, SIS_RI_720x576, SIS_RI_768x576, SIS_RI_800x480, SIS_RI_848x480,
+	   SIS_RI_856x480, SIS_RI_960x540, SIS_RI_960x600, SIS_RI_1024x576,SIS_RI_1024x600,
+	   SIS_RI_1152x768,0xff
+	};
+	SiS_CheckScaling(SiS_Pr, resinfo, nonscalingmodes);
+	switch(resinfo) {
+	case SIS_RI_1280x720:
+	case SIS_RI_1280x768:  if(SiS_Pr->UsePanelScaler == -1) {
+	      			  SiS_Pr->SiS_LCDInfo |= DontExpandLCD;
+	   		       }
+	   		       break;
 	}
+        break;
+     }
+     case Panel_1280x960: {
+        static const UCHAR nonscalingmodes[] = {
+	   SIS_RI_720x480, SIS_RI_720x576, SIS_RI_768x576, SIS_RI_800x480, SIS_RI_848x480,
+	   SIS_RI_856x480, SIS_RI_960x540, SIS_RI_960x600, SIS_RI_1024x576,SIS_RI_1024x600,
+	   SIS_RI_1152x768,SIS_RI_1152x864,SIS_RI_1280x720,SIS_RI_1280x768,SIS_RI_1280x800,
+	   0xff
+	};
+	SiS_CheckScaling(SiS_Pr, resinfo, nonscalingmodes);
+        break;
+     }
+     case Panel_1280x1024: {
+        static const UCHAR nonscalingmodes[] = {
+	   SIS_RI_720x480, SIS_RI_720x576, SIS_RI_768x576, SIS_RI_800x480, SIS_RI_848x480,
+	   SIS_RI_856x480, SIS_RI_960x540, SIS_RI_960x600, SIS_RI_1024x576,SIS_RI_1024x600,
+	   SIS_RI_1152x768,SIS_RI_1152x864,SIS_RI_1280x720,SIS_RI_1280x768,SIS_RI_1280x800,
+	   SIS_RI_1280x960,0xff
+	};
+	SiS_CheckScaling(SiS_Pr, resinfo, nonscalingmodes);
+	break;
+     }
+     case Panel_1400x1050: {
+        static const UCHAR nonscalingmodes[] = {
+	     SIS_RI_720x480, SIS_RI_720x576, SIS_RI_768x576, SIS_RI_800x480, SIS_RI_848x480,
+	     SIS_RI_856x480, SIS_RI_960x540, SIS_RI_960x600, SIS_RI_1024x576,SIS_RI_1024x600,
+	     SIS_RI_1152x768,SIS_RI_1152x864,SIS_RI_1280x768,SIS_RI_1280x800,SIS_RI_1280x960,
+	     0xff
+	};
+	SiS_CheckScaling(SiS_Pr, resinfo, nonscalingmodes);
+        switch(resinfo) {
+	case SIS_RI_1280x720:  if(SiS_Pr->UsePanelScaler == -1) {
+	      			  SiS_Pr->SiS_LCDInfo |= DontExpandLCD;
+	   		       }
+	   		       break;
+	case SIS_RI_1280x1024: SiS_Pr->SiS_LCDInfo |= DontExpandLCD;
+	      		       break;
+	}
+	break;
+     }
+     case Panel_1600x1200: {
+        static const UCHAR nonscalingmodes[] = {
+	     SIS_RI_720x480, SIS_RI_720x576, SIS_RI_768x576, SIS_RI_800x480, SIS_RI_848x480,
+	     SIS_RI_856x480, SIS_RI_960x540, SIS_RI_960x600, SIS_RI_1024x576,SIS_RI_1024x600,
+	     SIS_RI_1152x768,SIS_RI_1152x864,SIS_RI_1280x720,SIS_RI_1280x768,SIS_RI_1280x800,
+	     SIS_RI_1280x960,SIS_RI_1360x768,SIS_RI_1360x1024,0xff
+	};
+	SiS_CheckScaling(SiS_Pr, resinfo, nonscalingmodes);
+        break;
+     }
+     case Panel_1680x1050: {
+        static const UCHAR nonscalingmodes[] = {
+	     SIS_RI_720x480, SIS_RI_720x576, SIS_RI_768x576, SIS_RI_800x480, SIS_RI_848x480,
+	     SIS_RI_856x480, SIS_RI_960x540, SIS_RI_960x600, SIS_RI_1024x576,SIS_RI_1024x600,
+	     SIS_RI_1152x768,SIS_RI_1152x864,SIS_RI_1280x960,SIS_RI_1360x768,SIS_RI_1360x1024,
+	     0xff
+	};
+	SiS_CheckScaling(SiS_Pr, resinfo, nonscalingmodes);
+	break;
      }
-  }
-#endif
-
-  if(SiS_Pr->SiS_IF_DEF_LVDS == 1) {
-     /* Always center screen on LVDS (if scaling is disabled) */
-     SiS_Pr->SiS_LCDInfo &= ~LCDPass11;
-  } else if(SiS_Pr->SiS_VBType & VB_SISVB) {
-     if(SiS_Pr->SiS_VBType & VB_SIS301LV302LV) {
-        /* Always center screen on SiS LVDS (if scaling is disabled) */
-        SiS_Pr->SiS_LCDInfo &= ~LCDPass11;
-     } else {
-        /* By default, pass 1:1 on SiS TMDS (if scaling is disabled) */
-        SiS_Pr->SiS_LCDInfo |= LCDPass11;
-        if(SiS_Pr->CenterScreen == 1) SiS_Pr->SiS_LCDInfo &= ~LCDPass11;
      }
   }
 
@@ -1802,78 +2049,6 @@
      }
   }
 
-  if(SiS_Pr->SiS_VBType & VB_SISVB) {
-     if(SiS_Pr->SiS_VBInfo & (SetCRT2ToLCD | SetCRT2ToLCDA)) {
-        if(modeflag & NoSupportLCDScale) {
-	   /* No scaling for this mode on any panel */
-	   SiS_Pr->SiS_LCDInfo |= DontExpandLCD;
-	}
-        switch(SiS_Pr->SiS_LCDResInfo) {
-        case Panel_Custom:
-		/* For non-standard LCD resolution, we let the panel scale */
-           	SiS_Pr->SiS_LCDInfo |= DontExpandLCD;
-		break;
-	case Panel_1280x720:
-	      	if(SiS_Pr->PanelHT == 1650) {
-		   SiS_Pr->SiS_LCDInfo |= DontExpandLCD;
-		}
-	case Panel_1280x768:	/* TMDS only */
-		/* No idea about the timing and zoom factors */
-           	SiS_Pr->SiS_LCDInfo |= DontExpandLCD;
-		break;
-	case Panel_1280x960:
-	 	SiS_Pr->SiS_LCDInfo &= ~DontExpandLCD;
-		break;
-	case Panel_1280x1024:
-	        if(SiS_Pr->SiS_VBType & VB_SISTMDS) {
-		   if(ModeNo == 0x7c || ModeNo == 0x7d || ModeNo == 0x7e ||
-		      ModeNo == 0x79 || ModeNo == 0x75 || ModeNo == 0x78 ||
-		      ModeNo == 0x14 || ModeNo == 0x15 || ModeNo == 0x16) {
-	      	      /* We do not scale to 1280x720/800/960 (B/C bridges only) */
-                      SiS_Pr->SiS_LCDInfo |= DontExpandLCD;
-	           }
-	           if(((HwInfo->jChipType >= SIS_315H) &&
-		       (ModeNo == 0x23 || ModeNo == 0x24 || ModeNo == 0x25)) ||
-	              ((HwInfo->jChipType < SIS_315H)  &&
-		       (ModeNo == 0x55 || ModeNo == 0x5a || ModeNo == 0x5b))) {
-	              /* We do not scale to 1280x768 (B/C bridges only) */
-                      SiS_Pr->SiS_LCDInfo |= DontExpandLCD;
-	           }
-		}
-		break;
-	case Panel_1400x1050:
-	 	if(SiS_Pr->SiS_VBType & VB_SISTMDS) {
-	  	   if(ModeNo == 0x7c || ModeNo == 0x7d || ModeNo == 0x7e ||
-		      ModeNo == 0x79 || ModeNo == 0x75 || ModeNo == 0x78 ||
-		      ModeNo == 0x14 || ModeNo == 0x15 || ModeNo == 0x16 ||
-		      ModeNo == 0x23 || ModeNo == 0x24 || ModeNo == 0x25) {
-	      	      /* Do not scale to 1280x720/768/800/960 (B/C bridges only) */
-                      SiS_Pr->SiS_LCDInfo |= DontExpandLCD;
-	           }
-		}
-		if(SiS_Pr->SiS_VBType & VB_SIS301LV302LV) {
-		   if(ModeNo == 0x79 || ModeNo == 0x75 || ModeNo == 0x78) {
-		      if(SiS_Pr->UsePanelScaler == -1) {
-		         /* Do not scale to 1280x720 by default (LVDS bridges) */
-	      	         SiS_Pr->SiS_LCDInfo |= DontExpandLCD;
-		      }
-		   }
-		}
-		if(ModeNo == 0x3a || ModeNo == 0x4d || ModeNo == 0x65) {
-	      	   /* Do not scale to 1280x1024 (all bridges) */
-	      	   SiS_Pr->SiS_LCDInfo |= DontExpandLCD;
-	   	}
-		break;
-	case Panel_1600x1200:
-		if(SiS_Pr->SiS_VBType & VB_SISTMDS) {
-	      	   /* No idea about the timing and zoom factors (C bridge only) */
-	      	   SiS_Pr->SiS_LCDInfo |= DontExpandLCD;
-	   	}
-		break;
-	}
-     }
-  }
-
 #ifdef SIS300
   if(HwInfo->jChipType < SIS_315H) {
      if(SiS_Pr->SiS_IF_DEF_LVDS == 1) {
@@ -1893,12 +2068,32 @@
 #endif
 
   /* Special cases */
+
+  if(modexres == SiS_Pr->PanelXRes && modeyres == SiS_Pr->PanelYRes) {
+     SiS_Pr->SiS_LCDInfo &= ~LCDPass11;
+  }
+
   if(SiS_Pr->SiS_IF_DEF_TRUMPION) {
      SiS_Pr->SiS_LCDInfo |= (DontExpandLCD | LCDPass11);
   }
 
-  if(SiS_Pr->SiS_LCDResInfo == Panel_640x480) {
+  switch(SiS_Pr->SiS_LCDResInfo) {
+  case Panel_640x480:
      SiS_Pr->SiS_LCDInfo |= LCDPass11;
+     break;
+  case Panel_1280x800:
+     /* Don't pass 1:1 by default (TMDS special) */
+     if(SiS_Pr->CenterScreen == -1) SiS_Pr->SiS_LCDInfo &= ~LCDPass11;
+     break;
+  case Panel_1280x960:
+     SiS_Pr->SiS_LCDInfo &= ~LCDPass11;
+     break;
+  case Panel_Custom:
+     if((!SiS_Pr->CP_PrefClock) ||
+        (modexres > SiS_Pr->PanelXRes) || (modeyres > SiS_Pr->PanelYRes)) {
+        SiS_Pr->SiS_LCDInfo |= LCDPass11;
+     }
+     break;
   }
 
   if(SiS_Pr->UseCustomMode) {
@@ -1910,49 +2105,10 @@
      SiS_Pr->SiS_LCDInfo &= ~LCDPass11;
   }
 
-  /* Special cases */
-  if( (SiS_Pr->SiS_IF_DEF_FSTN)              ||
-      (SiS_Pr->SiS_IF_DEF_DSTN)              ||
-      (SiS_Pr->SiS_CustomT == CUT_BARCO1366) ||
-      (SiS_Pr->SiS_CustomT == CUT_BARCO1024) ||
-      (SiS_Pr->SiS_CustomT == CUT_PANEL848) ) {
-     SiS_Pr->PanelHRS = 999;
-     SiS_Pr->PanelHRE = 999;
-  }
-
-  if( (SiS_Pr->SiS_CustomT == CUT_BARCO1366) ||
-      (SiS_Pr->SiS_CustomT == CUT_BARCO1024) ||
-      (SiS_Pr->SiS_CustomT == CUT_PANEL848) ) {
-     SiS_Pr->PanelVRS = 999;
-     SiS_Pr->PanelVRE = 999;
-  }
-
-#ifdef SIS315H
-  if((HwInfo->jChipType >= SIS_315H) && (HwInfo->jChipType < SIS_661)) {
-     if(!(SiS_Pr->SiS_ROMNew)) {
-        if(SiS_Pr->SiS_VBType & (VB_SIS302LV | VB_SIS302ELV)) {
-	   /* Enable 302LV/302ELV dual link mode.
-	    * For 661, this is done above.
-	    */
-           if((SiS_Pr->SiS_CustomT == CUT_CLEVO1024) &&
-	      (SiS_Pr->SiS_LCDResInfo == Panel_1024x768)) {
-	      /* (Sets this in SenseLCD; new paneltypes) */
-	      SiS_Pr->SiS_LCDInfo |= LCDDualLink;
-	   }
-           if((SiS_Pr->SiS_LCDResInfo == Panel_1280x1024) ||
-	      (SiS_Pr->SiS_LCDResInfo == Panel_1400x1050) ||
-              (SiS_Pr->SiS_LCDResInfo == Panel_1600x1200) ||
-	      (SiS_Pr->SiS_LCDResInfo == Panel_1680x1050)) {
-	      SiS_Pr->SiS_LCDInfo |= LCDDualLink;
-	   }
-        }
-     }
-  }
-#endif
-
+  /* LVDS DDA */
   if(!((HwInfo->jChipType < SIS_315H) && (SiS_Pr->SiS_SetFlag & SetDOSMode))) {
 
-     if(SiS_Pr->SiS_IF_DEF_LVDS == 1) {
+     if((SiS_Pr->SiS_IF_DEF_LVDS == 1) || (SiS_Pr->SiS_VBType & VB_NoLCD)) {
 	if(SiS_Pr->SiS_IF_DEF_TRUMPION == 0) {
 	   if(ModeNo == 0x12) {
 	      if(SiS_Pr->SiS_LCDInfo & LCDPass11) {
@@ -1988,6 +2144,7 @@
 
   }
 
+  /* VESA timing */
   if(SiS_Pr->SiS_VBInfo & SetInSlaveMode) {
      if(SiS_Pr->SiS_VBInfo & SetNotSimuMode) {
      	SiS_Pr->SiS_SetFlag |= LCDVESATiming;
@@ -2043,19 +2200,15 @@
 
            if(HwInfo->jChipType < SIS_315H) {
 	      VCLKIndex = SiS_Pr->PanelVCLKIdx300;
+	      if((SiS_Pr->SiS_LCDInfo & DontExpandLCD) && (SiS_Pr->SiS_LCDInfo & LCDPass11)) {
+	         VCLKIndex = VCLKIndexGEN;
+	      }
 	   } else {
 	      VCLKIndex = SiS_Pr->PanelVCLKIdx315;
 	      if((SiS_Pr->SiS_LCDInfo & DontExpandLCD) && (SiS_Pr->SiS_LCDInfo & LCDPass11)) {
-	         VCLKIndex = VCLKIndexGEN;
 		 switch(resinfo) {
-		 /* Only those whose IndexGEN doesn't match VBVCLK array: */
-		 case SIS_RI_1280x720: VCLKIndex = VCLK_1280x720;
-		 		       if(SiS_Pr->SiS_LCDResInfo == Panel_1280x720) {
-		                          if(SiS_Pr->PanelHT == 1344) {
-					     VCLKIndex = VCLK_1280x720_2;
-					  }
-				       }
-		 		       break;
+		 /* Only those whose IndexGEN doesn't match VBVCLK array */
+		 case SIS_RI_1280x720: VCLKIndex = VCLK_1280x720; break;
 		 case SIS_RI_720x480:  VCLKIndex = VCLK_720x480;  break;
 		 case SIS_RI_720x576:  VCLKIndex = VCLK_720x576;  break;
 		 case SIS_RI_768x576:  VCLKIndex = VCLK_768x576;  break;
@@ -2065,6 +2218,7 @@
 		 case SIS_RI_1024x576: VCLKIndex = VCLK_1024x576; break;
 		 case SIS_RI_1152x864: VCLKIndex = VCLK_1152x864; break;
 		 case SIS_RI_1360x768: VCLKIndex = VCLK_1360x768; break;
+		 default:              VCLKIndex = VCLKIndexGEN;
 		 }
 
 		 if(ModeNo <= 0x13) {
@@ -2121,7 +2275,7 @@
            if(ModeNo > 0x13) {
 	      if( (HwInfo->jChipType != SIS_630) &&
 		  (HwInfo->jChipType != SIS_300) ) {
-		 if(VCLKIndex == 0x1b) VCLKIndex = 0x35;
+		 if(VCLKIndex == 0x1b) VCLKIndex = 0x48;
 	      }
 	   }
         }
@@ -2207,7 +2361,7 @@
            if(ModeNo > 0x13) {
 	      if( (HwInfo->jChipType != SIS_630) &&
 	          (HwInfo->jChipType != SIS_300) ) {
-		 if(VCLKIndex == 0x1b) VCLKIndex = 0x35;
+		 if(VCLKIndex == 0x1b) VCLKIndex = 0x48;
 	      }
 #if 0
 	      if(HwInfo->jChipType == SIS_730) {
@@ -2255,10 +2409,6 @@
      modeflag = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
   }
 
-  /* BIOS does not do this (neither 301 nor LVDS) */
-  /* (But it's harmless; see SetCRT2Offset) */
-  SiS_SetReg(SiS_Pr->SiS_Part1Port,0x03,0x00);   /* fix write part1 index 0  BTDRAM bit Bug */
-
   if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCDA) {
 
      SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x00,0xAF,0x40);
@@ -2372,13 +2522,9 @@
       	   tempah |= 0x10;
         }
 
-        if((HwInfo->jChipType < SIS_315H) && (SiS_Pr->SiS_VBType & VB_SIS301)) {
-	   if((SiS_Pr->SiS_LCDResInfo == Panel_1280x1024) ||
-	      (SiS_Pr->SiS_LCDResInfo == Panel_1280x960)) {
-	      tempah |= 0x80;
-	   }
-        } else {
-	   tempah |= 0x80;
+	tempah |= 0x80;
+        if(SiS_Pr->SiS_VBType & VB_SIS301) {
+	   if(SiS_Pr->PanelXRes < 1280 && SiS_Pr->PanelYRes < 960) tempah &= ~0x80;
         }
 
         if(SiS_Pr->SiS_VBInfo & SetCRT2ToTV) {
@@ -2391,7 +2537,10 @@
 
         SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x0D,0x40,tempah);
 
-        tempah = 0;
+	tempah = 0x80;
+	if(SiS_Pr->SiS_VBType & VB_SIS301) {
+	   if(SiS_Pr->PanelXRes < 1280 && SiS_Pr->PanelYRes < 960) tempah = 0;
+	}
 
 	if(SiS_IsDualLink(SiS_Pr, HwInfo)) tempah |= 0x40;
 
@@ -2401,19 +2550,13 @@
        	   }
         }
 
-	if((SiS_Pr->SiS_LCDResInfo == Panel_1280x1024) ||
-	   (SiS_Pr->SiS_LCDResInfo == Panel_1280x960)  ||
-	   ((SiS_Pr->SiS_LCDResInfo == Panel_Custom) &&
-	    (SiS_Pr->CP_MaxX >= 1280) && (SiS_Pr->CP_MaxY >= 960))) {
-	   tempah |= 0x80;
-        }
-
         SiS_SetReg(SiS_Pr->SiS_Part4Port,0x0C,tempah);
 
      } else {  /* LVDS */
 
         if(HwInfo->jChipType >= SIS_315H) {
 
+#ifdef SIS315H
 	   /* LVDS can only be slave in 8bpp modes */
 	   tempah = 0x80;
 	   if((modeflag & CRT2Mode) && (SiS_Pr->SiS_ModeType > ModeVGA)) {
@@ -2435,9 +2578,11 @@
 	   }
 
     	   SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x2e,0xF0,tempah);
+#endif
 
         } else {
 
+#ifdef SIS300
 	   tempah = 0;
 	   if( (!(SiS_Pr->SiS_VBInfo & SetInSlaveMode)) && (SiS_Pr->SiS_ModeType > ModeVGA) ) {
               tempah |= 0x02;
@@ -2447,6 +2592,7 @@
 	   if(SiS_Pr->SiS_VBInfo & DisableCRT2Display)  tempah = 0;
 
 	   SiS_SetReg(SiS_Pr->SiS_Part1Port,0x01,tempah);
+#endif
 
         }
 
@@ -2459,7 +2605,6 @@
      if(HwInfo->jChipType >= SIS_315H) {
 
 #ifdef SIS315H
-
         unsigned char bridgerev = SiS_GetReg(SiS_Pr->SiS_Part4Port,0x01);
 
 	/* The following is nearly unpreditable and varies from machine
@@ -2538,26 +2683,29 @@
            SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x23,tempbl,tempah);
 	}
 
-#if 0
-	if(SiS_Pr->SiS_VBType & VB_SIS301C) {
-	   SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x3a,0xc0);
-	}
-#endif
-
 #endif /* SIS315H */
 
      } else if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) {
 
+#ifdef SIS300
         SiS_SetRegAND(SiS_Pr->SiS_Part4Port,0x21,0x3f);
 
         if((SiS_Pr->SiS_VBInfo & DisableCRT2Display) ||
-           (   (SiS_Pr->SiS_VBType & VB_NoLCD) &&
-	       (SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) ) ) {
+           ((SiS_Pr->SiS_VBType & VB_NoLCD) &&
+	    (SiS_Pr->SiS_VBInfo & SetCRT2ToLCD))) {
 	   SiS_SetRegAND(SiS_Pr->SiS_Part4Port,0x23,0x7F);
 	} else {
 	   SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x23,0x80);
 	}
+#endif
+
+     }
 
+     if(SiS_Pr->SiS_VBType & VB_SIS301BLV302BLV) {
+        SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x0D,0x80);
+        if(SiS_Pr->SiS_VBType & VB_SIS301C) {
+	   SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x3A,0xC0);
+        }
      }
 
   } else {  /* LVDS */
@@ -2823,19 +2971,18 @@
 	if(SiS_Pr->SiS_LCDResInfo == Panel_1680x1050) {
 	   if     (resinfo == SIS_RI_1280x800)  tempal =  9;
 	   else if(resinfo == SIS_RI_1400x1050) tempal = 11;
+	} else if((SiS_Pr->SiS_LCDResInfo == Panel_1280x800) ||
+	          (SiS_Pr->SiS_LCDResInfo == Panel_1280x800_2)) {
+	   if     (resinfo == SIS_RI_1280x768)  tempal =  9;
 	}
 
-  	if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) {  /* Pass 1:1 only (center-screen handled outside) */
+  	if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) {
+	   /* Pass 1:1 only (center-screen handled outside) */
+	   /* This is never called for the panel's native resolution */
+	   /* since Pass1:1 will not be set in this case */
 	   tempbx = 100;
 	   if(ModeNo >= 0x13) {
 	      tempal = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_CRT2CRTC_NS;
-	      if((SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].XRes == 1280) &&
-	         (SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].YRes ==  768)) {
-	         /* Special for Fujitsu 7911 (VL-17WDX8), others custom */
-	         if(SiS_Pr->SiS_LCDResInfo == Panel_1280x768)        tempal = 0x08;
-		 else if(SiS_Pr->SiS_LCDResInfo == Panel_1280x768_2) tempal = 0x0f;
-		 else if(SiS_Pr->SiS_LCDResInfo == Panel_1280x768_3) tempal = 0x10;
-	      }
 	   }
 	}
 
@@ -2907,6 +3054,7 @@
 
      tempbx = 0;
      if((SiS_Pr->SiS_IF_DEF_CH70xx) && (SiS_Pr->SiS_VBInfo & SetCRT2ToTV)) {
+
         tempbx = 10;
 	if(SiS_Pr->SiS_TVMode & TVSetCHOverScan) tempbx += 1;
         if(SiS_Pr->SiS_TVMode & TVSetPAL) {
@@ -2922,10 +3070,12 @@
 	      if(SiS_Pr->SiS_TVMode & TVSetCHOverScan) tempbx += 1;
 	   }
         }
+
      } else {
+
         switch(SiS_Pr->SiS_LCDResInfo) {
 	case Panel_640x480:   tempbx = 6;  break;
-	case Panel_640x480_2: tempbx = 30; break;
+	case Panel_640x480_2:
 	case Panel_640x480_3: tempbx = 30; break;
 	case Panel_800x600:   tempbx = 0;  break;
 	case Panel_1024x600:  tempbx = 15; break;
@@ -2951,19 +3101,20 @@
 
 	if(SiS_Pr->SiS_CustomT == CUT_BARCO1024) {
 	   tempbx = 82;
-	   if(SiS_Pr->SiS_LCDInfo & DontExpandLCD)  tempbx++;
+	   if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) tempbx++;
 	} else if(SiS_Pr->SiS_CustomT == CUT_PANEL848) {
 	   tempbx = 84;
-	   if(SiS_Pr->SiS_LCDInfo & DontExpandLCD)  tempbx++;
+	   if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) tempbx++;
 	}
 
-     }
+	if((SiS_Pr->SiS_CustomT != CUT_BARCO1366) &&
+           (SiS_Pr->SiS_CustomT != CUT_PANEL848)) {
+           if((SiS_Pr->SiS_LCDInfo & DontExpandLCD) &&
+	      (!(SiS_Pr->SiS_LCDInfo & LCDPass11))) {
+              tempal = 0;
+	   }
+        }
 
-     if(SiS_Pr->SiS_SetFlag & SetDOSMode) {
-        if(SiS_Pr->SiS_LCDResInfo != Panel_640x480) tempal = 7;
-  	if(HwInfo->jChipType < SIS_315H) {
-	   if(SiS_GetReg(SiS_Pr->SiS_P3c4,0x13) & 0x80) tempal++;
-	}
      }
 
      (*CRT2Index) = tempbx;
@@ -3062,20 +3213,6 @@
 	          ResIndex = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_CRT2CRTC;
 	       } else {
 	          ResIndex = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_CRT2CRTC_NS;
-		  /* Special for our 3 types, others custom (works with default) */
-		  if((SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].XRes == 1280) &&
-	             (SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].YRes ==  768)) {
-	             if(SiS_Pr->SiS_LCDResInfo == Panel_1280x768)        ResIndex = 0x08;
-		     else if(SiS_Pr->SiS_LCDResInfo == Panel_1280x768_2) ResIndex = 0x0f;
-		     else if(SiS_Pr->SiS_LCDResInfo == Panel_1280x768_3) ResIndex = 0x10;
-	          }
-		  /* Special for 1280x720 TMDS <> LVDS */
-		  if((SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].XRes == 1280) &&
-	             (SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].YRes ==  720)) {
-		     if(SiS_Pr->SiS_LCDResInfo == Panel_1280x720) {
-		        if(SiS_Pr->PanelHT == 1344) ResIndex = 0x12;
-		     }
-	          }
 	       }
 	       SiS_Pr->SiS_VGAHT = SiS_Pr->SiS_NoScaleData[ResIndex].VGAHT;
                SiS_Pr->SiS_VGAVT = SiS_Pr->SiS_NoScaleData[ResIndex].VGAVT;
@@ -3348,12 +3485,12 @@
 
      if(SiS_Pr->UseCustomMode) {
 
-        SiS_Pr->SiS_VGAHT     = SiS_Pr->CHTotal;
-        SiS_Pr->SiS_VGAVT     = SiS_Pr->CVTotal;
-        SiS_Pr->SiS_HT        = SiS_Pr->CHTotal;
-        SiS_Pr->SiS_VT        = SiS_Pr->CVTotal;
-	SiS_Pr->SiS_HDE       = SiS_Pr->SiS_VGAHDE;
-        SiS_Pr->SiS_VDE       = SiS_Pr->SiS_VGAVDE;
+        SiS_Pr->SiS_VGAHT = SiS_Pr->CHTotal;
+        SiS_Pr->SiS_VGAVT = SiS_Pr->CVTotal;
+        SiS_Pr->SiS_HT    = SiS_Pr->CHTotal;
+        SiS_Pr->SiS_VT    = SiS_Pr->CVTotal;
+	SiS_Pr->SiS_HDE   = SiS_Pr->SiS_VGAHDE;
+        SiS_Pr->SiS_VDE   = SiS_Pr->SiS_VGAVDE;
 
      } else {
 
@@ -3361,10 +3498,10 @@
 
         if((SiS_Pr->SiS_LCDInfo & DontExpandLCD) && (!(SiS_Pr->SiS_LCDInfo & LCDPass11))) {
 
-           SiS_Pr->SiS_VGAHT     = SiS_Pr->PanelHT;
-           SiS_Pr->SiS_VGAVT     = SiS_Pr->PanelVT;
-           SiS_Pr->SiS_HT        = SiS_Pr->PanelHT;
-           SiS_Pr->SiS_VT        = SiS_Pr->PanelVT;
+           SiS_Pr->SiS_VGAHT = SiS_Pr->PanelHT;
+           SiS_Pr->SiS_VGAVT = SiS_Pr->PanelVT;
+           SiS_Pr->SiS_HT    = SiS_Pr->PanelHT;
+           SiS_Pr->SiS_VT    = SiS_Pr->PanelVT;
 	   gotit = TRUE;
 
 	} else if( (!(SiS_Pr->SiS_LCDInfo & DontExpandLCD)) && (romptr) && (ROMAddr) ) {
@@ -3377,6 +3514,15 @@
            SiS_Pr->SiS_HT        = ROMAddr[romptr+5] | ((ROMAddr[romptr+6] & 0x0f) << 8);
            SiS_Pr->SiS_VT        = ROMAddr[romptr+7] | ((ROMAddr[romptr+6] & 0xf0) << 4);
 	   if(SiS_Pr->SiS_VGAHT) gotit = TRUE;
+	   else {
+	      SiS_Pr->SiS_LCDInfo |= DontExpandLCD;
+	      SiS_Pr->SiS_LCDInfo &= ~LCDPass11;
+	      SiS_Pr->SiS_VGAHT   = SiS_Pr->PanelHT;
+              SiS_Pr->SiS_VGAVT   = SiS_Pr->PanelVT;
+              SiS_Pr->SiS_HT      = SiS_Pr->PanelHT;
+              SiS_Pr->SiS_VT      = SiS_Pr->PanelVT;
+	      gotit = TRUE;
+	   }
 #endif
 
 	}
@@ -3393,10 +3539,10 @@
 	      case Panel_1280x720  + 32: LCDPtr = SiS_Pr->SiS_LCD1280x720Data;      break;
 	      case Panel_1280x768_2    : LCDPtr = SiS_Pr->SiS_ExtLCD1280x768_2Data; break;
               case Panel_1280x768_2+ 32: LCDPtr = SiS_Pr->SiS_StLCD1280x768_2Data;  break;
-	      case Panel_1280x768_3    :
-	      case Panel_1280x768_3+ 32: LCDPtr = SiS_Pr->SiS_LCD1280x768_3Data;    break;
 	      case Panel_1280x800      :
 	      case Panel_1280x800  + 32: LCDPtr = SiS_Pr->SiS_LCD1280x800Data;      break;
+	      case Panel_1280x800_2    :
+	      case Panel_1280x800_2+ 32: LCDPtr = SiS_Pr->SiS_LCD1280x800_2Data;    break;
 	      case Panel_1280x960      :
 	      case Panel_1280x960  + 32: LCDPtr = SiS_Pr->SiS_LCD1280x960Data;      break;
               case Panel_1280x1024     : LCDPtr = SiS_Pr->SiS_ExtLCD1280x1024Data;  break;
@@ -3777,9 +3923,11 @@
            }
 
 	   if(!(SiS_IsNotM650orLater(SiS_Pr, HwInfo))) {
-	      tempah = 0xef;
-	      if(SiS_IsVAMode(SiS_Pr,HwInfo)) tempah = 0xf7;
-	      SiS_SetRegAND(SiS_Pr->SiS_Part1Port,0x4c,tempah);
+	      if(HwInfo->jChipType < SIS_340) {
+	         tempah = 0xef;
+	         if(SiS_IsVAMode(SiS_Pr,HwInfo)) tempah = 0xf7;
+	         SiS_SetRegAND(SiS_Pr->SiS_Part1Port,0x4c,tempah);
+	      }
 	   }
 
 	   if(SiS_Pr->SiS_VBType & VB_SIS301LV302LV) {
@@ -3962,7 +4110,9 @@
 #ifdef SIS315H	/* 315 series */
 
         if(!(SiS_IsNotM650orLater(SiS_Pr,HwInfo))) {
-          SiS_SetRegAND(SiS_Pr->SiS_Part1Port,0x4c,~0x18);
+	   if(HwInfo->jChipType < SIS_340) {
+              SiS_SetRegAND(SiS_Pr->SiS_Part1Port,0x4c,~0x18);
+	   }
         }
 
 	if(SiS_Pr->SiS_IF_DEF_CH70xx != 0) {
@@ -4185,12 +4335,14 @@
 	 }
 
          if(!(SiS_IsNotM650orLater(SiS_Pr, HwInfo))) {
-	    tempah = 0x10;
-	    if(SiS_LCDAEnabled(SiS_Pr, HwInfo)) {
-	       if(SiS_TVEnabled(SiS_Pr, HwInfo)) tempah = 0x18;
-	       else 			         tempah = 0x08;
+	    if(HwInfo->jChipType < SIS_340) {
+	       tempah = 0x10;
+	       if(SiS_LCDAEnabled(SiS_Pr, HwInfo)) {
+	          if(SiS_TVEnabled(SiS_Pr, HwInfo)) tempah = 0x18;
+	          else 			            tempah = 0x08;
+	       }
+	       SiS_SetReg(SiS_Pr->SiS_Part1Port,0x4c,tempah);
 	    }
-	    SiS_SetReg(SiS_Pr->SiS_Part1Port,0x4c,tempah);
 	 }
 
 	 if(SiS_Pr->SiS_VBType & VB_SIS301LV302LV) {
@@ -4267,6 +4419,7 @@
 #ifdef SET_EMI
 	       if(SiS_Pr->SiS_VBType & (VB_SIS302LV | VB_SIS302ELV)) {
 	          SiS_SetRegAND(SiS_Pr->SiS_Part4Port,0x30,0x0c);
+		  SiS_GenericDelay(SiS_Pr, 0x500);
 	       }
 #endif
 	       SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x27,0x0c);
@@ -4277,13 +4430,13 @@
 
 		  if(SiS_Pr->SiS_ROMNew) {
 		     UCHAR  *ROMAddr = HwInfo->pjVirtualRomBase;
-		     USHORT romptr   = GetLCDStructPtr661_2(SiS_Pr, HwInfo);
+		     USHORT romptr = GetLCDStructPtr661_2(SiS_Pr, HwInfo);
 		     if(romptr) {
-		        SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x30,0x20);
+		        SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x30,0x20); /* Reset */
 			SiS_Pr->EMI_30 = 0;
-			SiS_Pr->EMI_31 = ROMAddr[romptr + 14];
-			SiS_Pr->EMI_32 = ROMAddr[romptr + 15];
-			SiS_Pr->EMI_33 = ROMAddr[romptr + 16];
+			SiS_Pr->EMI_31 = ROMAddr[romptr + SiS_Pr->SiS_EMIOffset + 0];
+			SiS_Pr->EMI_32 = ROMAddr[romptr + SiS_Pr->SiS_EMIOffset + 1];
+			SiS_Pr->EMI_33 = ROMAddr[romptr + SiS_Pr->SiS_EMIOffset + 2];
 			if(ROMAddr[romptr + 1] & 0x10) SiS_Pr->EMI_30 = 0x40;
 			/* emidelay = SISGETROMW((romptr + 0x22)); */
 			SiS_Pr->HaveEMI = SiS_Pr->HaveEMILCD = SiS_Pr->OverruleEMI = TRUE;
@@ -4382,7 +4535,8 @@
  		  }
 
 		  if(!(SiS_Pr->OverruleEMI && (!r30) && (!r31) && (!r32) && (!r33))) {
-		     SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x30,0x20);
+		     SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x30,0x20); /* Reset */
+		     SiS_GenericDelay(SiS_Pr, 0x500);
 		  }
 		  SiS_SetReg(SiS_Pr->SiS_Part4Port,0x31,r31);
 		  SiS_SetReg(SiS_Pr->SiS_Part4Port,0x32,r32);
@@ -4404,7 +4558,7 @@
 			if(SiS_Pr->SiS_CustomT == CUT_ASUSA2H_2) {
 			   SiS_GenericDelay(SiS_Pr, 0x500);
 			}
-	                SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x30,0x40);
+	                SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x30,0x40);   /* Enable */
 	             }
 		  }
 #endif
@@ -4537,7 +4691,9 @@
 #ifdef SIS315H    /* 315 series */
 
        if(!(SiS_IsNotM650orLater(SiS_Pr,HwInfo))) {
-          SiS_SetRegOR(SiS_Pr->SiS_Part1Port,0x4c,0x18);
+          if(HwInfo->jChipType < SIS_340) {
+             SiS_SetRegOR(SiS_Pr->SiS_Part1Port,0x4c,0x18);
+	  }
        }
 
        if(SiS_Pr->SiS_IF_DEF_CH70xx == 0) {
@@ -4794,9 +4950,11 @@
   	         }
 	      }
 	      if(SiS_Pr->SiS_VBInfo & (SetCRT2ToLCD | SetCRT2ToLCDA)) {
-	         if(SiS_Pr->SiS_LCDInfo & LCDSync) {
-	            tempah = SiS_Pr->SiS_LCDInfo;
-		    tempbl = (tempah >> 6) & 0x03;
+	         if(!(SiS_Pr->SiS_LCDInfo & LCDPass11)) {
+	            if(SiS_Pr->SiS_LCDInfo & LCDSync) {
+	               tempah = SiS_Pr->SiS_LCDInfo;
+		       tempbl = (tempah >> 6) & 0x03;
+		    }
 	         }
 	      }
 	   }
@@ -4901,7 +5059,7 @@
 
      CRT1ModeNo = 0xfe;
      VCLK = SiS_Pr->CSRClock_CRT1;					/* Get VCLK */
-     data2 = (SiS_Pr->CModeFlag_CRT1 & ModeInfoFlag) - 2;
+     data2 = (SiS_Pr->CModeFlag_CRT1 & ModeTypeMask) - 2;
      switch(data2) {							/* Get color depth */
         case 0 : colorth = 1; break;
         case 1 : colorth = 1; break;
@@ -4964,7 +5122,7 @@
 
     } else if(HwInfo->jChipType == SIS_730) {
 
-#ifndef LINUX_XF86
+#ifdef LINUX_KERNEL
        SiS_SetRegLong(0xcf8,0x80000050);
        eax = SiS_GetRegLong(0xcfc);
 #else
@@ -4974,7 +5132,7 @@
        tempal &= 0x06;
        tempal <<= 5;
 
-#ifndef LINUX_XF86
+#ifdef LINUX_KERNEL
        SiS_SetRegLong(0xcf8,0x800000A0);
        eax = SiS_GetRegLong(0xcfc);
 #else
@@ -5004,7 +5162,7 @@
        temp = SiS_GetReg(SiS_Pr->SiS_P3c4,0x14);
        if(temp & 0x0080) index += 12;
 
-#ifndef LINUX_XF86
+#ifdef LINUX_KERNEL
        SiS_SetRegLong(0xcf8,0x800000A0);
        eax = SiS_GetRegLong(0xcfc);
 #else
@@ -5017,7 +5175,7 @@
        temp = (USHORT)(eax >> 24);
        if(!(temp&0x01)) index += 24;
 
-#ifndef LINUX_XF86
+#ifdef LINUX_KERNEL
        SiS_SetRegLong(0xcf8,0x80000050);
        eax = SiS_GetRegLong(0xcfc);
 #else
@@ -5512,9 +5670,8 @@
 #endif
   }
 
-  /* is lvds if really LVDS, or SiS 301B-DH with external LVDS transmitter */
-  if((SiS_Pr->SiS_IF_DEF_LVDS == 1) ||
-     ((SiS_Pr->SiS_VBType & VB_SISVB) && (SiS_Pr->SiS_VBType & VB_NoLCD))) {
+  /* is lvds if really LVDS, or 301B-DH with external LVDS transmitter */
+  if((SiS_Pr->SiS_IF_DEF_LVDS == 1) || (SiS_Pr->SiS_VBType & VB_NoLCD)) {
      islvds = TRUE;
   }
 
@@ -7467,7 +7624,7 @@
    if(!(temp & 0x01)) {
       SiS_SetRegAND(SiS_Pr->SiS_Part4Port,0x3a,0xdf);
       SiS_SetRegAND(SiS_Pr->SiS_Part4Port,0x25,0xfc);
-      if(HwInfo->jChipType < SIS_661) {
+      if((HwInfo->jChipType < SIS_661) && (!(SiS_Pr->SiS_ROMNew))) {
          SiS_SetRegAND(SiS_Pr->SiS_Part4Port,0x25,0xf8);
       }
       SiS_SetRegAND(SiS_Pr->SiS_Part4Port,0x0f,0xfb);
@@ -7475,7 +7632,7 @@
       else if(SiS_Pr->SiS_TVMode & TVSetYPbPr525p) temp = 0x0002;
       else if(SiS_Pr->SiS_TVMode & TVSetHiVision)  temp = 0x0400;
       else					   temp = 0x0402;
-      if(HwInfo->jChipType >= SIS_661) {
+      if((HwInfo->jChipType >= SIS_661) || (SiS_Pr->SiS_ROMNew)) {
          temp1 = 0;
 	 if(SiS_Pr->SiS_TVMode & TVAspect43) temp1 = 4;
 	 SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x0f,0xfb,temp1);
@@ -7488,6 +7645,9 @@
 	 SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x26,0xf8,(temp & 0xff));
       }
       SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x3a,0xfb,(temp >> 8));
+      if(ModeNo > 0x13) {
+         SiS_SetRegAND(SiS_Pr->SiS_Part4Port,0x3b,0xfd);
+      }
 
       if(HwInfo->jChipType >= SIS_661) { 		/* ? */
          if(SiS_Pr->SiS_TVMode & TVAspect43) {
@@ -7580,6 +7740,8 @@
         if(SiS_Pr->SiS_VBType & VB_SIS301LV302LV) {
 	   if(SiS_IsDualLink(SiS_Pr, HwInfo)) {
 	      SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x27,0x2c);
+	   } else {
+	      SiS_SetRegAND(SiS_Pr->SiS_Part4Port,0x27,~0x20);
 	   }
 
 	   if(SiS_Pr->SiS_VBType & (VB_SIS302LV | VB_SIS302ELV)) {
@@ -7705,7 +7867,7 @@
      SiS_SetReg(SiS_Pr->SiS_Part4Port,0x1E,temp);
 
      temp = 0x0036; tempbx = 0xD0;
-     if((IS_SIS550650740660) && (SiS_Pr->SiS_VBType & VB_SIS301LV302LV)) {
+     if((HwInfo->jChipType >= SIS_315H) && (SiS_Pr->SiS_VBType & VB_SIS301LV302LV)) {
 	temp = 0x0026; tempbx = 0xC0; /* See En/DisableBridge() */
      }
      if(SiS_Pr->SiS_VBInfo & SetCRT2ToTV) {
@@ -7735,6 +7897,8 @@
 	if(HwInfo->jChipType >= SIS_315H) {
 	   if(SiS_IsDualLink(SiS_Pr, HwInfo)) {
 	      SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x27,0x2c);
+	   } else {
+	      SiS_SetRegAND(SiS_Pr->SiS_Part4Port,0x27,~0x20);
 	   }
 	}
 	if(SiS_Pr->SiS_VBType & (VB_SIS302LV | VB_SIS302ELV)) {
@@ -8376,7 +8540,7 @@
   SiS_SetCH701x(SiS_Pr,(temp1 << 8) | 0x49);
 }
 
-void
+static void
 SiS_Chrontel701xOn(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
 {
   USHORT temp;
@@ -8421,7 +8585,7 @@
   }
 }
 
-void
+static void
 SiS_Chrontel701xOff(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
 {
   USHORT temp;
@@ -8494,7 +8658,7 @@
      }
 }
 
-void
+static void
 SiS_ChrontelInitTVVSync(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
 {
      USHORT temp;
@@ -8620,7 +8784,7 @@
     SiS_SetCH701x(SiS_Pr,0x0077);  /* MV? */
 }
 
-void
+static void
 SiS_ChrontelDoSomething1(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
 {
      USHORT temp;
@@ -8823,16 +8987,9 @@
 	       (SiS_Pr->SiS_CustomT == CUT_BARCO1024)) {
 	       SetOEMLCDData2(SiS_Pr, HwInfo, ModeNo, ModeIdIndex,RefreshRateTableIndex);
 	    }
-            if(HwInfo->jChipType == SIS_730) {
-               SiS_DisplayOn(SiS_Pr);
-	    }
+	    SiS_DisplayOn(SiS_Pr);
          }
       }
-      if(SiS_Pr->SiS_IF_DEF_LVDS == 1) {
-          if(HwInfo->jChipType != SIS_730) {
-             SiS_DisplayOn(SiS_Pr);
-	  }
-      }
    }
 #endif
 
@@ -8841,7 +8998,7 @@
       if(SiS_Pr->SiS_SetFlag & LowModeTests) {
 	 if(HwInfo->jChipType < SIS_661) {
 	    SiS_FinalizeLCD(SiS_Pr, ModeNo, ModeIdIndex, HwInfo);
-            SiS_OEM310Setting(SiS_Pr, HwInfo, ModeNo, ModeIdIndex);
+            SiS_OEM310Setting(SiS_Pr, HwInfo, ModeNo, ModeIdIndex, RefreshRateTableIndex);
 	 } else {
 	    SiS_OEM661Setting(SiS_Pr, HwInfo, ModeNo, ModeIdIndex, RefreshRateTableIndex);
 	 }
@@ -9008,9 +9165,10 @@
   return FALSE;
 }
 
+#if 0
 #ifdef SIS300
 /* Write Trumpion register */
-void
+static void
 SiS_SetTrumpReg(SiS_Private *SiS_Pr, USHORT tempbx)
 {
   SiS_Pr->SiS_DDC_DeviceAddr = 0xF0;  		/* DAB (Device Address Byte) */
@@ -9021,6 +9179,7 @@
   SiS_SetChReg(SiS_Pr, tempbx, 0);
 }
 #endif
+#endif
 
 /* Write to Chrontel 700x */
 /* Parameter is [Data (S15-S8) | Register no (S7-S0)] */
@@ -9098,9 +9257,10 @@
   return 0xFFFF;
 }
 
+#if 0
 #ifdef SIS300
 /* Read from Trumpion */
-USHORT
+static USHORT
 SiS_GetTrumpReg(SiS_Private *SiS_Pr, USHORT tempbx)
 {
   SiS_Pr->SiS_DDC_DeviceAddr = 0xF0;	/* DAB */
@@ -9112,6 +9272,7 @@
   return(SiS_GetChReg(SiS_Pr,0));
 }
 #endif
+#endif
 
 /* Read from Chrontel 700x */
 /* Parameter is [Register no (S7-S0)] */
@@ -9172,7 +9333,7 @@
 }
 
 /* Our own DDC functions */
-USHORT
+static USHORT
 SiS_InitDDCRegs(SiS_Private *SiS_Pr, unsigned long VBFlags, int VGAEngine,
                 USHORT adaptnum, USHORT DDCdatatype, BOOLEAN checkcr32)
 {
@@ -9286,7 +9447,7 @@
     return 0;
 }
 
-USHORT
+static USHORT
 SiS_WriteDABDDC(SiS_Private *SiS_Pr)
 {
    if(SiS_SetStart(SiS_Pr)) return 0xFFFF;
@@ -9299,7 +9460,7 @@
    return(0);
 }
 
-USHORT
+static USHORT
 SiS_PrepareReadDDC(SiS_Private *SiS_Pr)
 {
    if(SiS_SetStart(SiS_Pr)) return 0xFFFF;
@@ -9309,7 +9470,7 @@
    return(0);
 }
 
-USHORT
+static USHORT
 SiS_PrepareDDC(SiS_Private *SiS_Pr)
 {
    if(SiS_WriteDABDDC(SiS_Pr)) SiS_WriteDABDDC(SiS_Pr);
@@ -9317,7 +9478,7 @@
    return(0);
 }
 
-void
+static void
 SiS_SendACK(SiS_Private *SiS_Pr, USHORT yesno)
 {
    SiS_SetSCLKLow(SiS_Pr);
@@ -9335,7 +9496,7 @@
    SiS_SetSCLKHigh(SiS_Pr);
 }
 
-USHORT
+static USHORT
 SiS_DoProbeDDC(SiS_Private *SiS_Pr)
 {
     unsigned char mask, value;
@@ -9385,7 +9546,7 @@
     return(ret);
 }
 
-USHORT
+static USHORT
 SiS_ProbeDDC(SiS_Private *SiS_Pr)
 {
    USHORT flag;
@@ -9401,7 +9562,7 @@
    return(flag);
 }
 
-USHORT
+static USHORT
 SiS_ReadDDC(SiS_Private *SiS_Pr, USHORT DDCdatatype, unsigned char *buffer)
 {
    USHORT flag, length, i;
@@ -9444,8 +9605,9 @@
    regards chipset and video bridge type.
 
    Arguments:
-       adaptnum: 0=CRT1, 1=LCD, 2=VGA2
-                 CRT2 DDC is only supported on SiS301, 301B, 302B.
+       adaptnum: 0=CRT1(analog), 1=CRT2/LCD(digital), 2=CRT2/VGA2(analog)
+                 CRT2 DDC is only supported on SiS301, 301B, 301C, 302B.
+		 LCDA is CRT1, but DDC is read from CRT2 port.
        DDCdatatype: 0=Probe, 1=EDID, 2=EDID+VDIF, 3=EDID V2 (P&D), 4=EDID V2 (FPDI-2)
        buffer: ptr to 256 data bytes which will be filled with read data.
 
@@ -9487,6 +9649,19 @@
       result = SiS_ProbeDDC(SiS_Pr);
    } else {
       result = SiS_ReadDDC(SiS_Pr, DDCdatatype, buffer);
+      if((!result) && (DDCdatatype == 1)) {
+         if((buffer[0] == 0x00) && (buffer[1] == 0xff) &&
+	    (buffer[2] == 0xff) && (buffer[3] == 0xff) &&
+	    (buffer[4] == 0xff) && (buffer[5] == 0xff) &&
+	    (buffer[6] == 0xff) && (buffer[7] == 0x00) &&
+	    (buffer[0x12] == 1)) {
+	    if(adaptnum == 1) {
+	       if(!(buffer[0x14] & 0x80)) result = 0xFFFE;
+	    } else {
+	       if(buffer[0x14] & 0x80)    result = 0xFFFE;
+	    }
+	 }
+      }
    }
    SiS_SetReg(SiS_Pr->SiS_P3c4,0x1f,sr1f);
    if(VGAEngine == SIS_300_VGA) {
@@ -9546,9 +9721,12 @@
 SiS_SenseLCDDDC(SiS_Private *SiS_Pr, SISPtr pSiS)
 {
    USHORT DDCdatatype, paneltype, flag, xres=0, yres=0;
-   USHORT index, myindex, lumsize, numcodes;
+   USHORT index, myindex, lumsize, numcodes, panelvendor, panelproduct;
+   int maxx=0, maxy=0, prefx=0, prefy=0;
    unsigned char cr37=0, seekcode;
    BOOLEAN checkexpand = FALSE;
+   BOOLEAN havesync = FALSE;
+   BOOLEAN indb = FALSE;
    int retry, i;
    unsigned char buffer[256];
 
@@ -9557,6 +9735,8 @@
    SiS_Pr->CP_MaxX = SiS_Pr->CP_MaxY = SiS_Pr->CP_MaxClock = 0;
    SiS_Pr->CP_PreferredX = SiS_Pr->CP_PreferredY = 0;
    SiS_Pr->CP_PreferredIndex = -1;
+   SiS_Pr->CP_PrefClock = 0;
+   SiS_Pr->PanelSelfDetected = FALSE;
 
    if(!(pSiS->VBFlags & (VB_301|VB_301B|VB_301C|VB_302B))) return 0;
    if(pSiS->VBFlags & VB_30xBDH) return 0;
@@ -9612,25 +9792,24 @@
       /* Catch a few clear cases: */
       if(!(checkedid1(buffer))) {
          xf86DrvMsg(pSiS->pScrn->scrnIndex, X_PROBED,
-	 	"CRT2: EDID corrupt\n");
+	 	"LCD sense: EDID corrupt\n");
 	 return 0;
       }
 
       if(!(buffer[0x14] & 0x80)) {
          xf86DrvMsg(pSiS->pScrn->scrnIndex, X_PROBED,
-	        "CRT2: Attached display expects analog input (0x%02x)\n",
+	        "LCD sense: Attached display expects analog input (0x%02x)\n",
 		buffer[0x14]);
       	 return 0;
       }
 
       if((buffer[0x18] & 0x18) != 0x08) {
          xf86DrvMsg(pSiS->pScrn->scrnIndex, X_PROBED,
-	 	"CRT2: Attached display is not of RGB but of %s type (0x%02x)\n",
+	 	"LCD sense: Warning: Attached display is not of RGB but of %s type (0x%02x)\n",
 		((buffer[0x18] & 0x18) == 0x00) ? "monochrome/greyscale" :
 		  ( ((buffer[0x18] & 0x18) == 0x10) ? "non-RGB multicolor" :
 		     "undefined"),
 		buffer[0x18]);
-	 return 0;
       }
 
       /* Now analyze the first Detailed Timing Block and see
@@ -9642,13 +9821,23 @@
       paneltype = Panel_Custom;
       checkexpand = FALSE;
 
+      panelvendor = buffer[9] | (buffer[8] << 8);
+      panelproduct = buffer[10] | (buffer[11] << 8);
+
+      /* Overrule bogus preferred modes from database */
+      if((indb = SiS_FindPanelFromDB(pSiS, panelvendor, panelproduct, &maxx, &maxy, &prefx, &prefy))) {
+         if(prefx) SiS_Pr->CP_PreferredX = xres = prefx;
+	 if(prefy) SiS_Pr->CP_PreferredY = yres = prefy;
+      }
+
       if(buffer[0x18] & 0x02) {
 
-         xres = buffer[0x38] | ((buffer[0x3a] & 0xf0) << 4);
-         yres = buffer[0x3b] | ((buffer[0x3d] & 0xf0) << 4);
+         USHORT pclk = (buffer[0x36] | (buffer[0x37] << 8));
+	 USHORT phb  = (buffer[0x39] | ((buffer[0x3a] & 0x0f) << 8));
+	 USHORT pvb  = (buffer[0x3c] | ((buffer[0x3d] & 0x0f) << 8));
 
-	 SiS_Pr->CP_PreferredX = xres;
-	 SiS_Pr->CP_PreferredY = yres;
+	 if(!xres) SiS_Pr->CP_PreferredX = xres = buffer[0x38] | ((buffer[0x3a] & 0xf0) << 4);
+         if(!yres) SiS_Pr->CP_PreferredY = yres = buffer[0x3b] | ((buffer[0x3d] & 0xf0) << 4);
 
          switch(xres) {
 #if 0	    /* Treat as custom */
@@ -9676,14 +9865,20 @@
 		      paneltype = Panel310_1280x960;
 		   }
 	        } else if(yres == 768) {
-		   if( ((buffer[0x36] | (buffer[0x37] << 8)) == 8100) &&
-		       ((buffer[0x39] | ((buffer[0x3a] & 0x0f) << 8)) == (1688 - 1280)) &&
-		       ((buffer[0x3c] | ((buffer[0x3d] & 0x0f) << 8)) == (802 - 768)) ) {
+		   if( (pclk == 8100) &&
+		       (phb == (1688 - 1280)) &&
+		       (pvb == (802 - 768)) ) {
 	       	      paneltype = Panel_1280x768;
 		      checkexpand = FALSE;
 		      cr37 |= 0x10;
 		   }
-	        }
+	        } else if(yres == 800) {
+		   if( (pclk == 6900) &&
+		       (phb == (1408 - 1280)) &&
+		       (pvb == (816 - 800)) ) {
+	       	      paneltype = Panel_1280x800;
+		   }
+		}
 	        break;
 	    case 1400:
 	        if(pSiS->VGAEngine == SIS_315_VGA) {
@@ -9693,7 +9888,6 @@
 	           }
 	        }
       	        break;
-#if 0	    /* Treat this as custom, as we have no valid timing data yet */
 	    case 1600:
 	        if(pSiS->VGAEngine == SIS_315_VGA) {
 		   if(pSiS->VBFlags & VB_301C) {
@@ -9704,41 +9898,61 @@
 	           }
 	        }
       	        break;
-#endif
          }
 
-	 if(paneltype != Panel_Custom) {
-	    if((buffer[0x47] & 0x18) == 0x18) {
-	       cr37 |= ((((buffer[0x47] & 0x06) ^ 0x06) << 5) | 0x20);
-	    } else {
-	       /* What now? There is no digital separate output timing... */
-	       xf86DrvMsg(pSiS->pScrn->scrnIndex, X_WARNING,
-	       	   "CRT2: Unable to retrieve Sync polarity information\n");
-	       cr37 |= 0xc0;  /* Default */
-	    }
+	 /* Save sync: This is used if "Pass 1:1" is off; in this case
+	  * we always use the panel's native mode = this "preferred mode"
+	  * we just have been analysing. Hence, we also need its sync.
+	  */
+	 if((buffer[0x47] & 0x18) == 0x18) {
+	    cr37 |= ((((buffer[0x47] & 0x06) ^ 0x06) << 5) | 0x20);
+	    havesync = TRUE;
+	 } else {
+	    /* What now? There is no digital separate output timing... */
+	    xf86DrvMsg(pSiS->pScrn->scrnIndex, X_WARNING,
+	       	   "LCD sense: Unable to retrieve Sync polarity information\n");
+	    cr37 |= 0xc0;  /* Default */
 	 }
 
       }
 
+      /* Check against our database; eg. Sanyo Z2 projector reports
+       * 1024x768 as preferred mode, although it supports 1280x720
+       * natively in non-HDCP mode. Treat such wrongly reporting
+       * panels as custom and fixup actual maximum resolutions.
+       */
+      if(paneltype != Panel_Custom) {
+         if(indb) {
+	    paneltype = Panel_Custom;
+	    SiS_Pr->CP_MaxX = maxx;
+	    SiS_Pr->CP_MaxY = maxy;
+	    /* Leave preferred unchanged (MUST contain a valid mode!) */
+	 }
+      }
+
       /* If we still don't know what panel this is, we take it
        * as a custom panel and derive the timing data from the
        * detailed timing blocks
        */
       if(paneltype == Panel_Custom) {
 
-         BOOLEAN havesync = FALSE;
 	 int i, temp, base = 0x36;
 	 unsigned long estpack;
-	 unsigned short estx[] = {
+	 const unsigned short estx[] = {
 	 	720, 720, 640, 640, 640, 640, 800, 800,
 		800, 800, 832,1024,1024,1024,1024,1280,
 		1152
 	 };
-	 unsigned short esty[] = {
+	 const unsigned short esty[] = {
 	 	400, 400, 480, 480, 480, 480, 600, 600,
 		600, 600, 624, 768, 768, 768, 768,1024,
 		870
 	 };
+	 const int estclk[] = {
+	            0,     0, 25100,   0, 31500, 31500, 36100, 40000,
+		50100, 49500,     0,   0, 65100, 75200, 78700,135200,
+		0
+	 };
 
 	 paneltype = 0;
 	 SiS_Pr->CP_Supports64048075 = TRUE;
@@ -9751,9 +9965,15 @@
 	     if(estpack & (1 << i)) {
 	        if(estx[16 - i] > SiS_Pr->CP_MaxX) SiS_Pr->CP_MaxX = estx[16 - i];
 		if(esty[16 - i] > SiS_Pr->CP_MaxY) SiS_Pr->CP_MaxY = esty[16 - i];
+		if(estclk[16 - i] > SiS_Pr->CP_MaxClock) SiS_Pr->CP_MaxClock = estclk[16 - i];
 	     }
 	 }
 
+	 /* By default we drive the LCD at 75Hz in 640x480 mode; if
+  	  * the panel does not provide this mode, use 60hz
+	  */
+	 if(!(buffer[0x23] & 0x04)) SiS_Pr->CP_Supports64048075 = FALSE;
+
 	 /* 2. From Standard Timings */
 	 for(i=0x26; i < 0x36; i+=2) {
 	    if((buffer[i] != 0x01) && (buffer[i+1] != 0x01)) {
@@ -9797,29 +10017,29 @@
 	       SiS_Pr->CP_DataValid[i] = TRUE;
 
 	       /* Sort out invalid timings, interlace and too high clocks */
-	       if((SiS_Pr->CP_HDisplay[i] & 7)						||
-	          (SiS_Pr->CP_HDisplay[i] > SiS_Pr->CP_HSyncStart[i])  			||
-	          (SiS_Pr->CP_HDisplay[i] >= SiS_Pr->CP_HSyncEnd[i])   			||
-	          (SiS_Pr->CP_HDisplay[i] >= SiS_Pr->CP_HTotal[i])     			||
-	          (SiS_Pr->CP_HSyncStart[i] >= SiS_Pr->CP_HSyncEnd[i]) 			||
-	          (SiS_Pr->CP_HSyncStart[i] > SiS_Pr->CP_HTotal[i])    			||
-	          (SiS_Pr->CP_HSyncEnd[i] > SiS_Pr->CP_HTotal[i])      			||
-	          (SiS_Pr->CP_VDisplay[i] > SiS_Pr->CP_VSyncStart[i])  			||
-	          (SiS_Pr->CP_VDisplay[i] >= SiS_Pr->CP_VSyncEnd[i])   			||
-	          (SiS_Pr->CP_VDisplay[i] >= SiS_Pr->CP_VTotal[i])     			||
-	          (SiS_Pr->CP_VSyncStart[i] > SiS_Pr->CP_VSyncEnd[i])  			||
-	          (SiS_Pr->CP_VSyncStart[i] > SiS_Pr->CP_VTotal[i])    			||
-	          (SiS_Pr->CP_VSyncEnd[i] > SiS_Pr->CP_VTotal[i])      			||
+	       if((SiS_Pr->CP_HDisplay[i] & 7)						  ||
+	          (SiS_Pr->CP_HDisplay[i] > SiS_Pr->CP_HSyncStart[i])  			  ||
+	          (SiS_Pr->CP_HDisplay[i] >= SiS_Pr->CP_HSyncEnd[i])   			  ||
+	          (SiS_Pr->CP_HDisplay[i] >= SiS_Pr->CP_HTotal[i])     			  ||
+	          (SiS_Pr->CP_HSyncStart[i] >= SiS_Pr->CP_HSyncEnd[i]) 			  ||
+	          (SiS_Pr->CP_HSyncStart[i] > SiS_Pr->CP_HTotal[i])    			  ||
+	          (SiS_Pr->CP_HSyncEnd[i] > SiS_Pr->CP_HTotal[i])      			  ||
+	          (SiS_Pr->CP_VDisplay[i] > SiS_Pr->CP_VSyncStart[i])  			  ||
+	          (SiS_Pr->CP_VDisplay[i] >= SiS_Pr->CP_VSyncEnd[i])   			  ||
+	          (SiS_Pr->CP_VDisplay[i] >= SiS_Pr->CP_VTotal[i])     			  ||
+	          (SiS_Pr->CP_VSyncStart[i] > SiS_Pr->CP_VSyncEnd[i])  			  ||
+	          (SiS_Pr->CP_VSyncStart[i] > SiS_Pr->CP_VTotal[i])    			  ||
+	          (SiS_Pr->CP_VSyncEnd[i] > SiS_Pr->CP_VTotal[i])      			  ||
 		  (((pSiS->VBFlags & VB_301C) && (SiS_Pr->CP_Clock[i] > 162500)) ||
-	           ((!(pSiS->VBFlags & VB_301C)) && (SiS_Pr->CP_Clock[i] > 108200)))	||
+	           ((!(pSiS->VBFlags & VB_301C)) &&
+		    ((SiS_Pr->CP_Clock[i] > 108200) || (SiS_Pr->CP_VDisplay[i] > 1024) ||
+		     (SiS_Pr->CP_HDisplay[i] > 1600)))) 				  ||
 		  (buffer[base+17] & 0x80)) {
 
 	          SiS_Pr->CP_DataValid[i] = FALSE;
 
 	       } else {
 
-	          paneltype = Panel_Custom;
-
 		  SiS_Pr->CP_HaveCustomData = TRUE;
 
 		  if(xres > SiS_Pr->CP_MaxX) SiS_Pr->CP_MaxX = xres;
@@ -9828,22 +10048,10 @@
 
 		  if((SiS_Pr->CP_PreferredX == xres) && (SiS_Pr->CP_PreferredY == yres)) {
 	             SiS_Pr->CP_PreferredIndex = i;
+		     SiS_MakeClockRegs(pSiS->pScrn, SiS_Pr->CP_Clock[i], &SiS_Pr->CP_PrefSR2B, &SiS_Pr->CP_PrefSR2C);
+		     SiS_Pr->CP_PrefClock = (SiS_Pr->CP_Clock[i] / 1000) + 1;
 	          }
 
-		  SiS_Pr->CP_Vendor = buffer[9] | (buffer[8] << 8);
-		  SiS_Pr->CP_Product = buffer[10] | (buffer[11] << 8);
-
-		  /* By default we drive the LCD at 75Hz in 640x480 mode; if
-		   * the panel does not provide this mode, use 60hz
-		   */
-		  if(!(buffer[0x23] & 0x04)) SiS_Pr->CP_Supports64048075 = FALSE;
-
-	          /* We must assume the panel can scale, since we have
-	           * no scaling data
-		   */
-	          checkexpand = FALSE;
-	          cr37 |= 0x10;
-
 	          /* Extract the sync polarisation information. This only works
 	           * if the Flags indicate a digital separate output.
 	           */
@@ -9851,20 +10059,37 @@
 		     SiS_Pr->CP_HSync_P[i] = (buffer[base+17] & 0x02) ? TRUE : FALSE;
 		     SiS_Pr->CP_VSync_P[i] = (buffer[base+17] & 0x04) ? TRUE : FALSE;
 		     SiS_Pr->CP_SyncValid[i] = TRUE;
-		     if(!havesync) {
+		     if((i == SiS_Pr->CP_PreferredIndex) && (!havesync)) {
 	                cr37 |= ((((buffer[base+17] & 0x06) ^ 0x06) << 5) | 0x20);
 			havesync = TRUE;
 	   	     }
 	          } else {
 		     SiS_Pr->CP_SyncValid[i] = FALSE;
 		  }
+
 	       }
-            }
+
+            } else if((!buffer[base]) && (!buffer[base+1]) && (!buffer[base+2]) && (!buffer[base+4])) {
+
+	       /* Maximum pixclock from Monitor Range Limits */
+	       if((buffer[base+3] == 0xfd) && (buffer[base+9] != 0xff)) {
+	          int maxclk = buffer[base+9] * 10;
+		  /* More than 170 is not supported anyway */
+		  if(maxclk <= 170) SiS_Pr->CP_MaxClock = maxclk * 1000;
+	       }
+
+	    }
+
 	 }
-	 if(!havesync) {
-	    xf86DrvMsg(pSiS->pScrn->scrnIndex, X_WARNING,
-	       	   "CRT2: Unable to retrieve Sync polarity information\n");
-   	 }
+
+	 if(SiS_Pr->CP_MaxX && SiS_Pr->CP_MaxY) {
+	    paneltype = Panel_Custom;
+	    checkexpand = FALSE;
+	    cr37 |= 0x10;
+	    SiS_Pr->CP_Vendor = panelvendor;
+	    SiS_Pr->CP_Product = panelproduct;
+	 }
+
       }
 
       if(paneltype && checkexpand) {
@@ -9887,28 +10112,32 @@
 
       if(!(checkedid2(buffer))) {
          xf86DrvMsg(pSiS->pScrn->scrnIndex, X_PROBED,
-	 	"CRT2: EDID corrupt\n");
+	 	"LCD sense: EDID corrupt\n");
 	 return 0;
       }
 
       if((buffer[0x41] & 0x0f) == 0x03) {
          index = 0x42 + 3;
          xf86DrvMsg(pSiS->pScrn->scrnIndex, X_PROBED,
-	 	"CRT2: Display supports TMDS input on primary interface\n");
+	 	"LCD sense: Display supports TMDS input on primary interface\n");
       } else if((buffer[0x41] & 0xf0) == 0x30) {
          index = 0x46 + 3;
          xf86DrvMsg(pSiS->pScrn->scrnIndex, X_PROBED,
-	 	"CRT2: Display supports TMDS input on secondary interface\n");
+	 	"LCD sense: Display supports TMDS input on secondary interface\n");
       } else {
          xf86DrvMsg(pSiS->pScrn->scrnIndex, X_PROBED,
-	 	"CRT2: Display does not support TMDS video interface (0x%02x)\n", 
+	 	"LCD sense: Display does not support TMDS video interface (0x%02x)\n",
 		buffer[0x41]);
 	 return 0;
       }
 
+      SiS_Pr->CP_Vendor = panelvendor = buffer[2] | (buffer[1] << 8);
+      SiS_Pr->CP_Product = panelproduct = buffer[3] | (buffer[4] << 8);
+
       paneltype = Panel_Custom;
-      SiS_Pr->CP_MaxX = xres = buffer[0x76] | (buffer[0x77] << 8);
-      SiS_Pr->CP_MaxY = yres = buffer[0x78] | (buffer[0x79] << 8);
+      SiS_Pr->CP_MaxX = SiS_Pr->CP_PreferredX = xres = buffer[0x76] | (buffer[0x77] << 8);
+      SiS_Pr->CP_MaxY = SiS_Pr->CP_PreferredY = yres = buffer[0x78] | (buffer[0x79] << 8);
+
       switch(xres) {
 #if 0
          case 800:
@@ -9945,7 +10174,6 @@
 	        }
 	     }
       	     break;
-#if 0    /* Treat this one as custom since we have no timing data yet */
 	 case 1600:
 	     if(pSiS->VGAEngine == SIS_315_VGA) {
 	        if(pSiS->VBFlags & VB_301C) {
@@ -9956,7 +10184,6 @@
 	        }
 	     }
       	     break;
-#endif
       }
 
       /* Determine if RGB18 or RGB24 */
@@ -9979,7 +10206,25 @@
 	 lumsize++;  /* luminance header byte */
 	 index += lumsize;
       }
+#if 0 /* "pixel rate" = pixel clock? */
+      if(buffer[0x7e] & 0x1c) {
+         for(i=0; i<((buffer[0x7e] & 0x1c) >> 2); i++) {
+	    if(buffer[index + (i*8) + 6] && (buffer[index + (i*8) + 7] & 0x0f)) {
+	       int clk = (buffer[index + (i*8) + 6] | ((buffer[index + (i*8) + 7] & 0x0f) << 4)) * 1000;
+	       if(clk > SiS_Pr->CP_MaxClock) SiS_Pr->CP_MaxClock = clk;
+	    }
+	 }
+      }
+#endif
       index += (((buffer[0x7e] & 0x1c) >> 2) * 8);   /* skip Frequency Ranges */
+      if(buffer[0x7e] & 0x03) {
+         for(i=0; i<(buffer[0x7e] & 0x03); i++) {
+	    if((buffer[index + (i*27) + 9]) || (buffer[index + (i*27) + 10])) {
+	       int clk = ((buffer[index + (i*27) + 9]) | ((buffer[index + (i*27) + 9]) << 8)) * 10;
+	       if(clk > SiS_Pr->CP_MaxClock) SiS_Pr->CP_MaxClock = clk;
+	    }
+	 }
+      }
       index += ((buffer[0x7e] & 0x03) * 27);         /* skip Detailed Range Limits */
       numcodes = (buffer[0x7f] & 0xf8) >> 3;
       if(numcodes) {
@@ -9991,13 +10236,29 @@
 	 }
 	 if(buffer[myindex] == seekcode) {
 	    cr37 |= ((((buffer[myindex + 1] & 0x0c) ^ 0x0c) << 4) | 0x20);
+	    havesync = TRUE;
 	 } else {
 	    xf86DrvMsg(pSiS->pScrn->scrnIndex, X_WARNING,
-	        "CRT2: Unable to retrieve Sync polarity information\n");
+	        "LCD sense: Unable to retrieve Sync polarity information\n");
 	 }
       } else {
          xf86DrvMsg(pSiS->pScrn->scrnIndex, X_WARNING,
-	     "CRT2: Unable to retrieve Sync polarity information\n");
+	     "LCD sense: Unable to retrieve Sync polarity information\n");
+      }
+
+      /* Check against our database; Eg. Sanyo projector reports
+       * 1024x768 in non-HDPC mode, although it supports 1280x720.
+       * Treat such wrongly reporting panels as custom.
+       */
+      if(paneltype != Panel_Custom) {
+         int maxx, maxy, prefx, prefy;
+         if((SiS_FindPanelFromDB(pSiS, panelvendor, panelproduct, &maxx, &maxy, &prefx, &prefy))) {
+	    paneltype = Panel_Custom;
+	    SiS_Pr->CP_MaxX = maxx;
+	    SiS_Pr->CP_MaxY = maxy;
+	    cr37 |= 0x10;
+	    /* Leave preferred unchanged (MUST be a valid mode!) */
+	 }
       }
 
       /* Now seek the detailed timing descriptions for custom panels */
@@ -10043,7 +10304,8 @@
 	       (SiS_Pr->CP_VSyncStart[i] > SiS_Pr->CP_VTotal[i])    			||
 	       (SiS_Pr->CP_VSyncEnd[i] > SiS_Pr->CP_VTotal[i])      			||
 	       (((pSiS->VBFlags & VB_301C) && (SiS_Pr->CP_Clock[i] > 162500)) ||
-	        ((!(pSiS->VBFlags & VB_301C)) && (SiS_Pr->CP_Clock[i] > 108200)))	||
+	        ((!(pSiS->VBFlags & VB_301C)) &&
+		 ((SiS_Pr->CP_Clock[i] > 108200) || (SiS_Pr->CP_VDisplay[i] > 1024))))	||
 	       (buffer[index + 17] & 0x80)) {
 
 	       SiS_Pr->CP_DataValid[i] = FALSE;
@@ -10054,25 +10316,25 @@
 
 	       if(SiS_Pr->CP_Clock[i] > SiS_Pr->CP_MaxClock) SiS_Pr->CP_MaxClock = SiS_Pr->CP_Clock[i];
 
-	       if((SiS_Pr->CP_MaxX == xres) && (SiS_Pr->CP_MaxY == yres)) {
+	       if((SiS_Pr->CP_PreferredX == xres) && (SiS_Pr->CP_PreferredY == yres)) {
 	          SiS_Pr->CP_PreferredIndex = i;
+		  SiS_MakeClockRegs(pSiS->pScrn, SiS_Pr->CP_Clock[i], &SiS_Pr->CP_PrefSR2B, &SiS_Pr->CP_PrefSR2C);
+		  SiS_Pr->CP_PrefClock = (SiS_Pr->CP_Clock[i] / 1000) + 1;
+		  if(!havesync) {
+	             cr37 |= ((((buffer[index + 17] & 0x06) ^ 0x06) << 5) | 0x20);
+		     havesync = TRUE;
+	   	  }
 	       }
 
 	       SiS_Pr->CP_HSync_P[i] = (buffer[index + 17] & 0x02) ? TRUE : FALSE;
 	       SiS_Pr->CP_VSync_P[i] = (buffer[index + 17] & 0x04) ? TRUE : FALSE;
 	       SiS_Pr->CP_SyncValid[i] = TRUE;
 
-	       SiS_Pr->CP_Vendor = buffer[2] | (buffer[1] << 8);
-	       SiS_Pr->CP_Product = buffer[3] | (buffer[4] << 8);
-
-	       /* We must assume the panel can scale, since we have
-	        * no scaling data
-    	        */
-	       cr37 |= 0x10;
-
 	    }
 	 }
 
+	 cr37 |= 0x10;
+
       }
 
       break;
@@ -10091,7 +10353,7 @@
    for(i = 0; i < 7; i++) {
       if(SiS_Pr->CP_DataValid[i]) {
          xf86DrvMsg(pSiS->pScrn->scrnIndex, X_PROBED,
-            "Non-standard LCD timing data no. %d:\n", i);
+            "Non-standard LCD/DVI-D timing data no. %d:\n", i);
          xf86DrvMsg(pSiS->pScrn->scrnIndex, X_PROBED,
 	    "   HDisplay %d HSync %d HSyncEnd %d HTotal %d\n",
 	    SiS_Pr->CP_HDisplay[i], SiS_Pr->CP_HSyncStart[i],
@@ -10119,7 +10381,7 @@
        SiS_Pr->PanelSelfDetected = TRUE;
 #ifdef TWDEBUG
        xf86DrvMsgVerb(pSiS->pScrn->scrnIndex, X_PROBED, 3, 
-       	   "CRT2: [DDC LCD results: 0x%02x, 0x%02x]\n", paneltype, cr37);
+       	   "LCD sense: [DDC LCD results: 0x%02x, 0x%02x]\n", paneltype, cr37);
 #endif	
    } else {
        SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x32,~0x08);
@@ -10155,7 +10417,7 @@
       DDCdatatype = 1;
    } else {
    	xf86DrvMsg(pSiS->pScrn->scrnIndex, X_PROBED,
-		"Do DDC answer\n");
+		"VGA2 sense: Do DDC answer\n");
    	return 0;				/* no DDC support (or no device attached) */
    }
 
@@ -10164,7 +10426,7 @@
    do {
       if(SiS_ReadDDC(SiS_Pr, DDCdatatype, buffer)) {
          xf86DrvMsg(pSiS->pScrn->scrnIndex, X_PROBED,
-	 	"CRT2: DDC read failed (attempt %d), %s\n",
+	 	"VGA2 sense: DDC read failed (attempt %d), %s\n",
 		(3-retry), (retry == 1) ? "giving up" : "retrying");
 	 retry--;
 	 if(retry == 0) return 0xFFFF;
@@ -10177,13 +10439,13 @@
    switch(DDCdatatype) {
    case 1:
       if(!(checkedid1(buffer))) {
-          xf86DrvMsg(pSiS->pScrn->scrnIndex, X_PROBED,
-	  	"CRT2: EDID corrupt\n");
+          xf86DrvMsg(pSiS->pScrn->scrnIndex, X_ERROR,
+	  	"VGA2 sense: EDID corrupt\n");
       	  return 0;
       }
       if(buffer[0x14] & 0x80) {			/* Display uses digital input */
-          xf86DrvMsg(pSiS->pScrn->scrnIndex, X_PROBED,
-	  	"CRT2: Attached display expects digital input\n");
+          xf86DrvMsg(pSiS->pScrn->scrnIndex, X_ERROR,
+	  	"VGA2 sense: Attached display expects digital input\n");
       	  return 0;
       }
       SiS_Pr->CP_Vendor = buffer[9] | (buffer[8] << 8);
@@ -10193,16 +10455,16 @@
    case 3:
    case 4:
       if(!(checkedid2(buffer))) {
-          xf86DrvMsg(pSiS->pScrn->scrnIndex, X_PROBED,
-	  	"CRT2: EDID corrupt\n");
+          xf86DrvMsg(pSiS->pScrn->scrnIndex, X_ERROR,
+	  	"VGA2 sense: EDID corrupt\n");
       	  return 0;
       }
       if( ((buffer[0x41] & 0x0f) != 0x01) &&  	/* Display does not support analog input */
           ((buffer[0x41] & 0x0f) != 0x02) &&
 	  ((buffer[0x41] & 0xf0) != 0x10) &&
 	  ((buffer[0x41] & 0xf0) != 0x20) ) {
-	  xf86DrvMsg(pSiS->pScrn->scrnIndex, X_PROBED,
-	     	"CRT2: Attached display does not support analog input (0x%02x)\n",
+	  xf86DrvMsg(pSiS->pScrn->scrnIndex, X_ERROR,
+	     	"VGA2 sense: Attached display does not support analog input (0x%02x)\n",
 		buffer[0x41]);
 	  return 0;
       }
@@ -10232,7 +10494,7 @@
 
 /* Generic I2C functions for Chrontel & DDC --------- */
 
-void
+static void
 SiS_SetSwitchDDC2(SiS_Private *SiS_Pr)
 {
   SiS_SetSCLKHigh(SiS_Pr);
@@ -10251,7 +10513,7 @@
 
 /* Set I2C start condition */
 /* This is done by a SD high-to-low transition while SC is high */
-USHORT
+static USHORT
 SiS_SetStart(SiS_Private *SiS_Pr)
 {
   if(SiS_SetSCLKLow(SiS_Pr)) return 0xFFFF;			           /* (SC->low)  */
@@ -10270,7 +10532,7 @@
 
 /* Set I2C stop condition */
 /* This is done by a SD low-to-high transition while SC is high */
-USHORT
+static USHORT
 SiS_SetStop(SiS_Private *SiS_Pr)
 {
   if(SiS_SetSCLKLow(SiS_Pr)) return 0xFFFF;			           /* (SC->low) */
@@ -10288,7 +10550,7 @@
 }
 
 /* Write 8 bits of data */
-USHORT
+static USHORT
 SiS_WriteDDC2Data(SiS_Private *SiS_Pr, USHORT tempax)
 {
   USHORT i,flag,temp;
@@ -10314,7 +10576,7 @@
   return(temp);
 }
 
-USHORT
+static USHORT
 SiS_ReadDDC2Data(SiS_Private *SiS_Pr, USHORT tempax)
 {
   USHORT i,temp,getdata;
@@ -10334,7 +10596,7 @@
   return(getdata);
 }
 
-USHORT
+static USHORT
 SiS_SetSCLKLow(SiS_Private *SiS_Pr)
 {
   SiS_SetRegANDOR(SiS_Pr->SiS_DDC_Port,
@@ -10345,7 +10607,7 @@
   return 0;
 }
 
-USHORT
+static USHORT
 SiS_SetSCLKHigh(SiS_Private *SiS_Pr)
 {
   USHORT temp, watchdog=1000;
@@ -10369,7 +10631,7 @@
 
 /* Check I2C acknowledge */
 /* Returns 0 if ack ok, non-0 if ack not ok */
-USHORT
+static USHORT
 SiS_CheckACK(SiS_Private *SiS_Pr)
 {
   USHORT tempah;
@@ -11075,35 +11337,18 @@
   }
 }
 
-void
-SiS_OEM310Setting(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,
-                  USHORT ModeNo,USHORT ModeIdIndex)
-{
-   SetDelayComp(SiS_Pr,HwInfo,ModeNo);
-
-   if(SiS_Pr->UseCustomMode) return;
-
-   if((SiS_Pr->SiS_VBType & VB_SISVB) && (SiS_Pr->SiS_VBInfo & SetCRT2ToTV)) {
-      SetAntiFlicker(SiS_Pr,HwInfo,ModeNo,ModeIdIndex);
-      SetPhaseIncr(SiS_Pr,HwInfo,ModeNo,ModeIdIndex);
-      SetYFilter(SiS_Pr,HwInfo,ModeNo,ModeIdIndex);
-      if(SiS_Pr->SiS_VBType & VB_SIS301) {
-         SetEdgeEnhance(SiS_Pr,HwInfo,ModeNo,ModeIdIndex);
-      }
-   }
-}
-
 static void
 SetDelayComp661(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, USHORT ModeNo,
                 USHORT ModeIdIndex, USHORT RTI)
 {
-   USHORT delay = 0, romptr = 0, index;
+   USHORT delay = 0, romptr = 0, index, lcdpdcindex;
    UCHAR  *ROMAddr = HwInfo->pjVirtualRomBase;
 
    if(!(SiS_Pr->SiS_VBInfo & (SetCRT2ToTV | SetCRT2ToLCD | SetCRT2ToLCDA | SetCRT2ToRAMDAC)))
       return;
 
    /* 1. New ROM: VGA2 and LCD/LCDA-Pass1:1 */
+   /* (If a custom mode is used, Pass1:1 is always set; hence we do this:) */
 
    if(SiS_Pr->SiS_ROMNew) {
       if((SiS_Pr->SiS_VBInfo & SetCRT2ToRAMDAC) 			||
@@ -11121,7 +11366,7 @@
          if((ROMAddr[0x5b] & 0x80) || (SiS_Pr->SiS_VBInfo & (SetCRT2ToRAMDAC | SetCRT2ToLCD))) {
 	    index++;
 	 }
-	 romptr = SISGETROMW(0x104);  /* 0x4ae */
+	 romptr = SISGETROMW(0x104);
          delay = ROMAddr[romptr + index];
          if(SiS_Pr->SiS_VBInfo & (SetCRT2ToRAMDAC | SetCRT2ToLCD)) {
             SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x2d,0xf0,((delay >> 1) & 0x0f));
@@ -11147,10 +11392,12 @@
 
       index = GetOEMTVPtr661(SiS_Pr);
       if(SiS_Pr->SiS_ROMNew) {
-         romptr = SISGETROMW(0x106);  /* 0x4ba */
+         romptr = SISGETROMW(0x106);
+	 if(SiS_Pr->SiS_VBType & VB_UMC) romptr += 12;
          delay = ROMAddr[romptr + index];
       } else {
          delay = 0x04;
+	 if(index > 3) delay = 0;
       }
 
    } else if(SiS_Pr->SiS_VBInfo & (SetCRT2ToLCD | SetCRT2ToLCDA)) {
@@ -11160,22 +11407,41 @@
       if( (SiS_Pr->SiS_LCDResInfo != Panel_Custom) &&
           ((romptr = GetLCDStructPtr661_2(SiS_Pr, HwInfo))) ) {
 
-	 /* For LV, the BIOS must know about the correct value */
-	 delay = ROMAddr[romptr + 0x0d];		/* LCD  */
-	 delay |= (ROMAddr[romptr + 0x0c] << 8);	/* LCDA */
+	 lcdpdcindex = (SiS_Pr->SiS_VBType & VB_UMC) ? 14 : 12;
+
+	 /* For LVDS (and sometimes TMDS), the BIOS must know about the correct value */
+	 delay = ROMAddr[romptr + lcdpdcindex + 1];	/* LCD  */
+	 delay |= (ROMAddr[romptr + lcdpdcindex] << 8);	/* LCDA */
 
       } else {
 
-         /* TMDS: Set our own, since BIOS has no idea - TODO: Find out about values */
+         /* TMDS: Set our own, since BIOS has no idea */
+	 /* (This is done on >=661 only, since <661 is calling this only for LVDS) */
          if(!(SiS_Pr->SiS_LCDInfo & LCDPass11)) {
-            if((SiS_Pr->PanelXRes <= 1024) && (SiS_Pr->PanelYRes <= 768)) {
-	       delay = 0x0404;
-            } else if((SiS_Pr->PanelXRes <= 1280) && (SiS_Pr->PanelYRes <= 1024)) {
-	       delay = 0x0404;
-            } else if((SiS_Pr->PanelXRes <= 1400) && (SiS_Pr->PanelYRes <= 1050)) {
-	       delay = 0x1004;
-            } else
-	       delay = 0x0000;
+	    switch(SiS_Pr->SiS_LCDResInfo) {
+	    case Panel_1024x768:  delay = 0x0008; break;
+	    case Panel_1280x720:  delay = 0x0004; break;
+	    case Panel_1280x768:
+	    case Panel_1280x768_2:delay = 0x0004; break;
+	    case Panel_1280x800:
+	    case Panel_1280x800_2:delay = 0x0004; break; /* Verified for 1280x800 */
+	    case Panel_1280x1024: delay = 0x1e04; break;
+	    case Panel_1400x1050: delay = 0x0004; break;
+	    case Panel_1600x1200: delay = 0x0400; break;
+	    case Panel_1680x1050: delay = 0x0e04; break;
+	    default:
+               if((SiS_Pr->PanelXRes <= 1024) && (SiS_Pr->PanelYRes <= 768)) {
+	          delay = 0x0008;
+	       } else if((SiS_Pr->PanelXRes == 1280) && (SiS_Pr->PanelYRes == 1024)) {
+	          delay = 0x1e04;
+               } else if((SiS_Pr->PanelXRes <= 1400) && (SiS_Pr->PanelYRes <= 1050)) {
+	          delay = 0x0004;
+	       } else if((SiS_Pr->PanelXRes <= 1600) && (SiS_Pr->PanelYRes <= 1200)) {
+	          delay = 0x0400;
+               } else
+	          delay = 0x0e04;
+	       break;
+	    }
          }
 
 	 /* Override by detected or user-set values */
@@ -11216,31 +11482,30 @@
       } else {
          infoflag = SiS_Pr->SiS_RefIndex[RTI].Ext_InfoFlag;
       }
-      infoflag &= 0xc0;
 
-      temp = SiS_GetReg(SiS_Pr->SiS_P3d4,0x37);
-      if(SiS_Pr->SiS_LCDInfo & LCDPass11) {
-         temp &= 0x3f;
-	 temp |= infoflag;
-      } else {
-         if(temp & 0x20) infoflag = temp;
+      if(!(SiS_Pr->SiS_LCDInfo & LCDPass11)) {
+         infoflag = SiS_GetReg(SiS_Pr->SiS_P3d4,0x37); /* No longer check D5 */
       }
-      if(temp & 0x01) infoflag |= 0x01;
+
+      infoflag &= 0xc0;
 
       if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) {
-         temp = 0x0c;
-         if(infoflag & 0x01) temp ^= 0x14;  /* BIOS: 18, wrong */
-         temp |= (infoflag >> 6);
+         temp = (infoflag >> 6) | 0x0c;
+         if(SiS_Pr->SiS_LCDInfo & LCDRGB18Bit) {
+	    temp ^= 0x04;
+	    if(SiS_Pr->SiS_ModeType >= Mode24Bpp) temp |= 0x10;
+	 }
          SiS_SetRegANDOR(SiS_Pr->SiS_Part2Port,0x1a,0xe0,temp);
       } else {
-         temp = 0;
-         if(infoflag & 0x01) temp |= 0x80;
-         SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x1a,0x7f,temp);
          temp = 0x30;
-         if(infoflag & 0x01) temp = 0x20;
-         infoflag &= 0xc0;
+         if(SiS_Pr->SiS_LCDInfo & LCDRGB18Bit) temp = 0x20;
          temp |= infoflag;
          SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x19,0x0f,temp);
+         temp = 0;
+         if(SiS_Pr->SiS_LCDInfo & LCDRGB18Bit) {
+	    if(SiS_Pr->SiS_ModeType >= Mode24Bpp) temp |= 0x80;
+	 }
+         SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x1a,0x7f,temp);
       }
 
    }
@@ -11279,7 +11544,31 @@
    }
 }
 
-void
+static void
+SiS_OEM310Setting(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,
+                  USHORT ModeNo,USHORT ModeIdIndex,USHORT RRTI)
+{
+   if((SiS_Pr->SiS_ROMNew) && (SiS_Pr->SiS_VBType & VB_SISLVDS)) {
+      SetDelayComp661(SiS_Pr,HwInfo,ModeNo,ModeIdIndex,RRTI);
+      if(SiS_Pr->SiS_VBInfo & (SetCRT2ToLCD | SetCRT2ToLCDA)) {
+         SetCRT2SyncDither661(SiS_Pr,HwInfo,ModeNo,RRTI);
+         SetPanelParms661(SiS_Pr,HwInfo);
+      }
+   } else {
+      SetDelayComp(SiS_Pr,HwInfo,ModeNo);
+   }
+
+   if((SiS_Pr->SiS_VBType & VB_SISVB) && (SiS_Pr->SiS_VBInfo & SetCRT2ToTV)) {
+      SetAntiFlicker(SiS_Pr,HwInfo,ModeNo,ModeIdIndex);
+      SetPhaseIncr(SiS_Pr,HwInfo,ModeNo,ModeIdIndex);
+      SetYFilter(SiS_Pr,HwInfo,ModeNo,ModeIdIndex);
+      if(SiS_Pr->SiS_VBType & VB_SIS301) {
+         SetEdgeEnhance(SiS_Pr,HwInfo,ModeNo,ModeIdIndex);
+      }
+   }
+}
+
+static void
 SiS_OEM661Setting(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,
                   USHORT ModeNo,USHORT ModeIdIndex, USHORT RRTI)
 {
@@ -11310,7 +11599,7 @@
  * function looks quite different in every BIOS, so you better
  * pray that we have a backup...
  */
-void
+static void
 SiS_FinalizeLCD(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex,
                 PSIS_HW_INFO HwInfo)
 {
@@ -11318,6 +11607,7 @@
   USHORT resinfo,modeflag;
 
   if(!(SiS_Pr->SiS_VBType & VB_SIS301LV302LV)) return;
+  if(SiS_Pr->SiS_ROMNew) return;
 
   if(SiS_Pr->SiS_VBInfo & (SetCRT2ToLCD | SetCRT2ToLCDA)) {
      if(SiS_Pr->LVDSHL != -1) {
@@ -11514,7 +11804,7 @@
 
 #ifdef SIS300
 
-void
+static void
 SetOEMLCDData2(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,
                USHORT ModeNo,USHORT ModeIdIndex, USHORT RefTabIndex)
 {
@@ -11574,7 +11864,9 @@
 
   if(HwInfo->jChipType == SIS_300) {
 
-    tempbx = (SiS_GetReg(SiS_Pr->SiS_P3d4,0x36) & 0x0f) - 2;
+    tempbx = SiS_GetReg(SiS_Pr->SiS_P3d4,0x36) & 0x0f;
+    if(SiS_Pr->SiS_VBType & VB_SIS301) tempbx &= 0x07;
+    tempbx -= 2;
     if(!(SiS_Pr->SiS_SetFlag & LCDVESATiming)) tempbx += 4;
     if(SiS_Pr->SiS_LCDResInfo == Panel_1024x768) {
        if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) tempbx += 3;
@@ -11612,7 +11904,9 @@
     tempbx = SiS_Pr->SiS_LCDTypeInfo << 2;
     if(SiS_Pr->SiS_VBInfo & SetInSlaveMode) tempbx += 2;
     if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) tempbx++;
+
   }
+
   return tempbx;
 }
 
@@ -11914,7 +12208,7 @@
    return ModeIdIndex;
 }
 
-void
+static void
 SiS_OEM300Setting(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,
 		  USHORT ModeNo, USHORT ModeIdIndex, USHORT RefTableIndex)
 {
diff -Nru a/drivers/video/sis/init301.h b/drivers/video/sis/init301.h
--- a/drivers/video/sis/init301.h	2005-01-10 20:11:19 -08:00
+++ b/drivers/video/sis/init301.h	2005-01-10 20:11:19 -08:00
@@ -35,7 +35,7 @@
  * * 3) The name of the author may not be used to endorse or promote products
  * *    derived from this software without specific prior written permission.
  * *
- * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESSED OR
+ * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  * * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  * * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
@@ -54,20 +54,16 @@
 #define  _INIT301_
 
 #include "osdef.h"
-
 #include "initdef.h"
-#include "vgatypes.h"
-#include "vstruct.h"
 
 #ifdef LINUX_XF86
-#include "xf86.h"
-#include "xf86Pci.h"
-#include "xf86PciInfo.h"
 #include "sis.h"
 #include "sis_regs.h"
 #endif
 
 #ifdef LINUX_KERNEL
+#include "vgatypes.h"
+#include "vstruct.h"
 #ifdef SIS_CP
 #undef SIS_CP
 #endif
@@ -82,7 +78,7 @@
 #endif
 #endif
 
-const UCHAR SiS_YPbPrTable[3][64] = {
+static const UCHAR SiS_YPbPrTable[3][64] = {
   {
     0x17,0x1d,0x03,0x09,0x05,0x06,0x0c,0x0c,
     0x94,0x49,0x01,0x0a,0x06,0x0d,0x04,0x0a,
@@ -127,7 +123,7 @@
   }
 };
 
-const UCHAR SiS_HiTVGroup3_1[] = {
+static const UCHAR SiS_HiTVGroup3_1[] = {
     0x00, 0x14, 0x15, 0x25, 0x55, 0x15, 0x0b, 0x13,
     0xb1, 0x41, 0x62, 0x62, 0xff, 0xf4, 0x45, 0xa6,
     0x25, 0x2f, 0x67, 0xf6, 0xbf, 0xff, 0x8e, 0x20,
@@ -138,7 +134,7 @@
     0x1a, 0x1f, 0x25, 0x2a, 0x4c, 0xaa, 0x01
 };
 
-const UCHAR SiS_HiTVGroup3_2[] = {
+static const UCHAR SiS_HiTVGroup3_2[] = {
     0x00, 0x14, 0x15, 0x25, 0x55, 0x15, 0x0b, 0x7a,
     0x54, 0x41, 0xe7, 0xe7, 0xff, 0xf4, 0x45, 0xa6,
     0x25, 0x2f, 0x67, 0xf6, 0xbf, 0xff, 0x8e, 0x20,
@@ -149,7 +145,7 @@
     0x18, 0x1d, 0x23, 0x28, 0x4c, 0xaa, 0x01
 };
 
-/* 301C / 302ELV extended Part2 TV registers */
+/* 301C / 302ELV extended Part2 TV registers (4 tap scaler) */
 
 static const UCHAR SiS_Part2CLVX_1[] = {
     0x00,0x00,
@@ -224,13 +220,13 @@
 };
 
 #ifdef SIS315H
-/* 661 et al LCD data structure (0.94.0) */
+/* 661 et al LCD data structure (2.03.00) */
 static const UCHAR SiS_LCDStruct661[] = {
     /* 1024x768 */
 /*  type|CR37|   HDE   |   VDE   |    HT   |    VT   |   hss    | hse   */
     0x02,0xC0,0x00,0x04,0x00,0x03,0x40,0x05,0x26,0x03,0x10,0x00,0x88,
     0x00,0x02,0x00,0x06,0x00,0x41,0x5A,0x64,0x00,0x00,0x00,0x00,0x04,
-    /*  | vss      |   vse  |clck|  clock  |CRT2DataP|CRT2DataP|idx     */
+    /*  | vss     |    vse  |clck|  clock  |CRT2DataP|CRT2DataP|idx     */
     /*					      VESA    non-VESA  noscale */
     /* 1280x1024 */
     0x03,0xC0,0x00,0x05,0x00,0x04,0x98,0x06,0x2A,0x04,0x30,0x00,0x70,
@@ -239,23 +235,20 @@
     0x09,0x20,0x78,0x05,0x1A,0x04,0x98,0x06,0x2A,0x04,0x18,0x00,0x38,
     0x00,0x01,0x00,0x03,0x00,0x6C,0xF8,0x2F,0x00,0x00,0x00,0x00,0x09,
     /* 1600x1200 */
-    0x0B,0xC0,0x40,0x06,0xB0,0x04,0x70,0x08,0xE2,0x04,0x40,0x00,0xC0,
-    0x00,0x01,0x00,0x03,0x00,0xA2,0x70,0x24,0x00,0x00,0x00,0x00,0x0B,
-    /* 1280x768 */
-    0x0A,0xC0,0x00,0x05,0x00,0x03,0x80,0x05,0x26,0x03,0x10,0x00,0x40,
-    0x00,0x03,0x00,0x06,0x00,0x44,0x63,0x46,0x00,0x00,0x00,0x00,0x06,
+    0x0B,0xE0,0x40,0x06,0xB0,0x04,0x70,0x08,0xE2,0x04,0x40,0x00,0xC0,
+    0x00,0x01,0x00,0x03,0x00,0xA2,0x70,0x24,0x00,0x00,0x00,0x00,0x0A,
+    /* 1280x768 (_2) */
+    0x0A,0xE0,0x00,0x05,0x00,0x03,0x7C,0x06,0x26,0x03,0x30,0x00,0x70,
+    0x00,0x03,0x00,0x06,0x00,0x4D,0xC8,0x48,0x00,0x00,0x00,0x00,0x06,
     /* 1280x720 */
-    0x0E,0xE0,0x00,0x05,0xD0,0x02,0x80,0x05,0x26,0x03,0x10,0x00,0x02,
+    0x0E,0xE0,0x00,0x05,0xD0,0x02,0x80,0x05,0x26,0x03,0x10,0x00,0x20,
     0x00,0x01,0x00,0x06,0x00,0x45,0x9C,0x62,0x00,0x00,0x00,0x00,0x05,
-    /* 1280x800 */
-    0x0C,0xE0,0x00,0x05,0x20,0x03,0x80,0x05,0x30,0x03,0x10,0x00,0x40,
-    0x00,0x04,0x00,0x03,0x00,0x45,0x9C,0x62,0x00,0x00,0x00,0x00,0x07,
+    /* 1280x800 (_2) */
+    0x0C,0xE0,0x00,0x05,0x20,0x03,0x10,0x06,0x2C,0x03,0x30,0x00,0x70,
+    0x00,0x04,0x00,0x03,0x00,0x49,0xCE,0x1E,0x00,0x00,0x00,0x00,0x09,
     /* 1680x1050 */
     0x0D,0xE0,0x90,0x06,0x1A,0x04,0x6C,0x07,0x2A,0x04,0x1A,0x00,0x4C,
     0x00,0x03,0x00,0x06,0x00,0x79,0xBE,0x44,0x00,0x00,0x00,0x00,0x06,
-    /* 1280x768 (not in 0.93) */
-    0x0A,0xC0,0x00,0x05,0x00,0x03,0x80,0x06,0x1E,0x03,0x40,0x00,0x80,
-    0x00,0x03,0x00,0x07,0x00,0x4F,0x00,0x00,0x00,0x00,0x00,0x00,0x06
 };
 #endif
 
@@ -308,8 +301,8 @@
 BOOLEAN	SiS_IsVAMode(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
 void	SiS_SetChrontelGPIO(SiS_Private *SiS_Pr, USHORT myvbinfo);
 void	SiS_GetVBInfo(SiS_Private *SiS_Pr, USHORT ModeNo,
-              USHORT ModeIdIndex,PSIS_HW_INFO HwInfo,
-	      int checkcrt2mode);
+              	USHORT ModeIdIndex, PSIS_HW_INFO HwInfo,
+	      	int checkcrt2mode);
 void	SiS_SetYPbPr(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
 void    SiS_SetTVMode(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex, PSIS_HW_INFO HwInfo);
 void	SiS_GetLCDResInfo(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex, PSIS_HW_INFO HwInfo);
@@ -330,58 +323,61 @@
 USHORT 	SiS_GetCH70xx(SiS_Private *SiS_Pr, USHORT tempax);
 void   	SiS_SetCH70xxANDOR(SiS_Private *SiS_Pr, USHORT tempax,USHORT tempbh);
 #ifdef SIS315H
-void   	SiS_Chrontel701xOn(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
-void   	SiS_Chrontel701xOff(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
-void   	SiS_ChrontelInitTVVSync(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
-void   	SiS_ChrontelDoSomething1(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
+static void   	SiS_Chrontel701xOn(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
+static void   	SiS_Chrontel701xOff(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
+static void   	SiS_ChrontelInitTVVSync(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
+static void  	SiS_ChrontelDoSomething1(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
 void   	SiS_Chrontel701xBLOn(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
 void   	SiS_Chrontel701xBLOff(SiS_Private *SiS_Pr);
 #endif /* 315 */
+
 #ifdef SIS300
-void    SiS_SetTrumpReg(SiS_Private *SiS_Pr, USHORT tempbx);
-USHORT  SiS_GetTrumpReg(SiS_Private *SiS_Pr, USHORT tempbx);
-static  BOOLEAN SiS_SetTrumpionBlock(SiS_Private *SiS_Pr, UCHAR *dataptr);
+#if 0
+static  void    SiS_SetTrumpReg(SiS_Private *SiS_Pr, USHORT tempbx);
+static  USHORT  SiS_GetTrumpReg(SiS_Private *SiS_Pr, USHORT tempbx);
+#endif
+static  BOOLEAN	SiS_SetTrumpionBlock(SiS_Private *SiS_Pr, UCHAR *dataptr);
 #endif
 
-USHORT  SiS_ReadDDC1Bit(SiS_Private *SiS_Pr);
-void    SiS_SetSwitchDDC2(SiS_Private *SiS_Pr);
-USHORT  SiS_SetStart(SiS_Private *SiS_Pr);
-USHORT  SiS_SetStop(SiS_Private *SiS_Pr);
 void    SiS_DDC2Delay(SiS_Private *SiS_Pr, USHORT delaytime);
-USHORT  SiS_SetSCLKLow(SiS_Private *SiS_Pr);
-USHORT  SiS_SetSCLKHigh(SiS_Private *SiS_Pr);
-USHORT  SiS_ReadDDC2Data(SiS_Private *SiS_Pr, USHORT tempax);
-USHORT  SiS_WriteDDC2Data(SiS_Private *SiS_Pr, USHORT tempax);
-USHORT  SiS_CheckACK(SiS_Private *SiS_Pr);
-
-USHORT  SiS_InitDDCRegs(SiS_Private *SiS_Pr, unsigned long VBFlags, int VGAEngine,
-                        USHORT adaptnum, USHORT DDCdatatype, BOOLEAN checkcr32);
-USHORT  SiS_WriteDABDDC(SiS_Private *SiS_Pr);
-USHORT  SiS_PrepareReadDDC(SiS_Private *SiS_Pr);
-USHORT  SiS_PrepareDDC(SiS_Private *SiS_Pr);
-void    SiS_SendACK(SiS_Private *SiS_Pr, USHORT yesno);
-USHORT  SiS_DoProbeDDC(SiS_Private *SiS_Pr);
-USHORT  SiS_ProbeDDC(SiS_Private *SiS_Pr);
-USHORT  SiS_ReadDDC(SiS_Private *SiS_Pr, USHORT DDCdatatype, unsigned char *buffer);
-USHORT  SiS_HandleDDC(SiS_Private *SiS_Pr, unsigned long VBFlags, int VGAEngine,
-		      USHORT adaptnum, USHORT DDCdatatype, unsigned char *buffer);
+USHORT  SiS_ReadDDC1Bit(SiS_Private *SiS_Pr);
+USHORT  SiS_HandleDDC(SiS_Private *SiS_Pr, ULONG VBFlags, int VGAEngine,
+		      USHORT adaptnum, USHORT DDCdatatype, UCHAR *buffer);
 #ifdef LINUX_XF86
 USHORT  SiS_SenseLCDDDC(SiS_Private *SiS_Pr, SISPtr pSiS);
 USHORT  SiS_SenseVGA2DDC(SiS_Private *SiS_Pr, SISPtr pSiS);
 #endif
 
+static void    	SiS_SetSwitchDDC2(SiS_Private *SiS_Pr);
+static USHORT  	SiS_SetStart(SiS_Private *SiS_Pr);
+static USHORT  	SiS_SetStop(SiS_Private *SiS_Pr);
+static USHORT  	SiS_SetSCLKLow(SiS_Private *SiS_Pr);
+static USHORT  	SiS_SetSCLKHigh(SiS_Private *SiS_Pr);
+static USHORT  	SiS_ReadDDC2Data(SiS_Private *SiS_Pr, USHORT tempax);
+static USHORT  	SiS_WriteDDC2Data(SiS_Private *SiS_Pr, USHORT tempax);
+static USHORT  	SiS_CheckACK(SiS_Private *SiS_Pr);
+static USHORT  	SiS_InitDDCRegs(SiS_Private *SiS_Pr, ULONG VBFlags, int VGAEngine,
+                        USHORT adaptnum, USHORT DDCdatatype, BOOLEAN checkcr32);
+static USHORT  	SiS_WriteDABDDC(SiS_Private *SiS_Pr);
+static USHORT  	SiS_PrepareReadDDC(SiS_Private *SiS_Pr);
+static USHORT  	SiS_PrepareDDC(SiS_Private *SiS_Pr);
+static void    	SiS_SendACK(SiS_Private *SiS_Pr, USHORT yesno);
+static USHORT  	SiS_DoProbeDDC(SiS_Private *SiS_Pr);
+static USHORT  	SiS_ProbeDDC(SiS_Private *SiS_Pr);
+static USHORT  	SiS_ReadDDC(SiS_Private *SiS_Pr, USHORT DDCdatatype, UCHAR *buffer);
+
 #ifdef SIS315H
-void    SiS_OEM310Setting(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,
-                          USHORT ModeNo,USHORT ModeIdIndex);
-void    SiS_OEM661Setting(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,
-                          USHORT ModeNo,USHORT ModeIdIndex, USHORT RRTI);
-void    SiS_FinalizeLCD(SiS_Private *, USHORT, USHORT, PSIS_HW_INFO);
+static void    	SiS_OEM310Setting(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,
+                        USHORT ModeNo,USHORT ModeIdIndex, USHORT RRTI);
+static void    	SiS_OEM661Setting(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,
+                        USHORT ModeNo,USHORT ModeIdIndex, USHORT RRTI);
+static void    	SiS_FinalizeLCD(SiS_Private *, USHORT, USHORT, PSIS_HW_INFO);
 #endif
 #ifdef SIS300
-void    SiS_OEM300Setting(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,
-                          USHORT ModeNo, USHORT ModeIdIndex, USHORT RefTabindex);
-void    SetOEMLCDData2(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,
-		       USHORT ModeNo, USHORT ModeIdIndex,USHORT RefTableIndex);
+static void    	SiS_OEM300Setting(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,
+                        USHORT ModeNo, USHORT ModeIdIndex, USHORT RefTabindex);
+static void    	SetOEMLCDData2(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,
+		        USHORT ModeNo, USHORT ModeIdIndex,USHORT RefTableIndex);
 #endif
 
 extern void     SiS_SetReg(SISIOADDRESS, USHORT, USHORT);
@@ -392,23 +388,23 @@
 extern UCHAR    SiS_GetRegByte(SISIOADDRESS);
 extern USHORT   SiS_GetRegShort(SISIOADDRESS);
 extern ULONG    SiS_GetRegLong(SISIOADDRESS);
-extern void     SiS_SetRegANDOR(SISIOADDRESS Port,USHORT Index,USHORT DataAND,USHORT DataOR);
-extern void     SiS_SetRegOR(SISIOADDRESS Port,USHORT Index,USHORT DataOR);
-extern void     SiS_SetRegAND(SISIOADDRESS Port,USHORT Index,USHORT DataAND);
-
+extern void     SiS_SetRegANDOR(SISIOADDRESS, USHORT, USHORT, USHORT);
+extern void     SiS_SetRegOR(SISIOADDRESS, USHORT, USHORT);
+extern void     SiS_SetRegAND(SISIOADDRESS, USHORT, USHORT);
 extern void     SiS_DisplayOff(SiS_Private *SiS_Pr);
 extern void     SiS_DisplayOn(SiS_Private *SiS_Pr);
-
 extern BOOLEAN  SiS_SearchModeID(SiS_Private *, USHORT *, USHORT *);
-extern UCHAR    SiS_GetModePtr(SiS_Private *SiS_Pr, USHORT ModeNo,USHORT ModeIdIndex);
-
-extern USHORT   SiS_GetColorDepth(SiS_Private *SiS_Pr,USHORT ModeNo,USHORT ModeIdIndex);
-extern USHORT   SiS_GetOffset(SiS_Private *SiS_Pr,USHORT ModeNo,USHORT ModeIdIndex,
-                              USHORT RefreshRateTableIndex,PSIS_HW_INFO HwInfo);
-
-extern void     SiS_LoadDAC(SiS_Private *SiS_Pr, PSIS_HW_INFO,USHORT ModeNo,
-                            USHORT ModeIdIndex);
-
-extern void	SiS_CalcLCDACRT1Timing(SiS_Private *SiS_Pr,USHORT ModeNo,USHORT ModeIdIndex);
+extern UCHAR    SiS_GetModePtr(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex);
+extern USHORT   SiS_GetColorDepth(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex);
+extern USHORT   SiS_GetOffset(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex,
+                      	USHORT RefreshRateTableIndex, PSIS_HW_INFO HwInfo);
+extern void     SiS_LoadDAC(SiS_Private *SiS_Pr, PSIS_HW_INFO, USHORT ModeNo,
+                        USHORT ModeIdIndex);
+extern void	SiS_CalcLCDACRT1Timing(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex);
+#ifdef LINUX_XF86
+extern void     SiS_MakeClockRegs(ScrnInfoPtr pScrn, int clock, UCHAR *p2b, UCHAR *p2c);
+extern int 	SiS_FindPanelFromDB(SISPtr pSiS, USHORT panelvendor, USHORT panelproduct,
+			int *maxx, int *maxy, int *prefx, int *prefy);
+#endif
 
 #endif
diff -Nru a/drivers/video/sis/initdef.h b/drivers/video/sis/initdef.h
--- a/drivers/video/sis/initdef.h	2005-01-10 20:11:20 -08:00
+++ b/drivers/video/sis/initdef.h	2005-01-10 20:11:20 -08:00
@@ -35,7 +35,7 @@
  * * 3) The name of the author may not be used to endorse or promote products
  * *    derived from this software without specific prior written permission.
  * *
- * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESSED OR
+ * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  * * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  * * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
@@ -80,6 +80,7 @@
 #define VB_SIS302LV     	0x0010
 #define VB_SIS302ELV		0x0020
 #define VB_SIS301C              0x0040
+#define VB_UMC			0x4000
 #define VB_NoLCD        	0x8000
 #define VB_SIS301BLV302BLV      (VB_SIS301B|VB_SIS301C|VB_SIS302B|VB_SIS301LV|VB_SIS302LV|VB_SIS302ELV)
 #define VB_SIS301B302B          (VB_SIS301B|VB_SIS301C|VB_SIS302B)
@@ -87,6 +88,9 @@
 #define VB_SISVB		(VB_SIS301 | VB_SIS301BLV302BLV)
 #define VB_SISTMDS		(VB_SIS301 | VB_SIS301B302B)
 #define VB_SISLVDS		VB_SIS301LV302LV
+#define VB_SISLCDA		(VB_SIS302B|VB_SIS301C|VB_SIS301LV|VB_SIS302LV|VB_SIS302ELV)
+#define VB_SISYPBPR		(VB_SIS301C|VB_SIS301LV|VB_SIS302LV|VB_SIS302ELV)
+#define VB_SISHIVISION		(VB_SIS301|VB_SIS301B|VB_SIS302B)
 
 /* VBInfo */
 #define SetSimuScanMode         0x0001   /* CR 30 */
@@ -126,7 +130,7 @@
 #define Mode24Bpp               0x06
 #define Mode32Bpp               0x07
 
-#define ModeInfoFlag            0x07
+#define ModeTypeMask            0x07
 #define IsTextMode              0x07
 
 #define DACInfoFlag             0x0018
@@ -139,7 +143,7 @@
 #define CRT2Mode                0x0800
 #define HalfDCLK                0x1000
 #define NoSupportSimuTV         0x2000
-#define NoSupportLCDScale	0x4000 /* TMDS: No scaling possible (no matter what panel) */
+#define NoSupportLCDScale	0x4000 /* SiS bridge: No scaling possible (no matter what panel) */
 #define DoubleScanMode          0x8000
 
 /* Infoflag */
@@ -402,17 +406,18 @@
 #define Panel_1400x1050         0x09
 #define Panel_1280x768          0x0a    /* 30xB/C and LVDS only (BIOS: all) */
 #define Panel_1600x1200         0x0b
-#define Panel_1280x800		0x0c    /* 661etc  */
+#define Panel_1280x800		0x0c    /* 661etc (TMDS) */
 #define Panel_1680x1050         0x0d    /* 661etc  */
 #define Panel_1280x720		0x0e    /* 661etc  */
-#define Panel_Custom		0x0f	/* MUST BE 0x0f (for DVI DDC detection */
+#define Panel_Custom		0x0f	/* MUST BE 0x0f (for DVI DDC detection) */
 #define Panel_320x480           0x10    /* SiS 550 fstn - TW: This is fake, can be any */
 #define Panel_Barco1366         0x11
 #define Panel_848x480		0x12
 #define Panel_640x480_2		0x13    /* SiS 550 */
 #define Panel_640x480_3		0x14    /* SiS 550 */
 #define Panel_1280x768_2        0x15	/* 30xLV */
-#define Panel_1280x768_3        0x16    /* 30xLV */
+#define Panel_1280x768_3        0x16    /* (unused) */
+#define Panel_1280x800_2	0x17    /* 30xLV */
 
 /* Index in ModeResInfo table */
 #define SIS_RI_320x200    0
@@ -448,6 +453,7 @@
 #define SIS_RI_1280x800  30
 #define SIS_RI_1920x1080 31
 #define SIS_RI_960x540   32
+#define SIS_RI_960x600   33
 
 /* CR5F */
 #define IsM650                  0x80
@@ -475,7 +481,7 @@
 #define VCLK108_3_300           0x42   /* Index in VCLKData table (300) */
 #define VCLK100_300             0x43   /* Index in VCLKData table (300) */
 #define VCLK34_300              0x3d   /* Index in VCLKData table (300) */
-#define VCLK_CUSTOM_300		0x46
+#define VCLK_CUSTOM_300		0x47
 #define VCLK65_315              0x0b   /* Index in (VB)VCLKData table (315) */
 #define VCLK108_2_315           0x19   /* Index in (VB)VCLKData table (315) */
 #define VCLK81_315		0x5b   /* Index in (VB)VCLKData table (315) */
@@ -484,12 +490,11 @@
 #define VCLK100_315             0x46   /* Index in VBVCLKData table (315) */
 #define VCLK34_315              0x55
 #define VCLK68_315		0x0d
-#define VCLK69_315		0x5c   /* deprecated ! Index in VBVCLKData table (315) */
-#define VCLK83_315		0x5c   /* Index in VBVCLKData table (315) */
+#define VCLK_1280x800_315_2	0x5c   /* Index in VBVCLKData table (315) */
 #define VCLK121_315		0x5d   /* Index in VBVCLKData table (315) */
 #define VCLK_1280x720		0x5f
 #define VCLK_1280x768_2		0x60
-#define VCLK_1280x768_3		0x61
+#define VCLK_1280x768_3		0x61   /* (unused?) */
 #define VCLK_CUSTOM_315		0x62
 #define VCLK_1280x720_2		0x63
 #define VCLK_720x480		0x67
@@ -501,6 +506,7 @@
 #define VCLK_1024x576		0x51
 #define VCLK_1152x864		0x64
 #define VCLK_1360x768		0x58
+#define VCLK_1280x800_315	0x6c
 
 #define TVCLKBASE_300		0x21   /* Indices on TV clocks in VCLKData table (300) */
 #define TVCLKBASE_315	        0x3a   /* Indices on TV clocks in (VB)VCLKData table (315) */
diff -Nru a/drivers/video/sis/oem300.h b/drivers/video/sis/oem300.h
--- a/drivers/video/sis/oem300.h	2005-01-10 20:11:17 -08:00
+++ b/drivers/video/sis/oem300.h	2005-01-10 20:11:17 -08:00
@@ -35,7 +35,7 @@
  * * 3) The name of the author may not be used to endorse or promote products
  * *    derived from this software without specific prior written permission.
  * *
- * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESSED OR
+ * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  * * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  * * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
@@ -50,7 +50,7 @@
  *
  */
 
-const UCHAR SiS300_OEMTVDelay301[8][4] =
+static const UCHAR SiS300_OEMTVDelay301[8][4] =
 {
 	{0x08,0x08,0x08,0x08},
 	{0x08,0x08,0x08,0x08},
@@ -62,7 +62,7 @@
 	{0x20,0x20,0x20,0x20}
 };
 
-const UCHAR SiS300_OEMTVDelayLVDS[8][4] =
+static const UCHAR SiS300_OEMTVDelayLVDS[8][4] =
 {
 	{0x20,0x20,0x20,0x20},
 	{0x20,0x20,0x20,0x20},
@@ -74,7 +74,7 @@
 	{0x20,0x20,0x20,0x20}
 };
 
-const UCHAR SiS300_OEMTVFlicker[8][4] =
+static const UCHAR SiS300_OEMTVFlicker[8][4] =
 {
 	{0x00,0x00,0x00,0x00},
 	{0x00,0x00,0x00,0x00},
@@ -87,7 +87,7 @@
 };
 
 #if 0   /* TW: Not used */
-const UCHAR SiS300_OEMLCDDelay1[12][4]={
+static const UCHAR SiS300_OEMLCDDelay1[12][4]={
 	{0x2c,0x2c,0x2c,0x2c},
 	{0x20,0x20,0x20,0x20},
 	{0x20,0x20,0x20,0x20},
@@ -103,8 +103,8 @@
 };
 #endif
 
-/* TW: From 630/301B BIOS */
-const UCHAR SiS300_OEMLCDDelay2[64][4] =		 /* for 301/301b/302b/301LV/302LV */
+/* From 630/301B BIOS */
+static const UCHAR SiS300_OEMLCDDelay2[64][4] =		 /* for 301/301b/302b/301LV/302LV */
 {
 	{0x20,0x20,0x20,0x20},
 	{0x20,0x20,0x20,0x20},
@@ -172,8 +172,8 @@
 	{0x20,0x20,0x20,0x20}
 };
 
-/* TW: From 300/301LV BIOS */
-const UCHAR SiS300_OEMLCDDelay4[12][4] =
+/* From 300/301LV BIOS */
+static const UCHAR SiS300_OEMLCDDelay4[12][4] =
 {
 	{0x2c,0x2c,0x2c,0x2c},
 	{0x20,0x20,0x20,0x20},
@@ -189,8 +189,8 @@
 	{0x24,0x24,0x24,0x24}
 };
 
-/* TW: From 300/301LV BIOS */
-const UCHAR SiS300_OEMLCDDelay5[32][4] =
+/* From 300/301LV BIOS */
+static const UCHAR SiS300_OEMLCDDelay5[32][4] =
 {
 	{0x20,0x20,0x20,0x20},
 	{0x20,0x20,0x20,0x20},
@@ -226,8 +226,8 @@
 	{0x20,0x20,0x20,0x20},
 };
 
-/* TW: Added for LVDS */
-const UCHAR SiS300_OEMLCDDelay3[64][4] = {	/* For LVDS */
+/* Added for LVDS */
+static const UCHAR SiS300_OEMLCDDelay3[64][4] = {	/* For LVDS */
 	{0x20,0x20,0x20,0x20},
 	{0x20,0x20,0x20,0x20},
 	{0x20,0x20,0x20,0x20},
@@ -294,7 +294,7 @@
 	{0x20,0x20,0x20,0x20}
 };
 
-const UCHAR SiS300_Phase1[8][5][4] =
+static const UCHAR SiS300_Phase1[8][5][4] =
 {
     {
 	{0x21,0xed,0x00,0x08},
@@ -355,7 +355,7 @@
 };
 
 
-const UCHAR SiS300_Phase2[8][5][4] =
+static const UCHAR SiS300_Phase2[8][5][4] =
 {
     {
         {0x21,0xed,0x00,0x08},
@@ -415,7 +415,7 @@
     }
 };
 
-const UCHAR SiS300_Filter1[10][16][4] =
+static const UCHAR SiS300_Filter1[10][16][4] =
 {
     {
 	{0x00,0xf4,0x10,0x38},
@@ -599,7 +599,7 @@
     },
 };
 
-const UCHAR SiS300_Filter2[10][9][7] =
+static const UCHAR SiS300_Filter2[10][9][7] =
 {
     {
 	{0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46},
@@ -714,7 +714,7 @@
 };
 
 /* Custom data for Barco iQ Pro R300 */
-const UCHAR barco_p1[2][9][7][3] = {
+static const UCHAR barco_p1[2][9][7][3] = {
     {
 	{  { 0x16, 0xcf, 0x00 },
 	   { 0x18, 0x00, 0x00 },
diff -Nru a/drivers/video/sis/oem310.h b/drivers/video/sis/oem310.h
--- a/drivers/video/sis/oem310.h	2005-01-10 20:11:15 -08:00
+++ b/drivers/video/sis/oem310.h	2005-01-10 20:11:15 -08:00
@@ -35,7 +35,7 @@
  * * 3) The name of the author may not be used to endorse or promote products
  * *    derived from this software without specific prior written permission.
  * *
- * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESSED OR
+ * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  * * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  * * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
diff -Nru a/drivers/video/sis/osdef.h b/drivers/video/sis/osdef.h
--- a/drivers/video/sis/osdef.h	2005-01-10 20:11:15 -08:00
+++ b/drivers/video/sis/osdef.h	2005-01-10 20:11:15 -08:00
@@ -35,7 +35,7 @@
  * * 3) The name of the author may not be used to endorse or promote products
  * *    derived from this software without specific prior written permission.
  * *
- * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESSED OR
+ * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  * * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  * * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
@@ -51,9 +51,12 @@
  *
  */
 
+#ifndef _SIS_OSDEF_H_
+#define _SIS_OSDEF_H_
+
 /* The choices are: */
-#define LINUX_KERNEL	   /* Kernel framebuffer */
-/* #define LINUX_XF86 */   /* XFree86 */
+#define LINUX_KERNEL	   /* Linux kernel framebuffer */
+/* #define LINUX_XF86 */   /* XFree86/X.org */
 
 #ifdef OutPortByte
 #undef OutPortByte
@@ -109,20 +112,20 @@
 #endif
 
 /**********************************************************************/
-/*  XFree86, X.org                                                    */
+/*  XFree86/X.org                                                    */
 /**********************************************************************/
 
 #ifdef LINUX_XF86
 #define SIS300
 #define SIS315H
 
-#define OutPortByte(p,v) outb((IOADDRESS)(p),(CARD8)(v))
-#define OutPortWord(p,v) outw((IOADDRESS)(p),(CARD16)(v))
-#define OutPortLong(p,v) outl((IOADDRESS)(p),(CARD32)(v))
-#define InPortByte(p)    inb((IOADDRESS)(p))
-#define InPortWord(p)    inw((IOADDRESS)(p))
-#define InPortLong(p)    inl((IOADDRESS)(p))
+#define OutPortByte(p,v) outSISREG((IOADDRESS)(p),(CARD8)(v))
+#define OutPortWord(p,v) outSISREGW((IOADDRESS)(p),(CARD16)(v))
+#define OutPortLong(p,v) outSISREGL((IOADDRESS)(p),(CARD32)(v))
+#define InPortByte(p)    inSISREG((IOADDRESS)(p))
+#define InPortWord(p)    inSISREGW((IOADDRESS)(p))
+#define InPortLong(p)    inSISREGL((IOADDRESS)(p))
 #define SiS_SetMemory(MemoryAddress,MemorySize,value) memset(MemoryAddress, value, MemorySize)
 #endif
 
-
+#endif  /* _OSDEF_H_ */
diff -Nru a/drivers/video/sis/sis.h b/drivers/video/sis/sis.h
--- a/drivers/video/sis/sis.h	2005-01-10 20:11:20 -08:00
+++ b/drivers/video/sis/sis.h	2005-01-10 20:11:20 -08:00
@@ -1,5 +1,5 @@
 /*
- * SiS 300/630/730/540/315/550/650/651/M650/661FX/M661FX/740/741/330/760
+ * SiS 300/630/730/540/315/550/[M]650/651/[M]661[FM]X/740/[M]741[GX]/330/[M]760[GX]
  * frame buffer driver for Linux kernels >=2.4.14 and >=2.6.3
  *
  * Copyright (C) 2001-2004 Thomas Winischhofer, Vienna, Austria.
@@ -37,7 +37,7 @@
 
 #define VER_MAJOR                 1
 #define VER_MINOR                 7
-#define VER_LEVEL                 12
+#define VER_LEVEL                 17
 
 #undef SIS_CONFIG_COMPAT
 
@@ -55,6 +55,16 @@
 #endif
 #endif
 
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,8)
+#define SIS_IOTYPE1 void __iomem
+#define SIS_IOTYPE2 __iomem
+#define SISINITSTATIC static
+#else
+#define SIS_IOTYPE1 unsigned char
+#define SIS_IOTYPE2
+#define SISINITSTATIC
+#endif
+
 #undef SISFBDEBUG
 
 #ifdef SISFBDEBUG
@@ -180,6 +190,7 @@
 #define SIS_CRT2_WENABLE_315 	  0x2F
 
 #define SIS_PASSWORD              0x86  /* SR05 */
+
 #define SIS_INTERLACED_MODE       0x20  /* SR06 */
 #define SIS_8BPP_COLOR_MODE       0x0
 #define SIS_15BPP_COLOR_MODE      0x1
@@ -238,41 +249,58 @@
 #define HW_DEVICE_EXTENSION	  SIS_HW_INFO
 #define PHW_DEVICE_EXTENSION      PSIS_HW_INFO
 
-/* Useful macros */
+/* I/O port access macros */
 #define inSISREG(base)          inb(base)
+
 #define outSISREG(base,val)     outb(val,base)
-#define orSISREG(base,val)      do { \
-                                  u8 __Temp = inb(base); \
-                                  outSISREG(base, __Temp | (val)); \
-                                } while (0)
-#define andSISREG(base,val)     do { \
-                                  u8 __Temp = inb(base); \
-                                  outSISREG(base, __Temp & (val)); \
-                                } while (0)
-#define inSISIDXREG(base,idx,var)   do { \
-                                      outb(idx,base); var=inb((base)+1); \
-                                    } while (0)
-#define outSISIDXREG(base,idx,val)  do { \
-                                      outb(idx,base); outb((val),(base)+1); \
-                                    } while (0)
-#define orSISIDXREG(base,idx,val)   do { \
-                                      u8 __Temp; \
-                                      outb(idx,base);   \
-                                      __Temp = inb((base)+1)|(val); \
-                                      outSISIDXREG(base,idx,__Temp); \
-                                    } while (0)
-#define andSISIDXREG(base,idx,and)  do { \
-                                      u8 __Temp; \
-                                      outb(idx,base);   \
-                                      __Temp = inb((base)+1)&(and); \
-                                      outSISIDXREG(base,idx,__Temp); \
-                                    } while (0)
-#define setSISIDXREG(base,idx,and,or)   do { \
-                                          u8 __Temp; \
-                                          outb(idx,base);   \
-                                          __Temp = (inb((base)+1)&(and))|(or); \
-                                          outSISIDXREG(base,idx,__Temp); \
-                                        } while (0)
+
+#define orSISREG(base,val)      			\
+		    do { 				\
+                      u8 __Temp = inSISREG(base); 	\
+                      outSISREG(base, __Temp | (val)); 	\
+                    } while (0)
+
+#define andSISREG(base,val)     			\
+		    do { 				\
+                      u8 __Temp = inSISREG(base); 	\
+                      outSISREG(base, __Temp & (val)); 	\
+                    } while (0)
+
+#define inSISIDXREG(base,idx,var)   		\
+		    do { 			\
+                      outSISREG(base, idx); 	\
+		      var = inSISREG((base)+1);	\
+                    } while (0)
+
+#define outSISIDXREG(base,idx,val)  		\
+		    do { 			\
+                      outSISREG(base, idx); 	\
+		      outSISREG((base)+1, val); \
+                    } while (0)
+
+#define orSISIDXREG(base,idx,val)   				\
+		    do { 					\
+                      u8 __Temp; 				\
+                      outSISREG(base, idx);   			\
+                      __Temp = inSISREG((base)+1) | (val); 	\
+		      outSISREG((base)+1, __Temp);		\
+                    } while (0)
+
+#define andSISIDXREG(base,idx,and)  				\
+		    do { 					\
+                      u8 __Temp; 				\
+                      outSISREG(base, idx);   			\
+                      __Temp = inSISREG((base)+1) & (and); 	\
+		      outSISREG((base)+1, __Temp);		\
+                    } while (0)
+
+#define setSISIDXREG(base,idx,and,or)   		   		\
+		    do { 				   		\
+                      u8 __Temp; 		   			\
+                      outSISREG(base, idx);   		   		\
+                      __Temp = (inSISREG((base)+1) & (and)) | (or); 	\
+		      outSISREG((base)+1, __Temp);			\
+                    } while (0)
 
 /* MMIO access macros */
 #define MMIO_IN8(base, offset)  readb((base+offset))
@@ -293,10 +321,52 @@
 #define MMIO_QUEUE_WRITEPORT    Q_WRITE_PTR
 #define MMIO_QUEUE_READPORT     Q_READ_PTR
 
+#ifndef FB_BLANK_UNBLANK
+#define FB_BLANK_UNBLANK 	0
+#endif
+#ifndef FB_BLANK_NORMAL
+#define FB_BLANK_NORMAL  	1
+#endif
+#ifndef FB_BLANK_VSYNC_SUSPEND
+#define FB_BLANK_VSYNC_SUSPEND 	2
+#endif
+#ifndef FB_BLANK_HSYNC_SUSPEND
+#define FB_BLANK_HSYNC_SUSPEND 	3
+#endif
+#ifndef FB_BLANK_POWERDOWN
+#define FB_BLANK_POWERDOWN 	4
+#endif
+
+enum _SIS_LCD_TYPE {
+    LCD_INVALID = 0,
+    LCD_800x600,
+    LCD_1024x768,
+    LCD_1280x1024,
+    LCD_1280x960,
+    LCD_640x480,
+    LCD_1600x1200,
+    LCD_1920x1440,
+    LCD_2048x1536,
+    LCD_320x480,       /* FSTN */
+    LCD_1400x1050,
+    LCD_1152x864,
+    LCD_1152x768,
+    LCD_1280x768,
+    LCD_1024x600,
+    LCD_640x480_2,     /* DSTN */
+    LCD_640x480_3,     /* DSTN */
+    LCD_848x480,
+    LCD_1280x800,
+    LCD_1680x1050,
+    LCD_1280x720,
+    LCD_CUSTOM,
+    LCD_UNKNOWN
+};
+
 enum _SIS_CMDTYPE {
-	MMIO_CMD = 0,
-	AGP_CMD_QUEUE,
-	VM_CMD_QUEUE,
+    MMIO_CMD = 0,
+    AGP_CMD_QUEUE,
+    VM_CMD_QUEUE,
 };
 typedef unsigned int SIS_CMDTYPE;
 
@@ -360,10 +430,10 @@
 	unsigned long 	mmio_base;
 	unsigned long 	vga_base;
 
-	void __iomem *	video_vbase;
-	void __iomem *	mmio_vbase;
-	void __iomem * 	bios_vbase;
-	void *		bios_abase;
+	SIS_IOTYPE1  	*video_vbase;
+	SIS_IOTYPE1 	*mmio_vbase;
+
+	unsigned char   *bios_abase;
 
 	int 		mtrr;
 
@@ -391,9 +461,9 @@
 	int		sisfb_inverse;
 #endif
 
-	u32 		heapstart;        /* offset  */
-	void __iomem * 	sisfb_heap_start; /* address */
-	void __iomem * 	sisfb_heap_end;   /* address */
+	u32 		heapstart;        	/* offset  */
+	SIS_IOTYPE1  	*sisfb_heap_start; 	/* address */
+	SIS_IOTYPE1  	*sisfb_heap_end;   	/* address */
 	u32 	      	sisfb_heap_size;
 	int		havenoheap;
 #if 0
@@ -434,6 +504,7 @@
 
 	int		lcdxres, lcdyres;
 	int		lcddefmodeidx, tvdefmodeidx, defmodeidx;
+	u32  		CRT2LCDType;        	/* defined in "SIS_LCD_TYPE" */
 
 	int    		current_bpp;
 	int    		current_width;
@@ -455,6 +526,7 @@
 
 	int  		newrom;
 	int  		registered;
+	int		warncount;
 #ifdef SIS_CONFIG_COMPAT
 	int		ioctl32registered;
 	int		ioctl32vblankregistered;
@@ -469,7 +541,7 @@
 	u8 		detectedpdca;
 	u8 		detectedlcda;
 
-	void __iomem * 	hwcursor_vbase;
+	SIS_IOTYPE1 	*hwcursor_vbase;
 
 	int 		chronteltype;
 	int    		tvxpos, tvypos;
diff -Nru a/drivers/video/sis/sis_main.c b/drivers/video/sis/sis_main.c
--- a/drivers/video/sis/sis_main.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/video/sis/sis_main.c	2005-01-10 20:11:20 -08:00
@@ -754,8 +754,8 @@
    }
 
    inSISIDXREG(SISPART1, reg, temp);
-   if(temp & 0x02) return FALSE;
-   else 	   return TRUE;
+   if(temp & 0x02) return TRUE;
+   else 	   return FALSE;
 }
 
 static BOOLEAN
@@ -794,9 +794,9 @@
       inSISIDXREG(SISPART1,(idx+1),reg2); /* 31 */
       inSISIDXREG(SISPART1,(idx+2),reg3); /* 32 */
       inSISIDXREG(SISPART1,(idx+3),reg4); /* 33 */
-      if(!(reg1 & 0x01)) ret |= FB_VBLANK_VBLANKING;
-      if(!(reg1 & 0x02)) ret |= FB_VBLANK_VSYNCING;
-      if(!(reg4 & 0x80)) ret |= FB_VBLANK_HBLANKING;
+      if(reg1 & 0x01) ret |= FB_VBLANK_VBLANKING;
+      if(reg1 & 0x02) ret |= FB_VBLANK_VSYNCING;
+      if(reg4 & 0x80) ret |= FB_VBLANK_HBLANKING;
       (*vcount) = reg3 | ((reg4 & 0x70) << 4);
       (*hcount) = reg2 | ((reg4 & 0x0f) << 8);
    } else if(sisfballowretracecrt1(ivideo)) {
@@ -824,7 +824,7 @@
    BOOLEAN backlight = TRUE;
 
    switch(blank) {
-   case 0:	/* on */
+   case FB_BLANK_UNBLANK:	/* on */
       sr01  = 0x00;
       sr11  = 0x00;
       sr1f  = 0x00;
@@ -833,7 +833,7 @@
       p1_13 = 0x00;
       backlight = TRUE;
       break;
-   case 1:	/* blank */
+   case FB_BLANK_NORMAL:	/* blank */
       sr01  = 0x20;
       sr11  = 0x00;
       sr1f  = 0x00;
@@ -842,7 +842,7 @@
       p1_13 = 0x00;
       backlight = TRUE;
       break;
-   case 2:	/* no vsync */
+   case FB_BLANK_VSYNC_SUSPEND:	/* no vsync */
       sr01  = 0x20;
       sr11  = 0x08;
       sr1f  = 0x80;
@@ -851,7 +851,7 @@
       p1_13 = 0x80;
       backlight = FALSE;
       break;
-   case 3:	/* no hsync */
+   case FB_BLANK_HSYNC_SUSPEND:	/* no hsync */
       sr01  = 0x20;
       sr11  = 0x08;
       sr1f  = 0x40;
@@ -860,7 +860,7 @@
       p1_13 = 0x40;
       backlight = FALSE;
       break;
-   case 4:	/* off */
+   case FB_BLANK_POWERDOWN:	/* off */
       sr01  = 0x20;
       sr11  = 0x08;
       sr1f  = 0xc0;
@@ -1566,10 +1566,10 @@
         if(con != ivideo->currcon) return;
 
         if(fb_display[con].cmap.len) {
-		fb_set_cmap(&fb_display[con].cmap, sisfb_setcolreg, info);
+		fb_set_cmap(&fb_display[con].cmap, 1, sisfb_setcolreg, info);
         } else {
 		int size = sisfb_get_cmap_len(&fb_display[con].var);
-		fb_set_cmap(fb_default_cmap(size), sisfb_setcolreg, info);
+		fb_set_cmap(fb_default_cmap(size), 1, sisfb_setcolreg, info);
 	}
 }
 
@@ -1812,11 +1812,10 @@
         if((err = sisfb_do_set_var(&info->var, 1, info))) {
 		return err;
 	}
-
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
 	sisfb_get_fix(&info->fix, info->currcon, info);
 #else
-	sisfb_get_fix(&info->fix, -1, info);
+      	sisfb_get_fix(&info->fix, -1, info);
 #endif
 	return 0;
 }
@@ -2054,24 +2053,26 @@
 #endif
 	    struct fb_info *info)
 {
-	struct sis_video_info 	*ivideo = (struct sis_video_info *)info->par;
+	struct sis_video_info	*ivideo = (struct sis_video_info *)info->par;
 	struct sis_memreq 	sismemreq;
 	struct fb_vblank  	sisvbblank;
 	sisfb_info        	x;
 	u32			gpu32 = 0;
-	static int 		count = 0;
-	u32 __user		*argp = (u32 __user *) arg;
+#ifndef __user
+#define __user
+#endif
+	u32 __user 		*argp = (u32 __user *)arg;
 
 	switch (cmd) {
 	   case FBIO_ALLOC:
 		if(!capable(CAP_SYS_RAWIO)) {
 			return -EPERM;
 		}
-		if(copy_from_user(&sismemreq, argp, sizeof(sismemreq))) {
+		if(copy_from_user(&sismemreq, (void __user *)arg, sizeof(sismemreq))) {
 		   	return -EFAULT;
 		}
-        	sis_malloc(&sismemreq);
-		if(copy_to_user(argp, &sismemreq, sizeof(sismemreq))) {
+		sis_malloc(&sismemreq);
+		if(copy_to_user((void __user *)arg, &sismemreq, sizeof(sismemreq))) {
 			sis_free((u32)sismemreq.offset);
 		    	return -EFAULT;
 		}
@@ -2090,7 +2091,7 @@
 	   case FBIOGET_VBLANK:
 		sisvbblank.count = 0;
 		sisvbblank.flags = sisfb_setupvbblankflags(ivideo, &sisvbblank.vcount, &sisvbblank.hcount);
-		if(copy_to_user(argp, &sisvbblank, sizeof(sisvbblank))) {
+		if(copy_to_user((void __user *)arg, &sisvbblank, sizeof(sisvbblank))) {
 			return -EFAULT;
 		}
 		break;
@@ -2099,7 +2100,7 @@
 	        return put_user(sizeof(sisfb_info), argp);
 
 	   case SISFB_GET_INFO_OLD:
-	        if(++count < 50) {
+	        if(ivideo->warncount++ < 50) {
 	           printk(KERN_INFO "sisfb: Deprecated ioctl call received - update your application!\n");
 		}
 	   case SISFB_GET_INFO:  /* For communication with X driver */
@@ -2136,13 +2137,13 @@
 		x.sisfb_tvxpos = (u16)(ivideo->tvxpos + 32);
 		x.sisfb_tvypos = (u16)(ivideo->tvypos + 32);
 
-		if(copy_to_user(argp, &x, sizeof(x))) {
+		if(copy_to_user((void __user *)arg, &x, sizeof(x))) {
 			return -EFAULT;
 		}
 	        break;
 
 	   case SISFB_GET_VBRSTATUS_OLD:
-	   	if(++count < 50) {
+	   	if(ivideo->warncount++ < 50) {
 	           printk(KERN_INFO "sisfb: Deprecated ioctl call received - update your application!\n");
 		}
 	   case SISFB_GET_VBRSTATUS:
@@ -2153,15 +2154,15 @@
 		}
 
 	   case SISFB_GET_AUTOMAXIMIZE_OLD:
-	   	if(++count < 50) {
+	   	if(ivideo->warncount++ < 50) {
 	           printk(KERN_INFO "sisfb: Deprecated ioctl call received - update your application!\n");
 		}
 	   case SISFB_GET_AUTOMAXIMIZE:
-	        if(ivideo->sisfb_max) return put_user((u32)1, argp);
-		else 	              return put_user((u32)0, argp);
+	        if(ivideo->sisfb_max)	return put_user((u32)1, argp);
+		else			return put_user((u32)0, argp);
 
 	   case SISFB_SET_AUTOMAXIMIZE_OLD:
-	   	if(++count < 50) {
+	   	if(ivideo->warncount++ < 50) {
 		   printk(KERN_INFO "sisfb: Deprecated ioctl call received - update your application!\n");
 		}
 	   case SISFB_SET_AUTOMAXIMIZE:
@@ -2180,7 +2181,8 @@
 		break;
 
 	   case SISFB_GET_TVPOSOFFSET:
-	        return put_user((u32)(((ivideo->tvxpos+32)<<16)|((ivideo->tvypos+32)&0xffff)), argp);
+	        return put_user((u32)(((ivideo->tvxpos+32)<<16)|((ivideo->tvypos+32)&0xffff)),
+				argp);
 
 	   case SISFB_SET_LOCK:
 		if(copy_from_user(&gpu32, argp, sizeof(gpu32))) {
@@ -2628,29 +2630,29 @@
 static void __devinit sisfb_sense_crt1(struct sis_video_info *ivideo)
 {
     BOOLEAN mustwait = FALSE;
-    u8  SR1F, CR17;
+    u8  sr1F, cr17;
 #ifdef CONFIG_FB_SIS_315
-    u8  CR63=0;
+    u8  cr63=0;
 #endif
     u16 temp = 0xffff;
     int i;
 
-    inSISIDXREG(SISSR,0x1F,SR1F);
+    inSISIDXREG(SISSR,0x1F,sr1F);
     orSISIDXREG(SISSR,0x1F,0x04);
     andSISIDXREG(SISSR,0x1F,0x3F);
-    if(SR1F & 0xc0) mustwait = TRUE;
+    if(sr1F & 0xc0) mustwait = TRUE;
 
 #ifdef CONFIG_FB_SIS_315
     if(ivideo->sisvga_engine == SIS_315_VGA) {
-       inSISIDXREG(SISCR,ivideo->SiS_Pr.SiS_MyCR63,CR63);
-       CR63 &= 0x40;
+       inSISIDXREG(SISCR,ivideo->SiS_Pr.SiS_MyCR63,cr63);
+       cr63 &= 0x40;
        andSISIDXREG(SISCR,ivideo->SiS_Pr.SiS_MyCR63,0xBF);
     }
 #endif
 
-    inSISIDXREG(SISCR,0x17,CR17);
-    CR17 &= 0x80;
-    if(!CR17) {
+    inSISIDXREG(SISCR,0x17,cr17);
+    cr17 &= 0x80;
+    if(!cr17) {
        orSISIDXREG(SISCR,0x17,0x80);
        mustwait = TRUE;
        outSISIDXREG(SISSR, 0x00, 0x01);
@@ -2695,13 +2697,13 @@
 
 #ifdef CONFIG_FB_SIS_315
     if(ivideo->sisvga_engine == SIS_315_VGA) {
-       setSISIDXREG(SISCR,ivideo->SiS_Pr.SiS_MyCR63,0xBF,CR63);
+       setSISIDXREG(SISCR,ivideo->SiS_Pr.SiS_MyCR63,0xBF,cr63);
     }
 #endif
 
-    setSISIDXREG(SISCR,0x17,0x7F,CR17);
+    setSISIDXREG(SISCR,0x17,0x7F,cr17);
 
-    outSISIDXREG(SISSR,0x1F,SR1F);
+    outSISIDXREG(SISSR,0x1F,sr1F);
 }
 
 /* Determine and detect attached devices on SiS30x */
@@ -3840,7 +3842,7 @@
 }
 
 #ifndef MODULE
-int __init sisfb_setup(char *options)
+SISINITSTATIC int __init sisfb_setup(char *options)
 {
 	char *this_opt;
 	
@@ -3955,19 +3957,22 @@
 }
 #endif
 
-static void __iomem * __devinit sis_find_rom(struct pci_dev *pdev)
+static UCHAR * __devinit sis_find_rom(struct pci_dev *pdev)
 {
 	struct sis_video_info *ivideo = pci_get_drvdata(pdev);
+	USHORT pciid;
+	int    romptr;
+	UCHAR  *myrombase;
+	u32    temp;
+	SIS_IOTYPE1 *rom_base, *rom;
+
+	if(!(myrombase = vmalloc(65536))) return NULL;
 
 #if defined(__i386__) || defined(__x86_64__)
-        u32  segstart;
-	void __iomem *rom_base, *rom;
-        int  romptr;
-	unsigned short pciid;
 
-        for(segstart=0x000c0000; segstart<0x000f0000; segstart+=0x00001000) {
+        for(temp = 0x000c0000; temp < 0x000f0000; temp += 0x00001000) {
 
-            rom_base = ioremap(segstart, 0x10000);
+            rom_base = ioremap(temp, 0x10000);
 	    if(!rom_base) continue;
 
 	    if((readb(rom_base) != 0x55) || (readb(rom_base + 1) != 0xaa)) {
@@ -3996,17 +4001,18 @@
 	    }
 
 	    pciid = readb(rom + 6) | (readb(rom + 7) << 8);
-	    if(pciid == ivideo->chip_id) return rom_base;
+	    if(pciid == ivideo->chip_id) {
+	       memcpy_fromio(myrombase, rom_base, 65536);
+	       iounmap(rom_base);
+	       return myrombase;
+	    }
 
 	    iounmap(rom_base);
         }
+
 #else
-	void __iomem *rom_base, *rom, *myrombase = NULL;
-        int  romptr;
-	unsigned short pciid;
-	u32 backup;
 
-	pci_read_config_dword(pdev, PCI_ROM_ADDRESS, &backup);
+	pci_read_config_dword(pdev, PCI_ROM_ADDRESS, &temp);
 	pci_write_config_dword(pdev, PCI_ROM_ADDRESS,
 			(ivideo->video_base & PCI_ROM_ADDRESS_MASK) | PCI_ROM_ADDRESS_ENABLE);
 
@@ -4022,9 +4028,10 @@
 		    if(pciid == 0x1039) {
 		       pciid = readb(rom + 6) | (readb(rom + 7) << 8);
 		       if(pciid == ivideo->chip_id) {
-		          if((myrombase = vmalloc(65536))) {
-			     memcpy_fromio(myrombase, rom_base, 65536);
-			  }
+			  memcpy_fromio(myrombase, rom_base, 65536);
+			  iounmap(rom_base);
+			  pci_write_config_dword(pdev, PCI_ROM_ADDRESS, temp);
+			  return myrombase;
 		       }
 		    }
 		 }
@@ -4032,15 +4039,17 @@
 	   }
 	   iounmap(rom_base);
 	}
-        pci_write_config_dword(pdev, PCI_ROM_ADDRESS, backup);
-	if(myrombase) return myrombase;
+        pci_write_config_dword(pdev, PCI_ROM_ADDRESS, temp);
+
 #endif
+
+       	vfree(myrombase);
         return NULL;
 }
 
 #ifdef CONFIG_FB_SIS_300
 static int __devinit
-sisfb_chkbuswidth300(struct pci_dev *pdev, void __iomem *FBAddress)
+sisfb_chkbuswidth300(struct pci_dev *pdev, SIS_IOTYPE1 *FBAddress)
 {
 	struct sis_video_info *ivideo = pci_get_drvdata(pdev);
 	int i, j;
@@ -4083,8 +4092,9 @@
 sisfb_setramsize300(struct pci_dev *pdev)
 {
 	struct  sis_video_info *ivideo = pci_get_drvdata(pdev);
-	void __iomem *FBAddr = ivideo->sishw_ext.pjVideoMemoryAddress, *Addr;
-	USHORT 	SR13, SR14=0, buswidth, Done, data, TotalCapacity, PhysicalAdrOtherPage=0;
+  	SIS_IOTYPE1 *FBAddr = ivideo->video_vbase;
+	SIS_IOTYPE1 *Addr;
+	USHORT 	sr13, sr14=0, buswidth, Done, data, TotalCapacity, PhysicalAdrOtherPage=0;
 	int     PseudoRankCapacity, PseudoTotalCapacity, PseudoAdrPinCount;
    	int     RankCapacity, AdrPinCount, BankNumHigh, BankNumMid, MB2Bank;
    	int     PageCapacity, PhysicalAdrHigh, PhysicalAdrHalfPage, i, j, k;
@@ -4141,12 +4151,12 @@
                           andSISIDXREG(SISSR,0x15,0xFB); /* Test */
                           orSISIDXREG(SISSR,0x15,0x04);  /* Test */
                           TotalCapacity = SiS_DRAMType[k][3] * buswidth;
-                          SR13 = SiS_DRAMType[k][4];
-                          if(buswidth == 4) SR14 = (TotalCapacity - 1) | 0x80;
-                          if(buswidth == 2) SR14 = (TotalCapacity - 1) | 0x40;
-                          if(buswidth == 1) SR14 = (TotalCapacity - 1) | 0x00;
-                          outSISIDXREG(SISSR,0x13,SR13);
-                          outSISIDXREG(SISSR,0x14,SR14);
+                          sr13 = SiS_DRAMType[k][4];
+                          if(buswidth == 4) sr14 = (TotalCapacity - 1) | 0x80;
+                          if(buswidth == 2) sr14 = (TotalCapacity - 1) | 0x40;
+                          if(buswidth == 1) sr14 = (TotalCapacity - 1) | 0x00;
+                          outSISIDXREG(SISSR,0x13,sr13);
+                          outSISIDXREG(SISSR,0x14,sr14);
                           Addr = FBAddr + BankNumHigh * 64 * 1024 + PhysicalAdrHigh;
                           /* *((USHORT *)(Addr)) = (USHORT)PhysicalAdrHigh; */
 			  writew(((USHORT)PhysicalAdrHigh), Addr);
@@ -4307,10 +4317,10 @@
 	} else {
 #endif
 	   /* Need to map max FB size for finding out about RAM size */
-	   ivideo->sishw_ext.pjVideoMemoryAddress = ioremap(ivideo->video_base, 0x4000000);
-	   if(ivideo->sishw_ext.pjVideoMemoryAddress) {
+	   ivideo->video_vbase = ioremap(ivideo->video_base, 0x4000000);
+	   if(ivideo->video_vbase) {
 	      sisfb_setramsize300(pdev);
-	      iounmap(ivideo->sishw_ext.pjVideoMemoryAddress);
+	      iounmap(ivideo->video_vbase);
 	   } else {
 	      printk(KERN_DEBUG "sisfb: Failed to map memory for size detection, assuming 8MB\n");
 	      outSISIDXREG(SISSR,0x13,0x28);  /* ? */
@@ -4696,8 +4706,8 @@
 	andSIDIDXREG(SISSR,0x13,0x00);
 
 	/* Need to map max FB size for finding out about RAM size */
-	ivideo->sishw_ext.pjVideoMemoryAddress = ioremap(ivideo->video_base, 0x4000000);
-	if(ivideo->sishw_ext.pjVideoMemoryAddress) {
+	ivideo->video_vbase = ioremap(ivideo->video_base, 0x4000000);
+	if(ivideo->video_vbase) {
 	   /* Find out about bus width */
 	   if(memtype <= 1) {
 	      outSISIDXREG(SISSR,0x14,0x02);
@@ -4715,7 +4725,7 @@
 	   /* Find out about size */
 
 
-	   iounmap(ivideo->sishw_ext.pjVideoMemoryAddress);
+	   iounmap(ivideo->video_vbase);
 	} else {
 	   printk(KERN_DEBUG "sisfb: Failed to map memory for size detection, assuming 8MB\n");
 	   outSISIDXREG(SISSR,0x14,0x??);  /* 8MB, 64bit default */
@@ -4765,11 +4775,12 @@
 	} else {
 	   struct sis_video_info *countvideo = card_list;
 	   ivideo->cardnumber = 1;
-	   while ((countvideo = countvideo->next) != NULL) ivideo->cardnumber++;
+	   while((countvideo = countvideo->next) != NULL) ivideo->cardnumber++;
 	}
 
 	strncpy(ivideo->myid, chipinfo->chip_name, 30);
 
+	ivideo->warncount = 0;
 	ivideo->chip_id = pdev->device;
 	pci_read_config_byte(pdev, PCI_REVISION_ID, &ivideo->revision_id);
 	ivideo->sishw_ext.jChipRevision = ivideo->revision_id;
@@ -4955,18 +4966,16 @@
 	}
 
 	/* Find out about current video mode */
+	ivideo->modeprechange = 0x03;
 	inSISIDXREG(SISCR,0x34,reg);
 	if(reg & 0x7f) {
 		ivideo->modeprechange = reg & 0x7f;
-	} else {
-		ivideo->modeprechange = 0x03;
+	} else if(sisvga_enabled) {
 #if defined(__i386__) || defined(__x86_64__)
-		{
-			unsigned char __iomem *tt = ioremap(0, 0x1000);
-			if(tt) {
-			   	ivideo->modeprechange = tt[0x449];
-			   	iounmap(tt);
-			}
+		unsigned char SIS_IOTYPE2 *tt = ioremap(0, 0x1000);
+		if(tt) {
+		   	ivideo->modeprechange = readb(tt + 0x449);
+		   	iounmap(tt);
 		}
 #endif
 	}
@@ -4997,18 +5006,11 @@
 #endif
 
 	ivideo->bios_abase = NULL;
-	ivideo->bios_vbase = NULL;
 	if(ivideo->sisfb_userom) {
 	    ivideo->sishw_ext.pjVirtualRomBase = sis_find_rom(pdev);
-#if defined(__i386__) || defined(__x86_64__)
-	    ivideo->bios_vbase = ivideo->sishw_ext.pjVirtualRomBase;	/* mapped */
-#else
-	    ivideo->bios_abase = ivideo->sishw_ext.pjVirtualRomBase;	/* allocated */
-#endif
+	    ivideo->bios_abase = ivideo->sishw_ext.pjVirtualRomBase;
 	    if(ivideo->sishw_ext.pjVirtualRomBase) {
-		printk(KERN_INFO "sisfb: Video ROM found and %s to 0x%p\n",
-			ivideo->bios_vbase ? "mapped" : "copied",
-		        ivideo->sishw_ext.pjVirtualRomBase);
+		printk(KERN_INFO "sisfb: Video ROM found and copied\n");
 		ivideo->sishw_ext.UseROM = TRUE;
 	    } else {
 	        ivideo->sishw_ext.UseROM = FALSE;
@@ -5135,7 +5137,6 @@
 		printk(KERN_ERR "sisfb: Fatal error: Unable to reserve frame buffer memory\n");
 		printk(KERN_ERR "sisfb: Is there another framebuffer driver active?\n");
 		if(ivideo->bios_abase) vfree(ivideo->bios_abase);
-		if(ivideo->bios_vbase) iounmap(ivideo->bios_vbase);
 		pci_set_drvdata(pdev, NULL);
 		kfree(sis_fb_info);
 		return -ENODEV;
@@ -5145,7 +5146,6 @@
 		printk(KERN_ERR "sisfb: Fatal error: Unable to reserve MMIO region\n");
 		release_mem_region(ivideo->video_base, ivideo->video_size);
 		if(ivideo->bios_abase) vfree(ivideo->bios_abase);
-		if(ivideo->bios_vbase) iounmap(ivideo->bios_vbase);
 		pci_set_drvdata(pdev, NULL);
 		kfree(sis_fb_info);
 		return -ENODEV;
@@ -5158,7 +5158,6 @@
 	   	release_mem_region(ivideo->video_base, ivideo->video_size);
 	   	release_mem_region(ivideo->mmio_base, ivideo->mmio_size);
 		if(ivideo->bios_abase) vfree(ivideo->bios_abase);
-		if(ivideo->bios_vbase) iounmap(ivideo->bios_vbase);
 		pci_set_drvdata(pdev, NULL);
 	   	kfree(sis_fb_info);
 	   	return -ENODEV;
@@ -5171,17 +5170,16 @@
 	   	release_mem_region(ivideo->video_base, ivideo->video_size);
 	   	release_mem_region(ivideo->mmio_base, ivideo->mmio_size);
 		if(ivideo->bios_abase) vfree(ivideo->bios_abase);
-		if(ivideo->bios_vbase) iounmap(ivideo->bios_vbase);
 		pci_set_drvdata(pdev, NULL);
 	   	kfree(sis_fb_info);
 	   	return -ENODEV;
 	}
 
-	printk(KERN_INFO "sisfb: Framebuffer at 0x%lx, mapped to 0x%p, size %ldk\n",
-	       	ivideo->video_base, ivideo->video_vbase, ivideo->video_size / 1024);
+	printk(KERN_INFO "sisfb: Framebuffer at 0x%lx, mapped to 0x%lx, size %ldk\n",
+	       	ivideo->video_base, (ULONG)ivideo->video_vbase, ivideo->video_size / 1024);
 
-	printk(KERN_INFO "sisfb: MMIO at 0x%lx, mapped to 0x%p, size %ldk\n",
-	       	ivideo->mmio_base, ivideo->mmio_vbase, ivideo->mmio_size / 1024);
+	printk(KERN_INFO "sisfb: MMIO at 0x%lx, mapped to 0x%lx, size %ldk\n",
+	       	ivideo->mmio_base, (ULONG)ivideo->mmio_vbase, ivideo->mmio_size / 1024);
 
 	if((ivideo->havenoheap = sisfb_heap_init(ivideo))) {
 		printk(KERN_WARNING "sisfb: Failed to initialize offscreen memory heap\n");
@@ -5239,24 +5237,27 @@
 		   inSISIDXREG(SISCR, 0x36, reg);
 		   reg &= 0x0f;
 		   if(ivideo->sisvga_engine == SIS_300_VGA) {
-		      ivideo->sishw_ext.ulCRT2LCDType = sis300paneltype[reg];
+		      ivideo->CRT2LCDType = sis300paneltype[reg];
 		   } else if(ivideo->chip >= SIS_661) {
-		      ivideo->sishw_ext.ulCRT2LCDType = sis661paneltype[reg];
+		      ivideo->CRT2LCDType = sis661paneltype[reg];
 		   } else {
-		      ivideo->sishw_ext.ulCRT2LCDType = sis310paneltype[reg];
+		      ivideo->CRT2LCDType = sis310paneltype[reg];
 		      if((ivideo->chip == SIS_550) && (sisfb_fstn)) {
-		         if((ivideo->sishw_ext.ulCRT2LCDType != LCD_640x480_2) &&
-			    (ivideo->sishw_ext.ulCRT2LCDType != LCD_640x480_3)) {
-		      	    ivideo->sishw_ext.ulCRT2LCDType = LCD_320x480;
+		         if((ivideo->CRT2LCDType != LCD_640x480_2) &&
+			    (ivideo->CRT2LCDType != LCD_640x480_3)) {
+		      	    ivideo->CRT2LCDType = LCD_320x480;
 			 }
 		      }
 		   }
-		   if(ivideo->sishw_ext.ulCRT2LCDType == LCD_UNKNOWN) {
-		      ivideo->sishw_ext.ulCRT2LCDType = LCD_1024x768;
-		      printk(KERN_DEBUG "sisfb: Illegal panel ID (%02x), assuming 1024x768\n", reg);
+		   if(ivideo->CRT2LCDType == LCD_UNKNOWN) {
+		      /* For broken BIOSes: Assume 1024x768, RGB18 */
+		      ivideo->CRT2LCDType = LCD_1024x768;
+		      setSISIDXREG(SISCR,0x36,0xf0,0x02);
+		      setSISIDXREG(SISCR,0x37,0xee,0x01);
+		      printk(KERN_DEBUG "sisfb: Invalid panel ID (%02x), assuming 1024x768, RGB18\n", reg);
 		   }
 		   for(i = 0; i < SIS_LCD_NUMBER; i++) {
-		      if(ivideo->sishw_ext.ulCRT2LCDType == sis_lcd_data[i].lcdtype) {
+		      if(ivideo->CRT2LCDType == sis_lcd_data[i].lcdtype) {
 		         ivideo->lcdxres = sis_lcd_data[i].xres;
 			 ivideo->lcdyres = sis_lcd_data[i].yres;
 			 ivideo->lcddefmodeidx = sis_lcd_data[i].default_mode_idx;
@@ -5459,7 +5460,6 @@
 			release_mem_region(ivideo->video_base, ivideo->video_size);
 			release_mem_region(ivideo->mmio_base, ivideo->mmio_size);
 			if(ivideo->bios_abase) vfree(ivideo->bios_abase);
-			if(ivideo->bios_vbase) iounmap(ivideo->bios_vbase);
 			pci_set_drvdata(pdev, NULL);
 			kfree(sis_fb_info);
 			return -EINVAL;
@@ -5583,7 +5583,6 @@
 			release_mem_region(ivideo->video_base, ivideo->video_size);
 			release_mem_region(ivideo->mmio_base, ivideo->mmio_size);
 			if(ivideo->bios_abase) vfree(ivideo->bios_abase);
-			if(ivideo->bios_vbase) iounmap(ivideo->bios_vbase);
 			pci_set_drvdata(pdev, NULL);
 			kfree(sis_fb_info);
 			return -EINVAL;
@@ -5675,8 +5674,7 @@
 	/* Unmap */
 	iounmap(ivideo->video_vbase);
 	iounmap(ivideo->mmio_vbase);
-	if(ivideo->bios_vbase) iounmap(ivideo->bios_vbase);
-	if(ivideo->bios_abase)    vfree(ivideo->bios_abase);
+	if(ivideo->bios_abase) vfree(ivideo->bios_abase);
 
 	/* Release mem regions */
 	release_mem_region(ivideo->video_base, ivideo->video_size);
@@ -5720,15 +5718,15 @@
 	.remove 	= __devexit_p(sisfb_remove)
 };
 
-int __init sisfb_init(void)
+SISINITSTATIC int __init sisfb_init(void)
 {
 #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,8)
 #ifndef MODULE
-	char *option = NULL;
+	char *options = NULL;
 
-	if (fb_get_options("sisfb", &option))
+	if(fb_get_options("sisfb", &options))
 		return -ENODEV;
-	sisfb_setup(option);
+	sisfb_setup(options);
 #endif
 #endif
 	return(pci_module_init(&sisfb_driver));
diff -Nru a/drivers/video/sis/sis_main.h b/drivers/video/sis/sis_main.h
--- a/drivers/video/sis/sis_main.h	2005-01-10 20:11:17 -08:00
+++ b/drivers/video/sis/sis_main.h	2005-01-10 20:11:17 -08:00
@@ -153,7 +153,7 @@
    now (hoping that nobody is crazy enough to run two
    SiS cards at the same time).
  */
-SIS_HEAP       	sisfb_heap;
+static SIS_HEAP       	sisfb_heap;
 
 #define MD_SIS300 1
 #define MD_SIS315 2
@@ -234,78 +234,82 @@
 	{"960x540x16",   {0x1e,0x1e}, 0x0000, 0x0000,  960,  540, 16, 1, 120, 33,           MD_SIS315},
 	{"960x540x24",   {0x1f,0x1f}, 0x0000, 0x0000,  960,  540, 32, 1, 120, 33,           MD_SIS315},
 	{"960x540x32",   {0x1f,0x1f}, 0x0000, 0x0000,  960,  540, 32, 1, 120, 33,           MD_SIS315},
+	{"960x600x8",    {0x20,0x20}, 0x0000, 0x0000,  960,  600,  8, 1, 120, 37,           MD_SIS315},
+/*60*/	{"960x600x16",   {0x21,0x21}, 0x0000, 0x0000,  960,  600, 16, 1, 120, 37,           MD_SIS315},
+	{"960x600x24",   {0x22,0x22}, 0x0000, 0x0000,  960,  600, 32, 1, 120, 37,           MD_SIS315},
+	{"960x600x32",   {0x22,0x22}, 0x0000, 0x0000,  960,  600, 32, 1, 120, 37,           MD_SIS315},
 	{"1024x576x8",   {0x71,0x71}, 0x0000, 0x0000, 1024,  576,  8, 1, 128, 36, MD_SIS300|MD_SIS315},
-/*60*/	{"1024x576x16",  {0x74,0x74}, 0x0000, 0x0000, 1024,  576, 16, 1, 128, 36, MD_SIS300|MD_SIS315},
+	{"1024x576x16",  {0x74,0x74}, 0x0000, 0x0000, 1024,  576, 16, 1, 128, 36, MD_SIS300|MD_SIS315},
 	{"1024x576x24",  {0x77,0x77}, 0x0000, 0x0000, 1024,  576, 32, 1, 128, 36, MD_SIS300|MD_SIS315},
 	{"1024x576x32",  {0x77,0x77}, 0x0000, 0x0000, 1024,  576, 32, 1, 128, 36, MD_SIS300|MD_SIS315},
 	{"1024x600x8",   {0x20,0x20}, 0x0000, 0x0000, 1024,  600,  8, 1, 128, 37, MD_SIS300          },
 	{"1024x600x16",  {0x21,0x21}, 0x0000, 0x0000, 1024,  600, 16, 1, 128, 37, MD_SIS300          },
 	{"1024x600x24",  {0x22,0x22}, 0x0000, 0x0000, 1024,  600, 32, 1, 128, 37, MD_SIS300          },
-	{"1024x600x32",  {0x22,0x22}, 0x0000, 0x0000, 1024,  600, 32, 1, 128, 37, MD_SIS300          },
+/*70*/	{"1024x600x32",  {0x22,0x22}, 0x0000, 0x0000, 1024,  600, 32, 1, 128, 37, MD_SIS300          },
 	{"1024x768x8",   {0x38,0x38}, 0x0105, 0x0105, 1024,  768,  8, 2, 128, 48, MD_SIS300|MD_SIS315},
 	{"1024x768x16",  {0x4a,0x4a}, 0x0117, 0x0117, 1024,  768, 16, 2, 128, 48, MD_SIS300|MD_SIS315},
 	{"1024x768x24",  {0x64,0x64}, 0x013c, 0x0118, 1024,  768, 32, 2, 128, 48, MD_SIS300|MD_SIS315},
-/*70*/	{"1024x768x32",  {0x64,0x64}, 0x013c, 0x0118, 1024,  768, 32, 2, 128, 48, MD_SIS300|MD_SIS315},
+	{"1024x768x32",  {0x64,0x64}, 0x013c, 0x0118, 1024,  768, 32, 2, 128, 48, MD_SIS300|MD_SIS315},
 	{"1152x768x8",   {0x23,0x23}, 0x0000, 0x0000, 1152,  768,  8, 1, 144, 48, MD_SIS300          },
 	{"1152x768x16",  {0x24,0x24}, 0x0000, 0x0000, 1152,  768, 16, 1, 144, 48, MD_SIS300          },
 	{"1152x768x24",  {0x25,0x25}, 0x0000, 0x0000, 1152,  768, 32, 1, 144, 48, MD_SIS300          },
 	{"1152x768x32",  {0x25,0x25}, 0x0000, 0x0000, 1152,  768, 32, 1, 144, 48, MD_SIS300          },
 	{"1152x864x8",   {0x29,0x29}, 0x0000, 0x0000, 1152,  864,  8, 1, 144, 54, MD_SIS300|MD_SIS315},
-	{"1152x864x16",  {0x2a,0x2a}, 0x0000, 0x0000, 1152,  864, 16, 1, 144, 54, MD_SIS300|MD_SIS315},
+/*80*/	{"1152x864x16",  {0x2a,0x2a}, 0x0000, 0x0000, 1152,  864, 16, 1, 144, 54, MD_SIS300|MD_SIS315},
 	{"1152x864x24",  {0x2b,0x2b}, 0x0000, 0x0000, 1152,  864, 32, 1, 144, 54, MD_SIS300|MD_SIS315},
 	{"1152x864x32",  {0x2b,0x2b}, 0x0000, 0x0000, 1152,  864, 32, 1, 144, 54, MD_SIS300|MD_SIS315},
 	{"1280x720x8",   {0x79,0x79}, 0x0000, 0x0000, 1280,  720,  8, 1, 160, 45, MD_SIS300|MD_SIS315},
-/*80*/	{"1280x720x16",  {0x75,0x75}, 0x0000, 0x0000, 1280,  720, 16, 1, 160, 45, MD_SIS300|MD_SIS315},
+	{"1280x720x16",  {0x75,0x75}, 0x0000, 0x0000, 1280,  720, 16, 1, 160, 45, MD_SIS300|MD_SIS315},
 	{"1280x720x24",  {0x78,0x78}, 0x0000, 0x0000, 1280,  720, 32, 1, 160, 45, MD_SIS300|MD_SIS315},
 	{"1280x720x32",  {0x78,0x78}, 0x0000, 0x0000, 1280,  720, 32, 1, 160, 45, MD_SIS300|MD_SIS315},
 	{"1280x768x8",   {0x55,0x23}, 0x0000, 0x0000, 1280,  768,  8, 1, 160, 48, MD_SIS300|MD_SIS315},
 	{"1280x768x16",  {0x5a,0x24}, 0x0000, 0x0000, 1280,  768, 16, 1, 160, 48, MD_SIS300|MD_SIS315},
 	{"1280x768x24",  {0x5b,0x25}, 0x0000, 0x0000, 1280,  768, 32, 1, 160, 48, MD_SIS300|MD_SIS315},
-	{"1280x768x32",  {0x5b,0x25}, 0x0000, 0x0000, 1280,  768, 32, 1, 160, 48, MD_SIS300|MD_SIS315},
+/*90*/	{"1280x768x32",  {0x5b,0x25}, 0x0000, 0x0000, 1280,  768, 32, 1, 160, 48, MD_SIS300|MD_SIS315},
 	{"1280x800x8",   {0x14,0x14}, 0x0000, 0x0000, 1280,  800,  8, 1, 160, 50,           MD_SIS315},
 	{"1280x800x16",  {0x15,0x15}, 0x0000, 0x0000, 1280,  800, 16, 1, 160, 50,           MD_SIS315},
 	{"1280x800x24",  {0x16,0x16}, 0x0000, 0x0000, 1280,  800, 32, 1, 160, 50,           MD_SIS315},
-/*90*/	{"1280x800x32",  {0x16,0x16}, 0x0000, 0x0000, 1280,  800, 32, 1, 160, 50,           MD_SIS315},
+	{"1280x800x32",  {0x16,0x16}, 0x0000, 0x0000, 1280,  800, 32, 1, 160, 50,           MD_SIS315},
 	{"1280x960x8",   {0x7c,0x7c}, 0x0000, 0x0000, 1280,  960,  8, 1, 160, 60, MD_SIS300|MD_SIS315},
 	{"1280x960x16",  {0x7d,0x7d}, 0x0000, 0x0000, 1280,  960, 16, 1, 160, 60, MD_SIS300|MD_SIS315},
 	{"1280x960x24",  {0x7e,0x7e}, 0x0000, 0x0000, 1280,  960, 32, 1, 160, 60, MD_SIS300|MD_SIS315},
 	{"1280x960x32",  {0x7e,0x7e}, 0x0000, 0x0000, 1280,  960, 32, 1, 160, 60, MD_SIS300|MD_SIS315},
 	{"1280x1024x8",  {0x3a,0x3a}, 0x0107, 0x0107, 1280, 1024,  8, 2, 160, 64, MD_SIS300|MD_SIS315},
-	{"1280x1024x16", {0x4d,0x4d}, 0x011a, 0x011a, 1280, 1024, 16, 2, 160, 64, MD_SIS300|MD_SIS315},
+/*100*/	{"1280x1024x16", {0x4d,0x4d}, 0x011a, 0x011a, 1280, 1024, 16, 2, 160, 64, MD_SIS300|MD_SIS315},
 	{"1280x1024x24", {0x65,0x65}, 0x013d, 0x011b, 1280, 1024, 32, 2, 160, 64, MD_SIS300|MD_SIS315},
 	{"1280x1024x32", {0x65,0x65}, 0x013d, 0x011b, 1280, 1024, 32, 2, 160, 64, MD_SIS300|MD_SIS315},
 	{"1360x768x8",   {0x48,0x48}, 0x0000, 0x0000, 1360,  768,  8, 1, 170, 48, MD_SIS300|MD_SIS315},
-/*100*/	{"1360x768x16",  {0x4b,0x4b}, 0x0000, 0x0000, 1360,  768, 16, 1, 170, 48, MD_SIS300|MD_SIS315},
+	{"1360x768x16",  {0x4b,0x4b}, 0x0000, 0x0000, 1360,  768, 16, 1, 170, 48, MD_SIS300|MD_SIS315},
 	{"1360x768x24",  {0x4e,0x4e}, 0x0000, 0x0000, 1360,  768, 32, 1, 170, 48, MD_SIS300|MD_SIS315},
 	{"1360x768x32",  {0x4e,0x4e}, 0x0000, 0x0000, 1360,  768, 32, 1, 170, 48, MD_SIS300|MD_SIS315},
 	{"1360x1024x8",  {0x67,0x67}, 0x0000, 0x0000, 1360, 1024,  8, 1, 170, 64, MD_SIS300          },
 	{"1360x1024x16", {0x6f,0x6f}, 0x0000, 0x0000, 1360, 1024, 16, 1, 170, 64, MD_SIS300          },
 	{"1360x1024x24", {0x72,0x72}, 0x0000, 0x0000, 1360, 1024, 32, 1, 170, 64, MD_SIS300          },
-	{"1360x1024x32", {0x72,0x72}, 0x0000, 0x0000, 1360, 1024, 32, 1, 170, 64, MD_SIS300          },
+/*110*/	{"1360x1024x32", {0x72,0x72}, 0x0000, 0x0000, 1360, 1024, 32, 1, 170, 64, MD_SIS300          },
 	{"1400x1050x8",  {0x26,0x26}, 0x0000, 0x0000, 1400, 1050,  8, 1, 175, 65,           MD_SIS315},
 	{"1400x1050x16", {0x27,0x27}, 0x0000, 0x0000, 1400, 1050, 16, 1, 175, 65,           MD_SIS315},
 	{"1400x1050x24", {0x28,0x28}, 0x0000, 0x0000, 1400, 1050, 32, 1, 175, 65,           MD_SIS315},
-/*110*/	{"1400x1050x32", {0x28,0x28}, 0x0000, 0x0000, 1400, 1050, 32, 1, 175, 65,           MD_SIS315},
+	{"1400x1050x32", {0x28,0x28}, 0x0000, 0x0000, 1400, 1050, 32, 1, 175, 65,           MD_SIS315},
 	{"1600x1200x8",  {0x3c,0x3c}, 0x0130, 0x011c, 1600, 1200,  8, 1, 200, 75, MD_SIS300|MD_SIS315},
 	{"1600x1200x16", {0x3d,0x3d}, 0x0131, 0x011e, 1600, 1200, 16, 1, 200, 75, MD_SIS300|MD_SIS315},
 	{"1600x1200x24", {0x66,0x66}, 0x013e, 0x011f, 1600, 1200, 32, 1, 200, 75, MD_SIS300|MD_SIS315},
 	{"1600x1200x32", {0x66,0x66}, 0x013e, 0x011f, 1600, 1200, 32, 1, 200, 75, MD_SIS300|MD_SIS315},
 	{"1680x1050x8",  {0x17,0x17}, 0x0000, 0x0000, 1680, 1050,  8, 1, 210, 65,           MD_SIS315},
-	{"1680x1050x16", {0x18,0x18}, 0x0000, 0x0000, 1680, 1050, 16, 1, 210, 65,           MD_SIS315},
+/*120*/	{"1680x1050x16", {0x18,0x18}, 0x0000, 0x0000, 1680, 1050, 16, 1, 210, 65,           MD_SIS315},
 	{"1680x1050x24", {0x19,0x19}, 0x0000, 0x0000, 1680, 1050, 32, 1, 210, 65,           MD_SIS315},
 	{"1680x1050x32", {0x19,0x19}, 0x0000, 0x0000, 1680, 1050, 32, 1, 210, 65,           MD_SIS315},
 	{"1920x1080x8",  {0x2c,0x2c}, 0x0000, 0x0000, 1920, 1080,  8, 1, 240, 67,           MD_SIS315},
-/*120*/	{"1920x1080x16", {0x2d,0x2d}, 0x0000, 0x0000, 1920, 1080, 16, 1, 240, 67,           MD_SIS315},
+	{"1920x1080x16", {0x2d,0x2d}, 0x0000, 0x0000, 1920, 1080, 16, 1, 240, 67,           MD_SIS315},
 	{"1920x1080x24", {0x73,0x73}, 0x0000, 0x0000, 1920, 1080, 32, 1, 240, 67,           MD_SIS315},
 	{"1920x1080x32", {0x73,0x73}, 0x0000, 0x0000, 1920, 1080, 32, 1, 240, 67,           MD_SIS315},
 	{"1920x1440x8",  {0x68,0x68}, 0x013f, 0x0000, 1920, 1440,  8, 1, 240, 75, MD_SIS300|MD_SIS315},
 	{"1920x1440x16", {0x69,0x69}, 0x0140, 0x0000, 1920, 1440, 16, 1, 240, 75, MD_SIS300|MD_SIS315},
 	{"1920x1440x24", {0x6b,0x6b}, 0x0141, 0x0000, 1920, 1440, 32, 1, 240, 75, MD_SIS300|MD_SIS315},
-	{"1920x1440x32", {0x6b,0x6b}, 0x0141, 0x0000, 1920, 1440, 32, 1, 240, 75, MD_SIS300|MD_SIS315},
+/*130*/	{"1920x1440x32", {0x6b,0x6b}, 0x0141, 0x0000, 1920, 1440, 32, 1, 240, 75, MD_SIS300|MD_SIS315},
 	{"2048x1536x8",  {0x6c,0x6c}, 0x0000, 0x0000, 2048, 1536,  8, 1, 256, 96,           MD_SIS315},
 	{"2048x1536x16", {0x6d,0x6d}, 0x0000, 0x0000, 2048, 1536, 16, 1, 256, 96,           MD_SIS315},
 	{"2048x1536x24", {0x6e,0x6e}, 0x0000, 0x0000, 2048, 1536, 32, 1, 256, 96,           MD_SIS315},
-/*130*/	{"2048x1536x32", {0x6e,0x6e}, 0x0000, 0x0000, 2048, 1536, 32, 1, 256, 96,           MD_SIS315},
+	{"2048x1536x32", {0x6e,0x6e}, 0x0000, 0x0000, 2048, 1536, 32, 1, 256, 96,           MD_SIS315},
 	{"\0", {0x00,0x00}, 0, 0, 0, 0, 0, 0, 0}
 };
 
@@ -318,37 +322,37 @@
 } sis_lcd_data[] = {
 	{ LCD_640x480,    640,  480,  23 },
 	{ LCD_800x600,    800,  600,  43 },
-	{ LCD_1024x600,  1024,  600,  63 },
-	{ LCD_1024x768,  1024,  768,  67 },
-	{ LCD_1152x768,  1152,  768,  71 },
-	{ LCD_1152x864,  1152,  864,  75 },
-	{ LCD_1280x720,  1280,  720,  79 },
-	{ LCD_1280x768,  1280,  768,  83 },
-	{ LCD_1280x800,  1280,  800,  87 },
-	{ LCD_1280x960,  1280,  960,  91 },
-	{ LCD_1280x1024, 1280, 1024,  95 },
-	{ LCD_1400x1050, 1400, 1050, 107 },
-	{ LCD_1680x1050, 1680, 1050, 115 },
-	{ LCD_1600x1200, 1600, 1200, 111 },
+	{ LCD_1024x600,  1024,  600,  67 },
+	{ LCD_1024x768,  1024,  768,  71 },
+	{ LCD_1152x768,  1152,  768,  75 },
+	{ LCD_1152x864,  1152,  864,  79 },
+	{ LCD_1280x720,  1280,  720,  83 },
+	{ LCD_1280x768,  1280,  768,  87 },
+	{ LCD_1280x800,  1280,  800,  91 },
+	{ LCD_1280x960,  1280,  960,  95 },
+	{ LCD_1280x1024, 1280, 1024,  99 },
+	{ LCD_1400x1050, 1400, 1050, 111 },
+	{ LCD_1680x1050, 1680, 1050, 119 },
+	{ LCD_1600x1200, 1600, 1200, 115 },
 	{ LCD_640x480_2,  640,  480,  23 },
 	{ LCD_640x480_3,  640,  480,  23 },
 	{ LCD_320x480,    320,  480,   9 },
 };
 
 /* CR36 evaluation */
-const USHORT sis300paneltype[] =
+static const USHORT sis300paneltype[] =
     { LCD_UNKNOWN,   LCD_800x600,   LCD_1024x768,  LCD_1280x1024,
       LCD_1280x960,  LCD_640x480,   LCD_1024x600,  LCD_1152x768,
       LCD_UNKNOWN,   LCD_UNKNOWN,   LCD_UNKNOWN,   LCD_UNKNOWN,
       LCD_UNKNOWN,   LCD_UNKNOWN,   LCD_UNKNOWN,   LCD_UNKNOWN };
 
-const USHORT sis310paneltype[] =
+static const USHORT sis310paneltype[] =
     { LCD_UNKNOWN,   LCD_800x600,   LCD_1024x768,  LCD_1280x1024,
       LCD_640x480,   LCD_1024x600,  LCD_1152x864,  LCD_1280x960,
       LCD_1152x768,  LCD_1400x1050, LCD_1280x768,  LCD_1600x1200,
       LCD_640x480_2, LCD_640x480_3, LCD_UNKNOWN,   LCD_UNKNOWN };
 
-const USHORT sis661paneltype[] =
+static const USHORT sis661paneltype[] =
     { LCD_UNKNOWN,   LCD_800x600,   LCD_1024x768,  LCD_1280x1024,
       LCD_640x480,   LCD_1024x600,  LCD_1152x864,  LCD_1280x960,
       LCD_1152x768,  LCD_1400x1050, LCD_1280x768,  LCD_1600x1200,
@@ -426,13 +430,14 @@
 	{1,  848,  480,  39,  TRUE}, {2,  848,  480,  60,  TRUE},
 	{1,  856,  480,  39,  TRUE}, {2,  856,  480,  60,  TRUE},
 	{1,  960,  540,  60,  TRUE},
+	{1,  960,  600,  60,  TRUE},
 	{1, 1024,  576,  60,  TRUE}, {2, 1024,  576,  75,  TRUE}, {3, 1024,  576,  85,  TRUE},
 	{1, 1024,  600,  60,  TRUE},
 	{1, 1024,  768,  43,  TRUE}, {2, 1024,  768,  60,  TRUE}, {3, 1024,  768,  70, FALSE},
 	{4, 1024,  768,  75, FALSE}, {5, 1024,  768,  85,  TRUE}, {6, 1024,  768, 100,  TRUE},
 	{7, 1024,  768, 120,  TRUE},
 	{1, 1152,  768,  60,  TRUE},
-	{1, 1152,  864,  75,  TRUE}, {2, 1152,  864,  84,  TRUE},
+	{1, 1152,  864,  60,  TRUE}, {1, 1152,  864,  75,  TRUE}, {2, 1152,  864,  84,  TRUE},
 	{1, 1280,  720,  60,  TRUE}, {2, 1280,  720,  75,  TRUE}, {3, 1280,  720,  85,  TRUE},
 	{1, 1280,  768,  60,  TRUE},
 	{1, 1280,  800,  60,  TRUE},
@@ -800,11 +805,11 @@
 
 /* Interface used by the world */
 #ifndef MODULE
-int             sisfb_setup(char *options);
+SISINITSTATIC int sisfb_setup(char *options);
 #endif
 
 /* Interface to the low level console driver */
-int             sisfb_init(void);
+SISINITSTATIC int sisfb_init(void);
 
 
 /* fbdev routines */
@@ -880,7 +885,6 @@
 		      	struct fb_info *info);
 static void     sisfb_pre_setmode(struct sis_video_info *ivideo);
 static void     sisfb_post_setmode(struct sis_video_info *ivideo);
-static void __iomem *sis_find_rom(struct pci_dev *pdev);
 static BOOLEAN  sisfb_CheckVBRetrace(struct sis_video_info *ivideo);
 static BOOLEAN  sisfbcheckvretracecrt2(struct sis_video_info *ivideo);
 static BOOLEAN  sisfbcheckvretracecrt1(struct sis_video_info *ivideo);
@@ -908,7 +912,6 @@
 static void     SiS_SenseCh(struct sis_video_info *ivideo);
 
 /* Routines from init.c/init301.c */
-extern USHORT   SiS_GetModeID(int VGAEngine, ULONG VBFlags, int HDisplay, int VDisplay, int Depth, BOOLEAN FSTN);
 extern USHORT   SiS_GetModeID_LCD(int VGAEngine, ULONG VBFlags, int HDisplay, int VDisplay, int Depth,
                                   BOOLEAN FSTN, USHORT CustomT, int LCDwith, int LCDheight);
 extern USHORT   SiS_GetModeID_TV(int VGAEngine, ULONG VBFlags, int HDisplay, int VDisplay, int Depth);
diff -Nru a/drivers/video/sis/vgatypes.h b/drivers/video/sis/vgatypes.h
--- a/drivers/video/sis/vgatypes.h	2005-01-10 20:11:15 -08:00
+++ b/drivers/video/sis/vgatypes.h	2005-01-10 20:11:15 -08:00
@@ -35,7 +35,7 @@
  * * 3) The name of the author may not be used to endorse or promote products
  * *    derived from this software without specific prior written permission.
  * *
- * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESSED OR
+ * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  * * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  * * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
@@ -53,13 +53,9 @@
 #ifndef _VGATYPES_
 #define _VGATYPES_
 
-#ifdef LINUX_XF86
-#include "xf86Version.h"
-#include "xf86Pci.h"
-#endif
-
 #ifdef LINUX_KERNEL  /* We don't want the X driver to depend on kernel source */
 #include <linux/ioctl.h>
+#include <linux/version.h>
 #endif
 
 #ifndef FALSE
@@ -99,15 +95,18 @@
 #endif
 
 #ifndef BOOLEAN
-typedef UCHAR BOOLEAN;
+typedef unsigned char BOOLEAN;
 #endif
 
-#ifndef bool
-typedef UCHAR bool;
-#endif
+#define SISIOMEMTYPE
 
 #ifdef LINUX_KERNEL
 typedef unsigned long SISIOADDRESS;
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,8)
+#include <linux/types.h>  /* Need __iomem */
+#undef SISIOMEMTYPE
+#define SISIOMEMTYPE __iomem
+#endif
 #endif
 
 #ifdef LINUX_XF86
@@ -143,55 +142,26 @@
     MAX_SIS_CHIP
 };
 
-#ifdef LINUX_KERNEL
-enum _SIS_LCD_TYPE {
-    LCD_INVALID = 0,
-    LCD_800x600,
-    LCD_1024x768,
-    LCD_1280x1024,
-    LCD_1280x960,
-    LCD_640x480,
-    LCD_1600x1200,
-    LCD_1920x1440,
-    LCD_2048x1536,
-    LCD_320x480,       /* FSTN */
-    LCD_1400x1050,
-    LCD_1152x864,
-    LCD_1152x768,
-    LCD_1280x768,
-    LCD_1024x600,
-    LCD_640x480_2,     /* DSTN */
-    LCD_640x480_3,     /* DSTN */
-    LCD_848x480,
-    LCD_1280x800,
-    LCD_1680x1050,
-    LCD_1280x720,
-    LCD_CUSTOM,
-    LCD_UNKNOWN
-};
-typedef unsigned int SIS_LCD_TYPE;
-#endif
-
 #ifndef SIS_HW_INFO
-
 typedef struct _SIS_HW_INFO  SIS_HW_INFO, *PSIS_HW_INFO;
 
-typedef BOOLEAN (*PSIS_QUERYSPACE)   (PSIS_HW_INFO, ULONG, ULONG, ULONG *);
-
 struct _SIS_HW_INFO
 {
 #ifdef LINUX_XF86
     PCITAG PciTag;		 /* PCI Tag */
 #endif
 
-    UCHAR  *pjVirtualRomBase;    /* ROM image */
+    UCHAR *pjVirtualRomBase;	 /* ROM image */
 
     BOOLEAN UseROM;		 /* Use the ROM image if provided */
 
-    UCHAR  *pjVideoMemoryAddress;/* base virtual memory address */
+#ifdef LINUX_KERNEL
+    UCHAR SISIOMEMTYPE *pjVideoMemoryAddress;
+    				 /* base virtual memory address */
                                  /* of Linear VGA memory */
 
     ULONG  ulVideoMemorySize;    /* size, in bytes, of the memory on the board */
+#endif
 
     SISIOADDRESS ulIOAddress;    /* base I/O address of VGA ports (0x3B0; relocated) */
 
@@ -201,11 +171,6 @@
     UCHAR  jChipRevision;        /* Used to Identify SiS Graphics Chip Revision */
 
     BOOLEAN bIntegratedMMEnabled;/* supporting integration MM enable */
-
-#ifdef LINUX_KERNEL
-    ULONG  ulCRT2LCDType;        /* defined in the data structure type */
-                                 /* "SIS_LCD_TYPE" */
-#endif
 };
 #endif
 
diff -Nru a/drivers/video/sis/vstruct.h b/drivers/video/sis/vstruct.h
--- a/drivers/video/sis/vstruct.h	2005-01-10 20:11:20 -08:00
+++ b/drivers/video/sis/vstruct.h	2005-01-10 20:11:20 -08:00
@@ -35,7 +35,7 @@
  * * 3) The name of the author may not be used to endorse or promote products
  * *    derived from this software without specific prior written permission.
  * *
- * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESSED OR
+ * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  * * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  * * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
@@ -50,12 +50,6 @@
  *
  */
 
-#ifdef _INIT_
-#define EXTERN
-#else
-#define EXTERN extern
-#endif /* _INIT_ */
-
 #ifndef _VSTRUCT_
 #define _VSTRUCT_
 
@@ -286,7 +280,7 @@
 	USHORT SiS_IF_DEF_FSTN;
 	USHORT SiS_SysFlags;
 	UCHAR  SiS_VGAINFO;
-#ifndef LINUX_KERNEL
+#ifdef LINUX_XF86
         USHORT SiS_CP1, SiS_CP2, SiS_CP3, SiS_CP4;
 #endif
 	BOOLEAN SiS_UseROM;
@@ -304,6 +298,7 @@
 	BOOLEAN HaveEMILCD;
 	BOOLEAN OverruleEMI;
 	UCHAR  EMI_30,EMI_31,EMI_32,EMI_33;
+	USHORT SiS_EMIOffset;
 	SHORT  PDC, PDCA;
 	UCHAR  SiS_MyCR63;
 	USHORT SiS_CRT1Mode;
@@ -358,7 +353,7 @@
 	USHORT SiS_PanelMin301;
 
 	const SiS_StStruct          *SiS_SModeIDTable;
-	SiS_StandTableStruct        *SiS_StandTable;
+	const SiS_StandTableStruct  *SiS_StandTable;
 	const SiS_ExtStruct         *SiS_EModeIDTable;
 	const SiS_Ext2Struct        *SiS_RefIndex;
 	const SiS_VBModeStruct      *SiS_VBModeIDTable;
@@ -374,7 +369,7 @@
 	const UCHAR                 *pSiS_SoftSetting;
 
 	const DRAM4Type *SiS_SR15; /* pointer : point to array */
-#ifndef LINUX_XF86
+#ifdef LINUX_KERNEL
 	UCHAR *pSiS_SR07;
 	const DRAM4Type *SiS_CR40; /* pointer : point to array */
 	UCHAR *SiS_CR49;
@@ -420,8 +415,8 @@
 	const SiS_LCDDataStruct  *SiS_LCD1280x720Data;
 	const SiS_LCDDataStruct  *SiS_StLCD1280x768_2Data;
 	const SiS_LCDDataStruct  *SiS_ExtLCD1280x768_2Data;
-	const SiS_LCDDataStruct  *SiS_LCD1280x768_3Data;
 	const SiS_LCDDataStruct  *SiS_LCD1280x800Data;
+	const SiS_LCDDataStruct  *SiS_LCD1280x800_2Data;
 	const SiS_LCDDataStruct  *SiS_LCD1280x960Data;
 	const SiS_LCDDataStruct  *SiS_ExtLCD1280x1024Data;
 	const SiS_LCDDataStruct  *SiS_St2LCD1280x1024Data;
@@ -663,6 +658,8 @@
 	BOOLEAN CP_HaveCustomData;
 	int     CP_PreferredX, CP_PreferredY, CP_PreferredIndex;
 	int	CP_MaxX, CP_MaxY, CP_MaxClock;
+	UCHAR   CP_PrefSR2B, CP_PrefSR2C;
+	USHORT  CP_PrefClock;
 	BOOLEAN CP_Supports64048075;
 	int     CP_HDisplay[7], CP_VDisplay[7];	/* For Custom LCD panel dimensions */
     	int     CP_HTotal[7], CP_VTotal[7];
diff -Nru a/drivers/video/sstfb.c b/drivers/video/sstfb.c
--- a/drivers/video/sstfb.c	2005-01-10 20:11:20 -08:00
+++ b/drivers/video/sstfb.c	2005-01-10 20:11:20 -08:00
@@ -1706,14 +1706,14 @@
 MODULE_DESCRIPTION("FBDev driver for 3dfx Voodoo Graphics and Voodoo2 based video boards");
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(mem, "i");
+module_param(mem, int, 0);
 MODULE_PARM_DESC(mem, "Size of frame buffer memory in MB (1, 2, 4 MB, default=autodetect)");
-MODULE_PARM(vgapass, "i");
+module_param(vgapass, bool, 0);
 MODULE_PARM_DESC(vgapass, "Enable VGA PassThrough mode (0 or 1) (default=0)");
-MODULE_PARM(clipping , "i");
+module_param(clipping, bool, 0);
 MODULE_PARM_DESC(clipping, "Enable clipping (slower, safer) (0 or 1) (default=1)");
-MODULE_PARM(gfxclk , "i");
+module_param(gfxclk, int, 0);
 MODULE_PARM_DESC(gfxclk, "Force graphic chip frequency in MHz. DANGEROUS. (default=auto)");
-MODULE_PARM(slowpci, "i");
+module_param(slowpci, bool, 0);
 MODULE_PARM_DESC(slowpci, "Uses slow PCI settings (0 or 1) (default=0)");
 
diff -Nru a/drivers/video/tdfxfb.c b/drivers/video/tdfxfb.c
--- a/drivers/video/tdfxfb.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/video/tdfxfb.c	2005-01-10 20:11:17 -08:00
@@ -210,41 +210,21 @@
 
 #ifdef VGA_REG_IO 
 static inline  u8 vga_inb(struct tdfx_par *par, u32 reg) { return inb(reg); }
-static inline u16 vga_inw(struct tdfx_par *par, u32 reg) { return inw(reg); }
-static inline u16 vga_inl(struct tdfx_par *par, u32 reg) { return inl(reg); }
 
 static inline void vga_outb(struct tdfx_par *par, u32 reg,  u8 val) { outb(val, reg); }
-static inline void vga_outw(struct tdfx_par *par, u32 reg, u16 val) { outw(val, reg); }
-static inline void vga_outl(struct tdfx_par *par, u32 reg, u32 val) { outl(val, reg); }
 #else
 static inline  u8 vga_inb(struct tdfx_par *par, u32 reg) { 
 	return inb(par->iobase + reg - 0x300); 
 }
-static inline u16 vga_inw(struct tdfx_par *par, u32 reg) { 
-	return inw(par->iobase + reg - 0x300); 
-}
-static inline u16 vga_inl(struct tdfx_par *par, u32 reg) { 
-	return inl(par->iobase + reg - 0x300); 
-}
 static inline void vga_outb(struct tdfx_par *par, u32 reg,  u8 val) { 
 	outb(val, par->iobase + reg - 0x300); 
 }
-static inline void vga_outw(struct tdfx_par *par, u32 reg, u16 val) { 
-	outw(val, par->iobase + reg - 0x300); 
-}
-static inline void vga_outl(struct tdfx_par *par, u32 reg, u32 val) { 
-	outl(val, par->iobase + reg - 0x300); 
-}
 #endif
 
 static inline void gra_outb(struct tdfx_par *par, u32 idx, u8 val) {
 	vga_outb(par, GRA_I, idx); vga_outb(par, GRA_D, val);
 }
 
-static inline u8 gra_inb(struct tdfx_par *par, u32 idx) {
-	vga_outb(par, GRA_I, idx); return vga_inb(par, GRA_D);
-}
-
 static inline void seq_outb(struct tdfx_par *par, u32 idx, u8 val) {
 	vga_outb(par, SEQ_I, idx); vga_outb(par, SEQ_D, val);
 }
@@ -270,15 +250,6 @@
 	vga_outb(par, ATT_IW, val);
 }
 
-static inline u8 att_inb(struct tdfx_par *par, u32 idx) 
-{
-	unsigned char tmp;
-
-	tmp = vga_inb(par, IS1_R);
-	vga_outb(par, ATT_IW, idx);
-	return vga_inb(par, ATT_IW);
-}
-
 static inline void vga_disable_video(struct tdfx_par *par)
 {
 	unsigned char s;
@@ -297,12 +268,6 @@
 	seq_outb(par, 0x00, 0x01);
 	seq_outb(par, 0x01, s);
 	seq_outb(par, 0x00, 0x03);
-}
-
-static inline void vga_disable_palette(struct tdfx_par *par)
-{
-	vga_inb(par, IS1_R);
-	vga_outb(par, ATT_IW, 0x00);
 }
 
 static inline void vga_enable_palette(struct tdfx_par *par)
diff -Nru a/drivers/video/tridentfb.c b/drivers/video/tridentfb.c
--- a/drivers/video/tridentfb.c	2005-01-10 20:11:19 -08:00
+++ b/drivers/video/tridentfb.c	2005-01-10 20:11:19 -08:00
@@ -76,16 +76,16 @@
 static int nativex;
 
 
-MODULE_PARM(mode,"s");
-MODULE_PARM(bpp,"i");
-MODULE_PARM(center,"i");
-MODULE_PARM(stretch,"i");
-MODULE_PARM(noaccel,"i");
-MODULE_PARM(memsize,"i");
-MODULE_PARM(memdiff,"i");
-MODULE_PARM(nativex,"i");
-MODULE_PARM(fp,"i");
-MODULE_PARM(crt,"i");
+module_param(mode, charp, 0);
+module_param(bpp, int, 0);
+module_param(center, int, 0);
+module_param(stretch, int, 0);
+module_param(noaccel, int, 0);
+module_param(memsize, int, 0);
+module_param(memdiff, int, 0);
+module_param(nativex, int, 0);
+module_param(fp, int, 0);
+module_param(crt, int, 0);
 
 
 static int chip3D;
@@ -521,13 +521,6 @@
 	readb(((struct tridentfb_par *)fb_info.par)->io_virt + CRT + 0x0A);	//flip-flop to index
 	t_outb(reg, 0x3C0);
 	t_outb(val, 0x3C0);
-}
-
-static inline unsigned char readAttr(int reg)
-{
-	readb(((struct tridentfb_par *)fb_info.par)->io_virt + CRT + 0x0A);	//flip-flop to index
-	t_outb(reg, 0x3C0);
-	return t_inb(0x3C1);
 }
 
 static inline void write3CE(int reg, unsigned char val)
diff -Nru a/drivers/video/vfb.c b/drivers/video/vfb.c
--- a/drivers/video/vfb.c	2005-01-10 20:11:15 -08:00
+++ b/drivers/video/vfb.c	2005-01-10 20:11:15 -08:00
@@ -35,7 +35,7 @@
 
 static void *videomemory;
 static u_long videomemorysize = VIDEOMEMSIZE;
-MODULE_PARM(videomemorysize, "l");
+module_param(videomemorysize, ulong, 0);
 
 static struct fb_var_screeninfo vfb_default __initdata = {
 	.xres =		640,
@@ -70,7 +70,7 @@
 };
 
 static int vfb_enable __initdata = 0;	/* disabled by default */
-MODULE_PARM(vfb_enable, "i");
+module_param(vfb_enable, bool, 0);
 
     /*
      *  Interface used by the world
diff -Nru a/drivers/video/vga16fb.c b/drivers/video/vga16fb.c
--- a/drivers/video/vga16fb.c	2005-01-10 20:11:17 -08:00
+++ b/drivers/video/vga16fb.c	2005-01-10 20:11:17 -08:00
@@ -91,8 +91,8 @@
 	.pixclock	= 39721,
 	.left_margin	= 48,
 	.right_margin	= 16,
-	.upper_margin	= 39,
-	.lower_margin	= 8,
+	.upper_margin	= 33,
+	.lower_margin	= 10,
 	.hsync_len 	= 96,
 	.vsync_len	= 2,
 	.vmode		= FB_VMODE_NONINTERLACED,
diff -Nru a/drivers/w1/dscore.c b/drivers/w1/dscore.c
--- a/drivers/w1/dscore.c	2005-01-10 20:11:22 -08:00
+++ b/drivers/w1/dscore.c	2005-01-10 20:11:22 -08:00
@@ -676,7 +676,7 @@
 		ds_dev->ep[i+1] = endpoint->bEndpointAddress;
 		
 		printk("%d: addr=%x, size=%d, dir=%s, type=%x\n",
-			i, endpoint->bEndpointAddress, endpoint->wMaxPacketSize,
+			i, endpoint->bEndpointAddress, le16_to_cpu(endpoint->wMaxPacketSize),
 			(endpoint->bEndpointAddress & USB_DIR_IN)?"IN":"OUT",
 			endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK);
 	}
diff -Nru a/fs/Kconfig b/fs/Kconfig
--- a/fs/Kconfig	2005-01-10 20:11:19 -08:00
+++ b/fs/Kconfig	2005-01-10 20:11:19 -08:00
@@ -266,6 +266,18 @@
 
 	  If you don't know what Access Control Lists are, say N
 
+config JFS_SECURITY
+	bool "JFS Security Labels"
+	depends on JFS_FS
+	help
+	  Security labels support alternative access control models
+	  implemented by security modules like SELinux.  This option
+	  enables an extended attribute handler for file security
+	  labels in the jfs filesystem.
+
+	  If you are not using a security module that requires using
+	  extended attributes for file security labels, say N.
+
 config JFS_DEBUG
 	bool "JFS debugging"
 	depends on JFS_FS
@@ -1179,6 +1191,15 @@
 
 	  Say 'N' unless you have NAND flash.
 
+config JFFS2_FS_NOR_ECC
+        bool "JFFS2 support for ECC'd NOR flash (EXPERIMENTAL)"
+        depends on JFFS2_FS && EXPERIMENTAL
+        default n
+        help
+          This enables the experimental support for NOR flash with transparent
+          ECC for JFFS2. This type of flash chip is not common, however it is
+          available from ST Microelectronics.
+
 config JFFS2_COMPRESSION_OPTIONS
 	bool "Advanced compression options for JFFS2"
 	depends on JFFS2_FS
@@ -1317,7 +1338,7 @@
 
 config QNX4FS_RW
 	bool "QNX4FS write support (DANGEROUS)"
-	depends on QNX4FS_FS && EXPERIMENTAL
+	depends on QNX4FS_FS && EXPERIMENTAL && BROKEN
 	help
 	  Say Y if you want to test write support for QNX4 file systems.
 
diff -Nru a/fs/Kconfig.binfmt b/fs/Kconfig.binfmt
--- a/fs/Kconfig.binfmt	2005-01-10 20:11:22 -08:00
+++ b/fs/Kconfig.binfmt	2005-01-10 20:11:22 -08:00
@@ -23,6 +23,19 @@
 	  ld.so (check the file <file:Documentation/Changes> for location and
 	  latest version).
 
+config BINFMT_ELF_FDPIC
+	bool "Kernel support for FDPIC ELF binaries"
+	default y
+	depends on FRV
+	help
+	  ELF FDPIC binaries are based on ELF, but allow the individual load
+	  segments of a binary to be located in memory independently of each
+	  other. This makes this format ideal for use in environments where no
+	  MMU is available as it still permits text segments to be shared,
+	  even if data segments are not.
+
+	  It is also possible to run FDPIC ELF binaries on MMU linux also.
+
 config BINFMT_FLAT
 	tristate "Kernel support for flat binaries"
 	depends on !MMU || SUPERH
diff -Nru a/fs/Makefile b/fs/Makefile
--- a/fs/Makefile	2005-01-10 20:11:19 -08:00
+++ b/fs/Makefile	2005-01-10 20:11:19 -08:00
@@ -25,6 +25,7 @@
 obj-y				+= binfmt_script.o
 
 obj-$(CONFIG_BINFMT_ELF)	+= binfmt_elf.o
+obj-$(CONFIG_BINFMT_ELF_FDPIC)	+= binfmt_elf_fdpic.o
 obj-$(CONFIG_BINFMT_SOM)	+= binfmt_som.o
 obj-$(CONFIG_BINFMT_FLAT)	+= binfmt_flat.o
 
@@ -94,3 +95,4 @@
 obj-$(CONFIG_BEFS_FS)		+= befs/
 obj-$(CONFIG_HOSTFS)		+= hostfs/
 obj-$(CONFIG_HPPFS)		+= hppfs/
+obj-$(CONFIG_DEBUG_FS)		+= debugfs/
diff -Nru a/fs/adfs/inode.c b/fs/adfs/inode.c
--- a/fs/adfs/inode.c	2005-01-10 20:11:17 -08:00
+++ b/fs/adfs/inode.c	2005-01-10 20:11:17 -08:00
@@ -210,7 +210,7 @@
 	return;
 
  cur_time:
-	*tv = CURRENT_TIME;
+	*tv = CURRENT_TIME_SEC;
 	return;
 
  too_early:
diff -Nru a/fs/affs/affs.h b/fs/affs/affs.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/fs/affs/affs.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,304 @@
+#include <linux/types.h>
+#include <linux/fs.h>
+#include <linux/buffer_head.h>
+#include <linux/affs_fs.h>
+#include <linux/amigaffs.h>
+
+/* AmigaOS allows file names with up to 30 characters length.
+ * Names longer than that will be silently truncated. If you
+ * want to disallow this, comment out the following #define.
+ * Creating filesystem objects with longer names will then
+ * result in an error (ENAMETOOLONG).
+ */
+/*#define AFFS_NO_TRUNCATE */
+
+/* Ugly macros make the code more pretty. */
+
+#define GET_END_PTR(st,p,sz)		 ((st *)((char *)(p)+((sz)-sizeof(st))))
+#define AFFS_GET_HASHENTRY(data,hashkey) be32_to_cpu(((struct dir_front *)data)->hashtable[hashkey])
+#define AFFS_BLOCK(sb, bh, blk)		(AFFS_HEAD(bh)->table[AFFS_SB(sb)->s_hashsize-1-(blk)])
+
+#ifdef __LITTLE_ENDIAN
+#define BO_EXBITS	0x18UL
+#elif defined(__BIG_ENDIAN)
+#define BO_EXBITS	0x00UL
+#else
+#error Endianness must be known for affs to work.
+#endif
+
+#define AFFS_HEAD(bh)		((struct affs_head *)(bh)->b_data)
+#define AFFS_TAIL(sb, bh)	((struct affs_tail *)((bh)->b_data+(sb)->s_blocksize-sizeof(struct affs_tail)))
+#define AFFS_ROOT_HEAD(bh)	((struct affs_root_head *)(bh)->b_data)
+#define AFFS_ROOT_TAIL(sb, bh)	((struct affs_root_tail *)((bh)->b_data+(sb)->s_blocksize-sizeof(struct affs_root_tail)))
+#define AFFS_DATA_HEAD(bh)	((struct affs_data_head *)(bh)->b_data)
+#define AFFS_DATA(bh)		(((struct affs_data_head *)(bh)->b_data)->data)
+
+#define AFFS_CACHE_SIZE		PAGE_SIZE
+
+#define AFFS_MAX_PREALLOC	32
+#define AFFS_LC_SIZE		(AFFS_CACHE_SIZE/sizeof(u32)/2)
+#define AFFS_AC_SIZE		(AFFS_CACHE_SIZE/sizeof(struct affs_ext_key)/2)
+#define AFFS_AC_MASK		(AFFS_AC_SIZE-1)
+
+struct affs_ext_key {
+	u32	ext;				/* idx of the extended block */
+	u32	key;				/* block number */
+};
+
+/*
+ * affs fs inode data in memory
+ */
+struct affs_inode_info {
+	u32	 i_opencnt;
+	struct semaphore i_link_lock;		/* Protects internal inode access. */
+	struct semaphore i_ext_lock;		/* Protects internal inode access. */
+#define i_hash_lock i_ext_lock
+	u32	 i_blkcnt;			/* block count */
+	u32	 i_extcnt;			/* extended block count */
+	u32	*i_lc;				/* linear cache of extended blocks */
+	u32	 i_lc_size;
+	u32	 i_lc_shift;
+	u32	 i_lc_mask;
+	struct affs_ext_key *i_ac;		/* associative cache of extended blocks */
+	u32	 i_ext_last;			/* last accessed extended block */
+	struct buffer_head *i_ext_bh;		/* bh of last extended block */
+	loff_t	 mmu_private;
+	u32	 i_protect;			/* unused attribute bits */
+	u32	 i_lastalloc;			/* last allocated block */
+	int	 i_pa_cnt;			/* number of preallocated blocks */
+	struct inode vfs_inode;
+};
+
+/* short cut to get to the affs specific inode data */
+static inline struct affs_inode_info *AFFS_I(struct inode *inode)
+{
+	return list_entry(inode, struct affs_inode_info, vfs_inode);
+}
+
+/*
+ * super-block data in memory
+ *
+ * Block numbers are adjusted for their actual size
+ *
+ */
+
+struct affs_bm_info {
+	u32 bm_key;			/* Disk block number */
+	u32 bm_free;			/* Free blocks in here */
+};
+
+struct affs_sb_info {
+	int s_partition_size;		/* Partition size in blocks. */
+	int s_reserved;			/* Number of reserved blocks. */
+	//u32 s_blksize;			/* Initial device blksize */
+	u32 s_data_blksize;		/* size of the data block w/o header */
+	u32 s_root_block;		/* FFS root block number. */
+	int s_hashsize;			/* Size of hash table. */
+	unsigned long s_flags;		/* See below. */
+	uid_t s_uid;			/* uid to override */
+	gid_t s_gid;			/* gid to override */
+	umode_t s_mode;			/* mode to override */
+	struct buffer_head *s_root_bh;	/* Cached root block. */
+	struct semaphore s_bmlock;	/* Protects bitmap access. */
+	struct affs_bm_info *s_bitmap;	/* Bitmap infos. */
+	u32 s_bmap_count;		/* # of bitmap blocks. */
+	u32 s_bmap_bits;		/* # of bits in one bitmap blocks */
+	u32 s_last_bmap;
+	struct buffer_head *s_bmap_bh;
+	char *s_prefix;			/* Prefix for volumes and assigns. */
+	int s_prefix_len;		/* Length of prefix. */
+	char s_volume[32];		/* Volume prefix for absolute symlinks. */
+};
+
+#define SF_INTL		0x0001		/* International filesystem. */
+#define SF_BM_VALID	0x0002		/* Bitmap is valid. */
+#define SF_IMMUTABLE	0x0004		/* Protection bits cannot be changed */
+#define SF_QUIET	0x0008		/* chmod errors will be not reported */
+#define SF_SETUID	0x0010		/* Ignore Amiga uid */
+#define SF_SETGID	0x0020		/* Ignore Amiga gid */
+#define SF_SETMODE	0x0040		/* Ignore Amiga protection bits */
+#define SF_MUFS		0x0100		/* Use MUFS uid/gid mapping */
+#define SF_OFS		0x0200		/* Old filesystem */
+#define SF_PREFIX	0x0400		/* Buffer for prefix is allocated */
+#define SF_VERBOSE	0x0800		/* Talk about fs when mounting */
+
+/* short cut to get to the affs specific sb data */
+static inline struct affs_sb_info *AFFS_SB(struct super_block *sb)
+{
+	return sb->s_fs_info;
+}
+
+/* amigaffs.c */
+
+extern int	affs_insert_hash(struct inode *inode, struct buffer_head *bh);
+extern int	affs_remove_hash(struct inode *dir, struct buffer_head *rem_bh);
+extern int	affs_remove_header(struct dentry *dentry);
+extern u32	affs_checksum_block(struct super_block *sb, struct buffer_head *bh);
+extern void	affs_fix_checksum(struct super_block *sb, struct buffer_head *bh);
+extern void	secs_to_datestamp(time_t secs, struct affs_date *ds);
+extern mode_t	prot_to_mode(u32 prot);
+extern void	mode_to_prot(struct inode *inode);
+extern void	affs_error(struct super_block *sb, const char *function, const char *fmt, ...);
+extern void	affs_warning(struct super_block *sb, const char *function, const char *fmt, ...);
+extern int	affs_check_name(const unsigned char *name, int len);
+extern int	affs_copy_name(unsigned char *bstr, struct dentry *dentry);
+
+/* bitmap. c */
+
+extern u32	affs_count_free_blocks(struct super_block *s);
+extern void	affs_free_block(struct super_block *sb, u32 block);
+extern u32	affs_alloc_block(struct inode *inode, u32 goal);
+extern int	affs_init_bitmap(struct super_block *sb, int *flags);
+extern void	affs_free_bitmap(struct super_block *sb);
+
+/* namei.c */
+
+extern int	affs_hash_name(struct super_block *sb, const u8 *name, unsigned int len);
+extern struct dentry *affs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *);
+extern int	affs_unlink(struct inode *dir, struct dentry *dentry);
+extern int	affs_create(struct inode *dir, struct dentry *dentry, int mode, struct nameidata *);
+extern int	affs_mkdir(struct inode *dir, struct dentry *dentry, int mode);
+extern int	affs_rmdir(struct inode *dir, struct dentry *dentry);
+extern int	affs_link(struct dentry *olddentry, struct inode *dir,
+			  struct dentry *dentry);
+extern int	affs_symlink(struct inode *dir, struct dentry *dentry,
+			     const char *symname);
+extern int	affs_rename(struct inode *old_dir, struct dentry *old_dentry,
+			    struct inode *new_dir, struct dentry *new_dentry);
+
+/* inode.c */
+
+extern unsigned long		 affs_parent_ino(struct inode *dir);
+extern struct inode		*affs_new_inode(struct inode *dir);
+extern int			 affs_notify_change(struct dentry *dentry, struct iattr *attr);
+extern void			 affs_put_inode(struct inode *inode);
+extern void			 affs_delete_inode(struct inode *inode);
+extern void			 affs_clear_inode(struct inode *inode);
+extern void			 affs_read_inode(struct inode *inode);
+extern int			 affs_write_inode(struct inode *inode, int);
+extern int			 affs_add_entry(struct inode *dir, struct inode *inode, struct dentry *dentry, s32 type);
+
+/* file.c */
+
+void		affs_free_prealloc(struct inode *inode);
+extern void	affs_truncate(struct inode *);
+
+/* dir.c */
+
+extern void   affs_dir_truncate(struct inode *);
+
+/* jump tables */
+
+extern struct inode_operations	 affs_file_inode_operations;
+extern struct inode_operations	 affs_dir_inode_operations;
+extern struct inode_operations   affs_symlink_inode_operations;
+extern struct file_operations	 affs_file_operations;
+extern struct file_operations	 affs_file_operations_ofs;
+extern struct file_operations	 affs_dir_operations;
+extern struct address_space_operations	 affs_symlink_aops;
+extern struct address_space_operations	 affs_aops;
+extern struct address_space_operations	 affs_aops_ofs;
+
+extern struct dentry_operations	 affs_dentry_operations;
+extern struct dentry_operations	 affs_dentry_operations_intl;
+
+static inline void
+affs_set_blocksize(struct super_block *sb, int size)
+{
+	sb_set_blocksize(sb, size);
+}
+static inline struct buffer_head *
+affs_bread(struct super_block *sb, int block)
+{
+	pr_debug("affs_bread: %d\n", block);
+	if (block >= AFFS_SB(sb)->s_reserved && block < AFFS_SB(sb)->s_partition_size)
+		return sb_bread(sb, block);
+	return NULL;
+}
+static inline struct buffer_head *
+affs_getblk(struct super_block *sb, int block)
+{
+	pr_debug("affs_getblk: %d\n", block);
+	if (block >= AFFS_SB(sb)->s_reserved && block < AFFS_SB(sb)->s_partition_size)
+		return sb_getblk(sb, block);
+	return NULL;
+}
+static inline struct buffer_head *
+affs_getzeroblk(struct super_block *sb, int block)
+{
+	struct buffer_head *bh;
+	pr_debug("affs_getzeroblk: %d\n", block);
+	if (block >= AFFS_SB(sb)->s_reserved && block < AFFS_SB(sb)->s_partition_size) {
+		bh = sb_getblk(sb, block);
+		lock_buffer(bh);
+		memset(bh->b_data, 0 , sb->s_blocksize);
+		set_buffer_uptodate(bh);
+		unlock_buffer(bh);
+		return bh;
+	}
+	return NULL;
+}
+static inline struct buffer_head *
+affs_getemptyblk(struct super_block *sb, int block)
+{
+	struct buffer_head *bh;
+	pr_debug("affs_getemptyblk: %d\n", block);
+	if (block >= AFFS_SB(sb)->s_reserved && block < AFFS_SB(sb)->s_partition_size) {
+		bh = sb_getblk(sb, block);
+		wait_on_buffer(bh);
+		set_buffer_uptodate(bh);
+		return bh;
+	}
+	return NULL;
+}
+static inline void
+affs_brelse(struct buffer_head *bh)
+{
+	if (bh)
+		pr_debug("affs_brelse: %lld\n", (long long) bh->b_blocknr);
+	brelse(bh);
+}
+
+static inline void
+affs_adjust_checksum(struct buffer_head *bh, u32 val)
+{
+	u32 tmp = be32_to_cpu(((__be32 *)bh->b_data)[5]);
+	((__be32 *)bh->b_data)[5] = cpu_to_be32(tmp - val);
+}
+static inline void
+affs_adjust_bitmapchecksum(struct buffer_head *bh, u32 val)
+{
+	u32 tmp = be32_to_cpu(((__be32 *)bh->b_data)[0]);
+	((__be32 *)bh->b_data)[0] = cpu_to_be32(tmp - val);
+}
+
+static inline void
+affs_lock_link(struct inode *inode)
+{
+	down(&AFFS_I(inode)->i_link_lock);
+}
+static inline void
+affs_unlock_link(struct inode *inode)
+{
+	up(&AFFS_I(inode)->i_link_lock);
+}
+static inline void
+affs_lock_dir(struct inode *inode)
+{
+	down(&AFFS_I(inode)->i_hash_lock);
+}
+static inline void
+affs_unlock_dir(struct inode *inode)
+{
+	up(&AFFS_I(inode)->i_hash_lock);
+}
+static inline void
+affs_lock_ext(struct inode *inode)
+{
+	down(&AFFS_I(inode)->i_ext_lock);
+}
+static inline void
+affs_unlock_ext(struct inode *inode)
+{
+	up(&AFFS_I(inode)->i_ext_lock);
+}
diff -Nru a/fs/affs/amigaffs.c b/fs/affs/amigaffs.c
--- a/fs/affs/amigaffs.c	2005-01-10 20:11:17 -08:00
+++ b/fs/affs/amigaffs.c	2005-01-10 20:11:17 -08:00
@@ -8,14 +8,7 @@
  *  Please send bug reports to: hjw@zvw.de
  */
 
-#include <stdarg.h>
-#include <linux/stat.h>
-#include <linux/time.h>
-#include <linux/affs_fs.h>
-#include <linux/string.h>
-#include <linux/mm.h>
-#include <linux/amigaffs.h>
-#include <linux/buffer_head.h>
+#include "affs.h"
 
 extern struct timezone sys_tz;
 
@@ -68,7 +61,7 @@
 	mark_buffer_dirty_inode(dir_bh, dir);
 	affs_brelse(dir_bh);
 
-	dir->i_mtime = dir->i_ctime = CURRENT_TIME;
+	dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC;
 	dir->i_version++;
 	mark_inode_dirty(dir);
 
@@ -121,7 +114,7 @@
 
 	affs_brelse(bh);
 
-	dir->i_mtime = dir->i_ctime = CURRENT_TIME;
+	dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC;
 	dir->i_version++;
 	mark_inode_dirty(dir);
 
@@ -319,7 +312,7 @@
 	else
 		inode->i_nlink = 0;
 	affs_unlock_link(inode);
-	inode->i_ctime = CURRENT_TIME;
+	inode->i_ctime = CURRENT_TIME_SEC;
 	mark_inode_dirty(inode);
 
 done:
diff -Nru a/fs/affs/bitmap.c b/fs/affs/bitmap.c
--- a/fs/affs/bitmap.c	2005-01-10 20:11:22 -08:00
+++ b/fs/affs/bitmap.c	2005-01-10 20:11:22 -08:00
@@ -7,15 +7,7 @@
  *  block allocation, deallocation, calculation of free space.
  */
 
-#include <linux/time.h>
-#include <linux/affs_fs.h>
-#include <linux/stat.h>
-#include <linux/kernel.h>
-#include <linux/slab.h>
-#include <linux/string.h>
-#include <linux/bitops.h>
-#include <linux/amigaffs.h>
-#include <linux/buffer_head.h>
+#include "affs.h"
 
 /* This is, of course, shamelessly stolen from fs/minix */
 
diff -Nru a/fs/affs/dir.c b/fs/affs/dir.c
--- a/fs/affs/dir.c	2005-01-10 20:11:21 -08:00
+++ b/fs/affs/dir.c	2005-01-10 20:11:21 -08:00
@@ -13,17 +13,7 @@
  *
  */
 
-#include <asm/uaccess.h>
-#include <linux/errno.h>
-#include <linux/fs.h>
-#include <linux/kernel.h>
-#include <linux/affs_fs.h>
-#include <linux/stat.h>
-#include <linux/string.h>
-#include <linux/mm.h>
-#include <linux/amigaffs.h>
-#include <linux/smp_lock.h>
-#include <linux/buffer_head.h>
+#include "affs.h"
 
 static int affs_readdir(struct file *, void *, filldir_t);
 
diff -Nru a/fs/affs/file.c b/fs/affs/file.c
--- a/fs/affs/file.c	2005-01-10 20:11:19 -08:00
+++ b/fs/affs/file.c	2005-01-10 20:11:19 -08:00
@@ -12,24 +12,7 @@
  *  affs regular file handling primitives
  */
 
-#include <asm/div64.h>
-#include <asm/uaccess.h>
-#include <asm/system.h>
-#include <linux/time.h>
-#include <linux/affs_fs.h>
-#include <linux/fcntl.h>
-#include <linux/kernel.h>
-#include <linux/errno.h>
-#include <linux/slab.h>
-#include <linux/stat.h>
-#include <linux/smp_lock.h>
-#include <linux/dirent.h>
-#include <linux/fs.h>
-#include <linux/amigaffs.h>
-#include <linux/mm.h>
-#include <linux/highmem.h>
-#include <linux/pagemap.h>
-#include <linux/buffer_head.h>
+#include "affs.h"
 
 #if PAGE_SIZE < 4096
 #error PAGE_SIZE must be at least 4096
@@ -499,7 +482,7 @@
 	retval = generic_file_write (file, buf, count, ppos);
 	if (retval >0) {
 		struct inode *inode = file->f_dentry->d_inode;
-		inode->i_ctime = inode->i_mtime = CURRENT_TIME;
+		inode->i_ctime = inode->i_mtime = CURRENT_TIME_SEC;
 		mark_inode_dirty(inode);
 	}
 	return retval;
diff -Nru a/fs/affs/inode.c b/fs/affs/inode.c
--- a/fs/affs/inode.c	2005-01-10 20:11:18 -08:00
+++ b/fs/affs/inode.c	2005-01-10 20:11:18 -08:00
@@ -10,26 +10,7 @@
  *  (C) 1991  Linus Torvalds - minix filesystem
  */
 
-#include <asm/div64.h>
-#include <linux/errno.h>
-#include <linux/fs.h>
-#include <linux/slab.h>
-#include <linux/stat.h>
-#include <linux/time.h>
-#include <linux/affs_fs.h>
-#include <linux/kernel.h>
-#include <linux/mm.h>
-#include <linux/string.h>
-#include <linux/genhd.h>
-#include <linux/amigaffs.h>
-#include <linux/major.h>
-#include <linux/blkdev.h>
-#include <linux/init.h>
-#include <linux/smp_lock.h>
-#include <linux/buffer_head.h>
-#include <asm/system.h>
-#include <asm/uaccess.h>
-#include <linux/module.h>
+#include "affs.h"
 
 extern struct inode_operations affs_symlink_inode_operations;
 extern struct timezone sys_tz;
@@ -322,7 +303,7 @@
 	inode->i_gid     = current->fsgid;
 	inode->i_ino     = block;
 	inode->i_nlink   = 1;
-	inode->i_mtime   = inode->i_atime = inode->i_ctime = CURRENT_TIME;
+	inode->i_mtime   = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC;
 	AFFS_I(inode)->i_opencnt = 0;
 	AFFS_I(inode)->i_blkcnt = 0;
 	AFFS_I(inode)->i_lc = NULL;
@@ -428,4 +409,3 @@
 	affs_unlock_link(inode);
 	goto done;
 }
-MODULE_LICENSE("GPL");
diff -Nru a/fs/affs/namei.c b/fs/affs/namei.c
--- a/fs/affs/namei.c	2005-01-10 20:11:17 -08:00
+++ b/fs/affs/namei.c	2005-01-10 20:11:17 -08:00
@@ -8,22 +8,9 @@
  *  (C) 1991  Linus Torvalds - minix filesystem
  */
 
-#include <linux/time.h>
-#include <linux/affs_fs.h>
-#include <linux/kernel.h>
-#include <linux/string.h>
-#include <linux/stat.h>
-#include <linux/fcntl.h>
-#include <linux/amigaffs.h>
-#include <linux/smp_lock.h>
-#include <linux/buffer_head.h>
-#include <asm/uaccess.h>
-
-#include <linux/errno.h>
+#include "affs.h"
 
 typedef int (*toupper_t)(int);
-
-extern struct inode_operations affs_symlink_inode_operations;
 
 static int	 affs_toupper(int ch);
 static int	 affs_hash_dentry(struct dentry *, struct qstr *);
diff -Nru a/fs/affs/super.c b/fs/affs/super.c
--- a/fs/affs/super.c	2005-01-10 20:11:20 -08:00
+++ b/fs/affs/super.c	2005-01-10 20:11:20 -08:00
@@ -11,26 +11,10 @@
  */
 
 #include <linux/module.h>
-#include <linux/errno.h>
-#include <linux/fs.h>
-#include <linux/slab.h>
-#include <linux/stat.h>
-#include <linux/time.h>
-#include <linux/affs_fs.h>
-#include <linux/kernel.h>
-#include <linux/mm.h>
-#include <linux/string.h>
-#include <linux/genhd.h>
-#include <linux/amigaffs.h>
-#include <linux/major.h>
-#include <linux/blkdev.h>
 #include <linux/init.h>
-#include <linux/smp_lock.h>
-#include <linux/buffer_head.h>
-#include <linux/vfs.h>
+#include <linux/statfs.h>
 #include <linux/parser.h>
-#include <asm/system.h>
-#include <asm/uaccess.h>
+#include "affs.h"
 
 extern struct timezone sys_tz;
 
diff -Nru a/fs/affs/symlink.c b/fs/affs/symlink.c
--- a/fs/affs/symlink.c	2005-01-10 20:11:17 -08:00
+++ b/fs/affs/symlink.c	2005-01-10 20:11:17 -08:00
@@ -8,14 +8,7 @@
  *  affs symlink handling code
  */
 
-#include <linux/errno.h>
-#include <linux/fs.h>
-#include <linux/stat.h>
-#include <linux/affs_fs.h>
-#include <linux/amigaffs.h>
-#include <linux/pagemap.h>
-#include <linux/smp_lock.h>
-#include <linux/buffer_head.h>
+#include "affs.h"
 
 static int affs_symlink_readpage(struct file *file, struct page *page)
 {
diff -Nru a/fs/afs/types.h b/fs/afs/types.h
--- a/fs/afs/types.h	2005-01-10 20:11:19 -08:00
+++ b/fs/afs/types.h	2005-01-10 20:11:19 -08:00
@@ -26,8 +26,6 @@
 	AFSVL_BACKVOL,			/* backup volume */
 } __attribute__((packed)) afs_voltype_t;
 
-extern const char *afs_voltypes[];
-
 typedef enum {
 	AFS_FTYPE_INVALID	= 0,
 	AFS_FTYPE_FILE		= 1,
diff -Nru a/fs/afs/volume.c b/fs/afs/volume.c
--- a/fs/afs/volume.c	2005-01-10 20:11:15 -08:00
+++ b/fs/afs/volume.c	2005-01-10 20:11:15 -08:00
@@ -24,7 +24,9 @@
 #include "vlclient.h"
 #include "internal.h"
 
-const char *afs_voltypes[] = { "R/W", "R/O", "BAK" };
+#ifdef __KDEBUG
+static const char *afs_voltypes[] = { "R/W", "R/O", "BAK" };
+#endif
 
 #ifdef AFS_CACHING_SUPPORT
 static cachefs_match_val_t afs_volume_cache_match(void *target,
diff -Nru a/fs/attr.c b/fs/attr.c
--- a/fs/attr.c	2005-01-10 20:11:16 -08:00
+++ b/fs/attr.c	2005-01-10 20:11:16 -08:00
@@ -14,6 +14,7 @@
 #include <linux/fcntl.h>
 #include <linux/quotaops.h>
 #include <linux/security.h>
+#include <linux/time.h>
 
 /* Taken over from the old code... */
 
@@ -87,11 +88,14 @@
 	if (ia_valid & ATTR_GID)
 		inode->i_gid = attr->ia_gid;
 	if (ia_valid & ATTR_ATIME)
-		inode->i_atime = attr->ia_atime;
+		inode->i_atime = timespec_trunc(attr->ia_atime,
+						inode->i_sb->s_time_gran);
 	if (ia_valid & ATTR_MTIME)
-		inode->i_mtime = attr->ia_mtime;
+		inode->i_mtime = timespec_trunc(attr->ia_mtime,
+						inode->i_sb->s_time_gran);
 	if (ia_valid & ATTR_CTIME)
-		inode->i_ctime = attr->ia_ctime;
+		inode->i_ctime = timespec_trunc(attr->ia_ctime,
+						inode->i_sb->s_time_gran);
 	if (ia_valid & ATTR_MODE) {
 		umode_t mode = attr->ia_mode;
 
@@ -133,7 +137,7 @@
 	struct inode *inode = dentry->d_inode;
 	mode_t mode = inode->i_mode;
 	int error;
-	struct timespec now = CURRENT_TIME;
+	struct timespec now = current_fs_time(inode->i_sb);
 	unsigned int ia_valid = attr->ia_valid;
 
 	if (!inode)
diff -Nru a/fs/autofs/inode.c b/fs/autofs/inode.c
--- a/fs/autofs/inode.c	2005-01-10 20:11:21 -08:00
+++ b/fs/autofs/inode.c	2005-01-10 20:11:21 -08:00
@@ -147,6 +147,7 @@
 	s->s_blocksize_bits = 10;
 	s->s_magic = AUTOFS_SUPER_MAGIC;
 	s->s_op = &autofs_sops;
+	s->s_time_gran = 1;
 
 	root_inode = iget(s, AUTOFS_ROOT_INO);
 	root = d_alloc_root(root_inode);
diff -Nru a/fs/autofs4/inode.c b/fs/autofs4/inode.c
--- a/fs/autofs4/inode.c	2005-01-10 20:11:21 -08:00
+++ b/fs/autofs4/inode.c	2005-01-10 20:11:21 -08:00
@@ -211,6 +211,7 @@
 	s->s_blocksize_bits = 10;
 	s->s_magic = AUTOFS_SUPER_MAGIC;
 	s->s_op = &autofs4_sops;
+	s->s_time_gran = 1;
 
 	/*
 	 * Get the root inode and dentry, but defer checking for errors.
diff -Nru a/fs/bad_inode.c b/fs/bad_inode.c
--- a/fs/bad_inode.c	2005-01-10 20:11:24 -08:00
+++ b/fs/bad_inode.c	2005-01-10 20:11:24 -08:00
@@ -105,7 +105,8 @@
 	remove_inode_hash(inode);
 
 	inode->i_mode = S_IFREG;
-	inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+	inode->i_atime = inode->i_mtime = inode->i_ctime =
+		current_fs_time(inode->i_sb);
 	inode->i_op = &bad_inode_ops;	
 	inode->i_fop = &bad_file_ops;	
 }
diff -Nru a/fs/befs/debug.c b/fs/befs/debug.c
--- a/fs/befs/debug.c	2005-01-10 20:11:23 -08:00
+++ b/fs/befs/debug.c	2005-01-10 20:11:23 -08:00
@@ -222,6 +222,7 @@
 #endif				//CONFIG_BEFS_DEBUG
 }
 
+#if 0
 /* unused */
 void
 befs_dump_small_data(const struct super_block *sb, befs_small_data * sd)
@@ -241,6 +242,7 @@
 
 #endif				//CONFIG_BEFS_DEBUG
 }
+#endif  /*  0  */
 
 void
 befs_dump_index_entry(const struct super_block *sb, befs_btree_super * super)
diff -Nru a/fs/bfs/dir.c b/fs/bfs/dir.c
--- a/fs/bfs/dir.c	2005-01-10 20:11:22 -08:00
+++ b/fs/bfs/dir.c	2005-01-10 20:11:22 -08:00
@@ -100,7 +100,7 @@
 	info->si_freei--;
 	inode->i_uid = current->fsuid;
 	inode->i_gid = (dir->i_mode & S_ISGID) ? dir->i_gid : current->fsgid;
-	inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
+	inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC;
 	inode->i_blocks = inode->i_blksize = 0;
 	inode->i_op = &bfs_file_inops;
 	inode->i_fop = &bfs_file_operations;
@@ -164,7 +164,7 @@
 		return err;
 	}
 	inode->i_nlink++;
-	inode->i_ctime = CURRENT_TIME;
+	inode->i_ctime = CURRENT_TIME_SEC;
 	mark_inode_dirty(inode);
 	atomic_inc(&inode->i_count);
 	d_instantiate(new, inode);
@@ -193,7 +193,7 @@
 	}
 	de->ino = 0;
 	mark_buffer_dirty(bh);
-	dir->i_ctime = dir->i_mtime = CURRENT_TIME;
+	dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC;
 	mark_inode_dirty(dir);
 	inode->i_nlink--;
 	inode->i_ctime = dir->i_ctime;
@@ -245,11 +245,11 @@
 			goto end_rename;
 	}
 	old_de->ino = 0;
-	old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME;
+	old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME_SEC;
 	mark_inode_dirty(old_dir);
 	if (new_inode) {
 		new_inode->i_nlink--;
-		new_inode->i_ctime = CURRENT_TIME;
+		new_inode->i_ctime = CURRENT_TIME_SEC;
 		mark_inode_dirty(new_inode);
 	}
 	mark_buffer_dirty(old_bh);
@@ -300,9 +300,9 @@
 			if (!de->ino) {
 				if ((block-sblock)*BFS_BSIZE + off >= dir->i_size) {
 					dir->i_size += BFS_DIRENT_SIZE;
-					dir->i_ctime = CURRENT_TIME;
+					dir->i_ctime = CURRENT_TIME_SEC;
 				}
-				dir->i_mtime = CURRENT_TIME;
+				dir->i_mtime = CURRENT_TIME_SEC;
 				mark_inode_dirty(dir);
 				de->ino = ino;
 				for (i=0; i<BFS_NAMELEN; i++)
diff -Nru a/fs/bfs/inode.c b/fs/bfs/inode.c
--- a/fs/bfs/inode.c	2005-01-10 20:11:18 -08:00
+++ b/fs/bfs/inode.c	2005-01-10 20:11:18 -08:00
@@ -149,7 +149,7 @@
 	}
 	
 	inode->i_size = 0;
-	inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+	inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME_SEC;
 	lock_kernel();
 	mark_inode_dirty(inode);
 	block = (ino - BFS_ROOT_INO)/BFS_INODES_PER_BLOCK + 1;
diff -Nru a/fs/binfmt_aout.c b/fs/binfmt_aout.c
--- a/fs/binfmt_aout.c	2005-01-10 20:11:24 -08:00
+++ b/fs/binfmt_aout.c	2005-01-10 20:11:24 -08:00
@@ -424,7 +424,7 @@
 		return retval;
 	}
 
-	retval = setup_arg_pages(bprm, EXSTACK_DEFAULT);
+	retval = setup_arg_pages(bprm, STACK_TOP, EXSTACK_DEFAULT);
 	if (retval < 0) { 
 		/* Someone check-me: is this error path enough? */ 
 		send_sig(SIGKILL, current, 0); 
@@ -512,7 +512,9 @@
 	len = PAGE_ALIGN(ex.a_text + ex.a_data);
 	bss = ex.a_text + ex.a_data + ex.a_bss;
 	if (bss > len) {
+		down_write(&current->mm->mmap_sem);
 		error = do_brk(start_addr + len, bss - len);
+		up_write(&current->mm->mmap_sem);
 		retval = error;
 		if (error != start_addr + len)
 			goto out;
diff -Nru a/fs/binfmt_elf.c b/fs/binfmt_elf.c
--- a/fs/binfmt_elf.c	2005-01-10 20:11:18 -08:00
+++ b/fs/binfmt_elf.c	2005-01-10 20:11:18 -08:00
@@ -736,7 +736,7 @@
 	   change some of these later */
 	current->mm->rss = 0;
 	current->mm->free_area_cache = current->mm->mmap_base;
-	retval = setup_arg_pages(bprm, executable_stack);
+	retval = setup_arg_pages(bprm, STACK_TOP, executable_stack);
 	if (retval < 0) {
 		send_sig(SIGKILL, current, 0);
 		goto out_free_dentry;
@@ -1024,8 +1024,11 @@
 
 	len = ELF_PAGESTART(elf_phdata->p_filesz + elf_phdata->p_vaddr + ELF_MIN_ALIGN - 1);
 	bss = elf_phdata->p_memsz + elf_phdata->p_vaddr;
-	if (bss > len)
+	if (bss > len) {
+		down_write(&current->mm->mmap_sem);
 		do_brk(len, bss - len);
+		up_write(&current->mm->mmap_sem);
+	}
 	error = 0;
 
 out_free_ph:
@@ -1201,7 +1204,7 @@
 	prstatus->pr_ppid = p->parent->pid;
 	prstatus->pr_pgrp = process_group(p);
 	prstatus->pr_sid = p->signal->session;
-	if (p->pid == p->tgid) {
+	if (thread_group_leader(p)) {
 		/*
 		 * This is the record for the group leader.  Add in the
 		 * cumulative times of previous dead threads.  This total
diff -Nru a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/fs/binfmt_elf_fdpic.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,1101 @@
+/* binfmt_elf_fdpic.c: FDPIC ELF binary format
+ *
+ * Copyright (C) 2003, 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ * Derived from binfmt_elf.c
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/module.h>
+
+#include <linux/fs.h>
+#include <linux/stat.h>
+#include <linux/sched.h>
+#include <linux/mm.h>
+#include <linux/mman.h>
+#include <linux/errno.h>
+#include <linux/signal.h>
+#include <linux/binfmts.h>
+#include <linux/string.h>
+#include <linux/file.h>
+#include <linux/fcntl.h>
+#include <linux/slab.h>
+#include <linux/highmem.h>
+#include <linux/personality.h>
+#include <linux/ptrace.h>
+#include <linux/init.h>
+#include <linux/smp_lock.h>
+#include <linux/elf.h>
+#include <linux/elf-fdpic.h>
+#include <linux/elfcore.h>
+
+#include <asm/uaccess.h>
+#include <asm/param.h>
+#include <asm/pgalloc.h>
+
+typedef char *elf_caddr_t;
+#ifndef elf_addr_t
+#define elf_addr_t unsigned long
+#endif
+
+#if 0
+#define kdebug(fmt, ...) printk("FDPIC "fmt"\n" ,##__VA_ARGS__ )
+#else
+#define kdebug(fmt, ...) do {} while(0)
+#endif
+
+MODULE_LICENSE("GPL");
+
+static int load_elf_fdpic_binary(struct linux_binprm *bprm, struct pt_regs *regs);
+//static int load_elf_fdpic_library(struct file *);
+static int elf_fdpic_fetch_phdrs(struct elf_fdpic_params *params, struct file *file);
+static int elf_fdpic_map_file(struct elf_fdpic_params *params,
+			      struct file *file,
+			      struct mm_struct *mm,
+			      const char *what);
+
+static int create_elf_fdpic_tables(struct linux_binprm *bprm,
+				   struct mm_struct *mm,
+				   struct elf_fdpic_params *exec_params,
+				   struct elf_fdpic_params *interp_params);
+
+#ifndef CONFIG_MMU
+static int elf_fdpic_transfer_args_to_stack(struct linux_binprm *bprm, unsigned long *_sp);
+static int elf_fdpic_map_file_constdisp_on_uclinux(struct elf_fdpic_params *params,
+						   struct file *file,
+						   struct mm_struct *mm);
+#endif
+
+static int elf_fdpic_map_file_by_direct_mmap(struct elf_fdpic_params *params,
+					     struct file *file,
+					     struct mm_struct *mm);
+
+static struct linux_binfmt elf_fdpic_format = {
+	.module		= THIS_MODULE,
+	.load_binary	= load_elf_fdpic_binary,
+//	.load_shlib	= load_elf_fdpic_library,
+//	.core_dump	= elf_fdpic_core_dump,
+	.min_coredump	= ELF_EXEC_PAGESIZE,
+};
+
+static int __init init_elf_fdpic_binfmt(void)  { return register_binfmt(&elf_fdpic_format); }
+static void __exit exit_elf_fdpic_binfmt(void) { unregister_binfmt(&elf_fdpic_format); }
+
+module_init(init_elf_fdpic_binfmt)
+module_exit(exit_elf_fdpic_binfmt)
+
+static int is_elf_fdpic(struct elfhdr *hdr, struct file *file)
+{
+	if (memcmp(hdr->e_ident, ELFMAG, SELFMAG) != 0)
+		return 0;
+	if (hdr->e_type != ET_EXEC && hdr->e_type != ET_DYN)
+		return 0;
+	if (!elf_check_arch(hdr) || !elf_check_fdpic(hdr))
+		return 0;
+	if (!file->f_op || !file->f_op->mmap)
+		return 0;
+	return 1;
+}
+
+/*****************************************************************************/
+/*
+ * read the program headers table into memory
+ */
+static int elf_fdpic_fetch_phdrs(struct elf_fdpic_params *params, struct file *file)
+{
+	struct elf32_phdr *phdr;
+	unsigned long size;
+	int retval, loop;
+
+	if (params->hdr.e_phentsize != sizeof(struct elf_phdr))
+		return -ENOMEM;
+	if (params->hdr.e_phnum > 65536U / sizeof(struct elf_phdr))
+		return -ENOMEM;
+
+	size = params->hdr.e_phnum * sizeof(struct elf_phdr);
+	params->phdrs = kmalloc(size, GFP_KERNEL);
+	if (!params->phdrs)
+		return -ENOMEM;
+
+	retval = kernel_read(file, params->hdr.e_phoff, (char *) params->phdrs, size);
+	if (retval < 0)
+		return retval;
+
+	/* determine stack size for this binary */
+	phdr = params->phdrs;
+	for (loop = 0; loop < params->hdr.e_phnum; loop++, phdr++) {
+		if (phdr->p_type != PT_GNU_STACK)
+			continue;
+
+		if (phdr->p_flags & PF_X)
+			params->flags |= ELF_FDPIC_FLAG_EXEC_STACK;
+		else
+			params->flags |= ELF_FDPIC_FLAG_NOEXEC_STACK;
+
+		params->stack_size = phdr->p_memsz;
+		break;
+	}
+
+	return 0;
+} /* end elf_fdpic_fetch_phdrs() */
+
+/*****************************************************************************/
+/*
+ * load an fdpic binary into various bits of memory
+ */
+static int load_elf_fdpic_binary(struct linux_binprm *bprm, struct pt_regs *regs)
+{
+	struct elf_fdpic_params exec_params, interp_params;
+	struct elf_phdr *phdr;
+	unsigned long stack_size;
+	struct file *interpreter = NULL; /* to shut gcc up */
+	char *interpreter_name = NULL;
+	int executable_stack;
+	int retval, i;
+
+	memset(&exec_params, 0, sizeof(exec_params));
+	memset(&interp_params, 0, sizeof(interp_params));
+
+	exec_params.hdr = *(struct elfhdr *) bprm->buf;
+	exec_params.flags = ELF_FDPIC_FLAG_PRESENT | ELF_FDPIC_FLAG_EXECUTABLE;
+
+	/* check that this is a binary we know how to deal with */
+	retval = -ENOEXEC;
+	if (!is_elf_fdpic(&exec_params.hdr, bprm->file))
+		goto error;
+
+	/* read the program header table */
+	retval = elf_fdpic_fetch_phdrs(&exec_params, bprm->file);
+	if (retval < 0)
+		goto error;
+
+	/* scan for a program header that specifies an interpreter */
+	phdr = exec_params.phdrs;
+
+	for (i = 0; i < exec_params.hdr.e_phnum; i++, phdr++) {
+		switch (phdr->p_type) {
+		case PT_INTERP:
+			retval = -ENOMEM;
+			if (phdr->p_filesz > PATH_MAX)
+				goto error;
+			retval = -ENOENT;
+			if (phdr->p_filesz < 2)
+				goto error;
+
+			/* read the name of the interpreter into memory */
+			interpreter_name = (char *) kmalloc(phdr->p_filesz, GFP_KERNEL);
+			if (!interpreter_name)
+				goto error;
+
+			retval = kernel_read(bprm->file,
+					     phdr->p_offset,
+					     interpreter_name,
+					     phdr->p_filesz);
+			if (retval < 0)
+				goto error;
+
+			retval = -ENOENT;
+			if (interpreter_name[phdr->p_filesz - 1] != '\0')
+				goto error;
+
+			kdebug("Using ELF interpreter %s", interpreter_name);
+
+			/* replace the program with the interpreter */
+			interpreter = open_exec(interpreter_name);
+			retval = PTR_ERR(interpreter);
+			if (IS_ERR(interpreter)) {
+				interpreter = NULL;
+				goto error;
+			}
+
+			retval = kernel_read(interpreter, 0, bprm->buf, BINPRM_BUF_SIZE);
+			if (retval < 0)
+				goto error;
+
+			interp_params.hdr = *((struct elfhdr *) bprm->buf);
+			break;
+
+		case PT_LOAD:
+#ifdef CONFIG_MMU
+			if (exec_params.load_addr == 0)
+				exec_params.load_addr = phdr->p_vaddr;
+#endif
+			break;
+		}
+
+	}
+
+	if (elf_check_const_displacement(&exec_params.hdr))
+		exec_params.flags |= ELF_FDPIC_FLAG_CONSTDISP;
+
+	/* perform insanity checks on the interpreter */
+	if (interpreter_name) {
+		retval = -ELIBBAD;
+		if (!is_elf_fdpic(&interp_params.hdr, interpreter))
+			goto error;
+
+		interp_params.flags = ELF_FDPIC_FLAG_PRESENT;
+
+		/* read the interpreter's program header table */
+		retval = elf_fdpic_fetch_phdrs(&interp_params, interpreter);
+		if (retval < 0)
+			goto error;
+	}
+
+	stack_size = exec_params.stack_size;
+	if (stack_size < interp_params.stack_size)
+		stack_size = interp_params.stack_size;
+
+	if (exec_params.flags & ELF_FDPIC_FLAG_EXEC_STACK)
+		executable_stack = EXSTACK_ENABLE_X;
+	else if (exec_params.flags & ELF_FDPIC_FLAG_NOEXEC_STACK)
+		executable_stack = EXSTACK_DISABLE_X;
+	else if (interp_params.flags & ELF_FDPIC_FLAG_EXEC_STACK)
+		executable_stack = EXSTACK_ENABLE_X;
+	else if (interp_params.flags & ELF_FDPIC_FLAG_NOEXEC_STACK)
+		executable_stack = EXSTACK_DISABLE_X;
+	else
+		executable_stack = EXSTACK_DEFAULT;
+
+	retval = -ENOEXEC;
+	if (stack_size == 0)
+		goto error;
+
+	if (elf_check_const_displacement(&interp_params.hdr))
+		interp_params.flags |= ELF_FDPIC_FLAG_CONSTDISP;
+
+	/* flush all traces of the currently running executable */
+	retval = flush_old_exec(bprm);
+	if (retval)
+		goto error;
+
+	/* there's now no turning back... the old userspace image is dead,
+	 * defunct, deceased, etc. after this point we have to exit via
+	 * error_kill */
+	set_personality(PER_LINUX_FDPIC);
+	set_binfmt(&elf_fdpic_format);
+
+	current->mm->start_code = 0;
+	current->mm->end_code = 0;
+	current->mm->start_stack = 0;
+	current->mm->start_data = 0;
+	current->mm->end_data = 0;
+	current->mm->context.exec_fdpic_loadmap = 0;
+	current->mm->context.interp_fdpic_loadmap = 0;
+
+	current->flags &= ~PF_FORKNOEXEC;
+
+#ifdef CONFIG_MMU
+	elf_fdpic_arch_lay_out_mm(&exec_params,
+				  &interp_params,
+				  &current->mm->start_stack,
+				  &current->mm->start_brk);
+#endif
+
+	/* do this so that we can load the interpreter, if need be
+	 * - we will change some of these later
+	 */
+	current->mm->rss = 0;
+
+#ifdef CONFIG_MMU
+	retval = setup_arg_pages(bprm, current->mm->start_stack, executable_stack);
+	if (retval < 0) {
+		send_sig(SIGKILL, current, 0);
+		goto error_kill;
+	}
+#endif
+
+	/* load the executable and interpreter into memory */
+	retval = elf_fdpic_map_file(&exec_params, bprm->file, current->mm, "executable");
+	if (retval < 0)
+		goto error_kill;
+
+	if (interpreter_name) {
+		retval = elf_fdpic_map_file(&interp_params, interpreter,
+					    current->mm, "interpreter");
+		if (retval < 0) {
+			printk(KERN_ERR "Unable to load interpreter\n");
+			goto error_kill;
+		}
+
+		allow_write_access(interpreter);
+		fput(interpreter);
+		interpreter = NULL;
+	}
+
+#ifdef CONFIG_MMU
+	if (!current->mm->start_brk)
+		current->mm->start_brk = current->mm->end_data;
+
+	current->mm->brk = current->mm->start_brk = PAGE_ALIGN(current->mm->start_brk);
+
+#else
+	/* create a stack and brk area big enough for everyone
+	 * - the brk heap starts at the bottom and works up
+	 * - the stack starts at the top and works down
+	 */
+	stack_size = (stack_size + PAGE_SIZE - 1) & PAGE_MASK;
+	if (stack_size < PAGE_SIZE * 2)
+		stack_size = PAGE_SIZE * 2;
+
+	down_write(&current->mm->mmap_sem);
+	current->mm->start_brk = do_mmap(NULL,
+					 0,
+					 stack_size,
+					 PROT_READ | PROT_WRITE | PROT_EXEC,
+					 MAP_PRIVATE | MAP_ANON | MAP_GROWSDOWN,
+					 0);
+
+	if (IS_ERR((void *) current->mm->start_brk)) {
+		up_write(&current->mm->mmap_sem);
+		retval = current->mm->start_brk;
+		current->mm->start_brk = 0;
+		goto error_kill;
+	}
+
+	if (do_mremap(current->mm->start_brk,
+		      stack_size,
+		      ksize((char *) current->mm->start_brk),
+		      0, 0
+		      ) == current->mm->start_brk
+	    )
+		stack_size = ksize((char *) current->mm->start_brk);
+	up_write(&current->mm->mmap_sem);
+
+	current->mm->brk = current->mm->start_brk;
+	current->mm->context.end_brk = current->mm->start_brk;
+	current->mm->context.end_brk += (stack_size > PAGE_SIZE) ? (stack_size - PAGE_SIZE) : 0;
+	current->mm->start_stack = current->mm->start_brk + stack_size;
+#endif
+
+	compute_creds(bprm);
+	current->flags &= ~PF_FORKNOEXEC;
+	if (create_elf_fdpic_tables(bprm, current->mm, &exec_params, &interp_params) < 0)
+		goto error_kill;
+
+	kdebug("- start_code  %lx",	(long) current->mm->start_code);
+	kdebug("- end_code    %lx",	(long) current->mm->end_code);
+	kdebug("- start_data  %lx",	(long) current->mm->start_data);
+	kdebug("- end_data    %lx",	(long) current->mm->end_data);
+	kdebug("- start_brk   %lx",	(long) current->mm->start_brk);
+	kdebug("- brk         %lx",	(long) current->mm->brk);
+	kdebug("- start_stack %lx",	(long) current->mm->start_stack);
+
+#ifdef ELF_FDPIC_PLAT_INIT
+	/*
+	 * The ABI may specify that certain registers be set up in special
+	 * ways (on i386 %edx is the address of a DT_FINI function, for
+	 * example.  This macro performs whatever initialization to
+	 * the regs structure is required.
+	 */
+	ELF_FDPIC_PLAT_INIT(regs,
+			    exec_params.map_addr,
+			    interp_params.map_addr,
+			    interp_params.dynamic_addr ?: exec_params.dynamic_addr
+			    );
+#endif
+
+	/* everything is now ready... get the userspace context ready to roll */
+	start_thread(regs,
+		     interp_params.entry_addr ?: exec_params.entry_addr,
+		     current->mm->start_stack);
+
+	if (unlikely(current->ptrace & PT_PTRACED)) {
+		if (current->ptrace & PT_TRACE_EXEC)
+			ptrace_notify ((PTRACE_EVENT_EXEC << 8) | SIGTRAP);
+		else
+			send_sig(SIGTRAP, current, 0);
+	}
+
+	retval = 0;
+
+error:
+	if (interpreter) {
+		allow_write_access(interpreter);
+		fput(interpreter);
+	}
+	if (interpreter_name)
+		kfree(interpreter_name);
+	if (exec_params.phdrs)
+		kfree(exec_params.phdrs);
+	if (exec_params.loadmap)
+		kfree(exec_params.loadmap);
+	if (interp_params.phdrs)
+		kfree(interp_params.phdrs);
+	if (interp_params.loadmap)
+		kfree(interp_params.loadmap);
+	return retval;
+
+	/* unrecoverable error - kill the process */
+ error_kill:
+	send_sig(SIGSEGV, current, 0);
+	goto error;
+
+} /* end load_elf_fdpic_binary() */
+
+/*****************************************************************************/
+/*
+ * present useful information to the program
+ */
+static int create_elf_fdpic_tables(struct linux_binprm *bprm,
+				   struct mm_struct *mm,
+				   struct elf_fdpic_params *exec_params,
+				   struct elf_fdpic_params *interp_params)
+{
+	unsigned long sp, csp, nitems;
+	elf_caddr_t *argv, *envp;
+	size_t platform_len = 0, len;
+	char *k_platform, *u_platform, *p;
+	long hwcap;
+	int loop;
+
+	/* we're going to shovel a whole load of stuff onto the stack */
+#ifdef CONFIG_MMU
+	sp = bprm->p;
+#else
+	sp = mm->start_stack;
+
+	/* stack the program arguments and environment */
+	if (elf_fdpic_transfer_args_to_stack(bprm, &sp) < 0)
+		return -EFAULT;
+#endif
+
+	/* get hold of platform and hardware capabilities masks for the machine
+	 * we are running on.  In some cases (Sparc), this info is impossible
+	 * to get, in others (i386) it is merely difficult.
+	 */
+	hwcap = ELF_HWCAP;
+	k_platform = ELF_PLATFORM;
+
+	if (k_platform) {
+		platform_len = strlen(k_platform) + 1;
+		sp -= platform_len;
+		if (__copy_to_user(u_platform, k_platform, platform_len) != 0)
+			return -EFAULT;
+	}
+
+	u_platform = (char *) sp;
+
+#if defined(__i386__) && defined(CONFIG_SMP)
+	/* in some cases (e.g. Hyper-Threading), we want to avoid L1 evictions
+	 * by the processes running on the same package. One thing we can do
+	 * is to shuffle the initial stack for them.
+	 *
+	 * the conditionals here are unneeded, but kept in to make the
+	 * code behaviour the same as pre change unless we have hyperthreaded
+	 * processors. This keeps Mr Marcelo Person happier but should be
+	 * removed for 2.5
+	 */
+	if (smp_num_siblings > 1)
+		sp = sp - ((current->pid % 64) << 7);
+#endif
+
+	sp &= ~7UL;
+
+	/* stack the load map(s) */
+	len = sizeof(struct elf32_fdpic_loadmap);
+	len += sizeof(struct elf32_fdpic_loadseg) * exec_params->loadmap->nsegs;
+	sp = (sp - len) & ~7UL;
+	exec_params->map_addr = sp;
+
+	if (copy_to_user((void *) sp, exec_params->loadmap, len) != 0)
+		return -EFAULT;
+
+	current->mm->context.exec_fdpic_loadmap = (unsigned long) sp;
+
+	if (interp_params->loadmap) {
+		len = sizeof(struct elf32_fdpic_loadmap);
+		len += sizeof(struct elf32_fdpic_loadseg) * interp_params->loadmap->nsegs;
+		sp = (sp - len) & ~7UL;
+		interp_params->map_addr = sp;
+
+		if (copy_to_user((void *) sp, interp_params->loadmap, len) != 0)
+			return -EFAULT;
+
+		current->mm->context.interp_fdpic_loadmap = (unsigned long) sp;
+	}
+
+	/* force 16 byte _final_ alignment here for generality */
+#define DLINFO_ITEMS 13
+
+	nitems = 1 + DLINFO_ITEMS + (k_platform ? 1 : 0);
+#ifdef DLINFO_ARCH_ITEMS
+	nitems += DLINFO_ARCH_ITEMS;
+#endif
+
+	csp = sp;
+	sp -= nitems * 2 * sizeof(unsigned long);
+	sp -= (bprm->envc + 1) * sizeof(char *);	/* envv[] */
+	sp -= (bprm->argc + 1) * sizeof(char *);	/* argv[] */
+	sp -= 1 * sizeof(unsigned long);		/* argc */
+
+	csp -= sp & 15UL;
+	sp -= sp & 15UL;
+
+	/* put the ELF interpreter info on the stack */
+#define NEW_AUX_ENT(nr, id, val)						\
+	do {									\
+		struct { unsigned long _id, _val; } *ent = (void *) csp;	\
+		__put_user((id), &ent[nr]._id);					\
+		__put_user((val), &ent[nr]._val);				\
+	} while (0)
+
+	csp -= 2 * sizeof(unsigned long);
+	NEW_AUX_ENT(0, AT_NULL, 0);
+	if (k_platform) {
+		csp -= 2 * sizeof(unsigned long);
+		NEW_AUX_ENT(0, AT_PLATFORM, (elf_addr_t)(unsigned long) u_platform);
+	}
+
+	csp -= DLINFO_ITEMS * 2 * sizeof(unsigned long);
+	NEW_AUX_ENT( 0, AT_HWCAP,		hwcap);
+	NEW_AUX_ENT( 1, AT_PAGESZ,		PAGE_SIZE);
+	NEW_AUX_ENT( 2, AT_CLKTCK,		CLOCKS_PER_SEC);
+	NEW_AUX_ENT( 3, AT_PHDR,		exec_params->ph_addr);
+	NEW_AUX_ENT( 4, AT_PHENT,		sizeof(struct elf_phdr));
+	NEW_AUX_ENT( 5, AT_PHNUM,		exec_params->hdr.e_phnum);
+	NEW_AUX_ENT( 6,	AT_BASE,		interp_params->elfhdr_addr);
+	NEW_AUX_ENT( 7, AT_FLAGS,		0);
+	NEW_AUX_ENT( 8, AT_ENTRY,		exec_params->entry_addr);
+	NEW_AUX_ENT( 9, AT_UID,			(elf_addr_t) current->uid);
+	NEW_AUX_ENT(10, AT_EUID,		(elf_addr_t) current->euid);
+	NEW_AUX_ENT(11, AT_GID,			(elf_addr_t) current->gid);
+	NEW_AUX_ENT(12, AT_EGID,		(elf_addr_t) current->egid);
+
+#ifdef ARCH_DLINFO
+	/* ARCH_DLINFO must come last so platform specific code can enforce
+	 * special alignment requirements on the AUXV if necessary (eg. PPC).
+	 */
+	ARCH_DLINFO;
+#endif
+#undef NEW_AUX_ENT
+
+	/* allocate room for argv[] and envv[] */
+	csp -= (bprm->envc + 1) * sizeof(elf_caddr_t);
+	envp = (elf_caddr_t *) csp;
+	csp -= (bprm->argc + 1) * sizeof(elf_caddr_t);
+	argv = (elf_caddr_t *) csp;
+
+	/* stack argc */
+	csp -= sizeof(unsigned long);
+	__put_user(bprm->argc, (unsigned long *) csp);
+
+	if (csp != sp)
+		BUG();
+
+	/* fill in the argv[] array */
+#ifdef CONFIG_MMU
+	current->mm->arg_start = bprm->p;
+#else
+	current->mm->arg_start = current->mm->start_stack - (MAX_ARG_PAGES * PAGE_SIZE - bprm->p);
+#endif
+
+	p = (char *) current->mm->arg_start;
+	for (loop = bprm->argc; loop > 0; loop--) {
+		__put_user((elf_caddr_t) p, argv++);
+		len = strnlen_user(p, PAGE_SIZE * MAX_ARG_PAGES);
+		if (!len || len > PAGE_SIZE * MAX_ARG_PAGES)
+			return -EINVAL;
+		p += len;
+	}
+	__put_user(NULL, argv);
+	current->mm->arg_end = (unsigned long) p;
+
+	/* fill in the envv[] array */
+	current->mm->env_start = (unsigned long) p;
+	for (loop = bprm->envc; loop > 0; loop--) {
+		__put_user((elf_caddr_t)(unsigned long) p, envp++);
+		len = strnlen_user(p, PAGE_SIZE * MAX_ARG_PAGES);
+		if (!len || len > PAGE_SIZE * MAX_ARG_PAGES)
+			return -EINVAL;
+		p += len;
+	}
+	__put_user(NULL, envp);
+	current->mm->env_end = (unsigned long) p;
+
+	mm->start_stack = (unsigned long) sp;
+	return 0;
+} /* end create_elf_fdpic_tables() */
+
+/*****************************************************************************/
+/*
+ * transfer the program arguments and environment from the holding pages onto
+ * the stack
+ */
+#ifndef CONFIG_MMU
+static int elf_fdpic_transfer_args_to_stack(struct linux_binprm *bprm, unsigned long *_sp)
+{
+	unsigned long index, stop, sp;
+	char *src;
+	int ret = 0;
+
+	stop = bprm->p >> PAGE_SHIFT;
+	sp = *_sp;
+
+	for (index = MAX_ARG_PAGES - 1; index >= stop; index--) {
+		src = kmap(bprm->page[index]);
+		sp -= PAGE_SIZE;
+		if (copy_to_user((void *) sp, src, PAGE_SIZE) != 0)
+			ret = -EFAULT;
+		kunmap(bprm->page[index]);
+		if (ret < 0)
+			goto out;
+	}
+
+	*_sp = (*_sp - (MAX_ARG_PAGES * PAGE_SIZE - bprm->p)) & ~15;
+
+ out:
+	return ret;
+} /* end elf_fdpic_transfer_args_to_stack() */
+#endif
+
+/*****************************************************************************/
+/*
+ * load the appropriate binary image (executable or interpreter) into memory
+ * - we assume no MMU is available
+ * - if no other PIC bits are set in params->hdr->e_flags
+ *   - we assume that the LOADable segments in the binary are independently relocatable
+ *   - we assume R/O executable segments are shareable
+ * - else
+ *   - we assume the loadable parts of the image to require fixed displacement
+ *   - the image is not shareable
+ */
+static int elf_fdpic_map_file(struct elf_fdpic_params *params,
+			      struct file *file,
+			      struct mm_struct *mm,
+			      const char *what)
+{
+	struct elf32_fdpic_loadmap *loadmap;
+#ifdef CONFIG_MMU
+	struct elf32_fdpic_loadseg *mseg;
+#endif
+	struct elf32_fdpic_loadseg *seg;
+	struct elf32_phdr *phdr;
+	unsigned long load_addr, stop;
+	unsigned nloads, tmp;
+	size_t size;
+	int loop, ret;
+
+	/* allocate a load map table */
+	nloads = 0;
+	for (loop = 0; loop < params->hdr.e_phnum; loop++)
+		if (params->phdrs[loop].p_type == PT_LOAD)
+			nloads++;
+
+	if (nloads == 0)
+		return -ELIBBAD;
+
+	size = sizeof(*loadmap) + nloads * sizeof(*seg);
+	loadmap = kmalloc(size, GFP_KERNEL);
+	if (!loadmap)
+		return -ENOMEM;
+
+	params->loadmap = loadmap;
+	memset(loadmap, 0, size);
+
+	loadmap->version = ELF32_FDPIC_LOADMAP_VERSION;
+	loadmap->nsegs = nloads;
+
+	load_addr = params->load_addr;
+	seg = loadmap->segs;
+
+	/* map the requested LOADs into the memory space */
+	switch (params->flags & ELF_FDPIC_FLAG_ARRANGEMENT) {
+	case ELF_FDPIC_FLAG_CONSTDISP:
+	case ELF_FDPIC_FLAG_CONTIGUOUS:
+#ifndef CONFIG_MMU
+		ret = elf_fdpic_map_file_constdisp_on_uclinux(params, file, mm);
+		if (ret < 0)
+			return ret;
+		break;
+#endif
+	default:
+		ret = elf_fdpic_map_file_by_direct_mmap(params, file, mm);
+		if (ret < 0)
+			return ret;
+		break;
+	}
+
+	/* map the entry point */
+	if (params->hdr.e_entry) {
+		seg = loadmap->segs;
+		for (loop = loadmap->nsegs; loop > 0; loop--, seg++) {
+			if (params->hdr.e_entry >= seg->p_vaddr &&
+			    params->hdr.e_entry < seg->p_vaddr + seg->p_memsz
+			    ) {
+				params->entry_addr =
+					(params->hdr.e_entry - seg->p_vaddr) + seg->addr;
+				break;
+			}
+		}
+	}
+
+	/* determine where the program header table has wound up if mapped */
+	stop = params->hdr.e_phoff + params->hdr.e_phnum * sizeof (struct elf_phdr);
+	phdr = params->phdrs;
+
+	for (loop = 0; loop < params->hdr.e_phnum; loop++, phdr++) {
+		if (phdr->p_type != PT_LOAD)
+			continue;
+
+		if (phdr->p_offset > params->hdr.e_phoff ||
+		    phdr->p_offset + phdr->p_filesz < stop)
+			continue;
+
+		seg = loadmap->segs;
+		for (loop = loadmap->nsegs; loop > 0; loop--, seg++) {
+			if (phdr->p_vaddr >= seg->p_vaddr &&
+			    phdr->p_vaddr + phdr->p_filesz <= seg->p_vaddr + seg->p_memsz
+			    ) {
+				params->ph_addr = (phdr->p_vaddr - seg->p_vaddr) + seg->addr +
+					params->hdr.e_phoff - phdr->p_offset;
+				break;
+			}
+		}
+		break;
+	}
+
+	/* determine where the dynamic section has wound up if there is one */
+	phdr = params->phdrs;
+	for (loop = 0; loop < params->hdr.e_phnum; loop++, phdr++) {
+		if (phdr->p_type != PT_DYNAMIC)
+			continue;
+
+		seg = loadmap->segs;
+		for (loop = loadmap->nsegs; loop > 0; loop--, seg++) {
+			if (phdr->p_vaddr >= seg->p_vaddr &&
+			    phdr->p_vaddr + phdr->p_memsz <= seg->p_vaddr + seg->p_memsz
+			    ) {
+				params->dynamic_addr = (phdr->p_vaddr - seg->p_vaddr) + seg->addr;
+
+				/* check the dynamic section contains at least one item, and that
+				 * the last item is a NULL entry */
+				if (phdr->p_memsz == 0 ||
+				    phdr->p_memsz % sizeof(Elf32_Dyn) != 0)
+					goto dynamic_error;
+
+				tmp = phdr->p_memsz / sizeof(Elf32_Dyn);
+				if (((Elf32_Dyn *) params->dynamic_addr)[tmp - 1].d_tag != 0)
+					goto dynamic_error;
+				break;
+			}
+		}
+		break;
+	}
+
+	/* now elide adjacent segments in the load map on MMU linux
+	 * - on uClinux the holes between may actually be filled with system stuff or stuff from
+	 *   other processes
+	 */
+#ifdef CONFIG_MMU
+	nloads = loadmap->nsegs;
+	mseg = loadmap->segs;
+	seg = mseg + 1;
+	for (loop = 1; loop < nloads; loop++) {
+		/* see if we have a candidate for merging */
+		if (seg->p_vaddr - mseg->p_vaddr == seg->addr - mseg->addr) {
+			load_addr = PAGE_ALIGN(mseg->addr + mseg->p_memsz);
+			if (load_addr == (seg->addr & PAGE_MASK)) {
+				mseg->p_memsz += load_addr - (mseg->addr + mseg->p_memsz);
+				mseg->p_memsz += seg->addr & ~PAGE_MASK;
+				mseg->p_memsz += seg->p_memsz;
+				loadmap->nsegs--;
+				continue;
+			}
+		}
+
+		mseg++;
+		if (mseg != seg)
+			*mseg = *seg;
+	}
+#endif
+
+	kdebug("Mapped Object [%s]:", what);
+	kdebug("- elfhdr   : %lx", params->elfhdr_addr);
+	kdebug("- entry    : %lx", params->entry_addr);
+	kdebug("- PHDR[]   : %lx", params->ph_addr);
+	kdebug("- DYNAMIC[]: %lx", params->dynamic_addr);
+	seg = loadmap->segs;
+	for (loop = 0; loop < loadmap->nsegs; loop++, seg++)
+		kdebug("- LOAD[%d] : %08x-%08x [va=%x ms=%x]",
+		       loop,
+		       seg->addr, seg->addr + seg->p_memsz - 1,
+		       seg->p_vaddr, seg->p_memsz);
+
+	return 0;
+
+ dynamic_error:
+	printk("ELF FDPIC %s with invalid DYNAMIC section (inode=%lu)\n",
+	       what, file->f_dentry->d_inode->i_ino);
+	return -ELIBBAD;
+} /* end elf_fdpic_map_file() */
+
+/*****************************************************************************/
+/*
+ * map a file with constant displacement under uClinux
+ */
+#ifndef CONFIG_MMU
+static int elf_fdpic_map_file_constdisp_on_uclinux(struct elf_fdpic_params *params,
+						   struct file *file,
+						   struct mm_struct *mm)
+{
+	struct elf32_fdpic_loadseg *seg;
+	struct elf32_phdr *phdr;
+	unsigned long load_addr, base = ULONG_MAX, top = 0, maddr = 0, mflags;
+	loff_t fpos;
+	int loop, ret;
+
+	load_addr = params->load_addr;
+	seg = params->loadmap->segs;
+
+	/* determine the bounds of the contiguous overall allocation we must make */
+	phdr = params->phdrs;
+	for (loop = 0; loop < params->hdr.e_phnum; loop++, phdr++) {
+		if (params->phdrs[loop].p_type != PT_LOAD)
+			continue;
+
+		if (base > phdr->p_vaddr)
+			base = phdr->p_vaddr;
+		if (top < phdr->p_vaddr + phdr->p_memsz)
+			top = phdr->p_vaddr + phdr->p_memsz;
+	}
+
+	/* allocate one big anon block for everything */
+	mflags = MAP_PRIVATE;
+	if (params->flags & ELF_FDPIC_FLAG_EXECUTABLE)
+		mflags |= MAP_EXECUTABLE;
+
+	down_write(&mm->mmap_sem);
+	maddr = do_mmap(NULL, load_addr, top - base,
+			PROT_READ | PROT_WRITE | PROT_EXEC, mflags, 0);
+	up_write(&mm->mmap_sem);
+	if (IS_ERR((void *) maddr))
+		return (int) maddr;
+
+	if (load_addr != 0)
+		load_addr += PAGE_ALIGN(top - base);
+
+	/* and then load the file segments into it */
+	phdr = params->phdrs;
+	for (loop = 0; loop < params->hdr.e_phnum; loop++, phdr++) {
+		if (params->phdrs[loop].p_type != PT_LOAD)
+			continue;
+
+		fpos = phdr->p_offset;
+
+		seg->addr = maddr + (phdr->p_vaddr - base);
+		seg->p_vaddr = phdr->p_vaddr;
+		seg->p_memsz = phdr->p_memsz;
+
+		ret = file->f_op->read(file, (void *) seg->addr, phdr->p_filesz, &fpos);
+		if (ret < 0)
+			return ret;
+
+		/* map the ELF header address if in this segment */
+		if (phdr->p_offset == 0)
+			params->elfhdr_addr = seg->addr;
+
+		/* clear any space allocated but not loaded */
+		if (phdr->p_filesz < phdr->p_memsz)
+			clear_user((void *) (seg->addr + phdr->p_filesz),
+				   phdr->p_memsz - phdr->p_filesz);
+
+		if (mm) {
+			if (phdr->p_flags & PF_X) {
+				mm->start_code = seg->addr;
+				mm->end_code = seg->addr + phdr->p_memsz;
+			}
+			else if (!mm->start_data) {
+				mm->start_data = seg->addr;
+#ifndef CONFIG_MMU
+				mm->end_data = seg->addr + phdr->p_memsz;
+#endif
+			}
+
+#ifdef CONFIG_MMU
+			if (seg->addr + phdr->p_memsz > mm->end_data)
+				mm->end_data = seg->addr + phdr->p_memsz;
+#endif
+		}
+
+		seg++;
+	}
+
+	return 0;
+} /* end elf_fdpic_map_file_constdisp_on_uclinux() */
+#endif
+
+/*****************************************************************************/
+/*
+ * map a binary by direct mmap() of the individual PT_LOAD segments
+ */
+static int elf_fdpic_map_file_by_direct_mmap(struct elf_fdpic_params *params,
+					     struct file *file,
+					     struct mm_struct *mm)
+{
+	struct elf32_fdpic_loadseg *seg;
+	struct elf32_phdr *phdr;
+	unsigned long load_addr, delta_vaddr;
+	int loop, dvset;
+
+	load_addr = params->load_addr;
+	delta_vaddr = 0;
+	dvset = 0;
+
+	seg = params->loadmap->segs;
+
+	/* deal with each load segment separately */
+	phdr = params->phdrs;
+	for (loop = 0; loop < params->hdr.e_phnum; loop++, phdr++) {
+		unsigned long maddr, disp, excess, excess1;
+		int prot = 0, flags;
+
+		if (phdr->p_type != PT_LOAD)
+			continue;
+
+		kdebug("[LOAD] va=%lx of=%lx fs=%lx ms=%lx",
+		       (unsigned long) phdr->p_vaddr,
+		       (unsigned long) phdr->p_offset,
+		       (unsigned long) phdr->p_filesz,
+		       (unsigned long) phdr->p_memsz);
+
+		/* determine the mapping parameters */
+		if (phdr->p_flags & PF_R) prot |= PROT_READ;
+		if (phdr->p_flags & PF_W) prot |= PROT_WRITE;
+		if (phdr->p_flags & PF_X) prot |= PROT_EXEC;
+
+		flags = MAP_PRIVATE | MAP_DENYWRITE;
+		if (params->flags & ELF_FDPIC_FLAG_EXECUTABLE)
+			flags |= MAP_EXECUTABLE;
+
+		maddr = 0;
+
+		switch (params->flags & ELF_FDPIC_FLAG_ARRANGEMENT) {
+		case ELF_FDPIC_FLAG_INDEPENDENT:
+			/* PT_LOADs are independently locatable */
+			break;
+
+		case ELF_FDPIC_FLAG_HONOURVADDR:
+			/* the specified virtual address must be honoured */
+			maddr = phdr->p_vaddr;
+			flags |= MAP_FIXED;
+			break;
+
+		case ELF_FDPIC_FLAG_CONSTDISP:
+			/* constant displacement
+			 * - can be mapped anywhere, but must be mapped as a unit
+			 */
+			if (!dvset) {
+				maddr = load_addr;
+				delta_vaddr = phdr->p_vaddr;
+				dvset = 1;
+			}
+			else {
+				maddr = load_addr + phdr->p_vaddr - delta_vaddr;
+				flags |= MAP_FIXED;
+			}
+			break;
+
+		case ELF_FDPIC_FLAG_CONTIGUOUS:
+			/* contiguity handled later */
+			break;
+
+		default:
+			BUG();
+		}
+
+		maddr &= PAGE_MASK;
+
+		/* create the mapping */
+		disp = phdr->p_vaddr & ~PAGE_MASK;
+		down_write(&mm->mmap_sem);
+		maddr = do_mmap(file, maddr, phdr->p_memsz + disp, prot, flags,
+				phdr->p_offset - disp);
+		up_write(&mm->mmap_sem);
+
+		kdebug("mmap[%d] <file> sz=%lx pr=%x fl=%x of=%lx --> %08lx",
+		       loop, phdr->p_memsz + disp, prot, flags, phdr->p_offset - disp,
+		       maddr);
+
+		if (IS_ERR((void *) maddr))
+			return (int) maddr;
+
+		if ((params->flags & ELF_FDPIC_FLAG_ARRANGEMENT) == ELF_FDPIC_FLAG_CONTIGUOUS)
+			load_addr += PAGE_ALIGN(phdr->p_memsz + disp);
+
+		seg->addr = maddr + disp;
+		seg->p_vaddr = phdr->p_vaddr;
+		seg->p_memsz = phdr->p_memsz;
+
+		/* map the ELF header address if in this segment */
+		if (phdr->p_offset == 0)
+			params->elfhdr_addr = seg->addr;
+
+		/* clear the bit between beginning of mapping and beginning of PT_LOAD */
+		if (prot & PROT_WRITE && disp > 0) {
+			kdebug("clear[%d] ad=%lx sz=%lx", loop, maddr, disp);
+			clear_user((void *) maddr, disp);
+			maddr += disp;
+		}
+
+		/* clear any space allocated but not loaded
+		 * - on uClinux we can just clear the lot
+		 * - on MMU linux we'll get a SIGBUS beyond the last page
+		 *   extant in the file
+		 */
+		excess = phdr->p_memsz - phdr->p_filesz;
+		excess1 = PAGE_SIZE - ((maddr + phdr->p_filesz) & ~PAGE_MASK);
+
+#ifdef CONFIG_MMU
+
+		if (excess > excess1) {
+			unsigned long xaddr = maddr + phdr->p_filesz + excess1;
+			unsigned long xmaddr;
+
+			flags |= MAP_FIXED | MAP_ANONYMOUS;
+			down_write(&mm->mmap_sem);
+			xmaddr = do_mmap(NULL, xaddr, excess - excess1, prot, flags, 0);
+			up_write(&mm->mmap_sem);
+
+			kdebug("mmap[%d] <anon>"
+			       " ad=%lx sz=%lx pr=%x fl=%x of=0 --> %08lx",
+			       loop, xaddr, excess - excess1, prot, flags, xmaddr);
+
+			if (xmaddr != xaddr)
+				return -ENOMEM;
+		}
+
+		if (prot & PROT_WRITE && excess1 > 0) {
+			kdebug("clear[%d] ad=%lx sz=%lx",
+			       loop, maddr + phdr->p_filesz, excess1);
+			clear_user((void *) maddr + phdr->p_filesz, excess1);
+		}
+
+#else
+		if (excess > 0) {
+			kdebug("clear[%d] ad=%lx sz=%lx",
+			       loop, maddr + phdr->p_filesz, excess);
+			clear_user((void *) maddr + phdr->p_filesz, excess);
+		}
+#endif
+
+		if (mm) {
+			if (phdr->p_flags & PF_X) {
+				mm->start_code = maddr;
+				mm->end_code = maddr + phdr->p_memsz;
+			}
+			else if (!mm->start_data) {
+				mm->start_data = maddr;
+				mm->end_data = maddr + phdr->p_memsz;
+			}
+		}
+
+		seg++;
+	}
+
+	return 0;
+} /* end elf_fdpic_map_file_by_direct_mmap() */
diff -Nru a/fs/binfmt_em86.c b/fs/binfmt_em86.c
--- a/fs/binfmt_em86.c	2005-01-10 20:11:20 -08:00
+++ b/fs/binfmt_em86.c	2005-01-10 20:11:20 -08:00
@@ -95,7 +95,7 @@
 	return search_binary_handler(bprm, regs);
 }
 
-struct linux_binfmt em86_format = {
+static struct linux_binfmt em86_format = {
 	.module		= THIS_MODULE,
 	.load_binary	= load_em86,
 };
diff -Nru a/fs/binfmt_misc.c b/fs/binfmt_misc.c
--- a/fs/binfmt_misc.c	2005-01-10 20:11:18 -08:00
+++ b/fs/binfmt_misc.c	2005-01-10 20:11:18 -08:00
@@ -509,7 +509,8 @@
 		inode->i_gid = 0;
 		inode->i_blksize = PAGE_CACHE_SIZE;
 		inode->i_blocks = 0;
-		inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+		inode->i_atime = inode->i_mtime = inode->i_ctime =
+			current_fs_time(inode->i_sb);
 	}
 	return inode;
 }
diff -Nru a/fs/binfmt_script.c b/fs/binfmt_script.c
--- a/fs/binfmt_script.c	2005-01-10 20:11:16 -08:00
+++ b/fs/binfmt_script.c	2005-01-10 20:11:16 -08:00
@@ -96,7 +96,7 @@
 	return search_binary_handler(bprm,regs);
 }
 
-struct linux_binfmt script_format = {
+static struct linux_binfmt script_format = {
 	.module		= THIS_MODULE,
 	.load_binary	= load_script,
 };
diff -Nru a/fs/binfmt_som.c b/fs/binfmt_som.c
--- a/fs/binfmt_som.c	2005-01-10 20:11:18 -08:00
+++ b/fs/binfmt_som.c	2005-01-10 20:11:18 -08:00
@@ -254,7 +254,7 @@
 
 	set_binfmt(&som_format);
 	compute_creds(bprm);
-	setup_arg_pages(bprm, EXSTACK_DEFAULT);
+	setup_arg_pages(bprm, STACK_TOP, EXSTACK_DEFAULT);
 
 	create_som_tables(bprm);
 
diff -Nru a/fs/bio.c b/fs/bio.c
--- a/fs/bio.c	2005-01-10 20:11:20 -08:00
+++ b/fs/bio.c	2005-01-10 20:11:20 -08:00
@@ -91,7 +91,7 @@
 /*
  * default destructor for a bio allocated with bio_alloc()
  */
-void bio_destructor(struct bio *bio)
+static void bio_destructor(struct bio *bio)
 {
 	const int pool_idx = BIO_POOL_IDX(bio);
 	struct biovec_pool *bp = bvec_array + pool_idx;
diff -Nru a/fs/buffer.c b/fs/buffer.c
--- a/fs/buffer.c	2005-01-10 20:11:19 -08:00
+++ b/fs/buffer.c	2005-01-10 20:11:19 -08:00
@@ -347,18 +347,22 @@
 		goto out_putf;
 	}
 
-	/* We need to protect against concurrent writers.. */
-	down(&mapping->host->i_sem);
 	current->flags |= PF_SYNCWRITE;
 	ret = filemap_fdatawrite(mapping);
+
+	/*
+	 * We need to protect against concurrent writers,
+	 * which could cause livelocks in fsync_buffers_list
+	 */
+	down(&mapping->host->i_sem);
 	err = file->f_op->fsync(file, file->f_dentry, 0);
 	if (!ret)
 		ret = err;
+	up(&mapping->host->i_sem);
 	err = filemap_fdatawait(mapping);
 	if (!ret)
 		ret = err;
 	current->flags &= ~PF_SYNCWRITE;
-	up(&mapping->host->i_sem);
 
 out_putf:
 	fput(file);
@@ -383,17 +387,17 @@
 
 	mapping = file->f_mapping;
 
-	down(&mapping->host->i_sem);
 	current->flags |= PF_SYNCWRITE;
 	ret = filemap_fdatawrite(mapping);
+	down(&mapping->host->i_sem);
 	err = file->f_op->fsync(file, file->f_dentry, 1);
 	if (!ret)
 		ret = err;
+	up(&mapping->host->i_sem);
 	err = filemap_fdatawait(mapping);
 	if (!ret)
 		ret = err;
 	current->flags &= ~PF_SYNCWRITE;
-	up(&mapping->host->i_sem);
 
 out_putf:
 	fput(file);
@@ -422,6 +426,7 @@
 	struct buffer_head *bh;
 	struct buffer_head *head;
 	struct page *page;
+	int all_mapped = 1;
 
 	index = block >> (PAGE_CACHE_SHIFT - bd_inode->i_blkbits);
 	page = find_get_page(bd_mapping, index);
@@ -439,14 +444,23 @@
 			get_bh(bh);
 			goto out_unlock;
 		}
+		if (!buffer_mapped(bh))
+			all_mapped = 0;
 		bh = bh->b_this_page;
 	} while (bh != head);
 
-	printk("__find_get_block_slow() failed. "
-		"block=%llu, b_blocknr=%llu\n",
-		(unsigned long long)block, (unsigned long long)bh->b_blocknr);
-	printk("b_state=0x%08lx, b_size=%u\n", bh->b_state, bh->b_size);
-	printk("device blocksize: %d\n", 1 << bd_inode->i_blkbits);
+	/* we might be here because some of the buffers on this page are
+	 * not mapped.  This is due to various races between
+	 * file io on the block device and getblk.  It gets dealt with
+	 * elsewhere, don't buffer_error if we had some unmapped buffers
+	 */
+	if (all_mapped) {
+		printk("__find_get_block_slow() failed. "
+			"block=%llu, b_blocknr=%llu\n",
+			(unsigned long long)block, (unsigned long long)bh->b_blocknr);
+		printk("b_state=0x%08lx, b_size=%u\n", bh->b_state, bh->b_size);
+		printk("device blocksize: %d\n", 1 << bd_inode->i_blkbits);
+	}
 out_unlock:
 	spin_unlock(&bd_mapping->private_lock);
 	page_cache_release(page);
@@ -1089,18 +1103,16 @@
 {
 	struct buffer_head *head = page_buffers(page);
 	struct buffer_head *bh = head;
-	unsigned int b_state;
-
-	b_state = 1 << BH_Mapped;
-	if (PageUptodate(page))
-		b_state |= 1 << BH_Uptodate;
+	int uptodate = PageUptodate(page);
 
 	do {
-		if (!(bh->b_state & (1 << BH_Mapped))) {
+		if (!buffer_mapped(bh)) {
 			init_buffer(bh, NULL, NULL);
 			bh->b_bdev = bdev;
 			bh->b_blocknr = block;
-			bh->b_state = b_state;
+			if (uptodate)
+				set_buffer_uptodate(bh);
+			set_buffer_mapped(bh);
 		}
 		block++;
 		bh = bh->b_this_page;
@@ -1129,8 +1141,10 @@
 
 	if (page_has_buffers(page)) {
 		bh = page_buffers(page);
-		if (bh->b_size == size)
+		if (bh->b_size == size) {
+			init_page_buffers(page, bdev, block, size);
 			return page;
+		}
 		if (!try_to_free_buffers(page))
 			goto failed;
 	}
diff -Nru a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
--- a/fs/cifs/cifsfs.c	2005-01-10 20:11:19 -08:00
+++ b/fs/cifs/cifsfs.c	2005-01-10 20:11:19 -08:00
@@ -853,8 +853,8 @@
 	GlobalCurrentXid = 0;
 	GlobalTotalActiveXid = 0;
 	GlobalMaxActiveXid = 0;
-	GlobalSMBSeslock = RW_LOCK_UNLOCKED;
-	GlobalMid_Lock = SPIN_LOCK_UNLOCKED;
+	rwlock_init(&GlobalSMBSeslock);
+	spin_lock_init(&GlobalMid_Lock);
 
 	if(cifs_max_pending < 2) {
 		cifs_max_pending = 2;
diff -Nru a/fs/cifs/connect.c b/fs/cifs/connect.c
--- a/fs/cifs/connect.c	2005-01-10 20:11:22 -08:00
+++ b/fs/cifs/connect.c	2005-01-10 20:11:22 -08:00
@@ -1489,6 +1489,8 @@
 			sb->s_maxbytes = (u64) 1 << 31;	/* 2 GB */
 	}
 
+	sb->s_time_gran = 100;
+
 /* on error free sesinfo and tcon struct if needed */
 	if (rc) {
 		/* if session setup failed, use count is zero but
diff -Nru a/fs/cifs/file.c b/fs/cifs/file.c
--- a/fs/cifs/file.c	2005-01-10 20:11:15 -08:00
+++ b/fs/cifs/file.c	2005-01-10 20:11:15 -08:00
@@ -709,8 +709,9 @@
 	/* since the write may have blocked check these pointers again */
 	if(file->f_dentry) {
 		if(file->f_dentry->d_inode) {
-			file->f_dentry->d_inode->i_ctime = file->f_dentry->d_inode->i_mtime =
-				CURRENT_TIME;
+			struct inode *inode = file->f_dentry->d_inode;
+			inode->i_ctime = inode->i_mtime =
+				current_fs_time(inode->i_sb);
 			if (total_written > 0) {
 				if (*poffset > file->f_dentry->d_inode->i_size)
 					i_size_write(file->f_dentry->d_inode, *poffset);
@@ -903,7 +904,7 @@
 					to-from, &offset);
 			read_lock(&GlobalSMBSeslock);
 		/* Does mm or vfs already set times? */
-			inode->i_atime = inode->i_mtime = CURRENT_TIME;
+			inode->i_atime = inode->i_mtime = current_fs_time(inode->i_sb);
 			if ((bytes_written > 0) && (offset)) {
 				rc = 0;
 			} else if(bytes_written < 0) {
@@ -1493,7 +1494,8 @@
 		cFYI(1,("Bytes read %d ",rc));
 	}
                                                                                                                            
-	file->f_dentry->d_inode->i_atime = CURRENT_TIME;
+	file->f_dentry->d_inode->i_atime =
+		current_fs_time(file->f_dentry->d_inode->i_sb);
                                                                                                                            
 	if(PAGE_CACHE_SIZE > rc) {
 		memset(read_data+rc, 0, PAGE_CACHE_SIZE - rc);
diff -Nru a/fs/cifs/inode.c b/fs/cifs/inode.c
--- a/fs/cifs/inode.c	2005-01-10 20:11:15 -08:00
+++ b/fs/cifs/inode.c	2005-01-10 20:11:15 -08:00
@@ -451,7 +451,7 @@
 	cifsInode = CIFS_I(direntry->d_inode);
 	cifsInode->time = 0;	/* will force revalidate to get info when needed */
 	direntry->d_inode->i_ctime = inode->i_ctime = inode->i_mtime =
-	    CURRENT_TIME;
+	    current_fs_time(inode->i_sb);
 	cifsInode = CIFS_I(inode);
 	cifsInode->time = 0;	/* force revalidate of dir as well */
 
@@ -564,7 +564,7 @@
 	cifsInode = CIFS_I(direntry->d_inode);
 	cifsInode->time = 0;	/* force revalidate to go get info when needed */
 	direntry->d_inode->i_ctime = inode->i_ctime = inode->i_mtime =
-	    CURRENT_TIME;
+	    current_fs_time(inode->i_sb);
 
 	if (full_path)
 		kfree(full_path);
diff -Nru a/fs/cifs/misc.c b/fs/cifs/misc.c
--- a/fs/cifs/misc.c	2005-01-10 20:11:22 -08:00
+++ b/fs/cifs/misc.c	2005-01-10 20:11:22 -08:00
@@ -125,7 +125,7 @@
 		INIT_LIST_HEAD(&ret_buf->openFileList);
 		init_MUTEX(&ret_buf->tconSem);
 #ifdef CONFIG_CIFS_STATS
-		ret_buf->stat_lock = SPIN_LOCK_UNLOCKED;
+		spin_lock_init(&ret_buf->stat_lock);
 #endif
 		write_unlock(&GlobalSMBSeslock);
 	}
diff -Nru a/fs/coda/dir.c b/fs/coda/dir.c
--- a/fs/coda/dir.c	2005-01-10 20:11:16 -08:00
+++ b/fs/coda/dir.c	2005-01-10 20:11:16 -08:00
@@ -183,7 +183,7 @@
 	/* optimistically we can also act as if our nose bleeds. The
          * granularity of the mtime is coarse anyways so we might actually be
          * right most of the time. Note: we only do this for directories. */
-	dir->i_mtime = dir->i_ctime = CURRENT_TIME;
+	dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC;
 #endif
 	if (link)
 		dir->i_nlink += link;
diff -Nru a/fs/coda/file.c b/fs/coda/file.c
--- a/fs/coda/file.c	2005-01-10 20:11:18 -08:00
+++ b/fs/coda/file.c	2005-01-10 20:11:18 -08:00
@@ -83,7 +83,7 @@
 
 	coda_inode->i_size = host_inode->i_size;
 	coda_inode->i_blocks = (coda_inode->i_size + 511) >> 9;
-	coda_inode->i_mtime = coda_inode->i_ctime = CURRENT_TIME;
+	coda_inode->i_mtime = coda_inode->i_ctime = CURRENT_TIME_SEC;
 	up(&coda_inode->i_sem);
 
 	return ret;
diff -Nru a/fs/coda/inode.c b/fs/coda/inode.c
--- a/fs/coda/inode.c	2005-01-10 20:11:19 -08:00
+++ b/fs/coda/inode.c	2005-01-10 20:11:19 -08:00
@@ -253,7 +253,7 @@
 	
 	memset(&vattr, 0, sizeof(vattr)); 
 
-	inode->i_ctime = CURRENT_TIME;
+	inode->i_ctime = CURRENT_TIME_SEC;
 	coda_iattr_to_vattr(iattr, &vattr);
 	vattr.va_type = C_VNON; /* cannot set type */
 
diff -Nru a/fs/coda/psdev.c b/fs/coda/psdev.c
--- a/fs/coda/psdev.c	2005-01-10 20:11:20 -08:00
+++ b/fs/coda/psdev.c	2005-01-10 20:11:20 -08:00
@@ -22,7 +22,6 @@
 #include <linux/kernel.h>
 #include <linux/major.h>
 #include <linux/time.h>
-#include <linux/lp.h>
 #include <linux/slab.h>
 #include <linux/ioport.h>
 #include <linux/fcntl.h>
diff -Nru a/fs/dcache.c b/fs/dcache.c
--- a/fs/dcache.c	2005-01-10 20:11:16 -08:00
+++ b/fs/dcache.c	2005-01-10 20:11:16 -08:00
@@ -156,7 +156,7 @@
 		spin_unlock(&dcache_lock);
 		return;
 	}
-			
+
 	/*
 	 * AV: ->d_delete() is _NOT_ allowed to block now.
 	 */
@@ -392,6 +392,8 @@
 		struct dentry *dentry;
 		struct list_head *tmp;
 
+		cond_resched_lock(&dcache_lock);
+
 		tmp = dentry_unused.prev;
 		if (tmp == &dentry_unused)
 			break;
@@ -548,6 +550,13 @@
  * list for prune_dcache(). We descend to the next level
  * whenever the d_subdirs list is non-empty and continue
  * searching.
+ *
+ * It returns zero iff there are no unused children,
+ * otherwise  it returns the number of children moved to
+ * the end of the unused list. This may not be the total
+ * number of unused children, because select_parent can
+ * drop the lock and return early due to latency
+ * constraints.
  */
 static int select_parent(struct dentry * parent)
 {
@@ -577,6 +586,15 @@
 			dentry_stat.nr_unused++;
 			found++;
 		}
+
+		/*
+		 * We can return to the caller if we have found some (this
+		 * ensures forward progress). We'll be coming back to find
+		 * the rest.
+		 */
+		if (found && need_resched())
+			goto out;
+
 		/*
 		 * Descend a level if the d_subdirs list is non-empty.
 		 */
@@ -601,6 +619,7 @@
 #endif
 		goto resume;
 	}
+out:
 	spin_unlock(&dcache_lock);
 	return found;
 }
@@ -718,7 +737,7 @@
 
 	atomic_set(&dentry->d_count, 1);
 	dentry->d_flags = DCACHE_UNHASHED;
-	dentry->d_lock = SPIN_LOCK_UNLOCKED;
+	spin_lock_init(&dentry->d_lock);
 	dentry->d_inode = NULL;
 	dentry->d_parent = NULL;
 	dentry->d_sb = NULL;
@@ -784,6 +803,54 @@
 }
 
 /**
+ * d_instantiate_unique - instantiate a non-aliased dentry
+ * @entry: dentry to instantiate
+ * @inode: inode to attach to this dentry
+ *
+ * Fill in inode information in the entry. On success, it returns NULL.
+ * If an unhashed alias of "entry" already exists, then we return the
+ * aliased dentry instead.
+ *
+ * Note that in order to avoid conflicts with rename() etc, the caller
+ * had better be holding the parent directory semaphore.
+ */
+struct dentry *d_instantiate_unique(struct dentry *entry, struct inode *inode)
+{
+	struct dentry *alias;
+	int len = entry->d_name.len;
+	const char *name = entry->d_name.name;
+	unsigned int hash = entry->d_name.hash;
+
+	BUG_ON(!list_empty(&entry->d_alias));
+	spin_lock(&dcache_lock);
+	if (!inode)
+		goto do_negative;
+	list_for_each_entry(alias, &inode->i_dentry, d_alias) {
+		struct qstr *qstr = &alias->d_name;
+
+		if (qstr->hash != hash)
+			continue;
+		if (alias->d_parent != entry->d_parent)
+			continue;
+		if (qstr->len != len)
+			continue;
+		if (memcmp(qstr->name, name, len))
+			continue;
+		dget_locked(alias);
+		spin_unlock(&dcache_lock);
+		BUG_ON(!d_unhashed(alias));
+		return alias;
+	}
+	list_add(&entry->d_alias, &inode->i_dentry);
+do_negative:
+	entry->d_inode = inode;
+	spin_unlock(&dcache_lock);
+	security_d_instantiate(entry, inode);
+	return NULL;
+}
+EXPORT_SYMBOL(d_instantiate_unique);
+
+/**
  * d_alloc_root - allocate root dentry
  * @root_inode: inode to allocate the root for
  *
@@ -1574,14 +1641,21 @@
 {
 	int loop;
 
+	/* If hashes are distributed across NUMA nodes, defer
+	 * hash allocation until vmalloc space is available.
+	 */
+	if (hashdist)
+		return;
+
 	dentry_hashtable =
 		alloc_large_system_hash("Dentry cache",
 					sizeof(struct hlist_head),
 					dhash_entries,
 					13,
-					0,
+					HASH_EARLY,
 					&d_hash_shift,
-					&d_hash_mask);
+					&d_hash_mask,
+					0);
 
 	for (loop = 0; loop < (1 << d_hash_shift); loop++)
 		INIT_HLIST_HEAD(&dentry_hashtable[loop]);
@@ -1589,6 +1663,8 @@
 
 static void __init dcache_init(unsigned long mempages)
 {
+	int loop;
+
 	/* 
 	 * A constructor could be added for stable state like the lists,
 	 * but it is probably not worth it because of the cache nature
@@ -1601,6 +1677,23 @@
 					 NULL, NULL);
 	
 	set_shrinker(DEFAULT_SEEKS, shrink_dcache_memory);
+
+	/* Hash may have been set up in dcache_init_early */
+	if (!hashdist)
+		return;
+
+	dentry_hashtable =
+		alloc_large_system_hash("Dentry cache",
+					sizeof(struct hlist_head),
+					dhash_entries,
+					13,
+					0,
+					&d_hash_shift,
+					&d_hash_mask,
+					0);
+
+	for (loop = 0; loop < (1 << d_hash_shift); loop++)
+		INIT_HLIST_HEAD(&dentry_hashtable[loop]);
 }
 
 /* SLAB cache for __getname() consumers */
diff -Nru a/fs/debugfs/Makefile b/fs/debugfs/Makefile
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/fs/debugfs/Makefile	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,4 @@
+debugfs-objs	:= inode.o file.o
+
+obj-$(CONFIG_DEBUG_FS)	+= debugfs.o
+
diff -Nru a/fs/debugfs/file.c b/fs/debugfs/file.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/fs/debugfs/file.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,262 @@
+/*
+ *  file.c - part of debugfs, a tiny little debug file system
+ *
+ *  Copyright (C) 2004 Greg Kroah-Hartman <greg@kroah.com>
+ *  Copyright (C) 2004 IBM Inc.
+ *
+ *	This program is free software; you can redistribute it and/or
+ *	modify it under the terms of the GNU General Public License version
+ *	2 as published by the Free Software Foundation.
+ *
+ *  debugfs is for people to use instead of /proc or /sys.
+ *  See Documentation/DocBook/kernel-api for more details.
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/fs.h>
+#include <linux/pagemap.h>
+#include <linux/debugfs.h>
+
+static ssize_t default_read_file(struct file *file, char __user *buf,
+				 size_t count, loff_t *ppos)
+{
+	return 0;
+}
+
+static ssize_t default_write_file(struct file *file, const char __user *buf,
+				   size_t count, loff_t *ppos)
+{
+	return count;
+}
+
+static int default_open(struct inode *inode, struct file *file)
+{
+	if (inode->u.generic_ip)
+		file->private_data = inode->u.generic_ip;
+
+	return 0;
+}
+
+struct file_operations debugfs_file_operations = {
+	.read =		default_read_file,
+	.write =	default_write_file,
+	.open =		default_open,
+};
+
+#define simple_type(type, format, temptype, strtolfn)				\
+static ssize_t read_file_##type(struct file *file, char __user *user_buf,	\
+				size_t count, loff_t *ppos)			\
+{										\
+	char buf[32];								\
+	type *val = file->private_data;						\
+										\
+	snprintf(buf, sizeof(buf), format, *val);				\
+	return simple_read_from_buffer(user_buf, count, ppos, buf, strlen(buf));\
+}										\
+static ssize_t write_file_##type(struct file *file, const char __user *user_buf,\
+				 size_t count, loff_t *ppos)			\
+{										\
+	char *endp;								\
+	char buf[32];								\
+	int buf_size;								\
+	type *val = file->private_data;						\
+	temptype tmp;								\
+										\
+	memset(buf, 0x00, sizeof(buf));						\
+	buf_size = min(count, (sizeof(buf)-1));					\
+	if (copy_from_user(buf, user_buf, buf_size))				\
+		return -EFAULT;							\
+										\
+	tmp = strtolfn(buf, &endp, 0);						\
+	if ((endp == buf) || ((type)tmp != tmp))				\
+		return -EINVAL;							\
+	*val = tmp;								\
+	return count;								\
+}										\
+static struct file_operations fops_##type = {					\
+	.read =		read_file_##type,					\
+	.write =	write_file_##type,					\
+	.open =		default_open,						\
+};
+simple_type(u8, "%c", unsigned long, simple_strtoul);
+simple_type(u16, "%hi", unsigned long, simple_strtoul);
+simple_type(u32, "%i", unsigned long, simple_strtoul);
+
+/**
+ * debugfs_create_u8 - create a file in the debugfs filesystem that is used to read and write a unsigned 8 bit value.
+ *
+ * @name: a pointer to a string containing the name of the file to create.
+ * @mode: the permission that the file should have
+ * @parent: a pointer to the parent dentry for this file.  This should be a
+ *          directory dentry if set.  If this paramater is NULL, then the
+ *          file will be created in the root of the debugfs filesystem.
+ * @value: a pointer to the variable that the file should read to and write
+ *         from.
+ *
+ * This function creates a file in debugfs with the given name that
+ * contains the value of the variable @value.  If the @mode variable is so
+ * set, it can be read from, and written to.
+ *
+ * This function will return a pointer to a dentry if it succeeds.  This
+ * pointer must be passed to the debugfs_remove() function when the file is
+ * to be removed (no automatic cleanup happens if your module is unloaded,
+ * you are responsible here.)  If an error occurs, NULL will be returned.
+ *
+ * If debugfs is not enabled in the kernel, the value -ENODEV will be
+ * returned.  It is not wise to check for this value, but rather, check for
+ * NULL or !NULL instead as to eliminate the need for #ifdef in the calling
+ * code.
+ */
+struct dentry *debugfs_create_u8(const char *name, mode_t mode,
+				 struct dentry *parent, u8 *value)
+{
+	return debugfs_create_file(name, mode, parent, value, &fops_u8);
+}
+EXPORT_SYMBOL_GPL(debugfs_create_u8);
+
+/**
+ * debugfs_create_u16 - create a file in the debugfs filesystem that is used to read and write a unsigned 8 bit value.
+ *
+ * @name: a pointer to a string containing the name of the file to create.
+ * @mode: the permission that the file should have
+ * @parent: a pointer to the parent dentry for this file.  This should be a
+ *          directory dentry if set.  If this paramater is NULL, then the
+ *          file will be created in the root of the debugfs filesystem.
+ * @value: a pointer to the variable that the file should read to and write
+ *         from.
+ *
+ * This function creates a file in debugfs with the given name that
+ * contains the value of the variable @value.  If the @mode variable is so
+ * set, it can be read from, and written to.
+ *
+ * This function will return a pointer to a dentry if it succeeds.  This
+ * pointer must be passed to the debugfs_remove() function when the file is
+ * to be removed (no automatic cleanup happens if your module is unloaded,
+ * you are responsible here.)  If an error occurs, NULL will be returned.
+ *
+ * If debugfs is not enabled in the kernel, the value -ENODEV will be
+ * returned.  It is not wise to check for this value, but rather, check for
+ * NULL or !NULL instead as to eliminate the need for #ifdef in the calling
+ * code.
+ */
+struct dentry *debugfs_create_u16(const char *name, mode_t mode,
+				  struct dentry *parent, u16 *value)
+{
+	return debugfs_create_file(name, mode, parent, value, &fops_u16);
+}
+EXPORT_SYMBOL_GPL(debugfs_create_u16);
+
+/**
+ * debugfs_create_u32 - create a file in the debugfs filesystem that is used to read and write a unsigned 8 bit value.
+ *
+ * @name: a pointer to a string containing the name of the file to create.
+ * @mode: the permission that the file should have
+ * @parent: a pointer to the parent dentry for this file.  This should be a
+ *          directory dentry if set.  If this paramater is NULL, then the
+ *          file will be created in the root of the debugfs filesystem.
+ * @value: a pointer to the variable that the file should read to and write
+ *         from.
+ *
+ * This function creates a file in debugfs with the given name that
+ * contains the value of the variable @value.  If the @mode variable is so
+ * set, it can be read from, and written to.
+ *
+ * This function will return a pointer to a dentry if it succeeds.  This
+ * pointer must be passed to the debugfs_remove() function when the file is
+ * to be removed (no automatic cleanup happens if your module is unloaded,
+ * you are responsible here.)  If an error occurs, NULL will be returned.
+ *
+ * If debugfs is not enabled in the kernel, the value -ENODEV will be
+ * returned.  It is not wise to check for this value, but rather, check for
+ * NULL or !NULL instead as to eliminate the need for #ifdef in the calling
+ * code.
+ */
+struct dentry *debugfs_create_u32(const char *name, mode_t mode,
+				 struct dentry *parent, u32 *value)
+{
+	return debugfs_create_file(name, mode, parent, value, &fops_u32);
+}
+EXPORT_SYMBOL_GPL(debugfs_create_u32);
+
+static ssize_t read_file_bool(struct file *file, char __user *user_buf,
+			      size_t count, loff_t *ppos)
+{
+	char buf[3];
+	u32 *val = file->private_data;
+	
+	if (val)
+		buf[0] = 'Y';
+	else
+		buf[0] = 'N';
+	buf[1] = '\n';
+	buf[2] = 0x00;
+	return simple_read_from_buffer(user_buf, count, ppos, buf, 2);
+}
+
+static ssize_t write_file_bool(struct file *file, const char __user *user_buf,
+			       size_t count, loff_t *ppos)
+{
+	char buf[32];
+	int buf_size;
+	u32 *val = file->private_data;
+
+	buf_size = min(count, (sizeof(buf)-1));
+	if (copy_from_user(buf, user_buf, buf_size))
+		return -EFAULT;
+
+	switch (buf[0]) {
+	case 'y':
+	case 'Y':
+	case '1':
+		*val = 1;
+		break;
+	case 'n':
+	case 'N':
+	case '0':
+		*val = 0;
+		break;
+	}
+	
+	return count;
+}
+
+static struct file_operations fops_bool = {
+	.read =		read_file_bool,
+	.write =	write_file_bool,
+	.open =		default_open,
+};
+
+/**
+ * debugfs_create_bool - create a file in the debugfs filesystem that is used to read and write a boolean value.
+ *
+ * @name: a pointer to a string containing the name of the file to create.
+ * @mode: the permission that the file should have
+ * @parent: a pointer to the parent dentry for this file.  This should be a
+ *          directory dentry if set.  If this paramater is NULL, then the
+ *          file will be created in the root of the debugfs filesystem.
+ * @value: a pointer to the variable that the file should read to and write
+ *         from.
+ *
+ * This function creates a file in debugfs with the given name that
+ * contains the value of the variable @value.  If the @mode variable is so
+ * set, it can be read from, and written to.
+ *
+ * This function will return a pointer to a dentry if it succeeds.  This
+ * pointer must be passed to the debugfs_remove() function when the file is
+ * to be removed (no automatic cleanup happens if your module is unloaded,
+ * you are responsible here.)  If an error occurs, NULL will be returned.
+ *
+ * If debugfs is not enabled in the kernel, the value -ENODEV will be
+ * returned.  It is not wise to check for this value, but rather, check for
+ * NULL or !NULL instead as to eliminate the need for #ifdef in the calling
+ * code.
+ */
+struct dentry *debugfs_create_bool(const char *name, mode_t mode,
+				   struct dentry *parent, u32 *value)
+{
+	return debugfs_create_file(name, mode, parent, value, &fops_bool);
+}
+EXPORT_SYMBOL_GPL(debugfs_create_bool);
+
diff -Nru a/fs/debugfs/inode.c b/fs/debugfs/inode.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/fs/debugfs/inode.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,328 @@
+/*
+ *  file.c - part of debugfs, a tiny little debug file system
+ *
+ *  Copyright (C) 2004 Greg Kroah-Hartman <greg@kroah.com>
+ *  Copyright (C) 2004 IBM Inc.
+ *
+ *	This program is free software; you can redistribute it and/or
+ *	modify it under the terms of the GNU General Public License version
+ *	2 as published by the Free Software Foundation.
+ *
+ *  debugfs is for people to use instead of /proc or /sys.
+ *  See Documentation/DocBook/kernel-api for more details.
+ *
+ */
+
+/* uncomment to get debug messages from the debug filesystem, ah the irony. */
+/* #define DEBUG */
+
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/fs.h>
+#include <linux/mount.h>
+#include <linux/pagemap.h>
+#include <linux/init.h>
+#include <linux/namei.h>
+#include <linux/debugfs.h>
+
+#define DEBUGFS_MAGIC	0x64626720
+
+/* declared over in file.c */
+extern struct file_operations debugfs_file_operations;
+
+static struct vfsmount *debugfs_mount;
+static int debugfs_mount_count;
+
+static struct inode *debugfs_get_inode(struct super_block *sb, int mode, dev_t dev)
+{
+	struct inode *inode = new_inode(sb);
+
+	if (inode) {
+		inode->i_mode = mode;
+		inode->i_uid = 0;
+		inode->i_gid = 0;
+		inode->i_blksize = PAGE_CACHE_SIZE;
+		inode->i_blocks = 0;
+		inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+		switch (mode & S_IFMT) {
+		default:
+			init_special_inode(inode, mode, dev);
+			break;
+		case S_IFREG:
+			inode->i_fop = &debugfs_file_operations;
+			break;
+		case S_IFDIR:
+			inode->i_op = &simple_dir_inode_operations;
+			inode->i_fop = &simple_dir_operations;
+
+			/* directory inodes start off with i_nlink == 2 (for "." entry) */
+			inode->i_nlink++;
+			break;
+		}
+	}
+	return inode; 
+}
+
+/* SMP-safe */
+static int debugfs_mknod(struct inode *dir, struct dentry *dentry,
+			 int mode, dev_t dev)
+{
+	struct inode *inode = debugfs_get_inode(dir->i_sb, mode, dev);
+	int error = -EPERM;
+
+	if (dentry->d_inode)
+		return -EEXIST;
+
+	if (inode) {
+		d_instantiate(dentry, inode);
+		dget(dentry);
+		error = 0;
+	}
+	return error;
+}
+
+static int debugfs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
+{
+	int res;
+
+	mode = (mode & (S_IRWXUGO | S_ISVTX)) | S_IFDIR;
+	res = debugfs_mknod(dir, dentry, mode, 0);
+	if (!res)
+		dir->i_nlink++;
+	return res;
+}
+
+static int debugfs_create(struct inode *dir, struct dentry *dentry, int mode)
+{
+	mode = (mode & S_IALLUGO) | S_IFREG;
+	return debugfs_mknod(dir, dentry, mode, 0);
+}
+
+static inline int debugfs_positive(struct dentry *dentry)
+{
+	return dentry->d_inode && !d_unhashed(dentry);
+}
+
+static int debug_fill_super(struct super_block *sb, void *data, int silent)
+{
+	static struct tree_descr debug_files[] = {{""}};
+
+	return simple_fill_super(sb, DEBUGFS_MAGIC, debug_files);
+}
+
+static struct dentry * get_dentry(struct dentry *parent, const char *name)
+{               
+	struct qstr qstr;
+
+	qstr.name = name;
+	qstr.len = strlen(name);
+	qstr.hash = full_name_hash(name,qstr.len);
+	return lookup_hash(&qstr,parent);
+}               
+
+static struct super_block *debug_get_sb(struct file_system_type *fs_type,
+				        int flags, const char *dev_name,
+					void *data)
+{
+	return get_sb_single(fs_type, flags, data, debug_fill_super);
+}
+
+static struct file_system_type debug_fs_type = {
+	.owner =	THIS_MODULE,
+	.name =		"debugfs",
+	.get_sb =	debug_get_sb,
+	.kill_sb =	kill_litter_super,
+};
+
+static int debugfs_create_by_name(const char *name, mode_t mode,
+				  struct dentry *parent,
+				  struct dentry **dentry)
+{
+	int error = 0;
+
+	/* If the parent is not specified, we create it in the root.
+	 * We need the root dentry to do this, which is in the super 
+	 * block. A pointer to that is in the struct vfsmount that we
+	 * have around.
+	 */
+	if (!parent ) {
+		if (debugfs_mount && debugfs_mount->mnt_sb) {
+			parent = debugfs_mount->mnt_sb->s_root;
+		}
+	}
+	if (!parent) {
+		pr_debug("debugfs: Ah! can not find a parent!\n");
+		return -EFAULT;
+	}
+
+	*dentry = NULL;
+	down(&parent->d_inode->i_sem);
+	*dentry = get_dentry (parent, name);
+	if (!IS_ERR(dentry)) {
+		if ((mode & S_IFMT) == S_IFDIR)
+			error = debugfs_mkdir(parent->d_inode, *dentry, mode);
+		else 
+			error = debugfs_create(parent->d_inode, *dentry, mode);
+	} else
+		error = PTR_ERR(dentry);
+	up(&parent->d_inode->i_sem);
+
+	return error;
+}
+
+/**
+ * debugfs_create_file - create a file in the debugfs filesystem
+ *
+ * @name: a pointer to a string containing the name of the file to create.
+ * @mode: the permission that the file should have
+ * @parent: a pointer to the parent dentry for this file.  This should be a
+ *          directory dentry if set.  If this paramater is NULL, then the
+ *          file will be created in the root of the debugfs filesystem.
+ * @data: a pointer to something that the caller will want to get to later
+ *        on.  The inode.u.generic_ip pointer will point to this value on
+ *        the open() call.
+ * @fops: a pointer to a struct file_operations that should be used for
+ *        this file.
+ *
+ * This is the basic "create a file" function for debugfs.  It allows for a
+ * wide range of flexibility in createing a file, or a directory (if you
+ * want to create a directory, the debugfs_create_dir() function is
+ * recommended to be used instead.)
+ *
+ * This function will return a pointer to a dentry if it succeeds.  This
+ * pointer must be passed to the debugfs_remove() function when the file is
+ * to be removed (no automatic cleanup happens if your module is unloaded,
+ * you are responsible here.)  If an error occurs, NULL will be returned.
+ *
+ * If debugfs is not enabled in the kernel, the value -ENODEV will be
+ * returned.  It is not wise to check for this value, but rather, check for
+ * NULL or !NULL instead as to eliminate the need for #ifdef in the calling
+ * code.
+ */
+struct dentry *debugfs_create_file(const char *name, mode_t mode,
+				   struct dentry *parent, void *data,
+				   struct file_operations *fops)
+{
+	struct dentry *dentry = NULL;
+	int error;
+
+	pr_debug("debugfs: creating file '%s'\n",name);
+
+	error = simple_pin_fs("debugfs", &debugfs_mount, &debugfs_mount_count);
+	if (error)
+		goto exit;
+
+	error = debugfs_create_by_name(name, mode, parent, &dentry);
+	if (error) {
+		dentry = NULL;
+		goto exit;
+	}
+
+	if (dentry->d_inode) {
+		if (data)
+			dentry->d_inode->u.generic_ip = data;
+		if (fops)
+			dentry->d_inode->i_fop = fops;
+	}
+exit:
+	return dentry;
+}
+EXPORT_SYMBOL_GPL(debugfs_create_file);
+
+/**
+ * debugfs_create_dir - create a directory in the debugfs filesystem
+ *
+ * @name: a pointer to a string containing the name of the directory to
+ *        create.
+ * @parent: a pointer to the parent dentry for this file.  This should be a
+ *          directory dentry if set.  If this paramater is NULL, then the
+ *          directory will be created in the root of the debugfs filesystem.
+ *
+ * This function creates a directory in debugfs with the given name.
+ *
+ * This function will return a pointer to a dentry if it succeeds.  This
+ * pointer must be passed to the debugfs_remove() function when the file is
+ * to be removed (no automatic cleanup happens if your module is unloaded,
+ * you are responsible here.)  If an error occurs, NULL will be returned.
+ *
+ * If debugfs is not enabled in the kernel, the value -ENODEV will be
+ * returned.  It is not wise to check for this value, but rather, check for
+ * NULL or !NULL instead as to eliminate the need for #ifdef in the calling
+ * code.
+ */
+struct dentry *debugfs_create_dir(const char *name, struct dentry *parent)
+{
+	return debugfs_create_file(name, 
+				   S_IFDIR | S_IRWXU | S_IRUGO | S_IXUGO,
+				   parent, NULL, NULL);
+}
+EXPORT_SYMBOL_GPL(debugfs_create_dir);
+
+/**
+ * debugfs_remove - removes a file or directory from the debugfs filesystem
+ *
+ * @dentry: a pointer to a the dentry of the file or directory to be
+ *          removed.
+ *
+ * This function removes a file or directory in debugfs that was previously
+ * created with a call to another debugfs function (like
+ * debufs_create_file() or variants thereof.)
+ *
+ * This function is required to be called in order for the file to be
+ * removed, no automatic cleanup of files will happen when a module is
+ * removed, you are responsible here.
+ */
+void debugfs_remove(struct dentry *dentry)
+{
+	struct dentry *parent;
+	
+	if (!dentry)
+		return;
+
+	parent = dentry->d_parent;
+	if (!parent || !parent->d_inode)
+		return;
+
+	down(&parent->d_inode->i_sem);
+	if (debugfs_positive(dentry)) {
+		if (dentry->d_inode) {
+			if (S_ISDIR(dentry->d_inode->i_mode))
+				simple_rmdir(parent->d_inode, dentry);
+			else
+				simple_unlink(parent->d_inode, dentry);
+		dput(dentry);
+		}
+	}
+	up(&parent->d_inode->i_sem);
+	simple_release_fs(&debugfs_mount, &debugfs_mount_count);
+}
+EXPORT_SYMBOL_GPL(debugfs_remove);
+
+static decl_subsys(debug, NULL, NULL);
+
+static int __init debugfs_init(void)
+{
+	int retval;
+
+	kset_set_kset_s(&debug_subsys, kernel_subsys);
+	retval = subsystem_register(&debug_subsys);
+	if (retval)
+		return retval;
+
+	retval = register_filesystem(&debug_fs_type);
+	if (retval)
+		subsystem_unregister(&debug_subsys);
+	return retval;
+}
+
+static void __exit debugfs_exit(void)
+{
+	simple_release_fs(&debugfs_mount, &debugfs_mount_count);
+	unregister_filesystem(&debug_fs_type);
+	subsystem_unregister(&debug_subsys);
+}
+
+core_initcall(debugfs_init);
+module_exit(debugfs_exit);
+MODULE_LICENSE("GPL");
+
diff -Nru a/fs/devfs/base.c b/fs/devfs/base.c
--- a/fs/devfs/base.c	2005-01-10 20:11:16 -08:00
+++ b/fs/devfs/base.c	2005-01-10 20:11:16 -08:00
@@ -2533,6 +2533,7 @@
 	sb->s_blocksize_bits = 10;
 	sb->s_magic = DEVFS_SUPER_MAGIC;
 	sb->s_op = &devfs_sops;
+	sb->s_time_gran = 1;
 	if ((root_inode = _devfs_get_vfs_inode(sb, root_entry, NULL)) == NULL)
 		goto out_no_root;
 	sb->s_root = d_alloc_root(root_inode);
diff -Nru a/fs/devpts/inode.c b/fs/devpts/inode.c
--- a/fs/devpts/inode.c	2005-01-10 20:11:17 -08:00
+++ b/fs/devpts/inode.c	2005-01-10 20:11:17 -08:00
@@ -31,7 +31,7 @@
 	NULL
 };
 
-struct inode_operations devpts_file_inode_operations = {
+static struct inode_operations devpts_file_inode_operations = {
 #ifdef CONFIG_DEVPTS_FS_XATTR
 	.setxattr	= generic_setxattr,
 	.getxattr	= generic_getxattr,
@@ -103,6 +103,7 @@
 	s->s_magic = DEVPTS_SUPER_MAGIC;
 	s->s_op = &devpts_sops;
 	s->s_xattr = devpts_xattr_handlers;
+	s->s_time_gran = 1;
 
 	inode = new_inode(s);
 	if (!inode)
diff -Nru a/fs/dquot.c b/fs/dquot.c
--- a/fs/dquot.c	2005-01-10 20:11:20 -08:00
+++ b/fs/dquot.c	2005-01-10 20:11:20 -08:00
@@ -49,7 +49,7 @@
  *		New SMP locking.
  *		Jan Kara, <jack@suse.cz>, 10/2002
  *
- *		Added journalled quota support
+ *		Added journalled quota support, fix lock inversion problems
  *		Jan Kara, <jack@suse.cz>, 2003,2004
  *
  * (C) Copyright 1994 - 1997 Marco van Wieringen 
@@ -75,7 +75,8 @@
 #include <linux/proc_fs.h>
 #include <linux/security.h>
 #include <linux/kmod.h>
-#include <linux/pagemap.h>
+#include <linux/namei.h>
+#include <linux/buffer_head.h>
 
 #include <asm/uaccess.h>
 
@@ -114,7 +115,7 @@
  * operations on dquots don't hold dq_lock as they copy data under dq_data_lock
  * spinlock to internal buffers before writing.
  *
- * Lock ordering (including related VFS locks) is following:
+ * Lock ordering (including related VFS locks) is the following:
  *   i_sem > dqonoff_sem > iprune_sem > journal_lock > dqptr_sem >
  *   > dquot->dq_lock > dqio_sem
  * i_sem on quota files is special (it's below dqio_sem)
@@ -183,8 +184,7 @@
  * on all three lists, depending on its current state.
  *
  * All dquots are placed to the end of inuse_list when first created, and this
- * list is used for the sync and invalidate operations, which must look
- * at every dquot.
+ * list is used for invalidate operation, which must look at every dquot.
  *
  * Unused dquots (dq_count == 0) are added to the free_dquots list when freed,
  * and this list is searched whenever we need an available dquot.  Dquots are
@@ -774,8 +774,13 @@
 	clear_bit(DQ_BLKS_B, &dquot->dq_flags);
 }
 
+static int flag_print_warnings = 1;
+
 static inline int need_print_warning(struct dquot *dquot)
 {
+	if (!flag_print_warnings)
+		return 0;
+
 	switch (dquot->dq_type) {
 		case USRQUOTA:
 			return current->fsuid == dquot->dq_id;
@@ -803,6 +808,7 @@
 
 	if (!need_print_warning(dquot) || (flag && test_and_set_bit(flag, &dquot->dq_flags)))
 		return;
+
 	tty_write_message(current->signal->tty, dquot->dq_sb->s_id);
 	if (warntype == ISOFTWARN || warntype == BSOFTWARN)
 		tty_write_message(current->signal->tty, ": warning, ");
@@ -1314,10 +1320,14 @@
 {
 	int cnt;
 	struct quota_info *dqopt = sb_dqopt(sb);
+	struct inode *toputinode[MAXQUOTAS];
+	struct vfsmount *toputmnt[MAXQUOTAS];
 
 	/* We need to serialize quota_off() for device */
 	down(&dqopt->dqonoff_sem);
 	for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
+		toputinode[cnt] = NULL;
+		toputmnt[cnt] = NULL;
 		if (type != -1 && cnt != type)
 			continue;
 		if (!sb_has_quota_enabled(sb, cnt))
@@ -1337,14 +1347,51 @@
 			dqopt->ops[cnt]->free_file_info(sb, cnt);
 		put_quota_format(dqopt->info[cnt].dqi_format);
 
-		fput(dqopt->files[cnt]);
+		toputinode[cnt] = dqopt->files[cnt];
+		toputmnt[cnt] = dqopt->mnt[cnt];
 		dqopt->files[cnt] = NULL;
+		dqopt->mnt[cnt] = NULL;
 		dqopt->info[cnt].dqi_flags = 0;
 		dqopt->info[cnt].dqi_igrace = 0;
 		dqopt->info[cnt].dqi_bgrace = 0;
 		dqopt->ops[cnt] = NULL;
 	}
 	up(&dqopt->dqonoff_sem);
+	/* Sync the superblock so that buffers with quota data are written to
+	 * disk (and so userspace sees correct data afterwards).
+	 * The reference to vfsmnt we are still holding protects us from
+	 * umount (we don't have it only when quotas are turned on/off for
+	 * journal replay but in that case we are guarded by the fs anyway). */
+	if (sb->s_op->sync_fs)
+		sb->s_op->sync_fs(sb, 1);
+	sync_blockdev(sb->s_bdev);
+	/* Now the quota files are just ordinary files and we can set the
+	 * inode flags back. Moreover we discard the pagecache so that
+	 * userspace sees the writes we did bypassing the pagecache. We
+	 * must also discard the blockdev buffers so that we see the
+	 * changes done by userspace on the next quotaon() */
+	for (cnt = 0; cnt < MAXQUOTAS; cnt++)
+		if (toputinode[cnt]) {
+			down(&dqopt->dqonoff_sem);
+			/* If quota was reenabled in the meantime, we have
+			 * nothing to do */
+			if (!sb_has_quota_enabled(sb, cnt)) {
+				down(&toputinode[cnt]->i_sem);
+				toputinode[cnt]->i_flags &= ~(S_IMMUTABLE |
+				  S_NOATIME | S_NOQUOTA);
+				truncate_inode_pages(&toputinode[cnt]->i_data, 0);
+				up(&toputinode[cnt]->i_sem);
+				mark_inode_dirty(toputinode[cnt]);
+				iput(toputinode[cnt]);
+			}
+			up(&dqopt->dqonoff_sem);
+			/* We don't hold the reference when we turned on quotas
+			 * just for the journal replay... */
+			if (toputmnt[cnt])
+				mntput(toputmnt[cnt]);
+		}
+	if (sb->s_bdev)
+		invalidate_bdev(sb->s_bdev, 0);
 	return 0;
 }
 
@@ -1352,68 +1399,56 @@
  *	Turn quotas on on a device
  */
 
-/* Helper function when we already have file open */
-static int vfs_quota_on_file(struct file *f, int type, int format_id)
+/* Helper function when we already have the inode */
+static int vfs_quota_on_inode(struct inode *inode, int type, int format_id)
 {
 	struct quota_format_type *fmt = find_quota_format(format_id);
-	struct inode *inode;
-	struct super_block *sb = f->f_dentry->d_sb;
+	struct super_block *sb = inode->i_sb;
 	struct quota_info *dqopt = sb_dqopt(sb);
-	struct dquot *to_drop[MAXQUOTAS];
-	int error, cnt;
-	unsigned int oldflags = -1;
+	int error;
+	int oldflags = -1;
 
 	if (!fmt)
 		return -ESRCH;
-	error = -EIO;
-	if (!f->f_op || !f->f_op->read || !f->f_op->write)
+	if (!S_ISREG(inode->i_mode)) {
+		error = -EACCES;
 		goto out_fmt;
-	inode = f->f_dentry->d_inode;
-	error = -EACCES;
-	if (!S_ISREG(inode->i_mode))
+	}
+	if (IS_RDONLY(inode)) {
+		error = -EROFS;
 		goto out_fmt;
+	}
+	if (!sb->s_op->quota_write || !sb->s_op->quota_read) {
+		error = -EINVAL;
+		goto out_fmt;
+	}
 
+	/* As we bypass the pagecache we must now flush the inode so that
+	 * we see all the changes from userspace... */
+	write_inode_now(inode, 1);
+	/* And now flush the block cache so that kernel sees the changes */
+	invalidate_bdev(sb->s_bdev, 0);
 	down(&inode->i_sem);
 	down(&dqopt->dqonoff_sem);
 	if (sb_has_quota_enabled(sb, type)) {
-		up(&inode->i_sem);
 		error = -EBUSY;
 		goto out_lock;
 	}
 	/* We don't want quota and atime on quota files (deadlocks possible)
-	 * We also need to set GFP mask differently because we cannot recurse
-	 * into filesystem when allocating page for quota inode */
+	 * Also nobody should write to the file - we use special IO operations
+	 * which ignore the immutable bit. */
 	down_write(&dqopt->dqptr_sem);
-	oldflags = inode->i_flags & (S_NOATIME | S_NOQUOTA);
-	inode->i_flags |= S_NOQUOTA | S_NOATIME;
+	oldflags = inode->i_flags & (S_NOATIME | S_IMMUTABLE | S_NOQUOTA);
+	inode->i_flags |= S_NOQUOTA | S_NOATIME | S_IMMUTABLE;
 	up_write(&dqopt->dqptr_sem);
-	up(&inode->i_sem);
 
-	dqopt->files[type] = f;
+	error = -EIO;
+	dqopt->files[type] = igrab(inode);
+	if (!dqopt->files[type])
+		goto out_lock;
 	error = -EINVAL;
 	if (!fmt->qf_ops->check_quota_file(sb, type))
 		goto out_file_init;
-	/*
-	 * We write to quota files deep within filesystem code.  We don't want
-	 * the VFS to reenter filesystem code when it tries to allocate a
-	 * pagecache page for the quota file write.  So clear __GFP_FS in
-	 * the quota file's allocation flags.
-	 */
-	mapping_set_gfp_mask(inode->i_mapping,
-		mapping_gfp_mask(inode->i_mapping) & ~__GFP_FS);
-
-	down_write(&dqopt->dqptr_sem);
-	for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
-		to_drop[cnt] = inode->i_dquot[cnt];
-		inode->i_dquot[cnt] = NODQUOT;
-	}
-	up_write(&dqopt->dqptr_sem);
-	/* We must put dquots outside of dqptr_sem because we may need to
-	 * start transaction for dquot_release() */
-	for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
-		if (to_drop[cnt])
-			dqput(to_drop[cnt]);
-	}
 
 	dqopt->ops[type] = fmt->qf_ops;
 	dqopt->info[type].dqi_format = fmt;
@@ -1424,6 +1459,7 @@
 		goto out_file_init;
 	}
 	up(&dqopt->dqio_sem);
+	up(&inode->i_sem);
 	set_enable_flags(dqopt, type);
 
 	add_dquot_ref(sb, type);
@@ -1433,19 +1469,18 @@
 
 out_file_init:
 	dqopt->files[type] = NULL;
+	iput(inode);
 out_lock:
 	up(&dqopt->dqonoff_sem);
 	if (oldflags != -1) {
-		down(&inode->i_sem);
 		down_write(&dqopt->dqptr_sem);
-		/* Reset the NOATIME flag back. I know it could change in the
-		 * mean time but playing with NOATIME flags on a quota file is
-		 * never a good idea */
-		inode->i_flags &= ~(S_NOATIME | S_NOQUOTA);
+		/* Set the flags back (in the case of accidental quotaon()
+		 * on a wrong file we don't want to mess up the flags) */
+		inode->i_flags &= ~(S_NOATIME | S_NOQUOTA | S_IMMUTABLE);
 		inode->i_flags |= oldflags;
 		up_write(&dqopt->dqptr_sem);
-		up(&inode->i_sem);
 	}
+	up(&inode->i_sem);
 out_fmt:
 	put_quota_format(fmt);
 
@@ -1455,47 +1490,40 @@
 /* Actual function called from quotactl() */
 int vfs_quota_on(struct super_block *sb, int type, int format_id, char *path)
 {
-	struct file *f;
+	struct nameidata nd;
 	int error;
 
-	f = filp_open(path, O_RDWR, 0600);
-	if (IS_ERR(f))
-		return PTR_ERR(f);
-	error = security_quota_on(f);
+	error = path_lookup(path, LOOKUP_FOLLOW, &nd);
+	if (error < 0)
+		return error;
+	error = security_quota_on(nd.dentry);
 	if (error)
-		goto out_f;
-	error = vfs_quota_on_file(f, type, format_id);
-	if (!error)
-		return 0;
-out_f:
-	filp_close(f, NULL);
+		goto out_path;
+	/* Quota file not on the same filesystem? */
+	if (nd.mnt->mnt_sb != sb)
+		error = -EXDEV;
+	else {
+		error = vfs_quota_on_inode(nd.dentry->d_inode, type, format_id);
+		if (!error)
+			sb_dqopt(sb)->mnt[type] = mntget(nd.mnt);
+	}
+out_path:
+	path_release(&nd);
 	return error;
 }
 
 /*
- * Function used by filesystems when filp_open() would fail (filesystem is
- * being mounted now). We will use a private file structure. Caller is
- * responsible that it's IO functions won't need vfsmnt structure or
- * some dentry tricks...
+ * This function is used when filesystem needs to initialize quotas
+ * during mount time.
  */
 int vfs_quota_on_mount(int type, int format_id, struct dentry *dentry)
 {
-	struct file *f;
 	int error;
 
-	dget(dentry);	/* Get a reference for struct file */
-	f = dentry_open(dentry, NULL, O_RDWR);
-	if (IS_ERR(f)) {
-		error = PTR_ERR(f);
-		goto out_dentry;
-	}
-	error = vfs_quota_on_file(f, type, format_id);
-	if (!error)
-		return 0;
-	fput(f);
-out_dentry:
-	dput(dentry);
-	return error;
+	error = security_quota_on(dentry);
+	if (error)
+		return error;
+	return vfs_quota_on_inode(dentry->d_inode, type, format_id);
 }
 
 /* Generic routine for getting common part of quota structure */
@@ -1720,6 +1748,14 @@
 		.data		= &dqstats.syncs,
 		.maxlen		= sizeof(int),
 		.mode		= 0444,
+		.proc_handler	= &proc_dointvec,
+	},
+	{
+		.ctl_name	= FS_DQ_WARNINGS,
+		.procname	= "warnings",
+		.data		= &flag_print_warnings,
+		.maxlen		= sizeof(int),
+		.mode		= 0644,
 		.proc_handler	= &proc_dointvec,
 	},
 	{ .ctl_name = 0 },
diff -Nru a/fs/exec.c b/fs/exec.c
--- a/fs/exec.c	2005-01-10 20:11:18 -08:00
+++ b/fs/exec.c	2005-01-10 20:11:18 -08:00
@@ -47,6 +47,7 @@
 #include <linux/security.h>
 #include <linux/syscalls.h>
 #include <linux/rmap.h>
+#include <linux/acct.h>
 
 #include <asm/uaccess.h>
 #include <asm/mmu_context.h>
@@ -185,6 +186,7 @@
 			argv++;
 			if(++i > max)
 				return -E2BIG;
+			cond_resched();
 		}
 	}
 	return i;
@@ -300,6 +302,7 @@
 {
 	struct mm_struct *mm = vma->vm_mm;
 	pgd_t * pgd;
+	pud_t * pud;
 	pmd_t * pmd;
 	pte_t * pte;
 
@@ -310,7 +313,10 @@
 	pgd = pgd_offset(mm, address);
 
 	spin_lock(&mm->page_table_lock);
-	pmd = pmd_alloc(mm, pgd, address);
+	pud = pud_alloc(mm, pgd, address);
+	if (!pud)
+		goto out;
+	pmd = pmd_alloc(mm, pud, address);
 	if (!pmd)
 		goto out;
 	pte = pte_alloc_map(mm, pmd, address);
@@ -337,7 +343,11 @@
 	force_sig(SIGKILL, current);
 }
 
-int setup_arg_pages(struct linux_binprm *bprm, int executable_stack)
+#define EXTRA_STACK_VM_PAGES	20	/* random */
+
+int setup_arg_pages(struct linux_binprm *bprm,
+		    unsigned long stack_top,
+		    int executable_stack)
 {
 	unsigned long stack_base;
 	struct vm_area_struct *mpnt;
@@ -374,14 +384,14 @@
 	memmove(to, to + offset, PAGE_SIZE - offset);
 	kunmap(bprm->page[j - 1]);
 
-	/* Adjust bprm->p to point to the end of the strings. */
-	bprm->p = PAGE_SIZE * i - offset;
-
 	/* Limit stack size to 1GB */
 	stack_base = current->signal->rlim[RLIMIT_STACK].rlim_max;
 	if (stack_base > (1 << 30))
 		stack_base = 1 << 30;
-	stack_base = PAGE_ALIGN(STACK_TOP - stack_base);
+	stack_base = PAGE_ALIGN(stack_top - stack_base);
+
+	/* Adjust bprm->p to point to the end of the strings. */
+	bprm->p = stack_base + PAGE_SIZE * i - offset;
 
 	mm->arg_start = stack_base;
 	arg_size = i << PAGE_SHIFT;
@@ -390,12 +400,14 @@
 	while (i < MAX_ARG_PAGES)
 		bprm->page[i++] = NULL;
 #else
-	stack_base = STACK_TOP - MAX_ARG_PAGES * PAGE_SIZE;
-	mm->arg_start = bprm->p + stack_base;
-	arg_size = STACK_TOP - (PAGE_MASK & (unsigned long) mm->arg_start);
+	stack_base = stack_top - MAX_ARG_PAGES * PAGE_SIZE;
+	bprm->p += stack_base;
+	mm->arg_start = bprm->p;
+	arg_size = stack_top - (PAGE_MASK & (unsigned long) mm->arg_start);
 #endif
 
-	bprm->p += stack_base;
+	arg_size += EXTRA_STACK_VM_PAGES * PAGE_SIZE;
+
 	if (bprm->loader)
 		bprm->loader += stack_base;
 	bprm->exec += stack_base;
@@ -416,11 +428,10 @@
 		mpnt->vm_mm = mm;
 #ifdef CONFIG_STACK_GROWSUP
 		mpnt->vm_start = stack_base;
-		mpnt->vm_end = PAGE_MASK &
-			(PAGE_SIZE - 1 + (unsigned long) bprm->p);
+		mpnt->vm_end = stack_base + arg_size;
 #else
-		mpnt->vm_start = PAGE_MASK & (unsigned long) bprm->p;
-		mpnt->vm_end = STACK_TOP;
+		mpnt->vm_end = stack_top;
+		mpnt->vm_start = mpnt->vm_end - arg_size;
 #endif
 		/* Adjust stack execute permissions; explicitly enable
 		 * for EXSTACK_ENABLE_X, disable for EXSTACK_DISABLE_X
@@ -591,7 +602,7 @@
 	 */
 	read_lock(&tasklist_lock);
 	spin_lock_irq(lock);
-	if (sig->group_exit) {
+	if (sig->flags & SIGNAL_GROUP_EXIT) {
 		/*
 		 * Another group action in progress, just
 		 * return so that the signal is processed.
@@ -601,7 +612,6 @@
 		kmem_cache_free(sighand_cachep, newsighand);
 		return -EAGAIN;
 	}
-	sig->group_exit = 1;
 	zap_other_threads(current);
 	read_unlock(&tasklist_lock);
 
@@ -609,7 +619,7 @@
 	 * Account for the thread group leader hanging around:
 	 */
 	count = 2;
-	if (current->pid == current->tgid)
+	if (thread_group_leader(current))
 		count = 1;
 	while (atomic_read(&sig->count) > count) {
 		sig->group_exit_task = current;
@@ -628,7 +638,7 @@
 	 * do is to wait for the thread group leader to become inactive,
 	 * and to assume its PID:
 	 */
-	if (current->pid != current->tgid) {
+	if (!thread_group_leader(current)) {
 		struct task_struct *leader = current->group_leader, *parent;
 		struct dentry *proc_dentry1, *proc_dentry2;
 		unsigned long exit_state, ptrace;
@@ -699,7 +709,7 @@
 	 * Now there are really no other threads at all,
 	 * so it's safe to stop telling them to kill themselves.
 	 */
-	sig->group_exit = 0;
+	sig->flags = 0;
 
 no_thread_group:
 	BUG_ON(atomic_read(&sig->count) != 1);
@@ -738,7 +748,7 @@
 
 	if (!thread_group_empty(current))
 		BUG();
-	if (current->tgid != current->pid)
+	if (!thread_group_leader(current))
 		BUG();
 	return 0;
 }
@@ -1156,6 +1166,8 @@
 
 		/* execve success */
 		security_bprm_free(bprm);
+		acct_update_integrals();
+		update_mem_hiwater();
 		kfree(bprm);
 		return retval;
 	}
@@ -1384,7 +1396,7 @@
 	}
 	mm->dumpable = 0;
 	init_completion(&mm->core_done);
-	current->signal->group_exit = 1;
+	current->signal->flags = SIGNAL_GROUP_EXIT;
 	current->signal->group_exit_code = exit_code;
 	coredump_wait(mm);
 
diff -Nru a/fs/ext2/acl.h b/fs/ext2/acl.h
--- a/fs/ext2/acl.h	2005-01-10 20:11:21 -08:00
+++ b/fs/ext2/acl.h	2005-01-10 20:11:21 -08:00
@@ -77,7 +77,6 @@
 
 static inline int ext2_init_acl (struct inode *inode, struct inode *dir)
 {
-	inode->i_mode &= ~current->fs->umask;
 	return 0;
 }
 #endif
diff -Nru a/fs/ext2/dir.c b/fs/ext2/dir.c
--- a/fs/ext2/dir.c	2005-01-10 20:11:19 -08:00
+++ b/fs/ext2/dir.c	2005-01-10 20:11:19 -08:00
@@ -426,7 +426,7 @@
 	ext2_set_de_type (de, inode);
 	err = ext2_commit_chunk(page, from, to);
 	ext2_put_page(page);
-	dir->i_mtime = dir->i_ctime = CURRENT_TIME;
+	dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC;
 	EXT2_I(dir)->i_flags &= ~EXT2_BTREE_FL;
 	mark_inode_dirty(dir);
 }
@@ -516,7 +516,7 @@
 	de->inode = cpu_to_le32(inode->i_ino);
 	ext2_set_de_type (de, inode);
 	err = ext2_commit_chunk(page, from, to);
-	dir->i_mtime = dir->i_ctime = CURRENT_TIME;
+	dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC;
 	EXT2_I(dir)->i_flags &= ~EXT2_BTREE_FL;
 	mark_inode_dirty(dir);
 	/* OFFSET_CACHE */
@@ -564,7 +564,7 @@
 		pde->rec_len = cpu_to_le16(to-from);
 	dir->inode = 0;
 	err = ext2_commit_chunk(page, from, to);
-	inode->i_ctime = inode->i_mtime = CURRENT_TIME;
+	inode->i_ctime = inode->i_mtime = CURRENT_TIME_SEC;
 	EXT2_I(inode)->i_flags &= ~EXT2_BTREE_FL;
 	mark_inode_dirty(inode);
 out:
diff -Nru a/fs/ext2/ext2.h b/fs/ext2/ext2.h
--- a/fs/ext2/ext2.h	2005-01-10 20:11:23 -08:00
+++ b/fs/ext2/ext2.h	2005-01-10 20:11:23 -08:00
@@ -119,6 +119,7 @@
 extern void ext2_delete_inode (struct inode *);
 extern int ext2_sync_inode (struct inode *);
 extern void ext2_discard_prealloc (struct inode *);
+extern int ext2_get_block(struct inode *, sector_t, struct buffer_head *, int);
 extern void ext2_truncate (struct inode *);
 extern int ext2_setattr (struct dentry *, struct iattr *);
 extern void ext2_set_inode_flags(struct inode *inode);
diff -Nru a/fs/ext2/ialloc.c b/fs/ext2/ialloc.c
--- a/fs/ext2/ialloc.c	2005-01-10 20:11:19 -08:00
+++ b/fs/ext2/ialloc.c	2005-01-10 20:11:19 -08:00
@@ -577,7 +577,7 @@
 	inode->i_ino = ino;
 	inode->i_blksize = PAGE_SIZE;	/* This is the optimal IO size (for stat), not the fs block size */
 	inode->i_blocks = 0;
-	inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
+	inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC;
 	memset(ei->i_data, 0, sizeof(ei->i_data));
 	ei->i_flags = EXT2_I(dir)->i_flags & ~EXT2_BTREE_FL;
 	if (S_ISLNK(mode))
diff -Nru a/fs/ext2/inode.c b/fs/ext2/inode.c
--- a/fs/ext2/inode.c	2005-01-10 20:11:16 -08:00
+++ b/fs/ext2/inode.c	2005-01-10 20:11:16 -08:00
@@ -493,7 +493,7 @@
 
 	/* We are done with atomic stuff, now do the rest of housekeeping */
 
-	inode->i_ctime = CURRENT_TIME;
+	inode->i_ctime = CURRENT_TIME_SEC;
 
 	/* had we spliced it onto indirect block? */
 	if (where->bh)
@@ -524,7 +524,7 @@
  * reachable from inode.
  */
 
-static int ext2_get_block(struct inode *inode, sector_t iblock, struct buffer_head *bh_result, int create)
+int ext2_get_block(struct inode *inode, sector_t iblock, struct buffer_head *bh_result, int create)
 {
 	int err = -EIO;
 	int offsets[4];
@@ -953,7 +953,7 @@
 		case EXT2_TIND_BLOCK:
 			;
 	}
-	inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+	inode->i_mtime = inode->i_ctime = CURRENT_TIME_SEC;
 	if (inode_needs_sync(inode)) {
 		sync_mapping_buffers(inode->i_mapping);
 		ext2_sync_inode (inode);
diff -Nru a/fs/ext2/ioctl.c b/fs/ext2/ioctl.c
--- a/fs/ext2/ioctl.c	2005-01-10 20:11:23 -08:00
+++ b/fs/ext2/ioctl.c	2005-01-10 20:11:23 -08:00
@@ -59,7 +59,7 @@
 		ei->i_flags = flags;
 
 		ext2_set_inode_flags(inode);
-		inode->i_ctime = CURRENT_TIME;
+		inode->i_ctime = CURRENT_TIME_SEC;
 		mark_inode_dirty(inode);
 		return 0;
 	}
@@ -72,7 +72,7 @@
 			return -EROFS;
 		if (get_user(inode->i_generation, (int __user *) arg))
 			return -EFAULT;	
-		inode->i_ctime = CURRENT_TIME;
+		inode->i_ctime = CURRENT_TIME_SEC;
 		mark_inode_dirty(inode);
 		return 0;
 	default:
diff -Nru a/fs/ext2/namei.c b/fs/ext2/namei.c
--- a/fs/ext2/namei.c	2005-01-10 20:11:22 -08:00
+++ b/fs/ext2/namei.c	2005-01-10 20:11:22 -08:00
@@ -211,7 +211,7 @@
 	if (inode->i_nlink >= EXT2_LINK_MAX)
 		return -EMLINK;
 
-	inode->i_ctime = CURRENT_TIME;
+	inode->i_ctime = CURRENT_TIME_SEC;
 	ext2_inc_count(inode);
 	atomic_inc(&inode->i_count);
 
@@ -337,7 +337,7 @@
 			goto out_dir;
 		ext2_inc_count(old_inode);
 		ext2_set_link(new_dir, new_de, new_page, old_inode);
-		new_inode->i_ctime = CURRENT_TIME;
+		new_inode->i_ctime = CURRENT_TIME_SEC;
 		if (dir_de)
 			new_inode->i_nlink--;
 		ext2_dec_count(new_inode);
@@ -362,7 +362,7 @@
  	 * rename.
 	 * ext2_dec_count() will mark the inode dirty.
 	 */
-	old_inode->i_ctime = CURRENT_TIME;
+	old_inode->i_ctime = CURRENT_TIME_SEC;
 
 	ext2_delete_entry (old_de, old_page);
 	ext2_dec_count(old_inode);
diff -Nru a/fs/ext2/super.c b/fs/ext2/super.c
--- a/fs/ext2/super.c	2005-01-10 20:11:20 -08:00
+++ b/fs/ext2/super.c	2005-01-10 20:11:20 -08:00
@@ -203,6 +203,11 @@
 }
 
 
+#ifdef CONFIG_QUOTA
+static ssize_t ext2_quota_read(struct super_block *sb, int type, char *data, size_t len, loff_t off);
+static ssize_t ext2_quota_write(struct super_block *sb, int type, const char *data, size_t len, loff_t off);
+#endif
+
 static struct super_operations ext2_sops = {
 	.alloc_inode	= ext2_alloc_inode,
 	.destroy_inode	= ext2_destroy_inode,
@@ -214,6 +219,10 @@
 	.statfs		= ext2_statfs,
 	.remount_fs	= ext2_remount,
 	.clear_inode	= ext2_clear_inode,
+#ifdef CONFIG_QUOTA
+	.quota_read	= ext2_quota_read,
+	.quota_write	= ext2_quota_write,
+#endif
 };
 
 /* Yes, most of these are left as NULL!!
@@ -595,7 +604,6 @@
 	es = (struct ext2_super_block *) (((char *)bh->b_data) + offset);
 	sbi->s_es = es;
 	sb->s_magic = le16_to_cpu(es->s_magic);
-	sb->s_flags |= MS_ONE_SECOND;
 
 	if (sb->s_magic != EXT2_SUPER_MAGIC)
 		goto cantfind_ext2;
@@ -1003,6 +1011,111 @@
 {
 	return get_sb_bdev(fs_type, flags, dev_name, data, ext2_fill_super);
 }
+
+#ifdef CONFIG_QUOTA
+
+/* Read data from quotafile - avoid pagecache and such because we cannot afford
+ * acquiring the locks... As quota files are never truncated and quota code
+ * itself serializes the operations (and noone else should touch the files)
+ * we don't have to be afraid of races */
+static ssize_t ext2_quota_read(struct super_block *sb, int type, char *data,
+			       size_t len, loff_t off)
+{
+	struct inode *inode = sb_dqopt(sb)->files[type];
+	sector_t blk = off >> EXT2_BLOCK_SIZE_BITS(sb);
+	int err = 0;
+	int offset = off & (sb->s_blocksize - 1);
+	int tocopy;
+	size_t toread;
+	struct buffer_head tmp_bh;
+	struct buffer_head *bh;
+	loff_t i_size = i_size_read(inode);
+
+	if (off > i_size)
+		return 0;
+	if (off+len > i_size)
+		len = i_size-off;
+	toread = len;
+	while (toread > 0) {
+		tocopy = sb->s_blocksize - offset < toread ?
+				sb->s_blocksize - offset : toread;
+
+		tmp_bh.b_state = 0;
+		err = ext2_get_block(inode, blk, &tmp_bh, 0);
+		if (err)
+			return err;
+		if (!buffer_mapped(&tmp_bh))	/* A hole? */
+			memset(data, 0, tocopy);
+		else {
+			bh = sb_bread(sb, tmp_bh.b_blocknr);
+			if (!bh)
+				return -EIO;
+			memcpy(data, bh->b_data+offset, tocopy);
+			brelse(bh);
+		}
+		offset = 0;
+		toread -= tocopy;
+		data += tocopy;
+		blk++;
+	}
+	return len;
+}
+
+/* Write to quotafile */
+static ssize_t ext2_quota_write(struct super_block *sb, int type,
+				const char *data, size_t len, loff_t off)
+{
+	struct inode *inode = sb_dqopt(sb)->files[type];
+	sector_t blk = off >> EXT2_BLOCK_SIZE_BITS(sb);
+	int err = 0;
+	int offset = off & (sb->s_blocksize - 1);
+	int tocopy;
+	size_t towrite = len;
+	struct buffer_head tmp_bh;
+	struct buffer_head *bh;
+
+	down(&inode->i_sem);
+	while (towrite > 0) {
+		tocopy = sb->s_blocksize - offset < towrite ?
+				sb->s_blocksize - offset : towrite;
+
+		tmp_bh.b_state = 0;
+		err = ext2_get_block(inode, blk, &tmp_bh, 1);
+		if (err)
+			goto out;
+		if (offset || tocopy != EXT2_BLOCK_SIZE(sb))
+			bh = sb_bread(sb, tmp_bh.b_blocknr);
+		else
+			bh = sb_getblk(sb, tmp_bh.b_blocknr);
+		if (!bh) {
+			err = -EIO;
+			goto out;
+		}
+		lock_buffer(bh);
+		memcpy(bh->b_data+offset, data, tocopy);
+		flush_dcache_page(bh->b_page);
+		set_buffer_uptodate(bh);
+		mark_buffer_dirty(bh);
+		unlock_buffer(bh);
+		brelse(bh);
+		offset = 0;
+		towrite -= tocopy;
+		data += tocopy;
+		blk++;
+	}
+out:
+	if (len == towrite)
+		return err;
+	if (inode->i_size < off+len-towrite)
+		i_size_write(inode, off+len-towrite);
+	inode->i_version++;
+	inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+	mark_inode_dirty(inode);
+	up(&inode->i_sem);
+	return len - towrite;
+}
+
+#endif
 
 static struct file_system_type ext2_fs_type = {
 	.owner		= THIS_MODULE,
diff -Nru a/fs/ext2/xattr.c b/fs/ext2/xattr.c
--- a/fs/ext2/xattr.c	2005-01-10 20:11:20 -08:00
+++ b/fs/ext2/xattr.c	2005-01-10 20:11:20 -08:00
@@ -697,7 +697,7 @@
 
 	/* Update the inode. */
 	EXT2_I(inode)->i_file_acl = new_bh ? new_bh->b_blocknr : 0;
-	inode->i_ctime = CURRENT_TIME;
+	inode->i_ctime = CURRENT_TIME_SEC;
 	if (IS_SYNC(inode)) {
 		error = ext2_sync_inode (inode);
 		if (error)
diff -Nru a/fs/ext3/acl.h b/fs/ext3/acl.h
--- a/fs/ext3/acl.h	2005-01-10 20:11:22 -08:00
+++ b/fs/ext3/acl.h	2005-01-10 20:11:22 -08:00
@@ -79,7 +79,6 @@
 static inline int
 ext3_init_acl(handle_t *handle, struct inode *inode, struct inode *dir)
 {
-	inode->i_mode &= ~current->fs->umask;
 	return 0;
 }
 #endif  /* CONFIG_EXT3_FS_POSIX_ACL */
diff -Nru a/fs/ext3/balloc.c b/fs/ext3/balloc.c
--- a/fs/ext3/balloc.c	2005-01-10 20:11:16 -08:00
+++ b/fs/ext3/balloc.c	2005-01-10 20:11:16 -08:00
@@ -378,6 +378,11 @@
 		}
 		jbd_lock_bh_state(bitmap_bh);
 #endif
+		if (need_resched()) {
+			jbd_unlock_bh_state(bitmap_bh);
+			cond_resched();
+			jbd_lock_bh_state(bitmap_bh);
+		}
 		/* @@@ This prevents newly-allocated data from being
 		 * freed and then reallocated within the same
 		 * transaction. 
diff -Nru a/fs/ext3/file.c b/fs/ext3/file.c
--- a/fs/ext3/file.c	2005-01-10 20:11:22 -08:00
+++ b/fs/ext3/file.c	2005-01-10 20:11:22 -08:00
@@ -43,20 +43,6 @@
 	return 0;
 }
 
-/*
- * Called when an inode is about to be opened.
- * We use this to disallow opening RW large files on 32bit systems if
- * the caller didn't specify O_LARGEFILE.  On 64bit systems we force
- * on this flag in sys_open.
- */
-static int ext3_open_file (struct inode *inode, struct file *filp)
-{
-	if (!(filp->f_flags & O_LARGEFILE) &&
-	    inode->i_size > 0x7FFFFFFFLL)
-		return -EFBIG;
-	return 0;
-}
-
 static ssize_t
 ext3_file_write(struct kiocb *iocb, const char __user *buf, size_t count, loff_t pos)
 {
@@ -125,7 +111,7 @@
 	.writev		= generic_file_writev,
 	.ioctl		= ext3_ioctl,
 	.mmap		= generic_file_mmap,
-	.open		= ext3_open_file,
+	.open		= generic_file_open,
 	.release	= ext3_release_file,
 	.fsync		= ext3_sync_file,
 	.sendfile	= generic_file_sendfile,
diff -Nru a/fs/ext3/ialloc.c b/fs/ext3/ialloc.c
--- a/fs/ext3/ialloc.c	2005-01-10 20:11:19 -08:00
+++ b/fs/ext3/ialloc.c	2005-01-10 20:11:19 -08:00
@@ -558,7 +558,7 @@
 	/* This is the optimal IO size (for stat), not the fs block size */
 	inode->i_blksize = PAGE_SIZE;
 	inode->i_blocks = 0;
-	inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
+	inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC;
 
 	memset(ei->i_data, 0, sizeof(ei->i_data));
 	ei->i_next_alloc_block = 0;
@@ -596,6 +596,11 @@
 	spin_unlock(&sbi->s_next_gen_lock);
 
 	ei->i_state = EXT3_STATE_NEW;
+	if (EXT3_INODE_SIZE(inode->i_sb) > EXT3_GOOD_OLD_INODE_SIZE) {
+		ei->i_extra_isize = sizeof(__u16)	/* i_extra_isize */
+				+ sizeof(__u16);	/* i_pad1 */
+	} else
+		ei->i_extra_isize = 0;
 
 	ret = inode;
 	if(DQUOT_ALLOC_INODE(inode)) {
@@ -732,6 +737,7 @@
 		if (!gdp)
 			continue;
 		desc_count += le16_to_cpu(gdp->bg_free_inodes_count);
+		cond_resched();
 	}
 	return desc_count;
 #endif
diff -Nru a/fs/ext3/inode.c b/fs/ext3/inode.c
--- a/fs/ext3/inode.c	2005-01-10 20:11:20 -08:00
+++ b/fs/ext3/inode.c	2005-01-10 20:11:20 -08:00
@@ -84,7 +84,7 @@
 	    (!is_metadata && !ext3_should_journal_data(inode))) {
 		if (bh) {
 			BUFFER_TRACE(bh, "call journal_forget");
-			ext3_journal_forget(handle, bh);
+			return ext3_journal_forget(handle, bh);
 		}
 		return 0;
 	}
@@ -626,7 +626,7 @@
 
 	/* We are done with atomic stuff, now do the rest of housekeeping */
 
-	inode->i_ctime = CURRENT_TIME;
+	inode->i_ctime = CURRENT_TIME_SEC;
 	ext3_mark_inode_dirty(handle, inode);
 
 	/* had we spliced it onto indirect block? */
@@ -1025,7 +1025,7 @@
 	return ret;
 }
 
-static int
+int
 ext3_journal_dirty_data(handle_t *handle, struct buffer_head *bh)
 {
 	int err = journal_dirty_data(handle, bh);
@@ -2199,7 +2199,7 @@
 			;
 	}
 	up(&ei->truncate_sem);
-	inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+	inode->i_mtime = inode->i_ctime = CURRENT_TIME_SEC;
 	ext3_mark_inode_dirty(handle, inode);
 
 	/* In a multi-transaction truncate, we only make the final
@@ -2275,7 +2275,7 @@
  * trying to determine the inode's location on-disk and no read need be
  * performed.
  */
-static int ext3_get_inode_loc(struct inode *inode,
+int ext3_get_inode_loc(struct inode *inode,
 				struct ext3_iloc *iloc, int in_mem)
 {
 	unsigned long block;
@@ -2483,6 +2483,11 @@
 		ei->i_data[block] = raw_inode->i_block[block];
 	INIT_LIST_HEAD(&ei->i_orphan);
 
+	if (EXT3_INODE_SIZE(inode->i_sb) > EXT3_GOOD_OLD_INODE_SIZE)
+		ei->i_extra_isize = le16_to_cpu(raw_inode->i_extra_isize);
+	else
+		ei->i_extra_isize = 0;
+
 	if (S_ISREG(inode->i_mode)) {
 		inode->i_op = &ext3_file_inode_operations;
 		inode->i_fop = &ext3_file_operations;
@@ -2617,6 +2622,9 @@
 		}
 	} else for (block = 0; block < EXT3_N_BLOCKS; block++)
 		raw_inode->i_block[block] = ei->i_data[block];
+
+	if (EXT3_INODE_SIZE(inode->i_sb) > EXT3_GOOD_OLD_INODE_SIZE)
+		raw_inode->i_extra_isize = cpu_to_le16(ei->i_extra_isize);
 
 	BUFFER_TRACE(bh, "call ext3_journal_dirty_metadata");
 	rc = ext3_journal_dirty_metadata(handle, bh);
diff -Nru a/fs/ext3/ioctl.c b/fs/ext3/ioctl.c
--- a/fs/ext3/ioctl.c	2005-01-10 20:11:18 -08:00
+++ b/fs/ext3/ioctl.c	2005-01-10 20:11:18 -08:00
@@ -87,7 +87,7 @@
 		ei->i_flags = flags;
 
 		ext3_set_inode_flags(inode);
-		inode->i_ctime = CURRENT_TIME;
+		inode->i_ctime = CURRENT_TIME_SEC;
 
 		err = ext3_mark_iloc_dirty(handle, inode, &iloc);
 flags_err:
@@ -121,7 +121,7 @@
 			return PTR_ERR(handle);
 		err = ext3_reserve_inode_write(handle, inode, &iloc);
 		if (err == 0) {
-			inode->i_ctime = CURRENT_TIME;
+			inode->i_ctime = CURRENT_TIME_SEC;
 			inode->i_generation = generation;
 			err = ext3_mark_iloc_dirty(handle, inode, &iloc);
 		}
diff -Nru a/fs/ext3/namei.c b/fs/ext3/namei.c
--- a/fs/ext3/namei.c	2005-01-10 20:11:19 -08:00
+++ b/fs/ext3/namei.c	2005-01-10 20:11:19 -08:00
@@ -610,10 +610,14 @@
 		de = (struct ext3_dir_entry_2 *) frames[0].bh->b_data;
 		if ((err = ext3_htree_store_dirent(dir_file, 0, 0, de)) != 0)
 			goto errout;
+		count++;
+	}
+	if (start_hash < 2 || (start_hash ==2 && start_minor_hash==0)) {
+		de = (struct ext3_dir_entry_2 *) frames[0].bh->b_data;
 		de = ext3_next_entry(de);
-		if ((err = ext3_htree_store_dirent(dir_file, 0, 0, de)) != 0)
+		if ((err = ext3_htree_store_dirent(dir_file, 2, 0, de)) != 0)
 			goto errout;
-		count += 2;
+		count++;
 	}
 
 	while (1) {
@@ -671,6 +675,7 @@
 			map_tail->hash = h.hash;
 			map_tail->offs = (u32) ((char *) de - base);
 			count++;
+			cond_resched();
 		}
 		/* XXX: do we need to check rec_len == 0 case? -Chris */
 		de = (struct ext3_dir_entry_2 *) ((char *) de + le16_to_cpu(de->rec_len));
@@ -1251,7 +1256,7 @@
 	 * happen is that the times are slightly out of date
 	 * and/or different from the directory change time.
 	 */
-	dir->i_mtime = dir->i_ctime = CURRENT_TIME;
+	dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC;
 	ext3_update_dx_flag(dir);
 	dir->i_version++;
 	ext3_mark_inode_dirty(handle, dir);
@@ -2029,7 +2034,7 @@
 	 * recovery. */
 	inode->i_size = 0;
 	ext3_orphan_add(handle, inode);
-	inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME;
+	inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC;
 	ext3_mark_inode_dirty(handle, inode);
 	dir->i_nlink--;
 	ext3_update_dx_flag(dir);
@@ -2079,7 +2084,7 @@
 	retval = ext3_delete_entry(handle, dir, de, bh);
 	if (retval)
 		goto end_unlink;
-	dir->i_ctime = dir->i_mtime = CURRENT_TIME;
+	dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC;
 	ext3_update_dx_flag(dir);
 	ext3_mark_inode_dirty(handle, dir);
 	inode->i_nlink--;
@@ -2169,7 +2174,7 @@
 	if (IS_DIRSYNC(dir))
 		handle->h_sync = 1;
 
-	inode->i_ctime = CURRENT_TIME;
+	inode->i_ctime = CURRENT_TIME_SEC;
 	ext3_inc_count(handle, inode);
 	atomic_inc(&inode->i_count);
 
@@ -2270,7 +2275,7 @@
 	 * Like most other Unix systems, set the ctime for inodes on a
 	 * rename.
 	 */
-	old_inode->i_ctime = CURRENT_TIME;
+	old_inode->i_ctime = CURRENT_TIME_SEC;
 	ext3_mark_inode_dirty(handle, old_inode);
 
 	/*
@@ -2303,9 +2308,9 @@
 
 	if (new_inode) {
 		new_inode->i_nlink--;
-		new_inode->i_ctime = CURRENT_TIME;
+		new_inode->i_ctime = CURRENT_TIME_SEC;
 	}
-	old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME;
+	old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME_SEC;
 	ext3_update_dx_flag(old_dir);
 	if (dir_bh) {
 		BUFFER_TRACE(dir_bh, "get_write_access");
diff -Nru a/fs/ext3/super.c b/fs/ext3/super.c
--- a/fs/ext3/super.c	2005-01-10 20:11:22 -08:00
+++ b/fs/ext3/super.c	2005-01-10 20:11:22 -08:00
@@ -108,14 +108,19 @@
 	char nbuf[16];
 	const char *errstr = ext3_decode_error(NULL, err, nbuf);
 
-	printk(KERN_ERR "%s: aborting transaction: %s in %s", 
-	       caller, errstr, err_fn);
-
 	if (bh)
 		BUFFER_TRACE(bh, "abort");
-	journal_abort_handle(handle);
+
 	if (!handle->h_err)
 		handle->h_err = err;
+
+	if (is_handle_aborted(handle))
+		return;
+
+	printk(KERN_ERR "%s: aborting transaction: %s in %s\n",
+	       caller, errstr, err_fn);
+
+	journal_abort_handle(handle);
 }
 
 /* Deal with the reporting of failure conditions on a filesystem such as
@@ -524,7 +529,10 @@
 static int ext3_write_info(struct super_block *sb, int type);
 static int ext3_quota_on(struct super_block *sb, int type, int format_id, char *path);
 static int ext3_quota_on_mount(struct super_block *sb, int type);
-static int ext3_quota_off_mount(struct super_block *sb, int type);
+static ssize_t ext3_quota_read(struct super_block *sb, int type, char *data,
+			       size_t len, loff_t off);
+static ssize_t ext3_quota_write(struct super_block *sb, int type,
+				const char *data, size_t len, loff_t off);
 
 static struct dquot_operations ext3_quota_operations = {
 	.initialize	= ext3_dquot_initialize,
@@ -567,6 +575,10 @@
 	.statfs		= ext3_statfs,
 	.remount_fs	= ext3_remount,
 	.clear_inode	= ext3_clear_inode,
+#ifdef CONFIG_QUOTA
+	.quota_read	= ext3_quota_read,
+	.quota_write	= ext3_quota_write,
+#endif
 };
 
 struct dentry *ext3_get_parent(struct dentry *child);
@@ -666,6 +678,7 @@
 	int option;
 #ifdef CONFIG_QUOTA
 	int qtype;
+	char *qname;
 #endif
 
 	if (!options)
@@ -844,19 +857,22 @@
 					"quota options when quota turned on.\n");
 				return 0;
 			}
-			if (sbi->s_qf_names[qtype]) {
+			qname = match_strdup(&args[0]);
+			if (!qname) {
 				printk(KERN_ERR
-					"EXT3-fs: %s quota file already "
-					"specified.\n", QTYPE2NAME(qtype));
+					"EXT3-fs: not enough memory for "
+					"storing quotafile name.\n");
 				return 0;
 			}
-			sbi->s_qf_names[qtype] = match_strdup(&args[0]);
-			if (!sbi->s_qf_names[qtype]) {
+			if (sbi->s_qf_names[qtype] &&
+			    strcmp(sbi->s_qf_names[qtype], qname)) {
 				printk(KERN_ERR
-					"EXT3-fs: not enough memory for "
-					"storing quotafile name.\n");
+					"EXT3-fs: %s quota file already "
+					"specified.\n", QTYPE2NAME(qtype));
+				kfree(qname);
 				return 0;
 			}
+			sbi->s_qf_names[qtype] = qname;
 			if (strchr(sbi->s_qf_names[qtype], '/')) {
 				printk(KERN_ERR
 					"EXT3-fs: quotafile must be on "
@@ -1176,7 +1192,7 @@
 	/* Turn quotas off */
 	for (i = 0; i < MAXQUOTAS; i++) {
 		if (sb_dqopt(sb)->files[i])
-			ext3_quota_off_mount(sb, i);
+			vfs_quota_off(sb, i);
 	}
 #endif
 	sb->s_flags = s_flags; /* Restore MS_RDONLY status */
@@ -1250,6 +1266,8 @@
 	sbi->s_resuid = EXT3_DEF_RESUID;
 	sbi->s_resgid = EXT3_DEF_RESGID;
 
+	unlock_kernel();
+
 	blocksize = sb_min_blocksize(sb, EXT3_MIN_BLOCK_SIZE);
 	if (!blocksize) {
 		printk(KERN_ERR "EXT3-fs: unable to set blocksize\n");
@@ -1313,7 +1331,6 @@
 	if (!parse_options ((char *) data, sb, &journal_inum, NULL, 0))
 		goto failed_mount;
 
-	sb->s_flags |= MS_ONE_SECOND;
 	sb->s_flags = (sb->s_flags & ~MS_POSIXACL) |
 		((sbi->s_mount_opt & EXT3_MOUNT_POSIX_ACL) ? MS_POSIXACL : 0);
 
@@ -1607,6 +1624,7 @@
 	percpu_counter_mod(&sbi->s_dirs_counter,
 		ext3_count_dirs(sb));
 
+	lock_kernel();
 	return 0;
 
 cantfind_ext3:
@@ -1631,6 +1649,7 @@
 out_fail:
 	sb->s_fs_info = NULL;
 	kfree(sbi);
+	lock_kernel();
 	return -EINVAL;
 }
 
@@ -2155,9 +2174,11 @@
 		 * block group descriptors.  If the sparse superblocks
 		 * feature is turned on, then not all groups have this.
 		 */
-		for (i = 0; i < ngroups; i++)
+		for (i = 0; i < ngroups; i++) {
 			overhead += ext3_bg_has_super(sb, i) +
 				ext3_bg_num_gdb(sb, i);
+			cond_resched();
+		}
 
 		/*
 		 * Every block group has an inode bitmap, a block
@@ -2193,7 +2214,7 @@
 
 static inline struct inode *dquot_to_inode(struct dquot *dquot)
 {
-	return sb_dqopt(dquot->dq_sb)->files[dquot->dq_type]->f_dentry->d_inode;
+	return sb_dqopt(dquot->dq_sb)->files[dquot->dq_type];
 }
 
 static int ext3_dquot_initialize(struct inode *inode, int type)
@@ -2232,8 +2253,10 @@
 {
 	int ret, err;
 	handle_t *handle;
+	struct inode *inode;
 
-	handle = ext3_journal_start(dquot_to_inode(dquot),
+	inode = dquot_to_inode(dquot);
+	handle = ext3_journal_start(inode,
 					EXT3_QUOTA_TRANS_BLOCKS);
 	if (IS_ERR(handle))
 		return PTR_ERR(handle);
@@ -2320,22 +2343,9 @@
 	if (IS_ERR(dentry))
 		return PTR_ERR(dentry);
 	err = vfs_quota_on_mount(type, EXT3_SB(sb)->s_jquota_fmt, dentry);
-	if (err)
-		dput(dentry);
-	/* We keep the dentry reference if everything went ok - we drop it
-	 * on quota_off time */
-	return err;
-}
-
-/* Turn quotas off during mount time */
-static int ext3_quota_off_mount(struct super_block *sb, int type)
-{
-	int err;
-	struct dentry *dentry;
-
-	dentry = sb_dqopt(sb)->files[type]->f_dentry;
-	err = vfs_quota_off_mount(sb, type);
-	/* We invalidate dentry - it has at least wrong hash... */
+	/* Now invalidate and put the dentry - quota got its own reference
+	 * to inode and dentry has at least wrong hash so we had better
+	 * throw it away */
 	d_invalidate(dentry);
 	dput(dentry);
 	return err;
@@ -2358,18 +2368,119 @@
 	if (err)
 		return err;
 	/* Quotafile not on the same filesystem? */
-	if (nd.mnt->mnt_sb != sb)
+	if (nd.mnt->mnt_sb != sb) {
+		path_release(&nd);
 		return -EXDEV;
+	}
 	/* Quotafile not of fs root? */
 	if (nd.dentry->d_parent->d_inode != sb->s_root->d_inode)
 		printk(KERN_WARNING
 			"EXT3-fs: Quota file not on filesystem root. "
 			"Journalled quota will not work.\n");
-	if (!ext3_should_journal_data(nd.dentry->d_inode))
-		printk(KERN_WARNING "EXT3-fs: Quota file does not have "
-			"data-journalling. Journalled quota will not work.\n");
 	path_release(&nd);
 	return vfs_quota_on(sb, type, format_id, path);
+}
+
+/* Read data from quotafile - avoid pagecache and such because we cannot afford
+ * acquiring the locks... As quota files are never truncated and quota code
+ * itself serializes the operations (and noone else should touch the files)
+ * we don't have to be afraid of races */
+static ssize_t ext3_quota_read(struct super_block *sb, int type, char *data,
+			       size_t len, loff_t off)
+{
+	struct inode *inode = sb_dqopt(sb)->files[type];
+	sector_t blk = off >> EXT3_BLOCK_SIZE_BITS(sb);
+	int err = 0;
+	int offset = off & (sb->s_blocksize - 1);
+	int tocopy;
+	size_t toread;
+	struct buffer_head *bh;
+	loff_t i_size = i_size_read(inode);
+
+	if (off > i_size)
+		return 0;
+	if (off+len > i_size)
+		len = i_size-off;
+	toread = len;
+	while (toread > 0) {
+		tocopy = sb->s_blocksize - offset < toread ?
+				sb->s_blocksize - offset : toread;
+		bh = ext3_bread(NULL, inode, blk, 0, &err);
+		if (err)
+			return err;
+		if (!bh)	/* A hole? */
+			memset(data, 0, tocopy);
+		else
+			memcpy(data, bh->b_data+offset, tocopy);
+		brelse(bh);
+		offset = 0;
+		toread -= tocopy;
+		data += tocopy;
+		blk++;
+	}
+	return len;
+}
+
+/* Write to quotafile (we know the transaction is already started and has
+ * enough credits) */
+static ssize_t ext3_quota_write(struct super_block *sb, int type,
+				const char *data, size_t len, loff_t off)
+{
+	struct inode *inode = sb_dqopt(sb)->files[type];
+	sector_t blk = off >> EXT3_BLOCK_SIZE_BITS(sb);
+	int err = 0;
+	int offset = off & (sb->s_blocksize - 1);
+	int tocopy;
+	int journal_quota = EXT3_SB(sb)->s_qf_names[type] != NULL;
+	size_t towrite = len;
+	struct buffer_head *bh;
+	handle_t *handle = journal_current_handle();
+
+	down(&inode->i_sem);
+	while (towrite > 0) {
+		tocopy = sb->s_blocksize - offset < towrite ?
+				sb->s_blocksize - offset : towrite;
+		bh = ext3_bread(handle, inode, blk, 1, &err);
+		if (!bh)
+			goto out;
+		if (journal_quota) {
+			err = ext3_journal_get_write_access(handle, bh);
+			if (err) {
+				brelse(bh);
+				goto out;
+			}
+		}
+		lock_buffer(bh);
+		memcpy(bh->b_data+offset, data, tocopy);
+		flush_dcache_page(bh->b_page);
+		unlock_buffer(bh);
+		if (journal_quota)
+			err = ext3_journal_dirty_metadata(handle, bh);
+		else {
+			/* Always do at least ordered writes for quotas */
+			err = ext3_journal_dirty_data(handle, bh);
+			mark_buffer_dirty(bh);
+		}
+		brelse(bh);
+		if (err)
+			goto out;
+		offset = 0;
+		towrite -= tocopy;
+		data += tocopy;
+		blk++;
+	}
+out:
+	if (len == towrite)
+		return err;
+	if (inode->i_size < off+len-towrite) {
+		i_size_write(inode, off+len-towrite);
+		EXT3_I(inode)->i_disksize = inode->i_size;
+	}
+	inode->i_version++;
+	inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+	ext3_mark_inode_dirty(handle, inode);
+	up(&inode->i_sem);
+	return len - towrite;
 }
 
 #endif
diff -Nru a/fs/ext3/xattr.c b/fs/ext3/xattr.c
--- a/fs/ext3/xattr.c	2005-01-10 20:11:19 -08:00
+++ b/fs/ext3/xattr.c	2005-01-10 20:11:19 -08:00
@@ -9,6 +9,7 @@
  *  suggestion of Luka Renko <luka.renko@hermes.si>.
  * xattr consolidation Copyright (c) 2004 James Morris <jmorris@redhat.com>,
  *  Red Hat Inc.
+ * ea-in-inode support by Alex Tomas <alex@clusterfs.com> aka bzzz
  */
 
 /*
@@ -89,10 +90,9 @@
 # define ea_bdebug(f...)
 #endif
 
-static int ext3_xattr_set_handle2(handle_t *, struct inode *,
-				  struct buffer_head *,
-				  struct ext3_xattr_header *);
-
+static int ext3_xattr_set_handle2(handle_t *handle, struct inode *inode,
+				       struct buffer_head *old_bh,
+				       struct ext3_xattr_header *header);
 static int ext3_xattr_cache_insert(struct buffer_head *);
 static struct buffer_head *ext3_xattr_cache_find(handle_t *, struct inode *,
 						 struct ext3_xattr_header *,
@@ -150,17 +150,12 @@
 }
 
 /*
- * ext3_xattr_get()
- *
- * Copy an extended attribute into the buffer
- * provided, or compute the buffer size required.
- * Buffer is NULL to compute the size of the buffer required.
+ * ext3_xattr_block_get()
  *
- * Returns a negative error number on failure, or the number of bytes
- * used / required on success.
+ * routine looks for attribute in EA block and returns it's value and size
  */
 int
-ext3_xattr_get(struct inode *inode, int name_index, const char *name,
+ext3_xattr_block_get(struct inode *inode, int name_index, const char *name,
 	       void *buffer, size_t buffer_size)
 {
 	struct buffer_head *bh = NULL;
@@ -174,7 +169,6 @@
 
 	if (name == NULL)
 		return -EINVAL;
-	down_read(&EXT3_I(inode)->xattr_sem);
 	error = -ENODATA;
 	if (!EXT3_I(inode)->i_file_acl)
 		goto cleanup;
@@ -247,15 +241,87 @@
 
 cleanup:
 	brelse(bh);
-	up_read(&EXT3_I(inode)->xattr_sem);
 
 	return error;
 }
 
 /*
- * ext3_xattr_list()
+ * ext3_xattr_ibody_get()
  *
- * Copy a list of attribute names into the buffer
+ * routine looks for attribute in inode body and returns it's value and size
+ */
+int
+ext3_xattr_ibody_get(struct inode *inode, int name_index, const char *name,
+	       void *buffer, size_t buffer_size)
+{
+	int size, name_len = strlen(name), storage_size;
+	struct ext3_xattr_entry *last;
+	struct ext3_inode *raw_inode;
+	struct ext3_iloc iloc;
+	char *start, *end;
+	int ret = -ENOENT;
+
+	if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE)
+		return -ENOENT;
+
+	ret = ext3_get_inode_loc(inode, &iloc, 1);
+	if (ret)
+		return ret;
+	raw_inode = ext3_raw_inode(&iloc);
+
+	storage_size = EXT3_SB(inode->i_sb)->s_inode_size -
+				EXT3_GOOD_OLD_INODE_SIZE -
+				EXT3_I(inode)->i_extra_isize -
+				sizeof(__u32);
+	start = (char *) raw_inode + EXT3_GOOD_OLD_INODE_SIZE +
+			EXT3_I(inode)->i_extra_isize;
+	if (le32_to_cpu((*(__u32*) start)) != EXT3_XATTR_MAGIC) {
+		brelse(iloc.bh);
+		return -ENOENT;
+	}
+	start += sizeof(__u32);
+	end = (char *) raw_inode + EXT3_SB(inode->i_sb)->s_inode_size;
+
+	last = (struct ext3_xattr_entry *) start;
+	while (!IS_LAST_ENTRY(last)) {
+		struct ext3_xattr_entry *next = EXT3_XATTR_NEXT(last);
+		if (le32_to_cpu(last->e_value_size) > storage_size ||
+				(char *) next >= end) {
+			ext3_error(inode->i_sb, "ext3_xattr_ibody_get",
+				"inode %ld", inode->i_ino);
+			brelse(iloc.bh);
+			return -EIO;
+		}
+		if (name_index == last->e_name_index &&
+		    name_len == last->e_name_len &&
+		    !memcmp(name, last->e_name, name_len))
+			goto found;
+		last = next;
+	}
+
+	/* can't find EA */
+	brelse(iloc.bh);
+	return -ENOENT;
+
+found:
+	size = le32_to_cpu(last->e_value_size);
+	if (buffer) {
+		ret = -ERANGE;
+		if (buffer_size >= size) {
+			memcpy(buffer, start + le16_to_cpu(last->e_value_offs),
+				size);
+			ret = size;
+		}
+	} else
+		ret = size;
+	brelse(iloc.bh);
+	return ret;
+}
+
+/*
+ * ext3_xattr_get()
+ *
+ * Copy an extended attribute into the buffer
  * provided, or compute the buffer size required.
  * Buffer is NULL to compute the size of the buffer required.
  *
@@ -263,7 +329,31 @@
  * used / required on success.
  */
 int
-ext3_xattr_list(struct inode *inode, char *buffer, size_t buffer_size)
+ext3_xattr_get(struct inode *inode, int name_index, const char *name,
+	       void *buffer, size_t buffer_size)
+{
+	int err;
+
+	down_read(&EXT3_I(inode)->xattr_sem);
+
+	/* try to find attribute in inode body */
+	err = ext3_xattr_ibody_get(inode, name_index, name,
+					buffer, buffer_size);
+	if (err < 0)
+		/* search was unsuccessful, try to find EA in dedicated block */
+		err = ext3_xattr_block_get(inode, name_index, name,
+				buffer, buffer_size);
+	up_read(&EXT3_I(inode)->xattr_sem);
+
+	return err;
+}
+
+/* ext3_xattr_block_list()
+ *
+ * generate list of attributes stored in EA block
+ */
+int
+ext3_xattr_block_list(struct inode *inode, char *buffer, size_t buffer_size)
 {
 	struct buffer_head *bh = NULL;
 	struct ext3_xattr_entry *entry;
@@ -274,7 +364,6 @@
 	ea_idebug(inode, "buffer=%p, buffer_size=%ld",
 		  buffer, (long)buffer_size);
 
-	down_read(&EXT3_I(inode)->xattr_sem);
 	error = 0;
 	if (!EXT3_I(inode)->i_file_acl)
 		goto cleanup;
@@ -284,7 +373,7 @@
 	if (!bh)
 		goto cleanup;
 	ea_bdebug(bh, "b_count=%d, refcount=%d",
-		atomic_read(&(bh->b_count)), le32_to_cpu(HDR(bh)->h_refcount));
+		(int) atomic_read(&(bh->b_count)), (int) le32_to_cpu(HDR(bh)->h_refcount));
 	end = bh->b_data + bh->b_size;
 	if (HDR(bh)->h_magic != cpu_to_le32(EXT3_XATTR_MAGIC) ||
 	    HDR(bh)->h_blocks != cpu_to_le32(1)) {
@@ -331,11 +420,131 @@
 
 cleanup:
 	brelse(bh);
-	up_read(&EXT3_I(inode)->xattr_sem);
 
 	return error;
 }
 
+/* ext3_xattr_ibody_list()
+ *
+ * generate list of attributes stored in inode body
+ */
+int
+ext3_xattr_ibody_list(struct inode *inode, char *buffer, size_t buffer_size)
+{
+	struct ext3_xattr_entry *last;
+	struct ext3_inode *raw_inode;
+	size_t rest = buffer_size;
+	struct ext3_iloc iloc;
+	char *start, *end;
+	int storage_size;
+	int size = 0;
+	int ret;
+
+	if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE)
+		return 0;
+
+	ret = ext3_get_inode_loc(inode, &iloc, 1);
+	if (ret)
+		return ret;
+	raw_inode = ext3_raw_inode(&iloc);
+
+	storage_size = EXT3_SB(inode->i_sb)->s_inode_size -
+				EXT3_GOOD_OLD_INODE_SIZE -
+				EXT3_I(inode)->i_extra_isize -
+				sizeof(__u32);
+	start = (char *) raw_inode + EXT3_GOOD_OLD_INODE_SIZE +
+			EXT3_I(inode)->i_extra_isize;
+	if (le32_to_cpu((*(__u32*) start)) != EXT3_XATTR_MAGIC)
+		goto cleanup;
+	start += sizeof(__u32);
+	end = (char *) raw_inode + EXT3_SB(inode->i_sb)->s_inode_size;
+
+	last = (struct ext3_xattr_entry *) start;
+	while (!IS_LAST_ENTRY(last)) {
+		struct ext3_xattr_entry *next = EXT3_XATTR_NEXT(last);
+		if ((char *) next >= end) {
+			ext3_error(inode->i_sb, "ext3_xattr_ibody_list",
+					"inode %ld", inode->i_ino);
+			ret = -EIO;
+			goto cleanup;
+		}
+		last = next;
+	}
+
+	last = (struct ext3_xattr_entry *) start;
+	for (; !IS_LAST_ENTRY(last); last = EXT3_XATTR_NEXT(last)) {
+		struct xattr_handler *handler =
+			ext3_xattr_handler(last->e_name_index);
+
+		if (!handler)
+			continue;
+
+		size += handler->list(inode, buffer, rest, last->e_name,
+					last->e_name_len);
+		if (buffer) {
+			if (size > rest) {
+				ret = -ERANGE;
+				goto cleanup;
+			}
+			buffer += size;
+		}
+		rest -= size;
+	}
+	ret = buffer_size - rest; /* total size */
+
+cleanup:
+	brelse(iloc.bh);
+	return ret;
+}
+
+/*
+ * ext3_xattr_list()
+ *
+ * Copy a list of attribute names into the buffer
+ * provided, or compute the buffer size required.
+ * Buffer is NULL to compute the size of the buffer required.
+ *
+ * Returns a negative error number on failure, or the number of bytes
+ * used / required on success.
+ */
+int
+ext3_xattr_list(struct inode *inode, char *buffer, size_t buffer_size)
+{
+	int size = buffer_size;
+	int error;
+
+	down_read(&EXT3_I(inode)->xattr_sem);
+
+	/* get list of attributes stored in inode body */
+	error = ext3_xattr_ibody_list(inode, buffer, buffer_size);
+	if (error < 0) {
+		/* some error occured while collecting
+		 * attributes in inode body */
+		size = 0;
+		goto cleanup;
+	}
+	size = error;
+
+	/* get list of attributes stored in dedicated block */
+	if (buffer) {
+		buffer_size -= error;
+		if (buffer_size <= 0) {
+			buffer = NULL;
+			buffer_size = 0;
+		} else
+			buffer += error;
+	}
+
+	error = ext3_xattr_block_list(inode, buffer, buffer_size);
+	/* listing was successful, so we return len */
+	if (error < 0)
+		size = 0;
+
+cleanup:
+	up_read(&EXT3_I(inode)->xattr_sem);
+	return error + size;
+}
+
 /*
  * If the EXT3_FEATURE_COMPAT_EXT_ATTR feature of this file system is
  * not set, set it.
@@ -357,6 +566,286 @@
 }
 
 /*
+ * ext3_xattr_ibody_find()
+ *
+ * search attribute and calculate free space in inode body
+ * NOTE: free space includes space our attribute hold
+ */
+int
+ext3_xattr_ibody_find(struct inode *inode, int name_index,
+			const char *name, int *free)
+{
+	struct ext3_xattr_entry *last;
+	struct ext3_inode *raw_inode;
+	int name_len = strlen(name);
+	int err, storage_size;
+	struct ext3_iloc iloc;
+	char *start, *end;
+	int ret = -ENOENT;
+
+	*free = 0;
+	if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE)
+		return ret;
+
+	err = ext3_get_inode_loc(inode, &iloc, 1);
+	if (err)
+		return -EIO;
+	raw_inode = ext3_raw_inode(&iloc);
+
+	storage_size = EXT3_SB(inode->i_sb)->s_inode_size -
+				EXT3_GOOD_OLD_INODE_SIZE -
+				EXT3_I(inode)->i_extra_isize -
+				sizeof(__u32);
+	*free = storage_size - sizeof(__u32);
+	start = (char *) raw_inode + EXT3_GOOD_OLD_INODE_SIZE +
+			EXT3_I(inode)->i_extra_isize;
+	if (le32_to_cpu((*(__u32*) start)) != EXT3_XATTR_MAGIC) {
+		brelse(iloc.bh);
+		return -ENOENT;
+	}
+	start += sizeof(__u32);
+	end = (char *) raw_inode + EXT3_SB(inode->i_sb)->s_inode_size;
+
+	last = (struct ext3_xattr_entry *) start;
+	while (!IS_LAST_ENTRY(last)) {
+		struct ext3_xattr_entry *next = EXT3_XATTR_NEXT(last);
+		if (le32_to_cpu(last->e_value_size) > storage_size ||
+				(char *) next >= end) {
+			ext3_error(inode->i_sb, "ext3_xattr_ibody_find",
+				"inode %ld", inode->i_ino);
+			brelse(iloc.bh);
+			return -EIO;
+		}
+
+		if (name_index == last->e_name_index &&
+		    name_len == last->e_name_len &&
+		    !memcmp(name, last->e_name, name_len)) {
+			ret = 0;
+		} else {
+			*free -= EXT3_XATTR_LEN(last->e_name_len);
+			*free -= le32_to_cpu(last->e_value_size);
+		}
+		last = next;
+	}
+
+	brelse(iloc.bh);
+	return ret;
+}
+
+/*
+ * ext3_xattr_block_find()
+ *
+ * search attribute and calculate free space in EA block (if it allocated)
+ * NOTE: free space includes space our attribute hold
+ */
+int
+ext3_xattr_block_find(struct inode *inode, int name_index,
+			const char *name, int *free)
+{
+	struct buffer_head *bh = NULL;
+	struct ext3_xattr_entry *entry;
+	char *end;
+	int name_len, error = -ENOENT;
+
+	if (!EXT3_I(inode)->i_file_acl) {
+		*free = inode->i_sb->s_blocksize -
+			sizeof(struct ext3_xattr_header) -
+			sizeof(__u32);
+		return -ENOENT;
+	}
+	ea_idebug(inode, "reading block %d", EXT3_I(inode)->i_file_acl);
+	bh = sb_bread(inode->i_sb, EXT3_I(inode)->i_file_acl);
+	if (!bh)
+		return -EIO;
+	ea_bdebug(bh, "b_count=%d, refcount=%d",
+		atomic_read(&(bh->b_count)), le32_to_cpu(HDR(bh)->h_refcount));
+	end = bh->b_data + bh->b_size;
+	if (HDR(bh)->h_magic != cpu_to_le32(EXT3_XATTR_MAGIC) ||
+	    HDR(bh)->h_blocks != cpu_to_le32(1)) {
+bad_block:	ext3_error(inode->i_sb, "ext3_xattr_get",
+			"inode %ld: bad block %d", inode->i_ino,
+			EXT3_I(inode)->i_file_acl);
+		brelse(bh);
+		return -EIO;
+	}
+	/* find named attribute */
+	name_len = strlen(name);
+	*free = bh->b_size - sizeof(__u32);
+
+	entry = FIRST_ENTRY(bh);
+	while (!IS_LAST_ENTRY(entry)) {
+		struct ext3_xattr_entry *next =
+			EXT3_XATTR_NEXT(entry);
+		if ((char *)next >= end)
+			goto bad_block;
+		if (name_index == entry->e_name_index &&
+		    name_len == entry->e_name_len &&
+		    memcmp(name, entry->e_name, name_len) == 0) {
+			error = 0;
+		} else {
+			*free -= EXT3_XATTR_LEN(entry->e_name_len);
+			*free -= le32_to_cpu(entry->e_value_size);
+		}
+		entry = next;
+	}
+	brelse(bh);
+
+	return error;
+}
+
+/*
+ * ext3_xattr_ibody_set()
+ *
+ * this routine add/remove/replace attribute in inode body
+ */
+int
+ext3_xattr_ibody_set(handle_t *handle, struct inode *inode, int name_index,
+		      const char *name, const void *value, size_t value_len,
+		      int flags)
+{
+	struct ext3_xattr_entry *last, *next, *here = NULL;
+	struct ext3_inode *raw_inode;
+	int name_len = strlen(name);
+	int esize = EXT3_XATTR_LEN(name_len);
+	struct buffer_head *bh;
+	int err, storage_size;
+	struct ext3_iloc iloc;
+	int free, min_offs;
+	char *start, *end;
+
+	if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE)
+		return -ENOSPC;
+
+	err = ext3_get_inode_loc(inode, &iloc, 1);
+	if (err)
+		return err;
+	raw_inode = ext3_raw_inode(&iloc);
+	bh = iloc.bh;
+
+	storage_size = EXT3_SB(inode->i_sb)->s_inode_size -
+				EXT3_GOOD_OLD_INODE_SIZE -
+				EXT3_I(inode)->i_extra_isize -
+				sizeof(__u32);
+	start = (char *) raw_inode + EXT3_GOOD_OLD_INODE_SIZE +
+			EXT3_I(inode)->i_extra_isize;
+	if ((*(__u32*) start) != EXT3_XATTR_MAGIC) {
+		/* inode had no attributes before */
+		*((__u32*) start) = cpu_to_le32(EXT3_XATTR_MAGIC);
+	}
+	start += sizeof(__u32);
+	end = (char *) raw_inode + EXT3_SB(inode->i_sb)->s_inode_size;
+	min_offs = storage_size;
+	free = storage_size - sizeof(__u32);
+
+	last = (struct ext3_xattr_entry *) start;
+	while (!IS_LAST_ENTRY(last)) {
+		next = EXT3_XATTR_NEXT(last);
+		if (le32_to_cpu(last->e_value_size) > storage_size ||
+				(char *) next >= end) {
+			ext3_error(inode->i_sb, "ext3_xattr_ibody_set",
+				"inode %ld", inode->i_ino);
+			brelse(bh);
+			return -EIO;
+		}
+
+		if (last->e_value_size) {
+			int offs = le16_to_cpu(last->e_value_offs);
+			if (offs < min_offs)
+				min_offs = offs;
+		}
+		if (name_index == last->e_name_index &&
+			name_len == last->e_name_len &&
+			!memcmp(name, last->e_name, name_len))
+			here = last;
+		else {
+			/* we calculate all but our attribute
+			 * because it will be removed before changing */
+			free -= EXT3_XATTR_LEN(last->e_name_len);
+			free -= le32_to_cpu(last->e_value_size);
+		}
+		last = next;
+	}
+
+	if (value && (esize + value_len > free)) {
+		brelse(bh);
+		return -ENOSPC;
+	}
+
+	err = ext3_reserve_inode_write(handle, inode, &iloc);
+	if (err) {
+		brelse(bh);
+		return err;
+	}
+
+	/* optimization: can we simple replace old value ? */
+	if (here && value_len == le32_to_cpu(here->e_value_size)) {
+		int offs = le16_to_cpu(here->e_value_offs);
+		memcpy(start + offs, value, value_len);
+		goto done;
+	}
+
+	if (here) {
+		/* time to remove old value */
+		struct ext3_xattr_entry *e;
+		int size = le32_to_cpu(here->e_value_size);
+		int border = le16_to_cpu(here->e_value_offs);
+		char *src;
+
+		/* move tail */
+		memmove(start + min_offs + size, start + min_offs,
+				border - min_offs);
+
+		/* recalculate offsets */
+		e = (struct ext3_xattr_entry *) start;
+		while (!IS_LAST_ENTRY(e)) {
+			struct ext3_xattr_entry *next = EXT3_XATTR_NEXT(e);
+			int offs = le16_to_cpu(e->e_value_offs);
+			if (offs < border)
+				e->e_value_offs =
+					cpu_to_le16(offs + size);
+			e = next;
+		}
+		min_offs += size;
+
+		/* remove entry */
+		border = EXT3_XATTR_LEN(here->e_name_len);
+		src = (char *) here + EXT3_XATTR_LEN(here->e_name_len);
+		size = (char *) last - src;
+		if ((char *) here + size > end)
+			printk("ALERT at %s:%d: 0x%p + %d > 0x%p\n",
+					__FILE__, __LINE__, here, size, end);
+		memmove(here, src, size);
+		last = (struct ext3_xattr_entry *) ((char *) last - border);
+		*((__u32 *) last) = 0;
+	}
+
+	if (value) {
+		int offs = min_offs - value_len;
+		/* use last to create new entry */
+		last->e_name_len = strlen(name);
+		last->e_name_index = name_index;
+		last->e_value_offs = cpu_to_le16(offs);
+		last->e_value_size = cpu_to_le32(value_len);
+		last->e_hash = last->e_value_block = 0;
+		memset(last->e_name, 0, esize);
+		memcpy(last->e_name, name, last->e_name_len);
+		if (start + offs + value_len > end)
+			printk("ALERT at %s:%d: 0x%p + %d + %zd > 0x%p\n",
+					__FILE__, __LINE__, start, offs,
+					value_len, end);
+		memcpy(start + offs, value, value_len);
+		last = EXT3_XATTR_NEXT(last);
+		*((__u32 *) last) = 0;
+	}
+
+done:
+	ext3_mark_iloc_dirty(handle, inode, &iloc);
+	brelse(bh);
+
+	return 0;
+}
+
+/*
  * ext3_xattr_set_handle()
  *
  * Create, replace or remove an extended attribute for this inode. Buffer
@@ -370,6 +859,100 @@
  */
 int
 ext3_xattr_set_handle(handle_t *handle, struct inode *inode, int name_index,
+		const char *name, const void *value, size_t value_len,
+		int flags)
+{
+	int free1 = -1, free2 = -1;
+	int err, where = 0, total;
+	int name_len;
+
+	ea_idebug(inode, "name=%d.%s, value=%p, value_len=%ld",
+		  name_index, name, value, (long)value_len);
+
+	if (IS_RDONLY(inode))
+		return -EROFS;
+	if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
+		return -EPERM;
+	if (value == NULL)
+		value_len = 0;
+	if (name == NULL)
+		return -EINVAL;
+	name_len = strlen(name);
+	if (name_len > 255 || value_len > inode->i_sb->s_blocksize)
+		return -ERANGE;
+	down_write(&EXT3_I(inode)->xattr_sem);
+
+#define EX_FOUND_IN_IBODY	1
+#define EX_FOUND_IN_BLOCK	2
+
+	/* try to find attribute in inode body */
+	err = ext3_xattr_ibody_find(inode, name_index, name, &free1);
+	if (err == 0) {
+		/* found EA in inode */
+		where = EX_FOUND_IN_IBODY;
+	} else if (err == -ENOENT) {
+		/* there is no such attribute in inode body */
+		/* try to find attribute in dedicated block */
+		err = ext3_xattr_block_find(inode, name_index, name, &free2);
+		if (err != 0 && err != -ENOENT) {
+			/* not found EA in block */
+			goto finish;
+		} else if (err == 0) {
+			/* found EA in block */
+			where = EX_FOUND_IN_BLOCK;
+		}
+	} else
+		goto finish;
+
+	/* check flags: may replace? may create ? */
+	if (where && (flags & XATTR_CREATE)) {
+		err = -EEXIST;
+		goto finish;
+	} else if (!where && (flags & XATTR_REPLACE)) {
+		err = -ENODATA;
+		goto finish;
+	}
+
+	/* check if we have enough space to store attribute */
+	total = EXT3_XATTR_LEN(strlen(name)) + value_len;
+	if (total > free1 && free2 > 0 && total > free2) {
+		/* have no enough space */
+		err = -ENOSPC;
+		goto finish;
+	}
+
+	/* there are two cases when we want to remove EA from original storage:
+	 * a) EA is stored in the inode, but new value doesn't fit
+	 * b) EA is stored in the block, but new value fit in inode
+	 */
+	if (where == EX_FOUND_IN_IBODY && total > free1)
+		ext3_xattr_ibody_set(handle, inode, name_index, name,
+					NULL, 0, flags);
+	else if (where == EX_FOUND_IN_BLOCK && total <= free1)
+		ext3_xattr_block_set(handle, inode, name_index,
+					name, NULL, 0, flags);
+
+	/* try to store EA in inode body */
+	err = ext3_xattr_ibody_set(handle, inode, name_index, name,
+					value, value_len, flags);
+	if (err) {
+		/* can't store EA in inode body: try to store in block */
+		err = ext3_xattr_block_set(handle, inode, name_index, name,
+						value, value_len, flags);
+	}
+
+finish:
+	up_write(&EXT3_I(inode)->xattr_sem);
+	return err;
+}
+
+/*
+ * ext3_xattr_block_set()
+ *
+ * this routine add/remove/replace attribute in EA block
+ */
+int
+ext3_xattr_block_set(handle_t *handle, struct inode *inode, int name_index,
 		      const char *name, const void *value, size_t value_len,
 		      int flags)
 {
@@ -392,22 +975,7 @@
 	 *             towards the end of the block).
 	 * end -- Points right after the block pointed to by header.
 	 */
-
-	ea_idebug(inode, "name=%d.%s, value=%p, value_len=%ld",
-		  name_index, name, value, (long)value_len);
-
-	if (IS_RDONLY(inode))
-		return -EROFS;
-	if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
-		return -EPERM;
-	if (value == NULL)
-		value_len = 0;
-	if (name == NULL)
-		return -EINVAL;
 	name_len = strlen(name);
-	if (name_len > 255 || value_len > sb->s_blocksize)
-		return -ERANGE;
-	down_write(&EXT3_I(inode)->xattr_sem);
 	if (EXT3_I(inode)->i_file_acl) {
 		/* The inode already has an extended attribute block. */
 		bh = sb_bread(sb, EXT3_I(inode)->i_file_acl);
@@ -633,7 +1201,6 @@
 	brelse(bh);
 	if (!(bh && header == HDR(bh)))
 		kfree(header);
-	up_write(&EXT3_I(inode)->xattr_sem);
 
 	return error;
 }
@@ -718,7 +1285,7 @@
 
 	/* Update the inode. */
 	EXT3_I(inode)->i_file_acl = new_bh ? new_bh->b_blocknr : 0;
-	inode->i_ctime = CURRENT_TIME;
+	inode->i_ctime = CURRENT_TIME_SEC;
 	ext3_mark_inode_dirty(handle, inode);
 	if (IS_SYNC(inode))
 		handle->h_sync = 1;
diff -Nru a/fs/ext3/xattr.h b/fs/ext3/xattr.h
--- a/fs/ext3/xattr.h	2005-01-10 20:11:22 -08:00
+++ b/fs/ext3/xattr.h	2005-01-10 20:11:22 -08:00
@@ -67,7 +67,8 @@
 extern int ext3_xattr_get(struct inode *, int, const char *, void *, size_t);
 extern int ext3_xattr_list(struct inode *, char *, size_t);
 extern int ext3_xattr_set(struct inode *, int, const char *, const void *, size_t, int);
-extern int ext3_xattr_set_handle(handle_t *, struct inode *, int, const char *, const void *, size_t, int);
+extern int ext3_xattr_set_handle(handle_t *, struct inode *, int, const char *,const void *,size_t,int);
+extern int ext3_xattr_block_set(handle_t *, struct inode *, int, const char *,const void *,size_t,int);
 
 extern void ext3_xattr_delete_inode(handle_t *, struct inode *);
 extern void ext3_xattr_put_super(struct super_block *);
diff -Nru a/fs/fat/dir.c b/fs/fat/dir.c
--- a/fs/fat/dir.c	2005-01-10 20:11:16 -08:00
+++ b/fs/fat/dir.c	2005-01-10 20:11:16 -08:00
@@ -761,7 +761,7 @@
 	de[1].starthi = cpu_to_le16(MSDOS_I(parent)->i_logstart>>16);
 	mark_buffer_dirty(bh);
 	brelse(bh);
-	dir->i_atime = dir->i_ctime = dir->i_mtime = CURRENT_TIME;
+	dir->i_atime = dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC;
 	mark_inode_dirty(dir);
 
 	return 0;
diff -Nru a/fs/fat/file.c b/fs/fat/file.c
--- a/fs/fat/file.c	2005-01-10 20:11:17 -08:00
+++ b/fs/fat/file.c	2005-01-10 20:11:17 -08:00
@@ -77,7 +77,7 @@
 
 	retval = generic_file_write(filp, buf, count, ppos);
 	if (retval > 0) {
-		inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+		inode->i_mtime = inode->i_ctime = CURRENT_TIME_SEC;
 		MSDOS_I(inode)->i_attrs |= ATTR_ARCH;
 		mark_inode_dirty(inode);
 	}
@@ -103,6 +103,6 @@
 	fat_free(inode, nr_clusters);
 	MSDOS_I(inode)->i_attrs |= ATTR_ARCH;
 	unlock_kernel();
-	inode->i_ctime = inode->i_mtime = CURRENT_TIME;
+	inode->i_ctime = inode->i_mtime = CURRENT_TIME_SEC;
 	mark_inode_dirty(inode);
 }
diff -Nru a/fs/fifo.c b/fs/fifo.c
--- a/fs/fifo.c	2005-01-10 20:11:18 -08:00
+++ b/fs/fifo.c	2005-01-10 20:11:18 -08:00
@@ -135,12 +135,8 @@
 	goto err;
 
 err:
-	if (!PIPE_READERS(*inode) && !PIPE_WRITERS(*inode)) {
-		struct pipe_inode_info *info = inode->i_pipe;
-		inode->i_pipe = NULL;
-		free_page((unsigned long)info->base);
-		kfree(info);
-	}
+	if (!PIPE_READERS(*inode) && !PIPE_WRITERS(*inode))
+		free_pipe_info(inode);
 
 err_nocleanup:
 	up(PIPE_SEM(*inode));
diff -Nru a/fs/file_table.c b/fs/file_table.c
--- a/fs/file_table.c	2005-01-10 20:11:16 -08:00
+++ b/fs/file_table.c	2005-01-10 20:11:16 -08:00
@@ -82,7 +82,7 @@
 			atomic_set(&f->f_count, 1);
 			f->f_uid = current->fsuid;
 			f->f_gid = current->fsgid;
-			f->f_owner.lock = RW_LOCK_UNLOCKED;
+			rwlock_init(&f->f_owner.lock);
 			/* f->f_version: 0 */
 			INIT_LIST_HEAD(&f->f_list);
 			return f;
diff -Nru a/fs/fs-writeback.c b/fs/fs-writeback.c
--- a/fs/fs-writeback.c	2005-01-10 20:11:23 -08:00
+++ b/fs/fs-writeback.c	2005-01-10 20:11:23 -08:00
@@ -378,6 +378,7 @@
 			list_move(&inode->i_list, &sb->s_dirty);
 		}
 		spin_unlock(&inode_lock);
+		cond_resched();
 		iput(inode);
 		spin_lock(&inode_lock);
 		if (wbc->nr_to_write <= 0)
diff -Nru a/fs/hfs/catalog.c b/fs/hfs/catalog.c
--- a/fs/hfs/catalog.c	2005-01-10 20:11:21 -08:00
+++ b/fs/hfs/catalog.c	2005-01-10 20:11:21 -08:00
@@ -121,7 +121,7 @@
 		goto err1;
 
 	dir->i_size++;
-	dir->i_mtime = dir->i_ctime = CURRENT_TIME;
+	dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC;
 	mark_inode_dirty(dir);
 	hfs_find_exit(&fd);
 	return 0;
@@ -248,7 +248,7 @@
 	}
 
 	dir->i_size--;
-	dir->i_mtime = dir->i_ctime = CURRENT_TIME;
+	dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC;
 	mark_inode_dirty(dir);
 	res = 0;
 out:
@@ -301,7 +301,7 @@
 	if (err)
 		goto out;
 	dst_dir->i_size++;
-	dst_dir->i_mtime = dst_dir->i_ctime = CURRENT_TIME;
+	dst_dir->i_mtime = dst_dir->i_ctime = CURRENT_TIME_SEC;
 	mark_inode_dirty(dst_dir);
 
 	/* finally remove the old entry */
@@ -313,7 +313,7 @@
 	if (err)
 		goto out;
 	src_dir->i_size--;
-	src_dir->i_mtime = src_dir->i_ctime = CURRENT_TIME;
+	src_dir->i_mtime = src_dir->i_ctime = CURRENT_TIME_SEC;
 	mark_inode_dirty(src_dir);
 
 	type = entry.type;
diff -Nru a/fs/hfs/dir.c b/fs/hfs/dir.c
--- a/fs/hfs/dir.c	2005-01-10 20:11:22 -08:00
+++ b/fs/hfs/dir.c	2005-01-10 20:11:22 -08:00
@@ -248,7 +248,7 @@
 
 	inode->i_nlink--;
 	hfs_delete_inode(inode);
-	inode->i_ctime = CURRENT_TIME;
+	inode->i_ctime = CURRENT_TIME_SEC;
 	mark_inode_dirty(inode);
 
 	return res;
@@ -274,7 +274,7 @@
 	if (res)
 		return res;
 	inode->i_nlink = 0;
-	inode->i_ctime = CURRENT_TIME;
+	inode->i_ctime = CURRENT_TIME_SEC;
 	hfs_delete_inode(inode);
 	mark_inode_dirty(inode);
 	return 0;
diff -Nru a/fs/hfs/inode.c b/fs/hfs/inode.c
--- a/fs/hfs/inode.c	2005-01-10 20:11:23 -08:00
+++ b/fs/hfs/inode.c	2005-01-10 20:11:23 -08:00
@@ -169,7 +169,7 @@
 	inode->i_uid = current->fsuid;
 	inode->i_gid = current->fsgid;
 	inode->i_nlink = 1;
-	inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
+	inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC;
 	inode->i_blksize = HFS_SB(sb)->alloc_blksz;
 	HFS_I(inode)->flags = 0;
 	HFS_I(inode)->rsrc_inode = NULL;
diff -Nru a/fs/hfsplus/catalog.c b/fs/hfsplus/catalog.c
--- a/fs/hfsplus/catalog.c	2005-01-10 20:11:19 -08:00
+++ b/fs/hfsplus/catalog.c	2005-01-10 20:11:19 -08:00
@@ -187,7 +187,7 @@
 		goto err1;
 
 	dir->i_size++;
-	dir->i_mtime = dir->i_ctime = CURRENT_TIME;
+	dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC;
 	mark_inode_dirty(dir);
 	hfs_find_exit(&fd);
 	return 0;
@@ -269,7 +269,7 @@
 		goto out;
 
 	dir->i_size--;
-	dir->i_mtime = dir->i_ctime = CURRENT_TIME;
+	dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC;
 	mark_inode_dirty(dir);
 out:
 	hfs_find_exit(&fd);
@@ -315,7 +315,7 @@
 	if (err)
 		goto out;
 	dst_dir->i_size++;
-	dst_dir->i_mtime = dst_dir->i_ctime = CURRENT_TIME;
+	dst_dir->i_mtime = dst_dir->i_ctime = CURRENT_TIME_SEC;
 	mark_inode_dirty(dst_dir);
 
 	/* finally remove the old entry */
@@ -327,7 +327,7 @@
 	if (err)
 		goto out;
 	src_dir->i_size--;
-	src_dir->i_mtime = src_dir->i_ctime = CURRENT_TIME;
+	src_dir->i_mtime = src_dir->i_ctime = CURRENT_TIME_SEC;
 	mark_inode_dirty(src_dir);
 
 	/* remove old thread entry */
diff -Nru a/fs/hfsplus/dir.c b/fs/hfsplus/dir.c
--- a/fs/hfsplus/dir.c	2005-01-10 20:11:24 -08:00
+++ b/fs/hfsplus/dir.c	2005-01-10 20:11:24 -08:00
@@ -294,7 +294,7 @@
 	inode->i_nlink++;
 	hfsplus_instantiate(dst_dentry, inode, cnid);
 	atomic_inc(&inode->i_count);
-	inode->i_ctime = CURRENT_TIME;
+	inode->i_ctime = CURRENT_TIME_SEC;
 	mark_inode_dirty(inode);
 	HFSPLUS_SB(sb).file_count++;
 	sb->s_dirt = 1;
@@ -340,7 +340,7 @@
 		} else
 			inode->i_flags |= S_DEAD;
 	}
-	inode->i_ctime = CURRENT_TIME;
+	inode->i_ctime = CURRENT_TIME_SEC;
 	mark_inode_dirty(inode);
 
 	return res;
@@ -379,7 +379,7 @@
 	if (res)
 		return res;
 	inode->i_nlink = 0;
-	inode->i_ctime = CURRENT_TIME;
+	inode->i_ctime = CURRENT_TIME_SEC;
 	hfsplus_delete_inode(inode);
 	mark_inode_dirty(inode);
 	return 0;
diff -Nru a/fs/hfsplus/inode.c b/fs/hfsplus/inode.c
--- a/fs/hfsplus/inode.c	2005-01-10 20:11:17 -08:00
+++ b/fs/hfsplus/inode.c	2005-01-10 20:11:17 -08:00
@@ -334,7 +334,7 @@
 	inode->i_uid = current->fsuid;
 	inode->i_gid = current->fsgid;
 	inode->i_nlink = 1;
-	inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
+	inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC;
 	inode->i_blksize = HFSPLUS_SB(sb).alloc_blksz;
 	INIT_LIST_HEAD(&HFSPLUS_I(inode).open_dir_list);
 	init_MUTEX(&HFSPLUS_I(inode).extents_lock);
diff -Nru a/fs/hfsplus/ioctl.c b/fs/hfsplus/ioctl.c
--- a/fs/hfsplus/ioctl.c	2005-01-10 20:11:17 -08:00
+++ b/fs/hfsplus/ioctl.c	2005-01-10 20:11:17 -08:00
@@ -73,7 +73,7 @@
 		else
 			HFSPLUS_I(inode).userflags &= ~HFSPLUS_FLG_NODUMP;
 
-		inode->i_ctime = CURRENT_TIME;
+		inode->i_ctime = CURRENT_TIME_SEC;
 		mark_inode_dirty(inode);
 		return 0;
 	}
diff -Nru a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c
--- a/fs/hostfs/hostfs_kern.c	2005-01-10 20:11:16 -08:00
+++ b/fs/hostfs/hostfs_kern.c	2005-01-10 20:11:16 -08:00
@@ -393,6 +393,11 @@
 static struct file_operations hostfs_file_fops = {
 	.llseek		= generic_file_llseek,
 	.read		= generic_file_read,
+	.sendfile	= generic_file_sendfile,
+	.aio_read	= generic_file_aio_read,
+	.aio_write	= generic_file_aio_write,
+	.readv		= generic_file_readv,
+	.writev		= generic_file_writev,
 	.write		= generic_file_write,
 	.mmap		= generic_file_mmap,
 	.open		= hostfs_file_open,
@@ -401,6 +406,7 @@
 };
 
 static struct file_operations hostfs_dir_fops = {
+	.llseek		= generic_file_llseek,
 	.readdir	= hostfs_readdir,
 	.read		= generic_read_dir,
 };
diff -Nru a/fs/hpfs/file.c b/fs/hpfs/file.c
--- a/fs/hpfs/file.c	2005-01-10 20:11:23 -08:00
+++ b/fs/hpfs/file.c	2005-01-10 20:11:23 -08:00
@@ -116,7 +116,7 @@
 	retval = generic_file_write(file, buf, count, ppos);
 	if (retval > 0) {
 		struct inode *inode = file->f_dentry->d_inode;
-		inode->i_mtime = CURRENT_TIME;
+		inode->i_mtime = CURRENT_TIME_SEC;
 		hpfs_i(inode)->i_dirty = 1;
 	}
 	return retval;
diff -Nru a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
--- a/fs/hugetlbfs/inode.c	2005-01-10 20:11:22 -08:00
+++ b/fs/hugetlbfs/inode.c	2005-01-10 20:11:22 -08:00
@@ -225,6 +225,7 @@
 
 	hlist_del_init(&inode->i_hash);
 	list_del_init(&inode->i_list);
+	list_del_init(&inode->i_sb_list);
 	inode->i_state |= I_FREEING;
 	inodes_stat.nr_inodes--;
 	spin_unlock(&inode_lock);
@@ -267,6 +268,7 @@
 	hlist_del_init(&inode->i_hash);
 out_truncate:
 	list_del_init(&inode->i_list);
+	list_del_init(&inode->i_sb_list);
 	inode->i_state |= I_FREEING;
 	inodes_stat.nr_inodes--;
 	spin_unlock(&inode_lock);
@@ -670,6 +672,7 @@
 	sb->s_blocksize_bits = HPAGE_SHIFT;
 	sb->s_magic = HUGETLBFS_MAGIC;
 	sb->s_op = &hugetlbfs_ops;
+	sb->s_time_gran = 1;
 	inode = hugetlbfs_get_inode(sb, config.uid, config.gid,
 					S_IFDIR | config.mode, 0);
 	if (!inode)
diff -Nru a/fs/inode.c b/fs/inode.c
--- a/fs/inode.c	2005-01-10 20:11:23 -08:00
+++ b/fs/inode.c	2005-01-10 20:11:23 -08:00
@@ -198,10 +198,9 @@
 	INIT_RADIX_TREE(&inode->i_data.page_tree, GFP_ATOMIC);
 	spin_lock_init(&inode->i_data.tree_lock);
 	spin_lock_init(&inode->i_data.i_mmap_lock);
-	atomic_set(&inode->i_data.truncate_count, 0);
 	INIT_LIST_HEAD(&inode->i_data.private_list);
 	spin_lock_init(&inode->i_data.private_lock);
-	INIT_PRIO_TREE_ROOT(&inode->i_data.i_mmap);
+	INIT_RAW_PRIO_TREE_ROOT(&inode->i_data.i_mmap);
 	INIT_LIST_HEAD(&inode->i_data.i_mmap_nonlinear);
 	spin_lock_init(&inode->i_lock);
 	i_size_ordered_init(inode);
@@ -296,7 +295,7 @@
 /*
  * Invalidate all inodes for a device.
  */
-static int invalidate_list(struct list_head *head, struct super_block * sb, struct list_head * dispose)
+static int invalidate_list(struct list_head *head, struct list_head *dispose)
 {
 	struct list_head *next;
 	int busy = 0, count = 0;
@@ -306,15 +305,22 @@
 		struct list_head * tmp = next;
 		struct inode * inode;
 
+		/*
+		 * We can reschedule here without worrying about the list's
+		 * consistency because the per-sb list of inodes must not
+		 * change during umount anymore, and because iprune_sem keeps
+		 * shrink_icache_memory() away.
+		 */
+		cond_resched_lock(&inode_lock);
+
 		next = next->next;
 		if (tmp == head)
 			break;
-		inode = list_entry(tmp, struct inode, i_list);
-		if (inode->i_sb != sb)
-			continue;
+		inode = list_entry(tmp, struct inode, i_sb_list);
 		invalidate_inode_buffers(inode);
 		if (!atomic_read(&inode->i_count)) {
 			hlist_del_init(&inode->i_hash);
+			list_del(&inode->i_sb_list);
 			list_move(&inode->i_list, dispose);
 			inode->i_state |= I_FREEING;
 			count++;
@@ -350,10 +356,7 @@
 
 	down(&iprune_sem);
 	spin_lock(&inode_lock);
-	busy = invalidate_list(&inode_in_use, sb, &throw_away);
-	busy |= invalidate_list(&inode_unused, sb, &throw_away);
-	busy |= invalidate_list(&sb->s_dirty, sb, &throw_away);
-	busy |= invalidate_list(&sb->s_io, sb, &throw_away);
+	busy = invalidate_list(&sb->s_inodes, &throw_away);
 	spin_unlock(&inode_lock);
 
 	dispose_list(&throw_away);
@@ -453,6 +456,7 @@
 				continue;
 		}
 		hlist_del_init(&inode->i_hash);
+		list_del_init(&inode->i_sb_list);
 		list_move(&inode->i_list, &freeable);
 		inode->i_state |= I_FREEING;
 		nr_pruned++;
@@ -564,6 +568,7 @@
 		spin_lock(&inode_lock);
 		inodes_stat.nr_inodes++;
 		list_add(&inode->i_list, &inode_in_use);
+		list_add(&inode->i_sb_list, &sb->s_inodes);
 		inode->i_ino = ++last_ino;
 		inode->i_state = 0;
 		spin_unlock(&inode_lock);
@@ -612,6 +617,7 @@
 
 			inodes_stat.nr_inodes++;
 			list_add(&inode->i_list, &inode_in_use);
+			list_add(&inode->i_sb_list, &sb->s_inodes);
 			hlist_add_head(&inode->i_hash, head);
 			inode->i_state = I_LOCK|I_NEW;
 			spin_unlock(&inode_lock);
@@ -660,6 +666,7 @@
 			inode->i_ino = ino;
 			inodes_stat.nr_inodes++;
 			list_add(&inode->i_list, &inode_in_use);
+			list_add(&inode->i_sb_list, &sb->s_inodes);
 			hlist_add_head(&inode->i_hash, head);
 			inode->i_state = I_LOCK|I_NEW;
 			spin_unlock(&inode_lock);
@@ -996,6 +1003,7 @@
 	struct super_operations *op = inode->i_sb->s_op;
 
 	list_del_init(&inode->i_list);
+	list_del_init(&inode->i_sb_list);
 	inode->i_state|=I_FREEING;
 	inodes_stat.nr_inodes--;
 	spin_unlock(&inode_lock);
@@ -1041,6 +1049,7 @@
 		hlist_del_init(&inode->i_hash);
 	}
 	list_del_init(&inode->i_list);
+	list_del_init(&inode->i_sb_list);
 	inode->i_state|=I_FREEING;
 	inodes_stat.nr_inodes--;
 	spin_unlock(&inode_lock);
@@ -1130,19 +1139,6 @@
 
 EXPORT_SYMBOL(bmap);
 
-/*
- * Return true if the filesystem which backs this inode considers the two
- * passed timespecs to be sufficiently different to warrant flushing the
- * altered time out to disk.
- */
-static int inode_times_differ(struct inode *inode,
-			struct timespec *old, struct timespec *new)
-{
-	if (IS_ONE_SECOND(inode))
-		return old->tv_sec != new->tv_sec;
-	return !timespec_equal(old, new);
-}
-
 /**
  *	update_atime	-	update the access time
  *	@inode: inode accessed
@@ -1162,8 +1158,8 @@
 	if (IS_RDONLY(inode))
 		return;
 
-	now = current_kernel_time();
-	if (inode_times_differ(inode, &inode->i_atime, &now)) {
+	now = current_fs_time(inode->i_sb);
+	if (!timespec_equal(&inode->i_atime, &now)) {
 		inode->i_atime = now;
 		mark_inode_dirty_sync(inode);
 	} else {
@@ -1193,14 +1189,13 @@
 	if (IS_RDONLY(inode))
 		return;
 
-	now = current_kernel_time();
-
-	if (inode_times_differ(inode, &inode->i_mtime, &now))
+	now = current_fs_time(inode->i_sb);
+	if (!timespec_equal(&inode->i_mtime, &now))
 		sync_it = 1;
 	inode->i_mtime = now;
 
 	if (ctime_too) {
-		if (inode_times_differ(inode, &inode->i_ctime, &now))
+		if (!timespec_equal(&inode->i_ctime, &now))
 			sync_it = 1;
 		inode->i_ctime = now;
 	}
@@ -1229,36 +1224,23 @@
 /* Function back in dquot.c */
 int remove_inode_dquot_ref(struct inode *, int, struct list_head *);
 
-void remove_dquot_ref(struct super_block *sb, int type, struct list_head *tofree_head)
+void remove_dquot_ref(struct super_block *sb, int type,
+			struct list_head *tofree_head)
 {
 	struct inode *inode;
-	struct list_head *act_head;
 
 	if (!sb->dq_op)
 		return;	/* nothing to do */
 	spin_lock(&inode_lock);	/* This lock is for inodes code */
 
-	/* We hold dqptr_sem so we are safe against the quota code */
-	list_for_each(act_head, &inode_in_use) {
-		inode = list_entry(act_head, struct inode, i_list);
-		if (inode->i_sb == sb && !IS_NOQUOTA(inode))
-			remove_inode_dquot_ref(inode, type, tofree_head);
-	}
-	list_for_each(act_head, &inode_unused) {
-		inode = list_entry(act_head, struct inode, i_list);
-		if (inode->i_sb == sb && !IS_NOQUOTA(inode))
-			remove_inode_dquot_ref(inode, type, tofree_head);
-	}
-	list_for_each(act_head, &sb->s_dirty) {
-		inode = list_entry(act_head, struct inode, i_list);
-		if (!IS_NOQUOTA(inode))
-			remove_inode_dquot_ref(inode, type, tofree_head);
-	}
-	list_for_each(act_head, &sb->s_io) {
-		inode = list_entry(act_head, struct inode, i_list);
+	/*
+	 * We don't have to lock against quota code - test IS_QUOTAINIT is
+	 * just for speedup...
+	 */
+	list_for_each_entry(inode, &sb->s_inodes, i_sb_list)
 		if (!IS_NOQUOTA(inode))
 			remove_inode_dquot_ref(inode, type, tofree_head);
-	}
+
 	spin_unlock(&inode_lock);
 }
 
@@ -1328,14 +1310,21 @@
 {
 	int loop;
 
+	/* If hashes are distributed across NUMA nodes, defer
+	 * hash allocation until vmalloc space is available.
+	 */
+	if (hashdist)
+		return;
+
 	inode_hashtable =
 		alloc_large_system_hash("Inode-cache",
 					sizeof(struct hlist_head),
 					ihash_entries,
 					14,
-					0,
+					HASH_EARLY,
 					&i_hash_shift,
-					&i_hash_mask);
+					&i_hash_mask,
+					0);
 
 	for (loop = 0; loop < (1 << i_hash_shift); loop++)
 		INIT_HLIST_HEAD(&inode_hashtable[loop]);
@@ -1343,10 +1332,29 @@
 
 void __init inode_init(unsigned long mempages)
 {
+	int loop;
+
 	/* inode slab cache */
 	inode_cachep = kmem_cache_create("inode_cache", sizeof(struct inode),
 				0, SLAB_PANIC, init_once, NULL);
 	set_shrinker(DEFAULT_SEEKS, shrink_icache_memory);
+
+	/* Hash may have been set up in inode_init_early */
+	if (!hashdist)
+		return;
+
+	inode_hashtable =
+		alloc_large_system_hash("Inode-cache",
+					sizeof(struct hlist_head),
+					ihash_entries,
+					14,
+					0,
+					&i_hash_shift,
+					&i_hash_mask,
+					0);
+
+	for (loop = 0; loop < (1 << i_hash_shift); loop++)
+		INIT_HLIST_HEAD(&inode_hashtable[loop]);
 }
 
 void init_special_inode(struct inode *inode, umode_t mode, dev_t rdev)
diff -Nru a/fs/jbd/checkpoint.c b/fs/jbd/checkpoint.c
--- a/fs/jbd/checkpoint.c	2005-01-10 20:11:24 -08:00
+++ b/fs/jbd/checkpoint.c	2005-01-10 20:11:24 -08:00
@@ -333,6 +333,10 @@
 				break;
 			}
 			retry = __flush_buffer(journal, jh, bhs, &batch_count, &drop_count);
+			if (cond_resched_lock(&journal->j_list_lock)) {
+				retry = 1;
+				break;
+			}
 		} while (jh != last_jh && !retry);
 
 		if (batch_count)
@@ -487,6 +491,14 @@
 				/* Use trylock because of the ranknig */
 				if (jbd_trylock_bh_state(jh2bh(jh)))
 					ret += __try_to_free_cp_buf(jh);
+				/*
+				 * This function only frees up some memory
+				 * if possible so we dont have an obligation
+				 * to finish processing. Bail out if preemption
+				 * requested:
+				 */
+				if (need_resched())
+					goto out;
 			} while (jh != last_jh);
 		}
 	} while (transaction != last_transaction);
diff -Nru a/fs/jbd/commit.c b/fs/jbd/commit.c
--- a/fs/jbd/commit.c	2005-01-10 20:11:22 -08:00
+++ b/fs/jbd/commit.c	2005-01-10 20:11:22 -08:00
@@ -262,7 +262,7 @@
 			__journal_file_buffer(jh, commit_transaction,
 						BJ_Locked);
 			jbd_unlock_bh_state(bh);
-			if (need_resched()) {
+			if (lock_need_resched(&journal->j_list_lock)) {
 				spin_unlock(&journal->j_list_lock);
 				goto write_out_data;
 			}
@@ -288,7 +288,7 @@
 				jbd_unlock_bh_state(bh);
 				journal_remove_journal_head(bh);
 				put_bh(bh);
-				if (need_resched()) {
+				if (lock_need_resched(&journal->j_list_lock)) {
 					spin_unlock(&journal->j_list_lock);
 					goto write_out_data;
 				}
@@ -333,11 +333,7 @@
 			jbd_unlock_bh_state(bh);
 		}
 		put_bh(bh);
-		if (need_resched()) {
-			spin_unlock(&journal->j_list_lock);
-			cond_resched();
-			spin_lock(&journal->j_list_lock);
-		}
+		cond_resched_lock(&journal->j_list_lock);
 	}
 	spin_unlock(&journal->j_list_lock);
 
@@ -545,6 +541,8 @@
 			wait_on_buffer(bh);
 			goto wait_for_iobuf;
 		}
+		if (cond_resched())
+			goto wait_for_iobuf;
 
 		if (unlikely(!buffer_uptodate(bh)))
 			err = -EIO;
@@ -599,6 +597,8 @@
 			wait_on_buffer(bh);
 			goto wait_for_ctlbuf;
 		}
+		if (cond_resched())
+			goto wait_for_ctlbuf;
 
 		if (unlikely(!buffer_uptodate(bh)))
 			err = -EIO;
@@ -695,6 +695,7 @@
 	J_ASSERT(commit_transaction->t_shadow_list == NULL);
 	J_ASSERT(commit_transaction->t_log_list == NULL);
 
+restart_loop:
 	while (commit_transaction->t_forget) {
 		transaction_t *cp_transaction;
 		struct buffer_head *bh;
@@ -768,6 +769,8 @@
 			release_buffer_page(bh);
 		}
 		spin_unlock(&journal->j_list_lock);
+		if (cond_resched())
+			goto restart_loop;
 	}
 
 	/* Done with this transaction! */
diff -Nru a/fs/jbd/recovery.c b/fs/jbd/recovery.c
--- a/fs/jbd/recovery.c	2005-01-10 20:11:24 -08:00
+++ b/fs/jbd/recovery.c	2005-01-10 20:11:24 -08:00
@@ -354,6 +354,8 @@
 		struct buffer_head *	obh;
 		struct buffer_head *	nbh;
 
+		cond_resched();		/* We're under lock_kernel() */
+
 		/* If we already know where to stop the log traversal,
 		 * check right now that we haven't gone past the end of
 		 * the log. */
diff -Nru a/fs/jbd/revoke.c b/fs/jbd/revoke.c
--- a/fs/jbd/revoke.c	2005-01-10 20:11:16 -08:00
+++ b/fs/jbd/revoke.c	2005-01-10 20:11:16 -08:00
@@ -376,7 +376,12 @@
            first having the revoke cancelled: it's illegal to free a
            block twice without allocating it in between! */
 	if (bh) {
-		J_ASSERT_BH(bh, !buffer_revoked(bh));
+		if (!J_EXPECT_BH(bh, !buffer_revoked(bh),
+				 "inconsistent data on disk")) {
+			if (!bh_in)
+				brelse(bh);
+			return -EIO;
+		}
 		set_buffer_revoked(bh);
 		set_buffer_revokevalid(bh);
 		if (bh_in) {
diff -Nru a/fs/jbd/transaction.c b/fs/jbd/transaction.c
--- a/fs/jbd/transaction.c	2005-01-10 20:11:17 -08:00
+++ b/fs/jbd/transaction.c	2005-01-10 20:11:17 -08:00
@@ -1198,11 +1198,12 @@
  * Allow this call even if the handle has aborted --- it may be part of
  * the caller's cleanup after an abort.
  */
-void journal_forget(handle_t *handle, struct buffer_head *bh)
+int journal_forget (handle_t *handle, struct buffer_head *bh)
 {
 	transaction_t *transaction = handle->h_transaction;
 	journal_t *journal = transaction->t_journal;
 	struct journal_head *jh;
+	int err = 0;
 
 	BUFFER_TRACE(bh, "entry");
 
@@ -1213,6 +1214,14 @@
 		goto not_jbd;
 	jh = bh2jh(bh);
 
+	/* Critical error: attempting to delete a bitmap buffer, maybe?
+	 * Don't do any jbd operations, and return an error. */
+	if (!J_EXPECT_JH(jh, !jh->b_committed_data,
+			 "inconsistent data on disk")) {
+		err = -EIO;
+		goto not_jbd;
+	}
+
 	if (jh->b_transaction == handle->h_transaction) {
 		J_ASSERT_JH(jh, !jh->b_frozen_data);
 
@@ -1223,7 +1232,6 @@
 		clear_buffer_jbddirty(bh);
 
 		JBUFFER_TRACE(jh, "belongs to current transaction: unfile");
-		J_ASSERT_JH(jh, !jh->b_committed_data);
 
 		__journal_unfile_buffer(jh);
 
@@ -1248,7 +1256,7 @@
 				spin_unlock(&journal->j_list_lock);
 				jbd_unlock_bh_state(bh);
 				__bforget(bh);
-				return;
+				return 0;
 			}
 		}
 	} else if (jh->b_transaction) {
@@ -1270,7 +1278,7 @@
 	spin_unlock(&journal->j_list_lock);
 	jbd_unlock_bh_state(bh);
 	__brelse(bh);
-	return;
+	return err;
 }
 
 /**
diff -Nru a/fs/jffs/inode-v23.c b/fs/jffs/inode-v23.c
--- a/fs/jffs/inode-v23.c	2005-01-10 20:11:20 -08:00
+++ b/fs/jffs/inode-v23.c	2005-01-10 20:11:20 -08:00
@@ -298,7 +298,7 @@
 		if (len) {
 			invalidate_inode_pages(inode->i_mapping);
 		}
-		inode->i_ctime = CURRENT_TIME;
+		inode->i_ctime = CURRENT_TIME_SEC;
 		inode->i_mtime = inode->i_ctime;
 	}
 	if (update_all || iattr->ia_valid & ATTR_ATIME) {
@@ -548,7 +548,7 @@
 	/* This is a kind of update of the inode we're about to make
 	   here.  This is what they do in ext2fs.  Kind of.  */
 	if ((inode = iget(new_dir->i_sb, f->ino))) {
-		inode->i_ctime = CURRENT_TIME;
+		inode->i_ctime = CURRENT_TIME_SEC;
 		mark_inode_dirty(inode);
 		iput(inode);
 	}
@@ -1051,7 +1051,7 @@
 	   from the in-memory file system structures.  */
 	jffs_insert_node(c, del_f, &raw_inode, NULL, del_node);
 
-	dir->i_ctime = dir->i_mtime = CURRENT_TIME;
+	dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC;
 	mark_inode_dirty(dir);
 	inode->i_nlink--;
 	inode->i_ctime = dir->i_ctime;
@@ -1518,7 +1518,7 @@
 		inode->i_size = pos;
 		inode->i_blocks = (inode->i_size + 511) >> 9;
 	}
-	inode->i_ctime = inode->i_mtime = CURRENT_TIME;
+	inode->i_ctime = inode->i_mtime = CURRENT_TIME_SEC;
 	mark_inode_dirty(inode);
 	invalidate_inode_pages(inode->i_mapping);
 
diff -Nru a/fs/jffs2/Makefile b/fs/jffs2/Makefile
--- a/fs/jffs2/Makefile	2005-01-10 20:11:24 -08:00
+++ b/fs/jffs2/Makefile	2005-01-10 20:11:24 -08:00
@@ -1,7 +1,7 @@
 #
 # Makefile for the Linux Journalling Flash File System v2 (JFFS2)
 #
-# $Id: Makefile.common,v 1.6 2004/07/16 15:17:57 dwmw2 Exp $
+# $Id: Makefile.common,v 1.7 2004/11/03 12:57:38 jwboyer Exp $
 #
 
 obj-$(CONFIG_JFFS2_FS) += jffs2.o
@@ -12,6 +12,7 @@
 jffs2-y	+= super.o
 
 jffs2-$(CONFIG_JFFS2_FS_NAND)	+= wbuf.o
+jffs2-$(CONFIG_JFFS2_FS_NOR_ECC) += wbuf.o
 jffs2-$(CONFIG_JFFS2_RUBIN)	+= compr_rubin.o
 jffs2-$(CONFIG_JFFS2_RTIME)	+= compr_rtime.o
 jffs2-$(CONFIG_JFFS2_ZLIB)	+= compr_zlib.o
diff -Nru a/fs/jffs2/README.Locking b/fs/jffs2/README.Locking
--- a/fs/jffs2/README.Locking	2005-01-10 20:11:18 -08:00
+++ b/fs/jffs2/README.Locking	2005-01-10 20:11:18 -08:00
@@ -1,4 +1,4 @@
-	$Id: README.Locking,v 1.4 2002/03/08 16:20:06 dwmw2 Exp $
+	$Id: README.Locking,v 1.9 2004/11/20 10:35:40 dwmw2 Exp $
 
 	JFFS2 LOCKING DOCUMENTATION
 	---------------------------
@@ -80,10 +80,10 @@
 (NB) the per-inode list of physical nodes. The latter is a special
 case - see below.
 
-As the MTD API permits erase-completion callback functions to be
-called from bottom-half (timer) context, and these functions access
-the data structures protected by this lock, it must be locked with
-spin_lock_bh().
+As the MTD API no longer permits erase-completion callback functions
+to be called from bottom-half (timer) context (on the basis that nobody
+ever actually implemented such a thing), it's now sufficient to use
+a simple spin_lock() rather than spin_lock_bh().
 
 Note that the per-inode list of physical nodes (f->nodes) is a special
 case. Any changes to _valid_ nodes (i.e. ->flash_offset & 1 == 0) in
@@ -99,8 +99,27 @@
 GC thread locks it, sends the signal, then unlocks it - while the GC
 thread itself locks it, zeroes c->gc_task, then unlocks on the exit path.
 
-	node_free_sem
-	-------------
+
+	inocache_lock spinlock
+	----------------------
+
+This spinlock protects the hashed list (c->inocache_list) of the
+in-core jffs2_inode_cache objects (each inode in JFFS2 has the
+correspondent jffs2_inode_cache object). So, the inocache_lock
+has to be locked while walking the c->inocache_list hash buckets.
+
+Note, the f->sem guarantees that the correspondent jffs2_inode_cache
+will not be removed. So, it is allowed to access it without locking
+the inocache_lock spinlock. 
+
+Ordering constraints: 
+
+	If both erase_completion_lock and inocache_lock are needed, the
+	c->erase_completion has to be acquired first.
+
+
+	erase_free_sem
+	--------------
 
 This semaphore is only used by the erase code which frees obsolete
 node references and the jffs2_garbage_collect_deletion_dirent()
@@ -114,3 +133,16 @@
 collection code is looking at them.
 
 Suggestions for alternative solutions to this problem would be welcomed.
+
+
+	wbuf_sem
+	--------
+
+This read/write semaphore protects against concurrent access to the
+write-behind buffer ('wbuf') used for flash chips where we must write
+in blocks. It protects both the contents of the wbuf and the metadata
+which indicates which flash region (if any) is currently covered by 
+the buffer.
+
+Ordering constraints:
+	Lock wbuf_sem last, after the alloc_sem or and f->sem.
diff -Nru a/fs/jffs2/background.c b/fs/jffs2/background.c
--- a/fs/jffs2/background.c	2005-01-10 20:11:15 -08:00
+++ b/fs/jffs2/background.c	2005-01-10 20:11:15 -08:00
@@ -3,11 +3,11 @@
  *
  * Copyright (C) 2001-2003 Red Hat, Inc.
  *
- * Created by David Woodhouse <dwmw2@redhat.com>
+ * Created by David Woodhouse <dwmw2@infradead.org>
  *
  * For licensing information, see the file 'LICENCE' in this directory.
  *
- * $Id: background.c,v 1.49 2004/07/13 08:56:40 dwmw2 Exp $
+ * $Id: background.c,v 1.50 2004/11/16 20:36:10 dwmw2 Exp $
  *
  */
 
diff -Nru a/fs/jffs2/build.c b/fs/jffs2/build.c
--- a/fs/jffs2/build.c	2005-01-10 20:11:19 -08:00
+++ b/fs/jffs2/build.c	2005-01-10 20:11:19 -08:00
@@ -3,17 +3,19 @@
  *
  * Copyright (C) 2001-2003 Red Hat, Inc.
  *
- * Created by David Woodhouse <dwmw2@redhat.com>
+ * Created by David Woodhouse <dwmw2@infradead.org>
  *
  * For licensing information, see the file 'LICENCE' in this directory.
  *
- * $Id: build.c,v 1.55 2003/10/28 17:02:44 dwmw2 Exp $
+ * $Id: build.c,v 1.69 2004/12/16 20:22:18 dmarlin Exp $
  *
  */
 
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <linux/slab.h>
+#include <linux/vmalloc.h>
+#include <linux/mtd/mtd.h>
 #include "nodelist.h"
 
 static void jffs2_build_remove_unlinked_inode(struct jffs2_sb_info *, struct jffs2_inode_cache *, struct jffs2_full_dirent **);
@@ -62,6 +64,7 @@
 		if (!child_ic) {
 			printk(KERN_NOTICE "Eep. Child \"%s\" (ino #%u) of dir ino #%u doesn't exist!\n",
 				  fd->name, fd->ino, ic->ino);
+			jffs2_mark_node_obsolete(c, fd->raw);
 			continue;
 		}
 
@@ -88,6 +91,7 @@
 	int ret;
 	int i;
 	struct jffs2_inode_cache *ic;
+	struct jffs2_full_dirent *fd;
 	struct jffs2_full_dirent *dead_fds = NULL;
 
 	/* First, scan the medium and build all the inode caches with
@@ -95,13 +99,11 @@
 
 	c->flags |= JFFS2_SB_FLAG_MOUNTING;
 	ret = jffs2_scan_medium(c);
-	c->flags &= ~JFFS2_SB_FLAG_MOUNTING;
-
 	if (ret)
-		return ret;
+		goto exit;
 
 	D1(printk(KERN_DEBUG "Scanned flash completely\n"));
-	D1(jffs2_dump_block_lists(c));
+	D2(jffs2_dump_block_lists(c));
 
 	/* Now scan the directory tree, increasing nlink according to every dirent found. */
 	for_each_inode(i, c, ic) {
@@ -114,6 +116,8 @@
 			cond_resched();
 		}
 	}
+	c->flags &= ~JFFS2_SB_FLAG_MOUNTING;
+
 	D1(printk(KERN_DEBUG "Pass 1 complete\n"));
 
 	/* Next, scan for inodes with nlink == 0 and remove them. If
@@ -135,9 +139,7 @@
 	D1(printk(KERN_DEBUG "Pass 2a starting\n"));
 
 	while (dead_fds) {
-		struct jffs2_inode_cache *ic;
-		struct jffs2_full_dirent *fd = dead_fds;
-
+		fd = dead_fds;
 		dead_fds = fd->next;
 
 		ic = jffs2_get_ino_cache(c, fd->ino);
@@ -152,7 +154,6 @@
 	
 	/* Finally, we can scan again and free the dirent structs */
 	for_each_inode(i, c, ic) {
-		struct jffs2_full_dirent *fd;
 		D1(printk(KERN_DEBUG "Pass 3: ino #%u, ic %p, nodes %p\n", ic->ino, ic, ic->nodes));
 
 		while(ic->scan_dents) {
@@ -164,11 +165,24 @@
 		cond_resched();
 	}
 	D1(printk(KERN_DEBUG "Pass 3 complete\n"));
-	D1(jffs2_dump_block_lists(c));
+	D2(jffs2_dump_block_lists(c));
 
 	/* Rotate the lists by some number to ensure wear levelling */
 	jffs2_rotate_lists(c);
 
+	ret = 0;
+
+exit:
+	if (ret) {
+		for_each_inode(i, c, ic) {
+			while(ic->scan_dents) {
+				fd = ic->scan_dents;
+				ic->scan_dents = fd->next;
+				jffs2_free_full_dirent(fd);
+			}
+		}
+	}
+
 	return ret;
 }
 
@@ -179,9 +193,12 @@
 
 	D1(printk(KERN_DEBUG "JFFS2: Removing ino #%u with nlink == zero.\n", ic->ino));
 	
-	for (raw = ic->nodes; raw != (void *)ic; raw = raw->next_in_ino) {
+	raw = ic->nodes;
+	while (raw != (void *)ic) {
+		struct jffs2_raw_node_ref *next = raw->next_in_ino;
 		D1(printk(KERN_DEBUG "obsoleting node at 0x%08x\n", ref_offset(raw)));
 		jffs2_mark_node_obsolete(c, raw);
+		raw = next;
 	}
 
 	if (ic->scan_dents) {
@@ -297,7 +314,10 @@
 
 	c->free_size = c->flash_size;
 	c->nr_blocks = c->flash_size / c->sector_size;
-	c->blocks = kmalloc(sizeof(struct jffs2_eraseblock) * c->nr_blocks, GFP_KERNEL);
+ 	if (c->mtd->flags & MTD_NO_VIRTBLOCKS)
+		c->blocks = vmalloc(sizeof(struct jffs2_eraseblock) * c->nr_blocks);
+	else
+		c->blocks = kmalloc(sizeof(struct jffs2_eraseblock) * c->nr_blocks, GFP_KERNEL);
 	if (!c->blocks)
 		return -ENOMEM;
 	for (i=0; i<c->nr_blocks; i++) {
@@ -310,6 +330,7 @@
 		c->blocks[i].used_size = 0;
 		c->blocks[i].first_node = NULL;
 		c->blocks[i].last_node = NULL;
+		c->blocks[i].bad_count = 0;
 	}
 
 	init_MUTEX(&c->alloc_sem);
@@ -336,7 +357,11 @@
 		D1(printk(KERN_DEBUG "build_fs failed\n"));
 		jffs2_free_ino_caches(c);
 		jffs2_free_raw_node_refs(c);
-		kfree(c->blocks);
+		if (c->mtd->flags & MTD_NO_VIRTBLOCKS) {
+			vfree(c->blocks);
+		} else {
+			kfree(c->blocks);
+		}
 		return -EIO;
 	}
 
diff -Nru a/fs/jffs2/compr_zlib.c b/fs/jffs2/compr_zlib.c
--- a/fs/jffs2/compr_zlib.c	2005-01-10 20:11:23 -08:00
+++ b/fs/jffs2/compr_zlib.c	2005-01-10 20:11:23 -08:00
@@ -3,11 +3,11 @@
  *
  * Copyright (C) 2001-2003 Red Hat, Inc.
  *
- * Created by David Woodhouse <dwmw2@redhat.com>
+ * Created by David Woodhouse <dwmw2@infradead.org>
  *
  * For licensing information, see the file 'LICENCE' in this directory.
  *
- * $Id: compr_zlib.c,v 1.28 2004/06/23 16:34:40 havasi Exp $
+ * $Id: compr_zlib.c,v 1.29 2004/11/16 20:36:11 dwmw2 Exp $
  *
  */
 
diff -Nru a/fs/jffs2/dir.c b/fs/jffs2/dir.c
--- a/fs/jffs2/dir.c	2005-01-10 20:11:21 -08:00
+++ b/fs/jffs2/dir.c	2005-01-10 20:11:21 -08:00
@@ -3,11 +3,11 @@
  *
  * Copyright (C) 2001-2003 Red Hat, Inc.
  *
- * Created by David Woodhouse <dwmw2@redhat.com>
+ * Created by David Woodhouse <dwmw2@infradead.org>
  *
  * For licensing information, see the file 'LICENCE' in this directory.
  *
- * $Id: dir.c,v 1.83 2004/10/19 07:48:44 havasi Exp $
+ * $Id: dir.c,v 1.84 2004/11/16 20:36:11 dwmw2 Exp $
  *
  */
 
diff -Nru a/fs/jffs2/erase.c b/fs/jffs2/erase.c
--- a/fs/jffs2/erase.c	2005-01-10 20:11:16 -08:00
+++ b/fs/jffs2/erase.c	2005-01-10 20:11:16 -08:00
@@ -3,11 +3,11 @@
  *
  * Copyright (C) 2001-2003 Red Hat, Inc.
  *
- * Created by David Woodhouse <dwmw2@redhat.com>
+ * Created by David Woodhouse <dwmw2@infradead.org>
  *
  * For licensing information, see the file 'LICENCE' in this directory.
  *
- * $Id: erase.c,v 1.61 2004/10/20 23:59:49 dwmw2 Exp $
+ * $Id: erase.c,v 1.66 2004/11/16 20:36:11 dwmw2 Exp $
  *
  */
 
@@ -43,6 +43,7 @@
                jffs2_erase_succeeded(c, jeb);
                return;
        }
+       bad_offset = jeb->offset;
 #else /* Linux */
 	struct erase_info *instr;
 
@@ -386,6 +387,7 @@
 		jeb->dirty_size = 0;
 		jeb->wasted_size = 0;
 	} else {
+		struct kvec vecs[1];
 		struct jffs2_unknown_node marker = {
 			.magic =	cpu_to_je16(JFFS2_MAGIC_BITMASK),
 			.nodetype =	cpu_to_je16(JFFS2_NODETYPE_CLEANMARKER),
@@ -394,8 +396,10 @@
 
 		marker.hdr_crc = cpu_to_je32(crc32(0, &marker, sizeof(struct jffs2_unknown_node)-4));
 
-		/* We only write the header; the rest was noise or padding anyway */
-		ret = jffs2_flash_write(c, jeb->offset, sizeof(marker), &retlen, (char *)&marker);
+		vecs[0].iov_base = (unsigned char *) &marker;
+		vecs[0].iov_len = sizeof(marker);
+		ret = jffs2_flash_direct_writev(c, vecs, 1, jeb->offset, &retlen);
+		
 		if (ret) {
 			printk(KERN_WARNING "Write clean marker to block at 0x%08x failed: %d\n",
 			       jeb->offset, ret);
diff -Nru a/fs/jffs2/file.c b/fs/jffs2/file.c
--- a/fs/jffs2/file.c	2005-01-10 20:11:23 -08:00
+++ b/fs/jffs2/file.c	2005-01-10 20:11:23 -08:00
@@ -3,11 +3,11 @@
  *
  * Copyright (C) 2001-2003 Red Hat, Inc.
  *
- * Created by David Woodhouse <dwmw2@redhat.com>
+ * Created by David Woodhouse <dwmw2@infradead.org>
  *
  * For licensing information, see the file 'LICENCE' in this directory.
  *
- * $Id: file.c,v 1.98 2004/03/19 16:41:09 dwmw2 Exp $
+ * $Id: file.c,v 1.99 2004/11/16 20:36:11 dwmw2 Exp $
  *
  */
 
diff -Nru a/fs/jffs2/fs.c b/fs/jffs2/fs.c
--- a/fs/jffs2/fs.c	2005-01-10 20:11:18 -08:00
+++ b/fs/jffs2/fs.c	2005-01-10 20:11:18 -08:00
@@ -3,11 +3,11 @@
  *
  * Copyright (C) 2001-2003 Red Hat, Inc.
  *
- * Created by David Woodhouse <dwmw2@redhat.com>
+ * Created by David Woodhouse <dwmw2@infradead.org>
  *
  * For licensing information, see the file 'LICENCE' in this directory.
  *
- * $Id: fs.c,v 1.46 2004/07/13 08:56:54 dwmw2 Exp $
+ * $Id: fs.c,v 1.51 2004/11/28 12:19:37 dedekind Exp $
  *
  */
 
@@ -20,6 +20,7 @@
 #include <linux/mtd/mtd.h>
 #include <linux/pagemap.h>
 #include <linux/slab.h>
+#include <linux/vmalloc.h>
 #include <linux/vfs.h>
 #include <linux/crc32.h>
 #include "nodelist.h"
@@ -202,7 +203,7 @@
 
 	buf->f_bavail = buf->f_bfree = avail >> PAGE_SHIFT;
 
-	D1(jffs2_dump_block_lists(c));
+	D2(jffs2_dump_block_lists(c));
 
 	spin_unlock(&c->erase_completion_lock);
 
@@ -426,7 +427,7 @@
 	inode->i_mode = jemode_to_cpu(ri->mode);
 	inode->i_gid = je16_to_cpu(ri->gid);
 	inode->i_uid = je16_to_cpu(ri->uid);
-	inode->i_atime = inode->i_ctime = inode->i_mtime = CURRENT_TIME;
+	inode->i_atime = inode->i_ctime = inode->i_mtime = CURRENT_TIME_SEC;
 	ri->atime = ri->mtime = ri->ctime = cpu_to_je32(I_SEC(inode->i_mtime));
 
 	inode->i_blksize = PAGE_SIZE;
@@ -463,11 +464,13 @@
 	 */
 	c->sector_size = c->mtd->erasesize; 
 	blocks = c->flash_size / c->sector_size;
-	while ((blocks * sizeof (struct jffs2_eraseblock)) > (128 * 1024)) {
-		blocks >>= 1;
-		c->sector_size <<= 1;
-	}	
-	
+	if (!(c->mtd->flags & MTD_NO_VIRTBLOCKS)) {
+		while ((blocks * sizeof (struct jffs2_eraseblock)) > (128 * 1024)) {
+			blocks >>= 1;
+			c->sector_size <<= 1;
+		}	
+	}
+
 	/*
 	 * Size alignment check
 	 */
@@ -533,7 +536,10 @@
  out_nodes:
 	jffs2_free_ino_caches(c);
 	jffs2_free_raw_node_refs(c);
-	kfree(c->blocks);
+	if (c->mtd->flags & MTD_NO_VIRTBLOCKS)
+		vfree(c->blocks);
+	else
+		kfree(c->blocks);
  out_inohash:
 	kfree(c->inocache_list);
  out_wbuf:
@@ -649,6 +655,11 @@
 	}
 
 	/* add setups for other bizarre flashes here... */
+	if (jffs2_nor_ecc(c)) {
+		ret = jffs2_nor_ecc_flash_setup(c);
+		if (ret)
+			return ret;
+	}
 	return ret;
 }
 
@@ -659,4 +670,7 @@
 	}
 
 	/* add cleanups for other bizarre flashes here... */
+	if (jffs2_nor_ecc(c)) {
+		jffs2_nor_ecc_flash_cleanup(c);
+	}
 }
diff -Nru a/fs/jffs2/gc.c b/fs/jffs2/gc.c
--- a/fs/jffs2/gc.c	2005-01-10 20:11:17 -08:00
+++ b/fs/jffs2/gc.c	2005-01-10 20:11:17 -08:00
@@ -3,11 +3,11 @@
  *
  * Copyright (C) 2001-2003 Red Hat, Inc.
  *
- * Created by David Woodhouse <dwmw2@redhat.com>
+ * Created by David Woodhouse <dwmw2@infradead.org>
  *
  * For licensing information, see the file 'LICENCE' in this directory.
  *
- * $Id: gc.c,v 1.140 2004/11/13 10:59:22 dedekind Exp $
+ * $Id: gc.c,v 1.144 2004/12/21 11:18:50 dwmw2 Exp $
  *
  */
 
@@ -103,7 +103,7 @@
 		ret->wasted_size = 0;
 	}
 
-	D1(jffs2_dump_block_lists(c));
+	D2(jffs2_dump_block_lists(c));
 	return ret;
 }
 
@@ -134,7 +134,7 @@
 		if (c->checked_ino > c->highest_ino) {
 			printk(KERN_CRIT "Checked all inodes but still 0x%x bytes of unchecked space?\n",
 			       c->unchecked_size);
-			D1(jffs2_dump_block_lists(c));
+			D2(jffs2_dump_block_lists(c));
 			spin_unlock(&c->erase_completion_lock);
 			BUG();
 		}
@@ -602,7 +602,7 @@
 			printk(KERN_NOTICE "Not marking the space at 0x%08x as dirty because the flash driver returned retlen zero\n", nraw->flash_offset);
                         jffs2_free_raw_node_ref(nraw);
 		}
-		if (!retried && (nraw == jffs2_alloc_raw_node_ref())) {
+		if (!retried && (nraw = jffs2_alloc_raw_node_ref())) {
 			/* Try to reallocate space and retry */
 			uint32_t dummy;
 			struct jffs2_eraseblock *jeb = &c->blocks[phys_ofs / c->sector_size];
diff -Nru a/fs/jffs2/ioctl.c b/fs/jffs2/ioctl.c
--- a/fs/jffs2/ioctl.c	2005-01-10 20:11:21 -08:00
+++ b/fs/jffs2/ioctl.c	2005-01-10 20:11:21 -08:00
@@ -3,11 +3,11 @@
  *
  * Copyright (C) 2001-2003 Red Hat, Inc.
  *
- * Created by David Woodhouse <dwmw2@redhat.com>
+ * Created by David Woodhouse <dwmw2@infradead.org>
  *
  * For licensing information, see the file 'LICENCE' in this directory.
  *
- * $Id: ioctl.c,v 1.8 2003/10/28 16:16:28 dwmw2 Exp $
+ * $Id: ioctl.c,v 1.9 2004/11/16 20:36:11 dwmw2 Exp $
  *
  */
 
diff -Nru a/fs/jffs2/malloc.c b/fs/jffs2/malloc.c
--- a/fs/jffs2/malloc.c	2005-01-10 20:11:24 -08:00
+++ b/fs/jffs2/malloc.c	2005-01-10 20:11:24 -08:00
@@ -3,11 +3,11 @@
  *
  * Copyright (C) 2001-2003 Red Hat, Inc.
  *
- * Created by David Woodhouse <dwmw2@redhat.com>
+ * Created by David Woodhouse <dwmw2@infradead.org>
  *
  * For licensing information, see the file 'LICENCE' in this directory.
  *
- * $Id: malloc.c,v 1.27 2003/10/28 17:14:58 dwmw2 Exp $
+ * $Id: malloc.c,v 1.28 2004/11/16 20:36:11 dwmw2 Exp $
  *
  */
 
diff -Nru a/fs/jffs2/nodelist.c b/fs/jffs2/nodelist.c
--- a/fs/jffs2/nodelist.c	2005-01-10 20:11:19 -08:00
+++ b/fs/jffs2/nodelist.c	2005-01-10 20:11:19 -08:00
@@ -3,11 +3,11 @@
  *
  * Copyright (C) 2001-2003 Red Hat, Inc.
  *
- * Created by David Woodhouse <dwmw2@redhat.com>
+ * Created by David Woodhouse <dwmw2@infradead.org>
  *
  * For licensing information, see the file 'LICENCE' in this directory.
  *
- * $Id: nodelist.c,v 1.87 2004/11/14 17:07:07 dedekind Exp $
+ * $Id: nodelist.c,v 1.90 2004/12/08 17:59:20 dwmw2 Exp $
  *
  */
 
@@ -92,6 +92,17 @@
 	}
 }
 
+/* Returns first valid node after 'ref'. May return 'ref' */
+static struct jffs2_raw_node_ref *jffs2_first_valid_node(struct jffs2_raw_node_ref *ref)
+{
+	while (ref && ref->next_in_ino) {
+		if (!ref_obsolete(ref))
+			return ref;
+		D1(printk(KERN_DEBUG "node at 0x%08x is obsoleted. Ignoring.\n", ref_offset(ref)));
+		ref = ref->next_in_ino;
+	}
+	return NULL;
+}
 
 /* Get tmp_dnode_info and full_dirent for all non-obsolete nodes associated
    with this ino, returning the former in order of version */
@@ -101,7 +112,7 @@
 			  uint32_t *highest_version, uint32_t *latest_mctime,
 			  uint32_t *mctime_ver)
 {
-	struct jffs2_raw_node_ref *ref = f->inocache->nodes;
+	struct jffs2_raw_node_ref *ref, *valid_ref;
 	struct jffs2_tmp_dnode_info *tn, *ret_tn = NULL;
 	struct jffs2_full_dirent *fd, *ret_fd = NULL;
 	union jffs2_node_union node;
@@ -111,22 +122,23 @@
 	*mctime_ver = 0;
 	
 	D1(printk(KERN_DEBUG "jffs2_get_inode_nodes(): ino #%u\n", f->inocache->ino));
-	if (!f->inocache->nodes) {
-		printk(KERN_WARNING "Eep. no nodes for ino #%u\n", f->inocache->ino);
-	}
 
 	spin_lock(&c->erase_completion_lock);
 
-	for (ref = f->inocache->nodes; ref && ref->next_in_ino; ref = ref->next_in_ino) {
-		/* Work out whether it's a data node or a dirent node */
-		if (ref_obsolete(ref)) {
-			/* FIXME: On NAND flash we may need to read these */
-			D1(printk(KERN_DEBUG "node at 0x%08x is obsoleted. Ignoring.\n", ref_offset(ref)));
-			continue;
-		}
+	valid_ref = jffs2_first_valid_node(f->inocache->nodes);
+
+	if (!valid_ref)
+		printk(KERN_WARNING "Eep. No valid nodes for ino #%u\n", f->inocache->ino);
+
+	while (valid_ref) {
 		/* We can hold a pointer to a non-obsolete node without the spinlock,
 		   but _obsolete_ nodes may disappear at any time, if the block
-		   they're in gets erased */
+		   they're in gets erased. So if we mark 'ref' obsolete while we're
+		   not holding the lock, it can go away immediately. For that reason,
+		   we find the next valid node first, before processing 'ref'.
+		*/
+		ref = valid_ref;
+		valid_ref = jffs2_first_valid_node(ref->next_in_ino);
 		spin_unlock(&c->erase_completion_lock);
 
 		cond_resched();
@@ -182,7 +194,6 @@
 				err = -ENOMEM;
 				goto free_out;
 			}
-			memset(fd,0,sizeof(struct jffs2_full_dirent) + node.d.nsize+1);
 			fd->raw = ref;
 			fd->version = je32_to_cpu(node.d.version);
 			fd->ino = je32_to_cpu(node.d.ino);
@@ -220,6 +231,7 @@
 			}
 			fd->nhash = full_name_hash(fd->name, node.d.nsize);
 			fd->next = NULL;
+			fd->name[node.d.nsize] = '\0';
 				/* Wheee. We now have a complete jffs2_full_dirent structure, with
 				   the name in it and everything. Link it into the list 
 				*/
diff -Nru a/fs/jffs2/nodelist.h b/fs/jffs2/nodelist.h
--- a/fs/jffs2/nodelist.h	2005-01-10 20:11:23 -08:00
+++ b/fs/jffs2/nodelist.h	2005-01-10 20:11:23 -08:00
@@ -3,11 +3,11 @@
  *
  * Copyright (C) 2001-2003 Red Hat, Inc.
  *
- * Created by David Woodhouse <dwmw2@redhat.com>
+ * Created by David Woodhouse <dwmw2@infradead.org>
  *
  * For licensing information, see the file 'LICENCE' in this directory.
  *
- * $Id: nodelist.h,v 1.121 2004/11/14 17:07:07 dedekind Exp $
+ * $Id: nodelist.h,v 1.126 2004/11/19 15:06:29 dedekind Exp $
  *
  */
 
@@ -107,16 +107,6 @@
 #define ref_obsolete(ref)	(((ref)->flash_offset & 3) == REF_OBSOLETE)
 #define mark_ref_normal(ref)    do { (ref)->flash_offset = ref_offset(ref) | REF_NORMAL; } while(0)
 
-/* 
-   Used for keeping track of deletion nodes &c, which can only be marked
-   as obsolete when the node which they mark as deleted has actually been 
-   removed from the flash.
-*/
-struct jffs2_raw_node_ref_list {
-	struct jffs2_raw_node_ref *rew;
-	struct jffs2_raw_node_ref_list *next;
-};
-
 /* For each inode in the filesystem, we need to keep a record of
    nlink, because it would be a PITA to scan the whole directory tree
    at read_inode() time to calculate it, and to keep sufficient information
@@ -148,13 +138,6 @@
 
 #define INOCACHE_HASHSIZE 128
 
-struct jffs2_scan_info {
-	struct jffs2_full_dirent *dents;
-	struct jffs2_tmp_dnode_info *tmpnodes;
-	/* Latest i_size info */
-	uint32_t version;
-	uint32_t isize;
-};
 /*
   Larger representation of a raw node, kept in-core only when the 
   struct inode for this particular ino is instantiated.
@@ -163,12 +146,11 @@
 struct jffs2_full_dnode
 {
 	struct jffs2_raw_node_ref *raw;
-	uint32_t ofs; /* Don't really need this, but optimisation */
+	uint32_t ofs; /* The offset to which the data of this node belongs */
 	uint32_t size;
 	uint32_t frags; /* Number of fragments which currently refer
 			to this node. When this reaches zero, 
-			the node is obsolete.
-		     */
+			the node is obsolete.  */
 };
 
 /* 
@@ -193,6 +175,7 @@
 	unsigned char type;
 	unsigned char name[0];
 };
+
 /*
   Fragments - used to build a map of which raw node to obtain 
   data from for each part of the ino
@@ -202,7 +185,7 @@
 	struct rb_node rb;
 	struct jffs2_full_dnode *node; /* NULL for holes */
 	uint32_t size;
-	uint32_t ofs; /* Don't really need this, but optimisation */
+	uint32_t ofs; /* The offset to which this fragment belongs */
 };
 
 struct jffs2_eraseblock
@@ -221,14 +204,6 @@
 	struct jffs2_raw_node_ref *last_node;
 
 	struct jffs2_raw_node_ref *gc_node;	/* Next node to be garbage collected */
-
-	/* For deletia. When a dirent node in this eraseblock is
-	   deleted by a node elsewhere, that other node can only 
-	   be marked as obsolete when this block is actually erased.
-	   So we keep a list of the nodes to mark as obsolete when
-	   the erase is completed.
-	*/
-	// MAYBE	struct jffs2_raw_node_ref_list *deletia;
 };
 
 #define ACCT_SANITY_CHECK(c, jeb) do { \
@@ -396,7 +371,7 @@
 #define frag_erase(frag, list) rb_erase(&frag->rb, list);
 
 /* nodelist.c */
-D1(void jffs2_print_frag_list(struct jffs2_inode_info *f));
+D2(void jffs2_print_frag_list(struct jffs2_inode_info *f));
 void jffs2_add_fd_to_list(struct jffs2_sb_info *c, struct jffs2_full_dirent *new, struct jffs2_full_dirent **list);
 int jffs2_get_inode_nodes(struct jffs2_sb_info *c, struct jffs2_inode_info *f,
 			  struct jffs2_tmp_dnode_info **tnp, struct jffs2_full_dirent **fdp,
diff -Nru a/fs/jffs2/nodemgmt.c b/fs/jffs2/nodemgmt.c
--- a/fs/jffs2/nodemgmt.c	2005-01-10 20:11:17 -08:00
+++ b/fs/jffs2/nodemgmt.c	2005-01-10 20:11:17 -08:00
@@ -3,11 +3,11 @@
  *
  * Copyright (C) 2001-2003 Red Hat, Inc.
  *
- * Created by David Woodhouse <dwmw2@redhat.com>
+ * Created by David Woodhouse <dwmw2@infradead.org>
  *
  * For licensing information, see the file 'LICENCE' in this directory.
  *
- * $Id: nodemgmt.c,v 1.109 2004/10/07 15:08:47 havasi Exp $
+ * $Id: nodemgmt.c,v 1.115 2004/11/22 11:07:21 dwmw2 Exp $
  *
  */
 
@@ -399,6 +399,17 @@
 	}
 	jeb = &c->blocks[blocknr];
 
+	if (jffs2_can_mark_obsolete(c) && !jffs2_is_readonly(c) &&
+	    !(c->flags & JFFS2_SB_FLAG_MOUNTING)) {
+		/* Hm. This may confuse static lock analysis. If any of the above 
+		   three conditions is false, we're going to return from this 
+		   function without actually obliterating any nodes or freeing
+		   any jffs2_raw_node_refs. So we don't need to stop erases from
+		   happening, or protect against people holding an obsolete
+		   jffs2_raw_node_ref without the erase_completion_lock. */
+		down(&c->erase_free_sem);
+	}
+
 	spin_lock(&c->erase_completion_lock);
 
 	if (ref_flags(ref) == REF_UNCHECKED) {
@@ -463,6 +474,7 @@
 		   marked obsolete on the flash at the time they _became_
 		   obsolete, there was probably a reason for that. */
 		spin_unlock(&c->erase_completion_lock);
+		/* We didn't lock the erase_free_sem */
 		return;
 	}
 
@@ -515,61 +527,87 @@
 
 	spin_unlock(&c->erase_completion_lock);
 
-	if (!jffs2_can_mark_obsolete(c))
-		return;
-	if (jffs2_is_readonly(c))
+	if (!jffs2_can_mark_obsolete(c) || jffs2_is_readonly(c)) {
+		/* We didn't lock the erase_free_sem */
 		return;
+	}
+
+	/* The erase_free_sem is locked, and has been since before we marked the node obsolete
+	   and potentially put its eraseblock onto the erase_pending_list. Thus, we know that
+	   the block hasn't _already_ been erased, and that 'ref' itself hasn't been freed yet
+	   by jffs2_free_all_node_refs() in erase.c. Which is nice. */
 
 	D1(printk(KERN_DEBUG "obliterating obsoleted node at 0x%08x\n", ref_offset(ref)));
 	ret = jffs2_flash_read(c, ref_offset(ref), sizeof(n), &retlen, (char *)&n);
 	if (ret) {
 		printk(KERN_WARNING "Read error reading from obsoleted node at 0x%08x: %d\n", ref_offset(ref), ret);
-		return;
+		goto out_erase_sem;
 	}
 	if (retlen != sizeof(n)) {
 		printk(KERN_WARNING "Short read from obsoleted node at 0x%08x: %zd\n", ref_offset(ref), retlen);
-		return;
+		goto out_erase_sem;
 	}
 	if (PAD(je32_to_cpu(n.totlen)) != PAD(ref_totlen(c, jeb, ref))) {
 		printk(KERN_WARNING "Node totlen on flash (0x%08x) != totlen from node ref (0x%08x)\n", je32_to_cpu(n.totlen), ref_totlen(c, jeb, ref));
-		return;
+		goto out_erase_sem;
 	}
 	if (!(je16_to_cpu(n.nodetype) & JFFS2_NODE_ACCURATE)) {
 		D1(printk(KERN_DEBUG "Node at 0x%08x was already marked obsolete (nodetype 0x%04x)\n", ref_offset(ref), je16_to_cpu(n.nodetype)));
-		return;
+		goto out_erase_sem;
 	}
 	/* XXX FIXME: This is ugly now */
 	n.nodetype = cpu_to_je16(je16_to_cpu(n.nodetype) & ~JFFS2_NODE_ACCURATE);
 	ret = jffs2_flash_write(c, ref_offset(ref), sizeof(n), &retlen, (char *)&n);
 	if (ret) {
 		printk(KERN_WARNING "Write error in obliterating obsoleted node at 0x%08x: %d\n", ref_offset(ref), ret);
-		return;
+		goto out_erase_sem;
 	}
 	if (retlen != sizeof(n)) {
 		printk(KERN_WARNING "Short write in obliterating obsoleted node at 0x%08x: %zd\n", ref_offset(ref), retlen);
-		return;
+		goto out_erase_sem;
 	}
 
 	/* Nodes which have been marked obsolete no longer need to be
-	   associated with any inode. Remove them from the per-inode list */
+	   associated with any inode. Remove them from the per-inode list.
+	   
+	   Note we can't do this for NAND at the moment because we need 
+	   obsolete dirent nodes to stay on the lists, because of the
+	   horridness in jffs2_garbage_collect_deletion_dirent(). Also
+	   because we delete the inocache, and on NAND we need that to 
+	   stay around until all the nodes are actually erased, in order
+	   to stop us from giving the same inode number to another newly
+	   created inode. */
 	if (ref->next_in_ino) {
 		struct jffs2_inode_cache *ic;
 		struct jffs2_raw_node_ref **p;
 
+		spin_lock(&c->erase_completion_lock);
+
 		ic = jffs2_raw_ref_to_ic(ref);
 		for (p = &ic->nodes; (*p) != ref; p = &((*p)->next_in_ino))
 			;
 
 		*p = ref->next_in_ino;
 		ref->next_in_ino = NULL;
+
+		if (ic->nodes == (void *)ic) {
+			D1(printk(KERN_DEBUG "inocache for ino #%u is all gone now. Freeing\n", ic->ino));
+			jffs2_del_ino_cache(c, ic);
+			jffs2_free_inode_cache(ic);
+		}
+
+		spin_unlock(&c->erase_completion_lock);
 	}
 
 
 	/* Merge with the next node in the physical list, if there is one
-	   and if it's also obsolete. */
-	if (ref->next_phys && ref_obsolete(ref->next_phys) ) {
+	   and if it's also obsolete and if it doesn't belong to any inode */
+	if (ref->next_phys && ref_obsolete(ref->next_phys) &&
+	    !ref->next_phys->next_in_ino) {
 		struct jffs2_raw_node_ref *n = ref->next_phys;
 		
+		spin_lock(&c->erase_completion_lock);
+
 		ref->__totlen += n->__totlen;
 		ref->next_phys = n->next_phys;
                 if (jeb->last_node == n) jeb->last_node = ref;
@@ -577,7 +615,8 @@
 			/* gc will be happy continuing gc on this node */
 			jeb->gc_node=ref;
 		}
-		BUG_ON(n->next_in_ino);
+		spin_unlock(&c->erase_completion_lock);
+
 		jffs2_free_raw_node_ref(n);
 	}
 	
@@ -585,11 +624,13 @@
 	   and that one is obsolete */
 	if (ref != jeb->first_node ) {
 		struct jffs2_raw_node_ref *p = jeb->first_node;
-		
+
+		spin_lock(&c->erase_completion_lock);
+
 		while (p->next_phys != ref)
 			p = p->next_phys;
 		
-		if (ref_obsolete(p) ) {
+		if (ref_obsolete(p) && !ref->next_in_ino) {
 			p->__totlen += ref->__totlen;
 			if (jeb->last_node == ref) {
 				jeb->last_node = p;
@@ -601,10 +642,13 @@
 			p->next_phys = ref->next_phys;
 			jffs2_free_raw_node_ref(ref);
 		}
+		spin_unlock(&c->erase_completion_lock);
 	}
+ out_erase_sem:
+	up(&c->erase_free_sem);
 }
 
-#if CONFIG_JFFS2_FS_DEBUG > 0
+#if CONFIG_JFFS2_FS_DEBUG >= 2
 void jffs2_dump_block_lists(struct jffs2_sb_info *c)
 {
 
diff -Nru a/fs/jffs2/os-linux.h b/fs/jffs2/os-linux.h
--- a/fs/jffs2/os-linux.h	2005-01-10 20:11:16 -08:00
+++ b/fs/jffs2/os-linux.h	2005-01-10 20:11:16 -08:00
@@ -3,11 +3,11 @@
  *
  * Copyright (C) 2002-2003 Red Hat, Inc.
  *
- * Created by David Woodhouse <dwmw2@redhat.com>
+ * Created by David Woodhouse <dwmw2@infradead.org>
  *
  * For licensing information, see the file 'LICENCE' in this directory.
  *
- * $Id: os-linux.h,v 1.47 2004/07/14 13:20:23 dwmw2 Exp $
+ * $Id: os-linux.h,v 1.51 2004/11/16 20:36:11 dwmw2 Exp $
  *
  */
 
@@ -99,7 +99,7 @@
 
 #define jffs2_is_readonly(c) (OFNI_BS_2SFFJ(c)->s_flags & MS_RDONLY)
 
-#ifndef CONFIG_JFFS2_FS_NAND
+#if (!defined CONFIG_JFFS2_FS_NAND && !defined CONFIG_JFFS2_FS_NOR_ECC)
 #define jffs2_can_mark_obsolete(c) (1)
 #define jffs2_cleanmarker_oob(c) (0)
 #define jffs2_write_nand_cleanmarker(c,jeb) (-EIO)
@@ -115,10 +115,13 @@
 #define jffs2_flash_writev(a,b,c,d,e,f) jffs2_flash_direct_writev(a,b,c,d,e)
 #define jffs2_wbuf_timeout NULL
 #define jffs2_wbuf_process NULL
+#define jffs2_nor_ecc(c) (0)
+#define jffs2_nor_ecc_flash_setup(c) (0)
+#define jffs2_nor_ecc_flash_cleanup(c) do {} while (0)
 
-#else /* NAND support present */
+#else /* NAND and/or ECC'd NOR support present */
 
-#define jffs2_can_mark_obsolete(c) (c->mtd->type == MTD_NORFLASH || c->mtd->type == MTD_RAM)
+#define jffs2_can_mark_obsolete(c) ((c->mtd->type == MTD_NORFLASH && !(c->mtd->flags & MTD_ECC)) || c->mtd->type == MTD_RAM)
 #define jffs2_cleanmarker_oob(c) (c->mtd->type == MTD_NANDFLASH)
 
 #define jffs2_flash_write_oob(c, ofs, len, retlen, buf) ((c)->mtd->write_oob((c)->mtd, ofs, len, retlen, buf))
@@ -135,8 +138,19 @@
 int jffs2_write_nand_badblock(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb, uint32_t bad_offset);
 void jffs2_wbuf_timeout(unsigned long data);
 void jffs2_wbuf_process(void *data);
+int jffs2_flush_wbuf_gc(struct jffs2_sb_info *c, uint32_t ino);
+int jffs2_flush_wbuf_pad(struct jffs2_sb_info *c);
 int jffs2_nand_flash_setup(struct jffs2_sb_info *c);
 void jffs2_nand_flash_cleanup(struct jffs2_sb_info *c);
+#ifdef CONFIG_JFFS2_FS_NOR_ECC
+#define jffs2_nor_ecc(c) (c->mtd->type == MTD_NORFLASH && (c->mtd->flags & MTD_ECC))
+int jffs2_nor_ecc_flash_setup(struct jffs2_sb_info *c);
+void jffs2_nor_ecc_flash_cleanup(struct jffs2_sb_info *c);
+#else
+#define jffs2_nor_ecc(c) (0)
+#define jffs2_nor_ecc_flash_setup(c) (0)
+#define jffs2_nor_ecc_flash_cleanup(c) do {} while (0)
+#endif /* NOR ECC */
 #endif /* NAND */
 
 /* erase.c */
diff -Nru a/fs/jffs2/pushpull.h b/fs/jffs2/pushpull.h
--- a/fs/jffs2/pushpull.h	2005-01-10 20:11:15 -08:00
+++ b/fs/jffs2/pushpull.h	2005-01-10 20:11:15 -08:00
@@ -3,11 +3,11 @@
  *
  * Copyright (C) 2001, 2002 Red Hat, Inc.
  *
- * Created by David Woodhouse <dwmw2@redhat.com>
+ * Created by David Woodhouse <dwmw2@infradead.org>
  *
  * For licensing information, see the file 'LICENCE' in this directory.
  *
- * $Id: pushpull.h,v 1.9 2003/10/04 08:33:06 dwmw2 Exp $
+ * $Id: pushpull.h,v 1.10 2004/11/16 20:36:11 dwmw2 Exp $
  *
  */
 
diff -Nru a/fs/jffs2/read.c b/fs/jffs2/read.c
--- a/fs/jffs2/read.c	2005-01-10 20:11:17 -08:00
+++ b/fs/jffs2/read.c	2005-01-10 20:11:17 -08:00
@@ -3,11 +3,11 @@
  *
  * Copyright (C) 2001-2003 Red Hat, Inc.
  *
- * Created by David Woodhouse <dwmw2@redhat.com>
+ * Created by David Woodhouse <dwmw2@infradead.org>
  *
  * For licensing information, see the file 'LICENCE' in this directory.
  *
- * $Id: read.c,v 1.36 2004/05/25 11:12:32 havasi Exp $
+ * $Id: read.c,v 1.38 2004/11/16 20:36:12 dwmw2 Exp $
  *
  */
 
@@ -174,7 +174,7 @@
 			if (frag) {
 				D1(printk(KERN_NOTICE "Eep. Hole in ino #%u fraglist. frag->ofs = 0x%08x, offset = 0x%08x\n", f->inocache->ino, frag->ofs, offset));
 				holesize = min(holesize, frag->ofs - offset);
-				D1(jffs2_print_frag_list(f));
+				D2(jffs2_print_frag_list(f));
 			}
 			D1(printk(KERN_DEBUG "Filling non-frag hole from %d-%d\n", offset, offset+holesize));
 			memset(buf, 0, holesize);
diff -Nru a/fs/jffs2/readinode.c b/fs/jffs2/readinode.c
--- a/fs/jffs2/readinode.c	2005-01-10 20:11:15 -08:00
+++ b/fs/jffs2/readinode.c	2005-01-10 20:11:15 -08:00
@@ -3,11 +3,11 @@
  *
  * Copyright (C) 2001-2003 Red Hat, Inc.
  *
- * Created by David Woodhouse <dwmw2@redhat.com>
+ * Created by David Woodhouse <dwmw2@infradead.org>
  *
  * For licensing information, see the file 'LICENCE' in this directory.
  *
- * $Id: readinode.c,v 1.114 2004/11/14 17:07:07 dedekind Exp $
+ * $Id: readinode.c,v 1.117 2004/11/20 18:06:54 dwmw2 Exp $
  *
  */
 
@@ -22,7 +22,7 @@
 
 static int jffs2_add_frag_to_fragtree(struct jffs2_sb_info *c, struct rb_root *list, struct jffs2_node_frag *newfrag);
 
-#if CONFIG_JFFS2_FS_DEBUG >= 1
+#if CONFIG_JFFS2_FS_DEBUG >= 2
 static void jffs2_print_fragtree(struct rb_root *list, int permitbug)
 {
 	struct jffs2_node_frag *this = frag_first(list);
@@ -56,7 +56,9 @@
 		printk(KERN_DEBUG "metadata at 0x%08x\n", ref_offset(f->metadata->raw));
 	}
 }
+#endif
 
+#if CONFIG_JFFS2_FS_DEBUG >= 1
 static int jffs2_sanitycheck_fragtree(struct jffs2_inode_info *f)
 {
 	struct jffs2_node_frag *frag;
@@ -225,7 +227,7 @@
 		   If so, both 'this' and the new node get marked REF_NORMAL so
 		   the GC can take a look.
 		*/
-		if ((lastend-1) >> PAGE_CACHE_SHIFT == newfrag->ofs >> PAGE_CACHE_SHIFT) {
+		if (lastend && (lastend-1) >> PAGE_CACHE_SHIFT == newfrag->ofs >> PAGE_CACHE_SHIFT) {
 			if (this->node)
 				mark_ref_normal(this->node->raw);
 			mark_ref_normal(newfrag->node->raw);
diff -Nru a/fs/jffs2/scan.c b/fs/jffs2/scan.c
--- a/fs/jffs2/scan.c	2005-01-10 20:11:22 -08:00
+++ b/fs/jffs2/scan.c	2005-01-10 20:11:22 -08:00
@@ -3,11 +3,11 @@
  *
  * Copyright (C) 2001-2003 Red Hat, Inc.
  *
- * Created by David Woodhouse <dwmw2@redhat.com>
+ * Created by David Woodhouse <dwmw2@infradead.org>
  *
  * For licensing information, see the file 'LICENCE' in this directory.
  *
- * $Id: scan.c,v 1.112 2004/09/12 09:56:13 gleixner Exp $
+ * $Id: scan.c,v 1.115 2004/11/17 12:59:08 dedekind Exp $
  *
  */
 #include <linux/kernel.h>
@@ -68,7 +68,7 @@
 static inline int min_free(struct jffs2_sb_info *c)
 {
 	uint32_t min = 2 * sizeof(struct jffs2_raw_inode);
-#ifdef CONFIG_JFFS2_FS_NAND
+#if defined CONFIG_JFFS2_FS_NAND || defined CONFIG_JFFS2_FS_NOR_ECC
 	if (!jffs2_can_mark_obsolete(c) && min < c->wbuf_pagesize)
 		return c->wbuf_pagesize;
 #endif
@@ -160,11 +160,8 @@
 
 		case BLK_STATE_PARTDIRTY:
                         /* Some data, but not full. Dirty list. */
-                        /* Except that we want to remember the block with most free space,
-                           and stick it in the 'nextblock' position to start writing to it.
-                           Later when we do snapshots, this must be the most recent block,
-                           not the one with most free space.
-                        */
+                        /* We want to remember the block with most free space
+                           and stick it in the 'nextblock' position to start writing to it. */
                         if (jeb->free_size > min_free(c) && 
 			    (!c->nextblock || c->nextblock->free_size < jeb->free_size)) {
                                 /* Better candidate for the next writes to go to */
@@ -223,7 +220,7 @@
 		c->dirty_size -= c->nextblock->dirty_size;
 		c->nextblock->dirty_size = 0;
 	}
-#ifdef CONFIG_JFFS2_FS_NAND
+#if defined CONFIG_JFFS2_FS_NAND || defined CONFIG_JFFS2_FS_NOR_ECC
 	if (!jffs2_can_mark_obsolete(c) && c->nextblock && (c->nextblock->free_size & (c->wbuf_pagesize-1))) {
 		/* If we're going to start writing into a block which already 
 		   contains data, and the end of the data isn't page-aligned,
diff -Nru a/fs/jffs2/super.c b/fs/jffs2/super.c
--- a/fs/jffs2/super.c	2005-01-10 20:11:18 -08:00
+++ b/fs/jffs2/super.c	2005-01-10 20:11:18 -08:00
@@ -3,11 +3,11 @@
  *
  * Copyright (C) 2001-2003 Red Hat, Inc.
  *
- * Created by David Woodhouse <dwmw2@redhat.com>
+ * Created by David Woodhouse <dwmw2@infradead.org>
  *
  * For licensing information, see the file 'LICENCE' in this directory.
  *
- * $Id: super.c,v 1.102 2004/11/12 02:42:17 tpoynor Exp $
+ * $Id: super.c,v 1.104 2004/11/23 15:37:31 gleixner Exp $
  *
  */
 
@@ -277,7 +277,10 @@
 	up(&c->alloc_sem);
 	jffs2_free_ino_caches(c);
 	jffs2_free_raw_node_refs(c);
-	kfree(c->blocks);
+	if (c->mtd->flags & MTD_NO_VIRTBLOCKS)
+		vfree(c->blocks);
+	else
+		kfree(c->blocks);
 	jffs2_flash_cleanup(c);
 	kfree(c->inocache_list);
 	if (c->mtd->sync)
diff -Nru a/fs/jffs2/symlink.c b/fs/jffs2/symlink.c
--- a/fs/jffs2/symlink.c	2005-01-10 20:11:15 -08:00
+++ b/fs/jffs2/symlink.c	2005-01-10 20:11:15 -08:00
@@ -3,11 +3,11 @@
  *
  * Copyright (C) 2001, 2002 Red Hat, Inc.
  *
- * Created by David Woodhouse <dwmw2@redhat.com>
+ * Created by David Woodhouse <dwmw2@infradead.org>
  *
  * For licensing information, see the file 'LICENCE' in this directory.
  *
- * $Id: symlink.c,v 1.13 2004/07/13 08:59:04 dwmw2 Exp $
+ * $Id: symlink.c,v 1.14 2004/11/16 20:36:12 dwmw2 Exp $
  *
  */
 
diff -Nru a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c
--- a/fs/jffs2/wbuf.c	2005-01-10 20:11:17 -08:00
+++ b/fs/jffs2/wbuf.c	2005-01-10 20:11:17 -08:00
@@ -4,12 +4,12 @@
  * Copyright (C) 2001-2003 Red Hat, Inc.
  * Copyright (C) 2004 Thomas Gleixner <tglx@linutronix.de>
  *
- * Created by David Woodhouse <dwmw2@redhat.com>
+ * Created by David Woodhouse <dwmw2@infradead.org>
  * Modified debugged and enhanced by Thomas Gleixner <tglx@linutronix.de>
  *
  * For licensing information, see the file 'LICENCE' in this directory.
  *
- * $Id: wbuf.c,v 1.72 2004/09/11 19:22:43 gleixner Exp $
+ * $Id: wbuf.c,v 1.82 2004/11/20 22:08:31 dwmw2 Exp $
  *
  */
 
@@ -130,22 +130,8 @@
 	}
 }
 
-/* Recover from failure to write wbuf. Recover the nodes up to the
- * wbuf, not the one which we were starting to try to write. */
-
-static void jffs2_wbuf_recover(struct jffs2_sb_info *c)
+static void jffs2_block_refile(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb)
 {
-	struct jffs2_eraseblock *jeb, *new_jeb;
-	struct jffs2_raw_node_ref **first_raw, **raw;
-	size_t retlen;
-	int ret;
-	unsigned char *buf;
-	uint32_t start, end, ofs, len;
-
-	spin_lock(&c->erase_completion_lock);
-
-	jeb = &c->blocks[c->wbuf_ofs / c->sector_size];
-
 	D1(printk("About to refile bad block at %08x\n", jeb->offset));
 
 	D2(jffs2_dump_block_lists(c));
@@ -175,6 +161,25 @@
 
 	ACCT_SANITY_CHECK(c,jeb);
 	D1(ACCT_PARANOIA_CHECK(jeb));
+}
+
+/* Recover from failure to write wbuf. Recover the nodes up to the
+ * wbuf, not the one which we were starting to try to write. */
+
+static void jffs2_wbuf_recover(struct jffs2_sb_info *c)
+{
+	struct jffs2_eraseblock *jeb, *new_jeb;
+	struct jffs2_raw_node_ref **first_raw, **raw;
+	size_t retlen;
+	int ret;
+	unsigned char *buf;
+	uint32_t start, end, ofs, len;
+
+	spin_lock(&c->erase_completion_lock);
+
+	jeb = &c->blocks[c->wbuf_ofs / c->sector_size];
+
+	jffs2_block_refile(c, jeb);
 
 	/* Find the first node to be recovered, by skipping over every
 	   node which ends before the wbuf starts, or which is obsolete. */
@@ -224,7 +229,11 @@
 		}
 
 		/* Do the read... */
-		ret = c->mtd->read_ecc(c->mtd, start, c->wbuf_ofs - start, &retlen, buf, NULL, c->oobinfo);
+		if (jffs2_cleanmarker_oob(c))
+			ret = c->mtd->read_ecc(c->mtd, start, c->wbuf_ofs - start, &retlen, buf, NULL, c->oobinfo);
+		else
+			ret = c->mtd->read(c->mtd, start, c->wbuf_ofs - start, &retlen, buf);
+		
 		if (ret == -EBADMSG && retlen == c->wbuf_ofs - start) {
 			/* ECC recovered */
 			ret = 0;
@@ -281,8 +290,11 @@
 			ret = -EIO;
 		} else
 #endif
+		if (jffs2_cleanmarker_oob(c))
 			ret = c->mtd->write_ecc(c->mtd, ofs, towrite, &retlen,
 						buf, NULL, c->oobinfo);
+		else
+			ret = c->mtd->write(c->mtd, ofs, towrite, &retlen, buf);
 
 		if (ret || retlen != towrite) {
 			/* Argh. We tried. Really we did. */
@@ -392,6 +404,10 @@
    1: Pad, do not adjust nextblock free_size
    2: Pad, adjust nextblock free_size
 */
+#define NOPAD		0
+#define PAD_NOACCOUNT	1
+#define PAD_ACCOUNTING	2
+
 static int __jffs2_flush_wbuf(struct jffs2_sb_info *c, int pad)
 {
 	int ret;
@@ -419,6 +435,10 @@
 	*/
 	if (pad) {
 		c->wbuf_len = PAD(c->wbuf_len);
+
+		/* Pad with JFFS2_DIRTY_BITMASK initially.  this helps out ECC'd NOR
+		   with 8 byte page size */
+		memset(c->wbuf + c->wbuf_len, 0, c->wbuf_pagesize - c->wbuf_len);
 		
 		if ( c->wbuf_len + sizeof(struct jffs2_unknown_node) < c->wbuf_pagesize) {
 			struct jffs2_unknown_node *padnode = (void *)(c->wbuf + c->wbuf_len);
@@ -426,9 +446,6 @@
 			padnode->nodetype = cpu_to_je16(JFFS2_NODETYPE_PADDING);
 			padnode->totlen = cpu_to_je32(c->wbuf_pagesize - c->wbuf_len);
 			padnode->hdr_crc = cpu_to_je32(crc32(0, padnode, sizeof(*padnode)-4));
-		} else {
-			/* Pad with JFFS2_DIRTY_BITMASK */
-			memset(c->wbuf + c->wbuf_len, 0, c->wbuf_pagesize - c->wbuf_len);
 		}
 	}
 	/* else jffs2_flash_writev has actually filled in the rest of the
@@ -444,8 +461,11 @@
 		ret = -EIO;
 	} else 
 #endif
-	ret = c->mtd->write_ecc(c->mtd, c->wbuf_ofs, c->wbuf_pagesize, &retlen, c->wbuf, NULL, c->oobinfo);
-
+	
+	if (jffs2_cleanmarker_oob(c))
+		ret = c->mtd->write_ecc(c->mtd, c->wbuf_ofs, c->wbuf_pagesize, &retlen, c->wbuf, NULL, c->oobinfo);
+	else
+		ret = c->mtd->write(c->mtd, c->wbuf_ofs, c->wbuf_pagesize, &retlen, c->wbuf);
 
 	if (ret || retlen != c->wbuf_pagesize) {
 		if (ret)
@@ -458,7 +478,7 @@
 
 		jffs2_wbuf_recover(c);
 
-		return ret; 
+		return ret;
 	}
 
 	spin_lock(&c->erase_completion_lock);
@@ -525,7 +545,9 @@
 	if (c->unchecked_size) {
 		/* GC won't make any progress for a while */
 		D1(printk(KERN_DEBUG "jffs2_flush_wbuf_gc() padding. Not finished checking\n"));
-		ret = __jffs2_flush_wbuf(c, 2);
+		down_write(&c->wbuf_sem);
+		ret = __jffs2_flush_wbuf(c, PAD_ACCOUNTING);
+		up_write(&c->wbuf_sem);
 	} else while (old_wbuf_len &&
 		      old_wbuf_ofs == c->wbuf_ofs) {
 
@@ -537,7 +559,9 @@
 		if (ret) {
 			/* GC failed. Flush it with padding instead */
 			down(&c->alloc_sem);
-			ret = __jffs2_flush_wbuf(c, 2);
+			down_write(&c->wbuf_sem);
+			ret = __jffs2_flush_wbuf(c, PAD_ACCOUNTING);
+			up_write(&c->wbuf_sem);
 			break;
 		}
 		down(&c->alloc_sem);
@@ -552,9 +576,14 @@
 /* Pad write-buffer to end and write it, wasting space. */
 int jffs2_flush_wbuf_pad(struct jffs2_sb_info *c)
 {
-	return __jffs2_flush_wbuf(c, 1);
-}
+	int ret;
 
+	down_write(&c->wbuf_sem);
+	ret = __jffs2_flush_wbuf(c, PAD_NOACCOUNT);
+	up_write(&c->wbuf_sem);
+
+	return ret;
+}
 
 #define PAGE_DIV(x) ( (x) & (~(c->wbuf_pagesize - 1)) )
 #define PAGE_MOD(x) ( (x) & (c->wbuf_pagesize - 1) )
@@ -575,6 +604,8 @@
 	if (!c->wbuf)
 		return jffs2_flash_direct_writev(c, invecs, count, to, retlen);
 	
+	down_write(&c->wbuf_sem);
+
 	/* If wbuf_ofs is not initialized, set it to target address */
 	if (c->wbuf_ofs == 0xFFFFFFFF) {
 		c->wbuf_ofs = PAGE_DIV(to);
@@ -582,6 +613,17 @@
 		memset(c->wbuf,0xff,c->wbuf_pagesize);
 	}
 
+	/* Fixup the wbuf if we are moving to a new eraseblock.  The checks below
+	   fail for ECC'd NOR because cleanmarker == 16, so a block starts at
+	   xxx0010.  */
+	if (jffs2_nor_ecc(c)) {
+		if (((c->wbuf_ofs % c->sector_size) == 0) && !c->wbuf_len) {
+			c->wbuf_ofs = PAGE_DIV(to);
+			c->wbuf_len = PAGE_MOD(to);
+			memset(c->wbuf,0xff,c->wbuf_pagesize);
+		}
+	}
+	
 	/* Sanity checks on target address. 
 	   It's permitted to write at PAD(c->wbuf_len+c->wbuf_ofs), 
 	   and it's permitted to write at the beginning of a new 
@@ -592,12 +634,12 @@
 		/* It's a write to a new block */
 		if (c->wbuf_len) {
 			D1(printk(KERN_DEBUG "jffs2_flash_writev() to 0x%lx causes flush of wbuf at 0x%08x\n", (unsigned long)to, c->wbuf_ofs));
-			ret = jffs2_flush_wbuf_pad(c);
+			ret = __jffs2_flush_wbuf(c, PAD_NOACCOUNT);
 			if (ret) {
 				/* the underlying layer has to check wbuf_len to do the cleanup */
 				D1(printk(KERN_WARNING "jffs2_flush_wbuf() called from jffs2_flash_writev() failed %d\n", ret));
 				*retlen = 0;
-				return ret;
+				goto exit;
 			}
 		}
 		/* set pointer to new block */
@@ -623,7 +665,6 @@
 	invec = 0;
 	outvec = 0;
 
-
 	/* Fill writebuffer first, if already in use */	
 	if (c->wbuf_len) {
 		uint32_t invec_ofs = 0;
@@ -658,14 +699,14 @@
 		}			
 		
 		/* write buffer is full, flush buffer */
-		ret = __jffs2_flush_wbuf(c, 0);
+		ret = __jffs2_flush_wbuf(c, NOPAD);
 		if (ret) {
 			/* the underlying layer has to check wbuf_len to do the cleanup */
 			D1(printk(KERN_WARNING "jffs2_flush_wbuf() called from jffs2_flash_writev() failed %d\n", ret));
 			/* Retlen zero to make sure our caller doesn't mark the space dirty.
 			   We've already done everything that's necessary */
 			*retlen = 0;
-			return ret;
+			goto exit;
 		}
 		outvec_to += donelen;
 		c->wbuf_ofs = outvec_to;
@@ -709,19 +750,22 @@
 
 	if (splitvec != -1) {
 		uint32_t remainder;
-		int ret;
 
 		remainder = outvecs[splitvec].iov_len - split_ofs;
 		outvecs[splitvec].iov_len = split_ofs;
 
 		/* We did cross a page boundary, so we write some now */
-		ret = c->mtd->writev_ecc(c->mtd, outvecs, splitvec+1, outvec_to, &wbuf_retlen, NULL, c->oobinfo); 
+		if (jffs2_cleanmarker_oob(c))
+			ret = c->mtd->writev_ecc(c->mtd, outvecs, splitvec+1, outvec_to, &wbuf_retlen, NULL, c->oobinfo); 
+		else
+			ret = jffs2_flash_direct_writev(c, outvecs, splitvec+1, outvec_to, &wbuf_retlen);
+		
 		if (ret < 0 || wbuf_retlen != PAGE_DIV(totlen)) {
 			/* At this point we have no problem,
 			   c->wbuf is empty. 
 			*/
 			*retlen = donelen;
-			return ret;
+			goto exit;
 		}
 		
 		donelen += wbuf_retlen;
@@ -760,7 +804,11 @@
 	if (c->wbuf_len && ino)
 		jffs2_wbuf_dirties_inode(c, ino);
 
-	return 0;
+	ret = 0;
+	
+exit:
+	up_write(&c->wbuf_sem);
+	return ret;
 }
 
 /*
@@ -789,7 +837,12 @@
 
 	/* Read flash */
 	if (!jffs2_can_mark_obsolete(c)) {
-		ret = c->mtd->read_ecc(c->mtd, ofs, len, retlen, buf, NULL, c->oobinfo);
+		down_read(&c->wbuf_sem);
+
+		if (jffs2_cleanmarker_oob(c))
+			ret = c->mtd->read_ecc(c->mtd, ofs, len, retlen, buf, NULL, c->oobinfo);
+		else
+			ret = c->mtd->read(c->mtd, ofs, len, retlen, buf);
 
 		if ( (ret == -EBADMSG) && (*retlen == len) ) {
 			printk(KERN_WARNING "mtd->read(0x%zx bytes from 0x%llx) returned ECC error\n",
@@ -811,23 +864,23 @@
 
 	/* if no writebuffer available or write buffer empty, return */
 	if (!c->wbuf_pagesize || !c->wbuf_len)
-		return ret;
+		goto exit;
 
 	/* if we read in a different block, return */
 	if ( (ofs & ~(c->sector_size-1)) != (c->wbuf_ofs & ~(c->sector_size-1)) ) 
-		return ret;	
+		goto exit;
 
 	if (ofs >= c->wbuf_ofs) {
 		owbf = (ofs - c->wbuf_ofs);	/* offset in write buffer */
 		if (owbf > c->wbuf_len)		/* is read beyond write buffer ? */
-			return ret;
+			goto exit;
 		lwbf = c->wbuf_len - owbf;	/* number of bytes to copy */
 		if (lwbf > len)	
 			lwbf = len;
 	} else {	
 		orbf = (c->wbuf_ofs - ofs);	/* offset in read buffer */
 		if (orbf > len)			/* is write beyond write buffer ? */
-			return ret;
+			goto exit;
 		lwbf = len - orbf; 		/* number of bytes to copy */
 		if (lwbf > c->wbuf_len)	
 			lwbf = c->wbuf_len;
@@ -835,6 +888,8 @@
 	if (lwbf > 0)
 		memcpy(buf+orbf,c->wbuf+owbf,lwbf);
 
+exit:
+	up_read(&c->wbuf_sem);
 	return ret;
 }
 
@@ -1079,9 +1134,9 @@
 	int res;
 
 	/* Initialise write buffer */
+	init_rwsem(&c->wbuf_sem);
 	c->wbuf_pagesize = c->mtd->oobblock;
 	c->wbuf_ofs = 0xFFFFFFFF;
-
 	
 	c->wbuf = kmalloc(c->wbuf_pagesize, GFP_KERNEL);
 	if (!c->wbuf)
@@ -1105,3 +1160,25 @@
 {
 	kfree(c->wbuf);
 }
+
+#ifdef CONFIG_JFFS2_FS_NOR_ECC
+int jffs2_nor_ecc_flash_setup(struct jffs2_sb_info *c) {
+	/* Cleanmarker is actually larger on the flashes */
+	c->cleanmarker_size = 16;
+
+	/* Initialize write buffer */
+	init_rwsem(&c->wbuf_sem);
+	c->wbuf_pagesize = c->mtd->eccsize;
+	c->wbuf_ofs = 0xFFFFFFFF;
+
+	c->wbuf = kmalloc(c->wbuf_pagesize, GFP_KERNEL);
+	if (!c->wbuf)
+		return -ENOMEM;
+
+	return 0;
+}
+
+void jffs2_nor_ecc_flash_cleanup(struct jffs2_sb_info *c) {
+	kfree(c->wbuf);
+}
+#endif
diff -Nru a/fs/jffs2/write.c b/fs/jffs2/write.c
--- a/fs/jffs2/write.c	2005-01-10 20:11:19 -08:00
+++ b/fs/jffs2/write.c	2005-01-10 20:11:19 -08:00
@@ -3,11 +3,11 @@
  *
  * Copyright (C) 2001-2003 Red Hat, Inc.
  *
- * Created by David Woodhouse <dwmw2@redhat.com>
+ * Created by David Woodhouse <dwmw2@infradead.org>
  *
  * For licensing information, see the file 'LICENCE' in this directory.
  *
- * $Id: write.c,v 1.86 2004/11/13 10:44:26 dedekind Exp $
+ * $Id: write.c,v 1.87 2004/11/16 20:36:12 dwmw2 Exp $
  *
  */
 
diff -Nru a/fs/jffs2/writev.c b/fs/jffs2/writev.c
--- a/fs/jffs2/writev.c	2005-01-10 20:11:19 -08:00
+++ b/fs/jffs2/writev.c	2005-01-10 20:11:19 -08:00
@@ -3,11 +3,11 @@
  *
  * Copyright (C) 2001, 2002 Red Hat, Inc.
  *
- * Created by David Woodhouse <dwmw2@redhat.com>
+ * Created by David Woodhouse <dwmw2@infradead.org>
  *
  * For licensing information, see the file 'LICENCE' in this directory.
  *
- * $Id: writev.c,v 1.5 2004/07/13 08:58:25 dwmw2 Exp $
+ * $Id: writev.c,v 1.6 2004/11/16 20:36:12 dwmw2 Exp $
  *
  */
 
diff -Nru a/fs/jfs/inode.c b/fs/jfs/inode.c
--- a/fs/jfs/inode.c	2005-01-10 20:11:15 -08:00
+++ b/fs/jfs/inode.c	2005-01-10 20:11:15 -08:00
@@ -81,8 +81,7 @@
 	 * Don't commit if inode has been committed since last being
 	 * marked dirty, or if it has been deleted.
 	 */
-	if (test_cflag(COMMIT_Nolink, inode) ||
-	    !test_cflag(COMMIT_Dirty, inode))
+	if (inode->i_nlink == 0 || !test_cflag(COMMIT_Dirty, inode))
 		return 0;
 
 	if (isReadOnly(inode)) {
@@ -100,7 +99,13 @@
 
 	tid = txBegin(inode->i_sb, COMMIT_INODE);
 	down(&JFS_IP(inode)->commit_sem);
-	rc = txCommit(tid, 1, &inode, wait ? COMMIT_SYNC : 0);
+
+	/*
+	 * Retest inode state after taking commit_sem
+	 */
+	if (inode->i_nlink && test_cflag(COMMIT_Dirty, inode))
+		rc = txCommit(tid, 1, &inode, wait ? COMMIT_SYNC : 0);
+
 	txEnd(tid);
 	up(&JFS_IP(inode)->commit_sem);
 	return rc;
diff -Nru a/fs/jfs/jfs_defragfs.h b/fs/jfs/jfs_defragfs.h
--- a/fs/jfs/jfs_defragfs.h	2005-01-10 20:11:20 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,51 +0,0 @@
-/*
- *   Copyright (c) International Business Machines Corp., 2000-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.
- * 
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY;  without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
- *   the GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program;  if not, write to the Free Software 
- *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-#ifndef	_H_JFS_DEFRAGFS
-#define _H_JFS_DEFRAGFS
-
-/*
- *	defragfs parameter list
- */
-struct defragfs {
-	uint flag;		/* 4: */
-	u8 dev;			/* 1: */
-	u8 pad[3];		/* 3: */
-	s32 fileset;		/* 4: */
-	u32 inostamp;		/* 4: */
-	u32 ino;		/* 4: */
-	u32 gen;		/* 4: */
-	s64 xoff;		/* 8: */
-	s64 old_xaddr;		/* 8: */
-	s64 new_xaddr;		/* 8: */
-	s32 xlen;		/* 4: */
-};
-
-/* plist flag */
-#define DEFRAGFS_SYNC		0x80000000
-#define DEFRAGFS_COMMIT		0x40000000
-#define DEFRAGFS_RELOCATE	0x10000000
-
-#define	INODE_TYPE		0x0000F000	/* IFREG or IFDIR */
-
-#define EXTENT_TYPE		0x000000ff
-#define DTPAGE			0x00000001
-#define XTPAGE			0x00000002
-#define DATAEXT			0x00000004
-#define EAEXT			0x00000008
-
-#endif				/* _H_JFS_DEFRAGFS */
diff -Nru a/fs/jfs/jfs_imap.c b/fs/jfs/jfs_imap.c
--- a/fs/jfs/jfs_imap.c	2005-01-10 20:11:16 -08:00
+++ b/fs/jfs/jfs_imap.c	2005-01-10 20:11:16 -08:00
@@ -2604,6 +2604,12 @@
 		for (i = 0; i < SMAPSZ; i++)
 			iagp->inosmap[i] = cpu_to_le32(ONES);
 
+		/*
+		 * Invalidate the page after writing and syncing it.
+		 * After it's initialized, we access it in a different
+		 * address space
+		 */
+		set_bit(META_discard, &mp->flag);
 		flush_metapage(mp);
 
 		/*
diff -Nru a/fs/jfs/jfs_logmgr.c b/fs/jfs/jfs_logmgr.c
--- a/fs/jfs/jfs_logmgr.c	2005-01-10 20:11:19 -08:00
+++ b/fs/jfs/jfs_logmgr.c	2005-01-10 20:11:19 -08:00
@@ -980,11 +980,15 @@
 		 * actually make it to disk
 		 */
 		list_for_each_entry(sbi, &log->sb_list, log_list) {
+			if (sbi->flag & JFS_NOINTEGRITY)
+				continue;
 			filemap_fdatawrite(sbi->ipbmap->i_mapping);
 			filemap_fdatawrite(sbi->ipimap->i_mapping);
 			filemap_fdatawrite(sbi->sb->s_bdev->bd_inode->i_mapping);
 		}
 		list_for_each_entry(sbi, &log->sb_list, log_list) {
+			if (sbi->flag & JFS_NOINTEGRITY)
+				continue;
 			filemap_fdatawait(sbi->ipbmap->i_mapping);
 			filemap_fdatawait(sbi->ipimap->i_mapping);
 			filemap_fdatawait(sbi->sb->s_bdev->bd_inode->i_mapping);
diff -Nru a/fs/jfs/jfs_metapage.c b/fs/jfs/jfs_metapage.c
--- a/fs/jfs/jfs_metapage.c	2005-01-10 20:11:17 -08:00
+++ b/fs/jfs/jfs_metapage.c	2005-01-10 20:11:17 -08:00
@@ -396,14 +396,6 @@
 
 	jfs_info("__write_metapage: mp = 0x%p", mp);
 
-	if (test_bit(META_discard, &mp->flag)) {
-		/*
-		 * This metadata is no longer valid
-		 */
-		clear_bit(META_dirty, &mp->flag);
-		return;
-	}
-
 	page_index = mp->page->index;
 	page_offset =
 	    (mp->index - (page_index << l2BlocksPerPage)) << l2bsize;
@@ -549,6 +541,7 @@
 				goto again;
 			}
 
+			clear_bit(META_dirty, &mp->flag);
 			set_bit(META_discard, &mp->flag);
 			spin_unlock(&meta_lock);
 		} else {
diff -Nru a/fs/jfs/namei.c b/fs/jfs/namei.c
--- a/fs/jfs/namei.c	2005-01-10 20:11:24 -08:00
+++ b/fs/jfs/namei.c	2005-01-10 20:11:24 -08:00
@@ -1233,7 +1233,7 @@
 	old_ip->i_ctime = CURRENT_TIME;
 	mark_inode_dirty(old_ip);
 
-	new_dir->i_ctime = new_dir->i_mtime = CURRENT_TIME;
+	new_dir->i_ctime = new_dir->i_mtime = current_fs_time(new_dir->i_sb);
 	mark_inode_dirty(new_dir);
 
 	/* Build list of inodes modified by this transaction */
diff -Nru a/fs/jfs/super.c b/fs/jfs/super.c
--- a/fs/jfs/super.c	2005-01-10 20:11:18 -08:00
+++ b/fs/jfs/super.c	2005-01-10 20:11:18 -08:00
@@ -464,7 +464,7 @@
 	 */
 	sb->s_maxbytes = min(((u64) PAGE_CACHE_SIZE << 32) - 1, sb->s_maxbytes);
 #endif
-
+	sb->s_time_gran = 1;
 	return 0;
 
 out_no_root:
diff -Nru a/fs/jfs/xattr.c b/fs/jfs/xattr.c
--- a/fs/jfs/xattr.c	2005-01-10 20:11:24 -08:00
+++ b/fs/jfs/xattr.c	2005-01-10 20:11:24 -08:00
@@ -91,6 +91,12 @@
 #define XATTR_OS2_PREFIX "os2."
 #define XATTR_OS2_PREFIX_LEN (sizeof (XATTR_OS2_PREFIX) - 1)
 
+/* XATTR_SECURITY_PREFIX is defined in include/linux/xattr.h */
+#define XATTR_SECURITY_PREFIX_LEN (sizeof (XATTR_SECURITY_PREFIX) - 1)
+
+#define XATTR_TRUSTED_PREFIX "trusted."
+#define XATTR_TRUSTED_PREFIX_LEN (sizeof (XATTR_TRUSTED_PREFIX) - 1)
+
 /*
  * These three routines are used to recognize on-disk extended attributes
  * that are in a recognized namespace.  If the attribute is not recognized,
@@ -111,6 +117,19 @@
 	    !strncmp(ea->name, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN))
 		return FALSE;
 	/*
+	 * Check for "security."
+	 */
+	if ((ea->namelen >= XATTR_SECURITY_PREFIX_LEN) &&
+	    !strncmp(ea->name, XATTR_SECURITY_PREFIX,
+		     XATTR_SECURITY_PREFIX_LEN))
+		return FALSE;
+	/*
+	 * Check for "trusted."
+	 */
+	if ((ea->namelen >= XATTR_TRUSTED_PREFIX_LEN) &&
+	    !strncmp(ea->name, XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN))
+		return FALSE;
+	/*
 	 * Add any other valid namespace prefixes here
 	 */
 
@@ -770,6 +789,15 @@
 		 */
 		return can_set_system_xattr(inode, name, value, value_len);
 
+	if(strncmp(name, XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN) != 0)
+		return (capable(CAP_SYS_ADMIN) ? 0 : -EPERM);
+
+#ifdef CONFIG_JFS_SECURITY
+	if (strncmp(name, XATTR_SECURITY_PREFIX, XATTR_SECURITY_PREFIX_LEN)
+	    != 0)
+		return 0;	/* Leave it to the security module */
+#endif
+		
 	if((strncmp(name, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN) != 0) &&
 	   (strncmp(name, XATTR_OS2_PREFIX, XATTR_OS2_PREFIX_LEN) != 0))
 		return -EOPNOTSUPP;
@@ -937,8 +965,17 @@
 
 static int can_get_xattr(struct inode *inode, const char *name)
 {
+#ifdef CONFIG_JFS_SECURITY
+	if(strncmp(name, XATTR_SECURITY_PREFIX, XATTR_SECURITY_PREFIX_LEN) == 0)
+		return 0;
+#endif
+
+	if(strncmp(name, XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN) == 0)
+		return (capable(CAP_SYS_ADMIN) ? 0 : -EPERM);
+
 	if(strncmp(name, XATTR_SYSTEM_PREFIX, XATTR_SYSTEM_PREFIX_LEN) == 0)
 		return 0;
+
 	return permission(inode, MAY_READ, NULL);
 }
 
@@ -1021,6 +1058,16 @@
 	return err;
 }
 
+/*
+ * No special permissions are needed to list attributes except for trusted.*
+ */
+static inline int can_list(struct jfs_ea *ea)
+{
+	return (strncmp(ea->name, XATTR_TRUSTED_PREFIX,
+			    XATTR_TRUSTED_PREFIX_LEN) ||
+		capable(CAP_SYS_ADMIN));
+}
+
 ssize_t jfs_listxattr(struct dentry * dentry, char *data, size_t buf_size)
 {
 	struct inode *inode = dentry->d_inode;
@@ -1045,8 +1092,10 @@
 	ealist = (struct jfs_ea_list *) ea_buf.xattr;
 
 	/* compute required size of list */
-	for (ea = FIRST_EA(ealist); ea < END_EALIST(ealist); ea = NEXT_EA(ea))
-		size += name_size(ea) + 1;
+	for (ea = FIRST_EA(ealist); ea < END_EALIST(ealist); ea = NEXT_EA(ea)) {
+	    	if (can_list(ea))
+			size += name_size(ea) + 1;
+	}
 
 	if (!data)
 		goto release;
@@ -1059,8 +1108,10 @@
 	/* Copy attribute names to buffer */
 	buffer = data;
 	for (ea = FIRST_EA(ealist); ea < END_EALIST(ealist); ea = NEXT_EA(ea)) {
-		int namelen = copy_name(buffer, ea);
-		buffer += namelen + 1;
+	    	if (can_list(ea)) {
+			int namelen = copy_name(buffer, ea);
+			buffer += namelen + 1;
+		}
 	}
 
       release:
diff -Nru a/fs/libfs.c b/fs/libfs.c
--- a/fs/libfs.c	2005-01-10 20:11:15 -08:00
+++ b/fs/libfs.c	2005-01-10 20:11:15 -08:00
@@ -212,6 +212,7 @@
 	s->s_blocksize_bits = 10;
 	s->s_magic = magic;
 	s->s_op = ops ? ops : &default_ops;
+	s->s_time_gran = 1;
 	root = new_inode(s);
 	if (!root)
 		goto Enomem;
@@ -374,6 +375,7 @@
 	s->s_blocksize_bits = PAGE_CACHE_SHIFT;
 	s->s_magic = magic;
 	s->s_op = &s_ops;
+	s->s_time_gran = 1;
 
 	inode = new_inode(s);
 	if (!inode)
diff -Nru a/fs/lockd/mon.c b/fs/lockd/mon.c
--- a/fs/lockd/mon.c	2005-01-10 20:11:21 -08:00
+++ b/fs/lockd/mon.c	2005-01-10 20:11:21 -08:00
@@ -19,7 +19,7 @@
 
 static struct rpc_clnt *	nsm_create(void);
 
-extern struct rpc_program	nsm_program;
+static struct rpc_program	nsm_program;
 
 /*
  * Local NSM state
@@ -237,7 +237,7 @@
 
 static struct rpc_stat		nsm_stats;
 
-struct rpc_program		nsm_program = {
+static struct rpc_program	nsm_program = {
 		.name		= "statd",
 		.number		= SM_PROGRAM,
 		.nrvers		= sizeof(nsm_version)/sizeof(nsm_version[0]),
diff -Nru a/fs/lockd/svc.c b/fs/lockd/svc.c
--- a/fs/lockd/svc.c	2005-01-10 20:11:20 -08:00
+++ b/fs/lockd/svc.c	2005-01-10 20:11:20 -08:00
@@ -38,7 +38,7 @@
 #define LOCKD_BUFSIZE		(1024 + NLMSVC_XDRSIZE)
 #define ALLOWED_SIGS		(sigmask(SIGKILL))
 
-extern struct svc_program	nlmsvc_program;
+static struct svc_program	nlmsvc_program;
 
 struct nlmsvc_binding *		nlmsvc_ops;
 EXPORT_SYMBOL(nlmsvc_ops);
@@ -476,11 +476,11 @@
 static struct svc_stat		nlmsvc_stats;
 
 #define NLM_NRVERS	(sizeof(nlmsvc_version)/sizeof(nlmsvc_version[0]))
-struct svc_program	nlmsvc_program = {
-	.pg_prog	= NLM_PROGRAM,		/* program number */
-	.pg_nvers	= NLM_NRVERS,		/* number of entries in nlmsvc_version */
-	.pg_vers	= nlmsvc_version,	/* version table */
-	.pg_name	= "lockd",		/* service name */
-	.pg_class	= "nfsd",		/* share authentication with nfsd */
-	.pg_stats	= &nlmsvc_stats,	/* stats table */
+static struct svc_program	nlmsvc_program = {
+	.pg_prog		= NLM_PROGRAM,		/* program number */
+	.pg_nvers		= NLM_NRVERS,		/* number of entries in nlmsvc_version */
+	.pg_vers		= nlmsvc_version,	/* version table */
+	.pg_name		= "lockd",		/* service name */
+	.pg_class		= "nfsd",		/* share authentication with nfsd */
+	.pg_stats		= &nlmsvc_stats,	/* stats table */
 };
diff -Nru a/fs/locks.c b/fs/locks.c
--- a/fs/locks.c	2005-01-10 20:11:22 -08:00
+++ b/fs/locks.c	2005-01-10 20:11:22 -08:00
@@ -1096,15 +1096,13 @@
 */
 void remove_lease(struct file_lock *fl)
 {
-	if (!IS_LEASE(fl))
-		return;
-
 	lock_kernel();
-
+	if (!fl || !IS_LEASE(fl))
+		goto out;
 	fl->fl_type = F_UNLCK | F_INPROGRESS;
 	fl->fl_break_time = jiffies - 10;
 	time_out_leases(fl->fl_file->f_dentry->d_inode);
-
+out:
 	unlock_kernel();
 }
 
@@ -1228,7 +1226,7 @@
 {
 	struct file_lock *flock = inode->i_flock;
 	if (flock && IS_LEASE(flock) && (flock->fl_type & F_WRLCK))
-		*time = CURRENT_TIME;
+		*time = current_fs_time(inode->i_sb);
 	else
 		*time = inode->i_mtime;
 }
@@ -1563,9 +1561,6 @@
 		error = filp->f_op->lock(filp, F_GETLK, &file_lock);
 		if (error < 0)
 			goto out;
-		else if (error == LOCK_USE_CLNT)
-		  /* Bypass for NFS with no locking - 2.0.36 compat */
-		  fl = posix_test_lock(filp, &file_lock);
 		else
 		  fl = (file_lock.fl_type == F_UNLCK ? NULL : &file_lock);
 	} else {
@@ -1708,9 +1703,6 @@
 		error = filp->f_op->lock(filp, F_GETLK, &file_lock);
 		if (error < 0)
 			goto out;
-		else if (error == LOCK_USE_CLNT)
-		  /* Bypass for NFS with no locking - 2.0.36 compat */
-		  fl = posix_test_lock(filp, &file_lock);
 		else
 		  fl = (file_lock.fl_type == F_UNLCK ? NULL : &file_lock);
 	} else {
diff -Nru a/fs/minix/bitmap.c b/fs/minix/bitmap.c
--- a/fs/minix/bitmap.c	2005-01-10 20:11:21 -08:00
+++ b/fs/minix/bitmap.c	2005-01-10 20:11:21 -08:00
@@ -253,7 +253,7 @@
 	inode->i_uid = current->fsuid;
 	inode->i_gid = (dir->i_mode & S_ISGID) ? dir->i_gid : current->fsgid;
 	inode->i_ino = j;
-	inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
+	inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC;
 	inode->i_blocks = inode->i_blksize = 0;
 	memset(&minix_i(inode)->u, 0, sizeof(minix_i(inode)->u));
 	insert_inode_hash(inode);
diff -Nru a/fs/minix/dir.c b/fs/minix/dir.c
--- a/fs/minix/dir.c	2005-01-10 20:11:21 -08:00
+++ b/fs/minix/dir.c	2005-01-10 20:11:21 -08:00
@@ -246,7 +246,7 @@
 	memset (de->name + namelen, 0, sbi->s_dirsize - namelen - 2);
 	de->inode = inode->i_ino;
 	err = dir_commit_chunk(page, from, to);
-	dir->i_mtime = dir->i_ctime = CURRENT_TIME;
+	dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC;
 	mark_inode_dirty(dir);
 out_put:
 	dir_put_page(page);
@@ -275,7 +275,7 @@
 		unlock_page(page);
 	}
 	dir_put_page(page);
-	inode->i_ctime = inode->i_mtime = CURRENT_TIME;
+	inode->i_ctime = inode->i_mtime = CURRENT_TIME_SEC;
 	mark_inode_dirty(inode);
 	return err;
 }
@@ -378,7 +378,7 @@
 		unlock_page(page);
 	}
 	dir_put_page(page);
-	dir->i_mtime = dir->i_ctime = CURRENT_TIME;
+	dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC;
 	mark_inode_dirty(dir);
 }
 
diff -Nru a/fs/minix/itree_common.c b/fs/minix/itree_common.c
--- a/fs/minix/itree_common.c	2005-01-10 20:11:20 -08:00
+++ b/fs/minix/itree_common.c	2005-01-10 20:11:20 -08:00
@@ -124,7 +124,7 @@
 
 	/* We are done with atomic stuff, now do the rest of housekeeping */
 
-	inode->i_ctime = CURRENT_TIME;
+	inode->i_ctime = CURRENT_TIME_SEC;
 
 	/* had we spliced it onto indirect block? */
 	if (where->bh)
@@ -342,7 +342,7 @@
 		}
 		first_whole++;
 	}
-	inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+	inode->i_mtime = inode->i_ctime = CURRENT_TIME_SEC;
 	mark_inode_dirty(inode);
 }
 
diff -Nru a/fs/minix/namei.c b/fs/minix/namei.c
--- a/fs/minix/namei.c	2005-01-10 20:11:18 -08:00
+++ b/fs/minix/namei.c	2005-01-10 20:11:18 -08:00
@@ -138,7 +138,7 @@
 	if (inode->i_nlink >= minix_sb(inode->i_sb)->s_link_max)
 		return -EMLINK;
 
-	inode->i_ctime = CURRENT_TIME;
+	inode->i_ctime = CURRENT_TIME_SEC;
 	inc_count(inode);
 	atomic_inc(&inode->i_count);
 	return add_nondir(dentry, inode);
@@ -259,7 +259,7 @@
 			goto out_dir;
 		inc_count(old_inode);
 		minix_set_link(new_de, new_page, old_inode);
-		new_inode->i_ctime = CURRENT_TIME;
+		new_inode->i_ctime = CURRENT_TIME_SEC;
 		if (dir_de)
 			new_inode->i_nlink--;
 		dec_count(new_inode);
diff -Nru a/fs/msdos/namei.c b/fs/msdos/namei.c
--- a/fs/msdos/namei.c	2005-01-10 20:11:23 -08:00
+++ b/fs/msdos/namei.c	2005-01-10 20:11:23 -08:00
@@ -243,7 +243,7 @@
 	/*
 	 * XXX all times should be set by caller upon successful completion.
 	 */
-	dir->i_ctime = dir->i_mtime = CURRENT_TIME;
+	dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC;
 	mark_inode_dirty(dir);
 
 	memcpy((*de)->name, name, MSDOS_NAME);
@@ -296,7 +296,7 @@
 		unlock_kernel();
 		return res;
 	}
-	inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
+	inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC;
 	mark_inode_dirty(inode);
 	d_instantiate(dentry, inode);
 	unlock_kernel();
@@ -330,7 +330,7 @@
 	mark_buffer_dirty(bh);
 	fat_detach(inode);
 	inode->i_nlink = 0;
-	inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME;
+	inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC;
 	dir->i_nlink--;
 	mark_inode_dirty(inode);
 	mark_inode_dirty(dir);
@@ -392,7 +392,7 @@
 
 mkdir_error:
 	inode->i_nlink = 0;
-	inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME;
+	inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC;
 	dir->i_nlink--;
 	mark_inode_dirty(inode);
 	mark_inode_dirty(dir);
@@ -430,7 +430,7 @@
 	fat_detach(inode);
 	brelse(bh);
 	inode->i_nlink = 0;
-	inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME;
+	inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC;
 	mark_inode_dirty(inode);
 	mark_inode_dirty(dir);
 	res = 0;
@@ -493,11 +493,11 @@
 		MSDOS_I(old_inode)->i_attrs &= ~ATTR_HIDDEN;
 	mark_inode_dirty(old_inode);
 	old_dir->i_version++;
-	old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME;
+	old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME_SEC;
 	mark_inode_dirty(old_dir);
 	if (new_inode) {
 		new_inode->i_nlink--;
-		new_inode->i_ctime = CURRENT_TIME;
+		new_inode->i_ctime = CURRENT_TIME_SEC;
 		mark_inode_dirty(new_inode);
 	}
 	if (dotdot_bh) {
@@ -530,7 +530,7 @@
 		MSDOS_I(old_inode)->i_attrs &= ~ATTR_HIDDEN;
 	mark_inode_dirty(old_inode);
 	old_dir->i_version++;
-	old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME;
+	old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME_SEC;
 	mark_inode_dirty(old_dir);
 	return 0;
 }
diff -Nru a/fs/namei.c b/fs/namei.c
--- a/fs/namei.c	2005-01-10 20:11:18 -08:00
+++ b/fs/namei.c	2005-01-10 20:11:18 -08:00
@@ -116,13 +116,14 @@
 	int retval;
 	unsigned long len = PATH_MAX;
 
-	if ((unsigned long) filename >= TASK_SIZE) {
-		if (!segment_eq(get_fs(), KERNEL_DS))
+	if (!segment_eq(get_fs(), KERNEL_DS)) {
+		if ((unsigned long) filename >= TASK_SIZE)
 			return -EFAULT;
-	} else if (TASK_SIZE - (unsigned long) filename < PATH_MAX)
-		len = TASK_SIZE - (unsigned long) filename;
+		if (TASK_SIZE - (unsigned long) filename < PATH_MAX)
+			len = TASK_SIZE - (unsigned long) filename;
+	}
 
-	retval = strncpy_from_user((char *)page, filename, len);
+	retval = strncpy_from_user(page, filename, len);
 	if (retval > 0) {
 		if (retval < len)
 			return 0;
diff -Nru a/fs/nfs/dir.c b/fs/nfs/dir.c
--- a/fs/nfs/dir.c	2005-01-10 20:11:19 -08:00
+++ b/fs/nfs/dir.c	2005-01-10 20:11:19 -08:00
@@ -40,8 +40,6 @@
 static int nfs_opendir(struct inode *, struct file *);
 static int nfs_readdir(struct file *, void *, filldir_t);
 static struct dentry *nfs_lookup(struct inode *, struct dentry *, struct nameidata *);
-static int nfs_cached_lookup(struct inode *, struct dentry *,
-				struct nfs_fh *, struct nfs_fattr *);
 static int nfs_create(struct inode *, struct dentry *, int, struct nameidata *);
 static int nfs_mkdir(struct inode *, struct dentry *, int);
 static int nfs_rmdir(struct inode *, struct dentry *);
@@ -294,24 +292,13 @@
 	return res;
 }
 
-static unsigned int nfs_type2dtype[] = {
-	DT_UNKNOWN,
-	DT_REG,
-	DT_DIR,
-	DT_BLK,
-	DT_CHR,
-	DT_LNK,
-	DT_SOCK,
-	DT_UNKNOWN,
-	DT_FIFO
-};
-
-static inline
-unsigned int nfs_type_to_d_type(enum nfs_ftype type)
+static inline unsigned int dt_type(struct inode *inode)
 {
-	return nfs_type2dtype[type];
+	return (inode->i_mode >> 12) & 15;
 }
 
+static struct dentry *nfs_readdir_lookup(nfs_readdir_descriptor_t *desc);
+
 /*
  * Once we've found the start of the dirent within a page: fill 'er up...
  */
@@ -321,6 +308,7 @@
 {
 	struct file	*file = desc->file;
 	struct nfs_entry *entry = desc->entry;
+	struct dentry	*dentry = NULL;
 	unsigned long	fileid;
 	int		loop_count = 0,
 			res;
@@ -333,9 +321,16 @@
 		 *	 retrieving the current dirent on the server */
 		fileid = nfs_fileid_to_ino_t(entry->ino);
 
+		/* Get a dentry if we have one */
+		if (dentry != NULL)
+			dput(dentry);
+		dentry = nfs_readdir_lookup(desc);
+
 		/* Use readdirplus info */
-		if (desc->plus && (entry->fattr->valid & NFS_ATTR_FATTR))
-			d_type = nfs_type_to_d_type(entry->fattr->type);
+		if (dentry != NULL && dentry->d_inode != NULL) {
+			d_type = dt_type(dentry->d_inode);
+			fileid = dentry->d_inode->i_ino;
+		}
 
 		res = filldir(dirent, entry->name, entry->len, 
 			      entry->prev_cookie, fileid, d_type);
@@ -352,7 +347,8 @@
 		}
 	}
 	dir_page_release(desc);
-
+	if (dentry != NULL)
+		dput(dentry);
 	dfprintk(VFS, "NFS: nfs_do_filldir() filling ended @ cookie %Lu; returning = %d\n", (long long)desc->target, res);
 	return res;
 }
@@ -615,24 +611,10 @@
 		goto out_valid;
 	}
 
-	/*
-	 * Note: we're not holding inode->i_sem and so may be racing with
-	 * operations that change the directory. We therefore save the
-	 * change attribute *before* we do the RPC call.
-	 */
-	verifier = nfs_save_change_attribute(dir);
-	error = nfs_cached_lookup(dir, dentry, &fhandle, &fattr);
-	if (!error) {
-		if (nfs_compare_fh(NFS_FH(inode), &fhandle))
-			goto out_bad;
-		if (nfs_lookup_verify_inode(inode, isopen))
-			goto out_zap_parent;
-		goto out_valid_renew;
-	}
-
 	if (NFS_STALE(inode))
 		goto out_bad;
 
+	verifier = nfs_save_change_attribute(dir);
 	error = NFS_PROTO(dir)->lookup(dir, &dentry->d_name, &fhandle, &fattr);
 	if (error)
 		goto out_bad;
@@ -641,7 +623,6 @@
 	if ((error = nfs_refresh_inode(inode, &fattr)) != 0)
 		goto out_bad;
 
- out_valid_renew:
 	nfs_renew_times(dentry);
 	nfs_set_verifier(dentry, verifier);
  out_valid:
@@ -723,6 +704,7 @@
 
 static struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *nd)
 {
+	struct dentry *res;
 	struct inode *inode = NULL;
 	int error;
 	struct nfs_fh fhandle;
@@ -731,11 +713,11 @@
 	dfprintk(VFS, "NFS: lookup(%s/%s)\n",
 		dentry->d_parent->d_name.name, dentry->d_name.name);
 
-	error = -ENAMETOOLONG;
+	res = ERR_PTR(-ENAMETOOLONG);
 	if (dentry->d_name.len > NFS_SERVER(dir)->namelen)
 		goto out;
 
-	error = -ENOMEM;
+	res = ERR_PTR(-ENOMEM);
 	dentry->d_op = NFS_PROTO(dir)->dentry_ops;
 
 	lock_kernel();
@@ -746,29 +728,27 @@
 	if (nfs_is_exclusive_create(dir, nd))
 		goto no_entry;
 
-	error = nfs_cached_lookup(dir, dentry, &fhandle, &fattr);
-	if (error != 0) {
-		error = NFS_PROTO(dir)->lookup(dir, &dentry->d_name,
-				&fhandle, &fattr);
-		if (error == -ENOENT)
-			goto no_entry;
-		if (error != 0)
-			goto out_unlock;
+	error = NFS_PROTO(dir)->lookup(dir, &dentry->d_name, &fhandle, &fattr);
+	if (error == -ENOENT)
+		goto no_entry;
+	if (error < 0) {
+		res = ERR_PTR(error);
+		goto out_unlock;
 	}
-	error = -EACCES;
+	res = ERR_PTR(-EACCES);
 	inode = nfs_fhget(dentry->d_sb, &fhandle, &fattr);
 	if (!inode)
 		goto out_unlock;
 no_entry:
-	error = 0;
-	d_add(dentry, inode);
+	res = d_add_unique(dentry, inode);
+	if (res != NULL)
+		dentry = res;
 	nfs_renew_times(dentry);
 	nfs_set_verifier(dentry, nfs_save_change_attribute(dir));
 out_unlock:
 	unlock_kernel();
 out:
-	BUG_ON(error > 0);
-	return ERR_PTR(error);
+	return res;
 }
 
 #ifdef CONFIG_NFS_V4
@@ -798,15 +778,15 @@
 
 static struct dentry *nfs_atomic_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd)
 {
+	struct dentry *res = NULL;
 	struct inode *inode = NULL;
-	int error = 0;
 
 	/* Check that we are indeed trying to open this file */
 	if (!is_atomic_open(dir, nd))
 		goto no_open;
 
 	if (dentry->d_name.len > NFS_SERVER(dir)->namelen) {
-		error = -ENAMETOOLONG;
+		res = ERR_PTR(-ENAMETOOLONG);
 		goto out;
 	}
 	dentry->d_op = NFS_PROTO(dir)->dentry_ops;
@@ -828,7 +808,7 @@
 		inode = nfs4_atomic_open(dir, dentry, nd);
 	unlock_kernel();
 	if (IS_ERR(inode)) {
-		error = PTR_ERR(inode);
+		int error = PTR_ERR(inode);
 		switch (error) {
 			/* Make a negative dentry */
 			case -ENOENT:
@@ -841,16 +821,18 @@
 			/* case -EISDIR: */
 			/* case -EINVAL: */
 			default:
+				res = ERR_PTR(error);
 				goto out;
 		}
 	}
 no_entry:
-	d_add(dentry, inode);
+	res = d_add_unique(dentry, inode);
+	if (res != NULL)
+		dentry = res;
 	nfs_renew_times(dentry);
 	nfs_set_verifier(dentry, nfs_save_change_attribute(dir));
 out:
-	BUG_ON(error > 0);
-	return ERR_PTR(error);
+	return res;
 no_open:
 	return nfs_lookup(dir, dentry, nd);
 }
@@ -906,83 +888,51 @@
 }
 #endif /* CONFIG_NFSV4 */
 
-static inline
-int find_dirent_name(nfs_readdir_descriptor_t *desc, struct page *page, struct dentry *dentry)
+static struct dentry *nfs_readdir_lookup(nfs_readdir_descriptor_t *desc)
 {
+	struct dentry *parent = desc->file->f_dentry;
+	struct inode *dir = parent->d_inode;
 	struct nfs_entry *entry = desc->entry;
-	int		 status;
-
-	while((status = dir_decode(desc)) == 0) {
-		if (entry->len != dentry->d_name.len)
-			continue;
-		if (memcmp(entry->name, dentry->d_name.name, entry->len))
-			continue;
-		if (!(entry->fattr->valid & NFS_ATTR_FATTR))
-			continue;
-		break;
-	}
-	return status;
-}
-
-/*
- * Use the cached Readdirplus results in order to avoid a LOOKUP call
- * whenever we believe that the parent directory has not changed.
- *
- * We assume that any file creation/rename changes the directory mtime.
- * As this results in a page cache invalidation whenever it occurs,
- * we don't require any other tests for cache coherency.
- */
-static
-int nfs_cached_lookup(struct inode *dir, struct dentry *dentry,
-			struct nfs_fh *fh, struct nfs_fattr *fattr)
-{
-	nfs_readdir_descriptor_t desc;
-	struct nfs_server *server;
-	struct nfs_entry entry;
-	struct page *page;
-	unsigned long timestamp;
-	int res;
-
-	if (!NFS_USE_READDIRPLUS(dir))
-		return -ENOENT;
-	server = NFS_SERVER(dir);
-	/* Don't use readdirplus unless the cache is stable */
-	if ((server->flags & NFS_MOUNT_NOAC) != 0
-			|| nfs_caches_unstable(dir)
-			|| nfs_attribute_timeout(dir))
-		return -ENOENT;
-	if ((NFS_FLAGS(dir) & (NFS_INO_INVALID_ATTR|NFS_INO_INVALID_DATA)) != 0)
-		return -ENOENT;
-	timestamp = NFS_I(dir)->readdir_timestamp;
-
-	entry.fh = fh;
-	entry.fattr = fattr;
-
-	desc.decode = NFS_PROTO(dir)->decode_dirent;
-	desc.entry = &entry;
-	desc.page_index = 0;
-	desc.plus = 1;
-
-	for(;(page = find_get_page(dir->i_mapping, desc.page_index)); desc.page_index++) {
-
-		res = -EIO;
-		if (PageUptodate(page)) {
-			void * kaddr = kmap_atomic(page, KM_USER0);
-			desc.ptr = kaddr;
-			res = find_dirent_name(&desc, page, dentry);
-			kunmap_atomic(kaddr, KM_USER0);
-		}
-		page_cache_release(page);
+	struct dentry *dentry, *alias;
+	struct qstr name = {
+		.name = entry->name,
+		.len = entry->len,
+	};
+	struct inode *inode;
 
-		if (res == 0)
-			goto out_found;
-		if (res != -EAGAIN)
+	switch (name.len) {
+		case 2:
+			if (name.name[0] == '.' && name.name[1] == '.')
+				return dget_parent(parent);
 			break;
+		case 1:
+			if (name.name[0] == '.')
+				return dget(parent);
+	}
+	name.hash = full_name_hash(name.name, name.len);
+	dentry = d_lookup(parent, &name);
+	if (dentry != NULL)
+		return dentry;
+	if (!desc->plus || !(entry->fattr->valid & NFS_ATTR_FATTR))
+		return NULL;
+	/* Note: caller is already holding the dir->i_sem! */
+	dentry = d_alloc(parent, &name);
+	if (dentry == NULL)
+		return NULL;
+	dentry->d_op = NFS_PROTO(dir)->dentry_ops;
+	inode = nfs_fhget(dentry->d_sb, entry->fh, entry->fattr);
+	if (!inode) {
+		dput(dentry);
+		return NULL;
 	}
-	return -ENOENT;
- out_found:
-	fattr->timestamp = timestamp;
-	return 0;
+	alias = d_add_unique(dentry, inode);
+	if (alias != NULL) {
+		dput(dentry);
+		dentry = alias;
+	}
+	nfs_renew_times(dentry);
+	nfs_set_verifier(dentry, nfs_save_change_attribute(dir));
+	return dentry;
 }
 
 /*
@@ -1045,15 +995,9 @@
 	if (nd && (nd->flags & LOOKUP_CREATE))
 		open_flags = nd->intent.open.flags;
 
-	/*
-	 * The 0 argument passed into the create function should one day
-	 * contain the O_EXCL flag if requested. This allows NFSv3 to
-	 * select the appropriate create strategy. Currently open_namei
-	 * does not pass the create flags.
-	 */
 	lock_kernel();
 	nfs_begin_data_update(dir);
-	inode = NFS_PROTO(dir)->create(dir, &dentry->d_name, &attr, open_flags);
+	inode = NFS_PROTO(dir)->create(dir, dentry, &attr, open_flags);
 	nfs_end_data_update(dir);
 	if (!IS_ERR(inode)) {
 		d_instantiate(dentry, inode);
@@ -1438,7 +1382,7 @@
 		goto go_ahead;
 	if (S_ISDIR(new_inode->i_mode))
 		goto out;
-	else if (atomic_read(&new_dentry->d_count) > 1) {
+	else if (atomic_read(&new_dentry->d_count) > 2) {
 		int err;
 		/* copy the target dentry's name */
 		dentry = d_alloc(new_dentry->d_parent,
@@ -1453,10 +1397,8 @@
 			new_inode = NULL;
 			/* instantiate the replacement target */
 			d_instantiate(new_dentry, NULL);
-		}
-
+		} else if (atomic_read(&new_dentry->d_count) > 1) {
 		/* dentry still busy? */
-		if (atomic_read(&new_dentry->d_count) > 1) {
 #ifdef NFS_PARANOIA
 			printk("nfs_rename: target %s/%s busy, d_count=%d\n",
 			       new_dentry->d_parent->d_name.name,
@@ -1510,7 +1452,7 @@
 
 	if (cache->cred != cred
 			|| time_after(jiffies, cache->jiffies + NFS_ATTRTIMEO(inode))
-			|| (NFS_FLAGS(inode) & NFS_INO_INVALID_ATTR))
+			|| (NFS_FLAGS(inode) & NFS_INO_INVALID_ACCESS))
 		return -ENOENT;
 	memcpy(res, cache, sizeof(*res));
 	return 0;
@@ -1524,6 +1466,7 @@
 		if (cache->cred)
 			put_rpccred(cache->cred);
 		cache->cred = get_rpccred(set->cred);
+		NFS_FLAGS(inode) &= ~NFS_INO_INVALID_ACCESS;
 	}
 	cache->jiffies = set->jiffies;
 	cache->mask = set->mask;
diff -Nru a/fs/nfs/direct.c b/fs/nfs/direct.c
--- a/fs/nfs/direct.c	2005-01-10 20:11:22 -08:00
+++ b/fs/nfs/direct.c	2005-01-10 20:11:22 -08:00
@@ -33,6 +33,7 @@
  * 08 Jul 2002	Version for 2.4.19, with bug fixes --trondmy
  * 08 Jun 2003	Port to 2.5 APIs  --cel
  * 31 Mar 2004	Handle direct I/O without VFS support  --cel
+ * 15 Sep 2004	Parallel async reads  --cel
  *
  */
 
@@ -43,6 +44,7 @@
 #include <linux/smp_lock.h>
 #include <linux/file.h>
 #include <linux/pagemap.h>
+#include <linux/kref.h>
 
 #include <linux/nfs_fs.h>
 #include <linux/nfs_page.h>
@@ -50,11 +52,27 @@
 
 #include <asm/system.h>
 #include <asm/uaccess.h>
+#include <asm/atomic.h>
 
 #define NFSDBG_FACILITY		NFSDBG_VFS
-#define VERF_SIZE		(2 * sizeof(__u32))
 #define MAX_DIRECTIO_SIZE	(4096UL << PAGE_SHIFT)
 
+static kmem_cache_t *nfs_direct_cachep;
+
+/*
+ * This represents a set of asynchronous requests that we're waiting on
+ */
+struct nfs_direct_req {
+	struct kref		kref;		/* release manager */
+	struct list_head	list;		/* nfs_read_data structs */
+	wait_queue_head_t	wait;		/* wait for i/o completion */
+	struct page **		pages;		/* pages in our buffer */
+	unsigned int		npages;		/* count of pages */
+	atomic_t		complete,	/* i/os we're waiting for */
+				count,		/* bytes actually processed */
+				error;		/* any reported error */
+};
+
 
 /**
  * nfs_get_user_pages - find and set up pages underlying user's buffer
@@ -71,9 +89,12 @@
 	unsigned long page_count;
 	size_t array_size;
 
-	/* set an arbitrary limit to prevent arithmetic overflow */
-	if (size > MAX_DIRECTIO_SIZE)
+	/* set an arbitrary limit to prevent type overflow */
+	/* XXX: this can probably be as large as INT_MAX */
+	if (size > MAX_DIRECTIO_SIZE) {
+		*pages = NULL;
 		return -EFBIG;
+	}
 
 	page_count = (user_addr + size + PAGE_SIZE - 1) >> PAGE_SHIFT;
 	page_count -= user_addr >> PAGE_SHIFT;
@@ -93,6 +114,8 @@
 /**
  * nfs_free_user_pages - tear down page struct array
  * @pages: array of page struct pointers underlying target buffer
+ * @npages: number of pages in the array
+ * @do_dirty: dirty the pages as we release them
  */
 static void
 nfs_free_user_pages(struct page **pages, int npages, int do_dirty)
@@ -107,77 +130,231 @@
 }
 
 /**
- * nfs_direct_read_seg - Read in one iov segment.  Generate separate
- *                        read RPCs for each "rsize" bytes.
+ * nfs_direct_req_release - release  nfs_direct_req structure for direct read
+ * @kref: kref object embedded in an nfs_direct_req structure
+ *
+ */
+static void nfs_direct_req_release(struct kref *kref)
+{
+	struct nfs_direct_req *dreq = container_of(kref, struct nfs_direct_req, kref);
+	kmem_cache_free(nfs_direct_cachep, dreq);
+}
+
+/**
+ * nfs_direct_read_alloc - allocate nfs_read_data structures for direct read
+ * @count: count of bytes for the read request
+ * @rsize: local rsize setting
+ *
+ * Note we also set the number of requests we have in the dreq when we are
+ * done.  This prevents races with I/O completion so we will always wait
+ * until all requests have been dispatched and completed.
+ */
+static struct nfs_direct_req *nfs_direct_read_alloc(size_t nbytes, unsigned int rsize)
+{
+	struct list_head *list;
+	struct nfs_direct_req *dreq;
+	unsigned int reads = 0;
+
+	dreq = kmem_cache_alloc(nfs_direct_cachep, SLAB_KERNEL);
+	if (!dreq)
+		return NULL;
+
+	kref_init(&dreq->kref);
+	init_waitqueue_head(&dreq->wait);
+	INIT_LIST_HEAD(&dreq->list);
+	atomic_set(&dreq->count, 0);
+	atomic_set(&dreq->error, 0);
+
+	list = &dreq->list;
+	for(;;) {
+		struct nfs_read_data *data = nfs_readdata_alloc();
+
+		if (unlikely(!data)) {
+			while (!list_empty(list)) {
+				data = list_entry(list->next,
+						  struct nfs_read_data, pages);
+				list_del(&data->pages);
+				nfs_readdata_free(data);
+			}
+			kref_put(&dreq->kref, nfs_direct_req_release);
+			return NULL;
+		}
+
+		INIT_LIST_HEAD(&data->pages);
+		list_add(&data->pages, list);
+
+		data->req = (struct nfs_page *) dreq;
+		reads++;
+		if (nbytes <= rsize)
+			break;
+		nbytes -= rsize;
+	}
+	kref_get(&dreq->kref);
+	atomic_set(&dreq->complete, reads);
+	return dreq;
+}
+
+/**
+ * nfs_direct_read_result - handle a read reply for a direct read request
+ * @data: address of NFS READ operation control block
+ * @status: status of this NFS READ operation
+ *
+ * We must hold a reference to all the pages in this direct read request
+ * until the RPCs complete.  This could be long *after* we are woken up in
+ * nfs_direct_read_wait (for instance, if someone hits ^C on a slow server).
+ */
+static void nfs_direct_read_result(struct nfs_read_data *data, int status)
+{
+	struct nfs_direct_req *dreq = (struct nfs_direct_req *) data->req;
+
+	if (likely(status >= 0))
+		atomic_add(data->res.count, &dreq->count);
+	else
+		atomic_set(&dreq->error, status);
+
+	if (unlikely(atomic_dec_and_test(&dreq->complete))) {
+		nfs_free_user_pages(dreq->pages, dreq->npages, 1);
+		wake_up(&dreq->wait);
+		kref_put(&dreq->kref, nfs_direct_req_release);
+	}
+}
+
+/**
+ * nfs_direct_read_schedule - dispatch NFS READ operations for a direct read
+ * @dreq: address of nfs_direct_req struct for this request
  * @inode: target inode
  * @ctx: target file open context
- * user_addr: starting address of this segment of user's buffer
- * count: size of this segment
- * file_offset: offset in file to begin the operation
- * @pages: array of addresses of page structs defining user's buffer
- * nr_pages: size of pages array
+ * @user_addr: starting address of this segment of user's buffer
+ * @count: size of this segment
+ * @file_offset: offset in file to begin the operation
+ *
+ * For each nfs_read_data struct that was allocated on the list, dispatch
+ * an NFS READ operation
  */
-static int
-nfs_direct_read_seg(struct inode *inode, struct nfs_open_context *ctx,
-		unsigned long user_addr, size_t count, loff_t file_offset,
-		struct page **pages, int nr_pages)
-{
-	const unsigned int rsize = NFS_SERVER(inode)->rsize;
-	int tot_bytes = 0;
-	int curpage = 0;
-	struct nfs_read_data	rdata = {
-		.inode		= inode,
-		.cred		= ctx->cred,
-		.args		= {
-			.fh		= NFS_FH(inode),
-			.context	= ctx,
-		},
-		.res		= {
-			.fattr		= &rdata.fattr,
-		},
-	};
+static void nfs_direct_read_schedule(struct nfs_direct_req *dreq,
+		struct inode *inode, struct nfs_open_context *ctx,
+		unsigned long user_addr, size_t count, loff_t file_offset)
+{
+	struct list_head *list = &dreq->list;
+	struct page **pages = dreq->pages;
+	unsigned int curpage, pgbase;
+	unsigned int rsize = NFS_SERVER(inode)->rsize;
 
-	rdata.args.pgbase = user_addr & ~PAGE_MASK;
-	rdata.args.offset = file_offset;
-        do {
-		int result;
-
-		rdata.args.count = count;
-                if (rdata.args.count > rsize)
-                        rdata.args.count = rsize;
-		rdata.args.pages = &pages[curpage];
-
-		dprintk("NFS: direct read: c=%u o=%Ld ua=%lu, pb=%u, cp=%u\n",
-			rdata.args.count, (long long) rdata.args.offset,
-			user_addr + tot_bytes, rdata.args.pgbase, curpage);
+	curpage = 0;
+	pgbase = user_addr & ~PAGE_MASK;
+	do {
+		struct nfs_read_data *data;
+		unsigned int bytes;
+
+		bytes = rsize;
+		if (count < rsize)
+			bytes = count;
+
+		data = list_entry(list->next, struct nfs_read_data, pages);
+		list_del_init(&data->pages);
+
+		data->inode = inode;
+		data->cred = ctx->cred;
+		data->args.fh = NFS_FH(inode);
+		data->args.context = ctx;
+		data->args.offset = file_offset;
+		data->args.pgbase = pgbase;
+		data->args.pages = &pages[curpage];
+		data->args.count = bytes;
+		data->res.fattr = &data->fattr;
+		data->res.eof = 0;
+		data->res.count = bytes;
+
+		NFS_PROTO(inode)->read_setup(data);
+
+		data->task.tk_cookie = (unsigned long) inode;
+		data->task.tk_calldata = data;
+		data->task.tk_release = nfs_readdata_release;
+		data->complete = nfs_direct_read_result;
 
 		lock_kernel();
-		result = NFS_PROTO(inode)->read(&rdata);
+		rpc_execute(&data->task);
 		unlock_kernel();
 
-		if (result <= 0) {
-			if (tot_bytes > 0)
-				break;
-			if (result == -EISDIR)
-				result = -EINVAL;
-			return result;
-		}
-
-                tot_bytes += result;
-		if (rdata.res.eof)
-			break;
+		dfprintk(VFS, "NFS: %4d initiated direct read call (req %s/%Ld, %u bytes @ offset %Lu)\n",
+				data->task.tk_pid,
+				inode->i_sb->s_id,
+				(long long)NFS_FILEID(inode),
+				bytes,
+				(unsigned long long)data->args.offset);
+
+		file_offset += bytes;
+		pgbase += bytes;
+		curpage += pgbase >> PAGE_SHIFT;
+		pgbase &= ~PAGE_MASK;
 
-                rdata.args.offset += result;
-		rdata.args.pgbase += result;
-		curpage += rdata.args.pgbase >> PAGE_SHIFT;
-		rdata.args.pgbase &= ~PAGE_MASK;
-		count -= result;
+		count -= bytes;
 	} while (count != 0);
+}
 
-	/* XXX: should we zero the rest of the user's buffer if we
-	 *      hit eof? */
+/**
+ * nfs_direct_read_wait - wait for I/O completion for direct reads
+ * @dreq: request on which we are to wait
+ * @intr: whether or not this wait can be interrupted
+ *
+ * Collects and returns the final error value/byte-count.
+ */
+static ssize_t nfs_direct_read_wait(struct nfs_direct_req *dreq, int intr)
+{
+	int result = 0;
 
-	return tot_bytes;
+	if (intr) {
+		result = wait_event_interruptible(dreq->wait,
+					(atomic_read(&dreq->complete) == 0));
+	} else {
+		wait_event(dreq->wait, (atomic_read(&dreq->complete) == 0));
+	}
+
+	if (!result)
+		result = atomic_read(&dreq->error);
+	if (!result)
+		result = atomic_read(&dreq->count);
+
+	kref_put(&dreq->kref, nfs_direct_req_release);
+	return (ssize_t) result;
+}
+
+/**
+ * nfs_direct_read_seg - Read in one iov segment.  Generate separate
+ *                        read RPCs for each "rsize" bytes.
+ * @inode: target inode
+ * @ctx: target file open context
+ * @user_addr: starting address of this segment of user's buffer
+ * @count: size of this segment
+ * @file_offset: offset in file to begin the operation
+ * @pages: array of addresses of page structs defining user's buffer
+ * @nr_pages: number of pages in the array
+ *
+ */
+static ssize_t nfs_direct_read_seg(struct inode *inode,
+		struct nfs_open_context *ctx, unsigned long user_addr,
+		size_t count, loff_t file_offset, struct page **pages,
+		unsigned int nr_pages)
+{
+	ssize_t result;
+	sigset_t oldset;
+	struct rpc_clnt *clnt = NFS_CLIENT(inode);
+	struct nfs_direct_req *dreq;
+
+	dreq = nfs_direct_read_alloc(count, NFS_SERVER(inode)->rsize);
+	if (!dreq)
+		return -ENOMEM;
+
+	dreq->pages = pages;
+	dreq->npages = nr_pages;
+
+	rpc_clnt_sigmask(clnt, &oldset);
+	nfs_direct_read_schedule(dreq, inode, ctx, user_addr, count,
+				 file_offset);
+	result = nfs_direct_read_wait(dreq, clnt->cl_intr);
+	rpc_clnt_sigunmask(clnt, &oldset);
+
+	return result;
 }
 
 /**
@@ -189,9 +366,8 @@
  * file_offset: offset in file to begin the operation
  * nr_segs: size of iovec array
  *
- * generic_file_direct_IO has already pushed out any non-direct
- * writes so that this read will see them when we read from the
- * server.
+ * We've already pushed out any non-direct writes so that this read
+ * will see them when we read from the server.
  */
 static ssize_t
 nfs_direct_read(struct inode *inode, struct nfs_open_context *ctx,
@@ -220,8 +396,6 @@
 		result = nfs_direct_read_seg(inode, ctx, user_addr, size,
 				file_offset, pages, page_count);
 
-		nfs_free_user_pages(pages, page_count, 1);
-
 		if (result <= 0) {
 			if (tot_bytes > 0)
 				break;
@@ -247,31 +421,31 @@
  * @pages: array of addresses of page structs defining user's buffer
  * nr_pages: size of pages array
  */
-static int
-nfs_direct_write_seg(struct inode *inode, struct nfs_open_context *ctx,
-		unsigned long user_addr, size_t count, loff_t file_offset,
-		struct page **pages, int nr_pages)
+static ssize_t nfs_direct_write_seg(struct inode *inode,
+		struct nfs_open_context *ctx, unsigned long user_addr,
+		size_t count, loff_t file_offset, struct page **pages,
+		int nr_pages)
 {
 	const unsigned int wsize = NFS_SERVER(inode)->wsize;
 	size_t request;
-	int curpage, need_commit, result, tot_bytes;
+	int curpage, need_commit;
+	ssize_t result, tot_bytes;
 	struct nfs_writeverf first_verf;
-	struct nfs_write_data	wdata = {
-		.inode		= inode,
-		.cred		= ctx->cred,
-		.args		= {
-			.fh		= NFS_FH(inode),
-			.context	= ctx,
-		},
-		.res		= {
-			.fattr		= &wdata.fattr,
-			.verf		= &wdata.verf,
-		},
-	};
+	struct nfs_write_data *wdata;
 
-	wdata.args.stable = NFS_UNSTABLE;
+	wdata = nfs_writedata_alloc();
+	if (!wdata)
+		return -ENOMEM;
+
+	wdata->inode = inode;
+	wdata->cred = ctx->cred;
+	wdata->args.fh = NFS_FH(inode);
+	wdata->args.context = ctx;
+	wdata->args.stable = NFS_UNSTABLE;
 	if (IS_SYNC(inode) || NFS_PROTO(inode)->version == 2 || count <= wsize)
-		wdata.args.stable = NFS_FILE_SYNC;
+		wdata->args.stable = NFS_FILE_SYNC;
+	wdata->res.fattr = &wdata->fattr;
+	wdata->res.verf = &wdata->verf;
 
 	nfs_begin_data_update(inode);
 retry:
@@ -279,20 +453,20 @@
 	tot_bytes = 0;
 	curpage = 0;
 	request = count;
-	wdata.args.pgbase = user_addr & ~PAGE_MASK;
-	wdata.args.offset = file_offset;
-        do {
-		wdata.args.count = request;
-                if (wdata.args.count > wsize)
-                        wdata.args.count = wsize;
-		wdata.args.pages = &pages[curpage];
+	wdata->args.pgbase = user_addr & ~PAGE_MASK;
+	wdata->args.offset = file_offset;
+	do {
+		wdata->args.count = request;
+		if (wdata->args.count > wsize)
+			wdata->args.count = wsize;
+		wdata->args.pages = &pages[curpage];
 
 		dprintk("NFS: direct write: c=%u o=%Ld ua=%lu, pb=%u, cp=%u\n",
-			wdata.args.count, (long long) wdata.args.offset,
-			user_addr + tot_bytes, wdata.args.pgbase, curpage);
+			wdata->args.count, (long long) wdata->args.offset,
+			user_addr + tot_bytes, wdata->args.pgbase, curpage);
 
 		lock_kernel();
-		result = NFS_PROTO(inode)->write(&wdata);
+		result = NFS_PROTO(inode)->write(wdata);
 		unlock_kernel();
 
 		if (result <= 0) {
@@ -302,20 +476,25 @@
 		}
 
 		if (tot_bytes == 0)
-			memcpy(&first_verf.verifier, &wdata.verf.verifier,
-								VERF_SIZE);
-		if (wdata.verf.committed != NFS_FILE_SYNC) {
+			memcpy(&first_verf.verifier, &wdata->verf.verifier,
+						sizeof(first_verf.verifier));
+		if (wdata->verf.committed != NFS_FILE_SYNC) {
 			need_commit = 1;
-			if (memcmp(&first_verf.verifier,
-					&wdata.verf.verifier, VERF_SIZE))
+			if (memcmp(&first_verf.verifier, &wdata->verf.verifier,
+					sizeof(first_verf.verifier)));
 				goto sync_retry;
 		}
 
-                tot_bytes += result;
-                wdata.args.offset += result;
-		wdata.args.pgbase += result;
-		curpage += wdata.args.pgbase >> PAGE_SHIFT;
-		wdata.args.pgbase &= ~PAGE_MASK;
+		tot_bytes += result;
+
+		/* in case of a short write: stop now, let the app recover */
+		if (result < wdata->args.count)
+			break;
+
+		wdata->args.offset += result;
+		wdata->args.pgbase += result;
+		curpage += wdata->args.pgbase >> PAGE_SHIFT;
+		wdata->args.pgbase &= ~PAGE_MASK;
 		request -= result;
 	} while (request != 0);
 
@@ -323,27 +502,27 @@
 	 * Commit data written so far, even in the event of an error
 	 */
 	if (need_commit) {
-		wdata.args.count = tot_bytes;
-		wdata.args.offset = file_offset;
+		wdata->args.count = tot_bytes;
+		wdata->args.offset = file_offset;
 
 		lock_kernel();
-		result = NFS_PROTO(inode)->commit(&wdata);
+		result = NFS_PROTO(inode)->commit(wdata);
 		unlock_kernel();
 
 		if (result < 0 || memcmp(&first_verf.verifier,
-						&wdata.verf.verifier,
-						VERF_SIZE) != 0)
+					 &wdata->verf.verifier,
+					 sizeof(first_verf.verifier)) != 0)
 			goto sync_retry;
 	}
 	result = tot_bytes;
 
 out:
 	nfs_end_data_update_defer(inode);
-
+	nfs_writedata_free(wdata);
 	return result;
 
 sync_retry:
-	wdata.args.stable = NFS_FILE_SYNC;
+	wdata->args.stable = NFS_FILE_SYNC;
 	goto retry;
 }
 
@@ -360,9 +539,9 @@
  * that non-direct readers might access, so they will pick up these
  * writes immediately.
  */
-static int nfs_direct_write(struct inode *inode, struct nfs_open_context *ctx,
-		const struct iovec *iov, loff_t file_offset,
-		unsigned long nr_segs)
+static ssize_t nfs_direct_write(struct inode *inode,
+		struct nfs_open_context *ctx, const struct iovec *iov,
+		loff_t file_offset, unsigned long nr_segs)
 {
 	ssize_t tot_bytes = 0;
 	unsigned long seg = 0;
@@ -502,6 +681,8 @@
 	if (mapping->nrpages) {
 		retval = filemap_fdatawrite(mapping);
 		if (retval == 0)
+			retval = nfs_wb_all(inode);
+		if (retval == 0)
 			retval = filemap_fdatawait(mapping);
 		if (retval)
 			goto out;
@@ -591,6 +772,8 @@
 	if (mapping->nrpages) {
 		retval = filemap_fdatawrite(mapping);
 		if (retval == 0)
+			retval = nfs_wb_all(inode);
+		if (retval == 0)
 			retval = filemap_fdatawait(mapping);
 		if (retval)
 			goto out;
@@ -604,4 +787,22 @@
 
 out:
 	return retval;
+}
+
+int nfs_init_directcache(void)
+{
+	nfs_direct_cachep = kmem_cache_create("nfs_direct_cache",
+						sizeof(struct nfs_direct_req),
+						0, SLAB_RECLAIM_ACCOUNT,
+						NULL, NULL);
+	if (nfs_direct_cachep == NULL)
+		return -ENOMEM;
+
+	return 0;
+}
+
+void nfs_destroy_directcache(void)
+{
+	if (kmem_cache_destroy(nfs_direct_cachep))
+		printk(KERN_INFO "nfs_direct_cache: not all structures were freed\n");
 }
diff -Nru a/fs/nfs/file.c b/fs/nfs/file.c
--- a/fs/nfs/file.c	2005-01-10 20:11:20 -08:00
+++ b/fs/nfs/file.c	2005-01-10 20:11:20 -08:00
@@ -295,10 +295,19 @@
 static int do_getlk(struct file *filp, int cmd, struct file_lock *fl)
 {
 	struct inode *inode = filp->f_mapping->host;
-	int status;
+	int status = 0;
 
 	lock_kernel();
-	status = NFS_PROTO(inode)->lock(filp, cmd, fl);
+	/* Use local locking if mounted with "-onolock" */
+	if (!(NFS_SERVER(inode)->flags & NFS_MOUNT_NONLM))
+		status = NFS_PROTO(inode)->lock(filp, cmd, fl);
+	else {
+		struct file_lock *cfl = posix_test_lock(filp, fl);
+		if (cfl != NULL) {
+			memcpy(fl, cfl, sizeof(*fl));
+			fl->fl_type = F_UNLCK;
+		}
+	}
 	unlock_kernel();
 	return status;
 }
@@ -325,7 +334,11 @@
 	 * 	still need to complete the unlock.
 	 */
 	lock_kernel();
-	status = NFS_PROTO(inode)->lock(filp, cmd, fl);
+	/* Use local locking if mounted with "-onolock" */
+	if (!(NFS_SERVER(inode)->flags & NFS_MOUNT_NONLM))
+		status = NFS_PROTO(inode)->lock(filp, cmd, fl);
+	else
+		status = posix_lock_file_wait(filp, fl);
 	rpc_clnt_sigunmask(NFS_CLIENT(inode), &oldset);
 	return status;
 }
@@ -351,15 +364,19 @@
 		return status;
 
 	lock_kernel();
-	status = NFS_PROTO(inode)->lock(filp, cmd, fl);
-	/* If we were signalled we still need to ensure that
-	 * we clean up any state on the server. We therefore
-	 * record the lock call as having succeeded in order to
-	 * ensure that locks_remove_posix() cleans it out when
-	 * the process exits.
-	 */
-	if (status == -EINTR || status == -ERESTARTSYS)
-		posix_lock_file(filp, fl);
+	/* Use local locking if mounted with "-onolock" */
+	if (!(NFS_SERVER(inode)->flags & NFS_MOUNT_NONLM)) {
+		status = NFS_PROTO(inode)->lock(filp, cmd, fl);
+		/* If we were signalled we still need to ensure that
+		 * we clean up any state on the server. We therefore
+		 * record the lock call as having succeeded in order to
+		 * ensure that locks_remove_posix() cleans it out when
+		 * the process exits.
+		 */
+		if (status == -EINTR || status == -ERESTARTSYS)
+			posix_lock_file(filp, fl);
+	} else
+		status = posix_lock_file_wait(filp, fl);
 	unlock_kernel();
 	if (status < 0)
 		return status;
@@ -395,15 +412,6 @@
 	/* No mandatory locks over NFS */
 	if ((inode->i_mode & (S_ISGID | S_IXGRP)) == S_ISGID)
 		return -ENOLCK;
-
-	if (NFS_PROTO(inode)->version != 4) {
-		/* Fake OK code if mounted without NLM support */
-		if (NFS_SERVER(inode)->flags & NFS_MOUNT_NONLM) {
-			if (IS_GETLK(cmd))
-				return LOCK_USE_CLNT;
-			return 0;
-		}
-	}
 
 	/*
 	 * No BSD flocks over NFS allowed.
diff -Nru a/fs/nfs/inode.c b/fs/nfs/inode.c
--- a/fs/nfs/inode.c	2005-01-10 20:11:21 -08:00
+++ b/fs/nfs/inode.c	2005-01-10 20:11:21 -08:00
@@ -457,6 +457,7 @@
 	if (server->flags & NFS_MOUNT_VER3) {
 		if (server->namelen == 0 || server->namelen > NFS3_MAXNAMLEN)
 			server->namelen = NFS3_MAXNAMLEN;
+		sb->s_time_gran = 1;
 	} else {
 		if (server->namelen == 0 || server->namelen > NFS2_MAXNAMLEN)
 			server->namelen = NFS2_MAXNAMLEN;
@@ -486,13 +487,27 @@
 	if (error < 0)
 		goto out_err;
 
-	buf->f_frsize = server->wtmult;
+	/*
+	 * Current versions of glibc do not correctly handle the
+	 * case where f_frsize != f_bsize.  Eventually we want to
+	 * report the value of wtmult in this field.
+	 */
+	buf->f_frsize = sb->s_blocksize;
+
+	/*
+	 * On most *nix systems, f_blocks, f_bfree, and f_bavail
+	 * are reported in units of f_frsize.  Linux hasn't had
+	 * an f_frsize field in its statfs struct until recently,
+	 * thus historically Linux's sys_statfs reports these
+	 * fields in units of f_bsize.
+	 */
 	buf->f_bsize = sb->s_blocksize;
 	blockbits = sb->s_blocksize_bits;
 	blockres = (1 << blockbits) - 1;
 	buf->f_blocks = (res.tbytes + blockres) >> blockbits;
 	buf->f_bfree = (res.fbytes + blockres) >> blockbits;
 	buf->f_bavail = (res.abytes + blockres) >> blockbits;
+
 	buf->f_files = res.tfiles;
 	buf->f_ffree = res.afiles;
 
@@ -565,9 +580,9 @@
 
 	memset(NFS_COOKIEVERF(inode), 0, sizeof(NFS_COOKIEVERF(inode)));
 	if (S_ISREG(mode) || S_ISDIR(mode) || S_ISLNK(mode))
-		nfsi->flags |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_DATA;
+		nfsi->flags |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_DATA|NFS_INO_INVALID_ACCESS;
 	else
-		nfsi->flags |= NFS_INO_INVALID_ATTR;
+		nfsi->flags |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_ACCESS;
 }
 
 /*
@@ -605,7 +620,7 @@
 		return 0;
 	if (nfs_compare_fh(NFS_FH(inode), fh))
 		return 0;
-	if (is_bad_inode(inode))
+	if (is_bad_inode(inode) || NFS_STALE(inode))
 		return 0;
 	return 1;
 }
@@ -766,13 +781,8 @@
 			vmtruncate(inode, attr->ia_size);
 		}
 	}
-	if ((attr->ia_valid & (ATTR_MODE|ATTR_UID|ATTR_GID)) != 0) {
-		struct rpc_cred **cred = &NFS_I(inode)->cache_access.cred;
-		if (*cred) {
-			put_rpccred(*cred);
-			*cred = NULL;
-		}
-	}
+	if ((attr->ia_valid & (ATTR_MODE|ATTR_UID|ATTR_GID)) != 0)
+		NFS_FLAGS(inode) |= NFS_INO_INVALID_ACCESS;
 	nfs_end_data_update(inode);
 	unlock_kernel();
 	return error;
@@ -949,14 +959,14 @@
 	lock_kernel();
 	if (!inode || is_bad_inode(inode))
  		goto out_nowait;
-	if (NFS_STALE(inode) && inode != inode->i_sb->s_root->d_inode)
+	if (NFS_STALE(inode))
  		goto out_nowait;
 
 	while (NFS_REVALIDATING(inode)) {
 		status = nfs_wait_on_inode(inode, NFS_INO_REVALIDATING);
 		if (status < 0)
 			goto out_nowait;
-		if (NFS_SERVER(inode)->flags & NFS_MOUNT_NOAC)
+		if (NFS_ATTRTIMEO(inode) == 0)
 			continue;
 		if (NFS_FLAGS(inode) & (NFS_INO_INVALID_ATTR|NFS_INO_INVALID_DATA|NFS_INO_INVALID_ATIME))
 			continue;
@@ -968,14 +978,14 @@
 	/* Protect against RPC races by saving the change attribute */
 	verifier = nfs_save_change_attribute(inode);
 	status = NFS_PROTO(inode)->getattr(server, NFS_FH(inode), &fattr);
-	if (status) {
+	if (status != 0) {
 		dfprintk(PAGECACHE, "nfs_revalidate_inode: (%s/%Ld) getattr failed, error=%d\n",
 			 inode->i_sb->s_id,
 			 (long long)NFS_FILEID(inode), status);
 		if (status == -ESTALE) {
-			NFS_FLAGS(inode) |= NFS_INO_STALE;
-			if (inode != inode->i_sb->s_root->d_inode)
-				remove_inode_hash(inode);
+			nfs_zap_caches(inode);
+			if (!S_ISDIR(inode->i_mode))
+				NFS_FLAGS(inode) |= NFS_INO_STALE;
 		}
 		goto out;
 	}
@@ -1014,7 +1024,6 @@
 		inode->i_sb->s_id,
 		(long long)NFS_FILEID(inode));
 
-	NFS_FLAGS(inode) &= ~NFS_INO_STALE;
 out:
 	NFS_FLAGS(inode) &= ~NFS_INO_REVALIDATING;
 	wake_up(&nfsi->nfs_i_wait);
@@ -1161,7 +1170,7 @@
 	if ((inode->i_mode & S_IALLUGO) != (fattr->mode & S_IALLUGO)
 			|| inode->i_uid != fattr->uid
 			|| inode->i_gid != fattr->gid)
-		nfsi->flags |= NFS_INO_INVALID_ATTR;
+		nfsi->flags |= NFS_INO_INVALID_ATTR | NFS_INO_INVALID_ACCESS;
 
 	/* Has the link count changed? */
 	if (inode->i_nlink != fattr->nlink)
@@ -1270,7 +1279,7 @@
 #endif
 		nfsi->change_attr = fattr->change_attr;
 		if (!data_unstable)
-			invalid |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_DATA;
+			invalid |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_DATA|NFS_INO_INVALID_ACCESS;
 	}
 
 	memcpy(&inode->i_ctime, &fattr->ctime, sizeof(inode->i_ctime));
@@ -1278,14 +1287,8 @@
 
 	if ((inode->i_mode & S_IALLUGO) != (fattr->mode & S_IALLUGO) ||
 	    inode->i_uid != fattr->uid ||
-	    inode->i_gid != fattr->gid) {
-		struct rpc_cred **cred = &NFS_I(inode)->cache_access.cred;
-		if (*cred) {
-			put_rpccred(*cred);
-			*cred = NULL;
-		}
-		invalid |= NFS_INO_INVALID_ATTR;
-	}
+	    inode->i_gid != fattr->gid)
+		invalid |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_ACCESS;
 
 	inode->i_mode = fattr->mode;
 	inode->i_nlink = fattr->nlink;
@@ -1335,7 +1338,8 @@
 	 */
 	nfs_invalidate_inode(inode);
  out_err:
-	return -EIO;
+	NFS_FLAGS(inode) |= NFS_INO_STALE;
+	return -ESTALE;
 }
 
 /*
@@ -1449,8 +1453,6 @@
 
 	kill_anon_super(s);
 
-	nfs4_renewd_prepare_shutdown(server);
-
 	if (server->client != NULL && !IS_ERR(server->client))
 		rpc_shutdown_client(server->client);
 	if (server->client_sys != NULL && !IS_ERR(server->client_sys))
@@ -1461,8 +1463,6 @@
 
 	rpciod_down();		/* release rpciod */
 
-	destroy_nfsv4_state(server);
-
 	if (server->hostname != NULL)
 		kfree(server->hostname);
 	kfree(server);
@@ -1543,9 +1543,6 @@
 		server->wsize = nfs_block_size(data->wsize, NULL);
 	server->flags = data->flags & NFS_MOUNT_FLAGMASK;
 
-	/* NFSv4 doesn't use NLM locking */
-	server->flags |= NFS_MOUNT_NONLM;
-
 	server->acregmin = data->acregmin*HZ;
 	server->acregmax = data->acregmax*HZ;
 	server->acdirmin = data->acdirmin*HZ;
@@ -1653,6 +1650,8 @@
 		}
 	}
 
+	sb->s_time_gran = 1;
+
 	sb->s_op = &nfs4_sops;
 	err = nfs_sb_init(sb, authflavour);
 	if (err == 0)
@@ -1790,8 +1789,22 @@
 
 static void nfs4_kill_super(struct super_block *sb)
 {
+	struct nfs_server *server = NFS_SB(sb);
+
 	nfs_return_all_delegations(sb);
-	nfs_kill_super(sb);
+	kill_anon_super(sb);
+
+	nfs4_renewd_prepare_shutdown(server);
+
+	if (server->client != NULL && !IS_ERR(server->client))
+		rpc_shutdown_client(server->client);
+	rpciod_down();		/* release rpciod */
+
+	destroy_nfsv4_state(server);
+
+	if (server->hostname != NULL)
+		kfree(server->hostname);
+	kfree(server);
 }
 
 static struct file_system_type nfs4_fs_type = {
@@ -1821,9 +1834,13 @@
 extern int nfs_init_nfspagecache(void);
 extern void nfs_destroy_nfspagecache(void);
 extern int nfs_init_readpagecache(void);
-extern int nfs_destroy_readpagecache(void);
+extern void nfs_destroy_readpagecache(void);
 extern int nfs_init_writepagecache(void);
-extern int nfs_destroy_writepagecache(void);
+extern void nfs_destroy_writepagecache(void);
+#ifdef CONFIG_NFS_DIRECTIO
+extern int nfs_init_directcache(void);
+extern void nfs_destroy_directcache(void);
+#endif
 
 static kmem_cache_t * nfs_inode_cachep;
 
@@ -1904,6 +1921,12 @@
 	if (err)
 		goto out1;
 
+#ifdef CONFIG_NFS_DIRECTIO
+	err = nfs_init_directcache();
+	if (err)
+		goto out0;
+#endif
+
 #ifdef CONFIG_PROC_FS
 	rpc_proc_register(&nfs_rpcstat);
 #endif
@@ -1914,8 +1937,14 @@
 		goto out;
 	return 0;
 out:
+#ifdef CONFIG_PROC_FS
 	rpc_proc_unregister("nfs");
+#endif
 	nfs_destroy_writepagecache();
+#ifdef CONFIG_NFS_DIRECTIO
+out0:
+	nfs_destroy_directcache();
+#endif
 out1:
 	nfs_destroy_readpagecache();
 out2:
@@ -1928,6 +1957,9 @@
 
 static void __exit exit_nfs_fs(void)
 {
+#ifdef CONFIG_NFS_DIRECTIO
+	nfs_destroy_directcache();
+#endif
 	nfs_destroy_writepagecache();
 	nfs_destroy_readpagecache();
 	nfs_destroy_inodecache();
diff -Nru a/fs/nfs/nfs3proc.c b/fs/nfs/nfs3proc.c
--- a/fs/nfs/nfs3proc.c	2005-01-10 20:11:19 -08:00
+++ b/fs/nfs/nfs3proc.c	2005-01-10 20:11:19 -08:00
@@ -80,10 +80,10 @@
 	dprintk("%s: call  fsinfo\n", __FUNCTION__);
 	info->fattr->valid = 0;
 	status = rpc_call(server->client_sys, NFS3PROC_FSINFO, fhandle, info, 0);
-	dprintk("%s: reply fsinfo %d\n", __FUNCTION__, status);
+	dprintk("%s: reply fsinfo: %d\n", __FUNCTION__, status);
 	if (!(info->fattr->valid & NFS_ATTR_FATTR)) {
 		status = rpc_call(server->client_sys, NFS3PROC_GETATTR, fhandle, info->fattr, 0);
-		dprintk("%s: reply getattr %d\n", __FUNCTION__, status);
+		dprintk("%s: reply getattr: %d\n", __FUNCTION__, status);
 	}
 	return status;
 }
@@ -101,7 +101,7 @@
 	fattr->valid = 0;
 	status = rpc_call(server->client, NFS3PROC_GETATTR,
 			  fhandle, fattr, 0);
-	dprintk("NFS reply getattr\n");
+	dprintk("NFS reply getattr: %d\n", status);
 	return status;
 }
 
@@ -119,7 +119,7 @@
 	dprintk("NFS call  setattr\n");
 	fattr->valid = 0;
 	status = rpc_call(NFS_CLIENT(inode), NFS3PROC_SETATTR, &arg, fattr, 0);
-	dprintk("NFS reply setattr\n");
+	dprintk("NFS reply setattr: %d\n", status);
 	return status;
 }
 
@@ -198,7 +198,7 @@
 		if (res.access & (NFS3_ACCESS_LOOKUP|NFS3_ACCESS_EXECUTE))
 			entry->mask |= MAY_EXEC;
 	}
-	dprintk("NFS reply access, status = %d\n", status);
+	dprintk("NFS reply access: %d\n", status);
 	return status;
 }
 
@@ -296,7 +296,7 @@
  * For now, we don't implement O_EXCL.
  */
 static struct inode *
-nfs3_proc_create(struct inode *dir, struct qstr *name, struct iattr *sattr,
+nfs3_proc_create(struct inode *dir, struct dentry *dentry, struct iattr *sattr,
 		 int flags)
 {
 	struct nfs_fh		fhandle;
@@ -304,8 +304,8 @@
 	struct nfs_fattr	dir_attr;
 	struct nfs3_createargs	arg = {
 		.fh		= NFS_FH(dir),
-		.name		= name->name,
-		.len		= name->len,
+		.name		= dentry->d_name.name,
+		.len		= dentry->d_name.len,
 		.sattr		= sattr,
 	};
 	struct nfs3_diropres	res = {
@@ -315,7 +315,7 @@
 	};
 	int			status;
 
-	dprintk("NFS call  create %s\n", name->name);
+	dprintk("NFS call  create %s\n", dentry->d_name.name);
 	arg.createmode = NFS3_CREATE_UNCHECKED;
 	if (flags & O_EXCL) {
 		arg.createmode  = NFS3_CREATE_EXCLUSIVE;
@@ -353,7 +353,7 @@
 	if (status != 0)
 		goto out;
 	if (fhandle.size == 0 || !(fattr.valid & NFS_ATTR_FATTR)) {
-		status = nfs3_proc_lookup(dir, name, &fhandle, &fattr);
+		status = nfs3_proc_lookup(dir, &dentry->d_name, &fhandle, &fattr);
 		if (status != 0)
 			goto out;
 	}
diff -Nru a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
--- a/fs/nfs/nfs4proc.c	2005-01-10 20:11:21 -08:00
+++ b/fs/nfs/nfs4proc.c	2005-01-10 20:11:21 -08:00
@@ -477,7 +477,7 @@
 /*
  * Returns an nfs4_state + an referenced inode
  */
-static int _nfs4_do_open(struct inode *dir, struct qstr *name, int flags, struct iattr *sattr, struct rpc_cred *cred, struct nfs4_state **res)
+static int _nfs4_do_open(struct inode *dir, struct dentry *dentry, int flags, struct iattr *sattr, struct rpc_cred *cred, struct nfs4_state **res)
 {
 	struct nfs4_state_owner  *sp;
 	struct nfs4_state     *state = NULL;
@@ -491,7 +491,7 @@
 	struct nfs_openargs o_arg = {
 		.fh             = NFS_FH(dir),
 		.open_flags	= flags,
-		.name           = name,
+		.name           = &dentry->d_name,
 		.server         = server,
 		.bitmask = server->attr_bitmask,
 		.claim = NFS4_OPEN_CLAIM_NULL,
@@ -581,14 +581,14 @@
 }
 
 
-struct nfs4_state *nfs4_do_open(struct inode *dir, struct qstr *name, int flags, struct iattr *sattr, struct rpc_cred *cred)
+struct nfs4_state *nfs4_do_open(struct inode *dir, struct dentry *dentry, int flags, struct iattr *sattr, struct rpc_cred *cred)
 {
 	struct nfs4_exception exception = { };
 	struct nfs4_state *res;
 	int status;
 
 	do {
-		status = _nfs4_do_open(dir, name, flags, sattr, cred, &res);
+		status = _nfs4_do_open(dir, dentry, flags, sattr, cred, &res);
 		if (status == 0)
 			break;
 		/* NOTE: BAD_SEQID means the server and client disagree about the
@@ -635,6 +635,8 @@
 
         fattr->valid = 0;
 
+	if (state != NULL)
+		msg.rpc_cred = state->owner->so_cred;
 	if (sattr->ia_valid & ATTR_SIZE)
 		nfs4_copy_stateid(&arg.stateid, state, NULL);
 	else
@@ -658,6 +660,61 @@
 	return err;
 }
 
+struct nfs4_closedata {
+	struct inode *inode;
+	struct nfs4_state *state;
+	struct nfs_closeargs arg;
+	struct nfs_closeres res;
+};
+
+static void nfs4_close_done(struct rpc_task *task)
+{
+	struct nfs4_closedata *calldata = (struct nfs4_closedata *)task->tk_calldata;
+	struct nfs4_state *state = calldata->state;
+	struct nfs4_state_owner *sp = state->owner;
+	struct nfs_server *server = NFS_SERVER(calldata->inode);
+
+        /* hmm. we are done with the inode, and in the process of freeing
+	 * the state_owner. we keep this around to process errors
+	 */
+	nfs4_increment_seqid(task->tk_status, sp);
+	switch (task->tk_status) {
+		case 0:
+			state->state = calldata->arg.open_flags;
+			memcpy(&state->stateid, &calldata->res.stateid,
+					sizeof(state->stateid));
+			break;
+		case -NFS4ERR_STALE_STATEID:
+		case -NFS4ERR_EXPIRED:
+			state->state = calldata->arg.open_flags;
+			nfs4_schedule_state_recovery(server->nfs4_state);
+			break;
+		default:
+			if (nfs4_async_handle_error(task, server) == -EAGAIN) {
+				rpc_restart_call(task);
+				return;
+			}
+	}
+	nfs4_put_open_state(state);
+	up(&sp->so_sema);
+	nfs4_put_state_owner(sp);
+	up_read(&server->nfs4_state->cl_sem);
+	kfree(calldata);
+}
+
+static inline int nfs4_close_call(struct rpc_clnt *clnt, struct nfs4_closedata *calldata)
+{
+	struct rpc_message msg = {
+		.rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_CLOSE],
+		.rpc_argp = &calldata->arg,
+		.rpc_resp = &calldata->res,
+		.rpc_cred = calldata->state->owner->so_cred,
+	};
+	if (calldata->arg.open_flags != 0)
+		msg.rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_OPEN_DOWNGRADE];
+	return rpc_call_async(clnt, &msg, 0, nfs4_close_done, calldata);
+}
+
 /* 
  * It is possible for data to be read/written from a mem-mapped file 
  * after the sys_close call (which hits the vfs layer as a flush).
@@ -669,102 +726,34 @@
  *
  * NOTE: Caller must be holding the sp->so_owner semaphore!
  */
-static int _nfs4_do_close(struct inode *inode, struct nfs4_state *state) 
+int nfs4_do_close(struct inode *inode, struct nfs4_state *state, mode_t mode) 
 {
-	struct nfs4_state_owner *sp = state->owner;
-	int status = 0;
-	struct nfs_closeargs arg = {
-		.fh		= NFS_FH(inode),
-	};
-	struct nfs_closeres res;
-	struct rpc_message msg = {
-		.rpc_proc	= &nfs4_procedures[NFSPROC4_CLNT_CLOSE],
-		.rpc_argp	= &arg,
-		.rpc_resp	= &res,
-	};
+	struct nfs4_closedata *calldata;
+	int status;
 
-	if (test_bit(NFS_DELEGATED_STATE, &state->flags))
+	/* Tell caller we're done */
+	if (test_bit(NFS_DELEGATED_STATE, &state->flags)) {
+		state->state = mode;
 		return 0;
-	memcpy(&arg.stateid, &state->stateid, sizeof(arg.stateid));
+	}
+	calldata = (struct nfs4_closedata *)kmalloc(sizeof(*calldata), GFP_KERNEL);
+	if (calldata == NULL)
+		return -ENOMEM;
+	calldata->inode = inode;
+	calldata->state = state;
+	calldata->arg.fh = NFS_FH(inode);
 	/* Serialization for the sequence id */
-	arg.seqid = sp->so_seqid,
-	status = rpc_call_sync(NFS_SERVER(inode)->client, &msg, RPC_TASK_NOINTR);
-
-        /* hmm. we are done with the inode, and in the process of freeing
-	 * the state_owner. we keep this around to process errors
+	calldata->arg.seqid = state->owner->so_seqid;
+	calldata->arg.open_flags = mode;
+	memcpy(&calldata->arg.stateid, &state->stateid,
+			sizeof(calldata->arg.stateid));
+	status = nfs4_close_call(NFS_SERVER(inode)->client, calldata);
+	/*
+	 * Return -EINPROGRESS on success in order to indicate to the
+	 * caller that an asynchronous RPC call has been launched, and
+	 * that it will release the semaphores on completion.
 	 */
-	nfs4_increment_seqid(status, sp);
-	if (!status)
-		memcpy(&state->stateid, &res.stateid, sizeof(state->stateid));
-
-	return status;
-}
-
-int nfs4_do_close(struct inode *inode, struct nfs4_state *state) 
-{
-	struct nfs_server *server = NFS_SERVER(state->inode);
-	struct nfs4_exception exception = { };
-	int err;
-	do {
-		err = _nfs4_do_close(inode, state);
-		switch (err) {
-			case -NFS4ERR_STALE_STATEID:
-			case -NFS4ERR_EXPIRED:
-				nfs4_schedule_state_recovery(server->nfs4_state);
-				err = 0;
-			default:
-				state->state = 0;
-		}
-		err = nfs4_handle_exception(server, err, &exception);
-	} while (exception.retry);
-	return err;
-}
-
-static int _nfs4_do_downgrade(struct inode *inode, struct nfs4_state *state, mode_t mode) 
-{
-	struct nfs4_state_owner *sp = state->owner;
-	int status = 0;
-	struct nfs_closeargs arg = {
-		.fh		= NFS_FH(inode),
-		.seqid		= sp->so_seqid,
-		.open_flags	= mode,
-	};
-	struct nfs_closeres res;
-	struct rpc_message msg = {
-		.rpc_proc	= &nfs4_procedures[NFSPROC4_CLNT_OPEN_DOWNGRADE],
-		.rpc_argp	= &arg,
-		.rpc_resp	= &res,
-	};
-
-	if (test_bit(NFS_DELEGATED_STATE, &state->flags))
-		return 0;
-	memcpy(&arg.stateid, &state->stateid, sizeof(arg.stateid));
-	status = rpc_call_sync(NFS_SERVER(inode)->client, &msg, RPC_TASK_NOINTR);
-	nfs4_increment_seqid(status, sp);
-	if (!status)
-		memcpy(&state->stateid, &res.stateid, sizeof(state->stateid));
-
-	return status;
-}
-
-int nfs4_do_downgrade(struct inode *inode, struct nfs4_state *state, mode_t mode) 
-{
-	struct nfs_server *server = NFS_SERVER(state->inode);
-	struct nfs4_exception exception = { };
-	int err;
-	do {
-		err = _nfs4_do_downgrade(inode, state, mode);
-		switch (err) {
-			case -NFS4ERR_STALE_STATEID:
-			case -NFS4ERR_EXPIRED:
-				nfs4_schedule_state_recovery(server->nfs4_state);
-				err = 0;
-			default:
-				state->state = mode;
-		}
-		err = nfs4_handle_exception(server, err, &exception);
-	} while (exception.retry);
-	return err;
+	return (status == 0) ? -EINPROGRESS : status;
 }
 
 struct inode *
@@ -785,7 +774,7 @@
 	}
 
 	cred = rpcauth_lookupcred(NFS_SERVER(dir)->client->cl_auth, 0);
-	state = nfs4_do_open(dir, &dentry->d_name, nd->intent.open.flags, &attr, cred);
+	state = nfs4_do_open(dir, dentry, nd->intent.open.flags, &attr, cred);
 	put_rpccred(cred);
 	if (IS_ERR(state))
 		return (struct inode *)state;
@@ -802,7 +791,7 @@
 	cred = rpcauth_lookupcred(NFS_SERVER(dir)->client->cl_auth, 0);
 	state = nfs4_open_delegated(dentry->d_inode, openflags, cred);
 	if (IS_ERR(state))
-		state = nfs4_do_open(dir, &dentry->d_name, openflags, NULL, cred);
+		state = nfs4_do_open(dir, dentry, openflags, NULL, cred);
 	put_rpccred(cred);
 	if (state == ERR_PTR(-ENOENT) && dentry->d_inode == 0)
 		return 1;
@@ -1026,7 +1015,7 @@
 					FMODE_WRITE, cred);
 			if (IS_ERR(state))
 				state = nfs4_do_open(dentry->d_parent->d_inode,
-						&dentry->d_name, FMODE_WRITE,
+						dentry, FMODE_WRITE,
 						NULL, cred);
 			need_iput = 1;
 		}
@@ -1327,7 +1316,7 @@
  */
 
 static struct inode *
-nfs4_proc_create(struct inode *dir, struct qstr *name, struct iattr *sattr,
+nfs4_proc_create(struct inode *dir, struct dentry *dentry, struct iattr *sattr,
                  int flags)
 {
 	struct inode *inode;
@@ -1335,7 +1324,7 @@
 	struct rpc_cred *cred;
 
 	cred = rpcauth_lookupcred(NFS_SERVER(dir)->client->cl_auth, 0);
-	state = nfs4_do_open(dir, name, flags, sattr, cred);
+	state = nfs4_do_open(dir, dentry, flags, sattr, cred);
 	put_rpccred(cred);
 	if (!IS_ERR(state)) {
 		inode = state->inode;
diff -Nru a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
--- a/fs/nfs/nfs4state.c	2005-01-10 20:11:15 -08:00
+++ b/fs/nfs/nfs4state.c	2005-01-10 20:11:15 -08:00
@@ -445,7 +445,7 @@
 		state->owner = owner;
 		atomic_inc(&owner->so_count);
 		list_add(&state->inode_states, &nfsi->open_states);
-		state->inode = inode;
+		state->inode = igrab(inode);
 		spin_unlock(&inode->i_lock);
 	} else {
 		spin_unlock(&inode->i_lock);
@@ -471,6 +471,7 @@
 		list_del(&state->inode_states);
 	spin_unlock(&inode->i_lock);
 	list_del(&state->open_states);
+	iput(inode);
 	BUG_ON (state->state != 0);
 	nfs4_free_open_state(state);
 	nfs4_put_state_owner(owner);
@@ -486,7 +487,6 @@
 	struct nfs4_state_owner *owner = state->owner;
 	struct nfs4_client *clp = owner->so_client;
 	int newstate;
-	int status = 0;
 
 	atomic_inc(&owner->so_count);
 	down_read(&clp->cl_sem);
@@ -508,10 +508,8 @@
 			newstate |= FMODE_WRITE;
 		if (state->state == newstate)
 			goto out;
-		if (newstate != 0)
-			status = nfs4_do_downgrade(inode, state, newstate);
-		else
-			status = nfs4_do_close(inode, state);
+		if (nfs4_do_close(inode, state, newstate) == -EINPROGRESS)
+			return;
 	}
 out:
 	nfs4_put_open_state(state);
diff -Nru a/fs/nfs/proc.c b/fs/nfs/proc.c
--- a/fs/nfs/proc.c	2005-01-10 20:11:22 -08:00
+++ b/fs/nfs/proc.c	2005-01-10 20:11:22 -08:00
@@ -63,12 +63,12 @@
 	dprintk("%s: call getattr\n", __FUNCTION__);
 	fattr->valid = 0;
 	status = rpc_call(server->client_sys, NFSPROC_GETATTR, fhandle, fattr, 0);
-	dprintk("%s: reply getattr %d\n", __FUNCTION__, status);
+	dprintk("%s: reply getattr: %d\n", __FUNCTION__, status);
 	if (status)
 		return status;
 	dprintk("%s: call statfs\n", __FUNCTION__);
 	status = rpc_call(server->client_sys, NFSPROC_STATFS, fhandle, &fsinfo, 0);
-	dprintk("%s: reply statfs %d\n", __FUNCTION__, status);
+	dprintk("%s: reply statfs: %d\n", __FUNCTION__, status);
 	if (status)
 		return status;
 	info->rtmax  = NFS_MAXDATA;
@@ -96,7 +96,7 @@
 	fattr->valid = 0;
 	status = rpc_call(server->client, NFSPROC_GETATTR,
 				fhandle, fattr, 0);
-	dprintk("NFS reply getattr\n");
+	dprintk("NFS reply getattr: %d\n", status);
 	return status;
 }
 
@@ -114,7 +114,7 @@
 	dprintk("NFS call  setattr\n");
 	fattr->valid = 0;
 	status = rpc_call(NFS_CLIENT(inode), NFSPROC_SETATTR, &arg, fattr, 0);
-	dprintk("NFS reply setattr\n");
+	dprintk("NFS reply setattr: %d\n", status);
 	return status;
 }
 
@@ -213,15 +213,15 @@
 }
 
 static struct inode *
-nfs_proc_create(struct inode *dir, struct qstr *name, struct iattr *sattr,
+nfs_proc_create(struct inode *dir, struct dentry *dentry, struct iattr *sattr,
 		int flags)
 {
 	struct nfs_fh		fhandle;
 	struct nfs_fattr	fattr;
 	struct nfs_createargs	arg = {
 		.fh		= NFS_FH(dir),
-		.name		= name->name,
-		.len		= name->len,
+		.name		= dentry->d_name.name,
+		.len		= dentry->d_name.len,
 		.sattr		= sattr
 	};
 	struct nfs_diropok	res = {
@@ -231,7 +231,7 @@
 	int			status;
 
 	fattr.valid = 0;
-	dprintk("NFS call  create %s\n", name->name);
+	dprintk("NFS call  create %s\n", dentry->d_name.name);
 	status = rpc_call(NFS_CLIENT(dir), NFSPROC_CREATE, &arg, &res, 0);
 	dprintk("NFS reply create: %d\n", status);
 	if (status == 0) {
diff -Nru a/fs/nfs/read.c b/fs/nfs/read.c
--- a/fs/nfs/read.c	2005-01-10 20:11:15 -08:00
+++ b/fs/nfs/read.c	2005-01-10 20:11:15 -08:00
@@ -24,7 +24,6 @@
 #include <linux/mm.h>
 #include <linux/slab.h>
 #include <linux/pagemap.h>
-#include <linux/mempool.h>
 #include <linux/sunrpc/clnt.h>
 #include <linux/nfs_fs.h>
 #include <linux/nfs_page.h>
@@ -39,25 +38,11 @@
 static void nfs_readpage_result_full(struct nfs_read_data *, int);
 
 static kmem_cache_t *nfs_rdata_cachep;
-static mempool_t *nfs_rdata_mempool;
+mempool_t *nfs_rdata_mempool;
 
 #define MIN_POOL_READ	(32)
 
-static struct nfs_read_data *nfs_readdata_alloc(void)
-{
-	struct nfs_read_data   *p;
-	p = (struct nfs_read_data *)mempool_alloc(nfs_rdata_mempool, SLAB_NOFS);
-	if (p)
-		memset(p, 0, sizeof(*p));
-	return p;
-}
-
-static __inline__ void nfs_readdata_free(struct nfs_read_data *p)
-{
-	mempool_free(p, nfs_rdata_mempool);
-}
-
-static void nfs_readdata_release(struct rpc_task *task)
+void nfs_readdata_release(struct rpc_task *task)
 {
         struct nfs_read_data   *data = (struct nfs_read_data *)task->tk_calldata;
         nfs_readdata_free(data);
diff -Nru a/fs/nfs/unlink.c b/fs/nfs/unlink.c
--- a/fs/nfs/unlink.c	2005-01-10 20:11:22 -08:00
+++ b/fs/nfs/unlink.c	2005-01-10 20:11:22 -08:00
@@ -215,7 +215,6 @@
 	spin_lock(&dentry->d_lock);
 	dentry->d_flags &= ~DCACHE_NFSFS_RENAMED;
 	spin_unlock(&dentry->d_lock);
-	if (data->task.tk_rpcwait == &nfs_delete_queue)
-		rpc_wake_up_task(&data->task);
+	rpc_wake_up_task(&data->task);
 	nfs_put_unlinkdata(data);
 }
diff -Nru a/fs/nfs/write.c b/fs/nfs/write.c
--- a/fs/nfs/write.c	2005-01-10 20:11:21 -08:00
+++ b/fs/nfs/write.c	2005-01-10 20:11:21 -08:00
@@ -61,7 +61,6 @@
 #include <linux/nfs_page.h>
 #include <asm/uaccess.h>
 #include <linux/smp_lock.h>
-#include <linux/mempool.h>
 
 #include "delegation.h"
 
@@ -83,49 +82,17 @@
 static int nfs_wait_on_requests(struct inode *, unsigned long, unsigned int);
 
 static kmem_cache_t *nfs_wdata_cachep;
-static mempool_t *nfs_wdata_mempool;
-static mempool_t *nfs_commit_mempool;
+mempool_t *nfs_wdata_mempool;
+mempool_t *nfs_commit_mempool;
 
 static DECLARE_WAIT_QUEUE_HEAD(nfs_write_congestion);
 
-static __inline__ struct nfs_write_data *nfs_writedata_alloc(void)
-{
-	struct nfs_write_data	*p;
-	p = (struct nfs_write_data *)mempool_alloc(nfs_wdata_mempool, SLAB_NOFS);
-	if (p) {
-		memset(p, 0, sizeof(*p));
-		INIT_LIST_HEAD(&p->pages);
-	}
-	return p;
-}
-
-static __inline__ void nfs_writedata_free(struct nfs_write_data *p)
-{
-	mempool_free(p, nfs_wdata_mempool);
-}
-
-static void nfs_writedata_release(struct rpc_task *task)
+void nfs_writedata_release(struct rpc_task *task)
 {
 	struct nfs_write_data	*wdata = (struct nfs_write_data *)task->tk_calldata;
 	nfs_writedata_free(wdata);
 }
 
-static __inline__ struct nfs_write_data *nfs_commit_alloc(void)
-{
-	struct nfs_write_data	*p;
-	p = (struct nfs_write_data *)mempool_alloc(nfs_commit_mempool, SLAB_NOFS);
-	if (p) {
-		memset(p, 0, sizeof(*p));
-		INIT_LIST_HEAD(&p->pages);
-	}
-	return p;
-}
-
-static __inline__ void nfs_commit_free(struct nfs_write_data *p)
-{
-	mempool_free(p, nfs_commit_mempool);
-}
-
 /* Adjust the file length if we're writing beyond the end */
 static void nfs_grow_file(struct page *page, unsigned int offset, unsigned int count)
 {
@@ -184,11 +151,10 @@
 	int		result, written = 0;
 	struct nfs_write_data *wdata;
 
-	wdata = kmalloc(sizeof(*wdata), GFP_NOFS);
+	wdata = nfs_writedata_alloc();
 	if (!wdata)
 		return -ENOMEM;
 
-	memset(wdata, 0, sizeof(*wdata));
 	wdata->flags = how;
 	wdata->cred = ctx->cred;
 	wdata->inode = inode;
@@ -238,8 +204,7 @@
 
 io_error:
 	nfs_end_data_update_defer(inode);
-
-	kfree(wdata);
+	nfs_writedata_free(wdata);
 	return written ? written : result;
 }
 
@@ -1199,7 +1164,8 @@
 		}
 		if (time_before(complain, jiffies)) {
 			printk(KERN_WARNING
-			       "NFS: Server wrote less than requested.\n");
+			       "NFS: Server wrote zero bytes, expected %u.\n",
+					argp->count);
 			complain = jiffies + 300 * HZ;
 		}
 		/* Can't do anything about it except throw an error. */
diff -Nru a/fs/nfsd/Makefile b/fs/nfsd/Makefile
--- a/fs/nfsd/Makefile	2005-01-10 20:11:24 -08:00
+++ b/fs/nfsd/Makefile	2005-01-10 20:11:24 -08:00
@@ -8,5 +8,5 @@
 			   export.o auth.o lockd.o nfscache.o nfsxdr.o stats.o
 nfsd-$(CONFIG_NFSD_V3)	+= nfs3proc.o nfs3xdr.o
 nfsd-$(CONFIG_NFSD_V4)	+= nfs4proc.o nfs4xdr.o nfs4state.o nfs4idmap.o \
-			   nfs4acl.o
+			   nfs4acl.o nfs4callback.o
 nfsd-objs		:= $(nfsd-y)
diff -Nru a/fs/nfsd/nfs3xdr.c b/fs/nfsd/nfs3xdr.c
--- a/fs/nfsd/nfs3xdr.c	2005-01-10 20:11:15 -08:00
+++ b/fs/nfsd/nfs3xdr.c	2005-01-10 20:11:15 -08:00
@@ -102,22 +102,6 @@
 }
 
 static inline u32 *
-decode_pathname(u32 *p, char **namp, int *lenp)
-{
-	char		*name;
-	int		i;
-
-	if ((p = xdr_decode_string_inplace(p, namp, lenp, NFS3_MAXPATHLEN)) != NULL) {
-		for (i = 0, name = *namp; i < *lenp; i++, name++) {
-			if (*name == '\0')
-				return NULL;
-		}
-	}
-
-	return p;
-}
-
-static inline u32 *
 decode_sattr3(u32 *p, struct iattr *iap)
 {
 	u32	tmp;
diff -Nru a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/fs/nfsd/nfs4callback.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,583 @@
+/*
+ *  linux/fs/nfsd/nfs4callback.c
+ *
+ *  Copyright (c) 2001 The Regents of the University of Michigan.
+ *  All rights reserved.
+ *
+ *  Kendrick Smith <kmsmith@umich.edu>
+ *  Andy Adamson <andros@umich.edu>
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions
+ *  are met:
+ *
+ *  1. Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *  2. Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *  3. Neither the name of the University nor the names of its
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ *  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ *  DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ *  FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ *  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ *  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/list.h>
+#include <linux/inet.h>
+#include <linux/errno.h>
+#include <linux/sunrpc/xdr.h>
+#include <linux/sunrpc/svc.h>
+#include <linux/sunrpc/clnt.h>
+#include <linux/nfsd/nfsd.h>
+#include <linux/nfsd/state.h>
+#include <linux/sunrpc/sched.h>
+#include <linux/nfs4.h>
+
+#define NFSDDBG_FACILITY                NFSDDBG_PROC
+
+#define NFSPROC4_CB_NULL 0
+#define NFSPROC4_CB_COMPOUND 1
+
+/* declarations */
+static void nfs4_cb_null(struct rpc_task *task);
+extern spinlock_t recall_lock;
+
+/* Index of predefined Linux callback client operations */
+
+enum {
+        NFSPROC4_CLNT_CB_NULL = 0,
+	NFSPROC4_CLNT_CB_RECALL,
+};
+
+enum nfs_cb_opnum4 {
+	OP_CB_RECALL            = 4,
+};
+
+#define NFS4_MAXTAGLEN		20
+
+#define NFS4_enc_cb_null_sz		0
+#define NFS4_dec_cb_null_sz		0
+#define cb_compound_enc_hdr_sz		4
+#define cb_compound_dec_hdr_sz		(3 + (NFS4_MAXTAGLEN >> 2))
+#define op_enc_sz			1
+#define op_dec_sz			2
+#define enc_nfs4_fh_sz			(1 + (NFS4_FHSIZE >> 2))
+#define enc_stateid_sz			16
+#define NFS4_enc_cb_recall_sz		(cb_compound_enc_hdr_sz +       \
+					1 + enc_stateid_sz +            \
+					enc_nfs4_fh_sz)
+
+#define NFS4_dec_cb_recall_sz		(cb_compound_dec_hdr_sz  +      \
+					op_dec_sz)
+
+/*
+* Generic encode routines from fs/nfs/nfs4xdr.c
+*/
+static inline u32 *
+xdr_writemem(u32 *p, const void *ptr, int nbytes)
+{
+	int tmp = XDR_QUADLEN(nbytes);
+	if (!tmp)
+		return p;
+	p[tmp-1] = 0;
+	memcpy(p, ptr, nbytes);
+	return p + tmp;
+}
+
+#define WRITE32(n)               *p++ = htonl(n)
+#define WRITEMEM(ptr,nbytes)     do {                           \
+	p = xdr_writemem(p, ptr, nbytes);                       \
+} while (0)
+#define RESERVE_SPACE(nbytes)   do {                            \
+	p = xdr_reserve_space(xdr, nbytes);                     \
+	if (!p) dprintk("NFSD: RESERVE_SPACE(%d) failed in function %s\n", (int) (nbytes), __FUNCTION__); \
+	BUG_ON(!p);                                             \
+} while (0)
+
+/*
+ * Generic decode routines from fs/nfs/nfs4xdr.c
+ */
+#define DECODE_TAIL                             \
+	status = 0;                             \
+out:                                            \
+	return status;                          \
+xdr_error:                                      \
+	dprintk("NFSD: xdr error! (%s:%d)\n", __FILE__, __LINE__); \
+	status = -EIO;                          \
+	goto out
+
+#define READ32(x)         (x) = ntohl(*p++)
+#define READ64(x)         do {                  \
+	(x) = (u64)ntohl(*p++) << 32;           \
+	(x) |= ntohl(*p++);                     \
+} while (0)
+#define READTIME(x)       do {                  \
+	p++;                                    \
+	(x.tv_sec) = ntohl(*p++);               \
+	(x.tv_nsec) = ntohl(*p++);              \
+} while (0)
+#define READ_BUF(nbytes)  do { \
+	p = xdr_inline_decode(xdr, nbytes); \
+	if (!p) { \
+		dprintk("NFSD: %s: reply buffer overflowed in line %d.", \
+			__FUNCTION__, __LINE__); \
+		return -EIO; \
+	} \
+} while (0)
+
+struct nfs4_cb_compound_hdr {
+	int		status;
+	u32		ident;
+	u32		nops;
+	u32		taglen;
+	char *		tag;
+};
+
+static struct {
+int stat;
+int errno;
+} nfs_cb_errtbl[] = {
+	{ NFS4_OK,		0               },
+	{ NFS4ERR_PERM,		EPERM           },
+	{ NFS4ERR_NOENT,	ENOENT          },
+	{ NFS4ERR_IO,		EIO             },
+	{ NFS4ERR_NXIO,		ENXIO           },
+	{ NFS4ERR_ACCESS,	EACCES          },
+	{ NFS4ERR_EXIST,	EEXIST          },
+	{ NFS4ERR_XDEV,		EXDEV           },
+	{ NFS4ERR_NOTDIR,	ENOTDIR         },
+	{ NFS4ERR_ISDIR,	EISDIR          },
+	{ NFS4ERR_INVAL,	EINVAL          },
+	{ NFS4ERR_FBIG,		EFBIG           },
+	{ NFS4ERR_NOSPC,	ENOSPC          },
+	{ NFS4ERR_ROFS,		EROFS           },
+	{ NFS4ERR_MLINK,	EMLINK          },
+	{ NFS4ERR_NAMETOOLONG,	ENAMETOOLONG    },
+	{ NFS4ERR_NOTEMPTY,	ENOTEMPTY       },
+	{ NFS4ERR_DQUOT,	EDQUOT          },
+	{ NFS4ERR_STALE,	ESTALE          },
+	{ NFS4ERR_BADHANDLE,	EBADHANDLE      },
+	{ NFS4ERR_BAD_COOKIE,	EBADCOOKIE      },
+	{ NFS4ERR_NOTSUPP,	ENOTSUPP        },
+	{ NFS4ERR_TOOSMALL,	ETOOSMALL       },
+	{ NFS4ERR_SERVERFAULT,	ESERVERFAULT    },
+	{ NFS4ERR_BADTYPE,	EBADTYPE        },
+	{ NFS4ERR_LOCKED,	EAGAIN          },
+	{ NFS4ERR_RESOURCE,	EREMOTEIO       },
+	{ NFS4ERR_SYMLINK,	ELOOP           },
+	{ NFS4ERR_OP_ILLEGAL,	EOPNOTSUPP      },
+	{ NFS4ERR_DEADLOCK,	EDEADLK         },
+	{ -1,                   EIO             }
+};
+
+static int
+nfs_cb_stat_to_errno(int stat)
+{
+	int i;
+	for (i = 0; nfs_cb_errtbl[i].stat != -1; i++) {
+		if (nfs_cb_errtbl[i].stat == stat)
+			return nfs_cb_errtbl[i].errno;
+	}
+	/* If we cannot translate the error, the recovery routines should
+	* handle it.
+	* Note: remaining NFSv4 error codes have values > 10000, so should
+	* not conflict with native Linux error codes.
+	*/
+	return stat;
+}
+
+/*
+ * XDR encode
+ */
+
+static int
+encode_cb_compound_hdr(struct xdr_stream *xdr, struct nfs4_cb_compound_hdr *hdr)
+{
+	u32 * p;
+
+	RESERVE_SPACE(16);
+	WRITE32(0);            /* tag length is always 0 */
+	WRITE32(NFS4_MINOR_VERSION);
+	WRITE32(hdr->ident);
+	WRITE32(hdr->nops);
+	return 0;
+}
+
+static int
+encode_cb_recall(struct xdr_stream *xdr, struct nfs4_cb_recall *cb_rec)
+{
+	u32 *p;
+	int len = cb_rec->cbr_fhlen;
+
+	RESERVE_SPACE(12+sizeof(cb_rec->cbr_stateid) + len);
+	WRITE32(OP_CB_RECALL);
+	WRITEMEM(&cb_rec->cbr_stateid, sizeof(stateid_t));
+	WRITE32(cb_rec->cbr_trunc);
+	WRITE32(len);
+	WRITEMEM(cb_rec->cbr_fhval, len);
+	return 0;
+}
+
+static int
+nfs4_xdr_enc_cb_null(struct rpc_rqst *req, u32 *p)
+{
+	struct xdr_stream xdrs, *xdr = &xdrs;
+
+	xdr_init_encode(&xdrs, &req->rq_snd_buf, p);
+        RESERVE_SPACE(0);
+	return 0;
+}
+
+static int
+nfs4_xdr_enc_cb_recall(struct rpc_rqst *req, u32 *p, struct nfs4_cb_recall *args)
+{
+	struct xdr_stream xdr;
+	struct nfs4_cb_compound_hdr hdr = {
+		.nops   = 1,
+	};
+
+	xdr_init_encode(&xdr, &req->rq_snd_buf, p);
+	encode_cb_compound_hdr(&xdr, &hdr);
+	return (encode_cb_recall(&xdr, args));
+}
+
+
+static int
+decode_cb_compound_hdr(struct xdr_stream *xdr, struct nfs4_cb_compound_hdr *hdr){
+        u32 *p;
+
+        READ_BUF(8);
+        READ32(hdr->status);
+        READ32(hdr->taglen);
+        READ_BUF(hdr->taglen + 4);
+        hdr->tag = (char *)p;
+        p += XDR_QUADLEN(hdr->taglen);
+        READ32(hdr->nops);
+        return 0;
+}
+
+static int
+decode_cb_op_hdr(struct xdr_stream *xdr, enum nfs_opnum4 expected)
+{
+	u32 *p;
+	u32 op;
+	int32_t nfserr;
+
+	READ_BUF(8);
+	READ32(op);
+	if (op != expected) {
+		dprintk("NFSD: decode_cb_op_hdr: Callback server returned "
+		         " operation %d but we issued a request for %d\n",
+		         op, expected);
+		return -EIO;
+	}
+	READ32(nfserr);
+	if (nfserr != NFS_OK)
+		return -nfs_cb_stat_to_errno(nfserr);
+	return 0;
+}
+
+static int
+nfs4_xdr_dec_cb_null(struct rpc_rqst *req, u32 *p)
+{
+	return 0;
+}
+
+static int
+nfs4_xdr_dec_cb_recall(struct rpc_rqst *rqstp, u32 *p)
+{
+	struct xdr_stream xdr;
+	struct nfs4_cb_compound_hdr hdr;
+	int status;
+
+	xdr_init_decode(&xdr, &rqstp->rq_rcv_buf, p);
+	status = decode_cb_compound_hdr(&xdr, &hdr);
+	if (status)
+		goto out;
+	status = decode_cb_op_hdr(&xdr, OP_CB_RECALL);
+out	:
+	return status;
+}
+
+/*
+ * RPC procedure tables
+ */
+#ifndef MAX
+# define MAX(a, b)      (((a) > (b))? (a) : (b))
+#endif
+
+#define PROC(proc, call, argtype, restype)                              \
+[NFSPROC4_CLNT_##proc] = {                                      	\
+        .p_proc   = NFSPROC4_CB_##call,					\
+        .p_encode = (kxdrproc_t) nfs4_xdr_##argtype,                    \
+        .p_decode = (kxdrproc_t) nfs4_xdr_##restype,                    \
+        .p_bufsiz = MAX(NFS4_##argtype##_sz,NFS4_##restype##_sz) << 2,  \
+}
+
+struct rpc_procinfo     nfs4_cb_procedures[] = {
+    PROC(CB_NULL,      NULL,     enc_cb_null,     dec_cb_null),
+    PROC(CB_RECALL,    COMPOUND,   enc_cb_recall,      dec_cb_recall),
+};
+
+struct rpc_version              nfs_cb_version4 = {
+        .number                 = 1,
+        .nrprocs                = sizeof(nfs4_cb_procedures)/sizeof(nfs4_cb_procedures[0]),
+        .procs                  = nfs4_cb_procedures
+};
+
+static struct rpc_version *	nfs_cb_version[] = {
+	NULL,
+	&nfs_cb_version4,
+};
+
+/*
+ * Use the SETCLIENTID credential
+ */
+struct rpc_cred *
+nfsd4_lookupcred(struct nfs4_client *clp, int taskflags)
+{
+        struct auth_cred acred;
+	struct rpc_clnt *clnt = clp->cl_callback.cb_client;
+        struct rpc_cred *ret = NULL;
+
+	if (!clnt)
+		goto out;
+        get_group_info(clp->cl_cred.cr_group_info);
+        acred.uid = clp->cl_cred.cr_uid;
+        acred.gid = clp->cl_cred.cr_gid;
+        acred.group_info = clp->cl_cred.cr_group_info;
+
+        dprintk("NFSD:     looking up %s cred\n",
+                clnt->cl_auth->au_ops->au_name);
+        ret = rpcauth_lookup_credcache(clnt->cl_auth, &acred, taskflags);
+        put_group_info(clp->cl_cred.cr_group_info);
+out:
+        return ret;
+}
+
+/*
+ * Set up the callback client and put a NFSPROC4_CB_NULL on the wire...
+ */
+void
+nfsd4_probe_callback(struct nfs4_client *clp)
+{
+	struct sockaddr_in	addr;
+	struct nfs4_callback    *cb = &clp->cl_callback;
+	struct rpc_timeout	timeparms;
+	struct rpc_xprt *	xprt;
+	struct rpc_program *	program = &cb->cb_program;
+	struct rpc_stat *	stat = &cb->cb_stat;
+	struct rpc_clnt *	clnt;
+	struct rpc_message msg = {
+		.rpc_proc       = &nfs4_cb_procedures[NFSPROC4_CLNT_CB_NULL],
+		.rpc_argp       = clp,
+	};
+	char                    hostname[32];
+	int status;
+
+	dprintk("NFSD: probe_callback. cb_parsed %d cb_set %d\n",
+			cb->cb_parsed, atomic_read(&cb->cb_set));
+	if (!cb->cb_parsed || atomic_read(&cb->cb_set))
+		return;
+
+	/* Initialize address */
+	memset(&addr, 0, sizeof(addr));
+	addr.sin_family = AF_INET;
+	addr.sin_port = htons(cb->cb_port);
+	addr.sin_addr.s_addr = htonl(cb->cb_addr);
+
+	/* Initialize timeout */
+	timeparms.to_initval = (NFSD_LEASE_TIME/4) * HZ;
+	timeparms.to_retries = 5;
+	timeparms.to_maxval = (NFSD_LEASE_TIME/2) * HZ;
+	timeparms.to_exponential = 1;
+
+	/* Create RPC transport */
+	if (!(xprt = xprt_create_proto(IPPROTO_TCP, &addr, &timeparms))) {
+		dprintk("NFSD: couldn't create callback transport!\n");
+		goto out_err;
+	}
+
+	/* Initialize rpc_program */
+	program->name = "nfs4_cb";
+	program->number = cb->cb_prog;
+	program->nrvers = sizeof(nfs_cb_version)/sizeof(nfs_cb_version[0]);
+	program->version = nfs_cb_version;
+	program->stats = stat;
+
+	/* Initialize rpc_stat */
+	memset(stat, 0, sizeof(struct rpc_stat));
+	stat->program = program;
+
+	/* Create RPC client
+ 	 *
+	 * XXX AUTH_UNIX only - need AUTH_GSS....
+	 */
+	sprintf(hostname, "%u.%u.%u.%u", NIPQUAD(addr.sin_addr.s_addr));
+	if (!(clnt = rpc_create_client(xprt, hostname, program, 1, RPC_AUTH_UNIX))) {
+		dprintk("NFSD: couldn't create callback client\n");
+		goto out_xprt;
+	}
+	clnt->cl_intr = 1;
+	clnt->cl_softrtry = 1;
+	clnt->cl_chatty = 1;
+	cb->cb_client = clnt;
+
+	/* Kick rpciod, put the call on the wire. */
+
+	if (rpciod_up() != 0) {
+		dprintk("nfsd: couldn't start rpciod for callbacks!\n");
+		goto out_clnt;
+	}
+
+	/* the task holds a reference to the nfs4_client struct */
+	atomic_inc(&clp->cl_count);
+
+	msg.rpc_cred = nfsd4_lookupcred(clp,0);
+	status = rpc_call_async(clnt, &msg, RPC_TASK_ASYNC, nfs4_cb_null, NULL);
+
+	if (status != 0) {
+		dprintk("NFSD: asynchronous NFSPROC4_CB_NULL failed!\n");
+		goto out_rpciod;
+	}
+	return;
+
+out_rpciod:
+	rpciod_down();
+out_clnt:
+	rpc_shutdown_client(clnt);
+	goto out_err;
+out_xprt:
+	xprt_destroy(xprt);
+out_err:
+	dprintk("NFSD: warning: no callback path to client %.*s\n",
+		(int)clp->cl_name.len, clp->cl_name.data);
+	cb->cb_client = NULL;
+}
+
+static void
+nfs4_cb_null(struct rpc_task *task)
+{
+	struct nfs4_client *clp = (struct nfs4_client *)task->tk_msg.rpc_argp;
+	struct nfs4_callback *cb = &clp->cl_callback;
+	u32 addr = htonl(cb->cb_addr);
+
+	dprintk("NFSD: nfs4_cb_null task->tk_status %d\n", task->tk_status);
+
+	if (task->tk_status < 0) {
+		dprintk("NFSD: callback establishment to client %.*s failed\n",
+			(int)clp->cl_name.len, clp->cl_name.data);
+		goto out;
+	}
+	atomic_set(&cb->cb_set, 1);
+	dprintk("NFSD: callback set to client %u.%u.%u.%u\n", NIPQUAD(addr));
+out:
+	put_nfs4_client(clp);
+}
+
+/*
+ *  Called with dp->dl_count incremented
+ */
+static void
+nfs4_cb_recall_done(struct rpc_task *task)
+{
+	struct nfs4_cb_recall *cbr = (struct nfs4_cb_recall *)task->tk_calldata;
+	struct nfs4_delegation *dp = cbr->cbr_dp;
+	int status;
+
+	/* all is well... */
+	if (task->tk_status == 0)
+		goto out;
+
+	/* network partition, retry nfsd4_cb_recall once.  */
+	if (task->tk_status == -EIO) {
+		if (atomic_read(&dp->dl_recall_cnt) == 0)
+			goto retry;
+		else
+			/* callback channel no longer available */
+			atomic_set(&dp->dl_client->cl_callback.cb_set, 0);
+	}
+
+	/* Race: a recall occurred miliseconds after a delegation was granted.
+	* Client may have received recall prior to delegation. retry recall
+	* once.
+	*/
+	if ((task->tk_status == -EBADHANDLE) || (task->tk_status == -NFS4ERR_BAD_STATEID)){
+		if (atomic_read(&dp->dl_recall_cnt) == 0)
+			goto retry;
+	}
+	atomic_set(&dp->dl_state, NFS4_RECALL_COMPLETE);
+
+out:
+	if (atomic_dec_and_test(&dp->dl_count))
+		atomic_set(&dp->dl_state, NFS4_REAP_DELEG);
+	BUG_ON(atomic_read(&dp->dl_count) < 0);
+	dprintk("NFSD: nfs4_cb_recall_done: dp %p dl_flock %p dl_count %d\n",dp, dp->dl_flock, atomic_read(&dp->dl_count));
+	return;
+
+retry:
+	atomic_inc(&dp->dl_recall_cnt);
+	/* sleep 2 seconds before retrying recall */
+	set_current_state(TASK_UNINTERRUPTIBLE);
+	schedule_timeout(2*HZ);
+	status = nfsd4_cb_recall(dp);
+	dprintk("NFSD: nfs4_cb_recall_done: retry status: %d  dp %p dl_flock %p\n",status,dp, dp->dl_flock);
+}
+
+/*
+ * called with dp->dl_count inc'ed.
+ * nfs4_lock_state() may or may not have been called.
+ */
+int
+nfsd4_cb_recall(struct nfs4_delegation *dp)
+{
+	struct nfs4_client *clp;
+	struct rpc_clnt *clnt;
+	struct rpc_message msg = {
+		.rpc_proc = &nfs4_cb_procedures[NFSPROC4_CLNT_CB_RECALL],
+	};
+	struct nfs4_cb_recall *cbr = &dp->dl_recall;
+	int status;
+
+	dprintk("NFSD: nfsd4_cb_recall NFS4_enc_cb_recall_sz %d NFS4_dec_cb_recall_sz %d \n",NFS4_enc_cb_recall_sz,NFS4_dec_cb_recall_sz);
+
+	clp = dp->dl_client;
+	clnt = clp->cl_callback.cb_client;
+	status = EIO;
+	if ((!atomic_read(&clp->cl_callback.cb_set)) || !clnt)
+		goto out_free;
+
+	msg.rpc_argp = cbr;
+	msg.rpc_resp = cbr;
+	msg.rpc_cred = nfsd4_lookupcred(clp,0);
+
+	cbr->cbr_trunc = 0; /* XXX need to implement truncate optimization */
+	cbr->cbr_dp = dp;
+
+	if ((status = rpc_call_async(clnt, &msg, RPC_TASK_SOFT,
+		nfs4_cb_recall_done, cbr ))) {
+		dprintk("NFSD: recall_delegation: rpc_call_async failed %d\n",
+			status);
+		goto out_fail;
+	}
+out:
+	return status;
+out_fail:
+	status = nfserrno(status);
+	out_free:
+	kfree(cbr);
+	goto out;
+}
diff -Nru a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
--- a/fs/nfsd/nfs4proc.c	2005-01-10 20:11:23 -08:00
+++ b/fs/nfsd/nfs4proc.c	2005-01-10 20:11:23 -08:00
@@ -461,23 +461,8 @@
 }
 
 static inline int
-access_bits_permit_read(unsigned long access_bmap)
-{
-	return test_bit(NFS4_SHARE_ACCESS_READ, &access_bmap) ||
-		test_bit(NFS4_SHARE_ACCESS_BOTH, &access_bmap);
-}
-
-static inline int
-access_bits_permit_write(unsigned long access_bmap)
-{
-	return test_bit(NFS4_SHARE_ACCESS_WRITE, &access_bmap) ||
-		test_bit(NFS4_SHARE_ACCESS_BOTH, &access_bmap);
-}
-
-static inline int
 nfsd4_read(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_read *read)
 {
-	struct nfs4_stateid *stp;
 	int status;
 
 	/* no need to check permission - this will be done in nfsd_read() */
@@ -509,15 +494,10 @@
 	}
 	/* check stateid */
 	if ((status = nfs4_preprocess_stateid_op(current_fh, &read->rd_stateid, 
-					CHECK_FH | RDWR_STATE, &stp))) {
+					CHECK_FH | RD_STATE))) {
 		dprintk("NFSD: nfsd4_read: couldn't process stateid!\n");
 		goto out;
 	}
-	status = nfserr_openmode;
-	if (!access_bits_permit_read(stp->st_access_bmap)) {
-		dprintk("NFSD: nfsd4_read: file not opened for read!\n");
-		goto out;
-	}
 	status = nfs_ok;
 out:
 	nfs4_unlock_state();
@@ -605,7 +585,6 @@
 static inline int
 nfsd4_setattr(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_setattr *setattr)
 {
-	struct nfs4_stateid *stp;
 	int status = nfs_ok;
 
 	if (nfs4_in_grace())
@@ -626,15 +605,10 @@
 		nfs4_lock_state();
 		if ((status = nfs4_preprocess_stateid_op(current_fh, 
 						&setattr->sa_stateid, 
-						CHECK_FH | RDWR_STATE, &stp))) {
+						CHECK_FH | WR_STATE))) {
 			dprintk("NFSD: nfsd4_setattr: couldn't process stateid!\n");
 			goto out_unlock;
 		}
-		status = nfserr_openmode;
-		if (!access_bits_permit_write(stp->st_access_bmap)) {
-			dprintk("NFSD: nfsd4_setattr: not opened for write!\n");
-			goto out_unlock;
-		}
 		nfs4_unlock_state();
 	}
 	status = nfs_ok;
@@ -654,7 +628,6 @@
 static inline int
 nfsd4_write(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_write *write)
 {
-	struct nfs4_stateid *stp;
 	stateid_t *stateid = &write->wr_stateid;
 	u32 *p;
 	int status = nfs_ok;
@@ -677,18 +650,13 @@
 		goto zero_stateid;
 	}
 	if ((status = nfs4_preprocess_stateid_op(current_fh, stateid, 
-					CHECK_FH | RDWR_STATE, &stp))) {
+					CHECK_FH | WR_STATE))) {
 		dprintk("NFSD: nfsd4_write: couldn't process stateid!\n");
 		goto out;
 	}
 
-	status = nfserr_openmode;
-	if (!access_bits_permit_write(stp->st_access_bmap)) {
-		dprintk("NFSD: nfsd4_write: file not open for write!\n");
-		goto out;
-	}
-
 zero_stateid:
+
 	nfs4_unlock_state();
 	write->wr_bytes_written = write->wr_buflen;
 	write->wr_how_written = write->wr_stable_how;
@@ -871,6 +839,9 @@
 			break;
 		case OP_CREATE:
 			op->status = nfsd4_create(rqstp, current_fh, &op->u.create);
+			break;
+		case OP_DELEGRETURN:
+			op->status = nfsd4_delegreturn(rqstp, current_fh, &op->u.delegreturn);
 			break;
 		case OP_GETATTR:
 			op->status = nfsd4_getattr(rqstp, current_fh, &op->u.getattr);
diff -Nru a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
--- a/fs/nfsd/nfs4state.c	2005-01-10 20:11:21 -08:00
+++ b/fs/nfsd/nfs4state.c	2005-01-10 20:11:21 -08:00
@@ -44,6 +44,7 @@
 #include <linux/mount.h>
 #include <linux/workqueue.h>
 #include <linux/smp_lock.h>
+#include <linux/kthread.h>
 #include <linux/nfs4.h>
 #include <linux/nfsd/state.h>
 #include <linux/nfsd/xdr4.h>
@@ -57,8 +58,9 @@
 time_t boot_time;
 static time_t grace_end = 0;
 static u32 current_clientid = 1;
-static u32 current_ownerid;
-static u32 current_fileid;
+static u32 current_ownerid = 1;
+static u32 current_fileid = 1;
+static u32 current_delegid = 1;
 static u32 nfs4_init;
 stateid_t zerostateid;             /* bits all 0 */
 stateid_t onestateid;              /* bits all 1 */
@@ -75,9 +77,14 @@
 u32 vfsopen = 0;
 u32 vfsclose = 0;
 u32 alloc_lsowner= 0;
+u32 alloc_delegation= 0;
+u32 free_delegation= 0;
 
 /* forward declarations */
 struct nfs4_stateid * find_stateid(stateid_t *stid, int flags);
+static struct nfs4_delegation * find_delegation_stateid(struct inode *ino, stateid_t *stid);
+static void release_delegation(struct nfs4_delegation *dp);
+static void release_stateid_lockowner(struct nfs4_stateid *open_stp);
 
 /* Locking:
  *
@@ -117,6 +124,111 @@
 static void release_stateid(struct nfs4_stateid *stp, int flags);
 static void release_file(struct nfs4_file *fp);
 
+/*
+ * Delegation state
+ */
+
+/* recall_lock protects the del_recall_lru */
+spinlock_t recall_lock;
+static struct list_head del_recall_lru;
+
+static struct nfs4_delegation *
+alloc_init_deleg(struct nfs4_client *clp, struct nfs4_file *fp, struct svc_fh *current_fh, u32 type)
+{
+	struct nfs4_delegation *dp;
+
+	dprintk("NFSD alloc_init_deleg\n");
+	if ((dp = kmalloc(sizeof(struct nfs4_delegation),
+		GFP_KERNEL)) == NULL)
+		return dp;
+	INIT_LIST_HEAD(&dp->dl_del_perfile);
+	INIT_LIST_HEAD(&dp->dl_del_perclnt);
+	INIT_LIST_HEAD(&dp->dl_recall_lru);
+	dp->dl_client = clp;
+	dp->dl_file = fp;
+	dp->dl_flock = NULL;
+	dp->dl_stp = NULL;
+	dp->dl_type = type;
+	dp->dl_recall.cbr_dp = NULL;
+	dp->dl_recall.cbr_ident = 0;
+	dp->dl_recall.cbr_trunc = 0;
+	dp->dl_stateid.si_boot = boot_time;
+	dp->dl_stateid.si_stateownerid = current_delegid++;
+	dp->dl_stateid.si_fileid = 0;
+	dp->dl_stateid.si_generation = 0;
+	dp->dl_fhlen = current_fh->fh_handle.fh_size;
+	memcpy(dp->dl_fhval, &current_fh->fh_handle.fh_base,
+		        current_fh->fh_handle.fh_size);
+	dp->dl_time = 0;
+	atomic_set(&dp->dl_state, NFS4_NO_RECALL);
+	atomic_set(&dp->dl_count, 1);
+	atomic_set(&dp->dl_recall_cnt, 0);
+	list_add(&dp->dl_del_perfile, &fp->fi_del_perfile);
+	list_add(&dp->dl_del_perclnt, &clp->cl_del_perclnt);
+	alloc_delegation++;
+	return dp;
+}
+
+/*
+ * Free the delegation structure.
+ * Called with the recall_lock held.
+ */
+static void
+nfs4_free_delegation(struct nfs4_delegation *dp)
+{
+	dprintk("NFSD: nfs4_free_delegation freeing dp %p\n",dp);
+	list_del(&dp->dl_recall_lru);
+	kfree(dp);
+	free_delegation++;
+}
+
+/* release_delegation:
+ *
+ * Remove the associated file_lock first, then remove the delegation.
+ * lease_modify() is called to remove the FS_LEASE file_lock from
+ * the i_flock list, eventually calling nfsd's lock_manager
+ * fl_release_callback.
+ *
+ * call either:
+ *   nfsd_close : if last close, locks_remove_flock calls lease_modify.
+ *                otherwise, recalled state set to NFS4_RECALL_COMPLETE
+ *                so that it will be reaped by the laundromat service.
+ * or
+ *   remove_lease (calls time_out_lease which calls lease_modify).
+ *   and nfs4_free_delegation.
+ *
+ * Called with nfs_lock_state() held.
+ * Called with the recall_lock held.
+ */
+
+static void
+release_delegation(struct nfs4_delegation *dp)
+{
+	/* delayed nfsd_close */
+	if (dp->dl_stp) {
+		struct file *filp = dp->dl_stp->st_vfs_file;
+
+		dprintk("NFSD: release_delegation CLOSE\n");
+		release_stateid_lockowner(dp->dl_stp);
+		kfree(dp->dl_stp);
+		dp->dl_stp = NULL;
+		atomic_set(&dp->dl_state, NFS4_RECALL_COMPLETE);
+		nfsd_close(filp);
+		vfsclose++;
+	} else {
+		dprintk("NFSD: release_delegation remove lease dl_flock %p\n",
+			dp->dl_flock);
+		remove_lease(dp->dl_flock);
+		list_del_init(&dp->dl_del_perfile);
+		list_del_init(&dp->dl_del_perclnt);
+		/* dl_count > 0 => outstanding recall rpc */
+		dprintk("NFSD: release_delegation free deleg dl_count %d\n",
+			           atomic_read(&dp->dl_count));
+		if ((atomic_read(&dp->dl_state) == NFS4_REAP_DELEG)
+		     || atomic_dec_and_test(&dp->dl_count))
+			nfs4_free_delegation(dp);
+	}
+}
 
 /* 
  * SETCLIENTID state 
@@ -213,12 +325,40 @@
 	kfree(clp);
 }
 
+void
+put_nfs4_client(struct nfs4_client *clp)
+{
+	if (atomic_dec_and_test(&clp->cl_count))
+		free_client(clp);
+}
+
 static void
 expire_client(struct nfs4_client *clp)
 {
 	struct nfs4_stateowner *sop;
+	struct nfs4_delegation *dp;
+	struct nfs4_callback *cb = &clp->cl_callback;
+	struct rpc_clnt *clnt = clp->cl_callback.cb_client;
+
+	dprintk("NFSD: expire_client cl_count %d\n",
+	                    atomic_read(&clp->cl_count));
 
-	dprintk("NFSD: expire_client\n");
+	/* shutdown rpc client, ending any outstanding recall rpcs */
+	if (atomic_read(&cb->cb_set) == 1 && clnt) {
+		rpc_shutdown_client(clnt);
+		clnt = clp->cl_callback.cb_client = NULL;
+	}
+	spin_lock(&recall_lock);
+	while (!list_empty(&clp->cl_del_perclnt)) {
+		dp = list_entry(clp->cl_del_perclnt.next, struct nfs4_delegation, dl_del_perclnt);
+		dprintk("NFSD: expire client. dp %p, dl_state %d, fp %p\n",
+				dp, atomic_read(&dp->dl_state), dp->dl_flock);
+
+		/* force release of delegation. */
+		atomic_set(&dp->dl_state, NFS4_RECALL_COMPLETE);
+		release_delegation(dp);
+	}
+	spin_unlock(&recall_lock);
 	list_del(&clp->cl_idhash);
 	list_del(&clp->cl_strhash);
 	list_del(&clp->cl_lru);
@@ -226,7 +366,7 @@
 		sop = list_entry(clp->cl_perclient.next, struct nfs4_stateowner, so_perclient);
 		release_stateowner(sop);
 	}
-	free_client(clp);
+	put_nfs4_client(clp);
 }
 
 static struct nfs4_client *
@@ -235,9 +375,13 @@
 
 	if (!(clp = alloc_client(name)))
 		goto out;
+	atomic_set(&clp->cl_count, 1);
+	atomic_set(&clp->cl_callback.cb_set, 0);
+	clp->cl_callback.cb_parsed = 0;
 	INIT_LIST_HEAD(&clp->cl_idhash);
 	INIT_LIST_HEAD(&clp->cl_strhash);
 	INIT_LIST_HEAD(&clp->cl_perclient);
+	INIT_LIST_HEAD(&clp->cl_del_perclnt);
 	INIT_LIST_HEAD(&clp->cl_lru);
 out:
 	return clp;
@@ -420,17 +564,24 @@
 {
 	struct nfs4_callback *cb = &clp->cl_callback;
 
+	/* Currently, we only support tcp for the callback channel */
+	if ((se->se_callback_netid_len != 3) || memcmp((char *)se->se_callback_netid_val, "tcp", 3))
+		goto out_err;
+
 	if ( !(parse_ipv4(se->se_callback_addr_len, se->se_callback_addr_val,
-		         &cb->cb_addr, &cb->cb_port))) {
-		printk(KERN_INFO "NFSD: BAD callback address. client will not receive delegations\n");
-		cb->cb_parsed = 0;
-		return;
-	}
-	cb->cb_netid.len = se->se_callback_netid_len;
-	cb->cb_netid.data = se->se_callback_netid_val;
+	                 &cb->cb_addr, &cb->cb_port)))
+		goto out_err;
 	cb->cb_prog = se->se_callback_prog;
 	cb->cb_ident = se->se_callback_ident;
 	cb->cb_parsed = 1;
+	return;
+out_err:
+	printk(KERN_INFO "NFSD: this client (clientid %08x/%08x) "
+		"will not receive delegations\n",
+		clp->cl_clientid.cl_boot, clp->cl_clientid.cl_id);
+
+	cb->cb_parsed = 0;
+	return;
 }
 
 /*
@@ -651,9 +802,8 @@
 	clientid_t * clid = &setclientid_confirm->sc_clientid;
 	int status;
 
-	status = nfserr_stale_clientid;
 	if (STALE_CLIENTID(clid))
-		goto out;
+		return nfserr_stale_clientid;
 	/* 
 	 * XXX The Duplicate Request Cache (DRC) has been checked (??)
 	 * We get here on a DRC miss.
@@ -707,6 +857,7 @@
 			status = nfserr_clid_inuse;
 		else {
 			expire_client(conf);
+			clp = unconf;
 			move_to_confirmed(unconf, idhashval);
 			status = nfs_ok;
 		}
@@ -724,6 +875,7 @@
 		if (!cmp_creds(&conf->cl_cred,&rqstp->rq_cred)) {
 			status = nfserr_clid_inuse;
 		} else {
+			clp = conf;
 			status = nfs_ok;
 		}
 		goto out;
@@ -738,6 +890,7 @@
 			status = nfserr_clid_inuse;
 		} else {
 			status = nfs_ok;
+			clp = unconf;
 			move_to_confirmed(unconf, idhashval);
 		}
 		goto out;
@@ -757,7 +910,8 @@
 	status = nfserr_inval;
 	goto out;
 out:
-	/* XXX if status == nfs_ok, probe callback path */
+	if (!status)
+		nfsd4_probe_callback(clp);
 	nfs4_unlock_state();
 	return status;
 }
@@ -803,6 +957,7 @@
 	if ((fp = kmalloc(sizeof(struct nfs4_file),GFP_KERNEL))) {
 		INIT_LIST_HEAD(&fp->fi_hash);
 		INIT_LIST_HEAD(&fp->fi_perfile);
+		INIT_LIST_HEAD(&fp->fi_del_perfile);
 		list_add(&fp->fi_hash, &file_hashtbl[hashval]);
 		fp->fi_inode = igrab(ino);
 		fp->fi_id = current_fileid++;
@@ -822,7 +977,7 @@
 		while (!list_empty(&file_hashtbl[i])) {
 			fp = list_entry(file_hashtbl[i].next, struct nfs4_file, fi_hash);
 			/* this should never be more than once... */
-			if (!list_empty(&fp->fi_perfile)) {
+			if (!list_empty(&fp->fi_perfile) || !list_empty(&fp->fi_del_perfile)) {
 				printk("ERROR: release_all_files: file %p is open, creating dangling state !!!\n",fp);
 			}
 			release_file(fp);
@@ -957,14 +1112,29 @@
 	__set_bit(open->op_share_deny, &stp->st_deny_bmap);
 }
 
+/*
+* Because nfsd_close() can call locks_remove_flock() which removes leases,
+* delay nfsd_close() for delegations from the nfsd_open() clientid
+* until the delegation is reaped.
+*/
 static void
-release_stateid(struct nfs4_stateid *stp, int flags) {
+release_stateid(struct nfs4_stateid *stp, int flags)
+{
+	struct nfs4_delegation *dp;
+	struct nfs4_file *fp = stp->st_file;
 
 	list_del(&stp->st_hash);
 	list_del_perfile++;
 	list_del(&stp->st_perfile);
 	list_del(&stp->st_perfilestate);
 	if ((stp->st_vfs_set) && (flags & OPEN_STATE)) {
+		list_for_each_entry(dp, &fp->fi_del_perfile, dl_del_perfile) {
+			if(cmp_clid(&dp->dl_client->cl_clientid,
+			    &stp->st_stateowner->so_client->cl_clientid)) {
+				dp->dl_stp = stp;
+				return;
+			}
+		}
 		release_stateid_lockowner(stp);
 		nfsd_close(stp->st_vfs_file);
 		vfsclose++;
@@ -1013,7 +1183,7 @@
 	if (sop->so_confirmed && list_empty(&sop->so_perfilestate))
 		move_to_close_lru(sop);
 	/* unused nfs4_file's are releseed. XXX slab cache? */
-	if (list_empty(&fp->fi_perfile)) {
+	if (list_empty(&fp->fi_perfile) && list_empty(&fp->fi_del_perfile)) {
 		release_file(fp);
 	}
 }
@@ -1141,6 +1311,101 @@
 	}
 }
 
+/*
+ * Recall a delegation
+ */
+static int
+do_recall(void *__dp)
+{
+	struct nfs4_delegation *dp = __dp;
+
+	daemonize("nfsv4-recall");
+
+	atomic_inc(&dp->dl_count);
+	nfsd4_cb_recall(dp);
+	return 0;
+}
+
+/*
+ * Spawn a thread to perform a recall on the delegation represented
+ * by the lease (file_lock)
+ *
+ * Called from break_lease() with lock_kernel() held,
+ *
+ */
+static
+void nfsd_break_deleg_cb(struct file_lock *fl)
+{
+	struct nfs4_delegation *dp=  (struct nfs4_delegation *)fl->fl_owner;
+	struct task_struct *t;
+
+	dprintk("NFSD nfsd_break_deleg_cb: dp %p fl %p\n",dp,fl);
+	if (!dp)
+		return;
+
+	/* schedule delegation for recall */
+	spin_lock(&recall_lock);
+	atomic_set(&dp->dl_state, NFS4_RECALL_IN_PROGRESS);
+	list_add_tail(&dp->dl_recall_lru, &del_recall_lru);
+	spin_unlock(&recall_lock);
+
+	/* only place dl_time is set. protected by lock_kernel*/
+	dp->dl_time = get_seconds();
+
+	/* XXX need to merge NFSD_LEASE_TIME with fs/locks.c:lease_break_time */
+	fl->fl_break_time = jiffies + NFSD_LEASE_TIME * HZ;
+
+	t = kthread_run(do_recall, dp, "%s", "nfs4_cb_recall");
+	if (IS_ERR(t)) {
+		struct nfs4_client *clp = dp->dl_client;
+
+		printk(KERN_INFO "NFSD: Callback thread failed for "
+			"for client (clientid %08x/%08x)\n",
+			clp->cl_clientid.cl_boot, clp->cl_clientid.cl_id);
+	}
+}
+
+/*
+ * The file_lock is being reapd.
+ *
+ * Called by locks_free_lock() with lock_kernel() held.
+ */
+static
+void nfsd_release_deleg_cb(struct file_lock *fl)
+{
+	struct nfs4_delegation *dp = (struct nfs4_delegation *)fl->fl_owner;
+
+	dprintk("NFSD nfsd_release_deleg_cb: fl %p dp %p dl_count %d, dl_state %d\n", fl,dp, atomic_read(&dp->dl_count), atomic_read(&dp->dl_state));
+
+	if (!(fl->fl_flags & FL_LEASE) || !dp)
+		return;
+	atomic_set(&dp->dl_state,NFS4_RECALL_COMPLETE);
+	dp->dl_flock = NULL;
+}
+
+/*
+ * Set the delegation file_lock back pointer.
+ *
+ * Called from __setlease() with lock_kernel() held.
+ */
+static
+void nfsd_copy_lock_deleg_cb(struct file_lock *new, struct file_lock *fl)
+{
+	struct nfs4_delegation *dp = (struct nfs4_delegation *)new->fl_owner;
+
+	dprintk("NFSD: nfsd_copy_lock_deleg_cb: new fl %p dp %p\n", new, dp);
+	if (!dp)
+		return;
+	dp->dl_flock = new;
+}
+
+struct lock_manager_operations nfsd_lease_mng_ops = {
+        .fl_break = nfsd_break_deleg_cb,
+        .fl_release_private = nfsd_release_deleg_cb,
+        .fl_copy_lock = nfsd_copy_lock_deleg_cb,
+};
+
+
 
 /*
  * nfsd4_process_open1()
@@ -1238,6 +1503,43 @@
 }
 
 static int
+nfs4_deleg_conflict(u32 share, u32 dtype)
+{
+	return (((share & NFS4_SHARE_ACCESS_WRITE) &&
+		dtype == NFS4_OPEN_DELEGATE_READ) ||
+		((share & NFS4_SHARE_ACCESS_READ) &&
+		dtype == NFS4_OPEN_DELEGATE_WRITE));
+}
+
+#define DONT_DELEGATE  8
+
+/*
+ * nfs4_check_deleg_recall()
+ *
+ * Test any delegation that is currently within an incompleted recalled
+ * state, and return NFSERR_DELAY for conflicting open share.
+ * flag is set to DONT_DELEGATE for shares that match the deleg type.
+ */
+static int
+nfs4_check_deleg_recall(struct nfs4_file *fp, struct nfsd4_open *op, int *flag)
+{
+	struct nfs4_delegation *dp;
+	int status = 0;
+
+	list_for_each_entry(dp, &fp->fi_del_perfile, dl_del_perfile) {
+		dprintk("NFSD: found delegation %p with dl_state %d\n",
+		 	                 dp, atomic_read(&dp->dl_state));
+		if (atomic_read(&dp->dl_state) == NFS4_RECALL_IN_PROGRESS) {
+			if(nfs4_deleg_conflict(op->op_share_access, dp->dl_type))
+				status = nfserr_jukebox;
+			else
+				*flag = DONT_DELEGATE;
+		}
+	}
+	return status;
+}
+
+static int
 nfs4_check_open(struct nfs4_file *fp, struct nfs4_stateowner *sop, struct nfsd4_open *open, struct nfs4_stateid **stpp)
 {
 	struct nfs4_stateid *local;
@@ -1339,6 +1641,65 @@
 }
 
 /*
+ * Attempt to hand out a delegation.
+ */
+static void
+nfs4_open_delegation(struct svc_fh *fh, struct nfsd4_open *open, struct nfs4_stateid *stp, int *flag)
+{
+	struct nfs4_delegation *dp;
+	struct nfs4_stateowner *sop = stp->st_stateowner;
+	struct nfs4_callback *cb = &sop->so_client->cl_callback;
+	struct file_lock fl, *flp = &fl;
+	int status;
+
+	if (*flag == DONT_DELEGATE) {
+		*flag = NFS4_OPEN_DELEGATE_NONE;
+		return;
+	}
+
+	/* set flag */
+	*flag = NFS4_OPEN_DELEGATE_NONE;
+	if (open->op_claim_type != NFS4_OPEN_CLAIM_NULL
+	     || !atomic_read(&cb->cb_set) || !sop->so_confirmed)
+		return;
+
+	if (!(open->op_share_access & NFS4_SHARE_ACCESS_WRITE))
+		*flag = NFS4_OPEN_DELEGATE_READ;
+
+	else if (!(open->op_share_access & NFS4_SHARE_ACCESS_READ))
+		*flag = NFS4_OPEN_DELEGATE_WRITE;
+
+	if (!(dp = alloc_init_deleg(sop->so_client, stp->st_file, fh, *flag)))
+		return;
+	locks_init_lock(&fl);
+	fl.fl_lmops = &nfsd_lease_mng_ops;
+	fl.fl_flags = FL_LEASE;
+	fl.fl_end = OFFSET_MAX;
+	fl.fl_owner =  (fl_owner_t)dp;
+	fl.fl_file = stp->st_vfs_file;
+	fl.fl_pid = current->tgid;
+
+	if ((status = setlease(stp->st_vfs_file,
+		*flag == NFS4_OPEN_DELEGATE_READ? F_RDLCK: F_WRLCK, &flp))) {
+		dprintk("NFSD: setlease failed [%d], no delegation\n", status);
+		list_del(&dp->dl_del_perfile);
+		list_del(&dp->dl_del_perclnt);
+		kfree(dp);
+		free_delegation++;
+		*flag = NFS4_OPEN_DELEGATE_NONE;
+		return;
+	}
+
+	memcpy(&open->op_delegate_stateid, &dp->dl_stateid, sizeof(dp->dl_stateid));
+
+	dprintk("NFSD: delegation stateid=(%08x/%08x/%08x/%08x)\n\n",
+	             dp->dl_stateid.si_boot,
+	             dp->dl_stateid.si_stateownerid,
+	             dp->dl_stateid.si_fileid,
+	             dp->dl_stateid.si_generation);
+}
+
+/*
  * called with nfs4_lock_state() held.
  */
 int
@@ -1346,28 +1707,24 @@
 {
 	struct nfs4_stateowner *sop = open->op_stateowner;
 	struct nfs4_file *fp = NULL;
-	struct inode *ino;
+	struct inode *ino = current_fh->fh_dentry->d_inode;
 	unsigned int fi_hashval;
 	struct nfs4_stateid *stp = NULL;
-	int status;
-
-	status = nfserr_resource;
-	if (!sop)
-		return status;
-
-	ino = current_fh->fh_dentry->d_inode;
+	int status, delegflag = 0;
 
 	status = nfserr_inval;
 	if (!TEST_ACCESS(open->op_share_access) || !TEST_DENY(open->op_share_deny))
 		goto out;
 	/*
-	 * Lookup file; if found, lookup stateid and check open request;
-	 * not found, create
+	 * Lookup file; if found, lookup stateid and check open request,
+	 * and check for delegations in the process of being recalled.
+	 * If not found, create the nfs4_file struct
 	 */
 	fi_hashval = file_hashval(ino);
 	if (find_file(fi_hashval, ino, &fp)) {
-		status = nfs4_check_open(fp, sop, open, &stp);
-		if (status)
+		if ((status = nfs4_check_open(fp, sop, open, &stp)))
+			goto out;
+		if ((status = nfs4_check_deleg_recall(fp, open, &delegflag)))
 			goto out;
 	} else {
 		status = nfserr_resource;
@@ -1407,14 +1764,20 @@
 			}
 		}
 	}
-	dprintk("nfs4_process_open2: stateid=(%08x/%08x/%08x/%08x)\n",
-	            stp->st_stateid.si_boot, stp->st_stateid.si_stateownerid,
-	            stp->st_stateid.si_fileid, stp->st_stateid.si_generation);
-
 	memcpy(&open->op_stateid, &stp->st_stateid, sizeof(stateid_t));
 
-	open->op_delegate_type = NFS4_OPEN_DELEGATE_NONE;
+	/*
+	* Attempt to hand out a delegation. No error return, because the
+	* OPEN succeeds even if we fail.
+	*/
+	nfs4_open_delegation(current_fh, open, stp, &delegflag);
+	open->op_delegate_type = delegflag;
+
 	status = nfs_ok;
+
+	dprintk("nfs4_process_open2: stateid=(%08x/%08x/%08x/%08x)\n",
+	            stp->st_stateid.si_boot, stp->st_stateid.si_stateownerid,
+	            stp->st_stateid.si_fileid, stp->st_stateid.si_generation);
 out:
 	/* take the opportunity to clean up unused state */
 	if (fp && list_empty(&fp->fi_perfile))
@@ -1480,14 +1843,15 @@
 {
 	struct nfs4_client *clp;
 	struct nfs4_stateowner *sop;
+	struct nfs4_delegation *dp;
 	struct list_head *pos, *next;
 	time_t cutoff = get_seconds() - NFSD_LEASE_TIME;
 	time_t t, clientid_val = NFSD_LEASE_TIME;
-	time_t u, close_val = NFSD_LEASE_TIME;
+	time_t u, test_val = NFSD_LEASE_TIME;
 
 	nfs4_lock_state();
 
-	dprintk("NFSD: laundromat service - starting, examining clients\n");
+	dprintk("NFSD: laundromat service - starting\n");
 	list_for_each_safe(pos, next, &client_lru) {
 		clp = list_entry(pos, struct nfs4_client, cl_lru);
 		if (time_after((unsigned long)clp->cl_time, (unsigned long)cutoff)) {
@@ -1500,12 +1864,30 @@
 			clp->cl_clientid.cl_id);
 		expire_client(clp);
 	}
+	spin_lock(&recall_lock);
+	list_for_each_safe(pos, next, &del_recall_lru) {
+		dp = list_entry (pos, struct nfs4_delegation, dl_recall_lru);
+		if (atomic_read(&dp->dl_state) == NFS4_RECALL_COMPLETE)
+			goto reap;
+		if (time_after((unsigned long)dp->dl_time, (unsigned long)cutoff)) {
+			u = dp->dl_time - cutoff;
+			if (test_val > u)
+				test_val = u;
+			break;
+		}
+reap:
+		dprintk("NFSD: purging unused delegation dp %p, fp %p\n",
+			            dp, dp->dl_flock);
+		release_delegation(dp);
+	}
+	spin_unlock(&recall_lock);
+	test_val = NFSD_LEASE_TIME;
 	list_for_each_safe(pos, next, &close_lru) {
 		sop = list_entry(pos, struct nfs4_stateowner, so_close_lru);
 		if (time_after((unsigned long)sop->so_time, (unsigned long)cutoff)) {
 			u = sop->so_time - cutoff;
-			if (close_val > u)
-				close_val = u;
+			if (test_val > u)
+				test_val = u;
 			break;
 		}
 		dprintk("NFSD: purging unused open stateowner (so_id %d)\n",
@@ -1564,22 +1946,63 @@
 	return 1;
 }
 
+static inline int
+access_permit_read(unsigned long access_bmap)
+{
+	return test_bit(NFS4_SHARE_ACCESS_READ, &access_bmap) ||
+		test_bit(NFS4_SHARE_ACCESS_BOTH, &access_bmap);
+}
+
+static inline int
+access_permit_write(unsigned long access_bmap)
+{
+	return test_bit(NFS4_SHARE_ACCESS_WRITE, &access_bmap) ||
+		test_bit(NFS4_SHARE_ACCESS_BOTH, &access_bmap);
+}
+
+static
+int nfs4_check_openmode(struct nfs4_stateid *stp, int flags)
+{
+        int status = nfserr_openmode;
+
+	if ((flags & WR_STATE) && (!access_permit_write(stp->st_access_bmap)))
+                goto out;
+	if ((flags & RD_STATE) && (!access_permit_read(stp->st_access_bmap)))
+                goto out;
+	status = nfs_ok;
+out:
+	return status;
+}
+
+static int
+nfs4_check_delegmode(struct nfs4_delegation *dp, int flags)
+{
+	int status = nfserr_openmode;
+
+	if ((flags & WR_STATE) & (dp->dl_type == NFS4_OPEN_DELEGATE_READ))
+		goto out;
+	if ((flags & RD_STATE) & (dp->dl_type == NFS4_OPEN_DELEGATE_WRITE))
+		goto out;
+	status = nfs_ok;
+out:
+	return status;
+}
 
 /*
 * Checks for stateid operations
 */
 int
-nfs4_preprocess_stateid_op(struct svc_fh *current_fh, stateid_t *stateid, int flags, struct nfs4_stateid **stpp)
+nfs4_preprocess_stateid_op(struct svc_fh *current_fh, stateid_t *stateid, int flags)
 {
-	struct nfs4_stateid *stp;
+	struct nfs4_stateid *stp = NULL;
+	struct nfs4_delegation *dp = NULL;
+	stateid_t *stidp;
 	int status;
 
 	dprintk("NFSD: preprocess_stateid_op: stateid = (%08x/%08x/%08x/%08x)\n",
 		stateid->si_boot, stateid->si_stateownerid, 
 		stateid->si_fileid, stateid->si_generation); 
 
-	*stpp = NULL;
-
 	/* STALE STATEID */
 	status = nfserr_stale_stateid;
 	if (STALE_STATEID(stateid)) 
@@ -1587,33 +2010,48 @@
 
 	/* BAD STATEID */
 	status = nfserr_bad_stateid;
-	if (!(stp = find_stateid(stateid, flags))) {
-		dprintk("NFSD: preprocess_stateid_op: no open stateid!\n");
-		goto out;
-	}
-	if ((flags & CHECK_FH) && nfs4_check_fh(current_fh, stp)) {
-		dprintk("NFSD: preprocess_stateid_op: fh-stateid mismatch!\n");
-		stp->st_vfs_set = 0;
-		goto out;
-	}
-	if (!stp->st_stateowner->so_confirmed) {
-		dprintk("preprocess_stateid_op: lockowner not confirmed yet!\n");
-		goto out;
+	if (!stateid->si_fileid) { /* delegation stateid */
+		struct inode *ino = current_fh->fh_dentry->d_inode;
+
+		if(!(dp = find_delegation_stateid(ino, stateid))) {
+			dprintk("NFSD: delegation stateid not found\n");
+			goto out;
+		}
+		stidp = &dp->dl_stateid;
+	} else { /* open or lock stateid */
+		if (!(stp = find_stateid(stateid, flags))) {
+			dprintk("NFSD: open or lock stateid not found\n");
+			goto out;
+		}
+		if ((flags & CHECK_FH) && nfs4_check_fh(current_fh, stp))
+			goto out;
+		if (!stp->st_stateowner->so_confirmed)
+			goto out;
+		stidp = &stp->st_stateid;
 	}
-	if (stateid->si_generation > stp->st_stateid.si_generation) {
-		dprintk("preprocess_stateid_op: future stateid?!\n");
+	if (stateid->si_generation > stidp->si_generation)
 		goto out;
-	}
 
 	/* OLD STATEID */
 	status = nfserr_old_stateid;
-	if (stateid->si_generation < stp->st_stateid.si_generation) {
-		dprintk("preprocess_stateid_op: old stateid!\n");
+	if (stateid->si_generation < stidp->si_generation)
 		goto out;
+	if (stp) {
+		if ((status = nfs4_check_openmode(stp,flags)))
+			goto out;
+		renew_client(stp->st_stateowner->so_client);
+	} else if (dp) {
+		if ((status = nfs4_check_delegmode(dp, flags)))
+			goto out;
+		renew_client(dp->dl_client);
+		if (flags & DELEG_RET) {
+			atomic_set(&dp->dl_state,NFS4_RECALL_COMPLETE);
+			spin_lock(&recall_lock);
+			release_delegation(dp);
+			spin_unlock(&recall_lock);
+		}
 	}
-	*stpp = stp;
 	status = nfs_ok;
-	renew_client(stp->st_stateowner->so_client);
 out:
 	return status;
 }
@@ -1912,6 +2350,22 @@
 	return status;
 }
 
+int
+nfsd4_delegreturn(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_delegreturn *dr)
+{
+	int status;
+
+	if ((status = fh_verify(rqstp, current_fh, S_IFREG, 0)))
+		goto out;
+
+	nfs4_lock_state();
+	status = nfs4_preprocess_stateid_op(current_fh, &dr->dr_stateid, DELEG_RET);
+	nfs4_unlock_state();
+out:
+	return status;
+}
+
+
 /* 
  * Lock owner state (byte-range locks)
  */
@@ -1938,7 +2392,7 @@
 	unsigned int hashval;
 
 	dprintk("NFSD: find_stateid flags 0x%x\n",flags);
-	if ((flags & LOCK_STATE) || (flags & RDWR_STATE)) {
+	if ((flags & LOCK_STATE) || (flags & RD_STATE) || (flags & WR_STATE)) {
 		hashval = stateid_hashval(st_id, f_id);
 		list_for_each_entry(local, &lockstateid_hashtbl[hashval], st_hash) {
 			if ((local->st_stateid.si_stateownerid == st_id) &&
@@ -1946,7 +2400,7 @@
 				return local;
 		}
 	} 
-	if ((flags & OPEN_STATE) || (flags & RDWR_STATE)) {
+	if ((flags & OPEN_STATE) || (flags & RD_STATE) || (flags & WR_STATE)) {
 		hashval = stateid_hashval(st_id, f_id);
 		list_for_each_entry(local, &stateid_hashtbl[hashval], st_hash) {
 			if ((local->st_stateid.si_stateownerid == st_id) &&
@@ -1958,6 +2412,32 @@
 	return NULL;
 }
 
+static struct nfs4_delegation *
+find_delegation_stateid(struct inode *ino, stateid_t *stid)
+{
+	struct nfs4_delegation *dp = NULL;
+	struct nfs4_file *fp = NULL;
+	u32 st_id;
+	unsigned int fi_hashval;
+
+	dprintk("NFSD:find_delegation_stateid stateid=(%08x/%08x/%08x/%08x)\n",
+                    stid->si_boot, stid->si_stateownerid,
+                    stid->si_fileid, stid->si_generation);
+
+	if(!ino || !stid)
+		return NULL;
+	st_id = stid->si_stateownerid;
+	fi_hashval = file_hashval(ino);
+	if (find_file(fi_hashval, ino, &fp)) {
+		list_for_each_entry(dp, &fp->fi_del_perfile, dl_del_perfile) {
+			if(dp->dl_stateid.si_stateownerid == st_id) {
+				dprintk("NFSD: find_delegation dp %p\n",dp);
+				return dp;
+			}
+		}
+	}
+	return NULL;
+}
 
 /*
  * TODO: Linux file offsets are _signed_ 64-bit quantities, which means that
@@ -2689,6 +3169,8 @@
 
 	INIT_LIST_HEAD(&close_lru);
 	INIT_LIST_HEAD(&client_lru);
+	INIT_LIST_HEAD(&del_recall_lru);
+	spin_lock_init(&recall_lock);
 	boot_time = get_seconds();
 	grace_time = max(old_lease_time, lease_time);
 	if (reclaim_str_hashtbl_size == 0)
@@ -2725,6 +3207,8 @@
 {
 	int i;
 	struct nfs4_client *clp = NULL;
+	struct nfs4_delegation *dp = NULL;
+	struct list_head *pos, *next;
 
 	for (i = 0; i < CLIENT_HASH_SIZE; i++) {
 		while (!list_empty(&conf_id_hashtbl[i])) {
@@ -2736,6 +3220,14 @@
 			expire_client(clp);
 		}
 	}
+	spin_lock(&recall_lock);
+	list_for_each_safe(pos, next, &del_recall_lru) {
+		dp = list_entry (pos, struct nfs4_delegation, dl_recall_lru);
+		atomic_set(&dp->dl_state, NFS4_RECALL_COMPLETE);
+		release_delegation(dp);
+	}
+	spin_unlock(&recall_lock);
+
 	release_all_files();
 	cancel_delayed_work(&laundromat_work);
 	flush_scheduled_work();
@@ -2750,6 +3242,9 @@
 			alloc_sowner, alloc_lsowner, free_sowner);
 	dprintk("NFSD: vfsopen %d vfsclose %d\n",
 			vfsopen, vfsclose);
+	dprintk("NFSD: alloc_delegation %d free_delegation %d\n",
+			alloc_delegation, free_delegation);
+
 }
 
 void
diff -Nru a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
--- a/fs/nfsd/nfs4xdr.c	2005-01-10 20:11:21 -08:00
+++ b/fs/nfsd/nfs4xdr.c	2005-01-10 20:11:21 -08:00
@@ -615,6 +615,18 @@
 }
 
 static inline int
+nfsd4_decode_delegreturn(struct nfsd4_compoundargs *argp, struct nfsd4_delegreturn *dr)
+{
+	DECODE_HEAD;
+
+	READ_BUF(sizeof(stateid_t));
+	READ32(dr->dr_stateid.si_generation);
+	COPYMEM(&dr->dr_stateid.si_opaque, sizeof(stateid_opaque_t));
+
+	DECODE_TAIL;
+}
+
+static inline int
 nfsd4_decode_getattr(struct nfsd4_compoundargs *argp, struct nfsd4_getattr *getattr)
 {
 	return nfsd4_decode_bitmap(argp, getattr->ga_bmval);
@@ -790,8 +802,8 @@
 		READ32(open->op_delegate_type);
 		break;
 	case NFS4_OPEN_CLAIM_DELEGATE_CUR:
-		READ_BUF(sizeof(delegation_stateid_t) + 4);
-		COPYMEM(&open->op_delegate_stateid, sizeof(delegation_stateid_t));
+		READ_BUF(sizeof(stateid_t) + 4);
+		COPYMEM(&open->op_delegate_stateid, sizeof(stateid_t));
 		READ32(open->op_fname.len);
 		READ_BUF(open->op_fname.len);
 		SAVEMEM(open->op_fname.data, open->op_fname.len);
@@ -825,7 +837,7 @@
 	DECODE_HEAD;
 		    
 	open_down->od_stateowner = NULL;
-	READ_BUF(4 + sizeof(stateid_t));
+	READ_BUF(12 + sizeof(stateid_t));
 	READ32(open_down->od_stateid.si_generation);
 	COPYMEM(&open_down->od_stateid.si_opaque, sizeof(stateid_opaque_t));
 	READ32(open_down->od_seqid);
@@ -1170,6 +1182,9 @@
 		case OP_CREATE:
 			op->status = nfsd4_decode_create(argp, &op->u.create);
 			break;
+		case OP_DELEGRETURN:
+			op->status = nfsd4_decode_delegreturn(argp, &op->u.delegreturn);
+			break;
 		case OP_GETATTR:
 			op->status = nfsd4_decode_getattr(argp, &op->u.getattr);
 			break;
@@ -1425,7 +1440,7 @@
 		if (status)
 			goto out_nfserr;
 	}
-	if ((bmval0 & FATTR4_WORD0_FILEHANDLE) && !fhp) {
+	if ((bmval0 & (FATTR4_WORD0_FILEHANDLE | FATTR4_WORD0_FSID)) && !fhp) {
 		fh_init(&tempfh, NFS4_FHSIZE);
 		status = fh_compose(&tempfh, exp, dentry, NULL);
 		if (status)
@@ -1508,10 +1523,15 @@
 	if (bmval0 & FATTR4_WORD0_FSID) {
 		if ((buflen -= 16) < 0)
 			goto out_resource;
-		WRITE32(0);
-		WRITE32(MAJOR(stat.dev));
-		WRITE32(0);
-		WRITE32(MINOR(stat.dev));
+		if (is_fsid(fhp, rqstp->rq_reffh)) {
+			WRITE64((u64)exp->ex_fsid);
+			WRITE64((u64)0);
+		} else {
+			WRITE32(0);
+			WRITE32(MAJOR(stat.dev));
+			WRITE32(0);
+			WRITE32(MINOR(stat.dev));
+		}
 	}
 	if (bmval0 & FATTR4_WORD0_UNIQUE_HANDLES) {
 		if ((buflen -= 4) < 0)
@@ -1765,17 +1785,65 @@
 }
 
 static int
+nfsd4_encode_dirent_fattr(struct nfsd4_readdir *cd,
+		const char *name, int namlen, u32 *p, int *buflen)
+{
+	struct svc_export *exp = cd->rd_fhp->fh_export;
+	struct dentry *dentry;
+	int nfserr;
+
+	dentry = lookup_one_len(name, cd->rd_fhp->fh_dentry, namlen);
+	if (IS_ERR(dentry))
+		return nfserrno(PTR_ERR(dentry));
+
+	exp_get(exp);
+	if (d_mountpoint(dentry)) {
+		if (nfsd_cross_mnt(cd->rd_rqstp, &dentry, &exp)) {
+		/*
+		 * -EAGAIN is the only error returned from
+		 * nfsd_cross_mnt() and it indicates that an
+		 * up-call has  been initiated to fill in the export
+		 * options on exp.  When the answer comes back,
+		 * this call will be retried.
+		 */
+			nfserr = nfserr_dropit;
+			goto out_put;
+		}
+
+	}
+	nfserr = nfsd4_encode_fattr(NULL, exp, dentry, p, buflen, cd->rd_bmval,
+					cd->rd_rqstp);
+out_put:
+	dput(dentry);
+	exp_put(exp);
+	return nfserr;
+}
+
+static u32 *
+nfsd4_encode_rdattr_error(u32 *p, int buflen, int nfserr)
+{
+	u32 *attrlenp;
+
+	if (buflen < 6)
+		return NULL;
+	*p++ = htonl(2);
+	*p++ = htonl(FATTR4_WORD0_RDATTR_ERROR); /* bmval0 */
+	*p++ = htonl(0);			 /* bmval1 */
+
+	attrlenp = p++;
+	*p++ = nfserr;       /* no htonl */
+	*attrlenp = htonl((char *)p - (char *)attrlenp - 4);
+	return p;
+}
+
+static int
 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;
-	struct dentry *dentry;
-	struct svc_export *exp = cd->rd_fhp->fh_export;
-	u32 bmval0, bmval1;
-	int nfserr = 0;
+	int nfserr = nfserr_toosmall;
 
 	/* In nfsv4, "." and ".." never make it onto the wire.. */
 	if (name && isdotent(name, namlen)) {
@@ -1788,106 +1856,44 @@
 
 	buflen = cd->buflen - 4 - XDR_QUADLEN(namlen);
 	if (buflen < 0)
-		goto nospc;
+		goto fail;
 
 	*p++ = xdr_one;                             /* mark entry present */
 	cd->offset = p;                             /* remember pointer */
 	p = xdr_encode_hyper(p, NFS_OFFSET_MAX);    /* offset of next entry */
 	p = xdr_encode_array(p, name, namlen);      /* name length & name */
 
-	/*
-	 * Now we come to the ugly part: writing the fattr for this entry.
-	 */
-	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
-		 * call nfsd4_encode_fattr(). 
-		 */
-		dentry = lookup_one_len(name, cd->rd_fhp->fh_dentry, namlen);
-		if (IS_ERR(dentry)) {
-			nfserr = nfserrno(PTR_ERR(dentry));
-			goto error;
-		}
-
-		exp_get(exp);
-		if (d_mountpoint(dentry)) {
-			if ((nfserr = nfsd_cross_mnt(cd->rd_rqstp, &dentry, 
-					 &exp))) {	
-			/* 
-			 * -EAGAIN is the only error returned from 
-			 * nfsd_cross_mnt() and it indicates that an 
-			 * up-call has  been initiated to fill in the export 
-			 * options on exp.  When the answer comes back,
-			 * this call will be retried.
-			 */
-				dput(dentry);
-				exp_put(exp);
-				nfserr = nfserr_dropit;
-				goto error;
-			}
-
-		}
-
-		nfserr = nfsd4_encode_fattr(NULL, exp,
-				dentry, p, &buflen, cd->rd_bmval,
-				cd->rd_rqstp);
-		dput(dentry);
-		exp_put(exp);
-		if (!nfserr) {
-			p += buflen;
-			goto out;
-		}
-		if (nfserr == nfserr_resource)
-			goto nospc;
-
-error:
+	nfserr = nfsd4_encode_dirent_fattr(cd, name, namlen, p, &buflen);
+	switch (nfserr) {
+	case nfs_ok:
+		p += buflen;
+		break;
+	case nfserr_resource:
+		nfserr = nfserr_toosmall;
+		goto fail;
+	case nfserr_dropit:
+		goto fail;
+	default:
 		/*
-		 * If we get here, we experienced a miscellaneous
-		 * failure while writing the attributes.  If the
-		 * client requested the RDATTR_ERROR attribute,
+		 * If the client requested the RDATTR_ERROR attribute,
 		 * we stuff the error code into this attribute
 		 * and continue.  If this attribute was not requested,
 		 * then in accordance with the spec, we fail the
 		 * entire READDIR operation(!)
 		 */
-		if (!(bmval0 & FATTR4_WORD0_RDATTR_ERROR)) {
-			cd->common.err = nfserr;
-			return -EINVAL;
-		}
-
-		bmval0 = FATTR4_WORD0_RDATTR_ERROR;
-		bmval1 = 0;
-		/* falling through here will do the right thing... */
+		if (!(cd->rd_bmval[0] & FATTR4_WORD0_RDATTR_ERROR))
+			goto fail;
+		nfserr = nfserr_toosmall;
+		p = nfsd4_encode_rdattr_error(p, buflen, nfserr);
+		if (p == NULL)
+			goto fail;
 	}
-
-	/*
-	 * In the common "lightweight" case, we avoid
-	 * the overhead of nfsd4_encode_fattr() by assembling
-	 * a small fattr by hand.
-	 */
-	if (buflen < 6)
-		goto nospc;
-	*p++ = htonl(2);
-	*p++ = htonl(bmval0);
-	*p++ = htonl(bmval1);
-
-	attrlenp = p++;
-	if (bmval0 & FATTR4_WORD0_RDATTR_ERROR)
-		*p++ = nfserr;       /* no htonl */
-	if (bmval0 & FATTR4_WORD0_FILEID)
-		p = xdr_encode_hyper(p, (u64)ino);
-	*attrlenp = htonl((char *)p - (char *)attrlenp - 4);
-
-out:
 	cd->buflen -= (p - cd->buffer);
 	cd->buffer = p;
 	cd->common.err = nfs_ok;
 	return 0;
-
-nospc:
-	cd->common.err = nfserr_toosmall;
+fail:
+	cd->common.err = nfserr;
 	return -EINVAL;
 }
 
@@ -2081,8 +2087,8 @@
 	case NFS4_OPEN_DELEGATE_NONE:
 		break;
 	case NFS4_OPEN_DELEGATE_READ:
-		RESERVE_SPACE(20 + sizeof(delegation_stateid_t));
-		WRITEMEM(&open->op_delegate_stateid, sizeof(delegation_stateid_t));
+		RESERVE_SPACE(20 + sizeof(stateid_t));
+		WRITEMEM(&open->op_delegate_stateid, sizeof(stateid_t));
 		WRITE32(0);
 
 		/*
@@ -2095,8 +2101,8 @@
 		ADJUST_ARGS();
 		break;
 	case NFS4_OPEN_DELEGATE_WRITE:
-		RESERVE_SPACE(32 + sizeof(delegation_stateid_t));
-		WRITEMEM(&open->op_delegate_stateid, sizeof(delegation_stateid_t));
+		RESERVE_SPACE(32 + sizeof(stateid_t));
+		WRITEMEM(&open->op_delegate_stateid, sizeof(stateid_t));
 		WRITE32(0);
 
 		/*
@@ -2459,6 +2465,8 @@
 		break;
 	case OP_CREATE:
 		nfsd4_encode_create(resp, op->status, &op->u.create);
+		break;
+	case OP_DELEGRETURN:
 		break;
 	case OP_GETATTR:
 		op->status = nfsd4_encode_getattr(resp, op->status, &op->u.getattr);
diff -Nru a/fs/nfsd/nfsproc.c b/fs/nfsd/nfsproc.c
--- a/fs/nfsd/nfsproc.c	2005-01-10 20:11:18 -08:00
+++ b/fs/nfsd/nfsproc.c	2005-01-10 20:11:18 -08:00
@@ -586,7 +586,6 @@
 		{ nfserr_dquot, -EDQUOT },
 #endif
 		{ nfserr_stale, -ESTALE },
-		{ nfserr_jukebox, -EWOULDBLOCK },
 		{ nfserr_jukebox, -ETIMEDOUT },
 		{ nfserr_dropit, -EAGAIN },
 		{ nfserr_dropit, -ENOMEM },
diff -Nru a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
--- a/fs/nfsd/vfs.c	2005-01-10 20:11:18 -08:00
+++ b/fs/nfsd/vfs.c	2005-01-10 20:11:18 -08:00
@@ -304,6 +304,8 @@
 		 * we need to break all leases.
 		 */
 		err = break_lease(inode, FMODE_WRITE | O_NONBLOCK);
+		if (err == -EWOULDBLOCK)
+			err = -ETIMEDOUT;
 		if (err) /* ENOMEM or EWOULDBLOCK */
 			goto out_nfserr;
 
@@ -668,6 +670,8 @@
 	 * This may block while leases are broken.
 	 */
 	err = break_lease(inode, O_NONBLOCK | ((access & MAY_WRITE) ? FMODE_WRITE : 0));
+	if (err == -EWOULDBLOCK)
+		err = -ETIMEDOUT;
 	if (err) /* NOMEM or WOULDBLOCK */
 		goto out_nfserr;
 
diff -Nru a/fs/nls/nls_ascii.c b/fs/nls/nls_ascii.c
--- a/fs/nls/nls_ascii.c	2005-01-10 20:11:16 -08:00
+++ b/fs/nls/nls_ascii.c	2005-01-10 20:11:16 -08:00
@@ -13,7 +13,7 @@
 #include <linux/nls.h>
 #include <linux/errno.h>
 
-static wchar_t charset2uni[128] = {
+static wchar_t charset2uni[256] = {
 	/* 0x00*/
 	0x0000, 0x0001, 0x0002, 0x0003,
 	0x0004, 0x0005, 0x0006, 0x0007,
@@ -56,7 +56,7 @@
 	0x007c, 0x007d, 0x007e, 0x007f,
 };
 
-static unsigned char page00[128] = {
+static unsigned char page00[256] = {
 	0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* 0x00-0x07 */
 	0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, /* 0x08-0x0f */
 	0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, /* 0x10-0x17 */
@@ -75,11 +75,11 @@
 	0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, /* 0x78-0x7f */
 };
 
-static unsigned char *page_uni2charset[128] = {
-	page00, NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,
+static unsigned char *page_uni2charset[256] = {
+	page00,
 };
 
-static unsigned char charset2lower[128] = {
+static unsigned char charset2lower[256] = {
 	0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* 0x00-0x07 */
 	0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, /* 0x08-0x0f */
 	0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, /* 0x10-0x17 */
@@ -98,7 +98,7 @@
 	0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, /* 0x78-0x7f */
 };
 
-static unsigned char charset2upper[128] = {
+static unsigned char charset2upper[256] = {
 	0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* 0x00-0x07 */
 	0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, /* 0x08-0x0f */
 	0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, /* 0x10-0x17 */
diff -Nru a/fs/ntfs/mft.c b/fs/ntfs/mft.c
--- a/fs/ntfs/mft.c	2005-01-10 20:11:20 -08:00
+++ b/fs/ntfs/mft.c	2005-01-10 20:11:20 -08:00
@@ -2605,7 +2605,8 @@
 			vi->i_mode &= ~S_IWUGO;
 
 		/* Set the inode times to the current time. */
-		vi->i_atime = vi->i_mtime = vi->i_ctime = current_kernel_time();
+		vi->i_atime = vi->i_mtime = vi->i_ctime =
+			current_fs_time(vi->i_sb);
 		/*
 		 * Set the file size to 0, the ntfs inode sizes are set to 0 by
 		 * the call to ntfs_init_big_inode() below.
diff -Nru a/fs/ntfs/super.c b/fs/ntfs/super.c
--- a/fs/ntfs/super.c	2005-01-10 20:11:21 -08:00
+++ b/fs/ntfs/super.c	2005-01-10 20:11:21 -08:00
@@ -2392,6 +2392,8 @@
 	 */
 	sb->s_maxbytes = MAX_LFS_FILESIZE;
 
+	sb->s_time_gran = 100;
+
 	/*
 	 * Now load the metadata required for the page cache and our address
 	 * space operations to function. We do this by setting up a specialised
diff -Nru a/fs/openpromfs/inode.c b/fs/openpromfs/inode.c
--- a/fs/openpromfs/inode.c	2005-01-10 20:11:18 -08:00
+++ b/fs/openpromfs/inode.c	2005-01-10 20:11:18 -08:00
@@ -1039,6 +1039,7 @@
 	s->s_blocksize_bits = 10;
 	s->s_magic = OPENPROM_SUPER_MAGIC;
 	s->s_op = &openprom_sops;
+	s->s_time_gran = 1;
 	root_inode = iget(s, OPENPROM_ROOT_INO);
 	if (!root_inode)
 		goto out_no_root;
diff -Nru a/fs/pipe.c b/fs/pipe.c
--- a/fs/pipe.c	2005-01-10 20:11:19 -08:00
+++ b/fs/pipe.c	2005-01-10 20:11:19 -08:00
@@ -14,6 +14,8 @@
 #include <linux/mount.h>
 #include <linux/pipe_fs_i.h>
 #include <linux/uio.h>
+#include <linux/highmem.h>
+
 #include <asm/uaccess.h>
 #include <asm/ioctls.h>
 
@@ -84,11 +86,23 @@
 	return 0;
 }
 
+static void release_pipe_buf(struct pipe_inode_info *info, struct pipe_buffer *buf)
+{
+	struct page *page = buf->page;
+
+	if (info->tmp_page) {
+		__free_page(page);
+		return;
+	}
+	info->tmp_page = page;
+}
+
 static ssize_t
 pipe_readv(struct file *filp, const struct iovec *_iov,
 	   unsigned long nr_segs, loff_t *ppos)
 {
 	struct inode *inode = filp->f_dentry->d_inode;
+	struct pipe_inode_info *info;
 	int do_wakeup;
 	ssize_t ret;
 	struct iovec *iov = (struct iovec *)_iov;
@@ -102,32 +116,40 @@
 	do_wakeup = 0;
 	ret = 0;
 	down(PIPE_SEM(*inode));
+	info = inode->i_pipe;
 	for (;;) {
-		int size = PIPE_LEN(*inode);
-		if (size) {
-			char *pipebuf = PIPE_BASE(*inode) + PIPE_START(*inode);
-			ssize_t chars = PIPE_MAX_RCHUNK(*inode);
+		int bufs = info->nrbufs;
+		if (bufs) {
+			int curbuf = info->curbuf;
+			struct pipe_buffer *buf = info->bufs + curbuf;
+			size_t chars = buf->len;
+			int error;
 
 			if (chars > total_len)
 				chars = total_len;
-			if (chars > size)
-				chars = size;
 
-			if (pipe_iov_copy_to_user(iov, pipebuf, chars)) {
+			error = pipe_iov_copy_to_user(iov, kmap(buf->page) + buf->offset, chars);
+			kunmap(buf->page);
+			if (unlikely(error)) {
 				if (!ret) ret = -EFAULT;
 				break;
 			}
 			ret += chars;
-
-			PIPE_START(*inode) += chars;
-			PIPE_START(*inode) &= (PIPE_SIZE - 1);
-			PIPE_LEN(*inode) -= chars;
+			buf->offset += chars;
+			buf->len -= chars;
+			if (!buf->len) {
+				release_pipe_buf(info, buf);
+				buf->page = NULL;
+				curbuf = (curbuf + 1) & (PIPE_BUFFERS-1);
+				info->curbuf = curbuf;
+				info->nrbufs = --bufs;
+				do_wakeup = 1;
+			}
 			total_len -= chars;
-			do_wakeup = 1;
 			if (!total_len)
 				break;	/* common path: read succeeded */
 		}
-		if (PIPE_LEN(*inode)) /* test for cyclic buffers */
+		if (bufs)	/* More to do? */
 			continue;
 		if (!PIPE_WRITERS(*inode))
 			break;
@@ -177,8 +199,8 @@
 	    unsigned long nr_segs, loff_t *ppos)
 {
 	struct inode *inode = filp->f_dentry->d_inode;
+	struct pipe_inode_info *info;
 	ssize_t ret;
-	size_t min;
 	int do_wakeup;
 	struct iovec *iov = (struct iovec *)_iov;
 	size_t total_len;
@@ -190,48 +212,83 @@
 
 	do_wakeup = 0;
 	ret = 0;
-	min = total_len;
-	if (min > PIPE_BUF)
-		min = 1;
 	down(PIPE_SEM(*inode));
+	info = inode->i_pipe;
+
+	/* We try to merge small writes */
+	if (info->nrbufs && total_len < PAGE_SIZE) {
+		int lastbuf = (info->curbuf + info->nrbufs - 1) & (PIPE_BUFFERS-1);
+		struct pipe_buffer *buf = info->bufs + lastbuf;
+		int offset = buf->offset + buf->len;
+		if (offset + total_len <= PAGE_SIZE) {
+			struct page *page = buf->page;
+			int error = pipe_iov_copy_from_user(offset + kmap(page), iov, total_len);
+			kunmap(page);
+			ret = error;
+			do_wakeup = 1;
+			if (error)
+				goto out;
+			buf->len += total_len;
+			ret = total_len;
+			goto out;
+		}
+			
+	}
+
 	for (;;) {
-		int free;
+		int bufs;
 		if (!PIPE_READERS(*inode)) {
 			send_sig(SIGPIPE, current, 0);
 			if (!ret) ret = -EPIPE;
 			break;
 		}
-		free = PIPE_FREE(*inode);
-		if (free >= min) {
-			/* transfer data */
-			ssize_t chars = PIPE_MAX_WCHUNK(*inode);
-			char *pipebuf = PIPE_BASE(*inode) + PIPE_END(*inode);
+		bufs = info->nrbufs;
+		if (bufs < PIPE_BUFFERS) {
+			ssize_t chars;
+			int newbuf = (info->curbuf + bufs) & (PIPE_BUFFERS-1);
+			struct pipe_buffer *buf = info->bufs + newbuf;
+			struct page *page = info->tmp_page;
+			int error;
+
+			if (!page) {
+				page = alloc_page(GFP_KERNEL);
+				if (unlikely(!page)) {
+					ret = ret ? : -ENOMEM;
+					break;
+				}
+				info->tmp_page = page;
+			}
 			/* Always wakeup, even if the copy fails. Otherwise
 			 * we lock up (O_NONBLOCK-)readers that sleep due to
 			 * syscall merging.
+			 * FIXME! Is this really true?
 			 */
 			do_wakeup = 1;
+			chars = PAGE_SIZE;
 			if (chars > total_len)
 				chars = total_len;
-			if (chars > free)
-				chars = free;
 
-			if (pipe_iov_copy_from_user(pipebuf, iov, chars)) {
+			error = pipe_iov_copy_from_user(kmap(page), iov, chars);
+			kunmap(page);
+			if (unlikely(error)) {
 				if (!ret) ret = -EFAULT;
 				break;
 			}
 			ret += chars;
 
-			PIPE_LEN(*inode) += chars;
+			/* Insert it into the buffer array */
+			buf->page = page;
+			buf->offset = 0;
+			buf->len = chars;
+			info->nrbufs = ++bufs;
+			info->tmp_page = NULL;
+
 			total_len -= chars;
 			if (!total_len)
 				break;
 		}
-		if (PIPE_FREE(*inode) && ret) {
-			/* handle cyclic data buffers */
-			min = 1;
+		if (bufs < PIPE_BUFFERS)
 			continue;
-		}
 		if (filp->f_flags & O_NONBLOCK) {
 			if (!ret) ret = -EAGAIN;
 			break;
@@ -249,6 +306,7 @@
 		pipe_wait(inode);
 		PIPE_WAITING_WRITERS(*inode)--;
 	}
+out:
 	up(PIPE_SEM(*inode));
 	if (do_wakeup) {
 		wake_up_interruptible(PIPE_WAIT(*inode));
@@ -283,9 +341,23 @@
 pipe_ioctl(struct inode *pino, struct file *filp,
 	   unsigned int cmd, unsigned long arg)
 {
+	struct inode *inode = filp->f_dentry->d_inode;
+	struct pipe_inode_info *info;
+	int count, buf, nrbufs;
+
 	switch (cmd) {
 		case FIONREAD:
-			return put_user(PIPE_LEN(*pino), (int __user *)arg);
+			down(PIPE_SEM(*inode));
+			info =  inode->i_pipe;
+			count = 0;
+			buf = info->curbuf;
+			nrbufs = info->nrbufs;
+			while (--nrbufs >= 0) {
+				count += info->bufs[buf].len;
+				buf = (buf+1) & (PIPE_BUFFERS-1);
+			}
+			up(PIPE_SEM(*inode));
+			return put_user(count, (int __user *)arg);
 		default:
 			return -EINVAL;
 	}
@@ -297,13 +369,16 @@
 {
 	unsigned int mask;
 	struct inode *inode = filp->f_dentry->d_inode;
+	struct pipe_inode_info *info = inode->i_pipe;
+	int nrbufs;
 
 	poll_wait(filp, PIPE_WAIT(*inode), wait);
 
 	/* Reading only -- no need for acquiring the semaphore.  */
-	mask = POLLIN | POLLRDNORM;
-	if (PIPE_EMPTY(*inode))
-		mask = POLLOUT | POLLWRNORM;
+	nrbufs = info->nrbufs;
+	mask = (nrbufs > 0) ? POLLIN | POLLRDNORM : 0;
+	mask |= (nrbufs < PIPE_BUFFERS) ? POLLOUT | POLLWRNORM : 0;
+
 	if (!PIPE_WRITERS(*inode) && filp->f_version != PIPE_WCOUNTER(*inode))
 		mask |= POLLHUP;
 	if (!PIPE_READERS(*inode))
@@ -322,10 +397,7 @@
 	PIPE_READERS(*inode) -= decr;
 	PIPE_WRITERS(*inode) -= decw;
 	if (!PIPE_READERS(*inode) && !PIPE_WRITERS(*inode)) {
-		struct pipe_inode_info *info = inode->i_pipe;
-		inode->i_pipe = NULL;
-		free_page((unsigned long) info->base);
-		kfree(info);
+		free_pipe_info(inode);
 	} else {
 		wake_up_interruptible(PIPE_WAIT(*inode));
 		kill_fasync(PIPE_FASYNC_READERS(*inode), SIGIO, POLL_IN);
@@ -530,29 +602,37 @@
 	.fasync		= pipe_rdwr_fasync,
 };
 
-struct inode* pipe_new(struct inode* inode)
+void free_pipe_info(struct inode *inode)
 {
-	unsigned long page;
+	int i;
+	struct pipe_inode_info *info = inode->i_pipe;
 
-	page = __get_free_page(GFP_USER);
-	if (!page)
-		return NULL;
+	inode->i_pipe = NULL;
+	if (info->tmp_page)
+		__free_page(info->tmp_page);
+	for (i = 0; i < PIPE_BUFFERS; i++) {
+		struct pipe_buffer *buf = info->bufs + i;
+		if (buf->page)
+			release_pipe_buf(info, buf);
+	}
+	kfree(info);
+}
 
-	inode->i_pipe = kmalloc(sizeof(struct pipe_inode_info), GFP_KERNEL);
-	if (!inode->i_pipe)
+struct inode* pipe_new(struct inode* inode)
+{
+	struct pipe_inode_info *info;
+
+	info = kmalloc(sizeof(struct pipe_inode_info), GFP_KERNEL);
+	if (!info)
 		goto fail_page;
+	memset(info, 0, sizeof(*info));
+	inode->i_pipe = info;
 
 	init_waitqueue_head(PIPE_WAIT(*inode));
-	PIPE_BASE(*inode) = (char*) page;
-	PIPE_START(*inode) = PIPE_LEN(*inode) = 0;
-	PIPE_READERS(*inode) = PIPE_WRITERS(*inode) = 0;
-	PIPE_WAITING_WRITERS(*inode) = 0;
 	PIPE_RCOUNTER(*inode) = PIPE_WCOUNTER(*inode) = 1;
-	*PIPE_FASYNC_READERS(*inode) = *PIPE_FASYNC_WRITERS(*inode) = NULL;
 
 	return inode;
 fail_page:
-	free_page(page);
 	return NULL;
 }
 
@@ -668,9 +748,7 @@
 close_f12_inode_i:
 	put_unused_fd(i);
 close_f12_inode:
-	free_page((unsigned long) PIPE_BASE(*inode));
-	kfree(inode->i_pipe);
-	inode->i_pipe = NULL;
+	free_pipe_info(inode);
 	iput(inode);
 close_f12:
 	put_filp(f2);
diff -Nru a/fs/proc/Makefile b/fs/proc/Makefile
--- a/fs/proc/Makefile	2005-01-10 20:11:16 -08:00
+++ b/fs/proc/Makefile	2005-01-10 20:11:16 -08:00
@@ -4,8 +4,8 @@
 
 obj-$(CONFIG_PROC_FS) += proc.o
 
-proc-y			:= task_nommu.o
-proc-$(CONFIG_MMU)	:= task_mmu.o
+proc-y			:= nommu.o task_nommu.o
+proc-$(CONFIG_MMU)	:= mmu.o task_mmu.o
 
 proc-y       += inode.o root.o base.o generic.o array.o \
 		kmsg.o proc_tty.o proc_misc.o
diff -Nru a/fs/proc/array.c b/fs/proc/array.c
--- a/fs/proc/array.c	2005-01-10 20:11:20 -08:00
+++ b/fs/proc/array.c	2005-01-10 20:11:20 -08:00
@@ -78,6 +78,7 @@
 #include <asm/pgtable.h>
 #include <asm/io.h>
 #include <asm/processor.h>
+#include "internal.h"
 
 /* Gcc optimizes away "strlen(x)" for constant x */
 #define ADDBUF(buffer, string) \
diff -Nru a/fs/proc/base.c b/fs/proc/base.c
--- a/fs/proc/base.c	2005-01-10 20:11:20 -08:00
+++ b/fs/proc/base.c	2005-01-10 20:11:20 -08:00
@@ -32,6 +32,7 @@
 #include <linux/mount.h>
 #include <linux/security.h>
 #include <linux/ptrace.h>
+#include "internal.h"
 
 /*
  * For hysterical raisins we keep the same inumbers as in the old procfs.
@@ -179,21 +180,6 @@
 
 #undef E
 
-static inline struct task_struct *proc_task(struct inode *inode)
-{
-	return PROC_I(inode)->task;
-}
-
-static inline int proc_type(struct inode *inode)
-{
-	return PROC_I(inode)->type;
-}
-
-int proc_tid_stat(struct task_struct*,char*);
-int proc_tgid_stat(struct task_struct*,char*);
-int proc_pid_status(struct task_struct*,char*);
-int proc_pid_statm(struct task_struct*,char*);
-
 static int proc_fd_link(struct inode *inode, struct dentry **dentry, struct vfsmount **mnt)
 {
 	struct task_struct *task = proc_task(inode);
@@ -216,33 +202,6 @@
 		put_files_struct(files);
 	}
 	return -ENOENT;
-}
-
-static int proc_exe_link(struct inode *inode, struct dentry **dentry, struct vfsmount **mnt)
-{
-	struct vm_area_struct * vma;
-	int result = -ENOENT;
-	struct task_struct *task = proc_task(inode);
-	struct mm_struct * mm = get_task_mm(task);
-
-	if (!mm)
-		goto out;
-	down_read(&mm->mmap_sem);
-	vma = mm->mmap;
-	while (vma) {
-		if ((vma->vm_flags & VM_EXECUTABLE) && 
-		    vma->vm_file) {
-			*mnt = mntget(vma->vm_file->f_vfsmnt);
-			*dentry = dget(vma->vm_file->f_dentry);
-			result = 0;
-			break;
-		}
-		vma = vma->vm_next;
-	}
-	up_read(&mm->mmap_sem);
-	mmput(mm);
-out:
-	return result;
 }
 
 static int proc_cwd_link(struct inode *inode, struct dentry **dentry, struct vfsmount **mnt)
diff -Nru a/fs/proc/generic.c b/fs/proc/generic.c
--- a/fs/proc/generic.c	2005-01-10 20:11:23 -08:00
+++ b/fs/proc/generic.c	2005-01-10 20:11:23 -08:00
@@ -551,6 +551,11 @@
 
 	if (!(*parent) && xlate_proc_name(name, parent, &fn) != 0)
 		goto out;
+
+	/* At this point there must not be any '/' characters beyond *fn */
+	if (strchr(fn, '/'))
+		goto out;
+
 	len = strlen(fn);
 
 	ent = kmalloc(sizeof(struct proc_dir_entry) + len + 1, GFP_KERNEL);
diff -Nru a/fs/proc/inode.c b/fs/proc/inode.c
--- a/fs/proc/inode.c	2005-01-10 20:11:22 -08:00
+++ b/fs/proc/inode.c	2005-01-10 20:11:22 -08:00
@@ -240,6 +240,7 @@
 	s->s_blocksize_bits = 10;
 	s->s_magic = PROC_SUPER_MAGIC;
 	s->s_op = &proc_sops;
+	s->s_time_gran = 1;
 	
 	root_inode = proc_get_inode(s, PROC_ROOT_INO, &proc_root);
 	if (!root_inode)
diff -Nru a/fs/proc/internal.h b/fs/proc/internal.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/fs/proc/internal.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,48 @@
+/* internal.h: internal procfs definitions
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/proc_fs.h>
+
+struct vmalloc_info {
+	unsigned long	used;
+	unsigned long	largest_chunk;
+};
+
+#ifdef CONFIG_MMU
+#define VMALLOC_TOTAL (VMALLOC_END - VMALLOC_START)
+extern void get_vmalloc_info(struct vmalloc_info *vmi);
+#else
+
+#define VMALLOC_TOTAL 0UL
+#define get_vmalloc_info(vmi)			\
+do {						\
+	(vmi)->used = 0;			\
+	(vmi)->largest_chunk = 0;		\
+} while(0)
+
+#endif
+
+extern void create_seq_entry(char *name, mode_t mode, struct file_operations *f);
+extern int proc_exe_link(struct inode *, struct dentry **, struct vfsmount **);
+extern int proc_tid_stat(struct task_struct *,  char *);
+extern int proc_tgid_stat(struct task_struct *, char *);
+extern int proc_pid_status(struct task_struct *, char *);
+extern int proc_pid_statm(struct task_struct *, char *);
+
+static inline struct task_struct *proc_task(struct inode *inode)
+{
+	return PROC_I(inode)->task;
+}
+
+static inline int proc_type(struct inode *inode)
+{
+	return PROC_I(inode)->type;
+}
diff -Nru a/fs/proc/kcore.c b/fs/proc/kcore.c
--- a/fs/proc/kcore.c	2005-01-10 20:11:19 -08:00
+++ b/fs/proc/kcore.c	2005-01-10 20:11:19 -08:00
@@ -68,23 +68,6 @@
 	write_unlock(&kclist_lock);
 }
 
-struct kcore_list *
-kclist_del(void *addr)
-{
-	struct kcore_list *m, **p = &kclist;
-
-	write_lock(&kclist_lock);
-	for (m = *p; m; p = &m->next) {
-		if (m->addr == (unsigned long)addr) {
-			*p = m->next;
-			write_unlock(&kclist_lock);
-			return m;
-		}
-	}
-	write_unlock(&kclist_lock);
-	return NULL;
-}
-
 static size_t get_kcore_size(int *nphdr, size_t *elf_buflen)
 {
 	size_t try, size;
diff -Nru a/fs/proc/mmu.c b/fs/proc/mmu.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/fs/proc/mmu.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,67 @@
+/* mmu.c: mmu memory info files
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/types.h>
+#include <linux/errno.h>
+#include <linux/time.h>
+#include <linux/kernel.h>
+#include <linux/string.h>
+#include <linux/mman.h>
+#include <linux/proc_fs.h>
+#include <linux/mm.h>
+#include <linux/mmzone.h>
+#include <linux/pagemap.h>
+#include <linux/swap.h>
+#include <linux/slab.h>
+#include <linux/smp.h>
+#include <linux/seq_file.h>
+#include <linux/hugetlb.h>
+#include <linux/vmalloc.h>
+#include <asm/uaccess.h>
+#include <asm/pgtable.h>
+#include <asm/tlb.h>
+#include <asm/div64.h>
+#include "internal.h"
+
+void get_vmalloc_info(struct vmalloc_info *vmi)
+{
+	struct vm_struct *vma;
+	unsigned long free_area_size;
+	unsigned long prev_end;
+
+	vmi->used = 0;
+
+	if (!vmlist) {
+		vmi->largest_chunk = VMALLOC_TOTAL;
+	}
+	else {
+		vmi->largest_chunk = 0;
+
+		prev_end = VMALLOC_START;
+
+		read_lock(&vmlist_lock);
+
+		for (vma = vmlist; vma; vma = vma->next) {
+			vmi->used += vma->size;
+
+			free_area_size = (unsigned long) vma->addr - prev_end;
+			if (vmi->largest_chunk < free_area_size)
+				vmi->largest_chunk = free_area_size;
+
+			prev_end = vma->size + (unsigned long) vma->addr;
+		}
+
+		if (VMALLOC_END - prev_end > vmi->largest_chunk)
+			vmi->largest_chunk = VMALLOC_END - prev_end;
+
+		read_unlock(&vmlist_lock);
+	}
+}
diff -Nru a/fs/proc/nommu.c b/fs/proc/nommu.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/fs/proc/nommu.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,135 @@
+/* nommu.c: mmu-less memory info files
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/errno.h>
+#include <linux/time.h>
+#include <linux/kernel.h>
+#include <linux/string.h>
+#include <linux/mman.h>
+#include <linux/proc_fs.h>
+#include <linux/mm.h>
+#include <linux/mmzone.h>
+#include <linux/pagemap.h>
+#include <linux/swap.h>
+#include <linux/slab.h>
+#include <linux/smp.h>
+#include <linux/seq_file.h>
+#include <linux/hugetlb.h>
+#include <linux/vmalloc.h>
+#include <asm/uaccess.h>
+#include <asm/pgtable.h>
+#include <asm/tlb.h>
+#include <asm/div64.h>
+#include "internal.h"
+
+/*
+ * display a list of all the VMAs the kernel knows about
+ * - nommu kernals have a single flat list
+ */
+static int nommu_vma_list_show(struct seq_file *m, void *v)
+{
+	struct vm_area_struct *vma;
+	unsigned long ino = 0;
+	struct file *file;
+	dev_t dev = 0;
+	int flags, len;
+
+	vma = rb_entry((struct rb_node *) v, struct vm_area_struct, vm_rb);
+
+	flags = vma->vm_flags;
+	file = vma->vm_file;
+
+	if (file) {
+		struct inode *inode = vma->vm_file->f_dentry->d_inode;
+		dev = inode->i_sb->s_dev;
+		ino = inode->i_ino;
+	}
+
+	seq_printf(m,
+		   "%08lx-%08lx %c%c%c%c %08lx %02x:%02x %lu %n",
+		   vma->vm_start,
+		   vma->vm_end,
+		   flags & VM_READ ? 'r' : '-',
+		   flags & VM_WRITE ? 'w' : '-',
+		   flags & VM_EXEC ? 'x' : '-',
+		   flags & VM_MAYSHARE ? flags & VM_SHARED ? 'S' : 's' : 'p',
+		   vma->vm_pgoff << PAGE_SHIFT,
+		   MAJOR(dev), MINOR(dev), ino, &len);
+
+	if (file) {
+		len = 25 + sizeof(void *) * 6 - len;
+		if (len < 1)
+			len = 1;
+		seq_printf(m, "%*c", len, ' ');
+		seq_path(m, file->f_vfsmnt, file->f_dentry, "");
+	}
+
+	seq_putc(m, '\n');
+	return 0;
+}
+
+static void *nommu_vma_list_start(struct seq_file *m, loff_t *_pos)
+{
+	struct rb_node *_rb;
+	loff_t pos = *_pos;
+	void *next = NULL;
+
+	down_read(&nommu_vma_sem);
+
+	for (_rb = rb_first(&nommu_vma_tree); _rb; _rb = rb_next(_rb)) {
+		if (pos == 0) {
+			next = _rb;
+			break;
+		}
+	}
+
+	return next;
+}
+
+static void nommu_vma_list_stop(struct seq_file *m, void *v)
+{
+	up_read(&nommu_vma_sem);
+}
+
+static void *nommu_vma_list_next(struct seq_file *m, void *v, loff_t *pos)
+{
+	(*pos)++;
+	return rb_next((struct rb_node *) v);
+}
+
+static struct seq_operations proc_nommu_vma_list_seqop = {
+	.start	= nommu_vma_list_start,
+	.next	= nommu_vma_list_next,
+	.stop	= nommu_vma_list_stop,
+	.show	= nommu_vma_list_show
+};
+
+static int proc_nommu_vma_list_open(struct inode *inode, struct file *file)
+{
+	return seq_open(file, &proc_nommu_vma_list_seqop);
+}
+
+static struct file_operations proc_nommu_vma_list_operations = {
+	.open    = proc_nommu_vma_list_open,
+	.read    = seq_read,
+	.llseek  = seq_lseek,
+	.release = seq_release,
+};
+
+static int __init proc_nommu_init(void)
+{
+	create_seq_entry("maps", S_IRUGO, &proc_nommu_vma_list_operations);
+	return 0;
+}
+
+module_init(proc_nommu_init);
diff -Nru a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c
--- a/fs/proc/proc_misc.c	2005-01-10 20:11:16 -08:00
+++ b/fs/proc/proc_misc.c	2005-01-10 20:11:16 -08:00
@@ -49,6 +49,7 @@
 #include <asm/io.h>
 #include <asm/tlb.h>
 #include <asm/div64.h>
+#include "internal.h"
 
 #define LOAD_INT(x) ((x) >> FSHIFT)
 #define LOAD_FRAC(x) LOAD_INT(((x) & (FIXED_1-1)) * 100)
@@ -61,7 +62,6 @@
 extern int get_hardware_list(char *);
 extern int get_stram_list(char *);
 extern int get_chrdev_list(char *);
-extern int get_blkdev_list(char *);
 extern int get_filesystem_list(char *);
 extern int get_exec_domain_list(char *);
 extern int get_dma_list(char *);
@@ -95,41 +95,6 @@
 	return proc_calc_metrics(page, start, off, count, eof, len);
 }
 
-struct vmalloc_info {
-	unsigned long used;
-	unsigned long largest_chunk;
-};
-
-static struct vmalloc_info get_vmalloc_info(void)
-{
-	unsigned long prev_end = VMALLOC_START;
-	struct vm_struct* vma;
-	struct vmalloc_info vmi;
-	vmi.used = 0;
-
-	read_lock(&vmlist_lock);
-
-	if(!vmlist)
-		vmi.largest_chunk = (VMALLOC_END-VMALLOC_START);
-	else
-		vmi.largest_chunk = 0;
-
-	for (vma = vmlist; vma; vma = vma->next) {
-		unsigned long free_area_size =
-			(unsigned long)vma->addr - prev_end;
-		vmi.used += vma->size;
-		if (vmi.largest_chunk < free_area_size )
-
-			vmi.largest_chunk = free_area_size;
-		prev_end = vma->size + (unsigned long)vma->addr;
-	}
-	if(VMALLOC_END-prev_end > vmi.largest_chunk)
-		vmi.largest_chunk = VMALLOC_END-prev_end;
-
-	read_unlock(&vmlist_lock);
-	return vmi;
-}
-
 static int uptime_read_proc(char *page, char **start, off_t off,
 				 int count, int *eof, void *data)
 {
@@ -158,7 +123,6 @@
 	unsigned long inactive;
 	unsigned long active;
 	unsigned long free;
-	unsigned long vmtot;
 	unsigned long committed;
 	unsigned long allowed;
 	struct vmalloc_info vmi;
@@ -176,10 +140,7 @@
 	allowed = ((totalram_pages - hugetlb_total_pages())
 		* sysctl_overcommit_ratio / 100) + total_swap_pages;
 
-	vmtot = (VMALLOC_END-VMALLOC_START)>>10;
-	vmi = get_vmalloc_info();
-	vmi.used >>= 10;
-	vmi.largest_chunk >>= 10;
+	get_vmalloc_info(&vmi);
 
 	/*
 	 * Tagged format, for easy grepping and expansion.
@@ -228,9 +189,9 @@
 		K(allowed),
 		K(committed),
 		K(ps.nr_page_table_pages),
-		vmtot,
-		vmi.used,
-		vmi.largest_chunk
+		VMALLOC_TOTAL >> 10,
+		vmi.used >> 10,
+		vmi.largest_chunk >> 10
 		);
 
 		len += hugetlb_report_meminfo(page + len);
@@ -256,7 +217,6 @@
 static int version_read_proc(char *page, char **start, off_t off,
 				 int count, int *eof, void *data)
 {
-	extern char *linux_banner;
 	int len;
 
 	strcpy(page, linux_banner);
@@ -358,10 +318,9 @@
 	.release	= seq_release,
 };
 
-int show_stat(struct seq_file *p, void *v)
+static int show_stat(struct seq_file *p, void *v)
 {
 	int i;
-	extern unsigned long total_forks;
 	unsigned long jif;
 	u64	sum = 0, user = 0, nice = 0, system = 0,
 		idle = 0, iowait = 0, irq = 0, softirq = 0;
@@ -502,7 +461,7 @@
 	.show  = show_interrupts
 };
 
-int interrupts_open(struct inode *inode, struct file *filp)
+static int interrupts_open(struct inode *inode, struct file *filp)
 {
 	return seq_open(filp, &int_seq_ops);
 }
@@ -571,7 +530,7 @@
 
 struct proc_dir_entry *proc_root_kcore;
 
-static void create_seq_entry(char *name, mode_t mode, struct file_operations *f)
+void create_seq_entry(char *name, mode_t mode, struct file_operations *f)
 {
 	struct proc_dir_entry *entry;
 	entry = create_proc_entry(name, mode, NULL);
diff -Nru a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
--- a/fs/proc/task_mmu.c	2005-01-10 20:11:16 -08:00
+++ b/fs/proc/task_mmu.c	2005-01-10 20:11:16 -08:00
@@ -1,8 +1,10 @@
 #include <linux/mm.h>
 #include <linux/hugetlb.h>
+#include <linux/mount.h>
 #include <linux/seq_file.h>
 #include <asm/elf.h>
 #include <asm/uaccess.h>
+#include "internal.h"
 
 char *task_mem(struct mm_struct *mm, char *buffer)
 {
@@ -43,6 +45,36 @@
 	*data = mm->total_vm - mm->shared_vm;
 	*resident = mm->rss;
 	return mm->total_vm;
+}
+
+int proc_exe_link(struct inode *inode, struct dentry **dentry, struct vfsmount **mnt)
+{
+	struct vm_area_struct * vma;
+	int result = -ENOENT;
+	struct task_struct *task = proc_task(inode);
+	struct mm_struct * mm = get_task_mm(task);
+
+	if (!mm)
+		goto out;
+	down_read(&mm->mmap_sem);
+
+	vma = mm->mmap;
+	while (vma) {
+		if ((vma->vm_flags & VM_EXECUTABLE) && vma->vm_file)
+			break;
+		vma = vma->vm_next;
+	}
+
+	if (vma) {
+		*mnt = mntget(vma->vm_file->f_vfsmnt);
+		*dentry = dget(vma->vm_file->f_dentry);
+		result = 0;
+	}
+
+	up_read(&mm->mmap_sem);
+	mmput(mm);
+out:
+	return result;
 }
 
 static int show_map(struct seq_file *m, void *v)
diff -Nru a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c
--- a/fs/proc/task_nommu.c	2005-01-10 20:11:19 -08:00
+++ b/fs/proc/task_nommu.c	2005-01-10 20:11:19 -08:00
@@ -1,7 +1,9 @@
 
 #include <linux/mm.h>
 #include <linux/file.h>
+#include <linux/mount.h>
 #include <linux/seq_file.h>
+#include "internal.h"
 
 /*
  * Logic: we've got two memory sums for each process, "shared", and
@@ -11,23 +13,25 @@
  */
 char *task_mem(struct mm_struct *mm, char *buffer)
 {
+	struct vm_list_struct *vml;
 	unsigned long bytes = 0, sbytes = 0, slack = 0;
-	struct mm_tblock_struct *tblock;
         
 	down_read(&mm->mmap_sem);
-	for (tblock = &mm->context.tblock; tblock; tblock = tblock->next) {
-		if (!tblock->rblock)
+	for (vml = mm->context.vmlist; vml; vml = vml->next) {
+		if (!vml->vma)
 			continue;
-		bytes += kobjsize(tblock);
+
+		bytes += kobjsize(vml);
 		if (atomic_read(&mm->mm_count) > 1 ||
-		    tblock->rblock->refcount > 1) {
-			sbytes += kobjsize(tblock->rblock->kblock);
-			sbytes += kobjsize(tblock->rblock);
+		    atomic_read(&vml->vma->vm_usage) > 1
+		    ) {
+			sbytes += kobjsize((void *) vml->vma->vm_start);
+			sbytes += kobjsize(vml->vma);
 		} else {
-			bytes += kobjsize(tblock->rblock->kblock);
-			bytes += kobjsize(tblock->rblock);
-			slack += kobjsize(tblock->rblock->kblock) -
-					tblock->rblock->size;
+			bytes += kobjsize((void *) vml->vma->vm_start);
+			bytes += kobjsize(vml->vma);
+			slack += kobjsize((void *) vml->vma->vm_start) -
+				(vml->vma->vm_end - vml->vma->vm_start);
 		}
 	}
 
@@ -65,13 +69,13 @@
 
 unsigned long task_vsize(struct mm_struct *mm)
 {
-	struct mm_tblock_struct *tbp;
+	struct vm_list_struct *tbp;
 	unsigned long vsize = 0;
 
 	down_read(&mm->mmap_sem);
-	for (tbp = &mm->context.tblock; tbp; tbp = tbp->next) {
-		if (tbp->rblock)
-			vsize += kobjsize(tbp->rblock->kblock);
+	for (tbp = mm->context.vmlist; tbp; tbp = tbp->next) {
+		if (tbp->vma)
+			vsize += kobjsize((void *) tbp->vma->vm_start);
 	}
 	up_read(&mm->mmap_sem);
 	return vsize;
@@ -80,16 +84,15 @@
 int task_statm(struct mm_struct *mm, int *shared, int *text,
 	       int *data, int *resident)
 {
-	struct mm_tblock_struct *tbp;
+	struct vm_list_struct *tbp;
 	int size = kobjsize(mm);
 
 	down_read(&mm->mmap_sem);
-	for (tbp = &mm->context.tblock; tbp; tbp = tbp->next) {
-		if (tbp->next)
-			size += kobjsize(tbp->next);
-		if (tbp->rblock) {
-			size += kobjsize(tbp->rblock);
-			size += kobjsize(tbp->rblock->kblock);
+	for (tbp = mm->context.vmlist; tbp; tbp = tbp->next) {
+		size += kobjsize(tbp);
+		if (tbp->vma) {
+			size += kobjsize(tbp->vma);
+			size += kobjsize((void *) tbp->vma->vm_start);
 		}
 	}
 
@@ -98,6 +101,40 @@
 	up_read(&mm->mmap_sem);
 	*resident = size;
 	return size;
+}
+
+int proc_exe_link(struct inode *inode, struct dentry **dentry, struct vfsmount **mnt)
+{
+	struct vm_list_struct *vml;
+	struct vm_area_struct *vma;
+	struct task_struct *task = proc_task(inode);
+	struct mm_struct *mm = get_task_mm(task);
+	int result = -ENOENT;
+
+	if (!mm)
+		goto out;
+	down_read(&mm->mmap_sem);
+
+	vml = mm->context.vmlist;
+	vma = NULL;
+	while (vml) {
+		if ((vml->vma->vm_flags & VM_EXECUTABLE) && vml->vma->vm_file) {
+			vma = vml->vma;
+			break;
+		}
+		vml = vml->next;
+	}
+
+	if (vma) {
+		*mnt = mntget(vma->vm_file->f_vfsmnt);
+		*dentry = dget(vma->vm_file->f_dentry);
+		result = 0;
+	}
+
+	up_read(&mm->mmap_sem);
+	mmput(mm);
+out:
+	return result;
 }
 
 /*
diff -Nru a/fs/qnx4/inode.c b/fs/qnx4/inode.c
--- a/fs/qnx4/inode.c	2005-01-10 20:11:22 -08:00
+++ b/fs/qnx4/inode.c	2005-01-10 20:11:22 -08:00
@@ -189,7 +189,7 @@
 	}
 	tst = tmp;
 #endif
-	inode->i_ctime = CURRENT_TIME;
+	inode->i_ctime = CURRENT_TIME_SEC;
 	mark_inode_dirty(inode);
 	return result;
 }
diff -Nru a/fs/qnx4/namei.c b/fs/qnx4/namei.c
--- a/fs/qnx4/namei.c	2005-01-10 20:11:20 -08:00
+++ b/fs/qnx4/namei.c	2005-01-10 20:11:20 -08:00
@@ -189,7 +189,7 @@
 	mark_buffer_dirty(bh);
 	inode->i_nlink = 0;
 	mark_inode_dirty(inode);
-	inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME;
+	inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC;
 	dir->i_nlink--;
 	mark_inode_dirty(dir);
 	retval = 0;
@@ -233,7 +233,7 @@
 	memset(de->di_fname, 0, sizeof de->di_fname);
 	de->di_mode = 0;
 	mark_buffer_dirty(bh);
-	dir->i_ctime = dir->i_mtime = CURRENT_TIME;
+	dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC;
 	mark_inode_dirty(dir);
 	inode->i_nlink--;
 	inode->i_ctime = dir->i_ctime;
diff -Nru a/fs/qnx4/truncate.c b/fs/qnx4/truncate.c
--- a/fs/qnx4/truncate.c	2005-01-10 20:11:18 -08:00
+++ b/fs/qnx4/truncate.c	2005-01-10 20:11:18 -08:00
@@ -31,7 +31,7 @@
 		/* TODO */
 	}
 	QNX4DEBUG(("qnx4: qnx4_truncate called\n"));
-	inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+	inode->i_mtime = inode->i_ctime = CURRENT_TIME_SEC;
 	mark_inode_dirty(inode);
 	unlock_kernel();
 }
diff -Nru a/fs/quota.c b/fs/quota.c
--- a/fs/quota.c	2005-01-10 20:11:22 -08:00
+++ b/fs/quota.c	2005-01-10 20:11:22 -08:00
@@ -14,6 +14,7 @@
 #include <linux/smp_lock.h>
 #include <linux/security.h>
 #include <linux/syscalls.h>
+#include <linux/buffer_head.h>
 
 /* Check validity of quotactl */
 static int check_quotactl_valid(struct super_block *sb, int type, int cmd, qid_t id)
@@ -135,16 +136,54 @@
 	return NULL;
 }
 
+void quota_sync_sb(struct super_block *sb, int type)
+{
+	int cnt;
+	struct inode *discard[MAXQUOTAS];
+
+	sb->s_qcop->quota_sync(sb, type);
+	/* This is not very clever (and fast) but currently I don't know about
+	 * any other simple way of getting quota data to disk and we must get
+	 * them there for userspace to be visible... */
+	if (sb->s_op->sync_fs)
+		sb->s_op->sync_fs(sb, 1);
+	sync_blockdev(sb->s_bdev);
+
+	/* Now when everything is written we can discard the pagecache so
+	 * that userspace sees the changes. We need i_sem and so we could
+	 * not do it inside dqonoff_sem. Moreover we need to be carefull
+	 * about races with quotaoff() (that is the reason why we have own
+	 * reference to inode). */
+	down(&sb_dqopt(sb)->dqonoff_sem);
+	for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
+		discard[cnt] = NULL;
+		if (type != -1 && cnt != type)
+			continue;
+		if (!sb_has_quota_enabled(sb, cnt))
+			continue;
+		discard[cnt] = igrab(sb_dqopt(sb)->files[cnt]);
+	}
+	up(&sb_dqopt(sb)->dqonoff_sem);
+	for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
+		if (discard[cnt]) {
+			down(&discard[cnt]->i_sem);
+			truncate_inode_pages(&discard[cnt]->i_data, 0);
+			up(&discard[cnt]->i_sem);
+			iput(discard[cnt]);
+		}
+	}
+}
+
 void sync_dquots(struct super_block *sb, int type)
 {
 	if (sb) {
 		if (sb->s_qcop->quota_sync)
-			sb->s_qcop->quota_sync(sb, type);
+			quota_sync_sb(sb, type);
 	}
 	else {
-		while ((sb = get_super_to_sync(type)) != 0) {
+		while ((sb = get_super_to_sync(type)) != NULL) {
 			if (sb->s_qcop->quota_sync)
-				sb->s_qcop->quota_sync(sb, type);
+				quota_sync_sb(sb, type);
 			drop_super(sb);
 		}
 	}
diff -Nru a/fs/quota_v1.c b/fs/quota_v1.c
--- a/fs/quota_v1.c	2005-01-10 20:11:21 -08:00
+++ b/fs/quota_v1.c	2005-01-10 20:11:21 -08:00
@@ -7,7 +7,6 @@
 #include <linux/init.h>
 #include <linux/module.h>
 
-#include <asm/uaccess.h>
 #include <asm/byteorder.h>
 
 MODULE_AUTHOR("Jan Kara");
@@ -41,23 +40,14 @@
 static int v1_read_dqblk(struct dquot *dquot)
 {
 	int type = dquot->dq_type;
-	struct file *filp;
-	mm_segment_t fs;
-	loff_t offset;
 	struct v1_disk_dqblk dqblk;
 
-	filp = sb_dqopt(dquot->dq_sb)->files[type];
-	if (filp == (struct file *)NULL)
+	if (!sb_dqopt(dquot->dq_sb)->files[type])
 		return -EINVAL;
 
-	/* Now we are sure filp is valid */
-	offset = v1_dqoff(dquot->dq_id);
 	/* Set structure to 0s in case read fails/is after end of file */
 	memset(&dqblk, 0, sizeof(struct v1_disk_dqblk));
-	fs = get_fs();
-	set_fs(KERNEL_DS);
-	filp->f_op->read(filp, (char *)&dqblk, sizeof(struct v1_disk_dqblk), &offset);
-	set_fs(fs);
+	dquot->dq_sb->s_op->quota_read(dquot->dq_sb, type, (char *)&dqblk, sizeof(struct v1_disk_dqblk), v1_dqoff(dquot->dq_id));
 
 	v1_disk2mem_dqblk(&dquot->dq_dqb, &dqblk);
 	if (dquot->dq_dqb.dqb_bhardlimit == 0 && dquot->dq_dqb.dqb_bsoftlimit == 0 &&
@@ -71,26 +61,18 @@
 static int v1_commit_dqblk(struct dquot *dquot)
 {
 	short type = dquot->dq_type;
-	struct file *filp;
-	mm_segment_t fs;
-	loff_t offset;
 	ssize_t ret;
 	struct v1_disk_dqblk dqblk;
 
-	filp = sb_dqopt(dquot->dq_sb)->files[type];
-	offset = v1_dqoff(dquot->dq_id);
-	fs = get_fs();
-	set_fs(KERNEL_DS);
-
 	v1_mem2disk_dqblk(&dqblk, &dquot->dq_dqb);
 	if (dquot->dq_id == 0) {
 		dqblk.dqb_btime = sb_dqopt(dquot->dq_sb)->info[type].dqi_bgrace;
 		dqblk.dqb_itime = sb_dqopt(dquot->dq_sb)->info[type].dqi_igrace;
 	}
 	ret = 0;
-	if (filp)
-		ret = filp->f_op->write(filp, (char *)&dqblk,
-					sizeof(struct v1_disk_dqblk), &offset);
+	if (sb_dqopt(dquot->dq_sb)->files[type])
+		ret = dquot->dq_sb->s_op->quota_write(dquot->dq_sb, type, (char *)&dqblk,
+					sizeof(struct v1_disk_dqblk), v1_dqoff(dquot->dq_id));
 	if (ret != sizeof(struct v1_disk_dqblk)) {
 		printk(KERN_WARNING "VFS: dquota write failed on dev %s\n",
 			dquot->dq_sb->s_id);
@@ -101,7 +83,6 @@
 	ret = 0;
 
 out:
-	set_fs(fs);
 	dqstats.writes++;
 
 	return ret;
@@ -121,14 +102,11 @@
 
 static int v1_check_quota_file(struct super_block *sb, int type)
 {
-	struct file *f = sb_dqopt(sb)->files[type];
-	struct inode *inode = f->f_dentry->d_inode;
+	struct inode *inode = sb_dqopt(sb)->files[type];
 	ulong blocks;
 	size_t off; 
 	struct v2_disk_dqheader dqhead;
-	mm_segment_t fs;
 	ssize_t size;
-	loff_t offset = 0;
 	loff_t isize;
 	static const uint quota_magics[] = V2_INITQMAGICS;
 
@@ -140,10 +118,7 @@
 	if ((blocks % sizeof(struct v1_disk_dqblk) * BLOCK_SIZE + off) % sizeof(struct v1_disk_dqblk))
 		return 0;
 	/* Doublecheck whether we didn't get file with new format - with old quotactl() this could happen */
-	fs = get_fs();
-	set_fs(KERNEL_DS);
-	size = f->f_op->read(f, (char *)&dqhead, sizeof(struct v2_disk_dqheader), &offset);
-	set_fs(fs);
+	size = sb->s_op->quota_read(sb, type, (char *)&dqhead, sizeof(struct v2_disk_dqheader), 0);
 	if (size != sizeof(struct v2_disk_dqheader))
 		return 1;	/* Probably not new format */
 	if (le32_to_cpu(dqhead.dqh_magic) != quota_magics[type])
@@ -155,16 +130,10 @@
 static int v1_read_file_info(struct super_block *sb, int type)
 {
 	struct quota_info *dqopt = sb_dqopt(sb);
-	mm_segment_t fs;
-	loff_t offset;
-	struct file *filp = dqopt->files[type];
 	struct v1_disk_dqblk dqblk;
 	int ret;
 
-	offset = v1_dqoff(0);
-	fs = get_fs();
-	set_fs(KERNEL_DS);
-	if ((ret = filp->f_op->read(filp, (char *)&dqblk, sizeof(struct v1_disk_dqblk), &offset)) != sizeof(struct v1_disk_dqblk)) {
+	if ((ret = sb->s_op->quota_read(sb, type, (char *)&dqblk, sizeof(struct v1_disk_dqblk), v1_dqoff(0))) != sizeof(struct v1_disk_dqblk)) {
 		if (ret >= 0)
 			ret = -EIO;
 		goto out;
@@ -173,38 +142,31 @@
 	dqopt->info[type].dqi_igrace = dqblk.dqb_itime ? dqblk.dqb_itime : MAX_IQ_TIME;
 	dqopt->info[type].dqi_bgrace = dqblk.dqb_btime ? dqblk.dqb_btime : MAX_DQ_TIME;
 out:
-	set_fs(fs);
 	return ret;
 }
 
 static int v1_write_file_info(struct super_block *sb, int type)
 {
 	struct quota_info *dqopt = sb_dqopt(sb);
-	mm_segment_t fs;
-	struct file *filp = dqopt->files[type];
 	struct v1_disk_dqblk dqblk;
-	loff_t offset;
 	int ret;
 
 	dqopt->info[type].dqi_flags &= ~DQF_INFO_DIRTY;
-	offset = v1_dqoff(0);
-	fs = get_fs();
-	set_fs(KERNEL_DS);
-	if ((ret = filp->f_op->read(filp, (char *)&dqblk, sizeof(struct v1_disk_dqblk), &offset)) != sizeof(struct v1_disk_dqblk)) {
+	if ((ret = sb->s_op->quota_read(sb, type, (char *)&dqblk,
+	    sizeof(struct v1_disk_dqblk), v1_dqoff(0))) != sizeof(struct v1_disk_dqblk)) {
 		if (ret >= 0)
 			ret = -EIO;
 		goto out;
 	}
 	dqblk.dqb_itime = dqopt->info[type].dqi_igrace;
 	dqblk.dqb_btime = dqopt->info[type].dqi_bgrace;
-	offset = v1_dqoff(0);
-	ret = filp->f_op->write(filp, (char *)&dqblk, sizeof(struct v1_disk_dqblk), &offset);
+	ret = sb->s_op->quota_write(sb, type, (char *)&dqblk,
+	      sizeof(struct v1_disk_dqblk), v1_dqoff(0));
 	if (ret == sizeof(struct v1_disk_dqblk))
 		ret = 0;
 	else if (ret > 0)
 		ret = -EIO;
 out:
-	set_fs(fs);
 	return ret;
 }
 
diff -Nru a/fs/quota_v2.c b/fs/quota_v2.c
--- a/fs/quota_v2.c	2005-01-10 20:11:21 -08:00
+++ b/fs/quota_v2.c	2005-01-10 20:11:21 -08:00
@@ -13,7 +13,6 @@
 #include <linux/slab.h>
 
 #include <asm/byteorder.h>
-#include <asm/uaccess.h>
 
 MODULE_AUTHOR("Jan Kara");
 MODULE_DESCRIPTION("Quota format v2 support");
@@ -30,19 +29,15 @@
 static int v2_check_quota_file(struct super_block *sb, int type)
 {
 	struct v2_disk_dqheader dqhead;
-	struct file *f = sb_dqopt(sb)->files[type];
-	mm_segment_t fs;
 	ssize_t size;
-	loff_t offset = 0;
 	static const uint quota_magics[] = V2_INITQMAGICS;
 	static const uint quota_versions[] = V2_INITQVERSIONS;
  
-	fs = get_fs();
-	set_fs(KERNEL_DS);
-	size = f->f_op->read(f, (char *)&dqhead, sizeof(struct v2_disk_dqheader), &offset);
-	set_fs(fs);
-	if (size != sizeof(struct v2_disk_dqheader))
+	size = sb->s_op->quota_read(sb, type, (char *)&dqhead, sizeof(struct v2_disk_dqheader), 0);
+	if (size != sizeof(struct v2_disk_dqheader)) {
+		printk("failed read\n");
 		return 0;
+	}
 	if (le32_to_cpu(dqhead.dqh_magic) != quota_magics[type] ||
 	    le32_to_cpu(dqhead.dqh_version) != quota_versions[type])
 		return 0;
@@ -52,20 +47,15 @@
 /* Read information header from quota file */
 static int v2_read_file_info(struct super_block *sb, int type)
 {
-	mm_segment_t fs;
 	struct v2_disk_dqinfo dinfo;
 	struct mem_dqinfo *info = sb_dqopt(sb)->info+type;
-	struct file *f = sb_dqopt(sb)->files[type];
 	ssize_t size;
-	loff_t offset = V2_DQINFOOFF;
 
-	fs = get_fs();
-	set_fs(KERNEL_DS);
-	size = f->f_op->read(f, (char *)&dinfo, sizeof(struct v2_disk_dqinfo), &offset);
-	set_fs(fs);
+	size = sb->s_op->quota_read(sb, type, (char *)&dinfo,
+	       sizeof(struct v2_disk_dqinfo), V2_DQINFOOFF);
 	if (size != sizeof(struct v2_disk_dqinfo)) {
 		printk(KERN_WARNING "Can't read info structure on device %s.\n",
-			f->f_dentry->d_sb->s_id);
+			sb->s_id);
 		return -1;
 	}
 	info->dqi_bgrace = le32_to_cpu(dinfo.dqi_bgrace);
@@ -80,12 +70,9 @@
 /* Write information header to quota file */
 static int v2_write_file_info(struct super_block *sb, int type)
 {
-	mm_segment_t fs;
 	struct v2_disk_dqinfo dinfo;
 	struct mem_dqinfo *info = sb_dqopt(sb)->info+type;
-	struct file *f = sb_dqopt(sb)->files[type];
 	ssize_t size;
-	loff_t offset = V2_DQINFOOFF;
 
 	spin_lock(&dq_data_lock);
 	info->dqi_flags &= ~DQF_INFO_DIRTY;
@@ -96,13 +83,11 @@
 	dinfo.dqi_blocks = cpu_to_le32(info->u.v2_i.dqi_blocks);
 	dinfo.dqi_free_blk = cpu_to_le32(info->u.v2_i.dqi_free_blk);
 	dinfo.dqi_free_entry = cpu_to_le32(info->u.v2_i.dqi_free_entry);
-	fs = get_fs();
-	set_fs(KERNEL_DS);
-	size = f->f_op->write(f, (char *)&dinfo, sizeof(struct v2_disk_dqinfo), &offset);
-	set_fs(fs);
+	size = sb->s_op->quota_write(sb, type, (char *)&dinfo,
+	       sizeof(struct v2_disk_dqinfo), V2_DQINFOOFF);
 	if (size != sizeof(struct v2_disk_dqinfo)) {
 		printk(KERN_WARNING "Can't write info structure on device %s.\n",
-			f->f_dentry->d_sb->s_id);
+			sb->s_id);
 		return -1;
 	}
 	return 0;
@@ -146,39 +131,24 @@
 	kfree(buf);
 }
 
-static ssize_t read_blk(struct file *filp, uint blk, dqbuf_t buf)
+static inline ssize_t read_blk(struct super_block *sb, int type, uint blk, dqbuf_t buf)
 {
-	mm_segment_t fs;
-	ssize_t ret;
-	loff_t offset = blk<<V2_DQBLKSIZE_BITS;
-
 	memset(buf, 0, V2_DQBLKSIZE);
-	fs = get_fs();
-	set_fs(KERNEL_DS);
-	ret = filp->f_op->read(filp, (char *)buf, V2_DQBLKSIZE, &offset);
-	set_fs(fs);
-	return ret;
+	return sb->s_op->quota_read(sb, type, (char *)buf,
+	       V2_DQBLKSIZE, blk << V2_DQBLKSIZE_BITS);
 }
 
-static ssize_t write_blk(struct file *filp, uint blk, dqbuf_t buf)
+static inline ssize_t write_blk(struct super_block *sb, int type, uint blk, dqbuf_t buf)
 {
-	mm_segment_t fs;
-	ssize_t ret;
-	loff_t offset = blk<<V2_DQBLKSIZE_BITS;
-
-	fs = get_fs();
-	set_fs(KERNEL_DS);
-	ret = filp->f_op->write(filp, (char *)buf, V2_DQBLKSIZE, &offset);
-	set_fs(fs);
-	return ret;
-
+	return sb->s_op->quota_write(sb, type, (char *)buf,
+	       V2_DQBLKSIZE, blk << V2_DQBLKSIZE_BITS);
 }
 
 /* Remove empty block from list and return it */
-static int get_free_dqblk(struct file *filp, int type)
+static int get_free_dqblk(struct super_block *sb, int type)
 {
 	dqbuf_t buf = getdqbuf();
-	struct mem_dqinfo *info = sb_dqinfo(filp->f_dentry->d_sb, type);
+	struct mem_dqinfo *info = sb_dqinfo(sb, type);
 	struct v2_disk_dqdbheader *dh = (struct v2_disk_dqdbheader *)buf;
 	int ret, blk;
 
@@ -186,17 +156,18 @@
 		return -ENOMEM;
 	if (info->u.v2_i.dqi_free_blk) {
 		blk = info->u.v2_i.dqi_free_blk;
-		if ((ret = read_blk(filp, blk, buf)) < 0)
+		if ((ret = read_blk(sb, type, blk, buf)) < 0)
 			goto out_buf;
 		info->u.v2_i.dqi_free_blk = le32_to_cpu(dh->dqdh_next_free);
 	}
 	else {
 		memset(buf, 0, V2_DQBLKSIZE);
-		if ((ret = write_blk(filp, info->u.v2_i.dqi_blocks, buf)) < 0)	/* Assure block allocation... */
+		/* Assure block allocation... */
+		if ((ret = write_blk(sb, type, info->u.v2_i.dqi_blocks, buf)) < 0)
 			goto out_buf;
 		blk = info->u.v2_i.dqi_blocks++;
 	}
-	mark_info_dirty(filp->f_dentry->d_sb, type);
+	mark_info_dirty(sb, type);
 	ret = blk;
 out_buf:
 	freedqbuf(buf);
@@ -204,9 +175,9 @@
 }
 
 /* Insert empty block to the list */
-static int put_free_dqblk(struct file *filp, int type, dqbuf_t buf, uint blk)
+static int put_free_dqblk(struct super_block *sb, int type, dqbuf_t buf, uint blk)
 {
-	struct mem_dqinfo *info = sb_dqinfo(filp->f_dentry->d_sb, type);
+	struct mem_dqinfo *info = sb_dqinfo(sb, type);
 	struct v2_disk_dqdbheader *dh = (struct v2_disk_dqdbheader *)buf;
 	int err;
 
@@ -214,17 +185,18 @@
 	dh->dqdh_prev_free = cpu_to_le32(0);
 	dh->dqdh_entries = cpu_to_le16(0);
 	info->u.v2_i.dqi_free_blk = blk;
-	mark_info_dirty(filp->f_dentry->d_sb, type);
-	if ((err = write_blk(filp, blk, buf)) < 0)	/* Some strange block. We had better leave it... */
+	mark_info_dirty(sb, type);
+	/* Some strange block. We had better leave it... */
+	if ((err = write_blk(sb, type, blk, buf)) < 0)
 		return err;
 	return 0;
 }
 
 /* Remove given block from the list of blocks with free entries */
-static int remove_free_dqentry(struct file *filp, int type, dqbuf_t buf, uint blk)
+static int remove_free_dqentry(struct super_block *sb, int type, dqbuf_t buf, uint blk)
 {
 	dqbuf_t tmpbuf = getdqbuf();
-	struct mem_dqinfo *info = sb_dqinfo(filp->f_dentry->d_sb, type);
+	struct mem_dqinfo *info = sb_dqinfo(sb, type);
 	struct v2_disk_dqdbheader *dh = (struct v2_disk_dqdbheader *)buf;
 	uint nextblk = le32_to_cpu(dh->dqdh_next_free), prevblk = le32_to_cpu(dh->dqdh_prev_free);
 	int err;
@@ -232,26 +204,27 @@
 	if (!tmpbuf)
 		return -ENOMEM;
 	if (nextblk) {
-		if ((err = read_blk(filp, nextblk, tmpbuf)) < 0)
+		if ((err = read_blk(sb, type, nextblk, tmpbuf)) < 0)
 			goto out_buf;
 		((struct v2_disk_dqdbheader *)tmpbuf)->dqdh_prev_free = dh->dqdh_prev_free;
-		if ((err = write_blk(filp, nextblk, tmpbuf)) < 0)
+		if ((err = write_blk(sb, type, nextblk, tmpbuf)) < 0)
 			goto out_buf;
 	}
 	if (prevblk) {
-		if ((err = read_blk(filp, prevblk, tmpbuf)) < 0)
+		if ((err = read_blk(sb, type, prevblk, tmpbuf)) < 0)
 			goto out_buf;
 		((struct v2_disk_dqdbheader *)tmpbuf)->dqdh_next_free = dh->dqdh_next_free;
-		if ((err = write_blk(filp, prevblk, tmpbuf)) < 0)
+		if ((err = write_blk(sb, type, prevblk, tmpbuf)) < 0)
 			goto out_buf;
 	}
 	else {
 		info->u.v2_i.dqi_free_entry = nextblk;
-		mark_info_dirty(filp->f_dentry->d_sb, type);
+		mark_info_dirty(sb, type);
 	}
 	freedqbuf(tmpbuf);
 	dh->dqdh_next_free = dh->dqdh_prev_free = cpu_to_le32(0);
-	if (write_blk(filp, blk, buf) < 0)	/* No matter whether write succeeds block is out of list */
+	/* No matter whether write succeeds block is out of list */
+	if (write_blk(sb, type, blk, buf) < 0)
 		printk(KERN_ERR "VFS: Can't write block (%u) with free entries.\n", blk);
 	return 0;
 out_buf:
@@ -260,10 +233,10 @@
 }
 
 /* Insert given block to the beginning of list with free entries */
-static int insert_free_dqentry(struct file *filp, int type, dqbuf_t buf, uint blk)
+static int insert_free_dqentry(struct super_block *sb, int type, dqbuf_t buf, uint blk)
 {
 	dqbuf_t tmpbuf = getdqbuf();
-	struct mem_dqinfo *info = sb_dqinfo(filp->f_dentry->d_sb, type);
+	struct mem_dqinfo *info = sb_dqinfo(sb, type);
 	struct v2_disk_dqdbheader *dh = (struct v2_disk_dqdbheader *)buf;
 	int err;
 
@@ -271,18 +244,18 @@
 		return -ENOMEM;
 	dh->dqdh_next_free = cpu_to_le32(info->u.v2_i.dqi_free_entry);
 	dh->dqdh_prev_free = cpu_to_le32(0);
-	if ((err = write_blk(filp, blk, buf)) < 0)
+	if ((err = write_blk(sb, type, blk, buf)) < 0)
 		goto out_buf;
 	if (info->u.v2_i.dqi_free_entry) {
-		if ((err = read_blk(filp, info->u.v2_i.dqi_free_entry, tmpbuf)) < 0)
+		if ((err = read_blk(sb, type, info->u.v2_i.dqi_free_entry, tmpbuf)) < 0)
 			goto out_buf;
 		((struct v2_disk_dqdbheader *)tmpbuf)->dqdh_prev_free = cpu_to_le32(blk);
-		if ((err = write_blk(filp, info->u.v2_i.dqi_free_entry, tmpbuf)) < 0)
+		if ((err = write_blk(sb, type, info->u.v2_i.dqi_free_entry, tmpbuf)) < 0)
 			goto out_buf;
 	}
 	freedqbuf(tmpbuf);
 	info->u.v2_i.dqi_free_entry = blk;
-	mark_info_dirty(filp->f_dentry->d_sb, type);
+	mark_info_dirty(sb, type);
 	return 0;
 out_buf:
 	freedqbuf(tmpbuf);
@@ -292,8 +265,8 @@
 /* Find space for dquot */
 static uint find_free_dqentry(struct dquot *dquot, int *err)
 {
-	struct file *filp = sb_dqopt(dquot->dq_sb)->files[dquot->dq_type];
-	struct mem_dqinfo *info = sb_dqopt(dquot->dq_sb)->info+dquot->dq_type;
+	struct super_block *sb = dquot->dq_sb;
+	struct mem_dqinfo *info = sb_dqopt(sb)->info+dquot->dq_type;
 	uint blk, i;
 	struct v2_disk_dqdbheader *dh;
 	struct v2_disk_dqblk *ddquot;
@@ -309,22 +282,23 @@
 	ddquot = GETENTRIES(buf);
 	if (info->u.v2_i.dqi_free_entry) {
 		blk = info->u.v2_i.dqi_free_entry;
-		if ((*err = read_blk(filp, blk, buf)) < 0)
+		if ((*err = read_blk(sb, dquot->dq_type, blk, buf)) < 0)
 			goto out_buf;
 	}
 	else {
-		blk = get_free_dqblk(filp, dquot->dq_type);
+		blk = get_free_dqblk(sb, dquot->dq_type);
 		if ((int)blk < 0) {
 			*err = blk;
 			freedqbuf(buf);
 			return 0;
 		}
 		memset(buf, 0, V2_DQBLKSIZE);
-		info->u.v2_i.dqi_free_entry = blk;	/* This is enough as block is already zeroed and entry list is empty... */
-		mark_info_dirty(dquot->dq_sb, dquot->dq_type);
+		/* This is enough as block is already zeroed and entry list is empty... */
+		info->u.v2_i.dqi_free_entry = blk;
+		mark_info_dirty(sb, dquot->dq_type);
 	}
 	if (le16_to_cpu(dh->dqdh_entries)+1 >= V2_DQSTRINBLK)	/* Block will be full? */
-		if ((*err = remove_free_dqentry(filp, dquot->dq_type, buf, blk)) < 0) {
+		if ((*err = remove_free_dqentry(sb, dquot->dq_type, buf, blk)) < 0) {
 			printk(KERN_ERR "VFS: find_free_dqentry(): Can't remove block (%u) from entry free list.\n", blk);
 			goto out_buf;
 		}
@@ -339,7 +313,7 @@
 		goto out_buf;
 	}
 #endif
-	if ((*err = write_blk(filp, blk, buf)) < 0) {
+	if ((*err = write_blk(sb, dquot->dq_type, blk, buf)) < 0) {
 		printk(KERN_ERR "VFS: find_free_dqentry(): Can't write quota data block %u.\n", blk);
 		goto out_buf;
 	}
@@ -354,7 +328,7 @@
 /* Insert reference to structure into the trie */
 static int do_insert_tree(struct dquot *dquot, uint *treeblk, int depth)
 {
-	struct file *filp = sb_dqopt(dquot->dq_sb)->files[dquot->dq_type];
+	struct super_block *sb = dquot->dq_sb;
 	dqbuf_t buf;
 	int ret = 0, newson = 0, newact = 0;
 	__le32 *ref;
@@ -363,7 +337,7 @@
 	if (!(buf = getdqbuf()))
 		return -ENOMEM;
 	if (!*treeblk) {
-		ret = get_free_dqblk(filp, dquot->dq_type);
+		ret = get_free_dqblk(sb, dquot->dq_type);
 		if (ret < 0)
 			goto out_buf;
 		*treeblk = ret;
@@ -371,7 +345,7 @@
 		newact = 1;
 	}
 	else {
-		if ((ret = read_blk(filp, *treeblk, buf)) < 0) {
+		if ((ret = read_blk(sb, dquot->dq_type, *treeblk, buf)) < 0) {
 			printk(KERN_ERR "VFS: Can't read tree quota block %u.\n", *treeblk);
 			goto out_buf;
 		}
@@ -394,10 +368,10 @@
 		ret = do_insert_tree(dquot, &newblk, depth+1);
 	if (newson && ret >= 0) {
 		ref[GETIDINDEX(dquot->dq_id, depth)] = cpu_to_le32(newblk);
-		ret = write_blk(filp, *treeblk, buf);
+		ret = write_blk(sb, dquot->dq_type, *treeblk, buf);
 	}
 	else if (newact && ret < 0)
-		put_free_dqblk(filp, dquot->dq_type, buf, *treeblk);
+		put_free_dqblk(sb, dquot->dq_type, buf, *treeblk);
 out_buf:
 	freedqbuf(buf);
 	return ret;
@@ -416,20 +390,15 @@
 static int v2_write_dquot(struct dquot *dquot)
 {
 	int type = dquot->dq_type;
-	struct file *filp;
-	mm_segment_t fs;
-	loff_t offset;
 	ssize_t ret;
 	struct v2_disk_dqblk ddquot, empty;
 
 	/* dq_off is guarded by dqio_sem */
 	if (!dquot->dq_off)
 		if ((ret = dq_insert_tree(dquot)) < 0) {
-			printk(KERN_ERR "VFS: Error %Zd occurred while creating quota.\n", ret);
+			printk(KERN_ERR "VFS: Error %d occurred while creating quota.\n", ret);
 			return ret;
 		}
-	filp = sb_dqopt(dquot->dq_sb)->files[type];
-	offset = dquot->dq_off;
 	spin_lock(&dq_data_lock);
 	mem2diskdqb(&ddquot, &dquot->dq_dqb, dquot->dq_id);
 	/* Argh... We may need to write structure full of zeroes but that would be
@@ -439,10 +408,8 @@
 	if (!memcmp(&empty, &ddquot, sizeof(struct v2_disk_dqblk)))
 		ddquot.dqb_itime = cpu_to_le64(1);
 	spin_unlock(&dq_data_lock);
-	fs = get_fs();
-	set_fs(KERNEL_DS);
-	ret = filp->f_op->write(filp, (char *)&ddquot, sizeof(struct v2_disk_dqblk), &offset);
-	set_fs(fs);
+	ret = dquot->dq_sb->s_op->quota_write(dquot->dq_sb, type,
+	      (char *)&ddquot, sizeof(struct v2_disk_dqblk), dquot->dq_off);
 	if (ret != sizeof(struct v2_disk_dqblk)) {
 		printk(KERN_WARNING "VFS: dquota write failed on dev %s\n", dquot->dq_sb->s_id);
 		if (ret >= 0)
@@ -458,7 +425,8 @@
 /* Free dquot entry in data block */
 static int free_dqentry(struct dquot *dquot, uint blk)
 {
-	struct file *filp = sb_dqopt(dquot->dq_sb)->files[dquot->dq_type];
+	struct super_block *sb = dquot->dq_sb;
+	int type = dquot->dq_type;
 	struct v2_disk_dqdbheader *dh;
 	dqbuf_t buf = getdqbuf();
 	int ret = 0;
@@ -466,34 +434,39 @@
 	if (!buf)
 		return -ENOMEM;
 	if (dquot->dq_off >> V2_DQBLKSIZE_BITS != blk) {
-		printk(KERN_ERR "VFS: Quota structure has offset to other block (%u) than it should (%u).\n", blk, (uint)(dquot->dq_off >> V2_DQBLKSIZE_BITS));
+		printk(KERN_ERR "VFS: Quota structure has offset to other "
+		  "block (%u) than it should (%u).\n", blk,
+		  (uint)(dquot->dq_off >> V2_DQBLKSIZE_BITS));
 		goto out_buf;
 	}
-	if ((ret = read_blk(filp, blk, buf)) < 0) {
+	if ((ret = read_blk(sb, type, blk, buf)) < 0) {
 		printk(KERN_ERR "VFS: Can't read quota data block %u\n", blk);
 		goto out_buf;
 	}
 	dh = (struct v2_disk_dqdbheader *)buf;
 	dh->dqdh_entries = cpu_to_le16(le16_to_cpu(dh->dqdh_entries)-1);
 	if (!le16_to_cpu(dh->dqdh_entries)) {	/* Block got free? */
-		if ((ret = remove_free_dqentry(filp, dquot->dq_type, buf, blk)) < 0 ||
-		    (ret = put_free_dqblk(filp, dquot->dq_type, buf, blk)) < 0) {
-			printk(KERN_ERR "VFS: Can't move quota data block (%u) to free list.\n", blk);
+		if ((ret = remove_free_dqentry(sb, type, buf, blk)) < 0 ||
+		    (ret = put_free_dqblk(sb, type, buf, blk)) < 0) {
+			printk(KERN_ERR "VFS: Can't move quota data block (%u) "
+			  "to free list.\n", blk);
 			goto out_buf;
 		}
 	}
 	else {
-		memset(buf+(dquot->dq_off & ((1 << V2_DQBLKSIZE_BITS)-1)), 0, sizeof(struct v2_disk_dqblk));
+		memset(buf+(dquot->dq_off & ((1 << V2_DQBLKSIZE_BITS)-1)), 0,
+		  sizeof(struct v2_disk_dqblk));
 		if (le16_to_cpu(dh->dqdh_entries) == V2_DQSTRINBLK-1) {
 			/* Insert will write block itself */
-			if ((ret = insert_free_dqentry(filp, dquot->dq_type, buf, blk)) < 0) {
+			if ((ret = insert_free_dqentry(sb, type, buf, blk)) < 0) {
 				printk(KERN_ERR "VFS: Can't insert quota data block (%u) to free entry list.\n", blk);
 				goto out_buf;
 			}
 		}
 		else
-			if ((ret = write_blk(filp, blk, buf)) < 0) {
-				printk(KERN_ERR "VFS: Can't write quota data block %u\n", blk);
+			if ((ret = write_blk(sb, type, blk, buf)) < 0) {
+				printk(KERN_ERR "VFS: Can't write quota data "
+				  "block %u\n", blk);
 				goto out_buf;
 			}
 	}
@@ -506,7 +479,8 @@
 /* Remove reference to dquot from tree */
 static int remove_tree(struct dquot *dquot, uint *blk, int depth)
 {
-	struct file *filp = sb_dqopt(dquot->dq_sb)->files[dquot->dq_type];
+	struct super_block *sb = dquot->dq_sb;
+	int type = dquot->dq_type;
 	dqbuf_t buf = getdqbuf();
 	int ret = 0;
 	uint newblk;
@@ -514,7 +488,7 @@
 	
 	if (!buf)
 		return -ENOMEM;
-	if ((ret = read_blk(filp, *blk, buf)) < 0) {
+	if ((ret = read_blk(sb, type, *blk, buf)) < 0) {
 		printk(KERN_ERR "VFS: Can't read quota data block %u\n", *blk);
 		goto out_buf;
 	}
@@ -530,12 +504,13 @@
 		ref[GETIDINDEX(dquot->dq_id, depth)] = cpu_to_le32(0);
 		for (i = 0; i < V2_DQBLKSIZE && !buf[i]; i++);	/* Block got empty? */
 		if (i == V2_DQBLKSIZE) {
-			put_free_dqblk(filp, dquot->dq_type, buf, *blk);
+			put_free_dqblk(sb, type, buf, *blk);
 			*blk = 0;
 		}
 		else
-			if ((ret = write_blk(filp, *blk, buf)) < 0)
-				printk(KERN_ERR "VFS: Can't write quota tree block %u.\n", *blk);
+			if ((ret = write_blk(sb, type, *blk, buf)) < 0)
+				printk(KERN_ERR "VFS: Can't write quota tree "
+				  "block %u.\n", *blk);
 	}
 out_buf:
 	freedqbuf(buf);
@@ -555,7 +530,6 @@
 /* Find entry in block */
 static loff_t find_block_dqentry(struct dquot *dquot, uint blk)
 {
-	struct file *filp = sb_dqopt(dquot->dq_sb)->files[dquot->dq_type];
 	dqbuf_t buf = getdqbuf();
 	loff_t ret = 0;
 	int i;
@@ -563,27 +537,31 @@
 
 	if (!buf)
 		return -ENOMEM;
-	if ((ret = read_blk(filp, blk, buf)) < 0) {
+	if ((ret = read_blk(dquot->dq_sb, dquot->dq_type, blk, buf)) < 0) {
 		printk(KERN_ERR "VFS: Can't read quota tree block %u.\n", blk);
 		goto out_buf;
 	}
 	if (dquot->dq_id)
-		for (i = 0; i < V2_DQSTRINBLK && le32_to_cpu(ddquot[i].dqb_id) != dquot->dq_id; i++);
+		for (i = 0; i < V2_DQSTRINBLK &&
+		     le32_to_cpu(ddquot[i].dqb_id) != dquot->dq_id; i++);
 	else {	/* ID 0 as a bit more complicated searching... */
 		struct v2_disk_dqblk fakedquot;
 
 		memset(&fakedquot, 0, sizeof(struct v2_disk_dqblk));
 		for (i = 0; i < V2_DQSTRINBLK; i++)
-			if (!le32_to_cpu(ddquot[i].dqb_id) && memcmp(&fakedquot, ddquot+i, sizeof(struct v2_disk_dqblk)))
+			if (!le32_to_cpu(ddquot[i].dqb_id) &&
+			    memcmp(&fakedquot, ddquot+i, sizeof(struct v2_disk_dqblk)))
 				break;
 	}
 	if (i == V2_DQSTRINBLK) {
-		printk(KERN_ERR "VFS: Quota for id %u referenced but not present.\n", dquot->dq_id);
+		printk(KERN_ERR "VFS: Quota for id %u referenced "
+		  "but not present.\n", dquot->dq_id);
 		ret = -EIO;
 		goto out_buf;
 	}
 	else
-		ret = (blk << V2_DQBLKSIZE_BITS) + sizeof(struct v2_disk_dqdbheader) + i * sizeof(struct v2_disk_dqblk);
+		ret = (blk << V2_DQBLKSIZE_BITS) + sizeof(struct
+		  v2_disk_dqdbheader) + i * sizeof(struct v2_disk_dqblk);
 out_buf:
 	freedqbuf(buf);
 	return ret;
@@ -592,14 +570,13 @@
 /* Find entry for given id in the tree */
 static loff_t find_tree_dqentry(struct dquot *dquot, uint blk, int depth)
 {
-	struct file *filp = sb_dqopt(dquot->dq_sb)->files[dquot->dq_type];
 	dqbuf_t buf = getdqbuf();
 	loff_t ret = 0;
 	__le32 *ref = (__le32 *)buf;
 
 	if (!buf)
 		return -ENOMEM;
-	if ((ret = read_blk(filp, blk, buf)) < 0) {
+	if ((ret = read_blk(dquot->dq_sb, dquot->dq_type, blk, buf)) < 0) {
 		printk(KERN_ERR "VFS: Can't read quota tree block %u.\n", blk);
 		goto out_buf;
 	}
@@ -625,16 +602,13 @@
 static int v2_read_dquot(struct dquot *dquot)
 {
 	int type = dquot->dq_type;
-	struct file *filp;
-	mm_segment_t fs;
 	loff_t offset;
 	struct v2_disk_dqblk ddquot, empty;
 	int ret = 0;
 
-	filp = sb_dqopt(dquot->dq_sb)->files[type];
-
 #ifdef __QUOTA_V2_PARANOIA
-	if (!filp || !dquot->dq_sb) {	/* Invalidated quota? */
+	/* Invalidated quota? */
+	if (!dquot->dq_sb || !sb_dqopt(dquot->dq_sb)->files[type]) {
 		printk(KERN_ERR "VFS: Quota invalidated while reading!\n");
 		return -EIO;
 	}
@@ -642,7 +616,8 @@
 	offset = find_dqentry(dquot);
 	if (offset <= 0) {	/* Entry not present? */
 		if (offset < 0)
-			printk(KERN_ERR "VFS: Can't read quota structure for id %u.\n", dquot->dq_id);
+			printk(KERN_ERR "VFS: Can't read quota "
+			  "structure for id %u.\n", dquot->dq_id);
 		dquot->dq_off = 0;
 		set_bit(DQ_FAKE_B, &dquot->dq_flags);
 		memset(&dquot->dq_dqb, 0, sizeof(struct mem_dqblk));
@@ -650,12 +625,13 @@
 	}
 	else {
 		dquot->dq_off = offset;
-		fs = get_fs();
-		set_fs(KERNEL_DS);
-		if ((ret = filp->f_op->read(filp, (char *)&ddquot, sizeof(struct v2_disk_dqblk), &offset)) != sizeof(struct v2_disk_dqblk)) {
+		if ((ret = dquot->dq_sb->s_op->quota_read(dquot->dq_sb, type,
+		    (char *)&ddquot, sizeof(struct v2_disk_dqblk), offset))
+		    != sizeof(struct v2_disk_dqblk)) {
 			if (ret >= 0)
 				ret = -EIO;
-			printk(KERN_ERR "VFS: Error while reading quota structure for id %u.\n", dquot->dq_id);
+			printk(KERN_ERR "VFS: Error while reading quota "
+			  "structure for id %u.\n", dquot->dq_id);
 			memset(&ddquot, 0, sizeof(struct v2_disk_dqblk));
 		}
 		else {
@@ -666,7 +642,6 @@
 			if (!memcmp(&empty, &ddquot, sizeof(struct v2_disk_dqblk)))
 				ddquot.dqb_itime = 0;
 		}
-		set_fs(fs);
 		disk2memdqb(&dquot->dq_dqb, &ddquot);
 		if (!dquot->dq_dqb.dqb_bhardlimit &&
 			!dquot->dq_dqb.dqb_bsoftlimit &&
diff -Nru a/fs/ramfs/inode.c b/fs/ramfs/inode.c
--- a/fs/ramfs/inode.c	2005-01-10 20:11:18 -08:00
+++ b/fs/ramfs/inode.c	2005-01-10 20:11:18 -08:00
@@ -186,6 +186,7 @@
 	sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
 	sb->s_magic = RAMFS_MAGIC;
 	sb->s_op = &ramfs_ops;
+	sb->s_time_gran = 1;
 	inode = ramfs_get_inode(sb, S_IFDIR | 0755, 0);
 	if (!inode)
 		return -ENOMEM;
diff -Nru a/fs/read_write.c b/fs/read_write.c
--- a/fs/read_write.c	2005-01-10 20:11:20 -08:00
+++ b/fs/read_write.c	2005-01-10 20:11:20 -08:00
@@ -216,8 +216,11 @@
 				ret = file->f_op->read(file, buf, count, pos);
 			else
 				ret = do_sync_read(file, buf, count, pos);
-			if (ret > 0)
+			if (ret > 0) {
 				dnotify_parent(file->f_dentry, DN_ACCESS);
+				current->rchar += ret;
+			}
+			current->syscr++;
 		}
 	}
 
@@ -260,8 +263,11 @@
 				ret = file->f_op->write(file, buf, count, pos);
 			else
 				ret = do_sync_write(file, buf, count, pos);
-			if (ret > 0)
+			if (ret > 0) {
 				dnotify_parent(file->f_dentry, DN_MODIFY);
+				current->wchar += ret;
+			}
+			current->syscw++;
 		}
 	}
 
@@ -540,6 +546,9 @@
 		fput_light(file, fput_needed);
 	}
 
+	if (ret > 0)
+		current->rchar += ret;
+	current->syscr++;
 	return ret;
 }
 
@@ -558,6 +567,9 @@
 		fput_light(file, fput_needed);
 	}
 
+	if (ret > 0)
+		current->wchar += ret;
+	current->syscw++;
 	return ret;
 }
 
@@ -635,6 +647,13 @@
 	}
 
 	retval = in_file->f_op->sendfile(in_file, ppos, count, file_send_actor, out_file);
+
+	if (retval > 0) {
+		current->rchar += retval;
+		current->wchar += retval;
+	}
+	current->syscr++;
+	current->syscw++;
 
 	if (*ppos > max)
 		retval = -EOVERFLOW;
diff -Nru a/fs/readdir.c b/fs/readdir.c
--- a/fs/readdir.c	2005-01-10 20:11:19 -08:00
+++ b/fs/readdir.c	2005-01-10 20:11:19 -08:00
@@ -287,8 +287,9 @@
 	lastdirent = buf.previous;
 	if (lastdirent) {
 		typeof(lastdirent->d_off) d_off = file->f_pos;
-		__put_user(d_off, &lastdirent->d_off);
 		error = count - buf.count;
+		if (__put_user(d_off, &lastdirent->d_off))
+			error = -EFAULT;
 	}
 
 out_putf:
diff -Nru a/fs/reiserfs/bitmap.c b/fs/reiserfs/bitmap.c
--- a/fs/reiserfs/bitmap.c	2005-01-10 20:11:20 -08:00
+++ b/fs/reiserfs/bitmap.c	2005-01-10 20:11:20 -08:00
@@ -405,7 +405,7 @@
 }
 
 /* preallocated blocks don't need to be run through journal_mark_freed */
-void reiserfs_free_prealloc_block (struct reiserfs_transaction_handle *th, 
+static void reiserfs_free_prealloc_block (struct reiserfs_transaction_handle *th,
 			  struct inode *inode, b_blocknr_t block) {
     RFALSE(!th->t_super, "vs-4060: trying to free block on nonexistent device");
     RFALSE(is_reusable (th->t_super, block, 1) == 0, "vs-4070: can not free such block");
@@ -956,14 +956,14 @@
     if (!hint->formatted_node) {
         int quota_ret;
 #ifdef REISERQUOTA_DEBUG
-	reiserfs_debug (s, "reiserquota: allocating %d blocks id=%u", amount_needed, hint->inode->i_uid);
+	reiserfs_debug (s, REISERFS_DEBUG_CODE, "reiserquota: allocating %d blocks id=%u", amount_needed, hint->inode->i_uid);
 #endif
 	quota_ret = DQUOT_ALLOC_BLOCK_NODIRTY(hint->inode, amount_needed);
 	if (quota_ret)    /* Quota exceeded? */
 	    return QUOTA_EXCEEDED;
 	if (hint->preallocate && hint->prealloc_size ) {
 #ifdef REISERQUOTA_DEBUG
-	    reiserfs_debug (s, "reiserquota: allocating (prealloc) %d blocks id=%u", hint->prealloc_size, hint->inode->i_uid);
+	    reiserfs_debug (s, REISERFS_DEBUG_CODE, "reiserquota: allocating (prealloc) %d blocks id=%u", hint->prealloc_size, hint->inode->i_uid);
 #endif
 	    quota_ret = DQUOT_PREALLOC_BLOCK_NODIRTY(hint->inode, hint->prealloc_size);
 	    if (quota_ret)
@@ -1009,7 +1009,7 @@
 	    /* Free the blocks */
 	    if (!hint->formatted_node) {
 #ifdef REISERQUOTA_DEBUG
-		reiserfs_debug (s, "reiserquota: freeing (nospace) %d blocks id=%u", amount_needed + hint->prealloc_size - nr_allocated, hint->inode->i_uid);
+		reiserfs_debug (s, REISERFS_DEBUG_CODE, "reiserquota: freeing (nospace) %d blocks id=%u", amount_needed + hint->prealloc_size - nr_allocated, hint->inode->i_uid);
 #endif
 		DQUOT_FREE_BLOCK_NODIRTY(hint->inode, amount_needed + hint->prealloc_size - nr_allocated);     /* Free not allocated blocks */
 	    }
@@ -1029,7 +1029,7 @@
 	 nr_allocated + REISERFS_I(hint->inode)->i_prealloc_count) {
     /* Some of preallocation blocks were not allocated */
 #ifdef REISERQUOTA_DEBUG
-	reiserfs_debug (s, "reiserquota: freeing (failed prealloc) %d blocks id=%u", amount_needed + hint->prealloc_size - nr_allocated - INODE_INFO(hint->inode)->i_prealloc_count, hint->inode->i_uid);
+	reiserfs_debug (s, REISERFS_DEBUG_CODE, "reiserquota: freeing (failed prealloc) %d blocks id=%u", amount_needed + hint->prealloc_size - nr_allocated - REISERFS_I(hint->inode)->i_prealloc_count, hint->inode->i_uid);
 #endif
 	DQUOT_FREE_BLOCK_NODIRTY(hint->inode, amount_needed +
 	                         hint->prealloc_size - nr_allocated -
diff -Nru a/fs/reiserfs/dir.c b/fs/reiserfs/dir.c
--- a/fs/reiserfs/dir.c	2005-01-10 20:11:19 -08:00
+++ b/fs/reiserfs/dir.c	2005-01-10 20:11:19 -08:00
@@ -15,7 +15,7 @@
 extern struct reiserfs_key  MIN_KEY;
 
 static int reiserfs_readdir (struct file *, void *, filldir_t);
-int reiserfs_dir_fsync(struct file *filp, struct dentry *dentry, int datasync) ;
+static int reiserfs_dir_fsync(struct file *filp, struct dentry *dentry, int datasync) ;
 
 struct file_operations reiserfs_dir_operations = {
     .read	= generic_read_dir,
@@ -24,7 +24,7 @@
     .ioctl	= reiserfs_ioctl,
 };
 
-int reiserfs_dir_fsync(struct file *filp, struct dentry *dentry, int datasync) {
+static int reiserfs_dir_fsync(struct file *filp, struct dentry *dentry, int datasync) {
   struct inode *inode = dentry->d_inode;
   int err;
   reiserfs_write_lock(inode->i_sb);
diff -Nru a/fs/reiserfs/do_balan.c b/fs/reiserfs/do_balan.c
--- a/fs/reiserfs/do_balan.c	2005-01-10 20:11:16 -08:00
+++ b/fs/reiserfs/do_balan.c	2005-01-10 20:11:16 -08:00
@@ -1382,7 +1382,7 @@
 }
 
 
-void check_after_balance_leaf (struct tree_balance * tb)
+static void check_after_balance_leaf (struct tree_balance * tb)
 {
     if (tb->lnum[0]) {
 	if (B_FREE_SPACE (tb->L[0]) != 
@@ -1422,14 +1422,14 @@
 }
 
 
-void check_leaf_level (struct tree_balance * tb)
+static void check_leaf_level (struct tree_balance * tb)
 {
   check_leaf (tb->L[0]);
   check_leaf (tb->R[0]);
   check_leaf (PATH_PLAST_BUFFER (tb->tb_path));
 }
 
-void check_internal_levels (struct tree_balance * tb)
+static void check_internal_levels (struct tree_balance * tb)
 {
   int h;
 
diff -Nru a/fs/reiserfs/file.c b/fs/reiserfs/file.c
--- a/fs/reiserfs/file.c	2005-01-10 20:11:15 -08:00
+++ b/fs/reiserfs/file.c	2005-01-10 20:11:15 -08:00
@@ -54,7 +54,7 @@
     /* freeing preallocation only involves relogging blocks that
      * are already in the current transaction.  preallocation gets
      * freed at the end of each transaction, so it is impossible for
-     * us to log any additional blocks
+     * us to log any additional blocks (including quota blocks)
      */
     err = journal_begin(&th, inode->i_sb, 1);
     if (err) {
@@ -147,7 +147,7 @@
 /* Allocates blocks for a file to fulfil write request.
    Maps all unmapped but prepared pages from the list.
    Updates metadata with newly allocated blocknumbers as needed */
-int reiserfs_allocate_blocks_for_region(
+static int reiserfs_allocate_blocks_for_region(
 				struct reiserfs_transaction_handle *th,
 				struct inode *inode, /* Inode we work with */
 				loff_t pos, /* Writing position */
@@ -201,7 +201,7 @@
     /* If we came here, it means we absolutely need to open a transaction,
        since we need to allocate some blocks */
     reiserfs_write_lock(inode->i_sb); // Journaling stuff and we need that.
-    res = journal_begin(th, inode->i_sb, JOURNAL_PER_BALANCE_CNT * 3 + 1); // Wish I know if this number enough
+    res = journal_begin(th, inode->i_sb, JOURNAL_PER_BALANCE_CNT * 3 + 1 + 2 * REISERFS_QUOTA_TRANS_BLOCKS); // Wish I know if this number enough
     if (res)
         goto error_exit;
     reiserfs_update_inode_transaction(inode) ;
@@ -576,7 +576,7 @@
         int err;
         // update any changes we made to blk count
         reiserfs_update_sd(th, inode);
-        err = journal_end(th, inode->i_sb, JOURNAL_PER_BALANCE_CNT * 3 + 1);
+        err = journal_end(th, inode->i_sb, JOURNAL_PER_BALANCE_CNT * 3 + 1 + 2 * REISERFS_QUOTA_TRANS_BLOCKS);
         if (err)
             res = err;
     }
@@ -587,7 +587,7 @@
 }
 
 /* Unlock pages prepared by reiserfs_prepare_file_region_for_write */
-void reiserfs_unprepare_pages(struct page **prepared_pages, /* list of locked pages */
+static void reiserfs_unprepare_pages(struct page **prepared_pages, /* list of locked pages */
 			      int num_pages /* amount of pages */) {
     int i; // loop counter
 
@@ -602,7 +602,7 @@
 
 /* This function will copy data from userspace to specified pages within
    supplied byte range */
-int reiserfs_copy_from_user_to_file_region(
+static int reiserfs_copy_from_user_to_file_region(
 				loff_t pos, /* In-file position */
 				int num_pages, /* Number of pages affected */
 				int write_bytes, /* Amount of bytes to write */
@@ -714,7 +714,7 @@
 /* Submit pages for write. This was separated from actual file copying
    because we might want to allocate block numbers in-between.
    This function assumes that caller will adjust file size to correct value. */
-int reiserfs_submit_file_region_for_write(
+static int reiserfs_submit_file_region_for_write(
 				struct reiserfs_transaction_handle *th,
 				struct inode *inode,
 				loff_t pos, /* Writing position offset */
@@ -795,7 +795,7 @@
 
 /* Look if passed writing region is going to touch file's tail
    (if it is present). And if it is, convert the tail to unformatted node */
-int reiserfs_check_for_tail_and_convert( struct inode *inode, /* inode to deal with */
+static int reiserfs_check_for_tail_and_convert( struct inode *inode, /* inode to deal with */
 					 loff_t pos, /* Writing position */
 					 int write_bytes /* amount of bytes to write */
 				        )
@@ -851,7 +851,7 @@
    append), it is zeroed, then. 
    Returns number of unallocated blocks that should be allocated to cover
    new file data.*/
-int reiserfs_prepare_file_region_for_write(
+static int reiserfs_prepare_file_region_for_write(
 				struct inode *inode /* Inode of the file */,
 				loff_t pos, /* position in the file */
 				int num_pages, /* number of pages to
@@ -1148,7 +1148,7 @@
    Future Features: providing search_by_key with hints.
 
 */
-ssize_t reiserfs_file_write( struct file *file, /* the file we are going to write into */
+static ssize_t reiserfs_file_write( struct file *file, /* the file we are going to write into */
                              const char __user *buf, /*  pointer to user supplied data
 (in userspace) */
                              size_t count, /* amount of bytes to write */
diff -Nru a/fs/reiserfs/fix_node.c b/fs/reiserfs/fix_node.c
--- a/fs/reiserfs/fix_node.c	2005-01-10 20:11:17 -08:00
+++ b/fs/reiserfs/fix_node.c	2005-01-10 20:11:17 -08:00
@@ -724,7 +724,7 @@
 }
 
 
-void free_buffers_in_tb (
+static void free_buffers_in_tb (
 		       struct tree_balance * p_s_tb
 		       ) {
   int n_counter;
diff -Nru a/fs/reiserfs/ibalance.c b/fs/reiserfs/ibalance.c
--- a/fs/reiserfs/ibalance.c	2005-01-10 20:11:19 -08:00
+++ b/fs/reiserfs/ibalance.c	2005-01-10 20:11:19 -08:00
@@ -698,7 +698,7 @@
 
 
 /* Replace delimiting key of buffers L[h] and S[h] by the given key.*/
-void	replace_lkey (
+static void replace_lkey (
 		      struct tree_balance * tb,
 		      int h,
 		      struct item_head * key
@@ -718,7 +718,7 @@
 
 
 /* Replace delimiting key of buffers S[h] and R[h] by the given key.*/
-void	replace_rkey (
+static void replace_rkey (
 		      struct tree_balance * tb,
 		      int h,
 		      struct item_head * key
diff -Nru a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c
--- a/fs/reiserfs/inode.c	2005-01-10 20:11:17 -08:00
+++ b/fs/reiserfs/inode.c	2005-01-10 20:11:17 -08:00
@@ -20,27 +20,19 @@
 
 extern int reiserfs_default_io_size; /* default io size devuned in super.c */
 
-/* args for the create parameter of reiserfs_get_block */
-#define GET_BLOCK_NO_CREATE 0 /* don't create new blocks or convert tails */
-#define GET_BLOCK_CREATE 1    /* add anything you need to find block */
-#define GET_BLOCK_NO_HOLE 2   /* return -ENOENT for file holes */
-#define GET_BLOCK_READ_DIRECT 4  /* read the tail if indirect item not found */
-#define GET_BLOCK_NO_ISEM     8 /* i_sem is not held, don't preallocate */
-#define GET_BLOCK_NO_DANGLE   16 /* don't leave any transactions running */
-
-static int reiserfs_get_block (struct inode * inode, sector_t block,
-			       struct buffer_head * bh_result, int create);
 static int reiserfs_commit_write(struct file *f, struct page *page,
                                  unsigned from, unsigned to);
+static int reiserfs_prepare_write(struct file *f, struct page *page,
+				  unsigned from, unsigned to);
 
 void reiserfs_delete_inode (struct inode * inode)
 {
-    int jbegin_count = JOURNAL_PER_BALANCE_CNT * 2; 
+    /* We need blocks for transaction + (user+group) quota update (possibly delete) */
+    int jbegin_count = JOURNAL_PER_BALANCE_CNT * 2 + 2 * REISERFS_QUOTA_INIT_BLOCKS;
     struct reiserfs_transaction_handle th ;
   
     reiserfs_write_lock(inode->i_sb);
 
-    DQUOT_FREE_INODE(inode);
     /* The = 0 happens when we abort creating a new inode for some reason like lack of space.. */
     if (!(inode->i_state & I_NEW) && INODE_PKEY(inode)->k_objectid != 0) { /* also handles bad_inode case */
 	down (&inode->i_sem); 
@@ -58,6 +50,11 @@
 	    goto out;
 	}
 
+	/* Do quota update inside a transaction for journaled quotas. We must do that
+	 * after delete_object so that quota updates go into the same transaction as
+	 * stat data deletion */
+	DQUOT_FREE_INODE(inode);
+
 	if (journal_end(&th, inode->i_sb, jbegin_count)) {
 	    up (&inode->i_sem);
 	    goto out;
@@ -408,8 +405,8 @@
 
 // this is called to create file map. So, _get_block_create_0 will not
 // read direct item
-int reiserfs_bmap (struct inode * inode, sector_t block,
-		   struct buffer_head * bh_result, int create)
+static int reiserfs_bmap (struct inode * inode, sector_t block,
+			  struct buffer_head * bh_result, int create)
 {
     if (!file_capable (inode, block))
 	return -EFBIG;
@@ -592,8 +589,9 @@
         . 3 balancings in direct->indirect conversion
         . 1 block involved into reiserfs_update_sd()
        XXX in practically impossible worst case direct2indirect()
-       can incur (much) more that 3 balancings. */
-    int jbegin_count = JOURNAL_PER_BALANCE_CNT * 3 + 1;
+       can incur (much) more than 3 balancings.
+       quota update for user, group */
+    int jbegin_count = JOURNAL_PER_BALANCE_CNT * 3 + 1 + 2 * REISERFS_QUOTA_TRANS_BLOCKS;
     int version;
     int dangle = 1;
     loff_t new_offset = (((loff_t)block) << inode->i_sb->s_blocksize_bits) + 1 ;
@@ -1569,16 +1567,6 @@
     return 0;
 }
 
-/* FIXME: no need any more. right? */
-int reiserfs_sync_inode (struct reiserfs_transaction_handle *th, struct inode * inode)
-{
-  int err = 0;
-
-  reiserfs_update_sd (th, inode);
-  return err;
-}
-
-
 /* stat data of new object is inserted already, this inserts the item
    containing "." and ".." entries */
 static int reiserfs_new_directory (struct reiserfs_transaction_handle *th, 
@@ -1699,6 +1687,10 @@
 
     BUG_ON (!th->t_trans_id);
   
+    if (DQUOT_ALLOC_INODE(inode)) {
+	err = -EDQUOT;
+	goto out_end_trans;
+    }
     if (!dir || !dir->i_nlink) {
 	err = -EPERM;
 	goto out_bad_inode;
@@ -1736,7 +1728,8 @@
     if( S_ISLNK( inode -> i_mode ) )
 	    inode -> i_flags &= ~ ( S_IMMUTABLE | S_APPEND );
 
-    inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
+    inode->i_mtime = inode->i_atime = inode->i_ctime =
+	    CURRENT_TIME_SEC;
     inode->i_size = i_size;
     inode->i_blocks = 0;
     inode->i_bytes = 0;
@@ -1866,9 +1859,12 @@
     /* Invalidate the object, nothing was inserted yet */
     INODE_PKEY(inode)->k_objectid = 0;
 
-    /* dquot_drop must be done outside a transaction */
-    journal_end(th, th->t_super, th->t_blocks_allocated) ;
+    /* Quota change must be inside a transaction for journaling */
     DQUOT_FREE_INODE(inode);
+
+out_end_trans:
+    journal_end(th, th->t_super, th->t_blocks_allocated) ;
+    /* Drop can be outside and it needs more credits so it's better to have it outside */
     DQUOT_DROP(inode);
     inode->i_flags |= S_NOQUOTA;
     make_bad_inode(inode);
@@ -2416,7 +2412,7 @@
     return reiserfs_write_full_page(page, wbc) ;
 }
 
-int reiserfs_prepare_write(struct file *f, struct page *page, 
+static int reiserfs_prepare_write(struct file *f, struct page *page,
 			   unsigned from, unsigned to) {
     struct inode *inode = page->mapping->host ;
     int ret;
@@ -2796,8 +2792,25 @@
 	    (ia_valid & ATTR_GID && attr->ia_gid != inode->i_gid)) {
                 error = reiserfs_chown_xattrs (inode, attr);
 
-                if (!error)
+                if (!error) {
+		    struct reiserfs_transaction_handle th;
+
+		    /* (user+group)*(old+new) structure - we count quota info and , inode write (sb, inode) */
+		    journal_begin(&th, inode->i_sb, 4*REISERFS_QUOTA_INIT_BLOCKS+2);
                     error = DQUOT_TRANSFER(inode, attr) ? -EDQUOT : 0;
+		    if (error) {
+			journal_end(&th, inode->i_sb, 4*REISERFS_QUOTA_INIT_BLOCKS+2);
+			goto out;
+		    }
+		    /* Update corresponding info in inode so that everything is in
+		     * one transaction */
+		    if (attr->ia_valid & ATTR_UID)
+			inode->i_uid = attr->ia_uid;
+		    if (attr->ia_valid & ATTR_GID)
+			inode->i_gid = attr->ia_gid;
+		    mark_inode_dirty(inode);
+		    journal_end(&th, inode->i_sb, 4*REISERFS_QUOTA_INIT_BLOCKS+2);
+		}
         }
         if (!error)
             error = inode_setattr(inode, attr) ;
diff -Nru a/fs/reiserfs/ioctl.c b/fs/reiserfs/ioctl.c
--- a/fs/reiserfs/ioctl.c	2005-01-10 20:11:18 -08:00
+++ b/fs/reiserfs/ioctl.c	2005-01-10 20:11:18 -08:00
@@ -9,6 +9,8 @@
 #include <linux/pagemap.h>
 #include <linux/smp_lock.h>
 
+static int reiserfs_unpack (struct inode * inode, struct file * filp);
+
 /*
 ** reiserfs_ioctl - handler for ioctl for inode
 ** supported commands:
@@ -61,7 +63,7 @@
 		}
 		sd_attrs_to_i_attrs( flags, inode );
 		REISERFS_I(inode) -> i_attrs = flags;
-		inode->i_ctime = CURRENT_TIME;
+		inode->i_ctime = CURRENT_TIME_SEC;
 		mark_inode_dirty(inode);
 		return 0;
 	}
@@ -74,7 +76,7 @@
 			return -EROFS;
 		if (get_user(inode->i_generation, (int __user *) arg))
 			return -EFAULT;	
-		inode->i_ctime = CURRENT_TIME;
+		inode->i_ctime = CURRENT_TIME_SEC;
 		mark_inode_dirty(inode);
 		return 0;
 	default:
@@ -87,7 +89,7 @@
 ** Function try to convert tail from direct item into indirect.
 ** It set up nopack attribute in the REISERFS_I(inode)->nopack
 */
-int reiserfs_unpack (struct inode * inode, struct file * filp)
+static int reiserfs_unpack (struct inode * inode, struct file * filp)
 {
     int retval = 0;
     int index ;
diff -Nru a/fs/reiserfs/item_ops.c b/fs/reiserfs/item_ops.c
--- a/fs/reiserfs/item_ops.c	2005-01-10 20:11:21 -08:00
+++ b/fs/reiserfs/item_ops.c	2005-01-10 20:11:21 -08:00
@@ -110,7 +110,7 @@
 		      vi->vi_index, vi->vi_type, vi->vi_ih);
 }
 
-struct item_operations stat_data_ops = {
+static struct item_operations stat_data_ops = {
 	.bytes_number		= sd_bytes_number,
 	.decrement_key		= sd_decrement_key,
 	.is_left_mergeable	= sd_is_left_mergeable,
@@ -213,7 +213,7 @@
 		      vi->vi_index, vi->vi_type, vi->vi_ih);
 }
 
-struct item_operations direct_ops = {
+static struct item_operations direct_ops = {
 	.bytes_number		= direct_bytes_number,
 	.decrement_key		= direct_decrement_key,
 	.is_left_mergeable	= direct_is_left_mergeable,
@@ -367,7 +367,7 @@
 		      vi->vi_index, vi->vi_type, vi->vi_ih);
 }
 
-struct item_operations indirect_ops = {
+static struct item_operations indirect_ops = {
 	.bytes_number		= indirect_bytes_number,
 	.decrement_key		= indirect_decrement_key,
 	.is_left_mergeable	= indirect_is_left_mergeable,
@@ -660,7 +660,7 @@
     printk ("\n");
 }
 
-struct item_operations direntry_ops = {
+static struct item_operations direntry_ops = {
 	.bytes_number		= direntry_bytes_number,
 	.decrement_key		= direntry_decrement_key,
 	.is_left_mergeable	= direntry_is_left_mergeable,
@@ -750,7 +750,7 @@
     reiserfs_warning (NULL, "green-16011: Invalid item type observed, run fsck ASAP");
 }
 
-struct item_operations errcatch_ops = {
+static struct item_operations errcatch_ops = {
     errcatch_bytes_number,
     errcatch_decrement_key,
     errcatch_is_left_mergeable,
diff -Nru a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c
--- a/fs/reiserfs/journal.c	2005-01-10 20:11:20 -08:00
+++ b/fs/reiserfs/journal.c	2005-01-10 20:11:20 -08:00
@@ -436,19 +436,6 @@
   return (struct reiserfs_journal_cnode *)0 ;
 }
 
-/* returns a cnode with same size, block number and dev as bh in the current transaction hash.  NULL if not found */
-static inline struct reiserfs_journal_cnode *get_journal_hash(struct super_block *p_s_sb, struct buffer_head *bh) {
-  struct reiserfs_journal *journal = SB_JOURNAL (p_s_sb);
-  struct reiserfs_journal_cnode *cn ;
-  if (bh) {
-    cn =  get_journal_hash_dev(p_s_sb, journal->j_hash_table, bh->b_blocknr);
-  }
-  else {
-    return (struct reiserfs_journal_cnode *)0 ;
-  }
-  return cn ;
-}
-
 /*
 ** this actually means 'can this block be reallocated yet?'.  If you set search_all, a block can only be allocated
 ** if it is not in the current transaction, was not freed by the current transaction, and has no chance of ever
@@ -516,7 +503,7 @@
 
 /* insert cn into table
 */
-inline void insert_journal_hash(struct reiserfs_journal_cnode **table, struct reiserfs_journal_cnode *cn) {
+static inline void insert_journal_hash(struct reiserfs_journal_cnode **table, struct reiserfs_journal_cnode *cn) {
   struct reiserfs_journal_cnode *cn_orig ;
 
   cn_orig = journal_hash(table, cn->sb, cn->blocknr) ;
@@ -693,7 +680,7 @@
 }
 
 
-atomic_t nr_reiserfs_jh = ATOMIC_INIT(0);
+static atomic_t nr_reiserfs_jh = ATOMIC_INIT(0);
 static struct reiserfs_jh *alloc_jh(void) {
     struct reiserfs_jh *jh;
     while(1) {
@@ -1090,7 +1077,7 @@
   return NULL ;
 }
 
-void remove_journal_hash(struct super_block *, struct reiserfs_journal_cnode **,
+static void remove_journal_hash(struct super_block *, struct reiserfs_journal_cnode **,
 struct reiserfs_journal_list *, unsigned long, int);
 
 /*
@@ -2028,7 +2015,7 @@
    Right now it is only used from journal code. But later we might use it
    from other places.
    Note: Do not use journal_getblk/sb_getblk functions here! */
-struct buffer_head * reiserfs_breada (struct block_device *dev, int block, int bufsize,
+static struct buffer_head * reiserfs_breada (struct block_device *dev, int block, int bufsize,
 			    unsigned int max_block)
 {
 	struct buffer_head * bhlist[BUFNR];
@@ -3848,7 +3835,7 @@
   return journal->j_errno;
 }
 
-void
+static void
 __reiserfs_journal_abort_hard (struct super_block *sb)
 {
     struct reiserfs_journal *journal = SB_JOURNAL (sb);
@@ -3866,7 +3853,7 @@
 #endif
 }
 
-void
+static void
 __reiserfs_journal_abort_soft (struct super_block *sb, int errno)
 {
     struct reiserfs_journal *journal = SB_JOURNAL (sb);
diff -Nru a/fs/reiserfs/namei.c b/fs/reiserfs/namei.c
--- a/fs/reiserfs/namei.c	2005-01-10 20:11:19 -08:00
+++ b/fs/reiserfs/namei.c	2005-01-10 20:11:19 -08:00
@@ -534,7 +534,7 @@
     }
 
     dir->i_size += paste_size;
-    dir->i_mtime = dir->i_ctime = CURRENT_TIME;
+    dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC;
     if (!S_ISDIR (inode->i_mode) && visible)
 	// reiserfs_mkdir or reiserfs_rename will do that by itself
 	reiserfs_update_sd (th, dir);
@@ -545,7 +545,7 @@
 
 /* quota utility function, call if you've had to abort after calling
 ** new_inode_init, and have not called reiserfs_new_inode yet.
-** This should only be called on inodes that do not hav stat data
+** This should only be called on inodes that do not have stat data
 ** inserted into the tree yet.
 */
 static int drop_new_inode(struct inode *inode) {
@@ -557,10 +557,9 @@
 }
 
 /* utility function that does setup for reiserfs_new_inode.  
-** DQUOT_ALLOC_INODE cannot be called inside a transaction, so we had
-** to pull some bits of reiserfs_new_inode out into this func.
-** Yes, the actual quota calls are missing, they are part of the quota
-** patch.
+** DQUOT_INIT needs lots of credits so it's better to have it
+** outside of a transaction, so we had to pull some bits of
+** reiserfs_new_inode out into this func.
 */
 static int new_inode_init(struct inode *inode, struct inode *dir, int mode) {
 
@@ -578,10 +577,6 @@
         inode->i_gid = current->fsgid;
     }
     DQUOT_INIT(inode);
-    if (DQUOT_ALLOC_INODE(inode)) {
-        drop_new_inode(inode);
-	return -EDQUOT;
-    }
     return 0 ;
 }
 
@@ -590,16 +585,15 @@
 {
     int retval;
     struct inode * inode;
-    int jbegin_count = JOURNAL_PER_BALANCE_CNT * 2 ;
+    /* We need blocks for transaction + (user+group)*(quotas for new inode + update of quota for directory owner) */
+    int jbegin_count = JOURNAL_PER_BALANCE_CNT * 2 + 2 * (REISERFS_QUOTA_INIT_BLOCKS+REISERFS_QUOTA_TRANS_BLOCKS);
     struct reiserfs_transaction_handle th ;
     int locked;
 
     if (!(inode = new_inode(dir->i_sb))) {
 	return -ENOMEM ;
     }
-    retval = new_inode_init(inode, dir, mode);
-    if (retval)
-        return retval;
+    new_inode_init(inode, dir, mode);
 
     locked = reiserfs_cache_default_acl (dir);
 
@@ -658,7 +652,8 @@
     int retval;
     struct inode * inode;
     struct reiserfs_transaction_handle th ;
-    int jbegin_count = JOURNAL_PER_BALANCE_CNT * 3; 
+    /* We need blocks for transaction + (user+group)*(quotas for new inode + update of quota for directory owner) */
+    int jbegin_count = JOURNAL_PER_BALANCE_CNT * 3 + 2 * (REISERFS_QUOTA_INIT_BLOCKS+REISERFS_QUOTA_TRANS_BLOCKS);
     int locked;
 
     if (!new_valid_dev(rdev))
@@ -667,9 +662,7 @@
     if (!(inode = new_inode(dir->i_sb))) {
 	return -ENOMEM ;
     }
-    retval = new_inode_init(inode, dir, mode);
-    if (retval)
-        return retval;
+    new_inode_init(inode, dir, mode);
 
     locked = reiserfs_cache_default_acl (dir);
 
@@ -733,7 +726,8 @@
     int retval;
     struct inode * inode;
     struct reiserfs_transaction_handle th ;
-    int jbegin_count = JOURNAL_PER_BALANCE_CNT * 3; 
+    /* We need blocks for transaction + (user+group)*(quotas for new inode + update of quota for directory owner) */
+    int jbegin_count = JOURNAL_PER_BALANCE_CNT * 3 + 2 * (REISERFS_QUOTA_INIT_BLOCKS+REISERFS_QUOTA_TRANS_BLOCKS);
     int locked;
 
 #ifdef DISPLACE_NEW_PACKING_LOCALITIES
@@ -744,9 +738,7 @@
     if (!(inode = new_inode(dir->i_sb))) {
 	return -ENOMEM ;
     }
-    retval = new_inode_init(inode, dir, mode);
-    if (retval)
-        return retval;
+    new_inode_init(inode, dir, mode);
 
     locked = reiserfs_cache_default_acl (dir);
 
@@ -836,8 +828,9 @@
     struct reiserfs_dir_entry de;
 
 
-    /* we will be doing 2 balancings and update 2 stat data */
-    jbegin_count = JOURNAL_PER_BALANCE_CNT * 2 + 2;
+    /* we will be doing 2 balancings and update 2 stat data, we change quotas
+     * of the owner of the directory and of the owner of the parent directory */
+    jbegin_count = JOURNAL_PER_BALANCE_CNT * 2 + 2 + 2 * (REISERFS_QUOTA_INIT_BLOCKS+REISERFS_QUOTA_TRANS_BLOCKS);
 
     reiserfs_write_lock(dir->i_sb);
     retval = journal_begin(&th, dir->i_sb, jbegin_count) ;
@@ -881,7 +874,7 @@
 			  "!= 2 (%d)", __FUNCTION__, inode->i_nlink);
 
     inode->i_nlink = 0;
-    inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME;
+    inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC;
     reiserfs_update_sd (&th, inode);
 
     DEC_DIR_INODE_NLINK(dir)
@@ -920,8 +913,9 @@
     inode = dentry->d_inode;
 
     /* in this transaction we can be doing at max two balancings and update
-       two stat datas */
-    jbegin_count = JOURNAL_PER_BALANCE_CNT * 2 + 2;
+       two stat datas, we change quotas of the owner of the directory and of
+       the owner of the parent directory */
+    jbegin_count = JOURNAL_PER_BALANCE_CNT * 2 + 2 + 2 * (REISERFS_QUOTA_INIT_BLOCKS+REISERFS_QUOTA_TRANS_BLOCKS);
 
     reiserfs_write_lock(dir->i_sb);
     retval = journal_begin(&th, dir->i_sb, jbegin_count) ;
@@ -969,11 +963,11 @@
 	inode->i_nlink++;
 	goto end_unlink;
     }
-    inode->i_ctime = CURRENT_TIME;
+    inode->i_ctime = CURRENT_TIME_SEC;
     reiserfs_update_sd (&th, inode);
 
     dir->i_size -= (de.de_entrylen + DEH_SIZE);
-    dir->i_ctime = dir->i_mtime = CURRENT_TIME;
+    dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC;
     reiserfs_update_sd (&th, dir);
 
     if (!savelink)
@@ -1005,15 +999,13 @@
     int item_len;
     struct reiserfs_transaction_handle th ;
     int mode = S_IFLNK | S_IRWXUGO;
-    int jbegin_count = JOURNAL_PER_BALANCE_CNT * 3; 
+    /* We need blocks for transaction + (user+group)*(quotas for new inode + update of quota for directory owner) */
+    int jbegin_count = JOURNAL_PER_BALANCE_CNT * 3 + 2 * (REISERFS_QUOTA_INIT_BLOCKS+REISERFS_QUOTA_TRANS_BLOCKS);
 
     if (!(inode = new_inode(parent_dir->i_sb))) {
 	return -ENOMEM ;
     }
-    retval = new_inode_init(inode, parent_dir, mode);
-    if (retval) {
-        return retval;
-    }
+    new_inode_init(inode, parent_dir, mode);
 
     reiserfs_write_lock(parent_dir->i_sb);
     item_len = ROUND_UP (strlen (symname));
@@ -1083,7 +1075,8 @@
     int retval;
     struct inode *inode = old_dentry->d_inode;
     struct reiserfs_transaction_handle th ;
-    int jbegin_count = JOURNAL_PER_BALANCE_CNT * 3; 
+    /* We need blocks for transaction + update of quotas for the owners of the directory */
+    int jbegin_count = JOURNAL_PER_BALANCE_CNT * 3 + 2 * REISERFS_QUOTA_TRANS_BLOCKS;
 
     reiserfs_write_lock(dir->i_sb);
     if (inode->i_nlink >= REISERFS_LINK_MAX) {
@@ -1121,7 +1114,7 @@
 	return err ? err : retval;
     }
 
-    inode->i_ctime = CURRENT_TIME;
+    inode->i_ctime = CURRENT_TIME_SEC;
     reiserfs_update_sd (&th, inode);
 
     atomic_inc(&inode->i_count) ;
@@ -1201,8 +1194,9 @@
        (2) new directory and (3) maybe old object stat data (when it is
        directory) and (4) maybe stat data of object to which new entry
        pointed initially and (5) maybe block containing ".." of
-       renamed directory */
-    jbegin_count = JOURNAL_PER_BALANCE_CNT * 3 + 5;
+       renamed directory
+       quota updates: two parent directories */
+    jbegin_count = JOURNAL_PER_BALANCE_CNT * 3 + 5 + 4 * REISERFS_QUOTA_TRANS_BLOCKS;
 
     old_inode = old_dentry->d_inode;
     new_dentry_inode = new_dentry->d_inode;
@@ -1368,7 +1362,7 @@
 
     mark_de_hidden (old_de.de_deh + old_de.de_entry_num);
     journal_mark_dirty (&th, old_dir->i_sb, old_de.de_bh);
-    ctime = CURRENT_TIME;
+    ctime = CURRENT_TIME_SEC;
     old_dir->i_ctime = old_dir->i_mtime = ctime;
     new_dir->i_ctime = new_dir->i_mtime = ctime;
     /* thanks to Alex Adriaanse <alex_a@caltech.edu> for patch which adds ctime update of
diff -Nru a/fs/reiserfs/prints.c b/fs/reiserfs/prints.c
--- a/fs/reiserfs/prints.c	2005-01-10 20:11:20 -08:00
+++ b/fs/reiserfs/prints.c	2005-01-10 20:11:20 -08:00
@@ -286,7 +286,7 @@
 }
 
 /* No newline.. reiserfs_printk calls can be followed by printk's */
-void reiserfs_printk (const char * fmt, ...)
+static void reiserfs_printk (const char * fmt, ...)
 {
   do_reiserfs_warning(fmt);
   printk (error_buf);
@@ -366,30 +366,6 @@
 	 reiserfs_bdevname (sb), error_buf);
 }
 
-static void
-do_handle_error (struct super_block *sb, int errno)
-{
-    if (reiserfs_error_panic (sb)) {
-        panic ("REISERFS: panic (device %s): Panic forced after error\n",
-               reiserfs_bdevname (sb));
-    }
-
-    if (reiserfs_error_ro (sb)) {
-        printk (KERN_CRIT "REISERFS: error (device %s): Re-mounting fs "
-                "readonly\n", reiserfs_bdevname (sb));
-        reiserfs_journal_abort (sb, errno);
-    }
-}
-
-void
-reiserfs_error (struct super_block * sb, int errno, const char *fmt, ...)
-{
-    do_reiserfs_warning (fmt);
-    printk (KERN_CRIT "REISERFS: error (device %s): %s\n",
-            reiserfs_bdevname (sb), error_buf);
-    do_handle_error (sb, errno);
-}
-
 void
 reiserfs_abort (struct super_block *sb, int errno, const char *fmt, ...)
 {
@@ -410,53 +386,6 @@
     reiserfs_journal_abort (sb, errno);
 }
 
-void print_virtual_node (struct virtual_node * vn)
-{
-    int i;
-    struct virtual_item * vi;
-
-    printk ("VIRTUAL NODE CONTAINS %d items, has size %d,%s,%s, ITEM_POS=%d POS_IN_ITEM=%d MODE=\'%c\'\n",
-	    vn->vn_nr_item, vn->vn_size,
-	    (vn->vn_vi[0].vi_type & VI_TYPE_LEFT_MERGEABLE )? "left mergeable" : "", 
-	    (vn->vn_vi[vn->vn_nr_item - 1].vi_type & VI_TYPE_RIGHT_MERGEABLE) ? "right mergeable" : "",
-	    vn->vn_affected_item_num, vn->vn_pos_in_item, vn->vn_mode);
-    
-    vi = vn->vn_vi;
-    for (i = 0; i < vn->vn_nr_item; i ++, vi ++)
-	op_print_vi (vi);
-	
-}
-
-
-void print_path (struct tree_balance * tb, struct path * path)
-{
-    int h = 0;
-    struct buffer_head * bh;
-    
-    if (tb) {
-	while (tb->insert_size[h]) {
-	    bh = PATH_H_PBUFFER (path, h);
-	    printk ("block %llu (level=%d), position %d\n", bh ? (unsigned long long)bh->b_blocknr : 0LL,
-		    bh ? B_LEVEL (bh) : 0, PATH_H_POSITION (path, h));
-	    h ++;
-	}
-  } else {
-      int offset = path->path_length;
-      struct buffer_head * bh;
-      printk ("Offset    Bh     (b_blocknr, b_count) Position Nr_item\n");
-      while ( offset > ILLEGAL_PATH_ELEMENT_OFFSET ) {
-	  bh = PATH_OFFSET_PBUFFER (path, offset);
-	  printk ("%6d %10p (%9llu, %7d) %8d %7d\n", offset, 
-		  bh, bh ? (unsigned long long)bh->b_blocknr : 0LL, bh ? atomic_read (&(bh->b_count)) : 0,
-		  PATH_OFFSET_POSITION (path, offset), bh ? B_NR_ITEMS (bh) : -1);
-	  
-	  offset --;
-      }
-  }
-
-}
-
-
 /* this prints internal nodes (4 keys/items in line) (dc_number,
    dc_size)[k_dirid, k_objectid, k_offset, k_uniqueness](dc_number,
    dc_size)...*/
@@ -648,7 +577,7 @@
 
 
 
-char print_tb_buf[2048];
+static char print_tb_buf[2048];
 
 /* this stores initial state of tree balance in the print_tb_buf */
 void store_print_tb (struct tree_balance * tb)
diff -Nru a/fs/reiserfs/stree.c b/fs/reiserfs/stree.c
--- a/fs/reiserfs/stree.c	2005-01-10 20:11:21 -08:00
+++ b/fs/reiserfs/stree.c	2005-01-10 20:11:21 -08:00
@@ -12,14 +12,10 @@
  *  This file contains functions dealing with S+tree
  *
  * B_IS_IN_TREE
- * copy_short_key
  * copy_item_head
  * comp_short_keys
  * comp_keys
- * comp_cpu_keys
  * comp_short_le_keys
- * comp_short_cpu_keys
- * cpu_key2cpu_key
  * le_key2cpu_key
  * comp_le_keys
  * bin_search
@@ -72,11 +68,6 @@
   return ( B_LEVEL (p_s_bh) != FREE_LEVEL );
 }
 
-inline void copy_short_key (void * to, const void * from)
-{
-    memcpy (to, from, SHORT_KEY_SIZE);
-}
-
 //
 // to gets item head in le form
 //
@@ -117,7 +108,7 @@
    Compare keys using all 4 key fields.
    Returns: -1 if key1 < key2 0
    if key1 = key2 1 if key1 > key2 */
-inline int  comp_keys (const struct reiserfs_key * le_key, const struct cpu_key * cpu_key)
+static inline int  comp_keys (const struct reiserfs_key * le_key, const struct cpu_key * cpu_key)
 {
   int retval;
 
@@ -143,37 +134,6 @@
 }
 
 
-//
-// FIXME: not used yet
-//
-inline int comp_cpu_keys (const struct cpu_key * key1, 
-			  const struct cpu_key * key2)
-{
-    if (key1->on_disk_key.k_dir_id < key2->on_disk_key.k_dir_id)
-	return -1;
-    if (key1->on_disk_key.k_dir_id > key2->on_disk_key.k_dir_id)
-	return 1;
-
-    if (key1->on_disk_key.k_objectid < key2->on_disk_key.k_objectid)
-	return -1;
-    if (key1->on_disk_key.k_objectid > key2->on_disk_key.k_objectid)
-	return 1;
-
-    if (cpu_key_k_offset (key1) < cpu_key_k_offset (key2))
-	return -1;
-    if (cpu_key_k_offset (key1) > cpu_key_k_offset (key2))
-	return 1;
-
-    reiserfs_warning (NULL, "comp_cpu_keys: type are compared for %K and %K",
-		      key1, key2);
-
-    if (cpu_key_k_type (key1) < cpu_key_k_type (key2))
-	return -1;
-    if (cpu_key_k_type (key1) > cpu_key_k_type (key2))
-	return 1;
-    return 0;
-}
-
 inline int comp_short_le_keys (const struct reiserfs_key * key1, const struct reiserfs_key * key2)
 {
   __u32 * p_s_1_u32, * p_s_2_u32;
@@ -190,32 +150,6 @@
   return 0;
 }
 
-inline int comp_short_cpu_keys (const struct cpu_key * key1, 
-				const struct cpu_key * key2)
-{
-  __u32 * p_s_1_u32, * p_s_2_u32;
-  int n_key_length = REISERFS_SHORT_KEY_LEN;
-
-  p_s_1_u32 = (__u32 *)key1;
-  p_s_2_u32 = (__u32 *)key2;
-
-  for( ; n_key_length--; ++p_s_1_u32, ++p_s_2_u32 ) {
-    if ( *p_s_1_u32 < *p_s_2_u32 )
-      return -1;
-    if ( *p_s_1_u32 > *p_s_2_u32 )
-      return 1;
-  }
-  return 0;
-}
-
-
-
-inline void cpu_key2cpu_key (struct cpu_key * to, const struct cpu_key * from)
-{
-    memcpy (to, from, sizeof (struct cpu_key));
-}
-
-
 inline void le_key2cpu_key (struct cpu_key * to, const struct reiserfs_key * from)
 {
     to->on_disk_key.k_dir_id = le32_to_cpu (from->k_dir_id);
@@ -255,7 +189,7 @@
  there are no possible items, and we have not found it. With each examination we
  cut the number of possible items it could be by one more than half rounded down,
  or we find it. */
-inline	int bin_search (
+static inline	int bin_search (
               const void * p_v_key, /* Key to search for.                   */
 	      const void * p_v_base,/* First item in the array.             */
 	      int       p_n_num,    /* Number of items in the array.        */
@@ -272,7 +206,7 @@
     int   n_rbound, n_lbound, n_j;
 
    for ( n_j = ((n_rbound = p_n_num - 1) + (n_lbound = 0))/2; n_lbound <= n_rbound; n_j = (n_rbound + n_lbound)/2 )
-     switch( COMP_KEYS((struct reiserfs_key *)((char * )p_v_base + n_j * p_n_width), (struct cpu_key *)p_v_key) )  {
+     switch( comp_keys((struct reiserfs_key *)((char * )p_v_base + n_j * p_n_width), (struct cpu_key *)p_v_key) )  {
      case -1: n_lbound = n_j + 1; continue;
      case  1: n_rbound = n_j - 1; continue;
      case  0: *p_n_pos = n_j;     return ITEM_FOUND; /* Key found in the array.  */
@@ -301,7 +235,7 @@
    of the path, and going upwards.  We must check the path's validity at each step.  If the key is not in
    the path, there is no delimiting key in the tree (buffer is first or last buffer in tree), and in this
    case we return a special key, either MIN_KEY or MAX_KEY. */
-inline	const struct  reiserfs_key * get_lkey  (
+static inline	const struct  reiserfs_key * get_lkey  (
 	                const struct path         * p_s_chk_path,
                         const struct super_block  * p_s_sb
                       ) {
@@ -396,11 +330,11 @@
   RFALSE( !PATH_PLAST_BUFFER(p_s_chk_path)->b_bdev,
 	  "PAP-5060: device must not be NODEV");
 
-  if ( COMP_KEYS(get_lkey(p_s_chk_path, p_s_sb), p_s_key) == 1 )
+  if ( comp_keys(get_lkey(p_s_chk_path, p_s_sb), p_s_key) == 1 )
     /* left delimiting key is bigger, that the key we look for */
     return 0;
-  //  if ( COMP_KEYS(p_s_key, get_rkey(p_s_chk_path, p_s_sb)) != -1 )
-  if ( COMP_KEYS(get_rkey(p_s_chk_path, p_s_sb), p_s_key) != 1 )
+  //  if ( comp_keys(p_s_key, get_rkey(p_s_chk_path, p_s_sb)) != -1 )
+  if ( comp_keys(get_rkey(p_s_chk_path, p_s_sb), p_s_key) != 1 )
     /* p_s_key must be less than right delimitiing key */
     return 0;
   return 1;
@@ -745,7 +679,7 @@
         /* only check that the key is in the buffer if p_s_key is not
            equal to the MAX_KEY. Latter case is only possible in
            "finish_unfinished()" processing during mount. */
-        RFALSE( COMP_KEYS( &MAX_KEY, p_s_key ) && 
+        RFALSE( comp_keys( &MAX_KEY, p_s_key ) &&
                 ! key_in_buffer(p_s_search_path, p_s_key, p_s_sb),
 		"PAP-5130: key is not in the buffer");
 #ifdef CONFIG_REISERFS_CHECK
@@ -1192,7 +1126,7 @@
 }
 
 /* Calculate number of bytes which will be deleted or cut during balance */
-int calc_deleted_bytes_number(
+static int calc_deleted_bytes_number(
     struct  tree_balance  * p_s_tb,
     char                    c_mode
     ) {
@@ -1388,7 +1322,7 @@
     do_balance(&s_del_balance, NULL, NULL, M_DELETE);
 
 #ifdef REISERQUOTA_DEBUG
-    reiserfs_debug (p_s_sb, "reiserquota delete_item(): freeing %u, id=%u type=%c", quota_cut_bytes, p_s_inode->i_uid, head2type(&s_ih));
+    reiserfs_debug (p_s_sb, REISERFS_DEBUG_CODE, "reiserquota delete_item(): freeing %u, id=%u type=%c", quota_cut_bytes, p_s_inode->i_uid, head2type(&s_ih));
 #endif
     DQUOT_FREE_SPACE_NODIRTY(p_s_inode, quota_cut_bytes);
 
@@ -1465,7 +1399,7 @@
 	    do_balance (&tb, NULL, NULL, M_DELETE);
 	    if (inode) {	/* Should we count quota for item? (we don't count quotas for save-links) */
 #ifdef REISERQUOTA_DEBUG
-		reiserfs_debug (th->t_super, "reiserquota delete_solid_item(): freeing %u id=%u type=%c", quota_cut_bytes, inode->i_uid, key2type(key));
+		reiserfs_debug (th->t_super, REISERFS_DEBUG_CODE, "reiserquota delete_solid_item(): freeing %u id=%u type=%c", quota_cut_bytes, inode->i_uid, key2type(key));
 #endif
 		DQUOT_FREE_SPACE_NODIRTY(inode, quota_cut_bytes);
 	    }
@@ -1786,7 +1720,7 @@
 	REISERFS_I(p_s_inode)->i_flags &= ~i_pack_on_close_mask ;
     }
 #ifdef REISERQUOTA_DEBUG
-    reiserfs_debug (p_s_inode->i_sb, "reiserquota cut_from_item(): freeing %u id=%u type=%c", quota_cut_bytes, p_s_inode->i_uid, '?');
+    reiserfs_debug (p_s_inode->i_sb, REISERFS_DEBUG_CODE, "reiserquota cut_from_item(): freeing %u id=%u type=%c", quota_cut_bytes, p_s_inode->i_uid, '?');
 #endif
     DQUOT_FREE_SPACE_NODIRTY(p_s_inode, quota_cut_bytes);
     return n_ret_value;
@@ -1922,7 +1856,7 @@
 	  decrement_counters_in_path(&s_search_path) ;
 
 	  if (update_timestamps) {
-	      p_s_inode->i_mtime = p_s_inode->i_ctime = CURRENT_TIME;
+	      p_s_inode->i_mtime = p_s_inode->i_ctime = CURRENT_TIME_SEC;
 	  } 
 	  reiserfs_update_sd(th, p_s_inode) ;
 
@@ -1945,7 +1879,7 @@
 update_and_out:
     if (update_timestamps) {
 	// this is truncate, not file closing
-	p_s_inode->i_mtime = p_s_inode->i_ctime = CURRENT_TIME;
+	    p_s_inode->i_mtime = p_s_inode->i_ctime = CURRENT_TIME_SEC;
     }
     reiserfs_update_sd (th, p_s_inode);
 
@@ -1999,7 +1933,7 @@
     fs_gen = get_generation(inode->i_sb) ;
 
 #ifdef REISERQUOTA_DEBUG
-    reiserfs_debug (inode->i_sb, "reiserquota paste_into_item(): allocating %u id=%u type=%c", n_pasted_size, inode->i_uid, key2type(&(p_s_key->on_disk_key)));
+    reiserfs_debug (inode->i_sb, REISERFS_DEBUG_CODE, "reiserquota paste_into_item(): allocating %u id=%u type=%c", n_pasted_size, inode->i_uid, key2type(&(p_s_key->on_disk_key)));
 #endif
 
     if (DQUOT_ALLOC_SPACE_NODIRTY(inode, n_pasted_size)) {
@@ -2048,7 +1982,7 @@
     /* this also releases the path */
     unfix_nodes(&s_paste_balance);
 #ifdef REISERQUOTA_DEBUG
-    reiserfs_debug (inode->i_sb, "reiserquota paste_into_item(): freeing %u id=%u type=%c", n_pasted_size, inode->i_uid, key2type(&(p_s_key->on_disk_key)));
+    reiserfs_debug (inode->i_sb, REISERFS_DEBUG_CODE, "reiserquota paste_into_item(): freeing %u id=%u type=%c", n_pasted_size, inode->i_uid, key2type(&(p_s_key->on_disk_key)));
 #endif
     DQUOT_FREE_SPACE_NODIRTY(inode, n_pasted_size);
     return retval ;
@@ -2081,7 +2015,7 @@
 	    quota_bytes = inode->i_sb->s_blocksize + UNFM_P_SIZE ;
 	}
 #ifdef REISERQUOTA_DEBUG
-	reiserfs_debug (inode->i_sb, "reiserquota insert_item(): allocating %u id=%u type=%c", quota_bytes, inode->i_uid, head2type(p_s_ih));
+	reiserfs_debug (inode->i_sb, REISERFS_DEBUG_CODE, "reiserquota insert_item(): allocating %u id=%u type=%c", quota_bytes, inode->i_uid, head2type(p_s_ih));
 #endif
 	/* We can't dirty inode here. It would be immediately written but
 	 * appropriate stat item isn't inserted yet... */
@@ -2127,7 +2061,7 @@
     /* also releases the path */
     unfix_nodes(&s_ins_balance);
 #ifdef REISERQUOTA_DEBUG
-    reiserfs_debug (th->t_super, "reiserquota insert_item(): freeing %u id=%u type=%c", quota_bytes, inode->i_uid, head2type(p_s_ih));
+    reiserfs_debug (th->t_super, REISERFS_DEBUG_CODE, "reiserquota insert_item(): freeing %u id=%u type=%c", quota_bytes, inode->i_uid, head2type(p_s_ih));
 #endif
     if (inode)
 	DQUOT_FREE_SPACE_NODIRTY(inode, quota_bytes) ;
diff -Nru a/fs/reiserfs/super.c b/fs/reiserfs/super.c
--- a/fs/reiserfs/super.c	2005-01-10 20:11:18 -08:00
+++ b/fs/reiserfs/super.c	2005-01-10 20:11:18 -08:00
@@ -25,12 +25,15 @@
 #include <linux/buffer_head.h>
 #include <linux/vfs.h>
 #include <linux/namespace.h>
+#include <linux/mount.h>
+#include <linux/namei.h>
+#include <linux/quotaops.h>
 
 struct file_system_type reiserfs_fs_type;
 
-const char reiserfs_3_5_magic_string[] = REISERFS_SUPER_MAGIC_STRING;
-const char reiserfs_3_6_magic_string[] = REISER2FS_SUPER_MAGIC_STRING;
-const char reiserfs_jr_magic_string[] = REISER2FS_JR_SUPER_MAGIC_STRING;
+static const char reiserfs_3_5_magic_string[] = REISERFS_SUPER_MAGIC_STRING;
+static const char reiserfs_3_6_magic_string[] = REISER2FS_SUPER_MAGIC_STRING;
+static const char reiserfs_jr_magic_string[] = REISER2FS_JR_SUPER_MAGIC_STRING;
 
 int is_reiserfs_3_5 (struct reiserfs_super_block * rs)
 {
@@ -62,7 +65,7 @@
 static int reiserfs_remount (struct super_block * s, int * flags, char * data);
 static int reiserfs_statfs (struct super_block * s, struct kstatfs * buf);
 
-static void reiserfs_sync_fs (struct super_block * s)
+static int reiserfs_sync_fs (struct super_block * s, int wait)
 {
     if (!(s->s_flags & MS_RDONLY)) {
         struct reiserfs_transaction_handle th;
@@ -76,11 +79,12 @@
     } else {
         s->s_dirt = 0;
     }
+    return 0;
 }
 
 static void reiserfs_write_super(struct super_block *s)
 {
-    reiserfs_sync_fs(s);
+    reiserfs_sync_fs(s, 1);
 }
 
 static void reiserfs_write_super_lockfs (struct super_block * s)
@@ -102,7 +106,7 @@
   reiserfs_write_unlock(s);
 }
 
-void reiserfs_unlockfs(struct super_block *s) {
+static void reiserfs_unlockfs(struct super_block *s) {
   reiserfs_allow_writes(s) ;
 }
 
@@ -134,6 +138,9 @@
      return journal_end (&th, s, JOURNAL_PER_BALANCE_CNT);
 }
  
+#ifdef CONFIG_QUOTA
+static int reiserfs_quota_on_mount(struct super_block *, int);
+#endif
  
 /* look for uncompleted unlinks and truncates and complete them */
 static int finish_unfinished (struct super_block * s)
@@ -149,12 +156,34 @@
     int done;
     struct inode * inode;
     int truncate;
+#ifdef CONFIG_QUOTA
+    int i;
+    int ms_active_set;
+#endif
  
  
     /* compose key to look for "save" links */
     max_cpu_key.version = KEY_FORMAT_3_5;
     max_cpu_key.on_disk_key = MAX_KEY;
     max_cpu_key.key_length = 3;
+
+#ifdef CONFIG_QUOTA
+    /* Needed for iput() to work correctly and not trash data */
+    if (s->s_flags & MS_ACTIVE) {
+	    ms_active_set = 0;
+    } else {
+	    ms_active_set = 1;
+	    s->s_flags |= MS_ACTIVE;
+    }
+    /* Turn on quotas so that they are updated correctly */
+    for (i = 0; i < MAXQUOTAS; i++) {
+	if (REISERFS_SB(s)->s_qf_names[i]) {
+	    int ret = reiserfs_quota_on_mount(s, i);
+	    if (ret < 0)
+		reiserfs_warning(s, "reiserfs: cannot turn on journalled quota: error %d", ret);
+	}
+    }
+#endif
  
     done = 0;
     REISERFS_SB(s)->s_is_unlinked_ok = 1;
@@ -211,6 +240,7 @@
             retval = remove_save_link_only (s, &save_link_key, 0);
             continue;
 	}
+	DQUOT_INIT(inode);
 
 	if (truncate && S_ISDIR (inode->i_mode) ) {
 	    /* We got a truncate request for a dir which is impossible.
@@ -246,6 +276,16 @@
     }
     REISERFS_SB(s)->s_is_unlinked_ok = 0;
      
+#ifdef CONFIG_QUOTA
+    /* Turn quotas off */
+    for (i = 0; i < MAXQUOTAS; i++) {
+            if (sb_dqopt(s)->files[i])
+                    vfs_quota_off_mount(s, i);
+    }
+    if (ms_active_set)
+	    /* Restore the flag back */
+	    s->s_flags &= ~MS_ACTIVE;
+#endif
     pathrelse (&path);
     if (done)
         reiserfs_info (s, "There were %d uncompleted unlinks/truncates. "
@@ -516,7 +556,12 @@
     REISERFS_I(inode)->i_acl_default = NULL;
 }
 
-struct super_operations reiserfs_sops = 
+#ifdef CONFIG_QUOTA
+static ssize_t reiserfs_quota_write(struct super_block *, int, const char *, size_t, loff_t);
+static ssize_t reiserfs_quota_read(struct super_block *, int, char *, size_t, loff_t);
+#endif
+
+static struct super_operations reiserfs_sops =
 {
   .alloc_inode = reiserfs_alloc_inode,
   .destroy_inode = reiserfs_destroy_inode,
@@ -526,13 +571,57 @@
   .clear_inode  = reiserfs_clear_inode,
   .put_super = reiserfs_put_super,
   .write_super = reiserfs_write_super,
+  .sync_fs = reiserfs_sync_fs,
   .write_super_lockfs = reiserfs_write_super_lockfs,
   .unlockfs = reiserfs_unlockfs,
   .statfs = reiserfs_statfs,
   .remount_fs = reiserfs_remount,
+#ifdef CONFIG_QUOTA
+  .quota_read = reiserfs_quota_read,
+  .quota_write = reiserfs_quota_write,
+#endif
+};
+
+#ifdef CONFIG_QUOTA
+#define QTYPE2NAME(t) ((t)==USRQUOTA?"user":"group")
 
+static int reiserfs_dquot_initialize(struct inode *, int);
+static int reiserfs_dquot_drop(struct inode *);
+static int reiserfs_write_dquot(struct dquot *);
+static int reiserfs_acquire_dquot(struct dquot *);
+static int reiserfs_release_dquot(struct dquot *);
+static int reiserfs_mark_dquot_dirty(struct dquot *);
+static int reiserfs_write_info(struct super_block *, int);
+static int reiserfs_quota_on(struct super_block *, int, int, char *);
+
+static struct dquot_operations reiserfs_quota_operations =
+{
+  .initialize = reiserfs_dquot_initialize,
+  .drop = reiserfs_dquot_drop,
+  .alloc_space = dquot_alloc_space,
+  .alloc_inode = dquot_alloc_inode,
+  .free_space = dquot_free_space,
+  .free_inode = dquot_free_inode,
+  .transfer = dquot_transfer,
+  .write_dquot = reiserfs_write_dquot,
+  .acquire_dquot = reiserfs_acquire_dquot,
+  .release_dquot = reiserfs_release_dquot,
+  .mark_dirty = reiserfs_mark_dquot_dirty,
+  .write_info = reiserfs_write_info,
 };
 
+static struct quotactl_ops reiserfs_qctl_operations =
+{
+  .quota_on = reiserfs_quota_on,
+  .quota_off = vfs_quota_off,
+  .quota_sync = vfs_quota_sync,
+  .get_info = vfs_get_dqinfo,
+  .set_info = vfs_set_dqinfo,
+  .get_dqblk = vfs_get_dqblk,
+  .set_dqblk = vfs_set_dqblk,
+};
+#endif
+
 static struct export_operations reiserfs_export_ops = {
   .encode_fh = reiserfs_encode_fh,
   .decode_fh = reiserfs_decode_fh,
@@ -551,6 +640,8 @@
 		    applied BEFORE setmask */
 } arg_desc_t;
 
+/* Set this bit in arg_required to allow empty arguments */
+#define REISERFS_OPT_ALLOWEMPTY 31
 
 /* this struct is used in reiserfs_getopt() for describing the set of reiserfs
    mount options */
@@ -703,8 +794,8 @@
     /* move to the argument, or to next option if argument is not required */
     p ++;
     
-    if ( opt->arg_required && !strlen (p) ) {
-	/* this catches "option=," */
+    if ( opt->arg_required && !(opt->arg_required & (1<<REISERFS_OPT_ALLOWEMPTY)) && !strlen (p) ) {
+	/* this catches "option=," if not allowed */
 	reiserfs_warning (s, "empty argument for \"%s\"", opt->option_name);
 	return -1;
     }
@@ -712,7 +803,7 @@
     if (!opt->values) {
 	/* *=NULLopt_arg contains pointer to argument */
 	*opt_arg = p;
-	return opt->arg_required;
+	return opt->arg_required & ~(1<<REISERFS_OPT_ALLOWEMPTY);
     }
     
     /* values possible for this option are listed in opt->values */
@@ -776,6 +867,9 @@
 	{"usrquota",},
 	{"grpquota",},
 	{"errors", 	.arg_required = 'e', .values = error_actions},
+	{"usrjquota",	.arg_required = 'u'|(1<<REISERFS_OPT_ALLOWEMPTY), .values = NULL},
+	{"grpjquota",	.arg_required = 'g'|(1<<REISERFS_OPT_ALLOWEMPTY), .values = NULL},
+	{"jqfmt",	.arg_required = 'f', .values = NULL},
 	{NULL,}
     };
 	
@@ -837,8 +931,62 @@
 		*jdev_name = arg;
 	    }
 	}
+
+#ifdef CONFIG_QUOTA
+	if (c == 'u' || c == 'g') {
+	    int qtype = c == 'u' ? USRQUOTA : GRPQUOTA;
+
+	    if (sb_any_quota_enabled(s)) {
+		reiserfs_warning(s, "reiserfs_parse_options: cannot change journalled quota options when quota turned on.");
+		return 0;
+	    }
+	    if (*arg) {	/* Some filename specified? */
+	        if (REISERFS_SB(s)->s_qf_names[qtype] && strcmp(REISERFS_SB(s)->s_qf_names[qtype], arg)) {
+		    reiserfs_warning(s, "reiserfs_parse_options: %s quota file already specified.", QTYPE2NAME(qtype));
+		    return 0;
+		}
+		if (strchr(arg, '/')) {
+		    reiserfs_warning(s, "reiserfs_parse_options: quotafile must be on filesystem root.");
+		    return 0;
+		}
+	    	REISERFS_SB(s)->s_qf_names[qtype] = kmalloc(strlen(arg)+1, GFP_KERNEL);
+		if (!REISERFS_SB(s)->s_qf_names[qtype]) {
+		    reiserfs_warning(s, "reiserfs_parse_options: not enough memory for storing quotafile name.");
+		    return 0;
+		}
+		strcpy(REISERFS_SB(s)->s_qf_names[qtype], arg);
+	    }
+	    else {
+		if (REISERFS_SB(s)->s_qf_names[qtype]) {
+		    kfree(REISERFS_SB(s)->s_qf_names[qtype]);
+		    REISERFS_SB(s)->s_qf_names[qtype] = NULL;
+		}
+	    }
+	}
+	if (c == 'f') {
+	    if (!strcmp(arg, "vfsold"))
+		REISERFS_SB(s)->s_jquota_fmt = QFMT_VFS_OLD;
+	    else if (!strcmp(arg, "vfsv0"))
+		REISERFS_SB(s)->s_jquota_fmt = QFMT_VFS_V0;
+	    else {
+		reiserfs_warning(s, "reiserfs_parse_options: unknown quota format specified.");
+		return 0;
+	    }
+	}
+#else
+	if (c == 'u' || c == 'g' || c == 'f') {
+	    reiserfs_warning(s, "reiserfs_parse_options: journalled quota options not supported.");
+	    return 0;
+	}
+#endif
     }
     
+#ifdef CONFIG_QUOTA
+    if (!REISERFS_SB(s)->s_jquota_fmt && (REISERFS_SB(s)->s_qf_names[USRQUOTA] || REISERFS_SB(s)->s_qf_names[GRPQUOTA])) {
+	reiserfs_warning(s, "reiserfs_parse_options: journalled quota format not specified.");
+	return 0;
+    }
+#endif
     return 1;
 }
 
@@ -914,11 +1062,22 @@
   unsigned int commit_max_age = (unsigned int)-1;
   struct reiserfs_journal *journal = SB_JOURNAL(s);
   int err;
+#ifdef CONFIG_QUOTA
+  int i;
+#endif
 
   rs = SB_DISK_SUPER_BLOCK (s);
 
-  if (!reiserfs_parse_options(s, arg, &mount_options, &blocks, NULL, &commit_max_age))
+  if (!reiserfs_parse_options(s, arg, &mount_options, &blocks, NULL, &commit_max_age)) {
+#ifdef CONFIG_QUOTA
+    for (i = 0; i < MAXQUOTAS; i++)
+	if (REISERFS_SB(s)->s_qf_names[i]) {
+	    kfree(REISERFS_SB(s)->s_qf_names[i]);
+	    REISERFS_SB(s)->s_qf_names[i] = NULL;
+	}
+#endif
     return -EINVAL;
+  }
   
   handle_attrs(s);
 
@@ -1125,24 +1284,6 @@
   return 0;
 }
 
-void check_bitmap (struct super_block * s)
-{
-  int i = 0;
-  int free = 0;
-  char * buf;
-
-  while (i < SB_BLOCK_COUNT (s)) {
-    buf = SB_AP_BITMAP (s)[i / (s->s_blocksize * 8)].bh->b_data;
-    if (!reiserfs_test_le_bit (i % (s->s_blocksize * 8), buf))
-      free ++;
-    i ++;
-  }
-
-  if (free != SB_FREE_BLOCKS (s))
-    reiserfs_warning (s,"vs-4000: check_bitmap: %d free blocks, must be %d",
-		      free, SB_FREE_BLOCKS (s));
-}
-
 static int read_super_block (struct super_block * s, int offset)
 {
     struct buffer_head * bh;
@@ -1223,6 +1364,10 @@
 
     s->s_op = &reiserfs_sops;
     s->s_export_op = &reiserfs_export_ops;
+#ifdef CONFIG_QUOTA
+    s->s_qcop = &reiserfs_qctl_operations;
+    s->dq_op = &reiserfs_quota_operations;
+#endif
 
     /* new format is limited by the 32 bit wide i_blocks field, want to
     ** be one full block below that.
@@ -1266,7 +1411,7 @@
 // FIXME: we look for only one name in a directory. If tea and yura
 // bith have the same value - we ask user to send report to the
 // mailing list
-__u32 find_hash_out (struct super_block * s)
+static __u32 find_hash_out (struct super_block * s)
 {
     int retval;
     struct inode * inode;
@@ -1397,7 +1542,7 @@
 }
 
 // this is used to set up correct value for old partitions
-int function2code (hashf_t func)
+static int function2code (hashf_t func)
 {
     if (func == keyed_hash)
 	return TEA_HASH;
@@ -1636,7 +1781,7 @@
     reiserfs_proc_info_init( s );
 
     init_waitqueue_head (&(sbi->s_wait));
-    sbi->bitmap_lock = SPIN_LOCK_UNLOCKED;
+    spin_lock_init(&sbi->bitmap_lock);
 
     return (0);
 
@@ -1654,7 +1799,12 @@
     }
     if (SB_BUFFER_WITH_SB (s))
 	brelse(SB_BUFFER_WITH_SB (s));
-
+#ifdef CONFIG_QUOTA
+    for (j = 0; j < MAXQUOTAS; j++) {
+	if (sbi->s_qf_names[j])
+	    kfree(sbi->s_qf_names[j]);
+    }
+#endif
     if (sbi != NULL) {
 	kfree(sbi);
     }
@@ -1677,6 +1827,245 @@
   buf->f_type    =  REISERFS_SUPER_MAGIC;
   return 0;
 }
+
+#ifdef CONFIG_QUOTA
+static int reiserfs_dquot_initialize(struct inode *inode, int type)
+{
+    struct reiserfs_transaction_handle th;
+    int ret;
+
+    /* We may create quota structure so we need to reserve enough blocks */
+    journal_begin(&th, inode->i_sb, 2*REISERFS_QUOTA_INIT_BLOCKS);
+    ret = dquot_initialize(inode, type);
+    journal_end(&th, inode->i_sb, 2*REISERFS_QUOTA_INIT_BLOCKS);
+    return ret;
+}
+
+static int reiserfs_dquot_drop(struct inode *inode)
+{
+    struct reiserfs_transaction_handle th;
+    int ret;
+
+    /* We may delete quota structure so we need to reserve enough blocks */
+    journal_begin(&th, inode->i_sb, 2*REISERFS_QUOTA_INIT_BLOCKS);
+    ret = dquot_drop(inode);
+    journal_end(&th, inode->i_sb, 2*REISERFS_QUOTA_INIT_BLOCKS);
+    return ret;
+}
+
+static int reiserfs_write_dquot(struct dquot *dquot)
+{
+    struct reiserfs_transaction_handle th;
+    int ret;
+
+    journal_begin(&th, dquot->dq_sb, REISERFS_QUOTA_TRANS_BLOCKS);
+    ret = dquot_commit(dquot);
+    journal_end(&th, dquot->dq_sb, REISERFS_QUOTA_TRANS_BLOCKS);
+    return ret;
+}
+
+static int reiserfs_acquire_dquot(struct dquot *dquot)
+{
+    struct reiserfs_transaction_handle th;
+    int ret;
+
+    journal_begin(&th, dquot->dq_sb, REISERFS_QUOTA_INIT_BLOCKS);
+    ret = dquot_acquire(dquot);
+    journal_end(&th, dquot->dq_sb, REISERFS_QUOTA_INIT_BLOCKS);
+    return ret;
+}
+
+static int reiserfs_release_dquot(struct dquot *dquot)
+{
+    struct reiserfs_transaction_handle th;
+    int ret;
+
+    journal_begin(&th, dquot->dq_sb, REISERFS_QUOTA_INIT_BLOCKS);
+    ret = dquot_release(dquot);
+    journal_end(&th, dquot->dq_sb, REISERFS_QUOTA_INIT_BLOCKS);
+    return ret;
+}
+
+static int reiserfs_mark_dquot_dirty(struct dquot *dquot)
+{
+    /* Are we journalling quotas? */
+    if (REISERFS_SB(dquot->dq_sb)->s_qf_names[USRQUOTA] ||
+        REISERFS_SB(dquot->dq_sb)->s_qf_names[GRPQUOTA]) {
+	dquot_mark_dquot_dirty(dquot);
+	return reiserfs_write_dquot(dquot);
+    }
+    else
+	return dquot_mark_dquot_dirty(dquot);
+}
+
+static int reiserfs_write_info(struct super_block *sb, int type)
+{
+    struct reiserfs_transaction_handle th;
+    int ret;
+
+    /* Data block + inode block */
+    journal_begin(&th, sb, 2);
+    ret = dquot_commit_info(sb, type);
+    journal_end(&th, sb, 2);
+    return ret;
+}
+
+/*
+ * Turn on quotas during mount time - we need to find
+ * the quota file and such...
+ */
+static int reiserfs_quota_on_mount(struct super_block *sb, int type)
+{
+    int err;
+    struct dentry *dentry;
+    struct qstr name = { .name = REISERFS_SB(sb)->s_qf_names[type],
+                         .hash = 0,
+                         .len = strlen(REISERFS_SB(sb)->s_qf_names[type])};
+
+    dentry = lookup_hash(&name, sb->s_root);
+    if (IS_ERR(dentry))
+            return PTR_ERR(dentry);
+    err = vfs_quota_on_mount(type, REISERFS_SB(sb)->s_jquota_fmt, dentry);
+    /* Now invalidate and put the dentry - quota got its own reference
+     * to inode and dentry has at least wrong hash so we had better
+     * throw it away */
+    d_invalidate(dentry);
+    dput(dentry);
+    return err;
+}
+
+/*
+ * Standard function to be called on quota_on
+ */
+static int reiserfs_quota_on(struct super_block *sb, int type, int format_id, char *path)
+{
+    int err;
+    struct nameidata nd;
+
+    err = path_lookup(path, LOOKUP_FOLLOW, &nd);
+    if (err)
+        return err;
+    /* Quotafile not on the same filesystem? */
+    if (nd.mnt->mnt_sb != sb) {
+	path_release(&nd);
+        return -EXDEV;
+    }
+    /* We must not pack tails for quota files on reiserfs for quota IO to work */
+    if (!REISERFS_I(nd.dentry->d_inode)->i_flags & i_nopack_mask) {
+	reiserfs_warning(sb, "reiserfs: Quota file must have tail packing disabled.");
+	path_release(&nd);
+	return -EINVAL;
+    }
+    /* Not journalling quota? No more tests needed... */
+    if (!REISERFS_SB(sb)->s_qf_names[USRQUOTA] &&
+        !REISERFS_SB(sb)->s_qf_names[GRPQUOTA]) {
+	path_release(&nd);
+        return vfs_quota_on(sb, type, format_id, path);
+    }
+    /* Quotafile not of fs root? */
+    if (nd.dentry->d_parent->d_inode != sb->s_root->d_inode)
+	reiserfs_warning(sb, "reiserfs: Quota file not on filesystem root. "
+                             "Journalled quota will not work.");
+    path_release(&nd);
+    return vfs_quota_on(sb, type, format_id, path);
+}
+
+/* Read data from quotafile - avoid pagecache and such because we cannot afford
+ * acquiring the locks... As quota files are never truncated and quota code
+ * itself serializes the operations (and noone else should touch the files)
+ * we don't have to be afraid of races */
+static ssize_t reiserfs_quota_read(struct super_block *sb, int type, char *data,
+				   size_t len, loff_t off)
+{
+    struct inode *inode = sb_dqopt(sb)->files[type];
+    unsigned long blk = off >> sb->s_blocksize_bits;
+    int err = 0, offset = off & (sb->s_blocksize - 1), tocopy;
+    size_t toread;
+    struct buffer_head tmp_bh, *bh;
+    loff_t i_size = i_size_read(inode);
+
+    if (off > i_size)
+	return 0;
+    if (off+len > i_size)
+	len = i_size-off;
+    toread = len;
+    while (toread > 0) {
+	tocopy = sb->s_blocksize - offset < toread ? sb->s_blocksize - offset : toread;
+	tmp_bh.b_state = 0;
+	/* Quota files are without tails so we can safely use this function */
+	err = reiserfs_get_block(inode, blk, &tmp_bh, 0);
+	if (err)
+	    return err;
+	if (!buffer_mapped(&tmp_bh))    /* A hole? */
+	    memset(data, 0, tocopy);
+	else {
+	    bh = sb_bread(sb, tmp_bh.b_blocknr);
+	    if (!bh)
+		return -EIO;
+	    memcpy(data, bh->b_data+offset, tocopy);
+	    brelse(bh);
+	}
+	offset = 0;
+	toread -= tocopy;
+	data += tocopy;
+	blk++;
+    }
+    return len;
+}
+
+/* Write to quotafile (we know the transaction is already started and has
+ * enough credits) */
+static ssize_t reiserfs_quota_write(struct super_block *sb, int type,
+				    const char *data, size_t len, loff_t off)
+{
+    struct inode *inode = sb_dqopt(sb)->files[type];
+    unsigned long blk = off >> sb->s_blocksize_bits;
+    int err = 0, offset = off & (sb->s_blocksize - 1), tocopy;
+    int journal_quota = REISERFS_SB(sb)->s_qf_names[type] != NULL;
+    size_t towrite = len;
+    struct buffer_head tmp_bh, *bh;
+
+    down(&inode->i_sem);
+    while (towrite > 0) {
+	tocopy = sb->s_blocksize - offset < towrite ?
+	         sb->s_blocksize - offset : towrite;
+	tmp_bh.b_state = 0;
+	err = reiserfs_get_block(inode, blk, &tmp_bh, GET_BLOCK_CREATE);
+	if (err)
+	    goto out;
+	if (offset || tocopy != sb->s_blocksize)
+	    bh = sb_bread(sb, tmp_bh.b_blocknr);
+	else
+	    bh = sb_getblk(sb, tmp_bh.b_blocknr);
+	if (!bh) {
+	    err = -EIO;
+	    goto out;
+	}
+	memcpy(bh->b_data+offset, data, tocopy);
+	set_buffer_uptodate(bh);
+	reiserfs_prepare_for_journal(sb, bh, 1);
+	journal_mark_dirty(current->journal_info, sb, bh);
+	if (!journal_quota)
+		reiserfs_add_ordered_list(inode, bh);
+	brelse(bh);
+	offset = 0;
+	towrite -= tocopy;
+	data += tocopy;
+	blk++;
+    }
+out:
+    if (len == towrite)
+	return err;
+    if (inode->i_size < off+len-towrite)
+	i_size_write(inode, off+len-towrite);
+    inode->i_version++;
+    inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+    mark_inode_dirty(inode);
+    up(&inode->i_sem);
+    return len - towrite;
+}
+
+#endif
 
 static struct super_block*
 get_super_block (struct file_system_type *fs_type, int flags,
diff -Nru a/fs/reiserfs/xattr.c b/fs/reiserfs/xattr.c
--- a/fs/reiserfs/xattr.c	2005-01-10 20:11:23 -08:00
+++ b/fs/reiserfs/xattr.c	2005-01-10 20:11:23 -08:00
@@ -594,7 +594,7 @@
      * gets marked dirty, but won't (ever) make it onto the dirty list until
      * it's synced explicitly to clear I_DIRTY. This is bad. */
     if (!hlist_unhashed(&inode->i_hash)) {
-        inode->i_ctime = CURRENT_TIME;
+        inode->i_ctime = CURRENT_TIME_SEC;
         mark_inode_dirty (inode);
     }
 
@@ -768,7 +768,7 @@
     dput (dir);
 
     if (!err) {
-        inode->i_ctime = CURRENT_TIME;
+        inode->i_ctime = CURRENT_TIME_SEC;
         mark_inode_dirty (inode);
     }
 
@@ -1040,7 +1040,7 @@
 
     err = reiserfs_xattr_del (dentry->d_inode, name);
 
-    dentry->d_inode->i_ctime = CURRENT_TIME;
+    dentry->d_inode->i_ctime = CURRENT_TIME_SEC;
     mark_inode_dirty (dentry->d_inode);
 
 out:
diff -Nru a/fs/reiserfs/xattr_acl.c b/fs/reiserfs/xattr_acl.c
--- a/fs/reiserfs/xattr_acl.c	2005-01-10 20:11:21 -08:00
+++ b/fs/reiserfs/xattr_acl.c	2005-01-10 20:11:21 -08:00
@@ -9,6 +9,8 @@
 #include <linux/reiserfs_acl.h>
 #include <asm/uaccess.h>
 
+static int reiserfs_set_acl(struct inode *inode, int type, struct posix_acl *acl);
+
 static int
 xattr_set_acl(struct inode *inode, int type, const void *value, size_t size)
 {
@@ -243,7 +245,7 @@
  * inode->i_sem: down
  * BKL held [before 2.5.x]
  */
-int
+static int
 reiserfs_set_acl(struct inode *inode, int type, struct posix_acl *acl)
 {
         char *name;
diff -Nru a/fs/romfs/inode.c b/fs/romfs/inode.c
--- a/fs/romfs/inode.c	2005-01-10 20:11:20 -08:00
+++ b/fs/romfs/inode.c	2005-01-10 20:11:20 -08:00
@@ -161,8 +161,7 @@
 	if (!root)
 		goto out;
 
-	s->s_root = d_alloc_root(iget(s, sz));
-
+	s->s_root = d_alloc_root(root);
 	if (!s->s_root)
 		goto outiput;
 
diff -Nru a/fs/select.c b/fs/select.c
--- a/fs/select.c	2005-01-10 20:11:15 -08:00
+++ b/fs/select.c	2005-01-10 20:11:15 -08:00
@@ -240,6 +240,7 @@
 						retval++;
 					}
 				}
+				cond_resched();
 			}
 			if (res_in)
 				*rinp = res_in;
diff -Nru a/fs/smbfs/file.c b/fs/smbfs/file.c
--- a/fs/smbfs/file.c	2005-01-10 20:11:22 -08:00
+++ b/fs/smbfs/file.c	2005-01-10 20:11:22 -08:00
@@ -78,7 +78,8 @@
 		count -= result;
 		offset += result;
 		buffer += result;
-		dentry->d_inode->i_atime = CURRENT_TIME;
+		dentry->d_inode->i_atime =
+			current_fs_time(dentry->d_inode->i_sb);
 		if (result < rsize)
 			break;
 	} while (count);
@@ -152,7 +153,7 @@
 		/*
 		 * Update the inode now rather than waiting for a refresh.
 		 */
-		inode->i_mtime = inode->i_atime = CURRENT_TIME;
+		inode->i_mtime = inode->i_atime = current_fs_time(inode->i_sb);
 		SMB_I(inode)->flags |= SMB_F_LOCALWRITE;
 		if (offset > inode->i_size)
 			inode->i_size = offset;
@@ -362,7 +363,7 @@
 	SMB_I(inode)->openers++;
 out:
 	unlock_kernel();
-	return 0;
+	return result;
 }
 
 static int
diff -Nru a/fs/smbfs/inode.c b/fs/smbfs/inode.c
--- a/fs/smbfs/inode.c	2005-01-10 20:11:16 -08:00
+++ b/fs/smbfs/inode.c	2005-01-10 20:11:16 -08:00
@@ -516,6 +516,7 @@
 	sb->s_blocksize_bits = 10;
 	sb->s_magic = SMB_SUPER_MAGIC;
 	sb->s_op = &smb_sops;
+	sb->s_time_gran = 100;
 
 	server = smb_kmalloc(sizeof(struct smb_sb_info), GFP_KERNEL);
 	if (!server)
@@ -601,7 +602,7 @@
 	/*
 	 * Keep the super block locked while we get the root inode.
 	 */
-	smb_init_root_dirent(server, &root);
+	smb_init_root_dirent(server, &root, sb);
 	root_inode = smb_iget(sb, &root);
 	if (!root_inode)
 		goto out_no_root;
diff -Nru a/fs/smbfs/proc.c b/fs/smbfs/proc.c
--- a/fs/smbfs/proc.c	2005-01-10 20:11:16 -08:00
+++ b/fs/smbfs/proc.c	2005-01-10 20:11:16 -08:00
@@ -1852,12 +1852,13 @@
 }
 
 void
-smb_init_root_dirent(struct smb_sb_info *server, struct smb_fattr *fattr)
+smb_init_root_dirent(struct smb_sb_info *server, struct smb_fattr *fattr,
+		     struct super_block *sb)
 {
 	smb_init_dirent(server, fattr);
 	fattr->attr = aDIR;
 	fattr->f_ino = 2; /* traditional root inode number */
-	fattr->f_mtime = CURRENT_TIME;
+	fattr->f_mtime = current_fs_time(sb);
 	smb_finish_dirent(server, fattr);
 }
 
diff -Nru a/fs/smbfs/proto.h b/fs/smbfs/proto.h
--- a/fs/smbfs/proto.h	2005-01-10 20:11:20 -08:00
+++ b/fs/smbfs/proto.h	2005-01-10 20:11:20 -08:00
@@ -23,7 +23,8 @@
 extern int smb_proc_rmdir(struct dentry *dentry);
 extern int smb_proc_unlink(struct dentry *dentry);
 extern int smb_proc_flush(struct smb_sb_info *server, __u16 fileid);
-extern void smb_init_root_dirent(struct smb_sb_info *server, struct smb_fattr *fattr);
+extern void smb_init_root_dirent(struct smb_sb_info *server, struct smb_fattr *fattr,
+				 struct super_block *sb);
 extern void smb_decode_unix_basic(struct smb_fattr *fattr, struct smb_sb_info *server, char *p);
 extern int smb_proc_getattr(struct dentry *dir, struct smb_fattr *fattr);
 extern int smb_proc_setattr(struct dentry *dir, struct smb_fattr *fattr);
diff -Nru a/fs/super.c b/fs/super.c
--- a/fs/super.c	2005-01-10 20:11:18 -08:00
+++ b/fs/super.c	2005-01-10 20:11:18 -08:00
@@ -70,6 +70,7 @@
 		INIT_LIST_HEAD(&s->s_files);
 		INIT_LIST_HEAD(&s->s_instances);
 		INIT_HLIST_HEAD(&s->s_anon);
+		INIT_LIST_HEAD(&s->s_inodes);
 		init_rwsem(&s->s_umount);
 		sema_init(&s->s_lock, 1);
 		down_write(&s->s_umount);
@@ -84,6 +85,7 @@
 		s->dq_op = sb_dquot_ops;
 		s->s_qcop = sb_quotactl_ops;
 		s->s_op = &default_op;
+		s->s_time_gran = 1000000000;
 	}
 out:
 	return s;
@@ -232,10 +234,10 @@
 		dput(root);
 		fsync_super(sb);
 		lock_super(sb);
-		lock_kernel();
 		sb->s_flags &= ~MS_ACTIVE;
 		/* bad name - it should be evict_inodes() */
 		invalidate_inodes(sb);
+		lock_kernel();
 
 		if (sop->write_super && sb->s_dirt)
 			sop->write_super(sb);
diff -Nru a/fs/sysfs/bin.c b/fs/sysfs/bin.c
--- a/fs/sysfs/bin.c	2005-01-10 20:11:19 -08:00
+++ b/fs/sysfs/bin.c	2005-01-10 20:11:19 -08:00
@@ -1,5 +1,9 @@
 /*
  * bin.c - binary file operations for sysfs.
+ *
+ * Copyright (c) 2003 Patrick Mochel
+ * Copyright (c) 2003 Matthew Wilcox
+ * Copyright (c) 2004 Silicon Graphics, Inc.
  */
 
 #undef DEBUG
@@ -20,6 +24,9 @@
 	struct bin_attribute * attr = to_bin_attr(dentry);
 	struct kobject * kobj = to_kobj(dentry->d_parent);
 
+	if (!attr->read)
+		return -EINVAL;
+
 	return attr->read(kobj, buffer, off, count);
 }
 
@@ -63,6 +70,9 @@
 	struct bin_attribute *attr = to_bin_attr(dentry);
 	struct kobject *kobj = to_kobj(dentry->d_parent);
 
+	if (!attr->write)
+		return -EINVAL;
+
 	return attr->write(kobj, buffer, offset, count);
 }
 
@@ -92,6 +102,18 @@
 	return count;
 }
 
+static int mmap(struct file *file, struct vm_area_struct *vma)
+{
+	struct dentry *dentry = file->f_dentry;
+	struct bin_attribute *attr = to_bin_attr(dentry);
+	struct kobject *kobj = to_kobj(dentry->d_parent);
+
+	if (!attr->mmap)
+		return -EINVAL;
+
+	return attr->mmap(kobj, attr, vma);
+}
+
 static int open(struct inode * inode, struct file * file)
 {
 	struct kobject *kobj = sysfs_get_kobject(file->f_dentry->d_parent);
@@ -107,9 +129,9 @@
 		goto Done;
 
 	error = -EACCES;
-	if ((file->f_mode & FMODE_WRITE) && !attr->write)
+	if ((file->f_mode & FMODE_WRITE) && !(attr->write || attr->mmap))
 		goto Error;
-	if ((file->f_mode & FMODE_READ) && !attr->read)
+	if ((file->f_mode & FMODE_READ) && !(attr->read || attr->mmap))
 		goto Error;
 
 	error = -ENOMEM;
@@ -144,6 +166,7 @@
 struct file_operations bin_fops = {
 	.read		= read,
 	.write		= write,
+	.mmap		= mmap,
 	.llseek		= generic_file_llseek,
 	.open		= open,
 	.release	= release,
diff -Nru a/fs/sysfs/dir.c b/fs/sysfs/dir.c
--- a/fs/sysfs/dir.c	2005-01-10 20:11:18 -08:00
+++ b/fs/sysfs/dir.c	2005-01-10 20:11:18 -08:00
@@ -36,7 +36,7 @@
 {
 	struct sysfs_dirent * sd;
 
-	sd = kmalloc(sizeof(*sd), GFP_KERNEL);
+	sd = kmem_cache_alloc(sysfs_dir_cachep, GFP_KERNEL);
 	if (!sd)
 		return NULL;
 
diff -Nru a/fs/sysfs/mount.c b/fs/sysfs/mount.c
--- a/fs/sysfs/mount.c	2005-01-10 20:11:22 -08:00
+++ b/fs/sysfs/mount.c	2005-01-10 20:11:22 -08:00
@@ -16,6 +16,7 @@
 
 struct vfsmount *sysfs_mount;
 struct super_block * sysfs_sb = NULL;
+kmem_cache_t *sysfs_dir_cachep;
 
 static struct super_operations sysfs_ops = {
 	.statfs		= simple_statfs,
@@ -38,6 +39,7 @@
 	sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
 	sb->s_magic = SYSFS_MAGIC;
 	sb->s_op = &sysfs_ops;
+	sb->s_time_gran = 1;
 	sysfs_sb = sb;
 
 	inode = sysfs_new_inode(S_IFDIR | S_IRWXU | S_IRUGO | S_IXUGO);
@@ -76,7 +78,13 @@
 
 int __init sysfs_init(void)
 {
-	int err;
+	int err = -ENOMEM;
+
+	sysfs_dir_cachep = kmem_cache_create("sysfs_dir_cache",
+					      sizeof(struct sysfs_dirent),
+					      0, 0, NULL, NULL);
+	if (!sysfs_dir_cachep)
+		goto out;
 
 	err = register_filesystem(&sysfs_fs_type);
 	if (!err) {
@@ -85,7 +93,13 @@
 			printk(KERN_ERR "sysfs: could not mount!\n");
 			err = PTR_ERR(sysfs_mount);
 			sysfs_mount = NULL;
+			goto out_err;
 		}
-	}
+	} else
+		goto out_err;
+out:
 	return err;
+out_err:
+	kmem_cache_destroy(sysfs_dir_cachep);
+	goto out;
 }
diff -Nru a/fs/sysfs/sysfs.h b/fs/sysfs/sysfs.h
--- a/fs/sysfs/sysfs.h	2005-01-10 20:11:21 -08:00
+++ b/fs/sysfs/sysfs.h	2005-01-10 20:11:21 -08:00
@@ -1,5 +1,6 @@
 
 extern struct vfsmount * sysfs_mount;
+extern kmem_cache_t *sysfs_dir_cachep;
 
 extern struct inode * sysfs_new_inode(mode_t mode);
 extern int sysfs_create(struct dentry *, int mode, int (*init)(struct inode *));
@@ -74,7 +75,7 @@
 		kobject_put(sl->target_kobj);
 		kfree(sl);
 	}
-	kfree(sd);
+	kmem_cache_free(sysfs_dir_cachep, sd);
 }
 
 static inline struct sysfs_dirent * sysfs_get(struct sysfs_dirent * sd)
diff -Nru a/fs/sysv/dir.c b/fs/sysv/dir.c
--- a/fs/sysv/dir.c	2005-01-10 20:11:17 -08:00
+++ b/fs/sysv/dir.c	2005-01-10 20:11:17 -08:00
@@ -231,7 +231,7 @@
 	memset (de->name + namelen, 0, SYSV_DIRSIZE - namelen - 2);
 	de->inode = cpu_to_fs16(SYSV_SB(inode->i_sb), inode->i_ino);
 	err = dir_commit_chunk(page, from, to);
-	dir->i_mtime = dir->i_ctime = CURRENT_TIME;
+	dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC;
 	mark_inode_dirty(dir);
 out_page:
 	dir_put_page(page);
@@ -258,7 +258,7 @@
 	de->inode = 0;
 	err = dir_commit_chunk(page, from, to);
 	dir_put_page(page);
-	inode->i_ctime = inode->i_mtime = CURRENT_TIME;
+	inode->i_ctime = inode->i_mtime = CURRENT_TIME_SEC;
 	mark_inode_dirty(inode);
 	return err;
 }
@@ -358,7 +358,7 @@
 	de->inode = cpu_to_fs16(SYSV_SB(inode->i_sb), inode->i_ino);
 	err = dir_commit_chunk(page, from, to);
 	dir_put_page(page);
-	dir->i_mtime = dir->i_ctime = CURRENT_TIME;
+	dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC;
 	mark_inode_dirty(dir);
 }
 
diff -Nru a/fs/sysv/ialloc.c b/fs/sysv/ialloc.c
--- a/fs/sysv/ialloc.c	2005-01-10 20:11:16 -08:00
+++ b/fs/sysv/ialloc.c	2005-01-10 20:11:16 -08:00
@@ -169,7 +169,7 @@
 
 	inode->i_uid = current->fsuid;
 	inode->i_ino = fs16_to_cpu(sbi, ino);
-	inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
+	inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC;
 	inode->i_blocks = inode->i_blksize = 0;
 	memset(SYSV_I(inode)->i_data, 0, sizeof(SYSV_I(inode)->i_data));
 	SYSV_I(inode)->i_dir_start_lookup = 0;
diff -Nru a/fs/sysv/itree.c b/fs/sysv/itree.c
--- a/fs/sysv/itree.c	2005-01-10 20:11:17 -08:00
+++ b/fs/sysv/itree.c	2005-01-10 20:11:17 -08:00
@@ -178,7 +178,7 @@
 	*where->p = where->key;
 	write_unlock(&pointers_lock);
 
-	inode->i_ctime = CURRENT_TIME;
+	inode->i_ctime = CURRENT_TIME_SEC;
 
 	/* had we spliced it onto indirect block? */
 	if (where->bh)
@@ -418,7 +418,7 @@
 		}
 		n++;
 	}
-	inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+	inode->i_mtime = inode->i_ctime = CURRENT_TIME_SEC;
 	if (IS_SYNC(inode))
 		sysv_sync_inode (inode);
 	else
diff -Nru a/fs/sysv/namei.c b/fs/sysv/namei.c
--- a/fs/sysv/namei.c	2005-01-10 20:11:19 -08:00
+++ b/fs/sysv/namei.c	2005-01-10 20:11:19 -08:00
@@ -137,7 +137,7 @@
 	if (inode->i_nlink >= SYSV_SB(inode->i_sb)->s_link_max)
 		return -EMLINK;
 
-	inode->i_ctime = CURRENT_TIME;
+	inode->i_ctime = CURRENT_TIME_SEC;
 	inc_count(inode);
 	atomic_inc(&inode->i_count);
 
@@ -260,7 +260,7 @@
 			goto out_dir;
 		inc_count(old_inode);
 		sysv_set_link(new_de, new_page, old_inode);
-		new_inode->i_ctime = CURRENT_TIME;
+		new_inode->i_ctime = CURRENT_TIME_SEC;
 		if (dir_de)
 			new_inode->i_nlink--;
 		dec_count(new_inode);
diff -Nru a/fs/udf/ialloc.c b/fs/udf/ialloc.c
--- a/fs/udf/ialloc.c	2005-01-10 20:11:18 -08:00
+++ b/fs/udf/ialloc.c	2005-01-10 20:11:18 -08:00
@@ -157,7 +157,7 @@
 	else
 		UDF_I_ALLOCTYPE(inode) = ICBTAG_FLAG_AD_LONG;
 	inode->i_mtime = inode->i_atime = inode->i_ctime =
-		UDF_I_CRTIME(inode) = CURRENT_TIME;
+		UDF_I_CRTIME(inode) = current_fs_time(inode->i_sb);
 	insert_inode_hash(inode);
 	mark_inode_dirty(inode);
 
diff -Nru a/fs/udf/inode.c b/fs/udf/inode.c
--- a/fs/udf/inode.c	2005-01-10 20:11:23 -08:00
+++ b/fs/udf/inode.c	2005-01-10 20:11:23 -08:00
@@ -70,30 +70,6 @@
 static int udf_get_block(struct inode *, sector_t, struct buffer_head *, int);
 
 /*
- * udf_put_inode
- *
- * PURPOSE
- *
- * DESCRIPTION
- *	This routine is called whenever the kernel no longer needs the inode.
- *
- * HISTORY
- *	July 1, 1997 - Andrew E. Mileski
- *	Written, tested, and released.
- *
- *  Called at each iput()
- */
-void udf_put_inode(struct inode * inode)
-{
-	if (!(inode->i_sb->s_flags & MS_RDONLY))
-	{
-		lock_kernel();
-		udf_discard_prealloc(inode);
-		unlock_kernel();
-	}
-}
-
-/*
  * udf_delete_inode
  *
  * PURPOSE
@@ -129,6 +105,12 @@
 
 void udf_clear_inode(struct inode *inode)
 {
+	if (!(inode->i_sb->s_flags & MS_RDONLY)) {
+		lock_kernel();
+		udf_discard_prealloc(inode);
+		unlock_kernel();
+	}
+
 	kfree(UDF_I_DATA(inode));
 	UDF_I_DATA(inode) = NULL;
 }
@@ -568,7 +550,7 @@
 	*new = 1;
 	UDF_I_NEXT_ALLOC_BLOCK(inode) = block;
 	UDF_I_NEXT_ALLOC_GOAL(inode) = newblocknum;
-	inode->i_ctime = CURRENT_TIME;
+	inode->i_ctime = current_fs_time(inode->i_sb);
 
 	if (IS_SYNC(inode))
 		udf_sync_inode(inode);
@@ -912,7 +894,7 @@
 		udf_truncate_extents(inode);
 	}	
 
-	inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+	inode->i_mtime = inode->i_ctime = current_fs_time(inode->i_sb);
 	if (IS_SYNC(inode))
 		udf_sync_inode (inode);
 	else
@@ -920,30 +902,6 @@
 	unlock_kernel();
 }
 
-/*
- * udf_read_inode
- *
- * PURPOSE
- *	Read an inode.
- *
- * DESCRIPTION
- *	This routine is called by iget() [which is called by udf_iget()]
- *      (clean_inode() will have been called first)
- *	when an inode is first read into memory.
- *
- * HISTORY
- *	July 1, 1997 - Andrew E. Mileski
- *	Written, tested, and released.
- *
- * 12/19/98 dgb  Updated to fix size problems.
- */
-
-void
-udf_read_inode(struct inode *inode)
-{
-	memset(&UDF_I_LOCATION(inode), 0xFF, sizeof(kernel_lb_addr));
-}
-
 static void
 __udf_read_inode(struct inode *inode)
 {
@@ -1567,66 +1525,36 @@
 	return err;
 }
 
-/*
- * udf_iget
- *
- * PURPOSE
- *	Get an inode.
- *
- * DESCRIPTION
- *	This routine replaces iget() and read_inode().
- *
- * HISTORY
- *	October 3, 1997 - Andrew E. Mileski
- *	Written, tested, and released.
- *
- * 12/19/98 dgb  Added semaphore and changed to be a wrapper of iget
- */
 struct inode *
 udf_iget(struct super_block *sb, kernel_lb_addr ino)
 {
-	struct inode *inode;
-	unsigned long block;
-
-	block = udf_get_lb_pblock(sb, ino, 0);
-
-	/* Get the inode */
-
-	inode = iget(sb, block);
-		/* calls udf_read_inode() ! */
+	unsigned long block = udf_get_lb_pblock(sb, ino, 0);
+	struct inode *inode = iget_locked(sb, block);
 
 	if (!inode)
-	{
-		printk(KERN_ERR "udf: iget() failed\n");
 		return NULL;
-	}
-	else if (is_bad_inode(inode))
-	{
-		iput(inode);
-		return NULL;
-	}
-	else if (UDF_I_LOCATION(inode).logicalBlockNum == 0xFFFFFFFF &&
-		UDF_I_LOCATION(inode).partitionReferenceNum == 0xFFFF)
-	{
+
+	if (inode->i_state & I_NEW) {
 		memcpy(&UDF_I_LOCATION(inode), &ino, sizeof(kernel_lb_addr));
 		__udf_read_inode(inode);
-		if (is_bad_inode(inode))
-		{
-			iput(inode);
-			return NULL;
-		}
+		unlock_new_inode(inode);
 	}
 
-	if ( ino.logicalBlockNum >= UDF_SB_PARTLEN(sb, ino.partitionReferenceNum) )
-	{
+	if (is_bad_inode(inode))
+		goto out_iput;
+
+	if (ino.logicalBlockNum >= UDF_SB_PARTLEN(sb, ino.partitionReferenceNum)) {
 		udf_debug("block=%d, partition=%d out of range\n",
 			ino.logicalBlockNum, ino.partitionReferenceNum);
 		make_bad_inode(inode);
-		iput(inode);
-		return NULL;
- 	}
+		goto out_iput;
+	}
 
 	return inode;
+
+ out_iput:
+	iput(inode);
+	return NULL;
 }
 
 int8_t udf_add_aext(struct inode *inode, kernel_lb_addr *bloc, int *extoffset,
diff -Nru a/fs/udf/namei.c b/fs/udf/namei.c
--- a/fs/udf/namei.c	2005-01-10 20:11:22 -08:00
+++ b/fs/udf/namei.c	2005-01-10 20:11:22 -08:00
@@ -887,7 +887,7 @@
 	inode->i_size = 0;
 	mark_inode_dirty(inode);
 	dir->i_nlink --;
-	inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME;
+	inode->i_ctime = dir->i_ctime = dir->i_mtime = current_fs_time(dir->i_sb);
 	mark_inode_dirty(dir);
 
 end_rmdir:
@@ -928,7 +928,7 @@
 	retval = udf_delete_entry(dir, fi, &fibh, &cfi);
 	if (retval)
 		goto end_unlink;
-	dir->i_ctime = dir->i_mtime = CURRENT_TIME;
+	dir->i_ctime = dir->i_mtime = current_fs_time(dir->i_sb);
 	mark_inode_dirty(dir);
 	inode->i_nlink--;
 	mark_inode_dirty(inode);
@@ -1158,7 +1158,7 @@
 		udf_release_data(fibh.ebh);
 	udf_release_data(fibh.sbh);
 	inode->i_nlink ++;
-	inode->i_ctime = CURRENT_TIME;
+	inode->i_ctime = current_fs_time(inode->i_sb);
 	mark_inode_dirty(inode);
 	atomic_inc(&inode->i_count);
 	d_instantiate(dentry, inode);
@@ -1251,7 +1251,7 @@
 	 * Like most other Unix systems, set the ctime for inodes on a
 	 * rename.
 	 */
-	old_inode->i_ctime = CURRENT_TIME;
+	old_inode->i_ctime = current_fs_time(old_inode->i_sb);
 	mark_inode_dirty(old_inode);
 
 	/*
@@ -1269,10 +1269,10 @@
 	if (new_inode)
 	{
 		new_inode->i_nlink--;
-		new_inode->i_ctime = CURRENT_TIME;
+		new_inode->i_ctime = current_fs_time(new_inode->i_sb);
 		mark_inode_dirty(new_inode);
 	}
-	old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME;
+	old_dir->i_ctime = old_dir->i_mtime = current_fs_time(old_dir->i_sb);
 	mark_inode_dirty(old_dir);
 
 	if (dir_fi)
diff -Nru a/fs/udf/super.c b/fs/udf/super.c
--- a/fs/udf/super.c	2005-01-10 20:11:20 -08:00
+++ b/fs/udf/super.c	2005-01-10 20:11:20 -08:00
@@ -162,9 +162,7 @@
 static struct super_operations udf_sb_ops = {
 	.alloc_inode		= udf_alloc_inode,
 	.destroy_inode		= udf_destroy_inode,
-	.read_inode		= udf_read_inode,
 	.write_inode		= udf_write_inode,
-	.put_inode		= udf_put_inode,
 	.delete_inode		= udf_delete_inode,
 	.clear_inode		= udf_clear_inode,
 	.put_super		= udf_put_super,
@@ -1567,6 +1565,7 @@
 	sb->dq_op = NULL;
 	sb->s_dirt = 0;
 	sb->s_magic = UDF_SUPER_MAGIC;
+	sb->s_time_gran = 1000;
 
 	if (udf_load_partition(sb, &fileset))
 	{
diff -Nru a/fs/udf/udfdecl.h b/fs/udf/udfdecl.h
--- a/fs/udf/udfdecl.h	2005-01-10 20:11:18 -08:00
+++ b/fs/udf/udfdecl.h	2005-01-10 20:11:18 -08:00
@@ -96,7 +96,6 @@
 extern struct buffer_head * udf_bread(struct inode *, int, int, int *);
 extern void udf_truncate(struct inode *);
 extern void udf_read_inode(struct inode *);
-extern void udf_put_inode(struct inode *);
 extern void udf_delete_inode(struct inode *);
 extern void udf_clear_inode(struct inode *);
 extern int udf_write_inode(struct inode *, int);
diff -Nru a/fs/ufs/dir.c b/fs/ufs/dir.c
--- a/fs/ufs/dir.c	2005-01-10 20:11:21 -08:00
+++ b/fs/ufs/dir.c	2005-01-10 20:11:21 -08:00
@@ -462,7 +462,7 @@
 	if (IS_DIRSYNC(dir))
 		sync_dirty_buffer(bh);
 	brelse (bh);
-	dir->i_mtime = dir->i_ctime = CURRENT_TIME;
+	dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC;
 	dir->i_version++;
 	mark_inode_dirty(dir);
 
@@ -505,7 +505,7 @@
 					fs16_to_cpu(sb, dir->d_reclen));
 			dir->d_ino = 0;
 			inode->i_version++;
-			inode->i_ctime = inode->i_mtime = CURRENT_TIME;
+			inode->i_ctime = inode->i_mtime = CURRENT_TIME_SEC;
 			mark_inode_dirty(inode);
 			mark_buffer_dirty(bh);
 			if (IS_DIRSYNC(inode))
diff -Nru a/fs/ufs/ialloc.c b/fs/ufs/ialloc.c
--- a/fs/ufs/ialloc.c	2005-01-10 20:11:22 -08:00
+++ b/fs/ufs/ialloc.c	2005-01-10 20:11:22 -08:00
@@ -267,7 +267,7 @@
 	inode->i_ino = cg * uspi->s_ipg + bit;
 	inode->i_blksize = PAGE_SIZE;	/* This is the optimal IO size (for stat), not the fs block size */
 	inode->i_blocks = 0;
-	inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
+	inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC;
 	ufsi->i_flags = UFS_I(dir)->i_flags;
 	ufsi->i_lastfrag = 0;
 	ufsi->i_gen = 0;
diff -Nru a/fs/ufs/inode.c b/fs/ufs/inode.c
--- a/fs/ufs/inode.c	2005-01-10 20:11:24 -08:00
+++ b/fs/ufs/inode.c	2005-01-10 20:11:24 -08:00
@@ -272,7 +272,7 @@
 		*new = 1;
 	}
 
-	inode->i_ctime = CURRENT_TIME;
+	inode->i_ctime = CURRENT_TIME_SEC;
 	if (IS_SYNC(inode))
 		ufs_sync_inode (inode);
 	mark_inode_dirty(inode);
@@ -363,7 +363,7 @@
 	mark_buffer_dirty(bh);
 	if (IS_SYNC(inode))
 		sync_dirty_buffer(bh);
-	inode->i_ctime = CURRENT_TIME;
+	inode->i_ctime = CURRENT_TIME_SEC;
 	mark_inode_dirty(inode);
 out:
 	brelse (bh);
diff -Nru a/fs/ufs/namei.c b/fs/ufs/namei.c
--- a/fs/ufs/namei.c	2005-01-10 20:11:23 -08:00
+++ b/fs/ufs/namei.c	2005-01-10 20:11:23 -08:00
@@ -190,7 +190,7 @@
 		return -EMLINK;
 	}
 
-	inode->i_ctime = CURRENT_TIME;
+	inode->i_ctime = CURRENT_TIME_SEC;
 	ufs_inc_count(inode);
 	atomic_inc(&inode->i_count);
 
@@ -321,7 +321,7 @@
 			goto out_dir;
 		ufs_inc_count(old_inode);
 		ufs_set_link(new_dir, new_de, new_bh, old_inode);
-		new_inode->i_ctime = CURRENT_TIME;
+		new_inode->i_ctime = CURRENT_TIME_SEC;
 		if (dir_de)
 			new_inode->i_nlink--;
 		ufs_dec_count(new_inode);
diff -Nru a/fs/ufs/truncate.c b/fs/ufs/truncate.c
--- a/fs/ufs/truncate.c	2005-01-10 20:11:19 -08:00
+++ b/fs/ufs/truncate.c	2005-01-10 20:11:19 -08:00
@@ -469,7 +469,7 @@
 			brelse (bh);
 		}
 	}
-	inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+	inode->i_mtime = inode->i_ctime = CURRENT_TIME_SEC;
 	ufsi->i_lastfrag = DIRECT_FRAGMENT;
 	unlock_kernel();
 	mark_inode_dirty(inode);
diff -Nru a/fs/umsdos/emd.c b/fs/umsdos/emd.c
--- a/fs/umsdos/emd.c	2005-01-10 20:11:22 -08:00
+++ b/fs/umsdos/emd.c	2005-01-10 20:11:22 -08:00
@@ -295,7 +295,7 @@
 	unlock_page(page);
 	page_cache_release(page);
 		
-	dir->i_ctime = dir->i_mtime = CURRENT_TIME;
+	dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC;
 	mark_inode_dirty(dir);
 
 out_dput:
diff -Nru a/fs/vfat/namei.c b/fs/vfat/namei.c
--- a/fs/vfat/namei.c	2005-01-10 20:11:20 -08:00
+++ b/fs/vfat/namei.c	2005-01-10 20:11:20 -08:00
@@ -735,10 +735,11 @@
 
 	res = 0;
 	/* update timestamp */
-	dir->i_ctime = dir->i_mtime = dir->i_atime = CURRENT_TIME;
+	dir->i_ctime = dir->i_mtime = dir->i_atime = CURRENT_TIME_SEC;
 	mark_inode_dirty(dir);
 
 	fat_date_unix2dos(dir->i_mtime.tv_sec, &(*de)->time, &(*de)->date);
+	dir->i_mtime.tv_nsec = 0;
 	(*de)->ctime = (*de)->time;
 	(*de)->adate = (*de)->cdate = (*de)->date;
 
@@ -848,7 +849,7 @@
 	if (!inode)
 		goto out;
 	res = 0;
-	inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
+	inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC;
 	mark_inode_dirty(inode);
 	inode->i_version++;
 	dir->i_version++;
@@ -866,7 +867,7 @@
 	int i;
 
 	/* remove the shortname */
-	dir->i_mtime = dir->i_atime = CURRENT_TIME;
+	dir->i_mtime = dir->i_atime = CURRENT_TIME_SEC;
 	dir->i_version++;
 	mark_inode_dirty(dir);
 	de->name[0] = DELETED_FLAG;
@@ -900,7 +901,7 @@
 		goto out;
 	res = 0;
 	dentry->d_inode->i_nlink = 0;
-	dentry->d_inode->i_mtime = dentry->d_inode->i_atime = CURRENT_TIME;
+	dentry->d_inode->i_mtime = dentry->d_inode->i_atime = CURRENT_TIME_SEC;
 	fat_detach(dentry->d_inode);
 	mark_inode_dirty(dentry->d_inode);
 	/* releases bh */
@@ -923,7 +924,7 @@
 	if (res < 0)
 		goto out;
 	dentry->d_inode->i_nlink = 0;
-	dentry->d_inode->i_mtime = dentry->d_inode->i_atime = CURRENT_TIME;
+	dentry->d_inode->i_mtime = dentry->d_inode->i_atime = CURRENT_TIME_SEC;
 	fat_detach(dentry->d_inode);
 	mark_inode_dirty(dentry->d_inode);
 	/* releases bh */
@@ -950,7 +951,7 @@
 	inode = fat_build_inode(sb, de, sinfo.i_pos, &res);
 	if (!inode)
 		goto out_brelse;
-	inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
+	inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC;
 	mark_inode_dirty(inode);
 	inode->i_version++;
 	dir->i_version++;
@@ -969,7 +970,7 @@
 
 mkdir_failed:
 	inode->i_nlink = 0;
-	inode->i_mtime = inode->i_atime = CURRENT_TIME;
+	inode->i_mtime = inode->i_atime = CURRENT_TIME_SEC;
 	fat_detach(inode);
 	mark_inode_dirty(inode);
 	/* releases bh */
@@ -1038,11 +1039,11 @@
 	mark_inode_dirty(old_inode);
 
 	old_dir->i_version++;
-	old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME;
+	old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME_SEC;
 	mark_inode_dirty(old_dir);
 	if (new_inode) {
 		new_inode->i_nlink--;
-		new_inode->i_ctime=CURRENT_TIME;
+		new_inode->i_ctime = CURRENT_TIME_SEC;
 	}
 
 	if (is_dir) {
diff -Nru a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c
--- a/fs/xfs/linux-2.6/xfs_super.c	2005-01-10 20:11:22 -08:00
+++ b/fs/xfs/linux-2.6/xfs_super.c	2005-01-10 20:11:22 -08:00
@@ -829,6 +829,7 @@
 	sb->s_blocksize = statvfs.f_bsize;
 	sb->s_blocksize_bits = ffs(statvfs.f_bsize) - 1;
 	sb->s_maxbytes = xfs_max_file_offset(sb->s_blocksize_bits);
+	sb->s_time_gran = 1;
 	set_posix_acl_flag(sb);
 
 	VFS_ROOT(vfsp, &rootvp, error);
diff -Nru a/fs/xfs/linux-2.6/xfs_vfs.c b/fs/xfs/linux-2.6/xfs_vfs.c
--- a/fs/xfs/linux-2.6/xfs_vfs.c	2005-01-10 20:11:24 -08:00
+++ b/fs/xfs/linux-2.6/xfs_vfs.c	2005-01-10 20:11:24 -08:00
@@ -250,7 +250,7 @@
 	vfsp = kmem_zalloc(sizeof(vfs_t), KM_SLEEP);
 	bhv_head_init(VFS_BHVHEAD(vfsp), "vfs");
 	INIT_LIST_HEAD(&vfsp->vfs_sync_list);
-	vfsp->vfs_sync_lock = SPIN_LOCK_UNLOCKED;
+	spin_lock_init(&vfsp->vfs_sync_lock);
 	init_waitqueue_head(&vfsp->vfs_wait_sync_task);
 	init_waitqueue_head(&vfsp->vfs_wait_single_sync_task);
 	return vfsp;
diff -Nru a/include/acpi/acconfig.h b/include/acpi/acconfig.h
--- a/include/acpi/acconfig.h	2005-01-10 20:11:21 -08:00
+++ b/include/acpi/acconfig.h	2005-01-10 20:11:21 -08:00
@@ -64,7 +64,7 @@
 
 /* Version string */
 
-#define ACPI_CA_VERSION                 0x20041105
+#define ACPI_CA_VERSION                 0x20041210
 
 /*
  * OS name, used for the _OS object.  The _OS object is essentially obsolete,
@@ -99,7 +99,7 @@
 
 /* Version of ACPI supported */
 
-#define ACPI_CA_SUPPORT_LEVEL           2
+#define ACPI_CA_SUPPORT_LEVEL           3
 
 /* String size constants */
 
diff -Nru a/include/acpi/acdisasm.h b/include/acpi/acdisasm.h
--- a/include/acpi/acdisasm.h	2005-01-10 20:11:19 -08:00
+++ b/include/acpi/acdisasm.h	2005-01-10 20:11:19 -08:00
@@ -317,6 +317,12 @@
 	u32                             level);
 
 void
+acpi_dm_extended_descriptor (
+	struct asl_extended_address_desc   *resource,
+	u32                             length,
+	u32                             level);
+
+void
 acpi_dm_qword_descriptor (
 	struct asl_qword_address_desc   *resource,
 	u32                             length,
diff -Nru a/include/acpi/aclocal.h b/include/acpi/aclocal.h
--- a/include/acpi/aclocal.h	2005-01-10 20:11:20 -08:00
+++ b/include/acpi/aclocal.h	2005-01-10 20:11:20 -08:00
@@ -862,7 +862,6 @@
 /*
  * Large resource descriptor types
  */
-
 #define ACPI_RDESC_TYPE_MEMORY_24               0x81
 #define ACPI_RDESC_TYPE_GENERAL_REGISTER        0x82
 #define ACPI_RDESC_TYPE_LARGE_VENDOR            0x84
@@ -872,6 +871,7 @@
 #define ACPI_RDESC_TYPE_WORD_ADDRESS_SPACE      0x88
 #define ACPI_RDESC_TYPE_EXTENDED_XRUPT          0x89
 #define ACPI_RDESC_TYPE_QWORD_ADDRESS_SPACE     0x8A
+#define ACPI_RDESC_TYPE_EXTENDED_ADDRESS_SPACE  0x8B
 
 
 /*****************************************************************************
diff -Nru a/include/acpi/acmacros.h b/include/acpi/acmacros.h
--- a/include/acpi/acmacros.h	2005-01-10 20:11:19 -08:00
+++ b/include/acpi/acmacros.h	2005-01-10 20:11:19 -08:00
@@ -55,6 +55,7 @@
 
 #define ACPI_SET_BIT(target,bit)        ((target) |= (bit))
 #define ACPI_CLEAR_BIT(target,bit)      ((target) &= ~(bit))
+#define ACPI_MIN(a,b)                   (((a)<(b))?(a):(b))
 
 
 #if ACPI_MACHINE_WIDTH == 16
@@ -487,19 +488,19 @@
  * The first parameter should be the procedure name as a quoted string.  This is declared
  * as a local string ("_proc_name) so that it can be also used by the function exit macros below.
  */
-#define ACPI_FUNCTION_NAME(a)               struct acpi_debug_print_info _dbg; \
-												_dbg.component_id = _COMPONENT; \
-												_dbg.proc_name   = a; \
-												_dbg.module_name = _THIS_MODULE;
+#define ACPI_FUNCTION_NAME(a)               struct acpi_debug_print_info _debug_info; \
+												_debug_info.component_id = _COMPONENT; \
+												_debug_info.proc_name  = a; \
+												_debug_info.module_name = _THIS_MODULE;
 
 #define ACPI_FUNCTION_TRACE(a)              ACPI_FUNCTION_NAME(a) \
-												acpi_ut_trace(__LINE__,&_dbg)
+												acpi_ut_trace(__LINE__,&_debug_info)
 #define ACPI_FUNCTION_TRACE_PTR(a,b)        ACPI_FUNCTION_NAME(a) \
-												acpi_ut_trace_ptr(__LINE__,&_dbg,(void *)b)
+												acpi_ut_trace_ptr(__LINE__,&_debug_info,(void *)b)
 #define ACPI_FUNCTION_TRACE_U32(a,b)        ACPI_FUNCTION_NAME(a) \
-												acpi_ut_trace_u32(__LINE__,&_dbg,(u32)b)
+												acpi_ut_trace_u32(__LINE__,&_debug_info,(u32)b)
 #define ACPI_FUNCTION_TRACE_STR(a,b)        ACPI_FUNCTION_NAME(a) \
-												acpi_ut_trace_str(__LINE__,&_dbg,(char *)b)
+												acpi_ut_trace_str(__LINE__,&_debug_info,(char *)b)
 
 #define ACPI_FUNCTION_ENTRY()               acpi_ut_track_stack_ptr()
 
@@ -516,10 +517,10 @@
 #define ACPI_DO_WHILE0(a)               a
 #endif
 
-#define return_VOID                     ACPI_DO_WHILE0 ({acpi_ut_exit(__LINE__,&_dbg);return;})
-#define return_ACPI_STATUS(s)           ACPI_DO_WHILE0 ({acpi_ut_status_exit(__LINE__,&_dbg,(s));return((s));})
-#define return_VALUE(s)                 ACPI_DO_WHILE0 ({acpi_ut_value_exit(__LINE__,&_dbg,(acpi_integer)(s));return((s));})
-#define return_PTR(s)                   ACPI_DO_WHILE0 ({acpi_ut_ptr_exit(__LINE__,&_dbg,(u8 *)(s));return((s));})
+#define return_VOID                     ACPI_DO_WHILE0 ({acpi_ut_exit(__LINE__,&_debug_info);return;})
+#define return_ACPI_STATUS(s)           ACPI_DO_WHILE0 ({acpi_ut_status_exit(__LINE__,&_debug_info,(s));return((s));})
+#define return_VALUE(s)                 ACPI_DO_WHILE0 ({acpi_ut_value_exit(__LINE__,&_debug_info,(acpi_integer)(s));return((s));})
+#define return_PTR(s)                   ACPI_DO_WHILE0 ({acpi_ut_ptr_exit(__LINE__,&_debug_info,(u8 *)(s));return((s));})
 
 /* Conditional execution */
 
diff -Nru a/include/acpi/acobject.h b/include/acpi/acobject.h
--- a/include/acpi/acobject.h	2005-01-10 20:11:16 -08:00
+++ b/include/acpi/acobject.h	2005-01-10 20:11:16 -08:00
@@ -94,9 +94,7 @@
 	u32                                     bit_length;         /* Length of field in bits */\
 	u32                                     base_byte_offset;   /* Byte offset within containing object */\
 	u8                                      start_field_bit_offset;/* Bit offset within first field datum (0-63) */\
-	u8                                      datum_valid_bits;   /* Valid bit in first "Field datum" */\
-	u8                                      end_field_valid_bits; /* Valid bits in the last "field datum" */\
-	u8                                      end_buffer_valid_bits; /* Valid bits in the last "buffer datum" */\
+	u8                                      access_bit_width;   /* Read/Write size in bits (8-64) */\
 	u32                                     value;              /* Value to store into the Bank or Index register */\
 	struct acpi_namespace_node              *node;              /* Link back to parent node */
 
diff -Nru a/include/acpi/acoutput.h b/include/acpi/acoutput.h
--- a/include/acpi/acoutput.h	2005-01-10 20:11:18 -08:00
+++ b/include/acpi/acoutput.h	2005-01-10 20:11:18 -08:00
@@ -136,7 +136,7 @@
 /*
  * Debug level macros that are used in the DEBUG_PRINT macros
  */
-#define ACPI_DEBUG_LEVEL(dl)        (u32) dl,__LINE__,&_dbg
+#define ACPI_DEBUG_LEVEL(dl)        (u32) dl,__LINE__,&_debug_info
 
 /* Exception level -- used in the global "debug_level" */
 
diff -Nru a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
--- a/include/acpi/acpi_bus.h	2005-01-10 20:11:24 -08:00
+++ b/include/acpi/acpi_bus.h	2005-01-10 20:11:24 -08:00
@@ -104,6 +104,7 @@
 typedef int (*acpi_op_resume)	(struct acpi_device *device, int state);
 typedef int (*acpi_op_scan)	(struct acpi_device *device);
 typedef int (*acpi_op_bind)	(struct acpi_device *device);
+typedef int (*acpi_op_unbind)	(struct acpi_device *device);
 typedef int (*acpi_op_match)	(struct acpi_device *device,
 				 struct acpi_driver *driver);
 
@@ -117,6 +118,7 @@
 	acpi_op_resume		resume;
 	acpi_op_scan		scan;
 	acpi_op_bind		bind;
+	acpi_op_unbind		unbind;
 	acpi_op_match		match;
 };
 
@@ -316,7 +318,8 @@
  * External Functions
  */
 
-int acpi_bus_get_device(acpi_handle, struct acpi_device **device);
+int acpi_bus_get_device(acpi_handle handle, struct acpi_device **device);
+void acpi_bus_data_handler(acpi_handle handle, u32 function, void *context);
 int acpi_bus_get_status (struct acpi_device *device);
 int acpi_bus_get_power (acpi_handle handle, int *state);
 int acpi_bus_set_power (acpi_handle handle, int state);
@@ -324,6 +327,11 @@
 int acpi_bus_receive_event (struct acpi_bus_event *event);
 int acpi_bus_register_driver (struct acpi_driver *driver);
 int acpi_bus_unregister_driver (struct acpi_driver *driver);
+int acpi_bus_scan (struct acpi_device *start);
+int acpi_bus_trim(struct acpi_device *start, int rmdevice);
+int acpi_bus_add (struct acpi_device **child, struct acpi_device *parent,
+		acpi_handle handle, int type);
+
 
 int acpi_match_ids (struct acpi_device	*device, char	*ids);
 int acpi_create_dir(struct acpi_device *);
diff -Nru a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h
--- a/include/acpi/acpi_drivers.h	2005-01-10 20:11:21 -08:00
+++ b/include/acpi/acpi_drivers.h	2005-01-10 20:11:21 -08:00
@@ -61,12 +61,14 @@
 /* ACPI PCI Interrupt Routing (pci_irq.c) */
 
 int acpi_pci_irq_add_prt (acpi_handle handle, int segment, int bus);
+void acpi_pci_irq_del_prt (int segment, int bus);
 
 /* ACPI PCI Device Binding (pci_bind.c) */
 
 struct pci_bus;
 
 int acpi_pci_bind (struct acpi_device *device);
+int acpi_pci_unbind (struct acpi_device *device);
 int acpi_pci_bind_root (struct acpi_device *device, struct acpi_pci_id *id, struct pci_bus *bus);
 
 /* Arch-defined function to add a bus to the system */
diff -Nru a/include/acpi/acpixf.h b/include/acpi/acpixf.h
--- a/include/acpi/acpixf.h	2005-01-10 20:11:15 -08:00
+++ b/include/acpi/acpixf.h	2005-01-10 20:11:15 -08:00
@@ -345,11 +345,11 @@
 	u32                             event,
 	u32                             flags);
 
-#ifdef ACPI_FUTURE_USAGE
 acpi_status
 acpi_clear_event (
 	u32                             event);
 
+#ifdef ACPI_FUTURE_USAGE
 acpi_status
 acpi_get_event_status (
 	u32                             event,
diff -Nru a/include/acpi/actbl2.h b/include/acpi/actbl2.h
--- a/include/acpi/actbl2.h	2005-01-10 20:11:20 -08:00
+++ b/include/acpi/actbl2.h	2005-01-10 20:11:20 -08:00
@@ -115,7 +115,7 @@
 	u8                              address_space_id;       /* Address space where struct or register exists. */
 	u8                              register_bit_width;     /* Size in bits of given register */
 	u8                              register_bit_offset;    /* Bit offset within the register */
-	u8                              reserved;               /* Must be 0 */
+	u8                              access_width;           /* Minimum Access size (ACPI 3.0) */
 	u64                             address;                /* 64-bit address of struct or register */
 };
 
diff -Nru a/include/acpi/amlcode.h b/include/acpi/amlcode.h
--- a/include/acpi/amlcode.h	2005-01-10 20:11:20 -08:00
+++ b/include/acpi/amlcode.h	2005-01-10 20:11:20 -08:00
@@ -320,6 +320,7 @@
 #define AML_HAS_TARGET              0x0800
 #define AML_HAS_ARGS                0x1000
 #define AML_CONSTANT                0x2000
+#define AML_NO_OPERAND_RESOLVE      0x4000
 
 /* Convenient flag groupings */
 
diff -Nru a/include/acpi/amlresrc.h b/include/acpi/amlresrc.h
--- a/include/acpi/amlresrc.h	2005-01-10 20:11:22 -08:00
+++ b/include/acpi/amlresrc.h	2005-01-10 20:11:22 -08:00
@@ -50,6 +50,8 @@
 #define ASL_RESNAME_ADDRESS                     "_ADR"
 #define ASL_RESNAME_ALIGNMENT                   "_ALN"
 #define ASL_RESNAME_ADDRESSSPACE                "_ASI"
+#define ASL_RESNAME_ACCESSSIZE                  "_ASZ"
+#define ASL_RESNAME_TYPESPECIFICATTRIBUTES      "_ATT"
 #define ASL_RESNAME_BASEADDRESS                 "_BAS"
 #define ASL_RESNAME_BUSMASTER                   "_BM_"  /* Master(1), Slave(0) */
 #define ASL_RESNAME_DECODE                      "_DEC"
@@ -223,6 +225,27 @@
 };
 
 
+struct asl_extended_address_desc
+{
+	u8                                  descriptor_type;
+	u16                                 length;
+	u8                                  resource_type;
+	u8                                  flags;
+	u8                                  specific_flags;
+	u8                                  revision_iD;
+	u8                                  reserved;
+	u64                                 granularity;
+	u64                                 address_min;
+	u64                                 address_max;
+	u64                                 translation_offset;
+	u64                                 address_length;
+	u64                                 type_specific_attributes;
+	u8                                  optional_fields[2]; /* Used for length calculation only */
+};
+
+#define ASL_EXTENDED_ADDRESS_DESC_REVISION          1       /* ACPI 3.0 */
+
+
 struct asl_qword_address_desc
 {
 	u8                                  descriptor_type;
@@ -289,7 +312,7 @@
 	u8                                  address_space_id;
 	u8                                  bit_width;
 	u8                                  bit_offset;
-	u8                                  reserved;
+	u8                                  access_size; /* ACPI 3.0, was Reserved */
 	u64                                 address;
 };
 
@@ -317,6 +340,7 @@
 	struct asl_qword_address_desc       qas;
 	struct asl_dword_address_desc       das;
 	struct asl_word_address_desc        was;
+	struct asl_extended_address_desc    eas;
 	struct asl_extended_xrupt_desc      exx;
 	struct asl_general_register_desc    grg;
 	u32                                 u32_item;
diff -Nru a/include/acpi/container.h b/include/acpi/container.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/acpi/container.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,13 @@
+#ifndef __ACPI_CONTAINER_H
+#define __ACPI_CONTAINER_H
+
+#include <linux/kernel.h>
+
+struct acpi_container {
+	acpi_handle handle;
+	unsigned long sun;
+	int state;
+};
+
+#endif /* __ACPI_CONTAINER_H */
+
diff -Nru a/include/acpi/processor.h b/include/acpi/processor.h
--- a/include/acpi/processor.h	2005-01-10 20:11:18 -08:00
+++ b/include/acpi/processor.h	2005-01-10 20:11:18 -08:00
@@ -2,10 +2,11 @@
 #define __ACPI_PROCESSOR_H
 
 #include <linux/kernel.h>
+#include <linux/config.h>
 
 #define ACPI_PROCESSOR_BUSY_METRIC	10
 
-#define ACPI_PROCESSOR_MAX_POWER	ACPI_C_STATE_COUNT
+#define ACPI_PROCESSOR_MAX_POWER	8
 #define ACPI_PROCESSOR_MAX_C2_LATENCY	100
 #define ACPI_PROCESSOR_MAX_C3_LATENCY	1000
 
@@ -15,9 +16,22 @@
 
 /* Power Management */
 
+struct acpi_processor_cx;
+
+struct acpi_power_register {
+	u8			descriptor;
+	u16			length;
+	u8			space_id;
+	u8			bit_width;
+	u8			bit_offset;
+	u8			reserved;
+	u64			address;
+} __attribute__ ((packed));
+
+
 struct acpi_processor_cx_policy {
 	u32			count;
-	u32			state;
+	struct acpi_processor_cx *state;
 	struct {
 		u32			time;
 		u32			ticks;
@@ -28,6 +42,7 @@
 
 struct acpi_processor_cx {
 	u8			valid;
+	u8			type;
 	u32			address;
 	u32			latency;
 	u32			latency_ticks;
@@ -38,9 +53,10 @@
 };
 
 struct acpi_processor_power {
-	u32			state;
+	struct acpi_processor_cx *state;
 	u32			default_state;
 	u32			bm_activity;
+	int			count;
 	struct acpi_processor_cx states[ACPI_PROCESSOR_MAX_POWER];
 };
 
@@ -118,13 +134,15 @@
 	u8			limit:1;
 	u8			bm_control:1;
 	u8			bm_check:1;
-	u8			reserved:2;
+	u8			has_cst:1;
+	u8			power_setup_done:1;
 };
 
 struct acpi_processor {
 	acpi_handle		handle;
 	u32			acpi_id;
 	u32			id;
+	u32			pblk;
 	int			performance_platform_limit;
 	struct acpi_processor_flags flags;
 	struct acpi_processor_power power;
@@ -133,6 +151,16 @@
 	struct acpi_processor_limit limit;
 };
 
+struct acpi_processor_errata {
+	u8			smp;
+	struct {
+		u8			throttle:1;
+		u8			fdma:1;
+		u8			reserved:6;
+		u32			bmisx;
+	}			piix4;
+};
+
 extern int acpi_processor_register_performance (
 	struct acpi_processor_performance * performance,
 	unsigned int cpu);
@@ -143,5 +171,66 @@
 /* note: this locks both the calling module and the processor module
          if a _PPC object exists, rmmod is disallowed then */
 int acpi_processor_notify_smm(struct module *calling_module);
+
+
+
+/* for communication between multiple parts of the processor kernel module */
+extern struct acpi_processor	*processors[NR_CPUS];
+extern struct acpi_processor_errata errata;
+
+/* in processor_perflib.c */
+#ifdef CONFIG_CPU_FREQ
+void acpi_processor_ppc_init(void);
+void acpi_processor_ppc_exit(void);
+int acpi_processor_ppc_has_changed(struct acpi_processor *pr);
+#else
+static inline void acpi_processor_ppc_init(void) { return; }
+static inline void acpi_processor_ppc_exit(void) { return; }
+static inline int acpi_processor_ppc_has_changed(struct acpi_processor *pr) {
+	static unsigned int printout = 1;
+	if (printout) {
+		printk(KERN_WARNING "Warning: Processor Platform Limit event detected, but not handled.\n");
+		printk(KERN_WARNING "Consider compiling CPUfreq support into your kernel.\n");
+		printout = 0;
+	}
+	return 0;
+}
+#endif /* CONFIG_CPU_FREQ */
+
+/* in processor_throttling.c */
+int acpi_processor_get_throttling_info (struct acpi_processor *pr);
+int acpi_processor_set_throttling (struct acpi_processor *pr, int state);
+int acpi_processor_throttling_open_fs(struct inode *inode, struct file *file);
+ssize_t acpi_processor_write_throttling (
+        struct file		*file,
+        const char		__user *buffer,
+        size_t			count,
+        loff_t			*data);
+extern struct file_operations acpi_processor_throttling_fops;
+
+/* in processor_idle.c */
+int acpi_processor_power_init(struct acpi_processor *pr, struct acpi_device *device);
+int acpi_processor_cst_has_changed (struct acpi_processor *pr);
+int acpi_processor_power_exit(struct acpi_processor *pr, struct acpi_device *device);
+
+
+/* in processor_thermal.c */
+int acpi_processor_get_limit_info (struct acpi_processor *pr);
+int acpi_processor_limit_open_fs(struct inode *inode, struct file *file);
+ssize_t acpi_processor_write_limit (
+	struct file		*file,
+	const char		__user *buffer,
+	size_t			count,
+	loff_t			*data);
+extern struct file_operations acpi_processor_limit_fops;
+
+#ifdef CONFIG_CPU_FREQ
+void acpi_thermal_cpufreq_init(void);
+void acpi_thermal_cpufreq_exit(void);
+#else
+static inline void acpi_thermal_cpufreq_init(void) { return; }
+static inline void acpi_thermal_cpufreq_exit(void) { return; }
+#endif
+
 
 #endif
diff -Nru a/include/asm-alpha/hardirq.h b/include/asm-alpha/hardirq.h
--- a/include/asm-alpha/hardirq.h	2005-01-10 20:11:20 -08:00
+++ b/include/asm-alpha/hardirq.h	2005-01-10 20:11:20 -08:00
@@ -9,9 +9,6 @@
 /* entry.S is sensitive to the offsets of these fields */
 typedef struct {
 	unsigned long __softirq_pending;
-	unsigned int __syscall_count;
-	unsigned long idle_timestamp;
-	struct task_struct * __ksoftirqd_task;
 } ____cacheline_aligned irq_cpustat_t;
 
 #include <linux/irq_cpustat.h>	/* Standard mappings for irq_cpustat_t above */
@@ -28,15 +25,5 @@
 #if (1 << HARDIRQ_BITS) < 16
 #error HARDIRQ_BITS is too low!
 #endif
-
-#define irq_enter()		(preempt_count() += HARDIRQ_OFFSET)
-#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)
 
 #endif /* _ALPHA_HARDIRQ_H */
diff -Nru a/include/asm-alpha/pgalloc.h b/include/asm-alpha/pgalloc.h
--- a/include/asm-alpha/pgalloc.h	2005-01-10 20:11:24 -08:00
+++ b/include/asm-alpha/pgalloc.h	2005-01-10 20:11:24 -08:00
@@ -40,9 +40,7 @@
 static inline pmd_t *
 pmd_alloc_one(struct mm_struct *mm, unsigned long address)
 {
-	pmd_t *ret = (pmd_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT);
-	if (ret)
-		clear_page(ret);
+	pmd_t *ret = (pmd_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO);
 	return ret;
 }
 
diff -Nru a/include/asm-alpha/pgtable.h b/include/asm-alpha/pgtable.h
--- a/include/asm-alpha/pgtable.h	2005-01-10 20:11:17 -08:00
+++ b/include/asm-alpha/pgtable.h	2005-01-10 20:11:17 -08:00
@@ -1,6 +1,8 @@
 #ifndef _ALPHA_PGTABLE_H
 #define _ALPHA_PGTABLE_H
 
+#include <asm-generic/4level-fixup.h>
+
 /*
  * This file contains the functions and defines necessary to modify and use
  * the Alpha page table tree.
diff -Nru a/include/asm-alpha/processor.h b/include/asm-alpha/processor.h
--- a/include/asm-alpha/processor.h	2005-01-10 20:11:23 -08:00
+++ b/include/asm-alpha/processor.h	2005-01-10 20:11:23 -08:00
@@ -26,12 +26,6 @@
 #define TASK_UNMAPPED_BASE \
   ((current->personality & ADDR_LIMIT_32BIT) ? 0x40000000 : TASK_SIZE / 2)
 
-/*
- * Bus types
- */
-#define MCA_bus 0
-#define MCA_bus__is_a_macro /* for versions in ksyms.c */
-
 typedef struct {
 	unsigned long seg;
 } mm_segment_t;
diff -Nru a/include/asm-alpha/spinlock.h b/include/asm-alpha/spinlock.h
--- a/include/asm-alpha/spinlock.h	2005-01-10 20:11:20 -08:00
+++ b/include/asm-alpha/spinlock.h	2005-01-10 20:11:20 -08:00
@@ -23,6 +23,9 @@
 	struct task_struct * task;
 	const char *base_file;
 #endif
+#ifdef CONFIG_PREEMPT
+	unsigned int break_lock;
+#endif
 } spinlock_t;
 
 #ifdef CONFIG_DEBUG_SPINLOCK
@@ -96,6 +99,9 @@
 
 typedef struct {
 	volatile unsigned int write_lock:1, read_counter:31;
+#ifdef CONFIG_PREEMPT
+	unsigned int break_lock;
+#endif
 } /*__attribute__((aligned(32)))*/ rwlock_t;
 
 #define RW_LOCK_UNLOCKED (rwlock_t) { 0, 0 }
diff -Nru a/include/asm-arm/arch-cl7500/entry-macro.S b/include/asm-arm/arch-cl7500/entry-macro.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-arm/arch-cl7500/entry-macro.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,3 @@
+
+#include <asm/hardware/entry-macro-iomd.S>
+
diff -Nru a/include/asm-arm/arch-clps711x/entry-macro.S b/include/asm-arm/arch-clps711x/entry-macro.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-arm/arch-clps711x/entry-macro.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,51 @@
+/*
+ * include/asm-arm/arch-CLPS711x/entry-macro.S
+ *
+ * Low-level IRQ helper macros for CLPS711X-based platforms
+ *
+ * This file is licensed under  the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+#include <asm/hardware/clps7111.h>
+
+		.macro	disable_fiq
+		.endm
+
+#if (INTSR2 - INTSR1) != (INTMR2 - INTMR1)
+#error INTSR stride != INTMR stride
+#endif
+
+		.macro	get_irqnr_and_base, irqnr, stat, base, mask
+		mov	\base, #CLPS7111_BASE
+		ldr	\stat, [\base, #INTSR1]
+		ldr	\mask, [\base, #INTMR1]
+		mov	\irqnr, #4
+		mov	\mask, \mask, lsl #16
+		and	\stat, \stat, \mask, lsr #16
+		movs	\stat, \stat, lsr #4
+		bne	1001f
+
+		add	\base, \base, #INTSR2 - INTSR1
+		ldr	\stat, [\base, #INTSR1]
+		ldr	\mask, [\base, #INTMR1]
+		mov	\irqnr, #16
+		mov	\mask, \mask, lsl #16
+		and	\stat, \stat, \mask, lsr #16
+
+1001:		tst	\stat, #255
+		addeq	\irqnr, \irqnr, #8
+		moveq	\stat, \stat, lsr #8
+		tst	\stat, #15
+		addeq	\irqnr, \irqnr, #4
+		moveq	\stat, \stat, lsr #4
+		tst	\stat, #3
+		addeq	\irqnr, \irqnr, #2
+		moveq	\stat, \stat, lsr #2
+		tst	\stat, #1
+		addeq	\irqnr, \irqnr, #1
+		moveq	\stat, \stat, lsr #1
+		tst	\stat, #1			@ bit 0 should be set
+		.endm
+
+
diff -Nru a/include/asm-arm/arch-ebsa110/entry-macro.S b/include/asm-arm/arch-ebsa110/entry-macro.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-arm/arch-ebsa110/entry-macro.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,33 @@
+/*
+ * include/asm-arm/arch-ebsa110/entry-macro.S
+ *
+ * Low-level IRQ helper macros for ebsa110 platform.
+ *
+ * This file is licensed under  the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+
+
+#define IRQ_STAT		0xff000000	/* read */
+
+	.macro	disable_fiq
+	.endm
+
+	.macro	get_irqnr_and_base, irqnr, stat, base, tmp
+	mov	\base, #IRQ_STAT
+	ldrb	\stat, [\base]			@ get interrupts
+	mov	\irqnr, #0
+	tst	\stat, #15
+	addeq	\irqnr, \irqnr, #4
+	moveq	\stat, \stat, lsr #4
+	tst	\stat, #3
+	addeq	\irqnr, \irqnr, #2
+	moveq	\stat, \stat, lsr #2
+	tst	\stat, #1
+	addeq	\irqnr, \irqnr, #1
+	moveq	\stat, \stat, lsr #1
+	tst	\stat, #1			@ bit 0 should be set
+	.endm
+
diff -Nru a/include/asm-arm/arch-ebsa285/entry-macro.S b/include/asm-arm/arch-ebsa285/entry-macro.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-arm/arch-ebsa285/entry-macro.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,105 @@
+/*
+ * include/asm-arm/arch-footbridge/entry-macro.S
+ *
+ * Low-level IRQ helper macros for footbridge-based platforms
+ *
+ * This file is licensed under  the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+#include <asm/hardware/dec21285.h>
+
+		.macro	disable_fiq
+		.endm
+
+		.equ	dc21285_high, ARMCSR_BASE & 0xff000000
+		.equ	dc21285_low, ARMCSR_BASE & 0x00ffffff
+
+		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
+		mov	r4, #dc21285_high
+		.if	dc21285_low
+		orr	r4, r4, #dc21285_low
+		.endif
+		ldr	\irqstat, [r4, #0x180]		@ get interrupts
+
+		mov	\irqnr, #IRQ_SDRAMPARITY
+		tst	\irqstat, #IRQ_MASK_SDRAMPARITY
+		bne	1001f
+
+		tst	\irqstat, #IRQ_MASK_UART_RX
+		movne	\irqnr, #IRQ_CONRX
+		bne	1001f
+
+		tst	\irqstat, #IRQ_MASK_DMA1
+		movne	\irqnr, #IRQ_DMA1
+		bne	1001f
+
+		tst	\irqstat, #IRQ_MASK_DMA2
+		movne	\irqnr, #IRQ_DMA2
+		bne	1001f
+
+		tst	\irqstat, #IRQ_MASK_IN0
+		movne	\irqnr, #IRQ_IN0
+		bne	1001f
+
+		tst	\irqstat, #IRQ_MASK_IN1
+		movne	\irqnr, #IRQ_IN1
+		bne	1001f
+
+		tst	\irqstat, #IRQ_MASK_IN2
+		movne	\irqnr, #IRQ_IN2
+		bne	1001f
+
+		tst	\irqstat, #IRQ_MASK_IN3
+		movne	\irqnr, #IRQ_IN3
+		bne	1001f
+
+		tst	\irqstat, #IRQ_MASK_PCI
+		movne	\irqnr, #IRQ_PCI
+		bne	1001f
+
+		tst	\irqstat, #IRQ_MASK_DOORBELLHOST
+		movne	\irqnr, #IRQ_DOORBELLHOST
+		bne     1001f
+
+		tst	\irqstat, #IRQ_MASK_I2OINPOST
+		movne	\irqnr, #IRQ_I2OINPOST
+		bne	1001f
+
+		tst	\irqstat, #IRQ_MASK_TIMER1
+		movne	\irqnr, #IRQ_TIMER1
+		bne	1001f
+
+		tst	\irqstat, #IRQ_MASK_TIMER2
+		movne	\irqnr, #IRQ_TIMER2
+		bne	1001f
+
+		tst	\irqstat, #IRQ_MASK_TIMER3
+		movne	\irqnr, #IRQ_TIMER3
+		bne	1001f
+
+		tst	\irqstat, #IRQ_MASK_UART_TX
+		movne	\irqnr, #IRQ_CONTX
+		bne	1001f
+
+		tst	\irqstat, #IRQ_MASK_PCI_ABORT
+		movne	\irqnr, #IRQ_PCI_ABORT
+		bne	1001f
+
+		tst	\irqstat, #IRQ_MASK_PCI_SERR
+		movne	\irqnr, #IRQ_PCI_SERR
+		bne	1001f
+
+		tst	\irqstat, #IRQ_MASK_DISCARD_TIMER
+		movne	\irqnr, #IRQ_DISCARD_TIMER
+		bne	1001f
+
+		tst	\irqstat, #IRQ_MASK_PCI_DPERR
+		movne	\irqnr, #IRQ_PCI_DPERR
+		bne	1001f
+
+		tst	\irqstat, #IRQ_MASK_PCI_PERR
+		movne	\irqnr, #IRQ_PCI_PERR
+1001:
+		.endm
+
diff -Nru a/include/asm-arm/arch-epxa10db/entry-macro.S b/include/asm-arm/arch-epxa10db/entry-macro.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-arm/arch-epxa10db/entry-macro.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,25 @@
+/*
+ * include/asm-arm/arch-epxa10db/entry-macro.S
+ *
+ * Low-level IRQ helper macros for epxa10db platform
+ *
+ * This file is licensed under  the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+#include <asm/arch/platform.h>
+#undef IRQ_MODE /* same name defined in asm/proc/ptrace.h */
+#include <asm/arch/int_ctrl00.h>
+
+		.macro	disable_fiq
+		.endm
+
+		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
+
+		ldr	\irqstat, =INT_ID(IO_ADDRESS(EXC_INT_CTRL00_BASE))
+		ldr	\irqnr,[\irqstat]
+		cmp	\irqnr,#0
+		subne	\irqnr,\irqnr,#1
+
+		.endm
+
diff -Nru a/include/asm-arm/arch-h720x/entry-macro.S b/include/asm-arm/arch-h720x/entry-macro.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-arm/arch-h720x/entry-macro.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,60 @@
+/*
+ * include/asm-arm/arch-h720x/entry-macro.S
+ *
+ * Low-level IRQ helper macros for Hynix HMS720x based platforms
+ *
+ * This file is licensed under  the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+		.macro  disable_fiq
+		.endm
+
+		.macro  get_irqnr_and_base, irqnr, irqstat, base, tmp
+#if defined (CONFIG_CPU_H7201) || defined (CONFIG_CPU_H7202)
+		@ we could use the id register on H7202, but this is not
+		@ properly updated when we come back from asm_do_irq
+		@ without a previous return from interrupt
+		@ (see loops below in irq_svc, irq_usr)
+		@ We see unmasked pending ints only, as the masked pending ints
+		@ are not visible here
+
+		mov     \base, #0xf0000000	       @ base register
+		orr     \base, \base, #0x24000	       @ irqbase
+		ldr     \irqstat, [\base, #0x04]        @ get interrupt status
+#if defined (CONFIG_CPU_H7201)
+		ldr	\tmp, =0x001fffff
+#else
+		mvn     \tmp, #0xc0000000
+#endif
+		and     \irqstat, \irqstat, \tmp        @ mask out unused ints
+		mov     \irqnr, #0
+
+		mov     \tmp, #0xff00
+		orr     \tmp, \tmp, #0xff
+		tst     \irqstat, \tmp
+		addeq   \irqnr, \irqnr, #16
+		moveq   \irqstat, \irqstat, lsr #16
+		tst     \irqstat, #255
+		addeq   \irqnr, \irqnr, #8
+		moveq   \irqstat, \irqstat, lsr #8
+		tst     \irqstat, #15
+		addeq   \irqnr, \irqnr, #4
+		moveq   \irqstat, \irqstat, lsr #4
+		tst     \irqstat, #3
+		addeq   \irqnr, \irqnr, #2
+		moveq   \irqstat, \irqstat, lsr #2
+		tst     \irqstat, #1
+		addeq   \irqnr, \irqnr, #1
+		moveq   \irqstat, \irqstat, lsr #1
+		tst     \irqstat, #1		       @ bit 0 should be set
+		.endm
+
+		.macro  irq_prio_table
+		.endm
+
+#else
+#error hynix processor selection missmatch
+#endif
+
diff -Nru a/include/asm-arm/arch-imx/entry-macro.S b/include/asm-arm/arch-imx/entry-macro.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-arm/arch-imx/entry-macro.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,29 @@
+/*
+ * include/asm-arm/arch-imx/entry-macro.S
+ *
+ * Low-level IRQ helper macros for iMX-based platforms
+ *
+ * This file is licensed under  the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+		.macro	disable_fiq
+		.endm
+#define AITC_NIVECSR   0x40
+		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
+		ldr	\irqstat, =IO_ADDRESS(IMX_AITC_BASE)
+		@ Load offset & priority of the highest priority
+		@ interrupt pending.
+		ldr	\irqnr, [\irqstat, #AITC_NIVECSR]
+		@ Shift off the priority leaving the offset or
+		@ "interrupt number"
+		mov	\irqnr, \irqnr, lsr #16
+ 		ldr	\irqstat, =1	@ dummy compare
+		ldr	\base, =0xFFFF		// invalid interrupt
+		cmp	\irqnr, \base
+		bne	1001f
+		ldr	\irqstat, =0
+1001:
+		tst	\irqstat, #1	@ to make the condition code = TRUE
+		.endm
+
diff -Nru a/include/asm-arm/arch-integrator/entry-macro.S b/include/asm-arm/arch-integrator/entry-macro.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-arm/arch-integrator/entry-macro.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,36 @@
+/*
+ * include/asm-arm/arch-integrator/entry-macro.S
+ *
+ * Low-level IRQ helper macros for Integrator platforms
+ *
+ * This file is licensed under  the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+ 		.macro	disable_fiq
+		.endm
+
+		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
+/* FIXME: should not be using soo many LDRs here */
+		ldr	\base, =IO_ADDRESS(INTEGRATOR_IC_BASE)
+		mov	\irqnr, #IRQ_PIC_START
+		ldr	\irqstat, [\base, #IRQ_STATUS]		@ get masked status
+		ldr	\base, =IO_ADDRESS(INTEGRATOR_HDR_BASE)
+		teq	\irqstat, #0
+		ldreq	\irqstat, [\base, #(INTEGRATOR_HDR_IC_OFFSET+IRQ_STATUS)]
+		moveq	\irqnr, #IRQ_CIC_START
+
+1001:		tst	\irqstat, #15
+		bne	1002f
+		add	\irqnr, \irqnr, #4
+		movs	\irqstat, \irqstat, lsr #4
+		bne	1001b
+1002:		tst	\irqstat, #1
+		bne	1003f
+		add	\irqnr, \irqnr, #1
+		movs	\irqstat, \irqstat, lsr #1
+		bne	1002b
+1003:		/* EQ will be set if no irqs pending */
+		.endm
+
diff -Nru a/include/asm-arm/arch-iop3xx/entry-macro.S b/include/asm-arm/arch-iop3xx/entry-macro.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-arm/arch-iop3xx/entry-macro.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,56 @@
+/*
+ * include/asm-arm/arch-iop3xx/entry-macro.S
+ *
+ * Low-level IRQ helper macros for IOP3xx-based platforms
+ *
+ * This file is licensed under  the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+#if defined(CONFIG_ARCH_IOP321)
+		.macro  disable_fiq
+		.endm
+
+		/*
+		 * Note: only deal with normal interrupts, not FIQ
+		 */
+		.macro  get_irqnr_and_base, irqnr, irqstat, base, tmp
+		mov     \irqnr, #0
+		mrc     p6, 0, \irqstat, c8, c0, 0      @ Read IINTSRC
+		cmp     \irqstat, #0
+		beq     1001f
+		clz     \irqnr, \irqstat
+		mov     \base, #31
+		subs    \irqnr,\base,\irqnr
+		add     \irqnr,\irqnr,#IRQ_IOP321_DMA0_EOT
+1001:
+		.endm
+
+#elif defined(CONFIG_ARCH_IOP331)
+		.macro  disable_fiq
+		.endm
+
+		/*
+		 * Note: only deal with normal interrupts, not FIQ
+		 */
+		.macro  get_irqnr_and_base, irqnr, irqstat, base, tmp
+		mov     \irqnr, #0
+		mrc     p6, 0, \irqstat, c4, c0, 0      @ Read IINTSRC0
+		cmp     \irqstat, #0
+		bne     1002f
+		mrc     p6, 0, \irqstat, c5, c0, 0      @ Read IINTSRC1
+		cmp	\irqstat, #0
+		beq	1001f
+		clz	\irqnr, \irqstat
+		rsbs    \irqnr,\irqnr,#31   @ recommend by RMK
+		add	\irqnr,\irqnr,#IRQ_IOP331_XINT8
+		b	1001f
+1002:	clz     \irqnr, \irqstat
+		rsbs    \irqnr,\irqnr,#31   @ recommend by RMK
+		add     \irqnr,\irqnr,#IRQ_IOP331_DMA0_EOT
+1001:
+		.endm
+
+#endif
+
diff -Nru a/include/asm-arm/arch-iop3xx/hardware.h b/include/asm-arm/arch-iop3xx/hardware.h
--- a/include/asm-arm/arch-iop3xx/hardware.h	2005-01-10 20:11:16 -08:00
+++ b/include/asm-arm/arch-iop3xx/hardware.h	2005-01-10 20:11:16 -08:00
@@ -52,5 +52,6 @@
 #include "iq80321.h"
 #include "iq31244.h"
 #include "iq80331.h"
+#include "iq80332.h"
 
 #endif  /* _ASM_ARCH_HARDWARE_H */
diff -Nru a/include/asm-arm/arch-iop3xx/iop321.h b/include/asm-arm/arch-iop3xx/iop321.h
--- a/include/asm-arm/arch-iop3xx/iop321.h	2005-01-10 20:11:23 -08:00
+++ b/include/asm-arm/arch-iop3xx/iop321.h	2005-01-10 20:11:23 -08:00
@@ -5,6 +5,7 @@
  *
  * Author: Rory Bolt <rorybolt@pacbell.net>
  * Copyright (C) 2002 Rory Bolt
+ * Copyright (C) 2004 Intel Corp.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -30,21 +31,30 @@
 /*
  * IOP321 I/O and Mem space regions for PCI autoconfiguration
  */
-#define IOP321_PCI_LOWER_IO             0x90000000
-#define IOP321_PCI_UPPER_IO             0x9000ffff
-#define IOP321_PCI_LOWER_MEM            0x80000000
-#define IOP321_PCI_UPPER_MEM            0x83ffffff
-
-#define IOP321_PCI_WINDOW_SIZE          64 * 0x100000
+#define IOP321_PCI_IO_WINDOW_SIZE   0x10000
+#define IOP321_PCI_LOWER_IO_PA      0x90000000
+#define IOP321_PCI_LOWER_IO_VA      0xfe000000
+#define IOP321_PCI_LOWER_IO_BA      (*IOP321_OIOWTVR)
+#define IOP321_PCI_UPPER_IO_PA      (IOP321_PCI_LOWER_IO_PA + IOP321_PCI_IO_WINDOW_SIZE - 1)
+#define IOP321_PCI_UPPER_IO_VA      (IOP321_PCI_LOWER_IO_VA + IOP321_PCI_IO_WINDOW_SIZE - 1)
+#define IOP321_PCI_UPPER_IO_BA      (IOP321_PCI_LOWER_IO_BA + IOP321_PCI_IO_WINDOW_SIZE - 1)
+#define IOP321_PCI_IO_OFFSET        (IOP321_PCI_LOWER_IO_VA - IOP321_PCI_LOWER_IO_BA)
+
+#define IOP321_PCI_MEM_WINDOW_SIZE  (~*IOP321_IALR1 + 1)
+#define IOP321_PCI_LOWER_MEM_PA     0x80000000
+#define IOP321_PCI_LOWER_MEM_VA     0x80000000
+#define IOP321_PCI_LOWER_MEM_BA     (*IOP321_OMWTVR0)
+#define IOP321_PCI_UPPER_MEM_PA     (IOP321_PCI_LOWER_MEM_PA + IOP321_PCI_MEM_WINDOW_SIZE - 1)
+#define IOP321_PCI_UPPER_MEM_VA     (IOP321_PCI_LOWER_MEM_VA + IOP321_PCI_MEM_WINDOW_SIZE - 1)
+#define IOP321_PCI_UPPER_MEM_BA     (IOP321_PCI_LOWER_MEM_BA + IOP321_PCI_MEM_WINDOW_SIZE - 1)
+#define IOP321_PCI_MEM_OFFSET       (IOP321_PCI_LOWER_MEM_VA - IOP321_PCI_LOWER_MEM_BA)
 
 
 /*
  * IOP321 chipset registers
  */
 #define IOP321_VIRT_MEM_BASE 0xfeffe000  /* chip virtual mem address*/
-//#define IOP321_VIRT_MEM_BASE 0xfff00000  /* chip virtual mem address*/
-
-#define IOP321_PHY_MEM_BASE  0xffffe000  /* chip physical memory address */
+#define IOP321_PHYS_MEM_BASE 0xffffe000  /* chip physical memory address */
 #define IOP321_REG_ADDR(reg) (IOP321_VIRT_MEM_BASE | (reg))
 
 /* Reserved 0x00000000 through 0x000000FF */
diff -Nru a/include/asm-arm/arch-iop3xx/iop331-irqs.h b/include/asm-arm/arch-iop3xx/iop331-irqs.h
--- a/include/asm-arm/arch-iop3xx/iop331-irqs.h	2005-01-10 20:11:17 -08:00
+++ b/include/asm-arm/arch-iop3xx/iop331-irqs.h	2005-01-10 20:11:17 -08:00
@@ -91,6 +91,7 @@
 #define NR_IRQS			NR_IOP331_IRQS
 
 
+#if defined(CONFIG_ARCH_IQ80331)
 /*
  * Interrupts available on the IQ80331 board
  */
@@ -109,5 +110,27 @@
 #define	IRQ_IQ80331_INTB	IRQ_IOP331_XINT1
 #define	IRQ_IQ80331_INTC	IRQ_IOP331_XINT2
 #define	IRQ_IQ80331_INTD	IRQ_IOP331_XINT3
+
+#elif defined(CONFIG_MACH_IQ80332)
+/*
+ * Interrupts available on the IQ80332 board
+ */
+
+/*
+ * On board devices
+ */
+#define	IRQ_IQ80332_I82544	IRQ_IOP331_XINT0
+#define IRQ_IQ80332_UART0	IRQ_IOP331_UART0
+#define IRQ_IQ80332_UART1	IRQ_IOP331_UART1
+
+/*
+ * PCI interrupts
+ */
+#define	IRQ_IQ80332_INTA	IRQ_IOP331_XINT0
+#define	IRQ_IQ80332_INTB	IRQ_IOP331_XINT1
+#define	IRQ_IQ80332_INTC	IRQ_IOP331_XINT2
+#define	IRQ_IQ80332_INTD	IRQ_IOP331_XINT3
+
+#endif
 
 #endif // _IOP331_IRQ_H_
diff -Nru a/include/asm-arm/arch-iop3xx/iop331.h b/include/asm-arm/arch-iop3xx/iop331.h
--- a/include/asm-arm/arch-iop3xx/iop331.h	2005-01-10 20:11:17 -08:00
+++ b/include/asm-arm/arch-iop3xx/iop331.h	2005-01-10 20:11:17 -08:00
@@ -4,7 +4,7 @@
  * Intel IOP331 Chip definitions
  *
  * Author: Dave Jiang (dave.jiang@intel.com)
- * Copyright (C) 2003 Intel Corp.
+ * Copyright (C) 2003, 2004 Intel Corp.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -21,7 +21,8 @@
  */
 #ifndef __ASSEMBLY__
 #ifdef	CONFIG_ARCH_IOP331
-#define	iop_is_331()	((processor_id & 0xffffffb0) == 0x69054090)
+/*#define	iop_is_331()	((processor_id & 0xffffffb0) == 0x69054090) */
+#define	iop_is_331()	((processor_id & 0xffffff30) == 0x69054010)
 #else
 #define	iop_is_331()	0
 #endif
@@ -30,20 +31,28 @@
 /*
  * IOP331 I/O and Mem space regions for PCI autoconfiguration
  */
-#define IOP331_PCI_LOWER_IO             0x90000000
-#define IOP331_PCI_UPPER_IO             0x900fffff
-#define IOP331_PCI_LOWER_MEM            0x80000000
-#define IOP331_PCI_UPPER_MEM            0x87ffffff
-
-#define IOP331_PCI_WINDOW_SIZE          128 * 0x100000
-
+#define IOP331_PCI_IO_WINDOW_SIZE   0x10000
+#define IOP331_PCI_LOWER_IO_PA      0x90000000
+#define IOP331_PCI_LOWER_IO_VA      0xfe000000
+#define IOP331_PCI_LOWER_IO_BA      (*IOP331_OIOWTVR)
+#define IOP331_PCI_UPPER_IO_PA      (IOP331_PCI_LOWER_IO_PA + IOP331_PCI_IO_WINDOW_SIZE - 1)
+#define IOP331_PCI_UPPER_IO_VA      (IOP331_PCI_LOWER_IO_VA + IOP331_PCI_IO_WINDOW_SIZE - 1)
+#define IOP331_PCI_UPPER_IO_BA      (IOP331_PCI_LOWER_IO_BA + IOP331_PCI_IO_WINDOW_SIZE - 1)
+#define IOP331_PCI_IO_OFFSET        (IOP331_PCI_LOWER_IO_VA - IOP331_PCI_LOWER_IO_BA)
+
+#define IOP331_PCI_MEM_WINDOW_SIZE  (~*IOP331_IALR1 + 1)
+#define IOP331_PCI_LOWER_MEM_PA     0x80000000
+#define IOP331_PCI_LOWER_MEM_VA     0x80000000
+#define IOP331_PCI_LOWER_MEM_BA     (*IOP331_OMWTVR0)
+#define IOP331_PCI_UPPER_MEM_PA     (IOP331_PCI_LOWER_MEM_PA + IOP331_PCI_MEM_WINDOW_SIZE - 1)
+#define IOP331_PCI_UPPER_MEM_VA     (IOP331_PCI_LOWER_MEM_VA + IOP331_PCI_MEM_WINDOW_SIZE - 1)
+#define IOP331_PCI_UPPER_MEM_BA     (IOP331_PCI_LOWER_MEM_BA + IOP331_PCI_MEM_WINDOW_SIZE - 1)
+#define IOP331_PCI_MEM_OFFSET       (IOP331_PCI_LOWER_MEM_VA - IOP331_PCI_LOWER_MEM_BA)
 
 /*
  * IOP331 chipset registers
  */
-#define IOP331_VIRT_MEM_BASE 0xfeffe000  /* chip virtual mem address*/
-// #define IOP331_VIRT_MEM_BASE 0xfff00000  /* chip virtual mem address*/
-
+#define IOP331_VIRT_MEM_BASE  0xfeffe000  /* chip virtual mem address*/
 #define IOP331_PHYS_MEM_BASE  0xffffe000  /* chip physical memory address */
 #define IOP331_REG_ADDR(reg) (IOP331_VIRT_MEM_BASE | (reg))
 
@@ -248,8 +257,14 @@
 #define IOP331_TU_TISR    (volatile u32 *)IOP331_REG_ADDR(0x000007E8)
 #define IOP331_TU_WDTCR   (volatile u32 *)IOP331_REG_ADDR(0x000007EC)
 
-#define	IOP331_TICK_RATE	266000000	/* 266 MHz clock */
+#if defined(CONFIG_ARCH_IOP331)
+#define	IOP331_TICK_RATE	266000000	/* 266 MHz IB clock */
+#endif
 
+#if defined(CONFIG_IOP331_STEPD) || defined(CONFIG_ARCH_IQ80333)
+#undef IOP331_TICK_RATE
+#define IOP331_TICK_RATE	333000000	/* 333 Mhz IB clock */
+#endif
 
 /* Application accelerator unit 0x00000800 - 0x000008FF */
 #define IOP331_AAU_ACR     (volatile u32 *)IOP331_REG_ADDR(0x00000800)
@@ -324,6 +339,11 @@
 
 /* 0x00001740 through 0x0000176C UART 1 */
 
+#define IOP331_UART0_PHYS  (IOP331_PHYS_MEM_BASE | 0x00001700)	/* UART #1 physical */
+#define IOP331_UART1_PHYS  (IOP331_PHYS_MEM_BASE | 0x00001740)	/* UART #2 physical */
+#define IOP331_UART0_VIRT  (IOP331_VIRT_MEM_BASE | 0x00001700) /* UART #1 virtual addr */
+#define IOP331_UART1_VIRT  (IOP331_VIRT_MEM_BASE | 0x00001740) /* UART #2 virtual addr */
+
 /* Reserved 0x00001770 through 0x0000177F */
 
 /* General Purpose I/O Registers */
@@ -332,6 +352,7 @@
 #define IOP331_GPOD       (volatile u32 *)IOP331_REG_ADDR(0x00001788)
 
 /* Reserved 0x0000178c through 0x000019ff */
+
 
 #ifndef __ASSEMBLY__
 extern void iop331_map_io(void);
diff -Nru a/include/asm-arm/arch-iop3xx/iq31244.h b/include/asm-arm/arch-iop3xx/iq31244.h
--- a/include/asm-arm/arch-iop3xx/iq31244.h	2005-01-10 20:11:21 -08:00
+++ b/include/asm-arm/arch-iop3xx/iq31244.h	2005-01-10 20:11:21 -08:00
@@ -7,8 +7,6 @@
 #ifndef _IQ31244_H_
 #define _IQ31244_H_
 
-#define IQ31244_RAMBASE		0xa0000000
-
 #define	IQ31244_FLASHBASE	0xf0000000	/* Flash */
 #define	IQ31244_FLASHSIZE	0x00800000
 #define	IQ31244_FLASHWIDTH	2
@@ -18,16 +16,6 @@
 #define IQ31244_7SEG_0		0xfe850000	/* 7-Segment LSB (WO) */
 #define IQ31244_ROTARY_SW	0xfe8d0000	/* Rotary Switch */
 #define IQ31244_BATT_STAT	0xfe8f0000	/* Battery Status */
-
-/*
- * IQ31244 PCI I/O and Mem space regions
- */
-#define IQ31244_PCI_IO_BASE	0x90000000
-#define IQ31244_PCI_IO_SIZE	0x00010000
-#define IQ31244_PCI_MEM_BASE	0x80000000
-//#define IQ31244_PCI_MEM_SIZE	0x04000000
-#define IQ31244_PCI_MEM_SIZE	0x08000000
-#define	IQ31244_PCI_IO_OFFSET	0x6e000000
 
 #ifndef __ASSEMBLY__
 extern void iq31244_map_io(void);
diff -Nru a/include/asm-arm/arch-iop3xx/iq80321.h b/include/asm-arm/arch-iop3xx/iq80321.h
--- a/include/asm-arm/arch-iop3xx/iq80321.h	2005-01-10 20:11:18 -08:00
+++ b/include/asm-arm/arch-iop3xx/iq80321.h	2005-01-10 20:11:18 -08:00
@@ -7,8 +7,6 @@
 #ifndef _IQ80321_H_
 #define _IQ80321_H_
 
-#define IQ80321_RAMBASE		0xa0000000
-
 #define	IQ80321_FLASHBASE	0xf0000000	/* Flash */
 #define	IQ80321_FLASHSIZE	0x00800000
 #define	IQ80321_FLASHWIDTH	1
@@ -18,15 +16,6 @@
 #define IQ80321_7SEG_0		0xfe850000	/* 7-Segment LSB (WO) */
 #define IQ80321_ROTARY_SW	0xfe8d0000	/* Rotary Switch */
 #define IQ80321_BATT_STAT	0xfe8f0000	/* Battery Status */
-
-/*
- * IQ80321 PCI I/O and Mem space regions
- */
-#define IQ80321_PCI_IO_BASE	0x90000000
-#define IQ80321_PCI_IO_SIZE	0x00010000
-#define IQ80321_PCI_MEM_BASE	0x80000000
-#define IQ80321_PCI_MEM_SIZE	0x04000000
-#define	IQ80321_PCI_IO_OFFSET	0x6e000000
 
 #ifndef __ASSEMBLY__
 extern void iq80321_map_io(void);
diff -Nru a/include/asm-arm/arch-iop3xx/iq80331.h b/include/asm-arm/arch-iop3xx/iq80331.h
--- a/include/asm-arm/arch-iop3xx/iq80331.h	2005-01-10 20:11:19 -08:00
+++ b/include/asm-arm/arch-iop3xx/iq80331.h	2005-01-10 20:11:19 -08:00
@@ -7,29 +7,14 @@
 #ifndef _IQ80331_H_
 #define _IQ80331_H_
 
-#define IQ80331_RAMBASE		0x00000000
-
 #define	IQ80331_FLASHBASE	0xc0000000	/* Flash */
 #define	IQ80331_FLASHSIZE	0x00800000
 #define	IQ80331_FLASHWIDTH	1
 
-#define IQ80331_UART0_PHYS  (IOP331_PHYS_MEM_BASE | 0x00001700)	/* UART #1 physical */
-#define IQ80331_UART1_PHYS  (IOP331_PHYS_MEM_BASE | 0x00001740)	/* UART #2 physical */
-#define IQ80331_UART0_VIRT  (IOP331_VIRT_MEM_BASE | 0x00001700) /* UART #1 virtual addr */
-#define IQ80331_UART1_VIRT  (IOP331_VIRT_MEM_BASE | 0x00001740) /* UART #2 virtual addr */
 #define IQ80331_7SEG_1		0xce840000	/* 7-Segment MSB */
 #define IQ80331_7SEG_0		0xce850000	/* 7-Segment LSB (WO) */
 #define IQ80331_ROTARY_SW	0xce8d0000	/* Rotary Switch */
 #define IQ80331_BATT_STAT	0xce8f0000	/* Battery Status */
-
-/*
- * IQ80331 PCI I/O and Mem space regions
- */
-#define IQ80331_PCI_IO_BASE	0x90000000
-#define IQ80331_PCI_IO_SIZE	0x00010000
-#define IQ80331_PCI_MEM_BASE	0x80000000
-#define IQ80331_PCI_MEM_SIZE	0x08000000
-#define	IQ80331_PCI_IO_OFFSET	0x6e000000
 
 #ifndef __ASSEMBLY__
 extern void iq80331_map_io(void);
diff -Nru a/include/asm-arm/arch-iop3xx/iq80332.h b/include/asm-arm/arch-iop3xx/iq80332.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-arm/arch-iop3xx/iq80332.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,23 @@
+/*
+ * linux/include/asm/arch-iop3xx/iq80332.h
+ *
+ * Intel IQ80332 evaluation board registers
+ */
+
+#ifndef _IQ80332_H_
+#define _IQ80332_H_
+
+#define	IQ80332_FLASHBASE	0xc0000000	/* Flash */
+#define	IQ80332_FLASHSIZE	0x00800000
+#define	IQ80332_FLASHWIDTH	1
+
+#define IQ80332_7SEG_1		0xce840000	/* 7-Segment MSB */
+#define IQ80332_7SEG_0		0xce850000	/* 7-Segment LSB (WO) */
+#define IQ80332_ROTARY_SW	0xce8d0000	/* Rotary Switch */
+#define IQ80332_BATT_STAT	0xce8f0000	/* Battery Status */
+
+#ifndef __ASSEMBLY__
+extern void iq80332_map_io(void);
+#endif
+
+#endif	// _IQ80332_H_
diff -Nru a/include/asm-arm/arch-iop3xx/timex.h b/include/asm-arm/arch-iop3xx/timex.h
--- a/include/asm-arm/arch-iop3xx/timex.h	2005-01-10 20:11:19 -08:00
+++ b/include/asm-arm/arch-iop3xx/timex.h	2005-01-10 20:11:19 -08:00
@@ -10,7 +10,7 @@
 
 #define CLOCK_TICK_RATE IOP321_TICK_RATE
 
-#elif defined(CONFIG_ARCH_IQ80331)
+#elif defined(CONFIG_ARCH_IQ80331) || defined(CONFIG_MACH_IQ80332)
 
 #define CLOCK_TICK_RATE IOP331_TICK_RATE
 
diff -Nru a/include/asm-arm/arch-iop3xx/uncompress.h b/include/asm-arm/arch-iop3xx/uncompress.h
--- a/include/asm-arm/arch-iop3xx/uncompress.h	2005-01-10 20:11:19 -08:00
+++ b/include/asm-arm/arch-iop3xx/uncompress.h	2005-01-10 20:11:19 -08:00
@@ -9,8 +9,10 @@
 
 #ifdef CONFIG_ARCH_IOP321
 #define UTYPE unsigned char *
-#else
+#elif defined(CONFIG_ARCH_IOP331)
 #define UTYPE u32 *
+#else
+#error "Missing IOP3xx arch type def"
 #endif
 
 static volatile UTYPE uart_base;
@@ -42,8 +44,8 @@
 			uart_base = (volatile UTYPE)IQ80321_UART;
 		else if(machine_is_iq31244())
 			uart_base = (volatile UTYPE)IQ31244_UART;
-		else if(machine_is_iq80331())
-			uart_base = (volatile UTYPE)IQ80331_UART0_PHYS;
+		else if(machine_is_iq80331() || machine_is_iq80332())
+			uart_base = (volatile UTYPE)IOP331_UART0_PHYS;
 		else
 			uart_base = (volatile UTYPE)0xfe800000;
 }
diff -Nru a/include/asm-arm/arch-iop3xx/vmalloc.h b/include/asm-arm/arch-iop3xx/vmalloc.h
--- a/include/asm-arm/arch-iop3xx/vmalloc.h	2005-01-10 20:11:20 -08:00
+++ b/include/asm-arm/arch-iop3xx/vmalloc.h	2005-01-10 20:11:20 -08:00
@@ -13,4 +13,7 @@
 #define VMALLOC_OFFSET	  (8*1024*1024)
 #define VMALLOC_START	  (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))
 #define VMALLOC_VMADDR(x) ((unsigned long)(x))
-#define VMALLOC_END       (0xe8000000)
+//#define VMALLOC_END       (0xe8000000)
+/* increase usable physical RAM to ~992M per RMK */
+#define VMALLOC_END       (0xfe000000)
+
diff -Nru a/include/asm-arm/arch-ixp2000/entry-macro.S b/include/asm-arm/arch-ixp2000/entry-macro.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-arm/arch-ixp2000/entry-macro.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,54 @@
+/*
+ * include/asm-arm/arch-ixp2000/entry-macro.S
+ *
+ * Low-level IRQ helper macros for IXP2000-based platforms
+ *
+ * This file is licensed under  the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+		.macro  disable_fiq
+		.endm
+
+		.macro  get_irqnr_and_base, irqnr, irqstat, base, tmp
+
+		mov	\irqnr, #0x0              @clear out irqnr as default
+                mov	\base, #0xfe000000
+		orr	\base, \base, #0x00ff0000
+		orr	\base, \base, #0x0000a000
+		orr	\base, \base, #0x08
+		ldr	\irqstat, [\base]         @ get interrupts
+
+		cmp	\irqstat, #0
+		beq	1001f
+
+		clz     \irqnr, \irqstat
+		mov     \base, #31
+		subs    \irqnr, \base, \irqnr
+
+		/*
+		 * We handle PCIA and PCIB here so we don't have an
+		 * extra layer of code just to check these two bits.
+		 */
+		cmp	\irqnr, #IRQ_IXP2000_PCI
+		bne	1001f
+
+		mov	\base, #0xfe000000
+		orr	\base, \base, #0x00fd0000
+		orr	\base, \base, #0x0000e100
+		orr	\base, \base, #0x00000058
+		ldr	\irqstat, [\base]
+
+		mov	\tmp, #(1<<26)
+		tst	\irqstat, \tmp
+		movne	\irqnr, #IRQ_IXP2000_PCIA
+		bne	1001f
+
+		mov	\tmp, #(1<<27)
+		tst	\irqstat, \tmp
+		movne	\irqnr, #IRQ_IXP2000_PCIB
+
+1001:
+		.endm
+
diff -Nru a/include/asm-arm/arch-ixp2000/ixp2000-regs.h b/include/asm-arm/arch-ixp2000/ixp2000-regs.h
--- a/include/asm-arm/arch-ixp2000/ixp2000-regs.h	2005-01-10 20:11:15 -08:00
+++ b/include/asm-arm/arch-ixp2000/ixp2000-regs.h	2005-01-10 20:11:15 -08:00
@@ -98,6 +98,7 @@
 #define	WDT_ENABLE			0x00000001
 #define	TIMER_DIVIDER_256		0x00000008
 #define	TIMER_ENABLE			0x00000080
+#define	IRQ_MASK_TIMER1         	(1 << 4)
 
 /*
  * Interrupt controller registers
diff -Nru a/include/asm-arm/arch-ixp2000/system.h b/include/asm-arm/arch-ixp2000/system.h
--- a/include/asm-arm/arch-ixp2000/system.h	2005-01-10 20:11:24 -08:00
+++ b/include/asm-arm/arch-ixp2000/system.h	2005-01-10 20:11:24 -08:00
@@ -2,6 +2,7 @@
  * linux/include/asm-arm/arch-ixp2000/system.h
  *
  * Copyright (C) 2002 Intel Corp.
+ * Copyricht (C) 2003-2005 MontaVista Software, Inc.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -20,9 +21,27 @@
 {
 	cli();
 
-	if (machine_is_ixdp2401() || machine_is_ixdp2801()) {
-		*IXDP2X01_CPLD_FLASH_REG = ((0 >> IXDP2X01_FLASH_WINDOW_BITS) | IXDP2X01_CPLD_FLASH_INTERN);
+	/*
+	 * Reset flash banking register so that we are pointing at
+	 * RedBoot bank.
+	 */
+	if (machine_is_ixdp2401()) {
+		*IXDP2X01_CPLD_FLASH_REG = ((0 >> IXDP2X01_FLASH_WINDOW_BITS)
+						| IXDP2X01_CPLD_FLASH_INTERN);
 		*IXDP2X01_CPLD_RESET_REG = 0xffffffff;
+	}
+
+	/*
+	 * On IXDP2801 we need to write this magic sequence to the CPLD
+	 * to cause a complete reset of the CPU and all external devices
+	 * and moves the flash bank register back to 0.
+	 */
+	if (machine_is_ixdp2801()) {
+		unsigned long reset_reg = *IXDP2X01_CPLD_RESET_REG;
+		reset_reg = 0x55AA0000 | (reset_reg & 0x0000FFFF);
+		*IXDP2X01_CPLD_RESET_REG = reset_reg;
+		mb();
+		*IXDP2X01_CPLD_RESET_REG = 0x80000000;
 	}
 
 	/*
diff -Nru a/include/asm-arm/arch-ixp4xx/entry-macro.S b/include/asm-arm/arch-ixp4xx/entry-macro.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-arm/arch-ixp4xx/entry-macro.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,39 @@
+/*
+ * include/asm-arm/arch-ixp4xx/entry-macro.S
+ *
+ * Low-level IRQ helper macros for IXP4xx-based platforms
+ *
+ * This file is licensed under  the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+		.macro	disable_fiq
+		.endm
+
+		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
+		ldr	\irqstat, =(IXP4XX_INTC_BASE_VIRT+IXP4XX_ICIP_OFFSET)
+		ldr	\irqstat, [\irqstat]		@ get interrupts
+		cmp	\irqstat, #0
+		beq	1001f
+		clz     \irqnr, \irqstat
+		mov     \base, #31
+		subs    \irqnr, \base, \irqnr
+
+1001:
+		/*
+		 * IXP465 has an upper IRQ status register
+		 */
+#if defined(CONFIG_CPU_IXP46X)
+		bne 	1002f
+		ldr	\irqstat, =(IXP4XX_INTC_BASE_VIRT+IXP4XX_ICIP2_OFFSET)
+		ldr	\irqstat, [\irqstat]		@ get upper interrupts
+		mov	\irqnr, #63
+		clz	\irqstat, \irqstat
+ 		cmp	\irqstat, #32
+		subne	\irqnr, \irqnr, \irqstat
+1002:
+#endif
+		.endm
+
+
diff -Nru a/include/asm-arm/arch-ixp4xx/hardware.h b/include/asm-arm/arch-ixp4xx/hardware.h
--- a/include/asm-arm/arch-ixp4xx/hardware.h	2005-01-10 20:11:17 -08:00
+++ b/include/asm-arm/arch-ixp4xx/hardware.h	2005-01-10 20:11:17 -08:00
@@ -27,6 +27,13 @@
 
 #define pcibios_assign_all_busses()	1
 
+#if defined(CONFIG_CPU_IXP465) && !defined(__ASSEMBLY__)
+extern unsigned int processor_id;
+#define cpu_is_ixp465() ((processor_id & 0xffffffc0) == 0x69054200)
+#else
+#define	cpu_is_ixp465()	(0)
+#endif
+
 /* Register locations and bits */
 #include "ixp4xx-regs.h"
 
diff -Nru a/include/asm-arm/arch-ixp4xx/irqs.h b/include/asm-arm/arch-ixp4xx/irqs.h
--- a/include/asm-arm/arch-ixp4xx/irqs.h	2005-01-10 20:11:20 -08:00
+++ b/include/asm-arm/arch-ixp4xx/irqs.h	2005-01-10 20:11:20 -08:00
@@ -15,7 +15,6 @@
 #ifndef _ARCH_IXP4XX_IRQS_H_
 #define _ARCH_IXP4XX_IRQS_H_
 
-#define NR_IRQS			32
 
 #define IRQ_IXP4XX_NPEA		0
 #define IRQ_IXP4XX_NPEB		1
@@ -49,6 +48,25 @@
 #define IRQ_IXP4XX_GPIO12	29
 #define IRQ_IXP4XX_SW_INT1	30
 #define IRQ_IXP4XX_SW_INT2	31
+#define IRQ_IXP4XX_USB_HOST	32
+#define IRQ_IXP4XX_I2C		33
+#define IRQ_IXP4XX_SSP		34
+#define IRQ_IXP4XX_TSYNC	35
+#define IRQ_IXP4XX_EAU_DONE	36
+#define IRQ_IXP4XX_SHA_DONE	37
+#define IRQ_IXP4XX_SWCP_PE	58
+#define IRQ_IXP4XX_QM_PE	60
+#define IRQ_IXP4XX_MCU_ECC	61
+#define IRQ_IXP4XX_EXP_PE	62
+
+/*
+ * Only first 32 sources are valid if running on IXP42x systems
+ */
+#ifndef	CONFIG_CPU_IXP46X
+#define NR_IRQS			32
+#else
+#define NR_IRQS			64
+#endif
 
 #define	XSCALE_PMU_IRQ		(IRQ_IXP4XX_XSCALE_PMU)
 
diff -Nru a/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h b/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h
--- a/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h	2005-01-10 20:11:17 -08:00
+++ b/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h	2005-01-10 20:11:17 -08:00
@@ -43,6 +43,10 @@
  * 0xC8000000	0x0000C000	0xffbf2000	On-Chip Peripherals
  */
 
+/*
+ * Queue Manager
+ */
+#define IXP4XX_QMGR_BASE_PHYS		(0x60000000)
 
 /*
  * Expansion BUS Configuration registers
@@ -107,7 +111,9 @@
 #define IXP4XX_INTC_BASE_PHYS	(IXP4XX_PERIPHERAL_BASE_PHYS + 0x3000)
 #define IXP4XX_GPIO_BASE_PHYS	(IXP4XX_PERIPHERAL_BASE_PHYS + 0x4000)
 #define IXP4XX_TIMER_BASE_PHYS	(IXP4XX_PERIPHERAL_BASE_PHYS + 0x5000)
-#define IXP4XX_USB_BASE_PHYS	(IXP4XX_PERIPHERAL_BASE_PHYS + 0x5000)
+#define IXP4XX_EthA_BASE_PHYS	(IXP4XX_PERIPHERAL_BASE_PHYS + 0x9000)
+#define IXP4XX_EthB_BASE_PHYS	(IXP4XX_PERIPHERAL_BASE_PHYS + 0xA000)
+#define IXP4XX_USB_BASE_PHYS	(IXP4XX_PERIPHERAL_BASE_PHYS + 0xB000)
 
 #define IXP4XX_UART1_BASE_VIRT	(IXP4XX_PERIPHERAL_BASE_VIRT + 0x0000)
 #define IXP4XX_UART2_BASE_VIRT	(IXP4XX_PERIPHERAL_BASE_VIRT + 0x1000)
@@ -115,7 +121,9 @@
 #define IXP4XX_INTC_BASE_VIRT	(IXP4XX_PERIPHERAL_BASE_VIRT + 0x3000)
 #define IXP4XX_GPIO_BASE_VIRT	(IXP4XX_PERIPHERAL_BASE_VIRT + 0x4000)
 #define IXP4XX_TIMER_BASE_VIRT	(IXP4XX_PERIPHERAL_BASE_VIRT + 0x5000)
-#define IXP4XX_USB_BASE_VIRT	(IXP4XX_PERIPHERAL_BASE_VIRT + 0x5000)
+#define IXP4XX_EthA_BASE_VIRT	(IXP4XX_PERIPHERAL_BASE_VIRT + 0x9000)
+#define IXP4XX_EthB_BASE_VIRT	(IXP4XX_PERIPHERAL_BASE_VIRT + 0xA000)
+#define IXP4XX_USB_BASE_VIRT	(IXP4XX_PERIPHERAL_BASE_VIRT + 0xB000)
 
 /*
  * Constants to make it easy to access  Interrupt Controller registers
@@ -130,6 +138,17 @@
 #define IXP4XX_ICFH_OFFSET	0x1C /* FIQ Highest Pri Int */
 
 /*
+ * IXP465-only
+ */
+#define	IXP4XX_ICPR2_OFFSET	0x20 /* Interrupt Status 2 */
+#define	IXP4XX_ICMR2_OFFSET	0x24 /* Interrupt Enable 2 */
+#define	IXP4XX_ICLR2_OFFSET	0x28 /* Interrupt IRQ/FIQ Select 2 */
+#define IXP4XX_ICIP2_OFFSET     0x2C /* IRQ Status */
+#define IXP4XX_ICFP2_OFFSET	0x30 /* FIQ Status */
+#define IXP4XX_ICEEN_OFFSET	0x34 /* Error High Pri Enable */
+
+
+/*
  * Interrupt Controller Register Definitions.
  */
 
@@ -143,6 +162,12 @@
 #define IXP4XX_ICHR     IXP4XX_INTC_REG(IXP4XX_ICHR_OFFSET)
 #define IXP4XX_ICIH     IXP4XX_INTC_REG(IXP4XX_ICIH_OFFSET) 
 #define IXP4XX_ICFH     IXP4XX_INTC_REG(IXP4XX_ICFH_OFFSET)
+#define IXP4XX_ICPR2	IXP4XX_INTC_REG(IXP4XX_ICPR2_OFFSET)
+#define IXP4XX_ICMR2    IXP4XX_INTC_REG(IXP4XX_ICMR2_OFFSET)
+#define IXP4XX_ICLR2    IXP4XX_INTC_REG(IXP4XX_ICLR2_OFFSET)
+#define IXP4XX_ICIP2    IXP4XX_INTC_REG(IXP4XX_ICIP2_OFFSET)
+#define IXP4XX_ICFP2    IXP4XX_INTC_REG(IXP4XX_ICFP2_OFFSET)
+#define IXP4XX_ICEEN    IXP4XX_INTC_REG(IXP4XX_ICEEN_OFFSET)
                                                                                 
 /*
  * Constants to make it easy to access GPIO registers
@@ -547,5 +572,20 @@
 #define USIR1_IR15	(1 << 7)	/* Interrup request ep 15 */
 
 #define DCMD_LENGTH	0x01fff		/* length mask (max = 8K - 1) */
+
+#ifndef __ASSEMBLY__
+static inline int cpu_is_ixp46x(void)
+{
+#ifdef CONFIG_CPU_IXP46X
+	unsigned int processor_id;
+
+	asm("mrc p15, 0, %0, cr0, cr0, 0;" : "=r"(processor_id) :);
+
+	if ((processor_id & 0xffffff00) == 0x69054200)
+		return 1;
+#endif
+	return 0;
+}
+#endif
 
 #endif
diff -Nru a/include/asm-arm/arch-ixp4xx/platform.h b/include/asm-arm/arch-ixp4xx/platform.h
--- a/include/asm-arm/arch-ixp4xx/platform.h	2005-01-10 20:11:16 -08:00
+++ b/include/asm-arm/arch-ixp4xx/platform.h	2005-01-10 20:11:16 -08:00
@@ -60,6 +60,7 @@
  */
 extern void ixp4xx_map_io(void);
 extern void ixp4xx_init_irq(void);
+extern void ixp4xx_sys_init(void);
 extern struct sys_timer ixp4xx_timer;
 extern void ixp4xx_pci_preinit(void);
 struct pci_sys_data;
diff -Nru a/include/asm-arm/arch-l7200/entry-macro.S b/include/asm-arm/arch-l7200/entry-macro.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-arm/arch-l7200/entry-macro.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,29 @@
+/*
+ * include/asm-arm/arch-l7200/entry-macro.S
+ *
+ * Low-level IRQ helper macros for L7200-based platforms
+ *
+ * This file is licensed under  the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+#include <asm/hardware.h>
+
+		.equ	irq_base_addr,	IO_BASE_2
+
+		.macro  disable_fiq
+		.endm
+
+		.macro  get_irqnr_and_base, irqnr, irqstat, base, tmp
+		mov     \irqstat, #irq_base_addr		@ Virt addr IRQ regs
+		add	\irqstat, \irqstat, #0x00001000		@ Status reg
+		ldr     \irqstat, [\irqstat, #0]		@ get interrupts
+		mov     \irqnr, #0
+1001:		tst     \irqstat, #1
+		addeq   \irqnr, \irqnr, #1
+		moveq   \irqstat, \irqstat, lsr #1
+		tsteq   \irqnr, #32
+		beq     1001b
+		teq     \irqnr, #32
+		.endm
+
diff -Nru a/include/asm-arm/arch-lh7a40x/entry-macro.S b/include/asm-arm/arch-lh7a40x/entry-macro.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-arm/arch-lh7a40x/entry-macro.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,67 @@
+/*
+ * include/asm-arm/arch-lh7a40x/entry-macro.S
+ *
+ * Low-level IRQ helper macros for LH7A40x platforms
+ *
+ * This file is licensed under  the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+# if defined (CONFIG_ARCH_LH7A400) && defined (CONFIG_ARCH_LH7A404)
+#  error "LH7A400 and LH7A404 are mutually exclusive"
+# endif
+
+# if defined (CONFIG_ARCH_LH7A400)
+		.macro	disable_fiq
+		.endm
+
+		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
+		mov	\irqnr, #0
+		mov	\base, #io_p2v(0x80000000)	@ APB registers
+		ldr	\irqstat, [\base, #0x500]	@ PIC INTSR
+
+1001:		movs	\irqstat, \irqstat, lsr #1	@ Shift into carry
+		bcs	1008f				@ Bit set; irq found
+		add	\irqnr, \irqnr, #1
+		bne	1001b				@ Until no bits
+		b	1009f				@ Nothing?  Hmm.
+1008:		movs	\irqstat, #1			@ Force !Z
+1009:
+               .endm
+
+#elif defined(CONFIG_ARCH_LH7A404)
+
+		.macro	disable_fiq
+		.endm
+
+		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
+		mov	\irqnr, #0			@ VIC1 irq base
+		mov	\base, #io_p2v(0x80000000)	@ APB registers
+		add	\base, \base, #0x8000
+		ldr	\tmp, [\base, #0x0030]		@ VIC1_VECTADDR
+		tst	\tmp, #VA_VECTORED		@ Direct vectored
+		bne	1002f
+		tst	\tmp, #VA_VIC1DEFAULT		@ Default vectored VIC1
+		ldrne	\irqstat, [\base, #0]		@ VIC1_IRQSTATUS
+		bne	1001f
+		add	\base, \base, #(0xa000 - 0x8000)
+		ldr	\tmp, [\base, #0x0030]		@ VIC2_VECTADDR
+		tst	\tmp, #VA_VECTORED		@ Direct vectored
+		bne	1002f
+		ldr	\irqstat, [\base, #0]		@ VIC2_IRQSTATUS
+		mov	\irqnr, #32			@ VIC2 irq base
+
+1001:		movs	\irqstat, \irqstat, lsr #1	@ Shift into carry
+		bcs	1008f				@ Bit set; irq found
+		add	\irqnr, \irqnr, #1
+		bne	1001b				@ Until no bits
+		b	1009f				@ Nothing?  Hmm.
+1002:		and	\irqnr, \tmp, #0x3f		@ Mask for valid bits
+1008:		movs	\irqstat, #1			@ Force !Z
+		str	\tmp, [\base, #0x0030]		@ Clear vector
+1009:
+               .endm
+#endif
+
+
diff -Nru a/include/asm-arm/arch-omap/dma.h b/include/asm-arm/arch-omap/dma.h
--- a/include/asm-arm/arch-omap/dma.h	2005-01-10 20:11:16 -08:00
+++ b/include/asm-arm/arch-omap/dma.h	2005-01-10 20:11:16 -08:00
@@ -238,6 +238,10 @@
 extern void omap_dma_link_lch (int lch_head, int lch_queue);
 extern void omap_dma_unlink_lch (int lch_head, int lch_queue);
 
+extern dma_addr_t omap_get_dma_src_pos(int lch);
+extern dma_addr_t omap_get_dma_dst_pos(int lch);
+extern void omap_clear_dma(int lch);
+
 /* Returns 1 if the DMA module is in OMAP1510-compatible mode, 0 otherwise */
 extern int omap_dma_in_1510_mode(void);
 
diff -Nru a/include/asm-arm/arch-omap/entry-macro.S b/include/asm-arm/arch-omap/entry-macro.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-arm/arch-omap/entry-macro.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,32 @@
+/*
+ * include/asm-arm/arch-omap/entry-macro.S
+ *
+ * Low-level IRQ helper macros for OMAP-based platforms
+ *
+ * This file is licensed under  the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+ 		.macro	disable_fiq
+		.endm
+
+		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
+		ldr	\base, =IO_ADDRESS(OMAP_IH1_BASE)
+		ldr	\irqnr, [\base, #IRQ_ITR_REG_OFFSET]
+		ldr	\tmp, [\base, #IRQ_MIR_REG_OFFSET]
+		mov	\irqstat, #0xffffffff
+		bic	\tmp, \irqstat, \tmp
+		tst	\irqnr, \tmp
+		beq	1510f
+
+		ldr	\irqnr, [\base, #IRQ_SIR_FIQ_REG_OFFSET]
+		cmp	\irqnr, #0
+		ldreq	\irqnr, [\base, #IRQ_SIR_IRQ_REG_OFFSET]
+		cmpeq	\irqnr, #INT_IH2_IRQ
+		ldreq	\base, =IO_ADDRESS(OMAP_IH2_BASE)
+		ldreq	\irqnr, [\base, #IRQ_SIR_IRQ_REG_OFFSET]
+		addeqs	\irqnr, \irqnr, #32
+1510:
+		.endm
+
diff -Nru a/include/asm-arm/arch-omap/gpio.h b/include/asm-arm/arch-omap/gpio.h
--- a/include/asm-arm/arch-omap/gpio.h	2005-01-10 20:11:17 -08:00
+++ b/include/asm-arm/arch-omap/gpio.h	2005-01-10 20:11:17 -08:00
@@ -58,6 +58,7 @@
 #define OMAP_GPIO_RISING_EDGE	  0x02
 #define OMAP_GPIO_BOTH_EDGES	  0x03
 
+extern int omap_gpio_init(void);	/* Call from board init only */
 extern int omap_request_gpio(int gpio);
 extern void omap_free_gpio(int gpio);
 extern void omap_set_gpio_direction(int gpio, int is_input);
diff -Nru a/include/asm-arm/arch-omap/hardware.h b/include/asm-arm/arch-omap/hardware.h
--- a/include/asm-arm/arch-omap/hardware.h	2005-01-10 20:11:16 -08:00
+++ b/include/asm-arm/arch-omap/hardware.h	2005-01-10 20:11:16 -08:00
@@ -137,7 +137,7 @@
 /* CNTL_TIMER register bits */
 #define MPUTIM_FREE		(1<<6)
 #define MPUTIM_CLOCK_ENABLE	(1<<5)
-#define MPUTIM_PTV_MASK		(0x7<<PTV_BIT)
+#define MPUTIM_PTV_MASK		(0x7<<MPUTIM_PTV_BIT)
 #define MPUTIM_PTV_BIT		2
 #define MPUTIM_AR		(1<<1)
 #define MPUTIM_ST		(1<<0)
diff -Nru a/include/asm-arm/arch-omap/irqs.h b/include/asm-arm/arch-omap/irqs.h
--- a/include/asm-arm/arch-omap/irqs.h	2005-01-10 20:11:15 -08:00
+++ b/include/asm-arm/arch-omap/irqs.h	2005-01-10 20:11:15 -08:00
@@ -147,6 +147,8 @@
 #define INT_1610_SoSSI		(9 + IH2_BASE)
 #define INT_1610_SoSSI_MATCH	(19 + IH2_BASE)
 #define INT_1610_McBSP2RX_OF	(31 + IH2_BASE)
+#define INT_1610_STI		(32 + IH2_BASE)
+#define INT_1610_STI_WAKEUP	(33 + IH2_BASE)
 #define INT_1610_GPIO_BANK2	(40 + IH2_BASE)
 #define INT_1610_GPIO_BANK3	(41 + IH2_BASE)
 #define INT_1610_MMC2		(42 + IH2_BASE)
diff -Nru a/include/asm-arm/arch-omap/mux.h b/include/asm-arm/arch-omap/mux.h
--- a/include/asm-arm/arch-omap/mux.h	2005-01-10 20:11:18 -08:00
+++ b/include/asm-arm/arch-omap/mux.h	2005-01-10 20:11:18 -08:00
@@ -310,6 +310,12 @@
 	/* Power management */
 	T20_1610_LOW_PWR,
 
+	/* MCLK Settings */
+	V5_1710_MCLK_ON,
+	V5_1710_MCLK_OFF,
+	R10_1610_MCLK_ON,
+	R10_1610_MCLK_OFF,
+
 } reg_cfg_t;
 
 #if defined(__MUX_C__) && defined(CONFIG_OMAP_MUX)
@@ -516,6 +522,12 @@
 
 /* Power management */
 MUX_CFG("T20_1610_LOW_PWR",	 7,   12,    1,	  NA,   0,   0,   NA,	 0,  0)
+
+/* MCLK Settings */
+MUX_CFG("V5_1710_MCLK_ON",	 B,   15,    0,	  NA,   0,   0,   NA,	 0,  0)
+MUX_CFG("V5_1710_MCLK_OFF",	 B,   15,    6,	  NA,   0,   0,   NA,	 0,  0)
+MUX_CFG("R10_1610_MCLK_ON",	 B,   18,    0,	  NA,  22,   0,	  NA,	 1,  0)
+MUX_CFG("R10_1610_MCLK_OFF",	 B,   18,    6,	  2,   22,   1,	  2,	 1,  1)
 };
 
 #endif	/* __MUX_C__ */
diff -Nru a/include/asm-arm/arch-omap/omap16xx.h b/include/asm-arm/arch-omap/omap16xx.h
--- a/include/asm-arm/arch-omap/omap16xx.h	2005-01-10 20:11:15 -08:00
+++ b/include/asm-arm/arch-omap/omap16xx.h	2005-01-10 20:11:15 -08:00
@@ -56,8 +56,9 @@
  */
 
 #define OMAP1610_SRAM_IDLE_SUSPEND	(OMAP16XX_SRAM_BASE + OMAP1610_SRAM_SIZE - 0x200)
-#define OMAP5912_SRAM_IDLE_SUSPEND	(OMAP16XX_SRAM_BASE + OMAP5912_SRAM_SIZE - 0x200)
 #define OMAP1610_SRAM_API_SUSPEND	(OMAP1610_SRAM_IDLE_SUSPEND + 0x100)
+#define OMAP5912_SRAM_IDLE_SUSPEND	(OMAP16XX_SRAM_BASE + OMAP5912_SRAM_SIZE - 0x200)
+#define OMAP5912_SRAM_API_SUSPEND	(OMAP5912_SRAM_IDLE_SUSPEND + 0x100)
 
 /*
  * ---------------------------------------------------------------------------
diff -Nru a/include/asm-arm/arch-pxa/corgi.h b/include/asm-arm/arch-pxa/corgi.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-arm/arch-pxa/corgi.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,133 @@
+/*
+ * Hardware specific definitions for SL-C7xx series of PDAs
+ *
+ * Copyright (c) 2004-2005 Richard Purdie
+ *
+ * Based on Sharp's 2.4 kernel patches
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+#ifndef __ASM_ARCH_CORGI_H
+#define __ASM_ARCH_CORGI_H  1
+
+
+/*
+ * Corgi GPIO definitions
+ */
+#define CORGI_GPIO_KEY_INT			(0)	/* key interrupt */
+#define CORGI_GPIO_AC_IN			(1)
+#define CORGI_GPIO_WAKEUP			(3)
+#define CORGI_GPIO_AK_INT			(4)	// Remote Controller
+#define CORGI_GPIO_TP_INT			(5)	/* Touch Panel interrupt */
+#define CORGI_GPIO_nSD_CLK			(6)
+#define CORGI_GPIO_nSD_WP			(7)
+#define CORGI_GPIO_nSD_DETECT		(9)
+#define CORGI_GPIO_nSD_INT			(10)
+#define CORGI_GPIO_MAIN_BAT_LOW		(11)
+#define CORGI_GPIO_BAT_COVER		(11)
+#define CORGI_GPIO_LED_ORANGE		(13)
+#define CORGI_GPIO_CF_CD			(14)
+#define CORGI_GPIO_CHRG_FULL		(16)
+#define CORGI_GPIO_CF_IRQ			(17)
+#define CORGI_GPIO_ADC_TEMP_ON		(21)
+#define CORGI_GPIO_IR_ON			(22)
+#define CORGI_GPIO_SD_PWR			(33)
+#define CORGI_GPIO_CHRG_ON			(38)
+#define CORGI_GPIO_DISCHARGE_ON		(42)
+#define CORGI_GPIO_HSYNC			(44)
+#define CORGI_GPIO_USB_PULLUP		(45)
+
+
+/*
+ * Corgi Keyboard Definitions
+ */
+#define CORGI_KEY_STROBE_NUM		(12)
+#define CORGI_KEY_SENSE_NUM			(8)
+#define CORGI_GPIO_ALL_STROBE_BIT	(0x00003ffc)
+#define CORGI_GPIO_HIGH_SENSE_BIT	(0xfc000000)
+#define CORGI_GPIO_HIGH_SENSE_RSHIFT	(26)
+#define CORGI_GPIO_LOW_SENSE_BIT	(0x00000003)
+#define CORGI_GPIO_LOW_SENSE_LSHIFT	(6)
+#define CORGI_GPIO_STROBE_BIT(a)	GPIO_bit(66+(a))
+#define CORGI_GPIO_SENSE_BIT(a)		GPIO_bit(58+(a))
+#define CORGI_GAFR_ALL_STROBE_BIT	(0x0ffffff0)
+#define CORGI_GAFR_HIGH_SENSE_BIT	(0xfff00000)
+#define CORGI_GAFR_LOW_SENSE_BIT	(0x0000000f)
+#define CORGI_GPIO_KEY_SENSE(a)		(58+(a))
+#define CORGI_GPIO_KEY_STROBE(a)	(66+(a))
+
+
+/*
+ * Corgi Interrupts
+ */
+#define CORGI_IRQ_GPIO_KEY_INT		IRQ_GPIO(0)
+#define CORGI_IRQ_GPIO_AC_IN		IRQ_GPIO(1)
+#define CORGI_IRQ_GPIO_WAKEUP		IRQ_GPIO(3)
+#define CORGI_IRQ_GPIO_AK_INT		IRQ_GPIO(4)
+#define CORGI_IRQ_GPIO_TP_INT		IRQ_GPIO(5)
+#define CORGI_IRQ_GPIO_nSD_DETECT	IRQ_GPIO(9)
+#define CORGI_IRQ_GPIO_nSD_INT		IRQ_GPIO(10)
+#define CORGI_IRQ_GPIO_MAIN_BAT_LOW	IRQ_GPIO(11)
+#define CORGI_IRQ_GPIO_CF_CD		IRQ_GPIO(14)
+#define CORGI_IRQ_GPIO_CHRG_FULL	IRQ_GPIO(16)	/* Battery fully charged */
+#define CORGI_IRQ_GPIO_CF_IRQ		IRQ_GPIO(17)
+#define CORGI_IRQ_GPIO_KEY_SENSE(a)	IRQ_GPIO(58+(a))	/* Keyboard Sense lines */
+
+
+/*
+ * Corgi SCOOP GPIOs and Config
+ */
+#define CORGI_SCP_LED_GREEN		SCOOP_GPCR_PA11
+#define CORGI_SCP_SWA			SCOOP_GPCR_PA12  /* Hinge Switch A */
+#define CORGI_SCP_SWB			SCOOP_GPCR_PA13  /* Hinge Switch B */
+#define CORGI_SCP_MUTE_L		SCOOP_GPCR_PA14
+#define CORGI_SCP_MUTE_R		SCOOP_GPCR_PA15
+#define CORGI_SCP_AKIN_PULLUP	SCOOP_GPCR_PA16
+#define CORGI_SCP_APM_ON		SCOOP_GPCR_PA17
+#define CORGI_SCP_BACKLIGHT_CONT	SCOOP_GPCR_PA18
+#define CORGI_SCP_MIC_BIAS		SCOOP_GPCR_PA19
+
+#define CORGI_SCOOP_IO_DIR	( CORGI_SCP_LED_GREEN | CORGI_SCP_MUTE_L | CORGI_SCP_MUTE_R | \
+			CORGI_SCP_AKIN_PULLUP | CORGI_SCP_APM_ON | CORGI_SCP_BACKLIGHT_CONT | \
+			CORGI_SCP_MIC_BIAS )
+#define CORGI_SCOOP_IO_OUT	( CORGI_SCP_MUTE_L | CORGI_SCP_MUTE_R )
+
+/*
+ * Corgi Parameter Area Definitions
+ */
+#define FLASH_MEM_BASE	0xa0000a00
+#define FLASH_MAGIC_CHG(a,b,c,d) ( ( d << 24 ) | ( c << 16 )  | ( b << 8 ) | a )
+
+#define FLASH_COMADJ_MAJIC	FLASH_MAGIC_CHG('C','M','A','D')
+#define	FLASH_COMADJ_MAGIC_ADR	0x00
+#define	FLASH_COMADJ_DATA_ADR	0x04
+
+#define FLASH_PHAD_MAJIC	FLASH_MAGIC_CHG('P','H','A','D')
+#define	FLASH_PHAD_MAGIC_ADR	0x38
+#define	FLASH_PHAD_DATA_ADR	0x3C
+
+struct sharpsl_flash_param_info {
+  unsigned int comadj_keyword;
+  unsigned int comadj;
+
+  unsigned int uuid_keyword;
+  unsigned char uuid[16];
+
+  unsigned int touch_keyword;
+  unsigned int touch1;
+  unsigned int touch2;
+  unsigned int touch3;
+  unsigned int touch4;
+
+  unsigned int adadj_keyword;
+  unsigned int adadj;
+
+  unsigned int phad_keyword;
+  unsigned int phadadj;
+};
+
+#endif /* __ASM_ARCH_CORGI_H  */
+
diff -Nru a/include/asm-arm/arch-pxa/entry-macro.S b/include/asm-arm/arch-pxa/entry-macro.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-arm/arch-pxa/entry-macro.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,31 @@
+/*
+ * include/asm-arm/arch-pxa/entry-macro.S
+ *
+ * Low-level IRQ helper macros for PXA-based platforms
+ *
+ * This file is licensed under  the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+		.macro	disable_fiq
+		.endm
+
+		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
+#ifdef CONFIG_PXA27x
+		mrc	p6, 0, \irqstat, c0, c0, 0		@ ICIP
+		mrc	p6, 0, \irqnr, c1, c0, 0		@ ICMR
+#else
+		mov	\base, #io_p2v(0x40000000)	@ IIR Ctl = 0x40d00000
+		add	\base, \base, #0x00d00000
+		ldr	\irqstat, [\base, #0]		@ ICIP
+		ldr	\irqnr, [\base, #4]		@ ICMR
+#endif
+		ands	\irqnr, \irqstat, \irqnr
+		beq	1001f
+		rsb	\irqstat, \irqnr, #0
+		and	\irqstat, \irqstat, \irqnr
+		clz	\irqnr, \irqstat
+		rsb	\irqnr, \irqnr, #(31 - PXA_IRQ_SKIP)
+1001:
+		.endm
diff -Nru a/include/asm-arm/arch-pxa/memory.h b/include/asm-arm/arch-pxa/memory.h
--- a/include/asm-arm/arch-pxa/memory.h	2005-01-10 20:11:18 -08:00
+++ b/include/asm-arm/arch-pxa/memory.h	2005-01-10 20:11:18 -08:00
@@ -37,8 +37,6 @@
  * 	node 3:  0xac000000-0xafffffff	-->  0xcc000000-0xcfffffff
  */
 
-#define NR_NODES	4
-
 /*
  * Given a kernel address, find the home node of the underlying memory.
  */
diff -Nru a/include/asm-arm/arch-pxa/pxa-regs.h b/include/asm-arm/arch-pxa/pxa-regs.h
--- a/include/asm-arm/arch-pxa/pxa-regs.h	2005-01-10 20:11:20 -08:00
+++ b/include/asm-arm/arch-pxa/pxa-regs.h	2005-01-10 20:11:20 -08:00
@@ -272,11 +272,6 @@
 #define DCMD_WIDTH4	(3 << 14)	/* 4 byte width (Word) */
 #define DCMD_LENGTH	0x01fff		/* length mask (max = 8K - 1) */
 
-/* default combinations */
-#define DCMD_RXPCDR	(DCMD_INCTRGADDR|DCMD_FLOWSRC|DCMD_BURST32|DCMD_WIDTH4)
-#define DCMD_RXMCDR	(DCMD_INCTRGADDR|DCMD_FLOWSRC|DCMD_BURST32|DCMD_WIDTH4)
-#define DCMD_TXPCDR	(DCMD_INCSRCADDR|DCMD_FLOWTRG|DCMD_BURST32|DCMD_WIDTH4)
-
 
 /*
  * UARTs
@@ -1580,6 +1575,7 @@
 #define SSCR0_EDSS		(1 << 20)	/* Extended Data Size Select */
 
 /* extra bits in PXA255, PXA26x and PXA27x SSP ports */
+#define SSCR0_PSP		(3 << 4)	/* PSP - Programmable Serial Protocol */
 #define SSCR1_TTELP		(1 << 31)	/* TXD Tristate Enable Last Phase */
 #define SSCR1_TTE		(1 << 30)	/* TXD Tristate Enable */
 #define SSCR1_EBCEI		(1 << 29)	/* Enable Bit Count Error interrupt */
diff -Nru a/include/asm-arm/arch-pxa/ssp.h b/include/asm-arm/arch-pxa/ssp.h
--- a/include/asm-arm/arch-pxa/ssp.h	2005-01-10 20:11:16 -08:00
+++ b/include/asm-arm/arch-pxa/ssp.h	2005-01-10 20:11:16 -08:00
@@ -40,8 +40,8 @@
 void ssp_disable(struct ssp_dev *dev);
 void ssp_save_state(struct ssp_dev *dev, struct ssp_state *ssp);
 void ssp_restore_state(struct ssp_dev *dev, struct ssp_state *ssp);
-int ssp_init(struct ssp_dev *dev, u32 port, u32 mode, u32 flags, u32 psp_flags,
-						u32 speed);
+int ssp_init(struct ssp_dev *dev, u32 port);
+int ssp_config(struct ssp_dev *dev, u32 mode, u32 flags, u32 psp_flags, u32 speed);
 void ssp_exit(struct ssp_dev *dev);
 
 #endif
diff -Nru a/include/asm-arm/arch-rpc/entry-macro.S b/include/asm-arm/arch-rpc/entry-macro.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-arm/arch-rpc/entry-macro.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,3 @@
+
+#include <asm/hardware/entry-macro-iomd.S>
+
diff -Nru a/include/asm-arm/arch-rpc/io.h b/include/asm-arm/arch-rpc/io.h
--- a/include/asm-arm/arch-rpc/io.h	2005-01-10 20:11:20 -08:00
+++ b/include/asm-arm/arch-rpc/io.h	2005-01-10 20:11:20 -08:00
@@ -124,12 +124,14 @@
 	return (unsigned sz)value;						\
 }
 
-static inline unsigned int __ioaddr (unsigned int port)			\
-{										\
-	if (__PORT_PCIO(port))							\
-		return (unsigned int)(PCIO_BASE + (port << 2));			\
-	else									\
-		return (unsigned int)(IO_BASE + (port << 2));			\
+static inline void __iomem *__ioaddr(unsigned int port)
+{
+	void __iomem *ret;
+	if (__PORT_PCIO(port))
+		ret = (void __iomem *)PCIO_BASE;
+	else
+		ret = (void __iomem *)IO_BASE;
+	return ret + (port << 2);
 }
 
 #define DECLARE_IO(sz,fnsuffix,instr)	\
@@ -211,7 +213,7 @@
 	else									\
 		__asm__ __volatile__(						\
 		"str	%0, [%1, %2]	@ outlc"				\
-		: : "r" (__v), "r" (IO_BASE), "r" ((port) << 2));			\
+		: : "r" (__v), "r" (IO_BASE), "r" ((port) << 2));		\
 })
 
 #define __inlc(port)								\
@@ -229,7 +231,7 @@
 })
 
 #define __ioaddrc(port)								\
-	(__PORT_PCIO((port)) ? PCIO_BASE + ((port) << 2) : IO_BASE + ((port) << 2))
+	((void __iomem *)(__PORT_PCIO((port)) ? PCIO_BASE : IO_BASE) + ((port) << 2))
 
 #define inb(p)	 	(__builtin_constant_p((p)) ? __inbc(p)    : __inb(p))
 #define inw(p)	 	(__builtin_constant_p((p)) ? __inwc(p)    : __inw(p))
@@ -239,7 +241,7 @@
 #define outl(v,p)	(__builtin_constant_p((p)) ? __outlc(v,p) : __outl(v,p))
 #define __ioaddr(p)	(__builtin_constant_p((p)) ? __ioaddr(p)  : __ioaddrc(p))
 /* the following macro is deprecated */
-#define ioaddr(port)			__ioaddr((port))
+#define ioaddr(port)	((unsigned long)__ioaddr((port)))
 
 #define insb(p,d,l)	__raw_readsb(__ioaddr(p),d,l)
 #define insw(p,d,l)	__raw_readsw(__ioaddr(p),d,l)
diff -Nru a/include/asm-arm/arch-s3c2410/entry-macro.S b/include/asm-arm/arch-s3c2410/entry-macro.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-arm/arch-s3c2410/entry-macro.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,116 @@
+/*
+ * include/asm-arm/arch-s3c2410/entry-macro.S
+ *
+ * Low-level IRQ helper macros for S3C2410-based platforms
+ *
+ * This file is licensed under  the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+
+	.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
+
+		mov	\tmp, #S3C2410_VA_IRQ
+		ldr	\irqnr, [ \tmp, #0x14 ]		@ get irq no
+30000:
+		teq	\irqnr, #4
+		teqne	\irqnr, #5
+		beq	1002f				@ external irq reg
+
+		@ debug check to see if interrupt reported is the same
+		@ as the offset....
+
+		teq	\irqnr, #0
+		beq	20002f
+		ldr	\irqstat, [ \tmp, #0x10 ]	@ INTPND
+		mov	\irqstat, \irqstat, lsr \irqnr
+		tst	\irqstat, #1
+		bne	20002f
+
+		/* debug/warning if we get an invalud response from the
+		 * INTOFFSET register */
+#if 1
+		stmfd	r13!, { r0 - r4 , r8-r12, r14 }
+		ldr	r1,	[ \tmp, #0x14 ]		@ INTOFFSET
+		ldr	r2,	[ \tmp, #0x10 ]		@ INTPND
+		ldr	r3,	[ \tmp, #0x00 ]		@ SRCPND
+		adr	r0, 20003f
+		bl	printk
+		b	20004f
+
+20003:
+		.ascii	"<7>irq: err - bad offset %d, intpnd=%08x, srcpnd=%08x\n"
+		.byte	0
+		.align	4
+20004:
+		mov	r1, #1
+		mov	\tmp, #S3C2410_VA_IRQ
+		ldmfd	r13!, { r0 - r4 , r8-r12, r14 }
+#endif
+
+		@ try working out interrupt number for ourselves
+		mov	\irqnr, #0
+		ldr	\irqstat, [ \tmp, #0x10 ]	@ INTPND
+10021:
+		movs	\irqstat, \irqstat, lsr#1
+		bcs	30000b		@ try and re-start the proccess
+		add	\irqnr, \irqnr, #1
+		cmp	\irqnr, #32
+		ble	10021b
+
+		@ found no interrupt, set Z flag and leave
+		movs	\irqnr, #0
+		b	1001f
+
+20005:
+20002:		@ exit
+		@ we base the s3c2410x interrupts at 16 and above to allow
+		@ isa peripherals to have their standard interrupts, also
+		@ ensure that Z flag is un-set on exit
+
+		@ note, we cannot be sure if we get IRQ_EINT0 (0) that
+		@ there is simply no interrupt pending, so in all other
+		@ cases we jump to say we have found something, otherwise
+		@ we check to see if the interrupt really is assrted
+		adds	\irqnr, \irqnr, #IRQ_EINT0
+		teq	\irqnr, #IRQ_EINT0
+		bne	1001f				@ exit
+		ldr	\irqstat, [ \tmp, #0x10 ]	@ INTPND
+		teq	\irqstat, #0
+		moveq	\irqnr, #0
+		b	1001f
+
+		@ we get here from no main or external interrupts pending
+1002:
+		add	\tmp, \tmp, #S3C2410_VA_GPIO - S3C2410_VA_IRQ
+		ldr	\irqstat, [ \tmp, # 0xa8 ]	@ EXTINTPEND
+		ldr	\irqnr, [ \tmp, # 0xa4 ]	@ EXTINTMASK
+
+		bic	\irqstat, \irqstat, \irqnr	@ clear masked irqs
+
+		mov	\irqnr, #IRQ_EINT4		@ start extint nos
+		mov	\irqstat, \irqstat, lsr#4	@ ignore bottom 4 bits
+10021:
+		movs	\irqstat, \irqstat, lsr#1
+		bcs	1004f
+		add	\irqnr, \irqnr, #1
+		cmp	\irqnr, #IRQ_EINT23
+		ble	10021b
+
+		@ found no interrupt, set Z flag and leave
+		movs	\irqnr, #0
+
+1004:		@ ensure Z flag clear in case our MOVS shifted out the last bit
+		teq	\irqnr, #0
+1001:
+		@ exit irq routine
+		.endm
+
+
+		/* currently don't need an disable_fiq macro */
+
+		.macro	disable_fiq
+		.endm
+
+
diff -Nru a/include/asm-arm/arch-s3c2410/timex.h b/include/asm-arm/arch-s3c2410/timex.h
--- a/include/asm-arm/arch-s3c2410/timex.h	2005-01-10 20:11:21 -08:00
+++ b/include/asm-arm/arch-s3c2410/timex.h	2005-01-10 20:11:21 -08:00
@@ -1,6 +1,6 @@
 /* linux/include/asm-arm/arch-s3c2410/timex.h
  *
- * (c) 2003,2004 Simtec Electronics
+ * (c) 2003-2005 Simtec Electronics
  *  Ben Dooks <ben@simtec.co.uk>
  *
  * S3C2410 - time parameters
@@ -13,21 +13,19 @@
  *  02-Sep-2003 BJD  Created file
  *  05-Jan-2004 BJD  Updated for Linux 2.6.0
  *  22-Nov-2004 BJD  Fixed CLOCK_TICK_RATE
+ *  10-Jan-2004 BJD  Removed s3c2410_clock_tick_rate
 */
 
 #ifndef __ASM_ARCH_TIMEX_H
 #define __ASM_ARCH_TIMEX_H
 
-#if 0
-/* todo - this does not seem to work with 2.6.0 -> division by zero
- * in header files
- */
-extern int s3c2410_clock_tick_rate;
+/* CLOCK_TICK_RATE needs to be evaluatable by the cpp, so making it
+ * a variable is useless. It seems as long as we make our timers an
+ * exact multiple of HZ, any value that makes a 1->1 correspondence
+ * for the time conversion functions to/from jiffies is acceptable.
+*/
 
-#define CLOCK_TICK_RATE (s3c2410_clock_tick_rate)
-#endif
 
-/* currently, the BAST uses 12MHz as a base clock rate */
 #define CLOCK_TICK_RATE 12000000
 
 
diff -Nru a/include/asm-arm/arch-sa1100/entry-macro.S b/include/asm-arm/arch-sa1100/entry-macro.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-arm/arch-sa1100/entry-macro.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,41 @@
+/*
+ * include/asm-arm/arch-sa1100/entry-macro.S
+ *
+ * Low-level IRQ helper macros for SA1100-based platforms
+ *
+ * This file is licensed under  the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+ 		.macro	disable_fiq
+		.endm
+
+		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
+		mov	r4, #0xfa000000			@ ICIP = 0xfa050000
+		add	r4, r4, #0x00050000
+		ldr	\irqstat, [r4]			@ get irqs
+		ldr	\irqnr, [r4, #4]		@ ICMR = 0xfa050004
+		ands	\irqstat, \irqstat, \irqnr
+		mov	\irqnr, #0
+		beq	1001f
+		tst	\irqstat, #0xff
+		moveq	\irqstat, \irqstat, lsr #8
+		addeq	\irqnr, \irqnr, #8
+		tsteq	\irqstat, #0xff
+		moveq	\irqstat, \irqstat, lsr #8
+		addeq	\irqnr, \irqnr, #8
+		tsteq	\irqstat, #0xff
+		moveq	\irqstat, \irqstat, lsr #8
+		addeq	\irqnr, \irqnr, #8
+		tst	\irqstat, #0x0f
+		moveq	\irqstat, \irqstat, lsr #4
+		addeq	\irqnr, \irqnr, #4
+		tst	\irqstat, #0x03
+		moveq	\irqstat, \irqstat, lsr #2
+		addeq	\irqnr, \irqnr, #2
+		tst	\irqstat, #0x01
+		addeqs	\irqnr, \irqnr, #1
+1001:
+		.endm
+
diff -Nru a/include/asm-arm/arch-shark/entry-macro.S b/include/asm-arm/arch-shark/entry-macro.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-arm/arch-shark/entry-macro.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,35 @@
+/*
+ * include/asm-arm/arch-shark/entry-macro.S
+ *
+ * Low-level IRQ helper macros for Shark platform
+ *
+ * This file is licensed under  the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+		.macro	disable_fiq
+		.endm
+
+		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
+		mov	r4, #0xe0000000
+
+		mov	\irqstat, #0x0C
+		strb	\irqstat, [r4, #0x20]		@outb(0x0C, 0x20) /* Poll command */
+		ldrb	\irqnr, [r4, #0x20]		@irq = inb(0x20) & 7
+		and	\irqstat, \irqnr, #0x80
+		teq	\irqstat, #0
+		beq	43f
+		and	\irqnr, \irqnr, #7
+		teq	\irqnr, #2
+		bne	44f
+43:		mov	\irqstat, #0x0C
+		strb	\irqstat, [r4, #0xa0]		@outb(0x0C, 0xA0) /* Poll command */
+		ldrb	\irqnr, [r4, #0xa0]		@irq = (inb(0xA0) & 7) + 8
+		and	\irqstat, \irqnr, #0x80
+		teq	\irqstat, #0
+		beq	44f
+		and	\irqnr, \irqnr, #7
+		add	\irqnr, \irqnr, #8
+44:		teq	\irqstat, #0
+		.endm
+
diff -Nru a/include/asm-arm/arch-versatile/entry-macro.S b/include/asm-arm/arch-versatile/entry-macro.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-arm/arch-versatile/entry-macro.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,35 @@
+/*
+ * include/asm-arm/arch-versatile/entry-macro.S
+ *
+ * Low-level IRQ helper macros for Versatile platforms
+ *
+ * This file is licensed under  the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+			.macro	disable_fiq
+		.endm
+
+		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
+		ldr	\base, =IO_ADDRESS(VERSATILE_VIC_BASE)
+		ldr	\irqstat, [\base, #VIC_IRQ_STATUS]	@ get masked status
+		mov	\irqnr, #0
+		teq	\irqstat, #0
+		beq	1003f
+
+1001:		tst	\irqstat, #15
+		bne	1002f
+		add	\irqnr, \irqnr, #4
+		movs	\irqstat, \irqstat, lsr #4
+		bne	1001b
+1002:		tst	\irqstat, #1
+		bne	1003f
+		add	\irqnr, \irqnr, #1
+		movs	\irqstat, \irqstat, lsr #1
+		bne	1002b
+1003:		/* EQ will be set if no irqs pending */
+
+@		clz	\irqnr, \irqstat
+@1003:		/* EQ will be set if we reach MAXIRQNUM */
+		.endm
+
diff -Nru a/include/asm-arm/cpu.h b/include/asm-arm/cpu.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-arm/cpu.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,26 @@
+/*
+ *  linux/include/asm-arm/cpu.h
+ *
+ *  Copyright (C) 2004-2005 ARM Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#ifndef __ASM_ARM_CPU_H
+#define __ASM_ARM_CPU_H
+
+#include <linux/config.h>
+#include <linux/percpu.h>
+
+struct cpuinfo_arm {
+	struct cpu	cpu;
+#ifdef CONFIG_SMP
+	unsigned int	loops_per_jiffy;
+	unsigned long	ipi_count;
+#endif
+};
+
+DECLARE_PER_CPU(struct cpuinfo_arm, cpu_data);
+
+#endif
diff -Nru a/include/asm-arm/dma-mapping.h b/include/asm-arm/dma-mapping.h
--- a/include/asm-arm/dma-mapping.h	2005-01-10 20:11:15 -08:00
+++ b/include/asm-arm/dma-mapping.h	2005-01-10 20:11:15 -08:00
@@ -87,6 +87,22 @@
 		  dma_addr_t handle);
 
 /**
+ * dma_mmap_coherent - map a coherent DMA allocation into user space
+ * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
+ * @vma: vm_area_struct describing requested user mapping
+ * @cpu_addr: kernel CPU-view address returned from dma_alloc_coherent
+ * @handle: device-view address returned from dma_alloc_coherent
+ * @size: size of memory originally requested in dma_alloc_coherent
+ *
+ * Map a coherent DMA buffer previously allocated by dma_alloc_coherent
+ * into user space.  The coherent DMA buffer must not be freed by the
+ * driver until the user space mapping has been released.
+ */
+int dma_mmap_coherent(struct device *dev, struct vm_area_struct *vma,
+		      void *cpu_addr, dma_addr_t handle, size_t size);
+
+
+/**
  * dma_alloc_writecombine - allocate writecombining memory for DMA
  * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
  * @size: required memory size
@@ -102,6 +118,9 @@
 
 #define dma_free_writecombine(dev,size,cpu_addr,handle) \
 	dma_free_coherent(dev,size,cpu_addr,handle)
+
+int dma_mmap_writecombine(struct device *dev, struct vm_area_struct *vma,
+			  void *cpu_addr, dma_addr_t handle, size_t size);
 
 
 /**
diff -Nru a/include/asm-arm/domain.h b/include/asm-arm/domain.h
--- a/include/asm-arm/domain.h	2005-01-10 20:11:21 -08:00
+++ b/include/asm-arm/domain.h	2005-01-10 20:11:21 -08:00
@@ -14,12 +14,12 @@
  * Domain numbers
  *
  *  DOMAIN_IO     - domain 2 includes all IO only
- *  DOMAIN_KERNEL - domain 1 includes all kernel memory only
- *  DOMAIN_USER   - domain 0 includes all user memory only
+ *  DOMAIN_USER   - domain 1 includes all user memory only
+ *  DOMAIN_KERNEL - domain 0 includes all kernel memory only
  */
-#define DOMAIN_USER	0
-#define DOMAIN_KERNEL	1
-#define DOMAIN_TABLE	1
+#define DOMAIN_KERNEL	0
+#define DOMAIN_TABLE	0
+#define DOMAIN_USER	1
 #define DOMAIN_IO	2
 
 /*
@@ -29,8 +29,9 @@
 #define DOMAIN_CLIENT	1
 #define DOMAIN_MANAGER	3
 
-#define domain_val(dom,type)	((type) << 2*(dom))
+#define domain_val(dom,type)	((type) << (2*(dom)))
 
+#ifndef __ASSEMBLY__
 #define set_domain(x)					\
 	do {						\
 	__asm__ __volatile__(				\
@@ -48,3 +49,4 @@
 	} while (0)
 
 #endif
+#endif /* !__ASSEMBLY__ */
diff -Nru a/include/asm-arm/hardirq.h b/include/asm-arm/hardirq.h
--- a/include/asm-arm/hardirq.h	2005-01-10 20:11:20 -08:00
+++ b/include/asm-arm/hardirq.h	2005-01-10 20:11:20 -08:00
@@ -27,16 +27,6 @@
 # error HARDIRQ_BITS is too low!
 #endif
 
-#define irq_enter()		(preempt_count() += HARDIRQ_OFFSET)
-
-extern asmlinkage void __do_softirq(void);
-
-#define irq_exit()							\
-	do {								\
-		preempt_count() -= IRQ_EXIT_OFFSET;			\
-		if (!in_interrupt() && local_softirq_pending())		\
-			__do_softirq();					\
-		preempt_enable_no_resched();				\
-	} while (0)
+#define __ARCH_IRQ_EXIT_IRQS_DISABLED	1
 
 #endif /* __ASM_HARDIRQ_H */
diff -Nru a/include/asm-arm/hardware/amba_clcd.h b/include/asm-arm/hardware/amba_clcd.h
--- a/include/asm-arm/hardware/amba_clcd.h	2005-01-10 20:11:18 -08:00
+++ b/include/asm-arm/hardware/amba_clcd.h	2005-01-10 20:11:18 -08:00
@@ -125,6 +125,11 @@
 	int	(*setup)(struct clcd_fb *);
 
 	/*
+	 * mmap the framebuffer memory
+	 */
+	int	(*mmap)(struct clcd_fb *, struct vm_area_struct *);
+
+	/*
 	 * Remove platform specific parts of CLCD driver
 	 */
 	void	(*remove)(struct clcd_fb *);
diff -Nru a/include/asm-arm/hardware/entry-macro-iomd.S b/include/asm-arm/hardware/entry-macro-iomd.S
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-arm/hardware/entry-macro-iomd.S	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,145 @@
+/*
+ * arch/arm/commond/entry-macro-iomd.S
+ *
+ * Low-level IRQ helper macros for IOC/IOMD based platforms
+ *
+ * This file is licensed under  the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+/* IOC / IOMD based hardware */
+#include <asm/hardware/iomd.h>
+
+		.equ	ioc_base_high, IOC_BASE & 0xff000000
+		.equ	ioc_base_low, IOC_BASE & 0x00ff0000
+		.macro	disable_fiq
+		mov	r12, #ioc_base_high
+		.if	ioc_base_low
+		orr	r12, r12, #ioc_base_low
+		.endif
+		strb	r12, [r12, #0x38]	@ Disable FIQ register
+		.endm
+
+		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
+		mov	r4, #ioc_base_high		@ point at IOC
+		.if	ioc_base_low
+		orr	r4, r4, #ioc_base_low
+		.endif
+		ldrb	\irqstat, [r4, #IOMD_IRQREQB]	@ get high priority first
+		ldr	\base, =irq_prio_h
+		teq	\irqstat, #0
+#ifdef IOMD_BASE
+		ldreqb	\irqstat, [r4, #IOMD_DMAREQ]	@ get dma
+		addeq	\base, \base, #256		@ irq_prio_h table size
+		teqeq	\irqstat, #0
+		bne	2406f
+#endif
+		ldreqb	\irqstat, [r4, #IOMD_IRQREQA]	@ get low priority
+		addeq	\base, \base, #256		@ irq_prio_d table size
+		teqeq	\irqstat, #0
+#ifdef IOMD_IRQREQC
+		ldreqb	\irqstat, [r4, #IOMD_IRQREQC]
+		addeq	\base, \base, #256		@ irq_prio_l table size
+		teqeq	\irqstat, #0
+#endif
+#ifdef IOMD_IRQREQD
+		ldreqb	\irqstat, [r4, #IOMD_IRQREQD]
+		addeq	\base, \base, #256		@ irq_prio_lc table size
+		teqeq	\irqstat, #0
+#endif
+2406:		ldrneb	\irqnr, [\base, \irqstat]	@ get IRQ number
+		.endm
+
+/*
+ * Interrupt table (incorporates priority).  Please note that we
+ * rely on the order of these tables (see above code).
+ */
+		.align	5
+irq_prio_h:	.byte	 0, 8, 9, 8,10,10,10,10,11,11,11,11,10,10,10,10
+		.byte	12, 8, 9, 8,10,10,10,10,11,11,11,11,10,10,10,10
+		.byte	13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
+		.byte	13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
+		.byte	14,14,14,14,10,10,10,10,11,11,11,11,10,10,10,10
+		.byte	14,14,14,14,10,10,10,10,11,11,11,11,10,10,10,10
+		.byte	13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
+		.byte	13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
+		.byte	15,15,15,15,10,10,10,10,11,11,11,11,10,10,10,10
+		.byte	15,15,15,15,10,10,10,10,11,11,11,11,10,10,10,10
+		.byte	13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
+		.byte	13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
+		.byte	15,15,15,15,10,10,10,10,11,11,11,11,10,10,10,10
+		.byte	15,15,15,15,10,10,10,10,11,11,11,11,10,10,10,10
+		.byte	13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
+		.byte	13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
+#ifdef IOMD_BASE
+irq_prio_d:	.byte	 0,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
+		.byte	20,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
+		.byte	21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
+		.byte	21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
+		.byte	22,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
+		.byte	22,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
+		.byte	21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
+		.byte	21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
+		.byte	23,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
+		.byte	23,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
+		.byte	21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
+		.byte	21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
+		.byte	22,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
+		.byte	22,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
+		.byte	21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
+		.byte	21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
+#endif
+irq_prio_l:	.byte	 0, 0, 1, 0, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3
+		.byte	 4, 0, 1, 0, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3
+		.byte	 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
+		.byte	 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
+		.byte	 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3
+		.byte	 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3
+		.byte	 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
+		.byte	 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
+		.byte	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
+		.byte	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
+		.byte	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
+		.byte	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
+		.byte	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
+		.byte	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
+		.byte	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
+		.byte	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
+#ifdef IOMD_IRQREQC
+irq_prio_lc:	.byte	24,24,25,24,26,26,26,26,27,27,27,27,27,27,27,27
+		.byte	28,24,25,24,26,26,26,26,27,27,27,27,27,27,27,27
+		.byte	29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29
+		.byte	29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29
+		.byte	30,30,30,30,30,30,30,30,27,27,27,27,27,27,27,27
+		.byte	30,30,30,30,30,30,30,30,27,27,27,27,27,27,27,27
+		.byte	29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29
+		.byte	29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29
+		.byte	31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
+		.byte	31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
+		.byte	31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
+		.byte	31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
+		.byte	31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
+		.byte	31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
+		.byte	31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
+		.byte	31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
+#endif
+#ifdef IOMD_IRQREQD
+irq_prio_ld:	.byte	40,40,41,40,42,42,42,42,43,43,43,43,43,43,43,43
+		.byte	44,40,41,40,42,42,42,42,43,43,43,43,43,43,43,43
+		.byte	45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45
+		.byte	45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45
+		.byte	46,46,46,46,46,46,46,46,43,43,43,43,43,43,43,43
+		.byte	46,46,46,46,46,46,46,46,43,43,43,43,43,43,43,43
+		.byte	45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45
+		.byte	45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45
+		.byte	47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
+		.byte	47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
+		.byte	47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
+		.byte	47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
+		.byte	47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
+		.byte	47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
+		.byte	47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
+		.byte	47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
+#endif
+
diff -Nru a/include/asm-arm/hardware/scoop.h b/include/asm-arm/hardware/scoop.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-arm/hardware/scoop.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,47 @@
+/*
+ *  Definitions for the SCOOP interface found on various Sharp PDAs
+ *
+ *  Copyright (c) 2004 Richard Purdie
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ *
+ */
+
+#define SCOOP_MCR  0x00
+#define SCOOP_CDR  0x04
+#define SCOOP_CSR  0x08
+#define SCOOP_CPR  0x0C
+#define SCOOP_CCR  0x10
+#define SCOOP_IRR  0x14
+#define SCOOP_IRM  0x14
+#define SCOOP_IMR  0x18
+#define SCOOP_ISR  0x1C
+#define SCOOP_GPCR 0x20
+#define SCOOP_GPWR 0x24
+#define SCOOP_GPRR 0x28
+
+#define SCOOP_GPCR_PA22	( 1 << 12 )
+#define SCOOP_GPCR_PA21	( 1 << 11 )
+#define SCOOP_GPCR_PA20	( 1 << 10 )
+#define SCOOP_GPCR_PA19	( 1 << 9 )
+#define SCOOP_GPCR_PA18	( 1 << 8 )
+#define SCOOP_GPCR_PA17	( 1 << 7 )
+#define SCOOP_GPCR_PA16	( 1 << 6 )
+#define SCOOP_GPCR_PA15	( 1 << 5 )
+#define SCOOP_GPCR_PA14	( 1 << 4 )
+#define SCOOP_GPCR_PA13	( 1 << 3 )
+#define SCOOP_GPCR_PA12	( 1 << 2 )
+#define SCOOP_GPCR_PA11	( 1 << 1 )
+
+struct scoop_config {
+	unsigned short io_out;
+	unsigned short io_dir;
+};
+
+void reset_scoop(void);
+unsigned short set_scoop_gpio(unsigned short bit);
+unsigned short reset_scoop_gpio(unsigned short bit);
+unsigned short read_scoop_reg(unsigned short reg);
+void write_scoop_reg(unsigned short reg, unsigned short data);
diff -Nru a/include/asm-arm/pgalloc.h b/include/asm-arm/pgalloc.h
--- a/include/asm-arm/pgalloc.h	2005-01-10 20:11:22 -08:00
+++ b/include/asm-arm/pgalloc.h	2005-01-10 20:11:22 -08:00
@@ -50,9 +50,8 @@
 {
 	pte_t *pte;
 
-	pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT);
+	pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO);
 	if (pte) {
-		clear_page(pte);
 		clean_dcache_area(pte, sizeof(pte_t) * PTRS_PER_PTE);
 		pte += PTRS_PER_PTE;
 	}
@@ -65,10 +64,9 @@
 {
 	struct page *pte;
 
-	pte = alloc_pages(GFP_KERNEL|__GFP_REPEAT, 0);
+	pte = alloc_pages(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO, 0);
 	if (pte) {
 		void *page = page_address(pte);
-		clear_page(page);
 		clean_dcache_area(page, sizeof(pte_t) * PTRS_PER_PTE);
 	}
 
diff -Nru a/include/asm-arm/pgtable.h b/include/asm-arm/pgtable.h
--- a/include/asm-arm/pgtable.h	2005-01-10 20:11:17 -08:00
+++ b/include/asm-arm/pgtable.h	2005-01-10 20:11:17 -08:00
@@ -10,6 +10,8 @@
 #ifndef _ASMARM_PGTABLE_H
 #define _ASMARM_PGTABLE_H
 
+#include <asm-generic/4level-fixup.h>
+
 #include <asm/memory.h>
 #include <asm/proc-fns.h>
 #include <asm/arch/vmalloc.h>
@@ -80,7 +82,7 @@
  * PMD_SHIFT determines the size of the area a second-level page table can map
  * PGDIR_SHIFT determines what a third-level page table entry can map
  */
-#define PMD_SHIFT		20
+#define PMD_SHIFT		21
 #define PGDIR_SHIFT		21
 
 #define LIBRARY_TEXT_START	0x0c000000
@@ -308,7 +310,7 @@
 
 #define set_pmd(pmdp,pmd)		\
 	do {				\
-		*pmdp = pmd;		\
+		*(pmdp) = pmd;		\
 		flush_pmd_entry(pmdp);	\
 	} while (0)
 
diff -Nru a/include/asm-arm/processor.h b/include/asm-arm/processor.h
--- a/include/asm-arm/processor.h	2005-01-10 20:11:24 -08:00
+++ b/include/asm-arm/processor.h	2005-01-10 20:11:24 -08:00
@@ -19,9 +19,6 @@
 
 #ifdef __KERNEL__
 
-#define MCA_bus 0
-#define MCA_bus__is_a_macro
-
 #include <asm/atomic.h>
 #include <asm/ptrace.h>
 #include <asm/procinfo.h>
diff -Nru a/include/asm-arm/smp.h b/include/asm-arm/smp.h
--- a/include/asm-arm/smp.h	2005-01-10 20:11:23 -08:00
+++ b/include/asm-arm/smp.h	2005-01-10 20:11:23 -08:00
@@ -1,10 +1,51 @@
-#ifndef __ASM_SMP_H
-#define __ASM_SMP_H
+/*
+ *  linux/include/asm-arm/smp.h
+ *
+ *  Copyright (C) 2004-2005 ARM Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#ifndef __ASM_ARM_SMP_H
+#define __ASM_ARM_SMP_H
 
 #include <linux/config.h>
+#include <linux/threads.h>
+#include <linux/cpumask.h>
+#include <linux/thread_info.h>
 
-#ifdef CONFIG_SMP
-#error SMP not supported
-#endif
+#include <asm/arch/smp.h>
 
+#ifndef CONFIG_SMP
+# error "<asm-arm/smp.h> included in non-SMP build"
 #endif
+
+#define smp_processor_id()	(current_thread_info()->cpu)
+
+extern cpumask_t cpu_present_mask;
+#define cpu_possible_map cpu_present_mask
+
+/*
+ * at the moment, there's not a big penalty for changing CPUs
+ * (the >big< penalty is running SMP in the first place)
+ */
+#define PROC_CHANGE_PENALTY		15
+
+/*
+ * Move global data into per-processor storage.
+ */
+extern void smp_store_cpu_info(unsigned int cpuid);
+
+/*
+ * Raise an IPI cross call on CPUs in callmap.
+ */
+extern void smp_cross_call(cpumask_t callmap);
+
+/*
+ * Boot a secondary CPU, and assign it the specified idle task.
+ * This also gives us the initial stack to use for this CPU.
+ */
+extern int __init boot_secondary(unsigned int cpu, struct task_struct *);
+
+#endif /* ifndef __ASM_ARM_SMP_H */
diff -Nru a/include/asm-arm/spinlock.h b/include/asm-arm/spinlock.h
--- a/include/asm-arm/spinlock.h	2005-01-10 20:11:16 -08:00
+++ b/include/asm-arm/spinlock.h	2005-01-10 20:11:16 -08:00
@@ -17,6 +17,9 @@
  */
 typedef struct {
 	volatile unsigned int lock;
+#ifdef CONFIG_PREEMPT
+	unsigned int break_lock;
+#endif
 } spinlock_t;
 
 #define SPIN_LOCK_UNLOCKED	(spinlock_t) { 0 }
@@ -70,6 +73,9 @@
  */
 typedef struct {
 	volatile unsigned int lock;
+#ifdef CONFIG_PREEMPT
+	unsigned int break_lock;
+#endif
 } rwlock_t;
 
 #define RW_LOCK_UNLOCKED	(rwlock_t) { 0 }
@@ -142,6 +148,8 @@
 	: "r" (&rw->lock)
 	: "cc", "memory");
 }
+
+#define _raw_read_trylock(lock) generic_raw_read_trylock(lock)
 
 static inline int _raw_write_trylock(rwlock_t *rw)
 {
diff -Nru a/include/asm-arm26/atomic.h b/include/asm-arm26/atomic.h
--- a/include/asm-arm26/atomic.h	2005-01-10 20:11:18 -08:00
+++ b/include/asm-arm26/atomic.h	2005-01-10 20:11:18 -08:00
@@ -2,12 +2,14 @@
  *  linux/include/asm-arm26/atomic.h
  *
  *  Copyright (c) 1996 Russell King.
+ *  Modified for arm26 by Ian Molton
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  *
  *  Changelog:
+ *   25-11-2004 IM	Updated for 2.6.9
  *   27-06-1996	RMK	Created
  *   13-04-1997	RMK	Made functions atomic!
  *   07-12-1997	RMK	Upgraded for v2.1.
@@ -31,102 +33,57 @@
 #ifdef __KERNEL__
 #include <asm/system.h>
 
-#define atomic_read(v)	((v)->counter)
+#define atomic_read(v) ((v)->counter)
 #define atomic_set(v,i)	(((v)->counter) = (i))
 
-static inline void atomic_add(int i, volatile atomic_t *v)
+static inline int atomic_add_return(int i, atomic_t *v)
 {
-	unsigned long flags;
+        unsigned long flags;
+        int val;
 
-	local_irq_save(flags);
-	v->counter += i;
-	local_irq_restore(flags);
-}
-
-static inline void atomic_sub(int i, volatile atomic_t *v)
-{
-	unsigned long flags;
-
-	local_irq_save(flags);
-	v->counter -= i;
-	local_irq_restore(flags);
-}
-
-static inline void atomic_inc(volatile atomic_t *v)
-{
-	unsigned long flags;
-
-	local_irq_save(flags);
-	v->counter += 1;
-	local_irq_restore(flags);
-}
-
-static inline void atomic_dec(volatile atomic_t *v)
-{
-	unsigned long flags;
+        local_irq_save(flags);
+        val = v->counter;
+        v->counter = val += i;
+        local_irq_restore(flags);
 
-	local_irq_save(flags);
-	v->counter -= 1;
-	local_irq_restore(flags);
+        return val;
 }
 
-static inline int atomic_dec_and_test(volatile atomic_t *v)
+static inline int atomic_sub_return(int i, atomic_t *v)
 {
-	unsigned long flags;
-	int val;
+        unsigned long flags;
+        int val;
 
-	local_irq_save(flags);
-	val = v->counter;
-	v->counter = val -= 1;
-	local_irq_restore(flags);
+        local_irq_save(flags);
+        val = v->counter;
+        v->counter = val -= i;
+        local_irq_restore(flags);
 
-	return val == 0;
-}
-
-static inline int atomic_add_negative(int i, volatile atomic_t *v)
-{
-	unsigned long flags;
-	int val;
-
-	local_irq_save(flags);
-	val = v->counter;
-	v->counter = val += i;
-	local_irq_restore(flags);
-
-	return val < 0;
+        return val;
 }
 
 static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr)
 {
-	unsigned long flags;
+        unsigned long flags;
 
-	local_irq_save(flags);
-	*addr &= ~mask;
-	local_irq_restore(flags);
+        local_irq_save(flags);
+        *addr &= ~mask;
+        local_irq_restore(flags);
 }
 
-static inline int atomic_add_return(int i, volatile atomic_t *v)
-{
-	unsigned long flags;
-	int val;
+#define atomic_add(i, v)        (void) atomic_add_return(i, v)
+#define atomic_inc(v)           (void) atomic_add_return(1, v)
+#define atomic_sub(i, v)        (void) atomic_sub_return(i, v)
+#define atomic_dec(v)           (void) atomic_sub_return(1, v)
 
-	local_irq_save(flags);
-	val = v->counter + i;
-	v->counter = val;
-	local_irq_restore(flags);
-
-	return val;
-}
-
-static inline int atomic_sub_return(int i, volatile atomic_t *v)
-{
-	return atomic_add_return(-i, v);
-}
+#define atomic_inc_and_test(v)  (atomic_add_return(1, v) == 0)
+#define atomic_dec_and_test(v)  (atomic_sub_return(1, v) == 0)
+#define atomic_inc_return(v)    (atomic_add_return(1, v))
+#define atomic_dec_return(v)    (atomic_sub_return(1, v))
 
-#define atomic_inc_return(v)  (atomic_add_return(1,v))
-#define atomic_dec_return(v)  (atomic_sub_return(1,v))
+#define atomic_add_negative(i,v) (atomic_add_return(i, v) < 0)
 
-/* Atomic operations are already serializing on ARM */
+/* Atomic operations are already serializing on ARM26 */
 #define smp_mb__before_atomic_dec()	barrier()
 #define smp_mb__after_atomic_dec()	barrier()
 #define smp_mb__before_atomic_inc()	barrier()
diff -Nru a/include/asm-arm26/bitops.h b/include/asm-arm26/bitops.h
--- a/include/asm-arm26/bitops.h	2005-01-10 20:11:22 -08:00
+++ b/include/asm-arm26/bitops.h	2005-01-10 20:11:22 -08:00
@@ -1,15 +1,15 @@
 /*
  * Copyright 1995, Russell King.
- * Various bits and pieces copyrights include:
- *  Linus Torvalds (test_bit).
- * Big endian support: Copyright 2001, Nicolas Pitre
- *  reworked by rmk.
  *
- * bit 0 is the LSB of addr; bit 32 is the LSB of (addr+1).
+ * Based on the arm32 version by RMK (and others). Their copyrights apply to
+ * Those parts.
+ * Modified for arm26 by Ian Molton on 25/11/04
+ *
+ * bit 0 is the LSB of an "unsigned long" quantity.
  *
  * Please note that the code in this file should never be included
  * from user space.  Many of these are not implemented in assembler
- * since they would be too costly.  Also, they require priviledged
+ * since they would be too costly.  Also, they require privileged
  * instructions (which are not available from user mode) to ensure
  * that they are atomic.
  */
@@ -19,6 +19,7 @@
 
 #ifdef __KERNEL__
 
+#include <linux/compiler.h>
 #include <asm/system.h>
 
 #define smp_mb__before_clear_bit()	do { } while (0)
@@ -26,12 +27,10 @@
 
 /*
  * These functions are the basis of our bit ops.
- * First, the atomic bitops.
  *
- * The endian issue for these functions is handled by the macros below.
+ * First, the atomic bitops. These use native endian.
  */
-static inline void
-____atomic_set_bit(unsigned int bit, volatile unsigned long *p)
+static inline void ____atomic_set_bit(unsigned int bit, volatile unsigned long *p)
 {
 	unsigned long flags;
 	unsigned long mask = 1UL << (bit & 31);
@@ -43,8 +42,7 @@
 	local_irq_restore(flags);
 }
 
-static inline void
-____atomic_clear_bit(unsigned int bit, volatile unsigned long *p)
+static inline void ____atomic_clear_bit(unsigned int bit, volatile unsigned long *p)
 {
 	unsigned long flags;
 	unsigned long mask = 1UL << (bit & 31);
@@ -56,8 +54,7 @@
 	local_irq_restore(flags);
 }
 
-static inline void
-____atomic_change_bit(unsigned int bit, volatile unsigned long *p)
+static inline void ____atomic_change_bit(unsigned int bit, volatile unsigned long *p)
 {
 	unsigned long flags;
 	unsigned long mask = 1UL << (bit & 31);
@@ -104,7 +101,7 @@
 }
 
 static inline int
-____atomic_test_and_change_bit_mask(unsigned int bit, volatile unsigned long *p)
+____atomic_test_and_change_bit(unsigned int bit, volatile unsigned long *p)
 {
 	unsigned long flags;
 	unsigned int res;
@@ -158,7 +155,6 @@
 
 	oldval = *p;
 	*p = oldval & ~mask;
-
 	return oldval & mask;
 }
 
@@ -170,30 +166,18 @@
 
 	oldval = *p;
 	*p = oldval ^ mask;
-
 	return oldval & mask;
 }
 
 /*
  * This routine doesn't need to be atomic.
  */
-static inline int __test_bit(int nr, const unsigned long * p)
+static inline int __test_bit(int nr, const volatile unsigned long * p)
 {
-	return p[nr >> 5] & (1UL << (nr & 31));
+	return (p[nr >> 5] >> (nr & 31)) & 1UL;
 }
 
 /*
- *  A note about Endian-ness.
- *  -------------------------
- *
- *          ------------ physical data bus bits -----------
- *          D31 ... D24  D23 ... D16  D15 ... D8  D7 ... D0
- *            byte 3       byte 2       byte 1      byte 0
- *
- * Note that bit 0 is defined to be 32-bit word bit 0, not byte 0 bit 0.
- */
-
-/*
  * Little endian assembly bitops.  nr = 0 -> byte 0 bit 0.
  */
 extern void _set_bit_le(int nr, volatile unsigned long * p);
@@ -204,6 +188,8 @@
 extern int _test_and_change_bit_le(int nr, volatile unsigned long * p);
 extern int _find_first_zero_bit_le(void * p, unsigned size);
 extern int _find_next_zero_bit_le(void * p, int size, int offset);
+extern int _find_first_bit_le(const unsigned long *p, unsigned size);
+extern int _find_next_bit_le(const unsigned long *p, int size, int offset);
 
 /*
  * The __* form of bitops are non-atomic and may be reordered.
@@ -213,11 +199,6 @@
 	 ____atomic_##name(nr, p) :		\
 	 _##name##_le(nr,p))
 
-#define	ATOMIC_BITOP_BE(name,nr,p)		\
-	(__builtin_constant_p(nr) ?		\
-	 ____atomic_##name(nr, p) :		\
-	 _##name##_be(nr,p))
-
 #define NONATOMIC_BITOP(name,nr,p)		\
 	(____nonatomic_##name(nr, p))
 
@@ -233,6 +214,8 @@
 #define test_bit(nr,p)			__test_bit(nr,p)
 #define find_first_zero_bit(p,sz)	_find_first_zero_bit_le(p,sz)
 #define find_next_zero_bit(p,sz,off)	_find_next_zero_bit_le(p,sz,off)
+#define find_first_bit(p,sz)		_find_first_bit_le(p,sz)
+#define find_next_bit(p,sz,off)		_find_next_bit_le(p,sz,off)
 
 #define WORD_BITOFF_TO_LE(x)		((x))
 
@@ -315,15 +298,15 @@
  * These do not need to be atomic.
  */
 #define ext2_set_bit(nr,p)			\
-		__test_and_set_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)p)
-#define ext2_set_bit_atomic(lock,nr,p)		\
-		test_and_set_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p))
+		__test_and_set_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p))
+#define ext2_set_bit_atomic(lock,nr,p)          \
+                test_and_set_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p))
 #define ext2_clear_bit(nr,p)			\
-		__test_and_clear_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)p)
+		__test_and_clear_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p))
 #define ext2_clear_bit_atomic(lock,nr,p)        \
-		test_and_clear_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p))
+                test_and_clear_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p))
 #define ext2_test_bit(nr,p)			\
-		__test_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)p)
+		__test_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p))
 #define ext2_find_first_zero_bit(p,sz)		\
 		_find_first_zero_bit_le(p,sz)
 #define ext2_find_next_zero_bit(p,sz,off)	\
@@ -334,13 +317,13 @@
  * These do not need to be atomic.
  */
 #define minix_set_bit(nr,p)			\
-		__set_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)p)
+		__set_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p))
 #define minix_test_bit(nr,p)			\
-		__test_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)p)
+		__test_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p))
 #define minix_test_and_set_bit(nr,p)		\
-		__test_and_set_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)p)
+		__test_and_set_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p))
 #define minix_test_and_clear_bit(nr,p)		\
-		__test_and_clear_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)p)
+		__test_and_clear_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p))
 #define minix_find_first_zero_bit(p,sz)		\
 		_find_first_zero_bit_le(p,sz)
 
diff -Nru a/include/asm-arm26/calls.h b/include/asm-arm26/calls.h
--- a/include/asm-arm26/calls.h	2005-01-10 20:11:15 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,262 +0,0 @@
-/*
- *  linux/arch/arm26/lib/calls.h
- *
- *  Copyright (C) 2003 Ian Molton
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- *  FIXME
- *  This file is included twice in entry-common.S which may not be necessary
- */
-#ifndef NR_syscalls
-#define NR_syscalls 256
-#else
-
-__syscall_start:
-/* 0 */		.long	sys_ni_syscall
-		.long	sys_exit
-		.long	sys_fork_wrapper
-		.long	sys_read
-		.long	sys_write
-/* 5 */		.long	sys_open
-		.long	sys_close
-		.long	sys_ni_syscall		/* was sys_waitpid */
-		.long	sys_creat
-		.long	sys_link
-/* 10 */	.long	sys_unlink
-		.long	sys_execve_wrapper
-		.long	sys_chdir
-		.long	sys_time		/* used by libc4 */
-		.long	sys_mknod
-/* 15 */	.long	sys_chmod
-		.long	sys_lchown16
-		.long	sys_ni_syscall		/* was sys_break */
-		.long	sys_ni_syscall		/* was sys_stat */
-		.long	sys_lseek
-/* 20 */	.long	sys_getpid
-		.long	sys_mount
-		.long	sys_oldumount		/* used by libc4 */
-		.long	sys_setuid16
-		.long	sys_getuid16
-/* 25 */	.long	sys_stime
-		.long	sys_ptrace
-		.long	sys_alarm		/* used by libc4 */
-		.long	sys_ni_syscall		/* was sys_fstat */
-		.long	sys_pause
-/* 30 */	.long	sys_utime		/* used by libc4 */
-		.long	sys_ni_syscall		/* was sys_stty */
-		.long	sys_ni_syscall		/* was sys_getty */
-		.long	sys_access
-		.long	sys_nice
-/* 35 */	.long	sys_ni_syscall		/* was sys_ftime */
-		.long	sys_sync
-		.long	sys_kill
-		.long	sys_rename
-		.long	sys_mkdir
-/* 40 */	.long	sys_rmdir
-		.long	sys_dup
-		.long	sys_pipe
-		.long	sys_times
-		.long	sys_ni_syscall		/* was sys_prof */
-/* 45 */	.long	sys_brk
-		.long	sys_setgid16
-		.long	sys_getgid16
-		.long	sys_ni_syscall		/* was sys_signal */
-		.long	sys_geteuid16
-/* 50 */	.long	sys_getegid16
-		.long	sys_acct
-		.long	sys_umount
-		.long	sys_ni_syscall		/* was sys_lock */
-		.long	sys_ioctl
-/* 55 */	.long	sys_fcntl
-		.long	sys_ni_syscall		/* was sys_mpx */
-		.long	sys_setpgid
-		.long	sys_ni_syscall		/* was sys_ulimit */
-		.long	sys_ni_syscall		/* was sys_olduname */
-/* 60 */	.long	sys_umask
-		.long	sys_chroot
-		.long	sys_ustat
-		.long	sys_dup2
-		.long	sys_getppid
-/* 65 */	.long	sys_getpgrp
-		.long	sys_setsid
-		.long	sys_sigaction
-		.long	sys_ni_syscall		/* was sys_sgetmask */
-		.long	sys_ni_syscall		/* was sys_ssetmask */
-/* 70 */	.long	sys_setreuid16
-		.long	sys_setregid16
-		.long	sys_sigsuspend_wrapper
-		.long	sys_sigpending
-		.long	sys_sethostname
-/* 75 */	.long	sys_setrlimit
-		.long	sys_old_getrlimit	/* used by libc4 */
-		.long	sys_getrusage
-		.long	sys_gettimeofday
-		.long	sys_settimeofday
-/* 80 */	.long	sys_getgroups16
-		.long	sys_setgroups16
-		.long	old_select		/* used by libc4 */
-		.long	sys_symlink
-		.long	sys_ni_syscall		/* was sys_lstat */
-/* 85 */	.long	sys_readlink
-		.long	sys_uselib
-		.long	sys_swapon
-		.long	sys_reboot
-		.long	old_readdir		/* used by libc4 */
-/* 90 */	.long	old_mmap		/* used by libc4 */
-		.long	sys_munmap
-		.long	sys_truncate
-		.long	sys_ftruncate
-		.long	sys_fchmod
-/* 95 */	.long	sys_fchown16
-		.long	sys_getpriority
-		.long	sys_setpriority
-		.long	sys_ni_syscall		/* was sys_profil */
-		.long	sys_statfs
-/* 100 */	.long	sys_fstatfs
-		.long	sys_ni_syscall
-		.long	sys_socketcall
-		.long	sys_syslog
-		.long	sys_setitimer
-/* 105 */	.long	sys_getitimer
-		.long	sys_newstat
-		.long	sys_newlstat
-		.long	sys_newfstat
-		.long	sys_ni_syscall		/* was sys_uname */
-/* 110 */	.long	sys_ni_syscall		/* was sys_iopl */
-		.long	sys_vhangup
-		.long	sys_ni_syscall
-		.long	sys_syscall		/* call a syscall */
-		.long	sys_wait4
-/* 115 */	.long	sys_swapoff
-		.long	sys_sysinfo
-		.long	sys_ipc
-		.long	sys_fsync
-		.long	sys_sigreturn_wrapper
-/* 120 */	.long	sys_clone_wapper
-		.long	sys_setdomainname
-		.long	sys_newuname
-		.long	sys_ni_syscall
-		.long	sys_adjtimex
-/* 125 */	.long	sys_mprotect
-		.long	sys_sigprocmask
-		.long	sys_ni_syscall  /* WAS: sys_create_module */
-		.long	sys_init_module
-		.long	sys_delete_module
-/* 130 */	.long	sys_ni_syscall  /* WAS: sys_get_kernel_syms */
-		.long	sys_quotactl
-		.long	sys_getpgid
-		.long	sys_fchdir
-		.long	sys_bdflush
-/* 135 */	.long	sys_sysfs
-		.long	sys_personality
-		.long	sys_ni_syscall		/* .long	_sys_afs_syscall */
-		.long	sys_setfsuid16
-		.long	sys_setfsgid16
-/* 140 */	.long	sys_llseek
-		.long	sys_getdents
-		.long	sys_select
-		.long	sys_flock
-		.long	sys_msync
-/* 145 */	.long	sys_readv
-		.long	sys_writev
-		.long	sys_getsid
-		.long	sys_fdatasync
-		.long	sys_sysctl
-/* 150 */	.long	sys_mlock
-		.long	sys_munlock
-		.long	sys_mlockall
-		.long	sys_munlockall
-		.long	sys_sched_setparam
-/* 155 */	.long	sys_sched_getparam
-		.long	sys_sched_setscheduler
-		.long	sys_sched_getscheduler
-		.long	sys_sched_yield
-		.long	sys_sched_get_priority_max
-/* 160 */	.long	sys_sched_get_priority_min
-		.long	sys_sched_rr_get_interval
-		.long	sys_nanosleep
-		.long	sys_arm_mremap
-		.long	sys_setresuid16
-/* 165 */	.long	sys_getresuid16
-		.long	sys_ni_syscall
-		.long	sys_ni_syscall /* WAS: sys_query_module */
-		.long	sys_poll
-		.long	sys_nfsservctl
-/* 170 */	.long	sys_setresgid16
-		.long	sys_getresgid16
-		.long	sys_prctl
-		.long	sys_rt_sigreturn_wrapper
-		.long	sys_rt_sigaction
-/* 175 */	.long	sys_rt_sigprocmask
-		.long	sys_rt_sigpending
-		.long	sys_rt_sigtimedwait
-		.long	sys_rt_sigqueueinfo
-		.long	sys_rt_sigsuspend_wrapper
-/* 180 */	.long	sys_pread64
-		.long	sys_pwrite64
-		.long	sys_chown16
-		.long	sys_getcwd
-		.long	sys_capget
-/* 185 */	.long	sys_capset
-		.long	sys_sigaltstack_wrapper
-		.long	sys_sendfile
-		.long	sys_ni_syscall
-		.long	sys_ni_syscall
-/* 190 */	.long	sys_vfork_wrapper
-		.long	sys_getrlimit
-		.long	sys_mmap2
-		.long	sys_truncate64
-		.long	sys_ftruncate64
-/* 195 */	.long	sys_stat64
-		.long	sys_lstat64
-		.long	sys_fstat64
-		.long	sys_lchown
-		.long	sys_getuid
-/* 200 */	.long	sys_getgid
-		.long	sys_geteuid
-		.long	sys_getegid
-		.long	sys_setreuid
-		.long	sys_setregid
-/* 205 */	.long	sys_getgroups
-		.long	sys_setgroups
-		.long	sys_fchown
-		.long	sys_setresuid
-		.long	sys_getresuid
-/* 210 */	.long	sys_setresgid
-		.long	sys_getresgid
-		.long	sys_chown
-		.long	sys_setuid
-		.long	sys_setgid
-/* 215 */	.long	sys_setfsuid
-		.long	sys_setfsgid
-		.long	sys_getdents64
-		.long	sys_pivot_root
-		.long	sys_mincore
-/* 220 */	.long	sys_madvise
-		.long	sys_fcntl64
-		.long	sys_ni_syscall /* TUX */
-		.long	sys_ni_syscall /* WAS: sys_security */
-		.long	sys_gettid
-/* 225 */	.long	sys_readahead
-		.long	sys_setxattr
-		.long	sys_lsetxattr
-		.long	sys_fsetxattr
-		.long	sys_getxattr
-/* 230 */	.long	sys_lgetxattr
-		.long	sys_fgetxattr
-		.long	sys_listxattr
-		.long	sys_llistxattr
-		.long	sys_flistxattr
-/* 235 */	.long	sys_removexattr
-		.long	sys_lremovexattr
-		.long	sys_fremovexattr
-		.long	sys_tkill
-__syscall_end:
-
-		.rept	NR_syscalls - (__syscall_end - __syscall_start) / 4
-			.long	sys_ni_syscall
-		.endr
-#endif
diff -Nru a/include/asm-arm26/checksum.h b/include/asm-arm26/checksum.h
--- a/include/asm-arm26/checksum.h	2005-01-10 20:11:24 -08:00
+++ b/include/asm-arm26/checksum.h	2005-01-10 20:11:24 -08:00
@@ -9,6 +9,8 @@
 #ifndef __ASM_ARM_CHECKSUM_H
 #define __ASM_ARM_CHECKSUM_H
 
+#include <linux/in6.h>
+
 /*
  * computes the checksum of a memory block at buff, length len,
  * and adds in "sum" (32-bit)
@@ -35,13 +37,13 @@
 csum_partial_copy_nocheck(const char *src, char *dst, int len, int sum);
 
 unsigned int
-csum_partial_copy_from_user(const char *src, char *dst, int len, int sum, int *err_ptr);
+csum_partial_copy_from_user(const char __user *src, char *dst, int len, int sum, int *err_ptr);
 
 /*
- * These are the old (and unsafe) way of doing checksums, a warning message will be
- * printed if they are used and an exception occurs.
+ * This is the old (and unsafe) way of doing checksums, a warning message will
+ * be printed if it is used and an exception occurs.
  *
- * these functions should go away after some time.
+ * this functions should go away after some time.
  */
 #define csum_partial_copy(src,dst,len,sum)	csum_partial_copy_nocheck(src,dst,len,sum)
 
@@ -105,7 +107,7 @@
 	adcs	%0, %0, %5					\n\
 	adc	%0, %0, #0"
 	: "=&r"(sum)
-	: "r" (sum), "r" (daddr), "r" (saddr), "r" (ntohs(len) << 16), "Ir" (proto << 8)
+	: "r" (sum), "r" (daddr), "r" (saddr), "r" (ntohs(len)), "Ir" (ntohs(proto))
 	: "cc");
 	return sum;
 }	
@@ -127,7 +129,7 @@
 	addcs	%0, %0, #0x10000				\n\
 	mvn	%0, %0"
 	: "=&r"(sum)
-	: "r" (sum), "r" (daddr), "r" (saddr), "r" (ntohs(len)), "Ir" (proto << 8)
+	: "r" (sum), "r" (daddr), "r" (saddr), "r" (ntohs(len)), "Ir" (ntohs(proto))
 	: "cc");
 	return sum >> 16;
 }
diff -Nru a/include/asm-arm26/dma-mapping.h b/include/asm-arm26/dma-mapping.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-arm26/dma-mapping.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,2 @@
+#include <asm-generic/dma-mapping-broken.h>
+
diff -Nru a/include/asm-arm26/hardirq.h b/include/asm-arm26/hardirq.h
--- a/include/asm-arm26/hardirq.h	2005-01-10 20:11:18 -08:00
+++ b/include/asm-arm26/hardirq.h	2005-01-10 20:11:18 -08:00
@@ -7,10 +7,6 @@
 
 typedef struct {
 	unsigned int __softirq_pending;
-	unsigned int __local_irq_count;
-	unsigned int __local_bh_count;
-	unsigned int __syscall_count;
-	struct task_struct * __ksoftirqd_task; /* waitqueue is too large */
 } ____cacheline_aligned irq_cpustat_t;
 
 #include <linux/irq_cpustat.h>	/* Standard mappings for irq_cpustat_t above */
@@ -29,14 +25,17 @@
 #define irq_enter()		(preempt_count() += HARDIRQ_OFFSET)
 
 #ifndef CONFIG_SMP
-#define irq_exit()							\
-	do {								\
-		preempt_count() -= HARDIRQ_OFFSET;			\
-		if (!in_interrupt() && softirq_pending(smp_processor_id())) \
-			__asm__("bl%? __do_softirq": : : "lr");/* out of line */\
-		preempt_enable_no_resched();				\
-	} while (0)
 
+extern asmlinkage void __do_softirq(void);
+
+#define irq_exit()                                                      \
+        do {                                                            \
+                preempt_count() -= IRQ_EXIT_OFFSET;                     \
+                if (!in_interrupt() && local_softirq_pending())         \
+                        __do_softirq();                                 \
+                preempt_enable_no_resched();                            \
+        } while (0)
 #endif
+
 
 #endif /* __ASM_HARDIRQ_H */
diff -Nru a/include/asm-arm26/hardware.h b/include/asm-arm26/hardware.h
--- a/include/asm-arm26/hardware.h	2005-01-10 20:11:17 -08:00
+++ b/include/asm-arm26/hardware.h	2005-01-10 20:11:17 -08:00
@@ -90,6 +90,7 @@
 #define IOEB_PSCLR		(IOEB_BASE + 0x58)
 #define IOEB_MONTYPE		(IOEB_BASE + 0x70)
 
+//FIXME - These adresses are weird - ISTR some weirdo address shifting stuff was going on here...
 #define IO_EC_IOC_BASE		0x80090000
 #define IO_EC_MEMC_BASE		0x80000000
 
diff -Nru a/include/asm-arm26/ian_char.h b/include/asm-arm26/ian_char.h
--- a/include/asm-arm26/ian_char.h	2005-01-10 20:11:22 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,79 +0,0 @@
-#ifndef _ian_char_h_included
-#define _ian_char_h_included
-static int charset[256*8] = {0x777700, 0x7700770, 0x7700770, 0x7777770, 0x7700770, 0x7700770, 0x7700770, 0x0, 0x777770, 0x7700770, 0x7700770, 0x777770, 0x7700770, 0x7700770, 0x777770, 0x0, 0x777700, 0x7700770, 0x770, 0x770, 0x770, 0x7700770, 0x777700, 0x0, 0x77770, 0x770770, 0x7700770, 0x7700770, 0x7700770, 0x770770, 0x77770, 0x0, 0x7777770, 0x770, 0x770, 0x777770, 0x770, 0x770, 0x7777770, 0x0, 0x7777770, 0x770, 0x770, 0x777770, 0x770, 0x770, 0x770, 0x0, 0x777700, 0x7700770, 0x770, 0x7770770, 0x7700770, 0x7700770, 0x777700, 0x0, 0x7700770, 0x7700770, 0x7700770, 0x7777770, 0x7700770, 0x7700770, 0x7700770, 0x0, 0x7777770, 0x77000, 0x77000, 0x77000, 0x77000, 0x77000, 0x7777770, 0x0, 0x7777700, 0x770000, 0x770000, 0x770000, 0x770000, 0x770770, 0x77700, 0x0, 0x7700770, 0x770770, 0x77770, 0x7770, 0x77770, 0x770770, 0x7700770, 0x0, 0x770, 0x770, 0x770, 0x770, 0x770, 0x770, 0x7777770, 0x0, 0x77000770, 0x77707770, 0x77777770, 0x77070770, 0x77070770, 0x77000770, 0x77000770, 0x0, 0x7700770, 0x7700770, 0x7707770, 0x7777770, 0x7770770, 0x7700770, 0x7700770, 0x0, 0x777700, 0x7700770, 0x7700770, 0x7700770, 0x7700770, 0x7700770, 0x777700, 0x0, 0x777770, 0x7700770, 0x7700770, 0x777770, 0x770, 0x770, 0x770, 0x0, 0x777700, 0x7700770, 0x7700770, 0x7700770, 0x7070770, 0x770770, 0x7707700, 0x0, 0x777770, 0x7700770, 0x7700770, 0x777770, 0x770770, 0x7700770, 0x7700770, 0x0, 0x777700, 0x7700770, 0x770, 0x777700, 0x7700000, 0x7700770, 0x777700, 0x0, 0x7777770, 0x77000, 0x77000, 0x77000, 0x77000, 0x77000, 0x77000, 0x0, 0x7700770, 0x7700770, 0x7700770, 0x7700770, 0x7700770, 0x7700770, 0x777700, 0x0, 0x7700770, 0x7700770, 0x7700770, 0x7700770, 0x7700770, 0x777700, 0x77000, 0x0, 0x77000770, 0x77000770, 0x77070770, 0x77070770, 0x77777770, 0x77707770, 0x77000770, 0x0, 0x7700770, 0x7700770, 0x777700, 0x77000, 0x777700, 0x7700770, 0x7700770, 0x0, 0x7700770, 0x7700770, 0x7700770, 0x777700, 0x77000, 0x77000, 0x77000, 0x0, 0x7777770, 0x7700000, 0x770000, 0x77000, 0x7700, 0x770, 0x7777770, 0x0, 0x777770, 0x770, 0x770, 0x770, 0x770, 0x770, 0x777770, 0x0, 0x0, 0x770, 0x7700, 0x77000, 0x770000, 0x7700000, 0x0, 0x0, 0x7777700, 0x7700000, 0x7700000, 0x7700000, 0x7700000, 0x7700000, 0x7777700, 0x0, 0x777700, 0x7700770, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x77777777, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x77000, 0x77000, 0x77000, 0x77000, 0x77000, 0x0, 0x77000, 0x0, 0x770770, 0x770770, 0x770770, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7707700, 0x7707700, 0x77777770, 0x7707700, 0x77777770, 0x7707700, 0x7707700, 0x0, 0x770000, 0x77777700, 0x70770, 0x7777700, 0x77070000, 0x7777770, 0x77000, 0x0, 0x770, 0x7700770, 0x770000, 0x77000, 0x7700, 0x7700770, 0x7700000, 0x0, 0x77700, 0x770770, 0x770770, 0x77700, 0x70770770, 0x7700770, 0x77077700, 0x0, 0x77000, 0x77000, 0x77000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x770000, 0x77000, 0x7700, 0x7700, 0x7700, 0x77000, 0x770000, 0x0, 0x7700, 0x77000, 0x770000, 0x770000, 0x770000, 0x77000, 0x7700, 0x0, 0x0, 0x77000, 0x7777770, 0x777700, 0x7777770, 0x77000, 0x0, 0x0, 0x0, 0x77000, 0x77000, 0x7777770, 0x77000, 0x77000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x77000, 0x77000, 0x7700, 0x0, 0x0, 0x0, 0x7777770, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x77000, 0x77000, 0x0, 0x0, 0x7700000, 0x770000, 0x77000, 0x7700, 0x770, 0x0, 0x0, 0x777700, 0x7700770, 0x7770770, 0x7777770, 0x7707770, 0x7700770, 0x777700, 0x0, 0x77000, 0x77700, 0x77000, 0x77000, 0x77000, 0x77000, 0x7777770, 0x0, 0x777700, 0x7700770, 0x7700000, 0x770000, 0x77000, 0x7700, 0x7777770, 0x0, 0x777700, 0x7700770, 0x7700000, 0x777000, 0x7700000, 0x7700770, 0x777700, 0x0, 0x770000, 0x777000, 0x777700, 0x770770, 0x7777770, 0x770000, 0x770000, 0x0, 0x7777770, 0x770, 0x777770, 0x7700000, 0x7700000, 0x7700770, 0x777700, 0x0, 0x777000, 0x7700, 0x770, 0x777770, 0x7700770, 0x7700770, 0x777700, 0x0, 0x7777770, 0x7700000, 0x770000, 0x77000, 0x7700, 0x7700, 0x7700, 0x0, 0x777700, 0x7700770, 0x7700770, 0x777700, 0x7700770, 0x7700770, 0x777700, 0x0, 0x777700, 0x7700770, 0x7700770, 0x7777700, 0x7700000, 0x770000, 0x77700, 0x0, 0x0, 0x0, 0x77000, 0x77000, 0x0, 0x77000, 0x77000, 0x0, 0x0, 0x0, 0x77000, 0x77000, 0x0, 0x77000, 0x77000, 0x7700, 0x770000, 0x77000, 0x7700, 0x770, 0x7700, 0x77000, 0x770000, 0x0, 0x0, 0x0, 0x7777770, 0x0, 0x7777770, 0x0, 0x0, 0x0, 0x7700, 0x77000, 0x770000, 0x7700000, 0x770000, 0x77000, 0x7700, 0x0, 0x777700, 0x7700770, 0x770000, 0x77000, 0x77000, 0x0, 0x77000, 0x0, 0x777700, 0x7700770, 0x7770770, 0x7070770, 0x7770770, 0x770, 0x777700, 0x0, 0x777700, 0x7700770, 0x7700770, 0x7777770, 0x7700770, 0x7700770, 0x7700770, 0x0, 0x777770, 0x7700770, 0x7700770, 0x777770, 0x7700770, 0x7700770, 0x777770, 0x0, 0x777700, 0x7700770, 0x770, 0x770, 0x770, 0x7700770, 0x777700, 0x0, 0x77770, 0x770770, 0x7700770, 0x7700770, 0x7700770, 0x770770, 0x77770, 0x0, 0x7777770, 0x770, 0x770, 0x777770, 0x770, 0x770, 0x7777770, 0x0, 0x7777770, 0x770, 0x770, 0x777770, 0x770, 0x770, 0x770, 0x0, 0x777700, 0x7700770, 0x770, 0x7770770, 0x7700770, 0x7700770, 0x777700, 0x0, 0x7700770, 0x7700770, 0x7700770, 0x7777770, 0x7700770, 0x7700770, 0x7700770, 0x0, 0x7777770, 0x77000, 0x77000, 0x77000, 0x77000, 0x77000, 0x7777770, 0x0, 0x7777700, 0x770000, 0x770000, 0x770000, 0x770000, 0x770770, 0x77700, 0x0, 0x7700770, 0x770770, 0x77770, 0x7770, 0x77770, 0x770770, 0x7700770, 0x0, 0x770, 0x770, 0x770, 0x770, 0x770, 0x770, 0x7777770, 0x0, 0x77000770, 0x77707770, 0x77777770, 0x77070770, 0x77070770, 0x77000770, 0x77000770, 0x0, 0x7700770, 0x7700770, 0x7707770, 0x7777770, 0x7770770, 0x7700770, 0x7700770, 0x0, 0x777700, 0x7700770, 0x7700770, 0x7700770, 0x7700770, 0x7700770, 0x777700, 0x0, 0x777770, 0x7700770, 0x7700770, 0x777770, 0x770, 0x770, 0x770, 0x0, 0x777700, 0x7700770, 0x7700770, 0x7700770, 0x7070770, 0x770770, 0x7707700, 0x0, 0x777770, 0x7700770, 0x7700770, 0x777770, 0x770770, 0x7700770, 0x7700770, 0x0, 0x777700, 0x7700770, 0x770, 0x777700, 0x7700000, 0x7700770, 0x777700, 0x0, 0x7777770, 0x77000, 0x77000, 0x77000, 0x77000, 0x77000, 0x77000, 0x0, 0x7700770, 0x7700770, 0x7700770, 0x7700770, 0x7700770, 0x7700770, 0x777700, 0x0, 0x7700770, 0x7700770, 0x7700770, 0x7700770, 0x7700770, 0x777700, 0x77000, 0x0, 0x77000770, 0x77000770, 0x77070770, 0x77070770, 0x77777770, 0x77707770, 0x77000770, 0x0, 0x7700770, 0x7700770, 0x777700, 0x77000, 0x777700, 0x7700770, 0x7700770, 0x0, 0x7700770, 0x7700770, 0x7700770, 0x777700, 0x77000, 0x77000, 0x77000, 0x0, 0x7777770, 0x7700000, 0x770000, 0x77000, 0x7700, 0x770, 0x7777770, 0x0, 0x777770, 0x770, 0x770, 0x770, 0x770, 0x770, 0x777770, 0x0, 0x0, 0x770, 0x7700, 0x77000, 0x770000, 0x7700000, 0x0, 0x0, 0x7777700, 0x7700000, 0x7700000, 0x7700000, 0x7700000, 0x7700000, 0x7777700, 0x0, 0x777700, 0x7700770, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x77777777, 0x7700, 0x77000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x777700, 0x7700000, 0x7777700, 0x7700770, 0x7777700, 0x0, 0x770, 0x770, 0x777770, 0x7700770, 0x7700770, 0x7700770, 0x777770, 0x0, 0x0, 0x0, 0x777700, 0x7700770, 0x770, 0x7700770, 0x777700, 0x0, 0x7700000, 0x7700000, 0x7777700, 0x7700770, 0x7700770, 0x7700770, 0x7777700, 0x0, 0x0, 0x0, 0x777700, 0x7700770, 0x7777770, 0x770, 0x777700, 0x0, 0x777000, 0x7700, 0x7700, 0x777770, 0x7700, 0x7700, 0x7700, 0x0, 0x0, 0x0, 0x7777700, 0x7700770, 0x7700770, 0x7777700, 0x7700000, 0x777700, 0x770, 0x770, 0x777770, 0x7700770, 0x7700770, 0x7700770, 0x7700770, 0x0, 0x77000, 0x0, 0x77700, 0x77000, 0x77000, 0x77000, 0x777700, 0x0, 0x77000, 0x0, 0x77700, 0x77000, 0x77000, 0x77000, 0x77000, 0x7770, 0x770, 0x770, 0x7700770, 0x770770, 0x77770, 0x770770, 0x7700770, 0x0, 0x77700, 0x77000, 0x77000, 0x77000, 0x77000, 0x77000, 0x777700, 0x0, 0x0, 0x0, 0x7707700, 0x77777770, 0x77070770, 0x77070770, 0x77000770, 0x0, 0x0, 0x0, 0x777770, 0x7700770, 0x7700770, 0x7700770, 0x7700770, 0x0, 0x0, 0x0, 0x777700, 0x7700770, 0x7700770, 0x7700770, 0x777700, 0x0, 0x0, 0x0, 0x777770, 0x7700770, 0x7700770, 0x777770, 0x770, 0x770, 0x0, 0x0, 0x7777700, 0x7700770, 0x7700770, 0x7777700, 0x7700000, 0x77700000, 0x0, 0x0, 0x770770, 0x7707770, 0x770, 0x770, 0x770, 0x0, 0x0, 0x0, 0x7777700, 0x770, 0x777700, 0x7700000, 0x777770, 0x0, 0x7700, 0x7700, 0x777770, 0x7700, 0x7700, 0x7700, 0x777000, 0x0, 0x0, 0x0, 0x7700770, 0x7700770, 0x7700770, 0x7700770, 0x7777700, 0x0, 0x0, 0x0, 0x7700770, 0x7700770, 0x7700770, 0x777700, 0x77000, 0x0, 0x0, 0x0, 0x77000770, 0x77070770, 0x77070770, 0x77777770, 0x7707700, 0x0, 0x0, 0x0, 0x7700770, 0x777700, 0x77000, 0x777700, 0x7700770, 0x0, 0x0, 0x0, 0x7700770, 0x7700770, 0x7700770, 0x7777700, 0x7700000, 0x777700, 0x0, 0x0, 0x7777770, 0x770000, 0x77000, 0x7700, 0x7777770, 0x0, 0x770000, 0x77000, 0x77000, 0x7770, 0x77000, 0x77000, 0x770000, 0x0, 0x77000, 0x77000, 0x77000, 0x77000, 0x77000, 0x77000, 0x77000, 0x0, 0x7700, 0x77000, 0x77000, 0x7770000, 0x77000, 0x77000, 0x7700, 0x0, 0x70007700, 0x77070770, 0x7700070, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x77000000, 0x77000000, 0x7700000, 0x7700000, 0x7707770, 0x777000, 0x770000, 0x0, 0x777000, 0x77000770, 0x77070770, 0x77070770, 0x77777770, 0x77707770, 0x77000770, 0x0, 0x777000, 0x7707700, 0x0, 0x77070770, 0x77070770, 0x77777770, 0x7707700, 0x0, 0x7777777, 0x7007007, 0x7007007, 0x7007777, 0x7000007, 0x7000007, 0x7777777, 0x0, 0x7700770, 0x70077007, 0x70000007, 0x7000070, 0x70000007, 0x70077007, 0x7700770, 0x0, 0x77000, 0x7700770, 0x7000070, 0x7700770, 0x777700, 0x77000, 0x77000, 0x0, 0x77000, 0x7700770, 0x0, 0x7700770, 0x7700770, 0x7777700, 0x7700000, 0x777700, 0x77700000, 0x70000000, 0x7000000, 0x700770, 0x707007, 0x770, 0x7007, 0x770, 0x77000, 0x70700, 0x77770070, 0x70000007, 0x77770070, 0x70700, 0x77000, 0x0, 0x77000, 0x707000, 0x7007777, 0x70000007, 0x7007777, 0x707000, 0x77000, 0x0, 0x777700, 0x700700, 0x700700, 0x77700777, 0x7000070, 0x700700, 0x77000, 0x0, 0x77000, 0x700700, 0x7000070, 0x77700777, 0x700700, 0x700700, 0x777700, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x77077077, 0x77077077, 0x0, 0x70007777, 0x77077070, 0x70707070, 0x70007070, 0x0, 0x0, 0x0, 0x0, 0x77, 0x770077, 0x77000, 0x7700, 0x770, 0x77077077, 0x77077000, 0x0, 0x0, 0x0, 0x777700, 0x7777770, 0x7777770, 0x777700, 0x0, 0x0, 0x770000, 0x77000, 0x77000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x770000, 0x770000, 0x77000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x770000, 0x77000, 0x7700, 0x7700, 0x77000, 0x770000, 0x0, 0x0, 0x7700, 0x77000, 0x770000, 0x770000, 0x77000, 0x7700, 0x0, 0x77077000, 0x7707700, 0x7707700, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7707700, 0x7707700, 0x770770, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7707700, 0x7707700, 0x770770, 0x0, 0x0, 0x0, 0x777700, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x77777777, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7777770, 0x0, 0x0, 0x0, 0x0, 0x77707770, 0x770077, 0x770077, 0x77770077, 0x770077, 0x770077, 0x77707770, 0x0, 0x0, 0x0, 0x7770770, 0x77077077, 0x77777077, 0x77077, 0x7770770, 0x0, 0x77000, 0x77000, 0x7777770, 0x77000, 0x77000, 0x77000, 0x77000, 0x77000, 0x77000, 0x77000, 0x7777770, 0x77000, 0x7777770, 0x77000, 0x77000, 0x77000, 0x777700, 0x7700770, 0x770, 0x7707777, 0x7700770, 0x7700770, 0x7700770, 0x0, 0x7777700, 0x7700770, 0x7700770, 0x7707777, 0x7700770, 0x7700770, 0x7700770, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x77000, 0x0, 0x77000, 0x77000, 0x77000, 0x77000, 0x77000, 0x0, 0x70000, 0x7777700, 0x77070770, 0x70770, 0x77070770, 0x7777700, 0x70000, 0x0, 0x777000, 0x7707700, 0x7700, 0x777770, 0x7700, 0x7700, 0x7777770, 0x0, 0x0, 0x7700770, 0x777700, 0x7700770, 0x7700770, 0x777700, 0x7700770, 0x0, 0x7700770, 0x777700, 0x77000, 0x77000, 0x7777770, 0x77000, 0x77000, 0x0, 0x77000, 0x77000, 0x77000, 0x0, 0x77000, 0x77000, 0x77000, 0x0, 0x777700, 0x770, 0x777700, 0x7700770, 0x777700, 0x7700000, 0x777700, 0x0, 0x7700770, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x777700, 0x7000070, 0x70077007, 0x70000707, 0x70000707, 0x70077007, 0x7000070, 0x777700, 0x777000, 0x7700000, 0x7777000, 0x7707700, 0x7777000, 0x0, 0x7777700, 0x0, 0x0, 0x77007700, 0x7700770, 0x770077, 0x770077, 0x7700770, 0x77007700, 0x0, 0x7777770, 0x7700000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7777770, 0x0, 0x0, 0x0, 0x0, 0x777700, 0x7000070, 0x70077707, 0x70700707, 0x70077707, 0x70700707, 0x7000070, 0x777700, 0x7777770, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x777700, 0x7700770, 0x777700, 0x0, 0x0, 0x0, 0x0, 0x0, 0x77000, 0x77000, 0x7777770, 0x77000, 0x77000, 0x0, 0x7777770, 0x0, 0x77700, 0x700000, 0x77000, 0x700, 0x777700, 0x0, 0x0, 0x0, 0x77700, 0x700000, 0x77000, 0x700000, 0x77700, 0x0, 0x0, 0x0, 0x770000, 0x77000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x77007700, 0x77007700, 0x77007700, 0x77007700, 0x7777700, 0x770, 0x77000000, 0x7777700, 0x7707770, 0x7707770, 0x7707700, 0x7707700, 0x7777700, 0x0, 0x0, 0x0, 0x0, 0x77000, 0x77000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x77000, 0x7700, 0x7000, 0x7700, 0x7000, 0x7000, 0x77700, 0x0, 0x0, 0x0, 0x777000, 0x7707700, 0x7707700, 0x7707700, 0x777000, 0x0, 0x7777700, 0x0, 0x0, 0x770077, 0x7700770, 0x77007700, 0x77007700, 0x7700770, 0x770077, 0x0, 0x70, 0x77, 0x70, 0x70070, 0x70070, 0x7070000, 0x77770000, 0x7000000, 0x70, 0x77, 0x70, 0x77770070, 0x70000070, 0x77770000, 0x70000, 0x77770000, 0x777, 0x700, 0x777, 0x70700, 0x70777, 0x7070000, 0x77770000, 0x7000000, 0x77000, 0x0, 0x77000, 0x77000, 0x7700, 0x7700770, 0x777700, 0x0, 0x7700, 0x77000, 0x0, 0x777700, 0x7700770, 0x7777770, 0x7700770, 0x0, 0x770000, 0x77000, 0x0, 0x777700, 0x7700770, 0x7777770, 0x7700770, 0x0, 0x77000, 0x7700770, 0x0, 0x777700, 0x7700770, 0x7777770, 0x7700770, 0x0, 0x7707700, 0x770770, 0x0, 0x777700, 0x7700770, 0x7777770, 0x7700770, 0x0, 0x7700770, 0x7700770, 0x0, 0x777700, 0x7700770, 0x7777770, 0x7700770, 0x0, 0x777700, 0x7700770, 0x777700, 0x777700, 0x7700770, 0x7777770, 0x7700770, 0x0, 0x77777700, 0x7700770, 0x7700770, 0x77777770, 0x7700770, 0x7700770, 0x77700770, 0x0, 0x777700, 0x7700770, 0x770, 0x770, 0x7700770, 0x777700, 0x7700, 0x770, 0x7700, 0x77000, 0x7777770, 0x770, 0x777770, 0x770, 0x7777770, 0x0, 0x770000, 0x77000, 0x7777770, 0x770, 0x777770, 0x770, 0x7777770, 0x0, 0x777700, 0x7700770, 0x7777770, 0x770, 0x777770, 0x770, 0x7777770, 0x0, 0x7700770, 0x0, 0x7777770, 0x770, 0x777770, 0x770, 0x7777770, 0x0, 0x7700, 0x77000, 0x0, 0x7777770, 0x77000, 0x77000, 0x7777770, 0x0, 0x770000, 0x77000, 0x0, 0x7777770, 0x77000, 0x77000, 0x7777770, 0x0, 0x777700, 0x7700770, 0x0, 0x7777770, 0x77000, 0x77000, 0x7777770, 0x0, 0x7700770, 0x7700770, 0x0, 0x7777770, 0x77000, 0x77000, 0x7777770, 0x0, 0x77770, 0x770770, 0x7700770, 0x7707777, 0x7700770, 0x770770, 0x77770, 0x0, 0x7707700, 0x770770, 0x0, 0x7700770, 0x7707770, 0x7770770, 0x7700770, 0x0, 0x7700, 0x77000, 0x777700, 0x7700770, 0x7700770, 0x7700770, 0x777700, 0x0, 0x770000, 0x77000, 0x777700, 0x7700770, 0x7700770, 0x7700770, 0x777700, 0x0, 0x777700, 0x7700770, 0x777700, 0x7700770, 0x7700770, 0x7700770, 0x777700, 0x0, 0x7707700, 0x770770, 0x777700, 0x7700770, 0x7700770, 0x7700770, 0x777700, 0x0, 0x7700770, 0x0, 0x777700, 0x7700770, 0x7700770, 0x7700770, 0x777700, 0x0, 0x0, 0x77000770, 0x7707700, 0x777000, 0x777000, 0x7707700, 0x77000770, 0x0, 0x70777700, 0x7700770, 0x7770770, 0x7777770, 0x7707770, 0x7700770, 0x777707, 0x0, 0x7700, 0x77000, 0x7700770, 0x7700770, 0x7700770, 0x7700770, 0x777700, 0x0, 0x770000, 0x77000, 0x7700770, 0x7700770, 0x7700770, 0x7700770, 0x777700, 0x0, 0x777700, 0x7700770, 0x0, 0x7700770, 0x7700770, 0x7700770, 0x777700, 0x0, 0x7700770, 0x0, 0x7700770, 0x7700770, 0x7700770, 0x7700770, 0x777700, 0x0, 0x770000, 0x77000, 0x7700770, 0x7700770, 0x777700, 0x77000, 0x77000, 0x0, 0x7777, 0x770, 0x777770, 0x7700770, 0x777770, 0x770, 0x7777, 0x0, 0x777700, 0x7700770, 0x7700770, 0x770770, 0x7700770, 0x7700770, 0x770770, 0x77, 0x7700, 0x77000, 0x777700, 0x7700000, 0x7777700, 0x7700770, 0x7777700, 0x0, 0x770000, 0x77000, 0x777700, 0x7700000, 0x7777700, 0x7700770, 0x7777700, 0x0, 0x77000, 0x7700770, 0x777700, 0x7700000, 0x7777700, 0x7700770, 0x7777700, 0x0, 0x7707700, 0x770770, 0x777700, 0x7700000, 0x7777700, 0x7700770, 0x7777700, 0x0, 0x7700770, 0x0, 0x777700, 0x7700000, 0x7777700, 0x7700770, 0x7777700, 0x0, 0x777700, 0x7700770, 0x777700, 0x7700000, 0x7777700, 0x7700770, 0x7777700, 0x0, 0x0, 0x0, 0x77777700, 0x70770000, 0x77777700, 0x770770, 0x77777700, 0x0, 0x0, 0x0, 0x777700, 0x7700770, 0x770, 0x7700770, 0x777700, 0x770, 0x7700, 0x77000, 0x777700, 0x7700770, 0x7777770, 0x770, 0x777700, 0x0, 0x770000, 0x77000, 0x777700, 0x7700770, 0x7777770, 0x770, 0x777700, 0x0, 0x777700, 0x7700770, 0x777700, 0x7700770, 0x7777770, 0x770, 0x777700, 0x0, 0x7700770, 0x0, 0x777700, 0x7700770, 0x7777770, 0x770, 0x777700, 0x0, 0x7700, 0x77000, 0x0, 0x77700, 0x77000, 0x77000, 0x777700, 0x0, 0x770000, 0x77000, 0x0, 0x77700, 0x77000, 0x77000, 0x777700, 0x0, 0x777700, 0x7700770, 0x0, 0x77700, 0x77000, 0x77000, 0x777700, 0x0, 0x7700770, 0x0, 0x0, 0x77700, 0x77000, 0x77000, 0x777700, 0x0, 0x77000, 0x7777700, 0x770000, 0x7700000, 0x7777700, 0x7700770, 0x7777700, 0x0, 0x7707700, 0x770770, 0x0, 0x777770, 0x7700770, 0x7700770, 0x7700770, 0x0, 0x7700, 0x77000, 0x0, 0x777700, 0x7700770, 0x7700770, 0x777700, 0x0, 0x770000, 0x77000, 0x0, 0x777700, 0x7700770, 0x7700770, 0x777700, 0x0, 0x777700, 0x7700770, 0x0, 0x777700, 0x7700770, 0x7700770, 0x777700, 0x0, 0x7707700, 0x770770, 0x0, 0x777700, 0x7700770, 0x7700770, 0x777700, 0x0, 0x7700770, 0x0, 0x0, 0x777700, 0x7700770, 0x7700770, 0x777700, 0x0, 0x0, 0x77000, 0x0, 0x77777777, 0x0, 0x77000, 0x0, 0x0, 0x0, 0x7000000, 0x777700, 0x7770770, 0x7707770, 0x7700770, 0x777707, 0x0, 0x7700, 0x77000, 0x0, 0x7700770, 0x7700770, 0x7700770, 0x7777700, 0x0, 0x770000, 0x77000, 0x0, 0x7700770, 0x7700770, 0x7700770, 0x7777700, 0x0, 0x777700, 0x7700770, 0x0, 0x7700770, 0x7700770, 0x7700770, 0x7777700, 0x0, 0x7700770, 0x0, 0x0, 0x7700770, 0x7700770, 0x7700770, 0x7777700, 0x0, 0x770000, 0x77000, 0x7700770, 0x7700770, 0x7700770, 0x7777700, 0x7700000, 0x777700, 0x770, 0x770, 0x777770, 0x7700770, 0x777770, 0x770, 0x770, 0x0, 0x7700770, 0x0, 0x7700770, 0x7700770, 0x7700770, 0x7777700, 0x7700000, 0x777700}; 
-
-
-static void ian_scroll_screen(void){
-	int i;
-	char *j;
-	char *screen_base = (char*)0x2000000;//1F88000;
-	for(i = 8; i < 480 ; i++)
-		for(j = screen_base + i*(640/2) ; j < screen_base + (i+1)*(640/2) ; j++)
-			*(j-(8*(640/2))) = *j;
-	for(i = 479 ; i >= 472 ; i--)
-		for(j = screen_base + i*(640/2) ; j < screen_base + (i+1)*(640/2) ; j++)
-			*j = 0;
-
-}
-
-static void ian_print(char *string){
-        char *screen_base = (char*)0x2000000;
-        static int x, y, first, page;
-        int *temp;
-        int i;
-
-	if(first == 0){
-		first = 1;
-		for(i = 0 ; i < (640/2)*480 ; i++) screen_base[i] = 0;
-	}
-
-        while(*string){
-                if(*string==10){
-                        y++;
-                        x = 0;
-			if(y > 59){
-				y = 59;
-				ian_scroll_screen();
-			}
-		}
-		else if(*string == 8){
-			if(x)
-				x--;
-		}
-		else{
-			if(x > 79){
-				y++;
-				x = 0;
-				if(y > 59){
-					y = 59;
-					ian_scroll_screen();
-				}
-			}
-	
-			temp = (int *)(screen_base + ((640/2)*8*y) + (x * 4));
-			for(i = 0 ; i < 8 ; i++){
-				*temp = charset[i + (*string * 8)];
-				temp += 640/8;
-			}
-			x++;
-		}
-                string++;
-        }
-}
-
-static void ian_print_num(unsigned long value){
-        int i;
-        char out[9];
-
-        for(i = 7; i >= 0 ; i--){
-                out[i] = value & 0x0F;
-                out[i] = out[i]<10?out[i]+'0':out[i]+'A'-10;
-                value = value >> 4;
-        }
-        out[8] = 0;
-
-        ian_print(out);
-
-}
-
-#endif
diff -Nru a/include/asm-arm26/irqchip.h b/include/asm-arm26/irqchip.h
--- a/include/asm-arm26/irqchip.h	2005-01-10 20:11:22 -08:00
+++ b/include/asm-arm26/irqchip.h	2005-01-10 20:11:22 -08:00
@@ -85,23 +85,6 @@
 void set_irq_chip(unsigned int irq, struct irqchip *);
 void set_irq_flags(unsigned int irq, unsigned int flags);
 
-#ifdef not_yet
-/*
- * This is to be used by the top-level machine IRQ decoder only.
- */
-static inline void call_irq(struct pt_regs *regs, unsigned int irq)
-{
-	struct irqdesc *desc = irq_desc + irq;
-
-	spin_lock(&irq_controller_lock);
-	desc->handle(irq, desc, regs);
-	spin_unlock(&irq_controller_lock);
-
-	if (softirq_pending(smp_processor_id()))
-		do_softirq();
-}
-#endif
-
 #define IRQF_VALID	(1 << 0)
 #define IRQF_PROBE	(1 << 1)
 #define IRQF_NOAUTOEN	(1 << 2)
diff -Nru a/include/asm-arm26/pgtable.h b/include/asm-arm26/pgtable.h
--- a/include/asm-arm26/pgtable.h	2005-01-10 20:11:16 -08:00
+++ b/include/asm-arm26/pgtable.h	2005-01-10 20:11:16 -08:00
@@ -11,6 +11,8 @@
 #ifndef _ASMARM_PGTABLE_H
 #define _ASMARM_PGTABLE_H
 
+#include <asm-generic/4level-fixup.h>
+
 #include <linux/config.h>
 #include <asm/memory.h>
 
diff -Nru a/include/asm-arm26/posix_types.h b/include/asm-arm26/posix_types.h
--- a/include/asm-arm26/posix_types.h	2005-01-10 20:11:20 -08:00
+++ b/include/asm-arm26/posix_types.h	2005-01-10 20:11:20 -08:00
@@ -61,19 +61,19 @@
 
 #undef	__FD_SET
 #define __FD_SET(fd, fdsetp) \
-		(((fd_set *)fdsetp)->fds_bits[fd >> 5] |= (1<<(fd & 31)))
+		(((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] |= (1<<((fd) & 31)))
 
 #undef	__FD_CLR
 #define __FD_CLR(fd, fdsetp) \
-		(((fd_set *)fdsetp)->fds_bits[fd >> 5] &= ~(1<<(fd & 31)))
+		(((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] &= ~(1<<((fd) & 31)))
 
 #undef	__FD_ISSET
 #define __FD_ISSET(fd, fdsetp) \
-		((((fd_set *)fdsetp)->fds_bits[fd >> 5] & (1<<(fd & 31))) != 0)
+		((((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] & (1<<((fd) & 31))) != 0)
 
 #undef	__FD_ZERO
 #define __FD_ZERO(fdsetp) \
-		(memset (fdsetp, 0, sizeof (*(fd_set *)fdsetp)))
+		(memset ((fdsetp), 0, sizeof (*(fd_set *)(fdsetp))))
 
 #endif
 
diff -Nru a/include/asm-arm26/processor.h b/include/asm-arm26/processor.h
--- a/include/asm-arm26/processor.h	2005-01-10 20:11:19 -08:00
+++ b/include/asm-arm26/processor.h	2005-01-10 20:11:19 -08:00
@@ -20,9 +20,6 @@
 
 #ifdef __KERNEL__
 
-#define MCA_bus 0
-#define MCA_bus__is_a_macro
-
 #include <asm/atomic.h>
 #include <asm/ptrace.h>
 #include <linux/string.h>
diff -Nru a/include/asm-arm26/setup.h b/include/asm-arm26/setup.h
--- a/include/asm-arm26/setup.h	2005-01-10 20:11:17 -08:00
+++ b/include/asm-arm26/setup.h	2005-01-10 20:11:17 -08:00
@@ -171,7 +171,7 @@
 	int (*parse)(const struct tag *);
 };
 
-#define __tag __attribute__((unused, __section__(".taglist")))
+#define __tag __attribute_used__ __attribute__((__section__(".taglist")))
 #define __tagtable(tag, fn) \
 static struct tagtable __tagtable_##fn __tag = { tag, fn }
 
diff -Nru a/include/asm-arm26/system.h b/include/asm-arm26/system.h
--- a/include/asm-arm26/system.h	2005-01-10 20:11:23 -08:00
+++ b/include/asm-arm26/system.h	2005-01-10 20:11:23 -08:00
@@ -4,32 +4,131 @@
 #ifdef __KERNEL__
 
 #include <linux/config.h>
-#include <linux/kernel.h>
-#include <asm/proc-fns.h>
 
-#define vectors_base()  (0)
+/*
+ * This is used to ensure the compiler did actually allocate the register we
+ * asked it for some inline assembly sequences.  Apparently we can't trust
+ * the compiler from one version to another so a bit of paranoia won't hurt.
+ * This string is meant to be concatenated with the inline asm string and
+ * will cause compilation to stop on mismatch. (From ARM32 - may come in handy)
+ */
+#define __asmeq(x, y)  ".ifnc " x "," y " ; .err ; .endif\n\t"
 
-static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size)
-{
-        extern void __bad_xchg(volatile void *, int);
+#ifndef __ASSEMBLY__
 
-        switch (size) {
-                case 1: return cpu_xchg_1(x, ptr);
-                case 4: return cpu_xchg_4(x, ptr);
-                default: __bad_xchg(ptr, size);
-        }
-        return 0;
-}
+#include <linux/linkage.h>
+
+struct thread_info;
+struct task_struct;
+
+#if 0
+/* information about the system we're running on */
+extern unsigned int system_rev;
+extern unsigned int system_serial_low;
+extern unsigned int system_serial_high;
+extern unsigned int mem_fclk_21285;
 
+FIXME - sort this
 /*
  * We need to turn the caches off before calling the reset vector - RiscOS
  * messes up if we don't
  */
 #define proc_hard_reset()       cpu_proc_fin()
 
+#endif
+
+struct pt_regs;
+
+void die(const char *msg, struct pt_regs *regs, int err)
+		__attribute__((noreturn));
+
+void die_if_kernel(const char *str, struct pt_regs *regs, int err);
+
+void hook_fault_code(int nr, int (*fn)(unsigned long, unsigned int,
+				       struct pt_regs *),
+		     int sig, const char *name);
+
+#include <asm/proc-fns.h>
+
+#define xchg(ptr,x) \
+	((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
+
+#define tas(ptr) (xchg((ptr),1))
+
+extern asmlinkage void __backtrace(void);
+
+#define set_cr(x)					\
+	__asm__ __volatile__(				\
+	"mcr	p15, 0, %0, c1, c0, 0	@ set CR"	\
+	: : "r" (x) : "cc")
+
+#define get_cr()					\
+	({						\
+	unsigned int __val;				\
+	__asm__ __volatile__(				\
+	"mrc	p15, 0, %0, c1, c0, 0	@ get CR"	\
+	: "=r" (__val) : : "cc");			\
+	__val;						\
+	})
+
+extern unsigned long cr_no_alignment;	/* defined in entry-armv.S */
+extern unsigned long cr_alignment;	/* defined in entry-armv.S */
+
+#define UDBG_UNDEFINED	(1 << 0)
+#define UDBG_SYSCALL	(1 << 1)
+#define UDBG_BADABORT	(1 << 2)
+#define UDBG_SEGV	(1 << 3)
+#define UDBG_BUS	(1 << 4)
+
+extern unsigned int user_debug;
+
+#define vectors_base()	(0)
+
+#define mb() __asm__ __volatile__ ("" : : : "memory")
+#define rmb() mb()
+#define wmb() mb()
+#define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t");
+
+#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)
+
 /*
- * A couple of speedups for the ARM
+ * We assume knowledge of how
+ * spin_unlock_irq() and friends are implemented.  This avoids
+ * us needlessly decrementing and incrementing the preempt count.
  */
+#define prepare_arch_switch(rq,next)	local_irq_enable()
+#define finish_arch_switch(rq,prev)	spin_unlock(&(rq)->lock)
+#define task_running(rq,p)		((rq)->curr == (p))
+
+/*
+ * switch_to(prev, next) should switch from task `prev' to `next'
+ * `prev' will never be the same as `next'.  schedule() itself
+ * contains the memory barrier to tell GCC not to cache `current'.
+ */
+extern struct task_struct *__switch_to(struct task_struct *, struct thread_info *, struct thread_info *);
+
+#define switch_to(prev,next,last)					\
+do {									\
+	last = __switch_to(prev,prev->thread_info,next->thread_info);	\
+} while (0)
+
+/*
+ * Save the current interrupt enable state & disable IRQs
+ */
+#define local_irq_save(x)                               \
+        do {                                            \
+          unsigned long temp;                           \
+          __asm__ __volatile__(                         \
+"       mov     %0, pc          @ save_flags_cli\n"     \
+"       orr     %1, %0, #0x08000000\n"                  \
+"       and     %0, %0, #0x0c000000\n"                  \
+"       teqp    %1, #0\n"                               \
+          : "=r" (x), "=r" (temp)                       \
+          :                                             \
+          : "memory");                                  \
+        } while (0)
 
 /*
  * Enable IRQs  (sti)
@@ -61,30 +160,31 @@
           : "memory");                          \
         } while(0)
 
-/* Disable FIQs  (clf) */
+/* Enable FIQs (stf) */
 
-#define __clf() do {                            \
+#define __stf() do {                            \
         unsigned long temp;                     \
         __asm__ __volatile__(                   \
-"       mov     %0, pc          @ clf\n"        \
-"       orr     %0, %0, #0x04000000\n"          \
+"       mov     %0, pc          @ stf\n"        \
+"       bic     %0, %0, #0x04000000\n"          \
 "       teqp    %0, #0\n"                       \
         : "=r" (temp));                         \
     } while(0)
 
-/* Enable FIQs (stf) */
+/* Disable FIQs  (clf) */
 
-#define __stf() do {                            \
+#define __clf() do {                            \
         unsigned long temp;                     \
         __asm__ __volatile__(                   \
-"       mov     %0, pc          @ stf\n"        \
-"       bic     %0, %0, #0x04000000\n"          \
+"       mov     %0, pc          @ clf\n"        \
+"       orr     %0, %0, #0x04000000\n"          \
 "       teqp    %0, #0\n"                       \
         : "=r" (temp));                         \
     } while(0)
 
+
 /*
- * save current IRQ & FIQ state
+ * Save the current interrupt enable state.
  */
 #define local_save_flags(x)                             \
         do {                                    \
@@ -94,21 +194,6 @@
           : "=r" (x));                          \
         } while (0)
 
-/*
- * Save the current interrupt enable state & disable IRQs
- */
-#define local_irq_save(x)                               \
-        do {                                            \
-          unsigned long temp;                           \
-          __asm__ __volatile__(                         \
-"       mov     %0, pc          @ save_flags_cli\n"     \
-"       orr     %1, %0, #0x08000000\n"                  \
-"       and     %0, %0, #0x0c000000\n"                  \
-"       teqp    %1, #0\n"                               \
-          : "=r" (x), "=r" (temp)                       \
-          :                                             \
-          : "memory");                                  \
-        } while (0)
 
 /*
  * restore saved IRQ & FIQ state
@@ -127,77 +212,38 @@
         } while (0)
 
 
-struct thread_info;
-
-/* information about the system we're running on */
-extern unsigned int system_rev;
-extern unsigned int system_serial_low;
-extern unsigned int system_serial_high;
-
-struct pt_regs;
-
-void die(const char *msg, struct pt_regs *regs, int err)
-		__attribute__((noreturn));
-
-void die_if_kernel(const char *str, struct pt_regs *regs, int err);
-
-void hook_fault_code(int nr, int (*fn)(unsigned long, unsigned int,
-				       struct pt_regs *),
-		     int sig, const char *name);
-
-#define xchg(ptr,x) \
-	((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
-
-#define tas(ptr) (xchg((ptr),1))
-
-extern asmlinkage void __backtrace(void);
-
-/*
- * Include processor dependent parts
- */
-
-#define mb() __asm__ __volatile__ ("" : : : "memory")
-#define rmb() mb()
-#define wmb() mb()
-#define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t");
-
-#define prepare_to_switch()    do { } while(0)
-
-/*
- * switch_to(prev, next) should switch from task `prev' to `next'
- * `prev' will never be the same as `next'.
- * The `mb' is to tell GCC not to cache `current' across this call.
- */
-struct thread_info;
-
-extern struct task_struct *__switch_to(struct thread_info *, struct thread_info *);
-
-#define switch_to(prev,next,last)                                       \
-        do {                                                            \
-                __switch_to(prev->thread_info,next->thread_info);       \
-                mb();                                                   \
-        } while (0)
-
-
 #ifdef CONFIG_SMP
 #error SMP not supported
-#endif /* CONFIG_SMP */
+#endif
 
-#define irqs_disabled()                 \
-({                                      \
-        unsigned long flags;            \
-        local_save_flags(flags);        \
-        flags & PSR_I_BIT;              \
-})
-
-#define set_mb(var, value)  do { var = value; mb(); } while (0)
 #define smp_mb()		barrier()
 #define smp_rmb()		barrier()
 #define smp_wmb()		barrier()
-#define smp_read_barrier_depends()              do { } while(0)
+#define smp_read_barrier_depends()		do { } while(0)
 
 #define clf()			__clf()
 #define stf()			__stf()
+
+#define irqs_disabled()			\
+({					\
+	unsigned long flags;		\
+	local_save_flags(flags);	\
+	flags & PSR_I_BIT;		\
+})
+
+static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size)
+{
+        extern void __bad_xchg(volatile void *, int);
+
+        switch (size) {
+                case 1: return cpu_xchg_1(x, ptr);
+                case 4: return cpu_xchg_4(x, ptr);
+                default: __bad_xchg(ptr, size);
+        }
+        return 0;
+}
+
+#endif /* __ASSEMBLY__ */
 
 #endif /* __KERNEL__ */
 
diff -Nru a/include/asm-arm26/thread_info.h b/include/asm-arm26/thread_info.h
--- a/include/asm-arm26/thread_info.h	2005-01-10 20:11:17 -08:00
+++ b/include/asm-arm26/thread_info.h	2005-01-10 20:11:17 -08:00
@@ -18,6 +18,7 @@
 struct task_struct;
 struct exec_domain;
 
+#include <linux/compiler.h>
 #include <asm/fpstate.h>
 #include <asm/ptrace.h>
 #include <asm/types.h>
@@ -80,7 +81,7 @@
 }
 
 /* FIXME - PAGE_SIZE < 32K */
-#define THREAD_SIZE		(8192)
+#define THREAD_SIZE		(8*32768) // FIXME - this needs attention (see kernel/fork.c which gets a nice div by zero if this is lower than 8*32768
 #define __get_user_regs(x) (((struct pt_regs *)((unsigned long)(x) + THREAD_SIZE - 8)) - 1)
 
 extern struct thread_info *alloc_thread_info(struct task_struct *task);
diff -Nru a/include/asm-arm26/tlb.h b/include/asm-arm26/tlb.h
--- a/include/asm-arm26/tlb.h	2005-01-10 20:11:23 -08:00
+++ b/include/asm-arm26/tlb.h	2005-01-10 20:11:23 -08:00
@@ -11,6 +11,7 @@
 struct mmu_gather {
         struct mm_struct        *mm;
         unsigned int            freed;
+	unsigned int            fullmm;
 
         unsigned int            flushes;
         unsigned int            avoided_flushes;
@@ -26,6 +27,7 @@
 
         tlb->mm = mm;
         tlb->freed = 0;
+	tlb->fullmm = full_mm_flush;
 
         return tlb;
 }
@@ -52,8 +54,21 @@
         check_pgt_cache();
 }
 
+
+static inline unsigned int
+tlb_is_full_mm(struct mmu_gather *tlb)
+{
+     return tlb->fullmm;
+}
+
 #define tlb_remove_tlb_entry(tlb,ptep,address)  do { } while (0)
-#define tlb_start_vma(tlb,vma)                  do { } while (0)
+//#define tlb_start_vma(tlb,vma)                  do { } while (0)
+//FIXME - ARM32 uses this now that things changed in the kernel. seems like it may be pointless on arm26, however to get things compiling...
+#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 { } while (0)
 
 #define tlb_remove_page(tlb,page)       free_page_and_swap_cache(page)
diff -Nru a/include/asm-arm26/uaccess.h b/include/asm-arm26/uaccess.h
--- a/include/asm-arm26/uaccess.h	2005-01-10 20:11:16 -08:00
+++ b/include/asm-arm26/uaccess.h	2005-01-10 20:11:16 -08:00
@@ -134,6 +134,39 @@
 extern int __put_user_8(void *, unsigned long long);
 extern int __put_user_bad(void);
 
+#define __put_user_x(__r1,__p,__e,__s)                                  \
+           __asm__ __volatile__ (                                       \
+                __asmeq("%0", "r0") __asmeq("%2", "r1")                 \
+                "bl     __put_user_" #__s                               \
+                : "=&r" (__e)                                           \
+                : "0" (__p), "r" (__r1)                                 \
+                : "ip", "lr", "cc")
+
+#define put_user(x,p)                                                   \
+        ({                                                              \
+                const register typeof(*(p)) __r1 asm("r1") = (x);       \
+                const register typeof(*(p)) *__p asm("r0") = (p);       \
+                register int __e asm("r0");                             \
+                switch (sizeof(*(__p))) {                               \
+                case 1:                                                 \
+                        __put_user_x(__r1, __p, __e, 1);                \
+                        break;                                          \
+                case 2:                                                 \
+                        __put_user_x(__r1, __p, __e, 2);                \
+                        break;                                          \
+                case 4:                                                 \
+                        __put_user_x(__r1, __p, __e, 4);                \
+                        break;                                          \
+                case 8:                                                 \
+                        __put_user_x(__r1, __p, __e, 8);                \
+                        break;                                          \
+                default: __e = __put_user_bad(); break;                 \
+                }                                                       \
+                __e;                                                    \
+        })
+
+#if 0
+/*********************   OLD METHOD *******************/
 #define __put_user_x(__r1,__p,__e,__s,__i...)				\
 	   __asm__ __volatile__ ("bl	__put_user_" #__s		\
 		: "=&r" (__e)						\
@@ -156,12 +189,14 @@
 			__put_user_x(__r1, __p, __e, 4, "r2", "lr");	\
 			break;						\
 		case 8:							\
-			__put_user_x(__r1, __p, __e, 8, "ip", "lr");	\
+			__put_user_x(__r1, __p, __e, 8, "r2", "ip", "lr");	\
 			break;						\
 		default: __e = __put_user_bad(); break;			\
 		}							\
 		__e;							\
 	})
+/*************************************************/
+#endif
 
 #define __put_user(x,ptr)                                               \
 ({                                                                      \
diff -Nru a/include/asm-arm26/unistd.h b/include/asm-arm26/unistd.h
--- a/include/asm-arm26/unistd.h	2005-01-10 20:11:23 -08:00
+++ b/include/asm-arm26/unistd.h	2005-01-10 20:11:23 -08:00
@@ -1,13 +1,14 @@
 /*
  *  linux/include/asm-arm/unistd.h
  *
- *  Copyright (C) 2001 Russell King
+ *  Copyright (C) 2001-2003 Russell King
+ *  Modified 25/11/04 Ian Molton for arm26.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  *
- * Please forward _all_ changes to this file to rmk@arm.linux.org.uk,
+ * Please forward _all_ changes to this file to spyro@f2s.com
  * no matter what the change is.  Thanks!
  */
 #ifndef __ASM_ARM_UNISTD_H
@@ -28,7 +29,7 @@
 #define __NR_write			(__NR_SYSCALL_BASE+  4)
 #define __NR_open			(__NR_SYSCALL_BASE+  5)
 #define __NR_close			(__NR_SYSCALL_BASE+  6)
-#define __NR_waitpid			(__NR_SYSCALL_BASE+  7)
+					/* 7 was sys_waitpid */
 #define __NR_creat			(__NR_SYSCALL_BASE+  8)
 #define __NR_link			(__NR_SYSCALL_BASE+  9)
 #define __NR_unlink			(__NR_SYSCALL_BASE+ 10)
@@ -38,8 +39,8 @@
 #define __NR_mknod			(__NR_SYSCALL_BASE+ 14)
 #define __NR_chmod			(__NR_SYSCALL_BASE+ 15)
 #define __NR_lchown			(__NR_SYSCALL_BASE+ 16)
-#define __NR_break			(__NR_SYSCALL_BASE+ 17)
-
+					/* 17 was sys_break */
+					/* 18 was sys_stat */
 #define __NR_lseek			(__NR_SYSCALL_BASE+ 19)
 #define __NR_getpid			(__NR_SYSCALL_BASE+ 20)
 #define __NR_mount			(__NR_SYSCALL_BASE+ 21)
@@ -49,14 +50,14 @@
 #define __NR_stime			(__NR_SYSCALL_BASE+ 25)
 #define __NR_ptrace			(__NR_SYSCALL_BASE+ 26)
 #define __NR_alarm			(__NR_SYSCALL_BASE+ 27)
-
+					/* 28 was sys_fstat */
 #define __NR_pause			(__NR_SYSCALL_BASE+ 29)
 #define __NR_utime			(__NR_SYSCALL_BASE+ 30)
-#define __NR_stty			(__NR_SYSCALL_BASE+ 31)
-#define __NR_gtty			(__NR_SYSCALL_BASE+ 32)
+					/* 31 was sys_stty */
+					/* 32 was sys_gtty */
 #define __NR_access			(__NR_SYSCALL_BASE+ 33)
 #define __NR_nice			(__NR_SYSCALL_BASE+ 34)
-#define __NR_ftime			(__NR_SYSCALL_BASE+ 35)
+					/* 35 was sys_ftime */
 #define __NR_sync			(__NR_SYSCALL_BASE+ 36)
 #define __NR_kill			(__NR_SYSCALL_BASE+ 37)
 #define __NR_rename			(__NR_SYSCALL_BASE+ 38)
@@ -65,22 +66,22 @@
 #define __NR_dup			(__NR_SYSCALL_BASE+ 41)
 #define __NR_pipe			(__NR_SYSCALL_BASE+ 42)
 #define __NR_times			(__NR_SYSCALL_BASE+ 43)
-#define __NR_prof			(__NR_SYSCALL_BASE+ 44)
+					/* 44 was sys_prof */
 #define __NR_brk			(__NR_SYSCALL_BASE+ 45)
 #define __NR_setgid			(__NR_SYSCALL_BASE+ 46)
 #define __NR_getgid			(__NR_SYSCALL_BASE+ 47)
-#define __NR_signal			(__NR_SYSCALL_BASE+ 48)
+					/* 48 was sys_signal */
 #define __NR_geteuid			(__NR_SYSCALL_BASE+ 49)
 #define __NR_getegid			(__NR_SYSCALL_BASE+ 50)
 #define __NR_acct			(__NR_SYSCALL_BASE+ 51)
 #define __NR_umount2			(__NR_SYSCALL_BASE+ 52)
-#define __NR_lock			(__NR_SYSCALL_BASE+ 53)
+					/* 53 was sys_lock */
 #define __NR_ioctl			(__NR_SYSCALL_BASE+ 54)
 #define __NR_fcntl			(__NR_SYSCALL_BASE+ 55)
-#define __NR_mpx			(__NR_SYSCALL_BASE+ 56)
+					/* 56 was sys_mpx */
 #define __NR_setpgid			(__NR_SYSCALL_BASE+ 57)
-#define __NR_ulimit			(__NR_SYSCALL_BASE+ 58)
-
+					/* 58 was sys_ulimit */
+					/* 59 was sys_olduname */
 #define __NR_umask			(__NR_SYSCALL_BASE+ 60)
 #define __NR_chroot			(__NR_SYSCALL_BASE+ 61)
 #define __NR_ustat			(__NR_SYSCALL_BASE+ 62)
@@ -89,8 +90,8 @@
 #define __NR_getpgrp			(__NR_SYSCALL_BASE+ 65)
 #define __NR_setsid			(__NR_SYSCALL_BASE+ 66)
 #define __NR_sigaction			(__NR_SYSCALL_BASE+ 67)
-#define __NR_sgetmask			(__NR_SYSCALL_BASE+ 68)
-#define __NR_ssetmask			(__NR_SYSCALL_BASE+ 69)
+					/* 68 was sys_sgetmask */
+					/* 69 was sys_ssetmask */
 #define __NR_setreuid			(__NR_SYSCALL_BASE+ 70)
 #define __NR_setregid			(__NR_SYSCALL_BASE+ 71)
 #define __NR_sigsuspend			(__NR_SYSCALL_BASE+ 72)
@@ -105,7 +106,7 @@
 #define __NR_setgroups			(__NR_SYSCALL_BASE+ 81)
 #define __NR_select			(__NR_SYSCALL_BASE+ 82)
 #define __NR_symlink			(__NR_SYSCALL_BASE+ 83)
-
+					/* 84 was sys_lstat */
 #define __NR_readlink			(__NR_SYSCALL_BASE+ 85)
 #define __NR_uselib			(__NR_SYSCALL_BASE+ 86)
 #define __NR_swapon			(__NR_SYSCALL_BASE+ 87)
@@ -119,10 +120,10 @@
 #define __NR_fchown			(__NR_SYSCALL_BASE+ 95)
 #define __NR_getpriority		(__NR_SYSCALL_BASE+ 96)
 #define __NR_setpriority		(__NR_SYSCALL_BASE+ 97)
-#define __NR_profil			(__NR_SYSCALL_BASE+ 98)
+					/* 98 was sys_profil */
 #define __NR_statfs			(__NR_SYSCALL_BASE+ 99)
 #define __NR_fstatfs			(__NR_SYSCALL_BASE+100)
-#define __NR_ioperm			(__NR_SYSCALL_BASE+101)
+					/* 101 was sys_ioperm */
 #define __NR_socketcall			(__NR_SYSCALL_BASE+102)
 #define __NR_syslog			(__NR_SYSCALL_BASE+103)
 #define __NR_setitimer			(__NR_SYSCALL_BASE+104)
@@ -130,10 +131,10 @@
 #define __NR_stat			(__NR_SYSCALL_BASE+106)
 #define __NR_lstat			(__NR_SYSCALL_BASE+107)
 #define __NR_fstat			(__NR_SYSCALL_BASE+108)
-
-
+					/* 109 was sys_uname */
+					/* 110 was sys_iopl */
 #define __NR_vhangup			(__NR_SYSCALL_BASE+111)
-#define __NR_idle			(__NR_SYSCALL_BASE+112)
+					/* 112 was sys_idle */
 #define __NR_syscall			(__NR_SYSCALL_BASE+113) /* syscall to call a syscall! */
 #define __NR_wait4			(__NR_SYSCALL_BASE+114)
 #define __NR_swapoff			(__NR_SYSCALL_BASE+115)
@@ -144,21 +145,21 @@
 #define __NR_clone			(__NR_SYSCALL_BASE+120)
 #define __NR_setdomainname		(__NR_SYSCALL_BASE+121)
 #define __NR_uname			(__NR_SYSCALL_BASE+122)
-#define __NR_modify_ldt			(__NR_SYSCALL_BASE+123)
+					/* 123 was sys_modify_ldt */
 #define __NR_adjtimex			(__NR_SYSCALL_BASE+124)
 #define __NR_mprotect			(__NR_SYSCALL_BASE+125)
 #define __NR_sigprocmask		(__NR_SYSCALL_BASE+126)
-#define __NR_create_module		(__NR_SYSCALL_BASE+127)
+					/* 127 was sys_create_module */
 #define __NR_init_module		(__NR_SYSCALL_BASE+128)
 #define __NR_delete_module		(__NR_SYSCALL_BASE+129)
-#define __NR_get_kernel_syms		(__NR_SYSCALL_BASE+130)
+					/* 130 was sys_get_kernel_syms */
 #define __NR_quotactl			(__NR_SYSCALL_BASE+131)
 #define __NR_getpgid			(__NR_SYSCALL_BASE+132)
 #define __NR_fchdir			(__NR_SYSCALL_BASE+133)
 #define __NR_bdflush			(__NR_SYSCALL_BASE+134)
 #define __NR_sysfs			(__NR_SYSCALL_BASE+135)
 #define __NR_personality		(__NR_SYSCALL_BASE+136)
-#define __NR_afs_syscall		(__NR_SYSCALL_BASE+137) /* Syscall for Andrew File System */
+					/* 137 was sys_afs_syscall */
 #define __NR_setfsuid			(__NR_SYSCALL_BASE+138)
 #define __NR_setfsgid			(__NR_SYSCALL_BASE+139)
 #define __NR__llseek			(__NR_SYSCALL_BASE+140)
@@ -187,8 +188,8 @@
 #define __NR_mremap			(__NR_SYSCALL_BASE+163)
 #define __NR_setresuid			(__NR_SYSCALL_BASE+164)
 #define __NR_getresuid			(__NR_SYSCALL_BASE+165)
-#define __NR_vm86			(__NR_SYSCALL_BASE+166)
-#define __NR_query_module		(__NR_SYSCALL_BASE+167)
+					/* 166 was sys_vm86 */
+					/* 167 was sys_query_module */
 #define __NR_poll			(__NR_SYSCALL_BASE+168)
 #define __NR_nfsservctl			(__NR_SYSCALL_BASE+169)
 #define __NR_setresgid			(__NR_SYSCALL_BASE+170)
@@ -244,7 +245,7 @@
 #define __NR_madvise			(__NR_SYSCALL_BASE+220)
 #define __NR_fcntl64			(__NR_SYSCALL_BASE+221)
 					/* 222 for tux */
-#define __NR_security			(__NR_SYSCALL_BASE+223)
+					/* 223 is unused */
 #define __NR_gettid			(__NR_SYSCALL_BASE+224)
 #define __NR_readahead			(__NR_SYSCALL_BASE+225)
 #define __NR_setxattr			(__NR_SYSCALL_BASE+226)
@@ -260,21 +261,62 @@
 #define __NR_lremovexattr		(__NR_SYSCALL_BASE+236)
 #define __NR_fremovexattr		(__NR_SYSCALL_BASE+237)
 #define __NR_tkill			(__NR_SYSCALL_BASE+238)
+#define __NR_sendfile64			(__NR_SYSCALL_BASE+239)
+#define __NR_futex			(__NR_SYSCALL_BASE+240)
+#define __NR_sched_setaffinity		(__NR_SYSCALL_BASE+241)
+#define __NR_sched_getaffinity		(__NR_SYSCALL_BASE+242)
+#define __NR_io_setup			(__NR_SYSCALL_BASE+243)
+#define __NR_io_destroy			(__NR_SYSCALL_BASE+244)
+#define __NR_io_getevents		(__NR_SYSCALL_BASE+245)
+#define __NR_io_submit			(__NR_SYSCALL_BASE+246)
+#define __NR_io_cancel			(__NR_SYSCALL_BASE+247)
+#define __NR_exit_group			(__NR_SYSCALL_BASE+248)
+#define __NR_lookup_dcookie		(__NR_SYSCALL_BASE+249)
+#define __NR_epoll_create		(__NR_SYSCALL_BASE+250)
+#define __NR_epoll_ctl			(__NR_SYSCALL_BASE+251)
+#define __NR_epoll_wait			(__NR_SYSCALL_BASE+252)
+#define __NR_remap_file_pages		(__NR_SYSCALL_BASE+253)
+					/* 254 for set_thread_area */
+					/* 255 for get_thread_area */
+					/* 256 for set_tid_address */
+#define __NR_timer_create		(__NR_SYSCALL_BASE+257)
+#define __NR_timer_settime		(__NR_SYSCALL_BASE+258)
+#define __NR_timer_gettime		(__NR_SYSCALL_BASE+259)
+#define __NR_timer_getoverrun		(__NR_SYSCALL_BASE+260)
+#define __NR_timer_delete		(__NR_SYSCALL_BASE+261)
+#define __NR_clock_settime		(__NR_SYSCALL_BASE+262)
+#define __NR_clock_gettime		(__NR_SYSCALL_BASE+263)
+#define __NR_clock_getres		(__NR_SYSCALL_BASE+264)
+#define __NR_clock_nanosleep		(__NR_SYSCALL_BASE+265)
+#define __NR_statfs64			(__NR_SYSCALL_BASE+266)
+#define __NR_fstatfs64			(__NR_SYSCALL_BASE+267)
+#define __NR_tgkill			(__NR_SYSCALL_BASE+268)
+#define __NR_utimes			(__NR_SYSCALL_BASE+269)
+#define __NR_fadvise64_64		(__NR_SYSCALL_BASE+270)
+#define __NR_pciconfig_iobase		(__NR_SYSCALL_BASE+271)
+#define __NR_pciconfig_read		(__NR_SYSCALL_BASE+272)
+#define __NR_pciconfig_write		(__NR_SYSCALL_BASE+273)
+#define __NR_mq_open			(__NR_SYSCALL_BASE+274)
+#define __NR_mq_unlink			(__NR_SYSCALL_BASE+275)
+#define __NR_mq_timedsend		(__NR_SYSCALL_BASE+276)
+#define __NR_mq_timedreceive		(__NR_SYSCALL_BASE+277)
+#define __NR_mq_notify			(__NR_SYSCALL_BASE+278)
+#define __NR_mq_getsetattr		(__NR_SYSCALL_BASE+279)
+#define __NR_waitid			(__NR_SYSCALL_BASE+280)
 
 /*
- * The following SWIs are ARM private.
+ * The following SWIs are ARM private. FIXME - make appropriate for arm26
  */
 #define __ARM_NR_BASE			(__NR_SYSCALL_BASE+0x0f0000)
 #define __ARM_NR_breakpoint		(__ARM_NR_BASE+1)
 #define __ARM_NR_cacheflush		(__ARM_NR_BASE+2)
 #define __ARM_NR_usr26			(__ARM_NR_BASE+3)
-#define __ARM_NR_usr32			(__ARM_NR_BASE+4)
 
 #define __sys2(x) #x
 #define __sys1(x) __sys2(x)
 
 #ifndef __syscall
-#define __syscall(name) "swi\t" __sys1(__NR_##name) "\n\t"
+#define __syscall(name) "swi\t" __sys1(__NR_##name) ""
 #endif
 
 #define __syscall_return(type, res)					\
@@ -288,106 +330,128 @@
 
 #define _syscall0(type,name)						\
 type name(void) {							\
+  register long __res_r0 __asm__("r0");					\
   long __res;								\
   __asm__ __volatile__ (						\
   __syscall(name)							\
-  "mov %0,r0"								\
-  :"=r" (__res) : : "r0","lr");						\
+	: "=r" (__res_r0)						\
+	:								\
+	: "lr");							\
+  __res = __res_r0;							\
   __syscall_return(type,__res);						\
 }
 
-#define _syscall1(type,name,type1,arg1)					\
-type name(type1 arg1) {							\
+#define _syscall1(type,name,type1,arg1) 				\
+type name(type1 arg1) { 						\
+  register long __r0 __asm__("r0") = (long)arg1;			\
+  register long __res_r0 __asm__("r0");					\
   long __res;								\
   __asm__ __volatile__ (						\
-  "mov\tr0,%1\n\t"							\
   __syscall(name)							\
-  "mov %0,r0"								\
-        : "=r" (__res)							\
-        : "r" ((long)(arg1))						\
-	: "r0","lr");							\
+	: "=r" (__res_r0)						\
+	: "r" (__r0)							\
+	: "lr");							\
+  __res = __res_r0;							\
   __syscall_return(type,__res);						\
 }
 
 #define _syscall2(type,name,type1,arg1,type2,arg2)			\
 type name(type1 arg1,type2 arg2) {					\
+  register long __r0 __asm__("r0") = (long)arg1;			\
+  register long __r1 __asm__("r1") = (long)arg2;			\
+  register long __res_r0 __asm__("r0");					\
   long __res;								\
   __asm__ __volatile__ (						\
-  "mov\tr0,%1\n\t"							\
-  "mov\tr1,%2\n\t"							\
   __syscall(name)							\
-  "mov\t%0,r0"								\
-        : "=r" (__res)							\
-        : "r" ((long)(arg1)),"r" ((long)(arg2))				\
-	: "r0","r1","lr");						\
+	: "=r" (__res_r0)						\
+	: "r" (__r0),"r" (__r1) 					\
+	: "lr");							\
+  __res = __res_r0;							\
   __syscall_return(type,__res);						\
 }
 
 
 #define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3)		\
 type name(type1 arg1,type2 arg2,type3 arg3) {				\
+  register long __r0 __asm__("r0") = (long)arg1;			\
+  register long __r1 __asm__("r1") = (long)arg2;			\
+  register long __r2 __asm__("r2") = (long)arg3;			\
+  register long __res_r0 __asm__("r0");					\
   long __res;								\
   __asm__ __volatile__ (						\
-  "mov\tr0,%1\n\t"							\
-  "mov\tr1,%2\n\t"							\
-  "mov\tr2,%3\n\t"							\
   __syscall(name)							\
-  "mov\t%0,r0"								\
-        : "=r" (__res)							\
-        : "r" ((long)(arg1)),"r" ((long)(arg2)),"r" ((long)(arg3))	\
-        : "r0","r1","r2","lr");						\
+	: "=r" (__res_r0)						\
+	: "r" (__r0),"r" (__r1),"r" (__r2)				\
+	: "lr");							\
+  __res = __res_r0;							\
   __syscall_return(type,__res);						\
 }
 
 
-#define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4)		\
-type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4) {				\
-  long __res;										\
-  __asm__ __volatile__ (								\
-  "mov\tr0,%1\n\t"									\
-  "mov\tr1,%2\n\t"									\
-  "mov\tr2,%3\n\t"									\
-  "mov\tr3,%4\n\t"									\
-  __syscall(name)									\
-  "mov\t%0,r0"										\
-  	: "=r" (__res)									\
-  	: "r" ((long)(arg1)),"r" ((long)(arg2)),"r" ((long)(arg3)),"r" ((long)(arg4))	\
-  	: "r0","r1","r2","r3","lr");							\
-  __syscall_return(type,__res);								\
+#define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4)\
+type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4) {		\
+  register long __r0 __asm__("r0") = (long)arg1;			\
+  register long __r1 __asm__("r1") = (long)arg2;			\
+  register long __r2 __asm__("r2") = (long)arg3;			\
+  register long __r3 __asm__("r3") = (long)arg4;			\
+  register long __res_r0 __asm__("r0");					\
+  long __res;								\
+  __asm__ __volatile__ (						\
+  __syscall(name)							\
+	: "=r" (__res_r0)						\
+	: "r" (__r0),"r" (__r1),"r" (__r2),"r" (__r3)			\
+	: "lr");							\
+  __res = __res_r0;							\
+  __syscall_return(type,__res);						\
 }
   
 
 #define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5)	\
-type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) {			\
-  long __res;										\
-  __asm__ __volatile__ (								\
-  "mov\tr0,%1\n\t"									\
-  "mov\tr1,%2\n\t"									\
-  "mov\tr2,%3\n\t"									\
-  "mov\tr3,%4\n\t"									\
-  "mov\tr4,%5\n\t"									\
-  __syscall(name)									\
-  "mov\t%0,r0"										\
-  	: "=r" (__res)									\
-  	: "r" ((long)(arg1)),"r" ((long)(arg2)),"r" ((long)(arg3)),"r" ((long)(arg4)),	\
-	  "r" ((long)(arg5))								\
-	: "r0","r1","r2","r3","r4","lr");						\
-  __syscall_return(type,__res);								\
+type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) {	\
+  register long __r0 __asm__("r0") = (long)arg1;			\
+  register long __r1 __asm__("r1") = (long)arg2;			\
+  register long __r2 __asm__("r2") = (long)arg3;			\
+  register long __r3 __asm__("r3") = (long)arg4;			\
+  register long __r4 __asm__("r4") = (long)arg5;			\
+  register long __res_r0 __asm__("r0");					\
+  long __res;								\
+  __asm__ __volatile__ (						\
+  __syscall(name)							\
+	: "=r" (__res_r0)						\
+	: "r" (__r0),"r" (__r1),"r" (__r2),"r" (__r3),"r" (__r4)	\
+	: "lr");							\
+  __res = __res_r0;							\
+  __syscall_return(type,__res);						\
+}
+
+#define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5,type6,arg6)	\
+type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6) {	\
+  register long __r0 __asm__("r0") = (long)arg1;			\
+  register long __r1 __asm__("r1") = (long)arg2;			\
+  register long __r2 __asm__("r2") = (long)arg3;			\
+  register long __r3 __asm__("r3") = (long)arg4;			\
+  register long __r4 __asm__("r4") = (long)arg5;			\
+  register long __r5 __asm__("r5") = (long)arg6;			\
+  register long __res_r0 __asm__("r0");					\
+  long __res;								\
+  __asm__ __volatile__ (						\
+  __syscall(name)							\
+	: "=r" (__res_r0)						\
+	: "r" (__r0),"r" (__r1),"r" (__r2),"r" (__r3), "r" (__r4),"r" (__r5)		\
+	: "lr");							\
+  __res = __res_r0;							\
+  __syscall_return(type,__res);						\
 }
 
 #ifdef __KERNEL__
 #define __ARCH_WANT_IPC_PARSE_VERSION
 #define __ARCH_WANT_OLD_READDIR
-#define __ARCH_WANT_OLD_STAT
 #define __ARCH_WANT_STAT64
 #define __ARCH_WANT_SYS_ALARM
 #define __ARCH_WANT_SYS_GETHOSTNAME
 #define __ARCH_WANT_SYS_PAUSE
-#define __ARCH_WANT_SYS_SGETMASK
-#define __ARCH_WANT_SYS_SIGNAL
 #define __ARCH_WANT_SYS_TIME
 #define __ARCH_WANT_SYS_UTIME
-#define __ARCH_WANT_SYS_WAITPID
 #define __ARCH_WANT_SYS_SOCKETCALL
 #define __ARCH_WANT_SYS_FADVISE64
 #define __ARCH_WANT_SYS_GETPGRP
@@ -406,76 +470,7 @@
 #include <linux/types.h>
 #include <linux/syscalls.h>
 
-static inline long idle(void)
-{
-	extern long sys_idle(void);
-	return sys_idle();
-}
-
-static inline long pause(void)
-{
-	return sys_pause();
-}
-
-static inline long sync(void)
-{
-	return sys_sync();
-}
-
-static inline pid_t setsid(void)
-{
-	return sys_setsid();
-}
-
-static inline long write(int fd, const char *buf, off_t count)
-{
-	return sys_write(fd, buf, count);
-}
-
-static inline long read(int fd, char *buf, off_t count)
-{
-	return sys_read(fd, buf, count);
-}
-
-static inline off_t lseek(int fd, off_t offset, int count)
-{
-	return sys_lseek(fd, offset, count);
-}
-
-static inline long dup(int fd)
-{
-	return sys_dup(fd);
-}
-
-static inline long open(const char *file, int flag, int mode)
-{
-	return sys_open(file, flag, mode);
-}
-
-static inline long close(int fd)
-{
-	return sys_close(fd);
-}
-
-static inline long _exit(int exitcode)
-{
-	return sys_exit(exitcode);
-}
-
-static inline pid_t waitpid(pid_t pid, int *wait_stat, int options)
-{
-	return sys_wait4((int)pid, wait_stat, options, NULL);
-}
-
-static inline long delete_module(const char *name)
-{
-	return sys_delete_module(name, 0);
-}
-
-static inline pid_t wait(int * wait_stat)
-{
-	return sys_wait4(-1, wait_stat, 0, NULL);
-}
+extern long execve(const char *file, char **argv, char **envp);
 
 struct pt_regs;
 asmlinkage int sys_execve(char *filenamei, char **argv, char **envp,
@@ -491,12 +486,6 @@
 				const struct sigaction __user *act,
 				struct sigaction __user *oact,
 				size_t sigsetsize);
-
-/*
- * The following two can't be eliminated yet - they rely on
- * specific conditions.
- */
-static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp);
 
 #endif
 
diff -Nru a/include/asm-cris/hardirq.h b/include/asm-cris/hardirq.h
--- a/include/asm-cris/hardirq.h	2005-01-10 20:11:18 -08:00
+++ b/include/asm-cris/hardirq.h	2005-01-10 20:11:18 -08:00
@@ -9,10 +9,6 @@
 /* entry.S is sensitive to the offsets of these fields */
 typedef struct {
 	unsigned int __softirq_pending;
-	unsigned int __local_irq_count;
-	unsigned int __local_bh_count;
-	unsigned int __syscall_count;
-	struct task_struct * __ksoftirqd_task; /* waitqueue is too large */
 } ____cacheline_aligned irq_cpustat_t;
 
 #include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
@@ -27,14 +23,5 @@
 #if (1 << HARDIRQ_BITS) < NR_IRQS
 # error HARDIRQ_BITS is too low!
 #endif
-
-#define irq_enter()		(preempt_count() += HARDIRQ_OFFSET)
-#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)
 
 #endif /* __ASM_HARDIRQ_H */
diff -Nru a/include/asm-cris/pgalloc.h b/include/asm-cris/pgalloc.h
--- a/include/asm-cris/pgalloc.h	2005-01-10 20:11:22 -08:00
+++ b/include/asm-cris/pgalloc.h	2005-01-10 20:11:22 -08:00
@@ -24,18 +24,14 @@
 
 extern inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address)
 {
-  	pte_t *pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT);
-	if (pte)
-		clear_page(pte);
+  	pte_t *pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO);
  	return pte;
 }
 
 extern inline struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address)
 {
 	struct page *pte;
-	pte = alloc_pages(GFP_KERNEL|__GFP_REPEAT, 0);
-	if (pte)
-		clear_page(page_address(pte));
+	pte = alloc_pages(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO, 0);
 	return pte;
 }
 
diff -Nru a/include/asm-cris/pgtable.h b/include/asm-cris/pgtable.h
--- a/include/asm-cris/pgtable.h	2005-01-10 20:11:15 -08:00
+++ b/include/asm-cris/pgtable.h	2005-01-10 20:11:15 -08:00
@@ -5,6 +5,8 @@
 #ifndef _CRIS_PGTABLE_H
 #define _CRIS_PGTABLE_H
 
+#include <asm-generic/4level-fixup.h>
+
 #ifndef __ASSEMBLY__
 #include <linux/config.h>
 #include <linux/sched.h>
diff -Nru a/include/asm-frv/a.out.h b/include/asm-frv/a.out.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/a.out.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,5 @@
+/*
+ * FRV doesn't do AOUT format. This header file should be removed as
+ * soon as fs/exec.c and fs/proc/kcore.c and the archs that require
+ * them to include linux/a.out.h are fixed.
+ */
diff -Nru a/include/asm-frv/atomic.h b/include/asm-frv/atomic.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/atomic.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,417 @@
+/* atomic.h: atomic operation emulation for FR-V
+ *
+ * For an explanation of how atomic ops work in this arch, see:
+ *   Documentation/fujitsu/frv/atomic-ops.txt
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+#ifndef _ASM_ATOMIC_H
+#define _ASM_ATOMIC_H
+
+#include <linux/config.h>
+#include <linux/types.h>
+#include <asm/spr-regs.h>
+
+#ifdef CONFIG_SMP
+#error not SMP safe
+#endif
+
+/*
+ * Atomic operations that C can't guarantee us.  Useful for
+ * resource counting etc..
+ *
+ * We do not have SMP systems, so we don't have to deal with that.
+ */
+
+/* Atomic operations are already serializing */
+#define smp_mb__before_atomic_dec()	barrier()
+#define smp_mb__after_atomic_dec()	barrier()
+#define smp_mb__before_atomic_inc()	barrier()
+#define smp_mb__after_atomic_inc()	barrier()
+
+typedef struct {
+	int counter;
+} atomic_t;
+
+#define ATOMIC_INIT(i)		{ (i) }
+#define atomic_read(v)		((v)->counter)
+#define atomic_set(v, i)	(((v)->counter) = (i))
+
+#ifndef CONFIG_FRV_OUTOFLINE_ATOMIC_OPS
+static inline int atomic_add_return(int i, atomic_t *v)
+{
+	unsigned long val;
+
+	asm("0:						\n"
+	    "	orcc		gr0,gr0,gr0,icc3	\n"	/* set ICC3.Z */
+	    "	ckeq		icc3,cc7		\n"
+	    "	ld.p		%M0,%1			\n"	/* LD.P/ORCR must be atomic */
+	    "	orcr		cc7,cc7,cc3		\n"	/* set CC3 to true */
+	    "	add%I2		%1,%2,%1		\n"
+	    "	cst.p		%1,%M0		,cc3,#1	\n"
+	    "	corcc		gr29,gr29,gr0	,cc3,#1	\n"	/* clear ICC3.Z if store happens */
+	    "	beq		icc3,#0,0b		\n"
+	    : "+U"(v->counter), "=&r"(val)
+	    : "NPr"(i)
+	    : "memory", "cc7", "cc3", "icc3"
+	    );
+
+	return val;
+}
+
+static inline int atomic_sub_return(int i, atomic_t *v)
+{
+	unsigned long val;
+
+	asm("0:						\n"
+	    "	orcc		gr0,gr0,gr0,icc3	\n"	/* set ICC3.Z */
+	    "	ckeq		icc3,cc7		\n"
+	    "	ld.p		%M0,%1			\n"	/* LD.P/ORCR must be atomic */
+	    "	orcr		cc7,cc7,cc3		\n"	/* set CC3 to true */
+	    "	sub%I2		%1,%2,%1		\n"
+	    "	cst.p		%1,%M0		,cc3,#1	\n"
+	    "	corcc		gr29,gr29,gr0	,cc3,#1	\n"	/* clear ICC3.Z if store happens */
+	    "	beq		icc3,#0,0b		\n"
+	    : "+U"(v->counter), "=&r"(val)
+	    : "NPr"(i)
+	    : "memory", "cc7", "cc3", "icc3"
+	    );
+
+	return val;
+}
+
+#else
+
+extern int atomic_add_return(int i, atomic_t *v);
+extern int atomic_sub_return(int i, atomic_t *v);
+
+#endif
+
+static inline int atomic_add_negative(int i, atomic_t *v)
+{
+	return atomic_add_return(i, v) < 0;
+}
+
+static inline void atomic_add(int i, atomic_t *v)
+{
+	atomic_add_return(i, v);
+}
+
+static inline void atomic_sub(int i, atomic_t *v)
+{
+	atomic_sub_return(i, v);
+}
+
+static inline void atomic_inc(atomic_t *v)
+{
+	atomic_add_return(1, v);
+}
+
+static inline void atomic_dec(atomic_t *v)
+{
+	atomic_sub_return(1, v);
+}
+
+#define atomic_dec_return(v)		atomic_sub_return(1, (v))
+#define atomic_inc_return(v)		atomic_add_return(1, (v))
+
+#define atomic_sub_and_test(i,v)	(atomic_sub_return((i), (v)) == 0)
+#define atomic_dec_and_test(v)		(atomic_sub_return(1, (v)) == 0)
+#define atomic_inc_and_test(v)		(atomic_add_return(1, (v)) == 0)
+
+#ifndef CONFIG_FRV_OUTOFLINE_ATOMIC_OPS
+static inline
+unsigned long atomic_test_and_ANDNOT_mask(unsigned long mask, volatile unsigned long *v)
+{
+	unsigned long old, tmp;
+
+	asm volatile(
+		"0:						\n"
+		"	orcc		gr0,gr0,gr0,icc3	\n"	/* set ICC3.Z */
+		"	ckeq		icc3,cc7		\n"
+		"	ld.p		%M0,%1			\n"	/* LD.P/ORCR are atomic */
+		"	orcr		cc7,cc7,cc3		\n"	/* set CC3 to true */
+		"	and%I3		%1,%3,%2		\n"
+		"	cst.p		%2,%M0		,cc3,#1	\n"	/* if store happens... */
+		"	corcc		gr29,gr29,gr0	,cc3,#1	\n"	/* ... clear ICC3.Z */
+		"	beq		icc3,#0,0b		\n"
+		: "+U"(*v), "=&r"(old), "=r"(tmp)
+		: "NPr"(~mask)
+		: "memory", "cc7", "cc3", "icc3"
+		);
+
+	return old;
+}
+
+static inline
+unsigned long atomic_test_and_OR_mask(unsigned long mask, volatile unsigned long *v)
+{
+	unsigned long old, tmp;
+
+	asm volatile(
+		"0:						\n"
+		"	orcc		gr0,gr0,gr0,icc3	\n"	/* set ICC3.Z */
+		"	ckeq		icc3,cc7		\n"
+		"	ld.p		%M0,%1			\n"	/* LD.P/ORCR are atomic */
+		"	orcr		cc7,cc7,cc3		\n"	/* set CC3 to true */
+		"	or%I3		%1,%3,%2		\n"
+		"	cst.p		%2,%M0		,cc3,#1	\n"	/* if store happens... */
+		"	corcc		gr29,gr29,gr0	,cc3,#1	\n"	/* ... clear ICC3.Z */
+		"	beq		icc3,#0,0b		\n"
+		: "+U"(*v), "=&r"(old), "=r"(tmp)
+		: "NPr"(mask)
+		: "memory", "cc7", "cc3", "icc3"
+		);
+
+	return old;
+}
+
+static inline
+unsigned long atomic_test_and_XOR_mask(unsigned long mask, volatile unsigned long *v)
+{
+	unsigned long old, tmp;
+
+	asm volatile(
+		"0:						\n"
+		"	orcc		gr0,gr0,gr0,icc3	\n"	/* set ICC3.Z */
+		"	ckeq		icc3,cc7		\n"
+		"	ld.p		%M0,%1			\n"	/* LD.P/ORCR are atomic */
+		"	orcr		cc7,cc7,cc3		\n"	/* set CC3 to true */
+		"	xor%I3		%1,%3,%2		\n"
+		"	cst.p		%2,%M0		,cc3,#1	\n"	/* if store happens... */
+		"	corcc		gr29,gr29,gr0	,cc3,#1	\n"	/* ... clear ICC3.Z */
+		"	beq		icc3,#0,0b		\n"
+		: "+U"(*v), "=&r"(old), "=r"(tmp)
+		: "NPr"(mask)
+		: "memory", "cc7", "cc3", "icc3"
+		);
+
+	return old;
+}
+
+#else
+
+extern unsigned long atomic_test_and_ANDNOT_mask(unsigned long mask, volatile unsigned long *v);
+extern unsigned long atomic_test_and_OR_mask(unsigned long mask, volatile unsigned long *v);
+extern unsigned long atomic_test_and_XOR_mask(unsigned long mask, volatile unsigned long *v);
+
+#endif
+
+#define atomic_clear_mask(mask, v)	atomic_test_and_ANDNOT_mask((mask), (v))
+#define atomic_set_mask(mask, v)	atomic_test_and_OR_mask((mask), (v))
+
+/*****************************************************************************/
+/*
+ * exchange value with memory
+ */
+#ifndef CONFIG_FRV_OUTOFLINE_ATOMIC_OPS
+
+#define xchg(ptr, x)								\
+({										\
+	__typeof__(ptr) __xg_ptr = (ptr);					\
+	__typeof__(*(ptr)) __xg_orig;						\
+										\
+	switch (sizeof(__xg_orig)) {						\
+	case 1:									\
+		asm volatile(							\
+			"0:						\n"	\
+			"	orcc		gr0,gr0,gr0,icc3	\n"	\
+			"	ckeq		icc3,cc7		\n"	\
+			"	ldub.p		%M0,%1			\n"	\
+			"	orcr		cc7,cc7,cc3		\n"	\
+			"	cstb.p		%2,%M0		,cc3,#1	\n"	\
+			"	corcc		gr29,gr29,gr0	,cc3,#1	\n"	\
+			"	beq		icc3,#0,0b		\n"	\
+			: "+U"(*__xg_ptr), "=&r"(__xg_orig)			\
+			: "r"(x)						\
+			: "memory", "cc7", "cc3", "icc3"			\
+			);							\
+		break;								\
+										\
+	case 2:									\
+		asm volatile(							\
+			"0:						\n"	\
+			"	orcc		gr0,gr0,gr0,icc3	\n"	\
+			"	ckeq		icc3,cc7		\n"	\
+			"	lduh.p		%M0,%1			\n"	\
+			"	orcr		cc7,cc7,cc3		\n"	\
+			"	csth.p		%2,%M0		,cc3,#1	\n"	\
+			"	corcc		gr29,gr29,gr0	,cc3,#1	\n"	\
+			"	beq		icc3,#0,0b		\n"	\
+			: "+U"(*__xg_ptr), "=&r"(__xg_orig)			\
+			: "r"(x)						\
+			: "memory", "cc7", "cc3", "icc3"			\
+			);							\
+		break;								\
+										\
+	case 4:									\
+		asm volatile(							\
+			"0:						\n"	\
+			"	orcc		gr0,gr0,gr0,icc3	\n"	\
+			"	ckeq		icc3,cc7		\n"	\
+			"	ld.p		%M0,%1			\n"	\
+			"	orcr		cc7,cc7,cc3		\n"	\
+			"	cst.p		%2,%M0		,cc3,#1	\n"	\
+			"	corcc		gr29,gr29,gr0	,cc3,#1	\n"	\
+			"	beq		icc3,#0,0b		\n"	\
+			: "+U"(*__xg_ptr), "=&r"(__xg_orig)			\
+			: "r"(x)						\
+			: "memory", "cc7", "cc3", "icc3"			\
+			);							\
+		break;								\
+										\
+	default:								\
+		__xg_orig = 0;							\
+		asm volatile("break");						\
+		break;								\
+	}									\
+										\
+	__xg_orig;								\
+})
+
+#else
+
+extern uint8_t  __xchg_8 (uint8_t i,  volatile void *v);
+extern uint16_t __xchg_16(uint16_t i, volatile void *v);
+extern uint32_t __xchg_32(uint32_t i, volatile void *v);
+
+#define xchg(ptr, x)										\
+({												\
+	__typeof__(ptr) __xg_ptr = (ptr);							\
+	__typeof__(*(ptr)) __xg_orig;								\
+												\
+	switch (sizeof(__xg_orig)) {								\
+	case 1: __xg_orig = (__typeof__(*(ptr))) __xchg_8 ((uint8_t)  x, __xg_ptr);	break;	\
+	case 2: __xg_orig = (__typeof__(*(ptr))) __xchg_16((uint16_t) x, __xg_ptr);	break;	\
+	case 4: __xg_orig = (__typeof__(*(ptr))) __xchg_32((uint32_t) x, __xg_ptr);	break;	\
+	default:										\
+		__xg_orig = 0;									\
+		asm volatile("break");								\
+		break;										\
+	}											\
+	__xg_orig;										\
+})
+
+#endif
+
+#define tas(ptr) (xchg((ptr), 1))
+
+/*****************************************************************************/
+/*
+ * compare and conditionally exchange value with memory
+ * - if (*ptr == test) then orig = *ptr; *ptr = test;
+ * - if (*ptr != test) then orig = *ptr;
+ */
+#ifndef CONFIG_FRV_OUTOFLINE_ATOMIC_OPS
+
+#define cmpxchg(ptr, test, new)							\
+({										\
+	__typeof__(ptr) __xg_ptr = (ptr);					\
+	__typeof__(*(ptr)) __xg_orig, __xg_tmp;					\
+	__typeof__(*(ptr)) __xg_test = (test);					\
+	__typeof__(*(ptr)) __xg_new = (new);					\
+										\
+	switch (sizeof(__xg_orig)) {						\
+	case 1:									\
+		asm volatile(							\
+			"0:						\n"	\
+			"	orcc		gr0,gr0,gr0,icc3	\n"	\
+			"	ckeq		icc3,cc7		\n"	\
+			"	ldub.p		%M0,%1			\n"	\
+			"	orcr		cc7,cc7,cc3		\n"	\
+			"	sub%I4		%1,%4,%2		\n"	\
+			"	sllcc		%2,#24,gr0,icc0		\n"	\
+			"	bne		icc0,#0,1f		\n"	\
+			"	cstb.p		%3,%M0		,cc3,#1	\n"	\
+			"	corcc		gr29,gr29,gr0	,cc3,#1	\n"	\
+			"	beq		icc3,#0,0b		\n"	\
+			"1:						\n"	\
+			: "+U"(*__xg_ptr), "=&r"(__xg_orig), "=&r"(__xg_tmp)	\
+			: "r"(__xg_new), "NPr"(__xg_test)			\
+			: "memory", "cc7", "cc3", "icc3", "icc0"		\
+			);							\
+		break;								\
+										\
+	case 2:									\
+		asm volatile(							\
+			"0:						\n"	\
+			"	orcc		gr0,gr0,gr0,icc3	\n"	\
+			"	ckeq		icc3,cc7		\n"	\
+			"	lduh.p		%M0,%1			\n"	\
+			"	orcr		cc7,cc7,cc3		\n"	\
+			"	sub%I4		%1,%4,%2		\n"	\
+			"	sllcc		%2,#16,gr0,icc0		\n"	\
+			"	bne		icc0,#0,1f		\n"	\
+			"	csth.p		%3,%M0		,cc3,#1	\n"	\
+			"	corcc		gr29,gr29,gr0	,cc3,#1	\n"	\
+			"	beq		icc3,#0,0b		\n"	\
+			"1:						\n"	\
+			: "+U"(*__xg_ptr), "=&r"(__xg_orig), "=&r"(__xg_tmp)	\
+			: "r"(__xg_new), "NPr"(__xg_test)			\
+			: "memory", "cc7", "cc3", "icc3", "icc0"		\
+			);							\
+		break;								\
+										\
+	case 4:									\
+		asm volatile(							\
+			"0:						\n"	\
+			"	orcc		gr0,gr0,gr0,icc3	\n"	\
+			"	ckeq		icc3,cc7		\n"	\
+			"	ld.p		%M0,%1			\n"	\
+			"	orcr		cc7,cc7,cc3		\n"	\
+			"	sub%I4cc	%1,%4,%2,icc0		\n"	\
+			"	bne		icc0,#0,1f		\n"	\
+			"	cst.p		%3,%M0		,cc3,#1	\n"	\
+			"	corcc		gr29,gr29,gr0	,cc3,#1	\n"	\
+			"	beq		icc3,#0,0b		\n"	\
+			"1:						\n"	\
+			: "+U"(*__xg_ptr), "=&r"(__xg_orig), "=&r"(__xg_tmp)	\
+			: "r"(__xg_new), "NPr"(__xg_test)			\
+			: "memory", "cc7", "cc3", "icc3", "icc0"		\
+			);							\
+		break;								\
+										\
+	default:								\
+		__xg_orig = 0;							\
+		asm volatile("break");						\
+		break;								\
+	}									\
+										\
+	__xg_orig;								\
+})
+
+#else
+
+extern uint8_t  __cmpxchg_8 (uint8_t *v,  uint8_t test,  uint8_t new);
+extern uint16_t __cmpxchg_16(uint16_t *v, uint16_t test, uint16_t new);
+extern uint32_t __cmpxchg_32(uint32_t *v, uint32_t test, uint32_t new);
+
+#define cmpxchg(ptr, test, new)							\
+({										\
+	__typeof__(ptr) __xg_ptr = (ptr);					\
+	__typeof__(*(ptr)) __xg_orig;						\
+	__typeof__(*(ptr)) __xg_test = (test);					\
+	__typeof__(*(ptr)) __xg_new = (new);					\
+										\
+	switch (sizeof(__xg_orig)) {						\
+	case 1: __xg_orig = __cmpxchg_8 (__xg_ptr, __xg_test, __xg_new); break;	\
+	case 2: __xg_orig = __cmpxchg_16(__xg_ptr, __xg_test, __xg_new); break;	\
+	case 4: __xg_orig = __cmpxchg_32(__xg_ptr, __xg_test, __xg_new); break;	\
+	default:								\
+		__xg_orig = 0;							\
+		asm volatile("break");						\
+		break;								\
+	}									\
+										\
+	__xg_orig;								\
+})
+
+#endif
+
+#endif /* _ASM_ATOMIC_H */
diff -Nru a/include/asm-frv/ax88796.h b/include/asm-frv/ax88796.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/ax88796.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,22 @@
+/* ax88796.h: access points to the driver for the AX88796 NE2000 clone
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+#ifndef _ASM_AX88796_H
+#define _ASM_AX88796_H
+
+#include <asm/mb-regs.h>
+
+#define AX88796_IOADDR		(__region_CS1 + 0x200)
+#define AX88796_IRQ		IRQ_CPU_EXTERNAL7
+#define AX88796_FULL_DUPLEX	0			/* force full duplex */
+#define AX88796_BUS_INFO	"CS1#+0x200"		/* bus info for ethtool */
+
+#endif /* _ASM_AX88796_H */
diff -Nru a/include/asm-frv/bitops.h b/include/asm-frv/bitops.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/bitops.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,341 @@
+/* bitops.h: bit operations for the Fujitsu FR-V CPUs
+ *
+ * For an explanation of how atomic ops work in this arch, see:
+ *   Documentation/fujitsu/frv/atomic-ops.txt
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+#ifndef _ASM_BITOPS_H
+#define _ASM_BITOPS_H
+
+#include <linux/config.h>
+#include <linux/compiler.h>
+#include <asm/byteorder.h>
+#include <asm/system.h>
+#include <asm/atomic.h>
+
+#ifdef __KERNEL__
+
+/*
+ * ffz = Find First Zero in word. Undefined if no zero exists,
+ * so code should check against ~0UL first..
+ */
+static inline unsigned long ffz(unsigned long word)
+{
+	unsigned long result = 0;
+
+	while (word & 1) {
+		result++;
+		word >>= 1;
+	}
+	return result;
+}
+
+/*
+ * clear_bit() doesn't provide any barrier for the compiler.
+ */
+#define smp_mb__before_clear_bit()	barrier()
+#define smp_mb__after_clear_bit()	barrier()
+
+static inline int test_and_clear_bit(int nr, volatile void *addr)
+{
+	volatile unsigned long *ptr = addr;
+	unsigned long mask = 1UL << (nr & 31);
+	ptr += nr >> 5;
+	return (atomic_test_and_ANDNOT_mask(mask, ptr) & mask) != 0;
+}
+
+static inline int test_and_set_bit(int nr, volatile void *addr)
+{
+	volatile unsigned long *ptr = addr;
+	unsigned long mask = 1UL << (nr & 31);
+	ptr += nr >> 5;
+	return (atomic_test_and_OR_mask(mask, ptr) & mask) != 0;
+}
+
+static inline int test_and_change_bit(int nr, volatile void *addr)
+{
+	volatile unsigned long *ptr = addr;
+	unsigned long mask = 1UL << (nr & 31);
+	ptr += nr >> 5;
+	return (atomic_test_and_XOR_mask(mask, ptr) & mask) != 0;
+}
+
+static inline void clear_bit(int nr, volatile void *addr)
+{
+	test_and_clear_bit(nr, addr);
+}
+
+static inline void set_bit(int nr, volatile void *addr)
+{
+	test_and_set_bit(nr, addr);
+}
+
+static inline void change_bit(int nr, volatile void * addr)
+{
+	test_and_change_bit(nr, addr);
+}
+
+static inline void __clear_bit(int nr, volatile void * addr)
+{
+	volatile unsigned long *a = addr;
+	int mask;
+
+	a += nr >> 5;
+	mask = 1 << (nr & 31);
+	*a &= ~mask;
+}
+
+static inline void __set_bit(int nr, volatile void * addr)
+{
+	volatile unsigned long *a = addr;
+	int mask;
+
+	a += nr >> 5;
+	mask = 1 << (nr & 31);
+	*a |= mask;
+}
+
+static inline void __change_bit(int nr, volatile void *addr)
+{
+	volatile unsigned long *a = addr;
+	int mask;
+
+	a += nr >> 5;
+	mask = 1 << (nr & 31);
+	*a ^= mask;
+}
+
+static inline int __test_and_clear_bit(int nr, volatile void * addr)
+{
+	volatile unsigned long *a = addr;
+	int mask, retval;
+
+	a += nr >> 5;
+	mask = 1 << (nr & 31);
+	retval = (mask & *a) != 0;
+	*a &= ~mask;
+	return retval;
+}
+
+static inline int __test_and_set_bit(int nr, volatile void * addr)
+{
+	volatile unsigned long *a = addr;
+	int mask, retval;
+
+	a += nr >> 5;
+	mask = 1 << (nr & 31);
+	retval = (mask & *a) != 0;
+	*a |= mask;
+	return retval;
+}
+
+static inline int __test_and_change_bit(int nr, volatile void * addr)
+{
+	volatile unsigned long *a = addr;
+	int mask, retval;
+
+	a += nr >> 5;
+	mask = 1 << (nr & 31);
+	retval = (mask & *a) != 0;
+	*a ^= mask;
+	return retval;
+}
+
+/*
+ * This routine doesn't need to be atomic.
+ */
+static inline int __constant_test_bit(int nr, const volatile void * addr)
+{
+	return ((1UL << (nr & 31)) & (((const volatile unsigned int *) addr)[nr >> 5])) != 0;
+}
+
+static inline int __test_bit(int nr, const volatile void * addr)
+{
+	int 	* a = (int *) addr;
+	int	mask;
+
+	a += nr >> 5;
+	mask = 1 << (nr & 0x1f);
+	return ((mask & *a) != 0);
+}
+
+#define test_bit(nr,addr) \
+(__builtin_constant_p(nr) ? \
+ __constant_test_bit((nr),(addr)) : \
+ __test_bit((nr),(addr)))
+
+extern int find_next_bit(const unsigned long *addr, int size, int offset);
+
+#define find_first_bit(addr, size) find_next_bit(addr, size, 0)
+
+#define find_first_zero_bit(addr, size) \
+        find_next_zero_bit((addr), (size), 0)
+
+static inline int find_next_zero_bit (void * addr, int size, int offset)
+{
+	unsigned long *p = ((unsigned long *) addr) + (offset >> 5);
+	unsigned long result = offset & ~31UL;
+	unsigned long tmp;
+
+	if (offset >= size)
+		return size;
+	size -= result;
+	offset &= 31UL;
+	if (offset) {
+		tmp = *(p++);
+		tmp |= ~0UL >> (32-offset);
+		if (size < 32)
+			goto found_first;
+		if (~tmp)
+			goto found_middle;
+		size -= 32;
+		result += 32;
+	}
+	while (size & ~31UL) {
+		if (~(tmp = *(p++)))
+			goto found_middle;
+		result += 32;
+		size -= 32;
+	}
+	if (!size)
+		return result;
+	tmp = *p;
+
+found_first:
+	tmp |= ~0UL >> size;
+found_middle:
+	return result + ffz(tmp);
+}
+
+#define ffs(x) generic_ffs(x)
+#define __ffs(x) (ffs(x) - 1)
+
+/*
+ * fls: find last bit set.
+ */
+#define fls(x)						\
+({							\
+	int bit;					\
+							\
+	asm("scan %1,gr0,%0" : "=r"(bit) : "r"(x));	\
+							\
+	bit ? 33 - bit : bit;				\
+})
+
+/*
+ * 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(const unsigned long *b)
+{
+	if (unlikely(b[0]))
+		return __ffs(b[0]);
+	if (unlikely(b[1]))
+		return __ffs(b[1]) + 32;
+	if (unlikely(b[2]))
+		return __ffs(b[2]) + 64;
+	if (b[3])
+		return __ffs(b[3]) + 96;
+	return __ffs(b[4]) + 128;
+}
+
+
+/*
+ * hweightN: returns the hamming weight (i.e. the number
+ * of bits set) of a N-bit word
+ */
+
+#define hweight32(x) generic_hweight32(x)
+#define hweight16(x) generic_hweight16(x)
+#define hweight8(x) generic_hweight8(x)
+
+#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))
+
+#define ext2_set_bit_atomic(lock,nr,addr)	ext2_set_bit((nr), addr)
+#define ext2_clear_bit_atomic(lock,nr,addr)	ext2_clear_bit((nr), addr)
+
+static inline int ext2_test_bit(int nr, const volatile void * addr)
+{
+	const volatile unsigned char *ADDR = (const unsigned char *) addr;
+	int mask;
+
+	ADDR += nr >> 3;
+	mask = 1 << (nr & 0x07);
+	return ((mask & *ADDR) != 0);
+}
+
+#define ext2_find_first_zero_bit(addr, size) \
+        ext2_find_next_zero_bit((addr), (size), 0)
+
+static inline unsigned long ext2_find_next_zero_bit(void *addr,
+						    unsigned long size,
+						    unsigned long offset)
+{
+	unsigned long *p = ((unsigned long *) addr) + (offset >> 5);
+	unsigned long result = offset & ~31UL;
+	unsigned long tmp;
+
+	if (offset >= size)
+		return size;
+	size -= result;
+	offset &= 31UL;
+	if(offset) {
+		/* We hold the little endian value in tmp, but then the
+		 * shift is illegal. So we could keep a big endian value
+		 * in tmp, like this:
+		 *
+		 * tmp = __swab32(*(p++));
+		 * tmp |= ~0UL >> (32-offset);
+		 *
+		 * but this would decrease preformance, so we change the
+		 * shift:
+		 */
+		tmp = *(p++);
+		tmp |= __swab32(~0UL >> (32-offset));
+		if(size < 32)
+			goto found_first;
+		if(~tmp)
+			goto found_middle;
+		size -= 32;
+		result += 32;
+	}
+	while(size & ~31UL) {
+		if(~(tmp = *(p++)))
+			goto found_middle;
+		result += 32;
+		size -= 32;
+	}
+	if(!size)
+		return result;
+	tmp = *p;
+
+found_first:
+	/* tmp is little endian, so we would have to swab the shift,
+	 * see above. But then we have to swab tmp below for ffz, so
+	 * we might as well do this here.
+	 */
+	return result + ffz(__swab32(tmp) | (~0UL << size));
+found_middle:
+	return result + ffz(__swab32(tmp));
+}
+
+/* Bitmap functions for the minix filesystem.  */
+#define minix_test_and_set_bit(nr,addr)		ext2_set_bit(nr,addr)
+#define minix_set_bit(nr,addr)			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)
+
+#endif /* __KERNEL__ */
+
+#endif /* _ASM_BITOPS_H */
diff -Nru a/include/asm-frv/bug.h b/include/asm-frv/bug.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/bug.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,51 @@
+/* bug.h: FRV bug trapping
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+#ifndef _ASM_BUG_H
+#define _ASM_BUG_H
+
+#include <linux/config.h>
+
+/*
+ * Tell the user there is some problem.
+ */
+extern asmlinkage void __debug_bug_trap(int signr);
+
+#ifdef CONFIG_NO_KERNEL_MSG
+#define	_debug_bug_printk()
+#else
+extern void __debug_bug_printk(const char *file, unsigned line);
+#define	_debug_bug_printk() __debug_bug_printk(__FILE__, __LINE__)
+#endif
+
+#define _debug_bug_trap(signr)			\
+do {						\
+	__debug_bug_trap(signr);		\
+	asm volatile("nop");			\
+} while(0)
+
+#define HAVE_ARCH_BUG
+#define BUG()					\
+do {						\
+	_debug_bug_printk();			\
+	_debug_bug_trap(6 /*SIGABRT*/);		\
+} while (0)
+
+#ifdef CONFIG_GDBSTUB
+#define HAVE_ARCH_KGDB_RAISE
+#define kgdb_raise(signr) do { _debug_bug_trap(signr); } while(0)
+
+#define HAVE_ARCH_KGDB_BAD_PAGE
+#define kgdb_bad_page(page) do { kgdb_raise(SIGABRT); } while(0)
+#endif
+
+#include <asm-generic/bug.h>
+
+#endif
diff -Nru a/include/asm-frv/bugs.h b/include/asm-frv/bugs.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/bugs.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,14 @@
+/* bugs.h: arch bug checking entry
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+static inline void check_bugs(void)
+{
+}
diff -Nru a/include/asm-frv/busctl-regs.h b/include/asm-frv/busctl-regs.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/busctl-regs.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,41 @@
+/* busctl-regs.h: FR400-series CPU bus controller registers
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+#ifndef _ASM_BUSCTL_REGS_H
+#define _ASM_BUSCTL_REGS_H
+
+/* bus controller registers */
+#define __get_LGCR()	({ *(volatile unsigned long *)(0xfe000010); })
+#define __get_LMAICR()	({ *(volatile unsigned long *)(0xfe000030); })
+#define __get_LEMBR()	({ *(volatile unsigned long *)(0xfe000040); })
+#define __get_LEMAM()	({ *(volatile unsigned long *)(0xfe000048); })
+#define __get_LCR(R)	({ *(volatile unsigned long *)(0xfe000100 + 8*(R)); })
+#define __get_LSBR(R)	({ *(volatile unsigned long *)(0xfe000c00 + 8*(R)); })
+#define __get_LSAM(R)	({ *(volatile unsigned long *)(0xfe000d00 + 8*(R)); })
+
+#define __set_LGCR(V)	do { *(volatile unsigned long *)(0xfe000010) = (V); } while(0)
+#define __set_LMAICR(V)	do { *(volatile unsigned long *)(0xfe000030) = (V); } while(0)
+#define __set_LEMBR(V)	do { *(volatile unsigned long *)(0xfe000040) = (V); } while(0)
+#define __set_LEMAM(V)	do { *(volatile unsigned long *)(0xfe000048) = (V); } while(0)
+#define __set_LCR(R,V)	do { *(volatile unsigned long *)(0xfe000100 + 8*(R)) = (V); } while(0)
+#define __set_LSBR(R,V)	do { *(volatile unsigned long *)(0xfe000c00 + 8*(R)) = (V); } while(0)
+#define __set_LSAM(R,V)	do { *(volatile unsigned long *)(0xfe000d00 + 8*(R)) = (V); } while(0)
+
+/* FR401 SDRAM controller registers */
+#define __get_DBR(R)	({ *(volatile unsigned long *)(0xfe000e00 + 8*(R)); })
+#define __get_DAM(R)	({ *(volatile unsigned long *)(0xfe000f00 + 8*(R)); })
+
+/* FR551 SDRAM controller registers */
+#define __get_DARS(R)	({ *(volatile unsigned long *)(0xfeff0100 + 8*(R)); })
+#define __get_DAMK(R)	({ *(volatile unsigned long *)(0xfeff0110 + 8*(R)); })
+
+
+#endif /* _ASM_BUSCTL_REGS_H */
diff -Nru a/include/asm-frv/byteorder.h b/include/asm-frv/byteorder.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/byteorder.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,13 @@
+#ifndef _ASM_BYTEORDER_H
+#define _ASM_BYTEORDER_H
+
+#include <asm/types.h>
+
+#if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__)
+#  define __BYTEORDER_HAS_U64__
+#  define __SWAB_64_THRU_32__
+#endif
+
+#include <linux/byteorder/big_endian.h>
+
+#endif /* _ASM_BYTEORDER_H */
diff -Nru a/include/asm-frv/cache.h b/include/asm-frv/cache.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/cache.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,24 @@
+/* cache.h: FRV cache definitions
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+#ifndef __ASM_CACHE_H
+#define __ASM_CACHE_H
+
+#include <linux/config.h>
+
+/* bytes per L1 cache line */
+#define L1_CACHE_SHIFT		(CONFIG_FRV_L1_CACHE_SHIFT)
+#define L1_CACHE_BYTES		(1 << L1_CACHE_SHIFT)
+
+#define __cacheline_aligned	__attribute__((aligned(L1_CACHE_BYTES)))
+#define ____cacheline_aligned	__attribute__((aligned(L1_CACHE_BYTES)))
+
+#endif
diff -Nru a/include/asm-frv/cacheflush.h b/include/asm-frv/cacheflush.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/cacheflush.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,91 @@
+/* cacheflush.h: FRV cache flushing routines
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+#ifndef _ASM_CACHEFLUSH_H
+#define _ASM_CACHEFLUSH_H
+
+/* Keep includes the same across arches.  */
+#include <linux/mm.h>
+
+/*
+ * virtually-indexed cache management (our cache is physically indexed)
+ */
+#define flush_cache_all()			do {} while(0)
+#define flush_cache_mm(mm)			do {} while(0)
+#define flush_cache_range(mm, start, end)	do {} while(0)
+#define flush_cache_page(vma, vmaddr)		do {} while(0)
+#define flush_cache_vmap(start, end)		do {} while(0)
+#define flush_cache_vunmap(start, end)		do {} while(0)
+#define flush_dcache_mmap_lock(mapping)		do {} while(0)
+#define flush_dcache_mmap_unlock(mapping)	do {} while(0)
+
+/*
+ * physically-indexed cache managment
+ * - see arch/frv/lib/cache.S
+ */
+extern void frv_dcache_writeback(unsigned long start, unsigned long size);
+extern void frv_cache_invalidate(unsigned long start, unsigned long size);
+extern void frv_icache_invalidate(unsigned long start, unsigned long size);
+extern void frv_cache_wback_inv(unsigned long start, unsigned long size);
+
+static inline void __flush_cache_all(void)
+{
+	asm volatile("	dcef	@(gr0,gr0),#1	\n"
+		     "	icei	@(gr0,gr0),#1	\n"
+		     "	membar			\n"
+		     : : : "memory"
+		     );
+}
+
+/* dcache/icache coherency... */
+#ifdef CONFIG_MMU
+extern void flush_dcache_page(struct page *page);
+#else
+static inline void flush_dcache_page(struct page *page)
+{
+	unsigned long addr = page_to_phys(page);
+	frv_dcache_writeback(addr, addr + PAGE_SIZE);
+}
+#endif
+
+static inline void flush_page_to_ram(struct page *page)
+{
+	flush_dcache_page(page);
+}
+
+static inline void flush_icache(void)
+{
+	__flush_cache_all();
+}
+
+static inline void flush_icache_range(unsigned long start, unsigned long end)
+{
+	frv_cache_wback_inv(start, end);
+}
+
+#ifdef CONFIG_MMU
+extern void flush_icache_user_range(struct vm_area_struct *vma, struct page *page,
+				    unsigned long start, unsigned long len);
+#else
+static inline void flush_icache_user_range(struct vm_area_struct *vma, struct page *page,
+					   unsigned long start, unsigned long len)
+{
+	frv_cache_wback_inv(start, start + len);
+}
+#endif
+
+static inline void flush_icache_page(struct vm_area_struct *vma, struct page *page)
+{
+	flush_icache_user_range(vma, page, page_to_phys(page), PAGE_SIZE);
+}
+
+
+#endif /* _ASM_CACHEFLUSH_H */
diff -Nru a/include/asm-frv/checksum.h b/include/asm-frv/checksum.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/checksum.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,183 @@
+/* checksum.h: FRV checksumming
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+#ifndef _ASM_CHECKSUM_H
+#define _ASM_CHECKSUM_H
+
+#include <linux/in6.h>
+
+/*
+ * computes the checksum of a memory block at buff, length len,
+ * and adds in "sum" (32-bit)
+ *
+ * returns a 32-bit number suitable for feeding into itself
+ * or csum_tcpudp_magic
+ *
+ * this function must be called with even lengths, except
+ * for the last fragment, which may be odd
+ *
+ * it's best to have buff aligned on a 32-bit boundary
+ */
+unsigned int csum_partial(const unsigned char * buff, int len, unsigned int sum);
+
+/*
+ * 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
+ * better 64-bit) boundary
+ */
+unsigned int csum_partial_copy(const char *src, char *dst, int len, int sum);
+
+/*
+ * the same as csum_partial_copy, but copies from user space.
+ *
+ * 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_from_user(const char *src, char *dst,
+						int len, int sum, int *csum_err);
+
+#define csum_partial_copy_nocheck(src, dst, len, sum)	\
+	csum_partial_copy((src), (dst), (len), (sum))
+
+/*
+ *	This is a version of ip_compute_csum() optimized for IP headers,
+ *	which always checksum on 4 octet boundaries.
+ *
+ */
+static inline
+unsigned short ip_fast_csum(unsigned char *iph, unsigned int ihl)
+{
+	unsigned int tmp, inc, sum = 0;
+
+	asm("	addcc		gr0,gr0,gr0,icc0\n" /* clear icc0.C */
+	    "	subi		%1,#4,%1	\n"
+	    "0:					\n"
+	    "	ldu.p		@(%1,%3),%4	\n"
+	    "	subicc		%2,#1,%2,icc1	\n"
+	    "	addxcc.p	%4,%0,%0,icc0	\n"
+	    "	bhi		icc1,#2,0b	\n"
+
+	    /* fold the 33-bit result into 16-bits */
+	    "	addxcc		gr0,%0,%0,icc0	\n"
+	    "	srli		%0,#16,%1	\n"
+	    "	sethi		#0,%0		\n"
+	    "	add		%1,%0,%0	\n"
+	    "	srli		%0,#16,%1	\n"
+	    "	add		%1,%0,%0	\n"
+
+	    : "=r" (sum), "=r" (iph), "=r" (ihl), "=r" (inc), "=&r"(tmp)
+	    : "0" (sum), "1" (iph), "2" (ihl), "3" (4),
+	    "m"(*(volatile struct { int _[100]; } *)iph)
+	    : "icc0", "icc1"
+	    );
+
+	return ~sum;
+}
+
+/*
+ *	Fold a partial checksum
+ */
+static inline unsigned int csum_fold(unsigned int sum)
+{
+	unsigned int tmp;
+
+	asm("	srli		%0,#16,%1	\n"
+	    "	sethi		#0,%0		\n"
+	    "	add		%1,%0,%0	\n"
+	    "	srli		%0,#16,%1	\n"
+	    "	add		%1,%0,%0	\n"
+	    : "=r"(sum), "=&r"(tmp)
+	    : "0"(sum)
+	    );
+
+	return ~sum;
+}
+
+/*
+ * computes the checksum of the TCP/UDP pseudo-header
+ * returns a 16-bit checksum, already complemented
+ */
+static inline unsigned int
+csum_tcpudp_nofold(unsigned long saddr, unsigned long daddr, unsigned short len,
+		  unsigned short proto, unsigned int sum)
+{
+	asm("	addcc		%1,%0,%0,icc0	\n"
+	    "	addxcc		%2,%0,%0,icc0	\n"
+	    "	addxcc		%3,%0,%0,icc0	\n"
+	    "	addxcc		gr0,%0,%0,icc0	\n"
+	    : "=r" (sum)
+	    : "r" (daddr), "r" (saddr), "r" (len + proto), "0"(sum)
+	    : "icc0"
+	    );
+	return sum;
+}
+
+static inline unsigned short int
+csum_tcpudp_magic(unsigned long saddr, unsigned long daddr, unsigned short len,
+		  unsigned short proto, unsigned int sum)
+{
+	return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum));
+}
+
+/*
+ * this routine is used for miscellaneous IP-like checksums, mainly
+ * in icmp.c
+ */
+extern unsigned short ip_compute_csum(const unsigned char * buff, int len);
+
+#define _HAVE_ARCH_IPV6_CSUM
+static inline unsigned short int
+csum_ipv6_magic(struct in6_addr *saddr, struct in6_addr *daddr,
+		__u32 len, unsigned short proto, unsigned int sum)
+{
+	unsigned long tmp, tmp2;
+
+	asm("	addcc		%2,%0,%0,icc0	\n"
+
+	    /* add up the source addr */
+	    "	ldi		@(%3,0),%1	\n"
+	    "	addxcc		%1,%0,%0,icc0	\n"
+	    "	ldi		@(%3,4),%2	\n"
+	    "	addxcc		%2,%0,%0,icc0	\n"
+	    "	ldi		@(%3,8),%1	\n"
+	    "	addxcc		%1,%0,%0,icc0	\n"
+	    "	ldi		@(%3,12),%2	\n"
+	    "	addxcc		%2,%0,%0,icc0	\n"
+
+	    /* add up the dest addr */
+	    "	ldi		@(%4,0),%1	\n"
+	    "	addxcc		%1,%0,%0,icc0	\n"
+	    "	ldi		@(%4,4),%2	\n"
+	    "	addxcc		%2,%0,%0,icc0	\n"
+	    "	ldi		@(%4,8),%1	\n"
+	    "	addxcc		%1,%0,%0,icc0	\n"
+	    "	ldi		@(%4,12),%2	\n"
+	    "	addxcc		%2,%0,%0,icc0	\n"
+
+	    /* fold the 33-bit result into 16-bits */
+	    "	addxcc		gr0,%0,%0,icc0	\n"
+	    "	srli		%0,#16,%1	\n"
+	    "	sethi		#0,%0		\n"
+	    "	add		%1,%0,%0	\n"
+	    "	srli		%0,#16,%1	\n"
+	    "	add		%1,%0,%0	\n"
+
+	    : "=r" (sum), "=&r" (tmp), "=r" (tmp2)
+	    : "r" (saddr), "r" (daddr), "0" (sum), "2" (len + proto)
+	    : "icc0"
+	    );
+
+	return ~sum;
+}
+
+#endif /* _ASM_CHECKSUM_H */
diff -Nru a/include/asm-frv/cpu-irqs.h b/include/asm-frv/cpu-irqs.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/cpu-irqs.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,87 @@
+/* cpu-irqs.h: on-CPU peripheral irqs
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+#ifndef _ASM_CPU_IRQS_H
+#define _ASM_CPU_IRQS_H
+
+#ifndef __ASSEMBLY__
+
+#include <asm/irq-routing.h>
+
+#define IRQ_BASE_CPU		(NR_IRQ_ACTIONS_PER_GROUP * 0)
+
+/* IRQ IDs presented to drivers */
+enum {
+	IRQ_CPU__UNUSED = IRQ_BASE_CPU,
+	IRQ_CPU_UART0,
+	IRQ_CPU_UART1,
+	IRQ_CPU_TIMER0,
+	IRQ_CPU_TIMER1,
+	IRQ_CPU_TIMER2,
+	IRQ_CPU_DMA0,
+	IRQ_CPU_DMA1,
+	IRQ_CPU_DMA2,
+	IRQ_CPU_DMA3,
+	IRQ_CPU_DMA4,
+	IRQ_CPU_DMA5,
+	IRQ_CPU_DMA6,
+	IRQ_CPU_DMA7,
+	IRQ_CPU_EXTERNAL0,
+	IRQ_CPU_EXTERNAL1,
+	IRQ_CPU_EXTERNAL2,
+	IRQ_CPU_EXTERNAL3,
+	IRQ_CPU_EXTERNAL4,
+	IRQ_CPU_EXTERNAL5,
+	IRQ_CPU_EXTERNAL6,
+	IRQ_CPU_EXTERNAL7,
+};
+
+/* IRQ to level mappings */
+#define IRQ_GDBSTUB_LEVEL	15
+#define IRQ_UART_LEVEL		13
+
+#ifdef CONFIG_GDBSTUB_UART0
+#define IRQ_UART0_LEVEL		IRQ_GDBSTUB_LEVEL
+#else
+#define IRQ_UART0_LEVEL		IRQ_UART_LEVEL
+#endif
+
+#ifdef CONFIG_GDBSTUB_UART1
+#define IRQ_UART1_LEVEL		IRQ_GDBSTUB_LEVEL
+#else
+#define IRQ_UART1_LEVEL		IRQ_UART_LEVEL
+#endif
+
+#define IRQ_DMA0_LEVEL		14
+#define IRQ_DMA1_LEVEL		14
+#define IRQ_DMA2_LEVEL		14
+#define IRQ_DMA3_LEVEL		14
+#define IRQ_DMA4_LEVEL		14
+#define IRQ_DMA5_LEVEL		14
+#define IRQ_DMA6_LEVEL		14
+#define IRQ_DMA7_LEVEL		14
+
+#define IRQ_TIMER0_LEVEL	12
+#define IRQ_TIMER1_LEVEL	11
+#define IRQ_TIMER2_LEVEL	10
+
+#define IRQ_XIRQ0_LEVEL		1
+#define IRQ_XIRQ1_LEVEL		2
+#define IRQ_XIRQ2_LEVEL		3
+#define IRQ_XIRQ3_LEVEL		4
+#define IRQ_XIRQ4_LEVEL		5
+#define IRQ_XIRQ5_LEVEL		6
+#define IRQ_XIRQ6_LEVEL		7
+#define IRQ_XIRQ7_LEVEL		8
+
+#endif /* !__ASSEMBLY__ */
+
+#endif /* _ASM_CPU_IRQS_H */
diff -Nru a/include/asm-frv/cpumask.h b/include/asm-frv/cpumask.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/cpumask.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,6 @@
+#ifndef _ASM_CPUMASK_H
+#define _ASM_CPUMASK_H
+
+#include <asm-generic/cpumask.h>
+
+#endif /* _ASM_CPUMASK_H */
diff -Nru a/include/asm-frv/cputime.h b/include/asm-frv/cputime.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/cputime.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,6 @@
+#ifndef _ASM_CPUTIME_H
+#define _ASM_CPUTIME_H
+
+#include <asm-generic/cputime.h>
+
+#endif /* _ASM_CPUTIME_H */
diff -Nru a/include/asm-frv/current.h b/include/asm-frv/current.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/current.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,30 @@
+/* current.h: FRV current task pointer
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+#ifndef _ASM_CURRENT_H
+#define _ASM_CURRENT_H
+
+#ifndef __ASSEMBLY__
+
+/*
+ * dedicate GR29 to keeping the current task pointer
+ */
+register struct task_struct *current asm("gr29");
+
+#define get_current() current
+
+#else
+
+#define CURRENT gr29
+
+#endif
+
+#endif /* _ASM_CURRENT_H */
diff -Nru a/include/asm-frv/delay.h b/include/asm-frv/delay.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/delay.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,50 @@
+/* delay.h: FRV delay code
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+#ifndef _ASM_DELAY_H
+#define _ASM_DELAY_H
+
+#include <asm/param.h>
+#include <asm/timer-regs.h>
+
+/*
+ * delay loop - runs at __core_clock_speed_HZ / 2 [there are 2 insns in the loop]
+ */
+extern unsigned long __delay_loops_MHz;
+
+static inline void __delay(unsigned long loops)
+{
+	asm volatile("1:	subicc	%0,#1,%0,icc0	\n"
+		     "		bnc	icc0,#2,1b	\n"
+		     : "=r" (loops)
+		     : "0" (loops)
+		     : "icc0"
+		     );
+}
+
+/*
+ * Use only for very small delays ( < 1 msec).  Should probably use a
+ * lookup table, really, as the multiplications take much too long with
+ * short delays.  This is a "reasonable" implementation, though (and the
+ * first constant multiplications gets optimized away if the delay is
+ * a constant)
+ */
+
+extern unsigned long loops_per_jiffy;
+
+static inline void udelay(unsigned long usecs)
+{
+	__delay(usecs * __delay_loops_MHz);
+}
+
+#define ndelay(n)	udelay((n) * 5)
+
+#endif /* _ASM_DELAY_H */
diff -Nru a/include/asm-frv/div64.h b/include/asm-frv/div64.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/div64.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1 @@
+#include <asm-generic/div64.h>
diff -Nru a/include/asm-frv/dm9000.h b/include/asm-frv/dm9000.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/dm9000.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,37 @@
+/* dm9000.h: Davicom DM9000 adapter configuration
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+#ifndef _ASM_DM9000_H
+#define _ASM_DM9000_H
+
+#include <asm/mb-regs.h>
+
+#define DM9000_ARCH_IOBASE	(__region_CS6 + 0x300)
+#define DM9000_ARCH_IRQ		IRQ_CPU_EXTERNAL3	/* XIRQ #3 (shared with FPGA) */
+#undef DM9000_ARCH_IRQ_ACTLOW				/* IRQ pin active high */
+#define DM9000_ARCH_BUS_INFO	"CS6#+0x300"		/* bus info for ethtool */
+
+#undef __is_PCI_IO
+#define __is_PCI_IO(addr)	0	/* not PCI */
+
+#undef inl
+#define inl(addr)										\
+({												\
+	unsigned long __ioaddr = (unsigned long) addr;						\
+	uint32_t x = readl(__ioaddr);								\
+	((x & 0xff) << 24) | ((x & 0xff00) << 8) | ((x >> 8) & 0xff00) | ((x >> 24) & 0xff);	\
+})
+
+#undef insl
+#define insl(a,b,l)	__insl(a,b,l,0) /* don't byte-swap */
+
+
+#endif /* _ASM_DM9000_H */
diff -Nru a/include/asm-frv/dma-mapping.h b/include/asm-frv/dma-mapping.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/dma-mapping.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,184 @@
+#ifndef _ASM_DMA_MAPPING_H
+#define _ASM_DMA_MAPPING_H
+
+#include <linux/device.h>
+#include <asm/cache.h>
+#include <asm/cacheflush.h>
+#include <asm/scatterlist.h>
+#include <asm/io.h>
+
+#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
+#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)
+
+extern unsigned long __nongprelbss dma_coherent_mem_start;
+extern unsigned long __nongprelbss dma_coherent_mem_end;
+
+void *dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, int gfp);
+void dma_free_coherent(struct device *dev, size_t size, void *vaddr, dma_addr_t dma_handle);
+
+/*
+ * These macros should be used after a pci_map_sg call has been done
+ * to get bus addresses of each of the SG entries and their lengths.
+ * You should only work with the number of sg entries pci_map_sg
+ * returns, or alternatively stop on the first sg_dma_len(sg) which
+ * is 0.
+ */
+#define sg_dma_address(sg)	((unsigned long) (page_to_phys((sg)->page) + (sg)->offset))
+#define sg_dma_len(sg)		((sg)->length)
+
+/*
+ * Map a single buffer of the indicated size for DMA in streaming mode.
+ * The 32-bit bus address to use is returned.
+ *
+ * Once the device is given the dma address, the device owns this memory
+ * until either pci_unmap_single or pci_dma_sync_single is performed.
+ */
+extern dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size,
+				 enum dma_data_direction direction);
+
+/*
+ * Unmap a single streaming mode DMA translation.  The dma_addr and size
+ * must match what was provided for in a previous pci_map_single call.  All
+ * other usages are undefined.
+ *
+ * After this call, reads by the cpu to the buffer are guarenteed to see
+ * whatever the device wrote there.
+ */
+static inline
+void dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
+		      enum dma_data_direction direction)
+{
+	BUG_ON(direction == DMA_NONE);
+}
+
+/*
+ * Map a set of buffers described by scatterlist in streaming
+ * mode for DMA.  This is the scather-gather version of the
+ * above pci_map_single interface.  Here the scatter gather list
+ * elements are each tagged with the appropriate dma address
+ * and length.  They are obtained via sg_dma_{address,length}(SG).
+ *
+ * NOTE: An implementation may be able to use a smaller number of
+ *       DMA address/length pairs than there are SG table elements.
+ *       (for example via virtual mapping capabilities)
+ *       The routine returns the number of addr/length pairs actually
+ *       used, at most nents.
+ *
+ * Device ownership issues as mentioned above for pci_map_single are
+ * the same here.
+ */
+extern int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
+		      enum dma_data_direction direction);
+
+/*
+ * Unmap a set of streaming mode DMA translations.
+ * Again, cpu read rules concerning calls here are the same as for
+ * pci_unmap_single() above.
+ */
+static inline
+void dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries,
+	     enum dma_data_direction direction)
+{
+	BUG_ON(direction == DMA_NONE);
+}
+
+extern
+dma_addr_t dma_map_page(struct device *dev, struct page *page, unsigned long offset,
+			size_t size, enum dma_data_direction direction);
+
+static inline
+void dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size,
+		    enum dma_data_direction direction)
+{
+	BUG_ON(direction == DMA_NONE);
+}
+
+
+static inline
+void dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, size_t size,
+			     enum dma_data_direction direction)
+{
+}
+
+static inline
+void dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, size_t size,
+				enum dma_data_direction direction)
+{
+	flush_write_buffers();
+}
+
+static inline
+void dma_sync_single_range_for_cpu(struct device *dev, dma_addr_t dma_handle,
+				   unsigned long offset, size_t size,
+				   enum dma_data_direction direction)
+{
+}
+
+static inline
+void dma_sync_single_range_for_device(struct device *dev, dma_addr_t dma_handle,
+				      unsigned long offset, size_t size,
+				      enum dma_data_direction direction)
+{
+	flush_write_buffers();
+}
+
+static inline
+void dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems,
+			 enum dma_data_direction direction)
+{
+}
+
+static inline
+void dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems,
+			    enum dma_data_direction direction)
+{
+	flush_write_buffers();
+}
+
+static inline
+int dma_mapping_error(dma_addr_t dma_addr)
+{
+	return 0;
+}
+
+static inline
+int dma_supported(struct device *dev, u64 mask)
+{
+        /*
+         * we fall back to GFP_DMA when the mask isn't all 1s,
+         * so we can't guarantee allocations that must be
+         * within a tighter range than GFP_DMA..
+         */
+        if (mask < 0x00ffffff)
+                return 0;
+
+	return 1;
+}
+
+static inline
+int dma_set_mask(struct device *dev, u64 mask)
+{
+	if (!dev->dma_mask || !dma_supported(dev, mask))
+		return -EIO;
+
+	*dev->dma_mask = mask;
+
+	return 0;
+}
+
+static inline
+int dma_get_cache_alignment(void)
+{
+	return 1 << L1_CACHE_SHIFT;
+}
+
+#define dma_is_consistent(d)	(1)
+
+static inline
+void dma_cache_sync(void *vaddr, size_t size,
+		    enum dma_data_direction direction)
+{
+	flush_write_buffers();
+}
+
+#endif  /* _ASM_DMA_MAPPING_H */
diff -Nru a/include/asm-frv/dma.h b/include/asm-frv/dma.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/dma.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,129 @@
+/* dma.h: FRV DMA controller management
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+#ifndef _ASM_DMA_H
+#define _ASM_DMA_H
+
+//#define DMA_DEBUG 1
+
+#include <linux/config.h>
+#include <linux/interrupt.h>
+
+#undef MAX_DMA_CHANNELS		/* don't use kernel/dma.c */
+
+/* under 2.4 this is actually needed by the new bootmem allocator */
+#define MAX_DMA_ADDRESS		PAGE_OFFSET
+
+/*
+ * FRV DMA controller management
+ */
+struct pt_regs;
+
+typedef irqreturn_t (*dma_irq_handler_t)(int dmachan, unsigned long cstr, void *data,
+					 struct pt_regs *regs);
+
+extern void frv_dma_init(void);
+
+extern int frv_dma_open(const char *devname,
+			unsigned long dmamask,
+			int dmacap,
+			dma_irq_handler_t handler,
+			unsigned long irq_flags,
+			void *data);
+
+/* channels required */
+#define FRV_DMA_MASK_ANY	ULONG_MAX	/* any channel */
+
+/* capabilities required */
+#define FRV_DMA_CAP_DREQ	0x01		/* DMA request pin */
+#define FRV_DMA_CAP_DACK	0x02		/* DMA ACK pin */
+#define FRV_DMA_CAP_DONE	0x04		/* DMA done pin */
+
+extern void frv_dma_close(int dma);
+
+extern void frv_dma_config(int dma, unsigned long ccfr, unsigned long cctr, unsigned long apr);
+
+extern void frv_dma_start(int dma,
+			  unsigned long sba, unsigned long dba,
+			  unsigned long pix, unsigned long six, unsigned long bcl);
+
+extern void frv_dma_restart_circular(int dma, unsigned long six);
+
+extern void frv_dma_stop(int dma);
+
+extern int is_frv_dma_interrupting(int dma);
+
+extern void frv_dma_dump(int dma);
+
+extern void frv_dma_status_clear(int dma);
+
+#define FRV_DMA_NCHANS	8
+#define FRV_DMA_4CHANS	4
+#define FRV_DMA_8CHANS	8
+
+#define DMAC_CCFRx		0x00	/* channel configuration reg */
+#define DMAC_CCFRx_CM_SHIFT	16
+#define DMAC_CCFRx_CM_DA	0x00000000
+#define DMAC_CCFRx_CM_SCA	0x00010000
+#define DMAC_CCFRx_CM_DCA	0x00020000
+#define DMAC_CCFRx_CM_2D	0x00030000
+#define DMAC_CCFRx_ATS_SHIFT	8
+#define DMAC_CCFRx_RS_INTERN	0x00000000
+#define DMAC_CCFRx_RS_EXTERN	0x00000001
+#define DMAC_CCFRx_RS_SHIFT	0
+
+#define DMAC_CSTRx		0x08	/* channel status reg */
+#define DMAC_CSTRx_FS		0x0000003f
+#define DMAC_CSTRx_NE		0x00000100
+#define DMAC_CSTRx_FED		0x00000200
+#define DMAC_CSTRx_WER		0x00000800
+#define DMAC_CSTRx_RER		0x00001000
+#define DMAC_CSTRx_CE		0x00002000
+#define DMAC_CSTRx_INT		0x00800000
+#define DMAC_CSTRx_BUSY		0x80000000
+
+#define DMAC_CCTRx		0x10	/* channel control reg */
+#define DMAC_CCTRx_DSIZ_1	0x00000000
+#define DMAC_CCTRx_DSIZ_2	0x00000001
+#define DMAC_CCTRx_DSIZ_4	0x00000002
+#define DMAC_CCTRx_DSIZ_32	0x00000005
+#define DMAC_CCTRx_DAU_HOLD	0x00000000
+#define DMAC_CCTRx_DAU_INC	0x00000010
+#define DMAC_CCTRx_DAU_DEC	0x00000020
+#define DMAC_CCTRx_SSIZ_1	0x00000000
+#define DMAC_CCTRx_SSIZ_2	0x00000100
+#define DMAC_CCTRx_SSIZ_4	0x00000200
+#define DMAC_CCTRx_SSIZ_32	0x00000500
+#define DMAC_CCTRx_SAU_HOLD	0x00000000
+#define DMAC_CCTRx_SAU_INC	0x00001000
+#define DMAC_CCTRx_SAU_DEC	0x00002000
+#define DMAC_CCTRx_FC		0x08000000
+#define DMAC_CCTRx_ICE		0x10000000
+#define DMAC_CCTRx_IE		0x40000000
+#define DMAC_CCTRx_ACT		0x80000000
+
+#define DMAC_SBAx		0x18	/* source base address reg */
+#define DMAC_DBAx		0x20	/* data base address reg */
+#define DMAC_PIXx		0x28	/* primary index reg */
+#define DMAC_SIXx		0x30	/* secondary index reg */
+#define DMAC_BCLx		0x38	/* byte count limit reg */
+#define DMAC_APRx		0x40	/* alternate pointer reg */
+
+/*
+ * required for PCI + MODULES
+ */
+#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-frv/elf.h b/include/asm-frv/elf.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/elf.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,147 @@
+/* elf.h: FR-V ELF definitions
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ * - Derived from include/asm-m68knommu/elf.h
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+#ifndef __ASM_ELF_H
+#define __ASM_ELF_H
+
+#include <linux/config.h>
+#include <asm/ptrace.h>
+#include <asm/user.h>
+
+struct elf32_hdr;
+
+/*
+ * ELF header e_flags defines.
+ */
+#define EF_FRV_GPR_MASK         0x00000003 /* mask for # of gprs */
+#define EF_FRV_GPR32		0x00000001 /* Only uses GR on 32-register */
+#define EF_FRV_GPR64		0x00000002 /* Only uses GR on 64-register */
+#define EF_FRV_FPR_MASK         0x0000000c /* mask for # of fprs */
+#define EF_FRV_FPR32		0x00000004 /* Only uses FR on 32-register */
+#define EF_FRV_FPR64		0x00000008 /* Only uses FR on 64-register */
+#define EF_FRV_FPR_NONE		0x0000000C /* Uses software floating-point */
+#define EF_FRV_DWORD_MASK       0x00000030 /* mask for dword support */
+#define EF_FRV_DWORD_YES	0x00000010 /* Assumes stack aligned to 8-byte boundaries. */
+#define EF_FRV_DWORD_NO		0x00000020 /* Assumes stack aligned to 4-byte boundaries. */
+#define EF_FRV_DOUBLE		0x00000040 /* Uses double instructions. */
+#define EF_FRV_MEDIA		0x00000080 /* Uses media instructions. */
+#define EF_FRV_PIC		0x00000100 /* Uses position independent code. */
+#define EF_FRV_NON_PIC_RELOCS	0x00000200 /* Does not use position Independent code. */
+#define EF_FRV_MULADD           0x00000400 /* -mmuladd */
+#define EF_FRV_BIGPIC           0x00000800 /* -fPIC */
+#define EF_FRV_LIBPIC           0x00001000 /* -mlibrary-pic */
+#define EF_FRV_G0               0x00002000 /* -G 0, no small data ptr */
+#define EF_FRV_NOPACK           0x00004000 /* -mnopack */
+#define EF_FRV_FDPIC            0x00008000 /* -mfdpic */
+#define EF_FRV_CPU_MASK         0xff000000 /* specific cpu bits */
+#define EF_FRV_CPU_GENERIC	0x00000000 /* Set CPU type is FR-V */
+#define EF_FRV_CPU_FR500	0x01000000 /* Set CPU type is FR500 */
+#define EF_FRV_CPU_FR300	0x02000000 /* Set CPU type is FR300 */
+#define EF_FRV_CPU_SIMPLE       0x03000000 /* SIMPLE */
+#define EF_FRV_CPU_TOMCAT       0x04000000 /* Tomcat, FR500 prototype */
+#define EF_FRV_CPU_FR400	0x05000000 /* Set CPU type is FR400 */
+#define EF_FRV_CPU_FR550        0x06000000 /* Set CPU type is FR550 */
+#define EF_FRV_CPU_FR405	0x07000000 /* Set CPU type is FR405 */
+#define EF_FRV_CPU_FR450	0x08000000 /* Set CPU type is FR450 */
+
+/*
+ * FR-V ELF relocation types
+ */
+
+
+/*
+ * ELF register definitions..
+ */
+typedef unsigned long elf_greg_t;
+
+#define ELF_NGREG (sizeof(struct pt_regs) / sizeof(elf_greg_t))
+typedef elf_greg_t elf_gregset_t[ELF_NGREG];
+
+typedef struct fpmedia_struct elf_fpregset_t;
+
+/*
+ * This is used to ensure we don't load something for the wrong architecture.
+ */
+extern int elf_check_arch(const struct elf32_hdr *hdr);
+
+#define elf_check_fdpic(x) ((x)->e_flags & EF_FRV_FDPIC && !((x)->e_flags & EF_FRV_NON_PIC_RELOCS))
+#define elf_check_const_displacement(x) ((x)->e_flags & EF_FRV_PIC)
+
+/*
+ * These are used to set parameters in the core dumps.
+ */
+#define ELF_CLASS	ELFCLASS32
+#define ELF_DATA	ELFDATA2MSB
+#define ELF_ARCH	EM_FRV
+
+#define ELF_PLAT_INIT(_r)			\
+do {						\
+	__kernel_frame0_ptr->gr16	= 0;	\
+	__kernel_frame0_ptr->gr17	= 0;	\
+	__kernel_frame0_ptr->gr18	= 0;	\
+	__kernel_frame0_ptr->gr19	= 0;	\
+	__kernel_frame0_ptr->gr20	= 0;	\
+	__kernel_frame0_ptr->gr21	= 0;	\
+	__kernel_frame0_ptr->gr22	= 0;	\
+	__kernel_frame0_ptr->gr23	= 0;	\
+	__kernel_frame0_ptr->gr24	= 0;	\
+	__kernel_frame0_ptr->gr25	= 0;	\
+	__kernel_frame0_ptr->gr26	= 0;	\
+	__kernel_frame0_ptr->gr27	= 0;	\
+	__kernel_frame0_ptr->gr29	= 0;	\
+} while(0)
+
+#define ELF_FDPIC_PLAT_INIT(_regs, _exec_map_addr, _interp_map_addr, _dynamic_addr)	\
+do {											\
+	__kernel_frame0_ptr->gr16	= _exec_map_addr;				\
+	__kernel_frame0_ptr->gr17	= _interp_map_addr;				\
+	__kernel_frame0_ptr->gr18	= _dynamic_addr;				\
+	__kernel_frame0_ptr->gr19	= 0;						\
+	__kernel_frame0_ptr->gr20	= 0;						\
+	__kernel_frame0_ptr->gr21	= 0;						\
+	__kernel_frame0_ptr->gr22	= 0;						\
+	__kernel_frame0_ptr->gr23	= 0;						\
+	__kernel_frame0_ptr->gr24	= 0;						\
+	__kernel_frame0_ptr->gr25	= 0;						\
+	__kernel_frame0_ptr->gr26	= 0;						\
+	__kernel_frame0_ptr->gr27	= 0;						\
+	__kernel_frame0_ptr->gr29	= 0;						\
+} while(0)
+
+#define USE_ELF_CORE_DUMP
+#define ELF_EXEC_PAGESIZE	16384
+
+/* This is the location that an ET_DYN program is loaded if exec'ed.  Typical
+   use of this is to invoke "./ld.so someprog" to test out a new version of
+   the loader.  We need to make sure that it is out of the way of the program
+   that it will "exec", and that there is sufficient room for the brk.  */
+
+#define ELF_ET_DYN_BASE         0x08000000UL
+
+#define ELF_CORE_COPY_REGS(pr_reg, regs)				\
+	memcpy(&pr_reg[0], &regs->sp, 31 * sizeof(uint32_t));
+
+/* This yields a mask that user programs can use to figure out what
+   instruction set this cpu supports.  */
+
+#define ELF_HWCAP	(0)
+
+/* This yields a string that ld.so will use to load implementation
+   specific libraries for optimization.  This is more specific in
+   intent than poking at uname or /proc/cpuinfo.  */
+
+#define ELF_PLATFORM  (NULL)
+
+#ifdef __KERNEL__
+#define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX)
+#endif
+
+#endif
diff -Nru a/include/asm-frv/errno.h b/include/asm-frv/errno.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/errno.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,7 @@
+#ifndef _ASM_ERRNO_H
+#define _ASM_ERRNO_H
+
+#include <asm-generic/errno.h>
+
+#endif /* _ASM_ERRNO_H */
+
diff -Nru a/include/asm-frv/fcntl.h b/include/asm-frv/fcntl.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/fcntl.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,88 @@
+#ifndef _ASM_FCNTL_H
+#define _ASM_FCNTL_H
+
+/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
+   located on an ext2 file system */
+#define O_ACCMODE	   0003
+#define O_RDONLY	     00
+#define O_WRONLY	     01
+#define O_RDWR		     02
+#define O_CREAT		   0100	/* not fcntl */
+#define O_EXCL		   0200	/* not fcntl */
+#define O_NOCTTY	   0400	/* not fcntl */
+#define O_TRUNC		  01000	/* not fcntl */
+#define O_APPEND	  02000
+#define O_NONBLOCK	  04000
+#define O_NDELAY	O_NONBLOCK
+#define O_SYNC		 010000
+#define FASYNC		 020000	/* fcntl, for BSD compatibility */
+#define O_DIRECT	 040000	/* direct disk access hint */
+#define O_LARGEFILE	0100000
+#define O_DIRECTORY	0200000	/* must be a directory */
+#define O_NOFOLLOW	0400000 /* don't follow links */
+#define O_NOATIME	01000000
+
+#define F_DUPFD		0	/* dup */
+#define F_GETFD		1	/* get close_on_exec */
+#define F_SETFD		2	/* set/clear close_on_exec */
+#define F_GETFL		3	/* get file->f_flags */
+#define F_SETFL		4	/* set file->f_flags */
+#define F_GETLK		5
+#define F_SETLK		6
+#define F_SETLKW	7
+
+#define F_SETOWN	8	/*  for sockets. */
+#define F_GETOWN	9	/*  for sockets. */
+#define F_SETSIG	10	/*  for sockets. */
+#define F_GETSIG	11	/*  for sockets. */
+
+#define F_GETLK64	12	/*  using 'struct flock64' */
+#define F_SETLK64	13
+#define F_SETLKW64	14
+
+/* for F_[GET|SET]FL */
+#define FD_CLOEXEC	1	/* actually anything with low bit set goes */
+
+/* for posix fcntl() and lockf() */
+#define F_RDLCK		0
+#define F_WRLCK		1
+#define F_UNLCK		2
+
+/* for old implementation of bsd flock () */
+#define F_EXLCK		4	/* or 3 */
+#define F_SHLCK		8	/* or 4 */
+
+/* for leases */
+#define F_INPROGRESS	16
+
+/* operations for bsd flock(), also used by the kernel implementation */
+#define LOCK_SH		1	/* shared lock */
+#define LOCK_EX		2	/* exclusive lock */
+#define LOCK_NB		4	/* or'd with one of the above to prevent
+				   blocking */
+#define LOCK_UN		8	/* remove lock */
+
+#define LOCK_MAND	32	/* This is a mandatory flock */
+#define LOCK_READ	64	/* ... Which allows concurrent read operations */
+#define LOCK_WRITE	128	/* ... Which allows concurrent write operations */
+#define LOCK_RW		192	/* ... Which allows concurrent read & write ops */
+
+struct flock {
+	short l_type;
+	short l_whence;
+	off_t l_start;
+	off_t l_len;
+	pid_t l_pid;
+};
+
+struct flock64 {
+	short  l_type;
+	short  l_whence;
+	loff_t l_start;
+	loff_t l_len;
+	pid_t  l_pid;
+};
+
+#define F_LINUX_SPECIFIC_BASE	1024
+#endif /* _ASM_FCNTL_H */
+
diff -Nru a/include/asm-frv/fpu.h b/include/asm-frv/fpu.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/fpu.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,12 @@
+#ifndef __ASM_FPU_H
+#define __ASM_FPU_H
+
+#include <linux/config.h>
+
+/*
+ * MAX floating point unit state size (FSAVE/FRESTORE)
+ */
+
+#define kernel_fpu_end() do { asm volatile("bar":::"memory"); preempt_enable(); } while(0)
+
+#endif /* __ASM_FPU_H */
diff -Nru a/include/asm-frv/gdb-stub.h b/include/asm-frv/gdb-stub.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/gdb-stub.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,118 @@
+/* gdb-stub.h: FRV GDB stub
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ * - Derived from asm-mips/gdb-stub.h (c) 1995 Andreas Busse
+ *
+ * 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_GDB_STUB_H
+#define __ASM_GDB_STUB_H
+
+#undef GDBSTUB_DEBUG_PROTOCOL
+
+#include <asm/ptrace.h>
+
+/*
+ * important register numbers in GDB protocol
+ * - GR0,  GR1,  GR2,  GR3,  GR4,  GR5,  GR6,  GR7,
+ * - GR8,  GR9,  GR10, GR11, GR12, GR13, GR14, GR15,
+ * - GR16, GR17, GR18, GR19, GR20, GR21, GR22, GR23,
+ * - GR24, GR25, GR26, GR27, GR28, GR29, GR30, GR31,
+ * - GR32, GR33, GR34, GR35, GR36, GR37, GR38, GR39,
+ * - GR40, GR41, GR42, GR43, GR44, GR45, GR46, GR47,
+ * - GR48, GR49, GR50, GR51, GR52, GR53, GR54, GR55,
+ * - GR56, GR57, GR58, GR59, GR60, GR61, GR62, GR63,
+ * - FR0,  FR1,  FR2,  FR3,  FR4,  FR5,  FR6,  FR7,
+ * - FR8,  FR9,  FR10, FR11, FR12, FR13, FR14, FR15,
+ * - FR16, FR17, FR18, FR19, FR20, FR21, FR22, FR23,
+ * - FR24, FR25, FR26, FR27, FR28, FR29, FR30, FR31,
+ * - FR32, FR33, FR34, FR35, FR36, FR37, FR38, FR39,
+ * - FR40, FR41, FR42, FR43, FR44, FR45, FR46, FR47,
+ * - FR48, FR49, FR50, FR51, FR52, FR53, FR54, FR55,
+ * - FR56, FR57, FR58, FR59, FR60, FR61, FR62, FR63,
+ * - PC, PSR, CCR, CCCR,
+ * - _X132, _X133, _X134
+ * - TBR, BRR, DBAR0, DBAR1, DBAR2, DBAR3,
+ * - SCR0, SCR1, SCR2, SCR3,
+ * - LR, LCR,
+ * - IACC0H, IACC0L,
+ * - FSR0,
+ * - ACC0, ACC1, ACC2, ACC3, ACC4, ACC5, ACC6, ACC7,
+ * - ACCG0123, ACCG4567,
+ * - MSR0, MSR1,
+ * - GNER0, GNER1,
+ * - FNER0, FNER1,
+ */
+#define GDB_REG_GR(N)	(N)
+#define GDB_REG_FR(N)	(64+(N))
+#define GDB_REG_PC	128
+#define GDB_REG_PSR	129
+#define GDB_REG_CCR	130
+#define GDB_REG_CCCR	131
+#define GDB_REG_TBR	135
+#define GDB_REG_BRR	136
+#define GDB_REG_DBAR(N)	(137+(N))
+#define GDB_REG_SCR(N)	(141+(N))
+#define GDB_REG_LR	145
+#define GDB_REG_LCR	146
+#define GDB_REG_FSR0	149
+#define GDB_REG_ACC(N)	(150+(N))
+#define GDB_REG_ACCG(N)	(158+(N)/4)
+#define GDB_REG_MSR(N)	(160+(N))
+#define GDB_REG_GNER(N)	(162+(N))
+#define GDB_REG_FNER(N)	(164+(N))
+
+#define GDB_REG_SP	GDB_REG_GR(1)
+#define GDB_REG_FP	GDB_REG_GR(2)
+
+#ifndef _LANGUAGE_ASSEMBLY
+
+/*
+ * Prototypes
+ */
+extern void show_registers_only(struct pt_regs *regs);
+
+extern void gdbstub_init(void);
+extern void gdbstub(int type);
+extern void gdbstub_exit(int status);
+
+extern void gdbstub_io_init(void);
+extern void gdbstub_set_baud(unsigned baud);
+extern int gdbstub_rx_char(unsigned char *_ch, int nonblock);
+extern void gdbstub_tx_char(unsigned char ch);
+extern void gdbstub_tx_flush(void);
+extern void gdbstub_do_rx(void);
+
+extern asmlinkage void __debug_stub_init_break(void);
+extern asmlinkage void __break_hijack_kernel_event(void);
+extern asmlinkage void start_kernel(void);
+
+extern asmlinkage void gdbstub_rx_handler(void);
+extern asmlinkage void gdbstub_rx_irq(void);
+extern asmlinkage void gdbstub_intercept(void);
+
+extern uint32_t __entry_usertrap_table[];
+extern uint32_t __entry_kerneltrap_table[];
+
+extern volatile u8	gdbstub_rx_buffer[PAGE_SIZE];
+extern volatile u32	gdbstub_rx_inp;
+extern volatile u32	gdbstub_rx_outp;
+extern volatile u8	gdbstub_rx_overflow;
+extern u8		gdbstub_rx_unget;
+
+extern void gdbstub_printk(const char *fmt, ...);
+extern void debug_to_serial(const char *p, int n);
+extern void console_set_baud(unsigned baud);
+
+#ifdef GDBSTUB_DEBUG_PROTOCOL
+#define gdbstub_proto(FMT,...) gdbstub_printk(FMT,##__VA_ARGS__)
+#else
+#define gdbstub_proto(FMT,...) ({ 0; })
+#endif
+
+#endif /* _LANGUAGE_ASSEMBLY */
+#endif /* __ASM_GDB_STUB_H */
diff -Nru a/include/asm-frv/gpio-regs.h b/include/asm-frv/gpio-regs.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/gpio-regs.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,116 @@
+/* gpio-regs.h: on-chip general purpose I/O registers
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+#ifndef _ASM_GPIO_REGS
+#define _ASM_GPIO_REGS
+
+#define __reg(ADDR) (*(volatile unsigned long *)(ADDR))
+
+#define __get_PDR()	({ __reg(0xfeff0400); })
+#define __set_PDR(V)	do { __reg(0xfeff0400) = (V); mb(); } while(0)
+
+#define __get_GPDR()	({ __reg(0xfeff0408); })
+#define __set_GPDR(V)	do { __reg(0xfeff0408) = (V); mb(); } while(0)
+
+#define __get_SIR()	({ __reg(0xfeff0410); })
+#define __set_SIR(V)	do { __reg(0xfeff0410) = (V); mb(); } while(0)
+
+#define __get_SOR()	({ __reg(0xfeff0418); })
+#define __set_SOR(V)	do { __reg(0xfeff0418) = (V); mb(); } while(0)
+
+#define __set_PDSR(V)	do { __reg(0xfeff0420) = (V); mb(); } while(0)
+
+#define __set_PDCR(V)	do { __reg(0xfeff0428) = (V); mb(); } while(0)
+
+#define __get_RSTR()	({ __reg(0xfeff0500); })
+#define __set_RSTR(V)	do { __reg(0xfeff0500) = (V); mb(); } while(0)
+
+
+
+/* PDR definitions */
+#define PDR_GPIO_DATA(X)	(1 << (X))
+
+/* GPDR definitions */
+#define GPDR_INPUT		0
+#define GPDR_OUTPUT		1
+#define GPDR_DREQ0_BIT		0x00001000
+#define GPDR_DREQ1_BIT		0x00008000
+#define GPDR_DREQ2_BIT		0x00040000
+#define GPDR_DREQ3_BIT		0x00080000
+#define GPDR_DREQ4_BIT		0x00004000
+#define GPDR_DREQ5_BIT		0x00020000
+#define GPDR_DREQ6_BIT		0x00100000
+#define GPDR_DREQ7_BIT		0x00200000
+#define GPDR_DACK0_BIT		0x00002000
+#define GPDR_DACK1_BIT		0x00010000
+#define GPDR_DACK2_BIT		0x00100000
+#define GPDR_DACK3_BIT		0x00200000
+#define GPDR_DONE0_BIT		0x00004000
+#define GPDR_DONE1_BIT		0x00020000
+#define GPDR_GPIO_DIR(X,D)	((D) << (X))
+
+/* SIR definitions */
+#define SIR_GPIO_INPUT		0
+#define SIR_DREQ7_INPUT		0x00200000
+#define SIR_DREQ6_INPUT		0x00100000
+#define SIR_DREQ3_INPUT		0x00080000
+#define SIR_DREQ2_INPUT		0x00040000
+#define SIR_DREQ5_INPUT		0x00020000
+#define SIR_DREQ1_INPUT		0x00008000
+#define SIR_DREQ4_INPUT		0x00004000
+#define SIR_DREQ0_INPUT		0x00001000
+#define SIR_RXD1_INPUT		0x00000400
+#define SIR_CTS0_INPUT		0x00000100
+#define SIR_RXD0_INPUT		0x00000040
+#define SIR_GATE1_INPUT		0x00000020
+#define SIR_GATE0_INPUT		0x00000010
+#define SIR_IRQ3_INPUT		0x00000008
+#define SIR_IRQ2_INPUT		0x00000004
+#define SIR_IRQ1_INPUT		0x00000002
+#define SIR_IRQ0_INPUT		0x00000001
+#define SIR_DREQ_BITS		(SIR_DREQ0_INPUT | SIR_DREQ1_INPUT | \
+				 SIR_DREQ2_INPUT | SIR_DREQ3_INPUT | \
+				 SIR_DREQ4_INPUT | SIR_DREQ5_INPUT | \
+				 SIR_DREQ6_INPUT | SIR_DREQ7_INPUT)
+
+/* SOR definitions */
+#define SOR_GPIO_OUTPUT		0
+#define SOR_DACK3_OUTPUT	0x00200000
+#define SOR_DACK2_OUTPUT	0x00100000
+#define SOR_DONE1_OUTPUT	0x00020000
+#define SOR_DACK1_OUTPUT	0x00010000
+#define SOR_DONE0_OUTPUT	0x00004000
+#define SOR_DACK0_OUTPUT	0x00002000
+#define SOR_TXD1_OUTPUT		0x00000800
+#define SOR_RTS0_OUTPUT		0x00000200
+#define SOR_TXD0_OUTPUT		0x00000080
+#define SOR_TOUT1_OUTPUT	0x00000020
+#define SOR_TOUT0_OUTPUT	0x00000010
+#define SOR_DONE_BITS		(SOR_DONE0_OUTPUT | SOR_DONE1_OUTPUT)
+#define SOR_DACK_BITS		(SOR_DACK0_OUTPUT | SOR_DACK1_OUTPUT | \
+				 SOR_DACK2_OUTPUT | SOR_DACK3_OUTPUT)
+
+/* PDSR definitions */
+#define PDSR_UNCHANGED		0
+#define PDSR_SET_BIT(X)		(1 << (X))
+
+/* PDCR definitions */
+#define PDCR_UNCHANGED		0
+#define PDCR_CLEAR_BIT(X)	(1 << (X))
+
+/* RSTR definitions */
+/* Read Only */
+#define RSTR_POWERON		0x00000400
+#define RSTR_SOFTRESET_STATUS	0x00000100
+/* Write Only */
+#define RSTR_SOFTRESET		0x00000001
+
+#endif /* _ASM_GPIO_REGS */
diff -Nru a/include/asm-frv/hardirq.h b/include/asm-frv/hardirq.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/hardirq.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,30 @@
+/* hardirq.h: FRV hardware IRQ management
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+#ifndef __ASM_HARDIRQ_H
+#define __ASM_HARDIRQ_H
+
+#include <linux/config.h>
+#include <linux/threads.h>
+
+typedef struct {
+	unsigned int __softirq_pending;
+	unsigned long idle_timestamp;
+} ____cacheline_aligned irq_cpustat_t;
+
+#include <linux/irq_cpustat.h>	/* Standard mappings for irq_cpustat_t above */
+
+#ifdef CONFIG_SMP
+#error SMP not available on FR-V
+#endif /* CONFIG_SMP */
+
+
+#endif
diff -Nru a/include/asm-frv/highmem.h b/include/asm-frv/highmem.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/highmem.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,183 @@
+/* highmem.h: virtual kernel memory mappings for high memory
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ * - Derived from include/asm-i386/highmem.h
+ *
+ * See Documentation/fujitsu/frv/mmu-layout.txt for more information.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#ifndef _ASM_HIGHMEM_H
+#define _ASM_HIGHMEM_H
+
+#ifdef __KERNEL__
+
+#include <linux/config.h>
+#include <linux/init.h>
+#include <asm/mem-layout.h>
+#include <asm/spr-regs.h>
+#include <asm/mb-regs.h>
+
+#define NR_TLB_LINES		64	/* number of lines in the TLB */
+
+#ifndef __ASSEMBLY__
+
+#include <linux/interrupt.h>
+#include <asm/kmap_types.h>
+#include <asm/pgtable.h>
+
+#ifdef CONFIG_DEBUG_HIGHMEM
+#define HIGHMEM_DEBUG 1
+#else
+#define HIGHMEM_DEBUG 0
+#endif
+
+/* declarations for highmem.c */
+extern unsigned long highstart_pfn, highend_pfn;
+
+#define kmap_prot PAGE_KERNEL
+#define kmap_pte ______kmap_pte_in_TLB
+extern pte_t *pkmap_page_table;
+
+extern void kmap_init(void);
+
+#define flush_cache_kmaps()  do { } while (0)
+
+/*
+ * Right now we initialize only a single pte table. It can be extended
+ * easily, subsequent pte tables have to be allocated in one physical
+ * chunk of RAM.
+ */
+#define LAST_PKMAP	PTRS_PER_PTE
+#define LAST_PKMAP_MASK	(LAST_PKMAP - 1)
+#define PKMAP_NR(virt)	((virt - PKMAP_BASE) >> PAGE_SHIFT)
+#define PKMAP_ADDR(nr)	(PKMAP_BASE + ((nr) << PAGE_SHIFT))
+
+extern void *kmap_high(struct page *page);
+extern void kunmap_high(struct page *page);
+
+extern void *kmap(struct page *page);
+extern void kunmap(struct page *page);
+
+extern struct page *kmap_atomic_to_page(void *ptr);
+
+#endif /* !__ASSEMBLY__ */
+
+/*
+ * 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.
+ */
+#define KMAP_ATOMIC_CACHE_DAMR		8
+
+#ifndef __ASSEMBLY__
+
+#define __kmap_atomic_primary(type, paddr, ampr)						\
+({												\
+	unsigned long damlr, dampr;								\
+												\
+	dampr = paddr | xAMPRx_L | xAMPRx_M | xAMPRx_S | xAMPRx_SS_16Kb | xAMPRx_V;		\
+												\
+	if (type != __KM_CACHE)									\
+		asm volatile("movgs %0,dampr"#ampr :: "r"(dampr));				\
+	else											\
+		asm volatile("movgs %0,iampr"#ampr"\n"						\
+			     "movgs %0,dampr"#ampr"\n"						\
+			     :: "r"(dampr)							\
+			     );									\
+												\
+	asm("movsg damlr"#ampr",%0" : "=r"(damlr));						\
+												\
+	/*printk("DAMR"#ampr": PRIM sl=%d L=%08lx P=%08lx\n", type, damlr, dampr);*/		\
+												\
+	(void *) damlr;										\
+})
+
+#define __kmap_atomic_secondary(slot, paddr)							  \
+({												  \
+	unsigned long damlr = KMAP_ATOMIC_SECONDARY_FRAME + (slot) * PAGE_SIZE;			  \
+	unsigned long dampr = paddr | xAMPRx_L | xAMPRx_M | xAMPRx_S | xAMPRx_SS_16Kb | xAMPRx_V; \
+												  \
+	asm volatile("movgs %0,tplr \n"								  \
+		     "movgs %1,tppr \n"								  \
+		     "tlbpr %0,gr0,#2,#1"							  \
+		     : : "r"(damlr), "r"(dampr));						  \
+												  \
+	/*printk("TLB: SECN sl=%d L=%08lx P=%08lx\n", slot, damlr, dampr);*/			  \
+												  \
+	(void *) damlr;										  \
+})
+
+static inline void *kmap_atomic(struct page *page, enum km_type type)
+{
+	unsigned long paddr;
+
+	preempt_disable();
+	paddr = page_to_phys(page);
+
+	switch (type) {
+        case 0:		return __kmap_atomic_primary(0, paddr, 2);
+        case 1:		return __kmap_atomic_primary(1, paddr, 3);
+        case 2:		return __kmap_atomic_primary(2, paddr, 4);
+        case 3:		return __kmap_atomic_primary(3, paddr, 5);
+        case 4:		return __kmap_atomic_primary(4, paddr, 6);
+        case 5:		return __kmap_atomic_primary(5, paddr, 7);
+        case 6:		return __kmap_atomic_primary(6, paddr, 8);
+        case 7:		return __kmap_atomic_primary(7, paddr, 9);
+        case 8:		return __kmap_atomic_primary(8, paddr, 10);
+
+	case 9 ... 9 + NR_TLB_LINES - 1:
+		return __kmap_atomic_secondary(type - 9, paddr);
+
+	default:
+		BUG();
+		return 0;
+	}
+}
+
+#define __kunmap_atomic_primary(type, ampr)			\
+do {								\
+	asm volatile("movgs gr0,dampr"#ampr"\n");		\
+	if (type == __KM_CACHE)					\
+		asm volatile("movgs gr0,iampr"#ampr"\n");	\
+} while(0)
+
+#define __kunmap_atomic_secondary(slot, vaddr)			\
+do {								\
+	asm volatile("tlbpr %0,gr0,#4,#1" : : "r"(vaddr));	\
+} while(0)
+
+static inline void kunmap_atomic(void *kvaddr, enum km_type type)
+{
+	switch (type) {
+        case 0:		__kunmap_atomic_primary(0, 2);	break;
+        case 1:		__kunmap_atomic_primary(1, 3);	break;
+        case 2:		__kunmap_atomic_primary(2, 4);	break;
+        case 3:		__kunmap_atomic_primary(3, 5);	break;
+        case 4:		__kunmap_atomic_primary(4, 6);	break;
+        case 5:		__kunmap_atomic_primary(5, 7);	break;
+        case 6:		__kunmap_atomic_primary(6, 8);	break;
+        case 7:		__kunmap_atomic_primary(7, 9);	break;
+        case 8:		__kunmap_atomic_primary(8, 10);	break;
+
+	case 9 ... 9 + NR_TLB_LINES - 1:
+		__kunmap_atomic_secondary(type - 9, kvaddr);
+		break;
+
+	default:
+		BUG();
+	}
+	preempt_enable();
+}
+
+#endif /* !__ASSEMBLY__ */
+
+#endif /* __KERNEL__ */
+
+#endif /* _ASM_HIGHMEM_H */
diff -Nru a/include/asm-frv/hw_irq.h b/include/asm-frv/hw_irq.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/hw_irq.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,16 @@
+/* hw_irq.h: FR-V specific h/w IRQ stuff
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+#ifndef _ASM_HW_IRQ_H
+#define _ASM_HW_IRQ_H
+
+
+#endif /* _ASM_HW_IRQ_H */
diff -Nru a/include/asm-frv/ide.h b/include/asm-frv/ide.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/ide.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,43 @@
+/* ide.h: FRV IDE declarations
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+#ifndef _ASM_IDE_H
+#define _ASM_IDE_H
+
+#ifdef __KERNEL__
+
+#include <linux/config.h>
+#include <asm/setup.h>
+#include <asm/io.h>
+#include <asm/irq.h>
+
+#undef SUPPORT_SLOW_DATA_PORTS
+#define SUPPORT_SLOW_DATA_PORTS 0
+
+#undef SUPPORT_VLB_SYNC
+#define SUPPORT_VLB_SYNC 0
+
+#ifndef MAX_HWIFS
+#define MAX_HWIFS 8
+#endif
+
+/****************************************************************************/
+/*
+ * some bits needed for parts of the IDE subsystem to compile
+ */
+#define __ide_mm_insw(port, addr, n)	insw(port, addr, n)
+#define __ide_mm_insl(port, addr, n)	insl(port, addr, n)
+#define __ide_mm_outsw(port, addr, n)	outsw(port, addr, n)
+#define __ide_mm_outsl(port, addr, n)	outsl(port, addr, n)
+
+
+#endif /* __KERNEL__ */
+#endif /* _ASM_IDE_H */
diff -Nru a/include/asm-frv/init.h b/include/asm-frv/init.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/init.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,12 @@
+#ifndef _ASM_INIT_H
+#define _ASM_INIT_H
+
+#define __init __attribute__ ((__section__ (".text.init")))
+#define __initdata __attribute__ ((__section__ (".data.init")))
+/* For assembly routines */
+#define __INIT		.section	".text.init",#alloc,#execinstr
+#define __FINIT		.previous
+#define __INITDATA	.section	".data.init",#alloc,#write
+
+#endif
+
diff -Nru a/include/asm-frv/io.h b/include/asm-frv/io.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/io.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,278 @@
+/* io.h: FRV I/O operations
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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 gets interesting when talking to the PCI bus - the CPU is in big endian
+ * mode, the PCI bus is little endian and the hardware in the middle can do
+ * byte swapping
+ */
+#ifndef _ASM_IO_H
+#define _ASM_IO_H
+
+#ifdef __KERNEL__
+
+#include <linux/config.h>
+#include <asm/virtconvert.h>
+#include <asm/string.h>
+#include <asm/mb-regs.h>
+#include <linux/delay.h>
+
+/*
+ * swap functions are sometimes needed to interface little-endian hardware
+ */
+
+static inline unsigned short _swapw(unsigned short v)
+{
+    return ((v << 8) | (v >> 8));
+}
+
+static inline unsigned long _swapl(unsigned long v)
+{
+    return ((v << 24) | ((v & 0xff00) << 8) | ((v & 0xff0000) >> 8) | (v >> 24));
+}
+
+//#define __iormb() asm volatile("membar")
+//#define __iowmb() asm volatile("membar")
+
+#define __raw_readb(addr) __builtin_read8((void *) (addr))
+#define __raw_readw(addr) __builtin_read16((void *) (addr))
+#define __raw_readl(addr) __builtin_read32((void *) (addr))
+
+#define __raw_writeb(datum, addr) __builtin_write8((void *) (addr), datum)
+#define __raw_writew(datum, addr) __builtin_write16((void *) (addr), datum)
+#define __raw_writel(datum, addr) __builtin_write32((void *) (addr), datum)
+
+static inline void io_outsb(unsigned int addr, const void *buf, int len)
+{
+	unsigned long __ioaddr = (unsigned long) addr;
+	const uint8_t *bp = buf;
+
+	while (len--)
+		__builtin_write8((volatile void __iomem *) __ioaddr, *bp++);
+}
+
+static inline void io_outsw(unsigned int addr, const void *buf, int len)
+{
+	unsigned long __ioaddr = (unsigned long) addr;
+	const uint16_t *bp = buf;
+
+	while (len--)
+		__builtin_write16((volatile void __iomem *) __ioaddr, (*bp++));
+}
+
+extern void __outsl_ns(unsigned int addr, const void *buf, int len);
+extern void __outsl_sw(unsigned int addr, const void *buf, int len);
+static inline void __outsl(unsigned int addr, const void *buf, int len, int swap)
+{
+	unsigned long __ioaddr = (unsigned long) addr;
+
+	if (!swap)
+		__outsl_ns(__ioaddr, buf, len);
+	else
+		__outsl_sw(__ioaddr, buf, len);
+}
+
+static inline void io_insb(unsigned long addr, void *buf, int len)
+{
+	uint8_t *bp = buf;
+
+	while (len--)
+		*bp++ = __builtin_read8((volatile void __iomem *) addr);
+}
+
+static inline void io_insw(unsigned long addr, void *buf, int len)
+{
+	uint16_t *bp = buf;
+
+	while (len--)
+		*bp++ = __builtin_read16((volatile void __iomem *) addr);
+}
+
+extern void __insl_ns(unsigned long addr, void *buf, int len);
+extern void __insl_sw(unsigned long addr, void *buf, int len);
+static inline void __insl(unsigned long addr, void *buf, int len, int swap)
+{
+	if (!swap)
+		__insl_ns(addr, buf, len);
+	else
+		__insl_sw(addr, buf, len);
+}
+
+/*
+ *	make the short names macros so specific devices
+ *	can override them as required
+ */
+
+static inline void memset_io(volatile void __iomem *addr, unsigned char val, int count)
+{
+	memset((void __force *) addr, val, count);
+}
+
+static inline void memcpy_fromio(void *dst, volatile void __iomem *src, int count)
+{
+	memcpy(dst, (void __force *) src, count);
+}
+
+static inline void memcpy_toio(volatile void __iomem *dst, const void *src, int count)
+{
+	memcpy((void __force *) dst, src, count);
+}
+
+static inline uint8_t inb(unsigned long addr)
+{
+	return __builtin_read8((void *)addr);
+}
+
+static inline uint16_t inw(unsigned long addr)
+{
+	uint16_t ret = __builtin_read16((void *)addr);
+
+	if (__is_PCI_IO(addr))
+		ret = _swapw(ret);
+
+	return ret;
+}
+
+static inline uint32_t inl(unsigned long addr)
+{
+	uint32_t ret = __builtin_read32((void *)addr);
+
+	if (__is_PCI_IO(addr))
+		ret = _swapl(ret);
+
+	return ret;
+}
+
+static inline void outb(uint8_t datum, unsigned long addr)
+{
+	__builtin_write8((void *)addr, datum);
+}
+
+static inline void outw(uint16_t datum, unsigned long addr)
+{
+	if (__is_PCI_IO(addr))
+		datum = _swapw(datum);
+	__builtin_write16((void *)addr, datum);
+}
+
+static inline void outl(uint32_t datum, unsigned long addr)
+{
+	if (__is_PCI_IO(addr))
+		datum = _swapl(datum);
+	__builtin_write32((void *)addr, datum);
+}
+
+#define inb_p(addr)	inb(addr)
+#define inw_p(addr)	inw(addr)
+#define inl_p(addr)	inl(addr)
+#define outb_p(x,addr)	outb(x,addr)
+#define outw_p(x,addr)	outw(x,addr)
+#define outl_p(x,addr)	outl(x,addr)
+
+#define outsb(a,b,l)	io_outsb(a,b,l)
+#define outsw(a,b,l)	io_outsw(a,b,l)
+#define outsl(a,b,l)	__outsl(a,b,l,0)
+
+#define insb(a,b,l)	io_insb(a,b,l)
+#define insw(a,b,l)	io_insw(a,b,l)
+#define insl(a,b,l)	__insl(a,b,l,0)
+
+#define IO_SPACE_LIMIT	0xffffffff
+
+static inline uint8_t readb(const volatile void __iomem *addr)
+{
+	return __builtin_read8((volatile uint8_t __force *) addr);
+}
+
+static inline uint16_t readw(const volatile void __iomem *addr)
+{
+	uint16_t ret =	__builtin_read16((volatile uint16_t __force *)addr);
+
+	if (__is_PCI_MEM(addr))
+		ret = _swapw(ret);
+	return ret;
+}
+
+static inline uint32_t readl(const volatile void __iomem *addr)
+{
+	uint32_t ret =	__builtin_read32((volatile uint32_t __force *)addr);
+
+	if (__is_PCI_MEM(addr))
+		ret = _swapl(ret);
+
+	return ret;
+}
+
+static inline void writeb(uint8_t datum, volatile void __iomem *addr)
+{
+	__builtin_write8((volatile uint8_t __force *) addr, datum);
+	if (__is_PCI_MEM(addr))
+		__flush_PCI_writes();
+}
+
+static inline void writew(uint16_t datum, volatile void __iomem *addr)
+{
+	if (__is_PCI_MEM(addr))
+		datum = _swapw(datum);
+
+	__builtin_write16((volatile uint16_t __force *) addr, datum);
+	if (__is_PCI_MEM(addr))
+		__flush_PCI_writes();
+}
+
+static inline void writel(uint32_t datum, volatile void __iomem *addr)
+{
+	if (__is_PCI_MEM(addr))
+		datum = _swapl(datum);
+
+	__builtin_write32((volatile uint32_t __force *) addr, datum);
+	if (__is_PCI_MEM(addr))
+		__flush_PCI_writes();
+}
+
+
+/* Values for nocacheflag and cmode */
+#define IOMAP_FULL_CACHING		0
+#define IOMAP_NOCACHE_SER		1
+#define IOMAP_NOCACHE_NONSER		2
+#define IOMAP_WRITETHROUGH		3
+
+extern void __iomem *__ioremap(unsigned long physaddr, unsigned long size, int cacheflag);
+extern void __iounmap(void __iomem *addr, unsigned long size);
+
+static inline void __iomem *ioremap(unsigned long physaddr, unsigned long size)
+{
+	return __ioremap(physaddr, size, IOMAP_NOCACHE_SER);
+}
+
+static inline void __iomem *ioremap_nocache(unsigned long physaddr, unsigned long size)
+{
+	return __ioremap(physaddr, size, IOMAP_NOCACHE_SER);
+}
+
+static inline void __iomem *ioremap_writethrough(unsigned long physaddr, unsigned long size)
+{
+	return __ioremap(physaddr, size, IOMAP_WRITETHROUGH);
+}
+
+static inline void __iomem *ioremap_fullcache(unsigned long physaddr, unsigned long size)
+{
+	return __ioremap(physaddr, size, IOMAP_FULL_CACHING);
+}
+
+extern void iounmap(void __iomem *addr);
+
+static inline void flush_write_buffers(void)
+{
+	__asm__ __volatile__ ("membar" : : :"memory");
+}
+
+#endif /* __KERNEL__ */
+
+#endif /* _ASM_IO_H */
diff -Nru a/include/asm-frv/ioctl.h b/include/asm-frv/ioctl.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/ioctl.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,80 @@
+/*
+ * linux/ioctl.h for Linux by H.H. Bergman.
+ */
+
+#ifndef _ASM_IOCTL_H
+#define _ASM_IOCTL_H
+
+/* ioctl command encoding: 32 bits total, command in lower 16 bits,
+ * size of the parameter structure in the lower 14 bits of the
+ * upper 16 bits.
+ * Encoding the size of the parameter structure in the ioctl request
+ * is useful for catching programs compiled with old versions
+ * and to avoid overwriting user space outside the user buffer area.
+ * The highest 2 bits are reserved for indicating the ``access mode''.
+ * NOTE: This limits the max parameter size to 16kB -1 !
+ */
+
+/*
+ * I don't really have any idea about what this should look like, so
+ * for the time being, this is heavily based on the PC definitions.
+ */
+
+/*
+ * The following is for compatibility across the various Linux
+ * platforms.  The i386 ioctl numbering scheme doesn't really enforce
+ * a type field.  De facto, however, the top 8 bits of the lower 16
+ * bits are indeed used as a type field, so we might just as well make
+ * this explicit here.  Please be sure to use the decoding macros
+ * below from now on.
+ */
+#define _IOC_NRBITS	8
+#define _IOC_TYPEBITS	8
+#define _IOC_SIZEBITS	14
+#define _IOC_DIRBITS	2
+
+#define _IOC_NRMASK	((1 << _IOC_NRBITS)-1)
+#define _IOC_TYPEMASK	((1 << _IOC_TYPEBITS)-1)
+#define _IOC_SIZEMASK	((1 << _IOC_SIZEBITS)-1)
+#define _IOC_DIRMASK	((1 << _IOC_DIRBITS)-1)
+
+#define _IOC_NRSHIFT	0
+#define _IOC_TYPESHIFT	(_IOC_NRSHIFT+_IOC_NRBITS)
+#define _IOC_SIZESHIFT	(_IOC_TYPESHIFT+_IOC_TYPEBITS)
+#define _IOC_DIRSHIFT	(_IOC_SIZESHIFT+_IOC_SIZEBITS)
+
+/*
+ * Direction bits.
+ */
+#define _IOC_NONE	0U
+#define _IOC_WRITE	1U
+#define _IOC_READ	2U
+
+#define _IOC(dir,type,nr,size) \
+	(((dir)  << _IOC_DIRSHIFT) | \
+	 ((type) << _IOC_TYPESHIFT) | \
+	 ((nr)   << _IOC_NRSHIFT) | \
+	 ((size) << _IOC_SIZESHIFT))
+
+/* used to create numbers */
+#define _IO(type,nr)		_IOC(_IOC_NONE,(type),(nr),0)
+#define _IOR(type,nr,size)	_IOC(_IOC_READ,(type),(nr),sizeof(size))
+#define _IOW(type,nr,size)	_IOC(_IOC_WRITE,(type),(nr),sizeof(size))
+#define _IOWR(type,nr,size)	_IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size))
+
+/* used to decode ioctl numbers.. */
+#define _IOC_DIR(nr)		(((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK)
+#define _IOC_TYPE(nr)		(((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK)
+#define _IOC_NR(nr)		(((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK)
+#define _IOC_SIZE(nr)		(((nr) >> _IOC_SIZESHIFT) & _IOC_SIZEMASK)
+
+/* ...and for the drivers/sound files... */
+
+#define IOC_IN		(_IOC_WRITE << _IOC_DIRSHIFT)
+#define IOC_OUT		(_IOC_READ << _IOC_DIRSHIFT)
+#define IOC_INOUT	((_IOC_WRITE|_IOC_READ) << _IOC_DIRSHIFT)
+#define IOCSIZE_MASK	(_IOC_SIZEMASK << _IOC_SIZESHIFT)
+#define IOCSIZE_SHIFT	(_IOC_SIZESHIFT)
+
+#endif /* _ASM_IOCTL_H */
+
diff -Nru a/include/asm-frv/ioctls.h b/include/asm-frv/ioctls.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/ioctls.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,82 @@
+#ifndef __ASM_IOCTLS_H__
+#define __ASM_IOCTLS_H__
+
+#include <asm/ioctl.h>
+
+/* 0x54 is just a magic number to make these relatively unique ('T') */
+
+#define TCGETS		0x5401
+#define TCSETS		0x5402
+#define TCSETSW		0x5403
+#define TCSETSF		0x5404
+#define TCGETA		0x5405
+#define TCSETA		0x5406
+#define TCSETAW		0x5407
+#define TCSETAF		0x5408
+#define TCSBRK		0x5409
+#define TCXONC		0x540A
+#define TCFLSH		0x540B
+#define TIOCEXCL	0x540C
+#define TIOCNXCL	0x540D
+#define TIOCSCTTY	0x540E
+#define TIOCGPGRP	0x540F
+#define TIOCSPGRP	0x5410
+#define TIOCOUTQ	0x5411
+#define TIOCSTI		0x5412
+#define TIOCGWINSZ	0x5413
+#define TIOCSWINSZ	0x5414
+#define TIOCMGET	0x5415
+#define TIOCMBIS	0x5416
+#define TIOCMBIC	0x5417
+#define TIOCMSET	0x5418
+#define TIOCGSOFTCAR	0x5419
+#define TIOCSSOFTCAR	0x541A
+#define FIONREAD	0x541B
+#define TIOCINQ		FIONREAD
+#define TIOCLINUX	0x541C
+#define TIOCCONS	0x541D
+#define TIOCGSERIAL	0x541E
+#define TIOCSSERIAL	0x541F
+#define TIOCPKT		0x5420
+#define FIONBIO		0x5421
+#define TIOCNOTTY	0x5422
+#define TIOCSETD	0x5423
+#define TIOCGETD	0x5424
+#define TCSBRKP		0x5425	/* Needed for POSIX tcsendbreak() */
+#define TIOCTTYGSTRUCT	0x5426  /* For debugging only */
+#define TIOCSBRK	0x5427  /* BSD compatibility */
+#define TIOCCBRK	0x5428  /* BSD compatibility */
+#define TIOCGSID	0x5429  /* Return the session ID of FD */
+#define TIOCGPTN	_IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
+#define TIOCSPTLCK	_IOW('T',0x31, int)  /* Lock/unlock Pty */
+
+#define FIONCLEX	0x5450  /* these numbers need to be adjusted. */
+#define FIOCLEX		0x5451
+#define FIOASYNC	0x5452
+#define TIOCSERCONFIG	0x5453
+#define TIOCSERGWILD	0x5454
+#define TIOCSERSWILD	0x5455
+#define TIOCGLCKTRMIOS	0x5456
+#define TIOCSLCKTRMIOS	0x5457
+#define TIOCSERGSTRUCT	0x5458 /* For debugging only */
+#define TIOCSERGETLSR   0x5459 /* Get line status register */
+#define TIOCSERGETMULTI 0x545A /* Get multiport config  */
+#define TIOCSERSETMULTI 0x545B /* Set multiport config */
+
+#define TIOCMIWAIT	0x545C	/* wait for a change on serial input line(s) */
+#define TIOCGICOUNT	0x545D	/* read serial port inline interrupt counts */
+#define FIOQSIZE	0x545E
+
+/* Used for packet mode */
+#define TIOCPKT_DATA		 0
+#define TIOCPKT_FLUSHREAD	 1
+#define TIOCPKT_FLUSHWRITE	 2
+#define TIOCPKT_STOP		 4
+#define TIOCPKT_START		 8
+#define TIOCPKT_NOSTOP		16
+#define TIOCPKT_DOSTOP		32
+
+#define TIOCSER_TEMT    0x01	/* Transmitter physically empty */
+
+#endif /* __ASM_IOCTLS_H__ */
+
diff -Nru a/include/asm-frv/ipc.h b/include/asm-frv/ipc.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/ipc.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,33 @@
+#ifndef __ASM_IPC_H__
+#define __ASM_IPC_H__
+
+/*
+ * These are used to wrap system calls on FR-V
+ *
+ * See arch/frv/kernel/sys_frv.c for ugly details..
+ */
+struct ipc_kludge {
+	struct msgbuf __user *msgp;
+	long msgtyp;
+};
+
+#define SEMOP		 1
+#define SEMGET		 2
+#define SEMCTL		 3
+#define SEMTIMEDOP	 4
+#define MSGSND		11
+#define MSGRCV		12
+#define MSGGET		13
+#define MSGCTL		14
+#define SHMAT		21
+#define SHMDT		22
+#define SHMGET		23
+#define SHMCTL		24
+
+/* Used by the DIPC package, try and avoid reusing it */
+#define DIPC		25
+
+#define IPCCALL(version,op)	((version)<<16 | (op))
+
+#endif
+
diff -Nru a/include/asm-frv/ipcbuf.h b/include/asm-frv/ipcbuf.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/ipcbuf.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,30 @@
+#ifndef __ASM_IPCBUF_H__
+#define __ASM_IPCBUF_H__
+
+/*
+ * The user_ipc_perm structure for FR-V architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 32-bit mode_t and seq
+ * - 2 miscellaneous 32-bit values
+ */
+
+struct ipc64_perm
+{
+	__kernel_key_t		key;
+	__kernel_uid32_t	uid;
+	__kernel_gid32_t	gid;
+	__kernel_uid32_t	cuid;
+	__kernel_gid32_t	cgid;
+	__kernel_mode_t		mode;
+	unsigned short		__pad1;
+	unsigned short		seq;
+	unsigned short		__pad2;
+	unsigned long		__unused1;
+	unsigned long		__unused2;
+};
+
+#endif /* __ASM_IPCBUF_H__ */
+
diff -Nru a/include/asm-frv/irc-regs.h b/include/asm-frv/irc-regs.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/irc-regs.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,53 @@
+/* irc-regs.h: on-chip interrupt controller registers
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+#ifndef _ASM_IRC_REGS
+#define _ASM_IRC_REGS
+
+#define __reg(ADDR) (*(volatile unsigned long *)(ADDR))
+
+#define __get_TM0()	({ __reg(0xfeff9800); })
+#define __get_TM1()	({ __reg(0xfeff9808); })
+#define __set_TM1(V)	do { __reg(0xfeff9808) = (V); mb(); } while(0)
+
+#define __set_TM1x(XI,V)			\
+do {						\
+	int shift = (XI) * 2 + 16;		\
+	unsigned long tm1 = __reg(0xfeff9808);	\
+	tm1 &= ~(0x3 << shift);			\
+	tm1 |= (V) << shift;			\
+	__reg(0xfeff9808) = tm1;		\
+	mb();					\
+} while(0)
+
+#define __get_RS(C)	({ (__reg(0xfeff9810) >> ((C)+16)) & 1; })
+
+#define __clr_RC(C)	do { __reg(0xfeff9818) = 1 << ((C)+16); mb(); } while(0)
+
+#define __get_MASK(C)	({ (__reg(0xfeff9820) >> ((C)+16)) & 1; })
+#define __set_MASK(C)	do { __reg(0xfeff9820) |=  1 << ((C)+16); mb(); } while(0)
+#define __clr_MASK(C)	do { __reg(0xfeff9820) &=  ~(1 << ((C)+16)); mb(); } while(0)
+
+#define __get_MASK_all() __get_MASK(0)
+#define __set_MASK_all() __set_MASK(0)
+#define __clr_MASK_all() __clr_MASK(0)
+
+#define __get_IRL()	({ (__reg(0xfeff9828) >> 16) & 0xf; })
+#define __clr_IRL()	do { __reg(0xfeff9828) = 0x100000; mb(); } while(0)
+
+#define __get_IRR(N)	({ __reg(0xfeff9840 + (N) * 8); })
+#define __set_IRR(N,V)	do { __reg(0xfeff9840 + (N) * 8) = (V); } while(0)
+
+#define __get_IITMR(N)	({ __reg(0xfeff9880 + (N) * 8); })
+#define __set_IITMR(N,V) do { __reg(0xfeff9880 + (N) * 8) = (V); } while(0)
+
+
+#endif /* _ASM_IRC_REGS */
diff -Nru a/include/asm-frv/irq-routing.h b/include/asm-frv/irq-routing.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/irq-routing.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,70 @@
+/* irq-routing.h: multiplexed IRQ routing
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+#ifndef _ASM_IRQ_ROUTING_H
+#define _ASM_IRQ_ROUTING_H
+
+#ifndef __ASSEMBLY__
+
+#include <linux/spinlock.h>
+#include <asm/irq.h>
+
+struct irq_source;
+struct irq_level;
+
+/*
+ * IRQ action distribution sets
+ */
+struct irq_group {
+	int			first_irq;	/* first IRQ distributed here */
+	void (*control)(struct irq_group *group, int index, int on);
+
+	struct irqaction	*actions[NR_IRQ_ACTIONS_PER_GROUP];	/* IRQ action chains */
+	struct irq_source	*sources[NR_IRQ_ACTIONS_PER_GROUP];	/* IRQ sources */
+	int			disable_cnt[NR_IRQ_ACTIONS_PER_GROUP];	/* disable counts */
+};
+
+/*
+ * IRQ source manager
+ */
+struct irq_source {
+	struct irq_source	*next;
+	struct irq_level	*level;
+	const char		*muxname;
+	volatile void __iomem	*muxdata;
+	unsigned long		irqmask;
+
+	void (*doirq)(struct irq_source *source);
+};
+
+/*
+ * IRQ level management (per CPU IRQ priority / entry vector)
+ */
+struct irq_level {
+	int			usage;
+	int			disable_count;
+	unsigned long		flags;		/* current SA_INTERRUPT and SA_SHIRQ settings */
+	spinlock_t		lock;
+	struct irq_source	*sources;
+};
+
+extern struct irq_level frv_irq_levels[16];
+extern struct irq_group *irq_groups[NR_IRQ_GROUPS];
+
+extern void frv_irq_route(struct irq_source *source, int irqlevel);
+extern void frv_irq_route_external(struct irq_source *source, int irq);
+extern void frv_irq_set_group(struct irq_group *group);
+extern void distribute_irqs(struct irq_group *group, unsigned long irqmask);
+extern void route_cpu_irqs(void);
+
+#endif /* !__ASSEMBLY__ */
+
+#endif /* _ASM_IRQ_ROUTING_H */
diff -Nru a/include/asm-frv/irq.h b/include/asm-frv/irq.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/irq.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,44 @@
+/* irq.h: FRV IRQ definitions
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+#ifndef _ASM_IRQ_H_
+#define _ASM_IRQ_H_
+
+#include <linux/config.h>
+
+/*
+ * the system has an on-CPU PIC and another PIC on the FPGA and other PICs on other peripherals,
+ * so we do some routing in irq-routing.[ch] to reduce the number of false-positives seen by
+ * drivers
+ */
+
+/* this number is used when no interrupt has been assigned */
+#define NO_IRQ				(-1)
+
+#define NR_IRQ_LOG2_ACTIONS_PER_GROUP	5
+#define NR_IRQ_ACTIONS_PER_GROUP	(1 << NR_IRQ_LOG2_ACTIONS_PER_GROUP)
+#define NR_IRQ_GROUPS			4
+#define NR_IRQS				(NR_IRQ_ACTIONS_PER_GROUP * NR_IRQ_GROUPS)
+
+/* probe returns a 32-bit IRQ mask:-/ */
+#define MIN_PROBE_IRQ	(NR_IRQS - 32)
+
+static inline int irq_canonicalize(int irq)
+{
+	return irq;
+}
+
+extern void disable_irq_nosync(unsigned int irq);
+extern void disable_irq(unsigned int irq);
+extern void enable_irq(unsigned int irq);
+
+
+#endif /* _ASM_IRQ_H_ */
diff -Nru a/include/asm-frv/kmap_types.h b/include/asm-frv/kmap_types.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/kmap_types.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,29 @@
+
+#ifndef _ASM_KMAP_TYPES_H
+#define _ASM_KMAP_TYPES_H
+
+enum km_type {
+	/* arch specific kmaps - change the numbers attached to these at your peril */
+	__KM_CACHE,		/* cache flush page attachment point */
+	__KM_PGD,		/* current page directory */
+	__KM_ITLB_PTD,		/* current instruction TLB miss page table lookup */
+	__KM_DTLB_PTD,		/* current data TLB miss page table lookup */
+
+	/* general kmaps */
+        KM_BOUNCE_READ,
+        KM_SKB_SUNRPC_DATA,
+        KM_SKB_DATA_SOFTIRQ,
+        KM_USER0,
+        KM_USER1,
+	KM_BIO_SRC_IRQ,
+	KM_BIO_DST_IRQ,
+	KM_PTE0,
+	KM_PTE1,
+	KM_IRQ0,
+	KM_IRQ1,
+	KM_SOFTIRQ0,
+	KM_SOFTIRQ1,
+	KM_TYPE_NR
+};
+
+#endif
diff -Nru a/include/asm-frv/linkage.h b/include/asm-frv/linkage.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/linkage.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,7 @@
+#ifndef __ASM_LINKAGE_H
+#define __ASM_LINKAGE_H
+
+#define __ALIGN		.align 4
+#define __ALIGN_STR	".align 4"
+
+#endif
diff -Nru a/include/asm-frv/local.h b/include/asm-frv/local.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/local.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,6 @@
+#ifndef _ASM_LOCAL_H
+#define _ASM_LOCAL_H
+
+#include <asm-generic/local.h>
+
+#endif /* _ASM_LOCAL_H */
diff -Nru a/include/asm-frv/math-emu.h b/include/asm-frv/math-emu.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/math-emu.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,301 @@
+#ifndef _ASM_MATH_EMU_H
+#define _ASM_MATH_EMU_H
+
+#include <asm/setup.h>
+#include <linux/linkage.h>
+
+/* Status Register bits */
+
+/* accrued exception bits */
+#define FPSR_AEXC_INEX	3
+#define FPSR_AEXC_DZ	4
+#define FPSR_AEXC_UNFL	5
+#define FPSR_AEXC_OVFL	6
+#define FPSR_AEXC_IOP	7
+
+/* exception status bits */
+#define FPSR_EXC_INEX1	8
+#define FPSR_EXC_INEX2	9
+#define FPSR_EXC_DZ	10
+#define FPSR_EXC_UNFL	11
+#define FPSR_EXC_OVFL	12
+#define FPSR_EXC_OPERR	13
+#define FPSR_EXC_SNAN	14
+#define FPSR_EXC_BSUN	15
+
+/* quotient byte, assumes big-endian, of course */
+#define FPSR_QUOTIENT(fpsr) (*((signed char *) &(fpsr) + 1))
+
+/* condition code bits */
+#define FPSR_CC_NAN	24
+#define FPSR_CC_INF	25
+#define FPSR_CC_Z	26
+#define FPSR_CC_NEG	27
+
+
+/* Control register bits */
+
+/* rounding mode */
+#define	FPCR_ROUND_RN	0		/* round to nearest/even */
+#define FPCR_ROUND_RZ	1		/* round to zero */
+#define FPCR_ROUND_RM	2		/* minus infinity */
+#define FPCR_ROUND_RP	3		/* plus infinity */
+
+/* rounding precision */
+#define FPCR_PRECISION_X	0	/* long double */
+#define FPCR_PRECISION_S	1	/* double */
+#define FPCR_PRECISION_D	2	/* float */
+
+
+/* Flags to select the debugging output */
+#define PDECODE		0
+#define PEXECUTE	1
+#define PCONV		2
+#define PNORM		3
+#define PREGISTER	4
+#define PINSTR		5
+#define PUNIMPL		6
+#define PMOVEM		7
+
+#define PMDECODE	(1<<PDECODE)
+#define PMEXECUTE	(1<<PEXECUTE)
+#define PMCONV		(1<<PCONV)
+#define PMNORM		(1<<PNORM)
+#define PMREGISTER	(1<<PREGISTER)
+#define PMINSTR		(1<<PINSTR)
+#define PMUNIMPL	(1<<PUNIMPL)
+#define PMMOVEM		(1<<PMOVEM)
+
+#ifndef __ASSEMBLY__
+
+#include <linux/kernel.h>
+#include <linux/sched.h>
+
+union fp_mant64 {
+	unsigned long long m64;
+	unsigned long m32[2];
+};
+
+union fp_mant128 {
+	unsigned long long m64[2];
+	unsigned long m32[4];
+};
+
+/* internal representation of extended fp numbers */
+struct fp_ext {
+	unsigned char lowmant;
+	unsigned char sign;
+	unsigned short exp;
+	union fp_mant64 mant;
+};
+
+/* C representation of FPU registers */
+/* NOTE: if you change this, you have to change the assembler offsets
+   below and the size in <asm/fpu.h>, too */
+struct fp_data {
+	struct fp_ext fpreg[8];
+	unsigned int fpcr;
+	unsigned int fpsr;
+	unsigned int fpiar;
+	unsigned short prec;
+	unsigned short rnd;
+	struct fp_ext temp[2];
+};
+
+#if FPU_EMU_DEBUG
+extern unsigned int fp_debugprint;
+
+#define dprint(bit, fmt, args...) ({			\
+	if (fp_debugprint & (1 << (bit)))		\
+		printk(fmt, ## args);			\
+})
+#else
+#define dprint(bit, fmt, args...)
+#endif
+
+#define uprint(str) ({					\
+	static int __count = 3;				\
+							\
+	if (__count > 0) {				\
+		printk("You just hit an unimplemented "	\
+		       "fpu instruction (%s)\n", str);	\
+		printk("Please report this to ....\n");	\
+		__count--;				\
+	}						\
+})
+
+#define FPDATA		((struct fp_data *)current->thread.fp)
+
+#else	/* __ASSEMBLY__ */
+
+#define FPDATA		%a2
+
+/* offsets from the base register to the floating point data in the task struct */
+#define FPD_FPREG	(TASK_THREAD+THREAD_FPREG+0)
+#define FPD_FPCR	(TASK_THREAD+THREAD_FPREG+96)
+#define FPD_FPSR	(TASK_THREAD+THREAD_FPREG+100)
+#define FPD_FPIAR	(TASK_THREAD+THREAD_FPREG+104)
+#define FPD_PREC	(TASK_THREAD+THREAD_FPREG+108)
+#define FPD_RND		(TASK_THREAD+THREAD_FPREG+110)
+#define FPD_TEMPFP1	(TASK_THREAD+THREAD_FPREG+112)
+#define FPD_TEMPFP2	(TASK_THREAD+THREAD_FPREG+124)
+#define FPD_SIZEOF	(TASK_THREAD+THREAD_FPREG+136)
+
+/* offsets on the stack to access saved registers,
+ * these are only used during instruction decoding
+ * where we always know how deep we're on the stack.
+ */
+#define FPS_DO		(PT_D0)
+#define FPS_D1		(PT_D1)
+#define FPS_D2		(PT_D2)
+#define FPS_A0		(PT_A0)
+#define FPS_A1		(PT_A1)
+#define FPS_A2		(PT_A2)
+#define FPS_SR		(PT_SR)
+#define FPS_PC		(PT_PC)
+#define FPS_EA		(PT_PC+6)
+#define FPS_PC2		(PT_PC+10)
+
+.macro	fp_get_fp_reg
+	lea	(FPD_FPREG,FPDATA,%d0.w*4),%a0
+	lea	(%a0,%d0.w*8),%a0
+.endm
+
+/* Macros used to get/put the current program counter.
+ * 020/030 use a different stack frame then 040/060, for the
+ * 040/060 the return pc points already to the next location,
+ * so this only needs to be modified for jump instructions.
+ */
+.macro	fp_get_pc dest
+	move.l	(FPS_PC+4,%sp),\dest
+.endm
+
+.macro	fp_put_pc src,jump=0
+	move.l	\src,(FPS_PC+4,%sp)
+.endm
+
+.macro	fp_get_instr_data	f,s,dest,label
+	getuser	\f,%sp@(FPS_PC+4)@(0),\dest,\label,%sp@(FPS_PC+4)
+	addq.l	#\s,%sp@(FPS_PC+4)
+.endm
+
+.macro	fp_get_instr_word	dest,label,addr
+	fp_get_instr_data	w,2,\dest,\label,\addr
+.endm
+
+.macro	fp_get_instr_long	dest,label,addr
+	fp_get_instr_data	l,4,\dest,\label,\addr
+.endm
+
+/* These macros are used to read from/write to user space
+ * on error we jump to the fixup section, load the fault
+ * address into %a0 and jump to the exit.
+ * (derived from <asm/uaccess.h>)
+ */
+.macro	getuser	size,src,dest,label,addr
+|	printf	,"[\size<%08x]",1,\addr
+.Lu1\@:	moves\size	\src,\dest
+
+	.section .fixup,"ax"
+	.even
+.Lu2\@:	move.l	\addr,%a0
+	jra	\label
+	.previous
+
+	.section __ex_table,"a"
+	.align	4
+	.long	.Lu1\@,.Lu2\@
+	.previous
+.endm
+
+.macro	putuser	size,src,dest,label,addr
+|	printf	,"[\size>%08x]",1,\addr
+.Lu1\@:	moves\size	\src,\dest
+.Lu2\@:
+
+	.section .fixup,"ax"
+	.even
+.Lu3\@:	move.l	\addr,%a0
+	jra	\label
+	.previous
+
+	.section __ex_table,"a"
+	.align	4
+	.long	.Lu1\@,.Lu3\@
+	.long	.Lu2\@,.Lu3\@
+	.previous
+.endm
+
+
+.macro	movestack	nr,arg1,arg2,arg3,arg4,arg5
+	.if	\nr
+	movestack	(\nr-1),\arg2,\arg3,\arg4,\arg5
+	move.l	\arg1,-(%sp)
+	.endif
+.endm
+
+.macro	printf	bit=-1,string,nr=0,arg1,arg2,arg3,arg4,arg5
+#ifdef FPU_EMU_DEBUG
+	.data
+.Lpdata\@:
+	.string	"\string"
+	.previous
+
+	movem.l	%d0/%d1/%a0/%a1,-(%sp)
+	.if	\bit+1
+#if 0
+	moveq	#\bit,%d0
+	andw	#7,%d0
+	btst	%d0,fp_debugprint+((31-\bit)/8)
+#else
+	btst	#\bit,fp_debugprint+((31-\bit)/8)
+#endif
+	jeq	.Lpskip\@
+	.endif
+	movestack	\nr,\arg1,\arg2,\arg3,\arg4,\arg5
+	pea	.Lpdata\@
+	jsr	printk
+	lea	((\nr+1)*4,%sp),%sp
+.Lpskip\@:
+	movem.l	(%sp)+,%d0/%d1/%a0/%a1
+#endif
+.endm
+
+.macro	printx	bit,fp
+#ifdef FPU_EMU_DEBUG
+	movem.l	%d0/%a0,-(%sp)
+	lea	\fp,%a0
+#if 0
+	moveq	#'+',%d0
+	tst.w	(%a0)
+	jeq	.Lx1\@
+	moveq	#'-',%d0
+.Lx1\@:	printf	\bit," %c",1,%d0
+	move.l	(4,%a0),%d0
+	bclr	#31,%d0
+	jne	.Lx2\@
+	printf	\bit,"0."
+	jra	.Lx3\@
+.Lx2\@:	printf	\bit,"1."
+.Lx3\@:	printf	\bit,"%08x%08x",2,%d0,%a0@(8)
+	move.w	(2,%a0),%d0
+	ext.l	%d0
+	printf	\bit,"E%04x",1,%d0
+#else
+	printf	\bit," %08x%08x%08x",3,%a0@,%a0@(4),%a0@(8)
+#endif
+	movem.l	(%sp)+,%d0/%a0
+#endif
+.endm
+
+.macro	debug	instr,args
+#ifdef FPU_EMU_DEBUG
+	\instr	\args
+#endif
+.endm
+
+
+#endif	/* __ASSEMBLY__ */
+
+#endif	/* _ASM_FRV_MATH_EMU_H */
+
diff -Nru a/include/asm-frv/mb-regs.h b/include/asm-frv/mb-regs.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/mb-regs.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,185 @@
+/* mb-regs.h: motherboard registers
+ *
+ * Copyright (C) 2003, 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+#ifndef _ASM_MB_REGS_H
+#define _ASM_MB_REGS_H
+
+#include <asm/cpu-irqs.h>
+#include <asm/sections.h>
+#include <asm/mem-layout.h>
+
+#define __region_IO	KERNEL_IO_START	/* the region from 0xe0000000 to 0xffffffff has suitable
+					 * protection laid over the top for use in memory-mapped
+					 * I/O
+					 */
+
+#define __region_CS0	0xff000000	/* Boot ROMs area */
+
+#ifdef CONFIG_MB93091_VDK
+/*
+ * VDK motherboard and CPU card specific stuff
+ */
+
+#include <asm/mb93091-fpga-irqs.h>
+
+#define IRQ_CPU_MB93493_0	IRQ_CPU_EXTERNAL0
+#define IRQ_CPU_MB93493_1	IRQ_CPU_EXTERNAL1
+
+#define __region_CS2	0xe0000000	/* SLBUS/PCI I/O space */
+#define __region_CS2_M		0x0fffffff /* mask */
+#define __region_CS2_C		0x00000000 /* control */
+#define __region_CS5	0xf0000000	/* MB93493 CSC area (DAV daughter board) */
+#define __region_CS5_M		0x00ffffff
+#define __region_CS5_C		0x00010000
+#define __region_CS7	0xf1000000	/* CB70 CPU-card PCMCIA port I/O space */
+#define __region_CS7_M		0x00ffffff
+#define __region_CS7_C		0x00410701
+#define __region_CS1	0xfc000000	/* SLBUS/PCI bridge control registers */
+#define __region_CS1_M		0x000fffff
+#define __region_CS1_C		0x00000000
+#define __region_CS6	0xfc100000	/* CB70 CPU-card DM9000 LAN I/O space */
+#define __region_CS6_M		0x000fffff
+#define __region_CS6_C		0x00400707
+#define __region_CS3	0xfc200000	/* MB93493 CSR area (DAV daughter board) */
+#define __region_CS3_M		0x000fffff
+#define __region_CS3_C		0xc8100000
+#define __region_CS4	0xfd000000	/* CB70 CPU-card extra flash space */
+#define __region_CS4_M		0x00ffffff
+#define __region_CS4_C		0x00000f07
+
+#define __region_PCI_IO		(__region_CS2 + 0x04000000UL)
+#define __region_PCI_MEM	(__region_CS2 + 0x08000000UL)
+#define __flush_PCI_writes()						\
+do {									\
+	__builtin_write8((volatile void *) __region_PCI_MEM, 0);	\
+} while(0)
+
+#define __is_PCI_IO(addr) \
+	(((unsigned long)(addr) >> 24) - (__region_PCI_IO >> 24)  < (0x04000000UL >> 24))
+
+#define __is_PCI_MEM(addr) \
+	((unsigned long)(addr) - __region_PCI_MEM < 0x08000000UL)
+
+#define __get_CLKSW()	({ *(volatile unsigned long *)(__region_CS2 + 0x0130000cUL) & 0xffUL; })
+#define __get_CLKIN()	(__get_CLKSW() * 125U * 100000U / 24U)
+
+#ifndef __ASSEMBLY__
+extern int __nongprelbss mb93090_mb00_detected;
+#endif
+
+#define __addr_LEDS()		(__region_CS2 + 0x01200004UL)
+#ifdef CONFIG_MB93090_MB00
+#define __set_LEDS(X)							\
+do {									\
+	if (mb93090_mb00_detected)					\
+		__builtin_write32((void *) __addr_LEDS(), ~(X));	\
+} while (0)
+#else
+#define __set_LEDS(X)
+#endif
+
+#define __addr_LCD()		(__region_CS2 + 0x01200008UL)
+#define __get_LCD(B)		__builtin_read32((volatile void *) (B))
+#define __set_LCD(B,X)		__builtin_write32((volatile void *) (B), (X))
+
+#define LCD_D			0x000000ff		/* LCD data bus */
+#define LCD_RW			0x00000100		/* LCD R/W signal */
+#define LCD_RS			0x00000200		/* LCD Register Select */
+#define LCD_E			0x00000400		/* LCD Start Enable Signal */
+
+#define LCD_CMD_CLEAR		(LCD_E|0x001)
+#define LCD_CMD_HOME		(LCD_E|0x002)
+#define LCD_CMD_CURSOR_INC	(LCD_E|0x004)
+#define LCD_CMD_SCROLL_INC	(LCD_E|0x005)
+#define LCD_CMD_CURSOR_DEC	(LCD_E|0x006)
+#define LCD_CMD_SCROLL_DEC	(LCD_E|0x007)
+#define LCD_CMD_OFF		(LCD_E|0x008)
+#define LCD_CMD_ON(CRSR,BLINK)	(LCD_E|0x00c|(CRSR<<1)|BLINK)
+#define LCD_CMD_CURSOR_MOVE_L	(LCD_E|0x010)
+#define LCD_CMD_CURSOR_MOVE_R	(LCD_E|0x014)
+#define LCD_CMD_DISPLAY_SHIFT_L	(LCD_E|0x018)
+#define LCD_CMD_DISPLAY_SHIFT_R	(LCD_E|0x01c)
+#define LCD_CMD_FUNCSET(DL,N,F)	(LCD_E|0x020|(DL<<4)|(N<<3)|(F<<2))
+#define LCD_CMD_SET_CG_ADDR(X)	(LCD_E|0x040|X)
+#define LCD_CMD_SET_DD_ADDR(X)	(LCD_E|0x080|X)
+#define LCD_CMD_READ_BUSY	(LCD_E|LCD_RW)
+#define LCD_DATA_WRITE(X)	(LCD_E|LCD_RS|(X))
+#define LCD_DATA_READ		(LCD_E|LCD_RS|LCD_RW)
+
+#else
+/*
+ * PDK unit specific stuff
+ */
+
+#include <asm/mb93093-fpga-irqs.h>
+
+#define IRQ_CPU_MB93493_0	IRQ_CPU_EXTERNAL0
+#define IRQ_CPU_MB93493_1	IRQ_CPU_EXTERNAL1
+
+#define __region_CS5	0xf0000000	/* MB93493 CSC area (DAV daughter board) */
+#define __region_CS5_M		0x00ffffff /* mask */
+#define __region_CS5_C		0x00010000 /* control */
+#define __region_CS2	0x20000000	/* FPGA registers */
+#define __region_CS2_M		0x000fffff
+#define __region_CS2_C		0x00000000
+#define __region_CS1	0xfc100000	/* LAN registers */
+#define __region_CS1_M		0x000fffff
+#define __region_CS1_C		0x00010404
+#define __region_CS3	0xfc200000	/* MB93493 CSR area (DAV daughter board) */
+#define __region_CS3_M		0x000fffff
+#define __region_CS3_C		0xc8000000
+#define __region_CS4	0xfd000000	/* extra ROMs area */
+#define __region_CS4_M		0x00ffffff
+#define __region_CS4_C		0x00000f07
+
+#define __region_CS6	0xfe000000	/* not used - hide behind CPU resource I/O regs */
+#define __region_CS6_M		0x000fffff
+#define __region_CS6_C		0x00000f07
+#define __region_CS7	0xfe000000	/* not used - hide behind CPU resource I/O regs */
+#define __region_CS7_M		0x000fffff
+#define __region_CS7_C		0x00000f07
+
+#define __is_PCI_IO(addr)	0	/* no PCI */
+#define __is_PCI_MEM(addr)	0
+#define __region_PCI_IO		0
+#define __region_PCI_MEM	0
+#define __flush_PCI_writes()	do { } while(0)
+
+#define __get_CLKSW()		0UL
+#define __get_CLKIN()		66000000UL
+
+#define __addr_LEDS()		(__region_CS2 + 0x00000023UL)
+#define __set_LEDS(X)		__builtin_write8((volatile void *) __addr_LEDS(), (X))
+
+#define __addr_FPGATR()		(__region_CS2 + 0x00000030UL)
+#define __set_FPGATR(X)		__builtin_write32((volatile void *) __addr_FPGATR(), (X))
+#define __get_FPGATR()		__builtin_read32((volatile void *) __addr_FPGATR())
+
+#define MB93093_FPGA_FPGATR_AUDIO_CLK	0x00000003
+
+#define __set_FPGATR_AUDIO_CLK(V) \
+	__set_FPGATR((__get_FPGATR() & ~MB93093_FPGA_FPGATR_AUDIO_CLK) | (V))
+
+#define MB93093_FPGA_FPGATR_AUDIO_CLK_OFF	0x0
+#define MB93093_FPGA_FPGATR_AUDIO_CLK_11MHz	0x1
+#define MB93093_FPGA_FPGATR_AUDIO_CLK_12MHz	0x2
+#define MB93093_FPGA_FPGATR_AUDIO_CLK_02MHz	0x3
+
+#define MB93093_FPGA_SWR_PUSHSWMASK	(0x1F<<26)
+#define MB93093_FPGA_SWR_PUSHSW4	(1<<29)
+
+#define __addr_FPGA_SWR		((volatile void *)(__region_CS2 + 0x28UL))
+#define __get_FPGA_PUSHSW1_5()	(__builtin_read32(__addr_FPGA_SWR) & MB93093_FPGA_SWR_PUSHSWMASK)
+
+
+#endif
+
+#endif /* _ASM_MB_REGS_H */
diff -Nru a/include/asm-frv/mb86943a.h b/include/asm-frv/mb86943a.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/mb86943a.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,39 @@
+/* mb86943a.h: MB86943 SPARClite <-> PCI bridge registers
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+#ifndef _ASM_MB86943A_H
+#define _ASM_MB86943A_H
+
+#include <asm/mb-regs.h>
+
+#define __reg_MB86943_sl_ctl		*(volatile uint32_t *) (__region_CS1 + 0x00)
+
+#define MB86943_SL_CTL_BUS_WIDTH_64	0x00000001
+#define MB86943_SL_CTL_AS_HOST		0x00000002
+#define MB86943_SL_CTL_DRCT_MASTER_SWAP	0x00000004
+#define MB86943_SL_CTL_DRCT_SLAVE_SWAP	0x00000008
+#define MB86943_SL_CTL_PCI_CONFIG_SWAP	0x00000010
+#define MB86943_SL_CTL_ECS0_ENABLE	0x00000020
+#define MB86943_SL_CTL_ECS1_ENABLE	0x00000040
+#define MB86943_SL_CTL_ECS2_ENABLE	0x00000080
+
+#define __reg_MB86943_ecs_ctl(N)	*(volatile uint32_t *) (__region_CS1 + 0x08 + (0x08*(N)))
+#define __reg_MB86943_ecs_range(N)	*(volatile uint32_t *) (__region_CS1 + 0x20 + (0x10*(N)))
+#define __reg_MB86943_ecs_base(N)	*(volatile uint32_t *) (__region_CS1 + 0x28 + (0x10*(N)))
+
+#define __reg_MB86943_sl_pci_io_range	*(volatile uint32_t *) (__region_CS1 + 0x50)
+#define __reg_MB86943_sl_pci_io_base	*(volatile uint32_t *) (__region_CS1 + 0x58)
+#define __reg_MB86943_sl_pci_mem_range	*(volatile uint32_t *) (__region_CS1 + 0x60)
+#define __reg_MB86943_sl_pci_mem_base	*(volatile uint32_t *) (__region_CS1 + 0x68)
+#define __reg_MB86943_pci_sl_io_base	*(volatile uint32_t *) (__region_CS1 + 0x70)
+#define __reg_MB86943_pci_sl_mem_base	*(volatile uint32_t *) (__region_CS1 + 0x78)
+
+#endif /* _ASM_MB86943A_H */
diff -Nru a/include/asm-frv/mb93091-fpga-irqs.h b/include/asm-frv/mb93091-fpga-irqs.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/mb93091-fpga-irqs.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,44 @@
+/* mb93091-fpga-irqs.h: MB93091 CPU board FPGA IRQs
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+#ifndef _ASM_MB93091_FPGA_IRQS_H
+#define _ASM_MB93091_FPGA_IRQS_H
+
+#ifndef __ASSEMBLY__
+
+#include <asm/irq-routing.h>
+
+#define IRQ_BASE_FPGA		(NR_IRQ_ACTIONS_PER_GROUP * 1)
+
+/* IRQ IDs presented to drivers */
+enum {
+	IRQ_FPGA__UNUSED			= IRQ_BASE_FPGA,
+	IRQ_FPGA_SYSINT_BUS_EXPANSION_1,
+	IRQ_FPGA_SL_BUS_EXPANSION_2,
+	IRQ_FPGA_PCI_INTD,
+	IRQ_FPGA_PCI_INTC,
+	IRQ_FPGA_PCI_INTB,
+	IRQ_FPGA_PCI_INTA,
+	IRQ_FPGA_SL_BUS_EXPANSION_7,
+	IRQ_FPGA_SYSINT_BUS_EXPANSION_8,
+	IRQ_FPGA_SL_BUS_EXPANSION_9,
+	IRQ_FPGA_MB86943_PCI_INTA,
+	IRQ_FPGA_MB86943_SLBUS_SIDE,
+	IRQ_FPGA_RTL8029_INTA,
+	IRQ_FPGA_SYSINT_BUS_EXPANSION_13,
+	IRQ_FPGA_SL_BUS_EXPANSION_14,
+	IRQ_FPGA_NMI,
+};
+
+
+#endif /* !__ASSEMBLY__ */
+
+#endif /* _ASM_MB93091_FPGA_IRQS_H */
diff -Nru a/include/asm-frv/mb93093-fpga-irqs.h b/include/asm-frv/mb93093-fpga-irqs.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/mb93093-fpga-irqs.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,31 @@
+/* mb93093-fpga-irqs.h: MB93093 CPU board FPGA IRQs
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+#ifndef _ASM_MB93093_FPGA_IRQS_H
+#define _ASM_MB93093_FPGA_IRQS_H
+
+#ifndef __ASSEMBLY__
+
+#include <asm/irq-routing.h>
+
+#define IRQ_BASE_FPGA		(NR_IRQ_ACTIONS_PER_GROUP * 1)
+
+/* IRQ IDs presented to drivers */
+enum {
+	IRQ_FPGA_PUSH_BUTTON_SW1_5		= IRQ_BASE_FPGA + 8,
+	IRQ_FPGA_ROCKER_C_SW8			= IRQ_BASE_FPGA + 9,
+	IRQ_FPGA_ROCKER_C_SW9			= IRQ_BASE_FPGA + 10,
+};
+
+
+#endif /* !__ASSEMBLY__ */
+
+#endif /* _ASM_MB93093_FPGA_IRQS_H */
diff -Nru a/include/asm-frv/mb93493-irqs.h b/include/asm-frv/mb93493-irqs.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/mb93493-irqs.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,52 @@
+/* mb93493-irqs.h: MB93493 companion chip IRQs
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+#ifndef _ASM_MB93493_IRQS_H
+#define _ASM_MB93493_IRQS_H
+
+#ifndef __ASSEMBLY__
+
+#include <asm/irq-routing.h>
+
+#define IRQ_BASE_MB93493	(NR_IRQ_ACTIONS_PER_GROUP * 2)
+
+/* IRQ IDs presented to drivers */
+enum {
+	IRQ_MB93493_VDC			= IRQ_BASE_MB93493 + 0,
+	IRQ_MB93493_VCC			= IRQ_BASE_MB93493 + 1,
+	IRQ_MB93493_AUDIO_OUT		= IRQ_BASE_MB93493 + 2,
+	IRQ_MB93493_I2C_0		= IRQ_BASE_MB93493 + 3,
+	IRQ_MB93493_I2C_1		= IRQ_BASE_MB93493 + 4,
+	IRQ_MB93493_USB			= IRQ_BASE_MB93493 + 5,
+	IRQ_MB93493_LOCAL_BUS		= IRQ_BASE_MB93493 + 7,
+	IRQ_MB93493_PCMCIA		= IRQ_BASE_MB93493 + 8,
+	IRQ_MB93493_GPIO		= IRQ_BASE_MB93493 + 9,
+	IRQ_MB93493_AUDIO_IN		= IRQ_BASE_MB93493 + 10,
+};
+
+/* IRQ multiplexor mappings */
+#define ROUTE_VIA_IRQ0	0	/* route IRQ by way of CPU external IRQ 0 */
+#define ROUTE_VIA_IRQ1	1	/* route IRQ by way of CPU external IRQ 1 */
+
+#define IRQ_MB93493_VDC_ROUTE		ROUTE_VIA_IRQ0
+#define IRQ_MB93493_VCC_ROUTE		ROUTE_VIA_IRQ1
+#define IRQ_MB93493_AUDIO_OUT_ROUTE	ROUTE_VIA_IRQ1
+#define IRQ_MB93493_I2C_0_ROUTE		ROUTE_VIA_IRQ1
+#define IRQ_MB93493_I2C_1_ROUTE		ROUTE_VIA_IRQ1
+#define IRQ_MB93493_USB_ROUTE		ROUTE_VIA_IRQ1
+#define IRQ_MB93493_LOCAL_BUS_ROUTE	ROUTE_VIA_IRQ1
+#define IRQ_MB93493_PCMCIA_ROUTE	ROUTE_VIA_IRQ1
+#define IRQ_MB93493_GPIO_ROUTE		ROUTE_VIA_IRQ1
+#define IRQ_MB93493_AUDIO_IN_ROUTE	ROUTE_VIA_IRQ1
+
+#endif /* !__ASSEMBLY__ */
+
+#endif /* _ASM_MB93493_IRQS_H */
diff -Nru a/include/asm-frv/mb93493-regs.h b/include/asm-frv/mb93493-regs.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/mb93493-regs.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,279 @@
+/* mb93493-regs.h: MB93493 companion chip registers
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+#ifndef _ASM_MB93493_REGS_H
+#define _ASM_MB93493_REGS_H
+
+#include <asm/mb-regs.h>
+#include <asm/mb93493-irqs.h>
+
+#define __get_MB93493(X)	({ *(volatile unsigned long *)(__region_CS3 + (X)); })
+
+#define __set_MB93493(X,V)						\
+do {									\
+	*(volatile unsigned long *)(__region_CS3 + (X)) = (V); mb();	\
+} while(0)
+
+#define __get_MB93493_STSR(X)	__get_MB93493(0x3c0 + (X) * 4)
+#define __set_MB93493_STSR(X,V)	__set_MB93493(0x3c0 + (X) * 4, (V))
+#define MB93493_STSR_EN
+
+#define __get_MB93493_IQSR(X)	__get_MB93493(0x3d0 + (X) * 4)
+#define __set_MB93493_IQSR(X,V)	__set_MB93493(0x3d0 + (X) * 4, (V))
+
+#define __get_MB93493_DQSR(X)	__get_MB93493(0x3e0 + (X) * 4)
+#define __set_MB93493_DQSR(X,V)	__set_MB93493(0x3e0 + (X) * 4, (V))
+
+#define __get_MB93493_LBSER()	__get_MB93493(0x3f0)
+#define __set_MB93493_LBSER(V)	__set_MB93493(0x3f0, (V))
+
+#define MB93493_LBSER_VDC	0x00010000
+#define MB93493_LBSER_VCC	0x00020000
+#define MB93493_LBSER_AUDIO	0x00040000
+#define MB93493_LBSER_I2C_0	0x00080000
+#define MB93493_LBSER_I2C_1	0x00100000
+#define MB93493_LBSER_USB	0x00200000
+#define MB93493_LBSER_GPIO	0x00800000
+#define MB93493_LBSER_PCMCIA	0x01000000
+
+#define __get_MB93493_LBSR()	__get_MB93493(0x3fc)
+#define __set_MB93493_LBSR(V)	__set_MB93493(0x3fc, (V))
+
+/*
+ * video display controller
+ */
+#define __get_MB93493_VDC(X)	__get_MB93493(MB93493_VDC_##X)
+#define __set_MB93493_VDC(X,V)	__set_MB93493(MB93493_VDC_##X, (V))
+
+#define MB93493_VDC_RCURSOR	0x140	/* cursor position */
+#define MB93493_VDC_RCT1	0x144	/* cursor colour 1 */
+#define MB93493_VDC_RCT2	0x148	/* cursor colour 2 */
+#define MB93493_VDC_RHDC	0x150	/* horizontal display period */
+#define MB93493_VDC_RH_MARGINS	0x154	/* horizontal margin sizes */
+#define MB93493_VDC_RVDC	0x158	/* vertical display period */
+#define MB93493_VDC_RV_MARGINS	0x15c	/* vertical margin sizes */
+#define MB93493_VDC_RC		0x170	/* VDC control */
+#define MB93493_VDC_RCLOCK	0x174	/* clock divider, DMA req delay */
+#define MB93493_VDC_RBLACK	0x178	/* black insert sizes */
+#define MB93493_VDC_RS		0x17c	/* VDC status */
+
+#define __addr_MB93493_VDC_BCI(X)  ({ (volatile unsigned long *)(__region_CS3 + 0x000 + (X)); })
+#define __addr_MB93493_VDC_TPO(X)  (__region_CS3 + 0x1c0 + (X))
+
+#define VDC_TPO_WIDTH		32
+
+#define VDC_RC_DSR		0x00000080	/* VDC master reset */
+
+#define VDC_RS_IT		0x00060000	/* interrupt indicators */
+#define VDC_RS_IT_UNDERFLOW	0x00040000	/* - underflow event */
+#define VDC_RS_IT_VSYNC		0x00020000	/* - VSYNC event */
+#define VDC_RS_DFI		0x00010000	/* current interlace field number */
+#define VDC_RS_DFI_TOP		0x00000000	/* - top field */
+#define VDC_RS_DFI_BOTTOM	0x00010000	/* - bottom field */
+#define VDC_RS_DCSR		0x00000010	/* cursor state */
+#define VDC_RS_DCM		0x00000003	/* display mode */
+#define VDC_RS_DCM_DISABLED	0x00000000	/* - display disabled */
+#define VDC_RS_DCM_STOPPED	0x00000001	/* - VDC stopped */
+#define VDC_RS_DCM_FREERUNNING	0x00000002	/* - VDC free-running */
+#define VDC_RS_DCM_TRANSFERRING	0x00000003	/* - data being transferred to VDC */
+
+/*
+ * video capture controller
+ */
+#define __get_MB93493_VCC(X)	__get_MB93493(MB93493_VCC_##X)
+#define __set_MB93493_VCC(X,V)	__set_MB93493(MB93493_VCC_##X, (V))
+
+#define MB93493_VCC_RREDUCT	0x104	/* reduction rate */
+#define MB93493_VCC_RHY		0x108	/* horizontal brightness filter coefficients */
+#define MB93493_VCC_RHC		0x10c	/* horizontal colour-difference filter coefficients */
+#define MB93493_VCC_RHSIZE	0x110	/* horizontal cycle sizes */
+#define MB93493_VCC_RHBC	0x114	/* horizontal back porch size */
+#define MB93493_VCC_RVCC	0x118	/* vertical capture period */
+#define MB93493_VCC_RVBC	0x11c	/* vertical back porch period */
+#define MB93493_VCC_RV		0x120	/* vertical filter coefficients */
+#define MB93493_VCC_RDTS	0x128	/* DMA transfer size */
+#define MB93493_VCC_RDTS_4B	0x01000000	/* 4-byte transfer */
+#define MB93493_VCC_RDTS_32B	0x03000000	/* 32-byte transfer */
+#define MB93493_VCC_RDTS_SHIFT	24
+#define MB93493_VCC_RCC		0x130	/* VCC control */
+#define MB93493_VCC_RIS		0x134	/* VCC interrupt status */
+
+#define __addr_MB93493_VCC_TPI(X)  (__region_CS3 + 0x180 + (X))
+
+#define VCC_RHSIZE_RHCC		0x000007ff
+#define VCC_RHSIZE_RHCC_SHIFT	0
+#define VCC_RHSIZE_RHTCC	0x0fff0000
+#define VCC_RHSIZE_RHTCC_SHIFT	16
+
+#define VCC_RVBC_RVBC		0x00003f00
+#define VCC_RVBC_RVBC_SHIFT	8
+
+#define VCC_RREDUCT_RHR		0x07ff0000
+#define VCC_RREDUCT_RHR_SHIFT	16
+#define VCC_RREDUCT_RVR		0x000007ff
+#define VCC_RREDUCT_RVR_SHIFT	0
+
+#define VCC_RCC_CE		0x00000001	/* VCC enable */
+#define VCC_RCC_CS		0x00000002	/* request video capture start */
+#define VCC_RCC_CPF		0x0000000c	/* pixel format */
+#define VCC_RCC_CPF_YCBCR_16	0x00000000	/* - YCbCr 4:2:2 16-bit format */
+#define VCC_RCC_CPF_RGB		0x00000004	/* - RGB 4:4:4 format */
+#define VCC_RCC_CPF_YCBCR_24	0x00000008	/* - YCbCr 4:2:2 24-bit format */
+#define VCC_RCC_CPF_BT656	0x0000000c	/* - ITU R-BT.656 format */
+#define VCC_RCC_CPF_SHIFT	2
+#define VCC_RCC_CSR		0x00000080	/* request reset */
+#define VCC_RCC_HSIP		0x00000100	/* HSYNC polarity */
+#define VCC_RCC_HSIP_LOACT	0x00000000	/* - low active */
+#define VCC_RCC_HSIP_HIACT	0x00000100	/* - high active */
+#define VCC_RCC_VSIP		0x00000200	/* VSYNC polarity */
+#define VCC_RCC_VSIP_LOACT	0x00000000	/* - low active */
+#define VCC_RCC_VSIP_HIACT	0x00000200	/* - high active */
+#define VCC_RCC_CIE		0x00000800	/* interrupt enable */
+#define VCC_RCC_CFP		0x00001000	/* RGB pixel packing */
+#define VCC_RCC_CFP_4TO3	0x00000000	/* - pack 4 pixels into 3 words */
+#define VCC_RCC_CFP_1TO1	0x00001000	/* - pack 1 pixel into 1 words */
+#define VCC_RCC_CSM		0x00006000	/* interlace specification */
+#define VCC_RCC_CSM_ONEPASS	0x00002000	/* - non-interlaced */
+#define VCC_RCC_CSM_INTERLACE	0x00004000	/* - interlaced */
+#define VCC_RCC_CSM_SHIFT	13
+#define VCC_RCC_ES		0x00008000	/* capture start polarity */
+#define VCC_RCC_ES_NEG		0x00000000	/* - negative edge */
+#define VCC_RCC_ES_POS		0x00008000	/* - positive edge */
+#define VCC_RCC_IFI		0x00080000	/* inferlace field evaluation reverse */
+#define VCC_RCC_FDTS		0x00300000	/* interlace field start */
+#define VCC_RCC_FDTS_3_8	0x00000000	/* - 3/8 of horizontal entire cycle */
+#define VCC_RCC_FDTS_1_4	0x00100000	/* - 1/4 of horizontal entire cycle */
+#define VCC_RCC_FDTS_7_16	0x00200000	/* - 7/16 of horizontal entire cycle */
+#define VCC_RCC_FDTS_SHIFT	20
+#define VCC_RCC_MOV		0x00400000	/* test bit - always set to 1 */
+#define VCC_RCC_STP		0x00800000	/* request video capture stop */
+#define VCC_RCC_TO		0x01000000	/* input during top-field only */
+
+#define VCC_RIS_VSYNC		0x01000000	/* VSYNC interrupt */
+#define VCC_RIS_OV		0x02000000	/* overflow interrupt */
+#define VCC_RIS_BOTTOM		0x08000000	/* interlace bottom field */
+#define VCC_RIS_STARTED		0x10000000	/* capture started */
+
+/*
+ * I2C
+ */
+#define MB93493_I2C_BSR 	0x340		/* bus status */
+#define MB93493_I2C_BCR		0x344		/* bus control */
+#define MB93493_I2C_CCR		0x348		/* clock control */
+#define MB93493_I2C_ADR		0x34c		/* address */
+#define MB93493_I2C_DTR		0x350		/* data */
+#define MB93493_I2C_BC2R	0x35c		/* bus control 2 */
+
+#define __addr_MB93493_I2C(port,X)   (__region_CS3 + MB93493_I2C_##X + ((port)*0x20))
+#define __get_MB93493_I2C(port,X)    __get_MB93493(MB93493_I2C_##X + ((port)*0x20))
+#define __set_MB93493_I2C(port,X,V)  __set_MB93493(MB93493_I2C_##X + ((port)*0x20), (V))
+
+#define I2C_BSR_BB	(1 << 7)
+
+/*
+ * audio controller (I2S) registers
+ */
+#define __get_MB93493_I2S(X)	__get_MB93493(MB93493_I2S_##X)
+#define __set_MB93493_I2S(X,V)	__set_MB93493(MB93493_I2S_##X, (V))
+
+#define MB93493_I2S_ALDR	0x300		/* L-channel data */
+#define MB93493_I2S_ARDR	0x304		/* R-channel data */
+#define MB93493_I2S_APDR	0x308		/* 16-bit packed data */
+#define MB93493_I2S_AISTR	0x310		/* status */
+#define MB93493_I2S_AICR	0x314		/* control */
+
+#define __addr_MB93493_I2S_ALDR(X)	(__region_CS3 + MB93493_I2S_ALDR + (X))
+#define __addr_MB93493_I2S_ARDR(X)	(__region_CS3 + MB93493_I2S_ARDR + (X))
+#define __addr_MB93493_I2S_APDR(X)	(__region_CS3 + MB93493_I2S_APDR + (X))
+#define __addr_MB93493_I2S_ADR(X)	(__region_CS3 + 0x320 + (X))
+
+#define I2S_AISTR_OTST		0x00000003	/* status of output data transfer */
+#define I2S_AISTR_OTR		0x00000010	/* output transfer request pending */
+#define I2S_AISTR_OUR		0x00000020	/* output FIFO underrun detected */
+#define I2S_AISTR_OOR		0x00000040	/* output FIFO overrun detected */
+#define I2S_AISTR_ODS		0x00000100	/* output DMA transfer size */
+#define I2S_AISTR_ODE		0x00000400	/* output DMA transfer request enable */
+#define I2S_AISTR_OTRIE		0x00001000	/* output transfer request interrupt enable */
+#define I2S_AISTR_OURIE		0x00002000	/* output FIFO underrun interrupt enable */
+#define I2S_AISTR_OORIE		0x00004000	/* output FIFO overrun interrupt enable */
+#define I2S_AISTR__OUT_MASK	0x00007570
+#define I2S_AISTR_ITST		0x00030000	/* status of input data transfer */
+#define I2S_AISTR_ITST_SHIFT	16
+#define I2S_AISTR_ITR		0x00100000	/* input transfer request pending */
+#define I2S_AISTR_IUR		0x00200000	/* input FIFO underrun detected */
+#define I2S_AISTR_IOR		0x00400000	/* input FIFO overrun detected */
+#define I2S_AISTR_IDS		0x01000000	/* input DMA transfer size */
+#define I2S_AISTR_IDE		0x04000000	/* input DMA transfer request enable */
+#define I2S_AISTR_ITRIE		0x10000000	/* input transfer request interrupt enable */
+#define I2S_AISTR_IURIE		0x20000000	/* input FIFO underrun interrupt enable */
+#define I2S_AISTR_IORIE		0x40000000	/* input FIFO overrun interrupt enable */
+#define I2S_AISTR__IN_MASK	0x75700000
+
+#define I2S_AICR_MI		0x00000001	/* mono input requested */
+#define I2S_AICR_AMI		0x00000002	/* relation between LRCKI/FS1 and SDI */
+#define I2S_AICR_LRI		0x00000004	/* function of LRCKI pin */
+#define I2S_AICR_SDMI		0x00000070	/* format of input audio data */
+#define I2S_AICR_SDMI_SHIFT	4
+#define I2S_AICR_CLI		0x00000080	/* input FIFO clearing control */
+#define I2S_AICR_IM		0x00000300	/* input state control */
+#define I2S_AICR_IM_SHIFT	8
+#define I2S_AICR__IN_MASK	0x000003f7
+#define I2S_AICR_MO		0x00001000	/* mono output requested */
+#define I2S_AICR_AMO		0x00002000	/* relation between LRCKO/FS0 and SDO */
+#define I2S_AICR_AMO_SHIFT	13
+#define I2S_AICR_LRO		0x00004000	/* function of LRCKO pin */
+#define I2S_AICR_SDMO		0x00070000	/* format of output audio data */
+#define I2S_AICR_SDMO_SHIFT	16
+#define I2S_AICR_CLO		0x00080000	/* output FIFO clearing control */
+#define I2S_AICR_OM		0x00100000	/* output state control */
+#define I2S_AICR__OUT_MASK	0x001f7000
+#define I2S_AICR_DIV		0x03000000	/* frequency division rate */
+#define I2S_AICR_DIV_SHIFT	24
+#define I2S_AICR_FL		0x20000000	/* frame length */
+#define I2S_AICR_FS		0x40000000	/* frame sync method */
+#define I2S_AICR_ME		0x80000000	/* master enable */
+
+/*
+ * PCMCIA
+ */
+#define __addr_MB93493_PCMCIA(X)  ((volatile unsigned long *)(__region_CS5 + (X)))
+
+/*
+ * GPIO
+ */
+#define __get_MB93493_GPIO_PDR(X)	__get_MB93493(0x380 + (X) * 0xc0)
+#define __set_MB93493_GPIO_PDR(X,V)	__set_MB93493(0x380 + (X) * 0xc0, (V))
+
+#define __get_MB93493_GPIO_GPDR(X)	__get_MB93493(0x384 + (X) * 0xc0)
+#define __set_MB93493_GPIO_GPDR(X,V)	__set_MB93493(0x384 + (X) * 0xc0, (V))
+
+#define __get_MB93493_GPIO_SIR(X)	__get_MB93493(0x388 + (X) * 0xc0)
+#define __set_MB93493_GPIO_SIR(X,V)	__set_MB93493(0x388 + (X) * 0xc0, (V))
+
+#define __get_MB93493_GPIO_SOR(X)	__get_MB93493(0x38c + (X) * 0xc0)
+#define __set_MB93493_GPIO_SOR(X,V)	__set_MB93493(0x38c + (X) * 0xc0, (V))
+
+#define __get_MB93493_GPIO_PDSR(X)	__get_MB93493(0x390 + (X) * 0xc0)
+#define __set_MB93493_GPIO_PDSR(X,V)	__set_MB93493(0x390 + (X) * 0xc0, (V))
+
+#define __get_MB93493_GPIO_PDCR(X)	__get_MB93493(0x394 + (X) * 0xc0)
+#define __set_MB93493_GPIO_PDCR(X,V)	__set_MB93493(0x394 + (X) * 0xc0, (V))
+
+#define __get_MB93493_GPIO_INTST(X)	__get_MB93493(0x398 + (X) * 0xc0)
+#define __set_MB93493_GPIO_INTST(X,V)	__set_MB93493(0x398 + (X) * 0xc0, (V))
+
+#define __get_MB93493_GPIO_IEHL(X)	__get_MB93493(0x39c + (X) * 0xc0)
+#define __set_MB93493_GPIO_IEHL(X,V)	__set_MB93493(0x39c + (X) * 0xc0, (V))
+
+#define __get_MB93493_GPIO_IELH(X)	__get_MB93493(0x3a0 + (X) * 0xc0)
+#define __set_MB93493_GPIO_IELH(X,V)	__set_MB93493(0x3a0 + (X) * 0xc0, (V))
+
+#endif /* _ASM_MB93493_REGS_H */
diff -Nru a/include/asm-frv/mem-layout.h b/include/asm-frv/mem-layout.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/mem-layout.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,78 @@
+/* mem-layout.h: memory layout
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+#ifndef _ASM_MEM_LAYOUT_H
+#define _ASM_MEM_LAYOUT_H
+
+#ifndef __ASSEMBLY__
+#define __UL(X)	((unsigned long) (X))
+#else
+#define __UL(X)	(X)
+#endif
+
+/*
+ * PAGE_SHIFT determines the page size
+ */
+#define PAGE_SHIFT			14
+
+#ifndef __ASSEMBLY__
+#define PAGE_SIZE			(1UL << PAGE_SHIFT)
+#else
+#define PAGE_SIZE			(1 << PAGE_SHIFT)
+#endif
+
+#define PAGE_MASK			(~(PAGE_SIZE-1))
+
+/*****************************************************************************/
+/*
+ * virtual memory layout from kernel's point of view
+ */
+#define PAGE_OFFSET			((unsigned long) &__page_offset)
+
+#ifdef CONFIG_MMU
+
+/* see Documentation/fujitsu/frv/mmu-layout.txt */
+#define KERNEL_LOWMEM_START		__UL(0xc0000000)
+#define KERNEL_LOWMEM_END		__UL(0xd0000000)
+#define VMALLOC_START			__UL(0xd0000000)
+#define VMALLOC_END			__UL(0xd8000000)
+#define PKMAP_BASE			__UL(0xd8000000)
+#define PKMAP_END			__UL(0xdc000000)
+#define KMAP_ATOMIC_SECONDARY_FRAME	__UL(0xdc000000)
+#define KMAP_ATOMIC_PRIMARY_FRAME	__UL(0xdd000000)
+
+#endif
+
+#define KERNEL_IO_START			__UL(0xe0000000)
+
+
+/*****************************************************************************/
+/*
+ * memory layout from userspace's point of view
+ */
+#define BRK_BASE			__UL(2 * 1024 * 1024 + PAGE_SIZE)
+#define STACK_TOP			__UL(2 * 1024 * 1024)
+
+/* userspace process size */
+#ifdef CONFIG_MMU
+#define TASK_SIZE			(PAGE_OFFSET)
+#else
+#define TASK_SIZE			__UL(0xFFFFFFFFUL)
+#endif
+
+/* base of area at which unspecified mmaps will start */
+#ifdef CONFIG_BINFMT_ELF_FDPIC
+#define TASK_UNMAPPED_BASE		__UL(16 * 1024 * 1024)
+#else
+#define TASK_UNMAPPED_BASE		__UL(TASK_SIZE / 3)
+#endif
+
+#endif /* _ASM_MEM_LAYOUT_H */
diff -Nru a/include/asm-frv/mman.h b/include/asm-frv/mman.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/mman.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,44 @@
+#ifndef __ASM_MMAN_H__
+#define __ASM_MMAN_H__
+
+#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 PROT_GROWSDOWN	0x01000000	/* mprotect flag: extend change to start of growsdown vma */
+#define PROT_GROWSUP	0x02000000	/* mprotect flag: extend change to end of growsup vma */
+
+#define MAP_SHARED	0x01		/* Share changes */
+#define MAP_PRIVATE	0x02		/* Changes are private */
+#define MAP_TYPE	0x0f		/* Mask for type of mapping */
+#define MAP_FIXED	0x10		/* Interpret addr exactly */
+#define MAP_ANONYMOUS	0x20		/* don't use a file */
+
+#define MAP_GROWSDOWN	0x0100		/* stack-like segment */
+#define MAP_DENYWRITE	0x0800		/* ETXTBSY */
+#define MAP_EXECUTABLE	0x1000		/* mark it as an executable */
+#define MAP_LOCKED	0x2000		/* pages are locked */
+#define MAP_NORESERVE	0x4000		/* don't check for reservations */
+#define MAP_POPULATE	0x8000		/* populate (prefault) pagetables */
+#define MAP_NONBLOCK	0x10000		/* do not block on IO */
+
+#define MS_ASYNC	1		/* sync memory asynchronously */
+#define MS_INVALIDATE	2		/* invalidate the caches */
+#define MS_SYNC		4		/* synchronous memory sync */
+
+#define MCL_CURRENT	1		/* lock all current mappings */
+#define MCL_FUTURE	2		/* lock all future mappings */
+
+#define MADV_NORMAL	0x0		/* default page-in behavior */
+#define MADV_RANDOM	0x1		/* page-in minimum required */
+#define MADV_SEQUENTIAL	0x2		/* read-ahead aggressively */
+#define MADV_WILLNEED	0x3		/* pre-fault pages */
+#define MADV_DONTNEED	0x4		/* discard these pages */
+
+/* compatibility flags */
+#define MAP_ANON	MAP_ANONYMOUS
+#define MAP_FILE	0
+
+#endif /* __ASM_MMAN_H__ */
+
diff -Nru a/include/asm-frv/mmu.h b/include/asm-frv/mmu.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/mmu.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,42 @@
+/* mmu.h: memory management context for FR-V with or without MMU support
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+#ifndef _ASM_MMU_H
+#define _ASM_MMU_H
+
+typedef struct {
+#ifdef CONFIG_MMU
+	struct list_head id_link;		/* link in list of context ID owners */
+	unsigned short	id;			/* MMU context ID */
+	unsigned short	id_busy;		/* true if ID is in CXNR */
+	unsigned long	itlb_cached_pge;	/* [SCR0] PGE cached for insn TLB handler */
+	unsigned long	itlb_ptd_mapping;	/* [DAMR4] PTD mapping for itlb cached PGE */
+	unsigned long	dtlb_cached_pge;	/* [SCR1] PGE cached for data TLB handler */
+	unsigned long	dtlb_ptd_mapping;	/* [DAMR5] PTD mapping for dtlb cached PGE */
+
+#else
+	struct vm_list_struct	*vmlist;
+	unsigned long		end_brk;
+
+#endif
+
+#ifdef CONFIG_BINFMT_ELF_FDPIC
+	unsigned long	exec_fdpic_loadmap;
+	unsigned long	interp_fdpic_loadmap;
+#endif
+
+} mm_context_t;
+
+#ifdef CONFIG_MMU
+extern int __nongpreldata cxn_pinned;
+extern int cxn_pin_by_pid(pid_t pid);
+#endif
+
+#endif /* _ASM_MMU_H */
diff -Nru a/include/asm-frv/mmu_context.h b/include/asm-frv/mmu_context.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/mmu_context.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,50 @@
+/* mmu_context.h: MMU context management routines
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+#ifndef _ASM_MMU_CONTEXT_H
+#define _ASM_MMU_CONTEXT_H
+
+#include <linux/config.h>
+#include <asm/setup.h>
+#include <asm/page.h>
+#include <asm/pgalloc.h>
+
+static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
+{
+}
+
+#ifdef CONFIG_MMU
+extern int init_new_context(struct task_struct *tsk, struct mm_struct *mm);
+extern void change_mm_context(mm_context_t *old, mm_context_t *ctx, pgd_t *_pgd);
+extern void destroy_context(struct mm_struct *mm);
+
+#else
+#define init_new_context(tsk, mm)		({ 0; })
+#define change_mm_context(old, ctx, _pml4)	do {} while(0)
+#define destroy_context(mm)			do {} while(0)
+#endif
+
+#define switch_mm(prev, next, tsk)						\
+do {										\
+	if (prev != next)							\
+		change_mm_context(&prev->context, &next->context, next->pgd);	\
+} while(0)
+
+#define activate_mm(prev, next)						\
+do {									\
+	change_mm_context(&prev->context, &next->context, next->pgd);	\
+} while(0)
+
+#define deactivate_mm(tsk, mm)			\
+do {						\
+} while(0)
+
+#endif
diff -Nru a/include/asm-frv/module.h b/include/asm-frv/module.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/module.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,20 @@
+/* module.h: FRV module stuff
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+#ifndef _ASM_MODULE_H
+#define _ASM_MODULE_H
+
+#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_MODULE_H */
+
diff -Nru a/include/asm-frv/msgbuf.h b/include/asm-frv/msgbuf.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/msgbuf.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,32 @@
+#ifndef _ASM_MSGBUF_H
+#define _ASM_MSGBUF_H
+
+/*
+ * The msqid64_ds structure for FR-V architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 64-bit time_t to solve y2038 problem
+ * - 2 miscellaneous 32-bit values
+ */
+
+struct msqid64_ds {
+	struct ipc64_perm	msg_perm;
+	__kernel_time_t		msg_stime;	/* last msgsnd time */
+	unsigned long		__unused1;
+	__kernel_time_t		msg_rtime;	/* last msgrcv time */
+	unsigned long		__unused2;
+	__kernel_time_t		msg_ctime;	/* last change time */
+	unsigned long		__unused3;
+	unsigned long		msg_cbytes;	/* current number of bytes on queue */
+	unsigned long		msg_qnum;	/* number of messages in queue */
+	unsigned long		msg_qbytes;	/* max number of bytes on queue */
+	__kernel_pid_t		msg_lspid;	/* pid of last msgsnd */
+	__kernel_pid_t		msg_lrpid;	/* last receive pid */
+	unsigned long		__unused4;
+	unsigned long		__unused5;
+};
+
+#endif /* _ASM_MSGBUF_H */
+
diff -Nru a/include/asm-frv/namei.h b/include/asm-frv/namei.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/namei.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,18 @@
+/*
+ * asm/namei.h
+ *
+ * Included from linux/fs/namei.c
+ */
+
+#ifndef __ASM_NAMEI_H
+#define __ASM_NAMEI_H
+
+/* This dummy routine maybe changed to something useful
+ * for /usr/gnemul/ emulation stuff.
+ * Look at asm-sparc/namei.h for details.
+ */
+
+#define __emul_prefix() NULL
+
+#endif
+
diff -Nru a/include/asm-frv/page.h b/include/asm-frv/page.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/page.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,105 @@
+#ifndef _ASM_PAGE_H
+#define _ASM_PAGE_H
+
+#ifdef __KERNEL__
+
+#include <linux/config.h>
+#include <asm/virtconvert.h>
+#include <asm/mem-layout.h>
+#include <asm/sections.h>
+#include <asm/setup.h>
+
+#ifndef __ASSEMBLY__
+
+#define get_user_page(vaddr)			__get_free_page(GFP_KERNEL)
+#define free_user_page(page, addr)		free_page(addr)
+
+#define clear_page(pgaddr)			memset((pgaddr), 0, PAGE_SIZE)
+#define copy_page(to,from)			memcpy((to), (from), PAGE_SIZE)
+
+#define clear_user_page(pgaddr, vaddr, page)	memset((pgaddr), 0, PAGE_SIZE)
+#define copy_user_page(vto, vfrom, vaddr, topg)	memcpy((vto), (vfrom), PAGE_SIZE)
+
+/*
+ * These are used to make use of C type-checking..
+ */
+typedef struct { unsigned long	pte;	} pte_t;
+typedef struct { unsigned long	ste[64];} pmd_t;
+typedef struct { pmd_t		pue[1]; } pud_t;
+typedef struct { pud_t		pge[1];	} pgd_t;
+typedef struct { unsigned long	pgprot;	} pgprot_t;
+
+#define pte_val(x)	((x).pte)
+#define pmd_val(x)	((x).ste[0])
+#define pud_val(x)	((x).pue[0])
+#define pgd_val(x)	((x).pge[0])
+#define pgprot_val(x)	((x).pgprot)
+
+#define __pte(x)	((pte_t) { (x) } )
+#define __pmd(x)	((pmd_t) { (x) } )
+#define __pud(x)	((pud_t) { (x) } )
+#define __pgd(x)	((pgd_t) { (x) } )
+#define __pgprot(x)	((pgprot_t) { (x) } )
+#define PTE_MASK	PAGE_MASK
+
+/* to align the pointer to the (next) page boundary */
+#define PAGE_ALIGN(addr)	(((addr) + PAGE_SIZE - 1) & PAGE_MASK)
+
+/* Pure 2^n version of get_order */
+static inline int get_order(unsigned long size) __attribute_const__;
+static inline int get_order(unsigned long size)
+{
+	int order;
+
+	size = (size - 1) >> (PAGE_SHIFT - 1);
+	order = -1;
+	do {
+		size >>= 1;
+		order++;
+	} while (size);
+	return order;
+}
+
+#define devmem_is_allowed(pfn)	1
+
+#define __pa(vaddr)		virt_to_phys((void *) vaddr)
+#define __va(paddr)		phys_to_virt((unsigned long) paddr)
+
+#define pfn_to_kaddr(pfn)	__va((pfn) << PAGE_SHIFT)
+
+extern unsigned long max_low_pfn;
+extern unsigned long min_low_pfn;
+extern unsigned long max_pfn;
+
+#ifdef CONFIG_MMU
+#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)
+
+#else
+#define pfn_to_page(pfn)	(&mem_map[(pfn) - (PAGE_OFFSET >> PAGE_SHIFT)])
+#define page_to_pfn(page)	((PAGE_OFFSET >> PAGE_SHIFT) + (unsigned long) ((page) - mem_map))
+#define pfn_valid(pfn)		((pfn) >= min_low_pfn && (pfn) < max_low_pfn)
+
+#endif
+
+#define virt_to_page(kaddr)	pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
+#define virt_addr_valid(kaddr)	pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
+
+
+#ifdef CONFIG_MMU
+#define VM_DATA_DEFAULT_FLAGS \
+	(VM_READ | VM_WRITE | \
+	((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0 ) | \
+		 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
+#endif
+
+#endif /* __ASSEMBLY__ */
+
+#endif /* __KERNEL__ */
+
+#ifdef CONFIG_CONTIGUOUS_PAGE_ALLOC
+#define WANT_PAGE_VIRTUAL	1
+#endif
+
+#endif /* _ASM_PAGE_H */
diff -Nru a/include/asm-frv/param.h b/include/asm-frv/param.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/param.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,23 @@
+#ifndef _ASM_PARAM_H
+#define _ASM_PARAM_H
+
+#ifdef __KERNEL__
+#define HZ		1000		/* Internal kernel timer frequency */
+#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
+
+#define EXEC_PAGESIZE	16384
+
+#ifndef NOGROUP
+#define NOGROUP		(-1)
+#endif
+
+#define MAXHOSTNAMELEN		64	/* max length of hostname */
+#define COMMAND_LINE_SIZE	512
+
+#endif /* _ASM_PARAM_H */
diff -Nru a/include/asm-frv/pci.h b/include/asm-frv/pci.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/pci.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,108 @@
+/* pci.h: FR-V specific PCI declarations
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ * - Derived from include/asm-m68k/pci.h
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#ifndef ASM_PCI_H
+#define	ASM_PCI_H
+
+#include <linux/config.h>
+#include <linux/mm.h>
+#include <asm/scatterlist.h>
+#include <asm-generic/pci-dma-compat.h>
+#include <asm-generic/pci.h>
+
+struct pci_dev;
+
+#define pcibios_assign_all_busses()	0
+
+static inline void pcibios_add_platform_entries(struct pci_dev *dev)
+{
+}
+
+extern void pcibios_set_master(struct pci_dev *dev);
+
+extern void pcibios_penalize_isa_irq(int irq);
+
+#ifdef CONFIG_MMU
+extern void *consistent_alloc(int gfp, size_t size, dma_addr_t *dma_handle);
+extern void consistent_free(void *vaddr);
+extern void consistent_sync(void *vaddr, size_t size, int direction);
+extern void consistent_sync_page(struct page *page, unsigned long offset,
+				 size_t size, int direction);
+#endif
+
+extern void *pci_alloc_consistent(struct pci_dev *hwdev, size_t size,
+				  dma_addr_t *dma_handle);
+
+extern void pci_free_consistent(struct pci_dev *hwdev, size_t size,
+				void *vaddr, dma_addr_t dma_handle);
+
+/* This is always fine. */
+#define pci_dac_dma_supported(pci_dev, mask)	(1)
+
+/* Return the index of the PCI controller for device PDEV. */
+#define pci_controller_num(PDEV)	(0)
+
+/* 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)
+
+/*
+ *	These are pretty much arbitary with the CoMEM implementation.
+ *	We have the whole address space to ourselves.
+ */
+#define PCIBIOS_MIN_IO		0x100
+#define PCIBIOS_MIN_MEM		0x00010000
+
+/* Make physical memory consistent for a single
+ * streaming mode DMA translation after a transfer.
+ *
+ * If you perform a pci_map_single() but wish to interrogate the
+ * buffer using the cpu, yet do not wish to teardown the PCI dma
+ * mapping, you must call this function before doing so.  At the
+ * next point you give the PCI dma address back to the card, the
+ * device again owns the buffer.
+ */
+static inline void pci_dma_sync_single(struct pci_dev *hwdev,
+				       dma_addr_t dma_handle,
+				       size_t size, int direction)
+{
+	if (direction == PCI_DMA_NONE)
+                BUG();
+
+	frv_cache_wback_inv((unsigned long)bus_to_virt(dma_handle),
+			    (unsigned long)bus_to_virt(dma_handle) + size);
+}
+
+/* Make physical memory consistent for a set of streaming
+ * mode DMA translations after a transfer.
+ *
+ * The same as pci_dma_sync_single but for a scatter-gather list,
+ * same rules and usage.
+ */
+static inline void pci_dma_sync_sg(struct pci_dev *hwdev,
+				   struct scatterlist *sg,
+				   int nelems, int direction)
+{
+	int i;
+
+	if (direction == PCI_DMA_NONE)
+                BUG();
+
+	for (i = 0; i < nelems; i++)
+		frv_cache_wback_inv(sg_dma_address(&sg[i]),
+				    sg_dma_address(&sg[i])+sg_dma_len(&sg[i]));
+}
+
+
+#endif
diff -Nru a/include/asm-frv/percpu.h b/include/asm-frv/percpu.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/percpu.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,6 @@
+#ifndef __ASM_PERCPU_H
+#define __ASM_PERCPU_H
+
+#include <asm-generic/percpu.h>
+
+#endif	/* __ASM_PERCPU_H */
diff -Nru a/include/asm-frv/pgalloc.h b/include/asm-frv/pgalloc.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/pgalloc.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,64 @@
+/* pgalloc.h: Page allocation routines for FRV
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ *
+ * Derived from:
+ *	include/asm-m68knommu/pgalloc.h
+ *	include/asm-i386/pgalloc.h
+ */
+#ifndef _ASM_PGALLOC_H
+#define _ASM_PGALLOC_H
+
+#include <linux/config.h>
+#include <asm/setup.h>
+#include <asm/virtconvert.h>
+
+#ifdef CONFIG_MMU
+
+#define pmd_populate_kernel(mm, pmd, pte) __set_pmd(pmd, __pa(pte) | _PAGE_TABLE)
+#define pmd_populate(MM, PMD, PAGE)						\
+do {										\
+	__set_pmd((PMD), page_to_pfn(PAGE) << PAGE_SHIFT | _PAGE_TABLE);	\
+} while(0)
+
+/*
+ * Allocate and free page tables.
+ */
+
+extern pgd_t *pgd_alloc(struct mm_struct *);
+extern void pgd_free(pgd_t *);
+
+extern pte_t *pte_alloc_one_kernel(struct mm_struct *, unsigned long);
+
+extern struct page *pte_alloc_one(struct mm_struct *, unsigned long);
+
+static inline void pte_free_kernel(pte_t *pte)
+{
+	free_page((unsigned long)pte);
+}
+
+static inline void pte_free(struct page *pte)
+{
+	__free_page(pte);
+}
+
+#define __pte_free_tlb(tlb,pte)		tlb_remove_page((tlb),(pte))
+
+/*
+ * allocating and freeing a pmd is trivial: the 1-entry pmd is
+ * inside the pgd, so has no extra memory associated with it.
+ * (In the PAE case we free the pmds as part of the pgd.)
+ */
+#define pmd_alloc_one(mm, addr)		({ BUG(); ((pmd_t *) 2); })
+#define pmd_free(x)			do { } while (0)
+#define __pmd_free_tlb(tlb,x)		do { } while (0)
+
+#endif /* CONFIG_MMU */
+
+#endif /* _ASM_PGALLOC_H */
diff -Nru a/include/asm-frv/pgtable.h b/include/asm-frv/pgtable.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/pgtable.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,554 @@
+/* pgtable.h: FR-V page table mangling
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ *
+ * Derived from:
+ *	include/asm-m68knommu/pgtable.h
+ *	include/asm-i386/pgtable.h
+ */
+
+#ifndef _ASM_PGTABLE_H
+#define _ASM_PGTABLE_H
+
+#include <linux/config.h>
+#include <asm/mem-layout.h>
+#include <asm/setup.h>
+#include <asm/processor.h>
+
+#ifndef __ASSEMBLY__
+#include <linux/threads.h>
+#include <linux/slab.h>
+#include <linux/list.h>
+#include <linux/spinlock.h>
+#endif
+
+#ifndef __ASSEMBLY__
+#if defined(CONFIG_HIGHPTE)
+typedef unsigned long pte_addr_t;
+#else
+typedef pte_t *pte_addr_t;
+#endif
+#endif
+
+/*****************************************************************************/
+/*
+ * MMU-less operation case first
+ */
+#ifndef CONFIG_MMU
+
+#define pgd_present(pgd)	(1)		/* pages are always present on NO_MM */
+#define pgd_none(pgd)		(0)
+#define pgd_bad(pgd)		(0)
+#define pgd_clear(pgdp)
+#define kern_addr_valid(addr)	(1)
+#define	pmd_offset(a, b)	((void *) 0)
+
+#define PAGE_NONE		__pgprot(0)	/* these mean nothing to NO_MM */
+#define PAGE_SHARED		__pgprot(0)	/* these mean nothing to NO_MM */
+#define PAGE_COPY		__pgprot(0)	/* these mean nothing to NO_MM */
+#define PAGE_READONLY		__pgprot(0)	/* these mean nothing to NO_MM */
+#define PAGE_KERNEL		__pgprot(0)	/* these mean nothing to NO_MM */
+
+#define __swp_type(x)		(0)
+#define __swp_offset(x)		(0)
+#define __swp_entry(typ,off)	((swp_entry_t) { ((typ) | ((off) << 7)) })
+#define __pte_to_swp_entry(pte)	((swp_entry_t) { pte_val(pte) })
+#define __swp_entry_to_pte(x)	((pte_t) { (x).val })
+
+#ifndef __ASSEMBLY__
+static inline int pte_file(pte_t pte) { return 0; }
+#endif
+
+#define ZERO_PAGE(vaddr)	({ BUG(); NULL; })
+
+#define swapper_pg_dir		((pgd_t *) NULL)
+
+#define pgtable_cache_init()	do {} while(0)
+
+#else /* !CONFIG_MMU */
+/*****************************************************************************/
+/*
+ * then MMU operation
+ */
+
+/*
+ * ZERO_PAGE is a global shared page that is always zero: used
+ * for zero-mapped memory areas etc..
+ */
+#ifndef __ASSEMBLY__
+extern unsigned long empty_zero_page;
+#define ZERO_PAGE(vaddr)	virt_to_page(empty_zero_page)
+#endif
+
+/*
+ * we use 2-level page tables, folding the PMD (mid-level table) into the PGE (top-level entry)
+ * [see Documentation/fujitsu/frv/mmu-layout.txt]
+ *
+ * Page Directory:
+ *  - Size: 16KB
+ *  - 64 PGEs per PGD
+ *  - Each PGE holds 1 PUD and covers 64MB
+ *
+ * Page Upper Directory:
+ *  - Size: 256B
+ *  - 1 PUE per PUD
+ *  - Each PUE holds 1 PMD and covers 64MB
+ *
+ * Page Mid-Level Directory
+ *  - Size: 256B
+ *  - 1 PME per PMD
+ *  - Each PME holds 64 STEs, all of which point to separate chunks of the same Page Table
+ *  - All STEs are instantiated at the same time
+ *
+ * Page Table
+ *  - Size: 16KB
+ *  - 4096 PTEs per PT
+ *  - Each Linux PT is subdivided into 64 FR451 PT's, each of which holds 64 entries
+ *
+ * Pages
+ *  - Size: 4KB
+ *
+ * total PTEs
+ *	= 1 PML4E * 64 PGEs * 1 PUEs * 1 PMEs * 4096 PTEs
+ *	= 1 PML4E * 64 PGEs * 64 STEs * 64 PTEs/FR451-PT
+ *	= 262144 (or 256 * 1024)
+ */
+#define PGDIR_SHIFT		26
+#define PGDIR_SIZE		(1UL << PGDIR_SHIFT)
+#define PGDIR_MASK		(~(PGDIR_SIZE - 1))
+#define PTRS_PER_PGD		64
+
+#define PUD_SHIFT		26
+#define PTRS_PER_PUD		1
+#define PUD_SIZE		(1UL << PUD_SHIFT)
+#define PUD_MASK		(~(PUD_SIZE - 1))
+#define PUE_SIZE		256
+
+#define PMD_SHIFT		26
+#define PMD_SIZE		(1UL << PMD_SHIFT)
+#define PMD_MASK		(~(PMD_SIZE - 1))
+#define PTRS_PER_PMD		1
+#define PME_SIZE		256
+
+#define __frv_PT_SIZE		256
+
+#define PTRS_PER_PTE		4096
+
+#define USER_PGDS_IN_LAST_PML4	(TASK_SIZE / PGDIR_SIZE)
+#define FIRST_USER_PGD_NR	0
+
+#define USER_PGD_PTRS		(PAGE_OFFSET >> PGDIR_SHIFT)
+#define KERNEL_PGD_PTRS		(PTRS_PER_PGD - USER_PGD_PTRS)
+
+#define TWOLEVEL_PGDIR_SHIFT	26
+#define BOOT_USER_PGD_PTRS	(__PAGE_OFFSET >> TWOLEVEL_PGDIR_SHIFT)
+#define BOOT_KERNEL_PGD_PTRS	(PTRS_PER_PGD - BOOT_USER_PGD_PTRS)
+
+#ifndef __ASSEMBLY__
+
+extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
+
+#define pte_ERROR(e) \
+	printk("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, (e).pte)
+#define pmd_ERROR(e) \
+	printk("%s:%d: bad pmd %08lx.\n", __FILE__, __LINE__, pmd_val(e))
+#define pud_ERROR(e) \
+	printk("%s:%d: bad pud %08lx.\n", __FILE__, __LINE__, pmd_val(pud_val(e)))
+#define pgd_ERROR(e) \
+	printk("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, pmd_val(pud_val(pgd_val(e))))
+
+/*
+ * Certain architectures need to do special things when PTEs
+ * within a page table are directly modified.  Thus, the following
+ * hook is made available.
+ */
+#define set_pte(pteptr, pteval)				\
+do {							\
+	*(pteptr) = (pteval);				\
+	asm volatile("dcf %M0" :: "U"(*pteptr));	\
+} while(0)
+
+#define set_pte_atomic(pteptr, pteval)		set_pte((pteptr), (pteval))
+
+/*
+ * pgd_offset() returns a (pgd_t *)
+ * pgd_index() is used get the offset into the pgd page's array of pgd_t's;
+ */
+#define pgd_offset(mm, address) ((mm)->pgd + pgd_index(address))
+
+/*
+ * a shortcut which implies the use of the kernel's pgd, instead
+ * of a process's
+ */
+#define pgd_offset_k(address) pgd_offset(&init_mm, address)
+
+/*
+ * The "pgd_xxx()" functions here are trivial for a folded two-level
+ * setup: the pud is never bad, and a pud always exists (as it's folded
+ * into the pgd entry)
+ */
+static inline int pgd_none(pgd_t pgd)		{ return 0; }
+static inline int pgd_bad(pgd_t pgd)		{ return 0; }
+static inline int pgd_present(pgd_t pgd)	{ return 1; }
+static inline void pgd_clear(pgd_t *pgd)	{ }
+
+#define pgd_populate(mm, pgd, pud)		do { } while (0)
+/*
+ * (puds are folded into pgds so this doesn't get actually called,
+ * but the define is needed for a generic inline function.)
+ */
+#define set_pgd(pgdptr, pgdval)				\
+do {							\
+	memcpy((pgdptr), &(pgdval), sizeof(pgd_t));	\
+	asm volatile("dcf %M0" :: "U"(*(pgdptr)));	\
+} while(0)
+
+static inline pud_t *pud_offset(pgd_t *pgd, unsigned long address)
+{
+	return (pud_t *) pgd;
+}
+
+#define pgd_page(pgd)				(pud_page((pud_t){ pgd }))
+#define pgd_page_kernel(pgd)			(pud_page_kernel((pud_t){ pgd }))
+
+/*
+ * allocating and freeing a pud is trivial: the 1-entry pud is
+ * inside the pgd, so has no extra memory associated with it.
+ */
+#define pud_alloc_one(mm, address)		NULL
+#define pud_free(x)				do { } while (0)
+#define __pud_free_tlb(tlb, x)			do { } while (0)
+
+/*
+ * The "pud_xxx()" functions here are trivial for a folded two-level
+ * setup: the pmd is never bad, and a pmd always exists (as it's folded
+ * into the pud entry)
+ */
+static inline int pud_none(pud_t pud)		{ return 0; }
+static inline int pud_bad(pud_t pud)		{ return 0; }
+static inline int pud_present(pud_t pud)	{ return 1; }
+static inline void pud_clear(pud_t *pud)	{ }
+
+#define pud_populate(mm, pmd, pte)		do { } while (0)
+
+/*
+ * (pmds are folded into puds so this doesn't get actually called,
+ * but the define is needed for a generic inline function.)
+ */
+#define set_pud(pudptr, pudval)			set_pmd((pmd_t *)(pudptr), (pmd_t) { pudval })
+
+#define pud_page(pud)				(pmd_page((pmd_t){ pud }))
+#define pud_page_kernel(pud)			(pmd_page_kernel((pmd_t){ pud }))
+
+/*
+ * (pmds are folded into pgds so this doesn't get actually called,
+ * but the define is needed for a generic inline function.)
+ */
+extern void __set_pmd(pmd_t *pmdptr, unsigned long __pmd);
+
+#define set_pmd(pmdptr, pmdval)			\
+do {						\
+	__set_pmd((pmdptr), (pmdval).ste[0]);	\
+} while(0)
+
+#define __pmd_index(address)			0
+
+static inline pmd_t *pmd_offset(pud_t *dir, unsigned long address)
+{
+	return (pmd_t *) dir + __pmd_index(address);
+}
+
+#define pte_same(a, b)		((a).pte == (b).pte)
+#define pte_page(x)		(mem_map + ((unsigned long)(((x).pte >> PAGE_SHIFT))))
+#define pte_none(x)		(!(x).pte)
+#define pte_pfn(x)		((unsigned long)(((x).pte >> PAGE_SHIFT)))
+#define pfn_pte(pfn, prot)	__pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot))
+#define pfn_pmd(pfn, prot)	__pmd(((pfn) << PAGE_SHIFT) | pgprot_val(prot))
+
+#define VMALLOC_VMADDR(x)	((unsigned long) (x))
+
+#endif /* !__ASSEMBLY__ */
+
+/*
+ * control flags in AMPR registers and TLB entries
+ */
+#define _PAGE_BIT_PRESENT	xAMPRx_V_BIT
+#define _PAGE_BIT_WP		DAMPRx_WP_BIT
+#define _PAGE_BIT_NOCACHE	xAMPRx_C_BIT
+#define _PAGE_BIT_SUPER		xAMPRx_S_BIT
+#define _PAGE_BIT_ACCESSED	xAMPRx_RESERVED8_BIT
+#define _PAGE_BIT_DIRTY		xAMPRx_M_BIT
+#define _PAGE_BIT_NOTGLOBAL	xAMPRx_NG_BIT
+
+#define _PAGE_PRESENT		xAMPRx_V
+#define _PAGE_WP		DAMPRx_WP
+#define _PAGE_NOCACHE		xAMPRx_C
+#define _PAGE_SUPER		xAMPRx_S
+#define _PAGE_ACCESSED		xAMPRx_RESERVED8	/* accessed if set */
+#define _PAGE_DIRTY		xAMPRx_M
+#define _PAGE_NOTGLOBAL		xAMPRx_NG
+
+#define _PAGE_RESERVED_MASK	(xAMPRx_RESERVED8 | xAMPRx_RESERVED13)
+
+#define _PAGE_FILE		0x002	/* set:pagecache unset:swap */
+#define _PAGE_PROTNONE		0x000	/* If not present */
+
+#define _PAGE_CHG_MASK		(PTE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY)
+
+#define __PGPROT_BASE \
+	(_PAGE_PRESENT | xAMPRx_SS_16Kb | xAMPRx_D | _PAGE_NOTGLOBAL | _PAGE_ACCESSED)
+
+#define PAGE_NONE	__pgprot(_PAGE_PROTNONE | _PAGE_ACCESSED)
+#define PAGE_SHARED	__pgprot(__PGPROT_BASE)
+#define PAGE_COPY	__pgprot(__PGPROT_BASE | _PAGE_WP)
+#define PAGE_READONLY	__pgprot(__PGPROT_BASE | _PAGE_WP)
+
+#define __PAGE_KERNEL		(__PGPROT_BASE | _PAGE_SUPER | _PAGE_DIRTY)
+#define __PAGE_KERNEL_NOCACHE	(__PGPROT_BASE | _PAGE_SUPER | _PAGE_DIRTY | _PAGE_NOCACHE)
+#define __PAGE_KERNEL_RO	(__PGPROT_BASE | _PAGE_SUPER | _PAGE_DIRTY | _PAGE_WP)
+
+#define MAKE_GLOBAL(x) __pgprot((x) & ~_PAGE_NOTGLOBAL)
+
+#define PAGE_KERNEL		MAKE_GLOBAL(__PAGE_KERNEL)
+#define PAGE_KERNEL_RO		MAKE_GLOBAL(__PAGE_KERNEL_RO)
+#define PAGE_KERNEL_NOCACHE	MAKE_GLOBAL(__PAGE_KERNEL_NOCACHE)
+
+#define _PAGE_TABLE		(_PAGE_PRESENT | xAMPRx_SS_16Kb)
+
+#ifndef __ASSEMBLY__
+
+/*
+ * The FR451 can do execute protection by virtue of having separate TLB miss handlers for
+ * instruction access and for data access. However, we don't have enough reserved bits to say
+ * "execute only", so we don't bother. If you can read it, you can execute it and vice versa.
+ */
+#define __P000	PAGE_NONE
+#define __P001	PAGE_READONLY
+#define __P010	PAGE_COPY
+#define __P011	PAGE_COPY
+#define __P100	PAGE_READONLY
+#define __P101	PAGE_READONLY
+#define __P110	PAGE_COPY
+#define __P111	PAGE_COPY
+
+#define __S000	PAGE_NONE
+#define __S001	PAGE_READONLY
+#define __S010	PAGE_SHARED
+#define __S011	PAGE_SHARED
+#define __S100	PAGE_READONLY
+#define __S101	PAGE_READONLY
+#define __S110	PAGE_SHARED
+#define __S111	PAGE_SHARED
+
+/*
+ * Define this to warn about kernel memory accesses that are
+ * done without a 'verify_area(VERIFY_WRITE,..)'
+ */
+#undef TEST_VERIFY_AREA
+
+#define pte_present(x)	(pte_val(x) & _PAGE_PRESENT)
+#define pte_clear(xp)	do { set_pte(xp, __pte(0)); } while (0)
+
+#define pmd_none(x)	(!pmd_val(x))
+#define pmd_present(x)	(pmd_val(x) & _PAGE_PRESENT)
+#define	pmd_bad(x)	(pmd_val(x) & xAMPRx_SS)
+#define pmd_clear(xp)	do { __set_pmd(xp, 0); } while(0)
+
+#define pmd_page_kernel(pmd) \
+	((unsigned long) __va(pmd_val(pmd) & PAGE_MASK))
+
+#ifndef CONFIG_DISCONTIGMEM
+#define pmd_page(pmd)	(pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT))
+#endif
+
+#define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT))
+
+/*
+ * The following only work if pte_present() is true.
+ * Undefined behaviour if not..
+ */
+static inline int pte_read(pte_t pte)		{ return !((pte).pte & _PAGE_SUPER); }
+static inline int pte_exec(pte_t pte)		{ return !((pte).pte & _PAGE_SUPER); }
+static inline int pte_dirty(pte_t pte)		{ return (pte).pte & _PAGE_DIRTY; }
+static inline int pte_young(pte_t pte)		{ return (pte).pte & _PAGE_ACCESSED; }
+static inline int pte_write(pte_t pte)		{ return !((pte).pte & _PAGE_WP); }
+
+static inline pte_t pte_rdprotect(pte_t pte)	{ (pte).pte |= _PAGE_SUPER; return pte; }
+static inline pte_t pte_exprotect(pte_t pte)	{ (pte).pte |= _PAGE_SUPER; return pte; }
+static inline pte_t pte_mkclean(pte_t pte)	{ (pte).pte &= ~_PAGE_DIRTY; return pte; }
+static inline pte_t pte_mkold(pte_t pte)	{ (pte).pte &= ~_PAGE_ACCESSED; return pte; }
+static inline pte_t pte_wrprotect(pte_t pte)	{ (pte).pte |= _PAGE_WP; return pte; }
+static inline pte_t pte_mkread(pte_t pte)	{ (pte).pte &= ~_PAGE_SUPER; return pte; }
+static inline pte_t pte_mkexec(pte_t pte)	{ (pte).pte &= ~_PAGE_SUPER; return pte; }
+static inline pte_t pte_mkdirty(pte_t pte)	{ (pte).pte |= _PAGE_DIRTY; return pte; }
+static inline pte_t pte_mkyoung(pte_t pte)	{ (pte).pte |= _PAGE_ACCESSED; return pte; }
+static inline pte_t pte_mkwrite(pte_t pte)	{ (pte).pte &= ~_PAGE_WP; return pte; }
+
+static inline int ptep_test_and_clear_dirty(pte_t *ptep)
+{
+	int i = test_and_clear_bit(_PAGE_BIT_DIRTY, ptep);
+	asm volatile("dcf %M0" :: "U"(*ptep));
+	return i;
+}
+
+static inline int ptep_test_and_clear_young(pte_t *ptep)
+{
+	int i = test_and_clear_bit(_PAGE_BIT_ACCESSED, ptep);
+	asm volatile("dcf %M0" :: "U"(*ptep));
+	return i;
+}
+
+static inline pte_t ptep_get_and_clear(pte_t *ptep)
+{
+	unsigned long x = xchg(&ptep->pte, 0);
+	asm volatile("dcf %M0" :: "U"(*ptep));
+	return __pte(x);
+}
+
+static inline void ptep_set_wrprotect(pte_t *ptep)
+{
+	set_bit(_PAGE_BIT_WP, ptep);
+	asm volatile("dcf %M0" :: "U"(*ptep));
+}
+
+static inline void ptep_mkdirty(pte_t *ptep)
+{
+	set_bit(_PAGE_BIT_DIRTY, ptep);
+	asm volatile("dcf %M0" :: "U"(*ptep));
+}
+
+/*
+ * Conversion functions: convert a page and protection to a page entry,
+ * and a page entry and page directory to the page they refer to.
+ */
+
+#define mk_pte(page, pgprot)	pfn_pte(page_to_pfn(page), (pgprot))
+#define mk_pte_huge(entry)	((entry).pte_low |= _PAGE_PRESENT | _PAGE_PSE)
+
+/* This takes a physical page address that is used by the remapping functions */
+#define mk_pte_phys(physpage, pgprot)	pfn_pte((physpage) >> PAGE_SHIFT, pgprot)
+
+static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
+{
+	pte.pte &= _PAGE_CHG_MASK;
+	pte.pte |= pgprot_val(newprot);
+	return pte;
+}
+
+#define page_pte(page)	page_pte_prot((page), __pgprot(0))
+
+/* to find an entry in a page-table-directory. */
+#define pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD - 1))
+#define pgd_index_k(addr) pgd_index(addr)
+
+/* Find an entry in the bottom-level page table.. */
+#define __pte_index(address) (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
+
+/*
+ * the pte page can be thought of an array like this: pte_t[PTRS_PER_PTE]
+ *
+ * this macro returns the index of the entry in the pte page which would
+ * control the given virtual address
+ */
+#define pte_index(address) \
+		(((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
+#define pte_offset_kernel(dir, address) \
+	((pte_t *) pmd_page_kernel(*(dir)) +  pte_index(address))
+
+#if defined(CONFIG_HIGHPTE)
+#define pte_offset_map(dir, address) \
+	((pte_t *)kmap_atomic(pmd_page(*(dir)),KM_PTE0) + pte_index(address))
+#define pte_offset_map_nested(dir, address) \
+	((pte_t *)kmap_atomic(pmd_page(*(dir)),KM_PTE1) + pte_index(address))
+#define pte_unmap(pte) kunmap_atomic(pte, KM_PTE0)
+#define pte_unmap_nested(pte) kunmap_atomic((pte), KM_PTE1)
+#else
+#define pte_offset_map(dir, address) \
+	((pte_t *)page_address(pmd_page(*(dir))) + pte_index(address))
+#define pte_offset_map_nested(dir, address) pte_offset_map((dir), (address))
+#define pte_unmap(pte) do { } while (0)
+#define pte_unmap_nested(pte) do { } while (0)
+#endif
+
+/*
+ * Handle swap and file entries
+ * - the PTE is encoded in the following format:
+ *	bit 0:		Must be 0 (!_PAGE_PRESENT)
+ *	bit 1:		Type: 0 for swap, 1 for file (_PAGE_FILE)
+ *	bits 2-7:	Swap type
+ *	bits 8-31:	Swap offset
+ *	bits 2-31:	File pgoff
+ */
+#define __swp_type(x)			(((x).val >> 2) & 0x1f)
+#define __swp_offset(x)			((x).val >> 8)
+#define __swp_entry(type, offset)	((swp_entry_t) { ((type) << 2) | ((offset) << 8) })
+#define __pte_to_swp_entry(pte)		((swp_entry_t) { (pte).pte })
+#define __swp_entry_to_pte(x)		((pte_t) { (x).val })
+
+static inline int pte_file(pte_t pte)
+{
+	return pte.pte & _PAGE_FILE;
+}
+
+#define PTE_FILE_MAX_BITS	29
+
+#define pte_to_pgoff(PTE)	((PTE).pte >> 2)
+#define pgoff_to_pte(off)	__pte((off) << 2 | _PAGE_FILE)
+
+/* Needs to be defined here and not in linux/mm.h, as it is arch dependent */
+#define PageSkip(page)		(0)
+#define kern_addr_valid(addr)	(1)
+
+#define io_remap_page_range(vma, vaddr, paddr, size, prot)		\
+		remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot)
+
+#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG
+#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY
+#define __HAVE_ARCH_PTEP_GET_AND_CLEAR
+#define __HAVE_ARCH_PTEP_SET_WRPROTECT
+#define __HAVE_ARCH_PTEP_MKDIRTY
+#define __HAVE_ARCH_PTE_SAME
+#include <asm-generic/pgtable.h>
+
+/*
+ * preload information about a newly instantiated PTE into the SCR0/SCR1 PGE cache
+ */
+static inline void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t pte)
+{
+	unsigned long ampr;
+	pgd_t *pge = pgd_offset(current->mm, address);
+	pud_t *pue = pud_offset(pge, address);
+	pmd_t *pme = pmd_offset(pue, address);
+
+	ampr = pme->ste[0] & 0xffffff00;
+	ampr |= xAMPRx_L | xAMPRx_SS_16Kb | xAMPRx_S | xAMPRx_C | xAMPRx_V;
+
+	asm volatile("movgs %0,scr0\n"
+		     "movgs %0,scr1\n"
+		     "movgs %1,dampr4\n"
+		     "movgs %1,dampr5\n"
+		     :
+		     : "r"(address), "r"(ampr)
+		     );
+}
+
+#ifdef CONFIG_PROC_FS
+extern char *proc_pid_status_frv_cxnr(struct mm_struct *mm, char *buffer);
+#endif
+
+extern void __init pgtable_cache_init(void);
+
+#endif /* !__ASSEMBLY__ */
+#endif /* !CONFIG_MMU */
+
+#ifndef __ASSEMBLY__
+extern void __init paging_init(void);
+#endif /* !__ASSEMBLY__ */
+
+#endif /* _ASM_PGTABLE_H */
diff -Nru a/include/asm-frv/poll.h b/include/asm-frv/poll.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/poll.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,23 @@
+#ifndef _ASM_POLL_H
+#define _ASM_POLL_H
+
+#define POLLIN		  1
+#define POLLPRI		  2
+#define POLLOUT		  4
+#define POLLERR		  8
+#define POLLHUP		 16
+#define POLLNVAL	 32
+#define POLLRDNORM	 64
+#define POLLWRNORM	POLLOUT
+#define POLLRDBAND	128
+#define POLLWRBAND	256
+#define POLLMSG		0x0400
+
+struct pollfd {
+	int fd;
+	short events;
+	short revents;
+};
+
+#endif
+
diff -Nru a/include/asm-frv/posix_types.h b/include/asm-frv/posix_types.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/posix_types.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,66 @@
+#ifndef _ASM_POSIX_TYPES_H
+#define _ASM_POSIX_TYPES_H
+
+/*
+ * This file is generally used by user-level software, so you need to
+ * be a little careful about namespace pollution etc.  Also, we cannot
+ * assume GCC is being used.
+ */
+
+typedef unsigned long	__kernel_ino_t;
+typedef unsigned short	__kernel_mode_t;
+typedef unsigned short	__kernel_nlink_t;
+typedef long		__kernel_off_t;
+typedef int		__kernel_pid_t;
+typedef unsigned short	__kernel_ipc_pid_t;
+typedef unsigned short	__kernel_uid_t;
+typedef unsigned short	__kernel_gid_t;
+typedef unsigned int	__kernel_size_t;
+typedef int		__kernel_ssize_t;
+typedef int		__kernel_ptrdiff_t;
+typedef long		__kernel_time_t;
+typedef long		__kernel_suseconds_t;
+typedef long		__kernel_clock_t;
+typedef int		__kernel_timer_t;
+typedef int		__kernel_clockid_t;
+typedef int		__kernel_daddr_t;
+typedef char *		__kernel_caddr_t;
+typedef unsigned short	__kernel_uid16_t;
+typedef unsigned short	__kernel_gid16_t;
+typedef unsigned int	__kernel_uid32_t;
+typedef unsigned int	__kernel_gid32_t;
+
+typedef unsigned short	__kernel_old_uid_t;
+typedef unsigned short	__kernel_old_gid_t;
+typedef unsigned short	__kernel_old_dev_t;
+
+#ifdef __GNUC__
+typedef long long	__kernel_loff_t;
+#endif
+
+typedef struct {
+#if defined(__KERNEL__) || defined(__USE_ALL)
+	int	val[2];
+#else /* !defined(__KERNEL__) && !defined(__USE_ALL) */
+	int	__val[2];
+#endif /* !defined(__KERNEL__) && !defined(__USE_ALL) */
+} __kernel_fsid_t;
+
+#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
+
+#undef	__FD_SET
+#define	__FD_SET(d, set)	((set)->fds_bits[__FDELT(d)] |= __FDMASK(d))
+
+#undef	__FD_CLR
+#define	__FD_CLR(d, set)	((set)->fds_bits[__FDELT(d)] &= ~__FDMASK(d))
+
+#undef	__FD_ISSET
+#define	__FD_ISSET(d, set)	(!!((set)->fds_bits[__FDELT(d)] & __FDMASK(d)))
+
+#undef	__FD_ZERO
+#define __FD_ZERO(fdsetp) (memset (fdsetp, 0, sizeof(*(fd_set *)fdsetp)))
+
+#endif /* defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) */
+
+#endif
+
diff -Nru a/include/asm-frv/processor.h b/include/asm-frv/processor.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/processor.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,153 @@
+/* processor.h: FRV processor definitions
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+#ifndef _ASM_PROCESSOR_H
+#define _ASM_PROCESSOR_H
+
+#include <linux/config.h>
+#include <asm/mem-layout.h>
+
+#ifndef __ASSEMBLY__
+/*
+ * Default implementation of macro that returns current
+ * instruction pointer ("program counter").
+ */
+#define current_text_addr() ({ __label__ _l; _l: &&_l;})
+
+#include <linux/linkage.h>
+#include <asm/sections.h>
+#include <asm/segment.h>
+#include <asm/fpu.h>
+#include <asm/registers.h>
+#include <asm/ptrace.h>
+#include <asm/current.h>
+#include <asm/cache.h>
+
+/* Forward declaration, a strange C thing */
+struct task_struct;
+
+/*
+ *  CPU type and hardware bug flags. Kept separately for each CPU.
+ */
+struct cpuinfo_frv {
+#ifdef CONFIG_MMU
+	unsigned long	*pgd_quick;
+	unsigned long	*pte_quick;
+	unsigned long	pgtable_cache_sz;
+#endif
+} __cacheline_aligned;
+
+extern struct cpuinfo_frv __nongprelbss boot_cpu_data;
+
+#define cpu_data		(&boot_cpu_data)
+#define current_cpu_data	boot_cpu_data
+
+/*
+ * Bus types
+ */
+#define EISA_bus 0
+#define MCA_bus 0
+
+struct thread_struct {
+	struct pt_regs		*frame;		/* [GR28] exception frame ptr for this thread */
+	struct task_struct	*curr;		/* [GR29] current pointer for this thread */
+	unsigned long		sp;		/* [GR1 ] kernel stack pointer */
+	unsigned long		fp;		/* [GR2 ] kernel frame pointer */
+	unsigned long		lr;		/* link register */
+	unsigned long		pc;		/* program counter */
+	unsigned long		gr[12];		/* [GR16-GR27] */
+	unsigned long		sched_lr;	/* LR from schedule() */
+
+	union {
+		struct pt_regs		*frame0;	/* top (user) stack frame */
+		struct user_context	*user;		/* userspace context */
+	};
+} __attribute__((aligned(8)));
+
+extern struct pt_regs *__kernel_frame0_ptr;
+extern struct task_struct *__kernel_current_task;
+
+#endif
+
+#ifndef __ASSEMBLY__
+#define INIT_THREAD_FRAME0 \
+	((struct pt_regs *) \
+	(sizeof(init_stack) + (unsigned long) init_stack - sizeof(struct user_context)))
+
+#define INIT_THREAD {				\
+	NULL,					\
+	(struct task_struct *) init_stack,	\
+	0, 0, 0, 0,				\
+	{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },	\
+	0,					\
+	{ INIT_THREAD_FRAME0 },			\
+}
+
+/*
+ * do necessary setup to start up a newly executed thread.
+ * - need to discard the frame stacked by init() invoking the execve syscall
+ */
+#define start_thread(_regs, _pc, _usp)			\
+do {							\
+	set_fs(USER_DS); /* reads from user space */	\
+	__frame = __kernel_frame0_ptr;			\
+	__frame->pc	= (_pc);			\
+	__frame->psr	&= ~PSR_S;			\
+	__frame->sp	= (_usp);			\
+} while(0)
+
+extern void prepare_to_copy(struct task_struct *tsk);
+
+/* Free all resources held by a thread. */
+static inline void release_thread(struct task_struct *dead_task)
+{
+}
+
+extern asmlinkage int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
+extern asmlinkage void save_user_regs(struct user_context *target);
+extern asmlinkage void restore_user_regs(const struct user_context *target);
+
+#define copy_segments(tsk, mm)		do { } while (0)
+#define release_segments(mm)		do { } while (0)
+#define forget_segments()		do { } while (0)
+
+/*
+ * Free current thread data structures etc..
+ */
+static inline void exit_thread(void)
+{
+}
+
+/*
+ * Return saved PC of a blocked thread.
+ */
+extern unsigned long thread_saved_pc(struct task_struct *tsk);
+
+unsigned long get_wchan(struct task_struct *p);
+
+#define	KSTK_EIP(tsk)	((tsk)->thread.frame0->pc)
+#define	KSTK_ESP(tsk)	((tsk)->thread.frame0->sp)
+
+/* Allocation and freeing of basic task resources. */
+extern struct task_struct *alloc_task_struct(void);
+extern void free_task_struct(struct task_struct *p);
+
+#define cpu_relax()    do { } while (0)
+
+/* data cache prefetch */
+#define ARCH_HAS_PREFETCH
+static inline void prefetch(const void *x)
+{
+	asm volatile("dcpl %0,gr0,#0" : : "r"(x));
+}
+
+#endif /* __ASSEMBLY__ */
+#endif /* _ASM_PROCESSOR_H */
diff -Nru a/include/asm-frv/ptrace.h b/include/asm-frv/ptrace.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/ptrace.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,86 @@
+/* ptrace.h: ptrace() relevant definitions
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+#ifndef _ASM_PTRACE_H
+#define _ASM_PTRACE_H
+
+#include <asm/registers.h>
+
+#define in_syscall(regs) (((regs)->tbr & TBR_TT) == TBR_TT_TRAP0)
+
+
+#define PT_PSR		0
+#define	PT_ISR		1
+#define PT_CCR		2
+#define PT_CCCR		3
+#define PT_LR		4
+#define PT_LCR		5
+#define PT_PC		6
+
+#define PT__STATUS	7	/* exception status */
+#define PT_SYSCALLNO	8	/* syscall number or -1 */
+#define PT_ORIG_GR8	9	/* saved GR8 for signal handling */
+#define PT_GNER0	10
+#define PT_GNER1	11
+#define PT_IACC0H	12
+#define PT_IACC0L	13
+
+#define PT_GR(j)	( 14 + (j))	/* GRj for 0<=j<=63 */
+#define PT_FR(j)	( 78 + (j))	/* FRj for 0<=j<=63 */
+#define PT_FNER(j)	(142 + (j))	/* FNERj for 0<=j<=1 */
+#define PT_MSR(j)	(144 + (j))	/* MSRj for 0<=j<=2 */
+#define PT_ACC(j)	(146 + (j))	/* ACCj for 0<=j<=7 */
+#define PT_ACCG(jklm)	(154 + (jklm))	/* ACCGjklm for 0<=jklm<=1 (reads four regs per slot) */
+#define PT_FSR(j)	(156 + (j))	/* FSRj for 0<=j<=0 */
+#define PT__GPEND	78
+#define PT__END		157
+
+#define PT_TBR		PT_GR(0)
+#define PT_SP		PT_GR(1)
+#define PT_FP		PT_GR(2)
+#define PT_PREV_FRAME	PT_GR(28)	/* previous exception frame pointer (old gr28 value) */
+#define PT_CURR_TASK	PT_GR(29)	/* current task */
+
+
+/* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
+#define PTRACE_GETREGS		12
+#define PTRACE_SETREGS		13
+#define PTRACE_GETFPREGS	14
+#define PTRACE_SETFPREGS	15
+#define PTRACE_GETFDPIC		31	/* get the ELF fdpic loadmap address */
+
+#define PTRACE_GETFDPIC_EXEC	0	/* [addr] request the executable loadmap */
+#define PTRACE_GETFDPIC_INTERP	1	/* [addr] request the interpreter loadmap */
+
+#ifndef __ASSEMBLY__
+
+/*
+ * dedicate GR28; to keeping the a pointer to the current exception frame
+ */
+register struct pt_regs *__frame asm("gr28");
+register struct pt_regs *__debug_frame asm("gr31");
+
+#ifndef container_of
+#define container_of(ptr, type, member) ({			\
+        const typeof( ((type *)0)->member ) *__mptr = (ptr);	\
+        (type *)( (char *)__mptr - offsetof(type,member) );})
+#endif
+
+#define __debug_regs container_of(__debug_frame, struct pt_debug_regs, normal_regs)
+
+#define user_mode(regs)			(!((regs)->psr & PSR_S))
+#define instruction_pointer(regs)	((regs)->pc)
+
+extern unsigned long user_stack(const struct pt_regs *);
+extern void show_regs(struct pt_regs *);
+#define profile_pc(regs) ((regs)->pc)
+
+#endif /* !__ASSEMBLY__ */
+#endif /* _ASM_PTRACE_H */
diff -Nru a/include/asm-frv/registers.h b/include/asm-frv/registers.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/registers.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,255 @@
+/* registers.h: register frame declarations
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+/*
+ * notes:
+ *
+ * (1) that the members of all these structures are carefully aligned to permit
+ *     usage of STD/STDF instructions
+ *
+ * (2) if you change these structures, you must change the code in
+ *     arch/frvnommu/kernel/{break.S,entry.S,switch_to.S,gdb-stub.c}
+ *
+ *
+ * the kernel stack space block looks like this:
+ *
+ *	+0x2000	+----------------------
+ *		| union {
+ *		|	struct user_context
+ *		|	struct pt_regs [user exception]
+ *		| }
+ *		+---------------------- <-- __kernel_frame0_ptr (maybe GR28)
+ *		|
+ *		| kernel stack
+ *		|
+ *		|......................
+ *		| struct pt_regs [kernel exception]
+ *		|...................... <-- __kernel_frame0_ptr (maybe GR28)
+ *		|
+ *		| kernel stack
+ *		|
+ *		|...................... <-- stack pointer (GR1)
+ *		|
+ *		| unused stack space
+ *		|
+ *		+----------------------
+ *		| struct thread_info
+ *	+0x0000	+---------------------- <-- __current_thread_info (GR15);
+ *
+ * note that GR28 points to the current exception frame
+ */
+
+#ifndef _ASM_REGISTERS_H
+#define _ASM_REGISTERS_H
+
+#ifndef __ASSEMBLY__
+#define __OFFSET(X)	(X)
+#define __OFFSETC(X,N)	xxxxxxxxxxxxxxxxxxxxxxxx
+#else
+#define __OFFSET(X)	((X)*4)
+#define __OFFSETC(X,N)	((X)*4+(N))
+#endif
+
+/*****************************************************************************/
+/*
+ * Exception/Interrupt frame
+ * - held on kernel stack
+ * - 8-byte aligned on stack (old SP is saved in frame)
+ * - GR0 is fixed 0, so we don't save it
+ */
+#ifndef __ASSEMBLY__
+
+struct pt_regs {
+	unsigned long		psr;		/* Processor Status Register */
+	unsigned long		isr;		/* Integer Status Register */
+	unsigned long		ccr;		/* Condition Code Register */
+	unsigned long		cccr;		/* Condition Code for Conditional Insns Register */
+	unsigned long		lr;		/* Link Register */
+	unsigned long		lcr;		/* Loop Count Register */
+	unsigned long		pc;		/* Program Counter Register */
+	unsigned long		__status;	/* exception status */
+	unsigned long		syscallno;	/* syscall number or -1 */
+	unsigned long		orig_gr8;	/* original syscall arg #1 */
+	unsigned long		gner0;
+	unsigned long		gner1;
+	unsigned long long	iacc0;
+	unsigned long		tbr;		/* GR0 is fixed zero, so we use this for TBR */
+	unsigned long		sp;		/* GR1: USP/KSP */
+	unsigned long		fp;		/* GR2: FP */
+	unsigned long		gr3;
+	unsigned long		gr4;
+	unsigned long		gr5;
+	unsigned long		gr6;
+	unsigned long		gr7;		/* syscall number */
+	unsigned long		gr8;		/* 1st syscall param; syscall return */
+	unsigned long		gr9;		/* 2nd syscall param */
+	unsigned long		gr10;		/* 3rd syscall param */
+	unsigned long		gr11;		/* 4th syscall param */
+	unsigned long		gr12;		/* 5th syscall param */
+	unsigned long		gr13;		/* 6th syscall param */
+	unsigned long		gr14;
+	unsigned long		gr15;
+	unsigned long		gr16;		/* GP pointer */
+	unsigned long		gr17;		/* small data */
+	unsigned long		gr18;		/* PIC/PID */
+	unsigned long		gr19;
+	unsigned long		gr20;
+	unsigned long		gr21;
+	unsigned long		gr22;
+	unsigned long		gr23;
+	unsigned long		gr24;
+	unsigned long		gr25;
+	unsigned long		gr26;
+	unsigned long		gr27;
+	struct pt_regs		*next_frame;	/* GR28 - next exception frame */
+	unsigned long		gr29;		/* GR29 - OS reserved */
+	unsigned long		gr30;		/* GR30 - OS reserved */
+	unsigned long		gr31;		/* GR31 - OS reserved */
+} __attribute__((aligned(8)));
+
+#endif
+
+#define REG_PSR		__OFFSET( 0)	/* Processor Status Register */
+#define REG_ISR		__OFFSET( 1)	/* Integer Status Register */
+#define REG_CCR		__OFFSET( 2)	/* Condition Code Register */
+#define REG_CCCR	__OFFSET( 3)	/* Condition Code for Conditional Insns Register */
+#define REG_LR		__OFFSET( 4)	/* Link Register */
+#define REG_LCR		__OFFSET( 5)	/* Loop Count Register */
+#define REG_PC		__OFFSET( 6)	/* Program Counter */
+
+#define REG__STATUS	__OFFSET( 7)	/* exception status */
+#define REG__STATUS_STEP	0x00000001	/* - reenable single stepping on return */
+#define REG__STATUS_STEPPED	0x00000002	/* - single step caused exception */
+#define REG__STATUS_BROKE	0x00000004	/* - BREAK insn caused exception */
+#define REG__STATUS_SYSC_ENTRY	0x40000000	/* - T on syscall entry (ptrace.c only) */
+#define REG__STATUS_SYSC_EXIT	0x80000000	/* - T on syscall exit (ptrace.c only) */
+
+#define REG_SYSCALLNO	__OFFSET( 8)	/* syscall number or -1 */
+#define REG_ORIG_GR8	__OFFSET( 9)	/* saved GR8 for signal handling */
+#define REG_GNER0	__OFFSET(10)
+#define REG_GNER1	__OFFSET(11)
+#define REG_IACC0	__OFFSET(12)
+
+#define REG_TBR		__OFFSET(14)	/* Trap Vector Register */
+#define REG_GR(R)	__OFFSET((14+(R)))
+#define REG__END	REG_GR(32)
+
+#define REG_SP		REG_GR(1)
+#define REG_FP		REG_GR(2)
+#define REG_PREV_FRAME	REG_GR(28)	/* previous exception frame pointer (old gr28 value) */
+#define REG_CURR_TASK	REG_GR(29)	/* current task */
+
+/*****************************************************************************/
+/*
+ * extension tacked in front of the exception frame in debug mode
+ */
+#ifndef __ASSEMBLY__
+
+struct pt_debug_regs
+{
+	unsigned long		bpsr;
+	unsigned long		dcr;
+	unsigned long		brr;
+	unsigned long		nmar;
+	struct pt_regs		normal_regs;
+} __attribute__((aligned(8)));
+
+#endif
+
+#define REG_NMAR		__OFFSET(-1)
+#define REG_BRR			__OFFSET(-2)
+#define REG_DCR			__OFFSET(-3)
+#define REG_BPSR		__OFFSET(-4)
+#define REG__DEBUG_XTRA		__OFFSET(4)
+
+/*****************************************************************************/
+/*
+ * userspace registers
+ */
+#ifndef __ASSEMBLY__
+
+struct user_int_regs
+{
+	/* integer registers
+	 * - up to gr[31] mirror pt_regs
+	 * - total size must be multiple of 8 bytes
+	 */
+	unsigned long		psr;		/* Processor Status Register */
+	unsigned long		isr;		/* Integer Status Register */
+	unsigned long		ccr;		/* Condition Code Register */
+	unsigned long		cccr;		/* Condition Code for Conditional Insns Register */
+	unsigned long		lr;		/* Link Register */
+	unsigned long		lcr;		/* Loop Count Register */
+	unsigned long		pc;		/* Program Counter Register */
+	unsigned long		__status;	/* exception status */
+	unsigned long		syscallno;	/* syscall number or -1 */
+	unsigned long		orig_gr8;	/* original syscall arg #1 */
+	unsigned long		gner[2];
+	unsigned long long	iacc[1];
+
+	union {
+		unsigned long	tbr;
+		unsigned long	gr[64];
+	};
+};
+
+struct user_fpmedia_regs
+{
+	/* FP/Media registers */
+	unsigned long	fr[64];
+	unsigned long	fner[2];
+	unsigned long	msr[2];
+	unsigned long	acc[8];
+	unsigned char	accg[8];
+	unsigned long	fsr[1];
+};
+
+struct user_context
+{
+	struct user_int_regs		i;
+	struct user_fpmedia_regs	f;
+
+	/* we provide a context extension so that we can save the regs for CPUs that
+	 * implement many more of Fujitsu's lavish register spec
+	 */
+	void *extension;
+} __attribute__((aligned(8)));
+
+#endif
+
+#define NR_USER_INT_REGS	(14 + 64)
+#define NR_USER_FPMEDIA_REGS	(64 + 2 + 2 + 8 + 8/4 + 1)
+#define NR_USER_CONTEXT		(NR_USER_INT_REGS + NR_USER_FPMEDIA_REGS + 1)
+
+#define USER_CONTEXT_SIZE	(((NR_USER_CONTEXT + 1) & ~1) * 4)
+
+#define __THREAD_FRAME		__OFFSET(0)
+#define __THREAD_CURR		__OFFSET(1)
+#define __THREAD_SP		__OFFSET(2)
+#define __THREAD_FP		__OFFSET(3)
+#define __THREAD_LR		__OFFSET(4)
+#define __THREAD_PC		__OFFSET(5)
+#define __THREAD_GR(R)		__OFFSET(6 + (R) - 16)
+#define __THREAD_FRAME0		__OFFSET(19)
+#define __THREAD_USER		__OFFSET(19)
+
+#define __USER_INT		__OFFSET(0)
+#define __INT_GR(R)		__OFFSET(14 + (R))
+
+#define __USER_FPMEDIA		__OFFSET(NR_USER_INT_REGS)
+#define __FPMEDIA_FR(R)		__OFFSET(NR_USER_INT_REGS + (R))
+#define __FPMEDIA_FNER(R)	__OFFSET(NR_USER_INT_REGS + 64 + (R))
+#define __FPMEDIA_MSR(R)	__OFFSET(NR_USER_INT_REGS + 66 + (R))
+#define __FPMEDIA_ACC(R)	__OFFSET(NR_USER_INT_REGS + 68 + (R))
+#define __FPMEDIA_ACCG(R)	__OFFSETC(NR_USER_INT_REGS + 76, (R))
+#define __FPMEDIA_FSR(R)	__OFFSET(NR_USER_INT_REGS + 78 + (R))
+
+#endif /* _ASM_REGISTERS_H */
diff -Nru a/include/asm-frv/resource.h b/include/asm-frv/resource.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/resource.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,53 @@
+#ifndef _ASM_RESOURCE_H
+#define _ASM_RESOURCE_H
+
+/*
+ * Resource limits
+ */
+
+#define RLIMIT_CPU	0		/* CPU time in ms */
+#define RLIMIT_FSIZE	1		/* Maximum filesize */
+#define RLIMIT_DATA	2		/* max data size */
+#define RLIMIT_STACK	3		/* max stack size */
+#define RLIMIT_CORE	4		/* max core file size */
+#define RLIMIT_RSS	5		/* max resident set size */
+#define RLIMIT_NPROC	6		/* max number of processes */
+#define RLIMIT_NOFILE	7		/* max number of open files */
+#define RLIMIT_MEMLOCK	8		/* max locked-in-memory address space */
+#define RLIMIT_AS	9		/* address space limit */
+#define RLIMIT_LOCKS	10		/* maximum file locks held */
+#define RLIMIT_SIGPENDING 11		/* max number of pending signals */
+#define RLIMIT_MSGQUEUE 12		/* maximum bytes in POSIX mqueues */
+
+#define RLIM_NLIMITS	13
+
+
+/*
+ * SuS says limits have to be unsigned.
+ * Which makes a ton more sense anyway.
+ */
+#define RLIM_INFINITY	(~0UL)
+
+#ifdef __KERNEL__
+
+#define INIT_RLIMITS					\
+{							\
+	{ RLIM_INFINITY, RLIM_INFINITY },		\
+	{ RLIM_INFINITY, RLIM_INFINITY },		\
+	{ RLIM_INFINITY, RLIM_INFINITY },		\
+	{      _STK_LIM, RLIM_INFINITY },		\
+	{             0, RLIM_INFINITY },		\
+	{ RLIM_INFINITY, RLIM_INFINITY },		\
+	{             0,             0 },		\
+	{      INR_OPEN,     INR_OPEN  },		\
+	{   MLOCK_LIMIT,   MLOCK_LIMIT },		\
+	{ RLIM_INFINITY, RLIM_INFINITY },		\
+        { RLIM_INFINITY, RLIM_INFINITY },		\
+	{ MAX_SIGPENDING, MAX_SIGPENDING },		\
+	{ MQ_BYTES_MAX, MQ_BYTES_MAX },			\
+}
+
+#endif /* __KERNEL__ */
+
+#endif /* _ASM_RESOURCE_H */
+
diff -Nru a/include/asm-frv/scatterlist.h b/include/asm-frv/scatterlist.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/scatterlist.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,32 @@
+#ifndef _ASM_SCATTERLIST_H
+#define _ASM_SCATTERLIST_H
+
+/*
+ * Drivers must set either ->address or (preferred) ->page and ->offset
+ * to indicate where data must be transferred to/from.
+ *
+ * Using ->page is recommended since it handles highmem data as well as
+ * low mem. ->address is restricted to data which has a virtual mapping, and
+ * it will go away in the future. Updating to ->page can be automated very
+ * easily -- something like
+ *
+ * sg->address = some_ptr;
+ *
+ * can be rewritten as
+ *
+ * sg->page = virt_to_page(some_ptr);
+ * sg->offset = (unsigned long) some_ptr & ~PAGE_MASK;
+ *
+ * and that's it. There's no excuse for not highmem enabling YOUR driver. /jens
+ */
+struct scatterlist {
+	struct page	*page;		/* Location for highmem page, if any */
+	unsigned int	offset;		/* for highmem, page offset */
+
+	dma_addr_t	dma_address;
+	unsigned int	length;
+};
+
+#define ISA_DMA_THRESHOLD (0xffffffffUL)
+
+#endif /* !_ASM_SCATTERLIST_H */
diff -Nru a/include/asm-frv/sections.h b/include/asm-frv/sections.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/sections.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,46 @@
+/* sections.h: linkage layout variables
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+#ifndef _ASM_SECTIONS_H
+#define _ASM_SECTIONS_H
+
+#ifndef __ASSEMBLY__
+
+#include <linux/types.h>
+#include <asm-generic/sections.h>
+
+#ifdef __KERNEL__
+
+/*
+ * we don't want to put variables in the GP-REL section if they're not used very much - that would
+ * be waste since GP-REL addressing is limited to GP16+/-2048
+ */
+#define __nongpreldata	__attribute__((section(".data")))
+#define __nongprelbss	__attribute__((section(".bss")))
+
+/*
+ * linker symbols
+ */
+extern const void __kernel_image_start, __kernel_image_end, __page_offset;
+
+extern unsigned long __nongprelbss memory_start;
+extern unsigned long __nongprelbss memory_end;
+extern unsigned long __nongprelbss rom_length;
+
+/* determine if we're running from ROM */
+static inline int is_in_rom(unsigned long addr)
+{
+	return 0; /* default case: not in ROM */
+}
+
+#endif
+#endif
+#endif /* _ASM_SECTIONS_H */
diff -Nru a/include/asm-frv/segment.h b/include/asm-frv/segment.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/segment.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,46 @@
+/* segment.h: MMU segment settings
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+#ifndef _ASM_SEGMENT_H
+#define _ASM_SEGMENT_H
+
+#include <linux/config.h>
+
+#ifndef __ASSEMBLY__
+
+typedef struct {
+	unsigned long seg;
+} mm_segment_t;
+
+#define MAKE_MM_SEG(s)	((mm_segment_t) { (s) })
+
+#define KERNEL_DS		MAKE_MM_SEG(0xdfffffffUL)
+
+#ifdef CONFIG_MMU
+#define USER_DS			MAKE_MM_SEG(TASK_SIZE - 1)
+#else
+#define USER_DS			KERNEL_DS
+#endif
+
+#define get_ds()		(KERNEL_DS)
+#define get_fs()		(__current_thread_info->addr_limit)
+#define segment_eq(a,b)		((a).seg == (b).seg)
+#define __kernel_ds_p()		segment_eq(get_fs(), KERNEL_DS)
+#define get_addr_limit()	(get_fs().seg)
+
+#define set_fs(_x)					\
+do {							\
+	__current_thread_info->addr_limit = (_x);	\
+} while(0)
+
+
+#endif /* __ASSEMBLY__ */
+#endif /* _ASM_SEGMENT_H */
diff -Nru a/include/asm-frv/semaphore.h b/include/asm-frv/semaphore.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/semaphore.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,161 @@
+/* semaphore.h: semaphores for the FR-V
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+#ifndef _ASM_SEMAPHORE_H
+#define _ASM_SEMAPHORE_H
+
+#define RW_LOCK_BIAS		 0x01000000
+
+#ifndef __ASSEMBLY__
+
+#include <linux/linkage.h>
+#include <linux/wait.h>
+#include <linux/spinlock.h>
+#include <linux/rwsem.h>
+
+#define SEMAPHORE_DEBUG		WAITQUEUE_DEBUG
+
+/*
+ * the semaphore definition
+ * - if counter is >0 then there are tokens available on the semaphore for down to collect
+ * - if counter is <=0 then there are no spare tokens, and anyone that wants one must wait
+ * - if wait_list is not empty, then there are processes waiting for the semaphore
+ */
+struct semaphore {
+	unsigned		counter;
+	spinlock_t		wait_lock;
+	struct list_head	wait_list;
+#if SEMAPHORE_DEBUG
+	unsigned		__magic;
+#endif
+};
+
+#if SEMAPHORE_DEBUG
+# define __SEM_DEBUG_INIT(name) , (long)&(name).__magic
+#else
+# define __SEM_DEBUG_INIT(name)
+#endif
+
+
+#define __SEMAPHORE_INITIALIZER(name,count) \
+{ count, SPIN_LOCK_UNLOCKED, LIST_HEAD_INIT((name).wait_list) __SEM_DEBUG_INIT(name) }
+
+#define __MUTEX_INITIALIZER(name) \
+	__SEMAPHORE_INITIALIZER(name,1)
+
+#define __DECLARE_SEMAPHORE_GENERIC(name,count) \
+	struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
+
+#define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1)
+#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0)
+
+static inline void sema_init (struct semaphore *sem, int val)
+{
+	*sem = (struct semaphore) __SEMAPHORE_INITIALIZER(*sem, val);
+}
+
+static inline void init_MUTEX (struct semaphore *sem)
+{
+	sema_init(sem, 1);
+}
+
+static inline void init_MUTEX_LOCKED (struct semaphore *sem)
+{
+	sema_init(sem, 0);
+}
+
+extern void __down(struct semaphore *sem, unsigned long flags);
+extern int  __down_interruptible(struct semaphore *sem, unsigned long flags);
+extern void __up(struct semaphore *sem);
+
+static inline void down(struct semaphore *sem)
+{
+	unsigned long flags;
+
+#if SEMAPHORE_DEBUG
+	CHECK_MAGIC(sem->__magic);
+#endif
+
+	spin_lock_irqsave(&sem->wait_lock, flags);
+	if (likely(sem->counter > 0)) {
+		sem->counter--;
+		spin_unlock_irqrestore(&sem->wait_lock, flags);
+	}
+	else {
+		__down(sem, flags);
+	}
+}
+
+static inline int down_interruptible(struct semaphore *sem)
+{
+	unsigned long flags;
+	int ret = 0;
+
+#if SEMAPHORE_DEBUG
+	CHECK_MAGIC(sem->__magic);
+#endif
+
+	spin_lock_irqsave(&sem->wait_lock, flags);
+	if (likely(sem->counter > 0)) {
+		sem->counter--;
+		spin_unlock_irqrestore(&sem->wait_lock, flags);
+	}
+	else {
+		ret = __down_interruptible(sem, flags);
+	}
+	return ret;
+}
+
+/*
+ * non-blockingly attempt to down() a semaphore.
+ * - returns zero if we acquired it
+ */
+static inline int down_trylock(struct semaphore *sem)
+{
+	unsigned long flags;
+	int success = 0;
+
+#if SEMAPHORE_DEBUG
+	CHECK_MAGIC(sem->__magic);
+#endif
+
+	spin_lock_irqsave(&sem->wait_lock, flags);
+	if (sem->counter > 0) {
+		sem->counter--;
+		success = 1;
+	}
+	spin_unlock_irqrestore(&sem->wait_lock, flags);
+	return !success;
+}
+
+static inline void up(struct semaphore *sem)
+{
+	unsigned long flags;
+
+#if SEMAPHORE_DEBUG
+	CHECK_MAGIC(sem->__magic);
+#endif
+
+	spin_lock_irqsave(&sem->wait_lock, flags);
+	if (!list_empty(&sem->wait_list))
+		__up(sem);
+	else
+		sem->counter++;
+	spin_unlock_irqrestore(&sem->wait_lock, flags);
+}
+
+static inline int sem_getcount(struct semaphore *sem)
+{
+	return sem->counter;
+}
+
+#endif /* __ASSEMBLY__ */
+
+#endif
diff -Nru a/include/asm-frv/sembuf.h b/include/asm-frv/sembuf.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/sembuf.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,26 @@
+#ifndef _ASM_SEMBUF_H
+#define _ASM_SEMBUF_H
+
+/*
+ * The semid64_ds structure for FR-V architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 64-bit time_t to solve y2038 problem
+ * - 2 miscellaneous 32-bit values
+ */
+
+struct semid64_ds {
+	struct ipc64_perm	sem_perm;	/* permissions .. see ipc.h */
+	__kernel_time_t		sem_otime;	/* last semop time */
+	unsigned long		__unused1;
+	__kernel_time_t		sem_ctime;	/* last change time */
+	unsigned long		__unused2;
+	unsigned long		sem_nsems;	/* no. of semaphores in array */
+	unsigned long		__unused3;
+	unsigned long		__unused4;
+};
+
+#endif /* _ASM_SEMBUF_H */
+
diff -Nru a/include/asm-frv/serial-regs.h b/include/asm-frv/serial-regs.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/serial-regs.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,44 @@
+/* serial-regs.h: serial port registers
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+#ifndef _ASM_SERIAL_REGS_H
+#define _ASM_SERIAL_REGS_H
+
+#include <linux/serial_reg.h>
+#include <asm/irc-regs.h>
+
+#define SERIAL_ICLK	33333333	/* the target serial input clock */
+#define UART0_BASE	0xfeff9c00
+#define UART1_BASE	0xfeff9c40
+
+#define __get_UART0(R) ({ __reg(UART0_BASE + (R) * 8) >> 24; })
+#define __get_UART1(R) ({ __reg(UART1_BASE + (R) * 8) >> 24; })
+#define __set_UART0(R,V) do { __reg(UART0_BASE + (R) * 8) = (V) << 24; } while(0)
+#define __set_UART1(R,V) do { __reg(UART1_BASE + (R) * 8) = (V) << 24; } while(0)
+
+#define __get_UART0_LSR() ({ __get_UART0(UART_LSR); })
+#define __get_UART1_LSR() ({ __get_UART1(UART_LSR); })
+
+#define __set_UART0_IER(V) __set_UART0(UART_IER,(V))
+#define __set_UART1_IER(V) __set_UART1(UART_IER,(V))
+
+/* serial prescaler select register */
+#define __get_UCPSR()	({ *(volatile unsigned long *)(0xfeff9c90); })
+#define __set_UCPSR(V)	do { *(volatile unsigned long *)(0xfeff9c90) = (V); } while(0)
+#define UCPSR_SELECT0	0x07000000
+#define UCPSR_SELECT1	0x38000000
+
+/* serial prescaler base value register */
+#define __get_UCPVR()	({ *(volatile unsigned long *)(0xfeff9c98); mb(); })
+#define __set_UCPVR(V)	do { *(volatile unsigned long *)(0xfeff9c98) = (V) << 24; mb(); } while(0)
+
+
+#endif /* _ASM_SERIAL_REGS_H */
diff -Nru a/include/asm-frv/serial.h b/include/asm-frv/serial.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/serial.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,19 @@
+/*
+ * serial.h
+ *
+ * Copyright (C) 2003 Develer S.r.l. (http://www.develer.com/)
+ * Author: Bernardo Innocenti <bernie@codewiz.org>
+ *
+ * Based on linux/include/asm-i386/serial.h
+ */
+#include <linux/config.h>
+#include <asm/serial-regs.h>
+
+/*
+ * the base baud is derived from the clock speed and so is variable
+ */
+#define BASE_BAUD 0
+
+#define STD_COM_FLAGS		ASYNC_BOOT_AUTOCONF
+
+#define SERIAL_PORT_DFNS
diff -Nru a/include/asm-frv/setup.h b/include/asm-frv/setup.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/setup.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,25 @@
+/* setup.h: setup stuff
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+#ifndef _ASM_SETUP_H
+#define _ASM_SETUP_H
+
+#include <linux/init.h>
+
+#ifndef __ASSEMBLY__
+
+#ifdef CONFIG_MMU
+extern unsigned long __initdata num_mappedpages;
+#endif
+
+#endif /* !__ASSEMBLY__ */
+
+#endif /* _ASM_SETUP_H */
diff -Nru a/include/asm-frv/shmbuf.h b/include/asm-frv/shmbuf.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/shmbuf.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,43 @@
+#ifndef _ASM_SHMBUF_H
+#define _ASM_SHMBUF_H
+
+/*
+ * The shmid64_ds structure for FR-V architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 64-bit time_t to solve y2038 problem
+ * - 2 miscellaneous 32-bit values
+ */
+
+struct shmid64_ds {
+	struct ipc64_perm	shm_perm;	/* operation perms */
+	size_t			shm_segsz;	/* size of segment (bytes) */
+	__kernel_time_t		shm_atime;	/* last attach time */
+	unsigned long		__unused1;
+	__kernel_time_t		shm_dtime;	/* last detach time */
+	unsigned long		__unused2;
+	__kernel_time_t		shm_ctime;	/* last change time */
+	unsigned long		__unused3;
+	__kernel_pid_t		shm_cpid;	/* pid of creator */
+	__kernel_pid_t		shm_lpid;	/* pid of last operator */
+	unsigned long		shm_nattch;	/* no. of current attaches */
+	unsigned long		__unused4;
+	unsigned long		__unused5;
+};
+
+struct shminfo64 {
+	unsigned long	shmmax;
+	unsigned long	shmmin;
+	unsigned long	shmmni;
+	unsigned long	shmseg;
+	unsigned long	shmall;
+	unsigned long	__unused1;
+	unsigned long	__unused2;
+	unsigned long	__unused3;
+	unsigned long	__unused4;
+};
+
+#endif /* _ASM_SHMBUF_H */
+
diff -Nru a/include/asm-frv/shmparam.h b/include/asm-frv/shmparam.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/shmparam.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,7 @@
+#ifndef _ASM_SHMPARAM_H
+#define _ASM_SHMPARAM_H
+
+#define	SHMLBA PAGE_SIZE		 /* attach addr a multiple of this */
+
+#endif /* _ASM_SHMPARAM_H */
+
diff -Nru a/include/asm-frv/sigcontext.h b/include/asm-frv/sigcontext.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/sigcontext.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,26 @@
+/* sigcontext.h: FRV signal context
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+#ifndef _ASM_SIGCONTEXT_H
+#define _ASM_SIGCONTEXT_H
+
+#include <asm/registers.h>
+
+/*
+ * Signal context structure - contains all info to do with the state
+ * before the signal handler was invoked.  Note: only add new entries
+ * to the end of the structure.
+ */
+struct sigcontext {
+	struct user_context	sc_context;
+	unsigned long		sc_oldmask; 	/* old sigmask */
+} __attribute__((aligned(8)));
+
+#endif
diff -Nru a/include/asm-frv/siginfo.h b/include/asm-frv/siginfo.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/siginfo.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,12 @@
+#ifndef _ASM_SIGINFO_H
+#define _ASM_SIGINFO_H
+
+#include <linux/types.h>
+#include <asm-generic/siginfo.h>
+
+#define FPE_MDAOVF	(__SI_FAULT|9)	/* media overflow */
+#undef NSIGFPE
+#define NSIGFPE		9
+
+#endif
+
diff -Nru a/include/asm-frv/signal.h b/include/asm-frv/signal.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/signal.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,187 @@
+#ifndef _ASM_SIGNAL_H
+#define _ASM_SIGNAL_H
+
+#include <linux/types.h>
+
+/* Avoid too many header ordering problems.  */
+struct siginfo;
+
+#ifdef __KERNEL__
+/* Most things should be clean enough to redefine this at will, if care
+   is taken to make libc match.  */
+
+#define _NSIG		64
+#define _NSIG_BPW	32
+#define _NSIG_WORDS	(_NSIG / _NSIG_BPW)
+
+typedef unsigned long old_sigset_t;		/* at least 32 bits */
+
+typedef struct {
+	unsigned long sig[_NSIG_WORDS];
+} sigset_t;
+
+#else
+/* Here we must cater to libcs that poke about in kernel headers.  */
+
+#define NSIG		32
+typedef unsigned long sigset_t;
+
+#endif /* __KERNEL__ */
+
+#define SIGHUP		 1
+#define SIGINT		 2
+#define SIGQUIT		 3
+#define SIGILL		 4
+#define SIGTRAP		 5
+#define SIGABRT		 6
+#define SIGIOT		 6
+#define SIGBUS		 7
+#define SIGFPE		 8
+#define SIGKILL		 9
+#define SIGUSR1		10
+#define SIGSEGV		11
+#define SIGUSR2		12
+#define SIGPIPE		13
+#define SIGALRM		14
+#define SIGTERM		15
+#define SIGSTKFLT	16
+#define SIGCHLD		17
+#define SIGCONT		18
+#define SIGSTOP		19
+#define SIGTSTP		20
+#define SIGTTIN		21
+#define SIGTTOU		22
+#define SIGURG		23
+#define SIGXCPU		24
+#define SIGXFSZ		25
+#define SIGVTALRM	26
+#define SIGPROF		27
+#define SIGWINCH	28
+#define SIGIO		29
+#define SIGPOLL		SIGIO
+/*
+#define SIGLOST		29
+*/
+#define SIGPWR		30
+#define SIGSYS		31
+#define	SIGUNUSED	31
+
+/* These should not be considered constants from userland.  */
+#define SIGRTMIN	32
+#define SIGRTMAX	(_NSIG-1)
+
+/*
+ * SA_FLAGS values:
+ *
+ * SA_ONSTACK indicates that a registered stack_t will be used.
+ * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
+ * SA_RESTART flag to get restarting signals (which were the default long ago)
+ * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
+ * SA_RESETHAND clears the handler when the signal is delivered.
+ * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
+ * SA_NODEFER prevents the current signal from being masked in the handler.
+ *
+ * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
+ * Unix names RESETHAND and NODEFER respectively.
+ */
+#define SA_NOCLDSTOP	0x00000001
+#define SA_NOCLDWAIT	0x00000002 /* not supported yet */
+#define SA_SIGINFO	0x00000004
+#define SA_ONSTACK	0x08000000
+#define SA_RESTART	0x10000000
+#define SA_NODEFER	0x40000000
+#define SA_RESETHAND	0x80000000
+
+#define SA_NOMASK	SA_NODEFER
+#define SA_ONESHOT	SA_RESETHAND
+#define SA_INTERRUPT	0x20000000 /* dummy -- ignored */
+
+#define SA_RESTORER	0x04000000
+
+/*
+ * sigaltstack controls
+ */
+#define SS_ONSTACK	1
+#define SS_DISABLE	2
+
+#define MINSIGSTKSZ	2048
+#define SIGSTKSZ	8192
+
+#ifdef __KERNEL__
+
+/*
+ * These values of sa_flags are used only by the kernel as part of the
+ * irq handling routines.
+ *
+ * SA_INTERRUPT is also used by the irq handling routines.
+ * SA_SHIRQ is for shared interrupt support on PCI and EISA.
+ */
+#define SA_PROBE		SA_ONESHOT
+#define SA_SAMPLE_RANDOM	SA_RESTART
+#define SA_SHIRQ		0x04000000
+#endif
+
+#define SIG_BLOCK          0	/* for blocking signals */
+#define SIG_UNBLOCK        1	/* for unblocking signals */
+#define SIG_SETMASK        2	/* for setting the signal mask */
+
+/* Type of a signal handler.  */
+typedef void (*__sighandler_t)(int);
+
+#define SIG_DFL	((__sighandler_t)0)	/* default signal handling */
+#define SIG_IGN	((__sighandler_t)1)	/* ignore signal */
+#define SIG_ERR	((__sighandler_t)-1)	/* error return from signal */
+
+#ifdef __KERNEL__
+struct old_sigaction {
+	__sighandler_t sa_handler;
+	old_sigset_t sa_mask;
+	unsigned long sa_flags;
+	void (*sa_restorer)(void);
+};
+
+struct sigaction {
+	__sighandler_t sa_handler;
+	unsigned long sa_flags;
+	void (*sa_restorer)(void);
+	sigset_t sa_mask;		/* mask last for extensibility */
+};
+
+struct k_sigaction {
+	struct sigaction sa;
+};
+#else
+/* Here we must cater to libcs that poke about in kernel headers.  */
+
+struct sigaction {
+	union {
+	  __sighandler_t _sa_handler;
+	  void (*_sa_sigaction)(int, struct siginfo *, void *);
+	} _u;
+	sigset_t sa_mask;
+	unsigned long sa_flags;
+	void (*sa_restorer)(void);
+};
+
+#define sa_handler	_u._sa_handler
+#define sa_sigaction	_u._sa_sigaction
+
+#endif /* __KERNEL__ */
+
+typedef struct sigaltstack {
+	void *ss_sp;
+	int ss_flags;
+	size_t ss_size;
+} stack_t;
+
+extern int do_signal(struct pt_regs *regs, sigset_t *oldset);
+#define ptrace_signal_deliver(regs, cookie) do { } while (0)
+
+#ifdef __KERNEL__
+
+#include <asm/sigcontext.h>
+#undef __HAVE_ARCH_SIG_BITOPS
+
+#endif /* __KERNEL__ */
+
+#endif /* _ASM_SIGNAL_H */
diff -Nru a/include/asm-frv/smp.h b/include/asm-frv/smp.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/smp.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,10 @@
+#ifndef __ASM_SMP_H
+#define __ASM_SMP_H
+
+#include <linux/config.h>
+
+#ifdef CONFIG_SMP
+#error SMP not supported
+#endif
+
+#endif
diff -Nru a/include/asm-frv/socket.h b/include/asm-frv/socket.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/socket.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,51 @@
+#ifndef _ASM_SOCKET_H
+#define _ASM_SOCKET_H
+
+#include <asm/sockios.h>
+
+/* For setsockopt(2) */
+#define SOL_SOCKET	1
+
+#define SO_DEBUG	1
+#define SO_REUSEADDR	2
+#define SO_TYPE		3
+#define SO_ERROR	4
+#define SO_DONTROUTE	5
+#define SO_BROADCAST	6
+#define SO_SNDBUF	7
+#define SO_RCVBUF	8
+#define SO_KEEPALIVE	9
+#define SO_OOBINLINE	10
+#define SO_NO_CHECK	11
+#define SO_PRIORITY	12
+#define SO_LINGER	13
+#define SO_BSDCOMPAT	14
+/* To add :#define SO_REUSEPORT 15 */
+#define SO_PASSCRED	16
+#define SO_PEERCRED	17
+#define SO_RCVLOWAT	18
+#define SO_SNDLOWAT	19
+#define SO_RCVTIMEO	20
+#define SO_SNDTIMEO	21
+
+/* Security levels - as per NRL IPv6 - don't actually do anything */
+#define SO_SECURITY_AUTHENTICATION		22
+#define SO_SECURITY_ENCRYPTION_TRANSPORT	23
+#define SO_SECURITY_ENCRYPTION_NETWORK		24
+
+#define SO_BINDTODEVICE	25
+
+/* Socket filtering */
+#define SO_ATTACH_FILTER        26
+#define SO_DETACH_FILTER        27
+
+#define SO_PEERNAME             28
+#define SO_TIMESTAMP		29
+#define SCM_TIMESTAMP		SO_TIMESTAMP
+
+#define SO_ACCEPTCONN		30
+
+#define SO_PEERSEC		31
+
+#endif /* _ASM_SOCKET_H */
+
diff -Nru a/include/asm-frv/sockios.h b/include/asm-frv/sockios.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/sockios.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,13 @@
+#ifndef _ASM_SOCKIOS__
+#define _ASM_SOCKIOS__
+
+/* Socket-level I/O control calls. */
+#define FIOSETOWN 	0x8901
+#define SIOCSPGRP	0x8902
+#define FIOGETOWN	0x8903
+#define SIOCGPGRP	0x8904
+#define SIOCATMARK	0x8905
+#define SIOCGSTAMP	0x8906		/* Get stamp */
+
+#endif /* _ASM_SOCKIOS__ */
+
diff -Nru a/include/asm-frv/spinlock.h b/include/asm-frv/spinlock.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/spinlock.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,17 @@
+/* spinlock.h: spinlocks for FR-V
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+#ifndef _ASM_SPINLOCK_H
+#define _ASM_SPINLOCK_H
+
+#error no spinlocks for FR-V yet
+
+#endif /* _ASM_SPINLOCK_H */
diff -Nru a/include/asm-frv/spr-regs.h b/include/asm-frv/spr-regs.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/spr-regs.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,401 @@
+/* spr-regs.h: special-purpose registers on the FRV
+ *
+ * Copyright (C) 2003, 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+#ifndef _ASM_SPR_REGS_H
+#define _ASM_SPR_REGS_H
+
+/*
+ * PSR - Processor Status Register
+ */
+#define PSR_ET			0x00000001	/* enable interrupts/exceptions flag */
+#define PSR_PS			0x00000002	/* previous supervisor mode flag */
+#define PSR_S			0x00000004	/* supervisor mode flag */
+#define PSR_PIL			0x00000078	/* processor external interrupt level */
+#define PSR_PIL_0		0x00000000	/* - no interrupt in progress */
+#define PSR_PIL_13		0x00000068	/* - debugging only */
+#define PSR_PIL_14		0x00000070	/* - debugging in progress */
+#define PSR_PIL_15		0x00000078	/* - NMI in progress */
+#define PSR_EM			0x00000080	/* enable media operation */
+#define PSR_EF			0x00000100	/* enable FPU operation */
+#define PSR_BE			0x00001000	/* endianness mode */
+#define PSR_BE_LE		0x00000000	/* - little endian mode */
+#define PSR_BE_BE		0x00001000	/* - big endian mode */
+#define PSR_CM			0x00002000	/* conditional mode */
+#define PSR_NEM			0x00004000	/* non-excepting mode */
+#define PSR_ICE			0x00010000	/* in-circuit emulation mode */
+#define PSR_VERSION_SHIFT	24		/* CPU silicon ID */
+#define PSR_IMPLE_SHIFT		28		/* CPU core ID */
+
+#define PSR_VERSION(psr)	(((psr) >> PSR_VERSION_SHIFT) & 0xf)
+#define PSR_IMPLE(psr)		(((psr) >> PSR_IMPLE_SHIFT) & 0xf)
+
+#define PSR_IMPLE_FR401		0x2
+#define PSR_VERSION_FR401_MB93401	0x0
+#define PSR_VERSION_FR401_MB93401A	0x1
+#define PSR_VERSION_FR401_MB93403	0x2
+
+#define PSR_IMPLE_FR405		0x4
+#define PSR_VERSION_FR405_MB93405	0x0
+
+#define PSR_IMPLE_FR451		0x5
+#define PSR_VERSION_FR451_MB93451	0x0
+
+#define PSR_IMPLE_FR501		0x1
+#define PSR_VERSION_FR501_MB93501	0x1
+#define PSR_VERSION_FR501_MB93501A	0x2
+
+#define PSR_IMPLE_FR551		0x3
+#define PSR_VERSION_FR551_MB93555	0x1
+
+#define __get_PSR()	({ unsigned long x; asm volatile("movsg psr,%0" : "=r"(x)); x; })
+#define __set_PSR(V)	do { asm volatile("movgs %0,psr" : : "r"(V)); } while(0)
+
+/*
+ * TBR - Trap Base Register
+ */
+#define TBR_TT			0x00000ff0
+#define TBR_TT_INSTR_MMU_MISS	(0x01 << 4)
+#define TBR_TT_INSTR_ACC_ERROR	(0x02 << 4)
+#define TBR_TT_INSTR_ACC_EXCEP	(0x03 << 4)
+#define TBR_TT_PRIV_INSTR	(0x06 << 4)
+#define TBR_TT_ILLEGAL_INSTR	(0x07 << 4)
+#define TBR_TT_FP_EXCEPTION	(0x0d << 4)
+#define TBR_TT_MP_EXCEPTION	(0x0e << 4)
+#define TBR_TT_DATA_ACC_ERROR	(0x11 << 4)
+#define TBR_TT_DATA_MMU_MISS	(0x12 << 4)
+#define TBR_TT_DATA_ACC_EXCEP	(0x13 << 4)
+#define TBR_TT_DATA_STR_ERROR	(0x14 << 4)
+#define TBR_TT_DIVISION_EXCEP	(0x17 << 4)
+#define TBR_TT_COMMIT_EXCEP	(0x19 << 4)
+#define TBR_TT_INSTR_TLB_MISS	(0x1a << 4)
+#define TBR_TT_DATA_TLB_MISS	(0x1b << 4)
+#define TBR_TT_DATA_DAT_EXCEP	(0x1d << 4)
+#define TBR_TT_DECREMENT_TIMER	(0x1f << 4)
+#define TBR_TT_COMPOUND_EXCEP	(0x20 << 4)
+#define TBR_TT_INTERRUPT_1	(0x21 << 4)
+#define TBR_TT_INTERRUPT_2	(0x22 << 4)
+#define TBR_TT_INTERRUPT_3	(0x23 << 4)
+#define TBR_TT_INTERRUPT_4	(0x24 << 4)
+#define TBR_TT_INTERRUPT_5	(0x25 << 4)
+#define TBR_TT_INTERRUPT_6	(0x26 << 4)
+#define TBR_TT_INTERRUPT_7	(0x27 << 4)
+#define TBR_TT_INTERRUPT_8	(0x28 << 4)
+#define TBR_TT_INTERRUPT_9	(0x29 << 4)
+#define TBR_TT_INTERRUPT_10	(0x2a << 4)
+#define TBR_TT_INTERRUPT_11	(0x2b << 4)
+#define TBR_TT_INTERRUPT_12	(0x2c << 4)
+#define TBR_TT_INTERRUPT_13	(0x2d << 4)
+#define TBR_TT_INTERRUPT_14	(0x2e << 4)
+#define TBR_TT_INTERRUPT_15	(0x2f << 4)
+#define TBR_TT_TRAP0		(0x80 << 4)
+#define TBR_TT_TRAP1		(0x81 << 4)
+#define TBR_TT_TRAP2		(0x82 << 4)
+#define TBR_TT_TRAP126		(0xfe << 4)
+#define TBR_TT_BREAK		(0xff << 4)
+
+#define __get_TBR()	({ unsigned long x; asm volatile("movsg tbr,%0" : "=r"(x)); x; })
+
+/*
+ * HSR0 - Hardware Status Register 0
+ */
+#define HSR0_PDM		0x00000007	/* power down mode */
+#define HSR0_PDM_NORMAL		0x00000000	/* - normal mode */
+#define HSR0_PDM_CORE_SLEEP	0x00000001	/* - CPU core sleep mode */
+#define HSR0_PDM_BUS_SLEEP	0x00000003	/* - bus sleep mode */
+#define HSR0_PDM_PLL_RUN	0x00000005	/* - PLL run */
+#define HSR0_PDM_PLL_STOP	0x00000007	/* - PLL stop */
+#define HSR0_GRLE		0x00000040	/* GR lower register set enable */
+#define HSR0_GRHE		0x00000080	/* GR higher register set enable */
+#define HSR0_FRLE		0x00000100	/* FR lower register set enable */
+#define HSR0_FRHE		0x00000200	/* FR higher register set enable */
+#define HSR0_GRN		0x00000400	/* GR quantity */
+#define HSR0_GRN_64		0x00000000	/* - 64 GR registers */
+#define HSR0_GRN_32		0x00000400	/* - 32 GR registers */
+#define HSR0_FRN		0x00000800	/* FR quantity */
+#define HSR0_FRN_64		0x00000000	/* - 64 FR registers */
+#define HSR0_FRN_32		0x00000800	/* - 32 FR registers */
+#define HSR0_SA			0x00001000	/* start address (RAMBOOT#) */
+#define HSR0_ETMI		0x00008000	/* enable TIMERI (64-bit up timer) */
+#define HSR0_ETMD		0x00004000	/* enable TIMERD (32-bit down timer) */
+#define HSR0_PEDAT		0x00010000	/* previous DAT mode */
+#define HSR0_XEDAT		0x00020000	/* exception DAT mode */
+#define HSR0_EDAT		0x00080000	/* enable DAT mode */
+#define HSR0_RME		0x00400000	/* enable RAM mode */
+#define HSR0_EMEM		0x00800000	/* enable MMU_Miss mask */
+#define HSR0_EXMMU		0x01000000	/* enable extended MMU mode */
+#define HSR0_EDMMU		0x02000000	/* enable data MMU */
+#define HSR0_EIMMU		0x04000000	/* enable instruction MMU */
+#define HSR0_CBM		0x08000000	/* copy back mode */
+#define HSR0_CBM_WRITE_THRU	0x00000000	/* - write through */
+#define HSR0_CBM_COPY_BACK	0x08000000	/* - copy back */
+#define HSR0_NWA		0x10000000	/* no write allocate */
+#define HSR0_DCE		0x40000000	/* data cache enable */
+#define HSR0_ICE		0x80000000	/* instruction cache enable */
+
+#define __get_HSR(R)	({ unsigned long x; asm volatile("movsg hsr"#R",%0" : "=r"(x)); x; })
+#define __set_HSR(R,V)	do { asm volatile("movgs %0,hsr"#R : : "r"(V)); } while(0)
+
+/*
+ * CCR - Condition Codes Register
+ */
+#define CCR_FCC0		0x0000000f	/* FP/Media condition 0 (fcc0 reg) */
+#define CCR_FCC1		0x000000f0	/* FP/Media condition 1 (fcc1 reg) */
+#define CCR_FCC2		0x00000f00	/* FP/Media condition 2 (fcc2 reg) */
+#define CCR_FCC3		0x0000f000	/* FP/Media condition 3 (fcc3 reg) */
+#define CCR_ICC0		0x000f0000	/* Integer condition 0 (icc0 reg) */
+#define CCR_ICC0_C		0x00010000	/* - Carry flag */
+#define CCR_ICC0_V		0x00020000	/* - Overflow flag */
+#define CCR_ICC0_Z		0x00040000	/* - Zero flag */
+#define CCR_ICC0_N		0x00080000	/* - Negative flag */
+#define CCR_ICC1		0x00f00000	/* Integer condition 1 (icc1 reg) */
+#define CCR_ICC2		0x0f000000	/* Integer condition 2 (icc2 reg) */
+#define CCR_ICC3		0xf0000000	/* Integer condition 3 (icc3 reg) */
+
+/*
+ * CCCR - Condition Codes for Conditional Instructions Register
+ */
+#define CCCR_CC0		0x00000003	/* condition 0 (cc0 reg) */
+#define CCCR_CC0_FALSE		0x00000002	/* - condition is false */
+#define CCCR_CC0_TRUE		0x00000003	/* - condition is true */
+#define CCCR_CC1		0x0000000c	/* condition 1 (cc1 reg) */
+#define CCCR_CC2		0x00000030	/* condition 2 (cc2 reg) */
+#define CCCR_CC3		0x000000c0	/* condition 3 (cc3 reg) */
+#define CCCR_CC4		0x00000300	/* condition 4 (cc4 reg) */
+#define CCCR_CC5		0x00000c00	/* condition 5 (cc5 reg) */
+#define CCCR_CC6		0x00003000	/* condition 6 (cc6 reg) */
+#define CCCR_CC7		0x0000c000	/* condition 7 (cc7 reg) */
+
+/*
+ * ISR - Integer Status Register
+ */
+#define ISR_EMAM		0x00000001	/* memory misaligned access handling */
+#define ISR_EMAM_EXCEPTION	0x00000000	/* - generate exception */
+#define ISR_EMAM_FUDGE		0x00000001	/* - mask out invalid address bits */
+#define ISR_AEXC		0x00000004	/* accrued [overflow] exception */
+#define ISR_DTT			0x00000018	/* division type trap */
+#define ISR_DTT_IGNORE		0x00000000	/* - ignore division error */
+#define ISR_DTT_DIVBYZERO	0x00000008	/* - generate exception */
+#define ISR_DTT_OVERFLOW	0x00000010	/* - record overflow */
+#define ISR_EDE			0x00000020	/* enable division exception */
+#define ISR_PLI			0x20000000	/* pre-load instruction information */
+#define ISR_QI			0x80000000	/* quad data implementation information */
+
+/*
+ * EPCR0 - Exception PC Register
+ */
+#define EPCR0_V			0x00000001	/* register content validity indicator */
+#define EPCR0_PC		0xfffffffc	/* faulting instruction address */
+
+/*
+ * ESR0/14/15 - Exception Status Register
+ */
+#define ESRx_VALID		0x00000001	/* register content validity indicator */
+#define ESRx_EC			0x0000003e	/* exception type */
+#define ESRx_EC_DATA_STORE	0x00000000	/* - data_store_error */
+#define ESRx_EC_INSN_ACCESS	0x00000006	/* - instruction_access_error */
+#define ESRx_EC_PRIV_INSN	0x00000008	/* - privileged_instruction */
+#define ESRx_EC_ILL_INSN	0x0000000a	/* - illegal_instruction */
+#define ESRx_EC_MP_EXCEP	0x0000001c	/* - mp_exception */
+#define ESRx_EC_DATA_ACCESS	0x00000020	/* - data_access_error */
+#define ESRx_EC_DIVISION	0x00000026	/* - division_exception */
+#define ESRx_EC_ITLB_MISS	0x00000034	/* - instruction_access_TLB_miss */
+#define ESRx_EC_DTLB_MISS	0x00000036	/* - data_access_TLB_miss */
+#define ESRx_EC_DATA_ACCESS_DAT	0x0000003a	/* - data_access_DAT_exception */
+
+#define ESR0_IAEC		0x00000100	/* info for instruction-access-exception */
+#define ESR0_IAEC_RESV		0x00000000	/* - reserved */
+#define ESR0_IAEC_PROT_VIOL	0x00000100	/* - protection violation */
+
+#define ESR0_ATXC		0x00f00000	/* address translation exception code */
+#define ESR0_ATXC_MMU_MISS	0x00000000	/* - MMU miss exception and more (?) */
+#define ESR0_ATXC_MULTI_DAT	0x00800000	/* - multiple DAT entry hit */
+#define ESR0_ATXC_MULTI_SAT	0x00900000	/* - multiple SAT entry hit */
+#define ESR0_ATXC_AMRTLB_MISS	0x00a00000	/* - MMU/TLB miss exception */
+#define ESR0_ATXC_PRIV_EXCEP	0x00c00000	/* - privilege protection fault */
+#define ESR0_ATXC_WP_EXCEP	0x00d00000	/* - write protection fault */
+
+#define ESR0_EAV		0x00000800	/* true if EAR0 register valid */
+#define ESR15_EAV		0x00000800	/* true if EAR15 register valid */
+
+/*
+ * ESFR1 - Exception Status Valid Flag Register
+ */
+#define ESFR1_ESR0		0x00000001	/* true if ESR0 is valid */
+#define ESFR1_ESR14		0x00004000	/* true if ESR14 is valid */
+#define ESFR1_ESR15		0x00008000	/* true if ESR15 is valid */
+
+/*
+ * MSR - Media Status Register
+ */
+#define MSR0_AOVF		0x00000001	/* overflow exception accrued */
+#define MSRx_OVF		0x00000002	/* overflow exception detected */
+#define MSRx_SIE		0x0000003c	/* last SIMD instruction exception detected */
+#define MSRx_SIE_NONE		0x00000000	/* - none detected */
+#define MSRx_SIE_FRkHI_ACCk	0x00000020	/* - exception at FRkHI or ACCk */
+#define MSRx_SIE_FRkLO_ACCk1	0x00000010	/* - exception at FRkLO or ACCk+1 */
+#define MSRx_SIE_FRk1HI_ACCk2	0x00000008	/* - exception at FRk+1HI or ACCk+2 */
+#define MSRx_SIE_FRk1LO_ACCk3	0x00000004	/* - exception at FRk+1LO or ACCk+3 */
+#define MSR0_MTT		0x00007000	/* type of last media trap detected */
+#define MSR0_MTT_NONE		0x00000000	/* - none detected */
+#define MSR0_MTT_OVERFLOW	0x00001000	/* - overflow detected */
+#define MSR0_HI			0x00c00000	/* hardware implementation */
+#define MSR0_HI_ROUNDING	0x00000000	/* - rounding mode */
+#define MSR0_HI_NONROUNDING	0x00c00000	/* - non-rounding mode */
+#define MSR0_EMCI		0x01000000	/* enable media custom instructions */
+#define MSR0_SRDAV		0x10000000	/* select rounding mode of MAVEH */
+#define MSR0_SRDAV_RDAV		0x00000000	/* - controlled by MSR.RDAV */
+#define MSR0_SRDAV_RD		0x10000000	/* - controlled by MSR.RD */
+#define MSR0_RDAV		0x20000000	/* rounding mode of MAVEH */
+#define MSR0_RDAV_NEAREST_MI	0x00000000	/* - round to nearest minus */
+#define MSR0_RDAV_NEAREST_PL	0x20000000	/* - round to nearest plus */
+#define MSR0_RD			0xc0000000	/* rounding mode */
+#define MSR0_RD_NEAREST		0x00000000	/* - nearest */
+#define MSR0_RD_ZERO		0x40000000	/* - zero */
+#define MSR0_RD_POS_INF		0x80000000	/* - postive infinity */
+#define MSR0_RD_NEG_INF		0xc0000000	/* - negative infinity */
+
+/*
+ * IAMPR0-7 - Instruction Address Mapping Register
+ * DAMPR0-7 - Data Address Mapping Register
+ */
+#define xAMPRx_V		0x00000001	/* register content validity indicator */
+#define DAMPRx_WP		0x00000002	/* write protect */
+#define DAMPRx_WP_RW		0x00000000	/* - read/write */
+#define DAMPRx_WP_RO		0x00000002	/* - read-only */
+#define xAMPRx_C		0x00000004	/* cached/uncached */
+#define xAMPRx_C_CACHED		0x00000000	/* - cached */
+#define xAMPRx_C_UNCACHED	0x00000004	/* - uncached */
+#define xAMPRx_S		0x00000008	/* supervisor only */
+#define xAMPRx_S_USER		0x00000000	/* - userspace can access */
+#define xAMPRx_S_KERNEL		0x00000008	/* - kernel only */
+#define xAMPRx_SS		0x000000f0	/* segment size */
+#define xAMPRx_SS_16Kb		0x00000000	/* - 16 kilobytes */
+#define xAMPRx_SS_64Kb		0x00000010	/* - 64 kilobytes */
+#define xAMPRx_SS_256Kb		0x00000020	/* - 256 kilobytes */
+#define xAMPRx_SS_1Mb		0x00000030	/* - 1 megabyte */
+#define xAMPRx_SS_2Mb		0x00000040	/* - 2 megabytes */
+#define xAMPRx_SS_4Mb		0x00000050	/* - 4 megabytes */
+#define xAMPRx_SS_8Mb		0x00000060	/* - 8 megabytes */
+#define xAMPRx_SS_16Mb		0x00000070	/* - 16 megabytes */
+#define xAMPRx_SS_32Mb		0x00000080	/* - 32 megabytes */
+#define xAMPRx_SS_64Mb		0x00000090	/* - 64 megabytes */
+#define xAMPRx_SS_128Mb		0x000000a0	/* - 128 megabytes */
+#define xAMPRx_SS_256Mb		0x000000b0	/* - 256 megabytes */
+#define xAMPRx_SS_512Mb		0x000000c0	/* - 512 megabytes */
+#define xAMPRx_RESERVED8	0x00000100	/* reserved bit */
+#define xAMPRx_NG		0x00000200	/* non-global */
+#define xAMPRx_L		0x00000400	/* locked */
+#define xAMPRx_M		0x00000800	/* modified */
+#define xAMPRx_D		0x00001000	/* DAT entry */
+#define xAMPRx_RESERVED13	0x00002000	/* reserved bit */
+#define xAMPRx_PPFN		0xfff00000	/* physical page frame number */
+
+#define xAMPRx_V_BIT		0
+#define DAMPRx_WP_BIT		1
+#define xAMPRx_C_BIT		2
+#define xAMPRx_S_BIT		3
+#define xAMPRx_RESERVED8_BIT	8
+#define xAMPRx_NG_BIT		9
+#define xAMPRx_L_BIT		10
+#define xAMPRx_M_BIT		11
+#define xAMPRx_D_BIT		12
+#define xAMPRx_RESERVED13_BIT	13
+
+#define __get_IAMPR(R) ({ unsigned long x; asm volatile("movsg iampr"#R",%0" : "=r"(x)); x; })
+#define __get_DAMPR(R) ({ unsigned long x; asm volatile("movsg dampr"#R",%0" : "=r"(x)); x; })
+
+#define __get_IAMLR(R) ({ unsigned long x; asm volatile("movsg iamlr"#R",%0" : "=r"(x)); x; })
+#define __get_DAMLR(R) ({ unsigned long x; asm volatile("movsg damlr"#R",%0" : "=r"(x)); x; })
+
+#define __set_IAMPR(R,V) 	do { asm volatile("movgs %0,iampr"#R : : "r"(V)); } while(0)
+#define __set_DAMPR(R,V)  	do { asm volatile("movgs %0,dampr"#R : : "r"(V)); } while(0)
+
+#define __set_IAMLR(R,V) 	do { asm volatile("movgs %0,iamlr"#R : : "r"(V)); } while(0)
+#define __set_DAMLR(R,V)  	do { asm volatile("movgs %0,damlr"#R : : "r"(V)); } while(0)
+
+#define save_dampr(R, _dampr)					\
+do {								\
+	asm volatile("movsg dampr"R",%0" : "=r"(_dampr));	\
+} while(0)
+
+#define restore_dampr(R, _dampr)			\
+do {							\
+	asm volatile("movgs %0,dampr"R :: "r"(_dampr));	\
+} while(0)
+
+/*
+ * AMCR - Address Mapping Control Register
+ */
+#define AMCR_IAMRN		0x000000ff	/* quantity of IAMPR registers */
+#define AMCR_DAMRN		0x0000ff00	/* quantity of DAMPR registers */
+
+/*
+ * TTBR - Address Translation Table Base Register
+ */
+#define __get_TTBR()		({ unsigned long x; asm volatile("movsg ttbr,%0" : "=r"(x)); x; })
+
+/*
+ * TPXR - TLB Probe Extend Register
+ */
+#define TPXR_E			0x00000001
+#define TPXR_LMAX_SHIFT		20
+#define TPXR_LMAX_SMASK		0xf
+#define TPXR_WMAX_SHIFT		24
+#define TPXR_WMAX_SMASK		0xf
+#define TPXR_WAY_SHIFT		28
+#define TPXR_WAY_SMASK		0xf
+
+/*
+ * DCR - Debug Control Register
+ */
+#define DCR_IBCE3		0x00000001	/* break on conditional insn pointed to by IBAR3 */
+#define DCR_IBE3		0x00000002	/* break on insn pointed to by IBAR3 */
+#define DCR_IBCE1		0x00000004	/* break on conditional insn pointed to by IBAR2 */
+#define DCR_IBE1		0x00000008	/* break on insn pointed to by IBAR2 */
+#define DCR_IBCE2		0x00000010	/* break on conditional insn pointed to by IBAR1 */
+#define DCR_IBE2		0x00000020	/* break on insn pointed to by IBAR1 */
+#define DCR_IBCE0		0x00000040	/* break on conditional insn pointed to by IBAR0 */
+#define DCR_IBE0		0x00000080	/* break on insn pointed to by IBAR0 */
+
+#define DCR_DDBE1		0x00004000	/* use DBDR1x when checking DBAR1 */
+#define DCR_DWBE1		0x00008000	/* break on store to address in DBAR1/DBMR1x */
+#define DCR_DRBE1		0x00010000	/* break on load from address in DBAR1/DBMR1x */
+#define DCR_DDBE0		0x00020000	/* use DBDR0x when checking DBAR0 */
+#define DCR_DWBE0		0x00040000	/* break on store to address in DBAR0/DBMR0x */
+#define DCR_DRBE0		0x00080000	/* break on load from address in DBAR0/DBMR0x */
+
+#define DCR_EIM			0x0c000000	/* external interrupt disable */
+#define DCR_IBM			0x10000000	/* instruction break disable */
+#define DCR_SE			0x20000000	/* single step enable */
+#define DCR_EBE			0x40000000	/* exception break enable */
+
+/*
+ * BRR - Break Interrupt Request Register
+ */
+#define BRR_ST			0x00000001	/* single-step detected */
+#define BRR_SB			0x00000002	/* break instruction detected */
+#define BRR_BB			0x00000004	/* branch with hint detected */
+#define BRR_CBB			0x00000008	/* branch to LR detected */
+#define BRR_IBx			0x000000f0	/* hardware breakpoint detected */
+#define BRR_DBx			0x00000f00	/* hardware watchpoint detected */
+#define BRR_DBNEx		0x0000f000	/* ? */
+#define BRR_EBTT		0x00ff0000	/* trap type of exception break */
+#define BRR_TB			0x10000000	/* external break request detected */
+#define BRR_CB			0x20000000	/* ICE break command detected */
+#define BRR_EB			0x40000000	/* exception break detected */
+
+/*
+ * BPSR - Break PSR Save Register
+ */
+#define BPSR_BET		0x00000001	/* former PSR.ET */
+#define BPSR_BS			0x00001000	/* former PSR.S */
+
+#endif /* _ASM_SPR_REGS_H */
diff -Nru a/include/asm-frv/stat.h b/include/asm-frv/stat.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/stat.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,100 @@
+#ifndef _ASM_STAT_H
+#define _ASM_STAT_H
+
+struct __old_kernel_stat {
+	unsigned short st_dev;
+	unsigned short st_ino;
+	unsigned short st_mode;
+	unsigned short st_nlink;
+	unsigned short st_uid;
+	unsigned short st_gid;
+	unsigned short st_rdev;
+	unsigned long  st_size;
+	unsigned long  st_atime;
+	unsigned long  st_mtime;
+	unsigned long  st_ctime;
+};
+
+/* This matches struct stat in uClibc/glibc.  */
+struct stat {
+	unsigned char __pad1[6];
+	unsigned short st_dev;
+
+	unsigned long __pad2;
+	unsigned long st_ino;
+
+	unsigned short __pad3;
+	unsigned short st_mode;
+	unsigned short __pad4;
+	unsigned short st_nlink;
+
+	unsigned short __pad5;
+	unsigned short st_uid;
+	unsigned short __pad6;
+	unsigned short st_gid;
+
+	unsigned char __pad7[6];
+	unsigned short st_rdev;
+
+	unsigned long __pad8;
+	unsigned long st_size;
+
+	unsigned long __pad9;		/* align 64-bit st_blocks to 2-word */
+	unsigned long st_blksize;
+
+	unsigned long __pad10;	/* future possible st_blocks high bits */
+	unsigned long st_blocks;	/* Number 512-byte blocks allocated. */
+
+	unsigned long __unused1;
+	unsigned long st_atime;
+
+	unsigned long __unused2;
+	unsigned long st_mtime;
+
+	unsigned long __unused3;
+	unsigned long st_ctime;
+
+	unsigned long long __unused4;
+};
+
+/* This matches struct stat64 in uClibc/glibc.  The layout is exactly
+   the same as that of struct stat above, with 64-bit types taking up
+   space that was formerly used by padding.  stat syscalls are still
+   different from stat64, though, in that the former tests for
+   overflow.  */
+struct stat64 {
+	unsigned char __pad1[6];
+	unsigned short st_dev;
+
+	unsigned long long st_ino;
+
+	unsigned int st_mode;
+	unsigned int st_nlink;
+
+	unsigned long st_uid;
+	unsigned long st_gid;
+
+	unsigned char __pad2[6];
+	unsigned short st_rdev;
+
+	long long st_size;
+
+	unsigned long __pad3;		/* align 64-bit st_blocks to 2-word */
+	unsigned long st_blksize;
+
+	unsigned long __pad4;		/* future possible st_blocks high bits */
+	unsigned long st_blocks;	/* Number 512-byte blocks allocated. */
+
+	unsigned long st_atime_nsec;
+	unsigned long st_atime;
+
+	unsigned int st_mtime_nsec;
+	unsigned long st_mtime;
+
+	unsigned long st_ctime_nsec;
+	unsigned long st_ctime;
+
+	unsigned long long __unused4;
+};
+
+#endif /* _ASM_STAT_H */
diff -Nru a/include/asm-frv/statfs.h b/include/asm-frv/statfs.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/statfs.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,7 @@
+#ifndef _ASM_STATFS_H
+#define _ASM_STATFS_H
+
+#include <asm-generic/statfs.h>
+
+#endif /* _ASM_STATFS_H */
+
diff -Nru a/include/asm-frv/string.h b/include/asm-frv/string.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/string.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,51 @@
+/* string.h: FRV string handling
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+#ifndef _ASM_STRING_H_
+#define _ASM_STRING_H_
+
+#ifdef __KERNEL__ /* only set these up for kernel code */
+
+#define __HAVE_ARCH_MEMSET 1
+#define __HAVE_ARCH_MEMCPY 1
+
+extern void *memset(void *, int, __kernel_size_t);
+extern void *memcpy(void *, const void *, __kernel_size_t);
+
+#else /* KERNEL */
+
+/*
+ *	let user libraries deal with these,
+ *	IMHO the kernel has no place defining these functions for user apps
+ */
+
+#define __HAVE_ARCH_STRCPY 1
+#define __HAVE_ARCH_STRNCPY 1
+#define __HAVE_ARCH_STRCAT 1
+#define __HAVE_ARCH_STRNCAT 1
+#define __HAVE_ARCH_STRCMP 1
+#define __HAVE_ARCH_STRNCMP 1
+#define __HAVE_ARCH_STRNICMP 1
+#define __HAVE_ARCH_STRCHR 1
+#define __HAVE_ARCH_STRRCHR 1
+#define __HAVE_ARCH_STRSTR 1
+#define __HAVE_ARCH_STRLEN 1
+#define __HAVE_ARCH_STRNLEN 1
+#define __HAVE_ARCH_MEMSET 1
+#define __HAVE_ARCH_MEMCPY 1
+#define __HAVE_ARCH_MEMMOVE 1
+#define __HAVE_ARCH_MEMSCAN 1
+#define __HAVE_ARCH_MEMCMP 1
+#define __HAVE_ARCH_MEMCHR 1
+#define __HAVE_ARCH_STRTOK 1
+
+#endif /* KERNEL */
+#endif /* _ASM_STRING_H_ */
diff -Nru a/include/asm-frv/suspend.h b/include/asm-frv/suspend.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/suspend.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,20 @@
+/* suspend.h: suspension stuff
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+#ifndef _ASM_SUSPEND_H
+#define _ASM_SUSPEND_H
+
+static inline int arch_prepare_suspend(void)
+{
+	return 0;
+}
+
+#endif /* _ASM_SUSPEND_H */
diff -Nru a/include/asm-frv/system.h b/include/asm-frv/system.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/system.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,123 @@
+/* system.h: FR-V CPU control definitions
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+#ifndef _ASM_SYSTEM_H
+#define _ASM_SYSTEM_H
+
+#include <linux/config.h> /* get configuration macros */
+#include <linux/linkage.h>
+#include <asm/atomic.h>
+
+struct thread_struct;
+
+#define prepare_to_switch()    do { } while(0)
+
+/*
+ * switch_to(prev, next) should switch from task `prev' to `next'
+ * `prev' will never be the same as `next'.
+ * The `mb' is to tell GCC not to cache `current' across this call.
+ */
+extern asmlinkage
+void __switch_to(struct thread_struct *prev, struct thread_struct *next);
+
+#define switch_to(prev, next, last)						\
+do {										\
+	prev->thread.sched_lr = (unsigned long) __builtin_return_address(0);	\
+	__switch_to(&prev->thread, &next->thread);				\
+	mb();									\
+} while(0)
+
+/*
+ * interrupt flag manipulation
+ */
+#define local_irq_disable()				\
+do {							\
+	unsigned long psr;				\
+	asm volatile("	movsg	psr,%0		\n"	\
+		     "	andi	%0,%2,%0	\n"	\
+		     "	ori	%0,%1,%0	\n"	\
+		     "	movgs	%0,psr		\n"	\
+		     : "=r"(psr)			\
+		     : "i" (PSR_PIL_14), "i" (~PSR_PIL)	\
+		     : "memory");			\
+} while(0)
+
+#define local_irq_enable()				\
+do {							\
+	unsigned long psr;				\
+	asm volatile("	movsg	psr,%0		\n"	\
+		     "	andi	%0,%1,%0	\n"	\
+		     "	movgs	%0,psr		\n"	\
+		     : "=r"(psr)			\
+		     : "i" (~PSR_PIL)			\
+		     : "memory");			\
+} while(0)
+
+#define local_save_flags(flags)			\
+do {						\
+	typecheck(unsigned long, flags);	\
+	asm("movsg psr,%0"			\
+	    : "=r"(flags)			\
+	    :					\
+	    : "memory");			\
+} while(0)
+
+#define	local_irq_save(flags)				\
+do {							\
+	unsigned long npsr;				\
+	typecheck(unsigned long, flags);		\
+	asm volatile("	movsg	psr,%0		\n"	\
+		     "	andi	%0,%3,%1	\n"	\
+		     "	ori	%1,%2,%1	\n"	\
+		     "	movgs	%1,psr		\n"	\
+		     : "=r"(flags), "=r"(npsr)		\
+		     : "i" (PSR_PIL_14), "i" (~PSR_PIL)	\
+		     : "memory");			\
+} while(0)
+
+#define	local_irq_restore(flags)			\
+do {							\
+	typecheck(unsigned long, flags);		\
+	asm volatile("	movgs	%0,psr		\n"	\
+		     :					\
+		     : "r" (flags)			\
+		     : "memory");			\
+} while(0)
+
+#define irqs_disabled() \
+	((__get_PSR() & PSR_PIL) >= PSR_PIL_14)
+
+/*
+ * Force strict CPU ordering.
+ */
+#define nop()			asm volatile ("nop"::)
+#define mb()			asm volatile ("membar" : : :"memory")
+#define rmb()			asm volatile ("membar" : : :"memory")
+#define wmb()			asm volatile ("membar" : : :"memory")
+#define set_mb(var, value)	do { var = value; mb(); } while (0)
+#define set_wmb(var, value)	do { var = value; wmb(); } while (0)
+
+#define smp_mb()		mb()
+#define smp_rmb()		rmb()
+#define smp_wmb()		wmb()
+
+#define read_barrier_depends()		do {} while(0)
+#define smp_read_barrier_depends()	read_barrier_depends()
+
+#define HARD_RESET_NOW()			\
+do {						\
+	cli();					\
+} while(1)
+
+extern void die_if_kernel(const char *, ...) __attribute__((format(printf, 1, 2)));
+extern void free_initmem(void);
+
+#endif /* _ASM_SYSTEM_H */
diff -Nru a/include/asm-frv/termbits.h b/include/asm-frv/termbits.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/termbits.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,177 @@
+#ifndef _ASM_TERMBITS_H__
+#define _ASM_TERMBITS_H__
+
+#include <linux/posix_types.h>
+
+typedef unsigned char	cc_t;
+typedef unsigned int	speed_t;
+typedef unsigned int	tcflag_t;
+
+#define NCCS 19
+struct termios {
+	tcflag_t c_iflag;		/* input mode flags */
+	tcflag_t c_oflag;		/* output mode flags */
+	tcflag_t c_cflag;		/* control mode flags */
+	tcflag_t c_lflag;		/* local mode flags */
+	cc_t c_line;			/* line discipline */
+	cc_t c_cc[NCCS];		/* control characters */
+};
+
+/* c_cc characters */
+#define VINTR 0
+#define VQUIT 1
+#define VERASE 2
+#define VKILL 3
+#define VEOF 4
+#define VTIME 5
+#define VMIN 6
+#define VSWTC 7
+#define VSTART 8
+#define VSTOP 9
+#define VSUSP 10
+#define VEOL 11
+#define VREPRINT 12
+#define VDISCARD 13
+#define VWERASE 14
+#define VLNEXT 15
+#define VEOL2 16
+
+
+/* c_iflag bits */
+#define IGNBRK	0000001
+#define BRKINT	0000002
+#define IGNPAR	0000004
+#define PARMRK	0000010
+#define INPCK	0000020
+#define ISTRIP	0000040
+#define INLCR	0000100
+#define IGNCR	0000200
+#define ICRNL	0000400
+#define IUCLC	0001000
+#define IXON	0002000
+#define IXANY	0004000
+#define IXOFF	0010000
+#define IMAXBEL	0020000
+#define IUTF8	0040000
+
+/* c_oflag bits */
+#define OPOST	0000001
+#define OLCUC	0000002
+#define ONLCR	0000004
+#define OCRNL	0000010
+#define ONOCR	0000020
+#define ONLRET	0000040
+#define OFILL	0000100
+#define OFDEL	0000200
+#define NLDLY	0000400
+#define   NL0	0000000
+#define   NL1	0000400
+#define CRDLY	0003000
+#define   CR0	0000000
+#define   CR1	0001000
+#define   CR2	0002000
+#define   CR3	0003000
+#define TABDLY	0014000
+#define   TAB0	0000000
+#define   TAB1	0004000
+#define   TAB2	0010000
+#define   TAB3	0014000
+#define   XTABS	0014000
+#define BSDLY	0020000
+#define   BS0	0000000
+#define   BS1	0020000
+#define VTDLY	0040000
+#define   VT0	0000000
+#define   VT1	0040000
+#define FFDLY	0100000
+#define   FF0	0000000
+#define   FF1	0100000
+
+/* c_cflag bit meaning */
+#define CBAUD	0010017
+#define  B0	0000000		/* hang up */
+#define  B50	0000001
+#define  B75	0000002
+#define  B110	0000003
+#define  B134	0000004
+#define  B150	0000005
+#define  B200	0000006
+#define  B300	0000007
+#define  B600	0000010
+#define  B1200	0000011
+#define  B1800	0000012
+#define  B2400	0000013
+#define  B4800	0000014
+#define  B9600	0000015
+#define  B19200	0000016
+#define  B38400	0000017
+#define EXTA B19200
+#define EXTB B38400
+#define CSIZE	0000060
+#define   CS5	0000000
+#define   CS6	0000020
+#define   CS7	0000040
+#define   CS8	0000060
+#define CSTOPB	0000100
+#define CREAD	0000200
+#define PARENB	0000400
+#define PARODD	0001000
+#define HUPCL	0002000
+#define CLOCAL	0004000
+#define CBAUDEX 0010000
+#define    B57600 0010001
+#define   B115200 0010002
+#define   B230400 0010003
+#define   B460800 0010004
+#define   B500000 0010005
+#define   B576000 0010006
+#define   B921600 0010007
+#define  B1000000 0010010
+#define  B1152000 0010011
+#define  B1500000 0010012
+#define  B2000000 0010013
+#define  B2500000 0010014
+#define  B3000000 0010015
+#define  B3500000 0010016
+#define  B4000000 0010017
+#define CIBAUD	  002003600000	/* input baud rate (not used) */
+#define CTVB	  004000000000		/* VisioBraille Terminal flow control */
+#define CMSPAR	  010000000000		/* mark or space (stick) parity */
+#define CRTSCTS	  020000000000		/* flow control */
+
+/* c_lflag bits */
+#define ISIG	0000001
+#define ICANON	0000002
+#define XCASE	0000004
+#define ECHO	0000010
+#define ECHOE	0000020
+#define ECHOK	0000040
+#define ECHONL	0000100
+#define NOFLSH	0000200
+#define TOSTOP	0000400
+#define ECHOCTL	0001000
+#define ECHOPRT	0002000
+#define ECHOKE	0004000
+#define FLUSHO	0010000
+#define PENDIN	0040000
+#define IEXTEN	0100000
+
+
+/* tcflow() and TCXONC use these */
+#define	TCOOFF		0
+#define	TCOON		1
+#define	TCIOFF		2
+#define	TCION		3
+
+/* tcflush() and TCFLSH use these */
+#define	TCIFLUSH	0
+#define	TCOFLUSH	1
+#define	TCIOFLUSH	2
+
+/* tcsetattr uses these */
+#define	TCSANOW		0
+#define	TCSADRAIN	1
+#define	TCSAFLUSH	2
+
+#endif /* _ASM_TERMBITS_H__ */
+
diff -Nru a/include/asm-frv/termios.h b/include/asm-frv/termios.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/termios.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,74 @@
+#ifndef _ASM_TERMIOS_H
+#define _ASM_TERMIOS_H
+
+#include <asm/termbits.h>
+#include <asm/ioctls.h>
+
+struct winsize {
+	unsigned short ws_row;
+	unsigned short ws_col;
+	unsigned short ws_xpixel;
+	unsigned short ws_ypixel;
+};
+
+#define NCC 8
+struct termio {
+	unsigned short c_iflag;		/* input mode flags */
+	unsigned short c_oflag;		/* output mode flags */
+	unsigned short c_cflag;		/* control mode flags */
+	unsigned short c_lflag;		/* local mode flags */
+	unsigned char c_line;		/* line discipline */
+	unsigned char c_cc[NCC];	/* control characters */
+};
+
+#ifdef __KERNEL__
+/*	intr=^C		quit=^|		erase=del	kill=^U
+	eof=^D		vtime=\0	vmin=\1		sxtc=\0
+	start=^Q	stop=^S		susp=^Z		eol=\0
+	reprint=^R	discard=^U	werase=^W	lnext=^V
+	eol2=\0
+*/
+#define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0"
+#endif
+
+/* modem lines */
+#define TIOCM_LE	0x001
+#define TIOCM_DTR	0x002
+#define TIOCM_RTS	0x004
+#define TIOCM_ST	0x008
+#define TIOCM_SR	0x010
+#define TIOCM_CTS	0x020
+#define TIOCM_CAR	0x040
+#define TIOCM_RNG	0x080
+#define TIOCM_DSR	0x100
+#define TIOCM_CD	TIOCM_CAR
+#define TIOCM_RI	TIOCM_RNG
+#define TIOCM_OUT1	0x2000
+#define TIOCM_OUT2	0x4000
+#define TIOCM_LOOP	0x8000
+
+#define TIOCM_MODEM_BITS       TIOCM_OUT2      /* IRDA support */
+
+/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
+
+/* line disciplines */
+#define N_TTY		0
+#define N_SLIP		1
+#define N_MOUSE		2
+#define N_PPP		3
+#define N_STRIP		4
+#define N_AX25		5
+#define N_X25		6	/* X.25 async */
+#define N_6PACK		7
+#define N_MASC		8	/* Reserved for Mobitex module <kaz@cafe.net> */
+#define N_R3964		9	/* Reserved for Simatic R3964 module */
+#define N_PROFIBUS_FDL	10	/* Reserved for Profibus <Dave@mvhi.com> */
+#define N_IRDA		11	/* Linux IrDa - 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 */
+
+#include <asm-generic/termios.h>
+
+#endif /* _ASM_TERMIOS_H */
diff -Nru a/include/asm-frv/thread_info.h b/include/asm-frv/thread_info.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/thread_info.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,158 @@
+/* thread_info.h: description
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ * Derived from include/asm-i386/thread_info.h
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#ifndef _ASM_THREAD_INFO_H
+#define _ASM_THREAD_INFO_H
+
+#ifdef __KERNEL__
+
+#ifndef __ASSEMBLY__
+#include <asm/processor.h>
+#endif
+
+/*
+ * low level task data that entry.S needs immediate access to
+ * - this struct should fit entirely inside of one cache line
+ * - this struct shares the supervisor stack pages
+ * - if the contents of this structure are changed, the assembly constants must also be changed
+ */
+#ifndef __ASSEMBLY__
+
+struct thread_info {
+	struct task_struct	*task;		/* main task structure */
+	struct exec_domain	*exec_domain;	/* execution domain */
+	unsigned long		flags;		/* low level flags */
+	unsigned long		status;		/* thread-synchronous flags */
+	__u32			cpu;		/* current CPU */
+	__s32			preempt_count;	/* 0 => preemptable, <0 => BUG */
+
+	mm_segment_t		addr_limit;	/* thread address space:
+					 	   0-0xBFFFFFFF for user-thead
+						   0-0xFFFFFFFF for kernel-thread
+						*/
+	struct restart_block    restart_block;
+
+	__u8			supervisor_stack[0];
+};
+
+#else /* !__ASSEMBLY__ */
+
+/* offsets into the thread_info struct for assembly code access */
+#define TI_TASK			0x00000000
+#define TI_EXEC_DOMAIN		0x00000004
+#define TI_FLAGS		0x00000008
+#define TI_STATUS		0x0000000C
+#define TI_CPU			0x00000010
+#define TI_PRE_COUNT		0x00000014
+#define TI_ADDR_LIMIT		0x00000018
+#define TI_RESTART_BLOCK	0x0000001C
+
+#endif
+
+#define PREEMPT_ACTIVE		0x4000000
+
+/*
+ * macros/functions for gaining access to the thread information structure
+ *
+ * preempt_count needs to be 1 initially, until the scheduler is functional.
+ */
+#ifndef __ASSEMBLY__
+
+#define INIT_THREAD_INFO(tsk)			\
+{						\
+	.task		= &tsk,			\
+	.exec_domain	= &default_exec_domain,	\
+	.flags		= 0,			\
+	.cpu		= 0,			\
+	.preempt_count	= 1,			\
+	.addr_limit	= KERNEL_DS,		\
+	.restart_block = {			\
+		.fn = do_no_restart_syscall,	\
+	},					\
+}
+
+#define init_thread_info	(init_thread_union.thread_info)
+#define init_stack		(init_thread_union.stack)
+
+#ifdef CONFIG_SMALL_TASKS
+#define THREAD_SIZE		4096
+#else
+#define THREAD_SIZE		8192
+#endif
+
+/* how to get the thread information struct from C */
+register struct thread_info *__current_thread_info asm("gr15");
+
+#define current_thread_info() ({ __current_thread_info; })
+
+/* thread information allocation */
+#ifdef CONFIG_DEBUG_STACK_USAGE
+#define alloc_thread_info(tsk)					\
+	({							\
+		struct thread_info *ret;			\
+								\
+		ret = kmalloc(THREAD_SIZE, GFP_KERNEL);		\
+		if (ret)					\
+			memset(ret, 0, THREAD_SIZE);		\
+		ret;						\
+	})
+#else
+#define alloc_thread_info(tsk)	kmalloc(THREAD_SIZE, GFP_KERNEL)
+#endif
+
+#define free_thread_info(info)	kfree(info)
+#define get_thread_info(ti)	get_task_struct((ti)->task)
+#define put_thread_info(ti)	put_task_struct((ti)->task)
+
+#else /* !__ASSEMBLY__ */
+
+#define THREAD_SIZE	8192
+
+#endif
+
+/*
+ * thread information flags
+ * - these are process state flags that various assembly files may need to access
+ * - pending work-to-be-done flags are in LSW
+ * - other flags in MSW
+ */
+#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_SINGLESTEP		4	/* restore singlestep on return to user mode */
+#define TIF_IRET		5	/* return with iret */
+#define TIF_POLLING_NRFLAG	16	/* true if poll_idle() is polling TIF_NEED_RESCHED */
+
+#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_SINGLESTEP		(1 << TIF_SINGLESTEP)
+#define _TIF_IRET		(1 << TIF_IRET)
+#define _TIF_POLLING_NRFLAG	(1 << TIF_POLLING_NRFLAG)
+
+#define _TIF_WORK_MASK		0x0000FFFE	/* work to do on interrupt/exception return */
+#define _TIF_ALLWORK_MASK	0x0000FFFF	/* work to do on any return to u-space */
+
+/*
+ * Thread-synchronous status.
+ *
+ * This is different from the flags in that nobody else
+ * ever touches our thread-synchronous status, so we don't
+ * have to worry about atomic accesses.
+ */
+#define TS_USEDFPM		0x0001	/* FPU/Media was used by this task this quantum (SMP) */
+
+#endif /* __KERNEL__ */
+
+#endif /* _ASM_THREAD_INFO_H */
diff -Nru a/include/asm-frv/timer-regs.h b/include/asm-frv/timer-regs.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/timer-regs.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,106 @@
+/* timer-regs.h: hardware timer register definitions
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+#ifndef _ASM_TIMER_REGS_H
+#define _ASM_TIMER_REGS_H
+
+#include <asm/sections.h>
+
+extern unsigned long __nongprelbss __clkin_clock_speed_HZ;
+extern unsigned long __nongprelbss __ext_bus_clock_speed_HZ;
+extern unsigned long __nongprelbss __res_bus_clock_speed_HZ;
+extern unsigned long __nongprelbss __sdram_clock_speed_HZ;
+extern unsigned long __nongprelbss __core_bus_clock_speed_HZ;
+extern unsigned long __nongprelbss __core_clock_speed_HZ;
+extern unsigned long __nongprelbss __dsu_clock_speed_HZ;
+extern unsigned long __nongprelbss __serial_clock_speed_HZ;
+
+#define __get_CLKC()	({ *(volatile unsigned long *)(0xfeff9a00); })
+
+static inline void __set_CLKC(unsigned long v)
+{
+	int tmp;
+
+	asm volatile("	st%I0.p	%2,%M0		\n"
+		     "	setlos	%3,%1		\n"
+		     "	membar			\n"
+		     "0:			\n"
+		     "	subicc	%1,#1,%1,icc0	\n"
+		     "	bnc	icc0,#1,0b	\n"
+		     : "=m"(*(volatile unsigned long *) 0xfeff9a00), "=r"(tmp)
+		     : "r"(v), "i"(256)
+		     : "icc0");
+}
+
+#define __get_TCTR()	({ *(volatile unsigned long *)(0xfeff9418); })
+#define __get_TPRV()	({ *(volatile unsigned long *)(0xfeff9420); })
+#define __get_TPRCKSL()	({ *(volatile unsigned long *)(0xfeff9428); })
+#define __get_TCSR(T)	({ *(volatile unsigned long *)(0xfeff9400 + 8 * (T)); })
+#define __get_TxCKSL(T)	({ *(volatile unsigned long *)(0xfeff9430 + 8 * (T)); })
+
+#define __get_TCSR_DATA(T) ({ __get_TCSR(T) >> 24; })
+
+#define __set_TCTR(V)	do { *(volatile unsigned long *)(0xfeff9418) = (V); mb(); } while(0)
+#define __set_TPRV(V)	do { *(volatile unsigned long *)(0xfeff9420) = (V) << 24; mb(); } while(0)
+#define __set_TPRCKSL(V) do { *(volatile unsigned long *)(0xfeff9428) = (V); mb(); } while(0)
+#define __set_TCSR(T,V)	\
+do { *(volatile unsigned long *)(0xfeff9400 + 8 * (T)) = (V); mb(); } while(0)
+
+#define __set_TxCKSL(T,V) \
+do { *(volatile unsigned long *)(0xfeff9430 + 8 * (T)) = (V); mb(); } while(0)
+
+#define __set_TCSR_DATA(T,V) __set_TCSR(T, (V) << 24)
+#define __set_TxCKSL_DATA(T,V) __set_TxCKSL(T, TxCKSL_EIGHT | __TxCKSL_SELECT((V)))
+
+/* clock control register */
+#define CLKC_CMODE		0x0f000000
+#define CLKC_SLPL		0x000f0000
+#define CLKC_P0			0x00000100
+#define CLKC_CM			0x00000003
+
+#define CLKC_CMODE_s		24
+
+/* timer control register - non-readback mode */
+#define TCTR_MODE_0		0x00000000
+#define TCTR_MODE_2		0x04000000
+#define TCTR_MODE_4		0x08000000
+#define TCTR_MODE_5		0x0a000000
+#define TCTR_RL_LATCH		0x00000000
+#define TCTR_RL_RW_LOW8		0x10000000
+#define TCTR_RL_RW_HIGH8	0x20000000
+#define TCTR_RL_RW_LH8		0x30000000
+#define TCTR_SC_CTR0		0x00000000
+#define TCTR_SC_CTR1		0x40000000
+#define TCTR_SC_CTR2		0x80000000
+
+/* timer control register - readback mode */
+#define TCTR_CNT0		0x02000000
+#define TCTR_CNT1		0x04000000
+#define TCTR_CNT2		0x08000000
+#define TCTR_NSTATUS		0x10000000
+#define TCTR_NCOUNT		0x20000000
+#define TCTR_SC_READBACK	0xc0000000
+
+/* timer control status registers - non-readback mode */
+#define TCSRx_DATA		0xff000000
+
+/* timer control status registers - readback mode */
+#define TCSRx_OUTPUT		0x80000000
+#define TCSRx_NULLCOUNT		0x40000000
+#define TCSRx_RL		0x30000000
+#define TCSRx_MODE		0x07000000
+
+/* timer clock select registers */
+#define TxCKSL_SELECT		0x0f000000
+#define __TxCKSL_SELECT(X)	((X) << 24)
+#define TxCKSL_EIGHT		0xf0000000
+
+#endif /* _ASM_TIMER_REGS_H */
diff -Nru a/include/asm-frv/timex.h b/include/asm-frv/timex.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/timex.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,25 @@
+/* timex.h: FR-V architecture timex specifications
+ */
+#ifndef _ASM_TIMEX_H
+#define _ASM_TIMEX_H
+
+#define CLOCK_TICK_RATE		1193180 /* Underlying HZ */
+#define CLOCK_TICK_FACTOR	20	/* Factor of both 1000000 and CLOCK_TICK_RATE */
+
+#define FINETUNE							\
+((((((long)LATCH * HZ - CLOCK_TICK_RATE) << SHIFT_HZ) *			\
+   (1000000/CLOCK_TICK_FACTOR) / (CLOCK_TICK_RATE/CLOCK_TICK_FACTOR))	\
+  << (SHIFT_SCALE-SHIFT_HZ)) / HZ)
+
+typedef unsigned long cycles_t;
+
+static inline cycles_t get_cycles(void)
+{
+	return 0;
+}
+
+#define vxtime_lock()		do {} while (0)
+#define vxtime_unlock()		do {} while (0)
+
+#endif
+
diff -Nru a/include/asm-frv/tlb.h b/include/asm-frv/tlb.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/tlb.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,23 @@
+#ifndef _ASM_TLB_H
+#define _ASM_TLB_H
+
+#include <asm/tlbflush.h>
+
+#define check_pgt_cache() do {} while(0)
+
+/*
+ * we don't need any special per-pte or per-vma handling...
+ */
+#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, address)	do { } while (0)
+
+/*
+ * .. because we flush the whole mm when it fills up
+ */
+#define tlb_flush(tlb)		flush_tlb_mm((tlb)->mm)
+
+#include <asm-generic/tlb.h>
+
+#endif /* _ASM_TLB_H */
+
diff -Nru a/include/asm-frv/tlbflush.h b/include/asm-frv/tlbflush.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/tlbflush.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,76 @@
+/* tlbflush.h: TLB flushing functions
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+#ifndef _ASM_TLBFLUSH_H
+#define _ASM_TLBFLUSH_H
+
+#include <linux/config.h>
+#include <linux/mm.h>
+#include <asm/processor.h>
+
+#ifdef CONFIG_MMU
+
+#ifndef __ASSEMBLY__
+extern void asmlinkage __flush_tlb_all(void);
+extern void asmlinkage __flush_tlb_mm(unsigned long contextid);
+extern void asmlinkage __flush_tlb_page(unsigned long contextid, unsigned long start);
+extern void asmlinkage __flush_tlb_range(unsigned long contextid,
+					 unsigned long start, unsigned long end);
+#endif /* !__ASSEMBLY__ */
+
+#define flush_tlb_all()				\
+do {						\
+	preempt_disable();			\
+	__flush_tlb_all();			\
+	preempt_enable();			\
+} while(0)
+
+#define flush_tlb_mm(mm)			\
+do {						\
+	preempt_disable();			\
+	__flush_tlb_mm((mm)->context.id);	\
+	preempt_enable();			\
+} while(0)
+
+#define flush_tlb_range(vma,start,end)					\
+do {									\
+	preempt_disable();						\
+	__flush_tlb_range((vma)->vm_mm->context.id, start, end);	\
+	preempt_enable();						\
+} while(0)
+
+#define flush_tlb_page(vma,addr)				\
+do {								\
+	preempt_disable();					\
+	__flush_tlb_page((vma)->vm_mm->context.id, addr);	\
+	preempt_enable();					\
+} while(0)
+
+
+#define __flush_tlb_global()			flush_tlb_all()
+#define flush_tlb()				flush_tlb_all()
+#define flush_tlb_kernel_range(start, end)	flush_tlb_all()
+#define flush_tlb_pgtables(mm,start,end)	asm volatile("movgs gr0,scr0 ! movgs gr0,scr1");
+
+#else
+
+#define flush_tlb()				BUG()
+#define flush_tlb_all()				BUG()
+#define flush_tlb_mm(mm)			BUG()
+#define flush_tlb_page(vma,addr)		BUG()
+#define flush_tlb_range(mm,start,end)		BUG()
+#define flush_tlb_pgtables(mm,start,end)	BUG()
+#define flush_tlb_kernel_range(start, end)	BUG()
+
+#endif
+
+
+#endif /* _ASM_TLBFLUSH_H */
diff -Nru a/include/asm-frv/topology.h b/include/asm-frv/topology.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/topology.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,14 @@
+#ifndef _ASM_TOPOLOGY_H
+#define _ASM_TOPOLOGY_H
+
+#ifdef CONFIG_NUMA
+
+#error NUMA not supported yet
+
+#else /* !CONFIG_NUMA */
+
+#include <asm-generic/topology.h>
+
+#endif /* CONFIG_NUMA */
+
+#endif /* _ASM_TOPOLOGY_H */
diff -Nru a/include/asm-frv/types.h b/include/asm-frv/types.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/types.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,74 @@
+/* types.h: FRV types
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+#ifndef _ASM_TYPES_H
+#define _ASM_TYPES_H
+
+#ifndef __ASSEMBLY__
+
+typedef unsigned short umode_t;
+
+/*
+ * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
+ * header files exported to user space
+ */
+
+typedef __signed__ char __s8;
+typedef unsigned char __u8;
+
+typedef __signed__ short __s16;
+typedef unsigned short __u16;
+
+typedef __signed__ int __s32;
+typedef unsigned int __u32;
+
+#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
+typedef __signed__ long long __s64;
+typedef unsigned long long __u64;
+#endif
+
+#endif /* __ASSEMBLY__ */
+
+/*
+ * These aren't exported outside the kernel to avoid name space clashes
+ */
+#ifdef __KERNEL__
+
+#define BITS_PER_LONG 32
+
+#ifndef __ASSEMBLY__
+
+#include <linux/config.h>
+
+typedef signed char s8;
+typedef unsigned char u8;
+
+typedef signed short s16;
+typedef unsigned short u16;
+
+typedef signed int s32;
+typedef unsigned int u32;
+
+typedef signed long long s64;
+typedef unsigned long long u64;
+typedef u64 u_quad_t;
+
+/* Dma addresses are 32-bits wide.  */
+
+typedef u32 dma_addr_t;
+
+typedef unsigned short kmem_bufctl_t;
+
+#endif /* __ASSEMBLY__ */
+
+#endif /* __KERNEL__ */
+
+#endif /* _ASM_TYPES_H */
diff -Nru a/include/asm-frv/uaccess.h b/include/asm-frv/uaccess.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/uaccess.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,317 @@
+/* uaccess.h: userspace accessor functions
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+#ifndef _ASM_UACCESS_H
+#define _ASM_UACCESS_H
+
+/*
+ * User space memory access functions
+ */
+#include <linux/sched.h>
+#include <linux/mm.h>
+#include <asm/segment.h>
+#include <asm/sections.h>
+
+#define HAVE_ARCH_UNMAPPED_AREA	/* we decide where to put mmaps */
+
+#define __ptr(x) ((unsigned long *)(x))
+
+#define VERIFY_READ	0
+#define VERIFY_WRITE	1
+
+#define __addr_ok(addr) ((unsigned long)(addr) < get_addr_limit())
+
+/*
+ * check that a range of addresses falls within the current address limit
+ */
+static inline int ___range_ok(unsigned long addr, unsigned long size)
+{
+#ifdef CONFIG_MMU
+	int flag = -EFAULT, tmp;
+
+	asm volatile (
+		"	addcc	%3,%2,%1,icc0	\n"	/* set C-flag if addr+size>4GB */
+		"	subcc.p	%1,%4,gr0,icc1	\n"	/* jump if addr+size>limit */
+		"	bc	icc0,#0,0f	\n"
+		"	bhi	icc1,#0,0f	\n"
+		"	setlos	#0,%0		\n"	/* mark okay */
+		"0:				\n"
+		: "=r"(flag), "=&r"(tmp)
+		: "r"(addr), "r"(size), "r"(get_addr_limit()), "0"(flag)
+		);
+
+	return flag;
+
+#else
+
+	if (addr < memory_start ||
+	    addr > memory_end ||
+	    size > memory_end - memory_start ||
+	    addr + size > memory_end)
+		return -EFAULT;
+
+	return 0;
+#endif
+}
+
+#define __range_ok(addr,size) ___range_ok((unsigned long) (addr), (unsigned long) (size))
+
+#define access_ok(type,addr,size) (__range_ok((addr), (size)) == 0)
+#define __access_ok(addr,size) (__range_ok((addr), (size)) == 0)
+
+static inline int verify_area(int type, const void * addr, unsigned long size)
+{
+	return __range_ok(addr, size);
+}
+
+/*
+ * The exception table consists of pairs of addresses: the first is the
+ * address of an instruction that is allowed to fault, and the second is
+ * the address at which the program should continue.  No registers are
+ * modified, so it is entirely up to the continuation code to figure out
+ * what to do.
+ *
+ * All the routines below use bits of fixup code that are out of line
+ * with the main instruction path.  This means when everything is well,
+ * we don't even have to jump over them.  Further, they do not intrude
+ * on our cache or tlb entries.
+ */
+struct exception_table_entry
+{
+	unsigned long insn, fixup;
+};
+
+/* Returns 0 if exception not found and fixup otherwise.  */
+extern unsigned long search_exception_table(unsigned long);
+
+
+/*
+ * These are the main single-value transfer routines.  They automatically
+ * use the right size if we just have the right pointer type.
+ */
+#define __put_user(x, ptr)						\
+({									\
+	int __pu_err = 0;						\
+									\
+	typeof(*(ptr)) __pu_val = (x);					\
+									\
+	switch (sizeof (*(ptr))) {					\
+	case 1:								\
+		__put_user_asm(__pu_err, __pu_val, ptr, "b", "r");	\
+		break;							\
+	case 2:								\
+		__put_user_asm(__pu_err, __pu_val, ptr, "h", "r");	\
+		break;							\
+	case 4:								\
+		__put_user_asm(__pu_err, __pu_val, ptr, "",  "r");	\
+		break;							\
+	case 8:								\
+		__put_user_asm(__pu_err, __pu_val, ptr, "d", "e");	\
+		break;							\
+	default:							\
+		__pu_err = __put_user_bad();				\
+		break;							\
+	}								\
+	__pu_err;							\
+})
+
+#define put_user(x, ptr)			\
+({						\
+	typeof(&*ptr) _p = (ptr);		\
+	int _e;					\
+						\
+	_e = __range_ok(_p, sizeof(*_p));	\
+	if (_e == 0)				\
+		_e = __put_user((x), _p);	\
+	_e;					\
+})
+
+extern int __put_user_bad(void);
+
+/*
+ * Tell gcc we read from memory instead of writing: this is because
+ * we do not write to any memory gcc knows about, so there are no
+ * aliasing issues.
+ */
+
+#ifdef CONFIG_MMU
+
+#define __put_user_asm(err,x,ptr,dsize,constraint)					\
+do {											\
+	asm volatile("1:	st"dsize"%I1	%2,%M1	\n"				\
+		     "2:				\n"				\
+		     ".subsection 2			\n"				\
+		     "3:	setlos		%3,%0	\n"				\
+		     "		bra		2b	\n"				\
+		     ".previous				\n"				\
+		     ".section __ex_table,\"a\"		\n"				\
+		     "		.balign		8	\n"				\
+		     "		.long		1b,3b	\n"				\
+		     ".previous"							\
+		     : "=r" (err)							\
+		     : "m" (*__ptr(ptr)), constraint (x), "i"(-EFAULT), "0"(err)	\
+		     : "memory");							\
+} while (0)
+
+#else
+
+#define __put_user_asm(err,x,ptr,bwl,con)	\
+do {						\
+	asm("	st"bwl"%I0	%1,%M0	\n"	\
+	    "	membar			\n"	\
+	    :					\
+	    : "m" (*__ptr(ptr)), con (x)	\
+	    : "memory");			\
+} while (0)
+
+#endif
+
+/*****************************************************************************/
+/*
+ *
+ */
+#define __get_user(x, ptr)						\
+({									\
+	typeof(*(ptr)) __gu_val = 0;					\
+	int __gu_err = 0;						\
+									\
+	switch (sizeof(*(ptr))) {					\
+	case 1:								\
+		__get_user_asm(__gu_err, __gu_val, ptr, "ub", "=r");	\
+		break;							\
+	case 2:								\
+		__get_user_asm(__gu_err, __gu_val, ptr, "uh", "=r");	\
+		break;							\
+	case 4:								\
+		__get_user_asm(__gu_err, __gu_val, ptr, "", "=r");	\
+		break;							\
+	case 8:								\
+		__get_user_asm(__gu_err, __gu_val, ptr, "d", "=e");	\
+		break;							\
+	default:							\
+		__gu_err = __get_user_bad();				\
+		break;							\
+	}								\
+	(x) = __gu_val;							\
+	__gu_err;							\
+})
+
+#define get_user(x, ptr)			\
+({						\
+	typeof(&*ptr) _p = (ptr);		\
+	int _e;					\
+						\
+	_e = __range_ok(_p, sizeof(*_p));	\
+	if (likely(_e == 0))			\
+		_e = __get_user((x), _p);	\
+	else					\
+		(x) = (typeof(x)) 0;		\
+	_e;					\
+})
+
+extern int __get_user_bad(void);
+
+#ifdef CONFIG_MMU
+
+#define __get_user_asm(err,x,ptr,dtype,constraint)	\
+do {							\
+	asm("1:		ld"dtype"%I2	%M2,%1	\n"	\
+	    "2:					\n"	\
+	    ".subsection 2			\n"	\
+	    "3:		setlos		%3,%0	\n"	\
+	    "		setlos		#0,%1	\n"	\
+	    "		bra		2b	\n"	\
+	    ".previous				\n"	\
+	    ".section __ex_table,\"a\"		\n"	\
+	    "		.balign		8	\n"	\
+	    "		.long		1b,3b	\n"	\
+	    ".previous"					\
+	    : "=r" (err), constraint (x)		\
+	    : "m" (*__ptr(ptr)), "i"(-EFAULT), "0"(err)	\
+	    );						\
+} while(0)
+
+#else
+
+#define __get_user_asm(err,x,ptr,bwl,con)	\
+	asm("	ld"bwl"%I1	%M1,%0	\n"	\
+	    "	membar			\n"	\
+	    : con(x)				\
+	    : "m" (*__ptr(ptr)))
+
+#endif
+
+/*****************************************************************************/
+/*
+ *
+ */
+#ifdef CONFIG_MMU
+extern long __memset_user(void *dst, unsigned long count);
+extern long __memcpy_user(void *dst, const void *src, unsigned long count);
+
+#define clear_user(dst,count)			__memset_user((dst), (count))
+#define __copy_from_user_inatomic(to, from, n)	__memcpy_user((to), (from), (n))
+#define __copy_to_user_inatomic(to, from, n)	__memcpy_user((to), (from), (n))
+
+#else
+
+#define clear_user(dst,count)			(memset((dst), 0, (count)), 0)
+#define __copy_from_user_inatomic(to, from, n)	(memcpy((to), (from), (n)), 0)
+#define __copy_to_user_inatomic(to, from, n)	(memcpy((to), (from), (n)), 0)
+
+#endif
+
+static inline unsigned long __must_check
+__copy_to_user(void __user *to, const void *from, unsigned long n)
+{
+       might_sleep();
+       return __copy_to_user_inatomic(to, from, n);
+}
+
+static inline unsigned long
+__copy_from_user(void *to, const void __user *from, unsigned long n)
+{
+       might_sleep();
+       return __copy_from_user_inatomic(to, from, n);
+}
+
+static inline long copy_from_user(void *to, const void *from, unsigned long n)
+{
+	unsigned long ret = n;
+
+	if (likely(__access_ok(from, n)))
+		ret = __copy_from_user(to, from, n);
+
+	if (unlikely(ret != 0))
+		memset(to + (n - ret), 0, ret);
+
+	return ret;
+}
+
+static inline long copy_to_user(void *to, const void *from, unsigned long n)
+{
+	return likely(__access_ok(to, n)) ? __copy_to_user(to, from, n) : n;
+}
+
+#define copy_to_user_ret(to,from,n,retval)	({ if (copy_to_user(to,from,n)) return retval; })
+#define copy_from_user_ret(to,from,n,retval)	({ if (copy_from_user(to,from,n)) return retval; })
+
+extern long strncpy_from_user(char *dst, const char *src, long count);
+extern long strnlen_user(const char *src, long count);
+
+#define strlen_user(str) strnlen_user(str, 32767)
+
+extern unsigned long search_exception_table(unsigned long addr);
+
+#define copy_to_user_page(vma, page, vaddr, dst, src, len)	memcpy(dst, src, len)
+#define copy_from_user_page(vma, page, vaddr, dst, src, len)	memcpy(dst, src, len)
+
+#endif /* _ASM_UACCESS_H */
diff -Nru a/include/asm-frv/ucontext.h b/include/asm-frv/ucontext.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/ucontext.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,12 @@
+#ifndef _ASM_UCONTEXT_H
+#define _ASM_UCONTEXT_H
+
+struct ucontext {
+	unsigned long		uc_flags;
+	struct ucontext		*uc_link;
+	stack_t			uc_stack;
+	struct sigcontext	uc_mcontext;
+	sigset_t		uc_sigmask;	/* mask last for extensibility */
+};
+
+#endif
diff -Nru a/include/asm-frv/unaligned.h b/include/asm-frv/unaligned.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/unaligned.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,203 @@
+/* unaligned.h: unaligned access handler
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+#ifndef _ASM_UNALIGNED_H
+#define _ASM_UNALIGNED_H
+
+#include <linux/config.h>
+
+/*
+ * Unaligned accesses on uClinux can't be performed in a fault handler - the
+ * CPU detects them as imprecise exceptions making this impossible.
+ *
+ * With the FR451, however, they are precise, and so we used to fix them up in
+ * the memory access fault handler.  However, instruction bundling make this
+ * impractical.  So, now we fall back to using memcpy.
+ */
+#ifdef CONFIG_MMU
+
+/*
+ * The asm statement in the macros below is a way to get GCC to copy a
+ * value from one variable to another without having any clue it's
+ * actually doing so, so that it won't have any idea that the values
+ * in the two variables are related.
+ */
+
+#define get_unaligned(ptr) ({				\
+	typeof((*(ptr))) __x;				\
+	void *__ptrcopy;				\
+	asm("" : "=r" (__ptrcopy) : "0" (ptr));		\
+	memcpy(&__x, __ptrcopy, sizeof(*(ptr)));	\
+	__x;						\
+})
+
+#define put_unaligned(val, ptr) ({			\
+	typeof((*(ptr))) __x = (val);			\
+	void *__ptrcopy;				\
+	asm("" : "=r" (__ptrcopy) : "0" (ptr));		\
+	memcpy(__ptrcopy, &__x, sizeof(*(ptr)));	\
+})
+
+extern int handle_misalignment(unsigned long esr0, unsigned long ear0, unsigned long epcr0);
+
+#else
+
+#define get_unaligned(ptr)							\
+({										\
+	typeof(*(ptr)) x;							\
+	const char *__p = (const char *) (ptr);					\
+										\
+	switch (sizeof(x)) {							\
+	case 1:									\
+		x = *(ptr);							\
+		break;								\
+	case 2:									\
+	{									\
+		uint8_t a;							\
+		asm("	ldub%I2		%M2,%0		\n"			\
+		    "	ldub%I3.p	%M3,%1		\n"			\
+		    "	slli		%0,#8,%0	\n"			\
+		    "	or		%0,%1,%0	\n"			\
+		    : "=&r"(x), "=&r"(a)					\
+		    : "m"(__p[0]),  "m"(__p[1])					\
+		    );								\
+		break;								\
+	}									\
+										\
+	case 4:									\
+	{									\
+		uint8_t a;							\
+		asm("	ldub%I2		%M2,%0		\n"			\
+		    "	ldub%I3.p	%M3,%1		\n"			\
+		    "	slli		%0,#8,%0	\n"			\
+		    "	or		%0,%1,%0	\n"			\
+		    "	ldub%I4.p	%M4,%1		\n"			\
+		    "	slli		%0,#8,%0	\n"			\
+		    "	or		%0,%1,%0	\n"			\
+		    "	ldub%I5.p	%M5,%1		\n"			\
+		    "	slli		%0,#8,%0	\n"			\
+		    "	or		%0,%1,%0	\n"			\
+		    : "=&r"(x), "=&r"(a)					\
+		    : "m"(__p[0]),  "m"(__p[1]), "m"(__p[2]), "m"(__p[3])	\
+		    );								\
+		break;								\
+	}									\
+										\
+	case 8:									\
+	{									\
+		union { uint64_t x; u32 y[2]; } z;				\
+		uint8_t a;							\
+		asm("	ldub%I3		%M3,%0		\n"			\
+		    "	ldub%I4.p	%M4,%2		\n"			\
+		    "	slli		%0,#8,%0	\n"			\
+		    "	or		%0,%2,%0	\n"			\
+		    "	ldub%I5.p	%M5,%2		\n"			\
+		    "	slli		%0,#8,%0	\n"			\
+		    "	or		%0,%2,%0	\n"			\
+		    "	ldub%I6.p	%M6,%2		\n"			\
+		    "	slli		%0,#8,%0	\n"			\
+		    "	or		%0,%2,%0	\n"			\
+		    "	ldub%I7		%M7,%1		\n"			\
+		    "	ldub%I8.p	%M8,%2		\n"			\
+		    "	slli		%1,#8,%1	\n"			\
+		    "	or		%1,%2,%1	\n"			\
+		    "	ldub%I9.p	%M9,%2		\n"			\
+		    "	slli		%1,#8,%1	\n"			\
+		    "	or		%1,%2,%1	\n"			\
+		    "	ldub%I10.p	%M10,%2		\n"			\
+		    "	slli		%1,#8,%1	\n"			\
+		    "	or		%1,%2,%1	\n"			\
+		    : "=&r"(z.y[0]), "=&r"(z.y[1]), "=&r"(a)			\
+		    : "m"(__p[0]), "m"(__p[1]), "m"(__p[2]), "m"(__p[3]),	\
+		      "m"(__p[4]), "m"(__p[5]), "m"(__p[6]), "m"(__p[7])	\
+		    );								\
+		x = z.x;							\
+		break;								\
+	}									\
+										\
+	default:								\
+		x = 0;								\
+		BUG();								\
+		break;								\
+	}									\
+										\
+	x;									\
+})
+
+#define put_unaligned(val, ptr)								\
+do {											\
+	char *__p = (char *) (ptr);							\
+	int x;										\
+											\
+	switch (sizeof(*ptr)) {								\
+	case 2:										\
+	{										\
+		asm("	stb%I1.p	%0,%M1		\n"				\
+		    "	srli		%0,#8,%0	\n"				\
+		    "	stb%I2		%0,%M2		\n"				\
+		    : "=r"(x), "=m"(__p[1]),  "=m"(__p[0])				\
+		    : "0"(val)								\
+		    );									\
+		break;									\
+	}										\
+											\
+	case 4:										\
+	{										\
+		asm("	stb%I1.p	%0,%M1		\n"				\
+		    "	srli		%0,#8,%0	\n"				\
+		    "	stb%I2.p	%0,%M2		\n"				\
+		    "	srli		%0,#8,%0	\n"				\
+		    "	stb%I3.p	%0,%M3		\n"				\
+		    "	srli		%0,#8,%0	\n"				\
+		    "	stb%I4		%0,%M4		\n"				\
+		    : "=r"(x), "=m"(__p[3]),  "=m"(__p[2]), "=m"(__p[1]), "=m"(__p[0])	\
+		    : "0"(val)								\
+		    );									\
+		break;									\
+	}										\
+											\
+	case 8:										\
+	{										\
+		uint32_t __high, __low;							\
+		__high = (uint64_t)val >> 32;						\
+		__low = val & 0xffffffff;						\
+		asm("	stb%I2.p	%0,%M2		\n"				\
+		    "	srli		%0,#8,%0	\n"				\
+		    "	stb%I3.p	%0,%M3		\n"				\
+		    "	srli		%0,#8,%0	\n"				\
+		    "	stb%I4.p	%0,%M4		\n"				\
+		    "	srli		%0,#8,%0	\n"				\
+		    "	stb%I5.p	%0,%M5		\n"				\
+		    "	srli		%0,#8,%0	\n"				\
+		    "	stb%I6.p	%1,%M6		\n"				\
+		    "	srli		%1,#8,%1	\n"				\
+		    "	stb%I7.p	%1,%M7		\n"				\
+		    "	srli		%1,#8,%1	\n"				\
+		    "	stb%I8.p	%1,%M8		\n"				\
+		    "	srli		%1,#8,%1	\n"				\
+		    "	stb%I9		%1,%M9		\n"				\
+		    : "=&r"(__low), "=&r"(__high), "=m"(__p[7]), "=m"(__p[6]), 		\
+		      "=m"(__p[5]), "=m"(__p[4]), "=m"(__p[3]), "=m"(__p[2]), 		\
+		      "=m"(__p[1]), "=m"(__p[0])					\
+		    : "0"(__low), "1"(__high)						\
+		    );									\
+		break;									\
+	}										\
+											\
+        default:									\
+		*(ptr) = (val);								\
+		break;									\
+	}										\
+} while(0)
+
+#endif
+
+#endif
diff -Nru a/include/asm-frv/unistd.h b/include/asm-frv/unistd.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/unistd.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,501 @@
+#ifndef _ASM_UNISTD_H_
+#define _ASM_UNISTD_H_
+
+/*
+ * This file contains the system call numbers.
+ */
+
+#define __NR_restart_syscall      0
+#define __NR_exit		  1
+#define __NR_fork		  2
+#define __NR_read		  3
+#define __NR_write		  4
+#define __NR_open		  5
+#define __NR_close		  6
+#define __NR_waitpid		  7
+#define __NR_creat		  8
+#define __NR_link		  9
+#define __NR_unlink		 10
+#define __NR_execve		 11
+#define __NR_chdir		 12
+#define __NR_time		 13
+#define __NR_mknod		 14
+#define __NR_chmod		 15
+#define __NR_lchown		 16
+#define __NR_break		 17
+#define __NR_oldstat		 18
+#define __NR_lseek		 19
+#define __NR_getpid		 20
+#define __NR_mount		 21
+#define __NR_umount		 22
+#define __NR_setuid		 23
+#define __NR_getuid		 24
+#define __NR_stime		 25
+#define __NR_ptrace		 26
+#define __NR_alarm		 27
+#define __NR_oldfstat		 28
+#define __NR_pause		 29
+#define __NR_utime		 30
+#define __NR_stty		 31
+#define __NR_gtty		 32
+#define __NR_access		 33
+#define __NR_nice		 34
+#define __NR_ftime		 35
+#define __NR_sync		 36
+#define __NR_kill		 37
+#define __NR_rename		 38
+#define __NR_mkdir		 39
+#define __NR_rmdir		 40
+#define __NR_dup		 41
+#define __NR_pipe		 42
+#define __NR_times		 43
+#define __NR_prof		 44
+#define __NR_brk		 45
+#define __NR_setgid		 46
+#define __NR_getgid		 47
+#define __NR_signal		 48
+#define __NR_geteuid		 49
+#define __NR_getegid		 50
+#define __NR_acct		 51
+#define __NR_umount2		 52
+#define __NR_lock		 53
+#define __NR_ioctl		 54
+#define __NR_fcntl		 55
+#define __NR_mpx		 56
+#define __NR_setpgid		 57
+#define __NR_ulimit		 58
+// #define __NR_oldolduname	 /* 59 */ obsolete
+#define __NR_umask		 60
+#define __NR_chroot		 61
+#define __NR_ustat		 62
+#define __NR_dup2		 63
+#define __NR_getppid		 64
+#define __NR_getpgrp		 65
+#define __NR_setsid		 66
+#define __NR_sigaction		 67
+#define __NR_sgetmask		 68
+#define __NR_ssetmask		 69
+#define __NR_setreuid		 70
+#define __NR_setregid		 71
+#define __NR_sigsuspend		 72
+#define __NR_sigpending		 73
+#define __NR_sethostname	 74
+#define __NR_setrlimit		 75
+#define __NR_getrlimit		 76	/* Back compatible 2Gig limited rlimit */
+#define __NR_getrusage		 77
+#define __NR_gettimeofday	 78
+#define __NR_settimeofday	 79
+#define __NR_getgroups		 80
+#define __NR_setgroups		 81
+#define __NR_select		 82
+#define __NR_symlink		 83
+#define __NR_oldlstat		 84
+#define __NR_readlink		 85
+#define __NR_uselib		 86
+#define __NR_swapon		 87
+#define __NR_reboot		 88
+#define __NR_readdir		 89
+// #define __NR_mmap		 90	/* obsolete - not implemented */
+#define __NR_munmap		 91
+#define __NR_truncate		 92
+#define __NR_ftruncate		 93
+#define __NR_fchmod		 94
+#define __NR_fchown		 95
+#define __NR_getpriority	 96
+#define __NR_setpriority	 97
+// #define __NR_profil		 /* 98 */ obsolete
+#define __NR_statfs		 99
+#define __NR_fstatfs		100
+// #define __NR_ioperm		/* 101 */ not supported
+#define __NR_socketcall		102
+#define __NR_syslog		103
+#define __NR_setitimer		104
+#define __NR_getitimer		105
+#define __NR_stat		106
+#define __NR_lstat		107
+#define __NR_fstat		108
+// #define __NR_olduname		/* 109 */ obsolete
+// #define __NR_iopl		/* 110 */ not supported
+#define __NR_vhangup		111
+// #define __NR_idle		/* 112 */ Obsolete
+// #define __NR_vm86old		/* 113 */ not supported
+#define __NR_wait4		114
+#define __NR_swapoff		115
+#define __NR_sysinfo		116
+#define __NR_ipc		117
+#define __NR_fsync		118
+#define __NR_sigreturn		119
+#define __NR_clone		120
+#define __NR_setdomainname	121
+#define __NR_uname		122
+// #define __NR_modify_ldt	/* 123 */ not supported
+#define __NR_cacheflush		123
+#define __NR_adjtimex		124
+#define __NR_mprotect		125
+#define __NR_sigprocmask	126
+#define __NR_create_module	127
+#define __NR_init_module	128
+#define __NR_delete_module	129
+#define __NR_get_kernel_syms	130
+#define __NR_quotactl		131
+#define __NR_getpgid		132
+#define __NR_fchdir		133
+#define __NR_bdflush		134
+#define __NR_sysfs		135
+#define __NR_personality	136
+#define __NR_afs_syscall	137 /* Syscall for Andrew File System */
+#define __NR_setfsuid		138
+#define __NR_setfsgid		139
+#define __NR__llseek		140
+#define __NR_getdents		141
+#define __NR__newselect		142
+#define __NR_flock		143
+#define __NR_msync		144
+#define __NR_readv		145
+#define __NR_writev		146
+#define __NR_getsid		147
+#define __NR_fdatasync		148
+#define __NR__sysctl		149
+#define __NR_mlock		150
+#define __NR_munlock		151
+#define __NR_mlockall		152
+#define __NR_munlockall		153
+#define __NR_sched_setparam		154
+#define __NR_sched_getparam		155
+#define __NR_sched_setscheduler		156
+#define __NR_sched_getscheduler		157
+#define __NR_sched_yield		158
+#define __NR_sched_get_priority_max	159
+#define __NR_sched_get_priority_min	160
+#define __NR_sched_rr_get_interval	161
+#define __NR_nanosleep		162
+#define __NR_mremap		163
+#define __NR_setresuid		164
+#define __NR_getresuid		165
+// #define __NR_vm86		/* 166 */ not supported
+#define __NR_query_module	167
+#define __NR_poll		168
+#define __NR_nfsservctl		169
+#define __NR_setresgid		170
+#define __NR_getresgid		171
+#define __NR_prctl		172
+#define __NR_rt_sigreturn	173
+#define __NR_rt_sigaction	174
+#define __NR_rt_sigprocmask	175
+#define __NR_rt_sigpending	176
+#define __NR_rt_sigtimedwait	177
+#define __NR_rt_sigqueueinfo	178
+#define __NR_rt_sigsuspend	179
+#define __NR_pread		180
+#define __NR_pwrite		181
+#define __NR_chown		182
+#define __NR_getcwd		183
+#define __NR_capget		184
+#define __NR_capset		185
+#define __NR_sigaltstack	186
+#define __NR_sendfile		187
+#define __NR_getpmsg		188	/* some people actually want streams */
+#define __NR_putpmsg		189	/* some people actually want streams */
+#define __NR_vfork		190
+#define __NR_ugetrlimit		191	/* SuS compliant getrlimit */
+#define __NR_mmap2		192
+#define __NR_truncate64		193
+#define __NR_ftruncate64	194
+#define __NR_stat64		195
+#define __NR_lstat64		196
+#define __NR_fstat64		197
+#define __NR_lchown32		198
+#define __NR_getuid32		199
+#define __NR_getgid32		200
+#define __NR_geteuid32		201
+#define __NR_getegid32		202
+#define __NR_setreuid32		203
+#define __NR_setregid32		204
+#define __NR_getgroups32	205
+#define __NR_setgroups32	206
+#define __NR_fchown32		207
+#define __NR_setresuid32	208
+#define __NR_getresuid32	209
+#define __NR_setresgid32	210
+#define __NR_getresgid32	211
+#define __NR_chown32		212
+#define __NR_setuid32		213
+#define __NR_setgid32		214
+#define __NR_setfsuid32		215
+#define __NR_setfsgid32		216
+#define __NR_pivot_root		217
+#define __NR_mincore		218
+#define __NR_madvise		219
+
+#define __NR_getdents64		220
+#define __NR_fcntl64		221
+#define __NR_security		223	/* syscall for security modules */
+#define __NR_gettid		224
+#define __NR_readahead		225
+#define __NR_setxattr		226
+#define __NR_lsetxattr		227
+#define __NR_fsetxattr		228
+#define __NR_getxattr		229
+#define __NR_lgetxattr		230
+#define __NR_fgetxattr		231
+#define __NR_listxattr		232
+#define __NR_llistxattr		233
+#define __NR_flistxattr		234
+#define __NR_removexattr	235
+#define __NR_lremovexattr	236
+#define __NR_fremovexattr	237
+#define __NR_tkill		238
+#define __NR_sendfile64		239
+#define __NR_futex		240
+#define __NR_sched_setaffinity	241
+#define __NR_sched_getaffinity	242
+#define __NR_set_thread_area	243
+#define __NR_get_thread_area	244
+#define __NR_io_setup		245
+#define __NR_io_destroy		246
+#define __NR_io_getevents	247
+#define __NR_io_submit		248
+#define __NR_io_cancel		249
+#define __NR_fadvise64		250
+
+#define __NR_exit_group		252
+#define __NR_lookup_dcookie	253
+#define __NR_epoll_create	254
+#define __NR_epoll_ctl		255
+#define __NR_epoll_wait		256
+#define __NR_remap_file_pages	257
+#define __NR_set_tid_address	258
+#define __NR_timer_create	259
+#define __NR_timer_settime	(__NR_timer_create+1)
+#define __NR_timer_gettime	(__NR_timer_create+2)
+#define __NR_timer_getoverrun	(__NR_timer_create+3)
+#define __NR_timer_delete	(__NR_timer_create+4)
+#define __NR_clock_settime	(__NR_timer_create+5)
+#define __NR_clock_gettime	(__NR_timer_create+6)
+#define __NR_clock_getres	(__NR_timer_create+7)
+#define __NR_clock_nanosleep	(__NR_timer_create+8)
+#define __NR_statfs64		268
+#define __NR_fstatfs64		269
+#define __NR_tgkill		270
+#define __NR_utimes		271
+#define __NR_fadvise64_64	272
+#define __NR_vserver		273
+#define __NR_mbind		274
+#define __NR_get_mempolicy	275
+#define __NR_set_mempolicy	276
+#define __NR_mq_open 		277
+#define __NR_mq_unlink		(__NR_mq_open+1)
+#define __NR_mq_timedsend	(__NR_mq_open+2)
+#define __NR_mq_timedreceive	(__NR_mq_open+3)
+#define __NR_mq_notify		(__NR_mq_open+4)
+#define __NR_mq_getsetattr	(__NR_mq_open+5)
+#define __NR_sys_kexec_load	283
+#define __NR_waitid		284
+/* #define __NR_sys_setaltroot	285 */
+#define __NR_add_key		286
+#define __NR_request_key	287
+#define __NR_keyctl		288
+#define __NR_vperfctr_open	289
+#define __NR_vperfctr_control	(__NR_perfctr_info+1)
+#define __NR_vperfctr_unlink	(__NR_perfctr_info+2)
+#define __NR_vperfctr_iresume	(__NR_perfctr_info+3)
+#define __NR_vperfctr_read	(__NR_perfctr_info+4)
+
+#define NR_syscalls 294
+
+/*
+ * process the return value of a syscall, consigning it to one of two possible fates
+ * - user-visible error numbers are in the range -1 - -4095: see <asm-frv/errno.h>
+ */
+#undef __syscall_return
+#define __syscall_return(type, res)					\
+do {									\
+        unsigned long __sr2 = (res);					\
+	if (__builtin_expect(__sr2 >= (unsigned long)(-4095), 0)) {	\
+		errno = (-__sr2);					\
+		__sr2 = ULONG_MAX;					\
+	}								\
+	return (type) __sr2;						\
+} while (0)
+
+/* XXX - _foo needs to be __foo, while __NR_bar could be _NR_bar. */
+
+#undef _syscall0
+#define _syscall0(type,name)						\
+type name(void)								\
+{									\
+	register unsigned long __scnum __asm__ ("gr7") = (__NR_##name);	\
+	register unsigned long __sc0 __asm__ ("gr8");			\
+	__asm__ __volatile__ ("tira gr0,#0"				\
+			      : "=r" (__sc0)				\
+			      : "r" (__scnum));				\
+	__syscall_return(type, __sc0);					\
+}
+
+#undef _syscall1
+#define _syscall1(type,name,type1,arg1)						\
+type name(type1 arg1)								\
+{										\
+	register unsigned long __scnum __asm__ ("gr7") = (__NR_##name);		\
+	register unsigned long __sc0 __asm__ ("gr8") = (unsigned long) arg1;	\
+	__asm__ __volatile__ ("tira gr0,#0"					\
+			      : "+r" (__sc0)					\
+			      : "r" (__scnum));					\
+	__syscall_return(type, __sc0);						\
+}
+
+#undef _syscall2
+#define _syscall2(type,name,type1,arg1,type2,arg2)				\
+type name(type1 arg1,type2 arg2)						\
+{										\
+	register unsigned long __scnum __asm__ ("gr7") = (__NR_##name);		\
+	register unsigned long __sc0 __asm__ ("gr8") = (unsigned long) arg1;	\
+	register unsigned long __sc1 __asm__ ("gr9") = (unsigned long) arg2;	\
+	__asm__ __volatile__ ("tira gr0,#0"					\
+			      : "+r" (__sc0)					\
+			      : "r" (__scnum), "r" (__sc1));			\
+	__syscall_return(type, __sc0);						\
+}
+
+#undef _syscall3
+#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3)			\
+type name(type1 arg1,type2 arg2,type3 arg3)					\
+{										\
+	register unsigned long __scnum __asm__ ("gr7") = (__NR_##name);		\
+	register unsigned long __sc0 __asm__ ("gr8") = (unsigned long) arg1;	\
+	register unsigned long __sc1 __asm__ ("gr9") = (unsigned long) arg2;	\
+	register unsigned long __sc2 __asm__ ("gr10") = (unsigned long) arg3;	\
+	__asm__ __volatile__ ("tira gr0,#0"					\
+			      : "+r" (__sc0)					\
+			      : "r" (__scnum), "r" (__sc1), "r" (__sc2));	\
+	__syscall_return(type, __sc0);						\
+}
+
+#undef _syscall4
+#define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4)		\
+type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4)				\
+{											\
+	register unsigned long __scnum __asm__ ("gr7") = (__NR_##name);			\
+	register unsigned long __sc0 __asm__ ("gr8") = (unsigned long) arg1;		\
+	register unsigned long __sc1 __asm__ ("gr9") = (unsigned long) arg2;		\
+	register unsigned long __sc2 __asm__ ("gr10") = (unsigned long) arg3;		\
+	register unsigned long __sc3 __asm__ ("gr11") = (unsigned long) arg4;		\
+	__asm__ __volatile__ ("tira gr0,#0"						\
+			      : "+r" (__sc0)						\
+			      : "r" (__scnum), "r" (__sc1), "r" (__sc2), "r" (__sc3));	\
+	__syscall_return(type, __sc0);							\
+}
+
+#undef _syscall5
+#define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5)	\
+type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5)			\
+{											\
+	register unsigned long __scnum __asm__ ("gr7") = (__NR_##name);			\
+	register unsigned long __sc0 __asm__ ("gr8") = (unsigned long) arg1;		\
+	register unsigned long __sc1 __asm__ ("gr9") = (unsigned long) arg2;		\
+	register unsigned long __sc2 __asm__ ("gr10") = (unsigned long) arg3;		\
+	register unsigned long __sc3 __asm__ ("gr11") = (unsigned long) arg4;		\
+	register unsigned long __sc4 __asm__ ("gr12") = (unsigned long) arg5;		\
+	__asm__ __volatile__ ("tira gr0,#0"						\
+			      : "+r" (__sc0)						\
+			      : "r" (__scnum), "r" (__sc1), "r" (__sc2),		\
+			      "r" (__sc3), "r" (__sc4));				\
+	__syscall_return(type, __sc0);							\
+}
+
+#undef _syscall6
+#define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5, type6, arg6) \
+type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6)		 \
+{												 \
+	register unsigned long __scnum __asm__ ("gr7") = (__NR_##name);				 \
+	register unsigned long __sc0 __asm__ ("gr8") = (unsigned long) arg1;			 \
+	register unsigned long __sc1 __asm__ ("gr9") = (unsigned long) arg2;			 \
+	register unsigned long __sc2 __asm__ ("gr10") = (unsigned long) arg3;			 \
+	register unsigned long __sc3 __asm__ ("gr11") = (unsigned long) arg4;			 \
+	register unsigned long __sc4 __asm__ ("gr12") = (unsigned long) arg5;			 \
+	register unsigned long __sc5 __asm__ ("gr13") = (unsigned long) arg6;			 \
+	__asm__ __volatile__ ("tira gr0,#0"							 \
+			      : "+r" (__sc0)							 \
+			      : "r" (__scnum), "r" (__sc1), "r" (__sc2),			 \
+			      "r" (__sc3), "r" (__sc4), "r" (__sc5));				 \
+	__syscall_return(type, __sc0);								 \
+}
+
+
+#ifdef __KERNEL_SYSCALLS__
+
+#include <linux/compiler.h>
+#include <linux/types.h>
+#include <linux/linkage.h>
+#include <asm/ptrace.h>
+
+/*
+ * we need this inline - forking from kernel space will result
+ * in NO COPY ON WRITE (!!!), until an execve is executed. This
+ * is no problem, but for the stack. This is handled by not letting
+ * main() use the stack at all after fork(). Thus, no function
+ * calls - which means inline code for fork too, as otherwise we
+ * would use the stack upon exit from 'fork()'.
+ *
+ * Actually only pause and fork are needed inline, so that there
+ * won't be any messing with the stack from main(), but we define
+ * some others too.
+ */
+#define __NR__exit __NR_exit
+static inline _syscall0(int,pause)
+static inline _syscall0(int,sync)
+static inline _syscall0(pid_t,setsid)
+static inline _syscall3(int,write,int,fd,const char *,buf,off_t,count)
+static inline _syscall3(int,read,int,fd,char *,buf,off_t,count)
+static inline _syscall3(off_t,lseek,int,fd,off_t,offset,int,count)
+static inline _syscall1(int,dup,int,fd)
+static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp)
+static inline _syscall3(int,open,const char *,file,int,flag,int,mode)
+static inline _syscall1(int,close,int,fd)
+static inline _syscall1(int,_exit,int,exitcode)
+static inline _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options)
+static inline _syscall1(int,delete_module,const char *,name)
+
+static inline pid_t wait(int * wait_stat)
+{
+	return waitpid(-1,wait_stat,0);
+}
+
+#endif
+
+#ifdef __KERNEL__
+#define __ARCH_WANT_IPC_PARSE_VERSION
+/* #define __ARCH_WANT_OLD_READDIR */
+#define __ARCH_WANT_OLD_STAT
+#define __ARCH_WANT_STAT64
+#define __ARCH_WANT_SYS_ALARM
+/* #define __ARCH_WANT_SYS_GETHOSTNAME */
+#define __ARCH_WANT_SYS_PAUSE
+/* #define __ARCH_WANT_SYS_SGETMASK */
+/* #define __ARCH_WANT_SYS_SIGNAL */
+#define __ARCH_WANT_SYS_TIME
+#define __ARCH_WANT_SYS_UTIME
+#define __ARCH_WANT_SYS_WAITPID
+#define __ARCH_WANT_SYS_SOCKETCALL
+#define __ARCH_WANT_SYS_FADVISE64
+#define __ARCH_WANT_SYS_GETPGRP
+#define __ARCH_WANT_SYS_LLSEEK
+#define __ARCH_WANT_SYS_NICE
+/* #define __ARCH_WANT_SYS_OLD_GETRLIMIT */
+#define __ARCH_WANT_SYS_OLDUMOUNT
+/* #define __ARCH_WANT_SYS_SIGPENDING */
+#define __ARCH_WANT_SYS_SIGPROCMASK
+#define __ARCH_WANT_SYS_RT_SIGACTION
+#endif
+
+/*
+ * "Conditional" syscalls
+ *
+ * What we want is __attribute__((weak,alias("sys_ni_syscall"))),
+ * but it doesn't work on all toolchains, so we just do it by hand
+ */
+#ifndef cond_syscall
+#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
+#endif
+
+#endif /* _ASM_UNISTD_H_ */
diff -Nru a/include/asm-frv/user.h b/include/asm-frv/user.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/user.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,80 @@
+/* user.h: FR-V core file format stuff
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+#ifndef _ASM_USER_H
+#define _ASM_USER_H
+
+#include <asm/page.h>
+#include <asm/registers.h>
+
+/* Core file format: The core file is written in such a way that gdb
+ * can understand it and provide useful information to the user (under
+ * linux we use the 'trad-core' bfd).  There are quite a number of
+ * obstacles to being able to view the contents of the floating point
+ * registers, and until these are solved you will not be able to view
+ * the contents of them.  Actually, you can read in the core file and
+ * look at the contents of the user struct to find out what the
+ * floating point registers contain.
+ *
+ * The actual file contents are as follows:
+ * UPAGE:
+ *   1 page consisting of a user struct that tells gdb what is present
+ *   in the file.  Directly after this is a copy of the task_struct,
+ *   which is currently not used by gdb, but it may come in useful at
+ *   some point.  All of the registers are stored as part of the
+ *   upage.  The upage should always be only one page.
+ *
+ * DATA:
+ *   The data area is stored.  We use current->end_text to
+ *   current->brk to pick up all of the user variables, plus any
+ *   memory that may have been malloced.  No attempt is made to
+ *   determine if a page is demand-zero or if a page is totally
+ *   unused, we just cover the entire range.  All of the addresses are
+ *   rounded in such a way that an integral number of pages is
+ *   written.
+ *
+ * STACK:
+ *   We need the stack information in order to get a meaningful
+ *   backtrace.  We need to write the data from (esp) to
+ *   current->start_stack, so we round each of these off in order to
+ *   be able to write an integer number of pages.  The minimum core
+ *   file size is 3 pages, or 12288 bytes.
+ */
+
+/* When the kernel dumps core, it starts by dumping the user struct -
+ * this will be used by gdb to figure out where the data and stack segments
+ *  are within the file, and what virtual addresses to use.
+ */
+struct user {
+	/* We start with the registers, to mimic the way that "memory" is returned
+	 * from the ptrace(3,...) function.  */
+	struct user_context	regs;
+
+	/* The rest of this junk is to help gdb figure out what goes where */
+	unsigned long		u_tsize;	/* Text segment size (pages). */
+	unsigned long		u_dsize;	/* Data segment size (pages). */
+	unsigned long		u_ssize;	/* Stack segment size (pages). */
+	unsigned long		start_code;     /* Starting virtual address of text. */
+	unsigned long		start_stack;	/* Starting virtual address of stack area.
+						 * This is actually the bottom of the stack,
+						 * the top of the stack is always found in the
+						 * esp register.  */
+	long int		signal;		/* Signal that caused the core dump. */
+
+	unsigned long		magic;		/* To uniquely identify a core file */
+	char			u_comm[32];	/* User command that was responsible */
+};
+
+#define NBPG			PAGE_SIZE
+#define UPAGES			1
+#define HOST_TEXT_START_ADDR	(u.start_code)
+#define HOST_STACK_END_ADDR	(u.start_stack + u.u_ssize * NBPG)
+
+#endif
diff -Nru a/include/asm-frv/virtconvert.h b/include/asm-frv/virtconvert.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-frv/virtconvert.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,42 @@
+/* virtconvert.h: virtual/physical/page address convertion
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+#ifndef _ASM_VIRTCONVERT_H
+#define _ASM_VIRTCONVERT_H
+
+/*
+ * Macros used for converting between virtual and physical mappings.
+ */
+
+#ifdef __KERNEL__
+
+#include <linux/config.h>
+#include <asm/setup.h>
+
+#ifdef CONFIG_MMU
+
+#define phys_to_virt(vaddr)	((void *) ((unsigned long)(vaddr) + PAGE_OFFSET))
+#define virt_to_phys(vaddr)	((unsigned long) (vaddr) - PAGE_OFFSET)
+
+#else
+
+#define phys_to_virt(vaddr)	((void *) (vaddr))
+#define virt_to_phys(vaddr)	((unsigned long) (vaddr))
+
+#endif
+
+#define virt_to_bus virt_to_phys
+#define bus_to_virt phys_to_virt
+
+#define __page_address(page)	(PAGE_OFFSET + (((page) - mem_map) << PAGE_SHIFT))
+#define page_to_phys(page)	virt_to_phys((void *)__page_address(page))
+
+#endif
+#endif
diff -Nru a/include/asm-generic/4level-fixup.h b/include/asm-generic/4level-fixup.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-generic/4level-fixup.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,34 @@
+#ifndef _4LEVEL_FIXUP_H
+#define _4LEVEL_FIXUP_H
+
+#define __ARCH_HAS_4LEVEL_HACK
+
+#define PUD_SIZE			PGDIR_SIZE
+#define PUD_MASK			PGDIR_MASK
+#define PTRS_PER_PUD			1
+
+#define pud_t				pgd_t
+
+#define pmd_alloc(mm, pud, address)			\
+({	pmd_t *ret;					\
+	if (pgd_none(*pud))				\
+ 		ret = __pmd_alloc(mm, pud, address);	\
+ 	else						\
+		ret = pmd_offset(pud, address);		\
+ 	ret;						\
+})
+
+#define pud_alloc(mm, pgd, address)	(pgd)
+#define pud_offset(pgd, start)		(pgd)
+#define pud_none(pud)			0
+#define pud_bad(pud)			0
+#define pud_present(pud)		1
+#define pud_ERROR(pud)			do { } while (0)
+#define pud_clear(pud)			do { } while (0)
+
+#undef pud_free_tlb
+#define pud_free_tlb(tlb, x)            do { } while (0)
+#define pud_free(x)			do { } while (0)
+#define __pud_free_tlb(tlb, x)		do { } while (0)
+
+#endif
diff -Nru a/include/asm-generic/pgtable-nopmd.h b/include/asm-generic/pgtable-nopmd.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-generic/pgtable-nopmd.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,60 @@
+#ifndef _PGTABLE_NOPMD_H
+#define _PGTABLE_NOPMD_H
+
+#ifndef __ASSEMBLY__
+
+#include <asm-generic/pgtable-nopud.h>
+
+/*
+ * Having the pmd type consist of a pud gets the size right, and allows
+ * us to conceptually access the pud entry that this pmd is folded into
+ * without casting.
+ */
+typedef struct { pud_t pud; } pmd_t;
+
+#define PMD_SHIFT	PUD_SHIFT
+#define PTRS_PER_PMD	1
+#define PMD_SIZE  	(1UL << PMD_SHIFT)
+#define PMD_MASK  	(~(PMD_SIZE-1))
+
+/*
+ * The "pud_xxx()" functions here are trivial for a folded two-level
+ * setup: the pmd is never bad, and a pmd always exists (as it's folded
+ * into the pud entry)
+ */
+static inline int pud_none(pud_t pud)		{ return 0; }
+static inline int pud_bad(pud_t pud)		{ return 0; }
+static inline int pud_present(pud_t pud)	{ return 1; }
+static inline void pud_clear(pud_t *pud)	{ }
+#define pmd_ERROR(pmd)				(pud_ERROR((pmd).pud))
+
+#define pud_populate(mm, pmd, pte)		do { } while (0)
+
+/*
+ * (pmds are folded into puds so this doesn't get actually called,
+ * but the define is needed for a generic inline function.)
+ */
+#define set_pud(pudptr, pudval)			set_pmd((pmd_t *)(pudptr), (pmd_t) { pudval })
+
+static inline pmd_t * pmd_offset(pud_t * pud, unsigned long address)
+{
+	return (pmd_t *)pud;
+}
+
+#define pmd_val(x)				(pud_val((x).pud))
+#define __pmd(x)				((pmd_t) { __pud(x) } )
+
+#define pud_page(pud)				(pmd_page((pmd_t){ pud }))
+#define pud_page_kernel(pud)			(pmd_page_kernel((pmd_t){ pud }))
+
+/*
+ * allocating and freeing a pmd is trivial: the 1-entry pmd is
+ * inside the pud, so has no extra memory associated with it.
+ */
+#define pmd_alloc_one(mm, address)		NULL
+#define pmd_free(x)				do { } while (0)
+#define __pmd_free_tlb(tlb, x)			do { } while (0)
+
+#endif /* __ASSEMBLY__ */
+
+#endif /* _PGTABLE_NOPMD_H */
diff -Nru a/include/asm-generic/pgtable-nopud.h b/include/asm-generic/pgtable-nopud.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-generic/pgtable-nopud.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,56 @@
+#ifndef _PGTABLE_NOPUD_H
+#define _PGTABLE_NOPUD_H
+
+#ifndef __ASSEMBLY__
+
+/*
+ * Having the pud type consist of a pgd gets the size right, and allows
+ * us to conceptually access the pgd entry that this pud is folded into
+ * without casting.
+ */
+typedef struct { pgd_t pgd; } pud_t;
+
+#define PUD_SHIFT	PGDIR_SHIFT
+#define PTRS_PER_PUD	1
+#define PUD_SIZE  	(1UL << PUD_SHIFT)
+#define PUD_MASK  	(~(PUD_SIZE-1))
+
+/*
+ * The "pgd_xxx()" functions here are trivial for a folded two-level
+ * setup: the pud is never bad, and a pud always exists (as it's folded
+ * into the pgd entry)
+ */
+static inline int pgd_none(pgd_t pgd)		{ return 0; }
+static inline int pgd_bad(pgd_t pgd)		{ return 0; }
+static inline int pgd_present(pgd_t pgd)	{ return 1; }
+static inline void pgd_clear(pgd_t *pgd)	{ }
+#define pud_ERROR(pud)				(pgd_ERROR((pud).pgd))
+
+#define pgd_populate(mm, pgd, pud)		do { } while (0)
+/*
+ * (puds are folded into pgds so this doesn't get actually called,
+ * but the define is needed for a generic inline function.)
+ */
+#define set_pgd(pgdptr, pgdval)			set_pud((pud_t *)(pgdptr), (pud_t) { pgdval })
+
+static inline pud_t * pud_offset(pgd_t * pgd, unsigned long address)
+{
+	return (pud_t *)pgd;
+}
+
+#define pud_val(x)				(pgd_val((x).pgd))
+#define __pud(x)				((pud_t) { __pgd(x) } )
+
+#define pgd_page(pgd)				(pud_page((pud_t){ pgd }))
+#define pgd_page_kernel(pgd)			(pud_page_kernel((pud_t){ pgd }))
+
+/*
+ * allocating and freeing a pud is trivial: the 1-entry pud is
+ * inside the pgd, so has no extra memory associated with it.
+ */
+#define pud_alloc_one(mm, address)		NULL
+#define pud_free(x)				do { } while (0)
+#define __pud_free_tlb(tlb, x)			do { } while (0)
+
+#endif /* __ASSEMBLY__ */
+#endif /* _PGTABLE_NOPUD_H */
diff -Nru a/include/asm-generic/sections.h b/include/asm-generic/sections.h
--- a/include/asm-generic/sections.h	2005-01-10 20:11:15 -08:00
+++ b/include/asm-generic/sections.h	2005-01-10 20:11:15 -08:00
@@ -8,5 +8,6 @@
 extern char __bss_start[], __bss_stop[];
 extern char __init_begin[], __init_end[];
 extern char _sinittext[], _einittext[];
+extern char _end[];
 
 #endif /* _ASM_GENERIC_SECTIONS_H_ */
diff -Nru a/include/asm-generic/siginfo.h b/include/asm-generic/siginfo.h
--- a/include/asm-generic/siginfo.h	2005-01-10 20:11:17 -08:00
+++ b/include/asm-generic/siginfo.h	2005-01-10 20:11:17 -08:00
@@ -154,7 +154,6 @@
 #define SI_FROMUSER(siptr)	((siptr)->si_code <= 0)
 #define SI_FROMKERNEL(siptr)	((siptr)->si_code > 0)
 
-#ifndef HAVE_ARCH_SI_CODES
 /*
  * SIGILL si_codes
  */
@@ -225,8 +224,6 @@
 #define POLL_HUP	(__SI_POLL|6)	/* device disconnected */
 #define NSIGPOLL	6
 
-#endif
-
 /*
  * sigevent definitions
  * 
@@ -245,8 +242,6 @@
 #define SIGEV_PAD_SIZE	((SIGEV_MAX_SIZE/sizeof(int)) - 3)
 #endif
 
-#ifndef HAVE_ARCH_SIGEVENT_T
-
 typedef struct sigevent {
 	sigval_t sigev_value;
 	int sigev_signo;
@@ -261,8 +256,6 @@
 		} _sigev_thread;
 	} _sigev_un;
 } sigevent_t;
-
-#endif
 
 #define sigev_notify_function	_sigev_un._sigev_thread._function
 #define sigev_notify_attributes	_sigev_un._sigev_thread._attribute
diff -Nru a/include/asm-generic/termios.h b/include/asm-generic/termios.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-generic/termios.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,69 @@
+/* termios.h: generic termios/termio user copying/translation
+ */
+
+#ifndef _ASM_GENERIC_TERMIOS_H
+#define _ASM_GENERIC_TERMIOS_H
+
+#include <asm/uaccess.h>
+
+#ifndef __ARCH_TERMIO_GETPUT
+
+/*
+ * Translate a "termio" structure into a "termios". Ugh.
+ */
+static inline int user_termio_to_kernel_termios(struct termios *termios,
+						struct termio __user *termio)
+{
+	unsigned short tmp;
+
+	if (get_user(tmp, &termio->c_iflag) < 0)
+		goto fault;
+	termios->c_iflag = (0xffff0000 & termios->c_iflag) | tmp;
+
+	if (get_user(tmp, &termio->c_oflag) < 0)
+		goto fault;
+	termios->c_oflag = (0xffff0000 & termios->c_oflag) | tmp;
+
+	if (get_user(tmp, &termio->c_cflag) < 0)
+		goto fault;
+	termios->c_cflag = (0xffff0000 & termios->c_cflag) | tmp;
+
+	if (get_user(tmp, &termio->c_lflag) < 0)
+		goto fault;
+	termios->c_lflag = (0xffff0000 & termios->c_lflag) | tmp;
+
+	if (get_user(termios->c_line, &termio->c_line) < 0)
+		goto fault;
+
+	if (copy_from_user(termios->c_cc, termio->c_cc, NCC) != 0)
+		goto fault;
+
+	return 0;
+
+ fault:
+	return -EFAULT;
+}
+
+/*
+ * Translate a "termios" structure into a "termio". Ugh.
+ */
+static inline int kernel_termios_to_user_termio(struct termio __user *termio,
+						struct termios *termios)
+{
+	if (put_user(termios->c_iflag, &termio->c_iflag) < 0 ||
+	    put_user(termios->c_oflag, &termio->c_oflag) < 0 ||
+	    put_user(termios->c_cflag, &termio->c_cflag) < 0 ||
+	    put_user(termios->c_lflag, &termio->c_lflag) < 0 ||
+	    put_user(termios->c_line,  &termio->c_line) < 0 ||
+	    copy_to_user(termio->c_cc, termios->c_cc, NCC) != 0)
+		return -EFAULT;
+
+	return 0;
+}
+
+#define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios))
+#define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios))
+
+#endif	/* __ARCH_TERMIO_GETPUT */
+
+#endif /* _ASM_GENERIC_TERMIOS_H */
diff -Nru a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h
--- a/include/asm-generic/tlb.h	2005-01-10 20:11:15 -08:00
+++ b/include/asm-generic/tlb.h	2005-01-10 20:11:15 -08:00
@@ -141,6 +141,14 @@
 		__pte_free_tlb(tlb, ptep);			\
 	} while (0)
 
+#ifndef __ARCH_HAS_4LEVEL_HACK
+#define pud_free_tlb(tlb, pudp)					\
+	do {							\
+		tlb->need_flush = 1;				\
+		__pud_free_tlb(tlb, pudp);			\
+	} while (0)
+#endif
+
 #define pmd_free_tlb(tlb, pmdp)					\
 	do {							\
 		tlb->need_flush = 1;				\
diff -Nru a/include/asm-h8300/hardirq.h b/include/asm-h8300/hardirq.h
--- a/include/asm-h8300/hardirq.h	2005-01-10 20:11:19 -08:00
+++ b/include/asm-h8300/hardirq.h	2005-01-10 20:11:19 -08:00
@@ -9,8 +9,6 @@
 
 typedef struct {
 	unsigned int __softirq_pending;
-	unsigned int __syscall_count;
-	struct task_struct * __ksoftirqd_task;
 } ____cacheline_aligned irq_cpustat_t;
 
 #include <linux/irq_cpustat.h>	/* Standard mappings for irq_cpustat_t above */
@@ -25,14 +23,5 @@
 #if (1 << HARDIRQ_BITS) < NR_IRQS
 # error HARDIRQ_BITS is too low!
 #endif
-
-#define irq_enter()		(preempt_count() += HARDIRQ_OFFSET)
-#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)
 
 #endif
diff -Nru a/include/asm-h8300/pgtable.h b/include/asm-h8300/pgtable.h
--- a/include/asm-h8300/pgtable.h	2005-01-10 20:11:18 -08:00
+++ b/include/asm-h8300/pgtable.h	2005-01-10 20:11:18 -08:00
@@ -1,6 +1,8 @@
 #ifndef _H8300_PGTABLE_H
 #define _H8300_PGTABLE_H
 
+#include <asm-generic/4level-fixup.h>
+
 #include <linux/config.h>
 #include <linux/slab.h>
 #include <asm/processor.h>
diff -Nru a/include/asm-h8300/processor.h b/include/asm-h8300/processor.h
--- a/include/asm-h8300/processor.h	2005-01-10 20:11:16 -08:00
+++ b/include/asm-h8300/processor.h	2005-01-10 20:11:16 -08:00
@@ -45,11 +45,6 @@
  */
 #define TASK_UNMAPPED_BASE	0
 
-/*
- * Bus types
- */
-#define MCA_bus 0
-
 struct thread_struct {
 	unsigned long  ksp;		/* kernel stack pointer */
 	unsigned long  usp;		/* user stack pointer */
diff -Nru a/include/asm-h8300/unistd.h b/include/asm-h8300/unistd.h
--- a/include/asm-h8300/unistd.h	2005-01-10 20:11:19 -08:00
+++ b/include/asm-h8300/unistd.h	2005-01-10 20:11:19 -08:00
@@ -270,8 +270,29 @@
 #define __NR_clock_gettime	(__NR_timer_create+6)
 #define __NR_clock_getres	(__NR_timer_create+7)
 #define __NR_clock_nanosleep	(__NR_timer_create+8)
+#define __NR_statfs64		268
+#define __NR_fstatfs64		269
+#define __NR_tgkill		270
+#define __NR_utimes		271
+#define __NR_fadvise64_64	272
+#define __NR_vserver		273
+#define __NR_mbind		274
+#define __NR_get_mempolicy	275
+#define __NR_set_mempolicy	276
+#define __NR_mq_open 		277
+#define __NR_mq_unlink		(__NR_mq_open+1)
+#define __NR_mq_timedsend	(__NR_mq_open+2)
+#define __NR_mq_timedreceive	(__NR_mq_open+3)
+#define __NR_mq_notify		(__NR_mq_open+4)
+#define __NR_mq_getsetattr	(__NR_mq_open+5)
+#define __NR_sys_kexec_load	283
+#define __NR_waitid		284
+/* #define __NR_sys_setaltroot	285 */
+#define __NR_add_key		286
+#define __NR_request_key	287
+#define __NR_keyctl		288
 
-#define NR_syscalls 268
+#define NR_syscalls 289
 
 
 /* user-visible error numbers are in the range -1 - -122: see
diff -Nru a/include/asm-i386/acpi.h b/include/asm-i386/acpi.h
--- a/include/asm-i386/acpi.h	2005-01-10 20:11:22 -08:00
+++ b/include/asm-i386/acpi.h	2005-01-10 20:11:22 -08:00
@@ -104,12 +104,6 @@
 /*
  * Refer Intel ACPI _PDC support document for bit definitions
  */
-#define ACPI_PDC_EST_CAPABILITY_SMP	0xa
-#define ACPI_PDC_EST_CAPABILITY_MSR	0x1
-
-/*
- * Refer Intel ACPI _PDC support document for bit definitions
- */
 #define ACPI_PDC_EST_CAPABILITY_SMP 	0xa
 #define ACPI_PDC_EST_CAPABILITY_MSR	0x1
 
diff -Nru a/include/asm-i386/agp.h b/include/asm-i386/agp.h
--- a/include/asm-i386/agp.h	2005-01-10 20:11:15 -08:00
+++ b/include/asm-i386/agp.h	2005-01-10 20:11:15 -08:00
@@ -12,8 +12,8 @@
  * data corruption on some CPUs.
  */
 
-#define map_page_into_agp(page) change_page_attr(page, 1, PAGE_KERNEL_NOCACHE)
-#define unmap_page_from_agp(page) change_page_attr(page, 1, PAGE_KERNEL)
+int map_page_into_agp(struct page *page);
+int unmap_page_from_agp(struct page *page);
 #define flush_agp_mappings() global_flush_tlb()
 
 /* Could use CLFLUSH here if the cpu supports it. But then it would
diff -Nru a/include/asm-i386/bug.h b/include/asm-i386/bug.h
--- a/include/asm-i386/bug.h	2005-01-10 20:11:16 -08:00
+++ b/include/asm-i386/bug.h	2005-01-10 20:11:16 -08:00
@@ -9,7 +9,7 @@
  * undefined" opcode for parsing in the trap handler.
  */
 
-#if 1	/* Set to zero for a slightly smaller kernel */
+#ifdef CONFIG_DEBUG_BUGVERBOSE
 #define BUG()				\
  __asm__ __volatile__(	"ud2\n"		\
 			"\t.word %c0\n"	\
diff -Nru a/include/asm-i386/cpu.h b/include/asm-i386/cpu.h
--- a/include/asm-i386/cpu.h	2005-01-10 20:11:20 -08:00
+++ b/include/asm-i386/cpu.h	2005-01-10 20:11:20 -08:00
@@ -12,18 +12,9 @@
 	struct cpu cpu;
 };
 extern struct i386_cpu cpu_devices[NR_CPUS];
-
-
-static inline int arch_register_cpu(int num){
-	struct node *parent = NULL;
-	
-#ifdef CONFIG_NUMA
-	int node = cpu_to_node(num);
-	if (node_online(node))
-		parent = &node_devices[node].node;
-#endif /* CONFIG_NUMA */
-
-	return register_cpu(&cpu_devices[num].cpu, num, parent);
-}
+extern int arch_register_cpu(int num);
+#ifdef CONFIG_HOTPLUG_CPU
+extern void arch_unregister_cpu(int);
+#endif
 
 #endif /* _ASM_I386_CPU_H_ */
diff -Nru a/include/asm-i386/fixmap.h b/include/asm-i386/fixmap.h
--- a/include/asm-i386/fixmap.h	2005-01-10 20:11:16 -08:00
+++ b/include/asm-i386/fixmap.h	2005-01-10 20:11:16 -08:00
@@ -109,7 +109,9 @@
 #define FIXADDR_TOP	((unsigned long)__FIXADDR_TOP)
 
 #define __FIXADDR_SIZE	(__end_of_permanent_fixed_addresses << PAGE_SHIFT)
-#define FIXADDR_START	(FIXADDR_TOP - __FIXADDR_SIZE)
+#define __FIXADDR_BOOT_SIZE	(__end_of_fixed_addresses << PAGE_SHIFT)
+#define FIXADDR_START		(FIXADDR_TOP - __FIXADDR_SIZE)
+#define FIXADDR_BOOT_START	(FIXADDR_TOP - __FIXADDR_BOOT_SIZE)
 
 #define __fix_to_virt(x)	(FIXADDR_TOP - ((x) << PAGE_SHIFT))
 #define __virt_to_fix(x)	((FIXADDR_TOP - ((x)&PAGE_MASK)) >> PAGE_SHIFT)
diff -Nru a/include/asm-i386/highmem.h b/include/asm-i386/highmem.h
--- a/include/asm-i386/highmem.h	2005-01-10 20:11:16 -08:00
+++ b/include/asm-i386/highmem.h	2005-01-10 20:11:16 -08:00
@@ -40,16 +40,27 @@
  * easily, subsequent pte tables have to be allocated in one physical
  * chunk of RAM.
  */
-#if NR_CPUS <= 32
-#define PKMAP_BASE (0xff800000UL)
-#else
-#define PKMAP_BASE (0xff600000UL)
-#endif
 #ifdef CONFIG_X86_PAE
 #define LAST_PKMAP 512
 #else
 #define LAST_PKMAP 1024
 #endif
+/*
+ * Ordering is:
+ *
+ * FIXADDR_TOP
+ * 			fixed_addresses
+ * FIXADDR_START
+ * 			temp fixed addresses
+ * FIXADDR_BOOT_START
+ * 			Persistent kmap area
+ * PKMAP_BASE
+ * VMALLOC_END
+ * 			Vmalloc area
+ * VMALLOC_START
+ * high_memory
+ */
+#define PKMAP_BASE ( (FIXADDR_BOOT_START - PAGE_SIZE*(LAST_PKMAP + 1)) & PMD_MASK )
 #define LAST_PKMAP_MASK (LAST_PKMAP-1)
 #define PKMAP_NR(virt)  ((virt-PKMAP_BASE) >> PAGE_SHIFT)
 #define PKMAP_ADDR(nr)  (PKMAP_BASE + ((nr) << PAGE_SHIFT))
diff -Nru a/include/asm-i386/kprobes.h b/include/asm-i386/kprobes.h
--- a/include/asm-i386/kprobes.h	2005-01-10 20:11:20 -08:00
+++ b/include/asm-i386/kprobes.h	2005-01-10 20:11:20 -08:00
@@ -38,6 +38,8 @@
 	? (MAX_STACK_SIZE) \
 	: (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR)))
 
+#define JPROBE_ENTRY(pentry)	(kprobe_opcode_t *)pentry
+
 /* Architecture specific copy of original instruction*/
 struct arch_specific_insn {
 	/* copy of the original instruction */
diff -Nru a/include/asm-i386/mach-numaq/mach_apic.h b/include/asm-i386/mach-numaq/mach_apic.h
--- a/include/asm-i386/mach-numaq/mach_apic.h	2005-01-10 20:11:18 -08:00
+++ b/include/asm-i386/mach-numaq/mach_apic.h	2005-01-10 20:11:18 -08:00
@@ -112,13 +112,15 @@
 
 static inline void setup_portio_remap(void)
 {
-	if (numnodes <= 1)
+	int num_quads = num_online_nodes();
+
+	if (num_quads <= 1)
        		return;
 
-	printk("Remapping cross-quad port I/O for %d quads\n", numnodes);
-	xquad_portio = ioremap (XQUAD_PORTIO_BASE, numnodes*XQUAD_PORTIO_QUAD);
+	printk("Remapping cross-quad port I/O for %d quads\n", num_quads);
+	xquad_portio = ioremap(XQUAD_PORTIO_BASE, num_quads*XQUAD_PORTIO_QUAD);
 	printk("xquad_portio vaddr 0x%08lx, len %08lx\n",
-		(u_long) xquad_portio, (u_long) numnodes*XQUAD_PORTIO_QUAD);
+		(u_long) xquad_portio, (u_long) num_quads*XQUAD_PORTIO_QUAD);
 }
 
 static inline int check_phys_apicid_present(int boot_cpu_physical_apicid)
diff -Nru a/include/asm-i386/mca.h b/include/asm-i386/mca.h
--- a/include/asm-i386/mca.h	2005-01-10 20:11:18 -08:00
+++ b/include/asm-i386/mca.h	2005-01-10 20:11:18 -08:00
@@ -40,7 +40,4 @@
  */
 #define MCA_NUMADAPTERS (MCA_MAX_SLOT_NR+3)
 
-/* lock to protect access to the MCA registers */
-extern spinlock_t mca_lock;
-
 #endif
diff -Nru a/include/asm-i386/mmzone.h b/include/asm-i386/mmzone.h
--- a/include/asm-i386/mmzone.h	2005-01-10 20:11:19 -08:00
+++ b/include/asm-i386/mmzone.h	2005-01-10 20:11:19 -08:00
@@ -48,12 +48,6 @@
 #endif
 }
 
-static inline struct pglist_data *pfn_to_pgdat(unsigned long pfn)
-{
-	return(NODE_DATA(pfn_to_nid(pfn)));
-}
-
-
 /*
  * Following are macros that are specific to this numa platform.
  */
@@ -116,7 +110,6 @@
 	(unsigned long)(__page - __zone->zone_mem_map)			\
 		+ __zone->zone_start_pfn;				\
 })
-#define pmd_page(pmd)		(pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT))
 
 #ifdef CONFIG_X86_NUMAQ            /* we have contiguous memory on NUMA-Q */
 #define pfn_valid(pfn)          ((pfn) < num_physpages)
diff -Nru a/include/asm-i386/page.h b/include/asm-i386/page.h
--- a/include/asm-i386/page.h	2005-01-10 20:11:16 -08:00
+++ b/include/asm-i386/page.h	2005-01-10 20:11:16 -08:00
@@ -46,11 +46,12 @@
 typedef struct { unsigned long long pmd; } pmd_t;
 typedef struct { unsigned long long pgd; } pgd_t;
 typedef struct { unsigned long long pgprot; } pgprot_t;
+#define pmd_val(x)	((x).pmd)
 #define pte_val(x)	((x).pte_low | ((unsigned long long)(x).pte_high << 32))
+#define __pmd(x) ((pmd_t) { (x) } )
 #define HPAGE_SHIFT	21
 #else
 typedef struct { unsigned long pte_low; } pte_t;
-typedef struct { unsigned long pmd; } pmd_t;
 typedef struct { unsigned long pgd; } pgd_t;
 typedef struct { unsigned long pgprot; } pgprot_t;
 #define boot_pte_t pte_t /* or would you rather have a typedef */
@@ -66,13 +67,10 @@
 #define HAVE_ARCH_HUGETLB_UNMAPPED_AREA
 #endif
 
-
-#define pmd_val(x)	((x).pmd)
 #define pgd_val(x)	((x).pgd)
 #define pgprot_val(x)	((x).pgprot)
 
 #define __pte(x) ((pte_t) { (x) } )
-#define __pmd(x) ((pmd_t) { (x) } )
 #define __pgd(x) ((pgd_t) { (x) } )
 #define __pgprot(x)	((pgprot_t) { (x) } )
 
diff -Nru a/include/asm-i386/pgalloc.h b/include/asm-i386/pgalloc.h
--- a/include/asm-i386/pgalloc.h	2005-01-10 20:11:16 -08:00
+++ b/include/asm-i386/pgalloc.h	2005-01-10 20:11:16 -08:00
@@ -10,16 +10,13 @@
 #define pmd_populate_kernel(mm, pmd, pte) \
 		set_pmd(pmd, __pmd(_PAGE_TABLE + __pa(pte)))
 
-static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, struct page *pte)
-{
-	set_pmd(pmd, __pmd(_PAGE_TABLE +
-		((unsigned long long)page_to_pfn(pte) <<
-			(unsigned long long) PAGE_SHIFT)));
-}
+#define pmd_populate(mm, pmd, pte) 				\
+	set_pmd(pmd, __pmd(_PAGE_TABLE +			\
+		((unsigned long long)page_to_pfn(pte) <<	\
+			(unsigned long long) PAGE_SHIFT)))
 /*
  * Allocate and free page tables.
  */
-
 extern pgd_t *pgd_alloc(struct mm_struct *);
 extern void pgd_free(pgd_t *pgd);
 
@@ -39,16 +36,15 @@
 
 #define __pte_free_tlb(tlb,pte) tlb_remove_page((tlb),(pte))
 
+#ifdef CONFIG_X86_PAE
 /*
- * allocating and freeing a pmd is trivial: the 1-entry pmd is
- * inside the pgd, so has no extra memory associated with it.
- * (In the PAE case we free the pmds as part of the pgd.)
+ * In the PAE case we free the pmds as part of the pgd.
  */
-
 #define pmd_alloc_one(mm, addr)		({ BUG(); ((pmd_t *)2); })
 #define pmd_free(x)			do { } while (0)
 #define __pmd_free_tlb(tlb,x)		do { } while (0)
-#define pgd_populate(mm, pmd, pte)	BUG()
+#define pud_populate(mm, pmd, pte)	BUG()
+#endif
 
 #define check_pgt_cache()	do { } while (0)
 
diff -Nru a/include/asm-i386/pgtable-2level-defs.h b/include/asm-i386/pgtable-2level-defs.h
--- a/include/asm-i386/pgtable-2level-defs.h	2005-01-10 20:11:22 -08:00
+++ b/include/asm-i386/pgtable-2level-defs.h	2005-01-10 20:11:22 -08:00
@@ -12,8 +12,6 @@
  * the i386 is two-level, so we don't really have any
  * PMD directory physically.
  */
-#define PMD_SHIFT	22
-#define PTRS_PER_PMD	1
 
 #define PTRS_PER_PTE	1024
 
diff -Nru a/include/asm-i386/pgtable-2level.h b/include/asm-i386/pgtable-2level.h
--- a/include/asm-i386/pgtable-2level.h	2005-01-10 20:11:19 -08:00
+++ b/include/asm-i386/pgtable-2level.h	2005-01-10 20:11:19 -08:00
@@ -1,44 +1,22 @@
 #ifndef _I386_PGTABLE_2LEVEL_H
 #define _I386_PGTABLE_2LEVEL_H
 
+#include <asm-generic/pgtable-nopmd.h>
+
 #define pte_ERROR(e) \
 	printk("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, (e).pte_low)
-#define pmd_ERROR(e) \
-	printk("%s:%d: bad pmd %08lx.\n", __FILE__, __LINE__, pmd_val(e))
 #define pgd_ERROR(e) \
 	printk("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, pgd_val(e))
 
 /*
- * The "pgd_xxx()" functions here are trivial for a folded two-level
- * setup: the pgd is never bad, and a pmd always exists (as it's folded
- * into the pgd entry)
- */
-static inline int pgd_none(pgd_t pgd)		{ return 0; }
-static inline int pgd_bad(pgd_t pgd)		{ return 0; }
-static inline int pgd_present(pgd_t pgd)	{ return 1; }
-#define pgd_clear(xp)				do { } while (0)
-
-/*
  * Certain architectures need to do special things when PTEs
  * within a page table are directly modified.  Thus, the following
  * hook is made available.
  */
 #define set_pte(pteptr, pteval) (*(pteptr) = pteval)
 #define set_pte_atomic(pteptr, pteval) set_pte(pteptr,pteval)
-/*
- * (pmds are folded into pgds so this doesn't get actually called,
- * but the define is needed for a generic inline function.)
- */
-#define set_pmd(pmdptr, pmdval) (*(pmdptr) = pmdval)
-#define set_pgd(pgdptr, pgdval) (*(pgdptr) = pgdval)
-
-#define pgd_page(pgd) \
-((unsigned long) __va(pgd_val(pgd) & PAGE_MASK))
+#define set_pmd(pmdptr, pmdval) (*(pmdptr) = (pmdval))
 
-static inline pmd_t * pmd_offset(pgd_t * dir, unsigned long address)
-{
-	return (pmd_t *) dir;
-}
 #define ptep_get_and_clear(xp)	__pte(xchg(&(xp)->pte_low, 0))
 #define pte_same(a, b)		((a).pte_low == (b).pte_low)
 #define pte_page(x)		pfn_to_page(pte_pfn(x))
@@ -46,6 +24,11 @@
 #define pte_pfn(x)		((unsigned long)(((x).pte_low >> PAGE_SHIFT)))
 #define pfn_pte(pfn, prot)	__pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot))
 #define pfn_pmd(pfn, prot)	__pmd(((pfn) << PAGE_SHIFT) | pgprot_val(prot))
+
+#define pmd_page(pmd) (pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT))
+
+#define pmd_page_kernel(pmd) \
+((unsigned long) __va(pmd_val(pmd) & PAGE_MASK))
 
 /*
  * All present user pages are user-executable:
diff -Nru a/include/asm-i386/pgtable-3level.h b/include/asm-i386/pgtable-3level.h
--- a/include/asm-i386/pgtable-3level.h	2005-01-10 20:11:21 -08:00
+++ b/include/asm-i386/pgtable-3level.h	2005-01-10 20:11:21 -08:00
@@ -1,6 +1,8 @@
 #ifndef _I386_PGTABLE_3LEVEL_H
 #define _I386_PGTABLE_3LEVEL_H
 
+#include <asm-generic/pgtable-nopud.h>
+
 /*
  * Intel Physical Address Extension (PAE) Mode - three-level page
  * tables on PPro+ CPUs.
@@ -15,9 +17,9 @@
 #define pgd_ERROR(e) \
 	printk("%s:%d: bad pgd %p(%016Lx).\n", __FILE__, __LINE__, &(e), pgd_val(e))
 
-static inline int pgd_none(pgd_t pgd)		{ return 0; }
-static inline int pgd_bad(pgd_t pgd)		{ return 0; }
-static inline int pgd_present(pgd_t pgd)	{ return 1; }
+#define pud_none(pud)				0
+#define pud_bad(pud)				0
+#define pud_present(pud)			1
 
 /*
  * Is the pte executable?
@@ -59,8 +61,8 @@
 		set_64bit((unsigned long long *)(pteptr),pte_val(pteval))
 #define set_pmd(pmdptr,pmdval) \
 		set_64bit((unsigned long long *)(pmdptr),pmd_val(pmdval))
-#define set_pgd(pgdptr,pgdval) \
-		set_64bit((unsigned long long *)(pgdptr),pgd_val(pgdval))
+#define set_pud(pudptr,pudval) \
+		set_64bit((unsigned long long *)(pudptr),pud_val(pudval))
 
 /*
  * Pentium-II erratum A13: in PAE mode we explicitly have to flush
@@ -68,13 +70,22 @@
  * We do not let the generic code free and clear pgd entries due to
  * this erratum.
  */
-static inline void pgd_clear (pgd_t * pgd) { }
+static inline void pud_clear (pud_t * pud) { }
+
+#define pmd_page(pmd) (pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT))
+
+#define pmd_page_kernel(pmd) \
+((unsigned long) __va(pmd_val(pmd) & PAGE_MASK))
+
+#define pud_page(pud) \
+((struct page *) __va(pud_val(pud) & PAGE_MASK))
+
+#define pud_page_kernel(pud) \
+((unsigned long) __va(pud_val(pud) & PAGE_MASK))
 
-#define pgd_page(pgd) \
-((unsigned long) __va(pgd_val(pgd) & PAGE_MASK))
 
 /* Find an entry in the second-level page table.. */
-#define pmd_offset(dir, address) ((pmd_t *) pgd_page(*(dir)) + \
+#define pmd_offset(pud, address) ((pmd_t *) pud_page(*(pud)) + \
 			pmd_index(address))
 
 static inline pte_t ptep_get_and_clear(pte_t *ptep)
@@ -141,5 +152,7 @@
 #define __swp_entry(type, offset)	((swp_entry_t){(type) | (offset) << 5})
 #define __pte_to_swp_entry(pte)		((swp_entry_t){ (pte).pte_high })
 #define __swp_entry_to_pte(x)		((pte_t){ 0, (x).val })
+
+#define __pmd_free_tlb(tlb, x)		do { } while (0)
 
 #endif /* _I386_PGTABLE_3LEVEL_H */
diff -Nru a/include/asm-i386/pgtable.h b/include/asm-i386/pgtable.h
--- a/include/asm-i386/pgtable.h	2005-01-10 20:11:21 -08:00
+++ b/include/asm-i386/pgtable.h	2005-01-10 20:11:21 -08:00
@@ -50,12 +50,12 @@
  */
 #ifdef CONFIG_X86_PAE
 # include <asm/pgtable-3level-defs.h>
+# define PMD_SIZE	(1UL << PMD_SHIFT)
+# define PMD_MASK	(~(PMD_SIZE-1))
 #else
 # include <asm/pgtable-2level-defs.h>
 #endif
 
-#define PMD_SIZE	(1UL << PMD_SHIFT)
-#define PMD_MASK	(~(PMD_SIZE-1))
 #define PGDIR_SIZE	(1UL << PGDIR_SHIFT)
 #define PGDIR_MASK	(~(PGDIR_SIZE-1))
 
@@ -293,15 +293,8 @@
 
 #define page_pte(page) page_pte_prot(page, __pgprot(0))
 
-#define pmd_page_kernel(pmd) \
-((unsigned long) __va(pmd_val(pmd) & PAGE_MASK))
-
-#ifndef CONFIG_DISCONTIGMEM
-#define pmd_page(pmd) (pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT))
-#endif /* !CONFIG_DISCONTIGMEM */
-
 #define pmd_large(pmd) \
-	((pmd_val(pmd) & (_PAGE_PSE|_PAGE_PRESENT)) == (_PAGE_PSE|_PAGE_PRESENT))
+((pmd_val(pmd) & (_PAGE_PSE|_PAGE_PRESENT)) == (_PAGE_PSE|_PAGE_PRESENT))
 
 /*
  * the pgd page can be thought of an array like this: pgd_t[PTRS_PER_PGD]
@@ -310,6 +303,7 @@
  * control the given virtual address
  */
 #define pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD-1))
+#define pgd_index_k(addr) pgd_index(addr)
 
 /*
  * pgd_offset() returns a (pgd_t *)
@@ -362,6 +356,8 @@
 #else
  static inline int set_kernel_exec(unsigned long vaddr, int enable) { return 0;}
 #endif
+
+extern void noexec_setup(const char *str);
 
 #if defined(CONFIG_HIGHPTE)
 #define pte_offset_map(dir, address) \
diff -Nru a/include/asm-i386/processor.h b/include/asm-i386/processor.h
--- a/include/asm-i386/processor.h	2005-01-10 20:11:15 -08:00
+++ b/include/asm-i386/processor.h	2005-01-10 20:11:15 -08:00
@@ -126,6 +126,8 @@
 
 /*
  * Generic CPUID function
+ * clear %ecx since some cpus (Cyrix MII) do not set or clear %ecx
+ * resulting in stale register contents being returned.
  */
 static inline void cpuid(int op, int *eax, int *ebx, int *ecx, int *edx)
 {
@@ -134,7 +136,7 @@
 		  "=b" (*ebx),
 		  "=c" (*ecx),
 		  "=d" (*edx)
-		: "0" (op));
+		: "0" (op), "c"(0));
 }
 
 /*
@@ -259,11 +261,6 @@
 	outb((data), 0x23); \
 } while (0)
 
-/*
- * Bus types (default is ISA, but people can check others with these..)
- */
-extern int MCA_bus;
-
 static inline void __monitor(const void *eax, unsigned long ecx,
 		unsigned long edx)
 {
@@ -287,6 +284,9 @@
 extern unsigned int machine_submodel_id;
 extern unsigned int BIOS_revision;
 extern unsigned int mca_pentium_flag;
+
+/* Boot loader type from the setup header */
+extern int bootloader_type;
 
 /*
  * User space process size: 3GB (default).
diff -Nru a/include/asm-i386/ptrace.h b/include/asm-i386/ptrace.h
--- a/include/asm-i386/ptrace.h	2005-01-10 20:11:16 -08:00
+++ b/include/asm-i386/ptrace.h	2005-01-10 20:11:16 -08:00
@@ -55,6 +55,8 @@
 #define PTRACE_SET_THREAD_AREA    26
 
 #ifdef __KERNEL__
+struct task_struct;
+extern void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, int error_code);
 #define user_mode(regs) ((VM_MASK & (regs)->eflags) || (3 & (regs)->xcs))
 #define instruction_pointer(regs) ((regs)->eip)
 #if defined(CONFIG_SMP) && defined(CONFIG_FRAME_POINTER)
diff -Nru a/include/asm-i386/smp.h b/include/asm-i386/smp.h
--- a/include/asm-i386/smp.h	2005-01-10 20:11:24 -08:00
+++ b/include/asm-i386/smp.h	2005-01-10 20:11:24 -08:00
@@ -50,7 +50,7 @@
  * from the initial startup. We map APIC_BASE very early in page_setup(),
  * so this is correct in the x86 case.
  */
-#define smp_processor_id() (current_thread_info()->cpu)
+#define __smp_processor_id() (current_thread_info()->cpu)
 
 extern cpumask_t cpu_callout_map;
 #define cpu_possible_map cpu_callout_map
diff -Nru a/include/asm-i386/spinlock.h b/include/asm-i386/spinlock.h
--- a/include/asm-i386/spinlock.h	2005-01-10 20:11:17 -08:00
+++ b/include/asm-i386/spinlock.h	2005-01-10 20:11:17 -08:00
@@ -19,6 +19,9 @@
 #ifdef CONFIG_DEBUG_SPINLOCK
 	unsigned magic;
 #endif
+#ifdef CONFIG_PREEMPT
+	unsigned int break_lock;
+#endif
 } spinlock_t;
 
 #define SPINLOCK_MAGIC	0xdead4ead
@@ -166,6 +169,9 @@
 #ifdef CONFIG_DEBUG_SPINLOCK
 	unsigned magic;
 #endif
+#ifdef CONFIG_PREEMPT
+	unsigned int break_lock;
+#endif
 } rwlock_t;
 
 #define RWLOCK_MAGIC	0xdeaf1eed
@@ -211,6 +217,16 @@
 
 #define _raw_read_unlock(rw)		asm volatile("lock ; incl %0" :"=m" ((rw)->lock) : : "memory")
 #define _raw_write_unlock(rw)	asm volatile("lock ; addl $" RW_LOCK_BIAS_STR ",%0":"=m" ((rw)->lock) : : "memory")
+
+static inline int _raw_read_trylock(rwlock_t *lock)
+{
+	atomic_t *count = (atomic_t *)lock;
+	atomic_dec(count);
+	if (atomic_read(count) >= 0)
+		return 1;
+	atomic_inc(count);
+	return 0;
+}
 
 static inline int _raw_write_trylock(rwlock_t *lock)
 {
diff -Nru a/include/asm-i386/string.h b/include/asm-i386/string.h
--- a/include/asm-i386/string.h	2005-01-10 20:11:23 -08:00
+++ b/include/asm-i386/string.h	2005-01-10 20:11:23 -08:00
@@ -25,7 +25,6 @@
 
 /* AK: in fact I bet it would be better to move this stuff all out of line.
  */
-#if !defined(IN_STRING_C)
 
 #define __HAVE_ARCH_STRCPY
 static inline char * strcpy(char * dest,const char *src)
@@ -179,8 +178,6 @@
 	:"=g" (__res), "=&S" (d0), "=&a" (d1) :"0" (0),"1" (s),"2" (c));
 return __res;
 }
-
-#endif
 
 #define __HAVE_ARCH_STRLEN
 static inline size_t strlen(const char * s)
diff -Nru a/include/asm-i386/system.h b/include/asm-i386/system.h
--- a/include/asm-i386/system.h	2005-01-10 20:11:15 -08:00
+++ b/include/asm-i386/system.h	2005-01-10 20:11:15 -08:00
@@ -466,5 +466,6 @@
 void enable_hlt(void);
 
 extern int es7000_plat;
+void cpu_idle_wait(void);
 
 #endif
diff -Nru a/include/asm-i386/topology.h b/include/asm-i386/topology.h
--- a/include/asm-i386/topology.h	2005-01-10 20:11:16 -08:00
+++ b/include/asm-i386/topology.h	2005-01-10 20:11:16 -08:00
@@ -66,9 +66,6 @@
 	return node_to_cpumask(mp_bus_id_to_node[bus]);
 }
 
-/* Node-to-Node distance */
-#define node_distance(from, to) ((from) != (to))
-
 /* sched_domains SD_NODE_INIT for NUMAQ machines */
 #define SD_NODE_INIT (struct sched_domain) {		\
 	.span			= CPU_MASK_NONE,	\
@@ -78,11 +75,13 @@
 	.max_interval		= 32,			\
 	.busy_factor		= 32,			\
 	.imbalance_pct		= 125,			\
-	.cache_hot_time		= (10*1000),		\
+	.cache_hot_time		= (10*1000000),		\
 	.cache_nice_tries	= 1,			\
 	.per_cpu_gain		= 100,			\
 	.flags			= SD_LOAD_BALANCE	\
 				| SD_BALANCE_EXEC	\
+				| SD_BALANCE_NEWIDLE	\
+				| SD_WAKE_IDLE		\
 				| SD_WAKE_BALANCE,	\
 	.last_balance		= jiffies,		\
 	.balance_interval	= 1,			\
diff -Nru a/include/asm-i386/uaccess.h b/include/asm-i386/uaccess.h
--- a/include/asm-i386/uaccess.h	2005-01-10 20:11:16 -08:00
+++ b/include/asm-i386/uaccess.h	2005-01-10 20:11:16 -08:00
@@ -170,7 +170,8 @@
  * On error, the variable @x is set to zero.
  */
 #define get_user(x,ptr)							\
-({	int __ret_gu,__val_gu;						\
+({	int __ret_gu;							\
+	unsigned long __val_gu;						\
 	__chk_user_ptr(ptr);						\
 	switch(sizeof (*(ptr))) {					\
 	case 1:  __get_user_x(1,__ret_gu,__val_gu,ptr); break;		\
@@ -313,7 +314,7 @@
 
 #endif
 struct __large_struct { unsigned long buf[100]; };
-#define __m(x) (*(struct __large_struct *)(x))
+#define __m(x) (*(struct __large_struct __user *)(x))
 
 /*
  * Tell gcc we read from memory instead of writing: this is because
@@ -338,7 +339,8 @@
 
 #define __get_user_nocheck(x,ptr,size)				\
 ({								\
-	long __gu_err, __gu_val;				\
+	long __gu_err;						\
+	unsigned long __gu_val;					\
 	__get_user_size(__gu_val,(ptr),(size),__gu_err,-EFAULT);\
 	(x) = (__typeof__(*(ptr)))__gu_val;			\
 	__gu_err;						\
diff -Nru a/include/asm-ia64/acpi.h b/include/asm-ia64/acpi.h
--- a/include/asm-ia64/acpi.h	2005-01-10 20:11:22 -08:00
+++ b/include/asm-ia64/acpi.h	2005-01-10 20:11:22 -08:00
@@ -101,7 +101,7 @@
 #ifdef CONFIG_ACPI_NUMA
 /* 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 __devinitdata pxm_to_nid_map[MAX_PXM_DOMAINS];
 extern int __initdata nid_to_pxm_map[MAX_NUMNODES];
 #endif
 
diff -Nru a/include/asm-ia64/cpu.h b/include/asm-ia64/cpu.h
--- a/include/asm-ia64/cpu.h	2005-01-10 20:11:22 -08:00
+++ b/include/asm-ia64/cpu.h	2005-01-10 20:11:22 -08:00
@@ -14,4 +14,9 @@
 
 DECLARE_PER_CPU(int, cpu_state);
 
+extern int arch_register_cpu(int num);
+#ifdef CONFIG_HOTPLUG_CPU
+extern void arch_unregister_cpu(int);
+#endif
+
 #endif /* _ASM_IA64_CPU_H_ */
diff -Nru a/include/asm-ia64/hw_irq.h b/include/asm-ia64/hw_irq.h
--- a/include/asm-ia64/hw_irq.h	2005-01-10 20:11:19 -08:00
+++ b/include/asm-ia64/hw_irq.h	2005-01-10 20:11:19 -08:00
@@ -50,6 +50,7 @@
  */
 #define IA64_FIRST_DEVICE_VECTOR	0x30
 #define IA64_LAST_DEVICE_VECTOR		0xe7
+#define IA64_NUM_DEVICE_VECTORS		(IA64_LAST_DEVICE_VECTOR - IA64_FIRST_DEVICE_VECTOR + 1)
 
 #define IA64_MCA_RENDEZ_VECTOR		0xe8	/* MCA rendez interrupt */
 #define IA64_PERFMON_VECTOR		0xee	/* performanc monitor interrupt vector */
@@ -81,6 +82,7 @@
 extern struct hw_interrupt_type irq_type_ia64_lsapic;	/* CPU-internal interrupt controller */
 
 extern int assign_irq_vector (int irq);	/* allocate a free vector */
+extern void free_irq_vector (int vector);
 extern void ia64_send_ipi (int cpu, int vector, int delivery_mode, int redirect);
 extern void register_percpu_irq (ia64_vector vec, struct irqaction *action);
 
diff -Nru a/include/asm-ia64/io.h b/include/asm-ia64/io.h
--- a/include/asm-ia64/io.h	2005-01-10 20:11:16 -08:00
+++ b/include/asm-ia64/io.h	2005-01-10 20:11:16 -08:00
@@ -447,14 +447,9 @@
 /*
  * String version of IO memory access ops:
  */
-extern void __ia64_memcpy_fromio (void *, volatile void __iomem *, long);
-extern void __ia64_memcpy_toio (volatile void __iomem *, void *, long);
-extern void __ia64_memset_c_io (volatile void __iomem *, unsigned long, long);
-
-#define memcpy_fromio(to,from,len)	__ia64_memcpy_fromio((to), (from),(len))
-#define memcpy_toio(to,from,len)	__ia64_memcpy_toio((to),(from),(len))
-#define memset_io(addr,c,len)		__ia64_memset_c_io((addr), 0x0101010101010101UL*(u8)(c), \
-							   (len))
+extern void memcpy_fromio(void *dst, const volatile void __iomem *src, long n);
+extern void memcpy_toio(volatile void __iomem *dst, const void *src, long n);
+extern void memset_io(volatile void __iomem *s, int c, long n);
 
 #define dma_cache_inv(_start,_size)             do { } while (0)
 #define dma_cache_wback(_start,_size)           do { } while (0)
diff -Nru a/include/asm-ia64/iosapic.h b/include/asm-ia64/iosapic.h
--- a/include/asm-ia64/iosapic.h	2005-01-10 20:11:19 -08:00
+++ b/include/asm-ia64/iosapic.h	2005-01-10 20:11:19 -08:00
@@ -78,6 +78,9 @@
 extern void iosapic_enable_intr (unsigned int vector);
 extern int iosapic_register_intr (unsigned int gsi, unsigned long polarity,
 				  unsigned long trigger);
+#ifdef CONFIG_ACPI_DEALLOCATE_IRQ
+extern void iosapic_unregister_intr (unsigned int irq);
+#endif
 extern void __init iosapic_override_isa_irq (unsigned int isa_irq, unsigned int gsi,
 				      unsigned long polarity,
 				      unsigned long trigger);
@@ -97,6 +100,7 @@
 #define iosapic_system_init(pcat_compat)			do { } while (0)
 #define iosapic_init(address,gsi_base)				do { } while (0)
 #define iosapic_register_intr(gsi,polarity,trigger)		(gsi)
+#define iosapic_unregister_intr(irq)				do { } while (0)
 #define iosapic_override_isa_irq(isa_irq,gsi,polarity,trigger)	do { } while (0)
 #define iosapic_register_platform_intr(type,gsi,pmi,eid,id, \
 	polarity,trigger)					(gsi)
diff -Nru a/include/asm-ia64/mmzone.h b/include/asm-ia64/mmzone.h
--- a/include/asm-ia64/mmzone.h	2005-01-10 20:11:23 -08:00
+++ b/include/asm-ia64/mmzone.h	2005-01-10 20:11:23 -08:00
@@ -11,7 +11,7 @@
 #ifndef _ASM_IA64_MMZONE_H
 #define _ASM_IA64_MMZONE_H
 
-#include <linux/config.h>
+#include <linux/numa.h>
 #include <asm/page.h>
 #include <asm/meminit.h>
 
@@ -19,15 +19,14 @@
 
 #ifdef CONFIG_IA64_DIG /* DIG systems are small */
 # define MAX_PHYSNODE_ID	8
-# define NR_NODES		8
-# define NR_NODE_MEMBLKS	(NR_NODES * 8)
+# define NR_NODE_MEMBLKS	(MAX_NUMNODES * 8)
 #else /* sn2 is the biggest case, so we use that if !DIG */
 # define MAX_PHYSNODE_ID	2048
-# define NR_NODES		256
-# define NR_NODE_MEMBLKS	(NR_NODES * 4)
+# define NR_NODE_MEMBLKS	(MAX_NUMNODES * 4)
 #endif
 
 #else /* CONFIG_DISCONTIGMEM */
-# define NR_NODE_MEMBLKS	4
+# define NR_NODE_MEMBLKS	(MAX_NUMNODES * 4)
 #endif /* CONFIG_DISCONTIGMEM */
+
 #endif /* _ASM_IA64_MMZONE_H */
diff -Nru a/include/asm-ia64/nodedata.h b/include/asm-ia64/nodedata.h
--- a/include/asm-ia64/nodedata.h	2005-01-10 20:11:21 -08:00
+++ b/include/asm-ia64/nodedata.h	2005-01-10 20:11:21 -08:00
@@ -27,7 +27,7 @@
 struct ia64_node_data {
 	short			active_cpu_count;
 	short			node;
-	struct pglist_data	*pg_data_ptrs[NR_NODES];
+	struct pglist_data	*pg_data_ptrs[MAX_NUMNODES];
 };
 
 
diff -Nru a/include/asm-ia64/numa.h b/include/asm-ia64/numa.h
--- a/include/asm-ia64/numa.h	2005-01-10 20:11:18 -08:00
+++ b/include/asm-ia64/numa.h	2005-01-10 20:11:18 -08:00
@@ -59,7 +59,7 @@
  */
 
 extern u8 numa_slit[MAX_NUMNODES * MAX_NUMNODES];
-#define node_distance(from,to) (numa_slit[(from) * numnodes + (to)])
+#define node_distance(from,to) (numa_slit[(from) * num_online_nodes() + (to)])
 
 extern int paddr_to_nid(unsigned long paddr);
 
diff -Nru a/include/asm-ia64/pgalloc.h b/include/asm-ia64/pgalloc.h
--- a/include/asm-ia64/pgalloc.h	2005-01-10 20:11:15 -08:00
+++ b/include/asm-ia64/pgalloc.h	2005-01-10 20:11:15 -08:00
@@ -61,9 +61,7 @@
 	pgd_t *pgd = pgd_alloc_one_fast(mm);
 
 	if (unlikely(pgd == NULL)) {
-		pgd = (pgd_t *)__get_free_page(GFP_KERNEL);
-		if (likely(pgd != NULL))
-			clear_page(pgd);
+		pgd = (pgd_t *)__get_free_page(GFP_KERNEL|__GFP_ZERO);
 	}
 	return pgd;
 }
@@ -79,12 +77,11 @@
 }
 
 static inline void
-pgd_populate (struct mm_struct *mm, pgd_t *pgd_entry, pmd_t *pmd)
+pud_populate (struct mm_struct *mm, pud_t *pud_entry, pmd_t *pmd)
 {
-	pgd_val(*pgd_entry) = __pa(pmd);
+	pud_val(*pud_entry) = __pa(pmd);
 }
 
-
 static inline pmd_t*
 pmd_alloc_one_fast (struct mm_struct *mm, unsigned long addr)
 {
@@ -107,10 +104,8 @@
 static inline pmd_t*
 pmd_alloc_one (struct mm_struct *mm, unsigned long addr)
 {
-	pmd_t *pmd = (pmd_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT);
+	pmd_t *pmd = (pmd_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO);
 
-	if (likely(pmd != NULL))
-		clear_page(pmd);
 	return pmd;
 }
 
@@ -141,20 +136,16 @@
 static inline struct page *
 pte_alloc_one (struct mm_struct *mm, unsigned long addr)
 {
-	struct page *pte = alloc_pages(GFP_KERNEL|__GFP_REPEAT, 0);
+	struct page *pte = alloc_pages(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO, 0);
 
-	if (likely(pte != NULL))
-		clear_page(page_address(pte));
 	return pte;
 }
 
 static inline pte_t *
 pte_alloc_one_kernel (struct mm_struct *mm, unsigned long addr)
 {
-	pte_t *pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT);
+	pte_t *pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO);
 
-	if (likely(pte != NULL))
-		clear_page(pte);
 	return pte;
 }
 
diff -Nru a/include/asm-ia64/pgtable.h b/include/asm-ia64/pgtable.h
--- a/include/asm-ia64/pgtable.h	2005-01-10 20:11:17 -08:00
+++ b/include/asm-ia64/pgtable.h	2005-01-10 20:11:17 -08:00
@@ -91,7 +91,7 @@
 #define PGDIR_SHIFT		(PAGE_SHIFT + 2*(PAGE_SHIFT-3))
 #define PGDIR_SIZE		(__IA64_UL(1) << PGDIR_SHIFT)
 #define PGDIR_MASK		(~(PGDIR_SIZE-1))
-#define PTRS_PER_PGD		(__IA64_UL(1) << (PAGE_SHIFT-3))
+#define PTRS_PER_PGD		(1UL << (PAGE_SHIFT-3))
 #define USER_PTRS_PER_PGD	(5*PTRS_PER_PGD/8)	/* regions 0-4 are user regions */
 #define FIRST_USER_PGD_NR	0
 
@@ -104,7 +104,7 @@
 #define PMD_SHIFT	(PAGE_SHIFT + (PAGE_SHIFT-3))
 #define PMD_SIZE	(1UL << PMD_SHIFT)
 #define PMD_MASK	(~(PMD_SIZE-1))
-#define PTRS_PER_PMD	(__IA64_UL(1) << (PAGE_SHIFT-3))
+#define PTRS_PER_PMD	(1UL << (PAGE_SHIFT-3))
 
 /*
  * Definitions for third level:
@@ -254,11 +254,12 @@
 #define pmd_page_kernel(pmd)		((unsigned long) __va(pmd_val(pmd) & _PFN_MASK))
 #define pmd_page(pmd)			virt_to_page((pmd_val(pmd) + PAGE_OFFSET))
 
-#define pgd_none(pgd)			(!pgd_val(pgd))
-#define pgd_bad(pgd)			(!ia64_phys_addr_valid(pgd_val(pgd)))
-#define pgd_present(pgd)		(pgd_val(pgd) != 0UL)
-#define pgd_clear(pgdp)			(pgd_val(*(pgdp)) = 0UL)
-#define pgd_page(pgd)			((unsigned long) __va(pgd_val(pgd) & _PFN_MASK))
+#define pud_none(pud)			(!pud_val(pud))
+#define pud_bad(pud)			(!ia64_phys_addr_valid(pud_val(pud)))
+#define pud_present(pud)		(pud_val(pud) != 0UL)
+#define pud_clear(pudp)			(pud_val(*(pudp)) = 0UL)
+
+#define pud_page(pud)			((unsigned long) __va(pud_val(pud) & _PFN_MASK))
 
 /*
  * The following have defined behavior only work if pte_present() is true.
@@ -328,7 +329,7 @@
 
 /* Find an entry in the second-level page table.. */
 #define pmd_offset(dir,addr) \
-	((pmd_t *) pgd_page(*(dir)) + (((addr) >> PMD_SHIFT) & (PTRS_PER_PMD - 1)))
+	((pmd_t *) pud_page(*(dir)) + (((addr) >> PMD_SHIFT) & (PTRS_PER_PMD - 1)))
 
 /*
  * Find an entry in the third-level page table.  This looks more complicated than it
@@ -561,5 +562,6 @@
 #define __HAVE_ARCH_PTE_SAME
 #define __HAVE_ARCH_PGD_OFFSET_GATE
 #include <asm-generic/pgtable.h>
+#include <asm-generic/pgtable-nopud.h>
 
 #endif /* _ASM_IA64_PGTABLE_H */
diff -Nru a/include/asm-ia64/sections.h b/include/asm-ia64/sections.h
--- a/include/asm-ia64/sections.h	2005-01-10 20:11:19 -08:00
+++ b/include/asm-ia64/sections.h	2005-01-10 20:11:19 -08:00
@@ -17,7 +17,6 @@
 extern char __start_gate_fsyscall_patchlist[], __end_gate_fsyscall_patchlist[];
 extern char __start_gate_brl_fsys_bubble_down_patchlist[], __end_gate_brl_fsys_bubble_down_patchlist[];
 extern char __start_unwind[], __end_unwind[];
-extern char _end[];		/* end of kernel image */
 
 #endif /* _ASM_IA64_SECTIONS_H */
 
diff -Nru a/include/asm-ia64/spinlock.h b/include/asm-ia64/spinlock.h
--- a/include/asm-ia64/spinlock.h	2005-01-10 20:11:16 -08:00
+++ b/include/asm-ia64/spinlock.h	2005-01-10 20:11:16 -08:00
@@ -19,6 +19,9 @@
 
 typedef struct {
 	volatile unsigned int lock;
+#ifdef CONFIG_PREEMPT
+	unsigned int break_lock;
+#endif
 } spinlock_t;
 
 #define SPIN_LOCK_UNLOCKED			(spinlock_t) { 0 }
@@ -116,6 +119,9 @@
 typedef struct {
 	volatile unsigned int read_counter	: 31;
 	volatile unsigned int write_lock	:  1;
+#ifdef CONFIG_PREEMPT
+	unsigned int break_lock;
+#endif
 } rwlock_t;
 #define RW_LOCK_UNLOCKED (rwlock_t) { 0, 0 }
 
@@ -189,6 +195,8 @@
 })
 
 #endif /* !ASM_SUPPORTED */
+
+#define _raw_read_trylock(lock) generic_raw_read_trylock(lock)
 
 #define _raw_write_unlock(x)								\
 ({											\
diff -Nru a/include/asm-ia64/system.h b/include/asm-ia64/system.h
--- a/include/asm-ia64/system.h	2005-01-10 20:11:18 -08:00
+++ b/include/asm-ia64/system.h	2005-01-10 20:11:18 -08:00
@@ -284,6 +284,7 @@
 
 #define ia64_platform_is(x) (strcmp(x, platform_name) == 0)
 
+void cpu_idle_wait(void);
 #endif /* __KERNEL__ */
 
 #endif /* __ASSEMBLY__ */
diff -Nru a/include/asm-ia64/tlb.h b/include/asm-ia64/tlb.h
--- a/include/asm-ia64/tlb.h	2005-01-10 20:11:18 -08:00
+++ b/include/asm-ia64/tlb.h	2005-01-10 20:11:18 -08:00
@@ -236,4 +236,10 @@
 	__pmd_free_tlb(tlb, ptep);			\
 } while (0)
 
+#define pud_free_tlb(tlb, pudp)				\
+do {							\
+	tlb->need_flush = 1;				\
+	__pud_free_tlb(tlb, pudp);			\
+} 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	2005-01-10 20:11:15 -08:00
+++ b/include/asm-ia64/topology.h	2005-01-10 20:11:15 -08:00
@@ -56,6 +56,8 @@
 	.per_cpu_gain		= 100,			\
 	.flags			= SD_LOAD_BALANCE	\
 				| SD_BALANCE_EXEC	\
+				| SD_BALANCE_NEWIDLE	\
+				| SD_WAKE_IDLE		\
 				| SD_WAKE_BALANCE,	\
 	.last_balance		= jiffies,		\
 	.balance_interval	= 1,			\
diff -Nru a/include/asm-ia64/unistd.h b/include/asm-ia64/unistd.h
--- a/include/asm-ia64/unistd.h	2005-01-10 20:11:16 -08:00
+++ b/include/asm-ia64/unistd.h	2005-01-10 20:11:16 -08:00
@@ -281,6 +281,7 @@
 # define __ARCH_WANT_SYS_OLDUMOUNT
 # define __ARCH_WANT_SYS_SIGPENDING
 # define __ARCH_WANT_SYS_SIGPROCMASK
+# define __ARCH_WANT_COMPAT_SYS_TIME
 #endif
 
 #if !defined(__ASSEMBLY__) && !defined(ASSEMBLER)
diff -Nru a/include/asm-m32r/assembler.h b/include/asm-m32r/assembler.h
--- a/include/asm-m32r/assembler.h	2005-01-10 20:11:15 -08:00
+++ b/include/asm-m32r/assembler.h	2005-01-10 20:11:15 -08:00
@@ -1,20 +1,33 @@
 #ifndef _ASM_M32R_ASSEMBLER_H
 #define _ASM_M32R_ASSEMBLER_H
 
-/* $Id$ */
-
 /*
  * linux/asm-m32r/assembler.h
  *
- * This file contains M32R architecture specific defines.
+ * Copyright (C) 2004  Hirokazu Takata <takata at linux-m32r.org>
  *
- * Do not include any C declarations in this file - it is included by
- * assembler source.
+ * This file contains M32R architecture specific macro definitions.
  */
 
 #include <linux/config.h>
 
+#ifndef __STR
+#ifdef __ASSEMBLY__
+#define __STR(x) x
+#else
+#define __STR(x) #x
+#endif
+#endif /* __STR */
+
+#ifdef CONFIG_SMP
+#define M32R_LOCK	__STR(lock)
+#define M32R_UNLOCK	__STR(unlock)
+#else
+#define M32R_LOCK	__STR(ld)
+#define M32R_UNLOCK	__STR(st)
+#endif
 
+#ifdef __ASSEMBLY__
 #undef ENTRY
 #define ENTRY(name) ENTRY_M name
 	.macro  ENTRY_M name
@@ -22,12 +35,13 @@
 	ALIGN
 \name:
 	.endm
+#endif
 
-/*
- * LDIMM: load immediate value
- *
- * STI: enable interruption
- * CLI: disable interruption
+
+/**
+ * LDIMM - load immediate value
+ * STI - enable interruption
+ * CLI - disable interruption
  */
 
 #ifdef __ASSEMBLY__
@@ -209,4 +223,3 @@
 #endif	/* __ASSEMBLY__ */
 
 #endif	/* _ASM_M32R_ASSEMBLER_H */
-
diff -Nru a/include/asm-m32r/atomic.h b/include/asm-m32r/atomic.h
--- a/include/asm-m32r/atomic.h	2005-01-10 20:11:19 -08:00
+++ b/include/asm-m32r/atomic.h	2005-01-10 20:11:19 -08:00
@@ -10,6 +10,7 @@
  */
 
 #include <linux/config.h>
+#include <asm/assembler.h>
 #include <asm/system.h>
 
 /*
@@ -17,16 +18,6 @@
  * resource counting etc..
  */
 
-#undef LOAD
-#undef STORE
-#ifdef CONFIG_SMP
-#define LOAD	"lock"
-#define STORE	"unlock"
-#else
-#define LOAD	"ld"
-#define STORE	"st"
-#endif
-
 /*
  * Make sure gcc doesn't try to be clever and move things around
  * on us. We need to use _exactly_ the address the user gave us,
@@ -60,7 +51,7 @@
  *
  * Atomically adds @i to @v and return (@i + @v).
  */
-static inline int atomic_add_return(int i, atomic_t *v)
+static __inline__ int atomic_add_return(int i, atomic_t *v)
 {
 	unsigned long flags;
 	int result;
@@ -69,9 +60,9 @@
 	__asm__ __volatile__ (
 		"# atomic_add_return		\n\t"
 		DCACHE_CLEAR("%0", "r4", "%1")
-		LOAD"	%0, @%1;		\n\t"
+		M32R_LOCK" %0, @%1;		\n\t"
 		"add	%0, %2;			\n\t"
-		STORE"	%0, @%1;		\n\t"
+		M32R_UNLOCK" %0, @%1;		\n\t"
 		: "=&r" (result)
 		: "r" (&v->counter), "r" (i)
 		: "memory"
@@ -91,7 +82,7 @@
  *
  * Atomically subtracts @i from @v and return (@v - @i).
  */
-static inline int atomic_sub_return(int i, atomic_t *v)
+static __inline__ int atomic_sub_return(int i, atomic_t *v)
 {
 	unsigned long flags;
 	int result;
@@ -100,9 +91,9 @@
 	__asm__ __volatile__ (
 		"# atomic_sub_return		\n\t"
 		DCACHE_CLEAR("%0", "r4", "%1")
-		LOAD"	%0, @%1;		\n\t"
+		M32R_LOCK" %0, @%1;		\n\t"
 		"sub	%0, %2;			\n\t"
-		STORE"	%0, @%1;		\n\t"
+		M32R_UNLOCK" %0, @%1;		\n\t"
 		: "=&r" (result)
 		: "r" (&v->counter), "r" (i)
 		: "memory"
@@ -150,7 +141,7 @@
  *
  * Atomically increments @v by 1 and returns the result.
  */
-static inline int atomic_inc_return(atomic_t *v)
+static __inline__ int atomic_inc_return(atomic_t *v)
 {
 	unsigned long flags;
 	int result;
@@ -159,9 +150,9 @@
 	__asm__ __volatile__ (
 		"# atomic_inc_return		\n\t"
 		DCACHE_CLEAR("%0", "r4", "%1")
-		LOAD"	%0, @%1;		\n\t"
+		M32R_LOCK" %0, @%1;		\n\t"
 		"addi	%0, #1;			\n\t"
-		STORE"	%0, @%1;		\n\t"
+		M32R_UNLOCK" %0, @%1;		\n\t"
 		: "=&r" (result)
 		: "r" (&v->counter)
 		: "memory"
@@ -180,7 +171,7 @@
  *
  * Atomically decrements @v by 1 and returns the result.
  */
-static inline int atomic_dec_return(atomic_t *v)
+static __inline__ int atomic_dec_return(atomic_t *v)
 {
 	unsigned long flags;
 	int result;
@@ -189,9 +180,9 @@
 	__asm__ __volatile__ (
 		"# atomic_dec_return		\n\t"
 		DCACHE_CLEAR("%0", "r4", "%1")
-		LOAD"	%0, @%1;		\n\t"
+		M32R_LOCK" %0, @%1;		\n\t"
 		"addi	%0, #-1;		\n\t"
-		STORE"	%0, @%1;		\n\t"
+		M32R_UNLOCK" %0, @%1;		\n\t"
 		: "=&r" (result)
 		: "r" (&v->counter)
 		: "memory"
@@ -251,7 +242,7 @@
  */
 #define atomic_add_negative(i,v) (atomic_add_return((i), (v)) < 0)
 
-static inline void atomic_clear_mask(unsigned long  mask, atomic_t *addr)
+static __inline__ void atomic_clear_mask(unsigned long  mask, atomic_t *addr)
 {
 	unsigned long flags;
 	unsigned long tmp;
@@ -260,9 +251,9 @@
 	__asm__ __volatile__ (
 		"# atomic_clear_mask		\n\t"
 		DCACHE_CLEAR("%0", "r5", "%1")
-		LOAD"	%0, @%1;		\n\t"
+		M32R_LOCK" %0, @%1;		\n\t"
 		"and	%0, %2;			\n\t"
-		STORE"	%0, @%1;		\n\t"
+		M32R_UNLOCK" %0, @%1;		\n\t"
 		: "=&r" (tmp)
 		: "r" (addr), "r" (~mask)
 		: "memory"
@@ -273,7 +264,7 @@
 	local_irq_restore(flags);
 }
 
-static inline void atomic_set_mask(unsigned long  mask, atomic_t *addr)
+static __inline__ void atomic_set_mask(unsigned long  mask, atomic_t *addr)
 {
 	unsigned long flags;
 	unsigned long tmp;
@@ -282,9 +273,9 @@
 	__asm__ __volatile__ (
 		"# atomic_set_mask		\n\t"
 		DCACHE_CLEAR("%0", "r5", "%1")
-		LOAD"	%0, @%1;		\n\t"
+		M32R_LOCK" %0, @%1;		\n\t"
 		"or	%0, %2;			\n\t"
-		STORE"	%0, @%1;		\n\t"
+		M32R_UNLOCK" %0, @%1;		\n\t"
 		: "=&r" (tmp)
 		: "r" (addr), "r" (mask)
 		: "memory"
@@ -302,4 +293,3 @@
 #define smp_mb__after_atomic_inc()	barrier()
 
 #endif	/* _ASM_M32R_ATOMIC_H */
-
diff -Nru a/include/asm-m32r/bitops.h b/include/asm-m32r/bitops.h
--- a/include/asm-m32r/bitops.h	2005-01-10 20:11:19 -08:00
+++ b/include/asm-m32r/bitops.h	2005-01-10 20:11:19 -08:00
@@ -13,6 +13,7 @@
 
 #include <linux/config.h>
 #include <linux/compiler.h>
+#include <asm/assembler.h>
 #include <asm/system.h>
 #include <asm/byteorder.h>
 #include <asm/types.h>
@@ -25,18 +26,6 @@
  * bit 0 is the LSB of addr; bit 32 is the LSB of (addr+1).
  */
 
-#undef LOAD
-#undef STORE
-#ifdef CONFIG_SMP
-#define LOAD	"lock"
-#define STORE	"unlock"
-#else
-#define LOAD	"ld"
-#define STORE	"st"
-#endif
-
-/* #define ADDR (*(volatile long *) addr) */
-
 /**
  * set_bit - Atomically set a bit in memory
  * @nr: the bit to set
@@ -47,7 +36,7 @@
  * Note that @nr may be almost arbitrarily large; this function is not
  * restricted to acting on a single-word quantity.
  */
-static inline void set_bit(int nr, volatile void * addr)
+static __inline__ void set_bit(int nr, volatile void * addr)
 {
 	__u32 mask;
 	volatile __u32 *a = addr;
@@ -60,9 +49,9 @@
 	local_irq_save(flags);
 	__asm__ __volatile__ (
 		DCACHE_CLEAR("%0", "r6", "%1")
-		LOAD"	%0, @%1;		\n\t"
+		M32R_LOCK" %0, @%1;		\n\t"
 		"or	%0, %2;			\n\t"
-		STORE"	%0, @%1;		\n\t"
+		M32R_UNLOCK" %0, @%1;		\n\t"
 		: "=&r" (tmp)
 		: "r" (a), "r" (mask)
 		: "memory"
@@ -82,7 +71,7 @@
  * If it's called on the same region of memory simultaneously, the effect
  * may be that only one operation succeeds.
  */
-static inline void __set_bit(int nr, volatile void * addr)
+static __inline__ void __set_bit(int nr, volatile void * addr)
 {
 	__u32 mask;
 	volatile __u32 *a = addr;
@@ -102,7 +91,7 @@
  * you should call smp_mb__before_clear_bit() and/or smp_mb__after_clear_bit()
  * in order to ensure changes are visible on other processors.
  */
-static inline void clear_bit(int nr, volatile void * addr)
+static __inline__ void clear_bit(int nr, volatile void * addr)
 {
 	__u32 mask;
 	volatile __u32 *a = addr;
@@ -116,9 +105,9 @@
 
 	__asm__ __volatile__ (
 		DCACHE_CLEAR("%0", "r6", "%1")
-		LOAD"	%0, @%1;		\n\t"
+		M32R_LOCK" %0, @%1;		\n\t"
 		"and	%0, %2;			\n\t"
-		STORE"	%0, @%1;		\n\t"
+		M32R_UNLOCK" %0, @%1;		\n\t"
 		: "=&r" (tmp)
 		: "r" (a), "r" (~mask)
 		: "memory"
@@ -129,7 +118,7 @@
 	local_irq_restore(flags);
 }
 
-static inline void __clear_bit(int nr, volatile unsigned long * addr)
+static __inline__ void __clear_bit(int nr, volatile unsigned long * addr)
 {
 	unsigned long mask;
 	volatile unsigned long *a = addr;
@@ -151,7 +140,7 @@
  * If it's called on the same region of memory simultaneously, the effect
  * may be that only one operation succeeds.
  */
-static inline void __change_bit(int nr, volatile void * addr)
+static __inline__ void __change_bit(int nr, volatile void * addr)
 {
 	__u32 mask;
 	volatile __u32 *a = addr;
@@ -170,7 +159,7 @@
  * Note that @nr may be almost arbitrarily large; this function is not
  * restricted to acting on a single-word quantity.
  */
-static inline void change_bit(int nr, volatile void * addr)
+static __inline__ void change_bit(int nr, volatile void * addr)
 {
 	__u32  mask;
 	volatile __u32  *a = addr;
@@ -183,9 +172,9 @@
 	local_irq_save(flags);
 	__asm__ __volatile__ (
 		DCACHE_CLEAR("%0", "r6", "%1")
-		LOAD"	%0, @%1;		\n\t"
+		M32R_LOCK" %0, @%1;		\n\t"
 		"xor	%0, %2;			\n\t"
-		STORE"	%0, @%1;		\n\t"
+		M32R_UNLOCK" %0, @%1;		\n\t"
 		: "=&r" (tmp)
 		: "r" (a), "r" (mask)
 		: "memory"
@@ -204,7 +193,7 @@
  * This operation is atomic and cannot be reordered.
  * It also implies a memory barrier.
  */
-static inline int test_and_set_bit(int nr, volatile void * addr)
+static __inline__ int test_and_set_bit(int nr, volatile void * addr)
 {
 	__u32 mask, oldbit;
 	volatile __u32 *a = addr;
@@ -217,11 +206,11 @@
 	local_irq_save(flags);
 	__asm__ __volatile__ (
 		DCACHE_CLEAR("%0", "%1", "%2")
-		LOAD"	%0, @%2;		\n\t"
+		M32R_LOCK" %0, @%2;		\n\t"
 		"mv	%1, %0;			\n\t"
 		"and	%0, %3;			\n\t"
 		"or	%1, %3;			\n\t"
-		STORE"	%1, @%2;		\n\t"
+		M32R_UNLOCK" %1, @%2;		\n\t"
 		: "=&r" (oldbit), "=&r" (tmp)
 		: "r" (a), "r" (mask)
 		: "memory"
@@ -240,7 +229,7 @@
  * If two examples of this operation race, one can appear to succeed
  * but actually fail.  You must protect multiple accesses with a lock.
  */
-static inline int __test_and_set_bit(int nr, volatile void * addr)
+static __inline__ int __test_and_set_bit(int nr, volatile void * addr)
 {
 	__u32 mask, oldbit;
 	volatile __u32 *a = addr;
@@ -261,7 +250,7 @@
  * This operation is atomic and cannot be reordered.
  * It also implies a memory barrier.
  */
-static inline int test_and_clear_bit(int nr, volatile void * addr)
+static __inline__ int test_and_clear_bit(int nr, volatile void * addr)
 {
 	__u32 mask, oldbit;
 	volatile __u32 *a = addr;
@@ -275,12 +264,12 @@
 
 	__asm__ __volatile__ (
 		DCACHE_CLEAR("%0", "%1", "%3")
-		LOAD"	%0, @%3;		\n\t"
-		"mv	%1, %0; \n\t"
-		"and	%0, %2; \n\t"
-		"not	%2, %2; \n\t"
-		"and	%1, %2; \n\t"
-		STORE"	%1, @%3;		\n\t"
+		M32R_LOCK" %0, @%3;		\n\t"
+		"mv	%1, %0;			\n\t"
+		"and	%0, %2;			\n\t"
+		"not	%2, %2;			\n\t"
+		"and	%1, %2;			\n\t"
+		M32R_UNLOCK" %1, @%3;		\n\t"
 		: "=&r" (oldbit), "=&r" (tmp), "+r" (mask)
 		: "r" (a)
 		: "memory"
@@ -299,7 +288,7 @@
  * If two examples of this operation race, one can appear to succeed
  * but actually fail.  You must protect multiple accesses with a lock.
  */
-static inline int __test_and_clear_bit(int nr, volatile void * addr)
+static __inline__ int __test_and_clear_bit(int nr, volatile void * addr)
 {
 	__u32 mask, oldbit;
 	volatile __u32 *a = addr;
@@ -313,7 +302,7 @@
 }
 
 /* WARNING: non atomic and it can be reordered! */
-static inline int __test_and_change_bit(int nr, volatile void * addr)
+static __inline__ int __test_and_change_bit(int nr, volatile void * addr)
 {
 	__u32 mask, oldbit;
 	volatile __u32 *a = addr;
@@ -334,7 +323,7 @@
  * This operation is atomic and cannot be reordered.
  * It also implies a memory barrier.
  */
-static inline int test_and_change_bit(int nr, volatile void * addr)
+static __inline__ int test_and_change_bit(int nr, volatile void * addr)
 {
 	__u32 mask, oldbit;
 	volatile __u32 *a = addr;
@@ -347,11 +336,11 @@
 	local_irq_save(flags);
 	__asm__ __volatile__ (
 		DCACHE_CLEAR("%0", "%1", "%2")
-		LOAD"	%0, @%2;		\n\t"
+		M32R_LOCK" %0, @%2;		\n\t"
 		"mv	%1, %0;			\n\t"
 		"and	%0, %3;			\n\t"
 		"xor	%1, %3;			\n\t"
-		STORE"	%1, @%2;		\n\t"
+		M32R_UNLOCK" %1, @%2;		\n\t"
 		: "=&r" (oldbit), "=&r" (tmp)
 		: "r" (a), "r" (mask)
 		: "memory"
@@ -361,16 +350,12 @@
 	return (oldbit != 0);
 }
 
-#if 0 /* Fool kernel-doc since it doesn't do macros yet */
 /**
  * test_bit - Determine whether a bit is set
  * @nr: bit number to test
  * @addr: Address to start counting from
  */
-static int test_bit(int nr, const volatile void * addr);
-#endif
-
-static inline int test_bit(int nr, const volatile void * addr)
+static __inline__ int test_bit(int nr, const volatile void * addr)
 {
 	__u32 mask;
 	const volatile __u32 *a = addr;
@@ -387,7 +372,7 @@
  *
  * Undefined if no zero exists, so code should check against ~0UL first.
  */
-static inline unsigned long ffz(unsigned long word)
+static __inline__ unsigned long ffz(unsigned long word)
 {
 	int k;
 
@@ -420,7 +405,7 @@
  * @offset: The bitnumber to start searching at
  * @size: The maximum size to search
  */
-static inline int find_next_zero_bit(void *addr, int size, int offset)
+static __inline__ int find_next_zero_bit(void *addr, int size, int offset)
 {
 	unsigned long *p = ((unsigned long *) addr) + (offset >> 5);
 	unsigned long result = offset & ~31UL;
@@ -462,7 +447,7 @@
  *
  * Undefined if no bit exists, so code should check against 0 first.
  */
-static inline unsigned long __ffs(unsigned long word)
+static __inline__ unsigned long __ffs(unsigned long word)
 {
 	int k = 0;
 
diff -Nru a/include/asm-m32r/elf.h b/include/asm-m32r/elf.h
--- a/include/asm-m32r/elf.h	2005-01-10 20:11:20 -08:00
+++ b/include/asm-m32r/elf.h	2005-01-10 20:11:20 -08:00
@@ -54,6 +54,9 @@
 #define R_M32R_GOTPC_HI_ULO	59
 #define R_M32R_GOTPC_HI_SLO	60
 #define R_M32R_GOTPC_LO		61
+#define R_M32R_GOTOFF_HI_ULO	62
+#define R_M32R_GOTOFF_HI_SLO	63
+#define R_M32R_GOTOFF_LO	64
 
 #define R_M32R_NUM		256
 
diff -Nru a/include/asm-m32r/hardirq.h b/include/asm-m32r/hardirq.h
--- a/include/asm-m32r/hardirq.h	2005-01-10 20:11:21 -08:00
+++ b/include/asm-m32r/hardirq.h	2005-01-10 20:11:21 -08:00
@@ -1,3 +1,4 @@
+#ifdef __KERNEL__
 #ifndef __ASM_HARDIRQ_H
 #define __ASM_HARDIRQ_H
 
@@ -7,8 +8,6 @@
 
 typedef struct {
 	unsigned int __softirq_pending;
-	unsigned int __syscall_count;
-	struct task_struct * __ksoftirqd_task; /* waitqueue is too large */
 } ____cacheline_aligned irq_cpustat_t;
 
 #include <linux/irq_cpustat.h>	/* Standard mappings for irq_cpustat_t above */
@@ -28,16 +27,11 @@
 # error HARDIRQ_BITS is too low!
 #endif
 
-#define irq_enter()		(preempt_count() += HARDIRQ_OFFSET)
-#define nmi_enter()		(irq_enter())
-#define nmi_exit()		(preempt_count() -= HARDIRQ_OFFSET)
-
-#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)
+static inline void ack_bad_irq(int irq)
+{
+	printk(KERN_CRIT "unexpected IRQ trap at vector %02x\n", irq);
+	BUG();
+}
 
 #endif /* __ASM_HARDIRQ_H */
+#endif /* __KERNEL__ */
diff -Nru a/include/asm-m32r/irq.h b/include/asm-m32r/irq.h
--- a/include/asm-m32r/irq.h	2005-01-10 20:11:16 -08:00
+++ b/include/asm-m32r/irq.h	2005-01-10 20:11:16 -08:00
@@ -1,8 +1,7 @@
+#ifdef __KERNEL__
 #ifndef _ASM_M32R_IRQ_H
 #define _ASM_M32R_IRQ_H
 
-/* $Id$ */
-
 #include <linux/config.h>
 
 #if defined(CONFIG_PLAT_M32700UT_Alpha) || defined(CONFIG_PLAT_USRV)
@@ -72,15 +71,5 @@
 
 #define irq_canonicalize(irq)	(irq)
 
-#ifndef __ASSEMBLY__
-extern void disable_irq(unsigned int);
-extern void disable_irq_nosync(unsigned int);
-extern void enable_irq(unsigned int);
-
-struct irqaction;
-struct pt_regs;
-int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *);
-#endif
-
-#endif	/* _ASM_M32R_IRQ_H */
-
+#endif /* _ASM_M32R_IRQ_H */
+#endif /* __KERNEL__ */
diff -Nru a/include/asm-m32r/mmu_context.h b/include/asm-m32r/mmu_context.h
--- a/include/asm-m32r/mmu_context.h	2005-01-10 20:11:23 -08:00
+++ b/include/asm-m32r/mmu_context.h	2005-01-10 20:11:23 -08:00
@@ -1,7 +1,7 @@
 #ifndef _ASM_M32R_MMU_CONTEXT_H
 #define _ASM_M32R_MMU_CONTEXT_H
 
-/* $Id */
+#ifdef __KERNEL__
 
 #include <linux/config.h>
 
@@ -34,13 +34,13 @@
 #define mm_context(mm)		mm->context[smp_processor_id()]
 #endif /* not CONFIG_SMP */
 
-#define set_tlb_tag(entry, tag)	(*entry = (tag & PAGE_MASK)|get_asid())
+#define set_tlb_tag(entry, tag)		(*entry = (tag & PAGE_MASK)|get_asid())
 #define set_tlb_data(entry, data)	(*entry = (data | _PAGE_PRESENT))
 
 #ifdef CONFIG_MMU
 #define enter_lazy_tlb(mm, tsk)	do { } while (0)
 
-static __inline__ void get_new_mmu_context(struct mm_struct *mm)
+static inline void get_new_mmu_context(struct mm_struct *mm)
 {
 	unsigned long mc = ++mmu_context_cache;
 
@@ -59,7 +59,7 @@
 /*
  * Get MMU context if needed.
  */
-static __inline__ void get_mmu_context(struct mm_struct *mm)
+static inline void get_mmu_context(struct mm_struct *mm)
 {
 	if (mm) {
 		unsigned long mc = mmu_context_cache;
@@ -75,7 +75,7 @@
  * Initialize the context related info for a new mm_struct
  * instance.
  */
-static __inline__ int init_new_context(struct task_struct *tsk,
+static inline int init_new_context(struct task_struct *tsk,
 	struct mm_struct *mm)
 {
 #ifndef CONFIG_SMP
@@ -97,12 +97,12 @@
  */
 #define destroy_context(mm)	do { } while (0)
 
-static __inline__ void set_asid(unsigned long asid)
+static inline void set_asid(unsigned long asid)
 {
 	*(volatile unsigned long *)MASID = (asid & MMU_CONTEXT_ASID_MASK);
 }
 
-static __inline__ unsigned long get_asid(void)
+static inline unsigned long get_asid(void)
 {
 	unsigned long asid;
 
@@ -116,13 +116,13 @@
  * After we have set current->mm to a new value, this activates
  * the context for the new mm so we see the new mappings.
  */
-static __inline__ void activate_context(struct mm_struct *mm)
+static inline void activate_context(struct mm_struct *mm)
 {
 	get_mmu_context(mm);
 	set_asid(mm_context(mm) & MMU_CONTEXT_ASID_MASK);
 }
 
-static __inline__ void switch_mm(struct mm_struct *prev,
+static inline void switch_mm(struct mm_struct *prev,
 	struct mm_struct *next, struct task_struct *tsk)
 {
 #ifdef CONFIG_SMP
@@ -165,5 +165,6 @@
 
 #endif /* not __ASSEMBLY__ */
 
-#endif /* _ASM_M32R_MMU_CONTEXT_H */
+#endif /* __KERNEL__ */
 
+#endif /* _ASM_M32R_MMU_CONTEXT_H */
diff -Nru a/include/asm-m32r/pgalloc.h b/include/asm-m32r/pgalloc.h
--- a/include/asm-m32r/pgalloc.h	2005-01-10 20:11:22 -08:00
+++ b/include/asm-m32r/pgalloc.h	2005-01-10 20:11:22 -08:00
@@ -23,10 +23,7 @@
  */
 static __inline__ pgd_t *pgd_alloc(struct mm_struct *mm)
 {
-	pgd_t *pgd = (pgd_t *)__get_free_page(GFP_KERNEL);
-
-	if (pgd)
-		clear_page(pgd);
+	pgd_t *pgd = (pgd_t *)__get_free_page(GFP_KERNEL|__GFP_ZERO);
 
 	return pgd;
 }
@@ -39,10 +36,7 @@
 static __inline__ pte_t *pte_alloc_one_kernel(struct mm_struct *mm,
 	unsigned long address)
 {
-	pte_t *pte = (pte_t *)__get_free_page(GFP_KERNEL);
-
-	if (pte)
-		clear_page(pte);
+	pte_t *pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_ZERO);
 
 	return pte;
 }
@@ -50,10 +44,8 @@
 static __inline__ struct page *pte_alloc_one(struct mm_struct *mm,
 	unsigned long address)
 {
-	struct page *pte = alloc_page(GFP_KERNEL);
+	struct page *pte = alloc_page(GFP_KERNEL|__GFP_ZERO);
 
-	if (pte)
-		clear_page(page_address(pte));
 
 	return pte;
 }
diff -Nru a/include/asm-m32r/pgtable-2level.h b/include/asm-m32r/pgtable-2level.h
--- a/include/asm-m32r/pgtable-2level.h	2005-01-10 20:11:17 -08:00
+++ b/include/asm-m32r/pgtable-2level.h	2005-01-10 20:11:17 -08:00
@@ -1,7 +1,7 @@
 #ifndef _ASM_M32R_PGTABLE_2LEVEL_H
 #define _ASM_M32R_PGTABLE_2LEVEL_H
 
-/* $Id$ */
+#ifdef __KERNEL__
 
 #include <linux/config.h>
 
@@ -33,9 +33,9 @@
  * setup: the pgd is never bad, and a pmd always exists (as it's folded
  * into the pgd entry)
  */
-static __inline__ int pgd_none(pgd_t pgd)	{ return 0; }
-static __inline__ int pgd_bad(pgd_t pgd)	{ return 0; }
-static __inline__ int pgd_present(pgd_t pgd)	{ return 1; }
+static inline int pgd_none(pgd_t pgd)	{ return 0; }
+static inline int pgd_bad(pgd_t pgd)	{ return 0; }
+static inline int pgd_present(pgd_t pgd)	{ return 1; }
 #define pgd_clear(xp)				do { } while (0)
 
 /*
@@ -55,7 +55,7 @@
 #define pgd_page(pgd) \
 ((unsigned long) __va(pgd_val(pgd) & PAGE_MASK))
 
-static __inline__ pmd_t *pmd_offset(pgd_t * dir, unsigned long address)
+static inline pmd_t *pmd_offset(pgd_t * dir, unsigned long address)
 {
 	return (pmd_t *) dir;
 }
@@ -68,10 +68,10 @@
 #define pfn_pte(pfn, prot)	__pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot))
 #define pfn_pmd(pfn, prot)	__pmd(((pfn) << PAGE_SHIFT) | pgprot_val(prot))
 
-/* M32R_FIXME : PTE_FILE_MAX_BITS, pte_to_pgoff, pgoff_to_pte */
-#define PTE_FILE_MAX_BITS	31
-#define pte_to_pgoff(pte)	(pte_val(pte) >> 1)
-#define pgoff_to_pte(off)	((pte_t) { ((off) << 1) | _PAGE_FILE })
+#define PTE_FILE_MAX_BITS	29
+#define pte_to_pgoff(pte)	(((pte_val(pte) >> 2) & 0xef) | (((pte_val(pte) >> 10)) << 7))
+#define pgoff_to_pte(off)	((pte_t) { (((off) & 0xef) << 2) | (((off) >> 7) << 10) | _PAGE_FILE })
 
-#endif /* _ASM_M32R_PGTABLE_2LEVEL_H */
+#endif /* __KERNEL__ */
 
+#endif /* _ASM_M32R_PGTABLE_2LEVEL_H */
diff -Nru a/include/asm-m32r/pgtable.h b/include/asm-m32r/pgtable.h
--- a/include/asm-m32r/pgtable.h	2005-01-10 20:11:15 -08:00
+++ b/include/asm-m32r/pgtable.h	2005-01-10 20:11:15 -08:00
@@ -1,8 +1,9 @@
 #ifndef _ASM_M32R_PGTABLE_H
 #define _ASM_M32R_PGTABLE_H
 
-/* $Id$ */
+#include <asm-generic/4level-fixup.h>
 
+#ifdef __KERNEL__
 /*
  * The Linux memory management assumes a three-level page table setup. On
  * the M32R, we use that, but "fold" the mid level into the top-level page
@@ -38,11 +39,6 @@
 
 #endif /* !__ASSEMBLY__ */
 
-/*
- * The Linux x86 paging architecture is 'compile-time dual-mode', it
- * implements both the traditional 2-level x86 page tables and the
- * newer 3-level PAE-mode page tables.
- */
 #ifndef __ASSEMBLY__
 #include <asm/pgtable-2level.h>
 #endif
@@ -69,14 +65,6 @@
 #define VMALLOC_END		KSEG3
 
 /*
- * The 4MB page is guessing..  Detailed in the infamous "Chapter H"
- * of the Pentium details, but assuming intel did the straightforward
- * thing, this bit set in the page directory entry just means that
- * the page directory entry points directly to a 4MB-aligned block of
- * memory.
- */
-
-/*
  *     M32R TLB format
  *
  *     [0]    [1:19]           [20:23]       [24:31]
@@ -89,47 +77,34 @@
  *                                     RWX
  */
 
-#define _PAGE_BIT_DIRTY		0	/* software */
+#define _PAGE_BIT_DIRTY		0	/* software: page changed */
 #define _PAGE_BIT_FILE		0	/* when !present: nonlinear file
 					   mapping */
-#define _PAGE_BIT_PRESENT	1	/* Valid */
+#define _PAGE_BIT_PRESENT	1	/* Valid: page is valid */
 #define _PAGE_BIT_GLOBAL	2	/* Global */
 #define _PAGE_BIT_LARGE		3	/* Large */
 #define _PAGE_BIT_EXEC		4	/* Execute */
 #define _PAGE_BIT_WRITE		5	/* Write */
 #define _PAGE_BIT_READ		6	/* Read */
 #define _PAGE_BIT_NONCACHABLE	7	/* Non cachable */
-#define _PAGE_BIT_USER		8	/* software */
-#define _PAGE_BIT_ACCESSED	9	/* software */
+#define _PAGE_BIT_ACCESSED	8	/* software: page referenced */
+#define _PAGE_BIT_PROTNONE	9	/* software: if not present */
 
-#define _PAGE_DIRTY	\
-	(1UL << _PAGE_BIT_DIRTY)	/* software : page changed */
-#define _PAGE_FILE	\
-	(1UL << _PAGE_BIT_FILE)		/* when !present: nonlinear file
-					   mapping */
-#define _PAGE_PRESENT	\
-	(1UL << _PAGE_BIT_PRESENT)	/* Valid : Page is Valid */
-#define _PAGE_GLOBAL	\
-	(1UL << _PAGE_BIT_GLOBAL)	/* Global */
-#define _PAGE_LARGE	\
-	(1UL << _PAGE_BIT_LARGE)	/* Large */
-#define _PAGE_EXEC	\
-	(1UL << _PAGE_BIT_EXEC)		/* Execute */
-#define _PAGE_WRITE	\
-	(1UL << _PAGE_BIT_WRITE)	/* Write */
-#define _PAGE_READ	\
-	(1UL << _PAGE_BIT_READ)		/* Read */
-#define _PAGE_NONCACHABLE	\
-	(1UL<<_PAGE_BIT_NONCACHABLE)	/* Non cachable */
-#define _PAGE_USER	\
-	(1UL << _PAGE_BIT_USER)		/* software : user space access
-					   allowed */
-#define _PAGE_ACCESSED	\
-	(1UL << _PAGE_BIT_ACCESSED)	/* software : page referenced */
+#define _PAGE_DIRTY		(1UL << _PAGE_BIT_DIRTY)
+#define _PAGE_FILE		(1UL << _PAGE_BIT_FILE)
+#define _PAGE_PRESENT		(1UL << _PAGE_BIT_PRESENT)
+#define _PAGE_GLOBAL		(1UL << _PAGE_BIT_GLOBAL)
+#define _PAGE_LARGE		(1UL << _PAGE_BIT_LARGE)
+#define _PAGE_EXEC		(1UL << _PAGE_BIT_EXEC)
+#define _PAGE_WRITE		(1UL << _PAGE_BIT_WRITE)
+#define _PAGE_READ		(1UL << _PAGE_BIT_READ)
+#define _PAGE_NONCACHABLE	(1UL << _PAGE_BIT_NONCACHABLE)
+#define _PAGE_ACCESSED		(1UL << _PAGE_BIT_ACCESSED)
+#define _PAGE_PROTNONE		(1UL << _PAGE_BIT_PROTNONE)
 
 #define _PAGE_TABLE	\
-	( _PAGE_PRESENT | _PAGE_WRITE | _PAGE_READ | _PAGE_USER \
-	| _PAGE_ACCESSED | _PAGE_DIRTY )
+	( _PAGE_PRESENT | _PAGE_WRITE | _PAGE_READ | _PAGE_ACCESSED \
+	| _PAGE_DIRTY )
 #define _KERNPG_TABLE	\
 	( _PAGE_PRESENT | _PAGE_WRITE | _PAGE_READ | _PAGE_ACCESSED \
 	| _PAGE_DIRTY )
@@ -138,24 +113,20 @@
 
 #ifdef CONFIG_MMU
 #define PAGE_NONE	\
-	__pgprot(_PAGE_PRESENT | _PAGE_ACCESSED)
+	__pgprot(_PAGE_PROTNONE | _PAGE_ACCESSED)
 #define PAGE_SHARED	\
-	__pgprot(_PAGE_PRESENT | _PAGE_WRITE | _PAGE_READ | _PAGE_USER \
-		| _PAGE_ACCESSED)
-#define PAGE_SHARED_X	\
+	__pgprot(_PAGE_PRESENT | _PAGE_WRITE | _PAGE_READ | _PAGE_ACCESSED)
+#define PAGE_SHARED_EXEC \
 	__pgprot(_PAGE_PRESENT | _PAGE_EXEC | _PAGE_WRITE | _PAGE_READ \
-		| _PAGE_USER | _PAGE_ACCESSED)
-#define PAGE_COPY	\
-	__pgprot(_PAGE_PRESENT | _PAGE_EXEC | _PAGE_READ | _PAGE_USER \
-		| _PAGE_ACCESSED)
-#define PAGE_COPY_X	\
-	__pgprot(_PAGE_PRESENT | _PAGE_EXEC | _PAGE_READ | _PAGE_USER \
 		| _PAGE_ACCESSED)
+#define PAGE_COPY	\
+	__pgprot(_PAGE_PRESENT | _PAGE_READ | _PAGE_ACCESSED)
+#define PAGE_COPY_EXEC	\
+	__pgprot(_PAGE_PRESENT | _PAGE_EXEC | _PAGE_READ | _PAGE_ACCESSED)
 #define PAGE_READONLY	\
-	__pgprot(_PAGE_PRESENT | _PAGE_READ | _PAGE_USER | _PAGE_ACCESSED)
-#define PAGE_READONLY_X	\
-	__pgprot(_PAGE_PRESENT | _PAGE_EXEC | _PAGE_READ | _PAGE_USER \
-		| _PAGE_ACCESSED)
+	__pgprot(_PAGE_PRESENT | _PAGE_READ | _PAGE_ACCESSED)
+#define PAGE_READONLY_EXEC \
+	__pgprot(_PAGE_PRESENT | _PAGE_EXEC | _PAGE_READ | _PAGE_ACCESSED)
 
 #define __PAGE_KERNEL	\
 	( _PAGE_PRESENT | _PAGE_EXEC | _PAGE_WRITE | _PAGE_READ | _PAGE_DIRTY \
@@ -170,53 +141,47 @@
 #define PAGE_KERNEL_NOCACHE	MAKE_GLOBAL(__PAGE_KERNEL_NOCACHE)
 
 #else
-#define PAGE_NONE               __pgprot(0)
-#define PAGE_SHARED             __pgprot(0)
-#define PAGE_SHARED_X           __pgprot(0)
-#define PAGE_COPY               __pgprot(0)
-#define PAGE_COPY_X             __pgprot(0)
-#define PAGE_READONLY           __pgprot(0)
-#define PAGE_READONLY_X         __pgprot(0)
-
-#define PAGE_KERNEL             __pgprot(0)
-#define PAGE_KERNEL_RO          __pgprot(0)
-#define PAGE_KERNEL_NOCACHE     __pgprot(0)
+#define PAGE_NONE		__pgprot(0)
+#define PAGE_SHARED		__pgprot(0)
+#define PAGE_SHARED_EXEC	__pgprot(0)
+#define PAGE_COPY		__pgprot(0)
+#define PAGE_COPY_EXEC		__pgprot(0)
+#define PAGE_READONLY		__pgprot(0)
+#define PAGE_READONLY_EXEC	__pgprot(0)
+
+#define PAGE_KERNEL		__pgprot(0)
+#define PAGE_KERNEL_RO		__pgprot(0)
+#define PAGE_KERNEL_NOCACHE	__pgprot(0)
 #endif /* CONFIG_MMU */
 
-/*
- * The i386 can't do page protection for execute, and considers that
- * the same are read. Also, write permissions imply read permissions.
- * This is the closest we can get..
- */
-	/* rwx */
+	/* xwr */
 #define __P000	PAGE_NONE
-#define __P001	PAGE_READONLY_X
-#define __P010	PAGE_COPY_X
-#define __P011	PAGE_COPY_X
-#define __P100	PAGE_READONLY
-#define __P101	PAGE_READONLY_X
-#define __P110	PAGE_COPY_X
-#define __P111	PAGE_COPY_X
+#define __P001	PAGE_READONLY
+#define __P010	PAGE_COPY
+#define __P011	PAGE_COPY
+#define __P100	PAGE_READONLY_EXEC
+#define __P101	PAGE_READONLY_EXEC
+#define __P110	PAGE_COPY_EXEC
+#define __P111	PAGE_COPY_EXEC
 
 #define __S000	PAGE_NONE
-#define __S001	PAGE_READONLY_X
+#define __S001	PAGE_READONLY
 #define __S010	PAGE_SHARED
-#define __S011	PAGE_SHARED_X
-#define __S100	PAGE_READONLY
-#define __S101	PAGE_READONLY_X
-#define __S110	PAGE_SHARED
-#define __S111	PAGE_SHARED_X
+#define __S011	PAGE_SHARED
+#define __S100	PAGE_READONLY_EXEC
+#define __S101	PAGE_READONLY_EXEC
+#define __S110	PAGE_SHARED_EXEC
+#define __S111	PAGE_SHARED_EXEC
 
 /* page table for 0-4MB for everybody */
 
-#define pte_present(x)	(pte_val(x) & _PAGE_PRESENT)
+#define pte_present(x)	(pte_val(x) & (_PAGE_PRESENT | _PAGE_PROTNONE))
 #define pte_clear(xp)	do { set_pte(xp, __pte(0)); } while (0)
 
 #define pmd_none(x)	(!pmd_val(x))
 #define pmd_present(x)	(pmd_val(x) & _PAGE_PRESENT)
 #define pmd_clear(xp)	do { set_pmd(xp, __pmd(0)); } while (0)
-#define	pmd_bad(x)	((pmd_val(x) & (~PAGE_MASK & ~_PAGE_USER)) \
-	!= _KERNPG_TABLE)
+#define	pmd_bad(x)	((pmd_val(x) & ~PAGE_MASK) != _KERNPG_TABLE)
 
 #define pages_to_mb(x)	((x) >> (20 - PAGE_SHIFT))
 
@@ -224,32 +189,27 @@
  * The following only work if pte_present() is true.
  * Undefined behaviour if not..
  */
-static __inline__ int pte_user(pte_t pte)
-{
-	return pte_val(pte) & _PAGE_USER;
-}
-
-static __inline__ int pte_read(pte_t pte)
+static inline int pte_read(pte_t pte)
 {
 	return pte_val(pte) & _PAGE_READ;
 }
 
-static __inline__ int pte_exec(pte_t pte)
+static inline int pte_exec(pte_t pte)
 {
 	return pte_val(pte) & _PAGE_EXEC;
 }
 
-static __inline__ int pte_dirty(pte_t pte)
+static inline int pte_dirty(pte_t pte)
 {
 	return pte_val(pte) & _PAGE_DIRTY;
 }
 
-static __inline__ int pte_young(pte_t pte)
+static inline int pte_young(pte_t pte)
 {
 	return pte_val(pte) & _PAGE_ACCESSED;
 }
 
-static __inline__ int pte_write(pte_t pte)
+static inline int pte_write(pte_t pte)
 {
 	return pte_val(pte) & _PAGE_WRITE;
 }
@@ -257,96 +217,111 @@
 /*
  * The following only works if pte_present() is not true.
  */
-static __inline__ int pte_file(pte_t pte)
+static inline int pte_file(pte_t pte)
 {
 	return pte_val(pte) & _PAGE_FILE;
 }
 
-static __inline__ pte_t pte_rdprotect(pte_t pte)
+static inline pte_t pte_rdprotect(pte_t pte)
 {
 	pte_val(pte) &= ~_PAGE_READ;
 	return pte;
 }
 
-static __inline__ pte_t pte_exprotect(pte_t pte)
+static inline pte_t pte_exprotect(pte_t pte)
 {
 	pte_val(pte) &= ~_PAGE_EXEC;
 	return pte;
 }
 
-static __inline__ pte_t pte_mkclean(pte_t pte)
+static inline pte_t pte_mkclean(pte_t pte)
 {
 	pte_val(pte) &= ~_PAGE_DIRTY;
 	return pte;
 }
 
-static __inline__ pte_t pte_mkold(pte_t pte)
+static inline pte_t pte_mkold(pte_t pte)
 {
-	pte_val(pte) &= ~_PAGE_ACCESSED;return pte;}
+	pte_val(pte) &= ~_PAGE_ACCESSED;
+	return pte;
+}
 
-static __inline__ pte_t pte_wrprotect(pte_t pte)
+static inline pte_t pte_wrprotect(pte_t pte)
 {
 	pte_val(pte) &= ~_PAGE_WRITE;
 	return pte;
 }
 
-static __inline__ pte_t pte_mkread(pte_t pte)
+static inline pte_t pte_mkread(pte_t pte)
 {
 	pte_val(pte) |= _PAGE_READ;
 	return pte;
 }
 
-static __inline__ pte_t pte_mkexec(pte_t pte)
+static inline pte_t pte_mkexec(pte_t pte)
 {
 	pte_val(pte) |= _PAGE_EXEC;
 	return pte;
 }
 
-static __inline__ pte_t pte_mkdirty(pte_t pte)
+static inline pte_t pte_mkdirty(pte_t pte)
 {
 	pte_val(pte) |= _PAGE_DIRTY;
 	return pte;
 }
 
-static __inline__ pte_t pte_mkyoung(pte_t pte)
+static inline pte_t pte_mkyoung(pte_t pte)
 {
 	pte_val(pte) |= _PAGE_ACCESSED;
 	return pte;
 }
 
-static __inline__ pte_t pte_mkwrite(pte_t pte)
+static inline pte_t pte_mkwrite(pte_t pte)
 {
 	pte_val(pte) |= _PAGE_WRITE;
 	return pte;
 }
 
-static __inline__  int ptep_test_and_clear_dirty(pte_t *ptep)
+static inline  int ptep_test_and_clear_dirty(pte_t *ptep)
 {
 	return test_and_clear_bit(_PAGE_BIT_DIRTY, ptep);
 }
 
-static __inline__  int ptep_test_and_clear_young(pte_t *ptep)
+static inline  int ptep_test_and_clear_young(pte_t *ptep)
 {
 	return test_and_clear_bit(_PAGE_BIT_ACCESSED, ptep);
 }
 
-static __inline__ void ptep_set_wrprotect(pte_t *ptep)
+static inline void ptep_set_wrprotect(pte_t *ptep)
 {
 	clear_bit(_PAGE_BIT_WRITE, ptep);
 }
 
-static __inline__ void ptep_mkdirty(pte_t *ptep)
+static inline void ptep_mkdirty(pte_t *ptep)
 {
 	set_bit(_PAGE_BIT_DIRTY, ptep);
 }
 
 /*
+ * Macro and implementation to make a page protection as uncachable.
+ */
+static inline pgprot_t pgprot_noncached(pgprot_t _prot)
+{
+	unsigned long prot = pgprot_val(_prot);
+
+	prot |= _PAGE_NONCACHABLE;
+	return __pgprot(prot);
+}
+
+#define pgprot_writecombine(prot) pgprot_noncached(prot)
+
+/*
  * Conversion functions: convert a page and protection to a page entry,
  * and a page entry and page directory to the page they refer to.
  */
 #define mk_pte(page, pgprot)	pfn_pte(page_to_pfn(page), pgprot)
 
-static __inline__ pte_t pte_modify(pte_t pte, pgprot_t newprot)
+static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
 {
 	set_pte(&pte, __pte((pte_val(pte) & _PAGE_CHG_MASK) \
 		| pgprot_val(newprot)));
@@ -361,7 +336,7 @@
  * and a page entry and page directory to the page they refer to.
  */
 
-static __inline__ void pmd_set(pmd_t * pmdp, pte_t * ptep)
+static inline void pmd_set(pmd_t * pmdp, pte_t * ptep)
 {
 	pmd_val(*pmdp) = (((unsigned long) ptep) & PAGE_MASK);
 }
@@ -396,10 +371,10 @@
 #define pte_unmap_nested(pte)	do { } while (0)
 
 /* Encode and de-code a swap entry */
-#define __swp_type(x)			(((x).val >> 1) & 0x3f)
-#define __swp_offset(x)			((x).val >> 8)
+#define __swp_type(x)			(((x).val >> 2) & 0x3f)
+#define __swp_offset(x)			((x).val >> 10)
 #define __swp_entry(type, offset)	\
-	((swp_entry_t) { ((type) << 1) | ((offset) << 8) })
+	((swp_entry_t) { ((type) << 2) | ((offset) << 10) })
 #define __pte_to_swp_entry(pte)		((swp_entry_t) { pte_val(pte) })
 #define __swp_entry_to_pte(x)		((pte_t) { (x).val })
 
@@ -408,8 +383,8 @@
 /* Needs to be defined here and not in linux/mm.h, as it is arch dependent */
 #define kern_addr_valid(addr)	(1)
 
-#define io_remap_page_range(vma, vaddr, paddr, size, prot)		\
-		remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot)
+#define io_remap_page_range(vma, vaddr, paddr, size, prot)	\
+	remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot)
 
 #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG
 #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY
@@ -419,5 +394,6 @@
 #define __HAVE_ARCH_PTE_SAME
 #include <asm-generic/pgtable.h>
 
-#endif /* _ASM_M32R_PGTABLE_H */
+#endif /* __KERNEL__ */
 
+#endif /* _ASM_M32R_PGTABLE_H */
diff -Nru a/include/asm-m32r/processor.h b/include/asm-m32r/processor.h
--- a/include/asm-m32r/processor.h	2005-01-10 20:11:15 -08:00
+++ b/include/asm-m32r/processor.h	2005-01-10 20:11:15 -08:00
@@ -70,10 +70,12 @@
 	unsigned long seg;
 } mm_segment_t;
 
+#define MAX_TRAPS 10
+
 struct debug_trap {
 	int nr_trap;
-	unsigned long	addr;
-	unsigned long	insn;
+	unsigned long	addr[MAX_TRAPS];
+	unsigned long	insn[MAX_TRAPS];
 };
 
 struct thread_struct {
diff -Nru a/include/asm-m32r/semaphore.h b/include/asm-m32r/semaphore.h
--- a/include/asm-m32r/semaphore.h	2005-01-10 20:11:17 -08:00
+++ b/include/asm-m32r/semaphore.h	2005-01-10 20:11:17 -08:00
@@ -15,19 +15,10 @@
 #include <linux/config.h>
 #include <linux/wait.h>
 #include <linux/rwsem.h>
+#include <asm/assembler.h>
 #include <asm/system.h>
 #include <asm/atomic.h>
 
-#undef LOAD
-#undef STORE
-#ifdef CONFIG_SMP
-#define LOAD	"lock"
-#define STORE	"unlock"
-#else
-#define LOAD	"ld"
-#define STORE	"st"
-#endif
-
 struct semaphore {
 	atomic_t count;
 	int sleepers;
@@ -97,9 +88,9 @@
 	__asm__ __volatile__ (
 		"# down				\n\t"
 		DCACHE_CLEAR("%0", "r4", "%1")
-		LOAD"	%0, @%1;		\n\t"
+		M32R_LOCK" %0, @%1;		\n\t"
 		"addi	%0, #-1;		\n\t"
-		STORE"	%0, @%1;		\n\t"
+		M32R_UNLOCK" %0, @%1;		\n\t"
 		: "=&r" (count)
 		: "r" (&sem->count)
 		: "memory"
@@ -128,9 +119,9 @@
 	__asm__ __volatile__ (
 		"# down_interruptible		\n\t"
 		DCACHE_CLEAR("%0", "r4", "%1")
-		LOAD"	%0, @%1;		\n\t"
+		M32R_LOCK" %0, @%1;		\n\t"
 		"addi	%0, #-1;		\n\t"
-		STORE"	%0, @%1;		\n\t"
+		M32R_UNLOCK" %0, @%1;		\n\t"
 		: "=&r" (count)
 		: "r" (&sem->count)
 		: "memory"
@@ -160,9 +151,9 @@
 	__asm__ __volatile__ (
 		"# down_trylock			\n\t"
 		DCACHE_CLEAR("%0", "r4", "%1")
-		LOAD"	%0, @%1;		\n\t"
+		M32R_LOCK" %0, @%1;		\n\t"
 		"addi	%0, #-1;		\n\t"
-		STORE"	%0, @%1;		\n\t"
+		M32R_UNLOCK" %0, @%1;		\n\t"
 		: "=&r" (count)
 		: "r" (&sem->count)
 		: "memory"
@@ -193,9 +184,9 @@
 	__asm__ __volatile__ (
 		"# up				\n\t"
 		DCACHE_CLEAR("%0", "r4", "%1")
-		LOAD"	%0, @%1;		\n\t"
+		M32R_LOCK" %0, @%1;		\n\t"
 		"addi	%0, #1;			\n\t"
-		STORE"	%0, @%1;		\n\t"
+		M32R_UNLOCK" %0, @%1;		\n\t"
 		: "=&r" (count)
 		: "r" (&sem->count)
 		: "memory"
diff -Nru a/include/asm-m32r/smp.h b/include/asm-m32r/smp.h
--- a/include/asm-m32r/smp.h	2005-01-10 20:11:15 -08:00
+++ b/include/asm-m32r/smp.h	2005-01-10 20:11:15 -08:00
@@ -92,7 +92,6 @@
 }
 
 extern void smp_send_timer(void);
-extern void calibrate_delay(void);
 extern unsigned long send_IPI_mask_phys(cpumask_t, int, int);
 
 #endif	/* not __ASSEMBLY__ */
diff -Nru a/include/asm-m32r/system.h b/include/asm-m32r/system.h
--- a/include/asm-m32r/system.h	2005-01-10 20:11:16 -08:00
+++ b/include/asm-m32r/system.h	2005-01-10 20:11:16 -08:00
@@ -7,6 +7,7 @@
  * for more details.
  *
  * Copyright (C) 2001  by Hiroyuki Kondo, Hirokazu Takata, and Hitoshi Yamamoto
+ * Copyright (C) 2004  Hirokazu Takata <takata at linux-m32r.org>
  */
 
 #include <linux/config.h>
@@ -73,7 +74,7 @@
 #define local_irq_disable() \
 	__asm__ __volatile__ ("clrpsw #0x40 -> nop": : :"memory")
 #else	/* CONFIG_CHIP_M32102 */
-static __inline__ void local_irq_enable(void)
+static inline void local_irq_enable(void)
 {
 	unsigned long tmpreg;
 	__asm__ __volatile__(
@@ -83,7 +84,7 @@
 	: "=&r" (tmpreg) : : "cbit", "memory");
 }
 
-static __inline__ void local_irq_disable(void)
+static inline void local_irq_disable(void)
 {
 	unsigned long tmpreg0, tmpreg1;
 	__asm__ __volatile__(
@@ -219,11 +220,7 @@
  * rmb() prevents loads being reordered across this point.
  * wmb() prevents stores being reordered across this point.
  */
-#if 0
-#define mb()   __asm__ __volatile__ ("push r0; \n\t pop r0;" : : : "memory")
-#else
-#define mb()   __asm__ __volatile__ ("" : : : "memory")
-#endif
+#define mb()   barrier()
 #define rmb()  mb()
 #define wmb()  mb()
 
@@ -298,4 +295,3 @@
 #define set_wmb(var, value) do { var = value; wmb(); } while (0)
 
 #endif  /* _ASM_M32R_SYSTEM_H */
-
diff -Nru a/include/asm-m32r/thread_info.h b/include/asm-m32r/thread_info.h
--- a/include/asm-m32r/thread_info.h	2005-01-10 20:11:22 -08:00
+++ b/include/asm-m32r/thread_info.h	2005-01-10 20:11:22 -08:00
@@ -1,12 +1,13 @@
-/* thread_info.h: i386 low-level thread information
+#ifndef _ASM_M32R_THREAD_INFO_H
+#define _ASM_M32R_THREAD_INFO_H
+
+/* thread_info.h: m32r low-level thread information
  *
  * Copyright (C) 2002  David Howells (dhowells@redhat.com)
  * - Incorporating suggestions made by Linus Torvalds and Dave Miller
+ * Copyright (C) 2004  Hirokazu Takata <takata at linux-m32r.org>
  */
 
-#ifndef _ASM_THREAD_INFO_H
-#define _ASM_THREAD_INFO_H
-
 #ifdef __KERNEL__
 
 #ifndef __ASSEMBLY__
@@ -30,7 +31,7 @@
 	__s32			preempt_count; /* 0 => preemptable, <0 => BUG */
 
 	mm_segment_t		addr_limit;	/* thread address space:
-					 	   0-0xBFFFFFFF for user-thead
+					 	   0-0xBFFFFFFF for user-thread
 						   0-0xFFFFFFFF for kernel-thread
 						*/
 	struct restart_block    restart_block;
@@ -52,7 +53,7 @@
 
 #endif
 
-#define PREEMPT_ACTIVE		0x4000000
+#define PREEMPT_ACTIVE		0x10000000
 
 /*
  * macros/functions for gaining access to the thread information structure
@@ -77,34 +78,64 @@
 #define init_thread_info	(init_thread_union.thread_info)
 #define init_stack		(init_thread_union.stack)
 
+#define THREAD_SIZE (2*PAGE_SIZE)
+
 /* how to get the thread information struct from C */
 static inline struct thread_info *current_thread_info(void)
 {
 	struct thread_info *ti;
 
 	__asm__ __volatile__ (
-		"ldi	%0, #0xffffe000;	\n\t"
-		"and	%0, sp;			\n\t"
-		: "=r" (ti)
+		"ldi	%0, #%1			\n\t"
+		"and	%0, sp			\n\t"
+		: "=r" (ti) : "i" (~(THREAD_SIZE - 1))
 	);
 
 	return ti;
 }
 
 /* thread information allocation */
-#define THREAD_SIZE (2*PAGE_SIZE)
-#define alloc_thread_info(task) \
-	((struct thread_info *) __get_free_pages(GFP_KERNEL,1))
-#define free_thread_info(ti) free_pages((unsigned long) (ti), 1)
+#if CONFIG_DEBUG_STACK_USAGE
+#define alloc_thread_info(tsk)					\
+	({							\
+		struct thread_info *ret;			\
+	 							\
+	 	ret = kmalloc(THREAD_SIZE, GFP_KERNEL);		\
+	 	if (ret)					\
+	 		memset(ret, 0, THREAD_SIZE);		\
+	 	ret;						\
+	 })
+#else
+#define alloc_thread_info(tsk) kmalloc(THREAD_SIZE, GFP_KERNEL)
+#endif
+
+#define free_thread_info(info) kfree(info)
 #define get_thread_info(ti) get_task_struct((ti)->task)
 #define put_thread_info(ti) put_task_struct((ti)->task)
 
+#define TI_FLAG_FAULT_CODE_SHIFT	28
+
+static inline void set_thread_fault_code(unsigned int val)
+{
+	struct thread_info *ti = current_thread_info();
+	ti->flags = (ti->flags & (~0 >> (32 - TI_FLAG_FAULT_CODE_SHIFT)))
+		| (val << TI_FLAG_FAULT_CODE_SHIFT);
+}
+
+static inline unsigned int get_thread_fault_code(void)
+{
+	struct thread_info *ti = current_thread_info();
+	return ti->flags >> TI_FLAG_FAULT_CODE_SHIFT;
+}
+
 #else /* !__ASSEMBLY__ */
 
+#define THREAD_SIZE	8192
+
 /* how to get the thread information struct from ASM */
 #define GET_THREAD_INFO(reg)	GET_THREAD_INFO reg
 	.macro GET_THREAD_INFO reg
-	ldi	\reg, #0xffffe000
+	ldi	\reg, #-THREAD_SIZE
 	and	\reg, sp
 	.endm
 
@@ -123,6 +154,7 @@
 #define TIF_SINGLESTEP		4	/* restore singlestep on return to user mode */
 #define TIF_IRET		5	/* return with iret */
 #define TIF_POLLING_NRFLAG	16	/* true if poll_idle() is polling TIF_NEED_RESCHED */
+					/* 31..28 fault code */
 
 #define _TIF_SYSCALL_TRACE	(1<<TIF_SYSCALL_TRACE)
 #define _TIF_NOTIFY_RESUME	(1<<TIF_NOTIFY_RESUME)
@@ -146,4 +178,4 @@
 
 #endif /* __KERNEL__ */
 
-#endif /* _ASM_THREAD_INFO_H */
+#endif /* _ASM_M32R_THREAD_INFO_H */
diff -Nru a/include/asm-m68k/adb_mouse.h b/include/asm-m68k/adb_mouse.h
--- a/include/asm-m68k/adb_mouse.h	2005-01-10 20:11:21 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,23 +0,0 @@
-#ifndef _ASM_ADB_MOUSE_H
-#define _ASM_ADB_MOUSE_H
-
-/*
- * linux/include/asm-m68k/adb_mouse.h
- * header file for Macintosh ADB mouse driver
- * 27-10-97 Michael Schmitz
- * copied from:
- * header file for Atari Mouse driver
- * by Robert de Vries (robert@and.nl) on 19Jul93
- */
-
-struct mouse_status {
-	char		buttons;
-	short		dx;
-	short		dy;
-	int		ready;
-	int		active;
-	wait_queue_head_t wait;
-	struct fasync_struct *fasyncptr;
-};
-
-#endif
diff -Nru a/include/asm-m68k/hardirq.h b/include/asm-m68k/hardirq.h
--- a/include/asm-m68k/hardirq.h	2005-01-10 20:11:19 -08:00
+++ b/include/asm-m68k/hardirq.h	2005-01-10 20:11:19 -08:00
@@ -23,13 +23,4 @@
 # error HARDIRQ_BITS is too low!
 #endif
 
-#define irq_enter()		(preempt_count() += HARDIRQ_OFFSET)
-#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)
-
 #endif
diff -Nru a/include/asm-m68k/motorola_pgalloc.h b/include/asm-m68k/motorola_pgalloc.h
--- a/include/asm-m68k/motorola_pgalloc.h	2005-01-10 20:11:23 -08:00
+++ b/include/asm-m68k/motorola_pgalloc.h	2005-01-10 20:11:23 -08:00
@@ -12,9 +12,8 @@
 {
 	pte_t *pte;
 
-	pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT);
+	pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO);
 	if (pte) {
-		clear_page(pte);
 		__flush_page_to_ram(pte);
 		flush_tlb_kernel_page(pte);
 		nocache_page(pte);
@@ -31,7 +30,7 @@
 
 static inline struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address)
 {
-	struct page *page = alloc_pages(GFP_KERNEL|__GFP_REPEAT, 0);
+	struct page *page = alloc_pages(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO, 0);
 	pte_t *pte;
 
 	if(!page)
@@ -39,7 +38,6 @@
 
 	pte = kmap(page);
 	if (pte) {
-		clear_page(pte);
 		__flush_page_to_ram(pte);
 		flush_tlb_kernel_page(pte);
 		nocache_page(pte);
diff -Nru a/include/asm-m68k/pgtable.h b/include/asm-m68k/pgtable.h
--- a/include/asm-m68k/pgtable.h	2005-01-10 20:11:22 -08:00
+++ b/include/asm-m68k/pgtable.h	2005-01-10 20:11:22 -08:00
@@ -1,6 +1,8 @@
 #ifndef _M68K_PGTABLE_H
 #define _M68K_PGTABLE_H
 
+#include <asm-generic/4level-fixup.h>
+
 #include <linux/config.h>
 #include <asm/setup.h>
 
diff -Nru a/include/asm-m68knommu/atomic.h b/include/asm-m68knommu/atomic.h
--- a/include/asm-m68knommu/atomic.h	2005-01-10 20:11:18 -08:00
+++ b/include/asm-m68knommu/atomic.h	2005-01-10 20:11:18 -08:00
@@ -20,36 +20,79 @@
 
 static __inline__ void atomic_add(int i, atomic_t *v)
 {
-	__asm__ __volatile__("addl %1,%0" : "=m" (*v) : "d" (i), "0" (*v));
+#ifdef CONFIG_COLDFIRE
+	__asm__ __volatile__("addl %1,%0" : "+m" (*v) : "d" (i));
+#else
+	__asm__ __volatile__("addl %1,%0" : "+m" (*v) : "di" (i));
+#endif
 }
 
 static __inline__ void atomic_sub(int i, atomic_t *v)
 {
-	__asm__ __volatile__("subl %1,%0" : "=m" (*v) : "d" (i), "0" (*v));
+#ifdef CONFIG_COLDFIRE
+	__asm__ __volatile__("subl %1,%0" : "+m" (*v) : "d" (i));
+#else
+	__asm__ __volatile__("subl %1,%0" : "+m" (*v) : "di" (i));
+#endif
+}
+
+static __inline__ int atomic_sub_and_test(int i, atomic_t * v)
+{
+	char c;
+#ifdef CONFIG_COLDFIRE
+	__asm__ __volatile__("subl %2,%1; seq %0"
+			     : "=d" (c), "+m" (*v)
+			     : "d" (i));
+#else
+	__asm__ __volatile__("subl %2,%1; seq %0"
+			     : "=d" (c), "+m" (*v)
+			     : "di" (i));
+#endif
+	return c != 0;
 }
 
 static __inline__ void atomic_inc(volatile atomic_t *v)
 {
-	__asm__ __volatile__("addql #1,%0" : "=m" (*v): "0" (*v));
+	__asm__ __volatile__("addql #1,%0" : "+m" (*v));
+}
+
+/*
+ * atomic_inc_and_test - increment and test
+ * @v: pointer of type atomic_t
+ *
+ * Atomically increments @v by 1
+ * and returns true if the result is zero, or false for all
+ * other cases.
+ */
+
+static __inline__ int atomic_inc_and_test(volatile atomic_t *v)
+{
+	char c;
+	__asm__ __volatile__("addql #1,%1; seq %0" : "=d" (c), "+m" (*v));
+	return c != 0;
 }
 
 static __inline__ void atomic_dec(volatile atomic_t *v)
 {
-	__asm__ __volatile__("subql #1,%0" : "=m" (*v): "0" (*v));
+	__asm__ __volatile__("subql #1,%0" : "+m" (*v));
 }
 
 static __inline__ int atomic_dec_and_test(volatile atomic_t *v)
 {
 	char c;
-	__asm__ __volatile__("subql #1,%1; seq %0" : "=d" (c), "=m" (*v): "1" (*v));
+	__asm__ __volatile__("subql #1,%1; seq %0" : "=d" (c), "+m" (*v));
 	return c != 0;
 }
 
-#define atomic_clear_mask(mask, v) \
-	__asm__ __volatile__("andl %1,%0" : "=m" (*v) : "id" (~(mask)),"0"(*v))
+static __inline__ void atomic_clear_mask(unsigned long mask, unsigned long *v)
+{
+	__asm__ __volatile__("andl %1,%0" : "+m" (*v) : "id" (~(mask)));
+}
 
-#define atomic_set_mask(mask, v) \
-	__asm__ __volatile__("orl %1,%0" : "=m" (*v) : "id" (mask),"0"(*v))
+static __inline__ void atomic_set_mask(unsigned long mask, unsigned long *v)
+{
+	__asm__ __volatile__("orl %1,%0" : "+m" (*v) : "id" (mask));
+}
 
 /* Atomic operations are already serializing */
 #define smp_mb__before_atomic_dec()    barrier()
@@ -87,18 +130,5 @@
 
 #define atomic_dec_return(v) atomic_sub_return(1,(v))
 #define atomic_inc_return(v) atomic_add_return(1,(v))
-
-/*
- * atomic_inc_and_test - increment and test
- * @v: pointer of type atomic_t
- *
- * Atomically increments @v by 1
- * and returns true if the result is zero, or false for all
- * other cases.
- */
-#define atomic_inc_and_test(v) (atomic_inc_return(v) == 0)
-
-#define atomic_sub_and_test(i,v) (atomic_sub_return((i), (v)) == 0)
-#define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0)
 
 #endif /* __ARCH_M68KNOMMU_ATOMIC __ */
diff -Nru a/include/asm-m68knommu/bitops.h b/include/asm-m68knommu/bitops.h
--- a/include/asm-m68knommu/bitops.h	2005-01-10 20:11:16 -08:00
+++ b/include/asm-m68knommu/bitops.h	2005-01-10 20:11:16 -08:00
@@ -113,26 +113,20 @@
 
 static __inline__ void set_bit(int nr, volatile unsigned long * addr)
 {
-	int 	* a = (int *) addr;
-	int	mask;
-	unsigned long flags;
-
-	a += nr >> 5;
-	mask = 1 << (nr & 0x1f);
-	local_irq_save(flags);
-	*a |= mask;
-	local_irq_restore(flags);
+#ifdef CONFIG_COLDFIRE
+	__asm__ __volatile__ ("lea %0,%%a0; bset %1,(%%a0)"
+	     : "+m" (((volatile char *)addr)[(nr^31) >> 3])
+	     : "d" (nr)
+	     : "%a0", "cc");
+#else
+	__asm__ __volatile__ ("bset %1,%0"
+	     : "+m" (((volatile char *)addr)[(nr^31) >> 3])
+	     : "di" (nr)
+	     : "cc");
+#endif
 }
 
-static __inline__ void __set_bit(int nr, volatile unsigned long * addr)
-{
-	int 	* a = (int *) addr;
-	int	mask;
-
-	a += nr >> 5;
-	mask = 1 << (nr & 0x1f);
-	*a |= mask;
-}
+#define __set_bit(nr, addr) set_bit(nr, addr)
 
 /*
  * clear_bit() doesn't provide any barrier for the compiler.
@@ -142,132 +136,100 @@
 
 static __inline__ void clear_bit(int nr, volatile unsigned long * addr)
 {
-	int 	* a = (int *) addr;
-	int	mask;
-	unsigned long flags;
-
-	a += nr >> 5;
-	mask = 1 << (nr & 0x1f);
-	local_irq_save(flags);
-	*a &= ~mask;
-	local_irq_restore(flags);
+#ifdef CONFIG_COLDFIRE
+	__asm__ __volatile__ ("lea %0,%%a0; bclr %1,(%%a0)"
+	     : "+m" (((volatile char *)addr)[(nr^31) >> 3])
+	     : "d" (nr)
+	     : "%a0", "cc");
+#else
+	__asm__ __volatile__ ("bclr %1,%0"
+	     : "+m" (((volatile char *)addr)[(nr^31) >> 3])
+	     : "di" (nr)
+	     : "cc");
+#endif
 }
 
-static __inline__ void __clear_bit(int nr, volatile unsigned long * addr)
-{
-	int 	* a = (int *) addr;
-	int	mask;
-
-	a += nr >> 5;
-	mask = 1 << (nr & 0x1f);
-	*a &= ~mask;
-}
+#define __clear_bit(nr, addr) clear_bit(nr, addr)
 
 static __inline__ void change_bit(int nr, volatile unsigned long * addr)
 {
-	int mask, flags;
-	unsigned long *ADDR = (unsigned long *) addr;
-
-	ADDR += nr >> 5;
-	mask = 1 << (nr & 31);
-	local_irq_save(flags);
-	*ADDR ^= mask;
-	local_irq_restore(flags);
+#ifdef CONFIG_COLDFIRE
+	__asm__ __volatile__ ("lea %0,%%a0; bchg %1,(%%a0)"
+	     : "+m" (((volatile char *)addr)[(nr^31) >> 3])
+	     : "d" (nr)
+	     : "%a0", "cc");
+#else
+	__asm__ __volatile__ ("bchg %1,%0"
+	     : "+m" (((volatile char *)addr)[(nr^31) >> 3])
+	     : "di" (nr)
+	     : "cc");
+#endif
 }
 
-static __inline__ void __change_bit(int nr, volatile unsigned long * addr)
-{
-	int mask;
-	unsigned long *ADDR = (unsigned long *) addr;
-
-	ADDR += nr >> 5;
-	mask = 1 << (nr & 31);
-	*ADDR ^= mask;
-}
+#define __change_bit(nr, addr) change_bit(nr, addr)
 
 static __inline__ int test_and_set_bit(int nr, volatile unsigned long * addr)
 {
-	int	mask, retval;
-	volatile unsigned int *a = (volatile unsigned int *) addr;
-	unsigned long flags;
+	char retval;
 
-	a += nr >> 5;
-	mask = 1 << (nr & 0x1f);
-	local_irq_save(flags);
-	retval = (mask & *a) != 0;
-	*a |= mask;
-	local_irq_restore(flags);
+#ifdef CONFIG_COLDFIRE
+	__asm__ __volatile__ ("lea %1,%%a0; bset %2,(%%a0); sne %0"
+	     : "=d" (retval), "+m" (((volatile char *)addr)[(nr^31) >> 3])
+	     : "d" (nr)
+	     : "%a0");
+#else
+	__asm__ __volatile__ ("bset %2,%1; sne %0"
+	     : "=d" (retval), "+m" (((volatile char *)addr)[(nr^31) >> 3])
+	     : "di" (nr)
+	     /* No clobber */);
+#endif
 
 	return retval;
 }
 
-static __inline__ int __test_and_set_bit(int nr, volatile unsigned long * addr)
-{
-	int	mask, retval;
-	volatile unsigned int *a = (volatile unsigned int *) addr;
-
-	a += nr >> 5;
-	mask = 1 << (nr & 0x1f);
-	retval = (mask & *a) != 0;
-	*a |= mask;
-	return retval;
-}
+#define __test_and_set_bit(nr, addr) test_and_set_bit(nr, addr)
 
 static __inline__ int test_and_clear_bit(int nr, volatile unsigned long * addr)
 {
-	int	mask, retval;
-	volatile unsigned int *a = (volatile unsigned int *) addr;
-	unsigned long flags;
+	char retval;
 
-	a += nr >> 5;
-	mask = 1 << (nr & 0x1f);
-	local_irq_save(flags);
-	retval = (mask & *a) != 0;
-	*a &= ~mask;
-	local_irq_restore(flags);
+#ifdef CONFIG_COLDFIRE
+	__asm__ __volatile__ ("lea %1,%%a0; bclr %2,(%%a0); sne %0"
+	     : "=d" (retval), "+m" (((volatile char *)addr)[(nr^31) >> 3])
+	     : "d" (nr)
+	     : "%a0");
+#else
+	__asm__ __volatile__ ("bclr %2,%1; sne %0"
+	     : "=d" (retval), "+m" (((volatile char *)addr)[(nr^31) >> 3])
+	     : "di" (nr)
+	     /* No clobber */);
+#endif
 
 	return retval;
 }
 
-static __inline__ int __test_and_clear_bit(int nr, volatile unsigned long * addr)
-{
-	int	mask, retval;
-	volatile unsigned int *a = (volatile unsigned int *) addr;
-
-	a += nr >> 5;
-	mask = 1 << (nr & 0x1f);
-	retval = (mask & *a) != 0;
-	*a &= ~mask;
-	return retval;
-}
+#define __test_and_clear_bit(nr, addr) test_and_clear_bit(nr, addr)
 
 static __inline__ int test_and_change_bit(int nr, volatile unsigned long * addr)
 {
-	int	mask, retval;
-	volatile unsigned int *a = (volatile unsigned int *) addr;
-	unsigned long flags;
+	char retval;
 
-	a += nr >> 5;
-	mask = 1 << (nr & 0x1f);
-	local_irq_save(flags);
-	retval = (mask & *a) != 0;
-	*a ^= mask;
-	local_irq_restore(flags);
+#ifdef CONFIG_COLDFIRE
+	__asm__ __volatile__ ("lea %1,%%a0\n\tbchg %2,(%%a0)\n\tsne %0"
+	     : "=d" (retval), "+m" (((volatile char *)addr)[(nr^31) >> 3])
+	     : "d" (nr)
+	     : "%a0");
+#else
+	__asm__ __volatile__ ("bchg %2,%1; sne %0"
+	     : "=d" (retval), "+m" (((volatile char *)addr)[(nr^31) >> 3])
+	     : "di" (nr)
+	     /* No clobber */);
+#endif
 
 	return retval;
 }
 
-static __inline__ int __test_and_change_bit(int nr, volatile unsigned long * addr)
-{
-	int	mask, retval;
-	volatile unsigned int *a = (volatile unsigned int *) addr;
-
-	a += nr >> 5;
-	mask = 1 << (nr & 0x1f);
-	retval = (mask & *a) != 0;
-	*a ^= mask;
-	return retval;
-}
+#define __test_and_change_bit(nr, addr) test_and_change_bit(nr, addr)
 
 /*
  * This routine doesn't need to be atomic.
@@ -294,6 +256,8 @@
 
 #define find_first_zero_bit(addr, size) \
         find_next_zero_bit((addr), (size), 0)
+#define find_first_bit(addr, size) \
+        find_next_bit((addr), (size), 0)
 
 static __inline__ int find_next_zero_bit (void * addr, int size, int offset)
 {
@@ -385,31 +349,39 @@
 
 static __inline__ int ext2_set_bit(int nr, volatile void * addr)
 {
-	int		mask, retval;
-	unsigned long	flags;
-	volatile unsigned char	*ADDR = (unsigned char *) addr;
-
-	ADDR += nr >> 3;
-	mask = 1 << (nr & 0x07);
-	local_irq_save(flags);
-	retval = (mask & *ADDR) != 0;
-	*ADDR |= mask;
-	local_irq_restore(flags);
+	char retval;
+
+#ifdef CONFIG_COLDFIRE
+	__asm__ __volatile__ ("lea %1,%%a0; bset %2,(%%a0); sne %0"
+	     : "=d" (retval), "+m" (((volatile char *)addr)[nr >> 3])
+	     : "d" (nr)
+	     : "%a0");
+#else
+	__asm__ __volatile__ ("bset %2,%1; sne %0"
+	     : "=d" (retval), "+m" (((volatile char *)addr)[nr >> 3])
+	     : "di" (nr)
+	     /* No clobber */);
+#endif
+
 	return retval;
 }
 
 static __inline__ int ext2_clear_bit(int nr, volatile void * addr)
 {
-	int		mask, retval;
-	unsigned long	flags;
-	volatile unsigned char	*ADDR = (unsigned char *) addr;
-
-	ADDR += nr >> 3;
-	mask = 1 << (nr & 0x07);
-	local_irq_save(flags);
-	retval = (mask & *ADDR) != 0;
-	*ADDR &= ~mask;
-	local_irq_restore(flags);
+	char retval;
+
+#ifdef CONFIG_COLDFIRE
+	__asm__ __volatile__ ("lea %1,%%a0; bclr %2,(%%a0); sne %0"
+	     : "=d" (retval), "+m" (((volatile char *)addr)[nr >> 3])
+	     : "d" (nr)
+	     : "%a0");
+#else
+	__asm__ __volatile__ ("bclr %2,%1; sne %0"
+	     : "=d" (retval), "+m" (((volatile char *)addr)[nr >> 3])
+	     : "di" (nr)
+	     /* No clobber */);
+#endif
+
 	return retval;
 }
 
@@ -433,12 +405,21 @@
 
 static __inline__ int ext2_test_bit(int nr, const volatile void * addr)
 {
-	int	mask;
-	const volatile unsigned char	*ADDR = (const unsigned char *) addr;
+	char retval;
+
+#ifdef CONFIG_COLDFIRE
+	__asm__ __volatile__ ("lea %1,%%a0; btst %2,(%%a0); sne %0"
+	     : "=d" (retval)
+	     : "m" (((const volatile char *)addr)[nr >> 3]), "d" (nr)
+	     : "%a0");
+#else
+	__asm__ __volatile__ ("btst %2,%1; sne %0"
+	     : "=d" (retval)
+	     : "m" (((const volatile char *)addr)[nr >> 3]), "di" (nr)
+	     /* No clobber */);
+#endif
 
-	ADDR += nr >> 3;
-	mask = 1 << (nr & 0x07);
-	return ((mask & *ADDR) != 0);
+	return retval;
 }
 
 #define ext2_find_first_zero_bit(addr, size) \
diff -Nru a/include/asm-m68knommu/elf.h b/include/asm-m68knommu/elf.h
--- a/include/asm-m68knommu/elf.h	2005-01-10 20:11:21 -08:00
+++ b/include/asm-m68knommu/elf.h	2005-01-10 20:11:21 -08:00
@@ -61,22 +61,14 @@
 #define ELF_PLAT_INIT(_r, load_addr)	_r->a1 = 0
 
 #define USE_ELF_CORE_DUMP
-#ifndef CONFIG_SUN3
 #define ELF_EXEC_PAGESIZE	4096
-#else
-#define ELF_EXEC_PAGESIZE	8192
-#endif
 
 /* This is the location that an ET_DYN program is loaded if exec'ed.  Typical
    use of this is to invoke "./ld.so someprog" to test out a new version of
    the loader.  We need to make sure that it is out of the way of the program
    that it will "exec", and that there is sufficient room for the brk.  */
 
-#ifndef CONFIG_SUN3
 #define ELF_ET_DYN_BASE         0xD0000000UL
-#else
-#define ELF_ET_DYN_BASE         0x0D800000UL
-#endif
 
 #define ELF_CORE_COPY_REGS(pr_reg, regs)				\
 	/* Bleech. */							\
diff -Nru a/include/asm-m68knommu/hardirq.h b/include/asm-m68knommu/hardirq.h
--- a/include/asm-m68knommu/hardirq.h	2005-01-10 20:11:16 -08:00
+++ b/include/asm-m68knommu/hardirq.h	2005-01-10 20:11:16 -08:00
@@ -7,8 +7,6 @@
 
 typedef struct {
 	unsigned int __softirq_pending;
-	unsigned int __syscall_count;
-	struct task_struct * __ksoftirqd_task;
 } ____cacheline_aligned irq_cpustat_t;
 
 #include <linux/irq_cpustat.h>	/* Standard mappings for irq_cpustat_t above */
@@ -23,14 +21,5 @@
 #if (1 << HARDIRQ_BITS) < NR_IRQS
 # error HARDIRQ_BITS is too low!
 #endif
-
-#define irq_enter()		(preempt_count() += HARDIRQ_OFFSET)
-#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)
 
 #endif /* __M68K_HARDIRQ_H */
diff -Nru a/include/asm-m68knommu/keyboard.h b/include/asm-m68knommu/keyboard.h
--- a/include/asm-m68knommu/keyboard.h	2005-01-10 20:11:16 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1 +0,0 @@
-#include <asm-m68k/keyboard.h>
diff -Nru a/include/asm-m68knommu/m5206sim.h b/include/asm-m68knommu/m5206sim.h
--- a/include/asm-m68knommu/m5206sim.h	2005-01-10 20:11:23 -08:00
+++ b/include/asm-m68knommu/m5206sim.h	2005-01-10 20:11:23 -08:00
@@ -47,12 +47,12 @@
 
 #define	MCFSIM_DCRR		0x46		/* DRAM Refresh reg (r/w) */
 #define	MCFSIM_DCTR		0x4a		/* DRAM Timing reg (r/w) */
-#define	MCFSIM_DCAR0		0x4c		/* DRAM 0 Address reg(r/w) */
-#define	MCFSIM_DCMR0		0x50		/* DRAM 0 Mask reg (r/w) */
-#define	MCFSIM_DCCR0		0x57		/* DRAM 0 Control reg (r/w) */
-#define	MCFSIM_DCAR1		0x58		/* DRAM 1 Address reg (r/w) */
-#define	MCFSIM_DCMR1		0x5c		/* DRAM 1 Mask reg (r/w) */
-#define	MCFSIM_DCCR1		0x63		/* DRAM 1 Control reg (r/w) */
+#define	MCFSIM_DAR0		0x4c		/* DRAM 0 Address reg(r/w) */
+#define	MCFSIM_DMR0		0x50		/* DRAM 0 Mask reg (r/w) */
+#define	MCFSIM_DCR0		0x57		/* DRAM 0 Control reg (r/w) */
+#define	MCFSIM_DAR1		0x58		/* DRAM 1 Address reg (r/w) */
+#define	MCFSIM_DMR1		0x5c		/* DRAM 1 Mask reg (r/w) */
+#define	MCFSIM_DCR1		0x63		/* DRAM 1 Control reg (r/w) */
 
 #define	MCFSIM_CSAR0		0x64		/* CS 0 Address 0 reg (r/w) */
 #define	MCFSIM_CSMR0		0x68		/* CS 0 Mask 0 reg (r/w) */
diff -Nru a/include/asm-m68knommu/m5249sim.h b/include/asm-m68knommu/m5249sim.h
--- a/include/asm-m68knommu/m5249sim.h	2005-01-10 20:11:22 -08:00
+++ b/include/asm-m68knommu/m5249sim.h	2005-01-10 20:11:22 -08:00
@@ -116,4 +116,94 @@
 	*((volatile unsigned long *) (MCF_MBAR + MCFSIM_IPR))
 
 /****************************************************************************/
+
+#ifdef __ASSEMBLER__
+
+/*
+ *	The M5249C3 board needs a little help getting all its SIM devices
+ *	initialized at kernel start time. dBUG doesn't set much up, so
+ *	we need to do it manually.
+ */
+.macro m5249c3_setup
+	/*
+	 *	Set MBAR1 and MBAR2, just incase they are not set.
+	 */
+	movel	#0x10000001,%a0
+	movec	%a0,%MBAR			/* map MBAR region */
+	subql	#1,%a0				/* get MBAR address in a0 */
+
+	movel	#0x80000001,%a1
+	movec	%a1,#3086			/* map MBAR2 region */
+	subql	#1,%a1				/* get MBAR2 address in a1 */
+
+	/*
+	 *      Move secondary interrupts to base at 128.
+	 */
+	moveb	#0x80,%d0
+	moveb	%d0,0x16b(%a1)			/* interrupt base register */
+
+	/*
+	 *      Work around broken CSMR0/DRAM vector problem.
+	 */
+	movel	#0x001F0021,%d0			/* disable C/I bit */
+	movel	%d0,0x84(%a0)			/* set CSMR0 */
+
+	/*
+	 *	Disable the PLL firstly. (Who knows what state it is
+	 *	in here!).
+	 */
+	movel	0x180(%a1),%d0			/* get current PLL value */
+	andl	#0xfffffffe,%d0			/* PLL bypass first */
+	movel	%d0,0x180(%a1)			/* set PLL register */
+	nop
+
+#ifdef CONFIG_CLOCK_140MHz
+	/*
+	 *	Set initial clock frequency. This assumes M5249C3 board
+	 *	is fitted with 11.2896MHz crystal. It will program the
+	 *	PLL for 140MHz. Lets go fast :-)
+	 */
+	movel	#0x125a40f0,%d0			/* set for 140MHz */
+	movel	%d0,0x180(%a1)			/* set PLL register */
+	orl	#0x1,%d0
+	movel	%d0,0x180(%a1)			/* set PLL register */
+#endif
+
+	/*
+	 *	Setup CS1 for ethernet controller.
+	 *	(Setup as per M5249C3 doco).
+	 */
+	movel  #0xe0000000,%d0			/* CS1 mapped at 0xe0000000 */
+	movel  %d0,0x8c(%a0)
+	movel  #0x001f0021,%d0			/* CS1 size of 1Mb */
+	movel  %d0,0x90(%a0)
+	movew  #0x0080,%d0			/* CS1 = 16bit port, AA */
+	movew  %d0,0x96(%a0)
+
+	/*
+	 *	Setup CS2 for IDE interface.
+	 */
+	movel	#0x50000000,%d0			/* CS2 mapped at 0x50000000 */
+	movel	%d0,0x98(%a0)
+	movel	#0x001f0001,%d0			/* CS2 size of 1MB */
+	movel	%d0,0x9c(%a0)
+	movew	#0x0080,%d0			/* CS2 = 16bit, TA */
+	movew	%d0,0xa2(%a0)
+
+	movel	#0x00107000,%d0			/* IDEconfig1 */
+	movel	%d0,0x18c(%a1)
+	movel	#0x000c0400,%d0			/* IDEconfig2 */
+	movel	%d0,0x190(%a1)
+
+	movel	#0x00080000,%d0			/* GPIO19, IDE reset bit */
+	orl	%d0,0xc(%a1)			/* function GPIO19 */
+	orl	%d0,0x8(%a1)			/* enable GPIO19 as output */
+        orl	%d0,0x4(%a1)			/* de-assert IDE reset */
+.endm
+
+#define	PLATFORM_SETUP	m5249c3_setup
+
+#endif /* __ASSEMBLER__ */
+
+/****************************************************************************/
 #endif	/* m5249sim_h */
diff -Nru a/include/asm-m68knommu/m527xsim.h b/include/asm-m68knommu/m527xsim.h
--- a/include/asm-m68knommu/m527xsim.h	2005-01-10 20:11:24 -08:00
+++ b/include/asm-m68knommu/m527xsim.h	2005-01-10 20:11:24 -08:00
@@ -34,5 +34,25 @@
 #define	MCFINT_UART2		15		/* Interrupt number for UART2 */
 #define	MCFINT_PIT1		36		/* Interrupt number for PIT1 */
 
+/*
+ *	SDRAM configuration registers.
+ */
+#ifdef CONFIG_M5271EVB
+#define	MCFSIM_DCR		0x40		/* SDRAM control */
+#define	MCFSIM_DACR0		0x48		/* SDRAM base address 0 */
+#define	MCFSIM_DMR0		0x4c		/* SDRAM address mask 0 */
+#define	MCFSIM_DACR1		0x50		/* SDRAM base address 1 */
+#define	MCFSIM_DMR1		0x54		/* SDRAM address mask 1 */
+#else
+#define	MCFSIM_DMR		0x40		/* SDRAM mode */
+#define	MCFSIM_DCR		0x44		/* SDRAM control */
+#define	MCFSIM_DCFG1		0x48		/* SDRAM configuration 1 */
+#define	MCFSIM_DCFG2		0x4c		/* SDRAM configuration 2 */
+#define	MCFSIM_DBAR0		0x50		/* SDRAM base address 0 */
+#define	MCFSIM_DMR0		0x54		/* SDRAM address mask 0 */
+#define	MCFSIM_DBAR1		0x58		/* SDRAM base address 1 */
+#define	MCFSIM_DMR1		0x5c		/* SDRAM address mask 1 */
+#endif
+
 /****************************************************************************/
 #endif	/* m527xsim_h */
diff -Nru a/include/asm-m68knommu/m528xsim.h b/include/asm-m68knommu/m528xsim.h
--- a/include/asm-m68knommu/m528xsim.h	2005-01-10 20:11:15 -08:00
+++ b/include/asm-m68knommu/m528xsim.h	2005-01-10 20:11:15 -08:00
@@ -32,5 +32,14 @@
 #define	MCFINT_UART0		13		/* Interrupt number for UART0 */
 #define	MCFINT_PIT1		55		/* Interrupt number for PIT1 */
 
+/*
+ *	SDRAM configuration registers.
+ */
+#define	MCFSIM_DCR		0x44		/* SDRAM control */
+#define	MCFSIM_DACR0		0x48		/* SDRAM base address 0 */
+#define	MCFSIM_DMR0		0x4c		/* SDRAM address mask 0 */
+#define	MCFSIM_DACR1		0x50		/* SDRAM base address 1 */
+#define	MCFSIM_DMR1		0x54		/* SDRAM address mask 1 */
+
 /****************************************************************************/
 #endif	/* m528xsim_h */
diff -Nru a/include/asm-m68knommu/mcfcache.h b/include/asm-m68knommu/mcfcache.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-m68knommu/mcfcache.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,125 @@
+/****************************************************************************/
+
+/*
+ *	mcfcache.h -- ColdFire CPU cache support code
+ *
+ *	(C) Copyright 2004, Greg Ungerer <gerg@snapgear.com>
+ */
+
+/****************************************************************************/
+#ifndef	__M68KNOMMU_MCFCACHE_H
+#define	__M68KNOMMU_MCFCACHE_H
+/****************************************************************************/
+
+#include <linux/config.h>
+
+/*
+ *	The different ColdFire families have different cache arrangments.
+ *	Everything from a small linstruction only cache, to configurable
+ *	data and/or instruction cache, to unified instruction/data, to 
+ *	harvard style separate instruction and data caches.
+ */
+
+#if defined(CONFIG_M5206) || defined(CONFIG_M5206e) || defined(CONFIG_M5272)
+/*
+ *	Simple verion 2 core cache. These have instruction cache only,
+ *	we just need to invalidate it and enable it.
+ */
+.macro CACHE_ENABLE
+	movel	#0x01000000,%d0		/* invalidate cache cmd */
+	movec	%d0,%CACR		/* do invalidate cache */
+	movel	#0x80000100,%d0		/* setup cache mask */
+	movec	%d0,%CACR		/* enable cache */
+.endm
+#endif /* CONFIG_M5206 || CONFIG_M5206e || CONFIG_M5272 */
+
+#if defined(CONFIG_M527x)
+/*
+ *	New version 2 cores have a configurable split cache arrangement.
+ *	For now I am just enabling instruction cache - but ultimately I
+ *	think a split instruction/data cache would be better.
+ */
+.macro CACHE_ENABLE
+	movel	#0x01400000,%d0
+	movec	%d0,%CACR		/* invalidate cache */
+	nop
+	movel	#0x0000c000,%d0		/* set SDRAM cached only */
+	movec	%d0,%ACR0
+	movel	#0x00000000,%d0		/* no other regions cached */
+	movec	%d0,%ACR1
+	movel	#0x80400100,%d0		/* configure cache */
+	movec	%d0,%CACR		/* enable cache */
+	nop
+.endm
+#endif /* CONFIG_M527x */
+
+#if defined(CONFIG_M528x)
+/*
+ *	Cache is totally broken on early 5282 silicon. So far now we
+ *	disable its cache all together.
+ */
+.macro CACHE_ENABLE
+	movel	#0x01000000,%d0
+	movec	%d0,%CACR		/* invalidate cache */
+	nop
+	movel	#0x0000c000,%d0		/* set SDRAM cached only */
+	movec	%d0,%ACR0
+	movel	#0x00000000,%d0		/* no other regions cached */
+	movec	%d0,%ACR1
+	movel	#0x00000000,%d0		/* configure cache */
+	movec	%d0,%CACR		/* enable cache */
+	nop
+.endm
+#endif /* CONFIG_M528x */
+
+#if defined(CONFIG_M5249) || defined(CONFIG_M5307)
+/*
+ *	The version 3 core cache. Oddly enough the version 2 core 5249
+ *	has the same SDRAM and cache setup as the version 3 cores.
+ *	This is a single unified instruction/data cache.
+ */
+.macro CACHE_ENABLE
+	movel	#0x01000000,%d0		/* invalidate whole cache */
+	movec	%d0,%CACR
+	nop
+#if defined(DEBUGGER_COMPATIBLE_CACHE) || defined(CONFIG_SECUREEDGEMP3)
+	movel	#0x0000c000,%d0		/* set SDRAM cached (write-thru) */
+#else
+	movel	#0x0000c020,%d0		/* set SDRAM cached (copyback) */
+#endif
+	movec	%d0,%ACR0
+	movel	#0x00000000,%d0		/* no other regions cached */
+	movec	%d0,%ACR1
+	movel	#0xa0000200,%d0		/* enable cache */
+	movec	%d0,%CACR
+	nop
+.endm
+#endif /* CONFIG_M5249 || CONFIG_M5307 */
+
+#if defined(CONFIG_M5407)
+/*
+ *	Version 4 cores have a true hardvard style separate instruction
+ *	and data cache. Invalidate and enable cache, also enable write
+ *	buffers and branch accelerator.
+ */
+.macro CACHE_ENABLE
+	movel	#0x01040100,%d0		/* invalidate whole cache */
+	movec	%d0,%CACR
+	nop
+	movel	#0x000fc000,%d0		/* set SDRAM cached only */
+	movec	%d0, %ACR0
+	movel	#0x00000000,%d0		/* no other regions cached */
+	movec	%d0, %ACR1
+	movel	#0x000fc000,%d0		/* set SDRAM cached only */
+	movec	%d0, %ACR2
+	movel	#0x00000000,%d0		/* no other regions cached */
+	movec	%d0, %ACR3
+	movel	#0xb6088400,%d0		/* enable caches */
+	movec	%d0,%CACR
+	nop
+.endm
+#endif /* CONFIG_M5407 */
+
+
+/****************************************************************************/
+#endif	/* __M68KNOMMU_MCFCACHE_H */
diff -Nru a/include/asm-m68knommu/nap.h b/include/asm-m68knommu/nap.h
--- a/include/asm-m68knommu/nap.h	2005-01-10 20:11:16 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,96 +0,0 @@
-/****************************************************************************/
-
-/*
- *	nap.h -- Marconi/NAP support.
- *
- * 	(C) Copyright 2001, SnapGear (www.snapgear.com) 
- */
-
-/****************************************************************************/
-#ifndef	nap_h
-#define	nap_h
-/****************************************************************************/
-
-#include <linux/config.h>
-
-/****************************************************************************/
-#ifdef CONFIG_MARCONINAP
-/****************************************************************************/
-
-#ifdef CONFIG_COLDFIRE
-#include <asm/coldfire.h>
-#include <asm/mcfsim.h>
-#endif
-
-/*
- *	Command to support selecting RS232 or RS422 mode on the
- *	second COM port.
- */
-#define	TIOCSET422	0x4d01		/* Set port mode 232 or 422 */
-#define	TIOCGET422	0x4d02		/* Get current port mode */
-
-/*
- *	Low level control of the RS232/422 enable.
- */
-#define	MCFPP_PA11	0x0800
-
-#ifndef __ASSEMBLY__
-/*
- *	RS232/422 control is via the single PA11 line. Low is the RS422
- *	enable, high is RS232 mode.
- */
-static __inline__ unsigned int mcf_getpa(void)
-{
-	volatile unsigned short *pp;
-	pp = (volatile unsigned short *) (MCF_MBAR + MCFSIM_PADAT);
-	return((unsigned int) *pp);
-}
-
-static __inline__ void mcf_setpa(unsigned int mask, unsigned int bits)
-{
-	volatile unsigned short *pp;
-	unsigned long		flags;
-
-	pp = (volatile unsigned short *) (MCF_MBAR + MCFSIM_PADAT);
-	save_flags(flags); cli();
-	*pp = (*pp & ~mask) | bits;
-	restore_flags(flags);
-}
-#endif /* __ASSEMBLY__ */
-
-/****************************************************************************/
-
-#if defined(CONFIG_M5272)
-/*
- *	Marconi/NAP based hardware. DTR/DCD lines are wired to GPB lines.
- */
-#define	MCFPP_DCD0	0x0080
-#define	MCFPP_DCD1	0x0020
-#define	MCFPP_DTR0	0x0040
-#define	MCFPP_DTR1	0x0010
-
-#ifndef __ASSEMBLY__
-/*
- *	These functions defined to give quasi generic access to the
- *	PPIO bits used for DTR/DCD.
- */
-static __inline__ unsigned int mcf_getppdata(void)
-{
-	volatile unsigned short *pp;
-	pp = (volatile unsigned short *) (MCF_MBAR + MCFSIM_PBDAT);
-	return((unsigned int) *pp);
-}
-
-static __inline__ void mcf_setppdata(unsigned int mask, unsigned int bits)
-{
-	volatile unsigned short *pp;
-	pp = (volatile unsigned short *) (MCF_MBAR + MCFSIM_PBDAT);
-	*pp = (*pp & ~mask) | bits;
-}
-#endif /* __ASSEMBLY__ */
-#endif /* CONFIG_M5272 */
-
-/****************************************************************************/
-#endif /* CONFIG_MARCONINAP */
-/****************************************************************************/
-#endif	/* nap_h */
diff -Nru a/include/asm-m68knommu/page.h b/include/asm-m68knommu/page.h
--- a/include/asm-m68knommu/page.h	2005-01-10 20:11:18 -08:00
+++ b/include/asm-m68knommu/page.h	2005-01-10 20:11:18 -08:00
@@ -14,9 +14,9 @@
 #include <asm/setup.h>
 
 #if !defined(CONFIG_SMALL_TASKS) && PAGE_SHIFT < 13
-#define KTHREAD_SIZE (8192)
+#define THREAD_SIZE (8192)
 #else
-#define KTHREAD_SIZE PAGE_SIZE
+#define THREAD_SIZE PAGE_SIZE
 #endif
  
 #ifndef __ASSEMBLY__
@@ -79,14 +79,11 @@
 #define __pa(vaddr)		virt_to_phys((void *)vaddr)
 #define __va(paddr)		phys_to_virt((unsigned long)paddr)
 
-#define MAP_NR(addr)		(((unsigned long)(addr)-PAGE_OFFSET) >> PAGE_SHIFT)
-
 #define virt_to_pfn(kaddr)	(__pa(kaddr) >> PAGE_SHIFT)
 #define pfn_to_virt(pfn)	__va((pfn) << PAGE_SHIFT)
 
 #define virt_to_page(addr)	(mem_map + (((unsigned long)(addr)-PAGE_OFFSET) >> PAGE_SHIFT))
 #define page_to_virt(page)	((((page) - mem_map) << PAGE_SHIFT) + PAGE_OFFSET)
-#define VALID_PAGE(page)	((page - mem_map) < max_mapnr)
 
 #define pfn_to_page(pfn)	virt_to_page(pfn_to_virt(pfn))
 #define page_to_pfn(page)	virt_to_pfn(page_to_virt(page))
diff -Nru a/include/asm-m68knommu/pgtable.h b/include/asm-m68knommu/pgtable.h
--- a/include/asm-m68knommu/pgtable.h	2005-01-10 20:11:20 -08:00
+++ b/include/asm-m68knommu/pgtable.h	2005-01-10 20:11:20 -08:00
@@ -1,6 +1,8 @@
 #ifndef _M68KNOMMU_PGTABLE_H
 #define _M68KNOMMU_PGTABLE_H
 
+#include <asm-generic/4level-fixup.h>
+
 /*
  * (C) Copyright 2000-2002, Greg Ungerer <gerg@snapgear.com>
  */
diff -Nru a/include/asm-m68knommu/processor.h b/include/asm-m68knommu/processor.h
--- a/include/asm-m68knommu/processor.h	2005-01-10 20:11:19 -08:00
+++ b/include/asm-m68knommu/processor.h	2005-01-10 20:11:19 -08:00
@@ -55,11 +55,6 @@
  */
 #define TASK_UNMAPPED_BASE	0
 
-/*
- * Bus types
- */
-#define MCA_bus 0
-
 /* 
  * if you change this structure, you must change the code and offsets
  * in m68k/machasm.S
@@ -126,7 +121,7 @@
     ({			\
 	unsigned long eip = 0;	 \
 	if ((tsk)->thread.esp0 > PAGE_SIZE && \
-	    MAP_NR((tsk)->thread.esp0) < max_mapnr) \
+	    (virt_addr_valid((tsk)->thread.esp0))) \
 	      eip = ((struct pt_regs *) (tsk)->thread.esp0)->pc; \
 	eip; })
 #define	KSTK_ESP(tsk)	((tsk) == current ? rdusp() : (tsk)->thread.usp)
diff -Nru a/include/asm-m68knommu/thread_info.h b/include/asm-m68knommu/thread_info.h
--- a/include/asm-m68knommu/thread_info.h	2005-01-10 20:11:18 -08:00
+++ b/include/asm-m68knommu/thread_info.h	2005-01-10 20:11:18 -08:00
@@ -12,12 +12,6 @@
 
 #ifdef __KERNEL__
 
-/*
- * Size of kernel stack for each process. This must be a power of 2...
- */
-#define THREAD_SIZE		8192	/* 2 pages */
-
-
 #ifndef __ASSEMBLY__
 
 /*
@@ -59,7 +53,7 @@
 		"move.l	%%sp, %0 \n\t"
 		"and.l	%1, %0"
 		: "=&d"(ti)
-		: "d" (~(THREAD_SIZE-1))
+		: "di" (~(THREAD_SIZE-1))
 		);
 	return ti;
 }
diff -Nru a/include/asm-mips/compat.h b/include/asm-mips/compat.h
--- a/include/asm-mips/compat.h	2005-01-10 20:11:20 -08:00
+++ b/include/asm-mips/compat.h	2005-01-10 20:11:20 -08:00
@@ -137,5 +137,8 @@
 
 	return (void *) (regs->regs[29] - len);
 }
+#if defined (__MIPSEL__)
+#define __COMPAT_ENDIAN_SWAP__ 	1
+#endif
 
 #endif /* _ASM_COMPAT_H */
diff -Nru a/include/asm-mips/pgalloc.h b/include/asm-mips/pgalloc.h
--- a/include/asm-mips/pgalloc.h	2005-01-10 20:11:19 -08:00
+++ b/include/asm-mips/pgalloc.h	2005-01-10 20:11:19 -08:00
@@ -56,9 +56,7 @@
 {
 	pte_t *pte;
 
-	pte = (pte_t *) __get_free_pages(GFP_KERNEL|__GFP_REPEAT, PTE_ORDER);
-	if (pte)
-		clear_page(pte);
+	pte = (pte_t *) __get_free_pages(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO, PTE_ORDER);
 
 	return pte;
 }
diff -Nru a/include/asm-mips/pgtable.h b/include/asm-mips/pgtable.h
--- a/include/asm-mips/pgtable.h	2005-01-10 20:11:17 -08:00
+++ b/include/asm-mips/pgtable.h	2005-01-10 20:11:17 -08:00
@@ -8,6 +8,8 @@
 #ifndef _ASM_PGTABLE_H
 #define _ASM_PGTABLE_H
 
+#include <asm-generic/4level-fixup.h>
+
 #include <linux/config.h>
 #ifdef CONFIG_MIPS32
 #include <asm/pgtable-32.h>
diff -Nru a/include/asm-mips/processor.h b/include/asm-mips/processor.h
--- a/include/asm-mips/processor.h	2005-01-10 20:11:15 -08:00
+++ b/include/asm-mips/processor.h	2005-01-10 20:11:15 -08:00
@@ -33,12 +33,6 @@
 
 extern unsigned int vced_count, vcei_count;
 
-/*
- * Bus types (default is ISA, but people can check others with these..)
- */
-#define MCA_bus 0
-#define MCA_bus__is_a_macro /* for versions in ksyms.c */
-
 #ifdef CONFIG_MIPS32
 /*
  * User space process size: 2GB. This is hardcoded into a few places,
diff -Nru a/include/asm-mips/sections.h b/include/asm-mips/sections.h
--- a/include/asm-mips/sections.h	2005-01-10 20:11:23 -08:00
+++ b/include/asm-mips/sections.h	2005-01-10 20:11:23 -08:00
@@ -4,6 +4,5 @@
 #include <asm-generic/sections.h>
 
 extern char _fdata;
-extern char _end;
 
 #endif /* _ASM_SECTIONS_H */
diff -Nru a/include/asm-mips/sn/sn_private.h b/include/asm-mips/sn/sn_private.h
--- a/include/asm-mips/sn/sn_private.h	2005-01-10 20:11:21 -08:00
+++ b/include/asm-mips/sn/sn_private.h	2005-01-10 20:11:21 -08:00
@@ -12,8 +12,8 @@
 extern void per_cpu_init(void);
 extern void install_cpu_nmi_handler(int slice);
 extern void install_ipi(void);
-extern void setup_replication_mask(int);
-extern void replicate_kernel_text(int);
+extern void setup_replication_mask();
+extern void replicate_kernel_text();
 extern pfn_t node_getfirstfree(cnodeid_t);
 
 #endif /* __ASM_SN_SN_PRIVATE_H */
diff -Nru a/include/asm-mips/spinlock.h b/include/asm-mips/spinlock.h
--- a/include/asm-mips/spinlock.h	2005-01-10 20:11:22 -08:00
+++ b/include/asm-mips/spinlock.h	2005-01-10 20:11:22 -08:00
@@ -17,6 +17,9 @@
 
 typedef struct {
 	volatile unsigned int lock;
+#ifdef CONFIG_PREEMPT
+	unsigned int break_lock;
+#endif
 } spinlock_t;
 
 #define SPIN_LOCK_UNLOCKED (spinlock_t) { 0 }
@@ -127,6 +130,9 @@
 
 typedef struct {
 	volatile unsigned int lock;
+#ifdef CONFIG_PREEMPT
+	unsigned int break_lock;
+#endif
 } rwlock_t;
 
 #define RW_LOCK_UNLOCKED (rwlock_t) { 0 }
@@ -245,6 +251,8 @@
 	: "m" (rw->lock)
 	: "memory");
 }
+
+#define _raw_read_trylock(lock) generic_raw_read_trylock(lock)
 
 static inline int _raw_write_trylock(rwlock_t *rw)
 {
diff -Nru a/include/asm-mips/unistd.h b/include/asm-mips/unistd.h
--- a/include/asm-mips/unistd.h	2005-01-10 20:11:15 -08:00
+++ b/include/asm-mips/unistd.h	2005-01-10 20:11:15 -08:00
@@ -1106,7 +1106,6 @@
 #define __ARCH_WANT_SYS_GETHOSTNAME
 #define __ARCH_WANT_SYS_PAUSE
 #define __ARCH_WANT_SYS_SGETMASK
-#define __ARCH_WANT_SYS_TIME
 #define __ARCH_WANT_SYS_UTIME
 #define __ARCH_WANT_SYS_WAITPID
 #define __ARCH_WANT_SYS_SOCKETCALL
@@ -1121,6 +1120,12 @@
 #define __ARCH_WANT_SYS_RT_SIGACTION
 # ifndef __mips64
 #  define __ARCH_WANT_STAT64
+# endif
+# ifdef CONFIG_MIPS32
+#  define __ARCH_WANT_SYS_TIME
+# endif
+# ifdef CONFIG_MIPS32_O32
+#  define __ARCH_WANT_COMPAT_SYS_TIME
 # endif
 #endif
 
diff -Nru a/include/asm-parisc/hardirq.h b/include/asm-parisc/hardirq.h
--- a/include/asm-parisc/hardirq.h	2005-01-10 20:11:22 -08:00
+++ b/include/asm-parisc/hardirq.h	2005-01-10 20:11:22 -08:00
@@ -21,9 +21,6 @@
 
 typedef struct {
 	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 */
@@ -37,14 +34,5 @@
 #if (1 << HARDIRQ_BITS) < NR_IRQS
 # error HARDIRQ_BITS is too low!
 #endif
-
-#define irq_enter()		(preempt_count() += HARDIRQ_OFFSET)
-#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)
 
 #endif /* _PARISC_HARDIRQ_H */
diff -Nru a/include/asm-parisc/pgalloc.h b/include/asm-parisc/pgalloc.h
--- a/include/asm-parisc/pgalloc.h	2005-01-10 20:11:22 -08:00
+++ b/include/asm-parisc/pgalloc.h	2005-01-10 20:11:22 -08:00
@@ -120,18 +120,14 @@
 static inline struct page *
 pte_alloc_one(struct mm_struct *mm, unsigned long address)
 {
-	struct page *page = alloc_page(GFP_KERNEL|__GFP_REPEAT);
-	if (likely(page != NULL))
-		clear_page(page_address(page));
+	struct page *page = alloc_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO);
 	return page;
 }
 
 static inline pte_t *
 pte_alloc_one_kernel(struct mm_struct *mm, unsigned long addr)
 {
-	pte_t *pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT);
-	if (likely(pte != NULL))
-		clear_page(pte);
+	pte_t *pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO);
 	return pte;
 }
 
diff -Nru a/include/asm-parisc/pgtable.h b/include/asm-parisc/pgtable.h
--- a/include/asm-parisc/pgtable.h	2005-01-10 20:11:22 -08:00
+++ b/include/asm-parisc/pgtable.h	2005-01-10 20:11:22 -08:00
@@ -1,6 +1,8 @@
 #ifndef _PARISC_PGTABLE_H
 #define _PARISC_PGTABLE_H
 
+#include <asm-generic/4level-fixup.h>
+
 #include <linux/config.h>
 #include <asm/fixmap.h>
 
diff -Nru a/include/asm-parisc/processor.h b/include/asm-parisc/processor.h
--- a/include/asm-parisc/processor.h	2005-01-10 20:11:23 -08:00
+++ b/include/asm-parisc/processor.h	2005-01-10 20:11:23 -08:00
@@ -107,9 +107,6 @@
 
 #define CPU_HVERSION ((boot_cpu_data.hversion >> 4) & 0x0FFF)
 
-#define MCA_bus 0
-#define MCA_bus__is_a_macro /* for versions in ksyms.c */
-
 typedef struct {
 	int seg;  
 } mm_segment_t;
diff -Nru a/include/asm-parisc/spinlock.h b/include/asm-parisc/spinlock.h
--- a/include/asm-parisc/spinlock.h	2005-01-10 20:11:24 -08:00
+++ b/include/asm-parisc/spinlock.h	2005-01-10 20:11:24 -08:00
@@ -142,6 +142,9 @@
 typedef struct {
 	spinlock_t lock;
 	volatile int counter;
+#ifdef CONFIG_PREEMPT
+	unsigned int break_lock;
+#endif
 } rwlock_t;
 
 #define RW_LOCK_UNLOCKED (rwlock_t) { __SPIN_LOCK_UNLOCKED, 0 }
@@ -149,6 +152,8 @@
 #define rwlock_init(lp)	do { *(lp) = RW_LOCK_UNLOCKED; } while (0)
 
 #define rwlock_is_locked(lp) ((lp)->counter != 0)
+
+#define _raw_read_trylock(lock) generic_raw_read_trylock(lock)
 
 /* read_lock, read_unlock are pretty straightforward.  Of course it somehow
  * sucks we end up saving/restoring flags twice for read_lock_irqsave aso. */
diff -Nru a/include/asm-parisc/system.h b/include/asm-parisc/system.h
--- a/include/asm-parisc/system.h	2005-01-10 20:11:20 -08:00
+++ b/include/asm-parisc/system.h	2005-01-10 20:11:20 -08:00
@@ -176,6 +176,9 @@
 	void *previous;
 	struct task_struct * task;
 #endif
+#ifdef CONFIG_PREEMPT
+	unsigned int break_lock;
+#endif
 } spinlock_t;
 
 #define __lock_aligned __attribute__((__section__(".data.lock_aligned")))
diff -Nru a/include/asm-parisc/unistd.h b/include/asm-parisc/unistd.h
--- a/include/asm-parisc/unistd.h	2005-01-10 20:11:15 -08:00
+++ b/include/asm-parisc/unistd.h	2005-01-10 20:11:15 -08:00
@@ -912,6 +912,7 @@
 #define __ARCH_WANT_SYS_SGETMASK
 #define __ARCH_WANT_SYS_SIGNAL
 #define __ARCH_WANT_SYS_TIME
+#define __ARCH_WANT_COMPAT_SYS_TIME
 #define __ARCH_WANT_SYS_UTIME
 #define __ARCH_WANT_SYS_WAITPID
 #define __ARCH_WANT_SYS_SOCKETCALL
diff -Nru a/include/asm-ppc/gg2.h b/include/asm-ppc/gg2.h
--- a/include/asm-ppc/gg2.h	2005-01-10 20:11:21 -08:00
+++ b/include/asm-ppc/gg2.h	2005-01-10 20:11:21 -08:00
@@ -34,7 +34,7 @@
      *  GG2 specific PCI Registers
      */
 
-extern unsigned long gg2_pci_config_base;	/* kernel virtual address */
+extern void __iomem *gg2_pci_config_base;	/* kernel virtual address */
 
 #define GG2_PCI_BUSNO		0x40	/* Bus number */
 #define GG2_PCI_SUBBUSNO	0x41	/* Subordinate bus number */
diff -Nru a/include/asm-ppc/highmem.h b/include/asm-ppc/highmem.h
--- a/include/asm-ppc/highmem.h	2005-01-10 20:11:22 -08:00
+++ b/include/asm-ppc/highmem.h	2005-01-10 20:11:22 -08:00
@@ -56,7 +56,7 @@
 static inline void *kmap(struct page *page)
 {
 	might_sleep();
-	if (page < highmem_start_page)
+	if (!PageHighMem(page))
 		return page_address(page);
 	return kmap_high(page);
 }
@@ -64,7 +64,7 @@
 static inline void kunmap(struct page *page)
 {
 	BUG_ON(in_interrupt());
-	if (page < highmem_start_page)
+	if (!PageHighMem(page))
 		return;
 	kunmap_high(page);
 }
@@ -82,7 +82,7 @@
 
 	/* even !CONFIG_PREEMPT needs this, for in_atomic in do_page_fault */
 	inc_preempt_count();
-	if (page < highmem_start_page)
+	if (!PageHighMem(page))
 		return page_address(page);
 
 	idx = type + KM_TYPE_NR*smp_processor_id();
diff -Nru a/include/asm-ppc/ibm44x.h b/include/asm-ppc/ibm44x.h
--- a/include/asm-ppc/ibm44x.h	2005-01-10 20:11:24 -08:00
+++ b/include/asm-ppc/ibm44x.h	2005-01-10 20:11:24 -08:00
@@ -59,11 +59,6 @@
 #ifndef __ASSEMBLY__
 
 /*
- * SPRN definitions
- */
-#define SPRN_CPC0_GPIO		0xe5/BEARLRL
-
-/*
  * DCRN definitions
  */
 
@@ -162,8 +157,7 @@
 #define DCRN_UIC_VR(base)       (base + 0x7)
 #define DCRN_UIC_VCR(base)      (base + 0x8)
 
-#define UIC0_UIC1NC		30	/* UIC1 non-critical interrupt */
-#define UIC0_UIC1CR      	31	/* UIC1 critical interrupt */
+#define UIC0_UIC1NC      	0x00000002
 
 #define UICB_UIC0NC		0x40000000
 #define UICB_UIC1NC		0x10000000
@@ -518,7 +512,6 @@
 #else
 #define NR_UICS 2
 #endif
-#define UIC_CASCADE_MASK	0x0003		/* bits 30 & 31 */
 
 #define BD_EMAC_ADDR(e,i) bi_enetaddr[e][i]
 
diff -Nru a/include/asm-ppc/io.h b/include/asm-ppc/io.h
--- a/include/asm-ppc/io.h	2005-01-10 20:11:21 -08:00
+++ b/include/asm-ppc/io.h	2005-01-10 20:11:21 -08:00
@@ -182,15 +182,15 @@
 #define readw_relaxed(addr) readw(addr)
 #define readl_relaxed(addr) readl(addr)
 
-static inline __u8 __raw_readb(volatile void __iomem *addr)
+static inline __u8 __raw_readb(const volatile void __iomem *addr)
 {
 	return *(__force volatile __u8 *)(addr);
 }
-static inline __u16 __raw_readw(volatile void __iomem *addr)
+static inline __u16 __raw_readw(const volatile void __iomem *addr)
 {
 	return *(__force volatile __u16 *)(addr);
 }
-static inline __u32 __raw_readl(volatile void __iomem *addr)
+static inline __u32 __raw_readl(const volatile void __iomem *addr)
 {
 	return *(__force volatile __u32 *)(addr);
 }
@@ -336,7 +336,7 @@
 {
 	memset((void __force *)addr, val, count);
 }
-static inline void memcpy_fromio(void *dst, volatile void __iomem *src, int count)
+static inline void memcpy_fromio(void *dst,const volatile void __iomem *src, int count)
 {
 	memcpy(dst, (void __force *) src, count);
 }
@@ -345,6 +345,8 @@
 	memcpy((void __force *) dst, src, count);
 }
 
+#define eth_io_copy_and_sum(a,b,c,d)		eth_copy_and_sum((a),(void __force *)(void __iomem *)(b),(c),(d))
+
 /*
  * Map in an area of physical address space, for accessing
  * I/O devices etc.
@@ -488,32 +490,32 @@
 
 static inline void ioread8_rep(void __iomem *addr, void *dst, unsigned long count)
 {
-	_insb((u8 __force *) addr, dst, count);
+	_insb(addr, dst, count);
 }
 
 static inline void ioread16_rep(void __iomem *addr, void *dst, unsigned long count)
 {
-	_insw_ns((u16 __force *) addr, dst, count);
+	_insw_ns(addr, dst, count);
 }
 
 static inline void ioread32_rep(void __iomem *addr, void *dst, unsigned long count)
 {
-	_insl_ns((u32 __force *) addr, dst, count);
+	_insl_ns(addr, dst, count);
 }
 
 static inline void iowrite8_rep(void __iomem *addr, const void *src, unsigned long count)
 {
-	_outsb((u8 __force *) addr, src, count);
+	_outsb(addr, src, count);
 }
 
 static inline void iowrite16_rep(void __iomem *addr, const void *src, unsigned long count)
 {
-	_outsw_ns((u16 __force *) addr, src, count);
+	_outsw_ns(addr, src, count);
 }
 
 static inline void iowrite32_rep(void __iomem *addr, const void *src, unsigned long count)
 {
-	_outsl_ns((u32 __force *) addr, src, count);
+	_outsl_ns(addr, src, count);
 }
 
 /* Create a virtual mapping cookie for an IO port range */
diff -Nru a/include/asm-ppc/mmu.h b/include/asm-ppc/mmu.h
--- a/include/asm-ppc/mmu.h	2005-01-10 20:11:22 -08:00
+++ b/include/asm-ppc/mmu.h	2005-01-10 20:11:22 -08:00
@@ -401,18 +401,17 @@
  * Freescale Book-E MMU support
  */
 
-#define MAS0_TLBSEL	0x10000000
-#define MAS0_ESEL	0x000F0000
-#define MAS0_NV		0x00000001
+#define MAS0_TLBSEL(x)	((x << 28) & 0x30000000)
+#define MAS0_ESEL(x)	((x << 16) & 0x0FFF0000)
+#define MAS0_NV		0x00000FFF
 
 #define MAS1_VALID 	0x80000000
 #define MAS1_IPROT	0x40000000
-#define MAS1_TID 	0x03FF0000
+#define MAS1_TID(x)	((x << 16) & 0x3FFF0000)
 #define MAS1_TS		0x00001000
-#define MAS1_TSIZE(x)	(x << 8)
+#define MAS1_TSIZE(x)	((x << 8) & 0x00000F00)
 
 #define MAS2_EPN	0xFFFFF000
-#define MAS2_SHAREN	0x00000200
 #define MAS2_X0		0x00000040
 #define MAS2_X1		0x00000020
 #define MAS2_W		0x00000010
@@ -433,10 +432,9 @@
 #define MAS3_UR		0x00000002
 #define MAS3_SR		0x00000001
 
-#define MAS4_TLBSELD	0x10000000
-#define MAS4_TIDDSEL	0x00030000
-#define MAS4_DSHAREN	0x00001000
-#define MAS4_TSIZED(x)	(x << 8)
+#define MAS4_TLBSELD(x) MAS0_TLBSEL(x)
+#define MAS4_TIDDSEL	0x000F0000
+#define MAS4_TSIZED(x)	MAS1_TSIZE(x)
 #define MAS4_X0D	0x00000040
 #define MAS4_X1D	0x00000020
 #define MAS4_WD		0x00000010
@@ -445,8 +443,12 @@
 #define MAS4_GD		0x00000002
 #define MAS4_ED		0x00000001
 
-#define MAS6_SPID	0x00FF0000
+#define MAS6_SPID0	0x3FFF0000
+#define MAS6_SPID1	0x00007FFE
 #define MAS6_SAS	0x00000001
+#define MAS6_SPID	MAS6_SPID0
+
+#define MAS7_RPN	0xFFFFFFFF
 
 #endif /* _PPC_MMU_H_ */
 #endif /* __KERNEL__ */
diff -Nru a/include/asm-ppc/mv64x60.h b/include/asm-ppc/mv64x60.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-ppc/mv64x60.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,343 @@
+/*
+ * include/asm-ppc/mv64x60.h
+ *
+ * Prototypes, etc. for the Marvell/Galileo MV64x60 host bridge routines.
+ *
+ * Author: Mark A. Greer <mgreer@mvista.com>
+ *
+ * 2001-2002 (c) MontaVista, Software, Inc.  This file is licensed under
+ * the terms of the GNU General Public License version 2.  This program
+ * is licensed "as is" without any warranty of any kind, whether express
+ * or implied.
+ */
+#ifndef __ASMPPC_MV64x60_H
+#define __ASMPPC_MV64x60_H
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/pci.h>
+#include <linux/slab.h>
+#include <linux/config.h>
+
+#include <asm/byteorder.h>
+#include <asm/io.h>
+#include <asm/irq.h>
+#include <asm/uaccess.h>
+#include <asm/machdep.h>
+#include <asm/pci-bridge.h>
+#include <asm/mv64x60_defs.h>
+
+extern u8      mv64x60_pci_exclude_bridge;
+
+extern spinlock_t mv64x60_lock;
+
+/* 32-bit Window table entry defines */
+#define	MV64x60_CPU2MEM_0_WIN			0
+#define	MV64x60_CPU2MEM_1_WIN			1
+#define	MV64x60_CPU2MEM_2_WIN			2
+#define	MV64x60_CPU2MEM_3_WIN			3
+#define	MV64x60_CPU2DEV_0_WIN			4
+#define	MV64x60_CPU2DEV_1_WIN			5
+#define	MV64x60_CPU2DEV_2_WIN			6
+#define	MV64x60_CPU2DEV_3_WIN			7
+#define	MV64x60_CPU2BOOT_WIN			8
+#define	MV64x60_CPU2PCI0_IO_WIN			9
+#define	MV64x60_CPU2PCI0_MEM_0_WIN		10
+#define	MV64x60_CPU2PCI0_MEM_1_WIN		11
+#define	MV64x60_CPU2PCI0_MEM_2_WIN		12
+#define	MV64x60_CPU2PCI0_MEM_3_WIN		13
+#define	MV64x60_CPU2PCI1_IO_WIN			14
+#define	MV64x60_CPU2PCI1_MEM_0_WIN		15
+#define	MV64x60_CPU2PCI1_MEM_1_WIN		16
+#define	MV64x60_CPU2PCI1_MEM_2_WIN		17
+#define	MV64x60_CPU2PCI1_MEM_3_WIN		18
+#define	MV64x60_CPU2SRAM_WIN			19
+#define	MV64x60_CPU2PCI0_IO_REMAP_WIN		20
+#define	MV64x60_CPU2PCI1_IO_REMAP_WIN		21
+#define	MV64x60_CPU_PROT_0_WIN			22
+#define	MV64x60_CPU_PROT_1_WIN			23
+#define	MV64x60_CPU_PROT_2_WIN			24
+#define	MV64x60_CPU_PROT_3_WIN			25
+#define	MV64x60_CPU_SNOOP_0_WIN			26
+#define	MV64x60_CPU_SNOOP_1_WIN			27
+#define	MV64x60_CPU_SNOOP_2_WIN			28
+#define	MV64x60_CPU_SNOOP_3_WIN			29
+#define	MV64x60_PCI02MEM_REMAP_0_WIN		30
+#define	MV64x60_PCI02MEM_REMAP_1_WIN		31
+#define	MV64x60_PCI02MEM_REMAP_2_WIN		32
+#define	MV64x60_PCI02MEM_REMAP_3_WIN		33
+#define	MV64x60_PCI12MEM_REMAP_0_WIN		34
+#define	MV64x60_PCI12MEM_REMAP_1_WIN		35
+#define	MV64x60_PCI12MEM_REMAP_2_WIN		36
+#define	MV64x60_PCI12MEM_REMAP_3_WIN		37
+#define	MV64x60_ENET2MEM_0_WIN			38
+#define	MV64x60_ENET2MEM_1_WIN			39
+#define	MV64x60_ENET2MEM_2_WIN			40
+#define	MV64x60_ENET2MEM_3_WIN			41
+#define	MV64x60_ENET2MEM_4_WIN			42
+#define	MV64x60_ENET2MEM_5_WIN			43
+#define	MV64x60_MPSC2MEM_0_WIN			44
+#define	MV64x60_MPSC2MEM_1_WIN			45
+#define	MV64x60_MPSC2MEM_2_WIN			46
+#define	MV64x60_MPSC2MEM_3_WIN			47
+#define	MV64x60_IDMA2MEM_0_WIN			48
+#define	MV64x60_IDMA2MEM_1_WIN			49
+#define	MV64x60_IDMA2MEM_2_WIN			50
+#define	MV64x60_IDMA2MEM_3_WIN			51
+#define	MV64x60_IDMA2MEM_4_WIN			52
+#define	MV64x60_IDMA2MEM_5_WIN			53
+#define	MV64x60_IDMA2MEM_6_WIN			54
+#define	MV64x60_IDMA2MEM_7_WIN			55
+
+#define	MV64x60_32BIT_WIN_COUNT			56
+
+/* 64-bit Window table entry defines */
+#define	MV64x60_CPU2PCI0_MEM_0_REMAP_WIN	0
+#define	MV64x60_CPU2PCI0_MEM_1_REMAP_WIN	1
+#define	MV64x60_CPU2PCI0_MEM_2_REMAP_WIN	2
+#define	MV64x60_CPU2PCI0_MEM_3_REMAP_WIN	3
+#define	MV64x60_CPU2PCI1_MEM_0_REMAP_WIN	4
+#define	MV64x60_CPU2PCI1_MEM_1_REMAP_WIN	5
+#define	MV64x60_CPU2PCI1_MEM_2_REMAP_WIN	6
+#define	MV64x60_CPU2PCI1_MEM_3_REMAP_WIN	7
+#define	MV64x60_PCI02MEM_ACC_CNTL_0_WIN		8
+#define	MV64x60_PCI02MEM_ACC_CNTL_1_WIN		9
+#define	MV64x60_PCI02MEM_ACC_CNTL_2_WIN		10
+#define	MV64x60_PCI02MEM_ACC_CNTL_3_WIN		11
+#define	MV64x60_PCI12MEM_ACC_CNTL_0_WIN		12
+#define	MV64x60_PCI12MEM_ACC_CNTL_1_WIN		13
+#define	MV64x60_PCI12MEM_ACC_CNTL_2_WIN		14
+#define	MV64x60_PCI12MEM_ACC_CNTL_3_WIN		15
+#define	MV64x60_PCI02MEM_SNOOP_0_WIN		16
+#define	MV64x60_PCI02MEM_SNOOP_1_WIN		17
+#define	MV64x60_PCI02MEM_SNOOP_2_WIN		18
+#define	MV64x60_PCI02MEM_SNOOP_3_WIN		19
+#define	MV64x60_PCI12MEM_SNOOP_0_WIN		20
+#define	MV64x60_PCI12MEM_SNOOP_1_WIN		21
+#define	MV64x60_PCI12MEM_SNOOP_2_WIN		22
+#define	MV64x60_PCI12MEM_SNOOP_3_WIN		23
+
+#define	MV64x60_64BIT_WIN_COUNT			24
+
+/*
+ * Define a structure that's used to pass in config information to the
+ * core routines.
+ */
+struct mv64x60_pci_window {
+	u32	cpu_base;
+	u32	pci_base_hi;
+	u32	pci_base_lo;
+	u32	size;
+	u32	swap;
+};
+
+struct mv64x60_pci_info {
+	u8	enable_bus;	/* allow access to this PCI bus? */
+
+	struct mv64x60_pci_window	pci_io;
+	struct mv64x60_pci_window	pci_mem[3];
+
+	u32	acc_cntl_options[MV64x60_CPU2MEM_WINDOWS];
+	u32	snoop_options[MV64x60_CPU2MEM_WINDOWS];
+	u16	pci_cmd_bits;
+	u16	latency_timer;
+};
+
+struct mv64x60_setup_info {
+	u32	phys_reg_base;
+	u32	window_preserve_mask_32_hi;
+	u32	window_preserve_mask_32_lo;
+	u32	window_preserve_mask_64;
+
+	u32	cpu_prot_options[MV64x60_CPU2MEM_WINDOWS];
+	u32	cpu_snoop_options[MV64x60_CPU2MEM_WINDOWS];
+	u32	enet_options[MV64x60_CPU2MEM_WINDOWS];
+	u32	mpsc_options[MV64x60_CPU2MEM_WINDOWS];
+	u32	idma_options[MV64x60_CPU2MEM_WINDOWS];
+
+	struct mv64x60_pci_info	pci_0;
+	struct mv64x60_pci_info	pci_1;
+};
+
+/* Define what the top bits in the extra member of a window entry means. */
+#define	MV64x60_EXTRA_INVALID		0x00000000
+#define	MV64x60_EXTRA_CPUWIN_ENAB	0x10000000
+#define	MV64x60_EXTRA_CPUPROT_ENAB	0x20000000
+#define	MV64x60_EXTRA_ENET_ENAB		0x30000000
+#define	MV64x60_EXTRA_MPSC_ENAB		0x40000000
+#define	MV64x60_EXTRA_IDMA_ENAB		0x50000000
+#define	MV64x60_EXTRA_PCIACC_ENAB	0x60000000
+
+#define	MV64x60_EXTRA_MASK		0xf0000000
+
+/*
+ * Define the 'handle' struct that will be passed between the 64x60 core
+ * code and the platform-specific code that will use it.  The handle
+ * will contain pointers to chip-specific routines & information.
+ */
+struct mv64x60_32bit_window {
+	u32	base_reg;
+	u32	size_reg;
+	u8	base_bits;
+	u8	size_bits;
+	u32	(*get_from_field)(u32 val, u32 num_bits);
+	u32	(*map_to_field)(u32 val, u32 num_bits);
+	u32	extra;
+};
+
+struct mv64x60_64bit_window {
+	u32	base_hi_reg;
+	u32	base_lo_reg;
+	u32	size_reg;
+	u8	base_lo_bits;
+	u8	size_bits;
+	u32	(*get_from_field)(u32 val, u32 num_bits);
+	u32	(*map_to_field)(u32 val, u32 num_bits);
+	u32	extra;
+};
+
+typedef struct mv64x60_handle	mv64x60_handle_t;
+struct mv64x60_chip_info {
+	u32	(*translate_size)(u32 base, u32 size, u32 num_bits);
+	u32	(*untranslate_size)(u32 base, u32 size, u32 num_bits);
+	void	(*set_pci2mem_window)(struct pci_controller *hose, u32 bus,
+			u32 window, u32 base);
+	void 	(*set_pci2regs_window)(struct mv64x60_handle *bh,
+			struct pci_controller *hose, u32 bus, u32 base);
+	u32	(*is_enabled_32bit)(mv64x60_handle_t *bh, u32 window);
+	void	(*enable_window_32bit)(mv64x60_handle_t *bh, u32 window);
+	void	(*disable_window_32bit)(mv64x60_handle_t *bh, u32 window);
+	void	(*enable_window_64bit)(mv64x60_handle_t *bh, u32 window);
+	void	(*disable_window_64bit)(mv64x60_handle_t *bh, u32 window);
+	void	(*disable_all_windows)(mv64x60_handle_t *bh,
+		       struct mv64x60_setup_info *si);
+	void	(*config_io2mem_windows)(mv64x60_handle_t *bh,
+			struct mv64x60_setup_info *si,
+			u32 mem_windows[MV64x60_CPU2MEM_WINDOWS][2]);
+	void 	(*set_mpsc2regs_window)(struct mv64x60_handle *bh, u32 base);
+	void	(*chip_specific_init)(mv64x60_handle_t *bh,
+			struct mv64x60_setup_info *si);
+
+	struct mv64x60_32bit_window	*window_tab_32bit;
+	struct mv64x60_64bit_window	*window_tab_64bit;
+};
+
+struct mv64x60_handle {
+	u32	type;		/* type of bridge */
+	u32	rev;		/* revision of bridge */
+	u32	v_base;		/* virtual base addr of bridge regs */
+	u32	p_base;		/* physical base addr of bridge regs */
+
+	u32	pci_mode_a;	/* pci bus 0 mode: conventional pci, pci-x */
+	u32	pci_mode_b;	/* pci bus 1 mode: conventional pci, pci-x */
+
+	u32	io_base_a;	/* vaddr of pci 0's I/O space */
+	u32	io_base_b;	/* vaddr of pci 1's I/O space */
+
+	struct pci_controller	*hose_a;
+	struct pci_controller	*hose_b;
+
+	struct mv64x60_chip_info *ci;	/* chip/bridge-specific info */
+};
+
+
+/* Define I/O routines for accessing registers on the 64x60 bridge. */
+extern inline void
+mv64x60_write(struct mv64x60_handle *bh, u32 offset, u32 val) {
+	ulong	flags;
+
+	spin_lock_irqsave(&mv64x60_lock, flags);
+	out_le32((volatile u32 *)(bh->v_base + offset), val);
+	spin_unlock_irqrestore(&mv64x60_lock, flags);
+}
+
+extern inline u32
+mv64x60_read(struct mv64x60_handle *bh, u32 offset) {
+	ulong	flags;
+
+	spin_lock_irqsave(&mv64x60_lock, flags);
+	return in_le32((volatile u32 *)(bh->v_base + offset));
+	spin_unlock_irqrestore(&mv64x60_lock, flags);
+}
+
+extern inline void
+mv64x60_modify(struct mv64x60_handle *bh, u32 offs, u32 data, u32 mask)
+{
+	u32	reg;
+	ulong	flags;
+
+	spin_lock_irqsave(&mv64x60_lock, flags);
+	reg = mv64x60_read(bh, offs) & (~mask); /* zero bits we care about */
+	reg |= data & mask; /* set bits from the data */
+	mv64x60_write(bh, offs, reg);
+	spin_unlock_irqrestore(&mv64x60_lock, flags);
+}
+
+#define	mv64x60_set_bits(bh, offs, bits) mv64x60_modify(bh, offs, ~0, bits)
+#define	mv64x60_clr_bits(bh, offs, bits) mv64x60_modify(bh, offs, 0, bits)
+
+
+/* Externally visible function prototypes */
+int mv64x60_init(struct mv64x60_handle *bh, struct mv64x60_setup_info *si);
+u32 mv64x60_get_mem_size(u32 bridge_base, u32 chip_type);
+void mv64x60_early_init(struct mv64x60_handle *bh,
+	struct mv64x60_setup_info *si);
+void mv64x60_alloc_hose(struct mv64x60_handle *bh, u32 cfg_addr, u32 cfg_data,
+	struct pci_controller **hose);
+int mv64x60_get_type(struct mv64x60_handle *bh);
+int mv64x60_setup_for_chip(struct mv64x60_handle *bh);
+u32 mv64x60_get_bridge_vbase(void);
+u32 mv64x60_get_bridge_type(void);
+u32 mv64x60_get_bridge_rev(void);
+void mv64x60_get_mem_windows(struct mv64x60_handle *bh,
+	u32 mem_windows[MV64x60_CPU2MEM_WINDOWS][2]);
+void mv64x60_config_cpu2mem_windows(struct mv64x60_handle *bh,
+	struct mv64x60_setup_info *si,
+	u32 mem_windows[MV64x60_CPU2MEM_WINDOWS][2]);
+void mv64x60_config_cpu2pci_windows(struct mv64x60_handle *bh,
+	struct mv64x60_pci_info *pi, u32 bus);
+void mv64x60_config_pci2mem_windows(struct mv64x60_handle *bh,
+	struct pci_controller *hose, struct mv64x60_pci_info *pi, u32 bus,
+	u32 mem_windows[MV64x60_CPU2MEM_WINDOWS][2]);
+void mv64x60_config_resources(struct pci_controller *hose,
+	struct mv64x60_pci_info *pi, u32 io_base);
+void mv64x60_config_pci_params(struct pci_controller *hose,
+	struct mv64x60_pci_info *pi);
+void mv64x60_pd_fixup(struct mv64x60_handle *bh,
+	struct platform_device *pd_devs[], u32 entries);
+void mv64x60_get_32bit_window(struct mv64x60_handle *bh, u32 window,
+	u32 *base, u32 *size);
+void mv64x60_set_32bit_window(struct mv64x60_handle *bh, u32 window, u32 base,
+	u32 size, u32 other_bits);
+void mv64x60_get_64bit_window(struct mv64x60_handle *bh, u32 window,
+	u32 *base_hi, u32 *base_lo, u32 *size);
+void mv64x60_set_64bit_window(struct mv64x60_handle *bh, u32 window,
+	u32 base_hi, u32 base_lo, u32 size, u32 other_bits);
+void mv64x60_set_bus(struct mv64x60_handle *bh, u32 bus, u32 child_bus);
+int mv64x60_pci_exclude_device(u8 bus, u8 devfn);
+
+
+void gt64260_init_irq(void);
+int gt64260_get_irq(struct pt_regs *regs);
+void mv64360_init_irq(void);
+int mv64360_get_irq(struct pt_regs *regs);
+
+u32 mv64x60_mask(u32 val, u32 num_bits);
+u32 mv64x60_shift_left(u32 val, u32 num_bits);
+u32 mv64x60_shift_right(u32 val, u32 num_bits);
+u32 mv64x60_calc_mem_size(struct mv64x60_handle *bh,
+	u32 mem_windows[MV64x60_CPU2MEM_WINDOWS][2]);
+
+void mv64x60_progress_init(u32 base);
+void mv64x60_mpsc_progress(char *s, unsigned short hex);
+
+extern struct mv64x60_32bit_window
+	gt64260_32bit_windows[MV64x60_32BIT_WIN_COUNT];
+extern struct mv64x60_64bit_window
+	gt64260_64bit_windows[MV64x60_64BIT_WIN_COUNT];
+extern struct mv64x60_32bit_window
+	mv64360_32bit_windows[MV64x60_32BIT_WIN_COUNT];
+extern struct mv64x60_64bit_window
+	mv64360_64bit_windows[MV64x60_64BIT_WIN_COUNT];
+
+#endif /* __ASMPPC_MV64x60_H */
diff -Nru a/include/asm-ppc/mv64x60_defs.h b/include/asm-ppc/mv64x60_defs.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-ppc/mv64x60_defs.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,929 @@
+/*
+ * include/asm-ppc/gt64260_defs.h
+ *
+ * Register definitions for the Marvell/Galileo GT64260, MV64360, etc.
+ * host bridges.
+ *
+ * Author: Mark A. Greer <mgreer@mvista.com>
+ *
+ * 2001-2002 (c) MontaVista, Software, Inc.  This file is licensed under
+ * the terms of the GNU General Public License version 2.  This program
+ * is licensed "as is" without any warranty of any kind, whether express
+ * or implied.
+ */
+#ifndef __ASMPPC_MV64x60_DEFS_H
+#define __ASMPPC_MV64x60_DEFS_H
+
+/*
+ * Define the Marvell bridges that are supported
+ */
+#define	MV64x60_TYPE_INVALID			0
+#define	MV64x60_TYPE_GT64260A			1
+#define	MV64x60_TYPE_GT64260B			2
+#define	MV64x60_TYPE_MV64360			3
+#define	MV64x60_TYPE_MV64361			4
+#define	MV64x60_TYPE_MV64362			5
+#define	MV64x60_TYPE_MV64460			6
+
+
+/* Revisions of each supported chip */
+#define	GT64260_REV_A				0x10
+#define	GT64260_REV_B				0x20
+#define	MV64360					0x01
+#define	MV64460					0x01
+
+/* Minimum window size supported by 64260 is 1MB */
+#define GT64260_WINDOW_SIZE_MIN			0x00100000
+#define MV64360_WINDOW_SIZE_MIN			0x00010000
+
+/* IRQ's for embedded controllers */
+#define	MV64x60_IRQ_DEV				1
+#define	MV64x60_IRQ_CPU_ERR			3
+#define	MV64x60_IRQ_TIMER_0_1			8
+#define	MV64x60_IRQ_TIMER_2_3			9
+#define	MV64x60_IRQ_TIMER_4_5			10
+#define	MV64x60_IRQ_TIMER_6_7			11
+#define	MV64x60_IRQ_ETH_0			32
+#define	MV64x60_IRQ_ETH_1			33
+#define	MV64x60_IRQ_ETH_2			34
+#define	MV64x60_IRQ_SDMA_0			36
+#define	MV64x60_IRQ_I2C				37
+#define	MV64x60_IRQ_BRG				39
+#define	MV64x60_IRQ_MPSC_0			40
+#define	MV64x60_IRQ_MPSC_1			42
+#define	MV64x60_IRQ_COMM			43
+
+#define	MV64360_IRQ_PCI0			12
+#define	MV64360_IRQ_SRAM_PAR_ERR		13
+#define	MV64360_IRQ_PCI1			16
+#define	MV64360_IRQ_SDMA_1			38
+
+/* Offsets for register blocks */
+#define	GT64260_ENET_PHY_ADDR			0x2000
+#define	GT64260_ENET_ESMIR			0x2010
+#define GT64260_ENET_0_OFFSET			0x2400
+#define GT64260_ENET_1_OFFSET			0x2800
+#define GT64260_ENET_2_OFFSET			0x2c00
+#define	MV64x60_SDMA_0_OFFSET			0x4000
+#define	MV64x60_SDMA_1_OFFSET			0x6000
+#define	MV64x60_MPSC_0_OFFSET			0x8000
+#define	MV64x60_MPSC_1_OFFSET			0x9000
+#define	MV64x60_MPSC_ROUTING_OFFSET		0xb400
+#define	MV64x60_SDMA_INTR_OFFSET		0xb800
+#define	MV64x60_BRG_0_OFFSET			0xb200
+#define	MV64x60_BRG_1_OFFSET			0xb208
+
+/*
+ *****************************************************************************
+ *
+ *	CPU Interface Registers
+ *
+ *****************************************************************************
+ */
+
+/* CPU physical address of bridge's registers */
+#define MV64x60_INTERNAL_SPACE_DECODE		0x0068
+#define MV64x60_INTERNAL_SPACE_SIZE		0x10000
+#define MV64x60_INTERNAL_SPACE_DEFAULT_ADDR	0x14000000
+
+#define	MV64360_CPU_BAR_ENABLE			0x0278
+
+/* CPU Memory Controller Window Registers (4 windows) */
+#define	MV64x60_CPU2MEM_WINDOWS			4
+
+#define	MV64x60_CPU2MEM_0_BASE			0x0008
+#define	MV64x60_CPU2MEM_0_SIZE			0x0010
+#define	MV64x60_CPU2MEM_1_BASE			0x0208
+#define	MV64x60_CPU2MEM_1_SIZE			0x0210
+#define	MV64x60_CPU2MEM_2_BASE			0x0018
+#define	MV64x60_CPU2MEM_2_SIZE			0x0020
+#define	MV64x60_CPU2MEM_3_BASE			0x0218
+#define	MV64x60_CPU2MEM_3_SIZE			0x0220
+
+/* CPU Device Controller Window Registers (4 windows) */
+#define	MV64x60_CPU2DEV_WINDOWS			4
+
+#define	MV64x60_CPU2DEV_0_BASE			0x0028
+#define	MV64x60_CPU2DEV_0_SIZE			0x0030
+#define	MV64x60_CPU2DEV_1_BASE			0x0228
+#define	MV64x60_CPU2DEV_1_SIZE			0x0230
+#define	MV64x60_CPU2DEV_2_BASE			0x0248
+#define	MV64x60_CPU2DEV_2_SIZE			0x0250
+#define	MV64x60_CPU2DEV_3_BASE			0x0038
+#define	MV64x60_CPU2DEV_3_SIZE			0x0040
+
+#define	MV64x60_CPU2BOOT_0_BASE			0x0238
+#define	MV64x60_CPU2BOOT_0_SIZE			0x0240
+
+#define	MV64360_CPU2SRAM_BASE			0x0268
+
+/* CPU Windows to PCI space (2 PCI buses each w/ 1 I/O & 4 MEM windows) */
+#define	MV64x60_PCI_BUSES			2
+#define	MV64x60_PCI_IO_WINDOWS_PER_BUS		1
+#define	MV64x60_PCI_MEM_WINDOWS_PER_BUS		4
+
+#define	MV64x60_CPU2PCI_SWAP_BYTE		0x00000000
+#define	MV64x60_CPU2PCI_SWAP_NONE		0x01000000
+#define	MV64x60_CPU2PCI_SWAP_BYTE_WORD		0x02000000
+#define	MV64x60_CPU2PCI_SWAP_WORD		0x03000000
+
+#define	MV64x60_CPU2PCI_MEM_REQ64		(1<<27)
+
+#define	MV64x60_CPU2PCI0_IO_BASE		0x0048
+#define	MV64x60_CPU2PCI0_IO_SIZE		0x0050
+#define	MV64x60_CPU2PCI0_MEM_0_BASE		0x0058
+#define	MV64x60_CPU2PCI0_MEM_0_SIZE		0x0060
+#define	MV64x60_CPU2PCI0_MEM_1_BASE		0x0080
+#define	MV64x60_CPU2PCI0_MEM_1_SIZE		0x0088
+#define	MV64x60_CPU2PCI0_MEM_2_BASE		0x0258
+#define	MV64x60_CPU2PCI0_MEM_2_SIZE		0x0260
+#define	MV64x60_CPU2PCI0_MEM_3_BASE		0x0280
+#define	MV64x60_CPU2PCI0_MEM_3_SIZE		0x0288
+
+#define	MV64x60_CPU2PCI0_IO_REMAP		0x00f0
+#define	MV64x60_CPU2PCI0_MEM_0_REMAP_LO		0x00f8
+#define	MV64x60_CPU2PCI0_MEM_0_REMAP_HI		0x0320
+#define	MV64x60_CPU2PCI0_MEM_1_REMAP_LO		0x0100
+#define	MV64x60_CPU2PCI0_MEM_1_REMAP_HI		0x0328
+#define	MV64x60_CPU2PCI0_MEM_2_REMAP_LO		0x02f8
+#define	MV64x60_CPU2PCI0_MEM_2_REMAP_HI		0x0330
+#define	MV64x60_CPU2PCI0_MEM_3_REMAP_LO		0x0300
+#define	MV64x60_CPU2PCI0_MEM_3_REMAP_HI		0x0338
+
+#define	MV64x60_CPU2PCI1_IO_BASE		0x0090
+#define	MV64x60_CPU2PCI1_IO_SIZE		0x0098
+#define	MV64x60_CPU2PCI1_MEM_0_BASE		0x00a0
+#define	MV64x60_CPU2PCI1_MEM_0_SIZE		0x00a8
+#define	MV64x60_CPU2PCI1_MEM_1_BASE		0x00b0
+#define	MV64x60_CPU2PCI1_MEM_1_SIZE		0x00b8
+#define	MV64x60_CPU2PCI1_MEM_2_BASE		0x02a0
+#define	MV64x60_CPU2PCI1_MEM_2_SIZE		0x02a8
+#define	MV64x60_CPU2PCI1_MEM_3_BASE		0x02b0
+#define	MV64x60_CPU2PCI1_MEM_3_SIZE		0x02b8
+
+#define	MV64x60_CPU2PCI1_IO_REMAP		0x0108
+#define	MV64x60_CPU2PCI1_MEM_0_REMAP_LO		0x0110
+#define	MV64x60_CPU2PCI1_MEM_0_REMAP_HI		0x0340
+#define	MV64x60_CPU2PCI1_MEM_1_REMAP_LO		0x0118
+#define	MV64x60_CPU2PCI1_MEM_1_REMAP_HI		0x0348
+#define	MV64x60_CPU2PCI1_MEM_2_REMAP_LO		0x0310
+#define	MV64x60_CPU2PCI1_MEM_2_REMAP_HI		0x0350
+#define	MV64x60_CPU2PCI1_MEM_3_REMAP_LO		0x0318
+#define	MV64x60_CPU2PCI1_MEM_3_REMAP_HI		0x0358
+
+/* CPU Control Registers */
+#define MV64x60_CPU_CONFIG			0x0000
+#define MV64x60_CPU_MODE			0x0120
+#define MV64x60_CPU_MASTER_CNTL			0x0160
+#define MV64x60_CPU_XBAR_CNTL_LO		0x0150
+#define MV64x60_CPU_XBAR_CNTL_HI		0x0158
+#define MV64x60_CPU_XBAR_TO			0x0168
+
+#define GT64260_CPU_RR_XBAR_CNTL_LO		0x0170
+#define GT64260_CPU_RR_XBAR_CNTL_HI		0x0178
+
+#define MV64360_CPU_PADS_CALIBRATION		0x03b4
+#define MV64360_CPU_RESET_SAMPLE_LO		0x03c4
+#define MV64360_CPU_RESET_SAMPLE_HI		0x03d4
+
+/* SMP Register Map */
+#define MV64360_WHO_AM_I			0x0200
+#define MV64360_CPU0_DOORBELL			0x0214
+#define MV64360_CPU0_DOORBELL_CLR		0x021c
+#define MV64360_CPU0_DOORBELL_MASK		0x0234
+#define MV64360_CPU1_DOORBELL			0x0224
+#define MV64360_CPU1_DOORBELL_CLR		0x022c
+#define MV64360_CPU1_DOORBELL_MASK		0x023c
+#define MV64360_CPUx_DOORBELL(x)		(0x0214 + ((x)*0x10))
+#define MV64360_CPUx_DOORBELL_CLR(x)		(0x021c + ((x)*0x10))
+#define MV64360_CPUx_DOORBELL_MASK(x)		(0x0234 + ((x)*0x08))
+#define MV64360_SEMAPHORE_0			0x0244
+#define MV64360_SEMAPHORE_1			0x024c
+#define MV64360_SEMAPHORE_2			0x0254
+#define MV64360_SEMAPHORE_3			0x025c
+#define MV64360_SEMAPHORE_4			0x0264
+#define MV64360_SEMAPHORE_5			0x026c
+#define MV64360_SEMAPHORE_6			0x0274
+#define MV64360_SEMAPHORE_7			0x027c
+
+/* CPU Sync Barrier Registers */
+#define GT64260_CPU_SYNC_BARRIER_PCI0		0x00c0
+#define GT64260_CPU_SYNC_BARRIER_PCI1		0x00c8
+
+#define MV64360_CPU0_SYNC_BARRIER_TRIG		0x00c0
+#define MV64360_CPU0_SYNC_BARRIER_VIRT		0x00c8
+#define MV64360_CPU1_SYNC_BARRIER_TRIG		0x00d0
+#define MV64360_CPU1_SYNC_BARRIER_VIRT		0x00d8
+
+/* CPU Deadlock and Ordering registers (Rev B part only) */
+#define GT64260_CPU_DEADLOCK_ORDERING                   0x02d0
+#define GT64260_CPU_WB_PRIORITY_BUFFER_DEPTH            0x02d8
+#define GT64260_CPU_COUNTERS_SYNC_BARRIER_ATTRIBUTE     0x02e0
+
+/* CPU Access Protection Registers (gt64260 realy has 8 but don't need) */
+#define	MV64x260_CPU_PROT_WINDOWS		4
+
+#define	GT64260_CPU_PROT_ACCPROTECT		(1<<16)
+#define	GT64260_CPU_PROT_WRPROTECT		(1<<17)
+#define	GT64260_CPU_PROT_CACHEPROTECT		(1<<18)
+
+#define	MV64360_CPU_PROT_ACCPROTECT		(1<<20)
+#define	MV64360_CPU_PROT_WRPROTECT		(1<<21)
+#define	MV64360_CPU_PROT_CACHEPROTECT		(1<<22)
+#define	MV64360_CPU_PROT_WIN_ENABLE		(1<<31)
+
+#define MV64x60_CPU_PROT_BASE_0			0x0180
+#define MV64x60_CPU_PROT_SIZE_0			0x0188
+#define MV64x60_CPU_PROT_BASE_1			0x0190
+#define MV64x60_CPU_PROT_SIZE_1			0x0198
+#define MV64x60_CPU_PROT_BASE_2			0x01a0
+#define MV64x60_CPU_PROT_SIZE_2			0x01a8
+#define MV64x60_CPU_PROT_BASE_3			0x01b0
+#define MV64x60_CPU_PROT_SIZE_3			0x01b8
+
+#define GT64260_CPU_PROT_BASE_4			0x01c0
+#define GT64260_CPU_PROT_SIZE_4			0x01c8
+#define GT64260_CPU_PROT_BASE_5			0x01d0
+#define GT64260_CPU_PROT_SIZE_5			0x01d8
+#define GT64260_CPU_PROT_BASE_6			0x01e0
+#define GT64260_CPU_PROT_SIZE_6			0x01e8
+#define GT64260_CPU_PROT_BASE_7			0x01f0
+#define GT64260_CPU_PROT_SIZE_7			0x01f8
+
+/* CPU Snoop Control Registers (64260 only) */
+#define	GT64260_CPU_SNOOP_WINDOWS		4
+
+#define	GT64260_CPU_SNOOP_NONE			0x00000000
+#define	GT64260_CPU_SNOOP_WT			0x00010000
+#define	GT64260_CPU_SNOOP_WB			0x00020000
+#define	GT64260_CPU_SNOOP_MASK			0x00030000
+#define	GT64260_CPU_SNOOP_ALL_BITS		GT64260_CPU_SNOOP_MASK
+
+#define GT64260_CPU_SNOOP_BASE_0		0x0380
+#define GT64260_CPU_SNOOP_SIZE_0		0x0388
+#define GT64260_CPU_SNOOP_BASE_1		0x0390
+#define GT64260_CPU_SNOOP_SIZE_1		0x0398
+#define GT64260_CPU_SNOOP_BASE_2		0x03a0
+#define GT64260_CPU_SNOOP_SIZE_2		0x03a8
+#define GT64260_CPU_SNOOP_BASE_3		0x03b0
+#define GT64260_CPU_SNOOP_SIZE_3		0x03b8
+
+/* CPU Snoop Control Registers (64360 only) */
+#define	MV64360_CPU_SNOOP_WINDOWS		4
+#define	MV64360_CPU_SNOOP_NONE			0x00000000
+#define	MV64360_CPU_SNOOP_WT			0x00010000
+#define	MV64360_CPU_SNOOP_WB			0x00020000
+#define	MV64360_CPU_SNOOP_MASK			0x00030000
+#define	MV64360_CPU_SNOOP_ALL_BITS		MV64360_CPU_SNOOP_MASK
+
+
+/* CPU Error Report Registers */
+#define MV64x60_CPU_ERR_ADDR_LO			0x0070
+#define MV64x60_CPU_ERR_ADDR_HI			0x0078
+#define MV64x60_CPU_ERR_DATA_LO			0x0128
+#define MV64x60_CPU_ERR_DATA_HI			0x0130
+#define MV64x60_CPU_ERR_PARITY			0x0138
+#define MV64x60_CPU_ERR_CAUSE			0x0140
+#define MV64x60_CPU_ERR_MASK			0x0148
+
+/*
+ *****************************************************************************
+ *
+ *	SRAM Cotnroller Registers
+ *
+ *****************************************************************************
+ */
+
+#define	MV64360_SRAM_CONFIG			0x0380
+#define	MV64360_SRAM_TEST_MODE			0x03f4
+#define	MV64360_SRAM_ERR_CAUSE			0x0388
+#define	MV64360_SRAM_ERR_ADDR_LO		0x0390
+#define	MV64360_SRAM_ERR_ADDR_HI		0x03f8
+#define	MV64360_SRAM_ERR_DATA_LO		0x0398
+#define	MV64360_SRAM_ERR_DATA_HI		0x03a0
+#define	MV64360_SRAM_ERR_PARITY			0x03a8
+
+#define	MV64360_SRAM_SIZE			0x00040000 /* 256 KB of SRAM */
+
+/*
+ *****************************************************************************
+ *
+ *	SDRAM/MEM Cotnroller Registers
+ *
+ *****************************************************************************
+ */
+
+/* SDRAM Config Registers (64260) */
+#define	GT64260_SDRAM_CONFIG			0x0448
+
+/* SDRAM Error Report Registers (64260) */
+#define	GT64260_SDRAM_ERR_DATA_LO		0x0484
+#define	GT64260_SDRAM_ERR_DATA_HI		0x0480
+#define	GT64260_SDRAM_ERR_ADDR			0x0490
+#define	GT64260_SDRAM_ERR_ECC_RCVD		0x0488
+#define	GT64260_SDRAM_ERR_ECC_CALC		0x048c
+#define	GT64260_SDRAM_ERR_ECC_CNTL		0x0494
+#define	GT64260_SDRAM_ERR_ECC_ERR_CNT		0x0498
+
+/* SDRAM Config Registers (64360) */
+#define	MV64360_SDRAM_CONFIG			0x1400
+
+/* SDRAM Control Registers */
+#define MV64360_D_UNIT_CONTROL_LOW		0x1404
+#define MV64360_D_UNIT_CONTROL_HIGH		0x1424
+
+/* SDRAM Error Report Registers (64360) */
+#define	MV64360_SDRAM_ERR_DATA_LO		0x1444
+#define	MV64360_SDRAM_ERR_DATA_HI		0x1440
+#define	MV64360_SDRAM_ERR_ADDR			0x1450
+#define	MV64360_SDRAM_ERR_ECC_RCVD		0x1448
+#define	MV64360_SDRAM_ERR_ECC_CALC		0x144c
+#define	MV64360_SDRAM_ERR_ECC_CNTL		0x1454
+#define	MV64360_SDRAM_ERR_ECC_ERR_CNT		0x1458
+
+/*
+ *****************************************************************************
+ *
+ *	Device/BOOT Cotnroller Registers
+ *
+ *****************************************************************************
+ */
+
+/* Device Control Registers */
+#define	MV64x60_DEV_BANK_PARAMS_0		0x045c
+#define	MV64x60_DEV_BANK_PARAMS_1		0x0460
+#define	MV64x60_DEV_BANK_PARAMS_2		0x0464
+#define	MV64x60_DEV_BANK_PARAMS_3		0x0468
+#define	MV64x60_DEV_BOOT_PARAMS			0x046c
+#define	MV64x60_DEV_IF_CNTL			0x04c0
+#define	MV64x60_DEV_IF_XBAR_CNTL_LO		0x04c8
+#define	MV64x60_DEV_IF_XBAR_CNTL_HI		0x04cc
+#define	MV64x60_DEV_IF_XBAR_CNTL_TO		0x04c4
+
+/* Device Interrupt Registers */
+#define	MV64x60_DEV_INTR_CAUSE			0x04d0
+#define	MV64x60_DEV_INTR_MASK			0x04d4
+#define	MV64x60_DEV_INTR_ERR_ADDR		0x04d8
+
+#define	MV64360_DEV_INTR_ERR_DATA		0x04dc
+#define	MV64360_DEV_INTR_ERR_PAR		0x04e0
+
+/*
+ *****************************************************************************
+ *
+ *	PCI Bridge Interface Registers
+ *
+ *****************************************************************************
+ */
+
+/* PCI Configuration Access Registers */
+#define	MV64x60_PCI0_CONFIG_ADDR		0x0cf8
+#define	MV64x60_PCI0_CONFIG_DATA		0x0cfc
+#define	MV64x60_PCI0_IACK			0x0c34
+
+#define	MV64x60_PCI1_CONFIG_ADDR		0x0c78
+#define	MV64x60_PCI1_CONFIG_DATA		0x0c7c
+#define	MV64x60_PCI1_IACK			0x0cb4
+
+/* PCI Control Registers */
+#define	MV64x60_PCI0_CMD			0x0c00
+#define	MV64x60_PCI0_MODE			0x0d00
+#define	MV64x60_PCI0_TO_RETRY			0x0c04
+#define	MV64x60_PCI0_RD_BUF_DISCARD_TIMER	0x0d04
+#define	MV64x60_PCI0_MSI_TRIGGER_TIMER		0x0c38
+#define	MV64x60_PCI0_ARBITER_CNTL		0x1d00
+#define	MV64x60_PCI0_XBAR_CNTL_LO		0x1d08
+#define	MV64x60_PCI0_XBAR_CNTL_HI		0x1d0c
+#define	MV64x60_PCI0_XBAR_CNTL_TO		0x1d04
+#define	MV64x60_PCI0_RD_RESP_XBAR_CNTL_LO	0x1d18
+#define	MV64x60_PCI0_RD_RESP_XBAR_CNTL_HI	0x1d1c
+#define	MV64x60_PCI0_SYNC_BARRIER		0x1d10
+#define	MV64x60_PCI0_P2P_CONFIG			0x1d14
+#define	MV64x60_PCI0_INTR_MASK
+
+#define	GT64260_PCI0_P2P_SWAP_CNTL		0x1d54
+
+#define	MV64x60_PCI1_CMD			0x0c80
+#define	MV64x60_PCI1_MODE			0x0d80
+#define	MV64x60_PCI1_TO_RETRY			0x0c84
+#define	MV64x60_PCI1_RD_BUF_DISCARD_TIMER	0x0d84
+#define	MV64x60_PCI1_MSI_TRIGGER_TIMER		0x0cb8
+#define	MV64x60_PCI1_ARBITER_CNTL		0x1d80
+#define	MV64x60_PCI1_XBAR_CNTL_LO		0x1d88
+#define	MV64x60_PCI1_XBAR_CNTL_HI		0x1d8c
+#define	MV64x60_PCI1_XBAR_CNTL_TO		0x1d84
+#define	MV64x60_PCI1_RD_RESP_XBAR_CNTL_LO	0x1d98
+#define	MV64x60_PCI1_RD_RESP_XBAR_CNTL_HI	0x1d9c
+#define	MV64x60_PCI1_SYNC_BARRIER		0x1d90
+#define	MV64x60_PCI1_P2P_CONFIG			0x1d94
+
+#define	GT64260_PCI1_P2P_SWAP_CNTL		0x1dd4
+
+/* Different modes that the pci hoses can be in (bits 5:4 in PCI Mode reg) */
+#define	MV64x60_PCIMODE_CONVENTIONAL		0
+#define	MV64x60_PCIMODE_PCIX_66			(1 << 4)
+#define	MV64x60_PCIMODE_PCIX_100		(2 << 4)
+#define	MV64x60_PCIMODE_PCIX_133		(3 << 4)
+#define	MV64x60_PCIMODE_MASK			(0x3 << 4)
+
+/* PCI Access Control Regions Registers */
+#define	GT64260_PCI_ACC_CNTL_PREFETCHEN		(1<<12)
+#define	GT64260_PCI_ACC_CNTL_DREADEN		(1<<13)
+#define	GT64260_PCI_ACC_CNTL_RDPREFETCH		(1<<16)
+#define	GT64260_PCI_ACC_CNTL_RDLINEPREFETCH	(1<<17)
+#define	GT64260_PCI_ACC_CNTL_RDMULPREFETCH	(1<<18)
+#define	GT64260_PCI_ACC_CNTL_MBURST_32_BTYES	0x00000000
+#define	GT64260_PCI_ACC_CNTL_MBURST_64_BYTES	0x00100000
+#define	GT64260_PCI_ACC_CNTL_MBURST_128_BYTES	0x00200000
+#define	GT64260_PCI_ACC_CNTL_MBURST_MASK	0x00300000
+#define	GT64260_PCI_ACC_CNTL_SWAP_BYTE		0x00000000
+#define	GT64260_PCI_ACC_CNTL_SWAP_NONE		0x01000000
+#define	GT64260_PCI_ACC_CNTL_SWAP_BYTE_WORD	0x02000000
+#define	GT64260_PCI_ACC_CNTL_SWAP_WORD		0x03000000
+#define	GT64260_PCI_ACC_CNTL_SWAP_MASK		0x03000000
+#define	GT64260_PCI_ACC_CNTL_ACCPROT		(1<<28)
+#define	GT64260_PCI_ACC_CNTL_WRPROT		(1<<29)
+
+#define	GT64260_PCI_ACC_CNTL_ALL_BITS	(GT64260_PCI_ACC_CNTL_PREFETCHEN |    \
+					 GT64260_PCI_ACC_CNTL_DREADEN |       \
+					 GT64260_PCI_ACC_CNTL_RDPREFETCH |    \
+					 GT64260_PCI_ACC_CNTL_RDLINEPREFETCH |\
+					 GT64260_PCI_ACC_CNTL_RDMULPREFETCH | \
+					 GT64260_PCI_ACC_CNTL_MBURST_MASK |   \
+					 GT64260_PCI_ACC_CNTL_SWAP_MASK |     \
+					 GT64260_PCI_ACC_CNTL_ACCPROT|        \
+					 GT64260_PCI_ACC_CNTL_WRPROT)
+
+#define	MV64360_PCI_ACC_CNTL_ENABLE		(1<<0)
+#define	MV64360_PCI_ACC_CNTL_REQ64		(1<<1)
+#define	MV64360_PCI_ACC_CNTL_SNOOP_NONE		0x00000000
+#define	MV64360_PCI_ACC_CNTL_SNOOP_WT		0x00000004
+#define	MV64360_PCI_ACC_CNTL_SNOOP_WB		0x00000008
+#define	MV64360_PCI_ACC_CNTL_SNOOP_MASK		0x0000000c
+#define	MV64360_PCI_ACC_CNTL_ACCPROT		(1<<4)
+#define	MV64360_PCI_ACC_CNTL_WRPROT		(1<<5)
+#define	MV64360_PCI_ACC_CNTL_SWAP_BYTE		0x00000000
+#define	MV64360_PCI_ACC_CNTL_SWAP_NONE		0x00000040
+#define	MV64360_PCI_ACC_CNTL_SWAP_BYTE_WORD	0x00000080
+#define	MV64360_PCI_ACC_CNTL_SWAP_WORD		0x000000c0
+#define	MV64360_PCI_ACC_CNTL_SWAP_MASK		0x000000c0
+#define	MV64360_PCI_ACC_CNTL_MBURST_32_BYTES	0x00000000
+#define	MV64360_PCI_ACC_CNTL_MBURST_64_BYTES	0x00000100
+#define	MV64360_PCI_ACC_CNTL_MBURST_128_BYTES	0x00000200
+#define	MV64360_PCI_ACC_CNTL_MBURST_MASK	0x00000300
+#define	MV64360_PCI_ACC_CNTL_RDSIZE_32_BYTES	0x00000000
+#define	MV64360_PCI_ACC_CNTL_RDSIZE_64_BYTES	0x00000400
+#define	MV64360_PCI_ACC_CNTL_RDSIZE_128_BYTES	0x00000800
+#define	MV64360_PCI_ACC_CNTL_RDSIZE_256_BYTES	0x00000c00
+#define	MV64360_PCI_ACC_CNTL_RDSIZE_MASK	0x00000c00
+
+#define	MV64360_PCI_ACC_CNTL_ALL_BITS	(MV64360_PCI_ACC_CNTL_ENABLE |	    \
+					 MV64360_PCI_ACC_CNTL_REQ64 |	    \
+					 MV64360_PCI_ACC_CNTL_SNOOP_MASK |  \
+					 MV64360_PCI_ACC_CNTL_ACCPROT |	    \
+					 MV64360_PCI_ACC_CNTL_WRPROT |	    \
+					 MV64360_PCI_ACC_CNTL_SWAP_MASK |   \
+					 MV64360_PCI_ACC_CNTL_MBURST_MASK | \
+					 MV64360_PCI_ACC_CNTL_RDSIZE_MASK)
+
+#define	MV64x60_PCI0_ACC_CNTL_0_BASE_LO		0x1e00
+#define	MV64x60_PCI0_ACC_CNTL_0_BASE_HI		0x1e04
+#define	MV64x60_PCI0_ACC_CNTL_0_SIZE		0x1e08
+#define	MV64x60_PCI0_ACC_CNTL_1_BASE_LO		0x1e10
+#define	MV64x60_PCI0_ACC_CNTL_1_BASE_HI		0x1e14
+#define	MV64x60_PCI0_ACC_CNTL_1_SIZE		0x1e18
+#define	MV64x60_PCI0_ACC_CNTL_2_BASE_LO		0x1e20
+#define	MV64x60_PCI0_ACC_CNTL_2_BASE_HI		0x1e24
+#define	MV64x60_PCI0_ACC_CNTL_2_SIZE		0x1e28
+#define	MV64x60_PCI0_ACC_CNTL_3_BASE_LO		0x1e30
+#define	MV64x60_PCI0_ACC_CNTL_3_BASE_HI		0x1e34
+#define	MV64x60_PCI0_ACC_CNTL_3_SIZE		0x1e38
+#define	MV64x60_PCI0_ACC_CNTL_4_BASE_LO		0x1e40
+#define	MV64x60_PCI0_ACC_CNTL_4_BASE_HI		0x1e44
+#define	MV64x60_PCI0_ACC_CNTL_4_SIZE		0x1e48
+#define	MV64x60_PCI0_ACC_CNTL_5_BASE_LO		0x1e50
+#define	MV64x60_PCI0_ACC_CNTL_5_BASE_HI		0x1e54
+#define	MV64x60_PCI0_ACC_CNTL_5_SIZE		0x1e58
+
+#define	GT64260_PCI0_ACC_CNTL_6_BASE_LO		0x1e60
+#define	GT64260_PCI0_ACC_CNTL_6_BASE_HI		0x1e64
+#define	GT64260_PCI0_ACC_CNTL_6_SIZE		0x1e68
+#define	GT64260_PCI0_ACC_CNTL_7_BASE_LO		0x1e70
+#define	GT64260_PCI0_ACC_CNTL_7_BASE_HI		0x1e74
+#define	GT64260_PCI0_ACC_CNTL_7_SIZE		0x1e78
+
+#define	MV64x60_PCI1_ACC_CNTL_0_BASE_LO		0x1e80
+#define	MV64x60_PCI1_ACC_CNTL_0_BASE_HI		0x1e84
+#define	MV64x60_PCI1_ACC_CNTL_0_SIZE		0x1e88
+#define	MV64x60_PCI1_ACC_CNTL_1_BASE_LO		0x1e90
+#define	MV64x60_PCI1_ACC_CNTL_1_BASE_HI		0x1e94
+#define	MV64x60_PCI1_ACC_CNTL_1_SIZE		0x1e98
+#define	MV64x60_PCI1_ACC_CNTL_2_BASE_LO		0x1ea0
+#define	MV64x60_PCI1_ACC_CNTL_2_BASE_HI		0x1ea4
+#define	MV64x60_PCI1_ACC_CNTL_2_SIZE		0x1ea8
+#define	MV64x60_PCI1_ACC_CNTL_3_BASE_LO		0x1eb0
+#define	MV64x60_PCI1_ACC_CNTL_3_BASE_HI		0x1eb4
+#define	MV64x60_PCI1_ACC_CNTL_3_SIZE		0x1eb8
+#define	MV64x60_PCI1_ACC_CNTL_4_BASE_LO		0x1ec0
+#define	MV64x60_PCI1_ACC_CNTL_4_BASE_HI		0x1ec4
+#define	MV64x60_PCI1_ACC_CNTL_4_SIZE		0x1ec8
+#define	MV64x60_PCI1_ACC_CNTL_5_BASE_LO		0x1ed0
+#define	MV64x60_PCI1_ACC_CNTL_5_BASE_HI		0x1ed4
+#define	MV64x60_PCI1_ACC_CNTL_5_SIZE		0x1ed8
+
+#define	GT64260_PCI1_ACC_CNTL_6_BASE_LO		0x1ee0
+#define	GT64260_PCI1_ACC_CNTL_6_BASE_HI		0x1ee4
+#define	GT64260_PCI1_ACC_CNTL_6_SIZE		0x1ee8
+#define	GT64260_PCI1_ACC_CNTL_7_BASE_LO		0x1ef0
+#define	GT64260_PCI1_ACC_CNTL_7_BASE_HI		0x1ef4
+#define	GT64260_PCI1_ACC_CNTL_7_SIZE		0x1ef8
+
+/* PCI Snoop Control Registers (64260 only) */
+#define	GT64260_PCI_SNOOP_NONE			0x00000000
+#define	GT64260_PCI_SNOOP_WT			0x00001000
+#define	GT64260_PCI_SNOOP_WB			0x00002000
+
+#define	GT64260_PCI0_SNOOP_0_BASE_LO		0x1f00
+#define	GT64260_PCI0_SNOOP_0_BASE_HI		0x1f04
+#define	GT64260_PCI0_SNOOP_0_SIZE		0x1f08
+#define	GT64260_PCI0_SNOOP_1_BASE_LO		0x1f10
+#define	GT64260_PCI0_SNOOP_1_BASE_HI		0x1f14
+#define	GT64260_PCI0_SNOOP_1_SIZE		0x1f18
+#define	GT64260_PCI0_SNOOP_2_BASE_LO		0x1f20
+#define	GT64260_PCI0_SNOOP_2_BASE_HI		0x1f24
+#define	GT64260_PCI0_SNOOP_2_SIZE		0x1f28
+#define	GT64260_PCI0_SNOOP_3_BASE_LO		0x1f30
+#define	GT64260_PCI0_SNOOP_3_BASE_HI		0x1f34
+#define	GT64260_PCI0_SNOOP_3_SIZE		0x1f38
+
+#define	GT64260_PCI1_SNOOP_0_BASE_LO		0x1f80
+#define	GT64260_PCI1_SNOOP_0_BASE_HI		0x1f84
+#define	GT64260_PCI1_SNOOP_0_SIZE		0x1f88
+#define	GT64260_PCI1_SNOOP_1_BASE_LO		0x1f90
+#define	GT64260_PCI1_SNOOP_1_BASE_HI		0x1f94
+#define	GT64260_PCI1_SNOOP_1_SIZE		0x1f98
+#define	GT64260_PCI1_SNOOP_2_BASE_LO		0x1fa0
+#define	GT64260_PCI1_SNOOP_2_BASE_HI		0x1fa4
+#define	GT64260_PCI1_SNOOP_2_SIZE		0x1fa8
+#define	GT64260_PCI1_SNOOP_3_BASE_LO		0x1fb0
+#define	GT64260_PCI1_SNOOP_3_BASE_HI		0x1fb4
+#define	GT64260_PCI1_SNOOP_3_SIZE		0x1fb8
+
+/* PCI Error Report Registers */
+#define MV64x60_PCI0_ERR_SERR_MASK		0x0c28
+#define MV64x60_PCI0_ERR_ADDR_LO		0x1d40
+#define MV64x60_PCI0_ERR_ADDR_HI		0x1d44
+#define MV64x60_PCI0_ERR_DATA_LO		0x1d48
+#define MV64x60_PCI0_ERR_DATA_HI		0x1d4c
+#define MV64x60_PCI0_ERR_CMD			0x1d50
+#define MV64x60_PCI0_ERR_CAUSE			0x1d58
+#define MV64x60_PCI0_ERR_MASK			0x1d5c
+
+#define MV64x60_PCI1_ERR_SERR_MASK		0x0ca8
+#define MV64x60_PCI1_ERR_ADDR_LO		0x1dc0
+#define MV64x60_PCI1_ERR_ADDR_HI		0x1dc4
+#define MV64x60_PCI1_ERR_DATA_LO		0x1dc8
+#define MV64x60_PCI1_ERR_DATA_HI		0x1dcc
+#define MV64x60_PCI1_ERR_CMD			0x1dd0
+#define MV64x60_PCI1_ERR_CAUSE			0x1dd8
+#define MV64x60_PCI1_ERR_MASK			0x1ddc
+
+/* PCI Slave Address Decoding Registers */
+#define	MV64x60_PCI0_MEM_0_SIZE			0x0c08
+#define	MV64x60_PCI0_MEM_1_SIZE			0x0d08
+#define	MV64x60_PCI0_MEM_2_SIZE			0x0c0c
+#define	MV64x60_PCI0_MEM_3_SIZE			0x0d0c
+#define	MV64x60_PCI1_MEM_0_SIZE			0x0c88
+#define	MV64x60_PCI1_MEM_1_SIZE			0x0d88
+#define	MV64x60_PCI1_MEM_2_SIZE			0x0c8c
+#define	MV64x60_PCI1_MEM_3_SIZE			0x0d8c
+
+#define	MV64x60_PCI0_BAR_ENABLE			0x0c3c
+#define	MV64x60_PCI1_BAR_ENABLE			0x0cbc
+
+#define	MV64x60_PCI0_PCI_DECODE_CNTL		0x0d3c
+#define	MV64x60_PCI1_PCI_DECODE_CNTL		0x0dbc
+
+#define	MV64x60_PCI0_SLAVE_MEM_0_REMAP		0x0c48
+#define	MV64x60_PCI0_SLAVE_MEM_1_REMAP		0x0d48
+#define	MV64x60_PCI0_SLAVE_MEM_2_REMAP		0x0c4c
+#define	MV64x60_PCI0_SLAVE_MEM_3_REMAP		0x0d4c
+#define	MV64x60_PCI0_SLAVE_DEV_0_REMAP		0x0c50
+#define	MV64x60_PCI0_SLAVE_DEV_1_REMAP		0x0d50
+#define	MV64x60_PCI0_SLAVE_DEV_2_REMAP		0x0d58
+#define	MV64x60_PCI0_SLAVE_DEV_3_REMAP		0x0c54
+#define	MV64x60_PCI0_SLAVE_BOOT_REMAP		0x0d54
+#define	MV64x60_PCI0_SLAVE_P2P_MEM_0_REMAP_LO	0x0d5c
+#define	MV64x60_PCI0_SLAVE_P2P_MEM_0_REMAP_HI	0x0d60
+#define	MV64x60_PCI0_SLAVE_P2P_MEM_1_REMAP_LO	0x0d64
+#define	MV64x60_PCI0_SLAVE_P2P_MEM_1_REMAP_HI	0x0d68
+#define	MV64x60_PCI0_SLAVE_P2P_IO_REMAP		0x0d6c
+#define	MV64x60_PCI0_SLAVE_CPU_REMAP		0x0d70
+
+#define	MV64x60_PCI1_SLAVE_MEM_0_REMAP		0x0cc8
+#define	MV64x60_PCI1_SLAVE_MEM_1_REMAP		0x0dc8
+#define	MV64x60_PCI1_SLAVE_MEM_2_REMAP		0x0ccc
+#define	MV64x60_PCI1_SLAVE_MEM_3_REMAP		0x0dcc
+#define	MV64x60_PCI1_SLAVE_DEV_0_REMAP		0x0cd0
+#define	MV64x60_PCI1_SLAVE_DEV_1_REMAP		0x0dd0
+#define	MV64x60_PCI1_SLAVE_DEV_2_REMAP		0x0dd8
+#define	MV64x60_PCI1_SLAVE_DEV_3_REMAP		0x0cd4
+#define	MV64x60_PCI1_SLAVE_BOOT_REMAP		0x0dd4
+#define	MV64x60_PCI1_SLAVE_P2P_MEM_0_REMAP_LO	0x0ddc
+#define	MV64x60_PCI1_SLAVE_P2P_MEM_0_REMAP_HI	0x0de0
+#define	MV64x60_PCI1_SLAVE_P2P_MEM_1_REMAP_LO	0x0de4
+#define	MV64x60_PCI1_SLAVE_P2P_MEM_1_REMAP_HI	0x0de8
+#define	MV64x60_PCI1_SLAVE_P2P_IO_REMAP		0x0dec
+#define	MV64x60_PCI1_SLAVE_CPU_REMAP		0x0df0
+
+/*
+ *****************************************************************************
+ *
+ *	ENET Controller Interface Registers
+ *
+ *****************************************************************************
+ */
+
+/* ENET Controller Window Registers (6 windows) */
+#define	MV64360_ENET2MEM_WINDOWS		6
+
+#define	MV64360_ENET2MEM_0_BASE			0x2200
+#define	MV64360_ENET2MEM_0_SIZE			0x2204
+#define	MV64360_ENET2MEM_1_BASE			0x2208
+#define	MV64360_ENET2MEM_1_SIZE			0x220c
+#define	MV64360_ENET2MEM_2_BASE			0x2210
+#define	MV64360_ENET2MEM_2_SIZE			0x2214
+#define	MV64360_ENET2MEM_3_BASE			0x2218
+#define	MV64360_ENET2MEM_3_SIZE			0x221c
+#define	MV64360_ENET2MEM_4_BASE			0x2220
+#define	MV64360_ENET2MEM_4_SIZE			0x2224
+#define	MV64360_ENET2MEM_5_BASE			0x2228
+#define	MV64360_ENET2MEM_5_SIZE			0x222c
+
+#define	MV64360_ENET2MEM_SNOOP_NONE		0x00000000
+#define	MV64360_ENET2MEM_SNOOP_WT		0x00001000
+#define	MV64360_ENET2MEM_SNOOP_WB		0x00002000
+
+#define	MV64360_ENET2MEM_BAR_ENABLE		0x2290
+
+#define	MV64360_ENET2MEM_ACC_PROT_0		0x2294
+#define	MV64360_ENET2MEM_ACC_PROT_1		0x2298
+#define	MV64360_ENET2MEM_ACC_PROT_2		0x229c
+
+/*
+ *****************************************************************************
+ *
+ *	MPSC Controller Interface Registers
+ *
+ *****************************************************************************
+ */
+
+/* MPSC Controller Window Registers (4 windows) */
+#define	MV64360_MPSC2MEM_WINDOWS		4
+
+#define	MV64360_MPSC2MEM_0_BASE			0xf200
+#define	MV64360_MPSC2MEM_0_SIZE			0xf204
+#define	MV64360_MPSC2MEM_1_BASE			0xf208
+#define	MV64360_MPSC2MEM_1_SIZE			0xf20c
+#define	MV64360_MPSC2MEM_2_BASE			0xf210
+#define	MV64360_MPSC2MEM_2_SIZE			0xf214
+#define	MV64360_MPSC2MEM_3_BASE			0xf218
+#define	MV64360_MPSC2MEM_3_SIZE			0xf21c
+
+#define MV64360_MPSC_0_REMAP			0xf240
+#define MV64360_MPSC_1_REMAP			0xf244
+
+#define	MV64360_MPSC2MEM_SNOOP_NONE		0x00000000
+#define	MV64360_MPSC2MEM_SNOOP_WT		0x00001000
+#define	MV64360_MPSC2MEM_SNOOP_WB		0x00002000
+
+#define	MV64360_MPSC2MEM_BAR_ENABLE		0xf250
+
+#define	MV64360_MPSC2MEM_ACC_PROT_0		0xf254
+#define	MV64360_MPSC2MEM_ACC_PROT_1		0xf258
+
+#define	MV64360_MPSC2REGS_BASE			0xf25c
+
+/*
+ *****************************************************************************
+ *
+ *	Timer/Counter Interface Registers
+ *
+ *****************************************************************************
+ */
+
+#define	MV64x60_TIMR_CNTR_0			0x0850
+#define	MV64x60_TIMR_CNTR_1			0x0854
+#define	MV64x60_TIMR_CNTR_2			0x0858
+#define	MV64x60_TIMR_CNTR_3			0x085c
+#define	MV64x60_TIMR_CNTR_0_3_CNTL		0x0864
+#define	MV64x60_TIMR_CNTR_0_3_INTR_CAUSE	0x0868
+#define	MV64x60_TIMR_CNTR_0_3_INTR_MASK		0x086c
+
+#define	GT64260_TIMR_CNTR_4			0x0950
+#define	GT64260_TIMR_CNTR_5			0x0954
+#define	GT64260_TIMR_CNTR_6			0x0958
+#define	GT64260_TIMR_CNTR_7			0x095c
+#define	GT64260_TIMR_CNTR_4_7_CNTL		0x0964
+#define	GT64260_TIMR_CNTR_4_7_INTR_CAUSE	0x0968
+#define	GT64260_TIMR_CNTR_4_7_INTR_MASK		0x096c
+
+/*
+ *****************************************************************************
+ *
+ *	Communications Controller
+ *
+ *****************************************************************************
+ */
+
+#define	GT64260_SER_INIT_PCI_ADDR_HI		0xf320
+#define	GT64260_SER_INIT_LAST_DATA		0xf324
+#define	GT64260_SER_INIT_CONTROL		0xf328
+#define	GT64260_SER_INIT_STATUS			0xf32c
+
+#define	MV64x60_COMM_ARBITER_CNTL		0xf300
+#define	MV64x60_COMM_CONFIG			0xb40c
+#define	MV64x60_COMM_XBAR_TO			0xf304
+#define	MV64x60_COMM_INTR_CAUSE			0xf310
+#define	MV64x60_COMM_INTR_MASK			0xf314
+#define	MV64x60_COMM_ERR_ADDR			0xf318
+
+#define MV64360_COMM_ARBITER_CNTL		0xf300
+
+/*
+ *****************************************************************************
+ *
+ *	IDMA Controller Interface Registers
+ *
+ *****************************************************************************
+ */
+
+/* IDMA Controller Window Registers (8 windows) */
+#define	MV64360_IDMA2MEM_WINDOWS		8
+
+#define	MV64360_IDMA2MEM_0_BASE			0x0a00
+#define	MV64360_IDMA2MEM_0_SIZE			0x0a04
+#define	MV64360_IDMA2MEM_1_BASE			0x0a08
+#define	MV64360_IDMA2MEM_1_SIZE			0x0a0c
+#define	MV64360_IDMA2MEM_2_BASE			0x0a10
+#define	MV64360_IDMA2MEM_2_SIZE			0x0a14
+#define	MV64360_IDMA2MEM_3_BASE			0x0a18
+#define	MV64360_IDMA2MEM_3_SIZE			0x0a1c
+#define	MV64360_IDMA2MEM_4_BASE			0x0a20
+#define	MV64360_IDMA2MEM_4_SIZE			0x0a24
+#define	MV64360_IDMA2MEM_5_BASE			0x0a28
+#define	MV64360_IDMA2MEM_5_SIZE			0x0a2c
+#define	MV64360_IDMA2MEM_6_BASE			0x0a30
+#define	MV64360_IDMA2MEM_6_SIZE			0x0a34
+#define	MV64360_IDMA2MEM_7_BASE			0x0a38
+#define	MV64360_IDMA2MEM_7_SIZE			0x0a3c
+
+#define	MV64360_IDMA2MEM_SNOOP_NONE		0x00000000
+#define	MV64360_IDMA2MEM_SNOOP_WT		0x00001000
+#define	MV64360_IDMA2MEM_SNOOP_WB		0x00002000
+
+#define	MV64360_IDMA2MEM_BAR_ENABLE		0x0a80
+
+#define	MV64360_IDMA2MEM_ACC_PROT_0		0x0a70
+#define	MV64360_IDMA2MEM_ACC_PROT_1		0x0a74
+#define	MV64360_IDMA2MEM_ACC_PROT_2		0x0a78
+#define	MV64360_IDMA2MEM_ACC_PROT_3		0x0a7c
+
+#define	MV64x60_IDMA_0_OFFSET			0x0800
+#define	MV64x60_IDMA_1_OFFSET			0x0804
+#define	MV64x60_IDMA_2_OFFSET			0x0808
+#define	MV64x60_IDMA_3_OFFSET			0x080c
+#define	MV64x60_IDMA_4_OFFSET			0x0900
+#define	MV64x60_IDMA_5_OFFSET			0x0904
+#define	MV64x60_IDMA_6_OFFSET			0x0908
+#define	MV64x60_IDMA_7_OFFSET			0x090c
+
+#define	MV64x60_IDMA_BYTE_COUNT			(0x0800 - MV64x60_IDMA_0_OFFSET)
+#define	MV64x60_IDMA_SRC_ADDR			(0x0810 - MV64x60_IDMA_0_OFFSET)
+#define	MV64x60_IDMA_DST_ADDR			(0x0820 - MV64x60_IDMA_0_OFFSET)
+#define	MV64x60_IDMA_NEXT_DESC			(0x0830 - MV64x60_IDMA_0_OFFSET)
+#define	MV64x60_IDMA_CUR_DESC			(0x0870 - MV64x60_IDMA_0_OFFSET)
+#define	MV64x60_IDMA_SRC_PCI_ADDR_HI		(0x0890 - MV64x60_IDMA_0_OFFSET)
+#define	MV64x60_IDMA_DST_PCI_ADDR_HI		(0x08a0 - MV64x60_IDMA_0_OFFSET)
+#define	MV64x60_IDMA_NEXT_DESC_PCI_ADDR_HI	(0x08b0 - MV64x60_IDMA_0_OFFSET)
+#define	MV64x60_IDMA_CONTROL_LO			(0x0840 - MV64x60_IDMA_0_OFFSET)
+#define	MV64x60_IDMA_CONTROL_HI			(0x0880 - MV64x60_IDMA_0_OFFSET)
+
+#define	MV64x60_IDMA_0_3_ARBITER_CNTL		0x0860
+#define	MV64x60_IDMA_4_7_ARBITER_CNTL		0x0960
+
+#define	MV64x60_IDMA_0_3_XBAR_TO		0x08d0
+#define	MV64x60_IDMA_4_7_XBAR_TO		0x09d0
+
+#define	MV64x60_IDMA_0_3_INTR_CAUSE		0x08c0
+#define	MV64x60_IDMA_0_3_INTR_MASK		0x08c4
+#define	MV64x60_IDMA_0_3_ERROR_ADDR		0x08c8
+#define	MV64x60_IDMA_0_3_ERROR_SELECT		0x08cc
+#define	MV64x60_IDMA_4_7_INTR_CAUSE		0x09c0
+#define	MV64x60_IDMA_4_7_INTR_MASK		0x09c4
+#define	MV64x60_IDMA_4_7_ERROR_ADDR		0x09c8
+#define	MV64x60_IDMA_4_7_ERROR_SELECT		0x09cc
+
+/*
+ *****************************************************************************
+ *
+ *	Watchdog Timer Interface Registers
+ *
+ *****************************************************************************
+ */
+
+#define	MV64x60_WDT_WDC				0xb410
+#define	MV64x60_WDT_WDV				0xb414
+
+
+/*
+ *****************************************************************************
+ *
+ *	 General Purpose Pins Controller Interface Registers
+ *
+ *****************************************************************************
+ */
+
+#define	MV64x60_GPP_IO_CNTL			0xf100
+#define	MV64x60_GPP_LEVEL_CNTL			0xf110
+#define	MV64x60_GPP_VALUE			0xf104
+#define	MV64x60_GPP_INTR_CAUSE			0xf108
+#define	MV64x60_GPP_INTR_MASK			0xf10c
+#define	MV64x60_GPP_VALUE_SET			0xf118
+#define	MV64x60_GPP_VALUE_CLR			0xf11c
+
+
+/*
+ *****************************************************************************
+ *
+ *	Multi-Purpose Pins Controller Interface Registers
+ *
+ *****************************************************************************
+ */
+
+#define	MV64x60_MPP_CNTL_0			0xf000
+#define	MV64x60_MPP_CNTL_1			0xf004
+#define	MV64x60_MPP_CNTL_2			0xf008
+#define	MV64x60_MPP_CNTL_3			0xf00c
+#define	GT64260_MPP_SERIAL_PORTS_MULTIPLEX	0xf010
+
+#define MV64x60_ETH_BAR_GAP			0x8
+#define MV64x60_ETH_SIZE_REG_GAP		0x8
+#define MV64x60_ETH_HIGH_ADDR_REMAP_REG_GAP	0x4
+#define MV64x60_ETH_PORT_ACCESS_CTRL_GAP	0x4
+
+#define MV64x60_EBAR_ATTR_DRAM_CS0		0x00000E00
+#define MV64x60_EBAR_ATTR_DRAM_CS1		0x00000D00
+#define MV64x60_EBAR_ATTR_DRAM_CS2		0x00000B00
+#define MV64x60_EBAR_ATTR_DRAM_CS3		0x00000700
+
+#define MV64x60_EBAR_ATTR_CBS_SRAM_BLOCK0	0x00000000
+#define MV64x60_EBAR_ATTR_CBS_SRAM_BLOCK1	0x00000100
+#define MV64x60_EBAR_ATTR_CBS_SRAM		0x00000000
+#define MV64x60_EBAR_ATTR_CBS_CPU_BUS		0x00000800
+
+
+/*
+ *****************************************************************************
+ *
+ *	Interrupt Controller Interface Registers
+ *
+ *****************************************************************************
+ */
+
+#define	GT64260_IC_OFFSET			0x0c18
+
+#define	GT64260_IC_MAIN_CAUSE_LO		0x0c18
+#define	GT64260_IC_MAIN_CAUSE_HI		0x0c68
+#define	GT64260_IC_CPU_INTR_MASK_LO		0x0c1c
+#define	GT64260_IC_CPU_INTR_MASK_HI		0x0c6c
+#define	GT64260_IC_CPU_SELECT_CAUSE		0x0c70
+#define	GT64260_IC_PCI0_INTR_MASK_LO		0x0c24
+#define	GT64260_IC_PCI0_INTR_MASK_HI		0x0c64
+#define	GT64260_IC_PCI0_SELECT_CAUSE		0x0c74
+#define	GT64260_IC_PCI1_INTR_MASK_LO		0x0ca4
+#define	GT64260_IC_PCI1_INTR_MASK_HI		0x0ce4
+#define	GT64260_IC_PCI1_SELECT_CAUSE		0x0cf4
+#define	GT64260_IC_CPU_INT_0_MASK		0x0e60
+#define	GT64260_IC_CPU_INT_1_MASK		0x0e64
+#define	GT64260_IC_CPU_INT_2_MASK		0x0e68
+#define	GT64260_IC_CPU_INT_3_MASK		0x0e6c
+
+#define	MV64360_IC_OFFSET			0x0000
+
+#define	MV64360_IC_MAIN_CAUSE_LO		0x0004
+#define	MV64360_IC_MAIN_CAUSE_HI		0x000c
+#define	MV64360_IC_CPU0_INTR_MASK_LO		0x0014
+#define	MV64360_IC_CPU0_INTR_MASK_HI		0x001c
+#define	MV64360_IC_CPU0_SELECT_CAUSE		0x0024
+#define	MV64360_IC_CPU1_INTR_MASK_LO		0x0034
+#define	MV64360_IC_CPU1_INTR_MASK_HI		0x003c
+#define	MV64360_IC_CPU1_SELECT_CAUSE		0x0044
+#define	MV64360_IC_INT0_MASK_LO			0x0054
+#define	MV64360_IC_INT0_MASK_HI			0x005c
+#define	MV64360_IC_INT0_SELECT_CAUSE		0x0064
+#define	MV64360_IC_INT1_MASK_LO			0x0074
+#define	MV64360_IC_INT1_MASK_HI			0x007c
+#define	MV64360_IC_INT1_SELECT_CAUSE		0x0084
+
+#endif /* __ASMPPC_MV64x60_DEFS_H */
diff -Nru a/include/asm-ppc/open_pic.h b/include/asm-ppc/open_pic.h
--- a/include/asm-ppc/open_pic.h	2005-01-10 20:11:18 -08:00
+++ b/include/asm-ppc/open_pic.h	2005-01-10 20:11:18 -08:00
@@ -35,11 +35,11 @@
 
 extern u_int OpenPIC_NumInitSenses;
 extern u_char *OpenPIC_InitSenses;
-extern void* OpenPIC_Addr;
+extern void __iomem * OpenPIC_Addr;
 extern int epic_serial_mode;
 
 /* Exported functions */
-extern void openpic_set_sources(int first_irq, int num_irqs, void *isr);
+extern void openpic_set_sources(int first_irq, int num_irqs, void __iomem *isr);
 extern void openpic_init(int linux_irq_offset);
 extern void openpic_init_nmi_irq(u_int irq);
 extern void openpic_hookup_cascade(u_int irq, char *name,
diff -Nru a/include/asm-ppc/pci-bridge.h b/include/asm-ppc/pci-bridge.h
--- a/include/asm-ppc/pci-bridge.h	2005-01-10 20:11:16 -08:00
+++ b/include/asm-ppc/pci-bridge.h	2005-01-10 20:11:16 -08:00
@@ -57,8 +57,8 @@
 	unsigned long pci_mem_offset;
 
 	struct pci_ops *ops;
-	volatile unsigned int *cfg_addr;
-	volatile unsigned char *cfg_data;
+	volatile unsigned int __iomem *cfg_addr;
+	volatile void __iomem *cfg_data;
 	/*
 	 * If set, indirect method will set the cfg_type bit as
 	 * needed to generate type 1 configuration transactions.
@@ -95,7 +95,7 @@
 			     int where, u32 val);
 
 extern void setup_indirect_pci_nomap(struct pci_controller* hose,
-			       u32 cfg_addr, u32 cfg_data);
+			       void __iomem *cfg_addr, void __iomem *cfg_data);
 extern void setup_indirect_pci(struct pci_controller* hose,
 			       u32 cfg_addr, u32 cfg_data);
 extern void setup_grackle(struct pci_controller *hose);
diff -Nru a/include/asm-ppc/perfmon.h b/include/asm-ppc/perfmon.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-ppc/perfmon.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,22 @@
+#ifndef __PERFMON_H
+#define __PERFMON_H
+
+extern void (*perf_irq)(struct pt_regs *);
+
+int request_perfmon_irq(void (*handler)(struct pt_regs *));
+void free_perfmon_irq(void);
+
+#ifdef CONFIG_FSL_BOOKE
+void init_pmc_stop(int ctr);
+void set_pmc_event(int ctr, int event);
+void set_pmc_user_kernel(int ctr, int user, int kernel);
+void set_pmc_marked(int ctr, int mark0, int mark1);
+void pmc_start_ctr(int ctr, int enable);
+void pmc_start_ctrs(int enable);
+void pmc_stop_ctrs(void);
+void dump_pmcs(void);
+
+extern struct op_ppc32_model op_model_fsl_booke;
+#endif
+
+#endif /* __PERFMON_H */
diff -Nru a/include/asm-ppc/pgtable.h b/include/asm-ppc/pgtable.h
--- a/include/asm-ppc/pgtable.h	2005-01-10 20:11:17 -08:00
+++ b/include/asm-ppc/pgtable.h	2005-01-10 20:11:17 -08:00
@@ -2,6 +2,8 @@
 #ifndef _PPC_PGTABLE_H
 #define _PPC_PGTABLE_H
 
+#include <asm-generic/4level-fixup.h>
+
 #include <linux/config.h>
 
 #ifndef __ASSEMBLY__
@@ -431,7 +433,7 @@
 #define pte_pfn(x)		(pte_val(x) >> PAGE_SHIFT)
 #define pte_page(x)		pfn_to_page(pte_pfn(x))
 
-#define pfn_pte(pfn, prot)	__pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot))
+#define pfn_pte(pfn, prot)	__pte(((pte_t)(pfn) << PAGE_SHIFT) | pgprot_val(prot))
 #define mk_pte(page, prot)	pfn_pte(page_to_pfn(page), prot)
 
 /*
@@ -714,8 +716,22 @@
 /* Needs to be defined here and not in linux/mm.h, as it is arch dependent */
 #define kern_addr_valid(addr)	(1)
 
+#ifdef CONFIG_PHYS_64BIT
+extern int remap_pfn_range(struct vm_area_struct *vma, unsigned long from,
+			unsigned long paddr, unsigned long size, pgprot_t prot);
+static inline int io_remap_page_range(struct vm_area_struct *vma,
+					unsigned long vaddr,
+					unsigned long paddr,
+					unsigned long size,
+					pgprot_t prot)
+{
+	phys_addr_t paddr64 = fixup_bigphys_addr(paddr, size);
+	return remap_pfn_range(vma, vaddr, paddr64 >> PAGE_SHIFT, size, prot);
+}
+#else
 #define io_remap_page_range(vma, vaddr, paddr, size, prot)		\
 		remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot)
+#endif
 
 /*
  * No page table caches to initialise
diff -Nru a/include/asm-ppc/ppc4xx_pic.h b/include/asm-ppc/ppc4xx_pic.h
--- a/include/asm-ppc/ppc4xx_pic.h	2005-01-10 20:11:24 -08:00
+++ b/include/asm-ppc/ppc4xx_pic.h	2005-01-10 20:11:24 -08:00
@@ -1,28 +1,53 @@
 /*
+ * include/asm-ppc/ppc4xx_pic.h
  *
- *    Copyright (c) 1999 Grant Erickson <grant@lcse.umn.edu>
+ * Interrupt controller driver for PowerPC 4xx-based processors.
  *
- *    Module name: ppc4xx_pic.h
+ * Copyright (c) 1999 Grant Erickson <grant@lcse.umn.edu>
  *
- *    Description:
- *      Interrupt controller driver for PowerPC 4xx-based processors.
+ * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net>
+ * Copyright (c) 2004 Zultys Technologies
+ *
+ * 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	__PPC4XX_PIC_H__
 #define	__PPC4XX_PIC_H__
 
 #include <linux/config.h>
+#include <linux/types.h>
 #include <linux/irq.h>
 
-/* External Global Variables */
-
-extern struct hw_interrupt_type *ppc4xx_pic;
-extern unsigned int ibm4xxPIC_NumInitSenses;
-extern unsigned char *ibm4xxPIC_InitSenses;
-
-/* Function Prototypes */
+/* "Fixed" UIC settings (they are chip, not board specific),
+ * e.g. polarity/triggerring for internal interrupt sources.
+ *
+ * Platform port should provide NR_UICS-sized array named ppc4xx_core_uic_cfg
+ * with these "fixed" settings: .polarity contains exact value which will
+ * be written (masked with "ext_irq_mask") into UICx_PR register,
+ * .triggering - to UICx_TR.
+ *
+ * Settings for external IRQs can be specified separately by the
+ * board support code. In this case properly sized array of unsigned
+ * char named ppc4xx_uic_ext_irq_cfg should be filled with correct
+ * values using IRQ_SENSE_XXXXX and IRQ_POLARITY_XXXXXXX defines.
+ *
+ * If these arrays aren't provided, UIC initialization code keeps firmware
+ * configuration. Also, ppc4xx_uic_ext_irq_cfg implies ppc4xx_core_uic_cfg
+ * is defined.
+ *
+ * Both ppc4xx_core_uic_cfg and ppc4xx_uic_ext_irq_cfg are declared as
+ * "weak" symbols in ppc4xx_pic.c
+ *
+ */
+struct ppc4xx_uic_settings {
+	u32 	polarity;
+	u32 	triggering;
+	u32	ext_irq_mask;
+};
 
 extern void ppc4xx_pic_init(void);
-extern int ppc4xx_pic_get_irq(struct pt_regs *regs);
 
-#endif				/* __PPC4XX_PIC_H__ */
+#endif	/* __PPC4XX_PIC_H__ */
diff -Nru a/include/asm-ppc/processor.h b/include/asm-ppc/processor.h
--- a/include/asm-ppc/processor.h	2005-01-10 20:11:15 -08:00
+++ b/include/asm-ppc/processor.h	2005-01-10 20:11:15 -08:00
@@ -78,12 +78,6 @@
  */
 extern long kernel_thread(int (*fn)(void *), void *arg, unsigned long flags);
 
-/*
- * Bus types
- */
-#define MCA_bus 0
-#define MCA_bus__is_a_macro
-
 /* Lazy FPU handling on uni-processor */
 extern struct task_struct *last_task_used_math;
 extern struct task_struct *last_task_used_altivec;
diff -Nru a/include/asm-ppc/reg_booke.h b/include/asm-ppc/reg_booke.h
--- a/include/asm-ppc/reg_booke.h	2005-01-10 20:11:21 -08:00
+++ b/include/asm-ppc/reg_booke.h	2005-01-10 20:11:21 -08:00
@@ -51,6 +51,59 @@
 #define mtpmr(rn, v)	asm volatile("mtpmr " __stringify(rn) ",%0" : : "r" (v))
 #endif /* __ASSEMBLY__ */
 
+/* Freescale Book E Performance Monitor APU Registers */
+#define PMRN_PMC0	0x010	/* Performance Monitor Counter 0 */
+#define PMRN_PMC1	0x011	/* Performance Monitor Counter 1 */
+#define PMRN_PMC2	0x012	/* Performance Monitor Counter 1 */
+#define PMRN_PMC3	0x013	/* Performance Monitor Counter 1 */
+#define PMRN_PMLCA0	0x090	/* PM Local Control A0 */
+#define PMRN_PMLCA1	0x091	/* PM Local Control A1 */
+#define PMRN_PMLCA2	0x092	/* PM Local Control A2 */
+#define PMRN_PMLCA3	0x093	/* PM Local Control A3 */
+
+#define PMLCA_FC	0x80000000	/* Freeze Counter */
+#define PMLCA_FCS	0x40000000	/* Freeze in Supervisor */
+#define PMLCA_FCU	0x20000000	/* Freeze in User */
+#define PMLCA_FCM1	0x10000000	/* Freeze when PMM==1 */
+#define PMLCA_FCM0	0x08000000	/* Freeze when PMM==0 */
+#define PMLCA_CE	0x04000000	/* Condition Enable */
+
+#define PMLCA_EVENT_MASK 0x007f0000	/* Event field */
+#define PMLCA_EVENT_SHIFT	16
+
+#define PMRN_PMLCB0	0x110	/* PM Local Control B0 */
+#define PMRN_PMLCB1	0x111	/* PM Local Control B1 */
+#define PMRN_PMLCB2	0x112	/* PM Local Control B2 */
+#define PMRN_PMLCB3	0x113	/* PM Local Control B3 */
+
+#define PMLCB_THRESHMUL_MASK	0x0700	/* Threshhold Multiple Field */
+#define PMLCB_THRESHMUL_SHIFT	8
+
+#define PMLCB_THRESHOLD_MASK	0x003f	/* Threshold Field */
+#define PMLCB_THRESHOLD_SHIFT	0
+
+#define PMRN_PMGC0	0x190	/* PM Global Control 0 */
+
+#define PMGC0_FAC	0x80000000	/* Freeze all Counters */
+#define PMGC0_PMIE	0x40000000	/* Interrupt Enable */
+#define PMGC0_FCECE	0x20000000	/* Freeze countes on
+					   Enabled Condition or
+					   Event */
+
+#define PMRN_UPMC0	0x000	/* User Performance Monitor Counter 0 */
+#define PMRN_UPMC1	0x001	/* User Performance Monitor Counter 1 */
+#define PMRN_UPMC2	0x002	/* User Performance Monitor Counter 1 */
+#define PMRN_UPMC3	0x003	/* User Performance Monitor Counter 1 */
+#define PMRN_UPMLCA0	0x080	/* User PM Local Control A0 */
+#define PMRN_UPMLCA1	0x081	/* User PM Local Control A1 */
+#define PMRN_UPMLCA2	0x082	/* User PM Local Control A2 */
+#define PMRN_UPMLCA3	0x083	/* User PM Local Control A3 */
+#define PMRN_UPMLCB0	0x100	/* User PM Local Control B0 */
+#define PMRN_UPMLCB1	0x101	/* User PM Local Control B1 */
+#define PMRN_UPMLCB2	0x102	/* User PM Local Control B2 */
+#define PMRN_UPMLCB3	0x103	/* User PM Local Control B3 */
+#define PMRN_UPMGC0	0x180	/* User PM Global Control 0 */
+
 
 /* Machine State Register (MSR) Fields */
 #define MSR_UCLE	(1<<26)	/* User-mode cache lock enable */
diff -Nru a/include/asm-ppc/sections.h b/include/asm-ppc/sections.h
--- a/include/asm-ppc/sections.h	2005-01-10 20:11:22 -08:00
+++ b/include/asm-ppc/sections.h	2005-01-10 20:11:22 -08:00
@@ -4,8 +4,6 @@
 
 #include <asm-generic/sections.h>
 
-extern char _end[];
-
 #define __pmac __attribute__ ((__section__ (".pmac.text")))
 #define __pmacdata __attribute__ ((__section__ (".pmac.data")))
 #define __pmacfunc(__argpmac) \
diff -Nru a/include/asm-ppc/serial.h b/include/asm-ppc/serial.h
--- a/include/asm-ppc/serial.h	2005-01-10 20:11:22 -08:00
+++ b/include/asm-ppc/serial.h	2005-01-10 20:11:22 -08:00
@@ -10,6 +10,8 @@
 
 #if defined(CONFIG_EV64260)
 #include <platforms/ev64260.h>
+#elif defined(CONFIG_CHESTNUT)
+#include <platforms/chestnut.h>
 #elif defined(CONFIG_GEMINI)
 #include <platforms/gemini_serial.h>
 #elif defined(CONFIG_POWERPMC250)
diff -Nru a/include/asm-ppc/signal.h b/include/asm-ppc/signal.h
--- a/include/asm-ppc/signal.h	2005-01-10 20:11:16 -08:00
+++ b/include/asm-ppc/signal.h	2005-01-10 20:11:16 -08:00
@@ -157,4 +157,23 @@
 #define ptrace_signal_deliver(regs, cookie) do { } while (0)
 #endif /* __KERNEL__ */
 
+/*
+ * These are parameters to dbg_sigreturn syscall.  They enable or
+ * disable certain debugging things that can be done from signal
+ * handlers.  The dbg_sigreturn syscall *must* be called from a
+ * SA_SIGINFO signal so the ucontext can be passed to it.  It takes an
+ * array of struct sig_dbg_op, which has the debug operations to
+ * perform before returning from the signal.
+ */
+struct sig_dbg_op {
+	int dbg_type;
+	unsigned long dbg_value;
+};
+
+/* Enable or disable single-stepping.  The value sets the state. */
+#define SIG_DBG_SINGLE_STEPPING		1
+
+/* Enable or disable branch tracing.  The value sets the state. */
+#define SIG_DBG_BRANCH_TRACING		2
+
 #endif
diff -Nru a/include/asm-ppc/spinlock.h b/include/asm-ppc/spinlock.h
--- a/include/asm-ppc/spinlock.h	2005-01-10 20:11:18 -08:00
+++ b/include/asm-ppc/spinlock.h	2005-01-10 20:11:18 -08:00
@@ -13,6 +13,9 @@
 	volatile unsigned long owner_pc;
 	volatile unsigned long owner_cpu;
 #endif
+#ifdef CONFIG_PREEMPT
+	unsigned int break_lock;
+#endif
 } spinlock_t;
 
 #ifdef __KERNEL__
@@ -83,6 +86,9 @@
 #ifdef CONFIG_DEBUG_SPINLOCK
 	volatile unsigned long owner_pc;
 #endif
+#ifdef CONFIG_PREEMPT
+	unsigned int break_lock;
+#endif
 } rwlock_t;
 
 #ifdef CONFIG_DEBUG_SPINLOCK
@@ -191,6 +197,8 @@
 extern int _raw_write_trylock(rwlock_t *rw);
 
 #endif
+
+#define _raw_read_trylock(lock) generic_raw_read_trylock(lock)
 
 #endif /* __ASM_SPINLOCK_H */
 #endif /* __KERNEL__ */
diff -Nru a/include/asm-ppc/uaccess.h b/include/asm-ppc/uaccess.h
--- a/include/asm-ppc/uaccess.h	2005-01-10 20:11:15 -08:00
+++ b/include/asm-ppc/uaccess.h	2005-01-10 20:11:15 -08:00
@@ -180,7 +180,8 @@
 
 #define __get_user_nocheck(x, ptr, size)			\
 ({								\
-	long __gu_err, __gu_val;				\
+	long __gu_err;						\
+	unsigned long __gu_val;					\
 	__chk_user_ptr(ptr);					\
 	__get_user_size(__gu_val, (ptr), (size), __gu_err);	\
 	(x) = (__typeof__(*(ptr)))__gu_val;			\
@@ -199,7 +200,8 @@
 
 #define __get_user_check(x, ptr, size)					\
 ({									\
-	long __gu_err = -EFAULT, __gu_val = 0;				\
+	long __gu_err = -EFAULT;					\
+	unsigned long  __gu_val = 0;					\
 	const __typeof__(*(ptr)) __user *__gu_addr = (ptr);		\
 	if (access_ok(VERIFY_READ, __gu_addr, (size)))			\
 		__get_user_size(__gu_val, __gu_addr, (size), __gu_err);	\
@@ -305,10 +307,10 @@
 	unsigned long over;
 
 	if (access_ok(VERIFY_READ, from, n))
-		return __copy_tofrom_user((void __user *)to, from, n);
+		return __copy_tofrom_user((__force void __user *)to, from, n);
 	if ((unsigned long)from < TASK_SIZE) {
 		over = (unsigned long)from + n - TASK_SIZE;
-		return __copy_tofrom_user((void __user *)to, from, n - over) + over;
+		return __copy_tofrom_user((__force void __user *)to, from, n - over) + over;
 	}
 	return n;
 }
@@ -319,18 +321,24 @@
 	unsigned long over;
 
 	if (access_ok(VERIFY_WRITE, to, n))
-		return __copy_tofrom_user(to, (void __user *) from, n);
+		return __copy_tofrom_user(to, (__force void __user *) from, n);
 	if ((unsigned long)to < TASK_SIZE) {
 		over = (unsigned long)to + n - TASK_SIZE;
-		return __copy_tofrom_user(to, (void __user *) from, n - over) + over;
+		return __copy_tofrom_user(to, (__force void __user *) from, n - over) + over;
 	}
 	return n;
 }
 
-#define __copy_from_user(to, from, size) \
-	__copy_tofrom_user((void __user *)(to), (from), (size))
-#define __copy_to_user(to, from, size) \
-	__copy_tofrom_user((to), (void __user *)(from), (size))
+static inline unsigned long __copy_from_user(void *to, const void __user *from, unsigned long size)
+{
+	return __copy_tofrom_user((__force void __user *)to, from, size);
+}
+
+static inline unsigned long __copy_to_user(void __user *to, const void *from, unsigned long size)
+{
+	return __copy_tofrom_user(to, (__force void __user *)from, size);
+}
+
 #define __copy_to_user_inatomic __copy_to_user
 #define __copy_from_user_inatomic __copy_from_user
 
diff -Nru a/include/asm-ppc/unistd.h b/include/asm-ppc/unistd.h
--- a/include/asm-ppc/unistd.h	2005-01-10 20:11:17 -08:00
+++ b/include/asm-ppc/unistd.h	2005-01-10 20:11:17 -08:00
@@ -260,7 +260,7 @@
 #define __NR_fstatfs64		253
 #define __NR_fadvise64_64	254
 #define __NR_rtas		255
-/* Number 256 is reserved for sys_debug_setcontext */
+#define __NR_sys_debug_setcontext 256
 /* Number 257 is reserved for vserver */
 /* Number 258 is reserved for new sys_remap_file_pages */
 /* Number 259 is reserved for new sys_mbind */
diff -Nru a/include/asm-ppc64/cache.h b/include/asm-ppc64/cache.h
--- a/include/asm-ppc64/cache.h	2005-01-10 20:11:20 -08:00
+++ b/include/asm-ppc64/cache.h	2005-01-10 20:11:20 -08:00
@@ -7,11 +7,30 @@
 #ifndef __ARCH_PPC64_CACHE_H
 #define __ARCH_PPC64_CACHE_H
 
+#include <asm/types.h>
+
 /* bytes per L1 cache line */
 #define L1_CACHE_SHIFT	7
 #define L1_CACHE_BYTES	(1 << L1_CACHE_SHIFT)
 
 #define SMP_CACHE_BYTES L1_CACHE_BYTES
 #define L1_CACHE_SHIFT_MAX 7	/* largest L1 which this arch supports */
+
+#ifndef __ASSEMBLY__
+
+struct ppc64_caches {
+	u32	dsize;			/* L1 d-cache size */
+	u32	dline_size;		/* L1 d-cache line size	*/
+	u32	log_dline_size;
+	u32	dlines_per_page;
+	u32	isize;			/* L1 i-cache size */
+	u32	iline_size;		/* L1 i-cache line size	*/
+	u32	log_iline_size;
+	u32	ilines_per_page;
+};
+
+extern struct ppc64_caches ppc64_caches;
+
+#endif
 
 #endif
diff -Nru a/include/asm-ppc64/hardirq.h b/include/asm-ppc64/hardirq.h
--- a/include/asm-ppc64/hardirq.h	2005-01-10 20:11:16 -08:00
+++ b/include/asm-ppc64/hardirq.h	2005-01-10 20:11:16 -08:00
@@ -14,7 +14,6 @@
 
 typedef struct {
 	unsigned int __softirq_pending;
-	struct task_struct * __ksoftirqd_task;
 } ____cacheline_aligned irq_cpustat_t;
 
 #include <linux/irq_cpustat.h>	/* Standard mappings for irq_cpustat_t above */
diff -Nru a/include/asm-ppc64/iSeries/HvReleaseData.h b/include/asm-ppc64/iSeries/HvReleaseData.h
--- a/include/asm-ppc64/iSeries/HvReleaseData.h	2005-01-10 20:11:23 -08:00
+++ b/include/asm-ppc64/iSeries/HvReleaseData.h	2005-01-10 20:11:23 -08:00
@@ -26,6 +26,7 @@
 //   address of the OS's NACA).
 //
 #include <asm/types.h>
+#include <asm/naca.h>
 
 //=============================================================================
 //
diff -Nru a/include/asm-ppc64/iSeries/ItLpPaca.h b/include/asm-ppc64/iSeries/ItLpPaca.h
--- a/include/asm-ppc64/iSeries/ItLpPaca.h	2005-01-10 20:11:21 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,134 +0,0 @@
-/*
- * ItLpPaca.h
- * Copyright (C) 2001  Mike Corrigan IBM Corporation
- * 
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- * 
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
- */
-#ifndef _ITLPPACA_H
-#define _ITLPPACA_H
-
-//=============================================================================
-//                                   
-//	This control block contains the data that is shared between the 
-//	hypervisor (PLIC) and the OS.
-//    
-//
-//----------------------------------------------------------------------------
-#include <asm/types.h>
-
-struct ItLpPaca
-{
-//=============================================================================
-// CACHE_LINE_1 0x0000 - 0x007F Contains read-only data
-// NOTE: The xDynXyz fields are fields that will be dynamically changed by 
-// PLIC when preparing to bring a processor online or when dispatching a 
-// virtual processor!
-//=============================================================================
-	u32	xDesc;			// Eye catcher 0xD397D781	x00-x03
-	u16	xSize;			// Size of this struct		x04-x05
-	u16	xRsvd1_0;		// Reserved			x06-x07
-	u16	xRsvd1_1:14;		// Reserved			x08-x09
-	u8	xSharedProc:1;		// Shared processor indicator	...
-	u8	xSecondaryThread:1;	// Secondary thread indicator	...
-	volatile u8 xDynProcStatus:8;	// Dynamic Status of this proc	x0A-x0A
-	u8	xSecondaryThreadCnt;	// Secondary thread count	x0B-x0B
-	volatile u16 xDynHvPhysicalProcIndex;// Dynamic HV Physical Proc Index0C-x0D
-	volatile u16 xDynHvLogicalProcIndex;// Dynamic HV Logical Proc Indexx0E-x0F
-	u32	xDecrVal;   		// Value for Decr programming 	x10-x13
-	u32	xPMCVal;       		// Value for PMC regs         	x14-x17
-	volatile u32 xDynHwNodeId;	// Dynamic Hardware Node id	x18-x1B
-	volatile u32 xDynHwProcId;	// Dynamic Hardware Proc Id	x1C-x1F
-	volatile u32 xDynPIR;		// Dynamic ProcIdReg value	x20-x23
-	u32	xDseiData;           	// DSEI data                  	x24-x27
-	u64	xSPRG3;               	// SPRG3 value                	x28-x2F
-	u8	xRsvd1_3[80];		// Reserved			x30-x7F
-   
-//=============================================================================
-// CACHE_LINE_2 0x0080 - 0x00FF Contains local read-write data
-//=============================================================================
-	// This Dword contains a byte for each type of interrupt that can occur.  
-	// The IPI is a count while the others are just a binary 1 or 0.
-	union {
-		u64	xAnyInt;
-		struct {
-			u16	xRsvd;		// Reserved - cleared by #mpasmbl
-			u8	xXirrInt;	// Indicates xXirrValue is valid or Immed IO
-			u8	xIpiCnt;	// IPI Count
-			u8	xDecrInt;	// DECR interrupt occurred
-			u8	xPdcInt;	// PDC interrupt occurred
-			u8	xQuantumInt;	// Interrupt quantum reached
-			u8	xOldPlicDeferredExtInt;	// Old PLIC has a deferred XIRR pending
-		} xFields;
-	} xIntDword;
-
-	// Whenever any fields in this Dword are set then PLIC will defer the 
-	// processing of external interrupts.  Note that PLIC will store the 
-	// XIRR directly into the xXirrValue field so that another XIRR will 
-	// not be presented until this one clears.  The layout of the low 
-	// 4-bytes of this Dword is upto SLIC - PLIC just checks whether the 
-	// entire Dword is zero or not.  A non-zero value in the low order 
-	// 2-bytes will result in SLIC being granted the highest thread 
-	// priority upon return.  A 0 will return to SLIC as medium priority.
-	u64	xPlicDeferIntsArea;	// Entire Dword
-
-	// Used to pass the real SRR0/1 from PLIC to SLIC as well as to 
-	// pass the target SRR0/1 from SLIC to PLIC on a SetAsrAndRfid.
-	u64     xSavedSrr0;             // Saved SRR0                   x10-x17
-	u64     xSavedSrr1;             // Saved SRR1                   x18-x1F
-
-	// Used to pass parms from the OS to PLIC for SetAsrAndRfid
-	u64     xSavedGpr3;             // Saved GPR3                   x20-x27
-	u64     xSavedGpr4;             // Saved GPR4                   x28-x2F
-	u64     xSavedGpr5;             // Saved GPR5                   x30-x37
-
-	u8	xRsvd2_1;		// Reserved			x38-x38
-	u8      xCpuCtlsTaskAttributes; // Task attributes for cpuctls  x39-x39
-	u8      xFPRegsInUse;           // FP regs in use               x3A-x3A
-	u8      xPMCRegsInUse;          // PMC regs in use              x3B-x3B
-	volatile u32  xSavedDecr;	// Saved Decr Value             x3C-x3F
-	volatile u64  xEmulatedTimeBase;// Emulated TB for this thread  x40-x47
-	volatile u64  xCurPLICLatency;	// Unaccounted PLIC latency     x48-x4F
-	u64     xTotPLICLatency;        // Accumulated PLIC latency     x50-x57   
-	u64     xWaitStateCycles;       // Wait cycles for this proc    x58-x5F
-	u64     xEndOfQuantum;          // TB at end of quantum         x60-x67
-	u64     xPDCSavedSPRG1;         // Saved SPRG1 for PMC int      x68-x6F
-	u64     xPDCSavedSRR0;          // Saved SRR0 for PMC int       x70-x77
-	volatile u32 xVirtualDecr;	// Virtual DECR for shared procsx78-x7B
-	u16     xSLBCount;              // # of SLBs to maintain        x7C-x7D
-	u8      xIdle;                  // Indicate OS is idle          x7E
-	u8      xRsvd2_2;               // Reserved                     x7F
-
-
-//=============================================================================
-// CACHE_LINE_3 0x0100 - 0x007F: This line is shared with other processors
-//=============================================================================
-	// This is the xYieldCount.  An "odd" value (low bit on) means that 
-	// the processor is yielded (either because of an OS yield or a PLIC 
-	// preempt).  An even value implies that the processor is currently 
-	// executing.
-	// NOTE: This value will ALWAYS be zero for dedicated processors and 
-	// will NEVER be zero for shared processors (ie, initialized to a 1).
-	volatile u32 xYieldCount;	// PLIC increments each dispatchx00-x03
-	u8	xRsvd3_0[124];		// Reserved                     x04-x7F         
-
-//=============================================================================
-// CACHE_LINE_4-5 0x0100 - 0x01FF Contains PMC interrupt data
-//=============================================================================
-	u8      xPmcSaveArea[256];	// PMC interrupt Area           x00-xFF
-
-
-};
-
-#endif /* _ITLPPACA_H */
diff -Nru a/include/asm-ppc64/iSeries/LparData.h b/include/asm-ppc64/iSeries/LparData.h
--- a/include/asm-ppc64/iSeries/LparData.h	2005-01-10 20:11:16 -08:00
+++ b/include/asm-ppc64/iSeries/LparData.h	2005-01-10 20:11:16 -08:00
@@ -24,11 +24,8 @@
 #include <asm/page.h>
 #include <asm/abs_addr.h>
 
-#include <asm/naca.h>
 #include <asm/iSeries/ItLpNaca.h>
-#include <asm/iSeries/ItLpPaca.h>
 #include <asm/iSeries/ItLpRegSave.h>
-#include <asm/paca.h>
 #include <asm/iSeries/HvReleaseData.h>
 #include <asm/iSeries/LparMap.h>
 #include <asm/iSeries/ItVpdAreas.h>
diff -Nru a/include/asm-ppc64/iommu.h b/include/asm-ppc64/iommu.h
--- a/include/asm-ppc64/iommu.h	2005-01-10 20:11:21 -08:00
+++ b/include/asm-ppc64/iommu.h	2005-01-10 20:11:21 -08:00
@@ -69,18 +69,16 @@
 
 struct iommu_table {
 	unsigned long  it_busno;     /* Bus number this table belongs to */
-	unsigned long  it_size;      /* Size in pages of iommu table */
+	unsigned long  it_size;      /* Size of iommu table in entries */
 	unsigned long  it_offset;    /* Offset into global table */
 	unsigned long  it_base;      /* mapped address of tce table */
 	unsigned long  it_index;     /* which iommu table this is */
 	unsigned long  it_type;      /* type: PCI or Virtual Bus */
-	unsigned long  it_entrysize; /* Size of an entry in bytes */
 	unsigned long  it_blocksize; /* Entries in each block (cacheline) */
 	unsigned long  it_hint;      /* Hint for next alloc */
 	unsigned long  it_largehint; /* Hint for large allocs */
 	unsigned long  it_halfpoint; /* Breaking point for small/large allocs */
 	spinlock_t     it_lock;      /* Protects it_map */
-	unsigned long  it_mapsize;   /* Size of map in # of entries (bits) */
 	unsigned long *it_map;       /* A simple allocation bitmap for now */
 };
 
@@ -156,14 +154,13 @@
 extern void iommu_unmap_single(struct iommu_table *tbl, dma_addr_t dma_handle,
 		size_t size, enum dma_data_direction direction);
 
-extern void tce_init_pSeries(void);
-extern void tce_init_iSeries(void);
+extern void iommu_init_early_pSeries(void);
+extern void iommu_init_early_iSeries(void);
+extern void iommu_init_early_u3(void);
 
 extern void pci_iommu_init(void);
-extern void pci_dma_init_direct(void);
+extern void pci_direct_iommu_init(void);
 
 extern void alloc_u3_dart_table(void);
-
-extern int ppc64_iommu_off;
 
 #endif /* _ASM_IOMMU_H */
diff -Nru a/include/asm-ppc64/kdebug.h b/include/asm-ppc64/kdebug.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-ppc64/kdebug.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,43 @@
+#ifndef _PPC64_KDEBUG_H
+#define _PPC64_KDEBUG_H 1
+
+/* nearly identical to x86_64/i386 code */
+
+#include <linux/notifier.h>
+
+struct pt_regs;
+
+struct die_args {
+	struct pt_regs *regs;
+	const char *str;
+	long err;
+	int trapnr;
+	int signr;
+};
+
+/*
+   Note - you should never unregister because that can race with NMIs.
+   If you really want to do it first unregister - then synchronize_kernel -
+   then free.
+ */
+int register_die_notifier(struct notifier_block *nb);
+extern struct notifier_block *ppc64_die_chain;
+
+/* Grossly misnamed. */
+enum die_val {
+	DIE_OOPS = 1,
+	DIE_IABR_MATCH,
+	DIE_DABR_MATCH,
+	DIE_BPT,
+	DIE_SSTEP,
+	DIE_GPF,
+	DIE_PAGE_FAULT,
+};
+
+static inline int notify_die(enum die_val val,char *str,struct pt_regs *regs,long err,int trap, int sig)
+{
+	struct die_args args = { .regs=regs, .str=str, .err=err, .trapnr=trap,.signr=sig };
+	return notifier_call_chain(&ppc64_die_chain, val, &args);
+}
+
+#endif
diff -Nru a/include/asm-ppc64/kprobes.h b/include/asm-ppc64/kprobes.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-ppc64/kprobes.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,56 @@
+#ifndef _ASM_KPROBES_H
+#define _ASM_KPROBES_H
+/*
+ *  Kernel Probes (KProbes)
+ *  include/asm-ppc64/kprobes.h
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * Copyright (C) IBM Corporation, 2002, 2004
+ *
+ * 2002-Oct	Created by Vamsi Krishna S <vamsi_krishna@in.ibm.com> Kernel
+ *		Probes initial implementation ( includes suggestions from
+ *		Rusty Russell).
+ * 2004-Nov	Modified for PPC64 by Ananth N Mavinakayanahalli
+ *		<ananth@in.ibm.com>
+ */
+#include <linux/types.h>
+#include <linux/ptrace.h>
+
+struct pt_regs;
+
+typedef unsigned int kprobe_opcode_t;
+#define BREAKPOINT_INSTRUCTION	0x7fe00008	/* trap */
+#define MAX_INSN_SIZE 1
+
+#define JPROBE_ENTRY(pentry)	(kprobe_opcode_t *)((func_descr_t *)pentry)
+
+/* Architecture specific copy of original instruction */
+struct arch_specific_insn {
+	/* copy of original instruction */
+	kprobe_opcode_t insn[MAX_INSN_SIZE];
+};
+
+#ifdef CONFIG_KPROBES
+extern int kprobe_exceptions_notify(struct notifier_block *self,
+				    unsigned long val, void *data);
+#else				/* !CONFIG_KPROBES */
+static inline int kprobe_exceptions_notify(struct notifier_block *self,
+					   unsigned long val, void *data)
+{
+	return 0;
+}
+#endif
+#endif				/* _ASM_KPROBES_H */
diff -Nru a/include/asm-ppc64/lppaca.h b/include/asm-ppc64/lppaca.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-ppc64/lppaca.h	2005-01-10 20:11:21 -08:00
@@ -0,0 +1,132 @@
+/*
+ * lppaca.h
+ * Copyright (C) 2001  Mike Corrigan IBM Corporation
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+ */
+#ifndef _ASM_LPPACA_H
+#define _ASM_LPPACA_H
+
+//=============================================================================
+//
+//	This control block contains the data that is shared between the
+//	hypervisor (PLIC) and the OS.
+//
+//
+//----------------------------------------------------------------------------
+#include <asm/types.h>
+
+struct lppaca
+{
+//=============================================================================
+// CACHE_LINE_1 0x0000 - 0x007F Contains read-only data
+// NOTE: The xDynXyz fields are fields that will be dynamically changed by
+// PLIC when preparing to bring a processor online or when dispatching a
+// virtual processor!
+//=============================================================================
+	u32	desc;			// Eye catcher 0xD397D781	x00-x03
+	u16	size;			// Size of this struct		x04-x05
+	u16	reserved1;		// Reserved			x06-x07
+	u16	reserved2:14;		// Reserved			x08-x09
+	u8	shared_proc:1;		// Shared processor indicator	...
+	u8	secondary_thread:1;	// Secondary thread indicator	...
+	volatile u8 dyn_proc_status:8;	// Dynamic Status of this proc	x0A-x0A
+	u8	secondary_thread_count;	// Secondary thread count	x0B-x0B
+	volatile u16 dyn_hv_phys_proc_index;// Dynamic HV Physical Proc Index0C-x0D
+	volatile u16 dyn_hv_log_proc_index;// Dynamic HV Logical Proc Indexx0E-x0F
+	u32	decr_val;   		// Value for Decr programming 	x10-x13
+	u32	pmc_val;       		// Value for PMC regs         	x14-x17
+	volatile u32 dyn_hw_node_id;	// Dynamic Hardware Node id	x18-x1B
+	volatile u32 dyn_hw_proc_id;	// Dynamic Hardware Proc Id	x1C-x1F
+	volatile u32 dyn_pir;		// Dynamic ProcIdReg value	x20-x23
+	u32	dsei_data;           	// DSEI data                  	x24-x27
+	u64	sprg3;               	// SPRG3 value                	x28-x2F
+	u8	reserved3[80];		// Reserved			x30-x7F
+
+//=============================================================================
+// CACHE_LINE_2 0x0080 - 0x00FF Contains local read-write data
+//=============================================================================
+	// This Dword contains a byte for each type of interrupt that can occur.
+	// The IPI is a count while the others are just a binary 1 or 0.
+	union {
+		u64	any_int;
+		struct {
+			u16	reserved;	// Reserved - cleared by #mpasmbl
+			u8	xirr_int;	// Indicates xXirrValue is valid or Immed IO
+			u8	ipi_cnt;	// IPI Count
+			u8	decr_int;	// DECR interrupt occurred
+			u8	pdc_int;	// PDC interrupt occurred
+			u8	quantum_int;	// Interrupt quantum reached
+			u8	old_plic_deferred_ext_int;	// Old PLIC has a deferred XIRR pending
+		} fields;
+	} int_dword;
+
+	// Whenever any fields in this Dword are set then PLIC will defer the
+	// processing of external interrupts.  Note that PLIC will store the
+	// XIRR directly into the xXirrValue field so that another XIRR will
+	// not be presented until this one clears.  The layout of the low
+	// 4-bytes of this Dword is upto SLIC - PLIC just checks whether the
+	// entire Dword is zero or not.  A non-zero value in the low order
+	// 2-bytes will result in SLIC being granted the highest thread
+	// priority upon return.  A 0 will return to SLIC as medium priority.
+	u64	plic_defer_ints_area;	// Entire Dword
+
+	// Used to pass the real SRR0/1 from PLIC to SLIC as well as to
+	// pass the target SRR0/1 from SLIC to PLIC on a SetAsrAndRfid.
+	u64	saved_srr0;		// Saved SRR0                   x10-x17
+	u64	saved_srr1;		// Saved SRR1                   x18-x1F
+
+	// Used to pass parms from the OS to PLIC for SetAsrAndRfid
+	u64	saved_gpr3;		// Saved GPR3                   x20-x27
+	u64	saved_gpr4;		// Saved GPR4                   x28-x2F
+	u64	saved_gpr5;		// Saved GPR5                   x30-x37
+
+	u8	reserved4;		// Reserved			x38-x38
+	u8	cpuctls_task_attrs;	// Task attributes for cpuctls  x39-x39
+	u8	fpregs_in_use;		// FP regs in use               x3A-x3A
+	u8	pmcregs_in_use;		// PMC regs in use              x3B-x3B
+	volatile u32 saved_decr;	// Saved Decr Value             x3C-x3F
+	volatile u64 emulated_time_base;// Emulated TB for this thread  x40-x47
+	volatile u64 cur_plic_latency;	// Unaccounted PLIC latency     x48-x4F
+	u64	tot_plic_latency;	// Accumulated PLIC latency     x50-x57
+	u64	wait_state_cycles;	// Wait cycles for this proc    x58-x5F
+	u64	end_of_quantum;		// TB at end of quantum         x60-x67
+	u64	pdc_saved_sprg1;	// Saved SPRG1 for PMC int      x68-x6F
+	u64	pdc_saved_srr0;		// Saved SRR0 for PMC int       x70-x77
+	volatile u32 virtual_decr;	// Virtual DECR for shared procsx78-x7B
+	u16	slb_count;		// # of SLBs to maintain        x7C-x7D
+	u8	idle;			// Indicate OS is idle          x7E
+	u8	reserved5;		// Reserved                     x7F
+
+
+//=============================================================================
+// CACHE_LINE_3 0x0100 - 0x007F: This line is shared with other processors
+//=============================================================================
+	// This is the yield_count.  An "odd" value (low bit on) means that
+	// the processor is yielded (either because of an OS yield or a PLIC
+	// preempt).  An even value implies that the processor is currently
+	// executing.
+	// NOTE: This value will ALWAYS be zero for dedicated processors and
+	// will NEVER be zero for shared processors (ie, initialized to a 1).
+	volatile u32 yield_count;	// PLIC increments each dispatchx00-x03
+	u8	reserved6[124];		// Reserved                     x04-x7F
+
+//=============================================================================
+// CACHE_LINE_4-5 0x0100 - 0x01FF Contains PMC interrupt data
+//=============================================================================
+	u8	pmc_save_area[256];	// PMC interrupt Area           x00-xFF
+};
+
+#endif /* _ASM_LPPACA_H */
diff -Nru a/include/asm-ppc64/machdep.h b/include/asm-ppc64/machdep.h
--- a/include/asm-ppc64/machdep.h	2005-01-10 20:11:17 -08:00
+++ b/include/asm-ppc64/machdep.h	2005-01-10 20:11:17 -08:00
@@ -70,6 +70,8 @@
 				    long index,
 				    long npages);
 	void		(*tce_flush)(struct iommu_table *tbl);
+	void		(*iommu_dev_setup)(struct pci_dev *dev);
+	void		(*iommu_bus_setup)(struct pci_bus *bus);
 
 	int		(*probe)(int platform);
 	void		(*setup_arch)(void);
@@ -109,6 +111,10 @@
 	ssize_t		(*nvram_read)(char *buf, size_t count, loff_t *index);	
 	ssize_t		(*nvram_size)(void);		
 	int		(*nvram_sync)(void);
+
+	/* Exception handlers */
+	void		(*system_reset_exception)(struct pt_regs *regs);
+	int 		(*machine_check_exception)(struct pt_regs *regs);
 
 	/* Motherboard/chipset features. This is a kind of general purpose
 	 * hook used to control some machine specific features (like reset
diff -Nru a/include/asm-ppc64/mmu.h b/include/asm-ppc64/mmu.h
--- a/include/asm-ppc64/mmu.h	2005-01-10 20:11:20 -08:00
+++ b/include/asm-ppc64/mmu.h	2005-01-10 20:11:20 -08:00
@@ -98,15 +98,8 @@
 #define PP_RXRX 3	/* Supervisor read,       User read */
 
 
-typedef struct {
-	HPTE *		htab;
-	unsigned long	htab_num_ptegs;
-	unsigned long	htab_hash_mask;
-	unsigned long	next_round_robin;
-	unsigned long   last_kernel_address;
-} HTAB;
-
-extern HTAB htab_data;
+extern HPTE *		htab_address;
+extern unsigned long	htab_hash_mask;
 
 static inline unsigned long hpt_hash(unsigned long vpn, int large)
 {
diff -Nru a/include/asm-ppc64/naca.h b/include/asm-ppc64/naca.h
--- a/include/asm-ppc64/naca.h	2005-01-10 20:11:19 -08:00
+++ b/include/asm-ppc64/naca.h	2005-01-10 20:11:19 -08:00
@@ -11,41 +11,21 @@
  */
 
 #include <asm/types.h>
-#include <asm/systemcfg.h>
 
 #ifndef __ASSEMBLY__
 
 struct naca_struct {
-	/*==================================================================
-	 * Cache line 1: 0x0000 - 0x007F
-	 * Kernel only data - undefined for user space
-	 *==================================================================
-	 */
+	/* Kernel only data - undefined for user space */
 	void *xItVpdAreas;              /* VPD Data                  0x00 */
 	void *xRamDisk;                 /* iSeries ramdisk           0x08 */
 	u64   xRamDiskSize;		/* In pages                  0x10 */
-	struct paca_struct *paca;	/* Ptr to an array of pacas  0x18 */
-	u64 debug_switch;		/* Debug print control       0x20 */
-	u64 banner;                     /* Ptr to banner string      0x28 */
-	u64 log;                        /* Ptr to log buffer         0x30 */
-	u64 serialPortAddr;		/* Phy addr of serial port   0x38 */
-	u64 interrupt_controller;	/* Type of int controller    0x40 */ 
-	u64 unused1;			/* was SLB size in entries   0x48 */
-	u64 pftSize;			/* Log 2 of page table size  0x50 */
-	void *systemcfg;		/* Pointer to systemcfg data 0x58 */
-	u32 dCacheL1LogLineSize;	/* L1 d-cache line size Log2 0x60 */
-	u32 dCacheL1LinesPerPage;	/* L1 d-cache lines / page   0x64 */
-	u32 iCacheL1LogLineSize;	/* L1 i-cache line size Log2 0x68 */
-	u32 iCacheL1LinesPerPage;	/* L1 i-cache lines / page   0x6c */
-	u8  resv0[15];                  /* Reserved           0x71 - 0x7F */
 };
 
-extern struct naca_struct *naca;
+extern struct naca_struct naca;
 
 #endif /* __ASSEMBLY__ */
 
 #define NACA_PAGE      0x4
 #define NACA_PHYS_ADDR (NACA_PAGE<<PAGE_SHIFT)
-#define NACA_VIRT_ADDR (KERNELBASE+NACA_PHYS_ADDR)
 
 #endif /* _NACA_H */
diff -Nru a/include/asm-ppc64/paca.h b/include/asm-ppc64/paca.h
--- a/include/asm-ppc64/paca.h	2005-01-10 20:11:18 -08:00
+++ b/include/asm-ppc64/paca.h	2005-01-10 20:11:18 -08:00
@@ -18,7 +18,7 @@
 
 #include	<linux/config.h>
 #include	<asm/types.h>
-#include	<asm/iSeries/ItLpPaca.h>
+#include	<asm/lppaca.h>
 #include	<asm/iSeries/ItLpRegSave.h>
 #include	<asm/mmu.h>
 
@@ -34,8 +34,8 @@
  *
  * This structure is not directly accessed by firmware or the service
  * processor except for the first two pointers that point to the
- * ItLpPaca area and the ItLpRegSave area for this CPU.  Both the
- * ItLpPaca and ItLpRegSave objects are currently contained within the
+ * lppaca area and the ItLpRegSave area for this CPU.  Both the
+ * lppaca and ItLpRegSave objects are currently contained within the
  * PACA but they do not need to be.
  */
 struct paca_struct {
@@ -50,7 +50,7 @@
 	 * MAGIC: These first two pointers can't be moved - they're
 	 * accessed by the firmware
 	 */
-	struct ItLpPaca *lppaca_ptr;	/* Pointer to LpPaca for PLIC */
+	struct lppaca *lppaca_ptr;	/* Pointer to LpPaca for PLIC */
 	struct ItLpRegSave *reg_save_ptr; /* Pointer to LpRegSave for PLIC */
 
 	/*
@@ -109,7 +109,7 @@
 	 * alignment will suffice to ensure that it doesn't
 	 * cross a page boundary.
 	 */
-	struct ItLpPaca lppaca __attribute__((__aligned__(0x400)));
+	struct lppaca lppaca __attribute__((__aligned__(0x400)));
 #ifdef CONFIG_PPC_ISERIES
 	struct ItLpRegSave reg_save;
 #endif
diff -Nru a/include/asm-ppc64/page.h b/include/asm-ppc64/page.h
--- a/include/asm-ppc64/page.h	2005-01-10 20:11:15 -08:00
+++ b/include/asm-ppc64/page.h	2005-01-10 20:11:15 -08:00
@@ -93,7 +93,7 @@
 
 #ifdef __KERNEL__
 #ifndef __ASSEMBLY__
-#include <asm/naca.h>
+#include <asm/cache.h>
 
 #undef STRICT_MM_TYPECHECKS
 
@@ -106,8 +106,8 @@
 {
 	unsigned long lines, line_size;
 
-	line_size = systemcfg->dCacheL1LineSize; 
-	lines = naca->dCacheL1LinesPerPage;
+	line_size = ppc64_caches.dline_size;
+	lines = ppc64_caches.dlines_per_page;
 
 	__asm__ __volatile__(
 	"mtctr  	%1	# clear_page\n\
@@ -182,6 +182,8 @@
 #define __pa(x) ((unsigned long)(x)-PAGE_OFFSET)
 
 extern int page_is_ram(unsigned long pfn);
+
+extern u64 ppc64_pft_size;		/* Log 2 of page table size */
 
 #endif /* __ASSEMBLY__ */
 
diff -Nru a/include/asm-ppc64/pci-bridge.h b/include/asm-ppc64/pci-bridge.h
--- a/include/asm-ppc64/pci-bridge.h	2005-01-10 20:11:16 -08:00
+++ b/include/asm-ppc64/pci-bridge.h	2005-01-10 20:11:16 -08:00
@@ -79,6 +79,14 @@
 		return fetch_dev_dn(dev);
 }
 
+static inline struct device_node *pci_bus_to_OF_node(struct pci_bus *bus)
+{
+	if (bus->self)
+		return pci_device_to_OF_node(bus->self);
+	else
+		return bus->sysdata; /* Must be root bus (PHB) */
+}
+
 extern void pci_process_bridge_OF_ranges(struct pci_controller *hose,
 					 struct device_node *dev);
 
diff -Nru a/include/asm-ppc64/pgtable.h b/include/asm-ppc64/pgtable.h
--- a/include/asm-ppc64/pgtable.h	2005-01-10 20:11:22 -08:00
+++ b/include/asm-ppc64/pgtable.h	2005-01-10 20:11:22 -08:00
@@ -1,6 +1,8 @@
 #ifndef _PPC64_PGTABLE_H
 #define _PPC64_PGTABLE_H
 
+#include <asm-generic/4level-fixup.h>
+
 /*
  * This file contains the functions and defines necessary to modify and use
  * the ppc64 hashed page table.
diff -Nru a/include/asm-ppc64/ppcdebug.h b/include/asm-ppc64/ppcdebug.h
--- a/include/asm-ppc64/ppcdebug.h	2005-01-10 20:11:24 -08:00
+++ b/include/asm-ppc64/ppcdebug.h	2005-01-10 20:11:24 -08:00
@@ -16,13 +16,14 @@
  ********************************************************************/
 
 #include <linux/config.h>
+#include <linux/types.h>
 #include <asm/udbg.h>
 #include <stdarg.h>
 
 #define PPCDBG_BITVAL(X)     ((1UL)<<((unsigned long)(X)))
 
 /* Defined below are the bit positions of various debug flags in the
- * debug_switch variable (defined in naca.h).
+ * ppc64_debug_switch variable.
  * -- When adding new values, please enter them into trace names below -- 
  *
  * Values 62 & 63 can be used to stress the hardware page table management
@@ -63,6 +64,8 @@
 /* #define PPC_DEBUG_DEFAULT    PPCDBG_ALL        */
 
 #define PPCDBG_NUM_FLAGS     64
+
+extern u64 ppc64_debug_switch;
 
 #ifdef WANT_PPCDBG_TAB
 /* A table of debug switch names to allow name lookup in xmon 
diff -Nru a/include/asm-ppc64/processor.h b/include/asm-ppc64/processor.h
--- a/include/asm-ppc64/processor.h	2005-01-10 20:11:16 -08:00
+++ b/include/asm-ppc64/processor.h	2005-01-10 20:11:16 -08:00
@@ -19,6 +19,7 @@
 #endif
 #include <asm/ptrace.h>
 #include <asm/types.h>
+#include <asm/systemcfg.h>
 
 /* Machine State Register (MSR) Fields */
 #define MSR_SF_LG	63              /* Enable 64 bit mode */
@@ -44,6 +45,7 @@
 #define MSR_DR_LG	4 		/* Data Relocate */
 #define MSR_PE_LG	3		/* Protection Enable */
 #define MSR_PX_LG	2		/* Protection Exclusive Mode */
+#define MSR_PMM_LG	2		/* Performance monitor */
 #define MSR_RI_LG	1		/* Recoverable Exception */
 #define MSR_LE_LG	0 		/* Little Endian */
 
@@ -76,6 +78,7 @@
 #define MSR_DR		__MASK(MSR_DR_LG)	/* Data Relocate */
 #define MSR_PE		__MASK(MSR_PE_LG)	/* Protection Enable */
 #define MSR_PX		__MASK(MSR_PX_LG)	/* Protection Exclusive Mode */
+#define MSR_PMM		__MASK(MSR_PMM_LG)	/* Performance monitor */
 #define MSR_RI		__MASK(MSR_RI_LG)	/* Recoverable Exception */
 #define MSR_LE		__MASK(MSR_LE_LG)	/* Little Endian */
 
@@ -305,6 +308,9 @@
 #define SPRN_SIAR	780
 #define SPRN_SDAR	781
 #define SPRN_MMCRA	786
+#define   MMCRA_SIHV	0x10000000UL /* state of MSR HV when SIAR set */
+#define   MMCRA_SIPR	0x08000000UL /* state of MSR PR when SIAR set */
+#define   MMCRA_SAMPLE_ENABLE 0x00000001UL /* enable sampling */
 #define SPRN_PMC1	787
 #define SPRN_PMC2	788
 #define SPRN_PMC3	789
@@ -314,6 +320,26 @@
 #define SPRN_PMC7	793
 #define SPRN_PMC8	794
 #define SPRN_MMCR0	795
+#define   MMCR0_FC	0x80000000UL /* freeze counters. set to 1 on a perfmon exception */
+#define   MMCR0_FCS	0x40000000UL /* freeze in supervisor state */
+#define   MMCR0_KERNEL_DISABLE MMCR0_FCS
+#define   MMCR0_FCP	0x20000000UL /* freeze in problem state */
+#define   MMCR0_PROBLEM_DISABLE MMCR0_FCP
+#define   MMCR0_FCM1	0x10000000UL /* freeze counters while MSR mark = 1 */
+#define   MMCR0_FCM0	0x08000000UL /* freeze counters while MSR mark = 0 */
+#define   MMCR0_PMXE	0x04000000UL /* performance monitor exception enable */
+#define   MMCR0_FCECE	0x02000000UL /* freeze counters on enabled condition or event */
+/* time base exception enable */
+#define   MMCR0_TBEE	0x00400000UL /* time base exception enable */
+#define   MMCR0_PMC1INTCONTROL	0x00008000UL /* PMC1 count enable*/
+#define   MMCR0_PMCNINTCONTROL	0x00004000UL /* PMCn count enable*/
+#define   MMCR0_TRIGGER	0x00002000UL /* TRIGGER enable */
+#define   MMCR0_PMAO	0x00000080UL /* performance monitor alert has occurred, set to 0 after handling exception */
+#define   MMCR0_SHRFC	0x00000040UL /* SHRre freeze conditions between threads */
+#define   MMCR0_FCTI	0x00000008UL /* freeze counters in tags inactive mode */
+#define   MMCR0_FCTA	0x00000004UL /* freeze counters in tags active mode */
+#define   MMCR0_FCWAIT	0x00000002UL /* freeze counter in WAIT state */
+#define   MMCR0_FCHV	0x00000001UL /* freeze conditions in hypervisor mode */
 #define SPRN_MMCR1	798
 
 /* Short-hand versions for a number of the above SPRNs */
@@ -483,6 +509,7 @@
 #ifdef __KERNEL__
 
 extern int have_of;
+extern u64 ppc64_interrupt_controller;
 
 struct task_struct;
 void start_thread(struct pt_regs *regs, unsigned long fdptr, unsigned long sp);
@@ -493,12 +520,6 @@
 
 /* Create a new kernel thread. */
 extern long kernel_thread(int (*fn)(void *), void *arg, unsigned long flags);
-
-/*
- * Bus types
- */
-#define MCA_bus 0
-#define MCA_bus__is_a_macro /* for versions in ksyms.c */
 
 /* Lazy FPU handling on uni-processor */
 extern struct task_struct *last_task_used_math;
diff -Nru a/include/asm-ppc64/prom.h b/include/asm-ppc64/prom.h
--- a/include/asm-ppc64/prom.h	2005-01-10 20:11:23 -08:00
+++ b/include/asm-ppc64/prom.h	2005-01-10 20:11:23 -08:00
@@ -21,9 +21,6 @@
 #define PTRUNRELOC(x)   ((typeof(x))((unsigned long)(x) + offset))
 #define RELOC(x)        (*PTRRELOC(&(x)))
 
-#define LONG_LSW(X) (((unsigned long)X) & 0xffffffff)
-#define LONG_MSW(X) (((unsigned long)X) >> 32)
-
 /* Definitions used by the flattened device tree */
 #define OF_DT_HEADER		0xd00dfeed	/* 4: version, 4: total size */
 #define OF_DT_BEGIN_NODE	0x1		/* Start node: full name */
@@ -64,8 +61,6 @@
 
 typedef u32 phandle;
 typedef u32 ihandle;
-typedef u32 phandle32;
-typedef u32 ihandle32;
 
 struct address_range {
 	unsigned long space;
@@ -95,13 +90,6 @@
 	unsigned int size;
 };
 
-struct of_tce_table {
-	phandle node;
-	unsigned long base;
-	unsigned long size;
-};
-extern struct of_tce_table of_tce_table[];
-
 struct reg_property {
 	unsigned long address;
 	unsigned long size;
@@ -117,19 +105,6 @@
 	unsigned long size;
 };
 
-struct reg_property_pmac {
-	unsigned int address_hi;
-	unsigned int address_lo;
-	unsigned int size;
-};
-
-struct translation_property {
-	unsigned long virt;
-	unsigned long size;
-	unsigned long phys;
-	unsigned int flags;
-};
-
 struct property {
 	char	*name;
 	int	length;
@@ -160,8 +135,6 @@
 	int	busno;			/* for pci devices */
 	int	bussubno;		/* for pci devices */
 	int	devfn;			/* for pci devices */
-#define DN_STATUS_BIST_FAILED (1<<0)
-	int	status;			/* Current device status (non-zero is bad) */
 	int	eeh_mode;		/* See eeh.h for possible EEH_MODEs */
 	int	eeh_config_addr;
 	struct  pci_controller *phb;	/* for pci devices */
@@ -244,7 +217,6 @@
 /* Other Prototypes */
 extern unsigned long prom_init(unsigned long, unsigned long, unsigned long,
 	unsigned long, unsigned long);
-extern void relocate_nodes(void);
 extern void finish_device_tree(void);
 extern int device_is_compatible(struct device_node *device, const char *);
 extern int machine_is_compatible(const char *compat);
diff -Nru a/include/asm-ppc64/spinlock.h b/include/asm-ppc64/spinlock.h
--- a/include/asm-ppc64/spinlock.h	2005-01-10 20:11:24 -08:00
+++ b/include/asm-ppc64/spinlock.h	2005-01-10 20:11:24 -08:00
@@ -23,10 +23,16 @@
 
 typedef struct {
 	volatile unsigned int lock;
+#ifdef CONFIG_PREEMPT
+	unsigned int break_lock;
+#endif
 } spinlock_t;
 
 typedef struct {
 	volatile signed int lock;
+#ifdef CONFIG_PREEMPT
+	unsigned int break_lock;
+#endif
 } rwlock_t;
 
 #ifdef __KERNEL__
@@ -57,7 +63,7 @@
 
 #if defined(CONFIG_PPC_SPLPAR) || defined(CONFIG_PPC_ISERIES)
 /* We only yield to the hypervisor if we are in shared processor mode */
-#define SHARED_PROCESSOR (get_paca()->lppaca.xSharedProc)
+#define SHARED_PROCESSOR (get_paca()->lppaca.shared_proc)
 extern void __spin_yield(spinlock_t *lock);
 extern void __rw_yield(rwlock_t *lock);
 #else /* SPLPAR || ISERIES */
@@ -215,6 +221,8 @@
 	: "r"(&rw->lock)
 	: "cr0", "memory");
 }
+
+#define _raw_read_trylock(lock) generic_raw_read_trylock(lock)
 
 /*
  * This returns the old value in the lock,
diff -Nru a/include/asm-ppc64/sstep.h b/include/asm-ppc64/sstep.h
--- a/include/asm-ppc64/sstep.h	2005-01-10 20:11:16 -08:00
+++ b/include/asm-ppc64/sstep.h	2005-01-10 20:11:16 -08:00
@@ -9,5 +9,16 @@
 
 struct pt_regs;
 
+/*
+ * We don't allow single-stepping an mtmsrd that would clear
+ * MSR_RI, since that would make the exception unrecoverable.
+ * Since we need to single-step to proceed from a breakpoint,
+ * we don't allow putting a breakpoint on an mtmsrd instruction.
+ * Similarly we don't allow breakpoints on rfid instructions.
+ * These macros tell us if an instruction is a mtmsrd or rfid.
+ */
+#define IS_MTMSRD(instr)	(((instr) & 0xfc0007fe) == 0x7c000164)
+#define IS_RFID(instr)		(((instr) & 0xfc0007fe) == 0x4c000024)
+
 /* Emulate instructions that cause a transfer of control. */
 extern int emulate_step(struct pt_regs *regs, unsigned int instr);
diff -Nru a/include/asm-ppc64/systemcfg.h b/include/asm-ppc64/systemcfg.h
--- a/include/asm-ppc64/systemcfg.h	2005-01-10 20:11:19 -08:00
+++ b/include/asm-ppc64/systemcfg.h	2005-01-10 20:11:19 -08:00
@@ -15,14 +15,6 @@
  * End Change Activity 
  */
 
-
-#ifndef __KERNEL__
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/mman.h>
-#include <linux/types.h>
-#endif
-
 /*
  * If the major version changes we are incompatible.
  * Minor version changes are a hint.
@@ -50,10 +42,11 @@
 	__u64 tb_update_count;		/* Timebase atomicity ctr	0x50 */
 	__u32 tz_minuteswest;		/* Minutes west of Greenwich	0x58 */
 	__u32 tz_dsttime;		/* Type of dst correction	0x5C */
-	__u32 dCacheL1Size;		/* L1 d-cache size		0x60 */
-	__u32 dCacheL1LineSize;		/* L1 d-cache line size		0x64 */
-	__u32 iCacheL1Size;		/* L1 i-cache size		0x68 */
-	__u32 iCacheL1LineSize;		/* L1 i-cache line size		0x6C */
+	/* next four are no longer used except to be exported to /proc */
+	__u32 dcache_size;		/* L1 d-cache size		0x60 */
+	__u32 dcache_line_size;		/* L1 d-cache line size		0x64 */
+	__u32 icache_size;		/* L1 i-cache size		0x68 */
+	__u32 icache_line_size;		/* L1 i-cache line size		0x6C */
 	__u8  reserved0[3984];		/* Reserve rest of page		0x70 */
 };
 
diff -Nru a/include/asm-ppc64/time.h b/include/asm-ppc64/time.h
--- a/include/asm-ppc64/time.h	2005-01-10 20:11:18 -08:00
+++ b/include/asm-ppc64/time.h	2005-01-10 20:11:18 -08:00
@@ -78,8 +78,8 @@
 	struct paca_struct *lpaca = get_paca();
 	int cur_dec;
 
-	if (lpaca->lppaca.xSharedProc) {
-		lpaca->lppaca.xVirtualDecr = val;
+	if (lpaca->lppaca.shared_proc) {
+		lpaca->lppaca.virtual_decr = val;
 		cur_dec = get_dec();
 		if (cur_dec > val)
 			HvCall_setVirtualDecr();
diff -Nru a/include/asm-ppc64/topology.h b/include/asm-ppc64/topology.h
--- a/include/asm-ppc64/topology.h	2005-01-10 20:11:23 -08:00
+++ b/include/asm-ppc64/topology.h	2005-01-10 20:11:23 -08:00
@@ -46,11 +46,13 @@
 	.max_interval		= 32,			\
 	.busy_factor		= 32,			\
 	.imbalance_pct		= 125,			\
-	.cache_hot_time		= (10*1000),		\
+	.cache_hot_time		= (10*1000000),		\
 	.cache_nice_tries	= 1,			\
 	.per_cpu_gain		= 100,			\
 	.flags			= SD_LOAD_BALANCE	\
 				| SD_BALANCE_EXEC	\
+				| SD_BALANCE_NEWIDLE	\
+				| SD_WAKE_IDLE		\
 				| SD_WAKE_BALANCE,	\
 	.last_balance		= jiffies,		\
 	.balance_interval	= 1,			\
diff -Nru a/include/asm-ppc64/unistd.h b/include/asm-ppc64/unistd.h
--- a/include/asm-ppc64/unistd.h	2005-01-10 20:11:15 -08:00
+++ b/include/asm-ppc64/unistd.h	2005-01-10 20:11:15 -08:00
@@ -431,6 +431,7 @@
 #define __ARCH_WANT_SYS_SGETMASK
 #define __ARCH_WANT_SYS_SIGNAL
 #define __ARCH_WANT_SYS_TIME
+#define __ARCH_WANT_COMPAT_SYS_TIME
 #define __ARCH_WANT_SYS_UTIME
 #define __ARCH_WANT_SYS_WAITPID
 #define __ARCH_WANT_SYS_SOCKETCALL
diff -Nru a/include/asm-s390/cio.h b/include/asm-s390/cio.h
--- a/include/asm-s390/cio.h	2005-01-10 20:11:22 -08:00
+++ b/include/asm-s390/cio.h	2005-01-10 20:11:22 -08:00
@@ -274,6 +274,8 @@
 
 extern void wait_cons_dev(void);
 
+extern void clear_all_subchannels(void);
+
 #endif
 
 #endif
diff -Nru a/include/asm-s390/hardirq.h b/include/asm-s390/hardirq.h
--- a/include/asm-s390/hardirq.h	2005-01-10 20:11:23 -08:00
+++ b/include/asm-s390/hardirq.h	2005-01-10 20:11:23 -08:00
@@ -37,24 +37,10 @@
 }
 
 #define __ARCH_IRQ_STAT
+#define __ARCH_HAS_DO_SOFTIRQ
 
 #define HARDIRQ_BITS	8
 
 extern void account_ticks(struct pt_regs *);
-
-#define __ARCH_HAS_DO_SOFTIRQ
-
-#define irq_enter()							\
-do {									\
-	(preempt_count() += HARDIRQ_OFFSET);				\
-} while(0)
-#define irq_exit()							\
-do {									\
-	preempt_count() -= IRQ_EXIT_OFFSET;				\
-	if (!in_interrupt() && local_softirq_pending())			\
-		/* Use the async. stack for softirq */			\
-		do_softirq();						\
-	preempt_enable_no_resched();					\
-} while (0)
 
 #endif /* __ASM_HARDIRQ_H */
diff -Nru a/include/asm-s390/pgtable.h b/include/asm-s390/pgtable.h
--- a/include/asm-s390/pgtable.h	2005-01-10 20:11:21 -08:00
+++ b/include/asm-s390/pgtable.h	2005-01-10 20:11:21 -08:00
@@ -13,6 +13,8 @@
 #ifndef _ASM_S390_PGTABLE_H
 #define _ASM_S390_PGTABLE_H
 
+#include <asm-generic/4level-fixup.h>
+
 /*
  * The Linux memory management assumes a three-level page table setup. For
  * s390 31 bit we "fold" the mid level into the top-level page table, so
@@ -416,6 +418,14 @@
 	return 0;
 }
 
+extern inline int pte_read(pte_t pte)
+{
+	/* All pages are readable since we don't use the fetch
+	 * protection bit in the storage key.
+	 */
+	return 1;
+}
+
 /*
  * pgd/pmd/pte modification functions
  */
@@ -679,7 +689,7 @@
 #define pgd_page_kernel(pgd) (pgd_val(pgd) & PAGE_MASK)
 
 /* to find an entry in a page-table-directory */
-#define pgd_index(address) ((address >> PGDIR_SHIFT) & (PTRS_PER_PGD-1))
+#define pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD-1))
 #define pgd_offset(mm, address) ((mm)->pgd+pgd_index(address))
 
 /* to find an entry in a kernel page-table-directory */
diff -Nru a/include/asm-s390/spinlock.h b/include/asm-s390/spinlock.h
--- a/include/asm-s390/spinlock.h	2005-01-10 20:11:23 -08:00
+++ b/include/asm-s390/spinlock.h	2005-01-10 20:11:23 -08:00
@@ -36,6 +36,9 @@
 
 typedef struct {
 	volatile unsigned int lock;
+#ifdef CONFIG_PREEMPT
+	unsigned int break_lock;
+#endif
 } __attribute__ ((aligned (4))) spinlock_t;
 
 #define SPIN_LOCK_UNLOCKED (spinlock_t) { 0 }
@@ -105,6 +108,9 @@
 typedef struct {
 	volatile unsigned long lock;
 	volatile unsigned long owner_pc;
+#ifdef CONFIG_PREEMPT
+	unsigned int break_lock;
+#endif
 } rwlock_t;
 
 #define RW_LOCK_UNLOCKED (rwlock_t) { 0, 0 }
@@ -210,6 +216,8 @@
 		     : "a" (&(rw)->lock), "i" (__DIAG44_OPERAND), \
 		       "m" ((rw)->lock) : "2", "3", "cc", "memory" )
 #endif /* __s390x__ */
+
+#define _raw_read_trylock(lock) generic_raw_read_trylock(lock)
 
 extern inline int _raw_write_trylock(rwlock_t *rw)
 {
diff -Nru a/include/asm-s390/unistd.h b/include/asm-s390/unistd.h
--- a/include/asm-s390/unistd.h	2005-01-10 20:11:24 -08:00
+++ b/include/asm-s390/unistd.h	2005-01-10 20:11:24 -08:00
@@ -520,7 +520,6 @@
 #define __ARCH_WANT_SYS_GETHOSTNAME
 #define __ARCH_WANT_SYS_PAUSE
 #define __ARCH_WANT_SYS_SIGNAL
-#define __ARCH_WANT_SYS_TIME
 #define __ARCH_WANT_SYS_UTIME
 #define __ARCH_WANT_SYS_SOCKETCALL
 #define __ARCH_WANT_SYS_FADVISE64
@@ -532,9 +531,11 @@
 #define __ARCH_WANT_SYS_SIGPENDING
 #define __ARCH_WANT_SYS_SIGPROCMASK
 #define __ARCH_WANT_SYS_RT_SIGACTION
-# ifndef CONFIG_ARCH_S390X
+# ifdef CONFIG_ARCH_S390_31
 #   define __ARCH_WANT_STAT64
+#   define __ARCH_WANT_SYS_TIME
 # endif
+# define __ARCH_WANT_COMPAT_SYS_TIME
 #endif
 
 #ifdef __KERNEL_SYSCALLS__
diff -Nru a/include/asm-sh/hardirq.h b/include/asm-sh/hardirq.h
--- a/include/asm-sh/hardirq.h	2005-01-10 20:11:18 -08:00
+++ b/include/asm-sh/hardirq.h	2005-01-10 20:11:18 -08:00
@@ -23,16 +23,4 @@
 # error HARDIRQ_BITS is too low!
 #endif
 
-#define nmi_enter()		(irq_enter())
-#define nmi_exit()		(preempt_count() -= HARDIRQ_OFFSET)
-
-#define irq_enter()		(preempt_count() += HARDIRQ_OFFSET)
-#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)
-
 #endif /* __ASM_SH_HARDIRQ_H */
diff -Nru a/include/asm-sh/mpc1211/keyboard.h b/include/asm-sh/mpc1211/keyboard.h
--- a/include/asm-sh/mpc1211/keyboard.h	2005-01-10 20:11:19 -08:00
+++ b/include/asm-sh/mpc1211/keyboard.h	2005-01-10 20:11:19 -08:00
@@ -57,7 +57,7 @@
 #define AUX_IRQ 12
 
 #define aux_request_irq(hand, dev_id)					\
-	request_irq(AUX_IRQ, hand, SA_SHIRQ, "PS/2 Mouse", dev_id)
+	request_irq(AUX_IRQ, hand, SA_SHIRQ, "PS2 Mouse", dev_id)
 
 #define aux_free_irq(dev_id) free_irq(AUX_IRQ, dev_id)
 
diff -Nru a/include/asm-sh/pgalloc.h b/include/asm-sh/pgalloc.h
--- a/include/asm-sh/pgalloc.h	2005-01-10 20:11:19 -08:00
+++ b/include/asm-sh/pgalloc.h	2005-01-10 20:11:19 -08:00
@@ -44,9 +44,7 @@
 {
 	pte_t *pte;
 
-	pte = (pte_t *) __get_free_page(GFP_KERNEL | __GFP_REPEAT);
-	if (pte)
-		clear_page(pte);
+	pte = (pte_t *) __get_free_page(GFP_KERNEL | __GFP_REPEAT | __GFP_ZERO);
 
 	return pte;
 }
@@ -56,9 +54,7 @@
 {
 	struct page *pte;
 
-   	pte = alloc_pages(GFP_KERNEL|__GFP_REPEAT, 0);
-	if (pte)
-		clear_page(page_address(pte));
+   	pte = alloc_pages(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO, 0);
 
 	return pte;
 }
diff -Nru a/include/asm-sh/pgtable.h b/include/asm-sh/pgtable.h
--- a/include/asm-sh/pgtable.h	2005-01-10 20:11:23 -08:00
+++ b/include/asm-sh/pgtable.h	2005-01-10 20:11:23 -08:00
@@ -1,6 +1,8 @@
 #ifndef __ASM_SH_PGTABLE_H
 #define __ASM_SH_PGTABLE_H
 
+#include <asm-generic/4level-fixup.h>
+
 /*
  * Copyright (C) 1999 Niibe Yutaka
  * Copyright (C) 2002, 2003, 2004 Paul Mundt
diff -Nru a/include/asm-sh/processor.h b/include/asm-sh/processor.h
--- a/include/asm-sh/processor.h	2005-01-10 20:11:18 -08:00
+++ b/include/asm-sh/processor.h	2005-01-10 20:11:18 -08:00
@@ -191,12 +191,6 @@
  */
 extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
 
-/*
- * Bus types
- */
-#define MCA_bus 0
-#define MCA_bus__is_a_macro /* for versions in ksyms.c */
-
 /* Copy and release all segment info associated with a VM */
 #define copy_segments(p, mm)	do { } while(0)
 #define release_segments(mm)	do { } while(0)
diff -Nru a/include/asm-sh/spinlock.h b/include/asm-sh/spinlock.h
--- a/include/asm-sh/spinlock.h	2005-01-10 20:11:17 -08:00
+++ b/include/asm-sh/spinlock.h	2005-01-10 20:11:17 -08:00
@@ -17,6 +17,9 @@
  */
 typedef struct {
 	volatile unsigned long lock;
+#ifdef CONFIG_PREEMPT
+	unsigned int break_lock;
+#endif
 } spinlock_t;
 
 #define SPIN_LOCK_UNLOCKED	(spinlock_t) { 0 }
@@ -68,6 +71,9 @@
 typedef struct {
 	spinlock_t lock;
 	atomic_t counter;
+#ifdef CONFIG_PREEMPT
+	unsigned int break_lock;
+#endif
 } rwlock_t;
 
 #define RW_LOCK_BIAS		0x01000000
@@ -104,6 +110,8 @@
 	atomic_set(&rw->counter, 0);
 	_raw_spin_unlock(&rw->lock);
 }
+
+#define _raw_read_trylock(lock) generic_raw_read_trylock(lock)
 
 static inline int _raw_write_trylock(rwlock_t *rw)
 {
diff -Nru a/include/asm-sh64/keyboard.h b/include/asm-sh64/keyboard.h
--- a/include/asm-sh64/keyboard.h	2005-01-10 20:11:17 -08:00
+++ b/include/asm-sh64/keyboard.h	2005-01-10 20:11:17 -08:00
@@ -65,7 +65,7 @@
 #endif
 
 #define aux_request_irq(hand, dev_id)					\
-	request_irq(AUX_IRQ, hand, SA_SHIRQ, "PS/2 Mouse", dev_id)
+	request_irq(AUX_IRQ, hand, SA_SHIRQ, "PS2 Mouse", dev_id)
 
 #define aux_free_irq(dev_id) free_irq(AUX_IRQ, dev_id)
 
diff -Nru a/include/asm-sh64/pgalloc.h b/include/asm-sh64/pgalloc.h
--- a/include/asm-sh64/pgalloc.h	2005-01-10 20:11:16 -08:00
+++ b/include/asm-sh64/pgalloc.h	2005-01-10 20:11:16 -08:00
@@ -112,9 +112,7 @@
 {
 	pte_t *pte;
 
-	pte = (pte_t *)__get_free_page(GFP_KERNEL | __GFP_REPEAT);
-	if (pte)
-		clear_page(pte);
+	pte = (pte_t *)__get_free_page(GFP_KERNEL | __GFP_REPEAT|__GFP_ZERO);
 
 	return pte;
 }
@@ -123,9 +121,7 @@
 {
 	struct page *pte;
 
-	pte = alloc_pages(GFP_KERNEL|__GFP_REPEAT, 0);
-	if (pte)
-		clear_page(page_address(pte));
+	pte = alloc_pages(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO, 0);
 
 	return pte;
 }
@@ -150,9 +146,7 @@
 static __inline__ pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address)
 {
 	pmd_t *pmd;
-	pmd = (pmd_t *) __get_free_page(GFP_KERNEL|__GFP_REPEAT);
-	if (pmd)
-		clear_page(pmd);
+	pmd = (pmd_t *) __get_free_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO);
 	return pmd;
 }
 
diff -Nru a/include/asm-sh64/pgtable.h b/include/asm-sh64/pgtable.h
--- a/include/asm-sh64/pgtable.h	2005-01-10 20:11:21 -08:00
+++ b/include/asm-sh64/pgtable.h	2005-01-10 20:11:21 -08:00
@@ -1,6 +1,8 @@
 #ifndef __ASM_SH64_PGTABLE_H
 #define __ASM_SH64_PGTABLE_H
 
+#include <asm-generic/4level-fixup.h>
+
 /*
  * This file is subject to the terms and conditions of the GNU General Public
  * License.  See the file "COPYING" in the main directory of this archive
diff -Nru a/include/asm-sh64/processor.h b/include/asm-sh64/processor.h
--- a/include/asm-sh64/processor.h	2005-01-10 20:11:15 -08:00
+++ b/include/asm-sh64/processor.h	2005-01-10 20:11:15 -08:00
@@ -218,12 +218,6 @@
  */
 extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
 
-/*
- * Bus types
- */
-#define MCA_bus 0
-#define MCA_bus__is_a_macro /* for versions in ksyms.c */
-
 
 /* Copy and release all segment info associated with a VM */
 #define copy_segments(p, mm)	do { } while (0)
diff -Nru a/include/asm-sparc/asi.h b/include/asm-sparc/asi.h
--- a/include/asm-sparc/asi.h	2005-01-10 20:11:18 -08:00
+++ b/include/asm-sparc/asi.h	2005-01-10 20:11:18 -08:00
@@ -104,7 +104,8 @@
 #define ASI_M_DCDR         0x39   /* Data Cache Diagnostics Register rw, ss */
 
 #define ASI_M_VIKING_TMP1  0x40	  /* Emulation temporary 1 on Viking */
-#define ASI_M_VIKING_TMP2  0x41	  /* Emulation temporary 2 on Viking */
+/* only available on SuperSparc I */
+/* #define ASI_M_VIKING_TMP2  0x41 */  /* Emulation temporary 2 on Viking */
 
 #define ASI_M_ACTION       0x4c   /* Breakpoint Action Register (GNU/Viking) */
 
diff -Nru a/include/asm-sparc/bitext.h b/include/asm-sparc/bitext.h
--- a/include/asm-sparc/bitext.h	2005-01-10 20:11:21 -08:00
+++ b/include/asm-sparc/bitext.h	2005-01-10 20:11:21 -08:00
@@ -17,6 +17,7 @@
 	int last_off;
 	int last_size;
 	int first_free;
+	int num_colors;
 };
 
 extern int bit_map_string_get(struct bit_map *t, int len, int align);
diff -Nru a/include/asm-sparc/floppy.h b/include/asm-sparc/floppy.h
--- a/include/asm-sparc/floppy.h	2005-01-10 20:11:15 -08:00
+++ b/include/asm-sparc/floppy.h	2005-01-10 20:11:15 -08:00
@@ -264,7 +264,7 @@
 }
 
 /* Our low-level entry point in arch/sparc/kernel/entry.S */
-extern void floppy_hardint(int irq, void *unused, struct pt_regs *regs);
+irqreturn_t floppy_hardint(int irq, void *unused, struct pt_regs *regs);
 
 static int sun_fd_request_irq(void)
 {
diff -Nru a/include/asm-sparc/hardirq.h b/include/asm-sparc/hardirq.h
--- a/include/asm-sparc/hardirq.h	2005-01-10 20:11:23 -08:00
+++ b/include/asm-sparc/hardirq.h	2005-01-10 20:11:23 -08:00
@@ -21,13 +21,4 @@
 
 #define HARDIRQ_BITS    8
 
-#define irq_enter()             (preempt_count() += HARDIRQ_OFFSET)
-#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)
-
 #endif /* __SPARC_HARDIRQ_H */
diff -Nru a/include/asm-sparc/highmem.h b/include/asm-sparc/highmem.h
--- a/include/asm-sparc/highmem.h	2005-01-10 20:11:23 -08:00
+++ b/include/asm-sparc/highmem.h	2005-01-10 20:11:23 -08:00
@@ -57,7 +57,7 @@
 static inline void *kmap(struct page *page)
 {
 	BUG_ON(in_interrupt());
-	if (page < highmem_start_page)
+	if (!PageHighMem(page))
 		return page_address(page);
 	return kmap_high(page);
 }
@@ -65,7 +65,7 @@
 static inline void kunmap(struct page *page)
 {
 	BUG_ON(in_interrupt());
-	if (page < highmem_start_page)
+	if (!PageHighMem(page))
 		return;
 	kunmap_high(page);
 }
diff -Nru a/include/asm-sparc/io.h b/include/asm-sparc/io.h
--- a/include/asm-sparc/io.h	2005-01-10 20:11:16 -08:00
+++ b/include/asm-sparc/io.h	2005-01-10 20:11:16 -08:00
@@ -134,12 +134,12 @@
 #define inl_p(__addr)		inl(__addr)
 #define outl_p(__l, __addr)	outl(__l, __addr)
 
-extern void outsb(unsigned long addr, const void *src, unsigned long cnt);
-extern void outsw(unsigned long addr, const void *src, unsigned long cnt);
-extern void outsl(unsigned long addr, const void *src, unsigned long cnt);
-extern void insb(unsigned long addr, void *dst, unsigned long count);
-extern void insw(unsigned long addr, void *dst, unsigned long count);
-extern void insl(unsigned long addr, void *dst, unsigned long count);
+void outsb(void * __iomem addr, const void *src, unsigned long cnt);
+void outsw(void * __iomem addr, const void *src, unsigned long cnt);
+void outsl(void * __iomem addr, const void *src, unsigned long cnt);
+void insb(void * __iomem addr, void *dst, unsigned long count);
+void insw(void * __iomem addr, void *dst, unsigned long count);
+void insl(void * __iomem addr, void *dst, unsigned long count);
 
 #define IO_SPACE_LIMIT 0xffffffff
 
diff -Nru a/include/asm-sparc/pcic.h b/include/asm-sparc/pcic.h
--- a/include/asm-sparc/pcic.h	2005-01-10 20:11:18 -08:00
+++ b/include/asm-sparc/pcic.h	2005-01-10 20:11:18 -08:00
@@ -16,10 +16,10 @@
 #include <asm/pbm.h>
 
 struct linux_pcic {
-        unsigned long           pcic_regs;
+        void * __iomem          pcic_regs;
         unsigned long           pcic_io;
-        unsigned long           pcic_config_space_addr;
-        unsigned long           pcic_config_space_data;
+        void * __iomem          pcic_config_space_addr;
+        void * __iomem          pcic_config_space_data;
 	struct resource		pcic_res_regs;
 	struct resource		pcic_res_io;
 	struct resource		pcic_res_cfg_addr;
diff -Nru a/include/asm-sparc/pgtable.h b/include/asm-sparc/pgtable.h
--- a/include/asm-sparc/pgtable.h	2005-01-10 20:11:19 -08:00
+++ b/include/asm-sparc/pgtable.h	2005-01-10 20:11:19 -08:00
@@ -9,6 +9,8 @@
  *  Copyright (C) 1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
  */
 
+#include <asm-generic/4level-fixup.h>
+
 #include <linux/config.h>
 #include <linux/spinlock.h>
 #include <linux/swap.h>
diff -Nru a/include/asm-sparc/processor.h b/include/asm-sparc/processor.h
--- a/include/asm-sparc/processor.h	2005-01-10 20:11:23 -08:00
+++ b/include/asm-sparc/processor.h	2005-01-10 20:11:23 -08:00
@@ -24,12 +24,6 @@
 #include <asm/page.h>
 
 /*
- * Bus types
- */
-#define MCA_bus 0
-#define MCA_bus__is_a_macro /* for versions in ksyms.c */
-
-/*
  * The sparc has no problems with write protection
  */
 #define wp_works_ok 1
diff -Nru a/include/asm-sparc/sbus.h b/include/asm-sparc/sbus.h
--- a/include/asm-sparc/sbus.h	2005-01-10 20:11:16 -08:00
+++ b/include/asm-sparc/sbus.h	2005-01-10 20:11:16 -08:00
@@ -106,6 +106,8 @@
 /* These yield IOMMU mappings in consistent mode. */
 extern void *sbus_alloc_consistent(struct sbus_dev *, long, u32 *dma_addrp);
 extern void sbus_free_consistent(struct sbus_dev *, long, void *, u32);
+void prom_adjust_ranges(struct linux_prom_ranges *, int,
+			struct linux_prom_ranges *, int);
 
 #define SBUS_DMA_BIDIRECTIONAL	DMA_BIDIRECTIONAL
 #define SBUS_DMA_TODEVICE	DMA_TO_DEVICE
diff -Nru a/include/asm-sparc/spinlock.h b/include/asm-sparc/spinlock.h
--- a/include/asm-sparc/spinlock.h	2005-01-10 20:11:21 -08:00
+++ b/include/asm-sparc/spinlock.h	2005-01-10 20:11:21 -08:00
@@ -16,6 +16,9 @@
 struct _spinlock_debug {
 	unsigned char lock;
 	unsigned long owner_pc;
+#ifdef CONFIG_PREEMPT
+	unsigned int break_lock;
+#endif
 };
 typedef struct _spinlock_debug spinlock_t;
 
@@ -36,6 +39,9 @@
 	volatile unsigned int lock;
 	unsigned long owner_pc;
 	unsigned long reader_pc[NR_CPUS];
+#ifdef CONFIG_PREEMPT
+	unsigned int break_lock;
+#endif
 };
 typedef struct _rwlock_debug rwlock_t;
 
@@ -79,8 +85,14 @@
 
 #else /* !CONFIG_DEBUG_SPINLOCK */
 
-typedef unsigned char spinlock_t;
-#define SPIN_LOCK_UNLOCKED	0
+typedef struct {
+	unsigned char lock;
+#ifdef CONFIG_PREEMPT
+	unsigned int break_lock;
+#endif
+} spinlock_t;
+
+#define SPIN_LOCK_UNLOCKED	{ 0, }
 
 #define spin_lock_init(lock)   (*((unsigned char *)(lock)) = 0)
 #define spin_is_locked(lock)    (*((volatile unsigned char *)(lock)) != 0)
@@ -137,7 +149,12 @@
  * XXX This might create some problems with my dual spinlock
  * XXX scheme, deadlocks etc. -DaveM
  */
-typedef struct { volatile unsigned int lock; } rwlock_t;
+typedef struct {
+	volatile unsigned int lock;
+#ifdef CONFIG_PREEMPT
+	unsigned int break_lock;
+#endif
+} rwlock_t;
 
 #define RW_LOCK_UNLOCKED (rwlock_t) { 0 }
 
diff -Nru a/include/asm-sparc/string.h b/include/asm-sparc/string.h
--- a/include/asm-sparc/string.h	2005-01-10 20:11:15 -08:00
+++ b/include/asm-sparc/string.h	2005-01-10 20:11:15 -08:00
@@ -40,6 +40,9 @@
 
 	if(n <= 32) {
 		__builtin_memcpy(to, from, n);
+	} else if (((unsigned int) to & 7) != 0) {
+		/* Destination is not aligned on the double-word boundary */
+		__memcpy(to, from, n);
 	} else {
 		switch(n) {
 		case PAGE_SIZE:
diff -Nru a/include/asm-sparc/unistd.h b/include/asm-sparc/unistd.h
--- a/include/asm-sparc/unistd.h	2005-01-10 20:11:16 -08:00
+++ b/include/asm-sparc/unistd.h	2005-01-10 20:11:16 -08:00
@@ -486,7 +486,6 @@
 static __inline__ _syscall3(int,execve,__const__ char *,file,char **,argv,char **,envp)
 static __inline__ _syscall3(int,open,__const__ char *,file,int,flag,int,mode)
 static __inline__ _syscall1(int,close,int,fd)
-static __inline__ _syscall1(int,_exit,int,exitcode)
 static __inline__ _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options)
 
 #include <linux/linkage.h>
diff -Nru a/include/asm-sparc/winmacro.h b/include/asm-sparc/winmacro.h
--- a/include/asm-sparc/winmacro.h	2005-01-10 20:11:18 -08:00
+++ b/include/asm-sparc/winmacro.h	2005-01-10 20:11:18 -08:00
@@ -112,9 +112,12 @@
 	and      %idreg, 0xc, %idreg; \
 	ld       [%idreg + %dest_reg], %dest_reg;
 
-/* Sliiick. We have a Linux current register :) -jj */
-#define LOAD_CURRENT4D(dest_reg) \
-	lda	 [%g0] ASI_M_VIKING_TMP2, %dest_reg;
+#define LOAD_CURRENT4D(dest_reg, idreg) \
+	lda	 [%g0] ASI_M_VIKING_TMP1, %idreg; \
+	sethi	%hi(C_LABEL(current_set)), %dest_reg; \
+	sll	%idreg, 2, %idreg; \
+	or	%dest_reg, %lo(C_LABEL(current_set)), %dest_reg; \
+	ld	[%idreg + %dest_reg], %dest_reg;
 
 /* Blackbox - take care with this... - check smp4m and smp4d before changing this. */
 #define LOAD_CURRENT(dest_reg, idreg) 					\
diff -Nru a/include/asm-sparc64/hardirq.h b/include/asm-sparc64/hardirq.h
--- a/include/asm-sparc64/hardirq.h	2005-01-10 20:11:21 -08:00
+++ b/include/asm-sparc64/hardirq.h	2005-01-10 20:11:21 -08:00
@@ -20,13 +20,4 @@
 
 #define HARDIRQ_BITS	8
 
-#define irq_enter()		(preempt_count() += HARDIRQ_OFFSET)
-#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)
-
 #endif /* !(__SPARC64_HARDIRQ_H) */
diff -Nru a/include/asm-sparc64/kprobes.h b/include/asm-sparc64/kprobes.h
--- a/include/asm-sparc64/kprobes.h	2005-01-10 20:11:20 -08:00
+++ b/include/asm-sparc64/kprobes.h	2005-01-10 20:11:20 -08:00
@@ -10,6 +10,8 @@
 #define BREAKPOINT_INSTRUCTION_2 0x91d02071 /* ta 0x71 */
 #define MAX_INSN_SIZE 2
 
+#define JPROBE_ENTRY(pentry)	(kprobe_opcode_t *)pentry
+
 /* Architecture specific copy of original instruction*/
 struct arch_specific_insn {
 	/* copy of the original instruction */
diff -Nru a/include/asm-sparc64/pgalloc.h b/include/asm-sparc64/pgalloc.h
--- a/include/asm-sparc64/pgalloc.h	2005-01-10 20:11:22 -08:00
+++ b/include/asm-sparc64/pgalloc.h	2005-01-10 20:11:22 -08:00
@@ -73,10 +73,9 @@
 		struct page *page;
 
 		preempt_enable();
-		page = alloc_page(GFP_KERNEL|__GFP_REPEAT);
+		page = alloc_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO);
 		if (page) {
 			ret = (struct page *)page_address(page);
-			clear_page(ret);
 			page->lru.prev = (void *) 2UL;
 
 			preempt_disable();
diff -Nru a/include/asm-sparc64/pgtable.h b/include/asm-sparc64/pgtable.h
--- a/include/asm-sparc64/pgtable.h	2005-01-10 20:11:15 -08:00
+++ b/include/asm-sparc64/pgtable.h	2005-01-10 20:11:15 -08:00
@@ -12,6 +12,8 @@
  * the SpitFire page tables.
  */
 
+#include <asm-generic/4level-fixup.h>
+
 #include <linux/config.h>
 #include <asm/spitfire.h>
 #include <asm/asi.h>
@@ -313,7 +315,7 @@
 /* Find an entry in the second-level page table.. */
 #define pmd_offset(dir, address)	\
 	((pmd_t *) pgd_page(*(dir)) + \
-	 ((address >> PMD_SHIFT) & (REAL_PTRS_PER_PMD-1)))
+	 (((address) >> PMD_SHIFT) & (REAL_PTRS_PER_PMD-1)))
 
 /* Find an entry in the third-level page table.. */
 #define pte_index(dir, address)	\
diff -Nru a/include/asm-sparc64/processor.h b/include/asm-sparc64/processor.h
--- a/include/asm-sparc64/processor.h	2005-01-10 20:11:15 -08:00
+++ b/include/asm-sparc64/processor.h	2005-01-10 20:11:15 -08:00
@@ -21,10 +21,6 @@
 #include <asm/segment.h>
 #include <asm/page.h>
 
-/* Bus types */
-#define MCA_bus 0
-#define MCA_bus__is_a_macro /* for versions in ksyms.c */
-
 /* The sparc has no problems with write protection */
 #define wp_works_ok 1
 #define wp_works_ok__is_a_macro /* for versions in ksyms.c */
diff -Nru a/include/asm-sparc64/sections.h b/include/asm-sparc64/sections.h
--- a/include/asm-sparc64/sections.h	2005-01-10 20:11:17 -08:00
+++ b/include/asm-sparc64/sections.h	2005-01-10 20:11:17 -08:00
@@ -4,6 +4,6 @@
 /* nothing to see, move along */
 #include <asm-generic/sections.h>
 
-extern char _end[], _start[];
+extern char _start[];
 
 #endif
diff -Nru a/include/asm-sparc64/siginfo.h b/include/asm-sparc64/siginfo.h
--- a/include/asm-sparc64/siginfo.h	2005-01-10 20:11:21 -08:00
+++ b/include/asm-sparc64/siginfo.h	2005-01-10 20:11:21 -08:00
@@ -24,7 +24,7 @@
 	u32 sival_ptr;
 } sigval_t32;
 
-struct siginfo32;
+struct compat_siginfo;
 
 #endif /* CONFIG_COMPAT */
 
@@ -55,9 +55,6 @@
 		} _sigev_thread;
 	} _sigev_un;
 } sigevent_t32;
-
-extern int copy_siginfo_to_user32(struct siginfo32 __user *to, siginfo_t *from);
-extern int copy_siginfo_to_kernel32(siginfo_t *to, struct siginfo32 __user *from);
 
 #endif /* CONFIG_COMPAT */
 
diff -Nru a/include/asm-sparc64/spinlock.h b/include/asm-sparc64/spinlock.h
--- a/include/asm-sparc64/spinlock.h	2005-01-10 20:11:17 -08:00
+++ b/include/asm-sparc64/spinlock.h	2005-01-10 20:11:17 -08:00
@@ -304,6 +304,8 @@
 
 #endif /* CONFIG_DEBUG_SPINLOCK */
 
+#define _raw_read_trylock(lock) generic_raw_read_trylock(lock)
+
 #endif /* !(__ASSEMBLY__) */
 
 #endif /* !(__SPARC64_SPINLOCK_H) */
diff -Nru a/include/asm-sparc64/unistd.h b/include/asm-sparc64/unistd.h
--- a/include/asm-sparc64/unistd.h	2005-01-10 20:11:16 -08:00
+++ b/include/asm-sparc64/unistd.h	2005-01-10 20:11:16 -08:00
@@ -489,6 +489,7 @@
 #define __ARCH_WANT_SYS_SGETMASK
 #define __ARCH_WANT_SYS_SIGNAL
 #define __ARCH_WANT_SYS_TIME
+#define __ARCH_WANT_COMPAT_SYS_TIME
 #define __ARCH_WANT_SYS_UTIME
 #define __ARCH_WANT_SYS_WAITPID
 #define __ARCH_WANT_SYS_SOCKETCALL
diff -Nru a/include/asm-um/archparam-i386.h b/include/asm-um/archparam-i386.h
--- a/include/asm-um/archparam-i386.h	2005-01-10 20:11:21 -08:00
+++ b/include/asm-um/archparam-i386.h	2005-01-10 20:11:21 -08:00
@@ -10,7 +10,8 @@
 
 #include "user.h"
 
-#define ELF_PLATFORM "i586"
+extern char * elf_aux_platform;
+#define ELF_PLATFORM (elf_aux_platform)
 
 #define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3)
 
@@ -56,15 +57,13 @@
 	pr_reg[16] = PT_REGS_SS(regs);		\
 } while(0);
 
-#if 0 /* Turn this back on when UML has VSYSCALL working */
-#define VSYSCALL_BASE	(__fix_to_virt(FIX_VSYSCALL))
-#else
-#define VSYSCALL_BASE	0
-#endif
-
-#define VSYSCALL_EHDR	((const struct elfhdr *) VSYSCALL_BASE)
-#define VSYSCALL_ENTRY	((unsigned long) &__kernel_vsyscall)
-extern void *__kernel_vsyscall;
+
+extern unsigned long vsyscall_ehdr;
+extern unsigned long vsyscall_end;
+extern unsigned long __kernel_vsyscall;
+
+#define VSYSCALL_BASE vsyscall_ehdr
+#define VSYSCALL_END vsyscall_end
 
 /*
  * Architecture-neutral AT_ values in 0-17, leave some room
@@ -75,8 +74,10 @@
 
 #define ARCH_DLINFO						\
 do {								\
-		NEW_AUX_ENT(AT_SYSINFO,	VSYSCALL_ENTRY);	\
-		NEW_AUX_ENT(AT_SYSINFO_EHDR, VSYSCALL_BASE);	\
+	if ( vsyscall_ehdr ) {					\
+		NEW_AUX_ENT(AT_SYSINFO,	__kernel_vsyscall);	\
+		NEW_AUX_ENT(AT_SYSINFO_EHDR, vsyscall_ehdr);	\
+	}							\
 } while (0)
 
 /*
@@ -87,22 +88,18 @@
  * Dumping its extra ELF program headers includes all the other information
  * a debugger needs to easily find how the vsyscall DSO was being used.
  */
-#if 0
-#define ELF_CORE_EXTRA_PHDRS		(VSYSCALL_EHDR->e_phnum)
-#endif
-
-#undef ELF_CORE_EXTRA_PHDRS
+#define ELF_CORE_EXTRA_PHDRS						      \
+	(vsyscall_ehdr ? (((struct elfhdr *)vsyscall_ehdr)->e_phnum) : 0 )
 
-#if 0
 #define ELF_CORE_WRITE_EXTRA_PHDRS					      \
-do {									      \
-	const struct elf_phdr *const vsyscall_phdrs =			      \
-		(const struct elf_phdr *) (VSYSCALL_BASE		      \
-					   + VSYSCALL_EHDR->e_phoff);	      \
+if ( vsyscall_ehdr ) {							      \
+	const struct elfhdr *const ehdrp = (struct elfhdr *)vsyscall_ehdr;    \
+	const struct elf_phdr *const phdrp =				      \
+		(const struct elf_phdr *) (vsyscall_ehdr + ehdrp->e_phoff);   \
 	int i;								      \
 	Elf32_Off ofs = 0;						      \
-	for (i = 0; i < VSYSCALL_EHDR->e_phnum; ++i) {			      \
-		struct elf_phdr phdr = vsyscall_phdrs[i];		      \
+	for (i = 0; i < ehdrp->e_phnum; ++i) {				      \
+		struct elf_phdr phdr = phdrp[i];			      \
 		if (phdr.p_type == PT_LOAD) {				      \
 			ofs = phdr.p_offset = offset;			      \
 			offset += phdr.p_filesz;			      \
@@ -112,23 +109,19 @@
 		phdr.p_paddr = 0; /* match other core phdrs */		      \
 		DUMP_WRITE(&phdr, sizeof(phdr));			      \
 	}								      \
-} while (0)
+}
 #define ELF_CORE_WRITE_EXTRA_DATA					      \
-do {									      \
-	const struct elf_phdr *const vsyscall_phdrs =			      \
-		(const struct elf_phdr *) (VSYSCALL_BASE		      \
-					   + VSYSCALL_EHDR->e_phoff);	      \
+if ( vsyscall_ehdr ) {							      \
+	const struct elfhdr *const ehdrp = (struct elfhdr *)vsyscall_ehdr;    \
+	const struct elf_phdr *const phdrp =				      \
+		(const struct elf_phdr *) (vsyscall_ehdr + ehdrp->e_phoff);   \
 	int i;								      \
-	for (i = 0; i < VSYSCALL_EHDR->e_phnum; ++i) {			      \
-		if (vsyscall_phdrs[i].p_type == PT_LOAD)		      \
-			DUMP_WRITE((void *) vsyscall_phdrs[i].p_vaddr,	      \
-				   vsyscall_phdrs[i].p_filesz);		      \
+	for (i = 0; i < ehdrp->e_phnum; ++i) {				      \
+		if (phdrp[i].p_type == PT_LOAD)				      \
+			DUMP_WRITE((void *) phdrp[i].p_vaddr,		      \
+				   phdrp[i].p_filesz);			      \
 	}								      \
-} while (0)
-#endif
-
-#undef ELF_CORE_WRITE_EXTRA_PHDRS
-#undef ELF_CORE_WRITE_EXTRA_DATA
+}
 
 #define R_386_NONE	0
 #define R_386_32	1
diff -Nru a/include/asm-um/elf.h b/include/asm-um/elf.h
--- a/include/asm-um/elf.h	2005-01-10 20:11:20 -08:00
+++ b/include/asm-um/elf.h	2005-01-10 20:11:20 -08:00
@@ -3,7 +3,8 @@
 
 #include "asm/archparam.h"
 
-#define ELF_HWCAP (0)
+extern long elf_aux_hwcap;
+#define ELF_HWCAP (elf_aux_hwcap)
 
 #define SET_PERSONALITY(ex, ibcs2) do ; while(0)
 
diff -Nru a/include/asm-um/fixmap.h b/include/asm-um/fixmap.h
--- a/include/asm-um/fixmap.h	2005-01-10 20:11:22 -08:00
+++ b/include/asm-um/fixmap.h	2005-01-10 20:11:22 -08:00
@@ -3,6 +3,7 @@
 
 #include <linux/config.h>
 #include <asm/kmap_types.h>
+#include <asm/archparam.h>
 
 /*
  * Here we define all the compile-time 'special' virtual
@@ -34,7 +35,6 @@
 	FIX_KMAP_BEGIN,	/* reserved pte's for temporary kernel mappings */
 	FIX_KMAP_END = FIX_KMAP_BEGIN+(KM_TYPE_NR*NR_CPUS)-1,
 #endif
-	FIX_VSYSCALL,
 	__end_of_fixed_addresses
 };
 
@@ -68,8 +68,8 @@
  * This is the range that is readable by user mode, and things
  * acting like user mode such as get_user_pages.
  */
-#define FIXADDR_USER_START	(__fix_to_virt(FIX_VSYSCALL))
-#define FIXADDR_USER_END	(FIXADDR_USER_START + PAGE_SIZE)
+#define FIXADDR_USER_START	VSYSCALL_BASE
+#define FIXADDR_USER_END	VSYSCALL_END
 
 extern void __this_fixmap_does_not_exist(void);
 
diff -Nru a/include/asm-um/pgtable.h b/include/asm-um/pgtable.h
--- a/include/asm-um/pgtable.h	2005-01-10 20:11:23 -08:00
+++ b/include/asm-um/pgtable.h	2005-01-10 20:11:23 -08:00
@@ -7,6 +7,8 @@
 #ifndef __UM_PGTABLE_H
 #define __UM_PGTABLE_H
 
+#include <asm-generic/4level-fixup.h>
+
 #include "linux/sched.h"
 #include "asm/processor.h"
 #include "asm/page.h"
@@ -354,6 +356,8 @@
  */
 
 extern pte_t mk_pte(struct page *page, pgprot_t pgprot);
+
+#define pte_set_val(p, phys, prot) pte_val(p) = (phys | pgprot_val(prot))
 
 static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
 {
diff -Nru a/include/asm-um/unistd.h b/include/asm-um/unistd.h
--- a/include/asm-um/unistd.h	2005-01-10 20:11:21 -08:00
+++ b/include/asm-um/unistd.h	2005-01-10 20:11:21 -08:00
@@ -1,5 +1,5 @@
 /* 
- * Copyright (C) 2000, 2001  Jeff Dike (jdike@karaya.com)
+ * Copyright (C) 2000 - 2004  Jeff Dike (jdike@karaya.com)
  * Licensed under the GPL
  */
 
@@ -41,105 +41,29 @@
 #include <linux/compiler.h>
 #include <linux/types.h>
 
-#define KERNEL_CALL(ret_t, sys, args...)	\
-	mm_segment_t fs = get_fs();		\
-	ret_t ret;				\
-	set_fs(KERNEL_DS);			\
-	ret = sys(args);			\
-	set_fs(fs);				\
-	if (ret >= 0)				\
-		return ret;			\
-	errno = -(long)ret;			\
-	return -1;
-
-static inline long open(const char *pathname, int flags, int mode) 
-{
-	KERNEL_CALL(int, sys_open, pathname, flags, mode)
-}
-
-static inline long dup(unsigned int fd)
-{
-	KERNEL_CALL(int, sys_dup, fd);
-}
-
-static inline long close(unsigned int fd)
-{
-	KERNEL_CALL(int, sys_close, fd);
-}
-
-static inline int execve(const char *filename, char *const argv[], 
+static inline int execve(const char *filename, char *const argv[],
 			 char *const envp[])
 {
-	KERNEL_CALL(int, um_execve, filename, argv, envp);
-}
-
-static inline long waitpid(pid_t pid, unsigned int *status, int options)
-{
-	KERNEL_CALL(pid_t, sys_wait4, pid, status, options, NULL)
-}
-
-static inline pid_t setsid(void)
-{
-	KERNEL_CALL(pid_t, sys_setsid)
-}
+	mm_segment_t fs;
+	int ret;
 
-static inline off_t lseek(unsigned int fd, off_t offset, unsigned int whence)
-{
-	KERNEL_CALL(long, sys_lseek, fd, offset, whence)
-}
+	fs = get_fs();
+	set_fs(KERNEL_DS);
+	ret = um_execve(filename, argv, envp);
+	set_fs(fs);
 
-static inline int read(unsigned int fd, char * buf, int len)
-{
-	KERNEL_CALL(int, sys_read, fd, buf, len)
-}
+	if (ret >= 0)
+		return ret;
 
-static inline int write(unsigned int fd, char * buf, int len)
-{
-	KERNEL_CALL(int, sys_write, fd, buf, len)
+	errno = -(long)ret;
+	return -1;
 }
 
-long sys_mmap2(unsigned long addr, unsigned long len,
-		unsigned long prot, unsigned long flags,
-		unsigned long fd, unsigned long pgoff);
-long sys_execve(char *file, char **argv, char **env);
-long sys_clone(unsigned long clone_flags, unsigned long newsp,
-		int *parent_tid, int *child_tid);
-long sys_fork(void);
-long sys_vfork(void);
-long sys_pipe(unsigned long *fildes);
-struct sigaction;
-asmlinkage long sys_rt_sigaction(int sig,
-				const struct sigaction __user *act,
-				struct sigaction __user *oact,
-				size_t sigsetsize);
-
-#endif
-
-/* Save the value of __KERNEL_SYSCALLS__, undefine it, include the underlying
- * arch's unistd.h for the system call numbers, and restore the old 
- * __KERNEL_SYSCALLS__.
- */
+int sys_execve(char *file, char **argv, char **env);
 
-#ifdef __KERNEL_SYSCALLS__
-#define __SAVE_KERNEL_SYSCALLS__ __KERNEL_SYSCALLS__
-#endif
+#endif /* __KERNEL_SYSCALLS__ */
 
 #undef __KERNEL_SYSCALLS__
 #include "asm/arch/unistd.h"
 
-#ifdef __KERNEL_SYSCALLS__
-#define __KERNEL_SYSCALLS__ __SAVE_KERNEL_SYSCALLS__
-#endif
-
-#endif
-
-/*
- * 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-file-style: "linux"
- * End:
- */
+#endif /* _UM_UNISTD_H_*/
diff -Nru a/include/asm-v850/hardirq.h b/include/asm-v850/hardirq.h
--- a/include/asm-v850/hardirq.h	2005-01-10 20:11:16 -08:00
+++ b/include/asm-v850/hardirq.h	2005-01-10 20:11:16 -08:00
@@ -7,8 +7,6 @@
 
 typedef struct {
 	unsigned int __softirq_pending;
-	unsigned int __syscall_count;
-	struct task_struct * __ksoftirqd_task;
 } ____cacheline_aligned irq_cpustat_t;
 
 #include <linux/irq_cpustat.h>	/* Standard mappings for irq_cpustat_t above */
@@ -23,14 +21,5 @@
 #if (1 << HARDIRQ_BITS) < NR_IRQS
 # error HARDIRQ_BITS is too low!
 #endif
-
-#define irq_enter()		(preempt_count() += HARDIRQ_OFFSET)
-#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)
 
 #endif /* __V850_HARDIRQ_H__ */
diff -Nru a/include/asm-v850/pgtable.h b/include/asm-v850/pgtable.h
--- a/include/asm-v850/pgtable.h	2005-01-10 20:11:21 -08:00
+++ b/include/asm-v850/pgtable.h	2005-01-10 20:11:21 -08:00
@@ -1,6 +1,8 @@
 #ifndef __V850_PGTABLE_H__
 #define __V850_PGTABLE_H__
 
+#include <asm-generic/4level-fixup.h>
+
 #include <linux/config.h>
 #include <asm/page.h>
 
diff -Nru a/include/asm-v850/processor.h b/include/asm-v850/processor.h
--- a/include/asm-v850/processor.h	2005-01-10 20:11:17 -08:00
+++ b/include/asm-v850/processor.h	2005-01-10 20:11:17 -08:00
@@ -48,13 +48,6 @@
  */
 #define current_text_addr()	({ __label__ _l; _l: &&_l;})
 
-
-/*
- * Bus types
- */
-#define MCA_bus 0
-#define MCA_bus__is_a_macro /* for versions in ksyms.c */
-
 /* If you change this, you must change the associated assembly-languages
    constants defined below, THREAD_*.  */
 struct thread_struct {
diff -Nru a/include/asm-x86_64/acpi.h b/include/asm-x86_64/acpi.h
--- a/include/asm-x86_64/acpi.h	2005-01-10 20:11:20 -08:00
+++ b/include/asm-x86_64/acpi.h	2005-01-10 20:11:20 -08:00
@@ -131,6 +131,10 @@
 #define acpi_ioapic 0
 #endif /* !CONFIG_ACPI_BOOT */
 
+extern int acpi_numa;
+extern int acpi_scan_nodes(unsigned long start, unsigned long end);
+#define NR_NODE_MEMBLKS (MAX_NUMNODES*2)
+
 #ifdef CONFIG_ACPI_PCI
 static inline void acpi_noirq_set(void) { acpi_noirq = 1; }
 static inline void acpi_disable_pci(void) 
diff -Nru a/include/asm-x86_64/agp.h b/include/asm-x86_64/agp.h
--- a/include/asm-x86_64/agp.h	2005-01-10 20:11:15 -08:00
+++ b/include/asm-x86_64/agp.h	2005-01-10 20:11:15 -08:00
@@ -10,9 +10,8 @@
  * with different cachability attributes for the same page.
  */
 
-#define map_page_into_agp(page) \
-      change_page_attr(page, 1, PAGE_KERNEL_NOCACHE)
-#define unmap_page_from_agp(page) change_page_attr(page, 1, PAGE_KERNEL)
+int map_page_into_agp(struct page *page);
+int unmap_page_from_agp(struct page *page);
 #define flush_agp_mappings() global_flush_tlb()
 
 /* Could use CLFLUSH here if the cpu supports it. But then it would
diff -Nru a/include/asm-x86_64/cacheflush.h b/include/asm-x86_64/cacheflush.h
--- a/include/asm-x86_64/cacheflush.h	2005-01-10 20:11:17 -08:00
+++ b/include/asm-x86_64/cacheflush.h	2005-01-10 20:11:17 -08:00
@@ -25,5 +25,6 @@
 
 void global_flush_tlb(void); 
 int change_page_attr(struct page *page, int numpages, pgprot_t prot);
+int change_page_attr_addr(unsigned long addr, int numpages, pgprot_t prot);
 
 #endif /* _X8664_CACHEFLUSH_H */
diff -Nru a/include/asm-x86_64/calling.h b/include/asm-x86_64/calling.h
--- a/include/asm-x86_64/calling.h	2005-01-10 20:11:20 -08:00
+++ b/include/asm-x86_64/calling.h	2005-01-10 20:11:20 -08:00
@@ -143,22 +143,6 @@
 	RESTORE_ARGS 0,\addskip
 	.endm
 
-	/* push in order ss, rsp, eflags, cs, rip */
-	.macro FAKE_STACK_FRAME child_rip
-	xorl %eax,%eax
-	subq $6*8,%rsp
-	movq %rax,5*8(%rsp)  /* ss */
-	movq %rax,4*8(%rsp)  /* rsp */
-	movq $(1<<9),3*8(%rsp)  /* eflags */
-	movq $__KERNEL_CS,2*8(%rsp) /* cs */
-	movq \child_rip,1*8(%rsp)  /* rip */ 
-	movq %rax,(%rsp)   /* orig_rax */ 
-	.endm
-
-	.macro UNFAKE_STACK_FRAME
-	addq $8*6, %rsp
-	.endm
-
 	.macro icebp
 	.byte 0xf1
 	.endm
diff -Nru a/include/asm-x86_64/cpufeature.h b/include/asm-x86_64/cpufeature.h
--- a/include/asm-x86_64/cpufeature.h	2005-01-10 20:11:19 -08:00
+++ b/include/asm-x86_64/cpufeature.h	2005-01-10 20:11:19 -08:00
@@ -75,7 +75,7 @@
 
 /* More extended AMD flags: CPUID level 0x80000001, ecx, word 5 */
 #define X86_FEATURE_LAHF_LM	(5*32+ 0) /* LAHF/SAHF in long mode */
-#define X86_FEATURE_HTVALID	(5*32+ 1) /* HyperThreading valid, otherwise CMP */
+#define X86_FEATURE_CMP_LEGACY	(5*32+ 1) /* If yes HyperThreading not valid */
 
 #define cpu_has(c, bit)                test_bit(bit, (c)->x86_capability)
 #define boot_cpu_has(bit)      test_bit(bit, boot_cpu_data.x86_capability)
diff -Nru a/include/asm-x86_64/e820.h b/include/asm-x86_64/e820.h
--- a/include/asm-x86_64/e820.h	2005-01-10 20:11:20 -08:00
+++ b/include/asm-x86_64/e820.h	2005-01-10 20:11:20 -08:00
@@ -26,9 +26,6 @@
 
 #define LOWMEMSIZE()	(0x9f000)
 
-#define MAXMEM		(120UL * 1024 * 1024 * 1024 * 1024)  /* 120TB */ 
-
-
 #ifndef __ASSEMBLY__
 struct e820entry {
 	u64 addr;	/* start of memory segment */
diff -Nru a/include/asm-x86_64/hardirq.h b/include/asm-x86_64/hardirq.h
--- a/include/asm-x86_64/hardirq.h	2005-01-10 20:11:17 -08:00
+++ b/include/asm-x86_64/hardirq.h	2005-01-10 20:11:17 -08:00
@@ -21,7 +21,6 @@
  */
 static inline void ack_bad_irq(unsigned int irq)
 {
-#ifdef CONFIG_X86
 	printk("unexpected IRQ trap at vector %02x\n", irq);
 #ifdef CONFIG_X86_LOCAL_APIC
 	/*
@@ -33,7 +32,6 @@
 	 * completely.
 	 */
 	ack_APIC_irq();
-#endif
 #endif
 }
 #endif /* __ASM_HARDIRQ_H */
diff -Nru a/include/asm-x86_64/ia32.h b/include/asm-x86_64/ia32.h
--- a/include/asm-x86_64/ia32.h	2005-01-10 20:11:22 -08:00
+++ b/include/asm-x86_64/ia32.h	2005-01-10 20:11:22 -08:00
@@ -78,7 +78,7 @@
 	unsigned long long	st_ino;
 } __attribute__((packed));
 
-typedef struct siginfo32 {
+typedef struct compat_siginfo{
 	int si_signo;
 	int si_errno;
 	int si_code;
@@ -128,7 +128,7 @@
 			int _fd;
 		} _sigpoll;
 	} _sifields;
-} siginfo_t32;
+} compat_siginfo_t;
 
 struct sigframe32
 {
@@ -145,7 +145,7 @@
         int sig;
         u32 pinfo;
         u32 puc;
-        struct siginfo32 info;
+        compat_siginfo_t info;
         struct ucontext_ia32 uc;
         struct _fpstate_ia32 fpstate;
 };
@@ -165,8 +165,6 @@
 int do_get_thread_area(struct thread_struct *t, struct user_desc __user *info);
 int do_set_thread_area(struct thread_struct *t, struct user_desc __user *info);
 int ia32_child_tls(struct task_struct *p, struct pt_regs *childregs);
-int ia32_copy_siginfo_from_user(siginfo_t *to, siginfo_t32 __user *from);
-int ia32_copy_siginfo_to_user(siginfo_t32 __user *to, siginfo_t *from);
 #endif
 
 #endif /* !CONFIG_IA32_SUPPORT */
diff -Nru a/include/asm-x86_64/io.h b/include/asm-x86_64/io.h
--- a/include/asm-x86_64/io.h	2005-01-10 20:11:18 -08:00
+++ b/include/asm-x86_64/io.h	2005-01-10 20:11:18 -08:00
@@ -175,19 +175,19 @@
  * memory location directly.
  */
 
-static inline __u8 __readb(volatile void __iomem *addr)
+static inline __u8 __readb(const volatile void __iomem *addr)
 {
 	return *(__force volatile __u8 *)addr;
 }
-static inline __u16 __readw(volatile void __iomem *addr)
+static inline __u16 __readw(const volatile void __iomem *addr)
 {
 	return *(__force volatile __u16 *)addr;
 }
-static inline __u32 __readl(volatile void __iomem *addr)
+static inline __u32 __readl(const volatile void __iomem *addr)
 {
 	return *(__force volatile __u32 *)addr;
 }
-static inline __u64 __readq(volatile void __iomem *addr)
+static inline __u64 __readq(const volatile void __iomem *addr)
 {
 	return *(__force volatile __u64 *)addr;
 }
@@ -249,20 +249,20 @@
 #define __raw_writel writel
 #define __raw_writeq writeq
 
-void *__memcpy_fromio(void*,unsigned long,unsigned);
-void *__memcpy_toio(unsigned long,const void*,unsigned);
+void __memcpy_fromio(void*,unsigned long,unsigned);
+void __memcpy_toio(unsigned long,const void*,unsigned);
 
-static inline void *memcpy_fromio(void *to, volatile void __iomem *from, unsigned len)
+static inline void memcpy_fromio(void *to, const volatile void __iomem *from, unsigned len)
 {
-	return __memcpy_fromio(to,(unsigned long)from,len);
+	__memcpy_fromio(to,(unsigned long)from,len);
 }
-static inline void *memcpy_toio(volatile void __iomem *to, const void *from, unsigned len)
+static inline void memcpy_toio(volatile void __iomem *to, const void *from, unsigned len)
 {
-	return __memcpy_toio((unsigned long)to,from,len);
+	__memcpy_toio((unsigned long)to,from,len);
 }
-static inline void *memset_io(volatile void __iomem *a, int b, size_t c)
+static inline void memset_io(volatile void __iomem *a, int b, size_t c)
 {
-	return memset((__force void *)a,b,c);
+	memset((__force void *)a,b,c);
 }
 
 /*
diff -Nru a/include/asm-x86_64/kdebug.h b/include/asm-x86_64/kdebug.h
--- a/include/asm-x86_64/kdebug.h	2005-01-10 20:11:16 -08:00
+++ b/include/asm-x86_64/kdebug.h	2005-01-10 20:11:16 -08:00
@@ -23,6 +23,7 @@
 	DIE_OOPS = 1,
 	DIE_INT3,
 	DIE_DEBUG,
+	DIE_DEBUGSTEP,
 	DIE_PANIC,
 	DIE_NMI,
 	DIE_DIE,
diff -Nru a/include/asm-x86_64/kprobes.h b/include/asm-x86_64/kprobes.h
--- a/include/asm-x86_64/kprobes.h	2005-01-10 20:11:16 -08:00
+++ b/include/asm-x86_64/kprobes.h	2005-01-10 20:11:16 -08:00
@@ -37,6 +37,8 @@
 	? (MAX_STACK_SIZE) \
 	: (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR)))
 
+#define JPROBE_ENTRY(pentry)	(kprobe_opcode_t *)pentry
+
 /* Architecture specific copy of original instruction*/
 struct arch_specific_insn {
 	/* copy of the original instruction */
diff -Nru a/include/asm-x86_64/mce.h b/include/asm-x86_64/mce.h
--- a/include/asm-x86_64/mce.h	2005-01-10 20:11:16 -08:00
+++ b/include/asm-x86_64/mce.h	2005-01-10 20:11:16 -08:00
@@ -64,4 +64,17 @@
 #define MCE_GET_LOG_LEN      _IOR('M', 2, int)
 #define MCE_GETCLEAR_FLAGS   _IOR('M', 3, int)
 
+/* Software defined banks */
+#define MCE_EXTENDED_BANK	128
+#define MCE_THERMAL_BANK	MCE_EXTENDED_BANK + 0
+
+void mce_log(struct mce *m);
+#ifdef CONFIG_X86_MCE_INTEL
+void mce_intel_feature_init(struct cpuinfo_x86 *c);
+#else
+static inline void mce_intel_feature_init(struct cpuinfo_x86 *c)
+{
+}
+#endif
+
 #endif
diff -Nru a/include/asm-x86_64/mmu_context.h b/include/asm-x86_64/mmu_context.h
--- a/include/asm-x86_64/mmu_context.h	2005-01-10 20:11:17 -08:00
+++ b/include/asm-x86_64/mmu_context.h	2005-01-10 20:11:17 -08:00
@@ -40,10 +40,7 @@
 		write_pda(active_mm, next);
 #endif
 		set_bit(cpu, &next->cpu_vm_mask);
-		/* Re-load page tables */
-		*read_pda(level4_pgt) = __pa(next->pgd) | _PAGE_TABLE;
-		__flush_tlb();
-
+		asm volatile("movq %0,%%cr3" :: "r" (__pa(next->pgd)) : "memory");
 		if (unlikely(next->context.ldt != prev->context.ldt)) 
 			load_LDT_nolock(&next->context, cpu);
 	}
diff -Nru a/include/asm-x86_64/mmzone.h b/include/asm-x86_64/mmzone.h
--- a/include/asm-x86_64/mmzone.h	2005-01-10 20:11:22 -08:00
+++ b/include/asm-x86_64/mmzone.h	2005-01-10 20:11:22 -08:00
@@ -12,7 +12,6 @@
 
 #include <asm/smp.h>
 
-#define MAXNODE 8 
 #define NODEMAPSIZE 0xff
 
 /* Simple perfect hash to map physical addresses to node numbers */
@@ -57,9 +56,8 @@
 #define page_to_pfn(page) \
 	(long)(((page) - page_zone(page)->zone_mem_map) + page_zone(page)->zone_start_pfn)
 
-/* AK: !DISCONTIGMEM just forces it to 1. Can't we too? */
-#define pfn_valid(pfn)          ((pfn) < num_physpages)
-
-
+#define pfn_valid(pfn) ((pfn) >= num_physpages ? 0 : \
+			({ u8 nid__ = pfn_to_nid(pfn); \
+			   nid__ != 0xff && (pfn) >= node_start_pfn(nid__) && (pfn) <= node_end_pfn(nid__); }))
 #endif
 #endif
diff -Nru a/include/asm-x86_64/numa.h b/include/asm-x86_64/numa.h
--- a/include/asm-x86_64/numa.h	2005-01-10 20:11:15 -08:00
+++ b/include/asm-x86_64/numa.h	2005-01-10 20:11:15 -08:00
@@ -2,22 +2,18 @@
 #define _ASM_X8664_NUMA_H 1
 
 #include <linux/nodemask.h>
-
-#define MAXNODE 8 
-#define NODEMASK 0xff
+#include <asm/numnodes.h>
 
 struct node { 
 	u64 start,end; 
 };
 
-#define for_all_nodes(x) for ((x) = 0; (x) < numnodes; (x)++) \
-				if (node_online(x))
-
 extern int compute_hash_shift(struct node *nodes);
 
 #define ZONE_ALIGN (1UL << (MAX_ORDER+PAGE_SHIFT))
 
 extern void numa_add_cpu(int cpu);
 extern void numa_init_array(void);
+extern int numa_off;
 
 #endif
diff -Nru a/include/asm-x86_64/numnodes.h b/include/asm-x86_64/numnodes.h
--- a/include/asm-x86_64/numnodes.h	2005-01-10 20:11:18 -08:00
+++ b/include/asm-x86_64/numnodes.h	2005-01-10 20:11:18 -08:00
@@ -3,7 +3,6 @@
 
 #include <linux/config.h>
 
-/* Max 8 Nodes - APIC limit currently */
-#define NODES_SHIFT	3
+#define NODES_SHIFT	6
 
 #endif
diff -Nru a/include/asm-x86_64/page.h b/include/asm-x86_64/page.h
--- a/include/asm-x86_64/page.h	2005-01-10 20:11:16 -08:00
+++ b/include/asm-x86_64/page.h	2005-01-10 20:11:16 -08:00
@@ -43,22 +43,22 @@
  */
 typedef struct { unsigned long pte; } pte_t;
 typedef struct { unsigned long pmd; } pmd_t;
+typedef struct { unsigned long pud; } pud_t;
 typedef struct { unsigned long pgd; } pgd_t;
-typedef struct { unsigned long pml4; } pml4_t;
 #define PTE_MASK	PHYSICAL_PAGE_MASK
 
 typedef struct { unsigned long pgprot; } pgprot_t;
 
 #define pte_val(x)	((x).pte)
 #define pmd_val(x)	((x).pmd)
+#define pud_val(x)	((x).pud)
 #define pgd_val(x)	((x).pgd)
-#define pml4_val(x)	((x).pml4)
 #define pgprot_val(x)	((x).pgprot)
 
 #define __pte(x) ((pte_t) { (x) } )
 #define __pmd(x) ((pmd_t) { (x) } )
+#define __pud(x) ((pud_t) { (x) } )
 #define __pgd(x) ((pgd_t) { (x) } )
-#define __pml4(x) ((pml4_t) { (x) } )
 #define __pgprot(x)	((pgprot_t) { (x) } )
 
 extern unsigned long vm_stack_flags, vm_stack_flags32;
@@ -67,19 +67,19 @@
 
 #define __START_KERNEL		0xffffffff80100000UL
 #define __START_KERNEL_map	0xffffffff80000000UL
-#define __PAGE_OFFSET           0x0000010000000000UL	/* 1 << 40 */
+#define __PAGE_OFFSET           0xffff810000000000UL
 
 #else
 #define __START_KERNEL		0xffffffff80100000
 #define __START_KERNEL_map	0xffffffff80000000
-#define __PAGE_OFFSET           0x0000010000000000	/* 1 << 40 */
+#define __PAGE_OFFSET           0xffff810000000000
 #endif /* !__ASSEMBLY__ */
 
 /* to align the pointer to the (next) page boundary */
 #define PAGE_ALIGN(addr)	(((addr)+PAGE_SIZE-1)&PAGE_MASK)
 
 /* See Documentation/x86_64/mm.txt for a description of the memory map. */
-#define __PHYSICAL_MASK_SHIFT	40
+#define __PHYSICAL_MASK_SHIFT	46
 #define __PHYSICAL_MASK		((1UL << __PHYSICAL_MASK_SHIFT) - 1)
 #define __VIRTUAL_MASK_SHIFT	48
 #define __VIRTUAL_MASK		((1UL << __VIRTUAL_MASK_SHIFT) - 1)
@@ -134,13 +134,7 @@
 	(((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0 ) | \
 	 VM_READ | VM_WRITE | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
 
-#define CONFIG_ARCH_GATE_AREA 1	
-
-#ifndef __ASSEMBLY__
-struct task_struct;
-struct vm_area_struct *get_gate_vma(struct task_struct *tsk);
-int in_gate_area(struct task_struct *task, unsigned long addr);
-#endif
+#define __HAVE_ARCH_GATE_AREA 1	
 
 #endif /* __KERNEL__ */
 
diff -Nru a/include/asm-x86_64/pda.h b/include/asm-x86_64/pda.h
--- a/include/asm-x86_64/pda.h	2005-01-10 20:11:24 -08:00
+++ b/include/asm-x86_64/pda.h	2005-01-10 20:11:24 -08:00
@@ -17,7 +17,6 @@
         int irqcount;		    /* Irq nesting counter. Starts with -1 */  	
 	int cpunumber;		    /* Logical CPU number */
 	char *irqstackptr;	/* top of irqstack */
-	unsigned long volatile *level4_pgt; /* Per CPU top level page table */
 	unsigned int __softirq_pending;
 	unsigned int __nmi_count;	/* number of NMI on this CPUs */
 	struct mm_struct *active_mm;
diff -Nru a/include/asm-x86_64/pgalloc.h b/include/asm-x86_64/pgalloc.h
--- a/include/asm-x86_64/pgalloc.h	2005-01-10 20:11:19 -08:00
+++ b/include/asm-x86_64/pgalloc.h	2005-01-10 20:11:19 -08:00
@@ -9,8 +9,10 @@
 
 #define pmd_populate_kernel(mm, pmd, pte) \
 		set_pmd(pmd, __pmd(_PAGE_TABLE | __pa(pte)))
-#define pgd_populate(mm, pgd, pmd) \
-		set_pgd(pgd, __pgd(_PAGE_TABLE | __pa(pmd)))
+#define pud_populate(mm, pud, pmd) \
+		set_pud(pud, __pud(_PAGE_TABLE | __pa(pmd)))
+#define pgd_populate(mm, pgd, pud) \
+		set_pgd(pgd, __pgd(_PAGE_TABLE | __pa(pud)))
 
 static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, struct page *pte)
 {
@@ -33,12 +35,37 @@
 	return (pmd_t *)get_zeroed_page(GFP_KERNEL|__GFP_REPEAT);
 }
 
-static inline pgd_t *pgd_alloc (struct mm_struct *mm)
+static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long addr)
 {
-	return (pgd_t *)get_zeroed_page(GFP_KERNEL|__GFP_REPEAT);
+	return (pud_t *)get_zeroed_page(GFP_KERNEL|__GFP_REPEAT);
 }
 
-static inline void pgd_free (pgd_t *pgd)
+static inline void pud_free (pud_t *pud)
+{
+	BUG_ON((unsigned long)pud & (PAGE_SIZE-1));
+	free_page((unsigned long)pud);
+}
+
+static inline pgd_t *pgd_alloc(struct mm_struct *mm)
+{
+	unsigned boundary;
+	pgd_t *pgd = (pgd_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT);
+	if (!pgd)
+		return NULL;
+	/*
+	 * Copy kernel pointers in from init.
+	 * Could keep a freelist or slab cache of those because the kernel
+	 * part never changes.
+	 */
+	boundary = pgd_index(__PAGE_OFFSET);
+	memset(pgd, 0, boundary * sizeof(pgd_t));
+	memcpy(pgd + boundary,
+	       init_level4_pgt + boundary,
+	       (PTRS_PER_PGD - boundary) * sizeof(pgd_t));
+	return pgd;
+}
+
+static inline void pgd_free(pgd_t *pgd)
 {
 	BUG_ON((unsigned long)pgd & (PAGE_SIZE-1));
 	free_page((unsigned long)pgd);
@@ -73,5 +100,6 @@
 
 #define __pte_free_tlb(tlb,pte) tlb_remove_page((tlb),(pte))
 #define __pmd_free_tlb(tlb,x)   pmd_free(x)
+#define __pud_free_tlb(tlb,x)   pud_free(x)
 
 #endif /* _X86_64_PGALLOC_H */
diff -Nru a/include/asm-x86_64/pgtable.h b/include/asm-x86_64/pgtable.h
--- a/include/asm-x86_64/pgtable.h	2005-01-10 20:11:21 -08:00
+++ b/include/asm-x86_64/pgtable.h	2005-01-10 20:11:21 -08:00
@@ -4,12 +4,6 @@
 /*
  * This file contains the functions and defines necessary to modify and use
  * the x86-64 page table tree.
- * 
- * x86-64 has a 4 level table setup. Generic linux MM only supports
- * three levels. The fourth level is currently a single static page that
- * is shared by everybody and just contains a pointer to the current
- * three level page setup on the beginning and some kernel mappings at 
- * the end. For more details see Documentation/x86_64/mm.txt
  */
 #include <asm/processor.h>
 #include <asm/fixmap.h>
@@ -17,16 +11,16 @@
 #include <linux/threads.h>
 #include <asm/pda.h>
 
-extern pgd_t level3_kernel_pgt[512];
-extern pgd_t level3_physmem_pgt[512];
-extern pgd_t level3_ident_pgt[512];
+extern pud_t level3_kernel_pgt[512];
+extern pud_t level3_physmem_pgt[512];
+extern pud_t level3_ident_pgt[512];
 extern pmd_t level2_kernel_pgt[512];
-extern pml4_t init_level4_pgt[];
-extern pgd_t boot_vmalloc_pgt[];
+extern pgd_t init_level4_pgt[];
 extern unsigned long __supported_pte_mask;
 
-#define swapper_pg_dir NULL
+#define swapper_pg_dir init_level4_pgt
 
+extern void nonx_setup(const char *str);
 extern void paging_init(void);
 extern void clear_kernel_mapping(unsigned long addr, unsigned long size);
 
@@ -39,16 +33,19 @@
 extern unsigned long empty_zero_page[PAGE_SIZE/sizeof(unsigned long)];
 #define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page))
 
-#define PML4_SHIFT	39
-#define PTRS_PER_PML4	512
-
 /*
  * PGDIR_SHIFT determines what a top-level page table entry can map
  */
-#define PGDIR_SHIFT	30
+#define PGDIR_SHIFT	39
 #define PTRS_PER_PGD	512
 
 /*
+ * 3rd level page
+ */
+#define PUD_SHIFT	30
+#define PTRS_PER_PUD	512
+
+/*
  * PMD_SHIFT determines the size of the area a middle-level
  * page table can map
  */
@@ -64,14 +61,13 @@
 	printk("%s:%d: bad pte %p(%016lx).\n", __FILE__, __LINE__, &(e), pte_val(e))
 #define pmd_ERROR(e) \
 	printk("%s:%d: bad pmd %p(%016lx).\n", __FILE__, __LINE__, &(e), pmd_val(e))
+#define pud_ERROR(e) \
+	printk("%s:%d: bad pud %p(%016lx).\n", __FILE__, __LINE__, &(e), pud_val(e))
 #define pgd_ERROR(e) \
 	printk("%s:%d: bad pgd %p(%016lx).\n", __FILE__, __LINE__, &(e), pgd_val(e))
 
-
-#define pml4_none(x)	(!pml4_val(x))
 #define pgd_none(x)	(!pgd_val(x))
-
-extern inline int pgd_present(pgd_t pgd)	{ return !pgd_none(pgd); }
+#define pud_none(x)	(!pud_val(x))
 
 static inline void set_pte(pte_t *dst, pte_t val)
 {
@@ -83,6 +79,16 @@
         pmd_val(*dst) = pmd_val(val); 
 } 
 
+static inline void set_pud(pud_t *dst, pud_t val)
+{
+	pud_val(*dst) = pud_val(val);
+}
+
+extern inline void pud_clear (pud_t *pud)
+{
+	set_pud(pud, __pud(0));
+}
+
 static inline void set_pgd(pgd_t *dst, pgd_t val)
 {
 	pgd_val(*dst) = pgd_val(val); 
@@ -93,45 +99,30 @@
 	set_pgd(pgd, __pgd(0));
 }
 
-static inline void set_pml4(pml4_t *dst, pml4_t val)
-{
-	pml4_val(*dst) = pml4_val(val); 
-}
-
-#define pgd_page(pgd) \
-((unsigned long) __va(pgd_val(pgd) & PHYSICAL_PAGE_MASK))
+#define pud_page(pud) \
+((unsigned long) __va(pud_val(pud) & PHYSICAL_PAGE_MASK))
 
 #define ptep_get_and_clear(xp)	__pte(xchg(&(xp)->pte, 0))
 #define pte_same(a, b)		((a).pte == (b).pte)
 
-#define PML4_SIZE	(1UL << PML4_SHIFT)
-#define PML4_MASK       (~(PML4_SIZE-1))
 #define PMD_SIZE	(1UL << PMD_SHIFT)
 #define PMD_MASK	(~(PMD_SIZE-1))
+#define PUD_SIZE	(1UL << PUD_SHIFT)
+#define PUD_MASK	(~(PUD_SIZE-1))
 #define PGDIR_SIZE	(1UL << PGDIR_SHIFT)
 #define PGDIR_MASK	(~(PGDIR_SIZE-1))
 
 #define USER_PTRS_PER_PGD	(TASK_SIZE/PGDIR_SIZE)
 #define FIRST_USER_PGD_NR	0
 
-#define USER_PGD_PTRS (PAGE_OFFSET >> PGDIR_SHIFT)
-#define KERNEL_PGD_PTRS (PTRS_PER_PGD-USER_PGD_PTRS)
-
-#define TWOLEVEL_PGDIR_SHIFT	20
-#define BOOT_USER_L4_PTRS 1
-#define BOOT_KERNEL_L4_PTRS 511	/* But we will do it in 4rd level */
-
-
-
 #ifndef __ASSEMBLY__
-#define VMALLOC_START    0xffffff0000000000UL
-#define VMALLOC_END      0xffffff7fffffffffUL
-#define MODULES_VADDR    0xffffffffa0000000UL
-#define MODULES_END      0xffffffffafffffffUL
+#define MAXMEM		 0x3fffffffffffUL
+#define VMALLOC_START    0xffffc20000000000UL
+#define VMALLOC_END      0xffffe1ffffffffffUL
+#define MODULES_VADDR    0xffffffff88000000
+#define MODULES_END      0xfffffffffff00000
 #define MODULES_LEN   (MODULES_END - MODULES_VADDR)
 
-#define IOMAP_START      0xfffffe8000000000UL
-
 #define _PAGE_BIT_PRESENT	0
 #define _PAGE_BIT_RW		1
 #define _PAGE_BIT_USER		2
@@ -222,6 +213,14 @@
        return val & ~(_PAGE_PRESENT | _PAGE_RW | _PAGE_ACCESSED);      
 } 
 
+static inline unsigned long pud_bad(pud_t pud)
+{
+       unsigned long val = pud_val(pud);
+       val &= ~PTE_MASK;
+       val &= ~(_PAGE_USER | _PAGE_DIRTY);
+       return val & ~(_PAGE_PRESENT | _PAGE_RW | _PAGE_ACCESSED);
+}
+
 #define pte_none(x)	(!pte_val(x))
 #define pte_present(x)	(pte_val(x) & (_PAGE_PRESENT | _PAGE_PROTNONE))
 #define pte_clear(xp)	do { set_pte(xp, __pte(0)); } while (0)
@@ -300,54 +299,32 @@
 
 /*
  * Level 4 access.
- * Never use these in the common code.
  */
-#define pml4_page(pml4) ((unsigned long) __va(pml4_val(pml4) & PTE_MASK))
-#define pml4_index(address) ((address >> PML4_SHIFT) & (PTRS_PER_PML4-1))
-#define pml4_offset_k(address) (init_level4_pgt + pml4_index(address))
-#define pml4_present(pml4) (pml4_val(pml4) & _PAGE_PRESENT)
-#define mk_kernel_pml4(address) ((pml4_t){ (address) | _KERNPG_TABLE })
-#define level3_offset_k(dir, address) ((pgd_t *) pml4_page(*(dir)) + pgd_index(address))
+#define pgd_page(pgd) ((unsigned long) __va((unsigned long)pgd_val(pgd) & PTE_MASK))
+#define pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD-1))
+#define pgd_offset(mm, addr) ((mm)->pgd + pgd_index(addr))
+#define pgd_offset_k(address) (init_level4_pgt + pgd_index(address))
+#define pgd_present(pgd) (pgd_val(pgd) & _PAGE_PRESENT)
+#define mk_kernel_pgd(address) ((pgd_t){ (address) | _KERNPG_TABLE })
 
-/* PGD - Level3 access */
+/* PUD - Level3 access */
 /* to find an entry in a page-table-directory. */
-#define pgd_index(address) ((address >> PGDIR_SHIFT) & (PTRS_PER_PGD-1))
-static inline pgd_t *__pgd_offset_k(pgd_t *pgd, unsigned long address)
+#define pud_index(address) (((address) >> PUD_SHIFT) & (PTRS_PER_PUD-1))
+#define pud_offset(pgd, address) ((pud_t *) pgd_page(*(pgd)) + pud_index(address))
+#define pud_offset_k(pgd, addr) pud_offset(pgd, addr)
+#define pud_present(pud) (pud_val(pud) & _PAGE_PRESENT)
+
+static inline pud_t *__pud_offset_k(pud_t *pud, unsigned long address)
 { 
-	return pgd + pgd_index(address);
+	return pud + pud_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)
-{
-	unsigned long addr;
-
-	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);
-}
-
-#define pgd_offset(mm, address) ((mm)->pgd+pgd_index(address))
-
 /* PMD  - Level 2 access */
 #define pmd_page_kernel(pmd) ((unsigned long) __va(pmd_val(pmd) & PTE_MASK))
 #define pmd_page(pmd)		(pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT))
 
 #define pmd_index(address) (((address) >> PMD_SHIFT) & (PTRS_PER_PMD-1))
-#define pmd_offset(dir, address) ((pmd_t *) pgd_page(*(dir)) + \
+#define pmd_offset(dir, address) ((pmd_t *) pud_page(*(dir)) + \
 			pmd_index(address))
 #define pmd_none(x)	(!pmd_val(x))
 #define pmd_present(x)	(pmd_val(x) & _PAGE_PRESENT)
diff -Nru a/include/asm-x86_64/processor.h b/include/asm-x86_64/processor.h
--- a/include/asm-x86_64/processor.h	2005-01-10 20:11:23 -08:00
+++ b/include/asm-x86_64/processor.h	2005-01-10 20:11:23 -08:00
@@ -157,17 +157,11 @@
 		:"ax");
 }
 
-/*
- * Bus types
- */
-#define MCA_bus 0
-#define MCA_bus__is_a_macro
-
 
 /*
- * User space process size: 512GB - 1GB (default).
+ * User space process size. 47bits.
  */
-#define TASK_SIZE	(0x0000007fc0000000UL)
+#define TASK_SIZE	(0x800000000000)
 
 /* This decides where the kernel will search for a free chunk of vm
  * space during mmap's.
@@ -462,5 +456,7 @@
 #define cache_line_size() (boot_cpu_data.x86_cache_alignment)
 
 extern unsigned long boot_option_idle_override;
+/* Boot loader type from the setup header */
+extern int bootloader_type;
 
 #endif /* __ASM_X86_64_PROCESSOR_H */
diff -Nru a/include/asm-x86_64/proto.h b/include/asm-x86_64/proto.h
--- a/include/asm-x86_64/proto.h	2005-01-10 20:11:22 -08:00
+++ b/include/asm-x86_64/proto.h	2005-01-10 20:11:22 -08:00
@@ -25,8 +25,6 @@
 extern void ia32_cstar_target(void); 
 extern void ia32_sysenter_target(void); 
 
-extern void calibrate_delay(void);
-extern void cpu_idle(void);
 extern void config_acpi_tables(void);
 extern void ia32_syscall(void);
 extern void iommu_hole_init(void);
@@ -107,6 +105,8 @@
 extern int iommu_aperture_allowed;
 extern int fix_aperture;
 extern int force_iommu;
+
+extern int reboot_force;
 
 extern void smp_local_timer_interrupt(struct pt_regs * regs);
 
diff -Nru a/include/asm-x86_64/smp.h b/include/asm-x86_64/smp.h
--- a/include/asm-x86_64/smp.h	2005-01-10 20:11:15 -08:00
+++ b/include/asm-x86_64/smp.h	2005-01-10 20:11:15 -08:00
@@ -66,7 +66,7 @@
 	return cpus_weight(cpu_callout_map);
 }
 
-#define smp_processor_id() read_pda(cpunumber)
+#define __smp_processor_id() read_pda(cpunumber)
 
 extern __inline int hard_smp_processor_id(void)
 {
diff -Nru a/include/asm-x86_64/spinlock.h b/include/asm-x86_64/spinlock.h
--- a/include/asm-x86_64/spinlock.h	2005-01-10 20:11:22 -08:00
+++ b/include/asm-x86_64/spinlock.h	2005-01-10 20:11:22 -08:00
@@ -18,6 +18,9 @@
 #ifdef CONFIG_DEBUG_SPINLOCK
 	unsigned magic;
 #endif
+#ifdef CONFIG_PREEMPT
+	unsigned int break_lock;
+#endif
 } spinlock_t;
 
 #define SPINLOCK_MAGIC	0xdead4ead
@@ -139,6 +142,9 @@
 #ifdef CONFIG_DEBUG_SPINLOCK
 	unsigned magic;
 #endif
+#ifdef CONFIG_PREEMPT
+	unsigned int break_lock;
+#endif
 } rwlock_t;
 
 #define RWLOCK_MAGIC	0xdeaf1eed
@@ -184,6 +190,16 @@
 
 #define _raw_read_unlock(rw)		asm volatile("lock ; incl %0" :"=m" ((rw)->lock) : : "memory")
 #define _raw_write_unlock(rw)	asm volatile("lock ; addl $" RW_LOCK_BIAS_STR ",%0":"=m" ((rw)->lock) : : "memory")
+
+static inline int _raw_read_trylock(rwlock_t *lock)
+{
+	atomic_t *count = (atomic_t *)lock;
+	atomic_dec(count);
+	if (atomic_read(count) >= 0)
+		return 1;
+	atomic_inc(count);
+	return 0;
+}
 
 static inline int _raw_write_trylock(rwlock_t *lock)
 {
diff -Nru a/include/asm-x86_64/system.h b/include/asm-x86_64/system.h
--- a/include/asm-x86_64/system.h	2005-01-10 20:11:21 -08:00
+++ b/include/asm-x86_64/system.h	2005-01-10 20:11:21 -08:00
@@ -326,6 +326,8 @@
 /* For spinlocks etc */
 #define local_irq_save(x) 	do { warn_if_not_ulong(x); __asm__ __volatile__("# local_irq_save \n\t pushfq ; popq %0 ; cli":"=g" (x): /* no input */ :"memory"); } while (0)
 
+void cpu_idle_wait(void);
+
 /*
  * disable hlt during certain critical i/o operations
  */
diff -Nru a/include/asm-x86_64/topology.h b/include/asm-x86_64/topology.h
--- a/include/asm-x86_64/topology.h	2005-01-10 20:11:21 -08:00
+++ b/include/asm-x86_64/topology.h	2005-01-10 20:11:21 -08:00
@@ -16,6 +16,12 @@
 extern cpumask_t     node_to_cpumask[];
 extern cpumask_t pci_bus_to_cpumask[];
 
+#ifdef CONFIG_ACPI_NUMA
+extern int __node_distance(int, int);
+#define node_distance(a,b) __node_distance(a,b)
+/* #else fallback version */
+#endif
+
 #define cpu_to_node(cpu)		(cpu_to_node[cpu])
 #define parent_node(node)		(node)
 #define node_to_first_cpu(node) 	(__ffs(node_to_cpumask[node]))
@@ -42,11 +48,13 @@
 	.max_interval		= 32,			\
 	.busy_factor		= 32,			\
 	.imbalance_pct		= 125,			\
-	.cache_hot_time		= (10*1000),		\
+	.cache_hot_time		= (10*1000000),		\
 	.cache_nice_tries	= 1,			\
 	.per_cpu_gain		= 100,			\
 	.flags			= SD_LOAD_BALANCE	\
+				| SD_BALANCE_NEWIDLE	\
 				| SD_BALANCE_EXEC	\
+				| SD_WAKE_IDLE		\
 				| SD_WAKE_BALANCE,	\
 	.last_balance		= jiffies,		\
 	.balance_interval	= 1,			\
diff -Nru a/include/asm-x86_64/unistd.h b/include/asm-x86_64/unistd.h
--- a/include/asm-x86_64/unistd.h	2005-01-10 20:11:20 -08:00
+++ b/include/asm-x86_64/unistd.h	2005-01-10 20:11:20 -08:00
@@ -581,7 +581,6 @@
 #define __ARCH_WANT_SYS_PAUSE
 #define __ARCH_WANT_SYS_SGETMASK
 #define __ARCH_WANT_SYS_SIGNAL
-#define __ARCH_WANT_SYS_TIME
 #define __ARCH_WANT_SYS_UTIME
 #define __ARCH_WANT_SYS_WAITPID
 #define __ARCH_WANT_SYS_SOCKETCALL
@@ -594,6 +593,7 @@
 #define __ARCH_WANT_SYS_SIGPENDING
 #define __ARCH_WANT_SYS_SIGPROCMASK
 #define __ARCH_WANT_SYS_RT_SIGACTION
+#define __ARCH_WANT_COMPAT_SYS_TIME
 #endif
 
 #ifndef __KERNEL_SYSCALLS__
diff -Nru a/include/linux/ac97_codec.h b/include/linux/ac97_codec.h
--- a/include/linux/ac97_codec.h	2005-01-10 20:11:16 -08:00
+++ b/include/linux/ac97_codec.h	2005-01-10 20:11:16 -08:00
@@ -315,4 +315,26 @@
 extern int ac97_register_driver(struct ac97_driver *driver);
 extern void ac97_unregister_driver(struct ac97_driver *driver);
 
+/* quirk types */
+enum {
+	AC97_TUNE_DEFAULT = -1, /* use default from quirk list (not valid in list) */
+	AC97_TUNE_NONE = 0,     /* nothing extra to do */
+	AC97_TUNE_HP_ONLY,      /* headphone (true line-out) control as master only */
+	AC97_TUNE_SWAP_HP,      /* swap headphone and master controls */
+	AC97_TUNE_SWAP_SURROUND, /* swap master and surround controls */
+	AC97_TUNE_AD_SHARING,   /* for AD1985, turn on OMS bit and use headphone */
+	AC97_TUNE_ALC_JACK,     /* for Realtek, enable JACK detection */
+};
+
+struct ac97_quirk {
+	unsigned short vendor;  /* PCI vendor id */
+	unsigned short device;  /* PCI device id */
+	unsigned short mask;    /* device id bit mask, 0 = accept all */
+	const char *name;       /* name shown as info */
+	int type;               /* quirk type above */
+};
+
+struct pci_dev;
+extern int ac97_tune_hardware(struct pci_dev *pdev, struct ac97_quirk *quirk, int override);
+
 #endif /* _AC97_CODEC_H_ */
diff -Nru a/include/linux/acct.h b/include/linux/acct.h
--- a/include/linux/acct.h	2005-01-10 20:11:24 -08:00
+++ b/include/linux/acct.h	2005-01-10 20:11:24 -08:00
@@ -120,9 +120,13 @@
 struct super_block;
 extern void acct_auto_close(struct super_block *sb);
 extern void acct_process(long exitcode);
+extern void acct_update_integrals(void);
+extern void acct_clear_integrals(struct task_struct *tsk);
 #else
 #define acct_auto_close(x)	do { } while (0)
 #define acct_process(x)		do { } while (0)
+#define acct_update_integrals()		do { } while (0)
+#define acct_clear_integrals(task)	do { } while (0)
 #endif
 
 /*
diff -Nru a/include/linux/acpi.h b/include/linux/acpi.h
--- a/include/linux/acpi.h	2005-01-10 20:11:15 -08:00
+++ b/include/linux/acpi.h	2005-01-10 20:11:15 -08:00
@@ -379,6 +379,7 @@
 char * __acpi_map_table (unsigned long phys_addr, unsigned long size);
 unsigned long acpi_find_rsdp (void);
 int acpi_boot_init (void);
+int acpi_boot_table_init (void);
 int acpi_numa_init (void);
 
 int acpi_table_init (void);
@@ -396,6 +397,12 @@
 void acpi_numa_memory_affinity_init (struct acpi_table_memory_affinity *ma);
 void acpi_numa_arch_fixup(void);
 
+#ifdef CONFIG_ACPI_HOTPLUG_CPU
+/* Arch dependent functions for cpu hotplug support */
+int acpi_map_lsapic(acpi_handle handle, int *pcpu);
+int acpi_unmap_lsapic(int cpu);
+#endif /* CONFIG_ACPI_HOTPLUG_CPU */
+
 extern int acpi_mp_config;
 
 extern u32 pci_mmcfg_base_addr;
@@ -411,11 +418,25 @@
 	return 0;
 }
 
+static inline int acpi_boot_table_init(void)
+{
+	return 0;
+}
+
 #endif 	/*!CONFIG_ACPI_BOOT*/
 
 unsigned int acpi_register_gsi (u32 gsi, int edge_level, int active_high_low);
 int acpi_gsi_to_irq (u32 gsi, unsigned int *irq);
 
+/*
+ * This function undoes the effect of one call to acpi_register_gsi().
+ * If this matches the last registration, any IRQ resources for gsi
+ * are freed.
+ */
+#ifdef CONFIG_ACPI_DEALLOCATE_IRQ
+void acpi_unregister_gsi (u32 gsi);
+#endif
+
 #ifdef CONFIG_ACPI_PCI
 
 struct acpi_prt_entry {
@@ -441,6 +462,10 @@
 int acpi_pci_irq_enable (struct pci_dev *dev);
 void acpi_penalize_isa_irq(int irq);
 
+#ifdef CONFIG_ACPI_DEALLOCATE_IRQ
+void acpi_pci_irq_disable (struct pci_dev *dev);
+#endif
+
 struct acpi_pci_driver {
 	struct acpi_pci_driver *next;
 	int (*add)(acpi_handle handle);
@@ -499,4 +524,12 @@
 static inline void acpi_set_cstate_limit(unsigned int new_limit) { return; }
 #endif
 
+#ifdef CONFIG_ACPI_NUMA
+int acpi_get_pxm(acpi_handle handle);
+#else
+static inline int acpi_get_pxm(acpi_handle handle)
+{
+	return 0;
+}
+#endif
 #endif /*_LINUX_ACPI_H*/
diff -Nru a/include/linux/affs_fs.h b/include/linux/affs_fs.h
--- a/include/linux/affs_fs.h	2005-01-10 20:11:24 -08:00
+++ b/include/linux/affs_fs.h	2005-01-10 20:11:24 -08:00
@@ -3,94 +3,5 @@
 /*
  * The affs filesystem constants/structures
  */
-
-#include <linux/types.h>
-
-#include <linux/affs_fs_i.h>
-#include <linux/affs_fs_sb.h>
-
 #define AFFS_SUPER_MAGIC 0xadff
-
-struct affs_date;
-
-/* --- Prototypes -----------------------------------------------------------------------------	*/
-
-/* amigaffs.c */
-
-extern int	affs_insert_hash(struct inode *inode, struct buffer_head *bh);
-extern int	affs_remove_hash(struct inode *dir, struct buffer_head *rem_bh);
-extern int	affs_remove_header(struct dentry *dentry);
-extern u32	affs_checksum_block(struct super_block *sb, struct buffer_head *bh);
-extern void	affs_fix_checksum(struct super_block *sb, struct buffer_head *bh);
-extern void	secs_to_datestamp(time_t secs, struct affs_date *ds);
-extern mode_t	prot_to_mode(u32 prot);
-extern void	mode_to_prot(struct inode *inode);
-extern void	affs_error(struct super_block *sb, const char *function, const char *fmt, ...);
-extern void	affs_warning(struct super_block *sb, const char *function, const char *fmt, ...);
-extern int	affs_check_name(const unsigned char *name, int len);
-extern int	affs_copy_name(unsigned char *bstr, struct dentry *dentry);
-
-/* bitmap. c */
-
-extern u32	affs_count_free_blocks(struct super_block *s);
-extern void	affs_free_block(struct super_block *sb, u32 block);
-extern u32	affs_alloc_block(struct inode *inode, u32 goal);
-extern int	affs_init_bitmap(struct super_block *sb, int *flags);
-extern void	affs_free_bitmap(struct super_block *sb);
-
-/* namei.c */
-
-extern int	affs_hash_name(struct super_block *sb, const u8 *name, unsigned int len);
-extern struct dentry *affs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *);
-extern int	affs_unlink(struct inode *dir, struct dentry *dentry);
-extern int	affs_create(struct inode *dir, struct dentry *dentry, int mode, struct nameidata *);
-extern int	affs_mkdir(struct inode *dir, struct dentry *dentry, int mode);
-extern int	affs_rmdir(struct inode *dir, struct dentry *dentry);
-extern int	affs_link(struct dentry *olddentry, struct inode *dir,
-			  struct dentry *dentry);
-extern int	affs_symlink(struct inode *dir, struct dentry *dentry,
-			     const char *symname);
-extern int	affs_rename(struct inode *old_dir, struct dentry *old_dentry,
-			    struct inode *new_dir, struct dentry *new_dentry);
-
-/* inode.c */
-
-extern unsigned long		 affs_parent_ino(struct inode *dir);
-extern struct inode		*affs_new_inode(struct inode *dir);
-extern int			 affs_notify_change(struct dentry *dentry, struct iattr *attr);
-extern void			 affs_put_inode(struct inode *inode);
-extern void			 affs_delete_inode(struct inode *inode);
-extern void			 affs_clear_inode(struct inode *inode);
-extern void			 affs_read_inode(struct inode *inode);
-extern int			 affs_write_inode(struct inode *inode, int);
-extern int			 affs_add_entry(struct inode *dir, struct inode *inode, struct dentry *dentry, s32 type);
-
-/* super.c */
-
-extern int			 affs_fs(void);
-
-/* file.c */
-
-void		affs_free_prealloc(struct inode *inode);
-extern void	affs_truncate(struct inode *);
-
-/* dir.c */
-
-extern void   affs_dir_truncate(struct inode *);
-
-/* jump tables */
-
-extern struct inode_operations	 affs_file_inode_operations;
-extern struct inode_operations	 affs_dir_inode_operations;
-extern struct inode_operations   affs_symlink_inode_operations;
-extern struct file_operations	 affs_file_operations;
-extern struct file_operations	 affs_file_operations_ofs;
-extern struct file_operations	 affs_dir_operations;
-extern struct address_space_operations	 affs_symlink_aops;
-extern struct address_space_operations	 affs_aops;
-extern struct address_space_operations	 affs_aops_ofs;
-
-extern struct dentry_operations	 affs_dentry_operations;
-extern struct dentry_operations	 affs_dentry_operations_intl;
-
 #endif
diff -Nru a/include/linux/affs_fs_i.h b/include/linux/affs_fs_i.h
--- a/include/linux/affs_fs_i.h	2005-01-10 20:11:22 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,59 +0,0 @@
-#ifndef _AFFS_FS_I
-#define _AFFS_FS_I
-
-#include <linux/a.out.h>
-#include <linux/fs.h>
-#include <asm/semaphore.h>
-
-#define AFFS_CACHE_SIZE		PAGE_SIZE
-//#define AFFS_CACHE_SIZE		(4*4)
-
-#define AFFS_MAX_PREALLOC	32
-#define AFFS_LC_SIZE		(AFFS_CACHE_SIZE/sizeof(u32)/2)
-#define AFFS_AC_SIZE		(AFFS_CACHE_SIZE/sizeof(struct affs_ext_key)/2)
-#define AFFS_AC_MASK		(AFFS_AC_SIZE-1)
-
-struct affs_ext_key {
-	u32	ext;				/* idx of the extended block */
-	u32	key;				/* block number */
-};
-
-/*
- * affs fs inode data in memory
- */
-struct affs_inode_info {
-	u32	 i_opencnt;
-	struct semaphore i_link_lock;		/* Protects internal inode access. */
-	struct semaphore i_ext_lock;		/* Protects internal inode access. */
-#define i_hash_lock i_ext_lock
-	u32	 i_blkcnt;			/* block count */
-	u32	 i_extcnt;			/* extended block count */
-	u32	*i_lc;				/* linear cache of extended blocks */
-	u32	 i_lc_size;
-	u32	 i_lc_shift;
-	u32	 i_lc_mask;
-	struct affs_ext_key *i_ac;		/* associative cache of extended blocks */
-	u32	 i_ext_last;			/* last accessed extended block */
-	struct buffer_head *i_ext_bh;		/* bh of last extended block */
-	loff_t	 mmu_private;
-	u32	 i_protect;			/* unused attribute bits */
-	u32	 i_lastalloc;			/* last allocated block */
-	int	 i_pa_cnt;			/* number of preallocated blocks */
-#if 0
-	s32	 i_original;			/* if != 0, this is the key of the original */
-	u32	 i_data[AFFS_MAX_PREALLOC];	/* preallocated blocks */
-	int	 i_cache_users;			/* Cache cannot be freed while > 0 */
-	unsigned char i_hlink;			/* This is a fake */
-	unsigned char i_pad;
-	s32	 i_parent;			/* parent ino */
-#endif
-	struct inode vfs_inode;
-};
-
-/* short cut to get to the affs specific inode data */
-static inline struct affs_inode_info *AFFS_I(struct inode *inode)
-{
-	return list_entry(inode, struct affs_inode_info, vfs_inode);
-}
-
-#endif
diff -Nru a/include/linux/affs_fs_sb.h b/include/linux/affs_fs_sb.h
--- a/include/linux/affs_fs_sb.h	2005-01-10 20:11:16 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,57 +0,0 @@
-#ifndef _AFFS_FS_SB
-#define _AFFS_FS_SB
-
-/*
- * super-block data in memory
- *
- * Block numbers are adjusted for their actual size
- *
- */
-
-struct affs_bm_info {
-	u32 bm_key;			/* Disk block number */
-	u32 bm_free;			/* Free blocks in here */
-};
-
-struct affs_sb_info {
-	int s_partition_size;		/* Partition size in blocks. */
-	int s_reserved;			/* Number of reserved blocks. */
-	//u32 s_blksize;			/* Initial device blksize */
-	u32 s_data_blksize;		/* size of the data block w/o header */
-	u32 s_root_block;		/* FFS root block number. */
-	int s_hashsize;			/* Size of hash table. */
-	unsigned long s_flags;		/* See below. */
-	uid_t s_uid;			/* uid to override */
-	gid_t s_gid;			/* gid to override */
-	umode_t s_mode;			/* mode to override */
-	struct buffer_head *s_root_bh;	/* Cached root block. */
-	struct semaphore s_bmlock;	/* Protects bitmap access. */
-	struct affs_bm_info *s_bitmap;	/* Bitmap infos. */
-	u32 s_bmap_count;		/* # of bitmap blocks. */
-	u32 s_bmap_bits;		/* # of bits in one bitmap blocks */
-	u32 s_last_bmap;
-	struct buffer_head *s_bmap_bh;
-	char *s_prefix;			/* Prefix for volumes and assigns. */
-	int s_prefix_len;		/* Length of prefix. */
-	char s_volume[32];		/* Volume prefix for absolute symlinks. */
-};
-
-#define SF_INTL		0x0001		/* International filesystem. */
-#define SF_BM_VALID	0x0002		/* Bitmap is valid. */
-#define SF_IMMUTABLE	0x0004		/* Protection bits cannot be changed */
-#define SF_QUIET	0x0008		/* chmod errors will be not reported */
-#define SF_SETUID	0x0010		/* Ignore Amiga uid */
-#define SF_SETGID	0x0020		/* Ignore Amiga gid */
-#define SF_SETMODE	0x0040		/* Ignore Amiga protection bits */
-#define SF_MUFS		0x0100		/* Use MUFS uid/gid mapping */
-#define SF_OFS		0x0200		/* Old filesystem */
-#define SF_PREFIX	0x0400		/* Buffer for prefix is allocated */
-#define SF_VERBOSE	0x0800		/* Talk about fs when mounting */
-
-/* short cut to get to the affs specific sb data */
-static inline struct affs_sb_info *AFFS_SB(struct super_block *sb)
-{
-	return sb->s_fs_info;
-}
-
-#endif
diff -Nru a/include/linux/amigaffs.h b/include/linux/amigaffs.h
--- a/include/linux/amigaffs.h	2005-01-10 20:11:16 -08:00
+++ b/include/linux/amigaffs.h	2005-01-10 20:11:16 -08:00
@@ -2,133 +2,8 @@
 #define AMIGAFFS_H
 
 #include <linux/types.h>
-#include <linux/buffer_head.h>
-#include <linux/string.h>
 #include <asm/byteorder.h>
 
-/* AmigaOS allows file names with up to 30 characters length.
- * Names longer than that will be silently truncated. If you
- * want to disallow this, comment out the following #define.
- * Creating filesystem objects with longer names will then
- * result in an error (ENAMETOOLONG).
- */
-/*#define AFFS_NO_TRUNCATE */
-
-/* Ugly macros make the code more pretty. */
-
-#define GET_END_PTR(st,p,sz)		 ((st *)((char *)(p)+((sz)-sizeof(st))))
-#define AFFS_GET_HASHENTRY(data,hashkey) be32_to_cpu(((struct dir_front *)data)->hashtable[hashkey])
-#define AFFS_BLOCK(sb, bh, blk)		(AFFS_HEAD(bh)->table[AFFS_SB(sb)->s_hashsize-1-(blk)])
-
-static inline void
-affs_set_blocksize(struct super_block *sb, int size)
-{
-	sb_set_blocksize(sb, size);
-}
-static inline struct buffer_head *
-affs_bread(struct super_block *sb, int block)
-{
-	pr_debug("affs_bread: %d\n", block);
-	if (block >= AFFS_SB(sb)->s_reserved && block < AFFS_SB(sb)->s_partition_size)
-		return sb_bread(sb, block);
-	return NULL;
-}
-static inline struct buffer_head *
-affs_getblk(struct super_block *sb, int block)
-{
-	pr_debug("affs_getblk: %d\n", block);
-	if (block >= AFFS_SB(sb)->s_reserved && block < AFFS_SB(sb)->s_partition_size)
-		return sb_getblk(sb, block);
-	return NULL;
-}
-static inline struct buffer_head *
-affs_getzeroblk(struct super_block *sb, int block)
-{
-	struct buffer_head *bh;
-	pr_debug("affs_getzeroblk: %d\n", block);
-	if (block >= AFFS_SB(sb)->s_reserved && block < AFFS_SB(sb)->s_partition_size) {
-		bh = sb_getblk(sb, block);
-		lock_buffer(bh);
-		memset(bh->b_data, 0 , sb->s_blocksize);
-		set_buffer_uptodate(bh);
-		unlock_buffer(bh);
-		return bh;
-	}
-	return NULL;
-}
-static inline struct buffer_head *
-affs_getemptyblk(struct super_block *sb, int block)
-{
-	struct buffer_head *bh;
-	pr_debug("affs_getemptyblk: %d\n", block);
-	if (block >= AFFS_SB(sb)->s_reserved && block < AFFS_SB(sb)->s_partition_size) {
-		bh = sb_getblk(sb, block);
-		wait_on_buffer(bh);
-		set_buffer_uptodate(bh);
-		return bh;
-	}
-	return NULL;
-}
-static inline void
-affs_brelse(struct buffer_head *bh)
-{
-	if (bh)
-		pr_debug("affs_brelse: %lld\n", (long long) bh->b_blocknr);
-	brelse(bh);
-}
-
-static inline void
-affs_adjust_checksum(struct buffer_head *bh, u32 val)
-{
-	u32 tmp = be32_to_cpu(((__be32 *)bh->b_data)[5]);
-	((__be32 *)bh->b_data)[5] = cpu_to_be32(tmp - val);
-}
-static inline void
-affs_adjust_bitmapchecksum(struct buffer_head *bh, u32 val)
-{
-	u32 tmp = be32_to_cpu(((__be32 *)bh->b_data)[0]);
-	((__be32 *)bh->b_data)[0] = cpu_to_be32(tmp - val);
-}
-
-static inline void
-affs_lock_link(struct inode *inode)
-{
-	down(&AFFS_I(inode)->i_link_lock);
-}
-static inline void
-affs_unlock_link(struct inode *inode)
-{
-	up(&AFFS_I(inode)->i_link_lock);
-}
-static inline void
-affs_lock_dir(struct inode *inode)
-{
-	down(&AFFS_I(inode)->i_hash_lock);
-}
-static inline void
-affs_unlock_dir(struct inode *inode)
-{
-	up(&AFFS_I(inode)->i_hash_lock);
-}
-static inline void
-affs_lock_ext(struct inode *inode)
-{
-	down(&AFFS_I(inode)->i_ext_lock);
-}
-static inline void
-affs_unlock_ext(struct inode *inode)
-{
-	up(&AFFS_I(inode)->i_ext_lock);
-}
-
-#ifdef __LITTLE_ENDIAN
-#define BO_EXBITS	0x18UL
-#elif defined(__BIG_ENDIAN)
-#define BO_EXBITS	0x00UL
-#else
-#error Endianness must be known for affs to work.
-#endif
-
 #define FS_OFS		0x444F5300
 #define FS_FFS		0x444F5301
 #define FS_INTLOFS	0x444F5302
@@ -155,13 +30,6 @@
 #define ST_LINKDIR	4
 
 #define AFFS_ROOT_BMAPS		25
-
-#define AFFS_HEAD(bh)		((struct affs_head *)(bh)->b_data)
-#define AFFS_TAIL(sb, bh)	((struct affs_tail *)((bh)->b_data+(sb)->s_blocksize-sizeof(struct affs_tail)))
-#define AFFS_ROOT_HEAD(bh)	((struct affs_root_head *)(bh)->b_data)
-#define AFFS_ROOT_TAIL(sb, bh)	((struct affs_root_tail *)((bh)->b_data+(sb)->s_blocksize-sizeof(struct affs_root_tail)))
-#define AFFS_DATA_HEAD(bh)	((struct affs_data_head *)(bh)->b_data)
-#define AFFS_DATA(bh)		(((struct affs_data_head *)(bh)->b_data)->data)
 
 struct affs_date {
 	__be32 days;
diff -Nru a/include/linux/arcdevice.h b/include/linux/arcdevice.h
--- a/include/linux/arcdevice.h	2005-01-10 20:11:17 -08:00
+++ b/include/linux/arcdevice.h	2005-01-10 20:11:17 -08:00
@@ -25,7 +25,6 @@
 #define bool int
 #endif
 
-
 /*
  * RECON_THRESHOLD is the maximum number of RECON messages to receive
  * within one minute before printing a "cabling problem" warning. The
@@ -74,6 +73,7 @@
 #define D_SKB		1024	/* show skb's                             */
 #define D_SKB_SIZE	2048	/* show skb sizes			  */
 #define D_TIMING	4096	/* show time needed to copy buffers to card */
+#define D_DEBUG         8192    /* Very detailed debug line for line */
 
 #ifndef ARCNET_DEBUG_MAX
 #define ARCNET_DEBUG_MAX (127)	/* change to ~0 if you want detailed debugging */
@@ -135,6 +135,7 @@
 #define TXACKflag       0x02	/* transmitted msg. ackd */
 #define RECONflag       0x04	/* network reconfigured */
 #define TESTflag        0x08	/* test flag */
+#define EXCNAKflag      0x08    /* excesive nak flag */
 #define RESETflag       0x10	/* power-on-reset */
 #define RES1flag        0x20	/* reserved - usually set by jumper */
 #define RES2flag        0x40	/* reserved - usually set by jumper */
@@ -162,6 +163,8 @@
 #define RESETclear      0x08	/* power-on-reset */
 #define CONFIGclear     0x10	/* system reconfigured */
 
+#define EXCNAKclear     0x0E    /* Clear and acknowledge the excive nak bit */
+
 /* flags for "load test flags" command */
 #define TESTload        0x08	/* test flag (diagnostic) */
 
@@ -187,6 +190,7 @@
 struct ArcProto {
 	char suffix;		/* a for RFC1201, e for ether-encap, etc. */
 	int mtu;		/* largest possible packet */
+	int is_ip;              /* This is a ip plugin - not a raw thing */
 
 	void (*rx) (struct net_device * dev, int bufnum,
 		    struct archdr * pkthdr, int length);
@@ -197,9 +201,11 @@
 	int (*prepare_tx) (struct net_device * dev, struct archdr * pkt, int length,
 			   int bufnum);
 	int (*continue_tx) (struct net_device * dev, int bufnum);
+	int (*ack_tx) (struct net_device * dev, int acked);
 };
 
-extern struct ArcProto *arc_proto_map[256], *arc_proto_default, *arc_bcast_proto;
+extern struct ArcProto *arc_proto_map[256], *arc_proto_default,
+	*arc_bcast_proto, *arc_raw_proto;
 extern struct ArcProto arc_proto_null;
 
 
@@ -251,6 +257,10 @@
 	char *card_name;	/* card ident string */
 	int card_flags;		/* special card features */
 
+
+	/* On preemtive and SMB a lock is needed */
+	spinlock_t lock;
+
 	/*
 	 * Buffer management: an ARCnet card has 4 x 512-byte buffers, each of
 	 * which can be used for either sending or receiving.  The new dynamic
@@ -279,6 +289,8 @@
 	int num_recons;		/* number of RECONs between first and last. */
 	bool network_down;	/* do we think the network is down? */
 
+	bool excnak_pending;    /* We just got an excesive nak interrupt */
+
 	struct {
 		uint16_t sequence;	/* sequence number (incs with each packet) */
 		uint16_t aborted_seq;
@@ -323,9 +335,10 @@
 #endif
 
 #if (ARCNET_DEBUG_MAX & D_RX) || (ARCNET_DEBUG_MAX & D_TX)
-void arcnet_dump_packet(struct net_device *dev, int bufnum, char *desc);
+void arcnet_dump_packet(struct net_device *dev, int bufnum, char *desc,
+			int take_arcnet_lock);
 #else
-#define arcnet_dump_packet(dev, bufnum, desc) ;
+#define arcnet_dump_packet(dev, bufnum, desc,take_arcnet_lock) ;
 #endif
 
 void arcnet_unregister_proto(struct ArcProto *proto);
diff -Nru a/include/linux/atalk.h b/include/linux/atalk.h
--- a/include/linux/atalk.h	2005-01-10 20:11:21 -08:00
+++ b/include/linux/atalk.h	2005-01-10 20:11:21 -08:00
@@ -188,8 +188,6 @@
 extern int		 aarp_send_ddp(struct net_device *dev,
 				       struct sk_buff *skb,
 				       struct atalk_addr *sa, void *hwaddr);
-extern void		 aarp_send_probe(struct net_device *dev,
-					 struct atalk_addr *addr);
 extern void		 aarp_device_down(struct net_device *dev);
 extern void		 aarp_probe_network(struct atalk_iface *atif);
 extern int 		 aarp_proxy_probe_network(struct atalk_iface *atif,
diff -Nru a/include/linux/binfmts.h b/include/linux/binfmts.h
--- a/include/linux/binfmts.h	2005-01-10 20:11:19 -08:00
+++ b/include/linux/binfmts.h	2005-01-10 20:11:19 -08:00
@@ -74,7 +74,9 @@
 #define EXSTACK_DISABLE_X 1	/* Disable executable stacks */
 #define EXSTACK_ENABLE_X  2	/* Enable executable stacks */
 
-extern int setup_arg_pages(struct linux_binprm * bprm, int executable_stack);
+extern int setup_arg_pages(struct linux_binprm * bprm,
+			   unsigned long stack_top,
+			   int executable_stack);
 extern int copy_strings(int argc,char __user * __user * argv,struct linux_binprm *bprm); 
 extern int copy_strings_kernel(int argc,char ** argv,struct linux_binprm *bprm);
 extern void compute_creds(struct linux_binprm *binprm);
diff -Nru a/include/linux/bitops.h b/include/linux/bitops.h
--- a/include/linux/bitops.h	2005-01-10 20:11:22 -08:00
+++ b/include/linux/bitops.h	2005-01-10 20:11:22 -08:00
@@ -1,7 +1,6 @@
 #ifndef _LINUX_BITOPS_H
 #define _LINUX_BITOPS_H
 #include <asm/types.h>
-#include <asm/bitops.h>
 
 /*
  * ffs: find first bit set. This is defined the same way as
@@ -70,6 +69,12 @@
 	}
 	return r;
 }
+
+/*
+ * Include this here because some architectures need generic_ffs/fls in
+ * scope
+ */
+#include <asm/bitops.h>
 
 static __inline__ int get_bitmask_order(unsigned int count)
 {
diff -Nru a/include/linux/blk.h b/include/linux/blk.h
--- a/include/linux/blk.h	2005-01-10 20:11:24 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,2 +0,0 @@
-#warning this file is obsolete, please use <linux/blkdev.h> instead
-#include <linux/blkdev.h>
diff -Nru a/include/linux/bootmem.h b/include/linux/bootmem.h
--- a/include/linux/bootmem.h	2005-01-10 20:11:22 -08:00
+++ b/include/linux/bootmem.h	2005-01-10 20:11:22 -08:00
@@ -74,8 +74,23 @@
 					    unsigned long bucketsize,
 					    unsigned long numentries,
 					    int scale,
-					    int consider_highmem,
+					    int flags,
 					    unsigned int *_hash_shift,
-					    unsigned int *_hash_mask);
+					    unsigned int *_hash_mask,
+					    unsigned long limit);
+
+#define HASH_HIGHMEM	0x00000001	/* Consider highmem? */
+#define HASH_EARLY	0x00000002	/* Allocating during early boot? */
+
+/* Only NUMA needs hash distribution.
+ * IA64 is known to have sufficient vmalloc space.
+ */
+#if defined(CONFIG_NUMA) && defined(CONFIG_IA64)
+#define HASHDIST_DEFAULT 1
+#else
+#define HASHDIST_DEFAULT 0
+#endif
+extern int __initdata hashdist;		/* Distribute hashes across NUMA nodes? */
+
 
 #endif /* _LINUX_BOOTMEM_H */
diff -Nru a/include/linux/cdrom.h b/include/linux/cdrom.h
--- a/include/linux/cdrom.h	2005-01-10 20:11:15 -08:00
+++ b/include/linux/cdrom.h	2005-01-10 20:11:15 -08:00
@@ -1186,8 +1186,6 @@
 };
 
 extern int cdrom_get_media_event(struct cdrom_device_info *cdi, struct media_event_desc *med);
-extern int cdrom_is_mrw(struct cdrom_device_info *cdi, int *write);
-extern int cdrom_is_random_writable(struct cdrom_device_info *cdi, int *write);
 
 #endif  /* End of kernel only stuff */ 
 
diff -Nru a/include/linux/com20020.h b/include/linux/com20020.h
--- a/include/linux/com20020.h	2005-01-10 20:11:20 -08:00
+++ b/include/linux/com20020.h	2005-01-10 20:11:20 -08:00
@@ -34,17 +34,24 @@
 #define ARCNET_TOTAL_SIZE 8
 
 /* various register addresses */
-#define _INTMASK  (ioaddr+0)	/* writable */
-#define _STATUS   (ioaddr+0)	/* readable */
-#define _COMMAND  (ioaddr+1)	/* standard arcnet commands */
-#define _DIAGSTAT (ioaddr+1)	/* diagnostic status register */
-#define _ADDR_HI  (ioaddr+2)	/* control registers for IO-mapped memory */
-#define _ADDR_LO  (ioaddr+3)
-#define _MEMDATA  (ioaddr+4)	/* data port for IO-mapped memory */
-#define _SUBADR   (ioaddr+5)	/* the extended port _XREG refers to */
-#define _CONFIG   (ioaddr+6)	/* configuration register */
-#define _XREG     (ioaddr+7)	/* extra registers (indexed by _CONFIG 
-					or _SUBADR) */
+#ifdef CONFIG_SA1100_CT6001
+#define BUS_ALIGN  2  /* 8 bit device on a 16 bit bus - needs padding */
+#else
+#define BUS_ALIGN  1
+#endif
+
+
+#define _INTMASK  (ioaddr+BUS_ALIGN*0)	/* writable */
+#define _STATUS   (ioaddr+BUS_ALIGN*0)	/* readable */
+#define _COMMAND  (ioaddr+BUS_ALIGN*1)	/* standard arcnet commands */
+#define _DIAGSTAT (ioaddr+BUS_ALIGN*1)	/* diagnostic status register */
+#define _ADDR_HI  (ioaddr+BUS_ALIGN*2)	/* control registers for IO-mapped memory */
+#define _ADDR_LO  (ioaddr+BUS_ALIGN*3)
+#define _MEMDATA  (ioaddr+BUS_ALIGN*4)	/* data port for IO-mapped memory */
+#define _SUBADR   (ioaddr+BUS_ALIGN*5)	/* the extended port _XREG refers to */
+#define _CONFIG   (ioaddr+BUS_ALIGN*6)	/* configuration register */
+#define _XREG     (ioaddr+BUS_ALIGN*7)	/* extra registers (indexed by _CONFIG
+  					or _SUBADR) */
 
 /* in the ADDR_HI register */
 #define RDDATAflag	0x80	/* next access is a read (not a write) */
@@ -99,6 +106,7 @@
                   }
 
 #define ASTATUS()	inb(_STATUS)
+#define ADIAGSTATUS()	inb(_DIAGSTAT)
 #define ACOMMAND(cmd)	outb((cmd),_COMMAND)
 #define AINTMASK(msk)	outb((msk),_INTMASK)
 
diff -Nru a/include/linux/compat.h b/include/linux/compat.h
--- a/include/linux/compat.h	2005-01-10 20:11:18 -08:00
+++ b/include/linux/compat.h	2005-01-10 20:11:18 -08:00
@@ -143,6 +143,8 @@
 		       unsigned long bitmap_size);
 long compat_put_bitmap(compat_ulong_t __user *umask, unsigned long *mask,
 		       unsigned long bitmap_size);
-
+struct compat_siginfo;
+int copy_siginfo_from_user32(siginfo_t *to, struct compat_siginfo __user *from);
+int copy_siginfo_to_user32(struct compat_siginfo __user *to, siginfo_t *from);
 #endif /* CONFIG_COMPAT */
 #endif /* _LINUX_COMPAT_H */
diff -Nru a/include/linux/cpu.h b/include/linux/cpu.h
--- a/include/linux/cpu.h	2005-01-10 20:11:17 -08:00
+++ b/include/linux/cpu.h	2005-01-10 20:11:17 -08:00
@@ -32,6 +32,9 @@
 };
 
 extern int register_cpu(struct cpu *, int, struct node *);
+#ifdef CONFIG_HOTPLUG_CPU
+extern void unregister_cpu(struct cpu *, struct node *);
+#endif
 struct notifier_block;
 
 #ifdef CONFIG_SMP
diff -Nru a/include/linux/cpumask.h b/include/linux/cpumask.h
--- a/include/linux/cpumask.h	2005-01-10 20:11:18 -08:00
+++ b/include/linux/cpumask.h	2005-01-10 20:11:18 -08:00
@@ -234,29 +234,29 @@
 #if NR_CPUS <= BITS_PER_LONG
 
 #define CPU_MASK_ALL							\
-((cpumask_t) { {							\
+(cpumask_t) { {								\
 	[BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD			\
-} })
+} }
 
 #else
 
 #define CPU_MASK_ALL							\
-((cpumask_t) { {							\
+(cpumask_t) { {								\
 	[0 ... BITS_TO_LONGS(NR_CPUS)-2] = ~0UL,			\
 	[BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD			\
-} })
+} }
 
 #endif
 
 #define CPU_MASK_NONE							\
-((cpumask_t) { {							\
+(cpumask_t) { {								\
 	[0 ... BITS_TO_LONGS(NR_CPUS)-1] =  0UL				\
-} })
+} }
 
 #define CPU_MASK_CPU0							\
-((cpumask_t) { {							\
+(cpumask_t) { {								\
 	[0] =  1UL							\
-} })
+} }
 
 #define cpus_addr(src) ((src).bits)
 
diff -Nru a/include/linux/crypto.h b/include/linux/crypto.h
--- a/include/linux/crypto.h	2005-01-10 20:11:17 -08:00
+++ b/include/linux/crypto.h	2005-01-10 20:11:17 -08:00
@@ -56,6 +56,9 @@
 #define CRYPTO_UNSPEC			0
 #define CRYPTO_MAX_ALG_NAME		64
 
+#define CRYPTO_DIR_ENCRYPT		1
+#define CRYPTO_DIR_DECRYPT		0
+
 struct scatterlist;
 
 /*
diff -Nru a/include/linux/dcache.h b/include/linux/dcache.h
--- a/include/linux/dcache.h	2005-01-10 20:11:23 -08:00
+++ b/include/linux/dcache.h	2005-01-10 20:11:23 -08:00
@@ -199,6 +199,7 @@
  * These are the low-level FS interfaces to the dcache..
  */
 extern void d_instantiate(struct dentry *, struct inode *);
+extern struct dentry * d_instantiate_unique(struct dentry *, struct inode *);
 extern void d_delete(struct dentry *);
 
 /* allocate/de-allocate */
@@ -240,6 +241,23 @@
 {
 	d_instantiate(entry, inode);
 	d_rehash(entry);
+}
+
+/**
+ * d_add_unique - add dentry to hash queues without aliasing
+ * @entry: dentry to add
+ * @inode: The inode to attach to this dentry
+ *
+ * This adds the entry to the hash queues and initializes @inode.
+ * The entry was actually filled in earlier during d_alloc().
+ */
+static inline struct dentry *d_add_unique(struct dentry *entry, struct inode *inode)
+{
+	struct dentry *res;
+
+	res = d_instantiate_unique(entry, inode);
+	d_rehash(res != NULL ? res : entry);
+	return res;
 }
 
 /* used for rename() and baskets */
diff -Nru a/include/linux/debugfs.h b/include/linux/debugfs.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/linux/debugfs.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,90 @@
+/*
+ *  debugfs.h - a tiny little debug file system
+ *
+ *  Copyright (C) 2004 Greg Kroah-Hartman <greg@kroah.com>
+ *  Copyright (C) 2004 IBM Inc.
+ *
+ *	This program is free software; you can redistribute it and/or
+ *	modify it under the terms of the GNU General Public License version
+ *	2 as published by the Free Software Foundation.
+ *
+ *  debugfs is for people to use instead of /proc or /sys.
+ *  See Documentation/DocBook/kernel-api for more details.
+ */
+
+#ifndef _DEBUGFS_H_
+#define _DEBUGFS_H_
+
+#if defined(CONFIG_DEBUG_FS)
+struct dentry *debugfs_create_file(const char *name, mode_t mode,
+				   struct dentry *parent, void *data,
+				   struct file_operations *fops);
+
+struct dentry *debugfs_create_dir(const char *name, struct dentry *parent);
+
+void debugfs_remove(struct dentry *dentry);
+
+struct dentry *debugfs_create_u8(const char *name, mode_t mode,
+				 struct dentry *parent, u8 *value);
+struct dentry *debugfs_create_u16(const char *name, mode_t mode,
+				  struct dentry *parent, u16 *value);
+struct dentry *debugfs_create_u32(const char *name, mode_t mode,
+				  struct dentry *parent, u32 *value);
+struct dentry *debugfs_create_bool(const char *name, mode_t mode,
+				  struct dentry *parent, u32 *value);
+
+#else
+/* 
+ * We do not return NULL from these functions if CONFIG_DEBUG_FS is not enabled
+ * so users have a chance to detect if there was a real error or not.  We don't
+ * want to duplicate the design decision mistakes of procfs and devfs again.
+ */
+
+static inline struct dentry *debugfs_create_file(const char *name, mode_t mode,
+						 struct dentry *parent,
+						 void *data,
+						 struct file_operations *fops)
+{
+	return ERR_PTR(-ENODEV);
+}
+
+static inline struct dentry *debugfs_create_dir(const char *name,
+						struct dentry *parent)
+{
+	return ERR_PTR(-ENODEV);
+}
+
+static inline void debugfs_remove(struct dentry *dentry)
+{ }
+
+static inline struct dentry *debugfs_create_u8(const char *name, mode_t mode,
+					       struct dentry *parent,
+					       u8 *value)
+{
+	return ERR_PTR(-ENODEV);
+}
+
+static inline struct dentry *debugfs_create_u16(const char *name, mode_t mode,
+						struct dentry *parent,
+						u8 *value)
+{
+	return ERR_PTR(-ENODEV);
+}
+
+static inline struct dentry *debugfs_create_u32(const char *name, mode_t mode,
+						struct dentry *parent,
+						u8 *value)
+{
+	return ERR_PTR(-ENODEV);
+}
+
+static inline struct dentry *debugfs_create_bool(const char *name, mode_t mode,
+						 struct dentry *parent,
+						 u8 *value)
+{
+	return ERR_PTR(-ENODEV);
+}
+
+#endif
+
+#endif
diff -Nru a/include/linux/delay.h b/include/linux/delay.h
--- a/include/linux/delay.h	2005-01-10 20:11:17 -08:00
+++ b/include/linux/delay.h	2005-01-10 20:11:17 -08:00
@@ -38,6 +38,7 @@
 #define ndelay(x)	udelay(((x)+999)/1000)
 #endif
 
+void calibrate_delay(void);
 void msleep(unsigned int msecs);
 unsigned long msleep_interruptible(unsigned int msecs);
 
diff -Nru a/include/linux/device.h b/include/linux/device.h
--- a/include/linux/device.h	2005-01-10 20:11:22 -08:00
+++ b/include/linux/device.h	2005-01-10 20:11:22 -08:00
@@ -228,7 +228,10 @@
 				    const struct class_device_attribute *);
 extern void class_device_remove_file(struct class_device *, 
 				     const struct class_device_attribute *);
-
+extern int class_device_create_bin_file(struct class_device *,
+					struct bin_attribute *);
+extern void class_device_remove_bin_file(struct class_device *,
+					 struct bin_attribute *);
 
 struct class_interface {
 	struct list_head	node;
@@ -382,6 +385,8 @@
 
 extern struct resource *platform_get_resource(struct platform_device *, unsigned int, unsigned int);
 extern int platform_get_irq(struct platform_device *, unsigned int);
+extern struct resource *platform_get_resource_byname(struct platform_device *, unsigned int, char *);
+extern int platform_get_irq_byname(struct platform_device *, char *);
 extern int platform_add_devices(struct platform_device **, int);
 
 extern struct platform_device *platform_device_register_simple(char *, unsigned int, struct resource *, unsigned int);
diff -Nru a/include/linux/edd.h b/include/linux/edd.h
--- a/include/linux/edd.h	2005-01-10 20:11:15 -08:00
+++ b/include/linux/edd.h	2005-01-10 20:11:15 -08:00
@@ -49,6 +49,10 @@
 #define EDD_MBR_SIG_MAX 16        /* max number of signatures to store */
 #define EDD_MBR_SIG_NR_BUF 0x1ea  /* addr of number of MBR signtaures at EDD_MBR_SIG_BUF
 				     in boot_params - treat this as 1 byte  */
+#define EDD_CL_EQUALS   0x3d646465     /* "edd=" */
+#define EDD_CL_OFF      0x666f         /* "of" for off  */
+#define EDD_CL_SKIP     0x6b73         /* "sk" for skipmbr */
+
 #ifndef __ASSEMBLY__
 
 #define EDD_EXT_FIXED_DISK_ACCESS           (1 << 0)
diff -Nru a/include/linux/elf-fdpic.h b/include/linux/elf-fdpic.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/linux/elf-fdpic.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,68 @@
+/* elf-fdpic.h: FDPIC ELF load map
+ *
+ * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+#ifndef _LINUX_ELF_FDPIC_H
+#define _LINUX_ELF_FDPIC_H
+
+#include <linux/elf.h>
+
+#define PT_GNU_STACK    (PT_LOOS + 0x474e551)
+
+/* segment mappings for ELF FDPIC libraries/executables/interpreters */
+struct elf32_fdpic_loadseg {
+	Elf32_Addr	addr;		/* core address to which mapped */
+	Elf32_Addr	p_vaddr;	/* VMA recorded in file */
+	Elf32_Word	p_memsz;	/* allocation size recorded in file */
+};
+
+struct elf32_fdpic_loadmap {
+	Elf32_Half	version;	/* version of these structures, just in case... */
+	Elf32_Half	nsegs;		/* number of segments */
+	struct elf32_fdpic_loadseg segs[];
+};
+
+#define ELF32_FDPIC_LOADMAP_VERSION	0x0000
+
+/*
+ * binfmt binary parameters structure
+ */
+struct elf_fdpic_params {
+	struct elfhdr			hdr;		/* ref copy of ELF header */
+	struct elf_phdr			*phdrs;		/* ref copy of PT_PHDR table */
+	struct elf32_fdpic_loadmap	*loadmap;	/* loadmap to be passed to userspace */
+	unsigned long			elfhdr_addr;	/* mapped ELF header user address */
+	unsigned long			ph_addr;	/* mapped PT_PHDR user address */
+	unsigned long			map_addr;	/* mapped loadmap user address */
+	unsigned long			entry_addr;	/* mapped entry user address */
+	unsigned long			stack_size;	/* stack size requested (PT_GNU_STACK) */
+	unsigned long			dynamic_addr;	/* mapped PT_DYNAMIC user address */
+	unsigned long			load_addr;	/* user address at which to map binary */
+	unsigned long			flags;
+#define ELF_FDPIC_FLAG_ARRANGEMENT	0x0000000f	/* PT_LOAD arrangement flags */
+#define ELF_FDPIC_FLAG_INDEPENDENT	0x00000000	/* PT_LOADs can be put anywhere */
+#define ELF_FDPIC_FLAG_HONOURVADDR	0x00000001	/* PT_LOAD.vaddr must be honoured */
+#define ELF_FDPIC_FLAG_CONSTDISP	0x00000002	/* PT_LOADs require constant
+							 * displacement */
+#define ELF_FDPIC_FLAG_CONTIGUOUS	0x00000003	/* PT_LOADs should be contiguous */
+#define ELF_FDPIC_FLAG_EXEC_STACK	0x00000010	/* T if stack to be executable */
+#define ELF_FDPIC_FLAG_NOEXEC_STACK	0x00000020	/* T if stack not to be executable */
+#define ELF_FDPIC_FLAG_EXECUTABLE	0x00000040	/* T if this object is the executable */
+#define ELF_FDPIC_FLAG_PRESENT		0x80000000	/* T if this object is present */
+};
+
+#ifdef CONFIG_MMU
+extern void elf_fdpic_arch_lay_out_mm(struct elf_fdpic_params *exec_params,
+				      struct elf_fdpic_params *interp_params,
+				      unsigned long *start_stack,
+				      unsigned long *start_brk);
+#endif
+
+#endif /* _LINUX_ELF_FDPIC_H */
diff -Nru a/include/linux/elf.h b/include/linux/elf.h
--- a/include/linux/elf.h	2005-01-10 20:11:16 -08:00
+++ b/include/linux/elf.h	2005-01-10 20:11:16 -08:00
@@ -36,8 +36,9 @@
 #define PT_NOTE    4
 #define PT_SHLIB   5
 #define PT_PHDR    6
-#define PT_LOOS	   0x60000000
-#define PT_HIOS	   0x6fffffff
+#define PT_TLS     7               /* Thread local storage segment */
+#define PT_LOOS    0x60000000      /* OS-specific */
+#define PT_HIOS    0x6fffffff      /* OS-specific */
 #define PT_LOPROC  0x70000000
 #define PT_HIPROC  0x7fffffff
 #define PT_GNU_EH_FRAME		0x6474e550
@@ -108,6 +109,8 @@
  * This is the old interim value for S/390 architecture
  */
 #define EM_S390_OLD     0xA390
+
+#define EM_FRV		0x5441		/* Fujitsu FR-V */
 
 /* This is the info that is needed to parse the dynamic section of the file */
 #define DT_NULL		0
diff -Nru a/include/linux/etherdevice.h b/include/linux/etherdevice.h
--- a/include/linux/etherdevice.h	2005-01-10 20:11:22 -08:00
+++ b/include/linux/etherdevice.h	2005-01-10 20:11:22 -08:00
@@ -37,8 +37,6 @@
 						unsigned char * haddr);
 extern int		eth_header_cache(struct neighbour *neigh,
 					 struct hh_cache *hh);
-extern int		eth_header_parse(struct sk_buff *skb,
-					 unsigned char *haddr);
 
 extern struct net_device *alloc_etherdev(int sizeof_priv);
 static inline void eth_copy_and_sum (struct sk_buff *dest, 
diff -Nru a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h
--- a/include/linux/ext3_fs.h	2005-01-10 20:11:20 -08:00
+++ b/include/linux/ext3_fs.h	2005-01-10 20:11:20 -08:00
@@ -293,6 +293,8 @@
 			__u32	m_i_reserved2[2];
 		} masix2;
 	} osd2;				/* OS dependent 2 */
+	__u16	i_extra_isize;
+	__u16	i_pad1;
 };
 
 #define i_size_high	i_dir_acl
@@ -755,10 +757,10 @@
 extern struct buffer_head * ext3_getblk (handle_t *, struct inode *, long, int, int *);
 extern struct buffer_head * ext3_bread (handle_t *, struct inode *, int, int, int *);
 
+extern int ext3_get_inode_loc(struct inode *, struct ext3_iloc *, int);
 extern void ext3_read_inode (struct inode *);
 extern int  ext3_write_inode (struct inode *, int);
 extern int  ext3_setattr (struct dentry *, struct iattr *);
-extern void ext3_put_inode (struct inode *);
 extern void ext3_delete_inode (struct inode *);
 extern int  ext3_sync_inode (handle_t *, struct inode *);
 extern void ext3_discard_reservation (struct inode *);
diff -Nru a/include/linux/ext3_fs_i.h b/include/linux/ext3_fs_i.h
--- a/include/linux/ext3_fs_i.h	2005-01-10 20:11:15 -08:00
+++ b/include/linux/ext3_fs_i.h	2005-01-10 20:11:15 -08:00
@@ -113,6 +113,9 @@
 	 */
 	loff_t	i_disksize;
 
+	/* on-disk additional length */
+	__u16 i_extra_isize;
+
 	/*
 	 * truncate_sem is for serialising ext3_truncate() against
 	 * ext3_getblock().  In the 2.4 ext2 design, great chunks of inode's
diff -Nru a/include/linux/ext3_jbd.h b/include/linux/ext3_jbd.h
--- a/include/linux/ext3_jbd.h	2005-01-10 20:11:16 -08:00
+++ b/include/linux/ext3_jbd.h	2005-01-10 20:11:16 -08:00
@@ -138,10 +138,13 @@
 	journal_release_buffer(handle, bh, credits);
 }
 
-static inline void
-ext3_journal_forget(handle_t *handle, struct buffer_head *bh)
+static inline int
+__ext3_journal_forget(const char *where, handle_t *handle, struct buffer_head *bh)
 {
-	journal_forget(handle, bh);
+	int err = journal_forget(handle, bh);
+	if (err)
+		ext3_journal_abort_handle(where, __FUNCTION__, bh, handle,err);
+	return err;
 }
 
 static inline int
@@ -187,6 +190,10 @@
 	__ext3_journal_get_create_access(__FUNCTION__, (handle), (bh))
 #define ext3_journal_dirty_metadata(handle, bh) \
 	__ext3_journal_dirty_metadata(__FUNCTION__, (handle), (bh))
+#define ext3_journal_forget(handle, bh) \
+	__ext3_journal_forget(__FUNCTION__, (handle), (bh))
+
+int ext3_journal_dirty_data(handle_t *handle, struct buffer_head *bh);
 
 handle_t *ext3_journal_start_sb(struct super_block *sb, int nblocks);
 int __ext3_journal_stop(const char *where, handle_t *handle);
diff -Nru a/include/linux/fb.h b/include/linux/fb.h
--- a/include/linux/fb.h	2005-01-10 20:11:17 -08:00
+++ b/include/linux/fb.h	2005-01-10 20:11:17 -08:00
@@ -488,7 +488,8 @@
 #define FB_EVENT_GET_CONSOLE_MAP        0x06
 /*      set console to framebuffer mapping */
 #define FB_EVENT_SET_CONSOLE_MAP        0x07
-
+/*      A display blank is requested       */
+#define FB_EVENT_BLANK                  0x08
 
 struct fb_event {
 	struct fb_info *info;
@@ -690,7 +691,7 @@
 #define FBINFO_HWACCEL_YPAN		0x2000 /* optional */
 #define FBINFO_HWACCEL_YWRAP		0x4000 /* optional */
 
-#define FBINFO_MISC_MODECHANGEUSER     0x10000 /* mode change request
+#define FBINFO_MISC_USEREVENT          0x10000 /* event request
 						  from userspace */
 #define FBINFO_MISC_MODESWITCH         0x20000 /* mode switch */
 #define FBINFO_MISC_MODESWITCHLATE     0x40000 /* init hardware later */
diff -Nru a/include/linux/fs.h b/include/linux/fs.h
--- a/include/linux/fs.h	2005-01-10 20:11:17 -08:00
+++ b/include/linux/fs.h	2005-01-10 20:11:17 -08:00
@@ -123,7 +123,6 @@
 #define MS_REC		16384
 #define MS_VERBOSE	32768
 #define MS_POSIXACL	(1<<16)	/* VFS does not apply the umask */
-#define MS_ONE_SECOND	(1<<17)	/* fs has 1 sec a/m/ctime resolution */
 #define MS_ACTIVE	(1<<30)
 #define MS_NOUSER	(1<<31)
 
@@ -179,7 +178,6 @@
 #define IS_NOATIME(inode)	(__IS_FLG(inode, MS_NOATIME) || ((inode)->i_flags & S_NOATIME))
 #define IS_NODIRATIME(inode)	__IS_FLG(inode, MS_NODIRATIME)
 #define IS_POSIXACL(inode)	__IS_FLG(inode, MS_POSIXACL)
-#define IS_ONE_SECOND(inode)	__IS_FLG(inode, MS_ONE_SECOND)
 
 #define IS_DEADDIR(inode)	((inode)->i_flags & S_DEAD)
 #define IS_NOCMTIME(inode)	((inode)->i_flags & S_NOCMTIME)
@@ -343,7 +341,7 @@
 	struct prio_tree_root	i_mmap;		/* tree of private and shared mappings */
 	struct list_head	i_mmap_nonlinear;/*list VM_NONLINEAR mappings */
 	spinlock_t		i_mmap_lock;	/* protect tree, count, list */
-	atomic_t		truncate_count;	/* Cover race condition with truncate */
+	unsigned int		truncate_count;	/* Cover race condition with truncate */
 	unsigned long		nrpages;	/* number of total pages */
 	pgoff_t			writeback_index;/* writeback starts here */
 	struct address_space_operations *a_ops;	/* methods */
@@ -429,6 +427,7 @@
 struct inode {
 	struct hlist_node	i_hash;
 	struct list_head	i_list;
+	struct list_head	i_sb_list;
 	struct list_head	i_dentry;
 	unsigned long		i_ino;
 	atomic_t		i_count;
@@ -563,16 +562,17 @@
 struct file_ra_state {
 	unsigned long start;		/* Current window */
 	unsigned long size;
-	unsigned long next_size;	/* Next window size */
+	unsigned long flags;		/* ra flags RA_FLAG_xxx*/
+	unsigned long cache_hit;	/* cache hit count*/
 	unsigned long prev_page;	/* Cache last read() position */
 	unsigned long ahead_start;	/* Ahead window */
 	unsigned long ahead_size;
-	unsigned long currnt_wnd_hit;	/* locality in the current window */
-	unsigned long average;		/* size of next current window */
 	unsigned long ra_pages;		/* Maximum readahead window */
 	unsigned long mmap_hit;		/* Cache hit stat for mmap accesses */
 	unsigned long mmap_miss;	/* Cache miss stat for mmap accesses */
 };
+#define RA_FLAG_MISS 0x01	/* a cache miss occured against this file */
+#define RA_FLAG_INCACHE 0x02	/* file is already in cache */
 
 struct file {
 	struct list_head	f_list;
@@ -776,6 +776,7 @@
 	void                    *s_security;
 	struct xattr_handler	**s_xattr;
 
+	struct list_head	s_inodes;	/* all inodes */
 	struct list_head	s_dirty;	/* dirty inodes */
 	struct list_head	s_io;		/* parked for writeback */
 	struct hlist_head	s_anon;		/* anonymous dentries for (nfs) exporting */
@@ -797,8 +798,14 @@
 	 * even looking at it. You had been warned.
 	 */
 	struct semaphore s_vfs_rename_sem;	/* Kludge */
+
+	/* Granuality of c/m/atime in ns.
+	   Cannot be worse than a second */
+	u32		   s_time_gran;
 };
 
+extern struct timespec current_fs_time(struct super_block *sb);
+
 /*
  * Snapshotting support.
  */
@@ -992,6 +999,9 @@
 	void (*umount_begin) (struct super_block *);
 
 	int (*show_options)(struct seq_file *, struct vfsmount *);
+
+	ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t);
+	ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t);
 };
 
 /* Inode state bits.  Protected by inode_lock. */
@@ -1185,11 +1195,6 @@
 
 extern int vfs_statfs(struct super_block *, struct kstatfs *);
 
-/* Return value for VFS lock functions - tells locks.c to lock conventionally
- * REALLY kosha for root NFS and nfs_lock
- */ 
-#define LOCK_USE_CLNT 1
-
 #define FLOCK_VERIFY_READ  1
 #define FLOCK_VERIFY_WRITE 2
 
@@ -1340,7 +1345,7 @@
 	    S_ISLNK(inode->i_mode))
 		invalidate_inode_pages(inode->i_mapping);
 }
-extern void invalidate_inode_pages2(struct address_space *mapping);
+extern int invalidate_inode_pages2(struct address_space *mapping);
 extern void write_inode_now(struct inode *, int);
 extern int filemap_fdatawrite(struct address_space *);
 extern int filemap_flush(struct address_space *);
diff -Nru a/include/linux/generic_serial.h b/include/linux/generic_serial.h
--- a/include/linux/generic_serial.h	2005-01-10 20:11:22 -08:00
+++ b/include/linux/generic_serial.h	2005-01-10 20:11:22 -08:00
@@ -82,7 +82,6 @@
 void gs_stop(struct tty_struct *tty);
 void gs_start(struct tty_struct *tty);
 void gs_hangup(struct tty_struct *tty);
-void gs_do_softint(void *private_);
 int  gs_block_til_ready(void *port, struct file *filp);
 void gs_close(struct tty_struct *tty, struct file *filp);
 void gs_set_termios (struct tty_struct * tty, 
diff -Nru a/include/linux/genhd.h b/include/linux/genhd.h
--- a/include/linux/genhd.h	2005-01-10 20:11:16 -08:00
+++ b/include/linux/genhd.h	2005-01-10 20:11:16 -08:00
@@ -218,6 +218,7 @@
 extern void disk_round_stats(struct gendisk *disk);
 
 /* drivers/block/genhd.c */
+extern int get_blkdev_list(char *);
 extern void add_disk(struct gendisk *disk);
 extern void del_gendisk(struct gendisk *gp);
 extern void unlink_gendisk(struct gendisk *gp);
diff -Nru a/include/linux/gfp.h b/include/linux/gfp.h
--- a/include/linux/gfp.h	2005-01-10 20:11:17 -08:00
+++ b/include/linux/gfp.h	2005-01-10 20:11:17 -08:00
@@ -37,6 +37,7 @@
 #define __GFP_NORETRY	0x1000	/* Do not retry.  Might fail */
 #define __GFP_NO_GROW	0x2000	/* Slab internal usage */
 #define __GFP_COMP	0x4000	/* Add compound page metadata */
+#define __GFP_ZERO	0x8000	/* Return zeroed page on success */
 
 #define __GFP_BITS_SHIFT 16	/* Room for 16 __GFP_FOO bits */
 #define __GFP_BITS_MASK ((1 << __GFP_BITS_SHIFT) - 1)
diff -Nru a/include/linux/hardirq.h b/include/linux/hardirq.h
--- a/include/linux/hardirq.h	2005-01-10 20:11:18 -08:00
+++ b/include/linux/hardirq.h	2005-01-10 20:11:18 -08:00
@@ -61,12 +61,16 @@
 #define in_softirq()		(softirq_count())
 #define in_interrupt()		(irq_count())
 
-#ifdef CONFIG_PREEMPT
+#if defined(CONFIG_PREEMPT) && !defined(CONFIG_PREEMPT_BKL)
 # define in_atomic()	((preempt_count() & ~PREEMPT_ACTIVE) != kernel_locked())
+#else
+# define in_atomic()	((preempt_count() & ~PREEMPT_ACTIVE) != 0)
+#endif
+
+#ifdef CONFIG_PREEMPT
 # define preemptible()	(preempt_count() == 0 && !irqs_disabled())
 # define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
 #else
-# define in_atomic()	(preempt_count() != 0)
 # define preemptible()	0
 # define IRQ_EXIT_OFFSET HARDIRQ_OFFSET
 #endif
@@ -77,12 +81,10 @@
 # define synchronize_irq(irq)	barrier()
 #endif
 
-#ifdef CONFIG_GENERIC_HARDIRQS
-#define nmi_enter()		(preempt_count() += HARDIRQ_OFFSET)
-#define nmi_exit()		(preempt_count() -= HARDIRQ_OFFSET)
+#define nmi_enter()		irq_enter()
+#define nmi_exit()		sub_preempt_count(HARDIRQ_OFFSET)
 
-#define irq_enter()		(preempt_count() += HARDIRQ_OFFSET)
+#define irq_enter()		add_preempt_count(HARDIRQ_OFFSET)
 extern void irq_exit(void);
-#endif
 
 #endif /* LINUX_HARDIRQ_H */
diff -Nru a/include/linux/highmem.h b/include/linux/highmem.h
--- a/include/linux/highmem.h	2005-01-10 20:11:21 -08:00
+++ b/include/linux/highmem.h	2005-01-10 20:11:21 -08:00
@@ -9,8 +9,6 @@
 
 #ifdef CONFIG_HIGHMEM
 
-extern struct page *highmem_start_page;
-
 #include <asm/highmem.h>
 
 /* declarations for linux/mm/highmem.c */
diff -Nru a/include/linux/i2c-algo-sgi.h b/include/linux/i2c-algo-sgi.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/linux/i2c-algo-sgi.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,27 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License version 2 as published by the Free Software Foundation.
+ *
+ * Copyright (C) 2003 Ladislav Michl <ladis@linux-mips.org>
+ */
+
+#ifndef I2C_ALGO_SGI_H
+#define I2C_ALGO_SGI_H 1
+
+#include <linux/i2c.h>
+
+struct i2c_algo_sgi_data {
+	void *data;	/* private data for lowlevel routines */
+	unsigned (*getctrl)(void *data);
+	void (*setctrl)(void *data, unsigned val);
+	unsigned (*rdata)(void *data);
+	void (*wdata)(void *data, unsigned val);
+
+	int xfer_timeout;
+	int ack_timeout;
+};
+
+int i2c_sgi_add_bus(struct i2c_adapter *);
+int i2c_sgi_del_bus(struct i2c_adapter *);
+
+#endif /* I2C_ALGO_SGI_H */
diff -Nru a/include/linux/i2c-algo-sibyte.h b/include/linux/i2c-algo-sibyte.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/linux/i2c-algo-sibyte.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2001,2002,2003 Broadcom Corporation
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
+#ifndef I2C_ALGO_SIBYTE_H
+#define I2C_ALGO_SIBYTE_H 1
+
+#include <linux/i2c.h>
+
+struct i2c_algo_sibyte_data {
+	void *data;		/* private data */
+        int   bus;		/* which bus */
+        void *reg_base;		/* CSR base */
+};
+
+int i2c_sibyte_add_bus(struct i2c_adapter *, int speed);
+int i2c_sibyte_del_bus(struct i2c_adapter *);
+
+#endif /* I2C_ALGO_SIBYTE_H */
diff -Nru a/include/linux/i2c-id.h b/include/linux/i2c-id.h
--- a/include/linux/i2c-id.h	2005-01-10 20:11:16 -08:00
+++ b/include/linux/i2c-id.h	2005-01-10 20:11:16 -08:00
@@ -109,6 +109,7 @@
 #define I2C_DRIVERID_OVCAMCHIP	61	/* OmniVision CMOS image sens.	*/
 #define I2C_DRIVERID_TDA7313	62	/* TDA7313 audio processor	*/
 #define I2C_DRIVERID_MAX6900	63	/* MAX6900 real-time clock	*/
+#define I2C_DRIVERID_SAA7114H	64	/* video decoder		*/
 
 
 #define I2C_DRIVERID_EXP0	0xF0	/* experimental use id's	*/
@@ -166,6 +167,7 @@
 #define I2C_DRIVERID_ASB100 1043
 #define I2C_DRIVERID_FSCHER 1046
 #define I2C_DRIVERID_W83L785TS 1047
+#define I2C_DRIVERID_SMSC47B397 1050
 
 /*
  * ---- Adapter types ----------------------------------------------------
@@ -193,9 +195,12 @@
 #define I2C_ALGO_MPC8XX 0x110000	/* MPC8xx PowerPC I2C algorithm */
 #define I2C_ALGO_OCP    0x120000	/* IBM or otherwise On-chip I2C algorithm */
 #define I2C_ALGO_BITHS	0x130000	/* enhanced bit style adapters	*/
-#define I2C_ALGO_OCP_IOP3XX  0x140000	/* XSCALE IOP3XX On-chip I2C alg */
+#define I2C_ALGO_IOP3XX	0x140000	/* XSCALE IOP3XX On-chip I2C alg */
 #define I2C_ALGO_PCA	0x150000	/* PCA 9564 style adapters	*/
 
+#define I2C_ALGO_SIBYTE 0x150000	/* Broadcom SiByte SOCs		*/
+#define I2C_ALGO_SGI	0x160000        /* SGI algorithm                */
+
 #define I2C_ALGO_EXP	0x800000	/* experimental			*/
 
 #define I2C_ALGO_MASK	0xff0000	/* Mask for algorithms		*/
@@ -258,8 +263,15 @@
 /* --- PowerPC on-chip adapters						*/
 #define I2C_HW_OCP 0x00	/* IBM on-chip I2C adapter 	*/
 
+/* --- Broadcom SiByte adapters						*/
+#define I2C_HW_SIBYTE	0x00
+
+/* --- SGI adapters							*/
+#define I2C_HW_SGI_VINO	0x00
+#define I2C_HW_SGI_MACE	0x01
+
 /* --- XSCALE on-chip adapters                          */
-#define I2C_HW_IOP321 0x00
+#define I2C_HW_IOP3XX 0x00
 
 /* --- SMBus only adapters						*/
 #define I2C_HW_SMBUS_PIIX4	0x00
diff -Nru a/include/linux/ide.h b/include/linux/ide.h
--- a/include/linux/ide.h	2005-01-10 20:11:18 -08:00
+++ b/include/linux/ide.h	2005-01-10 20:11:18 -08:00
@@ -1097,9 +1097,8 @@
 	int		(*cleanup)(ide_drive_t *);
 	ide_startstop_t	(*do_request)(ide_drive_t *, struct request *, sector_t);
 	int		(*end_request)(ide_drive_t *, int, int);
-	u8		(*sense)(ide_drive_t *, const char *, u8);
-	ide_startstop_t	(*error)(ide_drive_t *, const char *, u8);
-	ide_startstop_t	(*abort)(ide_drive_t *, const char *);
+	ide_startstop_t	(*error)(ide_drive_t *, struct request *rq, u8, u8);
+	ide_startstop_t	(*abort)(ide_drive_t *, struct request *rq);
 	int		(*ioctl)(ide_drive_t *, struct inode *, struct file *, unsigned int, unsigned long);
 	void		(*pre_reset)(ide_drive_t *);
 	sector_t	(*capacity)(ide_drive_t *);
@@ -1147,12 +1146,7 @@
  */
 extern void ide_execute_command(ide_drive_t *, task_ioreg_t cmd, ide_handler_t *, unsigned int, ide_expiry_t *);
 
-/*
- * Error reporting, in human readable form (luxurious, but a memory hog).
- *
- * (drive, msg, status)
- */
-byte ide_dump_status (ide_drive_t *drive, const char *msg, byte stat);
+ide_startstop_t __ide_error(ide_drive_t *, struct request *, u8, u8);
 
 /*
  * ide_error() takes action based on the error returned by the controller.
@@ -1162,6 +1156,8 @@
  */
 ide_startstop_t ide_error (ide_drive_t *drive, const char *msg, byte stat);
 
+ide_startstop_t __ide_abort(ide_drive_t *, struct request *);
+
 /*
  * Abort a running command on the controller triggering the abort
  * from a host side, non error situation
@@ -1192,11 +1188,6 @@
 extern int ide_wait_stat(ide_startstop_t *, ide_drive_t *, u8, u8, unsigned long);
 
 /*
- * Return the current idea about the total capacity of this drive.
- */
-extern sector_t current_capacity (ide_drive_t *drive);
-
-/*
  * Start a reset operation for an IDE interface.
  * The caller should return immediately after invoking this.
  */
@@ -1422,7 +1413,7 @@
 
 typedef struct ide_pci_device_s {
 	char			*name;
-	void			(*init_setup)(struct pci_dev *, struct ide_pci_device_s *);
+	int			(*init_setup)(struct pci_dev *, struct ide_pci_device_s *);
 	void			(*init_setup_dma)(struct pci_dev *, struct ide_pci_device_s *, ide_hwif_t *);
 	unsigned int		(*init_chipset)(struct pci_dev *, const char *);
 	void			(*init_iops)(ide_hwif_t *);
@@ -1438,8 +1429,8 @@
 	u8			flags;
 } ide_pci_device_t;
 
-extern void ide_setup_pci_device(struct pci_dev *, ide_pci_device_t *);
-extern void ide_setup_pci_devices(struct pci_dev *, struct pci_dev *, ide_pci_device_t *);
+extern int ide_setup_pci_device(struct pci_dev *, ide_pci_device_t *);
+extern int ide_setup_pci_devices(struct pci_dev *, struct pci_dev *, ide_pci_device_t *);
 
 void ide_map_sg(ide_drive_t *, struct request *);
 void ide_init_sg_cmd(ide_drive_t *, struct request *);
@@ -1511,7 +1502,8 @@
 extern char *ide_xfer_verbose(u8 xfer_rate);
 extern void ide_toggle_bounce(ide_drive_t *drive, int on);
 extern int ide_set_xfer_rate(ide_drive_t *drive, u8 rate);
-extern byte ide_dump_atapi_status(ide_drive_t *drive, const char *msg, byte stat);
+
+u8 ide_dump_status(ide_drive_t *, const char *, u8);
 
 typedef struct ide_pio_timings_s {
 	int	setup_time;	/* Address setup (ns) minimum */
diff -Nru a/include/linux/if_arcnet.h b/include/linux/if_arcnet.h
--- a/include/linux/if_arcnet.h	2005-01-10 20:11:16 -08:00
+++ b/include/linux/if_arcnet.h	2005-01-10 20:11:16 -08:00
@@ -23,6 +23,9 @@
  *    These are the defined ARCnet Protocol ID's.
  */
 
+/* CAP mode */
+/* No macro but uses 1-8 */
+
 /* RFC1201 Protocol ID's */
 #define ARC_P_IP		212	/* 0xD4 */
 #define ARC_P_IPV6		196	/* 0xC4: RFC2497 */
@@ -86,6 +89,16 @@
 #define ETH_ENCAP_HDR_SIZE 14
 
 
+struct arc_cap
+{
+	uint8_t proto;
+	uint8_t cookie[sizeof(int)];   /* Actually NOT sent over the network */
+	union {
+		uint8_t ack;
+		uint8_t raw[0];		/* 507 bytes */
+	} mes;
+};
+
 /*
  * The data needed by the actual arcnet hardware.
  *
@@ -116,6 +129,7 @@
 	struct arc_rfc1201   rfc1201;
 	struct arc_rfc1051   rfc1051;
 	struct arc_eth_encap eth_encap;
+	struct arc_cap       cap;
 	uint8_t raw[0];		/* 508 bytes				*/
     } soft;
 };
diff -Nru a/include/linux/if_ether.h b/include/linux/if_ether.h
--- a/include/linux/if_ether.h	2005-01-10 20:11:20 -08:00
+++ b/include/linux/if_ether.h	2005-01-10 20:11:20 -08:00
@@ -69,7 +69,7 @@
 #define ETH_P_ATMFATE	0x8884		/* Frame-based ATM Transport
 					 * over Ethernet
 					 */
-#define ETH_P_EDP2	0x88A2		/* Coraid EDP2			*/
+#define ETH_P_AOE	0x88A2		/* ATA over Ethernet		*/
 
 /*
  *	Non DIX types. Won't clash for 1500 types.
@@ -91,6 +91,7 @@
 #define ETH_P_IRDA	0x0017		/* Linux-IrDA			*/
 #define ETH_P_ECONET	0x0018		/* Acorn Econet			*/
 #define ETH_P_HDLC	0x0019		/* HDLC frames			*/
+#define ETH_P_ARCNET	0x001A		/* 1A for ArcNet :-)            */
 
 /*
  *	This is an Ethernet frame header.
diff -Nru a/include/linux/if_infiniband.h b/include/linux/if_infiniband.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/linux/if_infiniband.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,29 @@
+/*
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available at
+ * <http://www.fsf.org/copyleft/gpl.html>, or the OpenIB.org BSD
+ * license, available in the LICENSE.TXT file accompanying this
+ * software.  These details are also available at
+ * <http://openib.org/license.html>.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Copyright (c) 2004 Topspin Communications.  All rights reserved.
+ *
+ * $Id$
+ */
+
+#ifndef _LINUX_IF_INFINIBAND_H
+#define _LINUX_IF_INFINIBAND_H
+
+#define INFINIBAND_ALEN		20	/* Octets in IPoIB HW addr	*/
+
+#endif /* _LINUX_IF_INFINIBAND_H */
diff -Nru a/include/linux/if_tun.h b/include/linux/if_tun.h
--- a/include/linux/if_tun.h	2005-01-10 20:11:17 -08:00
+++ b/include/linux/if_tun.h	2005-01-10 20:11:17 -08:00
@@ -45,6 +45,11 @@
 
 	struct fasync_struct    *fasync;
 
+	unsigned long if_flags;
+	u8 dev_addr[ETH_ALEN];
+	u32 chr_filter[2];
+	u32 net_filter[2];
+
 #ifdef TUN_DEBUG	
 	int debug;
 #endif  
diff -Nru a/include/linux/init.h b/include/linux/init.h
--- a/include/linux/init.h	2005-01-10 20:11:16 -08:00
+++ b/include/linux/init.h	2005-01-10 20:11:16 -08:00
@@ -64,8 +64,8 @@
 typedef int (*initcall_t)(void);
 typedef void (*exitcall_t)(void);
 
-extern initcall_t __con_initcall_start, __con_initcall_end;
-extern initcall_t __security_initcall_start, __security_initcall_end;
+extern initcall_t __con_initcall_start[], __con_initcall_end[];
+extern initcall_t __security_initcall_start[], __security_initcall_end[];
 
 /* Defined in init/main.c */
 extern char saved_command_line[];
diff -Nru a/include/linux/init_task.h b/include/linux/init_task.h
--- a/include/linux/init_task.h	2005-01-10 20:11:16 -08:00
+++ b/include/linux/init_task.h	2005-01-10 20:11:16 -08:00
@@ -46,6 +46,7 @@
 
 #define INIT_SIGNALS(sig) {	\
 	.count		= ATOMIC_INIT(1), 		\
+	.wait_chldexit	= __WAIT_QUEUE_HEAD_INITIALIZER(sig.wait_chldexit),\
 	.shared_pending	= { 				\
 		.list = LIST_HEAD_INIT(sig.shared_pending.list),	\
 		.signal =  {{0}}}, \
@@ -88,7 +89,6 @@
 	.children	= LIST_HEAD_INIT(tsk.children),			\
 	.sibling	= LIST_HEAD_INIT(tsk.sibling),			\
 	.group_leader	= &tsk,						\
-	.wait_chldexit	= __WAIT_QUEUE_HEAD_INITIALIZER(tsk.wait_chldexit),\
 	.real_timer	= {						\
 		.function	= it_real_fn				\
 	},								\
diff -Nru a/include/linux/input.h b/include/linux/input.h
--- a/include/linux/input.h	2005-01-10 20:11:18 -08:00
+++ b/include/linux/input.h	2005-01-10 20:11:18 -08:00
@@ -504,6 +504,9 @@
 #define REL_X			0x00
 #define REL_Y			0x01
 #define REL_Z			0x02
+#define REL_RX			0x03
+#define REL_RY			0x04
+#define REL_RZ			0x05
 #define REL_HWHEEL		0x06
 #define REL_DIAL		0x07
 #define REL_WHEEL		0x08
@@ -566,6 +569,8 @@
 #define LED_SUSPEND		0x06
 #define LED_MUTE		0x07
 #define LED_MISC		0x08
+#define LED_MAIL		0x09
+#define LED_CHARGING		0x0a
 #define LED_MAX			0x0f
 
 /*
@@ -823,7 +828,6 @@
 	unsigned int repeat_key;
 	struct timer_list timer;
 
-	struct pm_dev *pm_dev;
 	struct pt_regs *regs;
 	int state;
 
diff -Nru a/include/linux/interrupt.h b/include/linux/interrupt.h
--- a/include/linux/interrupt.h	2005-01-10 20:11:19 -08:00
+++ b/include/linux/interrupt.h	2005-01-10 20:11:19 -08:00
@@ -70,9 +70,9 @@
 
 /* SoftIRQ primitives.  */
 #define local_bh_disable() \
-		do { preempt_count() += SOFTIRQ_OFFSET; barrier(); } while (0)
+		do { add_preempt_count(SOFTIRQ_OFFSET); barrier(); } while (0)
 #define __local_bh_enable() \
-		do { barrier(); preempt_count() -= SOFTIRQ_OFFSET; } while (0)
+		do { barrier(); sub_preempt_count(SOFTIRQ_OFFSET); } while (0)
 
 extern void local_bh_enable(void);
 
diff -Nru a/include/linux/ip.h b/include/linux/ip.h
--- a/include/linux/ip.h	2005-01-10 20:11:17 -08:00
+++ b/include/linux/ip.h	2005-01-10 20:11:17 -08:00
@@ -107,7 +107,14 @@
 
 #define optlength(opt) (sizeof(struct ip_options) + opt->optlen)
 
-struct inet_opt {
+struct ipv6_pinfo;
+
+struct inet_sock {
+	/* sk and pinet6 has to be the first two members of inet_sock */
+	struct sock		sk;
+#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
+	struct ipv6_pinfo	*pinet6;
+#endif
 	/* Socket demultiplex comparisons on incoming packets. */
 	__u32			daddr;		/* Foreign IPv4 addr */
 	__u32			rcv_saddr;	/* Bound local IPv4 addr */
@@ -146,20 +153,9 @@
 
 #define IPCORK_OPT	1	/* ip-options has been held in ipcork.opt */
 
-struct ipv6_pinfo;
-
-/* WARNING: don't change the layout of the members in inet_sock! */
-struct inet_sock {
-	struct sock	  sk;
-#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
-	struct ipv6_pinfo *pinet6;
-#endif
-	struct inet_opt   inet;
-};
-
-static inline struct inet_opt * inet_sk(const struct sock *__sk)
+static inline struct inet_sock *inet_sk(const struct sock *sk)
 {
-	return &((struct inet_sock *)__sk)->inet;
+	return (struct inet_sock *)sk;
 }
 
 #endif
diff -Nru a/include/linux/ipmi.h b/include/linux/ipmi.h
--- a/include/linux/ipmi.h	2005-01-10 20:11:23 -08:00
+++ b/include/linux/ipmi.h	2005-01-10 20:11:23 -08:00
@@ -253,7 +253,6 @@
 {
 	msg->done(msg);
 }
-struct ipmi_recv_msg *ipmi_alloc_recv_msg(void);
 
 struct ipmi_user_hndl
 {
@@ -303,32 +302,6 @@
 unsigned char ipmi_get_my_LUN(ipmi_user_t user);
 
 /*
- * Send a command request from the given user.  The address is the
- * proper address for the channel type.  If this is a command, then
- * the message response comes back, the receive handler for this user
- * will be called with the given msgid value in the recv msg.  If this
- * is a response to a command, then the msgid will be used as the
- * sequence number for the response (truncated if necessary), so when
- * sending a response you should use the sequence number you received
- * in the msgid field of the received command.  If the priority is >
- * 0, the message will go into a high-priority queue and be sent
- * first.  Otherwise, it goes into a normal-priority queue.
- * The user_msg_data field will be returned in any response to this
- * message.
- *
- * Note that if you send a response (with the netfn lower bit set),
- * you *will* get back a SEND_MSG response telling you what happened
- * when the response was sent.  You will not get back a response to
- * the message itself.
- */
-int ipmi_request(ipmi_user_t      user,
-		 struct ipmi_addr *addr,
-		 long             msgid,
-		 struct kernel_ipmi_msg *msg,
-		 void             *user_msg_data,
-		 int              priority);
-
-/*
  * Like ipmi_request, but lets you specify the number of retries and
  * the retry time.  The retries is the number of times the message
  * will be resent if no reply is received.  If set to -1, the default
@@ -351,18 +324,6 @@
 			 unsigned int     retry_time_ms);
 
 /*
- * Like ipmi_request, but lets you specify the slave return address.
- */
-int ipmi_request_with_source(ipmi_user_t      user,
-			     struct ipmi_addr *addr,
-			     long             msgid,
-			     struct kernel_ipmi_msg  *msg,
-			     void             *user_msg_data,
-			     int              priority,
-			     unsigned char    source_address,
-			     unsigned char    source_lun);
-
-/*
  * Like ipmi_request, but with messages supplied.  This will not
  * allocate any memory, and the messages may be statically allocated
  * (just make sure to do the "done" handling on them).  Note that this
@@ -381,16 +342,6 @@
 			     int                  priority);
 
 /*
- * Do polling on the IPMI interface the user is attached to.  This
- * causes the IPMI code to do an immediate check for information from
- * the driver and handle anything that is immediately pending.  This
- * will not block in anyway.  This is useful if you need to implement
- * polling from the user like you need to send periodic watchdog pings
- * from a crash dump, or something like that.
- */
-void ipmi_poll_interface(ipmi_user_t user);
-
-/*
  * When commands come in to the SMS, the user can register to receive
  * them.  Only one user can be listening on a specific netfn/cmd pair
  * at a time, you will get an EBUSY error if the command is already
@@ -420,17 +371,6 @@
 int ipmi_set_gets_events(ipmi_user_t user, int val);
 
 /*
- * Register the given user to handle all received IPMI commands.  This
- * will fail if anyone is registered as a command receiver or if
- * another is already registered to receive all commands.  NOTE THAT
- * THIS IS FOR EMULATION USERS ONLY, DO NOT USER THIS FOR NORMAL
- * STUFF.
- */
-int ipmi_register_all_cmd_rcvr(ipmi_user_t user);
-int ipmi_unregister_all_cmd_rcvr(ipmi_user_t user);
-
-
-/*
  * Called when a new SMI is registered.  This will also be called on
  * every existing interface when a new watcher is registered with
  * ipmi_smi_watcher_register().
@@ -462,9 +402,6 @@
 
 /* Validate that the given IPMI address is valid. */
 int ipmi_validate_addr(struct ipmi_addr *addr, int len);
-
-/* Return 1 if the given addresses are equal, 0 if not. */
-int ipmi_addr_equal(struct ipmi_addr *addr1, struct ipmi_addr *addr2);
 
 #endif /* __KERNEL__ */
 
diff -Nru a/include/linux/ipv6.h b/include/linux/ipv6.h
--- a/include/linux/ipv6.h	2005-01-10 20:11:21 -08:00
+++ b/include/linux/ipv6.h	2005-01-10 20:11:21 -08:00
@@ -256,32 +256,26 @@
 
 /* WARNING: don't change the layout of the members in {raw,udp,tcp}6_sock! */
 struct raw6_sock {
-	struct sock	  sk;
-	struct ipv6_pinfo *pinet6;
-	struct inet_opt   inet;
+	struct inet_sock  inet;
 	struct raw6_opt   raw6;
 	struct ipv6_pinfo inet6;
 };
 
 struct udp6_sock {
-	struct sock	  sk;
-	struct ipv6_pinfo *pinet6;
-	struct inet_opt   inet;
+	struct inet_sock  inet;
 	struct udp_opt	  udp;
 	struct ipv6_pinfo inet6;
 };
 
 struct tcp6_sock {
-	struct sock	  sk;
-	struct ipv6_pinfo *pinet6;
-	struct inet_opt   inet;
-	struct tcp_opt	  tcp;
+	struct tcp_sock	  tcp;
 	struct ipv6_pinfo inet6;
 };
 
+#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
 static inline struct ipv6_pinfo * inet6_sk(const struct sock *__sk)
 {
-	return ((struct raw6_sock *)__sk)->pinet6;
+	return inet_sk(__sk)->pinet6;
 }
 
 static inline struct raw6_opt * raw6_sk(const struct sock *__sk)
@@ -289,12 +283,22 @@
 	return &((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)->sk_family == PF_INET6 && __ipv6_only_sock(sk))
 #else
 #define __ipv6_only_sock(sk)	0
 #define ipv6_only_sock(sk)	0
+
+static inline struct ipv6_pinfo * inet6_sk(const struct sock *__sk)
+{
+	return NULL;
+}
+
+static inline struct raw6_opt * raw6_sk(const struct sock *__sk)
+{
+	return NULL;
+}
+
 #endif
 
 #endif
diff -Nru a/include/linux/isicom.h b/include/linux/isicom.h
--- a/include/linux/isicom.h	2005-01-10 20:11:18 -08:00
+++ b/include/linux/isicom.h	2005-01-10 20:11:18 -08:00
@@ -125,179 +125,6 @@
 
 #define		ISI_TXOK		0x0001 
  
-struct	isi_board {
-	unsigned short		base;
-	unsigned char		irq;
-	unsigned char		port_count;
-	unsigned short		status;
-	unsigned short		port_status; /* each bit represents a single port */
-	unsigned short		shift_count;
-	struct isi_port		* ports;
-	signed char		count;
-	unsigned char		isa;
-};
-
-struct	isi_port {
-	unsigned short		magic;
-	unsigned int		flags;
-	int			count;
-	int			blocked_open;
-	int			close_delay;
-	unsigned short		channel;
-	unsigned short		status;
-	unsigned short		closing_wait;
-	struct isi_board	* card;
-	struct tty_struct 	* tty;
-	wait_queue_head_t	close_wait;
-	wait_queue_head_t	open_wait;
-	struct work_struct	hangup_tq;
-	struct work_struct	bh_tqueue;
-	unsigned char		* xmit_buf;
-	int			xmit_head;
-	int			xmit_tail;
-	int			xmit_cnt;
-};
-
-
-/*
- *  ISI Card specific ops ...
- */
- 
-static inline void raise_dtr(struct isi_port * port)
-{
-	struct isi_board * card = port->card;
-	unsigned short base = card->base;
-	unsigned char channel = port->channel;
-	short wait=400;
-	while(((inw(base+0x0e) & 0x01) == 0) && (wait-- > 0));
-	if (wait <= 0) {
-		printk(KERN_WARNING "ISICOM: Card found busy in raise_dtr.\n");
-		return;
-	}
-#ifdef ISICOM_DEBUG_DTR_RTS	
-	printk(KERN_DEBUG "ISICOM: raise_dtr.\n");
-#endif	
-	outw(0x8000 | (channel << card->shift_count) | 0x02 , base);
-	outw(0x0504, base);
-	InterruptTheCard(base);
-	port->status |= ISI_DTR;
-}
-
-static inline void drop_dtr(struct isi_port * port)
-{	
-	struct isi_board * card = port->card;
-	unsigned short base = card->base;
-	unsigned char channel = port->channel;
-	short wait=400;
-	while(((inw(base+0x0e) & 0x01) == 0) && (wait-- > 0));
-	if (wait <= 0) {
-		printk(KERN_WARNING "ISICOM: Card found busy in drop_dtr.\n");
-		return;
-	}
-#ifdef ISICOM_DEBUG_DTR_RTS	
-	printk(KERN_DEBUG "ISICOM: drop_dtr.\n");
-#endif	
-	outw(0x8000 | (channel << card->shift_count) | 0x02 , base);
-	outw(0x0404, base);
-	InterruptTheCard(base);	
-	port->status &= ~ISI_DTR;
-}
-static inline void raise_rts(struct isi_port * port)
-{
-	struct isi_board * card = port->card;
-	unsigned short base = card->base;
-	unsigned char channel = port->channel;
-	short wait=400;
-	while(((inw(base+0x0e) & 0x01) == 0) && (wait-- > 0));
-	if (wait <= 0) {
-		printk(KERN_WARNING "ISICOM: Card found busy in raise_rts.\n");
-		return;
-	}
-#ifdef ISICOM_DEBUG_DTR_RTS	
-	printk(KERN_DEBUG "ISICOM: raise_rts.\n");
-#endif	
-	outw(0x8000 | (channel << card->shift_count) | 0x02 , base);
-	outw(0x0a04, base);
-	InterruptTheCard(base);	
-	port->status |= ISI_RTS;
-}
-static inline void drop_rts(struct isi_port * port)
-{
-	struct isi_board * card = port->card;
-	unsigned short base = card->base;
-	unsigned char channel = port->channel;
-	short wait=400;
-	while(((inw(base+0x0e) & 0x01) == 0) && (wait-- > 0));
-	if (wait <= 0) {
-		printk(KERN_WARNING "ISICOM: Card found busy in drop_rts.\n");
-		return;
-	}
-#ifdef ISICOM_DEBUG_DTR_RTS	
-	printk(KERN_DEBUG "ISICOM: drop_rts.\n");
-#endif	
-	outw(0x8000 | (channel << card->shift_count) | 0x02 , base);
-	outw(0x0804, base);
-	InterruptTheCard(base);	
-	port->status &= ~ISI_RTS;
-}
-static inline void raise_dtr_rts(struct isi_port * port)
-{
-	struct isi_board * card = port->card;
-	unsigned short base = card->base;
-	unsigned char channel = port->channel;
-	short wait=400;
-	while(((inw(base+0x0e) & 0x01) == 0) && (wait-- > 0));
-	if (wait <= 0) {
-		printk(KERN_WARNING "ISICOM: Card found busy in raise_dtr_rts.\n");
-		return;
-	}
-#ifdef ISICOM_DEBUG_DTR_RTS	
-	printk(KERN_DEBUG "ISICOM: raise_dtr_rts.\n");
-#endif	
-	outw(0x8000 | (channel << card->shift_count) | 0x02 , base);
-	outw(0x0f04, base);
-	InterruptTheCard(base);
-	port->status |= (ISI_DTR | ISI_RTS);
-}
-static inline void drop_dtr_rts(struct isi_port * port)
-{
-	struct isi_board * card = port->card;
-	unsigned short base = card->base;
-	unsigned char channel = port->channel;
-	short wait=400;
-	while(((inw(base+0x0e) & 0x01) == 0) && (wait-- > 0));
-	if (wait <= 0) {
-		printk(KERN_WARNING "ISICOM: Card found busy in drop_dtr_rts.\n");
-		return;
-	}
-#ifdef ISICOM_DEBUG_DTR_RTS	
-	printk(KERN_DEBUG "ISICOM: drop_dtr_rts.\n");
-#endif	
-	outw(0x8000 | (channel << card->shift_count) | 0x02 , base);
-	outw(0x0c04, base);
-	InterruptTheCard(base);	
-	port->status &= ~(ISI_RTS | ISI_DTR);
-}
-
-static inline void kill_queue(struct isi_port * port, short queue)
-{
-	struct isi_board * card = port->card;
-	unsigned short base = card->base;
-	unsigned char channel = port->channel;
-	short wait=400;
-	while(((inw(base+0x0e) & 0x01) == 0) && (wait-- > 0));
-	if (wait <= 0) {
-		printk(KERN_WARNING "ISICOM: Card found busy in kill_queue.\n");
-		return;
-	}
-#ifdef ISICOM_DEBUG	
-	printk(KERN_DEBUG "ISICOM: kill_queue 0x%x.\n", queue);
-#endif	
-	outw(0x8000 | (channel << card->shift_count) | 0x02 , base);
-	outw((queue << 8) | 0x06, base);
-	InterruptTheCard(base);	
-}
-
 #endif	/*	__KERNEL__	*/
 
 #endif	/*	ISICOM_H	*/
diff -Nru a/include/linux/jbd.h b/include/linux/jbd.h
--- a/include/linux/jbd.h	2005-01-10 20:11:21 -08:00
+++ b/include/linux/jbd.h	2005-01-10 20:11:21 -08:00
@@ -277,13 +277,15 @@
 #define J_EXPECT_JH(jh, expr, why...)	J_ASSERT_JH(jh, expr)
 #else
 #define __journal_expect(expr, why...)					     \
-	do {								     \
-		if (!(expr)) {						     \
+	({								     \
+		int val = (expr);					     \
+		if (!val) {						     \
 			printk(KERN_ERR					     \
 				"EXT3-fs unexpected failure: %s;\n",# expr); \
-			printk(KERN_ERR why);				     \
+			printk(KERN_ERR why "\n");			     \
 		}							     \
-	} while (0)
+		val;							     \
+	})
 #define J_EXPECT(expr, why...)		__journal_expect(expr, ## why)
 #define J_EXPECT_BH(bh, expr, why...)	__journal_expect(expr, ## why)
 #define J_EXPECT_JH(jh, expr, why...)	__journal_expect(expr, ## why)
@@ -874,7 +876,7 @@
 extern int	 journal_dirty_metadata (handle_t *, struct buffer_head *);
 extern void	 journal_release_buffer (handle_t *, struct buffer_head *,
 						int credits);
-extern void	 journal_forget (handle_t *, struct buffer_head *);
+extern int	 journal_forget (handle_t *, struct buffer_head *);
 extern void	 journal_sync_buffer (struct buffer_head *);
 extern int	 journal_invalidatepage(journal_t *,
 				struct page *, unsigned long);
diff -Nru a/include/linux/jffs2.h b/include/linux/jffs2.h
--- a/include/linux/jffs2.h	2005-01-10 20:11:22 -08:00
+++ b/include/linux/jffs2.h	2005-01-10 20:11:22 -08:00
@@ -3,12 +3,12 @@
  *
  * Copyright (C) 2001-2003 Red Hat, Inc.
  *
- * Created by David Woodhouse <dwmw2@redhat.com>
+ * Created by David Woodhouse <dwmw2@infradead.org>
  *
  * For licensing information, see the file 'LICENCE' in the 
  * jffs2 directory.
  *
- * $Id: jffs2.h,v 1.33 2004/05/25 11:31:55 havasi Exp $
+ * $Id: jffs2.h,v 1.34 2004/11/16 20:36:14 dwmw2 Exp $
  *
  */
 
diff -Nru a/include/linux/jffs2_fs_sb.h b/include/linux/jffs2_fs_sb.h
--- a/include/linux/jffs2_fs_sb.h	2005-01-10 20:11:15 -08:00
+++ b/include/linux/jffs2_fs_sb.h	2005-01-10 20:11:15 -08:00
@@ -1,4 +1,4 @@
-/* $Id: jffs2_fs_sb.h,v 1.45 2003/10/08 11:46:27 dwmw2 Exp $ */
+/* $Id: jffs2_fs_sb.h,v 1.48 2004/11/20 10:41:12 dwmw2 Exp $ */
 
 #ifndef _JFFS2_FS_SB
 #define _JFFS2_FS_SB
@@ -11,6 +11,7 @@
 #include <linux/timer.h>
 #include <linux/wait.h>
 #include <linux/list.h>
+#include <linux/rwsem.h>
 
 #define JFFS2_SB_FLAG_RO 1
 #define JFFS2_SB_FLAG_MOUNTING 2
@@ -35,9 +36,7 @@
 
 	struct semaphore alloc_sem;	/* Used to protect all the following 
 					   fields, and also to protect against
-					   out-of-order writing of nodes.
-					   And GC.
-					*/
+					   out-of-order writing of nodes. And GC. */
 	uint32_t cleanmarker_size;	/* Size of an _inline_ CLEANMARKER
 					 (i.e. zero for OOB CLEANMARKER */
 
@@ -95,13 +94,15 @@
 	   to an obsoleted node. I don't like this. Alternatives welcomed. */
 	struct semaphore erase_free_sem;
 
-#ifdef CONFIG_JFFS2_FS_NAND
+#if defined CONFIG_JFFS2_FS_NAND || defined CONFIG_JFFS2_FS_NOR_ECC
 	/* Write-behind buffer for NAND flash */
 	unsigned char *wbuf;
 	uint32_t wbuf_ofs;
 	uint32_t wbuf_len;
 	uint32_t wbuf_pagesize;
 	struct jffs2_inodirty *wbuf_inodes;
+
+	struct rw_semaphore wbuf_sem;	/* Protects the write buffer */
 
 	/* Information about out-of-band area usage... */
 	struct nand_oobinfo *oobinfo;
diff -Nru a/include/linux/jiffies.h b/include/linux/jiffies.h
--- a/include/linux/jiffies.h	2005-01-10 20:11:15 -08:00
+++ b/include/linux/jiffies.h	2005-01-10 20:11:15 -08:00
@@ -70,13 +70,19 @@
 /* a value TUSEC for TICK_USEC (can be set bij adjtimex)		*/
 #define TICK_USEC_TO_NSEC(TUSEC) (SH_DIV (TUSEC * USER_HZ * 1000, ACTHZ, 8))
 
+/* some arch's have a small-data section that can be accessed register-relative
+ * but that can only take up to, say, 4-byte variables. jiffies being part of
+ * an 8-byte variable may not be correctly accessed unless we force the issue
+ */
+#define __jiffy_data  __attribute__((section(".data")))
+
 /*
  * The 64-bit value is not volatile - you MUST NOT read it
  * without sampling the sequence number in xtime_lock.
  * get_jiffies_64() will do this for you as appropriate.
  */
-extern u64 jiffies_64;
-extern unsigned long volatile jiffies;
+extern u64 __jiffy_data jiffies_64;
+extern unsigned long volatile __jiffy_data jiffies;
 
 #if (BITS_PER_LONG < 64)
 u64 get_jiffies_64(void);
diff -Nru a/include/linux/kernel.h b/include/linux/kernel.h
--- a/include/linux/kernel.h	2005-01-10 20:11:15 -08:00
+++ b/include/linux/kernel.h	2005-01-10 20:11:15 -08:00
@@ -16,6 +16,8 @@
 #include <asm/byteorder.h>
 #include <asm/bug.h>
 
+extern const char linux_banner[];
+
 #define INT_MAX		((int)(~0U>>1))
 #define INT_MIN		(-INT_MAX - 1)
 #define UINT_MAX	(~0U)
@@ -134,6 +136,7 @@
 
 extern void bust_spinlocks(int yes);
 extern int oops_in_progress;		/* If set, an oops, panic(), BUG() or die() is in progress */
+extern int panic_timeout;
 extern int panic_on_oops;
 extern int tainted;
 extern const char *print_tainted(void);
diff -Nru a/include/linux/kobject.h b/include/linux/kobject.h
--- a/include/linux/kobject.h	2005-01-10 20:11:15 -08:00
+++ b/include/linux/kobject.h	2005-01-10 20:11:15 -08:00
@@ -167,6 +167,8 @@
 	} \
 }
 
+/* The global /sys/kernel/ subsystem for people to chain off of */
+extern struct subsystem kernel_subsys;
 
 /**
  * Helpers for setting the kset of registered objects.
diff -Nru a/include/linux/libata.h b/include/linux/libata.h
--- a/include/linux/libata.h	2005-01-10 20:11:15 -08:00
+++ b/include/linux/libata.h	2005-01-10 20:11:15 -08:00
@@ -339,6 +339,8 @@
 	void (*phy_reset) (struct ata_port *ap);
 	void (*post_set_mode) (struct ata_port *ap);
 
+	int (*check_atapi_dma) (struct ata_queued_cmd *qc);
+
 	void (*bmdma_setup) (struct ata_queued_cmd *qc);
 	void (*bmdma_start) (struct ata_queued_cmd *qc);
 
diff -Nru a/include/linux/libps2.h b/include/linux/libps2.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/linux/libps2.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,50 @@
+#ifndef _LIBPS2_H
+#define _LIBPS2_H
+
+/*
+ * Copyright (C) 1999-2002 Vojtech Pavlik
+ * Copyright (C) 2004 Dmitry Torokhov
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published by
+ * the Free Software Foundation.
+ */
+
+
+#define PS2_CMD_GETID		0x02f2
+#define PS2_CMD_RESET_BAT	0x02ff
+
+#define PS2_RET_BAT		0xaa
+#define PS2_RET_ID		0x00
+#define PS2_RET_ACK		0xfa
+#define PS2_RET_NAK		0xfe
+
+#define PS2_FLAG_ACK		1	/* Waiting for ACK/NAK */
+#define PS2_FLAG_CMD		2	/* Waiting for command to finish */
+#define PS2_FLAG_CMD1		4	/* Waiting for the first byte of command response */
+#define PS2_FLAG_WAITID		8	/* Command execiting is GET ID */
+
+struct ps2dev {
+	struct serio *serio;
+
+	/* Ensures that only one command is executing at a time */
+	struct semaphore cmd_sem;
+
+	/* Used to signal completion from interrupt handler */
+	wait_queue_head_t wait;
+
+	unsigned long flags;
+	unsigned char cmdbuf[6];
+	unsigned char cmdcnt;
+	unsigned char nak;
+};
+
+void ps2_init(struct ps2dev *ps2dev, struct serio *serio);
+int ps2_sendbyte(struct ps2dev *ps2dev, unsigned char byte, int timeout);
+int ps2_command(struct ps2dev *ps2dev, unsigned char *param, int command);
+int ps2_schedule_command(struct ps2dev *ps2dev, unsigned char *param, int command);
+int ps2_handle_ack(struct ps2dev *ps2dev, unsigned char data);
+int ps2_handle_response(struct ps2dev *ps2dev, unsigned char data);
+void ps2_cmd_aborted(struct ps2dev *ps2dev);
+
+#endif /* _LIBPS2_H */
diff -Nru a/include/linux/mca-legacy.h b/include/linux/mca-legacy.h
--- a/include/linux/mca-legacy.h	2005-01-10 20:11:23 -08:00
+++ b/include/linux/mca-legacy.h	2005-01-10 20:11:23 -08:00
@@ -34,10 +34,6 @@
 extern int mca_find_adapter(int id, int start);
 extern int mca_find_unused_adapter(int id, int start);
 
-/* adapter state info - returns 0 if no */
-extern int mca_isadapter(int slot);
-extern int mca_isenabled(int slot);
-
 extern int mca_is_adapter_used(int slot);
 extern int mca_mark_as_used(int slot);
 extern void mca_mark_as_unused(int slot);
@@ -50,7 +46,6 @@
  * so we can have a more interesting /proc/mca.
  */
 extern void mca_set_adapter_name(int slot, char* name);
-extern char* mca_get_adapter_name(int slot);
 
 /* These routines actually mess with the hardware POS registers.  They
  * temporarily disable the device (and interrupts), so make sure you know
diff -Nru a/include/linux/mca.h b/include/linux/mca.h
--- a/include/linux/mca.h	2005-01-10 20:11:17 -08:00
+++ b/include/linux/mca.h	2005-01-10 20:11:17 -08:00
@@ -6,22 +6,14 @@
 #ifndef _LINUX_MCA_H
 #define _LINUX_MCA_H
 
-/* FIXME: This shouldn't happen, but we need everything that previously
- * included mca.h to compile.  Take it out later when the MCA #includes
- * are sorted out */
 #include <linux/device.h>
 
-/* get the platform specific defines */
 #ifdef CONFIG_MCA
 #include <asm/mca.h>
-#endif
 
-/* The detection of MCA bus is done in the real mode (using BIOS).
- * The information is exported to the protected code, where this
- * variable is set to one in case MCA bus was detected.
- */
-#ifndef MCA_bus__is_a_macro
-extern int  MCA_bus;
+extern int MCA_bus;
+#else
+#define MCA_bus 0
 #endif
 
 /* This sets up an information callback for /proc/mca/slot?.  The
diff -Nru a/include/linux/miscdevice.h b/include/linux/miscdevice.h
--- a/include/linux/miscdevice.h	2005-01-10 20:11:19 -08:00
+++ b/include/linux/miscdevice.h	2005-01-10 20:11:19 -08:00
@@ -31,14 +31,15 @@
 #define	HPET_MINOR	     228
 
 struct device;
+struct class_device;
 
-struct miscdevice 
-{
+struct miscdevice  {
 	int minor;
 	const char *name;
 	struct file_operations *fops;
 	struct list_head list;
 	struct device *dev;
+	struct class_device *class;
 	char devfs_name[64];
 };
 
diff -Nru a/include/linux/mm.h b/include/linux/mm.h
--- a/include/linux/mm.h	2005-01-10 20:11:15 -08:00
+++ b/include/linux/mm.h	2005-01-10 20:11:15 -08:00
@@ -85,7 +85,7 @@
 			struct vm_area_struct *head;
 		} vm_set;
 
-		struct prio_tree_node prio_tree_node;
+		struct raw_prio_tree_node prio_tree_node;
 	} shared;
 
 	/*
@@ -105,13 +105,34 @@
 					   units, *not* PAGE_CACHE_SIZE */
 	struct file * vm_file;		/* File we map to (can be NULL). */
 	void * vm_private_data;		/* was vm_pte (shared mem) */
+	unsigned long vm_truncate_count;/* truncate_count or restart_addr */
 
+#ifndef CONFIG_MMU
+	atomic_t vm_usage;		/* refcount (VMAs shared if !MMU) */
+#endif
 #ifdef CONFIG_NUMA
 	struct mempolicy *vm_policy;	/* NUMA policy for the VMA */
 #endif
 };
 
 /*
+ * This struct defines the per-mm list of VMAs for uClinux. If CONFIG_MMU is
+ * disabled, then there's a single shared list of VMAs maintained by the
+ * system, and mm's subscribe to these individually
+ */
+struct vm_list_struct {
+	struct vm_list_struct	*next;
+	struct vm_area_struct	*vma;
+};
+
+#ifndef CONFIG_MMU
+extern struct rb_root nommu_vma_tree;
+extern struct rw_semaphore nommu_vma_sem;
+
+extern unsigned int kobjsize(const void *objp);
+#endif
+
+/*
  * vm_flags..
  */
 #define VM_READ		0x00000001	/* currently active flags */
@@ -211,6 +232,8 @@
 					 * usually used for buffer_heads
 					 * if PagePrivate set; used for
 					 * swp_entry_t if PageSwapCache
+					 * When page is free, this indicates
+					 * order in the buddy system.
 					 */
 	struct address_space *mapping;	/* If low bit clear, points to
 					 * inode address_space, or NULL.
@@ -557,7 +580,9 @@
 	struct address_space *check_mapping;	/* Check page->mapping if set */
 	pgoff_t	first_index;			/* Lowest page->index to unmap */
 	pgoff_t last_index;			/* Highest page->index to unmap */
-	int atomic;				/* May not schedule() */
+	spinlock_t *i_mmap_lock;		/* For unmap_mapping_range: */
+	unsigned long break_addr;		/* Where unmap_vmas stopped */
+	unsigned long truncate_count;		/* Compare vm_truncate_count */
 };
 
 void zap_page_range(struct vm_area_struct *vma, unsigned long address,
@@ -566,7 +591,7 @@
 		struct vm_area_struct *start_vma, unsigned long start_addr,
 		unsigned long end_addr, unsigned long *nr_accounted,
 		struct zap_details *);
-void clear_page_tables(struct mmu_gather *tlb, unsigned long first, int nr);
+void clear_page_range(struct mmu_gather *tlb, unsigned long addr, unsigned long end);
 int copy_page_range(struct mm_struct *dst, struct mm_struct *src,
 			struct vm_area_struct *vma);
 int zeromap_page_range(struct vm_area_struct *vma, unsigned long from,
@@ -581,7 +606,8 @@
 }
 
 extern int vmtruncate(struct inode * inode, loff_t offset);
-extern pmd_t *FASTCALL(__pmd_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address));
+extern pud_t *FASTCALL(__pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address));
+extern pmd_t *FASTCALL(__pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address));
 extern pte_t *FASTCALL(pte_alloc_kernel(struct mm_struct *mm, pmd_t *pmd, unsigned long address));
 extern pte_t *FASTCALL(pte_alloc_map(struct mm_struct *mm, pmd_t *pmd, unsigned long address));
 extern int install_page(struct mm_struct *mm, struct vm_area_struct *vma, unsigned long addr, struct page *page, pgprot_t prot);
@@ -602,6 +628,10 @@
 int set_page_dirty_lock(struct page *page);
 int clear_page_dirty_for_io(struct page *page);
 
+extern unsigned long do_mremap(unsigned long addr,
+			       unsigned long old_len, unsigned long new_len,
+			       unsigned long flags, unsigned long new_addr);
+
 /*
  * Prototype to add a shrinker callback for ageable caches.
  * 
@@ -626,17 +656,32 @@
 extern void remove_shrinker(struct shrinker *shrinker);
 
 /*
- * On a two-level page table, this ends up being trivial. Thus the
- * inlining and the symmetry break with pte_alloc_map() that does all
+ * On a two-level or three-level page table, this ends up being trivial. Thus
+ * the inlining and the symmetry break with pte_alloc_map() that does all
  * of this out-of-line.
  */
-static inline pmd_t *pmd_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address)
+/*
+ * The following ifdef needed to get the 4level-fixup.h header to work.
+ * Remove it when 4level-fixup.h has been removed.
+ */
+#ifdef CONFIG_MMU
+#ifndef __ARCH_HAS_4LEVEL_HACK 
+static inline pud_t *pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address)
 {
 	if (pgd_none(*pgd))
-		return __pmd_alloc(mm, pgd, address);
-	return pmd_offset(pgd, address);
+		return __pud_alloc(mm, pgd, address);
+	return pud_offset(pgd, address);
 }
 
+static inline pmd_t *pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address)
+{
+	if (pud_none(*pud))
+		return __pmd_alloc(mm, pud, address);
+	return pmd_offset(pud, address);
+}
+#endif
+#endif /* CONFIG_MMU */
+
 extern void free_area_init(unsigned long * zones_size);
 extern void free_area_init_node(int nid, pg_data_t *pgdat,
 	unsigned long * zones_size, unsigned long zone_start_pfn, 
@@ -718,15 +763,18 @@
 /* readahead.c */
 #define VM_MAX_READAHEAD	128	/* kbytes */
 #define VM_MIN_READAHEAD	16	/* kbytes (includes current page) */
+#define VM_MAX_CACHE_HIT    	256	/* max pages in a row in cache before
+					 * turning readahead off */
 
 int do_page_cache_readahead(struct address_space *mapping, struct file *filp,
 			unsigned long offset, unsigned long nr_to_read);
 int force_page_cache_readahead(struct address_space *mapping, struct file *filp,
 			unsigned long offset, unsigned long nr_to_read);
-void page_cache_readahead(struct address_space *mapping, 
+unsigned long  page_cache_readahead(struct address_space *mapping,
 			  struct file_ra_state *ra,
 			  struct file *filp,
-			  unsigned long offset);
+			  unsigned long offset,
+			  unsigned long size);
 void handle_ra_miss(struct address_space *mapping, 
 		    struct file_ra_state *ra, pgoff_t offset);
 unsigned long max_sane_readahead(unsigned long nr);
@@ -761,16 +809,10 @@
 extern unsigned long vmalloc_to_pfn(void *addr);
 extern struct page * follow_page(struct mm_struct *mm, unsigned long address,
 		int write);
+extern int check_user_page_readable(struct mm_struct *mm, unsigned long address);
 int remap_pfn_range(struct vm_area_struct *, unsigned long,
 		unsigned long, unsigned long, pgprot_t);
 
-static inline __deprecated /* since 25 Sept 2004 -- wli */
-int remap_page_range(struct vm_area_struct *vma, unsigned long uvaddr,
-			unsigned long paddr, unsigned long size, pgprot_t prot)
-{
-	return remap_pfn_range(vma, uvaddr, paddr >> PAGE_SHIFT, size, prot);
-}
-
 #ifdef CONFIG_PROC_FS
 void __vm_stat_account(struct mm_struct *, unsigned long, struct file *, long);
 #else
@@ -792,6 +834,9 @@
 							-vma_pages(vma));
 }
 
+/* update per process rss and vm hiwater data */
+extern void update_mem_hiwater(void);
+
 #ifndef CONFIG_DEBUG_PAGEALLOC
 static inline void
 kernel_map_pages(struct page *page, int numpages, int enable)
@@ -799,10 +844,14 @@
 }
 #endif
 
-#ifndef CONFIG_ARCH_GATE_AREA
 extern struct vm_area_struct *get_gate_vma(struct task_struct *tsk);
+#ifdef	__HAVE_ARCH_GATE_AREA
+int in_gate_area_no_task(unsigned long addr);
 int in_gate_area(struct task_struct *task, unsigned long addr);
-#endif
+#else
+int in_gate_area_no_task(unsigned long addr);
+#define in_gate_area(task, addr) ({(void)task; in_gate_area_no_task(addr);})
+#endif	/* __HAVE_ARCH_GATE_AREA */
 
 #endif /* __KERNEL__ */
 #endif /* _LINUX_MM_H */
diff -Nru a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h
--- a/include/linux/mmc/mmc.h	2005-01-10 20:11:19 -08:00
+++ b/include/linux/mmc/mmc.h	2005-01-10 20:11:19 -08:00
@@ -57,7 +57,6 @@
 	unsigned int		timeout_clks;	/* data timeout (in clocks) */
 	unsigned int		blksz_bits;	/* data block size */
 	unsigned int		blocks;		/* number of blocks */
-	struct request		*req __attribute__((deprecated));/* request structure (use the sg list instead) */
 	unsigned int		error;		/* data error */
 	unsigned int		flags;
 
diff -Nru a/include/linux/mmzone.h b/include/linux/mmzone.h
--- a/include/linux/mmzone.h	2005-01-10 20:11:19 -08:00
+++ b/include/linux/mmzone.h	2005-01-10 20:11:19 -08:00
@@ -22,7 +22,7 @@
 
 struct free_area {
 	struct list_head	free_list;
-	unsigned long		*map;
+	unsigned long		nr_free;
 };
 
 struct pglist_data;
@@ -263,14 +263,14 @@
 					     range, including holes */
 	int node_id;
 	struct pglist_data *pgdat_next;
-	wait_queue_head_t       kswapd_wait;
+	wait_queue_head_t kswapd_wait;
 	struct task_struct *kswapd;
+	int kswapd_max_order;
 } pg_data_t;
 
 #define node_present_pages(nid)	(NODE_DATA(nid)->node_present_pages)
 #define node_spanned_pages(nid)	(NODE_DATA(nid)->node_spanned_pages)
 
-extern int numnodes;
 extern struct pglist_data *pgdat_list;
 
 void __get_zone_counts(unsigned long *active, unsigned long *inactive,
@@ -278,7 +278,9 @@
 void get_zone_counts(unsigned long *active, unsigned long *inactive,
 			unsigned long *free);
 void build_all_zonelists(void);
-void wakeup_kswapd(struct zone *zone);
+void wakeup_kswapd(struct zone *zone, int order);
+int zone_watermark_ok(struct zone *z, int order, unsigned long mark,
+		int alloc_type, int can_try_harder, int gfp_high);
 
 /*
  * zone_idx() returns 0 for the ZONE_DMA zone, 1 for the ZONE_NORMAL zone, etc.
@@ -307,7 +309,7 @@
 {
 	pg_data_t *pgdat = zone->zone_pgdat;
 
-	if (zone - pgdat->node_zones < MAX_NR_ZONES - 1)
+	if (zone < pgdat->node_zones + MAX_NR_ZONES - 1)
 		zone++;
 	else if (pgdat->pgdat_next) {
 		pgdat = pgdat->pgdat_next;
@@ -353,12 +355,12 @@
  */
 static inline int is_highmem(struct zone *zone)
 {
-	return (is_highmem_idx(zone - zone->zone_pgdat->node_zones));
+	return zone == zone->zone_pgdat->node_zones + ZONE_HIGHMEM;
 }
 
 static inline int is_normal(struct zone *zone)
 {
-	return (is_normal_idx(zone - zone->zone_pgdat->node_zones));
+	return zone == zone->zone_pgdat->node_zones + ZONE_NORMAL;
 }
 
 /* These two functions are used to setup the per zone pages min values */
@@ -371,7 +373,7 @@
 
 #include <linux/topology.h>
 /* Returns the number of the current Node. */
-#define numa_node_id()		(cpu_to_node(smp_processor_id()))
+#define numa_node_id()		(cpu_to_node(_smp_processor_id()))
 
 #ifndef CONFIG_DISCONTIGMEM
 
diff -Nru a/include/linux/module.h b/include/linux/module.h
--- a/include/linux/module.h	2005-01-10 20:11:21 -08:00
+++ b/include/linux/module.h	2005-01-10 20:11:21 -08:00
@@ -48,8 +48,9 @@
 
 struct module_attribute {
         struct attribute attr;
-        ssize_t (*show)(struct module *, char *);
-        ssize_t (*store)(struct module *, const char *, size_t count);
+        ssize_t (*show)(struct module_attribute *, struct module *, char *);
+        ssize_t (*store)(struct module_attribute *, struct module *,
+			 const char *, size_t count);
 };
 
 struct module_kobject
@@ -206,10 +207,6 @@
 
 #endif
 
-/* We don't mangle the actual symbol anymore, so no need for
- * special casing EXPORT_SYMBOL_NOVERS.  FIXME: Deprecated */
-#define EXPORT_SYMBOL_NOVERS(sym) EXPORT_SYMBOL(sym)
-
 struct module_ref
 {
 	local_t count;
@@ -226,18 +223,18 @@
 #define MODULE_SECT_NAME_LEN 32
 struct module_sect_attr
 {
-	struct attribute attr;
+	struct module_attribute mattr;
 	char name[MODULE_SECT_NAME_LEN];
 	unsigned long address;
 };
 
-struct module_sections
+struct module_sect_attrs
 {
-	struct kobject kobj;
+	struct attribute_group grp;
 	struct module_sect_attr attrs[0];
 };
 
-struct param_kobject;
+struct module_param_attrs;
 
 struct module
 {
@@ -250,8 +247,8 @@
 	char name[MODULE_NAME_LEN];
 
 	/* Sysfs stuff. */
-	struct module_kobject *mkobj;
-	struct param_kobject *params_kobject;
+	struct module_kobject mkobj;
+	struct module_param_attrs *param_attrs;
 
 	/* Exported symbols */
 	const struct kernel_symbol *syms;
@@ -312,7 +309,7 @@
 	char *strtab;
 
 	/* Section attributes */
-	struct module_sections *sect_attrs;
+	struct module_sect_attrs *sect_attrs;
 #endif
 
 	/* Per-cpu data. */
@@ -449,7 +446,6 @@
 #else /* !CONFIG_MODULES... */
 #define EXPORT_SYMBOL(sym)
 #define EXPORT_SYMBOL_GPL(sym)
-#define EXPORT_SYMBOL_NOVERS(sym)
 
 /* Given an address, look for it in the exception tables. */
 static inline const struct exception_table_entry *
diff -Nru a/include/linux/mtd/cfi.h b/include/linux/mtd/cfi.h
--- a/include/linux/mtd/cfi.h	2005-01-10 20:11:18 -08:00
+++ b/include/linux/mtd/cfi.h	2005-01-10 20:11:18 -08:00
@@ -1,7 +1,7 @@
 
 /* Common Flash Interface structures 
  * See http://support.intel.com/design/flash/technote/index.htm
- * $Id: cfi.h,v 1.49 2004/11/15 20:56:32 nico Exp $
+ * $Id: cfi.h,v 1.50 2004/11/20 12:46:51 dwmw2 Exp $
  */
 
 #ifndef __MTD_CFI_H__
@@ -349,14 +349,12 @@
 
 static inline void cfi_udelay(int us)
 {
-	unsigned long t = us * HZ / 1000000;
-	if (t) {
-		set_current_state(TASK_UNINTERRUPTIBLE);
-		schedule_timeout(t);
-		return;
+	if (us >= 1000) {
+		msleep((us+999)/1000);
+	} else {
+		udelay(us);
+		cond_resched();
 	}
-	udelay(us);
-	cond_resched();
 }
 
 static inline void cfi_spin_lock(spinlock_t *mutex)
diff -Nru a/include/linux/mtd/doc2000.h b/include/linux/mtd/doc2000.h
--- a/include/linux/mtd/doc2000.h	2005-01-10 20:11:19 -08:00
+++ b/include/linux/mtd/doc2000.h	2005-01-10 20:11:19 -08:00
@@ -6,7 +6,7 @@
  * Copyright (C) 2002-2003 Greg Ungerer <gerg@snapgear.com>
  * Copyright (C) 2002-2003 SnapGear Inc
  *
- * $Id: doc2000.h,v 1.23 2004/09/16 23:26:08 gleixner Exp $ 
+ * $Id: doc2000.h,v 1.24 2005/01/05 12:40:38 dwmw2 Exp $ 
  *
  * Released under GPL
  */
@@ -89,8 +89,8 @@
 #define WriteDOC_(d, adr, reg)  do{ *(volatile __u16 *)(((unsigned long)adr)+((reg)<<1)) = (__u16)d; wmb();} while(0)
 #define DOC_IOREMAP_LEN 0x4000
 #else
-#define ReadDOC_(adr, reg)      readb((void __iomem *)(((unsigned long)adr) + (reg)))
-#define WriteDOC_(d, adr, reg)  writeb(d, (void __iomem *)(((unsigned long)adr) + (reg)))
+#define ReadDOC_(adr, reg)      readb((void __iomem *)(adr) + (reg))
+#define WriteDOC_(d, adr, reg)  writeb(d, (void __iomem *)(adr) + (reg))
 #define DOC_IOREMAP_LEN 0x2000
 
 #endif
diff -Nru a/include/linux/mtd/flashchip.h b/include/linux/mtd/flashchip.h
--- a/include/linux/mtd/flashchip.h	2005-01-10 20:11:22 -08:00
+++ b/include/linux/mtd/flashchip.h	2005-01-10 20:11:22 -08:00
@@ -6,7 +6,7 @@
  *
  * (C) 2000 Red Hat. GPLd.
  *
- * $Id: flashchip.h,v 1.14 2004/06/15 16:44:59 nico Exp $
+ * $Id: flashchip.h,v 1.15 2004/11/05 22:41:06 nico Exp $
  *
  */
 
@@ -37,6 +37,8 @@
 	FL_LOCKING,
 	FL_UNLOCKING,
 	FL_POINT,
+	FL_XIP_WHILE_ERASING,
+	FL_XIP_WHILE_WRITING,
 	FL_UNKNOWN
 } flstate_t;
 
diff -Nru a/include/linux/mtd/gen_probe.h b/include/linux/mtd/gen_probe.h
--- a/include/linux/mtd/gen_probe.h	2005-01-10 20:11:20 -08:00
+++ b/include/linux/mtd/gen_probe.h	2005-01-10 20:11:20 -08:00
@@ -1,7 +1,7 @@
 /*
  * (C) 2001, 2001 Red Hat, Inc.
  * GPL'd
- * $Id: gen_probe.h,v 1.2 2003/11/08 00:51:21 dsaxena Exp $
+ * $Id: gen_probe.h,v 1.3 2004/10/20 22:10:33 dwmw2 Exp $
  */
 
 #ifndef __LINUX_MTD_GEN_PROBE_H__
diff -Nru a/include/linux/mtd/map.h b/include/linux/mtd/map.h
--- a/include/linux/mtd/map.h	2005-01-10 20:11:18 -08:00
+++ b/include/linux/mtd/map.h	2005-01-10 20:11:18 -08:00
@@ -1,6 +1,6 @@
 
 /* Overhauled routines for dealing with different mmap regions of flash */
-/* $Id: map.h,v 1.45 2004/09/21 14:31:17 bjd Exp $ */
+/* $Id: map.h,v 1.46 2005/01/05 17:09:44 dwmw2 Exp $ */
 
 #ifndef __LINUX_MTD_MAP_H__
 #define __LINUX_MTD_MAP_H__
@@ -322,7 +322,7 @@
 			bitpos = (map_bankwidth(map)-1-i)*8;
 #endif
 			orig.x[0] &= ~(0xff << bitpos);
-			orig.x[0] |= buf[i] << bitpos;
+			orig.x[0] |= buf[i-start] << bitpos;
 		}
 	}
 	return orig;
diff -Nru a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
--- a/include/linux/mtd/nand.h	2005-01-10 20:11:22 -08:00
+++ b/include/linux/mtd/nand.h	2005-01-10 20:11:22 -08:00
@@ -5,7 +5,7 @@
  *                     Steven J. Hill <sjhill@realitydiluted.com>
  *		       Thomas Gleixner <tglx@linutronix.de>
  *
- * $Id: nand.h,v 1.66 2004/10/02 10:07:08 gleixner Exp $
+ * $Id: nand.h,v 1.68 2004/11/12 10:40:37 gleixner Exp $
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -138,6 +138,8 @@
 #define NAND_ECC_HW6_512	4
 /* Hardware ECC 8 byte ECC per 512 Byte data */
 #define NAND_ECC_HW8_512	6
+/* Hardware ECC 12 byte ECC per 2048 Byte data */
+#define NAND_ECC_HW12_2048	7
 
 /*
  * Constants for Hardware ECC
@@ -253,6 +255,7 @@
  * @scan_bbt:		[REPLACEABLE] function to scan bad block table
  * @eccmode:		[BOARDSPECIFIC] mode of ecc, see defines 
  * @eccsize: 		[INTERN] databytes used per ecc-calculation
+ * @eccbytes: 		[INTERN] number of ecc bytes per ecc-calculation step
  * @eccsteps:		[INTERN] number of ecc calculation steps per page
  * @chip_delay:		[BOARDSPECIFIC] chip dependent delay for transfering data from array to read regs (tR)
  * @chip_lock:		[INTERN] spinlock used to protect access to this structure and the chip
@@ -277,6 +280,7 @@
  * @bbt:		[INTERN] bad block table pointer
  * @bbt_td:		[REPLACEABLE] bad block table descriptor for flash lookup
  * @bbt_md:		[REPLACEABLE] bad block table mirror descriptor
+ * @badblock_pattern:	[REPLACEABLE] bad block scan pattern used for initial bad block scan 
  * @controller:		[OPTIONAL] a pointer to a hardware controller structure which is shared among multiple independend devices
  * @priv:		[OPTIONAL] pointer to private chip date
  */
@@ -307,6 +311,7 @@
 	int		(*scan_bbt)(struct mtd_info *mtd);
 	int		eccmode;
 	int		eccsize;
+	int		eccbytes;
 	int		eccsteps;
 	int 		chip_delay;
 	spinlock_t	chip_lock;
@@ -330,6 +335,7 @@
 	uint8_t		*bbt;
 	struct nand_bbt_descr	*bbt_td;
 	struct nand_bbt_descr	*bbt_md;
+	struct nand_bbt_descr	*badblock_pattern;
 	struct nand_hw_control  *controller;
 	void		*priv;
 };
diff -Nru a/include/linux/mtd/xip.h b/include/linux/mtd/xip.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/linux/mtd/xip.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,107 @@
+/*
+ * MTD primitives for XIP support
+ *
+ * Author:	Nicolas Pitre
+ * Created:	Nov 2, 2004
+ * Copyright:	(C) 2004 MontaVista Software, Inc.
+ *
+ * This XIP support for MTD has been loosely inspired
+ * by an earlier patch authored by David Woodhouse.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * $Id: xip.h,v 1.2 2004/12/01 15:49:10 nico Exp $
+ */
+
+#ifndef __LINUX_MTD_XIP_H__
+#define __LINUX_MTD_XIP_H__
+
+#include <linux/config.h>
+
+#ifdef CONFIG_MTD_XIP
+
+/*
+ * Function that are modifying the flash state away from array mode must
+ * obviously not be running from flash.  The __xipram is therefore marking
+ * those functions so they get relocated to ram.
+ */
+#define __xipram __attribute__ ((__section__ (".data")))
+
+/*
+ * We really don't want gcc to guess anything.
+ * We absolutely _need_ proper inlining.
+ */
+#include <linux/compiler.h>
+
+/*
+ * Each architecture has to provide the following macros.  They must access
+ * the hardware directly and not rely on any other (XIP) functions since they
+ * won't be available when used (flash not in array mode).
+ *
+ * xip_irqpending()
+ *
+ * 	return non zero when any hardware interrupt is pending.
+ *
+ * xip_currtime()
+ *
+ * 	return a platform specific time reference to be used with
+ * 	xip_elapsed_since().
+ *
+ * xip_elapsed_since(x)
+ *
+ * 	return in usecs the elapsed timebetween now and the reference x as
+ * 	returned by xip_currtime().
+ *
+ * 	note 1: convertion to usec can be approximated, as long as the
+ * 		returned value is <= the real elapsed time.
+ * 	note 2: this should be able to cope with a few seconds without
+ * 		overflowing.
+ */
+
+#if defined(CONFIG_ARCH_SA1100) || defined(CONFIG_ARCH_PXA)
+
+#include <asm/hardware.h>
+#ifdef CONFIG_ARCH_PXA
+#include <asm/arch/pxa-regs.h>
+#endif
+
+#define xip_irqpending()	(ICIP & ICMR)
+
+/* we sample OSCR and convert desired delta to usec (1/4 ~= 1000000/3686400) */
+#define xip_currtime()		(OSCR)
+#define xip_elapsed_since(x)	(signed)((OSCR - (x)) / 4)
+
+#else
+
+#warning "missing IRQ and timer primitives for XIP MTD support"
+#warning "some of the XIP MTD support code will be disabled"
+#warning "your system will therefore be unresponsive when writing or erasing flash"
+
+#define xip_irqpending()	(0)
+#define xip_currtime()		(0)
+#define xip_elapsed_since(x)	(0)
+
+#endif
+
+/*
+ * xip_cpu_idle() is used when waiting for a delay equal or larger than
+ * the system timer tick period.  This should put the CPU into idle mode
+ * to save power and to be woken up only when some interrupts are pending.
+ * As above, this should not rely upon standard kernel code.
+ */
+
+#if defined(CONFIG_CPU_XSCALE)
+#define xip_cpu_idle()  asm volatile ("mcr p14, 0, %0, c7, c0, 0" :: "r" (1))
+#else
+#define xip_cpu_idle()  do { } while (0)
+#endif
+
+#else
+
+#define __xipram
+
+#endif /* CONFIG_MTD_XIP */
+
+#endif /* __LINUX_MTD_XIP_H__ */
diff -Nru a/include/linux/mv643xx.h b/include/linux/mv643xx.h
--- a/include/linux/mv643xx.h	2005-01-10 20:11:21 -08:00
+++ b/include/linux/mv643xx.h	2005-01-10 20:11:21 -08:00
@@ -13,8 +13,11 @@
 #ifndef __ASM_MV64340_H
 #define __ASM_MV64340_H
 
+#ifdef __MIPS__
 #include <asm/addrspace.h>
 #include <asm/marvell.h>
+#endif
+#include <asm/types.h>
 
 /****************************************/
 /* Processor Address Space              */
@@ -1035,5 +1038,51 @@
 #define MV64340_SERIAL_INIT_STATUS                                  0xf32c
 
 extern void mv64340_irq_init(unsigned int base);
+
+/* MPSC Platform Device, Driver Data (Shared register regions) */
+#define	MPSC_SHARED_NAME		"mpsc_shared"
+
+#define	MPSC_ROUTING_BASE_ORDER		0
+#define	MPSC_SDMA_INTR_BASE_ORDER	1
+
+#define MPSC_ROUTING_REG_BLOCK_SIZE	0x000c
+#define MPSC_SDMA_INTR_REG_BLOCK_SIZE	0x0084
+
+struct mpsc_shared_pd_dd {
+	u32	mrr_val;
+	u32	rcrr_val;
+	u32	tcrr_val;
+	u32	intr_cause_val;
+	u32	intr_mask_val;
+};
+
+/* MPSC Platform Device, Driver Data */
+#define	MPSC_CTLR_NAME			"mpsc"
+
+#define	MPSC_BASE_ORDER			0
+#define	MPSC_SDMA_BASE_ORDER		1
+#define	MPSC_BRG_BASE_ORDER		2
+
+#define MPSC_REG_BLOCK_SIZE		0x0038
+#define MPSC_SDMA_REG_BLOCK_SIZE	0x0c18
+#define MPSC_BRG_REG_BLOCK_SIZE		0x0008
+
+struct mpsc_pd_dd {
+	u8	mirror_regs;
+	u8	cache_mgmt;
+	u8	max_idle;
+	int	default_baud;
+	int	default_bits;
+	int	default_parity;
+	int	default_flow;
+	u32	chr_1_val;
+	u32	chr_2_val;
+	u32	chr_10_val;
+	u32	mpcr_val;
+	u32	bcr_val;
+	u8	brg_can_tune;
+	u8	brg_clk_src;
+	u32	brg_clk_freq;
+};
 
 #endif /* __ASM_MV64340_H */
diff -Nru a/include/linux/net.h b/include/linux/net.h
--- a/include/linux/net.h	2005-01-10 20:11:18 -08:00
+++ b/include/linux/net.h	2005-01-10 20:11:18 -08:00
@@ -187,10 +187,6 @@
 				  size_t len);
 extern int	     sock_recvmsg(struct socket *sock, struct msghdr *msg,
 				  size_t size, int flags);
-extern int	     sock_readv_writev(int type, struct inode *inode,
-				       struct file *file,
-				       const struct iovec *iov, long count,
-				       size_t size);
 extern int 	     sock_map_fd(struct socket *sock);
 extern struct socket *sockfd_lookup(int fd, int *err);
 #define		     sockfd_put(sock) fput(sock->file)
diff -Nru a/include/linux/netfilter_bridge/ebt_ulog.h b/include/linux/netfilter_bridge/ebt_ulog.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/linux/netfilter_bridge/ebt_ulog.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,36 @@
+#ifndef _EBT_ULOG_H
+#define _EBT_ULOG_H
+
+#define EBT_ULOG_DEFAULT_NLGROUP 0
+#define EBT_ULOG_DEFAULT_QTHRESHOLD 1
+#define EBT_ULOG_MAXNLGROUPS 32 /* hardcoded netlink max */
+#define EBT_ULOG_PREFIX_LEN 32
+#define EBT_ULOG_MAX_QLEN 50
+#define EBT_ULOG_WATCHER "ulog"
+#define EBT_ULOG_VERSION 1
+
+struct ebt_ulog_info {
+	uint32_t nlgroup;
+	unsigned int cprange;
+	unsigned int qthreshold;
+	char prefix[EBT_ULOG_PREFIX_LEN];
+};
+
+typedef struct ebt_ulog_packet_msg {
+	int version;
+	char indev[IFNAMSIZ];
+	char outdev[IFNAMSIZ];
+	char physindev[IFNAMSIZ];
+	char physoutdev[IFNAMSIZ];
+	char prefix[EBT_ULOG_PREFIX_LEN];
+	struct timeval stamp;
+	unsigned long mark;
+	unsigned int hook;
+	size_t data_len;
+	/* The complete packet, including Ethernet header and perhaps
+	 * the VLAN header is appended */
+	unsigned char data[0] __attribute__
+	                      ((aligned (__alignof__(struct ebt_ulog_info))));
+} ebt_ulog_packet_msg_t;
+
+#endif /* _EBT_ULOG_H */
diff -Nru a/include/linux/netfilter_bridge/ebtables.h b/include/linux/netfilter_bridge/ebtables.h
--- a/include/linux/netfilter_bridge/ebtables.h	2005-01-10 20:11:22 -08:00
+++ b/include/linux/netfilter_bridge/ebtables.h	2005-01-10 20:11:22 -08:00
@@ -201,9 +201,9 @@
 {
 	struct list_head list;
 	const char name[EBT_FUNCTION_MAXNAMELEN];
-	void (*watcher)(const struct sk_buff *skb, const struct net_device *in,
-	   const struct net_device *out, const void *watcherdata,
-	   unsigned int datalen);
+	void (*watcher)(const struct sk_buff *skb, unsigned int hooknr,
+	   const struct net_device *in, const struct net_device *out,
+	   const void *watcherdata, unsigned int datalen);
 	/* 0 == let it in */
 	int (*check)(const char *tablename, unsigned int hookmask,
 	   const struct ebt_entry *e, void *watcherdata, unsigned int datalen);
diff -Nru a/include/linux/netfilter_ipv4/compat_firewall.h b/include/linux/netfilter_ipv4/compat_firewall.h
--- a/include/linux/netfilter_ipv4/compat_firewall.h	2005-01-10 20:11:21 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,45 +0,0 @@
-/* Minor modifications to fit on compatibility framework:
-   Rusty.Russell@rustcorp.com.au
-*/
-
-#ifndef __LINUX_FIREWALL_H
-#define __LINUX_FIREWALL_H
-
-/*
- *	Definitions for loadable firewall modules
- */
-
-#define FW_QUEUE	0
-#define FW_BLOCK	1
-#define FW_ACCEPT	2
-#define FW_REJECT	(-1)
-#define FW_REDIRECT	3
-#define FW_MASQUERADE	4
-#define FW_SKIP		5
-
-struct firewall_ops
-{
-	struct firewall_ops *next;
-	int (*fw_forward)(struct firewall_ops *this, int pf,
-			  struct net_device *dev, void *arg,
-			  struct sk_buff **pskb);
-	int (*fw_input)(struct firewall_ops *this, int pf,
-			struct net_device *dev, void *arg,
-			struct sk_buff **pskb);
-	int (*fw_output)(struct firewall_ops *this, int pf,
-			 struct net_device *dev, void *arg,
-			 struct sk_buff **pskb);
-	/* These may be NULL. */
-	int (*fw_acct_in)(struct firewall_ops *this, int pf,
-			  struct net_device *dev, void *arg,
-			  struct sk_buff **pskb);
-	int (*fw_acct_out)(struct firewall_ops *this, int pf,
-			   struct net_device *dev, void *arg,
-			   struct sk_buff **pskb);
-};
-
-extern int register_firewall(int pf, struct firewall_ops *fw);
-extern int unregister_firewall(int pf, struct firewall_ops *fw);
-
-extern int ip_fw_masq_timeouts(void *user, int len);
-#endif /* __LINUX_FIREWALL_H */
diff -Nru a/include/linux/netfilter_ipv4/ip_conntrack.h b/include/linux/netfilter_ipv4/ip_conntrack.h
--- a/include/linux/netfilter_ipv4/ip_conntrack.h	2005-01-10 20:11:22 -08:00
+++ b/include/linux/netfilter_ipv4/ip_conntrack.h	2005-01-10 20:11:22 -08:00
@@ -224,9 +224,8 @@
 /* get master conntrack via master expectation */
 #define master_ct(conntr) (conntr->master ? conntr->master->expectant : NULL)
 
-/* Alter reply tuple (maybe alter helper).  If it's already taken,
-   return 0 and don't do alteration. */
-extern int
+/* Alter reply tuple (maybe alter helper). */
+extern void
 ip_conntrack_alter_reply(struct ip_conntrack *conntrack,
 			 const struct ip_conntrack_tuple *newreply);
 
@@ -283,10 +282,10 @@
 struct sk_buff *
 ip_ct_gather_frags(struct sk_buff *skb);
 
-/* Delete all conntracks which match. */
+/* Iterate over all conntracks: if iter returns true, it's deleted. */
 extern void
-ip_ct_selective_cleanup(int (*kill)(const struct ip_conntrack *i, void *data),
-			void *data);
+ip_ct_iterate_cleanup(int (*iter)(struct ip_conntrack *i, void *data),
+		      void *data);
 
 /* It's confirmed if it is, or has been in the hash table. */
 static inline int is_confirmed(struct ip_conntrack *ct)
diff -Nru a/include/linux/netfilter_ipv4/ip_nat.h b/include/linux/netfilter_ipv4/ip_nat.h
--- a/include/linux/netfilter_ipv4/ip_nat.h	2005-01-10 20:11:23 -08:00
+++ b/include/linux/netfilter_ipv4/ip_nat.h	2005-01-10 20:11:23 -08:00
@@ -11,13 +11,8 @@
 	IP_NAT_MANIP_DST
 };
 
-#ifndef CONFIG_IP_NF_NAT_LOCAL
-/* SRC manip occurs only on POST_ROUTING */
-#define HOOK2MANIP(hooknum) ((hooknum) != NF_IP_POST_ROUTING)
-#else
 /* SRC manip occurs POST_ROUTING or LOCAL_IN */
 #define HOOK2MANIP(hooknum) ((hooknum) != NF_IP_POST_ROUTING && (hooknum) != NF_IP_LOCAL_IN)
-#endif
 
 #define IP_NAT_RANGE_MAP_IPS 1
 #define IP_NAT_RANGE_PROTO_SPECIFIED 2
@@ -46,10 +41,10 @@
 	union ip_conntrack_manip_proto min, max;
 };
 
-/* A range consists of an array of 1 or more ip_nat_range */
-struct ip_nat_multi_range
+/* For backwards compat: don't use in modern code. */
+struct ip_nat_multi_range_compat
 {
-	unsigned int rangesize;
+	unsigned int rangesize; /* Must be 1. */
 
 	/* hangs off end. */
 	struct ip_nat_range range[1];
@@ -91,7 +86,7 @@
 	/* Manipulations to be done on this conntrack. */
 	struct ip_nat_info_manip manips[IP_NAT_MAX_MANIPS];
 
-	struct list_head bysource, byipsproto;
+	struct list_head bysource;
 
 	/* Helper (NULL if none). */
 	struct ip_nat_helper *helper;
@@ -101,7 +96,7 @@
 
 /* Set up the info structure to map into this range. */
 extern unsigned int ip_nat_setup_info(struct ip_conntrack *conntrack,
-				      const struct ip_nat_multi_range *mr,
+				      const struct ip_nat_range *range,
 				      unsigned int hooknum);
 
 /* Is this tuple already taken? (not by us)*/
@@ -112,5 +107,7 @@
 extern u_int16_t ip_nat_cheat_check(u_int32_t oldvalinv,
 				    u_int32_t newval,
 				    u_int16_t oldcheck);
+#else  /* !__KERNEL__: iptables wants this to compile. */
+#define ip_nat_multi_range ip_nat_multi_range_compat
 #endif /*__KERNEL__*/
 #endif
diff -Nru a/include/linux/netfilter_ipv4/ip_tables.h b/include/linux/netfilter_ipv4/ip_tables.h
--- a/include/linux/netfilter_ipv4/ip_tables.h	2005-01-10 20:11:19 -08:00
+++ b/include/linux/netfilter_ipv4/ip_tables.h	2005-01-10 20:11:19 -08:00
@@ -53,7 +53,9 @@
 			u_int16_t match_size;
 
 			/* Used by userspace */
-			char name[IPT_FUNCTION_MAXNAMELEN];
+			char name[IPT_FUNCTION_MAXNAMELEN-1];
+
+			u_int8_t revision;
 		} user;
 		struct {
 			u_int16_t match_size;
@@ -76,7 +78,9 @@
 			u_int16_t target_size;
 
 			/* Used by userspace */
-			char name[IPT_FUNCTION_MAXNAMELEN];
+			char name[IPT_FUNCTION_MAXNAMELEN-1];
+
+			u_int8_t revision;
 		} user;
 		struct {
 			u_int16_t target_size;
@@ -152,9 +156,11 @@
 #define IPT_SO_SET_ADD_COUNTERS	(IPT_BASE_CTL + 1)
 #define IPT_SO_SET_MAX		IPT_SO_SET_ADD_COUNTERS
 
-#define IPT_SO_GET_INFO		(IPT_BASE_CTL)
-#define IPT_SO_GET_ENTRIES	(IPT_BASE_CTL + 1)
-#define IPT_SO_GET_MAX		IPT_SO_GET_ENTRIES
+#define IPT_SO_GET_INFO			(IPT_BASE_CTL)
+#define IPT_SO_GET_ENTRIES		(IPT_BASE_CTL + 1)
+#define IPT_SO_GET_REVISION_MATCH	(IPT_BASE_CTL + 2)
+#define IPT_SO_GET_REVISION_TARGET	(IPT_BASE_CTL + 3)
+#define IPT_SO_GET_MAX			IPT_SO_GET_REVISION_TARGET
 
 /* CONTINUE verdict for targets */
 #define IPT_CONTINUE 0xFFFFFFFF
@@ -284,6 +290,15 @@
 	struct ipt_entry entrytable[0];
 };
 
+/* The argument to IPT_SO_GET_REVISION_*.  Returns highest revision
+ * kernel supports, if >= revision. */
+struct ipt_get_revision
+{
+	char name[IPT_FUNCTION_MAXNAMELEN-1];
+
+	u_int8_t revision;
+};
+
 /* Standard return verdict, or do jump. */
 #define IPT_STANDARD_TARGET ""
 /* Error verdict. */
@@ -344,7 +359,9 @@
 {
 	struct list_head list;
 
-	const char name[IPT_FUNCTION_MAXNAMELEN];
+	const char name[IPT_FUNCTION_MAXNAMELEN-1];
+
+	u_int8_t revision;
 
 	/* Return true or false: return FALSE and set *hotdrop = 1 to
            force immediate packet drop. */
@@ -378,7 +395,9 @@
 {
 	struct list_head list;
 
-	const char name[IPT_FUNCTION_MAXNAMELEN];
+	const char name[IPT_FUNCTION_MAXNAMELEN-1];
+
+	u_int8_t revision;
 
 	/* Called when user tries to insert an entry of this type:
            hook_mask is a bitmask of hooks from which it can be
@@ -412,10 +431,6 @@
 
 extern int ipt_register_match(struct ipt_match *match);
 extern void ipt_unregister_match(struct ipt_match *match);
-
-extern struct ipt_target *
-__ipt_find_target_lock(const char *name, int *error);
-extern void __ipt_mutex_up(void);
 
 /* Furniture shopping... */
 struct ipt_table
diff -Nru a/include/linux/netfilter_ipv4/ipchains_core.h b/include/linux/netfilter_ipv4/ipchains_core.h
--- a/include/linux/netfilter_ipv4/ipchains_core.h	2005-01-10 20:11:19 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,189 +0,0 @@
-/*
- * This code is heavily based on the code in ip_fw.h; see that file for
- * copyrights and attributions.  This code is basically GPL.
- *
- * 15-Feb-1997: Major changes to allow graphs for firewall rules.
- *              Paul Russell <Paul.Russell@rustcorp.com.au> and
- *		Michael Neuling <Michael.Neuling@rustcorp.com.au>
- * 2-Nov-1997: Changed types to __u16, etc.
- *             Removed IP_FW_F_TCPACK & IP_FW_F_BIDIR.
- *             Added inverse flags field.
- *             Removed multiple port specs.
- */
-
-/*
- * 	Format of an IP firewall descriptor
- *
- * 	src, dst, src_mask, dst_mask are always stored in network byte order.
- * 	flags are stored in host byte order (of course).
- * 	Port numbers are stored in HOST byte order.
- */
-
-#ifndef _IP_FWCHAINS_H
-#define _IP_FWCHAINS_H
-
-#ifdef __KERNEL__
-#include <linux/icmp.h>
-#include <linux/in.h>
-#include <linux/ip.h>
-#include <linux/tcp.h>
-#include <linux/udp.h>
-#endif /* __KERNEL__ */
-#define IP_FW_MAX_LABEL_LENGTH 8
-typedef char ip_chainlabel[IP_FW_MAX_LABEL_LENGTH+1];
-
-struct ip_fw
-{
-	struct in_addr fw_src, fw_dst;		/* Source and destination IP addr */
-	struct in_addr fw_smsk, fw_dmsk;	/* Mask for src and dest IP addr */
-	__u32 fw_mark;                          /* ID to stamp on packet */
-	__u16 fw_proto;                         /* Protocol, 0 = ANY */
-	__u16 fw_flg;			        /* Flags word */
-        __u16 fw_invflg;                        /* Inverse flags */
-	__u16 fw_spts[2];                       /* Source port range. */
-        __u16 fw_dpts[2];                       /* Destination port range. */
-	__u16 fw_redirpt;                       /* Port to redirect to. */
-	__u16 fw_outputsize;                    /* Max amount to output to
-						   NETLINK */
-	char           fw_vianame[IFNAMSIZ];	/* name of interface "via" */
-	__u8           fw_tosand, fw_tosxor;	/* Revised packet priority */
-};
-
-struct ip_fwuser
-{
-	struct ip_fw ipfw;
-	ip_chainlabel label;
-};
-
-/* Values for "fw_flg" field .  */
-#define IP_FW_F_PRN	0x0001	/* Print packet if it matches */
-#define IP_FW_F_TCPSYN	0x0002	/* For tcp packets-check SYN only */
-#define IP_FW_F_FRAG	0x0004  /* Set if rule is a fragment rule */
-#define IP_FW_F_MARKABS	0x0008  /* Set the mark to fw_mark, not add. */
-#define IP_FW_F_WILDIF	0x0010  /* Need only match start of interface name. */
-#define IP_FW_F_NETLINK 0x0020  /* Redirect to netlink: 2.1.x only */
-#define IP_FW_F_MASK	0x003F	/* All possible flag bits mask   */
-
-/* Values for "fw_invflg" field. */
-#define IP_FW_INV_SRCIP 0x0001  /* Invert the sense of fw_src. */
-#define IP_FW_INV_DSTIP 0x0002  /* Invert the sense of fw_dst. */
-#define IP_FW_INV_PROTO 0x0004  /* Invert the sense of fw_proto. */
-#define IP_FW_INV_SRCPT 0x0008  /* Invert the sense of source ports. */
-#define IP_FW_INV_DSTPT 0x0010  /* Invert the sense of destination ports. */
-#define IP_FW_INV_VIA   0x0020  /* Invert the sense of fw_vianame. */
-#define IP_FW_INV_SYN   0x0040  /* Invert the sense of IP_FW_F_TCPSYN. */
-#define IP_FW_INV_FRAG  0x0080  /* Invert the sense of IP_FW_F_FRAG. */
-
-/*
- *	New IP firewall options for [gs]etsockopt at the RAW IP level.
- *	Unlike BSD Linux inherits IP options so you don't have to use
- * a raw socket for this. Instead we check rights in the calls.  */
-
-#define IP_FW_BASE_CTL  	64	/* base for firewall socket options */
-
-#define IP_FW_APPEND		(IP_FW_BASE_CTL)    /* Takes ip_fwchange */
-#define IP_FW_REPLACE		(IP_FW_BASE_CTL+1)  /* Takes ip_fwnew */
-#define IP_FW_DELETE_NUM	(IP_FW_BASE_CTL+2)  /* Takes ip_fwdelnum */
-#define IP_FW_DELETE		(IP_FW_BASE_CTL+3)  /* Takes ip_fwchange */
-#define IP_FW_INSERT		(IP_FW_BASE_CTL+4)  /* Takes ip_fwnew */
-#define IP_FW_FLUSH		(IP_FW_BASE_CTL+5)  /* Takes ip_chainlabel */
-#define IP_FW_ZERO		(IP_FW_BASE_CTL+6)  /* Takes ip_chainlabel */
-#define IP_FW_CHECK		(IP_FW_BASE_CTL+7)  /* Takes ip_fwtest */
-#define IP_FW_MASQ_TIMEOUTS	(IP_FW_BASE_CTL+8)  /* Takes 3 ints */
-#define IP_FW_CREATECHAIN	(IP_FW_BASE_CTL+9)  /* Takes ip_chainlabel */
-#define IP_FW_DELETECHAIN	(IP_FW_BASE_CTL+10) /* Takes ip_chainlabel */
-#define IP_FW_POLICY		(IP_FW_BASE_CTL+11) /* Takes ip_fwpolicy */
-/* Masquerade control, only 1 optname */
-
-#define IP_FW_MASQ_CTL  	(IP_FW_BASE_CTL+12) /* General ip_masq ctl */
-
-/* Builtin chain labels */
-#define IP_FW_LABEL_FORWARD	"forward"
-#define IP_FW_LABEL_INPUT	"input"
-#define IP_FW_LABEL_OUTPUT	"output"
-
-/* Special targets */
-#define IP_FW_LABEL_MASQUERADE  "MASQ"
-#define IP_FW_LABEL_REDIRECT    "REDIRECT"
-#define IP_FW_LABEL_ACCEPT	"ACCEPT"
-#define IP_FW_LABEL_BLOCK	"DENY"
-#define IP_FW_LABEL_REJECT	"REJECT"
-#define IP_FW_LABEL_RETURN	"RETURN"
-#define IP_FW_LABEL_QUEUE       "QUEUE"
-
-/* Files in /proc/net */
-#define IP_FW_PROC_CHAINS	"ip_fwchains"
-#define IP_FW_PROC_CHAIN_NAMES	"ip_fwnames"
-
-
-struct ip_fwpkt
-{
-	struct iphdr fwp_iph;			/* IP header */
-	union {
-		struct tcphdr fwp_tcph;		/* TCP header or */
-		struct udphdr fwp_udph;		/* UDP header */
-		struct icmphdr fwp_icmph;	/* ICMP header */
-	} fwp_protoh;
-	struct in_addr fwp_via;			/* interface address */
-	char           fwp_vianame[IFNAMSIZ];	/* interface name */
-};
-
-/* The argument to IP_FW_DELETE and IP_FW_APPEND */
-struct ip_fwchange
-{
-	struct ip_fwuser fwc_rule;
-	ip_chainlabel fwc_label;
-};	
-
-/* The argument to IP_FW_CHECK. */
-struct ip_fwtest
-{
-	struct ip_fwpkt fwt_packet; /* Packet to be tested */
-	ip_chainlabel fwt_label;   /* Block to start test in */
-};
-						
-/* The argument to IP_FW_DELETE_NUM */
-struct ip_fwdelnum
-{
-	__u32 fwd_rulenum;
-	ip_chainlabel fwd_label;
-};
-
-/* The argument to IP_FW_REPLACE and IP_FW_INSERT */
-struct ip_fwnew
-{
-	__u32 fwn_rulenum;
-	struct ip_fwuser fwn_rule;
-	ip_chainlabel fwn_label;
-};
-
-/* The argument to IP_FW_POLICY */
-struct ip_fwpolicy
-{
-	ip_chainlabel fwp_policy;
-	ip_chainlabel fwp_label;
-};
-/*
- * timeouts for ip masquerading
- */
-
-extern int ip_fw_masq_timeouts(void *, int);
-
-
-/*
- *	Main firewall chains definitions and global var's definitions.
- */
-
-#ifdef __KERNEL__
-
-#include <linux/config.h>
-#include <linux/version.h>
-#include <linux/init.h>
-extern void ip_fw_init(void) __init;
-extern int ip_fw_ctl(int, void *, int);
-#ifdef CONFIG_IP_MASQUERADE
-extern int ip_masq_uctl(int, char *, int);
-#endif
-#endif /* KERNEL */
-
-#endif /* _IP_FWCHAINS_H */
diff -Nru a/include/linux/netfilter_ipv4/ipfwadm_core.h b/include/linux/netfilter_ipv4/ipfwadm_core.h
--- a/include/linux/netfilter_ipv4/ipfwadm_core.h	2005-01-10 20:11:21 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,256 +0,0 @@
-#ifndef _IPFWADM_CORE_H
-#define _IPFWADM_CORE_H
-/* Minor modifications to fit on compatibility framework:
-   Rusty.Russell@rustcorp.com.au
-*/
-
-/*
- *	IP firewalling code. This is taken from 4.4BSD. Please note the
- *	copyright message below. As per the GPL it must be maintained
- *	and the licenses thus do not conflict. While this port is subject
- *	to the GPL I also place my modifications under the original
- *	license in recognition of the original copyright.
- *
- *	Ported from BSD to Linux,
- *		Alan Cox 22/Nov/1994.
- *	Merged and included the FreeBSD-Current changes at Ugen's request
- *	(but hey it's a lot cleaner now). Ugen would prefer in some ways
- *	we waited for his final product but since Linux 1.2.0 is about to
- *	appear it's not practical - Read: It works, it's not clean but please
- *	don't consider it to be his standard of finished work.
- *		Alan.
- *
- * Fixes:
- *	Pauline Middelink	:	Added masquerading.
- *	Jos Vos			:	Separate input  and output firewall
- *					chains, new "insert" and "append"
- *					commands to replace "add" commands,
- *					add ICMP header to struct ip_fwpkt.
- *	Jos Vos			:	Add support for matching device names.
- *	Willy Konynenberg	:	Add transparent proxying support.
- *	Jos Vos			:	Add options for input/output accounting.
- *
- *	All the real work was done by .....
- */
-
-/*
- * Copyright (c) 1993 Daniel Boulet
- * Copyright (c) 1994 Ugen J.S.Antsilevich
- *
- * Redistribution and use in source forms, with and without modification,
- * are permitted provided that this entire comment appears intact.
- *
- * Redistribution in binary form may occur without any restrictions.
- * Obviously, it would be nice if you gave credit where credit is due
- * but requiring it would be too onerous.
- *
- * This software is provided ``AS IS'' without any warranties of any kind.
- */
-
-/*
- * 	Format of an IP firewall descriptor
- *
- * 	src, dst, src_mask, dst_mask are always stored in network byte order.
- * 	flags and num_*_ports are stored in host byte order (of course).
- * 	Port numbers are stored in HOST byte order.
- */
-
-#ifdef __KERNEL__
-#include <linux/icmp.h>
-#include <linux/in.h>
-#include <linux/ip.h>
-#include <linux/tcp.h>
-#include <linux/udp.h>
-#endif
-
-struct ip_fw
-{
-	struct ip_fw  *fw_next;			/* Next firewall on chain */
-	struct in_addr fw_src, fw_dst;		/* Source and destination IP addr */
-	struct in_addr fw_smsk, fw_dmsk;	/* Mask for src and dest IP addr */
-	struct in_addr fw_via;			/* IP address of interface "via" */
-	struct net_device *fw_viadev;		/* device of interface "via" */
-	__u16	fw_flg;				/* Flags word */
-	__u16 	fw_nsp, fw_ndp;			/* N'of src ports and # of dst ports */
-						/* in ports array (dst ports follow */
-    						/* src ports; max of 10 ports in all; */
-    						/* count of 0 means match all ports) */
-#define IP_FW_MAX_PORTS	10      		/* A reasonable maximum */
-	__u16	fw_pts[IP_FW_MAX_PORTS];	/* Array of port numbers to match */
-	unsigned long  fw_pcnt,fw_bcnt;		/* Packet and byte counters */
-	__u8	fw_tosand, fw_tosxor;		/* Revised packet priority */
-	char           fw_vianame[IFNAMSIZ];	/* name of interface "via" */
-};
-
-/*
- *	Values for "flags" field .
- */
-
-#define IP_FW_F_ALL	0x0000	/* This is a universal packet firewall*/
-#define IP_FW_F_TCP	0x0001	/* This is a TCP packet firewall      */
-#define IP_FW_F_UDP	0x0002	/* This is a UDP packet firewall      */
-#define IP_FW_F_ICMP	0x0003	/* This is a ICMP packet firewall     */
-#define IP_FW_F_KIND	0x0003	/* Mask to isolate firewall kind      */
-#define IP_FW_F_ACCEPT	0x0004	/* This is an accept firewall (as     *
-				 *         opposed to a deny firewall)*
-				 *                                    */
-#define IP_FW_F_SRNG	0x0008	/* The first two src ports are a min  *
-				 * and max range (stored in host byte *
-				 * order).                            *
-				 *                                    */
-#define IP_FW_F_DRNG	0x0010	/* The first two dst ports are a min  *
-				 * and max range (stored in host byte *
-				 * order).                            *
-				 * (ports[0] <= port <= ports[1])     *
-				 *                                    */
-#define IP_FW_F_PRN	0x0020	/* In verbose mode print this firewall*/
-#define IP_FW_F_BIDIR	0x0040	/* For bidirectional firewalls        */
-#define IP_FW_F_TCPSYN	0x0080	/* For tcp packets-check SYN only     */
-#define IP_FW_F_ICMPRPL 0x0100	/* Send back icmp unreachable packet  */
-#define IP_FW_F_MASQ	0x0200	/* Masquerading			      */
-#define IP_FW_F_TCPACK	0x0400	/* For tcp-packets match if ACK is set*/
-#define IP_FW_F_REDIR	0x0800	/* Redirect to local port fw_pts[n]   */
-#define IP_FW_F_ACCTIN  0x1000	/* Account incoming packets only.     */
-#define IP_FW_F_ACCTOUT 0x2000	/* Account outgoing packets only.     */
-
-#define IP_FW_F_MASK	0x3FFF	/* All possible flag bits mask        */
-
-/*
- *	New IP firewall options for [gs]etsockopt at the RAW IP level.
- *	Unlike BSD Linux inherits IP options so you don't have to use
- *	a raw socket for this. Instead we check rights in the calls.
- */
-
-#define IP_FW_BASE_CTL  	64	/* base for firewall socket options */
-
-#define IP_FW_COMMAND		0x00FF	/* mask for command without chain */
-#define IP_FW_TYPE		0x0300	/* mask for type (chain) */
-#define IP_FW_SHIFT		8	/* shift count for type (chain) */
-
-#define IP_FW_FWD		0
-#define IP_FW_IN		1
-#define IP_FW_OUT		2
-#define IP_FW_ACCT		3
-#define IP_FW_CHAINS		4	/* total number of ip_fw chains */
-#define IP_FW_MASQ		5
-
-#define IP_FW_INSERT		(IP_FW_BASE_CTL)
-#define IP_FW_APPEND		(IP_FW_BASE_CTL+1)
-#define IP_FW_DELETE		(IP_FW_BASE_CTL+2)
-#define IP_FW_FLUSH		(IP_FW_BASE_CTL+3)
-#define IP_FW_ZERO		(IP_FW_BASE_CTL+4)
-#define IP_FW_POLICY		(IP_FW_BASE_CTL+5)
-#define IP_FW_CHECK		(IP_FW_BASE_CTL+6)
-#define IP_FW_MASQ_TIMEOUTS	(IP_FW_BASE_CTL+7)
-
-#define IP_FW_INSERT_FWD	(IP_FW_INSERT | (IP_FW_FWD << IP_FW_SHIFT))
-#define IP_FW_APPEND_FWD	(IP_FW_APPEND | (IP_FW_FWD << IP_FW_SHIFT))
-#define IP_FW_DELETE_FWD	(IP_FW_DELETE | (IP_FW_FWD << IP_FW_SHIFT))
-#define IP_FW_FLUSH_FWD		(IP_FW_FLUSH  | (IP_FW_FWD << IP_FW_SHIFT))
-#define IP_FW_ZERO_FWD		(IP_FW_ZERO   | (IP_FW_FWD << IP_FW_SHIFT))
-#define IP_FW_POLICY_FWD	(IP_FW_POLICY | (IP_FW_FWD << IP_FW_SHIFT))
-#define IP_FW_CHECK_FWD		(IP_FW_CHECK  | (IP_FW_FWD << IP_FW_SHIFT))
-
-#define IP_FW_INSERT_IN		(IP_FW_INSERT | (IP_FW_IN << IP_FW_SHIFT))
-#define IP_FW_APPEND_IN		(IP_FW_APPEND | (IP_FW_IN << IP_FW_SHIFT))
-#define IP_FW_DELETE_IN		(IP_FW_DELETE | (IP_FW_IN << IP_FW_SHIFT))
-#define IP_FW_FLUSH_IN		(IP_FW_FLUSH  | (IP_FW_IN << IP_FW_SHIFT))
-#define IP_FW_ZERO_IN		(IP_FW_ZERO   | (IP_FW_IN << IP_FW_SHIFT))
-#define IP_FW_POLICY_IN		(IP_FW_POLICY | (IP_FW_IN << IP_FW_SHIFT))
-#define IP_FW_CHECK_IN		(IP_FW_CHECK  | (IP_FW_IN << IP_FW_SHIFT))
-
-#define IP_FW_INSERT_OUT	(IP_FW_INSERT | (IP_FW_OUT << IP_FW_SHIFT))
-#define IP_FW_APPEND_OUT	(IP_FW_APPEND | (IP_FW_OUT << IP_FW_SHIFT))
-#define IP_FW_DELETE_OUT	(IP_FW_DELETE | (IP_FW_OUT << IP_FW_SHIFT))
-#define IP_FW_FLUSH_OUT		(IP_FW_FLUSH  | (IP_FW_OUT << IP_FW_SHIFT))
-#define IP_FW_ZERO_OUT		(IP_FW_ZERO   | (IP_FW_OUT << IP_FW_SHIFT))
-#define IP_FW_POLICY_OUT	(IP_FW_POLICY | (IP_FW_OUT << IP_FW_SHIFT))
-#define IP_FW_CHECK_OUT		(IP_FW_CHECK  | (IP_FW_OUT << IP_FW_SHIFT))
-
-#define IP_ACCT_INSERT		(IP_FW_INSERT | (IP_FW_ACCT << IP_FW_SHIFT))
-#define IP_ACCT_APPEND		(IP_FW_APPEND | (IP_FW_ACCT << IP_FW_SHIFT))
-#define IP_ACCT_DELETE		(IP_FW_DELETE | (IP_FW_ACCT << IP_FW_SHIFT))
-#define IP_ACCT_FLUSH		(IP_FW_FLUSH  | (IP_FW_ACCT << IP_FW_SHIFT))
-#define IP_ACCT_ZERO		(IP_FW_ZERO   | (IP_FW_ACCT << IP_FW_SHIFT))
-
-#define IP_FW_MASQ_INSERT	(IP_FW_INSERT | (IP_FW_MASQ << IP_FW_SHIFT))
-#define IP_FW_MASQ_ADD		(IP_FW_APPEND | (IP_FW_MASQ << IP_FW_SHIFT))
-#define IP_FW_MASQ_DEL		(IP_FW_DELETE | (IP_FW_MASQ << IP_FW_SHIFT))
-#define IP_FW_MASQ_FLUSH  	(IP_FW_FLUSH  | (IP_FW_MASQ << IP_FW_SHIFT))
-
-#define IP_FW_MASQ_INSERT	(IP_FW_INSERT | (IP_FW_MASQ << IP_FW_SHIFT))
-#define IP_FW_MASQ_ADD		(IP_FW_APPEND | (IP_FW_MASQ << IP_FW_SHIFT))
-#define IP_FW_MASQ_DEL		(IP_FW_DELETE | (IP_FW_MASQ << IP_FW_SHIFT))
-#define IP_FW_MASQ_FLUSH  	(IP_FW_FLUSH  | (IP_FW_MASQ << IP_FW_SHIFT))
-
-struct ip_fwpkt
-{
-	struct iphdr fwp_iph;			/* IP header */
-	union {
-		struct tcphdr fwp_tcph;		/* TCP header or */
-		struct udphdr fwp_udph;		/* UDP header */
-		struct icmphdr fwp_icmph;	/* ICMP header */
-	} fwp_protoh;
-	struct in_addr fwp_via;			/* interface address */
-	char           fwp_vianame[IFNAMSIZ];	/* interface name */
-};
-
-#define IP_FW_MASQCTL_MAX 256
-#define IP_MASQ_MOD_NMAX  32
-
-struct ip_fw_masqctl
-{
-	int mctl_action;
-	union {
-		struct {
-			char name[IP_MASQ_MOD_NMAX];
-			char data[1];
-		} mod;
-	} u;
-};
-
-/*
- * timeouts for ip masquerading
- */
-
-struct ip_fw_masq;
-
-/*
- *	Main firewall chains definitions and global var's definitions.
- */
-
-#ifdef __KERNEL__
-
-/* Modes used in the ip_fw_chk() routine. */
-#define IP_FW_MODE_FW		0x00	/* kernel firewall check */
-#define IP_FW_MODE_ACCT_IN	0x01	/* accounting (incoming) */
-#define IP_FW_MODE_ACCT_OUT	0x02	/* accounting (outgoing) */
-#define IP_FW_MODE_CHK		0x04	/* check requested by user */
-
-#include <linux/config.h>
-#ifdef CONFIG_IP_FIREWALL
-extern struct ip_fw *ip_fw_in_chain;
-extern struct ip_fw *ip_fw_out_chain;
-extern struct ip_fw *ip_fw_fwd_chain;
-extern int ip_fw_in_policy;
-extern int ip_fw_out_policy;
-extern int ip_fw_fwd_policy;
-extern int ip_fw_ctl(int, void *, int);
-#endif
-#ifdef CONFIG_IP_ACCT
-extern struct ip_fw *ip_acct_chain;
-extern int ip_acct_ctl(int, void *, int);
-#endif
-#ifdef CONFIG_IP_MASQUERADE
-extern int ip_masq_ctl(int, void *, int);
-#endif
-#ifdef CONFIG_IP_MASQUERADE
-extern int ip_masq_ctl(int, void *, int);
-#endif
-
-extern int ip_fw_masq_timeouts(void *user, int len);
-
-extern int ip_fw_chk(struct sk_buff **, struct net_device *, __u16 *,
-		     struct ip_fw *, int, int);
-#endif /* KERNEL */
-#endif /* _IP_FW_H */
diff -Nru a/include/linux/netfilter_ipv4/ipt_MARK.h b/include/linux/netfilter_ipv4/ipt_MARK.h
--- a/include/linux/netfilter_ipv4/ipt_MARK.h	2005-01-10 20:11:17 -08:00
+++ b/include/linux/netfilter_ipv4/ipt_MARK.h	2005-01-10 20:11:17 -08:00
@@ -1,8 +1,20 @@
 #ifndef _IPT_MARK_H_target
 #define _IPT_MARK_H_target
 
+/* Version 0 */
 struct ipt_mark_target_info {
 	unsigned long mark;
 };
 
+/* Version 1 */
+enum {
+	IPT_MARK_SET=0,
+	IPT_MARK_AND,
+	IPT_MARK_OR
+};
+
+struct ipt_mark_target_info_v1 {
+	unsigned long mark;
+	u_int8_t mode;
+};
 #endif /*_IPT_MARK_H_target*/
diff -Nru a/include/linux/netfilter_ipv4/ipt_multiport.h b/include/linux/netfilter_ipv4/ipt_multiport.h
--- a/include/linux/netfilter_ipv4/ipt_multiport.h	2005-01-10 20:11:19 -08:00
+++ b/include/linux/netfilter_ipv4/ipt_multiport.h	2005-01-10 20:11:19 -08:00
@@ -18,4 +18,12 @@
 	u_int8_t count;				/* Number of ports */
 	u_int16_t ports[IPT_MULTI_PORTS];	/* Ports */
 };
+
+struct ipt_multiport_v1
+{
+	u_int8_t flags;				/* Type of comparison */
+	u_int8_t count;				/* Number of ports */
+	u_int16_t ports[IPT_MULTI_PORTS];	/* Ports */
+	u_int8_t pflags[IPT_MULTI_PORTS];	/* Port flags */
+};
 #endif /*_IPT_MULTIPORT_H*/
diff -Nru a/include/linux/netlink.h b/include/linux/netlink.h
--- a/include/linux/netlink.h	2005-01-10 20:11:22 -08:00
+++ b/include/linux/netlink.h	2005-01-10 20:11:22 -08:00
@@ -116,8 +116,6 @@
 #define NETLINK_CREDS(skb)	(&NETLINK_CB((skb)).creds)
 
 
-extern int netlink_attach(int unit, int (*function)(int,struct sk_buff *skb));
-extern void netlink_detach(int unit);
 extern int netlink_post(int unit, struct sk_buff *skb);
 extern struct sock *netlink_kernel_create(int unit, void (*input)(struct sock *sk, int len));
 extern void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err);
@@ -129,7 +127,6 @@
 extern int netlink_unregister_notifier(struct notifier_block *nb);
 
 /* finegrained unicast helpers: */
-struct sock *netlink_getsockbypid(struct sock *ssk, u32 pid);
 struct sock *netlink_getsockbyfilp(struct file *filp);
 int netlink_attachskb(struct sock *sk, struct sk_buff *skb, int nonblock, long timeo);
 void netlink_detachskb(struct sock *sk, struct sk_buff *skb);
diff -Nru a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
--- a/include/linux/nfs_fs.h	2005-01-10 20:11:18 -08:00
+++ b/include/linux/nfs_fs.h	2005-01-10 20:11:18 -08:00
@@ -30,6 +30,7 @@
 #include <linux/nfs_xdr.h>
 #include <linux/rwsem.h>
 #include <linux/workqueue.h>
+#include <linux/mempool.h>
 
 /*
  * Enable debugging support for nfs client.
@@ -201,6 +202,7 @@
 #define NFS_INO_INVALID_ATTR	0x0008		/* cached attrs are invalid */
 #define NFS_INO_INVALID_DATA	0x0010		/* cached data is invalid */
 #define NFS_INO_INVALID_ATIME	0x0020		/* cached atime is invalid */
+#define NFS_INO_INVALID_ACCESS	0x0040		/* cached access cred invalid */
 
 static inline struct nfs_inode *NFS_I(struct inode *inode)
 {
@@ -239,7 +241,7 @@
 static inline void NFS_CACHEINV(struct inode *inode)
 {
 	if (!nfs_caches_unstable(inode))
-		NFS_FLAGS(inode) |= NFS_INO_INVALID_ATTR;
+		NFS_FLAGS(inode) |= NFS_INO_INVALID_ATTR | NFS_INO_INVALID_ACCESS;
 }
 
 static inline int nfs_server_capable(struct inode *inode, int cap)
@@ -424,6 +426,44 @@
 	return nfs_wb_page_priority(inode, page, 0);
 }
 
+/*
+ * Allocate and free nfs_write_data structures
+ */
+extern mempool_t *nfs_wdata_mempool;
+extern mempool_t *nfs_commit_mempool;
+
+static inline struct nfs_write_data *nfs_writedata_alloc(void)
+{
+	struct nfs_write_data *p = mempool_alloc(nfs_wdata_mempool, SLAB_NOFS);
+	if (p) {
+		memset(p, 0, sizeof(*p));
+		INIT_LIST_HEAD(&p->pages);
+	}
+	return p;
+}
+
+static inline void nfs_writedata_free(struct nfs_write_data *p)
+{
+	mempool_free(p, nfs_wdata_mempool);
+}
+
+extern void  nfs_writedata_release(struct rpc_task *task);
+
+static inline struct nfs_write_data *nfs_commit_alloc(void)
+{
+	struct nfs_write_data *p = mempool_alloc(nfs_commit_mempool, SLAB_NOFS);
+	if (p) {
+		memset(p, 0, sizeof(*p));
+		INIT_LIST_HEAD(&p->pages);
+	}
+	return p;
+}
+
+static inline void nfs_commit_free(struct nfs_write_data *p)
+{
+	mempool_free(p, nfs_commit_mempool);
+}
+
 /* Hack for future NFS swap support */
 #ifndef IS_SWAPFILE
 # define IS_SWAPFILE(inode)	(0)
@@ -439,6 +479,26 @@
 extern void nfs_readpage_result(struct rpc_task *);
 
 /*
+ * Allocate and free nfs_read_data structures
+ */
+extern mempool_t *nfs_rdata_mempool;
+
+static inline struct nfs_read_data *nfs_readdata_alloc(void)
+{
+	struct nfs_read_data *p = mempool_alloc(nfs_rdata_mempool, SLAB_NOFS);
+	if (p)
+		memset(p, 0, sizeof(*p));
+	return p;
+}
+
+static inline void nfs_readdata_free(struct nfs_read_data *p)
+{
+	mempool_free(p, nfs_rdata_mempool);
+}
+
+extern void  nfs_readdata_release(struct rpc_task *task);
+
+/*
  * linux/fs/mount_clnt.c
  * (Used only by nfsroot module)
  */
@@ -651,8 +711,7 @@
 extern int nfs4_open_reclaim(struct nfs4_state_owner *, struct nfs4_state *);
 extern int nfs4_proc_async_renew(struct nfs4_client *);
 extern int nfs4_proc_renew(struct nfs4_client *);
-extern int nfs4_do_close(struct inode *, struct nfs4_state *);
-extern int nfs4_do_downgrade(struct inode *inode, struct nfs4_state *state, mode_t mode);
+extern int nfs4_do_close(struct inode *inode, struct nfs4_state *state, mode_t mode);
 extern int nfs4_wait_clnt_recover(struct rpc_clnt *, struct nfs4_client *);
 extern struct inode *nfs4_atomic_open(struct inode *, struct dentry *, struct nameidata *);
 extern int nfs4_open_revalidate(struct inode *, struct dentry *, int);
diff -Nru a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
--- a/include/linux/nfs_xdr.h	2005-01-10 20:11:21 -08:00
+++ b/include/linux/nfs_xdr.h	2005-01-10 20:11:21 -08:00
@@ -681,7 +681,7 @@
 	int	(*read)    (struct nfs_read_data *);
 	int	(*write)   (struct nfs_write_data *);
 	int	(*commit)  (struct nfs_write_data *);
-	struct inode *	(*create)  (struct inode *, struct qstr *,
+	struct inode *	(*create)  (struct inode *, struct dentry *,
 			    struct iattr *, int);
 	int	(*remove)  (struct inode *, struct qstr *);
 	int	(*unlink_setup)  (struct rpc_message *,
diff -Nru a/include/linux/nfsd/state.h b/include/linux/nfsd/state.h
--- a/include/linux/nfsd/state.h	2005-01-10 20:11:16 -08:00
+++ b/include/linux/nfsd/state.h	2005-01-10 20:11:16 -08:00
@@ -67,6 +67,41 @@
 #define ZERO_STATEID(stateid)       (!memcmp((stateid), &zerostateid, sizeof(stateid_t)))
 #define ONE_STATEID(stateid)        (!memcmp((stateid), &onestateid, sizeof(stateid_t)))
 
+/* Delegation recall states */
+#define NFS4_NO_RECALL			0x000
+#define NFS4_RECALL_IN_PROGRESS		0x001
+#define NFS4_RECALL_COMPLETE		0x002
+#define NFS4_REAP_DELEG			0x004
+
+struct nfs4_cb_recall {
+	u32			cbr_ident;
+	int			cbr_trunc;
+	stateid_t		cbr_stateid;
+	u32			cbr_fhlen;
+	u32			cbr_fhval[NFS4_FHSIZE];
+	struct nfs4_delegation	*cbr_dp;
+};
+
+struct nfs4_delegation {
+	struct list_head	dl_del_perfile; /* nfs4_file->fi_del_perfile */
+	struct list_head	dl_del_perclnt; /* nfs4_client->cl_del_perclnt*/
+	struct list_head	dl_recall_lru;  /* delegation recalled */
+	atomic_t		dl_recall_cnt;  /* resend cb_recall only once */
+	atomic_t		dl_count;       /* ref count */
+	atomic_t		dl_state;       /* recall state */
+	struct nfs4_client	*dl_client;
+	struct nfs4_file	*dl_file;
+	struct file_lock	*dl_flock;
+	struct nfs4_stateid	*dl_stp;
+	u32			dl_type;
+	time_t			dl_time;
+	struct nfs4_cb_recall	dl_recall;
+};
+
+#define dl_stateid      dl_recall.cbr_stateid
+#define dl_fhlen        dl_recall.cbr_fhlen
+#define dl_fhval        dl_recall.cbr_fhval
+
 /* client delegation callback info */
 struct nfs4_callback {
 	/* SETCLIENTID info */
@@ -75,9 +110,8 @@
 	unsigned short          cb_port;
 	u32                     cb_prog;
 	u32                     cb_ident;
-	struct xdr_netobj	cb_netid;
 	/* RPC client info */
-	u32			cb_set;     /* successful CB_NULL call */
+	atomic_t		cb_set;     /* successful CB_NULL call */
 	struct rpc_program      cb_program;
 	struct rpc_stat         cb_stat;
 	struct rpc_clnt *       cb_client;
@@ -97,6 +131,7 @@
 	struct list_head	cl_idhash; 	/* hash by cl_clientid.id */
 	struct list_head	cl_strhash; 	/* hash by cl_name */
 	struct list_head	cl_perclient; 	/* list: stateowners */
+	struct list_head	cl_del_perclnt; /* list: delegations */
 	struct list_head        cl_lru;         /* tail queue */
 	struct xdr_netobj	cl_name; 	/* id generated by client */
 	nfs4_verifier		cl_verifier; 	/* generated by client */
@@ -107,6 +142,7 @@
 	nfs4_verifier		cl_confirm;	/* generated by server */
 	struct nfs4_callback	cl_callback;    /* callback info */
 	time_t			cl_first_state; /* first state aquisition*/
+	atomic_t		cl_count;	/* ref count */
 };
 
 /* struct nfs4_client_reset
@@ -194,6 +230,7 @@
 struct nfs4_file {
 	struct list_head        fi_hash;    /* hash by "struct inode *" */
 	struct list_head        fi_perfile; /* list: nfs4_stateid */
+	struct list_head	fi_del_perfile; /* list: nfs4_delegation */
 	struct inode		*fi_inode;
 	u32                     fi_id;      /* used with stateowner->so_id 
 					     * for stateid_hashtbl hash */
@@ -231,8 +268,10 @@
 #define CONFIRM                 0x00000002
 #define OPEN_STATE              0x00000004
 #define LOCK_STATE              0x00000008
-#define RDWR_STATE              0x00000010
-#define CLOSE_STATE             0x00000020
+#define RD_STATE	        0x00000010
+#define WR_STATE	        0x00000020
+#define CLOSE_STATE             0x00000040
+#define DELEG_RET               0x00000080
 
 #define seqid_mutating_err(err)                       \
 	(((err) != nfserr_stale_clientid) &&    \
@@ -243,14 +282,17 @@
 extern time_t nfs4_laundromat(void);
 extern int nfsd4_renew(clientid_t *clid);
 extern int nfs4_preprocess_stateid_op(struct svc_fh *current_fh, 
-		stateid_t *stateid, int flags, struct nfs4_stateid **stpp);
+		stateid_t *stateid, int flags);
 extern int nfs4_share_conflict(struct svc_fh *current_fh, 
 		unsigned int deny_type);
 extern void nfs4_lock_state(void);
 extern void nfs4_unlock_state(void);
 extern int nfs4_in_grace(void);
 extern int nfs4_check_open_reclaim(clientid_t *clid);
+extern void put_nfs4_client(struct nfs4_client *clp);
 extern void nfs4_free_stateowner(struct kref *kref);
+extern void nfsd4_probe_callback(struct nfs4_client *clp);
+extern int nfsd4_cb_recall(struct nfs4_delegation *dp);
 
 static inline void
 nfs4_put_stateowner(struct nfs4_stateowner *so)
diff -Nru a/include/linux/nfsd/xdr4.h b/include/linux/nfsd/xdr4.h
--- a/include/linux/nfsd/xdr4.h	2005-01-10 20:11:16 -08:00
+++ b/include/linux/nfsd/xdr4.h	2005-01-10 20:11:16 -08:00
@@ -44,16 +44,6 @@
 #define NFSD4_MAX_TAGLEN	128
 #define XDR_LEN(n)                     (((n) + 3) & ~3)
 
-typedef u32 delegation_zero_t;
-typedef u32 delegation_boot_t;
-typedef u64 delegation_id_t;
-
-typedef struct {
-	delegation_zero_t	ds_zero;
-	delegation_boot_t	ds_boot;
-	delegation_id_t		ds_id;
-} delegation_stateid_t;
-
 struct nfsd4_change_info {
 	u32		atomic;
 	u32		before_ctime_sec;
@@ -104,6 +94,10 @@
 #define cr_specdata1	u.dev.specdata1
 #define cr_specdata2	u.dev.specdata2
 
+struct nfsd4_delegreturn {
+	stateid_t	dr_stateid;
+};
+
 struct nfsd4_getattr {
 	u32		ga_bmval[2];        /* request */
 	struct svc_fh	*ga_fhp;            /* response */
@@ -202,13 +196,13 @@
 	u32		op_claim_type;      /* request */
 	struct xdr_netobj op_fname;	    /* request - everything but CLAIM_PREV */
 	u32		op_delegate_type;   /* request - CLAIM_PREV only */
-	delegation_stateid_t	op_delegate_stateid; /* request - CLAIM_DELEGATE_CUR only */
+	stateid_t       op_delegate_stateid; /* request - response */
 	u32		op_create;     	    /* request */
 	u32		op_createmode;      /* request */
 	u32		op_bmval[2];        /* request */
 	union {                             /* request */
-		struct iattr	iattr;		            /* UNCHECKED4,GUARDED4 */
-		nfs4_verifier	verf;		                     /* EXCLUSIVE4 */
+		struct iattr	iattr;                      /* UNCHECKED4,GUARDED4 */
+		nfs4_verifier	verf;                                /* EXCLUSIVE4 */
 	} u;
 	clientid_t	op_clientid;        /* request */
 	struct xdr_netobj op_owner;           /* request */
@@ -345,6 +339,7 @@
 		struct nfsd4_close		close;
 		struct nfsd4_commit		commit;
 		struct nfsd4_create		create;
+		struct nfsd4_delegreturn	delegreturn;
 		struct nfsd4_getattr		getattr;
 		struct svc_fh *			getfh;
 		struct nfsd4_link		link;
@@ -456,6 +451,8 @@
 nfsd4_release_lockowner(struct svc_rqst *rqstp,
 		struct nfsd4_release_lockowner *rlockowner);
 extern void nfsd4_release_compoundargs(struct nfsd4_compoundargs *);
+extern int nfsd4_delegreturn(struct svc_rqst *rqstp,
+		struct svc_fh *current_fh, struct nfsd4_delegreturn *dr);
 #endif
 
 /*
diff -Nru a/include/linux/oprofile.h b/include/linux/oprofile.h
--- a/include/linux/oprofile.h	2005-01-10 20:11:20 -08:00
+++ b/include/linux/oprofile.h	2005-01-10 20:11:20 -08:00
@@ -20,6 +20,7 @@
 struct super_block;
 struct dentry;
 struct file_operations;
+struct pt_regs;
  
 /* Operations structure to be filled in */
 struct oprofile_operations {
@@ -34,6 +35,8 @@
 	int (*start)(void);
 	/* Stop delivering interrupts. */
 	void (*stop)(void);
+	/* Initiate a stack backtrace. Optional. */
+	void (*backtrace)(struct pt_regs * const regs, unsigned int depth);
 	/* CPU identification string. */
 	char * cpu_type;
 };
@@ -41,11 +44,11 @@
 /**
  * One-time initialisation. *ops must be set to a filled-in
  * operations structure. This is called even in timer interrupt
- * mode.
+ * mode so an arch can set a backtrace callback.
  *
- * Return 0 on success.
+ * If an error occurs, the fields should be left untouched.
  */
-int oprofile_arch_init(struct oprofile_operations ** ops);
+void oprofile_arch_init(struct oprofile_operations * ops);
  
 /**
  * One-time exit/cleanup for the arch.
@@ -56,8 +59,15 @@
  * Add a sample. This may be called from any context. Pass
  * smp_processor_id() as cpu.
  */
-extern void oprofile_add_sample(unsigned long eip, unsigned int is_kernel, 
-	unsigned long event, int cpu);
+void oprofile_add_sample(struct pt_regs * const regs, unsigned long event);
+
+/* Use this instead when the PC value is not from the regs. Doesn't
+ * backtrace. */
+void oprofile_add_pc(unsigned long pc, int is_kernel, unsigned long event);
+
+/* add a backtrace entry, to be called from the ->backtrace callback */
+void oprofile_add_trace(unsigned long eip);
+
 
 /**
  * Create a file of the given name as a child of the given root, with
diff -Nru a/include/linux/page-flags.h b/include/linux/page-flags.h
--- a/include/linux/page-flags.h	2005-01-10 20:11:21 -08:00
+++ b/include/linux/page-flags.h	2005-01-10 20:11:21 -08:00
@@ -74,6 +74,7 @@
 #define PG_swapcache		16	/* Swap page: swp_entry_t in private */
 #define PG_mappedtodisk		17	/* Has blocks allocated on-disk */
 #define PG_reclaim		18	/* To be reclaimed asap */
+#define PG_nosave_free		19	/* Free, should not be written */
 
 
 /*
@@ -238,6 +239,8 @@
 #define SetPagePrivate(page)	set_bit(PG_private, &(page)->flags)
 #define ClearPagePrivate(page)	clear_bit(PG_private, &(page)->flags)
 #define PagePrivate(page)	test_bit(PG_private, &(page)->flags)
+#define __SetPagePrivate(page)  __set_bit(PG_private, &(page)->flags)
+#define __ClearPagePrivate(page) __clear_bit(PG_private, &(page)->flags)
 
 #define PageWriteback(page)	test_bit(PG_writeback, &(page)->flags)
 #define SetPageWriteback(page)						\
@@ -277,6 +280,10 @@
 #define ClearPageNosave(page)		clear_bit(PG_nosave, &(page)->flags)
 #define TestClearPageNosave(page)	test_and_clear_bit(PG_nosave, &(page)->flags)
 
+#define PageNosaveFree(page)	test_bit(PG_nosave_free, &(page)->flags)
+#define SetPageNosaveFree(page)	set_bit(PG_nosave_free, &(page)->flags)
+#define ClearPageNosaveFree(page)		clear_bit(PG_nosave_free, &(page)->flags)
+
 #define PageMappedToDisk(page)	test_bit(PG_mappedtodisk, &(page)->flags)
 #define SetPageMappedToDisk(page) set_bit(PG_mappedtodisk, &(page)->flags)
 #define ClearPageMappedToDisk(page) clear_bit(PG_mappedtodisk, &(page)->flags)
@@ -286,7 +293,11 @@
 #define ClearPageReclaim(page)	clear_bit(PG_reclaim, &(page)->flags)
 #define TestClearPageReclaim(page) test_and_clear_bit(PG_reclaim, &(page)->flags)
 
+#ifdef CONFIG_HUGETLB_PAGE
 #define PageCompound(page)	test_bit(PG_compound, &(page)->flags)
+#else
+#define PageCompound(page)	0
+#endif
 #define SetPageCompound(page)	set_bit(PG_compound, &(page)->flags)
 #define ClearPageCompound(page)	clear_bit(PG_compound, &(page)->flags)
 
diff -Nru a/include/linux/parport_pc.h b/include/linux/parport_pc.h
--- a/include/linux/parport_pc.h	2005-01-10 20:11:22 -08:00
+++ b/include/linux/parport_pc.h	2005-01-10 20:11:22 -08:00
@@ -228,12 +228,6 @@
 
 extern int parport_pc_claim_resources(struct parport *p);
 
-extern void parport_pc_init_state(struct pardevice *, struct parport_state *s);
-
-extern void parport_pc_save_state(struct parport *p, struct parport_state *s);
-
-extern void parport_pc_restore_state(struct parport *p, struct parport_state *s);
-
 /* PCMCIA code will want to get us to look at a port.  Provide a mechanism. */
 extern struct parport *parport_pc_probe_port (unsigned long base,
 					      unsigned long base_hi,
diff -Nru a/include/linux/pci.h b/include/linux/pci.h
--- a/include/linux/pci.h	2005-01-10 20:11:19 -08:00
+++ b/include/linux/pci.h	2005-01-10 20:11:19 -08:00
@@ -364,6 +364,20 @@
 #define  PCI_EXP_DEVSTA_URD	0x08	/* Unsupported Request Detected */
 #define  PCI_EXP_DEVSTA_AUXPD	0x10	/* AUX Power Detected */
 #define  PCI_EXP_DEVSTA_TRPND	0x20	/* Transactions Pending */
+#define PCI_EXP_LNKCAP		12	/* Link Capabilities */
+#define PCI_EXP_LNKCTL		16	/* Link Control */
+#define PCI_EXP_LNKSTA		18	/* Link Status */
+#define PCI_EXP_SLTCAP		20	/* Slot Capabilities */
+#define PCI_EXP_SLTCTL		24	/* Slot Control */
+#define PCI_EXP_SLTSTA		26	/* Slot Status */
+#define PCI_EXP_RTCTL		28	/* Root Control */
+#define  PCI_EXP_RTCTL_SECEE	0x01	/* System Error on Correctable Error */
+#define  PCI_EXP_RTCTL_SENFEE	0x02	/* System Error on Non-Fatal Error */
+#define  PCI_EXP_RTCTL_SEFEE	0x04	/* System Error on Fatal Error */
+#define  PCI_EXP_RTCTL_PMEIE	0x08	/* PME Interrupt Enable */
+#define  PCI_EXP_RTCTL_CRSSVE	0x10	/* CRS Software Visibility Enable */
+#define PCI_EXP_RTCAP		30	/* Root Capabilities */
+#define PCI_EXP_RTSTA		32	/* Root Status */
 
 /* Extended Capabilities (PCI-X 2.0 and Express) */
 #define PCI_EXT_CAP_ID(header)		(header & 0x0000ffff)
@@ -480,6 +494,14 @@
 #define DEVICE_COUNT_COMPATIBLE	4
 #define DEVICE_COUNT_RESOURCE	12
 
+typedef int __bitwise pci_power_t;
+
+#define PCI_D0	((pci_power_t __force) 0)
+#define PCI_D1	((pci_power_t __force) 1)
+#define PCI_D2	((pci_power_t __force) 2)
+#define PCI_D3hot	((pci_power_t __force) 3)
+#define PCI_D3cold	((pci_power_t __force) 4)
+
 /*
  * The pci_dev structure is used to describe PCI devices.
  */
@@ -508,7 +530,7 @@
 					   this if your device has broken DMA
 					   or supports 64-bit transfers.  */
 
-	u32             current_state;  /* Current operating state. In ACPI-speak,
+	pci_power_t     current_state;  /* Current operating state. In ACPI-speak,
 					   this is D0-D3, D0 being fully functional,
 					   and D3 being off. */
 
@@ -539,6 +561,7 @@
 	u32		saved_config_space[16]; /* config space saved at suspend time */
 	struct bin_attribute *rom_attr; /* attribute descriptor for sysfs ROM entry */
 	int rom_attr_enabled;		/* has display of the rom attribute been enabled? */
+	struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for resources */
 #ifdef CONFIG_PCI_NAMES
 #define PCI_NAME_SIZE	96
 #define PCI_NAME_HALF	__stringify(43)	/* less than half to handle slop */
@@ -593,6 +616,8 @@
 	unsigned short  pad2;
 	struct device		*bridge;
 	struct class_device	class_dev;
+	struct bin_attribute	*legacy_io; /* legacy I/O for this bus */
+	struct bin_attribute	*legacy_mem; /* legacy mem */
 };
 
 #define pci_bus_b(n)	list_entry(n, struct pci_bus, node)
@@ -797,8 +822,9 @@
 /* Power management related routines */
 int pci_save_state(struct pci_dev *dev);
 int pci_restore_state(struct pci_dev *dev);
-int pci_set_power_state(struct pci_dev *dev, int state);
-int pci_enable_wake(struct pci_dev *dev, u32 state, int enable);
+int pci_set_power_state(struct pci_dev *dev, pci_power_t state);
+pci_power_t pci_choose_state(struct pci_dev *dev, u32 state);
+int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable);
 
 /* Helper functions for low-level code (drivers/pci/setup-[bus,res].c) */
 void pci_bus_assign_resources(struct pci_bus *bus);
@@ -925,8 +951,9 @@
 /* Power management related routines */
 static inline int pci_save_state(struct pci_dev *dev) { return 0; }
 static inline int pci_restore_state(struct pci_dev *dev) { return 0; }
-static inline int pci_set_power_state(struct pci_dev *dev, int state) { return 0; }
-static inline int pci_enable_wake(struct pci_dev *dev, u32 state, int enable) { return 0; }
+static inline int pci_set_power_state(struct pci_dev *dev, pci_power_t state) { return 0; }
+static inline pci_power_t pci_choose_state(struct pci_dev *dev, u32 state) { return PCI_D0; }
+static inline int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable) { return 0; }
 
 #define	isa_bridge	((struct pci_dev *)NULL)
 
diff -Nru a/include/linux/pci_ids.h b/include/linux/pci_ids.h
--- a/include/linux/pci_ids.h	2005-01-10 20:11:24 -08:00
+++ b/include/linux/pci_ids.h	2005-01-10 20:11:24 -08:00
@@ -176,10 +176,20 @@
 #define PCI_DEVICE_ID_LSI_FC919		0x0624
 #define PCI_DEVICE_ID_LSI_FC919_LAN	0x0625
 #define PCI_DEVICE_ID_LSI_FC929X	0x0626
+#define PCI_DEVICE_ID_LSI_FC939X	0x0642
+#define PCI_DEVICE_ID_LSI_FC949X	0x0640
 #define PCI_DEVICE_ID_LSI_FC919X	0x0628
 #define PCI_DEVICE_ID_NCR_YELLOWFIN	0x0701
 #define PCI_DEVICE_ID_LSI_61C102	0x0901
 #define PCI_DEVICE_ID_LSI_63C815	0x1000
+#define PCI_DEVICE_ID_LSI_SAS1064	0x0050
+#define PCI_DEVICE_ID_LSI_SAS1066	0x005E
+#define PCI_DEVICE_ID_LSI_SAS1068	0x0054
+#define PCI_DEVICE_ID_LSI_SAS1064A	0x005C
+#define PCI_DEVICE_ID_LSI_SAS1064E	0x0056
+#define PCI_DEVICE_ID_LSI_SAS1066E	0x005A
+#define PCI_DEVICE_ID_LSI_SAS1068E	0x0058
+#define PCI_DEVICE_ID_LSI_SAS1078	0x0060
 
 #define PCI_VENDOR_ID_ATI		0x1002
 /* Mach64 */
@@ -496,6 +506,8 @@
 #	define PCI_DEVICE_ID_AMD_VIPER_7449	PCI_DEVICE_ID_AMD_OPUS_7449
 #define PCI_DEVICE_ID_AMD_8111_LAN	0x7462
 #define PCI_DEVICE_ID_AMD_8111_IDE	0x7469
+#define PCI_DEVICE_ID_AMD_8111_SMBUS2	0x746a
+#define PCI_DEVICE_ID_AMD_8111_SMBUS	0x746b
 #define PCI_DEVICE_ID_AMD_8111_AUDIO	0x746d
 #define PCI_DEVICE_ID_AMD_8151_0	0x7454
 #define PCI_DEVICE_ID_AMD_8131_APIC     0x7450
@@ -585,6 +597,7 @@
 #define PCI_DEVICE_ID_SI_6202		0x0002
 #define PCI_DEVICE_ID_SI_503		0x0008
 #define PCI_DEVICE_ID_SI_ACPI		0x0009
+#define PCI_DEVICE_ID_SI_SMBUS		0x0016
 #define PCI_DEVICE_ID_SI_LPC		0x0018
 #define PCI_DEVICE_ID_SI_5597_VGA	0x0200
 #define PCI_DEVICE_ID_SI_6205		0x0205
@@ -1017,6 +1030,7 @@
 #define PCI_DEVICE_ID_AL_M1531		0x1531
 #define PCI_DEVICE_ID_AL_M1533		0x1533
 #define PCI_DEVICE_ID_AL_M1541		0x1541
+#define PCI_DEVICE_ID_AL_M1543		0x1543
 #define PCI_DEVICE_ID_AL_M1563		0x1563
 #define PCI_DEVICE_ID_AL_M1621		0x1621
 #define PCI_DEVICE_ID_AL_M1631		0x1631
@@ -1026,7 +1040,9 @@
 #define PCI_DEVICE_ID_AL_M1647		0x1647
 #define PCI_DEVICE_ID_AL_M1651		0x1651
 #define PCI_DEVICE_ID_AL_M1671		0x1671
-#define PCI_DEVICE_ID_AL_M1543		0x1543
+#define PCI_DEVICE_ID_AL_M1681		0x1681
+#define PCI_DEVICE_ID_AL_M1683		0x1683
+#define PCI_DEVICE_ID_AL_M1689		0x1689
 #define PCI_DEVICE_ID_AL_M3307		0x3307
 #define PCI_DEVICE_ID_AL_M4803		0x5215
 #define PCI_DEVICE_ID_AL_M5219		0x5219
@@ -1097,7 +1113,6 @@
 #define PCI_DEVICE_ID_NVIDIA_ITNT2		0x00A0
 #define PCI_DEVICE_ID_NVIDIA_NFORCE3		0x00d1
 #define PCI_DEVICE_ID_NVIDIA_MCP3_AUDIO		0x00da
-#define PCI_DEVICE_ID_NVIDIA_NFORCE3S  		0x00e1
 #define PCI_DEVICE_ID_NVIDIA_NFORCE3_SMBUS	0x00d4
 #define PCI_DEVICE_ID_NVIDIA_NFORCE3_IDE	0x00d5
 #define PCI_DEVICE_ID_NVIDIA_NVENET_3		0x00d6
@@ -1105,6 +1120,7 @@
 #define PCI_DEVICE_ID_NVIDIA_NVENET_7		0x00df
 #define PCI_DEVICE_ID_NVIDIA_NFORCE3S		0x00e1
 #define PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA	0x00e3
+#define PCI_DEVICE_ID_NVIDIA_NFORCE3S_SMBUS	0x00e4
 #define PCI_DEVICE_ID_NVIDIA_NFORCE3S_IDE	0x00e5
 #define PCI_DEVICE_ID_NVIDIA_NVENET_6		0x00e6
 #define PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA2	0x00ee
@@ -1133,6 +1149,7 @@
 #define PCI_DEVICE_ID_NVIDIA_IGEFORCE2		0x01a0
 #define PCI_DEVICE_ID_NVIDIA_NFORCE		0x01a4
 #define PCI_DEVICE_ID_NVIDIA_MCP1_AUDIO		0x01b1
+#define PCI_DEVICE_ID_NVIDIA_NFORCE_SMBUS	0x01b4
 #define PCI_DEVICE_ID_NVIDIA_NFORCE_IDE		0x01bc
 #define PCI_DEVICE_ID_NVIDIA_NVENET_1		0x01c3
 #define PCI_DEVICE_ID_NVIDIA_NFORCE2		0x01e0
@@ -2061,9 +2078,11 @@
 #define PCI_DEVICE_ID_S3_PLATO_PXG	0x8902
 #define PCI_DEVICE_ID_S3_ViRGE_DXGX	0x8a01
 #define PCI_DEVICE_ID_S3_ViRGE_GX2	0x8a10
+#define PCI_DEVICE_ID_S3_SAVAGE4	0x8a25
 #define PCI_DEVICE_ID_S3_ViRGE_MX	0x8c01
 #define PCI_DEVICE_ID_S3_ViRGE_MXP	0x8c02
 #define PCI_DEVICE_ID_S3_ViRGE_MXPMV	0x8c03
+#define PCI_DEVICE_ID_S3_PROSAVAGE8	0x8d04
 #define PCI_DEVICE_ID_S3_SONICVIBES	0xca00
 
 #define PCI_VENDOR_ID_DUNORD		0x5544
@@ -2225,6 +2244,30 @@
 #define PCI_DEVICE_ID_INTEL_ICH6_17	0x266d
 #define PCI_DEVICE_ID_INTEL_ICH6_18	0x266e
 #define PCI_DEVICE_ID_INTEL_ICH6_19	0x266f
+#define PCI_DEVICE_ID_INTEL_ICH7_0	0x27b0
+#define PCI_DEVICE_ID_INTEL_ICH7_1	0x27b1
+#define PCI_DEVICE_ID_INTEL_ICH7_2	0x27c0
+#define PCI_DEVICE_ID_INTEL_ICH7_3	0x27c1
+#define PCI_DEVICE_ID_INTEL_ICH7_4	0x27c2
+#define PCI_DEVICE_ID_INTEL_ICH7_5	0x27c4
+#define PCI_DEVICE_ID_INTEL_ICH7_6	0x27c5
+#define PCI_DEVICE_ID_INTEL_ICH7_7	0x27c8
+#define PCI_DEVICE_ID_INTEL_ICH7_8	0x27c9
+#define PCI_DEVICE_ID_INTEL_ICH7_9	0x27ca
+#define PCI_DEVICE_ID_INTEL_ICH7_10	0x27cb
+#define PCI_DEVICE_ID_INTEL_ICH7_11	0x27cc
+#define PCI_DEVICE_ID_INTEL_ICH7_12	0x27d0
+#define PCI_DEVICE_ID_INTEL_ICH7_13	0x27d2
+#define PCI_DEVICE_ID_INTEL_ICH7_14	0x27d4
+#define PCI_DEVICE_ID_INTEL_ICH7_15	0x27d6
+#define PCI_DEVICE_ID_INTEL_ICH7_16	0x27d8
+#define PCI_DEVICE_ID_INTEL_ICH7_17	0x27da
+#define PCI_DEVICE_ID_INTEL_ICH7_18	0x27dc
+#define PCI_DEVICE_ID_INTEL_ICH7_19	0x27dd
+#define PCI_DEVICE_ID_INTEL_ICH7_20	0x27de
+#define PCI_DEVICE_ID_INTEL_ICH7_21	0x27df
+#define PCI_DEVICE_ID_INTEL_ICH7_22	0x27e0
+#define PCI_DEVICE_ID_INTEL_ICH7_23	0x27e2
 #define PCI_DEVICE_ID_INTEL_82855PM_HB	0x3340
 #define PCI_DEVICE_ID_INTEL_82830_HB	0x3575
 #define PCI_DEVICE_ID_INTEL_82830_CGC	0x3577
@@ -2359,6 +2402,9 @@
 #define PCI_VENDOR_ID_TIGERJET		0xe159
 #define PCI_DEVICE_ID_TIGERJET_300	0x0001
 #define PCI_DEVICE_ID_TIGERJET_100	0x0002
+
+#define PCI_VENDOR_ID_TTTECH		0x0357
+#define PCI_DEVICE_ID_TTTECH_MC322	0x000A
 
 #define PCI_VENDOR_ID_ARK		0xedd8
 #define PCI_DEVICE_ID_ARK_STING		0xa091
diff -Nru a/include/linux/personality.h b/include/linux/personality.h
--- a/include/linux/personality.h	2005-01-10 20:11:19 -08:00
+++ b/include/linux/personality.h	2005-01-10 20:11:19 -08:00
@@ -18,6 +18,9 @@
  * These occupy the top three bytes.
  */
 enum {
+	FDPIC_FUNCPTRS =	0x0080000,	/* userspace function ptrs point to descriptors
+						 * (signal handling)
+						 */
 	MMAP_PAGE_ZERO =	0x0100000,
 	ADDR_COMPAT_LAYOUT =	0x0200000,
 	READ_IMPLIES_EXEC =	0x0400000,
@@ -43,6 +46,7 @@
 enum {
 	PER_LINUX =		0x0000,
 	PER_LINUX_32BIT =	0x0000 | ADDR_LIMIT_32BIT,
+	PER_LINUX_FDPIC =	0x0000 | FDPIC_FUNCPTRS,
 	PER_SVR4 =		0x0001 | STICKY_TIMEOUTS | MMAP_PAGE_ZERO,
 	PER_SVR3 =		0x0002 | STICKY_TIMEOUTS | SHORT_INODE,
 	PER_SCOSVR3 =		0x0003 | STICKY_TIMEOUTS |
diff -Nru a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h
--- a/include/linux/pipe_fs_i.h	2005-01-10 20:11:20 -08:00
+++ b/include/linux/pipe_fs_i.h	2005-01-10 20:11:20 -08:00
@@ -2,10 +2,19 @@
 #define _LINUX_PIPE_FS_I_H
 
 #define PIPEFS_MAGIC 0x50495045
+
+#define PIPE_BUFFERS (16)
+
+struct pipe_buffer {
+	struct page *page;
+	unsigned short offset, len;
+};
+
 struct pipe_inode_info {
 	wait_queue_head_t wait;
-	char *base;
-	unsigned int len;
+	unsigned int nrbufs, curbuf;
+	struct pipe_buffer bufs[PIPE_BUFFERS];
+	struct page *tmp_page;
 	unsigned int start;
 	unsigned int readers;
 	unsigned int writers;
@@ -33,16 +42,10 @@
 #define PIPE_FASYNC_READERS(inode)     (&((inode).i_pipe->fasync_readers))
 #define PIPE_FASYNC_WRITERS(inode)     (&((inode).i_pipe->fasync_writers))
 
-#define PIPE_EMPTY(inode)	(PIPE_LEN(inode) == 0)
-#define PIPE_FULL(inode)	(PIPE_LEN(inode) == PIPE_SIZE)
-#define PIPE_FREE(inode)	(PIPE_SIZE - PIPE_LEN(inode))
-#define PIPE_END(inode)	((PIPE_START(inode) + PIPE_LEN(inode)) & (PIPE_SIZE-1))
-#define PIPE_MAX_RCHUNK(inode)	(PIPE_SIZE - PIPE_START(inode))
-#define PIPE_MAX_WCHUNK(inode)	(PIPE_SIZE - PIPE_END(inode))
-
 /* Drop the inode semaphore and wait for a pipe event, atomically */
 void pipe_wait(struct inode * inode);
 
 struct inode* pipe_new(struct inode* inode);
+void free_pipe_info(struct inode* inode);
 
 #endif
diff -Nru a/include/linux/pkt_cls.h b/include/linux/pkt_cls.h
--- a/include/linux/pkt_cls.h	2005-01-10 20:11:15 -08:00
+++ b/include/linux/pkt_cls.h	2005-01-10 20:11:15 -08:00
@@ -192,6 +192,7 @@
 	TCA_U32_ACT,   
 	TCA_U32_INDEV,
 	TCA_U32_PCNT,
+	TCA_U32_MARK,
 	__TCA_U32_MAX
 };
 
diff -Nru a/include/linux/pm.h b/include/linux/pm.h
--- a/include/linux/pm.h	2005-01-10 20:11:20 -08:00
+++ b/include/linux/pm.h	2005-01-10 20:11:20 -08:00
@@ -226,7 +226,7 @@
 	u32			power_state;
 #ifdef	CONFIG_PM
 	u32			prev_state;
-	u8			* saved_state;
+	void			* saved_state;
 	atomic_t		pm_users;
 	struct device		* pm_parent;
 	struct list_head	entry;
diff -Nru a/include/linux/prctl.h b/include/linux/prctl.h
--- a/include/linux/prctl.h	2005-01-10 20:11:19 -08:00
+++ b/include/linux/prctl.h	2005-01-10 20:11:19 -08:00
@@ -50,5 +50,6 @@
                                                    process timing */
 
 #define PR_SET_NAME    15		/* Set process name */
+#define PR_GET_NAME    16		/* Get process name */
 
 #endif /* _LINUX_PRCTL_H */
diff -Nru a/include/linux/preempt.h b/include/linux/preempt.h
--- a/include/linux/preempt.h	2005-01-10 20:11:17 -08:00
+++ b/include/linux/preempt.h	2005-01-10 20:11:17 -08:00
@@ -9,17 +9,18 @@
 #include <linux/config.h>
 #include <linux/linkage.h>
 
-#define preempt_count()	(current_thread_info()->preempt_count)
+#ifdef CONFIG_DEBUG_PREEMPT
+  extern void fastcall add_preempt_count(int val);
+  extern void fastcall sub_preempt_count(int val);
+#else
+# define add_preempt_count(val)	do { preempt_count() += (val); } while (0)
+# define sub_preempt_count(val)	do { preempt_count() -= (val); } while (0)
+#endif
 
-#define inc_preempt_count() \
-do { \
-	preempt_count()++; \
-} while (0)
+#define inc_preempt_count() add_preempt_count(1)
+#define dec_preempt_count() sub_preempt_count(1)
 
-#define dec_preempt_count() \
-do { \
-	preempt_count()--; \
-} while (0)
+#define preempt_count()	(current_thread_info()->preempt_count)
 
 #ifdef CONFIG_PREEMPT
 
diff -Nru a/include/linux/prio_tree.h b/include/linux/prio_tree.h
--- a/include/linux/prio_tree.h	2005-01-10 20:11:19 -08:00
+++ b/include/linux/prio_tree.h	2005-01-10 20:11:19 -08:00
@@ -1,15 +1,38 @@
 #ifndef _LINUX_PRIO_TREE_H
 #define _LINUX_PRIO_TREE_H
 
+/*
+ * K&R 2nd ed. A8.3 somewhat obliquely hints that initial sequences of struct
+ * fields with identical types should end up at the same location. We'll use
+ * this until we can scrap struct raw_prio_tree_node.
+ *
+ * Note: all this could be done more elegantly by using unnamed union/struct
+ * fields. However, gcc 2.95.3 and apparently also gcc 3.0.4 don't support this
+ * language extension.
+ */
+
+struct raw_prio_tree_node {
+	struct prio_tree_node	*left;
+	struct prio_tree_node	*right;
+	struct prio_tree_node	*parent;
+};
+
 struct prio_tree_node {
 	struct prio_tree_node	*left;
 	struct prio_tree_node	*right;
 	struct prio_tree_node	*parent;
+	unsigned long		start;
+	unsigned long		last;	/* last location _in_ interval */
 };
 
 struct prio_tree_root {
 	struct prio_tree_node	*prio_tree_node;
-	unsigned int 		index_bits;
+	unsigned short 		index_bits;
+	unsigned short		raw;
+		/*
+		 * 0: nodes are of type struct prio_tree_node
+		 * 1: nodes are of type raw_prio_tree_node
+		 */
 };
 
 struct prio_tree_iter {
@@ -29,14 +52,19 @@
 	iter->root = root;
 	iter->r_index = r_index;
 	iter->h_index = h_index;
+	iter->cur = NULL;
 }
 
-#define INIT_PRIO_TREE_ROOT(ptr)	\
+#define __INIT_PRIO_TREE_ROOT(ptr, _raw)	\
 do {					\
 	(ptr)->prio_tree_node = NULL;	\
 	(ptr)->index_bits = 1;		\
+	(ptr)->raw = (_raw);		\
 } while (0)
 
+#define INIT_PRIO_TREE_ROOT(ptr)	__INIT_PRIO_TREE_ROOT(ptr, 0)
+#define INIT_RAW_PRIO_TREE_ROOT(ptr)	__INIT_PRIO_TREE_ROOT(ptr, 1)
+
 #define INIT_PRIO_TREE_NODE(ptr)				\
 do {								\
 	(ptr)->left = (ptr)->right = (ptr)->parent = (ptr);	\
@@ -72,5 +100,21 @@
 {
 	return node->right == node;
 }
+
+
+struct prio_tree_node *prio_tree_replace(struct prio_tree_root *root,
+                struct prio_tree_node *old, struct prio_tree_node *node);
+struct prio_tree_node *prio_tree_insert(struct prio_tree_root *root,
+                struct prio_tree_node *node);
+void prio_tree_remove(struct prio_tree_root *root, struct prio_tree_node *node);
+struct prio_tree_node *prio_tree_next(struct prio_tree_iter *iter);
+
+#define raw_prio_tree_replace(root, old, node) \
+	prio_tree_replace(root, (struct prio_tree_node *) (old), \
+	    (struct prio_tree_node *) (node))
+#define raw_prio_tree_insert(root, node) \
+	prio_tree_insert(root, (struct prio_tree_node *) (node))
+#define raw_prio_tree_remove(root, node) \
+	prio_tree_remove(root, (struct prio_tree_node *) (node))
 
 #endif /* _LINUX_PRIO_TREE_H */
diff -Nru a/include/linux/proc_fs.h b/include/linux/proc_fs.h
--- a/include/linux/proc_fs.h	2005-01-10 20:11:23 -08:00
+++ b/include/linux/proc_fs.h	2005-01-10 20:11:23 -08:00
@@ -231,13 +231,8 @@
 static inline void kclist_add(struct kcore_list *new, void *addr, size_t size)
 {
 }
-static inline struct kcore_list * kclist_del(void *addr)
-{
-	return NULL;
-}
 #else
 extern void kclist_add(struct kcore_list *, void *, size_t);
-extern struct kcore_list *kclist_del(void *);
 #endif
 
 struct proc_inode {
diff -Nru a/include/linux/ptrace.h b/include/linux/ptrace.h
--- a/include/linux/ptrace.h	2005-01-10 20:11:16 -08:00
+++ b/include/linux/ptrace.h	2005-01-10 20:11:16 -08:00
@@ -87,6 +87,7 @@
 extern void __ptrace_link(struct task_struct *child,
 			  struct task_struct *new_parent);
 extern void __ptrace_unlink(struct task_struct *child);
+extern void ptrace_untrace(struct task_struct *child);
 
 static inline void ptrace_link(struct task_struct *child,
 			       struct task_struct *new_parent)
diff -Nru a/include/linux/quota.h b/include/linux/quota.h
--- a/include/linux/quota.h	2005-01-10 20:11:21 -08:00
+++ b/include/linux/quota.h	2005-01-10 20:11:21 -08:00
@@ -285,7 +285,8 @@
 	struct semaphore dqio_sem;		/* lock device while I/O in progress */
 	struct semaphore dqonoff_sem;		/* Serialize quotaon & quotaoff */
 	struct rw_semaphore dqptr_sem;		/* serialize ops using quota_info struct, pointers from inode to dquots */
-	struct file *files[MAXQUOTAS];		/* fp's to quotafiles */
+	struct inode *files[MAXQUOTAS];		/* inodes of quotafiles */
+	struct vfsmount *mnt[MAXQUOTAS];	/* mountpoint entries of filesystems with quota files */
 	struct mem_dqinfo info[MAXQUOTAS];	/* Information for each quota type */
 	struct quota_format_ops *ops[MAXQUOTAS];	/* Operations for each type */
 };
diff -Nru a/include/linux/quotaops.h b/include/linux/quotaops.h
--- a/include/linux/quotaops.h	2005-01-10 20:11:17 -08:00
+++ b/include/linux/quotaops.h	2005-01-10 20:11:17 -08:00
@@ -177,7 +177,7 @@
 {
 	int ret = -ENOSYS;
 
-	if (sb->s_qcop && sb->s_qcop->quota_off)
+	if (sb_any_quota_enabled(sb) && sb->s_qcop && sb->s_qcop->quota_off)
 		ret = sb->s_qcop->quota_off(sb, -1);
 	return ret;
 }
diff -Nru a/include/linux/raid/linear.h b/include/linux/raid/linear.h
--- a/include/linux/raid/linear.h	2005-01-10 20:11:22 -08:00
+++ b/include/linux/raid/linear.h	2005-01-10 20:11:22 -08:00
@@ -11,14 +11,9 @@
 
 typedef struct dev_info dev_info_t;
 
-struct linear_hash
-{
-	dev_info_t *dev0, *dev1;
-};
-
 struct linear_private_data
 {
-	struct linear_hash	*hash_table;
+	dev_info_t		**hash_table;
 	dev_info_t		*smallest;
 	int			nr_zones;
 	dev_info_t		disks[0];
diff -Nru a/include/linux/random.h b/include/linux/random.h
--- a/include/linux/random.h	2005-01-10 20:11:23 -08:00
+++ b/include/linux/random.h	2005-01-10 20:11:23 -08:00
@@ -52,6 +52,7 @@
 void generate_random_uuid(unsigned char uuid_out[16]);
 
 extern __u32 secure_ip_id(__u32 daddr);
+extern u32 secure_tcp_port_ephemeral(__u32 saddr, __u32 daddr, __u16 dport);
 extern __u32 secure_tcp_sequence_number(__u32 saddr, __u32 daddr,
 					__u16 sport, __u16 dport);
 extern __u32 secure_tcp_syn_cookie(__u32 saddr, __u32 daddr,
diff -Nru a/include/linux/rcupdate.h b/include/linux/rcupdate.h
--- a/include/linux/rcupdate.h	2005-01-10 20:11:17 -08:00
+++ b/include/linux/rcupdate.h	2005-01-10 20:11:17 -08:00
@@ -65,7 +65,6 @@
 	long	cur;		/* Current batch number.                      */
 	long	completed;	/* Number of the last completed batch         */
 	int	next_pending;	/* Is the next batch already waiting?         */
-	seqcount_t lock;	/* For atomic reads of cur and next_pending.  */
 } ____cacheline_maxaligned_in_smp;
 
 /* Is batch a before batch b ? */
@@ -88,9 +87,7 @@
 struct rcu_data {
 	/* 1) quiescent state handling : */
 	long		quiescbatch;     /* Batch # for grace period */
-	long		qsctr;		 /* User-mode/idle loop etc. */
-	long            last_qsctr;	 /* value of qsctr at beginning */
-					 /* of rcu grace period */
+	int		passed_quiesc;	 /* User-mode/idle loop etc. */
 	int		qs_pending;	 /* core waits for quiesc state */
 
 	/* 2) batch handling */
@@ -110,17 +107,20 @@
 extern struct rcu_ctrlblk rcu_bh_ctrlblk;
 
 /*
- * Increment the quiscent state counter.
+ * Increment the quiescent state counter.
+ * The counter is a bit degenerated: We do not need to know
+ * how many quiescent states passed, just if there was at least
+ * one since the start of the grace period. Thus just a flag.
  */
 static inline void rcu_qsctr_inc(int cpu)
 {
 	struct rcu_data *rdp = &per_cpu(rcu_data, cpu);
-	rdp->qsctr++;
+	rdp->passed_quiesc = 1;
 }
 static inline void rcu_bh_qsctr_inc(int cpu)
 {
 	struct rcu_data *rdp = &per_cpu(rcu_bh_data, cpu);
-	rdp->qsctr++;
+	rdp->passed_quiesc = 1;
 }
 
 static inline int __rcu_pending(struct rcu_ctrlblk *rcp,
diff -Nru a/include/linux/reiserfs_acl.h b/include/linux/reiserfs_acl.h
--- a/include/linux/reiserfs_acl.h	2005-01-10 20:11:23 -08:00
+++ b/include/linux/reiserfs_acl.h	2005-01-10 20:11:23 -08:00
@@ -50,7 +50,6 @@
 
 #ifdef CONFIG_REISERFS_FS_POSIX_ACL
 struct posix_acl * reiserfs_get_acl(struct inode *inode, int type);
-int reiserfs_set_acl(struct inode *inode, int type, struct posix_acl *acl);
 int reiserfs_acl_chmod (struct inode *inode);
 int reiserfs_inherit_default_acl (struct inode *dir, struct dentry *dentry, struct inode *inode);
 int reiserfs_cache_default_acl (struct inode *dir);
@@ -60,7 +59,6 @@
 extern struct reiserfs_xattr_handler posix_acl_access_handler;
 #else
 
-#define reiserfs_set_acl NULL
 #define reiserfs_get_acl NULL
 #define reiserfs_cache_default_acl(inode) 0
 
diff -Nru a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h
--- a/include/linux/reiserfs_fs.h	2005-01-10 20:11:22 -08:00
+++ b/include/linux/reiserfs_fs.h	2005-01-10 20:11:22 -08:00
@@ -243,10 +243,6 @@
 #define REISER2FS_SUPER_MAGIC_STRING "ReIsEr2Fs"
 #define REISER2FS_JR_SUPER_MAGIC_STRING "ReIsEr3Fs"
 
-extern const char reiserfs_3_5_magic_string[];
-extern const char reiserfs_3_6_magic_string[];
-extern const char reiserfs_jr_magic_string[];
-
 int is_reiserfs_3_5 (struct reiserfs_super_block * rs);
 int is_reiserfs_3_6 (struct reiserfs_super_block * rs);
 int is_reiserfs_jr (struct reiserfs_super_block * rs);
@@ -1559,8 +1555,6 @@
 };
 
 
-extern struct item_operations stat_data_ops, indirect_ops, direct_ops, 
-  direntry_ops;
 extern struct item_operations * item_ops [TYPE_ANY + 1];
 
 #define op_bytes_number(ih,bsize)                    item_ops[le_ih_k_type (ih)]->bytes_number (ih, bsize)
@@ -1576,11 +1570,7 @@
 
 
 
-
-
-#define COMP_KEYS comp_keys
 #define COMP_SHORT_KEYS comp_short_keys
-/*#define keys_of_same_object comp_short_keys*/
 
 /* number of blocks pointed to by the indirect item */
 #define I_UNFM_NUM(p_s_ih)	( ih_item_len(p_s_ih) / UNFM_P_SIZE )
@@ -1688,6 +1678,13 @@
 #define JOURNAL_MAX_COMMIT_AGE 30 
 #define JOURNAL_MAX_TRANS_AGE 30
 #define JOURNAL_PER_BALANCE_CNT (3 * (MAX_HEIGHT-2) + 9)
+#ifdef CONFIG_QUOTA
+#define REISERFS_QUOTA_TRANS_BLOCKS 2	/* We need to update data and inode (atime) */
+#define REISERFS_QUOTA_INIT_BLOCKS (DQUOT_MAX_WRITES*(JOURNAL_PER_BALANCE_CNT+2)+1)	/* 1 balancing, 1 bitmap, 1 data per write + stat data update */
+#else
+#define REISERFS_QUOTA_TRANS_BLOCKS 0
+#define REISERFS_QUOTA_INIT_BLOCKS 0
+#endif
 
 /* both of these can be as low as 1, or as high as you want.  The min is the
 ** number of 4k bitmap nodes preallocated on mount. New nodes are allocated
@@ -1828,23 +1825,14 @@
 
 /* stree.c */
 int B_IS_IN_TREE(const struct buffer_head *);
-extern inline void copy_short_key (void * to, const void * from);
 extern void copy_item_head(struct item_head * p_v_to,
 								  const struct item_head * p_v_from);
 
 // first key is in cpu form, second - le
-extern int comp_keys (const struct reiserfs_key * le_key,
-			     const struct cpu_key * cpu_key);
 extern int  comp_short_keys (const struct reiserfs_key * le_key,
 				    const struct cpu_key * cpu_key);
 extern void le_key2cpu_key (struct cpu_key * to, const struct reiserfs_key * from);
 
-// both are cpu keys
-extern  int comp_cpu_keys (const struct cpu_key *, const struct cpu_key *);
-extern int comp_short_cpu_keys (const struct cpu_key *,
-				       const struct cpu_key *);
-extern void cpu_key2cpu_key (struct cpu_key *, const struct cpu_key *);
-
 // both are in le form
 extern int comp_le_keys (const struct reiserfs_key *, const struct reiserfs_key *);
 extern int comp_short_le_keys (const struct reiserfs_key *, const struct reiserfs_key *);
@@ -1874,8 +1862,6 @@
 int comp_items (const struct item_head * stored_ih, const struct path * p_s_path);
 const struct reiserfs_key * get_rkey (const struct path * p_s_chk_path,
 							 const struct super_block  * p_s_sb);
-inline int bin_search (const void * p_v_key, const void * p_v_base, 
-					   int p_n_num, int p_n_width, int * p_n_pos);
 int search_by_key (struct super_block *, const struct cpu_key *, 
 				   struct path *, int);
 #define search_item(s,key,path) search_by_key (s, key, path, DISK_LEAF_NODE_LEVEL)
@@ -1930,12 +1916,21 @@
 void padd_item (char * item, int total_length, int length);
 
 /* inode.c */
+/* args for the create parameter of reiserfs_get_block */
+#define GET_BLOCK_NO_CREATE 0 /* don't create new blocks or convert tails */
+#define GET_BLOCK_CREATE 1    /* add anything you need to find block */
+#define GET_BLOCK_NO_HOLE 2   /* return -ENOENT for file holes */
+#define GET_BLOCK_READ_DIRECT 4  /* read the tail if indirect item not found */
+#define GET_BLOCK_NO_ISEM     8 /* i_sem is not held, don't preallocate */
+#define GET_BLOCK_NO_DANGLE   16 /* don't leave any transactions running */
+
 int restart_transaction(struct reiserfs_transaction_handle *th, struct inode *inode, struct path *path);
 void reiserfs_read_locked_inode(struct inode * inode, struct reiserfs_iget_args *args) ;
 int reiserfs_find_actor(struct inode * inode, void *p) ;
 int reiserfs_init_locked_inode(struct inode * inode, void *p) ;
 void reiserfs_delete_inode (struct inode * inode);
 int reiserfs_write_inode (struct inode * inode, int) ;
+int reiserfs_get_block (struct inode * inode, sector_t block, struct buffer_head * bh_result, int create);
 struct dentry *reiserfs_get_dentry(struct super_block *, void *) ;
 struct dentry *reiserfs_decode_fh(struct super_block *sb, __u32 *data,
                                      int len, int fhtype,
@@ -1944,7 +1939,6 @@
 int reiserfs_encode_fh( struct dentry *dentry, __u32 *data, int *lenp, 
 						int connectable );
 
-int reiserfs_prepare_write(struct file *, struct page *, unsigned, unsigned) ;
 int reiserfs_truncate_file(struct inode *, int update_timestamps) ;
 void make_cpu_key (struct cpu_key * cpu_key, struct inode * inode, loff_t offset,
 		   int type, int key_length);
@@ -1960,9 +1954,6 @@
 				   const char * symname, loff_t i_size,
 				   struct dentry *dentry, struct inode *inode);
 
-int reiserfs_sync_inode (struct reiserfs_transaction_handle *th,
-                         struct inode * inode);
-
 void reiserfs_update_sd_size (struct reiserfs_transaction_handle *th,
                               struct inode * inode, loff_t size);
 
@@ -2061,15 +2052,12 @@
 int fix_nodes (int n_op_mode, struct tree_balance * p_s_tb, 
 	       struct item_head * p_s_ins_ih, const void *);
 void unfix_nodes (struct tree_balance *);
-void free_buffers_in_tb (struct tree_balance * p_s_tb);
 
 
 /* prints.c */
 void reiserfs_panic (struct super_block * s, const char * fmt, ...) __attribute__ ( ( noreturn ) );
 void reiserfs_info (struct super_block *s, const char * fmt, ...);
-void reiserfs_printk (const char * fmt, ...);
 void reiserfs_debug (struct super_block *s, int level, const char * fmt, ...);
-void print_virtual_node (struct virtual_node * vn);
 void print_indirect_item (struct buffer_head * bh, int item_num);
 void store_print_tb (struct tree_balance * tb);
 void print_cur_tb (char * mes);
@@ -2079,7 +2067,6 @@
 #define PRINT_DIRECTORY_ITEMS 2 /* print directory items */
 #define PRINT_DIRECT_ITEMS 4 /* print contents of direct items */
 void print_block (struct buffer_head * bh, ...);
-void print_path (struct tree_balance * tb, struct path * path);
 void print_bmap (struct super_block * s, int silent);
 void print_bmap_block (int i, char * data, int size, int silent);
 /*void print_super_block (struct super_block * s, char * mes);*/
@@ -2120,8 +2107,6 @@
 int get_left_neighbor_position (struct tree_balance * tb, int h);
 int get_right_neighbor_position (struct tree_balance * tb, int h);
 void replace_key (struct tree_balance * tb, struct buffer_head *, int, struct buffer_head *, int);
-void replace_lkey (struct tree_balance *, int, struct item_head *);
-void replace_rkey (struct tree_balance *, int, struct item_head *);
 void make_empty_node (struct buffer_info *);
 struct buffer_head * get_FEB (struct tree_balance *);
 
@@ -2246,7 +2231,6 @@
 /* prototypes from ioctl.c */
 int reiserfs_ioctl (struct inode * inode, struct file * filp, 
  		    unsigned int cmd, unsigned long arg);
-int reiserfs_unpack (struct inode * inode, struct file * filp);
  
 /* ioctl's command */
 #define REISERFS_IOC_UNPACK		_IOW(0xCD,1,long)
diff -Nru a/include/linux/reiserfs_fs_sb.h b/include/linux/reiserfs_fs_sb.h
--- a/include/linux/reiserfs_fs_sb.h	2005-01-10 20:11:19 -08:00
+++ b/include/linux/reiserfs_fs_sb.h	2005-01-10 20:11:19 -08:00
@@ -410,6 +410,10 @@
     struct rw_semaphore xattr_dir_sem;
 
     int j_errno;
+#ifdef CONFIG_QUOTA
+    char *s_qf_names[MAXQUOTAS];
+    int s_jquota_fmt;
+#endif
 };
 
 /* Definitions of reiserfs on-disk properties: */
@@ -497,7 +501,6 @@
 
 #define reiserfs_error_panic(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_ERROR_PANIC))
 #define reiserfs_error_ro(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_ERROR_RO))
-#define reiserfs_error_continue(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_ERROR_CONTINUE))
 
 void reiserfs_file_buffer (struct buffer_head * bh, int list);
 extern struct file_system_type reiserfs_fs_type;
diff -Nru a/include/linux/sched.h b/include/linux/sched.h
--- a/include/linux/sched.h	2005-01-10 20:11:16 -08:00
+++ b/include/linux/sched.h	2005-01-10 20:11:16 -08:00
@@ -13,6 +13,7 @@
 #include <linux/rbtree.h>
 #include <linux/thread_info.h>
 #include <linux/cpumask.h>
+#include <linux/errno.h>
 
 #include <asm/system.h>
 #include <asm/semaphore.h>
@@ -85,9 +86,7 @@
 	load += n*(FIXED_1-exp); \
 	load >>= FSHIFT;
 
-#define CT_TO_SECS(x)	((x) / HZ)
-#define CT_TO_USECS(x)	(((x) % HZ) * 1000000/HZ)
-
+extern unsigned long total_forks;
 extern int nr_threads;
 extern int last_pid;
 DECLARE_PER_CPU(unsigned long, process_counts);
@@ -250,6 +249,9 @@
 	struct kioctx		*ioctx_list;
 
 	struct kioctx		default_kioctx;
+
+	unsigned long hiwater_rss;	/* High-water RSS usage */
+	unsigned long hiwater_vm;	/* High-water virtual memory usage */
 };
 
 struct sighand_struct {
@@ -269,6 +271,8 @@
 	atomic_t		count;
 	atomic_t		live;
 
+	wait_queue_head_t	wait_chldexit;	/* for wait4() */
+
 	/* current thread group signal load-balancing target: */
 	task_t			*curr_target;
 
@@ -276,7 +280,6 @@
 	struct sigpending	shared_pending;
 
 	/* thread group exit support */
-	int			group_exit;
 	int			group_exit_code;
 	/* overloaded:
 	 * - notify group_exit_task when ->count is equal to notify_count
@@ -288,8 +291,7 @@
 
 	/* thread group stop support, overloads group_exit_code too */
 	int			group_stop_count;
-	/* 1 if group stopped since last SIGCONT, -1 if SIGCONT since report */
-  	int			stop_state;
+	unsigned int		flags; /* see SIGNAL_* flags below */
 
 	/* POSIX.1b Interval Timers */
 	struct list_head posix_timers;
@@ -326,6 +328,15 @@
 };
 
 /*
+ * Bits in flags field of signal_struct.
+ */
+#define SIGNAL_STOP_STOPPED	0x00000001 /* job control stop in effect */
+#define SIGNAL_STOP_DEQUEUED	0x00000002 /* stop signal dequeued */
+#define SIGNAL_STOP_CONTINUED	0x00000004 /* SIGCONT since WCONTINUED reap */
+#define SIGNAL_GROUP_EXIT	0x00000008 /* group exit in progress */
+
+
+/*
  * Priority of a process goes from 0..MAX_PRIO-1, valid RT
  * priority is 0..MAX_RT_PRIO-1, and SCHED_NORMAL tasks are
  * in the range MAX_RT_PRIO..MAX_PRIO-1. Priority values
@@ -524,7 +535,6 @@
 	prio_array_t *array;
 
 	unsigned long sleep_avg;
-	long interactive_credit;
 	unsigned long long timestamp, last_ran;
 	int activated;
 
@@ -574,7 +584,6 @@
 	/* PID/PID hash table linkage. */
 	struct pid pids[PIDTYPE_MAX];
 
-	wait_queue_head_t wait_chldexit;	/* for wait4() */
 	struct completion *vfork_done;		/* for vfork() */
 	int __user *set_child_tid;		/* CLONE_CHILD_SETTID */
 	int __user *clear_child_tid;		/* CLONE_CHILD_CLEARTID */
@@ -660,6 +669,13 @@
  * to a stack based synchronous wait) if its doing sync IO.
  */
 	wait_queue_t *io_wait;
+/* i/o counters(bytes read/written, #syscalls */
+	u64 rchar, wchar, syscr, syscw;
+#if defined(CONFIG_BSD_PROCESS_ACCT)
+	u64 acct_rss_mem1;	/* accumulated rss usage */
+	u64 acct_vm_mem1;	/* accumulated virtual memory usage */
+	clock_t acct_stimexpd;	/* clock_t-converted stime since last update */
+#endif
 #ifdef CONFIG_NUMA
   	struct mempolicy *mempolicy;
   	short il_next;		/* could be shared with used_math */
@@ -721,6 +737,8 @@
 #else
 static inline int set_cpus_allowed(task_t *p, cpumask_t new_mask)
 {
+	if (!cpus_intersects(new_mask, cpu_online_map))
+		return -EINVAL;
 	return 0;
 }
 #endif
@@ -734,12 +752,19 @@
 #define sched_exec()   {}
 #endif
 
+#ifdef CONFIG_HOTPLUG_CPU
+extern void idle_task_exit(void);
+#else
+static inline void idle_task_exit(void) {}
+#endif
+
 extern void sched_idle_next(void);
 extern void set_user_nice(task_t *p, long nice);
 extern int task_prio(const task_t *p);
 extern int task_nice(const task_t *p);
 extern int task_curr(const task_t *p);
 extern int idle_cpu(int cpu);
+extern int sched_setscheduler(struct task_struct *, int, struct sched_param *);
 
 void yield(void);
 
@@ -1042,29 +1067,36 @@
 	return unlikely(test_thread_flag(TIF_NEED_RESCHED));
 }
 
-extern void __cond_resched(void);
-static inline void cond_resched(void)
-{
-	if (need_resched())
-		__cond_resched();
-}
+/*
+ * cond_resched() and cond_resched_lock(): latency reduction via
+ * explicit rescheduling in places that are safe. The return
+ * value indicates whether a reschedule was done in fact.
+ * cond_resched_lock() will drop the spinlock before scheduling,
+ * cond_resched_softirq() will enable bhs before scheduling.
+ */
+extern int cond_resched(void);
+extern int cond_resched_lock(spinlock_t * lock);
+extern int cond_resched_softirq(void);
 
 /*
- * cond_resched_lock() - if a reschedule is pending, drop the given lock,
- * call schedule, and on return reacquire the lock.
- *
- * This works OK both with and without CONFIG_PREEMPT.  We do strange low-level
- * operations here to prevent schedule() from being called twice (once via
- * spin_unlock(), once by hand).
- */
-static inline void cond_resched_lock(spinlock_t * lock)
-{
-	if (need_resched()) {
-		_raw_spin_unlock(lock);
-		preempt_enable_no_resched();
-		__cond_resched();
-		spin_lock(lock);
-	}
+ * Does a critical section need to be broken due to another
+ * task waiting?:
+ */
+#if defined(CONFIG_PREEMPT) && defined(CONFIG_SMP)
+# define need_lockbreak(lock) ((lock)->break_lock)
+#else
+# define need_lockbreak(lock) 0
+#endif
+
+/*
+ * Does a critical section need to be broken due to another
+ * task waiting or preemption being signalled:
+ */
+static inline int lock_need_resched(spinlock_t *lock)
+{
+	if (need_lockbreak(lock) || need_resched())
+		return 1;
+	return 0;
 }
 
 /* Reevaluate whether the task has signals pending delivery.
@@ -1124,6 +1156,34 @@
 
 #endif
 
+/* try_to_freeze
+ *
+ * Checks whether we need to enter the refrigerator
+ * and returns 1 if we did so.
+ */
+#ifdef CONFIG_PM
+extern void refrigerator(unsigned long);
+extern int freeze_processes(void);
+extern void thaw_processes(void);
+
+static inline int try_to_freeze(unsigned long refrigerator_flags)
+{
+	if (unlikely(current->flags & PF_FREEZE)) {
+		refrigerator(refrigerator_flags);
+		return 1;
+	} else
+		return 0;
+}
+#else
+static inline void refrigerator(unsigned long flag) {}
+static inline int freeze_processes(void) { BUG(); return 0; }
+static inline void thaw_processes(void) {}
+
+static inline int try_to_freeze(unsigned long refrigerator_flags)
+{
+	return 0;
+}
+#endif /* CONFIG_PM */
 #endif /* __KERNEL__ */
 
 #endif
diff -Nru a/include/linux/security.h b/include/linux/security.h
--- a/include/linux/security.h	2005-01-10 20:11:21 -08:00
+++ b/include/linux/security.h	2005-01-10 20:11:21 -08:00
@@ -1034,7 +1034,7 @@
 	int (*sysctl) (struct ctl_table * table, int op);
 	int (*capable) (struct task_struct * tsk, int cap);
 	int (*quotactl) (int cmds, int type, int id, struct super_block * sb);
-	int (*quota_on) (struct file * f);
+	int (*quota_on) (struct dentry * dentry);
 	int (*syslog) (int type);
 	int (*settime) (struct timespec *ts, struct timezone *tz);
 	int (*vm_enough_memory) (long pages);
@@ -1281,9 +1281,9 @@
 	return security_ops->quotactl (cmds, type, id, sb);
 }
 
-static inline int security_quota_on (struct file * file)
+static inline int security_quota_on (struct dentry * dentry)
 {
-	return security_ops->quota_on (file);
+	return security_ops->quota_on (dentry);
 }
 
 static inline int security_syslog(int type)
@@ -1959,7 +1959,7 @@
 	return 0;
 }
 
-static inline int security_quota_on (struct file * file)
+static inline int security_quota_on (struct dentry * dentry)
 {
 	return 0;
 }
diff -Nru a/include/linux/sem.h b/include/linux/sem.h
--- a/include/linux/sem.h	2005-01-10 20:11:18 -08:00
+++ b/include/linux/sem.h	2005-01-10 20:11:18 -08:00
@@ -109,6 +109,7 @@
 	int			id;	 /* internal sem id */
 	struct sembuf *		sops;	 /* array of pending operations */
 	int			nsops;	 /* number of operations */
+	int			alter;   /* does the operation alter the array? */
 };
 
 /* Each task has a list of undo requests. They are executed automatically
diff -Nru a/include/linux/serio.h b/include/linux/serio.h
--- a/include/linux/serio.h	2005-01-10 20:11:19 -08:00
+++ b/include/linux/serio.h	2005-01-10 20:11:19 -08:00
@@ -45,7 +45,8 @@
 
 	struct serio *parent, *child;
 
-	struct serio_driver *drv;	/* accessed from interrupt, must be protected by serio->lock */
+	struct serio_driver *drv;	/* accessed from interrupt, must be protected by serio->lock and serio->sem */
+	struct semaphore drv_sem;	/* protects serio->drv so attributes can pin driver */
 
 	struct device dev;
 
@@ -120,6 +121,19 @@
 static __inline__ void serio_continue_rx(struct serio *serio)
 {
 	spin_unlock_irq(&serio->lock);
+}
+
+/*
+ * Use the following fucntions to pin serio's driver in process context
+ */
+static __inline__ int serio_pin_driver(struct serio *serio)
+{
+	return down_interruptible(&serio->drv_sem);
+}
+
+static __inline__ void serio_unpin_driver(struct serio *serio)
+{
+	up(&serio->drv_sem);
 }
 
 
diff -Nru a/include/linux/skbuff.h b/include/linux/skbuff.h
--- a/include/linux/skbuff.h	2005-01-10 20:11:24 -08:00
+++ b/include/linux/skbuff.h	2005-01-10 20:11:24 -08:00
@@ -292,6 +292,8 @@
 
 extern void	       __kfree_skb(struct sk_buff *skb);
 extern struct sk_buff *alloc_skb(unsigned int size, int priority);
+extern struct sk_buff *alloc_skb_from_cache(kmem_cache_t *cp,
+					    unsigned int size, int priority);
 extern void	       kfree_skbmem(struct sk_buff *skb);
 extern struct sk_buff *skb_clone(struct sk_buff *skb, int priority);
 extern struct sk_buff *skb_copy(const struct sk_buff *skb, int priority);
@@ -935,6 +937,7 @@
  *
  *	%NULL is returned in there is no free memory.
  */
+#ifndef CONFIG_HAVE_ARCH_DEV_ALLOC_SKB
 static inline struct sk_buff *__dev_alloc_skb(unsigned int length,
 					      int gfp_mask)
 {
@@ -943,6 +946,9 @@
 		skb_reserve(skb, 16);
 	return skb;
 }
+#else
+extern struct sk_buff *__dev_alloc_skb(unsigned int length, int gfp_mask);
+#endif
 
 /**
  *	dev_alloc_skb - allocate an skbuff for sending
@@ -1071,9 +1077,9 @@
 }
 
 #define skb_queue_walk(queue, skb) \
-		for (skb = (queue)->next, prefetch(skb->next);	\
-		     (skb != (struct sk_buff *)(queue));	\
-		     skb = skb->next, prefetch(skb->next))
+		for (skb = (queue)->next;					\
+		     prefetch(skb->next), (skb != (struct sk_buff *)(queue));	\
+		     skb = skb->next)
 
 
 extern struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags,
diff -Nru a/include/linux/smp.h b/include/linux/smp.h
--- a/include/linux/smp.h	2005-01-10 20:11:19 -08:00
+++ b/include/linux/smp.h	2005-01-10 20:11:19 -08:00
@@ -8,6 +8,8 @@
 
 #include <linux/config.h>
 
+extern void cpu_idle(void);
+
 #ifdef CONFIG_SMP
 
 #include <linux/preempt.h>
@@ -95,8 +97,10 @@
 /*
  *	These macros fold the SMP functionality into a single CPU system
  */
- 
-#define smp_processor_id()			0
+
+#if !defined(__smp_processor_id) || !defined(CONFIG_PREEMPT)
+# define smp_processor_id()			0
+#endif
 #define hard_smp_processor_id()			0
 #define smp_threads_ready			1
 #define smp_call_function(func,info,retry,wait)	({ 0; })
@@ -106,6 +110,33 @@
 #define smp_prepare_boot_cpu()			do {} while (0)
 
 #endif /* !SMP */
+
+/*
+ * DEBUG_PREEMPT support: check whether smp_processor_id() is being
+ * used in a preemption-safe way.
+ *
+ * An architecture has to enable this debugging code explicitly.
+ * It can do so by renaming the smp_processor_id() macro to
+ * __smp_processor_id().  This should only be done after some minimal
+ * testing, because usually there are a number of false positives
+ * that an architecture will trigger.
+ *
+ * To fix a false positive (i.e. smp_processor_id() use that the
+ * debugging code reports but which use for some reason is legal),
+ * change the smp_processor_id() reference to _smp_processor_id(),
+ * which is the nondebug variant.  NOTE: don't use this to hack around
+ * real bugs.
+ */
+#ifdef __smp_processor_id
+# if defined(CONFIG_PREEMPT) && defined(CONFIG_DEBUG_PREEMPT)
+   extern unsigned int smp_processor_id(void);
+# else
+#  define smp_processor_id() __smp_processor_id()
+# endif
+# define _smp_processor_id() __smp_processor_id()
+#else
+# define _smp_processor_id() smp_processor_id()
+#endif
 
 #define get_cpu()		({ preempt_disable(); smp_processor_id(); })
 #define put_cpu()		preempt_enable()
diff -Nru a/include/linux/smp_lock.h b/include/linux/smp_lock.h
--- a/include/linux/smp_lock.h	2005-01-10 20:11:21 -08:00
+++ b/include/linux/smp_lock.h	2005-01-10 20:11:21 -08:00
@@ -9,15 +9,15 @@
 
 #define kernel_locked()		(current->lock_depth >= 0)
 
-extern int __lockfunc get_kernel_lock(void);
-extern void __lockfunc put_kernel_lock(void);
+extern int __lockfunc __reacquire_kernel_lock(void);
+extern void __lockfunc __release_kernel_lock(void);
 
 /*
  * Release/re-acquire global kernel lock for the scheduler
  */
 #define release_kernel_lock(tsk) do { 		\
 	if (unlikely((tsk)->lock_depth >= 0))	\
-		put_kernel_lock();		\
+		__release_kernel_lock();	\
 } while (0)
 
 /*
@@ -26,16 +26,16 @@
  * reacquire_kernel_lock() so that the compiler can see
  * it at compile-time.
  */
-#ifdef CONFIG_SMP
-#define return_value_on_smp return
+#if defined(CONFIG_SMP) && !defined(CONFIG_PREEMPT_BKL)
+# define return_value_on_smp return
 #else
-#define return_value_on_smp
+# define return_value_on_smp
 #endif
 
 static inline int reacquire_kernel_lock(struct task_struct *task)
 {
 	if (unlikely(task->lock_depth >= 0))
-		return_value_on_smp get_kernel_lock();
+		return_value_on_smp __reacquire_kernel_lock();
 	return 0;
 }
 
diff -Nru a/include/linux/spinlock.h b/include/linux/spinlock.h
--- a/include/linux/spinlock.h	2005-01-10 20:11:19 -08:00
+++ b/include/linux/spinlock.h	2005-01-10 20:11:19 -08:00
@@ -41,6 +41,7 @@
 #include <asm/spinlock.h>
 
 int __lockfunc _spin_trylock(spinlock_t *lock);
+int __lockfunc _read_trylock(rwlock_t *lock);
 int __lockfunc _write_trylock(rwlock_t *lock);
 
 void __lockfunc _spin_lock(spinlock_t *lock)	__acquires(spinlock_t);
@@ -73,6 +74,7 @@
 void __lockfunc _write_unlock_bh(rwlock_t *lock)				__releases(rwlock_t);
 
 int __lockfunc _spin_trylock_bh(spinlock_t *lock);
+int __lockfunc generic_raw_read_trylock(rwlock_t *lock);
 int in_lock_functions(unsigned long addr);
 
 #else
@@ -219,11 +221,15 @@
 #define _raw_read_unlock(lock)	do { (void)(lock); } while(0)
 #define _raw_write_lock(lock)	do { (void)(lock); } while(0)
 #define _raw_write_unlock(lock)	do { (void)(lock); } while(0)
+#define _raw_read_trylock(lock) ({ (void)(lock); (1); })
 #define _raw_write_trylock(lock) ({ (void)(lock); (1); })
 
 #define _spin_trylock(lock)	({preempt_disable(); _raw_spin_trylock(lock) ? \
 				1 : ({preempt_enable(); 0;});})
 
+#define _read_trylock(lock)	({preempt_disable();_raw_read_trylock(lock) ? \
+				1 : ({preempt_enable(); 0;});})
+
 #define _write_trylock(lock)	({preempt_disable(); _raw_write_trylock(lock) ? \
 				1 : ({preempt_enable(); 0;});})
 
@@ -425,16 +431,12 @@
  * methods are defined as nops in the case they are not required.
  */
 #define spin_trylock(lock)	__cond_lock(_spin_trylock(lock))
+#define read_trylock(lock)	__cond_lock(_read_trylock(lock))
 #define write_trylock(lock)	__cond_lock(_write_trylock(lock))
 
-/* Where's read_trylock? */
-
 #define spin_lock(lock)		_spin_lock(lock)
 #define write_lock(lock)	_write_lock(lock)
 #define read_lock(lock)		_read_lock(lock)
-#define spin_unlock(lock)	_spin_unlock(lock)
-#define write_unlock(lock)	_write_unlock(lock)
-#define read_unlock(lock)	_read_unlock(lock)
 
 #ifdef CONFIG_SMP
 #define spin_lock_irqsave(lock, flags)	flags = _spin_lock_irqsave(lock)
@@ -454,6 +456,11 @@
 
 #define write_lock_irq(lock)		_write_lock_irq(lock)
 #define write_lock_bh(lock)		_write_lock_bh(lock)
+
+#define spin_unlock(lock)	_spin_unlock(lock)
+#define write_unlock(lock)	_write_unlock(lock)
+#define read_unlock(lock)	_read_unlock(lock)
+
 #define spin_unlock_irqrestore(lock, flags)	_spin_unlock_irqrestore(lock, flags)
 #define spin_unlock_irq(lock)		_spin_unlock_irq(lock)
 #define spin_unlock_bh(lock)		_spin_unlock_bh(lock)
@@ -468,6 +475,20 @@
 
 #define spin_trylock_bh(lock)			__cond_lock(_spin_trylock_bh(lock))
 
+#define spin_trylock_irq(lock) \
+({ \
+	local_irq_disable(); \
+	_spin_trylock(lock) ? \
+	1 : ({local_irq_enable(); 0; }); \
+})
+
+#define spin_trylock_irqsave(lock, flags) \
+({ \
+	local_irq_save(flags); \
+	_spin_trylock(lock) ? \
+	1 : ({local_irq_restore(flags); 0;}); \
+})
+
 #ifdef CONFIG_LOCKMETER
 extern void _metered_spin_lock   (spinlock_t *lock);
 extern void _metered_spin_unlock (spinlock_t *lock);
@@ -476,6 +497,7 @@
 extern void _metered_read_unlock  (rwlock_t *lock);
 extern void _metered_write_lock   (rwlock_t *lock);
 extern void _metered_write_unlock (rwlock_t *lock);
+extern int  _metered_read_trylock (rwlock_t *lock);
 extern int  _metered_write_trylock(rwlock_t *lock);
 #endif
 
@@ -505,8 +527,11 @@
 	preempt_disable();
 #if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK)
 	while (test_and_set_bit(bitnum, addr)) {
-		while (test_bit(bitnum, addr))
+		while (test_bit(bitnum, addr)) {
+			preempt_enable();
 			cpu_relax();
+			preempt_disable();
+		}
 	}
 #endif
 	__acquire(bitlock);
@@ -555,5 +580,8 @@
 	return 1;
 #endif
 }
+
+#define DEFINE_SPINLOCK(x) spinlock_t x = SPIN_LOCK_UNLOCKED
+#define DEFINE_RWLOCK(x) rwlock_t x = RW_LOCK_UNLOCKED
 
 #endif /* __LINUX_SPINLOCK_H */
diff -Nru a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h
--- a/include/linux/sunrpc/auth.h	2005-01-10 20:11:19 -08:00
+++ b/include/linux/sunrpc/auth.h	2005-01-10 20:11:19 -08:00
@@ -51,7 +51,6 @@
 };
 #define RPCAUTH_CRED_LOCKED	0x0001
 #define RPCAUTH_CRED_UPTODATE	0x0002
-#define RPCAUTH_CRED_DEAD	0x0004
 
 #define RPCAUTH_CRED_MAGIC	0x0f4aa4f0
 
@@ -114,8 +113,6 @@
 extern struct rpc_authops	authdes_ops;
 #endif
 
-u32			pseudoflavor_to_flavor(rpc_authflavor_t);
-
 int			rpcauth_register(struct rpc_authops *);
 int			rpcauth_unregister(struct rpc_authops *);
 struct rpc_auth *	rpcauth_create(rpc_authflavor_t, struct rpc_clnt *);
@@ -133,7 +130,6 @@
 int			rpcauth_refreshcred(struct rpc_task *);
 void			rpcauth_invalcred(struct rpc_task *);
 int			rpcauth_uptodatecred(struct rpc_task *);
-int			rpcauth_deadcred(struct rpc_task *);
 void			rpcauth_init_credcache(struct rpc_auth *);
 void			rpcauth_free_credcache(struct rpc_auth *);
 
diff -Nru a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h
--- a/include/linux/sunrpc/cache.h	2005-01-10 20:11:19 -08:00
+++ b/include/linux/sunrpc/cache.h	2005-01-10 20:11:19 -08:00
@@ -257,8 +257,6 @@
 
 	     
 
-extern void cache_defer_req(struct cache_req *req, struct cache_head *item);
-extern void cache_revisit_request(struct cache_head *item);
 extern void cache_clean_deferred(void *owner);
 
 static inline struct cache_head  *cache_get(struct cache_head *h)
@@ -286,14 +284,11 @@
 			struct cache_head *head, time_t expiry);
 extern int cache_check(struct cache_detail *detail,
 		       struct cache_head *h, struct cache_req *rqstp);
-extern int cache_clean(void);
 extern void cache_flush(void);
 extern void cache_purge(struct cache_detail *detail);
 #define NEVER (0x7FFFFFFF)
 extern void cache_register(struct cache_detail *cd);
 extern int cache_unregister(struct cache_detail *cd);
-extern struct cache_detail *cache_find(char *name);
-extern void cache_drop(struct cache_detail *detail);
 
 extern void qword_add(char **bpp, int *lp, char *str);
 extern void qword_addhex(char **bpp, int *lp, char *buf, int blen);
diff -Nru a/include/linux/sunrpc/gss_asn1.h b/include/linux/sunrpc/gss_asn1.h
--- a/include/linux/sunrpc/gss_asn1.h	2005-01-10 20:11:24 -08:00
+++ b/include/linux/sunrpc/gss_asn1.h	2005-01-10 20:11:24 -08:00
@@ -71,8 +71,6 @@
      unsigned char **buf_in,
      int toksize);
 
-u32 g_get_mech_oid(struct xdr_netobj *mech, struct xdr_netobj * in_buf);
-
 int g_token_size(
      struct xdr_netobj *mech,
      unsigned int body_size);
diff -Nru a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h
--- a/include/linux/sunrpc/sched.h	2005-01-10 20:11:20 -08:00
+++ b/include/linux/sunrpc/sched.h	2005-01-10 20:11:20 -08:00
@@ -11,7 +11,9 @@
 
 #include <linux/timer.h>
 #include <linux/sunrpc/types.h>
+#include <linux/spinlock.h>
 #include <linux/wait.h>
+#include <linux/workqueue.h>
 #include <linux/sunrpc/xdr.h>
 
 /*
@@ -25,11 +27,18 @@
 	struct rpc_cred *	rpc_cred;	/* Credentials */
 };
 
+struct rpc_wait_queue;
+struct rpc_wait {
+	struct list_head	list;		/* wait queue links */
+	struct list_head	links;		/* Links to related tasks */
+	wait_queue_head_t	waitq;		/* sync: sleep on this q */
+	struct rpc_wait_queue *	rpc_waitq;	/* RPC wait queue we're on */
+};
+
 /*
  * This is the RPC task struct
  */
 struct rpc_task {
-	struct list_head	tk_list;	/* wait queue links */
 #ifdef RPC_DEBUG
 	unsigned long		tk_magic;	/* 0xf00baa */
 #endif
@@ -37,7 +46,6 @@
 	struct rpc_clnt *	tk_client;	/* RPC client */
 	struct rpc_rqst *	tk_rqstp;	/* RPC request */
 	int			tk_status;	/* result of last operation */
-	struct rpc_wait_queue *	tk_rpcwait;	/* RPC wait queue we're on */
 
 	/*
 	 * RPC call state
@@ -70,13 +78,18 @@
 	 * you have a pathological interest in kernel oopses.
 	 */
 	struct timer_list	tk_timer;	/* kernel timer */
-	wait_queue_head_t	tk_wait;	/* sync: sleep on this q */
 	unsigned long		tk_timeout;	/* timeout for rpc_sleep() */
 	unsigned short		tk_flags;	/* misc flags */
 	unsigned char		tk_active   : 1;/* Task has been activated */
 	unsigned char		tk_priority : 2;/* Task priority */
 	unsigned long		tk_runstate;	/* Task run status */
-	struct list_head	tk_links;	/* links to related tasks */
+	struct workqueue_struct	*tk_workqueue;	/* Normally rpciod, but could
+						 * be any workqueue
+						 */
+	union {
+		struct work_struct	tk_work;	/* Async task work queue */
+		struct rpc_wait		tk_wait;	/* RPC wait */
+	} u;
 #ifdef RPC_DEBUG
 	unsigned short		tk_pid;		/* debugging aid */
 #endif
@@ -87,11 +100,11 @@
 /* support walking a list of tasks on a wait queue */
 #define	task_for_each(task, pos, head) \
 	list_for_each(pos, head) \
-		if ((task=list_entry(pos, struct rpc_task, tk_list)),1)
+		if ((task=list_entry(pos, struct rpc_task, u.tk_wait.list)),1)
 
 #define	task_for_first(task, head) \
 	if (!list_empty(head) &&  \
-	    ((task=list_entry((head)->next, struct rpc_task, tk_list)),1))
+	    ((task=list_entry((head)->next, struct rpc_task, u.tk_wait.list)),1))
 
 /* .. and walking list of all tasks */
 #define	alltask_for_each(task, pos, head) \
@@ -126,22 +139,39 @@
 #define RPC_IS_SOFT(t)		((t)->tk_flags & RPC_TASK_SOFT)
 #define RPC_TASK_UNINTERRUPTIBLE(t) ((t)->tk_flags & RPC_TASK_NOINTR)
 
-#define RPC_TASK_SLEEPING	0
-#define RPC_TASK_RUNNING	1
-#define RPC_IS_SLEEPING(t)	(test_bit(RPC_TASK_SLEEPING, &(t)->tk_runstate))
-#define RPC_IS_RUNNING(t)	(test_bit(RPC_TASK_RUNNING, &(t)->tk_runstate))
+#define RPC_TASK_RUNNING	0
+#define RPC_TASK_QUEUED		1
+#define RPC_TASK_WAKEUP		2
+#define RPC_TASK_HAS_TIMER	3
 
+#define RPC_IS_RUNNING(t)	(test_bit(RPC_TASK_RUNNING, &(t)->tk_runstate))
 #define rpc_set_running(t)	(set_bit(RPC_TASK_RUNNING, &(t)->tk_runstate))
-#define rpc_clear_running(t)	(clear_bit(RPC_TASK_RUNNING, &(t)->tk_runstate))
+#define rpc_test_and_set_running(t) \
+				(test_and_set_bit(RPC_TASK_RUNNING, &(t)->tk_runstate))
+#define rpc_clear_running(t)	\
+	do { \
+		smp_mb__before_clear_bit(); \
+		clear_bit(RPC_TASK_RUNNING, &(t)->tk_runstate); \
+		smp_mb__after_clear_bit(); \
+	} while (0)
 
-#define rpc_set_sleeping(t)	(set_bit(RPC_TASK_SLEEPING, &(t)->tk_runstate))
+#define RPC_IS_QUEUED(t)	(test_bit(RPC_TASK_QUEUED, &(t)->tk_runstate))
+#define rpc_set_queued(t)	(set_bit(RPC_TASK_QUEUED, &(t)->tk_runstate))
+#define rpc_clear_queued(t)	\
+	do { \
+		smp_mb__before_clear_bit(); \
+		clear_bit(RPC_TASK_QUEUED, &(t)->tk_runstate); \
+		smp_mb__after_clear_bit(); \
+	} while (0)
 
-#define rpc_clear_sleeping(t) \
+#define rpc_start_wakeup(t) \
+	(test_and_set_bit(RPC_TASK_WAKEUP, &(t)->tk_runstate) == 0)
+#define rpc_finish_wakeup(t) \
 	do { \
 		smp_mb__before_clear_bit(); \
-		clear_bit(RPC_TASK_SLEEPING, &(t)->tk_runstate); \
+		clear_bit(RPC_TASK_WAKEUP, &(t)->tk_runstate); \
 		smp_mb__after_clear_bit(); \
-	} while(0)
+	} while (0)
 
 /*
  * Task priorities.
@@ -157,6 +187,7 @@
  * RPC synchronization objects
  */
 struct rpc_wait_queue {
+	spinlock_t		lock;
 	struct list_head	tasks[RPC_NR_PRIORITY];	/* task queue for each priority level */
 	unsigned long		cookie;			/* cookie of last task serviced */
 	unsigned char		maxpriority;		/* maximum priority (0 if queue is not a priority queue) */
@@ -177,6 +208,7 @@
 
 #ifndef RPC_DEBUG
 # define RPC_WAITQ_INIT(var,qname) { \
+		.lock = SPIN_LOCK_UNLOCKED, \
 		.tasks = { \
 			[0] = LIST_HEAD_INIT(var.tasks[0]), \
 			[1] = LIST_HEAD_INIT(var.tasks[1]), \
@@ -185,6 +217,7 @@
 	}
 #else
 # define RPC_WAITQ_INIT(var,qname) { \
+		.lock = SPIN_LOCK_UNLOCKED, \
 		.tasks = { \
 			[0] = LIST_HEAD_INIT(var.tasks[0]), \
 			[1] = LIST_HEAD_INIT(var.tasks[1]), \
@@ -209,20 +242,16 @@
 int		rpc_execute(struct rpc_task *);
 void		rpc_run_child(struct rpc_task *parent, struct rpc_task *child,
 					rpc_action action);
-int		rpc_add_wait_queue(struct rpc_wait_queue *, struct rpc_task *);
-void		rpc_remove_wait_queue(struct rpc_task *);
 void		rpc_init_priority_wait_queue(struct rpc_wait_queue *, const char *);
 void		rpc_init_wait_queue(struct rpc_wait_queue *, const char *);
 void		rpc_sleep_on(struct rpc_wait_queue *, struct rpc_task *,
 					rpc_action action, rpc_action timer);
-void		rpc_add_timer(struct rpc_task *, rpc_action);
 void		rpc_wake_up_task(struct rpc_task *);
 void		rpc_wake_up(struct rpc_wait_queue *);
 struct rpc_task *rpc_wake_up_next(struct rpc_wait_queue *);
 void		rpc_wake_up_status(struct rpc_wait_queue *, int);
 void		rpc_delay(struct rpc_task *, unsigned long);
 void *		rpc_malloc(struct rpc_task *, size_t);
-void		rpc_free(struct rpc_task *);
 int		rpciod_up(void);
 void		rpciod_down(void);
 void		rpciod_wake_up(void);
diff -Nru a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h
--- a/include/linux/sunrpc/xdr.h	2005-01-10 20:11:23 -08:00
+++ b/include/linux/sunrpc/xdr.h	2005-01-10 20:11:23 -08:00
@@ -95,7 +95,6 @@
 u32 *	xdr_decode_string_inplace(u32 *p, char **sp, int *lenp, int maxlen);
 u32 *	xdr_encode_netobj(u32 *p, const struct xdr_netobj *);
 u32 *	xdr_decode_netobj(u32 *p, struct xdr_netobj *);
-u32 *	xdr_decode_netobj_fixed(u32 *p, void *obj, unsigned int len);
 
 void	xdr_encode_pages(struct xdr_buf *, struct page **, unsigned int,
 			 unsigned int);
@@ -135,8 +134,6 @@
 	return iov->iov_len = ((u8 *) p - (u8 *) iov->iov_base);
 }
 
-void xdr_shift_iovec(struct kvec *, int, size_t);
-
 /*
  * Maximum number of iov's we use.
  */
@@ -145,10 +142,7 @@
 /*
  * XDR buffer helper functions
  */
-extern int xdr_kmap(struct kvec *, struct xdr_buf *, size_t);
-extern void xdr_kunmap(struct xdr_buf *, size_t);
 extern void xdr_shift_buf(struct xdr_buf *, size_t);
-extern void _copy_from_pages(char *, struct page **, size_t, size_t);
 extern void xdr_buf_from_iov(struct kvec *, struct xdr_buf *);
 extern int xdr_buf_subsegment(struct xdr_buf *, struct xdr_buf *, int, int);
 extern int xdr_buf_read_netobj(struct xdr_buf *, struct xdr_netobj *, int);
diff -Nru a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h
--- a/include/linux/sunrpc/xprt.h	2005-01-10 20:11:21 -08:00
+++ b/include/linux/sunrpc/xprt.h	2005-01-10 20:11:21 -08:00
@@ -201,8 +201,6 @@
 struct rpc_xprt *	xprt_create_proto(int proto, struct sockaddr_in *addr,
 					struct rpc_timeout *toparms);
 int			xprt_destroy(struct rpc_xprt *);
-void			xprt_shutdown(struct rpc_xprt *);
-void			xprt_default_timeout(struct rpc_timeout *, int);
 void			xprt_set_timeout(struct rpc_timeout *, unsigned int,
 					unsigned long);
 
@@ -213,7 +211,6 @@
 int			xprt_adjust_timeout(struct rpc_rqst *req);
 void			xprt_release(struct rpc_task *);
 void			xprt_connect(struct rpc_task *);
-int			xprt_clear_backlog(struct rpc_xprt *);
 void			xprt_sock_setbufsize(struct rpc_xprt *);
 
 #define XPRT_LOCKED	0
diff -Nru a/include/linux/suspend.h b/include/linux/suspend.h
--- a/include/linux/suspend.h	2005-01-10 20:11:17 -08:00
+++ b/include/linux/suspend.h	2005-01-10 20:11:17 -08:00
@@ -1,7 +1,7 @@
 #ifndef _LINUX_SWSUSP_H
 #define _LINUX_SWSUSP_H
 
-#ifdef CONFIG_X86
+#if defined(CONFIG_X86) || defined(CONFIG_FRV)
 #include <asm/suspend.h>
 #endif
 #include <linux/swap.h>
@@ -31,30 +31,21 @@
 
 /* mm/page_alloc.c */
 extern void drain_local_pages(void);
+extern void mark_free_pages(struct zone *zone);
 
 /* kernel/power/swsusp.c */
 extern int software_suspend(void);
 
-#else	/* CONFIG_SOFTWARE_SUSPEND */
+extern int pm_prepare_console(void);
+extern void pm_restore_console(void);
+
+#else
 static inline int software_suspend(void)
 {
 	printk("Warning: fake suspend called\n");
 	return -EPERM;
 }
-#endif	/* CONFIG_SOFTWARE_SUSPEND */
-
-
-#ifdef CONFIG_PM
-extern void refrigerator(unsigned long);
-extern int freeze_processes(void);
-extern void thaw_processes(void);
-
-extern int pm_prepare_console(void);
-extern void pm_restore_console(void);
-
-#else
-static inline void refrigerator(unsigned long flag) {}
-#endif	/* CONFIG_PM */
+#endif
 
 #ifdef CONFIG_SMP
 extern void disable_nonboot_cpus(void);
diff -Nru a/include/linux/syscalls.h b/include/linux/syscalls.h
--- a/include/linux/syscalls.h	2005-01-10 20:11:23 -08:00
+++ b/include/linux/syscalls.h	2005-01-10 20:11:23 -08:00
@@ -63,7 +63,7 @@
 #include <linux/quota.h>
 #include <linux/key.h>
 
-asmlinkage long sys_time(int __user *tloc);
+asmlinkage long sys_time(time_t __user *tloc);
 asmlinkage long sys_stime(time_t __user *tptr);
 asmlinkage long sys_gettimeofday(struct timeval __user *tv,
 				struct timezone __user *tz);
diff -Nru a/include/linux/sysctl.h b/include/linux/sysctl.h
--- a/include/linux/sysctl.h	2005-01-10 20:11:19 -08:00
+++ b/include/linux/sysctl.h	2005-01-10 20:11:19 -08:00
@@ -134,6 +134,7 @@
 	KERN_SPARC_SCONS_PWROFF=64, /* int: serial console power-off halt */
 	KERN_HZ_TIMER=65,	/* int: hz timer on or off */
 	KERN_UNKNOWN_NMI_PANIC=66, /* int: unknown nmi panic flag */
+	KERN_BOOTLOADER_TYPE=67, /* int: boot loader type */
 };
 
 
@@ -663,7 +664,7 @@
 	FS_LEASES=13,	/* int: leases enabled */
 	FS_DIR_NOTIFY=14,	/* int: directory notification enabled */
 	FS_LEASE_TIME=15,	/* int: maximum time to wait for a lease break */
-	FS_DQSTATS=16,	/* disc quota usage statistics */
+	FS_DQSTATS=16,	/* disc quota usage statistics and control */
 	FS_XFS=17,	/* struct: control xfs parameters */
 	FS_AIO_NR=18,	/* current system-wide number of aio requests */
 	FS_AIO_MAX_NR=19,	/* system-wide maximum number of aio requests */
@@ -679,6 +680,7 @@
 	FS_DQ_ALLOCATED = 6,
 	FS_DQ_FREE = 7,
 	FS_DQ_SYNCS = 8,
+	FS_DQ_WARNINGS = 9,
 };
 
 /* CTL_DEBUG names: */
diff -Nru a/include/linux/sysfs.h b/include/linux/sysfs.h
--- a/include/linux/sysfs.h	2005-01-10 20:11:24 -08:00
+++ b/include/linux/sysfs.h	2005-01-10 20:11:24 -08:00
@@ -2,6 +2,7 @@
  * sysfs.h - definitions for the device driver filesystem
  *
  * Copyright (c) 2001,2002 Patrick Mochel
+ * Copyright (c) 2004 Silicon Graphics, Inc.
  *
  * Please see Documentation/filesystems/sysfs.txt for more information.
  */
@@ -47,11 +48,16 @@
 
 #define attr_name(_attr) (_attr).attr.name
 
+struct vm_area_struct;
+
 struct bin_attribute {
 	struct attribute	attr;
 	size_t			size;
+	void			*private;
 	ssize_t (*read)(struct kobject *, char *, loff_t, size_t);
 	ssize_t (*write)(struct kobject *, char *, loff_t, size_t);
+	int (*mmap)(struct kobject *, struct bin_attribute *attr,
+		    struct vm_area_struct *vma);
 };
 
 struct sysfs_ops {
diff -Nru a/include/linux/tcp.h b/include/linux/tcp.h
--- a/include/linux/tcp.h	2005-01-10 20:11:19 -08:00
+++ b/include/linux/tcp.h	2005-01-10 20:11:19 -08:00
@@ -214,7 +214,9 @@
 	TCP_BIC,
 };
 
-struct tcp_opt {
+struct tcp_sock {
+	/* inet_sock has to be the first member of tcp_sock */
+	struct inet_sock	inet;
 	int	tcp_header_len;	/* Bytes of tcp header to send		*/
 
 /*
@@ -438,19 +440,9 @@
 	} bictcp;
 };
 
-/* WARNING: don't change the layout of the members in tcp_sock! */
-struct tcp_sock {
-	struct sock	  sk;
-#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
-	struct ipv6_pinfo *pinet6;
-#endif
-	struct inet_opt	  inet;
-	struct tcp_opt	  tcp;
-};
-
-static inline struct tcp_opt * tcp_sk(const struct sock *__sk)
+static inline struct tcp_sock *tcp_sk(const struct sock *sk)
 {
-	return &((struct tcp_sock *)__sk)->tcp;
+	return (struct tcp_sock *)sk;
 }
 
 #endif
diff -Nru a/include/linux/time.h b/include/linux/time.h
--- a/include/linux/time.h	2005-01-10 20:11:20 -08:00
+++ b/include/linux/time.h	2005-01-10 20:11:20 -08:00
@@ -90,6 +90,7 @@
 struct timespec current_kernel_time(void);
 
 #define CURRENT_TIME (current_kernel_time())
+#define CURRENT_TIME_SEC ((struct timespec) { xtime.tv_sec, 0 })
 
 extern void do_gettimeofday(struct timeval *tv);
 extern int do_settimeofday(struct timespec *tv);
@@ -102,6 +103,8 @@
 extern int do_setitimer(int which, struct itimerval *value, struct itimerval *ovalue);
 extern int do_getitimer(int which, struct itimerval *value);
 extern void getnstimeofday (struct timespec *tv);
+
+extern struct timespec timespec_trunc(struct timespec t, unsigned gran);
 
 static inline void
 set_normalized_timespec (struct timespec *ts, time_t sec, long nsec)
diff -Nru a/include/linux/topology.h b/include/linux/topology.h
--- a/include/linux/topology.h	2005-01-10 20:11:21 -08:00
+++ b/include/linux/topology.h	2005-01-10 20:11:21 -08:00
@@ -43,19 +43,15 @@
 	})
 #endif
 
-static inline int __next_node_with_cpus(int node)
-{
-	do
-		++node;
-	while (node < numnodes && !nr_cpus_node(node));
-	return node;
-}
-
-#define for_each_node_with_cpus(node) \
-	for (node = 0; node < numnodes; node = __next_node_with_cpus(node))
+#define for_each_node_with_cpus(node)						\
+	for_each_online_node(node)						\
+		if (nr_cpus_node(node))
 
 #ifndef node_distance
-#define node_distance(from,to)	((from) != (to))
+/* Conform to ACPI 2.0 SLIT distance definitions */
+#define LOCAL_DISTANCE		10
+#define REMOTE_DISTANCE		20
+#define node_distance(from,to)	((from) == (to) ? LOCAL_DISTANCE : REMOTE_DISTANCE)
 #endif
 #ifndef PENALTY_FOR_NODE_WITH_CPUS
 #define PENALTY_FOR_NODE_WITH_CPUS	(1)
@@ -113,13 +109,14 @@
 	.max_interval		= 4,			\
 	.busy_factor		= 64,			\
 	.imbalance_pct		= 125,			\
-	.cache_hot_time		= (5*1000/2),		\
+	.cache_hot_time		= (5*1000000/2),	\
 	.cache_nice_tries	= 1,			\
 	.per_cpu_gain		= 100,			\
 	.flags			= SD_LOAD_BALANCE	\
 				| SD_BALANCE_NEWIDLE	\
 				| SD_BALANCE_EXEC	\
 				| SD_WAKE_AFFINE	\
+				| SD_WAKE_IDLE		\
 				| SD_WAKE_BALANCE,	\
 	.last_balance		= jiffies,		\
 	.balance_interval	= 1,			\
diff -Nru a/include/linux/udp.h b/include/linux/udp.h
--- a/include/linux/udp.h	2005-01-10 20:11:17 -08:00
+++ b/include/linux/udp.h	2005-01-10 20:11:17 -08:00
@@ -53,11 +53,7 @@
 
 /* WARNING: don't change the layout of the members in udp_sock! */
 struct udp_sock {
-	struct sock	  sk;
-#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
-	struct ipv6_pinfo *pinet6;
-#endif
-	struct inet_opt	  inet;
+	struct inet_sock  inet;
 	struct udp_opt	  udp;
 };
 
diff -Nru a/include/linux/usb.h b/include/linux/usb.h
--- a/include/linux/usb.h	2005-01-10 20:11:18 -08:00
+++ b/include/linux/usb.h	2005-01-10 20:11:18 -08:00
@@ -40,9 +40,22 @@
  * Devices may also have class-specific or vendor-specific descriptors.
  */
 
-/* host-side wrapper for parsed endpoint descriptors */
+/**
+ * struct usb_host_endpoint - host-side endpoint descriptor and queue
+ * @desc: descriptor for this endpoint, wMaxPacketSize in native byteorder
+ * @urb_list: urbs queued to this endpoint; maintained by usbcore
+ * @hcpriv: for use by HCD; typically holds hardware dma queue head (QH)
+ *	with one or more transfer descriptors (TDs) per urb
+ * @extra: descriptors following this endpoint in the configuration
+ * @extralen: how many bytes of "extra" are valid
+ *
+ * USB requests are always queued to a given endpoint, identified by a
+ * descriptor within an active interface in a given USB configuration.
+ */
 struct usb_host_endpoint {
 	struct usb_endpoint_descriptor	desc;
+	struct list_head		urb_list;
+	void				*hcpriv;
 
 	unsigned char *extra;   /* Extra descriptors */
 	int extralen;
@@ -224,11 +237,6 @@
 	int extralen;
 };
 
-// FIXME remove; exported only for drivers/usb/misc/auserwald.c
-// prefer usb_device->epnum[0..31]
-extern struct usb_endpoint_descriptor *
-	usb_epnum_to_ep_desc(struct usb_device *dev, unsigned epnum);
-
 int __usb_get_extra_descriptor(char *buffer, unsigned size,
 	unsigned char type, void **ptr);
 #define usb_get_extra_descriptor(ifpoint,type,ptr)\
@@ -311,25 +319,25 @@
 	struct semaphore serialize;
 
 	unsigned int toggle[2];		/* one bit for each endpoint ([0] = IN, [1] = OUT) */
-	int epmaxpacketin[16];		/* INput endpoint specific maximums */
-	int epmaxpacketout[16];		/* OUTput endpoint specific maximums */
 
 	struct usb_device *parent;	/* our hub, unless we're the root */
 	struct usb_bus *bus;		/* Bus we're part of */
+	struct usb_host_endpoint ep0;
 
 	struct device dev;		/* Generic device interface */
 
 	struct usb_device_descriptor descriptor;/* Descriptor */
 	struct usb_host_config *config;	/* All of the configs */
+
 	struct usb_host_config *actconfig;/* the active configuration */
+	struct usb_host_endpoint *ep_in[16];
+	struct usb_host_endpoint *ep_out[16];
 
 	char **rawdescriptors;		/* Raw descriptors for each config */
 
 	int have_langid;		/* whether string_langid is valid yet */
 	int string_langid;		/* language ID for strings */
 
-	void *hcpriv;			/* Host Controller private data */
-	
 	struct list_head filelist;
 	struct dentry *usbfs_dentry;	/* usbfs dentry entry for the device */
 
@@ -360,6 +368,8 @@
 
 extern struct usb_device *usb_find_device(u16 vendor_id, u16 product_id);
 
+/*-------------------------------------------------------------------------*/
+
 /* for drivers using iso endpoints */
 extern int usb_get_current_frame_number (struct usb_device *usb_dev);
 
@@ -729,8 +739,8 @@
  * to poll for transfers.  After the URB has been submitted, the interval
  * field reflects how the transfer was actually scheduled.
  * The polling interval may be more frequent than requested.
- * For example, some controllers have a maximum interval of 32 microseconds,
- * while others support intervals of up to 1024 microseconds.
+ * For example, some controllers have a maximum interval of 32 milliseconds,
+ * while others support intervals of up to 1024 milliseconds.
  * Isochronous URBs also have transfer intervals.  (Note that for isochronous
  * endpoints, as well as high speed interrupt endpoints, the encoding of
  * the transfer interval in the endpoint descriptor is logarithmic.
@@ -1040,55 +1050,35 @@
 /* -------------------------------------------------------------------------- */
 
 /*
- * Calling this entity a "pipe" is glorifying it. A USB pipe
- * is something embarrassingly simple: it basically consists
- * of the following information:
- *  - device number (7 bits)
- *  - endpoint number (4 bits)
- *  - current Data0/1 state (1 bit) [Historical; now gone]
- *  - direction (1 bit)
- *  - speed (1 bit) [Historical and specific to USB 1.1; now gone.]
- *  - max packet size (2 bits: 8, 16, 32 or 64) [Historical; now gone.]
- *  - pipe type (2 bits: control, interrupt, bulk, isochronous)
- *
- * That's 18 bits. Really. Nothing more. And the USB people have
- * documented these eighteen bits as some kind of glorious
- * virtual data structure.
+ * For various legacy reasons, Linux has a small cookie that's paired with
+ * a struct usb_device to identify an endpoint queue.  Queue characteristics
+ * are defined by the endpoint's descriptor.  This cookie is called a "pipe",
+ * an unsigned int encoded as:
  *
- * Let's not fall in that trap. We'll just encode it as a simple
- * unsigned int. The encoding is:
- *
- *  - max size:		bits 0-1	[Historical; now gone.]
  *  - direction:	bit 7		(0 = Host-to-Device [Out],
  *					 1 = Device-to-Host [In] ...
  *					like endpoint bEndpointAddress)
- *  - device:		bits 8-14       ... bit positions known to uhci-hcd
+ *  - device address:	bits 8-14       ... bit positions known to uhci-hcd
  *  - endpoint:		bits 15-18      ... bit positions known to uhci-hcd
- *  - Data0/1:		bit 19		[Historical; now gone. ]
- *  - lowspeed:		bit 26		[Historical; now gone. ]
  *  - pipe type:	bits 30-31	(00 = isochronous, 01 = interrupt,
  *					 10 = control, 11 = bulk)
  *
- * Why? Because it's arbitrary, and whatever encoding we select is really
- * up to us. This one happens to share a lot of bit positions with the UHCI
- * specification, so that much of the uhci driver can just mask the bits
- * appropriately.
+ * Given the device address and endpoint descriptor, pipes are redundant.
  */
 
 /* NOTE:  these are not the standard USB_ENDPOINT_XFER_* values!! */
+/* (yet ... they're the values used by usbfs) */
 #define PIPE_ISOCHRONOUS		0
 #define PIPE_INTERRUPT			1
 #define PIPE_CONTROL			2
 #define PIPE_BULK			3
 
-#define usb_maxpacket(dev, pipe, out)	(out \
-				? (dev)->epmaxpacketout[usb_pipeendpoint(pipe)] \
-				: (dev)->epmaxpacketin [usb_pipeendpoint(pipe)] )
-
 #define usb_pipein(pipe)	((pipe) & USB_DIR_IN)
 #define usb_pipeout(pipe)	(!usb_pipein(pipe))
+
 #define usb_pipedevice(pipe)	(((pipe) >> 8) & 0x7f)
 #define usb_pipeendpoint(pipe)	(((pipe) >> 15) & 0xf)
+
 #define usb_pipetype(pipe)	(((pipe) >> 30) & 3)
 #define usb_pipeisoc(pipe)	(usb_pipetype((pipe)) == PIPE_ISOCHRONOUS)
 #define usb_pipeint(pipe)	(usb_pipetype((pipe)) == PIPE_INTERRUPT)
@@ -1115,6 +1105,28 @@
 #define usb_rcvbulkpipe(dev,endpoint)	((PIPE_BULK << 30) | __create_pipe(dev,endpoint) | USB_DIR_IN)
 #define usb_sndintpipe(dev,endpoint)	((PIPE_INTERRUPT << 30) | __create_pipe(dev,endpoint))
 #define usb_rcvintpipe(dev,endpoint)	((PIPE_INTERRUPT << 30) | __create_pipe(dev,endpoint) | USB_DIR_IN)
+
+/*-------------------------------------------------------------------------*/
+
+static inline __u16
+usb_maxpacket(struct usb_device *udev, int pipe, int is_out)
+{
+	struct usb_host_endpoint	*ep;
+	unsigned			epnum = usb_pipeendpoint(pipe);
+
+	if (is_out) {
+		WARN_ON(usb_pipein(pipe));
+		ep = udev->ep_out[epnum];
+	} else {
+		WARN_ON(usb_pipeout(pipe));
+		ep = udev->ep_in[epnum];
+	}
+	if (!ep)
+		return 0;
+
+	/* NOTE:  only 0x07ff bits are for packet size... */
+	return le16_to_cpu(ep->desc.wMaxPacketSize);
+}
 
 /* -------------------------------------------------------------------------- */
 
diff -Nru a/include/linux/usb_ch9.h b/include/linux/usb_ch9.h
--- a/include/linux/usb_ch9.h	2005-01-10 20:11:18 -08:00
+++ b/include/linux/usb_ch9.h	2005-01-10 20:11:18 -08:00
@@ -79,6 +79,7 @@
 #define USB_DEVICE_B_HNP_ENABLE		3	/* dev may initiate HNP */
 #define USB_DEVICE_A_HNP_SUPPORT	4	/* RH port supports HNP */
 #define USB_DEVICE_A_ALT_HNP_SUPPORT	5	/* other RH port does */
+#define USB_DEVICE_DEBUG_MODE		6	/* (special devices only) */
 
 #define USB_ENDPOINT_HALT		0	/* IN/OUT will STALL */
 
@@ -156,14 +157,14 @@
 	__u8  bLength;
 	__u8  bDescriptorType;
 
-	__u16 bcdUSB;
+	__le16 bcdUSB;
 	__u8  bDeviceClass;
 	__u8  bDeviceSubClass;
 	__u8  bDeviceProtocol;
 	__u8  bMaxPacketSize0;
-	__u16 idVendor;
-	__u16 idProduct;
-	__u16 bcdDevice;
+	__le16 idVendor;
+	__le16 idProduct;
+	__le16 bcdDevice;
 	__u8  iManufacturer;
 	__u8  iProduct;
 	__u8  iSerialNumber;
@@ -208,7 +209,7 @@
 	__u8  bLength;
 	__u8  bDescriptorType;
 
-	__u16 wTotalLength;
+	__le16 wTotalLength;
 	__u8  bNumInterfaces;
 	__u8  bConfigurationValue;
 	__u8  iConfiguration;
@@ -264,7 +265,7 @@
 
 	__u8  bEndpointAddress;
 	__u8  bmAttributes;
-	__u16 wMaxPacketSize;
+	__le16 wMaxPacketSize;
 	__u8  bInterval;
 
 	// NOTE:  these two are _only_ in audio endpoints.
@@ -297,7 +298,7 @@
 	__u8  bLength;
 	__u8  bDescriptorType;
 
-	__u16 bcdUSB;
+	__le16 bcdUSB;
 	__u8  bDeviceClass;
 	__u8  bDeviceSubClass;
 	__u8  bDeviceProtocol;
@@ -320,6 +321,18 @@
 /* from usb_otg_descriptor.bmAttributes */
 #define USB_OTG_SRP		(1 << 0)
 #define USB_OTG_HNP		(1 << 1)	/* swap host/device roles */
+
+/*-------------------------------------------------------------------------*/
+
+/* USB_DT_DEBUG:  for special highspeed devices, replacing serial console */
+struct usb_debug_descriptor {
+	__u8  bLength;
+	__u8  bDescriptorType;
+
+	/* bulk endpoints with 8 byte maxpacket */
+	__u8  bDebugInEndpoint;
+	__u8  bDebugOutEndpoint;
+};
 
 /*-------------------------------------------------------------------------*/
 
diff -Nru a/include/mtd/mtd-abi.h b/include/mtd/mtd-abi.h
--- a/include/mtd/mtd-abi.h	2005-01-10 20:11:19 -08:00
+++ b/include/mtd/mtd-abi.h	2005-01-10 20:11:19 -08:00
@@ -1,5 +1,5 @@
 /*
- * $Id: mtd-abi.h,v 1.6 2004/08/09 13:38:30 dwmw2 Exp $
+ * $Id: mtd-abi.h,v 1.7 2004/11/23 15:37:32 gleixner Exp $
  *
  * Portions of MTD ABI definition which are shared by kernel and user space 
  */
@@ -40,6 +40,7 @@
 #define MTD_XIP			32	// eXecute-In-Place possible
 #define MTD_OOB			64	// Out-of-band data (NAND flash)
 #define MTD_ECC			128	// Device capable of automatic ECC
+#define MTD_NO_VIRTBLOCKS	256	// Virtual blocks not allowed
 
 // Some common devices / combinations of capabilities
 #define MTD_CAP_ROM		0
diff -Nru a/include/net/act_api.h b/include/net/act_api.h
--- a/include/net/act_api.h	2005-01-10 20:11:19 -08:00
+++ b/include/net/act_api.h	2005-01-10 20:11:19 -08:00
@@ -76,15 +76,12 @@
 extern int tcf_unregister_action(struct tc_action_ops *a);
 extern void tcf_action_destroy(struct tc_action *a, int bind);
 extern int tcf_action_exec(struct sk_buff *skb, struct tc_action *a, struct tcf_result *res);
-extern int tcf_action_init(struct rtattr *rta, struct rtattr *est, struct tc_action *a,char *n, int ovr, int bind);
-extern int tcf_action_init_1(struct rtattr *rta, struct rtattr *est, struct tc_action *a,char *n, int ovr, int bind);
+extern struct tc_action *tcf_action_init(struct rtattr *rta, struct rtattr *est, char *n, int ovr, int bind, int *err);
+extern struct tc_action *tcf_action_init_1(struct rtattr *rta, struct rtattr *est, char *n, int ovr, int bind, int *err);
 extern int tcf_action_dump(struct sk_buff *skb, struct tc_action *a, int, int);
 extern int tcf_action_dump_old(struct sk_buff *skb, struct tc_action *a, int, int);
 extern int tcf_action_dump_1(struct sk_buff *skb, struct tc_action *a, int, int);
 extern int tcf_action_copy_stats (struct sk_buff *,struct tc_action *);
-extern int tcf_act_police_locate(struct rtattr *rta, struct rtattr *est,struct tc_action *,int , int );
-extern int tcf_act_police_dump(struct sk_buff *, struct tc_action *, int, int);
-extern int tcf_act_police(struct sk_buff **skb, struct tc_action *a);
 #endif /* CONFIG_NET_CLS_ACT */
 
 extern int tcf_police(struct sk_buff *skb, struct tcf_police *p);
diff -Nru a/include/net/ax25.h b/include/net/ax25.h
--- a/include/net/ax25.h	2005-01-10 20:11:20 -08:00
+++ b/include/net/ax25.h	2005-01-10 20:11:20 -08:00
@@ -231,7 +231,6 @@
 extern void ax25_destroy_socket(ax25_cb *);
 extern ax25_cb *ax25_create_cb(void);
 extern void ax25_fillin_cb(ax25_cb *, ax25_dev *);
-extern int  ax25_create(struct socket *, int);
 extern struct sock *ax25_make_new(struct sock *, struct ax25_dev *);
 
 /* ax25_addr.c */
@@ -239,7 +238,6 @@
 extern char *ax2asc(ax25_address *);
 extern ax25_address *asc2ax(char *);
 extern int  ax25cmp(ax25_address *, ax25_address *);
-extern int  ax25digicmp(ax25_digi *, ax25_digi *);
 extern unsigned char *ax25_addr_parse(unsigned char *, int, ax25_address *, ax25_address *, ax25_digi *, int *, int *);
 extern int  ax25_addr_build(unsigned char *, ax25_address *, ax25_address *, ax25_digi *, int, int);
 extern int  ax25_addr_size(ax25_digi *);
@@ -268,7 +266,6 @@
 extern void ax25_ds_nr_error_recovery(ax25_cb *);
 extern void ax25_ds_enquiry_response(ax25_cb *);
 extern void ax25_ds_establish_data_link(ax25_cb *);
-extern void ax25_dev_dama_on(ax25_dev *);
 extern void ax25_dev_dama_off(ax25_dev *);
 extern void ax25_dama_on(ax25_cb *);
 extern void ax25_dama_off(ax25_cb *);
diff -Nru a/include/net/icmp.h b/include/net/icmp.h
--- a/include/net/icmp.h	2005-01-10 20:11:24 -08:00
+++ b/include/net/icmp.h	2005-01-10 20:11:24 -08:00
@@ -50,15 +50,9 @@
 	struct icmp_filter filter;
 };
 
-struct ipv6_pinfo;
-
 /* WARNING: don't change the layout of the members in raw_sock! */
 struct raw_sock {
-	struct sock	  sk;
-#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
-	struct ipv6_pinfo *pinet6;
-#endif
-	struct inet_opt	  inet;
+	struct inet_sock  inet;
 	struct raw_opt	  raw4;
 };
 
diff -Nru a/include/net/if_inet6.h b/include/net/if_inet6.h
--- a/include/net/if_inet6.h	2005-01-10 20:11:22 -08:00
+++ b/include/net/if_inet6.h	2005-01-10 20:11:22 -08:00
@@ -266,5 +266,20 @@
 {
 	buf[0] = 0x00;
 }
+
+static inline void ipv6_ib_mc_map(struct in6_addr *addr, char *buf)
+{
+	buf[0]  = 0;		/* Reserved */
+	buf[1]  = 0xff;		/* Multicast QPN */
+	buf[2]  = 0xff;
+	buf[3]  = 0xff;
+	buf[4]  = 0xff;
+	buf[5]  = 0x12;		/* link local scope */
+	buf[6]  = 0x60;		/* IPv6 signature */
+	buf[7]  = 0x1b;
+	buf[8]  = 0;		/* P_Key */
+	buf[9]  = 0;
+	memcpy(buf + 10, addr->s6_addr + 6, 10);
+}
 #endif
 #endif
diff -Nru a/include/net/ip.h b/include/net/ip.h
--- a/include/net/ip.h	2005-01-10 20:11:20 -08:00
+++ b/include/net/ip.h	2005-01-10 20:11:20 -08:00
@@ -229,6 +229,39 @@
 	buf[3]=addr&0x7F;
 }
 
+/*
+ *	Map a multicast IP onto multicast MAC for type IP-over-InfiniBand.
+ *	Leave P_Key as 0 to be filled in by driver.
+ */
+
+static inline void ip_ib_mc_map(u32 addr, char *buf)
+{
+	buf[0]  = 0;		/* Reserved */
+	buf[1]  = 0xff;		/* Multicast QPN */
+	buf[2]  = 0xff;
+	buf[3]  = 0xff;
+	addr    = ntohl(addr);
+	buf[4]  = 0xff;
+	buf[5]  = 0x12;		/* link local scope */
+	buf[6]  = 0x40;		/* IPv4 signature */
+	buf[7]  = 0x1b;
+	buf[8]  = 0;		/* P_Key */
+	buf[9]  = 0;
+	buf[10] = 0;
+	buf[11] = 0;
+	buf[12] = 0;
+	buf[13] = 0;
+	buf[14] = 0;
+	buf[15] = 0;
+	buf[19] = addr & 0xff;
+	addr  >>= 8;
+	buf[18] = addr & 0xff;
+	addr  >>= 8;
+	buf[17] = addr & 0xff;
+	addr  >>= 8;
+	buf[16] = addr & 0x0f;
+}
+
 #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
 #include <linux/ipv6.h>
 #endif
@@ -294,8 +327,6 @@
 			      u16 port, u32 info, u8 *payload);
 extern void	ip_local_error(struct sock *sk, int err, u32 daddr, u16 dport,
 			       u32 info);
-
-extern int ipv4_proc_init(void);
 
 /* sysctl helpers - any sysctl which holds a value that ends up being
  * fed into the routing cache should use these handlers.
diff -Nru a/include/net/ip_fib.h b/include/net/ip_fib.h
--- a/include/net/ip_fib.h	2005-01-10 20:11:22 -08:00
+++ b/include/net/ip_fib.h	2005-01-10 20:11:22 -08:00
@@ -200,7 +200,6 @@
 
 /* Exported by fib_frontend.c */
 extern void		ip_fib_init(void);
-extern void		fib_flush(void);
 extern int inet_rtm_delroute(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg);
 extern int inet_rtm_newroute(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg);
 extern int inet_rtm_getroute(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg);
@@ -226,7 +225,6 @@
 extern int inet_rtm_delrule(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg);
 extern int inet_rtm_newrule(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg);
 extern int inet_dump_rules(struct sk_buff *skb, struct netlink_callback *cb);
-extern u32 fib_rules_map_destination(u32 daddr, struct fib_result *res);
 #ifdef CONFIG_NET_CLS_ROUTE
 extern u32 fib_rules_tclass(struct fib_result *res);
 #endif
diff -Nru a/include/net/ipconfig.h b/include/net/ipconfig.h
--- a/include/net/ipconfig.h	2005-01-10 20:11:19 -08:00
+++ b/include/net/ipconfig.h	2005-01-10 20:11:19 -08:00
@@ -8,14 +8,10 @@
 
 /* The following are initdata: */
 
-extern int ic_enable;		/* Enable or disable the whole shebang */
-
 extern int ic_proto_enabled;	/* Protocols enabled (see IC_xxx) */
-extern int ic_host_name_set;	/* Host name set by ipconfig? */
 extern int ic_set_manually;	/* IPconfig parameters set manually */
 
 extern u32 ic_myaddr;		/* My IP address */
-extern u32 ic_netmask;		/* Netmask for local subnet */
 extern u32 ic_gateway;		/* Gateway IP address */
 
 extern u32 ic_servaddr;		/* Boot server IP address */
@@ -23,13 +19,6 @@
 extern u32 root_server_addr;	/* Address of NFS server */
 extern u8 root_server_path[];	/* Path to mount as root */
 
-
-
-/* The following are persistent (not initdata): */
-
-extern int ic_proto_used;	/* Protocol used, if any */
-extern u32 ic_nameserver;	/* DNS server IP address */
-extern u8 ic_domain[];		/* DNS (not NIS) domain name */
 
 /* bits in ic_proto_{enabled,used} */
 #define IC_PROTO	0xFF	/* Protocols mask: */
diff -Nru a/include/net/ipx.h b/include/net/ipx.h
--- a/include/net/ipx.h	2005-01-10 20:11:16 -08:00
+++ b/include/net/ipx.h	2005-01-10 20:11:16 -08:00
@@ -139,14 +139,6 @@
 		ipxitf_down(intrfc);
 }
 
-extern void __ipxitf_down(struct ipx_interface *intrfc);
-
-static __inline__ void __ipxitf_put(struct ipx_interface *intrfc)
-{
-	if (atomic_dec_and_test(&intrfc->refcnt))
-		__ipxitf_down(intrfc);
-}
-
 static __inline__ void ipxrtr_hold(struct ipx_route *rt)
 {
 	        atomic_inc(&rt->refcnt);
diff -Nru a/include/net/irda/ircomm_event.h b/include/net/irda/ircomm_event.h
--- a/include/net/irda/ircomm_event.h	2005-01-10 20:11:18 -08:00
+++ b/include/net/irda/ircomm_event.h	2005-01-10 20:11:18 -08:00
@@ -75,7 +75,6 @@
 };
 
 extern char *ircomm_state[];
-extern char *ircomm_event[];
 
 struct ircomm_cb;   /* Forward decl. */
 
diff -Nru a/include/net/irda/ircomm_lmp.h b/include/net/irda/ircomm_lmp.h
--- a/include/net/irda/ircomm_lmp.h	2005-01-10 20:11:18 -08:00
+++ b/include/net/irda/ircomm_lmp.h	2005-01-10 20:11:18 -08:00
@@ -32,34 +32,7 @@
 #define IRCOMM_LMP_H
 
 #include <net/irda/ircomm_core.h>
-#include <net/irda/ircomm_event.h>
 
 int ircomm_open_lsap(struct ircomm_cb *self);
-int  ircomm_lmp_connect_request(struct ircomm_cb *self, 
-				struct sk_buff *userdata, 
-				struct ircomm_info *info);
-int  ircomm_lmp_connect_response(struct ircomm_cb *self, struct sk_buff *skb);
-int  ircomm_lmp_disconnect_request(struct ircomm_cb *self, 
-				   struct sk_buff *userdata, 
-				   struct ircomm_info *info);
-int  ircomm_lmp_data_request(struct ircomm_cb *self, struct sk_buff *skb, 
-			     int clen);
-int  ircomm_lmp_control_request(struct ircomm_cb *self, 
-			       struct sk_buff *userdata);
-int  ircomm_lmp_data_indication(void *instance, void *sap,
-				struct sk_buff *skb);
-void ircomm_lmp_connect_confirm(void *instance, void *sap,
-				struct qos_info *qos, 
-				__u32 max_sdu_size, 
-				__u8 max_header_size,
-				struct sk_buff *skb);
-void ircomm_lmp_connect_indication(void *instance, void *sap,
-				   struct qos_info *qos,
-				   __u32 max_sdu_size,
-				   __u8 max_header_size,
-				   struct sk_buff *skb);
-void ircomm_lmp_disconnect_indication(void *instance, void *sap, 
-				      LM_REASON reason,
-				      struct sk_buff *skb);
 
 #endif
diff -Nru a/include/net/irda/ircomm_param.h b/include/net/irda/ircomm_param.h
--- a/include/net/irda/ircomm_param.h	2005-01-10 20:11:22 -08:00
+++ b/include/net/irda/ircomm_param.h	2005-01-10 20:11:22 -08:00
@@ -141,7 +141,6 @@
 
 struct ircomm_tty_cb; /* Forward decl. */
 
-int ircomm_param_flush(struct ircomm_tty_cb *self);
 int ircomm_param_request(struct ircomm_tty_cb *self, __u8 pi, int flush);
 
 extern pi_param_info_t ircomm_param_info;
diff -Nru a/include/net/irda/ircomm_ttp.h b/include/net/irda/ircomm_ttp.h
--- a/include/net/irda/ircomm_ttp.h	2005-01-10 20:11:21 -08:00
+++ b/include/net/irda/ircomm_ttp.h	2005-01-10 20:11:21 -08:00
@@ -32,39 +32,8 @@
 #define IRCOMM_TTP_H
 
 #include <net/irda/ircomm_core.h>
-#include <net/irda/ircomm_event.h>
 
 int  ircomm_open_tsap(struct ircomm_cb *self);
-int  ircomm_ttp_connect_request(struct ircomm_cb *self, 
-				struct sk_buff *userdata, 
-				struct ircomm_info *info);
-int  ircomm_ttp_connect_response(struct ircomm_cb *self, struct sk_buff *skb);
-int  ircomm_ttp_disconnect_request(struct ircomm_cb *self, 
-				   struct sk_buff *userdata, 
-				   struct ircomm_info *info);
-int  ircomm_ttp_data_request(struct ircomm_cb *self, struct sk_buff *skb, 
-			     int clen);
-int  ircomm_ttp_control_request(struct ircomm_cb *self, 
-			       struct sk_buff *userdata);
-int  ircomm_ttp_data_indication(void *instance, void *sap,
-				struct sk_buff *skb);
-void ircomm_ttp_connect_confirm(void *instance, void *sap,
-				struct qos_info *qos, 
-				__u32 max_sdu_size, 
-				__u8 max_header_size,
-				struct sk_buff *skb);
-void ircomm_ttp_connect_indication(void *instance, void *sap,
-				   struct qos_info *qos,
-				   __u32 max_sdu_size,
-				   __u8 max_header_size,
-				   struct sk_buff *skb);
-void ircomm_ttp_disconnect_indication(void *instance, void *sap, 
-				      LM_REASON reason,
-				      struct sk_buff *skb);
-void ircomm_ttp_flow_indication(void *instance, void *sap, LOCAL_FLOW cmd);
 
 #endif
-
-
-
 
diff -Nru a/include/net/irda/ircomm_tty.h b/include/net/irda/ircomm_tty.h
--- a/include/net/irda/ircomm_tty.h	2005-01-10 20:11:18 -08:00
+++ b/include/net/irda/ircomm_tty.h	2005-01-10 20:11:18 -08:00
@@ -118,10 +118,8 @@
 };
 
 void ircomm_tty_start(struct tty_struct *tty);
-void ircomm_tty_stop(struct tty_struct *tty);
 void ircomm_tty_check_modem_status(struct ircomm_tty_cb *self);
 
-extern void ircomm_tty_change_speed(struct ircomm_tty_cb *self);
 extern int ircomm_tty_tiocmget(struct tty_struct *tty, struct file *file);
 extern int ircomm_tty_tiocmset(struct tty_struct *tty, struct file *file,
 			       unsigned int set, unsigned int clear);
diff -Nru a/include/net/irda/ircomm_tty_attach.h b/include/net/irda/ircomm_tty_attach.h
--- a/include/net/irda/ircomm_tty_attach.h	2005-01-10 20:11:22 -08:00
+++ b/include/net/irda/ircomm_tty_attach.h	2005-01-10 20:11:22 -08:00
@@ -67,7 +67,6 @@
 };
 
 extern char *ircomm_state[];
-extern char *ircomm_event[];
 extern char *ircomm_tty_state[];
 
 int ircomm_tty_do_event(struct ircomm_tty_cb *self, IRCOMM_TTY_EVENT event,
diff -Nru a/include/net/irda/irda_device.h b/include/net/irda/irda_device.h
--- a/include/net/irda/irda_device.h	2005-01-10 20:11:23 -08:00
+++ b/include/net/irda/irda_device.h	2005-01-10 20:11:23 -08:00
@@ -227,8 +227,6 @@
 	return (skb_queue_len(&dev->qdisc->q) == 0);
 }
 int  irda_device_set_raw_mode(struct net_device* self, int status);
-int  irda_device_set_dtr_rts(struct net_device *dev, int dtr, int rts);
-int  irda_device_change_speed(struct net_device *dev, __u32 speed);
 struct net_device *alloc_irdadev(int sizeof_priv);
 
 /* Dongle interface */
diff -Nru a/include/net/irda/iriap.h b/include/net/irda/iriap.h
--- a/include/net/irda/iriap.h	2005-01-10 20:11:17 -08:00
+++ b/include/net/irda/iriap.h	2005-01-10 20:11:17 -08:00
@@ -97,21 +97,11 @@
 int iriap_getvaluebyclass_request(struct iriap_cb *self, 
 				  __u32 saddr, __u32 daddr,
 				  char *name, char *attr);
-void iriap_getvaluebyclass_confirm(struct iriap_cb *self, struct sk_buff *skb);
 void iriap_connect_request(struct iriap_cb *self);
 void iriap_send_ack( struct iriap_cb *self);
 void iriap_call_indication(struct iriap_cb *self, struct sk_buff *skb);
 
 void iriap_register_server(void);
-
-void iriap_watchdog_timer_expired(void *data);
-
-static inline void iriap_start_watchdog_timer(struct iriap_cb *self, 
-					      int timeout) 
-{
-	irda_start_timer(&self->watchdog_timer, timeout, self, 
-			 iriap_watchdog_timer_expired);
-}
 
 #endif
 
diff -Nru a/include/net/irda/irlan_client.h b/include/net/irda/irlan_client.h
--- a/include/net/irda/irlan_client.h	2005-01-10 20:11:21 -08:00
+++ b/include/net/irda/irlan_client.h	2005-01-10 20:11:21 -08:00
@@ -33,11 +33,8 @@
 #include <net/irda/irias_object.h>
 #include <net/irda/irlan_event.h>
 
-void irlan_client_start_kick_timer(struct irlan_cb *self, int timeout);
 void irlan_client_discovery_indication(discinfo_t *, DISCOVERY_MODE, void *);
 void irlan_client_wakeup(struct irlan_cb *self, __u32 saddr, __u32 daddr);
-
-void irlan_client_open_ctrl_tsap( struct irlan_cb *self);
 
 void irlan_client_parse_response(struct irlan_cb *self, struct sk_buff *skb);
 void irlan_client_get_value_confirm(int result, __u16 obj_id, 
diff -Nru a/include/net/irda/irlan_common.h b/include/net/irda/irlan_common.h
--- a/include/net/irda/irlan_common.h	2005-01-10 20:11:21 -08:00
+++ b/include/net/irda/irlan_common.h	2005-01-10 20:11:21 -08:00
@@ -190,7 +190,6 @@
 	struct timer_list watchdog_timer;
 };
 
-struct irlan_cb *irlan_open(__u32 saddr, __u32 daddr);
 void irlan_close(struct irlan_cb *self);
 void irlan_close_tsaps(struct irlan_cb *self);
 
@@ -204,13 +203,11 @@
 
 struct irlan_cb *irlan_get_any(void);
 void irlan_get_provider_info(struct irlan_cb *self);
-void irlan_get_unicast_addr(struct irlan_cb *self);
 void irlan_get_media_char(struct irlan_cb *self);
 void irlan_open_data_channel(struct irlan_cb *self);
 void irlan_close_data_channel(struct irlan_cb *self);
 void irlan_set_multicast_filter(struct irlan_cb *self, int status);
 void irlan_set_broadcast_filter(struct irlan_cb *self, int status);
-void irlan_open_unicast_addr(struct irlan_cb *self);
 
 int irlan_insert_byte_param(struct sk_buff *skb, char *param, __u8 value);
 int irlan_insert_short_param(struct sk_buff *skb, char *param, __u16 value);
diff -Nru a/include/net/irda/irlap.h b/include/net/irda/irlap.h
--- a/include/net/irda/irlap.h	2005-01-10 20:11:24 -08:00
+++ b/include/net/irda/irlap.h	2005-01-10 20:11:24 -08:00
@@ -253,10 +253,8 @@
 int  irlap_generate_rand_time_slot(int S, int s);
 void irlap_initiate_connection_state(struct irlap_cb *);
 void irlap_flush_all_queues(struct irlap_cb *);
-void irlap_change_speed(struct irlap_cb *self, __u32 speed, int now);
 void irlap_wait_min_turn_around(struct irlap_cb *, struct qos_info *);
 
-void irlap_init_qos_capabilities(struct irlap_cb *, struct qos_info *);
 void irlap_apply_default_connection_parameters(struct irlap_cb *self);
 void irlap_apply_connection_parameters(struct irlap_cb *self, int now);
 
diff -Nru a/include/net/irda/irlap_frame.h b/include/net/irda/irlap_frame.h
--- a/include/net/irda/irlap_frame.h	2005-01-10 20:11:19 -08:00
+++ b/include/net/irda/irlap_frame.h	2005-01-10 20:11:19 -08:00
@@ -133,7 +133,6 @@
 void irlap_resend_rejected_frames(struct irlap_cb *, int command);
 void irlap_resend_rejected_frame(struct irlap_cb *self, int command);
 
-void irlap_send_i_frame(struct irlap_cb *, struct sk_buff *, int command);
 void irlap_send_ui_frame(struct irlap_cb *self, struct sk_buff *skb,
 			 __u8 caddr, int command);
 
diff -Nru a/include/net/irda/irlmp.h b/include/net/irda/irlmp.h
--- a/include/net/irda/irlmp.h	2005-01-10 20:11:15 -08:00
+++ b/include/net/irda/irlmp.h	2005-01-10 20:11:15 -08:00
@@ -242,12 +242,9 @@
 void irlmp_connless_data_indication(struct lsap_cb *, struct sk_buff *);
 #endif /* CONFIG_IRDA_ULTRA */
 
-void irlmp_status_request(void);
 void irlmp_status_indication(struct lap_cb *, LINK_STATUS link, LOCK_STATUS lock);
 void irlmp_flow_indication(struct lap_cb *self, LOCAL_FLOW flow);
 
-int  irlmp_slsap_inuse(__u8 slsap);
-__u8 irlmp_find_free_slsap(void);
 LM_REASON irlmp_convert_lap_reason(LAP_REASON);
 
 static inline __u32 irlmp_get_saddr(const struct lsap_cb *self)
diff -Nru a/include/net/irda/irttp.h b/include/net/irda/irttp.h
--- a/include/net/irda/irttp.h	2005-01-10 20:11:17 -08:00
+++ b/include/net/irda/irttp.h	2005-01-10 20:11:17 -08:00
@@ -167,9 +167,6 @@
 int irttp_disconnect_request(struct tsap_cb *self, struct sk_buff *skb,
 			     int priority);
 void irttp_flow_request(struct tsap_cb *self, LOCAL_FLOW flow);
-void irttp_status_indication(void *instance,
-			     LINK_STATUS link, LOCK_STATUS lock);
-void irttp_flow_indication(void *instance, void *sap, LOCAL_FLOW flow);
 struct tsap_cb *irttp_dup(struct tsap_cb *self, void *instance);
 
 static __inline __u32 irttp_get_saddr(struct tsap_cb *self)
diff -Nru a/include/net/irda/parameters.h b/include/net/irda/parameters.h
--- a/include/net/irda/parameters.h	2005-01-10 20:11:15 -08:00
+++ b/include/net/irda/parameters.h	2005-01-10 20:11:15 -08:00
@@ -90,11 +90,9 @@
 } pi_param_info_t;
 
 int irda_param_pack(__u8 *buf, char *fmt, ...);
-int irda_param_unpack(__u8 *buf, char *fmt, ...);
 
 int irda_param_insert(void *self, __u8 pi, __u8 *buf, int len, 
 		      pi_param_info_t *info);
-int irda_param_extract(void *self, __u8 *buf, int len, pi_param_info_t *info);
 int irda_param_extract_all(void *self, __u8 *buf, int len, 
 			   pi_param_info_t *info);
 
diff -Nru a/include/net/irda/qos.h b/include/net/irda/qos.h
--- a/include/net/irda/qos.h	2005-01-10 20:11:16 -08:00
+++ b/include/net/irda/qos.h	2005-01-10 20:11:16 -08:00
@@ -87,7 +87,6 @@
 void irda_qos_compute_intersection(struct qos_info *, struct qos_info *);
 
 __u32 irlap_max_line_capacity(__u32 speed, __u32 max_turn_time);
-__u32 irlap_requested_line_capacity(struct qos_info *qos);
 
 void irda_qos_bits_to_value(struct qos_info *qos);
 
diff -Nru a/include/net/llc_c_ac.h b/include/net/llc_c_ac.h
--- a/include/net/llc_c_ac.h	2005-01-10 20:11:23 -08:00
+++ b/include/net/llc_c_ac.h	2005-01-10 20:11:23 -08:00
@@ -96,7 +96,6 @@
 extern int llc_conn_ac_disc_ind(struct sock* sk, struct sk_buff *skb);
 extern int llc_conn_ac_rst_ind(struct sock* sk, struct sk_buff *skb);
 extern int llc_conn_ac_rst_confirm(struct sock* sk, struct sk_buff *skb);
-extern int llc_conn_ac_report_status(struct sock* sk, struct sk_buff *skb);
 extern int llc_conn_ac_clear_remote_busy_if_f_eq_1(struct sock* sk,
 						   struct sk_buff *skb);
 extern int llc_conn_ac_stop_rej_tmr_if_data_flag_eq_2(struct sock* sk,
@@ -107,8 +106,6 @@
 					   struct sk_buff *skb);
 extern int llc_conn_ac_send_dm_rsp_f_set_1(struct sock* sk,
 					   struct sk_buff *skb);
-extern int llc_conn_ac_send_dm_rsp_f_set_f_flag(struct sock* sk,
-						struct sk_buff *skb);
 extern int llc_conn_ac_send_frmr_rsp_f_set_x(struct sock* sk,
 					     struct sk_buff *skb);
 extern int llc_conn_ac_resend_frmr_rsp_f_set_0(struct sock* sk,
@@ -116,11 +113,6 @@
 extern int llc_conn_ac_resend_frmr_rsp_f_set_p(struct sock* sk,
 					       struct sk_buff *skb);
 extern int llc_conn_ac_send_i_cmd_p_set_1(struct sock* sk, struct sk_buff *skb);
-extern int llc_conn_ac_send_i_cmd_p_set_0(struct sock* sk, struct sk_buff *skb);
-extern int llc_conn_ac_resend_i_cmd_p_set_1(struct sock* sk,
-					    struct sk_buff *skb);
-extern int llc_conn_ac_resend_i_cmd_p_set_1_or_send_rr(struct sock* sk,
-						  struct sk_buff *skb);
 extern int llc_conn_ac_send_i_xxx_x_set_0(struct sock* sk, struct sk_buff *skb);
 extern int llc_conn_ac_resend_i_xxx_x_set_0(struct sock* sk,
 					    struct sk_buff *skb);
@@ -145,8 +137,6 @@
 						struct sk_buff *skb);
 extern int llc_conn_ac_send_rr_cmd_p_set_1(struct sock* sk,
 					   struct sk_buff *skb);
-extern int llc_conn_ac_send_ack_cmd_p_set_1(struct sock* sk,
-					    struct sk_buff *skb);
 extern int llc_conn_ac_send_rr_rsp_f_set_1(struct sock* sk,
 					   struct sk_buff *skb);
 extern int llc_conn_ac_send_ack_rsp_f_set_1(struct sock* sk,
@@ -157,8 +147,6 @@
 					    struct sk_buff *skb);
 extern int llc_conn_ac_send_sabme_cmd_p_set_x(struct sock* sk,
 					      struct sk_buff *skb);
-extern int llc_conn_ac_send_ua_rsp_f_set_f_flag(struct sock* sk,
-						struct sk_buff *skb);
 extern int llc_conn_ac_send_ua_rsp_f_set_p(struct sock* sk,
 					   struct sk_buff *skb);
 extern int llc_conn_ac_set_s_flag_0(struct sock* sk, struct sk_buff *skb);
@@ -183,7 +171,6 @@
 extern int llc_conn_ac_set_data_flag_1_if_data_flag_eq_0(struct sock* sk,
 							 struct sk_buff *skb);
 extern int llc_conn_ac_set_p_flag_0(struct sock* sk, struct sk_buff *skb);
-extern int llc_conn_ac_set_p_flag_1(struct sock* sk, struct sk_buff *skb);
 extern int llc_conn_ac_set_remote_busy_0(struct sock* sk, struct sk_buff *skb);
 extern int llc_conn_ac_set_retry_cnt_0(struct sock* sk, struct sk_buff *skb);
 extern int llc_conn_ac_set_cause_flag_0(struct sock* sk, struct sk_buff *skb);
@@ -195,20 +182,14 @@
 extern int llc_conn_ac_set_vs_nr(struct sock* sk, struct sk_buff *skb);
 extern int llc_conn_ac_rst_vs(struct sock* sk, struct sk_buff *skb);
 extern int llc_conn_ac_upd_vs(struct sock* sk, struct sk_buff *skb);
-extern int llc_conn_ac_set_f_flag_p(struct sock* sk, struct sk_buff *skb);
 extern int llc_conn_disc(struct sock* sk, struct sk_buff *skb);
 extern int llc_conn_reset(struct sock* sk, struct sk_buff *skb);
 extern int llc_conn_ac_disc_confirm(struct sock* sk, struct sk_buff *skb);
 extern u8 llc_circular_between(u8 a, u8 b, u8 c);
 extern int llc_conn_ac_send_ack_if_needed(struct sock* sk, struct sk_buff *skb);
-extern int llc_conn_ac_inc_npta_value(struct sock* sk, struct sk_buff *skb);
 extern int llc_conn_ac_adjust_npta_by_rr(struct sock* sk, struct sk_buff *skb);
 extern int llc_conn_ac_adjust_npta_by_rnr(struct sock* sk, struct sk_buff *skb);
 extern int llc_conn_ac_rst_sendack_flag(struct sock* sk, struct sk_buff *skb);
-extern int llc_conn_ac_send_rr_rsp_f_set_ackpf(struct sock* sk,
-					       struct sk_buff *skb);
-extern int llc_conn_ac_send_i_rsp_f_set_ackpf(struct sock* sk,
-					      struct sk_buff *skb);
 extern int llc_conn_ac_send_i_rsp_as_ack(struct sock* sk, struct sk_buff *skb);
 extern int llc_conn_ac_send_i_as_ack(struct sock* sk, struct sk_buff *skb);
 
diff -Nru a/include/net/llc_c_ev.h b/include/net/llc_c_ev.h
--- a/include/net/llc_c_ev.h	2005-01-10 20:11:16 -08:00
+++ b/include/net/llc_c_ev.h	2005-01-10 20:11:16 -08:00
@@ -129,11 +129,9 @@
 typedef int (*llc_conn_ev_qfyr_t)(struct sock *sk, struct sk_buff *skb);
 
 extern int llc_conn_ev_conn_req(struct sock *sk, struct sk_buff *skb);
-extern int llc_conn_ev_conn_resp(struct sock *sk, struct sk_buff *skb);
 extern int llc_conn_ev_data_req(struct sock *sk, struct sk_buff *skb);
 extern int llc_conn_ev_disc_req(struct sock *sk, struct sk_buff *skb);
 extern int llc_conn_ev_rst_req(struct sock *sk, struct sk_buff *skb);
-extern int llc_conn_ev_rst_resp(struct sock *sk, struct sk_buff *skb);
 extern int llc_conn_ev_local_busy_detected(struct sock *sk,
 					   struct sk_buff *skb);
 extern int llc_conn_ev_local_busy_cleared(struct sock *sk, struct sk_buff *skb);
@@ -162,7 +160,6 @@
 					     struct sk_buff *skb);
 extern int llc_conn_ev_rx_xxx_rsp_fbit_set_x(struct sock *sk,
 					     struct sk_buff *skb);
-extern int llc_conn_ev_rx_xxx_yyy(struct sock *sk, struct sk_buff *skb);
 extern int llc_conn_ev_rx_zzz_cmd_pbit_set_x_inval_nr(struct sock *sk,
 						      struct sk_buff *skb);
 extern int llc_conn_ev_rx_zzz_rsp_fbit_set_x_inval_nr(struct sock *sk,
@@ -171,13 +168,10 @@
 extern int llc_conn_ev_ack_tmr_exp(struct sock *sk, struct sk_buff *skb);
 extern int llc_conn_ev_rej_tmr_exp(struct sock *sk, struct sk_buff *skb);
 extern int llc_conn_ev_busy_tmr_exp(struct sock *sk, struct sk_buff *skb);
-extern int llc_conn_ev_any_tmr_exp(struct sock *sk, struct sk_buff *skb);
 extern int llc_conn_ev_sendack_tmr_exp(struct sock *sk, struct sk_buff *skb);
 /* NOT_USED functions and their variations */
 extern int llc_conn_ev_rx_xxx_cmd_pbit_set_1(struct sock *sk,
 					     struct sk_buff *skb);
-extern int llc_conn_ev_rx_xxx_cmd_pbit_set_0(struct sock *sk,
-					     struct sk_buff *skb);
 extern int llc_conn_ev_rx_xxx_rsp_fbit_set_1(struct sock *sk,
 					     struct sk_buff *skb);
 extern int llc_conn_ev_rx_i_cmd_pbit_set_0_unexpd_ns(struct sock *sk,
@@ -252,20 +246,14 @@
 					    struct sk_buff *skb);
 extern int llc_conn_ev_qlfy_cause_flag_eq_0(struct sock *sk,
 					    struct sk_buff *skb);
-extern int llc_conn_ev_qlfy_init_p_f_cycle(struct sock *sk,
-					   struct sk_buff *skb);
 extern int llc_conn_ev_qlfy_set_status_conn(struct sock *sk,
 					    struct sk_buff *skb);
 extern int llc_conn_ev_qlfy_set_status_disc(struct sock *sk,
 					    struct sk_buff *skb);
 extern int llc_conn_ev_qlfy_set_status_failed(struct sock *sk,
 					      struct sk_buff *skb);
-extern int llc_conn_ev_qlfy_set_status_impossible(struct sock *sk,
-						  struct sk_buff *skb);
 extern int llc_conn_ev_qlfy_set_status_remote_busy(struct sock *sk,
 						  struct sk_buff *skb);
-extern int llc_conn_ev_qlfy_set_status_received(struct sock *sk,
-						struct sk_buff *skb);
 extern int llc_conn_ev_qlfy_set_status_refuse(struct sock *sk,
 					      struct sk_buff *skb);
 extern int llc_conn_ev_qlfy_set_status_conflict(struct sock *sk,
diff -Nru a/include/net/llc_conn.h b/include/net/llc_conn.h
--- a/include/net/llc_conn.h	2005-01-10 20:11:22 -08:00
+++ b/include/net/llc_conn.h	2005-01-10 20:11:22 -08:00
@@ -91,7 +91,6 @@
 extern void llc_sk_free(struct sock *sk);
 
 extern void llc_sk_reset(struct sock *sk);
-extern int llc_sk_init(struct sock *sk);
 
 /* Access to a connection */
 extern int llc_conn_state_process(struct sock *sk, struct sk_buff *skb);
@@ -106,8 +105,6 @@
 extern struct sock *llc_lookup_established(struct llc_sap *sap,
 					   struct llc_addr *daddr,
 					   struct llc_addr *laddr);
-extern struct sock *llc_lookup_listener(struct llc_sap *sap,
-					struct llc_addr *laddr);
 extern void llc_sap_add_socket(struct llc_sap *sap, struct sock *sk);
 extern void llc_sap_remove_socket(struct llc_sap *sap, struct sock *sk);
 
diff -Nru a/include/net/llc_pdu.h b/include/net/llc_pdu.h
--- a/include/net/llc_pdu.h	2005-01-10 20:11:21 -08:00
+++ b/include/net/llc_pdu.h	2005-01-10 20:11:21 -08:00
@@ -419,7 +419,6 @@
 extern void llc_pdu_set_cmd_rsp(struct sk_buff *skb, u8 type);
 extern void llc_pdu_set_pf_bit(struct sk_buff *skb, u8 bit_value);
 extern void llc_pdu_decode_pf_bit(struct sk_buff *skb, u8 *pf_bit);
-extern void llc_pdu_decode_cr_bit(struct sk_buff *skb, u8 *cr_bit);
 extern void llc_pdu_init_as_disc_cmd(struct sk_buff *skb, u8 p_bit);
 extern void llc_pdu_init_as_i_cmd(struct sk_buff *skb, u8 p_bit, u8 ns, u8 nr);
 extern void llc_pdu_init_as_rej_cmd(struct sk_buff *skb, u8 p_bit, u8 nr);
diff -Nru a/include/net/llc_sap.h b/include/net/llc_sap.h
--- a/include/net/llc_sap.h	2005-01-10 20:11:15 -08:00
+++ b/include/net/llc_sap.h	2005-01-10 20:11:15 -08:00
@@ -14,7 +14,6 @@
 struct llc_sap;
 struct sk_buff;
 
-extern void llc_sap_state_process(struct llc_sap *sap, struct sk_buff *skb);
 extern void llc_sap_rtn_pdu(struct llc_sap *sap, struct sk_buff *skb);
 extern void llc_save_primitive(struct sk_buff* skb, unsigned char prim);
 extern struct sk_buff *llc_alloc_frame(void);
diff -Nru a/include/net/pkt_cls.h b/include/net/pkt_cls.h
--- a/include/net/pkt_cls.h	2005-01-10 20:11:21 -08:00
+++ b/include/net/pkt_cls.h	2005-01-10 20:11:21 -08:00
@@ -70,17 +70,10 @@
 	int ret;
 	struct tc_action *act;
 
-	act = kmalloc(sizeof(*act), GFP_KERNEL);
-	if (NULL == act)
-		return -ENOMEM;
-	memset(act, 0, sizeof(*act));
-	
-	ret = tcf_action_init_1(act_police_tlv, rate_tlv, act, "police",
-		TCA_ACT_NOREPLACE, TCA_ACT_BIND);
-	if (ret < 0) {
-		tcf_action_destroy(act, TCA_ACT_UNBIND);
+	act = tcf_action_init_1(act_police_tlv, rate_tlv, "police",
+	                        TCA_ACT_NOREPLACE, TCA_ACT_BIND, &ret);
+	if (act == NULL)
 		return ret;
-	}
 
 	act->type = TCA_OLD_COMPAT;
 
@@ -103,17 +96,10 @@
 	int ret;
 	struct tc_action *act;
 
-	act = kmalloc(sizeof(*act), GFP_KERNEL);
-	if (NULL == act)
-		return -ENOMEM;
-	memset(act, 0, sizeof(*act));
-
-	ret = tcf_action_init(act_tlv, rate_tlv, act, NULL,
-		TCA_ACT_NOREPLACE, TCA_ACT_BIND);
-	if (ret < 0) {
-		tcf_action_destroy(act, TCA_ACT_UNBIND);
+	act = tcf_action_init(act_tlv, rate_tlv, NULL,
+	                      TCA_ACT_NOREPLACE, TCA_ACT_BIND, &ret);
+	if (act == NULL)
 		return ret;
-	}
 
 	if (*action) {
 		tcf_tree_lock(tp);
diff -Nru a/include/net/rose.h b/include/net/rose.h
--- a/include/net/rose.h	2005-01-10 20:11:16 -08:00
+++ b/include/net/rose.h	2005-01-10 20:11:16 -08:00
@@ -162,7 +162,6 @@
 extern void rose_destroy_socket(struct sock *);
 
 /* rose_dev.c */
-extern int  rose_rx_ip(struct sk_buff *, struct net_device *);
 extern void  rose_setup(struct net_device *);
 
 /* rose_in.c */
@@ -170,15 +169,10 @@
 
 /* rose_link.c */
 extern void rose_start_ftimer(struct rose_neigh *);
-extern void rose_start_t0timer(struct rose_neigh *);
 extern void rose_stop_ftimer(struct rose_neigh *);
 extern void rose_stop_t0timer(struct rose_neigh *);
 extern int  rose_ftimer_running(struct rose_neigh *);
-extern int  rose_t0timer_running(struct rose_neigh *);
 extern void rose_link_rx_restart(struct sk_buff *, struct rose_neigh *, unsigned short);
-extern void rose_transmit_restart_request(struct rose_neigh *);
-extern void rose_transmit_restart_confirmation(struct rose_neigh *);
-extern void rose_transmit_diagnostic(struct rose_neigh *, unsigned char);
 extern void rose_transmit_clear_request(struct rose_neigh *, unsigned int, unsigned char, unsigned char);
 extern void rose_transmit_link(struct sk_buff *, struct rose_neigh *);
 
@@ -205,7 +199,6 @@
 extern struct net_device *rose_dev_first(void);
 extern struct net_device *rose_dev_get(rose_address *);
 extern struct rose_route *rose_route_free_lci(unsigned int, struct rose_neigh *);
-extern struct net_device *rose_ax25_dev_get(char *);
 extern struct rose_neigh *rose_get_neigh(rose_address *, unsigned char *, unsigned char *);
 extern int  rose_rt_ioctl(unsigned int, void __user *);
 extern void rose_link_failed(ax25_cb *, int);
@@ -220,7 +213,6 @@
 extern void rose_write_internal(struct sock *, int);
 extern int  rose_decode(struct sk_buff *, int *, int *, int *, int *, int *);
 extern int  rose_parse_facilities(unsigned char *, struct rose_facilities_struct *);
-extern int  rose_create_facilities(unsigned char *, rose_cb *);
 extern void rose_disconnect(struct sock *, int, int, int);
 
 /* rose_timer.c */
diff -Nru a/include/net/route.h b/include/net/route.h
--- a/include/net/route.h	2005-01-10 20:11:15 -08:00
+++ b/include/net/route.h	2005-01-10 20:11:15 -08:00
@@ -105,7 +105,7 @@
 
 extern struct rt_cache_stat *rt_cache_stat;
 #define RT_CACHE_STAT_INC(field)					  \
-		(per_cpu_ptr(rt_cache_stat, smp_processor_id())->field++)
+		(per_cpu_ptr(rt_cache_stat, _smp_processor_id())->field++)
 
 extern struct ip_rt_acct *ip_rt_acct;
 
diff -Nru a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
--- a/include/net/sctp/sctp.h	2005-01-10 20:11:17 -08:00
+++ b/include/net/sctp/sctp.h	2005-01-10 20:11:17 -08:00
@@ -584,26 +584,20 @@
 
 /* WARNING: Do not change the layout of the members in sctp_sock! */
 struct sctp_sock {
-	struct sock	  sk;
-#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
-	struct ipv6_pinfo *pinet6;
-#endif /* CONFIG_IPV6 */
-	struct inet_opt	  inet;
+	struct inet_sock  inet;
 	struct sctp_opt	  sctp;
 };
 
 #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
 struct sctp6_sock {
-	struct sock	  sk;
-	struct ipv6_pinfo *pinet6;
-	struct inet_opt	  inet;
+	struct inet_sock  inet;
 	struct sctp_opt	  sctp;
 	struct ipv6_pinfo inet6;
 };
 #endif /* CONFIG_IPV6 */
 
 #define sctp_sk(__sk) (&((struct sctp_sock *)__sk)->sctp)
-#define sctp_opt2sk(__sp) &container_of(__sp, struct sctp_sock, sctp)->sk
+#define sctp_opt2sk(__sp) &container_of(__sp, struct sctp_sock, sctp)->inet.sk
 
 /* Is a socket of this style? */
 #define sctp_style(sk, style) __sctp_style((sk), (SCTP_SOCKET_##style))
diff -Nru a/include/net/snmp.h b/include/net/snmp.h
--- a/include/net/snmp.h	2005-01-10 20:11:18 -08:00
+++ b/include/net/snmp.h	2005-01-10 20:11:18 -08:00
@@ -128,18 +128,18 @@
 #define SNMP_STAT_USRPTR(name)	(name[1])
 
 #define SNMP_INC_STATS_BH(mib, field) 	\
-	(per_cpu_ptr(mib[0], smp_processor_id())->mibs[field]++)
+	(per_cpu_ptr(mib[0], _smp_processor_id())->mibs[field]++)
 #define SNMP_INC_STATS_OFFSET_BH(mib, field, offset)	\
-	(per_cpu_ptr(mib[0], smp_processor_id())->mibs[field + (offset)]++)
+	(per_cpu_ptr(mib[0], _smp_processor_id())->mibs[field + (offset)]++)
 #define SNMP_INC_STATS_USER(mib, field) \
-	(per_cpu_ptr(mib[1], smp_processor_id())->mibs[field]++)
+	(per_cpu_ptr(mib[1], _smp_processor_id())->mibs[field]++)
 #define SNMP_INC_STATS(mib, field) 	\
-	(per_cpu_ptr(mib[!in_softirq()], smp_processor_id())->mibs[field]++)
+	(per_cpu_ptr(mib[!in_softirq()], _smp_processor_id())->mibs[field]++)
 #define SNMP_DEC_STATS(mib, field) 	\
-	(per_cpu_ptr(mib[!in_softirq()], smp_processor_id())->mibs[field]--)
+	(per_cpu_ptr(mib[!in_softirq()], _smp_processor_id())->mibs[field]--)
 #define SNMP_ADD_STATS_BH(mib, field, addend) 	\
-	(per_cpu_ptr(mib[0], smp_processor_id())->mibs[field] += addend)
+	(per_cpu_ptr(mib[0], _smp_processor_id())->mibs[field] += addend)
 #define SNMP_ADD_STATS_USER(mib, field, addend) 	\
-	(per_cpu_ptr(mib[1], smp_processor_id())->mibs[field] += addend)
+	(per_cpu_ptr(mib[1], _smp_processor_id())->mibs[field] += addend)
 
 #endif
diff -Nru a/include/net/tcp.h b/include/net/tcp.h
--- a/include/net/tcp.h	2005-01-10 20:11:16 -08:00
+++ b/include/net/tcp.h	2005-01-10 20:11:16 -08:00
@@ -196,7 +196,7 @@
 	unsigned char		tw_rcv_wscale;
 	__u16			tw_sport;
 	/* Socket demultiplex comparisons on incoming packets. */
-	/* these five are in inet_opt */
+	/* these five are in inet_sock */
 	__u32			tw_daddr
 		__attribute__((aligned(TCP_ADDRCMP_ALIGN_BYTES)));
 	__u32			tw_rcv_saddr;
@@ -315,7 +315,6 @@
 extern atomic_t tcp_orphan_count;
 extern int tcp_tw_count;
 extern void tcp_time_wait(struct sock *sk, int state, int timeo);
-extern void tcp_tw_schedule(struct tcp_tw_bucket *tw, int timeo);
 extern void tcp_tw_deschedule(struct tcp_tw_bucket *tw);
 
 
@@ -808,17 +807,17 @@
 	TCP_ACK_PUSHED= 4
 };
 
-static inline void tcp_schedule_ack(struct tcp_opt *tp)
+static inline void tcp_schedule_ack(struct tcp_sock *tp)
 {
 	tp->ack.pending |= TCP_ACK_SCHED;
 }
 
-static inline int tcp_ack_scheduled(struct tcp_opt *tp)
+static inline int tcp_ack_scheduled(struct tcp_sock *tp)
 {
 	return tp->ack.pending&TCP_ACK_SCHED;
 }
 
-static __inline__ void tcp_dec_quickack_mode(struct tcp_opt *tp)
+static __inline__ void tcp_dec_quickack_mode(struct tcp_sock *tp)
 {
 	if (tp->ack.quick && --tp->ack.quick == 0) {
 		/* Leaving quickack mode we deflate ATO. */
@@ -826,14 +825,14 @@
 	}
 }
 
-extern void tcp_enter_quickack_mode(struct tcp_opt *tp);
+extern void tcp_enter_quickack_mode(struct tcp_sock *tp);
 
-static __inline__ void tcp_delack_init(struct tcp_opt *tp)
+static __inline__ void tcp_delack_init(struct tcp_sock *tp)
 {
 	memset(&tp->ack, 0, sizeof(tp->ack));
 }
 
-static inline void tcp_clear_options(struct tcp_opt *tp)
+static inline void tcp_clear_options(struct tcp_sock *tp)
 {
  	tp->tstamp_ok = tp->sack_ok = tp->wscale_ok = tp->snd_wscale = 0;
 }
@@ -860,7 +859,7 @@
 						  struct sk_buff *skb);
 extern void			tcp_enter_frto(struct sock *sk);
 extern void			tcp_enter_loss(struct sock *sk, int how);
-extern void			tcp_clear_retrans(struct tcp_opt *tp);
+extern void			tcp_clear_retrans(struct tcp_sock *tp);
 extern void			tcp_update_metrics(struct sock *sk);
 
 extern void			tcp_close(struct sock *sk, 
@@ -884,7 +883,7 @@
 extern int			tcp_listen_start(struct sock *sk);
 
 extern void			tcp_parse_options(struct sk_buff *skb,
-						  struct tcp_opt *tp,
+						  struct tcp_sock *tp,
 						  int estab);
 
 /*
@@ -980,7 +979,7 @@
 
 static inline void tcp_clear_xmit_timer(struct sock *sk, int what)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	
 	switch (what) {
 	case TCP_TIME_RETRANS:
@@ -1013,7 +1012,7 @@
  */
 static inline void tcp_reset_xmit_timer(struct sock *sk, int what, unsigned long when)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 
 	if (when > TCP_RTO_MAX) {
 #ifdef TCP_DEBUG
@@ -1053,7 +1052,7 @@
 
 static inline void tcp_initialize_rcv_mss(struct sock *sk)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	unsigned int hint = min(tp->advmss, tp->mss_cache_std);
 
 	hint = min(hint, tp->rcv_wnd/2);
@@ -1063,19 +1062,19 @@
 	tp->ack.rcv_mss = hint;
 }
 
-static __inline__ void __tcp_fast_path_on(struct tcp_opt *tp, u32 snd_wnd)
+static __inline__ void __tcp_fast_path_on(struct tcp_sock *tp, u32 snd_wnd)
 {
 	tp->pred_flags = htonl((tp->tcp_header_len << 26) |
 			       ntohl(TCP_FLAG_ACK) |
 			       snd_wnd);
 }
 
-static __inline__ void tcp_fast_path_on(struct tcp_opt *tp)
+static __inline__ void tcp_fast_path_on(struct tcp_sock *tp)
 {
 	__tcp_fast_path_on(tp, tp->snd_wnd>>tp->snd_wscale);
 }
 
-static inline void tcp_fast_path_check(struct sock *sk, struct tcp_opt *tp)
+static inline void tcp_fast_path_check(struct sock *sk, struct tcp_sock *tp)
 {
 	if (skb_queue_len(&tp->out_of_order_queue) == 0 &&
 	    tp->rcv_wnd &&
@@ -1088,7 +1087,7 @@
  * Rcv_nxt can be after the window if our peer push more data
  * than the offered window.
  */
-static __inline__ u32 tcp_receive_window(const struct tcp_opt *tp)
+static __inline__ u32 tcp_receive_window(const struct tcp_sock *tp)
 {
 	s32 win = tp->rcv_wup + tp->rcv_wnd - tp->rcv_nxt;
 
@@ -1220,7 +1219,7 @@
 }
 
 static inline void tcp_packets_out_inc(struct sock *sk, 
-				       struct tcp_opt *tp,
+				       struct tcp_sock *tp,
 				       const struct sk_buff *skb)
 {
 	int orig = tcp_get_pcount(&tp->packets_out);
@@ -1230,7 +1229,7 @@
 		tcp_reset_xmit_timer(sk, TCP_TIME_RETRANS, tp->rto);
 }
 
-static inline void tcp_packets_out_dec(struct tcp_opt *tp, 
+static inline void tcp_packets_out_dec(struct tcp_sock *tp, 
 				       const struct sk_buff *skb)
 {
 	tcp_dec_pcount(&tp->packets_out, skb);
@@ -1250,7 +1249,7 @@
  *	"Packets left network, but not honestly ACKed yet" PLUS
  *	"Packets fast retransmitted"
  */
-static __inline__ unsigned int tcp_packets_in_flight(const struct tcp_opt *tp)
+static __inline__ unsigned int tcp_packets_in_flight(const struct tcp_sock *tp)
 {
 	return (tcp_get_pcount(&tp->packets_out) -
 		tcp_get_pcount(&tp->left_out) +
@@ -1274,7 +1273,7 @@
  *	behave like Reno until low_window is reached,
  *	then increase congestion window slowly
  */
-static inline __u32 tcp_recalc_ssthresh(struct tcp_opt *tp)
+static inline __u32 tcp_recalc_ssthresh(struct tcp_sock *tp)
 {
 	if (tcp_is_bic(tp)) {
 		if (sysctl_tcp_bic_fast_convergence &&
@@ -1296,7 +1295,7 @@
 /* Stop taking Vegas samples for now. */
 #define tcp_vegas_disable(__tp)	((__tp)->vegas.doing_vegas_now = 0)
     
-static inline void tcp_vegas_enable(struct tcp_opt *tp)
+static inline void tcp_vegas_enable(struct tcp_sock *tp)
 {
 	/* There are several situations when we must "re-start" Vegas:
 	 *
@@ -1328,9 +1327,9 @@
 /* Should we be taking Vegas samples right now? */
 #define tcp_vegas_enabled(__tp)	((__tp)->vegas.doing_vegas_now)
 
-extern void tcp_ca_init(struct tcp_opt *tp);
+extern void tcp_ca_init(struct tcp_sock *tp);
 
-static inline void tcp_set_ca_state(struct tcp_opt *tp, u8 ca_state)
+static inline void tcp_set_ca_state(struct tcp_sock *tp, u8 ca_state)
 {
 	if (tcp_is_vegas(tp)) {
 		if (ca_state == TCP_CA_Open) 
@@ -1345,7 +1344,7 @@
  * The exception is rate halving phase, when cwnd is decreasing towards
  * ssthresh.
  */
-static inline __u32 tcp_current_ssthresh(struct tcp_opt *tp)
+static inline __u32 tcp_current_ssthresh(struct tcp_sock *tp)
 {
 	if ((1<<tp->ca_state)&(TCPF_CA_CWR|TCPF_CA_Recovery))
 		return tp->snd_ssthresh;
@@ -1355,7 +1354,7 @@
 			    (tp->snd_cwnd >> 2)));
 }
 
-static inline void tcp_sync_left_out(struct tcp_opt *tp)
+static inline void tcp_sync_left_out(struct tcp_sock *tp)
 {
 	if (tp->sack_ok &&
 	    (tcp_get_pcount(&tp->sacked_out) >=
@@ -1372,7 +1371,7 @@
 
 /* Congestion window validation. (RFC2861) */
 
-static inline void tcp_cwnd_validate(struct sock *sk, struct tcp_opt *tp)
+static inline void tcp_cwnd_validate(struct sock *sk, struct tcp_sock *tp)
 {
 	__u32 packets_out = tcp_get_pcount(&tp->packets_out);
 
@@ -1391,7 +1390,7 @@
 }
 
 /* Set slow start threshould and cwnd not falling to slow start */
-static inline void __tcp_enter_cwr(struct tcp_opt *tp)
+static inline void __tcp_enter_cwr(struct tcp_sock *tp)
 {
 	tp->undo_marker = 0;
 	tp->snd_ssthresh = tcp_recalc_ssthresh(tp);
@@ -1403,7 +1402,7 @@
 	TCP_ECN_queue_cwr(tp);
 }
 
-static inline void tcp_enter_cwr(struct tcp_opt *tp)
+static inline void tcp_enter_cwr(struct tcp_sock *tp)
 {
 	tp->prior_ssthresh = 0;
 	if (tp->ca_state < TCP_CA_CWR) {
@@ -1412,23 +1411,23 @@
 	}
 }
 
-extern __u32 tcp_init_cwnd(struct tcp_opt *tp, struct dst_entry *dst);
+extern __u32 tcp_init_cwnd(struct tcp_sock *tp, struct dst_entry *dst);
 
 /* Slow start with delack produces 3 packets of burst, so that
  * it is safe "de facto".
  */
-static __inline__ __u32 tcp_max_burst(const struct tcp_opt *tp)
+static __inline__ __u32 tcp_max_burst(const struct tcp_sock *tp)
 {
 	return 3;
 }
 
-static __inline__ int tcp_minshall_check(const struct tcp_opt *tp)
+static __inline__ int tcp_minshall_check(const struct tcp_sock *tp)
 {
 	return after(tp->snd_sml,tp->snd_una) &&
 		!after(tp->snd_sml, tp->snd_nxt);
 }
 
-static __inline__ void tcp_minshall_update(struct tcp_opt *tp, int mss, 
+static __inline__ void tcp_minshall_update(struct tcp_sock *tp, int mss, 
 					   const struct sk_buff *skb)
 {
 	if (skb->len < mss)
@@ -1444,7 +1443,7 @@
  */
 
 static __inline__ int
-tcp_nagle_check(const struct tcp_opt *tp, const struct sk_buff *skb, 
+tcp_nagle_check(const struct tcp_sock *tp, const struct sk_buff *skb, 
 		unsigned mss_now, int nonagle)
 {
 	return (skb->len < mss_now &&
@@ -1460,7 +1459,7 @@
 /* This checks if the data bearing packet SKB (usually sk->sk_send_head)
  * should be put on the wire right now.
  */
-static __inline__ int tcp_snd_test(const struct tcp_opt *tp, 
+static __inline__ int tcp_snd_test(const struct tcp_sock *tp, 
 				   struct sk_buff *skb,
 				   unsigned cur_mss, int nonagle)
 {
@@ -1502,7 +1501,7 @@
 		!after(TCP_SKB_CB(skb)->end_seq, tp->snd_una + tp->snd_wnd));
 }
 
-static __inline__ void tcp_check_probe_timer(struct sock *sk, struct tcp_opt *tp)
+static __inline__ void tcp_check_probe_timer(struct sock *sk, struct tcp_sock *tp)
 {
 	if (!tcp_get_pcount(&tp->packets_out) && !tp->pending)
 		tcp_reset_xmit_timer(sk, TCP_TIME_PROBE0, tp->rto);
@@ -1519,7 +1518,7 @@
  * The socket must be locked by the caller.
  */
 static __inline__ void __tcp_push_pending_frames(struct sock *sk,
-						 struct tcp_opt *tp,
+						 struct tcp_sock *tp,
 						 unsigned cur_mss,
 						 int nonagle)
 {
@@ -1536,12 +1535,12 @@
 }
 
 static __inline__ void tcp_push_pending_frames(struct sock *sk,
-					       struct tcp_opt *tp)
+					       struct tcp_sock *tp)
 {
 	__tcp_push_pending_frames(sk, tp, tcp_current_mss(sk, 1), tp->nonagle);
 }
 
-static __inline__ int tcp_may_send_now(struct sock *sk, struct tcp_opt *tp)
+static __inline__ int tcp_may_send_now(struct sock *sk, struct tcp_sock *tp)
 {
 	struct sk_buff *skb = sk->sk_send_head;
 
@@ -1550,12 +1549,12 @@
 			     tcp_skb_is_last(sk, skb) ? TCP_NAGLE_PUSH : tp->nonagle));
 }
 
-static __inline__ void tcp_init_wl(struct tcp_opt *tp, u32 ack, u32 seq)
+static __inline__ void tcp_init_wl(struct tcp_sock *tp, u32 ack, u32 seq)
 {
 	tp->snd_wl1 = seq;
 }
 
-static __inline__ void tcp_update_wl(struct tcp_opt *tp, u32 ack, u32 seq)
+static __inline__ void tcp_update_wl(struct tcp_sock *tp, u32 ack, u32 seq)
 {
 	tp->snd_wl1 = seq;
 }
@@ -1586,7 +1585,7 @@
 
 /* Prequeue for VJ style copy to user, combined with checksumming. */
 
-static __inline__ void tcp_prequeue_init(struct tcp_opt *tp)
+static __inline__ void tcp_prequeue_init(struct tcp_sock *tp)
 {
 	tp->ucopy.task = NULL;
 	tp->ucopy.len = 0;
@@ -1604,7 +1603,7 @@
  */
 static __inline__ int tcp_prequeue(struct sock *sk, struct sk_buff *skb)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 
 	if (!sysctl_tcp_low_latency && tp->ucopy.task) {
 		__skb_queue_tail(&tp->ucopy.prequeue, skb);
@@ -1688,14 +1687,14 @@
 		tcp_destroy_sock(sk);
 }
 
-static __inline__ void tcp_sack_reset(struct tcp_opt *tp)
+static __inline__ void tcp_sack_reset(struct tcp_sock *tp)
 {
 	tp->dsack = 0;
 	tp->eff_sacks = 0;
 	tp->num_sacks = 0;
 }
 
-static __inline__ void tcp_build_and_update_options(__u32 *ptr, struct tcp_opt *tp, __u32 tstamp)
+static __inline__ void tcp_build_and_update_options(__u32 *ptr, struct tcp_sock *tp, __u32 tstamp)
 {
 	if (tp->tstamp_ok) {
 		*ptr++ = __constant_htonl((TCPOPT_NOP << 24) |
@@ -1790,7 +1789,7 @@
 static inline void tcp_acceptq_queue(struct sock *sk, struct open_request *req,
 					 struct sock *child)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 
 	req->sk = child;
 	sk_acceptq_added(sk);
@@ -1849,7 +1848,7 @@
 	return tcp_synq_len(sk) >> tcp_sk(sk)->listen_opt->max_qlen_log;
 }
 
-static inline void tcp_synq_unlink(struct tcp_opt *tp, struct open_request *req,
+static inline void tcp_synq_unlink(struct tcp_sock *tp, struct open_request *req,
 				       struct open_request **prev)
 {
 	write_lock(&tp->syn_wait_lock);
@@ -1866,7 +1865,7 @@
 }
 
 static __inline__ void tcp_openreq_init(struct open_request *req,
-					struct tcp_opt *tp,
+					struct tcp_sock *tp,
 					struct sk_buff *skb)
 {
 	req->rcv_wnd = 0;		/* So that tcp_send_synack() knows! */
@@ -1905,17 +1904,17 @@
 		wake_up(&tcp_lhash_wait);
 }
 
-static inline int keepalive_intvl_when(const struct tcp_opt *tp)
+static inline int keepalive_intvl_when(const struct tcp_sock *tp)
 {
 	return tp->keepalive_intvl ? : sysctl_tcp_keepalive_intvl;
 }
 
-static inline int keepalive_time_when(const struct tcp_opt *tp)
+static inline int keepalive_time_when(const struct tcp_sock *tp)
 {
 	return tp->keepalive_time ? : sysctl_tcp_keepalive_time;
 }
 
-static inline int tcp_fin_time(const struct tcp_opt *tp)
+static inline int tcp_fin_time(const struct tcp_sock *tp)
 {
 	int fin_timeout = tp->linger2 ? : sysctl_tcp_fin_timeout;
 
@@ -1925,7 +1924,7 @@
 	return fin_timeout;
 }
 
-static inline int tcp_paws_check(const struct tcp_opt *tp, int rst)
+static inline int tcp_paws_check(const struct tcp_sock *tp, int rst)
 {
 	if ((s32)(tp->rcv_tsval - tp->ts_recent) >= 0)
 		return 0;
@@ -1962,7 +1961,7 @@
 
 static inline int tcp_use_frto(const struct sock *sk)
 {
-	const struct tcp_opt *tp = tcp_sk(sk);
+	const struct tcp_sock *tp = tcp_sk(sk);
 	
 	/* F-RTO must be activated in sysctl and there must be some
 	 * unsent new data, and the advertised window should allow
@@ -2014,40 +2013,25 @@
 #define TCP_WESTWOOD_INIT_RTT  (20*HZ)           /* maybe too conservative?! */
 #define TCP_WESTWOOD_RTT_MIN   (HZ/20)           /* 50ms */
 
-static inline void tcp_westwood_update_rtt(struct tcp_opt *tp, __u32 rtt_seq)
+static inline void tcp_westwood_update_rtt(struct tcp_sock *tp, __u32 rtt_seq)
 {
         if (tcp_is_westwood(tp))
                 tp->westwood.rtt = rtt_seq;
 }
 
-void __tcp_westwood_fast_bw(struct sock *, struct sk_buff *);
-void __tcp_westwood_slow_bw(struct sock *, struct sk_buff *);
-
-static inline void tcp_westwood_fast_bw(struct sock *sk, struct sk_buff *skb)
-{
-        if (tcp_is_westwood(tcp_sk(sk)))
-                __tcp_westwood_fast_bw(sk, skb);
-}
-
-static inline void tcp_westwood_slow_bw(struct sock *sk, struct sk_buff *skb)
-{
-        if (tcp_is_westwood(tcp_sk(sk)))
-                __tcp_westwood_slow_bw(sk, skb);
-}
-
-static inline __u32 __tcp_westwood_bw_rttmin(const struct tcp_opt *tp)
+static inline __u32 __tcp_westwood_bw_rttmin(const struct tcp_sock *tp)
 {
         return max((tp->westwood.bw_est) * (tp->westwood.rtt_min) /
 		   (__u32) (tp->mss_cache_std),
 		   2U);
 }
 
-static inline __u32 tcp_westwood_bw_rttmin(const struct tcp_opt *tp)
+static inline __u32 tcp_westwood_bw_rttmin(const struct tcp_sock *tp)
 {
 	return tcp_is_westwood(tp) ? __tcp_westwood_bw_rttmin(tp) : 0;
 }
 
-static inline int tcp_westwood_ssthresh(struct tcp_opt *tp)
+static inline int tcp_westwood_ssthresh(struct tcp_sock *tp)
 {
 	__u32 ssthresh = 0;
 
@@ -2060,7 +2044,7 @@
 	return (ssthresh != 0);
 }
 
-static inline int tcp_westwood_cwnd(struct tcp_opt *tp)
+static inline int tcp_westwood_cwnd(struct tcp_sock *tp)
 {
 	__u32 cwnd = 0;
 
diff -Nru a/include/net/tcp_ecn.h b/include/net/tcp_ecn.h
--- a/include/net/tcp_ecn.h	2005-01-10 20:11:21 -08:00
+++ b/include/net/tcp_ecn.h	2005-01-10 20:11:21 -08:00
@@ -9,8 +9,7 @@
 #define TCP_ECN_QUEUE_CWR	2
 #define TCP_ECN_DEMAND_CWR	4
 
-static __inline__ void
-TCP_ECN_queue_cwr(struct tcp_opt *tp)
+static inline void TCP_ECN_queue_cwr(struct tcp_sock *tp)
 {
 	if (tp->ecn_flags&TCP_ECN_OK)
 		tp->ecn_flags |= TCP_ECN_QUEUE_CWR;
@@ -19,16 +18,16 @@
 
 /* Output functions */
 
-static __inline__ void
-TCP_ECN_send_synack(struct tcp_opt *tp, struct sk_buff *skb)
+static inline void TCP_ECN_send_synack(struct tcp_sock *tp,
+				       struct sk_buff *skb)
 {
 	TCP_SKB_CB(skb)->flags &= ~TCPCB_FLAG_CWR;
 	if (!(tp->ecn_flags&TCP_ECN_OK))
 		TCP_SKB_CB(skb)->flags &= ~TCPCB_FLAG_ECE;
 }
 
-static __inline__ void
-TCP_ECN_send_syn(struct sock *sk, struct tcp_opt *tp, struct sk_buff *skb)
+static inline void TCP_ECN_send_syn(struct sock *sk, struct tcp_sock *tp,
+				    struct sk_buff *skb)
 {
 	tp->ecn_flags = 0;
 	if (sysctl_tcp_ecn && !(sk->sk_route_caps & NETIF_F_TSO)) {
@@ -45,8 +44,8 @@
 		th->ece = 1;
 }
 
-static __inline__ void
-TCP_ECN_send(struct sock *sk, struct tcp_opt *tp, struct sk_buff *skb, int tcp_header_len)
+static inline void TCP_ECN_send(struct sock *sk, struct tcp_sock *tp,
+				struct sk_buff *skb, int tcp_header_len)
 {
 	if (tp->ecn_flags & TCP_ECN_OK) {
 		/* Not-retransmitted data segment: set ECT and inject CWR. */
@@ -68,21 +67,18 @@
 
 /* Input functions */
 
-static __inline__ void
-TCP_ECN_accept_cwr(struct tcp_opt *tp, struct sk_buff *skb)
+static inline void TCP_ECN_accept_cwr(struct tcp_sock *tp, struct sk_buff *skb)
 {
 	if (skb->h.th->cwr)
 		tp->ecn_flags &= ~TCP_ECN_DEMAND_CWR;
 }
 
-static __inline__ void
-TCP_ECN_withdraw_cwr(struct tcp_opt *tp)
+static inline void TCP_ECN_withdraw_cwr(struct tcp_sock *tp)
 {
 	tp->ecn_flags &= ~TCP_ECN_DEMAND_CWR;
 }
 
-static __inline__ void
-TCP_ECN_check_ce(struct tcp_opt *tp, struct sk_buff *skb)
+static inline void TCP_ECN_check_ce(struct tcp_sock *tp, struct sk_buff *skb)
 {
 	if (tp->ecn_flags&TCP_ECN_OK) {
 		if (INET_ECN_is_ce(TCP_SKB_CB(skb)->flags))
@@ -95,30 +91,27 @@
 	}
 }
 
-static __inline__ void
-TCP_ECN_rcv_synack(struct tcp_opt *tp, struct tcphdr *th)
+static inline void TCP_ECN_rcv_synack(struct tcp_sock *tp, struct tcphdr *th)
 {
 	if ((tp->ecn_flags&TCP_ECN_OK) && (!th->ece || th->cwr))
 		tp->ecn_flags &= ~TCP_ECN_OK;
 }
 
-static __inline__ void
-TCP_ECN_rcv_syn(struct tcp_opt *tp, struct tcphdr *th)
+static inline void TCP_ECN_rcv_syn(struct tcp_sock *tp, struct tcphdr *th)
 {
 	if ((tp->ecn_flags&TCP_ECN_OK) && (!th->ece || !th->cwr))
 		tp->ecn_flags &= ~TCP_ECN_OK;
 }
 
-static __inline__ int
-TCP_ECN_rcv_ecn_echo(struct tcp_opt *tp, struct tcphdr *th)
+static inline int TCP_ECN_rcv_ecn_echo(struct tcp_sock *tp, struct tcphdr *th)
 {
 	if (th->ece && !th->syn && (tp->ecn_flags&TCP_ECN_OK))
 		return 1;
 	return 0;
 }
 
-static __inline__ void
-TCP_ECN_openreq_child(struct tcp_opt *tp, struct open_request *req)
+static inline void TCP_ECN_openreq_child(struct tcp_sock *tp,
+					 struct open_request *req)
 {
 	tp->ecn_flags = req->ecn_ok ? TCP_ECN_OK : 0;
 }
diff -Nru a/include/net/x25.h b/include/net/x25.h
--- a/include/net/x25.h	2005-01-10 20:11:20 -08:00
+++ b/include/net/x25.h	2005-01-10 20:11:20 -08:00
@@ -162,7 +162,6 @@
 			  struct x25_address *);
 extern int  x25_addr_aton(unsigned char *, struct x25_address *,
 			  struct x25_address *);
-extern unsigned int x25_new_lci(struct x25_neigh *);
 extern struct sock *x25_find_socket(unsigned int, struct x25_neigh *);
 extern void x25_destroy_socket(struct sock *);
 extern int  x25_rx_call_request(struct sk_buff *, struct x25_neigh *, unsigned int);
@@ -171,7 +170,6 @@
 /* x25_dev.c */
 extern void x25_send_frame(struct sk_buff *, struct x25_neigh *);
 extern int  x25_lapb_receive_frame(struct sk_buff *, struct net_device *, struct packet_type *);
-extern int  x25_llc_receive_frame(struct sk_buff *, struct net_device *, struct packet_type *);
 extern void x25_establish_link(struct x25_neigh *);
 extern void x25_terminate_link(struct x25_neigh *);
 
@@ -191,9 +189,6 @@
 extern void x25_link_device_down(struct net_device *);
 extern void x25_link_established(struct x25_neigh *);
 extern void x25_link_terminated(struct x25_neigh *);
-extern void x25_transmit_restart_request(struct x25_neigh *);
-extern void x25_transmit_restart_confirmation(struct x25_neigh *);
-extern void x25_transmit_diagnostic(struct x25_neigh *, unsigned char);
 extern void x25_transmit_clear_request(struct x25_neigh *, unsigned int, unsigned char);
 extern void x25_transmit_link(struct sk_buff *, struct x25_neigh *);
 extern int  x25_subscr_ioctl(unsigned int, void __user *);
@@ -243,6 +238,7 @@
 extern void x25_write_internal(struct sock *, int);
 extern int  x25_decode(struct sock *, struct sk_buff *, int *, int *, int *, int *, int *);
 extern void x25_disconnect(struct sock *, int, unsigned char, unsigned char);
+extern int x25_check_calluserdata(struct x25_calluserdata *,struct x25_calluserdata *);
 
 /* x25_timer.c */
 extern void x25_start_heartbeat(struct sock *);
diff -Nru a/include/net/xfrm.h b/include/net/xfrm.h
--- a/include/net/xfrm.h	2005-01-10 20:11:21 -08:00
+++ b/include/net/xfrm.h	2005-01-10 20:11:21 -08:00
@@ -782,7 +782,6 @@
 
 extern void xfrm_init(void);
 extern void xfrm4_init(void);
-extern void xfrm4_fini(void);
 extern void xfrm6_init(void);
 extern void xfrm6_fini(void);
 extern void xfrm_state_init(void);
@@ -843,7 +842,6 @@
 } 
 #endif
 
-void xfrm_policy_init(void);
 struct xfrm_policy *xfrm_policy_alloc(int gfp);
 extern int xfrm_policy_walk(int (*func)(struct xfrm_policy *, int, int, void*), void *);
 int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl);
@@ -858,12 +856,9 @@
 				  int create, unsigned short family);
 extern void xfrm_policy_flush(void);
 extern int xfrm_sk_policy_insert(struct sock *sk, int dir, struct xfrm_policy *pol);
-extern struct xfrm_policy *xfrm_sk_policy_lookup(struct sock *sk, int dir, struct flowi *fl);
 extern int xfrm_flush_bundles(void);
 
 extern wait_queue_head_t km_waitq;
-extern void km_state_expired(struct xfrm_state *x, int hard);
-extern int km_query(struct xfrm_state *x, struct xfrm_tmpl *, struct xfrm_policy *pol);
 extern int km_new_mapping(struct xfrm_state *x, xfrm_address_t *ipaddr, u16 sport);
 extern void km_policy_expired(struct xfrm_policy *pol, int dir, int hard);
 
@@ -875,7 +870,6 @@
 extern int xfrm_count_enc_supported(void);
 extern struct xfrm_algo_desc *xfrm_aalg_get_byidx(unsigned int idx);
 extern struct xfrm_algo_desc *xfrm_ealg_get_byidx(unsigned int idx);
-extern struct xfrm_algo_desc *xfrm_calg_get_byidx(unsigned int idx);
 extern struct xfrm_algo_desc *xfrm_aalg_get_byid(int alg_id);
 extern struct xfrm_algo_desc *xfrm_ealg_get_byid(int alg_id);
 extern struct xfrm_algo_desc *xfrm_calg_get_byid(int alg_id);
diff -Nru a/include/pcmcia/mem_op.h b/include/pcmcia/mem_op.h
--- a/include/pcmcia/mem_op.h	2005-01-10 20:11:23 -08:00
+++ b/include/pcmcia/mem_op.h	2005-01-10 20:11:23 -08:00
@@ -76,67 +76,54 @@
 
 #else /* UNSAFE_MEMCPY */
 
-static inline void copy_from_pc(void *to, const void *from, size_t n)
+static inline void copy_from_pc(void *to, void __iomem *from, size_t n)
 {
-    size_t odd = (n & 1);
-    n -= odd;
-    while (n) {
-	u_short *t = to;
-
-	*t = __raw_readw(from);
-	to = (void *)((long)to + 2);
-	from = (const void *)((long)from + 2);
-	n -= 2;
-    }
-    if (odd)
-	*(u_char *)to = readb(from);
+	__u16 *t = to;
+	__u16 __iomem *f = from;
+	size_t odd = (n & 1);
+	for (n >>= 1; n; n--)
+		*t++ = __raw_readw(f++);
+	if (odd)
+		*(__u8 *)t = readb(f);
 }
 
-static inline void copy_to_pc(void *to, const void *from, size_t n)
+static inline void copy_to_pc(void __iomem *to, const void *from, size_t n)
 {
-    size_t odd = (n & 1);
-    n -= odd;
-    while (n) {
-	__raw_writew(*(u_short *)from, to);
-	to = (void *)((long)to + 2);
-	from = (const void *)((long)from + 2);
-	n -= 2;
-    }
-    if (odd)
-	writeb(*(u_char *)from, to);
+	__u16 __iomem *t = to;
+	const __u16 *f = from;
+	size_t odd = (n & 1);
+	for (n >>= 1; n ; n--)
+		__raw_writew(*f++, t++);
+	if (odd)
+		writeb(*(__u8 *)f, t);
 }
 
-static inline void copy_pc_to_user(void *to, const void *from, size_t n)
+static inline void copy_pc_to_user(void __user *to, void __iomem *from, size_t n)
 {
-    size_t odd = (n & 1);
-    n -= odd;
-    while (n) {
-	put_user(__raw_readw(from), (short *)to);
-	to = (void *)((long)to + 2);
-	from = (const void *)((long)from + 2);
-	n -= 2;
-    }
-    if (odd)
-	put_user(readb(from), (char *)to);
+	__u16 __user *t = to;
+	__u16 __iomem *f = from;
+	size_t odd = (n & 1);
+	for (n >>= 1; n ; n--)
+		put_user(__raw_readw(f++), t++);
+	if (odd)
+		put_user(readb(f), (char __user *)t);
 }
 
-static inline void copy_user_to_pc(void *to, const void *from, size_t n)
+static inline void copy_user_to_pc(void __iomem *to, void __user *from, size_t n)
 {
-    short s;
-    char c;
-    size_t odd = (n & 1);
-    n -= odd;
-    while (n) {
-	get_user(s, (short *)from);
-	__raw_writew(s, to);
-	to = (void *)((long)to + 2);
-	from = (const void *)((long)from + 2);
-	n -= 2;
-    }
-    if (odd) {
-	get_user(c, (char *)from);
-	writeb(c, to);
-    }
+	__u16 __user *f = from;
+	__u16 __iomem *t = to;
+	short s;
+	char c;
+	size_t odd = (n & 1);
+	for (n >>= 1; n; n--) {
+		get_user(s, f++);
+		__raw_writew(s, t++);
+	}
+	if (odd) {
+		get_user(c, (char __user *)f);
+		writeb(c, t);
+	}
 }
 
 #endif /* UNSAFE_MEMCPY */
diff -Nru a/include/rxrpc/call.h b/include/rxrpc/call.h
--- a/include/rxrpc/call.h	2005-01-10 20:11:16 -08:00
+++ b/include/rxrpc/call.h	2005-01-10 20:11:16 -08:00
@@ -20,9 +20,6 @@
 #define RXRPC_CALL_ACK_WINDOW_SIZE	16
 
 extern unsigned rxrpc_call_rcv_timeout;		/* receive activity timeout (secs) */
-extern unsigned rxrpc_call_acks_timeout;	/* pending ACK (retransmit) timeout (secs) */
-extern unsigned rxrpc_call_dfr_ack_timeout;	/* deferred ACK timeout (secs) */
-extern unsigned short rxrpc_call_max_resend;		/* maximum consecutive resend count */
 
 /* application call state
  * - only state 0 and ffff are reserved, the state is set to 1 after an opid is received
@@ -209,8 +206,6 @@
 				 int alloc_flags,
 				 int dup_data,
 				 size_t *size_sent);
-
-extern int rxrpc_call_flush(struct rxrpc_call *call);
 
 extern void rxrpc_call_handle_error(struct rxrpc_call *conn, int local, int errno);
 
diff -Nru a/include/rxrpc/packet.h b/include/rxrpc/packet.h
--- a/include/rxrpc/packet.h	2005-01-10 20:11:17 -08:00
+++ b/include/rxrpc/packet.h	2005-01-10 20:11:17 -08:00
@@ -124,6 +124,4 @@
 
 } __attribute__((packed));
 
-extern const char *rxrpc_acks[];
-
 #endif /* _LINUX_RXRPC_PACKET_H */
diff -Nru a/include/rxrpc/transport.h b/include/rxrpc/transport.h
--- a/include/rxrpc/transport.h	2005-01-10 20:11:23 -08:00
+++ b/include/rxrpc/transport.h	2005-01-10 20:11:23 -08:00
@@ -103,6 +103,4 @@
 				       struct rxrpc_message *msg,
 				       int error);
 
-extern void rxrpc_clear_transport(struct rxrpc_transport *trans);
-
 #endif /* _LINUX_RXRPC_TRANSPORT_H */
diff -Nru a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h
--- a/include/scsi/scsi_host.h	2005-01-10 20:11:16 -08:00
+++ b/include/scsi/scsi_host.h	2005-01-10 20:11:16 -08:00
@@ -216,13 +216,35 @@
 	void (* slave_destroy)(struct scsi_device *);
 
 	/*
+	 * fill in this function to allow the queue depth of this host
+	 * to be changeable (on a per device basis).  returns either
+	 * the current queue depth setting (may be different from what
+	 * was passed in) or an error.  An error should only be
+	 * returned if the requested depth is legal but the driver was
+	 * unable to set it.  If the requested depth is illegal, the
+	 * driver should set and return the closest legal queue depth.
+	 *
+	 */
+	int (* change_queue_depth)(struct scsi_device *, int);
+
+	/*
+	 * fill in this function to allow the changing of tag types
+	 * (this also allows the enabling/disabling of tag command
+	 * queueing).  An error should only be returned if something
+	 * went wrong in the driver while trying to set the tag type.
+	 * If the driver doesn't support the requested tag type, then
+	 * it should set the closest type it does support without
+	 * returning an error.  Returns the actual tag type set.
+	 */
+	int (* change_queue_type)(struct scsi_device *, int);
+
+	/*
 	 * This function determines the bios parameters for a given
 	 * harddisk.  These tend to be numbers that are made up by
 	 * the host adapter.  Parameters:
 	 * size, device, list (heads, sectors, cylinders)
 	 *
-	 * Status: OPTIONAL
-	 */
+	 * Status: OPTIONAL */
 	int (* bios_param)(struct scsi_device *, struct block_device *,
 			sector_t, int []);
 
@@ -527,6 +549,9 @@
 extern struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *, int);
 extern int __must_check scsi_add_host(struct Scsi_Host *, struct device *);
 extern void scsi_scan_host(struct Scsi_Host *);
+extern void scsi_scan_single_target(struct Scsi_Host *, unsigned int,
+	unsigned int);
+extern void scsi_rescan_device(struct device *);
 extern void scsi_remove_host(struct Scsi_Host *);
 extern struct Scsi_Host *scsi_host_get(struct Scsi_Host *);
 extern void scsi_host_put(struct Scsi_Host *t);
diff -Nru a/include/scsi/scsi_tcq.h b/include/scsi/scsi_tcq.h
--- a/include/scsi/scsi_tcq.h	2005-01-10 20:11:21 -08:00
+++ b/include/scsi/scsi_tcq.h	2005-01-10 20:11:21 -08:00
@@ -13,6 +13,43 @@
 #define SCSI_NO_TAG	(-1)    /* identify no tag in use */
 
 
+
+/**
+ * scsi_get_tag_type - get the type of tag the device supports
+ * @sdev:	the scsi device
+ *
+ * Notes:
+ *	If the drive only supports simple tags, returns MSG_SIMPLE_TAG
+ *	if it supports all tag types, returns MSG_ORDERED_TAG.
+ */
+static inline int scsi_get_tag_type(struct scsi_device *sdev)
+{
+	if (!sdev->tagged_supported)
+		return 0;
+	if (sdev->ordered_tags)
+		return MSG_ORDERED_TAG;
+	if (sdev->simple_tags)
+		return MSG_SIMPLE_TAG;
+	return 0;
+}
+
+static inline void scsi_set_tag_type(struct scsi_device *sdev, int tag)
+{
+	switch (tag) {
+	case MSG_ORDERED_TAG:
+		sdev->ordered_tags = 1;
+		/* fall through */
+	case MSG_SIMPLE_TAG:
+		sdev->simple_tags = 1;
+		break;
+	case 0:
+		/* fall through */
+	default:
+		sdev->ordered_tags = 0;
+		sdev->simple_tags = 0;
+		break;
+	}
+}
 /**
  * scsi_activate_tcq - turn on tag command queueing
  * @SDpnt:	device to turn on TCQ for
@@ -25,11 +62,13 @@
  **/
 static inline void scsi_activate_tcq(struct scsi_device *sdev, int depth)
 {
-        if (sdev->tagged_supported) {
-		if (!blk_queue_tagged(sdev->request_queue))
-			blk_queue_init_tags(sdev->request_queue, depth, NULL);
-		scsi_adjust_queue_depth(sdev, MSG_ORDERED_TAG, depth);
-        }
+	if (!sdev->tagged_supported)
+		return;
+
+	if (!blk_queue_tagged(sdev->request_queue))
+		blk_queue_init_tags(sdev->request_queue, depth, NULL);
+
+	scsi_adjust_queue_depth(sdev, scsi_get_tag_type(sdev), depth);
 }
 
 /**
@@ -56,9 +95,10 @@
 static inline int scsi_populate_tag_msg(struct scsi_cmnd *cmd, char *msg)
 {
         struct request *req = cmd->request;
+	struct scsi_device *sdev = cmd->device;
 
         if (blk_rq_tagged(req)) {
-		if (req->flags & REQ_HARDBARRIER)
+		if (sdev->ordered_tags && req->flags & REQ_HARDBARRIER)
         	        *msg++ = MSG_ORDERED_TAG;
         	else
         	        *msg++ = MSG_SIMPLE_TAG;
diff -Nru a/include/scsi/scsi_transport.h b/include/scsi/scsi_transport.h
--- a/include/scsi/scsi_transport.h	2005-01-10 20:11:21 -08:00
+++ b/include/scsi/scsi_transport.h	2005-01-10 20:11:21 -08:00
@@ -33,12 +33,18 @@
 	struct class *device_class;
 	struct class *target_class;
 	struct class *host_class;
+	struct attribute_group *host_statistics;
 
 	/* Constructor functions */
 	int (*device_setup)(struct scsi_device *);
 	int (*device_configure)(struct scsi_device *);
 	int (*target_setup)(struct scsi_target *);
 	int (*host_setup)(struct Scsi_Host *);
+
+	/* Destructor functions */
+	void (*device_destroy)(struct scsi_device *);
+	void (*target_destroy)(struct scsi_target *);
+	void (*host_destroy)(struct Scsi_Host *);
 
 	/* The size of the specific transport attribute structure (a
 	 * space of this size will be left at the end of the
diff -Nru a/include/scsi/scsi_transport_fc.h b/include/scsi/scsi_transport_fc.h
--- a/include/scsi/scsi_transport_fc.h	2005-01-10 20:11:17 -08:00
+++ b/include/scsi/scsi_transport_fc.h	2005-01-10 20:11:17 -08:00
@@ -24,12 +24,102 @@
 
 struct scsi_transport_template;
 
+
+/*
+ * FC Port definitions - Following FC HBAAPI guidelines
+ *
+ * Note: Not all binary values for the different fields match HBAAPI.
+ *  Instead, we use densely packed ordinal values or enums.
+ *  We get away with this as we never present the actual binary values
+ *  externally. For sysfs, we always present the string that describes
+ *  the value. Thus, an admin doesn't need a magic HBAAPI decoder ring
+ *  to understand the values. The HBAAPI user-space library is free to
+ *  convert the strings into the HBAAPI-specified binary values.
+ *
+ * Note: Not all HBAAPI-defined values are contained in the definitions
+ *  below. Those not appropriate to an fc_host (e.g. FCP initiator) have
+ *  been removed.
+ */
+
+/*
+ * fc_port_type: If you alter this, you also need to alter scsi_transport_fc.c
+ * (for the ascii descriptions).
+ */
+enum fc_port_type {
+	FC_PORTTYPE_UNKNOWN,
+	FC_PORTTYPE_OTHER,
+	FC_PORTTYPE_NOTPRESENT,
+	FC_PORTTYPE_NPORT,		/* Attached to FPort */
+	FC_PORTTYPE_NLPORT,		/* (Public) Loop w/ FLPort */
+	FC_PORTTYPE_LPORT,		/* (Private) Loop w/o FLPort */
+	FC_PORTTYPE_PTP,		/* Point to Point w/ another NPort */
+};
+
+/*
+ * fc_port_state: If you alter this, you also need to alter scsi_transport_fc.c
+ * (for the ascii descriptions).
+ */
+enum fc_port_state {
+	FC_PORTSTATE_UNKNOWN,
+	FC_PORTSTATE_ONLINE,
+	FC_PORTSTATE_OFFLINE,		/* User has taken Port Offline */
+	FC_PORTSTATE_BYPASSED,
+	FC_PORTSTATE_DIAGNOSTICS,
+	FC_PORTSTATE_LINKDOWN,
+	FC_PORTSTATE_ERROR,
+	FC_PORTSTATE_LOOPBACK,
+};
+
+
+/* 
+ * FC Classes of Service
+ * Note: values are not enumerated, as they can be "or'd" together
+ * for reporting (e.g. report supported_classes). If you alter this list,
+ * you also need to alter scsi_transport_fc.c (for the ascii descriptions).
+ */
+#define FC_COS_UNSPECIFIED		0
+#define FC_COS_CLASS1			2
+#define FC_COS_CLASS2			4
+#define FC_COS_CLASS3			8
+#define FC_COS_CLASS4			0x10
+#define FC_COS_CLASS6			0x40
+
+/* 
+ * FC Port Speeds
+ * Note: values are not enumerated, as they can be "or'd" together
+ * for reporting (e.g. report supported_speeds). If you alter this list,
+ * you also need to alter scsi_transport_fc.c (for the ascii descriptions).
+ */
+#define FC_PORTSPEED_UNKNOWN		0 /* Unknown - transceiver
+					     incapable of reporting */
+#define FC_PORTSPEED_1GBIT		1
+#define FC_PORTSPEED_2GBIT		2
+#define FC_PORTSPEED_10GBIT		4
+#define FC_PORTSPEED_4GBIT		8
+#define FC_PORTSPEED_NOT_NEGOTIATED	(1 << 15) /* Speed not established */
+
+/*
+ * fc_tgtid_binding_type: If you alter this, you also need to alter
+ * scsi_transport_fc.c (for the ascii descriptions).
+ */
+enum fc_tgtid_binding_type  {
+	FC_TGTID_BIND_BY_WWPN,
+	FC_TGTID_BIND_BY_WWNN,
+	FC_TGTID_BIND_BY_ID,
+};
+
+
+
+/*
+ * FC Remote Port (Target) Attributes
+ */
+
 struct fc_starget_attrs {	/* aka fc_target_attrs */
 	int port_id;
-	uint64_t node_name;
-	uint64_t port_name;
-	uint32_t dev_loss_tmo;	/* Remote Port loss timeout in seconds. */
-	struct timer_list dev_loss_timer;
+	u64 node_name;
+	u64 port_name;
+	u32 dev_loss_tmo;	/* Remote Port loss timeout in seconds. */
+	struct work_struct dev_loss_work;
 };
 
 #define fc_starget_port_id(x) \
@@ -40,18 +130,120 @@
 	(((struct fc_starget_attrs *)&(x)->starget_data)->port_name)
 #define fc_starget_dev_loss_tmo(x) \
 	(((struct fc_starget_attrs *)&(x)->starget_data)->dev_loss_tmo)
-#define fc_starget_dev_loss_timer(x) \
-	(((struct fc_starget_attrs *)&(x)->starget_data)->dev_loss_timer)
+#define fc_starget_dev_loss_work(x) \
+	(((struct fc_starget_attrs *)&(x)->starget_data)->dev_loss_work)
+
+
+/*
+ * FC Local Port (Host) Statistics
+ */
+
+/* FC Statistics - Following FC HBAAPI v2.0 guidelines */
+struct fc_host_statistics {
+	/* port statistics */
+	u64 seconds_since_last_reset;
+	u64 tx_frames;
+	u64 tx_words;
+	u64 rx_frames;
+	u64 rx_words;
+	u64 lip_count;
+	u64 nos_count;
+	u64 error_frames;
+	u64 dumped_frames;
+	u64 link_failure_count;
+	u64 loss_of_sync_count;
+	u64 loss_of_signal_count;
+	u64 prim_seq_protocol_err_count;
+	u64 invalid_tx_word_count;
+	u64 invalid_crc_count;
+	
+	/* fc4 statistics  (only FCP supported currently) */
+	u64 fcp_input_requests;
+	u64 fcp_output_requests;
+	u64 fcp_control_requests;
+	u64 fcp_input_megabytes;
+	u64 fcp_output_megabytes;
+};
+
+
+/*
+ * FC Local Port (Host) Attributes
+ *
+ * Attributes are based on HBAAPI V2.0 definitions.
+ * Note: OSDeviceName is determined by user-space library
+ *
+ * Fixed attributes are not expected to change. The driver is
+ * expected to set these values after successfully calling scsi_add_host().
+ * The transport fully manages all get functions w/o driver interaction.
+ *
+ * Dynamic attributes are expected to change. The driver participates
+ * in all get/set operations via functions provided by the driver.
+ *
+ * Private attributes are transport-managed values. They are fully
+ * managed by the transport w/o driver interaction.
+ */
+
+#define FC_FC4_LIST_SIZE		32
+#define FC_SYMBOLIC_NAME_SIZE		256
 
 struct fc_host_attrs {
-	uint32_t link_down_tmo;	/* Link Down timeout in seconds. */
-	struct timer_list link_down_timer;
+	/* Fixed Attributes */
+	u64 node_name;
+	u64 port_name;
+	u32 supported_classes;
+	u8  supported_fc4s[FC_FC4_LIST_SIZE];
+	char symbolic_name[FC_SYMBOLIC_NAME_SIZE];
+	u32 supported_speeds;
+	u32 maxframe_size;
+
+	/* Dynamic Attributes */
+	u32 port_id;
+	enum fc_port_type port_type;
+	enum fc_port_state port_state;
+	u8  active_fc4s[FC_FC4_LIST_SIZE];
+	u32 speed;
+	u64 fabric_name;
+	u32 link_down_tmo;	/* Link Down timeout in seconds. */
+
+	/* Private (Transport-managed) Attributes */
+	enum fc_tgtid_binding_type  tgtid_bind_type;
+
+	/* internal data */
+	struct work_struct link_down_work;
 };
 
+#define fc_host_node_name(x) \
+	(((struct fc_host_attrs *)(x)->shost_data)->node_name)
+#define fc_host_port_name(x)	\
+	(((struct fc_host_attrs *)(x)->shost_data)->port_name)
+#define fc_host_supported_classes(x)	\
+	(((struct fc_host_attrs *)(x)->shost_data)->supported_classes)
+#define fc_host_supported_fc4s(x)	\
+	(((struct fc_host_attrs *)(x)->shost_data)->supported_fc4s)
+#define fc_host_symbolic_name(x)	\
+	(((struct fc_host_attrs *)(x)->shost_data)->symbolic_name)
+#define fc_host_supported_speeds(x)	\
+	(((struct fc_host_attrs *)(x)->shost_data)->supported_speeds)
+#define fc_host_maxframe_size(x)	\
+	(((struct fc_host_attrs *)(x)->shost_data)->maxframe_size)
+#define fc_host_port_id(x)	\
+	(((struct fc_host_attrs *)(x)->shost_data)->port_id)
+#define fc_host_port_type(x)	\
+	(((struct fc_host_attrs *)(x)->shost_data)->port_type)
+#define fc_host_port_state(x)	\
+	(((struct fc_host_attrs *)(x)->shost_data)->port_state)
+#define fc_host_active_fc4s(x)	\
+	(((struct fc_host_attrs *)(x)->shost_data)->active_fc4s)
+#define fc_host_speed(x)	\
+	(((struct fc_host_attrs *)(x)->shost_data)->speed)
+#define fc_host_fabric_name(x)	\
+	(((struct fc_host_attrs *)(x)->shost_data)->fabric_name)
 #define fc_host_link_down_tmo(x) \
 	(((struct fc_host_attrs *)(x)->shost_data)->link_down_tmo)
-#define fc_host_link_down_timer(x) \
-	(((struct fc_host_attrs *)(x)->shost_data)->link_down_timer)
+#define fc_host_tgtid_bind_type(x) \
+	(((struct fc_host_attrs *)(x)->shost_data)->tgtid_bind_type)
+#define fc_host_link_down_work(x) \
+	(((struct fc_host_attrs *)(x)->shost_data)->link_down_work)
 
 
 /* The functions by which the transport class and the driver communicate */
@@ -60,10 +252,19 @@
 	void	(*get_starget_node_name)(struct scsi_target *);
 	void	(*get_starget_port_name)(struct scsi_target *);
 	void    (*get_starget_dev_loss_tmo)(struct scsi_target *);
-	void	(*set_starget_dev_loss_tmo)(struct scsi_target *, uint32_t);
+	void	(*set_starget_dev_loss_tmo)(struct scsi_target *, u32);
 
+	void 	(*get_host_port_id)(struct Scsi_Host *);
+	void	(*get_host_port_type)(struct Scsi_Host *);
+	void	(*get_host_port_state)(struct Scsi_Host *);
+	void	(*get_host_active_fc4s)(struct Scsi_Host *);
+	void	(*get_host_speed)(struct Scsi_Host *);
+	void	(*get_host_fabric_name)(struct Scsi_Host *);
 	void    (*get_host_link_down_tmo)(struct Scsi_Host *);
-	void	(*set_host_link_down_tmo)(struct Scsi_Host *, uint32_t);
+	void	(*set_host_link_down_tmo)(struct Scsi_Host *, u32);
+
+	struct fc_host_statistics * (*get_fc_host_stats)(struct Scsi_Host *);
+	void	(*reset_fc_host_stats)(struct Scsi_Host *);
 
 	/* 
 	 * The driver sets these to tell the transport class it
@@ -76,10 +277,24 @@
 	unsigned long	show_starget_port_name:1;
 	unsigned long   show_starget_dev_loss_tmo:1;
 
+	/* host fixed attributes */
+	unsigned long	show_host_node_name:1;
+	unsigned long	show_host_port_name:1;
+	unsigned long	show_host_supported_classes:1;
+	unsigned long	show_host_supported_fc4s:1;
+	unsigned long	show_host_symbolic_name:1;
+	unsigned long	show_host_supported_speeds:1;
+	unsigned long	show_host_maxframe_size:1;
+	/* host dynamic attributes */
+	unsigned long	show_host_port_id:1;
+	unsigned long	show_host_port_type:1;
+	unsigned long	show_host_port_state:1;
+	unsigned long	show_host_active_fc4s:1;
+	unsigned long	show_host_speed:1;
+	unsigned long	show_host_fabric_name:1;
 	unsigned long   show_host_link_down_tmo:1;
-
-	/* Private Attributes */
 };
+
 
 struct scsi_transport_template *fc_attach_transport(struct fc_function_template *);
 void fc_release_transport(struct scsi_transport_template *);
diff -Nru a/include/scsi/scsi_transport_iscsi.h b/include/scsi/scsi_transport_iscsi.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/scsi/scsi_transport_iscsi.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,178 @@
+/* 
+ * iSCSI transport class definitions
+ *
+ * Copyright (C) IBM Corporation, 2004
+ * Copyright (C) Mike Christie, 2004
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+#ifndef SCSI_TRANSPORT_ISCSI_H
+#define SCSI_TRANSPORT_ISCSI_H
+
+#include <linux/config.h>
+#include <linux/in6.h>
+#include <linux/in.h>
+
+struct scsi_transport_template;
+
+struct iscsi_class_session {
+	uint8_t isid[6];
+	uint16_t tsih;
+	int header_digest;		/* 1 CRC32, 0 None */
+	int data_digest;		/* 1 CRC32, 0 None */
+	uint16_t tpgt;
+	union {
+		struct in6_addr sin6_addr;
+		struct in_addr sin_addr;
+	} u;
+	sa_family_t addr_type;		/* must be AF_INET or AF_INET6 */
+	uint16_t port;			/* must be in network byte order */
+	int initial_r2t;		/* 1 Yes, 0 No */
+	int immediate_data;		/* 1 Yes, 0 No */
+	uint32_t max_recv_data_segment_len;
+	uint32_t max_burst_len;
+	uint32_t first_burst_len;
+	uint16_t def_time2wait;
+	uint16_t def_time2retain;
+	uint16_t max_outstanding_r2t;
+	int data_pdu_in_order;		/* 1 Yes, 0 No */
+	int data_sequence_in_order;	/* 1 Yes, 0 No */
+	int erl;
+};
+
+/*
+ * accessor macros
+ */
+#define iscsi_isid(x) \
+	(((struct iscsi_class_session *)&(x)->starget_data)->isid)
+#define iscsi_tsih(x) \
+	(((struct iscsi_class_session *)&(x)->starget_data)->tsih)
+#define iscsi_header_digest(x) \
+	(((struct iscsi_class_session *)&(x)->starget_data)->header_digest)
+#define iscsi_data_digest(x) \
+	(((struct iscsi_class_session *)&(x)->starget_data)->data_digest)
+#define iscsi_port(x) \
+	(((struct iscsi_class_session *)&(x)->starget_data)->port)
+#define iscsi_addr_type(x) \
+	(((struct iscsi_class_session *)&(x)->starget_data)->addr_type)
+#define iscsi_sin_addr(x) \
+	(((struct iscsi_class_session *)&(x)->starget_data)->u.sin_addr)
+#define iscsi_sin6_addr(x) \
+	(((struct iscsi_class_session *)&(x)->starget_data)->u.sin6_addr)
+#define iscsi_tpgt(x) \
+	(((struct iscsi_class_session *)&(x)->starget_data)->tpgt)
+#define iscsi_initial_r2t(x) \
+	(((struct iscsi_class_session *)&(x)->starget_data)->initial_r2t)
+#define iscsi_immediate_data(x) \
+	(((struct iscsi_class_session *)&(x)->starget_data)->immediate_data)
+#define iscsi_max_recv_data_segment_len(x) \
+	(((struct iscsi_class_session *)&(x)->starget_data)->max_recv_data_segment_len)
+#define iscsi_max_burst_len(x) \
+	(((struct iscsi_class_session *)&(x)->starget_data)->max_burst_len)
+#define iscsi_first_burst_len(x) \
+	(((struct iscsi_class_session *)&(x)->starget_data)->first_burst_len)
+#define iscsi_def_time2wait(x) \
+	(((struct iscsi_class_session *)&(x)->starget_data)->def_time2wait)
+#define iscsi_def_time2retain(x) \
+	(((struct iscsi_class_session *)&(x)->starget_data)->def_time2retain)
+#define iscsi_max_outstanding_r2t(x) \
+	(((struct iscsi_class_session *)&(x)->starget_data)->max_outstanding_r2t)
+#define iscsi_data_pdu_in_order(x) \
+	(((struct iscsi_class_session *)&(x)->starget_data)->data_pdu_in_order)
+#define iscsi_data_sequence_in_order(x) \
+	(((struct iscsi_class_session *)&(x)->starget_data)->data_sequence_in_order)
+#define iscsi_erl(x) \
+	(((struct iscsi_class_session *)&(x)->starget_data)->erl)
+
+/*
+ * The functions by which the transport class and the driver communicate
+ */
+struct iscsi_function_template {
+	/*
+	 * target attrs
+	 */
+	void (*get_isid)(struct scsi_target *);
+	void (*get_tsih)(struct scsi_target *);
+	void (*get_header_digest)(struct scsi_target *);
+	void (*get_data_digest)(struct scsi_target *);
+	void (*get_port)(struct scsi_target *);
+	void (*get_tpgt)(struct scsi_target *);
+	/*
+	 * In get_ip_address the lld must set the address and
+	 * the address type
+	 */
+	void (*get_ip_address)(struct scsi_target *);
+	/*
+	 * The lld should snprintf the name or alias to the buffer
+	 */
+	ssize_t (*get_target_name)(struct scsi_target *, char *, ssize_t);
+	ssize_t (*get_target_alias)(struct scsi_target *, char *, ssize_t);
+	void (*get_initial_r2t)(struct scsi_target *);
+	void (*get_immediate_data)(struct scsi_target *);
+	void (*get_max_recv_data_segment_len)(struct scsi_target *);
+	void (*get_max_burst_len)(struct scsi_target *);
+	void (*get_first_burst_len)(struct scsi_target *);
+	void (*get_def_time2wait)(struct scsi_target *);
+	void (*get_def_time2retain)(struct scsi_target *);
+	void (*get_max_outstanding_r2t)(struct scsi_target *);
+	void (*get_data_pdu_in_order)(struct scsi_target *);
+	void (*get_data_sequence_in_order)(struct scsi_target *);
+	void (*get_erl)(struct scsi_target *);
+
+	/*
+	 * host atts
+	 */
+
+	/*
+	 * The lld should snprintf the name or alias to the buffer
+	 */
+	ssize_t (*get_initiator_alias)(struct Scsi_Host *, char *, ssize_t);
+	ssize_t (*get_initiator_name)(struct Scsi_Host *, char *, ssize_t);
+	/*
+	 * The driver sets these to tell the transport class it
+	 * wants the attributes displayed in sysfs.  If the show_ flag
+	 * is not set, the attribute will be private to the transport
+	 * class. We could probably just test if a get_ fn was set
+	 * since we only use the values for sysfs but this is how
+	 * fc does it too.
+	 */
+	unsigned long show_isid:1;
+	unsigned long show_tsih:1;
+	unsigned long show_header_digest:1;
+	unsigned long show_data_digest:1;
+	unsigned long show_port:1;
+	unsigned long show_tpgt:1;
+	unsigned long show_ip_address:1;
+	unsigned long show_target_name:1;
+	unsigned long show_target_alias:1;
+	unsigned long show_initial_r2t:1;
+	unsigned long show_immediate_data:1;
+	unsigned long show_max_recv_data_segment_len:1;
+	unsigned long show_max_burst_len:1;
+	unsigned long show_first_burst_len:1;
+	unsigned long show_def_time2wait:1;
+	unsigned long show_def_time2retain:1;
+	unsigned long show_max_outstanding_r2t:1;
+	unsigned long show_data_pdu_in_order:1;
+	unsigned long show_data_sequence_in_order:1;
+	unsigned long show_erl:1;
+	unsigned long show_initiator_name:1;
+	unsigned long show_initiator_alias:1;
+};
+
+struct scsi_transport_template *iscsi_attach_transport(struct iscsi_function_template *);
+void iscsi_release_transport(struct scsi_transport_template *);
+
+#endif
diff -Nru a/include/sound/ac97_codec.h b/include/sound/ac97_codec.h
--- a/include/sound/ac97_codec.h	2005-01-10 20:11:19 -08:00
+++ b/include/sound/ac97_codec.h	2005-01-10 20:11:19 -08:00
@@ -364,6 +364,8 @@
 #define AC97_CX_SPDIF		(1<<3)	/* Conexant's spdif interface */
 #define AC97_STEREO_MUTES	(1<<4)	/* has stereo mute bits */
 #define AC97_DOUBLE_RATE	(1<<5)	/* supports double rate playback */
+#define AC97_HAS_NO_MASTER_VOL	(1<<6)	/* no Master volume */
+#define AC97_HAS_NO_PCM_VOL	(1<<7)	/* no PCM volume */
 
 /* rates indexes */
 #define AC97_RATES_FRONT_DAC	0
@@ -423,6 +425,9 @@
 	int (*build_specific) (ac97_t *ac97);
 	int (*build_spdif) (ac97_t *ac97);
 	int (*build_post_spdif) (ac97_t *ac97);
+#ifdef CONFIG_PM
+	void (*resume) (ac97_t *ac97);
+#endif
 };
 
 struct _snd_ac97_bus_ops {
@@ -477,8 +482,8 @@
 	snd_info_entry_t *proc_regs;
 	unsigned short subsystem_vendor;
 	unsigned short subsystem_device;
-	spinlock_t reg_lock;
-	struct semaphore mutex;	/* mutex for AD18xx multi-codecs and paging (2.3) */
+	struct semaphore reg_mutex;
+	struct semaphore page_mutex;	/* mutex for AD18xx multi-codecs and paging (2.3) */
 	unsigned short num;	/* number of codec: 0 = primary, 1 = secondary */
 	unsigned short addr;	/* physical address of codec [0-3] */
 	unsigned int id;	/* identification of codec */
@@ -551,6 +556,7 @@
 	AC97_TUNE_AD_SHARING,	/* for AD1985, turn on OMS bit and use headphone */
 	AC97_TUNE_ALC_JACK,	/* for Realtek, enable JACK detection */
 	AC97_TUNE_INV_EAPD,	/* inverted EAPD implementation */
+	AC97_TUNE_MUTE_LED,	/* EAPD bit works as mute LED */
 };
 
 struct ac97_quirk {
@@ -562,7 +568,7 @@
 	int type;		/* quirk type above */
 };
 
-int snd_ac97_tune_hardware(ac97_t *ac97, struct ac97_quirk *quirk, int override);
+int snd_ac97_tune_hardware(ac97_t *ac97, struct ac97_quirk *quirk, const char *override);
 int snd_ac97_set_rate(ac97_t *ac97, int reg, unsigned int rate);
 
 int snd_ac97_pcm_assign(ac97_bus_t *ac97,
diff -Nru a/include/sound/ad1848.h b/include/sound/ad1848.h
--- a/include/sound/ad1848.h	2005-01-10 20:11:17 -08:00
+++ b/include/sound/ad1848.h	2005-01-10 20:11:17 -08:00
@@ -157,10 +157,6 @@
 /* exported functions */
 
 void snd_ad1848_out(ad1848_t *chip, unsigned char reg, unsigned char value);
-void snd_ad1848_dout(ad1848_t *chip, unsigned char reg, unsigned char value);
-unsigned char snd_ad1848_in(ad1848_t *chip, unsigned char reg);
-void snd_ad1848_mce_up(ad1848_t *chip);
-void snd_ad1848_mce_down(ad1848_t *chip);
 
 int snd_ad1848_create(snd_card_t * card,
 		      unsigned long port,
@@ -171,7 +167,6 @@
 int snd_ad1848_pcm(ad1848_t * chip, int device, snd_pcm_t **rpcm);
 const snd_pcm_ops_t *snd_ad1848_get_pcm_ops(int direction);
 int snd_ad1848_mixer(ad1848_t * chip);
-irqreturn_t snd_ad1848_interrupt(int irq, void *dev_id, struct pt_regs *regs);
 
 /* exported mixer stuffs */
 enum { AD1848_MIX_SINGLE, AD1848_MIX_DOUBLE, AD1848_MIX_CAPTURE };
@@ -207,9 +202,5 @@
 {
 	return snd_ad1848_add_ctl(chip, c->name, c->index, c->type, c->private_value);
 }
-
-#ifdef CONFIG_SND_DEBUG
-void snd_ad1848_debug(ad1848_t *chip);
-#endif
 
 #endif /* __SOUND_AD1848_H */
diff -Nru a/include/sound/ainstr_fm.h b/include/sound/ainstr_fm.h
--- a/include/sound/ainstr_fm.h	2005-01-10 20:11:19 -08:00
+++ b/include/sound/ainstr_fm.h	2005-01-10 20:11:19 -08:00
@@ -122,8 +122,6 @@
 
 #include "seq_instr.h"
 
-extern char *snd_seq_fm_id;
-
 int snd_seq_fm_init(snd_seq_kinstr_ops_t * ops,
 		    snd_seq_kinstr_ops_t * next);
 
diff -Nru a/include/sound/ainstr_gf1.h b/include/sound/ainstr_gf1.h
--- a/include/sound/ainstr_gf1.h	2005-01-10 20:11:21 -08:00
+++ b/include/sound/ainstr_gf1.h	2005-01-10 20:11:21 -08:00
@@ -203,8 +203,6 @@
 
 #include "seq_instr.h"
 
-extern char *snd_seq_gf1_id;
-
 typedef struct {
 	void *private_data;
 	int (*info)(void *private_data, gf1_info_t *info);
diff -Nru a/include/sound/ainstr_iw.h b/include/sound/ainstr_iw.h
--- a/include/sound/ainstr_iw.h	2005-01-10 20:11:24 -08:00
+++ b/include/sound/ainstr_iw.h	2005-01-10 20:11:24 -08:00
@@ -351,8 +351,6 @@
 
 #include "seq_instr.h"
 
-extern char *snd_seq_iwffff_id;
-
 typedef struct {
 	void *private_data;
 	int (*info)(void *private_data, iwffff_info_t *info);
diff -Nru a/include/sound/ainstr_simple.h b/include/sound/ainstr_simple.h
--- a/include/sound/ainstr_simple.h	2005-01-10 20:11:21 -08:00
+++ b/include/sound/ainstr_simple.h	2005-01-10 20:11:21 -08:00
@@ -134,8 +134,6 @@
 
 #include "seq_instr.h"
 
-extern char *snd_seq_simple_id;
-
 typedef struct {
 	void *private_data;
 	int (*info)(void *private_data, simple_instrument_info_t *info);
diff -Nru a/include/sound/ak4531_codec.h b/include/sound/ak4531_codec.h
--- a/include/sound/ak4531_codec.h	2005-01-10 20:11:17 -08:00
+++ b/include/sound/ak4531_codec.h	2005-01-10 20:11:17 -08:00
@@ -72,7 +72,7 @@
 	void (*private_free) (ak4531_t *ak4531);
 	/* --- */
 	unsigned char regs[0x20];
-	spinlock_t reg_lock;
+	struct semaphore reg_mutex;
 };
 
 int snd_ak4531_mixer(snd_card_t * card, ak4531_t * _ak4531, ak4531_t ** rak4531);
diff -Nru a/include/sound/asound.h b/include/sound/asound.h
--- a/include/sound/asound.h	2005-01-10 20:11:20 -08:00
+++ b/include/sound/asound.h	2005-01-10 20:11:20 -08:00
@@ -110,9 +110,12 @@
 	SNDRV_HWDEP_IFACE_MIXART,	/* Digigram miXart cards */
 	SNDRV_HWDEP_IFACE_USX2Y,	/* Tascam US122, US224 & US428 usb */
 	SNDRV_HWDEP_IFACE_EMUX_WAVETABLE, /* EmuX wavetable */	
+	SNDRV_HWDEP_IFACE_BLUETOOTH,	/* Bluetooth audio */
+	SNDRV_HWDEP_IFACE_USX2Y_PCM,	/* Tascam US122, US224 & US428 rawusb pcm */
+	SNDRV_HWDEP_IFACE_PCXHR,	/* Digigram PCXHR */
 
 	/* Don't forget to change the following: */
-	SNDRV_HWDEP_IFACE_LAST = SNDRV_HWDEP_IFACE_EMUX_WAVETABLE,
+	SNDRV_HWDEP_IFACE_LAST = SNDRV_HWDEP_IFACE_PCXHR
 };
 
 struct sndrv_hwdep_info {
diff -Nru a/include/sound/control.h b/include/sound/control.h
--- a/include/sound/control.h	2005-01-10 20:11:19 -08:00
+++ b/include/sound/control.h	2005-01-10 20:11:19 -08:00
@@ -115,12 +115,13 @@
 snd_kcontrol_t *snd_ctl_find_numid(snd_card_t * card, unsigned int numid);
 snd_kcontrol_t *snd_ctl_find_id(snd_card_t * card, snd_ctl_elem_id_t *id);
 
-int snd_ctl_register(snd_card_t *card);
-int snd_ctl_disconnect(snd_card_t *card);
-int snd_ctl_can_unregister(snd_card_t *card);
-int snd_ctl_unregister(snd_card_t *card);
+int snd_ctl_create(snd_card_t *card);
+
 int snd_ctl_register_ioctl(snd_kctl_ioctl_func_t fcn);
 int snd_ctl_unregister_ioctl(snd_kctl_ioctl_func_t fcn);
+
+int snd_ctl_elem_read(snd_card_t *card, snd_ctl_elem_value_t *control);
+int snd_ctl_elem_write(snd_card_t *card, snd_ctl_file_t *file, snd_ctl_elem_value_t *control);
 
 static inline unsigned int snd_ctl_get_ioffnum(snd_kcontrol_t *kctl, snd_ctl_elem_id_t *id)
 {
diff -Nru a/include/sound/core.h b/include/sound/core.h
--- a/include/sound/core.h	2005-01-10 20:11:23 -08:00
+++ b/include/sound/core.h	2005-01-10 20:11:23 -08:00
@@ -49,6 +49,7 @@
 
 typedef enum {
 	SNDRV_DEV_TOPLEVEL =		(0*SNDRV_DEV_TYPE_RANGE_SIZE),
+	SNDRV_DEV_CONTROL,
 	SNDRV_DEV_LOWLEVEL_PRE,
 	SNDRV_DEV_LOWLEVEL_NORMAL =	(1*SNDRV_DEV_TYPE_RANGE_SIZE),
 	SNDRV_DEV_PCM,
@@ -57,6 +58,8 @@
 	SNDRV_DEV_SEQUENCER,
 	SNDRV_DEV_HWDEP,
 	SNDRV_DEV_INFO,
+	SNDRV_DEV_BUS,
+	SNDRV_DEV_CODEC,
 	SNDRV_DEV_LOWLEVEL =		(2*SNDRV_DEV_TYPE_RANGE_SIZE)
 } snd_device_type_t;
 
@@ -147,6 +150,7 @@
 	struct rw_semaphore controls_rwsem;	/* controls list lock */
 	rwlock_t ctl_files_rwlock;	/* ctl_files list lock */
 	int controls_count;		/* count of all controls */
+	int user_ctl_count;		/* count of all user controls */
 	struct list_head controls;	/* all controls for this card */
 	struct list_head ctl_files;	/* active control files */
 
@@ -307,12 +311,11 @@
 #define vfree_nocheck(obj) vfree(obj)
 #endif
 char *snd_kmalloc_strdup(const char *string, int flags);
-int copy_to_user_fromio(void __user *dst, const void __iomem *src, size_t count);
-int copy_from_user_toio(void __iomem *dst, const void __user *src, size_t count);
+int copy_to_user_fromio(void __user *dst, const volatile void __iomem *src, size_t count);
+int copy_from_user_toio(volatile void __iomem *dst, const void __user *src, size_t count);
 
 /* init.c */
 
-extern int snd_cards_count;
 extern unsigned int snd_cards_lock;
 extern snd_card_t *snd_cards[SNDRV_CARDS];
 extern rwlock_t snd_card_rwlock;
diff -Nru a/include/sound/cs4231.h b/include/sound/cs4231.h
--- a/include/sound/cs4231.h	2005-01-10 20:11:19 -08:00
+++ b/include/sound/cs4231.h	2005-01-10 20:11:19 -08:00
@@ -309,7 +309,6 @@
 
 void snd_cs4231_out(cs4231_t *chip, unsigned char reg, unsigned char val);
 unsigned char snd_cs4231_in(cs4231_t *chip, unsigned char reg);
-void snd_cs4231_outm(cs4231_t *chip, unsigned char reg, unsigned char mask, unsigned char val);
 void snd_cs4236_ext_out(cs4231_t *chip, unsigned char reg, unsigned char val);
 unsigned char snd_cs4236_ext_in(cs4231_t *chip, unsigned char reg);
 void snd_cs4231_mce_up(cs4231_t *chip);
@@ -363,9 +362,5 @@
 int snd_cs4231_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo);
 int snd_cs4231_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol);
 int snd_cs4231_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol);
-
-#ifdef CONFIG_SND_DEBUG
-void snd_cs4231_debug(cs4231_t *chip);
-#endif
 
 #endif /* __SOUND_CS4231_H */
diff -Nru a/include/sound/cs8427.h b/include/sound/cs8427.h
--- a/include/sound/cs8427.h	2005-01-10 20:11:20 -08:00
+++ b/include/sound/cs8427.h	2005-01-10 20:11:20 -08:00
@@ -186,12 +186,9 @@
 #define CS8427_VERSHIFT		0
 #define CS8427_VER8427A		0x71
 
-int snd_cs8427_detect(snd_i2c_bus_t *bus, unsigned char addr);
 int snd_cs8427_create(snd_i2c_bus_t *bus, unsigned char addr,
 		      unsigned int reset_timeout, snd_i2c_device_t **r_cs8427);
-void snd_cs8427_reset(snd_i2c_device_t *cs8427);
 int snd_cs8427_reg_write(snd_i2c_device_t *device, unsigned char reg, unsigned char val);
-int snd_cs8427_reg_read(snd_i2c_device_t *device, unsigned char reg);
 int snd_cs8427_iec958_build(snd_i2c_device_t *cs8427, snd_pcm_substream_t *playback_substream, snd_pcm_substream_t *capture_substream);
 int snd_cs8427_iec958_active(snd_i2c_device_t *cs8427, int active);
 int snd_cs8427_iec958_pcm(snd_i2c_device_t *cs8427, unsigned int rate);
diff -Nru a/include/sound/emu10k1.h b/include/sound/emu10k1.h
--- a/include/sound/emu10k1.h	2005-01-10 20:11:17 -08:00
+++ b/include/sound/emu10k1.h	2005-01-10 20:11:17 -08:00
@@ -31,6 +31,7 @@
 #include <sound/ac97_codec.h>
 #include <sound/util_mem.h>
 #include <sound/pcm-indirect.h>
+#include <sound/timer.h>
 #include <linux/interrupt.h>
 #include <asm/io.h>
 
@@ -828,6 +829,7 @@
 };
 
 typedef struct {
+	/* mono, left, right x 8 sends (4 on emu10k1) */
 	unsigned char send_routing[3][8];
 	unsigned char send_volume[3][8];
 	unsigned short attn[3];
@@ -838,10 +840,10 @@
 ((route[0] | (route[1] << 4) | (route[2] << 8) | (route[3] << 12)) << 16)
 
 #define snd_emu10k1_compose_audigy_fxrt1(route) \
-(((unsigned int)route[0] | ((unsigned int)route[1] << 8) | ((unsigned int)route[2] << 16) | ((unsigned int)route[3] << 12)) << 24)
+((unsigned int)route[0] | ((unsigned int)route[1] << 8) | ((unsigned int)route[2] << 16) | ((unsigned int)route[3] << 24))
 
 #define snd_emu10k1_compose_audigy_fxrt2(route) \
-(((unsigned int)route[4] | ((unsigned int)route[5] << 8) | ((unsigned int)route[6] << 16) | ((unsigned int)route[7] << 12)) << 24)
+((unsigned int)route[4] | ((unsigned int)route[5] << 8) | ((unsigned int)route[6] << 16) | ((unsigned int)route[7] << 24))
 
 typedef struct snd_emu10k1_memblk {
 	snd_util_memblk_t mem;
@@ -1000,6 +1002,8 @@
 	snd_pcm_substream_t *pcm_capture_mic_substream;
 	snd_pcm_substream_t *pcm_capture_efx_substream;
 
+	snd_timer_t *timer;
+
 	emu10k1_midi_t midi;
 	emu10k1_midi_t midi2; /* for audigy */
 
@@ -1019,6 +1023,7 @@
 int snd_emu10k1_pcm_efx(emu10k1_t * emu, int device, snd_pcm_t ** rpcm);
 int snd_emu10k1_fx8010_pcm(emu10k1_t * emu, int device, snd_pcm_t ** rpcm);
 int snd_emu10k1_mixer(emu10k1_t * emu);
+int snd_emu10k1_timer(emu10k1_t * emu, int device);
 int snd_emu10k1_fx8010_new(emu10k1_t *emu, int device, snd_hwdep_t ** rhwdep);
 
 irqreturn_t snd_emu10k1_interrupt(int irq, void *dev_id, struct pt_regs *regs);
@@ -1032,7 +1037,6 @@
 /* I/O functions */
 unsigned int snd_emu10k1_ptr_read(emu10k1_t * emu, unsigned int reg, unsigned int chn);
 void snd_emu10k1_ptr_write(emu10k1_t *emu, unsigned int reg, unsigned int chn, unsigned int data);
-void snd_emu10k1_efx_write(emu10k1_t *emu, unsigned int pc, unsigned int data);
 unsigned int snd_emu10k1_efx_read(emu10k1_t *emu, unsigned int pc);
 void snd_emu10k1_intr_enable(emu10k1_t *emu, unsigned int intrenb);
 void snd_emu10k1_intr_disable(emu10k1_t *emu, unsigned int intrenb);
@@ -1046,7 +1050,6 @@
 unsigned short snd_emu10k1_ac97_read(ac97_t *ac97, unsigned short reg);
 void snd_emu10k1_ac97_write(ac97_t *ac97, unsigned short reg, unsigned short data);
 unsigned int snd_emu10k1_rate_to_pitch(unsigned int rate);
-unsigned char snd_emu10k1_sum_vol_attn(unsigned int value);
 
 /* memory allocation */
 snd_util_memblk_t *snd_emu10k1_alloc_pages(emu10k1_t *emu, snd_pcm_substream_t *substream);
@@ -1334,7 +1337,7 @@
 	char name[128];
 
 	DECLARE_BITMAP(gpr_valid, 0x200); /* bitmask of valid initializers */
-	unsigned int gpr_map[0x200];	  /* initializers */
+	u_int32_t __user *gpr_map;	  /* initializers */
 
 	unsigned int gpr_add_control_count; /* count of GPR controls to add/replace */
 	emu10k1_fx8010_control_gpr_t __user *gpr_add_controls; /* GPR controls to add/replace */
@@ -1347,11 +1350,11 @@
 	emu10k1_fx8010_control_gpr_t __user *gpr_list_controls; /* listed GPR controls */
 
 	DECLARE_BITMAP(tram_valid, 0x100); /* bitmask of valid initializers */
-	unsigned int tram_data_map[0x100]; /* data initializers */
-	unsigned int tram_addr_map[0x100]; /* map initializers */
+	u_int32_t __user *tram_data_map;  /* data initializers */
+	u_int32_t __user *tram_addr_map;  /* map initializers */
 
 	DECLARE_BITMAP(code_valid, 1024); /* bitmask of valid instructions */
-	unsigned int code[1024][2];	  /* one instruction - 64 bits */
+	u_int32_t __user *code;		  /* one instruction - 64 bits */
 } emu10k1_fx8010_code_t;
 
 typedef struct {
diff -Nru a/include/sound/es1688.h b/include/sound/es1688.h
--- a/include/sound/es1688.h	2005-01-10 20:11:20 -08:00
+++ b/include/sound/es1688.h	2005-01-10 20:11:20 -08:00
@@ -108,9 +108,6 @@
  */
 
 void snd_es1688_mixer_write(es1688_t *chip, unsigned char reg, unsigned char data);
-unsigned char snd_es1688_mixer_read(es1688_t *chip, unsigned char reg);
-
-irqreturn_t snd_es1688_interrupt(int irq, void *dev_id, struct pt_regs *regs);
 
 int snd_es1688_create(snd_card_t * card,
 		      unsigned long port,
diff -Nru a/include/sound/gus.h b/include/sound/gus.h
--- a/include/sound/gus.h	2005-01-10 20:11:16 -08:00
+++ b/include/sound/gus.h	2005-01-10 20:11:16 -08:00
@@ -598,10 +598,6 @@
 
 /* gus_dma.c */
 
-void snd_gf1_dma_program(snd_gus_card_t * gus, unsigned int addr,
-			 unsigned long buf_addr, unsigned int count,
-			 unsigned int cmd);
-void snd_gf1_dma_ack(snd_gus_card_t * gus);
 int snd_gf1_dma_init(snd_gus_card_t * gus);
 int snd_gf1_dma_done(snd_gus_card_t * gus);
 int snd_gf1_dma_transfer_block(snd_gus_card_t * gus,
diff -Nru a/include/sound/info.h b/include/sound/info.h
--- a/include/sound/info.h	2005-01-10 20:11:21 -08:00
+++ b/include/sound/info.h	2005-01-10 20:11:21 -08:00
@@ -131,11 +131,6 @@
 int snd_info_register(snd_info_entry_t * entry);
 int snd_info_unregister(snd_info_entry_t * entry);
 
-struct proc_dir_entry *snd_create_proc_entry(const char *name, mode_t mode,
-					     struct proc_dir_entry *parent);
-void snd_remove_proc_entry(struct proc_dir_entry *parent,
-			   struct proc_dir_entry *de);
-
 /* for card drivers */
 int snd_card_proc_new(snd_card_t *card, const char *name, snd_info_entry_t **entryp);
 
@@ -170,10 +165,6 @@
 static inline int snd_info_card_free(snd_card_t * card) { return 0; }
 static inline int snd_info_register(snd_info_entry_t * entry) { return 0; }
 static inline int snd_info_unregister(snd_info_entry_t * entry) { return 0; }
-
-static inline struct proc_dir_entry *snd_create_proc_entry(const char *name, mode_t mode, struct proc_dir_entry *parent) { return NULL; }
-static inline void snd_remove_proc_entry(struct proc_dir_entry *parent,
-					 struct proc_dir_entry *de) { ; }
 
 #define snd_card_proc_new(card,name,entryp)  0 /* always success */
 #define snd_info_set_text_ops(entry,private_data,read_size,read) /*NOP*/
diff -Nru a/include/sound/pcm.h b/include/sound/pcm.h
--- a/include/sound/pcm.h	2005-01-10 20:11:19 -08:00
+++ b/include/sound/pcm.h	2005-01-10 20:11:19 -08:00
@@ -497,10 +497,6 @@
 int snd_pcm_kernel_playback_ioctl(snd_pcm_substream_t *substream, unsigned int cmd, void *arg);
 int snd_pcm_kernel_capture_ioctl(snd_pcm_substream_t *substream, unsigned int cmd, void *arg);
 int snd_pcm_kernel_ioctl(snd_pcm_substream_t *substream, unsigned int cmd, void *arg);
-int snd_pcm_open(struct inode *inode, struct file *file);
-int snd_pcm_release(struct inode *inode, struct file *file);
-unsigned int snd_pcm_playback_poll(struct file *file, poll_table * wait);
-unsigned int snd_pcm_capture_poll(struct file *file, poll_table * wait);
 int snd_pcm_open_substream(snd_pcm_t *pcm, int stream, snd_pcm_substream_t **rsubstream);
 void snd_pcm_release_substream(snd_pcm_substream_t *substream);
 void snd_pcm_vma_notify_data(void *client, void *data);
@@ -709,6 +705,80 @@
 	return runtime->buffer_size - snd_pcm_capture_avail(runtime);
 }
 
+/**
+ * snd_pcm_playback_ready - check whether the playback buffer is available
+ * @substream: the pcm substream instance
+ *
+ * Checks whether enough free space is available on the playback buffer.
+ *
+ * Returns non-zero if available, or zero if not.
+ */
+static inline int snd_pcm_playback_ready(snd_pcm_substream_t *substream)
+{
+	snd_pcm_runtime_t *runtime = substream->runtime;
+	return snd_pcm_playback_avail(runtime) >= runtime->control->avail_min;
+}
+
+/**
+ * snd_pcm_capture_ready - check whether the capture buffer is available
+ * @substream: the pcm substream instance
+ *
+ * Checks whether enough capture data is available on the capture buffer.
+ *
+ * Returns non-zero if available, or zero if not.
+ */
+static inline int snd_pcm_capture_ready(snd_pcm_substream_t *substream)
+{
+	snd_pcm_runtime_t *runtime = substream->runtime;
+	return snd_pcm_capture_avail(runtime) >= runtime->control->avail_min;
+}
+
+/**
+ * snd_pcm_playback_data - check whether any data exists on the playback buffer
+ * @substream: the pcm substream instance
+ *
+ * Checks whether any data exists on the playback buffer. If stop_threshold
+ * is bigger or equal to boundary, then this function returns always non-zero.
+ *
+ * Returns non-zero if exists, or zero if not.
+ */
+static inline int snd_pcm_playback_data(snd_pcm_substream_t *substream)
+{
+	snd_pcm_runtime_t *runtime = substream->runtime;
+	
+	if (runtime->stop_threshold >= runtime->boundary)
+		return 1;
+	return snd_pcm_playback_avail(runtime) < runtime->buffer_size;
+}
+
+/**
+ * snd_pcm_playback_empty - check whether the playback buffer is empty
+ * @substream: the pcm substream instance
+ *
+ * Checks whether the playback buffer is empty.
+ *
+ * Returns non-zero if empty, or zero if not.
+ */
+static inline int snd_pcm_playback_empty(snd_pcm_substream_t *substream)
+{
+	snd_pcm_runtime_t *runtime = substream->runtime;
+	return snd_pcm_playback_avail(runtime) >= runtime->buffer_size;
+}
+
+/**
+ * snd_pcm_capture_empty - check whether the capture buffer is empty
+ * @substream: the pcm substream instance
+ *
+ * Checks whether the capture buffer is empty.
+ *
+ * Returns non-zero if empty, or zero if not.
+ */
+static inline int snd_pcm_capture_empty(snd_pcm_substream_t *substream)
+{
+	snd_pcm_runtime_t *runtime = substream->runtime;
+	return snd_pcm_capture_avail(runtime) == 0;
+}
+
 static inline void snd_pcm_trigger_done(snd_pcm_substream_t *substream, 
 					snd_pcm_substream_t *master)
 {
@@ -772,13 +842,9 @@
 void snd_interval_mulkdiv(const snd_interval_t *a, unsigned int k,
 			  const snd_interval_t *b, snd_interval_t *c);
 int snd_interval_list(snd_interval_t *i, unsigned int count, unsigned int *list, unsigned int mask);
-int snd_interval_step(snd_interval_t *i, unsigned int min, unsigned int step);
 int snd_interval_ratnum(snd_interval_t *i,
 			unsigned int rats_count, ratnum_t *rats,
 			unsigned int *nump, unsigned int *denp);
-int snd_interval_ratden(snd_interval_t *i,
-			unsigned int rats_count, ratden_t *rats,
-			unsigned int *nump, unsigned int *denp);
 
 void _snd_pcm_hw_params_any(snd_pcm_hw_params_t *params);
 void _snd_pcm_hw_param_setempty(snd_pcm_hw_params_t *params, snd_pcm_hw_param_t var);
@@ -810,6 +876,7 @@
 int snd_pcm_hw_params_choose(snd_pcm_substream_t *substream, snd_pcm_hw_params_t *params);
 
 int snd_pcm_hw_refine(snd_pcm_substream_t *substream, snd_pcm_hw_params_t *params);
+int snd_pcm_hw_params(snd_pcm_substream_t *substream, snd_pcm_hw_params_t *params);
 
 int snd_pcm_hw_constraints_init(snd_pcm_substream_t *substream);
 int snd_pcm_hw_constraints_complete(snd_pcm_substream_t *substream);
@@ -860,9 +927,7 @@
 const unsigned char *snd_pcm_format_silence_64(snd_pcm_format_t format);
 int snd_pcm_format_set_silence(snd_pcm_format_t format, void *buf, unsigned int frames);
 snd_pcm_format_t snd_pcm_build_linear_format(int width, int unsignd, int big_endian);
-ssize_t snd_pcm_format_size(snd_pcm_format_t format, size_t samples);
 const char *snd_pcm_format_name(snd_pcm_format_t format);
-const char *snd_pcm_subformat_name(snd_pcm_subformat_t subformat);
 
 void snd_pcm_set_ops(snd_pcm_t * pcm, int direction, snd_pcm_ops_t *ops);
 void snd_pcm_set_sync(snd_pcm_substream_t * substream);
@@ -875,13 +940,6 @@
 int snd_pcm_playback_xrun_asap(snd_pcm_substream_t *substream);
 int snd_pcm_capture_xrun_asap(snd_pcm_substream_t *substream);
 void snd_pcm_playback_silence(snd_pcm_substream_t *substream, snd_pcm_uframes_t new_hw_ptr);
-int snd_pcm_playback_ready(snd_pcm_substream_t *substream);
-int snd_pcm_capture_ready(snd_pcm_substream_t *substream);
-long snd_pcm_playback_ready_jiffies(snd_pcm_substream_t *substream);
-long snd_pcm_capture_ready_jiffies(snd_pcm_substream_t *substream);
-int snd_pcm_playback_data(snd_pcm_substream_t *substream);
-int snd_pcm_playback_empty(snd_pcm_substream_t *substream);
-int snd_pcm_capture_empty(snd_pcm_substream_t *substream);
 void snd_pcm_tick_prepare(snd_pcm_substream_t *substream);
 void snd_pcm_tick_set(snd_pcm_substream_t *substream, unsigned long ticks);
 void snd_pcm_tick_elapsed(snd_pcm_substream_t *substream);
diff -Nru a/include/sound/rawmidi.h b/include/sound/rawmidi.h
--- a/include/sound/rawmidi.h	2005-01-10 20:11:21 -08:00
+++ b/include/sound/rawmidi.h	2005-01-10 20:11:21 -08:00
@@ -152,13 +152,6 @@
 		    snd_rawmidi_t ** rmidi);
 void snd_rawmidi_set_ops(snd_rawmidi_t * rmidi, int stream, snd_rawmidi_ops_t * ops);
 
-/* control functions */
-
-int snd_rawmidi_control_ioctl(snd_card_t * card,
-			      snd_ctl_file_t * control,
-			      unsigned int cmd,
-			      unsigned long arg);
-
 /* callbacks */
 
 void snd_rawmidi_receive_reset(snd_rawmidi_substream_t * substream);
diff -Nru a/include/sound/sb.h b/include/sound/sb.h
--- a/include/sound/sb.h	2005-01-10 20:11:18 -08:00
+++ b/include/sound/sb.h	2005-01-10 20:11:18 -08:00
@@ -311,10 +311,6 @@
 int snd_sb16dsp_configure(sb_t *chip);
 /* sb16.c */
 irqreturn_t snd_sb16dsp_interrupt(int irq, void *dev_id, struct pt_regs *regs);
-int snd_sb16_playback_open(snd_pcm_substream_t *substream);
-int snd_sb16_capture_open(snd_pcm_substream_t *substream);
-int snd_sb16_playback_close(snd_pcm_substream_t *substream);
-int snd_sb16_capture_close(snd_pcm_substream_t *substream);
 
 /* exported mixer stuffs */
 enum {
diff -Nru a/include/sound/seq_midi_emul.h b/include/sound/seq_midi_emul.h
--- a/include/sound/seq_midi_emul.h	2005-01-10 20:11:21 -08:00
+++ b/include/sound/seq_midi_emul.h	2005-01-10 20:11:21 -08:00
@@ -189,8 +189,6 @@
 void snd_midi_process_event(snd_midi_op_t *ops, snd_seq_event_t *ev,
 			    snd_midi_channel_set_t *chanset);
 void snd_midi_channel_set_clear(snd_midi_channel_set_t *chset);
-void snd_midi_channel_init(snd_midi_channel_t *p, int n);
-snd_midi_channel_t *snd_midi_channel_init_set(int n);
 snd_midi_channel_set_t *snd_midi_channel_alloc_set(int n);
 void snd_midi_channel_free_set(snd_midi_channel_set_t *chset);
 
diff -Nru a/include/sound/snd_wavefront.h b/include/sound/snd_wavefront.h
--- a/include/sound/snd_wavefront.h	2005-01-10 20:11:16 -08:00
+++ b/include/sound/snd_wavefront.h	2005-01-10 20:11:16 -08:00
@@ -107,7 +107,6 @@
 };
 
 extern void snd_wavefront_internal_interrupt (snd_wavefront_card_t *card);
-extern int  snd_wavefront_interrupt_bits (int irq);
 extern int  snd_wavefront_detect_irq (snd_wavefront_t *dev) ;
 extern int  snd_wavefront_check_irq (snd_wavefront_t *dev, int irq);
 extern int  snd_wavefront_restart (snd_wavefront_t *dev);
diff -Nru a/include/sound/soundfont.h b/include/sound/soundfont.h
--- a/include/sound/soundfont.h	2005-01-10 20:11:23 -08:00
+++ b/include/sound/soundfont.h	2005-01-10 20:11:23 -08:00
@@ -112,7 +112,6 @@
 
 int snd_soundfont_remove_samples(snd_sf_list_t *sflist);
 int snd_soundfont_remove_unlocked(snd_sf_list_t *sflist);
-int snd_soundfont_mem_used(snd_sf_list_t *sflist);
 
 int snd_soundfont_search_zone(snd_sf_list_t *sflist, int *notep, int vel,
 			      int preset, int bank,
diff -Nru a/include/sound/soundmem.h b/include/sound/soundmem.h
--- a/include/sound/soundmem.h	2005-01-10 20:11:15 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,8 +0,0 @@
-/*
- *  Onboard memory management
- */
-
-struct SNDRV_STRU_BANK_INFO {
-	unsigned int address;
-	unsigned int size;
-};
diff -Nru a/include/sound/trident.h b/include/sound/trident.h
--- a/include/sound/trident.h	2005-01-10 20:11:19 -08:00
+++ b/include/sound/trident.h	2005-01-10 20:11:19 -08:00
@@ -457,27 +457,23 @@
 		       int pcm_spdif_device,
 		       int max_wavetable_size,
 		       trident_t ** rtrident);
-int snd_trident_free(trident_t *trident);
 void snd_trident_gameport(trident_t *trident);
 
 int snd_trident_pcm(trident_t * trident, int device, snd_pcm_t **rpcm);
 int snd_trident_foldback_pcm(trident_t * trident, int device, snd_pcm_t **rpcm);
 int snd_trident_spdif_pcm(trident_t * trident, int device, snd_pcm_t **rpcm);
 int snd_trident_attach_synthesizer(trident_t * trident);
-int snd_trident_detach_synthesizer(trident_t * trident);
 snd_trident_voice_t *snd_trident_alloc_voice(trident_t * trident, int type, int client, int port);
 void snd_trident_free_voice(trident_t * trident, snd_trident_voice_t *voice);
 void snd_trident_start_voice(trident_t * trident, unsigned int voice);
 void snd_trident_stop_voice(trident_t * trident, unsigned int voice);
 void snd_trident_write_voice_regs(trident_t * trident, snd_trident_voice_t *voice);
-void snd_trident_clear_voices(trident_t * trident, unsigned short v_min, unsigned short v_max);
 
 /* TLB memory allocation */
 snd_util_memblk_t *snd_trident_alloc_pages(trident_t *trident, snd_pcm_substream_t *substream);
 int snd_trident_free_pages(trident_t *trident, snd_util_memblk_t *blk);
 snd_util_memblk_t *snd_trident_synth_alloc(trident_t *trident, unsigned int size);
 int snd_trident_synth_free(trident_t *trident, snd_util_memblk_t *blk);
-int snd_trident_synth_bzero(trident_t *trident, snd_util_memblk_t *blk, int offset, int size);
 int snd_trident_synth_copy_from_user(trident_t *trident, snd_util_memblk_t *blk, int offset, const char __user *data, int size);
 
 #endif /* __SOUND_TRIDENT_H */
diff -Nru a/include/sound/version.h b/include/sound/version.h
--- a/include/sound/version.h	2005-01-10 20:11:24 -08:00
+++ b/include/sound/version.h	2005-01-10 20:11:24 -08:00
@@ -1,3 +1,3 @@
 /* include/version.h.  Generated by configure.  */
-#define CONFIG_SND_VERSION "1.0.6"
-#define CONFIG_SND_DATE " (Sun Aug 15 07:17:53 2004 UTC)"
+#define CONFIG_SND_VERSION "1.0.8rc2"
+#define CONFIG_SND_DATE " (Wed Jan 05 06:44:40 2005 UTC)"
diff -Nru a/include/sound/vx_core.h b/include/sound/vx_core.h
--- a/include/sound/vx_core.h	2005-01-10 20:11:16 -08:00
+++ b/include/sound/vx_core.h	2005-01-10 20:11:16 -08:00
@@ -27,6 +27,15 @@
 #include <sound/hwdep.h>
 #include <linux/interrupt.h>
 
+#if defined(CONFIG_FW_LOADER) || defined(CONFIG_FW_LOADER_MODULE)
+#if !defined(CONFIG_USE_VXLOADER) && !defined(CONFIG_SND_VX_LIB) /* built-in kernel */
+#define SND_VX_FW_LOADER	/* use the standard firmware loader */
+#endif
+#endif
+
+struct firmware;
+struct device;
+
 typedef struct snd_vx_core vx_core_t;
 typedef struct vx_pipe vx_pipe_t;
 
@@ -100,7 +109,7 @@
 	void (*change_audio_source)(vx_core_t *chip, int src);
 	void (*set_clock_source)(vx_core_t *chp, int src);
 	/* chip init */
-	int (*load_dsp)(vx_core_t *chip, const snd_hwdep_dsp_image_t *dsp);
+	int (*load_dsp)(vx_core_t *chip, int idx, const struct firmware *fw);
 	void (*reset_dsp)(vx_core_t *chip);
 	void (*reset_board)(vx_core_t *chip, int cold_reset);
 	int (*add_controls)(vx_core_t *chip);
@@ -169,6 +178,7 @@
 	unsigned int chip_status;
 	unsigned int pcm_running;
 
+	struct device *dev;
 	snd_hwdep_t *hwdep;
 
 	struct vx_rmh irq_rmh;	/* RMH used in interrupts */
@@ -198,6 +208,8 @@
 	unsigned char audio_monitor_active[4];	/* playback hw-monitor mute/unmute */
 
 	struct semaphore mixer_mutex;
+
+	const struct firmware *firmware[4]; /* loaded firmware data */
 };
 
 
@@ -206,10 +218,12 @@
  */
 vx_core_t *snd_vx_create(snd_card_t *card, struct snd_vx_hardware *hw,
 			 struct snd_vx_ops *ops, int extra_size);
-int snd_vx_hwdep_new(vx_core_t *chip);
-int snd_vx_load_boot_image(vx_core_t *chip, const snd_hwdep_dsp_image_t *boot);
-int snd_vx_dsp_boot(vx_core_t *chip, const snd_hwdep_dsp_image_t *boot);
-int snd_vx_dsp_load(vx_core_t *chip, const snd_hwdep_dsp_image_t *dsp);
+int snd_vx_setup_firmware(vx_core_t *chip);
+int snd_vx_load_boot_image(vx_core_t *chip, const struct firmware *dsp);
+int snd_vx_dsp_boot(vx_core_t *chip, const struct firmware *dsp);
+int snd_vx_dsp_load(vx_core_t *chip, const struct firmware *dsp);
+
+void snd_vx_free_firmware(vx_core_t *chip);
 
 /*
  * interrupt handler; exported for pcmcia
@@ -217,15 +231,6 @@
 irqreturn_t snd_vx_irq_handler(int irq, void *dev, struct pt_regs *regs);
 
 /*
- * power-management routines
- */
-#ifdef CONFIG_PM
-void snd_vx_suspend(vx_core_t *chip);
-void snd_vx_resume(vx_core_t *chip);
-#endif
-
-
-/*
  * lowlevel functions
  */
 inline static int vx_test_and_ack(vx_core_t *chip)
@@ -340,7 +345,6 @@
  */
 void vx_set_iec958_status(vx_core_t *chip, unsigned int bits);
 int vx_set_clock(vx_core_t *chip, unsigned int freq);
-void vx_change_clock_source(vx_core_t *chip, int source);
 void vx_set_internal_clock(vx_core_t *chip, unsigned int freq);
 int vx_change_frequency(vx_core_t *chip);
 
diff -Nru a/include/sound/ymfpci.h b/include/sound/ymfpci.h
--- a/include/sound/ymfpci.h	2005-01-10 20:11:18 -08:00
+++ b/include/sound/ymfpci.h	2005-01-10 20:11:18 -08:00
@@ -389,9 +389,6 @@
 int snd_ymfpci_mixer(ymfpci_t *chip, int rear_switch);
 int snd_ymfpci_timer(ymfpci_t *chip, int device);
 
-int snd_ymfpci_voice_alloc(ymfpci_t *chip, ymfpci_voice_type_t type, int pair, ymfpci_voice_t **rvoice);
-int snd_ymfpci_voice_free(ymfpci_t *chip, ymfpci_voice_t *pvoice);
-
 #if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE))
 #define SUPPORT_JOYSTICK
 #endif
diff -Nru a/include/video/permedia2.h b/include/video/permedia2.h
--- a/include/video/permedia2.h	2005-01-10 20:11:22 -08:00
+++ b/include/video/permedia2.h	2005-01-10 20:11:22 -08:00
@@ -188,6 +188,14 @@
 #define PM2F_VSYNC_ACT_LOW				0x60
 #define PM2F_LINE_DOUBLE				0x04
 #define PM2F_VIDEO_ENABLE				0x01
+#define PM2F_RD_PIXELFORMAT_SVGA			0x01
+#define PM2F_RD_PIXELFORMAT_RGB232OFFSET		0x02
+#define PM2F_RD_PIXELFORMAT_RGBA2321			0x03
+#define PM2F_RD_PIXELFORMAT_RGBA5551			0x04
+#define PM2F_RD_PIXELFORMAT_RGBA4444			0x05
+#define PM2F_RD_PIXELFORMAT_RGB565			0x06
+#define PM2F_RD_PIXELFORMAT_RGBA8888			0x08
+#define PM2F_RD_PIXELFORMAT_RGB888			0x09
 #define PM2F_RD_GUI_ACTIVE				0x10
 #define PM2F_RD_COLOR_MODE_RGB				0x20
 #define PM2F_DELTA_ORDER_RGB				(1L<<18)
@@ -209,6 +217,9 @@
 #define PM2F_MEM_BANKS_2				(1L<<29)
 #define PM2F_MEM_BANKS_3				(2L<<29)
 #define PM2F_MEM_BANKS_4				(3L<<29)
+#define PM2F_APERTURE_STANDARD				0
+#define PM2F_APERTURE_BYTESWAP				1
+#define PM2F_APERTURE_HALFWORDSWAP			2
 
 typedef enum {
 	PM2_TYPE_PERMEDIA2,
diff -Nru a/init/Kconfig b/init/Kconfig
--- a/init/Kconfig	2005-01-10 20:11:21 -08:00
+++ b/init/Kconfig	2005-01-10 20:11:21 -08:00
@@ -195,20 +195,9 @@
 	bool "Support for hot-pluggable devices" if !ARCH_S390
 	default ARCH_S390
 	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.
+	  This option is provided for the case where no in-kernel-tree
+	  modules require HOTPLUG functionality, but a module built
+	  outside the kernel tree does. Such modules require Y here.
 
 config KOBJECT_UEVENT
 	bool "Kernel Userspace Events"
@@ -316,8 +305,9 @@
 	  If unsure, say N.
 
 config SHMEM
+	bool "Use full shmem filesystem" if EMBEDDED
 	default y
-	bool "Use full shmem filesystem" if EMBEDDED && MMU
+	depends on MMU
 	help
 	  The shmem is an internal filesystem used to manage shared memory.
 	  It is backed by swap and manages resource limits. It is also exported
diff -Nru a/init/Makefile b/init/Makefile
--- a/init/Makefile	2005-01-10 20:11:18 -08:00
+++ b/init/Makefile	2005-01-10 20:11:18 -08:00
@@ -3,6 +3,8 @@
 #
 
 obj-y				:= main.o version.o mounts.o initramfs.o
+obj-$(CONFIG_GENERIC_CALIBRATE_DELAY) += calibrate.o
+
 mounts-y			:= do_mounts.o
 mounts-$(CONFIG_DEVFS_FS)	+= do_mounts_devfs.o
 mounts-$(CONFIG_BLK_DEV_RAM)	+= do_mounts_rd.o
diff -Nru a/init/calibrate.c b/init/calibrate.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/init/calibrate.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,79 @@
+/* calibrate.c: default delay calibration
+ *
+ * Excised from init/main.c
+ *  Copyright (C) 1991, 1992  Linus Torvalds
+ */
+
+#include <linux/sched.h>
+#include <linux/delay.h>
+#include <linux/init.h>
+
+static unsigned long preset_lpj;
+static int __init lpj_setup(char *str)
+{
+	preset_lpj = simple_strtoul(str,NULL,0);
+	return 1;
+}
+
+__setup("lpj=", lpj_setup);
+
+/*
+ * This is the number of bits of precision for the loops_per_jiffy.  Each
+ * bit takes on average 1.5/HZ seconds.  This (like the original) is a little
+ * better than 1%
+ */
+#define LPS_PREC 8
+
+void __devinit calibrate_delay(void)
+{
+	unsigned long ticks, loopbit;
+	int lps_precision = LPS_PREC;
+
+	if (preset_lpj) {
+		loops_per_jiffy = preset_lpj;
+		printk("Calibrating delay loop (skipped)... "
+			"%lu.%02lu BogoMIPS preset\n",
+			loops_per_jiffy/(500000/HZ),
+			(loops_per_jiffy/(5000/HZ)) % 100);
+	} else {
+		loops_per_jiffy = (1<<12);
+
+		printk(KERN_DEBUG "Calibrating delay loop... ");
+		while ((loops_per_jiffy <<= 1) != 0) {
+			/* wait for "start of" clock tick */
+			ticks = jiffies;
+			while (ticks == jiffies)
+				/* nothing */;
+			/* Go .. */
+			ticks = jiffies;
+			__delay(loops_per_jiffy);
+			ticks = jiffies - ticks;
+			if (ticks)
+				break;
+		}
+
+		/*
+		 * Do a binary approximation to get loops_per_jiffy set to
+		 * equal one clock (up to lps_precision bits)
+		 */
+		loops_per_jiffy >>= 1;
+		loopbit = loops_per_jiffy;
+		while (lps_precision-- && (loopbit >>= 1)) {
+			loops_per_jiffy |= loopbit;
+			ticks = jiffies;
+			while (ticks == jiffies)
+				/* nothing */;
+			ticks = jiffies;
+			__delay(loops_per_jiffy);
+			if (jiffies != ticks)	/* longer than 1 tick */
+				loops_per_jiffy &= ~loopbit;
+		}
+
+		/* Round the value and print it */
+		printk("%lu.%02lu BogoMIPS (lpj=%lu)\n",
+			loops_per_jiffy/(500000/HZ),
+			(loops_per_jiffy/(5000/HZ)) % 100,
+			loops_per_jiffy);
+	}
+
+}
diff -Nru a/init/initramfs.c b/init/initramfs.c
--- a/init/initramfs.c	2005-01-10 20:11:16 -08:00
+++ b/init/initramfs.c	2005-01-10 20:11:16 -08:00
@@ -241,10 +241,9 @@
 static int __init do_name(void)
 {
 	state = SkipIt;
-	next_state = Start;
+	next_state = Reset;
 	if (strcmp(collected, "TRAILER!!!") == 0) {
 		free_hash();
-		next_state = Reset;
 		return 0;
 	}
 	if (dry_run)
@@ -295,7 +294,7 @@
 	sys_symlink(collected + N_ALIGN(name_len), collected);
 	sys_lchown(collected, uid, gid);
 	state = SkipIt;
-	next_state = Start;
+	next_state = Reset;
 	return 0;
 }
 
@@ -331,6 +330,10 @@
 			buf += written;
 			len -= written;
 			state = Start;
+		} else if (c == 0) {
+			buf += written;
+			len -= written;
+			state = Reset;
 		} else
 			error("junk in compressed archive");
 	}
@@ -410,7 +413,7 @@
 	outcnt = 0;
 }
 
-char * __init unpack_to_rootfs(char *buf, unsigned len, int check_only)
+static char * __init unpack_to_rootfs(char *buf, unsigned len, int check_only)
 {
 	int written;
 	dry_run = check_only;
@@ -460,15 +463,15 @@
 	return message;
 }
 
-extern char __initramfs_start, __initramfs_end;
+extern char __initramfs_start[], __initramfs_end[];
 #ifdef CONFIG_BLK_DEV_INITRD
 #include <linux/initrd.h>
 #endif
 
 void __init populate_rootfs(void)
 {
-	char *err = unpack_to_rootfs(&__initramfs_start,
-			 &__initramfs_end - &__initramfs_start, 0);
+	char *err = unpack_to_rootfs(__initramfs_start,
+			 __initramfs_end - __initramfs_start, 0);
 	if (err)
 		panic(err);
 #ifdef CONFIG_BLK_DEV_INITRD
diff -Nru a/init/main.c b/init/main.c
--- a/init/main.c	2005-01-10 20:11:16 -08:00
+++ b/init/main.c	2005-01-10 20:11:16 -08:00
@@ -75,8 +75,6 @@
 #error Sorry, your GCC is too old. It builds incorrect kernels.
 #endif
 
-extern char *linux_banner;
-
 static int init(void *);
 
 extern void init_IRQ(void);
@@ -157,12 +155,13 @@
 char * envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, };
 static const char *panic_later, *panic_param;
 
+extern struct obs_kernel_param __setup_start[], __setup_end[];
+
 static int __init obsolete_checksetup(char *line)
 {
 	struct obs_kernel_param *p;
-	extern struct obs_kernel_param __setup_start, __setup_end;
 
-	p = &__setup_start;
+	p = __setup_start;
 	do {
 		int n = strlen(p->str);
 		if (!strncmp(line, p->str, n)) {
@@ -179,19 +178,10 @@
 				return 1;
 		}
 		p++;
-	} while (p < &__setup_end);
+	} while (p < __setup_end);
 	return 0;
 }
 
-static unsigned long preset_lpj;
-static int __init lpj_setup(char *str)
-{
-	preset_lpj = simple_strtoul(str,NULL,0);
-	return 1;
-}
-
-__setup("lpj=", lpj_setup);
-
 /*
  * This should be approx 2 Bo*oMips to start (note initial shift), and will
  * still work even if initially too large, it will just take slightly longer
@@ -200,67 +190,6 @@
 
 EXPORT_SYMBOL(loops_per_jiffy);
 
-/*
- * This is the number of bits of precision for the loops_per_jiffy.  Each
- * bit takes on average 1.5/HZ seconds.  This (like the original) is a little
- * better than 1%
- */
-#define LPS_PREC 8
-
-void __devinit calibrate_delay(void)
-{
-	unsigned long ticks, loopbit;
-	int lps_precision = LPS_PREC;
-
-	if (preset_lpj) {
-		loops_per_jiffy = preset_lpj;
-		printk("Calibrating delay loop (skipped)... "
-			"%lu.%02lu BogoMIPS preset\n",
-			loops_per_jiffy/(500000/HZ),
-			(loops_per_jiffy/(5000/HZ)) % 100);
-	} else {
-		loops_per_jiffy = (1<<12);
-
-		printk(KERN_DEBUG "Calibrating delay loop... ");
-		while ((loops_per_jiffy <<= 1) != 0) {
-			/* wait for "start of" clock tick */
-			ticks = jiffies;
-			while (ticks == jiffies)
-				/* nothing */;
-			/* Go .. */
-			ticks = jiffies;
-			__delay(loops_per_jiffy);
-			ticks = jiffies - ticks;
-			if (ticks)
-				break;
-		}
-
-		/*
-		 * Do a binary approximation to get loops_per_jiffy set to
-		 * equal one clock (up to lps_precision bits)
-		 */
-		loops_per_jiffy >>= 1;
-		loopbit = loops_per_jiffy;
-		while (lps_precision-- && (loopbit >>= 1)) {
-			loops_per_jiffy |= loopbit;
-			ticks = jiffies;
-			while (ticks == jiffies)
-				/* nothing */;
-			ticks = jiffies;
-			__delay(loops_per_jiffy);
-			if (jiffies != ticks)	/* longer than 1 tick */
-				loops_per_jiffy &= ~loopbit;
-		}
-
-		/* Round the value and print it */
-		printk("%lu.%02lu BogoMIPS (lpj=%lu)\n",
-			loops_per_jiffy/(500000/HZ),
-			(loops_per_jiffy/(5000/HZ)) % 100,
-			loops_per_jiffy);
-	}
-
-}
-
 static int __init debug_kernel(char *str)
 {
 	if (*str)
@@ -359,7 +288,6 @@
 __setup("init=", init_setup);
 
 extern void setup_arch(char **);
-extern void cpu_idle(void);
 
 #ifndef CONFIG_SMP
 
@@ -445,6 +373,12 @@
 {
 	kernel_thread(init, NULL, CLONE_FS | CLONE_SIGHAND);
 	numa_default_policy();
+	/*
+	 * Re-enable preemption but disable interrupts to make sure
+	 * we dont get preempted until we schedule() in cpu_idle().
+	 */
+	local_irq_disable();
+	preempt_enable_no_resched();
 	unlock_kernel();
  	cpu_idle();
 } 
@@ -453,9 +387,8 @@
 static int __init do_early_param(char *param, char *val)
 {
 	struct obs_kernel_param *p;
-	extern struct obs_kernel_param __setup_start, __setup_end;
 
-	for (p = &__setup_start; p < &__setup_end; p++) {
+	for (p = __setup_start; p < __setup_end; p++) {
 		if (p->early && strcmp(param, p->str) == 0) {
 			if (p->setup_func(val) != 0)
 				printk(KERN_WARNING
@@ -511,6 +444,11 @@
 	 * time - but meanwhile we still have a functioning scheduler.
 	 */
 	sched_init();
+	/*
+	 * Disable preemption - early bootup scheduling is extremely
+	 * fragile until we cpu_idle() for the first time.
+	 */
+	preempt_disable();
 	build_all_zonelists();
 	page_alloc_init();
 	printk("Kernel command line: %s\n", saved_command_line);
@@ -592,14 +530,14 @@
 
 struct task_struct *child_reaper = &init_task;
 
-extern initcall_t __initcall_start, __initcall_end;
+extern initcall_t __initcall_start[], __initcall_end[];
 
 static void __init do_initcalls(void)
 {
 	initcall_t *call;
 	int count = preempt_count();
 
-	for (call = &__initcall_start; call < &__initcall_end; call++) {
+	for (call = __initcall_start; call < __initcall_end; call++) {
 		char *msg;
 
 		if (initcall_debug) {
@@ -761,16 +699,3 @@
 
 	panic("No init found.  Try passing init= option to kernel.");
 }
-
-static int early_param_test(char *rest)
-{
-	printk("early_parm_test: %s\n", rest ?: "(null)");
-	return rest ? 0 : -EINVAL;
-}
-early_param("testsetup", early_param_test);
-static int early_setup_test(char *rest)
-{
-	printk("early_setup_test: %s\n", rest ?: "(null)");
-	return 0;
-}
-__setup("testsetup_long", early_setup_test);
diff -Nru a/init/version.c b/init/version.c
--- a/init/version.c	2005-01-10 20:11:19 -08:00
+++ b/init/version.c	2005-01-10 20:11:19 -08:00
@@ -28,6 +28,6 @@
 
 EXPORT_SYMBOL(system_utsname);
 
-const char *linux_banner = 
+const char linux_banner[] =
 	"Linux version " UTS_RELEASE " (" LINUX_COMPILE_BY "@"
 	LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION "\n";
diff -Nru a/ipc/sem.c b/ipc/sem.c
--- a/ipc/sem.c	2005-01-10 20:11:18 -08:00
+++ b/ipc/sem.c	2005-01-10 20:11:18 -08:00
@@ -358,8 +358,22 @@
 		if (error <= 0) {
 			struct sem_queue *n;
 			remove_from_queue(sma,q);
-			n = q->next;
 			q->status = IN_WAKEUP;
+			/*
+			 * Continue scanning. The next operation
+			 * that must be checked depends on the type of the
+			 * completed operation:
+			 * - if the operation modified the array, then
+			 *   restart from the head of the queue and
+			 *   check for threads that might be waiting
+			 *   for semaphore values to become 0.
+			 * - if the operation didn't modify the array,
+			 *   then just continue.
+			 */
+			if (q->alter)
+				n = sma->sem_pending;
+			else
+				n = q->next;
 			wake_up_process(q->sleeper);
 			/* hands-off: q will disappear immediately after
 			 * writing q->status.
@@ -1119,8 +1133,11 @@
 		goto out_unlock_free;
 
 	error = try_atomic_semop (sma, sops, nsops, un, current->tgid);
-	if (error <= 0)
-		goto update;
+	if (error <= 0) {
+		if (alter && error == 0)
+			update_queue (sma);
+		goto out_unlock_free;
+	}
 
 	/* We need to sleep on this operation, so we put the current
 	 * task into the pending queue and go to sleep.
@@ -1132,6 +1149,7 @@
 	queue.undo = un;
 	queue.pid = current->tgid;
 	queue.id = semid;
+	queue.alter = alter;
 	if (alter)
 		append_to_queue(sma ,&queue);
 	else
@@ -1183,9 +1201,6 @@
 	remove_from_queue(sma,&queue);
 	goto out_unlock_free;
 
-update:
-	if (alter)
-		update_queue (sma);
 out_unlock_free:
 	sem_unlock(sma);
 out_free:
diff -Nru a/kernel/acct.c b/kernel/acct.c
--- a/kernel/acct.c	2005-01-10 20:11:19 -08:00
+++ b/kernel/acct.c	2005-01-10 20:11:19 -08:00
@@ -528,3 +528,34 @@
 	do_acct_process(exitcode, file);
 	fput(file);
 }
+
+
+/*
+ * acct_update_integrals
+ *    -  update mm integral fields in task_struct
+ */
+void acct_update_integrals(void)
+{
+	struct task_struct *tsk = current;
+
+	if (likely(tsk->mm)) {
+		long delta = tsk->stime - tsk->acct_stimexpd;
+
+		tsk->acct_stimexpd = tsk->stime;
+		tsk->acct_rss_mem1 += delta * tsk->mm->rss;
+		tsk->acct_vm_mem1 += delta * tsk->mm->total_vm;
+	}
+}
+
+/*
+ * acct_clear_integrals
+ *    - clear the mm integral fields in task_struct
+ */
+void acct_clear_integrals(struct task_struct *tsk)
+{
+	if (tsk) {
+		tsk->acct_stimexpd = 0;
+		tsk->acct_rss_mem1 = 0;
+		tsk->acct_vm_mem1 = 0;
+	}
+}
diff -Nru a/kernel/audit.c b/kernel/audit.c
--- a/kernel/audit.c	2005-01-10 20:11:23 -08:00
+++ b/kernel/audit.c	2005-01-10 20:11:23 -08:00
@@ -98,8 +98,8 @@
  * The second list is a list of pre-allocated audit buffers (if more
  * than AUDIT_MAXFREE are in use, the audit buffer is freed instead of
  * being placed on the freelist). */
-static spinlock_t  audit_txlist_lock = SPIN_LOCK_UNLOCKED;
-static spinlock_t  audit_freelist_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(audit_txlist_lock);
+static DEFINE_SPINLOCK(audit_freelist_lock);
 static int	   audit_freelist_count = 0;
 static LIST_HEAD(audit_txlist);
 static LIST_HEAD(audit_freelist);
@@ -169,7 +169,7 @@
 {
 	static unsigned long	last_check = 0;
 	static int		messages   = 0;
-	static spinlock_t	lock	   = SPIN_LOCK_UNLOCKED;
+	static DEFINE_SPINLOCK(lock);
 	unsigned long		flags;
 	unsigned long		now;
 	unsigned long		elapsed;
@@ -199,7 +199,7 @@
 void audit_log_lost(const char *message)
 {
 	static unsigned long	last_msg = 0;
-	static spinlock_t	lock     = SPIN_LOCK_UNLOCKED;
+	static DEFINE_SPINLOCK(lock);
 	unsigned long		flags;
 	unsigned long		now;
 	int			print;
diff -Nru a/kernel/capability.c b/kernel/capability.c
--- a/kernel/capability.c	2005-01-10 20:11:20 -08:00
+++ b/kernel/capability.c	2005-01-10 20:11:20 -08:00
@@ -23,7 +23,7 @@
  * This global lock protects task->cap_* for all tasks including current.
  * Locking rule: acquire this prior to tasklist_lock.
  */
-spinlock_t task_capability_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(task_capability_lock);
 
 /*
  * For sys_getproccap() and sys_setproccap(), any of the three
@@ -85,34 +85,60 @@
  * cap_set_pg - set capabilities for all processes in a given process
  * group.  We call this holding task_capability_lock and tasklist_lock.
  */
-static inline void cap_set_pg(int pgrp, kernel_cap_t *effective,
+static inline int cap_set_pg(int pgrp, kernel_cap_t *effective,
 			      kernel_cap_t *inheritable,
 			      kernel_cap_t *permitted)
 {
 	task_t *g, *target;
+	int ret = -EPERM;
+	int found = 0;
 
 	do_each_task_pid(pgrp, PIDTYPE_PGID, g) {
 		target = g;
-		while_each_thread(g, target)
-			security_capset_set(target, effective, inheritable, permitted);
+		while_each_thread(g, target) {
+			if (!security_capset_check(target, effective,
+							inheritable,
+							permitted)) {
+				security_capset_set(target, effective,
+							inheritable,
+							permitted);
+				ret = 0;
+			}
+			found = 1;
+		}
 	} while_each_task_pid(pgrp, PIDTYPE_PGID, g);
+
+	if (!found)
+	     ret = 0;
+	return ret;
 }
 
 /*
  * cap_set_all - set capabilities for all processes other than init
  * and self.  We call this holding task_capability_lock and tasklist_lock.
  */
-static inline void cap_set_all(kernel_cap_t *effective,
+static inline int cap_set_all(kernel_cap_t *effective,
 			       kernel_cap_t *inheritable,
 			       kernel_cap_t *permitted)
 {
      task_t *g, *target;
+     int ret = -EPERM;
+     int found = 0;
 
      do_each_thread(g, target) {
              if (target == current || target->pid == 1)
                      continue;
+             found = 1;
+	     if (security_capset_check(target, effective, inheritable,
+						permitted))
+		     continue;
+	     ret = 0;
 	     security_capset_set(target, effective, inheritable, permitted);
      } while_each_thread(g, target);
+
+     if (!found)
+	     ret = 0;
+     return ret;
 }
 
 /*
@@ -147,7 +173,7 @@
      if (get_user(pid, &header->pid))
 	     return -EFAULT; 
 
-     if (pid && !capable(CAP_SETPCAP))
+     if (pid && pid != current->pid && !capable(CAP_SETPCAP))
              return -EPERM;
 
      if (copy_from_user(&effective, &data->effective, sizeof(effective)) ||
@@ -167,36 +193,23 @@
      } else
                target = current;
 
-     ret = -EPERM;
-
-     if (security_capset_check(target, &effective, &inheritable, &permitted))
-	     goto out;
-
-     if (!cap_issubset(inheritable, cap_combine(target->cap_inheritable,
-                       current->cap_permitted)))
-             goto out;
-
-     /* verify restrictions on target's new Permitted set */
-     if (!cap_issubset(permitted, cap_combine(target->cap_permitted,
-                       current->cap_permitted)))
-             goto out;
-
-     /* verify the _new_Effective_ is a subset of the _new_Permitted_ */
-     if (!cap_issubset(effective, permitted))
-             goto out;
-
      ret = 0;
 
      /* having verified that the proposed changes are legal,
            we now put them into effect. */
      if (pid < 0) {
              if (pid == -1)  /* all procs other than current and init */
-                     cap_set_all(&effective, &inheritable, &permitted);
+                     ret = cap_set_all(&effective, &inheritable, &permitted);
 
              else            /* all procs in process group */
-                     cap_set_pg(-pid, &effective, &inheritable, &permitted);
+                     ret = cap_set_pg(-pid, &effective, &inheritable,
+		     					&permitted);
      } else {
-	     security_capset_set(target, &effective, &inheritable, &permitted);
+	     ret = security_capset_check(target, &effective, &inheritable,
+	     						&permitted);
+	     if (!ret)
+		     security_capset_set(target, &effective, &inheritable,
+		     					&permitted);
      }
 
 out:
diff -Nru a/kernel/compat.c b/kernel/compat.c
--- a/kernel/compat.c	2005-01-10 20:11:19 -08:00
+++ b/kernel/compat.c	2005-01-10 20:11:19 -08:00
@@ -20,6 +20,7 @@
 #include <linux/futex.h>	/* for FUTEX_WAIT */
 #include <linux/syscalls.h>
 #include <linux/unistd.h>
+#include <linux/security.h>
 
 #include <asm/uaccess.h>
 
@@ -680,3 +681,128 @@
 
 	return 0;
 }
+
+void
+sigset_from_compat (sigset_t *set, compat_sigset_t *compat)
+{
+	switch (_NSIG_WORDS) {
+#if defined (__COMPAT_ENDIAN_SWAP__)
+	case 4: set->sig[3] = compat->sig[7] | (((long)compat->sig[6]) << 32 );
+	case 3: set->sig[2] = compat->sig[5] | (((long)compat->sig[4]) << 32 );
+	case 2: set->sig[1] = compat->sig[3] | (((long)compat->sig[2]) << 32 );
+	case 1: set->sig[0] = compat->sig[1] | (((long)compat->sig[0]) << 32 );
+#else
+	case 4: set->sig[3] = compat->sig[6] | (((long)compat->sig[7]) << 32 );
+	case 3: set->sig[2] = compat->sig[4] | (((long)compat->sig[5]) << 32 );
+	case 2: set->sig[1] = compat->sig[2] | (((long)compat->sig[3]) << 32 );
+	case 1: set->sig[0] = compat->sig[0] | (((long)compat->sig[1]) << 32 );
+#endif
+	}
+}
+
+asmlinkage long
+compat_rt_sigtimedwait (compat_sigset_t __user *uthese,
+		struct compat_siginfo __user *uinfo,
+		struct compat_timespec __user *uts, compat_size_t sigsetsize)
+{
+	compat_sigset_t s32;
+	sigset_t s;
+	int sig;
+	struct timespec t;
+	siginfo_t info;
+	long ret, timeout = 0;
+
+	if (sigsetsize != sizeof(sigset_t))
+		return -EINVAL;
+
+	if (copy_from_user(&s32, uthese, sizeof(compat_sigset_t)))
+		return -EFAULT;
+	sigset_from_compat(&s, &s32);
+	sigdelsetmask(&s,sigmask(SIGKILL)|sigmask(SIGSTOP));
+	signotset(&s);
+
+	if (uts) {
+		if (get_compat_timespec (&t, uts))
+			return -EFAULT;
+		if (t.tv_nsec >= 1000000000L || t.tv_nsec < 0
+				|| t.tv_sec < 0)
+			return -EINVAL;
+	}
+
+	spin_lock_irq(&current->sighand->siglock);
+	sig = dequeue_signal(current, &s, &info);
+	if (!sig) {
+		timeout = MAX_SCHEDULE_TIMEOUT;
+		if (uts)
+			timeout = timespec_to_jiffies(&t)
+				+(t.tv_sec || t.tv_nsec);
+		if (timeout) {
+			current->real_blocked = current->blocked;
+			sigandsets(&current->blocked, &current->blocked, &s);
+
+			recalc_sigpending();
+			spin_unlock_irq(&current->sighand->siglock);
+
+			current->state = TASK_INTERRUPTIBLE;
+			timeout = schedule_timeout(timeout);
+
+			spin_lock_irq(&current->sighand->siglock);
+			sig = dequeue_signal(current, &s, &info);
+			current->blocked = current->real_blocked;
+			siginitset(&current->real_blocked, 0);
+			recalc_sigpending();
+		}
+	}
+	spin_unlock_irq(&current->sighand->siglock);
+
+	if (sig) {
+		ret = sig;
+		if (uinfo) {
+			if (copy_siginfo_to_user32(uinfo, &info))
+				ret = -EFAULT;
+		}
+	}else {
+		ret = timeout?-EINTR:-EAGAIN;
+	}
+	return ret;
+
+}
+
+#ifdef __ARCH_WANT_COMPAT_SYS_TIME
+
+/* compat_time_t is a 32 bit "long" and needs to get converted. */
+
+asmlinkage long compat_sys_time(compat_time_t __user * tloc)
+{
+	compat_time_t i;
+	struct timeval tv;
+
+	do_gettimeofday(&tv);
+	i = tv.tv_sec;
+
+	if (tloc) {
+		if (put_user(i,tloc))
+			i = -EFAULT;
+	}
+	return i;
+}
+
+asmlinkage long compat_sys_stime(compat_time_t __user *tptr)
+{
+	struct timespec tv;
+	int err;
+
+	if (get_user(tv.tv_sec, tptr))
+		return -EFAULT;
+
+	tv.tv_nsec = 0;
+
+	err = security_settime(&tv, NULL);
+	if (err)
+		return err;
+
+	do_settimeofday(&tv);
+	return 0;
+}
+
+#endif /* __ARCH_WANT_COMPAT_SYS_TIME */
diff -Nru a/kernel/cpu.c b/kernel/cpu.c
--- a/kernel/cpu.c	2005-01-10 20:11:22 -08:00
+++ b/kernel/cpu.c	2005-01-10 20:11:22 -08:00
@@ -132,7 +132,8 @@
 	__cpu_die(cpu);
 
 	/* Move it here so it can run. */
-	kthread_bind(p, smp_processor_id());
+	kthread_bind(p, get_cpu());
+	put_cpu();
 
 	/* CPU is completely dead: tell everyone.  Too late to complain. */
 	if (notifier_call_chain(&cpu_chain, CPU_DEAD, (void *)(long)cpu)
diff -Nru a/kernel/dma.c b/kernel/dma.c
--- a/kernel/dma.c	2005-01-10 20:11:17 -08:00
+++ b/kernel/dma.c	2005-01-10 20:11:17 -08:00
@@ -38,7 +38,7 @@
  */
 
 
-spinlock_t dma_spin_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(dma_spin_lock);
 
 /*
  *	If our port doesn't define this it has no PC like DMA
diff -Nru a/kernel/exec_domain.c b/kernel/exec_domain.c
--- a/kernel/exec_domain.c	2005-01-10 20:11:20 -08:00
+++ b/kernel/exec_domain.c	2005-01-10 20:11:20 -08:00
@@ -22,7 +22,7 @@
 static void default_handler(int, struct pt_regs *);
 
 static struct exec_domain *exec_domains = &default_exec_domain;
-static rwlock_t exec_domains_lock = RW_LOCK_UNLOCKED;
+static DEFINE_RWLOCK(exec_domains_lock);
 
 
 static u_long ident_map[32] = {
diff -Nru a/kernel/exit.c b/kernel/exit.c
--- a/kernel/exit.c	2005-01-10 20:11:22 -08:00
+++ b/kernel/exit.c	2005-01-10 20:11:22 -08:00
@@ -159,7 +159,7 @@
 
 	do_each_task_pid(pgrp, PIDTYPE_PGID, p) {
 		if (p == ignored_task
-				|| p->exit_state >= EXIT_ZOMBIE
+				|| p->exit_state
 				|| p->real_parent->pid == 1)
 			continue;
 		if (process_group(p->real_parent) != pgrp
@@ -332,7 +332,9 @@
 	exit_mm(current);
 
 	set_special_pids(1, 1);
+	down(&tty_sem);
 	current->signal->tty = NULL;
+	up(&tty_sem);
 
 	/* Block and flush all signals */
 	sigfillset(&blocked);
@@ -470,7 +472,7 @@
  * Turn us into a lazy TLB process if we
  * aren't already..
  */
-static inline void __exit_mm(struct task_struct * tsk)
+void exit_mm(struct task_struct * tsk)
 {
 	struct mm_struct *mm = tsk->mm;
 
@@ -506,18 +508,13 @@
 	mmput(mm);
 }
 
-void exit_mm(struct task_struct *tsk)
-{
-	__exit_mm(tsk);
-}
-
 static inline void choose_new_parent(task_t *p, task_t *reaper, task_t *child_reaper)
 {
 	/*
 	 * Make sure we're not reparenting to ourselves and that
 	 * the parent is not a zombie.
 	 */
-	BUG_ON(p == reaper || reaper->state >= EXIT_ZOMBIE || reaper->exit_state >= EXIT_ZOMBIE);
+	BUG_ON(p == reaper || reaper->exit_state >= EXIT_ZOMBIE);
 	p->real_parent = reaper;
 	if (p->parent == p->real_parent)
 		BUG();
@@ -560,7 +557,7 @@
 			 * a normal stop since it's no longer being
 			 * traced.
 			 */
-			p->state = TASK_STOPPED;
+			ptrace_untrace(p);
 		}
 	}
 
@@ -599,7 +596,7 @@
 			reaper = child_reaper;
 			break;
 		}
-	} while (reaper->exit_state >= EXIT_ZOMBIE);
+	} while (reaper->exit_state);
 
 	/*
 	 * There are only two places where our children can be:
@@ -656,7 +653,7 @@
 	struct task_struct *t;
 	struct list_head ptrace_dead, *_p, *_n;
 
-	if (signal_pending(tsk) && !tsk->signal->group_exit
+	if (signal_pending(tsk) && !(tsk->signal->flags & SIGNAL_GROUP_EXIT)
 	    && !thread_group_empty(tsk)) {
 		/*
 		 * This occurs when there was a race between our exit
@@ -806,10 +803,12 @@
 		ptrace_notify((PTRACE_EVENT_EXIT << 8) | SIGTRAP);
 	}
 
+	acct_update_integrals();
+	update_mem_hiwater();
 	group_dead = atomic_dec_and_test(&tsk->signal->live);
 	if (group_dead)
 		acct_process(code);
-	__exit_mm(tsk);
+	exit_mm(tsk);
 
 	exit_sem(tsk);
 	__exit_files(tsk);
@@ -877,18 +876,18 @@
 {
 	BUG_ON(exit_code & 0x80); /* core dumps don't get here */
 
-	if (current->signal->group_exit)
+	if (current->signal->flags & SIGNAL_GROUP_EXIT)
 		exit_code = current->signal->group_exit_code;
 	else if (!thread_group_empty(current)) {
 		struct signal_struct *const sig = current->signal;
 		struct sighand_struct *const sighand = current->sighand;
 		read_lock(&tasklist_lock);
 		spin_lock_irq(&sighand->siglock);
-		if (sig->group_exit)
+		if (sig->flags & SIGNAL_GROUP_EXIT)
 			/* Another thread got here before we took the lock.  */
 			exit_code = sig->group_exit_code;
 		else {
-			sig->group_exit = 1;
+			sig->flags = SIGNAL_GROUP_EXIT;
 			sig->group_exit_code = exit_code;
 			zap_other_threads(current);
 		}
@@ -1068,7 +1067,7 @@
 	read_unlock(&tasklist_lock);
 
 	retval = ru ? getrusage(p, RUSAGE_BOTH, ru) : 0;
-	status = p->signal->group_exit
+	status = (p->signal->flags & SIGNAL_GROUP_EXIT)
 		? p->signal->group_exit_code : p->exit_code;
 	if (!retval && stat_addr)
 		retval = put_user(status, stat_addr);
@@ -1180,7 +1179,7 @@
 	 * race with the EXIT_ZOMBIE case.
 	 */
 	exit_code = xchg(&p->exit_code, 0);
-	if (unlikely(p->exit_state >= EXIT_ZOMBIE)) {
+	if (unlikely(p->exit_state)) {
 		/*
 		 * The task resumed and then died.  Let the next iteration
 		 * catch it in EXIT_ZOMBIE.  Note that exit_code might
@@ -1258,16 +1257,17 @@
 	if (unlikely(!p->signal))
 		return 0;
 
-	if (p->signal->stop_state >= 0)
+	if (!(p->signal->flags & SIGNAL_STOP_CONTINUED))
 		return 0;
 
 	spin_lock_irq(&p->sighand->siglock);
-	if (p->signal->stop_state >= 0) { /* Re-check with the lock held.  */
+	/* Re-check with the lock held.  */
+	if (!(p->signal->flags & SIGNAL_STOP_CONTINUED)) {
 		spin_unlock_irq(&p->sighand->siglock);
 		return 0;
 	}
 	if (!noreap)
-		p->signal->stop_state = 0;
+		p->signal->flags &= ~SIGNAL_STOP_CONTINUED;
 	spin_unlock_irq(&p->sighand->siglock);
 
 	pid = p->pid;
@@ -1316,7 +1316,7 @@
 	struct task_struct *tsk;
 	int flag, retval;
 
-	add_wait_queue(&current->wait_chldexit,&wait);
+	add_wait_queue(&current->signal->wait_chldexit,&wait);
 repeat:
 	/*
 	 * We will set this flag if we see any child that might later
@@ -1430,7 +1430,7 @@
 	retval = -ECHILD;
 end:
 	current->state = TASK_RUNNING;
-	remove_wait_queue(&current->wait_chldexit,&wait);
+	remove_wait_queue(&current->signal->wait_chldexit,&wait);
 	if (infop) {
 		if (retval > 0)
 		retval = 0;
diff -Nru a/kernel/fork.c b/kernel/fork.c
--- a/kernel/fork.c	2005-01-10 20:11:16 -08:00
+++ b/kernel/fork.c	2005-01-10 20:11:16 -08:00
@@ -39,6 +39,7 @@
 #include <linux/audit.h>
 #include <linux/profile.h>
 #include <linux/rmap.h>
+#include <linux/acct.h>
 
 #include <asm/pgtable.h>
 #include <asm/pgalloc.h>
@@ -47,17 +48,17 @@
 #include <asm/cacheflush.h>
 #include <asm/tlbflush.h>
 
-/* The idle threads do not count..
- * Protected by write_lock_irq(&tasklist_lock)
+/*
+ * Protected counters by write_lock_irq(&tasklist_lock)
  */
-int nr_threads;
-
-int max_threads;
 unsigned long total_forks;	/* Handle normal Linux uptimes. */
+int nr_threads; 		/* The idle threads do not count.. */
+
+int max_threads;		/* tunable limit on nr_threads */
 
 DEFINE_PER_CPU(unsigned long, process_counts) = 0;
 
-rwlock_t tasklist_lock __cacheline_aligned = RW_LOCK_UNLOCKED;  /* outer */
+ __cacheline_aligned DEFINE_RWLOCK(tasklist_lock);  /* outer */
 
 EXPORT_SYMBOL(tasklist_lock);
 
@@ -218,6 +219,7 @@
       
 			/* insert tmp into the share list, just after mpnt */
 			spin_lock(&file->f_mapping->i_mmap_lock);
+			tmp->vm_truncate_count = mpnt->vm_truncate_count;
 			flush_dcache_mmap_lock(file->f_mapping);
 			vma_prio_tree_add(tmp, mpnt);
 			flush_dcache_mmap_unlock(file->f_mapping);
@@ -279,7 +281,7 @@
 #define mm_free_pgd(mm)
 #endif /* CONFIG_MMU */
 
-spinlock_t mmlist_lock __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED;
+ __cacheline_aligned_in_smp DEFINE_SPINLOCK(mmlist_lock);
 
 #define allocate_mm()	(kmem_cache_alloc(mm_cachep, SLAB_KERNEL))
 #define free_mm(mm)	(kmem_cache_free(mm_cachep, (mm)))
@@ -469,6 +471,9 @@
 	if (retval)
 		goto free_pt;
 
+	mm->hiwater_rss = mm->rss;
+	mm->hiwater_vm = mm->total_vm;
+
 good_mm:
 	tsk->mm = mm;
 	tsk->active_mm = mm;
@@ -729,11 +734,11 @@
 		return -ENOMEM;
 	atomic_set(&sig->count, 1);
 	atomic_set(&sig->live, 1);
-	sig->group_exit = 0;
+	init_waitqueue_head(&sig->wait_chldexit);
+	sig->flags = 0;
 	sig->group_exit_code = 0;
 	sig->group_exit_task = NULL;
 	sig->group_stop_count = 0;
-	sig->stop_state = 0;
 	sig->curr_target = NULL;
 	init_sigpending(&sig->shared_pending);
 	INIT_LIST_HEAD(&sig->posix_timers);
@@ -857,7 +862,6 @@
 
 	INIT_LIST_HEAD(&p->children);
 	INIT_LIST_HEAD(&p->sibling);
-	init_waitqueue_head(&p->wait_chldexit);
 	p->vfork_done = NULL;
 	spin_lock_init(&p->alloc_lock);
 	spin_lock_init(&p->proc_lock);
@@ -865,12 +869,23 @@
 	clear_tsk_thread_flag(p, TIF_SIGPENDING);
 	init_sigpending(&p->pending);
 
-	p->it_real_value = p->it_virt_value = p->it_prof_value = 0;
-	p->it_real_incr = p->it_virt_incr = p->it_prof_incr = 0;
+	p->it_real_value = 0;
+	p->it_real_incr = 0;
+	p->it_virt_value = 0;
+	p->it_virt_incr = 0;
+	p->it_prof_value = 0;
+	p->it_prof_incr = 0;
 	init_timer(&p->real_timer);
 	p->real_timer.data = (unsigned long) p;
 
-	p->utime = p->stime = 0;
+	p->utime = 0;
+	p->stime = 0;
+	p->rchar = 0;		/* I/O counter: bytes read */
+	p->wchar = 0;		/* I/O counter: bytes written */
+	p->syscr = 0;		/* I/O counter: read syscalls */
+	p->syscw = 0;		/* I/O counter: write syscalls */
+	acct_clear_integrals(p);
+
 	p->lock_depth = -1;		/* -1 = no lock */
 	do_posix_clock_monotonic_gettime(&p->start_time);
 	p->security = NULL;
@@ -985,7 +1000,7 @@
 		 * do not create this new thread - the whole thread
 		 * group is supposed to exit anyway.
 		 */
-		if (current->signal->group_exit) {
+		if (current->signal->flags & SIGNAL_GROUP_EXIT) {
 			spin_unlock(&current->sighand->siglock);
 			write_unlock_irq(&tasklist_lock);
 			retval = -EAGAIN;
@@ -1020,6 +1035,7 @@
 	}
 
 	nr_threads++;
+	total_forks++;
 	write_unlock_irq(&tasklist_lock);
 	retval = 0;
 
@@ -1152,7 +1168,6 @@
 			wake_up_new_task(p, clone_flags);
 		else
 			p->state = TASK_STOPPED;
-		++total_forks;
 
 		if (unlikely (trace)) {
 			current->ptrace_message = pid;
diff -Nru a/kernel/intermodule.c b/kernel/intermodule.c
--- a/kernel/intermodule.c	2005-01-10 20:11:15 -08:00
+++ b/kernel/intermodule.c	2005-01-10 20:11:15 -08:00
@@ -14,7 +14,7 @@
  */
 
 static struct list_head ime_list = LIST_HEAD_INIT(ime_list);
-static spinlock_t ime_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(ime_lock);
 static int kmalloc_failed;
 
 struct inter_module_entry {
diff -Nru a/kernel/irq/handle.c b/kernel/irq/handle.c
--- a/kernel/irq/handle.c	2005-01-10 20:11:24 -08:00
+++ b/kernel/irq/handle.c	2005-01-10 20:11:24 -08:00
@@ -73,17 +73,6 @@
 }
 
 /*
- * Exit an interrupt context. Process softirqs if needed and possible:
- */
-void irq_exit(void)
-{
-	preempt_count() -= IRQ_EXIT_OFFSET;
-	if (!in_interrupt() && local_softirq_pending())
-		do_softirq();
-	preempt_enable_no_resched();
-}
-
-/*
  * Have got an event to handle:
  */
 fastcall int handle_IRQ_event(unsigned int irq, struct pt_regs *regs,
diff -Nru a/kernel/kallsyms.c b/kernel/kallsyms.c
--- a/kernel/kallsyms.c	2005-01-10 20:11:23 -08:00
+++ b/kernel/kallsyms.c	2005-01-10 20:11:23 -08:00
@@ -18,10 +18,19 @@
 #include <linux/fs.h>
 #include <linux/err.h>
 #include <linux/proc_fs.h>
+#include <linux/mm.h>
+
+#include <asm/sections.h>
+
+#ifdef CONFIG_KALLSYMS_ALL
+#define all_var 1
+#else
+#define all_var 0
+#endif
 
 /* These will be re-linked against their real values during the second link stage */
 extern unsigned long kallsyms_addresses[] __attribute__((weak));
-extern unsigned long kallsyms_num_syms __attribute__((weak));
+extern unsigned long kallsyms_num_syms __attribute__((weak,section("data")));
 extern u8 kallsyms_names[] __attribute__((weak));
 
 extern u8 kallsyms_token_table[] __attribute__((weak));
@@ -29,9 +38,6 @@
 
 extern unsigned long kallsyms_markers[] __attribute__((weak));
 
-/* Defined by the linker script. */
-extern char _stext[], _etext[], _sinittext[], _einittext[];
-
 static inline int is_kernel_inittext(unsigned long addr)
 {
 	if (addr >= (unsigned long)_sinittext
@@ -44,7 +50,7 @@
 {
 	if (addr >= (unsigned long)_stext && addr <= (unsigned long)_etext)
 		return 1;
-	return 0;
+	return in_gate_area_no_task(addr);
 }
 
 /* expand a compressed symbol data into the resulting uncompressed string,
@@ -147,7 +153,7 @@
 	namebuf[KSYM_NAME_LEN] = 0;
 	namebuf[0] = 0;
 
-	if (is_kernel_text(addr) || is_kernel_inittext(addr)) {
+	if (all_var || is_kernel_text(addr) || is_kernel_inittext(addr)) {
 		unsigned long symbol_end=0;
 
 		/* do a binary search on the sorted kallsyms_addresses array */
@@ -181,7 +187,7 @@
 			if (is_kernel_inittext(addr))
 				symbol_end = (unsigned long)_einittext;
 			else
-				symbol_end = (unsigned long)_etext;
+				symbol_end = all_var ? (unsigned long)_end : (unsigned long)_etext;
 		}
 
 		*symbolsize = symbol_end - kallsyms_addresses[low];
diff -Nru a/kernel/kprobes.c b/kernel/kprobes.c
--- a/kernel/kprobes.c	2005-01-10 20:11:24 -08:00
+++ b/kernel/kprobes.c	2005-01-10 20:11:24 -08:00
@@ -43,7 +43,7 @@
 static struct hlist_head kprobe_table[KPROBE_TABLE_SIZE];
 
 unsigned int kprobe_cpu = NR_CPUS;
-static spinlock_t kprobe_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(kprobe_lock);
 
 /* Locks kprobe: irqs must be disabled */
 void lock_kprobes(void)
diff -Nru a/kernel/ksysfs.c b/kernel/ksysfs.c
--- a/kernel/ksysfs.c	2005-01-10 20:11:22 -08:00
+++ b/kernel/ksysfs.c	2005-01-10 20:11:22 -08:00
@@ -30,7 +30,8 @@
 KERNEL_ATTR_RO(hotplug_seqnum);
 #endif
 
-static decl_subsys(kernel, NULL, NULL);
+decl_subsys(kernel, NULL, NULL);
+EXPORT_SYMBOL_GPL(kernel_subsys);
 
 static struct attribute * kernel_attrs[] = {
 #ifdef CONFIG_HOTPLUG
diff -Nru a/kernel/kthread.c b/kernel/kthread.c
--- a/kernel/kthread.c	2005-01-10 20:11:22 -08:00
+++ b/kernel/kthread.c	2005-01-10 20:11:22 -08:00
@@ -14,6 +14,12 @@
 #include <linux/module.h>
 #include <asm/semaphore.h>
 
+/*
+ * We dont want to execute off keventd since it might
+ * hold a semaphore our callers hold too:
+ */
+static struct workqueue_struct *helper_wq;
+
 struct kthread_create_info
 {
 	/* Information passed to kthread() from keventd. */
@@ -126,12 +132,13 @@
 	init_completion(&create.started);
 	init_completion(&create.done);
 
-	/* If we're being called to start the first workqueue, we
-	 * can't use keventd. */
-	if (!keventd_up())
+	/*
+	 * The workqueue needs to start up first:
+	 */
+	if (!helper_wq)
 		work.func(work.data);
 	else {
-		schedule_work(&work);
+		queue_work(helper_wq, &work);
 		wait_for_completion(&create.done);
 	}
 	if (!IS_ERR(create.result)) {
@@ -183,3 +190,13 @@
 	return ret;
 }
 EXPORT_SYMBOL(kthread_stop);
+
+static __init int helper_init(void)
+{
+	helper_wq = create_singlethread_workqueue("kthread");
+	BUG_ON(!helper_wq);
+
+	return 0;
+}
+core_initcall(helper_init);
+
diff -Nru a/kernel/module.c b/kernel/module.c
--- a/kernel/module.c	2005-01-10 20:11:21 -08:00
+++ b/kernel/module.c	2005-01-10 20:11:21 -08:00
@@ -53,7 +53,7 @@
 #define INIT_OFFSET_MASK (1UL << (BITS_PER_LONG-1))
 
 /* Protects module list */
-static spinlock_t modlist_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(modlist_lock);
 
 /* List of modules, protected by module_mutex AND modlist_lock */
 static DECLARE_MUTEX(module_mutex);
@@ -379,7 +379,7 @@
 	for (i = 0; i < NR_CPUS; i++)
 		local_set(&mod->ref[i].count, 0);
 	/* Hold reference count during initialization. */
-	local_set(&mod->ref[smp_processor_id()].count, 1);
+	local_set(&mod->ref[_smp_processor_id()].count, 1);
 	/* Backwards compatibility macros put refcount during init. */
 	mod->waiter = current;
 }
@@ -651,7 +651,8 @@
 }
 EXPORT_SYMBOL_GPL(symbol_put_addr);
 
-static ssize_t show_refcnt(struct module *mod, char *buffer)
+static ssize_t show_refcnt(struct module_attribute *mattr,
+			   struct module *mod, char *buffer)
 {
 	/* sysfs holds a reference */
 	return sprintf(buffer, "%u\n", module_refcount(mod)-1);
@@ -681,13 +682,6 @@
 static inline void module_unload_init(struct module *mod)
 {
 }
-
-asmlinkage long
-sys_delete_module(const char __user *name_user, unsigned int flags)
-{
-	return -ENOSYS;
-}
-
 #endif /* CONFIG_MODULE_UNLOAD */
 
 #ifdef CONFIG_OBSOLETE_MODPARM
@@ -936,79 +930,71 @@
  * J. Corbet <corbet@lwn.net>
  */
 #ifdef CONFIG_KALLSYMS
-static void module_sect_attrs_release(struct kobject *kobj)
-{
-	kfree(container_of(kobj, struct module_sections, kobj));
-}
-
-static ssize_t module_sect_show(struct kobject *kobj, struct attribute *attr,
-		char *buf)
+static ssize_t module_sect_show(struct module_attribute *mattr,
+				struct module *mod, char *buf)
 {
 	struct module_sect_attr *sattr =
-		container_of(attr, struct module_sect_attr, attr);
+		container_of(mattr, struct module_sect_attr, mattr);
 	return sprintf(buf, "0x%lx\n", sattr->address);
 }
 
-static struct sysfs_ops module_sect_ops = {
-	.show = module_sect_show,
-};
-
-static struct kobj_type module_sect_ktype = {
-	.sysfs_ops = &module_sect_ops,
-	.release =   module_sect_attrs_release,
-};
-
 static void add_sect_attrs(struct module *mod, unsigned int nsect,
 		char *secstrings, Elf_Shdr *sechdrs)
 {
-	unsigned int nloaded = 0, i;
+	unsigned int nloaded = 0, i, size[2];
+	struct module_sect_attrs *sect_attrs;
 	struct module_sect_attr *sattr;
-	
-	if (!mod->mkobj)
-		return;
+	struct attribute **gattr;
 	
 	/* Count loaded sections and allocate structures */
 	for (i = 0; i < nsect; i++)
 		if (sechdrs[i].sh_flags & SHF_ALLOC)
 			nloaded++;
-	mod->sect_attrs = kmalloc(sizeof(struct module_sections) +
-			nloaded*sizeof(mod->sect_attrs->attrs[0]), GFP_KERNEL);
-	if (! mod->sect_attrs)
+	size[0] = ALIGN(sizeof(*sect_attrs)
+			+ nloaded * sizeof(sect_attrs->attrs[0]),
+			sizeof(sect_attrs->grp.attrs[0]));
+	size[1] = (nloaded + 1) * sizeof(sect_attrs->grp.attrs[0]);
+	if (! (sect_attrs = kmalloc(size[0] + size[1], GFP_KERNEL)))
 		return;
 
-	/* sections entry setup */
-	memset(mod->sect_attrs, 0, sizeof(struct module_sections));
-	if (kobject_set_name(&mod->sect_attrs->kobj, "sections"))
-		goto out;
-	mod->sect_attrs->kobj.parent = &mod->mkobj->kobj;
-	mod->sect_attrs->kobj.ktype = &module_sect_ktype;
-	if (kobject_register(&mod->sect_attrs->kobj))
-		goto out;
+	/* Setup section attributes. */
+	sect_attrs->grp.name = "sections";
+	sect_attrs->grp.attrs = (void *)sect_attrs + size[0];
 
-	/* And the section attributes. */
-	sattr = &mod->sect_attrs->attrs[0];
+	sattr = &sect_attrs->attrs[0];
+	gattr = &sect_attrs->grp.attrs[0];
 	for (i = 0; i < nsect; i++) {
 		if (! (sechdrs[i].sh_flags & SHF_ALLOC))
 			continue;
 		sattr->address = sechdrs[i].sh_addr;
 		strlcpy(sattr->name, secstrings + sechdrs[i].sh_name,
-				MODULE_SECT_NAME_LEN);
-		sattr->attr.name = sattr->name;
-		sattr->attr.owner = mod;
-		sattr->attr.mode = S_IRUGO;
-		(void) sysfs_create_file(&mod->sect_attrs->kobj, &sattr->attr);
-		sattr++;
+			MODULE_SECT_NAME_LEN);
+		sattr->mattr.show = module_sect_show;
+		sattr->mattr.store = NULL;
+		sattr->mattr.attr.name = sattr->name;
+		sattr->mattr.attr.owner = mod;
+		sattr->mattr.attr.mode = S_IRUGO;
+		*(gattr++) = &(sattr++)->mattr.attr;
 	}
+	*gattr = NULL;
+
+	if (sysfs_create_group(&mod->mkobj.kobj, &sect_attrs->grp))
+		goto out;
+
+	mod->sect_attrs = sect_attrs;
 	return;
   out:
-	kfree(mod->sect_attrs);
-	mod->sect_attrs = NULL;
+	kfree(sect_attrs);
 }
 
 static void remove_sect_attrs(struct module *mod)
 {
 	if (mod->sect_attrs) {
-		kobject_unregister(&mod->sect_attrs->kobj);
+		sysfs_remove_group(&mod->mkobj.kobj,
+				   &mod->sect_attrs->grp);
+		/* We are positive that no one is using any sect attrs
+		 * at this point.  Deallocate immediately. */
+		kfree(mod->sect_attrs);
 		mod->sect_attrs = NULL;
 	}
 }
@@ -1029,11 +1015,11 @@
 #ifdef CONFIG_MODULE_UNLOAD
 static inline int module_add_refcnt_attr(struct module *mod)
 {
-	return sysfs_create_file(&mod->mkobj->kobj, &refcnt.attr);
+	return sysfs_create_file(&mod->mkobj.kobj, &refcnt.attr);
 }
 static void module_remove_refcnt_attr(struct module *mod)
 {
-	return sysfs_remove_file(&mod->mkobj->kobj, &refcnt.attr);
+	return sysfs_remove_file(&mod->mkobj.kobj, &refcnt.attr);
 }
 #else
 static inline int module_add_refcnt_attr(struct module *mod)
@@ -1052,17 +1038,13 @@
 {
 	int err;
 
-	mod->mkobj = kmalloc(sizeof(struct module_kobject), GFP_KERNEL);
-	if (!mod->mkobj)
-		return -ENOMEM;
-
-	memset(&mod->mkobj->kobj, 0, sizeof(mod->mkobj->kobj));
-	err = kobject_set_name(&mod->mkobj->kobj, "%s", mod->name);
+	memset(&mod->mkobj.kobj, 0, sizeof(mod->mkobj.kobj));
+	err = kobject_set_name(&mod->mkobj.kobj, "%s", mod->name);
 	if (err)
 		goto out;
-	kobj_set_kset_s(mod->mkobj, module_subsys);
-	mod->mkobj->mod = mod;
-	err = kobject_register(&mod->mkobj->kobj);
+	kobj_set_kset_s(&mod->mkobj, module_subsys);
+	mod->mkobj.mod = mod;
+	err = kobject_register(&mod->mkobj.kobj);
 	if (err)
 		goto out;
 
@@ -1077,11 +1059,8 @@
 	return 0;
 
 out_unreg:
-	/* Calls module_kobj_release */
-	kobject_unregister(&mod->mkobj->kobj);
-	return err;
+	kobject_unregister(&mod->mkobj.kobj);
 out:
-	kfree(mod->mkobj);
 	return err;
 }
 
@@ -1090,8 +1069,7 @@
 	module_remove_refcnt_attr(mod);
 	module_param_sysfs_remove(mod);
 
-	/* Calls module_kobj_release */
-	kobject_unregister(&mod->mkobj->kobj);
+	kobject_unregister(&mod->mkobj.kobj);
 }
 
 /* Free a module, remove from lists, etc (must hold module mutex). */
@@ -2089,11 +2067,9 @@
 {
 	if (!mod || !drv)
 		return;
-	if (!mod->mkobj)
-		return;
 
 	/* Don't check return code; this call is idempotent */
-	sysfs_create_link(&drv->kobj, &mod->mkobj->kobj, "module");
+	sysfs_create_link(&drv->kobj, &mod->mkobj.kobj, "module");
 }
 EXPORT_SYMBOL(module_add_driver);
 
diff -Nru a/kernel/params.c b/kernel/params.c
--- a/kernel/params.c	2005-01-10 20:11:21 -08:00
+++ b/kernel/params.c	2005-01-10 20:11:21 -08:00
@@ -77,10 +77,16 @@
 static char *next_arg(char *args, char **param, char **val)
 {
 	unsigned int i, equals = 0;
-	int in_quote = 0;
+	int in_quote = 0, quoted = 0;
+	char *next;
 
 	/* Chew any extra spaces */
 	while (*args == ' ') args++;
+	if (*args == '"') {
+		args++;
+		in_quote = 1;
+		quoted = 1;
+	}
 
 	for (i = 0; args[i]; i++) {
 		if (args[i] == ' ' && !in_quote)
@@ -106,13 +112,16 @@
 			if (args[i-1] == '"')
 				args[i-1] = '\0';
 		}
+		if (quoted && args[i-1] == '"')
+			args[i-1] = '\0';
 	}
 
 	if (args[i]) {
 		args[i] = '\0';
-		return args + i + 1;
+		next = args + i + 1;
 	} else
-		return args + i;
+		next = args + i;
+	return next;
 }
 
 /* Args looks like "foo=bar,bar2 baz=fuz wiz". */
@@ -357,26 +366,23 @@
 
 struct param_attribute
 {
-	struct attribute attr;
+	struct module_attribute mattr;
 	struct kernel_param *param;
 };
 
-struct param_kobject
+struct module_param_attrs
 {
-	struct kobject kobj;
-
-	unsigned int num_attributes;
-	struct param_attribute attr[0];
+	struct attribute_group grp;
+	struct param_attribute attrs[0];
 };
 
-#define to_param_attr(n) container_of(n, struct param_attribute, attr);
+#define to_param_attr(n) container_of(n, struct param_attribute, mattr);
 
-static ssize_t param_attr_show(struct kobject *kobj,
-			       struct attribute *attr,
-			       char *buf)
+static ssize_t param_attr_show(struct module_attribute *mattr,
+			       struct module *mod, char *buf)
 {
 	int count;
-	struct param_attribute *attribute = to_param_attr(attr);
+	struct param_attribute *attribute = to_param_attr(mattr);
 
 	if (!attribute->param->get)
 		return -EPERM;
@@ -390,12 +396,12 @@
 }
 
 /* sysfs always hands a nul-terminated string in buf.  We rely on that. */
-static ssize_t param_attr_store(struct kobject *kobj,
-				struct attribute *attr,
+static ssize_t param_attr_store(struct module_attribute *mattr,
+				struct module *owner,
 				const char *buf, size_t len)
 {
  	int err;
-	struct param_attribute *attribute = to_param_attr(attr);
+	struct param_attribute *attribute = to_param_attr(mattr);
 
 	if (!attribute->param->set)
 		return -EPERM;
@@ -406,27 +412,6 @@
 	return err;
 }
 
-
-static struct sysfs_ops param_sysfs_ops = {
-	.show = param_attr_show,
-	.store = param_attr_store,
-};
-
-static void param_kobj_release(struct kobject *kobj)
-{
-	kfree(container_of(kobj, struct param_kobject, kobj));
-}
-
-static struct kobj_type param_ktype = {
-	.sysfs_ops =	&param_sysfs_ops,
-	.release =	&param_kobj_release,
-};
-
-static struct kset param_kset = {
-	.subsys =	&module_subsys,
-	.ktype =	&param_ktype,
-};
-
 #ifdef CONFIG_MODULES
 #define __modinit
 #else
@@ -434,54 +419,6 @@
 #endif
 
 /*
- * param_add_attribute - actually adds an parameter to sysfs
- * @mod: owner of parameter
- * @pk: param_kobject the attribute shall be assigned to.
- *      One per module, one per KBUILD_MODNAME.
- * @kp: kernel_param to be added
- * @skip: offset where the parameter name start in kp->name.
- * Needed for built-in modules
- *
- * Fill in data into appropriate &pk->attr[], and create sysfs file.
- */
-static __modinit int param_add_attribute(struct module *mod,
-					 struct param_kobject *pk,
-					 struct kernel_param *kp,
-					 unsigned int skip)
-{
-	struct param_attribute *a;
-	int err;
-
-	a = &pk->attr[pk->num_attributes];
-	a->attr.name = (char *) &kp->name[skip];
-	a->attr.owner = mod;
-	a->attr.mode = kp->perm;
-	a->param = kp;
-	err = sysfs_create_file(&pk->kobj, &a->attr);
-	if (!err)
-		pk->num_attributes++;
-	return err;
-}
-
-/*
- * param_sysfs_remove - remove sysfs support for one module or KBUILD_MODNAME
- * @pk: struct param_kobject which is to be removed
- *
- * Called when an error in registration occurs or a module is removed
- * from the system.
- */
-static __modinit void param_sysfs_remove(struct param_kobject *pk)
-{
-	unsigned int i;
-	for (i = 0; i < pk->num_attributes; i++)
-		sysfs_remove_file(&pk->kobj,&pk->attr[i].attr);
-
-	/* Calls param_kobj_release */
-	kobject_unregister(&pk->kobj);
-}
-
-
-/*
  * param_sysfs_setup - setup sysfs support for one module or KBUILD_MODNAME
  * @mk: struct module_kobject (contains parent kobject)
  * @kparam: array of struct kernel_param, the actual parameter definitions
@@ -492,15 +429,17 @@
  * in sysfs. A pointer to the param_kobject is returned on success,
  * NULL if there's no parameter to export, or other ERR_PTR(err).
  */
-static __modinit struct param_kobject *
+static __modinit struct module_param_attrs *
 param_sysfs_setup(struct module_kobject *mk,
 		  struct kernel_param *kparam,
 		  unsigned int num_params,
 		  unsigned int name_skip)
 {
-	struct param_kobject *pk;
+	struct module_param_attrs *mp;
 	unsigned int valid_attrs = 0;
-	unsigned int i;
+	unsigned int i, size[2];
+	struct param_attribute *pattr;
+	struct attribute **gattr;
 	int err;
 
 	for (i=0; i<num_params; i++) {
@@ -511,42 +450,39 @@
 	if (!valid_attrs)
 		return NULL;
 
-	pk = kmalloc(sizeof(struct param_kobject)
-		     + sizeof(struct param_attribute) * valid_attrs,
-		     GFP_KERNEL);
-	if (!pk)
+	size[0] = ALIGN(sizeof(*mp) +
+			valid_attrs * sizeof(mp->attrs[0]),
+			sizeof(mp->grp.attrs[0]));
+	size[1] = (valid_attrs + 1) * sizeof(mp->grp.attrs[0]);
+
+	mp = kmalloc(size[0] + size[1], GFP_KERNEL);
+	if (!mp)
 		return ERR_PTR(-ENOMEM);
-	memset(pk, 0, sizeof(struct param_kobject)
-	       + sizeof(struct param_attribute) * valid_attrs);
 
-	err = kobject_set_name(&pk->kobj, "parameters");
-	if (err)
-		goto out;
-
-	pk->kobj.kset = &param_kset;
-	pk->kobj.parent = &mk->kobj;
-	err = kobject_register(&pk->kobj);
-	if (err)
-		goto out;
+	mp->grp.name = "parameters";
+	mp->grp.attrs = (void *)mp + size[0];
 
+	pattr = &mp->attrs[0];
+	gattr = &mp->grp.attrs[0];
 	for (i = 0; i < num_params; i++) {
-		if (kparam[i].perm) {
-			err = param_add_attribute(mk->mod, pk,
-						  &kparam[i], name_skip);
-			if (err)
-				goto out_unreg;
+		struct kernel_param *kp = &kparam[i];
+		if (kp->perm) {
+			pattr->param = kp;
+			pattr->mattr.show = param_attr_show;
+			pattr->mattr.store = param_attr_store;
+			pattr->mattr.attr.name = (char *)&kp->name[name_skip];
+			pattr->mattr.attr.owner = mk->mod;
+			pattr->mattr.attr.mode = kp->perm;
+			*(gattr++) = &(pattr++)->mattr.attr;
 		}
 	}
+	*gattr = NULL;
 
-	return pk;
-
-out_unreg:
-	param_sysfs_remove(pk);
-	return ERR_PTR(err);
-
-out:
-	kfree(pk);
-	return ERR_PTR(err);
+	if ((err = sysfs_create_group(&mk->kobj, &mp->grp))) {
+		kfree(mp);
+		return ERR_PTR(err);
+	}
+	return mp;
 }
 
 
@@ -565,13 +501,13 @@
 			     struct kernel_param *kparam,
 			     unsigned int num_params)
 {
-	struct param_kobject *pk;
+	struct module_param_attrs *mp;
 
-	pk = param_sysfs_setup(mod->mkobj, kparam, num_params, 0);
-	if (IS_ERR(pk))
-		return PTR_ERR(pk);
+	mp = param_sysfs_setup(&mod->mkobj, kparam, num_params, 0);
+	if (IS_ERR(mp))
+		return PTR_ERR(mp);
 
-	mod->params_kobject = pk;
+	mod->param_attrs = mp;
 	return 0;
 }
 
@@ -584,9 +520,13 @@
  */
 void module_param_sysfs_remove(struct module *mod)
 {
-	if (mod->params_kobject) {
-		param_sysfs_remove(mod->params_kobject);
-		mod->params_kobject = NULL;
+	if (mod->param_attrs) {
+		sysfs_remove_group(&mod->mkobj.kobj,
+				   &mod->param_attrs->grp);
+		/* We are positive that no one is using any param
+		 * attrs at this point.  Deallocate immediately. */
+		kfree(mod->param_attrs);
+		mod->param_attrs = NULL;
 	}
 }
 #endif
@@ -610,8 +550,10 @@
 	kobject_register(&mk->kobj);
 
 	/* no need to keep the kobject if no parameter is exported */
-	if (!param_sysfs_setup(mk, kparam, num_params, name_skip))
+	if (!param_sysfs_setup(mk, kparam, num_params, name_skip)) {
 		kobject_unregister(&mk->kobj);
+		kfree(mk);
+	}
 }
 
 /*
@@ -691,7 +633,7 @@
 	if (!try_module_get(mk->mod))
 		return -ENODEV;
 
-	ret = attribute->show(mk->mod, buf);
+	ret = attribute->show(attribute, mk->mod, buf);
 
 	module_put(mk->mod);
 
@@ -710,14 +652,8 @@
 };
 #endif
 
-static void module_kobj_release(struct kobject *kobj)
-{
-	kfree(container_of(kobj, struct module_kobject, kobj));
-}
-
 static struct kobj_type module_ktype = {
 	.sysfs_ops =	&module_sysfs_ops,
-	.release =	&module_kobj_release,
 };
 
 decl_subsys(module, &module_ktype, NULL);
@@ -728,8 +664,6 @@
 static int __init param_sysfs_init(void)
 {
 	subsystem_register(&module_subsys);
-	kobject_set_name(&param_kset.kobj, "parameters");
-	kset_init(&param_kset);
 
 	param_sysfs_builtin();
 
diff -Nru a/kernel/pid.c b/kernel/pid.c
--- a/kernel/pid.c	2005-01-10 20:11:19 -08:00
+++ b/kernel/pid.c	2005-01-10 20:11:19 -08:00
@@ -60,7 +60,7 @@
 static pidmap_t pidmap_array[PIDMAP_ENTRIES] =
 	 { [ 0 ... PIDMAP_ENTRIES-1 ] = { ATOMIC_INIT(BITS_PER_PAGE), NULL } };
 
-static spinlock_t pidmap_lock __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED;
+static  __cacheline_aligned_in_smp DEFINE_SPINLOCK(pidmap_lock);
 
 fastcall void free_pidmap(int pid)
 {
diff -Nru a/kernel/posix-timers.c b/kernel/posix-timers.c
--- a/kernel/posix-timers.c	2005-01-10 20:11:19 -08:00
+++ b/kernel/posix-timers.c	2005-01-10 20:11:19 -08:00
@@ -85,7 +85,7 @@
  */
 static kmem_cache_t *posix_timers_cache;
 static struct idr posix_timers_id;
-static spinlock_t idr_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(idr_lock);
 
 /*
  * Just because the timer is not in the timer list does NOT mean it is
diff -Nru a/kernel/power/swsusp.c b/kernel/power/swsusp.c
--- a/kernel/power/swsusp.c	2005-01-10 20:11:17 -08:00
+++ b/kernel/power/swsusp.c	2005-01-10 20:11:17 -08:00
@@ -67,18 +67,17 @@
 #include <asm/uaccess.h>
 #include <asm/mmu_context.h>
 #include <asm/pgtable.h>
+#include <asm/tlbflush.h>
 #include <asm/io.h>
 
 #include "power.h"
 
 /* References to section boundaries */
-extern char __nosave_begin, __nosave_end;
-
-extern int is_head_of_free_region(struct page *);
+extern const void __nosave_begin, __nosave_end;
 
 /* Variables to be preserved over suspend */
-int pagedir_order_check;
-int nr_copy_pages_check;
+static int pagedir_order_check;
+static int nr_copy_pages_check;
 
 extern char resume_file[];
 static dev_t resume_device;
@@ -104,14 +103,14 @@
 
 #define SWSUSP_SIG	"S1SUSPEND"
 
-struct swsusp_header {
+static struct swsusp_header {
 	char reserved[PAGE_SIZE - 20 - sizeof(swp_entry_t)];
 	swp_entry_t swsusp_info;
 	char	orig_sig[10];
 	char	sig[10];
 } __attribute__((packed, aligned(PAGE_SIZE))) swsusp_header;
 
-struct swsusp_info swsusp_info;
+static struct swsusp_info swsusp_info;
 
 /*
  * XXX: We try to keep some more pages free so that I/O operations succeed
@@ -174,7 +173,7 @@
 		resume_device == MKDEV(imajor(inode), iminor(inode));
 }
 
-int swsusp_swap_check(void) /* This is called before saving image */
+static int swsusp_swap_check(void) /* This is called before saving image */
 {
 	int i, len;
 	
@@ -426,12 +425,12 @@
 static int save_highmem_zone(struct zone *zone)
 {
 	unsigned long zone_pfn;
+	mark_free_pages(zone);
 	for (zone_pfn = 0; zone_pfn < zone->spanned_pages; ++zone_pfn) {
 		struct page *page;
 		struct highmem_page *save;
 		void *kaddr;
 		unsigned long pfn = zone_pfn + zone->zone_start_pfn;
-		int chunk_size;
 
 		if (!(pfn%1000))
 			printk(".");
@@ -448,11 +447,9 @@
 			printk("highmem reserved page?!\n");
 			continue;
 		}
-		if ((chunk_size = is_head_of_free_region(page))) {
-			pfn += chunk_size - 1;
-			zone_pfn += chunk_size - 1;
+		BUG_ON(PageNosave(page));
+		if (PageNosaveFree(page))
 			continue;
-		}
 		save = kmalloc(sizeof(struct highmem_page), GFP_ATOMIC);
 		if (!save)
 			return -ENOMEM;
@@ -524,21 +521,16 @@
  *	We save a page if it's Reserved, and not in the range of pages
  *	statically defined as 'unsaveable', or if it isn't reserved, and
  *	isn't part of a free chunk of pages.
- *	If it is part of a free chunk, we update @pfn to point to the last 
- *	page of the chunk.
  */
 
 static int saveable(struct zone * zone, unsigned long * zone_pfn)
 {
 	unsigned long pfn = *zone_pfn + zone->zone_start_pfn;
-	unsigned long chunk_size;
 	struct page * page;
 
 	if (!pfn_valid(pfn))
 		return 0;
 
-	if (!(pfn%1000))
-		printk(".");
 	page = pfn_to_page(pfn);
 	BUG_ON(PageReserved(page) && PageNosave(page));
 	if (PageNosave(page))
@@ -547,10 +539,8 @@
 		pr_debug("[nosave pfn 0x%lx]", pfn);
 		return 0;
 	}
-	if ((chunk_size = is_head_of_free_region(page))) {
-		*zone_pfn += chunk_size - 1;
+	if (PageNosaveFree(page))
 		return 0;
-	}
 
 	return 1;
 }
@@ -563,10 +553,11 @@
 	nr_copy_pages = 0;
 
 	for_each_zone(zone) {
-		if (!is_highmem(zone)) {
-			for (zone_pfn = 0; zone_pfn < zone->spanned_pages; ++zone_pfn)
-				nr_copy_pages += saveable(zone, &zone_pfn);
-		}
+		if (is_highmem(zone))
+			continue;
+		mark_free_pages(zone);
+		for (zone_pfn = 0; zone_pfn < zone->spanned_pages; ++zone_pfn)
+			nr_copy_pages += saveable(zone, &zone_pfn);
 	}
 }
 
@@ -576,52 +567,25 @@
 	struct zone *zone;
 	unsigned long zone_pfn;
 	struct pbe * pbe = pagedir_nosave;
+	int to_copy = nr_copy_pages;
 	
 	for_each_zone(zone) {
-		if (!is_highmem(zone))
-			for (zone_pfn = 0; zone_pfn < zone->spanned_pages; ++zone_pfn) {
-				if (saveable(zone, &zone_pfn)) {
-					struct page * page;
-					page = pfn_to_page(zone_pfn + zone->zone_start_pfn);
-					pbe->orig_address = (long) page_address(page);
-					/* copy_page is no usable for copying task structs. */
-					memcpy((void *)pbe->address, (void *)pbe->orig_address, PAGE_SIZE);
-					pbe++;
-				}
-			}
-	}
-}
-
-
-static void free_suspend_pagedir_zone(struct zone *zone, unsigned long pagedir)
-{
-	unsigned long zone_pfn, pagedir_end, pagedir_pfn, pagedir_end_pfn;
-	pagedir_end = pagedir + (PAGE_SIZE << pagedir_order);
-	pagedir_pfn = __pa(pagedir) >> PAGE_SHIFT;
-	pagedir_end_pfn = __pa(pagedir_end) >> PAGE_SHIFT;
-	for (zone_pfn = 0; zone_pfn < zone->spanned_pages; ++zone_pfn) {
-		struct page *page;
-		unsigned long pfn = zone_pfn + zone->zone_start_pfn;
-		if (!pfn_valid(pfn))
-			continue;
-		page = pfn_to_page(pfn);
-		if (!TestClearPageNosave(page))
-			continue;
-		else if (pfn >= pagedir_pfn && pfn < pagedir_end_pfn)
+		if (is_highmem(zone))
 			continue;
-		__free_page(page);
-	}
-}
-
-void swsusp_free(void)
-{
-	unsigned long p = (unsigned long)pagedir_save;
-	struct zone *zone;
-	for_each_zone(zone) {
-		if (!is_highmem(zone))
-			free_suspend_pagedir_zone(zone, p);
+		mark_free_pages(zone);
+		for (zone_pfn = 0; zone_pfn < zone->spanned_pages; ++zone_pfn) {
+			if (saveable(zone, &zone_pfn)) {
+				struct page * page;
+				page = pfn_to_page(zone_pfn + zone->zone_start_pfn);
+				pbe->orig_address = (long) page_address(page);
+				/* copy_page is not usable for copying task structs. */
+				memcpy((void *)pbe->address, (void *)pbe->orig_address, PAGE_SIZE);
+				pbe++;
+				to_copy--;
+			}
+		}
 	}
-	free_pages(p, pagedir_order);
+	BUG_ON(to_copy);
 }
 
 
@@ -687,6 +651,24 @@
 	return 0;
 }
 
+/**
+ *	free_image_pages - Free pages allocated for snapshot
+ */
+
+static void free_image_pages(void)
+{
+	struct pbe * p;
+	int i;
+
+	p = pagedir_save;
+	for (i = 0, p = pagedir_save; i < nr_copy_pages; i++, p++) {
+		if (p->address) {
+			ClearPageNosave(virt_to_page(p->address));
+			free_page(p->address);
+			p->address = 0;
+		}
+	}
+}
 
 /**
  *	alloc_image_pages - Allocate pages for the snapshot.
@@ -700,18 +682,19 @@
 
 	for (i = 0, p = pagedir_save; i < nr_copy_pages; i++, p++) {
 		p->address = get_zeroed_page(GFP_ATOMIC | __GFP_COLD);
-		if(!p->address)
-			goto Error;
+		if (!p->address)
+			return -ENOMEM;
 		SetPageNosave(virt_to_page(p->address));
 	}
 	return 0;
- Error:
-	do { 
-		if (p->address)
-			free_page(p->address);
-		p->address = 0;
-	} while (p-- > pagedir_save);
-	return -ENOMEM;
+}
+
+void swsusp_free(void)
+{
+	BUG_ON(PageNosave(virt_to_page(pagedir_save)));
+	BUG_ON(PageNosaveFree(virt_to_page(pagedir_save)));
+	free_image_pages();
+	free_pages((unsigned long) pagedir_save, pagedir_order);
 }
 
 
@@ -786,7 +769,6 @@
 
 int suspend_prepare_image(void)
 {
-	unsigned int nr_needed_pages;
 	int error;
 
 	pr_debug("swsusp: critical section: \n");
@@ -799,7 +781,6 @@
 	drain_local_pages();
 	count_data_pages();
 	printk("swsusp: Need to copy %u pages\n",nr_copy_pages);
-	nr_needed_pages = nr_copy_pages + PAGES_FOR_IO;
 
 	error = swsusp_alloc();
 	if (error)
@@ -1003,24 +984,14 @@
 
 static atomic_t io_done = ATOMIC_INIT(0);
 
-static void start_io(void)
-{
-	atomic_set(&io_done,1);
-}
-
 static int end_io(struct bio * bio, unsigned int num, int err)
 {
-	atomic_set(&io_done,0);
+	if (!test_bit(BIO_UPTODATE, &bio->bi_flags))
+		panic("I/O error reading memory image");
+	atomic_set(&io_done, 0);
 	return 0;
 }
 
-static void wait_io(void)
-{
-	while(atomic_read(&io_done))
-		io_schedule();
-}
-
-
 static struct block_device * resume_bdev;
 
 /**
@@ -1055,9 +1026,12 @@
 
 	if (rw == WRITE)
 		bio_set_pages_dirty(bio);
-	start_io();
+
+	atomic_set(&io_done, 1);
 	submit_bio(rw | (1 << BIO_RW_SYNC), bio);
-	wait_io();
+	while (atomic_read(&io_done))
+		yield();
+
  Done:
 	bio_put(bio);
 	return error;
@@ -1113,6 +1087,7 @@
 		return -EPERM;
 	}
 	nr_copy_pages = swsusp_info.image_pages;
+	pagedir_order = get_bitmask_order(SUSPEND_PD_PAGES(nr_copy_pages));
 	return error;
 }
 
@@ -1179,9 +1154,7 @@
 	int i, n = swsusp_info.pagedir_pages;
 	int error = 0;
 
-	pagedir_order = get_bitmask_order(n);
-
-	addr =__get_free_pages(GFP_ATOMIC, pagedir_order);
+	addr = __get_free_pages(GFP_ATOMIC, pagedir_order);
 	if (!addr)
 		return -ENOMEM;
 	pagedir_nosave = (struct pbe *)addr;
@@ -1216,7 +1189,7 @@
 }
 
 /**
- *	pmdisk_read - Read saved image from swap.
+ *	swsusp_read - Read saved image from swap.
  */
 
 int __init swsusp_read(void)
@@ -1240,6 +1213,6 @@
 	if (!error)
 		pr_debug("Reading resume file was successful\n");
 	else
-		pr_debug("pmdisk: Error %d resuming\n", error);
+		pr_debug("swsusp: Error %d resuming\n", error);
 	return error;
 }
diff -Nru a/kernel/printk.c b/kernel/printk.c
--- a/kernel/printk.c	2005-01-10 20:11:23 -08:00
+++ b/kernel/printk.c	2005-01-10 20:11:23 -08:00
@@ -78,7 +78,7 @@
  * It is also used in interesting ways to provide interlocking in
  * release_console_sem().
  */
-static spinlock_t logbuf_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(logbuf_lock);
 
 static char __log_buf[__LOG_BUF_LEN];
 static char *log_buf = __log_buf;
@@ -284,6 +284,7 @@
 			error = __put_user(c,buf);
 			buf++;
 			i++;
+			cond_resched();
 			spin_lock_irq(&logbuf_lock);
 		}
 		spin_unlock_irq(&logbuf_lock);
@@ -325,6 +326,7 @@
 			c = LOG_BUF(j);
 			spin_unlock_irq(&logbuf_lock);
 			error = __put_user(c,&buf[count-1-i]);
+			cond_resched();
 			spin_lock_irq(&logbuf_lock);
 		}
 		spin_unlock_irq(&logbuf_lock);
@@ -340,6 +342,7 @@
 					error = -EFAULT;
 					break;
 				}
+				cond_resched();
 			}
 		}
 		break;
@@ -642,8 +645,9 @@
 		_con_start = con_start;
 		_log_end = log_end;
 		con_start = log_end;		/* Flush */
-		spin_unlock_irqrestore(&logbuf_lock, flags);
+		spin_unlock(&logbuf_lock);
 		call_console_drivers(_con_start, _log_end);
+		local_irq_restore(flags);
 	}
 	console_locked = 0;
 	console_may_schedule = 0;
@@ -871,7 +875,7 @@
  */
 int __printk_ratelimit(int ratelimit_jiffies, int ratelimit_burst)
 {
-	static spinlock_t ratelimit_lock = SPIN_LOCK_UNLOCKED;
+	static DEFINE_SPINLOCK(ratelimit_lock);
 	static unsigned long toks = 10*5*HZ;
 	static unsigned long last_msg;
 	static int missed;
diff -Nru a/kernel/profile.c b/kernel/profile.c
--- a/kernel/profile.c	2005-01-10 20:11:22 -08:00
+++ b/kernel/profile.c	2005-01-10 20:11:22 -08:00
@@ -83,7 +83,7 @@
 #ifdef CONFIG_PROFILING
  
 static DECLARE_RWSEM(profile_rwsem);
-static rwlock_t handoff_lock = RW_LOCK_UNLOCKED;
+static DEFINE_RWLOCK(handoff_lock);
 static struct notifier_block * task_exit_notifier;
 static struct notifier_block * task_free_notifier;
 static struct notifier_block * munmap_notifier;
@@ -326,17 +326,15 @@
 		node = cpu_to_node(cpu);
 		per_cpu(cpu_profile_flip, cpu) = 0;
 		if (!per_cpu(cpu_profile_hits, cpu)[1]) {
-			page = alloc_pages_node(node, GFP_KERNEL, 0);
+			page = alloc_pages_node(node, GFP_KERNEL | __GFP_ZERO, 0);
 			if (!page)
 				return NOTIFY_BAD;
-			clear_highpage(page);
 			per_cpu(cpu_profile_hits, cpu)[1] = page_address(page);
 		}
 		if (!per_cpu(cpu_profile_hits, cpu)[0]) {
-			page = alloc_pages_node(node, GFP_KERNEL, 0);
+			page = alloc_pages_node(node, GFP_KERNEL | __GFP_ZERO, 0);
 			if (!page)
 				goto out_free;
-			clear_highpage(page);
 			per_cpu(cpu_profile_hits, cpu)[0] = page_address(page);
 		}
 		break;
@@ -510,16 +508,14 @@
 		int node = cpu_to_node(cpu);
 		struct page *page;
 
-		page = alloc_pages_node(node, GFP_KERNEL, 0);
+		page = alloc_pages_node(node, GFP_KERNEL | __GFP_ZERO, 0);
 		if (!page)
 			goto out_cleanup;
-		clear_highpage(page);
 		per_cpu(cpu_profile_hits, cpu)[1]
 				= (struct profile_hit *)page_address(page);
-		page = alloc_pages_node(node, GFP_KERNEL, 0);
+		page = alloc_pages_node(node, GFP_KERNEL | __GFP_ZERO, 0);
 		if (!page)
 			goto out_cleanup;
-		clear_highpage(page);
 		per_cpu(cpu_profile_hits, cpu)[0]
 				= (struct profile_hit *)page_address(page);
 	}
diff -Nru a/kernel/ptrace.c b/kernel/ptrace.c
--- a/kernel/ptrace.c	2005-01-10 20:11:23 -08:00
+++ b/kernel/ptrace.c	2005-01-10 20:11:23 -08:00
@@ -45,6 +45,23 @@
 }
 
 /*
+ * Turn a tracing stop into a normal stop now, since with no tracer there
+ * would be no way to wake it up with SIGCONT or SIGKILL.  If there was a
+ * signal sent that would resume the child, but didn't because it was in
+ * TASK_TRACED, resume it now.
+ */
+void ptrace_untrace(task_t *child)
+{
+	spin_lock(&child->sighand->siglock);
+	child->state = TASK_STOPPED;
+	if (pending_resume_signal(&child->pending) ||
+	    pending_resume_signal(&child->signal->shared_pending)) {
+		signal_wake_up(child, 1);
+	}
+	spin_unlock(&child->sighand->siglock);
+}
+
+/*
  * unptrace a task: move it back to its original parent and
  * remove it from the ptrace list.
  *
@@ -55,29 +72,15 @@
 	if (!child->ptrace)
 		BUG();
 	child->ptrace = 0;
-	if (list_empty(&child->ptrace_list))
-		return;
-	list_del_init(&child->ptrace_list);
-	REMOVE_LINKS(child);
-	child->parent = child->real_parent;
-	SET_LINKS(child);
-
-	if (child->state == TASK_TRACED) {
-		/*
-		 * Turn a tracing stop into a normal stop now,
-		 * since with no tracer there would be no way
-		 * to wake it up with SIGCONT or SIGKILL.
-		 * If there was a signal sent that would resume the child,
-		 * but didn't because it was in TASK_TRACED, resume it now.
-		 */
-		spin_lock(&child->sighand->siglock);
-		child->state = TASK_STOPPED;
-		if (pending_resume_signal(&child->pending) ||
-		    pending_resume_signal(&child->signal->shared_pending)) {
-			signal_wake_up(child, 1);
-		}
-		spin_unlock(&child->sighand->siglock);
+	if (!list_empty(&child->ptrace_list)) {
+		list_del_init(&child->ptrace_list);
+		REMOVE_LINKS(child);
+		child->parent = child->real_parent;
+		SET_LINKS(child);
 	}
+
+	if (child->state == TASK_TRACED)
+		ptrace_untrace(child);
 }
 
 /*
diff -Nru a/kernel/rcupdate.c b/kernel/rcupdate.c
--- a/kernel/rcupdate.c	2005-01-10 20:11:15 -08:00
+++ b/kernel/rcupdate.c	2005-01-10 20:11:15 -08:00
@@ -49,9 +49,9 @@
 
 /* Definition for rcupdate control block. */
 struct rcu_ctrlblk rcu_ctrlblk = 
-	{ .cur = -300, .completed = -300 , .lock = SEQCNT_ZERO };
+	{ .cur = -300, .completed = -300 };
 struct rcu_ctrlblk rcu_bh_ctrlblk =
-	{ .cur = -300, .completed = -300 , .lock = SEQCNT_ZERO };
+	{ .cur = -300, .completed = -300 };
 
 /* Bookkeeping of the progress of the grace period */
 struct rcu_state {
@@ -60,9 +60,9 @@
 	                              /* for current batch to proceed.        */
 };
 
-struct rcu_state rcu_state ____cacheline_maxaligned_in_smp =
+static struct rcu_state rcu_state ____cacheline_maxaligned_in_smp =
 	  {.lock = SPIN_LOCK_UNLOCKED, .cpumask = CPU_MASK_NONE };
-struct rcu_state rcu_bh_state ____cacheline_maxaligned_in_smp =
+static struct rcu_state rcu_bh_state ____cacheline_maxaligned_in_smp =
 	  {.lock = SPIN_LOCK_UNLOCKED, .cpumask = CPU_MASK_NONE };
 
 DEFINE_PER_CPU(struct rcu_data, rcu_data) = { 0L };
@@ -185,10 +185,13 @@
 			rcp->completed == rcp->cur) {
 		/* Can't change, since spin lock held. */
 		cpus_andnot(rsp->cpumask, cpu_online_map, nohz_cpu_mask);
-		write_seqcount_begin(&rcp->lock);
+
 		rcp->next_pending = 0;
+		/* next_pending == 0 must be visible in __rcu_process_callbacks()
+		 * before it can see new value of cur.
+		 */
+		smp_wmb();
 		rcp->cur++;
-		write_seqcount_end(&rcp->lock);
 	}
 }
 
@@ -216,9 +219,9 @@
 			struct rcu_state *rsp, struct rcu_data *rdp)
 {
 	if (rdp->quiescbatch != rcp->cur) {
-		/* new grace period: record qsctr value. */
+		/* start new grace period: */
 		rdp->qs_pending = 1;
-		rdp->last_qsctr = rdp->qsctr;
+		rdp->passed_quiesc = 0;
 		rdp->quiescbatch = rcp->cur;
 		return;
 	}
@@ -231,11 +234,10 @@
 		return;
 
 	/* 
-	 * Races with local timer interrupt - in the worst case
-	 * we may miss one quiescent state of that CPU. That is
-	 * tolerable. So no need to disable interrupts.
+	 * Was there a quiescent state since the beginning of the grace
+	 * period? If no, then exit and wait for the next call.
 	 */
-	if (rdp->qsctr == rdp->last_qsctr)
+	if (!rdp->passed_quiesc)
 		return;
 	rdp->qs_pending = 0;
 
@@ -319,8 +321,6 @@
 
 	local_irq_disable();
 	if (rdp->nxtlist && !rdp->curlist) {
-		int next_pending, seq;
-
 		rdp->curlist = rdp->nxtlist;
 		rdp->curtail = rdp->nxttail;
 		rdp->nxtlist = NULL;
@@ -330,14 +330,15 @@
 		/*
 		 * start the next batch of callbacks
 		 */
-		do {
-			seq = read_seqcount_begin(&rcp->lock);
-			/* determine batch number */
-			rdp->batch = rcp->cur + 1;
-			next_pending = rcp->next_pending;
-		} while (read_seqcount_retry(&rcp->lock, seq));
 
-		if (!next_pending) {
+		/* determine batch number */
+		rdp->batch = rcp->cur + 1;
+		/* see the comment and corresponding wmb() in
+		 * the rcu_start_batch()
+		 */
+		smp_rmb();
+
+		if (!rcp->next_pending) {
 			/* and start it/schedule start if it's a new batch */
 			spin_lock(&rsp->lock);
 			rcu_start_batch(rcp, rsp, 1);
diff -Nru a/kernel/resource.c b/kernel/resource.c
--- a/kernel/resource.c	2005-01-10 20:11:20 -08:00
+++ b/kernel/resource.c	2005-01-10 20:11:20 -08:00
@@ -39,7 +39,7 @@
 
 EXPORT_SYMBOL(iomem_resource);
 
-static rwlock_t resource_lock = RW_LOCK_UNLOCKED;
+static DEFINE_RWLOCK(resource_lock);
 
 #ifdef CONFIG_PROC_FS
 
diff -Nru a/kernel/sched.c b/kernel/sched.c
--- a/kernel/sched.c	2005-01-10 20:11:21 -08:00
+++ b/kernel/sched.c	2005-01-10 20:11:21 -08:00
@@ -36,6 +36,7 @@
 #include <linux/blkdev.h>
 #include <linux/delay.h>
 #include <linux/smp.h>
+#include <linux/threads.h>
 #include <linux/timer.h>
 #include <linux/rcupdate.h>
 #include <linux/cpu.h>
@@ -48,12 +49,6 @@
 
 #include <asm/unistd.h>
 
-#ifdef CONFIG_NUMA
-#define cpu_to_node_mask(cpu) node_to_cpumask(cpu_to_node(cpu))
-#else
-#define cpu_to_node_mask(cpu) (cpu_online_map)
-#endif
-
 /*
  * Convert user-nice values [ -20 ... 0 ... 19 ]
  * to static priority [ MAX_RT_PRIO..MAX_PRIO-1 ],
@@ -97,7 +92,6 @@
 #define MAX_SLEEP_AVG		(DEF_TIMESLICE * MAX_BONUS)
 #define STARVATION_LIMIT	(MAX_SLEEP_AVG)
 #define NS_MAX_SLEEP_AVG	(JIFFIES_TO_NS(MAX_SLEEP_AVG))
-#define CREDIT_LIMIT		100
 
 /*
  * If a task is 'interactive' then we reinsert it in the active
@@ -131,12 +125,14 @@
 	(NS_TO_JIFFIES((p)->sleep_avg) * MAX_BONUS / \
 		MAX_SLEEP_AVG)
 
+#define GRANULARITY	(10 * HZ / 1000 ? : 1)
+
 #ifdef CONFIG_SMP
-#define TIMESLICE_GRANULARITY(p)	(MIN_TIMESLICE * \
+#define TIMESLICE_GRANULARITY(p)	(GRANULARITY * \
 		(1 << (((MAX_BONUS - CURRENT_BONUS(p)) ? : 1) - 1)) * \
 			num_online_cpus())
 #else
-#define TIMESLICE_GRANULARITY(p)	(MIN_TIMESLICE * \
+#define TIMESLICE_GRANULARITY(p)	(GRANULARITY * \
 		(1 << (((MAX_BONUS - CURRENT_BONUS(p)) ? : 1) - 1)))
 #endif
 
@@ -153,12 +149,6 @@
 	(JIFFIES_TO_NS(MAX_SLEEP_AVG * \
 		(MAX_BONUS / 2 + DELTA((p)) + 1) / MAX_BONUS - 1))
 
-#define HIGH_CREDIT(p) \
-	((p)->interactive_credit > CREDIT_LIMIT)
-
-#define LOW_CREDIT(p) \
-	((p)->interactive_credit < -CREDIT_LIMIT)
-
 #define TASK_PREEMPTS_CURR(p, rq) \
 	((p)->prio < (rq)->curr->prio)
 
@@ -448,11 +438,21 @@
 	return rq;
 }
 
-static inline void rq_unlock(runqueue_t *rq)
-	__releases(rq->lock)
+#ifdef CONFIG_SCHED_SMT
+static int cpu_and_siblings_are_idle(int cpu)
 {
-	spin_unlock_irq(&rq->lock);
+	int sib;
+	for_each_cpu_mask(sib, cpu_sibling_map[cpu]) {
+		if (idle_cpu(sib))
+			continue;
+		return 0;
+	}
+
+	return 1;
 }
+#else
+#define cpu_and_siblings_are_idle(A) idle_cpu(A)
+#endif
 
 #ifdef CONFIG_SCHEDSTATS
 /*
@@ -581,10 +581,14 @@
 }
 
 /*
- * Used by the migration code - we pull tasks from the head of the
- * remote queue so we want these tasks to show up at the head of the
- * local queue:
+ * Put task to the end of the run list without the overhead of dequeue
+ * followed by enqueue.
  */
+static void requeue_task(struct task_struct *p, prio_array_t *array)
+{
+	list_move_tail(&p->run_list, array->queue + p->prio);
+}
+
 static inline void enqueue_task_head(struct task_struct *p, prio_array_t *array)
 {
 	list_add(&p->run_list, array->queue + p->prio);
@@ -663,8 +667,6 @@
 			sleep_time > INTERACTIVE_SLEEP(p)) {
 				p->sleep_avg = JIFFIES_TO_NS(MAX_SLEEP_AVG -
 						DEF_TIMESLICE);
-				if (!HIGH_CREDIT(p))
-					p->interactive_credit++;
 		} else {
 			/*
 			 * The lower the sleep avg a task has the more
@@ -673,19 +675,11 @@
 			sleep_time *= (MAX_BONUS - CURRENT_BONUS(p)) ? : 1;
 
 			/*
-			 * Tasks with low interactive_credit are limited to
-			 * one timeslice worth of sleep avg bonus.
+			 * Tasks waking from uninterruptible sleep are
+			 * limited in their sleep_avg rise as they
+			 * are likely to be waiting on I/O
 			 */
-			if (LOW_CREDIT(p) &&
-			    sleep_time > JIFFIES_TO_NS(task_timeslice(p)))
-				sleep_time = JIFFIES_TO_NS(task_timeslice(p));
-
-			/*
-			 * Non high_credit tasks waking from uninterruptible
-			 * sleep are limited in their sleep_avg rise as they
-			 * are likely to be cpu hogs waiting on I/O
-			 */
-			if (p->activated == -1 && !HIGH_CREDIT(p) && p->mm) {
+			if (p->activated == -1 && p->mm) {
 				if (p->sleep_avg >= INTERACTIVE_SLEEP(p))
 					sleep_time = 0;
 				else if (p->sleep_avg + sleep_time >=
@@ -705,11 +699,8 @@
 			 */
 			p->sleep_avg += sleep_time;
 
-			if (p->sleep_avg > NS_MAX_SLEEP_AVG) {
+			if (p->sleep_avg > NS_MAX_SLEEP_AVG)
 				p->sleep_avg = NS_MAX_SLEEP_AVG;
-				if (!HIGH_CREDIT(p))
-					p->interactive_credit++;
-			}
 		}
 	}
 
@@ -934,9 +925,10 @@
 #endif
 
 /*
- * wake_idle() is useful especially on SMT architectures to wake a
- * task onto an idle sibling if we would otherwise wake it onto a
- * busy sibling.
+ * wake_idle() will wake a task on an idle cpu if task->cpu is
+ * not idle and an idle cpu is available.  The span of cpus to
+ * search starts with cpus closest then further out as needed,
+ * so we always favor a closer, idle cpu.
  *
  * Returns the CPU we should wake onto.
  */
@@ -944,24 +936,23 @@
 static int wake_idle(int cpu, task_t *p)
 {
 	cpumask_t tmp;
-	runqueue_t *rq = cpu_rq(cpu);
 	struct sched_domain *sd;
 	int i;
 
 	if (idle_cpu(cpu))
 		return cpu;
 
-	sd = rq->sd;
-	if (!(sd->flags & SD_WAKE_IDLE))
-		return cpu;
-
-	cpus_and(tmp, sd->span, p->cpus_allowed);
-
-	for_each_cpu_mask(i, tmp) {
-		if (idle_cpu(i))
-			return i;
+	for_each_domain(cpu, sd) {
+		if (sd->flags & SD_WAKE_IDLE) {
+			cpus_and(tmp, sd->span, cpu_online_map);
+			cpus_and(tmp, tmp, p->cpus_allowed);
+			for_each_cpu_mask(i, tmp) {
+				if (idle_cpu(i))
+					return i;
+			}
+		}
+		else break;
 	}
-
 	return cpu;
 }
 #else
@@ -1073,7 +1064,7 @@
 out_set_cpu:
 	schedstat_inc(rq, ttwu_attempts);
 	new_cpu = wake_idle(new_cpu, p);
-	if (new_cpu != cpu && cpu_isset(new_cpu, p->cpus_allowed)) {
+	if (new_cpu != cpu) {
 		schedstat_inc(rq, ttwu_moved);
 		set_task_cpu(p, new_cpu);
 		task_rq_unlock(rq, &flags);
@@ -1126,7 +1117,7 @@
 int fastcall wake_up_process(task_t * p)
 {
 	return try_to_wake_up(p, TASK_STOPPED | TASK_TRACED |
-		       		 TASK_INTERRUPTIBLE | TASK_UNINTERRUPTIBLE, 0);
+				 TASK_INTERRUPTIBLE | TASK_UNINTERRUPTIBLE, 0);
 }
 
 EXPORT_SYMBOL(wake_up_process);
@@ -1227,8 +1218,6 @@
 	p->sleep_avg = JIFFIES_TO_NS(CURRENT_BONUS(p) *
 		CHILD_PENALTY / 100 * MAX_SLEEP_AVG / MAX_BONUS);
 
-	p->interactive_credit = 0;
-
 	p->prio = effective_prio(p);
 
 	if (likely(cpu == this_cpu)) {
@@ -1667,13 +1656,18 @@
 	if (!cpu_isset(this_cpu, p->cpus_allowed))
 		return 0;
 
-	/* Aggressive migration if we've failed balancing */
-	if (idle == NEWLY_IDLE ||
-			sd->nr_balance_failed < sd->cache_nice_tries) {
-		if (task_hot(p, rq->timestamp_last_tick, sd))
-			return 0;
-	}
+	/*
+	 * Aggressive migration if:
+	 * 1) the [whole] cpu is idle, or
+	 * 2) too many balance attempts have failed.
+	 */
+
+	if (cpu_and_siblings_are_idle(this_cpu) || \
+			sd->nr_balance_failed > sd->cache_nice_tries)
+		return 1;
 
+	if (task_hot(p, rq->timestamp_last_tick, sd))
+			return 0;
 	return 1;
 }
 
@@ -2009,7 +2003,7 @@
 		if (sd->balance_interval < sd->max_interval)
 			sd->balance_interval++;
 	} else {
-                sd->nr_balance_failed = 0;
+		sd->nr_balance_failed = 0;
 
 		/* We were unbalanced, so reset the balancing interval */
 		sd->balance_interval = sd->min_interval;
@@ -2088,23 +2082,6 @@
 	}
 }
 
-#ifdef CONFIG_SCHED_SMT
-static int cpu_and_siblings_are_idle(int cpu)
-{
-	int sib;
-	for_each_cpu_mask(sib, cpu_sibling_map[cpu]) {
-		if (idle_cpu(sib))
-			continue;
-		return 0;
-	}
-
-	return 1;
-}
-#else
-#define cpu_and_siblings_are_idle(A) idle_cpu(A)
-#endif
-
-
 /*
  * active_load_balance is run by migration threads. It pushes running tasks
  * off the busiest CPU onto idle CPUs. It requires at least 1 task to be
@@ -2117,7 +2094,9 @@
 {
 	struct sched_domain *sd;
 	struct sched_group *cpu_group;
+	runqueue_t *target_rq;
 	cpumask_t visited_cpus;
+	int cpu;
 
 	schedstat_inc(busiest_rq, alb_cnt);
 	/*
@@ -2126,46 +2105,43 @@
 	 */
 	visited_cpus = CPU_MASK_NONE;
 	for_each_domain(busiest_cpu, sd) {
-		if (!(sd->flags & SD_LOAD_BALANCE) || busiest_rq->nr_running <= 1)
-			break; /* no more domains to search or no more tasks to move */
+		if (!(sd->flags & SD_LOAD_BALANCE))
+			/* no more domains to search */
+			break;
 
 		cpu_group = sd->groups;
-		do { /* sched_groups should either use list_heads or be merged into the domains structure */
-			int cpu, target_cpu = -1;
-			runqueue_t *target_rq;
-
+		do {
 			for_each_cpu_mask(cpu, cpu_group->cpumask) {
-				if (cpu_isset(cpu, visited_cpus) || cpu == busiest_cpu ||
-				    !cpu_and_siblings_are_idle(cpu)) {
-					cpu_set(cpu, visited_cpus);
+				if (busiest_rq->nr_running <= 1)
+					/* no more tasks left to move */
+					return;
+				if (cpu_isset(cpu, visited_cpus))
+					continue;
+				cpu_set(cpu, visited_cpus);
+				if (!cpu_and_siblings_are_idle(cpu) || cpu == busiest_cpu)
 					continue;
-				}
-				target_cpu = cpu;
-				break;
-			}
-			if (target_cpu == -1)
-				goto next_group; /* failed to find a suitable target cpu in this domain */
-
-			target_rq = cpu_rq(target_cpu);
-
-			/*
-			 * This condition is "impossible", if it occurs we need to fix it
-			 * Reported by Bjorn Helgaas on a 128-cpu setup.
-			 */
-			BUG_ON(busiest_rq == target_rq);
 
-			/* move a task from busiest_rq to target_rq */
-			double_lock_balance(busiest_rq, target_rq);
-			if (move_tasks(target_rq, target_cpu, busiest_rq, 1, sd, SCHED_IDLE)) {
-				schedstat_inc(busiest_rq, alb_lost);
-				schedstat_inc(target_rq, alb_gained);
-			} else {
-				schedstat_inc(busiest_rq, alb_failed);
+				target_rq = cpu_rq(cpu);
+				/*
+				 * This condition is "impossible", if it occurs
+				 * we need to fix it.  Originally reported by
+				 * Bjorn Helgaas on a 128-cpu setup.
+				 */
+				BUG_ON(busiest_rq == target_rq);
+
+				/* move a task from busiest_rq to target_rq */
+				double_lock_balance(busiest_rq, target_rq);
+				if (move_tasks(target_rq, cpu, busiest_rq,
+						1, sd, SCHED_IDLE)) {
+					schedstat_inc(busiest_rq, alb_lost);
+					schedstat_inc(target_rq, alb_gained);
+				} else {
+					schedstat_inc(busiest_rq, alb_failed);
+				}
+				spin_unlock(&target_rq->lock);
 			}
-			spin_unlock(&target_rq->lock);
-next_group:
 			cpu_group = cpu_group->next;
-		} while (cpu_group != sd->groups && busiest_rq->nr_running > 1);
+		} while (cpu_group != sd->groups);
 	}
 }
 
@@ -2342,8 +2318,7 @@
 			set_tsk_need_resched(p);
 
 			/* put it at the end of the queue: */
-			dequeue_task(p, rq->active);
-			enqueue_task(p, rq->active);
+			requeue_task(p, rq->active);
 		}
 		goto out_unlock;
 	}
@@ -2384,10 +2359,8 @@
 			(p->time_slice >= TIMESLICE_GRANULARITY(p)) &&
 			(p->array == rq->active)) {
 
-			dequeue_task(p, rq->active);
+			requeue_task(p, rq->active);
 			set_tsk_need_resched(p);
-			p->prio = effective_prio(p);
-			enqueue_task(p, rq->active);
 		}
 	}
 out_unlock:
@@ -2521,6 +2494,38 @@
 }
 #endif
 
+#if defined(CONFIG_PREEMPT) && defined(CONFIG_DEBUG_PREEMPT)
+
+void fastcall add_preempt_count(int val)
+{
+	/*
+	 * Underflow?
+	 */
+	BUG_ON(((int)preempt_count() < 0));
+	preempt_count() += val;
+	/*
+	 * Spinlock count overflowing soon?
+	 */
+	BUG_ON((preempt_count() & PREEMPT_MASK) >= PREEMPT_MASK-10);
+}
+EXPORT_SYMBOL(add_preempt_count);
+
+void fastcall sub_preempt_count(int val)
+{
+	/*
+	 * Underflow?
+	 */
+	BUG_ON(val > preempt_count());
+	/*
+	 * Is the spinlock portion underflowing?
+	 */
+	BUG_ON((val < PREEMPT_MASK) && !(preempt_count() & PREEMPT_MASK));
+	preempt_count() -= val;
+}
+EXPORT_SYMBOL(sub_preempt_count);
+
+#endif
+
 /*
  * schedule() is the main scheduler function.
  */
@@ -2540,7 +2545,7 @@
 	 * schedule() atomically, we ignore that path for now.
 	 * Otherwise, whine if we are scheduling when we should not be.
 	 */
-	if (likely(!(current->exit_state & (EXIT_DEAD | EXIT_ZOMBIE)))) {
+	if (likely(!current->exit_state)) {
 		if (unlikely(in_atomic())) {
 			printk(KERN_ERR "scheduling while atomic: "
 				"%s/0x%08x/%d\n",
@@ -2561,7 +2566,7 @@
 	 * The idle thread is not allowed to schedule!
 	 * Remove this check after it has been exercised a bit.
 	 */
-	if (unlikely(current == rq->idle) && current->state != TASK_RUNNING) {
+	if (unlikely(prev == rq->idle) && prev->state != TASK_RUNNING) {
 		printk(KERN_ERR "bad: scheduling from the idle thread!\n");
 		dump_stack();
 	}
@@ -2574,21 +2579,16 @@
 		run_time = NS_MAX_SLEEP_AVG;
 
 	/*
-	 * Tasks with interactive credits get charged less run_time
-	 * at high sleep_avg to delay them losing their interactive
-	 * status
+	 * Tasks charged proportionately less run_time at high sleep_avg to
+	 * delay them losing their interactive status
 	 */
-	if (HIGH_CREDIT(prev))
-		run_time /= (CURRENT_BONUS(prev) ? : 1);
+	run_time /= (CURRENT_BONUS(prev) ? : 1);
 
 	spin_lock_irq(&rq->lock);
 
-	if (unlikely(current->flags & PF_DEAD))
-		current->state = EXIT_DEAD;
-	/*
-	 * if entering off of a kernel preemption go straight
-	 * to picking the next task.
-	 */
+	if (unlikely(prev->flags & PF_DEAD))
+		prev->state = EXIT_DEAD;
+
 	switch_count = &prev->nivcsw;
 	if (prev->state && !(preempt_count() & PREEMPT_ACTIVE)) {
 		switch_count = &prev->nvcsw;
@@ -2670,11 +2670,8 @@
 	rcu_qsctr_inc(task_cpu(prev));
 
 	prev->sleep_avg -= run_time;
-	if ((long)prev->sleep_avg <= 0) {
+	if ((long)prev->sleep_avg <= 0)
 		prev->sleep_avg = 0;
-		if (!(HIGH_CREDIT(prev) || LOW_CREDIT(prev)))
-			prev->interactive_credit--;
-	}
 	prev->timestamp = prev->last_ran = now;
 
 	sched_info_switch(prev, next);
@@ -2711,7 +2708,10 @@
 asmlinkage void __sched preempt_schedule(void)
 {
 	struct thread_info *ti = current_thread_info();
-
+#ifdef CONFIG_PREEMPT_BKL
+	struct task_struct *task = current;
+	int saved_lock_depth;
+#endif
 	/*
 	 * If there is a non-zero preempt_count or interrupts are disabled,
 	 * we do not want to preempt the current task.  Just return..
@@ -2720,9 +2720,21 @@
 		return;
 
 need_resched:
-	ti->preempt_count = PREEMPT_ACTIVE;
+	add_preempt_count(PREEMPT_ACTIVE);
+	/*
+	 * We keep the big kernel semaphore locked, but we
+	 * clear ->lock_depth so that schedule() doesnt
+	 * auto-release the semaphore:
+	 */
+#ifdef CONFIG_PREEMPT_BKL
+	saved_lock_depth = task->lock_depth;
+	task->lock_depth = -1;
+#endif
 	schedule();
-	ti->preempt_count = 0;
+#ifdef CONFIG_PREEMPT_BKL
+	task->lock_depth = saved_lock_depth;
+#endif
+	sub_preempt_count(PREEMPT_ACTIVE);
 
 	/* we could miss a preemption opportunity between schedule and now */
 	barrier();
@@ -2955,7 +2967,7 @@
 	 */
 	rq = task_rq_lock(p, &flags);
 	/*
-	 * The RT priorities are set via setscheduler(), but we still
+	 * The RT priorities are set via sched_setscheduler(), but we still
 	 * allow the 'normal' nice value to be set - but as expected
 	 * it wont have any effect on scheduling until the task is
 	 * not SCHED_NORMAL:
@@ -3087,67 +3099,48 @@
 		p->prio = p->static_prio;
 }
 
-/*
- * setscheduler - change the scheduling policy and/or RT priority of a thread.
+/**
+ * sched_setscheduler - change the scheduling policy and/or RT priority of
+ * a thread.
+ * @p: the task in question.
+ * @policy: new policy.
+ * @param: structure containing the new RT priority.
  */
-static int setscheduler(pid_t pid, int policy, struct sched_param __user *param)
+int sched_setscheduler(struct task_struct *p, int policy, struct sched_param *param)
 {
-	struct sched_param lp;
-	int retval = -EINVAL;
+	int retval;
 	int oldprio, oldpolicy = -1;
 	prio_array_t *array;
 	unsigned long flags;
 	runqueue_t *rq;
-	task_t *p;
-
-	if (!param || pid < 0)
-		goto out_nounlock;
-
-	retval = -EFAULT;
-	if (copy_from_user(&lp, param, sizeof(struct sched_param)))
-		goto out_nounlock;
 
-	/*
-	 * We play safe to avoid deadlocks.
-	 */
-	read_lock_irq(&tasklist_lock);
-
-	p = find_process_by_pid(pid);
-
-	retval = -ESRCH;
-	if (!p)
-		goto out_unlock;
 recheck:
 	/* double check policy once rq lock held */
 	if (policy < 0)
 		policy = oldpolicy = p->policy;
-	else {
-		retval = -EINVAL;
-		if (policy != SCHED_FIFO && policy != SCHED_RR &&
+	else if (policy != SCHED_FIFO && policy != SCHED_RR &&
 				policy != SCHED_NORMAL)
-			goto out_unlock;
-	}
+			return -EINVAL;
 	/*
 	 * Valid priorities for SCHED_FIFO and SCHED_RR are
 	 * 1..MAX_USER_RT_PRIO-1, valid priority for SCHED_NORMAL is 0.
 	 */
-	retval = -EINVAL;
-	if (lp.sched_priority < 0 || lp.sched_priority > MAX_USER_RT_PRIO-1)
-		goto out_unlock;
-	if ((policy == SCHED_NORMAL) != (lp.sched_priority == 0))
-		goto out_unlock;
+	if (param->sched_priority < 0 ||
+	    param->sched_priority > MAX_USER_RT_PRIO-1)
+		return -EINVAL;
+	if ((policy == SCHED_NORMAL) != (param->sched_priority == 0))
+		return -EINVAL;
 
-	retval = -EPERM;
 	if ((policy == SCHED_FIFO || policy == SCHED_RR) &&
 	    !capable(CAP_SYS_NICE))
-		goto out_unlock;
+		return -EPERM;
 	if ((current->euid != p->euid) && (current->euid != p->uid) &&
 	    !capable(CAP_SYS_NICE))
-		goto out_unlock;
+		return -EPERM;
 
-	retval = security_task_setscheduler(p, policy, &lp);
+	retval = security_task_setscheduler(p, policy, param);
 	if (retval)
-		goto out_unlock;
+		return retval;
 	/*
 	 * To be able to change p->policy safely, the apropriate
 	 * runqueue lock must be held.
@@ -3161,12 +3154,11 @@
 	}
 	array = p->array;
 	if (array)
-		deactivate_task(p, task_rq(p));
-	retval = 0;
+		deactivate_task(p, rq);
 	oldprio = p->prio;
-	__setscheduler(p, policy, lp.sched_priority);
+	__setscheduler(p, policy, param->sched_priority);
 	if (array) {
-		__activate_task(p, task_rq(p));
+		__activate_task(p, rq);
 		/*
 		 * Reschedule if we are currently running on this runqueue and
 		 * our priority decreased, or if we are not currently running on
@@ -3179,22 +3171,41 @@
 			resched_task(rq->curr);
 	}
 	task_rq_unlock(rq, &flags);
-out_unlock:
+	return 0;
+}
+EXPORT_SYMBOL_GPL(sched_setscheduler);
+
+static int do_sched_setscheduler(pid_t pid, int policy, struct sched_param __user *param)
+{
+	int retval;
+	struct sched_param lparam;
+	struct task_struct *p;
+
+	if (!param || pid < 0)
+		return -EINVAL;
+	if (copy_from_user(&lparam, param, sizeof(struct sched_param)))
+		return -EFAULT;
+	read_lock_irq(&tasklist_lock);
+	p = find_process_by_pid(pid);
+	if (!p) {
+		read_unlock_irq(&tasklist_lock);
+		return -ESRCH;
+	}
+	retval = sched_setscheduler(p, policy, &lparam);
 	read_unlock_irq(&tasklist_lock);
-out_nounlock:
 	return retval;
 }
 
 /**
  * sys_sched_setscheduler - set/change the scheduler policy and RT priority
  * @pid: the pid in question.
- * @policy: new policy
+ * @policy: new policy.
  * @param: structure containing the new RT priority.
  */
 asmlinkage long sys_sched_setscheduler(pid_t pid, int policy,
 				       struct sched_param __user *param)
 {
-	return setscheduler(pid, policy, param);
+	return do_sched_setscheduler(pid, policy, param);
 }
 
 /**
@@ -3204,7 +3215,7 @@
  */
 asmlinkage long sys_sched_setparam(pid_t pid, struct sched_param __user *param)
 {
-	return setscheduler(pid, -1, param);
+	return do_sched_setscheduler(pid, -1, param);
 }
 
 /**
@@ -3435,8 +3446,14 @@
 	} else if (!rq->expired->nr_active)
 		schedstat_inc(rq, yld_exp_empty);
 
-	dequeue_task(current, array);
-	enqueue_task(current, target);
+	if (array != target) {
+		dequeue_task(current, array);
+		enqueue_task(current, target);
+	} else
+		/*
+		 * requeue_task is cheaper so perform that if possible.
+		 */
+		requeue_task(current, array);
 
 	/*
 	 * Since we are going to call schedule() anyway, there's
@@ -3451,13 +3468,71 @@
 	return 0;
 }
 
-void __sched __cond_resched(void)
+static inline void __cond_resched(void)
 {
-	set_current_state(TASK_RUNNING);
-	schedule();
+	do {
+		add_preempt_count(PREEMPT_ACTIVE);
+		schedule();
+		sub_preempt_count(PREEMPT_ACTIVE);
+	} while (need_resched());
 }
 
-EXPORT_SYMBOL(__cond_resched);
+int __sched cond_resched(void)
+{
+	if (need_resched()) {
+		__cond_resched();
+		return 1;
+	}
+	return 0;
+}
+
+EXPORT_SYMBOL(cond_resched);
+
+/*
+ * cond_resched_lock() - if a reschedule is pending, drop the given lock,
+ * call schedule, and on return reacquire the lock.
+ *
+ * This works OK both with and without CONFIG_PREEMPT.  We do strange low-level
+ * operations here to prevent schedule() from being called twice (once via
+ * spin_unlock(), once by hand).
+ */
+int cond_resched_lock(spinlock_t * lock)
+{
+#if defined(CONFIG_SMP) && defined(CONFIG_PREEMPT)
+	if (lock->break_lock) {
+		lock->break_lock = 0;
+		spin_unlock(lock);
+		cpu_relax();
+		spin_lock(lock);
+	}
+#endif
+	if (need_resched()) {
+		_raw_spin_unlock(lock);
+		preempt_enable_no_resched();
+		__cond_resched();
+		spin_lock(lock);
+		return 1;
+	}
+	return 0;
+}
+
+EXPORT_SYMBOL(cond_resched_lock);
+
+int __sched cond_resched_softirq(void)
+{
+	BUG_ON(!in_softirq());
+
+	if (need_resched()) {
+		__local_bh_enable();
+		__cond_resched();
+		local_bh_disable();
+		return 1;
+	}
+	return 0;
+}
+
+EXPORT_SYMBOL(cond_resched_softirq);
+
 
 /**
  * yield - yield the current processor to other threads.
@@ -3482,7 +3557,7 @@
  */
 void __sched io_schedule(void)
 {
-	struct runqueue *rq = this_rq();
+	struct runqueue *rq = &per_cpu(runqueues, _smp_processor_id());
 
 	atomic_inc(&rq->nr_iowait);
 	schedule();
@@ -3493,7 +3568,7 @@
 
 long __sched io_schedule_timeout(long timeout)
 {
-	struct runqueue *rq = this_rq();
+	struct runqueue *rq = &per_cpu(runqueues, _smp_processor_id());
 	long ret;
 
 	atomic_inc(&rq->nr_iowait);
@@ -3690,7 +3765,6 @@
 	unsigned long flags;
 
 	idle->sleep_avg = 0;
-	idle->interactive_credit = 0;
 	idle->array = NULL;
 	idle->prio = MAX_PRIO;
 	idle->state = TASK_RUNNING;
@@ -3702,7 +3776,7 @@
 	spin_unlock_irqrestore(&rq->lock, flags);
 
 	/* Set the preempt count _outside_ the spinlocks! */
-#ifdef CONFIG_PREEMPT
+#if defined(CONFIG_PREEMPT) && !defined(CONFIG_PREEMPT_BKL)
 	idle->thread_info->preempt_count = (idle->lock_depth >= 0);
 #else
 	idle->thread_info->preempt_count = 0;
@@ -3870,8 +3944,7 @@
 
 		if (req->type == REQ_MOVE_TASK) {
 			spin_unlock(&rq->lock);
-			__migrate_task(req->task, smp_processor_id(),
-					req->dest_cpu);
+			__migrate_task(req->task, cpu, req->dest_cpu);
 			local_irq_enable();
 		} else if (req->type == REQ_SET_DOMAIN) {
 			rq->sd = req->sd;
@@ -3995,6 +4068,20 @@
 	spin_unlock_irqrestore(&rq->lock, flags);
 }
 
+/* Ensures that the idle task is using init_mm right before its cpu goes
+ * offline.
+ */
+void idle_task_exit(void)
+{
+	struct mm_struct *mm = current->active_mm;
+
+	BUG_ON(cpu_online(smp_processor_id()));
+
+	if (mm != &init_mm)
+		switch_mm(mm, &init_mm, current);
+	mmdrop(mm);
+}
+
 static void migrate_dead(unsigned int dead_cpu, task_t *tsk)
 {
 	struct runqueue *rq = cpu_rq(dead_cpu);
@@ -4127,6 +4214,94 @@
 #endif
 
 #ifdef CONFIG_SMP
+#define SCHED_DOMAIN_DEBUG
+#ifdef SCHED_DOMAIN_DEBUG
+static void sched_domain_debug(struct sched_domain *sd, int cpu)
+{
+	int level = 0;
+
+	printk(KERN_DEBUG "CPU%d attaching sched-domain:\n", cpu);
+
+	do {
+		int i;
+		char str[NR_CPUS];
+		struct sched_group *group = sd->groups;
+		cpumask_t groupmask;
+
+		cpumask_scnprintf(str, NR_CPUS, sd->span);
+		cpus_clear(groupmask);
+
+		printk(KERN_DEBUG);
+		for (i = 0; i < level + 1; i++)
+			printk(" ");
+		printk("domain %d: ", level);
+
+		if (!(sd->flags & SD_LOAD_BALANCE)) {
+			printk("does not load-balance\n");
+			if (sd->parent)
+				printk(KERN_ERR "ERROR: !SD_LOAD_BALANCE domain has parent");
+			break;
+		}
+
+		printk("span %s\n", str);
+
+		if (!cpu_isset(cpu, sd->span))
+			printk(KERN_ERR "ERROR: domain->span does not contain CPU%d\n", cpu);
+		if (!cpu_isset(cpu, group->cpumask))
+			printk(KERN_ERR "ERROR: domain->groups does not contain CPU%d\n", cpu);
+
+		printk(KERN_DEBUG);
+		for (i = 0; i < level + 2; i++)
+			printk(" ");
+		printk("groups:");
+		do {
+			if (!group) {
+				printk("\n");
+				printk(KERN_ERR "ERROR: group is NULL\n");
+				break;
+			}
+
+			if (!group->cpu_power) {
+				printk("\n");
+				printk(KERN_ERR "ERROR: domain->cpu_power not set\n");
+			}
+
+			if (!cpus_weight(group->cpumask)) {
+				printk("\n");
+				printk(KERN_ERR "ERROR: empty group\n");
+			}
+
+			if (cpus_intersects(groupmask, group->cpumask)) {
+				printk("\n");
+				printk(KERN_ERR "ERROR: repeated CPUs\n");
+			}
+
+			cpus_or(groupmask, groupmask, group->cpumask);
+
+			cpumask_scnprintf(str, NR_CPUS, group->cpumask);
+			printk(" %s", str);
+
+			group = group->next;
+		} while (group != sd->groups);
+		printk("\n");
+
+		if (!cpus_equal(sd->span, groupmask))
+			printk(KERN_ERR "ERROR: groups don't span domain->span\n");
+
+		level++;
+		sd = sd->parent;
+
+		if (sd) {
+			if (!cpus_subset(groupmask, sd->span))
+				printk(KERN_ERR "ERROR: parent span is not a superset of domain->span\n");
+		}
+
+	} while (sd);
+}
+#else
+#define sched_domain_debug(sd, cpu) {}
+#endif
+
 /*
  * Attach the domain 'sd' to 'cpu' as its base domain.  Callers must
  * hold the hotplug lock.
@@ -4138,6 +4313,8 @@
 	runqueue_t *rq = cpu_rq(cpu);
 	int local = 1;
 
+	sched_domain_debug(sd, cpu);
+
 	spin_lock_irqsave(&rq->lock, flags);
 
 	if (cpu == smp_processor_id() || !cpu_online(cpu)) {
@@ -4169,7 +4346,8 @@
 	str = get_options(str, ARRAY_SIZE(ints), ints);
 	cpus_clear(cpu_isolated_map);
 	for (i = 1; i <= ints[0]; i++)
-		cpu_set(ints[i], cpu_isolated_map);
+		if (ints[i] < NR_CPUS)
+			cpu_set(ints[i], cpu_isolated_map);
 	return 1;
 }
 
@@ -4412,96 +4590,6 @@
 
 #endif /* ARCH_HAS_SCHED_DOMAIN */
 
-#define SCHED_DOMAIN_DEBUG
-#ifdef SCHED_DOMAIN_DEBUG
-static void sched_domain_debug(void)
-{
-	int i;
-
-	for_each_online_cpu(i) {
-		runqueue_t *rq = cpu_rq(i);
-		struct sched_domain *sd;
-		int level = 0;
-
-		sd = rq->sd;
-
-		printk(KERN_DEBUG "CPU%d:\n", i);
-
-		do {
-			int j;
-			char str[NR_CPUS];
-			struct sched_group *group = sd->groups;
-			cpumask_t groupmask;
-
-			cpumask_scnprintf(str, NR_CPUS, sd->span);
-			cpus_clear(groupmask);
-
-			printk(KERN_DEBUG);
-			for (j = 0; j < level + 1; j++)
-				printk(" ");
-			printk("domain %d: ", level);
-
-			if (!(sd->flags & SD_LOAD_BALANCE)) {
-				printk("does not load-balance");
-				if (sd->parent)
-					printk(" ERROR !SD_LOAD_BALANCE domain has parent");
-				printk("\n");
-				break;
-			}
-
-			printk("span %s\n", str);
-
-			if (!cpu_isset(i, sd->span))
-				printk(KERN_DEBUG "ERROR domain->span does not contain CPU%d\n", i);
-			if (!cpu_isset(i, group->cpumask))
-				printk(KERN_DEBUG "ERROR domain->groups does not contain CPU%d\n", i);
-
-			printk(KERN_DEBUG);
-			for (j = 0; j < level + 2; j++)
-				printk(" ");
-			printk("groups:");
-			do {
-				if (!group) {
-					printk(" ERROR: NULL");
-					break;
-				}
-				
-				if (!group->cpu_power)
-					printk(KERN_DEBUG "ERROR group->cpu_power not set\n");
-
-				if (!cpus_weight(group->cpumask))
-					printk(" ERROR empty group:");
-
-				if (cpus_intersects(groupmask, group->cpumask))
-					printk(" ERROR repeated CPUs:");
-
-				cpus_or(groupmask, groupmask, group->cpumask);
-
-				cpumask_scnprintf(str, NR_CPUS, group->cpumask);
-				printk(" %s", str);
-
-				group = group->next;
-			} while (group != sd->groups);
-			printk("\n");
-
-			if (!cpus_equal(sd->span, groupmask))
-				printk(KERN_DEBUG "ERROR groups don't span domain->span\n");
-
-			level++;
-			sd = sd->parent;
-
-			if (sd) {
-				if (!cpus_subset(groupmask, sd->span))
-					printk(KERN_DEBUG "ERROR parent span is not a superset of domain->span\n");
-			}
-
-		} while (sd);
-	}
-}
-#else
-#define sched_domain_debug() {}
-#endif
-
 /*
  * Initial dummy domain for early boot and for hotplug cpu. Being static,
  * it is initialized to zero, so all balancing flags are cleared which is
@@ -4544,8 +4632,6 @@
 	/* The hotplug lock is already held by cpu_up/cpu_down */
 	arch_init_sched_domains();
 
-	sched_domain_debug();
-
 	return NOTIFY_OK;
 }
 #endif
@@ -4554,7 +4640,6 @@
 {
 	lock_cpu_hotplug();
 	arch_init_sched_domains();
-	sched_domain_debug();
 	unlock_cpu_hotplug();
 	/* XXX: Theoretical race here - CPU may be hotplugged now */
 	hotcpu_notifier(update_sched_domains, 0);
@@ -4631,7 +4716,7 @@
 	static unsigned long prev_jiffy;	/* ratelimiting */
 
 	if ((in_atomic() || irqs_disabled()) &&
-	    system_state == SYSTEM_RUNNING) {
+	    system_state == SYSTEM_RUNNING && !oops_in_progress) {
 		if (time_before(jiffies, prev_jiffy + HZ) && prev_jiffy)
 			return;
 		prev_jiffy = jiffies;
diff -Nru a/kernel/signal.c b/kernel/signal.c
--- a/kernel/signal.c	2005-01-10 20:11:18 -08:00
+++ b/kernel/signal.c	2005-01-10 20:11:18 -08:00
@@ -153,11 +153,6 @@
 	(!T(signr, SIG_KERNEL_IGNORE_MASK|SIG_KERNEL_STOP_MASK) && \
 	 (t)->sighand->action[(signr)-1].sa.sa_handler == SIG_DFL)
 
-#define sig_avoid_stop_race() \
-	(sigtestsetmask(&current->pending.signal, M(SIGCONT) | M(SIGKILL)) || \
-	 sigtestsetmask(&current->signal->shared_pending.signal, \
-						  M(SIGCONT) | M(SIGKILL)))
-
 static int sig_ignored(struct task_struct *t, int sig)
 {
 	void __user * handler;
@@ -551,6 +546,21 @@
 	if (!signr)
 		signr = __dequeue_signal(&tsk->signal->shared_pending,
 					 mask, info);
+ 	if (signr && unlikely(sig_kernel_stop(signr))) {
+ 		/*
+ 		 * Set a marker that we have dequeued a stop signal.  Our
+ 		 * caller might release the siglock and then the pending
+ 		 * stop signal it is about to process is no longer in the
+ 		 * pending bitmasks, but must still be cleared by a SIGCONT
+ 		 * (and overruled by a SIGKILL).  So those cases clear this
+ 		 * shared flag after we've set it.  Note that this flag may
+ 		 * remain set after the signal we return is ignored or
+ 		 * handled.  That doesn't matter because its only purpose
+ 		 * is to alert stop-signal processing code when another
+ 		 * processor has come along and cleared the flag.
+ 		 */
+ 		tsk->signal->flags |= SIGNAL_STOP_DEQUEUED;
+ 	}
 	if ( signr &&
 	     ((info->si_code & __SI_MASK) == __SI_TIMER) &&
 	     info->si_sys_private){
@@ -651,6 +661,12 @@
 {
 	struct task_struct *t;
 
+	if (p->flags & SIGNAL_GROUP_EXIT)
+		/*
+		 * The process is in the middle of dying already.
+		 */
+		return;
+
 	if (sig_kernel_stop(sig)) {
 		/*
 		 * This is a stop signal.  Remove SIGCONT from all queues.
@@ -680,7 +696,7 @@
 			 * the SIGCHLD was pending on entry to this kill.
 			 */
 			p->signal->group_stop_count = 0;
-			p->signal->stop_state = 1;
+			p->signal->flags = SIGNAL_STOP_CONTINUED;
 			spin_unlock(&p->sighand->siglock);
 			if (p->ptrace & PT_PTRACED)
 				do_notify_parent_cldstop(p, p->parent,
@@ -722,12 +738,12 @@
 			t = next_thread(t);
 		} while (t != p);
 
-		if (p->signal->stop_state > 0) {
+		if (p->signal->flags & SIGNAL_STOP_STOPPED) {
 			/*
 			 * We were in fact stopped, and are now continued.
 			 * Notify the parent with CLD_CONTINUED.
 			 */
-			p->signal->stop_state = -1;
+			p->signal->flags = SIGNAL_STOP_CONTINUED;
 			p->signal->group_exit_code = 0;
 			spin_unlock(&p->sighand->siglock);
 			if (p->ptrace & PT_PTRACED)
@@ -739,7 +755,20 @@
 					p->group_leader->real_parent,
 							 CLD_CONTINUED);
 			spin_lock(&p->sighand->siglock);
+		} else {
+			/*
+			 * We are not stopped, but there could be a stop
+			 * signal in the middle of being processed after
+			 * being removed from the queue.  Clear that too.
+			 */
+			p->signal->flags = 0;
 		}
+	} else if (sig == SIGKILL) {
+		/*
+		 * Make sure that any pending stop signal already dequeued
+		 * is undone by the wakeup for SIGKILL.
+		 */
+		p->signal->flags = 0;
 	}
 }
 
@@ -905,10 +934,10 @@
 	struct task_struct *t;
 
 	/*
-	 * Don't bother zombies and stopped tasks (but
+	 * Don't bother traced and stopped tasks (but
 	 * SIGKILL will punch through stopped state)
 	 */
-	mask = EXIT_DEAD | EXIT_ZOMBIE | TASK_TRACED;
+	mask = TASK_TRACED;
 	if (sig != SIGKILL)
 		mask |= TASK_STOPPED;
 
@@ -953,7 +982,7 @@
 	 * Found a killable thread.  If the signal will be fatal,
 	 * then start taking the whole group down immediately.
 	 */
-	if (sig_fatal(p, sig) && !p->signal->group_exit &&
+	if (sig_fatal(p, sig) && !(p->signal->flags & SIGNAL_GROUP_EXIT) &&
 	    !sigismember(&t->real_blocked, sig) &&
 	    (sig == SIGKILL || !(t->ptrace & PT_PTRACED))) {
 		/*
@@ -966,7 +995,7 @@
 			 * running and doing things after a slower
 			 * thread has the fatal signal pending.
 			 */
-			p->signal->group_exit = 1;
+			p->signal->flags = SIGNAL_GROUP_EXIT;
 			p->signal->group_exit_code = sig;
 			p->signal->group_stop_count = 0;
 			t = p;
@@ -1055,6 +1084,7 @@
 {
 	struct task_struct *t;
 
+	p->signal->flags = SIGNAL_GROUP_EXIT;
 	p->signal->group_stop_count = 0;
 
 	if (thread_group_empty(p))
@@ -1064,7 +1094,7 @@
 		/*
 		 * Don't bother with already dead threads
 		 */
-		if (t->exit_state & (EXIT_ZOMBIE|EXIT_DEAD))
+		if (t->exit_state)
 			continue;
 
 		/*
@@ -1407,28 +1437,12 @@
 }
 
 /*
- * Joy. Or not. Pthread wants us to wake up every thread
- * in our parent group.
+ * Wake up any threads in the parent blocked in wait* syscalls.
  */
-static void __wake_up_parent(struct task_struct *p,
+static inline void __wake_up_parent(struct task_struct *p,
 				    struct task_struct *parent)
 {
-	struct task_struct *tsk = parent;
-
-	/*
-	 * Fortunately this is not necessary for thread groups:
-	 */
-	if (p->tgid == tsk->tgid) {
-		wake_up_interruptible_sync(&tsk->wait_chldexit);
-		return;
-	}
-
-	do {
-		wake_up_interruptible_sync(&tsk->wait_chldexit);
-		tsk = next_thread(tsk);
-		if (tsk->signal != parent->signal)
-			BUG();
-	} while (tsk != parent);
+	wake_up_interruptible_sync(&parent->signal->wait_chldexit);
 }
 
 /*
@@ -1551,11 +1565,12 @@
  * We always set current->last_siginfo while stopped here.
  * That makes it a way to test a stopped process for
  * being ptrace-stopped vs being job-control-stopped.
+ *
+ * If we actually decide not to stop at all because the tracer is gone,
+ * we leave nostop_code in current->exit_code.
  */
-static void ptrace_stop(int exit_code, siginfo_t *info)
+static void ptrace_stop(int exit_code, int nostop_code, siginfo_t *info)
 {
-	BUG_ON(!(current->ptrace & PT_PTRACED));
-
 	/*
 	 * If there is a group stop in progress,
 	 * we must participate in the bookkeeping.
@@ -1570,9 +1585,22 @@
 	set_current_state(TASK_TRACED);
 	spin_unlock_irq(&current->sighand->siglock);
 	read_lock(&tasklist_lock);
-	do_notify_parent_cldstop(current, current->parent, CLD_TRAPPED);
-	read_unlock(&tasklist_lock);
-	schedule();
+	if (likely(current->ptrace & PT_PTRACED) &&
+	    likely(current->parent != current->real_parent ||
+		   !(current->ptrace & PT_ATTACHED))) {
+		do_notify_parent_cldstop(current, current->parent,
+					 CLD_TRAPPED);
+		read_unlock(&tasklist_lock);
+		schedule();
+	} else {
+		/*
+		 * By the time we got the lock, our tracer went away.
+		 * Don't stop here.
+		 */
+		read_unlock(&tasklist_lock);
+		set_current_state(TASK_RUNNING);
+		current->exit_code = nostop_code;
+	}
 
 	/*
 	 * We are back.  Now reacquire the siglock before touching
@@ -1603,7 +1631,7 @@
 
 	/* Let the debugger run.  */
 	spin_lock_irq(&current->sighand->siglock);
-	ptrace_stop(exit_code, &info);
+	ptrace_stop(exit_code, 0, &info);
 	spin_unlock_irq(&current->sighand->siglock);
 }
 
@@ -1641,15 +1669,18 @@
 /*
  * This performs the stopping for SIGSTOP and other stop signals.
  * We have to stop all threads in the thread group.
+ * Returns nonzero if we've actually stopped and released the siglock.
+ * Returns zero if we didn't stop and still hold the siglock.
  */
-static void
+static int
 do_signal_stop(int signr)
 {
 	struct signal_struct *sig = current->signal;
 	struct sighand_struct *sighand = current->sighand;
 	int stop_count = -1;
 
-	/* spin_lock_irq(&sighand->siglock) is now done in caller */
+	if (!likely(sig->flags & SIGNAL_STOP_DEQUEUED))
+		return 0;
 
 	if (sig->group_stop_count > 0) {
 		/*
@@ -1661,7 +1692,7 @@
 		current->exit_code = signr;
 		set_current_state(TASK_STOPPED);
 		if (stop_count == 0)
-			sig->stop_state = 1;
+			sig->flags = SIGNAL_STOP_STOPPED;
 		spin_unlock_irq(&sighand->siglock);
 	}
 	else if (thread_group_empty(current)) {
@@ -1670,7 +1701,7 @@
 		 */
 		current->exit_code = current->signal->group_exit_code = signr;
 		set_current_state(TASK_STOPPED);
-		sig->stop_state = 1;
+		sig->flags = SIGNAL_STOP_STOPPED;
 		spin_unlock_irq(&sighand->siglock);
 	}
 	else {
@@ -1691,25 +1722,16 @@
 		read_lock(&tasklist_lock);
 		spin_lock_irq(&sighand->siglock);
 
-		if (unlikely(sig->group_exit)) {
+		if (!likely(sig->flags & SIGNAL_STOP_DEQUEUED)) {
 			/*
-			 * There is a group exit in progress now.
-			 * We'll just ignore the stop and process the
-			 * associated fatal signal.
+			 * Another stop or continue happened while we
+			 * didn't have the lock.  We can just swallow this
+			 * signal now.  If we raced with a SIGCONT, that
+			 * should have just cleared it now.  If we raced
+			 * with another processor delivering a stop signal,
+			 * then the SIGCONT that wakes us up should clear it.
 			 */
-			spin_unlock_irq(&sighand->siglock);
-			read_unlock(&tasklist_lock);
-			return;
-		}
-
-		if (unlikely(sig_avoid_stop_race())) {
-			/*
-			 * Either a SIGCONT or a SIGKILL signal was
-			 * posted in the siglock-not-held window.
-			 */
-			spin_unlock_irq(&sighand->siglock);
-			read_unlock(&tasklist_lock);
-			return;
+			return 0;
 		}
 
 		if (sig->group_stop_count == 0) {
@@ -1737,13 +1759,14 @@
 		current->exit_code = signr;
 		set_current_state(TASK_STOPPED);
 		if (stop_count == 0)
-			sig->stop_state = 1;
+			sig->flags = SIGNAL_STOP_STOPPED;
 
 		spin_unlock_irq(&sighand->siglock);
 		read_unlock(&tasklist_lock);
 	}
 
 	finish_stop(stop_count);
+	return 1;
 }
 
 /*
@@ -1765,7 +1788,7 @@
 		return 0;
 	}
 
-	if (current->signal->group_exit)
+	if (current->signal->flags & SIGNAL_GROUP_EXIT)
 		/*
 		 * Group stop is so another thread can do a core dump,
 		 * or else we are racing against a death signal.
@@ -1779,7 +1802,7 @@
 	 */
 	stop_count = --current->signal->group_stop_count;
 	if (stop_count == 0)
-		current->signal->stop_state = 1;
+		current->signal->flags = SIGNAL_STOP_STOPPED;
 	current->exit_code = current->signal->group_exit_code;
 	set_current_state(TASK_STOPPED);
 	spin_unlock_irq(&current->sighand->siglock);
@@ -1811,7 +1834,7 @@
 			ptrace_signal_deliver(regs, cookie);
 
 			/* Let the debugger run.  */
-			ptrace_stop(signr, info);
+			ptrace_stop(signr, signr, info);
 
 			/* We're back.  Did the debugger cancel the sig?  */
 			signr = current->exit_code;
@@ -1873,28 +1896,27 @@
 			 * This allows an intervening SIGCONT to be posted.
 			 * We need to check for that and bail out if necessary.
 			 */
-			if (signr == SIGSTOP) {
-				do_signal_stop(signr); /* releases siglock */
-				goto relock;
-			}
-			spin_unlock_irq(&current->sighand->siglock);
+			if (signr != SIGSTOP) {
+				spin_unlock_irq(&current->sighand->siglock);
 
-			/* signals can be posted during this window */
+				/* signals can be posted during this window */
 
-			if (is_orphaned_pgrp(process_group(current)))
-				goto relock;
+				if (is_orphaned_pgrp(process_group(current)))
+					goto relock;
 
-			spin_lock_irq(&current->sighand->siglock);
-			if (unlikely(sig_avoid_stop_race())) {
-				/*
-				 * Either a SIGCONT or a SIGKILL signal was
-				 * posted in the siglock-not-held window.
-				 */
-				continue;
+				spin_lock_irq(&current->sighand->siglock);
 			}
 
-			do_signal_stop(signr); /* releases siglock */
-			goto relock;
+			if (likely(do_signal_stop(signr))) {
+				/* It released the siglock.  */
+				goto relock;
+			}
+
+			/*
+			 * We didn't actually stop, due to a race
+			 * with SIGCONT or something like that.
+			 */
+			continue;
 		}
 
 		spin_unlock_irq(&current->sighand->siglock);
diff -Nru a/kernel/softirq.c b/kernel/softirq.c
--- a/kernel/softirq.c	2005-01-10 20:11:17 -08:00
+++ b/kernel/softirq.c	2005-01-10 20:11:17 -08:00
@@ -142,7 +142,7 @@
 	 * Keep preemption disabled until we are done with
 	 * softirq processing:
  	 */
-	preempt_count() -= SOFTIRQ_OFFSET - 1;
+ 	sub_preempt_count(SOFTIRQ_OFFSET - 1);
 
 	if (unlikely(!in_interrupt() && local_softirq_pending()))
 		do_softirq();
@@ -151,6 +151,23 @@
 	preempt_check_resched();
 }
 EXPORT_SYMBOL(local_bh_enable);
+
+#ifdef __ARCH_IRQ_EXIT_IRQS_DISABLED
+# define invoke_softirq()	__do_softirq()
+#else
+# define invoke_softirq()	do_softirq()
+#endif
+
+/*
+ * Exit an interrupt context. Process softirqs if needed and possible:
+ */
+void irq_exit(void)
+{
+	sub_preempt_count(IRQ_EXIT_OFFSET);
+	if (!in_interrupt() && local_softirq_pending())
+		invoke_softirq();
+	preempt_enable_no_resched();
+}
 
 /*
  * This function must run with irqs disabled!
diff -Nru a/kernel/spinlock.c b/kernel/spinlock.c
--- a/kernel/spinlock.c	2005-01-10 20:11:16 -08:00
+++ b/kernel/spinlock.c	2005-01-10 20:11:16 -08:00
@@ -2,6 +2,8 @@
  * Copyright (2004) Linus Torvalds
  *
  * Author: Zwane Mwaikambo <zwane@fsmlabs.com>
+ *
+ * Copyright (2004) Ingo Molnar
  */
 
 #include <linux/config.h>
@@ -11,6 +13,17 @@
 #include <linux/interrupt.h>
 #include <linux/module.h>
 
+/*
+ * Generic declaration of the raw read_trylock() function,
+ * architectures are supposed to optimize this:
+ */
+int __lockfunc generic_raw_read_trylock(rwlock_t *lock)
+{
+	_raw_read_lock(lock);
+	return 1;
+}
+EXPORT_SYMBOL(generic_raw_read_trylock);
+
 int __lockfunc _spin_trylock(spinlock_t *lock)
 {
 	preempt_disable();
@@ -22,86 +35,29 @@
 }
 EXPORT_SYMBOL(_spin_trylock);
 
-int __lockfunc _write_trylock(rwlock_t *lock)
+int __lockfunc _read_trylock(rwlock_t *lock)
 {
 	preempt_disable();
-	if (_raw_write_trylock(lock))
+	if (_raw_read_trylock(lock))
 		return 1;
 
 	preempt_enable();
 	return 0;
 }
-EXPORT_SYMBOL(_write_trylock);
-
-#ifdef CONFIG_PREEMPT
-/*
- * This could be a long-held lock.  If another CPU holds it for a long time,
- * and that CPU is not asked to reschedule then *this* CPU will spin on the
- * lock for a long time, even if *this* CPU is asked to reschedule.
- *
- * So what we do here, in the slow (contended) path is to spin on the lock by
- * hand while permitting preemption.
- *
- * Called inside preempt_disable().
- */
-static inline void __preempt_spin_lock(spinlock_t *lock)
-{
-	if (preempt_count() > 1) {
-		_raw_spin_lock(lock);
-		return;
-	}
-
-	do {
-		preempt_enable();
-		while (spin_is_locked(lock))
-			cpu_relax();
-		preempt_disable();
-	} while (!_raw_spin_trylock(lock));
-}
+EXPORT_SYMBOL(_read_trylock);
 
-void __lockfunc _spin_lock(spinlock_t *lock)
+int __lockfunc _write_trylock(rwlock_t *lock)
 {
 	preempt_disable();
-	if (unlikely(!_raw_spin_trylock(lock)))
-		__preempt_spin_lock(lock);
-}
-
-static inline void __preempt_write_lock(rwlock_t *lock)
-{
-	if (preempt_count() > 1) {
-		_raw_write_lock(lock);
-		return;
-	}
-
-	do {
-		preempt_enable();
-		while (rwlock_is_locked(lock))
-			cpu_relax();
-		preempt_disable();
-	} while (!_raw_write_trylock(lock));
-}
+	if (_raw_write_trylock(lock))
+		return 1;
 
-void __lockfunc _write_lock(rwlock_t *lock)
-{
-	preempt_disable();
-	if (unlikely(!_raw_write_trylock(lock)))
-		__preempt_write_lock(lock);
-}
-#else
-void __lockfunc _spin_lock(spinlock_t *lock)
-{
-	preempt_disable();
-	_raw_spin_lock(lock);
+	preempt_enable();
+	return 0;
 }
+EXPORT_SYMBOL(_write_trylock);
 
-void __lockfunc _write_lock(rwlock_t *lock)
-{
-	preempt_disable();
-	_raw_write_lock(lock);
-}
-#endif
-EXPORT_SYMBOL(_spin_lock);
-EXPORT_SYMBOL(_write_lock);
+#ifndef CONFIG_PREEMPT
 
 void __lockfunc _read_lock(rwlock_t *lock)
 {
@@ -110,27 +66,6 @@
 }
 EXPORT_SYMBOL(_read_lock);
 
-void __lockfunc _spin_unlock(spinlock_t *lock)
-{
-	_raw_spin_unlock(lock);
-	preempt_enable();
-}
-EXPORT_SYMBOL(_spin_unlock);
-
-void __lockfunc _write_unlock(rwlock_t *lock)
-{
-	_raw_write_unlock(lock);
-	preempt_enable();
-}
-EXPORT_SYMBOL(_write_unlock);
-
-void __lockfunc _read_unlock(rwlock_t *lock)
-{
-	_raw_read_unlock(lock);
-	preempt_enable();
-}
-EXPORT_SYMBOL(_read_unlock);
-
 unsigned long __lockfunc _spin_lock_irqsave(spinlock_t *lock)
 {
 	unsigned long flags;
@@ -211,6 +146,130 @@
 	_raw_write_lock(lock);
 }
 EXPORT_SYMBOL(_write_lock_bh);
+
+void __lockfunc _spin_lock(spinlock_t *lock)
+{
+	preempt_disable();
+	_raw_spin_lock(lock);
+}
+
+EXPORT_SYMBOL(_spin_lock);
+
+void __lockfunc _write_lock(rwlock_t *lock)
+{
+	preempt_disable();
+	_raw_write_lock(lock);
+}
+
+EXPORT_SYMBOL(_write_lock);
+
+#else /* CONFIG_PREEMPT: */
+
+/*
+ * This could be a long-held lock. We both prepare to spin for a long
+ * time (making _this_ CPU preemptable if possible), and we also signal
+ * towards that other CPU that it should break the lock ASAP.
+ *
+ * (We do this in a function because inlining it would be excessive.)
+ */
+
+#define BUILD_LOCK_OPS(op, locktype)					\
+void __lockfunc _##op##_lock(locktype *lock)				\
+{									\
+	preempt_disable();						\
+	for (;;) {							\
+		if (likely(_raw_##op##_trylock(lock)))			\
+			break;						\
+		preempt_enable();					\
+		if (!(lock)->break_lock)				\
+			(lock)->break_lock = 1;				\
+		cpu_relax();						\
+		preempt_disable();					\
+	}								\
+}									\
+									\
+EXPORT_SYMBOL(_##op##_lock);						\
+									\
+unsigned long __lockfunc _##op##_lock_irqsave(locktype *lock)		\
+{									\
+	unsigned long flags;						\
+									\
+	preempt_disable();						\
+	for (;;) {							\
+		local_irq_save(flags);					\
+		if (likely(_raw_##op##_trylock(lock)))			\
+			break;						\
+		local_irq_restore(flags);				\
+									\
+		preempt_enable();					\
+		if (!(lock)->break_lock)				\
+			(lock)->break_lock = 1;				\
+		cpu_relax();						\
+		preempt_disable();					\
+	}								\
+	return flags;							\
+}									\
+									\
+EXPORT_SYMBOL(_##op##_lock_irqsave);					\
+									\
+void __lockfunc _##op##_lock_irq(locktype *lock)			\
+{									\
+	_##op##_lock_irqsave(lock);					\
+}									\
+									\
+EXPORT_SYMBOL(_##op##_lock_irq);					\
+									\
+void __lockfunc _##op##_lock_bh(locktype *lock)				\
+{									\
+	unsigned long flags;						\
+									\
+	/*							*/	\
+	/* Careful: we must exclude softirqs too, hence the	*/	\
+	/* irq-disabling. We use the generic preemption-aware	*/	\
+	/* function:						*/	\
+	/**/								\
+	flags = _##op##_lock_irqsave(lock);				\
+	local_bh_disable();						\
+	local_irq_restore(flags);					\
+}									\
+									\
+EXPORT_SYMBOL(_##op##_lock_bh)
+
+/*
+ * Build preemption-friendly versions of the following
+ * lock-spinning functions:
+ *
+ *         _[spin|read|write]_lock()
+ *         _[spin|read|write]_lock_irq()
+ *         _[spin|read|write]_lock_irqsave()
+ *         _[spin|read|write]_lock_bh()
+ */
+BUILD_LOCK_OPS(spin, spinlock_t);
+BUILD_LOCK_OPS(read, rwlock_t);
+BUILD_LOCK_OPS(write, rwlock_t);
+
+#endif /* CONFIG_PREEMPT */
+
+void __lockfunc _spin_unlock(spinlock_t *lock)
+{
+	_raw_spin_unlock(lock);
+	preempt_enable();
+}
+EXPORT_SYMBOL(_spin_unlock);
+
+void __lockfunc _write_unlock(rwlock_t *lock)
+{
+	_raw_write_unlock(lock);
+	preempt_enable();
+}
+EXPORT_SYMBOL(_write_unlock);
+
+void __lockfunc _read_unlock(rwlock_t *lock)
+{
+	_raw_read_unlock(lock);
+	preempt_enable();
+}
+EXPORT_SYMBOL(_read_unlock);
 
 void __lockfunc _spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags)
 {
diff -Nru a/kernel/stop_machine.c b/kernel/stop_machine.c
--- a/kernel/stop_machine.c	2005-01-10 20:11:16 -08:00
+++ b/kernel/stop_machine.c	2005-01-10 20:11:16 -08:00
@@ -95,7 +95,7 @@
 	stopmachine_state = STOPMACHINE_WAIT;
 
 	for_each_online_cpu(i) {
-		if (i == smp_processor_id())
+		if (i == _smp_processor_id())
 			continue;
 		ret = kernel_thread(stopmachine, (void *)(long)i,CLONE_KERNEL);
 		if (ret < 0)
@@ -177,7 +177,7 @@
 
 	/* If they don't care which CPU fn runs on, bind to any online one. */
 	if (cpu == NR_CPUS)
-		cpu = smp_processor_id();
+		cpu = _smp_processor_id();
 
 	p = kthread_create(do_stop, &smdata, "kstopmachine");
 	if (!IS_ERR(p)) {
diff -Nru a/kernel/sys.c b/kernel/sys.c
--- a/kernel/sys.c	2005-01-10 20:11:16 -08:00
+++ b/kernel/sys.c	2005-01-10 20:11:16 -08:00
@@ -23,6 +23,7 @@
 #include <linux/security.h>
 #include <linux/dcookies.h>
 #include <linux/suspend.h>
+#include <linux/tty.h>
 
 #include <linux/compat.h>
 #include <linux/syscalls.h>
@@ -88,7 +89,7 @@
  */
 
 static struct notifier_block *reboot_notifier_list;
-rwlock_t notifier_lock = RW_LOCK_UNLOCKED;
+DEFINE_RWLOCK(notifier_lock);
 
 /**
  *	notifier_chain_register	- Add notifier to a notifier chain
@@ -1075,6 +1076,7 @@
 	if (!thread_group_leader(current))
 		return -EINVAL;
 
+	down(&tty_sem);
 	write_lock_irq(&tasklist_lock);
 
 	pid = find_pid(PIDTYPE_PGID, current->pid);
@@ -1088,6 +1090,7 @@
 	err = process_group(current);
 out:
 	write_unlock_irq(&tasklist_lock);
+	up(&tty_sem);
 	return err;
 }
 
@@ -1687,6 +1690,15 @@
 						sizeof(me->comm)-1) < 0)
 				return -EFAULT;
 			set_task_comm(me, ncomm);
+			return 0;
+		}
+		case PR_GET_NAME: {
+			struct task_struct *me = current;
+			unsigned char tcomm[sizeof(me->comm)];
+
+			get_task_comm(tcomm, me);
+			if (copy_to_user((char __user *)arg2, tcomm, sizeof(tcomm)))
+				return -EFAULT;
 			return 0;
 		}
 		default:
diff -Nru a/kernel/sysctl.c b/kernel/sysctl.c
--- a/kernel/sysctl.c	2005-01-10 20:11:16 -08:00
+++ b/kernel/sysctl.c	2005-01-10 20:11:16 -08:00
@@ -52,7 +52,6 @@
 #if defined(CONFIG_SYSCTL)
 
 /* External variables not in a header file. */
-extern int panic_timeout;
 extern int C_A_D;
 extern int sysctl_overcommit_memory;
 extern int sysctl_overcommit_ratio;
@@ -624,6 +623,16 @@
 		.proc_handler   = &proc_unknown_nmi_panic,
 	},
 #endif
+#if defined(CONFIG_X86)
+	{
+		.ctl_name	= KERN_BOOTLOADER_TYPE,
+		.procname	= "bootloader_type",
+		.data		= &bootloader_type,
+		.maxlen		= sizeof (int),
+		.mode		= 0444,
+		.proc_handler	= &proc_dointvec,
+	},
+#endif
 	{ .ctl_name = 0 }
 };
 
@@ -755,6 +764,7 @@
 		.strategy	= &sysctl_intvec,
 		.extra1		= &zero,
 	},
+#ifdef CONFIG_MMU
 	{
 		.ctl_name	= VM_MAX_MAP_COUNT,
 		.procname	= "max_map_count",
@@ -763,6 +773,7 @@
 		.mode		= 0644,
 		.proc_handler	= &proc_dointvec
 	},
+#endif
 	{
 		.ctl_name	= VM_LAPTOP_MODE,
 		.procname	= "laptop_mode",
@@ -904,6 +915,7 @@
 		.proc_handler	= &proc_dointvec,
 	},
 #endif
+#ifdef CONFIG_MMU
 	{
 		.ctl_name	= FS_LEASE_TIME,
 		.procname	= "lease-break-time",
@@ -928,6 +940,7 @@
 		.mode		= 0644,
 		.proc_handler	= &proc_dointvec,
 	},
+#endif
 	{ .ctl_name = 0 }
 };
 
diff -Nru a/kernel/time.c b/kernel/time.c
--- a/kernel/time.c	2005-01-10 20:11:17 -08:00
+++ b/kernel/time.c	2005-01-10 20:11:17 -08:00
@@ -33,6 +33,7 @@
 #include <linux/smp_lock.h>
 #include <linux/syscalls.h>
 #include <linux/security.h>
+#include <linux/fs.h>
 
 #include <asm/uaccess.h>
 #include <asm/unistd.h>
@@ -52,12 +53,10 @@
  * sys_gettimeofday().  Is this for backwards compatibility?  If so,
  * why not move it into the appropriate arch directory (for those
  * architectures that need it).
- *
- * XXX This function is NOT 64-bit clean!
  */
-asmlinkage long sys_time(int __user * tloc)
+asmlinkage long sys_time(time_t __user * tloc)
 {
-	int i;
+	time_t i;
 	struct timeval tv;
 
 	do_gettimeofday(&tv);
@@ -417,7 +416,7 @@
 	return copy_to_user(txc_p, &txc, sizeof(struct timex)) ? -EFAULT : ret;
 }
 
-struct timespec current_kernel_time(void)
+inline struct timespec current_kernel_time(void)
 {
         struct timespec now;
         unsigned long seq;
@@ -432,6 +431,50 @@
 }
 
 EXPORT_SYMBOL(current_kernel_time);
+
+/**
+ * current_fs_time - Return FS time
+ * @sb: Superblock.
+ *
+ * Return the current time truncated to the time granuality supported by
+ * the fs.
+ */
+struct timespec current_fs_time(struct super_block *sb)
+{
+	struct timespec now = current_kernel_time();
+	return timespec_trunc(now, sb->s_time_gran);
+}
+EXPORT_SYMBOL(current_fs_time);
+
+/**
+ * timespec_trunc - Truncate timespec to a granuality
+ * @t: Timespec
+ * @gran: Granuality in ns.
+ *
+ * Truncate a timespec to a granuality. gran must be smaller than a second.
+ * Always rounds down.
+ *
+ * This function should be only used for timestamps returned by
+ * current_kernel_time() or CURRENT_TIME, not with do_gettimeofday() because
+ * it doesn't handle the better resolution of the later.
+ */
+struct timespec timespec_trunc(struct timespec t, unsigned gran)
+{
+	/*
+	 * Division is pretty slow so avoid it for common cases.
+	 * Currently current_kernel_time() never returns better than
+	 * jiffies resolution. Exploit that.
+	 */
+	if (gran <= jiffies_to_usecs(1) * 1000) {
+		/* nothing */
+	} else if (gran == 1000000000) {
+		t.tv_nsec = 0;
+	} else {
+		t.tv_nsec -= t.tv_nsec % gran;
+	}
+	return t;
+}
+EXPORT_SYMBOL(timespec_trunc);
 
 #ifdef CONFIG_TIME_INTERPOLATION
 void getnstimeofday (struct timespec *tv)
diff -Nru a/kernel/timer.c b/kernel/timer.c
--- a/kernel/timer.c	2005-01-10 20:11:21 -08:00
+++ b/kernel/timer.c	2005-01-10 20:11:21 -08:00
@@ -465,7 +465,14 @@
 			smp_wmb();
 			timer->base = NULL;
 			spin_unlock_irq(&base->lock);
-			fn(data);
+			{
+				u32 preempt_count = preempt_count();
+				fn(data);
+				if (preempt_count != preempt_count()) {
+					printk("huh, entered %p with %08x, exited with %08x?\n", fn, preempt_count, preempt_count());
+					BUG();
+				}
+			}
 			spin_lock_irq(&base->lock);
 			goto repeat;
 		}
@@ -554,7 +561,7 @@
 /* 
  * The current time 
  * wall_to_monotonic is what we need to add to xtime (or xtime corrected 
- * for sub jiffie times) to get to monotonic time.  Monotonic is pegged at zero
+ * for sub jiffie times) to get to monotonic time.  Monotonic is pegged
  * at zero at system boot time, so wall_to_monotonic will be negative,
  * however, we will ALWAYS keep the tv_nsec part positive so we can use
  * the usual normalization.
@@ -806,7 +813,7 @@
 
 	psecs = (p->utime += user);
 	psecs += (p->stime += system);
-	if (p->signal && !unlikely(p->state & (EXIT_DEAD|EXIT_ZOMBIE)) &&
+	if (p->signal && !unlikely(p->exit_state) &&
 	    psecs / HZ >= p->signal->rlim[RLIMIT_CPU].rlim_cur) {
 		/* Send SIGXCPU every second.. */
 		if (!(psecs % HZ))
@@ -1438,7 +1445,7 @@
 
 struct time_interpolator *time_interpolator;
 static struct time_interpolator *time_interpolator_list;
-static spinlock_t time_interpolator_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(time_interpolator_lock);
 
 static inline u64 time_interpolator_get_cycles(unsigned int src)
 {
diff -Nru a/kernel/user.c b/kernel/user.c
--- a/kernel/user.c	2005-01-10 20:11:18 -08:00
+++ b/kernel/user.c	2005-01-10 20:11:18 -08:00
@@ -26,7 +26,7 @@
 
 static kmem_cache_t *uid_cachep;
 static struct list_head uidhash_table[UIDHASH_SZ];
-static spinlock_t uidhash_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(uidhash_lock);
 
 struct user_struct root_user = {
 	.__count	= ATOMIC_INIT(1),
diff -Nru a/kernel/workqueue.c b/kernel/workqueue.c
--- a/kernel/workqueue.c	2005-01-10 20:11:23 -08:00
+++ b/kernel/workqueue.c	2005-01-10 20:11:23 -08:00
@@ -8,7 +8,7 @@
  *
  * Derived from the taskqueue/keventd code by:
  *
- *   David Woodhouse <dwmw2@redhat.com>
+ *   David Woodhouse <dwmw2@infradead.org>
  *   Andrew Morton <andrewm@uow.edu.au>
  *   Kai Petzke <wpp@marie.physik.tu-berlin.de>
  *   Theodore Ts'o <tytso@mit.edu>
@@ -64,7 +64,7 @@
 
 /* All the per-cpu workqueues on the system, for hotplug cpu to add/remove
    threads to each one as cpus come/go. */
-static spinlock_t workqueue_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(workqueue_lock);
 static LIST_HEAD(workqueues);
 
 /* If it's single threaded, it isn't in the list of workqueues. */
@@ -188,7 +188,7 @@
 
 	current->flags |= PF_NOFREEZE;
 
-	set_user_nice(current, -10);
+	set_user_nice(current, -5);
 
 	/* Block and flush all signals */
 	sigfillset(&blocked);
diff -Nru a/lib/Kconfig.debug b/lib/Kconfig.debug
--- a/lib/Kconfig.debug	2005-01-10 20:11:21 -08:00
+++ b/lib/Kconfig.debug	2005-01-10 20:11:21 -08:00
@@ -48,6 +48,16 @@
 	  allocation as well as poisoning memory on free to catch use of freed
 	  memory. This can make kmalloc/kfree-intensive workloads much slower.
 
+config DEBUG_PREEMPT
+	bool "Debug preemptible kernel"
+	depends on PREEMPT && X86
+	default y
+	help
+	  If you say Y here then the kernel will use a debug variant of the
+	  commonly used smp_processor_id() function and will print warnings
+	  if kernel code uses it in a preemption-unsafe way. Also, the kernel
+	  will detect preemption count underflows.
+
 config DEBUG_SPINLOCK
 	bool "Spinlock debugging"
 	depends on DEBUG_KERNEL && (ALPHA || ARM || X86 || IA64 || M32R || MIPS || PARISC || PPC32 || (SUPERH && !SUPERH64) || SPARC32 || SPARC64 || USERMODE || X86_64)
@@ -79,8 +89,9 @@
 	  Disable for production systems.
 
 config DEBUG_BUGVERBOSE
-	bool "Verbose BUG() reporting (adds 70K)"
-	depends on DEBUG_KERNEL && (ARM || ARM26 || M32R || M68K || SPARC32 || SPARC64)
+	bool "Verbose BUG() reporting (adds 70K)" if DEBUG_KERNEL && EMBEDDED
+	depends on ARM || ARM26 || M32R || M68K || SPARC32 || SPARC64 || (X86 && !X86_64)
+	default !EMBEDDED
 	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
@@ -106,6 +117,16 @@
 
         If you're truly short on disk space or don't expect to report any
         bugs back to the UML developers, say N, otherwise say Y.
+
+config DEBUG_FS
+	bool "Debug Filesystem"
+	depends on DEBUG_KERNEL
+	help
+	  debugfs is a virtual file system that kernel developers use to put
+	  debugging files into.  Enable this option to be able to read and
+	  write to these files.
+
+	  If unsure, say N.
 
 if !X86_64
 config FRAME_POINTER
diff -Nru a/lib/Makefile b/lib/Makefile
--- a/lib/Makefile	2005-01-10 20:11:16 -08:00
+++ b/lib/Makefile	2005-01-10 20:11:16 -08:00
@@ -5,7 +5,7 @@
 lib-y := errno.o ctype.o string.o vsprintf.o cmdline.o \
 	 bust_spinlocks.o rbtree.o radix-tree.o dump_stack.o \
 	 kobject.o kref.o idr.o div64.o parser.o int_sqrt.o \
-	 bitmap.o extable.o kobject_uevent.o
+	 bitmap.o extable.o kobject_uevent.o prio_tree.o
 
 ifeq ($(CONFIG_DEBUG_KOBJECT),y)
 CFLAGS_kobject.o += -DDEBUG
@@ -14,6 +14,7 @@
 
 lib-$(CONFIG_RWSEM_GENERIC_SPINLOCK) += rwsem-spinlock.o
 lib-$(CONFIG_RWSEM_XCHGADD_ALGORITHM) += rwsem.o
+lib-$(CONFIG_GENERIC_FIND_NEXT_BIT) += find_next_bit.o
 obj-$(CONFIG_LOCK_KERNEL) += kernel_lock.o
 
 ifneq ($(CONFIG_HAVE_DEC_LOCK),y) 
diff -Nru a/lib/find_next_bit.c b/lib/find_next_bit.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/lib/find_next_bit.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,55 @@
+/* find_next_bit.c: fallback find next bit implementation
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/bitops.h>
+
+int find_next_bit(const unsigned long *addr, int size, int offset)
+{
+	const unsigned long *base;
+	const int NBITS = sizeof(*addr) * 8;
+	unsigned long tmp;
+
+	base = addr;
+	if (offset) {
+		int suboffset;
+
+		addr += offset / NBITS;
+
+		suboffset = offset % NBITS;
+		if (suboffset) {
+			tmp = *addr;
+			tmp >>= suboffset;
+			if (tmp)
+				goto finish;
+		}
+
+		addr++;
+	}
+
+	while ((tmp = *addr) == 0)
+		addr++;
+
+	offset = (addr - base) * NBITS;
+
+ finish:
+	/* count the remaining bits without using __ffs() since that takes a 32-bit arg */
+	while (!(tmp & 0xff)) {
+		offset += 8;
+		tmp >>= 8;
+	}
+
+	while (!(tmp & 1)) {
+		offset++;
+		tmp >>= 1;
+	}
+
+	return offset;
+}
diff -Nru a/lib/kernel_lock.c b/lib/kernel_lock.c
--- a/lib/kernel_lock.c	2005-01-10 20:11:19 -08:00
+++ b/lib/kernel_lock.c	2005-01-10 20:11:19 -08:00
@@ -7,6 +7,141 @@
  */
 #include <linux/smp_lock.h>
 #include <linux/module.h>
+#include <linux/kallsyms.h>
+
+#if defined(CONFIG_PREEMPT) && defined(__smp_processor_id) && \
+		defined(CONFIG_DEBUG_PREEMPT)
+
+/*
+ * Debugging check.
+ */
+unsigned int smp_processor_id(void)
+{
+	unsigned long preempt_count = preempt_count();
+	int this_cpu = __smp_processor_id();
+	cpumask_t this_mask;
+
+	if (likely(preempt_count))
+		goto out;
+
+	if (irqs_disabled())
+		goto out;
+
+	/*
+	 * Kernel threads bound to a single CPU can safely use
+	 * smp_processor_id():
+	 */
+	this_mask = cpumask_of_cpu(this_cpu);
+
+	if (cpus_equal(current->cpus_allowed, this_mask))
+		goto out;
+
+	/*
+	 * It is valid to assume CPU-locality during early bootup:
+	 */
+	if (system_state != SYSTEM_RUNNING)
+		goto out;
+
+	/*
+	 * Avoid recursion:
+	 */
+	preempt_disable();
+
+	if (!printk_ratelimit())
+		goto out_enable;
+
+	printk(KERN_ERR "BUG: using smp_processor_id() in preemptible [%08x] code: %s/%d\n", preempt_count(), current->comm, current->pid);
+	print_symbol("caller is %s\n", (long)__builtin_return_address(0));
+	dump_stack();
+
+out_enable:
+	preempt_enable_no_resched();
+out:
+	return this_cpu;
+}
+
+EXPORT_SYMBOL(smp_processor_id);
+
+#endif /* PREEMPT && __smp_processor_id && DEBUG_PREEMPT */
+
+#ifdef CONFIG_PREEMPT_BKL
+/*
+ * The 'big kernel semaphore'
+ *
+ * This mutex is taken and released recursively by lock_kernel()
+ * and unlock_kernel().  It is transparently dropped and reaquired
+ * over schedule().  It is used to protect legacy code that hasn't
+ * been migrated to a proper locking design yet.
+ *
+ * Note: code locked by this semaphore will only be serialized against
+ * other code using the same locking facility. The code guarantees that
+ * the task remains on the same CPU.
+ *
+ * Don't use in new code.
+ */
+DECLARE_MUTEX(kernel_sem);
+
+/*
+ * Re-acquire the kernel semaphore.
+ *
+ * This function is called with preemption off.
+ *
+ * We are executing in schedule() so the code must be extremely careful
+ * about recursion, both due to the down() and due to the enabling of
+ * preemption. schedule() will re-check the preemption flag after
+ * reacquiring the semaphore.
+ */
+int __lockfunc __reacquire_kernel_lock(void)
+{
+	struct task_struct *task = current;
+	int saved_lock_depth = task->lock_depth;
+
+	BUG_ON(saved_lock_depth < 0);
+
+	task->lock_depth = -1;
+	preempt_enable_no_resched();
+
+	down(&kernel_sem);
+
+	preempt_disable();
+	task->lock_depth = saved_lock_depth;
+
+	return 0;
+}
+
+void __lockfunc __release_kernel_lock(void)
+{
+	up(&kernel_sem);
+}
+
+/*
+ * Getting the big kernel semaphore.
+ */
+void __lockfunc lock_kernel(void)
+{
+	struct task_struct *task = current;
+	int depth = task->lock_depth + 1;
+
+	if (likely(!depth))
+		/*
+		 * No recursion worries - we set up lock_depth _after_
+		 */
+		down(&kernel_sem);
+
+	task->lock_depth = depth;
+}
+
+void __lockfunc unlock_kernel(void)
+{
+	struct task_struct *task = current;
+
+	BUG_ON(task->lock_depth < 0);
+
+	if (likely(--task->lock_depth < 0))
+		up(&kernel_sem);
+}
+
+#else
 
 /*
  * The 'big kernel lock'
@@ -34,7 +169,7 @@
  * (This works on UP too - _raw_spin_trylock will never
  * return false in that case)
  */
-int __lockfunc get_kernel_lock(void)
+int __lockfunc __reacquire_kernel_lock(void)
 {
 	while (!_raw_spin_trylock(&kernel_flag)) {
 		if (test_thread_flag(TIF_NEED_RESCHED))
@@ -45,7 +180,7 @@
 	return 0;
 }
 
-void __lockfunc put_kernel_lock(void)
+void __lockfunc __release_kernel_lock(void)
 {
 	_raw_spin_unlock(&kernel_flag);
 	preempt_enable_no_resched();
@@ -122,5 +257,8 @@
 		__unlock_kernel();
 }
 
+#endif
+
 EXPORT_SYMBOL(lock_kernel);
 EXPORT_SYMBOL(unlock_kernel);
+
diff -Nru a/lib/kobject_uevent.c b/lib/kobject_uevent.c
--- a/lib/kobject_uevent.c	2005-01-10 20:11:19 -08:00
+++ b/lib/kobject_uevent.c	2005-01-10 20:11:19 -08:00
@@ -179,7 +179,7 @@
 #ifdef CONFIG_HOTPLUG
 char hotplug_path[HOTPLUG_PATH_LEN] = "/sbin/hotplug";
 u64 hotplug_seqnum;
-static spinlock_t sequence_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(sequence_lock);
 
 /**
  * kobject_hotplug - notify userspace by executing /sbin/hotplug
diff -Nru a/lib/prio_tree.c b/lib/prio_tree.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/lib/prio_tree.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,484 @@
+/*
+ * lib/prio_tree.c - priority search tree
+ *
+ * Copyright (C) 2004, Rajesh Venkatasubramanian <vrajesh@umich.edu>
+ *
+ * This file is released under the GPL v2.
+ *
+ * Based on the radix priority search tree proposed by Edward M. McCreight
+ * SIAM Journal of Computing, vol. 14, no.2, pages 257-276, May 1985
+ *
+ * 02Feb2004	Initial version
+ */
+
+#include <linux/init.h>
+#include <linux/mm.h>
+#include <linux/prio_tree.h>
+
+/*
+ * A clever mix of heap and radix trees forms a radix priority search tree (PST)
+ * which is useful for storing intervals, e.g, we can consider a vma as a closed
+ * interval of file pages [offset_begin, offset_end], and store all vmas that
+ * map a file in a PST. Then, using the PST, we can answer a stabbing query,
+ * i.e., selecting a set of stored intervals (vmas) that overlap with (map) a
+ * given input interval X (a set of consecutive file pages), in "O(log n + m)"
+ * time where 'log n' is the height of the PST, and 'm' is the number of stored
+ * intervals (vmas) that overlap (map) with the input interval X (the set of
+ * consecutive file pages).
+ *
+ * In our implementation, we store closed intervals of the form [radix_index,
+ * heap_index]. We assume that always radix_index <= heap_index. McCreight's PST
+ * is designed for storing intervals with unique radix indices, i.e., each
+ * interval have different radix_index. However, this limitation can be easily
+ * overcome by using the size, i.e., heap_index - radix_index, as part of the
+ * index, so we index the tree using [(radix_index,size), heap_index].
+ *
+ * When the above-mentioned indexing scheme is used, theoretically, in a 32 bit
+ * machine, the maximum height of a PST can be 64. We can use a balanced version
+ * of the priority search tree to optimize the tree height, but the balanced
+ * tree proposed by McCreight is too complex and memory-hungry for our purpose.
+ */
+
+/*
+ * The following macros are used for implementing prio_tree for i_mmap
+ */
+
+#define RADIX_INDEX(vma)  ((vma)->vm_pgoff)
+#define VMA_SIZE(vma)	  (((vma)->vm_end - (vma)->vm_start) >> PAGE_SHIFT)
+/* avoid overflow */
+#define HEAP_INDEX(vma)	  ((vma)->vm_pgoff + (VMA_SIZE(vma) - 1))
+
+
+static void get_index(const struct prio_tree_root *root,
+    const struct prio_tree_node *node,
+    unsigned long *radix, unsigned long *heap)
+{
+	if (root->raw) {
+		struct vm_area_struct *vma = prio_tree_entry(
+		    node, struct vm_area_struct, shared.prio_tree_node);
+
+		*radix = RADIX_INDEX(vma);
+		*heap = HEAP_INDEX(vma);
+	}
+	else {
+		*radix = node->start;
+		*heap = node->last;
+	}
+}
+
+static unsigned long index_bits_to_maxindex[BITS_PER_LONG];
+
+void __init prio_tree_init(void)
+{
+	unsigned int i;
+
+	for (i = 0; i < ARRAY_SIZE(index_bits_to_maxindex) - 1; i++)
+		index_bits_to_maxindex[i] = (1UL << (i + 1)) - 1;
+	index_bits_to_maxindex[ARRAY_SIZE(index_bits_to_maxindex) - 1] = ~0UL;
+}
+
+/*
+ * Maximum heap_index that can be stored in a PST with index_bits bits
+ */
+static inline unsigned long prio_tree_maxindex(unsigned int bits)
+{
+	return index_bits_to_maxindex[bits - 1];
+}
+
+/*
+ * Extend a priority search tree so that it can store a node with heap_index
+ * max_heap_index. In the worst case, this algorithm takes O((log n)^2).
+ * However, this function is used rarely and the common case performance is
+ * not bad.
+ */
+static struct prio_tree_node *prio_tree_expand(struct prio_tree_root *root,
+		struct prio_tree_node *node, unsigned long max_heap_index)
+{
+	struct prio_tree_node *first = NULL, *prev, *last = NULL;
+
+	if (max_heap_index > prio_tree_maxindex(root->index_bits))
+		root->index_bits++;
+
+	while (max_heap_index > prio_tree_maxindex(root->index_bits)) {
+		root->index_bits++;
+
+		if (prio_tree_empty(root))
+			continue;
+
+		if (first == NULL) {
+			first = root->prio_tree_node;
+			prio_tree_remove(root, root->prio_tree_node);
+			INIT_PRIO_TREE_NODE(first);
+			last = first;
+		} else {
+			prev = last;
+			last = root->prio_tree_node;
+			prio_tree_remove(root, root->prio_tree_node);
+			INIT_PRIO_TREE_NODE(last);
+			prev->left = last;
+			last->parent = prev;
+		}
+	}
+
+	INIT_PRIO_TREE_NODE(node);
+
+	if (first) {
+		node->left = first;
+		first->parent = node;
+	} else
+		last = node;
+
+	if (!prio_tree_empty(root)) {
+		last->left = root->prio_tree_node;
+		last->left->parent = last;
+	}
+
+	root->prio_tree_node = node;
+	return node;
+}
+
+/*
+ * Replace a prio_tree_node with a new node and return the old node
+ */
+struct prio_tree_node *prio_tree_replace(struct prio_tree_root *root,
+		struct prio_tree_node *old, struct prio_tree_node *node)
+{
+	INIT_PRIO_TREE_NODE(node);
+
+	if (prio_tree_root(old)) {
+		BUG_ON(root->prio_tree_node != old);
+		/*
+		 * We can reduce root->index_bits here. However, it is complex
+		 * and does not help much to improve performance (IMO).
+		 */
+		node->parent = node;
+		root->prio_tree_node = node;
+	} else {
+		node->parent = old->parent;
+		if (old->parent->left == old)
+			old->parent->left = node;
+		else
+			old->parent->right = node;
+	}
+
+	if (!prio_tree_left_empty(old)) {
+		node->left = old->left;
+		old->left->parent = node;
+	}
+
+	if (!prio_tree_right_empty(old)) {
+		node->right = old->right;
+		old->right->parent = node;
+	}
+
+	return old;
+}
+
+/*
+ * Insert a prio_tree_node @node into a radix priority search tree @root. The
+ * algorithm typically takes O(log n) time where 'log n' is the number of bits
+ * required to represent the maximum heap_index. In the worst case, the algo
+ * can take O((log n)^2) - check prio_tree_expand.
+ *
+ * If a prior node with same radix_index and heap_index is already found in
+ * the tree, then returns the address of the prior node. Otherwise, inserts
+ * @node into the tree and returns @node.
+ */
+struct prio_tree_node *prio_tree_insert(struct prio_tree_root *root,
+		struct prio_tree_node *node)
+{
+	struct prio_tree_node *cur, *res = node;
+	unsigned long radix_index, heap_index;
+	unsigned long r_index, h_index, index, mask;
+	int size_flag = 0;
+
+	get_index(root, node, &radix_index, &heap_index);
+
+	if (prio_tree_empty(root) ||
+			heap_index > prio_tree_maxindex(root->index_bits))
+		return prio_tree_expand(root, node, heap_index);
+
+	cur = root->prio_tree_node;
+	mask = 1UL << (root->index_bits - 1);
+
+	while (mask) {
+		get_index(root, cur, &r_index, &h_index);
+
+		if (r_index == radix_index && h_index == heap_index)
+			return cur;
+
+                if (h_index < heap_index ||
+		    (h_index == heap_index && r_index > radix_index)) {
+			struct prio_tree_node *tmp = node;
+			node = prio_tree_replace(root, cur, node);
+			cur = tmp;
+			/* swap indices */
+			index = r_index;
+			r_index = radix_index;
+			radix_index = index;
+			index = h_index;
+			h_index = heap_index;
+			heap_index = index;
+		}
+
+		if (size_flag)
+			index = heap_index - radix_index;
+		else
+			index = radix_index;
+
+		if (index & mask) {
+			if (prio_tree_right_empty(cur)) {
+				INIT_PRIO_TREE_NODE(node);
+				cur->right = node;
+				node->parent = cur;
+				return res;
+			} else
+				cur = cur->right;
+		} else {
+			if (prio_tree_left_empty(cur)) {
+				INIT_PRIO_TREE_NODE(node);
+				cur->left = node;
+				node->parent = cur;
+				return res;
+			} else
+				cur = cur->left;
+		}
+
+		mask >>= 1;
+
+		if (!mask) {
+			mask = 1UL << (BITS_PER_LONG - 1);
+			size_flag = 1;
+		}
+	}
+	/* Should not reach here */
+	BUG();
+	return NULL;
+}
+
+/*
+ * Remove a prio_tree_node @node from a radix priority search tree @root. The
+ * algorithm takes O(log n) time where 'log n' is the number of bits required
+ * to represent the maximum heap_index.
+ */
+void prio_tree_remove(struct prio_tree_root *root, struct prio_tree_node *node)
+{
+	struct prio_tree_node *cur;
+	unsigned long r_index, h_index_right, h_index_left;
+
+	cur = node;
+
+	while (!prio_tree_left_empty(cur) || !prio_tree_right_empty(cur)) {
+		if (!prio_tree_left_empty(cur))
+			get_index(root, cur->left, &r_index, &h_index_left);
+		else {
+			cur = cur->right;
+			continue;
+		}
+
+		if (!prio_tree_right_empty(cur))
+			get_index(root, cur->right, &r_index, &h_index_right);
+		else {
+			cur = cur->left;
+			continue;
+		}
+
+		/* both h_index_left and h_index_right cannot be 0 */
+		if (h_index_left >= h_index_right)
+			cur = cur->left;
+		else
+			cur = cur->right;
+	}
+
+	if (prio_tree_root(cur)) {
+		BUG_ON(root->prio_tree_node != cur);
+		__INIT_PRIO_TREE_ROOT(root, root->raw);
+		return;
+	}
+
+	if (cur->parent->right == cur)
+		cur->parent->right = cur->parent;
+	else
+		cur->parent->left = cur->parent;
+
+	while (cur != node)
+		cur = prio_tree_replace(root, cur->parent, cur);
+}
+
+/*
+ * Following functions help to enumerate all prio_tree_nodes in the tree that
+ * overlap with the input interval X [radix_index, heap_index]. The enumeration
+ * takes O(log n + m) time where 'log n' is the height of the tree (which is
+ * proportional to # of bits required to represent the maximum heap_index) and
+ * 'm' is the number of prio_tree_nodes that overlap the interval X.
+ */
+
+static struct prio_tree_node *prio_tree_left(struct prio_tree_iter *iter,
+		unsigned long *r_index, unsigned long *h_index)
+{
+	if (prio_tree_left_empty(iter->cur))
+		return NULL;
+
+	get_index(iter->root, iter->cur->left, r_index, h_index);
+
+	if (iter->r_index <= *h_index) {
+		iter->cur = iter->cur->left;
+		iter->mask >>= 1;
+		if (iter->mask) {
+			if (iter->size_level)
+				iter->size_level++;
+		} else {
+			if (iter->size_level) {
+				BUG_ON(!prio_tree_left_empty(iter->cur));
+				BUG_ON(!prio_tree_right_empty(iter->cur));
+				iter->size_level++;
+				iter->mask = ULONG_MAX;
+			} else {
+				iter->size_level = 1;
+				iter->mask = 1UL << (BITS_PER_LONG - 1);
+			}
+		}
+		return iter->cur;
+	}
+
+	return NULL;
+}
+
+static struct prio_tree_node *prio_tree_right(struct prio_tree_iter *iter,
+		unsigned long *r_index, unsigned long *h_index)
+{
+	unsigned long value;
+
+	if (prio_tree_right_empty(iter->cur))
+		return NULL;
+
+	if (iter->size_level)
+		value = iter->value;
+	else
+		value = iter->value | iter->mask;
+
+	if (iter->h_index < value)
+		return NULL;
+
+	get_index(iter->root, iter->cur->right, r_index, h_index);
+
+	if (iter->r_index <= *h_index) {
+		iter->cur = iter->cur->right;
+		iter->mask >>= 1;
+		iter->value = value;
+		if (iter->mask) {
+			if (iter->size_level)
+				iter->size_level++;
+		} else {
+			if (iter->size_level) {
+				BUG_ON(!prio_tree_left_empty(iter->cur));
+				BUG_ON(!prio_tree_right_empty(iter->cur));
+				iter->size_level++;
+				iter->mask = ULONG_MAX;
+			} else {
+				iter->size_level = 1;
+				iter->mask = 1UL << (BITS_PER_LONG - 1);
+			}
+		}
+		return iter->cur;
+	}
+
+	return NULL;
+}
+
+static struct prio_tree_node *prio_tree_parent(struct prio_tree_iter *iter)
+{
+	iter->cur = iter->cur->parent;
+	if (iter->mask == ULONG_MAX)
+		iter->mask = 1UL;
+	else if (iter->size_level == 1)
+		iter->mask = 1UL;
+	else
+		iter->mask <<= 1;
+	if (iter->size_level)
+		iter->size_level--;
+	if (!iter->size_level && (iter->value & iter->mask))
+		iter->value ^= iter->mask;
+	return iter->cur;
+}
+
+static inline int overlap(struct prio_tree_iter *iter,
+		unsigned long r_index, unsigned long h_index)
+{
+	return iter->h_index >= r_index && iter->r_index <= h_index;
+}
+
+/*
+ * prio_tree_first:
+ *
+ * Get the first prio_tree_node that overlaps with the interval [radix_index,
+ * heap_index]. Note that always radix_index <= heap_index. We do a pre-order
+ * traversal of the tree.
+ */
+static struct prio_tree_node *prio_tree_first(struct prio_tree_iter *iter)
+{
+	struct prio_tree_root *root;
+	unsigned long r_index, h_index;
+
+	INIT_PRIO_TREE_ITER(iter);
+
+	root = iter->root;
+	if (prio_tree_empty(root))
+		return NULL;
+
+	get_index(root, root->prio_tree_node, &r_index, &h_index);
+
+	if (iter->r_index > h_index)
+		return NULL;
+
+	iter->mask = 1UL << (root->index_bits - 1);
+	iter->cur = root->prio_tree_node;
+
+	while (1) {
+		if (overlap(iter, r_index, h_index))
+			return iter->cur;
+
+		if (prio_tree_left(iter, &r_index, &h_index))
+			continue;
+
+		if (prio_tree_right(iter, &r_index, &h_index))
+			continue;
+
+		break;
+	}
+	return NULL;
+}
+
+/*
+ * prio_tree_next:
+ *
+ * Get the next prio_tree_node that overlaps with the input interval in iter
+ */
+struct prio_tree_node *prio_tree_next(struct prio_tree_iter *iter)
+{
+	unsigned long r_index, h_index;
+
+	if (iter->cur == NULL)
+		return prio_tree_first(iter);
+
+repeat:
+	while (prio_tree_left(iter, &r_index, &h_index))
+		if (overlap(iter, r_index, h_index))
+			return iter->cur;
+
+	while (!prio_tree_right(iter, &r_index, &h_index)) {
+	    	while (!prio_tree_root(iter->cur) &&
+				iter->cur->parent->right == iter->cur)
+			prio_tree_parent(iter);
+
+		if (prio_tree_root(iter->cur))
+			return NULL;
+
+		prio_tree_parent(iter);
+	}
+
+	if (overlap(iter, r_index, h_index))
+		return iter->cur;
+
+	goto repeat;
+}
diff -Nru a/lib/reed_solomon/reed_solomon.c b/lib/reed_solomon/reed_solomon.c
--- a/lib/reed_solomon/reed_solomon.c	2005-01-10 20:11:18 -08:00
+++ b/lib/reed_solomon/reed_solomon.c	2005-01-10 20:11:18 -08:00
@@ -9,7 +9,7 @@
  * Reed Solomon code lifted from reed solomon library written by Phil Karn
  * Copyright 2002 Phil Karn, KA9Q
  *
- * $Id: rslib.c,v 1.4 2004/10/05 22:07:53 gleixner Exp $
+ * $Id: rslib.c,v 1.5 2004/10/22 15:41:47 gleixner Exp $
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -22,19 +22,19 @@
  * Each user must call init_rs to get a pointer to a rs_control
  * structure for the given rs parameters. This structure is either
  * generated or a already available matching control structure is used.
- * If a structure is generated then the polynominal arrays for
+ * If a structure is generated then the polynomial arrays for
  * fast encoding / decoding are built. This can take some time so
- * make sure not to call this function from a timecritical path.
- * Usually a module / driver should initialize the neccecary 
+ * make sure not to call this function from a time critical path.
+ * Usually a module / driver should initialize the necessary 
  * rs_control structure on module / driver init and release it
  * on exit.
- * The encoding puts the calculated syndrome into a given syndrom 
+ * The encoding puts the calculated syndrome into a given syndrome 
  * buffer. 
  * The decoding is a two step process. The first step calculates
- * the syndrome over the received (data + syndrom) and calls the
+ * the syndrome over the received (data + syndrome) and calls the
  * second stage, which does the decoding / error correction itself.
- * Many hw encoders provide a syndrom calculation over the received
- * data + syndrom and can call the second stage directly.
+ * Many hw encoders provide a syndrome calculation over the received
+ * data + syndrome and can call the second stage directly.
  *
  */
 
diff -Nru a/lib/string.c b/lib/string.c
--- a/lib/string.c	2005-01-10 20:11:22 -08:00
+++ b/lib/string.c	2005-01-10 20:11:22 -08:00
@@ -19,8 +19,6 @@
  * -  Kissed strtok() goodbye
  */
 
-#define IN_STRING_C 1
- 
 #include <linux/types.h>
 #include <linux/string.h>
 #include <linux/ctype.h>
diff -Nru a/mm/Makefile b/mm/Makefile
--- a/mm/Makefile	2005-01-10 20:11:20 -08:00
+++ b/mm/Makefile	2005-01-10 20:11:20 -08:00
@@ -8,9 +8,9 @@
 			   vmalloc.o
 
 obj-y			:= bootmem.o filemap.o mempool.o oom_kill.o fadvise.o \
-			   page_alloc.o page-writeback.o pdflush.o prio_tree.o \
+			   page_alloc.o page-writeback.o pdflush.o \
 			   readahead.o slab.o swap.o truncate.o vmscan.o \
-			   $(mmu-y)
+			   prio_tree.o $(mmu-y)
 
 obj-$(CONFIG_SWAP)	+= page_io.o swap_state.o swapfile.o thrash.o
 obj-$(CONFIG_HUGETLBFS)	+= hugetlb.o
diff -Nru a/mm/bootmem.c b/mm/bootmem.c
--- a/mm/bootmem.c	2005-01-10 20:11:17 -08:00
+++ b/mm/bootmem.c	2005-01-10 20:11:17 -08:00
@@ -19,6 +19,7 @@
 #include <linux/module.h>
 #include <asm/dma.h>
 #include <asm/io.h>
+#include "internal.h"
 
 /*
  * Access to this subsystem has to be serialized externally. (this is
@@ -275,17 +276,18 @@
 	for (i = 0; i < idx; ) {
 		unsigned long v = ~map[i / BITS_PER_LONG];
 		if (gofast && v == ~0UL) {
-			int j;
+			int j, order;
 
 			count += BITS_PER_LONG;
 			__ClearPageReserved(page);
-			set_page_count(page, 1);
+			order = ffs(BITS_PER_LONG) - 1;
+			set_page_refs(page, order);
 			for (j = 1; j < BITS_PER_LONG; j++) {
 				if (j + 16 < BITS_PER_LONG)
 					prefetchw(page + j + 16);
 				__ClearPageReserved(page + j);
 			}
-			__free_pages(page, ffs(BITS_PER_LONG)-1);
+			__free_pages(page, order);
 			i += BITS_PER_LONG;
 			page += BITS_PER_LONG;
 		} else if (v) {
@@ -294,7 +296,7 @@
 				if (v & m) {
 					count++;
 					__ClearPageReserved(page);
-					set_page_count(page, 1);
+					set_page_refs(page, 0);
 					__free_page(page);
 				}
 			}
diff -Nru a/mm/filemap.c b/mm/filemap.c
--- a/mm/filemap.c	2005-01-10 20:11:24 -08:00
+++ b/mm/filemap.c	2005-01-10 20:11:24 -08:00
@@ -688,7 +688,11 @@
 			     read_actor_t actor)
 {
 	struct inode *inode = mapping->host;
-	unsigned long index, end_index, offset;
+	unsigned long index;
+	unsigned long end_index;
+	unsigned long offset;
+	unsigned long req_size;
+	unsigned long next_index;
 	loff_t isize;
 	struct page *cached_page;
 	int error;
@@ -696,6 +700,8 @@
 
 	cached_page = NULL;
 	index = *ppos >> PAGE_CACHE_SHIFT;
+	next_index = index;
+	req_size = (desc->count + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
 	offset = *ppos & ~PAGE_CACHE_MASK;
 
 	isize = i_size_read(inode);
@@ -705,7 +711,7 @@
 	end_index = (isize - 1) >> PAGE_CACHE_SHIFT;
 	for (;;) {
 		struct page *page;
-		unsigned long nr, ret;
+		unsigned long ret_size, nr, ret;
 
 		/* nr is the maximum number of bytes to copy from this page */
 		nr = PAGE_CACHE_SIZE;
@@ -720,7 +726,12 @@
 		nr = nr - offset;
 
 		cond_resched();
-		page_cache_readahead(mapping, &ra, filp, index);
+		if (index == next_index && req_size) {
+			ret_size = page_cache_readahead(mapping, &ra,
+					filp, index, req_size);
+			next_index += ret_size;
+			req_size -= ret_size;
+		}
 
 find_page:
 		page = find_get_page(mapping, index);
@@ -740,9 +751,10 @@
 			flush_dcache_page(page);
 
 		/*
-		 * Mark the page accessed if we read the beginning.
+		 * When (part of) the same page is read multiple times
+		 * in succession, only mark it as accessed the first time.
 		 */
-		if (!offset)
+		if (ra.prev_page != index)
 			mark_page_accessed(page);
 
 		/*
@@ -790,11 +802,21 @@
 			goto readpage_error;
 
 		if (!PageUptodate(page)) {
-			wait_on_page_locked(page);
+			lock_page(page);
 			if (!PageUptodate(page)) {
+				if (page->mapping == NULL) {
+					/*
+					 * invalidate_inode_pages got it
+					 */
+					unlock_page(page);
+					page_cache_release(page);
+					goto find_page;
+				}
+				unlock_page(page);
 				error = -EIO;
 				goto readpage_error;
 			}
+			unlock_page(page);
 		}
 
 		/*
@@ -1166,7 +1188,7 @@
 	 * For sequential accesses, we use the generic readahead logic.
 	 */
 	if (VM_SequentialReadHint(area))
-		page_cache_readahead(mapping, ra, file, pgoff);
+		page_cache_readahead(mapping, ra, file, pgoff, 1);
 
 	/*
 	 * Do we have something in the page cache already?
@@ -2149,7 +2171,7 @@
 	BUG_ON(iocb->ki_pos != pos);
 
 	down(&inode->i_sem);
-	ret = generic_file_aio_write_nolock(iocb, &local_iov, 1,
+	ret = __generic_file_aio_write_nolock(iocb, &local_iov, 1,
 						&iocb->ki_pos);
 	up(&inode->i_sem);
 
@@ -2225,7 +2247,8 @@
 EXPORT_SYMBOL(generic_file_writev);
 
 /*
- * Called under i_sem for writes to S_ISREG files
+ * Called under i_sem for writes to S_ISREG files.   Returns -EIO if something
+ * went wrong during pagecache shootdown.
  */
 ssize_t
 generic_file_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov,
@@ -2235,12 +2258,23 @@
 	struct address_space *mapping = file->f_mapping;
 	ssize_t retval;
 
+	/*
+	 * If it's a write, unmap all mmappings of the file up-front.  This
+	 * will cause any pte dirty bits to be propagated into the pageframes
+	 * for the subsequent filemap_write_and_wait().
+	 */
+	if (rw == WRITE && mapping_mapped(mapping))
+		unmap_mapping_range(mapping, 0, -1, 0);
+
 	retval = filemap_write_and_wait(mapping);
 	if (retval == 0) {
 		retval = mapping->a_ops->direct_IO(rw, iocb, iov,
 						offset, nr_segs);
-		if (rw == WRITE && mapping->nrpages)
-			invalidate_inode_pages2(mapping);
+		if (rw == WRITE && mapping->nrpages) {
+			int err = invalidate_inode_pages2(mapping);
+			if (err)
+				retval = err;
+		}
 	}
 	return retval;
 }
diff -Nru a/mm/fremap.c b/mm/fremap.c
--- a/mm/fremap.c	2005-01-10 20:11:15 -08:00
+++ b/mm/fremap.c	2005-01-10 20:11:15 -08:00
@@ -60,14 +60,19 @@
 	pgoff_t size;
 	int err = -ENOMEM;
 	pte_t *pte;
-	pgd_t *pgd;
 	pmd_t *pmd;
+	pud_t *pud;
+	pgd_t *pgd;
 	pte_t pte_val;
 
 	pgd = pgd_offset(mm, addr);
 	spin_lock(&mm->page_table_lock);
+	
+	pud = pud_alloc(mm, pgd, addr);
+	if (!pud)
+		goto err_unlock;
 
-	pmd = pmd_alloc(mm, pgd, addr);
+	pmd = pmd_alloc(mm, pud, addr);
 	if (!pmd)
 		goto err_unlock;
 
@@ -112,14 +117,19 @@
 {
 	int err = -ENOMEM;
 	pte_t *pte;
-	pgd_t *pgd;
 	pmd_t *pmd;
+	pud_t *pud;
+	pgd_t *pgd;
 	pte_t pte_val;
 
 	pgd = pgd_offset(mm, addr);
 	spin_lock(&mm->page_table_lock);
+	
+	pud = pud_alloc(mm, pgd, addr);
+	if (!pud)
+		goto err_unlock;
 
-	pmd = pmd_alloc(mm, pgd, addr);
+	pmd = pmd_alloc(mm, pud, addr);
 	if (!pmd)
 		goto err_unlock;
 
diff -Nru a/mm/highmem.c b/mm/highmem.c
--- a/mm/highmem.c	2005-01-10 20:11:20 -08:00
+++ b/mm/highmem.c	2005-01-10 20:11:20 -08:00
@@ -53,7 +53,7 @@
 #ifdef CONFIG_HIGHMEM
 static int pkmap_count[LAST_PKMAP];
 static unsigned int last_pkmap_nr;
-static spinlock_t kmap_lock __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED;
+static  __cacheline_aligned_in_smp DEFINE_SPINLOCK(kmap_lock);
 
 pte_t * pkmap_page_table;
 
diff -Nru a/mm/hugetlb.c b/mm/hugetlb.c
--- a/mm/hugetlb.c	2005-01-10 20:11:20 -08:00
+++ b/mm/hugetlb.c	2005-01-10 20:11:20 -08:00
@@ -10,6 +10,7 @@
 #include <linux/hugetlb.h>
 #include <linux/sysctl.h>
 #include <linux/highmem.h>
+#include <linux/nodemask.h>
 
 const unsigned long hugetlb_zero = 0, hugetlb_infinity = ~0UL;
 static unsigned long nr_huge_pages, free_huge_pages;
@@ -17,7 +18,7 @@
 static struct list_head hugepage_freelists[MAX_NUMNODES];
 static unsigned int nr_huge_pages_node[MAX_NUMNODES];
 static unsigned int free_huge_pages_node[MAX_NUMNODES];
-static spinlock_t hugetlb_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(hugetlb_lock);
 
 static void enqueue_huge_page(struct page *page)
 {
@@ -54,10 +55,10 @@
 	struct page *page;
 	page = alloc_pages_node(nid, GFP_HIGHUSER|__GFP_COMP|__GFP_NOWARN,
 					HUGETLB_PAGE_ORDER);
-	nid = (nid + 1) % numnodes;
+	nid = (nid + 1) % num_online_nodes();
 	if (page) {
 		nr_huge_pages++;
-		nr_huge_pages_node[page_zone(page)->zone_pgdat->node_id]++;
+		nr_huge_pages_node[page_to_nid(page)]++;
 	}
 	return page;
 }
diff -Nru a/mm/internal.h b/mm/internal.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mm/internal.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,13 @@
+/* internal.h: mm/ internal definitions
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.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.
+ */
+
+/* page_alloc.c */
+extern void set_page_refs(struct page *page, int order);
diff -Nru a/mm/memory.c b/mm/memory.c
--- a/mm/memory.c	2005-01-10 20:11:18 -08:00
+++ b/mm/memory.c	2005-01-10 20:11:18 -08:00
@@ -34,6 +34,8 @@
  *
  * 16.07.99  -  Support of BIGMEM added by Gerhard Wichert, Siemens AG
  *		(Gerhard.Wichert@pdb.siemens.de)
+ *
+ * Aug/Sep 2004 Changed to four level page tables (Andi Kleen)
  */
 
 #include <linux/kernel_stat.h>
@@ -44,6 +46,7 @@
 #include <linux/highmem.h>
 #include <linux/pagemap.h>
 #include <linux/rmap.h>
+#include <linux/acct.h>
 #include <linux/module.h>
 #include <linux/init.h>
 
@@ -74,11 +77,9 @@
  * and ZONE_HIGHMEM.
  */
 void * high_memory;
-struct page *highmem_start_page;
 unsigned long vmalloc_earlyreserve;
 
 EXPORT_SYMBOL(num_physpages);
-EXPORT_SYMBOL(highmem_start_page);
 EXPORT_SYMBOL(high_memory);
 EXPORT_SYMBOL(vmalloc_earlyreserve);
 
@@ -100,58 +101,107 @@
  * Note: this doesn't free the actual pages themselves. That
  * has been handled earlier when unmapping all the memory regions.
  */
-static inline void free_one_pmd(struct mmu_gather *tlb, pmd_t * dir)
+static inline void clear_pmd_range(struct mmu_gather *tlb, pmd_t *pmd, unsigned long start, unsigned long end)
 {
 	struct page *page;
 
-	if (pmd_none(*dir))
+	if (pmd_none(*pmd))
 		return;
-	if (unlikely(pmd_bad(*dir))) {
-		pmd_ERROR(*dir);
-		pmd_clear(dir);
+	if (unlikely(pmd_bad(*pmd))) {
+		pmd_ERROR(*pmd);
+		pmd_clear(pmd);
 		return;
 	}
-	page = pmd_page(*dir);
-	pmd_clear(dir);
-	dec_page_state(nr_page_table_pages);
-	tlb->mm->nr_ptes--;
-	pte_free_tlb(tlb, page);
+	if (!(start & ~PMD_MASK) && !(end & ~PMD_MASK)) {
+		page = pmd_page(*pmd);
+		pmd_clear(pmd);
+		dec_page_state(nr_page_table_pages);
+		tlb->mm->nr_ptes--;
+		pte_free_tlb(tlb, page);
+	}
 }
 
-static inline void free_one_pgd(struct mmu_gather *tlb, pgd_t * dir)
+static inline void clear_pud_range(struct mmu_gather *tlb, pud_t *pud, unsigned long start, unsigned long end)
 {
-	int j;
-	pmd_t * pmd;
+	unsigned long addr = start, next;
+	pmd_t *pmd, *__pmd;
+
+	if (pud_none(*pud))
+		return;
+	if (unlikely(pud_bad(*pud))) {
+		pud_ERROR(*pud);
+		pud_clear(pud);
+		return;
+	}
+
+	pmd = __pmd = pmd_offset(pud, start);
+	do {
+		next = (addr + PMD_SIZE) & PMD_MASK;
+		if (next > end || next <= addr)
+			next = end;
+		
+		clear_pmd_range(tlb, pmd, addr, next);
+		pmd++;
+		addr = next;
+	} while (addr && (addr < end));
+
+	if (!(start & ~PUD_MASK) && !(end & ~PUD_MASK)) {
+		pud_clear(pud);
+		pmd_free_tlb(tlb, __pmd);
+	}
+}
+
+
+static inline void clear_pgd_range(struct mmu_gather *tlb, pgd_t *pgd, unsigned long start, unsigned long end)
+{
+	unsigned long addr = start, next;
+	pud_t *pud, *__pud;
 
-	if (pgd_none(*dir))
+	if (pgd_none(*pgd))
 		return;
-	if (unlikely(pgd_bad(*dir))) {
-		pgd_ERROR(*dir);
-		pgd_clear(dir);
+	if (unlikely(pgd_bad(*pgd))) {
+		pgd_ERROR(*pgd);
+		pgd_clear(pgd);
 		return;
 	}
-	pmd = pmd_offset(dir, 0);
-	pgd_clear(dir);
-	for (j = 0; j < PTRS_PER_PMD ; j++)
-		free_one_pmd(tlb, pmd+j);
-	pmd_free_tlb(tlb, pmd);
+
+	pud = __pud = pud_offset(pgd, start);
+	do {
+		next = (addr + PUD_SIZE) & PUD_MASK;
+		if (next > end || next <= addr)
+			next = end;
+		
+		clear_pud_range(tlb, pud, addr, next);
+		pud++;
+		addr = next;
+	} while (addr && (addr < end));
+
+	if (!(start & ~PGDIR_MASK) && !(end & ~PGDIR_MASK)) {
+		pgd_clear(pgd);
+		pud_free_tlb(tlb, __pud);
+	}
 }
 
 /*
- * This function clears all user-level page tables of a process - this
- * is needed by execve(), so that old pages aren't in the way.
+ * This function clears user-level page tables of a process.
  *
  * Must be called with pagetable lock held.
  */
-void clear_page_tables(struct mmu_gather *tlb, unsigned long first, int nr)
+void clear_page_range(struct mmu_gather *tlb, unsigned long start, unsigned long end)
 {
-	pgd_t * page_dir = tlb->mm->pgd;
-
-	page_dir += first;
-	do {
-		free_one_pgd(tlb, page_dir);
-		page_dir++;
-	} while (--nr);
+	unsigned long addr = start, next;
+	unsigned long i, nr = pgd_index(end + PGDIR_SIZE-1) - pgd_index(start);
+	pgd_t * pgd = pgd_offset(tlb->mm, start);
+
+	for (i = 0; i < nr; i++) {
+		next = (addr + PGDIR_SIZE) & PGDIR_MASK;
+		if (next > end || next <= addr)
+			next = end;
+		
+		clear_pgd_range(tlb, pgd, addr, next);
+		pgd++;
+		addr = next;
+	}
 }
 
 pte_t fastcall * pte_alloc_map(struct mm_struct *mm, pmd_t *pmd, unsigned long address)
@@ -204,165 +254,211 @@
 out:
 	return pte_offset_kernel(pmd, address);
 }
-#define PTE_TABLE_MASK	((PTRS_PER_PTE-1) * sizeof(pte_t))
-#define PMD_TABLE_MASK	((PTRS_PER_PMD-1) * sizeof(pmd_t))
 
 /*
  * copy one vm_area from one task to the other. Assumes the page tables
  * already present in the new task to be cleared in the whole range
  * covered by this vma.
  *
- * 08Jan98 Merged into one routine from several inline routines to reduce
- *         variable count and make things faster. -jj
- *
  * dst->page_table_lock is held on entry and exit,
- * but may be dropped within pmd_alloc() and pte_alloc_map().
+ * but may be dropped within p[mg]d_alloc() and pte_alloc_map().
  */
-int copy_page_range(struct mm_struct *dst, struct mm_struct *src,
-			struct vm_area_struct *vma)
+
+static inline void
+copy_swap_pte(struct mm_struct *dst_mm, struct mm_struct *src_mm, pte_t pte)
 {
-	pgd_t * src_pgd, * dst_pgd;
-	unsigned long address = vma->vm_start;
-	unsigned long end = vma->vm_end;
-	unsigned long cow;
+	if (pte_file(pte))
+		return;
+	swap_duplicate(pte_to_swp_entry(pte));
+	if (list_empty(&dst_mm->mmlist)) {
+		spin_lock(&mmlist_lock);
+		list_add(&dst_mm->mmlist, &src_mm->mmlist);
+		spin_unlock(&mmlist_lock);
+	}
+}
 
-	if (is_vm_hugetlb_page(vma))
-		return copy_hugetlb_page_range(dst, src, vma);
+static inline void
+copy_one_pte(struct mm_struct *dst_mm,  struct mm_struct *src_mm,
+		pte_t *dst_pte, pte_t *src_pte, unsigned long vm_flags,
+		unsigned long addr)
+{
+	pte_t pte = *src_pte;
+	struct page *page;
+	unsigned long pfn;
 
-	cow = (vma->vm_flags & (VM_SHARED | VM_MAYWRITE)) == VM_MAYWRITE;
-	src_pgd = pgd_offset(src, address)-1;
-	dst_pgd = pgd_offset(dst, address)-1;
+	/* pte contains position in swap, so copy. */
+	if (!pte_present(pte)) {
+		copy_swap_pte(dst_mm, src_mm, pte);
+		set_pte(dst_pte, pte);
+		return;
+	}
+	pfn = pte_pfn(pte);
+	/* the pte points outside of valid memory, the
+	 * mapping is assumed to be good, meaningful
+	 * and not mapped via rmap - duplicate the
+	 * mapping as is.
+	 */
+	page = NULL;
+	if (pfn_valid(pfn))
+		page = pfn_to_page(pfn);
 
-	for (;;) {
-		pmd_t * src_pmd, * dst_pmd;
+	if (!page || PageReserved(page)) {
+		set_pte(dst_pte, pte);
+		return;
+	}
 
-		src_pgd++; dst_pgd++;
-		
-		/* copy_pmd_range */
-		
-		if (pgd_none(*src_pgd))
-			goto skip_copy_pmd_range;
-		if (unlikely(pgd_bad(*src_pgd))) {
-			pgd_ERROR(*src_pgd);
-			pgd_clear(src_pgd);
-skip_copy_pmd_range:	address = (address + PGDIR_SIZE) & PGDIR_MASK;
-			if (!address || (address >= end))
-				goto out;
+	/*
+	 * If it's a COW mapping, write protect it both
+	 * in the parent and the child
+	 */
+	if ((vm_flags & (VM_SHARED | VM_MAYWRITE)) == VM_MAYWRITE) {
+		ptep_set_wrprotect(src_pte);
+		pte = *src_pte;
+	}
+
+	/*
+	 * If it's a shared mapping, mark it clean in
+	 * the child
+	 */
+	if (vm_flags & VM_SHARED)
+		pte = pte_mkclean(pte);
+	pte = pte_mkold(pte);
+	get_page(page);
+	dst_mm->rss++;
+	if (PageAnon(page))
+		dst_mm->anon_rss++;
+	set_pte(dst_pte, pte);
+	page_dup_rmap(page);
+}
+
+static int copy_pte_range(struct mm_struct *dst_mm,  struct mm_struct *src_mm,
+		pmd_t *dst_pmd, pmd_t *src_pmd, struct vm_area_struct *vma,
+		unsigned long addr, unsigned long end)
+{
+	pte_t *src_pte, *dst_pte;
+	pte_t *s, *d;
+	unsigned long vm_flags = vma->vm_flags;
+
+	d = dst_pte = pte_alloc_map(dst_mm, dst_pmd, addr);
+	if (!dst_pte)
+		return -ENOMEM;
+
+	spin_lock(&src_mm->page_table_lock);
+	s = src_pte = pte_offset_map_nested(src_pmd, addr);
+	for (; addr < end; addr += PAGE_SIZE, s++, d++) {
+		if (pte_none(*s))
+			continue;
+		copy_one_pte(dst_mm, src_mm, d, s, vm_flags, addr);
+	}
+	pte_unmap_nested(src_pte);
+	pte_unmap(dst_pte);
+	spin_unlock(&src_mm->page_table_lock);
+	cond_resched_lock(&dst_mm->page_table_lock);
+	return 0;
+}
+
+static int copy_pmd_range(struct mm_struct *dst_mm,  struct mm_struct *src_mm,
+		pud_t *dst_pud, pud_t *src_pud, struct vm_area_struct *vma,
+		unsigned long addr, unsigned long end)
+{
+	pmd_t *src_pmd, *dst_pmd;
+	int err = 0;
+	unsigned long next;
+
+	src_pmd = pmd_offset(src_pud, addr);
+	dst_pmd = pmd_alloc(dst_mm, dst_pud, addr);
+	if (!dst_pmd)
+		return -ENOMEM;
+
+	for (; addr < end; addr = next, src_pmd++, dst_pmd++) {
+		next = (addr + PMD_SIZE) & PMD_MASK;
+		if (next > end)
+			next = end;
+		if (pmd_none(*src_pmd))
+			continue;
+		if (pmd_bad(*src_pmd)) {
+			pmd_ERROR(*src_pmd);
+			pmd_clear(src_pmd);
 			continue;
 		}
+		err = copy_pte_range(dst_mm, src_mm, dst_pmd, src_pmd,
+							vma, addr, next);
+		if (err)
+			break;
+	}
+	return err;
+}
 
-		src_pmd = pmd_offset(src_pgd, address);
-		dst_pmd = pmd_alloc(dst, dst_pgd, address);
-		if (!dst_pmd)
-			goto nomem;
+static int copy_pud_range(struct mm_struct *dst_mm,  struct mm_struct *src_mm,
+		pgd_t *dst_pgd, pgd_t *src_pgd, struct vm_area_struct *vma,
+		unsigned long addr, unsigned long end)
+{
+	pud_t *src_pud, *dst_pud;
+	int err = 0;
+	unsigned long next;
+
+	src_pud = pud_offset(src_pgd, addr);
+	dst_pud = pud_alloc(dst_mm, dst_pgd, addr);
+	if (!dst_pud)
+		return -ENOMEM;
+
+	for (; addr < end; addr = next, src_pud++, dst_pud++) {
+		next = (addr + PUD_SIZE) & PUD_MASK;
+		if (next > end)
+			next = end;
+		if (pud_none(*src_pud))
+			continue;
+		if (pud_bad(*src_pud)) {
+			pud_ERROR(*src_pud);
+			pud_clear(src_pud);
+			continue;
+		}
+		err = copy_pmd_range(dst_mm, src_mm, dst_pud, src_pud,
+							vma, addr, next);
+		if (err)
+			break;
+	}
+	return err;
+}
 
-		do {
-			pte_t * src_pte, * dst_pte;
-		
-			/* copy_pte_range */
-		
-			if (pmd_none(*src_pmd))
-				goto skip_copy_pte_range;
-			if (unlikely(pmd_bad(*src_pmd))) {
-				pmd_ERROR(*src_pmd);
-				pmd_clear(src_pmd);
-skip_copy_pte_range:
-				address = (address + PMD_SIZE) & PMD_MASK;
-				if (address >= end)
-					goto out;
-				goto cont_copy_pmd_range;
-			}
+int copy_page_range(struct mm_struct *dst, struct mm_struct *src,
+		struct vm_area_struct *vma)
+{
+	pgd_t *src_pgd, *dst_pgd;
+	unsigned long addr, start, end, next;
+	int err = 0;
 
-			dst_pte = pte_alloc_map(dst, dst_pmd, address);
-			if (!dst_pte)
-				goto nomem;
-			spin_lock(&src->page_table_lock);	
-			src_pte = pte_offset_map_nested(src_pmd, address);
-			do {
-				pte_t pte = *src_pte;
-				struct page *page;
-				unsigned long pfn;
-
-				/* copy_one_pte */
-
-				if (pte_none(pte))
-					goto cont_copy_pte_range_noset;
-				/* pte contains position in swap, so copy. */
-				if (!pte_present(pte)) {
-					if (!pte_file(pte)) {
-						swap_duplicate(pte_to_swp_entry(pte));
-						if (list_empty(&dst->mmlist)) {
-							spin_lock(&mmlist_lock);
-							list_add(&dst->mmlist,
-								 &src->mmlist);
-							spin_unlock(&mmlist_lock);
-						}
-					}
-					set_pte(dst_pte, pte);
-					goto cont_copy_pte_range_noset;
-				}
-				pfn = pte_pfn(pte);
-				/* the pte points outside of valid memory, the
-				 * mapping is assumed to be good, meaningful
-				 * and not mapped via rmap - duplicate the
-				 * mapping as is.
-				 */
-				page = NULL;
-				if (pfn_valid(pfn)) 
-					page = pfn_to_page(pfn); 
-
-				if (!page || PageReserved(page)) {
-					set_pte(dst_pte, pte);
-					goto cont_copy_pte_range_noset;
-				}
+	if (is_vm_hugetlb_page(vma))
+		return copy_hugetlb_page_range(dst, src, vma);
 
-				/*
-				 * If it's a COW mapping, write protect it both
-				 * in the parent and the child
-				 */
-				if (cow) {
-					ptep_set_wrprotect(src_pte);
-					pte = *src_pte;
-				}
+	start = vma->vm_start;
+	src_pgd = pgd_offset(src, start);
+	dst_pgd = pgd_offset(dst, start);
+
+	end = vma->vm_end;
+	addr = start;
+	while (addr && (addr < end-1)) {
+		next = (addr + PGDIR_SIZE) & PGDIR_MASK;
+		if (next > end || next <= addr)
+			next = end;
+		if (pgd_none(*src_pgd))
+			continue;
+		if (pgd_bad(*src_pgd)) {
+			pgd_ERROR(*src_pgd);
+			pgd_clear(src_pgd);
+			continue;
+		}
+		err = copy_pud_range(dst, src, dst_pgd, src_pgd,
+							vma, addr, next);
+		if (err)
+			break;
 
-				/*
-				 * If it's a shared mapping, mark it clean in
-				 * the child
-				 */
-				if (vma->vm_flags & VM_SHARED)
-					pte = pte_mkclean(pte);
-				pte = pte_mkold(pte);
-				get_page(page);
-				dst->rss++;
-				if (PageAnon(page))
-					dst->anon_rss++;
-				set_pte(dst_pte, pte);
-				page_dup_rmap(page);
-cont_copy_pte_range_noset:
-				address += PAGE_SIZE;
-				if (address >= end) {
-					pte_unmap_nested(src_pte);
-					pte_unmap(dst_pte);
-					goto out_unlock;
-				}
-				src_pte++;
-				dst_pte++;
-			} while ((unsigned long)src_pte & PTE_TABLE_MASK);
-			pte_unmap_nested(src_pte-1);
-			pte_unmap(dst_pte-1);
-			spin_unlock(&src->page_table_lock);
-			cond_resched_lock(&dst->page_table_lock);
-cont_copy_pmd_range:
-			src_pmd++;
-			dst_pmd++;
-		} while ((unsigned long)src_pmd & PMD_TABLE_MASK);
+		src_pgd++;
+		dst_pgd++;
+		addr = next;
 	}
-out_unlock:
-	spin_unlock(&src->page_table_lock);
-out:
-	return 0;
-nomem:
-	return -ENOMEM;
+
+	return err;
 }
 
 static void zap_pte_range(struct mmu_gather *tlb,
@@ -449,23 +545,23 @@
 }
 
 static void zap_pmd_range(struct mmu_gather *tlb,
-		pgd_t * dir, unsigned long address,
+		pud_t *pud, unsigned long address,
 		unsigned long size, struct zap_details *details)
 {
 	pmd_t * pmd;
 	unsigned long end;
 
-	if (pgd_none(*dir))
+	if (pud_none(*pud))
 		return;
-	if (unlikely(pgd_bad(*dir))) {
-		pgd_ERROR(*dir);
-		pgd_clear(dir);
+	if (unlikely(pud_bad(*pud))) {
+		pud_ERROR(*pud);
+		pud_clear(pud);
 		return;
 	}
-	pmd = pmd_offset(dir, address);
+	pmd = pmd_offset(pud, address);
 	end = address + size;
-	if (end > ((address + PGDIR_SIZE) & PGDIR_MASK))
-		end = ((address + PGDIR_SIZE) & PGDIR_MASK);
+	if (end > ((address + PUD_SIZE) & PUD_MASK))
+		end = ((address + PUD_SIZE) & PUD_MASK);
 	do {
 		zap_pte_range(tlb, pmd, address, end - address, details);
 		address = (address + PMD_SIZE) & PMD_MASK; 
@@ -473,36 +569,54 @@
 	} while (address && (address < end));
 }
 
+static void zap_pud_range(struct mmu_gather *tlb,
+		pgd_t * pgd, unsigned long address,
+		unsigned long end, struct zap_details *details)
+{
+	pud_t * pud;
+
+	if (pgd_none(*pgd))
+		return;
+	if (unlikely(pgd_bad(*pgd))) {
+		pgd_ERROR(*pgd);
+		pgd_clear(pgd);
+		return;
+	}
+	pud = pud_offset(pgd, address);
+	do {
+		zap_pmd_range(tlb, pud, address, end - address, details);
+		address = (address + PUD_SIZE) & PUD_MASK; 
+		pud++;
+	} while (address && (address < end));
+}
+
 static void unmap_page_range(struct mmu_gather *tlb,
 		struct vm_area_struct *vma, unsigned long address,
 		unsigned long end, struct zap_details *details)
 {
-	pgd_t * dir;
+	unsigned long next;
+	pgd_t *pgd;
+	int i;
 
 	BUG_ON(address >= end);
-	dir = pgd_offset(vma->vm_mm, address);
+	pgd = pgd_offset(vma->vm_mm, address);
 	tlb_start_vma(tlb, vma);
-	do {
-		zap_pmd_range(tlb, dir, address, end - address, details);
-		address = (address + PGDIR_SIZE) & PGDIR_MASK;
-		dir++;
-	} while (address && (address < end));
+	for (i = pgd_index(address); i <= pgd_index(end-1); i++) {
+		next = (address + PGDIR_SIZE) & PGDIR_MASK;
+		if (next <= address || next > end)
+			next = end;
+		zap_pud_range(tlb, pgd, address, next, details);
+		address = next;
+		pgd++;
+	}
 	tlb_end_vma(tlb, vma);
 }
 
-/* Dispose of an entire struct mmu_gather per rescheduling point */
-#if defined(CONFIG_SMP) && defined(CONFIG_PREEMPT)
-#define ZAP_BLOCK_SIZE	(FREE_PTE_NR * PAGE_SIZE)
-#endif
-
-/* For UP, 256 pages at a time gives nice low latency */
-#if !defined(CONFIG_SMP) && defined(CONFIG_PREEMPT)
-#define ZAP_BLOCK_SIZE	(256 * PAGE_SIZE)
-#endif
-
+#ifdef CONFIG_PREEMPT
+# define ZAP_BLOCK_SIZE	(8 * PAGE_SIZE)
+#else
 /* No preempt: go for improved straight-line efficiency */
-#if !defined(CONFIG_PREEMPT)
-#define ZAP_BLOCK_SIZE	(1024 * PAGE_SIZE)
+# define ZAP_BLOCK_SIZE	(1024 * PAGE_SIZE)
 #endif
 
 /**
@@ -541,7 +655,8 @@
 	unsigned long tlb_start = 0;	/* For tlb_finish_mmu */
 	int tlb_start_valid = 0;
 	int ret = 0;
-	int atomic = details && details->atomic;
+	spinlock_t *i_mmap_lock = details? details->i_mmap_lock: NULL;
+	int fullmm = tlb_is_full_mm(*tlbp);
 
 	for ( ; vma && vma->vm_start < end_addr; vma = vma->vm_next) {
 		unsigned long start;
@@ -579,16 +694,29 @@
 			zap_bytes -= block;
 			if ((long)zap_bytes > 0)
 				continue;
-			if (!atomic && need_resched()) {
-				int fullmm = tlb_is_full_mm(*tlbp);
-				tlb_finish_mmu(*tlbp, tlb_start, start);
-				cond_resched_lock(&mm->page_table_lock);
-				*tlbp = tlb_gather_mmu(mm, fullmm);
-				tlb_start_valid = 0;
+
+			tlb_finish_mmu(*tlbp, tlb_start, start);
+
+			if (need_resched() ||
+				need_lockbreak(&mm->page_table_lock) ||
+				(i_mmap_lock && need_lockbreak(i_mmap_lock))) {
+				if (i_mmap_lock) {
+					/* must reset count of rss freed */
+					*tlbp = tlb_gather_mmu(mm, fullmm);
+					details->break_addr = start;
+					goto out;
+				}
+				spin_unlock(&mm->page_table_lock);
+				cond_resched();
+				spin_lock(&mm->page_table_lock);
 			}
+
+			*tlbp = tlb_gather_mmu(mm, fullmm);
+			tlb_start_valid = 0;
 			zap_bytes = ZAP_BLOCK_SIZE;
 		}
 	}
+out:
 	return ret;
 }
 
@@ -617,6 +745,7 @@
 	tlb = tlb_gather_mmu(mm, 0);
 	unmap_vmas(&tlb, mm, vma, address, end, &nr_accounted, details);
 	tlb_finish_mmu(tlb, address, end);
+	acct_update_integrals();
 	spin_unlock(&mm->page_table_lock);
 }
 
@@ -624,10 +753,11 @@
  * Do a quick page-table lookup for a single page.
  * mm->page_table_lock must be held.
  */
-struct page *
-follow_page(struct mm_struct *mm, unsigned long address, int write) 
+static struct page *
+__follow_page(struct mm_struct *mm, unsigned long address, int read, int write)
 {
 	pgd_t *pgd;
+	pud_t *pud;
 	pmd_t *pmd;
 	pte_t *ptep, pte;
 	unsigned long pfn;
@@ -641,13 +771,15 @@
 	if (pgd_none(*pgd) || unlikely(pgd_bad(*pgd)))
 		goto out;
 
-	pmd = pmd_offset(pgd, address);
-	if (pmd_none(*pmd))
+	pud = pud_offset(pgd, address);
+	if (pud_none(*pud) || unlikely(pud_bad(*pud)))
+		goto out;
+	
+	pmd = pmd_offset(pud, address);
+	if (pmd_none(*pmd) || unlikely(pmd_bad(*pmd)))
 		goto out;
 	if (pmd_huge(*pmd))
 		return follow_huge_pmd(mm, address, pmd, write);
-	if (unlikely(pmd_bad(*pmd)))
-		goto out;
 
 	ptep = pte_offset_map(pmd, address);
 	if (!ptep)
@@ -658,6 +790,8 @@
 	if (pte_present(pte)) {
 		if (write && !pte_write(pte))
 			goto out;
+		if (read && !pte_read(pte))
+			goto out;
 		pfn = pte_pfn(pte);
 		if (pfn_valid(pfn)) {
 			page = pfn_to_page(pfn);
@@ -672,6 +806,20 @@
 	return NULL;
 }
 
+struct page *
+follow_page(struct mm_struct *mm, unsigned long address, int write)
+{
+	return __follow_page(mm, address, /*read*/0, write);
+}
+
+int
+check_user_page_readable(struct mm_struct *mm, unsigned long address)
+{
+	return __follow_page(mm, address, /*read*/1, /*write*/0) != NULL;
+}
+
+EXPORT_SYMBOL(check_user_page_readable);
+
 /* 
  * Given a physical address, is there a useful struct page pointing to
  * it?  This may become more complex in the future if we start dealing
@@ -691,6 +839,7 @@
 			 unsigned long address)
 {
 	pgd_t *pgd;
+	pud_t *pud;
 	pmd_t *pmd;
 
 	/* Check if the vma is for an anonymous mapping. */
@@ -702,8 +851,12 @@
 	if (pgd_none(*pgd) || unlikely(pgd_bad(*pgd)))
 		return 1;
 
+	pud = pud_offset(pgd, address);
+	if (pud_none(*pud) || unlikely(pud_bad(*pud)))
+		return 1;
+
 	/* Check if page middle directory entry exists. */
-	pmd = pmd_offset(pgd, address);
+	pmd = pmd_offset(pud, address);
 	if (pmd_none(*pmd) || unlikely(pmd_bad(*pmd)))
 		return 1;
 
@@ -735,6 +888,7 @@
 			unsigned long pg = start & PAGE_MASK;
 			struct vm_area_struct *gate_vma = get_gate_vma(tsk);
 			pgd_t *pgd;
+			pud_t *pud;
 			pmd_t *pmd;
 			pte_t *pte;
 			if (write) /* user gate pages are read-only */
@@ -744,7 +898,9 @@
 			else
 				pgd = pgd_offset_gate(mm, pg);
 			BUG_ON(pgd_none(*pgd));
-			pmd = pmd_offset(pgd, pg);
+			pud = pud_offset(pgd, pg);
+			BUG_ON(pud_none(*pud));
+			pmd = pmd_offset(pud, pg);
 			BUG_ON(pmd_none(*pmd));
 			pte = pte_offset_map(pmd, pg);
 			BUG_ON(pte_none(*pte));
@@ -774,6 +930,8 @@
 		do {
 			struct page *map;
 			int lookup_write = write;
+
+			cond_resched_lock(&mm->page_table_lock);
 			while (!(map = follow_page(mm, start, lookup_write))) {
 				/*
 				 * Shortcut for anonymous pages. We don't want
@@ -857,16 +1015,16 @@
 	} while (address && (address < end));
 }
 
-static inline int zeromap_pmd_range(struct mm_struct *mm, pmd_t * pmd, unsigned long address,
-                                    unsigned long size, pgprot_t prot)
+static inline int zeromap_pmd_range(struct mm_struct *mm, pmd_t * pmd,
+		unsigned long address, unsigned long size, pgprot_t prot)
 {
 	unsigned long base, end;
 
-	base = address & PGDIR_MASK;
-	address &= ~PGDIR_MASK;
+	base = address & PUD_MASK;
+	address &= ~PUD_MASK;
 	end = address + size;
-	if (end > PGDIR_SIZE)
-		end = PGDIR_SIZE;
+	if (end > PUD_SIZE)
+		end = PUD_SIZE;
 	do {
 		pte_t * pte = pte_alloc_map(mm, pmd, base + address);
 		if (!pte)
@@ -879,31 +1037,64 @@
 	return 0;
 }
 
-int zeromap_page_range(struct vm_area_struct *vma, unsigned long address, unsigned long size, pgprot_t prot)
+static inline int zeromap_pud_range(struct mm_struct *mm, pud_t * pud,
+				    unsigned long address,
+                                    unsigned long size, pgprot_t prot)
 {
+	unsigned long base, end;
 	int error = 0;
-	pgd_t * dir;
+
+	base = address & PGDIR_MASK;
+	address &= ~PGDIR_MASK;
+	end = address + size;
+	if (end > PGDIR_SIZE)
+		end = PGDIR_SIZE;
+	do {
+		pmd_t * pmd = pmd_alloc(mm, pud, base + address);
+		error = -ENOMEM;
+		if (!pmd)
+			break;
+		error = zeromap_pmd_range(mm, pmd, address, end - address, prot);
+		if (error)
+			break;
+		address = (address + PUD_SIZE) & PUD_MASK;
+		pud++;
+	} while (address && (address < end));
+	return 0;
+}
+
+int zeromap_page_range(struct vm_area_struct *vma, unsigned long address,
+					unsigned long size, pgprot_t prot)
+{
+	int i;
+	int error = 0;
+	pgd_t * pgd;
 	unsigned long beg = address;
 	unsigned long end = address + size;
+	unsigned long next;
 	struct mm_struct *mm = vma->vm_mm;
 
-	dir = pgd_offset(mm, address);
+	pgd = pgd_offset(mm, address);
 	flush_cache_range(vma, beg, end);
-	if (address >= end)
-		BUG();
+	BUG_ON(address >= end);
+	BUG_ON(end > vma->vm_end);
 
 	spin_lock(&mm->page_table_lock);
-	do {
-		pmd_t *pmd = pmd_alloc(mm, dir, address);
+	for (i = pgd_index(address); i <= pgd_index(end-1); i++) {
+		pud_t *pud = pud_alloc(mm, pgd, address);
 		error = -ENOMEM;
-		if (!pmd)
+		if (!pud)
 			break;
-		error = zeromap_pmd_range(mm, pmd, address, end - address, prot);
+		next = (address + PGDIR_SIZE) & PGDIR_MASK;
+		if (next <= beg || next > end)
+			next = end;
+		error = zeromap_pud_range(mm, pud, address,
+						next - address, prot);
 		if (error)
 			break;
-		address = (address + PGDIR_SIZE) & PGDIR_MASK;
-		dir++;
-	} while (address && (address < end));
+		address = next;
+		pgd++;
+	}
 	/*
 	 * Why flush? zeromap_pte_range has a BUG_ON for !pte_none()
 	 */
@@ -917,8 +1108,9 @@
  * mappings are removed. any references to nonexistent pages results
  * in null mappings (currently treated as "copy-on-access")
  */
-static inline void remap_pte_range(pte_t * pte, unsigned long address, unsigned long size,
-	unsigned long pfn, pgprot_t prot)
+static inline void
+remap_pte_range(pte_t * pte, unsigned long address, unsigned long size,
+		unsigned long pfn, pgprot_t prot)
 {
 	unsigned long end;
 
@@ -936,22 +1128,24 @@
 	} while (address && (address < end));
 }
 
-static inline int remap_pmd_range(struct mm_struct *mm, pmd_t * pmd, unsigned long address, unsigned long size,
-	unsigned long pfn, pgprot_t prot)
+static inline int
+remap_pmd_range(struct mm_struct *mm, pmd_t * pmd, unsigned long address,
+		unsigned long size, unsigned long pfn, pgprot_t prot)
 {
 	unsigned long base, end;
 
-	base = address & PGDIR_MASK;
-	address &= ~PGDIR_MASK;
+	base = address & PUD_MASK;
+	address &= ~PUD_MASK;
 	end = address + size;
-	if (end > PGDIR_SIZE)
-		end = PGDIR_SIZE;
-	pfn -= address >> PAGE_SHIFT;
+	if (end > PUD_SIZE)
+		end = PUD_SIZE;
+	pfn -= (address >> PAGE_SHIFT);
 	do {
 		pte_t * pte = pte_alloc_map(mm, pmd, base + address);
 		if (!pte)
 			return -ENOMEM;
-		remap_pte_range(pte, base + address, end - address, pfn + (address >> PAGE_SHIFT), prot);
+		remap_pte_range(pte, base + address, end - address,
+				(address >> PAGE_SHIFT) + pfn, prot);
 		pte_unmap(pte);
 		address = (address + PMD_SIZE) & PMD_MASK;
 		pmd++;
@@ -959,20 +1153,50 @@
 	return 0;
 }
 
+static inline int remap_pud_range(struct mm_struct *mm, pud_t * pud,
+				  unsigned long address, unsigned long size,
+				  unsigned long pfn, pgprot_t prot)
+{
+	unsigned long base, end;
+	int error;
+
+	base = address & PGDIR_MASK;
+	address &= ~PGDIR_MASK;
+	end = address + size;
+	if (end > PGDIR_SIZE)
+		end = PGDIR_SIZE;
+	pfn -= address >> PAGE_SHIFT;
+	do {
+		pmd_t *pmd = pmd_alloc(mm, pud, base+address);
+		error = -ENOMEM;
+		if (!pmd)
+			break;
+		error = remap_pmd_range(mm, pmd, base + address, end - address,
+				(address >> PAGE_SHIFT) + pfn, prot);
+		if (error)
+			break;
+		address = (address + PUD_SIZE) & PUD_MASK;
+		pud++;
+	} while (address && (address < end));
+	return error;
+}
+
 /*  Note: this is only safe if the mm semaphore is held when called. */
-int remap_pfn_range(struct vm_area_struct *vma, unsigned long from, unsigned long pfn, unsigned long size, pgprot_t prot)
+int remap_pfn_range(struct vm_area_struct *vma, unsigned long from,
+		    unsigned long pfn, unsigned long size, pgprot_t prot)
 {
 	int error = 0;
-	pgd_t * dir;
+	pgd_t *pgd;
 	unsigned long beg = from;
 	unsigned long end = from + size;
+	unsigned long next;
 	struct mm_struct *mm = vma->vm_mm;
+	int i;
 
 	pfn -= from >> PAGE_SHIFT;
-	dir = pgd_offset(mm, from);
+	pgd = pgd_offset(mm, from);
 	flush_cache_range(vma, beg, end);
-	if (from >= end)
-		BUG();
+	BUG_ON(from >= end);
 
 	/*
 	 * Physically remapped pages are special. Tell the
@@ -983,25 +1207,32 @@
 	 *	this region.
 	 */
 	vma->vm_flags |= VM_IO | VM_RESERVED;
+
 	spin_lock(&mm->page_table_lock);
-	do {
-		pmd_t *pmd = pmd_alloc(mm, dir, from);
+	for (i = pgd_index(beg); i <= pgd_index(end-1); i++) {
+		pud_t *pud = pud_alloc(mm, pgd, from);
 		error = -ENOMEM;
-		if (!pmd)
+		if (!pud)
 			break;
-		error = remap_pmd_range(mm, pmd, from, end - from, pfn + (from >> PAGE_SHIFT), prot);
+		next = (from + PGDIR_SIZE) & PGDIR_MASK;
+		if (next > end || next <= from)
+			next = end;
+		error = remap_pud_range(mm, pud, from, end - from,
+					pfn + (from >> PAGE_SHIFT), prot);
 		if (error)
 			break;
-		from = (from + PGDIR_SIZE) & PGDIR_MASK;
-		dir++;
-	} while (from && (from < end));
+		from = next;
+		pgd++;
+	}
 	/*
 	 * Why flush? remap_pte_range has a BUG_ON for !pte_none()
 	 */
 	flush_tlb_range(vma, beg, end);
 	spin_unlock(&mm->page_table_lock);
+
 	return error;
 }
+
 EXPORT_SYMBOL(remap_pfn_range);
 
 /*
@@ -1111,9 +1342,11 @@
 	if (likely(pte_same(*page_table, pte))) {
 		if (PageAnon(old_page))
 			mm->anon_rss--;
-		if (PageReserved(old_page))
+		if (PageReserved(old_page)) {
 			++mm->rss;
-		else
+			acct_update_integrals();
+			update_mem_hiwater();
+		} else
 			page_remove_rmap(old_page);
 		break_cow(vma, new_page, address, page_table);
 		lru_cache_add_active(new_page);
@@ -1134,17 +1367,112 @@
 }
 
 /*
- * Helper function for unmap_mapping_range().
+ * Helper functions for unmap_mapping_range().
+ *
+ * __ Notes on dropping i_mmap_lock to reduce latency while unmapping __
+ *
+ * We have to restart searching the prio_tree whenever we drop the lock,
+ * since the iterator is only valid while the lock is held, and anyway
+ * a later vma might be split and reinserted earlier while lock dropped.
+ *
+ * The list of nonlinear vmas could be handled more efficiently, using
+ * a placeholder, but handle it in the same way until a need is shown.
+ * It is important to search the prio_tree before nonlinear list: a vma
+ * may become nonlinear and be shifted from prio_tree to nonlinear list
+ * while the lock is dropped; but never shifted from list to prio_tree.
+ *
+ * In order to make forward progress despite restarting the search,
+ * vm_truncate_count is used to mark a vma as now dealt with, so we can
+ * quickly skip it next time around.  Since the prio_tree search only
+ * shows us those vmas affected by unmapping the range in question, we
+ * can't efficiently keep all vmas in step with mapping->truncate_count:
+ * so instead reset them all whenever it wraps back to 0 (then go to 1).
+ * mapping->truncate_count and vma->vm_truncate_count are protected by
+ * i_mmap_lock.
+ *
+ * In order to make forward progress despite repeatedly restarting some
+ * large vma, note the break_addr set by unmap_vmas when it breaks out:
+ * and restart from that address when we reach that vma again.  It might
+ * have been split or merged, shrunk or extended, but never shifted: so
+ * restart_addr remains valid so long as it remains in the vma's range.
+ * unmap_mapping_range forces truncate_count to leap over page-aligned
+ * values so we can save vma's restart_addr in its truncate_count field.
  */
-static inline void unmap_mapping_range_list(struct prio_tree_root *root,
+#define is_restart_addr(truncate_count) (!((truncate_count) & ~PAGE_MASK))
+
+static void reset_vma_truncate_counts(struct address_space *mapping)
+{
+	struct vm_area_struct *vma;
+	struct prio_tree_iter iter;
+
+	vma_prio_tree_foreach(vma, &iter, &mapping->i_mmap, 0, ULONG_MAX)
+		vma->vm_truncate_count = 0;
+	list_for_each_entry(vma, &mapping->i_mmap_nonlinear, shared.vm_set.list)
+		vma->vm_truncate_count = 0;
+}
+
+static int unmap_mapping_range_vma(struct vm_area_struct *vma,
+		unsigned long start_addr, unsigned long end_addr,
+		struct zap_details *details)
+{
+	unsigned long restart_addr;
+	int need_break;
+
+again:
+	restart_addr = vma->vm_truncate_count;
+	if (is_restart_addr(restart_addr) && start_addr < restart_addr) {
+		start_addr = restart_addr;
+		if (start_addr >= end_addr) {
+			/* Top of vma has been split off since last time */
+			vma->vm_truncate_count = details->truncate_count;
+			return 0;
+		}
+	}
+
+	details->break_addr = end_addr;
+	zap_page_range(vma, start_addr, end_addr - start_addr, details);
+
+	/*
+	 * We cannot rely on the break test in unmap_vmas:
+	 * on the one hand, we don't want to restart our loop
+	 * just because that broke out for the page_table_lock;
+	 * on the other hand, it does no test when vma is small.
+	 */
+	need_break = need_resched() ||
+			need_lockbreak(details->i_mmap_lock);
+
+	if (details->break_addr >= end_addr) {
+		/* We have now completed this vma: mark it so */
+		vma->vm_truncate_count = details->truncate_count;
+		if (!need_break)
+			return 0;
+	} else {
+		/* Note restart_addr in vma's truncate_count field */
+		vma->vm_truncate_count = details->break_addr;
+		if (!need_break)
+			goto again;
+	}
+
+	spin_unlock(details->i_mmap_lock);
+	cond_resched();
+	spin_lock(details->i_mmap_lock);
+	return -EINTR;
+}
+
+static inline void unmap_mapping_range_tree(struct prio_tree_root *root,
 					    struct zap_details *details)
 {
 	struct vm_area_struct *vma;
 	struct prio_tree_iter iter;
 	pgoff_t vba, vea, zba, zea;
 
+restart:
 	vma_prio_tree_foreach(vma, &iter, root,
 			details->first_index, details->last_index) {
+		/* Skip quickly over those we have already dealt with */
+		if (vma->vm_truncate_count == details->truncate_count)
+			continue;
+
 		vba = vma->vm_pgoff;
 		vea = vba + ((vma->vm_end - vma->vm_start) >> PAGE_SHIFT) - 1;
 		/* Assume for now that PAGE_CACHE_SHIFT == PAGE_SHIFT */
@@ -1154,9 +1482,35 @@
 		zea = details->last_index;
 		if (zea > vea)
 			zea = vea;
-		zap_page_range(vma,
+
+		if (unmap_mapping_range_vma(vma,
 			((zba - vba) << PAGE_SHIFT) + vma->vm_start,
-			(zea - zba + 1) << PAGE_SHIFT, details);
+			((zea - vba + 1) << PAGE_SHIFT) + vma->vm_start,
+				details) < 0)
+			goto restart;
+	}
+}
+
+static inline void unmap_mapping_range_list(struct list_head *head,
+					    struct zap_details *details)
+{
+	struct vm_area_struct *vma;
+
+	/*
+	 * In nonlinear VMAs there is no correspondence between virtual address
+	 * offset and file offset.  So we must perform an exhaustive search
+	 * across *all* the pages in each nonlinear VMA, not just the pages
+	 * whose virtual address lies outside the file truncation point.
+	 */
+restart:
+	list_for_each_entry(vma, head, shared.vm_set.list) {
+		/* Skip quickly over those we have already dealt with */
+		if (vma->vm_truncate_count == details->truncate_count)
+			continue;
+		details->nonlinear_vma = vma;
+		if (unmap_mapping_range_vma(vma, vma->vm_start,
+					vma->vm_end, details) < 0)
+			goto restart;
 	}
 }
 
@@ -1195,32 +1549,25 @@
 	details.nonlinear_vma = NULL;
 	details.first_index = hba;
 	details.last_index = hba + hlen - 1;
-	details.atomic = 1;	/* A spinlock is held */
 	if (details.last_index < details.first_index)
 		details.last_index = ULONG_MAX;
+	details.i_mmap_lock = &mapping->i_mmap_lock;
 
 	spin_lock(&mapping->i_mmap_lock);
-	/* Protect against page fault */
-	atomic_inc(&mapping->truncate_count);
 
-	if (unlikely(!prio_tree_empty(&mapping->i_mmap)))
-		unmap_mapping_range_list(&mapping->i_mmap, &details);
-
-	/*
-	 * In nonlinear VMAs there is no correspondence between virtual address
-	 * offset and file offset.  So we must perform an exhaustive search
-	 * across *all* the pages in each nonlinear VMA, not just the pages
-	 * whose virtual address lies outside the file truncation point.
-	 */
-	if (unlikely(!list_empty(&mapping->i_mmap_nonlinear))) {
-		struct vm_area_struct *vma;
-		list_for_each_entry(vma, &mapping->i_mmap_nonlinear,
-						shared.vm_set.list) {
-			details.nonlinear_vma = vma;
-			zap_page_range(vma, vma->vm_start,
-				vma->vm_end - vma->vm_start, &details);
-		}
+	/* Protect against page faults, and endless unmapping loops */
+	mapping->truncate_count++;
+	if (unlikely(is_restart_addr(mapping->truncate_count))) {
+		if (mapping->truncate_count == 0)
+			reset_vma_truncate_counts(mapping);
+		mapping->truncate_count++;
 	}
+	details.truncate_count = mapping->truncate_count;
+
+	if (unlikely(!prio_tree_empty(&mapping->i_mmap)))
+		unmap_mapping_range_tree(&mapping->i_mmap, &details);
+	if (unlikely(!list_empty(&mapping->i_mmap_nonlinear)))
+		unmap_mapping_range_list(&mapping->i_mmap_nonlinear, &details);
 	spin_unlock(&mapping->i_mmap_lock);
 }
 EXPORT_SYMBOL(unmap_mapping_range);
@@ -1395,6 +1742,9 @@
 		remove_exclusive_swap_page(page);
 
 	mm->rss++;
+	acct_update_integrals();
+	update_mem_hiwater();
+
 	pte = mk_pte(page, vma->vm_page_prot);
 	if (write_access && can_share_swap_page(page)) {
 		pte = maybe_mkwrite(pte_mkdirty(pte), vma);
@@ -1460,11 +1810,13 @@
 			goto out;
 		}
 		mm->rss++;
+		acct_update_integrals();
+		update_mem_hiwater();
 		entry = maybe_mkwrite(pte_mkdirty(mk_pte(page,
 							 vma->vm_page_prot)),
 				      vma);
 		lru_cache_add_active(page);
-		mark_page_accessed(page);
+		SetPageReferenced(page);
 		page_add_anon_rmap(page, vma, addr);
 	}
 
@@ -1499,7 +1851,7 @@
 	struct page * new_page;
 	struct address_space *mapping = NULL;
 	pte_t entry;
-	int sequence = 0;
+	unsigned int sequence = 0;
 	int ret = VM_FAULT_MINOR;
 	int anon = 0;
 
@@ -1511,10 +1863,10 @@
 
 	if (vma->vm_file) {
 		mapping = vma->vm_file->f_mapping;
-		sequence = atomic_read(&mapping->truncate_count);
+		sequence = mapping->truncate_count;
 	}
-	smp_rmb();  /* Prevent CPU from reordering lock-free ->nopage() */
 retry:
+	cond_resched();
 	new_page = vma->vm_ops->nopage(vma, address & PAGE_MASK, &ret);
 
 	/* no page was available -- either SIGBUS or OOM */
@@ -1546,9 +1898,8 @@
 	 * invalidated this page.  If unmap_mapping_range got called,
 	 * retry getting the page.
 	 */
-	if (mapping &&
-	      (unlikely(sequence != atomic_read(&mapping->truncate_count)))) {
-		sequence = atomic_read(&mapping->truncate_count);
+	if (mapping && unlikely(sequence != mapping->truncate_count)) {
+		sequence = mapping->truncate_count;
 		spin_unlock(&mm->page_table_lock);
 		page_cache_release(new_page);
 		goto retry;
@@ -1569,6 +1920,9 @@
 	if (pte_none(*page_table)) {
 		if (!PageReserved(new_page))
 			++mm->rss;
+		acct_update_integrals();
+		update_mem_hiwater();
+
 		flush_icache_page(vma, new_page);
 		entry = mk_pte(new_page, vma->vm_page_prot);
 		if (write_access)
@@ -1693,13 +2047,14 @@
  * By the time we get here, we already hold the mm semaphore
  */
 int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct * vma,
-	unsigned long address, int write_access)
+		unsigned long address, int write_access)
 {
 	pgd_t *pgd;
+	pud_t *pud;
 	pmd_t *pmd;
+	pte_t *pte;
 
 	__set_current_state(TASK_RUNNING);
-	pgd = pgd_offset(mm, address);
 
 	inc_page_state(pgfault);
 
@@ -1710,18 +2065,64 @@
 	 * We need the page table lock to synchronize with kswapd
 	 * and the SMP-safe atomic PTE updates.
 	 */
+	pgd = pgd_offset(mm, address);
 	spin_lock(&mm->page_table_lock);
-	pmd = pmd_alloc(mm, pgd, address);
 
-	if (pmd) {
-		pte_t * pte = pte_alloc_map(mm, pmd, address);
-		if (pte)
-			return handle_pte_fault(mm, vma, address, write_access, pte, pmd);
-	}
+	pud = pud_alloc(mm, pgd, address);
+	if (!pud)
+		goto oom;
+
+	pmd = pmd_alloc(mm, pud, address);
+	if (!pmd)
+		goto oom;
+
+	pte = pte_alloc_map(mm, pmd, address);
+	if (!pte)
+		goto oom;
+	
+	return handle_pte_fault(mm, vma, address, write_access, pte, pmd);
+
+ oom:
 	spin_unlock(&mm->page_table_lock);
 	return VM_FAULT_OOM;
 }
 
+#ifndef __ARCH_HAS_4LEVEL_HACK
+#if (PTRS_PER_PUD > 1)
+/*
+ * Allocate page upper directory.
+ *
+ * We've already handled the fast-path in-line, and we own the
+ * page table lock.
+ *
+ * On a two-level or three-level page table, this ends up actually being
+ * entirely optimized away.
+ */
+pud_t fastcall *__pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address)
+{
+	pud_t *new;
+
+	spin_unlock(&mm->page_table_lock);
+	new = pud_alloc_one(mm, address);
+	spin_lock(&mm->page_table_lock);
+	if (!new)
+		return NULL;
+
+	/*
+	 * Because we dropped the lock, we should re-check the
+	 * entry, as somebody else could have populated it..
+	 */
+	if (pgd_present(*pgd)) {
+		pud_free(new);
+		goto out;
+	}
+	pgd_populate(mm, pgd, new);
+out:
+	return pud_offset(pgd, address);
+}
+#endif
+
+#if (PTRS_PER_PMD > 1)
 /*
  * Allocate page middle directory.
  *
@@ -1731,7 +2132,7 @@
  * On a two-level page table, this ends up actually being entirely
  * optimized away.
  */
-pmd_t fastcall *__pmd_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address)
+pmd_t fastcall *__pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address)
 {
 	pmd_t *new;
 
@@ -1745,14 +2146,39 @@
 	 * Because we dropped the lock, we should re-check the
 	 * entry, as somebody else could have populated it..
 	 */
-	if (pgd_present(*pgd)) {
+	if (pud_present(*pud)) {
 		pmd_free(new);
 		goto out;
 	}
-	pgd_populate(mm, pgd, new);
+	pud_populate(mm, pud, new);
 out:
-	return pmd_offset(pgd, address);
+	return pmd_offset(pud, address);
 }
+#endif
+#else
+pmd_t fastcall *__pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address)
+{
+	pmd_t *new;
+
+	spin_unlock(&mm->page_table_lock);
+	new = pmd_alloc_one(mm, address);
+	spin_lock(&mm->page_table_lock);
+	if (!new)
+		return NULL;
+
+	/*
+	 * Because we dropped the lock, we should re-check the
+	 * entry, as somebody else could have populated it..
+	 */
+	if (pgd_present(*pud)) {
+		pmd_free(new);
+		goto out;
+	}
+	pgd_populate(mm, pud, new);
+out:
+	return pmd_offset(pud, address);
+}
+#endif
 
 int make_pages_present(unsigned long addr, unsigned long end)
 {
@@ -1783,17 +2209,21 @@
 	unsigned long addr = (unsigned long) vmalloc_addr;
 	struct page *page = NULL;
 	pgd_t *pgd = pgd_offset_k(addr);
+	pud_t *pud;
 	pmd_t *pmd;
 	pte_t *ptep, pte;
   
 	if (!pgd_none(*pgd)) {
-		pmd = pmd_offset(pgd, addr);
-		if (!pmd_none(*pmd)) {
-			ptep = pte_offset_map(pmd, addr);
-			pte = *ptep;
-			if (pte_present(pte))
-				page = pte_page(pte);
-			pte_unmap(ptep);
+		pud = pud_offset(pgd, addr);
+		if (!pud_none(*pud)) {
+			pmd = pmd_offset(pud, addr);
+			if (!pmd_none(*pmd)) {
+				ptep = pte_offset_map(pmd, addr);
+				pte = *ptep;
+				if (pte_present(pte))
+					page = pte_page(pte);
+				pte_unmap(ptep);
+			}
 		}
 	}
 	return page;
@@ -1811,7 +2241,23 @@
 
 EXPORT_SYMBOL(vmalloc_to_pfn);
 
-#if !defined(CONFIG_ARCH_GATE_AREA)
+/*
+ * update_mem_hiwater
+ *	- update per process rss and vm high water data
+ */
+void update_mem_hiwater(void)
+{
+	struct task_struct *tsk = current;
+
+	if (tsk->mm) {
+		if (tsk->mm->hiwater_rss < tsk->mm->rss)
+			tsk->mm->hiwater_rss = tsk->mm->rss;
+		if (tsk->mm->hiwater_vm < tsk->mm->total_vm)
+			tsk->mm->hiwater_vm = tsk->mm->total_vm;
+	}
+}
+
+#if !defined(__HAVE_ARCH_GATE_AREA)
 
 #if defined(AT_SYSINFO_EHDR)
 struct vm_area_struct gate_vma;
@@ -1837,7 +2283,7 @@
 #endif
 }
 
-int in_gate_area(struct task_struct *task, unsigned long addr)
+int in_gate_area_no_task(unsigned long addr)
 {
 #ifdef AT_SYSINFO_EHDR
 	if ((addr >= FIXADDR_USER_START) && (addr < FIXADDR_USER_END))
@@ -1846,4 +2292,4 @@
 	return 0;
 }
 
-#endif
+#endif	/* __HAVE_ARCH_GATE_AREA */
diff -Nru a/mm/mempolicy.c b/mm/mempolicy.c
--- a/mm/mempolicy.c	2005-01-10 20:11:23 -08:00
+++ b/mm/mempolicy.c	2005-01-10 20:11:23 -08:00
@@ -234,18 +234,29 @@
 
 /* Ensure all existing pages follow the policy. */
 static int
-verify_pages(unsigned long addr, unsigned long end, unsigned long *nodes)
+verify_pages(struct mm_struct *mm,
+	     unsigned long addr, unsigned long end, unsigned long *nodes)
 {
 	while (addr < end) {
 		struct page *p;
 		pte_t *pte;
 		pmd_t *pmd;
-		pgd_t *pgd = pgd_offset_k(addr);
+		pud_t *pud;
+		pgd_t *pgd;
+		pgd = pgd_offset(mm, addr);
 		if (pgd_none(*pgd)) {
-			addr = (addr + PGDIR_SIZE) & PGDIR_MASK;
+			unsigned long next = (addr + PGDIR_SIZE) & PGDIR_MASK;
+			if (next > addr)
+				break;
+			addr = next;
+			continue;
+		}
+		pud = pud_offset(pgd, addr);
+		if (pud_none(*pud)) {
+			addr = (addr + PUD_SIZE) & PUD_MASK;
 			continue;
 		}
-		pmd = pmd_offset(pgd, addr);
+		pmd = pmd_offset(pud, addr);
 		if (pmd_none(*pmd)) {
 			addr = (addr + PMD_SIZE) & PMD_MASK;
 			continue;
@@ -283,7 +294,8 @@
 		if (prev && prev->vm_end < vma->vm_start)
 			return ERR_PTR(-EFAULT);
 		if ((flags & MPOL_MF_STRICT) && !is_vm_hugetlb_page(vma)) {
-			err = verify_pages(vma->vm_start, vma->vm_end, nodes);
+			err = verify_pages(vma->vm_mm,
+					   vma->vm_start, vma->vm_end, nodes);
 			if (err) {
 				first = ERR_PTR(err);
 				break;
@@ -477,7 +489,7 @@
 
 	if (flags & ~(unsigned long)(MPOL_F_NODE|MPOL_F_ADDR))
 		return -EINVAL;
-	if (nmask != NULL && maxnode < numnodes)
+	if (nmask != NULL && maxnode < MAX_NUMNODES)
 		return -EINVAL;
 	if (flags & MPOL_F_ADDR) {
 		down_read(&mm->mmap_sem);
@@ -1016,12 +1028,10 @@
 						return -ENOMEM;
 					goto restart;
 				}
-				n->end = end;
+				n->end = start;
 				sp_insert(sp, new2);
-				new2 = NULL;
-			}
-			/* Old crossing beginning, but not end (easy) */
-			if (n->start < start && n->end > start)
+				break;
+			} else
 				n->end = start;
 		}
 		if (!next)
@@ -1074,11 +1084,11 @@
 	while (next) {
 		n = rb_entry(next, struct sp_node, nd);
 		next = rb_next(&n->nd);
-		rb_erase(&n->nd, &p->root);
 		mpol_free(n->policy);
 		kmem_cache_free(sn_cache, n);
 	}
 	spin_unlock(&p->lock);
+	p->root = RB_ROOT;
 }
 
 /* assumes fs == KERNEL_DS */
diff -Nru a/mm/mlock.c b/mm/mlock.c
--- a/mm/mlock.c	2005-01-10 20:11:16 -08:00
+++ b/mm/mlock.c	2005-01-10 20:11:16 -08:00
@@ -204,7 +204,7 @@
  * Objects with different lifetime than processes (SHM_LOCK and SHM_HUGETLB
  * shm segments) get accounted against the user_struct instead.
  */
-static spinlock_t shmlock_user_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(shmlock_user_lock);
 
 int user_shm_lock(size_t size, struct user_struct *user)
 {
diff -Nru a/mm/mmap.c b/mm/mmap.c
--- a/mm/mmap.c	2005-01-10 20:11:20 -08:00
+++ b/mm/mmap.c	2005-01-10 20:11:20 -08:00
@@ -7,6 +7,7 @@
  */
 
 #include <linux/slab.h>
+#include <linux/mm.h>
 #include <linux/shm.h>
 #include <linux/mman.h>
 #include <linux/pagemap.h>
@@ -20,6 +21,7 @@
 #include <linux/hugetlb.h>
 #include <linux/profile.h>
 #include <linux/module.h>
+#include <linux/acct.h>
 #include <linux/mount.h>
 #include <linux/mempolicy.h>
 #include <linux/rmap.h>
@@ -306,8 +308,10 @@
 	if (vma->vm_file)
 		mapping = vma->vm_file->f_mapping;
 
-	if (mapping)
+	if (mapping) {
 		spin_lock(&mapping->i_mmap_lock);
+		vma->vm_truncate_count = mapping->truncate_count;
+	}
 	anon_vma_lock(vma);
 
 	__vma_link(mm, vma, prev, rb_link, rb_parent);
@@ -378,6 +382,7 @@
 again:			remove_next = 1 + (end > next->vm_end);
 			end = next->vm_end;
 			anon_vma = next->anon_vma;
+			importer = vma;
 		} else if (end > next->vm_start) {
 			/*
 			 * vma expands, overlapping part of the next:
@@ -403,7 +408,16 @@
 		if (!(vma->vm_flags & VM_NONLINEAR))
 			root = &mapping->i_mmap;
 		spin_lock(&mapping->i_mmap_lock);
+		if (importer &&
+		    vma->vm_truncate_count != next->vm_truncate_count) {
+			/*
+			 * unmap_mapping_range might be in progress:
+			 * ensure that the expanding vma is rescanned.
+			 */
+			importer->vm_truncate_count = 0;
+		}
 		if (insert) {
+			insert->vm_truncate_count = vma->vm_truncate_count;
 			/*
 			 * Put into prio_tree now, so instantiated pages
 			 * are visible to arm/parisc __flush_dcache_page
@@ -1019,6 +1033,8 @@
 					pgoff, flags & MAP_NONBLOCK);
 		down_write(&mm->mmap_sem);
 	}
+	acct_update_integrals();
+	update_mem_hiwater();
 	return addr;
 
 unmap_and_free_vma:
@@ -1319,13 +1335,60 @@
 	return prev ? prev->vm_next : vma;
 }
 
+/*
+ * Verify that the stack growth is acceptable and
+ * update accounting. This is shared with both the
+ * grow-up and grow-down cases.
+ */
+static int acct_stack_growth(struct vm_area_struct * vma, unsigned long size, unsigned long grow)
+{
+	struct mm_struct *mm = vma->vm_mm;
+	struct rlimit *rlim = current->signal->rlim;
+
+	/* address space limit tests */
+	rlim = current->signal->rlim;
+	if (mm->total_vm + grow > rlim[RLIMIT_AS].rlim_cur >> PAGE_SHIFT)
+		return -ENOMEM;
+
+	/* Stack limit test */
+	if (size > rlim[RLIMIT_STACK].rlim_cur)
+		return -ENOMEM;
+
+	/* mlock limit tests */
+	if (vma->vm_flags & VM_LOCKED) {
+		unsigned long locked;
+		unsigned long limit;
+		locked = mm->locked_vm + grow;
+		limit = rlim[RLIMIT_MEMLOCK].rlim_cur >> PAGE_SHIFT;
+		if (locked > limit)
+			return -ENOMEM;
+	}
+
+	/*
+	 * Overcommit..  This must be the final test, as it will
+	 * update security statistics.
+	 */
+	if (security_vm_enough_memory(grow))
+		return -ENOMEM;
+
+	/* Ok, everything looks good - let it rip */
+	mm->total_vm += grow;
+	if (vma->vm_flags & VM_LOCKED)
+		mm->locked_vm += grow;
+	__vm_stat_account(mm, vma->vm_flags, vma->vm_file, grow);
+	acct_update_integrals();
+	update_mem_hiwater();
+	return 0;
+}
+
 #ifdef CONFIG_STACK_GROWSUP
 /*
  * vma is the first one with address > vma->vm_end.  Have to extend vma.
  */
 int expand_stack(struct vm_area_struct * vma, unsigned long address)
 {
-	unsigned long grow;
+	int error;
+	unsigned long size, grow;
 
 	if (!(vma->vm_flags & VM_GROWSUP))
 		return -EFAULT;
@@ -1345,28 +1408,14 @@
 	 */
 	address += 4 + PAGE_SIZE - 1;
 	address &= PAGE_MASK;
+	size = address - vma->vm_start;
 	grow = (address - vma->vm_end) >> PAGE_SHIFT;
 
-	/* Overcommit.. */
-	if (security_vm_enough_memory(grow)) {
-		anon_vma_unlock(vma);
-		return -ENOMEM;
-	}
-	
-	if (address - vma->vm_start > current->signal->rlim[RLIMIT_STACK].rlim_cur ||
-			((vma->vm_mm->total_vm + grow) << PAGE_SHIFT) >
-			current->signal->rlim[RLIMIT_AS].rlim_cur) {
-		anon_vma_unlock(vma);
-		vm_unacct_memory(grow);
-		return -ENOMEM;
-	}
-	vma->vm_end = address;
-	vma->vm_mm->total_vm += grow;
-	if (vma->vm_flags & VM_LOCKED)
-		vma->vm_mm->locked_vm += grow;
-	__vm_stat_account(vma->vm_mm, vma->vm_flags, vma->vm_file, grow);
+	error = acct_stack_growth(vma, size, grow);
+	if (!error)
+		vma->vm_end = address;
 	anon_vma_unlock(vma);
-	return 0;
+	return error;
 }
 
 struct vm_area_struct *
@@ -1391,7 +1440,8 @@
  */
 int expand_stack(struct vm_area_struct *vma, unsigned long address)
 {
-	unsigned long grow;
+	int error;
+	unsigned long size, grow;
 
 	/*
 	 * We must make sure the anon_vma is allocated
@@ -1407,29 +1457,16 @@
 	 * anon_vma lock to serialize against concurrent expand_stacks.
 	 */
 	address &= PAGE_MASK;
+	size = vma->vm_end - address;
 	grow = (vma->vm_start - address) >> PAGE_SHIFT;
 
-	/* Overcommit.. */
-	if (security_vm_enough_memory(grow)) {
-		anon_vma_unlock(vma);
-		return -ENOMEM;
-	}
-	
-	if (vma->vm_end - address > current->signal->rlim[RLIMIT_STACK].rlim_cur ||
-			((vma->vm_mm->total_vm + grow) << PAGE_SHIFT) >
-			current->signal->rlim[RLIMIT_AS].rlim_cur) {
-		anon_vma_unlock(vma);
-		vm_unacct_memory(grow);
-		return -ENOMEM;
+	error = acct_stack_growth(vma, size, grow);
+	if (!error) {
+		vma->vm_start = address;
+		vma->vm_pgoff -= grow;
 	}
-	vma->vm_start = address;
-	vma->vm_pgoff -= grow;
-	vma->vm_mm->total_vm += grow;
-	if (vma->vm_flags & VM_LOCKED)
-		vma->vm_mm->locked_vm += grow;
-	__vm_stat_account(vma->vm_mm, vma->vm_flags, vma->vm_file, grow);
 	anon_vma_unlock(vma);
-	return 0;
+	return error;
 }
 
 struct vm_area_struct *
@@ -1474,9 +1511,11 @@
 {
 	unsigned long first = start & PGDIR_MASK;
 	unsigned long last = end + PGDIR_SIZE - 1;
-	unsigned long start_index, end_index;
 	struct mm_struct *mm = tlb->mm;
 
+	if (last > TASK_SIZE || last < end)
+		last = TASK_SIZE;
+
 	if (!prev) {
 		prev = mm->mmap;
 		if (!prev)
@@ -1499,23 +1538,18 @@
 				last = next->vm_start;
 		}
 		if (prev->vm_end > first)
-			first = prev->vm_end + PGDIR_SIZE - 1;
+			first = prev->vm_end;
 		break;
 	}
 no_mmaps:
 	if (last < first)	/* for arches with discontiguous pgd indices */
 		return;
-	/*
-	 * If the PGD bits are not consecutive in the virtual address, the
-	 * old method of shifting the VA >> by PGDIR_SHIFT doesn't work.
-	 */
-	start_index = pgd_index(first);
-	if (start_index < FIRST_USER_PGD_NR)
-		start_index = FIRST_USER_PGD_NR;
-	end_index = pgd_index(last);
-	if (end_index > start_index) {
-		clear_page_tables(tlb, start_index, end_index - start_index);
-		flush_tlb_pgtables(mm, first & PGDIR_MASK, last & PGDIR_MASK);
+	if (first < FIRST_USER_PGD_NR * PGDIR_SIZE)
+		first = FIRST_USER_PGD_NR * PGDIR_SIZE;
+	/* No point trying to free anything if we're in the same pte page */
+	if ((first & PMD_MASK) < (last & PMD_MASK)) {
+		clear_page_range(tlb, first, last);
+		flush_tlb_pgtables(mm, first, last);
 	}
 }
 
@@ -1821,6 +1855,8 @@
 		mm->locked_vm += len >> PAGE_SHIFT;
 		make_pages_present(addr, addr + len);
 	}
+	acct_update_integrals();
+	update_mem_hiwater();
 	return addr;
 }
 
@@ -1844,7 +1880,9 @@
 					~0UL, &nr_accounted, NULL);
 	vm_unacct_memory(nr_accounted);
 	BUG_ON(mm->map_count);	/* This is just debugging */
-	clear_page_tables(tlb, FIRST_USER_PGD_NR, USER_PTRS_PER_PGD);
+	clear_page_range(tlb, FIRST_USER_PGD_NR * PGDIR_SIZE,
+			(TASK_SIZE + PGDIR_SIZE - 1) & PGDIR_MASK);
+	
 	tlb_finish_mmu(tlb, 0, MM_VM_SIZE(mm));
 
 	vma = mm->mmap;
diff -Nru a/mm/mprotect.c b/mm/mprotect.c
--- a/mm/mprotect.c	2005-01-10 20:11:24 -08:00
+++ b/mm/mprotect.c	2005-01-10 20:11:24 -08:00
@@ -62,12 +62,38 @@
 }
 
 static inline void
-change_pmd_range(pgd_t *pgd, unsigned long address,
+change_pmd_range(pud_t *pud, unsigned long address,
 		unsigned long size, pgprot_t newprot)
 {
 	pmd_t * pmd;
 	unsigned long end;
 
+	if (pud_none(*pud))
+		return;
+	if (pud_bad(*pud)) {
+		pud_ERROR(*pud);
+		pud_clear(pud);
+		return;
+	}
+	pmd = pmd_offset(pud, address);
+	address &= ~PUD_MASK;
+	end = address + size;
+	if (end > PUD_SIZE)
+		end = PUD_SIZE;
+	do {
+		change_pte_range(pmd, address, end - address, newprot);
+		address = (address + PMD_SIZE) & PMD_MASK;
+		pmd++;
+	} while (address && (address < end));
+}
+
+static inline void
+change_pud_range(pgd_t *pgd, unsigned long address,
+		unsigned long size, pgprot_t newprot)
+{
+	pud_t * pud;
+	unsigned long end;
+
 	if (pgd_none(*pgd))
 		return;
 	if (pgd_bad(*pgd)) {
@@ -75,15 +101,15 @@
 		pgd_clear(pgd);
 		return;
 	}
-	pmd = pmd_offset(pgd, address);
+	pud = pud_offset(pgd, address);
 	address &= ~PGDIR_MASK;
 	end = address + size;
 	if (end > PGDIR_SIZE)
 		end = PGDIR_SIZE;
 	do {
-		change_pte_range(pmd, address, end - address, newprot);
-		address = (address + PMD_SIZE) & PMD_MASK;
-		pmd++;
+		change_pmd_range(pud, address, end - address, newprot);
+		address = (address + PUD_SIZE) & PUD_MASK;
+		pud++;
 	} while (address && (address < end));
 }
 
@@ -91,22 +117,25 @@
 change_protection(struct vm_area_struct *vma, unsigned long start,
 		unsigned long end, pgprot_t newprot)
 {
-	pgd_t *dir;
-	unsigned long beg = start;
+	struct mm_struct *mm = current->mm;
+	pgd_t *pgd;
+	unsigned long beg = start, next;
+	int i;
 
-	dir = pgd_offset(current->mm, start);
+	pgd = pgd_offset(mm, start);
 	flush_cache_range(vma, beg, end);
-	if (start >= end)
-		BUG();
-	spin_lock(&current->mm->page_table_lock);
-	do {
-		change_pmd_range(dir, start, end - start, newprot);
-		start = (start + PGDIR_SIZE) & PGDIR_MASK;
-		dir++;
-	} while (start && (start < end));
+	BUG_ON(start >= end);
+	spin_lock(&mm->page_table_lock);
+	for (i = pgd_index(start); i <= pgd_index(end-1); i++) {
+		next = (start + PGDIR_SIZE) & PGDIR_MASK;
+		if (next <= start || next > end)
+			next = end;
+		change_pud_range(pgd, start, next - start, newprot);
+		start = next;
+		pgd++;
+	}
 	flush_tlb_range(vma, beg, end);
-	spin_unlock(&current->mm->page_table_lock);
-	return;
+	spin_unlock(&mm->page_table_lock);
 }
 
 static int
diff -Nru a/mm/mremap.c b/mm/mremap.c
--- a/mm/mremap.c	2005-01-10 20:11:19 -08:00
+++ b/mm/mremap.c	2005-01-10 20:11:19 -08:00
@@ -16,6 +16,7 @@
 #include <linux/fs.h>
 #include <linux/highmem.h>
 #include <linux/security.h>
+#include <linux/acct.h>
 #include <linux/syscalls.h>
 
 #include <asm/uaccess.h>
@@ -25,19 +26,24 @@
 static pte_t *get_one_pte_map_nested(struct mm_struct *mm, unsigned long addr)
 {
 	pgd_t *pgd;
+	pud_t *pud;
 	pmd_t *pmd;
 	pte_t *pte = NULL;
 
 	pgd = pgd_offset(mm, addr);
 	if (pgd_none(*pgd))
 		goto end;
-	if (pgd_bad(*pgd)) {
-		pgd_ERROR(*pgd);
-		pgd_clear(pgd);
+
+	pud = pud_offset(pgd, addr);
+	if (pud_none(*pud))
+		goto end;
+	if (pud_bad(*pud)) {
+		pud_ERROR(*pud);
+		pud_clear(pud);
 		goto end;
 	}
 
-	pmd = pmd_offset(pgd, addr);
+	pmd = pmd_offset(pud, addr);
 	if (pmd_none(*pmd))
 		goto end;
 	if (pmd_bad(*pmd)) {
@@ -58,12 +64,17 @@
 static pte_t *get_one_pte_map(struct mm_struct *mm, unsigned long addr)
 {
 	pgd_t *pgd;
+	pud_t *pud;
 	pmd_t *pmd;
 
 	pgd = pgd_offset(mm, addr);
 	if (pgd_none(*pgd))
 		return NULL;
-	pmd = pmd_offset(pgd, addr);
+
+	pud = pud_offset(pgd, addr);
+	if (pud_none(*pud))
+		return NULL;
+	pmd = pmd_offset(pud, addr);
 	if (!pmd_present(*pmd))
 		return NULL;
 	return pte_offset_map(pmd, addr);
@@ -71,10 +82,17 @@
 
 static inline pte_t *alloc_one_pte_map(struct mm_struct *mm, unsigned long addr)
 {
+	pgd_t *pgd;
+	pud_t *pud;
 	pmd_t *pmd;
 	pte_t *pte = NULL;
 
-	pmd = pmd_alloc(mm, pgd_offset(mm, addr), addr);
+	pgd = pgd_offset(mm, addr);
+
+	pud = pud_alloc(mm, pgd, addr);
+	if (!pud)
+		return NULL;
+	pmd = pmd_alloc(mm, pud, addr);
 	if (pmd)
 		pte = pte_alloc_map(mm, pmd, addr);
 	return pte;
@@ -82,7 +100,7 @@
 
 static int
 move_one_page(struct vm_area_struct *vma, unsigned long old_addr,
-		unsigned long new_addr)
+		struct vm_area_struct *new_vma, unsigned long new_addr)
 {
 	struct address_space *mapping = NULL;
 	struct mm_struct *mm = vma->vm_mm;
@@ -98,6 +116,9 @@
 		 */
 		mapping = vma->vm_file->f_mapping;
 		spin_lock(&mapping->i_mmap_lock);
+		if (new_vma->vm_truncate_count &&
+		    new_vma->vm_truncate_count != vma->vm_truncate_count)
+			new_vma->vm_truncate_count = 0;
 	}
 	spin_lock(&mm->page_table_lock);
 
@@ -144,8 +165,8 @@
 }
 
 static unsigned long move_page_tables(struct vm_area_struct *vma,
-		unsigned long new_addr, unsigned long old_addr,
-		unsigned long len)
+		unsigned long old_addr, struct vm_area_struct *new_vma,
+		unsigned long new_addr, unsigned long len)
 {
 	unsigned long offset;
 
@@ -157,7 +178,8 @@
 	 * only a few pages.. This also makes error recovery easier.
 	 */
 	for (offset = 0; offset < len; offset += PAGE_SIZE) {
-		if (move_one_page(vma, old_addr+offset, new_addr+offset) < 0)
+		if (move_one_page(vma, old_addr + offset,
+				new_vma, new_addr + offset) < 0)
 			break;
 		cond_resched();
 	}
@@ -188,14 +210,14 @@
 	if (!new_vma)
 		return -ENOMEM;
 
-	moved_len = move_page_tables(vma, new_addr, old_addr, old_len);
+	moved_len = move_page_tables(vma, old_addr, new_vma, new_addr, old_len);
 	if (moved_len < old_len) {
 		/*
 		 * On error, move entries back from new area to old,
 		 * which will succeed since page tables still there,
 		 * and then proceed to unmap new area instead of old.
 		 */
-		move_page_tables(new_vma, old_addr, new_addr, moved_len);
+		move_page_tables(new_vma, new_addr, vma, old_addr, moved_len);
 		vma = new_vma;
 		old_len = new_len;
 		old_addr = new_addr;
@@ -233,6 +255,9 @@
 					   new_addr + new_len);
 	}
 
+	acct_update_integrals();
+	update_mem_hiwater();
+
 	return new_addr;
 }
 
@@ -369,6 +394,8 @@
 				make_pages_present(addr + old_len,
 						   addr + new_len);
 			}
+			acct_update_integrals();
+			update_mem_hiwater();
 			ret = addr;
 			goto out;
 		}
diff -Nru a/mm/msync.c b/mm/msync.c
--- a/mm/msync.c	2005-01-10 20:11:18 -08:00
+++ b/mm/msync.c	2005-01-10 20:11:18 -08:00
@@ -67,13 +67,39 @@
 	return error;
 }
 
-static inline int filemap_sync_pmd_range(pgd_t * pgd,
+static inline int filemap_sync_pmd_range(pud_t * pud,
 	unsigned long address, unsigned long end, 
 	struct vm_area_struct *vma, unsigned int flags)
 {
 	pmd_t * pmd;
 	int error;
 
+	if (pud_none(*pud))
+		return 0;
+	if (pud_bad(*pud)) {
+		pud_ERROR(*pud);
+		pud_clear(pud);
+		return 0;
+	}
+	pmd = pmd_offset(pud, address);
+	if ((address & PUD_MASK) != (end & PUD_MASK))
+		end = (address & PUD_MASK) + PUD_SIZE;
+	error = 0;
+	do {
+		error |= filemap_sync_pte_range(pmd, address, end, vma, flags);
+		address = (address + PMD_SIZE) & PMD_MASK;
+		pmd++;
+	} while (address && (address < end));
+	return error;
+}
+
+static inline int filemap_sync_pud_range(pgd_t *pgd,
+	unsigned long address, unsigned long end,
+	struct vm_area_struct *vma, unsigned int flags)
+{
+	pud_t *pud;
+	int error;
+
 	if (pgd_none(*pgd))
 		return 0;
 	if (pgd_bad(*pgd)) {
@@ -81,23 +107,25 @@
 		pgd_clear(pgd);
 		return 0;
 	}
-	pmd = pmd_offset(pgd, address);
+	pud = pud_offset(pgd, address);
 	if ((address & PGDIR_MASK) != (end & PGDIR_MASK))
 		end = (address & PGDIR_MASK) + PGDIR_SIZE;
 	error = 0;
 	do {
-		error |= filemap_sync_pte_range(pmd, address, end, vma, flags);
-		address = (address + PMD_SIZE) & PMD_MASK;
-		pmd++;
+		error |= filemap_sync_pmd_range(pud, address, end, vma, flags);
+		address = (address + PUD_SIZE) & PUD_MASK;
+		pud++;
 	} while (address && (address < end));
 	return error;
 }
 
-static int filemap_sync(struct vm_area_struct * vma, unsigned long address,
-	size_t size, unsigned int flags)
+static int __filemap_sync(struct vm_area_struct *vma, unsigned long address,
+			size_t size, unsigned int flags)
 {
-	pgd_t * dir;
+	pgd_t *pgd;
 	unsigned long end = address + size;
+	unsigned long next;
+	int i;
 	int error = 0;
 
 	/* Aquire the lock early; it may be possible to avoid dropping
@@ -105,7 +133,7 @@
 	 */
 	spin_lock(&vma->vm_mm->page_table_lock);
 
-	dir = pgd_offset(vma->vm_mm, address);
+	pgd = pgd_offset(vma->vm_mm, address);
 	flush_cache_range(vma, address, end);
 
 	/* For hugepages we can't go walking the page table normally,
@@ -116,11 +144,14 @@
 
 	if (address >= end)
 		BUG();
-	do {
-		error |= filemap_sync_pmd_range(dir, address, end, vma, flags);
-		address = (address + PGDIR_SIZE) & PGDIR_MASK;
-		dir++;
-	} while (address && (address < end));
+	for (i = pgd_index(address); i <= pgd_index(end-1); i++) {
+		next = (address + PGDIR_SIZE) & PGDIR_MASK;
+		if (next <= address || next > end)
+			next = end;
+		error |= filemap_sync_pud_range(pgd, address, next, vma, flags);
+		address = next;
+		pgd++;
+	}
 	/*
 	 * Why flush ? filemap_sync_pte already flushed the tlbs with the
 	 * dirty bits.
@@ -132,6 +163,31 @@
 	return error;
 }
 
+#ifdef CONFIG_PREEMPT
+static int filemap_sync(struct vm_area_struct *vma, unsigned long address,
+			size_t size, unsigned int flags)
+{
+	const size_t chunk = 64 * 1024;	/* bytes */
+	int error = 0;
+
+	while (size) {
+		size_t sz = min(size, chunk);
+
+		error |= __filemap_sync(vma, address, sz, flags);
+		cond_resched();
+		address += sz;
+		size -= sz;
+	}
+	return error;
+}
+#else
+static int filemap_sync(struct vm_area_struct *vma, unsigned long address,
+			size_t size, unsigned int flags)
+{
+	return __filemap_sync(vma, address, size, flags);
+}
+#endif
+
 /*
  * MS_SYNC syncs the entire file - including mappings.
  *
@@ -159,9 +215,12 @@
 			struct address_space *mapping = file->f_mapping;
 			int err;
 
-			down(&mapping->host->i_sem);
 			ret = filemap_fdatawrite(mapping);
 			if (file->f_op && file->f_op->fsync) {
+				/*
+				 * We don't take i_sem here because mmap_sem
+				 * is already held.
+				 */
 				err = file->f_op->fsync(file,file->f_dentry,1);
 				if (err && !ret)
 					ret = err;
@@ -169,7 +228,6 @@
 			err = filemap_fdatawait(mapping);
 			if (!ret)
 				ret = err;
-			up(&mapping->host->i_sem);
 		}
 	}
 	return ret;
@@ -181,6 +239,9 @@
 	struct vm_area_struct * vma;
 	int unmapped_error, error = -EINVAL;
 
+	if (flags & MS_SYNC)
+		current->flags |= PF_SYNCWRITE;
+
 	down_read(&current->mm->mmap_sem);
 	if (flags & ~(MS_ASYNC | MS_INVALIDATE | MS_SYNC))
 		goto out;
@@ -231,5 +292,6 @@
 	}
 out:
 	up_read(&current->mm->mmap_sem);
+	current->flags &= ~PF_SYNCWRITE;
 	return error;
 }
diff -Nru a/mm/nommu.c b/mm/nommu.c
--- a/mm/nommu.c	2005-01-10 20:11:22 -08:00
+++ b/mm/nommu.c	2005-01-10 20:11:22 -08:00
@@ -4,6 +4,7 @@
  *  Replacement code for mm functions to support CPU's that don't
  *  have any form of memory management unit (thus no virtual memory).
  *
+ *  Copyright (c) 2004      David Howells <dhowells@redhat.com>
  *  Copyright (c) 2000-2003 David McCullough <davidm@snapgear.com>
  *  Copyright (c) 2000-2001 D Jeff Dionne <jeff@uClinux.org>
  *  Copyright (c) 2002      Greg Ungerer <gerg@snapgear.com>
@@ -12,13 +13,17 @@
 #include <linux/mm.h>
 #include <linux/mman.h>
 #include <linux/swap.h>
-#include <linux/smp_lock.h>
+#include <linux/file.h>
 #include <linux/highmem.h>
 #include <linux/pagemap.h>
 #include <linux/slab.h>
 #include <linux/vmalloc.h>
+#include <linux/ptrace.h>
 #include <linux/blkdev.h>
 #include <linux/backing-dev.h>
+#include <linux/mount.h>
+#include <linux/personality.h>
+#include <linux/security.h>
 #include <linux/syscalls.h>
 
 #include <asm/uaccess.h>
@@ -34,10 +39,18 @@
 int sysctl_overcommit_memory = OVERCOMMIT_GUESS; /* heuristic overcommit */
 int sysctl_overcommit_ratio = 50; /* default is 50% */
 int sysctl_max_map_count = DEFAULT_MAX_MAP_COUNT;
+int heap_stack_gap = 0;
 
 EXPORT_SYMBOL(sysctl_max_map_count);
 EXPORT_SYMBOL(mem_map);
 
+/* list of shareable VMAs */
+struct rb_root nommu_vma_tree = RB_ROOT;
+DECLARE_RWSEM(nommu_vma_sem);
+
+struct vm_operations_struct generic_file_vm_ops = {
+};
+
 /*
  * Handle all mappings that got truncated by a "truncate()"
  * system call.
@@ -123,7 +136,7 @@
 	return(i);
 }
 
-rwlock_t vmlist_lock = RW_LOCK_UNLOCKED;
+DEFINE_RWLOCK(vmlist_lock);
 struct vm_struct *vmlist;
 
 void vfree(void *addr)
@@ -161,7 +174,7 @@
 	/* Don't allow overflow */
 	if ((unsigned long) addr + count < count)
 		count = -(unsigned long) addr;
-	
+
 	memcpy(addr, buf, count);
 	return(count);
 }
@@ -217,7 +230,7 @@
 {
 	struct mm_struct *mm = current->mm;
 
-	if (brk < mm->end_code || brk < mm->start_brk || brk > mm->context.end_brk)
+	if (brk < mm->start_brk || brk > mm->context.end_brk)
 		return mm->brk;
 
 	if (mm->brk == brk)
@@ -263,49 +276,127 @@
 #ifdef DEBUG
 static void show_process_blocks(void)
 {
-	struct mm_tblock_struct *tblock;
+	struct vm_list_struct *vml;
 
 	printk("Process blocks %d:", current->pid);
 
-	for (tblock = &current->mm->context.tblock; tblock; tblock = tblock->next) {
-		printk(" %p: %p", tblock, tblock->rblock);
-		if (tblock->rblock)
-			printk(" (%d @%p #%d)", kobjsize(tblock->rblock->kblock), tblock->rblock->kblock, tblock->rblock->refcount);
-		printk(tblock->next ? " ->" : ".\n");
+	for (vml = &current->mm->context.vmlist; vml; vml = vml->next) {
+		printk(" %p: %p", vml, vml->vma);
+		if (vml->vma)
+			printk(" (%d @%lx #%d)",
+			       kobjsize((void *) vml->vma->vm_start),
+			       vml->vma->vm_start,
+			       atomic_read(&vml->vma->vm_usage));
+		printk(vml->next ? " ->" : ".\n");
 	}
 }
 #endif /* DEBUG */
 
-unsigned long do_mmap_pgoff(
-	struct file * file,
-	unsigned long addr,
-	unsigned long len,
-	unsigned long prot,
-	unsigned long flags,
-	unsigned long pgoff)
+static inline struct vm_area_struct *find_nommu_vma(unsigned long start)
 {
-	void * result;
-	struct mm_tblock_struct * tblock;
-	unsigned int vm_flags;
+	struct vm_area_struct *vma;
+	struct rb_node *n = nommu_vma_tree.rb_node;
 
-	/*
-	 * Get the !CONFIG_MMU specific checks done first
-	 */
-	if ((flags & MAP_SHARED) && (prot & PROT_WRITE) && (file)) {
-		printk("MAP_SHARED not supported (cannot write mappings to disk)\n");
-		return -EINVAL;
+	while (n) {
+		vma = rb_entry(n, struct vm_area_struct, vm_rb);
+
+		if (start < vma->vm_start)
+			n = n->rb_left;
+		else if (start > vma->vm_start)
+			n = n->rb_right;
+		else
+			return vma;
+	}
+
+	return NULL;
+}
+
+static void add_nommu_vma(struct vm_area_struct *vma)
+{
+	struct vm_area_struct *pvma;
+	struct address_space *mapping;
+	struct rb_node **p = &nommu_vma_tree.rb_node;
+	struct rb_node *parent = NULL;
+
+	/* add the VMA to the mapping */
+	if (vma->vm_file) {
+		mapping = vma->vm_file->f_mapping;
+
+		flush_dcache_mmap_lock(mapping);
+		vma_prio_tree_insert(vma, &mapping->i_mmap);
+		flush_dcache_mmap_unlock(mapping);
+	}
+
+	/* add the VMA to the master list */
+	while (*p) {
+		parent = *p;
+		pvma = rb_entry(parent, struct vm_area_struct, vm_rb);
+
+		if (vma->vm_start < pvma->vm_start) {
+			p = &(*p)->rb_left;
+		}
+		else if (vma->vm_start > pvma->vm_start) {
+			p = &(*p)->rb_right;
+		}
+		else {
+			/* mappings are at the same address - this can only
+			 * happen for shared-mem chardevs and shared file
+			 * mappings backed by ramfs/tmpfs */
+			BUG_ON(!(pvma->vm_flags & VM_SHARED));
+
+			if (vma < pvma)
+				p = &(*p)->rb_left;
+			else if (vma > pvma)
+				p = &(*p)->rb_right;
+			else
+				BUG();
+		}
+	}
+
+	rb_link_node(&vma->vm_rb, parent, p);
+	rb_insert_color(&vma->vm_rb, &nommu_vma_tree);
+}
+
+static void delete_nommu_vma(struct vm_area_struct *vma)
+{
+	struct address_space *mapping;
+
+	/* remove the VMA from the mapping */
+	if (vma->vm_file) {
+		mapping = vma->vm_file->f_mapping;
+
+		flush_dcache_mmap_lock(mapping);
+		vma_prio_tree_remove(vma, &mapping->i_mmap);
+		flush_dcache_mmap_unlock(mapping);
 	}
-	
-	if ((prot & PROT_WRITE) && (flags & MAP_PRIVATE)) {
-		printk("Private writable mappings not supported\n");
+
+	/* remove from the master list */
+	rb_erase(&vma->vm_rb, &nommu_vma_tree);
+}
+
+/*
+ * handle mapping creation for uClinux
+ */
+unsigned long do_mmap_pgoff(struct file *file,
+			    unsigned long addr,
+			    unsigned long len,
+			    unsigned long prot,
+			    unsigned long flags,
+			    unsigned long pgoff)
+{
+	struct vm_list_struct *vml = NULL;
+	struct vm_area_struct *vma = NULL;
+	struct rb_node *rb;
+	unsigned int vm_flags;
+	void *result;
+	int ret, membacked;
+
+	/* do the simple checks first */
+	if (flags & MAP_FIXED || addr) {
+		printk(KERN_DEBUG "%d: Can't do fixed-address/overlay mmap of RAM\n",
+		       current->pid);
 		return -EINVAL;
 	}
-	
-	/*
-	 *	now all the standard checks
-	 */
-	if (file && (!file->f_op || !file->f_op->mmap))
-		return -ENODEV;
 
 	if (PAGE_ALIGN(len) == 0)
 		return addr;
@@ -317,148 +408,377 @@
 	if ((pgoff + (len >> PAGE_SHIFT)) < pgoff)
 		return -EINVAL;
 
-	/* Do simple checking here so the lower-level routines won't have
+	/* validate file mapping requests */
+	membacked = 0;
+	if (file) {
+		/* files must support mmap */
+		if (!file->f_op || !file->f_op->mmap)
+			return -ENODEV;
+
+		if ((prot & PROT_EXEC) &&
+		    (file->f_vfsmnt->mnt_flags & MNT_NOEXEC))
+			return -EPERM;
+
+		/* work out if what we've got could possibly be shared
+		 * - we support chardevs that provide their own "memory"
+		 * - we support files/blockdevs that are memory backed
+		 */
+		if (S_ISCHR(file->f_dentry->d_inode->i_mode)) {
+			membacked = 1;
+		}
+		else {
+			struct address_space *mapping = file->f_mapping;
+			if (!mapping)
+				mapping = file->f_dentry->d_inode->i_mapping;
+			if (mapping && mapping->backing_dev_info)
+				membacked = mapping->backing_dev_info->memory_backed;
+		}
+
+		if (flags & MAP_SHARED) {
+			/* do checks for writing, appending and locking */
+			if ((prot & PROT_WRITE) && !(file->f_mode & FMODE_WRITE))
+				return -EACCES;
+
+			if (IS_APPEND(file->f_dentry->d_inode) &&
+			    (file->f_mode & FMODE_WRITE))
+				return -EACCES;
+
+			if (locks_verify_locked(file->f_dentry->d_inode))
+				return -EAGAIN;
+
+			if (!membacked) {
+				printk("MAP_SHARED not completely supported on !MMU\n");
+				return -EINVAL;
+			}
+
+			/* we require greater support from the driver or
+			 * filesystem - we ask it to tell us what memory to
+			 * use */
+			if (!file->f_op->get_unmapped_area)
+				return -ENODEV;
+		}
+		else {
+			/* we read private files into memory we allocate */
+			if (!file->f_op->read)
+				return -ENODEV;
+		}
+	}
+
+	/* handle PROT_EXEC implication by PROT_READ */
+	if ((prot & PROT_READ) && (current->personality & READ_IMPLIES_EXEC))
+		if (!(file && (file->f_vfsmnt->mnt_flags & MNT_NOEXEC)))
+			prot |= PROT_EXEC;
+
+	/* do simple checking here so the lower-level routines won't have
 	 * to. we assume access permissions have been handled by the open
 	 * of the memory object, so we don't do any here.
 	 */
-	vm_flags = calc_vm_flags(prot,flags) /* | mm->def_flags */ | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC;
+	vm_flags = calc_vm_flags(prot,flags) /* | mm->def_flags */
+		| VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC;
 
-	/*
-	 * determine the object being mapped and call the appropriate
-	 * specific mapper. 
+	if (!membacked) {
+		/* share any file segment that's mapped read-only */
+		if (((flags & MAP_PRIVATE) && !(prot & PROT_WRITE) && file) ||
+		    ((flags & MAP_SHARED) && !(prot & PROT_WRITE) && file))
+			vm_flags |= VM_MAYSHARE;
+
+		/* refuse to let anyone share files with this process if it's being traced -
+		 * otherwise breakpoints set in it may interfere with another untraced process
+		 */
+		if (current->ptrace & PT_PTRACED)
+			vm_flags &= ~(VM_SHARED | VM_MAYSHARE);
+	}
+	else {
+		/* permit sharing of character devices and ramfs files at any time for
+		 * anything other than a privately writable mapping
+		 */
+		if (!(flags & MAP_PRIVATE) || !(prot & PROT_WRITE)) {
+			vm_flags |= VM_MAYSHARE;
+			if (flags & MAP_SHARED)
+				vm_flags |= VM_SHARED;
+		}
+	}
+
+	/* allow the security API to have its say */
+	ret = security_file_mmap(file, prot, flags);
+	if (ret)
+		return ret;
+
+	/* we're going to need to record the mapping if it works */
+	vml = kmalloc(sizeof(struct vm_list_struct), GFP_KERNEL);
+	if (!vml)
+		goto error_getting_vml;
+	memset(vml, 0, sizeof(*vml));
+
+	down_write(&nommu_vma_sem);
+
+	/* if we want to share, we need to search for VMAs created by another
+	 * mmap() call that overlap with our proposed mapping
+	 * - we can only share with an exact match on most regular files
+	 * - shared mappings on character devices and memory backed files are
+	 *   permitted to overlap inexactly as far as we are concerned for in
+	 *   these cases, sharing is handled in the driver or filesystem rather
+	 *   than here
 	 */
-	if (file) {
-		struct vm_area_struct vma;
-		int error;
+	if (vm_flags & VM_MAYSHARE) {
+		unsigned long pglen = (len + PAGE_SIZE - 1) >> PAGE_SHIFT;
+		unsigned long vmpglen;
+
+		for (rb = rb_first(&nommu_vma_tree); rb; rb = rb_next(rb)) {
+			vma = rb_entry(rb, struct vm_area_struct, vm_rb);
+
+			if (!(vma->vm_flags & VM_MAYSHARE))
+				continue;
+
+			/* search for overlapping mappings on the same file */
+			if (vma->vm_file->f_dentry->d_inode != file->f_dentry->d_inode)
+				continue;
+
+			if (vma->vm_pgoff >= pgoff + pglen)
+				continue;
+
+			vmpglen = (vma->vm_end - vma->vm_start + PAGE_SIZE - 1) >> PAGE_SHIFT;
+			if (pgoff >= vma->vm_pgoff + vmpglen)
+				continue;
+
+			/* handle inexact matches between mappings */
+			if (vmpglen != pglen || vma->vm_pgoff != pgoff) {
+				if (!membacked)
+					goto sharing_violation;
+				continue;
+			}
 
-		if (!file->f_op)
-			return -ENODEV;
+			/* we've found a VMA we can share */
+			atomic_inc(&vma->vm_usage);
+
+			vml->vma = vma;
+			result = (void *) vma->vm_start;
+			goto shared;
+		}
+	}
+
+	vma = NULL;
+
+	/* obtain the address to map to. we verify (or select) it and ensure
+	 * that it represents a valid section of the address space
+	 * - this is the hook for quasi-memory character devices
+	 */
+	if (file && file->f_op->get_unmapped_area)
+		addr = file->f_op->get_unmapped_area(file, addr, len, pgoff, flags);
+
+	if (IS_ERR((void *) addr)) {
+		ret = addr;
+		goto error;
+	}
+
+	/* we're going to need a VMA struct as well */
+	vma = kmalloc(sizeof(struct vm_area_struct), GFP_KERNEL);
+	if (!vma)
+		goto error_getting_vma;
+
+	memset(vma, 0, sizeof(*vma));
+	INIT_LIST_HEAD(&vma->anon_vma_node);
+	atomic_set(&vma->vm_usage, 1);
+	if (file)
+		get_file(file);
+	vma->vm_file	= file;
+	vma->vm_flags	= vm_flags;
+	vma->vm_start	= addr;
+	vma->vm_end	= addr + len;
+	vma->vm_pgoff	= pgoff;
 
-		vma.vm_start = addr;
-		vma.vm_end = addr + len;
-		vma.vm_flags = vm_flags;
-		vma.vm_pgoff = pgoff;
+	vml->vma = vma;
 
+	/* determine the object being mapped and call the appropriate specific
+	 * mapper.
+	 */
+	if (file) {
 #ifdef MAGIC_ROM_PTR
 		/* First, try simpler routine designed to give us a ROM pointer. */
-
 		if (file->f_op->romptr && !(prot & PROT_WRITE)) {
-			error = file->f_op->romptr(file, &vma);
+			ret = file->f_op->romptr(file, vma);
 #ifdef DEBUG
-			printk("romptr mmap returned %d, start 0x%.8x\n", error,
-					vma.vm_start);
+			printk("romptr mmap returned %d (st=%lx)\n",
+			       ret, vma->vm_start);
 #endif
-			if (!error)
-				return vma.vm_start;
-			else if (error != -ENOSYS)
-				return error;
+			result = (void *) vma->vm_start;
+			if (!ret)
+				goto done;
+			else if (ret != -ENOSYS)
+				goto error;
 		} else
 #endif /* MAGIC_ROM_PTR */
-		/* Then try full mmap routine, which might return a RAM pointer,
-		   or do something truly complicated. */
-		   
+		/* Then try full mmap routine, which might return a RAM
+		 * pointer, or do something truly complicated
+		 */
 		if (file->f_op->mmap) {
-			error = file->f_op->mmap(file, &vma);
-				   
+			ret = file->f_op->mmap(file, vma);
+
 #ifdef DEBUG
-			printk("f_op->mmap() returned %d/%lx\n", error, vma.vm_start);
+			printk("f_op->mmap() returned %d (st=%lx)\n",
+			       ret, vma->vm_start);
 #endif
-			if (!error)
-				return vma.vm_start;
-			else if (error != -ENOSYS)
-				return error;
-		} else
-			return -ENODEV; /* No mapping operations defined */
-
-		/* An ENOSYS error indicates that mmap isn't possible (as opposed to
-		   tried but failed) so we'll fall through to the copy. */
-	}
-
-	tblock = (struct mm_tblock_struct *)
-                        kmalloc(sizeof(struct mm_tblock_struct), GFP_KERNEL);
-	if (!tblock) {
-		printk("Allocation of tblock for %lu byte allocation from process %d failed\n", len, current->pid);
-		show_free_areas();
-		return -ENOMEM;
-	}
-
-	tblock->rblock = (struct mm_rblock_struct *)
-			kmalloc(sizeof(struct mm_rblock_struct), GFP_KERNEL);
+			result = (void *) vma->vm_start;
+			if (!ret)
+				goto done;
+			else if (ret != -ENOSYS)
+				goto error;
+		} else {
+			ret = -ENODEV; /* No mapping operations defined */
+			goto error;
+		}
 
-	if (!tblock->rblock) {
-		printk("Allocation of rblock for %lu byte allocation from process %d failed\n", len, current->pid);
-		show_free_areas();
-		kfree(tblock);
-		return -ENOMEM;
+		/* An ENOSYS error indicates that mmap isn't possible (as
+		 * opposed to tried but failed) so we'll fall through to the
+		 * copy. */
 	}
 
+	/* allocate some memory to hold the mapping
+	 * - note that this may not return a page-aligned address if the object
+	 *   we're allocating is smaller than a page
+	 */
+	ret = -ENOMEM;
 	result = kmalloc(len, GFP_KERNEL);
 	if (!result) {
-		printk("Allocation of length %lu from process %d failed\n", len,
-				current->pid);
+		printk("Allocation of length %lu from process %d failed\n",
+		       len, current->pid);
 		show_free_areas();
-		kfree(tblock->rblock);
-		kfree(tblock);
-		return -ENOMEM;
+		goto error;
 	}
 
-	tblock->rblock->refcount = 1;
-	tblock->rblock->kblock = result;
-	tblock->rblock->size = len;
-	
-	realalloc += kobjsize(result);
-	askedalloc += len;
-
-#ifdef WARN_ON_SLACK	
-	if ((len+WARN_ON_SLACK) <= kobjsize(result))
-		printk("Allocation of %lu bytes from process %d has %lu bytes of slack\n", len, current->pid, kobjsize(result)-len);
+	vma->vm_start = (unsigned long) result;
+	vma->vm_end = vma->vm_start + len;
+
+#ifdef WARN_ON_SLACK
+	if (len + WARN_ON_SLACK <= kobjsize(result))
+		printk("Allocation of %lu bytes from process %d has %lu bytes of slack\n",
+		       len, current->pid, kobjsize(result) - len);
 #endif
-	
+
 	if (file) {
-		int error;
 		mm_segment_t old_fs = get_fs();
+		loff_t fpos;
+
+		fpos = pgoff;
+		fpos <<= PAGE_SHIFT;
+
 		set_fs(KERNEL_DS);
-		error = file->f_op->read(file, (char *) result, len, &file->f_pos);
+		ret = file->f_op->read(file, (char *) result, len, &fpos);
 		set_fs(old_fs);
-		if (error < 0) {
-			kfree(result);
-			kfree(tblock->rblock);
-			kfree(tblock);
-			return error;
-		}
-		if (error < len)
-			memset(result+error, '\0', len-error);
+
+		if (ret < 0)
+			goto error2;
+		if (ret < len)
+			memset(result + ret, 0, len - ret);
 	} else {
-		memset(result, '\0', len);
+		memset(result, 0, len);
 	}
 
-	realalloc += kobjsize(tblock);
-	askedalloc += sizeof(struct mm_tblock_struct);
+	if (prot & PROT_EXEC)
+		flush_icache_range((unsigned long) result, (unsigned long) result + len);
 
-	realalloc += kobjsize(tblock->rblock);
-	askedalloc += sizeof(struct mm_rblock_struct);
+ done:
+	if (!(vma->vm_flags & VM_SHARED)) {
+		realalloc += kobjsize(result);
+		askedalloc += len;
+	}
+
+	realalloc += kobjsize(vma);
+	askedalloc += sizeof(*vma);
 
-	tblock->next = current->mm->context.tblock.next;
-	current->mm->context.tblock.next = tblock;
 	current->mm->total_vm += len >> PAGE_SHIFT;
 
+	add_nommu_vma(vma);
+ shared:
+	realalloc += kobjsize(vml);
+	askedalloc += sizeof(*vml);
+
+	vml->next = current->mm->context.vmlist;
+	current->mm->context.vmlist = vml;
+
+	up_write(&nommu_vma_sem);
+
 #ifdef DEBUG
 	printk("do_mmap:\n");
 	show_process_blocks();
-#endif	  
+#endif
+
+	return (unsigned long) result;
+
+ error2:
+	kfree(result);
+ error:
+	up_write(&nommu_vma_sem);
+	kfree(vml);
+	if (vma) {
+		fput(vma->vm_file);
+		kfree(vma);
+	}
+	return ret;
+
+ sharing_violation:
+	up_write(&nommu_vma_sem);
+	printk("Attempt to share mismatched mappings\n");
+	kfree(vml);
+	return -EINVAL;
+
+ error_getting_vma:
+	up_write(&nommu_vma_sem);
+	kfree(vml);
+	printk("Allocation of vml for %lu byte allocation from process %d failed\n",
+	       len, current->pid);
+	show_free_areas();
+	return -ENOMEM;
+
+ error_getting_vml:
+	printk("Allocation of vml for %lu byte allocation from process %d failed\n",
+	       len, current->pid);
+	show_free_areas();
+	return -ENOMEM;
+}
 
-	return (unsigned long)result;
+/*
+ * handle mapping disposal for uClinux
+ */
+static void put_vma(struct vm_area_struct *vma)
+{
+	if (vma) {
+		down_write(&nommu_vma_sem);
+
+		if (atomic_dec_and_test(&vma->vm_usage)) {
+			delete_nommu_vma(vma);
+
+			if (vma->vm_ops && vma->vm_ops->close)
+				vma->vm_ops->close(vma);
+
+			/* IO memory and memory shared directly out of the pagecache from
+			 * ramfs/tmpfs mustn't be released here */
+			if (!(vma->vm_flags & (VM_IO | VM_SHARED)) && vma->vm_start) {
+				realalloc -= kobjsize((void *) vma->vm_start);
+				askedalloc -= vma->vm_end - vma->vm_start;
+				kfree((void *) vma->vm_start);
+			}
+
+			realalloc -= kobjsize(vma);
+			askedalloc -= sizeof(*vma);
+
+			if (vma->vm_file)
+				fput(vma->vm_file);
+			kfree(vma);
+		}
+
+		up_write(&nommu_vma_sem);
+	}
 }
 
-int do_munmap(struct mm_struct * mm, unsigned long addr, size_t len)
+int do_munmap(struct mm_struct *mm, unsigned long addr, size_t len)
 {
-	struct mm_tblock_struct * tblock, *tmp;
+	struct vm_list_struct *vml, **parent;
+	unsigned long end = addr + len;
 
 #ifdef MAGIC_ROM_PTR
-	/*
-	 * For efficiency's sake, if the pointer is obviously in ROM,
-	 * don't bother walking the lists to free it.
-	 */
+	/* For efficiency's sake, if the pointer is obviously in ROM,
+	   don't bother walking the lists to free it */
 	if (is_in_rom(addr))
 		return 0;
 #endif
@@ -467,38 +787,29 @@
 	printk("do_munmap:\n");
 #endif
 
-	tmp = &mm->context.tblock; /* dummy head */
-	while ((tblock=tmp->next) && tblock->rblock &&
-			tblock->rblock->kblock != (void*)addr) 
-		tmp = tblock;
-		
-	if (!tblock) {
-		printk("munmap of non-mmaped memory by process %d (%s): %p\n",
-				current->pid, current->comm, (void*)addr);
-		return -EINVAL;
-	}
-	if (tblock->rblock) {
-		if (!--tblock->rblock->refcount) {
-			if (tblock->rblock->kblock) {
-				realalloc -= kobjsize(tblock->rblock->kblock);
-				askedalloc -= tblock->rblock->size;
-				kfree(tblock->rblock->kblock);
-			}
-			
-			realalloc -= kobjsize(tblock->rblock);
-			askedalloc -= sizeof(struct mm_rblock_struct);
-			kfree(tblock->rblock);
-		}
-	}
-	tmp->next = tblock->next;
-	realalloc -= kobjsize(tblock);
-	askedalloc -= sizeof(struct mm_tblock_struct);
-	kfree(tblock);
+	for (parent = &mm->context.vmlist; *parent; parent = &(*parent)->next)
+		if ((*parent)->vma->vm_start == addr &&
+		    (*parent)->vma->vm_end == end)
+			goto found;
+
+	printk("munmap of non-mmaped memory by process %d (%s): %p\n",
+	       current->pid, current->comm, (void *) addr);
+	return -EINVAL;
+
+ found:
+	vml = *parent;
+
+	put_vma(vml->vma);
+
+	*parent = vml->next;
+	realalloc -= kobjsize(vml);
+	askedalloc -= sizeof(*vml);
+	kfree(vml);
 	mm->total_vm -= len >> PAGE_SHIFT;
 
 #ifdef DEBUG
 	show_process_blocks();
-#endif	  
+#endif
 
 	return 0;
 }
@@ -506,39 +817,28 @@
 /* Release all mmaps. */
 void exit_mmap(struct mm_struct * mm)
 {
-	struct mm_tblock_struct *tmp;
-	mm->total_vm = 0;
-
-	if (!mm)
-		return;
+	struct vm_list_struct *tmp;
 
+	if (mm) {
 #ifdef DEBUG
-	printk("Exit_mmap:\n");
+		printk("Exit_mmap:\n");
 #endif
 
-	while((tmp = mm->context.tblock.next)) {
-		if (tmp->rblock) {
-			if (!--tmp->rblock->refcount) {
-				if (tmp->rblock->kblock) {
-					realalloc -= kobjsize(tmp->rblock->kblock);
-					askedalloc -= tmp->rblock->size;
-					kfree(tmp->rblock->kblock);
-				}
-				realalloc -= kobjsize(tmp->rblock);
-				askedalloc -= sizeof(struct mm_rblock_struct);
-				kfree(tmp->rblock);
-			}
-			tmp->rblock = 0;
+		mm->total_vm = 0;
+
+		while ((tmp = mm->context.vmlist)) {
+			mm->context.vmlist = tmp->next;
+			put_vma(tmp->vma);
+
+			realalloc -= kobjsize(tmp);
+			askedalloc -= sizeof(*tmp);
+			kfree(tmp);
 		}
-		mm->context.tblock.next = tmp->next;
-		realalloc -= kobjsize(tmp);
-		askedalloc -= sizeof(struct mm_tblock_struct);
-		kfree(tmp);
-	}
 
 #ifdef DEBUG
-	show_process_blocks();
-#endif	  
+		show_process_blocks();
+#endif
+	}
 }
 
 asmlinkage long sys_munmap(unsigned long addr, size_t len)
@@ -557,11 +857,70 @@
 	return -ENOMEM;
 }
 
-struct vm_area_struct * find_vma(struct mm_struct * mm, unsigned long addr)
+/*
+ * Expand (or shrink) an existing mapping, potentially moving it at the
+ * same time (controlled by the MREMAP_MAYMOVE flag and available VM space)
+ *
+ * MREMAP_FIXED option added 5-Dec-1999 by Benjamin LaHaise
+ * This option implies MREMAP_MAYMOVE.
+ *
+ * on uClinux, we only permit changing a mapping's size, and only as long as it stays within the
+ * hole allocated by the kmalloc() call in do_mmap_pgoff() and the block is not shareable
+ */
+unsigned long do_mremap(unsigned long addr,
+			unsigned long old_len, unsigned long new_len,
+			unsigned long flags, unsigned long new_addr)
+{
+	struct vm_list_struct *vml = NULL;
+
+	/* insanity checks first */
+	if (new_len == 0)
+		return (unsigned long) -EINVAL;
+
+	if (flags & MREMAP_FIXED && new_addr != addr)
+		return (unsigned long) -EINVAL;
+
+	for (vml = current->mm->context.vmlist; vml; vml = vml->next)
+		if (vml->vma->vm_start == addr)
+			goto found;
+
+	return (unsigned long) -EINVAL;
+
+ found:
+	if (vml->vma->vm_end != vml->vma->vm_start + old_len)
+		return (unsigned long) -EFAULT;
+
+	if (vml->vma->vm_flags & VM_MAYSHARE)
+		return (unsigned long) -EPERM;
+
+	if (new_len > kobjsize((void *) addr))
+		return (unsigned long) -ENOMEM;
+
+	/* all checks complete - do it */
+	vml->vma->vm_end = vml->vma->vm_start + new_len;
+
+	askedalloc -= old_len;
+	askedalloc += new_len;
+
+	return vml->vma->vm_start;
+}
+
+/*
+ * Look up the first VMA which satisfies  addr < vm_end,  NULL if none
+ */
+struct vm_area_struct *find_vma(struct mm_struct *mm, unsigned long addr)
 {
+	struct vm_list_struct *vml;
+
+	for (vml = mm->context.vmlist; vml; vml = vml->next)
+		if (addr >= vml->vma->vm_start && addr < vml->vma->vm_end)
+			return vml->vma;
+
 	return NULL;
 }
 
+EXPORT_SYMBOL(find_vma);
+
 struct page * follow_page(struct mm_struct *mm, unsigned long addr, int write)
 {
 	return NULL;
@@ -578,12 +937,6 @@
 	return -EPERM;
 }
 
-unsigned long get_unmapped_area(struct file *file, unsigned long addr,
-	unsigned long len, unsigned long pgoff, unsigned long flags)
-{
-	return -ENOMEM;
-}
-
 void swap_unplug_io_fn(struct backing_dev_info *bdi, struct page *page)
 {
 }
@@ -598,3 +951,20 @@
 {
 }
 
+void update_mem_hiwater(void)
+{
+	struct task_struct *tsk = current;
+
+	if (likely(tsk->mm)) {
+		if (tsk->mm->hiwater_rss < tsk->mm->rss)
+			tsk->mm->hiwater_rss = tsk->mm->rss;
+		if (tsk->mm->hiwater_vm < tsk->mm->total_vm)
+			tsk->mm->hiwater_vm = tsk->mm->total_vm;
+	}
+}
+
+void unmap_mapping_range(struct address_space *mapping,
+			 loff_t const holebegin, loff_t const holelen,
+			 int even_cows)
+{
+}
diff -Nru a/mm/oom_kill.c b/mm/oom_kill.c
--- a/mm/oom_kill.c	2005-01-10 20:11:19 -08:00
+++ b/mm/oom_kill.c	2005-01-10 20:11:19 -08:00
@@ -233,7 +233,7 @@
 	 * oom_lock protects out_of_memory()'s static variables.
 	 * It's a global lock; this is not performance-critical.
 	 */
-	static spinlock_t oom_lock = SPIN_LOCK_UNLOCKED;
+	static DEFINE_SPINLOCK(oom_lock);
 	static unsigned long first, last, count, lastkill;
 	unsigned long now, since;
 
diff -Nru a/mm/page_alloc.c b/mm/page_alloc.c
--- a/mm/page_alloc.c	2005-01-10 20:11:16 -08:00
+++ b/mm/page_alloc.c	2005-01-10 20:11:16 -08:00
@@ -32,16 +32,18 @@
 #include <linux/sysctl.h>
 #include <linux/cpu.h>
 #include <linux/nodemask.h>
+#include <linux/vmalloc.h>
 
 #include <asm/tlbflush.h>
+#include "internal.h"
 
-nodemask_t node_online_map = NODE_MASK_NONE;
+/* MCD - HACK: Find somewhere to initialize this EARLY, or make this initializer cleaner */
+nodemask_t node_online_map = { { [0] = 1UL } };
 nodemask_t node_possible_map = NODE_MASK_ALL;
 struct pglist_data *pgdat_list;
 unsigned long totalram_pages;
 unsigned long totalhigh_pages;
 long nr_swap_pages;
-int numnodes = 1;
 int sysctl_lower_zone_protection = 0;
 
 EXPORT_SYMBOL(totalram_pages);
@@ -69,6 +71,10 @@
 		return 1;
 	if (page_to_pfn(page) < zone->zone_start_pfn)
 		return 1;
+#ifdef CONFIG_HOLES_IN_ZONE
+	if (!pfn_valid(page_to_pfn(page)))
+		return 1;
+#endif
 	if (zone != page_zone(page))
 		return 1;
 	return 0;
@@ -157,6 +163,45 @@
 #endif		/* CONFIG_HUGETLB_PAGE */
 
 /*
+ * function for dealing with page's order in buddy system.
+ * zone->lock is already acquired when we use these.
+ * So, we don't need atomic page->flags operations here.
+ */
+static inline unsigned long page_order(struct page *page) {
+	return page->private;
+}
+
+static inline void set_page_order(struct page *page, int order) {
+	page->private = order;
+	__SetPagePrivate(page);
+}
+
+static inline void rmv_page_order(struct page *page)
+{
+	__ClearPagePrivate(page);
+	page->private = 0;
+}
+
+/*
+ * This function checks whether a page is free && is the buddy
+ * we can do coalesce a page and its buddy if
+ * (a) the buddy is free &&
+ * (b) the buddy is on the buddy system &&
+ * (c) a page and its buddy have the same order.
+ * for recording page's order, we use page->private and PG_private.
+ *
+ */
+static inline int page_is_buddy(struct page *page, int order)
+{
+       if (PagePrivate(page)           &&
+           (page_order(page) == order) &&
+           !PageReserved(page)         &&
+            page_count(page) == 0)
+               return 1;
+       return 0;
+}
+
+/*
  * Freeing function for a buddy system allocator.
  *
  * The concept of a buddy system is to maintain direct-mapped table
@@ -168,9 +213,10 @@
  * at the bottom level available, and propagating the changes upward
  * as necessary, plus some accounting needed to play nicely with other
  * parts of the VM system.
- * At each level, we keep one bit for each pair of blocks, which
- * is set to 1 iff only one of the pair is allocated.  So when we
- * are allocating or freeing one, we can derive the state of the
+ * At each level, we keep a list of pages, which are heads of continuous
+ * free pages of length of (1 << order) and marked with PG_Private.Page's
+ * order is recorded in page->private field.
+ * So when we are allocating or freeing one, we can derive the state of the
  * other.  That is, if we allocate a small block, and both were   
  * free, the remainder of the region must be split into blocks.   
  * If a block is freed, and its buddy is also free, then this
@@ -180,42 +226,44 @@
  */
 
 static inline void __free_pages_bulk (struct page *page, struct page *base,
-		struct zone *zone, struct free_area *area, unsigned int order)
+		struct zone *zone, unsigned int order)
 {
-	unsigned long page_idx, index, mask;
+	unsigned long page_idx;
+	struct page *coalesced;
+	int order_size = 1 << order;
 
-	if (order)
+	if (unlikely(order))
 		destroy_compound_page(page, order);
-	mask = (~0UL) << order;
+
 	page_idx = page - base;
-	if (page_idx & ~mask)
-		BUG();
-	index = page_idx >> (1 + order);
 
-	zone->free_pages += 1 << order;
-	while (order < MAX_ORDER-1) {
-		struct page *buddy1, *buddy2;
+	BUG_ON(page_idx & (order_size - 1));
+	BUG_ON(bad_range(zone, page));
 
-		BUG_ON(area >= zone->free_area + MAX_ORDER);
-		if (!__test_and_change_bit(index, area->map))
-			/*
-			 * the buddy page is still allocated.
-			 */
+	zone->free_pages += order_size;
+	while (order < MAX_ORDER-1) {
+		struct free_area *area;
+		struct page *buddy;
+		int buddy_idx;
+
+		buddy_idx = (page_idx ^ (1 << order));
+		buddy = base + buddy_idx;
+		if (bad_range(zone, buddy))
+			break;
+		if (!page_is_buddy(buddy, order))
 			break;
-
 		/* Move the buddy up one level. */
-		buddy1 = base + (page_idx ^ (1 << order));
-		buddy2 = base + page_idx;
-		BUG_ON(bad_range(zone, buddy1));
-		BUG_ON(bad_range(zone, buddy2));
-		list_del(&buddy1->lru);
-		mask <<= 1;
+		list_del(&buddy->lru);
+		area = zone->free_area + order;
+		area->nr_free--;
+		rmv_page_order(buddy);
+		page_idx &= buddy_idx;
 		order++;
-		area++;
-		index >>= 1;
-		page_idx &= mask;
 	}
-	list_add(&(base + page_idx)->lru, &area->free_list);
+	coalesced = base + page_idx;
+	set_page_order(coalesced, order);
+	list_add(&coalesced->lru, &zone->free_area[order].free_list);
+	zone->free_area[order].nr_free++;
 }
 
 static inline void free_pages_check(const char *function, struct page *page)
@@ -253,12 +301,10 @@
 		struct list_head *list, unsigned int order)
 {
 	unsigned long flags;
-	struct free_area *area;
 	struct page *base, *page = NULL;
 	int ret = 0;
 
 	base = zone->zone_mem_map;
-	area = zone->free_area + order;
 	spin_lock_irqsave(&zone->lock, flags);
 	zone->all_unreclaimable = 0;
 	zone->pages_scanned = 0;
@@ -266,7 +312,7 @@
 		page = list_entry(list->prev, struct page, lru);
 		/* have to delete it as __free_pages_bulk list manipulates */
 		list_del(&page->lru);
-		__free_pages_bulk(page, base, zone, area, order);
+		__free_pages_bulk(page, base, zone, order);
 		ret++;
 	}
 	spin_unlock_irqrestore(&zone->lock, flags);
@@ -281,6 +327,13 @@
 	arch_free_page(page, order);
 
 	mod_page_state(pgfree, 1 << order);
+
+#ifndef CONFIG_MMU
+	if (order > 0)
+		for (i = 1 ; i < (1 << order) ; ++i)
+			__put_page(page + i);
+#endif
+
 	for (i = 0 ; i < (1 << order) ; ++i)
 		free_pages_check(__FUNCTION__, page + i);
 	list_add(&page->lru, &list);
@@ -288,8 +341,6 @@
 	free_pages_bulk(page_zone(page), 1, &list, order);
 }
 
-#define MARK_USED(index, order, area) \
-	__change_bit((index) >> (1+(order)), (area)->map)
 
 /*
  * The order of subdivision here is critical for the IO subsystem.
@@ -307,7 +358,7 @@
  */
 static inline struct page *
 expand(struct zone *zone, struct page *page,
-	 unsigned long index, int low, int high, struct free_area *area)
+ 	int low, int high, struct free_area *area)
 {
 	unsigned long size = 1 << high;
 
@@ -317,12 +368,13 @@
 		size >>= 1;
 		BUG_ON(bad_range(zone, &page[size]));
 		list_add(&page[size].lru, &area->free_list);
-		MARK_USED(index + size, high, area);
+		area->nr_free++;
+		set_page_order(&page[size], high);
 	}
 	return page;
 }
 
-static inline void set_page_refs(struct page *page, int order)
+void set_page_refs(struct page *page, int order)
 {
 #ifdef CONFIG_MMU
 	set_page_count(page, 1);
@@ -332,9 +384,10 @@
 	/*
 	 * We need to reference all the pages for this order, otherwise if
 	 * anyone accesses one of the pages with (get/put) it will be freed.
+	 * - eg: access_process_vm()
 	 */
 	for (i = 0; i < (1 << order); i++)
-		set_page_count(page+i, 1);
+		set_page_count(page + i, 1);
 #endif /* CONFIG_MMU */
 }
 
@@ -360,6 +413,7 @@
 			1 << PG_checked | 1 << PG_mappedtodisk);
 	page->private = 0;
 	set_page_refs(page, order);
+	kernel_map_pages(page, 1 << order, 1);
 }
 
 /* 
@@ -371,7 +425,6 @@
 	struct free_area * area;
 	unsigned int current_order;
 	struct page *page;
-	unsigned int index;
 
 	for (current_order = order; current_order < MAX_ORDER; ++current_order) {
 		area = zone->free_area + current_order;
@@ -380,11 +433,10 @@
 
 		page = list_entry(area->free_list.next, struct page, lru);
 		list_del(&page->lru);
-		index = page - zone->zone_mem_map;
-		if (current_order != MAX_ORDER-1)
-			MARK_USED(index, current_order, area);
+		rmv_page_order(page);
+		area->nr_free--;
 		zone->free_pages -= 1UL << order;
-		return expand(zone, page, index, order, current_order, area);
+		return expand(zone, page, order, current_order, area);
 	}
 
 	return NULL;
@@ -437,26 +489,30 @@
 #endif /* CONFIG_PM || CONFIG_HOTPLUG_CPU */
 
 #ifdef CONFIG_PM
-int is_head_of_free_region(struct page *page)
+
+void mark_free_pages(struct zone *zone)
 {
-        struct zone *zone = page_zone(page);
-        unsigned long flags;
+	unsigned long zone_pfn, flags;
 	int order;
 	struct list_head *curr;
 
-	/*
-	 * Should not matter as we need quiescent system for
-	 * suspend anyway, but...
-	 */
+	if (!zone->spanned_pages)
+		return;
+
 	spin_lock_irqsave(&zone->lock, flags);
+	for (zone_pfn = 0; zone_pfn < zone->spanned_pages; ++zone_pfn)
+		ClearPageNosaveFree(pfn_to_page(zone_pfn + zone->zone_start_pfn));
+
 	for (order = MAX_ORDER - 1; order >= 0; --order)
-		list_for_each(curr, &zone->free_area[order].free_list)
-			if (page == list_entry(curr, struct page, lru)) {
-				spin_unlock_irqrestore(&zone->lock, flags);
-				return 1 << order;
-			}
+		list_for_each(curr, &zone->free_area[order].free_list) {
+			unsigned long start_pfn, i;
+
+			start_pfn = page_to_pfn(list_entry(curr, struct page, lru));
+
+			for (i=0; i < (1<<order); i++)
+				SetPageNosaveFree(pfn_to_page(start_pfn+i));
+	}
 	spin_unlock_irqrestore(&zone->lock, flags);
-        return 0;
 }
 
 /*
@@ -535,12 +591,20 @@
 	free_hot_cold_page(page, 1);
 }
 
+static inline void prep_zero_page(struct page *page, int order, int gfp_flags)
+{
+	int i;
+
+	BUG_ON((gfp_flags & (__GFP_WAIT | __GFP_HIGHMEM)) == __GFP_HIGHMEM);
+	for(i = 0; i < (1 << order); i++)
+		clear_highpage(page + i);
+}
+
 /*
  * Really, prep_compound_page() should be called from __rmqueue_bulk().  But
  * we cheat by calling it from here, in the order > 0 path.  Saves a branch
  * or two.
  */
-
 static struct page *
 buffered_rmqueue(struct zone *zone, int order, int gfp_flags)
 {
@@ -575,6 +639,10 @@
 		BUG_ON(bad_range(zone, page));
 		mod_page_state_zone(zone, pgalloc, 1 << order);
 		prep_new_page(page, order);
+
+		if (gfp_flags & __GFP_ZERO)
+			prep_zero_page(page, order, gfp_flags);
+
 		if (order && (gfp_flags & __GFP_COMP))
 			prep_compound_page(page, order);
 	}
@@ -582,6 +650,37 @@
 }
 
 /*
+ * Return 1 if free pages are above 'mark'. This takes into account the order
+ * of the allocation.
+ */
+int zone_watermark_ok(struct zone *z, int order, unsigned long mark,
+		int alloc_type, int can_try_harder, int gfp_high)
+{
+	/* free_pages my go negative - that's OK */
+	long min = mark, free_pages = z->free_pages - (1 << order) + 1;
+	int o;
+
+	if (gfp_high)
+		min -= min / 2;
+	if (can_try_harder)
+		min -= min / 4;
+
+	if (free_pages <= min + z->protection[alloc_type])
+		return 0;
+	for (o = 0; o < order; o++) {
+		/* At the next order, this order's pages become unavailable */
+		free_pages -= z->free_area[o].nr_free << o;
+
+		/* Require fewer higher order pages to be free */
+		min >>= 1;
+
+		if (free_pages <= min)
+			return 0;
+	}
+	return 1;
+}
+
+/*
  * This is the 'heart' of the zoned buddy allocator.
  *
  * Herein lies the mysterious "incremental min".  That's the
@@ -602,7 +701,6 @@
 		struct zonelist *zonelist)
 {
 	const int wait = gfp_mask & __GFP_WAIT;
-	unsigned long min;
 	struct zone **zones, *z;
 	struct page *page;
 	struct reclaim_state reclaim_state;
@@ -632,9 +730,9 @@
 
 	/* Go through the zonelist once, looking for a zone with enough free */
 	for (i = 0; (z = zones[i]) != NULL; i++) {
-		min = z->pages_low + (1<<order) + z->protection[alloc_type];
 
-		if (z->free_pages < min)
+		if (!zone_watermark_ok(z, order, z->pages_low,
+				alloc_type, 0, 0))
 			continue;
 
 		page = buffered_rmqueue(z, order, gfp_mask);
@@ -643,21 +741,16 @@
 	}
 
 	for (i = 0; (z = zones[i]) != NULL; i++)
-		wakeup_kswapd(z);
+		wakeup_kswapd(z, order);
 
 	/*
 	 * Go through the zonelist again. Let __GFP_HIGH and allocations
 	 * coming from realtime tasks to go deeper into reserves
 	 */
 	for (i = 0; (z = zones[i]) != NULL; i++) {
-		min = z->pages_min;
-		if (gfp_mask & __GFP_HIGH)
-			min /= 2;
-		if (can_try_harder)
-			min -= min / 4;
-		min += (1<<order) + z->protection[alloc_type];
-
-		if (z->free_pages < min)
+		if (!zone_watermark_ok(z, order, z->pages_min,
+				alloc_type, can_try_harder,
+				gfp_mask & __GFP_HIGH))
 			continue;
 
 		page = buffered_rmqueue(z, order, gfp_mask);
@@ -693,14 +786,9 @@
 
 	/* go through the zonelist yet one more time */
 	for (i = 0; (z = zones[i]) != NULL; i++) {
-		min = z->pages_min;
-		if (gfp_mask & __GFP_HIGH)
-			min /= 2;
-		if (can_try_harder)
-			min -= min / 4;
-		min += (1<<order) + z->protection[alloc_type];
-
-		if (z->free_pages < min)
+		if (!zone_watermark_ok(z, order, z->pages_min,
+				alloc_type, can_try_harder,
+				gfp_mask & __GFP_HIGH))
 			continue;
 
 		page = buffered_rmqueue(z, order, gfp_mask);
@@ -737,7 +825,6 @@
 	return NULL;
 got_pg:
 	zone_statistics(zonelist, z);
-	kernel_map_pages(page, 1 << order, 1);
 	return page;
 }
 
@@ -767,12 +854,9 @@
 	 */
 	BUG_ON(gfp_mask & __GFP_HIGHMEM);
 
-	page = alloc_pages(gfp_mask, 0);
-	if (page) {
-		void *address = page_address(page);
-		clear_page(address);
-		return (unsigned long) address;
-	}
+	page = alloc_pages(gfp_mask | __GFP_ZERO, 0);
+	if (page)
+		return (unsigned long) page_address(page);
 	return 0;
 }
 
@@ -914,18 +998,18 @@
 	int cpu = 0;
 
 	memset(ret, 0, sizeof(*ret));
+
+	cpu = first_cpu(cpu_online_map);
 	while (cpu < NR_CPUS) {
 		unsigned long *in, *out, off;
 
-		if (!cpu_possible(cpu)) {
-			cpu++;
-			continue;
-		}
-
 		in = (unsigned long *)&per_cpu(page_states, cpu);
-		cpu++;
-		if (cpu < NR_CPUS && cpu_possible(cpu))
+
+		cpu = next_cpu(cpu, cpu_online_map);
+
+		if (cpu < NR_CPUS)
 			prefetch(&per_cpu(page_states, cpu));
+
 		out = (unsigned long *)ret;
 		for (off = 0; off < nr; off++)
 			*out++ += *in++;
@@ -952,12 +1036,9 @@
 	unsigned long ret = 0;
 	int cpu;
 
-	for (cpu = 0; cpu < NR_CPUS; cpu++) {
+	for_each_online_cpu(cpu) {
 		unsigned long in;
 
-		if (!cpu_possible(cpu))
-			continue;
-
 		in = (unsigned long)&per_cpu(page_states, cpu) + offset;
 		ret += *((unsigned long *)in);
 	}
@@ -1124,7 +1205,6 @@
 	}
 
 	for_each_zone(zone) {
-		struct list_head *elem;
  		unsigned long nr, flags, order, total = 0;
 
 		show_node(zone);
@@ -1136,9 +1216,7 @@
 
 		spin_lock_irqsave(&zone->lock, flags);
 		for (order = 0; order < MAX_ORDER; order++) {
-			nr = 0;
-			list_for_each(elem, &zone->free_area[order].free_list)
-				++nr;
+			nr = zone->free_area[order].nr_free;
 			total += nr << order;
 			printk("%lu*%lukB ", nr, K(1UL) << order);
 		}
@@ -1180,13 +1258,13 @@
 }
 
 #ifdef CONFIG_NUMA
-#define MAX_NODE_LOAD (numnodes)
+#define MAX_NODE_LOAD (num_online_nodes())
 static int __initdata node_load[MAX_NUMNODES];
 /**
  * find_next_best_node - find the next node that should appear in a given
  *    node's fallback list
  * @node: node whose fallback list we're appending
- * @used_node_mask: pointer to the bitmap of already used nodes
+ * @used_node_mask: nodemask_t of already used nodes
  *
  * We use a number of factors to determine which is the next node that should
  * appear on a given node's fallback list.  The node should not have appeared
@@ -1197,24 +1275,24 @@
  * on them otherwise.
  * It returns -1 if no node is found.
  */
-static int __init find_next_best_node(int node, void *used_node_mask)
+static int __init find_next_best_node(int node, nodemask_t *used_node_mask)
 {
 	int i, n, val;
 	int min_val = INT_MAX;
 	int best_node = -1;
 
-	for (i = 0; i < numnodes; i++) {
+	for_each_online_node(i) {
 		cpumask_t tmp;
 
 		/* Start from local node */
-		n = (node+i)%numnodes;
+		n = (node+i) % num_online_nodes();
 
 		/* Don't want a node to appear more than once */
-		if (test_bit(n, used_node_mask))
+		if (node_isset(n, *used_node_mask))
 			continue;
 
 		/* Use the local node if we haven't already */
-		if (!test_bit(node, used_node_mask)) {
+		if (!node_isset(node, *used_node_mask)) {
 			best_node = node;
 			break;
 		}
@@ -1238,7 +1316,7 @@
 	}
 
 	if (best_node >= 0)
-		set_bit(best_node, used_node_mask);
+		node_set(best_node, *used_node_mask);
 
 	return best_node;
 }
@@ -1248,7 +1326,7 @@
 	int i, j, k, node, local_node;
 	int prev_node, load;
 	struct zonelist *zonelist;
-	DECLARE_BITMAP(used_mask, MAX_NUMNODES);
+	nodemask_t used_mask;
 
 	/* initialize zonelists */
 	for (i = 0; i < GFP_ZONETYPES; i++) {
@@ -1259,10 +1337,10 @@
 
 	/* NUMA-aware ordering of nodes */
 	local_node = pgdat->node_id;
-	load = numnodes;
+	load = num_online_nodes();
 	prev_node = local_node;
-	bitmap_zero(used_mask, MAX_NUMNODES);
-	while ((node = find_next_best_node(local_node, used_mask)) >= 0) {
+	nodes_clear(used_mask);
+	while ((node = find_next_best_node(local_node, &used_mask)) >= 0) {
 		/*
 		 * We don't want to pressure a particular node.
 		 * So adding penalty to the first node in same
@@ -1318,11 +1396,17 @@
  		 * zones coming right after the local ones are those from
  		 * node N+1 (modulo N)
  		 */
- 		for (node = local_node + 1; node < numnodes; node++)
- 			j = build_zonelists_node(NODE_DATA(node), zonelist, j, k);
- 		for (node = 0; node < local_node; node++)
- 			j = build_zonelists_node(NODE_DATA(node), zonelist, j, k);
- 
+		for (node = local_node + 1; node < MAX_NUMNODES; node++) {
+			if (!node_online(node))
+				continue;
+			j = build_zonelists_node(NODE_DATA(node), zonelist, j, k);
+		}
+		for (node = 0; node < local_node; node++) {
+			if (!node_online(node))
+				continue;
+			j = build_zonelists_node(NODE_DATA(node), zonelist, j, k);
+		}
+
 		zonelist->zones[j] = NULL;
 	}
 }
@@ -1333,9 +1417,9 @@
 {
 	int i;
 
-	for(i = 0 ; i < numnodes ; i++)
+	for_each_online_node(i)
 		build_zonelists(NODE_DATA(i));
-	printk("Built %i zonelists\n", numnodes);
+	printk("Built %i zonelists\n", num_online_nodes());
 }
 
 /*
@@ -1427,49 +1511,13 @@
 	}
 }
 
-/*
- * Page buddy system uses "index >> (i+1)", where "index" is
- * at most "size-1".
- *
- * The extra "+3" is to round down to byte size (8 bits per byte
- * assumption). Thus we get "(size-1) >> (i+4)" as the last byte
- * we can access.
- *
- * The "+1" is because we want to round the byte allocation up
- * rather than down. So we should have had a "+7" before we shifted
- * down by three. Also, we have to add one as we actually _use_ the
- * last bit (it's [0,n] inclusive, not [0,n[).
- *
- * So we actually had +7+1 before we shift down by 3. But
- * (n+8) >> 3 == (n >> 3) + 1 (modulo overflows, which we do not have).
- *
- * Finally, we LONG_ALIGN because all bitmap operations are on longs.
- */
-unsigned long pages_to_bitmap_size(unsigned long order, unsigned long nr_pages)
-{
-	unsigned long bitmap_size;
-
-	bitmap_size = (nr_pages-1) >> (order+4);
-	bitmap_size = LONG_ALIGN(bitmap_size+1);
-
-	return bitmap_size;
-}
-
-void zone_init_free_lists(struct pglist_data *pgdat, struct zone *zone, unsigned long size)
+void zone_init_free_lists(struct pglist_data *pgdat, struct zone *zone,
+				unsigned long size)
 {
 	int order;
-	for (order = 0; ; order++) {
-		unsigned long bitmap_size;
-
+	for (order = 0; order < MAX_ORDER ; order++) {
 		INIT_LIST_HEAD(&zone->free_area[order].free_list);
-		if (order == MAX_ORDER-1) {
-			zone->free_area[order].map = NULL;
-			break;
-		}
-
-		bitmap_size = pages_to_bitmap_size(order, size);
-		zone->free_area[order].map =
-		  (unsigned long *) alloc_bootmem_node(pgdat, bitmap_size);
+		zone->free_area[order].nr_free = 0;
 	}
 }
 
@@ -1494,6 +1542,7 @@
 
 	pgdat->nr_zones = 0;
 	init_waitqueue_head(&pgdat->kswapd_wait);
+	pgdat->kswapd_max_order = 0;
 	
 	for (j = 0; j < MAX_NR_ZONES; j++) {
 		struct zone *zone = pgdat->node_zones + j;
@@ -1657,8 +1706,7 @@
 }
 
 /* 
- * This walks the freelist for each zone. Whilst this is slow, I'd rather 
- * be slow here than slow down the fast path by keeping stats - mjbligh
+ * This walks the free areas for each zone.
  */
 static int frag_show(struct seq_file *m, void *arg)
 {
@@ -1674,14 +1722,8 @@
 
 		spin_lock_irqsave(&zone->lock, flags);
 		seq_printf(m, "Node %d, zone %8s ", pgdat->node_id, zone->name);
-		for (order = 0; order < MAX_ORDER; ++order) {
-			unsigned long nr_bufs = 0;
-			struct list_head *elem;
-
-			list_for_each(elem, &(zone->free_area[order].free_list))
-				++nr_bufs;
-			seq_printf(m, "%6lu ", nr_bufs);
-		}
+		for (order = 0; order < MAX_ORDER; ++order)
+			seq_printf(m, "%6lu ", zone->free_area[order].nr_free);
 		spin_unlock_irqrestore(&zone->lock, flags);
 		seq_putc(m, '\n');
 	}
@@ -1797,14 +1839,28 @@
 {
 	int cpu = (unsigned long)hcpu;
 	long *count;
+	unsigned long *src, *dest;
 
 	if (action == CPU_DEAD) {
+		int i;
+
 		/* Drain local pagecache count. */
 		count = &per_cpu(nr_pagecache_local, cpu);
 		atomic_add(*count, &nr_pagecache);
 		*count = 0;
 		local_irq_disable();
 		__drain_pages(cpu);
+
+		/* Add dead cpu's page_states to our own. */
+		dest = (unsigned long *)&__get_cpu_var(page_states);
+		src = (unsigned long *)&per_cpu(page_states, cpu);
+
+		for (i = 0; i < sizeof(struct page_state)/sizeof(unsigned long);
+				i++) {
+			dest[i] += src[i];
+			src[i] = 0;
+		}
+
 		local_irq_enable();
 	}
 	return NOTIFY_OK;
@@ -2023,27 +2079,42 @@
 	return 0;
 }
 
+__initdata int hashdist = HASHDIST_DEFAULT;
+
+#ifdef CONFIG_NUMA
+static int __init set_hashdist(char *str)
+{
+	if (!str)
+		return 0;
+	hashdist = simple_strtoul(str, &str, 0);
+	return 1;
+}
+__setup("hashdist=", set_hashdist);
+#endif
+
 /*
  * allocate a large system hash table from bootmem
  * - it is assumed that the hash table must contain an exact power-of-2
  *   quantity of entries
+ * - limit is the number of hash buckets, not the total allocation size
  */
 void *__init alloc_large_system_hash(const char *tablename,
 				     unsigned long bucketsize,
 				     unsigned long numentries,
 				     int scale,
-				     int consider_highmem,
+				     int flags,
 				     unsigned int *_hash_shift,
-				     unsigned int *_hash_mask)
+				     unsigned int *_hash_mask,
+				     unsigned long limit)
 {
-	unsigned long long max;
+	unsigned long long max = limit;
 	unsigned long log2qty, size;
-	void *table;
+	void *table = NULL;
 
 	/* allow the kernel cmdline to have a say */
 	if (!numentries) {
 		/* round applicable memory size up to nearest megabyte */
-		numentries = consider_highmem ? nr_all_pages : nr_kernel_pages;
+		numentries = (flags & HASH_HIGHMEM) ? nr_all_pages : nr_kernel_pages;
 		numentries += (1UL << (20 - PAGE_SHIFT)) - 1;
 		numentries >>= 20 - PAGE_SHIFT;
 		numentries <<= 20 - PAGE_SHIFT;
@@ -2057,9 +2128,11 @@
 	/* rounded up to nearest power of 2 in size */
 	numentries = 1UL << (long_log2(numentries) + 1);
 
-	/* limit allocation size to 1/16 total memory */
-	max = ((unsigned long long)nr_all_pages << PAGE_SHIFT) >> 4;
-	do_div(max, bucketsize);
+	/* limit allocation size to 1/16 total memory by default */
+	if (max == 0) {
+		max = ((unsigned long long)nr_all_pages << PAGE_SHIFT) >> 4;
+		do_div(max, bucketsize);
+	}
 
 	if (numentries > max)
 		numentries = max;
@@ -2068,7 +2141,16 @@
 
 	do {
 		size = bucketsize << log2qty;
-		table = alloc_bootmem(size);
+		if (flags & HASH_EARLY)
+			table = alloc_bootmem(size);
+		else if (hashdist)
+			table = __vmalloc(size, GFP_ATOMIC, PAGE_KERNEL);
+		else {
+			unsigned long order;
+			for (order = 0; ((1UL << order) << PAGE_SHIFT) < size; order++)
+				;
+			table = (void*) __get_free_pages(GFP_ATOMIC, order);
+		}
 	} while (!table && size > PAGE_SIZE && --log2qty);
 
 	if (!table)
diff -Nru a/mm/pdflush.c b/mm/pdflush.c
--- a/mm/pdflush.c	2005-01-10 20:11:23 -08:00
+++ b/mm/pdflush.c	2005-01-10 20:11:23 -08:00
@@ -45,7 +45,7 @@
  * All the pdflush threads.  Protected by pdflush_lock
  */
 static LIST_HEAD(pdflush_list);
-static spinlock_t pdflush_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(pdflush_lock);
 
 /*
  * The count of currently-running pdflush threads.  Protected
diff -Nru a/mm/prio_tree.c b/mm/prio_tree.c
--- a/mm/prio_tree.c	2005-01-10 20:11:22 -08:00
+++ b/mm/prio_tree.c	2005-01-10 20:11:22 -08:00
@@ -11,473 +11,24 @@
  * 02Feb2004	Initial version
  */
 
-#include <linux/init.h>
-#include <linux/module.h>
 #include <linux/mm.h>
 #include <linux/prio_tree.h>
 
 /*
- * A clever mix of heap and radix trees forms a radix priority search tree (PST)
- * which is useful for storing intervals, e.g, we can consider a vma as a closed
- * interval of file pages [offset_begin, offset_end], and store all vmas that
- * map a file in a PST. Then, using the PST, we can answer a stabbing query,
- * i.e., selecting a set of stored intervals (vmas) that overlap with (map) a
- * given input interval X (a set of consecutive file pages), in "O(log n + m)"
- * time where 'log n' is the height of the PST, and 'm' is the number of stored
- * intervals (vmas) that overlap (map) with the input interval X (the set of
- * consecutive file pages).
- *
- * In our implementation, we store closed intervals of the form [radix_index,
- * heap_index]. We assume that always radix_index <= heap_index. McCreight's PST
- * is designed for storing intervals with unique radix indices, i.e., each
- * interval have different radix_index. However, this limitation can be easily
- * overcome by using the size, i.e., heap_index - radix_index, as part of the
- * index, so we index the tree using [(radix_index,size), heap_index].
- *
- * When the above-mentioned indexing scheme is used, theoretically, in a 32 bit
- * machine, the maximum height of a PST can be 64. We can use a balanced version
- * of the priority search tree to optimize the tree height, but the balanced
- * tree proposed by McCreight is too complex and memory-hungry for our purpose.
+ * See lib/prio_tree.c for details on the general radix priority search tree
+ * code.
  */
 
 /*
- * The following macros are used for implementing prio_tree for i_mmap
+ * The following #defines are mirrored from lib/prio_tree.c. They're only used
+ * for debugging, and should be removed (along with the debugging code using
+ * them) when switching also VMAs to the regular prio_tree code.
  */
 
 #define RADIX_INDEX(vma)  ((vma)->vm_pgoff)
 #define VMA_SIZE(vma)	  (((vma)->vm_end - (vma)->vm_start) >> PAGE_SHIFT)
 /* avoid overflow */
-#define HEAP_INDEX(vma)	  ((vma)->vm_pgoff + (VMA_SIZE(vma) - 1))
-
-#define GET_INDEX_VMA(vma, radix, heap)		\
-do {						\
-	radix = RADIX_INDEX(vma);		\
-	heap = HEAP_INDEX(vma);			\
-} while (0)
-
-#define GET_INDEX(node, radix, heap)		\
-do { 						\
-	struct vm_area_struct *__tmp = 		\
-	  prio_tree_entry(node, struct vm_area_struct, shared.prio_tree_node);\
-	GET_INDEX_VMA(__tmp, radix, heap); 	\
-} while (0)
-
-static unsigned long index_bits_to_maxindex[BITS_PER_LONG];
-
-void __init prio_tree_init(void)
-{
-	unsigned int i;
-
-	for (i = 0; i < ARRAY_SIZE(index_bits_to_maxindex) - 1; i++)
-		index_bits_to_maxindex[i] = (1UL << (i + 1)) - 1;
-	index_bits_to_maxindex[ARRAY_SIZE(index_bits_to_maxindex) - 1] = ~0UL;
-}
-
-/*
- * Maximum heap_index that can be stored in a PST with index_bits bits
- */
-static inline unsigned long prio_tree_maxindex(unsigned int bits)
-{
-	return index_bits_to_maxindex[bits - 1];
-}
-
-static void prio_tree_remove(struct prio_tree_root *, struct prio_tree_node *);
-
-/*
- * Extend a priority search tree so that it can store a node with heap_index
- * max_heap_index. In the worst case, this algorithm takes O((log n)^2).
- * However, this function is used rarely and the common case performance is
- * not bad.
- */
-static struct prio_tree_node *prio_tree_expand(struct prio_tree_root *root,
-		struct prio_tree_node *node, unsigned long max_heap_index)
-{
-	struct prio_tree_node *first = NULL, *prev, *last = NULL;
-
-	if (max_heap_index > prio_tree_maxindex(root->index_bits))
-		root->index_bits++;
-
-	while (max_heap_index > prio_tree_maxindex(root->index_bits)) {
-		root->index_bits++;
-
-		if (prio_tree_empty(root))
-			continue;
-
-		if (first == NULL) {
-			first = root->prio_tree_node;
-			prio_tree_remove(root, root->prio_tree_node);
-			INIT_PRIO_TREE_NODE(first);
-			last = first;
-		} else {
-			prev = last;
-			last = root->prio_tree_node;
-			prio_tree_remove(root, root->prio_tree_node);
-			INIT_PRIO_TREE_NODE(last);
-			prev->left = last;
-			last->parent = prev;
-		}
-	}
-
-	INIT_PRIO_TREE_NODE(node);
-
-	if (first) {
-		node->left = first;
-		first->parent = node;
-	} else
-		last = node;
-
-	if (!prio_tree_empty(root)) {
-		last->left = root->prio_tree_node;
-		last->left->parent = last;
-	}
-
-	root->prio_tree_node = node;
-	return node;
-}
-
-/*
- * Replace a prio_tree_node with a new node and return the old node
- */
-static struct prio_tree_node *prio_tree_replace(struct prio_tree_root *root,
-		struct prio_tree_node *old, struct prio_tree_node *node)
-{
-	INIT_PRIO_TREE_NODE(node);
-
-	if (prio_tree_root(old)) {
-		BUG_ON(root->prio_tree_node != old);
-		/*
-		 * We can reduce root->index_bits here. However, it is complex
-		 * and does not help much to improve performance (IMO).
-		 */
-		node->parent = node;
-		root->prio_tree_node = node;
-	} else {
-		node->parent = old->parent;
-		if (old->parent->left == old)
-			old->parent->left = node;
-		else
-			old->parent->right = node;
-	}
-
-	if (!prio_tree_left_empty(old)) {
-		node->left = old->left;
-		old->left->parent = node;
-	}
-
-	if (!prio_tree_right_empty(old)) {
-		node->right = old->right;
-		old->right->parent = node;
-	}
-
-	return old;
-}
-
-/*
- * Insert a prio_tree_node @node into a radix priority search tree @root. The
- * algorithm typically takes O(log n) time where 'log n' is the number of bits
- * required to represent the maximum heap_index. In the worst case, the algo
- * can take O((log n)^2) - check prio_tree_expand.
- *
- * If a prior node with same radix_index and heap_index is already found in
- * the tree, then returns the address of the prior node. Otherwise, inserts
- * @node into the tree and returns @node.
- */
-static struct prio_tree_node *prio_tree_insert(struct prio_tree_root *root,
-		struct prio_tree_node *node)
-{
-	struct prio_tree_node *cur, *res = node;
-	unsigned long radix_index, heap_index;
-	unsigned long r_index, h_index, index, mask;
-	int size_flag = 0;
-
-	GET_INDEX(node, radix_index, heap_index);
-
-	if (prio_tree_empty(root) ||
-			heap_index > prio_tree_maxindex(root->index_bits))
-		return prio_tree_expand(root, node, heap_index);
-
-	cur = root->prio_tree_node;
-	mask = 1UL << (root->index_bits - 1);
-
-	while (mask) {
-		GET_INDEX(cur, r_index, h_index);
-
-		if (r_index == radix_index && h_index == heap_index)
-			return cur;
-
-                if (h_index < heap_index ||
-		    (h_index == heap_index && r_index > radix_index)) {
-			struct prio_tree_node *tmp = node;
-			node = prio_tree_replace(root, cur, node);
-			cur = tmp;
-			/* swap indices */
-			index = r_index;
-			r_index = radix_index;
-			radix_index = index;
-			index = h_index;
-			h_index = heap_index;
-			heap_index = index;
-		}
-
-		if (size_flag)
-			index = heap_index - radix_index;
-		else
-			index = radix_index;
-
-		if (index & mask) {
-			if (prio_tree_right_empty(cur)) {
-				INIT_PRIO_TREE_NODE(node);
-				cur->right = node;
-				node->parent = cur;
-				return res;
-			} else
-				cur = cur->right;
-		} else {
-			if (prio_tree_left_empty(cur)) {
-				INIT_PRIO_TREE_NODE(node);
-				cur->left = node;
-				node->parent = cur;
-				return res;
-			} else
-				cur = cur->left;
-		}
-
-		mask >>= 1;
-
-		if (!mask) {
-			mask = 1UL << (BITS_PER_LONG - 1);
-			size_flag = 1;
-		}
-	}
-	/* Should not reach here */
-	BUG();
-	return NULL;
-}
-
-/*
- * Remove a prio_tree_node @node from a radix priority search tree @root. The
- * algorithm takes O(log n) time where 'log n' is the number of bits required
- * to represent the maximum heap_index.
- */
-static void prio_tree_remove(struct prio_tree_root *root,
-		struct prio_tree_node *node)
-{
-	struct prio_tree_node *cur;
-	unsigned long r_index, h_index_right, h_index_left;
-
-	cur = node;
-
-	while (!prio_tree_left_empty(cur) || !prio_tree_right_empty(cur)) {
-		if (!prio_tree_left_empty(cur))
-			GET_INDEX(cur->left, r_index, h_index_left);
-		else {
-			cur = cur->right;
-			continue;
-		}
-
-		if (!prio_tree_right_empty(cur))
-			GET_INDEX(cur->right, r_index, h_index_right);
-		else {
-			cur = cur->left;
-			continue;
-		}
-
-		/* both h_index_left and h_index_right cannot be 0 */
-		if (h_index_left >= h_index_right)
-			cur = cur->left;
-		else
-			cur = cur->right;
-	}
-
-	if (prio_tree_root(cur)) {
-		BUG_ON(root->prio_tree_node != cur);
-		INIT_PRIO_TREE_ROOT(root);
-		return;
-	}
-
-	if (cur->parent->right == cur)
-		cur->parent->right = cur->parent;
-	else
-		cur->parent->left = cur->parent;
-
-	while (cur != node)
-		cur = prio_tree_replace(root, cur->parent, cur);
-}
-
-/*
- * Following functions help to enumerate all prio_tree_nodes in the tree that
- * overlap with the input interval X [radix_index, heap_index]. The enumeration
- * takes O(log n + m) time where 'log n' is the height of the tree (which is
- * proportional to # of bits required to represent the maximum heap_index) and
- * 'm' is the number of prio_tree_nodes that overlap the interval X.
- */
-
-static struct prio_tree_node *prio_tree_left(struct prio_tree_iter *iter,
-		unsigned long *r_index, unsigned long *h_index)
-{
-	if (prio_tree_left_empty(iter->cur))
-		return NULL;
-
-	GET_INDEX(iter->cur->left, *r_index, *h_index);
-
-	if (iter->r_index <= *h_index) {
-		iter->cur = iter->cur->left;
-		iter->mask >>= 1;
-		if (iter->mask) {
-			if (iter->size_level)
-				iter->size_level++;
-		} else {
-			if (iter->size_level) {
-				BUG_ON(!prio_tree_left_empty(iter->cur));
-				BUG_ON(!prio_tree_right_empty(iter->cur));
-				iter->size_level++;
-				iter->mask = ULONG_MAX;
-			} else {
-				iter->size_level = 1;
-				iter->mask = 1UL << (BITS_PER_LONG - 1);
-			}
-		}
-		return iter->cur;
-	}
-
-	return NULL;
-}
-
-static struct prio_tree_node *prio_tree_right(struct prio_tree_iter *iter,
-		unsigned long *r_index, unsigned long *h_index)
-{
-	unsigned long value;
-
-	if (prio_tree_right_empty(iter->cur))
-		return NULL;
-
-	if (iter->size_level)
-		value = iter->value;
-	else
-		value = iter->value | iter->mask;
-
-	if (iter->h_index < value)
-		return NULL;
-
-	GET_INDEX(iter->cur->right, *r_index, *h_index);
-
-	if (iter->r_index <= *h_index) {
-		iter->cur = iter->cur->right;
-		iter->mask >>= 1;
-		iter->value = value;
-		if (iter->mask) {
-			if (iter->size_level)
-				iter->size_level++;
-		} else {
-			if (iter->size_level) {
-				BUG_ON(!prio_tree_left_empty(iter->cur));
-				BUG_ON(!prio_tree_right_empty(iter->cur));
-				iter->size_level++;
-				iter->mask = ULONG_MAX;
-			} else {
-				iter->size_level = 1;
-				iter->mask = 1UL << (BITS_PER_LONG - 1);
-			}
-		}
-		return iter->cur;
-	}
-
-	return NULL;
-}
-
-static struct prio_tree_node *prio_tree_parent(struct prio_tree_iter *iter)
-{
-	iter->cur = iter->cur->parent;
-	if (iter->mask == ULONG_MAX)
-		iter->mask = 1UL;
-	else if (iter->size_level == 1)
-		iter->mask = 1UL;
-	else
-		iter->mask <<= 1;
-	if (iter->size_level)
-		iter->size_level--;
-	if (!iter->size_level && (iter->value & iter->mask))
-		iter->value ^= iter->mask;
-	return iter->cur;
-}
-
-static inline int overlap(struct prio_tree_iter *iter,
-		unsigned long r_index, unsigned long h_index)
-{
-	return iter->h_index >= r_index && iter->r_index <= h_index;
-}
-
-/*
- * prio_tree_first:
- *
- * Get the first prio_tree_node that overlaps with the interval [radix_index,
- * heap_index]. Note that always radix_index <= heap_index. We do a pre-order
- * traversal of the tree.
- */
-static struct prio_tree_node *prio_tree_first(struct prio_tree_iter *iter)
-{
-	struct prio_tree_root *root;
-	unsigned long r_index, h_index;
-
-	INIT_PRIO_TREE_ITER(iter);
-
-	root = iter->root;
-	if (prio_tree_empty(root))
-		return NULL;
-
-	GET_INDEX(root->prio_tree_node, r_index, h_index);
-
-	if (iter->r_index > h_index)
-		return NULL;
-
-	iter->mask = 1UL << (root->index_bits - 1);
-	iter->cur = root->prio_tree_node;
-
-	while (1) {
-		if (overlap(iter, r_index, h_index))
-			return iter->cur;
-
-		if (prio_tree_left(iter, &r_index, &h_index))
-			continue;
-
-		if (prio_tree_right(iter, &r_index, &h_index))
-			continue;
-
-		break;
-	}
-	return NULL;
-}
-
-/*
- * prio_tree_next:
- *
- * Get the next prio_tree_node that overlaps with the input interval in iter
- */
-static struct prio_tree_node *prio_tree_next(struct prio_tree_iter *iter)
-{
-	unsigned long r_index, h_index;
-
-repeat:
-	while (prio_tree_left(iter, &r_index, &h_index))
-		if (overlap(iter, r_index, h_index))
-			return iter->cur;
-
-	while (!prio_tree_right(iter, &r_index, &h_index)) {
-	    	while (!prio_tree_root(iter->cur) &&
-				iter->cur->parent->right == iter->cur)
-			prio_tree_parent(iter);
-
-		if (prio_tree_root(iter->cur))
-			return NULL;
-
-		prio_tree_parent(iter);
-	}
-
-	if (overlap(iter, r_index, h_index))
-		return iter->cur;
-
-	goto repeat;
-}
+#define HEAP_INDEX(vma)   ((vma)->vm_pgoff + (VMA_SIZE(vma) - 1))
 
 /*
  * Radix priority search tree for address_space->i_mmap
@@ -551,8 +102,8 @@
 
 	vma->shared.vm_set.head = NULL;
 
-	ptr = prio_tree_insert(root, &vma->shared.prio_tree_node);
-	if (ptr != &vma->shared.prio_tree_node) {
+	ptr = raw_prio_tree_insert(root, &vma->shared.prio_tree_node);
+	if (ptr != (struct prio_tree_node *) &vma->shared.prio_tree_node) {
 		old = prio_tree_entry(ptr, struct vm_area_struct,
 					shared.prio_tree_node);
 		vma_prio_tree_add(vma, old);
@@ -568,7 +119,7 @@
 		if (!vma->shared.vm_set.parent)
 			list_del_init(&vma->shared.vm_set.list);
 		else
-			prio_tree_remove(root, &vma->shared.prio_tree_node);
+			raw_prio_tree_remove(root, &vma->shared.prio_tree_node);
 	} else {
 		/* Leave this BUG_ON till prio_tree patch stabilizes */
 		BUG_ON(vma->shared.vm_set.head->shared.vm_set.head != vma);
@@ -583,7 +134,7 @@
 			} else
 				new_head = NULL;
 
-			prio_tree_replace(root, &vma->shared.prio_tree_node,
+			raw_prio_tree_replace(root, &vma->shared.prio_tree_node,
 					&head->shared.prio_tree_node);
 			head->shared.vm_set.head = new_head;
 			if (new_head)
@@ -620,7 +171,7 @@
 		/*
 		 * First call is with NULL vma
 		 */
-		ptr = prio_tree_first(iter);
+		ptr = prio_tree_next(iter);
 		if (ptr) {
 			next = prio_tree_entry(ptr, struct vm_area_struct,
 						shared.prio_tree_node);
diff -Nru a/mm/readahead.c b/mm/readahead.c
--- a/mm/readahead.c	2005-01-10 20:11:16 -08:00
+++ b/mm/readahead.c	2005-01-10 20:11:16 -08:00
@@ -35,7 +35,7 @@
 file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping)
 {
 	ra->ra_pages = mapping->backing_dev_info->ra_pages;
-	ra->average = ra->ra_pages / 2;
+	ra->prev_page = -1;
 }
 
 /*
@@ -51,6 +51,56 @@
 	return (VM_MIN_READAHEAD * 1024) / PAGE_CACHE_SIZE;
 }
 
+static inline void ra_off(struct file_ra_state *ra)
+{
+	ra->start = 0;
+	ra->flags = 0;
+	ra->size = -1;
+	ra->ahead_start = 0;
+	ra->ahead_size = 0;
+	return;
+}
+
+/*
+ * Set the initial window size, round to next power of 2 and square
+ * for small size, x 4 for medium, and x 2 for large
+ * for 128k (32 page) max ra
+ * 1-8 page = 32k initial, > 8 page = 128k initial
+ */
+static unsigned long get_init_ra_size(unsigned long size, unsigned long max)
+{
+	unsigned long newsize = roundup_pow_of_two(size);
+
+	if (newsize <= max / 64)
+		newsize = newsize * newsize;
+	else if (newsize <= max / 4)
+		newsize = max / 4;
+	else
+		newsize = max;
+	return newsize;
+}
+
+/*
+ * Set the new window size, this is called only when I/O is to be submitted,
+ * not for each call to readahead.  If a cache miss occured, reduce next I/O
+ * size, else increase depending on how close to max we are.
+ */
+static unsigned long get_next_ra_size(unsigned long cur, unsigned long max,
+				unsigned long min, unsigned long * flags)
+{
+	unsigned long newsize;
+
+	if (*flags & RA_FLAG_MISS) {
+		newsize = max((cur - 2), min);
+		*flags &= ~RA_FLAG_MISS;
+	} else if (cur < max / 16) {
+		newsize = 4 * cur;
+	} else {
+		newsize = 2 * cur;
+	}
+	return min(newsize, max);
+}
+
 #define list_to_page(head) (list_entry((head)->prev, struct page, lru))
 
 /**
@@ -65,7 +115,7 @@
  * Hides the details of the LRU cache etc from the filesystems.
  */
 int read_cache_pages(struct address_space *mapping, struct list_head *pages,
-		 int (*filler)(void *, struct page *), void *data)
+			int (*filler)(void *, struct page *), void *data)
 {
 	struct page *page;
 	struct pagevec lru_pvec;
@@ -151,19 +201,16 @@
  * ahead_size:  Together, these form the "ahead window".
  * ra_pages:	The externally controlled max readahead for this fd.
  *
- * When readahead is in the "maximally shrunk" state (next_size == -1UL),
- * readahead is disabled.  In this state, prev_page and size are used, inside
- * handle_ra_miss(), to detect the resumption of sequential I/O.  Once there
- * has been a decent run of sequential I/O (defined by get_min_readahead),
- * readahead is reenabled.
+ * When readahead is in the off state (size == -1UL), readahead is disabled.
+ * In this state, prev_page is used to detect the resumption of sequential I/O.
  *
  * The readahead code manages two windows - the "current" and the "ahead"
  * windows.  The intent is that while the application is walking the pages
  * in the current window, I/O is underway on the ahead window.  When the
  * current window is fully traversed, it is replaced by the ahead window
  * and the ahead window is invalidated.  When this copying happens, the
- * new current window's pages are probably still locked.  When I/O has
- * completed, we submit a new batch of I/O, creating a new ahead window.
+ * new current window's pages are probably still locked.  So
+ * we submit a new batch of I/O immediately, creating a new ahead window.
  *
  * So:
  *
@@ -175,34 +222,25 @@
  *           ahead window.
  *
  * A `readahead hit' occurs when a read request is made against a page which is
- * inside the current window.  Hits are good, and the window size (next_size)
- * is grown aggressively when hits occur.  Two pages are added to the next
- * window size on each hit, which will end up doubling the next window size by
- * the time I/O is submitted for it.
- *
- * If readahead hits are more sparse (say, the application is only reading
- * every second page) then the window will build more slowly.
- *
- * On a readahead miss (the application seeked away) the readahead window is
- * shrunk by 25%.  We don't want to drop it too aggressively, because it is a
- * good assumption that an application which has built a good readahead window
- * will continue to perform linear reads.  Either at the new file position, or
- * at the old one after another seek.
+ * the next sequential page. Ahead windowe calculations are done only when it
+ * is time to submit a new IO.  The code ramps up the size agressively at first,
+ * but slow down as it approaches max_readhead.
  *
- * After enough misses, readahead is fully disabled. (next_size = -1UL).
+ * Any seek/ramdom IO will result in readahead being turned off.  It will resume
+ * at the first sequential access.
  *
  * There is a special-case: if the first page which the application tries to
  * read happens to be the first page of the file, it is assumed that a linear
- * read is about to happen and the window is immediately set to half of the
- * device maximum.
+ * read is about to happen and the window is immediately set to the initial size
+ * based on I/O request size and the max_readahead.
  * 
  * A page request at (start + size) is not a miss at all - it's just a part of
  * sequential file reading.
  *
- * This function is to be called for every page which is read, rather than when
- * it is time to perform readahead.  This is so the readahead algorithm can
- * centrally work out the access patterns.  This could be costly with many tiny
- * read()s, so we specifically optimise for that case with prev_page.
+ * This function is to be called for every read request, rather than when
+ * it is time to perform readahead.  It is called only oce for the entire I/O
+ * regardless of size unless readahead is unable to start enough I/O to satisfy
+ * the request (I/O request > max_readahead).
  */
 
 /*
@@ -211,7 +249,10 @@
  * behaviour which would occur if page allocations are causing VM writeback.
  * We really don't want to intermingle reads and writes like that.
  *
- * Returns the number of pages which actually had IO started against them.
+ * Returns the number of pages requested, or the maximum amount of I/O allowed.
+ *
+ * do_page_cache_readahead() returns -1 if it encountered request queue
+ * congestion.
  */
 static inline int
 __do_page_cache_readahead(struct address_space *mapping, struct file *filp,
@@ -300,6 +341,28 @@
 }
 
 /*
+ * Check how effective readahead is being.  If the amount of started IO is
+ * less than expected then the file is partly or fully in pagecache and
+ * readahead isn't helping.
+ *
+ */
+int check_ra_success(struct file_ra_state *ra, unsigned long nr_to_read,
+				 unsigned long actual)
+{
+	if (actual == 0) {
+		ra->cache_hit += nr_to_read;
+		if (ra->cache_hit >= VM_MAX_CACHE_HIT) {
+			ra_off(ra);
+			ra->flags |= RA_FLAG_INCACHE;
+			return 0;
+		}
+	} else {
+		ra->cache_hit=0;
+	}
+	return 1;
+}
+
+/*
  * This version skips the IO if the queue is read-congested, and will tell the
  * block layer to abandon the readahead if request allocation would block.
  *
@@ -309,256 +372,196 @@
 int do_page_cache_readahead(struct address_space *mapping, struct file *filp,
 			unsigned long offset, unsigned long nr_to_read)
 {
-	if (!bdi_read_congested(mapping->backing_dev_info))
-		return __do_page_cache_readahead(mapping, filp,
-						offset, nr_to_read);
-	return 0;
+	if (bdi_read_congested(mapping->backing_dev_info))
+		return -1;
+
+	return __do_page_cache_readahead(mapping, filp, offset, nr_to_read);
 }
 
 /*
- * Check how effective readahead is being.  If the amount of started IO is
- * less than expected then the file is partly or fully in pagecache and
- * readahead isn't helping.  Shrink the window.
- *
- * But don't shrink it too much - the application may read the same page
- * occasionally.
+ * Read 'nr_to_read' pages starting at page 'offset'. If the flag 'block'
+ * is set wait till the read completes.  Otherwise attempt to read without
+ * blocking.
+ * Returns 1 meaning 'success' if read is succesfull without switching off
+ * readhaead mode. Otherwise return failure.
  */
-static inline void
-check_ra_success(struct file_ra_state *ra, pgoff_t attempt,
-			pgoff_t actual, pgoff_t orig_next_size)
+static int
+blockable_page_cache_readahead(struct address_space *mapping, struct file *filp,
+			unsigned long offset, unsigned long nr_to_read,
+			struct file_ra_state *ra, int block)
 {
-	if (actual == 0) {
-		if (orig_next_size > 1) {
-			ra->next_size = orig_next_size - 1;
-			if (ra->ahead_size)
-				ra->ahead_size = ra->next_size;
-		} else {
-			ra->next_size = -1UL;
-			ra->size = 0;
-		}
+	int actual;
+
+	if (block) {
+		actual = __do_page_cache_readahead(mapping, filp,
+						offset, nr_to_read);
+	} else {
+		actual = do_page_cache_readahead(mapping, filp,
+						offset, nr_to_read);
+		if (actual == -1)
+			return 0;
 	}
+	return check_ra_success(ra, nr_to_read, actual);
 }
 
 /*
  * page_cache_readahead is the main function.  If performs the adaptive
  * readahead window size management and submits the readahead I/O.
  */
-void
+unsigned long
 page_cache_readahead(struct address_space *mapping, struct file_ra_state *ra,
-			struct file *filp, unsigned long offset)
+		     struct file *filp, unsigned long offset,
+		     unsigned long req_size)
 {
-	unsigned max;
-	unsigned orig_next_size;
-	unsigned actual;
-	int first_access=0;
-	unsigned long average;
+	unsigned long max, min;
+	unsigned long newsize = req_size;
+	unsigned long block;
 
 	/*
 	 * Here we detect the case where the application is performing
 	 * sub-page sized reads.  We avoid doing extra work and bogusly
 	 * perturbing the readahead window expansion logic.
-	 * If next_size is zero, this is the very first read for this
-	 * file handle, or the window is maximally shrunk.
+	 * If size is zero, there is no read ahead window so we need one
 	 */
-	if (offset == ra->prev_page) {
-		if (ra->next_size != 0)
-			goto out;
-	}
-
-	if (ra->next_size == -1UL)
-		goto out;	/* Maximally shrunk */
+	if (offset == ra->prev_page && req_size == 1 && ra->size != 0)
+		goto out;
 
 	max = get_max_readahead(ra);
-	if (max == 0)
-		goto out;	/* No readahead */
-
-	orig_next_size = ra->next_size;
+	min = get_min_readahead(ra);
+	newsize = min(req_size, max);
 
-	if (ra->next_size == 0) {
-		/*
-		 * Special case - first read.
-		 * We'll assume it's a whole-file read, and
-		 * grow the window fast.
-		 */
-		first_access=1;
-		ra->next_size = max / 2;
+	if (newsize == 0 || (ra->flags & RA_FLAG_INCACHE)) {
+		newsize = 1;
 		ra->prev_page = offset;
-		ra->currnt_wnd_hit++;
-		goto do_io;
+		goto out;	/* No readahead or file already in cache */
 	}
+	/*
+	 * Special case - first read.  We'll assume it's a whole-file read if
+	 * at start of file, and grow the window fast.  Or detect first
+	 * sequential access
+	 */
+	if ((ra->size == 0 && offset == 0)	/* first io and start of file */
+	    || (ra->size == -1 && ra->prev_page == offset - 1)) {
+		/* First sequential */
+		ra->prev_page  = offset + newsize - 1;
+		ra->size = get_init_ra_size(newsize, max);
+		ra->start = offset;
+		if (!blockable_page_cache_readahead(mapping, filp, offset,
+							 ra->size, ra, 1))
+			goto out;
 
-	ra->prev_page = offset;
-
-	if (offset >= ra->start && offset <= (ra->start + ra->size)) {
-		/*
-		 * A readahead hit.  Either inside the window, or one
-		 * page beyond the end.  Expand the next readahead size.
-		 */
-		ra->next_size += 2;
-
-		if (ra->currnt_wnd_hit <= (max * 2))
-			ra->currnt_wnd_hit++;
-	} else {
 		/*
-		 * A miss - lseek, pagefault, pread, etc.  Shrink the readahead
-		 * window.
+		 * If the request size is larger than our max readahead, we
+		 * at least want to be sure that we get 2 IOs in flight and
+		 * we know that we will definitly need the new I/O.
+		 * once we do this, subsequent calls should be able to overlap
+		 * IOs,* thus preventing stalls. so issue the ahead window
+		 * immediately.
 		 */
-		ra->next_size -= 2;
-
-		average = ra->average;
-		if (average < ra->currnt_wnd_hit) {
-			average++;
+		if (req_size >= max) {
+			ra->ahead_size = get_next_ra_size(ra->size, max, min,
+							  &ra->flags);
+			ra->ahead_start = ra->start + ra->size;
+			blockable_page_cache_readahead(mapping, filp,
+				 ra->ahead_start, ra->ahead_size, ra, 1);
 		}
-		ra->average = (average + ra->currnt_wnd_hit) / 2;
-		ra->currnt_wnd_hit = 1;
+		goto out;
 	}
 
-	if ((long)ra->next_size > (long)max)
-		ra->next_size = max;
-	if ((long)ra->next_size <= 0L) {
-		ra->next_size = -1UL;
-		ra->size = 0;
-		goto out;		/* Readahead is off */
+	/*
+	 * Now handle the random case:
+	 * partial page reads and first access were handled above,
+	 * so this must be the next page otherwise it is random
+	 */
+	if ((offset != (ra->prev_page+1) || (ra->size == 0))) {
+		ra_off(ra);
+		ra->prev_page  = offset + newsize - 1;
+		blockable_page_cache_readahead(mapping, filp, offset,
+				 newsize, ra, 1);
+		goto out;
 	}
 
 	/*
-	 * Is this request outside the current window?
+	 * If we get here we are doing sequential IO and this was not the first
+	 * occurence (ie we have an existing window)
 	 */
-	if (offset < ra->start || offset >= (ra->start + ra->size)) {
-		/*
-		 * A miss against the current window.  Have we merely
-		 * advanced into the ahead window?
-		 */
-		if (offset == ra->ahead_start) {
-			/*
-			 * Yes, we have.  The ahead window now becomes
-			 * the current window.
+
+	if (ra->ahead_start == 0) {	 /* no ahead window yet */
+		ra->ahead_size = get_next_ra_size(ra->size, max, min,
+						  &ra->flags);
+		ra->ahead_start = ra->start + ra->size;
+		block = ((offset + newsize -1) >= ra->ahead_start);
+		if (!blockable_page_cache_readahead(mapping, filp,
+		    ra->ahead_start, ra->ahead_size, ra, block)) {
+			/* A read failure in blocking mode, implies pages are
+			 * all cached. So we can safely assume we have taken
+			 * care of all the pages requested in this call. A read
+			 * failure in non-blocking mode, implies we are reading
+			 * more pages than requested in this call.  So we safely
+			 * assume we have taken care of all the pages requested
+			 * in this call.
+			 *
+			 * Just reset the ahead window in case we failed due to
+			 * congestion.  The ahead window will any way be closed
+			 * in case we failed due to exessive page cache hits.
 			 */
-			ra->start = ra->ahead_start;
-			ra->size = ra->ahead_size;
-			ra->prev_page = ra->start;
 			ra->ahead_start = 0;
 			ra->ahead_size = 0;
-
-			/*
-			 * Control now returns, probably to sleep until I/O
-			 * completes against the first ahead page.
-			 * When the second page in the old ahead window is
-			 * requested, control will return here and more I/O
-			 * will be submitted to build the new ahead window.
-			 */
 			goto out;
 		}
-do_io:
-		/*
-		 * This is the "unusual" path.  We come here during
-		 * startup or after an lseek.  We invalidate the
-		 * ahead window and get some I/O underway for the new
-		 * current window.
-		 */
-		if (!first_access) {
-			 /* Heuristic: there is a high probability
-			  * that around  ra->average number of
-			  * pages shall be accessed in the next
-			  * current window.
-			  */
-			average = ra->average;
-			if (ra->currnt_wnd_hit > average)
-				average = (ra->currnt_wnd_hit + ra->average + 1) / 2;
-
-			ra->next_size = min(average , (unsigned long)max);
-		}
-		ra->start = offset;
-		ra->size = ra->next_size;
-		ra->ahead_start = 0;		/* Invalidate these */
-		ra->ahead_size = 0;
-		actual = do_page_cache_readahead(mapping, filp, offset,
-						 ra->size);
-		if(!first_access) {
-			/*
-			 * do not adjust the readahead window size the first
-			 * time, the ahead window might get closed if all
-			 * the pages are already in the cache.
-			 */
-			check_ra_success(ra, ra->size, actual, orig_next_size);
-		}
-	} else {
-		/*
-		 * This read request is within the current window.  It may be
-		 * time to submit I/O for the ahead window while the
-		 * application is about to step into the ahead window.
-		 */
-		if (ra->ahead_start == 0) {
-			/*
-			 * If the average io-size is more than maximum
-			 * readahead size of the file the io pattern is
-			 * sequential. Hence  bring in the readahead window
-			 * immediately.
-			 * If the average io-size is less than maximum
-			 * readahead size of the file the io pattern is
-			 * random. Hence don't bother to readahead.
+	}
+	/*
+	 * Already have an ahead window, check if we crossed into it.
+	 * If so, shift windows and issue a new ahead window.
+	 * Only return the #pages that are in the current window, so that
+	 * we get called back on the first page of the ahead window which
+	 * will allow us to submit more IO.
+	 */
+	if ((offset + newsize - 1) >= ra->ahead_start) {
+		ra->start = ra->ahead_start;
+		ra->size = ra->ahead_size;
+		ra->ahead_start = ra->ahead_start + ra->ahead_size;
+		ra->ahead_size = get_next_ra_size(ra->ahead_size,
+						  max, min, &ra->flags);
+		block = ((offset + newsize - 1) >= ra->ahead_start);
+		if (!blockable_page_cache_readahead(mapping, filp,
+			ra->ahead_start, ra->ahead_size, ra, block)) {
+			/* A read failure in blocking mode, implies pages are
+			 * all cached. So we can safely assume we have taken
+			 * care of all the pages requested in this call.
+			 * A read failure in non-blocking mode, implies we are
+			 * reading more pages than requested in this call.  So
+			 * we safely assume we have taken care of all the pages
+			 * requested in this call.
+			 *
+			 * Just reset the ahead window in case we failed due to
+			 * congestion.  The ahead window will any way be closed
+			 * in case we failed due to excessive page cache hits.
 			 */
-			average = ra->average;
-			if (ra->currnt_wnd_hit > average)
-				average = (ra->currnt_wnd_hit + ra->average + 1) / 2;
-
-			if (average > max) {
-				ra->ahead_start = ra->start + ra->size;
-				ra->ahead_size = ra->next_size;
-				actual = do_page_cache_readahead(mapping, filp,
-					ra->ahead_start, ra->ahead_size);
-				check_ra_success(ra, ra->ahead_size,
-						actual, orig_next_size);
-			}
+			ra->ahead_start = 0;
+			ra->ahead_size = 0;
 		}
 	}
+
 out:
-	return;
+	ra->prev_page = offset + newsize - 1;
+	return(newsize);
 }
 
-
 /*
  * handle_ra_miss() is called when it is known that a page which should have
  * been present in the pagecache (we just did some readahead there) was in fact
  * not found.  This will happen if it was evicted by the VM (readahead
- * thrashing) or if the readahead window is maximally shrunk.
+ * thrashing)
  *
- * If the window has been maximally shrunk (next_size == -1UL) then look to see
- * if we are getting misses against sequential file offsets.  If so, and this
- * persists then resume readahead.
- *
- * Otherwise we're thrashing, so shrink the readahead window by three pages.
- * This is because it is grown by two pages on a readahead hit.  Theory being
- * that the readahead window size will stabilise around the maximum level at
- * which there is no thrashing.
+ * Turn on the cache miss flag in the RA struct, this will cause the RA code
+ * to reduce the RA size on the next read.
  */
 void handle_ra_miss(struct address_space *mapping,
 		struct file_ra_state *ra, pgoff_t offset)
 {
-	if (ra->next_size == -1UL) {
-		const unsigned long max = get_max_readahead(ra);
-
-		if (offset != ra->prev_page + 1) {
-			ra->size = ra->size?ra->size-1:0; /* Not sequential */
-		} else {
-			ra->size++;			/* A sequential read */
-			if (ra->size >= max) {		/* Resume readahead */
-				ra->start = offset - max;
-				ra->next_size = max;
-				ra->size = max;
-				ra->ahead_start = 0;
-				ra->ahead_size = 0;
-				ra->average = max / 2;
-			}
-		}
-		ra->prev_page = offset;
-	} else {
-		const unsigned long min = get_min_readahead(ra);
-
-		ra->next_size -= 3;
-		if (ra->next_size < min)
-			ra->next_size = min;
-	}
+	ra->flags |= RA_FLAG_MISS;
+	ra->flags &= ~RA_FLAG_INCACHE;
 }
 
 /*
diff -Nru a/mm/rmap.c b/mm/rmap.c
--- a/mm/rmap.c	2005-01-10 20:11:22 -08:00
+++ b/mm/rmap.c	2005-01-10 20:11:22 -08:00
@@ -51,6 +51,7 @@
 #include <linux/swapops.h>
 #include <linux/slab.h>
 #include <linux/init.h>
+#include <linux/acct.h>
 #include <linux/rmap.h>
 #include <linux/rcupdate.h>
 
@@ -120,14 +121,7 @@
 
 void __anon_vma_merge(struct vm_area_struct *vma, struct vm_area_struct *next)
 {
-	if (!vma->anon_vma) {
-		BUG_ON(!next->anon_vma);
-		vma->anon_vma = next->anon_vma;
-		list_add(&vma->anon_vma_node, &next->anon_vma_node);
-	} else {
-		/* if they're both non-null they must be the same */
-		BUG_ON(vma->anon_vma != next->anon_vma);
-	}
+	BUG_ON(vma->anon_vma != next->anon_vma);
 	list_del(&next->anon_vma_node);
 }
 
@@ -259,6 +253,7 @@
 	struct mm_struct *mm = vma->vm_mm;
 	unsigned long address;
 	pgd_t *pgd;
+	pud_t *pud;
 	pmd_t *pmd;
 	pte_t *pte;
 	int referenced = 0;
@@ -275,7 +270,11 @@
 	if (!pgd_present(*pgd))
 		goto out_unlock;
 
-	pmd = pmd_offset(pgd, address);
+	pud = pud_offset(pgd, address);
+	if (!pud_present(*pud))
+		goto out_unlock;
+
+	pmd = pmd_offset(pud, address);
 	if (!pmd_present(*pmd))
 		goto out_unlock;
 
@@ -505,6 +504,7 @@
 	struct mm_struct *mm = vma->vm_mm;
 	unsigned long address;
 	pgd_t *pgd;
+	pud_t *pud;
 	pmd_t *pmd;
 	pte_t *pte;
 	pte_t pteval;
@@ -526,7 +526,11 @@
 	if (!pgd_present(*pgd))
 		goto out_unlock;
 
-	pmd = pmd_offset(pgd, address);
+	pud = pud_offset(pgd, address);
+	if (!pud_present(*pud))
+		goto out_unlock;
+
+	pmd = pmd_offset(pud, address);
 	if (!pmd_present(*pmd))
 		goto out_unlock;
 
@@ -596,6 +600,7 @@
 	}
 
 	mm->rss--;
+	acct_update_integrals();
 	page_remove_rmap(page);
 	page_cache_release(page);
 
@@ -634,6 +639,7 @@
 {
 	struct mm_struct *mm = vma->vm_mm;
 	pgd_t *pgd;
+	pud_t *pud;
 	pmd_t *pmd;
 	pte_t *pte;
 	pte_t pteval;
@@ -659,7 +665,11 @@
 	if (!pgd_present(*pgd))
 		goto out_unlock;
 
-	pmd = pmd_offset(pgd, address);
+	pud = pud_offset(pgd, address);
+	if (!pud_present(*pud))
+		goto out_unlock;
+
+	pmd = pmd_offset(pud, address);
 	if (!pmd_present(*pmd))
 		goto out_unlock;
 
@@ -695,6 +705,7 @@
 
 		page_remove_rmap(page);
 		page_cache_release(page);
+		acct_update_integrals();
 		mm->rss--;
 		(*mapcount)--;
 	}
diff -Nru a/mm/shmem.c b/mm/shmem.c
--- a/mm/shmem.c	2005-01-10 20:11:18 -08:00
+++ b/mm/shmem.c	2005-01-10 20:11:18 -08:00
@@ -189,7 +189,7 @@
 };
 
 static LIST_HEAD(shmem_swaplist);
-static spinlock_t shmem_swaplist_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(shmem_swaplist_lock);
 
 static void shmem_free_blocks(struct inode *inode, long pages)
 {
@@ -369,9 +369,8 @@
 		}
 
 		spin_unlock(&info->lock);
-		page = shmem_dir_alloc(mapping_gfp_mask(inode->i_mapping));
+		page = shmem_dir_alloc(mapping_gfp_mask(inode->i_mapping) | __GFP_ZERO);
 		if (page) {
-			clear_highpage(page);
 			page->nr_swapped = 0;
 		}
 		spin_lock(&info->lock);
@@ -910,7 +909,7 @@
 	pvma.vm_policy = mpol_shared_policy_lookup(&info->policy, idx);
 	pvma.vm_pgoff = idx;
 	pvma.vm_end = PAGE_SIZE;
-	page = alloc_page_vma(gfp, &pvma, 0);
+	page = alloc_page_vma(gfp | __GFP_ZERO, &pvma, 0);
 	mpol_free(pvma.vm_policy);
 	return page;
 }
@@ -926,7 +925,7 @@
 shmem_alloc_page(unsigned long gfp,struct shmem_inode_info *info,
 				 unsigned long idx)
 {
-	return alloc_page(gfp);
+	return alloc_page(gfp | __GFP_ZERO);
 }
 #endif
 
@@ -1135,7 +1134,6 @@
 
 		info->alloced++;
 		spin_unlock(&info->lock);
-		clear_highpage(filepage);
 		flush_dcache_page(filepage);
 		SetPageUptodate(filepage);
 	}
diff -Nru a/mm/slab.c b/mm/slab.c
--- a/mm/slab.c	2005-01-10 20:11:24 -08:00
+++ b/mm/slab.c	2005-01-10 20:11:24 -08:00
@@ -128,9 +128,28 @@
 #endif
 
 #ifndef ARCH_KMALLOC_MINALIGN
+/*
+ * Enforce a minimum alignment for the kmalloc caches.
+ * Usually, the kmalloc caches are cache_line_size() aligned, except when
+ * DEBUG and FORCED_DEBUG are enabled, then they are BYTES_PER_WORD aligned.
+ * Some archs want to perform DMA into kmalloc caches and need a guaranteed
+ * alignment larger than BYTES_PER_WORD. ARCH_KMALLOC_MINALIGN allows that.
+ * Note that this flag disables some debug features.
+ */
 #define ARCH_KMALLOC_MINALIGN 0
 #endif
 
+#ifndef ARCH_SLAB_MINALIGN
+/*
+ * Enforce a minimum alignment for all caches.
+ * Intended for archs that get misalignment faults even for BYTES_PER_WORD
+ * aligned buffers. Includes ARCH_KMALLOC_MINALIGN.
+ * If possible: Do not enable this flag for CONFIG_DEBUG_SLAB, it disables
+ * some debug features.
+ */
+#define ARCH_SLAB_MINALIGN 0
+#endif
+
 #ifndef ARCH_KMALLOC_FLAGS
 #define ARCH_KMALLOC_FLAGS SLAB_HWCACHE_ALIGN
 #endif
@@ -1172,7 +1191,7 @@
 	unsigned long flags, void (*ctor)(void*, kmem_cache_t *, unsigned long),
 	void (*dtor)(void*, kmem_cache_t *, unsigned long))
 {
-	size_t left_over, slab_size;
+	size_t left_over, slab_size, ralign;
 	kmem_cache_t *cachep = NULL;
 
 	/*
@@ -1222,24 +1241,44 @@
 	if (flags & ~CREATE_MASK)
 		BUG();
 
-	if (align) {
-		/* combinations of forced alignment and advanced debugging is
-		 * not yet implemented.
+	/* Check that size is in terms of words.  This is needed to avoid
+	 * unaligned accesses for some archs when redzoning is used, and makes
+	 * sure any on-slab bufctl's are also correctly aligned.
+	 */
+	if (size & (BYTES_PER_WORD-1)) {
+		size += (BYTES_PER_WORD-1);
+		size &= ~(BYTES_PER_WORD-1);
+	}
+
+	/* calculate out the final buffer alignment: */
+	/* 1) arch recommendation: can be overridden for debug */
+	if (flags & SLAB_HWCACHE_ALIGN) {
+		/* Default alignment: as specified by the arch code.
+		 * Except if an object is really small, then squeeze multiple
+		 * objects into one cacheline.
 		 */
-		flags &= ~(SLAB_RED_ZONE|SLAB_STORE_USER);
+		ralign = cache_line_size();
+		while (size <= ralign/2)
+			ralign /= 2;
 	} else {
-		if (flags & SLAB_HWCACHE_ALIGN) {
-			/* Default alignment: as specified by the arch code.
-			 * Except if an object is really small, then squeeze multiple
-			 * into one cacheline.
-			 */
-			align = cache_line_size();
-			while (size <= align/2)
-				align /= 2;
-		} else {
-			align = BYTES_PER_WORD;
-		}
+		ralign = BYTES_PER_WORD;
+	}
+	/* 2) arch mandated alignment: disables debug if necessary */
+	if (ralign < ARCH_SLAB_MINALIGN) {
+		ralign = ARCH_SLAB_MINALIGN;
+		if (ralign > BYTES_PER_WORD)
+			flags &= ~(SLAB_RED_ZONE|SLAB_STORE_USER);
+	}
+	/* 3) caller mandated alignment: disables debug if necessary */
+	if (ralign < align) {
+		ralign = align;
+		if (ralign > BYTES_PER_WORD)
+			flags &= ~(SLAB_RED_ZONE|SLAB_STORE_USER);
 	}
+	/* 4) Store it. Note that the debug code below can reduce
+	 *    the alignment to BYTES_PER_WORD.
+	 */
+	align = ralign;
 
 	/* Get cache's description obj. */
 	cachep = (kmem_cache_t *) kmem_cache_alloc(&cache_cache, SLAB_KERNEL);
@@ -1247,15 +1286,6 @@
 		goto opps;
 	memset(cachep, 0, sizeof(kmem_cache_t));
 
-	/* Check that size is in terms of words.  This is needed to avoid
-	 * unaligned accesses for some archs when redzoning is used, and makes
-	 * sure any on-slab bufctl's are also correctly aligned.
-	 */
-	if (size & (BYTES_PER_WORD-1)) {
-		size += (BYTES_PER_WORD-1);
-		size &= ~(BYTES_PER_WORD-1);
-	}
-	
 #if DEBUG
 	cachep->reallen = size;
 
@@ -2806,7 +2836,7 @@
 next_unlock:
 		spin_unlock_irq(&searchp->spinlock);
 next:
-		;
+		cond_resched();
 	}
 	check_irq_on();
 	up(&cache_chain_sem);
diff -Nru a/mm/swapfile.c b/mm/swapfile.c
--- a/mm/swapfile.c	2005-01-10 20:11:17 -08:00
+++ b/mm/swapfile.c	2005-01-10 20:11:17 -08:00
@@ -24,6 +24,7 @@
 #include <linux/module.h>
 #include <linux/rmap.h>
 #include <linux/security.h>
+#include <linux/acct.h>
 #include <linux/backing-dev.h>
 #include <linux/syscalls.h>
 
@@ -31,7 +32,7 @@
 #include <asm/tlbflush.h>
 #include <linux/swapops.h>
 
-spinlock_t swaplock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(swaplock);
 unsigned int nr_swapfiles;
 long total_swap_pages;
 static int swap_overflow;
@@ -436,6 +437,8 @@
 	set_pte(dir, pte_mkold(mk_pte(page, vma->vm_page_prot)));
 	page_add_anon_rmap(page, vma, address);
 	swap_free(entry);
+	acct_update_integrals();
+	update_mem_hiwater();
 }
 
 /* vma->vm_mm->page_table_lock is held */
@@ -486,27 +489,27 @@
 }
 
 /* vma->vm_mm->page_table_lock is held */
-static unsigned long unuse_pgd(struct vm_area_struct * vma, pgd_t *dir,
-	unsigned long address, unsigned long size,
+static unsigned long unuse_pud(struct vm_area_struct * vma, pud_t *pud,
+        unsigned long address, unsigned long size, unsigned long offset,
 	swp_entry_t entry, struct page *page)
 {
 	pmd_t * pmd;
-	unsigned long offset, end;
+	unsigned long end;
 	unsigned long foundaddr;
 
-	if (pgd_none(*dir))
+	if (pud_none(*pud))
 		return 0;
-	if (pgd_bad(*dir)) {
-		pgd_ERROR(*dir);
-		pgd_clear(dir);
+	if (pud_bad(*pud)) {
+		pud_ERROR(*pud);
+		pud_clear(pud);
 		return 0;
 	}
-	pmd = pmd_offset(dir, address);
-	offset = address & PGDIR_MASK;
-	address &= ~PGDIR_MASK;
+	pmd = pmd_offset(pud, address);
+	offset += address & PUD_MASK;
+	address &= ~PUD_MASK;
 	end = address + size;
-	if (end > PGDIR_SIZE)
-		end = PGDIR_SIZE;
+	if (end > PUD_SIZE)
+		end = PUD_SIZE;
 	if (address >= end)
 		BUG();
 	do {
@@ -521,12 +524,48 @@
 }
 
 /* vma->vm_mm->page_table_lock is held */
+static unsigned long unuse_pgd(struct vm_area_struct * vma, pgd_t *pgd,
+	unsigned long address, unsigned long size,
+	swp_entry_t entry, struct page *page)
+{
+	pud_t * pud;
+	unsigned long offset;
+	unsigned long foundaddr;
+	unsigned long end;
+
+	if (pgd_none(*pgd))
+		return 0;
+	if (pgd_bad(*pgd)) {
+		pgd_ERROR(*pgd);
+		pgd_clear(pgd);
+		return 0;
+	}
+	pud = pud_offset(pgd, address);
+	offset = address & PGDIR_MASK;
+	address &= ~PGDIR_MASK;
+	end = address + size;
+	if (end > PGDIR_SIZE)
+		end = PGDIR_SIZE;
+	BUG_ON (address >= end);
+	do {
+		foundaddr = unuse_pud(vma, pud, address, end - address,
+					        offset, entry, page);
+		if (foundaddr)
+			return foundaddr;
+		address = (address + PUD_SIZE) & PUD_MASK;
+		pud++;
+	} while (address && (address < end));
+	return 0;
+}
+
+/* vma->vm_mm->page_table_lock is held */
 static unsigned long unuse_vma(struct vm_area_struct * vma,
 	swp_entry_t entry, struct page *page)
 {
-	pgd_t *pgdir;
-	unsigned long start, end;
+	pgd_t *pgd;
+	unsigned long start, end, next;
 	unsigned long foundaddr;
+	int i;
 
 	if (page->mapping) {
 		start = page_address_in_vma(page, vma);
@@ -538,15 +577,18 @@
 		start = vma->vm_start;
 		end = vma->vm_end;
 	}
-	pgdir = pgd_offset(vma->vm_mm, start);
-	do {
-		foundaddr = unuse_pgd(vma, pgdir, start, end - start,
-						entry, page);
+	pgd = pgd_offset(vma->vm_mm, start);
+	for (i = pgd_index(start); i <= pgd_index(end-1); i++) {
+		next = (start + PGDIR_SIZE) & PGDIR_MASK;
+		if (next > end || next <= start)
+			next = end;
+		foundaddr = unuse_pgd(vma, pgd, start, next - start, entry, page);
 		if (foundaddr)
 			return foundaddr;
-		start = (start + PGDIR_SIZE) & PGDIR_MASK;
-		pgdir++;
-	} while (start && (start < end));
+		start = next;
+		i++;
+		pgd++;
+	}
 	return 0;
 }
 
diff -Nru a/mm/thrash.c b/mm/thrash.c
--- a/mm/thrash.c	2005-01-10 20:11:17 -08:00
+++ b/mm/thrash.c	2005-01-10 20:11:17 -08:00
@@ -13,7 +13,7 @@
 #include <linux/sched.h>
 #include <linux/swap.h>
 
-static spinlock_t swap_token_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(swap_token_lock);
 static unsigned long swap_token_timeout;
 unsigned long swap_token_check;
 struct mm_struct * swap_token_mm = &init_mm;
diff -Nru a/mm/truncate.c b/mm/truncate.c
--- a/mm/truncate.c	2005-01-10 20:11:22 -08:00
+++ b/mm/truncate.c	2005-01-10 20:11:22 -08:00
@@ -45,6 +45,7 @@
 static void
 truncate_complete_page(struct address_space *mapping, struct page *page)
 {
+	BUG_ON(page_mapped(page));
 	if (page->mapping != mapping)
 		return;
 
@@ -64,6 +65,8 @@
  * be marked dirty at any time too.  So we re-check the dirtiness inside
  * ->tree_lock.  That provides exclusion against the __set_page_dirty
  * functions.
+ *
+ * Returns non-zero if the page was successfully invalidated.
  */
 static int
 invalidate_complete_page(struct address_space *mapping, struct page *page)
@@ -81,10 +84,6 @@
 	}
 
 	BUG_ON(PagePrivate(page));
-	if (page_count(page) != 2) {
-		spin_unlock_irq(&mapping->tree_lock);
-		return 0;
-	}
 	__remove_from_page_cache(page);
 	spin_unlock_irq(&mapping->tree_lock);
 	ClearPageUptodate(page);
@@ -243,50 +242,67 @@
 EXPORT_SYMBOL(invalidate_inode_pages);
 
 /**
- * invalidate_inode_pages2 - remove all unmapped pages from an address_space
+ * invalidate_inode_pages2 - remove all pages from an address_space
  * @mapping - the address_space
  *
- * invalidate_inode_pages2() is like truncate_inode_pages(), except for the case
- * where the page is seen to be mapped into process pagetables.  In that case,
- * the page is marked clean but is left attached to its address_space.
- *
- * The page is also marked not uptodate so that a subsequent pagefault will
- * perform I/O to bringthe page's contents back into sync with its backing
- * store.
+ * Any pages which are found to be mapped into pagetables are unmapped prior to
+ * invalidation.
  *
- * FIXME: invalidate_inode_pages2() is probably trivially livelockable.
+ * Returns -EIO if any pages could not be invalidated.
  */
-void invalidate_inode_pages2(struct address_space *mapping)
+int invalidate_inode_pages2(struct address_space *mapping)
 {
 	struct pagevec pvec;
 	pgoff_t next = 0;
 	int i;
+	int ret = 0;
+	int did_full_unmap = 0;
 
 	pagevec_init(&pvec, 0);
-	while (pagevec_lookup(&pvec, mapping, next, PAGEVEC_SIZE)) {
-		for (i = 0; i < pagevec_count(&pvec); i++) {
+	while (!ret && pagevec_lookup(&pvec, mapping, next, PAGEVEC_SIZE)) {
+		for (i = 0; !ret && i < pagevec_count(&pvec); i++) {
 			struct page *page = pvec.pages[i];
+			int was_dirty;
 
 			lock_page(page);
-			if (page->mapping == mapping) {	/* truncate race? */
-				wait_on_page_writeback(page);
-				next = page->index + 1;
-				if (page_mapped(page)) {
-					clear_page_dirty(page);
-					ClearPageUptodate(page);
+			if (page->mapping != mapping) {	/* truncate race? */
+				unlock_page(page);
+				continue;
+			}
+			wait_on_page_writeback(page);
+			next = page->index + 1;
+			while (page_mapped(page)) {
+				if (!did_full_unmap) {
+					/*
+					 * Zap the rest of the file in one hit.
+					 * FIXME: invalidate_inode_pages2()
+					 * should take start/end offsets.
+					 */
+					unmap_mapping_range(mapping,
+						page->index << PAGE_CACHE_SHIFT,
+					  	-1, 0);
+					did_full_unmap = 1;
 				} else {
-					if (!invalidate_complete_page(mapping,
-								      page)) {
-						clear_page_dirty(page);
-						ClearPageUptodate(page);
-					}
+					/*
+					 * Just zap this page
+					 */
+					unmap_mapping_range(mapping,
+					  page->index << PAGE_CACHE_SHIFT,
+					  (page->index << PAGE_CACHE_SHIFT)+1,
+					  0);
 				}
 			}
+			was_dirty = test_clear_page_dirty(page);
+			if (!invalidate_complete_page(mapping, page)) {
+				if (was_dirty)
+					set_page_dirty(page);
+				ret = -EIO;
+			}
 			unlock_page(page);
 		}
 		pagevec_release(&pvec);
 		cond_resched();
 	}
+	return ret;
 }
-
 EXPORT_SYMBOL_GPL(invalidate_inode_pages2);
diff -Nru a/mm/vmalloc.c b/mm/vmalloc.c
--- a/mm/vmalloc.c	2005-01-10 20:11:19 -08:00
+++ b/mm/vmalloc.c	2005-01-10 20:11:19 -08:00
@@ -20,7 +20,7 @@
 #include <asm/tlbflush.h>
 
 
-rwlock_t vmlist_lock = RW_LOCK_UNLOCKED;
+DEFINE_RWLOCK(vmlist_lock);
 struct vm_struct *vmlist;
 
 static void unmap_area_pte(pmd_t *pmd, unsigned long address,
@@ -56,25 +56,25 @@
 	} while (address < end);
 }
 
-static void unmap_area_pmd(pgd_t *dir, unsigned long address,
+static void unmap_area_pmd(pud_t *pud, unsigned long address,
 				  unsigned long size)
 {
 	unsigned long end;
 	pmd_t *pmd;
 
-	if (pgd_none(*dir))
+	if (pud_none(*pud))
 		return;
-	if (pgd_bad(*dir)) {
-		pgd_ERROR(*dir);
-		pgd_clear(dir);
+	if (pud_bad(*pud)) {
+		pud_ERROR(*pud);
+		pud_clear(pud);
 		return;
 	}
 
-	pmd = pmd_offset(dir, address);
-	address &= ~PGDIR_MASK;
+	pmd = pmd_offset(pud, address);
+	address &= ~PUD_MASK;
 	end = address + size;
-	if (end > PGDIR_SIZE)
-		end = PGDIR_SIZE;
+	if (end > PUD_SIZE)
+		end = PUD_SIZE;
 
 	do {
 		unmap_area_pte(pmd, address, end - address);
@@ -83,6 +83,33 @@
 	} while (address < end);
 }
 
+static void unmap_area_pud(pgd_t *pgd, unsigned long address,
+			   unsigned long size)
+{
+	pud_t *pud;
+	unsigned long end;
+
+	if (pgd_none(*pgd))
+		return;
+	if (pgd_bad(*pgd)) {
+		pgd_ERROR(*pgd);
+		pgd_clear(pgd);
+		return;
+	}
+
+	pud = pud_offset(pgd, address);
+	address &= ~PGDIR_MASK;
+	end = address + size;
+	if (end > PGDIR_SIZE)
+		end = PGDIR_SIZE;
+
+	do {
+		unmap_area_pmd(pud, address, end - address);
+		address = (address + PUD_SIZE) & PUD_MASK;
+		pud++;
+	} while (address && (address < end));
+}
+
 static int map_area_pte(pte_t *pte, unsigned long address,
 			       unsigned long size, pgprot_t prot,
 			       struct page ***pages)
@@ -96,7 +123,6 @@
 
 	do {
 		struct page *page = **pages;
-
 		WARN_ON(!pte_none(*pte));
 		if (!page)
 			return -ENOMEM;
@@ -115,11 +141,11 @@
 {
 	unsigned long base, end;
 
-	base = address & PGDIR_MASK;
-	address &= ~PGDIR_MASK;
+	base = address & PUD_MASK;
+	address &= ~PUD_MASK;
 	end = address + size;
-	if (end > PGDIR_SIZE)
-		end = PGDIR_SIZE;
+	if (end > PUD_SIZE)
+		end = PUD_SIZE;
 
 	do {
 		pte_t * pte = pte_alloc_kernel(&init_mm, pmd, base + address);
@@ -134,19 +160,41 @@
 	return 0;
 }
 
+static int map_area_pud(pud_t *pud, unsigned long address,
+			       unsigned long end, pgprot_t prot,
+			       struct page ***pages)
+{
+	do {
+		pmd_t *pmd = pmd_alloc(&init_mm, pud, address);
+		if (!pmd)
+			return -ENOMEM;
+		if (map_area_pmd(pmd, address, end - address, prot, pages))
+			return -ENOMEM;
+		address = (address + PUD_SIZE) & PUD_MASK;
+		pud++;
+	} while (address && address < end);
+
+	return 0;
+}
+
 void unmap_vm_area(struct vm_struct *area)
 {
 	unsigned long address = (unsigned long) area->addr;
 	unsigned long end = (address + area->size);
-	pgd_t *dir;
+	unsigned long next;
+	pgd_t *pgd;
+	int i;
 
-	dir = pgd_offset_k(address);
+	pgd = pgd_offset_k(address);
 	flush_cache_vunmap(address, end);
-	do {
-		unmap_area_pmd(dir, address, end - address);
-		address = (address + PGDIR_SIZE) & PGDIR_MASK;
-		dir++;
-	} while (address && (address < end));
+	for (i = pgd_index(address); i <= pgd_index(end-1); i++) {
+		next = (address + PGDIR_SIZE) & PGDIR_MASK;
+		if (next <= address || next > end)
+			next = end;
+		unmap_area_pud(pgd, address, next - address);
+		address = next;
+	        pgd++;
+	}
 	flush_tlb_kernel_range((unsigned long) area->addr, end);
 }
 
@@ -154,25 +202,30 @@
 {
 	unsigned long address = (unsigned long) area->addr;
 	unsigned long end = address + (area->size-PAGE_SIZE);
-	pgd_t *dir;
+	unsigned long next;
+	pgd_t *pgd;
 	int err = 0;
+	int i;
 
-	dir = pgd_offset_k(address);
+	pgd = pgd_offset_k(address);
 	spin_lock(&init_mm.page_table_lock);
-	do {
-		pmd_t *pmd = pmd_alloc(&init_mm, dir, address);
-		if (!pmd) {
+	for (i = pgd_index(address); i <= pgd_index(end-1); i++) {
+		pud_t *pud = pud_alloc(&init_mm, pgd, address);
+		if (!pud) {
 			err = -ENOMEM;
 			break;
 		}
-		if (map_area_pmd(pmd, address, end - address, prot, pages)) {
+		next = (address + PGDIR_SIZE) & PGDIR_MASK;
+		if (next < address || next > end)
+			next = end;
+		if (map_area_pud(pud, address, next, prot, pages)) {
 			err = -ENOMEM;
 			break;
 		}
 
-		address = (address + PGDIR_SIZE) & PGDIR_MASK;
-		dir++;
-	} while (address && (address < end));
+		address = next;
+		pgd++;
+	}
 
 	spin_unlock(&init_mm.page_table_lock);
 	flush_cache_vmap((unsigned long) area->addr, end);
diff -Nru a/mm/vmscan.c b/mm/vmscan.c
--- a/mm/vmscan.c	2005-01-10 20:11:16 -08:00
+++ b/mm/vmscan.c	2005-01-10 20:11:16 -08:00
@@ -361,6 +361,8 @@
 		int may_enter_fs;
 		int referenced;
 
+		cond_resched();
+
 		page = lru_to_page(page_list);
 		list_del(&page->lru);
 
@@ -369,14 +371,14 @@
 
 		BUG_ON(PageActive(page));
 
-		if (PageWriteback(page))
-			goto keep_locked;
-
 		sc->nr_scanned++;
 		/* Double the slab pressure for mapped and swapcache pages */
 		if (page_mapped(page) || PageSwapCache(page))
 			sc->nr_scanned++;
 
+		if (PageWriteback(page))
+			goto keep_locked;
+
 		referenced = page_referenced(page, 1, sc->priority <= 0);
 		/* In active use or really unfreeable?  Activate it. */
 		if (referenced && page_mapping_inuse(page))
@@ -710,6 +712,7 @@
 		reclaim_mapped = 1;
 
 	while (!list_empty(&l_hold)) {
+		cond_resched();
 		page = lru_to_page(&l_hold);
 		list_del(&page->lru);
 		if (page_mapped(page)) {
@@ -968,7 +971,7 @@
  * the page allocator fallback scheme to ensure that aging of pages is balanced
  * across the zones.
  */
-static int balance_pgdat(pg_data_t *pgdat, int nr_pages)
+static int balance_pgdat(pg_data_t *pgdat, int nr_pages, int order)
 {
 	int to_free = nr_pages;
 	int all_zones_ok;
@@ -1014,7 +1017,8 @@
 						priority != DEF_PRIORITY)
 					continue;
 
-				if (zone->free_pages <= zone->pages_high) {
+				if (!zone_watermark_ok(zone, order,
+						zone->pages_high, 0, 0, 0)) {
 					end_zone = i;
 					goto scan;
 				}
@@ -1049,7 +1053,8 @@
 				continue;
 
 			if (nr_pages == 0) {	/* Not software suspend */
-				if (zone->free_pages <= zone->pages_high)
+				if (!zone_watermark_ok(zone, order,
+						zone->pages_high, end_zone, 0, 0))
 					all_zones_ok = 0;
 			}
 			zone->temp_priority = priority;
@@ -1063,6 +1068,7 @@
 			shrink_slab(sc.nr_scanned, GFP_KERNEL, lru_pages);
 			sc.nr_reclaimed += reclaim_state->reclaimed_slab;
 			total_reclaimed += sc.nr_reclaimed;
+			total_scanned += sc.nr_scanned;
 			if (zone->all_unreclaimable)
 				continue;
 			if (zone->pages_scanned >= (zone->nr_active +
@@ -1126,6 +1132,7 @@
  */
 static int kswapd(void *p)
 {
+	unsigned long order;
 	pg_data_t *pgdat = (pg_data_t*)p;
 	struct task_struct *tsk = current;
 	DEFINE_WAIT(wait);
@@ -1154,14 +1161,28 @@
 	 */
 	tsk->flags |= PF_MEMALLOC|PF_KSWAPD;
 
+	order = 0;
 	for ( ; ; ) {
+		unsigned long new_order;
 		if (current->flags & PF_FREEZE)
 			refrigerator(PF_FREEZE);
+
 		prepare_to_wait(&pgdat->kswapd_wait, &wait, TASK_INTERRUPTIBLE);
-		schedule();
+		new_order = pgdat->kswapd_max_order;
+		pgdat->kswapd_max_order = 0;
+		if (order < new_order) {
+			/*
+			 * Don't sleep if someone wants a larger 'order'
+			 * allocation
+			 */
+			order = new_order;
+		} else {
+			schedule();
+			order = pgdat->kswapd_max_order;
+		}
 		finish_wait(&pgdat->kswapd_wait, &wait);
 
-		balance_pgdat(pgdat, 0);
+		balance_pgdat(pgdat, 0, order);
 	}
 	return 0;
 }
@@ -1169,12 +1190,18 @@
 /*
  * A zone is low on free memory, so wake its kswapd task to service it.
  */
-void wakeup_kswapd(struct zone *zone)
+void wakeup_kswapd(struct zone *zone, int order)
 {
+	pg_data_t *pgdat;
+
 	if (zone->present_pages == 0)
 		return;
-	if (zone->free_pages > zone->pages_low)
+
+	pgdat = zone->zone_pgdat;
+	if (zone_watermark_ok(zone, order, zone->pages_low, 0, 0, 0))
 		return;
+	if (pgdat->kswapd_max_order < order)
+		pgdat->kswapd_max_order = order;
 	if (!waitqueue_active(&zone->zone_pgdat->kswapd_wait))
 		return;
 	wake_up_interruptible(&zone->zone_pgdat->kswapd_wait);
@@ -1197,7 +1224,7 @@
 	current->reclaim_state = &reclaim_state;
 	for_each_pgdat(pgdat) {
 		int freed;
-		freed = balance_pgdat(pgdat, nr_to_free);
+		freed = balance_pgdat(pgdat, nr_to_free, 0);
 		ret += freed;
 		nr_to_free -= freed;
 		if (nr_to_free <= 0)
diff -Nru a/net/appletalk/aarp.c b/net/appletalk/aarp.c
--- a/net/appletalk/aarp.c	2005-01-10 20:11:22 -08:00
+++ b/net/appletalk/aarp.c	2005-01-10 20:11:22 -08:00
@@ -199,7 +199,7 @@
  *	aarp_proxy_probe_network.
  */
 
-void aarp_send_probe(struct net_device *dev, struct atalk_addr *us)
+static void aarp_send_probe(struct net_device *dev, struct atalk_addr *us)
 {
 	struct elapaarp *eah;
 	int len = dev->hard_header_len + sizeof(*eah) + aarp_dl->header_length;
@@ -429,7 +429,7 @@
  * Probe a Phase 1 device or a device that requires its Net:Node to
  * be set via an ioctl.
  */
-void aarp_send_probe_phase1(struct atalk_iface *iface)
+static void aarp_send_probe_phase1(struct atalk_iface *iface)
 {
 	struct ifreq atreq;
 	struct sockaddr_at *sa = (struct sockaddr_at *)&atreq.ifr_addr;
diff -Nru a/net/appletalk/atalk_proc.c b/net/appletalk/atalk_proc.c
--- a/net/appletalk/atalk_proc.c	2005-01-10 20:11:22 -08:00
+++ b/net/appletalk/atalk_proc.c	2005-01-10 20:11:22 -08:00
@@ -205,21 +205,21 @@
 	return 0;
 }
 
-struct seq_operations atalk_seq_interface_ops = {
+static struct seq_operations atalk_seq_interface_ops = {
 	.start  = atalk_seq_interface_start,
 	.next   = atalk_seq_interface_next,
 	.stop   = atalk_seq_interface_stop,
 	.show   = atalk_seq_interface_show,
 };
 
-struct seq_operations atalk_seq_route_ops = {
+static struct seq_operations atalk_seq_route_ops = {
 	.start  = atalk_seq_route_start,
 	.next   = atalk_seq_route_next,
 	.stop   = atalk_seq_route_stop,
 	.show   = atalk_seq_route_show,
 };
 
-struct seq_operations atalk_seq_socket_ops = {
+static struct seq_operations atalk_seq_socket_ops = {
 	.start  = atalk_seq_socket_start,
 	.next   = atalk_seq_socket_next,
 	.stop   = atalk_seq_socket_stop,
diff -Nru a/net/appletalk/ddp.c b/net/appletalk/ddp.c
--- a/net/appletalk/ddp.c	2005-01-10 20:11:23 -08:00
+++ b/net/appletalk/ddp.c	2005-01-10 20:11:23 -08:00
@@ -612,7 +612,7 @@
  * Called when a device is downed. Just throw away any routes
  * via it.
  */
-void atrtr_device_down(struct net_device *dev)
+static void atrtr_device_down(struct net_device *dev)
 {
 	struct atalk_route **r = &atalk_routes;
 	struct atalk_route *tmp;
@@ -1854,12 +1854,12 @@
 	.notifier_call	= ddp_device_event,
 };
 
-struct packet_type ltalk_packet_type = {
+static struct packet_type ltalk_packet_type = {
 	.type		= __constant_htons(ETH_P_LOCALTALK),
 	.func		= ltalk_rcv,
 };
 
-struct packet_type ppptalk_packet_type = {
+static struct packet_type ppptalk_packet_type = {
 	.type		= __constant_htons(ETH_P_PPPTALK),
 	.func		= atalk_rcv,
 };
diff -Nru a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c
--- a/net/ax25/af_ax25.c	2005-01-10 20:11:22 -08:00
+++ b/net/ax25/af_ax25.c	2005-01-10 20:11:22 -08:00
@@ -755,7 +755,7 @@
 	return res;
 }
 
-int ax25_create(struct socket *sock, int protocol)
+static int ax25_create(struct socket *sock, int protocol)
 {
 	struct sock *sk;
 	ax25_cb *ax25;
diff -Nru a/net/ax25/ax25_addr.c b/net/ax25/ax25_addr.c
--- a/net/ax25/ax25_addr.c	2005-01-10 20:11:23 -08:00
+++ b/net/ax25/ax25_addr.c	2005-01-10 20:11:23 -08:00
@@ -121,26 +121,6 @@
 }
 
 /*
- *	Compare two AX.25 digipeater paths.
- */
-int ax25digicmp(ax25_digi *digi1, ax25_digi *digi2)
-{
-	int i;
-
-	if (digi1->ndigi != digi2->ndigi)
-		return 1;
-
-	if (digi1->lastrepeat != digi2->lastrepeat)
-		return 1;
-
-	for (i = 0; i < digi1->ndigi; i++)
-		if (ax25cmp(&digi1->calls[i], &digi2->calls[i]) != 0)
-			return 1;
-
-	return 0;
-}
-
-/*
  *	Given an AX.25 address pull of to, from, digi list, command/response and the start of data
  *
  */
diff -Nru a/net/ax25/ax25_ds_subr.c b/net/ax25/ax25_ds_subr.c
--- a/net/ax25/ax25_ds_subr.c	2005-01-10 20:11:22 -08:00
+++ b/net/ax25/ax25_ds_subr.c	2005-01-10 20:11:22 -08:00
@@ -174,7 +174,7 @@
 	return res;
 }
 
-void ax25_dev_dama_on(ax25_dev *ax25_dev)
+static void ax25_dev_dama_on(ax25_dev *ax25_dev)
 {
 	if (ax25_dev == NULL)
 		return;
diff -Nru a/net/bridge/netfilter/Kconfig b/net/bridge/netfilter/Kconfig
--- a/net/bridge/netfilter/Kconfig	2005-01-10 20:11:17 -08:00
+++ b/net/bridge/netfilter/Kconfig	2005-01-10 20:11:17 -08:00
@@ -189,8 +189,22 @@
 	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.
+	  This option adds the log watcher, that you can use in any rule
+	  in any ebtables table. It records info about the frame header
+	  to the syslog.
+
+	  To compile it as a module, choose M here.  If unsure, say N.
+
+config BRIDGE_EBT_ULOG
+	tristate "ebt: ulog support"
+	depends on BRIDGE_NF_EBTABLES
+	help
+	  This option adds the ulog watcher, that you can use in any rule
+	  in any ebtables table. The packet is passed to a userspace
+	  logging daemon using netlink multicast sockets. This differs
+	  from the log watcher in the sense that the complete packet is
+	  sent to userspace instead of a descriptive text and that
+	  netlink multicast sockets are used instead of the syslog.
 
 	  To compile it as a module, choose M here.  If unsure, say N.
 
diff -Nru a/net/bridge/netfilter/Makefile b/net/bridge/netfilter/Makefile
--- a/net/bridge/netfilter/Makefile	2005-01-10 20:11:20 -08:00
+++ b/net/bridge/netfilter/Makefile	2005-01-10 20:11:20 -08:00
@@ -29,3 +29,4 @@
 
 # watchers
 obj-$(CONFIG_BRIDGE_EBT_LOG) += ebt_log.o
+obj-$(CONFIG_BRIDGE_EBT_LOG) += ebt_ulog.o
diff -Nru a/net/bridge/netfilter/ebt_log.c b/net/bridge/netfilter/ebt_log.c
--- a/net/bridge/netfilter/ebt_log.c	2005-01-10 20:11:20 -08:00
+++ b/net/bridge/netfilter/ebt_log.c	2005-01-10 20:11:20 -08:00
@@ -55,8 +55,9 @@
 }
 
 #define myNIPQUAD(a) a[0], a[1], a[2], a[3]
-static void ebt_log(const struct sk_buff *skb, const struct net_device *in,
-   const struct net_device *out, const void *data, unsigned int datalen)
+static void ebt_log(const struct sk_buff *skb, unsigned int hooknr,
+   const struct net_device *in, const struct net_device *out,
+   const void *data, unsigned int datalen)
 {
 	struct ebt_log_info *info = (struct ebt_log_info *)data;
 	char level_string[4] = "< >";
diff -Nru a/net/bridge/netfilter/ebt_ulog.c b/net/bridge/netfilter/ebt_ulog.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/net/bridge/netfilter/ebt_ulog.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,295 @@
+/*
+ * netfilter module for userspace bridged Ethernet frames logging daemons
+ *
+ *	Authors:
+ *	Bart De Schuymer <bdschuym@pandora.be>
+ *
+ *  November, 2004
+ *
+ * Based on ipt_ULOG.c, which is
+ * (C) 2000-2002 by Harald Welte <laforge@netfilter.org>
+ *
+ * This module accepts two parameters: 
+ * 
+ * nlbufsiz:
+ *   The parameter specifies how big the buffer for each netlink multicast
+ * group is. e.g. If you say nlbufsiz=8192, up to eight kb of packets will
+ * get accumulated in the kernel until they are sent to userspace. It is
+ * NOT possible to allocate more than 128kB, and it is strongly discouraged,
+ * because atomically allocating 128kB inside the network rx softirq is not
+ * reliable. Please also keep in mind that this buffer size is allocated for
+ * each nlgroup you are using, so the total kernel memory usage increases
+ * by that factor.
+ *
+ * flushtimeout:
+ *   Specify, after how many hundredths of a second the queue should be
+ *   flushed even if it is not full yet.
+ *
+ */
+
+#include <linux/module.h>
+#include <linux/config.h>
+#include <linux/spinlock.h>
+#include <linux/socket.h>
+#include <linux/skbuff.h>
+#include <linux/kernel.h>
+#include <linux/timer.h>
+#include <linux/netlink.h>
+#include <linux/netdevice.h>
+#include <linux/module.h>
+#include <linux/netfilter_bridge/ebtables.h>
+#include <linux/netfilter_bridge/ebt_ulog.h>
+#include <net/sock.h>
+#include "../br_private.h"
+
+#define PRINTR(format, args...) do { if (net_ratelimit()) \
+                                printk(format , ## args); } while (0)
+
+static unsigned int nlbufsiz = 4096;
+module_param(nlbufsiz, uint, 0600);
+MODULE_PARM_DESC(nlbufsiz, "netlink buffer size (number of bytes) "
+                           "(defaults to 4096)");
+
+static unsigned int flushtimeout = 10;
+module_param(flushtimeout, uint, 0600);
+MODULE_PARM_DESC(flushtimeout, "buffer flush timeout (hundredths ofa second) "
+                               "(defaults to 10)");
+
+typedef struct {
+	unsigned int qlen;		/* number of nlmsgs' in the skb */
+	struct nlmsghdr *lastnlh;	/* netlink header of last msg in skb */
+	struct sk_buff *skb;		/* the pre-allocated skb */
+	struct timer_list timer;	/* the timer function */
+	spinlock_t lock;		/* the per-queue lock */
+} ebt_ulog_buff_t;
+
+static ebt_ulog_buff_t ulog_buffers[EBT_ULOG_MAXNLGROUPS];
+static struct sock *ebtulognl;
+
+/* send one ulog_buff_t to userspace */
+static void ulog_send(unsigned int nlgroup)
+{
+	ebt_ulog_buff_t *ub = &ulog_buffers[nlgroup];
+
+	if (timer_pending(&ub->timer))
+		del_timer(&ub->timer);
+
+	/* last nlmsg needs NLMSG_DONE */
+	if (ub->qlen > 1)
+		ub->lastnlh->nlmsg_type = NLMSG_DONE;
+
+	NETLINK_CB(ub->skb).dst_groups = 1 << nlgroup;
+	netlink_broadcast(ebtulognl, ub->skb, 0, 1 << nlgroup, GFP_ATOMIC);
+
+	ub->qlen = 0;
+	ub->skb = NULL;
+}
+
+/* timer function to flush queue in flushtimeout time */
+static void ulog_timer(unsigned long data)
+{
+	spin_lock_bh(&ulog_buffers[data].lock);
+	if (ulog_buffers[data].skb)
+		ulog_send(data);
+	spin_unlock_bh(&ulog_buffers[data].lock);
+}
+
+static struct sk_buff *ulog_alloc_skb(unsigned int size)
+{
+	struct sk_buff *skb;
+
+	skb = alloc_skb(nlbufsiz, GFP_ATOMIC);
+	if (!skb) {
+		PRINTR(KERN_ERR "ebt_ulog: can't alloc whole buffer "
+		       "of size %ub!\n", nlbufsiz);
+		if (size < nlbufsiz) {
+			/* try to allocate only as much as we need for
+			 * current packet */
+			skb = alloc_skb(size, GFP_ATOMIC);
+			if (!skb)
+				PRINTR(KERN_ERR "ebt_ulog: can't even allocate "
+				       "buffer of size %ub\n", size);
+		}
+	}
+
+	return skb;
+}
+
+static void ebt_ulog(const struct sk_buff *skb, unsigned int hooknr,
+   const struct net_device *in, const struct net_device *out,
+   const void *data, unsigned int datalen)
+{
+	ebt_ulog_packet_msg_t *pm;
+	size_t size, copy_len;
+	struct nlmsghdr *nlh;
+	struct ebt_ulog_info *uloginfo = (struct ebt_ulog_info *)data;
+	unsigned int group = uloginfo->nlgroup;
+	ebt_ulog_buff_t *ub = &ulog_buffers[group];
+	spinlock_t *lock = &ub->lock;
+
+	if ((uloginfo->cprange == 0) ||
+	    (uloginfo->cprange > skb->len + ETH_HLEN))
+		copy_len = skb->len + ETH_HLEN;
+	else
+		copy_len = uloginfo->cprange;
+
+	size = NLMSG_SPACE(sizeof(*pm) + copy_len);
+	if (size > nlbufsiz) {
+		PRINTR("ebt_ulog: Size %d needed, but nlbufsiz=%d\n",
+		       size, nlbufsiz);
+		return;
+	}
+
+	spin_lock_bh(lock);
+
+	if (!ub->skb) {
+		if (!(ub->skb = ulog_alloc_skb(size)))
+			goto alloc_failure;
+	} else if (size > skb_tailroom(ub->skb)) {
+		ulog_send(group);
+
+		if (!(ub->skb = ulog_alloc_skb(size)))
+			goto alloc_failure;
+	}
+
+	nlh = NLMSG_PUT(ub->skb, 0, ub->qlen, 0,
+	                size - NLMSG_ALIGN(sizeof(*nlh)));
+	ub->qlen++;
+
+	pm = NLMSG_DATA(nlh);
+
+	/* Fill in the ulog data */
+	pm->version = EBT_ULOG_VERSION;
+	do_gettimeofday(&pm->stamp);
+	if (ub->qlen == 1)
+		ub->skb->stamp = pm->stamp;
+	pm->data_len = copy_len;
+	pm->mark = skb->nfmark;
+	pm->hook = hooknr;
+	if (uloginfo->prefix != NULL)
+		strcpy(pm->prefix, uloginfo->prefix);
+	else
+		*(pm->prefix) = '\0';
+
+	if (in) {
+		strcpy(pm->physindev, in->name);
+		/* If in isn't a bridge, then physindev==indev */
+		if (in->br_port)
+			strcpy(pm->indev, in->br_port->br->dev->name);
+		else
+			strcpy(pm->indev, in->name);
+	} else
+		pm->indev[0] = pm->physindev[0] = '\0';
+
+	if (out) {
+		/* If out exists, then out is a bridge port */
+		strcpy(pm->physoutdev, out->name);
+		strcpy(pm->outdev, out->br_port->br->dev->name);
+	} else
+		pm->outdev[0] = pm->physoutdev[0] = '\0';
+
+	if (skb_copy_bits(skb, -ETH_HLEN, pm->data, copy_len) < 0)
+		BUG();
+
+	if (ub->qlen > 1)
+		ub->lastnlh->nlmsg_flags |= NLM_F_MULTI;
+
+	ub->lastnlh = nlh;
+
+	if (ub->qlen >= uloginfo->qthreshold)
+		ulog_send(group);
+	else if (!timer_pending(&ub->timer)) {
+		ub->timer.expires = jiffies + flushtimeout * HZ / 100;
+		add_timer(&ub->timer);
+	}
+
+unlock:
+	spin_unlock_bh(lock);
+
+	return;
+
+nlmsg_failure:
+	printk(KERN_CRIT "ebt_ulog: error during NLMSG_PUT. This should "
+	       "not happen, please report to author.\n");
+	goto unlock;
+alloc_failure:
+	goto unlock;
+}
+
+static int ebt_ulog_check(const char *tablename, unsigned int hookmask,
+   const struct ebt_entry *e, void *data, unsigned int datalen)
+{
+	struct ebt_ulog_info *uloginfo = (struct ebt_ulog_info *)data;
+
+	if (datalen != EBT_ALIGN(sizeof(struct ebt_ulog_info)) ||
+	    uloginfo->nlgroup > 31)
+		return -EINVAL;
+
+	uloginfo->prefix[EBT_ULOG_PREFIX_LEN - 1] = '\0';
+
+	if (uloginfo->qthreshold > EBT_ULOG_MAX_QLEN)
+		uloginfo->qthreshold = EBT_ULOG_MAX_QLEN;
+
+	return 0;
+}
+
+static struct ebt_watcher ulog = {
+	.name		= EBT_ULOG_WATCHER,
+	.watcher	= ebt_ulog,
+	.check		= ebt_ulog_check,
+	.me		= THIS_MODULE,
+};
+
+static int __init init(void)
+{
+	int i, ret = 0;
+
+	if (nlbufsiz >= 128*1024) {
+		printk(KERN_NOTICE "ebt_ulog: Netlink buffer has to be <= 128kB,"
+		       " please try a smaller nlbufsiz parameter.\n");
+		return -EINVAL;
+	}
+
+	/* initialize ulog_buffers */
+	for (i = 0; i < EBT_ULOG_MAXNLGROUPS; i++) {
+		init_timer(&ulog_buffers[i].timer);
+		ulog_buffers[i].timer.function = ulog_timer;
+		ulog_buffers[i].timer.data = i;
+		ulog_buffers[i].lock = SPIN_LOCK_UNLOCKED;
+	}
+
+	ebtulognl = netlink_kernel_create(NETLINK_NFLOG, NULL);
+	if (!ebtulognl)
+		ret = -ENOMEM;
+	else if ((ret = ebt_register_watcher(&ulog)))
+		sock_release(ebtulognl->sk_socket);
+
+	return ret;
+}
+
+static void __exit fini(void)
+{
+	ebt_ulog_buff_t *ub;
+	int i;
+
+	ebt_unregister_watcher(&ulog);
+	for (i = 0; i < EBT_ULOG_MAXNLGROUPS; i++) {
+		ub = &ulog_buffers[i];
+		if (timer_pending(&ub->timer))
+			del_timer(&ub->timer);
+		spin_lock_bh(&ub->lock);
+		if (ub->skb) {
+			kfree_skb(ub->skb);
+			ub->skb = NULL;
+		}
+		spin_unlock_bh(&ub->lock);
+	}
+	sock_release(ebtulognl->sk_socket);
+}
+
+module_init(init);
+module_exit(fini);
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Bart De Schuymer <bdschuym@pandora.be>");
+MODULE_DESCRIPTION("ebtables userspace logging module for bridged Ethernet"
+                   " frames");
diff -Nru a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c
--- a/net/bridge/netfilter/ebtables.c	2005-01-10 20:11:18 -08:00
+++ b/net/bridge/netfilter/ebtables.c	2005-01-10 20:11:18 -08:00
@@ -90,10 +90,10 @@
 { {NULL, NULL}, EBT_STANDARD_TARGET, NULL, NULL, NULL, NULL};
 
 static inline int ebt_do_watcher (struct ebt_entry_watcher *w,
-   const struct sk_buff *skb, const struct net_device *in,
+   const struct sk_buff *skb, unsigned int hooknr, const struct net_device *in,
    const struct net_device *out)
 {
-	w->u.watcher->watcher(skb, in, out, w->data,
+	w->u.watcher->watcher(skb, hooknr, in, out, w->data,
 	   w->watcher_size);
 	/* watchers don't give a verdict */
 	return 0;
@@ -208,7 +208,7 @@
 
 		/* these should only watch: not modify, nor tell us
 		   what to do with the packet */
-		EBT_WATCHER_ITERATE(point, ebt_do_watcher, *pskb, in,
+		EBT_WATCHER_ITERATE(point, ebt_do_watcher, *pskb, hook, in,
 		   out);
 
 		t = (struct ebt_entry_target *)
diff -Nru a/net/core/dev.c b/net/core/dev.c
--- a/net/core/dev.c	2005-01-10 20:11:19 -08:00
+++ b/net/core/dev.c	2005-01-10 20:11:19 -08:00
@@ -1119,7 +1119,7 @@
 		return 0;
 
 	for (i = 0; i < skb_shinfo(skb)->nr_frags; i++)
-		if (skb_shinfo(skb)->frags[i].page >= highmem_start_page)
+		if (PageHighMem(skb_shinfo(skb)->frags[i].page))
 			return 1;
 
 	return 0;
@@ -1486,7 +1486,7 @@
 
 	preempt_disable();
 	err = netif_rx(skb);
-	if (softirq_pending(smp_processor_id()))
+	if (local_softirq_pending())
 		do_softirq();
 	preempt_enable();
 
@@ -2693,8 +2693,7 @@
  *	chain. 0 is returned on success. A negative errno code is returned
  *	on a failure to set up the device, or if the name is a duplicate.
  *
- *	Callers must hold the rtnl semaphore.  See the comment at the
- *	end of Space.c for details about the locking.  You may want
+ *	Callers must hold the rtnl semaphore. You may want
  *	register_netdev() instead of this.
  *
  *	BUGS:
@@ -2815,6 +2814,51 @@
 	goto out;
 }
 
+/**
+ *	register_netdev	- register a network device
+ *	@dev: device to register
+ *
+ *	Take a completed network device structure and add it to the kernel
+ *	interfaces. A %NETDEV_REGISTER message is sent to the netdev notifier
+ *	chain. 0 is returned on success. A negative errno code is returned
+ *	on a failure to set up the device, or if the name is a duplicate.
+ *
+ *	This is a wrapper around register_netdev that takes the rtnl semaphore
+ *	and expands the device name if you passed a format string to
+ *	alloc_netdev.
+ */
+int register_netdev(struct net_device *dev)
+{
+	int err;
+
+	rtnl_lock();
+
+	/*
+	 * If the name is a format string the caller wants us to do a
+	 * name allocation.
+	 */
+	if (strchr(dev->name, '%')) {
+		err = dev_alloc_name(dev, dev->name);
+		if (err < 0)
+			goto out;
+	}
+	
+	/*
+	 * Back compatibility hook. Kill this one in 2.5
+	 */
+	if (dev->name[0] == 0 || dev->name[0] == ' ') {
+		err = dev_alloc_name(dev, "eth%d");
+		if (err < 0)
+			goto out;
+	}
+
+	err = register_netdevice(dev);
+out:
+	rtnl_unlock();
+	return err;
+}
+EXPORT_SYMBOL(register_netdev);
+
 /*
  * netdev_wait_allrefs - wait until all references are gone.
  *
@@ -2958,6 +3002,46 @@
 }
 
 /**
+ *	alloc_netdev - allocate network device
+ *	@sizeof_priv:	size of private data to allocate space for
+ *	@name:		device name format string
+ *	@setup:		callback to initialize device
+ *
+ *	Allocates a struct net_device with private data area for driver use
+ *	and performs basic initialization.
+ */
+struct net_device *alloc_netdev(int sizeof_priv, const char *name,
+		void (*setup)(struct net_device *))
+{
+	void *p;
+	struct net_device *dev;
+	int alloc_size;
+
+	/* ensure 32-byte alignment of both the device and private area */
+	alloc_size = (sizeof(*dev) + NETDEV_ALIGN_CONST) & ~NETDEV_ALIGN_CONST;
+	alloc_size += sizeof_priv + NETDEV_ALIGN_CONST;
+
+	p = kmalloc(alloc_size, GFP_KERNEL);
+	if (!p) {
+		printk(KERN_ERR "alloc_dev: Unable to allocate device.\n");
+		return NULL;
+	}
+	memset(p, 0, alloc_size);
+
+	dev = (struct net_device *)
+		(((long)p + NETDEV_ALIGN_CONST) & ~NETDEV_ALIGN_CONST);
+	dev->padded = (char *)dev - (char *)p;
+
+	if (sizeof_priv)
+		dev->priv = netdev_priv(dev);
+
+	setup(dev);
+	strcpy(dev->name, name);
+	return dev;
+}
+EXPORT_SYMBOL(alloc_netdev);
+
+/**
  *	free_netdev - free network device
  *	@dev: device
  *
@@ -2999,8 +3083,7 @@
  *	from the kernel tables. On success 0 is returned, on a failure
  *	a negative errno code is returned.
  *
- *	Callers must hold the rtnl semaphore.  See the comment at the
- *	end of Space.c for details about the locking.  You may want
+ *	Callers must hold the rtnl semaphore.  You may want
  *	unregister_netdev() instead of this.
  */
 
@@ -3077,6 +3160,27 @@
 	dev_put(dev);
 	return 0;
 }
+
+/**
+ *	unregister_netdev - remove device from the kernel
+ *	@dev: device
+ *
+ *	This function shuts down a device interface and removes it
+ *	from the kernel tables. On success 0 is returned, on a failure
+ *	a negative errno code is returned.
+ *
+ *	This is just a wrapper for unregister_netdevice that takes
+ *	the rtnl semaphore.  In general you want to use this and not
+ *	unregister_netdevice.
+ */
+void unregister_netdev(struct net_device *dev)
+{
+	rtnl_lock();
+	unregister_netdevice(dev);
+	rtnl_unlock();
+}
+
+EXPORT_SYMBOL(unregister_netdev);
 
 #ifdef CONFIG_HOTPLUG_CPU
 static int dev_cpu_callback(struct notifier_block *nfb,
diff -Nru a/net/core/rtnetlink.c b/net/core/rtnetlink.c
--- a/net/core/rtnetlink.c	2005-01-10 20:11:23 -08:00
+++ b/net/core/rtnetlink.c	2005-01-10 20:11:23 -08:00
@@ -267,7 +267,22 @@
 	struct net_device *dev;
 	int err, send_addr_notify = 0;
 
-	dev = dev_get_by_index(ifm->ifi_index);
+	if (ifm->ifi_index >= 0)
+		dev = dev_get_by_index(ifm->ifi_index);
+	else if (ida[IFLA_IFNAME - 1]) {
+		char ifname[IFNAMSIZ];
+
+		if (RTA_PAYLOAD(ida[IFLA_IFNAME - 1]) > RTA_ALIGN(sizeof(ifname)))
+			return -EINVAL;
+
+		memset(ifname, 0, sizeof(ifname));
+		memcpy(ifname, RTA_DATA(ida[IFLA_IFNAME - 1]),
+			RTA_PAYLOAD(ida[IFLA_IFNAME - 1]));
+		ifname[IFNAMSIZ - 1] = '\0';
+		dev = dev_get_by_name(ifname);
+	} else
+		return -EINVAL;
+
 	if (!dev)
 		return -ENODEV;
 
@@ -358,10 +373,10 @@
 		dev->weight = *((u32 *) RTA_DATA(ida[IFLA_WEIGHT - 1]));
 	}
 
-	if (ida[IFLA_IFNAME - 1]) {
+	if (ifm->ifi_index >= 0 && ida[IFLA_IFNAME - 1]) {
 		char ifname[IFNAMSIZ];
 
-		if (ida[IFLA_IFNAME - 1]->rta_len > RTA_LENGTH(sizeof(ifname)))
+		if (RTA_PAYLOAD(ida[IFLA_IFNAME - 1]) > RTA_ALIGN(sizeof(ifname)))
 			goto out;
 
 		memset(ifname, 0, sizeof(ifname));
diff -Nru a/net/core/skbuff.c b/net/core/skbuff.c
--- a/net/core/skbuff.c	2005-01-10 20:11:21 -08:00
+++ b/net/core/skbuff.c	2005-01-10 20:11:21 -08:00
@@ -163,6 +163,59 @@
 	goto out;
 }
 
+/**
+ *	alloc_skb_from_cache	-	allocate a network buffer
+ *	@cp: kmem_cache from which to allocate the data area
+ *           (object size must be big enough for @size bytes + skb overheads)
+ *	@size: size to allocate
+ *	@gfp_mask: allocation mask
+ *
+ *	Allocate a new &sk_buff. The returned buffer has no headroom and
+ *	tail room of size bytes. The object has a reference count of one.
+ *	The return is the buffer. On a failure the return is %NULL.
+ *
+ *	Buffers may only be allocated from interrupts using a @gfp_mask of
+ *	%GFP_ATOMIC.
+ */
+struct sk_buff *alloc_skb_from_cache(kmem_cache_t *cp,
+				     unsigned int size, int gfp_mask)
+{
+	struct sk_buff *skb;
+	u8 *data;
+
+	/* Get the HEAD */
+	skb = kmem_cache_alloc(skbuff_head_cache,
+			       gfp_mask & ~__GFP_DMA);
+	if (!skb)
+		goto out;
+
+	/* Get the DATA. */
+	size = SKB_DATA_ALIGN(size);
+	data = kmem_cache_alloc(cp, gfp_mask);
+	if (!data)
+		goto nodata;
+
+	memset(skb, 0, offsetof(struct sk_buff, truesize));
+	skb->truesize = size + sizeof(struct sk_buff);
+	atomic_set(&skb->users, 1);
+	skb->head = data;
+	skb->data = data;
+	skb->tail = data;
+	skb->end  = data + size;
+
+	atomic_set(&(skb_shinfo(skb)->dataref), 1);
+	skb_shinfo(skb)->nr_frags  = 0;
+	skb_shinfo(skb)->tso_size = 0;
+	skb_shinfo(skb)->tso_segs = 0;
+	skb_shinfo(skb)->frag_list = NULL;
+out:
+	return skb;
+nodata:
+	kmem_cache_free(skbuff_head_cache, skb);
+	skb = NULL;
+	goto out;
+}
+
 
 static void skb_drop_fraglist(struct sk_buff *skb)
 {
diff -Nru a/net/core/sock.c b/net/core/sock.c
--- a/net/core/sock.c	2005-01-10 20:11:21 -08:00
+++ b/net/core/sock.c	2005-01-10 20:11:21 -08:00
@@ -942,6 +942,15 @@
 
 			skb->next = NULL;
 			sk->sk_backlog_rcv(sk, skb);
+
+			/*
+			 * We are in process context here with softirqs
+			 * disabled, use cond_resched_softirq() to preempt.
+			 * This is safe to do because we've taken the backlog
+			 * queue private:
+			 */
+			cond_resched_softirq();
+
 			skb = next;
 		} while (skb != NULL);
 
diff -Nru a/net/ethernet/eth.c b/net/ethernet/eth.c
--- a/net/ethernet/eth.c	2005-01-10 20:11:19 -08:00
+++ b/net/ethernet/eth.c	2005-01-10 20:11:19 -08:00
@@ -208,7 +208,7 @@
 	return htons(ETH_P_802_2);
 }
 
-int eth_header_parse(struct sk_buff *skb, unsigned char *haddr)
+static int eth_header_parse(struct sk_buff *skb, unsigned char *haddr)
 {
 	struct ethhdr *eth = eth_hdr(skb);
 	memcpy(haddr, eth->h_source, ETH_ALEN);
diff -Nru a/net/ipv4/Kconfig b/net/ipv4/Kconfig
--- a/net/ipv4/Kconfig	2005-01-10 20:11:21 -08:00
+++ b/net/ipv4/Kconfig	2005-01-10 20:11:21 -08:00
@@ -355,7 +355,10 @@
 	default y
 	---help---
 	  Support for TCP socket monitoring interface used by native Linux
-	  tools such as ss.
+	  tools such as ss. ss is included in iproute2, currently downloadable
+	  at <http://developer.osdl.org/dev/iproute2>. If you want IPv6 support
+	  and have selected IPv6 as a module, you need to build this as a
+	  module too.
 	  
 	  If unsure, say Y.
 
diff -Nru a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
--- a/net/ipv4/af_inet.c	2005-01-10 20:11:16 -08:00
+++ b/net/ipv4/af_inet.c	2005-01-10 20:11:16 -08:00
@@ -131,7 +131,7 @@
 
 void inet_sock_destruct(struct sock *sk)
 {
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 
 	__skb_queue_purge(&sk->sk_receive_queue);
 	__skb_queue_purge(&sk->sk_error_queue);
@@ -173,7 +173,7 @@
 
 static int inet_autobind(struct sock *sk)
 {
-	struct inet_opt *inet;
+	struct inet_sock *inet;
 	/* We may need to bind the socket. */
 	lock_sock(sk);
 	inet = inet_sk(sk);
@@ -232,7 +232,7 @@
 	struct sock *sk;
 	struct list_head *p;
 	struct inet_protosw *answer;
-	struct inet_opt *inet;
+	struct inet_sock *inet;
 	struct proto *answer_prot;
 	unsigned char answer_flags;
 	char answer_no_check;
@@ -389,7 +389,7 @@
 {
 	struct sockaddr_in *addr = (struct sockaddr_in *)uaddr;
 	struct sock *sk = sock->sk;
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	unsigned short snum;
 	int chk_addr_ret;
 	int err;
@@ -623,7 +623,7 @@
 			int *uaddr_len, int peer)
 {
 	struct sock *sk		= sock->sk;
-	struct inet_opt *inet	= inet_sk(sk);
+	struct inet_sock *inet	= inet_sk(sk);
 	struct sockaddr_in *sin	= (struct sockaddr_in *)uaddr;
 
 	sin->sin_family = AF_INET;
@@ -659,7 +659,7 @@
 }
 
 
-ssize_t inet_sendpage(struct socket *sock, struct page *page, int offset, size_t size, int flags)
+static ssize_t inet_sendpage(struct socket *sock, struct page *page, int offset, size_t size, int flags)
 {
 	struct sock *sk = sock->sk;
 
@@ -1011,7 +1011,7 @@
 	return 0;
 }
 
-int ipv4_proc_init(void);
+static int ipv4_proc_init(void);
 extern void ipfrag_init(void);
 
 static int __init inet_init(void)
@@ -1136,7 +1136,7 @@
 extern int  udp4_proc_init(void);
 extern void udp4_proc_exit(void);
 
-int __init ipv4_proc_init(void)
+static int __init ipv4_proc_init(void)
 {
 	int rc = 0;
 
@@ -1166,7 +1166,7 @@
 }
 
 #else /* CONFIG_PROC_FS */
-int __init ipv4_proc_init(void)
+static int __init ipv4_proc_init(void)
 {
 	return 0;
 }
diff -Nru a/net/ipv4/arp.c b/net/ipv4/arp.c
--- a/net/ipv4/arp.c	2005-01-10 20:11:22 -08:00
+++ b/net/ipv4/arp.c	2005-01-10 20:11:22 -08:00
@@ -213,6 +213,9 @@
 	case ARPHRD_IEEE802_TR:
 		ip_tr_mc_map(addr, haddr);
 		return 0;
+	case ARPHRD_INFINIBAND:
+		ip_ib_mc_map(addr, haddr);
+		return 0;
 	default:
 		if (dir) {
 			memcpy(haddr, dev->broadcast, dev->addr_len);
@@ -704,7 +707,7 @@
  *	Process an arp request.
  */
 
-int arp_process(struct sk_buff *skb)
+static int arp_process(struct sk_buff *skb)
 {
 	struct net_device *dev = skb->dev;
 	struct in_device *in_dev = in_dev_get(dev);
@@ -961,7 +964,7 @@
  *	Set (create) an ARP cache entry.
  */
 
-int arp_req_set(struct arpreq *r, struct net_device * dev)
+static int arp_req_set(struct arpreq *r, struct net_device * dev)
 {
 	u32 ip = ((struct sockaddr_in *) &r->arp_pa)->sin_addr.s_addr;
 	struct neighbour *neigh;
@@ -1075,7 +1078,7 @@
 	return err;
 }
 
-int arp_req_delete(struct arpreq *r, struct net_device * dev)
+static int arp_req_delete(struct arpreq *r, struct net_device * dev)
 {
 	int err;
 	u32 ip = ((struct sockaddr_in *)&r->arp_pa)->sin_addr.s_addr;
@@ -1207,7 +1210,7 @@
 	return NOTIFY_DONE;
 }
 
-struct notifier_block arp_netdev_notifier = {
+static struct notifier_block arp_netdev_notifier = {
 	.notifier_call = arp_netdev_event,
 };
 
diff -Nru a/net/ipv4/datagram.c b/net/ipv4/datagram.c
--- a/net/ipv4/datagram.c	2005-01-10 20:11:15 -08:00
+++ b/net/ipv4/datagram.c	2005-01-10 20:11:15 -08:00
@@ -22,7 +22,7 @@
 
 int ip4_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len)
 {
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	struct sockaddr_in *usin = (struct sockaddr_in *) uaddr;
 	struct rtable *rt;
 	u32 saddr;
diff -Nru a/net/ipv4/devinet.c b/net/ipv4/devinet.c
--- a/net/ipv4/devinet.c	2005-01-10 20:11:17 -08:00
+++ b/net/ipv4/devinet.c	2005-01-10 20:11:17 -08:00
@@ -380,7 +380,7 @@
 	return NULL;
 }
 
-int inet_rtm_deladdr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
+static int inet_rtm_deladdr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
 {
 	struct rtattr **rta = arg;
 	struct in_device *in_dev;
@@ -412,7 +412,7 @@
 	return -EADDRNOTAVAIL;
 }
 
-int inet_rtm_newaddr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
+static int inet_rtm_newaddr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
 {
 	struct rtattr **rta = arg;
 	struct net_device *dev;
diff -Nru a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c
--- a/net/ipv4/fib_frontend.c	2005-01-10 20:11:23 -08:00
+++ b/net/ipv4/fib_frontend.c	2005-01-10 20:11:23 -08:00
@@ -75,7 +75,7 @@
 #endif /* CONFIG_IP_MULTIPLE_TABLES */
 
 
-void fib_flush(void)
+static void fib_flush(void)
 {
 	int flushed = 0;
 #ifdef CONFIG_IP_MULTIPLE_TABLES
@@ -585,11 +585,11 @@
 	return NOTIFY_DONE;
 }
 
-struct notifier_block fib_inetaddr_notifier = {
+static struct notifier_block fib_inetaddr_notifier = {
 	.notifier_call =fib_inetaddr_event,
 };
 
-struct notifier_block fib_netdev_notifier = {
+static struct notifier_block fib_netdev_notifier = {
 	.notifier_call =fib_netdev_event,
 };
 
diff -Nru a/net/ipv4/fib_hash.c b/net/ipv4/fib_hash.c
--- a/net/ipv4/fib_hash.c	2005-01-10 20:11:19 -08:00
+++ b/net/ipv4/fib_hash.c	2005-01-10 20:11:19 -08:00
@@ -274,29 +274,6 @@
 
 static int fn_hash_last_dflt=-1;
 
-static int fib_detect_death(struct fib_info *fi, int order,
-			    struct fib_info **last_resort, int *last_idx)
-{
-	struct neighbour *n;
-	int state = NUD_NONE;
-
-	n = neigh_lookup(&arp_tbl, &fi->fib_nh[0].nh_gw, fi->fib_dev);
-	if (n) {
-		state = n->nud_state;
-		neigh_release(n);
-	}
-	if (state==NUD_REACHABLE)
-		return 0;
-	if ((state&NUD_VALID) && order != fn_hash_last_dflt)
-		return 0;
-	if ((state&NUD_VALID) ||
-	    (*last_idx<0 && order > fn_hash_last_dflt)) {
-		*last_resort = fi;
-		*last_idx = order;
-	}
-	return 1;
-}
-
 static void
 fn_hash_select_default(struct fib_table *tb, const struct flowi *flp, struct fib_result *res)
 {
@@ -337,7 +314,7 @@
 				if (next_fi != res->fi)
 					break;
 			} else if (!fib_detect_death(fi, order, &last_resort,
-						     &last_idx)) {
+						     &last_idx, &fn_hash_last_dflt)) {
 				if (res->fi)
 					fib_info_put(res->fi);
 				res->fi = fi;
@@ -355,7 +332,7 @@
 		goto out;
 	}
 
-	if (!fib_detect_death(fi, order, &last_resort, &last_idx)) {
+	if (!fib_detect_death(fi, order, &last_resort, &last_idx, &fn_hash_last_dflt)) {
 		if (res->fi)
 			fib_info_put(res->fi);
 		res->fi = fi;
@@ -376,11 +353,6 @@
 	read_unlock(&fib_hash_lock);
 }
 
-static void rtmsg_fib(int, struct fib_node *, struct fib_alias *,
-		      int, int,
-		      struct nlmsghdr *n,
-		      struct netlink_skb_parms *);
-
 /* Insert node F to FZ. */
 static inline void fib_insert_node(struct fn_zone *fz, struct fib_node *f)
 {
@@ -404,26 +376,6 @@
 	return NULL;
 }
 
-/* Return the first fib alias matching TOS with
- * priority less than or equal to PRIO.
- */
-static struct fib_alias *fib_find_alias(struct fib_node *fn, u8 tos, u32 prio)
-{
-	if (fn) {
-		struct list_head *head = &fn->fn_alias;
-		struct fib_alias *fa;
-
-		list_for_each_entry(fa, head, fa_list) {
-			if (fa->fa_tos > tos)
-				continue;
-			if (fa->fa_info->fib_priority >= prio ||
-			    fa->fa_tos < tos)
-				return fa;
-		}
-	}
-	return NULL;
-}
-
 static int
 fn_hash_insert(struct fib_table *tb, struct rtmsg *r, struct kern_rta *rta,
 	       struct nlmsghdr *n, struct netlink_skb_parms *req)
@@ -463,7 +415,11 @@
 		fn_rehash_zone(fz);
 
 	f = fib_find_node(fz, key);
-	fa = fib_find_alias(f, tos, fi->fib_priority);
+
+	if (!f)
+		fa = NULL;
+	else
+		fa = fib_find_alias(&f->fn_alias, tos, fi->fib_priority);
 
 	/* Now fa, if non-NULL, points to the first fib alias
 	 * with the same keys [prefix,tos,priority], if such key already
@@ -565,7 +521,7 @@
 		fz->fz_nent++;
 	rt_cache_flush(-1);
 
-	rtmsg_fib(RTM_NEWROUTE, f, new_fa, z, tb->tb_id, n, req);
+	rtmsg_fib(RTM_NEWROUTE, key, new_fa, z, tb->tb_id, n, req);
 	return 0;
 
 out_free_new_fa:
@@ -603,7 +559,11 @@
 	}
 
 	f = fib_find_node(fz, key);
-	fa = fib_find_alias(f, tos, 0);
+
+	if (!f)
+		fa = NULL;
+	else
+		fa = fib_find_alias(&f->fn_alias, tos, 0);
 	if (!fa)
 		return -ESRCH;
 
@@ -631,7 +591,7 @@
 		int kill_fn;
 
 		fa = fa_to_delete;
-		rtmsg_fib(RTM_DELROUTE, f, fa, z, tb->tb_id, n, req);
+		rtmsg_fib(RTM_DELROUTE, key, fa, z, tb->tb_id, n, req);
 
 		kill_fn = 0;
 		write_lock_bh(&fib_hash_lock);
@@ -794,33 +754,6 @@
 	read_unlock(&fib_hash_lock);
 	cb->args[1] = m;
 	return skb->len;
-}
-
-static void rtmsg_fib(int event, struct fib_node *f, struct fib_alias *fa,
-		      int z, int tb_id,
-		      struct nlmsghdr *n, struct netlink_skb_parms *req)
-{
-	struct sk_buff *skb;
-	u32 pid = req ? req->pid : 0;
-	int size = NLMSG_SPACE(sizeof(struct rtmsg)+256);
-
-	skb = alloc_skb(size, GFP_KERNEL);
-	if (!skb)
-		return;
-
-	if (fib_dump_info(skb, pid, n->nlmsg_seq, event, tb_id,
-			  fa->fa_type, fa->fa_scope, &f->fn_key, z,
-			  fa->fa_tos,
-			  fa->fa_info) < 0) {
-		kfree_skb(skb);
-		return;
-	}
-	NETLINK_CB(skb).dst_groups = RTMGRP_IPV4_ROUTE;
-	if (n->nlmsg_flags&NLM_F_ECHO)
-		atomic_inc(&skb->users);
-	netlink_broadcast(rtnl, skb, pid, RTMGRP_IPV4_ROUTE, GFP_KERNEL);
-	if (n->nlmsg_flags&NLM_F_ECHO)
-		netlink_unicast(rtnl, skb, pid, MSG_DONTWAIT);
 }
 
 #ifdef CONFIG_IP_MULTIPLE_TABLES
diff -Nru a/net/ipv4/fib_lookup.h b/net/ipv4/fib_lookup.h
--- a/net/ipv4/fib_lookup.h	2005-01-10 20:11:18 -08:00
+++ b/net/ipv4/fib_lookup.h	2005-01-10 20:11:18 -08:00
@@ -30,5 +30,13 @@
 extern int fib_dump_info(struct sk_buff *skb, u32 pid, u32 seq, int event,
 			 u8 tb_id, u8 type, u8 scope, void *dst,
 			 int dst_len, u8 tos, struct fib_info *fi);
+extern void rtmsg_fib(int event, u32 key, struct fib_alias *fa,
+		      int z, int tb_id,
+		      struct nlmsghdr *n, struct netlink_skb_parms *req);
+extern struct fib_alias *fib_find_alias(struct list_head *fah,
+					u8 tos, u32 prio);
+extern int fib_detect_death(struct fib_info *fi, int order,
+			    struct fib_info **last_resort,
+			    int *last_idx, int *dflt);
 
 #endif /* _FIB_LOOKUP_H */
diff -Nru a/net/ipv4/fib_rules.c b/net/ipv4/fib_rules.c
--- a/net/ipv4/fib_rules.c	2005-01-10 20:11:19 -08:00
+++ b/net/ipv4/fib_rules.c	2005-01-10 20:11:19 -08:00
@@ -245,12 +245,6 @@
 	return 0;
 }
 
-u32 fib_rules_map_destination(u32 daddr, struct fib_result *res)
-{
-	u32 mask = inet_make_mask(res->prefixlen);
-	return (daddr&~mask)|res->fi->fib_nh->nh_gw;
-}
-
 #ifdef CONFIG_NET_CLS_ROUTE
 u32 fib_rules_tclass(struct fib_result *res)
 {
@@ -368,7 +362,7 @@
 }
 
 
-struct notifier_block fib_rules_notifier = {
+static struct notifier_block fib_rules_notifier = {
 	.notifier_call =fib_rules_event,
 };
 
diff -Nru a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c
--- a/net/ipv4/fib_semantics.c	2005-01-10 20:11:16 -08:00
+++ b/net/ipv4/fib_semantics.c	2005-01-10 20:11:16 -08:00
@@ -270,6 +270,74 @@
 	return -1;
 }
 
+void rtmsg_fib(int event, u32 key, struct fib_alias *fa,
+	       int z, int tb_id,
+	       struct nlmsghdr *n, struct netlink_skb_parms *req)
+{
+	struct sk_buff *skb;
+	u32 pid = req ? req->pid : 0;
+	int size = NLMSG_SPACE(sizeof(struct rtmsg)+256);
+
+	skb = alloc_skb(size, GFP_KERNEL);
+	if (!skb)
+		return;
+
+	if (fib_dump_info(skb, pid, n->nlmsg_seq, event, tb_id,
+			  fa->fa_type, fa->fa_scope, &key, z,
+			  fa->fa_tos,
+			  fa->fa_info) < 0) {
+		kfree_skb(skb);
+		return;
+	}
+	NETLINK_CB(skb).dst_groups = RTMGRP_IPV4_ROUTE;
+	if (n->nlmsg_flags&NLM_F_ECHO)
+		atomic_inc(&skb->users);
+	netlink_broadcast(rtnl, skb, pid, RTMGRP_IPV4_ROUTE, GFP_KERNEL);
+	if (n->nlmsg_flags&NLM_F_ECHO)
+		netlink_unicast(rtnl, skb, pid, MSG_DONTWAIT);
+}
+
+/* Return the first fib alias matching TOS with
+ * priority less than or equal to PRIO.
+ */
+struct fib_alias *fib_find_alias(struct list_head *fah, u8 tos, u32 prio)
+{
+	if (fah) {
+		struct fib_alias *fa;
+		list_for_each_entry(fa, fah, fa_list) {
+			if (fa->fa_tos > tos)
+				continue;
+			if (fa->fa_info->fib_priority >= prio ||
+			    fa->fa_tos < tos)
+				return fa;
+		}
+	}
+	return NULL;
+}
+
+int fib_detect_death(struct fib_info *fi, int order,
+		     struct fib_info **last_resort, int *last_idx, int *dflt)
+{
+	struct neighbour *n;
+	int state = NUD_NONE;
+
+	n = neigh_lookup(&arp_tbl, &fi->fib_nh[0].nh_gw, fi->fib_dev);
+	if (n) {
+		state = n->nud_state;
+		neigh_release(n);
+	}
+	if (state==NUD_REACHABLE)
+		return 0;
+	if ((state&NUD_VALID) && order != *dflt)
+		return 0;
+	if ((state&NUD_VALID) ||
+	    (*last_idx<0 && order > *dflt)) {
+		*last_resort = fi;
+		*last_idx = order;
+	}
+	return 1;
+}
+
 #ifdef CONFIG_IP_ROUTE_MULTIPATH
 
 static u32 fib_get_attr32(struct rtattr *attr, int attrlen, int type)
diff -Nru a/net/ipv4/icmp.c b/net/ipv4/icmp.c
--- a/net/ipv4/icmp.c	2005-01-10 20:11:22 -08:00
+++ b/net/ipv4/icmp.c	2005-01-10 20:11:22 -08:00
@@ -327,8 +327,8 @@
  *	Checksum each fragment, and on the first include the headers and final
  *	checksum.
  */
-int icmp_glue_bits(void *from, char *to, int offset, int len, int odd,
-		   struct sk_buff *skb)
+static int icmp_glue_bits(void *from, char *to, int offset, int len, int odd,
+			  struct sk_buff *skb)
 {
 	struct icmp_bxm *icmp_param = (struct icmp_bxm *)from;
 	unsigned int csum;
@@ -377,7 +377,7 @@
 static void icmp_reply(struct icmp_bxm *icmp_param, struct sk_buff *skb)
 {
 	struct sock *sk = icmp_socket->sk;
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	struct ipcm_cookie ipc;
 	struct rtable *rt = (struct rtable *)skb->dst;
 	u32 daddr;
@@ -1097,7 +1097,7 @@
 
 void __init icmp_init(struct net_proto_family *ops)
 {
-	struct inet_opt *inet;
+	struct inet_sock *inet;
 	int i;
 
 	for (i = 0; i < NR_CPUS; i++) {
diff -Nru a/net/ipv4/igmp.c b/net/ipv4/igmp.c
--- a/net/ipv4/igmp.c	2005-01-10 20:11:23 -08:00
+++ b/net/ipv4/igmp.c	2005-01-10 20:11:23 -08:00
@@ -143,8 +143,8 @@
 static void sf_markstate(struct ip_mc_list *pmc);
 #endif
 static void ip_mc_clear_src(struct ip_mc_list *pmc);
-int ip_mc_add_src(struct in_device *in_dev, __u32 *pmca, int sfmode,
-	int sfcount, __u32 *psfsrc, int delta);
+static int ip_mc_add_src(struct in_device *in_dev, __u32 *pmca, int sfmode,
+			 int sfcount, __u32 *psfsrc, int delta);
 
 static void ip_ma_put(struct ip_mc_list *im)
 {
@@ -1384,8 +1384,8 @@
 #define igmp_ifc_event(x)	do { } while (0)
 #endif
 
-int ip_mc_del_src(struct in_device *in_dev, __u32 *pmca, int sfmode,
-	int sfcount, __u32 *psfsrc, int delta)
+static int ip_mc_del_src(struct in_device *in_dev, __u32 *pmca, int sfmode,
+			 int sfcount, __u32 *psfsrc, int delta)
 {
 	struct ip_mc_list *pmc;
 	int	changerec = 0;
@@ -1520,8 +1520,8 @@
 /*
  * Add multicast source filter list to the interface list
  */
-int ip_mc_add_src(struct in_device *in_dev, __u32 *pmca, int sfmode,
-	int sfcount, __u32 *psfsrc, int delta)
+static int ip_mc_add_src(struct in_device *in_dev, __u32 *pmca, int sfmode,
+			 int sfcount, __u32 *psfsrc, int delta)
 {
 	struct ip_mc_list *pmc;
 	int	isexclude;
@@ -1617,7 +1617,7 @@
 	u32 addr = imr->imr_multiaddr.s_addr;
 	struct ip_mc_socklist *iml, *i;
 	struct in_device *in_dev;
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	int count = 0;
 
 	if (!MULTICAST(addr))
@@ -1667,8 +1667,8 @@
 	return err;
 }
 
-int ip_mc_leave_src(struct sock *sk, struct ip_mc_socklist *iml,
-	struct in_device *in_dev)
+static int ip_mc_leave_src(struct sock *sk, struct ip_mc_socklist *iml,
+			   struct in_device *in_dev)
 {
 	int err;
 
@@ -1691,7 +1691,7 @@
 
 int ip_mc_leave_group(struct sock *sk, struct ip_mreqn *imr)
 {
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	struct ip_mc_socklist *iml, **imlp;
 
 	rtnl_lock();
@@ -1734,7 +1734,7 @@
 	u32 addr = mreqs->imr_multiaddr;
 	struct ip_mc_socklist *pmc;
 	struct in_device *in_dev = NULL;
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	struct ip_sf_socklist *psl;
 	int i, j, rv;
 
@@ -1852,7 +1852,7 @@
 	u32 addr = msf->imsf_multiaddr;
 	struct ip_mc_socklist *pmc;
 	struct in_device *in_dev;
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	struct ip_sf_socklist *newpsl, *psl;
 
 	if (!MULTICAST(addr))
@@ -1922,7 +1922,7 @@
 	u32 addr = msf->imsf_multiaddr;
 	struct ip_mc_socklist *pmc;
 	struct in_device *in_dev;
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	struct ip_sf_socklist *psl;
 
 	if (!MULTICAST(addr))
@@ -1980,7 +1980,7 @@
 	struct sockaddr_in *psin;
 	u32 addr;
 	struct ip_mc_socklist *pmc;
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	struct ip_sf_socklist *psl;
 
 	psin = (struct sockaddr_in *)&gsf->gf_group;
@@ -2033,7 +2033,7 @@
  */
 int ip_mc_sf_allow(struct sock *sk, u32 loc_addr, u32 rmt_addr, int dif)
 {
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	struct ip_mc_socklist *pmc;
 	struct ip_sf_socklist *psl;
 	int i;
@@ -2069,7 +2069,7 @@
 
 void ip_mc_drop_socket(struct sock *sk)
 {
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	struct ip_mc_socklist *iml;
 
 	if (inet->mc_list == NULL)
diff -Nru a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
--- a/net/ipv4/ip_gre.c	2005-01-10 20:11:21 -08:00
+++ b/net/ipv4/ip_gre.c	2005-01-10 20:11:21 -08:00
@@ -304,7 +304,7 @@
 }
 
 
-void ipgre_err(struct sk_buff *skb, u32 info)
+static void ipgre_err(struct sk_buff *skb, u32 info)
 {
 #ifndef I_WISH_WORLD_WERE_PERFECT
 
@@ -552,7 +552,7 @@
 	return INET_ECN_encapsulate(tos, inner);
 }
 
-int ipgre_rcv(struct sk_buff *skb)
+static int ipgre_rcv(struct sk_buff *skb)
 {
 	struct iphdr *iph;
 	u8     *h;
@@ -1279,7 +1279,7 @@
 	goto out;
 }
 
-void ipgre_fini(void)
+static void ipgre_fini(void)
 {
 	if (inet_del_protocol(&ipgre_protocol, IPPROTO_GRE) < 0)
 		printk(KERN_INFO "ipgre close: can't remove protocol\n");
diff -Nru a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
--- a/net/ipv4/ip_output.c	2005-01-10 20:11:23 -08:00
+++ b/net/ipv4/ip_output.c	2005-01-10 20:11:23 -08:00
@@ -115,7 +115,7 @@
 	return 0;
 }
 
-static inline int ip_select_ttl(struct inet_opt *inet, struct dst_entry *dst)
+static inline int ip_select_ttl(struct inet_sock *inet, struct dst_entry *dst)
 {
 	int ttl = inet->uc_ttl;
 
@@ -131,7 +131,7 @@
 int ip_build_and_send_pkt(struct sk_buff *skb, struct sock *sk,
 			  u32 saddr, u32 daddr, struct ip_options *opt)
 {
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	struct rtable *rt = (struct rtable *)skb->dst;
 	struct iphdr *iph;
 
@@ -297,7 +297,7 @@
 int ip_queue_xmit(struct sk_buff *skb, int ipfragok)
 {
 	struct sock *sk = skb->sk;
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	struct ip_options *opt = inet->opt;
 	struct rtable *rt;
 	struct iphdr *iph;
@@ -712,7 +712,7 @@
 		   struct ipcm_cookie *ipc, struct rtable *rt,
 		   unsigned int flags)
 {
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	struct sk_buff *skb;
 
 	struct ip_options *opt = NULL;
@@ -973,7 +973,7 @@
 ssize_t	ip_append_page(struct sock *sk, struct page *page,
 		       int offset, size_t size, int flags)
 {
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	struct sk_buff *skb;
 	struct rtable *rt;
 	struct ip_options *opt = NULL;
@@ -1112,7 +1112,7 @@
 {
 	struct sk_buff *skb, *tmp_skb;
 	struct sk_buff **tail_skb;
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	struct ip_options *opt = NULL;
 	struct rtable *rt = inet->cork.rt;
 	struct iphdr *iph;
@@ -1217,7 +1217,7 @@
  */
 void ip_flush_pending_frames(struct sock *sk)
 {
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	struct sk_buff *skb;
 
 	while ((skb = __skb_dequeue_tail(&sk->sk_write_queue)) != NULL)
@@ -1260,7 +1260,7 @@
 void ip_send_reply(struct sock *sk, struct sk_buff *skb, struct ip_reply_arg *arg,
 		   unsigned int len)
 {
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	struct {
 		struct ip_options	opt;
 		char			data[40];
diff -Nru a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c
--- a/net/ipv4/ip_sockglue.c	2005-01-10 20:11:17 -08:00
+++ b/net/ipv4/ip_sockglue.c	2005-01-10 20:11:17 -08:00
@@ -92,7 +92,7 @@
 }
 
 
-void ip_cmsg_recv_retopts(struct msghdr *msg, struct sk_buff *skb)
+static void ip_cmsg_recv_retopts(struct msghdr *msg, struct sk_buff *skb)
 {
 	unsigned char optbuf[sizeof(struct ip_options) + 40];
 	struct ip_options * opt = (struct ip_options*)optbuf;
@@ -112,7 +112,7 @@
 
 void ip_cmsg_recv(struct msghdr *msg, struct sk_buff *skb)
 {
-	struct inet_opt *inet = inet_sk(skb->sk);
+	struct inet_sock *inet = inet_sk(skb->sk);
 	unsigned flags = inet->cmsg_flags;
 
 	/* Ordered by supposed usage frequency */
@@ -234,7 +234,7 @@
 void ip_icmp_error(struct sock *sk, struct sk_buff *skb, int err, 
 		   u16 port, u32 info, u8 *payload)
 {
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	struct sock_exterr_skb *serr;
 
 	if (!inet->recverr)
@@ -263,7 +263,7 @@
 
 void ip_local_error(struct sock *sk, int err, u32 daddr, u16 port, u32 info)
 {
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	struct sock_exterr_skb *serr;
 	struct iphdr *iph;
 	struct sk_buff *skb;
@@ -342,7 +342,7 @@
 	sin = &errhdr.offender;
 	sin->sin_family = AF_UNSPEC;
 	if (serr->ee.ee_origin == SO_EE_ORIGIN_ICMP) {
-		struct inet_opt *inet = inet_sk(sk);
+		struct inet_sock *inet = inet_sk(sk);
 
 		sin->sin_family = AF_INET;
 		sin->sin_addr.s_addr = skb->nh.iph->saddr;
@@ -383,7 +383,7 @@
 
 int ip_setsockopt(struct sock *sk, int level, int optname, char __user *optval, int optlen)
 {
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	int val=0,err;
 
 	if (level != SOL_IP)
@@ -429,7 +429,7 @@
 			if (err)
 				break;
 			if (sk->sk_type == SOCK_STREAM) {
-				struct tcp_opt *tp = tcp_sk(sk);
+				struct tcp_sock *tp = tcp_sk(sk);
 #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
 				if (sk->sk_family == PF_INET ||
 				    (!((1 << sk->sk_state) &
@@ -875,7 +875,7 @@
 
 int ip_getsockopt(struct sock *sk, int level, int optname, char __user *optval, int __user *optlen)
 {
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	int val;
 	int len;
 	
diff -Nru a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
--- a/net/ipv4/ipconfig.c	2005-01-10 20:11:16 -08:00
+++ b/net/ipv4/ipconfig.c	2005-01-10 20:11:16 -08:00
@@ -109,7 +109,7 @@
  */
 int ic_set_manually __initdata = 0;		/* IPconfig parameters set manually */
 
-int ic_enable __initdata = 0;			/* IP config enabled? */
+static int ic_enable __initdata = 0;		/* IP config enabled? */
 
 /* Protocol choice */
 int ic_proto_enabled __initdata = 0
@@ -124,10 +124,10 @@
 #endif
 			;
 
-int ic_host_name_set __initdata = 0;		/* Host name set by us? */
+static int ic_host_name_set __initdata = 0;	/* Host name set by us? */
 
 u32 ic_myaddr = INADDR_NONE;		/* My IP address */
-u32 ic_netmask = INADDR_NONE;	/* Netmask for local subnet */
+static u32 ic_netmask = INADDR_NONE;	/* Netmask for local subnet */
 u32 ic_gateway = INADDR_NONE;	/* Gateway IP address */
 
 u32 ic_servaddr = INADDR_NONE;	/* Boot server IP address */
@@ -137,9 +137,9 @@
 
 /* Persistent data: */
 
-int ic_proto_used;			/* Protocol used, if any */
-u32 ic_nameservers[CONF_NAMESERVERS_MAX]; /* DNS Server IP addresses */
-u8 ic_domain[64];		/* DNS (not NIS) domain name */
+static int ic_proto_used;			/* Protocol used, if any */
+static u32 ic_nameservers[CONF_NAMESERVERS_MAX]; /* DNS Server IP addresses */
+static u8 ic_domain[64];		/* DNS (not NIS) domain name */
 
 /*
  * Private state.
diff -Nru a/net/ipv4/ipvs/ip_vs_app.c b/net/ipv4/ipvs/ip_vs_app.c
--- a/net/ipv4/ipvs/ip_vs_app.c	2005-01-10 20:11:15 -08:00
+++ b/net/ipv4/ipvs/ip_vs_app.c	2005-01-10 20:11:15 -08:00
@@ -65,7 +65,7 @@
 /*
  *	Allocate/initialize app incarnation and register it in proto apps.
  */
-int
+static int
 ip_vs_app_inc_new(struct ip_vs_app *app, __u16 proto, __u16 port)
 {
 	struct ip_vs_protocol *pp;
diff -Nru a/net/ipv4/ipvs/ip_vs_conn.c b/net/ipv4/ipvs/ip_vs_conn.c
--- a/net/ipv4/ipvs/ip_vs_conn.c	2005-01-10 20:11:22 -08:00
+++ b/net/ipv4/ipvs/ip_vs_conn.c	2005-01-10 20:11:22 -08:00
@@ -64,7 +64,7 @@
 } __attribute__((__aligned__(SMP_CACHE_BYTES)));
 
 /* lock array for conn table */
-struct ip_vs_aligned_lock
+static struct ip_vs_aligned_lock
 __ip_vs_conntbl_lock_array[CT_LOCKARRAY_SIZE] __cacheline_aligned;
 
 static inline void ct_read_lock(unsigned key)
diff -Nru a/net/ipv4/ipvs/ip_vs_ctl.c b/net/ipv4/ipvs/ip_vs_ctl.c
--- a/net/ipv4/ipvs/ip_vs_ctl.c	2005-01-10 20:11:22 -08:00
+++ b/net/ipv4/ipvs/ip_vs_ctl.c	2005-01-10 20:11:22 -08:00
@@ -62,7 +62,7 @@
 /* 1/rate drop and drop-entry variables */
 int ip_vs_drop_rate = 0;
 int ip_vs_drop_counter = 0;
-atomic_t ip_vs_dropentry = ATOMIC_INIT(0);
+static atomic_t ip_vs_dropentry = ATOMIC_INIT(0);
 
 /* number of virtual services */
 static int ip_vs_num_services = 0;
diff -Nru a/net/ipv4/ipvs/ip_vs_proto.c b/net/ipv4/ipvs/ip_vs_proto.c
--- a/net/ipv4/ipvs/ip_vs_proto.c	2005-01-10 20:11:18 -08:00
+++ b/net/ipv4/ipvs/ip_vs_proto.c	2005-01-10 20:11:18 -08:00
@@ -45,7 +45,7 @@
 /*
  *	register an ipvs protocol
  */
-int register_ip_vs_protocol(struct ip_vs_protocol *pp)
+static int register_ip_vs_protocol(struct ip_vs_protocol *pp)
 {
 	unsigned hash = IP_VS_PROTO_HASH(pp->protocol);
 
@@ -62,7 +62,7 @@
 /*
  *	unregister an ipvs protocol
  */
-int unregister_ip_vs_protocol(struct ip_vs_protocol *pp)
+static int unregister_ip_vs_protocol(struct ip_vs_protocol *pp)
 {
 	struct ip_vs_protocol **pp_p;
 	unsigned hash = IP_VS_PROTO_HASH(pp->protocol);
diff -Nru a/net/ipv4/ipvs/ip_vs_proto_icmp.c b/net/ipv4/ipvs/ip_vs_proto_icmp.c
--- a/net/ipv4/ipvs/ip_vs_proto_icmp.c	2005-01-10 20:11:15 -08:00
+++ b/net/ipv4/ipvs/ip_vs_proto_icmp.c	2005-01-10 20:11:15 -08:00
@@ -22,7 +22,7 @@
 
 static char * icmp_state_name_table[1] = { "ICMP" };
 
-struct ip_vs_conn *
+static struct ip_vs_conn *
 icmp_conn_in_get(const struct sk_buff *skb,
 		 struct ip_vs_protocol *pp,
 		 const struct iphdr *iph,
@@ -49,7 +49,7 @@
 #endif
 }
 
-struct ip_vs_conn *
+static struct ip_vs_conn *
 icmp_conn_out_get(const struct sk_buff *skb,
 		  struct ip_vs_protocol *pp,
 		  const struct iphdr *iph,
diff -Nru a/net/ipv4/ipvs/ip_vs_sync.c b/net/ipv4/ipvs/ip_vs_sync.c
--- a/net/ipv4/ipvs/ip_vs_sync.c	2005-01-10 20:11:24 -08:00
+++ b/net/ipv4/ipvs/ip_vs_sync.c	2005-01-10 20:11:24 -08:00
@@ -343,7 +343,7 @@
  */
 static void set_mcast_loop(struct sock *sk, u_char loop)
 {
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 
 	/* setsockopt(sock, SOL_IP, IP_MULTICAST_LOOP, &loop, sizeof(loop)); */
 	lock_sock(sk);
@@ -356,7 +356,7 @@
  */
 static void set_mcast_ttl(struct sock *sk, u_char ttl)
 {
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 
 	/* setsockopt(sock, SOL_IP, IP_MULTICAST_TTL, &ttl, sizeof(ttl)); */
 	lock_sock(sk);
@@ -370,7 +370,7 @@
 static int set_mcast_if(struct sock *sk, char *ifname)
 {
 	struct net_device *dev;
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 
 	if ((dev = __dev_get_by_name(ifname)) == NULL)
 		return -ENODEV;
diff -Nru a/net/ipv4/netfilter/Kconfig b/net/ipv4/netfilter/Kconfig
--- a/net/ipv4/netfilter/Kconfig	2005-01-10 20:11:21 -08:00
+++ b/net/ipv4/netfilter/Kconfig	2005-01-10 20:11:21 -08:00
@@ -458,7 +458,7 @@
 
 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
+	depends on IP_NF_NAT != n
 	default y
 
 config IP_NF_TARGET_MASQUERADE
@@ -504,20 +504,6 @@
 
 	  To compile it as a module, choose M here.  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
@@ -706,31 +692,6 @@
 	help
 	  Allows altering the ARP packet payload: source and destination
 	  hardware and network addresses.
-
-# 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.
-
-	  To compile it as a module, choose M here.  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.
-
-	  To compile it as a module, choose M here.  If unsure, say N.
 
 endmenu
 
diff -Nru a/net/ipv4/netfilter/Makefile b/net/ipv4/netfilter/Makefile
--- a/net/ipv4/netfilter/Makefile	2005-01-10 20:11:17 -08:00
+++ b/net/ipv4/netfilter/Makefile	2005-01-10 20:11:17 -08:00
@@ -2,19 +2,9 @@
 # Makefile for the netfilter modules on top of IPv4.
 #
 
-# objects for the conntrack and NAT core (used by standalone and backw. compat)
-ip_nf_conntrack-objs	:= ip_conntrack_core.o ip_conntrack_proto_generic.o ip_conntrack_proto_tcp.o ip_conntrack_proto_udp.o ip_conntrack_proto_icmp.o
-ip_nf_nat-objs		:= ip_nat_core.o ip_nat_helper.o ip_nat_proto_unknown.o ip_nat_proto_tcp.o ip_nat_proto_udp.o ip_nat_proto_icmp.o
-
 # objects for the standalone - connection tracking / NAT
-ip_conntrack-objs	:= ip_conntrack_standalone.o $(ip_nf_conntrack-objs)
-iptable_nat-objs	:= ip_nat_standalone.o ip_nat_rule.o $(ip_nf_nat-objs)
-
-# objects for backwards compatibility mode
-ip_nf_compat-objs	:= ip_fw_compat.o ip_fw_compat_redir.o ip_fw_compat_masq.o $(ip_nf_conntrack-objs) $(ip_nf_nat-objs)
-
-ipfwadm-objs		:= $(ip_nf_compat-objs) ipfwadm_core.o
-ipchains-objs		:= $(ip_nf_compat-objs) ipchains_core.o
+ip_conntrack-objs	:= ip_conntrack_standalone.o ip_conntrack_core.o ip_conntrack_proto_generic.o ip_conntrack_proto_tcp.o ip_conntrack_proto_udp.o ip_conntrack_proto_icmp.o
+iptable_nat-objs	:= ip_nat_standalone.o ip_nat_rule.o ip_nat_core.o ip_nat_helper.o ip_nat_proto_unknown.o ip_nat_proto_tcp.o ip_nat_proto_udp.o ip_nat_proto_icmp.o
 
 # connection tracking
 obj-$(CONFIG_IP_NF_CONNTRACK) += ip_conntrack.o
@@ -95,9 +85,5 @@
 
 # just filtering instance of ARP tables for now
 obj-$(CONFIG_IP_NF_ARPFILTER) += arptable_filter.o
-
-# backwards compatibility 
-obj-$(CONFIG_IP_NF_COMPAT_IPCHAINS) += ipchains.o
-obj-$(CONFIG_IP_NF_COMPAT_IPFWADM) += ipfwadm.o
 
 obj-$(CONFIG_IP_NF_QUEUE) += ip_queue.o
diff -Nru a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c
--- a/net/ipv4/netfilter/arp_tables.c	2005-01-10 20:11:24 -08:00
+++ b/net/ipv4/netfilter/arp_tables.c	2005-01-10 20:11:24 -08:00
@@ -948,12 +948,12 @@
 	/* Decrease module usage counts and free resource */
 	ARPT_ENTRY_ITERATE(oldinfo->entries, oldinfo->size, cleanup_entry,NULL);
 	vfree(oldinfo);
-	/* Silent error: too late now. */
-	copy_to_user(tmp.counters, counters,
-		     sizeof(struct arpt_counters) * tmp.num_counters);
+	if (copy_to_user(tmp.counters, counters,
+			 sizeof(struct arpt_counters) * tmp.num_counters) != 0)
+		ret = -EFAULT;
 	vfree(counters);
 	up(&arpt_mutex);
-	return 0;
+	return ret;
 
  put_module:
 	module_put(t->me);
diff -Nru a/net/ipv4/netfilter/ip_conntrack_core.c b/net/ipv4/netfilter/ip_conntrack_core.c
--- a/net/ipv4/netfilter/ip_conntrack_core.c	2005-01-10 20:11:15 -08:00
+++ b/net/ipv4/netfilter/ip_conntrack_core.c	2005-01-10 20:11:15 -08:00
@@ -74,6 +74,8 @@
 static kmem_cache_t *ip_conntrack_expect_cachep;
 struct ip_conntrack ip_conntrack_untracked;
 unsigned int ip_ct_log_invalid;
+static LIST_HEAD(unconfirmed);
+static int ip_conntrack_vmalloc;
 
 DEFINE_PER_CPU(struct ip_conntrack_stat, ip_conntrack_stat);
 
@@ -298,10 +300,19 @@
 		ip_conntrack_destroyed(ct);
 
 	WRITE_LOCK(&ip_conntrack_lock);
-	/* Make sure don't leave any orphaned expectations lying around */
+	/* Expectations will have been removed in clean_from_lists,
+	 * except TFTP can create an expectation on the first packet,
+	 * before connection is in the list, so we need to clean here,
+	 * too. */
 	if (ct->expecting)
 		remove_expectations(ct, 1);
 
+	/* We overload first tuple to link into unconfirmed list. */
+	if (!is_confirmed(ct)) {
+		BUG_ON(list_empty(&ct->tuplehash[IP_CT_DIR_ORIGINAL].list));
+		list_del(&ct->tuplehash[IP_CT_DIR_ORIGINAL].list);
+	}
+
 	/* Delete our master expectation */
 	if (ct->master) {
 		if (ct->master->expectant) {
@@ -412,6 +423,7 @@
 	DEBUGP("Confirming conntrack %p\n", ct);
 
 	WRITE_LOCK(&ip_conntrack_lock);
+
 	/* See if there's one in the list already, including reverse:
            NAT could have grabbed it without realizing, since we're
            not in the hash.  If there is, we lost race. */
@@ -423,6 +435,9 @@
 			  conntrack_tuple_cmp,
 			  struct ip_conntrack_tuple_hash *,
 			  &ct->tuplehash[IP_CT_DIR_REPLY].tuple, NULL)) {
+		/* Remove from unconfirmed list */
+		list_del(&ct->tuplehash[IP_CT_DIR_ORIGINAL].list);
+
 		list_prepend(&ip_conntrack_hash[hash],
 			     &ct->tuplehash[IP_CT_DIR_ORIGINAL]);
 		list_prepend(&ip_conntrack_hash[repl_hash],
@@ -603,6 +618,10 @@
 
 		/* this is a braindead... --pablo */
 		atomic_inc(&ip_conntrack_count);
+
+		/* Overload tuple linked list to put us in unconfirmed list. */
+		list_add(&conntrack->tuplehash[IP_CT_DIR_ORIGINAL].list,
+			 &unconfirmed);
 		WRITE_UNLOCK(&ip_conntrack_lock);
 
 		if (expected->expectfn)
@@ -617,7 +636,11 @@
 		CONNTRACK_STAT_INC(new);
 	}
 
-end:	atomic_inc(&ip_conntrack_count);
+end:
+	/* Overload tuple linked list to put us in unconfirmed list. */
+	list_add(&conntrack->tuplehash[IP_CT_DIR_ORIGINAL].list, &unconfirmed);
+
+	atomic_inc(&ip_conntrack_count);
 	WRITE_UNLOCK(&ip_conntrack_lock);
 
 ret:	return &conntrack->tuplehash[IP_CT_DIR_ORIGINAL];
@@ -1013,16 +1036,12 @@
 	return ret;
 }
 
-/* Alter reply tuple (maybe alter helper).  If it's already taken,
-   return 0 and don't do alteration. */
-int ip_conntrack_alter_reply(struct ip_conntrack *conntrack,
-			     const struct ip_conntrack_tuple *newreply)
+/* Alter reply tuple (maybe alter helper).  This is for NAT, and is
+   implicitly racy: see __ip_conntrack_confirm */
+void ip_conntrack_alter_reply(struct ip_conntrack *conntrack,
+			      const struct ip_conntrack_tuple *newreply)
 {
 	WRITE_LOCK(&ip_conntrack_lock);
-	if (__ip_conntrack_find(newreply, conntrack)) {
-		WRITE_UNLOCK(&ip_conntrack_lock);
-		return 0;
-	}
 	/* Should be unconfirmed, so not in hash table yet */
 	IP_NF_ASSERT(!is_confirmed(conntrack));
 
@@ -1033,8 +1052,6 @@
 	if (!conntrack->master && list_empty(&conntrack->sibling_list))
 		conntrack->helper = ip_ct_find_helper(newreply);
 	WRITE_UNLOCK(&ip_conntrack_lock);
-
-	return 1;
 }
 
 int ip_conntrack_helper_register(struct ip_conntrack_helper *me)
@@ -1067,6 +1084,7 @@
 	LIST_DELETE(&helpers, me);
 
 	/* Get rid of expecteds, set helpers to NULL. */
+	LIST_FIND_W(&unconfirmed, unhelp, struct ip_conntrack_tuple_hash*, me);
 	for (i = 0; i < ip_conntrack_htable_size; i++)
 		LIST_FIND_W(&ip_conntrack_hash[i], unhelp,
 			    struct ip_conntrack_tuple_hash *, me);
@@ -1179,40 +1197,44 @@
 }
 
 static inline int
-do_kill(const struct ip_conntrack_tuple_hash *i,
-	int (*kill)(const struct ip_conntrack *i, void *data),
+do_iter(const struct ip_conntrack_tuple_hash *i,
+	int (*iter)(struct ip_conntrack *i, void *data),
 	void *data)
 {
-	return kill(i->ctrack, data);
+	return iter(i->ctrack, data);
 }
 
 /* Bring out ya dead! */
 static struct ip_conntrack_tuple_hash *
-get_next_corpse(int (*kill)(const struct ip_conntrack *i, void *data),
+get_next_corpse(int (*iter)(struct ip_conntrack *i, void *data),
 		void *data, unsigned int *bucket)
 {
 	struct ip_conntrack_tuple_hash *h = NULL;
 
-	READ_LOCK(&ip_conntrack_lock);
-	for (; !h && *bucket < ip_conntrack_htable_size; (*bucket)++) {
-		h = LIST_FIND(&ip_conntrack_hash[*bucket], do_kill,
-			      struct ip_conntrack_tuple_hash *, kill, data);
+	WRITE_LOCK(&ip_conntrack_lock);
+	for (; *bucket < ip_conntrack_htable_size; (*bucket)++) {
+		h = LIST_FIND_W(&ip_conntrack_hash[*bucket], do_iter,
+				struct ip_conntrack_tuple_hash *, iter, data);
+		if (h)
+			break;
 	}
+	if (!h)
+		h = LIST_FIND_W(&unconfirmed, do_iter,
+				struct ip_conntrack_tuple_hash *, iter, data);
 	if (h)
 		atomic_inc(&h->ctrack->ct_general.use);
-	READ_UNLOCK(&ip_conntrack_lock);
+	WRITE_UNLOCK(&ip_conntrack_lock);
 
 	return h;
 }
 
 void
-ip_ct_selective_cleanup(int (*kill)(const struct ip_conntrack *i, void *data),
-			void *data)
+ip_ct_iterate_cleanup(int (*iter)(struct ip_conntrack *i, void *), void *data)
 {
 	struct ip_conntrack_tuple_hash *h;
 	unsigned int bucket = 0;
 
-	while ((h = get_next_corpse(kill, data, &bucket)) != NULL) {
+	while ((h = get_next_corpse(iter, data, &bucket)) != NULL) {
 		/* Time to push up daises... */
 		if (del_timer(&h->ctrack->timeout))
 			death_by_timeout((unsigned long)h->ctrack);
@@ -1229,7 +1251,7 @@
 static int
 getorigdst(struct sock *sk, int optval, void __user *user, int *len)
 {
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	struct ip_conntrack_tuple_hash *h;
 	struct ip_conntrack_tuple tuple;
 	
@@ -1283,11 +1305,21 @@
 	.get		= &getorigdst,
 };
 
-static int kill_all(const struct ip_conntrack *i, void *data)
+static int kill_all(struct ip_conntrack *i, void *data)
 {
 	return 1;
 }
 
+static void free_conntrack_hash(void)
+{
+	if (ip_conntrack_vmalloc)
+		vfree(ip_conntrack_hash);
+	else
+		free_pages((unsigned long)ip_conntrack_hash, 
+			   get_order(sizeof(struct list_head)
+				     * ip_conntrack_htable_size));
+}
+
 /* Mishearing the voices in his head, our hero wonders how he's
    supposed to kill the mall. */
 void ip_conntrack_cleanup(void)
@@ -1299,7 +1331,7 @@
 	synchronize_net();
  
  i_see_dead_people:
-	ip_ct_selective_cleanup(kill_all, NULL);
+	ip_ct_iterate_cleanup(kill_all, NULL);
 	if (atomic_read(&ip_conntrack_count) != 0) {
 		schedule();
 		goto i_see_dead_people;
@@ -1307,7 +1339,7 @@
 
 	kmem_cache_destroy(ip_conntrack_cachep);
 	kmem_cache_destroy(ip_conntrack_expect_cachep);
-	vfree(ip_conntrack_hash);
+	free_conntrack_hash();
 	nf_unregister_sockopt(&so_getorigdst);
 }
 
@@ -1345,8 +1377,20 @@
 		return ret;
 	}
 
-	ip_conntrack_hash = vmalloc(sizeof(struct list_head)
-				    * ip_conntrack_htable_size);
+	/* AK: the hash table is twice as big than needed because it
+	   uses list_head.  it would be much nicer to caches to use a
+	   single pointer list head here. */
+	ip_conntrack_vmalloc = 0; 
+	ip_conntrack_hash 
+		=(void*)__get_free_pages(GFP_KERNEL, 
+					 get_order(sizeof(struct list_head)
+						   *ip_conntrack_htable_size));
+	if (!ip_conntrack_hash) { 
+		ip_conntrack_vmalloc = 1;
+		printk(KERN_WARNING "ip_conntrack: falling back to vmalloc.\n");
+		ip_conntrack_hash = vmalloc(sizeof(struct list_head)
+					    * ip_conntrack_htable_size);
+	}
 	if (!ip_conntrack_hash) {
 		printk(KERN_ERR "Unable to create ip_conntrack_hash\n");
 		goto err_unreg_sockopt;
@@ -1354,7 +1398,7 @@
 
 	ip_conntrack_cachep = kmem_cache_create("ip_conntrack",
 	                                        sizeof(struct ip_conntrack), 0,
-	                                        SLAB_HWCACHE_ALIGN, NULL, NULL);
+	                                        SLAB_HWCACHE_ALIGN, NULL,NULL);
 	if (!ip_conntrack_cachep) {
 		printk(KERN_ERR "Unable to create ip_conntrack slab cache\n");
 		goto err_free_hash;
@@ -1395,7 +1439,7 @@
 err_free_conntrack_slab:
 	kmem_cache_destroy(ip_conntrack_cachep);
 err_free_hash:
-	vfree(ip_conntrack_hash);
+	free_conntrack_hash();
 err_unreg_sockopt:
 	nf_unregister_sockopt(&so_getorigdst);
 
diff -Nru a/net/ipv4/netfilter/ip_conntrack_proto_sctp.c b/net/ipv4/netfilter/ip_conntrack_proto_sctp.c
--- a/net/ipv4/netfilter/ip_conntrack_proto_sctp.c	2005-01-10 20:11:22 -08:00
+++ b/net/ipv4/netfilter/ip_conntrack_proto_sctp.c	2005-01-10 20:11:22 -08:00
@@ -609,7 +609,7 @@
 static struct ctl_table_header *ip_ct_sysctl_header;
 #endif
 
-int __init init(void)
+static int __init init(void)
 {
 	int ret;
 
@@ -622,6 +622,7 @@
 #ifdef CONFIG_SYSCTL
 	ip_ct_sysctl_header = register_sysctl_table(ip_ct_net_table, 0);
 	if (ip_ct_sysctl_header == NULL) {
+		ret = -ENOMEM;
 		printk("ip_conntrack_proto_sctp: can't register to sysctl.\n");
 		goto cleanup;
 	}
@@ -639,7 +640,7 @@
 	return ret;
 }
 
-void __exit fini(void)
+static void __exit fini(void)
 {
 	ip_conntrack_protocol_unregister(&ip_conntrack_protocol_sctp);
 #ifdef CONFIG_SYSCTL
diff -Nru a/net/ipv4/netfilter/ip_conntrack_proto_tcp.c b/net/ipv4/netfilter/ip_conntrack_proto_tcp.c
--- a/net/ipv4/netfilter/ip_conntrack_proto_tcp.c	2005-01-10 20:11:23 -08:00
+++ b/net/ipv4/netfilter/ip_conntrack_proto_tcp.c	2005-01-10 20:11:23 -08:00
@@ -906,7 +906,8 @@
 		if (index == TCP_RST_SET
 		    && ((test_bit(IPS_SEEN_REPLY_BIT, &conntrack->status)
 		         && conntrack->proto.tcp.last_index <= TCP_SYNACK_SET)
-		        || conntrack->proto.tcp.last_index == TCP_ACK_SET)
+		        || (!test_bit(IPS_ASSURED_BIT, &conntrack->status)
+			 && conntrack->proto.tcp.last_index == TCP_ACK_SET))
 		    && after(ntohl(th->ack_seq),
 		    	     conntrack->proto.tcp.last_seq)) {
 			/* Ignore RST closing down invalid SYN or ACK
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	2005-01-10 20:11:18 -08:00
+++ b/net/ipv4/netfilter/ip_conntrack_standalone.c	2005-01-10 20:11:18 -08:00
@@ -48,7 +48,7 @@
 extern atomic_t ip_conntrack_count;
 DECLARE_PER_CPU(struct ip_conntrack_stat, ip_conntrack_stat);
 
-static int kill_proto(const struct ip_conntrack *i, void *data)
+static int kill_proto(struct ip_conntrack *i, void *data)
 {
 	return (i->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.protonum == 
 			*((u_int8_t *) data));
@@ -791,7 +791,8 @@
 	ip_ct_sysctl_header = register_sysctl_table(ip_ct_net_table, 0);
 	if (ip_ct_sysctl_header == NULL) {
 		printk("ip_conntrack: can't register to sysctl.\n");
-		goto cleanup;
+		ret = -ENOMEM;
+		goto cleanup_localinops;
 	}
 #endif
 
@@ -800,6 +801,7 @@
  cleanup:
 #ifdef CONFIG_SYSCTL
  	unregister_sysctl_table(ip_ct_sysctl_header);
+ cleanup_localinops:
 #endif
 	nf_unregister_hook(&ip_conntrack_local_in_ops);
  cleanup_inoutandlocalops:
@@ -820,8 +822,8 @@
 	nf_unregister_hook(&ip_conntrack_defrag_ops);
  cleanup_proc_stat:
 #ifdef CONFIG_PROC_FS
-	proc_net_remove("ip_conntrack_stat");
-cleanup_proc_exp:
+	remove_proc_entry("ip_conntrack", proc_net_stat);
+ cleanup_proc_exp:
 	proc_net_remove("ip_conntrack_expect");
  cleanup_proc:
 	proc_net_remove("ip_conntrack");
@@ -859,7 +861,7 @@
 	synchronize_net();
 
 	/* Remove all contrack entries for this protocol */
-	ip_ct_selective_cleanup(kill_proto, &proto->proto);
+	ip_ct_iterate_cleanup(kill_proto, &proto->proto);
 }
 
 static int __init init(void)
@@ -883,13 +885,14 @@
 
 EXPORT_SYMBOL(ip_conntrack_protocol_register);
 EXPORT_SYMBOL(ip_conntrack_protocol_unregister);
+EXPORT_SYMBOL(ip_ct_get_tuple);
 EXPORT_SYMBOL(invert_tuplepr);
 EXPORT_SYMBOL(ip_conntrack_alter_reply);
 EXPORT_SYMBOL(ip_conntrack_destroyed);
 EXPORT_SYMBOL(need_ip_conntrack);
 EXPORT_SYMBOL(ip_conntrack_helper_register);
 EXPORT_SYMBOL(ip_conntrack_helper_unregister);
-EXPORT_SYMBOL(ip_ct_selective_cleanup);
+EXPORT_SYMBOL(ip_ct_iterate_cleanup);
 EXPORT_SYMBOL(ip_ct_refresh_acct);
 EXPORT_SYMBOL(ip_ct_protos);
 EXPORT_SYMBOL(ip_ct_find_proto);
diff -Nru a/net/ipv4/netfilter/ip_fw_compat.c b/net/ipv4/netfilter/ip_fw_compat.c
--- a/net/ipv4/netfilter/ip_fw_compat.c	2005-01-10 20:11:18 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,303 +0,0 @@
-/* Compatibility framework for ipchains and ipfwadm support; designed
-   to look as much like the 2.2 infrastructure as possible. */
-
-/* (C) 1999-2001 Paul `Rusty' Russell
- * (C) 2002-2004 Netfilter Core Team <coreteam@netfilter.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-struct notifier_block;
-
-#include <linux/netfilter_ipv4.h>
-#include <linux/ip.h>
-#include <net/icmp.h>
-#include <linux/if.h>
-#include <linux/inetdevice.h>
-#include <linux/netdevice.h>
-#include <linux/module.h>
-#include <asm/uaccess.h>
-#include <net/ip.h>
-#include <net/route.h>
-#include <linux/netfilter_ipv4/compat_firewall.h>
-#include <linux/netfilter_ipv4/ip_conntrack.h>
-#include <linux/netfilter_ipv4/ip_conntrack_core.h>
-#include "ip_fw_compat.h"
-
-static struct firewall_ops *fwops;
-
-#ifdef CONFIG_IP_VS
-/* From ip_vs_core.c */
-extern unsigned int
-check_for_ip_vs_out(struct sk_buff **skb_p, int (*okfn)(struct sk_buff *));
-#endif
-
-/* They call these; we do what they want. */
-int register_firewall(int pf, struct firewall_ops *fw)
-{
-	if (pf != PF_INET) {
-		printk("Attempt to register non-IP firewall module.\n");
-		return -EINVAL;
-	}
-	if (fwops) {
-		printk("Attempt to register multiple firewall modules.\n");
-		return -EBUSY;
-	}
-
-	fwops = fw;
-	return 0;
-}
-
-int unregister_firewall(int pf, struct firewall_ops *fw)
-{
-	fwops = NULL;
-	return 0;
-}
-
-static unsigned int
-fw_in(unsigned int hooknum,
-      struct sk_buff **pskb,
-      const struct net_device *in,
-      const struct net_device *out,
-      int (*okfn)(struct sk_buff *))
-{
-	int ret = FW_BLOCK;
-	u_int16_t redirpt;
-
-	/* Assume worse case: any hook could change packet */
-	(*pskb)->nfcache |= NFC_UNKNOWN | NFC_ALTERED;
-	if ((*pskb)->ip_summed == CHECKSUM_HW)
-		if (skb_checksum_help(*pskb, (out == NULL)))
-			return NF_DROP;
-
-	switch (hooknum) {
-	case NF_IP_PRE_ROUTING:
-		if (fwops->fw_acct_in)
-			fwops->fw_acct_in(fwops, PF_INET,
-					  (struct net_device *)in,
-					  &redirpt, pskb);
-
-		if ((*pskb)->nh.iph->frag_off & htons(IP_MF|IP_OFFSET)) {
-			*pskb = ip_ct_gather_frags(*pskb);
-
-			if (!*pskb)
-				return NF_STOLEN;
-		}
-
-		ret = fwops->fw_input(fwops, PF_INET, (struct net_device *)in,
-				      &redirpt, pskb);
-		break;
-
-	case NF_IP_FORWARD:
-		/* Connection will only be set if it was
-                   demasqueraded: if so, skip forward chain. */
-		if ((*pskb)->nfct)
-			ret = FW_ACCEPT;
-		else ret = fwops->fw_forward(fwops, PF_INET,
-					     (struct net_device *)out,
-					     &redirpt, pskb);
-		break;
-
-	case NF_IP_POST_ROUTING:
-		ret = fwops->fw_output(fwops, PF_INET,
-				       (struct net_device *)out,
-				       &redirpt, pskb);
-		if (ret == FW_ACCEPT || ret == FW_SKIP) {
-			if (fwops->fw_acct_out)
-				fwops->fw_acct_out(fwops, PF_INET,
-						   (struct net_device *)out,
-						   &redirpt,
-						   pskb);
-
-			/* ip_conntrack_confirm return NF_DROP or NF_ACCEPT */
-			if (ip_conntrack_confirm(*pskb) == NF_DROP)
-				ret = FW_BLOCK;
-		}
-		break;
-	}
-
-	switch (ret) {
-	case FW_REJECT: {
-		/* Alexey says:
-		 *
-		 * Generally, routing is THE FIRST thing to make, when
-		 * packet enters IP stack. Before packet is routed you
-		 * cannot call any service routines from IP stack.  */
-		struct iphdr *iph = (*pskb)->nh.iph;
-
-		if ((*pskb)->dst != NULL
-		    || ip_route_input(*pskb, iph->daddr, iph->saddr, iph->tos,
-				      (struct net_device *)in) == 0)
-			icmp_send(*pskb, ICMP_DEST_UNREACH, ICMP_PORT_UNREACH,
-				  0);
-		return NF_DROP;
-	}
-
-	case FW_ACCEPT:
-	case FW_SKIP:
-		if (hooknum == NF_IP_PRE_ROUTING) {
-			check_for_demasq(pskb);
-			check_for_redirect(*pskb);
-		} else if (hooknum == NF_IP_POST_ROUTING) {
-			check_for_unredirect(*pskb);
-			/* Handle ICMP errors from client here */
-			if ((*pskb)->nh.iph->protocol == IPPROTO_ICMP
-			    && (*pskb)->nfct)
-				check_for_masq_error(pskb);
-		}
-		return NF_ACCEPT;
-
-	case FW_MASQUERADE:
-		if (hooknum == NF_IP_FORWARD) {
-#ifdef CONFIG_IP_VS
-			/* check if it is for ip_vs */
-			if (check_for_ip_vs_out(pskb, okfn) == NF_STOLEN)
-				return NF_STOLEN;
-#endif
-			return do_masquerade(pskb, out);
-		}
-		else return NF_ACCEPT;
-
-	case FW_REDIRECT:
-		if (hooknum == NF_IP_PRE_ROUTING)
-			return do_redirect(*pskb, in, redirpt);
-		else return NF_ACCEPT;
-
-	default:
-		/* FW_BLOCK */
-		return NF_DROP;
-	}
-}
-
-static unsigned int fw_confirm(unsigned int hooknum,
-			       struct sk_buff **pskb,
-			       const struct net_device *in,
-			       const struct net_device *out,
-			       int (*okfn)(struct sk_buff *))
-{
-	return ip_conntrack_confirm(*pskb);
-}
-
-extern int ip_fw_ctl(int optval, void *m, unsigned int len);
-
-static int sock_fn(struct sock *sk, int optval, void __user *user, unsigned int len)
-{
-	/* MAX of:
-	   2.2: sizeof(struct ip_fwtest) (~14x4 + 3x4 = 17x4)
-	   2.2: sizeof(struct ip_fwnew) (~1x4 + 15x4 + 3x4 + 3x4 = 22x4)
-	   2.0: sizeof(struct ip_fw) (~25x4)
-
-	   We can't include both 2.0 and 2.2 headers, they conflict.
-	   Hence, 200 is a good number. --RR */
-	char tmp_fw[200];
-	if (!capable(CAP_NET_ADMIN))
-		return -EPERM;
-
-	if (len > sizeof(tmp_fw) || len < 1)
-		return -EINVAL;
-
-	if (copy_from_user(&tmp_fw, user, len))
-		return -EFAULT;
-
-	return -ip_fw_ctl(optval, &tmp_fw, len);
-}
-
-static struct nf_hook_ops preroute_ops = {
-	.hook		= fw_in,
-	.owner		= THIS_MODULE,
-	.pf		= PF_INET,
-	.hooknum	= NF_IP_PRE_ROUTING,
-	.priority	= NF_IP_PRI_FILTER,
-};
-
-static struct nf_hook_ops postroute_ops = {
-	.hook		= fw_in,
-	.owner		= THIS_MODULE,
-	.pf		= PF_INET,
-	.hooknum	= NF_IP_POST_ROUTING,
-	.priority	= NF_IP_PRI_FILTER,
-};
-
-static struct nf_hook_ops forward_ops = {
-	.hook		= fw_in,
-	.owner		= THIS_MODULE,
-	.pf		= PF_INET,
-	.hooknum	= NF_IP_FORWARD,
-	.priority	= NF_IP_PRI_FILTER,
-};
-
-static struct nf_hook_ops local_in_ops = {
-	.hook		= fw_confirm,
-	.owner		= THIS_MODULE,
-	.pf		= PF_INET,
-	.hooknum	= NF_IP_LOCAL_IN,
-	.priority	= NF_IP_PRI_LAST - 1,
-};
-
-static struct nf_sockopt_ops sock_ops = {
-	.pf		= PF_INET,
-	.set_optmin	= 64,
-	.set_optmax	= 64 + 1024 + 1,
-	.set		= &sock_fn,
-};
-
-extern int ipfw_init_or_cleanup(int init);
-
-static int init_or_cleanup(int init)
-{
-	int ret = 0;
-
-	if (!init) goto cleanup;
-
-	ret = nf_register_sockopt(&sock_ops);
-
-	if (ret < 0)
-		goto cleanup_nothing;
-
-	ret = ipfw_init_or_cleanup(1);
-	if (ret < 0)
-		goto cleanup_sockopt;
-
-	ret = masq_init();
-	if (ret < 0)
-		goto cleanup_ipfw;
-
-	nf_register_hook(&preroute_ops);
-	nf_register_hook(&postroute_ops);
-	nf_register_hook(&forward_ops);
-	nf_register_hook(&local_in_ops);
-
-	return ret;
-
- cleanup:
-	nf_unregister_hook(&preroute_ops);
-	nf_unregister_hook(&postroute_ops);
-	nf_unregister_hook(&forward_ops);
-	nf_unregister_hook(&local_in_ops);
-
-	masq_cleanup();
-
- cleanup_ipfw:
-	ipfw_init_or_cleanup(0);
-
- cleanup_sockopt:
-	nf_unregister_sockopt(&sock_ops);
-
- cleanup_nothing:
-	return ret;
-}
-
-static int __init init(void)
-{
-	return init_or_cleanup(1);
-}
-
-static void __exit fini(void)
-{
-	init_or_cleanup(0);
-}
-
-module_init(init);
-module_exit(fini);
diff -Nru a/net/ipv4/netfilter/ip_fw_compat.h b/net/ipv4/netfilter/ip_fw_compat.h
--- a/net/ipv4/netfilter/ip_fw_compat.h	2005-01-10 20:11:18 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,28 +0,0 @@
-#ifndef _LINUX_IP_FW_COMPAT_H
-#define _LINUX_IP_FW_COMPAT_H
-
-/* From ip_fw_compat_redir.c */
-extern unsigned int
-do_redirect(struct sk_buff *skb,
-	    const struct net_device *dev,
-	    u_int16_t redirpt);
-
-extern void
-check_for_redirect(struct sk_buff *skb);
-
-extern void
-check_for_unredirect(struct sk_buff *skb);
-
-/* From ip_fw_compat_masq.c */
-extern unsigned int
-do_masquerade(struct sk_buff **pskb, const struct net_device *dev);
-
-extern void check_for_masq_error(struct sk_buff **pskb);
-
-extern unsigned int
-check_for_demasq(struct sk_buff **pskb);
-
-extern int __init masq_init(void);
-extern void masq_cleanup(void);
-
-#endif /* _LINUX_IP_FW_COMPAT_H */
diff -Nru a/net/ipv4/netfilter/ip_fw_compat_masq.c b/net/ipv4/netfilter/ip_fw_compat_masq.c
--- a/net/ipv4/netfilter/ip_fw_compat_masq.c	2005-01-10 20:11:21 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,342 +0,0 @@
-/* Masquerading compatibility layer.
-
-   Note that there are no restrictions on other programs binding to
-   ports 61000:65095 (in 2.0 and 2.2 they get EADDRINUSE).  Just DON'T
-   DO IT.
- */
-
-/* (C) 1999-2001 Paul `Rusty' Russell
- * (C) 2002-2004 Netfilter Core Team <coreteam@netfilter.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#include <linux/skbuff.h>
-#include <linux/in.h>
-#include <linux/ip.h>
-#include <linux/icmp.h>
-#include <linux/udp.h>
-#include <linux/netfilter_ipv4.h>
-#include <linux/netdevice.h>
-#include <linux/inetdevice.h>
-#include <linux/proc_fs.h>
-#include <linux/module.h>
-#include <net/route.h>
-#include <net/ip.h>
-
-#define ASSERT_READ_LOCK(x) MUST_BE_READ_LOCKED(&ip_conntrack_lock)
-#define ASSERT_WRITE_LOCK(x) MUST_BE_WRITE_LOCKED(&ip_conntrack_lock)
-
-#include <linux/netfilter_ipv4/ip_conntrack.h>
-#include <linux/netfilter_ipv4/ip_conntrack_core.h>
-#include <linux/netfilter_ipv4/ip_conntrack_protocol.h>
-#include <linux/netfilter_ipv4/ip_nat.h>
-#include <linux/netfilter_ipv4/ip_nat_core.h>
-#include <linux/netfilter_ipv4/listhelp.h>
-#include "ip_fw_compat.h"
-
-#if 0
-#define DEBUGP printk
-#else
-#define DEBUGP(format, args...)
-#endif
-
-unsigned int
-do_masquerade(struct sk_buff **pskb, const struct net_device *dev)
-{
-	struct ip_nat_info *info;
-	enum ip_conntrack_info ctinfo;
-	struct ip_conntrack *ct;
-	unsigned int ret;
-
-	/* Sorry, only ICMP, TCP and UDP. */
-	if ((*pskb)->nh.iph->protocol != IPPROTO_ICMP
-	    && (*pskb)->nh.iph->protocol != IPPROTO_TCP
-	    && (*pskb)->nh.iph->protocol != IPPROTO_UDP)
-		return NF_DROP;
-
-	/* Feed it to connection tracking; in fact we're in NF_IP_FORWARD,
-           but connection tracking doesn't expect that */
-	ret = ip_conntrack_in(NF_IP_POST_ROUTING, pskb, dev, NULL, NULL);
-	if (ret != NF_ACCEPT) {
-		DEBUGP("ip_conntrack_in returned %u.\n", ret);
-		return ret;
-	}
-
-	ct = ip_conntrack_get(*pskb, &ctinfo);
-
-	if (!ct) {
-		DEBUGP("ip_conntrack_in set to invalid conntrack.\n");
-		return NF_DROP;
-	}
-
-	info = &ct->nat.info;
-
-	WRITE_LOCK(&ip_nat_lock);
-	/* Setup the masquerade, if not already */
-	if (!info->initialized) {
-		u_int32_t newsrc;
-		struct flowi fl = { .nl_u = { .ip4_u = { .daddr = (*pskb)->nh.iph->daddr } } };
-		struct rtable *rt;
-		struct ip_nat_multi_range range;
-
-		/* Pass 0 instead of saddr, since it's going to be changed
-		   anyway. */
-		if (ip_route_output_key(&rt, &fl) != 0) {
-			DEBUGP("ipnat_rule_masquerade: Can't reroute.\n");
-			return NF_DROP;
-		}
-		newsrc = inet_select_addr(rt->u.dst.dev, rt->rt_gateway,
-					  RT_SCOPE_UNIVERSE);
-		ip_rt_put(rt);
-		range = ((struct ip_nat_multi_range)
-			 { 1,
-			   {{IP_NAT_RANGE_MAP_IPS|IP_NAT_RANGE_PROTO_SPECIFIED,
-			     newsrc, newsrc,
-			     { htons(61000) }, { htons(65095) } } } });
-
-		ret = ip_nat_setup_info(ct, &range, NF_IP_POST_ROUTING);
-		if (ret != NF_ACCEPT) {
-			WRITE_UNLOCK(&ip_nat_lock);
-			return ret;
-		}
-	} else
-		DEBUGP("Masquerading already done on this conn.\n");
-	WRITE_UNLOCK(&ip_nat_lock);
-
-	return do_bindings(ct, ctinfo, info, NF_IP_POST_ROUTING, pskb);
-}
-
-void
-check_for_masq_error(struct sk_buff **pskb)
-{
-	enum ip_conntrack_info ctinfo;
-	struct ip_conntrack *ct;
-
-	ct = ip_conntrack_get(*pskb, &ctinfo);
-	/* Wouldn't be here if not tracked already => masq'ed ICMP
-           ping or error related to masq'd connection */
-	IP_NF_ASSERT(ct);
-	if (ctinfo == IP_CT_RELATED) {
-		icmp_reply_translation(pskb, ct, NF_IP_PRE_ROUTING,
-				       CTINFO2DIR(ctinfo));
-		icmp_reply_translation(pskb, ct, NF_IP_POST_ROUTING,
-				       CTINFO2DIR(ctinfo));
-	}
-}
-
-unsigned int
-check_for_demasq(struct sk_buff **pskb)
-{
-	struct ip_conntrack_tuple tuple;
-	struct ip_conntrack_protocol *protocol;
-	struct ip_conntrack_tuple_hash *h;
-	enum ip_conntrack_info ctinfo;
-	struct ip_conntrack *ct;
-	int ret;
-
-	protocol = ip_ct_find_proto((*pskb)->nh.iph->protocol);
-
-	/* We don't feed packets to conntrack system unless we know
-           they're part of an connection already established by an
-           explicit masq command. */
-	switch ((*pskb)->nh.iph->protocol) {
-	case IPPROTO_ICMP:
-		/* ICMP errors. */
-		protocol->error(*pskb, &ctinfo, NF_IP_PRE_ROUTING);
-		ct = (struct ip_conntrack *)(*pskb)->nfct;
-		if (ct) {
-			/* We only do SNAT in the compatibility layer.
-			   So we can manipulate ICMP errors from
-			   server here (== DNAT).  Do SNAT icmp manips
-			   in POST_ROUTING handling. */
-			if (CTINFO2DIR(ctinfo) == IP_CT_DIR_REPLY) {
-				icmp_reply_translation(pskb, ct,
-						       NF_IP_PRE_ROUTING,
-						       CTINFO2DIR(ctinfo));
-				icmp_reply_translation(pskb, ct,
-						       NF_IP_POST_ROUTING,
-						       CTINFO2DIR(ctinfo));
-			}
-			return NF_ACCEPT;
-		}
-		/* Fall thru... */
-	case IPPROTO_TCP:
-	case IPPROTO_UDP:
-		IP_NF_ASSERT(((*pskb)->nh.iph->frag_off & htons(IP_OFFSET)) == 0);
-
-		if (!ip_ct_get_tuple((*pskb)->nh.iph, *pskb,
-				     (*pskb)->nh.iph->ihl*4, &tuple, protocol)) {
-			if (net_ratelimit())
-				printk("ip_fw_compat_masq: Can't get tuple\n");
-			return NF_ACCEPT;
-		}
-		break;
-
-	default:
-		/* Not ours... */
-		return NF_ACCEPT;
-	}
-	h = ip_conntrack_find_get(&tuple, NULL);
-
-	/* MUST be found, and MUST be reply. */
-	if (h && DIRECTION(h) == 1) {
-		ret = ip_conntrack_in(NF_IP_PRE_ROUTING, pskb,
-				      NULL, NULL, NULL);
-
-		/* Put back the reference gained from find_get */
-		nf_conntrack_put(&h->ctrack->ct_general);
-		if (ret == NF_ACCEPT) {
-			struct ip_conntrack *ct;
-			ct = ip_conntrack_get(*pskb, &ctinfo);
-
-			if (ct) {
-				struct ip_nat_info *info = &ct->nat.info;
-
-				do_bindings(ct, ctinfo, info,
-					    NF_IP_PRE_ROUTING,
-					    pskb);
-			} else
-				if (net_ratelimit()) 
-					printk("ip_fw_compat_masq: conntrack"
-					       " didn't like\n");
-		}
-	} else {
-		if (h)
-			/* Put back the reference gained from find_get */
-			nf_conntrack_put(&h->ctrack->ct_general);
-		ret = NF_ACCEPT;
-	}
-
-	return ret;
-}
-
-int ip_fw_masq_timeouts(void *user, int len)
-{
-	printk("Sorry: masquerading timeouts set 5DAYS/2MINS/60SECS\n");
-	return 0;
-}
-
-static const char *masq_proto_name(u_int16_t protonum)
-{
-	switch (protonum) {
-	case IPPROTO_TCP: return "TCP";
-	case IPPROTO_UDP: return "UDP";
-	case IPPROTO_ICMP: return "ICMP";
-	default: return "MORE-CAFFEINE-FOR-RUSTY";
-	}
-}
-
-static unsigned int
-print_masq(char *buffer, const struct ip_conntrack *conntrack)
-{
-	char temp[129];
-
-	/* This is for backwards compatibility, but ick!.
-	   We should never export jiffies to userspace.
-	*/
-	sprintf(temp,"%s %08X:%04X %08X:%04X %04X %08X %6d %6d %7lu",
-		masq_proto_name(conntrack->tuplehash[0].tuple.dst.protonum),
-		ntohl(conntrack->tuplehash[0].tuple.src.ip),
-		ntohs(conntrack->tuplehash[0].tuple.src.u.all),
-		ntohl(conntrack->tuplehash[0].tuple.dst.ip),
-		ntohs(conntrack->tuplehash[0].tuple.dst.u.all),
-		ntohs(conntrack->tuplehash[1].tuple.dst.u.all),
-		/* Sorry, no init_seq, delta or previous_delta (yet). */
-		0, 0, 0,
-		conntrack->timeout.expires - jiffies);
-
-	return sprintf(buffer, "%-127s\n", temp);
-}
-
-/* Returns true when finished. */
-static int
-masq_iterate(const struct ip_conntrack_tuple_hash *hash,
-	     char *buffer, off_t offset, off_t *upto,
-	     unsigned int *len, unsigned int maxlen)
-{
-	unsigned int newlen;
-
-	IP_NF_ASSERT(hash->ctrack);
-
-	/* Only count originals */
-	if (DIRECTION(hash))
-		return 0;
-
-	if ((*upto)++ < offset)
-		return 0;
-
-	newlen = print_masq(buffer + *len, hash->ctrack);
-	if (*len + newlen > maxlen)
-		return 1;
-	else *len += newlen;
-
-	return 0;
-}
-
-/* Everything in the hash is masqueraded. */
-static int
-masq_procinfo(char *buffer, char **start, off_t offset, int length)
-{
-	unsigned int i;
-	int len = 0;
-	off_t upto = 1;
-
-	/* Header: first record */
-	if (offset == 0) {
-		char temp[128];
-
-		sprintf(temp,
-			"Prc FromIP   FPrt ToIP     TPrt Masq Init-seq  Delta PDelta Expires (free=0,0,0)");
-		len = sprintf(buffer, "%-127s\n", temp);
-		offset = 1;
-	}
-
-	READ_LOCK(&ip_conntrack_lock);
-	/* Traverse hash; print originals then reply. */
-	for (i = 0; i < ip_conntrack_htable_size; i++) {
-		if (LIST_FIND(&ip_conntrack_hash[i], masq_iterate,
-			      struct ip_conntrack_tuple_hash *,
-			      buffer, offset, &upto, &len, length))
-			break;
-	}
-	READ_UNLOCK(&ip_conntrack_lock);
-
-	/* `start' hack - see fs/proc/generic.c line ~165 */
-	*start = (char *)((unsigned int)upto - offset);
-	return len;
-}
-
-int __init masq_init(void)
-{
-	int ret;
-	struct proc_dir_entry *proc;
-
-	ret = ip_conntrack_init();
-	if (ret == 0) {
-		ret = ip_nat_init();
-		if (ret == 0) {
-			proc = proc_net_create("ip_masquerade",
-					       0, masq_procinfo);
-			if (proc)
-				proc->owner = THIS_MODULE;
-			else {
-				ip_nat_cleanup();
-				ip_conntrack_cleanup();
-				ret = -ENOMEM;
-			}
-		} else
-			ip_conntrack_cleanup();
-	}
-
-	return ret;
-}
-
-void masq_cleanup(void)
-{
-	ip_nat_cleanup();
-	ip_conntrack_cleanup();
-	proc_net_remove("ip_masquerade");
-}
diff -Nru a/net/ipv4/netfilter/ip_fw_compat_redir.c b/net/ipv4/netfilter/ip_fw_compat_redir.c
--- a/net/ipv4/netfilter/ip_fw_compat_redir.c	2005-01-10 20:11:21 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,318 +0,0 @@
-/* This is a file to handle the "simple" NAT cases (redirect and
-   masquerade) required for the compatibility layer.
-
-   `bind to foreign address' and `getpeername' hacks are not
-   supported.
-
-   FIXME: Timing is overly simplistic.  If anyone complains, make it
-   use conntrack.
-*/
-
-/* (C) 1999-2001 Paul `Rusty' Russell
- * (C) 2002-2004 Netfilter Core Team <coreteam@netfilter.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#include <linux/config.h>
-#include <linux/netfilter.h>
-#include <linux/ip.h>
-#include <linux/udp.h>
-#include <linux/tcp.h>
-#include <net/checksum.h>
-#include <net/ip.h>
-#include <linux/timer.h>
-#include <linux/netdevice.h>
-#include <linux/if.h>
-#include <linux/in.h>
-
-#include <linux/netfilter_ipv4/lockhelp.h>
-
-/* Very simple timeout pushed back by each packet */
-#define REDIR_TIMEOUT (240*HZ)
-
-static DECLARE_LOCK(redir_lock);
-#define ASSERT_READ_LOCK(x) MUST_BE_LOCKED(&redir_lock)
-#define ASSERT_WRITE_LOCK(x) MUST_BE_LOCKED(&redir_lock)
-
-#include <linux/netfilter_ipv4/listhelp.h>
-#include "ip_fw_compat.h"
-
-#if 0
-#define DEBUGP printk
-#else
-#define DEBUGP(format, args...)
-#endif
-
-#ifdef CONFIG_NETFILTER_DEBUG
-#define IP_NF_ASSERT(x)							 \
-do {									 \
-	if (!(x))							 \
-		/* Wooah!  I'm tripping my conntrack in a frenzy of	 \
-		   netplay... */					 \
-		printk("ASSERT: %s:%i(%s)\n",				 \
-		       __FILE__, __LINE__, __FUNCTION__);		 \
-} while(0)
-#else
-#define IP_NF_ASSERT(x)
-#endif
-
-static u_int16_t
-cheat_check(u_int32_t oldvalinv, u_int32_t newval, u_int16_t oldcheck)
-{
-	u_int32_t diffs[] = { oldvalinv, newval };
-	return csum_fold(csum_partial((char *)diffs, sizeof(diffs),
-				      oldcheck^0xFFFF));
-}
-
-struct redir_core {
-	u_int32_t orig_srcip, orig_dstip;
-	u_int16_t orig_sport, orig_dport;
-
-	u_int32_t new_dstip;
-	u_int16_t new_dport;
-};
-
-struct redir
-{
-	struct list_head list;
-	struct redir_core core;
-	struct timer_list destroyme;
-};
-
-static LIST_HEAD(redirs);
-
-static int
-redir_cmp(const struct redir *i,
-	  u_int32_t orig_srcip, u_int32_t orig_dstip,
-	  u_int16_t orig_sport, u_int16_t orig_dport)
-{
-	return (i->core.orig_srcip == orig_srcip
-		&& i->core.orig_dstip == orig_dstip
-		&& i->core.orig_sport == orig_sport
-		&& i->core.orig_dport == orig_dport);
-}
-
-/* Search for an existing redirection of the TCP packet. */
-static struct redir *
-find_redir(u_int32_t orig_srcip, u_int32_t orig_dstip,
-	   u_int16_t orig_sport, u_int16_t orig_dport)
-{
-	return LIST_FIND(&redirs, redir_cmp, struct redir *,
-			 orig_srcip, orig_dstip, orig_sport, orig_dport);
-}
-
-static void do_tcp_redir(struct sk_buff *skb, struct redir *redir)
-{
-	struct iphdr *iph = skb->nh.iph;
-	struct tcphdr *tcph = (struct tcphdr *)((u_int32_t *)iph
-						+ iph->ihl);
-
-	tcph->check = cheat_check(~redir->core.orig_dstip,
-				  redir->core.new_dstip,
-				  cheat_check(redir->core.orig_dport ^ 0xFFFF,
-					      redir->core.new_dport,
-					      tcph->check));
-	iph->check = cheat_check(~redir->core.orig_dstip,
-				 redir->core.new_dstip, iph->check);
-	tcph->dest = redir->core.new_dport;
-	iph->daddr = redir->core.new_dstip;
-
-	skb->nfcache |= NFC_ALTERED;
-}
-
-static int
-unredir_cmp(const struct redir *i,
-	    u_int32_t new_dstip, u_int32_t orig_srcip,
-	    u_int16_t new_dport, u_int16_t orig_sport)
-{
-	return (i->core.orig_srcip == orig_srcip
-		&& i->core.new_dstip == new_dstip
-		&& i->core.orig_sport == orig_sport
-		&& i->core.new_dport == new_dport);
-}
-
-/* Match reply packet against redir */
-static struct redir *
-find_unredir(u_int32_t new_dstip, u_int32_t orig_srcip,
-	     u_int16_t new_dport, u_int16_t orig_sport)
-{
-	return LIST_FIND(&redirs, unredir_cmp, struct redir *,
-			 new_dstip, orig_srcip, new_dport, orig_sport);
-}
-
-/* `unredir' a reply packet. */
-static void do_tcp_unredir(struct sk_buff *skb, struct redir *redir)
-{
-	struct iphdr *iph = skb->nh.iph;
-	struct tcphdr *tcph = (struct tcphdr *)((u_int32_t *)iph
-						+ iph->ihl);
-
-	tcph->check = cheat_check(~redir->core.new_dstip,
-				  redir->core.orig_dstip,
-				  cheat_check(redir->core.new_dport ^ 0xFFFF,
-					      redir->core.orig_dport,
-					      tcph->check));
-	iph->check = cheat_check(~redir->core.new_dstip,
-				 redir->core.orig_dstip,
-				 iph->check);
-	tcph->source = redir->core.orig_dport;
-	iph->saddr = redir->core.orig_dstip;
-
-	skb->nfcache |= NFC_ALTERED;
-}
-
-static void destroyme(unsigned long me)
-{
-	LOCK_BH(&redir_lock);
-	LIST_DELETE(&redirs, (struct redir *)me);
-	UNLOCK_BH(&redir_lock);
-	kfree((struct redir *)me);
-}
-
-/* REDIRECT a packet. */
-unsigned int
-do_redirect(struct sk_buff *skb,
-	    const struct net_device *dev,
-	    u_int16_t redirpt)
-{
-	struct iphdr *iph = skb->nh.iph;
-	u_int32_t newdst;
-
-	/* Figure out address: not loopback. */
-	if (!dev)
-		return NF_DROP;
-
-	/* Grab first address on interface. */
-	newdst = ((struct in_device *)dev->ip_ptr)->ifa_list->ifa_local;
-
-	switch (iph->protocol) {
-	case IPPROTO_UDP: {
-		/* Simple mangle. */
-		struct udphdr *udph = (struct udphdr *)((u_int32_t *)iph
-							+ iph->ihl);
-
-		/* Must have whole header */
-		if (skb->len < iph->ihl*4 + sizeof(*udph))
-			return NF_DROP;
-
-		if (udph->check) /* 0 is a special case meaning no checksum */
-			udph->check = cheat_check(~iph->daddr, newdst,
-					  cheat_check(udph->dest ^ 0xFFFF,
-						      redirpt,
-						      udph->check));
-		iph->check = cheat_check(~iph->daddr, newdst, iph->check);
-		udph->dest = redirpt;
-		iph->daddr = newdst;
-
-		skb->nfcache |= NFC_ALTERED;
-		return NF_ACCEPT;
-	}
-	case IPPROTO_TCP: {
-		/* Mangle, maybe record. */
-		struct tcphdr *tcph = (struct tcphdr *)((u_int32_t *)iph
-							+ iph->ihl);
-		struct redir *redir;
-		int ret;
-
-		/* Must have whole header */
-		if (skb->len < iph->ihl*4 + sizeof(*tcph))
-			return NF_DROP;
-
-		DEBUGP("Doing tcp redirect. %08X:%u %08X:%u -> %08X:%u\n",
-		       iph->saddr, tcph->source, iph->daddr, tcph->dest,
-		       newdst, redirpt);
-		LOCK_BH(&redir_lock);
-		redir = find_redir(iph->saddr, iph->daddr,
-				   tcph->source, tcph->dest);
-
-		if (!redir) {
-			redir = kmalloc(sizeof(struct redir), GFP_ATOMIC);
-			if (!redir) {
-				ret = NF_DROP;
-				goto out;
-			}
-			list_prepend(&redirs, redir);
-			init_timer(&redir->destroyme);
-			redir->destroyme.function = destroyme;
-			redir->destroyme.data = (unsigned long)redir;
-			redir->destroyme.expires = jiffies + REDIR_TIMEOUT;
-			add_timer(&redir->destroyme);
-		}
-		/* In case mangling has changed, rewrite this part. */
-		redir->core = ((struct redir_core)
-			       { iph->saddr, iph->daddr,
-				 tcph->source, tcph->dest,
-				 newdst, redirpt });
-		do_tcp_redir(skb, redir);
-		ret = NF_ACCEPT;
-
-	out:
-		UNLOCK_BH(&redir_lock);
-		return ret;
-	}
-
-	default: /* give up if not TCP or UDP. */
-		return NF_DROP;
-	}
-}
-
-/* Incoming packet: is it a reply to a masqueraded connection, or
-   part of an already-redirected TCP connection? */
-void
-check_for_redirect(struct sk_buff *skb)
-{
-	struct iphdr *iph = skb->nh.iph;
-	struct tcphdr *tcph = (struct tcphdr *)((u_int32_t *)iph
-						+ iph->ihl);
-	struct redir *redir;
-
-	if (iph->protocol != IPPROTO_TCP)
-		return;
-
-	/* Must have whole header */
-	if (skb->len < iph->ihl*4 + sizeof(*tcph))
-		return;
-
-	LOCK_BH(&redir_lock);
-	redir = find_redir(iph->saddr, iph->daddr, tcph->source, tcph->dest);
-	if (redir) {
-		DEBUGP("Doing tcp redirect again.\n");
-		do_tcp_redir(skb, redir);
-		if (del_timer(&redir->destroyme)) {
-			redir->destroyme.expires = jiffies + REDIR_TIMEOUT;
-			add_timer(&redir->destroyme);
-		}
-	}
-	UNLOCK_BH(&redir_lock);
-}
-
-void
-check_for_unredirect(struct sk_buff *skb)
-{
-	struct iphdr *iph = skb->nh.iph;
-	struct tcphdr *tcph = (struct tcphdr *)((u_int32_t *)iph
-						+ iph->ihl);
-	struct redir *redir;
-
-	if (iph->protocol != IPPROTO_TCP)
-		return;
-
-	/* Must have whole header */
-	if (skb->len < iph->ihl*4 + sizeof(*tcph))
-		return;
-
-	LOCK_BH(&redir_lock);
-	redir = find_unredir(iph->saddr, iph->daddr, tcph->source, tcph->dest);
-	if (redir) {
-		DEBUGP("Doing tcp unredirect.\n");
-		do_tcp_unredir(skb, redir);
-		if (del_timer(&redir->destroyme)) {
-			redir->destroyme.expires = jiffies + REDIR_TIMEOUT;
-			add_timer(&redir->destroyme);
-		}
-	}
-	UNLOCK_BH(&redir_lock);
-}
diff -Nru a/net/ipv4/netfilter/ip_nat_amanda.c b/net/ipv4/netfilter/ip_nat_amanda.c
--- a/net/ipv4/netfilter/ip_nat_amanda.c	2005-01-10 20:11:17 -08:00
+++ b/net/ipv4/netfilter/ip_nat_amanda.c	2005-01-10 20:11:17 -08:00
@@ -39,7 +39,7 @@
 {
 	struct ip_conntrack *master = master_ct(ct);
 	struct ip_ct_amanda_expect *exp_amanda_info;
-	struct ip_nat_multi_range mr;
+	struct ip_nat_range range;
 	u_int32_t newip;
 
 	IP_NF_ASSERT(info);
@@ -51,20 +51,19 @@
 	else
 		newip = master->tuplehash[IP_CT_DIR_REPLY].tuple.src.ip;
 
-	mr.rangesize = 1;
 	/* We don't want to manip the per-protocol, just the IPs. */
-	mr.range[0].flags = IP_NAT_RANGE_MAP_IPS;
-	mr.range[0].min_ip = mr.range[0].max_ip = newip;
+	range.flags = IP_NAT_RANGE_MAP_IPS;
+	range.min_ip = range.max_ip = newip;
 
 	if (HOOK2MANIP(hooknum) == IP_NAT_MANIP_DST) {
 		exp_amanda_info = &ct->master->help.exp_amanda_info;
-		mr.range[0].flags |= IP_NAT_RANGE_PROTO_SPECIFIED;
-		mr.range[0].min = mr.range[0].max
+		range.flags |= IP_NAT_RANGE_PROTO_SPECIFIED;
+		range.min = range.max
 			= ((union ip_conntrack_manip_proto)
 				{ .udp = { htons(exp_amanda_info->port) } });
 	}
 
-	return ip_nat_setup_info(ct, &mr, hooknum);
+	return ip_nat_setup_info(ct, &range, hooknum);
 }
 
 static int amanda_data_fixup(struct ip_conntrack *ct,
diff -Nru a/net/ipv4/netfilter/ip_nat_core.c b/net/ipv4/netfilter/ip_nat_core.c
--- a/net/ipv4/netfilter/ip_nat_core.c	2005-01-10 20:11:16 -08:00
+++ b/net/ipv4/netfilter/ip_nat_core.c	2005-01-10 20:11:16 -08:00
@@ -20,6 +20,7 @@
 #include <net/tcp.h>  /* For tcp_prot in getorigdst */
 #include <linux/icmp.h>
 #include <linux/udp.h>
+#include <linux/jhash.h>
 
 #define ASSERT_READ_LOCK(x) MUST_BE_READ_LOCKED(&ip_nat_lock)
 #define ASSERT_WRITE_LOCK(x) MUST_BE_WRITE_LOCKED(&ip_nat_lock)
@@ -47,7 +48,6 @@
 static unsigned int ip_nat_htable_size;
 
 static struct list_head *bysource;
-static struct list_head *byipsproto;
 struct ip_nat_protocol *ip_nat_protos[MAX_IP_NAT_PROTO];
 
 
@@ -87,7 +87,6 @@
 
 	WRITE_LOCK(&ip_nat_lock);
 	list_del(&info->bysource);
-	list_del(&info->byipsproto);
 	WRITE_UNLOCK(&ip_nat_lock);
 }
 
@@ -118,30 +117,46 @@
 	return ip_conntrack_tuple_taken(&reply, ignored_conntrack);
 }
 
+/* Before 2.6.11 we did implicit source NAT if required. Warn about change. */
+static void warn_if_extra_mangle(u32 dstip, u32 srcip)
+{
+	static int warned = 0;
+	struct flowi fl = { .nl_u = { .ip4_u = { .daddr = dstip } } };
+	struct rtable *rt;
+
+	if (ip_route_output_key(&rt, &fl) != 0)
+		return;
+
+	if (rt->rt_src != srcip && !warned) {
+		printk("NAT: no longer support implicit source local NAT\n");
+		printk("NAT: packet src %u.%u.%u.%u -> dst %u.%u.%u.%u\n",
+		       NIPQUAD(srcip), NIPQUAD(dstip));
+		warned = 1;
+	}
+	ip_rt_put(rt);
+}
+
 /* If we source map this tuple so reply looks like reply_tuple, will
- * that meet the constraints of mr. */
+ * that meet the constraints of range. */
 static int
 in_range(const struct ip_conntrack_tuple *tuple,
-	 const struct ip_nat_multi_range *mr)
+	 const struct ip_nat_range *range)
 {
 	struct ip_nat_protocol *proto = ip_nat_find_proto(tuple->dst.protonum);
-	unsigned int i;
-
-	for (i = 0; i < mr->rangesize; i++) {
-		/* If we are supposed to map IPs, then we must be in the
-		   range specified. */
-		if (mr->range[i].flags & IP_NAT_RANGE_MAP_IPS) {
-			if (ntohl(tuple->src.ip) < ntohl(mr->range[i].min_ip)
-			    || (ntohl(tuple->src.ip)
-				> ntohl(mr->range[i].max_ip)))
-				continue;
-		}
 
-		if (!(mr->range[i].flags & IP_NAT_RANGE_PROTO_SPECIFIED)
-		    || proto->in_range(tuple, IP_NAT_MANIP_SRC,
-				       &mr->range[i].min, &mr->range[i].max))
-			return 1;
+	/* If we are supposed to map IPs, then we must be in the
+	   range specified, otherwise let this drag us onto a new src IP. */
+	if (range->flags & IP_NAT_RANGE_MAP_IPS) {
+		if (ntohl(tuple->src.ip) < ntohl(range->min_ip)
+		    || ntohl(tuple->src.ip) > ntohl(range->max_ip))
+			return 0;
 	}
+
+	if (!(range->flags & IP_NAT_RANGE_PROTO_SPECIFIED)
+	    || proto->in_range(tuple, IP_NAT_MANIP_SRC,
+			       &range->min, &range->max))
+		return 1;
+
 	return 0;
 }
 
@@ -161,7 +176,7 @@
 static int
 find_appropriate_src(const struct ip_conntrack_tuple *tuple,
 		     struct ip_conntrack_tuple *result,
-		     const struct ip_nat_multi_range *mr)
+		     const struct ip_nat_range *range)
 {
 	unsigned int h = hash_by_src(&tuple->src, tuple->dst.protonum);
 	struct ip_conntrack *ct;
@@ -175,218 +190,71 @@
 				       &ct->tuplehash[IP_CT_DIR_REPLY].tuple);
 			result->dst = tuple->dst;
 
-			if (in_range(result, mr))
+			if (in_range(result, range))
 				return 1;
 		}
 	}
 	return 0;
 }
 
-#ifdef CONFIG_IP_NF_NAT_LOCAL
-/* If it's really a local destination manip, it may need to do a
-   source manip too. */
-static int
-do_extra_mangle(u_int32_t var_ip, u_int32_t *other_ipp)
-{
-	struct flowi fl = { .nl_u = { .ip4_u = { .daddr = var_ip } } };
-	struct rtable *rt;
-
-	/* FIXME: IPTOS_TOS(iph->tos) --RR */
-	if (ip_route_output_key(&rt, &fl) != 0) {
-		DEBUGP("do_extra_mangle: Can't get route to %u.%u.%u.%u\n",
-		       NIPQUAD(var_ip));
-		return 0;
-	}
-
-	*other_ipp = rt->rt_src;
-	ip_rt_put(rt);
-	return 1;
-}
-#endif
-
-/* Simple way to iterate through all. */
-static inline int fake_cmp(const struct ip_conntrack *ct,
-			   u_int32_t src, u_int32_t dst, u_int16_t protonum,
-			   unsigned int *score, const struct ip_conntrack *ct2)
-{
-	/* Compare backwards: we're dealing with OUTGOING tuples, and
-           inside the conntrack is the REPLY tuple.  Don't count this
-           conntrack. */
-	if (ct != ct2
-	    && ct->tuplehash[IP_CT_DIR_REPLY].tuple.src.ip == dst
-	    && ct->tuplehash[IP_CT_DIR_REPLY].tuple.dst.ip == src
-	    && (ct->tuplehash[IP_CT_DIR_REPLY].tuple.dst.protonum == protonum))
-		(*score)++;
-	return 0;
-}
-
-static inline unsigned int
-count_maps(u_int32_t src, u_int32_t dst, u_int16_t protonum,
-	   const struct ip_conntrack *conntrack)
-{
-	struct ip_conntrack *ct;
-	unsigned int score = 0;
-	unsigned int h;
-
-	MUST_BE_READ_LOCKED(&ip_nat_lock);
-	h = hash_by_ipsproto(src, dst, protonum);
-	list_for_each_entry(ct, &byipsproto[h], nat.info.byipsproto)
-		fake_cmp(ct, src, dst, protonum, &score, conntrack);
-
-	return score;
-}
-
 /* For [FUTURE] fragmentation handling, we want the least-used
    src-ip/dst-ip/proto triple.  Fairness doesn't come into it.  Thus
    if the range specifies 1.2.3.4 ports 10000-10005 and 1.2.3.5 ports
    1-65535, we don't do pro-rata allocation based on ports; we choose
    the ip with the lowest src-ip/dst-ip/proto usage.
-
-   If an allocation then fails (eg. all 6 ports used in the 1.2.3.4
-   range), we eliminate that and try again.  This is not the most
-   efficient approach, but if you're worried about that, don't hand us
-   ranges you don't really have.  */
-static struct ip_nat_range *
+*/
+static void
 find_best_ips_proto(struct ip_conntrack_tuple *tuple,
-		    const struct ip_nat_multi_range *mr,
+		    const struct ip_nat_range *range,
 		    const struct ip_conntrack *conntrack,
 		    unsigned int hooknum)
 {
-	unsigned int i;
-	struct {
-		const struct ip_nat_range *range;
-		unsigned int score;
-		struct ip_conntrack_tuple tuple;
-	} best = { NULL,  0xFFFFFFFF };
-	u_int32_t *var_ipp, *other_ipp, saved_ip, orig_dstip;
-	static unsigned int randomness;
+	u_int32_t *var_ipp;
+	/* Host order */
+	u_int32_t minip, maxip, j;
+
+	/* No IP mapping?  Do nothing. */
+	if (!(range->flags & IP_NAT_RANGE_MAP_IPS))
+		return;
 
-	if (HOOK2MANIP(hooknum) == IP_NAT_MANIP_SRC) {
+	if (HOOK2MANIP(hooknum) == IP_NAT_MANIP_SRC)
 		var_ipp = &tuple->src.ip;
-		saved_ip = tuple->dst.ip;
-		other_ipp = &tuple->dst.ip;
-	} else {
+	else
 		var_ipp = &tuple->dst.ip;
-		saved_ip = tuple->src.ip;
-		other_ipp = &tuple->src.ip;
-	}
-	/* Don't do do_extra_mangle unless necessary (overrides
-           explicit socket bindings, for example) */
-	orig_dstip = tuple->dst.ip;
 
-	IP_NF_ASSERT(mr->rangesize >= 1);
-	for (i = 0; i < mr->rangesize; i++) {
-		/* Host order */
-		u_int32_t minip, maxip, j;
-
-		/* Don't do ranges which are already eliminated. */
-		if (mr->range[i].flags & IP_NAT_RANGE_FULL) {
-			continue;
-		}
-
-		if (mr->range[i].flags & IP_NAT_RANGE_MAP_IPS) {
-			minip = ntohl(mr->range[i].min_ip);
-			maxip = ntohl(mr->range[i].max_ip);
-		} else
-			minip = maxip = ntohl(*var_ipp);
-
-		randomness++;
-		for (j = 0; j < maxip - minip + 1; j++) {
-			unsigned int score;
-
-			*var_ipp = htonl(minip + (randomness + j) 
-					 % (maxip - minip + 1));
-
-			/* Reset the other ip in case it was mangled by
-			 * do_extra_mangle last time. */
-			*other_ipp = saved_ip;
-
-#ifdef CONFIG_IP_NF_NAT_LOCAL
-			if (hooknum == NF_IP_LOCAL_OUT
-			    && *var_ipp != orig_dstip
-			    && !do_extra_mangle(*var_ipp, other_ipp)) {
-				DEBUGP("Range %u %u.%u.%u.%u rt failed!\n",
-				       i, NIPQUAD(*var_ipp));
-				/* Can't route?  This whole range part is
-				 * probably screwed, but keep trying
-				 * anyway. */
-				continue;
-			}
-#endif
-
-			/* Count how many others map onto this. */
-			score = count_maps(tuple->src.ip, tuple->dst.ip,
-					   tuple->dst.protonum, conntrack);
-			if (score < best.score) {
-				/* Optimization: doesn't get any better than
-				   this. */
-				if (score == 0)
-					return (struct ip_nat_range *)
-						&mr->range[i];
-
-				best.score = score;
-				best.tuple = *tuple;
-				best.range = &mr->range[i];
-			}
-		}
-	}
-	*tuple = best.tuple;
-
-	/* Discard const. */
-	return (struct ip_nat_range *)best.range;
-}
-
-/* Fast version doesn't iterate through hash chains, but only handles
-   common case of single IP address (null NAT, masquerade) */
-static struct ip_nat_range *
-find_best_ips_proto_fast(struct ip_conntrack_tuple *tuple,
-			 const struct ip_nat_multi_range *mr,
-			 const struct ip_conntrack *conntrack,
-			 unsigned int hooknum)
-{
-	if (mr->rangesize != 1
-	    || (mr->range[0].flags & IP_NAT_RANGE_FULL)
-	    || ((mr->range[0].flags & IP_NAT_RANGE_MAP_IPS)
-		&& mr->range[0].min_ip != mr->range[0].max_ip))
-		return find_best_ips_proto(tuple, mr, conntrack, hooknum);
-
-	if (mr->range[0].flags & IP_NAT_RANGE_MAP_IPS) {
-		if (HOOK2MANIP(hooknum) == IP_NAT_MANIP_SRC)
-			tuple->src.ip = mr->range[0].min_ip;
-		else {
-			/* Only do extra mangle when required (breaks
-                           socket binding) */
-#ifdef CONFIG_IP_NF_NAT_LOCAL
-			if (tuple->dst.ip != mr->range[0].min_ip
-			    && hooknum == NF_IP_LOCAL_OUT
-			    && !do_extra_mangle(mr->range[0].min_ip,
-						&tuple->src.ip))
-				return NULL;
-#endif
-			tuple->dst.ip = mr->range[0].min_ip;
-		}
+	/* Fast path: only one choice. */
+	if (range->min_ip == range->max_ip) {
+		*var_ipp = range->min_ip;
+		return;
 	}
 
-	/* Discard const. */
-	return (struct ip_nat_range *)&mr->range[0];
-}
-
-static int
+	/* Hashing source and destination IPs gives a fairly even
+	 * spread in practice (if there are a small number of IPs
+	 * involved, there usually aren't that many connections
+	 * anyway).  The consistency means that servers see the same
+	 * client coming from the same IP (some Internet Backing sites
+	 * like this), even across reboots. */
+	minip = ntohl(range->min_ip);
+	maxip = ntohl(range->max_ip);
+	j = jhash_2words(tuple->src.ip, tuple->dst.ip, 0);
+	*var_ipp = htonl(minip + j % (maxip - minip + 1));
+}
+
+/* Manipulate the tuple into the range given.  For NF_IP_POST_ROUTING,
+ * we change the source to map into the range.  For NF_IP_PRE_ROUTING
+ * and NF_IP_LOCAL_OUT, we change the destination to map into the
+ * range.  It might not be possible to get a unique tuple, but we try.
+ * At worst (or if we race), we will end up with a final duplicate in
+ * __ip_conntrack_confirm and drop the packet. */
+static void
 get_unique_tuple(struct ip_conntrack_tuple *tuple,
 		 const struct ip_conntrack_tuple *orig_tuple,
-		 const struct ip_nat_multi_range *mrr,
+		 const struct ip_nat_range *range,
 		 struct ip_conntrack *conntrack,
 		 unsigned int hooknum)
 {
 	struct ip_nat_protocol *proto
 		= ip_nat_find_proto(orig_tuple->dst.protonum);
-	struct ip_nat_range *rptr;
-	unsigned int i;
-	int ret;
-
-	/* We temporarily use flags for marking full parts, but we
-	   always clean up afterwards */
-	struct ip_nat_multi_range *mr = (void *)mrr;
 
 	/* 1) If this srcip/proto/src-proto-part is currently mapped,
 	   and that same mapping gives a unique tuple within the given
@@ -396,92 +264,46 @@
 	   So far, we don't do local source mappings, so multiple
 	   manips not an issue.  */
 	if (hooknum == NF_IP_POST_ROUTING) {
-		if (find_appropriate_src(orig_tuple, tuple, mr)) {
+		if (find_appropriate_src(orig_tuple, tuple, range)) {
 			DEBUGP("get_unique_tuple: Found current src map\n");
 			if (!ip_nat_used_tuple(tuple, conntrack))
-				return 1;
+				return;
 		}
 	}
 
 	/* 2) Select the least-used IP/proto combination in the given
-	   range.
-	*/
+	   range. */
 	*tuple = *orig_tuple;
-	while ((rptr = find_best_ips_proto_fast(tuple, mr, conntrack, hooknum))
-	       != NULL) {
-		DEBUGP("Found best for "); DUMP_TUPLE(tuple);
-		/* 3) The per-protocol part of the manip is made to
-		   map into the range to make a unique tuple. */
-
-		/* Only bother mapping if it's not already in range
-		   and unique */
-		if ((!(rptr->flags & IP_NAT_RANGE_PROTO_SPECIFIED)
-		     || proto->in_range(tuple, HOOK2MANIP(hooknum),
-					&rptr->min, &rptr->max))
-		    && !ip_nat_used_tuple(tuple, conntrack)) {
-			ret = 1;
-			goto clear_fulls;
-		} else {
-			if (proto->unique_tuple(tuple, rptr,
-						HOOK2MANIP(hooknum),
-						conntrack)) {
-				/* Must be unique. */
-				IP_NF_ASSERT(!ip_nat_used_tuple(tuple,
-								conntrack));
-				ret = 1;
-				goto clear_fulls;
-			} else if (HOOK2MANIP(hooknum) == IP_NAT_MANIP_DST) {
-				/* Try implicit source NAT; protocol
-                                   may be able to play with ports to
-                                   make it unique. */
-				struct ip_nat_range r
-					= { IP_NAT_RANGE_MAP_IPS, 
-					    tuple->src.ip, tuple->src.ip,
-					    { 0 }, { 0 } };
-				DEBUGP("Trying implicit mapping\n");
-				if (proto->unique_tuple(tuple, &r,
-							IP_NAT_MANIP_SRC,
-							conntrack)) {
-					/* Must be unique. */
-					IP_NF_ASSERT(!ip_nat_used_tuple
-						     (tuple, conntrack));
-					ret = 1;
-					goto clear_fulls;
-				}
-			}
-			DEBUGP("Protocol can't get unique tuple %u.\n",
-			       hooknum);
-		}
+	find_best_ips_proto(tuple, range, conntrack, hooknum);
 
-		/* Eliminate that from range, and try again. */
-		rptr->flags |= IP_NAT_RANGE_FULL;
-		*tuple = *orig_tuple;
-	}
+	if (hooknum == NF_IP_LOCAL_OUT && tuple->dst.ip != orig_tuple->dst.ip)
+		warn_if_extra_mangle(tuple->src.ip, tuple->dst.ip);
 
-	ret = 0;
-
- clear_fulls:
-	/* Clear full flags. */
-	IP_NF_ASSERT(mr->rangesize >= 1);
-	for (i = 0; i < mr->rangesize; i++)
-		mr->range[i].flags &= ~IP_NAT_RANGE_FULL;
+	/* 3) The per-protocol part of the manip is made to map into
+	   the range to make a unique tuple. */
 
-	return ret;
+	/* Only bother mapping if it's not already in range and unique */
+	if ((!(range->flags & IP_NAT_RANGE_PROTO_SPECIFIED)
+	     || proto->in_range(tuple, HOOK2MANIP(hooknum),
+				&range->min, &range->max))
+	    && !ip_nat_used_tuple(tuple, conntrack))
+		return;
+
+	/* Last change: get protocol to try to obtain unique tuple. */
+	proto->unique_tuple(tuple, range, HOOK2MANIP(hooknum), conntrack);
 }
 
 /* Where to manip the reply packets (will be reverse manip). */
 static unsigned int opposite_hook[NF_IP_NUMHOOKS]
 = { [NF_IP_PRE_ROUTING] = NF_IP_POST_ROUTING,
     [NF_IP_POST_ROUTING] = NF_IP_PRE_ROUTING,
-#ifdef CONFIG_IP_NF_NAT_LOCAL
     [NF_IP_LOCAL_OUT] = NF_IP_LOCAL_IN,
     [NF_IP_LOCAL_IN] = NF_IP_LOCAL_OUT,
-#endif
 };
 
 unsigned int
 ip_nat_setup_info(struct ip_conntrack *conntrack,
-		  const struct ip_nat_multi_range *mr,
+		  const struct ip_nat_range *range,
 		  unsigned int hooknum)
 {
 	struct ip_conntrack_tuple new_tuple, inv_tuple, reply;
@@ -531,38 +353,21 @@
 	}
 #endif
 
-	do {
-		if (!get_unique_tuple(&new_tuple, &orig_tp, mr, conntrack,
-				      hooknum)) {
-			DEBUGP("ip_nat_setup_info: Can't get unique for %p.\n",
-			       conntrack);
-			return NF_DROP;
-		}
+	get_unique_tuple(&new_tuple, &orig_tp, range, conntrack, hooknum);
 
-#if 0
-		DEBUGP("Hook %u (%s) %p\n", hooknum,
-		       HOOK2MANIP(hooknum)==IP_NAT_MANIP_SRC ? "SRC" : "DST",
-		       conntrack);
-		DEBUGP("Original: ");
-		DUMP_TUPLE(&orig_tp);
-		DEBUGP("New: ");
-		DUMP_TUPLE(&new_tuple);
-#endif
+	/* We now have two tuples (SRCIP/SRCPT/DSTIP/DSTPT):
+	   the original (A/B/C/D') and the mangled one (E/F/G/H').
 
-		/* We now have two tuples (SRCIP/SRCPT/DSTIP/DSTPT):
-		   the original (A/B/C/D') and the mangled one (E/F/G/H').
+	   We're only allowed to work with the SRC per-proto
+	   part, so we create inverses of both to start, then
+	   derive the other fields we need.  */
 
-		   We're only allowed to work with the SRC per-proto
-		   part, so we create inverses of both to start, then
-		   derive the other fields we need.  */
-
-		/* Reply connection: simply invert the new tuple
-                   (G/H/E/F') */
-		invert_tuplepr(&reply, &new_tuple);
-
-		/* Alter conntrack table so it recognizes replies.
-                   If fail this race (reply tuple now used), repeat. */
-	} while (!ip_conntrack_alter_reply(conntrack, &reply));
+	/* Reply connection: simply invert the new tuple
+	   (G/H/E/F') */
+	invert_tuplepr(&reply, &new_tuple);
+
+	/* Alter conntrack table so will recognize replies. */
+	ip_conntrack_alter_reply(conntrack, &reply);
 
 	/* FIXME: We can simply used existing conntrack reply tuple
            here --RR */
@@ -571,6 +376,9 @@
 
 	/* Has source changed?. */
 	if (!ip_ct_tuple_src_equal(&new_tuple, &orig_tp)) {
+		IP_NF_ASSERT(HOOK2MANIP(hooknum) == IP_NAT_MANIP_SRC);
+		IP_NF_ASSERT(ip_ct_tuple_dst_equal(&new_tuple, &orig_tp));
+
 		/* In this direction, a source manip. */
 		info->manips[info->num_manips++] =
 			((struct ip_nat_info_manip)
@@ -589,6 +397,8 @@
 
 	/* Has destination changed? */
 	if (!ip_ct_tuple_dst_equal(&new_tuple, &orig_tp)) {
+		IP_NF_ASSERT(HOOK2MANIP(hooknum) == IP_NAT_MANIP_DST);
+
 		/* In this direction, a destination manip */
 		info->manips[info->num_manips++] =
 			((struct ip_nat_info_manip)
@@ -629,19 +439,8 @@
 			      .tuple.src,
 			      conntrack->tuplehash[IP_CT_DIR_ORIGINAL]
 			      .tuple.dst.protonum);
-	/* We place packet as seen OUTGOUNG in byips_proto hash
-           (ie. reverse dst and src of reply packet. */
-	unsigned int ipsprotohash
-		= hash_by_ipsproto(conntrack->tuplehash[IP_CT_DIR_REPLY]
-				   .tuple.dst.ip,
-				   conntrack->tuplehash[IP_CT_DIR_REPLY]
-				   .tuple.src.ip,
-				   conntrack->tuplehash[IP_CT_DIR_REPLY]
-				   .tuple.dst.protonum);
-
 	MUST_BE_WRITE_LOCKED(&ip_nat_lock);
 	list_move(&info->bysource, &bysource[srchash]);
-	list_move(&info->byipsproto, &byipsproto[ipsprotohash]);
 }
 
 void place_in_hashes(struct ip_conntrack *conntrack,
@@ -652,19 +451,8 @@
 			      .tuple.src,
 			      conntrack->tuplehash[IP_CT_DIR_ORIGINAL]
 			      .tuple.dst.protonum);
-	/* We place packet as seen OUTGOUNG in byips_proto hash
-           (ie. reverse dst and src of reply packet. */
-	unsigned int ipsprotohash
-		= hash_by_ipsproto(conntrack->tuplehash[IP_CT_DIR_REPLY]
-				   .tuple.dst.ip,
-				   conntrack->tuplehash[IP_CT_DIR_REPLY]
-				   .tuple.src.ip,
-				   conntrack->tuplehash[IP_CT_DIR_REPLY]
-				   .tuple.dst.protonum);
-
 	MUST_BE_WRITE_LOCKED(&ip_nat_lock);
 	list_add(&info->bysource, &bysource[srchash]);
-	list_add(&info->byipsproto, &byipsproto[ipsprotohash]);
 }
 
 /* Returns true if succeeded. */
@@ -678,7 +466,7 @@
 	struct iphdr *iph;
 
 	(*pskb)->nfcache |= NFC_ALTERED;
-	if (!skb_ip_make_writable(pskb, iphdroff+sizeof(iph)))
+	if (!skb_ip_make_writable(pskb, iphdroff+sizeof(*iph)))
 		return 0;
 
 	iph = (void *)(*pskb)->data + iphdroff;
@@ -821,6 +609,23 @@
 	/* not reached */
 }
 
+static inline int tuple_src_equal_dst(const struct ip_conntrack_tuple *t1,
+                                      const struct ip_conntrack_tuple *t2)
+{
+	if (t1->dst.protonum != t2->dst.protonum || t1->src.ip != t2->dst.ip)
+		return 0;
+	if (t1->dst.protonum != IPPROTO_ICMP)
+		return t1->src.u.all == t2->dst.u.all;
+	else {
+		struct ip_conntrack_tuple inv;
+
+		/* ICMP tuples are asymetric */
+		invert_tuplepr(&inv, t1);
+		return inv.src.u.all == t2->src.u.all &&
+		       inv.dst.u.all == t2->dst.u.all;
+	}
+}
+
 int
 icmp_reply_translation(struct sk_buff **pskb,
 		       struct ip_conntrack *conntrack,
@@ -833,6 +638,7 @@
 	} *inside;
 	unsigned int i;
 	struct ip_nat_info *info = &conntrack->nat.info;
+	struct ip_conntrack_tuple *cttuple, innertuple;
 	int hdrlen;
 
 	if (!skb_ip_make_writable(pskb,(*pskb)->nh.iph->ihl*4+sizeof(*inside)))
@@ -876,6 +682,13 @@
 	   such addresses are not too uncommon, as Alan Cox points
 	   out) */
 
+	if (!ip_ct_get_tuple(&inside->ip, *pskb, (*pskb)->nh.iph->ihl*4 +
+	                     sizeof(struct icmphdr) + inside->ip.ihl*4,
+	                     &innertuple,
+	                     ip_ct_find_proto(inside->ip.protocol)))
+		return 0;
+	cttuple = &conntrack->tuplehash[dir].tuple;
+
 	READ_LOCK(&ip_nat_lock);
 	for (i = 0; i < info->num_manips; i++) {
 		DEBUGP("icmp_reply: manip %u dir %s hook %u\n",
@@ -885,37 +698,52 @@
 		if (info->manips[i].direction != dir)
 			continue;
 
-		/* Mapping the inner packet is just like a normal
-		   packet, except it was never src/dst reversed, so
-		   where we would normally apply a dst manip, we apply
-		   a src, and vice versa. */
-		if (info->manips[i].hooknum == hooknum) {
-			DEBUGP("icmp_reply: inner %s -> %u.%u.%u.%u %u\n",
-			       info->manips[i].maniptype == IP_NAT_MANIP_SRC
-			       ? "DST" : "SRC",
-			       NIPQUAD(info->manips[i].manip.ip),
-			       ntohs(info->manips[i].manip.u.udp.port));
-			if (!manip_pkt(inside->ip.protocol, pskb,
-				       (*pskb)->nh.iph->ihl*4
-				       + sizeof(inside->icmp),
-				       &info->manips[i].manip,
-				       !info->manips[i].maniptype))
-				goto unlock_fail;
+		/* Mapping the inner packet is just like a normal packet, except
+		 * it was never src/dst reversed, so where we would normally
+		 * apply a dst manip, we apply a src, and vice versa. */
+
+		/* Only true for forwarded packets, locally generated packets
+		 * never hit PRE_ROUTING, we need to apply their PRE_ROUTING
+		 * manips in LOCAL_OUT. */
+		if (hooknum == NF_IP_LOCAL_OUT &&
+		    info->manips[i].hooknum == NF_IP_PRE_ROUTING)
+			hooknum = info->manips[i].hooknum;
 
-			/* Outer packet needs to have IP header NATed like
-	                   it's a reply. */
+		if (info->manips[i].hooknum != hooknum)
+			continue;
 
-			/* Use mapping to map outer packet: 0 give no
-                           per-proto mapping */
-			DEBUGP("icmp_reply: outer %s -> %u.%u.%u.%u\n",
-			       info->manips[i].maniptype == IP_NAT_MANIP_SRC
-			       ? "SRC" : "DST",
-			       NIPQUAD(info->manips[i].manip.ip));
-			if (!manip_pkt(0, pskb, 0,
-				       &info->manips[i].manip,
-				       info->manips[i].maniptype))
-				goto unlock_fail;
+		/* ICMP errors may be generated locally for packets that
+		 * don't have all NAT manips applied yet. Verify manips
+		 * have been applied before reversing them */
+		if (info->manips[i].maniptype == IP_NAT_MANIP_SRC) {
+			if (!tuple_src_equal_dst(cttuple, &innertuple))
+				continue;
+		} else {
+			if (!tuple_src_equal_dst(&innertuple, cttuple))
+				continue;
 		}
+
+		DEBUGP("icmp_reply: inner %s -> %u.%u.%u.%u %u\n",
+		       info->manips[i].maniptype == IP_NAT_MANIP_SRC
+		       ? "DST" : "SRC", NIPQUAD(info->manips[i].manip.ip),
+		       ntohs(info->manips[i].manip.u.udp.port));
+		if (!manip_pkt(inside->ip.protocol, pskb,
+			       (*pskb)->nh.iph->ihl*4 + sizeof(inside->icmp),
+			       &info->manips[i].manip,
+			       !info->manips[i].maniptype))
+			goto unlock_fail;
+
+		/* Outer packet needs to have IP header NATed like
+                   it's a reply. */
+
+		/* Use mapping to map outer packet: 0 give no
+                          per-proto mapping */
+		DEBUGP("icmp_reply: outer %s -> %u.%u.%u.%u\n",
+		       info->manips[i].maniptype == IP_NAT_MANIP_SRC
+		       ? "SRC" : "DST", NIPQUAD(info->manips[i].manip.ip));
+		if (!manip_pkt(0, pskb, 0, &info->manips[i].manip,
+			       info->manips[i].maniptype))
+			goto unlock_fail;
 	}
 	READ_UNLOCK(&ip_nat_lock);
 
@@ -942,11 +770,9 @@
 	ip_nat_htable_size = ip_conntrack_htable_size;
 
 	/* One vmalloc for both hash tables */
-	bysource = vmalloc(sizeof(struct list_head) * ip_nat_htable_size*2);
-	if (!bysource) {
+	bysource = vmalloc(sizeof(struct list_head) * ip_nat_htable_size);
+	if (!bysource)
 		return -ENOMEM;
-	}
-	byipsproto = bysource + ip_nat_htable_size;
 
 	/* Sew in builtin protocols. */
 	WRITE_LOCK(&ip_nat_lock);
@@ -959,7 +785,6 @@
 
 	for (i = 0; i < ip_nat_htable_size; i++) {
 		INIT_LIST_HEAD(&bysource[i]);
-		INIT_LIST_HEAD(&byipsproto[i]);
 	}
 
 	/* FIXME: Man, this is a hack.  <SIGH> */
@@ -974,16 +799,16 @@
 }
 
 /* Clear NAT section of all conntracks, in case we're loaded again. */
-static int clean_nat(const struct ip_conntrack *i, void *data)
+static int clean_nat(struct ip_conntrack *i, void *data)
 {
-	memset((void *)&i->nat, 0, sizeof(i->nat));
+	memset(&i->nat, 0, sizeof(i->nat));
 	return 0;
 }
 
 /* Not __exit: called from ip_nat_standalone.c:init_or_cleanup() --RR */
 void ip_nat_cleanup(void)
 {
-	ip_ct_selective_cleanup(&clean_nat, NULL);
+	ip_ct_iterate_cleanup(&clean_nat, NULL);
 	ip_conntrack_destroyed = NULL;
 	vfree(bysource);
 }
diff -Nru a/net/ipv4/netfilter/ip_nat_ftp.c b/net/ipv4/netfilter/ip_nat_ftp.c
--- a/net/ipv4/netfilter/ip_nat_ftp.c	2005-01-10 20:11:20 -08:00
+++ b/net/ipv4/netfilter/ip_nat_ftp.c	2005-01-10 20:11:20 -08:00
@@ -44,7 +44,7 @@
 		 struct ip_conntrack *ct,
 		 struct ip_nat_info *info)
 {
-	struct ip_nat_multi_range mr;
+	struct ip_nat_range range;
 	u_int32_t newdstip, newsrcip, newip;
 	struct ip_ct_ftp_expect *exp_ftp_info;
 
@@ -80,20 +80,19 @@
 
 	DEBUGP("nat_expected: IP to %u.%u.%u.%u\n", NIPQUAD(newip));
 
-	mr.rangesize = 1;
 	/* We don't want to manip the per-protocol, just the IPs... */
-	mr.range[0].flags = IP_NAT_RANGE_MAP_IPS;
-	mr.range[0].min_ip = mr.range[0].max_ip = newip;
+	range.flags = IP_NAT_RANGE_MAP_IPS;
+	range.min_ip = range.max_ip = newip;
 
 	/* ... unless we're doing a MANIP_DST, in which case, make
 	   sure we map to the correct port */
 	if (HOOK2MANIP(hooknum) == IP_NAT_MANIP_DST) {
-		mr.range[0].flags |= IP_NAT_RANGE_PROTO_SPECIFIED;
-		mr.range[0].min = mr.range[0].max
+		range.flags |= IP_NAT_RANGE_PROTO_SPECIFIED;
+		range.min = range.max
 			= ((union ip_conntrack_manip_proto)
 				{ .tcp = { htons(exp_ftp_info->port) } });
 	}
-	return ip_nat_setup_info(ct, &mr, hooknum);
+	return ip_nat_setup_info(ct, &range, hooknum);
 }
 
 static int
@@ -170,18 +169,16 @@
 static int ftp_data_fixup(const struct ip_ct_ftp_expect *exp_ftp_info,
 			  struct ip_conntrack *ct,
 			  struct sk_buff **pskb,
+			  u32 tcp_seq,
 			  enum ip_conntrack_info ctinfo,
 			  struct ip_conntrack_expect *expect)
 {
 	u_int32_t newip;
-	struct iphdr *iph = (*pskb)->nh.iph;
-	struct tcphdr *tcph = (void *)iph + iph->ihl*4;
 	u_int16_t port;
 	struct ip_conntrack_tuple newtuple;
 
 	DEBUGP("FTP_NAT: seq %u + %u in %u\n",
-	       expect->seq, exp_ftp_info->len,
-	       ntohl(tcph->seq));
+	       expect->seq, exp_ftp_info->len, tcp_seq);
 
 	/* Change address inside packet to match way we're mapping
 	   this connection. */
@@ -218,7 +215,7 @@
 		return 0;
 
 	if (!mangle[exp_ftp_info->ftptype](pskb, newip, port,
-					  expect->seq - ntohl(tcph->seq),
+					  expect->seq - tcp_seq,
 					  exp_ftp_info->len, ct, ctinfo))
 		return 0;
 
@@ -233,7 +230,7 @@
 			 struct sk_buff **pskb)
 {
 	struct iphdr *iph = (*pskb)->nh.iph;
-	struct tcphdr *tcph = (void *)iph + iph->ihl*4;
+	struct tcphdr _tcph, *tcph;
 	unsigned int datalen;
 	int dir;
 	struct ip_ct_ftp_expect *exp_ftp_info;
@@ -256,12 +253,17 @@
 		return NF_ACCEPT;
 	}
 
+	/* We passed tcp tracking, plus ftp helper: this must succeed. */
+	tcph = skb_header_pointer(*pskb, iph->ihl * 4, sizeof(_tcph), &_tcph);
+	BUG_ON(!tcph);
+
 	datalen = (*pskb)->len - iph->ihl * 4 - tcph->doff * 4;
 	/* If it's in the right range... */
 	if (between(exp->seq + exp_ftp_info->len,
 		    ntohl(tcph->seq),
 		    ntohl(tcph->seq) + datalen)) {
-		if (!ftp_data_fixup(exp_ftp_info, ct, pskb, ctinfo, exp))
+		if (!ftp_data_fixup(exp_ftp_info, ct, pskb, ntohl(tcph->seq),
+				    ctinfo, exp))
 			return NF_DROP;
 	} else {
 		/* Half a match?  This means a partial retransmisison.
diff -Nru a/net/ipv4/netfilter/ip_nat_helper.c b/net/ipv4/netfilter/ip_nat_helper.c
--- a/net/ipv4/netfilter/ip_nat_helper.c	2005-01-10 20:11:16 -08:00
+++ b/net/ipv4/netfilter/ip_nat_helper.c	2005-01-10 20:11:16 -08:00
@@ -444,7 +444,7 @@
 }
 
 static int
-kill_helper(const struct ip_conntrack *i, void *helper)
+kill_helper(struct ip_conntrack *i, void *helper)
 {
 	int ret;
 
@@ -474,5 +474,5 @@
 	   forces admins to gen fake RSTs or bounce box, either of
 	   which is just a long-winded way of making things
 	   worse. --RR */
-	ip_ct_selective_cleanup(kill_helper, me);
+	ip_ct_iterate_cleanup(kill_helper, me);
 }
diff -Nru a/net/ipv4/netfilter/ip_nat_irc.c b/net/ipv4/netfilter/ip_nat_irc.c
--- a/net/ipv4/netfilter/ip_nat_irc.c	2005-01-10 20:11:23 -08:00
+++ b/net/ipv4/netfilter/ip_nat_irc.c	2005-01-10 20:11:23 -08:00
@@ -53,7 +53,7 @@
 		 struct ip_conntrack *ct,
 		 struct ip_nat_info *info)
 {
-	struct ip_nat_multi_range mr;
+	struct ip_nat_range range;
 	u_int32_t newdstip, newsrcip, newip;
 
 	struct ip_conntrack *master = master_ct(ct);
@@ -77,12 +77,11 @@
 
 	DEBUGP("nat_expected: IP to %u.%u.%u.%u\n", NIPQUAD(newip));
 
-	mr.rangesize = 1;
 	/* We don't want to manip the per-protocol, just the IPs. */
-	mr.range[0].flags = IP_NAT_RANGE_MAP_IPS;
-	mr.range[0].min_ip = mr.range[0].max_ip = newip;
+	range.flags = IP_NAT_RANGE_MAP_IPS;
+	range.min_ip = range.max_ip = newip;
 
-	return ip_nat_setup_info(ct, &mr, hooknum);
+	return ip_nat_setup_info(ct, &range, hooknum);
 }
 
 static int irc_data_fixup(const struct ip_ct_irc_expect *exp_irc_info,
diff -Nru a/net/ipv4/netfilter/ip_nat_proto_tcp.c b/net/ipv4/netfilter/ip_nat_proto_tcp.c
--- a/net/ipv4/netfilter/ip_nat_proto_tcp.c	2005-01-10 20:11:15 -08:00
+++ b/net/ipv4/netfilter/ip_nat_proto_tcp.c	2005-01-10 20:11:15 -08:00
@@ -91,8 +91,8 @@
 	struct iphdr *iph = (struct iphdr *)((*pskb)->data + iphdroff);
 	struct tcphdr *hdr;
 	unsigned int hdroff = iphdroff + iph->ihl*4;
-	u_int32_t oldip;
-	u_int16_t *portptr, oldport;
+	u32 oldip, oldsrc = iph->saddr, olddst = iph->daddr;
+	u16 *portptr, oldport;
 	int hdrsize = 8; /* TCP connection tracking guarantees this much */
 
 	/* this could be a inner header returned in icmp packet; in such
@@ -108,11 +108,11 @@
 
 	if (maniptype == IP_NAT_MANIP_SRC) {
 		/* Get rid of src ip and src pt */
-		oldip = iph->saddr;
+		oldip = oldsrc;
 		portptr = &hdr->source;
 	} else {
 		/* Get rid of dst ip and dst pt */
-		oldip = iph->daddr;
+		oldip = olddst;
 		portptr = &hdr->dest;
 	}
 
diff -Nru a/net/ipv4/netfilter/ip_nat_proto_udp.c b/net/ipv4/netfilter/ip_nat_proto_udp.c
--- a/net/ipv4/netfilter/ip_nat_proto_udp.c	2005-01-10 20:11:16 -08:00
+++ b/net/ipv4/netfilter/ip_nat_proto_udp.c	2005-01-10 20:11:16 -08:00
@@ -90,20 +90,20 @@
 	struct iphdr *iph = (struct iphdr *)((*pskb)->data + iphdroff);
 	struct udphdr *hdr;
 	unsigned int hdroff = iphdroff + iph->ihl*4;
-	u_int32_t oldip;
-	u_int16_t *portptr;
+	u32 oldip, oldsrc = iph->saddr, olddst = iph->daddr;
+	u16 *portptr;
 
-	if (!skb_ip_make_writable(pskb, hdroff + sizeof(hdr)))
+	if (!skb_ip_make_writable(pskb, hdroff + sizeof(*hdr)))
 		return 0;
 
 	hdr = (void *)(*pskb)->data + hdroff;
 	if (maniptype == IP_NAT_MANIP_SRC) {
 		/* Get rid of src ip and src pt */
-		oldip = iph->saddr;
+		oldip = oldsrc;
 		portptr = &hdr->source;
 	} else {
 		/* Get rid of dst ip and dst pt */
-		oldip = iph->daddr;
+		oldip = olddst;
 		portptr = &hdr->dest;
 	}
 	if (hdr->check) /* 0 is a special case meaning no checksum */
diff -Nru a/net/ipv4/netfilter/ip_nat_rule.c b/net/ipv4/netfilter/ip_nat_rule.c
--- a/net/ipv4/netfilter/ip_nat_rule.c	2005-01-10 20:11:18 -08:00
+++ b/net/ipv4/netfilter/ip_nat_rule.c	2005-01-10 20:11:18 -08:00
@@ -126,6 +126,7 @@
 {
 	struct ip_conntrack *ct;
 	enum ip_conntrack_info ctinfo;
+	const struct ip_nat_multi_range_compat *mr = targinfo;
 
 	IP_NF_ASSERT(hooknum == NF_IP_POST_ROUTING);
 
@@ -136,7 +137,7 @@
 	                    || ctinfo == IP_CT_RELATED + IP_CT_IS_REPLY));
 	IP_NF_ASSERT(out);
 
-	return ip_nat_setup_info(ct, targinfo, hooknum);
+	return ip_nat_setup_info(ct, &mr->range[0], hooknum);
 }
 
 static unsigned int ipt_dnat_target(struct sk_buff **pskb,
@@ -148,20 +149,17 @@
 {
 	struct ip_conntrack *ct;
 	enum ip_conntrack_info ctinfo;
+	const struct ip_nat_multi_range_compat *mr = targinfo;
 
-#ifdef CONFIG_IP_NF_NAT_LOCAL
 	IP_NF_ASSERT(hooknum == NF_IP_PRE_ROUTING
 		     || hooknum == NF_IP_LOCAL_OUT);
-#else
-	IP_NF_ASSERT(hooknum == NF_IP_PRE_ROUTING);
-#endif
 
 	ct = ip_conntrack_get(*pskb, &ctinfo);
 
 	/* Connection must be valid and new. */
 	IP_NF_ASSERT(ct && (ctinfo == IP_CT_NEW || ctinfo == IP_CT_RELATED));
 
-	return ip_nat_setup_info(ct, targinfo, hooknum);
+	return ip_nat_setup_info(ct, &mr->range[0], hooknum);
 }
 
 static int ipt_snat_checkentry(const char *tablename,
@@ -170,17 +168,15 @@
 			       unsigned int targinfosize,
 			       unsigned int hook_mask)
 {
-	struct ip_nat_multi_range *mr = targinfo;
+	struct ip_nat_multi_range_compat *mr = targinfo;
 
 	/* Must be a valid range */
-	if (targinfosize < sizeof(struct ip_nat_multi_range)) {
-		DEBUGP("SNAT: Target size %u too small\n", targinfosize);
+	if (mr->rangesize != 1) {
+		printk("SNAT: multiple ranges no longer supported\n");
 		return 0;
 	}
 
-	if (targinfosize != IPT_ALIGN((sizeof(struct ip_nat_multi_range)
-				       + (sizeof(struct ip_nat_range)
-					  * (mr->rangesize - 1))))) {
+	if (targinfosize != sizeof(struct ip_nat_multi_range_compat)) {
 		DEBUGP("SNAT: Target size %u wrong for %u ranges\n",
 		       targinfosize, mr->rangesize);
 		return 0;
@@ -205,17 +201,15 @@
 			       unsigned int targinfosize,
 			       unsigned int hook_mask)
 {
-	struct ip_nat_multi_range *mr = targinfo;
+	struct ip_nat_multi_range_compat *mr = targinfo;
 
 	/* Must be a valid range */
-	if (targinfosize < sizeof(struct ip_nat_multi_range)) {
-		DEBUGP("DNAT: Target size %u too small\n", targinfosize);
+	if (mr->rangesize != 1) {
+		printk("DNAT: multiple ranges no longer supported\n");
 		return 0;
 	}
 
-	if (targinfosize != IPT_ALIGN((sizeof(struct ip_nat_multi_range)
-				       + (sizeof(struct ip_nat_range)
-					  * (mr->rangesize - 1))))) {
+	if (targinfosize != sizeof(struct ip_nat_multi_range_compat)) {
 		DEBUGP("DNAT: Target size %u wrong for %u ranges\n",
 		       targinfosize, mr->rangesize);
 		return 0;
@@ -232,13 +226,6 @@
 		return 0;
 	}
 	
-#ifndef CONFIG_IP_NF_NAT_LOCAL
-	if (hook_mask & (1 << NF_IP_LOCAL_OUT)) {
-		DEBUGP("DNAT: CONFIG_IP_NF_NAT_LOCAL not enabled\n");
-		return 0;
-	}
-#endif
-
 	return 1;
 }
 
@@ -255,12 +242,12 @@
 		= (HOOK2MANIP(hooknum) == IP_NAT_MANIP_SRC
 		   ? conntrack->tuplehash[IP_CT_DIR_REPLY].tuple.dst.ip
 		   : conntrack->tuplehash[IP_CT_DIR_REPLY].tuple.src.ip);
-	struct ip_nat_multi_range mr
-		= { 1, { { IP_NAT_RANGE_MAP_IPS, ip, ip, { 0 }, { 0 } } } };
+	struct ip_nat_range range
+		= { IP_NAT_RANGE_MAP_IPS, ip, ip, { 0 }, { 0 } };
 
 	DEBUGP("Allocating NULL binding for %p (%u.%u.%u.%u)\n", conntrack,
 	       NIPQUAD(ip));
-	return ip_nat_setup_info(conntrack, &mr, hooknum);
+	return ip_nat_setup_info(conntrack, &range, hooknum);
 }
 
 int ip_nat_rule_find(struct sk_buff **pskb,
diff -Nru a/net/ipv4/netfilter/ip_nat_standalone.c b/net/ipv4/netfilter/ip_nat_standalone.c
--- a/net/ipv4/netfilter/ip_nat_standalone.c	2005-01-10 20:11:21 -08:00
+++ b/net/ipv4/netfilter/ip_nat_standalone.c	2005-01-10 20:11:21 -08:00
@@ -128,16 +128,7 @@
 		WRITE_LOCK(&ip_nat_lock);
 		/* Seen it before?  This can happen for loopback, retrans,
 		   or local packets.. */
-		if (!(info->initialized & (1 << maniptype))
-#ifndef CONFIG_IP_NF_NAT_LOCAL
-		    /* If this session has already been confirmed we must not
-		     * touch it again even if there is no mapping set up.
-		     * Can only happen on local->local traffic with
-		     * CONFIG_IP_NF_NAT_LOCAL disabled.
-		     */
-		    && !(ct->status & IPS_CONFIRMED)
-#endif
-		    ) {
+		if (!(info->initialized & (1 << maniptype))) {
 			unsigned int ret;
 
 			if (ct->master
@@ -146,15 +137,14 @@
 				ret = call_expect(master_ct(ct), pskb, 
 						  hooknum, ct, info);
 			} else {
-#ifdef CONFIG_IP_NF_NAT_LOCAL
 				/* LOCAL_IN hook doesn't have a chain!  */
 				if (hooknum == NF_IP_LOCAL_IN)
 					ret = alloc_null_binding(ct, info,
 								 hooknum);
 				else
-#endif
-				ret = ip_nat_rule_find(pskb, hooknum, in, out,
-						       ct, info);
+					ret = ip_nat_rule_find(pskb, hooknum,
+					                       in, out, ct,
+					                       info);
 			}
 
 			if (ret != NF_ACCEPT) {
@@ -180,6 +170,29 @@
 }
 
 static unsigned int
+ip_nat_in(unsigned int hooknum,
+          struct sk_buff **pskb,
+          const struct net_device *in,
+          const struct net_device *out,
+          int (*okfn)(struct sk_buff *))
+{
+	u_int32_t saddr, daddr;
+	unsigned int ret;
+
+	saddr = (*pskb)->nh.iph->saddr;
+	daddr = (*pskb)->nh.iph->daddr;
+
+	ret = ip_nat_fn(hooknum, pskb, in, out, okfn);
+	if (ret != NF_DROP && ret != NF_STOLEN
+	    && ((*pskb)->nh.iph->saddr != saddr
+	        || (*pskb)->nh.iph->daddr != daddr)) {
+		dst_release((*pskb)->dst);
+		(*pskb)->dst = NULL;
+	}
+	return ret;
+}
+
+static unsigned int
 ip_nat_out(unsigned int hooknum,
 	   struct sk_buff **pskb,
 	   const struct net_device *in,
@@ -211,7 +224,6 @@
 	return ip_nat_fn(hooknum, pskb, in, out, okfn);
 }
 
-#ifdef CONFIG_IP_NF_NAT_LOCAL
 static unsigned int
 ip_nat_local_fn(unsigned int hooknum,
 		struct sk_buff **pskb,
@@ -237,13 +249,12 @@
 		return ip_route_me_harder(pskb) == 0 ? ret : NF_DROP;
 	return ret;
 }
-#endif
 
 /* We must be after connection tracking and before packet filtering. */
 
 /* Before packet filtering, change destination */
 static struct nf_hook_ops ip_nat_in_ops = {
-	.hook		= ip_nat_fn,
+	.hook		= ip_nat_in,
 	.owner		= THIS_MODULE,
 	.pf		= PF_INET,
 	.hooknum	= NF_IP_PRE_ROUTING,
@@ -259,7 +270,6 @@
 	.priority	= NF_IP_PRI_NAT_SRC,
 };
 
-#ifdef CONFIG_IP_NF_NAT_LOCAL
 /* Before packet filtering, change destination */
 static struct nf_hook_ops ip_nat_local_out_ops = {
 	.hook		= ip_nat_local_fn,
@@ -277,7 +287,6 @@
 	.hooknum	= NF_IP_LOCAL_IN,
 	.priority	= NF_IP_PRI_NAT_SRC,
 };
-#endif
 
 /* Protocol registration. */
 int ip_nat_protocol_register(struct ip_nat_protocol *proto)
@@ -334,7 +343,6 @@
 		printk("ip_nat_init: can't register out hook.\n");
 		goto cleanup_inops;
 	}
-#ifdef CONFIG_IP_NF_NAT_LOCAL
 	ret = nf_register_hook(&ip_nat_local_out_ops);
 	if (ret < 0) {
 		printk("ip_nat_init: can't register local out hook.\n");
@@ -345,16 +353,13 @@
 		printk("ip_nat_init: can't register local in hook.\n");
 		goto cleanup_localoutops;
 	}
-#endif
 	return ret;
 
  cleanup:
-#ifdef CONFIG_IP_NF_NAT_LOCAL
 	nf_unregister_hook(&ip_nat_local_in_ops);
  cleanup_localoutops:
 	nf_unregister_hook(&ip_nat_local_out_ops);
  cleanup_outops:
-#endif
 	nf_unregister_hook(&ip_nat_out_ops);
  cleanup_inops:
 	nf_unregister_hook(&ip_nat_in_ops);
diff -Nru a/net/ipv4/netfilter/ip_nat_tftp.c b/net/ipv4/netfilter/ip_nat_tftp.c
--- a/net/ipv4/netfilter/ip_nat_tftp.c	2005-01-10 20:11:17 -08:00
+++ b/net/ipv4/netfilter/ip_nat_tftp.c	2005-01-10 20:11:17 -08:00
@@ -107,7 +107,7 @@
 	const struct ip_conntrack *master = ct->master->expectant;
 	const struct ip_conntrack_tuple *orig = 
 			&master->tuplehash[IP_CT_DIR_ORIGINAL].tuple;
-	struct ip_nat_multi_range mr;
+	struct ip_nat_range range;
 #if 0
 	const struct ip_conntrack_tuple *repl =
 			&master->tuplehash[IP_CT_DIR_REPLY].tuple;
@@ -124,21 +124,19 @@
 	IP_NF_ASSERT(master);
 	IP_NF_ASSERT(!(info->initialized & (1 << HOOK2MANIP(hooknum))));
 
-	mr.rangesize = 1;
-	mr.range[0].flags = IP_NAT_RANGE_MAP_IPS;
+	range.flags = IP_NAT_RANGE_MAP_IPS;
 
 	if (HOOK2MANIP(hooknum) == IP_NAT_MANIP_SRC) {
-		mr.range[0].min_ip = mr.range[0].max_ip = orig->dst.ip; 
+		range.min_ip = range.max_ip = orig->dst.ip; 
 		DEBUGP("orig: %u.%u.%u.%u:%u <-> %u.%u.%u.%u:%u "
 			"newsrc: %u.%u.%u.%u\n",
                         NIPQUAD((*pskb)->nh.iph->saddr), ntohs(uh->source),
  			NIPQUAD((*pskb)->nh.iph->daddr), ntohs(uh->dest),
 			NIPQUAD(orig->dst.ip));
 	} else {
-		mr.range[0].min_ip = mr.range[0].max_ip = orig->src.ip;
-		mr.range[0].min.udp.port = mr.range[0].max.udp.port = 
-							orig->src.u.udp.port;
-		mr.range[0].flags |= IP_NAT_RANGE_PROTO_SPECIFIED;
+		range.min_ip = range.max_ip = orig->src.ip;
+		range.min.udp.port = range.max.udp.port = orig->src.u.udp.port;
+		range.flags |= IP_NAT_RANGE_PROTO_SPECIFIED;
 
 		DEBUGP("orig: %u.%u.%u.%u:%u <-> %u.%u.%u.%u:%u "
 			"newdst: %u.%u.%u.%u:%u\n",
@@ -147,7 +145,7 @@
                         NIPQUAD(orig->src.ip), ntohs(orig->src.u.udp.port));
 	}
 
-	return ip_nat_setup_info(ct,&mr,hooknum);
+	return ip_nat_setup_info(ct, &range, hooknum);
 }
 
 static struct ip_nat_helper tftp[MAX_PORTS];
diff -Nru a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c
--- a/net/ipv4/netfilter/ip_tables.c	2005-01-10 20:11:17 -08:00
+++ b/net/ipv4/netfilter/ip_tables.c	2005-01-10 20:11:17 -08:00
@@ -26,6 +26,7 @@
 #include <asm/uaccess.h>
 #include <asm/semaphore.h>
 #include <linux/proc_fs.h>
+#include <linux/err.h>
 
 #include <linux/netfilter_ipv4/ip_tables.h>
 
@@ -408,87 +409,144 @@
 #endif
 }
 
-/* If it succeeds, returns element and locks mutex */
-static inline void *
-find_inlist_lock_noload(struct list_head *head,
-			const char *name,
-			int *error,
-			struct semaphore *mutex)
-{
-	void *ret;
-
-#if 0 
-	duprintf("find_inlist: searching for `%s' in %s.\n",
-		 name, head == &ipt_target ? "ipt_target"
-		 : head == &ipt_match ? "ipt_match"
-		 : head == &ipt_tables ? "ipt_tables" : "UNKNOWN");
-#endif
+/*
+ * These are weird, but module loading must not be done with mutex
+ * held (since they will register), and we have to have a single
+ * function to use try_then_request_module().
+ */
 
-	*error = down_interruptible(mutex);
-	if (*error != 0)
-		return NULL;
+/* Find table by name, grabs mutex & ref.  Returns ERR_PTR() on error. */
+static inline struct ipt_table *find_table_lock(const char *name)
+{
+	struct ipt_table *t;
 
-	ret = list_named_find(head, name);
-	if (!ret) {
-		*error = -ENOENT;
-		up(mutex);
-	}
-	return ret;
+	if (down_interruptible(&ipt_mutex) != 0)
+		return ERR_PTR(-EINTR);
+
+	list_for_each_entry(t, &ipt_tables, list)
+		if (strcmp(t->name, name) == 0 && try_module_get(t->me))
+			return t;
+	up(&ipt_mutex);
+	return NULL;
 }
 
-#ifndef CONFIG_KMOD
-#define find_inlist_lock(h,n,p,e,m) find_inlist_lock_noload((h),(n),(e),(m))
-#else
-static void *
-find_inlist_lock(struct list_head *head,
-		 const char *name,
-		 const char *prefix,
-		 int *error,
-		 struct semaphore *mutex)
-{
-	void *ret;
-
-	ret = find_inlist_lock_noload(head, name, error, mutex);
-	if (!ret) {
-		duprintf("find_inlist: loading `%s%s'.\n", prefix, name);
-		request_module("%s%s", prefix, name);
-		ret = find_inlist_lock_noload(head, name, error, mutex);
+/* Find match, grabs mutex & ref.  Returns ERR_PTR() on error. */
+static inline struct ipt_match *find_match_lock(const char *name, u8 revision)
+{
+	struct ipt_match *m;
+	int found = 0;
+
+	if (down_interruptible(&ipt_mutex) != 0)
+		return ERR_PTR(-EINTR);
+
+	list_for_each_entry(m, &ipt_match, list) {
+		if (strcmp(m->name, name) == 0) {
+			found = 1;
+			if (m->revision == revision) {
+				if (!try_module_get(m->me))
+					found = 0;
+				else
+					return m;
+			}
+		}
 	}
+	up(&ipt_mutex);
 
-	return ret;
-}
-#endif
+	/* Not found at all?  NULL so try_then_request_module loads module. */
+	if (!found)
+		return NULL;
 
-static inline struct ipt_table *
-ipt_find_table_lock(const char *name, int *error, struct semaphore *mutex)
-{
-	return find_inlist_lock(&ipt_tables, name, "iptable_", error, mutex);
+	return ERR_PTR(-EPROTOTYPE);
 }
 
-static inline struct ipt_match *
-find_match_lock(const char *name, int *error, struct semaphore *mutex)
+/* Find target, grabs mutex & ref.  Returns ERR_PTR() on error. */
+static inline struct ipt_target *find_target_lock(const char *name, u8 revision)
 {
-	return find_inlist_lock(&ipt_match, name, "ipt_", error, mutex);
+	struct ipt_target *t;
+	int found = 0;
+
+	if (down_interruptible(&ipt_mutex) != 0)
+		return ERR_PTR(-EINTR);
+
+	list_for_each_entry(t, &ipt_target, list) {
+		if (strcmp(t->name, name) == 0) {
+			found = 1;
+			if (t->revision == revision) {
+				if (!try_module_get(t->me))
+					found = 0;
+				else
+					return t;
+			}
+		}
+	}
+	up(&ipt_mutex);
+
+	/* Not found at all?  NULL so try_then_request_module loads module. */
+	if (!found)
+		return NULL;
+
+	return ERR_PTR(-EPROTOTYPE);
 }
 
-static struct ipt_target *
-ipt_find_target_lock(const char *name, int *error, struct semaphore *mutex)
+static int match_revfn(const char *name, u8 revision, int *bestp)
 {
-	return find_inlist_lock(&ipt_target, name, "ipt_", error, mutex);
+	struct ipt_match *m;
+	int have_rev = 0;
+
+	list_for_each_entry(m, &ipt_match, list) {
+		if (strcmp(m->name, name) == 0) {
+			if (m->revision > *bestp)
+				*bestp = m->revision;
+			if (m->revision == revision)
+				have_rev = 1;
+		}
+	}
+	return have_rev;
 }
 
-struct ipt_target *
-__ipt_find_target_lock(const char *name, int *error)
+static int target_revfn(const char *name, u8 revision, int *bestp)
 {
-	return ipt_find_target_lock(name,error,&ipt_mutex);
+	struct ipt_target *t;
+	int have_rev = 0;
+
+	list_for_each_entry(t, &ipt_target, list) {
+		if (strcmp(t->name, name) == 0) {
+			if (t->revision > *bestp)
+				*bestp = t->revision;
+			if (t->revision == revision)
+				have_rev = 1;
+		}
+	}
+	return have_rev;
 }
 
-void
-__ipt_mutex_up(void)
+/* Returns true or false (if no such extension at all) */
+static inline int find_revision(const char *name, u8 revision,
+				int (*revfn)(const char *, u8, int *),
+				int *err)
 {
+	int have_rev, best = -1;
+
+	if (down_interruptible(&ipt_mutex) != 0) {
+		*err = -EINTR;
+		return 1;
+	}
+	have_rev = revfn(name, revision, &best);
 	up(&ipt_mutex);
+
+	/* Nothing at all?  Return 0 to try loading module. */
+	if (best == -1) {
+		*err = -ENOENT;
+		return 0;
+	}
+
+	*err = best;
+	if (!have_rev)
+		*err = -EPROTONOSUPPORT;
+	return 1;
 }
 
+
 /* All zeroes == unconditional rule. */
 static inline int
 unconditional(const struct ipt_ip *ip)
@@ -648,17 +706,14 @@
 	    unsigned int hookmask,
 	    unsigned int *i)
 {
-	int ret;
 	struct ipt_match *match;
 
-	match = find_match_lock(m->u.user.name, &ret, &ipt_mutex);
-	if (!match) {
+	match = try_then_request_module(find_match_lock(m->u.user.name,
+							m->u.user.revision),
+					"ipt_%s", m->u.user.name);
+	if (IS_ERR(match) || !match) {
 		duprintf("check_match: `%s' not found\n", m->u.user.name);
-		return ret;
-	}
-	if (!try_module_get(match->me)) {
-		up(&ipt_mutex);
-		return -ENOENT;
+		return match ? PTR_ERR(match) : -ENOENT;
 	}
 	m->u.kernel.match = match;
 	up(&ipt_mutex);
@@ -699,14 +754,12 @@
 		goto cleanup_matches;
 
 	t = ipt_get_target(e);
-	target = ipt_find_target_lock(t->u.user.name, &ret, &ipt_mutex);
-	if (!target) {
+	target = try_then_request_module(find_target_lock(t->u.user.name,
+							  t->u.user.revision),
+					 "ipt_%s", t->u.user.name);
+	if (IS_ERR(target) || !target) {
 		duprintf("check_entry: `%s' not found\n", t->u.user.name);
-		goto cleanup_matches;
-	}
-	if (!try_module_get(target->me)) {
-		up(&ipt_mutex);
-		ret = -ENOENT;
+		ret = target ? PTR_ERR(target) : -ENOENT;
 		goto cleanup_matches;
 	}
 	t->u.kernel.target = target;
@@ -1036,8 +1089,8 @@
 	int ret;
 	struct ipt_table *t;
 
-	t = ipt_find_table_lock(entries->name, &ret, &ipt_mutex);
-	if (t) {
+	t = find_table_lock(entries->name);
+	if (t && !IS_ERR(t)) {
 		duprintf("t->private->number = %u\n",
 			 t->private->number);
 		if (entries->size == t->private->size)
@@ -1049,10 +1102,10 @@
 				 entries->size);
 			ret = -EINVAL;
 		}
+		module_put(t->me);
 		up(&ipt_mutex);
 	} else
-		duprintf("get_entries: Can't find %s!\n",
-			 entries->name);
+		ret = t ? PTR_ERR(t) : -ENOENT;
 
 	return ret;
 }
@@ -1103,25 +1156,21 @@
 
 	duprintf("ip_tables: Translated table\n");
 
-	t = ipt_find_table_lock(tmp.name, &ret, &ipt_mutex);
-	if (!t)
+	t = try_then_request_module(find_table_lock(tmp.name),
+				    "iptable_%s", tmp.name);
+	if (!t || IS_ERR(t)) {
+		ret = t ? PTR_ERR(t) : -ENOENT;
 		goto free_newinfo_counters_untrans;
+	}
 
 	/* You lied! */
 	if (tmp.valid_hooks != t->valid_hooks) {
 		duprintf("Valid hook crap: %08X vs %08X\n",
 			 tmp.valid_hooks, t->valid_hooks);
 		ret = -EINVAL;
-		goto free_newinfo_counters_untrans_unlock;
-	}
-
-	/* Get a reference in advance, we're not allowed fail later */
-	if (!try_module_get(t->me)) {
-		ret = -EBUSY;
-		goto free_newinfo_counters_untrans_unlock;
+		goto put_module;
 	}
 
-
 	oldinfo = replace_table(t, tmp.num_counters, newinfo, &ret);
 	if (!oldinfo)
 		goto put_module;
@@ -1141,16 +1190,15 @@
 	/* Decrease module usage counts and free resource */
 	IPT_ENTRY_ITERATE(oldinfo->entries, oldinfo->size, cleanup_entry,NULL);
 	vfree(oldinfo);
-	/* Silent error: too late now. */
-	copy_to_user(tmp.counters, counters,
-		     sizeof(struct ipt_counters) * tmp.num_counters);
+	if (copy_to_user(tmp.counters, counters,
+			 sizeof(struct ipt_counters) * tmp.num_counters) != 0)
+		ret = -EFAULT;
 	vfree(counters);
 	up(&ipt_mutex);
-	return 0;
+	return ret;
 
  put_module:
 	module_put(t->me);
- free_newinfo_counters_untrans_unlock:
 	up(&ipt_mutex);
  free_newinfo_counters_untrans:
 	IPT_ENTRY_ITERATE(newinfo->entries, newinfo->size, cleanup_entry,NULL);
@@ -1189,7 +1237,7 @@
 	unsigned int i;
 	struct ipt_counters_info tmp, *paddc;
 	struct ipt_table *t;
-	int ret;
+	int ret = 0;
 
 	if (copy_from_user(&tmp, user, sizeof(tmp)) != 0)
 		return -EFAULT;
@@ -1206,9 +1254,11 @@
 		goto free;
 	}
 
-	t = ipt_find_table_lock(tmp.name, &ret, &ipt_mutex);
-	if (!t)
+	t = find_table_lock(tmp.name);
+	if (!t || IS_ERR(t)) {
+		ret = t ? PTR_ERR(t) : -ENOENT;
 		goto free;
+	}
 
 	write_lock_bh(&t->lock);
 	if (t->private->number != paddc->num_counters) {
@@ -1225,6 +1275,7 @@
  unlock_up_free:
 	write_unlock_bh(&t->lock);
 	up(&ipt_mutex);
+	module_put(t->me);
  free:
 	vfree(paddc);
 
@@ -1281,8 +1332,10 @@
 			break;
 		}
 		name[IPT_TABLE_MAXNAMELEN-1] = '\0';
-		t = ipt_find_table_lock(name, &ret, &ipt_mutex);
-		if (t) {
+
+		t = try_then_request_module(find_table_lock(name),
+					    "iptable_%s", name);
+		if (t && !IS_ERR(t)) {
 			struct ipt_getinfo info;
 
 			info.valid_hooks = t->valid_hooks;
@@ -1298,9 +1351,10 @@
 				ret = -EFAULT;
 			else
 				ret = 0;
-
 			up(&ipt_mutex);
-		}
+			module_put(t->me);
+		} else
+			ret = t ? PTR_ERR(t) : -ENOENT;
 	}
 	break;
 
@@ -1321,6 +1375,31 @@
 		break;
 	}
 
+	case IPT_SO_GET_REVISION_MATCH:
+	case IPT_SO_GET_REVISION_TARGET: {
+		struct ipt_get_revision rev;
+		int (*revfn)(const char *, u8, int *);
+
+		if (*len != sizeof(rev)) {
+			ret = -EINVAL;
+			break;
+		}
+		if (copy_from_user(&rev, user, sizeof(rev)) != 0) {
+			ret = -EFAULT;
+			break;
+		}
+
+		if (cmd == IPT_SO_GET_REVISION_TARGET)
+			revfn = target_revfn;
+		else
+			revfn = match_revfn;
+
+		try_then_request_module(find_revision(rev.name, rev.revision,
+						      revfn, &ret),
+					"ipt_%s", rev.name);
+		break;
+	}
+
 	default:
 		duprintf("do_ipt_get_ctl: unknown request %i\n", cmd);
 		ret = -EINVAL;
@@ -1338,12 +1417,7 @@
 	ret = down_interruptible(&ipt_mutex);
 	if (ret != 0)
 		return ret;
-
-	if (!list_named_insert(&ipt_target, target)) {
-		duprintf("ipt_register_target: `%s' already in list!\n",
-			 target->name);
-		ret = -EINVAL;
-	}
+	list_add(&target->list, &ipt_target);
 	up(&ipt_mutex);
 	return ret;
 }
@@ -1365,11 +1439,7 @@
 	if (ret != 0)
 		return ret;
 
-	if (!list_named_insert(&ipt_match, match)) {
-		duprintf("ipt_register_match: `%s' already in list!\n",
-			 match->name);
-		ret = -EINVAL;
-	}
+	list_add(&match->list, &ipt_match);
 	up(&ipt_mutex);
 
 	return ret;
@@ -1889,8 +1959,6 @@
 EXPORT_SYMBOL(ipt_do_table);
 EXPORT_SYMBOL(ipt_register_target);
 EXPORT_SYMBOL(ipt_unregister_target);
-EXPORT_SYMBOL_GPL(__ipt_find_target_lock);
-EXPORT_SYMBOL_GPL(__ipt_mutex_up);
 
 module_init(init);
 module_exit(fini);
diff -Nru a/net/ipv4/netfilter/ipchains_core.c b/net/ipv4/netfilter/ipchains_core.c
--- a/net/ipv4/netfilter/ipchains_core.c	2005-01-10 20:11:22 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,1854 +0,0 @@
-#warning ipchains is obsolete, and will be removed soon.
-
-/* Minor modifications to fit on compatibility framework:
-   Rusty.Russell@rustcorp.com.au
-*/
-
-/*
- * This code is heavily based on the code on the old ip_fw.c code; see below for
- * copyrights and attributions of the old code.  This code is basically GPL.
- *
- * 15-Aug-1997: Major changes to allow graphs for firewall rules.
- *              Paul Russell <Paul.Russell@rustcorp.com.au> and
- *		Michael Neuling <Michael.Neuling@rustcorp.com.au>
- * 24-Aug-1997: Generalised protocol handling (not just TCP/UDP/ICMP).
- *              Added explicit RETURN from chains.
- *              Removed TOS mangling (done in ipchains 1.0.1).
- *              Fixed read & reset bug by reworking proc handling.
- *              Paul Russell <Paul.Russell@rustcorp.com.au>
- * 28-Sep-1997: Added packet marking for net sched code.
- *              Removed fw_via comparisons: all done on device name now,
- *              similar to changes in ip_fw.c in DaveM's CVS970924 tree.
- *              Paul Russell <Paul.Russell@rustcorp.com.au>
- * 2-Nov-1997:  Moved types across to __u16, etc.
- *              Added inverse flags.
- *              Fixed fragment bug (in args to port_match).
- *              Changed mark to only one flag (MARKABS).
- * 21-Nov-1997: Added ability to test ICMP code.
- * 19-Jan-1998: Added wildcard interfaces.
- * 6-Feb-1998:  Merged 2.0 and 2.1 versions.
- *              Initialised ip_masq for 2.0.x version.
- *              Added explicit NETLINK option for 2.1.x version.
- *              Added packet and byte counters for policy matches.
- * 26-Feb-1998: Fixed race conditions, added SMP support.
- * 18-Mar-1998: Fix SMP, fix race condition fix.
- * 1-May-1998:  Remove caching of device pointer.
- * 12-May-1998: Allow tiny fragment case for TCP/UDP.
- * 15-May-1998: Treat short packets as fragments, don't just block.
- * 3-Jan-1999:  Fixed serious procfs security hole -- users should never
- *              be allowed to view the chains!
- *              Marc Santoro <ultima@snicker.emoti.com>
- * 29-Jan-1999: Locally generated bogus IPs dealt with, rather than crash
- *              during dump_packet. --RR.
- * 19-May-1999: Star Wars: The Phantom Menace opened.  Rule num
- *		printed in log (modified from Michael Hasenstein's patch).
- *		Added SYN in log message. --RR
- * 23-Jul-1999: Fixed small fragment security exposure opened on 15-May-1998.
- *              John McDonald <jm@dataprotect.com>
- *              Thomas Lopatic <tl@dataprotect.com>
- */
-
-/*
- *
- * The origina Linux port was done Alan Cox, with changes/fixes from
- * Pauline Middlelink, Jos Vos, Thomas Quinot, Wouter Gadeyne, Juan
- * Jose Ciarlante, Bernd Eckenfels, Keith Owens and others.
- *
- * Copyright from the original FreeBSD version follows:
- *
- * Copyright (c) 1993 Daniel Boulet
- * Copyright (c) 1994 Ugen J.S.Antsilevich
- *
- * Redistribution and use in source forms, with and without modification,
- * are permitted provided that this entire comment appears intact.
- *
- * Redistribution in binary form may occur without any restrictions.
- * Obviously, it would be nice if you gave credit where credit is due
- * but requiring it would be too onerous.
- *
- * This software is provided ``AS IS'' without any warranties of any kind.  */
-
-#include <linux/config.h>
-
-#include <asm/uaccess.h>
-#include <asm/system.h>
-#include <linux/types.h>
-#include <linux/sched.h>
-#include <linux/string.h>
-#include <linux/errno.h>
-#include <linux/module.h>
-
-#include <linux/socket.h>
-#include <linux/sockios.h>
-#include <linux/in.h>
-#include <linux/inet.h>
-#include <linux/netdevice.h>
-#include <linux/icmp.h>
-#include <linux/udp.h>
-#include <net/ip.h>
-#include <net/protocol.h>
-#include <net/route.h>
-#include <net/tcp.h>
-#include <net/udp.h>
-#include <net/sock.h>
-#include <net/icmp.h>
-#include <linux/netlink.h>
-#include <linux/netfilter.h>
-#include <linux/netfilter_ipv4/compat_firewall.h>
-#include <linux/netfilter_ipv4/ipchains_core.h>
-#include <linux/netfilter_ipv4/ip_nat_core.h>
-
-#include <net/checksum.h>
-#include <linux/proc_fs.h>
-#include <linux/stat.h>
-
-MODULE_LICENSE("Dual BSD/GPL");
-MODULE_AUTHOR("Rusty Russell <rusty@rustcorp.com.au>");
-MODULE_DESCRIPTION("ipchains backwards compatibility layer");
-
-/* Understanding locking in this code: (thanks to Alan Cox for using
- * little words to explain this to me). -- PR
- *
- * In UP, there can be two packets traversing the chains:
- * 1) A packet from the current userspace context
- * 2) A packet off the bh handlers (timer or net).
- *
- * For SMP (kernel v2.1+), multiply this by # CPUs.
- *
- * [Note that this in not correct for 2.2 - because the socket code always
- *  uses lock_kernel() to serialize, and bottom halves (timers and net_bhs)
- *  only run on one CPU at a time.  This will probably change for 2.3.
- *  It is still good to use spinlocks because that avoids the global cli()
- *  for updating the tables, which is rather costly in SMP kernels -AK]
- *
- * This means counters and backchains can get corrupted if no precautions
- * are taken.
- *
- * To actually alter a chain on UP, we need only do a cli(), as this will
- * stop a bh handler firing, as we are in the current userspace context
- * (coming from a setsockopt()).
- *
- * On SMP, we need a write_lock_irqsave(), which is a simple cli() in
- * UP.
- *
- * For backchains and counters, we use an array, indexed by
- * [smp_processor_id()*2 + !in_interrupt()]; the array is of
- * size [NR_CPUS*2].  For v2.0, NR_CPUS is effectively 1.  So,
- * confident of uniqueness, we modify counters even though we only
- * have a read lock (to read the counters, you need a write lock,
- * though).  */
-
-/* Why I didn't use straight locking... -- PR
- *
- * The backchains can be separated out of the ip_chains structure, and
- * allocated as needed inside ip_fw_check().
- *
- * The counters, however, can't.  Trying to lock these means blocking
- * interrupts every time we want to access them.  This would suck HARD
- * performance-wise.  Not locking them leads to possible corruption,
- * made worse on 32-bit machines (counters are 64-bit).  */
-
-/*#define DEBUG_IP_FIREWALL*/
-/*#define DEBUG_ALLOW_ALL*/ /* Useful for remote debugging */
-/*#define DEBUG_IP_FIREWALL_USER*/
-/*#define DEBUG_IP_FIREWALL_LOCKING*/
-
-#if defined(CONFIG_NETLINK_DEV) || defined(CONFIG_NETLINK_DEV_MODULE)
-static struct sock *ipfwsk;
-#endif
-
-#ifdef CONFIG_SMP
-#define SLOT_NUMBER() (smp_processor_id()*2 + !in_interrupt())
-#else /* !SMP */
-#define SLOT_NUMBER() (!in_interrupt())
-#endif /* CONFIG_SMP */
-#define NUM_SLOTS (NR_CPUS*2)
-
-#define SIZEOF_STRUCT_IP_CHAIN (sizeof(struct ip_chain) \
-				+ NUM_SLOTS*sizeof(struct ip_reent))
-#define SIZEOF_STRUCT_IP_FW_KERNEL (sizeof(struct ip_fwkernel) \
-				    + NUM_SLOTS*sizeof(struct ip_counters))
-
-#ifdef DEBUG_IP_FIREWALL_LOCKING
-static unsigned int fwc_rlocks, fwc_wlocks;
-#define FWC_DEBUG_LOCK(d)			\
-do {						\
-	FWC_DONT_HAVE_LOCK(d);			\
-	d |= (1 << SLOT_NUMBER());		\
-} while (0)
-
-#define FWC_DEBUG_UNLOCK(d)			\
-do {						\
-	FWC_HAVE_LOCK(d);			\
-	d &= ~(1 << SLOT_NUMBER());		\
-} while (0)
-
-#define FWC_DONT_HAVE_LOCK(d)					\
-do {								\
-	if ((d) & (1 << SLOT_NUMBER()))				\
-		printk("%s:%i: Got lock on %i already!\n", 	\
-		       __FILE__, __LINE__, SLOT_NUMBER());	\
-} while(0)
-
-#define FWC_HAVE_LOCK(d)				\
-do {							\
-	if (!((d) & (1 << SLOT_NUMBER())))		\
-	printk("%s:%i:No lock on %i!\n", 		\
-	       __FILE__, __LINE__, SLOT_NUMBER());	\
-} while (0)
-
-#else
-#define FWC_DEBUG_LOCK(d) do { } while(0)
-#define FWC_DEBUG_UNLOCK(d) do { } while(0)
-#define FWC_DONT_HAVE_LOCK(d) do { } while(0)
-#define FWC_HAVE_LOCK(d) do { } while(0)
-#endif /*DEBUG_IP_FIRWALL_LOCKING*/
-
-#define FWC_READ_LOCK(l) do { FWC_DEBUG_LOCK(fwc_rlocks); read_lock(l); } while (0)
-#define FWC_WRITE_LOCK(l) do { FWC_DEBUG_LOCK(fwc_wlocks); write_lock(l); } while (0)
-#define FWC_READ_LOCK_IRQ(l,f) do { FWC_DEBUG_LOCK(fwc_rlocks); read_lock_irqsave(l,f); } while (0)
-#define FWC_WRITE_LOCK_IRQ(l,f) do { FWC_DEBUG_LOCK(fwc_wlocks); write_lock_irqsave(l,f); } while (0)
-#define FWC_READ_UNLOCK(l) do { FWC_DEBUG_UNLOCK(fwc_rlocks); read_unlock(l); } while (0)
-#define FWC_WRITE_UNLOCK(l) do { FWC_DEBUG_UNLOCK(fwc_wlocks); write_unlock(l); } while (0)
-#define FWC_READ_UNLOCK_IRQ(l,f) do { FWC_DEBUG_UNLOCK(fwc_rlocks); read_unlock_irqrestore(l,f); } while (0)
-#define FWC_WRITE_UNLOCK_IRQ(l,f) do { FWC_DEBUG_UNLOCK(fwc_wlocks); write_unlock_irqrestore(l,f); } while (0)
-
-struct ip_chain;
-
-struct ip_counters
-{
-	__u64 pcnt, bcnt;			/* Packet and byte counters */
-};
-
-struct ip_fwkernel
-{
-	struct ip_fw ipfw;
-	struct ip_fwkernel *next;	/* where to go next if current
-					 * rule doesn't match */
-	struct ip_chain *branch;	/* which branch to jump to if
-					 * current rule matches */
-	int simplebranch;		/* Use this if branch == NULL */
-	struct ip_counters counters[0]; /* Actually several of these */
-};
-
-struct ip_reent
-{
-	struct ip_chain *prevchain;	/* Pointer to referencing chain */
-	struct ip_fwkernel *prevrule;	/* Pointer to referencing rule */
-	struct ip_counters counters;
-};
-
-struct ip_chain
-{
-	ip_chainlabel label;	    /* Defines the label for each block */
- 	struct ip_chain *next;	    /* Pointer to next block */
-	struct ip_fwkernel *chain;  /* Pointer to first rule in block */
-	__u32 refcount; 	    /* Number of refernces to block */
-	int policy;		    /* Default rule for chain.  Only *
-				     * used in built in chains */
-	struct ip_reent reent[0];   /* Actually several of these */
-};
-
-/*
- *	Implement IP packet firewall
- */
-
-#ifdef DEBUG_IP_FIREWALL
-#define dprintf(format, args...)  printk(format , ## args)
-#else
-#define dprintf(format, args...)
-#endif
-
-#ifdef DEBUG_IP_FIREWALL_USER
-#define duprintf(format, args...) printk(format , ## args)
-#else
-#define duprintf(format, args...)
-#endif
-
-/* Lock around ip_fw_chains linked list structure */
-rwlock_t ip_fw_lock = RW_LOCK_UNLOCKED;
-
-/* Head of linked list of fw rules */
-static struct ip_chain *ip_fw_chains;
-
-#define IP_FW_INPUT_CHAIN ip_fw_chains
-#define IP_FW_FORWARD_CHAIN (ip_fw_chains->next)
-#define IP_FW_OUTPUT_CHAIN (ip_fw_chains->next->next)
-
-/* Returns 1 if the port is matched by the range, 0 otherwise */
-extern inline int port_match(__u16 min, __u16 max, __u16 port,
-			     int frag, int invert)
-{
-	if (frag) /* Fragments fail ANY port test. */
-		return (min == 0 && max == 0xFFFF);
-	else return (port >= min && port <= max) ^ invert;
-}
-
-/* Returns whether matches rule or not. */
-static int ip_rule_match(struct ip_fwkernel *f,
-			 const char *ifname,
-			 struct sk_buff **pskb,
-			 char tcpsyn,
-			 __u16 src_port, __u16 dst_port,
-			 char isfrag)
-{
-	struct iphdr *ip = (*pskb)->nh.iph;
-
-#define FWINV(bool,invflg) ((bool) ^ !!(f->ipfw.fw_invflg & invflg))
-	/*
-	 *	This is a bit simpler as we don't have to walk
-	 *	an interface chain as you do in BSD - same logic
-	 *	however.
-	 */
-
-	if (FWINV((ip->saddr&f->ipfw.fw_smsk.s_addr) != f->ipfw.fw_src.s_addr,
-		  IP_FW_INV_SRCIP)
-	    || FWINV((ip->daddr&f->ipfw.fw_dmsk.s_addr)!=f->ipfw.fw_dst.s_addr,
-		     IP_FW_INV_DSTIP)) {
-		dprintf("Source or dest mismatch.\n");
-
-		dprintf("SRC: %u. Mask: %u. Target: %u.%s\n", ip->saddr,
-			f->ipfw.fw_smsk.s_addr, f->ipfw.fw_src.s_addr,
-			f->ipfw.fw_invflg & IP_FW_INV_SRCIP ? " (INV)" : "");
-		dprintf("DST: %u. Mask: %u. Target: %u.%s\n", ip->daddr,
-			f->ipfw.fw_dmsk.s_addr, f->ipfw.fw_dst.s_addr,
-			f->ipfw.fw_invflg & IP_FW_INV_DSTIP ? " (INV)" : "");
-		return 0;
-	}
-
-	/*
-	 *	Look for a VIA device match
-	 */
-	if (f->ipfw.fw_flg & IP_FW_F_WILDIF) {
-	    if (FWINV(strncmp(ifname, f->ipfw.fw_vianame,
-			      strlen(f->ipfw.fw_vianame)) != 0,
-		      IP_FW_INV_VIA)) {
-		dprintf("Wildcard interface mismatch.%s\n",
-			f->ipfw.fw_invflg & IP_FW_INV_VIA ? " (INV)" : "");
-		return 0;	/* Mismatch */
-	    }
-	}
-	else if (FWINV(strcmp(ifname, f->ipfw.fw_vianame) != 0,
-		       IP_FW_INV_VIA)) {
-	    dprintf("Interface name does not match.%s\n",
-		    f->ipfw.fw_invflg & IP_FW_INV_VIA
-		    ? " (INV)" : "");
-	    return 0;	/* Mismatch */
-	}
-
-	/*
-	 *	Ok the chain addresses match.
-	 */
-
-	/* If we have a fragment rule but the packet is not a fragment
-	 * the we return zero */
-	if (FWINV((f->ipfw.fw_flg&IP_FW_F_FRAG) && !isfrag, IP_FW_INV_FRAG)) {
-		dprintf("Fragment rule but not fragment.%s\n",
-			f->ipfw.fw_invflg & IP_FW_INV_FRAG ? " (INV)" : "");
-		return 0;
-	}
-
-	/* Fragment NEVER passes a SYN test, even an inverted one. */
-	if (FWINV((f->ipfw.fw_flg&IP_FW_F_TCPSYN) && !tcpsyn, IP_FW_INV_SYN)
-	    || (isfrag && (f->ipfw.fw_flg&IP_FW_F_TCPSYN))) {
-		dprintf("Rule requires SYN and packet has no SYN.%s\n",
-			f->ipfw.fw_invflg & IP_FW_INV_SYN ? " (INV)" : "");
-		return 0;
-	}
-
-	if (f->ipfw.fw_proto) {
-		/*
-		 *	Specific firewall - packet's protocol
-		 *	must match firewall's.
-		 */
-
-		if (FWINV(ip->protocol!=f->ipfw.fw_proto, IP_FW_INV_PROTO)) {
-			dprintf("Packet protocol %hi does not match %hi.%s\n",
-				ip->protocol, f->ipfw.fw_proto,
-				f->ipfw.fw_invflg&IP_FW_INV_PROTO ? " (INV)":"");
-			return 0;
-		}
-
-		/* For non TCP/UDP/ICMP, port range is max anyway. */
-		if (!port_match(f->ipfw.fw_spts[0],
-				f->ipfw.fw_spts[1],
-				src_port, isfrag,
-				!!(f->ipfw.fw_invflg&IP_FW_INV_SRCPT))
-		    || !port_match(f->ipfw.fw_dpts[0],
-				   f->ipfw.fw_dpts[1],
-				   dst_port, isfrag,
-				   !!(f->ipfw.fw_invflg
-				      &IP_FW_INV_DSTPT))) {
-		    dprintf("Port match failed.\n");
-		    return 0;
-		}
-	}
-
-	dprintf("Match succeeded.\n");
-	return 1;
-}
-
-static const char *branchname(struct ip_chain *branch,int simplebranch)
-{
-	if (branch)
-		return branch->label;
-	switch (simplebranch)
-	{
-	case FW_BLOCK: return IP_FW_LABEL_BLOCK;
-	case FW_ACCEPT: return IP_FW_LABEL_ACCEPT;
-	case FW_REJECT: return IP_FW_LABEL_REJECT;
-	case FW_REDIRECT: return IP_FW_LABEL_REDIRECT;
-	case FW_MASQUERADE: return IP_FW_LABEL_MASQUERADE;
-	case FW_SKIP: return "-";
-	case FW_SKIP+1: return IP_FW_LABEL_RETURN;
-	default:
-		return "UNKNOWN";
-	}
-}
-
-/*
- * VERY ugly piece of code which actually
- * makes kernel printf for matching packets...
- */
-static void dump_packet(struct sk_buff **pskb,
-			const char *ifname,
-			struct ip_fwkernel *f,
-			const ip_chainlabel chainlabel,
-			__u16 src_port,
-			__u16 dst_port,
-			unsigned int count,
-			int syn)
-{
-	__u32 *opt = (__u32 *) ((*pskb)->nh.iph + 1);
-	int opti;
-
-	if (f) {
-		printk(KERN_INFO "Packet log: %s ",chainlabel);
-		printk("%s ",branchname(f->branch,f->simplebranch));
-		if (f->simplebranch==FW_REDIRECT)
-			printk("%d ",f->ipfw.fw_redirpt);
-	}
-
-	printk("%s PROTO=%d %u.%u.%u.%u:%hu %u.%u.%u.%u:%hu"
-	       " L=%hu S=0x%2.2hX I=%hu F=0x%4.4hX T=%hu",
-	       ifname, (*pskb)->nh.iph->protocol,
-	       NIPQUAD((*pskb)->nh.iph->saddr),
-	       src_port,
-	       NIPQUAD((*pskb)->nh.iph->daddr),
-	       dst_port,
-	       ntohs((*pskb)->nh.iph->tot_len),
-	       (*pskb)->nh.iph->tos,
-	       ntohs((*pskb)->nh.iph->id),
-	       ntohs((*pskb)->nh.iph->frag_off),
-	       (*pskb)->nh.iph->ttl);
-
-	for (opti = 0; opti < ((*pskb)->nh.iph->ihl - sizeof(struct iphdr) / 4); opti++)
-		printk(" O=0x%8.8X", *opt++);
-	printk(" %s(#%d)\n", syn ? "SYN " : /* "PENANCE" */ "", count);
-}
-
-/* function for checking chain labels for user space. */
-static int check_label(ip_chainlabel label)
-{
-	unsigned int i;
-	/* strlen must be < IP_FW_MAX_LABEL_LENGTH. */
-	for (i = 0; i < IP_FW_MAX_LABEL_LENGTH + 1; i++)
-		if (label[i] == '\0') return 1;
-
-	return 0;
-}
-
-/*	This function returns a pointer to the first chain with a label
- *	that matches the one given. */
-static struct ip_chain *find_label(ip_chainlabel label)
-{
-	struct ip_chain *tmp;
-	FWC_HAVE_LOCK(fwc_rlocks | fwc_wlocks);
-	for (tmp = ip_fw_chains; tmp; tmp = tmp->next)
-		if (strcmp(tmp->label,label) == 0)
-			break;
-	return tmp;
-}
-
-/* This function returns a boolean which when true sets answer to one
-   of the FW_*. */
-static int find_special(ip_chainlabel label, int *answer)
-{
-	if (label[0] == '\0') {
-		*answer = FW_SKIP; /* => pass-through rule */
-		return 1;
-	} else if (strcmp(label,IP_FW_LABEL_ACCEPT) == 0) {
-		*answer = FW_ACCEPT;
-		return 1;
-	} else if (strcmp(label,IP_FW_LABEL_BLOCK) == 0) {
-		*answer = FW_BLOCK;
-		return 1;
-	} else if (strcmp(label,IP_FW_LABEL_REJECT) == 0) {
-		*answer = FW_REJECT;
-		return 1;
-	} else if (strcmp(label,IP_FW_LABEL_REDIRECT) == 0) {
-		*answer = FW_REDIRECT;
-		return 1;
-	} else if (strcmp(label,IP_FW_LABEL_MASQUERADE) == 0) {
-		*answer = FW_MASQUERADE;
-		return 1;
-	} else if (strcmp(label, IP_FW_LABEL_RETURN) == 0) {
-		*answer = FW_SKIP+1;
-		return 1;
-	} else {
-		return 0;
-	}
-}
-
-/* This function cleans up the prevchain and prevrule.  If the verbose
- * flag is set then he names of the chains will be printed as it
- * cleans up.  */
-static void cleanup(struct ip_chain *chain,
-		    const int verbose,
-		    unsigned int slot)
-{
-	struct ip_chain *tmpchain = chain->reent[slot].prevchain;
-	if (verbose)
-		printk(KERN_ERR "Chain backtrace: ");
-	while (tmpchain) {
-		if (verbose)
-			printk("%s<-",chain->label);
-		chain->reent[slot].prevchain = NULL;
-		chain = tmpchain;
-		tmpchain = chain->reent[slot].prevchain;
-	}
-	if (verbose)
-		printk("%s\n",chain->label);
-}
-
-static inline int
-ip_fw_domatch(struct ip_fwkernel *f,
-	      const char *rif,
-	      const ip_chainlabel label,
-	      struct sk_buff **pskb,
-	      unsigned int slot,
-	      __u16 src_port, __u16 dst_port,
-	      unsigned int count,
-	      int tcpsyn,
-	      unsigned char *tos)
-{
-	f->counters[slot].bcnt+=ntohs((*pskb)->nh.iph->tot_len);
-	f->counters[slot].pcnt++;
-	if (f->ipfw.fw_flg & IP_FW_F_PRN) {
-		dump_packet(pskb,rif,f,label,src_port,dst_port,count,tcpsyn);
-	}
-
-	*tos = (*tos & f->ipfw.fw_tosand) ^ f->ipfw.fw_tosxor;
-
-/* This functionality is useless in stock 2.0.x series, but we don't
- * discard the mark thing altogether, to avoid breaking ipchains (and,
- * more importantly, the ipfwadm wrapper) --PR */
-	if (f->ipfw.fw_flg & IP_FW_F_MARKABS) {
-		(*pskb)->nfmark = f->ipfw.fw_mark;
-	} else {
-		(*pskb)->nfmark += f->ipfw.fw_mark;
-	}
-	if (f->ipfw.fw_flg & IP_FW_F_NETLINK) {
-#if defined(CONFIG_NETLINK_DEV) || defined(CONFIG_NETLINK_DEV_MODULE)
-		size_t len = min_t(unsigned int, f->ipfw.fw_outputsize, ntohs((*pskb)->nh.iph->tot_len))
-			+ sizeof(__u32) + sizeof((*pskb)->nfmark) + IFNAMSIZ;
-		struct sk_buff *outskb=alloc_skb(len, GFP_ATOMIC);
-
-		duprintf("Sending packet out NETLINK (length = %u).\n",
-			 (unsigned int)len);
-		if (outskb) {
-			/* Prepend length, mark & interface */
-			skb_put(outskb, len);
-			*((__u32 *)outskb->data) = (__u32)len;
-			*((__u32 *)(outskb->data+sizeof(__u32))) =
-				(*pskb)->nfmark;
-			strcpy(outskb->data+sizeof(__u32)*2, rif);
-			skb_copy_bits(*pskb,
-				((char *)(*pskb)->nh.iph - (char *)(*pskb)->data),
-				outskb->data+sizeof(__u32)*2+IFNAMSIZ,
-				len-(sizeof(__u32)*2+IFNAMSIZ));
-			netlink_broadcast(ipfwsk, outskb, 0, ~0, GFP_ATOMIC);
-		}
-		else {
-#endif
-			if (net_ratelimit())
-				printk(KERN_WARNING "ip_fw: packet drop due to "
-				       "netlink failure\n");
-			return 0;
-#if defined(CONFIG_NETLINK_DEV) || defined(CONFIG_NETLINK_DEV_MODULE)
-		}
-#endif
-	}
-	return 1;
-}
-
-/*
- *	Returns one of the generic firewall policies, like FW_ACCEPT.
- *
- *	The testing is either false for normal firewall mode or true for
- *	user checking mode (counters are not updated, TOS & mark not done).
- */
-static int
-ip_fw_check(const char *rif,
-	    __u16 *redirport,
-	    struct ip_chain *chain,
-	    struct sk_buff **pskb,
-	    unsigned int slot,
-	    int testing)
-{
-	__u32			src, dst;
-	__u16			src_port = 0xFFFF, dst_port = 0xFFFF;
-	char			tcpsyn=0;
-	__u16			offset;
-	unsigned char		tos;
-	struct ip_fwkernel	*f;
-	int			ret = FW_SKIP+2;
-	unsigned int		count;
-
-	/* We handle fragments by dealing with the first fragment as
-	 * if it was a normal packet.  All other fragments are treated
-	 * normally, except that they will NEVER match rules that ask
-	 * things we don't know, ie. tcp syn flag or ports).  If the
-	 * rule is also a fragment-specific rule, non-fragments won't
-	 * match it. */
-
-	offset = ntohs((*pskb)->nh.iph->frag_off) & IP_OFFSET;
-
-	/*
-	 *	Don't allow a fragment of TCP 8 bytes in. Nobody
-	 *	normal causes this. Its a cracker trying to break
-	 *	in by doing a flag overwrite to pass the direction
-	 *	checks.
-	 */
-	if (offset == 1 && (*pskb)->nh.iph->protocol == IPPROTO_TCP) {
-		if (!testing && net_ratelimit()) {
-			printk("Suspect TCP fragment.\n");
-			dump_packet(pskb,rif,NULL,NULL,0,0,0,0);
-		}
-		return FW_BLOCK;
-	}
-
-	/* If we can't investigate ports, treat as fragment.  It's
-	 * either a trucated whole packet, or a truncated first
-	 * fragment, or a TCP first fragment of length 8-15, in which
-	 * case the above rule stops reassembly.
-	 */
-	if (offset == 0) {
-		unsigned int size_req;
-		switch ((*pskb)->nh.iph->protocol) {
-		case IPPROTO_TCP:
-			/* Don't care about things past flags word */
-			size_req = 16;
-			break;
-
-		case IPPROTO_UDP:
-		case IPPROTO_ICMP:
-			size_req = 8;
-			break;
-
-		default:
-			size_req = 0;
-		}
-
-		/* If it is a truncated first fragment then it can be
-		 * used to rewrite port information, and thus should
-		 * be blocked.
-		 */
-		if (ntohs((*pskb)->nh.iph->tot_len) <
-		    ((*pskb)->nh.iph->ihl<<2)+size_req) {
-			if (!testing && net_ratelimit()) {
-				printk("Suspect short first fragment.\n");
-				dump_packet(pskb,rif,NULL,NULL,0,0,0,0);
-			}
-			return FW_BLOCK;
-		}
-	}
-
-	src = (*pskb)->nh.iph->saddr;
-	dst = (*pskb)->nh.iph->daddr;
-	tos = (*pskb)->nh.iph->tos;
-
-	/*
-	 *	If we got interface from which packet came
-	 *	we can use the address directly. Linux 2.1 now uses address
-	 *	chains per device too, but unlike BSD we first check if the
-	 *	incoming packet matches a device address and the routing
-	 *	table before calling the firewall.
-	 */
-
-	dprintf("Packet ");
-	switch ((*pskb)->nh.iph->protocol) {
-		case IPPROTO_TCP:
-			dprintf("TCP ");
-			if (!offset) {
-				struct tcphdr _tcph, *th;
-
-				th = skb_header_pointer(*pskb,
-							(*pskb)->nh.iph->ihl*4,
-							sizeof(_tcph), &_tcph);
-				if (th == NULL)
-					return FW_BLOCK;
-
-				src_port = ntohs(th->source);
-				dst_port = ntohs(th->dest);
-
-				/* Connection initilisation can only
-				 * be made when the syn bit is set and
-				 * neither of the ack or reset is
-				 * set. */
-				if (th->syn && !(th->ack || th->rst))
-					tcpsyn = 1;
-			}
-			break;
-		case IPPROTO_UDP:
-			dprintf("UDP ");
-			if (!offset) {
-				struct udphdr _udph, *uh;
-
-				uh = skb_header_pointer(*pskb,
-							(*pskb)->nh.iph->ihl*4,
-							sizeof(_udph), &_udph);
-				if (uh == NULL)
-					return FW_BLOCK;
-
-				src_port = ntohs(uh->source);
-				dst_port = ntohs(uh->dest);
-			}
-			break;
-		case IPPROTO_ICMP:
-			if (!offset) {
-				struct icmphdr _icmph, *ic;
-
-				ic = skb_header_pointer(*pskb,
-							(*pskb)->nh.iph->ihl*4,
-							sizeof(_icmph),
-							&_icmph);
-				if (ic == NULL)
-					return FW_BLOCK;
-
-				src_port = (__u16) ic->type;
-				dst_port = (__u16) ic->code;
-			}
-			dprintf("ICMP ");
-			break;
-		default:
-			dprintf("p=%d ", (*pskb)->nh.iph->protocol);
-			break;
-	}
-#ifdef DEBUG_IP_FIREWALL
-	print_ip((*pskb)->nh.iph->saddr);
-
-	if (offset)
-		dprintf(":fragment (%i) ", ((int)offset)<<2);
-	else if ((*pskb)->nh.iph->protocol == IPPROTO_TCP ||
-		 (*pskb)->nh.iph->protocol == IPPROTO_UDP ||
-		 (*pskb)->nh.iph->protocol == IPPROTO_ICMP)
-		dprintf(":%hu:%hu", src_port, dst_port);
-	dprintf("\n");
-#endif
-
-	if (!testing) FWC_READ_LOCK(&ip_fw_lock);
-	else FWC_HAVE_LOCK(fwc_rlocks);
-
-	f = chain->chain;
-	do {
-		count = 0;
-		for (; f; f = f->next) {
-			count++;
-			if (ip_rule_match(f, rif, pskb,
-					  tcpsyn, src_port, dst_port,
-					  offset)) {
-				if (!testing
-				    && !ip_fw_domatch(f, rif, chain->label,
-						      pskb, slot,
-						      src_port, dst_port,
-						      count, tcpsyn, &tos)) {
-					ret = FW_BLOCK;
-					cleanup(chain, 0, slot);
-					goto out;
-				}
-				break;
-			}
-		}
-		if (f) {
-			if (f->branch) {
-				/* Do sanity check to see if we have
-                                 * already set prevchain and if so we
-                                 * must be in a loop */
-				if (f->branch->reent[slot].prevchain) {
-					if (!testing) {
-						printk(KERN_ERR
-						       "IP firewall: "
-						       "Loop detected "
-						       "at `%s'.\n",
-						       f->branch->label);
-						cleanup(chain, 1, slot);
-						ret = FW_BLOCK;
-					} else {
-						cleanup(chain, 0, slot);
-						ret = FW_SKIP+1;
-					}
-				}
-				else {
-					f->branch->reent[slot].prevchain
-						= chain;
-					f->branch->reent[slot].prevrule
-						= f->next;
-					chain = f->branch;
-					f = chain->chain;
-				}
-			}
-			else if (f->simplebranch == FW_SKIP)
-				f = f->next;
-			else if (f->simplebranch == FW_SKIP+1) {
-				/* Just like falling off the chain */
-				goto fall_off_chain;
-			} else {
-				cleanup(chain, 0, slot);
-				ret = f->simplebranch;
-			}
-		} /* f == NULL */
-		else {
-		fall_off_chain:
-			if (chain->reent[slot].prevchain) {
-				struct ip_chain *tmp = chain;
-				f = chain->reent[slot].prevrule;
-				chain = chain->reent[slot].prevchain;
-				tmp->reent[slot].prevchain = NULL;
-			}
-			else {
-				ret = chain->policy;
-				if (!testing) {
-					chain->reent[slot].counters.pcnt++;
-					chain->reent[slot].counters.bcnt
-						+= ntohs((*pskb)->nh.iph->tot_len);
-				}
-			}
-		}
-	} while (ret == FW_SKIP+2);
-
- out:
-	if (!testing) FWC_READ_UNLOCK(&ip_fw_lock);
-
-	/* Recalculate checksum if not going to reject, and TOS changed. */
-	if ((*pskb)->nh.iph->tos != tos
-	    && ret != FW_REJECT && ret != FW_BLOCK
-	    && !testing) {
-		if (!skb_ip_make_writable(pskb, offsetof(struct iphdr, tos)+1))
-			ret = FW_BLOCK;
-		else {
-			(*pskb)->nh.iph->tos = tos;
-			ip_send_check((*pskb)->nh.iph);
-		}
-	}
-
-	if (ret == FW_REDIRECT && redirport) {
-		if ((*redirport = htons(f->ipfw.fw_redirpt)) == 0) {
-			/* Wildcard redirection.
-			 * Note that redirport will become
-			 * 0xFFFF for non-TCP/UDP packets.
-			 */
-			*redirport = htons(dst_port);
-		}
-	}
-
-#ifdef DEBUG_ALLOW_ALL
-	return (testing ? ret : FW_ACCEPT);
-#else
-	return ret;
-#endif
-}
-
-/* Must have write lock & interrupts off for any of these */
-
-/* This function sets all the byte counters in a chain to zero.  The
- * input is a pointer to the chain required for zeroing */
-static int zero_fw_chain(struct ip_chain *chainptr)
-{
-	struct ip_fwkernel *i;
-
-	FWC_HAVE_LOCK(fwc_wlocks);
-	for (i = chainptr->chain; i; i = i->next)
-		memset(i->counters, 0, sizeof(struct ip_counters)*NUM_SLOTS);
-	return 0;
-}
-
-static int clear_fw_chain(struct ip_chain *chainptr)
-{
-	struct ip_fwkernel *i= chainptr->chain;
-
-	FWC_HAVE_LOCK(fwc_wlocks);
-	chainptr->chain=NULL;
-
-	while (i) {
-		struct ip_fwkernel *tmp = i->next;
-		if (i->branch)
-			i->branch->refcount--;
-		kfree(i);
-		i = tmp;
-		/* We will block in cleanup's unregister sockopt if unloaded,
-		   so this is safe. */
-		module_put(THIS_MODULE);
-	}
-	return 0;
-}
-
-static int replace_in_chain(struct ip_chain *chainptr,
-			    struct ip_fwkernel *frwl,
-			    __u32 position)
-{
-	struct ip_fwkernel *f = chainptr->chain;
-
-	FWC_HAVE_LOCK(fwc_wlocks);
-
-	while (--position && f != NULL) f = f->next;
-	if (f == NULL)
-		return EINVAL;
-
-	if (f->branch) f->branch->refcount--;
-	if (frwl->branch) frwl->branch->refcount++;
-
-	frwl->next = f->next;
-	memcpy(f,frwl,sizeof(struct ip_fwkernel));
-	kfree(frwl);
-	return 0;
-}
-
-static int append_to_chain(struct ip_chain *chainptr, struct ip_fwkernel *rule)
-{
-	struct ip_fwkernel *i;
-
-	FWC_HAVE_LOCK(fwc_wlocks);
-
-	/* Are we unloading now?  We will block on nf_unregister_sockopt */
-	if (!try_module_get(THIS_MODULE))
-		return ENOPROTOOPT;
-
-	/* Special case if no rules already present */
-	if (chainptr->chain == NULL) {
-
-		/* If pointer writes are atomic then turning off
-		 * interrupts is not necessary. */
-		chainptr->chain = rule;
-		if (rule->branch) rule->branch->refcount++;
-		goto append_successful;
-	}
-
-	/* Find the rule before the end of the chain */
-	for (i = chainptr->chain; i->next; i = i->next);
-	i->next = rule;
-	if (rule->branch) rule->branch->refcount++;
-
-append_successful:
-	return 0;
-}
-
-/* This function inserts a rule at the position of position in the
- * chain refenced by chainptr.  If position is 1 then this rule will
- * become the new rule one. */
-static int insert_in_chain(struct ip_chain *chainptr,
-			   struct ip_fwkernel *frwl,
-			   __u32 position)
-{
-	struct ip_fwkernel *f = chainptr->chain;
-
-	FWC_HAVE_LOCK(fwc_wlocks);
-
-	/* Are we unloading now?  We will block on nf_unregister_sockopt */
-	if (!try_module_get(THIS_MODULE))
-		return ENOPROTOOPT;
-
-	/* special case if the position is number 1 */
-	if (position == 1) {
-		frwl->next = chainptr->chain;
-		if (frwl->branch) frwl->branch->refcount++;
-		chainptr->chain = frwl;
-		goto insert_successful;
-	}
-	position--;
-	while (--position && f != NULL) f = f->next;
-	if (f == NULL)
-		return EINVAL;
-	if (frwl->branch) frwl->branch->refcount++;
-	frwl->next = f->next;
-
-	f->next = frwl;
-
-insert_successful:
-	return 0;
-}
-
-/* This function deletes the a rule from a given rulenum and chain.
- * With rulenum = 1 is the first rule is deleted. */
-
-static int del_num_from_chain(struct ip_chain *chainptr, __u32 rulenum)
-{
-	struct ip_fwkernel *i=chainptr->chain,*tmp;
-
-	FWC_HAVE_LOCK(fwc_wlocks);
-
-	if (!chainptr->chain)
-		return ENOENT;
-
-	/* Need a special case for the first rule */
-	if (rulenum == 1) {
-		/* store temp to allow for freeing up of memory */
-		tmp = chainptr->chain;
-	        if (chainptr->chain->branch) chainptr->chain->branch->refcount--;
-		chainptr->chain = chainptr->chain->next;
-		kfree(tmp); /* free memory that is now unused */
-	} else {
-		rulenum--;
-		while (--rulenum && i->next ) i = i->next;
-		if (!i->next)
-			return ENOENT;
-		tmp = i->next;
-		if (i->next->branch)
-			i->next->branch->refcount--;
-		i->next = i->next->next;
-		kfree(tmp);
-	}
-
-	/* We will block in cleanup's unregister sockopt if unloaded,
-	   so this is safe. */
-	module_put(THIS_MODULE);
-	return 0;
-}
-
-
-/* This function deletes the a rule from a given rule and chain.
- * The rule that is deleted is the first occursance of that rule. */
-static int del_rule_from_chain(struct ip_chain *chainptr,
-			       struct ip_fwkernel *frwl)
-{
-	struct ip_fwkernel *ltmp,*ftmp = chainptr->chain ;
-	int was_found;
-
-	FWC_HAVE_LOCK(fwc_wlocks);
-
-	/* Sure, we should compare marks, but since the `ipfwadm'
-	 * script uses it for an unholy hack... well, life is easier
-	 * this way.  We also mask it out of the flags word. --PR */
-	for (ltmp=NULL, was_found=0;
-	     !was_found && ftmp != NULL;
-	     ltmp = ftmp,ftmp = ftmp->next) {
-		if (ftmp->ipfw.fw_src.s_addr!=frwl->ipfw.fw_src.s_addr
-		    || ftmp->ipfw.fw_dst.s_addr!=frwl->ipfw.fw_dst.s_addr
-		    || ftmp->ipfw.fw_smsk.s_addr!=frwl->ipfw.fw_smsk.s_addr
-		    || ftmp->ipfw.fw_dmsk.s_addr!=frwl->ipfw.fw_dmsk.s_addr
-#if 0
-		    || ftmp->ipfw.fw_flg!=frwl->ipfw.fw_flg
-#else
-		    || ((ftmp->ipfw.fw_flg & ~IP_FW_F_MARKABS)
-			!= (frwl->ipfw.fw_flg & ~IP_FW_F_MARKABS))
-#endif
-		    || ftmp->ipfw.fw_invflg!=frwl->ipfw.fw_invflg
-		    || ftmp->ipfw.fw_proto!=frwl->ipfw.fw_proto
-#if 0
-		    || ftmp->ipfw.fw_mark!=frwl->ipfw.fw_mark
-#endif
-		    || ftmp->ipfw.fw_redirpt!=frwl->ipfw.fw_redirpt
-		    || ftmp->ipfw.fw_spts[0]!=frwl->ipfw.fw_spts[0]
-		    || ftmp->ipfw.fw_spts[1]!=frwl->ipfw.fw_spts[1]
-		    || ftmp->ipfw.fw_dpts[0]!=frwl->ipfw.fw_dpts[0]
-		    || ftmp->ipfw.fw_dpts[1]!=frwl->ipfw.fw_dpts[1]
-		    || ftmp->ipfw.fw_outputsize!=frwl->ipfw.fw_outputsize) {
-			duprintf("del_rule_from_chain: mismatch:"
-				 "src:%u/%u dst:%u/%u smsk:%u/%u dmsk:%u/%u "
-				 "flg:%hX/%hX invflg:%hX/%hX proto:%u/%u "
-				 "mark:%u/%u "
-				 "ports:%hu-%hu/%hu-%hu %hu-%hu/%hu-%hu "
-				 "outputsize:%hu-%hu\n",
-				 ftmp->ipfw.fw_src.s_addr,
-				 frwl->ipfw.fw_src.s_addr,
-				 ftmp->ipfw.fw_dst.s_addr,
-				 frwl->ipfw.fw_dst.s_addr,
-				 ftmp->ipfw.fw_smsk.s_addr,
-				 frwl->ipfw.fw_smsk.s_addr,
-				 ftmp->ipfw.fw_dmsk.s_addr,
-				 frwl->ipfw.fw_dmsk.s_addr,
-				 ftmp->ipfw.fw_flg,
-				 frwl->ipfw.fw_flg,
-				 ftmp->ipfw.fw_invflg,
-				 frwl->ipfw.fw_invflg,
-				 ftmp->ipfw.fw_proto,
-				 frwl->ipfw.fw_proto,
-				 ftmp->ipfw.fw_mark,
-				 frwl->ipfw.fw_mark,
-				 ftmp->ipfw.fw_spts[0],
-				 frwl->ipfw.fw_spts[0],
-				 ftmp->ipfw.fw_spts[1],
-				 frwl->ipfw.fw_spts[1],
-				 ftmp->ipfw.fw_dpts[0],
-				 frwl->ipfw.fw_dpts[0],
-				 ftmp->ipfw.fw_dpts[1],
-				 frwl->ipfw.fw_dpts[1],
-				 ftmp->ipfw.fw_outputsize,
-				 frwl->ipfw.fw_outputsize);
-			continue;
-		}
-
-		if (strncmp(ftmp->ipfw.fw_vianame,
-			    frwl->ipfw.fw_vianame,
-			    IFNAMSIZ)) {
-			duprintf("del_rule_from_chain: if mismatch: %s/%s\n",
-				 ftmp->ipfw.fw_vianame,
-				 frwl->ipfw.fw_vianame);
-		        continue;
-		}
-		if (ftmp->branch != frwl->branch) {
-			duprintf("del_rule_from_chain: branch mismatch: "
-				 "%s/%s\n",
-				 ftmp->branch?ftmp->branch->label:"(null)",
-				 frwl->branch?frwl->branch->label:"(null)");
-			continue;
-		}
-		if (ftmp->branch == NULL
-		    && ftmp->simplebranch != frwl->simplebranch) {
-			duprintf("del_rule_from_chain: simplebranch mismatch: "
-				 "%i/%i\n",
-				 ftmp->simplebranch, frwl->simplebranch);
-			continue;
-		}
-		was_found = 1;
-		if (ftmp->branch)
-			ftmp->branch->refcount--;
-		if (ltmp)
-			ltmp->next = ftmp->next;
-		else
-			chainptr->chain = ftmp->next;
-		kfree(ftmp);
-		/* We will block in cleanup's unregister sockopt if unloaded,
-		   so this is safe. */
-		module_put(THIS_MODULE);
-		break;
-	}
-
-	if (was_found)
-		return 0;
-	else {
-		duprintf("del_rule_from_chain: no matching rule found\n");
-		return EINVAL;
-	}
-}
-
-/* This function takes the label of a chain and deletes the first
- * chain with that name.  No special cases required for the built in
- * chains as they have their refcount initilised to 1 so that they are
- * never deleted.  */
-static int del_chain(ip_chainlabel label)
-{
-	struct ip_chain *tmp,*tmp2;
-
-	FWC_HAVE_LOCK(fwc_wlocks);
-	/* Corner case: return EBUSY not ENOENT for first elem ("input") */
-	if (strcmp(label, ip_fw_chains->label) == 0)
-		return EBUSY;
-
-	for (tmp = ip_fw_chains; tmp->next; tmp = tmp->next)
-		if(strcmp(tmp->next->label,label) == 0)
-			break;
-
-	tmp2 = tmp->next;
-	if (!tmp2)
-		return ENOENT;
-
-	if (tmp2->refcount)
-		return EBUSY;
-
-	if (tmp2->chain)
-		return ENOTEMPTY;
-
-	tmp->next = tmp2->next;
-	kfree(tmp2);
-
-	/* We will block in cleanup's unregister sockopt if unloaded,
-	   so this is safe. */
-	module_put(THIS_MODULE);
-	return 0;
-}
-
-/* This is a function to initilise a chain.  Built in rules start with
- * refcount = 1 so that they cannot be deleted.  User defined rules
- * start with refcount = 0 so they can be deleted. */
-static struct ip_chain *ip_init_chain(ip_chainlabel name,
-				      __u32 ref,
-				      int policy)
-{
-	unsigned int i;
-	struct ip_chain *label
-		= kmalloc(SIZEOF_STRUCT_IP_CHAIN, GFP_KERNEL);
-	if (label == NULL)
-		panic("Can't kmalloc for firewall chains.\n");
-	strcpy(label->label,name);
-	label->next = NULL;
-	label->chain = NULL;
-	label->refcount = ref;
-	label->policy = policy;
-	for (i = 0; i < NUM_SLOTS; i++) {
-		label->reent[i].counters.pcnt = label->reent[i].counters.bcnt
-			= 0;
-		label->reent[i].prevchain = NULL;
-		label->reent[i].prevrule = NULL;
-	}
-
-	return label;
-}
-
-/* This is a function for reating a new chain.  The chains is not
- * created if a chain of the same name already exists */
-static int create_chain(ip_chainlabel label)
-{
-	struct ip_chain *tmp;
-
-	if (!check_label(label))
-		return EINVAL;
-
-	FWC_HAVE_LOCK(fwc_wlocks);
-	for (tmp = ip_fw_chains; tmp->next; tmp = tmp->next)
-		if (strcmp(tmp->label,label) == 0)
-			return EEXIST;
-
-	if (strcmp(tmp->label,label) == 0)
-		return EEXIST;
-
-	/* Are we unloading now?  We will block on nf_unregister_sockopt */
-	if (!try_module_get(THIS_MODULE))
-		return ENOPROTOOPT;
-
-	tmp->next = ip_init_chain(label, 0, FW_SKIP); /* refcount is
-					      * zero since this is a
-					      * user defined chain *
-					      * and therefore can be
-					      * deleted */
-	return 0;
-}
-
-/* This function simply changes the policy on one of the built in
- * chains.  checking must be done before this is call to ensure that
- * chainptr is pointing to one of the three possible chains */
-static int change_policy(struct ip_chain *chainptr, int policy)
-{
-	FWC_HAVE_LOCK(fwc_wlocks);
-	chainptr->policy = policy;
-	return 0;
-}
-
-/* This function takes an ip_fwuser and converts it to a ip_fwkernel.  It also
- * performs some checks in the structure. */
-static struct ip_fwkernel *convert_ipfw(struct ip_fwuser *fwuser, int *errno)
-{
-	struct ip_fwkernel *fwkern;
-
-	if ( (fwuser->ipfw.fw_flg & ~IP_FW_F_MASK) != 0 ) {
-		duprintf("convert_ipfw: undefined flag bits set (flags=%x)\n",
-			 fwuser->ipfw.fw_flg);
-		*errno = EINVAL;
-		return NULL;
-	}
-
-#ifdef DEBUG_IP_FIREWALL_USER
-	/* These are sanity checks that don't really matter.
-	 * We can get rid of these once testing is complete.
-	 */
-	if ((fwuser->ipfw.fw_flg & IP_FW_F_TCPSYN)
-	    && ((fwuser->ipfw.fw_invflg & IP_FW_INV_PROTO)
-		|| fwuser->ipfw.fw_proto != IPPROTO_TCP)) {
-		duprintf("convert_ipfw: TCP SYN flag set but proto != TCP!\n");
-		*errno = EINVAL;
-		return NULL;
-	}
-
-	if (strcmp(fwuser->label, IP_FW_LABEL_REDIRECT) != 0
-	    && fwuser->ipfw.fw_redirpt != 0) {
-		duprintf("convert_ipfw: Target not REDIR but redirpt != 0!\n");
-		*errno = EINVAL;
-		return NULL;
-	}
-
-	if ((!(fwuser->ipfw.fw_flg & IP_FW_F_FRAG)
-	     && (fwuser->ipfw.fw_invflg & IP_FW_INV_FRAG))
-	    || (!(fwuser->ipfw.fw_flg & IP_FW_F_TCPSYN)
-		&& (fwuser->ipfw.fw_invflg & IP_FW_INV_SYN))) {
-		duprintf("convert_ipfw: Can't have INV flag if flag unset!\n");
-		*errno = EINVAL;
-		return NULL;
-	}
-
-	if (((fwuser->ipfw.fw_invflg & IP_FW_INV_SRCPT)
-	     && fwuser->ipfw.fw_spts[0] == 0
-	     && fwuser->ipfw.fw_spts[1] == 0xFFFF)
-	    || ((fwuser->ipfw.fw_invflg & IP_FW_INV_DSTPT)
-		&& fwuser->ipfw.fw_dpts[0] == 0
-		&& fwuser->ipfw.fw_dpts[1] == 0xFFFF)
-	    || ((fwuser->ipfw.fw_invflg & IP_FW_INV_VIA)
-		&& (fwuser->ipfw.fw_vianame)[0] == '\0')
-	    || ((fwuser->ipfw.fw_invflg & IP_FW_INV_SRCIP)
-		&& fwuser->ipfw.fw_smsk.s_addr == 0)
-	    || ((fwuser->ipfw.fw_invflg & IP_FW_INV_DSTIP)
-		&& fwuser->ipfw.fw_dmsk.s_addr == 0)) {
-		duprintf("convert_ipfw: INV flag makes rule unmatchable!\n");
-		*errno = EINVAL;
-		return NULL;
-	}
-
-	if ((fwuser->ipfw.fw_flg & IP_FW_F_FRAG)
-	    && !(fwuser->ipfw.fw_invflg & IP_FW_INV_FRAG)
-	    && (fwuser->ipfw.fw_spts[0] != 0
-		|| fwuser->ipfw.fw_spts[1] != 0xFFFF
-		|| fwuser->ipfw.fw_dpts[0] != 0
-		|| fwuser->ipfw.fw_dpts[1] != 0xFFFF
-		|| (fwuser->ipfw.fw_flg & IP_FW_F_TCPSYN))) {
-		duprintf("convert_ipfw: Can't test ports or SYN with frag!\n");
-		*errno = EINVAL;
-		return NULL;
-	}
-#endif
-
-	if ((fwuser->ipfw.fw_spts[0] != 0
-	     || fwuser->ipfw.fw_spts[1] != 0xFFFF
-	     || fwuser->ipfw.fw_dpts[0] != 0
-	     || fwuser->ipfw.fw_dpts[1] != 0xFFFF)
-	    && ((fwuser->ipfw.fw_invflg & IP_FW_INV_PROTO)
-		|| (fwuser->ipfw.fw_proto != IPPROTO_TCP
-		    && fwuser->ipfw.fw_proto != IPPROTO_UDP
-		    && fwuser->ipfw.fw_proto != IPPROTO_ICMP))) {
-		duprintf("convert_ipfw: Can only test ports for TCP/UDP/ICMP!\n");
-		*errno = EINVAL;
-		return NULL;
-	}
-
-	fwkern = kmalloc(SIZEOF_STRUCT_IP_FW_KERNEL, GFP_ATOMIC);
-	if (!fwkern) {
-		duprintf("convert_ipfw: kmalloc failed!\n");
-		*errno = ENOMEM;
-		return NULL;
-	}
-	memcpy(&fwkern->ipfw,&fwuser->ipfw,sizeof(struct ip_fw));
-
-	if (!find_special(fwuser->label, &fwkern->simplebranch)) {
-		fwkern->branch = find_label(fwuser->label);
-		if (!fwkern->branch) {
-			duprintf("convert_ipfw: chain doesn't exist `%s'.\n",
-				 fwuser->label);
-			kfree(fwkern);
-			*errno = ENOENT;
-			return NULL;
-		} else if (fwkern->branch == IP_FW_INPUT_CHAIN
-			   || fwkern->branch == IP_FW_FORWARD_CHAIN
-			   || fwkern->branch == IP_FW_OUTPUT_CHAIN) {
-			duprintf("convert_ipfw: Can't branch to builtin chain `%s'.\n",
-				 fwuser->label);
-			kfree(fwkern);
-			*errno = ENOENT;
-			return NULL;
-		}
-	} else
-		fwkern->branch = NULL;
-	memset(fwkern->counters, 0, sizeof(struct ip_counters)*NUM_SLOTS);
-
-	/* Handle empty vianame by making it a wildcard */
-	if ((fwkern->ipfw.fw_vianame)[0] == '\0')
-	    fwkern->ipfw.fw_flg |= IP_FW_F_WILDIF;
-
-	fwkern->next = NULL;
-	return fwkern;
-}
-
-int ip_fw_ctl(int cmd, void *m, int len)
-{
-	int ret;
-	struct ip_chain *chain;
-	unsigned long flags;
-
-	FWC_WRITE_LOCK_IRQ(&ip_fw_lock, flags);
-
-	switch (cmd) {
-	case IP_FW_FLUSH:
-		if (len != sizeof(ip_chainlabel) || !check_label(m))
-			ret = EINVAL;
-		else if ((chain = find_label(m)) == NULL)
-			ret = ENOENT;
-		else ret = clear_fw_chain(chain);
-		break;
-
-	case IP_FW_ZERO:
-		if (len != sizeof(ip_chainlabel) || !check_label(m))
-			ret = EINVAL;
-		else if ((chain = find_label(m)) == NULL)
-			ret = ENOENT;
-		else ret = zero_fw_chain(chain);
-		break;
-
-	case IP_FW_CHECK: {
-		struct ip_fwtest *new = m;
-		struct iphdr *ip;
-
-		/* Don't need write lock. */
-		FWC_WRITE_UNLOCK_IRQ(&ip_fw_lock, flags);
-
-		if (len != sizeof(struct ip_fwtest) || !check_label(m))
-			return EINVAL;
-
-		/* Need readlock to do find_label */
-		FWC_READ_LOCK(&ip_fw_lock);
-
-		if ((chain = find_label(new->fwt_label)) == NULL)
-			ret = ENOENT;
-		else {
-			struct sk_buff *tmp_skb;
-			int hdrlen;
-
-			hdrlen = sizeof(struct ip_fwpkt) -
-				sizeof(struct in_addr) -
-				IFNAMSIZ;
-
-			ip = &(new->fwt_packet.fwp_iph);
-
-			/* Fix this one up by hand, who knows how many
-			 * tools will break if we start to barf on this.
-			 */
-			if (ntohs(ip->tot_len) > hdrlen)
-				ip->tot_len = htons(hdrlen);
-
-			if (ip->ihl != sizeof(struct iphdr) / sizeof(u32)) {
-				duprintf("ip_fw_ctl: ip->ihl=%d, want %d\n",
-					 ip->ihl,
-					 sizeof(struct iphdr) / sizeof(u32));
-				ret = EINVAL;
-			} else if ((tmp_skb = alloc_skb(hdrlen,
-							GFP_ATOMIC)) == NULL) {
-				duprintf("ip_fw_ctl: tmp_skb alloc failure\n");
-				ret = EFAULT;
-			} else {
-				skb_reserve(tmp_skb, hdrlen);
-				skb_push(tmp_skb, hdrlen);
-				memcpy(tmp_skb->data, ip, hdrlen);
-				tmp_skb->nh.raw =
-					(unsigned char *) tmp_skb->data;
-				ret = ip_fw_check(new->fwt_packet.fwp_vianame,
-						  NULL, chain,
-						  &tmp_skb, SLOT_NUMBER(), 1);
-				kfree_skb(tmp_skb);
-				switch (ret) {
-				case FW_ACCEPT:
-					ret = 0; break;
-				case FW_REDIRECT:
-					ret = ECONNABORTED; break;
-				case FW_MASQUERADE:
-					ret = ECONNRESET; break;
-				case FW_REJECT:
-					ret = ECONNREFUSED; break;
-					/* Hack to help diag; these only get
-					   returned when testing. */
-				case FW_SKIP+1:
-					ret = ELOOP; break;
-				case FW_SKIP:
-					ret = ENFILE; break;
-				default: /* FW_BLOCK */
-					ret = ETIMEDOUT; break;
-				}
-			}
-		}
-		FWC_READ_UNLOCK(&ip_fw_lock);
-		return ret;
-	}
-
-	case IP_FW_MASQ_TIMEOUTS: {
-		ret = ip_fw_masq_timeouts(m, len);
-	}
-	break;
-
-	case IP_FW_REPLACE: {
-		struct ip_fwkernel *ip_fwkern;
-		struct ip_fwnew *new = m;
-
-		if (len != sizeof(struct ip_fwnew)
-		    || !check_label(new->fwn_label))
-			ret = EINVAL;
-		else if ((chain = find_label(new->fwn_label)) == NULL)
-			ret = ENOENT;
-		else if ((ip_fwkern = convert_ipfw(&new->fwn_rule, &ret))
-			 != NULL)
-			ret = replace_in_chain(chain, ip_fwkern,
-					       new->fwn_rulenum);
-	}
-	break;
-
-	case IP_FW_APPEND: {
-		struct ip_fwchange *new = m;
-		struct ip_fwkernel *ip_fwkern;
-
-		if (len != sizeof(struct ip_fwchange)
-		    || !check_label(new->fwc_label))
-			ret = EINVAL;
-		else if ((chain = find_label(new->fwc_label)) == NULL)
-			ret = ENOENT;
-		else if ((ip_fwkern = convert_ipfw(&new->fwc_rule, &ret))
-			 != NULL)
-			ret = append_to_chain(chain, ip_fwkern);
-	}
-	break;
-
-	case IP_FW_INSERT: {
-		struct ip_fwkernel *ip_fwkern;
-		struct ip_fwnew *new = m;
-
-		if (len != sizeof(struct ip_fwnew)
-		    || !check_label(new->fwn_label))
-			ret = EINVAL;
-		else if ((chain = find_label(new->fwn_label)) == NULL)
-			ret = ENOENT;
-		else if ((ip_fwkern = convert_ipfw(&new->fwn_rule, &ret))
-			 != NULL)
-			ret = insert_in_chain(chain, ip_fwkern,
-					      new->fwn_rulenum);
-	}
-	break;
-
-	case IP_FW_DELETE: {
-		struct ip_fwchange *new = m;
-		struct ip_fwkernel *ip_fwkern;
-
-		if (len != sizeof(struct ip_fwchange)
-		    || !check_label(new->fwc_label))
-			ret = EINVAL;
-		else if ((chain = find_label(new->fwc_label)) == NULL)
-			ret = ENOENT;
-		else if ((ip_fwkern = convert_ipfw(&new->fwc_rule, &ret))
-			 != NULL) {
-			ret = del_rule_from_chain(chain, ip_fwkern);
-			kfree(ip_fwkern);
-		}
-	}
-	break;
-
-	case IP_FW_DELETE_NUM: {
-		struct ip_fwdelnum *new = m;
-
-		if (len != sizeof(struct ip_fwdelnum)
-		    || !check_label(new->fwd_label))
-			ret = EINVAL;
-		else if ((chain = find_label(new->fwd_label)) == NULL)
-			ret = ENOENT;
-		else ret = del_num_from_chain(chain, new->fwd_rulenum);
-	}
-	break;
-
-	case IP_FW_CREATECHAIN: {
-		if (len != sizeof(ip_chainlabel)) {
-			duprintf("create_chain: bad size %i\n", len);
-			ret = EINVAL;
-		}
-		else ret = create_chain(m);
-	}
-	break;
-
-	case IP_FW_DELETECHAIN: {
-		if (len != sizeof(ip_chainlabel)) {
-			duprintf("delete_chain: bad size %i\n", len);
-			ret = EINVAL;
-		}
-		else ret = del_chain(m);
-	}
-	break;
-
-	case IP_FW_POLICY: {
-		struct ip_fwpolicy *new = m;
-
-		if (len != sizeof(struct ip_fwpolicy)
-		    || !check_label(new->fwp_label))
-			ret = EINVAL;
-		else if ((chain = find_label(new->fwp_label)) == NULL)
-			ret = ENOENT;
-		else if (chain != IP_FW_INPUT_CHAIN
-			 && chain != IP_FW_FORWARD_CHAIN
-			 && chain != IP_FW_OUTPUT_CHAIN) {
-			duprintf("change_policy: can't change policy on user"
-				 " defined chain.\n");
-			ret = EINVAL;
-		}
-		else {
-		        int pol = FW_SKIP;
-			find_special(new->fwp_policy, &pol);
-
-			switch(pol) {
-			case FW_MASQUERADE:
-				if (chain != IP_FW_FORWARD_CHAIN) {
-					ret = EINVAL;
-					break;
-				}
-				/* Fall thru... */
-			case FW_BLOCK:
-			case FW_ACCEPT:
-			case FW_REJECT:
-				ret = change_policy(chain, pol);
-				break;
-			default:
-			        duprintf("change_policy: bad policy `%s'\n",
-					 new->fwp_policy);
-				ret = EINVAL;
-			}
-		}
-		break;
-	}
-	default:
-		duprintf("ip_fw_ctl:  unknown request %d\n",cmd);
-		ret = ENOPROTOOPT;
-	}
-
-	FWC_WRITE_UNLOCK_IRQ(&ip_fw_lock, flags);
-	return ret;
-}
-
-/* Returns bytes used - doesn't NUL terminate */
-static int dump_rule(char *buffer,
-		     const char *chainlabel,
-		     const struct ip_fwkernel *rule)
-{
-	int len;
-	unsigned int i;
-	__u64 packets = 0, bytes = 0;
-
-	FWC_HAVE_LOCK(fwc_wlocks);
-	for (i = 0; i < NUM_SLOTS; i++) {
-		packets += rule->counters[i].pcnt;
-		bytes += rule->counters[i].bcnt;
-	}
-
-	len=sprintf(buffer,
-		    "%9s "			/* Chain name */
-		    "%08X/%08X->%08X/%08X "	/* Source & Destination IPs */
-		    "%.16s "			/* Interface */
-		    "%X %X "			/* fw_flg and fw_invflg fields */
-		    "%u "			/* Protocol */
-		    "%-9u %-9u %-9u %-9u "	/* Packet & byte counters */
-		    "%u-%u %u-%u "		/* Source & Dest port ranges */
-		    "A%02X X%02X "		/* TOS and and xor masks */
-		    "%08X "			/* Redirection port */
-		    "%u "			/* fw_mark field */
-		    "%u "			/* output size */
-		    "%9s\n",			/* Target */
-		    chainlabel,
-		    ntohl(rule->ipfw.fw_src.s_addr),
-		    ntohl(rule->ipfw.fw_smsk.s_addr),
-		    ntohl(rule->ipfw.fw_dst.s_addr),
-		    ntohl(rule->ipfw.fw_dmsk.s_addr),
-		    (rule->ipfw.fw_vianame)[0] ? rule->ipfw.fw_vianame : "-",
-		    rule->ipfw.fw_flg,
-		    rule->ipfw.fw_invflg,
-		    rule->ipfw.fw_proto,
-		    (__u32)(packets >> 32), (__u32)packets,
-		    (__u32)(bytes >> 32), (__u32)bytes,
-		    rule->ipfw.fw_spts[0], rule->ipfw.fw_spts[1],
-		    rule->ipfw.fw_dpts[0], rule->ipfw.fw_dpts[1],
-		    rule->ipfw.fw_tosand, rule->ipfw.fw_tosxor,
-		    rule->ipfw.fw_redirpt,
-		    rule->ipfw.fw_mark,
-		    rule->ipfw.fw_outputsize,
-		    branchname(rule->branch,rule->simplebranch));
-
-	duprintf("dump_rule: %i bytes done.\n", len);
-	return len;
-}
-
-/* File offset is actually in records, not bytes. */
-static int ip_chain_procinfo(char *buffer, char **start,
-			     off_t offset, int length)
-{
-	struct ip_chain *i;
-	struct ip_fwkernel *j = ip_fw_chains->chain;
-	unsigned long flags;
-	int len = 0;
-	int last_len = 0;
-	off_t upto = 0;
-
-	duprintf("Offset starts at %lu\n", offset);
-	duprintf("ip_fw_chains is 0x%0lX\n", (unsigned long int)ip_fw_chains);
-
-	/* Need a write lock to lock out ``readers'' which update counters. */
-	FWC_WRITE_LOCK_IRQ(&ip_fw_lock, flags);
-
-	for (i = ip_fw_chains; i; i = i->next) {
-	    for (j = i->chain; j; j = j->next) {
-		if (upto == offset) break;
-		duprintf("Skipping rule in chain `%s'\n",
-			 i->label);
-		upto++;
-	    }
-	    if (upto == offset) break;
-	}
-
-	/* Don't init j first time, or once i = NULL */
-	for (; i; (void)((i = i->next) && (j = i->chain))) {
-		duprintf("Dumping chain `%s'\n", i->label);
-		for (; j; j = j->next, upto++, last_len = len)
-		{
-			len += dump_rule(buffer+len, i->label, j);
-			if (len > length) {
-				duprintf("Dumped to %i (past %i).  "
-					 "Moving back to %i.\n",
-					 len, length, last_len);
-				len = last_len;
-				goto outside;
-			}
-		}
-	}
-outside:
-	FWC_WRITE_UNLOCK_IRQ(&ip_fw_lock, flags);
-	buffer[len] = '\0';
-
-	duprintf("ip_chain_procinfo: Length = %i (of %i).  Offset = %li.\n",
-		 len, length, upto);
-	/* `start' hack - see fs/proc/generic.c line ~165 */
-	*start=(char *)((unsigned int)upto-offset);
-	return len;
-}
-
-static int ip_chain_name_procinfo(char *buffer, char **start,
-				  off_t offset, int length)
-{
-	struct ip_chain *i;
-	int len = 0,last_len = 0;
-	off_t pos = 0,begin = 0;
-	unsigned long flags;
-
-	/* Need a write lock to lock out ``readers'' which update counters. */
-	FWC_WRITE_LOCK_IRQ(&ip_fw_lock, flags);
-
-	for (i = ip_fw_chains; i; i = i->next)
-	{
-		unsigned int j;
-		__u32 packetsHi = 0, packetsLo = 0, bytesHi = 0, bytesLo = 0;
-
-		for (j = 0; j < NUM_SLOTS; j++) {
-			packetsLo += i->reent[j].counters.pcnt & 0xFFFFFFFF;
-			packetsHi += ((i->reent[j].counters.pcnt >> 32)
-				      & 0xFFFFFFFF);
-			bytesLo += i->reent[j].counters.bcnt & 0xFFFFFFFF;
-			bytesHi += ((i->reent[j].counters.bcnt >> 32)
-				    & 0xFFFFFFFF);
-		}
-
-		/* print the label and the policy */
-		len+=sprintf(buffer+len,"%s %s %i %u %u %u %u\n",
-			     i->label,branchname(NULL, i->policy),i->refcount,
-			     packetsHi, packetsLo, bytesHi, bytesLo);
-		pos=begin+len;
-		if(pos<offset) {
-			len=0;
-			begin=pos;
-		}
-		else if(pos>offset+length) {
-			len = last_len;
-			break;
-		}
-
-		last_len = len;
-	}
-	FWC_WRITE_UNLOCK_IRQ(&ip_fw_lock, flags);
-
-	*start = buffer+(offset-begin);
-	len-=(offset-begin);
-	if(len>length)
-		len=length;
-	return len;
-}
-
-/*
- *	Interface to the generic firewall chains.
- */
-int ipfw_input_check(struct firewall_ops *this, int pf,
-		     struct net_device *dev, void *arg,
-		     struct sk_buff **pskb)
-{
-	return ip_fw_check(dev->name,
-			   arg, IP_FW_INPUT_CHAIN, pskb, SLOT_NUMBER(), 0);
-}
-
-int ipfw_output_check(struct firewall_ops *this, int pf,
-		      struct net_device *dev, void *arg,
-		      struct sk_buff **pskb)
-{
-	/* Locally generated bogus packets by root. <SIGH>. */
-	if ((*pskb)->len < sizeof(struct iphdr) ||
-	    (*pskb)->nh.iph->ihl * 4 < sizeof(struct iphdr))
-		return FW_ACCEPT;
-	return ip_fw_check(dev->name,
-			   arg, IP_FW_OUTPUT_CHAIN, pskb, SLOT_NUMBER(), 0);
-}
-
-int ipfw_forward_check(struct firewall_ops *this, int pf,
-		       struct net_device *dev, void *arg,
-		       struct sk_buff **pskb)
-{
-	return ip_fw_check(dev->name,
-			   arg, IP_FW_FORWARD_CHAIN, pskb, SLOT_NUMBER(), 0);
-}
-
-struct firewall_ops ipfw_ops = {
-	.fw_forward	=	ipfw_forward_check,
-	.fw_input	=	ipfw_input_check,
-	.fw_output	=	ipfw_output_check,
-};
-
-int ipfw_init_or_cleanup(int init)
-{
-	struct proc_dir_entry *proc;
-	int ret = 0;
-	unsigned long flags;
-
-	if (!init) goto cleanup;
-
-#ifdef DEBUG_IP_FIREWALL_LOCKING
-	fwc_wlocks = fwc_rlocks = 0;
-#endif
-
-#if defined(CONFIG_NETLINK_DEV) || defined(CONFIG_NETLINK_DEV_MODULE)
-	ipfwsk = netlink_kernel_create(NETLINK_FIREWALL, NULL);
-	if (ipfwsk == NULL)
-		goto cleanup_nothing;
-#endif
-
-	ret = register_firewall(PF_INET, &ipfw_ops);
-	if (ret < 0)
-		goto cleanup_netlink;
-
-	proc = proc_net_create(IP_FW_PROC_CHAINS, S_IFREG | S_IRUSR | S_IWUSR,
-			       ip_chain_procinfo);
-	if (proc) proc->owner = THIS_MODULE;
-	proc = proc_net_create(IP_FW_PROC_CHAIN_NAMES,
-			       S_IFREG | S_IRUSR | S_IWUSR,
-			       ip_chain_name_procinfo);
-	if (proc) proc->owner = THIS_MODULE;
-
-	IP_FW_INPUT_CHAIN = ip_init_chain(IP_FW_LABEL_INPUT, 1, FW_ACCEPT);
-	IP_FW_FORWARD_CHAIN = ip_init_chain(IP_FW_LABEL_FORWARD, 1, FW_ACCEPT);
-	IP_FW_OUTPUT_CHAIN = ip_init_chain(IP_FW_LABEL_OUTPUT, 1, FW_ACCEPT);
-
-	return ret;
-
- cleanup:
-	unregister_firewall(PF_INET, &ipfw_ops);
-
-	FWC_WRITE_LOCK_IRQ(&ip_fw_lock, flags);
-	while (ip_fw_chains) {
-		struct ip_chain *next = ip_fw_chains->next;
-
-		clear_fw_chain(ip_fw_chains);
-		kfree(ip_fw_chains);
-		ip_fw_chains = next;
-	}
-	FWC_WRITE_UNLOCK_IRQ(&ip_fw_lock, flags);
-
-	proc_net_remove(IP_FW_PROC_CHAINS);
-	proc_net_remove(IP_FW_PROC_CHAIN_NAMES);
-
- cleanup_netlink:
-#if defined(CONFIG_NETLINK_DEV) || defined(CONFIG_NETLINK_DEV_MODULE)
-	sock_release(ipfwsk->sk_socket);
-
- cleanup_nothing:
-#endif
-	return ret;
-}
diff -Nru a/net/ipv4/netfilter/ipfwadm_core.c b/net/ipv4/netfilter/ipfwadm_core.c
--- a/net/ipv4/netfilter/ipfwadm_core.c	2005-01-10 20:11:18 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,1464 +0,0 @@
-#warning ipfwadm is obsolete, and will be removed soon.
-
-/* Minor modifications to fit on compatibility framework:
-   Rusty.Russell@rustcorp.com.au
-*/
-
-#include <linux/config.h>
-#define CONFIG_IP_FIREWALL
-#define CONFIG_IP_FIREWALL_VERBOSE
-#define CONFIG_IP_MASQUERADE
-#define CONFIG_IP_ACCT
-#define CONFIG_IP_TRANSPARENT_PROXY
-#if defined(CONFIG_NETLINK_DEV) || defined(CONFIG_NETLINK_DEV_MODULE)
-#define CONFIG_IP_FIREWALL_NETLINK
-#endif
-
-/*
- *	IP firewalling code. This is taken from 4.4BSD. Please note the
- *	copyright message below. As per the GPL it must be maintained
- *	and the licenses thus do not conflict. While this port is subject
- *	to the GPL I also place my modifications under the original
- *	license in recognition of the original copyright.
- *				-- Alan Cox.
- *
- *	$Id: ipfwadm_core.c,v 1.11 2002/01/24 15:50:31 davem Exp $
- *
- *	Ported from BSD to Linux,
- *		Alan Cox 22/Nov/1994.
- *	Zeroing /proc and other additions
- *		Jos Vos 4/Feb/1995.
- *	Merged and included the FreeBSD-Current changes at Ugen's request
- *	(but hey it's a lot cleaner now). Ugen would prefer in some ways
- *	we waited for his final product but since Linux 1.2.0 is about to
- *	appear it's not practical - Read: It works, it's not clean but please
- *	don't consider it to be his standard of finished work.
- *		Alan Cox 12/Feb/1995
- *	Porting bidirectional entries from BSD, fixing accounting issues,
- *	adding struct ip_fwpkt for checking packets with interface address
- *		Jos Vos 5/Mar/1995.
- *	Established connections (ACK check), ACK check on bidirectional rules,
- *	ICMP type check.
- *		Wilfred Mollenvanger 7/7/1995.
- *	TCP attack protection.
- *		Alan Cox 25/8/95, based on information from bugtraq.
- *	ICMP type printk, IP_FW_F_APPEND
- *		Bernd Eckenfels 1996-01-31
- *	Split blocking chain into input and output chains, add new "insert" and
- *	"append" commands to replace semi-intelligent "add" command, let "delete".
- *	only delete the first matching entry, use 0xFFFF (0xFF) as ports (ICMP
- *	types) when counting packets being 2nd and further fragments.
- *		Jos Vos <jos@xos.nl> 8/2/1996.
- *	Add support for matching on device names.
- *		Jos Vos <jos@xos.nl> 15/2/1996.
- *	Transparent proxying support.
- *		Willy Konynenberg <willy@xos.nl> 10/5/96.
- *	Make separate accounting on incoming and outgoing packets possible.
- *		Jos Vos <jos@xos.nl> 18/5/1996.
- *	Added trap out of bad frames.
- *		Alan Cox <alan@cymru.net> 17/11/1996
- *
- *
- * Masquerading functionality
- *
- * Copyright (c) 1994 Pauline Middelink
- *
- * The pieces which added masquerading functionality are totally
- * my responsibility and have nothing to with the original authors
- * copyright or doing.
- *
- * Parts distributed under GPL.
- *
- * Fixes:
- *	Pauline Middelink	:	Added masquerading.
- *	Alan Cox		:	Fixed an error in the merge.
- *	Thomas Quinot		:	Fixed port spoofing.
- *	Alan Cox		:	Cleaned up retransmits in spoofing.
- *	Alan Cox		:	Cleaned up length setting.
- *	Wouter Gadeyne		:	Fixed masquerading support of ftp PORT commands
- *
- *	Juan Jose Ciarlante	:	Masquerading code moved to ip_masq.c
- *	Andi Kleen :		Print frag_offsets and the ip flags properly.
- *
- *	All the real work was done by .....
- *
- */
-
-
-/*
- * Copyright (c) 1993 Daniel Boulet
- * Copyright (c) 1994 Ugen J.S.Antsilevich
- *
- * Redistribution and use in source forms, with and without modification,
- * are permitted provided that this entire comment appears intact.
- *
- * Redistribution in binary form may occur without any restrictions.
- * Obviously, it would be nice if you gave credit where credit is due
- * but requiring it would be too onerous.
- *
- * This software is provided ``AS IS'' without any warranties of any kind.
- */
-
-#include <asm/uaccess.h>
-#include <asm/system.h>
-#include <linux/types.h>
-#include <linux/kernel.h>
-#include <linux/sched.h>
-#include <linux/string.h>
-#include <linux/errno.h>
-#include <linux/module.h>
-
-#include <linux/socket.h>
-#include <linux/sockios.h>
-#include <linux/in.h>
-#include <linux/inet.h>
-#include <linux/netdevice.h>
-#include <linux/icmp.h>
-#include <linux/udp.h>
-#include <net/ip.h>
-#include <net/protocol.h>
-#include <net/route.h>
-#include <net/tcp.h>
-#include <net/udp.h>
-#include <net/sock.h>
-#include <net/icmp.h>
-#include <linux/netlink.h>
-#include <linux/init.h>
-#include <linux/spinlock.h>
-#include <linux/netfilter_ipv4/ipfwadm_core.h>
-#include <linux/netfilter_ipv4/compat_firewall.h>
-#include <linux/netfilter_ipv4/lockhelp.h>
-#include <linux/netfilter_ipv4/ip_nat_core.h>
-
-#include <net/checksum.h>
-#include <linux/proc_fs.h>
-#include <linux/stat.h>
-
-MODULE_LICENSE("Dual BSD/GPL");
-MODULE_DESCRIPTION("ipfwadm backwards compatibility layer");
-
-/*
- *	Implement IP packet firewall
- */
-
-#ifdef DEBUG_IP_FIREWALL
-#define dprintf1(a)		printk(a)
-#define dprintf2(a1,a2)		printk(a1,a2)
-#define dprintf3(a1,a2,a3)	printk(a1,a2,a3)
-#define dprintf4(a1,a2,a3,a4)	printk(a1,a2,a3,a4)
-#else
-#define dprintf1(a)
-#define dprintf2(a1,a2)
-#define dprintf3(a1,a2,a3)
-#define dprintf4(a1,a2,a3,a4)
-#endif
-
-#define print_ip(a)	 printk("%u.%u.%u.%u", NIPQUAD(a));
-
-#ifdef DEBUG_IP_FIREWALL
-#define dprint_ip(a)	print_ip(a)
-#else
-#define dprint_ip(a)
-#endif
-
-static DECLARE_RWLOCK(ip_fw_lock);
-
-#if defined(CONFIG_IP_ACCT) || defined(CONFIG_IP_FIREWALL)
-
-struct ip_fw *ip_fw_fwd_chain;
-struct ip_fw *ip_fw_in_chain;
-struct ip_fw *ip_fw_out_chain;
-struct ip_fw *ip_acct_chain;
-struct ip_fw *ip_masq_chain;
-
-static struct ip_fw **chains[] =
-	{&ip_fw_fwd_chain, &ip_fw_in_chain, &ip_fw_out_chain, &ip_acct_chain,
-	 &ip_masq_chain
-	};
-#endif /* CONFIG_IP_ACCT || CONFIG_IP_FIREWALL */
-
-#ifdef CONFIG_IP_FIREWALL
-int ip_fw_fwd_policy=IP_FW_F_ACCEPT;
-int ip_fw_in_policy=IP_FW_F_ACCEPT;
-int ip_fw_out_policy=IP_FW_F_ACCEPT;
-
-static int *policies[] =
-	{&ip_fw_fwd_policy, &ip_fw_in_policy, &ip_fw_out_policy};
-
-#endif
-
-#ifdef CONFIG_IP_FIREWALL_NETLINK
-struct sock *ipfwsk;
-#endif
-
-/*
- *	Returns 1 if the port is matched by the vector, 0 otherwise
- */
-
-extern inline int port_match(unsigned short *portptr,int nports,unsigned short port,int range_flag)
-{
-	if (!nports)
-		return 1;
-	if ( range_flag )
-	{
-		if ( portptr[0] <= port && port <= portptr[1] )
-		{
-			return( 1 );
-		}
-		nports -= 2;
-		portptr += 2;
-	}
-	while ( nports-- > 0 )
-	{
-		if ( *portptr++ == port )
-		{
-			return( 1 );
-		}
-	}
-	return(0);
-}
-
-#if defined(CONFIG_IP_ACCT) || defined(CONFIG_IP_FIREWALL)
-
-#ifdef CONFIG_IP_FIREWALL_VERBOSE
-
-/*
- *	VERY ugly piece of code which actually makes kernel printf for
- * 	matching packets.
- */
-
-static char *chain_name(struct ip_fw *chain, int mode)
-{
-	switch (mode) {
-	case IP_FW_MODE_ACCT_IN: return "acct in";
-	case IP_FW_MODE_ACCT_OUT: return "acct out";
-	default:
-		if (chain == ip_fw_fwd_chain)
-			return "fw-fwd";
-		else if (chain == ip_fw_in_chain)
-			return "fw-in";
-		else
-			return "fw-out";
-	}
-}
-
-static char *rule_name(struct ip_fw *f, int mode, char *buf)
-{
-	if (mode == IP_FW_MODE_ACCT_IN || mode == IP_FW_MODE_ACCT_OUT)
-		return "";
-
-	if(f->fw_flg&IP_FW_F_ACCEPT) {
-		if(f->fw_flg&IP_FW_F_REDIR) {
-			sprintf(buf, "acc/r%d ", f->fw_pts[f->fw_nsp+f->fw_ndp]);
-			return buf;
-		} else if(f->fw_flg&IP_FW_F_MASQ)
-			return "acc/masq ";
-		else
-			return "acc ";
-	} else if(f->fw_flg&IP_FW_F_ICMPRPL) {
-		return "rej ";
-	} else {
-		return "deny ";
-	}
-}
-
-static void print_packet(struct sk_buff **pskb,
-			 u16 src_port, u16 dst_port, u16 icmp_type,
-			 char *chain, char *rule, char *devname)
-{
-	__u32 *opt = (__u32 *) ((*pskb)->nh.iph + 1);
-	int opti;
-	__u16 foff = ntohs((*pskb)->nh.iph->frag_off);
-	int protocol = (*pskb)->nh.iph->protocol;
-
-	printk(KERN_INFO "IP %s %s%s", chain, rule, devname);
-
-	switch (protocol) {
-	case IPPROTO_TCP:
-		printk(" TCP ");
-		break;
-	case IPPROTO_UDP:
-		printk(" UDP ");
-		break;
-	case IPPROTO_ICMP:
-		printk(" ICMP/%d ", icmp_type);
-		break;
-	default:
-		printk(" PROTO=%d ", protocol);
-		break;
-	};
-
-	print_ip((*pskb)->nh.iph->saddr);
-	if (protocol == IPPROTO_TCP || protocol == IPPROTO_UDP)
-		printk(":%hu", src_port);
-	printk(" ");
-	print_ip((*pskb)->nh.iph->daddr);
-	if (protocol == IPPROTO_TCP || protocol == IPPROTO_UDP)
-		printk(":%hu", dst_port);
-	printk(" L=%hu S=0x%2.2hX I=%hu FO=0x%4.4hX T=%hu",
-	       ntohs((*pskb)->nh.iph->tot_len),
-	       (*pskb)->nh.iph->tos,
-	       ntohs((*pskb)->nh.iph->id),
-	       foff & IP_OFFSET,
-	       (*pskb)->nh.iph->ttl);
-	if (foff & IP_DF)
-		printk(" DF=1");
-	if (foff & IP_MF)
-		printk(" MF=1");
-	for (opti = 0; opti < ((*pskb)->nh.iph->ihl - sizeof(struct iphdr) / 4); opti++)
-		printk(" O=0x%8.8X", *opt++);
-	printk("\n");
-}
-#endif
-
-/*
- *	Returns one of the generic firewall policies, like FW_ACCEPT.
- *	Also does accounting so you can feed it the accounting chain.
- *
- *	The modes is either IP_FW_MODE_FW (normal firewall mode),
- *	IP_FW_MODE_ACCT_IN or IP_FW_MODE_ACCT_OUT (accounting mode,
- *	steps through the entire chain and handles fragments
- *	differently), or IP_FW_MODE_CHK (handles user-level check,
- *	counters are not updated).
- */
-
-
-int ip_fw_chk(struct sk_buff **pskb,
-	      struct net_device *rif, __u16 *redirport,
-	      struct ip_fw *chain, int policy, int mode)
-{
-	struct ip_fw *f;
-	__u32			src, dst;
-	__u16			src_port=0xFFFF, dst_port=0xFFFF, icmp_type=0xFF;
-	unsigned short		f_prt=0, prt;
-	char			notcpsyn=0, notcpack=0, match;
-	unsigned short		offset;
-	int			answer;
-	unsigned char		tosand, tosxor;
-	int			protocol;
-
-	/*
-	 *	If the chain is empty follow policy. The BSD one
-	 *	accepts anything giving you a time window while
-	 *	flushing and rebuilding the tables.
-	 */
-
-	/*
-	 *	This way we handle fragmented packets.
-	 *	we ignore all fragments but the first one
-	 *	so the whole packet can't be reassembled.
-	 *	This way we relay on the full info which
-	 *	stored only in first packet.
-	 *
-	 *	Note that this theoretically allows partial packet
-	 *	spoofing. Not very dangerous but paranoid people may
-	 *	wish to play with this. It also allows the so called
-	 *	"fragment bomb" denial of service attack on some types
-	 *	of system.
-	 */
-
-	offset = ntohs((*pskb)->nh.iph->frag_off) & IP_OFFSET;
-	protocol = (*pskb)->nh.iph->protocol;
-
-	/*
-	 *	Don't allow a fragment of TCP 8 bytes in. Nobody
-	 *	normal causes this. Its a cracker trying to break
-	 *	in by doing a flag overwrite to pass the direction
-	 *	checks.
-	 */
-
-	if (offset == 1 && protocol == IPPROTO_TCP)
-		return FW_BLOCK;
-
-	if (offset!=0 && !(mode & (IP_FW_MODE_ACCT_IN|IP_FW_MODE_ACCT_OUT)) &&
-		(protocol == IPPROTO_TCP ||
-		 protocol == IPPROTO_UDP ||
-		 protocol == IPPROTO_ICMP))
-		return FW_ACCEPT;
-
-	/*
-	 *	 Header fragment for TCP is too small to check the bits.
-	 */
-
-	if (protocol == IPPROTO_TCP &&
-	    ((*pskb)->nh.iph->ihl<<2)+16 > ntohs((*pskb)->nh.iph->tot_len))
-		return FW_BLOCK;
-
-	/*
-	 *	Too short.
-	 *
-	 *	But only too short for a packet with ports...
-	 */
-
-	else if ((ntohs((*pskb)->nh.iph->tot_len) <
-		  8 + ((*pskb)->nh.iph->ihl << 2)) &&
-		 (protocol == IPPROTO_TCP || protocol == IPPROTO_UDP))
-		return FW_BLOCK;
-
-	src = (*pskb)->nh.iph->saddr;
-	dst = (*pskb)->nh.iph->daddr;
-
-	/*
-	 *	If we got interface from which packet came
-	 *	we can use the address directly. This is unlike
-	 *	4.4BSD derived systems that have an address chain
-	 *	per device. We have a device per address with dummy
-	 *	devices instead.
-	 */
-
-	dprintf1("Packet ");
-	switch (protocol) {
-		case IPPROTO_TCP:
-			dprintf1("TCP ");
-			/* ports stay 0xFFFF if it is not the first fragment */
-			if (!offset) {
-				struct tcphdr _tcph, *th;
-
-				th = skb_header_pointer(*pskb,
-							(*pskb)->nh.iph->ihl*4,
-							sizeof(_tcph), &_tcph);
-				if (th == NULL)
-					return FW_BLOCK;
-
-				src_port = ntohs(th->source);
-				dst_port = ntohs(th->dest);
-
-				if(!th->ack && !th->rst)
-					/* We do NOT have ACK, value TRUE */
-					notcpack = 1;
-				if(!th->syn || !notcpack)
-					/* We do NOT have SYN, value TRUE */
-					notcpsyn = 1;
-			}
-			prt = IP_FW_F_TCP;
-			break;
-		case IPPROTO_UDP:
-			dprintf1("UDP ");
-			/* ports stay 0xFFFF if it is not the first fragment */
-			if (!offset) {
-				struct udphdr _udph, *uh;
-
-				uh = skb_header_pointer(*pskb,
-							(*pskb)->nh.iph->ihl*4,
-							sizeof(_udph), &_udph);
-				if (uh == NULL)
-					return FW_BLOCK;
-
-				src_port = ntohs(uh->source);
-				dst_port = ntohs(uh->dest);
-			}
-			prt = IP_FW_F_UDP;
-			break;
-		case IPPROTO_ICMP:
-			/* icmp_type stays 255 if it is not the first fragment */
-			if (!offset) {
-				struct icmphdr _icmph, *ic;
-
-				ic = skb_header_pointer(*pskb,
-							(*pskb)->nh.iph->ihl*4,
-							sizeof(_icmph),
-							&_icmph);
-				if (ic == NULL)
-					return FW_BLOCK;
-
-				icmp_type = (__u16) ic->type;
-			}
-			dprintf2("ICMP:%d ", icmp_type);
-			prt = IP_FW_F_ICMP;
-			break;
-		default:
-			dprintf2("p=%d ", protocol);
-			prt = IP_FW_F_ALL;
-			break;
-	}
-#ifdef DEBUG_IP_FIREWALL
-	dprint_ip(src);
-
-	if (protocol == IPPROTO_TCP || protocol == IPPROTO_UDP)
-		/* This will print 65535 when it is not the first fragment! */
-		dprintf2(":%d ", src_port);
-	dprint_ip(dst);
-	if (protocol == IPPROTO_TCP || protocol == IPPROTO_UDP)
-		/* This will print 65535 when it is not the first fragment! */
-		dprintf2(":%d ", dst_port);
-	dprintf1("\n");
-#endif
-
-	if (mode == IP_FW_MODE_CHK)
-		READ_LOCK(&ip_fw_lock);
-	else
-		WRITE_LOCK(&ip_fw_lock);
-	
-	for (f = chain; f; f = f->fw_next) {
-		/*
-		 *	This is a bit simpler as we don't have to walk
-		 *	an interface chain as you do in BSD - same logic
-		 *	however.
-		 */
-
-		/*
-		 *	Match can become 0x01 (a "normal" match was found),
-		 *	0x02 (a reverse match was found), and 0x03 (the
-		 *	IP addresses match in both directions).
-		 *	Now we know in which direction(s) we should look
-		 *	for a match for the TCP/UDP ports.  Both directions
-		 *	might match (e.g., when both addresses are on the
-		 *	same network for which an address/mask is given), but
-		 *	the ports might only match in one direction.
-		 *	This was obviously wrong in the original BSD code.
-		 */
-		match = 0x00;
-
-		if ((src & f->fw_smsk.s_addr) == f->fw_src.s_addr &&
-		    (dst & f->fw_dmsk.s_addr) == f->fw_dst.s_addr)
-			/* normal direction */
-			match |= 0x01;
-
-		if ((f->fw_flg & IP_FW_F_BIDIR) &&
-		    (dst & f->fw_smsk.s_addr) == f->fw_src.s_addr &&
-		    (src & f->fw_dmsk.s_addr) == f->fw_dst.s_addr)
-			/* reverse direction */
-			match |= 0x02;
-
-		if (!match)
-			continue;
-
-		/*
-		 *	Look for a VIA device match
-		 */
-		if (f->fw_viadev) {
-			if (rif != f->fw_viadev)
-				continue;	/* Mismatch */
-		}
-
-		/* This looks stupid, because we scan almost static
-		   list, searching for static key. However, this way seems
-		   to be only reasonable way of handling fw_via rules
-		   (btw bsd makes the same thing).
-
-		   It will not affect performance if you will follow
-		   the following simple rules:
-
-		   - if interface is aliased, ALWAYS specify fw_viadev,
-		     so that previous check will guarantee, that we will
-		     not waste time when packet arrive on another interface.
-
-		   - avoid using fw_via.s_addr if fw_via.s_addr is owned
-		     by an aliased interface.
-
-		                                                       --ANK
-		 */
-		if (f->fw_via.s_addr && rif) {
-			struct in_ifaddr *ifa;
-
-			if (rif->ip_ptr == NULL)
-				continue;	/* Mismatch */
-
-			for (ifa = ((struct in_device*)(rif->ip_ptr))->ifa_list;
-			     ifa; ifa = ifa->ifa_next) {
-				if (ifa->ifa_local == f->fw_via.s_addr)
-					goto ifa_ok;
-			}
-			continue;	/* Mismatch */
-
-		ifa_ok:;
-		}
-
-		/*
-		 *	Ok the chain addresses match.
-		 */
-
-#ifdef CONFIG_IP_ACCT
-		/*
-		 *	See if we're in accounting mode and only want to
-		 *	count incoming or outgoing packets.
-		 */
-
-		if (mode & (IP_FW_MODE_ACCT_IN|IP_FW_MODE_ACCT_OUT) &&
-		   ((mode == IP_FW_MODE_ACCT_IN && f->fw_flg&IP_FW_F_ACCTOUT) ||
-		    (mode == IP_FW_MODE_ACCT_OUT && f->fw_flg&IP_FW_F_ACCTIN)))
-			continue;
-
-#endif
-		/*
-		 * For all non-TCP packets and/or non-first fragments,
-		 * notcpsyn and notcpack will always be FALSE,
-		 * so the IP_FW_F_TCPSYN and IP_FW_F_TCPACK flags
-		 * are actually ignored for these packets.
-		 */
-
-		if((f->fw_flg&IP_FW_F_TCPSYN) && notcpsyn)
-		 	continue;
-
-		if((f->fw_flg&IP_FW_F_TCPACK) && notcpack)
-		 	continue;
-
-		f_prt=f->fw_flg&IP_FW_F_KIND;
-		if (f_prt != IP_FW_F_ALL) {
-			/*
-			 *	Specific firewall - packet's protocol
-			 *	must match firewall's.
-			 */
-
-			if (prt != f_prt)
-				continue;
-
-			if((prt==IP_FW_F_ICMP &&
-				! port_match(&f->fw_pts[0], f->fw_nsp,
-					icmp_type,f->fw_flg&IP_FW_F_SRNG)) ||
-			    !(prt==IP_FW_F_ICMP || ((match & 0x01) &&
-				port_match(&f->fw_pts[0], f->fw_nsp, src_port,
-					f->fw_flg&IP_FW_F_SRNG) &&
-				port_match(&f->fw_pts[f->fw_nsp], f->fw_ndp, dst_port,
-					f->fw_flg&IP_FW_F_DRNG)) || ((match & 0x02) &&
-				port_match(&f->fw_pts[0], f->fw_nsp, dst_port,
-					f->fw_flg&IP_FW_F_SRNG) &&
-				port_match(&f->fw_pts[f->fw_nsp], f->fw_ndp, src_port,
-					f->fw_flg&IP_FW_F_DRNG))))
-			{
-				continue;
-			}
-		}
-
-#ifdef CONFIG_IP_FIREWALL_VERBOSE
-		if (f->fw_flg & IP_FW_F_PRN)
-		{
-			char buf[16];
-
-			print_packet(pskb, src_port, dst_port, icmp_type,
-				     chain_name(chain, mode),
-				     rule_name(f, mode, buf),
-				     rif ? rif->name : "-");
-		}
-#endif
-		if (mode != IP_FW_MODE_CHK) {
-			f->fw_bcnt += ntohs((*pskb)->nh.iph->tot_len);
-			f->fw_pcnt++;
-		}
-		if (!(mode & (IP_FW_MODE_ACCT_IN|IP_FW_MODE_ACCT_OUT)))
-			break;
-	} /* Loop */
-
-	if (!(mode & (IP_FW_MODE_ACCT_IN|IP_FW_MODE_ACCT_OUT))) {
-
-		/*
-		 * We rely on policy defined in the rejecting entry or, if no match
-		 * was found, we rely on the general policy variable for this type
-		 * of firewall.
-		 */
-
-		if (f != NULL) {
-			policy = f->fw_flg;
-			tosand = f->fw_tosand;
-			tosxor = f->fw_tosxor;
-		} else {
-			tosand = 0xFF;
-			tosxor = 0x00;
-		}
-
-		if (policy & IP_FW_F_ACCEPT) {
-			/* Adjust priority and recompute checksum */
-			__u8 tos = (*pskb)->nh.iph->tos;
-
-			if (((tos & tosand) ^ tosxor) != tos) {
-				if (!skb_ip_make_writable(pskb,
-					  offsetof(struct iphdr, tos)+1))
-					goto drop_it;
-
-				(*pskb)->nh.iph->tos = (tos & tosand) ^ tosxor;
-		 		ip_send_check((*pskb)->nh.iph);
-			}
-
-#ifdef CONFIG_IP_TRANSPARENT_PROXY
-			if (policy & IP_FW_F_REDIR) {
-				if (redirport)
-					if ((*redirport = htons(f->fw_pts[f->fw_nsp+f->fw_ndp])) == 0) {
-						/* Wildcard redirection.
-						 * Note that redirport will become
-						 * 0xFFFF for non-TCP/UDP packets.
-						 */
-						*redirport = htons(dst_port);
-					}
-				answer = FW_REDIRECT;
-			} else
-#endif
-#ifdef CONFIG_IP_MASQUERADE
-			if (policy & IP_FW_F_MASQ)
-				answer = FW_MASQUERADE;
-			else
-#endif
-				answer = FW_ACCEPT;
-
-		} else if (policy & IP_FW_F_ICMPRPL)
-			answer = FW_REJECT;
-		else {
-		drop_it:
-			answer = FW_BLOCK;
-		}
-
-#ifdef CONFIG_IP_FIREWALL_NETLINK
-		if ((policy & IP_FW_F_PRN) && (answer == FW_REJECT || answer == FW_BLOCK))
-		{
-			struct sk_buff *skb = alloc_skb(128,
-					(mode == IP_FW_MODE_CHK) ?
-					GFP_KERNEL : GFP_ATOMIC);
-			if (skb) {
-				int len = min_t(unsigned int,
-					128,
-					ntohs((*pskb)->nh.iph->tot_len));
-
-				skb_put(skb, len);
-				skb_copy_bits(*pskb,
-					((char *)(*pskb)->nh.iph -
-					 (char *)(*pskb)->data),
-					skb->data, len);
-				if (netlink_post(NETLINK_FIREWALL, skb))
-					kfree_skb(skb);
-			}
-		}
-#endif
-	} else
-		/* we're doing accounting, always ok */
-		answer = 0;
-	
-	if (mode == IP_FW_MODE_CHK)
-		READ_UNLOCK(&ip_fw_lock);
-	else
-		WRITE_UNLOCK(&ip_fw_lock);
-
-	return answer;
-}
-
-
-static void zero_fw_chain(struct ip_fw *chainptr)
-{
-	struct ip_fw *ctmp=chainptr;
-	
-	WRITE_LOCK(&ip_fw_lock);
-	while(ctmp)
-	{
-		ctmp->fw_pcnt=0L;
-		ctmp->fw_bcnt=0L;
-		ctmp=ctmp->fw_next;
-	}
-	WRITE_UNLOCK(&ip_fw_lock);
-}
-
-static void free_fw_chain(struct ip_fw *volatile* chainptr)
-{
-	WRITE_LOCK(&ip_fw_lock);
-	while ( *chainptr != NULL )
-	{
-		struct ip_fw *ftmp;
-		ftmp = *chainptr;
-		*chainptr = ftmp->fw_next;
-		if (ftmp->fw_viadev
-		    && ftmp->fw_viadev != (struct net_device *)-1)
-			dev_put(ftmp->fw_viadev);
-		kfree(ftmp);
-		/* We will block in cleanup's unregister sockopt if unloaded,
-		   so this is safe. */
-		module_put(THIS_MODULE);
-	}
-	WRITE_UNLOCK(&ip_fw_lock);
-}
-
-/* Volatiles to keep some of the compiler versions amused */
-
-static int insert_in_chain(struct ip_fw *volatile* chainptr, struct ip_fw *frwl,int len)
-{
-	struct ip_fw *ftmp;
-
-	/* Are we unloading now?  We will block on nf_unregister_sockopt */
-	if (!try_module_get(THIS_MODULE))
-		return ENOPROTOOPT;
-
-	ftmp = kmalloc( sizeof(struct ip_fw), GFP_KERNEL );
-	if ( ftmp == NULL )
-	{
-#ifdef DEBUG_IP_FIREWALL
-		printk("ip_fw_ctl:  malloc said no\n");
-#endif
-		return( ENOMEM );
-	}
-
-	memcpy(ftmp, frwl, len);
-	/*
-	 *	Allow the more recent "minimise cost" flag to be
-	 *	set. [Rob van Nieuwkerk]
-	 */
-	ftmp->fw_tosand |= 0x01;
-	ftmp->fw_tosxor &= 0xFE;
-	ftmp->fw_pcnt=0L;
-	ftmp->fw_bcnt=0L;
-
-	WRITE_LOCK(&ip_fw_lock);
-
-	if ((ftmp->fw_vianame)[0]) {
-		if (!(ftmp->fw_viadev = dev_get_by_name(ftmp->fw_vianame)))
-			ftmp->fw_viadev = (struct net_device *) -1;
-	} else
-		ftmp->fw_viadev = NULL;
-
-	ftmp->fw_next = *chainptr;
-       	*chainptr=ftmp;
-	WRITE_UNLOCK(&ip_fw_lock);
-	return(0);
-}
-
-static int append_to_chain(struct ip_fw *volatile* chainptr, struct ip_fw *frwl,int len)
-{
-	struct ip_fw *ftmp;
-	struct ip_fw *chtmp=NULL;
-	struct ip_fw *volatile chtmp_prev=NULL;
-
-	/* Are we unloading now?  We will block on nf_unregister_sockopt */
-	if (!try_module_get(THIS_MODULE))
-		return ENOPROTOOPT;
-
-	ftmp = kmalloc( sizeof(struct ip_fw), GFP_KERNEL );
-	if ( ftmp == NULL )
-	{
-#ifdef DEBUG_IP_FIREWALL
-		printk("ip_fw_ctl:  malloc said no\n");
-#endif
-		return( ENOMEM );
-	}
-
-	memcpy(ftmp, frwl, len);
-	/*
-	 *	Allow the more recent "minimise cost" flag to be
-	 *	set. [Rob van Nieuwkerk]
-	 */
-	ftmp->fw_tosand |= 0x01;
-	ftmp->fw_tosxor &= 0xFE;
-	ftmp->fw_pcnt=0L;
-	ftmp->fw_bcnt=0L;
-
-	ftmp->fw_next = NULL;
-
-	WRITE_LOCK(&ip_fw_lock);
-
-	if ((ftmp->fw_vianame)[0]) {
-		if (!(ftmp->fw_viadev = dev_get_by_name(ftmp->fw_vianame)))
-			ftmp->fw_viadev = (struct net_device *) -1;
-	} else
-		ftmp->fw_viadev = NULL;
-
-	chtmp_prev=NULL;
-	for (chtmp=*chainptr;chtmp!=NULL;chtmp=chtmp->fw_next)
-		chtmp_prev=chtmp;
-
-	if (chtmp_prev)
-		chtmp_prev->fw_next=ftmp;
-	else
-        	*chainptr=ftmp;
-	WRITE_UNLOCK(&ip_fw_lock);
-	return(0);
-}
-
-static int del_from_chain(struct ip_fw *volatile*chainptr, struct ip_fw *frwl)
-{
-	struct ip_fw 	*ftmp,*ltmp;
-	unsigned short	tport1,tport2,tmpnum;
-	char		matches,was_found;
-
-	WRITE_LOCK(&ip_fw_lock);
-
-	ftmp=*chainptr;
-
-	if ( ftmp == NULL )
-	{
-#ifdef DEBUG_IP_FIREWALL
-		printk("ip_fw_ctl:  chain is empty\n");
-#endif
-		WRITE_UNLOCK(&ip_fw_lock);
-		return( EINVAL );
-	}
-
-	ltmp=NULL;
-	was_found=0;
-
-	while( !was_found && ftmp != NULL )
-	{
-		matches=1;
-		if (ftmp->fw_src.s_addr!=frwl->fw_src.s_addr
-		     ||  ftmp->fw_dst.s_addr!=frwl->fw_dst.s_addr
-		     ||  ftmp->fw_smsk.s_addr!=frwl->fw_smsk.s_addr
-		     ||  ftmp->fw_dmsk.s_addr!=frwl->fw_dmsk.s_addr
-		     ||  ftmp->fw_via.s_addr!=frwl->fw_via.s_addr
-		     ||  ftmp->fw_flg!=frwl->fw_flg)
-        		matches=0;
-
-		tport1=ftmp->fw_nsp+ftmp->fw_ndp;
-		tport2=frwl->fw_nsp+frwl->fw_ndp;
-		if (tport1!=tport2)
-		        matches=0;
-		else if (tport1!=0)
-		{
-			for (tmpnum=0;tmpnum < tport1 && tmpnum < IP_FW_MAX_PORTS;tmpnum++)
-        		if (ftmp->fw_pts[tmpnum]!=frwl->fw_pts[tmpnum])
-				matches=0;
-		}
-		if (strncmp(ftmp->fw_vianame, frwl->fw_vianame, IFNAMSIZ))
-		        matches=0;
-		if(matches)
-		{
-			was_found=1;
-			if (ftmp->fw_viadev
-			    && ftmp->fw_viadev != (struct net_device *)-1)
-				dev_put(ftmp->fw_viadev);
-			if (ltmp)
-			{
-				ltmp->fw_next=ftmp->fw_next;
-				kfree(ftmp);
-				ftmp=ltmp->fw_next;
-        		}
-      			else
-      			{
-      				*chainptr=ftmp->fw_next;
-	 			kfree(ftmp);
-				ftmp=*chainptr;
-			}
-		}
-		else
-		{
-			ltmp = ftmp;
-			ftmp = ftmp->fw_next;
-		 }
-	}
-	WRITE_UNLOCK(&ip_fw_lock);
-	if (was_found) {
-		/* We will block in cleanup's unregister sockopt if unloaded,
-		   so this is safe. */
-		module_put(THIS_MODULE);
-		return 0;
-	} else
-		return(EINVAL);
-}
-
-#endif  /* CONFIG_IP_ACCT || CONFIG_IP_FIREWALL */
-
-struct ip_fw *check_ipfw_struct(struct ip_fw *frwl, int len)
-{
-
-	if ( len != sizeof(struct ip_fw) )
-	{
-#ifdef DEBUG_IP_FIREWALL
-		printk("ip_fw_ctl: len=%d, want %d\n",len, sizeof(struct ip_fw));
-#endif
-		return(NULL);
-	}
-
-	if ( (frwl->fw_flg & ~IP_FW_F_MASK) != 0 )
-	{
-#ifdef DEBUG_IP_FIREWALL
-		printk("ip_fw_ctl: undefined flag bits set (flags=%x)\n",
-			frwl->fw_flg);
-#endif
-		return(NULL);
-	}
-
-#ifndef CONFIG_IP_TRANSPARENT_PROXY
-	if (frwl->fw_flg & IP_FW_F_REDIR) {
-#ifdef DEBUG_IP_FIREWALL
-		printk("ip_fw_ctl: unsupported flag IP_FW_F_REDIR\n");
-#endif
-		return(NULL);
-	}
-#endif
-
-#ifndef CONFIG_IP_MASQUERADE
-	if (frwl->fw_flg & IP_FW_F_MASQ) {
-#ifdef DEBUG_IP_FIREWALL
-		printk("ip_fw_ctl: unsupported flag IP_FW_F_MASQ\n");
-#endif
-		return(NULL);
-	}
-#endif
-
-	if ( (frwl->fw_flg & IP_FW_F_SRNG) && frwl->fw_nsp < 2 )
-	{
-#ifdef DEBUG_IP_FIREWALL
-		printk("ip_fw_ctl: src range set but fw_nsp=%d\n",
-			frwl->fw_nsp);
-#endif
-		return(NULL);
-	}
-
-	if ( (frwl->fw_flg & IP_FW_F_DRNG) && frwl->fw_ndp < 2 )
-	{
-#ifdef DEBUG_IP_FIREWALL
-		printk("ip_fw_ctl: dst range set but fw_ndp=%d\n",
-			frwl->fw_ndp);
-#endif
-		return(NULL);
-	}
-
-	if ( frwl->fw_nsp + frwl->fw_ndp > (frwl->fw_flg & IP_FW_F_REDIR ? IP_FW_MAX_PORTS - 1 : IP_FW_MAX_PORTS) )
-	{
-#ifdef DEBUG_IP_FIREWALL
-		printk("ip_fw_ctl: too many ports (%d+%d)\n",
-			frwl->fw_nsp,frwl->fw_ndp);
-#endif
-		return(NULL);
-	}
-
-	return frwl;
-}
-
-
-
-
-#ifdef CONFIG_IP_ACCT
-
-int ip_acct_ctl(int stage, void *m, int len)
-{
-	if ( stage == IP_ACCT_FLUSH )
-	{
-		free_fw_chain(&ip_acct_chain);
-		return(0);
-	}
-	if ( stage == IP_ACCT_ZERO )
-	{
-		zero_fw_chain(ip_acct_chain);
-		return(0);
-	}
-	if ( stage == IP_ACCT_INSERT || stage == IP_ACCT_APPEND ||
-	  				stage == IP_ACCT_DELETE )
-	{
-		struct ip_fw *frwl;
-
-		if (!(frwl=check_ipfw_struct(m,len)))
-			return (EINVAL);
-
-		switch (stage)
-		{
-			case IP_ACCT_INSERT:
-				return( insert_in_chain(&ip_acct_chain,frwl,len));
-			case IP_ACCT_APPEND:
-				return( append_to_chain(&ip_acct_chain,frwl,len));
-		    	case IP_ACCT_DELETE:
-				return( del_from_chain(&ip_acct_chain,frwl));
-			default:
-				/*
- 				 *	Should be panic but... (Why ??? - AC)
-				 */
-#ifdef DEBUG_IP_FIREWALL
-				printk("ip_acct_ctl:  unknown request %d\n",stage);
-#endif
-				return(EINVAL);
-		}
-	}
-#ifdef DEBUG_IP_FIREWALL
-	printk("ip_acct_ctl:  unknown request %d\n",stage);
-#endif
-	return(EINVAL);
-}
-#endif
-
-#ifdef CONFIG_IP_FIREWALL
-int ip_fw_ctl(int stage, void *m, int len)
-{
-	int cmd, fwtype;
-
-	cmd = stage & IP_FW_COMMAND;
-	fwtype = (stage & IP_FW_TYPE) >> IP_FW_SHIFT;
-
-	if ( cmd == IP_FW_FLUSH )
-	{
-		free_fw_chain(chains[fwtype]);
-		return(0);
-	}
-
-	if ( cmd == IP_FW_ZERO )
-	{
-		zero_fw_chain(*chains[fwtype]);
-		return(0);
-	}
-
-	if ( cmd == IP_FW_POLICY )
-	{
-		int *tmp_policy_ptr;
-		tmp_policy_ptr=(int *)m;
-		*policies[fwtype] = *tmp_policy_ptr;
-		return 0;
-	}
-
-	if ( cmd == IP_FW_CHECK )
-	{
-		struct sk_buff *tmp_skb;
-		struct net_device *viadev;
-		struct ip_fwpkt *ipfwp;
-		struct iphdr *ip;
-		int hdrlen, ret;
-
-		hdrlen = sizeof(struct ip_fwpkt) -
-			sizeof(struct in_addr) -
-			IFNAMSIZ;
-
-		if ( len != sizeof(struct ip_fwpkt) )
-		{
-#ifdef DEBUG_IP_FIREWALL
-			printk("ip_fw_ctl: length=%d, expected %d\n",
-				len, sizeof(struct ip_fwpkt));
-#endif
-			return( EINVAL );
-		}
-
-	 	ipfwp = (struct ip_fwpkt *)m;
-	 	ip = &(ipfwp->fwp_iph);
-
-		if ( !(viadev = dev_get_by_name(ipfwp->fwp_vianame)) ) {
-#ifdef DEBUG_IP_FIREWALL
-			printk("ip_fw_ctl: invalid device \"%s\"\n", ipfwp->fwp_vianame);
-#endif
-			return(EINVAL);
-		} else if ( ip->ihl != sizeof(struct iphdr) / sizeof(int)) {
-#ifdef DEBUG_IP_FIREWALL
-			printk("ip_fw_ctl: ip->ihl=%d, want %d\n",ip->ihl,
-					sizeof(struct iphdr)/sizeof(int));
-#endif
-			dev_put(viadev);
-			return(EINVAL);
-		}
-
-		/* Fix this one up by hand, who knows how many
-		 * tools will break if we start to barf on this.
-		 */
-		if (ntohs(ip->tot_len) > hdrlen)
-			ip->tot_len = htons(hdrlen);
-
-		if ((tmp_skb = alloc_skb(hdrlen, GFP_ATOMIC)) == NULL) {
-#ifdef DEBUG_IP_FIREWALL
-			printk("ip_fw_ctl: tmp_skb alloc failure\n");
-#endif
-			dev_put(viadev);
-			return(EFAULT);
-		}
-		skb_reserve(tmp_skb, hdrlen);
-		skb_push(tmp_skb, hdrlen);
-		memcpy(tmp_skb->data, ip, hdrlen);
-
-		ret = ip_fw_chk(&tmp_skb, viadev, NULL, *chains[fwtype],
-				*policies[fwtype], IP_FW_MODE_CHK);
-
-		kfree_skb(tmp_skb);
-		dev_put(viadev);
-
-		switch (ret) {
-			case FW_ACCEPT:
-				return(0);
-	    		case FW_REDIRECT:
-				return(ECONNABORTED);
-	    		case FW_MASQUERADE:
-				return(ECONNRESET);
-	    		case FW_REJECT:
-				return(ECONNREFUSED);
-			default: /* FW_BLOCK */
-				return(ETIMEDOUT);
-		}
-	}
-
-	if ( cmd == IP_FW_MASQ_TIMEOUTS )
-		return ip_fw_masq_timeouts(m, len);
-
-/*
- *	Here we really working hard-adding new elements
- *	to blocking/forwarding chains or deleting 'em
- */
-
-	if ( cmd == IP_FW_INSERT || cmd == IP_FW_APPEND || cmd == IP_FW_DELETE )
-	{
-		struct ip_fw *frwl;
-		int fwtype;
-
-		frwl=check_ipfw_struct(m,len);
-		if (frwl==NULL)
-			return (EINVAL);
-		fwtype = (stage & IP_FW_TYPE) >> IP_FW_SHIFT;
-
-		switch (cmd)
-		{
-			case IP_FW_INSERT:
-				return(insert_in_chain(chains[fwtype],frwl,len));
-			case IP_FW_APPEND:
-				return(append_to_chain(chains[fwtype],frwl,len));
-			case IP_FW_DELETE:
-				return(del_from_chain(chains[fwtype],frwl));
-			default:
-			/*
-	 		 *	Should be panic but... (Why are BSD people panic obsessed ??)
-			 */
-#ifdef DEBUG_IP_FIREWALL
-				printk("ip_fw_ctl:  unknown request %d\n",stage);
-#endif
-				return(EINVAL);
-		}
-	}
-
-#ifdef DEBUG_IP_FIREWALL
-	printk("ip_fw_ctl:  unknown request %d\n",stage);
-#endif
-	return(ENOPROTOOPT);
-}
-#endif /* CONFIG_IP_FIREWALL */
-
-#if defined(CONFIG_IP_FIREWALL) || defined(CONFIG_IP_ACCT)
-static int ip_chain_procinfo(int stage, char *buffer, char **start,
-			     off_t offset, int length)
-{
-	off_t pos=0, begin=0;
-	struct ip_fw *i;
-	int len, p;
-	int last_len = 0;
-
-
-	switch(stage)
-	{
-#ifdef CONFIG_IP_FIREWALL
-		case IP_FW_IN:
-			i = ip_fw_in_chain;
-			len=sprintf(buffer, "IP firewall input rules, default %d\n",
-				ip_fw_in_policy);
-			break;
-		case IP_FW_OUT:
-			i = ip_fw_out_chain;
-			len=sprintf(buffer, "IP firewall output rules, default %d\n",
-				ip_fw_out_policy);
-			break;
-		case IP_FW_FWD:
-			i = ip_fw_fwd_chain;
-			len=sprintf(buffer, "IP firewall forward rules, default %d\n",
-				ip_fw_fwd_policy);
-			break;
-#endif
-#ifdef CONFIG_IP_ACCT
-		case IP_FW_ACCT:
-			i = ip_acct_chain;
-			len=sprintf(buffer,"IP accounting rules\n");
-			break;
-#endif
-		default:
-			/* this should never be reached, but safety first... */
-			i = NULL;
-			len=0;
-			break;
-	}
-
-	READ_LOCK(&ip_fw_lock);
-
-	while(i!=NULL)
-	{
-		len+=sprintf(buffer+len,"%08X/%08X->%08X/%08X %.16s %08X %X ",
-			ntohl(i->fw_src.s_addr),ntohl(i->fw_smsk.s_addr),
-			ntohl(i->fw_dst.s_addr),ntohl(i->fw_dmsk.s_addr),
-			(i->fw_vianame)[0] ? i->fw_vianame : "-",
-			ntohl(i->fw_via.s_addr), i->fw_flg);
-		/* 10 is enough for a 32 bit box but the counters are 64bit on
-		   the Alpha and Ultrapenguin */
-		len+=sprintf(buffer+len,"%u %u %-20lu %-20lu",
-			i->fw_nsp,i->fw_ndp, i->fw_pcnt,i->fw_bcnt);
-		for (p = 0; p < IP_FW_MAX_PORTS; p++)
-			len+=sprintf(buffer+len, " %u", i->fw_pts[p]);
-		len+=sprintf(buffer+len, " A%02X X%02X", i->fw_tosand, i->fw_tosxor);
-		buffer[len++]='\n';
-		buffer[len]='\0';
-		pos=begin+len;
-		if(pos<offset)
-		{
-			len=0;
-			begin=pos;
-		}
-		else if(pos>offset+length)
-		{
-			len = last_len;
-			break;
-		}
-		last_len = len;
-		i=i->fw_next;
-	}
-	READ_UNLOCK(&ip_fw_lock);
-	*start=buffer+(offset-begin);
-	len-=(offset-begin);
-	if(len>length)
-		len=length;
-	return len;
-}
-#endif
-
-#ifdef CONFIG_IP_ACCT
-static int ip_acct_procinfo(char *buffer, char **start, off_t offset,
-			    int length)
-{
-	return ip_chain_procinfo(IP_FW_ACCT, buffer,start, offset,length);
-}
-#endif
-
-#ifdef CONFIG_IP_FIREWALL
-static int ip_fw_in_procinfo(char *buffer, char **start, off_t offset,
-			      int length)
-{
-	return ip_chain_procinfo(IP_FW_IN, buffer,start,offset,length);
-}
-
-static int ip_fw_out_procinfo(char *buffer, char **start, off_t offset,
-			      int length)
-{
-	return ip_chain_procinfo(IP_FW_OUT, buffer,start,offset,length);
-}
-
-static int ip_fw_fwd_procinfo(char *buffer, char **start, off_t offset,
-			      int length)
-{
-	return ip_chain_procinfo(IP_FW_FWD, buffer,start,offset,length);
-}
-#endif
-
-
-#ifdef CONFIG_IP_FIREWALL
-/*
- *	Interface to the generic firewall chains.
- */
-
-int ipfw_input_check(struct firewall_ops *this, int pf,
-		     struct net_device *dev, void *arg,
-		     struct sk_buff **pskb)
-{
-	return ip_fw_chk(pskb, dev, arg, ip_fw_in_chain, ip_fw_in_policy,
-			 IP_FW_MODE_FW);
-}
-
-int ipfw_output_check(struct firewall_ops *this, int pf,
-		      struct net_device *dev, void *arg,
-		      struct sk_buff **pskb)
-{
-	return ip_fw_chk(pskb, dev, arg, ip_fw_out_chain, ip_fw_out_policy,
-			 IP_FW_MODE_FW);
-}
-
-int ipfw_forward_check(struct firewall_ops *this, int pf,
-		       struct net_device *dev, void *arg,
-		       struct sk_buff **pskb)
-{
-	return ip_fw_chk(pskb, dev, arg, ip_fw_fwd_chain, ip_fw_fwd_policy,
-			 IP_FW_MODE_FW);
-}
-
-#ifdef CONFIG_IP_ACCT
-int ipfw_acct_in(struct firewall_ops *this, int pf, struct net_device *dev,
-		 void *arg, struct sk_buff **pskb)
-{
-	return ip_fw_chk(pskb,dev,NULL,ip_acct_chain,0,IP_FW_MODE_ACCT_IN);
-}
-
-int ipfw_acct_out(struct firewall_ops *this, int pf, struct net_device *dev,
-		  void *arg, struct sk_buff **pskb)
-{
-	return ip_fw_chk(pskb,dev,NULL,ip_acct_chain,0,IP_FW_MODE_ACCT_OUT);
-}
-#endif
-
-struct firewall_ops ipfw_ops = {
-	.fw_forward	=	ipfw_forward_check,
-	.fw_input	=	ipfw_input_check,
-	.fw_output	=	ipfw_output_check,
-#ifdef CONFIG_IP_ACCT
-	.fw_acct_in	=	ipfw_acct_in,
-	.fw_acct_out	=	ipfw_acct_out,
-#endif
-};
-
-#endif
-
-#if defined(CONFIG_IP_ACCT) || defined(CONFIG_IP_FIREWALL)
-
-int ipfw_device_event(struct notifier_block *this, unsigned long event, void *ptr)
-{
-	struct net_device *dev=ptr;
-	char *devname = dev->name;
-	struct ip_fw *fw;
-	int chn;
-
-	WRITE_LOCK(&ip_fw_lock);
-
-	if (event == NETDEV_UP) {
-		for (chn = 0; chn < IP_FW_CHAINS; chn++)
-			for (fw = *chains[chn]; fw; fw = fw->fw_next)
-				if ((fw->fw_vianame)[0] && !strncmp(devname,
-					    fw->fw_vianame, IFNAMSIZ)) {
-					dev_hold(dev);
-					fw->fw_viadev = dev;
-				}
-	} else if (event == NETDEV_DOWN) {
-		for (chn = 0; chn < IP_FW_CHAINS; chn++)
-			for (fw = *chains[chn]; fw; fw = fw->fw_next)
-				/* we could compare just the pointers ... */
-				if ((fw->fw_vianame)[0] && !strncmp(devname,
-						    fw->fw_vianame, IFNAMSIZ)){
-					if (fw->fw_viadev
-					    && fw->fw_viadev != (struct net_device *)-1)
-						dev_put(fw->fw_viadev);
-					fw->fw_viadev = (struct net_device*)-1;
-				}
-	}
-
-	WRITE_UNLOCK(&ip_fw_lock);
-	return NOTIFY_DONE;
-}
-
-static struct notifier_block ipfw_dev_notifier = {
-	.notifier_call	=	ipfw_device_event,
-};
-
-#endif
-
-int ipfw_init_or_cleanup(int init)
-{
-	int ret = 0;
-
-	if (!init)
-		goto cleanup;
-
-	ret = register_firewall(PF_INET, &ipfw_ops);
-	if (ret < 0)
-		goto cleanup_nothing;
-
-#ifdef CONFIG_IP_ACCT
-	proc_net_create("ip_acct", S_IFREG | S_IRUGO | S_IWUSR, ip_acct_procinfo);
-#endif
-	proc_net_create("ip_input", S_IFREG | S_IRUGO | S_IWUSR, ip_fw_in_procinfo);
-	proc_net_create("ip_output", S_IFREG | S_IRUGO | S_IWUSR, ip_fw_out_procinfo);
-	proc_net_create("ip_forward", S_IFREG | S_IRUGO | S_IWUSR, ip_fw_fwd_procinfo);
-
-	/* Register for device up/down reports */
-	register_netdevice_notifier(&ipfw_dev_notifier);
-
-#ifdef CONFIG_IP_FIREWALL_NETLINK
-	ipfwsk = netlink_kernel_create(NETLINK_FIREWALL, NULL);
-#endif
-	return ret;
-
- cleanup:
-#ifdef CONFIG_IP_FIREWALL_NETLINK
-	sock_release(ipfwsk->sk_socket);
-#endif
-	unregister_netdevice_notifier(&ipfw_dev_notifier);
-
-#ifdef CONFIG_IP_ACCT
-	proc_net_remove("ip_acct");
-#endif
-	proc_net_remove("ip_input");
-	proc_net_remove("ip_output");
-	proc_net_remove("ip_forward");
-
-	free_fw_chain(chains[IP_FW_FWD]);
-	free_fw_chain(chains[IP_FW_IN]);
-	free_fw_chain(chains[IP_FW_OUT]);
-	free_fw_chain(chains[IP_FW_ACCT]);
-
-	unregister_firewall(PF_INET, &ipfw_ops);
-
- cleanup_nothing:
-	return ret;
-}
diff -Nru a/net/ipv4/netfilter/ipt_ECN.c b/net/ipv4/netfilter/ipt_ECN.c
--- a/net/ipv4/netfilter/ipt_ECN.c	2005-01-10 20:11:23 -08:00
+++ b/net/ipv4/netfilter/ipt_ECN.c	2005-01-10 20:11:23 -08:00
@@ -52,44 +52,41 @@
 static inline int
 set_ect_tcp(struct sk_buff **pskb, const struct ipt_ECN_info *einfo, int inward)
 {
-	struct tcphdr _tcph, *th;
+	struct tcphdr _tcph, *tcph;
 	u_int16_t diffs[2];
 
 	/* Not enought header? */
-	th = skb_header_pointer(*pskb, (*pskb)->nh.iph->ihl*4,
-				sizeof(_tcph), &_tcph);
-	if (th == NULL)
+	tcph = skb_header_pointer(*pskb, (*pskb)->nh.iph->ihl*4,
+				  sizeof(_tcph), &_tcph);
+	if (!tcph)
 		return 0;
 
-	diffs[0] = ((u_int16_t *)th)[6];
-	if (einfo->operation & IPT_ECN_OP_SET_ECE)
-		th->ece = einfo->proto.tcp.ece;
+	if (!(einfo->operation & IPT_ECN_OP_SET_ECE
+	      || tcph->ece == einfo->proto.tcp.ece)
+	    && (!(einfo->operation & IPT_ECN_OP_SET_CWR
+		  || tcph->cwr == einfo->proto.tcp.cwr)))
+		return 1;
 
-	if (einfo->operation & IPT_ECN_OP_SET_CWR)
-		th->cwr = einfo->proto.tcp.cwr;
-	diffs[1] = ((u_int16_t *)&th)[6];
+	if (!skb_ip_make_writable(pskb, (*pskb)->nh.iph->ihl*4+sizeof(*tcph)))
+		return 0;
+	tcph = (void *)(*pskb)->nh.iph + (*pskb)->nh.iph->ihl*4;
 
-	/* Only mangle if it's changed. */
-	if (diffs[0] != diffs[1]) {
-		diffs[0] = diffs[0] ^ 0xFFFF;
-		if (!skb_ip_make_writable(pskb,
-					  (*pskb)->nh.iph->ihl*4+sizeof(_tcph)))
+	diffs[0] = ((u_int16_t *)tcph)[6];
+	if (einfo->operation & IPT_ECN_OP_SET_ECE)
+		tcph->ece = einfo->proto.tcp.ece;
+	if (einfo->operation & IPT_ECN_OP_SET_CWR)
+		tcph->cwr = einfo->proto.tcp.cwr;
+	diffs[1] = ((u_int16_t *)tcph)[6];
+	diffs[0] = diffs[0] ^ 0xFFFF;
+
+	if ((*pskb)->ip_summed != CHECKSUM_HW)
+		tcph->check = csum_fold(csum_partial((char *)diffs,
+						     sizeof(diffs),
+						     tcph->check^0xFFFF));
+	else
+		if (skb_checksum_help(*pskb, inward))
 			return 0;
-
-		if (th != &_tcph)
-			memcpy(&_tcph, th, sizeof(_tcph));
-
-		if ((*pskb)->ip_summed != CHECKSUM_HW)
-			_tcph.check = csum_fold(csum_partial((char *)diffs,
-							     sizeof(diffs),
-							     _tcph.check^0xFFFF));
-		memcpy((*pskb)->data + (*pskb)->nh.iph->ihl*4,
-		       &_tcph, sizeof(_tcph));
-		if ((*pskb)->ip_summed == CHECKSUM_HW)
-			if (skb_checksum_help(*pskb, inward))
-				return 0;
-		(*pskb)->nfcache |= NFC_ALTERED;
-	}
+	(*pskb)->nfcache |= NFC_ALTERED;
 	return 1;
 }
 
@@ -148,7 +145,7 @@
 	}
 
 	if ((einfo->operation & (IPT_ECN_OP_SET_ECE|IPT_ECN_OP_SET_CWR))
-	    && e->ip.proto != IPPROTO_TCP) {
+	    && (e->ip.proto != IPPROTO_TCP || (e->ip.invflags & IPT_INV_PROTO))) {
 		printk(KERN_WARNING "ECN: cannot use TCP operations on a "
 		       "non-tcp rule\n");
 		return 0;
diff -Nru a/net/ipv4/netfilter/ipt_MARK.c b/net/ipv4/netfilter/ipt_MARK.c
--- a/net/ipv4/netfilter/ipt_MARK.c	2005-01-10 20:11:19 -08:00
+++ b/net/ipv4/netfilter/ipt_MARK.c	2005-01-10 20:11:19 -08:00
@@ -20,12 +20,12 @@
 MODULE_DESCRIPTION("iptables MARK modification module");
 
 static unsigned int
-target(struct sk_buff **pskb,
-       const struct net_device *in,
-       const struct net_device *out,
-       unsigned int hooknum,
-       const void *targinfo,
-       void *userinfo)
+target_v0(struct sk_buff **pskb,
+	  const struct net_device *in,
+	  const struct net_device *out,
+	  unsigned int hooknum,
+	  const void *targinfo,
+	  void *userinfo)
 {
 	const struct ipt_mark_target_info *markinfo = targinfo;
 
@@ -36,12 +36,45 @@
 	return IPT_CONTINUE;
 }
 
+static unsigned int
+target_v1(struct sk_buff **pskb,
+	  const struct net_device *in,
+	  const struct net_device *out,
+	  unsigned int hooknum,
+	  const void *targinfo,
+	  void *userinfo)
+{
+	const struct ipt_mark_target_info_v1 *markinfo = targinfo;
+	int mark = 0;
+
+	switch (markinfo->mode) {
+	case IPT_MARK_SET:
+		mark = markinfo->mark;
+		break;
+		
+	case IPT_MARK_AND:
+		mark = (*pskb)->nfmark & markinfo->mark;
+		break;
+		
+	case IPT_MARK_OR:
+		mark = (*pskb)->nfmark | markinfo->mark;
+		break;
+	}
+
+	if((*pskb)->nfmark != mark) {
+		(*pskb)->nfmark = mark;
+		(*pskb)->nfcache |= NFC_ALTERED;
+	}
+	return IPT_CONTINUE;
+}
+
+
 static int
-checkentry(const char *tablename,
-	   const struct ipt_entry *e,
-           void *targinfo,
-           unsigned int targinfosize,
-           unsigned int hook_mask)
+checkentry_v0(const char *tablename,
+	      const struct ipt_entry *e,
+	      void *targinfo,
+	      unsigned int targinfosize,
+	      unsigned int hook_mask)
 {
 	if (targinfosize != IPT_ALIGN(sizeof(struct ipt_mark_target_info))) {
 		printk(KERN_WARNING "MARK: targinfosize %u != %Zu\n",
@@ -58,21 +91,71 @@
 	return 1;
 }
 
-static struct ipt_target ipt_mark_reg = {
+static int
+checkentry_v1(const char *tablename,
+	      const struct ipt_entry *e,
+	      void *targinfo,
+	      unsigned int targinfosize,
+	      unsigned int hook_mask)
+{
+	struct ipt_mark_target_info_v1 *markinfo = targinfo;
+
+	if (targinfosize != IPT_ALIGN(sizeof(struct ipt_mark_target_info_v1))){
+		printk(KERN_WARNING "MARK: targinfosize %u != %Zu\n",
+		       targinfosize,
+		       IPT_ALIGN(sizeof(struct ipt_mark_target_info_v1)));
+		return 0;
+	}
+
+	if (strcmp(tablename, "mangle") != 0) {
+		printk(KERN_WARNING "MARK: can only be called from \"mangle\" table, not \"%s\"\n", tablename);
+		return 0;
+	}
+
+	if (markinfo->mode != IPT_MARK_SET
+	    && markinfo->mode != IPT_MARK_AND
+	    && markinfo->mode != IPT_MARK_OR) {
+		printk(KERN_WARNING "MARK: unknown mode %u\n",
+		       markinfo->mode);
+		return 0;
+	}
+
+	return 1;
+}
+
+static struct ipt_target ipt_mark_reg_v0 = {
+	.name		= "MARK",
+	.target		= target_v0,
+	.checkentry	= checkentry_v0,
+	.me		= THIS_MODULE,
+	.revision	= 0,
+};
+
+static struct ipt_target ipt_mark_reg_v1 = {
 	.name		= "MARK",
-	.target		= target,
-	.checkentry	= checkentry,
+	.target		= target_v1,
+	.checkentry	= checkentry_v1,
 	.me		= THIS_MODULE,
+	.revision	= 1,
 };
 
 static int __init init(void)
 {
-	return ipt_register_target(&ipt_mark_reg);
+	int err;
+
+	err = ipt_register_target(&ipt_mark_reg_v0);
+	if (!err) {
+		err = ipt_register_target(&ipt_mark_reg_v1);
+		if (err)
+			ipt_unregister_target(&ipt_mark_reg_v0);
+	}
+	return err;
 }
 
 static void __exit fini(void)
 {
-	ipt_unregister_target(&ipt_mark_reg);
+	ipt_unregister_target(&ipt_mark_reg_v0);
+	ipt_unregister_target(&ipt_mark_reg_v1);
 }
 
 module_init(init);
diff -Nru a/net/ipv4/netfilter/ipt_MASQUERADE.c b/net/ipv4/netfilter/ipt_MASQUERADE.c
--- a/net/ipv4/netfilter/ipt_MASQUERADE.c	2005-01-10 20:11:20 -08:00
+++ b/net/ipv4/netfilter/ipt_MASQUERADE.c	2005-01-10 20:11:20 -08:00
@@ -43,7 +43,7 @@
 		 unsigned int targinfosize,
 		 unsigned int hook_mask)
 {
-	const struct ip_nat_multi_range *mr = targinfo;
+	const struct ip_nat_multi_range_compat *mr = targinfo;
 
 	if (strcmp(tablename, "nat") != 0) {
 		DEBUGP("masquerade_check: bad table `%s'.\n", tablename);
@@ -79,8 +79,8 @@
 {
 	struct ip_conntrack *ct;
 	enum ip_conntrack_info ctinfo;
-	const struct ip_nat_multi_range *mr;
-	struct ip_nat_multi_range newrange;
+	const struct ip_nat_multi_range_compat *mr;
+	struct ip_nat_range newrange;
 	struct rtable *rt;
 	u_int32_t newsrc;
 
@@ -108,17 +108,17 @@
 	WRITE_UNLOCK(&masq_lock);
 
 	/* Transfer from original range. */
-	newrange = ((struct ip_nat_multi_range)
-		{ 1, { { mr->range[0].flags | IP_NAT_RANGE_MAP_IPS,
-			 newsrc, newsrc,
-			 mr->range[0].min, mr->range[0].max } } });
+	newrange = ((struct ip_nat_range)
+		{ mr->range[0].flags | IP_NAT_RANGE_MAP_IPS,
+		  newsrc, newsrc,
+		  mr->range[0].min, mr->range[0].max });
 
 	/* Hand modified range to generic setup. */
 	return ip_nat_setup_info(ct, &newrange, hooknum);
 }
 
 static inline int
-device_cmp(const struct ip_conntrack *i, void *ifindex)
+device_cmp(struct ip_conntrack *i, void *ifindex)
 {
 	int ret;
 
@@ -141,7 +141,7 @@
 		   and forget them. */
 		IP_NF_ASSERT(dev->ifindex != 0);
 
-		ip_ct_selective_cleanup(device_cmp, (void *)(long)dev->ifindex);
+		ip_ct_iterate_cleanup(device_cmp, (void *)(long)dev->ifindex);
 	}
 
 	return NOTIFY_DONE;
@@ -159,7 +159,7 @@
 		   and forget them. */
 		IP_NF_ASSERT(dev->ifindex != 0);
 
-		ip_ct_selective_cleanup(device_cmp, (void *)(long)dev->ifindex);
+		ip_ct_iterate_cleanup(device_cmp, (void *)(long)dev->ifindex);
 	}
 
 	return NOTIFY_DONE;
diff -Nru a/net/ipv4/netfilter/ipt_NETMAP.c b/net/ipv4/netfilter/ipt_NETMAP.c
--- a/net/ipv4/netfilter/ipt_NETMAP.c	2005-01-10 20:11:19 -08:00
+++ b/net/ipv4/netfilter/ipt_NETMAP.c	2005-01-10 20:11:19 -08:00
@@ -36,7 +36,7 @@
       unsigned int targinfosize,
       unsigned int hook_mask)
 {
-	const struct ip_nat_multi_range *mr = targinfo;
+	const struct ip_nat_multi_range_compat *mr = targinfo;
 
 	if (strcmp(tablename, "nat") != 0) {
 		DEBUGP(MODULENAME":check: bad table `%s'.\n", tablename);
@@ -72,8 +72,8 @@
 	struct ip_conntrack *ct;
 	enum ip_conntrack_info ctinfo;
 	u_int32_t new_ip, netmask;
-	const struct ip_nat_multi_range *mr = targinfo;
-	struct ip_nat_multi_range newrange;
+	const struct ip_nat_multi_range_compat *mr = targinfo;
+	struct ip_nat_range newrange;
 
 	IP_NF_ASSERT(hooknum == NF_IP_PRE_ROUTING
 		     || hooknum == NF_IP_POST_ROUTING);
@@ -87,10 +87,10 @@
 		new_ip = (*pskb)->nh.iph->saddr & ~netmask;
 	new_ip |= mr->range[0].min_ip & netmask;
 
-	newrange = ((struct ip_nat_multi_range)
-	{ 1, { { mr->range[0].flags | IP_NAT_RANGE_MAP_IPS,
-		 new_ip, new_ip,
-		 mr->range[0].min, mr->range[0].max } } });
+	newrange = ((struct ip_nat_range)
+		{ mr->range[0].flags | IP_NAT_RANGE_MAP_IPS,
+		  new_ip, new_ip,
+		  mr->range[0].min, mr->range[0].max });
 
 	/* Hand modified range to generic setup. */
 	return ip_nat_setup_info(ct, &newrange, hooknum);
diff -Nru a/net/ipv4/netfilter/ipt_REDIRECT.c b/net/ipv4/netfilter/ipt_REDIRECT.c
--- a/net/ipv4/netfilter/ipt_REDIRECT.c	2005-01-10 20:11:18 -08:00
+++ b/net/ipv4/netfilter/ipt_REDIRECT.c	2005-01-10 20:11:18 -08:00
@@ -38,7 +38,7 @@
 	       unsigned int targinfosize,
 	       unsigned int hook_mask)
 {
-	const struct ip_nat_multi_range *mr = targinfo;
+	const struct ip_nat_multi_range_compat *mr = targinfo;
 
 	if (strcmp(tablename, "nat") != 0) {
 		DEBUGP("redirect_check: bad table `%s'.\n", table);
@@ -74,8 +74,8 @@
 	struct ip_conntrack *ct;
 	enum ip_conntrack_info ctinfo;
 	u_int32_t newdst;
-	const struct ip_nat_multi_range *mr = targinfo;
-	struct ip_nat_multi_range newrange;
+	const struct ip_nat_multi_range_compat *mr = targinfo;
+	struct ip_nat_range newrange;
 
 	IP_NF_ASSERT(hooknum == NF_IP_PRE_ROUTING
 		     || hooknum == NF_IP_LOCAL_OUT);
@@ -99,10 +99,10 @@
 	}
 
 	/* Transfer from original range. */
-	newrange = ((struct ip_nat_multi_range)
-		{ 1, { { mr->range[0].flags | IP_NAT_RANGE_MAP_IPS,
-			 newdst, newdst,
-			 mr->range[0].min, mr->range[0].max } } });
+	newrange = ((struct ip_nat_range)
+		{ mr->range[0].flags | IP_NAT_RANGE_MAP_IPS,
+		  newdst, newdst,
+		  mr->range[0].min, mr->range[0].max });
 
 	/* Hand modified range to generic setup. */
 	return ip_nat_setup_info(ct, &newrange, hooknum);
diff -Nru a/net/ipv4/netfilter/ipt_REJECT.c b/net/ipv4/netfilter/ipt_REJECT.c
--- a/net/ipv4/netfilter/ipt_REJECT.c	2005-01-10 20:11:21 -08:00
+++ b/net/ipv4/netfilter/ipt_REJECT.c	2005-01-10 20:11:21 -08:00
@@ -223,7 +223,6 @@
 static void send_unreach(struct sk_buff *skb_in, int code)
 {
 	struct iphdr *iph;
-	struct udphdr *udph;
 	struct icmphdr *icmph;
 	struct sk_buff *nskb;
 	u32 saddr;
@@ -257,26 +256,13 @@
 	if (skb_in->len < skb_in->nh.iph->ihl*4 + 8)
 		return;
 
-	/* if UDP checksum is set, verify it's correct */
-	if (iph->protocol == IPPROTO_UDP
-	    && skb_in->tail-(u8*)iph >= sizeof(struct udphdr)) {
-		int datalen = skb_in->len - (iph->ihl<<2);
-		udph = (struct udphdr *)((char *)iph + (iph->ihl<<2));
-		if (udph->check
-		    && csum_tcpudp_magic(iph->saddr, iph->daddr,
-		                         datalen, IPPROTO_UDP,
-		                         csum_partial((char *)udph, datalen,
-		                                      0)) != 0)
-			return;
-	}
-
 	/* If we send an ICMP error to an ICMP error a mess would result.. */
-	if (iph->protocol == IPPROTO_ICMP
-	    && skb_in->tail-(u8*)iph >= sizeof(struct icmphdr)) {
-		icmph = (struct icmphdr *)((char *)iph + (iph->ihl<<2));
+	if (iph->protocol == IPPROTO_ICMP) {
+		struct icmphdr ihdr;
 
-		if (skb_copy_bits(skb_in, skb_in->nh.iph->ihl*4,
-				  icmph, sizeof(*icmph)) < 0)
+		icmph = skb_header_pointer(skb_in, skb_in->nh.iph->ihl*4,
+					   sizeof(ihdr), &ihdr);
+		if (!icmph)
 			return;
 
 		/* Between echo-reply (0) and timestamp (13),
diff -Nru a/net/ipv4/netfilter/ipt_SAME.c b/net/ipv4/netfilter/ipt_SAME.c
--- a/net/ipv4/netfilter/ipt_SAME.c	2005-01-10 20:11:20 -08:00
+++ b/net/ipv4/netfilter/ipt_SAME.c	2005-01-10 20:11:20 -08:00
@@ -149,8 +149,8 @@
 	struct ip_conntrack *ct;
 	enum ip_conntrack_info ctinfo;
 	u_int32_t tmpip, aindex, new_ip;
-	const struct ipt_same_info *mr = targinfo;
-	struct ip_nat_multi_range newrange;
+	const struct ipt_same_info *same = targinfo;
+	struct ip_nat_range newrange;
 	const struct ip_conntrack_tuple *t;
 
 	IP_NF_ASSERT(hooknum == NF_IP_PRE_ROUTING ||
@@ -161,17 +161,17 @@
 
 	/* Base new source on real src ip and optionally dst ip,
 	   giving some hope for consistency across reboots.
-	   Here we calculate the index in mr->iparray which
+	   Here we calculate the index in same->iparray which
 	   holds the ipaddress we should use */
 	
 	tmpip = ntohl(t->src.ip);
 
-	if (!(mr->info & IPT_SAME_NODST))
+	if (!(same->info & IPT_SAME_NODST))
 		tmpip += ntohl(t->dst.ip);
 	
-	aindex = tmpip % mr->ipnum;
-		
-	new_ip = htonl(mr->iparray[aindex]);
+	aindex = tmpip % same->ipnum;
+
+	new_ip = htonl(same->iparray[aindex]);
 
 	DEBUGP("ipt_SAME: src=%u.%u.%u.%u dst=%u.%u.%u.%u, "
 			"new src=%u.%u.%u.%u\n",
@@ -179,10 +179,10 @@
 			NIPQUAD(new_ip));
 
 	/* Transfer from original range. */
-	newrange = ((struct ip_nat_multi_range)
-		{ 1, { { mr->range[0].flags | IP_NAT_RANGE_MAP_IPS,
-			 new_ip, new_ip,
-			 mr->range[0].min, mr->range[0].max } } });
+	newrange = ((struct ip_nat_range)
+		{ same->range[0].flags, new_ip, new_ip,
+		  /* FIXME: Use ports from correct range! */
+		  same->range[0].min, same->range[0].max });
 
 	/* Hand modified range to generic setup. */
 	return ip_nat_setup_info(ct, &newrange, hooknum);
diff -Nru a/net/ipv4/netfilter/ipt_multiport.c b/net/ipv4/netfilter/ipt_multiport.c
--- a/net/ipv4/netfilter/ipt_multiport.c	2005-01-10 20:11:16 -08:00
+++ b/net/ipv4/netfilter/ipt_multiport.c	2005-01-10 20:11:16 -08:00
@@ -46,6 +46,50 @@
 	return 0;
 }
 
+/* Returns 1 if the port is matched by the test, 0 otherwise. */
+static inline int
+ports_match_v1(const struct ipt_multiport_v1 *minfo,
+	       u_int16_t src, u_int16_t dst)
+{
+	unsigned int i;
+	u_int16_t s, e;
+
+	for (i=0; i < minfo->count; i++) {
+		s = minfo->ports[i];
+
+		if (minfo->pflags[i]) {
+			/* range port matching */
+			e = minfo->ports[++i];
+			duprintf("src or dst matches with %d-%d?\n", s, e);
+
+			if (minfo->flags == IPT_MULTIPORT_SOURCE
+			    && src >= s && src <= e)
+				return 1;
+			if (minfo->flags == IPT_MULTIPORT_DESTINATION
+			    && dst >= s && dst <= e)
+				return 1;
+			if (minfo->flags == IPT_MULTIPORT_EITHER
+			    && ((dst >= s && dst <= e)
+				|| (src >= s && src <= e)))
+				return 1;
+		} else {
+			/* exact port matching */
+			duprintf("src or dst matches with %d?\n", s);
+			if (minfo->flags == IPT_MULTIPORT_SOURCE
+			    && src == s)
+				return 1;
+			if (minfo->flags == IPT_MULTIPORT_DESTINATION
+			    && dst == s)
+				return 1;
+			if (minfo->flags == IPT_MULTIPORT_EITHER
+			    && (src == s || dst == s))
+				return 1;
+		}
+	}
+ 
+ 	return 0;
+}
+
 static int
 match(const struct sk_buff *skb,
       const struct net_device *in,
@@ -57,14 +101,11 @@
 	u16 _ports[2], *pptr;
 	const struct ipt_multiport *multiinfo = matchinfo;
 
-	/* Must not be a fragment. */
 	if (offset)
 		return 0;
 
-	/* Must be big enough to read ports (both UDP and TCP have
-           them at the start). */
 	pptr = skb_header_pointer(skb, skb->nh.iph->ihl * 4,
-				  sizeof(_ports), &_ports[0]);
+				  sizeof(_ports), _ports);
 	if (pptr == NULL) {
 		/* We've been asked to examine this packet, and we
 		 * can't.  Hence, no choice but to drop.
@@ -80,6 +121,35 @@
 			   ntohs(pptr[0]), ntohs(pptr[1]));
 }
 
+static int
+match_v1(const struct sk_buff *skb,
+	 const struct net_device *in,
+	 const struct net_device *out,
+	 const void *matchinfo,
+	 int offset,
+	 int *hotdrop)
+{
+	u16 _ports[2], *pptr;
+	const struct ipt_multiport_v1 *multiinfo = matchinfo;
+
+	if (offset)
+		return 0;
+
+	pptr = skb_header_pointer(skb, skb->nh.iph->ihl * 4,
+				  sizeof(_ports), _ports);
+	if (pptr == NULL) {
+		/* We've been asked to examine this packet, and we
+		 * can't.  Hence, no choice but to drop.
+		 */
+		duprintf("ipt_multiport:"
+			 " Dropping evil offset=0 tinygram.\n");
+		*hotdrop = 1;
+		return 0;
+	}
+
+	return ports_match_v1(multiinfo, ntohs(pptr[0]), ntohs(pptr[1]));
+}
+
 /* Called when user tries to insert an entry of this type. */
 static int
 checkentry(const char *tablename,
@@ -88,36 +158,53 @@
 	   unsigned int matchsize,
 	   unsigned int hook_mask)
 {
-	const struct ipt_multiport *multiinfo = matchinfo;
-
-	if (matchsize != IPT_ALIGN(sizeof(struct ipt_multiport)))
-		return 0;
+	return (matchsize == IPT_ALIGN(sizeof(struct ipt_multiport)));
+}
 
-	/* Must specify proto == TCP/UDP, no unknown flags or bad count */
-	return (ip->proto == IPPROTO_TCP || ip->proto == IPPROTO_UDP)
-		&& !(ip->invflags & IPT_INV_PROTO)
-		&& matchsize == IPT_ALIGN(sizeof(struct ipt_multiport))
-		&& (multiinfo->flags == IPT_MULTIPORT_SOURCE
-		    || multiinfo->flags == IPT_MULTIPORT_DESTINATION
-		    || multiinfo->flags == IPT_MULTIPORT_EITHER)
-		&& multiinfo->count <= IPT_MULTI_PORTS;
+static int
+checkentry_v1(const char *tablename,
+	      const struct ipt_ip *ip,
+	      void *matchinfo,
+	      unsigned int matchsize,
+	      unsigned int hook_mask)
+{
+	return (matchsize == IPT_ALIGN(sizeof(struct ipt_multiport_v1)));
 }
 
 static struct ipt_match multiport_match = {
 	.name		= "multiport",
+	.revision	= 0,
 	.match		= &match,
 	.checkentry	= &checkentry,
 	.me		= THIS_MODULE,
 };
 
+static struct ipt_match multiport_match_v1 = {
+	.name		= "multiport",
+	.revision	= 1,
+	.match		= &match_v1,
+	.checkentry	= &checkentry_v1,
+	.me		= THIS_MODULE,
+};
+
 static int __init init(void)
 {
-	return ipt_register_match(&multiport_match);
+	int err;
+
+	err = ipt_register_match(&multiport_match);
+	if (!err) {
+		err = ipt_register_match(&multiport_match_v1);
+		if (err)
+			ipt_unregister_match(&multiport_match);
+	}
+
+	return err;
 }
 
 static void __exit fini(void)
 {
 	ipt_unregister_match(&multiport_match);
+	ipt_unregister_match(&multiport_match_v1);
 }
 
 module_init(init);
diff -Nru a/net/ipv4/netfilter/ipt_recent.c b/net/ipv4/netfilter/ipt_recent.c
--- a/net/ipv4/netfilter/ipt_recent.c	2005-01-10 20:11:16 -08:00
+++ b/net/ipv4/netfilter/ipt_recent.c	2005-01-10 20:11:16 -08:00
@@ -107,7 +107,7 @@
       int *hotdrop);
 
 /* Function to hash a given address into the hash table of table_size size */
-int hash_func(unsigned int addr, int table_size)
+static int hash_func(unsigned int addr, int table_size)
 {
 	int result = 0;
 	unsigned int value = addr;
@@ -713,7 +713,7 @@
 #endif
 
 	curr_table = vmalloc(sizeof(struct recent_ip_tables));
-	if(curr_table == NULL) return -ENOMEM;
+	if(curr_table == NULL) return 0;
 
 	spin_lock_init(&curr_table->list_lock);
 	curr_table->next = NULL;
@@ -730,7 +730,7 @@
 #endif
 
 	curr_table->table = vmalloc(sizeof(struct recent_ip_list)*ip_list_tot);
-	if(curr_table->table == NULL) { vfree(curr_table); return -ENOMEM; }
+	if(curr_table->table == NULL) { vfree(curr_table); return 0; }
 	memset(curr_table->table,0,sizeof(struct recent_ip_list)*ip_list_tot);
 #ifdef DEBUG
 	if(debug) printk(KERN_INFO RECENT_NAME ": checkentry: Allocating %d for pkt_list.\n",
@@ -745,7 +745,7 @@
 		printk(KERN_INFO RECENT_NAME ": checkentry: unable to allocate for pkt_list.\n");
 		vfree(curr_table->table); 
 		vfree(curr_table);
-		return -ENOMEM;
+		return 0;
 	}
 	for(c = 0; c < ip_list_tot; c++) {
 		curr_table->table[c].last_pkts = hold + c*ip_pkt_list_tot;
@@ -763,7 +763,7 @@
 		vfree(hold);
 		vfree(curr_table->table); 
 		vfree(curr_table);
-		return -ENOMEM;
+		return 0;
 	}
 
 	for(c = 0; c < ip_list_hash_size; c++) {
@@ -783,7 +783,7 @@
 		vfree(hold);
 		vfree(curr_table->table); 
 		vfree(curr_table);
-		return -ENOMEM;
+		return 0;
 	}
 	for(c = 0; c < ip_list_tot; c++) {
 		curr_table->time_info[c].position = c;
@@ -827,7 +827,7 @@
 			if(debug) printk(KERN_INFO RECENT_NAME ": checkentry() create_proc failed, no tables.\n");
 #endif
 			spin_unlock_bh(&recent_lock);
-			return -ENOMEM;
+			return 0;
 		}
 		while( strncmp(info->name,curr_table->name,IPT_RECENT_NAME_LEN) && (last_table = curr_table) && (curr_table = curr_table->next) );
 		if(!curr_table) {
@@ -835,7 +835,7 @@
 			if(debug) printk(KERN_INFO RECENT_NAME ": checkentry() create_proc failed, table already destroyed.\n");
 #endif
 			spin_unlock_bh(&recent_lock);
-			return -ENOMEM;
+			return 0;
 		}
 		if(last_table) last_table->next = curr_table->next; else r_tables = curr_table->next;
 		spin_unlock_bh(&recent_lock);
@@ -844,7 +844,7 @@
 		vfree(hold);
 		vfree(curr_table->table);
 		vfree(curr_table);
-		return -ENOMEM;
+		return 0;
 	}
 	
 	curr_table->status_proc->owner = THIS_MODULE;
@@ -959,7 +959,7 @@
 /* Kernel module initialization. */
 static int __init init(void)
 {
-	int count;
+	int err, count;
 
 	printk(version);
 #ifdef CONFIG_PROC_FS
@@ -983,7 +983,10 @@
 	if(debug) printk(KERN_INFO RECENT_NAME ": ip_list_hash_size: %d\n",ip_list_hash_size);
 #endif
 
-	return ipt_register_match(&recent_match);
+	err = ipt_register_match(&recent_match);
+	if (err)
+		remove_proc_entry("ipt_recent", proc_net);
+	return err;
 }
 
 /* Kernel module destruction. */
diff -Nru a/net/ipv4/raw.c b/net/ipv4/raw.c
--- a/net/ipv4/raw.c	2005-01-10 20:11:19 -08:00
+++ b/net/ipv4/raw.c	2005-01-10 20:11:19 -08:00
@@ -109,7 +109,7 @@
 	struct hlist_node *node;
 
 	sk_for_each_from(sk, node) {
-		struct inet_opt *inet = inet_sk(sk);
+		struct inet_sock *inet = inet_sk(sk);
 
 		if (inet->num == num 					&&
 		    !(inet->daddr && inet->daddr != raddr) 		&&
@@ -181,7 +181,7 @@
 
 void raw_err (struct sock *sk, struct sk_buff *skb, u32 info)
 {
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	int type = skb->h.icmph->type;
 	int code = skb->h.icmph->code;
 	int err = 0;
@@ -263,7 +263,7 @@
 			struct rtable *rt, 
 			unsigned int flags)
 {
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	int hh_len;
 	struct iphdr *iph;
 	struct sk_buff *skb;
@@ -374,7 +374,7 @@
 static int raw_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
 		       size_t len)
 {
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	struct ipcm_cookie ipc;
 	struct rtable *rt = NULL;
 	int free = 0;
@@ -537,7 +537,7 @@
 /* This gets rid of all the nasties in af_inet. -DaveM */
 static int raw_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len)
 {
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	struct sockaddr_in *addr = (struct sockaddr_in *) uaddr;
 	int ret = -EINVAL;
 	int chk_addr_ret;
@@ -562,10 +562,10 @@
  *	we return it, otherwise we block.
  */
 
-int raw_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
-		size_t len, int noblock, int flags, int *addr_len)
+static int raw_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
+		       size_t len, int noblock, int flags, int *addr_len)
 {
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	size_t copied = 0;
 	int err = -EOPNOTSUPP;
 	struct sockaddr_in *sin = (struct sockaddr_in *)msg->msg_name;
@@ -802,7 +802,7 @@
 
 static __inline__ char *get_raw_sock(struct sock *sp, char *tmpbuf, int i)
 {
-	struct inet_opt *inet = inet_sk(sp);
+	struct inet_sock *inet = inet_sk(sp);
 	unsigned int dest = inet->daddr,
 		     src = inet->rcv_saddr;
 	__u16 destp = 0,
diff -Nru a/net/ipv4/route.c b/net/ipv4/route.c
--- a/net/ipv4/route.c	2005-01-10 20:11:23 -08:00
+++ b/net/ipv4/route.c	2005-01-10 20:11:23 -08:00
@@ -108,22 +108,22 @@
 
 #define RT_GC_TIMEOUT (300*HZ)
 
-int ip_rt_min_delay		= 2 * HZ;
-int ip_rt_max_delay		= 10 * HZ;
-int ip_rt_max_size;
-int ip_rt_gc_timeout		= RT_GC_TIMEOUT;
-int ip_rt_gc_interval		= 60 * HZ;
-int ip_rt_gc_min_interval	= HZ / 2;
-int ip_rt_redirect_number	= 9;
-int ip_rt_redirect_load		= HZ / 50;
-int ip_rt_redirect_silence	= ((HZ / 50) << (9 + 1));
-int ip_rt_error_cost		= HZ;
-int ip_rt_error_burst		= 5 * HZ;
-int ip_rt_gc_elasticity		= 8;
-int ip_rt_mtu_expires		= 10 * 60 * HZ;
-int ip_rt_min_pmtu		= 512 + 20 + 20;
-int ip_rt_min_advmss		= 256;
-int ip_rt_secret_interval	= 10 * 60 * HZ;
+static int ip_rt_min_delay		= 2 * HZ;
+static int ip_rt_max_delay		= 10 * HZ;
+static int ip_rt_max_size;
+static int ip_rt_gc_timeout		= RT_GC_TIMEOUT;
+static int ip_rt_gc_interval		= 60 * HZ;
+static int ip_rt_gc_min_interval	= HZ / 2;
+static int ip_rt_redirect_number	= 9;
+static int ip_rt_redirect_load		= HZ / 50;
+static int ip_rt_redirect_silence	= ((HZ / 50) << (9 + 1));
+static int ip_rt_error_cost		= HZ;
+static int ip_rt_error_burst		= 5 * HZ;
+static int ip_rt_gc_elasticity		= 8;
+static int ip_rt_mtu_expires		= 10 * 60 * HZ;
+static int ip_rt_min_pmtu		= 512 + 20 + 20;
+static int ip_rt_min_advmss		= 256;
+static int ip_rt_secret_interval	= 10 * 60 * HZ;
 static unsigned long rt_deadline;
 
 #define RTprint(a...)	printk(KERN_DEBUG a)
diff -Nru a/net/ipv4/syncookies.c b/net/ipv4/syncookies.c
--- a/net/ipv4/syncookies.c	2005-01-10 20:11:24 -08:00
+++ b/net/ipv4/syncookies.c	2005-01-10 20:11:24 -08:00
@@ -47,7 +47,7 @@
  */
 __u32 cookie_v4_init_sequence(struct sock *sk, struct sk_buff *skb, __u16 *mssp)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	int mssind;
 	const __u16 mss = *mssp;
 
@@ -98,7 +98,7 @@
 					   struct open_request *req,
 					   struct dst_entry *dst)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	struct sock *child;
 
 	child = tp->af_specific->syn_recv_sock(sk, skb, req, dst);
@@ -114,7 +114,7 @@
 struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb,
 			     struct ip_options *opt)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	__u32 cookie = ntohl(skb->h.th->ack_seq) - 1; 
 	struct sock *ret = sk;
 	struct open_request *req; 
diff -Nru a/net/ipv4/tcp.c b/net/ipv4/tcp.c
--- a/net/ipv4/tcp.c	2005-01-10 20:11:17 -08:00
+++ b/net/ipv4/tcp.c	2005-01-10 20:11:17 -08:00
@@ -256,6 +256,7 @@
 #include <linux/smp_lock.h>
 #include <linux/fs.h>
 #include <linux/random.h>
+#include <linux/bootmem.h>
 
 #include <net/icmp.h>
 #include <net/tcp.h>
@@ -330,7 +331,7 @@
 {
 	unsigned int mask;
 	struct sock *sk = sock->sk;
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 
 	poll_wait(file, sk->sk_sleep, wait);
 	if (sk->sk_state == TCP_LISTEN)
@@ -413,7 +414,7 @@
 
 int tcp_ioctl(struct sock *sk, int cmd, unsigned long arg)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	int answ;
 
 	switch (cmd) {
@@ -460,8 +461,8 @@
 
 int tcp_listen_start(struct sock *sk)
 {
-	struct inet_opt *inet = inet_sk(sk);
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	struct tcp_listen_opt *lopt;
 
 	sk->sk_max_ack_backlog = 0;
@@ -514,7 +515,7 @@
 
 static void tcp_listen_stop (struct sock *sk)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	struct tcp_listen_opt *lopt = tp->listen_opt;
 	struct open_request *acc_req = tp->accept_queue;
 	struct open_request *req;
@@ -578,18 +579,18 @@
 	BUG_TRAP(!sk->sk_ack_backlog);
 }
 
-static inline void tcp_mark_push(struct tcp_opt *tp, struct sk_buff *skb)
+static inline void tcp_mark_push(struct tcp_sock *tp, struct sk_buff *skb)
 {
 	TCP_SKB_CB(skb)->flags |= TCPCB_FLAG_PSH;
 	tp->pushed_seq = tp->write_seq;
 }
 
-static inline int forced_push(struct tcp_opt *tp)
+static inline int forced_push(struct tcp_sock *tp)
 {
 	return after(tp->write_seq, tp->pushed_seq + (tp->max_window >> 1));
 }
 
-static inline void skb_entail(struct sock *sk, struct tcp_opt *tp,
+static inline void skb_entail(struct sock *sk, struct tcp_sock *tp,
 			      struct sk_buff *skb)
 {
 	skb->csum = 0;
@@ -605,7 +606,7 @@
 		tp->nonagle &= ~TCP_NAGLE_PUSH; 
 }
 
-static inline void tcp_mark_urg(struct tcp_opt *tp, int flags,
+static inline void tcp_mark_urg(struct tcp_sock *tp, int flags,
 				struct sk_buff *skb)
 {
 	if (flags & MSG_OOB) {
@@ -615,7 +616,7 @@
 	}
 }
 
-static inline void tcp_push(struct sock *sk, struct tcp_opt *tp, int flags,
+static inline void tcp_push(struct sock *sk, struct tcp_sock *tp, int flags,
 			    int mss_now, int nonagle)
 {
 	if (sk->sk_send_head) {
@@ -631,7 +632,7 @@
 static ssize_t do_tcp_sendpages(struct sock *sk, struct page **pages, int poffset,
 			 size_t psize, int flags)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	int mss_now;
 	int err;
 	ssize_t copied;
@@ -760,7 +761,7 @@
 #define TCP_PAGE(sk)	(sk->sk_sndmsg_page)
 #define TCP_OFF(sk)	(sk->sk_sndmsg_off)
 
-static inline int select_size(struct sock *sk, struct tcp_opt *tp)
+static inline int select_size(struct sock *sk, struct tcp_sock *tp)
 {
 	int tmp = tp->mss_cache_std;
 
@@ -778,7 +779,7 @@
 		size_t size)
 {
 	struct iovec *iov;
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	struct sk_buff *skb;
 	int iovlen, flags;
 	int mss_now;
@@ -1002,7 +1003,7 @@
 			struct msghdr *msg, int len, int flags,
 			int *addr_len)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 
 	/* No URG data to read. */
 	if (sock_flag(sk, SOCK_URGINLINE) || !tp->urg_data ||
@@ -1052,7 +1053,7 @@
  */
 static void cleanup_rbuf(struct sock *sk, int copied)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	int time_to_ack = 0;
 
 #if TCP_DEBUG
@@ -1107,7 +1108,7 @@
 static void tcp_prequeue_process(struct sock *sk)
 {
 	struct sk_buff *skb;
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 
 	NET_ADD_STATS_USER(LINUX_MIB_TCPPREQUEUED, skb_queue_len(&tp->ucopy.prequeue));
 
@@ -1154,7 +1155,7 @@
 		  sk_read_actor_t recv_actor)
 {
 	struct sk_buff *skb;
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	u32 seq = tp->copied_seq;
 	u32 offset;
 	int copied = 0;
@@ -1213,7 +1214,7 @@
 int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
 		size_t len, int nonblock, int flags, int *addr_len)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	int copied = 0;
 	u32 peek_seq;
 	u32 *seq;
@@ -1719,7 +1720,7 @@
 	 */
 
 	if (sk->sk_state == TCP_FIN_WAIT2) {
-		struct tcp_opt *tp = tcp_sk(sk);
+		struct tcp_sock *tp = tcp_sk(sk);
 		if (tp->linger2 < 0) {
 			tcp_set_state(sk, TCP_CLOSE);
 			tcp_send_active_reset(sk, GFP_ATOMIC);
@@ -1772,8 +1773,8 @@
 
 int tcp_disconnect(struct sock *sk, int flags)
 {
-	struct inet_opt *inet = inet_sk(sk);
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	int err = 0;
 	int old_state = sk->sk_state;
 
@@ -1835,7 +1836,7 @@
  */
 static int wait_for_connect(struct sock *sk, long timeo)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	DEFINE_WAIT(wait);
 	int err;
 
@@ -1883,7 +1884,7 @@
 
 struct sock *tcp_accept(struct sock *sk, int flags, int *err)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	struct open_request *req;
 	struct sock *newsk;
 	int error;
@@ -1934,7 +1935,7 @@
 int tcp_setsockopt(struct sock *sk, int level, int optname, char __user *optval,
 		   int optlen)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	int val;
 	int err = 0;
 
@@ -2098,7 +2099,7 @@
 /* Return information about state of tcp endpoint in API format. */
 void tcp_get_info(struct sock *sk, struct tcp_info *info)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	u32 now = tcp_time_stamp;
 
 	memset(info, 0, sizeof(*info));
@@ -2157,7 +2158,7 @@
 int tcp_getsockopt(struct sock *sk, int level, int optname, char __user *optval,
 		   int __user *optlen)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	int val, len;
 
 	if (level != SOL_TCP)
@@ -2254,7 +2255,6 @@
 void __init tcp_init(void)
 {
 	struct sk_buff *skb = NULL;
-	unsigned long goal;
 	int order, i;
 
 	if (sizeof(struct tcp_skb_cb) > sizeof(skb->cb))
@@ -2287,43 +2287,35 @@
 	 *
 	 * The methodology is similar to that of the buffer cache.
 	 */
-	if (num_physpages >= (128 * 1024))
-		goal = num_physpages >> (21 - PAGE_SHIFT);
-	else
-		goal = num_physpages >> (23 - PAGE_SHIFT);
-
-	if (thash_entries)
-		goal = (thash_entries * sizeof(struct tcp_ehash_bucket)) >> PAGE_SHIFT;
-	for (order = 0; (1UL << order) < goal; order++)
-		;
-	do {
-		tcp_ehash_size = (1UL << order) * PAGE_SIZE /
-			sizeof(struct tcp_ehash_bucket);
-		tcp_ehash_size >>= 1;
-		while (tcp_ehash_size & (tcp_ehash_size - 1))
-			tcp_ehash_size--;
-		tcp_ehash = (struct tcp_ehash_bucket *)
-			__get_free_pages(GFP_ATOMIC, order);
-	} while (!tcp_ehash && --order > 0);
-
-	if (!tcp_ehash)
-		panic("Failed to allocate TCP established hash table\n");
+	tcp_ehash = (struct tcp_ehash_bucket *)
+		alloc_large_system_hash("TCP established",
+					sizeof(struct tcp_ehash_bucket),
+					thash_entries,
+					(num_physpages >= 128 * 1024) ?
+						(25 - PAGE_SHIFT) :
+						(27 - PAGE_SHIFT),
+					HASH_HIGHMEM,
+					&tcp_ehash_size,
+					NULL,
+					0);
+	tcp_ehash_size = (1 << tcp_ehash_size) >> 1;
 	for (i = 0; i < (tcp_ehash_size << 1); i++) {
 		rwlock_init(&tcp_ehash[i].lock);
 		INIT_HLIST_HEAD(&tcp_ehash[i].chain);
 	}
 
-	do {
-		tcp_bhash_size = (1UL << order) * PAGE_SIZE /
-			sizeof(struct tcp_bind_hashbucket);
-		if ((tcp_bhash_size > (64 * 1024)) && order > 0)
-			continue;
-		tcp_bhash = (struct tcp_bind_hashbucket *)
-			__get_free_pages(GFP_ATOMIC, order);
-	} while (!tcp_bhash && --order >= 0);
-
-	if (!tcp_bhash)
-		panic("Failed to allocate TCP bind hash table\n");
+	tcp_bhash = (struct tcp_bind_hashbucket *)
+		alloc_large_system_hash("TCP bind",
+					sizeof(struct tcp_bind_hashbucket),
+					tcp_ehash_size,
+					(num_physpages >= 128 * 1024) ?
+						(25 - PAGE_SHIFT) :
+						(27 - PAGE_SHIFT),
+					HASH_HIGHMEM,
+					&tcp_bhash_size,
+					NULL,
+					64 * 1024);
+	tcp_bhash_size = 1 << tcp_bhash_size;
 	for (i = 0; i < tcp_bhash_size; i++) {
 		spin_lock_init(&tcp_bhash[i].lock);
 		INIT_HLIST_HEAD(&tcp_bhash[i].chain);
@@ -2332,6 +2324,10 @@
 	/* Try to be a bit smarter and adjust defaults depending
 	 * on available memory.
 	 */
+	for (order = 0; ((1 << order) << PAGE_SHIFT) <
+			(tcp_bhash_size * sizeof(struct tcp_bind_hashbucket));
+			order++)
+		;
 	if (order > 4) {
 		sysctl_local_port_range[0] = 32768;
 		sysctl_local_port_range[1] = 61000;
diff -Nru a/net/ipv4/tcp_diag.c b/net/ipv4/tcp_diag.c
--- a/net/ipv4/tcp_diag.c	2005-01-10 20:11:15 -08:00
+++ b/net/ipv4/tcp_diag.c	2005-01-10 20:11:15 -08:00
@@ -55,8 +55,8 @@
 static int tcpdiag_fill(struct sk_buff *skb, struct sock *sk,
 			int ext, u32 pid, u32 seq, u16 nlmsg_flags)
 {
-	struct inet_opt *inet = inet_sk(sk);
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	struct tcpdiagmsg *r;
 	struct nlmsghdr  *nlh;
 	struct tcp_info  *info = NULL;
@@ -427,7 +427,7 @@
 	if (cb->nlh->nlmsg_len > 4 + NLMSG_SPACE(sizeof(*r))) {
 		struct tcpdiag_entry entry;
 		struct rtattr *bc = (struct rtattr *)(r + 1);
-		struct inet_opt *inet = inet_sk(sk);
+		struct inet_sock *inet = inet_sk(sk);
 
 		entry.family = sk->sk_family;
 #ifdef CONFIG_IP_TCPDIAG_IPV6
@@ -458,7 +458,7 @@
 			    struct open_request *req,
 			    u32 pid, u32 seq)
 {
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	unsigned char *b = skb->tail;
 	struct tcpdiagmsg *r;
 	struct nlmsghdr *nlh;
@@ -512,10 +512,10 @@
 {
 	struct tcpdiag_entry entry;
 	struct tcpdiagreq *r = NLMSG_DATA(cb->nlh);
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	struct tcp_listen_opt *lopt;
 	struct rtattr *bc = NULL;
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	int j, s_j;
 	int reqnum, s_reqnum;
 	int err = 0;
@@ -609,7 +609,7 @@
 
 			num = 0;
 			sk_for_each(sk, node, &tcp_listening_hash[i]) {
-				struct inet_opt *inet = inet_sk(sk);
+				struct inet_sock *inet = inet_sk(sk);
 
 				if (num < s_num) {
 					num++;
@@ -670,7 +670,7 @@
 
 		num = 0;
 		sk_for_each(sk, node, &head->chain) {
-			struct inet_opt *inet = inet_sk(sk);
+			struct inet_sock *inet = inet_sk(sk);
 
 			if (num < s_num)
 				goto next_normal;
@@ -692,7 +692,7 @@
 		if (r->tcpdiag_states&TCPF_TIME_WAIT) {
 			sk_for_each(sk, node,
 				    &tcp_ehash[i + tcp_ehash_size].chain) {
-				struct inet_opt *inet = inet_sk(sk);
+				struct inet_sock *inet = inet_sk(sk);
 
 				if (num < s_num)
 					goto next_dying;
diff -Nru a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
--- a/net/ipv4/tcp_input.c	2005-01-10 20:11:21 -08:00
+++ b/net/ipv4/tcp_input.c	2005-01-10 20:11:21 -08:00
@@ -127,7 +127,8 @@
 /* Adapt the MSS value used to make delayed ack decision to the 
  * real world.
  */ 
-static __inline__ void tcp_measure_rcv_mss(struct tcp_opt *tp, struct sk_buff *skb)
+static inline void tcp_measure_rcv_mss(struct tcp_sock *tp,
+				       struct sk_buff *skb)
 {
 	unsigned int len, lss;
 
@@ -170,7 +171,7 @@
 	}
 }
 
-static void tcp_incr_quickack(struct tcp_opt *tp)
+static void tcp_incr_quickack(struct tcp_sock *tp)
 {
 	unsigned quickacks = tp->rcv_wnd/(2*tp->ack.rcv_mss);
 
@@ -180,7 +181,7 @@
 		tp->ack.quick = min(quickacks, TCP_MAX_QUICKACKS);
 }
 
-void tcp_enter_quickack_mode(struct tcp_opt *tp)
+void tcp_enter_quickack_mode(struct tcp_sock *tp)
 {
 	tcp_incr_quickack(tp);
 	tp->ack.pingpong = 0;
@@ -191,7 +192,7 @@
  * and the session is not interactive.
  */
 
-static __inline__ int tcp_in_quickack_mode(struct tcp_opt *tp)
+static __inline__ int tcp_in_quickack_mode(struct tcp_sock *tp)
 {
 	return (tp->ack.quick && !tp->ack.pingpong);
 }
@@ -236,8 +237,8 @@
  */
 
 /* Slow part of check#2. */
-static int
-__tcp_grow_window(struct sock *sk, struct tcp_opt *tp, struct sk_buff *skb)
+static int __tcp_grow_window(struct sock *sk, struct tcp_sock *tp,
+			     struct sk_buff *skb)
 {
 	/* Optimize this! */
 	int truesize = tcp_win_from_space(skb->truesize)/2;
@@ -253,8 +254,8 @@
 	return 0;
 }
 
-static __inline__ void
-tcp_grow_window(struct sock *sk, struct tcp_opt *tp, struct sk_buff *skb)
+static inline void tcp_grow_window(struct sock *sk, struct tcp_sock *tp,
+				   struct sk_buff *skb)
 {
 	/* Check #1 */
 	if (tp->rcv_ssthresh < tp->window_clamp &&
@@ -281,7 +282,7 @@
 
 static void tcp_fixup_rcvbuf(struct sock *sk)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	int rcvmem = tp->advmss + MAX_TCP_HEADER + 16 + sizeof(struct sk_buff);
 
 	/* Try to select rcvbuf so that 4 mss-sized segments
@@ -299,7 +300,7 @@
  */
 static void tcp_init_buffer_space(struct sock *sk)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	int maxwin;
 
 	if (!(sk->sk_userlocks & SOCK_RCVBUF_LOCK))
@@ -330,7 +331,7 @@
 	tp->snd_cwnd_stamp = tcp_time_stamp;
 }
 
-static void init_bictcp(struct tcp_opt *tp)
+static void init_bictcp(struct tcp_sock *tp)
 {
 	tp->bictcp.cnt = 0;
 
@@ -340,7 +341,7 @@
 }
 
 /* 5. Recalculate window clamp after socket hit its memory bounds. */
-static void tcp_clamp_window(struct sock *sk, struct tcp_opt *tp)
+static void tcp_clamp_window(struct sock *sk, struct tcp_sock *tp)
 {
 	struct sk_buff *skb;
 	unsigned int app_win = tp->rcv_nxt - tp->copied_seq;
@@ -388,7 +389,7 @@
  * though this reference is out of date.  A new paper
  * is pending.
  */
-static void tcp_rcv_rtt_update(struct tcp_opt *tp, u32 sample, int win_dep)
+static void tcp_rcv_rtt_update(struct tcp_sock *tp, u32 sample, int win_dep)
 {
 	u32 new_sample = tp->rcv_rtt_est.rtt;
 	long m = sample;
@@ -421,7 +422,7 @@
 		tp->rcv_rtt_est.rtt = new_sample;
 }
 
-static inline void tcp_rcv_rtt_measure(struct tcp_opt *tp)
+static inline void tcp_rcv_rtt_measure(struct tcp_sock *tp)
 {
 	if (tp->rcv_rtt_est.time == 0)
 		goto new_measure;
@@ -436,7 +437,7 @@
 	tp->rcv_rtt_est.time = tcp_time_stamp;
 }
 
-static inline void tcp_rcv_rtt_measure_ts(struct tcp_opt *tp, struct sk_buff *skb)
+static inline void tcp_rcv_rtt_measure_ts(struct tcp_sock *tp, struct sk_buff *skb)
 {
 	if (tp->rcv_tsecr &&
 	    (TCP_SKB_CB(skb)->end_seq -
@@ -450,7 +451,7 @@
  */
 void tcp_rcv_space_adjust(struct sock *sk)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	int time;
 	int space;
 	
@@ -511,7 +512,7 @@
  * each ACK we send, he increments snd_cwnd and transmits more of his
  * queue.  -DaveM
  */
-static void tcp_event_data_recv(struct sock *sk, struct tcp_opt *tp, struct sk_buff *skb)
+static void tcp_event_data_recv(struct sock *sk, struct tcp_sock *tp, struct sk_buff *skb)
 {
 	u32 now;
 
@@ -558,7 +559,7 @@
 /* When starting a new connection, pin down the current choice of 
  * congestion algorithm.
  */
-void tcp_ca_init(struct tcp_opt *tp)
+void tcp_ca_init(struct tcp_sock *tp)
 {
 	if (sysctl_tcp_westwood) 
 		tp->adv_cong = TCP_WESTWOOD;
@@ -579,7 +580,7 @@
  *   o min-filter RTT samples from a much longer window (forever for now)
  *     to find the propagation delay (baseRTT)
  */
-static inline void vegas_rtt_calc(struct tcp_opt *tp, __u32 rtt)
+static inline void vegas_rtt_calc(struct tcp_sock *tp, __u32 rtt)
 {
 	__u32 vrtt = rtt + 1; /* Never allow zero rtt or baseRTT */
 
@@ -603,7 +604,7 @@
  * To save cycles in the RFC 1323 implementation it was better to break
  * it up into three procedures. -- erics
  */
-static void tcp_rtt_estimator(struct tcp_opt *tp, __u32 mrtt)
+static void tcp_rtt_estimator(struct tcp_sock *tp, __u32 mrtt)
 {
 	long m = mrtt; /* RTT */
 
@@ -673,7 +674,7 @@
 /* Calculate rto without backoff.  This is the second half of Van Jacobson's
  * routine referred to above.
  */
-static __inline__ void tcp_set_rto(struct tcp_opt *tp)
+static inline void tcp_set_rto(struct tcp_sock *tp)
 {
 	/* Old crap is replaced with new one. 8)
 	 *
@@ -697,7 +698,7 @@
 /* NOTE: clamping at TCP_RTO_MIN is not required, current algo
  * guarantees that rto is higher.
  */
-static __inline__ void tcp_bound_rto(struct tcp_opt *tp)
+static inline void tcp_bound_rto(struct tcp_sock *tp)
 {
 	if (tp->rto > TCP_RTO_MAX)
 		tp->rto = TCP_RTO_MAX;
@@ -709,7 +710,7 @@
  */
 void tcp_update_metrics(struct sock *sk)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	struct dst_entry *dst = __sk_dst_get(sk);
 
 	if (sysctl_tcp_nometrics_save)
@@ -797,7 +798,7 @@
 }
 
 /* Numbers are taken from RFC2414.  */
-__u32 tcp_init_cwnd(struct tcp_opt *tp, struct dst_entry *dst)
+__u32 tcp_init_cwnd(struct tcp_sock *tp, struct dst_entry *dst)
 {
 	__u32 cwnd = (dst ? dst_metric(dst, RTAX_INITCWND) : 0);
 
@@ -814,7 +815,7 @@
 
 static void tcp_init_metrics(struct sock *sk)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	struct dst_entry *dst = __sk_dst_get(sk);
 
 	if (dst == NULL)
@@ -883,7 +884,7 @@
 	}
 }
 
-static void tcp_update_reordering(struct tcp_opt *tp, int metric, int ts)
+static void tcp_update_reordering(struct tcp_sock *tp, int metric, int ts)
 {
 	if (metric > tp->reordering) {
 		tp->reordering = min(TCP_MAX_REORDERING, metric);
@@ -961,7 +962,7 @@
 static int
 tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_una)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	unsigned char *ptr = ack_skb->h.raw + TCP_SKB_CB(ack_skb)->sacked;
 	struct tcp_sack_block *sp = (struct tcp_sack_block *)(ptr+2);
 	int num_sacks = (ptr[1] - TCPOLEN_SACK_BASE)>>3;
@@ -1178,7 +1179,7 @@
  */
 void tcp_enter_frto(struct sock *sk)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	struct sk_buff *skb;
 
 	tp->frto_counter = 1;
@@ -1215,7 +1216,7 @@
  */
 static void tcp_enter_frto_loss(struct sock *sk)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	struct sk_buff *skb;
 	int cnt = 0;
 
@@ -1258,7 +1259,7 @@
 	init_bictcp(tp);
 }
 
-void tcp_clear_retrans(struct tcp_opt *tp)
+void tcp_clear_retrans(struct tcp_sock *tp)
 {
 	tcp_set_pcount(&tp->left_out, 0);
 	tcp_set_pcount(&tp->retrans_out, 0);
@@ -1277,7 +1278,7 @@
  */
 void tcp_enter_loss(struct sock *sk, int how)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	struct sk_buff *skb;
 	int cnt = 0;
 
@@ -1321,7 +1322,7 @@
 	TCP_ECN_queue_cwr(tp);
 }
 
-static int tcp_check_sack_reneging(struct sock *sk, struct tcp_opt *tp)
+static int tcp_check_sack_reneging(struct sock *sk, struct tcp_sock *tp)
 {
 	struct sk_buff *skb;
 
@@ -1344,18 +1345,18 @@
 	return 0;
 }
 
-static inline int tcp_fackets_out(struct tcp_opt *tp)
+static inline int tcp_fackets_out(struct tcp_sock *tp)
 {
 	return IsReno(tp) ? tcp_get_pcount(&tp->sacked_out)+1 :
 		tcp_get_pcount(&tp->fackets_out);
 }
 
-static inline int tcp_skb_timedout(struct tcp_opt *tp, struct sk_buff *skb)
+static inline int tcp_skb_timedout(struct tcp_sock *tp, struct sk_buff *skb)
 {
 	return (tcp_time_stamp - TCP_SKB_CB(skb)->when > tp->rto);
 }
 
-static inline int tcp_head_timedout(struct sock *sk, struct tcp_opt *tp)
+static inline int tcp_head_timedout(struct sock *sk, struct tcp_sock *tp)
 {
 	return tcp_get_pcount(&tp->packets_out) &&
 	       tcp_skb_timedout(tp, skb_peek(&sk->sk_write_queue));
@@ -1454,8 +1455,7 @@
  * Main question: may we further continue forward transmission
  * with the same cwnd?
  */
-static int
-tcp_time_to_recover(struct sock *sk, struct tcp_opt *tp)
+static int tcp_time_to_recover(struct sock *sk, struct tcp_sock *tp)
 {
 	__u32 packets_out;
 
@@ -1493,7 +1493,7 @@
  * in assumption of absent reordering, interpret this as reordering.
  * The only another reason could be bug in receiver TCP.
  */
-static void tcp_check_reno_reordering(struct tcp_opt *tp, int addend)
+static void tcp_check_reno_reordering(struct tcp_sock *tp, int addend)
 {
 	u32 holes;
 
@@ -1512,7 +1512,7 @@
 
 /* Emulate SACKs for SACKless connection: account for a new dupack. */
 
-static void tcp_add_reno_sack(struct tcp_opt *tp)
+static void tcp_add_reno_sack(struct tcp_sock *tp)
 {
 	tcp_inc_pcount_explicit(&tp->sacked_out, 1);
 	tcp_check_reno_reordering(tp, 0);
@@ -1521,7 +1521,7 @@
 
 /* Account for ACK, ACKing some data in Reno Recovery phase. */
 
-static void tcp_remove_reno_sacks(struct sock *sk, struct tcp_opt *tp, int acked)
+static void tcp_remove_reno_sacks(struct sock *sk, struct tcp_sock *tp, int acked)
 {
 	if (acked > 0) {
 		/* One ACK acked hole. The rest eat duplicate ACKs. */
@@ -1534,15 +1534,15 @@
 	tcp_sync_left_out(tp);
 }
 
-static inline void tcp_reset_reno_sack(struct tcp_opt *tp)
+static inline void tcp_reset_reno_sack(struct tcp_sock *tp)
 {
 	tcp_set_pcount(&tp->sacked_out, 0);
 	tcp_set_pcount(&tp->left_out, tcp_get_pcount(&tp->lost_out));
 }
 
 /* Mark head of queue up as lost. */
-static void
-tcp_mark_head_lost(struct sock *sk, struct tcp_opt *tp, int packets, u32 high_seq)
+static void tcp_mark_head_lost(struct sock *sk, struct tcp_sock *tp,
+			       int packets, u32 high_seq)
 {
 	struct sk_buff *skb;
 	int cnt = packets;
@@ -1563,7 +1563,7 @@
 
 /* Account newly detected lost packet(s) */
 
-static void tcp_update_scoreboard(struct sock *sk, struct tcp_opt *tp)
+static void tcp_update_scoreboard(struct sock *sk, struct tcp_sock *tp)
 {
 	if (IsFack(tp)) {
 		int lost = tcp_get_pcount(&tp->fackets_out) - tp->reordering;
@@ -1596,7 +1596,7 @@
 /* CWND moderation, preventing bursts due to too big ACKs
  * in dubious situations.
  */
-static __inline__ void tcp_moderate_cwnd(struct tcp_opt *tp)
+static inline void tcp_moderate_cwnd(struct tcp_sock *tp)
 {
 	tp->snd_cwnd = min(tp->snd_cwnd,
 			   tcp_packets_in_flight(tp)+tcp_max_burst(tp));
@@ -1605,7 +1605,7 @@
 
 /* Decrease cwnd each second ack. */
 
-static void tcp_cwnd_down(struct tcp_opt *tp)
+static void tcp_cwnd_down(struct tcp_sock *tp)
 {
 	int decr = tp->snd_cwnd_cnt + 1;
 	__u32 limit;
@@ -1635,7 +1635,7 @@
 /* Nothing was retransmitted or returned timestamp is less
  * than timestamp of the first retransmission.
  */
-static __inline__ int tcp_packet_delayed(struct tcp_opt *tp)
+static inline int tcp_packet_delayed(struct tcp_sock *tp)
 {
 	return !tp->retrans_stamp ||
 		(tp->saw_tstamp && tp->rcv_tsecr &&
@@ -1645,9 +1645,9 @@
 /* Undo procedures. */
 
 #if FASTRETRANS_DEBUG > 1
-static void DBGUNDO(struct sock *sk, struct tcp_opt *tp, const char *msg)
+static void DBGUNDO(struct sock *sk, struct tcp_sock *tp, const char *msg)
 {
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	printk(KERN_DEBUG "Undo %s %u.%u.%u.%u/%u c%u l%u ss%u/%u p%u\n",
 	       msg,
 	       NIPQUAD(inet->daddr), ntohs(inet->dport),
@@ -1659,7 +1659,7 @@
 #define DBGUNDO(x...) do { } while (0)
 #endif
 
-static void tcp_undo_cwr(struct tcp_opt *tp, int undo)
+static void tcp_undo_cwr(struct tcp_sock *tp, int undo)
 {
 	if (tp->prior_ssthresh) {
 		tp->snd_cwnd = max(tp->snd_cwnd, tp->snd_ssthresh<<1);
@@ -1675,14 +1675,14 @@
 	tp->snd_cwnd_stamp = tcp_time_stamp;
 }
 
-static inline int tcp_may_undo(struct tcp_opt *tp)
+static inline int tcp_may_undo(struct tcp_sock *tp)
 {
 	return tp->undo_marker &&
 		(!tp->undo_retrans || tcp_packet_delayed(tp));
 }
 
 /* People celebrate: "We love our President!" */
-static int tcp_try_undo_recovery(struct sock *sk, struct tcp_opt *tp)
+static int tcp_try_undo_recovery(struct sock *sk, struct tcp_sock *tp)
 {
 	if (tcp_may_undo(tp)) {
 		/* Happy end! We did not retransmit anything
@@ -1708,7 +1708,7 @@
 }
 
 /* Try to undo cwnd reduction, because D-SACKs acked all retransmitted data */
-static void tcp_try_undo_dsack(struct sock *sk, struct tcp_opt *tp)
+static void tcp_try_undo_dsack(struct sock *sk, struct tcp_sock *tp)
 {
 	if (tp->undo_marker && !tp->undo_retrans) {
 		DBGUNDO(sk, tp, "D-SACK");
@@ -1720,7 +1720,8 @@
 
 /* Undo during fast recovery after partial ACK. */
 
-static int tcp_try_undo_partial(struct sock *sk, struct tcp_opt *tp, int acked)
+static int tcp_try_undo_partial(struct sock *sk, struct tcp_sock *tp,
+				int acked)
 {
 	/* Partial ACK arrived. Force Hoe's retransmit. */
 	int failed = IsReno(tp) || tcp_get_pcount(&tp->fackets_out)>tp->reordering;
@@ -1748,7 +1749,7 @@
 }
 
 /* Undo during loss recovery after partial ACK. */
-static int tcp_try_undo_loss(struct sock *sk, struct tcp_opt *tp)
+static int tcp_try_undo_loss(struct sock *sk, struct tcp_sock *tp)
 {
 	if (tcp_may_undo(tp)) {
 		struct sk_buff *skb;
@@ -1769,7 +1770,7 @@
 	return 0;
 }
 
-static __inline__ void tcp_complete_cwr(struct tcp_opt *tp)
+static inline void tcp_complete_cwr(struct tcp_sock *tp)
 {
 	if (tcp_westwood_cwnd(tp)) 
 		tp->snd_ssthresh = tp->snd_cwnd;
@@ -1778,7 +1779,7 @@
 	tp->snd_cwnd_stamp = tcp_time_stamp;
 }
 
-static void tcp_try_to_open(struct sock *sk, struct tcp_opt *tp, int flag)
+static void tcp_try_to_open(struct sock *sk, struct tcp_sock *tp, int flag)
 {
 	tcp_set_pcount(&tp->left_out, tcp_get_pcount(&tp->sacked_out));
 
@@ -1821,7 +1822,7 @@
 tcp_fastretrans_alert(struct sock *sk, u32 prior_snd_una,
 		      int prior_packets, int flag)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	int is_dupack = (tp->snd_una == prior_snd_una && !(flag&FLAG_NOT_DUP));
 
 	/* Some technical things:
@@ -1970,7 +1971,7 @@
 /* Read draft-ietf-tcplw-high-performance before mucking
  * with this code. (Superceeds RFC1323)
  */
-static void tcp_ack_saw_tstamp(struct tcp_opt *tp, int flag)
+static void tcp_ack_saw_tstamp(struct tcp_sock *tp, int flag)
 {
 	__u32 seq_rtt;
 
@@ -1996,7 +1997,7 @@
 	tcp_bound_rto(tp);
 }
 
-static void tcp_ack_no_tstamp(struct tcp_opt *tp, u32 seq_rtt, int flag)
+static void tcp_ack_no_tstamp(struct tcp_sock *tp, u32 seq_rtt, int flag)
 {
 	/* We don't have a timestamp. Can only use
 	 * packets that are not retransmitted to determine
@@ -2016,8 +2017,8 @@
 	tcp_bound_rto(tp);
 }
 
-static __inline__ void
-tcp_ack_update_rtt(struct tcp_opt *tp, int flag, s32 seq_rtt)
+static inline void tcp_ack_update_rtt(struct tcp_sock *tp,
+				      int flag, s32 seq_rtt)
 {
 	/* Note that peer MAY send zero echo. In this case it is ignored. (rfc1323) */
 	if (tp->saw_tstamp && tp->rcv_tsecr)
@@ -2039,7 +2040,7 @@
  * Unless BIC is enabled and congestion window is large
  * this behaves the same as the original Reno.
  */
-static inline __u32 bictcp_cwnd(struct tcp_opt *tp)
+static inline __u32 bictcp_cwnd(struct tcp_sock *tp)
 {
 	/* orignal Reno behaviour */
 	if (!tcp_is_bic(tp))
@@ -2092,7 +2093,7 @@
 /* This is Jacobson's slow start and congestion avoidance. 
  * SIGCOMM '88, p. 328.
  */
-static __inline__ void reno_cong_avoid(struct tcp_opt *tp)
+static inline void reno_cong_avoid(struct tcp_sock *tp)
 {
         if (tp->snd_cwnd <= tp->snd_ssthresh) {
                 /* In "safe" area, increase. */
@@ -2141,7 +2142,7 @@
  *     a cwnd adjustment decision. The original Vegas implementation
  *     assumed senders never went idle.
  */
-static void vegas_cong_avoid(struct tcp_opt *tp, u32 ack, u32 seq_rtt)
+static void vegas_cong_avoid(struct tcp_sock *tp, u32 ack, u32 seq_rtt)
 {
 	/* The key players are v_beg_snd_una and v_beg_snd_nxt.
 	 *
@@ -2334,7 +2335,7 @@
 	tp->snd_cwnd_stamp = tcp_time_stamp;
 }
 
-static inline void tcp_cong_avoid(struct tcp_opt *tp, u32 ack, u32 seq_rtt)
+static inline void tcp_cong_avoid(struct tcp_sock *tp, u32 ack, u32 seq_rtt)
 {
 	if (tcp_vegas_enabled(tp))
 		vegas_cong_avoid(tp, ack, seq_rtt);
@@ -2346,7 +2347,7 @@
  * RFC2988 recommends to restart timer to now+rto.
  */
 
-static __inline__ void tcp_ack_packets_out(struct sock *sk, struct tcp_opt *tp)
+static inline void tcp_ack_packets_out(struct sock *sk, struct tcp_sock *tp)
 {
 	if (!tcp_get_pcount(&tp->packets_out)) {
 		tcp_clear_xmit_timer(sk, TCP_TIME_RETRANS);
@@ -2367,7 +2368,7 @@
 static int tcp_tso_acked(struct sock *sk, struct sk_buff *skb,
 			 __u32 now, __s32 *seq_rtt)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	struct tcp_skb_cb *scb = TCP_SKB_CB(skb); 
 	__u32 seq = tp->snd_una;
 	__u32 packets_acked;
@@ -2428,7 +2429,7 @@
 /* Remove acknowledged frames from the retransmission queue. */
 static int tcp_clean_rtx_queue(struct sock *sk, __s32 *seq_rtt_p)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	struct sk_buff *skb;
 	__u32 now = tcp_time_stamp;
 	int acked = 0;
@@ -2525,7 +2526,7 @@
 
 static void tcp_ack_probe(struct sock *sk)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 
 	/* Was it a usable window open? */
 
@@ -2542,13 +2543,13 @@
 	}
 }
 
-static __inline__ int tcp_ack_is_dubious(struct tcp_opt *tp, int flag)
+static inline int tcp_ack_is_dubious(struct tcp_sock *tp, int flag)
 {
 	return (!(flag & FLAG_NOT_DUP) || (flag & FLAG_CA_ALERT) ||
 		tp->ca_state != TCP_CA_Open);
 }
 
-static __inline__ int tcp_may_raise_cwnd(struct tcp_opt *tp, int flag)
+static inline int tcp_may_raise_cwnd(struct tcp_sock *tp, int flag)
 {
 	return (!(flag & FLAG_ECE) || tp->snd_cwnd < tp->snd_ssthresh) &&
 		!((1<<tp->ca_state)&(TCPF_CA_Recovery|TCPF_CA_CWR));
@@ -2557,8 +2558,8 @@
 /* Check that window update is acceptable.
  * The function assumes that snd_una<=ack<=snd_next.
  */
-static __inline__ int
-tcp_may_update_window(struct tcp_opt *tp, u32 ack, u32 ack_seq, u32 nwin)
+static inline int tcp_may_update_window(struct tcp_sock *tp, u32 ack,
+					u32 ack_seq, u32 nwin)
 {
 	return (after(ack, tp->snd_una) ||
 		after(ack_seq, tp->snd_wl1) ||
@@ -2570,7 +2571,7 @@
  * Window update algorithm, described in RFC793/RFC1122 (used in linux-2.2
  * and in FreeBSD. NetBSD's one is even worse.) is wrong.
  */
-static int tcp_ack_update_window(struct sock *sk, struct tcp_opt *tp,
+static int tcp_ack_update_window(struct sock *sk, struct tcp_sock *tp,
 				 struct sk_buff *skb, u32 ack, u32 ack_seq)
 {
 	int flag = 0;
@@ -2605,7 +2606,7 @@
 
 static void tcp_process_frto(struct sock *sk, u32 prior_snd_una)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	
 	tcp_sync_left_out(tp);
 	
@@ -2654,7 +2655,7 @@
 
 static void init_westwood(struct sock *sk)
 {
-        struct tcp_opt *tp = tcp_sk(sk);
+        struct tcp_sock *tp = tcp_sk(sk);
 
         tp->westwood.bw_ns_est = 0;
         tp->westwood.bw_est = 0;
@@ -2678,7 +2679,7 @@
 
 static void westwood_filter(struct sock *sk, __u32 delta)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 
 	tp->westwood.bw_ns_est =
 		westwood_do_filter(tp->westwood.bw_ns_est, 
@@ -2696,7 +2697,7 @@
 
 static inline __u32 westwood_update_rttmin(const struct sock *sk)
 {
-	const struct tcp_opt *tp = tcp_sk(sk);
+	const struct tcp_sock *tp = tcp_sk(sk);
 	__u32 rttmin = tp->westwood.rtt_min;
 
 	if (tp->westwood.rtt != 0 &&
@@ -2713,7 +2714,7 @@
 
 static inline __u32 westwood_acked(const struct sock *sk)
 {
-	const struct tcp_opt *tp = tcp_sk(sk);
+	const struct tcp_sock *tp = tcp_sk(sk);
 
 	return tp->snd_una - tp->westwood.snd_una;
 }
@@ -2729,7 +2730,7 @@
 
 static int westwood_new_window(const struct sock *sk)
 {
-	const struct tcp_opt *tp = tcp_sk(sk);
+	const struct tcp_sock *tp = tcp_sk(sk);
 	__u32 left_bound;
 	__u32 rtt;
 	int ret = 0;
@@ -2760,7 +2761,7 @@
 
 static void __westwood_update_window(struct sock *sk, __u32 now)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	__u32 delta = now - tp->westwood.rtt_win_sx;
 
         if (delta) {
@@ -2786,9 +2787,9 @@
  * straight forward and doesn't need any particular care.
  */
 
-void __tcp_westwood_fast_bw(struct sock *sk, struct sk_buff *skb)
+static void __tcp_westwood_fast_bw(struct sock *sk, struct sk_buff *skb)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 
 	westwood_update_window(sk, tcp_time_stamp);
 
@@ -2797,6 +2798,12 @@
 	tp->westwood.rtt_min = westwood_update_rttmin(sk);
 }
 
+static inline void tcp_westwood_fast_bw(struct sock *sk, struct sk_buff *skb)
+{
+        if (tcp_is_westwood(tcp_sk(sk)))
+                __tcp_westwood_fast_bw(sk, skb);
+}
+
 
 /*
  * @westwood_dupack_update
@@ -2805,24 +2812,24 @@
 
 static void westwood_dupack_update(struct sock *sk)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 
 	tp->westwood.accounted += tp->mss_cache_std;
 	tp->westwood.cumul_ack = tp->mss_cache_std;
 }
 
-static inline int westwood_may_change_cumul(struct tcp_opt *tp)
+static inline int westwood_may_change_cumul(struct tcp_sock *tp)
 {
 	return (tp->westwood.cumul_ack > tp->mss_cache_std);
 }
 
-static inline void westwood_partial_update(struct tcp_opt *tp)
+static inline void westwood_partial_update(struct tcp_sock *tp)
 {
 	tp->westwood.accounted -= tp->westwood.cumul_ack;
 	tp->westwood.cumul_ack = tp->mss_cache_std;
 }
 
-static inline void westwood_complete_update(struct tcp_opt *tp)
+static inline void westwood_complete_update(struct tcp_sock *tp)
 {
 	tp->westwood.cumul_ack -= tp->westwood.accounted;
 	tp->westwood.accounted = 0;
@@ -2836,7 +2843,7 @@
 
 static inline __u32 westwood_acked_count(struct sock *sk)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 
 	tp->westwood.cumul_ack = westwood_acked(sk);
 
@@ -2867,9 +2874,9 @@
  * dupack. But we need to be careful in such case.
  */
 
-void __tcp_westwood_slow_bw(struct sock *sk, struct sk_buff *skb)
+static void __tcp_westwood_slow_bw(struct sock *sk, struct sk_buff *skb)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 
 	westwood_update_window(sk, tcp_time_stamp);
 
@@ -2877,10 +2884,16 @@
 	tp->westwood.rtt_min = westwood_update_rttmin(sk);
 }
 
+static inline void tcp_westwood_slow_bw(struct sock *sk, struct sk_buff *skb)
+{
+        if (tcp_is_westwood(tcp_sk(sk)))
+                __tcp_westwood_slow_bw(sk, skb);
+}
+
 /* This routine deals with incoming acks, but not outgoing ones. */
 static int tcp_ack(struct sock *sk, struct sk_buff *skb, int flag)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	u32 prior_snd_una = tp->snd_una;
 	u32 ack_seq = TCP_SKB_CB(skb)->seq;
 	u32 ack = TCP_SKB_CB(skb)->ack_seq;
@@ -2985,7 +2998,7 @@
  * But, this can also be called on packets in the established flow when
  * the fast version below fails.
  */
-void tcp_parse_options(struct sk_buff *skb, struct tcp_opt *tp, int estab)
+void tcp_parse_options(struct sk_buff *skb, struct tcp_sock *tp, int estab)
 {
 	unsigned char *ptr;
 	struct tcphdr *th = skb->h.th;
@@ -3070,7 +3083,8 @@
 /* Fast parse options. This hopes to only see timestamps.
  * If it is wrong it falls back on tcp_parse_options().
  */
-static __inline__ int tcp_fast_parse_options(struct sk_buff *skb, struct tcphdr *th, struct tcp_opt *tp)
+static inline int tcp_fast_parse_options(struct sk_buff *skb, struct tcphdr *th,
+					 struct tcp_sock *tp)
 {
 	if (th->doff == sizeof(struct tcphdr)>>2) {
 		tp->saw_tstamp = 0;
@@ -3092,15 +3106,13 @@
 	return 1;
 }
 
-static __inline__ void
-tcp_store_ts_recent(struct tcp_opt *tp)
+static inline void tcp_store_ts_recent(struct tcp_sock *tp)
 {
 	tp->ts_recent = tp->rcv_tsval;
 	tp->ts_recent_stamp = xtime.tv_sec;
 }
 
-static __inline__ void
-tcp_replace_ts_recent(struct tcp_opt *tp, u32 seq)
+static inline void tcp_replace_ts_recent(struct tcp_sock *tp, u32 seq)
 {
 	if (tp->saw_tstamp && !after(seq, tp->rcv_wup)) {
 		/* PAWS bug workaround wrt. ACK frames, the PAWS discard
@@ -3139,7 +3151,7 @@
  * up to bandwidth of 18Gigabit/sec. 8) ]
  */
 
-static int tcp_disordered_ack(struct tcp_opt *tp, struct sk_buff *skb)
+static int tcp_disordered_ack(struct tcp_sock *tp, struct sk_buff *skb)
 {
 	struct tcphdr *th = skb->h.th;
 	u32 seq = TCP_SKB_CB(skb)->seq;
@@ -3158,7 +3170,7 @@
 		(s32)(tp->ts_recent - tp->rcv_tsval) <= (tp->rto*1024)/HZ);
 }
 
-static __inline__ int tcp_paws_discard(struct tcp_opt *tp, struct sk_buff *skb)
+static inline int tcp_paws_discard(struct tcp_sock *tp, struct sk_buff *skb)
 {
 	return ((s32)(tp->ts_recent - tp->rcv_tsval) > TCP_PAWS_WINDOW &&
 		xtime.tv_sec < tp->ts_recent_stamp + TCP_PAWS_24DAYS &&
@@ -3178,7 +3190,7 @@
  * (borrowed from freebsd)
  */
 
-static inline int tcp_sequence(struct tcp_opt *tp, u32 seq, u32 end_seq)
+static inline int tcp_sequence(struct tcp_sock *tp, u32 seq, u32 end_seq)
 {
 	return	!before(end_seq, tp->rcv_wup) &&
 		!after(seq, tp->rcv_nxt + tcp_receive_window(tp));
@@ -3223,7 +3235,7 @@
  */
 static void tcp_fin(struct sk_buff *skb, struct sock *sk, struct tcphdr *th)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 
 	tcp_schedule_ack(tp);
 
@@ -3303,7 +3315,7 @@
 	return 0;
 }
 
-static __inline__ void tcp_dsack_set(struct tcp_opt *tp, u32 seq, u32 end_seq)
+static inline void tcp_dsack_set(struct tcp_sock *tp, u32 seq, u32 end_seq)
 {
 	if (tp->sack_ok && sysctl_tcp_dsack) {
 		if (before(seq, tp->rcv_nxt))
@@ -3318,7 +3330,7 @@
 	}
 }
 
-static __inline__ void tcp_dsack_extend(struct tcp_opt *tp, u32 seq, u32 end_seq)
+static inline void tcp_dsack_extend(struct tcp_sock *tp, u32 seq, u32 end_seq)
 {
 	if (!tp->dsack)
 		tcp_dsack_set(tp, seq, end_seq);
@@ -3328,7 +3340,7 @@
 
 static void tcp_send_dupack(struct sock *sk, struct sk_buff *skb)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 
 	if (TCP_SKB_CB(skb)->end_seq != TCP_SKB_CB(skb)->seq &&
 	    before(TCP_SKB_CB(skb)->seq, tp->rcv_nxt)) {
@@ -3350,7 +3362,7 @@
 /* These routines update the SACK block as out-of-order packets arrive or
  * in-order packets close up the sequence space.
  */
-static void tcp_sack_maybe_coalesce(struct tcp_opt *tp)
+static void tcp_sack_maybe_coalesce(struct tcp_sock *tp)
 {
 	int this_sack;
 	struct tcp_sack_block *sp = &tp->selective_acks[0];
@@ -3391,7 +3403,7 @@
 
 static void tcp_sack_new_ofo_skb(struct sock *sk, u32 seq, u32 end_seq)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	struct tcp_sack_block *sp = &tp->selective_acks[0];
 	int cur_sacks = tp->num_sacks;
 	int this_sack;
@@ -3434,7 +3446,7 @@
 
 /* RCV.NXT advances, some SACKs should be eaten. */
 
-static void tcp_sack_remove(struct tcp_opt *tp)
+static void tcp_sack_remove(struct tcp_sock *tp)
 {
 	struct tcp_sack_block *sp = &tp->selective_acks[0];
 	int num_sacks = tp->num_sacks;
@@ -3475,7 +3487,7 @@
  */
 static void tcp_ofo_queue(struct sock *sk)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	__u32 dsack_high = tp->rcv_nxt;
 	struct sk_buff *skb;
 
@@ -3513,7 +3525,7 @@
 static void tcp_data_queue(struct sock *sk, struct sk_buff *skb)
 {
 	struct tcphdr *th = skb->h.th;
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	int eaten = -1;
 
 	if (TCP_SKB_CB(skb)->seq == TCP_SKB_CB(skb)->end_seq)
@@ -3821,7 +3833,7 @@
  */
 static void tcp_collapse_ofo_queue(struct sock *sk)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	struct sk_buff *skb = skb_peek(&tp->out_of_order_queue);
 	struct sk_buff *head;
 	u32 start, end;
@@ -3866,7 +3878,7 @@
  */
 static int tcp_prune_queue(struct sock *sk)
 {
-	struct tcp_opt *tp = tcp_sk(sk); 
+	struct tcp_sock *tp = tcp_sk(sk); 
 
 	SOCK_DEBUG(sk, "prune_queue: c=%x\n", tp->copied_seq);
 
@@ -3926,7 +3938,7 @@
  */
 void tcp_cwnd_application_limited(struct sock *sk)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 
 	if (tp->ca_state == TCP_CA_Open &&
 	    sk->sk_socket && !test_bit(SOCK_NOSPACE, &sk->sk_socket->flags)) {
@@ -3950,7 +3962,7 @@
  */
 static void tcp_new_space(struct sock *sk)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 
 	if (tcp_get_pcount(&tp->packets_out) < tp->snd_cwnd &&
 	    !(sk->sk_userlocks & SOCK_SNDBUF_LOCK) &&
@@ -3981,7 +3993,7 @@
 
 static void __tcp_data_snd_check(struct sock *sk, struct sk_buff *skb)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 
 	if (after(TCP_SKB_CB(skb)->end_seq, tp->snd_una + tp->snd_wnd) ||
 	    tcp_packets_in_flight(tp) >= tp->snd_cwnd ||
@@ -4003,7 +4015,7 @@
  */
 static void __tcp_ack_snd_check(struct sock *sk, int ofo_possible)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 
 	    /* More than one full frame received... */
 	if (((tp->rcv_nxt - tp->rcv_wup) > tp->ack.rcv_mss
@@ -4026,7 +4038,7 @@
 
 static __inline__ void tcp_ack_snd_check(struct sock *sk)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	if (!tcp_ack_scheduled(tp)) {
 		/* We sent a data segment already. */
 		return;
@@ -4046,7 +4058,7 @@
  
 static void tcp_check_urg(struct sock * sk, struct tcphdr * th)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	u32 ptr = ntohs(th->urg_ptr);
 
 	if (ptr && !sysctl_tcp_stdurg)
@@ -4113,7 +4125,7 @@
 /* This is the 'fast' part of urgent handling. */
 static void tcp_urg(struct sock *sk, struct sk_buff *skb, struct tcphdr *th)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 
 	/* Check if we get a new urgent pointer - normally not. */
 	if (th->urg)
@@ -4138,7 +4150,7 @@
 
 static int tcp_copy_to_iovec(struct sock *sk, struct sk_buff *skb, int hlen)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	int chunk = skb->len - hlen;
 	int err;
 
@@ -4206,7 +4218,7 @@
 int tcp_rcv_established(struct sock *sk, struct sk_buff *skb,
 			struct tcphdr *th, unsigned len)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 
 	/*
 	 *	Header prediction.
@@ -4456,7 +4468,7 @@
 static int tcp_rcv_synsent_state_process(struct sock *sk, struct sk_buff *skb,
 					 struct tcphdr *th, unsigned len)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	int saved_clamp = tp->mss_clamp;
 
 	tcp_parse_options(skb, tp, 0);
@@ -4701,7 +4713,7 @@
 int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
 			  struct tcphdr *th, unsigned len)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	int queued = 0;
 
 	tp->saw_tstamp = 0;
diff -Nru a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
--- a/net/ipv4/tcp_ipv4.c	2005-01-10 20:11:17 -08:00
+++ b/net/ipv4/tcp_ipv4.c	2005-01-10 20:11:17 -08:00
@@ -115,7 +115,7 @@
 
 static __inline__ int tcp_sk_hashfn(struct sock *sk)
 {
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	__u32 laddr = inet->rcv_saddr;
 	__u16 lport = inet->num;
 	__u32 faddr = inet->daddr;
@@ -300,7 +300,7 @@
  */
 static void __tcp_put_port(struct sock *sk)
 {
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	struct tcp_bind_hashbucket *head = &tcp_bhash[tcp_bhashfn(inet->num)];
 	struct tcp_bind_bucket *tb;
 
@@ -420,7 +420,7 @@
 
 	hiscore=-1;
 	sk_for_each(sk, node, head) {
-		struct inet_opt *inet = inet_sk(sk);
+		struct inet_sock *inet = inet_sk(sk);
 
 		if (inet->num == hnum && !ipv6_only_sock(sk)) {
 			__u32 rcv_saddr = inet->rcv_saddr;
@@ -457,7 +457,7 @@
 	read_lock(&tcp_lhash_lock);
 	head = &tcp_listening_hash[tcp_lhashfn(hnum)];
 	if (!hlist_empty(head)) {
-		struct inet_opt *inet = inet_sk((sk = __sk_head(head)));
+		struct inet_sock *inet = inet_sk((sk = __sk_head(head)));
 
 		if (inet->num == hnum && !sk->sk_node.next &&
 		    (!inet->rcv_saddr || inet->rcv_saddr == daddr) &&
@@ -549,7 +549,7 @@
 static int __tcp_v4_check_established(struct sock *sk, __u16 lport,
 				      struct tcp_tw_bucket **twp)
 {
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	u32 daddr = inet->rcv_saddr;
 	u32 saddr = inet->daddr;
 	int dif = sk->sk_bound_dev_if;
@@ -568,7 +568,7 @@
 		tw = (struct tcp_tw_bucket *)sk2;
 
 		if (TCP_IPV4_TW_MATCH(sk2, acookie, saddr, daddr, ports, dif)) {
-			struct tcp_opt *tp = tcp_sk(sk);
+			struct tcp_sock *tp = tcp_sk(sk);
 
 			/* With PAWS, it is safe from the viewpoint
 			   of data integrity. Even without PAWS it
@@ -636,10 +636,18 @@
 	return -EADDRNOTAVAIL;
 }
 
+static inline u32 connect_port_offset(const struct sock *sk)
+{
+	const struct inet_sock *inet = inet_sk(sk);
+
+	return secure_tcp_port_ephemeral(inet->rcv_saddr, inet->daddr, 
+					 inet->dport);
+}
+
 /*
  * Bind a port for a connect operation and hash it.
  */
-static int tcp_v4_hash_connect(struct sock *sk)
+static inline int tcp_v4_hash_connect(struct sock *sk)
 {
 	unsigned short snum = inet_sk(sk)->num;
  	struct tcp_bind_hashbucket *head;
@@ -647,36 +655,20 @@
 	int ret;
 
  	if (!snum) {
- 		int rover;
  		int low = sysctl_local_port_range[0];
  		int high = sysctl_local_port_range[1];
- 		int remaining = (high - low) + 1;
+		int range = high - low;
+ 		int i;
+		int port;
+		static u32 hint;
+		u32 offset = hint + connect_port_offset(sk);
 		struct hlist_node *node;
  		struct tcp_tw_bucket *tw = NULL;
 
  		local_bh_disable();
-
- 		/* TODO. Actually it is not so bad idea to remove
- 		 * tcp_portalloc_lock before next submission to Linus.
- 		 * As soon as we touch this place at all it is time to think.
- 		 *
- 		 * Now it protects single _advisory_ variable tcp_port_rover,
- 		 * hence it is mostly useless.
- 		 * Code will work nicely if we just delete it, but
- 		 * I am afraid in contented case it will work not better or
- 		 * even worse: another cpu just will hit the same bucket
- 		 * and spin there.
- 		 * So some cpu salt could remove both contention and
- 		 * memory pingpong. Any ideas how to do this in a nice way?
- 		 */
- 		spin_lock(&tcp_portalloc_lock);
- 		rover = tcp_port_rover;
-
- 		do {
- 			rover++;
- 			if ((rover < low) || (rover > high))
- 				rover = low;
- 			head = &tcp_bhash[tcp_bhashfn(rover)];
+		for (i = 1; i <= range; i++) {
+			port = low + (i + offset) % range;
+ 			head = &tcp_bhash[tcp_bhashfn(port)];
  			spin_lock(&head->lock);
 
  			/* Does not bother with rcv_saddr checks,
@@ -684,19 +676,19 @@
  			 * unique enough.
  			 */
 			tb_for_each(tb, node, &head->chain) {
- 				if (tb->port == rover) {
+ 				if (tb->port == port) {
  					BUG_TRAP(!hlist_empty(&tb->owners));
  					if (tb->fastreuse >= 0)
  						goto next_port;
  					if (!__tcp_v4_check_established(sk,
-									rover,
+									port,
 									&tw))
  						goto ok;
  					goto next_port;
  				}
  			}
 
- 			tb = tcp_bucket_create(head, rover);
+ 			tb = tcp_bucket_create(head, port);
  			if (!tb) {
  				spin_unlock(&head->lock);
  				break;
@@ -706,22 +698,18 @@
 
  		next_port:
  			spin_unlock(&head->lock);
- 		} while (--remaining > 0);
- 		tcp_port_rover = rover;
- 		spin_unlock(&tcp_portalloc_lock);
-
+ 		}
  		local_bh_enable();
 
  		return -EADDRNOTAVAIL;
 
 ok:
- 		/* All locks still held and bhs disabled */
- 		tcp_port_rover = rover;
- 		spin_unlock(&tcp_portalloc_lock);
+		hint += i;
 
- 		tcp_bind_hash(sk, tb, rover);
+ 		/* Head lock still held and bh's disabled */
+ 		tcp_bind_hash(sk, tb, port);
 		if (sk_unhashed(sk)) {
- 			inet_sk(sk)->sport = htons(rover);
+ 			inet_sk(sk)->sport = htons(port);
  			__tcp_v4_hash(sk, 0);
  		}
  		spin_unlock(&head->lock);
@@ -755,8 +743,8 @@
 /* This will initiate an outgoing connection. */
 int tcp_v4_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len)
 {
-	struct inet_opt *inet = inet_sk(sk);
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	struct sockaddr_in *usin = (struct sockaddr_in *)uaddr;
 	struct rtable *rt;
 	u32 daddr, nexthop;
@@ -879,7 +867,7 @@
 	return (jhash_2words(raddr, (u32) rport, rnd) & (TCP_SYNQ_HSIZE - 1));
 }
 
-static struct open_request *tcp_v4_search_req(struct tcp_opt *tp,
+static struct open_request *tcp_v4_search_req(struct tcp_sock *tp,
 					      struct open_request ***prevp,
 					      __u16 rport,
 					      __u32 raddr, __u32 laddr)
@@ -905,7 +893,7 @@
 
 static void tcp_v4_synq_add(struct sock *sk, struct open_request *req)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	struct tcp_listen_opt *lopt = tp->listen_opt;
 	u32 h = tcp_v4_synq_hash(req->af.v4_req.rmt_addr, req->rmt_port, lopt->hash_rnd);
 
@@ -929,8 +917,8 @@
 				     u32 mtu)
 {
 	struct dst_entry *dst;
-	struct inet_opt *inet = inet_sk(sk);
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 
 	/* We are not interested in TCP_LISTEN and open_requests (SYN-ACKs
 	 * send out by Linux are always <576bytes so they should go through
@@ -991,8 +979,8 @@
 {
 	struct iphdr *iph = (struct iphdr *)skb->data;
 	struct tcphdr *th = (struct tcphdr *)(skb->data + (iph->ihl << 2));
-	struct tcp_opt *tp;
-	struct inet_opt *inet;
+	struct tcp_sock *tp;
+	struct inet_sock *inet;
 	int type = skb->h.icmph->type;
 	int code = skb->h.icmph->code;
 	struct sock *sk;
@@ -1139,7 +1127,7 @@
 void tcp_v4_send_check(struct sock *sk, struct tcphdr *th, int len,
 		       struct sk_buff *skb)
 {
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 
 	if (skb->ip_summed == CHECKSUM_HW) {
 		th->check = ~tcp_v4_check(th, len, inet->saddr, inet->daddr, 0);
@@ -1405,7 +1393,7 @@
 
 int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb)
 {
-	struct tcp_opt tp;
+	struct tcp_sock tp;
 	struct open_request *req;
 	__u32 saddr = skb->nh.iph->saddr;
 	__u32 daddr = skb->nh.iph->daddr;
@@ -1561,8 +1549,8 @@
 				  struct open_request *req,
 				  struct dst_entry *dst)
 {
-	struct inet_opt *newinet;
-	struct tcp_opt *newtp;
+	struct inet_sock *newinet;
+	struct tcp_sock *newtp;
 	struct sock *newsk;
 
 	if (sk_acceptq_is_full(sk))
@@ -1614,7 +1602,7 @@
 {
 	struct tcphdr *th = skb->h.th;
 	struct iphdr *iph = skb->nh.iph;
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	struct sock *nsk;
 	struct open_request **prev;
 	/* Find possible connection requests. */
@@ -1868,7 +1856,7 @@
 
 static int tcp_v4_reselect_saddr(struct sock *sk)
 {
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	int err;
 	struct rtable *rt;
 	__u32 old_saddr = inet->saddr;
@@ -1919,7 +1907,7 @@
 
 int tcp_v4_rebuild_header(struct sock *sk)
 {
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	struct rtable *rt = (struct rtable *)__sk_dst_check(sk, 0);
 	u32 daddr;
 	int err;
@@ -1968,7 +1956,7 @@
 static void v4_addr2sockaddr(struct sock *sk, struct sockaddr * uaddr)
 {
 	struct sockaddr_in *sin = (struct sockaddr_in *) uaddr;
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 
 	sin->sin_family		= AF_INET;
 	sin->sin_addr.s_addr	= inet->daddr;
@@ -1983,8 +1971,8 @@
 
 int tcp_v4_remember_stamp(struct sock *sk)
 {
-	struct inet_opt *inet = inet_sk(sk);
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	struct rtable *rt = (struct rtable *)__sk_dst_get(sk);
 	struct inet_peer *peer = NULL;
 	int release_it = 0;
@@ -2052,7 +2040,7 @@
  */
 static int tcp_v4_init_sock(struct sock *sk)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 
 	skb_queue_head_init(&tp->out_of_order_queue);
 	tcp_init_xmit_timers(sk);
@@ -2094,7 +2082,7 @@
 
 int tcp_v4_destroy_sock(struct sock *sk)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 
 	tcp_clear_xmit_timers(sk);
 
@@ -2143,7 +2131,7 @@
 
 static void *listening_get_next(struct seq_file *seq, void *cur)
 {
-	struct tcp_opt *tp;
+	struct tcp_sock *tp;
 	struct hlist_node *node;
 	struct sock *sk = cur;
 	struct tcp_iter_state* st = seq->private;
@@ -2232,7 +2220,10 @@
 		struct sock *sk;
 		struct hlist_node *node;
 		struct tcp_tw_bucket *tw;
-	       
+
+		/* We can reschedule _before_ having picked the target: */
+		cond_resched_softirq();
+
 		read_lock(&tcp_ehash[st->bucket].lock);
 		sk_for_each(sk, node, &tcp_ehash[st->bucket].chain) {
 			if (sk->sk_family != st->family) {
@@ -2279,6 +2270,10 @@
 		}
 		read_unlock(&tcp_ehash[st->bucket].lock);
 		st->state = TCP_SEQ_STATE_ESTABLISHED;
+
+		/* We can reschedule between buckets: */
+		cond_resched_softirq();
+
 		if (++st->bucket < tcp_ehash_size) {
 			read_lock(&tcp_ehash[st->bucket].lock);
 			sk = sk_head(&tcp_ehash[st->bucket].chain);
@@ -2380,7 +2375,7 @@
 	switch (st->state) {
 	case TCP_SEQ_STATE_OPENREQ:
 		if (v) {
-			struct tcp_opt *tp = tcp_sk(st->syn_wait_sk);
+			struct tcp_sock *tp = tcp_sk(st->syn_wait_sk);
 			read_unlock_bh(&tp->syn_wait_lock);
 		}
 	case TCP_SEQ_STATE_LISTENING:
@@ -2485,8 +2480,8 @@
 {
 	int timer_active;
 	unsigned long timer_expires;
-	struct tcp_opt *tp = tcp_sk(sp);
-	struct inet_opt *inet = inet_sk(sp);
+	struct tcp_sock *tp = tcp_sk(sp);
+	struct inet_sock *inet = inet_sk(sp);
 	unsigned int dest = inet->daddr;
 	unsigned int src = inet->rcv_saddr;
 	__u16 destp = ntohs(inet->dport);
diff -Nru a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c
--- a/net/ipv4/tcp_minisocks.c	2005-01-10 20:11:21 -08:00
+++ b/net/ipv4/tcp_minisocks.c	2005-01-10 20:11:21 -08:00
@@ -41,6 +41,8 @@
 int sysctl_tcp_syncookies = SYNC_INIT; 
 int sysctl_tcp_abort_on_overflow;
 
+static void tcp_tw_schedule(struct tcp_tw_bucket *tw, int timeo);
+
 static __inline__ int tcp_in_window(u32 seq, u32 end_seq, u32 s_win, u32 e_win)
 {
 	if (seq == s_win)
@@ -123,7 +125,7 @@
 tcp_timewait_state_process(struct tcp_tw_bucket *tw, struct sk_buff *skb,
 			   struct tcphdr *th, unsigned len)
 {
-	struct tcp_opt tp;
+	struct tcp_sock tp;
 	int paws_reject = 0;
 
 	tp.saw_tstamp = 0;
@@ -327,7 +329,7 @@
 void tcp_time_wait(struct sock *sk, int state, int timeo)
 {
 	struct tcp_tw_bucket *tw = NULL;
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	int recycle_ok = 0;
 
 	if (sysctl_tcp_tw_recycle && tp->ts_recent_stamp)
@@ -337,7 +339,7 @@
 		tw = kmem_cache_alloc(tcp_timewait_cachep, SLAB_ATOMIC);
 
 	if(tw != NULL) {
-		struct inet_opt *inet = inet_sk(sk);
+		struct inet_sock *inet = inet_sk(sk);
 		int rto = (tp->rto<<2) - (tp->rto>>1);
 
 		/* Give us an identity. */
@@ -551,7 +553,7 @@
 		TIMER_INITIALIZER(tcp_twcal_tick, 0, 0);
 static struct hlist_head tcp_twcal_row[TCP_TW_RECYCLE_SLOTS];
 
-void tcp_tw_schedule(struct tcp_tw_bucket *tw, int timeo)
+static void tcp_tw_schedule(struct tcp_tw_bucket *tw, int timeo)
 {
 	struct hlist_head *list;
 	int slot;
@@ -690,7 +692,7 @@
 	struct sock *newsk = sk_alloc(PF_INET, GFP_ATOMIC, 0, sk->sk_prot->slab);
 
 	if(newsk != NULL) {
-		struct tcp_opt *newtp;
+		struct tcp_sock *newtp;
 		struct sk_filter *filter;
 
 		memcpy(newsk, sk, sizeof(struct tcp_sock));
@@ -734,7 +736,7 @@
 			return NULL;
 		}
 
-		/* Now setup tcp_opt */
+		/* Now setup tcp_sock */
 		newtp = tcp_sk(newsk);
 		newtp->pred_flags = 0;
 		newtp->rcv_nxt = req->rcv_isn + 1;
@@ -858,10 +860,10 @@
 			   struct open_request **prev)
 {
 	struct tcphdr *th = skb->h.th;
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	u32 flg = tcp_flag_word(th) & (TCP_FLAG_RST|TCP_FLAG_SYN|TCP_FLAG_ACK);
 	int paws_reject = 0;
-	struct tcp_opt ttp;
+	struct tcp_sock ttp;
 	struct sock *child;
 
 	ttp.saw_tstamp = 0;
diff -Nru a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
--- a/net/ipv4/tcp_output.c	2005-01-10 20:11:20 -08:00
+++ b/net/ipv4/tcp_output.c	2005-01-10 20:11:20 -08:00
@@ -51,8 +51,8 @@
  */
 int sysctl_tcp_tso_win_divisor = 8;
 
-static __inline__
-void update_send_head(struct sock *sk, struct tcp_opt *tp, struct sk_buff *skb)
+static inline void update_send_head(struct sock *sk, struct tcp_sock *tp,
+				    struct sk_buff *skb)
 {
 	sk->sk_send_head = skb->next;
 	if (sk->sk_send_head == (struct sk_buff *)&sk->sk_write_queue)
@@ -67,7 +67,7 @@
  * Anything in between SND.UNA...SND.UNA+SND.WND also can be already
  * invalid. OK, let's make this for now:
  */
-static __inline__ __u32 tcp_acceptable_seq(struct sock *sk, struct tcp_opt *tp)
+static inline __u32 tcp_acceptable_seq(struct sock *sk, struct tcp_sock *tp)
 {
 	if (!before(tp->snd_una+tp->snd_wnd, tp->snd_nxt))
 		return tp->snd_nxt;
@@ -91,7 +91,7 @@
  */
 static __u16 tcp_advertise_mss(struct sock *sk)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	struct dst_entry *dst = __sk_dst_get(sk);
 	int mss = tp->advmss;
 
@@ -105,7 +105,7 @@
 
 /* RFC2861. Reset CWND after idle period longer RTO to "restart window".
  * This is the first part of cwnd validation mechanism. */
-static void tcp_cwnd_restart(struct tcp_opt *tp, struct dst_entry *dst)
+static void tcp_cwnd_restart(struct tcp_sock *tp, struct dst_entry *dst)
 {
 	s32 delta = tcp_time_stamp - tp->lsndtime;
 	u32 restart_cwnd = tcp_init_cwnd(tp, dst);
@@ -124,7 +124,8 @@
 	tp->snd_cwnd_used = 0;
 }
 
-static __inline__ void tcp_event_data_sent(struct tcp_opt *tp, struct sk_buff *skb, struct sock *sk)
+static inline void tcp_event_data_sent(struct tcp_sock *tp,
+				       struct sk_buff *skb, struct sock *sk)
 {
 	u32 now = tcp_time_stamp;
 
@@ -143,7 +144,7 @@
 
 static __inline__ void tcp_event_ack_sent(struct sock *sk)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 
 	tcp_dec_quickack_mode(tp);
 	tcp_clear_xmit_timer(sk, TCP_TIME_DACK);
@@ -208,14 +209,14 @@
 	(*window_clamp) = min(65535U << (*rcv_wscale), *window_clamp);
 }
 
-/* Chose a new window to advertise, update state in tcp_opt for the
+/* Chose a new window to advertise, update state in tcp_sock for the
  * socket, and return result with RFC1323 scaling applied.  The return
  * value can be stuffed directly into th->window for an outgoing
  * frame.
  */
 static __inline__ u16 tcp_select_window(struct sock *sk)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	u32 cur_win = tcp_receive_window(tp);
 	u32 new_win = __tcp_select_window(sk);
 
@@ -266,8 +267,8 @@
 static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb)
 {
 	if (skb != NULL) {
-		struct inet_opt *inet = inet_sk(sk);
-		struct tcp_opt *tp = tcp_sk(sk);
+		struct inet_sock *inet = inet_sk(sk);
+		struct tcp_sock *tp = tcp_sk(sk);
 		struct tcp_skb_cb *tcb = TCP_SKB_CB(skb);
 		int tcp_header_size = tp->tcp_header_len;
 		struct tcphdr *th;
@@ -396,7 +397,7 @@
  */
 static void tcp_queue_skb(struct sock *sk, struct sk_buff *skb)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 
 	/* Advance write_seq and place onto the write_queue. */
 	tp->write_seq = TCP_SKB_CB(skb)->end_seq;
@@ -413,7 +414,7 @@
  */
 void tcp_push_one(struct sock *sk, unsigned cur_mss)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	struct sk_buff *skb = sk->sk_send_head;
 
 	if (tcp_snd_test(tp, skb, cur_mss, TCP_NAGLE_PUSH)) {
@@ -453,7 +454,7 @@
  */
 static int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	struct sk_buff *buff;
 	int nsize;
 	u16 flags;
@@ -619,7 +620,7 @@
 
 unsigned int tcp_sync_mss(struct sock *sk, u32 pmtu)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	struct dst_entry *dst = __sk_dst_get(sk);
 	int mss_now;
 
@@ -666,7 +667,7 @@
 
 unsigned int tcp_current_mss(struct sock *sk, int large)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	struct dst_entry *dst = __sk_dst_get(sk);
 	unsigned int do_large, mss_now;
 
@@ -727,7 +728,7 @@
  */
 int tcp_write_xmit(struct sock *sk, int nonagle)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	unsigned int mss_now;
 
 	/* If we are closed, the bytes will have to remain here.
@@ -831,7 +832,7 @@
  */
 u32 __tcp_select_window(struct sock *sk)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	/* MSS for the peer's data.  Previous verions used mss_clamp
 	 * here.  I don't know if the value based on our guesses
 	 * of peer's MSS is better for the performance.  It's more correct
@@ -892,7 +893,7 @@
 /* Attempt to collapse two adjacent SKB's during retransmission. */
 static void tcp_retrans_try_collapse(struct sock *sk, struct sk_buff *skb, int mss_now)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	struct sk_buff *next_skb = skb->next;
 
 	/* The first test we must make is that neither of these two
@@ -970,7 +971,7 @@
  */ 
 void tcp_simple_retransmit(struct sock *sk)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	struct sk_buff *skb;
 	unsigned int mss = tcp_current_mss(sk, 0);
 	int lost = 0;
@@ -1016,7 +1017,7 @@
  */
 int tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
  	unsigned int cur_mss = tcp_current_mss(sk, 0);
 	int err;
 
@@ -1140,7 +1141,7 @@
  */
 void tcp_xmit_retransmit_queue(struct sock *sk)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	struct sk_buff *skb;
 	int packet_cnt = tcp_get_pcount(&tp->lost_out);
 
@@ -1235,7 +1236,7 @@
  */
 void tcp_send_fin(struct sock *sk)
 {
-	struct tcp_opt *tp = tcp_sk(sk);	
+	struct tcp_sock *tp = tcp_sk(sk);	
 	struct sk_buff *skb = skb_peek_tail(&sk->sk_write_queue);
 	int mss_now;
 	
@@ -1281,7 +1282,7 @@
  */
 void tcp_send_active_reset(struct sock *sk, int priority)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	struct sk_buff *skb;
 
 	/* NOTE: No TCP options attached and we never retransmit this. */
@@ -1346,7 +1347,7 @@
 struct sk_buff * tcp_make_synack(struct sock *sk, struct dst_entry *dst,
 				 struct open_request *req)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	struct tcphdr *th;
 	int tcp_header_size;
 	struct sk_buff *skb;
@@ -1417,7 +1418,7 @@
 static inline void tcp_connect_init(struct sock *sk)
 {
 	struct dst_entry *dst = __sk_dst_get(sk);
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 
 	/* We'll fix this up when we get a response from the other end.
 	 * See tcp_input.c:tcp_rcv_state_process case TCP_SYN_SENT.
@@ -1466,7 +1467,7 @@
  */ 
 int tcp_connect(struct sock *sk)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	struct sk_buff *buff;
 
 	tcp_connect_init(sk);
@@ -1510,7 +1511,7 @@
  */
 void tcp_send_delayed_ack(struct sock *sk)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	int ato = tp->ack.ato;
 	unsigned long timeout;
 
@@ -1562,7 +1563,7 @@
 {
 	/* If we have been reset, we may not send again. */
 	if (sk->sk_state != TCP_CLOSE) {
-		struct tcp_opt *tp = tcp_sk(sk);
+		struct tcp_sock *tp = tcp_sk(sk);
 		struct sk_buff *buff;
 
 		/* We are not putting this on the write queue, so
@@ -1605,7 +1606,7 @@
  */
 static int tcp_xmit_probe_skb(struct sock *sk, int urgent)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	struct sk_buff *skb;
 
 	/* We don't queue it, tcp_transmit_skb() sets ownership. */
@@ -1634,7 +1635,7 @@
 int tcp_write_wakeup(struct sock *sk)
 {
 	if (sk->sk_state != TCP_CLOSE) {
-		struct tcp_opt *tp = tcp_sk(sk);
+		struct tcp_sock *tp = tcp_sk(sk);
 		struct sk_buff *skb;
 
 		if ((skb = sk->sk_send_head) != NULL &&
@@ -1688,7 +1689,7 @@
  */
 void tcp_send_probe0(struct sock *sk)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	int err;
 
 	err = tcp_write_wakeup(sk);
diff -Nru a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c
--- a/net/ipv4/tcp_timer.c	2005-01-10 20:11:22 -08:00
+++ b/net/ipv4/tcp_timer.c	2005-01-10 20:11:22 -08:00
@@ -48,7 +48,7 @@
 
 void tcp_init_xmit_timers(struct sock *sk)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 
 	init_timer(&tp->retransmit_timer);
 	tp->retransmit_timer.function=&tcp_write_timer;
@@ -67,7 +67,7 @@
 
 void tcp_clear_xmit_timers(struct sock *sk)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 
 	tp->pending = 0;
 	sk_stop_timer(sk, &tp->retransmit_timer);
@@ -101,7 +101,7 @@
  */
 static int tcp_out_of_resources(struct sock *sk, int do_reset)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	int orphans = atomic_read(&tcp_orphan_count);
 
 	/* If peer does not open window for long time, or did not transmit 
@@ -154,7 +154,7 @@
 /* A write timeout has occurred. Process the after effects. */
 static int tcp_write_timeout(struct sock *sk)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	int retry_until;
 
 	if ((1 << sk->sk_state) & (TCPF_SYN_SENT | TCPF_SYN_RECV)) {
@@ -208,7 +208,7 @@
 static void tcp_delack_timer(unsigned long data)
 {
 	struct sock *sk = (struct sock*)data;
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 
 	bh_lock_sock(sk);
 	if (sock_owned_by_user(sk)) {
@@ -268,7 +268,7 @@
 
 static void tcp_probe_timer(struct sock *sk)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	int max_probes;
 
 	if (tcp_get_pcount(&tp->packets_out) || !sk->sk_send_head) {
@@ -316,7 +316,7 @@
 
 static void tcp_retransmit_timer(struct sock *sk)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 
 	if (!tcp_get_pcount(&tp->packets_out))
 		goto out;
@@ -332,7 +332,7 @@
 		 */
 #ifdef TCP_DEBUG
 		if (net_ratelimit()) {
-			struct inet_opt *inet = inet_sk(sk);
+			struct inet_sock *inet = inet_sk(sk);
 			printk(KERN_DEBUG "TCP: Treason uncloaked! Peer %u.%u.%u.%u:%u/%u shrinks window %u:%u. Repaired.\n",
 			       NIPQUAD(inet->daddr), htons(inet->dport),
 			       inet->num, tp->snd_una, tp->snd_nxt);
@@ -418,7 +418,7 @@
 static void tcp_write_timer(unsigned long data)
 {
 	struct sock *sk = (struct sock*)data;
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	int event;
 
 	bh_lock_sock(sk);
@@ -462,7 +462,7 @@
 
 static void tcp_synack_timer(struct sock *sk)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	struct tcp_listen_opt *lopt = tp->listen_opt;
 	int max_retries = tp->syn_retries ? : sysctl_tcp_synack_retries;
 	int thresh = max_retries;
@@ -573,7 +573,7 @@
 static void tcp_keepalive_timer (unsigned long data)
 {
 	struct sock *sk = (struct sock *) data;
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	__u32 elapsed;
 
 	/* Only process if socket is not in use. */
@@ -653,6 +653,3 @@
 EXPORT_SYMBOL(tcp_delete_keepalive_timer);
 EXPORT_SYMBOL(tcp_init_xmit_timers);
 EXPORT_SYMBOL(tcp_reset_keepalive_timer);
-#ifdef TCP_DEBUG
-EXPORT_SYMBOL(tcp_timer_bug_msg);
-#endif
diff -Nru a/net/ipv4/udp.c b/net/ipv4/udp.c
--- a/net/ipv4/udp.c	2005-01-10 20:11:16 -08:00
+++ b/net/ipv4/udp.c	2005-01-10 20:11:16 -08:00
@@ -124,7 +124,7 @@
 {
 	struct hlist_node *node;
 	struct sock *sk2;
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 
 	write_lock_bh(&udp_hash_lock);
 	if (snum == 0) {
@@ -171,7 +171,7 @@
 	} else {
 		sk_for_each(sk2, node,
 			    &udp_hash[snum & (UDP_HTABLE_SIZE - 1)]) {
-			struct inet_opt *inet2 = inet_sk(sk2);
+			struct inet_sock *inet2 = inet_sk(sk2);
 
 			if (inet2->num == snum &&
 			    sk2 != sk &&
@@ -219,7 +219,8 @@
 /* UDP is nearly always wildcards out the wazoo, it makes no sense to try
  * harder than this. -DaveM
  */
-struct sock *udp_v4_lookup_longway(u32 saddr, u16 sport, u32 daddr, u16 dport, int dif)
+static struct sock *udp_v4_lookup_longway(u32 saddr, u16 sport,
+					  u32 daddr, u16 dport, int dif)
 {
 	struct sock *sk, *result = NULL;
 	struct hlist_node *node;
@@ -227,7 +228,7 @@
 	int badness = -1;
 
 	sk_for_each(sk, node, &udp_hash[hnum & (UDP_HTABLE_SIZE - 1)]) {
-		struct inet_opt *inet = inet_sk(sk);
+		struct inet_sock *inet = inet_sk(sk);
 
 		if (inet->num == hnum && !ipv6_only_sock(sk)) {
 			int score = (sk->sk_family == PF_INET ? 1 : 0);
@@ -263,7 +264,8 @@
 	return result;
 }
 
-__inline__ struct sock *udp_v4_lookup(u32 saddr, u16 sport, u32 daddr, u16 dport, int dif)
+static __inline__ struct sock *udp_v4_lookup(u32 saddr, u16 sport,
+					     u32 daddr, u16 dport, int dif)
 {
 	struct sock *sk;
 
@@ -285,7 +287,7 @@
 	unsigned short hnum = ntohs(loc_port);
 
 	sk_for_each_from(s, node) {
-		struct inet_opt *inet = inet_sk(s);
+		struct inet_sock *inet = inet_sk(s);
 
 		if (inet->num != hnum					||
 		    (inet->daddr && inet->daddr != rmt_addr)		||
@@ -316,7 +318,7 @@
 
 void udp_err(struct sk_buff *skb, u32 info)
 {
-	struct inet_opt *inet;
+	struct inet_sock *inet;
 	struct iphdr *iph = (struct iphdr*)skb->data;
 	struct udphdr *uh = (struct udphdr*)(skb->data+(iph->ihl<<2));
 	int type = skb->h.icmph->type;
@@ -398,7 +400,7 @@
  */
 static int udp_push_pending_frames(struct sock *sk, struct udp_opt *up)
 {
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	struct flowi *fl = &inet->cork.fl;
 	struct sk_buff *skb;
 	struct udphdr *uh;
@@ -480,7 +482,7 @@
 int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
 		size_t len)
 {
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	struct udp_opt *up = udp_sk(sk);
 	int ulen = len;
 	struct ipcm_cookie ipc;
@@ -667,7 +669,8 @@
 	goto out;
 }
 
-int udp_sendpage(struct sock *sk, struct page *page, int offset, size_t size, int flags)
+static int udp_sendpage(struct sock *sk, struct page *page, int offset,
+			size_t size, int flags)
 {
 	struct udp_opt *up = udp_sk(sk);
 	int ret;
@@ -770,10 +773,10 @@
  * 	return it, otherwise we block.
  */
 
-int udp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
-		size_t len, int noblock, int flags, int *addr_len)
+static int udp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
+		       size_t len, int noblock, int flags, int *addr_len)
 {
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
   	struct sockaddr_in *sin = (struct sockaddr_in *)msg->msg_name;
   	struct sk_buff *skb;
   	int copied, err;
@@ -864,7 +867,7 @@
 
 int udp_disconnect(struct sock *sk, int flags)
 {
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	/*
 	 *	1003.1g - break association.
 	 */
@@ -1503,7 +1506,7 @@
 /* ------------------------------------------------------------------------ */
 static void udp4_format_sock(struct sock *sp, char *tmpbuf, int bucket)
 {
-	struct inet_opt *inet = inet_sk(sp);
+	struct inet_sock *inet = inet_sk(sp);
 	unsigned int dest = inet->daddr;
 	unsigned int src  = inet->rcv_saddr;
 	__u16 destp	  = ntohs(inet->dport);
diff -Nru a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c
--- a/net/ipv4/xfrm4_policy.c	2005-01-10 20:11:21 -08:00
+++ b/net/ipv4/xfrm4_policy.c	2005-01-10 20:11:21 -08:00
@@ -279,10 +279,3 @@
 	xfrm4_policy_init();
 }
 
-void __exit xfrm4_fini(void)
-{
-	//xfrm4_input_fini();
-	xfrm4_policy_fini();
-	xfrm4_state_fini();
-}
-
diff -Nru a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
--- a/net/ipv6/addrconf.c	2005-01-10 20:11:22 -08:00
+++ b/net/ipv6/addrconf.c	2005-01-10 20:11:22 -08:00
@@ -48,6 +48,7 @@
 #include <linux/netdevice.h>
 #include <linux/if_arp.h>
 #include <linux/if_arcnet.h>
+#include <linux/if_infiniband.h>
 #include <linux/route.h>
 #include <linux/inetdevice.h>
 #include <linux/init.h>
@@ -1095,6 +1096,12 @@
 		memset(eui, 0, 7);
 		eui[7] = *(u8*)dev->dev_addr;
 		return 0;
+	case ARPHRD_INFINIBAND:
+		if (dev->addr_len != INFINIBAND_ALEN)
+			return -1;
+		memcpy(eui, dev->dev_addr + 12, 8);
+		eui[0] |= 2;
+		return 0;
 	}
 	return -1;
 }
@@ -1794,7 +1801,8 @@
 	if ((dev->type != ARPHRD_ETHER) && 
 	    (dev->type != ARPHRD_FDDI) &&
 	    (dev->type != ARPHRD_IEEE802_TR) &&
-	    (dev->type != ARPHRD_ARCNET)) {
+	    (dev->type != ARPHRD_ARCNET) &&
+	    (dev->type != ARPHRD_INFINIBAND)) {
 		/* Alas, we support only Ethernet autoconfiguration. */
 		return;
 	}
diff -Nru a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
--- a/net/ipv6/af_inet6.c	2005-01-10 20:11:19 -08:00
+++ b/net/ipv6/af_inet6.c	2005-01-10 20:11:19 -08:00
@@ -114,10 +114,9 @@
 
 static int inet6_create(struct socket *sock, int protocol)
 {
-	struct inet_opt *inet;
+	struct inet_sock *inet;
 	struct ipv6_pinfo *np;
 	struct sock *sk;
-	struct tcp6_sock* tcp6sk;
 	struct list_head *p;
 	struct inet_protosw *answer;
 	struct proto *answer_prot;
@@ -196,8 +195,7 @@
 
 	sk->sk_backlog_rcv	= answer->prot->backlog_rcv;
 
-	tcp6sk		= (struct tcp6_sock *)sk;
-	tcp6sk->pinet6 = np = inet6_sk_generic(sk);
+	inet_sk(sk)->pinet6 = np = inet6_sk_generic(sk);
 	np->hop_limit	= -1;
 	np->mcast_hops	= -1;
 	np->mc_loop	= 1;
@@ -252,7 +250,7 @@
 {
 	struct sockaddr_in6 *addr=(struct sockaddr_in6 *)uaddr;
 	struct sock *sk = sock->sk;
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	struct ipv6_pinfo *np = inet6_sk(sk);
 	__u32 v4addr = 0;
 	unsigned short snum;
@@ -410,7 +408,7 @@
 {
 	struct sockaddr_in6 *sin=(struct sockaddr_in6 *)uaddr;
 	struct sock *sk = sock->sk;
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	struct ipv6_pinfo *np = inet6_sk(sk);
   
 	sin->sin6_family = AF_INET6;
diff -Nru a/net/ipv6/datagram.c b/net/ipv6/datagram.c
--- a/net/ipv6/datagram.c	2005-01-10 20:11:16 -08:00
+++ b/net/ipv6/datagram.c	2005-01-10 20:11:16 -08:00
@@ -36,7 +36,7 @@
 int ip6_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len)
 {
 	struct sockaddr_in6	*usin = (struct sockaddr_in6 *) uaddr;
-	struct inet_opt      	*inet = inet_sk(sk);
+	struct inet_sock      	*inet = inet_sk(sk);
 	struct ipv6_pinfo      	*np = inet6_sk(sk);
 	struct in6_addr		*daddr, *final_p = NULL, final;
 	struct dst_entry	*dst;
@@ -335,7 +335,7 @@
 			if (ipv6_addr_type(&sin->sin6_addr) & IPV6_ADDR_LINKLOCAL)
 				sin->sin6_scope_id = IP6CB(skb)->iif;
 		} else {
-			struct inet_opt *inet = inet_sk(sk);
+			struct inet_sock *inet = inet_sk(sk);
 
 			ipv6_addr_set(&sin->sin6_addr, 0, 0,
 				      htonl(0xffff),
diff -Nru a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
--- a/net/ipv6/ip6_output.c	2005-01-10 20:11:16 -08:00
+++ b/net/ipv6/ip6_output.c	2005-01-10 20:11:16 -08:00
@@ -809,7 +809,7 @@
 		    int hlimit, struct ipv6_txoptions *opt, struct flowi *fl, struct rt6_info *rt,
 		    unsigned int flags)
 {
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	struct ipv6_pinfo *np = inet6_sk(sk);
 	struct sk_buff *skb;
 	unsigned int maxfraglen, fragheaderlen;
@@ -1087,7 +1087,7 @@
 	struct sk_buff *skb, *tmp_skb;
 	struct sk_buff **tail_skb;
 	struct in6_addr final_dst_buf, *final_dst = &final_dst_buf;
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	struct ipv6_pinfo *np = inet6_sk(sk);
 	struct ipv6hdr *hdr;
 	struct ipv6_txoptions *opt = np->cork.opt;
@@ -1165,7 +1165,7 @@
 
 void ip6_flush_pending_frames(struct sock *sk)
 {
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	struct ipv6_pinfo *np = inet6_sk(sk);
 	struct sk_buff *skb;
 
diff -Nru a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c
--- a/net/ipv6/ipv6_sockglue.c	2005-01-10 20:11:16 -08:00
+++ b/net/ipv6/ipv6_sockglue.c	2005-01-10 20:11:16 -08:00
@@ -164,7 +164,7 @@
 			ipv6_sock_mc_close(sk);
 
 			if (sk->sk_protocol == IPPROTO_TCP) {
-				struct tcp_opt *tp = tcp_sk(sk);
+				struct tcp_sock *tp = tcp_sk(sk);
 
 				local_bh_disable();
 				sock_prot_dec_use(sk->sk_prot);
@@ -281,7 +281,7 @@
 		retv = 0;
 		if (sk->sk_type == SOCK_STREAM) {
 			if (opt) {
-				struct tcp_opt *tp = tcp_sk(sk);
+				struct tcp_sock *tp = tcp_sk(sk);
 				if (!((1 << sk->sk_state) &
 				      (TCPF_LISTEN | TCPF_CLOSE))
 				    && inet_sk(sk)->daddr != LOOPBACK4_IPV6) {
diff -Nru a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
--- a/net/ipv6/ndisc.c	2005-01-10 20:11:20 -08:00
+++ b/net/ipv6/ndisc.c	2005-01-10 20:11:20 -08:00
@@ -260,6 +260,9 @@
 	case ARPHRD_ARCNET:
 		ipv6_arcnet_mc_map(addr, buf);
 		return 0;
+	case ARPHRD_INFINIBAND:
+		ipv6_ib_mc_map(addr, buf);
+		return 0;
 	default:
 		if (dir) {
 			memcpy(buf, dev->broadcast, dev->addr_len);
diff -Nru a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c
--- a/net/ipv6/netfilter/ip6_tables.c	2005-01-10 20:11:22 -08:00
+++ b/net/ipv6/netfilter/ip6_tables.c	2005-01-10 20:11:22 -08:00
@@ -1222,11 +1222,12 @@
 	IP6T_ENTRY_ITERATE(oldinfo->entries, oldinfo->size, cleanup_entry,NULL);
 	vfree(oldinfo);
 	/* Silent error: too late now. */
-	copy_to_user(tmp.counters, counters,
-		     sizeof(struct ip6t_counters) * tmp.num_counters);
+	if (copy_to_user(tmp.counters, counters,
+			 sizeof(struct ip6t_counters) * tmp.num_counters) != 0)
+		ret = -EFAULT;
 	vfree(counters);
 	up(&ip6t_mutex);
-	return 0;
+	return ret;
 
  put_module:
 	module_put(t->me);
diff -Nru a/net/ipv6/raw.c b/net/ipv6/raw.c
--- a/net/ipv6/raw.c	2005-01-10 20:11:18 -08:00
+++ b/net/ipv6/raw.c	2005-01-10 20:11:18 -08:00
@@ -178,7 +178,7 @@
 /* This cleans up af_inet6 a bit. -DaveM */
 static int rawv6_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len)
 {
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	struct ipv6_pinfo *np = inet6_sk(sk);
 	struct sockaddr_in6 *addr = (struct sockaddr_in6 *) uaddr;
 	__u32 v4addr = 0;
@@ -253,7 +253,7 @@
 	       struct inet6_skb_parm *opt,
 	       int type, int code, int offset, u32 info)
 {
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	struct ipv6_pinfo *np = inet6_sk(sk);
 	int err;
 	int harderr;
@@ -314,7 +314,7 @@
  */
 int rawv6_rcv(struct sock *sk, struct sk_buff *skb)
 {
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	struct raw6_opt *raw_opt = raw6_sk(sk);
 
         if (!xfrm6_policy_check(sk, XFRM_POLICY_IN, skb)) {
@@ -505,7 +505,7 @@
 			struct flowi *fl, struct rt6_info *rt, 
 			unsigned int flags)
 {
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	struct ipv6hdr *iph;
 	struct sk_buff *skb;
 	unsigned int hh_len;
@@ -607,7 +607,7 @@
 	struct ipv6_txoptions opt_space;
 	struct sockaddr_in6 * sin6 = (struct sockaddr_in6 *) msg->msg_name;
 	struct in6_addr *daddr, *final_p = NULL, final;
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	struct ipv6_pinfo *np = inet6_sk(sk);
 	struct raw6_opt *raw_opt = raw6_sk(sk);
 	struct ipv6_txoptions *opt = NULL;
diff -Nru a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
--- a/net/ipv6/tcp_ipv6.c	2005-01-10 20:11:19 -08:00
+++ b/net/ipv6/tcp_ipv6.c	2005-01-10 20:11:19 -08:00
@@ -89,7 +89,7 @@
 
 static __inline__ int tcp_v6_sk_hashfn(struct sock *sk)
 {
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	struct ipv6_pinfo *np = inet6_sk(sk);
 	struct in6_addr *laddr = &np->rcv_saddr;
 	struct in6_addr *faddr = &np->daddr;
@@ -235,7 +235,7 @@
 static void tcp_v6_hash(struct sock *sk)
 {
 	if (sk->sk_state != TCP_CLOSE) {
-		struct tcp_opt *tp = tcp_sk(sk);
+		struct tcp_sock *tp = tcp_sk(sk);
 
 		if (tp->af_specific == &ipv6_mapped) {
 			tcp_prot.hash(sk);
@@ -391,7 +391,7 @@
 	return c & (TCP_SYNQ_HSIZE - 1);
 }
 
-static struct open_request *tcp_v6_search_req(struct tcp_opt *tp,
+static struct open_request *tcp_v6_search_req(struct tcp_sock *tp,
 					      struct open_request ***prevp,
 					      __u16 rport,
 					      struct in6_addr *raddr,
@@ -443,7 +443,7 @@
 
 static int tcp_v6_check_established(struct sock *sk)
 {
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	struct ipv6_pinfo *np = inet6_sk(sk);
 	struct in6_addr *daddr = &np->rcv_saddr;
 	struct in6_addr *saddr = &np->daddr;
@@ -466,7 +466,7 @@
 		   ipv6_addr_equal(&tw->tw_v6_daddr, saddr)	&&
 		   ipv6_addr_equal(&tw->tw_v6_rcv_saddr, daddr)	&&
 		   sk2->sk_bound_dev_if == sk->sk_bound_dev_if) {
-			struct tcp_opt *tp = tcp_sk(sk);
+			struct tcp_sock *tp = tcp_sk(sk);
 
 			if (tw->tw_ts_recent_stamp) {
 				/* See comment in tcp_ipv4.c */
@@ -549,9 +549,9 @@
 			  int addr_len)
 {
 	struct sockaddr_in6 *usin = (struct sockaddr_in6 *) uaddr;
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	struct ipv6_pinfo *np = inet6_sk(sk);
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	struct in6_addr *saddr = NULL, *final_p = NULL, final;
 	struct flowi fl;
 	struct dst_entry *dst;
@@ -741,7 +741,7 @@
 	struct ipv6_pinfo *np;
 	struct sock *sk;
 	int err;
-	struct tcp_opt *tp; 
+	struct tcp_sock *tp; 
 	__u32 seq;
 
 	sk = tcp_v6_lookup(&hdr->daddr, th->dest, &hdr->saddr, th->source, skb->dev->ifindex);
@@ -785,7 +785,7 @@
 		dst = __sk_dst_check(sk, np->dst_cookie);
 
 		if (dst == NULL) {
-			struct inet_opt *inet = inet_sk(sk);
+			struct inet_sock *inet = inet_sk(sk);
 			struct flowi fl;
 
 			/* BUGGG_FUTURE: Again, it is not clear how
@@ -1146,7 +1146,7 @@
 {
 	struct open_request *req, **prev;
 	struct tcphdr *th = skb->h.th;
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	struct sock *nsk;
 
 	/* Find possible connection requests. */
@@ -1179,7 +1179,7 @@
 
 static void tcp_v6_synq_add(struct sock *sk, struct open_request *req)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 	struct tcp_listen_opt *lopt = tp->listen_opt;
 	u32 h = tcp_v6_synq_hash(&req->af.v6_req.rmt_addr, req->rmt_port, lopt->hash_rnd);
 
@@ -1202,7 +1202,7 @@
 static int tcp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
 {
 	struct ipv6_pinfo *np = inet6_sk(sk);
-	struct tcp_opt tmptp, *tp = tcp_sk(sk);
+	struct tcp_sock tmptp, *tp = tcp_sk(sk);
 	struct open_request *req = NULL;
 	__u32 isn = TCP_SKB_CB(skb)->when;
 
@@ -1281,8 +1281,8 @@
 {
 	struct ipv6_pinfo *newnp, *np = inet6_sk(sk);
 	struct tcp6_sock *newtcp6sk;
-	struct inet_opt *newinet;
-	struct tcp_opt *newtp;
+	struct inet_sock *newinet;
+	struct tcp_sock *newtp;
 	struct sock *newsk;
 	struct ipv6_txoptions *opt;
 
@@ -1297,7 +1297,7 @@
 			return NULL;
 
 		newtcp6sk = (struct tcp6_sock *)newsk;
-		newtcp6sk->pinet6 = &newtcp6sk->inet6;
+		inet_sk(newsk)->pinet6 = &newtcp6sk->inet6;
 
 		newinet = inet_sk(newsk);
 		newnp = inet6_sk(newsk);
@@ -1390,7 +1390,7 @@
 		~(NETIF_F_IP_CSUM | NETIF_F_TSO);
 
 	newtcp6sk = (struct tcp6_sock *)newsk;
-	newtcp6sk->pinet6 = &newtcp6sk->inet6;
+	inet_sk(newsk)->pinet6 = &newtcp6sk->inet6;
 
 	newtp = tcp_sk(newsk);
 	newinet = inet_sk(newsk);
@@ -1497,7 +1497,7 @@
 static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)
 {
 	struct ipv6_pinfo *np = inet6_sk(sk);
-	struct tcp_opt *tp;
+	struct tcp_sock *tp;
 	struct sk_buff *opt_skb = NULL;
 
 	/* Imagine: socket is IPv6. IPv4 packet arrives,
@@ -1754,7 +1754,7 @@
 	dst = __sk_dst_check(sk, np->dst_cookie);
 
 	if (dst == NULL) {
-		struct inet_opt *inet = inet_sk(sk);
+		struct inet_sock *inet = inet_sk(sk);
 		struct in6_addr *final_p = NULL, final;
 		struct flowi fl;
 
@@ -1800,7 +1800,7 @@
 static int tcp_v6_xmit(struct sk_buff *skb, int ipfragok)
 {
 	struct sock *sk = skb->sk;
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	struct ipv6_pinfo *np = inet6_sk(sk);
 	struct flowi fl;
 	struct dst_entry *dst;
@@ -1919,7 +1919,7 @@
  */
 static int tcp_v6_init_sock(struct sock *sk)
 {
-	struct tcp_opt *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 
 	skb_queue_head_init(&tp->out_of_order_queue);
 	tcp_init_xmit_timers(sk);
@@ -2006,8 +2006,8 @@
 	__u16 destp, srcp;
 	int timer_active;
 	unsigned long timer_expires;
-	struct inet_opt *inet = inet_sk(sp);
-	struct tcp_opt *tp = tcp_sk(sp);
+	struct inet_sock *inet = inet_sk(sp);
+	struct tcp_sock *tp = tcp_sk(sp);
 	struct ipv6_pinfo *np = inet6_sk(sp);
 
 	dest  = &np->daddr;
diff -Nru a/net/ipv6/udp.c b/net/ipv6/udp.c
--- a/net/ipv6/udp.c	2005-01-10 20:11:21 -08:00
+++ b/net/ipv6/udp.c	2005-01-10 20:11:21 -08:00
@@ -160,7 +160,7 @@
 
  	read_lock(&udp_hash_lock);
 	sk_for_each(sk, node, &udp_hash[hnum & (UDP_HTABLE_SIZE - 1)]) {
-		struct inet_opt *inet = inet_sk(sk);
+		struct inet_sock *inet = inet_sk(sk);
 
 		if (inet->num == hnum && sk->sk_family == PF_INET6) {
 			struct ipv6_pinfo *np = inet6_sk(sk);
@@ -269,7 +269,7 @@
 		sin6->sin6_scope_id = 0;
 
 		if (skb->protocol == htons(ETH_P_IP)) {
-			struct inet_opt *inet = inet_sk(sk);
+			struct inet_sock *inet = inet_sk(sk);
 
 			ipv6_addr_set(&sin6->sin6_addr, 0, 0,
 				      htonl(0xffff), skb->nh.iph->saddr);
@@ -386,7 +386,7 @@
 	unsigned short num = ntohs(loc_port);
 
 	sk_for_each_from(s, node) {
-		struct inet_opt *inet = inet_sk(s);
+		struct inet_sock *inet = inet_sk(s);
 
 		if (inet->num == num && s->sk_family == PF_INET6) {
 			struct ipv6_pinfo *np = inet6_sk(s);
@@ -566,7 +566,7 @@
 {
 	struct sk_buff *skb;
 	struct udphdr *uh;
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	struct flowi *fl = &inet->cork.fl;
 	int err = 0;
 
@@ -624,7 +624,7 @@
 {
 	struct ipv6_txoptions opt_space;
 	struct udp_opt *up = udp_sk(sk);
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	struct ipv6_pinfo *np = inet6_sk(sk);
 	struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) msg->msg_name;
 	struct in6_addr *daddr, *final_p = NULL, final;
@@ -970,7 +970,7 @@
 
 static void udp6_sock_seq_show(struct seq_file *seq, struct sock *sp, int bucket)
 {
-	struct inet_opt *inet = inet_sk(sp);
+	struct inet_sock *inet = inet_sk(sp);
 	struct ipv6_pinfo *np = inet6_sk(sp);
 	struct in6_addr *dest, *src;
 	__u16 destp, srcp;
diff -Nru a/net/ipx/af_ipx.c b/net/ipx/af_ipx.c
--- a/net/ipx/af_ipx.c	2005-01-10 20:11:16 -08:00
+++ b/net/ipx/af_ipx.c	2005-01-10 20:11:16 -08:00
@@ -291,7 +291,7 @@
 }
 #endif
 
-void __ipxitf_down(struct ipx_interface *intrfc)
+static void __ipxitf_down(struct ipx_interface *intrfc)
 {
 	struct sock *s;
 	struct hlist_node *node, *t;
@@ -335,6 +335,12 @@
 	spin_unlock_bh(&ipx_interfaces_lock);
 }
 
+static __inline__ void __ipxitf_put(struct ipx_interface *intrfc)
+{
+	if (atomic_dec_and_test(&intrfc->refcnt))
+		__ipxitf_down(intrfc);
+}
+
 static int ipxitf_device_event(struct notifier_block *notifier,
 				unsigned long event, void *ptr)
 {
@@ -1629,7 +1635,7 @@
 	return rc;
 }
 
-int ipx_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt)
+static int ipx_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt)
 {
 	/* NULL here for pt means the packet was looped back */
 	struct ipx_interface *intrfc;
diff -Nru a/net/ipx/ipx_proc.c b/net/ipx/ipx_proc.c
--- a/net/ipx/ipx_proc.c	2005-01-10 20:11:15 -08:00
+++ b/net/ipx/ipx_proc.c	2005-01-10 20:11:15 -08:00
@@ -287,21 +287,21 @@
 	return 0;
 }
 
-struct seq_operations ipx_seq_interface_ops = {
+static struct seq_operations ipx_seq_interface_ops = {
 	.start  = ipx_seq_interface_start,
 	.next   = ipx_seq_interface_next,
 	.stop   = ipx_seq_interface_stop,
 	.show   = ipx_seq_interface_show,
 };
 
-struct seq_operations ipx_seq_route_ops = {
+static struct seq_operations ipx_seq_route_ops = {
 	.start  = ipx_seq_route_start,
 	.next   = ipx_seq_route_next,
 	.stop   = ipx_seq_route_stop,
 	.show   = ipx_seq_route_show,
 };
 
-struct seq_operations ipx_seq_socket_ops = {
+static struct seq_operations ipx_seq_socket_ops = {
 	.start  = ipx_seq_socket_start,
 	.next   = ipx_seq_socket_next,
 	.stop   = ipx_seq_interface_stop,
diff -Nru a/net/irda/af_irda.c b/net/irda/af_irda.c
--- a/net/irda/af_irda.c	2005-01-10 20:11:17 -08:00
+++ b/net/irda/af_irda.c	2005-01-10 20:11:17 -08:00
@@ -298,7 +298,7 @@
  *    Accept incoming connection
  *
  */
-void irda_connect_response(struct irda_sock *self)
+static void irda_connect_response(struct irda_sock *self)
 {
 	struct sk_buff *skb;
 
@@ -1155,7 +1155,7 @@
  *    Destroy socket
  *
  */
-void irda_destroy_socket(struct irda_sock *self)
+static void irda_destroy_socket(struct irda_sock *self)
 {
 	IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self);
 
diff -Nru a/net/irda/discovery.c b/net/irda/discovery.c
--- a/net/irda/discovery.c	2005-01-10 20:11:17 -08:00
+++ b/net/irda/discovery.c	2005-01-10 20:11:17 -08:00
@@ -315,41 +315,6 @@
 	return(buffer);
 }
 
-/*
- * Function irlmp_find_device (name, saddr)
- *
- *    Look through the discovery log at each of the links and try to find 
- *    the device with the given name. Return daddr and saddr. If saddr is
- *    specified, that look at that particular link only (not impl).
- */
-__u32 irlmp_find_device(hashbin_t *cachelog, char *name, __u32 *saddr)
-{
-	unsigned long flags;
-	discovery_t *d;
-
-	spin_lock_irqsave(&cachelog->hb_spinlock, flags);
-
-	/* Look at all discoveries for that link */
-	d = (discovery_t *) hashbin_get_first(cachelog);
-	while (d != NULL) {
-		IRDA_DEBUG(1, "Discovery:\n");
-		IRDA_DEBUG(1, "  daddr=%08x\n", d->data.daddr);
-		IRDA_DEBUG(1, "  nickname=%s\n", d->data.info);
-
-		if (strcmp(name, d->data.info) == 0) {
-			*saddr = d->data.saddr;
-			
-			spin_unlock_irqrestore(&cachelog->hb_spinlock, flags);
-			return d->data.daddr;
-		}
-		d = (discovery_t *) hashbin_get_next(cachelog);
-	}
-
-	spin_unlock_irqrestore(&cachelog->hb_spinlock, flags);
-
-	return 0;
-}
-
 #ifdef CONFIG_PROC_FS
 static inline discovery_t *discovery_seq_idx(loff_t pos)
 
diff -Nru a/net/irda/ircomm/ircomm_core.c b/net/irda/ircomm/ircomm_core.c
--- a/net/irda/ircomm/ircomm_core.c	2005-01-10 20:11:23 -08:00
+++ b/net/irda/ircomm/ircomm_core.c	2005-01-10 20:11:23 -08:00
@@ -68,7 +68,7 @@
 
 hashbin_t *ircomm = NULL;
 
-int __init ircomm_init(void)
+static int __init ircomm_init(void)
 {
 	ircomm = hashbin_new(HB_LOCK); 
 	if (ircomm == NULL) {
@@ -89,7 +89,7 @@
 	return 0;
 }
 
-void __exit ircomm_cleanup(void)
+static void __exit ircomm_cleanup(void)
 {
 	IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
 
diff -Nru a/net/irda/ircomm/ircomm_event.c b/net/irda/ircomm/ircomm_event.c
--- a/net/irda/ircomm/ircomm_event.c	2005-01-10 20:11:17 -08:00
+++ b/net/irda/ircomm/ircomm_event.c	2005-01-10 20:11:17 -08:00
@@ -57,7 +57,7 @@
 	"IRCOMM_CONN",
 };
 
-char *ircomm_event[] = {
+static char *ircomm_event[] = {
 	"IRCOMM_CONNECT_REQUEST",
         "IRCOMM_CONNECT_RESPONSE",
         "IRCOMM_TTP_CONNECT_INDICATION",
diff -Nru a/net/irda/ircomm/ircomm_lmp.c b/net/irda/ircomm/ircomm_lmp.c
--- a/net/irda/ircomm/ircomm_lmp.c	2005-01-10 20:11:15 -08:00
+++ b/net/irda/ircomm/ircomm_lmp.c	2005-01-10 20:11:15 -08:00
@@ -41,44 +41,6 @@
 #include <net/irda/ircomm_event.h>
 #include <net/irda/ircomm_lmp.h>
 
-/*
- * Function ircomm_open_lsap (self)
- *
- *    Open LSAP. This function will only be used when using "raw" services
- *
- */
-int ircomm_open_lsap(struct ircomm_cb *self)
-{
-	notify_t notify;
-	
-	IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
-	
-        /* Register callbacks */
-        irda_notify_init(&notify);
-	notify.data_indication       = ircomm_lmp_data_indication;
-	notify.connect_confirm       = ircomm_lmp_connect_confirm;
-        notify.connect_indication    = ircomm_lmp_connect_indication;
-	notify.disconnect_indication = ircomm_lmp_disconnect_indication;
-	notify.instance = self;
-	strlcpy(notify.name, "IrCOMM", sizeof(notify.name));
-
-	self->lsap = irlmp_open_lsap(LSAP_ANY, &notify, 0);
-	if (!self->lsap) {
-		IRDA_DEBUG(0,"%sfailed to allocate tsap\n", __FUNCTION__ );
-		return -1;
-	}
-	self->slsap_sel = self->lsap->slsap_sel;
-
-	/*
-	 *  Initialize the call-table for issuing commands
-	 */
-	self->issue.data_request       = ircomm_lmp_data_request;
-	self->issue.connect_request    = ircomm_lmp_connect_request;
-	self->issue.connect_response   = ircomm_lmp_connect_response;
-	self->issue.disconnect_request = ircomm_lmp_disconnect_request;
-
-	return 0;
-}
 
 /*
  * Function ircomm_lmp_connect_request (self, userdata)
@@ -86,9 +48,9 @@
  *    
  *
  */
-int ircomm_lmp_connect_request(struct ircomm_cb *self, 
-			       struct sk_buff *userdata, 
-			       struct ircomm_info *info)
+static int ircomm_lmp_connect_request(struct ircomm_cb *self, 
+				      struct sk_buff *userdata, 
+				      struct ircomm_info *info)
 {
 	int ret = 0;
 
@@ -109,7 +71,8 @@
  *    
  *
  */
-int ircomm_lmp_connect_response(struct ircomm_cb *self, struct sk_buff *userdata)
+static int ircomm_lmp_connect_response(struct ircomm_cb *self,
+				       struct sk_buff *userdata)
 {
 	struct sk_buff *tx_skb;
 	int ret;
@@ -141,9 +104,9 @@
 	return 0;
 }
 
-int ircomm_lmp_disconnect_request(struct ircomm_cb *self, 
-				  struct sk_buff *userdata, 
-				  struct ircomm_info *info)
+static int ircomm_lmp_disconnect_request(struct ircomm_cb *self, 
+					 struct sk_buff *userdata, 
+					 struct ircomm_info *info)
 {
         struct sk_buff *tx_skb;
 	int ret;
@@ -175,7 +138,7 @@
  *    been deallocated. We do this to make sure we don't flood IrLAP with 
  *    frames, since we are not using the IrTTP flow control mechanism
  */
-void ircomm_lmp_flow_control(struct sk_buff *skb)
+static void ircomm_lmp_flow_control(struct sk_buff *skb)
 {
 	struct irda_skb_cb *cb;
 	struct ircomm_cb *self;
@@ -215,8 +178,9 @@
  *    Send data frame to peer device
  *
  */
-int ircomm_lmp_data_request(struct ircomm_cb *self, struct sk_buff *skb, 
-			    int not_used)
+static int ircomm_lmp_data_request(struct ircomm_cb *self,
+				   struct sk_buff *skb, 
+				   int not_used)
 {
 	struct irda_skb_cb *cb;
 	int ret;
@@ -256,8 +220,8 @@
  *    Incoming data which we must deliver to the state machine, to check
  *    we are still connected.
  */
-int ircomm_lmp_data_indication(void *instance, void *sap,
-			       struct sk_buff *skb)
+static int ircomm_lmp_data_indication(void *instance, void *sap,
+				      struct sk_buff *skb)
 {
 	struct ircomm_cb *self = (struct ircomm_cb *) instance;
 
@@ -282,11 +246,11 @@
  *    Connection has been confirmed by peer device
  *
  */
-void ircomm_lmp_connect_confirm(void *instance, void *sap,
-				struct qos_info *qos, 
-				__u32 max_seg_size, 
-				__u8 max_header_size,
-				struct sk_buff *skb)
+static void ircomm_lmp_connect_confirm(void *instance, void *sap,
+				       struct qos_info *qos, 
+				       __u32 max_seg_size, 
+				       __u8 max_header_size,
+				       struct sk_buff *skb)
 {
 	struct ircomm_cb *self = (struct ircomm_cb *) instance;
 	struct ircomm_info info;
@@ -315,11 +279,11 @@
  *    Peer device wants to make a connection with us
  *
  */
-void ircomm_lmp_connect_indication(void *instance, void *sap,
-				   struct qos_info *qos,
-				   __u32 max_seg_size,
-				   __u8 max_header_size,
-				   struct sk_buff *skb)
+static void ircomm_lmp_connect_indication(void *instance, void *sap,
+					  struct qos_info *qos,
+					  __u32 max_seg_size,
+					  __u8 max_header_size,
+					  struct sk_buff *skb)
 {
 	struct ircomm_cb *self = (struct ircomm_cb *)instance;
 	struct ircomm_info info;
@@ -347,9 +311,9 @@
  *    Peer device has closed the connection, or the link went down for some
  *    other reason
  */
-void ircomm_lmp_disconnect_indication(void *instance, void *sap, 
-				      LM_REASON reason,
-				      struct sk_buff *skb)
+static void ircomm_lmp_disconnect_indication(void *instance, void *sap, 
+					     LM_REASON reason,
+					     struct sk_buff *skb)
 {
 	struct ircomm_cb *self = (struct ircomm_cb *) instance;
 	struct ircomm_info info;
@@ -366,4 +330,42 @@
 	/* Drop reference count - see ircomm_tty_disconnect_indication(). */
 	if(skb)
 		dev_kfree_skb(skb);
+}
+/*
+ * Function ircomm_open_lsap (self)
+ *
+ *    Open LSAP. This function will only be used when using "raw" services
+ *
+ */
+int ircomm_open_lsap(struct ircomm_cb *self)
+{
+	notify_t notify;
+
+	IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
+
+	/* Register callbacks */
+	irda_notify_init(&notify);
+	notify.data_indication       = ircomm_lmp_data_indication;
+	notify.connect_confirm       = ircomm_lmp_connect_confirm;
+	notify.connect_indication    = ircomm_lmp_connect_indication;
+	notify.disconnect_indication = ircomm_lmp_disconnect_indication;
+	notify.instance = self;
+	strlcpy(notify.name, "IrCOMM", sizeof(notify.name));
+
+	self->lsap = irlmp_open_lsap(LSAP_ANY, &notify, 0);
+	if (!self->lsap) {
+		IRDA_DEBUG(0,"%sfailed to allocate tsap\n", __FUNCTION__ );
+		return -1;
+	}
+	self->slsap_sel = self->lsap->slsap_sel;
+
+	/*
+	 *  Initialize the call-table for issuing commands
+	 */
+	self->issue.data_request       = ircomm_lmp_data_request;
+	self->issue.connect_request    = ircomm_lmp_connect_request;
+	self->issue.connect_response   = ircomm_lmp_connect_response;
+	self->issue.disconnect_request = ircomm_lmp_disconnect_request;
+
+	return 0;
 }
diff -Nru a/net/irda/ircomm/ircomm_param.c b/net/irda/ircomm/ircomm_param.c
--- a/net/irda/ircomm/ircomm_param.c	2005-01-10 20:11:19 -08:00
+++ b/net/irda/ircomm/ircomm_param.c	2005-01-10 20:11:19 -08:00
@@ -92,23 +92,6 @@
 pi_param_info_t ircomm_param_info = { pi_major_call_table, 3, 0x0f, 4 };
 
 /*
- * Function ircomm_param_flush (self)
- *
- *    Flush (send) out all queued parameters
- *
- */
-int ircomm_param_flush(struct ircomm_tty_cb *self)
-{
-	/* we should lock here, but I guess this function is unused...
-	 * Jean II */
-	if (self->ctrl_skb) {
-		ircomm_control_request(self->ircomm, self->ctrl_skb);
-		self->ctrl_skb = NULL;	
-	}
-	return 0;
-}
-
-/*
  * Function ircomm_param_request (self, pi, flush)
  *
  *    Queue a parameter for the control channel
diff -Nru a/net/irda/ircomm/ircomm_ttp.c b/net/irda/ircomm/ircomm_ttp.c
--- a/net/irda/ircomm/ircomm_ttp.c	2005-01-10 20:11:22 -08:00
+++ b/net/irda/ircomm/ircomm_ttp.c	2005-01-10 20:11:22 -08:00
@@ -40,6 +40,35 @@
 #include <net/irda/ircomm_event.h>
 #include <net/irda/ircomm_ttp.h>
 
+static int ircomm_ttp_data_indication(void *instance, void *sap,
+				      struct sk_buff *skb);
+static void ircomm_ttp_connect_confirm(void *instance, void *sap,
+				       struct qos_info *qos, 
+				       __u32 max_sdu_size, 
+				       __u8 max_header_size,
+				       struct sk_buff *skb);
+static void ircomm_ttp_connect_indication(void *instance, void *sap,
+					  struct qos_info *qos,
+					  __u32 max_sdu_size,
+					  __u8 max_header_size,
+					  struct sk_buff *skb);
+static void ircomm_ttp_flow_indication(void *instance, void *sap,
+				       LOCAL_FLOW cmd);
+static void ircomm_ttp_disconnect_indication(void *instance, void *sap, 
+					     LM_REASON reason,
+					     struct sk_buff *skb);
+static int ircomm_ttp_data_request(struct ircomm_cb *self,
+				   struct sk_buff *skb, 
+				   int clen);
+static int ircomm_ttp_connect_request(struct ircomm_cb *self, 
+				      struct sk_buff *userdata, 
+				      struct ircomm_info *info);
+static int ircomm_ttp_connect_response(struct ircomm_cb *self,
+				       struct sk_buff *userdata);
+static int ircomm_ttp_disconnect_request(struct ircomm_cb *self, 
+					 struct sk_buff *userdata, 
+					 struct ircomm_info *info);
+
 /*
  * Function ircomm_open_tsap (self)
  *
@@ -87,9 +116,9 @@
  *    
  *
  */
-int ircomm_ttp_connect_request(struct ircomm_cb *self, 
-			       struct sk_buff *userdata, 
-			       struct ircomm_info *info)
+static int ircomm_ttp_connect_request(struct ircomm_cb *self, 
+				      struct sk_buff *userdata, 
+				      struct ircomm_info *info)
 {
 	int ret = 0;
 
@@ -112,8 +141,8 @@
  *    
  *
  */
-int ircomm_ttp_connect_response(struct ircomm_cb *self,
-				struct sk_buff *userdata)
+static int ircomm_ttp_connect_response(struct ircomm_cb *self,
+				       struct sk_buff *userdata)
 {
 	int ret;
 
@@ -137,9 +166,9 @@
  *    some of them are sent after connection establishment, so this can 
  *    increase the latency a bit.
  */
-int ircomm_ttp_data_request(struct ircomm_cb *self,
-			    struct sk_buff *skb, 
-			    int clen)
+static int ircomm_ttp_data_request(struct ircomm_cb *self,
+				   struct sk_buff *skb, 
+				   int clen)
 {
 	int ret;
 
@@ -175,8 +204,8 @@
  *    Incoming data
  *
  */
-int ircomm_ttp_data_indication(void *instance, void *sap,
-			       struct sk_buff *skb)
+static int ircomm_ttp_data_indication(void *instance, void *sap,
+				      struct sk_buff *skb)
 {
 	struct ircomm_cb *self = (struct ircomm_cb *) instance;
 
@@ -194,11 +223,11 @@
 	return 0;
 }
 
-void ircomm_ttp_connect_confirm(void *instance, void *sap,
-				struct qos_info *qos, 
-				__u32 max_sdu_size, 
-				__u8 max_header_size,
-				struct sk_buff *skb)
+static void ircomm_ttp_connect_confirm(void *instance, void *sap,
+				       struct qos_info *qos, 
+				       __u32 max_sdu_size, 
+				       __u8 max_header_size,
+				       struct sk_buff *skb)
 {
 	struct ircomm_cb *self = (struct ircomm_cb *) instance;
 	struct ircomm_info info;
@@ -234,11 +263,11 @@
  *    
  *
  */
-void ircomm_ttp_connect_indication(void *instance, void *sap,
-				   struct qos_info *qos,
-				   __u32 max_sdu_size,
-				   __u8 max_header_size,
-				   struct sk_buff *skb)
+static void ircomm_ttp_connect_indication(void *instance, void *sap,
+					  struct qos_info *qos,
+					  __u32 max_sdu_size,
+					  __u8 max_header_size,
+					  struct sk_buff *skb)
 {
 	struct ircomm_cb *self = (struct ircomm_cb *)instance;
 	struct ircomm_info info;
@@ -273,9 +302,9 @@
  *    
  *
  */
-int ircomm_ttp_disconnect_request(struct ircomm_cb *self, 
-				  struct sk_buff *userdata, 
-				  struct ircomm_info *info)
+static int ircomm_ttp_disconnect_request(struct ircomm_cb *self, 
+					 struct sk_buff *userdata, 
+					 struct ircomm_info *info)
 {
 	int ret;
 
@@ -294,9 +323,9 @@
  *    
  *
  */
-void ircomm_ttp_disconnect_indication(void *instance, void *sap, 
-				      LM_REASON reason,
-				      struct sk_buff *skb)
+static void ircomm_ttp_disconnect_indication(void *instance, void *sap, 
+					     LM_REASON reason,
+					     struct sk_buff *skb)
 {
 	struct ircomm_cb *self = (struct ircomm_cb *) instance;
 	struct ircomm_info info;
@@ -321,7 +350,8 @@
  *    Layer below is telling us to start or stop the flow of data
  *
  */
-void ircomm_ttp_flow_indication(void *instance, void *sap, LOCAL_FLOW cmd)
+static void ircomm_ttp_flow_indication(void *instance, void *sap,
+				       LOCAL_FLOW cmd)
 {
 	struct ircomm_cb *self = (struct ircomm_cb *) instance;
 
diff -Nru a/net/irda/ircomm/ircomm_tty.c b/net/irda/ircomm/ircomm_tty.c
--- a/net/irda/ircomm/ircomm_tty.c	2005-01-10 20:11:17 -08:00
+++ b/net/irda/ircomm/ircomm_tty.c	2005-01-10 20:11:17 -08:00
@@ -64,6 +64,7 @@
 static void ircomm_tty_hangup(struct tty_struct *tty);
 static void ircomm_tty_do_softint(void *private_);
 static void ircomm_tty_shutdown(struct ircomm_tty_cb *self);
+static void ircomm_tty_stop(struct tty_struct *tty);
 
 static int ircomm_tty_data_indication(void *instance, void *sap,
 				      struct sk_buff *skb);
@@ -108,7 +109,7 @@
  *    Init IrCOMM TTY layer/driver
  *
  */
-int __init ircomm_tty_init(void)
+static int __init ircomm_tty_init(void)
 {
 	driver = alloc_tty_driver(IRCOMM_TTY_PORTS);
 	if (!driver)
@@ -159,7 +160,7 @@
  *    Remove IrCOMM TTY layer/driver
  *
  */
-void __exit ircomm_tty_cleanup(void)
+static void __exit ircomm_tty_cleanup(void)
 {
 	int ret;
 
@@ -1064,7 +1065,7 @@
  *     This routine notifies the tty driver that it should stop outputting
  *     characters to the tty device. 
  */
-void ircomm_tty_stop(struct tty_struct *tty) 
+static void ircomm_tty_stop(struct tty_struct *tty) 
 {
 	struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
 
diff -Nru a/net/irda/ircomm/ircomm_tty_attach.c b/net/irda/ircomm/ircomm_tty_attach.c
--- a/net/irda/ircomm/ircomm_tty_attach.c	2005-01-10 20:11:22 -08:00
+++ b/net/irda/ircomm/ircomm_tty_attach.c	2005-01-10 20:11:22 -08:00
@@ -52,8 +52,9 @@
 					    void *priv);
 static void ircomm_tty_getvalue_confirm(int result, __u16 obj_id, 
 					struct ias_value *value, void *priv);
-void ircomm_tty_start_watchdog_timer(struct ircomm_tty_cb *self, int timeout);
-void ircomm_tty_watchdog_timer_expired(void *data);
+static void ircomm_tty_start_watchdog_timer(struct ircomm_tty_cb *self,
+					    int timeout);
+static void ircomm_tty_watchdog_timer_expired(void *data);
 
 static int ircomm_tty_state_idle(struct ircomm_tty_cb *self, 
 				 IRCOMM_TTY_EVENT event, 
@@ -90,7 +91,7 @@
 	"*** ERROR *** ",
 };
 
-char *ircomm_tty_event[] = {
+static char *ircomm_tty_event[] = {
 	"IRCOMM_TTY_ATTACH_CABLE",
 	"IRCOMM_TTY_DETACH_CABLE",
 	"IRCOMM_TTY_DATA_REQUEST",
@@ -594,7 +595,8 @@
  *    connection attempt is successful, and if not, we will retry after 
  *    the timeout
  */
-void ircomm_tty_start_watchdog_timer(struct ircomm_tty_cb *self, int timeout)
+static void ircomm_tty_start_watchdog_timer(struct ircomm_tty_cb *self,
+					    int timeout)
 {
 	ASSERT(self != NULL, return;);
 	ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
@@ -609,7 +611,7 @@
  *    Called when the connect procedure have taken to much time.
  *
  */
-void ircomm_tty_watchdog_timer_expired(void *data)
+static void ircomm_tty_watchdog_timer_expired(void *data)
 {
 	struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) data;
 	
diff -Nru a/net/irda/ircomm/ircomm_tty_ioctl.c b/net/irda/ircomm/ircomm_tty_ioctl.c
--- a/net/irda/ircomm/ircomm_tty_ioctl.c	2005-01-10 20:11:15 -08:00
+++ b/net/irda/ircomm/ircomm_tty_ioctl.c	2005-01-10 20:11:15 -08:00
@@ -53,7 +53,7 @@
  *    Change speed of the driver. If the remote device is a DCE, then this
  *    should make it change the speed of its serial port
  */
-void ircomm_tty_change_speed(struct ircomm_tty_cb *self)
+static void ircomm_tty_change_speed(struct ircomm_tty_cb *self)
 {
 	unsigned cflag, cval;
 	int baud;
diff -Nru a/net/irda/irda_device.c b/net/irda/irda_device.c
--- a/net/irda/irda_device.c	2005-01-10 20:11:19 -08:00
+++ b/net/irda/irda_device.c	2005-01-10 20:11:19 -08:00
@@ -143,47 +143,6 @@
 EXPORT_SYMBOL(irda_device_set_media_busy);
 
 
-int irda_device_set_dtr_rts(struct net_device *dev, int dtr, int rts)
-{
-	struct if_irda_req req;
-	int ret;
-
-	IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
-
-	if (!dev->do_ioctl) {
-		ERROR("%s: do_ioctl not impl. by device driver\n",
-				__FUNCTION__);
-		return -1;
-	}
-
-	req.ifr_dtr = dtr;
-	req.ifr_rts = rts;
-
-	ret = dev->do_ioctl(dev, (struct ifreq *) &req, SIOCSDTRRTS);
-
-	return ret;
-}
-
-int irda_device_change_speed(struct net_device *dev, __u32 speed)
-{
-	struct if_irda_req req;
-	int ret;
-
-	IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
-
-	if (!dev->do_ioctl) {
-		ERROR("%s: do_ioctl not impl. by device driver\n",
-				__FUNCTION__);
-		return -1;
-	}
-
-	req.ifr_baudrate = speed;
-
-	ret = dev->do_ioctl(dev, (struct ifreq *) &req, SIOCSBANDWIDTH);
-
-	return ret;
-}
-
 /*
  * Function irda_device_is_receiving (dev)
  *
@@ -372,7 +331,7 @@
  *    This function should be used by low level device drivers in a similar way
  *    as ether_setup() is used by normal network device drivers
  */
-void irda_device_setup(struct net_device *dev)
+static void irda_device_setup(struct net_device *dev)
 {
         dev->hard_header_len = 0;
         dev->addr_len        = 0;
@@ -501,33 +460,6 @@
 	spin_unlock(&dongles->hb_spinlock);
 }
 EXPORT_SYMBOL(irda_device_unregister_dongle);
-
-/*
- * Function irda_device_set_mode (self, mode)
- *
- *    Set the Infrared device driver into mode where it sends and receives
- *    data without using IrLAP framing. Check out the particular device
- *    driver to find out which modes it support.
- */
-int irda_device_set_mode(struct net_device* dev, int mode)
-{
-	struct if_irda_req req;
-	int ret;
-
-	IRDA_DEBUG(0, "%s()\n", __FUNCTION__);
-
-	if (!dev->do_ioctl) {
-		ERROR("%s: set_raw_mode not impl. by device driver\n",
-				__FUNCTION__);
-		return -1;
-	}
-
-	req.ifr_mode = mode;
-
-	ret = dev->do_ioctl(dev, (struct ifreq *) &req, SIOCSMODE);
-
-	return ret;
-}
 
 #ifdef CONFIG_ISA
 /*
diff -Nru a/net/irda/iriap.c b/net/irda/iriap.c
--- a/net/irda/iriap.c	2005-01-10 20:11:17 -08:00
+++ b/net/irda/iriap.c	2005-01-10 20:11:17 -08:00
@@ -77,6 +77,15 @@
 static int iriap_data_indication(void *instance, void *sap,
 				 struct sk_buff *skb);
 
+static void iriap_watchdog_timer_expired(void *data);
+
+static inline void iriap_start_watchdog_timer(struct iriap_cb *self, 
+					      int timeout) 
+{
+	irda_start_timer(&self->watchdog_timer, timeout, self, 
+			 iriap_watchdog_timer_expired);
+}
+
 /*
  * Function iriap_init (void)
  *
@@ -328,7 +337,7 @@
 /*
  * Function iriap_disconnect_request (handle)
  */
-void iriap_disconnect_request(struct iriap_cb *self)
+static void iriap_disconnect_request(struct iriap_cb *self)
 {
 	struct sk_buff *tx_skb;
 
@@ -352,31 +361,6 @@
 	irlmp_disconnect_request(self->lsap, tx_skb);
 }
 
-void iriap_getinfobasedetails_request(void)
-{
-	IRDA_DEBUG(0, "%s(), Not implemented!\n", __FUNCTION__);
-}
-
-void iriap_getinfobasedetails_confirm(void)
-{
-	IRDA_DEBUG(0, "%s(), Not implemented!\n", __FUNCTION__);
-}
-
-void iriap_getobjects_request(void)
-{
-	IRDA_DEBUG(0, "%s(), Not implemented!\n", __FUNCTION__);
-}
-
-void iriap_getobjects_confirm(void)
-{
-	IRDA_DEBUG(0, "%s(), Not implemented!\n", __FUNCTION__);
-}
-
-void iriap_getvalue(void)
-{
-	IRDA_DEBUG(0, "%s(), Not implemented!\n", __FUNCTION__);
-}
-
 /*
  * Function iriap_getvaluebyclass (addr, name, attr)
  *
@@ -445,7 +429,8 @@
  *    to service user.
  *
  */
-void iriap_getvaluebyclass_confirm(struct iriap_cb *self, struct sk_buff *skb)
+static void iriap_getvaluebyclass_confirm(struct iriap_cb *self,
+					  struct sk_buff *skb)
 {
 	struct ias_value *value;
 	int charset;
@@ -552,8 +537,10 @@
  *    Send answer back to remote LM-IAS
  *
  */
-void iriap_getvaluebyclass_response(struct iriap_cb *self, __u16 obj_id,
-				    __u8 ret_code, struct ias_value *value)
+static void iriap_getvaluebyclass_response(struct iriap_cb *self,
+					   __u16 obj_id,
+					   __u8 ret_code,
+					   struct ias_value *value)
 {
 	struct sk_buff *tx_skb;
 	int n;
@@ -641,8 +628,8 @@
  *    getvaluebyclass is requested from peer LM-IAS
  *
  */
-void iriap_getvaluebyclass_indication(struct iriap_cb *self,
-				      struct sk_buff *skb)
+static void iriap_getvaluebyclass_indication(struct iriap_cb *self,
+					     struct sk_buff *skb)
 {
 	struct ias_object *obj;
 	struct ias_attrib *attrib;
@@ -962,7 +949,7 @@
  *    Query has taken too long time, so abort
  *
  */
-void iriap_watchdog_timer_expired(void *data)
+static void iriap_watchdog_timer_expired(void *data)
 {
 	struct iriap_cb *self = (struct iriap_cb *) data;
 
diff -Nru a/net/irda/irias_object.c b/net/irda/irias_object.c
--- a/net/irda/irias_object.c	2005-01-10 20:11:20 -08:00
+++ b/net/irda/irias_object.c	2005-01-10 20:11:20 -08:00
@@ -116,7 +116,7 @@
  *    Delete given attribute and deallocate all its memory
  *
  */
-void __irias_delete_attrib(struct ias_attrib *attrib)
+static void __irias_delete_attrib(struct ias_attrib *attrib)
 {
 	ASSERT(attrib != NULL, return;);
 	ASSERT(attrib->magic == IAS_ATTRIB_MAGIC, return;);
@@ -267,8 +267,8 @@
  *    Add attribute to object
  *
  */
-void irias_add_attrib( struct ias_object *obj, struct ias_attrib *attrib,
-		       int owner)
+static void irias_add_attrib(struct ias_object *obj, struct ias_attrib *attrib,
+			     int owner)
 {
 	ASSERT(obj != NULL, return;);
 	ASSERT(obj->magic == IAS_OBJECT_MAGIC, return;);
diff -Nru a/net/irda/irlan/irlan_client.c b/net/irda/irlan/irlan_client.c
--- a/net/irda/irlan/irlan_client.c	2005-01-10 20:11:19 -08:00
+++ b/net/irda/irlan/irlan_client.c	2005-01-10 20:11:19 -08:00
@@ -66,6 +66,7 @@
 					      struct sk_buff *);
 static void irlan_check_response_param(struct irlan_cb *self, char *param, 
 				       char *value, int val_len);
+static void irlan_client_open_ctrl_tsap(struct irlan_cb *self);
 
 static void irlan_client_kick_timer_expired(void *data)
 {
@@ -88,7 +89,7 @@
 	}
 }
 
-void irlan_client_start_kick_timer(struct irlan_cb *self, int timeout)
+static void irlan_client_start_kick_timer(struct irlan_cb *self, int timeout)
 {
 	IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
 	
@@ -248,7 +249,7 @@
  *    Initialize callbacks and open IrTTP TSAPs
  *
  */
-void irlan_client_open_ctrl_tsap(struct irlan_cb *self)
+static void irlan_client_open_ctrl_tsap(struct irlan_cb *self)
 {
 	struct tsap_cb *tsap;
 	notify_t notify;
@@ -307,42 +308,6 @@
 
 	irlan_do_client_event(self, IRLAN_CONNECT_COMPLETE, NULL);
 }
-
-/*
- * Function irlan_client_reconnect_data_channel (self)
- *
- *    Try to reconnect data channel (currently not used)
- *
- */
-void irlan_client_reconnect_data_channel(struct irlan_cb *self) 
-{
-	struct sk_buff *skb;
-	__u8 *frame;
-		
-	IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
-
-	ASSERT(self != NULL, return;);
-	ASSERT(self->magic == IRLAN_MAGIC, return;);
-	
-	skb = dev_alloc_skb(128);
-	if (!skb)
-		return;
-
-	/* Reserve space for TTP, LMP, and LAP header */
-	skb_reserve(skb, self->max_header_size);
-	skb_put(skb, 2);
-	
-	frame = skb->data;
-	
- 	frame[0] = CMD_RECONNECT_DATA_CHAN;
-	frame[1] = 0x01;
- 	irlan_insert_array_param(skb, "RECONNECT_KEY", 
-				 self->client.reconnect_key,
-				 self->client.key_len);
-	
-	irttp_data_request(self->client.tsap_ctrl, skb);	
-}
-
 
 /*
  * Function print_ret_code (code)
diff -Nru a/net/irda/irlan/irlan_common.c b/net/irda/irlan/irlan_common.c
--- a/net/irda/irlan/irlan_common.c	2005-01-10 20:11:19 -08:00
+++ b/net/irda/irlan/irlan_common.c	2005-01-10 20:11:19 -08:00
@@ -105,10 +105,13 @@
 extern struct proc_dir_entry *proc_irda;
 #endif /* CONFIG_PROC_FS */
 
+static struct irlan_cb *irlan_open(__u32 saddr, __u32 daddr);
 static void __irlan_close(struct irlan_cb *self);
 static int __irlan_insert_param(struct sk_buff *skb, char *param, int type, 
 				__u8 value_byte, __u16 value_short, 
 				__u8 *value_array, __u16 value_len);
+static void irlan_open_unicast_addr(struct irlan_cb *self);
+static void irlan_get_unicast_addr(struct irlan_cb *self);
 void irlan_close_tsaps(struct irlan_cb *self);
 
 /*
@@ -185,7 +188,7 @@
  *    Open new instance of a client/provider, we should only register the 
  *    network device if this instance is ment for a particular client/provider
  */
-struct irlan_cb *irlan_open(__u32 saddr, __u32 daddr)
+static struct irlan_cb *irlan_open(__u32 saddr, __u32 daddr)
 {
 	struct net_device *dev;
 	struct irlan_cb *self;
@@ -294,9 +297,11 @@
  *    Here we receive the connect indication for the data channel
  *
  */
-void irlan_connect_indication(void *instance, void *sap, struct qos_info *qos,
-			      __u32 max_sdu_size, __u8 max_header_size, 
-			      struct sk_buff *skb)
+static void irlan_connect_indication(void *instance, void *sap,
+				     struct qos_info *qos,
+				     __u32 max_sdu_size,
+				     __u8 max_header_size, 
+				     struct sk_buff *skb)
 {
 	struct irlan_cb *self;
 	struct tsap_cb *tsap;
@@ -339,9 +344,11 @@
 	netif_start_queue(self->dev); /* Clear reason */
 }
 
-void irlan_connect_confirm(void *instance, void *sap, struct qos_info *qos, 
-			   __u32 max_sdu_size, __u8 max_header_size, 
-			   struct sk_buff *skb) 
+static void irlan_connect_confirm(void *instance, void *sap,
+				  struct qos_info *qos, 
+				  __u32 max_sdu_size,
+				  __u8 max_header_size, 
+				  struct sk_buff *skb) 
 {
 	struct irlan_cb *self;
 
@@ -384,8 +391,9 @@
  *    Callback function for the IrTTP layer. Indicates a disconnection of
  *    the specified connection (handle)
  */
-void irlan_disconnect_indication(void *instance, void *sap, LM_REASON reason, 
-				 struct sk_buff *userdata) 
+static void irlan_disconnect_indication(void *instance,
+					void *sap, LM_REASON reason, 
+					struct sk_buff *userdata) 
 {
 	struct irlan_cb *self;
 	struct tsap_cb *tsap;
@@ -602,7 +610,7 @@
  *    This function makes sure that commands on the control channel is being
  *    sent in a command/response fashion
  */
-void irlan_ctrl_data_request(struct irlan_cb *self, struct sk_buff *skb)
+static void irlan_ctrl_data_request(struct irlan_cb *self, struct sk_buff *skb)
 {
 	IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
 
@@ -722,7 +730,7 @@
  *    address.
  *
  */
-void irlan_open_unicast_addr(struct irlan_cb *self) 
+static void irlan_open_unicast_addr(struct irlan_cb *self)
 {
 	struct sk_buff *skb;
 	__u8 *frame;
@@ -839,7 +847,7 @@
  *    can construct its packets.
  *
  */
-void irlan_get_unicast_addr(struct irlan_cb *self) 
+static void irlan_get_unicast_addr(struct irlan_cb *self)
 {
 	struct sk_buff *skb;
 	__u8 *frame;
diff -Nru a/net/irda/irlan/irlan_provider.c b/net/irda/irlan/irlan_provider.c
--- a/net/irda/irlan/irlan_provider.c	2005-01-10 20:11:18 -08:00
+++ b/net/irda/irlan/irlan_provider.c	2005-01-10 20:11:18 -08:00
@@ -175,9 +175,9 @@
 	irttp_connect_response(tsap, IRLAN_MTU, NULL);
 }
 
-void irlan_provider_disconnect_indication(void *instance, void *sap, 
-					  LM_REASON reason, 
-					  struct sk_buff *userdata) 
+static void irlan_provider_disconnect_indication(void *instance, void *sap, 
+						 LM_REASON reason, 
+						 struct sk_buff *userdata) 
 {
 	struct irlan_cb *self;
 	struct tsap_cb *tsap;
diff -Nru a/net/irda/irlap.c b/net/irda/irlap.c
--- a/net/irda/irlap.c	2005-01-10 20:11:22 -08:00
+++ b/net/irda/irlap.c	2005-01-10 20:11:22 -08:00
@@ -60,6 +60,8 @@
 
 extern void irlap_queue_xmit(struct irlap_cb *self, struct sk_buff *skb);
 static void __irlap_close(struct irlap_cb *self);
+static void irlap_init_qos_capabilities(struct irlap_cb *self,
+					struct qos_info *qos_user);
 
 #ifdef CONFIG_IRDA_DEBUG
 static char *lap_reasons[] = {
@@ -867,7 +869,7 @@
  *    Change the speed of the IrDA port
  *
  */
-void irlap_change_speed(struct irlap_cb *self, __u32 speed, int now)
+static void irlap_change_speed(struct irlap_cb *self, __u32 speed, int now)
 {
 	struct sk_buff *skb;
 
@@ -894,8 +896,8 @@
  *    IrLAP itself. Normally, IrLAP will not specify any values, but it can
  *    be used to restrict certain values.
  */
-void irlap_init_qos_capabilities(struct irlap_cb *self,
-				 struct qos_info *qos_user)
+static void irlap_init_qos_capabilities(struct irlap_cb *self,
+					struct qos_info *qos_user)
 {
 	ASSERT(self != NULL, return;);
 	ASSERT(self->magic == LAP_MAGIC, return;);
diff -Nru a/net/irda/irlap_event.c b/net/irda/irlap_event.c
--- a/net/irda/irlap_event.c	2005-01-10 20:11:20 -08:00
+++ b/net/irda/irlap_event.c	2005-01-10 20:11:20 -08:00
@@ -181,7 +181,7 @@
  * Make sure that state is XMIT_P/XMIT_S when calling this function
  * (and that nobody messed up with the state). - Jean II
  */
-void irlap_start_poll_timer(struct irlap_cb *self, int timeout)
+static void irlap_start_poll_timer(struct irlap_cb *self, int timeout)
 {
 	ASSERT(self != NULL, return;);
 	ASSERT(self->magic == LAP_MAGIC, return;);
diff -Nru a/net/irda/irlap_frame.c b/net/irda/irlap_frame.c
--- a/net/irda/irlap_frame.c	2005-01-10 20:11:17 -08:00
+++ b/net/irda/irlap_frame.c	2005-01-10 20:11:17 -08:00
@@ -43,6 +43,9 @@
 #include <net/irda/irlap_frame.h>
 #include <net/irda/qos.h>
 
+static void irlap_send_i_frame(struct irlap_cb *self, struct sk_buff *skb,
+			       int command);
+
 /*
  * Function irlap_insert_info (self, skb)
  *
@@ -629,34 +632,6 @@
 		irlap_do_event(self, RECV_RR_RSP, skb, info);
 }
 
-void irlap_send_frmr_frame( struct irlap_cb *self, int command)
-{
-	struct sk_buff *tx_skb = NULL;
-	__u8 *frame;
-
-	ASSERT( self != NULL, return;);
-	ASSERT( self->magic == LAP_MAGIC, return;);
-
-	tx_skb = dev_alloc_skb( 32);
-	if (!tx_skb)
-		return;
-
-	frame = skb_put(tx_skb, 2);
-
-	frame[0] = self->caddr;
-	frame[0] |= (command) ? CMD_FRAME : 0;
-
-	frame[1]  = (self->vs << 1);
-	frame[1] |= PF_BIT;
-	frame[1] |= (self->vr << 5);
-
-	frame[2] = 0;
-
-	IRDA_DEBUG(4, "%s(), vr=%d, %ld\n", __FUNCTION__, self->vr, jiffies);
-
-	irlap_queue_xmit(self, tx_skb);
-}
-
 /*
  * Function irlap_recv_rnr_frame (self, skb, info)
  *
@@ -1129,8 +1104,8 @@
  *
  *    Contruct and transmit Information (I) frame
  */
-void irlap_send_i_frame(struct irlap_cb *self, struct sk_buff *skb,
-			int command)
+static void irlap_send_i_frame(struct irlap_cb *self, struct sk_buff *skb,
+			       int command)
 {
 	/* Insert connection address */
 	skb->data[0] = self->caddr;
diff -Nru a/net/irda/irlmp.c b/net/irda/irlmp.c
--- a/net/irda/irlmp.c	2005-01-10 20:11:22 -08:00
+++ b/net/irda/irlmp.c	2005-01-10 20:11:22 -08:00
@@ -44,6 +44,9 @@
 #include <net/irda/irlmp.h>
 #include <net/irda/irlmp_frame.h>
 
+static __u8 irlmp_find_free_slsap(void);
+static int irlmp_slsap_inuse(__u8 slsap_sel);
+
 /* Master structure */
 struct irlmp_cb *irlmp = NULL;
 
@@ -1278,11 +1281,6 @@
 }
 #endif /* CONFIG_IRDA_ULTRA */
 
-void irlmp_status_request(void)
-{
-	IRDA_DEBUG(0, "%s(), Not implemented\n", __FUNCTION__);
-}
-
 /*
  * Propagate status indication from LAP to LSAPs (via LMP)
  * This don't trigger any change of state in lap_cb, lmp_cb or lsap_cb,
@@ -1656,7 +1654,7 @@
  * of the allocated LSAP, but I'm not sure the complexity is worth it.
  * Jean II
  */
-int irlmp_slsap_inuse(__u8 slsap_sel)
+static int irlmp_slsap_inuse(__u8 slsap_sel)
 {
 	struct lsap_cb *self;
 	struct lap_cb *lap;
@@ -1756,7 +1754,7 @@
  *    Find a free source LSAP to use. This function is called if the service
  *    user has requested a source LSAP equal to LM_ANY
  */
-__u8 irlmp_find_free_slsap(void)
+static __u8 irlmp_find_free_slsap(void)
 {
 	__u8 lsap_sel;
 	int wrapped = 0;
diff -Nru a/net/irda/irmod.c b/net/irda/irmod.c
--- a/net/irda/irmod.c	2005-01-10 20:11:22 -08:00
+++ b/net/irda/irmod.c	2005-01-10 20:11:22 -08:00
@@ -100,7 +100,7 @@
  *  Protocol stack initialisation entry point.
  *  Initialise the various components of the IrDA stack
  */
-int __init irda_init(void)
+static int __init irda_init(void)
 {
 	IRDA_DEBUG(0, "%s()\n", __FUNCTION__);
 
@@ -136,7 +136,7 @@
  *  Protocol stack cleanup/removal entry point.
  *  Cleanup the various components of the IrDA stack
  */
-void __exit irda_cleanup(void)
+static void __exit irda_cleanup(void)
 {
 	/* Remove External APIs */
 #ifdef CONFIG_SYSCTL
diff -Nru a/net/irda/irnet/irnet.h b/net/irda/irnet/irnet.h
--- a/net/irda/irnet/irnet.h	2005-01-10 20:11:20 -08:00
+++ b/net/irda/irnet/irnet.h	2005-01-10 20:11:20 -08:00
@@ -363,13 +363,13 @@
 /* Exit a function with debug */
 #define DRETURN(ret, dbg, args...) \
 	{DEXIT(dbg, ": " args);\
-	return(ret); }
+	return ret; }
 
 /* Exit a function on failed condition */
 #define DABORT(cond, ret, dbg, args...) \
 	{if(cond) {\
 		DERROR(dbg, args);\
-		return(ret); }}
+		return ret; }}
 
 /* Invalid assertion, print out an error and exit... */
 #define DASSERT(cond, ret, dbg, args...) \
@@ -520,8 +520,6 @@
 /* ---------------------------- MODULE ---------------------------- */
 extern int
 	irnet_init(void);		/* Initialise IrNET module */
-extern void
-	irnet_cleanup(void);		/* Teardown IrNET module */
 
 /**************************** VARIABLES ****************************/
 
diff -Nru a/net/irda/irnet/irnet_ppp.c b/net/irda/irnet/irnet_ppp.c
--- a/net/irda/irnet/irnet_ppp.c	2005-01-10 20:11:21 -08:00
+++ b/net/irda/irnet/irnet_ppp.c	2005-01-10 20:11:21 -08:00
@@ -16,6 +16,12 @@
 #include "irnet_ppp.h"		/* Private header */
 /* Please put other headers in irnet.h - Thanks */
 
+/* Generic PPP callbacks (to call us) */
+static struct ppp_channel_ops irnet_ppp_ops = {
+	.start_xmit = ppp_irnet_send,
+	.ioctl = ppp_irnet_ioctl
+};
+
 /************************* CONTROL CHANNEL *************************/
 /*
  * When a pppd instance is not active on /dev/irnet, it acts as a control
@@ -1095,7 +1101,7 @@
 /*
  * Module exit
  */
-void __exit
+static void __exit
 irnet_cleanup(void)
 {
   irda_irnet_cleanup();
diff -Nru a/net/irda/irnet/irnet_ppp.h b/net/irda/irnet/irnet_ppp.h
--- a/net/irda/irnet/irnet_ppp.h	2005-01-10 20:11:21 -08:00
+++ b/net/irda/irnet/irnet_ppp.h	2005-01-10 20:11:21 -08:00
@@ -116,11 +116,4 @@
 	&irnet_device_fops
 };
 
-/* Generic PPP callbacks (to call us) */
-struct ppp_channel_ops irnet_ppp_ops =
-{
-  ppp_irnet_send,
-  ppp_irnet_ioctl
-};
-
 #endif /* IRNET_PPP_H */
diff -Nru a/net/irda/irsysctl.c b/net/irda/irsysctl.c
--- a/net/irda/irsysctl.c	2005-01-10 20:11:18 -08:00
+++ b/net/irda/irsysctl.c	2005-01-10 20:11:18 -08:00
@@ -43,7 +43,6 @@
 extern int  sysctl_discovery_timeout;
 extern int  sysctl_slot_timeout;
 extern int  sysctl_fast_poll_increase;
-int         sysctl_compression = 0;
 extern char sysctl_devname[];
 extern int  sysctl_max_baud_rate;
 extern int  sysctl_min_tx_turn_time;
diff -Nru a/net/irda/irttp.c b/net/irda/irttp.c
--- a/net/irda/irttp.c	2005-01-10 20:11:20 -08:00
+++ b/net/irda/irttp.c	2005-01-10 20:11:20 -08:00
@@ -64,6 +64,10 @@
 static int irttp_param_max_sdu_size(void *instance, irda_param_t *param, 
 				    int get);
 
+static void irttp_flow_indication(void *instance, void *sap, LOCAL_FLOW flow);
+static void irttp_status_indication(void *instance,
+				    LINK_STATUS link, LOCK_STATUS lock);
+
 /* Information for parsing parameters in IrTTP */
 static pi_minor_info_t pi_minor_call_table[] = {
 	{ NULL, 0 },                                             /* 0x00 */
@@ -961,8 +965,8 @@
  *    Status_indication, just pass to the higher layer...
  *
  */
-void irttp_status_indication(void *instance,
-			     LINK_STATUS link, LOCK_STATUS lock)
+static void irttp_status_indication(void *instance,
+				    LINK_STATUS link, LOCK_STATUS lock)
 {
 	struct tsap_cb *self;
 
@@ -993,7 +997,7 @@
  *    Flow_indication : IrLAP tells us to send more data.
  *
  */
-void irttp_flow_indication(void *instance, void *sap, LOCAL_FLOW flow)
+static void irttp_flow_indication(void *instance, void *sap, LOCAL_FLOW flow)
 {
 	struct tsap_cb *self;
 
@@ -1613,7 +1617,7 @@
  *    for some reason should fail. We mark rx sdu as busy to apply back
  *    pressure is necessary.
  */
-void irttp_do_data_indication(struct tsap_cb *self, struct sk_buff *skb)
+static void irttp_do_data_indication(struct tsap_cb *self, struct sk_buff *skb)
 {
 	int err;
 
diff -Nru a/net/irda/parameters.c b/net/irda/parameters.c
--- a/net/irda/parameters.c	2005-01-10 20:11:20 -08:00
+++ b/net/irda/parameters.c	2005-01-10 20:11:20 -08:00
@@ -51,6 +51,8 @@
 static int irda_insert_no_value(void *self, __u8 *buf, int len, __u8 pi,
 				PV_TYPE type, PI_HANDLER func);
 
+static int irda_param_unpack(__u8 *buf, char *fmt, ...);
+
 /* Parameter value call table. Must match PV_TYPE */
 static PV_HANDLER pv_extract_table[] = {
 	irda_extract_integer, /* Handler for any length integers */
@@ -400,7 +402,7 @@
 /*
  * Function irda_param_unpack (skb, fmt, ...)
  */
-int irda_param_unpack(__u8 *buf, char *fmt, ...)
+static int irda_param_unpack(__u8 *buf, char *fmt, ...)
 {
 	irda_pv_t arg;
 	va_list args;
@@ -440,7 +442,6 @@
 
 	return 0;
 }
-EXPORT_SYMBOL(irda_param_unpack);
 
 /*
  * Function irda_param_insert (self, pi, buf, len, info)
@@ -496,13 +497,14 @@
 EXPORT_SYMBOL(irda_param_insert);
 
 /*
- * Function irda_param_extract_all (self, buf, len, info)
+ * Function irda_param_extract (self, buf, len, info)
  *
  *    Parse all parameters. If len is correct, then everything should be
  *    safe. Returns the number of bytes that was parsed
  *
  */
-int irda_param_extract(void *self, __u8 *buf, int len, pi_param_info_t *info)
+static int irda_param_extract(void *self, __u8 *buf, int len,
+			      pi_param_info_t *info)
 {
 	pi_minor_info_t *pi_minor_info;
 	__u8 pi_minor;
@@ -549,7 +551,6 @@
 						  type, pi_minor_info->func);
 	return ret;
 }
-EXPORT_SYMBOL(irda_param_extract);
 
 /*
  * Function irda_param_extract_all (self, buf, len, info)
diff -Nru a/net/irda/qos.c b/net/irda/qos.c
--- a/net/irda/qos.c	2005-01-10 20:11:22 -08:00
+++ b/net/irda/qos.c	2005-01-10 20:11:22 -08:00
@@ -96,6 +96,10 @@
 static int irlap_param_min_turn_time(void *instance, irda_param_t *param, 
 				     int get);
 
+#ifndef CONFIG_IRDA_DYNAMIC_WINDOW
+static __u32 irlap_requested_line_capacity(struct qos_info *qos);
+#endif
+
 static __u32 min_turn_times[]  = { 10000, 5000, 1000, 500, 100, 50, 10, 0 }; /* us */
 static __u32 baud_rates[]      = { 2400, 9600, 19200, 38400, 57600, 115200, 576000, 
 				   1152000, 4000000, 16000000 };           /* bps */
@@ -333,7 +337,7 @@
  *     Adjust QoS settings in case some values are not possible to use because
  *     of other settings
  */
-void irlap_adjust_qos_settings(struct qos_info *qos)
+static void irlap_adjust_qos_settings(struct qos_info *qos)
 {
 	__u32 line_capacity;
 	int index;
@@ -723,19 +727,22 @@
 	return line_capacity;
 }
 
-__u32 irlap_requested_line_capacity(struct qos_info *qos)
-{	__u32 line_capacity;
-	
-	line_capacity = qos->window_size.value * 
+#ifndef CONFIG_IRDA_DYNAMIC_WINDOW
+static __u32 irlap_requested_line_capacity(struct qos_info *qos)
+{
+	__u32 line_capacity;
+
+	line_capacity = qos->window_size.value *
 		(qos->data_size.value + 6 + qos->additional_bofs.value) +
-		irlap_min_turn_time_in_bytes(qos->baud_rate.value, 
+		irlap_min_turn_time_in_bytes(qos->baud_rate.value,
 					     qos->min_turn_time.value);
-	
+
 	IRDA_DEBUG(2, "%s(), requested line capacity=%d\n",
 		   __FUNCTION__, line_capacity);
-	
-	return line_capacity;			       		  
+
+	return line_capacity;
 }
+#endif
 
 void irda_qos_bits_to_value(struct qos_info *qos)
 {
diff -Nru a/net/key/af_key.c b/net/key/af_key.c
--- a/net/key/af_key.c	2005-01-10 20:11:24 -08:00
+++ b/net/key/af_key.c	2005-01-10 20:11:24 -08:00
@@ -35,7 +35,7 @@
 
 
 /* List of all pfkey sockets. */
-HLIST_HEAD(pfkey_table);
+static HLIST_HEAD(pfkey_table);
 static DECLARE_WAIT_QUEUE_HEAD(pfkey_table_wait);
 static rwlock_t pfkey_table_lock = RW_LOCK_UNLOCKED;
 static atomic_t pfkey_table_users = ATOMIC_INIT(0);
diff -Nru a/net/llc/llc_c_ac.c b/net/llc/llc_c_ac.c
--- a/net/llc/llc_c_ac.c	2005-01-10 20:11:23 -08:00
+++ b/net/llc/llc_c_ac.c	2005-01-10 20:11:23 -08:00
@@ -33,6 +33,13 @@
 static void llc_process_tmr_ev(struct sock *sk, struct sk_buff *skb);
 static int llc_conn_ac_data_confirm(struct sock *sk, struct sk_buff *ev);
 
+static int llc_conn_ac_inc_npta_value(struct sock *sk, struct sk_buff *skb);
+
+static int llc_conn_ac_send_rr_rsp_f_set_ackpf(struct sock *sk,
+					       struct sk_buff *skb);
+
+static int llc_conn_ac_set_p_flag_1(struct sock *sk, struct sk_buff *skb);
+
 #define INCORRECT 0
 
 int llc_conn_ac_clear_remote_busy(struct sock *sk, struct sk_buff *skb)
@@ -185,11 +192,6 @@
 	return 0;
 }
 
-int llc_conn_ac_report_status(struct sock *sk, struct sk_buff *skb)
-{
-	return 0;
-}
-
 int llc_conn_ac_clear_remote_busy_if_f_eq_1(struct sock *sk,
 					    struct sk_buff *skb)
 {
@@ -291,32 +293,6 @@
 	goto out;
 }
 
-int llc_conn_ac_send_dm_rsp_f_set_f_flag(struct sock *sk, struct sk_buff *skb)
-{
-	int rc = -ENOBUFS;
-	struct sk_buff *nskb = llc_alloc_frame();
-
-	if (nskb) {
-		struct llc_opt *llc = llc_sk(sk);
-		struct llc_sap *sap = llc->sap;
-		u8 f_bit = llc->f_flag;
-
-		nskb->dev = llc->dev;
-		llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, sap->laddr.lsap,
-				    llc->daddr.lsap, LLC_PDU_RSP);
-		llc_pdu_init_as_dm_rsp(nskb, f_bit);
-		rc = llc_mac_hdr_init(nskb, llc->dev->dev_addr, llc->daddr.mac);
-		if (rc)
-			goto free;
-		llc_conn_send_pdu(sk, nskb);
-	}
-out:
-	return rc;
-free:
-	kfree_skb(nskb);
-	goto out;
-}
-
 int llc_conn_ac_send_frmr_rsp_f_set_x(struct sock *sk, struct sk_buff *skb)
 {
 	u8 f_bit;
@@ -426,7 +402,7 @@
 	return rc;
 }
 
-int llc_conn_ac_send_i_cmd_p_set_0(struct sock *sk, struct sk_buff *skb)
+static int llc_conn_ac_send_i_cmd_p_set_0(struct sock *sk, struct sk_buff *skb)
 {
 	int rc;
 	struct llc_opt *llc = llc_sk(sk);
@@ -443,27 +419,6 @@
 	return rc;
 }
 
-int llc_conn_ac_resend_i_cmd_p_set_1(struct sock *sk, struct sk_buff *skb)
-{
-	struct llc_pdu_sn *pdu = llc_pdu_sn_hdr(skb);
-	u8 nr = LLC_I_GET_NR(pdu);
-
-	llc_conn_resend_i_pdu_as_cmd(sk, nr, 1);
-	return 0;
-}
-
-int llc_conn_ac_resend_i_cmd_p_set_1_or_send_rr(struct sock *sk,
-						struct sk_buff *skb)
-{
-	struct llc_pdu_sn *pdu = llc_pdu_sn_hdr(skb);
-	u8 nr = LLC_I_GET_NR(pdu);
-	int rc = llc_conn_ac_send_rr_cmd_p_set_1(sk, skb);
-
-	if (!rc)
-		llc_conn_resend_i_pdu_as_cmd(sk, nr, 0);
-	return rc;
-}
-
 int llc_conn_ac_send_i_xxx_x_set_0(struct sock *sk, struct sk_buff *skb)
 {
 	int rc;
@@ -745,31 +700,6 @@
 	goto out;
 }
 
-int llc_conn_ac_send_ack_cmd_p_set_1(struct sock *sk, struct sk_buff *skb)
-{
-	int rc = -ENOBUFS;
-	struct sk_buff *nskb = llc_alloc_frame();
-
-	if (nskb) {
-		struct llc_opt *llc = llc_sk(sk);
-		struct llc_sap *sap = llc->sap;
-
-		nskb->dev = llc->dev;
-		llc_pdu_header_init(nskb, LLC_PDU_TYPE_S, sap->laddr.lsap,
-				    llc->daddr.lsap, LLC_PDU_CMD);
-		llc_pdu_init_as_rr_cmd(nskb, 1, llc->vR);
-		rc = llc_mac_hdr_init(nskb, llc->dev->dev_addr, llc->daddr.mac);
-		if (rc)
-			goto free;
-		llc_conn_send_pdu(sk, nskb);
-	}
-out:
-	return rc;
-free:
-	kfree_skb(nskb);
-	goto out;
-}
-
 int llc_conn_ac_send_rr_rsp_f_set_1(struct sock *sk, struct sk_buff *skb)
 {
 	int rc = -ENOBUFS;
@@ -911,31 +841,6 @@
 	goto out;
 }
 
-int llc_conn_ac_send_ua_rsp_f_set_f_flag(struct sock *sk, struct sk_buff *skb)
-{
-	int rc = -ENOBUFS;
-	struct sk_buff *nskb = llc_alloc_frame();
-
-	if (nskb) {
-		struct llc_opt *llc = llc_sk(sk);
-		struct llc_sap *sap = llc->sap;
-
-		nskb->dev = llc->dev;
-		llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, sap->laddr.lsap,
-				    llc->daddr.lsap, LLC_PDU_RSP);
-		llc_pdu_init_as_ua_rsp(nskb, llc->f_flag);
-		rc = llc_mac_hdr_init(nskb, llc->dev->dev_addr, llc->daddr.mac);
-		if (rc)
-			goto free;
-		llc_conn_send_pdu(sk, nskb);
-	}
-out:
-	return rc;
-free:
-	kfree_skb(nskb);
-	goto out;
-}
-
 int llc_conn_ac_send_ua_rsp_f_set_p(struct sock *sk, struct sk_buff *skb)
 {
 	u8 f_bit;
@@ -1041,7 +946,8 @@
  *	set to one if one PDU with p-bit set to one is received.  Returns 0 for
  *	success, 1 otherwise.
  */
-int llc_conn_ac_send_i_rsp_f_set_ackpf(struct sock *sk, struct sk_buff *skb)
+static int llc_conn_ac_send_i_rsp_f_set_ackpf(struct sock *sk,
+					      struct sk_buff *skb)
 {
 	int rc;
 	struct llc_opt *llc = llc_sk(sk);
@@ -1091,7 +997,8 @@
  *	if there is any. ack_pf flag indicates if a PDU has been received with
  *	p-bit set to one. Returns 0 for success, 1 otherwise.
  */
-int llc_conn_ac_send_rr_rsp_f_set_ackpf(struct sock *sk, struct sk_buff *skb)
+static int llc_conn_ac_send_rr_rsp_f_set_ackpf(struct sock *sk,
+					       struct sk_buff *skb)
 {
 	int rc = -ENOBUFS;
 	struct sk_buff *nskb = llc_alloc_frame();
@@ -1126,7 +1033,7 @@
  *	acknowledgements decreases by increasing of "npta". Returns 0 for
  *	success, 1 otherwise.
  */
-int llc_conn_ac_inc_npta_value(struct sock *sk, struct sk_buff *skb)
+static int llc_conn_ac_inc_npta_value(struct sock *sk, struct sk_buff *skb)
 {
 	struct llc_opt *llc = llc_sk(sk);
 
@@ -1387,7 +1294,7 @@
 	return 0;
 }
 
-int llc_conn_ac_set_p_flag_1(struct sock *sk, struct sk_buff *skb)
+static int llc_conn_ac_set_p_flag_1(struct sock *sk, struct sk_buff *skb)
 {
 	llc_conn_set_p_flag(sk, 1);
 	return 0;
@@ -1450,12 +1357,6 @@
 int llc_conn_ac_inc_vs_by_1(struct sock *sk, struct sk_buff *skb)
 {
 	llc_sk(sk)->vS = (llc_sk(sk)->vS + 1) % 128;
-	return 0;
-}
-
-int llc_conn_ac_set_f_flag_p(struct sock *sk, struct sk_buff *skb)
-{
-	llc_pdu_decode_pf_bit(skb, &llc_sk(sk)->f_flag);
 	return 0;
 }
 
diff -Nru a/net/llc/llc_c_ev.c b/net/llc/llc_c_ev.c
--- a/net/llc/llc_c_ev.c	2005-01-10 20:11:16 -08:00
+++ b/net/llc/llc_c_ev.c	2005-01-10 20:11:16 -08:00
@@ -105,14 +105,6 @@
 	       ev->prim_type == LLC_PRIM_TYPE_REQ ? 0 : 1;
 }
 
-int llc_conn_ev_conn_resp(struct sock *sk, struct sk_buff *skb)
-{
-	struct llc_conn_state_ev *ev = llc_conn_ev(skb);
-
-	return ev->prim == LLC_CONN_PRIM &&
-	       ev->prim_type == LLC_PRIM_TYPE_RESP ? 0 : 1;
-}
-
 int llc_conn_ev_data_req(struct sock *sk, struct sk_buff *skb)
 {
 	struct llc_conn_state_ev *ev = llc_conn_ev(skb);
@@ -137,14 +129,6 @@
 	       ev->prim_type == LLC_PRIM_TYPE_REQ ? 0 : 1;
 }
 
-int llc_conn_ev_rst_resp(struct sock *sk, struct sk_buff *skb)
-{
-	struct llc_conn_state_ev *ev = llc_conn_ev(skb);
-
-	return ev->prim == LLC_RESET_PRIM &&
-	       ev->prim_type == LLC_PRIM_TYPE_RESP ? 0 : 1;
-}
-
 int llc_conn_ev_local_busy_detected(struct sock *sk, struct sk_buff *skb)
 {
 	struct llc_conn_state_ev *ev = llc_conn_ev(skb);
@@ -474,27 +458,6 @@
 	return rc;
 }
 
-int llc_conn_ev_rx_xxx_cmd_pbit_set_0(struct sock *sk, struct sk_buff *skb)
-{
-	u16 rc = 1;
-	struct llc_pdu_sn *pdu = llc_pdu_sn_hdr(skb);
-
-	if (LLC_PDU_IS_CMD(pdu)) {
-		if (LLC_PDU_TYPE_IS_I(pdu) || LLC_PDU_TYPE_IS_S(pdu)) {
-			if (LLC_I_PF_IS_0(pdu))
-				rc = 0;
-		} else if (LLC_PDU_TYPE_IS_U(pdu))
-			switch (LLC_U_PDU_CMD(pdu)) {
-			case LLC_2_PDU_CMD_SABME:
-			case LLC_2_PDU_CMD_DISC:
-				if (LLC_U_PF_IS_0(pdu))
-					rc = 0;
-				break;
-			}
-	}
-	return rc;
-}
-
 int llc_conn_ev_rx_xxx_cmd_pbit_set_x(struct sock *sk, struct sk_buff *skb)
 {
 	u16 rc = 1;
@@ -557,26 +520,6 @@
 	return rc;
 }
 
-int llc_conn_ev_rx_xxx_yyy(struct sock *sk, struct sk_buff *skb)
-{
-	u16 rc = 1;
-	struct llc_pdu_un *pdu = llc_pdu_un_hdr(skb);
-
-	if (LLC_PDU_TYPE_IS_I(pdu) || LLC_PDU_TYPE_IS_S(pdu))
-		rc = 0;
-	else if (LLC_PDU_TYPE_IS_U(pdu))
-		switch (LLC_U_PDU_CMD(pdu)) {
-		case LLC_2_PDU_CMD_SABME:
-		case LLC_2_PDU_CMD_DISC:
-		case LLC_2_PDU_RSP_UA:
-		case LLC_2_PDU_RSP_DM:
-		case LLC_2_PDU_RSP_FRMR:
-			rc = 0;
-			break;
-		}
-	return rc;
-}
-
 int llc_conn_ev_rx_zzz_cmd_pbit_set_x_inval_nr(struct sock *sk,
 					       struct sk_buff *skb)
 {
@@ -646,16 +589,6 @@
 	return ev->type != LLC_CONN_EV_TYPE_BUSY_TMR;
 }
 
-int llc_conn_ev_any_tmr_exp(struct sock *sk, struct sk_buff *skb)
-{
-	struct llc_conn_state_ev *ev = llc_conn_ev(skb);
-
-	return ev->type == LLC_CONN_EV_TYPE_P_TMR ||
-	       ev->type == LLC_CONN_EV_TYPE_ACK_TMR ||
-	       ev->type == LLC_CONN_EV_TYPE_REJ_TMR ||
-	       ev->type == LLC_CONN_EV_TYPE_BUSY_TMR ? 0 : 1;
-}
-
 int llc_conn_ev_init_p_f_cycle(struct sock *sk, struct sk_buff *skb)
 {
 	return 1;
@@ -778,11 +711,6 @@
 	return llc_sk(sk)->cause_flag;
 }
 
-int llc_conn_ev_qlfy_init_p_f_cycle(struct sock *sk, struct sk_buff *skb)
-{
-	return 0;
-}
-
 int llc_conn_ev_qlfy_set_status_conn(struct sock *sk, struct sk_buff *skb)
 {
 	struct llc_conn_state_ev *ev = llc_conn_ev(skb);
@@ -799,14 +727,6 @@
 	return 0;
 }
 
-int llc_conn_ev_qlfy_set_status_impossible(struct sock *sk, struct sk_buff *skb)
-{
-	struct llc_conn_state_ev *ev = llc_conn_ev(skb);
-
-	ev->status = LLC_STATUS_IMPOSSIBLE;
-	return 0;
-}
-
 int llc_conn_ev_qlfy_set_status_failed(struct sock *sk, struct sk_buff *skb)
 {
 	struct llc_conn_state_ev *ev = llc_conn_ev(skb);
@@ -821,14 +741,6 @@
 	struct llc_conn_state_ev *ev = llc_conn_ev(skb);
 
 	ev->status = LLC_STATUS_REMOTE_BUSY;
-	return 0;
-}
-
-int llc_conn_ev_qlfy_set_status_received(struct sock *sk, struct sk_buff *skb)
-{
-	struct llc_conn_state_ev *ev = llc_conn_ev(skb);
-
-	ev->status = LLC_STATUS_RECEIVED;
 	return 0;
 }
 
diff -Nru a/net/llc/llc_conn.c b/net/llc/llc_conn.c
--- a/net/llc/llc_conn.c	2005-01-10 20:11:16 -08:00
+++ b/net/llc/llc_conn.c	2005-01-10 20:11:16 -08:00
@@ -503,7 +503,8 @@
  *	local mac, and local sap. Returns pointer for parent socket found,
  *	%NULL otherwise.
  */
-struct sock *llc_lookup_listener(struct llc_sap *sap, struct llc_addr *laddr)
+static struct sock *llc_lookup_listener(struct llc_sap *sap,
+					struct llc_addr *laddr)
 {
 	struct sock *rc;
 	struct hlist_node *node;
@@ -546,7 +547,7 @@
  *	Finds offset of next category of transitions in transition table.
  *	Returns the start index of next category.
  */
-u16 find_next_offset(struct llc_conn_state *state, u16 offset)
+static u16 find_next_offset(struct llc_conn_state *state, u16 offset)
 {
 	u16 cnt = 0;
 	struct llc_conn_state_trans **next_trans;
@@ -785,7 +786,7 @@
  *
  *     Initializes a socket with default llc values.
  */
-int llc_sk_init(struct sock* sk)
+static int llc_sk_init(struct sock* sk)
 {
 	struct llc_opt *llc = kmalloc(sizeof(*llc), GFP_ATOMIC);
 	int rc = -ENOMEM;
diff -Nru a/net/llc/llc_core.c b/net/llc/llc_core.c
--- a/net/llc/llc_core.c	2005-01-10 20:11:15 -08:00
+++ b/net/llc/llc_core.c	2005-01-10 20:11:15 -08:00
@@ -31,7 +31,7 @@
  *
  *	Allocates and initializes sap.
  */
-struct llc_sap *llc_sap_alloc(void)
+static struct llc_sap *llc_sap_alloc(void)
 {
 	struct llc_sap *sap = kmalloc(sizeof(*sap), GFP_ATOMIC);
 
@@ -50,7 +50,7 @@
  *
  *	Adds a sap to the LLC's station sap list.
  */
-void llc_add_sap(struct llc_sap *sap)
+static void llc_add_sap(struct llc_sap *sap)
 {
 	write_lock_bh(&llc_sap_list_lock);
 	list_add_tail(&sap->node, &llc_sap_list);
@@ -63,7 +63,7 @@
  *
  *	Removes a sap to the LLC's station sap list.
  */
-void llc_del_sap(struct llc_sap *sap)
+static void llc_del_sap(struct llc_sap *sap)
 {
 	write_lock_bh(&llc_sap_list_lock);
 	list_del(&sap->node);
diff -Nru a/net/llc/llc_if.c b/net/llc/llc_if.c
--- a/net/llc/llc_if.c	2005-01-10 20:11:19 -08:00
+++ b/net/llc/llc_if.c	2005-01-10 20:11:19 -08:00
@@ -155,27 +155,3 @@
 	return rc;
 }
 
-/**
- *	llc_build_and_send_reset_pkt - Resets an established LLC connection
- *	@prim: pointer to structure that contains service parameters.
- *
- *	Called when upper layer wants to reset an established LLC connection
- *	with a remote machine. This function packages a proper event and sends
- *	it to connection component state machine. Returns 0 for success, 1
- *	otherwise.
- */
-int llc_build_and_send_reset_pkt(struct sock *sk)
-{
-	int rc = 1;
-	struct sk_buff *skb = alloc_skb(0, GFP_ATOMIC);
-
-	if (skb) {
-		struct llc_conn_state_ev *ev = llc_conn_ev(skb);
-
-		ev->type      = LLC_CONN_EV_TYPE_PRIM;
-		ev->prim      = LLC_RESET_PRIM;
-		ev->prim_type = LLC_PRIM_TYPE_REQ;
-		rc = llc_conn_state_process(sk, skb);
-	}
-	return rc;
-}
diff -Nru a/net/llc/llc_pdu.c b/net/llc/llc_pdu.c
--- a/net/llc/llc_pdu.c	2005-01-10 20:11:17 -08:00
+++ b/net/llc/llc_pdu.c	2005-01-10 20:11:17 -08:00
@@ -80,19 +80,6 @@
 }
 
 /**
- *	llc_pdu_decode_cr_bit - extracts command response bit from LLC header
- *	@skb: input skb that c/r bit must be extracted from it.
- *	@cr_bit: command/response bit (0 or 1).
- *
- *	This function extracts command/response bit from LLC header. this bit
- *	is right bit of source SAP.
- */
-void llc_pdu_decode_cr_bit(struct sk_buff *skb, u8 *cr_bit)
-{
-	*cr_bit = llc_pdu_un_hdr(skb)->ssap & LLC_PDU_CMD_RSP_MASK;
-}
-
-/**
  *	llc_pdu_init_as_disc_cmd - Builds DISC PDU
  *	@skb: Address of the skb to build
  *	@p_bit: The P bit to set in the PDU
diff -Nru a/net/llc/llc_proc.c b/net/llc/llc_proc.c
--- a/net/llc/llc_proc.c	2005-01-10 20:11:16 -08:00
+++ b/net/llc/llc_proc.c	2005-01-10 20:11:16 -08:00
@@ -185,14 +185,14 @@
 	return 0;
 }
 
-struct seq_operations llc_seq_socket_ops = {
+static struct seq_operations llc_seq_socket_ops = {
 	.start  = llc_seq_start,
 	.next   = llc_seq_next,
 	.stop   = llc_seq_stop,
 	.show   = llc_seq_socket_show,
 };
 
-struct seq_operations llc_seq_core_ops = {
+static struct seq_operations llc_seq_core_ops = {
 	.start  = llc_seq_start,
 	.next   = llc_seq_next,
 	.stop   = llc_seq_stop,
diff -Nru a/net/llc/llc_sap.c b/net/llc/llc_sap.c
--- a/net/llc/llc_sap.c	2005-01-10 20:11:21 -08:00
+++ b/net/llc/llc_sap.c	2005-01-10 20:11:21 -08:00
@@ -173,7 +173,7 @@
  *	if needed(on receiving an UI frame). sk can be null for the
  *	datalink_proto case.
  */
-void llc_sap_state_process(struct llc_sap *sap, struct sk_buff *skb)
+static void llc_sap_state_process(struct llc_sap *sap, struct sk_buff *skb)
 {
 	struct llc_sap_state_ev *ev = llc_sap_ev(skb);
 
@@ -275,7 +275,8 @@
  *	Search socket list of the SAP and finds connection using the local
  *	mac, and local sap. Returns pointer for socket found, %NULL otherwise.
  */
-struct sock *llc_lookup_dgram(struct llc_sap *sap, struct llc_addr *laddr)
+static struct sock *llc_lookup_dgram(struct llc_sap *sap,
+				     struct llc_addr *laddr)
 {
 	struct sock *rc;
 	struct hlist_node *node;
diff -Nru a/net/llc/llc_station.c b/net/llc/llc_station.c
--- a/net/llc/llc_station.c	2005-01-10 20:11:18 -08:00
+++ b/net/llc/llc_station.c	2005-01-10 20:11:18 -08:00
@@ -642,7 +642,7 @@
  *	Queues an event (on the station event queue) for handling by the
  *	station state machine and attempts to process any queued-up events.
  */
-void llc_station_state_process(struct sk_buff *skb)
+static void llc_station_state_process(struct sk_buff *skb)
 {
 	spin_lock_bh(&llc_main_station.ev_q.lock);
 	skb_queue_tail(&llc_main_station.ev_q.list, skb);
diff -Nru a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
--- a/net/netlink/af_netlink.c	2005-01-10 20:11:19 -08:00
+++ b/net/netlink/af_netlink.c	2005-01-10 20:11:19 -08:00
@@ -546,7 +546,7 @@
 	}
 }
 
-struct sock *netlink_getsockbypid(struct sock *ssk, u32 pid)
+static struct sock *netlink_getsockbypid(struct sock *ssk, u32 pid)
 {
 	int protocol = ssk->sk_protocol;
 	struct sock *sock;
@@ -1210,30 +1210,6 @@
  *	Backward compatibility.
  */	
  
-int netlink_attach(int unit, int (*function)(int, struct sk_buff *skb))
-{
-	struct sock *sk = netlink_kernel_create(unit, NULL);
-	if (sk == NULL)
-		return -ENOBUFS;
-	nlk_sk(sk)->handler = function;
-	write_lock_bh(&nl_emu_lock);
-	netlink_kernel[unit] = sk->sk_socket;
-	write_unlock_bh(&nl_emu_lock);
-	return 0;
-}
-
-void netlink_detach(int unit)
-{
-	struct socket *sock;
-
-	write_lock_bh(&nl_emu_lock);
-	sock = netlink_kernel[unit];
-	netlink_kernel[unit] = NULL;
-	write_unlock_bh(&nl_emu_lock);
-
-	sock_release(sock);
-}
-
 int netlink_post(int unit, struct sk_buff *skb)
 {
 	struct socket *sock;
@@ -1522,7 +1498,5 @@
 EXPORT_SYMBOL(netlink_unregister_notifier);
 
 #if defined(CONFIG_NETLINK_DEV) || defined(CONFIG_NETLINK_DEV_MODULE)
-EXPORT_SYMBOL(netlink_attach);
-EXPORT_SYMBOL(netlink_detach);
 EXPORT_SYMBOL(netlink_post);
 #endif
diff -Nru a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c
--- a/net/netrom/af_netrom.c	2005-01-10 20:11:19 -08:00
+++ b/net/netrom/af_netrom.c	2005-01-10 20:11:19 -08:00
@@ -43,7 +43,7 @@
 #include <net/arp.h>
 #include <linux/init.h>
 
-int nr_ndevs = 4;
+static int nr_ndevs = 4;
 
 int sysctl_netrom_default_path_quality            = NR_DEFAULT_QUAL;
 int sysctl_netrom_obsolescence_count_initialiser  = NR_DEFAULT_OBS;
diff -Nru a/net/netrom/nr_route.c b/net/netrom/nr_route.c
--- a/net/netrom/nr_route.c	2005-01-10 20:11:23 -08:00
+++ b/net/netrom/nr_route.c	2005-01-10 20:11:23 -08:00
@@ -45,7 +45,7 @@
 static HLIST_HEAD(nr_neigh_list);
 static spinlock_t nr_neigh_list_lock = SPIN_LOCK_UNLOCKED;
 
-struct nr_node *nr_node_get(ax25_address *callsign)
+static struct nr_node *nr_node_get(ax25_address *callsign)
 {
 	struct nr_node *found = NULL;
 	struct nr_node *nr_node;
@@ -62,7 +62,8 @@
 	return found;
 }
 
-struct nr_neigh *nr_neigh_get_dev(ax25_address *callsign, struct net_device *dev)
+static struct nr_neigh *nr_neigh_get_dev(ax25_address *callsign,
+					 struct net_device *dev)
 {
 	struct nr_neigh *found = NULL;
 	struct nr_neigh *nr_neigh;
diff -Nru a/net/packet/af_packet.c b/net/packet/af_packet.c
--- a/net/packet/af_packet.c	2005-01-10 20:11:20 -08:00
+++ b/net/packet/af_packet.c	2005-01-10 20:11:20 -08:00
@@ -145,10 +145,10 @@
  */
 
 /* List of all packet sockets. */
-HLIST_HEAD(packet_sklist);
+static HLIST_HEAD(packet_sklist);
 static rwlock_t packet_sklist_lock = RW_LOCK_UNLOCKED;
 
-atomic_t packet_socks_nr;
+static atomic_t packet_socks_nr;
 
 
 /* Private packet socket structures. */
@@ -215,7 +215,7 @@
 
 #define pkt_sk(__sk) ((struct packet_opt *)(__sk)->sk_protinfo)
 
-void packet_sock_destruct(struct sock *sk)
+static void packet_sock_destruct(struct sock *sk)
 {
 	BUG_TRAP(!atomic_read(&sk->sk_rmem_alloc));
 	BUG_TRAP(!atomic_read(&sk->sk_wmem_alloc));
@@ -234,10 +234,10 @@
 }
 
 
-extern struct proto_ops packet_ops;
+static struct proto_ops packet_ops;
 
 #ifdef CONFIG_SOCK_PACKET
-extern struct proto_ops packet_ops_spkt;
+static struct proto_ops packet_ops_spkt;
 
 static int packet_rcv_spkt(struct sk_buff *skb, struct net_device *dev,  struct packet_type *pt)
 {
@@ -1350,8 +1350,8 @@
 	}
 }
 
-int packet_getsockopt(struct socket *sock, int level, int optname,
-		      char __user *optval, int __user *optlen)
+static int packet_getsockopt(struct socket *sock, int level, int optname,
+			     char __user *optval, int __user *optlen)
 {
 	int len;
 	struct sock *sk = sock->sk;
@@ -1500,7 +1500,8 @@
 #define packet_poll datagram_poll
 #else
 
-unsigned int packet_poll(struct file * file, struct socket *sock, poll_table *wait)
+static unsigned int packet_poll(struct file * file, struct socket *sock,
+				poll_table *wait)
 {
 	struct sock *sk = sock->sk;
 	struct packet_opt *po = pkt_sk(sk);
@@ -1747,7 +1748,7 @@
 
 
 #ifdef CONFIG_SOCK_PACKET
-struct proto_ops packet_ops_spkt = {
+static struct proto_ops packet_ops_spkt = {
 	.family =	PF_PACKET,
 	.owner =	THIS_MODULE,
 	.release =	packet_release,
@@ -1769,7 +1770,7 @@
 };
 #endif
 
-struct proto_ops packet_ops = {
+static struct proto_ops packet_ops = {
 	.family =	PF_PACKET,
 	.owner =	THIS_MODULE,
 	.release =	packet_release,
diff -Nru a/net/rose/af_rose.c b/net/rose/af_rose.c
--- a/net/rose/af_rose.c	2005-01-10 20:11:19 -08:00
+++ b/net/rose/af_rose.c	2005-01-10 20:11:19 -08:00
@@ -59,7 +59,7 @@
 int sysctl_rose_window_size             = ROSE_DEFAULT_WINDOW_SIZE;
 
 static HLIST_HEAD(rose_list);
-spinlock_t rose_list_lock = SPIN_LOCK_UNLOCKED;
+static spinlock_t rose_list_lock = SPIN_LOCK_UNLOCKED;
 
 static struct proto_ops rose_proto_ops;
 
diff -Nru a/net/rose/rose_dev.c b/net/rose/rose_dev.c
--- a/net/rose/rose_dev.c	2005-01-10 20:11:17 -08:00
+++ b/net/rose/rose_dev.c	2005-01-10 20:11:17 -08:00
@@ -37,38 +37,6 @@
 #include <net/ax25.h>
 #include <net/rose.h>
 
-/*
- *	Only allow IP over ROSE frames through if the netrom device is up.
- */
-
-int rose_rx_ip(struct sk_buff *skb, struct net_device *dev)
-{
-	struct net_device_stats *stats = (struct net_device_stats *)dev->priv;
-
-#ifdef CONFIG_INET
-	if (!netif_running(dev)) {
-		stats->rx_errors++;
-		return 0;
-	}
-
-	stats->rx_packets++;
-	stats->rx_bytes += skb->len;
-
-	skb->protocol = htons(ETH_P_IP);
-
-	/* Spoof incoming device */
-	skb->dev      = dev;
-	skb->h.raw    = skb->data;
-	skb->nh.raw   = skb->data;
-	skb->pkt_type = PACKET_HOST;
-
-	ip_rcv(skb, skb->dev, NULL);
-#else
-	kfree_skb(skb);
-#endif
-	return 1;
-}
-
 static int rose_header(struct sk_buff *skb, struct net_device *dev, unsigned short type,
 	void *daddr, void *saddr, unsigned len)
 {
diff -Nru a/net/rose/rose_link.c b/net/rose/rose_link.c
--- a/net/rose/rose_link.c	2005-01-10 20:11:19 -08:00
+++ b/net/rose/rose_link.c	2005-01-10 20:11:19 -08:00
@@ -31,6 +31,9 @@
 static void rose_ftimer_expiry(unsigned long);
 static void rose_t0timer_expiry(unsigned long);
 
+static void rose_transmit_restart_confirmation(struct rose_neigh *neigh);
+static void rose_transmit_restart_request(struct rose_neigh *neigh);
+
 void rose_start_ftimer(struct rose_neigh *neigh)
 {
 	del_timer(&neigh->ftimer);
@@ -42,7 +45,7 @@
 	add_timer(&neigh->ftimer);
 }
 
-void rose_start_t0timer(struct rose_neigh *neigh)
+static void rose_start_t0timer(struct rose_neigh *neigh)
 {
 	del_timer(&neigh->t0timer);
 
@@ -68,7 +71,7 @@
 	return timer_pending(&neigh->ftimer);
 }
 
-int rose_t0timer_running(struct rose_neigh *neigh)
+static int rose_t0timer_running(struct rose_neigh *neigh)
 {
 	return timer_pending(&neigh->t0timer);
 }
@@ -165,7 +168,7 @@
 /*
  *	This routine is called when a Restart Request is needed
  */
-void rose_transmit_restart_request(struct rose_neigh *neigh)
+static void rose_transmit_restart_request(struct rose_neigh *neigh)
 {
 	struct sk_buff *skb;
 	unsigned char *dptr;
@@ -194,7 +197,7 @@
 /*
  * This routine is called when a Restart Confirmation is needed
  */
-void rose_transmit_restart_confirmation(struct rose_neigh *neigh)
+static void rose_transmit_restart_confirmation(struct rose_neigh *neigh)
 {
 	struct sk_buff *skb;
 	unsigned char *dptr;
@@ -213,34 +216,6 @@
 	*dptr++ = ROSE_GFI;
 	*dptr++ = 0x00;
 	*dptr++ = ROSE_RESTART_CONFIRMATION;
-
-	if (!rose_send_frame(skb, neigh))
-		kfree_skb(skb);
-}
-
-/*
- * This routine is called when a Diagnostic is required.
- */
-void rose_transmit_diagnostic(struct rose_neigh *neigh, unsigned char diag)
-{
-	struct sk_buff *skb;
-	unsigned char *dptr;
-	int len;
-
-	len = AX25_BPQ_HEADER_LEN + AX25_MAX_HEADER_LEN + ROSE_MIN_LEN + 2;
-
-	if ((skb = alloc_skb(len, GFP_ATOMIC)) == NULL)
-		return;
-
-	skb_reserve(skb, AX25_BPQ_HEADER_LEN + AX25_MAX_HEADER_LEN);
-
-	dptr = skb_put(skb, ROSE_MIN_LEN + 2);
-
-	*dptr++ = AX25_P_ROSE;
-	*dptr++ = ROSE_GFI;
-	*dptr++ = 0x00;
-	*dptr++ = ROSE_DIAGNOSTIC;
-	*dptr++ = diag;
 
 	if (!rose_send_frame(skb, neigh))
 		kfree_skb(skb);
diff -Nru a/net/rose/rose_route.c b/net/rose/rose_route.c
--- a/net/rose/rose_route.c	2005-01-10 20:11:23 -08:00
+++ b/net/rose/rose_route.c	2005-01-10 20:11:23 -08:00
@@ -41,7 +41,7 @@
 
 static struct rose_node  *rose_node_list;
 static spinlock_t rose_node_list_lock = SPIN_LOCK_UNLOCKED;
-struct rose_neigh *rose_neigh_list;
+static struct rose_neigh *rose_neigh_list;
 static spinlock_t rose_neigh_list_lock = SPIN_LOCK_UNLOCKED;
 static struct rose_route *rose_route_list;
 static spinlock_t rose_route_list_lock = SPIN_LOCK_UNLOCKED;
@@ -587,7 +587,7 @@
 /*
  *	Check that the device given is a valid AX.25 interface that is "up".
  */
-struct net_device *rose_ax25_dev_get(char *devname)
+static struct net_device *rose_ax25_dev_get(char *devname)
 {
 	struct net_device *dev;
 
diff -Nru a/net/rose/rose_subr.c b/net/rose/rose_subr.c
--- a/net/rose/rose_subr.c	2005-01-10 20:11:23 -08:00
+++ b/net/rose/rose_subr.c	2005-01-10 20:11:23 -08:00
@@ -28,6 +28,8 @@
 #include <linux/interrupt.h>
 #include <net/rose.h>
 
+static int rose_create_facilities(unsigned char *buffer, rose_cb *rose);
+
 /*
  *	This routine purges all of the queues of frames.
  */
@@ -394,7 +396,7 @@
 	return 1;
 }
 
-int rose_create_facilities(unsigned char *buffer, rose_cb *rose)
+static int rose_create_facilities(unsigned char *buffer, rose_cb *rose)
 {
 	unsigned char *p = buffer + 1;
 	char *callsign;
diff -Nru a/net/rxrpc/call.c b/net/rxrpc/call.c
--- a/net/rxrpc/call.c	2005-01-10 20:11:21 -08:00
+++ b/net/rxrpc/call.c	2005-01-10 20:11:21 -08:00
@@ -26,10 +26,10 @@
 LIST_HEAD(rxrpc_calls);
 DECLARE_RWSEM(rxrpc_calls_sem);
 
-unsigned rxrpc_call_rcv_timeout		= HZ/3;
-unsigned rxrpc_call_acks_timeout	= HZ/3;
-unsigned rxrpc_call_dfr_ack_timeout	= HZ/20;
-unsigned short rxrpc_call_max_resend	= HZ/10;
+unsigned rxrpc_call_rcv_timeout			= HZ/3;
+static unsigned rxrpc_call_acks_timeout		= HZ/3;
+static unsigned rxrpc_call_dfr_ack_timeout	= HZ/20;
+static unsigned short rxrpc_call_max_resend	= HZ/10;
 
 const char *rxrpc_call_states[] = {
 	"COMPLETE",
@@ -58,7 +58,7 @@
 	"?09", "?10", "?11", "?12", "?13", "?14", "?15"
 };
 
-const char *rxrpc_acks[] = {
+static const char *rxrpc_acks[] = {
 	"---", "REQ", "DUP", "SEQ", "WIN", "MEM", "PNG", "PNR", "DLY", "IDL",
 	"-?-"
 };
@@ -79,6 +79,9 @@
 				 struct rxrpc_message *msg,
 				 rxrpc_seq_t seq,
 				 size_t count);
+
+static int rxrpc_call_flush(struct rxrpc_call *call);
+
 #define _state(call) \
 	_debug("[[[ state %s ]]]", rxrpc_call_states[call->app_call_state]);
 
@@ -2079,7 +2082,7 @@
 /*
  * flush outstanding packets to the network
  */
-int rxrpc_call_flush(struct rxrpc_call *call)
+static int rxrpc_call_flush(struct rxrpc_call *call)
 {
 	struct rxrpc_message *msg;
 	int ret = 0;
diff -Nru a/net/rxrpc/connection.c b/net/rxrpc/connection.c
--- a/net/rxrpc/connection.c	2005-01-10 20:11:20 -08:00
+++ b/net/rxrpc/connection.c	2005-01-10 20:11:20 -08:00
@@ -30,6 +30,8 @@
 DECLARE_RWSEM(rxrpc_conns_sem);
 unsigned long rxrpc_conn_timeout = 60 * 60;
 
+static void rxrpc_conn_do_timeout(struct rxrpc_connection *conn);
+
 static void __rxrpc_conn_timeout(rxrpc_timer_t *timer)
 {
 	struct rxrpc_connection *conn =
@@ -415,7 +417,7 @@
 /*
  * free a connection record
  */
-void rxrpc_conn_do_timeout(struct rxrpc_connection *conn)
+static void rxrpc_conn_do_timeout(struct rxrpc_connection *conn)
 {
 	struct rxrpc_peer *peer;
 
diff -Nru a/net/rxrpc/internal.h b/net/rxrpc/internal.h
--- a/net/rxrpc/internal.h	2005-01-10 20:11:17 -08:00
+++ b/net/rxrpc/internal.h	2005-01-10 20:11:17 -08:00
@@ -73,7 +73,6 @@
 extern struct rw_semaphore rxrpc_conns_sem;
 extern unsigned long rxrpc_conn_timeout;
 
-extern void rxrpc_conn_do_timeout(struct rxrpc_connection *conn);
 extern void rxrpc_conn_clearall(struct rxrpc_peer *peer);
 
 /*
@@ -88,8 +87,6 @@
 				     struct rxrpc_message *resp);
 
 extern void rxrpc_peer_clearall(struct rxrpc_transport *trans);
-
-extern void rxrpc_peer_do_timeout(struct rxrpc_peer *peer);
 
 
 /*
diff -Nru a/net/rxrpc/peer.c b/net/rxrpc/peer.c
--- a/net/rxrpc/peer.c	2005-01-10 20:11:18 -08:00
+++ b/net/rxrpc/peer.c	2005-01-10 20:11:18 -08:00
@@ -30,6 +30,8 @@
 DECLARE_RWSEM(rxrpc_peers_sem);
 unsigned long rxrpc_peer_timeout = 12 * 60 * 60;
 
+static void rxrpc_peer_do_timeout(struct rxrpc_peer *peer);
+
 static void __rxrpc_peer_timeout(rxrpc_timer_t *timer)
 {
 	struct rxrpc_peer *peer =
@@ -259,7 +261,7 @@
  * handle a peer timing out in the graveyard
  * - called from krxtimod
  */
-void rxrpc_peer_do_timeout(struct rxrpc_peer *peer)
+static void rxrpc_peer_do_timeout(struct rxrpc_peer *peer)
 {
 	struct rxrpc_transport *trans = peer->trans;
 
diff -Nru a/net/rxrpc/rxrpc_syms.c b/net/rxrpc/rxrpc_syms.c
--- a/net/rxrpc/rxrpc_syms.c	2005-01-10 20:11:18 -08:00
+++ b/net/rxrpc/rxrpc_syms.c	2005-01-10 20:11:18 -08:00
@@ -23,7 +23,6 @@
 EXPORT_SYMBOL(rxrpc_call_abort);
 EXPORT_SYMBOL(rxrpc_call_read_data);
 EXPORT_SYMBOL(rxrpc_call_write_data);
-EXPORT_SYMBOL(rxrpc_call_flush);
 
 /* connection.c */
 EXPORT_SYMBOL(rxrpc_create_connection);
diff -Nru a/net/rxrpc/transport.c b/net/rxrpc/transport.c
--- a/net/rxrpc/transport.c	2005-01-10 20:11:21 -08:00
+++ b/net/rxrpc/transport.c	2005-01-10 20:11:21 -08:00
@@ -150,16 +150,6 @@
 
 /*****************************************************************************/
 /*
- * clear the connections on a transport endpoint
- */
-void rxrpc_clear_transport(struct rxrpc_transport *trans)
-{
-	//struct rxrpc_connection *conn;
-
-} /* end rxrpc_clear_transport() */
-
-/*****************************************************************************/
-/*
  * destroy a transport endpoint
  */
 void rxrpc_put_transport(struct rxrpc_transport *trans)
diff -Nru a/net/sched/Kconfig b/net/sched/Kconfig
--- a/net/sched/Kconfig	2005-01-10 20:11:22 -08:00
+++ b/net/sched/Kconfig	2005-01-10 20:11:22 -08:00
@@ -334,6 +334,18 @@
 	  Requires a new iproute2
 	  You MUST NOT turn this on if you dont have an update iproute2.
 
+config CLS_U32_MARK
+	bool "Use nfmark as a key in U32 classifier"
+	depends on NET_CLS_U32 && NETFILTER
+	help
+	  This allows you to match mark in a u32 filter.
+	  Example:
+	  tc filter add dev eth0 protocol ip parent 1:0 prio 5 u32 \
+		match mark 0x0090 0xffff \
+		match ip dst 4.4.4.4 \
+		flowid 1:90
+	  You must use a new iproute2 to use this feature.
+
 config NET_CLS_RSVP
 	tristate "Special RSVP classifier"
 	depends on NET_CLS && NET_QOS
diff -Nru a/net/sched/act_api.c b/net/sched/act_api.c
--- a/net/sched/act_api.c	2005-01-10 20:11:23 -08:00
+++ b/net/sched/act_api.c	2005-01-10 20:11:23 -08:00
@@ -294,14 +294,16 @@
 	
 }
 
-int tcf_action_init_1(struct rtattr *rta, struct rtattr *est, struct tc_action *a, char *name, int ovr, int bind )
+struct tc_action *tcf_action_init_1(struct rtattr *rta, struct rtattr *est,
+                                    char *name, int ovr, int bind, int *err)
 {
+	struct tc_action *a;
 	struct tc_action_ops *a_o;
 	char act_name[4 + IFNAMSIZ + 1];
 	struct rtattr *tb[TCA_ACT_MAX+1];
 	struct rtattr *kind = NULL;
 
-	int err = -EINVAL;
+	*err = -EINVAL;
 
 	if (NULL == name) {
 		if (rtattr_parse(tb, TCA_ACT_MAX, RTA_DATA(rta), RTA_PAYLOAD(rta))<0)
@@ -337,22 +339,25 @@
 		goto err_out;
 	}
 
-	if (NULL == a) {
+	a = kmalloc(sizeof(*a), GFP_KERNEL);
+	if (a == NULL) {
+		*err = -ENOMEM;
 		goto err_mod;
 	}
+	memset(a, 0, sizeof(*a));
 
 	/* backward compatibility for policer */
 	if (NULL == name) {
-		err = a_o->init(tb[TCA_ACT_OPTIONS-1], est, a, ovr, bind);
-		if (0 > err ) {
-			err = -EINVAL;
-			goto err_mod;
+		*err = a_o->init(tb[TCA_ACT_OPTIONS-1], est, a, ovr, bind);
+		if (*err < 0) {
+			*err = -EINVAL;
+			goto err_free;
 		}
 	} else {
-		err = a_o->init(rta, est, a, ovr, bind);
-		if (0 > err ) {
-			err = -EINVAL;
-			goto err_mod;
+		*err = a_o->init(rta, est, a, ovr, bind);
+		if (*err < 0) {
+			*err = -EINVAL;
+			goto err_free;
 		}
 	}
 
@@ -360,60 +365,58 @@
 	   if it exists and is only bound to in a_o->init() then
            ACT_P_CREATED is not returned (a zero is).
         */
-	if (ACT_P_CREATED != err) {
+	if (*err != ACT_P_CREATED)
 		module_put(a_o->owner);
-	} 
 	a->ops = a_o;
 	DPRINTK("tcf_action_init_1: successfull %s \n",act_name);
 
-	return 0;
+	*err = 0;
+	return a;
+
+err_free:
+	kfree(a);
 err_mod:
 	module_put(a_o->owner);
 err_out:
-	return err;
+	return NULL;
 }
 
-int tcf_action_init(struct rtattr *rta, struct rtattr *est, struct tc_action *a, char *name, int ovr , int bind)
+struct tc_action *tcf_action_init(struct rtattr *rta, struct rtattr *est,
+                                  char *name, int ovr, int bind, int *err)
 {
 	struct rtattr *tb[TCA_ACT_MAX_PRIO+1];
+	struct tc_action *a = NULL, *act, *act_prev = NULL;
 	int i;
-	struct tc_action *act = a, *a_s = a;
-
-	int err = -EINVAL;
 
-	if (rtattr_parse(tb, TCA_ACT_MAX_PRIO, RTA_DATA(rta), RTA_PAYLOAD(rta))<0)
-		return err;
+	if (rtattr_parse(tb, TCA_ACT_MAX_PRIO, RTA_DATA(rta),
+	                 RTA_PAYLOAD(rta)) < 0) {
+		*err = -EINVAL;
+		return a;
+	}
 
-	for (i=0; i < TCA_ACT_MAX_PRIO ; i++) {
+	for (i=0; i < TCA_ACT_MAX_PRIO; i++) {
 		if (tb[i]) {
-			if (NULL == act) {
-				act = kmalloc(sizeof(*act),GFP_KERNEL);
-				if (NULL == act) {
-					err = -ENOMEM;
-					goto bad_ret;
-				}
-				memset(act, 0,sizeof(*act));
-			}
-			act->next = NULL;
-			if (0 > tcf_action_init_1(tb[i],est,act,name,ovr,bind)) {
-				printk("Error processing action order %d\n",i);
-				return err;
+			act = tcf_action_init_1(tb[i], est, name, ovr, bind, err);
+			if (act == NULL) {
+				printk("Error processing action order %d\n", i);
+				goto bad_ret;
 			}
 
 			act->order = i+1;
-			if (a_s != act) {
-				a_s->next = act;
-				a_s = act;
-			}
-			act = NULL;
+			if (a == NULL)
+				a = act;
+			else
+				act_prev->next = act;
+			act_prev = act;
 		}
 
 	}
+	return a;
 
-	return 0;
 bad_ret:
-	tcf_action_destroy(a, bind);
-	return err;
+	if (a != NULL)
+		tcf_action_destroy(a, bind);
+	return NULL;
 }
 
 int tcf_action_copy_stats (struct sk_buff *skb,struct tc_action *a)
@@ -857,21 +860,9 @@
 	struct tc_action *a = NULL;
 	u32 seq = n->nlmsg_seq;
 
-	act = kmalloc(sizeof(*act),GFP_KERNEL);
-	if (NULL == act)
-		return -ENOMEM;
-
-	memset(act, 0, sizeof(*act));
-
-	ret = tcf_action_init(rta, NULL,act,NULL,ovr,0);
-	/* NOTE: We have an all-or-none model
-	 * This means that of any of the actions fail
-	 * to update then all are undone.
-	 * */
-	if (0 > ret) {
-		tcf_action_destroy(act, 0);
+	act = tcf_action_init(rta, NULL, NULL, ovr, 0, &ret);
+	if (act == NULL)
 		goto done;
-	}
 
 	/* dump then free all the actions after update; inserted policy
 	 * stays intact
@@ -888,7 +879,6 @@
 		}
 	}
 done:
-
 	return ret;
 }
 
diff -Nru a/net/sched/cls_u32.c b/net/sched/cls_u32.c
--- a/net/sched/cls_u32.c	2005-01-10 20:11:17 -08:00
+++ b/net/sched/cls_u32.c	2005-01-10 20:11:17 -08:00
@@ -27,6 +27,7 @@
  *	JHS: We should remove the CONFIG_NET_CLS_IND from here
  *	eventually when the meta match extension is made available
  *
+ *	nfmark match added by Catalin(ux aka Dino) BOIE <catab at umbrella.ro>
  */
 
 #include <asm/uaccess.h>
@@ -58,6 +59,13 @@
 #include <net/pkt_cls.h>
 
 
+struct tc_u32_mark
+{
+	__u32		val;
+	__u32		mask;
+	__u32		success;
+};
+
 struct tc_u_knode
 {
 	struct tc_u_knode	*next;
@@ -79,6 +87,9 @@
 #ifdef CONFIG_CLS_U32_PERF
 	struct tc_u32_pcnt	*pf;
 #endif
+#ifdef CONFIG_CLS_U32_MARK
+	struct tc_u32_mark	mark;
+#endif
 	struct tc_u32_sel	sel;
 };
 
@@ -139,6 +150,16 @@
 		n->pf->rcnt +=1;
 		j = 0;
 #endif
+
+#ifdef CONFIG_CLS_U32_MARK
+		if ((skb->nfmark & n->mark.mask) != n->mark.val) {
+			n = n->next;
+			goto next_knode;
+		} else {
+			n->mark.success++;
+		}
+#endif
+
 		for (i = n->sel.nkeys; i>0; i--, key++) {
 
 			if ((*(u32*)(ptr+key->off+(off2&key->offmask))^key->val)&key->mask) {
@@ -554,6 +575,7 @@
 	struct tc_u_hnode *ht;
 	struct tc_u_knode *n;
 	struct tc_u32_sel *s;
+	struct tc_u32_mark *mark;
 	struct rtattr *opt = tca[TCA_OPTIONS-1];
 	struct rtattr *tb[TCA_U32_MAX];
 	u32 htid;
@@ -657,6 +679,17 @@
 	}
 	n->fshift = i;
 }
+
+#ifdef CONFIG_CLS_U32_MARK                                                                                                                                             
+	if (tb[TCA_U32_MARK-1]) {
+		if (RTA_PAYLOAD(tb[TCA_U32_MARK-1]) < sizeof(struct tc_u32_mark))
+			return -EINVAL;
+		mark = RTA_DATA(tb[TCA_U32_MARK-1]);
+		memcpy(&n->mark, mark, sizeof(struct tc_u32_mark));
+		n->mark.success = 0;
+	}                                                                                                                                                                
+#endif                                                                                                                                                                 
+
 	err = u32_set_parms(tp, base, ht, n, tb, tca[TCA_RATE-1]);
 	if (err == 0) {
 		struct tc_u_knode **ins;
@@ -744,6 +777,12 @@
 			RTA_PUT(skb, TCA_U32_CLASSID, 4, &n->res.classid);
 		if (n->ht_down)
 			RTA_PUT(skb, TCA_U32_LINK, 4, &n->ht_down->handle);
+
+#ifdef CONFIG_CLS_U32_MARK
+		if (n->mark.val || n->mark.mask)
+			RTA_PUT(skb, TCA_U32_MARK, sizeof(n->mark), &n->mark);
+#endif
+
 #ifdef CONFIG_NET_CLS_ACT
 		if (tcf_dump_act(skb, n->action, TCA_U32_ACT, TCA_U32_POLICE) < 0)
 			goto rtattr_failure;
diff -Nru a/net/sched/gact.c b/net/sched/gact.c
--- a/net/sched/gact.c	2005-01-10 20:11:19 -08:00
+++ b/net/sched/gact.c	2005-01-10 20:11:19 -08:00
@@ -68,7 +68,7 @@
 }
 
 
-g_rand gact_rand[MAX_RAND]= { NULL,gact_net_rand, gact_determ};
+static g_rand gact_rand[MAX_RAND]= { NULL,gact_net_rand, gact_determ};
 
 #endif
 static int
diff -Nru a/net/sched/police.c b/net/sched/police.c
--- a/net/sched/police.c	2005-01-10 20:11:22 -08:00
+++ b/net/sched/police.c	2005-01-10 20:11:22 -08:00
@@ -163,7 +163,7 @@
 }
 
 #ifdef CONFIG_NET_CLS_ACT
-int tcf_act_police_locate(struct rtattr *rta, struct rtattr *est,struct tc_action *a, int ovr, int bind)
+static int tcf_act_police_locate(struct rtattr *rta, struct rtattr *est,struct tc_action *a, int ovr, int bind)
 {
 	unsigned h;
 	int ret = 0;
@@ -180,7 +180,8 @@
 	if (rtattr_parse(tb, TCA_POLICE_MAX, RTA_DATA(rta), RTA_PAYLOAD(rta)) < 0)
 		return -1;
 
-	if (tb[TCA_POLICE_TBF-1] == NULL)
+	if (tb[TCA_POLICE_TBF-1] == NULL ||
+	    RTA_PAYLOAD(tb[TCA_POLICE_TBF-1]) != sizeof(*parm))
 		return -1;
 
 	parm = RTA_DATA(tb[TCA_POLICE_TBF-1]);
@@ -220,11 +221,17 @@
 			goto failure;
 		}
 	}
-	if (tb[TCA_POLICE_RESULT-1])
-		p->result = *(int*)RTA_DATA(tb[TCA_POLICE_RESULT-1]);
+	if (tb[TCA_POLICE_RESULT-1]) {
+		if (RTA_PAYLOAD(tb[TCA_POLICE_RESULT-1]) != sizeof(u32))
+			goto failure;
+		p->result = *(u32*)RTA_DATA(tb[TCA_POLICE_RESULT-1]);
+	}
 #ifdef CONFIG_NET_ESTIMATOR
-	if (tb[TCA_POLICE_AVRATE-1])
+	if (tb[TCA_POLICE_AVRATE-1]) {
+		if (RTA_PAYLOAD(tb[TCA_POLICE_AVRATE-1]) != sizeof(u32))
+			goto failure;
 		p->ewma_rate = *(u32*)RTA_DATA(tb[TCA_POLICE_AVRATE-1]);
+	}
 #endif
 	p->toks = p->burst = parm->burst;
 	p->mtu = parm->mtu;
@@ -265,7 +272,7 @@
 	return -1;
 }
 
-int tcf_act_police_cleanup(struct tc_action *a, int bind)
+static int tcf_act_police_cleanup(struct tc_action *a, int bind)
 {
 	struct tcf_police *p;
 	p = PRIV(a);
@@ -275,7 +282,7 @@
 	return 0;
 }
 
-int tcf_act_police(struct sk_buff **pskb, struct tc_action *a)
+static int tcf_act_police(struct sk_buff **pskb, struct tc_action *a)
 {
 	psched_time_t now;
 	struct sk_buff *skb = *pskb;
@@ -338,7 +345,7 @@
 	return p->action;
 }
 
-int tcf_act_police_dump(struct sk_buff *skb, struct tc_action *a, int bind, int ref)
+static int tcf_act_police_dump(struct sk_buff *skb, struct tc_action *a, int bind, int ref)
 {
 	unsigned char	 *b = skb->tail;
 	struct tc_police opt;
@@ -424,7 +431,8 @@
 	if (rtattr_parse(tb, TCA_POLICE_MAX, RTA_DATA(rta), RTA_PAYLOAD(rta)) < 0)
 		return NULL;
 
-	if (tb[TCA_POLICE_TBF-1] == NULL)
+	if (tb[TCA_POLICE_TBF-1] == NULL ||
+	    RTA_PAYLOAD(tb[TCA_POLICE_TBF-1]) != sizeof(*parm))
 		return NULL;
 
 	parm = RTA_DATA(tb[TCA_POLICE_TBF-1]);
@@ -449,11 +457,17 @@
 		    (p->P_tab = qdisc_get_rtab(&parm->peakrate, tb[TCA_POLICE_PEAKRATE-1])) == NULL)
 			goto failure;
 	}
-	if (tb[TCA_POLICE_RESULT-1])
-		p->result = *(int*)RTA_DATA(tb[TCA_POLICE_RESULT-1]);
+	if (tb[TCA_POLICE_RESULT-1]) {
+		if (RTA_PAYLOAD(tb[TCA_POLICE_RESULT-1]) != sizeof(u32))
+			goto failure;
+		p->result = *(u32*)RTA_DATA(tb[TCA_POLICE_RESULT-1]);
+	}
 #ifdef CONFIG_NET_ESTIMATOR
-	if (tb[TCA_POLICE_AVRATE-1])
+	if (tb[TCA_POLICE_AVRATE-1]) {
+		if (RTA_PAYLOAD(tb[TCA_POLICE_AVRATE-1]) != sizeof(u32))
+			goto failure;
 		p->ewma_rate = *(u32*)RTA_DATA(tb[TCA_POLICE_AVRATE-1]);
+	}
 #endif
 	p->toks = p->burst = parm->burst;
 	p->mtu = parm->mtu;
diff -Nru a/net/sched/sch_api.c b/net/sched/sch_api.c
--- a/net/sched/sch_api.c	2005-01-10 20:11:18 -08:00
+++ b/net/sched/sch_api.c	2005-01-10 20:11:18 -08:00
@@ -207,7 +207,7 @@
 	return NULL;
 }
 
-struct Qdisc *qdisc_leaf(struct Qdisc *p, u32 classid)
+static struct Qdisc *qdisc_leaf(struct Qdisc *p, u32 classid)
 {
 	unsigned long cl;
 	struct Qdisc *leaf;
@@ -226,7 +226,7 @@
 
 /* Find queueing discipline by name */
 
-struct Qdisc_ops *qdisc_lookup_ops(struct rtattr *kind)
+static struct Qdisc_ops *qdisc_lookup_ops(struct rtattr *kind)
 {
 	struct Qdisc_ops *q = NULL;
 
@@ -290,7 +290,7 @@
 
 /* Allocate an unique handle from space managed by kernel */
 
-u32 qdisc_alloc_handle(struct net_device *dev)
+static u32 qdisc_alloc_handle(struct net_device *dev)
 {
 	int i = 0x10000;
 	static u32 autohandle = TC_H_MAKE(0x80000000U, 0);
@@ -356,8 +356,9 @@
    Old qdisc is not destroyed but returned in *old.
  */
 
-int qdisc_graft(struct net_device *dev, struct Qdisc *parent, u32 classid,
-		struct Qdisc *new, struct Qdisc **old)
+static int qdisc_graft(struct net_device *dev, struct Qdisc *parent,
+		       u32 classid,
+		       struct Qdisc *new, struct Qdisc **old)
 {
 	int err = 0;
 	struct Qdisc *q = *old;
diff -Nru a/net/sched/sch_dsmark.c b/net/sched/sch_dsmark.c
--- a/net/sched/sch_dsmark.c	2005-01-10 20:11:16 -08:00
+++ b/net/sched/sch_dsmark.c	2005-01-10 20:11:16 -08:00
@@ -14,6 +14,7 @@
 #include <linux/rtnetlink.h>
 #include <net/pkt_sched.h>
 #include <net/dsfield.h>
+#include <net/inet_ecn.h>
 #include <asm/byteorder.h>
 
 
@@ -198,10 +199,12 @@
 		/* FIXME: Safe with non-linear skbs? --RR */
 		switch (skb->protocol) {
 			case __constant_htons(ETH_P_IP):
-				skb->tc_index = ipv4_get_dsfield(skb->nh.iph);
+				skb->tc_index = ipv4_get_dsfield(skb->nh.iph)
+					& ~INET_ECN_MASK;
 				break;
 			case __constant_htons(ETH_P_IPV6):
-				skb->tc_index = ipv6_get_dsfield(skb->nh.ipv6h);
+				skb->tc_index = ipv6_get_dsfield(skb->nh.ipv6h)
+					& ~INET_ECN_MASK;
 				break;
 			default:
 				skb->tc_index = 0;
@@ -320,7 +323,7 @@
 }
 
 
-int dsmark_init(struct Qdisc *sch,struct rtattr *opt)
+static int dsmark_init(struct Qdisc *sch,struct rtattr *opt)
 {
 	struct dsmark_qdisc_data *p = PRIV(sch);
 	struct rtattr *tb[TCA_DSMARK_MAX];
diff -Nru a/net/sched/sch_generic.c b/net/sched/sch_generic.c
--- a/net/sched/sch_generic.c	2005-01-10 20:11:15 -08:00
+++ b/net/sched/sch_generic.c	2005-01-10 20:11:15 -08:00
@@ -283,7 +283,7 @@
 	.list		=	LIST_HEAD_INIT(noop_qdisc.list),
 };
 
-struct Qdisc_ops noqueue_qdisc_ops = {
+static struct Qdisc_ops noqueue_qdisc_ops = {
 	.next		=	NULL,
 	.cl_ops		=	NULL,
 	.id		=	"noqueue",
@@ -294,7 +294,7 @@
 	.owner		=	THIS_MODULE,
 };
 
-struct Qdisc noqueue_qdisc = {
+static struct Qdisc noqueue_qdisc = {
 	.enqueue	=	NULL,
 	.dequeue	=	noop_dequeue,
 	.flags		=	TCQ_F_BUILTIN,
diff -Nru a/net/sched/sch_htb.c b/net/sched/sch_htb.c
--- a/net/sched/sch_htb.c	2005-01-10 20:11:20 -08:00
+++ b/net/sched/sch_htb.c	2005-01-10 20:11:20 -08:00
@@ -71,7 +71,7 @@
 
 #define HTB_HSIZE 16	/* classid hash size */
 #define HTB_EWMAC 2	/* rate average over HTB_EWMAC*HTB_HSIZE sec */
-#define HTB_DEBUG 1	/* compile debugging support (activated by tc tool) */
+#undef HTB_DEBUG	/* compile debugging support (activated by tc tool) */
 #define HTB_RATECM 1    /* whether to use rate computer */
 #define HTB_HYSTERESIS 1/* whether to use mode hysteresis for speedup */
 #define HTB_QLOCK(S) spin_lock_bh(&(S)->dev->queue_lock)
diff -Nru a/net/sched/sch_ingress.c b/net/sched/sch_ingress.c
--- a/net/sched/sch_ingress.c	2005-01-10 20:11:24 -08:00
+++ b/net/sched/sch_ingress.c	2005-01-10 20:11:24 -08:00
@@ -274,7 +274,7 @@
 #endif
 #endif
 
-int ingress_init(struct Qdisc *sch,struct rtattr *opt)
+static int ingress_init(struct Qdisc *sch,struct rtattr *opt)
 {
 	struct ingress_qdisc_data *p = PRIV(sch);
 
diff -Nru a/net/sched/sch_prio.c b/net/sched/sch_prio.c
--- a/net/sched/sch_prio.c	2005-01-10 20:11:18 -08:00
+++ b/net/sched/sch_prio.c	2005-01-10 20:11:18 -08:00
@@ -47,7 +47,8 @@
 };
 
 
-struct Qdisc *prio_classify(struct sk_buff *skb, struct Qdisc *sch,int *r)
+static struct Qdisc *prio_classify(struct sk_buff *skb,
+				   struct Qdisc *sch, int *r)
 {
 	struct prio_sched_data *q = qdisc_priv(sch);
 	u32 band = skb->priority;
diff -Nru a/net/sctp/input.c b/net/sctp/input.c
--- a/net/sctp/input.c	2005-01-10 20:11:16 -08:00
+++ b/net/sctp/input.c	2005-01-10 20:11:16 -08:00
@@ -393,7 +393,7 @@
 	struct sctp_endpoint *ep;
 	struct sctp_association *asoc;
 	struct sctp_transport *transport;
-	struct inet_opt *inet;
+	struct inet_sock *inet;
 	char *saveip, *savesctp;
 	int err;
 
diff -Nru a/net/sctp/ipv6.c b/net/sctp/ipv6.c
--- a/net/sctp/ipv6.c	2005-01-10 20:11:20 -08:00
+++ b/net/sctp/ipv6.c	2005-01-10 20:11:20 -08:00
@@ -580,9 +580,9 @@
 struct sock *sctp_v6_create_accept_sk(struct sock *sk,
 				      struct sctp_association *asoc)
 {
-	struct inet_opt *inet = inet_sk(sk);
+	struct inet_sock *inet = inet_sk(sk);
 	struct sock *newsk;
-	struct inet_opt *newinet;
+	struct inet_sock *newinet;
 	struct ipv6_pinfo *newnp, *np = inet6_sk(sk);
 	struct sctp6_sock *newsctp6sk;
 
@@ -608,7 +608,7 @@
 	newsk->sk_shutdown = sk->sk_shutdown;
 
 	newsctp6sk = (struct sctp6_sock *)newsk;
-	newsctp6sk->pinet6 = &newsctp6sk->inet6;
+	newsctp6sk->inet.pinet6 = &newsctp6sk->inet6;
 
 	newinet = inet_sk(newsk);
 	newnp = inet6_sk(newsk);
diff -Nru a/net/sctp/protocol.c b/net/sctp/protocol.c
--- a/net/sctp/protocol.c	2005-01-10 20:11:20 -08:00
+++ b/net/sctp/protocol.c	2005-01-10 20:11:20 -08:00
@@ -551,8 +551,8 @@
 				      struct sctp_association *asoc)
 {
 	struct sock *newsk;
-	struct inet_opt *inet = inet_sk(sk);
-	struct inet_opt *newinet;
+	struct inet_sock *inet = inet_sk(sk);
+	struct inet_sock *newinet;
 
 	newsk = sk_alloc(PF_INET, GFP_KERNEL, sk->sk_prot->slab_obj_size,
 			 sk->sk_prot->slab);
diff -Nru a/net/socket.c b/net/socket.c
--- a/net/socket.c	2005-01-10 20:11:18 -08:00
+++ b/net/socket.c	2005-01-10 20:11:18 -08:00
@@ -736,8 +736,9 @@
 	return sock->ops->sendpage(sock, page, offset, size, flags);
 }
 
-int sock_readv_writev(int type, struct inode * inode, struct file * file,
-		      const struct iovec * iov, long count, size_t size)
+static int sock_readv_writev(int type, struct inode * inode,
+			     struct file * file, const struct iovec * iov,
+			     long count, size_t size)
 {
 	struct msghdr msg;
 	struct socket *sock;
@@ -1073,7 +1074,6 @@
 
 static int __sock_create(int family, int type, int protocol, struct socket **res, int kern)
 {
-	int i;
 	int err;
 	struct socket *sock;
 
@@ -1118,7 +1118,7 @@
 
 	net_family_read_lock();
 	if (net_families[family] == NULL) {
-		i = -EAFNOSUPPORT;
+		err = -EAFNOSUPPORT;
 		goto out;
 	}
 
@@ -1128,10 +1128,9 @@
  *	default.
  */
 
-	if (!(sock = sock_alloc())) 
-	{
+	if (!(sock = sock_alloc())) {
 		printk(KERN_WARNING "socket: no more sockets\n");
-		i = -ENFILE;		/* Not exactly a match, but its the
+		err = -ENFILE;		/* Not exactly a match, but its the
 					   closest posix thing */
 		goto out;
 	}
@@ -1142,11 +1141,11 @@
 	 * We will call the ->create function, that possibly is in a loadable
 	 * module, so we have to bump that loadable module refcnt first.
 	 */
-	i = -EAFNOSUPPORT;
+	err = -EAFNOSUPPORT;
 	if (!try_module_get(net_families[family]->owner))
 		goto out_release;
 
-	if ((i = net_families[family]->create(sock, protocol)) < 0)
+	if ((err = net_families[family]->create(sock, protocol)) < 0)
 		goto out_module_put;
 	/*
 	 * Now to bump the refcnt of the [loadable] module that owns this
@@ -1166,7 +1165,7 @@
 
 out:
 	net_family_read_unlock();
-	return i;
+	return err;
 out_module_put:
 	module_put(net_families[family]->owner);
 out_release:
diff -Nru a/net/sunrpc/auth.c b/net/sunrpc/auth.c
--- a/net/sunrpc/auth.c	2005-01-10 20:11:19 -08:00
+++ b/net/sunrpc/auth.c	2005-01-10 20:11:19 -08:00
@@ -25,7 +25,7 @@
 	NULL,			/* others can be loadable modules */
 };
 
-u32
+static u32
 pseudoflavor_to_flavor(u32 flavor) {
 	if (flavor >= RPC_AUTH_MAXFLAVOR)
 		return RPC_AUTH_GSS;
@@ -214,8 +214,6 @@
 	list_for_each_safe(pos, next, &auth->au_credcache[nr]) {
 		struct rpc_cred *entry;
 	       	entry = list_entry(pos, struct rpc_cred, cr_hash);
-		if (entry->cr_flags & RPCAUTH_CRED_DEAD)
-			continue;
 		if (rpcauth_prune_expired(entry, &free))
 			continue;
 		if (entry->cr_ops->crmatch(acred, entry, taskflags)) {
@@ -307,9 +305,6 @@
 	if (!atomic_dec_and_lock(&cred->cr_count, &rpc_credcache_lock))
 		return;
 
-	if ((cred->cr_flags & RPCAUTH_CRED_DEAD) && !list_empty(&cred->cr_hash))
-		list_del_init(&cred->cr_hash);
-
 	if (list_empty(&cred->cr_hash)) {
 		spin_unlock(&rpc_credcache_lock);
 		rpcauth_crdestroy(cred);
@@ -412,11 +407,4 @@
 {
 	return !(task->tk_msg.rpc_cred) ||
 		(task->tk_msg.rpc_cred->cr_flags & RPCAUTH_CRED_UPTODATE);
-}
-
-int
-rpcauth_deadcred(struct rpc_task *task)
-{
-	return !(task->tk_msg.rpc_cred) ||
-		(task->tk_msg.rpc_cred->cr_flags & RPCAUTH_CRED_DEAD);
 }
diff -Nru a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c
--- a/net/sunrpc/auth_gss/auth_gss.c	2005-01-10 20:11:18 -08:00
+++ b/net/sunrpc/auth_gss/auth_gss.c	2005-01-10 20:11:18 -08:00
@@ -480,12 +480,14 @@
 	if (!cred)
 		goto err;
 	if (gss_err)
-		cred->cr_flags |= RPCAUTH_CRED_DEAD;
+		cred->cr_flags &= ~RPCAUTH_CRED_UPTODATE;
 	else
 		gss_cred_set_ctx(cred, ctx);
 	spin_lock(&gss_auth->lock);
 	gss_msg = __gss_find_upcall(gss_auth, acred.uid);
 	if (gss_msg) {
+		if (gss_err)
+			gss_msg->msg.errno = -EACCES;
 		__gss_unhash_msg(gss_msg);
 		spin_unlock(&gss_auth->lock);
 		gss_release_msg(gss_msg);
@@ -532,7 +534,7 @@
 	spin_unlock(&gss_auth->lock);
 }
 
-void
+static void
 gss_pipe_destroy_msg(struct rpc_pipe_msg *msg)
 {
 	struct gss_upcall_msg *gss_msg = container_of(msg, struct gss_upcall_msg, msg);
@@ -740,7 +742,9 @@
 	maj_stat = gss_get_mic(ctx->gc_gss_ctx,
 			       GSS_C_QOP_DEFAULT, 
 			       &verf_buf, &mic);
-	if(maj_stat != 0){
+	if (maj_stat == GSS_S_CONTEXT_EXPIRED) {
+		cred->cr_flags &= ~RPCAUTH_CRED_UPTODATE;
+	} else if (maj_stat != 0) {
 		printk("gss_marshal: gss_get_mic FAILED (%d)\n", maj_stat);
 		goto out_put_ctx;
 	}
@@ -779,6 +783,7 @@
 	struct xdr_netobj mic;
 	u32		flav,len;
 	u32		service;
+	u32		maj_stat;
 
 	dprintk("RPC: %4u gss_validate\n", task->tk_pid);
 
@@ -794,8 +799,11 @@
 	mic.data = (u8 *)p;
 	mic.len = len;
 
-	if (gss_verify_mic(ctx->gc_gss_ctx, &verf_buf, &mic, &qop_state))
-               goto out_bad;
+	maj_stat = gss_verify_mic(ctx->gc_gss_ctx, &verf_buf, &mic, &qop_state);
+	if (maj_stat == GSS_S_CONTEXT_EXPIRED)
+		cred->cr_flags &= ~RPCAUTH_CRED_UPTODATE;
+	if (maj_stat)
+		goto out_bad;
        service = gss_pseudoflavor_to_service(ctx->gc_gss_ctx->mech_type,
 					gss_cred->gc_flavor);
        switch (service) {
@@ -821,11 +829,10 @@
 }
 
 static inline int
-gss_wrap_req_integ(struct gss_cl_ctx *ctx,
-			kxdrproc_t encode, void *rqstp, u32 *p, void *obj)
+gss_wrap_req_integ(struct rpc_cred *cred, struct gss_cl_ctx *ctx,
+		kxdrproc_t encode, struct rpc_rqst *rqstp, u32 *p, void *obj)
 {
-	struct rpc_rqst	*req = (struct rpc_rqst *)rqstp;
-	struct xdr_buf	*snd_buf = &req->rq_snd_buf;
+	struct xdr_buf	*snd_buf = &rqstp->rq_snd_buf;
 	struct xdr_buf	integ_buf;
 	u32             *integ_len = NULL;
 	struct xdr_netobj mic;
@@ -836,7 +843,7 @@
 
 	integ_len = p++;
 	offset = (u8 *)p - (u8 *)snd_buf->head[0].iov_base;
-	*p++ = htonl(req->rq_seqno);
+	*p++ = htonl(rqstp->rq_seqno);
 
 	status = encode(rqstp, p, obj);
 	if (status)
@@ -858,7 +865,9 @@
 	maj_stat = gss_get_mic(ctx->gc_gss_ctx,
 			GSS_C_QOP_DEFAULT, &integ_buf, &mic);
 	status = -EIO; /* XXX? */
-	if (maj_stat)
+	if (maj_stat == GSS_S_CONTEXT_EXPIRED)
+		cred->cr_flags &= ~RPCAUTH_CRED_UPTODATE;
+	else if (maj_stat)
 		return status;
 	q = xdr_encode_opaque(p, NULL, mic.len);
 
@@ -894,7 +903,8 @@
 			status = encode(rqstp, p, obj);
 			goto out;
 		case RPC_GSS_SVC_INTEGRITY:
-			status = gss_wrap_req_integ(ctx, encode, rqstp, p, obj);
+			status = gss_wrap_req_integ(cred, ctx, encode,
+								rqstp, p, obj);
 			goto out;
 		case RPC_GSS_SVC_PRIVACY:
 		default:
@@ -907,11 +917,10 @@
 }
 
 static inline int
-gss_unwrap_resp_integ(struct gss_cl_ctx *ctx,
-		kxdrproc_t decode, void *rqstp, u32 **p, void *obj)
+gss_unwrap_resp_integ(struct rpc_cred *cred, struct gss_cl_ctx *ctx,
+		struct rpc_rqst *rqstp, u32 **p)
 {
-	struct rpc_rqst *req = (struct rpc_rqst *)rqstp;
-	struct xdr_buf	*rcv_buf = &req->rq_rcv_buf;
+	struct xdr_buf	*rcv_buf = &rqstp->rq_rcv_buf;
 	struct xdr_buf integ_buf;
 	struct xdr_netobj mic;
 	u32 data_offset, mic_offset;
@@ -926,7 +935,7 @@
 	mic_offset = integ_len + data_offset;
 	if (mic_offset > rcv_buf->len)
 		return status;
-	if (ntohl(*(*p)++) != req->rq_seqno)
+	if (ntohl(*(*p)++) != rqstp->rq_seqno)
 		return status;
 
 	if (xdr_buf_subsegment(rcv_buf, &integ_buf, data_offset,
@@ -938,6 +947,8 @@
 
 	maj_stat = gss_verify_mic(ctx->gc_gss_ctx, &integ_buf,
 			&mic, NULL);
+	if (maj_stat == GSS_S_CONTEXT_EXPIRED)
+		cred->cr_flags &= ~RPCAUTH_CRED_UPTODATE;
 	if (maj_stat != GSS_S_COMPLETE)
 		return status;
 	return 0;
@@ -962,8 +973,7 @@
 		case RPC_GSS_SVC_NONE:
 			goto out_decode;
 		case RPC_GSS_SVC_INTEGRITY:
-			status = gss_unwrap_resp_integ(ctx, decode, 
-							rqstp, &p, obj);
+			status = gss_unwrap_resp_integ(cred, ctx, rqstp, &p);
 			if (status)
 				goto out;
 			break;
diff -Nru a/net/sunrpc/auth_gss/gss_generic_token.c b/net/sunrpc/auth_gss/gss_generic_token.c
--- a/net/sunrpc/auth_gss/gss_generic_token.c	2005-01-10 20:11:18 -08:00
+++ b/net/sunrpc/auth_gss/gss_generic_token.c	2005-01-10 20:11:18 -08:00
@@ -233,38 +233,3 @@
 
 EXPORT_SYMBOL(g_verify_token_header);
 
-/* Given a buffer containing a token, returns a copy of the mech oid in
- * the parameter mech. */
-u32
-g_get_mech_oid(struct xdr_netobj *mech, struct xdr_netobj * in_buf)
-{
-	unsigned char *buf = in_buf->data;
-	int len = in_buf->len;
-	int ret=0;
-	int seqsize;
-
-	if ((len-=1) < 0)
-		return(G_BAD_TOK_HEADER);
-	if (*buf++ != 0x60)
-		return(G_BAD_TOK_HEADER);
-
-	if ((seqsize = der_read_length(&buf, &len)) < 0)
-		return(G_BAD_TOK_HEADER);
-
-	if ((len-=1) < 0)
-		return(G_BAD_TOK_HEADER);
-	if (*buf++ != 0x06)
-		return(G_BAD_TOK_HEADER);
-
-	if ((len-=1) < 0)
-		return(G_BAD_TOK_HEADER);
-	mech->len = *buf++;
-
-	if ((len-=mech->len) < 0)
-		return(G_BAD_TOK_HEADER);
-	if (!(mech->data = kmalloc(mech->len, GFP_KERNEL))) 
-		return(G_BUFFER_ALLOC);
-	memcpy(mech->data, buf, mech->len);
-
-	return ret;
-}
diff -Nru a/net/sunrpc/auth_gss/gss_krb5_crypto.c b/net/sunrpc/auth_gss/gss_krb5_crypto.c
--- a/net/sunrpc/auth_gss/gss_krb5_crypto.c	2005-01-10 20:11:15 -08:00
+++ b/net/sunrpc/auth_gss/gss_krb5_crypto.c	2005-01-10 20:11:15 -08:00
@@ -132,7 +132,7 @@
 
 EXPORT_SYMBOL(krb5_decrypt);
 
-void
+static void
 buf_to_sg(struct scatterlist *sg, char *ptr, int len) {
 	sg->page = virt_to_page(ptr);
 	sg->offset = offset_in_page(ptr);
diff -Nru a/net/sunrpc/auth_gss/gss_krb5_mech.c b/net/sunrpc/auth_gss/gss_krb5_mech.c
--- a/net/sunrpc/auth_gss/gss_krb5_mech.c	2005-01-10 20:11:21 -08:00
+++ b/net/sunrpc/auth_gss/gss_krb5_mech.c	2005-01-10 20:11:21 -08:00
@@ -48,9 +48,6 @@
 # define RPCDBG_FACILITY	RPCDBG_AUTH
 #endif
 
-struct xdr_netobj gss_mech_krb5_oid =
-   {9, "\052\206\110\206\367\022\001\002\002"};
-
 static inline int
 get_bytes(char **ptr, const char *end, void *res, int len)
 {
diff -Nru a/net/sunrpc/auth_gss/gss_pseudoflavors.c b/net/sunrpc/auth_gss/gss_pseudoflavors.c
--- a/net/sunrpc/auth_gss/gss_pseudoflavors.c	2005-01-10 20:11:19 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,237 +0,0 @@
-/*
- *  linux/net/sunrpc/gss_union.c
- *
- *  Adapted from MIT Kerberos 5-1.2.1 lib/gssapi/generic code
- *
- *  Copyright (c) 2001 The Regents of the University of Michigan.
- *  All rights reserved.
- *
- *  Andy Adamson   <andros@umich.edu>
- *
- */
-
-/*
- * Copyright 1993 by OpenVision Technologies, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appears in all copies and
- * that both that copyright notice and this permission notice appear in
- * supporting documentation, and that the name of OpenVision not be used
- * in advertising or publicity pertaining to distribution of the software
- * without specific, written prior permission. OpenVision makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- * OPENVISION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL OPENVISION BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
- * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
- * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */ 
-
-#include <linux/types.h>
-#include <linux/slab.h>
-#include <linux/socket.h>
-#include <linux/sunrpc/gss_asn1.h>
-#include <linux/sunrpc/auth_gss.h>
-
-#ifdef RPC_DEBUG
-# define RPCDBG_FACILITY        RPCDBG_AUTH
-#endif
-
-static LIST_HEAD(registered_triples);
-static spinlock_t registered_triples_lock = SPIN_LOCK_UNLOCKED;
-
-/* The following must be called with spinlock held: */
-static struct sup_sec_triple *
-do_lookup_triple_by_pseudoflavor(u32 pseudoflavor)
-{
-	struct sup_sec_triple *pos, *triple = NULL;
-
-	list_for_each_entry(pos, &registered_triples, triples) {
-		if (pos->pseudoflavor == pseudoflavor) {
-			triple = pos;
-			break;
-		}
-	}
-	return triple;
-}
-
-/* XXX Need to think about reference counting of triples and of mechs.
- * Currently we do no reference counting of triples, and I think that's
- * probably OK given the reference counting on mechs, but there's probably
- * a better way to do all this. */
-
-int
-gss_register_triple(u32 pseudoflavor, struct gss_api_mech *mech,
-			  u32 qop, u32 service)
-{
-	struct sup_sec_triple *triple;
-
-	if (!(triple = kmalloc(sizeof(*triple), GFP_KERNEL))) {
-		printk("Alloc failed in gss_register_triple");
-		goto err;
-	}
-	triple->pseudoflavor = pseudoflavor;
-	triple->mech = gss_mech_get_by_OID(&mech->gm_oid);
-	triple->qop = qop;
-	triple->service = service;
-
-	spin_lock(&registered_triples_lock);
-	if (do_lookup_triple_by_pseudoflavor(pseudoflavor)) {
-		printk(KERN_WARNING "RPC: Registered pseudoflavor %d again\n",
-				pseudoflavor);
-		goto err_unlock;
-	}
-	list_add(&triple->triples, &registered_triples);
-	spin_unlock(&registered_triples_lock);
-	dprintk("RPC:      registered pseudoflavor %d\n", pseudoflavor);
-
-	return 0;
-
-err_unlock:
-	kfree(triple);
-	spin_unlock(&registered_triples_lock);
-err:
-	return -1;
-}
-
-int
-gss_unregister_triple(u32 pseudoflavor)
-{
-	struct sup_sec_triple *triple;
-
-	spin_lock(&registered_triples_lock);
-	if (!(triple = do_lookup_triple_by_pseudoflavor(pseudoflavor))) {
-		spin_unlock(&registered_triples_lock);
-		printk("Can't unregister unregistered pseudoflavor %d\n",
-		       pseudoflavor);
-		return -1;
-	}
-	list_del(&triple->triples);
-	spin_unlock(&registered_triples_lock);
-	gss_mech_put(triple->mech);
-	kfree(triple);
-	return 0;
-
-}
-
-void
-print_sec_triple(struct xdr_netobj *oid,u32 qop,u32 service)
-{
-	dprintk("RPC: print_sec_triple:\n");
-	dprintk("                     oid_len %d\n  oid :\n",oid->len);
-	print_hexl((u32 *)oid->data,oid->len,0);
-	dprintk("                     qop %d\n",qop);
-	dprintk("                     service %d\n",service);
-}
-
-/* Function: gss_get_cmp_triples
- *
- * Description: search sec_triples for a matching security triple
- * return pseudoflavor if match, else 0
- * (Note that 0 is a valid pseudoflavor, but not for any gss pseudoflavor
- * (0 means auth_null), so this shouldn't cause confusion.)
- */
-u32
-gss_cmp_triples(u32 oid_len, char *oid_data, u32 qop, u32 service)
-{
-	struct sup_sec_triple *triple;
-	u32 pseudoflavor = 0;
-	struct xdr_netobj oid;
-
-	oid.len = oid_len;
-	oid.data = oid_data;
-
-	dprintk("RPC:      gss_cmp_triples\n");
-	print_sec_triple(&oid,qop,service);
-
-	spin_lock(&registered_triples_lock);
-	list_for_each_entry(triple, &registered_triples, triples) {
-		if((g_OID_equal(&oid, &triple->mech->gm_oid))
-		    && (qop == triple->qop)
-		    && (service == triple->service)) {
-			pseudoflavor = triple->pseudoflavor;
-			break;
-		}
-	}
-	spin_unlock(&registered_triples_lock);
-	dprintk("RPC:      gss_cmp_triples return %d\n", pseudoflavor);
-	return pseudoflavor;
-}
-
-u32
-gss_get_pseudoflavor(struct gss_ctx *ctx, u32 qop, u32 service)
-{
-	return gss_cmp_triples(ctx->mech_type->gm_oid.len,
-			       ctx->mech_type->gm_oid.data,
-			       qop, service);
-}
-
-/* Returns nonzero iff the given pseudoflavor is in the supported list.
- * (Note that without incrementing a reference count or anything, this
- * doesn't give any guarantees.) */
-int
-gss_pseudoflavor_supported(u32 pseudoflavor)
-{
-	struct sup_sec_triple *triple;
-
-	spin_lock(&registered_triples_lock);
-	triple = do_lookup_triple_by_pseudoflavor(pseudoflavor);
-	spin_unlock(&registered_triples_lock);
-	return (triple ? 1 : 0);
-}
-
-u32
-gss_pseudoflavor_to_service(u32 pseudoflavor)
-{
-	struct sup_sec_triple *triple;
-
-	spin_lock(&registered_triples_lock);
-	triple = do_lookup_triple_by_pseudoflavor(pseudoflavor);
-	spin_unlock(&registered_triples_lock);
-	if (!triple) {
-		dprintk("RPC:      gss_pseudoflavor_to_service called with unsupported pseudoflavor %d\n",
-				pseudoflavor);
-		return 0;
-	}
-	return triple->service;
-}
-
-struct gss_api_mech *
-gss_pseudoflavor_to_mech(u32 pseudoflavor) {
-	struct sup_sec_triple *triple;
-	struct gss_api_mech *mech = NULL;
-
-	spin_lock(&registered_triples_lock);
-	triple = do_lookup_triple_by_pseudoflavor(pseudoflavor);
-	spin_unlock(&registered_triples_lock);
-	if (triple)
-		mech = gss_mech_get(triple->mech);
-	else
-		dprintk("RPC:      gss_pseudoflavor_to_mech called with unsupported pseudoflavor %d\n",
-				pseudoflavor);
-	return mech;
-}
-
-int
-gss_pseudoflavor_to_mechOID(u32 pseudoflavor, struct xdr_netobj * oid)
-{
-	struct gss_api_mech *mech;
-
-	mech = gss_pseudoflavor_to_mech(pseudoflavor);
-	if (!mech)  {
-		dprintk("RPC:      gss_pseudoflavor_to_mechOID called with unsupported pseudoflavor %d\n",
-				pseudoflavor);
-		        return -1;
-	}
-	oid->len = mech->gm_oid.len;
-	if (!(oid->data = kmalloc(oid->len, GFP_KERNEL)))
-		return -1;
-	memcpy(oid->data, mech->gm_oid.data, oid->len);
-	gss_mech_put(mech);
-	return 0;
-}
diff -Nru a/net/sunrpc/auth_gss/gss_spkm3_mech.c b/net/sunrpc/auth_gss/gss_spkm3_mech.c
--- a/net/sunrpc/auth_gss/gss_spkm3_mech.c	2005-01-10 20:11:21 -08:00
+++ b/net/sunrpc/auth_gss/gss_spkm3_mech.c	2005-01-10 20:11:21 -08:00
@@ -49,9 +49,6 @@
 # define RPCDBG_FACILITY	RPCDBG_AUTH
 #endif
 
-struct xdr_netobj gss_mech_spkm3_oid =
-   {7, "\053\006\001\005\005\001\003"};
-
 static inline int
 get_bytes(char **ptr, const char *end, void *res, int len)
 {
@@ -206,7 +203,7 @@
 	return GSS_S_FAILURE;
 }
 
-void
+static void
 gss_delete_sec_context_spkm3(void *internal_ctx) {
 	struct spkm3_ctx *sctx = internal_ctx;
 
@@ -221,7 +218,7 @@
 	kfree(sctx);
 }
 
-u32
+static u32
 gss_verify_mic_spkm3(struct gss_ctx		*ctx,
 			struct xdr_buf		*signbuf,
 			struct xdr_netobj	*checksum,
@@ -241,7 +238,7 @@
 	return maj_stat;
 }
 
-u32
+static u32
 gss_get_mic_spkm3(struct gss_ctx	*ctx,
 		     u32		qop,
 		     struct xdr_buf	*message_buffer,
diff -Nru a/net/sunrpc/auth_gss/sunrpcgss_syms.c b/net/sunrpc/auth_gss/sunrpcgss_syms.c
--- a/net/sunrpc/auth_gss/sunrpcgss_syms.c	2005-01-10 20:11:21 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,37 +0,0 @@
-#include <linux/config.h>
-#include <linux/module.h>
-
-#include <linux/types.h>
-#include <linux/socket.h>
-#include <linux/sched.h>
-#include <linux/uio.h>
-#include <linux/unistd.h>
-
-#include <linux/sunrpc/auth_gss.h>
-#include <linux/sunrpc/svcauth_gss.h>
-#include <linux/sunrpc/gss_asn1.h>
-#include <linux/sunrpc/gss_krb5.h>
-
-/* svcauth_gss.c: */
-EXPORT_SYMBOL(svcauth_gss_register_pseudoflavor);
-
-/* registering gss mechanisms to the mech switching code: */
-EXPORT_SYMBOL(gss_mech_register);
-EXPORT_SYMBOL(gss_mech_unregister);
-EXPORT_SYMBOL(gss_mech_get);
-EXPORT_SYMBOL(gss_mech_get_by_pseudoflavor);
-EXPORT_SYMBOL(gss_mech_get_by_name);
-EXPORT_SYMBOL(gss_mech_put);
-EXPORT_SYMBOL(gss_pseudoflavor_to_service);
-EXPORT_SYMBOL(gss_service_to_auth_domain_name);
-
-/* generic functionality in gss code: */
-EXPORT_SYMBOL(g_make_token_header);
-EXPORT_SYMBOL(g_verify_token_header);
-EXPORT_SYMBOL(g_token_size);
-EXPORT_SYMBOL(make_checksum);
-EXPORT_SYMBOL(krb5_encrypt);
-EXPORT_SYMBOL(krb5_decrypt);
-
-/* debug */
-EXPORT_SYMBOL(print_hexl);
diff -Nru a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c
--- a/net/sunrpc/auth_gss/svcauth_gss.c	2005-01-10 20:11:18 -08:00
+++ b/net/sunrpc/auth_gss/svcauth_gss.c	2005-01-10 20:11:18 -08:00
@@ -448,7 +448,7 @@
 
 static DefineSimpleCacheLookup(rsc, 0);
 
-struct rsc *
+static struct rsc *
 gss_svc_searchbyctx(struct xdr_netobj *handle)
 {
 	struct rsc rsci;
@@ -958,7 +958,7 @@
 	if (gc->gc_proc != RPC_GSS_PROC_DATA)
 		goto out;
 	/* Release can be called twice, but we only wrap once. */
-	if (gsd->body_start == 0)
+	if (gsd->body_start == NULL)
 		goto out;
 	/* normally not set till svc_send, but we need it here: */
 	resbuf->len = resbuf->head[0].iov_len
@@ -1045,7 +1045,7 @@
 	kfree(gd);
 }
 
-struct auth_ops svcauthops_gss = {
+static struct auth_ops svcauthops_gss = {
 	.name		= "rpcsec_gss",
 	.owner		= THIS_MODULE,
 	.flavour	= RPC_AUTH_GSS,
diff -Nru a/net/sunrpc/cache.c b/net/sunrpc/cache.c
--- a/net/sunrpc/cache.c	2005-01-10 20:11:19 -08:00
+++ b/net/sunrpc/cache.c	2005-01-10 20:11:19 -08:00
@@ -33,6 +33,9 @@
 
 #define	 RPCDBG_FACILITY RPCDBG_CACHE
 
+static void cache_defer_req(struct cache_req *req, struct cache_head *item);
+static void cache_revisit_request(struct cache_head *item);
+
 void cache_init(struct cache_head *h)
 {
 	time_t now = get_seconds();
@@ -256,39 +259,13 @@
 	return 0;
 }
 
-struct cache_detail *cache_find(char *name)
-{
-	struct list_head *l;
-
-	spin_lock(&cache_list_lock);
-	list_for_each(l, &cache_list) {
-		struct cache_detail *cd = list_entry(l, struct cache_detail, others);
-		
-		if (strcmp(cd->name, name)==0) {
-			atomic_inc(&cd->inuse);
-			spin_unlock(&cache_list_lock);
-			return cd;
-		}
-	}
-	spin_unlock(&cache_list_lock);
-	return NULL;
-}
-
-/* cache_drop must be called on any cache returned by
- * cache_find, after it has been used
- */
-void cache_drop(struct cache_detail *detail)
-{
-	atomic_dec(&detail->inuse);
-}
-
 /* clean cache tries to find something to clean
  * and cleans it.
  * It returns 1 if it cleaned something,
  *            0 if it didn't find anything this time
  *           -1 if it fell off the end of the list.
  */
-int cache_clean(void)
+static int cache_clean(void)
 {
 	int rv = 0;
 	struct list_head *next;
@@ -428,12 +405,12 @@
 
 #define	DFR_MAX	300	/* ??? */
 
-spinlock_t cache_defer_lock = SPIN_LOCK_UNLOCKED;
+static spinlock_t cache_defer_lock = SPIN_LOCK_UNLOCKED;
 static LIST_HEAD(cache_defer_list);
 static struct list_head cache_defer_hash[DFR_HASHSIZE];
 static int cache_defer_cnt;
 
-void cache_defer_req(struct cache_req *req, struct cache_head *item)
+static void cache_defer_req(struct cache_req *req, struct cache_head *item)
 {
 	struct cache_deferred_req *dreq;
 	int hash = DFR_HASH(item);
@@ -483,7 +460,7 @@
 	}
 }
 
-void cache_revisit_request(struct cache_head *item)
+static void cache_revisit_request(struct cache_head *item)
 {
 	struct cache_deferred_req *dreq;
 	struct list_head pending;
@@ -902,7 +879,7 @@
 	*lp = len;
 }
 
-void warn_no_listener(struct cache_detail *detail)
+static void warn_no_listener(struct cache_detail *detail)
 {
 	if (detail->last_warn != detail->last_close) {
 		detail->last_warn = detail->last_close;
@@ -1119,7 +1096,7 @@
 	return cd->cache_show(m, cd, cp);
 }
 
-struct seq_operations cache_content_op = {
+static struct seq_operations cache_content_op = {
 	.start	= c_start,
 	.next	= c_next,
 	.stop	= c_stop,
diff -Nru a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
--- a/net/sunrpc/clnt.c	2005-01-10 20:11:18 -08:00
+++ b/net/sunrpc/clnt.c	2005-01-10 20:11:18 -08:00
@@ -928,7 +928,7 @@
 	task->tk_action = call_reserve;
 	if (status >= 0 && rpcauth_uptodatecred(task))
 		return;
-	if (rpcauth_deadcred(task)) {
+	if (status == -EACCES) {
 		rpc_exit(task, -EACCES);
 		return;
 	}
@@ -970,23 +970,31 @@
 	struct kvec *iov = &task->tk_rqstp->rq_rcv_buf.head[0];
 	int len = task->tk_rqstp->rq_rcv_buf.len >> 2;
 	u32	*p = iov->iov_base, n;
+	int error = -EACCES;
 
 	if ((len -= 3) < 0)
-		goto garbage;
+		goto out_overflow;
 	p += 1;	/* skip XID */
 
 	if ((n = ntohl(*p++)) != RPC_REPLY) {
 		printk(KERN_WARNING "call_verify: not an RPC reply: %x\n", n);
-		goto garbage;
+		goto out_retry;
 	}
 	if ((n = ntohl(*p++)) != RPC_MSG_ACCEPTED) {
-		int	error = -EACCES;
-
 		if (--len < 0)
-			goto garbage;
-		if ((n = ntohl(*p++)) != RPC_AUTH_ERROR) {
-			printk(KERN_WARNING "call_verify: RPC call rejected: %x\n", n);
-		} else if (--len < 0)
+			goto out_overflow;
+		switch ((n = ntohl(*p++))) {
+			case RPC_AUTH_ERROR:
+				break;
+			case RPC_MISMATCH:
+				printk(KERN_WARNING "%s: RPC call version mismatch!\n", __FUNCTION__);
+				goto out_eio;
+			default:
+				printk(KERN_WARNING "%s: RPC call rejected, unknown error: %x\n", __FUNCTION__, n);
+				goto out_eio;
+		}
+		if (--len < 0)
+			goto out_overflow;
 		switch ((n = ntohl(*p++))) {
 		case RPC_AUTH_REJECTEDCRED:
 		case RPC_AUTH_REJECTEDVERF:
@@ -1017,20 +1025,18 @@
 		default:
 			printk(KERN_WARNING "call_verify: unknown auth error: %x\n", n);
 			error = -EIO;
-		} else
-			goto garbage;
+		}
 		dprintk("RPC: %4d call_verify: call rejected %d\n",
 						task->tk_pid, n);
-		rpc_exit(task, error);
-		return NULL;
+		goto out_err;
 	}
 	if (!(p = rpcauth_checkverf(task, p))) {
 		printk(KERN_WARNING "call_verify: auth check failed\n");
-		goto garbage;		/* bad verifier, retry */
+		goto out_retry;		/* bad verifier, retry */
 	}
 	len = p - (u32 *)iov->iov_base - 1;
 	if (len < 0)
-		goto garbage;
+		goto out_overflow;
 	switch ((n = ntohl(*p++))) {
 	case RPC_SUCCESS:
 		return p;
@@ -1053,23 +1059,28 @@
 				task->tk_client->cl_server);
 		goto out_eio;
 	case RPC_GARBAGE_ARGS:
+		dprintk("RPC: %4d %s: server saw garbage\n", task->tk_pid, __FUNCTION__);
 		break;			/* retry */
 	default:
 		printk(KERN_WARNING "call_verify: server accept status: %x\n", n);
 		/* Also retry */
 	}
 
-garbage:
-	dprintk("RPC: %4d call_verify: server saw garbage\n", task->tk_pid);
+out_retry:
 	task->tk_client->cl_stats->rpcgarbage++;
 	if (task->tk_garb_retry) {
 		task->tk_garb_retry--;
-		dprintk(KERN_WARNING "RPC: garbage, retrying %4d\n", task->tk_pid);
+		dprintk(KERN_WARNING "RPC %s: retrying %4d\n", __FUNCTION__, task->tk_pid);
 		task->tk_action = call_bind;
 		return NULL;
 	}
-	printk(KERN_WARNING "RPC: garbage, exit EIO\n");
+	printk(KERN_WARNING "RPC %s: retry failed, exit EIO\n", __FUNCTION__);
 out_eio:
-	rpc_exit(task, -EIO);
+	error = -EIO;
+out_err:
+	rpc_exit(task, error);
 	return NULL;
+out_overflow:
+	printk(KERN_WARNING "RPC %s: server reply was truncated.\n", __FUNCTION__);
+	goto out_retry;
 }
diff -Nru a/net/sunrpc/pmap_clnt.c b/net/sunrpc/pmap_clnt.c
--- a/net/sunrpc/pmap_clnt.c	2005-01-10 20:11:19 -08:00
+++ b/net/sunrpc/pmap_clnt.c	2005-01-10 20:11:19 -08:00
@@ -31,7 +31,7 @@
 static struct rpc_procinfo	pmap_procedures[];
 static struct rpc_clnt *	pmap_create(char *, struct sockaddr_in *, int);
 static void			pmap_getport_done(struct rpc_task *);
-extern struct rpc_program	pmap_program;
+static struct rpc_program	pmap_program;
 static spinlock_t		pmap_lock = SPIN_LOCK_UNLOCKED;
 
 /*
@@ -292,7 +292,7 @@
 
 static struct rpc_stat		pmap_stats;
 
-struct rpc_program	pmap_program = {
+static struct rpc_program	pmap_program = {
 	.name		= "portmap",
 	.number		= RPC_PMAP_PROGRAM,
 	.nrvers		= ARRAY_SIZE(pmap_version),
diff -Nru a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c
--- a/net/sunrpc/rpc_pipe.c	2005-01-10 20:11:17 -08:00
+++ b/net/sunrpc/rpc_pipe.c	2005-01-10 20:11:17 -08:00
@@ -276,12 +276,7 @@
 	}
 }
 
-struct inode_operations rpc_pipe_iops = {
-	.lookup		= simple_lookup,
-};
-
-
-struct file_operations rpc_pipe_fops = {
+static struct file_operations rpc_pipe_fops = {
 	.owner		= THIS_MODULE,
 	.llseek		= no_llseek,
 	.read		= rpc_pipe_read,
@@ -595,7 +590,7 @@
 	return 0;
 }
 
-struct dentry *
+static struct dentry *
 rpc_lookup_negative(char *path, struct nameidata *nd)
 {
 	struct dentry *dentry;
@@ -769,6 +764,7 @@
 	sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
 	sb->s_magic = RPCAUTH_GSSMAGIC;
 	sb->s_op = &s_ops;
+	sb->s_time_gran = 1;
 
 	inode = rpc_get_inode(sb, S_IFDIR | 0755);
 	if (!inode)
diff -Nru a/net/sunrpc/sched.c b/net/sunrpc/sched.c
--- a/net/sunrpc/sched.c	2005-01-10 20:11:19 -08:00
+++ b/net/sunrpc/sched.c	2005-01-10 20:11:19 -08:00
@@ -25,6 +25,7 @@
 
 #ifdef RPC_DEBUG
 #define RPCDBG_FACILITY		RPCDBG_SCHED
+#define RPC_TASK_MAGIC_ID	0xf00baa
 static int			rpc_task_id;
 #endif
 
@@ -41,13 +42,9 @@
 
 static void			__rpc_default_timer(struct rpc_task *task);
 static void			rpciod_killall(void);
+static void			rpc_free(struct rpc_task *task);
 
-/*
- * When an asynchronous RPC task is activated within a bottom half
- * handler, or while executing another RPC task, it is put on
- * schedq, and rpciod is woken up.
- */
-static RPC_WAITQ(schedq, "schedq");
+static void			rpc_async_schedule(void *);
 
 /*
  * RPC tasks that create another task (e.g. for contacting the portmapper)
@@ -68,26 +65,18 @@
 /*
  * rpciod-related stuff
  */
-static DECLARE_WAIT_QUEUE_HEAD(rpciod_idle);
-static DECLARE_COMPLETION(rpciod_killer);
 static DECLARE_MUTEX(rpciod_sema);
 static unsigned int		rpciod_users;
-static pid_t			rpciod_pid;
-static int			rpc_inhibit;
+static struct workqueue_struct *rpciod_workqueue;
 
 /*
- * Spinlock for wait queues. Access to the latter also has to be
- * interrupt-safe in order to allow timers to wake up sleeping tasks.
- */
-static spinlock_t rpc_queue_lock = SPIN_LOCK_UNLOCKED;
-/*
  * Spinlock for other critical sections of code.
  */
 static spinlock_t rpc_sched_lock = SPIN_LOCK_UNLOCKED;
 
 /*
  * Disable the timer for a given RPC task. Should be called with
- * rpc_queue_lock and bh_disabled in order to avoid races within
+ * queue->lock and bh_disabled in order to avoid races within
  * rpc_run_timer().
  */
 static inline void
@@ -105,19 +94,19 @@
  * without calling del_timer_sync(). The latter could cause a
  * deadlock if called while we're holding spinlocks...
  */
-static void
-rpc_run_timer(struct rpc_task *task)
+static void rpc_run_timer(struct rpc_task *task)
 {
 	void (*callback)(struct rpc_task *);
 
-	spin_lock_bh(&rpc_queue_lock);
 	callback = task->tk_timeout_fn;
 	task->tk_timeout_fn = NULL;
-	spin_unlock_bh(&rpc_queue_lock);
-	if (callback) {
+	if (callback && RPC_IS_QUEUED(task)) {
 		dprintk("RPC: %4d running timer\n", task->tk_pid);
 		callback(task);
 	}
+	smp_mb__before_clear_bit();
+	clear_bit(RPC_TASK_HAS_TIMER, &task->tk_runstate);
+	smp_mb__after_clear_bit();
 }
 
 /*
@@ -136,29 +125,21 @@
 		task->tk_timeout_fn = timer;
 	else
 		task->tk_timeout_fn = __rpc_default_timer;
+	set_bit(RPC_TASK_HAS_TIMER, &task->tk_runstate);
 	mod_timer(&task->tk_timer, jiffies + task->tk_timeout);
 }
 
 /*
- * Set up a timer for an already sleeping task.
- */
-void rpc_add_timer(struct rpc_task *task, rpc_action timer)
-{
-	spin_lock_bh(&rpc_queue_lock);
-	if (!RPC_IS_RUNNING(task))
-		__rpc_add_timer(task, timer);
-	spin_unlock_bh(&rpc_queue_lock);
-}
-
-/*
  * Delete any timer for the current task. Because we use del_timer_sync(),
- * this function should never be called while holding rpc_queue_lock.
+ * this function should never be called while holding queue->lock.
  */
 static inline void
 rpc_delete_timer(struct rpc_task *task)
 {
-	if (del_timer_sync(&task->tk_timer))
+	if (test_and_clear_bit(RPC_TASK_HAS_TIMER, &task->tk_runstate)) {
+		del_singleshot_timer_sync(&task->tk_timer);
 		dprintk("RPC: %4d deleting timer\n", task->tk_pid);
+	}
 }
 
 /*
@@ -169,16 +150,17 @@
 	struct list_head *q;
 	struct rpc_task *t;
 
+	INIT_LIST_HEAD(&task->u.tk_wait.links);
 	q = &queue->tasks[task->tk_priority];
 	if (unlikely(task->tk_priority > queue->maxpriority))
 		q = &queue->tasks[queue->maxpriority];
-	list_for_each_entry(t, q, tk_list) {
+	list_for_each_entry(t, q, u.tk_wait.list) {
 		if (t->tk_cookie == task->tk_cookie) {
-			list_add_tail(&task->tk_list, &t->tk_links);
+			list_add_tail(&task->u.tk_wait.list, &t->u.tk_wait.links);
 			return;
 		}
 	}
-	list_add_tail(&task->tk_list, q);
+	list_add_tail(&task->u.tk_wait.list, q);
 }
 
 /*
@@ -189,37 +171,21 @@
  * improve overall performance.
  * Everyone else gets appended to the queue to ensure proper FIFO behavior.
  */
-static int __rpc_add_wait_queue(struct rpc_wait_queue *queue, struct rpc_task *task)
+static void __rpc_add_wait_queue(struct rpc_wait_queue *queue, struct rpc_task *task)
 {
-	if (task->tk_rpcwait == queue)
-		return 0;
+	BUG_ON (RPC_IS_QUEUED(task));
 
-	if (task->tk_rpcwait) {
-		printk(KERN_WARNING "RPC: doubly enqueued task!\n");
-		return -EWOULDBLOCK;
-	}
 	if (RPC_IS_PRIORITY(queue))
 		__rpc_add_wait_queue_priority(queue, task);
 	else if (RPC_IS_SWAPPER(task))
-		list_add(&task->tk_list, &queue->tasks[0]);
+		list_add(&task->u.tk_wait.list, &queue->tasks[0]);
 	else
-		list_add_tail(&task->tk_list, &queue->tasks[0]);
-	task->tk_rpcwait = queue;
+		list_add_tail(&task->u.tk_wait.list, &queue->tasks[0]);
+	task->u.tk_wait.rpc_waitq = queue;
+	rpc_set_queued(task);
 
 	dprintk("RPC: %4d added to queue %p \"%s\"\n",
 				task->tk_pid, queue, rpc_qname(queue));
-
-	return 0;
-}
-
-int rpc_add_wait_queue(struct rpc_wait_queue *q, struct rpc_task *task)
-{
-	int		result;
-
-	spin_lock_bh(&rpc_queue_lock);
-	result = __rpc_add_wait_queue(q, task);
-	spin_unlock_bh(&rpc_queue_lock);
-	return result;
 }
 
 /*
@@ -229,12 +195,12 @@
 {
 	struct rpc_task *t;
 
-	if (!list_empty(&task->tk_links)) {
-		t = list_entry(task->tk_links.next, struct rpc_task, tk_list);
-		list_move(&t->tk_list, &task->tk_list);
-		list_splice_init(&task->tk_links, &t->tk_links);
+	if (!list_empty(&task->u.tk_wait.links)) {
+		t = list_entry(task->u.tk_wait.links.next, struct rpc_task, u.tk_wait.list);
+		list_move(&t->u.tk_wait.list, &task->u.tk_wait.list);
+		list_splice_init(&task->u.tk_wait.links, &t->u.tk_wait.links);
 	}
-	list_del(&task->tk_list);
+	list_del(&task->u.tk_wait.list);
 }
 
 /*
@@ -243,31 +209,17 @@
  */
 static void __rpc_remove_wait_queue(struct rpc_task *task)
 {
-	struct rpc_wait_queue *queue = task->tk_rpcwait;
-
-	if (!queue)
-		return;
+	struct rpc_wait_queue *queue;
+	queue = task->u.tk_wait.rpc_waitq;
 
 	if (RPC_IS_PRIORITY(queue))
 		__rpc_remove_wait_queue_priority(task);
 	else
-		list_del(&task->tk_list);
-	task->tk_rpcwait = NULL;
-
+		list_del(&task->u.tk_wait.list);
 	dprintk("RPC: %4d removed from queue %p \"%s\"\n",
 				task->tk_pid, queue, rpc_qname(queue));
 }
 
-void
-rpc_remove_wait_queue(struct rpc_task *task)
-{
-	if (!task->tk_rpcwait)
-		return;
-	spin_lock_bh(&rpc_queue_lock);
-	__rpc_remove_wait_queue(task);
-	spin_unlock_bh(&rpc_queue_lock);
-}
-
 static inline void rpc_set_waitqueue_priority(struct rpc_wait_queue *queue, int priority)
 {
 	queue->priority = priority;
@@ -290,6 +242,7 @@
 {
 	int i;
 
+	spin_lock_init(&queue->lock);
 	for (i = 0; i < ARRAY_SIZE(queue->tasks); i++)
 		INIT_LIST_HEAD(&queue->tasks[i]);
 	queue->maxpriority = maxprio;
@@ -316,34 +269,31 @@
  * Note: If the task is ASYNC, this must be called with 
  * the spinlock held to protect the wait queue operation.
  */
-static inline void
-rpc_make_runnable(struct rpc_task *task)
+static void rpc_make_runnable(struct rpc_task *task)
 {
-	if (task->tk_timeout_fn) {
-		printk(KERN_ERR "RPC: task w/ running timer in rpc_make_runnable!!\n");
+	int do_ret;
+
+	BUG_ON(task->tk_timeout_fn);
+	do_ret = rpc_test_and_set_running(task);
+	rpc_clear_queued(task);
+	if (do_ret)
 		return;
-	}
-	rpc_set_running(task);
 	if (RPC_IS_ASYNC(task)) {
-		if (RPC_IS_SLEEPING(task)) {
-			int status;
-			status = __rpc_add_wait_queue(&schedq, task);
-			if (status < 0) {
-				printk(KERN_WARNING "RPC: failed to add task to queue: error: %d!\n", status);
-				task->tk_status = status;
-				return;
-			}
-			rpc_clear_sleeping(task);
-			wake_up(&rpciod_idle);
+		int status;
+
+		INIT_WORK(&task->u.tk_work, rpc_async_schedule, (void *)task);
+		status = queue_work(task->tk_workqueue, &task->u.tk_work);
+		if (status < 0) {
+			printk(KERN_WARNING "RPC: failed to add task to queue: error: %d!\n", status);
+			task->tk_status = status;
+			return;
 		}
-	} else {
-		rpc_clear_sleeping(task);
-		wake_up(&task->tk_wait);
-	}
+	} else
+		wake_up(&task->u.tk_wait.waitq);
 }
 
 /*
- * Place a newly initialized task on the schedq.
+ * Place a newly initialized task on the workqueue.
  */
 static inline void
 rpc_schedule_run(struct rpc_task *task)
@@ -352,33 +302,18 @@
 	if (RPC_IS_ACTIVATED(task))
 		return;
 	task->tk_active = 1;
-	rpc_set_sleeping(task);
 	rpc_make_runnable(task);
 }
 
 /*
- *	For other people who may need to wake the I/O daemon
- *	but should (for now) know nothing about its innards
- */
-void rpciod_wake_up(void)
-{
-	if(rpciod_pid==0)
-		printk(KERN_ERR "rpciod: wot no daemon?\n");
-	wake_up(&rpciod_idle);
-}
-
-/*
  * Prepare for sleeping on a wait queue.
  * By always appending tasks to the list we ensure FIFO behavior.
  * NB: An RPC task will only receive interrupt-driven events as long
  * as it's on a wait queue.
  */
-static void
-__rpc_sleep_on(struct rpc_wait_queue *q, struct rpc_task *task,
+static void __rpc_sleep_on(struct rpc_wait_queue *q, struct rpc_task *task,
 			rpc_action action, rpc_action timer)
 {
-	int status;
-
 	dprintk("RPC: %4d sleep_on(queue \"%s\" time %ld)\n", task->tk_pid,
 				rpc_qname(q), jiffies);
 
@@ -388,69 +323,48 @@
 	}
 
 	/* Mark the task as being activated if so needed */
-	if (!RPC_IS_ACTIVATED(task)) {
+	if (!RPC_IS_ACTIVATED(task))
 		task->tk_active = 1;
-		rpc_set_sleeping(task);
-	}
 
-	status = __rpc_add_wait_queue(q, task);
-	if (status) {
-		printk(KERN_WARNING "RPC: failed to add task to queue: error: %d!\n", status);
-		task->tk_status = status;
-	} else {
-		rpc_clear_running(task);
-		if (task->tk_callback) {
-			dprintk(KERN_ERR "RPC: %4d overwrites an active callback\n", task->tk_pid);
-			BUG();
-		}
-		task->tk_callback = action;
-		__rpc_add_timer(task, timer);
-	}
+	__rpc_add_wait_queue(q, task);
+
+	BUG_ON(task->tk_callback != NULL);
+	task->tk_callback = action;
+	__rpc_add_timer(task, timer);
 }
 
-void
-rpc_sleep_on(struct rpc_wait_queue *q, struct rpc_task *task,
+void rpc_sleep_on(struct rpc_wait_queue *q, struct rpc_task *task,
 				rpc_action action, rpc_action timer)
 {
 	/*
 	 * Protect the queue operations.
 	 */
-	spin_lock_bh(&rpc_queue_lock);
+	spin_lock_bh(&q->lock);
 	__rpc_sleep_on(q, task, action, timer);
-	spin_unlock_bh(&rpc_queue_lock);
+	spin_unlock_bh(&q->lock);
 }
 
 /**
- * __rpc_wake_up_task - wake up a single rpc_task
+ * __rpc_do_wake_up_task - wake up a single rpc_task
  * @task: task to be woken up
  *
- * Caller must hold rpc_queue_lock
+ * Caller must hold queue->lock, and have cleared the task queued flag.
  */
-static void
-__rpc_wake_up_task(struct rpc_task *task)
+static void __rpc_do_wake_up_task(struct rpc_task *task)
 {
-	dprintk("RPC: %4d __rpc_wake_up_task (now %ld inh %d)\n",
-					task->tk_pid, jiffies, rpc_inhibit);
+	dprintk("RPC: %4d __rpc_wake_up_task (now %ld)\n", task->tk_pid, jiffies);
 
 #ifdef RPC_DEBUG
-	if (task->tk_magic != 0xf00baa) {
-		printk(KERN_ERR "RPC: attempt to wake up non-existing task!\n");
-		rpc_debug = ~0;
-		rpc_show_tasks();
-		return;
-	}
+	BUG_ON(task->tk_magic != RPC_TASK_MAGIC_ID);
 #endif
 	/* Has the task been executed yet? If not, we cannot wake it up! */
 	if (!RPC_IS_ACTIVATED(task)) {
 		printk(KERN_ERR "RPC: Inactive task (%p) being woken up!\n", task);
 		return;
 	}
-	if (RPC_IS_RUNNING(task))
-		return;
 
 	__rpc_disable_timer(task);
-	if (task->tk_rpcwait != &schedq)
-		__rpc_remove_wait_queue(task);
+	__rpc_remove_wait_queue(task);
 
 	rpc_make_runnable(task);
 
@@ -458,6 +372,18 @@
 }
 
 /*
+ * Wake up the specified task
+ */
+static void __rpc_wake_up_task(struct rpc_task *task)
+{
+	if (rpc_start_wakeup(task)) {
+		if (RPC_IS_QUEUED(task))
+			__rpc_do_wake_up_task(task);
+		rpc_finish_wakeup(task);
+	}
+}
+
+/*
  * Default timeout handler if none specified by user
  */
 static void
@@ -471,14 +397,18 @@
 /*
  * Wake up the specified task
  */
-void
-rpc_wake_up_task(struct rpc_task *task)
+void rpc_wake_up_task(struct rpc_task *task)
 {
-	if (RPC_IS_RUNNING(task))
-		return;
-	spin_lock_bh(&rpc_queue_lock);
-	__rpc_wake_up_task(task);
-	spin_unlock_bh(&rpc_queue_lock);
+	if (rpc_start_wakeup(task)) {
+		if (RPC_IS_QUEUED(task)) {
+			struct rpc_wait_queue *queue = task->u.tk_wait.rpc_waitq;
+
+			spin_lock_bh(&queue->lock);
+			__rpc_do_wake_up_task(task);
+			spin_unlock_bh(&queue->lock);
+		}
+		rpc_finish_wakeup(task);
+	}
 }
 
 /*
@@ -494,11 +424,11 @@
 	 */
 	q = &queue->tasks[queue->priority];
 	if (!list_empty(q)) {
-		task = list_entry(q->next, struct rpc_task, tk_list);
+		task = list_entry(q->next, struct rpc_task, u.tk_wait.list);
 		if (queue->cookie == task->tk_cookie) {
 			if (--queue->nr)
 				goto out;
-			list_move_tail(&task->tk_list, q);
+			list_move_tail(&task->u.tk_wait.list, q);
 		}
 		/*
 		 * Check if we need to switch queues.
@@ -516,7 +446,7 @@
 		else
 			q = q - 1;
 		if (!list_empty(q)) {
-			task = list_entry(q->next, struct rpc_task, tk_list);
+			task = list_entry(q->next, struct rpc_task, u.tk_wait.list);
 			goto new_queue;
 		}
 	} while (q != &queue->tasks[queue->priority]);
@@ -541,14 +471,14 @@
 	struct rpc_task	*task = NULL;
 
 	dprintk("RPC:      wake_up_next(%p \"%s\")\n", queue, rpc_qname(queue));
-	spin_lock_bh(&rpc_queue_lock);
+	spin_lock_bh(&queue->lock);
 	if (RPC_IS_PRIORITY(queue))
 		task = __rpc_wake_up_next_priority(queue);
 	else {
 		task_for_first(task, &queue->tasks[0])
 			__rpc_wake_up_task(task);
 	}
-	spin_unlock_bh(&rpc_queue_lock);
+	spin_unlock_bh(&queue->lock);
 
 	return task;
 }
@@ -557,25 +487,25 @@
  * rpc_wake_up - wake up all rpc_tasks
  * @queue: rpc_wait_queue on which the tasks are sleeping
  *
- * Grabs rpc_queue_lock
+ * Grabs queue->lock
  */
 void rpc_wake_up(struct rpc_wait_queue *queue)
 {
 	struct rpc_task *task;
 
 	struct list_head *head;
-	spin_lock_bh(&rpc_queue_lock);
+	spin_lock_bh(&queue->lock);
 	head = &queue->tasks[queue->maxpriority];
 	for (;;) {
 		while (!list_empty(head)) {
-			task = list_entry(head->next, struct rpc_task, tk_list);
+			task = list_entry(head->next, struct rpc_task, u.tk_wait.list);
 			__rpc_wake_up_task(task);
 		}
 		if (head == &queue->tasks[0])
 			break;
 		head--;
 	}
-	spin_unlock_bh(&rpc_queue_lock);
+	spin_unlock_bh(&queue->lock);
 }
 
 /**
@@ -583,18 +513,18 @@
  * @queue: rpc_wait_queue on which the tasks are sleeping
  * @status: status value to set
  *
- * Grabs rpc_queue_lock
+ * Grabs queue->lock
  */
 void rpc_wake_up_status(struct rpc_wait_queue *queue, int status)
 {
 	struct list_head *head;
 	struct rpc_task *task;
 
-	spin_lock_bh(&rpc_queue_lock);
+	spin_lock_bh(&queue->lock);
 	head = &queue->tasks[queue->maxpriority];
 	for (;;) {
 		while (!list_empty(head)) {
-			task = list_entry(head->next, struct rpc_task, tk_list);
+			task = list_entry(head->next, struct rpc_task, u.tk_wait.list);
 			task->tk_status = status;
 			__rpc_wake_up_task(task);
 		}
@@ -602,7 +532,7 @@
 			break;
 		head--;
 	}
-	spin_unlock_bh(&rpc_queue_lock);
+	spin_unlock_bh(&queue->lock);
 }
 
 /*
@@ -626,22 +556,23 @@
 /*
  * This is the RPC `scheduler' (or rather, the finite state machine).
  */
-static int
-__rpc_execute(struct rpc_task *task)
+static int __rpc_execute(struct rpc_task *task)
 {
 	int		status = 0;
 
 	dprintk("RPC: %4d rpc_execute flgs %x\n",
 				task->tk_pid, task->tk_flags);
 
-	if (!RPC_IS_RUNNING(task)) {
-		printk(KERN_WARNING "RPC: rpc_execute called for sleeping task!!\n");
-		return 0;
-	}
+	BUG_ON(RPC_IS_QUEUED(task));
 
  restarted:
 	while (1) {
 		/*
+		 * Garbage collection of pending timers...
+		 */
+		rpc_delete_timer(task);
+
+		/*
 		 * Execute any pending callback.
 		 */
 		if (RPC_DO_CALLBACK(task)) {
@@ -657,7 +588,9 @@
 			 */
 			save_callback=task->tk_callback;
 			task->tk_callback=NULL;
+			lock_kernel();
 			save_callback(task);
+			unlock_kernel();
 		}
 
 		/*
@@ -665,43 +598,35 @@
 		 * tk_action may be NULL when the task has been killed
 		 * by someone else.
 		 */
-		if (RPC_IS_RUNNING(task)) {
-			/*
-			 * Garbage collection of pending timers...
-			 */
-			rpc_delete_timer(task);
+		if (!RPC_IS_QUEUED(task)) {
 			if (!task->tk_action)
 				break;
+			lock_kernel();
 			task->tk_action(task);
-			/* micro-optimization to avoid spinlock */
-			if (RPC_IS_RUNNING(task))
-				continue;
+			unlock_kernel();
 		}
 
 		/*
-		 * Check whether task is sleeping.
+		 * Lockless check for whether task is sleeping or not.
 		 */
-		spin_lock_bh(&rpc_queue_lock);
-		if (!RPC_IS_RUNNING(task)) {
-			rpc_set_sleeping(task);
-			if (RPC_IS_ASYNC(task)) {
-				spin_unlock_bh(&rpc_queue_lock);
+		if (!RPC_IS_QUEUED(task))
+			continue;
+		rpc_clear_running(task);
+		if (RPC_IS_ASYNC(task)) {
+			/* Careful! we may have raced... */
+			if (RPC_IS_QUEUED(task))
 				return 0;
-			}
+			if (rpc_test_and_set_running(task))
+				return 0;
+			continue;
 		}
-		spin_unlock_bh(&rpc_queue_lock);
 
-		if (!RPC_IS_SLEEPING(task))
-			continue;
 		/* sync task: sleep here */
 		dprintk("RPC: %4d sync task going to sleep\n", task->tk_pid);
-		if (current->pid == rpciod_pid)
-			printk(KERN_ERR "RPC: rpciod waiting on sync task!\n");
-
 		if (RPC_TASK_UNINTERRUPTIBLE(task)) {
-			__wait_event(task->tk_wait, !RPC_IS_SLEEPING(task));
+			__wait_event(task->u.tk_wait.waitq, !RPC_IS_QUEUED(task));
 		} else {
-			__wait_event_interruptible(task->tk_wait, !RPC_IS_SLEEPING(task), status);
+			__wait_event_interruptible(task->u.tk_wait.waitq, !RPC_IS_QUEUED(task), status);
 			/*
 			 * When a sync task receives a signal, it exits with
 			 * -ERESTARTSYS. In order to catch any callbacks that
@@ -715,11 +640,14 @@
 				rpc_wake_up_task(task);
 			}
 		}
+		rpc_set_running(task);
 		dprintk("RPC: %4d sync task resuming\n", task->tk_pid);
 	}
 
 	if (task->tk_exit) {
+		lock_kernel();
 		task->tk_exit(task);
+		unlock_kernel();
 		/* If tk_action is non-null, the user wants us to restart */
 		if (task->tk_action) {
 			if (!RPC_ASSASSINATED(task)) {
@@ -738,7 +666,6 @@
 
 	/* Release all resources associated with the task */
 	rpc_release_task(task);
-
 	return status;
 }
 
@@ -754,57 +681,16 @@
 int
 rpc_execute(struct rpc_task *task)
 {
-	int status = -EIO;
-	if (rpc_inhibit) {
-		printk(KERN_INFO "RPC: execution inhibited!\n");
-		goto out_release;
-	}
-
-	status = -EWOULDBLOCK;
-	if (task->tk_active) {
-		printk(KERN_ERR "RPC: active task was run twice!\n");
-		goto out_err;
-	}
+	BUG_ON(task->tk_active);
 
 	task->tk_active = 1;
 	rpc_set_running(task);
 	return __rpc_execute(task);
- out_release:
-	rpc_release_task(task);
- out_err:
-	return status;
 }
 
-/*
- * This is our own little scheduler for async RPC tasks.
- */
-static void
-__rpc_schedule(void)
+static void rpc_async_schedule(void *arg)
 {
-	struct rpc_task	*task;
-	int		count = 0;
-
-	dprintk("RPC:      rpc_schedule enter\n");
-	while (1) {
-
-		task_for_first(task, &schedq.tasks[0]) {
-			__rpc_remove_wait_queue(task);
-			spin_unlock_bh(&rpc_queue_lock);
-
-			__rpc_execute(task);
-			spin_lock_bh(&rpc_queue_lock);
-		} else {
-			break;
-		}
-
-		if (++count >= 200 || need_resched()) {
-			count = 0;
-			spin_unlock_bh(&rpc_queue_lock);
-			schedule();
-			spin_lock_bh(&rpc_queue_lock);
-		}
-	}
-	dprintk("RPC:      rpc_schedule leave\n");
+	__rpc_execute((struct rpc_task *)arg);
 }
 
 /*
@@ -837,7 +723,7 @@
 	return task->tk_buffer;
 }
 
-void
+static void
 rpc_free(struct rpc_task *task)
 {
 	if (task->tk_buffer) {
@@ -862,7 +748,6 @@
 	task->tk_client = clnt;
 	task->tk_flags  = flags;
 	task->tk_exit   = callback;
-	init_waitqueue_head(&task->tk_wait);
 	if (current->uid != current->fsuid || current->gid != current->fsgid)
 		task->tk_flags |= RPC_TASK_SETUID;
 
@@ -873,12 +758,11 @@
 
 	task->tk_priority = RPC_PRIORITY_NORMAL;
 	task->tk_cookie = (unsigned long)current;
-	INIT_LIST_HEAD(&task->tk_links);
 
-	/* Add to global list of all tasks */
-	spin_lock(&rpc_sched_lock);
-	list_add(&task->tk_task, &all_tasks);
-	spin_unlock(&rpc_sched_lock);
+	/* Initialize workqueue for async tasks */
+	task->tk_workqueue = rpciod_workqueue;
+	if (!RPC_IS_ASYNC(task))
+		init_waitqueue_head(&task->u.tk_wait.waitq);
 
 	if (clnt) {
 		atomic_inc(&clnt->cl_users);
@@ -889,9 +773,14 @@
 	}
 
 #ifdef RPC_DEBUG
-	task->tk_magic = 0xf00baa;
+	task->tk_magic = RPC_TASK_MAGIC_ID;
 	task->tk_pid = rpc_task_id++;
 #endif
+	/* Add to global list of all tasks */
+	spin_lock(&rpc_sched_lock);
+	list_add_tail(&task->tk_task, &all_tasks);
+	spin_unlock(&rpc_sched_lock);
+
 	dprintk("RPC: %4d new task procpid %d\n", task->tk_pid,
 				current->pid);
 }
@@ -944,18 +833,12 @@
 	goto out;
 }
 
-void
-rpc_release_task(struct rpc_task *task)
+void rpc_release_task(struct rpc_task *task)
 {
 	dprintk("RPC: %4d release task\n", task->tk_pid);
 
 #ifdef RPC_DEBUG
-	if (task->tk_magic != 0xf00baa) {
-		printk(KERN_ERR "RPC: attempt to release a non-existing task!\n");
-		rpc_debug = ~0;
-		rpc_show_tasks();
-		return;
-	}
+	BUG_ON(task->tk_magic != RPC_TASK_MAGIC_ID);
 #endif
 
 	/* Remove from global task list */
@@ -963,19 +846,9 @@
 	list_del(&task->tk_task);
 	spin_unlock(&rpc_sched_lock);
 
-	/* Protect the execution below. */
-	spin_lock_bh(&rpc_queue_lock);
-
-	/* Disable timer to prevent zombie wakeup */
-	__rpc_disable_timer(task);
-
-	/* Remove from any wait queue we're still on */
-	__rpc_remove_wait_queue(task);
-
+	BUG_ON (RPC_IS_QUEUED(task));
 	task->tk_active = 0;
 
-	spin_unlock_bh(&rpc_queue_lock);
-
 	/* Synchronously delete any running timer */
 	rpc_delete_timer(task);
 
@@ -1005,10 +878,9 @@
  * queue 'childq'. If so returns a pointer to the parent.
  * Upon failure returns NULL.
  *
- * Caller must hold rpc_queue_lock
+ * Caller must hold childq.lock
  */
-static inline struct rpc_task *
-rpc_find_parent(struct rpc_task *child)
+static inline struct rpc_task *rpc_find_parent(struct rpc_task *child)
 {
 	struct rpc_task	*task, *parent;
 	struct list_head *le;
@@ -1021,17 +893,16 @@
 	return NULL;
 }
 
-static void
-rpc_child_exit(struct rpc_task *child)
+static void rpc_child_exit(struct rpc_task *child)
 {
 	struct rpc_task	*parent;
 
-	spin_lock_bh(&rpc_queue_lock);
+	spin_lock_bh(&childq.lock);
 	if ((parent = rpc_find_parent(child)) != NULL) {
 		parent->tk_status = child->tk_status;
 		__rpc_wake_up_task(parent);
 	}
-	spin_unlock_bh(&rpc_queue_lock);
+	spin_unlock_bh(&childq.lock);
 }
 
 /*
@@ -1054,22 +925,20 @@
 	return NULL;
 }
 
-void
-rpc_run_child(struct rpc_task *task, struct rpc_task *child, rpc_action func)
+void rpc_run_child(struct rpc_task *task, struct rpc_task *child, rpc_action func)
 {
-	spin_lock_bh(&rpc_queue_lock);
+	spin_lock_bh(&childq.lock);
 	/* N.B. Is it possible for the child to have already finished? */
 	__rpc_sleep_on(&childq, task, func, NULL);
 	rpc_schedule_run(child);
-	spin_unlock_bh(&rpc_queue_lock);
+	spin_unlock_bh(&childq.lock);
 }
 
 /*
  * Kill all tasks for the given client.
  * XXX: kill their descendants as well?
  */
-void
-rpc_killall_tasks(struct rpc_clnt *clnt)
+void rpc_killall_tasks(struct rpc_clnt *clnt)
 {
 	struct rpc_task	*rovr;
 	struct list_head *le;
@@ -1080,104 +949,28 @@
 	 * Spin lock all_tasks to prevent changes...
 	 */
 	spin_lock(&rpc_sched_lock);
-	alltask_for_each(rovr, le, &all_tasks)
+	alltask_for_each(rovr, le, &all_tasks) {
+		if (! RPC_IS_ACTIVATED(rovr))
+			continue;
 		if (!clnt || rovr->tk_client == clnt) {
 			rovr->tk_flags |= RPC_TASK_KILLED;
 			rpc_exit(rovr, -EIO);
 			rpc_wake_up_task(rovr);
 		}
+	}
 	spin_unlock(&rpc_sched_lock);
 }
 
 static DECLARE_MUTEX_LOCKED(rpciod_running);
 
-static inline int
-rpciod_task_pending(void)
-{
-	return !list_empty(&schedq.tasks[0]);
-}
-
-
-/*
- * This is the rpciod kernel thread
- */
-static int
-rpciod(void *ptr)
-{
-	int		rounds = 0;
-
-	lock_kernel();
-	/*
-	 * Let our maker know we're running ...
-	 */
-	rpciod_pid = current->pid;
-	up(&rpciod_running);
-
-	daemonize("rpciod");
-	allow_signal(SIGKILL);
-
-	dprintk("RPC: rpciod starting (pid %d)\n", rpciod_pid);
-	spin_lock_bh(&rpc_queue_lock);
-	while (rpciod_users) {
-		DEFINE_WAIT(wait);
-		if (signalled()) {
-			spin_unlock_bh(&rpc_queue_lock);
-			rpciod_killall();
-			flush_signals(current);
-			spin_lock_bh(&rpc_queue_lock);
-		}
-		__rpc_schedule();
-		if (current->flags & PF_FREEZE) {
-			spin_unlock_bh(&rpc_queue_lock);
-			refrigerator(PF_FREEZE);
-			spin_lock_bh(&rpc_queue_lock);
-		}
-
-		if (++rounds >= 64) {	/* safeguard */
-			spin_unlock_bh(&rpc_queue_lock);
-			schedule();
-			rounds = 0;
-			spin_lock_bh(&rpc_queue_lock);
-		}
-
-		dprintk("RPC: rpciod back to sleep\n");
-		prepare_to_wait(&rpciod_idle, &wait, TASK_INTERRUPTIBLE);
-		if (!rpciod_task_pending() && !signalled()) {
-			spin_unlock_bh(&rpc_queue_lock);
-			schedule();
-			rounds = 0;
-			spin_lock_bh(&rpc_queue_lock);
-		}
-		finish_wait(&rpciod_idle, &wait);
-		dprintk("RPC: switch to rpciod\n");
-	}
-	spin_unlock_bh(&rpc_queue_lock);
-
-	dprintk("RPC: rpciod shutdown commences\n");
-	if (!list_empty(&all_tasks)) {
-		printk(KERN_ERR "rpciod: active tasks at shutdown?!\n");
-		rpciod_killall();
-	}
-
-	dprintk("RPC: rpciod exiting\n");
-	unlock_kernel();
-
-	rpciod_pid = 0;
-	complete_and_exit(&rpciod_killer, 0);
-	return 0;
-}
-
-static void
-rpciod_killall(void)
+static void rpciod_killall(void)
 {
 	unsigned long flags;
 
 	while (!list_empty(&all_tasks)) {
 		clear_thread_flag(TIF_SIGPENDING);
 		rpc_killall_tasks(NULL);
-		spin_lock_bh(&rpc_queue_lock);
-		__rpc_schedule();
-		spin_unlock_bh(&rpc_queue_lock);
+		flush_workqueue(rpciod_workqueue);
 		if (!list_empty(&all_tasks)) {
 			dprintk("rpciod_killall: waiting for tasks to exit\n");
 			yield();
@@ -1195,28 +988,30 @@
 int
 rpciod_up(void)
 {
+	struct workqueue_struct *wq;
 	int error = 0;
 
 	down(&rpciod_sema);
-	dprintk("rpciod_up: pid %d, users %d\n", rpciod_pid, rpciod_users);
+	dprintk("rpciod_up: users %d\n", rpciod_users);
 	rpciod_users++;
-	if (rpciod_pid)
+	if (rpciod_workqueue)
 		goto out;
 	/*
 	 * If there's no pid, we should be the first user.
 	 */
 	if (rpciod_users > 1)
-		printk(KERN_WARNING "rpciod_up: no pid, %d users??\n", rpciod_users);
+		printk(KERN_WARNING "rpciod_up: no workqueue, %d users??\n", rpciod_users);
 	/*
 	 * Create the rpciod thread and wait for it to start.
 	 */
-	error = kernel_thread(rpciod, NULL, 0);
-	if (error < 0) {
-		printk(KERN_WARNING "rpciod_up: create thread failed, error=%d\n", error);
+	error = -ENOMEM;
+	wq = create_workqueue("rpciod");
+	if (wq == NULL) {
+		printk(KERN_WARNING "rpciod_up: create workqueue failed, error=%d\n", error);
 		rpciod_users--;
 		goto out;
 	}
-	down(&rpciod_running);
+	rpciod_workqueue = wq;
 	error = 0;
 out:
 	up(&rpciod_sema);
@@ -1227,20 +1022,21 @@
 rpciod_down(void)
 {
 	down(&rpciod_sema);
-	dprintk("rpciod_down pid %d sema %d\n", rpciod_pid, rpciod_users);
+	dprintk("rpciod_down sema %d\n", rpciod_users);
 	if (rpciod_users) {
 		if (--rpciod_users)
 			goto out;
 	} else
-		printk(KERN_WARNING "rpciod_down: pid=%d, no users??\n", rpciod_pid);
+		printk(KERN_WARNING "rpciod_down: no users??\n");
 
-	if (!rpciod_pid) {
+	if (!rpciod_workqueue) {
 		dprintk("rpciod_down: Nothing to do!\n");
 		goto out;
 	}
+	rpciod_killall();
 
-	kill_proc(rpciod_pid, SIGKILL, 1);
-	wait_for_completion(&rpciod_killer);
+	destroy_workqueue(rpciod_workqueue);
+	rpciod_workqueue = NULL;
  out:
 	up(&rpciod_sema);
 }
@@ -1258,7 +1054,12 @@
 	}
 	printk("-pid- proc flgs status -client- -prog- --rqstp- -timeout "
 		"-rpcwait -action- --exit--\n");
-	alltask_for_each(t, le, &all_tasks)
+	alltask_for_each(t, le, &all_tasks) {
+		const char *rpc_waitq = "none";
+
+		if (RPC_IS_QUEUED(t))
+			rpc_waitq = rpc_qname(t->u.tk_wait.rpc_waitq);
+
 		printk("%05d %04d %04x %06d %8p %6d %8p %08ld %8s %8p %8p\n",
 			t->tk_pid,
 			(t->tk_msg.rpc_proc ? t->tk_msg.rpc_proc->p_proc : -1),
@@ -1266,8 +1067,9 @@
 			t->tk_client,
 			(t->tk_client ? t->tk_client->cl_prog : 0),
 			t->tk_rqstp, t->tk_timeout,
-			rpc_qname(t->tk_rpcwait),
+			rpc_waitq,
 			t->tk_action, t->tk_exit);
+	}
 	spin_unlock(&rpc_sched_lock);
 }
 #endif
diff -Nru a/net/sunrpc/sunrpc_syms.c b/net/sunrpc/sunrpc_syms.c
--- a/net/sunrpc/sunrpc_syms.c	2005-01-10 20:11:22 -08:00
+++ b/net/sunrpc/sunrpc_syms.c	2005-01-10 20:11:22 -08:00
@@ -107,7 +107,6 @@
 EXPORT_SYMBOL(auth_unix_forget_old);
 EXPORT_SYMBOL(auth_unix_lookup);
 EXPORT_SYMBOL(cache_check);
-EXPORT_SYMBOL(cache_clean);
 EXPORT_SYMBOL(cache_flush);
 EXPORT_SYMBOL(cache_purge);
 EXPORT_SYMBOL(cache_fresh);
diff -Nru a/net/sunrpc/svcauth.c b/net/sunrpc/svcauth.c
--- a/net/sunrpc/svcauth.c	2005-01-10 20:11:21 -08:00
+++ b/net/sunrpc/svcauth.c	2005-01-10 20:11:21 -08:00
@@ -128,7 +128,8 @@
 #define	DN_HASHMASK	(DN_HASHMAX-1)
 
 static struct cache_head	*auth_domain_table[DN_HASHMAX];
-void auth_domain_drop(struct cache_head *item, struct cache_detail *cd)
+
+static void auth_domain_drop(struct cache_head *item, struct cache_detail *cd)
 {
 	struct auth_domain *dom = container_of(item, struct auth_domain, h);
 	if (cache_put(item,cd))
diff -Nru a/net/sunrpc/svcauth_des.c b/net/sunrpc/svcauth_des.c
--- a/net/sunrpc/svcauth_des.c	2005-01-10 20:11:20 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,215 +0,0 @@
-/*
- * linux/net/sunrpc/svcauth_des.c
- *
- * Server-side AUTH_DES handling.
- * 
- * Copyright (C) 1996, 1997 Olaf Kirch <okir@monad.swb.de>
- */
-
-#include <linux/types.h>
-#include <linux/sched.h>
-#include <linux/sunrpc/types.h>
-#include <linux/sunrpc/xdr.h>
-#include <linux/sunrpc/svcauth.h>
-#include <linux/sunrpc/svcsock.h>
-
-#define RPCDBG_FACILITY	RPCDBG_AUTH
-
-/*
- * DES cedential cache.
- * The cache is indexed by fullname/key to allow for multiple sessions
- * by the same user from different hosts.
- * It would be tempting to use the client's IP address rather than the
- * conversation key as an index, but that could become problematic for
- * multi-homed hosts that distribute traffic across their interfaces.
- */
-struct des_cred {
-	struct des_cred *	dc_next;
-	char *			dc_fullname;
-	u32			dc_nickname;
-	des_cblock		dc_key;		/* conversation key */
-	des_cblock		dc_xkey;	/* encrypted conv. key */
-	des_key_schedule	dc_keysched;
-};
-
-#define ADN_FULLNAME		0
-#define ADN_NICKNAME		1
-
-/*
- * The default slack allowed when checking for replayed credentials
- * (in milliseconds).
- */
-#define DES_REPLAY_SLACK	2000
-
-/*
- * Make sure we don't place more than one call to the key server at
- * a time.
- */
-static int			in_keycall;
-
-#define FAIL(err) \
-	{ if (data) put_cred(data);			\
-	  *authp = rpc_autherr_##err;			\
-	  return;					\
-	}
-
-void
-svcauth_des(struct svc_rqst *rqstp, u32 *statp, u32 *authp)
-{
-	struct svc_buf	*argp = &rqstp->rq_argbuf;
-	struct svc_buf	*resp = &rqstp->rq_resbuf;
-	struct svc_cred	*cred = &rqstp->rq_cred;
-	struct des_cred	*data = NULL;
-	u32		cryptkey[2];
-	u32		cryptbuf[4];
-	u32		*p = argp->buf;
-	int		len   = argp->len, slen, i;
-
-	*authp = rpc_auth_ok;
-
-	if ((argp->len -= 3) < 0) {
-		*statp = rpc_garbage_args;
-		return;
-	}
-
-	p++;					/* skip length field */
-	namekind = ntohl(*p++);			/* fullname/nickname */
-
-	/* Get the credentials */
-	if (namekind == ADN_NICKNAME) {
-		/* If we can't find the cached session key, initiate a
-		 * new session. */
-		if (!(data = get_cred_bynick(*p++)))
-			FAIL(rejectedcred);
-	} else if (namekind == ADN_FULLNAME) {
-		p = xdr_decode_string(p, &fullname, &len, RPC_MAXNETNAMELEN);
-		if (p == NULL)
-			FAIL(badcred);
-		cryptkey[0] = *p++;		/* get the encrypted key */
-		cryptkey[1] = *p++;
-		cryptbuf[2] = *p++;		/* get the encrypted window */
-	} else {
-		FAIL(badcred);
-	}
-
-	/* If we're just updating the key, silently discard the request. */
-	if (data && data->dc_locked) {
-		*authp = rpc_autherr_dropit;
-		_put_cred(data);	/* release but don't unlock */
-		return;
-	}
-
-	/* Get the verifier flavor and length */
-	if (ntohl(*p++) != RPC_AUTH_DES && ntohl(*p++) != 12)
-		FAIL(badverf);
-
-	cryptbuf[0] = *p++;			/* encrypted time stamp */
-	cryptbuf[1] = *p++;
-	cryptbuf[3] = *p++;			/* 0 or window - 1 */
-
-	if (namekind == ADN_NICKNAME) {
-		status = des_ecb_encrypt((des_block *) cryptbuf,
-					 (des_block *) cryptbuf,
-					 data->dc_keysched, DES_DECRYPT);
-	} else {
-		/* We first have to decrypt the new session key and
-		 * fill in the UNIX creds. */
-		if (!(data = get_cred_byname(rqstp, authp, fullname, cryptkey)))
-			return;
-		status = des_cbc_encrypt((des_cblock *) cryptbuf,
-					 (des_cblock *) cryptbuf, 16,
-					 data->dc_keysched,
-					 (des_cblock *) &ivec,
-					 DES_DECRYPT);
-	}
-	if (status) {
-		printk("svcauth_des: DES decryption failed (status %d)\n",
-				status);
-		FAIL(badverf);
-	}
-
-	/* Now check the whole lot */
-	if (namekind == ADN_FULLNAME) {
-		unsigned long	winverf;
-
-		data->dc_window = ntohl(cryptbuf[2]);
-		winverf = ntohl(cryptbuf[2]);
-		if (window != winverf - 1) {
-			printk("svcauth_des: bad window verifier!\n");
-			FAIL(badverf);
-		}
-	}
-
-	/* XDR the decrypted timestamp */
-	cryptbuf[0] = ntohl(cryptbuf[0]);
-	cryptbuf[1] = ntohl(cryptbuf[1]);
-	if (cryptbuf[1] > 1000000) {
-		dprintk("svcauth_des: bad usec value %u\n", cryptbuf[1]);
-		if (namekind == ADN_NICKNAME)
-			FAIL(rejectedverf);
-		FAIL(badverf);
-	}
-	
-	/*
-	 * Check for replayed credentials. We must allow for reordering
-	 * of requests by the network, and the OS scheduler, hence we
-	 * cannot expect timestamps to be increasing monotonically.
-	 * This opens a small security hole, therefore the replay_slack
-	 * value shouldn't be too large.
-	 */
-	if ((delta = cryptbuf[0] - data->dc_timestamp[0]) <= 0) {
-		switch (delta) {
-		case -1:	
-			delta = -1000000;
-		case 0:
-			delta += cryptbuf[1] - data->dc_timestamp[1];
-			break;
-		default:
-			delta = -1000000;
-		}
-		if (delta < DES_REPLAY_SLACK)
-			FAIL(rejectedverf);
-#ifdef STRICT_REPLAY_CHECKS
-		/* TODO: compare time stamp to last five timestamps cached
-		 * and reject (drop?) request if a match is found. */
-#endif
-	}
-
-	now = xtime;
-	now.tv_secs -= data->dc_window;
-	if (now.tv_secs < cryptbuf[0] ||
-	    (now.tv_secs == cryptbuf[0] && now.tv_usec < cryptbuf[1]))
-		FAIL(rejectedverf);
-
-	/* Okay, we're done. Update the lot */
-	if (namekind == ADN_FULLNAME)
-		data->dc_valid = 1;
-	data->dc_timestamp[0] = cryptbuf[0];
-	data->dc_timestamp[1] = cryptbuf[1];
-
-	put_cred(data);
-	return;
-garbage:
-	*statp = rpc_garbage_args;
-	return;
-}
-
-/*
- * Call the keyserver to obtain the decrypted conversation key and
- * UNIX creds. We use a Linux-specific keycall extension that does
- * both things in one go.
- */
-static struct des_cred *
-get_cred_byname(struct svc_rqst *rqstp, u32 *authp, char *fullname, u32 *cryptkey)
-{
-	static int	in_keycall;
-	struct des_cred	*cred;
-
-	if (in_keycall) {
-		*authp = rpc_autherr_dropit;
-		return NULL;
-	}
-	in_keycall = 1;
-	in_keycall = 0;
-	return cred;
-}
diff -Nru a/net/sunrpc/svcauth_unix.c b/net/sunrpc/svcauth_unix.c
--- a/net/sunrpc/svcauth_unix.c	2005-01-10 20:11:20 -08:00
+++ b/net/sunrpc/svcauth_unix.c	2005-01-10 20:11:20 -08:00
@@ -97,7 +97,7 @@
 };
 static struct cache_head	*ip_table[IP_HASHMAX];
 
-void ip_map_put(struct cache_head *item, struct cache_detail *cd)
+static void ip_map_put(struct cache_head *item, struct cache_detail *cd)
 {
 	struct ip_map *im = container_of(item, struct ip_map,h);
 	if (cache_put(item, cd)) {
@@ -329,14 +329,49 @@
 	cache_purge(&auth_domain_cache);
 }
 
+static int
+svcauth_unix_set_client(struct svc_rqst *rqstp)
+{
+	struct ip_map key, *ipm;
+
+	rqstp->rq_client = NULL;
+	if (rqstp->rq_proc == 0)
+		return SVC_OK;
+
+	strcpy(key.m_class, rqstp->rq_server->sv_program->pg_class);
+	key.m_addr = rqstp->rq_addr.sin_addr;
+
+	ipm = ip_map_lookup(&key, 0);
+
+	if (ipm == NULL)
+		return SVC_DENIED;
+
+	switch (cache_check(&ip_map_cache, &ipm->h, &rqstp->rq_chandle)) {
+		default:
+			BUG();
+		case -EAGAIN:
+			return SVC_DROP;
+		case -ENOENT:
+			return SVC_DENIED;
+		case 0:
+			rqstp->rq_client = &ipm->m_client->h;
+			cache_get(&rqstp->rq_client->h);
+			ip_map_put(&ipm->h, &ip_map_cache);
+			break;
+	}
+	return SVC_OK;
+}
 
 static int
 svcauth_null_accept(struct svc_rqst *rqstp, u32 *authp)
 {
 	struct kvec	*argv = &rqstp->rq_arg.head[0];
 	struct kvec	*resv = &rqstp->rq_res.head[0];
+	struct svc_cred	*cred = &rqstp->rq_cred;
 	int		rv=0;
-	struct ip_map key, *ipm;
+
+	cred->cr_group_info = NULL;
+	rqstp->rq_client = NULL;
 
 	if (argv->iov_len < 3*4)
 		return SVC_GARBAGE;
@@ -353,45 +388,25 @@
 	}
 
 	/* Signal that mapping to nobody uid/gid is required */
-	rqstp->rq_cred.cr_uid = (uid_t) -1;
-	rqstp->rq_cred.cr_gid = (gid_t) -1;
-	rqstp->rq_cred.cr_group_info = groups_alloc(0);
-	if (rqstp->rq_cred.cr_group_info == NULL)
+	cred->cr_uid = (uid_t) -1;
+	cred->cr_gid = (gid_t) -1;
+	cred->cr_group_info = groups_alloc(0);
+	if (cred->cr_group_info == NULL)
 		return SVC_DROP; /* kmalloc failure - client must retry */
 
+	rv = svcauth_unix_set_client(rqstp);
+	if (rv == SVC_DENIED)
+		goto badcred;
+
 	/* Put NULL verifier */
 	svc_putu32(resv, RPC_AUTH_NULL);
 	svc_putu32(resv, 0);
 
-	strcpy(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:
-			rv = SVC_DROP;
-			break;
-		case -ENOENT:
-			rv = SVC_OK; /* rq_client is NULL */
-			break;
-		case 0:
-			rqstp->rq_client = &ipm->m_client->h;
-			cache_get(&rqstp->rq_client->h);
-			ip_map_put(&ipm->h, &ip_map_cache);
-			rv = SVC_OK;
-			break;
-		default: BUG();
-		}
-	else rv = SVC_DROP;
-
-	if (rqstp->rq_client == NULL && rqstp->rq_proc != 0)
-		*authp = rpc_autherr_badcred;
-
 	return rv;
+
+badcred:
+	*authp = rpc_autherr_badcred;
+	return SVC_DENIED;
 }
 
 static int
@@ -417,7 +432,7 @@
 };
 
 
-int
+static int
 svcauth_unix_accept(struct svc_rqst *rqstp, u32 *authp)
 {
 	struct kvec	*argv = &rqstp->rq_arg.head[0];
@@ -426,7 +441,6 @@
 	u32		slen, i;
 	int		len   = argv->iov_len;
 	int		rv=0;
-	struct ip_map key, *ipm;
 
 	cred->cr_group_info = NULL;
 	rqstp->rq_client = NULL;
@@ -458,32 +472,8 @@
 		return SVC_DENIED;
 	}
 
-
-	strcpy(key.m_class, rqstp->rq_server->sv_program->pg_class);
-	key.m_addr = rqstp->rq_addr.sin_addr;
-
-
-	ipm = ip_map_lookup(&key, 0);
-
-	if (ipm)
-		switch (cache_check(&ip_map_cache, &ipm->h, &rqstp->rq_chandle)) {
-		case -EAGAIN:
-			rv = SVC_DROP;
-			break;
-		case -ENOENT:
-			rv = SVC_OK; /* rq_client is NULL */
-			break;
-		case 0:
-			rqstp->rq_client = &ipm->m_client->h;
-			cache_get(&rqstp->rq_client->h);
-			ip_map_put(&ipm->h, &ip_map_cache);
-			rv = SVC_OK;
-			break;
-		default: BUG();
-		}
-	else rv = SVC_DROP;
-
-	if (rv  == SVC_OK && rqstp->rq_client == NULL && rqstp->rq_proc != 0)
+	rv = svcauth_unix_set_client(rqstp);
+	if (rv == SVC_DENIED)
 		goto badcred;
 
 	/* Put NULL verifier */
@@ -497,7 +487,7 @@
 	return SVC_DENIED;
 }
 
-int
+static int
 svcauth_unix_release(struct svc_rqst *rqstp)
 {
 	/* Verifier (such as it is) is already in place.
diff -Nru a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
--- a/net/sunrpc/svcsock.c	2005-01-10 20:11:16 -08:00
+++ b/net/sunrpc/svcsock.c	2005-01-10 20:11:16 -08:00
@@ -1077,7 +1077,7 @@
 svc_tcp_init(struct svc_sock *svsk)
 {
 	struct sock	*sk = svsk->sk_sk;
-	struct tcp_opt  *tp = tcp_sk(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 
 	svsk->sk_recvfrom = svc_tcp_recvfrom;
 	svsk->sk_sendto = svc_tcp_sendto;
diff -Nru a/net/sunrpc/xdr.c b/net/sunrpc/xdr.c
--- a/net/sunrpc/xdr.c	2005-01-10 20:11:21 -08:00
+++ b/net/sunrpc/xdr.c	2005-01-10 20:11:21 -08:00
@@ -33,15 +33,6 @@
 }
 
 u32 *
-xdr_decode_netobj_fixed(u32 *p, void *obj, unsigned int len)
-{
-	if (ntohl(*p++) != len)
-		return NULL;
-	memcpy(obj, p, len);
-	return p + XDR_QUADLEN(len);
-}
-
-u32 *
 xdr_decode_netobj(u32 *p, struct xdr_netobj *obj)
 {
 	unsigned int	len;
@@ -185,124 +176,6 @@
 	xdr->buflen += len;
 }
 
-/*
- * Realign the kvec if the server missed out some reply elements
- * (such as post-op attributes,...)
- * Note: This is a simple implementation that assumes that
- *            len <= iov->iov_len !!!
- *       The RPC header (assumed to be the 1st element in the iov array)
- *            is not shifted.
- */
-void xdr_shift_iovec(struct kvec *iov, int nr, size_t len)
-{
-	struct kvec *pvec;
-
-	for (pvec = iov + nr - 1; nr > 1; nr--, pvec--) {
-		struct kvec *svec = pvec - 1;
-
-		if (len > pvec->iov_len) {
-			printk(KERN_DEBUG "RPC: Urk! Large shift of short iovec.\n");
-			return;
-		}
-		memmove((char *)pvec->iov_base + len, pvec->iov_base,
-			pvec->iov_len - len);
-
-		if (len > svec->iov_len) {
-			printk(KERN_DEBUG "RPC: Urk! Large shift of short iovec.\n");
-			return;
-		}
-		memcpy(pvec->iov_base,
-		       (char *)svec->iov_base + svec->iov_len - len, len);
-	}
-}
-
-/*
- * Map a struct xdr_buf into an kvec array.
- */
-int xdr_kmap(struct kvec *iov_base, struct xdr_buf *xdr, size_t base)
-{
-	struct kvec	*iov = iov_base;
-	struct page	**ppage = xdr->pages;
-	unsigned int	len, pglen = xdr->page_len;
-
-	len = xdr->head[0].iov_len;
-	if (base < len) {
-		iov->iov_len = len - base;
-		iov->iov_base = (char *)xdr->head[0].iov_base + base;
-		iov++;
-		base = 0;
-	} else
-		base -= len;
-
-	if (pglen == 0)
-		goto map_tail;
-	if (base >= pglen) {
-		base -= pglen;
-		goto map_tail;
-	}
-	if (base || xdr->page_base) {
-		pglen -= base;
-		base  += xdr->page_base;
-		ppage += base >> PAGE_CACHE_SHIFT;
-		base &= ~PAGE_CACHE_MASK;
-	}
-	do {
-		len = PAGE_CACHE_SIZE;
-		iov->iov_base = kmap(*ppage);
-		if (base) {
-			iov->iov_base += base;
-			len -= base;
-			base = 0;
-		}
-		if (pglen < len)
-			len = pglen;
-		iov->iov_len = len;
-		iov++;
-		ppage++;
-	} while ((pglen -= len) != 0);
-map_tail:
-	if (xdr->tail[0].iov_len) {
-		iov->iov_len = xdr->tail[0].iov_len - base;
-		iov->iov_base = (char *)xdr->tail[0].iov_base + base;
-		iov++;
-	}
-	return (iov - iov_base);
-}
-
-void xdr_kunmap(struct xdr_buf *xdr, size_t base)
-{
-	struct page	**ppage = xdr->pages;
-	unsigned int	pglen = xdr->page_len;
-
-	if (!pglen)
-		return;
-	if (base > xdr->head[0].iov_len)
-		base -= xdr->head[0].iov_len;
-	else
-		base = 0;
-
-	if (base >= pglen)
-		return;
-	if (base || xdr->page_base) {
-		pglen -= base;
-		base  += xdr->page_base;
-		ppage += base >> PAGE_CACHE_SHIFT;
-		/* Note: The offset means that the length of the first
-		 * page is really (PAGE_CACHE_SIZE - (base & ~PAGE_CACHE_MASK)).
-		 * In order to avoid an extra test inside the loop,
-		 * we bump pglen here, and just subtract PAGE_CACHE_SIZE... */
-		pglen += base & ~PAGE_CACHE_MASK;
-	}
-	for (;;) {
-		flush_dcache_page(*ppage);
-		kunmap(*ppage);
-		if (pglen <= PAGE_CACHE_SIZE)
-			break;
-		pglen -= PAGE_CACHE_SIZE;
-		ppage++;
-	}
-}
-
 void
 xdr_partial_copy_from_skb(struct xdr_buf *xdr, unsigned int base,
 			  skb_reader_t *desc,
@@ -498,6 +371,7 @@
 	do {
 		/* Are any pointers crossing a page boundary? */
 		if (pgto_base == 0) {
+			flush_dcache_page(*pgto);
 			pgto_base = PAGE_CACHE_SIZE;
 			pgto--;
 		}
@@ -521,6 +395,7 @@
 		kunmap_atomic(vto, KM_USER0);
 
 	} while ((len -= copy) != 0);
+	flush_dcache_page(*pgto);
 }
 
 /*
@@ -554,12 +429,14 @@
 
 		pgbase += copy;
 		if (pgbase == PAGE_CACHE_SIZE) {
+			flush_dcache_page(*pgto);
 			pgbase = 0;
 			pgto++;
 		}
 		p += copy;
 
 	} while ((len -= copy) != 0);
+	flush_dcache_page(*pgto);
 }
 
 /*
@@ -572,7 +449,7 @@
  * Copies data into an arbitrary memory location from an array of pages
  * The copy is assumed to be non-overlapping.
  */
-void
+static void
 _copy_from_pages(char *p, struct page **pages, size_t pgbase, size_t len)
 {
 	struct page **pgfrom;
@@ -610,7 +487,7 @@
  * 'len' bytes. The extra data is not lost, but is instead
  * moved into the inlined pages and/or the tail.
  */
-void
+static void
 xdr_shrink_bufhead(struct xdr_buf *buf, size_t len)
 {
 	struct kvec *head, *tail;
@@ -683,7 +560,7 @@
  * 'len' bytes. The extra data is not lost, but is instead
  * moved into the tail.
  */
-void
+static void
 xdr_shrink_pagelen(struct xdr_buf *buf, size_t len)
 {
 	struct kvec *tail;
diff -Nru a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
--- a/net/sunrpc/xprt.c	2005-01-10 20:11:20 -08:00
+++ b/net/sunrpc/xprt.c	2005-01-10 20:11:20 -08:00
@@ -90,6 +90,8 @@
 static void	xprt_bind_socket(struct rpc_xprt *, struct socket *);
 static int      __xprt_get_cong(struct rpc_xprt *, struct rpc_task *);
 
+static int	xprt_clear_backlog(struct rpc_xprt *xprt);
+
 #ifdef RPC_DEBUG_DATA
 /*
  * Print the buffer contents (first 128 bytes only--just enough for
@@ -891,7 +893,8 @@
 	xprt->tcp_flags &= ~XPRT_COPY_XID;
 	xprt->tcp_flags |= XPRT_COPY_DATA;
 	xprt->tcp_copied = 4;
-	dprintk("RPC:      reading reply for XID %08x\n", xprt->tcp_xid);
+	dprintk("RPC:      reading reply for XID %08x\n",
+						ntohl(xprt->tcp_xid));
 	tcp_check_recm(xprt);
 }
 
@@ -911,7 +914,7 @@
 	if (!req) {
 		xprt->tcp_flags &= ~XPRT_COPY_DATA;
 		dprintk("RPC:      XID %08x request not found!\n",
-				xprt->tcp_xid);
+				ntohl(xprt->tcp_xid));
 		spin_unlock(&xprt->sock_lock);
 		return;
 	}
@@ -1101,7 +1104,7 @@
 		goto out;
 
 	spin_lock_bh(&xprt->sock_lock);
-	if (xprt->snd_task && xprt->snd_task->tk_rpcwait == &xprt->pending)
+	if (xprt->snd_task)
 		rpc_wake_up_task(xprt->snd_task);
 	spin_unlock_bh(&xprt->sock_lock);
 out:
@@ -1360,7 +1363,7 @@
 	req->rq_xprt    = xprt;
 	req->rq_xid     = xprt_alloc_xid(xprt);
 	dprintk("RPC: %4d reserved req %p xid %08x\n", task->tk_pid,
-			req, req->rq_xid);
+			req, ntohl(req->rq_xid));
 }
 
 /*
@@ -1397,7 +1400,7 @@
 /*
  * Set default timeout parameters
  */
-void
+static void
 xprt_default_timeout(struct rpc_timeout *to, int proto)
 {
 	if (proto == IPPROTO_UDP)
@@ -1545,8 +1548,7 @@
 		sk->sk_no_check = UDP_CSUM_NORCV;
 		xprt_set_connected(xprt);
 	} else {
-		struct tcp_opt *tp = tcp_sk(sk);
-		tp->nonagle = 1;	/* disable Nagle's algorithm */
+		tcp_sk(sk)->nonagle = 1;	/* disable Nagle's algorithm */
 		sk->sk_data_ready = tcp_data_ready;
 		sk->sk_state_change = tcp_state_change;
 		xprt_clear_connected(xprt);
@@ -1633,7 +1635,7 @@
 /*
  * Prepare for transport shutdown.
  */
-void
+static void
 xprt_shutdown(struct rpc_xprt *xprt)
 {
 	xprt->shutdown = 1;
@@ -1648,7 +1650,7 @@
 /*
  * Clear the xprt backlog queue
  */
-int
+static int
 xprt_clear_backlog(struct rpc_xprt *xprt) {
 	rpc_wake_up_next(&xprt->backlog);
 	wake_up(&xprt->cong_wait);
diff -Nru a/net/unix/af_unix.c b/net/unix/af_unix.c
--- a/net/unix/af_unix.c	2005-01-10 20:11:20 -08:00
+++ b/net/unix/af_unix.c	2005-01-10 20:11:20 -08:00
@@ -121,7 +121,7 @@
 
 int sysctl_unix_max_dgram_qlen = 10;
 
-kmem_cache_t *unix_sk_cachep;
+static kmem_cache_t *unix_sk_cachep;
 
 struct hlist_head unix_socket_table[UNIX_HASH_SIZE + 1];
 rwlock_t unix_table_lock = RW_LOCK_UNLOCKED;
diff -Nru a/net/unix/sysctl_net_unix.c b/net/unix/sysctl_net_unix.c
--- a/net/unix/sysctl_net_unix.c	2005-01-10 20:11:18 -08:00
+++ b/net/unix/sysctl_net_unix.c	2005-01-10 20:11:18 -08:00
@@ -14,7 +14,7 @@
 
 extern int sysctl_unix_max_dgram_qlen;
 
-ctl_table unix_table[] = {
+static ctl_table unix_table[] = {
 	{
 		.ctl_name	= NET_UNIX_MAX_DGRAM_QLEN,
 		.procname	= "max_dgram_qlen",
diff -Nru a/net/x25/af_x25.c b/net/x25/af_x25.c
--- a/net/x25/af_x25.c	2005-01-10 20:11:22 -08:00
+++ b/net/x25/af_x25.c	2005-01-10 20:11:22 -08:00
@@ -34,28 +34,19 @@
 #include <linux/config.h>
 #include <linux/module.h>
 #include <linux/errno.h>
-#include <linux/types.h>
-#include <linux/socket.h>
-#include <linux/in.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <linux/timer.h>
 #include <linux/string.h>
-#include <linux/sockios.h>
 #include <linux/net.h>
-#include <linux/stat.h>
-#include <linux/inet.h>
 #include <linux/netdevice.h>
 #include <linux/if_arp.h>
 #include <linux/skbuff.h>
 #include <net/sock.h>
 #include <net/tcp.h>
-#include <asm/system.h>
 #include <asm/uaccess.h>
 #include <linux/fcntl.h>
 #include <linux/termios.h>	/* For TIOCINQ/OUTQ */
-#include <linux/mm.h>
-#include <linux/interrupt.h>
 #include <linux/notifier.h>
 #include <linux/init.h>
 #include <net/x25.h>
@@ -223,14 +214,19 @@
 
 /*
  *	Find a socket that wants to accept the Call Request we just
- *	received.
+ *	received. Check the full list for an address/cud match.
+ *	If no cuds match return the next_best thing, an address match.
+ *	Note: if a listening socket has cud set it must only get calls
+ *	with matching cud.
  */
-static struct sock *x25_find_listener(struct x25_address *addr)
+static struct sock *x25_find_listener(struct x25_address *addr, struct x25_calluserdata *calluserdata)
 {
 	struct sock *s;
+	struct sock *next_best;
 	struct hlist_node *node;
 
 	read_lock_bh(&x25_list_lock);
+	next_best = NULL;
 
 	sk_for_each(s, node, &x25_list)
 		if ((!strcmp(addr->x25_addr,
@@ -238,9 +234,24 @@
 		     !strcmp(addr->x25_addr,
 			     null_x25_address.x25_addr)) &&
 		     s->sk_state == TCP_LISTEN) {
-			sock_hold(s);
-			goto found;
+
+			/*
+			 * Found a listening socket, now check the incoming
+			 * call user data vs this sockets call user data
+			 */
+			if (x25_check_calluserdata(&x25_sk(s)->calluserdata, calluserdata)) {
+				sock_hold(s);
+				goto found;
+			}
+			if (x25_sk(s)->calluserdata.cudlength == 0) {
+				next_best = s;
+			}
 		}
+	if (next_best) {
+		s = next_best;
+		sock_hold(s);
+		goto found;
+	}
 	s = NULL;
 found:
 	read_unlock_bh(&x25_list_lock);
@@ -250,7 +261,7 @@
 /*
  *	Find a connected X.25 socket given my LCI and neighbour.
  */
-struct sock *__x25_find_socket(unsigned int lci, struct x25_neigh *nb)
+static struct sock *__x25_find_socket(unsigned int lci, struct x25_neigh *nb)
 {
 	struct sock *s;
 	struct hlist_node *node;
@@ -278,7 +289,7 @@
 /*
  *	Find a unique LCI for a given device.
  */
-unsigned int x25_new_lci(struct x25_neigh *nb)
+static unsigned int x25_new_lci(struct x25_neigh *nb)
 {
 	unsigned int lci = 1;
 	struct sock *sk;
@@ -814,6 +825,7 @@
 	struct x25_opt *makex25;
 	struct x25_address source_addr, dest_addr;
 	struct x25_facilities facilities;
+	struct x25_calluserdata calluserdata;
 	int len, rc;
 
 	/*
@@ -828,9 +840,27 @@
 	skb_pull(skb, x25_addr_ntoa(skb->data, &source_addr, &dest_addr));
 
 	/*
-	 *	Find a listener for the particular address.
+	 *	Get the length of the facilities, skip past them for the moment
+	 *	get the call user data because this is needed to determine
+	 *	the correct listener
+	 */
+	len = skb->data[0] + 1;
+	skb_pull(skb,len);
+
+	/*
+	 *	Incoming Call User Data.
+	 */
+	if (skb->len >= 0) {
+		memcpy(calluserdata.cuddata, skb->data, skb->len);
+		calluserdata.cudlength = skb->len;
+	}
+
+	skb_push(skb,len);
+
+	/*
+	 *	Find a listener for the particular address/cud pair.
 	 */
-	sk = x25_find_listener(&source_addr);
+	sk = x25_find_listener(&source_addr,&calluserdata);
 
 	/*
 	 *	We can't accept the Call Request.
@@ -859,7 +889,7 @@
 		goto out_sock_put;
 
 	/*
-	 *	Remove the facilities, leaving any Call User Data.
+	 *	Remove the facilities
 	 */
 	skb_pull(skb, len);
 
@@ -873,17 +903,10 @@
 	makex25->neighbour     = nb;
 	makex25->facilities    = facilities;
 	makex25->vc_facil_mask = x25_sk(sk)->vc_facil_mask;
+	makex25->calluserdata  = calluserdata;
 
 	x25_write_internal(make, X25_CALL_ACCEPTED);
 
-	/*
-	 *	Incoming Call User Data.
-	 */
-	if (skb->len >= 0) {
-		memcpy(makex25->calluserdata.cuddata, skb->data, skb->len);
-		makex25->calluserdata.cudlength = skb->len;
-	}
-
 	makex25->state = X25_STATE_3;
 
 	sk->sk_ack_backlog++;
@@ -1313,7 +1336,7 @@
 	return rc;
 }
 
-struct net_proto_family x25_family_ops = {
+static struct net_proto_family x25_family_ops = {
 	.family =	AF_X25,
 	.create =	x25_create,
 	.owner	=	THIS_MODULE,
@@ -1348,7 +1371,7 @@
 	.func =	x25_lapb_receive_frame,
 };
 
-struct notifier_block x25_dev_notifier = {
+static struct notifier_block x25_dev_notifier = {
 	.notifier_call = x25_device_event,
 };
 
diff -Nru a/net/x25/sysctl_net_x25.c b/net/x25/sysctl_net_x25.c
--- a/net/x25/sysctl_net_x25.c	2005-01-10 20:11:19 -08:00
+++ b/net/x25/sysctl_net_x25.c	2005-01-10 20:11:19 -08:00
@@ -5,7 +5,6 @@
  * Added /proc/sys/net/x25 directory entry (empty =) ). [MS]
  */
 
-#include <linux/mm.h>
 #include <linux/sysctl.h>
 #include <linux/skbuff.h>
 #include <linux/socket.h>
diff -Nru a/net/x25/x25_dev.c b/net/x25/x25_dev.c
--- a/net/x25/x25_dev.c	2005-01-10 20:11:18 -08:00
+++ b/net/x25/x25_dev.c	2005-01-10 20:11:18 -08:00
@@ -18,29 +18,10 @@
  */
 
 #include <linux/config.h>
-#include <linux/errno.h>
-#include <linux/types.h>
-#include <linux/socket.h>
-#include <linux/in.h>
 #include <linux/kernel.h>
-#include <linux/sched.h>
-#include <linux/timer.h>
-#include <linux/string.h>
-#include <linux/sockios.h>
-#include <linux/net.h>
-#include <linux/stat.h>
-#include <linux/inet.h>
 #include <linux/netdevice.h>
 #include <linux/skbuff.h>
 #include <net/sock.h>
-#include <asm/system.h>
-#include <asm/uaccess.h>
-#include <linux/fcntl.h>
-#include <linux/termios.h>	/* For TIOCINQ/OUTQ */
-#include <linux/mm.h>
-#include <linux/interrupt.h>
-#include <linux/notifier.h>
-#include <linux/proc_fs.h>
 #include <linux/if_arp.h>
 #include <net/x25.h>
 
@@ -140,29 +121,6 @@
 	kfree_skb(skb);
 out:
 	return 0;
-}
-
-int x25_llc_receive_frame(struct sk_buff *skb, struct net_device *dev,
-			  struct packet_type *ptype)
-{
-	struct x25_neigh *nb;
-	int rc = 0;
-
-	skb->sk = NULL;
-
-	/*
-	 * Packet received from unrecognised device, throw it away.
-	 */
-	nb = x25_get_neigh(dev);
-	if (!nb) {
-		printk(KERN_DEBUG "X.25: unknown_neighbour - %s\n", dev->name);
-		kfree_skb(skb);
-	} else {
-		rc = x25_receive_data(skb, nb);
-		x25_neigh_put(nb);
-	}
-
-	return rc;
 }
 
 void x25_establish_link(struct x25_neigh *nb)
diff -Nru a/net/x25/x25_facilities.c b/net/x25/x25_facilities.c
--- a/net/x25/x25_facilities.c	2005-01-10 20:11:19 -08:00
+++ b/net/x25/x25_facilities.c	2005-01-10 20:11:19 -08:00
@@ -19,24 +19,10 @@
  *					  negotiation.
  */
 
-#include <linux/errno.h>
-#include <linux/types.h>
-#include <linux/socket.h>
-#include <linux/in.h>
 #include <linux/kernel.h>
-#include <linux/sched.h>
-#include <linux/timer.h>
 #include <linux/string.h>
-#include <linux/sockios.h>
-#include <linux/net.h>
-#include <linux/inet.h>
-#include <linux/netdevice.h>
 #include <linux/skbuff.h>
 #include <net/sock.h>
-#include <asm/system.h>
-#include <linux/fcntl.h>
-#include <linux/mm.h>
-#include <linux/interrupt.h>
 #include <net/x25.h>
 
 /*
diff -Nru a/net/x25/x25_in.c b/net/x25/x25_in.c
--- a/net/x25/x25_in.c	2005-01-10 20:11:23 -08:00
+++ b/net/x25/x25_in.c	2005-01-10 20:11:23 -08:00
@@ -24,25 +24,11 @@
  */
 
 #include <linux/errno.h>
-#include <linux/types.h>
-#include <linux/socket.h>
-#include <linux/in.h>
 #include <linux/kernel.h>
-#include <linux/sched.h>
-#include <linux/timer.h>
 #include <linux/string.h>
-#include <linux/sockios.h>
-#include <linux/net.h>
-#include <linux/inet.h>
-#include <linux/netdevice.h>
 #include <linux/skbuff.h>
 #include <net/sock.h>
-#include <net/ip.h>			/* For ip_rcv */
 #include <net/tcp.h>
-#include <asm/system.h>
-#include <linux/fcntl.h>
-#include <linux/mm.h>
-#include <linux/interrupt.h>
 #include <net/x25.h>
 
 static int x25_queue_rx_frame(struct sock *sk, struct sk_buff *skb, int more)
diff -Nru a/net/x25/x25_link.c b/net/x25/x25_link.c
--- a/net/x25/x25_link.c	2005-01-10 20:11:16 -08:00
+++ b/net/x25/x25_link.c	2005-01-10 20:11:16 -08:00
@@ -21,25 +21,12 @@
  *	2000-09-04	Henner Eisen	  dev_hold() / dev_put() for x25_neigh.
  */
 
-#include <linux/errno.h>
-#include <linux/types.h>
-#include <linux/socket.h>
-#include <linux/in.h>
 #include <linux/kernel.h>
 #include <linux/jiffies.h>
 #include <linux/timer.h>
-#include <linux/string.h>
-#include <linux/sockios.h>
-#include <linux/net.h>
-#include <linux/inet.h>
 #include <linux/netdevice.h>
 #include <linux/skbuff.h>
-#include <net/sock.h>
-#include <asm/system.h>
 #include <asm/uaccess.h>
-#include <linux/fcntl.h>
-#include <linux/mm.h>
-#include <linux/interrupt.h>
 #include <linux/init.h>
 #include <net/x25.h>
 
@@ -48,6 +35,9 @@
 
 static void x25_t20timer_expiry(unsigned long);
 
+static void x25_transmit_restart_confirmation(struct x25_neigh *nb);
+static void x25_transmit_restart_request(struct x25_neigh *nb);
+
 /*
  *	Linux set/reset timer routines
  */
@@ -119,7 +109,7 @@
 /*
  *	This routine is called when a Restart Request is needed
  */
-void x25_transmit_restart_request(struct x25_neigh *nb)
+static void x25_transmit_restart_request(struct x25_neigh *nb)
 {
 	unsigned char *dptr;
 	int len = X25_MAX_L2_LEN + X25_STD_MIN_LEN + 2;
@@ -146,7 +136,7 @@
 /*
  * This routine is called when a Restart Confirmation is needed
  */
-void x25_transmit_restart_confirmation(struct x25_neigh *nb)
+static void x25_transmit_restart_confirmation(struct x25_neigh *nb)
 {
 	unsigned char *dptr;
 	int len = X25_MAX_L2_LEN + X25_STD_MIN_LEN;
@@ -162,32 +152,6 @@
 	*dptr++ = nb->extended ? X25_GFI_EXTSEQ : X25_GFI_STDSEQ;
 	*dptr++ = 0x00;
 	*dptr++ = X25_RESTART_CONFIRMATION;
-
-	skb->sk = NULL;
-
-	x25_send_frame(skb, nb);
-}
-
-/*
- * This routine is called when a Diagnostic is required.
- */
-void x25_transmit_diagnostic(struct x25_neigh *nb, unsigned char diag)
-{
-	unsigned char *dptr;
-	int len = X25_MAX_L2_LEN + X25_STD_MIN_LEN + 1;
-	struct sk_buff *skb = alloc_skb(len, GFP_ATOMIC);
-
-	if (!skb)
-		return;
-
-	skb_reserve(skb, X25_MAX_L2_LEN);
-
-	dptr = skb_put(skb, X25_STD_MIN_LEN + 1);
-
-	*dptr++ = nb->extended ? X25_GFI_EXTSEQ : X25_GFI_STDSEQ;
-	*dptr++ = 0x00;
-	*dptr++ = X25_DIAGNOSTIC;
-	*dptr++ = diag;
 
 	skb->sk = NULL;
 
diff -Nru a/net/x25/x25_out.c b/net/x25/x25_out.c
--- a/net/x25/x25_out.c	2005-01-10 20:11:16 -08:00
+++ b/net/x25/x25_out.c	2005-01-10 20:11:16 -08:00
@@ -22,24 +22,11 @@
  *					needed cleaned seq-number fields.
  */
 
-#include <linux/errno.h>
-#include <linux/types.h>
 #include <linux/socket.h>
-#include <linux/in.h>
 #include <linux/kernel.h>
-#include <linux/sched.h>
-#include <linux/timer.h>
 #include <linux/string.h>
-#include <linux/sockios.h>
-#include <linux/net.h>
-#include <linux/inet.h>
-#include <linux/netdevice.h>
 #include <linux/skbuff.h>
 #include <net/sock.h>
-#include <asm/system.h>
-#include <linux/fcntl.h>
-#include <linux/mm.h>
-#include <linux/interrupt.h>
 #include <net/x25.h>
 
 static int x25_pacsize_to_bytes(unsigned int pacsize)
diff -Nru a/net/x25/x25_proc.c b/net/x25/x25_proc.c
--- a/net/x25/x25_proc.c	2005-01-10 20:11:16 -08:00
+++ b/net/x25/x25_proc.c	2005-01-10 20:11:16 -08:00
@@ -166,14 +166,14 @@
 	return 0;
 } 
 
-struct seq_operations x25_seq_route_ops = {
+static struct seq_operations x25_seq_route_ops = {
 	.start  = x25_seq_route_start,
 	.next   = x25_seq_route_next,
 	.stop   = x25_seq_route_stop,
 	.show   = x25_seq_route_show,
 };
 
-struct seq_operations x25_seq_socket_ops = {
+static struct seq_operations x25_seq_socket_ops = {
 	.start  = x25_seq_socket_start,
 	.next   = x25_seq_socket_next,
 	.stop   = x25_seq_socket_stop,
diff -Nru a/net/x25/x25_subr.c b/net/x25/x25_subr.c
--- a/net/x25/x25_subr.c	2005-01-10 20:11:17 -08:00
+++ b/net/x25/x25_subr.c	2005-01-10 20:11:17 -08:00
@@ -21,25 +21,11 @@
  *	jun/24/01	Arnaldo C. Melo	  use skb_queue_purge, cleanups
  */
 
-#include <linux/errno.h>
-#include <linux/types.h>
-#include <linux/socket.h>
-#include <linux/in.h>
 #include <linux/kernel.h>
-#include <linux/sched.h>
-#include <linux/timer.h>
 #include <linux/string.h>
-#include <linux/sockios.h>
-#include <linux/net.h>
-#include <linux/inet.h>
-#include <linux/netdevice.h>
 #include <linux/skbuff.h>
 #include <net/sock.h>
 #include <net/tcp.h>
-#include <asm/system.h>
-#include <linux/fcntl.h>
-#include <linux/mm.h>
-#include <linux/interrupt.h>
 #include <net/x25.h>
 
 /*
@@ -367,3 +353,22 @@
 		x25_stop_timer(sk);
 	}
 }
+
+/*
+ * Compare 2 calluserdata structures, used to find correct listening sockets
+ * when call user data is used.
+ */
+int x25_check_calluserdata(struct x25_calluserdata *ours, struct x25_calluserdata *theirs)
+{
+	int i;
+	if (ours->cudlength != theirs->cudlength)
+		return 0;
+
+	for (i=0;i<ours->cudlength;i++) {
+		if (ours->cuddata[i] != theirs->cuddata[i]) {
+			return 0;
+		}
+	}
+	return 1;
+}
+
diff -Nru a/net/x25/x25_timer.c b/net/x25/x25_timer.c
--- a/net/x25/x25_timer.c	2005-01-10 20:11:16 -08:00
+++ b/net/x25/x25_timer.c	2005-01-10 20:11:16 -08:00
@@ -20,24 +20,10 @@
  */
 
 #include <linux/errno.h>
-#include <linux/types.h>
-#include <linux/socket.h>
-#include <linux/in.h>
-#include <linux/kernel.h>
 #include <linux/jiffies.h>
 #include <linux/timer.h>
-#include <linux/string.h>
-#include <linux/sockios.h>
-#include <linux/net.h>
-#include <linux/inet.h>
-#include <linux/netdevice.h>
-#include <linux/skbuff.h>
 #include <net/sock.h>
 #include <net/tcp.h>
-#include <asm/system.h>
-#include <linux/fcntl.h>
-#include <linux/mm.h>
-#include <linux/interrupt.h>
 #include <net/x25.h>
 
 static void x25_heartbeat_expiry(unsigned long);
diff -Nru a/net/xfrm/xfrm_algo.c b/net/xfrm/xfrm_algo.c
--- a/net/xfrm/xfrm_algo.c	2005-01-10 20:11:24 -08:00
+++ b/net/xfrm/xfrm_algo.c	2005-01-10 20:11:24 -08:00
@@ -416,14 +416,6 @@
 	return &ealg_list[idx];
 }
 
-struct xfrm_algo_desc *xfrm_calg_get_byidx(unsigned int idx)
-{
-	if (idx >= calg_entries())
-		return NULL;
-
-	return &calg_list[idx];
-}
-
 /*
  * Probe for the availability of crypto algorithms, and set the available
  * flag for any algorithms found on the system.  This is typically called by
diff -Nru a/net/xfrm/xfrm_export.c b/net/xfrm/xfrm_export.c
--- a/net/xfrm/xfrm_export.c	2005-01-10 20:11:19 -08:00
+++ b/net/xfrm/xfrm_export.c	2005-01-10 20:11:19 -08:00
@@ -53,7 +53,6 @@
 EXPORT_SYMBOL_GPL(xfrm_count_enc_supported);
 EXPORT_SYMBOL_GPL(xfrm_aalg_get_byidx);
 EXPORT_SYMBOL_GPL(xfrm_ealg_get_byidx);
-EXPORT_SYMBOL_GPL(xfrm_calg_get_byidx);
 EXPORT_SYMBOL_GPL(xfrm_aalg_get_byid);
 EXPORT_SYMBOL_GPL(xfrm_ealg_get_byid);
 EXPORT_SYMBOL_GPL(xfrm_calg_get_byid);
diff -Nru a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
--- a/net/xfrm/xfrm_policy.c	2005-01-10 20:11:19 -08:00
+++ b/net/xfrm/xfrm_policy.c	2005-01-10 20:11:19 -08:00
@@ -33,7 +33,7 @@
 static rwlock_t xfrm_policy_afinfo_lock = RW_LOCK_UNLOCKED;
 static struct xfrm_policy_afinfo *xfrm_policy_afinfo[NPROTO];
 
-kmem_cache_t *xfrm_dst_cache;
+static kmem_cache_t *xfrm_dst_cache;
 
 static struct work_struct xfrm_policy_gc_work;
 static struct list_head xfrm_policy_gc_list =
@@ -498,7 +498,7 @@
 		*obj_refp = &pol->refcnt;
 }
 
-struct xfrm_policy *xfrm_sk_policy_lookup(struct sock *sk, int dir, struct flowi *fl)
+static struct xfrm_policy *xfrm_sk_policy_lookup(struct sock *sk, int dir, struct flowi *fl)
 {
 	struct xfrm_policy *pol;
 
@@ -549,6 +549,8 @@
 	}
 }
 
+EXPORT_SYMBOL(xfrm_policy_delete);
+
 int xfrm_sk_policy_insert(struct sock *sk, int dir, struct xfrm_policy *pol)
 {
 	struct xfrm_policy *old_pol;
@@ -1220,13 +1222,13 @@
 	return NOTIFY_DONE;
 }
 
-struct notifier_block xfrm_dev_notifier = {
+static struct notifier_block xfrm_dev_notifier = {
 	xfrm_dev_event,
 	NULL,
 	0
 };
 
-void __init xfrm_policy_init(void)
+static void __init xfrm_policy_init(void)
 {
 	xfrm_dst_cache = kmem_cache_create("xfrm_dst_cache",
 					   sizeof(struct xfrm_dst),
diff -Nru a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
--- a/net/xfrm/xfrm_state.c	2005-01-10 20:11:21 -08:00
+++ b/net/xfrm/xfrm_state.c	2005-01-10 20:11:21 -08:00
@@ -51,6 +51,9 @@
 static struct xfrm_state_afinfo *xfrm_state_get_afinfo(unsigned short family);
 static void xfrm_state_put_afinfo(struct xfrm_state_afinfo *afinfo);
 
+static int km_query(struct xfrm_state *x, struct xfrm_tmpl *t, struct xfrm_policy *pol);
+static void km_state_expired(struct xfrm_state *x, int hard);
+
 static void xfrm_state_gc_destroy(struct xfrm_state *x)
 {
 	if (del_timer(&x->timer))
@@ -746,7 +749,7 @@
 static struct list_head xfrm_km_list = LIST_HEAD_INIT(xfrm_km_list);
 static rwlock_t		xfrm_km_lock = RW_LOCK_UNLOCKED;
 
-void km_state_expired(struct xfrm_state *x, int hard)
+static void km_state_expired(struct xfrm_state *x, int hard)
 {
 	struct xfrm_mgr *km;
 
@@ -764,7 +767,7 @@
 		wake_up(&km_waitq);
 }
 
-int km_query(struct xfrm_state *x, struct xfrm_tmpl *t, struct xfrm_policy *pol)
+static int km_query(struct xfrm_state *x, struct xfrm_tmpl *t, struct xfrm_policy *pol)
 {
 	int err = -EINVAL;
 	struct xfrm_mgr *km;
diff -Nru a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
--- a/net/xfrm/xfrm_user.c	2005-01-10 20:11:19 -08:00
+++ b/net/xfrm/xfrm_user.c	2005-01-10 20:11:19 -08:00
@@ -1128,8 +1128,8 @@
 /* User gives us xfrm_user_policy_info followed by an array of 0
  * or more templates.
  */
-struct xfrm_policy *xfrm_compile_policy(u16 family, int opt,
-                                        u8 *data, int len, int *dir)
+static struct xfrm_policy *xfrm_compile_policy(u16 family, int opt,
+					       u8 *data, int len, int *dir)
 {
 	struct xfrm_userpolicy_info *p = (struct xfrm_userpolicy_info *)data;
 	struct xfrm_user_tmpl *ut = (struct xfrm_user_tmpl *) (p + 1);
diff -Nru a/scripts/Makefile.build b/scripts/Makefile.build
--- a/scripts/Makefile.build	2005-01-10 20:11:21 -08:00
+++ b/scripts/Makefile.build	2005-01-10 20:11:21 -08:00
@@ -83,7 +83,6 @@
 
 # Linus' kernel sanity checking tool
 ifneq ($(KBUILD_CHECKSRC),0)
-  CHECKFLAGS += -I$(shell $(CC) -print-file-name=include)
   ifeq ($(KBUILD_CHECKSRC),2)
     quiet_cmd_force_checksrc = CHECK   $<
           cmd_force_checksrc = $(CHECK) $(CHECKFLAGS) $(c_flags) $< ;
diff -Nru a/scripts/gen_initramfs_list.sh b/scripts/gen_initramfs_list.sh
--- a/scripts/gen_initramfs_list.sh	2005-01-10 20:11:20 -08:00
+++ b/scripts/gen_initramfs_list.sh	2005-01-10 20:11:20 -08:00
@@ -2,19 +2,17 @@
 # Copyright (C) Martin Schlemmer <azarah@nosferatu.za.org>
 # Released under the terms of the GNU GPL
 #
-# Generate a newline separated list of entries from the file/directory pointed
-# out by the environment variable: CONFIG_INITRAMFS_SOURCE
+# Generate a newline separated list of entries from the file/directory
+# supplied as an argument.
 #
-# If CONFIG_INITRAMFS_SOURCE is non-existing then generate a small dummy file.
+# If a file/directory is not supplied then generate a small dummy file.
 #
-# The output is suitable for gen_init_cpio as found in usr/Makefile.
+# The output is suitable for gen_init_cpio built from usr/gen_init_cpio.c.
 #
-# TODO:  Add support for symlinks, sockets and pipes when gen_init_cpio
-#        supports them.
 
-simple_initramfs() {
+default_initramfs() {
 	cat <<-EOF
-		# This is a very simple initramfs
+		# This is a very simple, default initramfs
 
 		dir /dev 0755 0 0
 		nod /dev/console 0600 0 0 c 5 1
@@ -25,12 +23,19 @@
 filetype() {
 	local argv1="$1"
 
-	if [ -f "${argv1}" ]; then
+	# symlink test must come before file test
+	if [ -L "${argv1}" ]; then
+		echo "slink"
+	elif [ -f "${argv1}" ]; then
 		echo "file"
 	elif [ -d "${argv1}" ]; then
 		echo "dir"
 	elif [ -b "${argv1}" -o -c "${argv1}" ]; then
 		echo "nod"
+	elif [ -p "${argv1}" ]; then
+		echo "pipe"
+	elif [ -S "${argv1}" ]; then
+		echo "sock"
 	else
 		echo "invalid"
 	fi
@@ -52,10 +57,15 @@
 parse() {
 	local location="$1"
 	local name="${location/${srcdir}//}"
+	# change '//' into '/'
+	name="${name//\/\///}"
 	local mode="$2"
 	local uid="$3"
 	local gid="$4"
 	local ftype=$(filetype "${location}")
+	# remap uid/gid to 0 if necessary
+	[ "$uid" -eq "$root_uid" ] && uid=0
+	[ "$gid" -eq "$root_gid" ] && gid=0
 	local str="${mode} ${uid} ${gid}"
 
 	[ "${ftype}" == "invalid" ] && return 0
@@ -79,6 +89,11 @@
 			fi
 			str="${ftype} ${name} ${str} ${dev_type} ${maj} ${min}"
 			;;
+		"slink")
+			local target=$(LC_ALL=C ls -l "${location}" | \
+					gawk '{print $11}')
+			str="${ftype} ${name} ${target} ${str}"
+			;;
 		*)
 			str="${ftype} ${name} ${str}"
 			;;
@@ -89,30 +104,100 @@
 	return 0
 }
 
-if [ -z "$1" ]; then
-	simple_initramfs
-elif [ -f "$1" ]; then
-	print_mtime "$1"
-	cat "$1"
-elif [ -d "$1" ]; then
-	srcdir=$(echo "$1" | sed -e 's://*:/:g')
-	dirlist=$(find "${srcdir}" -printf "%p %m %U %G\n" 2>/dev/null)
-
-	# If $dirlist is only one line, then the directory is empty
-	if [  "$(echo "${dirlist}" | wc -l)" -gt 1 ]; then
-		print_mtime "$1"
+usage() {
+	printf    "Usage:\n"
+	printf    "$0 [ [-u <root_uid>] [-g <root_gid>] [-d | <cpio_source>] ] . . .\n"
+	printf    "\n"
+	printf -- "-u <root_uid>  User ID to map to user ID 0 (root).\n"
+	printf    "               <root_uid> is only meaningful if <cpio_source>\n"
+	printf    "               is a directory.\n"
+	printf -- "-g <root_gid>  Group ID to map to group ID 0 (root).\n"
+	printf    "               <root_gid> is only meaningful if <cpio_source>\n"
+	printf    "               is a directory.\n"
+	printf    "<cpio_source>  File list or directory for cpio archive.\n"
+	printf    "               If <cpio_source> is not provided then a\n"
+	printf    "               a default list will be output.\n"
+	printf -- "-d             Output the default cpio list.  If no <cpio_source>\n"
+	printf    "               is given then the default cpio list will be output.\n"
+	printf    "\n"
+	printf    "All options may be repeated and are interpreted sequentially\n"
+	printf    "and immediately.  -u and -g states are preserved across\n"
+	printf    "<cpio_source> options so an explicit \"-u 0 -g 0\" is required\n"
+	printf    "to reset the root/group mapping.\n"
+}
+
+build_list() {
+	printf "\n#####################\n# $cpio_source\n"
+
+	if [ -f "$cpio_source" ]; then
+		print_mtime "$cpio_source"
+		cat "$cpio_source"
+	elif [ -d "$cpio_source" ]; then
+		srcdir=$(echo "$cpio_source" | sed -e 's://*:/:g')
+		dirlist=$(find "${srcdir}" -printf "%p %m %U %G\n" 2>/dev/null)
+
+		# If $dirlist is only one line, then the directory is empty
+		if [  "$(echo "${dirlist}" | wc -l)" -gt 1 ]; then
+			print_mtime "$cpio_source"
 		
-		echo "${dirlist}" | \
-		while read x; do
-			parse ${x}
-		done
+			echo "${dirlist}" | \
+			while read x; do
+				parse ${x}
+			done
+		else
+			# Failsafe in case directory is empty
+			default_initramfs
+		fi
 	else
-		# Failsafe in case directory is empty
-		simple_initramfs
+		echo "  $0: Cannot open '$cpio_source'" >&2
+		exit 1
 	fi
-else
-	echo "  $0: Cannot open '$1' (CONFIG_INITRAMFS_SOURCE)" >&2
-	exit 1
-fi
+}
+
+
+root_uid=0
+root_gid=0
+
+while [ $# -gt 0 ]; do
+	arg="$1"
+	shift
+	case "$arg" in
+		"-u")
+			root_uid="$1"
+			shift
+			;;
+		"-g")
+			root_gid="$1"
+			shift
+			;;
+		"-d")
+			default_list="$arg"
+			default_initramfs
+			;;
+		"-h")
+			usage
+			exit 0
+			;;
+		*)
+			case "$arg" in
+				"-"*)
+					printf "ERROR: unknown option \"$arg\"\n" >&2
+					printf "If the filename validly begins with '-', then it must be prefixed\n" >&2
+					printf "by './' so that it won't be interpreted as an option." >&2
+					printf "\n" >&2
+					usage >&2
+					exit 1
+					;;
+				*)
+					cpio_source="$arg"
+					build_list
+					;;
+			esac
+			;;
+	esac
+done
+
+# spit out the default cpio list if a source hasn't been specified
+[ -z "$cpio_source" -a -z "$default_list" ] && default_initramfs
 
 exit 0
diff -Nru a/scripts/kallsyms.c b/scripts/kallsyms.c
--- a/scripts/kallsyms.c	2005-01-10 20:11:23 -08:00
+++ b/scripts/kallsyms.c	2005-01-10 20:11:23 -08:00
@@ -184,6 +184,15 @@
 		if ((s->addr < _stext || s->addr > _etext)
 		    && (s->addr < _sinittext || s->addr > _einittext))
 			return 0;
+		/* Corner case.  Discard any symbols with the same value as
+		 * _etext or _einittext, they can move between pass 1 and 2
+		 * when the kallsyms data is added.  If these symbols move then
+		 * they may get dropped in pass 2, which breaks the kallsyms
+		 * rules.
+		 */
+		if ((s->addr == _etext && strcmp(s->sym + 1, "_etext")) ||
+		    (s->addr == _einittext && strcmp(s->sym + 1, "_einittext")))
+			return 0;
 	}
 
 	/* Exclude symbols which vary between passes. */
diff -Nru a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c
--- a/scripts/kconfig/gconf.c	2005-01-10 20:11:22 -08:00
+++ b/scripts/kconfig/gconf.c	2005-01-10 20:11:22 -08:00
@@ -187,8 +187,6 @@
 	GtkWidget *widget;
 	GtkTextBuffer *txtbuf;
 	char title[256];
-	GdkPixmap *pixmap;
-	GdkBitmap *mask;
 	GtkStyle *style;
 
 	xml = glade_xml_new(glade_file, "window1", NULL);
@@ -220,36 +218,6 @@
 
 	style = gtk_widget_get_style(main_wnd);
 	widget = glade_xml_get_widget(xml, "toolbar1");
-
-	pixmap = gdk_pixmap_create_from_xpm_d(main_wnd->window, &mask,
-					      &style->bg[GTK_STATE_NORMAL],
-					      (gchar **) xpm_single_view);
-	gtk_image_set_from_pixmap(GTK_IMAGE
-				  (((GtkToolbarChild
-				     *) (g_list_nth(GTK_TOOLBAR(widget)->
-						    children,
-						    5)->data))->icon),
-				  pixmap, mask);
-	pixmap =
-	    gdk_pixmap_create_from_xpm_d(main_wnd->window, &mask,
-					 &style->bg[GTK_STATE_NORMAL],
-					 (gchar **) xpm_split_view);
-	gtk_image_set_from_pixmap(GTK_IMAGE
-				  (((GtkToolbarChild
-				     *) (g_list_nth(GTK_TOOLBAR(widget)->
-						    children,
-						    6)->data))->icon),
-				  pixmap, mask);
-	pixmap =
-	    gdk_pixmap_create_from_xpm_d(main_wnd->window, &mask,
-					 &style->bg[GTK_STATE_NORMAL],
-					 (gchar **) xpm_tree_view);
-	gtk_image_set_from_pixmap(GTK_IMAGE
-				  (((GtkToolbarChild
-				     *) (g_list_nth(GTK_TOOLBAR(widget)->
-						    children,
-						    7)->data))->icon),
-				  pixmap, mask);
 
 	switch (view_mode) {
 	case SINGLE_VIEW:
diff -Nru a/scripts/kconfig/gconf.glade b/scripts/kconfig/gconf.glade
--- a/scripts/kconfig/gconf.glade	2005-01-10 20:11:19 -08:00
+++ b/scripts/kconfig/gconf.glade	2005-01-10 20:11:19 -08:00
@@ -310,13 +310,13 @@
 	      <property name="tooltips">True</property>
 
 	      <child>
-		<widget class="button" id="button1">
+		<widget class="GtkToolButton" id="button1">
 		  <property name="visible">True</property>
 		  <property name="tooltip" translatable="yes">Goes up of one level (single view)</property>
 		  <property name="label" translatable="yes">Back</property>
 		  <property name="use_underline">True</property>
-		  <property name="stock_pixmap">gtk-undo</property>
-		  <signal name="pressed" handler="on_back_pressed"/>
+		  <property name="stock-id">gtk-undo</property>
+		  <signal name="clicked" handler="on_back_pressed"/>
 		</widget>
 	      </child>
 
@@ -327,24 +327,24 @@
 	      </child>
 
 	      <child>
-		<widget class="button" id="button2">
+		<widget class="GtkToolButton" id="button2">
 		  <property name="visible">True</property>
 		  <property name="tooltip" translatable="yes">Load a config file</property>
 		  <property name="label" translatable="yes">Load</property>
 		  <property name="use_underline">True</property>
-		  <property name="stock_pixmap">gtk-open</property>
-		  <signal name="pressed" handler="on_load_pressed"/>
+		  <property name="stock-id">gtk-open</property>
+		  <signal name="clicked" handler="on_load_pressed"/>
 		</widget>
 	      </child>
 
 	      <child>
-		<widget class="button" id="button3">
+		<widget class="GtkToolButton" id="button3">
 		  <property name="visible">True</property>
 		  <property name="tooltip" translatable="yes">Save a config file</property>
 		  <property name="label" translatable="yes">Save</property>
 		  <property name="use_underline">True</property>
-		  <property name="stock_pixmap">gtk-save</property>
-		  <signal name="pressed" handler="on_save_pressed"/>
+		  <property name="stock-id">gtk-save</property>
+		  <signal name="clicked" handler="on_save_pressed"/>
 		</widget>
 	      </child>
 
@@ -355,34 +355,34 @@
 	      </child>
 
 	      <child>
-		<widget class="button" id="button4">
+		<widget class="GtkToolButton" id="button4">
 		  <property name="visible">True</property>
 		  <property name="tooltip" translatable="yes">Single view</property>
 		  <property name="label" translatable="yes">Single</property>
 		  <property name="use_underline">True</property>
-		  <property name="stock_pixmap">gtk-missing-image</property>
+		  <property name="stock-id">gtk-indent</property>
 		  <signal name="clicked" handler="on_single_clicked" last_modification_time="Sun, 12 Jan 2003 14:28:39 GMT"/>
 		</widget>
 	      </child>
 
 	      <child>
-		<widget class="button" id="button5">
+		<widget class="GtkToolButton" id="button5">
 		  <property name="visible">True</property>
 		  <property name="tooltip" translatable="yes">Split view</property>
 		  <property name="label" translatable="yes">Split</property>
 		  <property name="use_underline">True</property>
-		  <property name="stock_pixmap">gtk-missing-image</property>
+		  <property name="stock-id">gtk-copy</property>
 		  <signal name="clicked" handler="on_split_clicked" last_modification_time="Sun, 12 Jan 2003 14:28:45 GMT"/>
 		</widget>
 	      </child>
 
 	      <child>
-		<widget class="button" id="button6">
+		<widget class="GtkToolButton" id="button6">
 		  <property name="visible">True</property>
 		  <property name="tooltip" translatable="yes">Full view</property>
 		  <property name="label" translatable="yes">Full</property>
 		  <property name="use_underline">True</property>
-		  <property name="stock_pixmap">gtk-missing-image</property>
+		  <property name="stock-id">gtk-justify-left</property>
 		  <signal name="clicked" handler="on_full_clicked" last_modification_time="Sun, 12 Jan 2003 14:28:50 GMT"/>
 		</widget>
 	      </child>
@@ -394,22 +394,24 @@
 	      </child>
 
 	      <child>
-		<widget class="button" id="button7">
+		<widget class="GtkToolButton" id="button7">
 		  <property name="visible">True</property>
 		  <property name="tooltip" translatable="yes">Collapse the whole tree in the right frame</property>
 		  <property name="label" translatable="yes">Collapse</property>
 		  <property name="use_underline">True</property>
-		  <signal name="pressed" handler="on_collapse_pressed"/>
+		  <property name="stock-id">gtk-zoom-out</property>
+		  <signal name="clicked" handler="on_collapse_pressed"/>
 		</widget>
 	      </child>
 
 	      <child>
-		<widget class="button" id="button8">
+		<widget class="GtkToolButton" id="button8">
 		  <property name="visible">True</property>
 		  <property name="tooltip" translatable="yes">Expand the whole tree in the right frame</property>
 		  <property name="label" translatable="yes">Expand</property>
 		  <property name="use_underline">True</property>
-		  <signal name="pressed" handler="on_expand_pressed"/>
+		  <property name="stock-id">gtk-zoom-in</property>
+		  <signal name="clicked" handler="on_expand_pressed"/>
 		</widget>
 	      </child>
 	    </widget>
diff -Nru a/scripts/ver_linux b/scripts/ver_linux
--- a/scripts/ver_linux	2005-01-10 20:11:20 -08:00
+++ b/scripts/ver_linux	2005-01-10 20:11:20 -08:00
@@ -87,6 +87,8 @@
 
 expr --v 2>&1 | awk 'NR==1{print "Sh-utils              ", $NF}'
 
+udevinfo -V | awk '{print "udev                  ", $3}'
+
 if [ -e /proc/modules ]; then
     X=`cat /proc/modules | sed -e "s/ .*$//"`
     echo "Modules Loaded         "$X
diff -Nru a/security/commoncap.c b/security/commoncap.c
--- a/security/commoncap.c	2005-01-10 20:11:18 -08:00
+++ b/security/commoncap.c	2005-01-10 20:11:18 -08:00
@@ -386,6 +386,10 @@
 		allowed -= allowed / 32;
 	allowed += total_swap_pages;
 
+	/* Don't let a single process grow too big:
+	   leave 3% of the size of this process for other processes */
+	allowed -= current->mm->total_vm / 32;
+
 	if (atomic_read(&vm_committed_space) < allowed)
 		return 0;
 
diff -Nru a/security/dummy.c b/security/dummy.c
--- a/security/dummy.c	2005-01-10 20:11:17 -08:00
+++ b/security/dummy.c	2005-01-10 20:11:17 -08:00
@@ -74,11 +74,8 @@
 
 static int dummy_capable (struct task_struct *tsk, int cap)
 {
-	if (cap_is_fs_cap (cap) ? tsk->fsuid == 0 : tsk->euid == 0)
-		/* capability granted */
+	if (cap_raised (tsk->cap_effective, cap))
 		return 0;
-
-	/* capability denied */
 	return -EPERM;
 }
 
@@ -92,7 +89,7 @@
 	return 0;
 }
 
-static int dummy_quota_on (struct file *f)
+static int dummy_quota_on (struct dentry *dentry)
 {
 	return 0;
 }
@@ -160,6 +157,14 @@
 		* sysctl_overcommit_ratio / 100;
 	allowed += total_swap_pages;
 
+	/* Leave the last 3% for root */
+	if (current->euid)
+		allowed -= allowed / 32;
+
+	/* Don't let a single process grow too big:
+	   leave 3% of the size of this process for other processes */
+	allowed -= current->mm->total_vm / 32;
+
 	if (atomic_read(&vm_committed_space) < allowed)
 		return 0;
 
@@ -191,6 +196,8 @@
 
 	current->suid = current->euid = current->fsuid = bprm->e_uid;
 	current->sgid = current->egid = current->fsgid = bprm->e_gid;
+
+	dummy_capget(current, &current->cap_effective, &current->cap_inheritable, &current->cap_permitted);
 }
 
 static int dummy_bprm_set_security (struct linux_binprm *bprm)
@@ -550,6 +557,7 @@
 
 static int dummy_task_post_setuid (uid_t id0, uid_t id1, uid_t id2, int flags)
 {
+	dummy_capget(current, &current->cap_effective, &current->cap_inheritable, &current->cap_permitted);
 	return 0;
 }
 
diff -Nru a/security/security.c b/security/security.c
--- a/security/security.c	2005-01-10 20:11:15 -08:00
+++ b/security/security.c	2005-01-10 20:11:15 -08:00
@@ -38,8 +38,8 @@
 static void __init do_security_initcalls(void)
 {
 	initcall_t *call;
-	call = &__security_initcall_start;
-	while (call < &__security_initcall_end) {
+	call = __security_initcall_start;
+	while (call < __security_initcall_end) {
 		(*call) ();
 		call++;
 	}
diff -Nru a/security/selinux/Kconfig b/security/selinux/Kconfig
--- a/security/selinux/Kconfig	2005-01-10 20:11:16 -08:00
+++ b/security/selinux/Kconfig	2005-01-10 20:11:16 -08:00
@@ -67,6 +67,15 @@
 	  can interactively toggle the kernel between enforcing mode and
 	  permissive mode (if permitted by the policy) via /selinux/enforce.
 
+config SECURITY_SELINUX_AVC_STATS
+	bool "NSA SELinux AVC Statistics"
+	depends on SECURITY_SELINUX
+	default y
+	help
+	  This option collects access vector cache statistics to
+	  /selinux/avc/cache_stats, which may be monitored via
+	  tools such as avcstat.
+
 config SECURITY_SELINUX_MLS
 	bool "NSA SELinux MLS policy (EXPERIMENTAL)"
 	depends on SECURITY_SELINUX && EXPERIMENTAL
diff -Nru a/security/selinux/avc.c b/security/selinux/avc.c
--- a/security/selinux/avc.c	2005-01-10 20:11:21 -08:00
+++ b/security/selinux/avc.c	2005-01-10 20:11:21 -08:00
@@ -4,6 +4,9 @@
  * Authors:  Stephen Smalley, <sds@epoch.ncsc.mil>
  *           James Morris <jmorris@redhat.com>
  *
+ * Update:   KaiGai, Kohei <kaigai@ak.jp.nec.com>
+ *     Replaced the avc_lock spinlock by RCU.
+ *
  * Copyright (C) 2003 Red Hat, Inc., James Morris <jmorris@redhat.com>
  *
  *	This program is free software; you can redistribute it and/or modify
@@ -18,6 +21,7 @@
 #include <linux/dcache.h>
 #include <linux/init.h>
 #include <linux/skbuff.h>
+#include <linux/percpu.h>
 #include <net/sock.h>
 #include <linux/un.h>
 #include <net/af_unix.h>
@@ -27,35 +31,79 @@
 #include <net/ipv6.h>
 #include "avc.h"
 #include "avc_ss.h"
+
+static const struct av_perm_to_string
+{
+  u16 tclass;
+  u32 value;
+  const char *name;
+} av_perm_to_string[] = {
+#define S_(c, v, s) { c, v, s },
+#include "av_perm_to_string.h"
+#undef S_
+};
+
 #ifdef CONFIG_AUDIT
+static const char *class_to_string[] = {
+#define S_(s) s,
 #include "class_to_string.h"
+#undef S_
+};
 #endif
+
+#define TB_(s) static const char * s [] = {
+#define TE_(s) };
+#define S_(s) s,
 #include "common_perm_to_string.h"
+#undef TB_
+#undef TE_
+#undef S_
+
+static const struct av_inherit
+{
+    u16 tclass;
+    const char **common_pts;
+    u32 common_base;
+} av_inherit[] = {
+#define S_(c, i, b) { c, common_##i##_perm_to_string, b },
 #include "av_inherit.h"
-#include "av_perm_to_string.h"
-#include "objsec.h"
+#undef S_
+};
 
-#define AVC_CACHE_SLOTS		512
-#define AVC_CACHE_MAXNODES	410
+#define AVC_CACHE_SLOTS			512
+#define AVC_DEF_CACHE_THRESHOLD		512
+#define AVC_CACHE_RECLAIM		16
+
+#ifdef CONFIG_SECURITY_SELINUX_AVC_STATS
+#define avc_cache_stats_incr(field) 				\
+do {								\
+	per_cpu(avc_cache_stats, get_cpu()).field++;		\
+	put_cpu();						\
+} while (0)
+#else
+#define avc_cache_stats_incr(field)	do {} while (0)
+#endif
 
 struct avc_entry {
 	u32			ssid;
 	u32			tsid;
 	u16			tclass;
 	struct av_decision	avd;
-	int			used;	/* used recently */
+	atomic_t		used;	/* used recently */
 };
 
 struct avc_node {
 	struct avc_entry	ae;
-	struct avc_node		*next;
+	struct list_head	list;
+	struct rcu_head         rhead;
 };
 
 struct avc_cache {
-	struct avc_node	*slots[AVC_CACHE_SLOTS];
-	u32		lru_hint;	/* LRU hint for reclaim scan */
-	u32		active_nodes;
-	u32		latest_notif;	/* latest revocation notification */
+	struct list_head	slots[AVC_CACHE_SLOTS];
+	spinlock_t		slots_lock[AVC_CACHE_SLOTS]; /* lock for writes */
+	atomic_t		lru_hint;	/* LRU hint for reclaim scan */
+	atomic_t		active_nodes;
+	u32			latest_notif;	/* latest revocation notification */
 };
 
 struct avc_callback_node {
@@ -70,35 +118,22 @@
 	struct avc_callback_node *next;
 };
 
-static spinlock_t avc_lock = SPIN_LOCK_UNLOCKED;
-static struct avc_node *avc_node_freelist;
+/* Exported via selinufs */
+unsigned int avc_cache_threshold = AVC_DEF_CACHE_THRESHOLD;
+
+#ifdef CONFIG_SECURITY_SELINUX_AVC_STATS
+DEFINE_PER_CPU(struct avc_cache_stats, avc_cache_stats) = { 0 };
+#endif
+
 static struct avc_cache avc_cache;
-static unsigned avc_cache_stats[AVC_NSTATS];
 static struct avc_callback_node *avc_callbacks;
+static kmem_cache_t *avc_node_cachep;
 
 static inline int avc_hash(u32 ssid, u32 tsid, u16 tclass)
 {
 	return (ssid ^ (tsid<<2) ^ (tclass<<4)) & (AVC_CACHE_SLOTS - 1);
 }
 
-#ifdef AVC_CACHE_STATS
-static inline void avc_cache_stats_incr(int type)
-{
-	avc_cache_stats[type]++;
-}
-
-static inline void avc_cache_stats_add(int type, unsigned val)
-{
-	avc_cache_stats[type] += val;
-}
-#else
-static inline void avc_cache_stats_incr(int type)
-{ }
-
-static inline void avc_cache_stats_add(int type, unsigned val)
-{ }
-#endif
-
 /**
  * avc_dump_av - Display an access vector in human-readable form.
  * @tclass: target security class
@@ -106,7 +141,7 @@
  */
 void avc_dump_av(struct audit_buffer *ab, u16 tclass, u32 av)
 {
-	char **common_pts = NULL;
+	const char **common_pts = NULL;
 	u32 common_base = 0;
 	int i, i2, perm;
 
@@ -188,155 +223,161 @@
  */
 void __init avc_init(void)
 {
-	struct avc_node	*new;
 	int i;
 
-	for (i = 0; i < AVC_CACHE_MAXNODES; i++) {
-		new = kmalloc(sizeof(*new), GFP_ATOMIC);
-		if (!new) {
-			printk(KERN_WARNING "avc:  only able to allocate "
-			       "%d entries\n", i);
-			break;
-		}
-		memset(new, 0, sizeof(*new));
-		new->next = avc_node_freelist;
-		avc_node_freelist = new;
+	for (i = 0; i < AVC_CACHE_SLOTS; i++) {
+		INIT_LIST_HEAD(&avc_cache.slots[i]);
+		avc_cache.slots_lock[i] = SPIN_LOCK_UNLOCKED;
 	}
+	atomic_set(&avc_cache.active_nodes, 0);
+	atomic_set(&avc_cache.lru_hint, 0);
+
+	avc_node_cachep = kmem_cache_create("avc_node", sizeof(struct avc_node),
+					     0, SLAB_PANIC, NULL, NULL);
 
 	audit_log(current->audit_context, "AVC INITIALIZED\n");
 }
 
-#if 0
-static void avc_hash_eval(char *tag)
+int avc_get_hash_stats(char *page)
 {
 	int i, chain_len, max_chain_len, slots_used;
 	struct avc_node *node;
-	unsigned long flags;
 
-	spin_lock_irqsave(&avc_lock,flags);
+	rcu_read_lock();
 
 	slots_used = 0;
 	max_chain_len = 0;
 	for (i = 0; i < AVC_CACHE_SLOTS; i++) {
-		node = avc_cache.slots[i];
-		if (node) {
+		if (!list_empty(&avc_cache.slots[i])) {
 			slots_used++;
 			chain_len = 0;
-			while (node) {
+			list_for_each_entry_rcu(node, &avc_cache.slots[i], list)
 				chain_len++;
-				node = node->next;
-			}
 			if (chain_len > max_chain_len)
 				max_chain_len = chain_len;
 		}
 	}
 
-	spin_unlock_irqrestore(&avc_lock,flags);
+	rcu_read_unlock();
 
-	printk(KERN_INFO "\n");
-	printk(KERN_INFO "%s avc:  %d entries and %d/%d buckets used, longest "
-	       "chain length %d\n", tag, avc_cache.active_nodes, slots_used,
-	       AVC_CACHE_SLOTS, max_chain_len);
+	return scnprintf(page, PAGE_SIZE, "entries: %d\nbuckets used: %d/%d\n"
+			 "longest chain: %d\n",
+			 atomic_read(&avc_cache.active_nodes),
+			 slots_used, AVC_CACHE_SLOTS, max_chain_len);
 }
-#else
-static inline void avc_hash_eval(char *tag)
-{ }
-#endif
 
-static inline struct avc_node *avc_reclaim_node(void)
+static void avc_node_free(struct rcu_head *rhead)
 {
-	struct avc_node *prev, *cur;
-	int hvalue, try;
+	struct avc_node *node = container_of(rhead, struct avc_node, rhead);
+	kmem_cache_free(avc_node_cachep, node);
+	avc_cache_stats_incr(frees);
+}
 
-	hvalue = avc_cache.lru_hint;
-	for (try = 0; try < 2; try++) {
-		do {
-			prev = NULL;
-			cur = avc_cache.slots[hvalue];
-			while (cur) {
-				if (!cur->ae.used)
-					goto found;
+static void avc_node_delete(struct avc_node *node)
+{
+	list_del_rcu(&node->list);
+	call_rcu(&node->rhead, avc_node_free);
+	atomic_dec(&avc_cache.active_nodes);
+}
 
-				cur->ae.used = 0;
+static void avc_node_kill(struct avc_node *node)
+{
+	kmem_cache_free(avc_node_cachep, node);
+	avc_cache_stats_incr(frees);
+	atomic_dec(&avc_cache.active_nodes);
+}
 
-				prev = cur;
-				cur = cur->next;
-			}
-			hvalue = (hvalue + 1) & (AVC_CACHE_SLOTS - 1);
-		} while (hvalue != avc_cache.lru_hint);
-	}
+static void avc_node_replace(struct avc_node *new, struct avc_node *old)
+{
+	list_replace_rcu(&old->list, &new->list);
+	call_rcu(&old->rhead, avc_node_free);
+	atomic_dec(&avc_cache.active_nodes);
+}
 
-	panic("avc_reclaim_node");
+static inline int avc_reclaim_node(void)
+{
+	struct avc_node *node;
+	int hvalue, try, ecx;
+	unsigned long flags;
 
-found:
-	avc_cache.lru_hint = hvalue;
+	for (try = 0, ecx = 0; try < AVC_CACHE_SLOTS; try++ ) {
+		hvalue = atomic_inc_return(&avc_cache.lru_hint) & (AVC_CACHE_SLOTS - 1);
 
-	if (prev == NULL)
-		avc_cache.slots[hvalue] = cur->next;
-	else
-		prev->next = cur->next;
+		if (!spin_trylock_irqsave(&avc_cache.slots_lock[hvalue], flags))
+			continue;
 
-	return cur;
+		list_for_each_entry(node, &avc_cache.slots[hvalue], list) {
+			if (atomic_dec_and_test(&node->ae.used)) {
+				/* Recently Unused */
+				avc_node_delete(node);
+				avc_cache_stats_incr(reclaims);
+				ecx++;
+				if (ecx >= AVC_CACHE_RECLAIM) {
+					spin_unlock_irqrestore(&avc_cache.slots_lock[hvalue], flags);
+					goto out;
+				}
+			}
+		}
+		spin_unlock_irqrestore(&avc_cache.slots_lock[hvalue], flags);
+	}
+out:
+	return ecx;
 }
 
-static inline struct avc_node *avc_claim_node(u32 ssid,
-                                              u32 tsid, u16 tclass)
+static struct avc_node *avc_alloc_node(void)
 {
-	struct avc_node *new;
-	int hvalue;
+	struct avc_node *node;
 
-	hvalue = avc_hash(ssid, tsid, tclass);
-	if (avc_node_freelist) {
-		new = avc_node_freelist;
-		avc_node_freelist = avc_node_freelist->next;
-		avc_cache.active_nodes++;
-	} else {
-		new = avc_reclaim_node();
-		if (!new)
-			goto out;
-	}
+	node = kmem_cache_alloc(avc_node_cachep, SLAB_ATOMIC);
+	if (!node)
+		goto out;
+
+	memset(node, 0, sizeof(*node));
+	INIT_RCU_HEAD(&node->rhead);
+	INIT_LIST_HEAD(&node->list);
+	atomic_set(&node->ae.used, 1);
+	avc_cache_stats_incr(allocations);
 
-	new->ae.used = 1;
-	new->ae.ssid = ssid;
-	new->ae.tsid = tsid;
-	new->ae.tclass = tclass;
-	new->next = avc_cache.slots[hvalue];
-	avc_cache.slots[hvalue] = new;
+	if (atomic_inc_return(&avc_cache.active_nodes) > avc_cache_threshold)
+		avc_reclaim_node();
 
 out:
-	return new;
+	return node;
 }
 
-static inline struct avc_node *avc_search_node(u32 ssid, u32 tsid,
-                                               u16 tclass, int *probes)
+static void avc_node_populate(struct avc_node *node, u32 ssid, u32 tsid, u16 tclass, struct avc_entry *ae)
 {
-	struct avc_node *cur;
+	node->ae.ssid = ssid;
+	node->ae.tsid = tsid;
+	node->ae.tclass = tclass;
+	memcpy(&node->ae.avd, &ae->avd, sizeof(node->ae.avd));
+}
+
+static inline struct avc_node *avc_search_node(u32 ssid, u32 tsid, u16 tclass)
+{
+	struct avc_node *node, *ret = NULL;
 	int hvalue;
-	int tprobes = 1;
 
 	hvalue = avc_hash(ssid, tsid, tclass);
-	cur = avc_cache.slots[hvalue];
-	while (cur != NULL &&
-	       (ssid != cur->ae.ssid ||
-		tclass != cur->ae.tclass ||
-		tsid != cur->ae.tsid)) {
-		tprobes++;
-		cur = cur->next;
+	list_for_each_entry_rcu(node, &avc_cache.slots[hvalue], list) {
+		if (ssid == node->ae.ssid &&
+		    tclass == node->ae.tclass &&
+		    tsid == node->ae.tsid) {
+			ret = node;
+			break;
+		}
 	}
 
-	if (cur == NULL) {
+	if (ret == NULL) {
 		/* cache miss */
 		goto out;
 	}
 
 	/* cache hit */
-	if (probes)
-		*probes = tprobes;
-
-	cur->ae.used = 1;
-
+	if (atomic_read(&ret->ae.used) != 1)
+		atomic_set(&ret->ae.used, 1);
 out:
-	return cur;
+	return ret;
 }
 
 /**
@@ -345,36 +386,52 @@
  * @tsid: target security identifier
  * @tclass: target security class
  * @requested: requested permissions, interpreted based on @tclass
- * @aeref:  AVC entry reference
  *
  * Look up an AVC entry that is valid for the
  * @requested permissions between the SID pair
  * (@ssid, @tsid), interpreting the permissions
  * based on @tclass.  If a valid AVC entry exists,
- * then this function updates @aeref to refer to the
- * entry and returns %0. Otherwise, this function
- * returns -%ENOENT.
+ * then this function return the avc_node.
+ * Otherwise, this function returns NULL.
  */
-int avc_lookup(u32 ssid, u32 tsid, u16 tclass,
-               u32 requested, struct avc_entry_ref *aeref)
+static struct avc_node *avc_lookup(u32 ssid, u32 tsid, u16 tclass, u32 requested)
 {
 	struct avc_node *node;
-	int probes, rc = 0;
 
-	avc_cache_stats_incr(AVC_CAV_LOOKUPS);
-	node = avc_search_node(ssid, tsid, tclass,&probes);
+	avc_cache_stats_incr(lookups);
+	node = avc_search_node(ssid, tsid, tclass);
 
 	if (node && ((node->ae.avd.decided & requested) == requested)) {
-		avc_cache_stats_incr(AVC_CAV_HITS);
-		avc_cache_stats_add(AVC_CAV_PROBES,probes);
-		aeref->ae = &node->ae;
+		avc_cache_stats_incr(hits);
 		goto out;
 	}
 
-	avc_cache_stats_incr(AVC_CAV_MISSES);
-	rc = -ENOENT;
+	node = NULL;
+	avc_cache_stats_incr(misses);
 out:
-	return rc;
+	return node;
+}
+
+static int avc_latest_notif_update(int seqno, int is_insert)
+{
+	int ret = 0;
+	static spinlock_t notif_lock = SPIN_LOCK_UNLOCKED;
+	unsigned long flag;
+
+	spin_lock_irqsave(&notif_lock, flag);
+	if (is_insert) {
+		if (seqno < avc_cache.latest_notif) {
+			printk(KERN_WARNING "avc:  seqno %d < latest_notif %d\n",
+			       seqno, avc_cache.latest_notif);
+			ret = -EAGAIN;
+		}
+	} else {
+		if (seqno > avc_cache.latest_notif)
+			avc_cache.latest_notif = seqno;
+	}
+	spin_unlock_irqrestore(&notif_lock, flag);
+
+	return ret;
 }
 
 /**
@@ -383,7 +440,6 @@
  * @tsid: target security identifier
  * @tclass: target security class
  * @ae: AVC entry
- * @aeref:  AVC entry reference
  *
  * Insert an AVC entry for the SID pair
  * (@ssid, @tsid) and class @tclass.
@@ -392,37 +448,38 @@
  * response to a security_compute_av() call.  If the
  * sequence number @ae->avd.seqno is not less than the latest
  * revocation notification, then the function copies
- * the access vectors into a cache entry, updates
- * @aeref to refer to the entry, and returns %0.
- * Otherwise, this function returns -%EAGAIN.
+ * the access vectors into a cache entry, returns
+ * avc_node inserted. Otherwise, this function returns NULL.
  */
-int avc_insert(u32 ssid, u32 tsid, u16 tclass,
-               struct avc_entry *ae, struct avc_entry_ref *aeref)
+static struct avc_node *avc_insert(u32 ssid, u32 tsid, u16 tclass, struct avc_entry *ae)
 {
-	struct avc_node *node;
-	int rc = 0;
+	struct avc_node *pos, *node = NULL;
+	int hvalue;
+	unsigned long flag;
 
-	if (ae->avd.seqno < avc_cache.latest_notif) {
-		printk(KERN_WARNING "avc:  seqno %d < latest_notif %d\n",
-		       ae->avd.seqno, avc_cache.latest_notif);
-		rc = -EAGAIN;
+	if (avc_latest_notif_update(ae->avd.seqno, 1))
 		goto out;
-	}
 
-	node = avc_claim_node(ssid, tsid, tclass);
-	if (!node) {
-		rc = -ENOMEM;
-		goto out;
+	node = avc_alloc_node();
+	if (node) {
+		hvalue = avc_hash(ssid, tsid, tclass);
+		avc_node_populate(node, ssid, tsid, tclass, ae);
+
+		spin_lock_irqsave(&avc_cache.slots_lock[hvalue], flag);
+		list_for_each_entry(pos, &avc_cache.slots[hvalue], list) {
+			if (pos->ae.ssid == ssid &&
+			    pos->ae.tsid == tsid &&
+			    pos->ae.tclass == tclass) {
+			    	avc_node_replace(node, pos);
+				goto found;
+			}
+		}
+		list_add_rcu(&node->list, &avc_cache.slots[hvalue]);
+found:
+		spin_unlock_irqrestore(&avc_cache.slots_lock[hvalue], flag);
 	}
-
-	node->ae.avd.allowed = ae->avd.allowed;
-	node->ae.avd.decided = ae->avd.decided;
-	node->ae.avd.auditallow = ae->avd.auditallow;
-	node->ae.avd.auditdeny = ae->avd.auditdeny;
-	node->ae.avd.seqno = ae->avd.seqno;
-	aeref->ae = &node->ae;
 out:
-	return rc;
+	return node;
 }
 
 static inline void avc_print_ipv6_addr(struct audit_buffer *ab,
@@ -516,6 +573,8 @@
 					vma = vma->vm_next;
 				}
 				up_read(&mm->mmap_sem);
+			} else {
+				audit_log_format(ab, " comm=%s", tsk->comm);
 			}
 			if (tsk != current)
 				mmput(mm);
@@ -566,7 +625,7 @@
 
 				switch (sk->sk_family) {
 				case AF_INET: {
-					struct inet_opt *inet = inet_sk(sk);
+					struct inet_sock *inet = inet_sk(sk);
 
 					avc_print_ipv4_addr(ab, inet->rcv_saddr,
 							    inet->sport,
@@ -577,7 +636,7 @@
 					break;
 				}
 				case AF_INET6: {
-					struct inet_opt *inet = inet_sk(sk);
+					struct inet_sock *inet = inet_sk(sk);
 					struct ipv6_pinfo *inet6 = inet6_sk(sk);
 
 					avc_print_ipv6_addr(ab, &inet6->rcv_saddr,
@@ -686,8 +745,54 @@
 	return (x == y || x == SECSID_WILD || y == SECSID_WILD);
 }
 
-static inline void avc_update_node(u32 event, struct avc_node *node, u32 perms)
+/**
+ * avc_update_node Update an AVC entry
+ * @event : Updating event
+ * @perms : Permission mask bits
+ * @ssid,@tsid,@tclass : identifier of an AVC entry
+ *
+ * if a valid AVC entry doesn't exist,this function returns -ENOENT.
+ * if kmalloc() called internal returns NULL, this function returns -ENOMEM.
+ * otherwise, this function update the AVC entry. The original AVC-entry object
+ * will release later by RCU.
+ */
+static int avc_update_node(u32 event, u32 perms, u32 ssid, u32 tsid, u16 tclass)
 {
+	int hvalue, rc = 0;
+	unsigned long flag;
+	struct avc_node *pos, *node, *orig = NULL;
+
+	node = avc_alloc_node();
+	if (!node) {
+		rc = -ENOMEM;
+		goto out;
+	}
+
+	/* Lock the target slot */
+	hvalue = avc_hash(ssid, tsid, tclass);
+	spin_lock_irqsave(&avc_cache.slots_lock[hvalue], flag);
+
+	list_for_each_entry(pos, &avc_cache.slots[hvalue], list){
+		if ( ssid==pos->ae.ssid &&
+		     tsid==pos->ae.tsid &&
+		     tclass==pos->ae.tclass ){
+			orig = pos;
+			break;
+		}
+	}
+
+	if (!orig) {
+		rc = -ENOENT;
+		avc_node_kill(node);
+		goto out_unlock;
+	}
+
+	/*
+	 * Copy and replace original node.
+	 */
+
+	avc_node_populate(node, ssid, tsid, tclass, &orig->ae);
+
 	switch (event) {
 	case AVC_CALLBACK_GRANT:
 		node->ae.avd.allowed |= perms;
@@ -709,6 +814,11 @@
 		node->ae.avd.auditdeny &= ~perms;
 		break;
 	}
+	avc_node_replace(node, orig);
+out_unlock:
+	spin_unlock_irqrestore(&avc_cache.slots_lock[hvalue], flag);
+out:
+	return rc;
 }
 
 static int avc_update_cache(u32 event, u32 ssid, u32 tsid,
@@ -716,31 +826,27 @@
 {
 	struct avc_node *node;
 	int i;
-	unsigned long flags;
 
-	spin_lock_irqsave(&avc_lock,flags);
+	rcu_read_lock();
 
 	if (ssid == SECSID_WILD || tsid == SECSID_WILD) {
 		/* apply to all matching nodes */
 		for (i = 0; i < AVC_CACHE_SLOTS; i++) {
-			for (node = avc_cache.slots[i]; node;
-			     node = node->next) {
+			list_for_each_entry_rcu(node, &avc_cache.slots[i], list) {
 				if (avc_sidcmp(ssid, node->ae.ssid) &&
 				    avc_sidcmp(tsid, node->ae.tsid) &&
-				    tclass == node->ae.tclass) {
-					avc_update_node(event,node,perms);
+				    tclass == node->ae.tclass ) {
+					avc_update_node(event, perms, node->ae.ssid,
+							node->ae.tsid, node->ae.tclass);
 				}
 			}
 		}
 	} else {
 		/* apply to one node */
-		node = avc_search_node(ssid, tsid, tclass, NULL);
-		if (node) {
-			avc_update_node(event,node,perms);
-		}
+		avc_update_node(event, perms, ssid, tsid, tclass);
 	}
 
-	spin_unlock_irqrestore(&avc_lock,flags);
+	rcu_read_unlock();
 
 	return 0;
 }
@@ -752,7 +858,6 @@
 	struct avc_callback_node *c;
 	u32 tretained = 0, cretained = 0;
 	int rc = 0;
-	unsigned long flags;
 
 	/*
 	 * try_revoke only removes permissions from the cache
@@ -787,10 +892,7 @@
 		*out_retained = tretained;
 	}
 
-	spin_lock_irqsave(&avc_lock,flags);
-	if (seqno > avc_cache.latest_notif)
-		avc_cache.latest_notif = seqno;
-	spin_unlock_irqrestore(&avc_lock,flags);
+	avc_latest_notif_update(seqno, 0);
 
 out:
 	return rc;
@@ -857,35 +959,15 @@
 {
 	struct avc_callback_node *c;
 	int i, rc = 0;
-	struct avc_node *node, *tmp;
-	unsigned long flags;
-
-	avc_hash_eval("reset");
-
-	spin_lock_irqsave(&avc_lock,flags);
+	unsigned long flag;
+	struct avc_node *node;
 
 	for (i = 0; i < AVC_CACHE_SLOTS; i++) {
-		node = avc_cache.slots[i];
-		while (node) {
-			tmp = node;
-			node = node->next;
-			tmp->ae.ssid = tmp->ae.tsid = SECSID_NULL;
-			tmp->ae.tclass = SECCLASS_NULL;
-			tmp->ae.avd.allowed = tmp->ae.avd.decided = 0;
-			tmp->ae.avd.auditallow = tmp->ae.avd.auditdeny = 0;
-			tmp->ae.used = 0;
-			tmp->next = avc_node_freelist;
-			avc_node_freelist = tmp;
-			avc_cache.active_nodes--;
-		}
-		avc_cache.slots[i] = NULL;
+		spin_lock_irqsave(&avc_cache.slots_lock[i], flag);
+		list_for_each_entry(node, &avc_cache.slots[i], list)
+			avc_node_delete(node);
+		spin_unlock_irqrestore(&avc_cache.slots_lock[i], flag);
 	}
-	avc_cache.lru_hint = 0;
-
-	spin_unlock_irqrestore(&avc_lock,flags);
-
-	for (i = 0; i < AVC_NSTATS; i++)
-		avc_cache_stats[i] = 0;
 
 	for (c = avc_callbacks; c; c = c->next) {
 		if (c->events & AVC_CALLBACK_RESET) {
@@ -896,10 +978,7 @@
 		}
 	}
 
-	spin_lock_irqsave(&avc_lock,flags);
-	if (seqno > avc_cache.latest_notif)
-		avc_cache.latest_notif = seqno;
-	spin_unlock_irqrestore(&avc_lock,flags);
+	avc_latest_notif_update(seqno, 0);
 out:
 	return rc;
 }
@@ -950,14 +1029,12 @@
  * @tsid: target security identifier
  * @tclass: target security class
  * @requested: requested permissions, interpreted based on @tclass
- * @aeref:  AVC entry reference
  * @avd: access vector decisions
  *
  * Check the AVC to determine whether the @requested permissions are granted
  * for the SID pair (@ssid, @tsid), interpreting the permissions
  * based on @tclass, and call the security server on a cache miss to obtain
- * a new decision and add it to the cache.  Update @aeref to refer to an AVC
- * entry with the resulting decisions, and return a copy of the decisions
+ * a new decision and add it to the cache.  Return a copy of the decisions
  * in @avd.  Return %0 if all @requested permissions are granted,
  * -%EACCES if any permissions are denied, or another -errno upon
  * other errors.  This function is typically called by avc_has_perm(),
@@ -967,72 +1044,42 @@
  */
 int avc_has_perm_noaudit(u32 ssid, u32 tsid,
                          u16 tclass, u32 requested,
-                         struct avc_entry_ref *aeref, struct av_decision *avd)
+                         struct av_decision *avd)
 {
-	struct avc_entry *ae;
+	struct avc_node *node;
+	struct avc_entry entry, *p_ae;
 	int rc = 0;
-	unsigned long flags;
-	struct avc_entry entry;
 	u32 denied;
-	struct avc_entry_ref ref;
 
-	if (!aeref) {
-		avc_entry_ref_init(&ref);
-		aeref = &ref;
-	}
-
-	spin_lock_irqsave(&avc_lock, flags);
-	avc_cache_stats_incr(AVC_ENTRY_LOOKUPS);
-	ae = aeref->ae;
-	if (ae) {
-		if (ae->ssid == ssid &&
-		    ae->tsid == tsid &&
-		    ae->tclass == tclass &&
-		    ((ae->avd.decided & requested) == requested)) {
-			avc_cache_stats_incr(AVC_ENTRY_HITS);
-			ae->used = 1;
-		} else {
-			avc_cache_stats_incr(AVC_ENTRY_DISCARDS);
-			ae = NULL;
-		}
-	}
+	rcu_read_lock();
 
-	if (!ae) {
-		avc_cache_stats_incr(AVC_ENTRY_MISSES);
-		rc = avc_lookup(ssid, tsid, tclass, requested, aeref);
-		if (rc) {
-			spin_unlock_irqrestore(&avc_lock,flags);
-			rc = security_compute_av(ssid,tsid,tclass,requested,&entry.avd);
-			if (rc)
-				goto out;
-			spin_lock_irqsave(&avc_lock, flags);
-			rc = avc_insert(ssid,tsid,tclass,&entry,aeref);
-			if (rc) {
-				spin_unlock_irqrestore(&avc_lock,flags);
-				goto out;
-			}
-		}
-		ae = aeref->ae;
+	node = avc_lookup(ssid, tsid, tclass, requested);
+	if (!node) {
+		rcu_read_unlock();
+		rc = security_compute_av(ssid,tsid,tclass,requested,&entry.avd);
+		if (rc)
+			goto out;
+		rcu_read_lock();
+		node = avc_insert(ssid,tsid,tclass,&entry);
 	}
 
+	p_ae = node ? &node->ae : &entry;
+
 	if (avd)
-		memcpy(avd, &ae->avd, sizeof(*avd));
+		memcpy(avd, &p_ae->avd, sizeof(*avd));
 
-	denied = requested & ~(ae->avd.allowed);
+	denied = requested & ~(p_ae->avd.allowed);
 
 	if (!requested || denied) {
-		if (selinux_enforcing) {
-			spin_unlock_irqrestore(&avc_lock,flags);
+		if (selinux_enforcing)
 			rc = -EACCES;
-			goto out;
-		} else {
-			ae->avd.allowed |= requested;
-			spin_unlock_irqrestore(&avc_lock,flags);
-			goto out;
-		}
+		else
+			if (node)
+				avc_update_node(AVC_CALLBACK_GRANT,requested,
+						ssid,tsid,tclass);
 	}
 
-	spin_unlock_irqrestore(&avc_lock,flags);
+	rcu_read_unlock();
 out:
 	return rc;
 }
@@ -1043,26 +1090,23 @@
  * @tsid: target security identifier
  * @tclass: target security class
  * @requested: requested permissions, interpreted based on @tclass
- * @aeref:  AVC entry reference
  * @auditdata: auxiliary audit data
  *
  * Check the AVC to determine whether the @requested permissions are granted
  * for the SID pair (@ssid, @tsid), interpreting the permissions
  * based on @tclass, and call the security server on a cache miss to obtain
- * a new decision and add it to the cache.  Update @aeref to refer to an AVC
- * entry with the resulting decisions.  Audit the granting or denial of
+ * a new decision and add it to the cache.  Audit the granting or denial of
  * permissions in accordance with the policy.  Return %0 if all @requested
  * permissions are granted, -%EACCES if any permissions are denied, or
  * another -errno upon other errors.
  */
 int avc_has_perm(u32 ssid, u32 tsid, u16 tclass,
-                 u32 requested, struct avc_entry_ref *aeref,
-                 struct avc_audit_data *auditdata)
+                 u32 requested, struct avc_audit_data *auditdata)
 {
 	struct av_decision avd;
 	int rc;
 
-	rc = avc_has_perm_noaudit(ssid, tsid, tclass, requested, aeref, &avd);
+	rc = avc_has_perm_noaudit(ssid, tsid, tclass, requested, &avd);
 	avc_audit(ssid, tsid, tclass, requested, &avd, rc, auditdata);
 	return rc;
 }
diff -Nru a/security/selinux/hooks.c b/security/selinux/hooks.c
--- a/security/selinux/hooks.c	2005-01-10 20:11:22 -08:00
+++ b/security/selinux/hooks.c	2005-01-10 20:11:22 -08:00
@@ -448,12 +448,12 @@
 		}
 
 		rc = avc_has_perm(tsec->sid, sbsec->sid, SECCLASS_FILESYSTEM,
-		                  FILESYSTEM__RELABELFROM, NULL, NULL);
+		                  FILESYSTEM__RELABELFROM, NULL);
 		if (rc)
 			goto out_free;
 
 		rc = avc_has_perm(tsec->sid, sid, SECCLASS_FILESYSTEM,
-		                  FILESYSTEM__RELABELTO, NULL, NULL);
+		                  FILESYSTEM__RELABELTO, NULL);
 		if (rc)
 			goto out_free;
 
@@ -476,12 +476,12 @@
 			goto out_free;
 
 		rc = avc_has_perm(tsec->sid, sbsec->sid, SECCLASS_FILESYSTEM,
-				  FILESYSTEM__RELABELFROM, NULL, NULL);
+				  FILESYSTEM__RELABELFROM, NULL);
 		if (rc)
 			goto out_free;
 
 		rc = avc_has_perm(sid, sbsec->sid, SECCLASS_FILESYSTEM,
-				  FILESYSTEM__ASSOCIATE, NULL, NULL);
+				  FILESYSTEM__ASSOCIATE, NULL);
 		if (rc)
 			goto out_free;
 
@@ -927,7 +927,7 @@
 	tsec1 = tsk1->security;
 	tsec2 = tsk2->security;
 	return avc_has_perm(tsec1->sid, tsec2->sid,
-			    SECCLASS_PROCESS, perms, &tsec2->avcr, NULL);
+			    SECCLASS_PROCESS, perms, NULL);
 }
 
 /* Check whether a task is allowed to use a capability. */
@@ -944,7 +944,7 @@
 	ad.u.cap = cap;
 
 	return avc_has_perm(tsec->sid, tsec->sid,
-			    SECCLASS_CAPABILITY, CAP_TO_MASK(cap), NULL, &ad);
+			    SECCLASS_CAPABILITY, CAP_TO_MASK(cap), &ad);
 }
 
 /* Check whether a task is allowed to use a system operation. */
@@ -956,18 +956,15 @@
 	tsec = tsk->security;
 
 	return avc_has_perm(tsec->sid, SECINITSID_KERNEL,
-			    SECCLASS_SYSTEM, perms, NULL, NULL);
+			    SECCLASS_SYSTEM, perms, NULL);
 }
 
 /* Check whether a task has a particular permission to an inode.
-   The 'aeref' parameter is optional and allows other AVC
-   entry references to be passed (e.g. the one in the struct file).
    The 'adp' parameter is optional and allows other audit
    data to be passed (e.g. the dentry). */
 int inode_has_perm(struct task_struct *tsk,
 		   struct inode *inode,
 		   u32 perms,
-		   struct avc_entry_ref *aeref,
 		   struct avc_audit_data *adp)
 {
 	struct task_security_struct *tsec;
@@ -983,8 +980,7 @@
 		ad.u.fs.inode = inode;
 	}
 
-	return avc_has_perm(tsec->sid, isec->sid, isec->sclass,
-			    perms, aeref ? aeref : &isec->avcr, adp);
+	return avc_has_perm(tsec->sid, isec->sid, isec->sclass, perms, adp);
 }
 
 /* Same as inode_has_perm, but pass explicit audit data containing
@@ -1000,7 +996,7 @@
 	AVC_AUDIT_DATA_INIT(&ad,FS);
 	ad.u.fs.mnt = mnt;
 	ad.u.fs.dentry = dentry;
-	return inode_has_perm(tsk, inode, av, NULL, &ad);
+	return inode_has_perm(tsk, inode, av, &ad);
 }
 
 /* Check whether a task can use an open file descriptor to
@@ -1031,14 +1027,14 @@
 		rc = avc_has_perm(tsec->sid, fsec->sid,
 				  SECCLASS_FD,
 				  FD__USE,
-				  &fsec->avcr, &ad);
+				  &ad);
 		if (rc)
 			return rc;
 	}
 
 	/* av is zero if only checking access to the descriptor. */
 	if (av)
-		return inode_has_perm(tsk, inode, av, &fsec->inode_avcr, &ad);
+		return inode_has_perm(tsk, inode, av, &ad);
 
 	return 0;
 }
@@ -1064,7 +1060,7 @@
 
 	rc = avc_has_perm(tsec->sid, dsec->sid, SECCLASS_DIR,
 			  DIR__ADD_NAME | DIR__SEARCH,
-			  &dsec->avcr, &ad);
+			  &ad);
 	if (rc)
 		return rc;
 
@@ -1077,13 +1073,13 @@
 			return rc;
 	}
 
-	rc = avc_has_perm(tsec->sid, newsid, tclass, FILE__CREATE, NULL, &ad);
+	rc = avc_has_perm(tsec->sid, newsid, tclass, FILE__CREATE, &ad);
 	if (rc)
 		return rc;
 
 	return avc_has_perm(newsid, sbsec->sid,
 			    SECCLASS_FILESYSTEM,
-			    FILESYSTEM__ASSOCIATE, NULL, &ad);
+			    FILESYSTEM__ASSOCIATE, &ad);
 }
 
 #define MAY_LINK   0
@@ -1111,8 +1107,7 @@
 
 	av = DIR__SEARCH;
 	av |= (kind ? DIR__REMOVE_NAME : DIR__ADD_NAME);
-	rc = avc_has_perm(tsec->sid, dsec->sid, SECCLASS_DIR,
-			  av, &dsec->avcr, &ad);
+	rc = avc_has_perm(tsec->sid, dsec->sid, SECCLASS_DIR, av, &ad);
 	if (rc)
 		return rc;
 
@@ -1131,8 +1126,7 @@
 		return 0;
 	}
 
-	rc = avc_has_perm(tsec->sid, isec->sid, isec->sclass,
-			  av, &isec->avcr, &ad);
+	rc = avc_has_perm(tsec->sid, isec->sid, isec->sclass, av, &ad);
 	return rc;
 }
 
@@ -1158,21 +1152,16 @@
 
 	ad.u.fs.dentry = old_dentry;
 	rc = avc_has_perm(tsec->sid, old_dsec->sid, SECCLASS_DIR,
-			  DIR__REMOVE_NAME | DIR__SEARCH,
-			  &old_dsec->avcr, &ad);
+			  DIR__REMOVE_NAME | DIR__SEARCH, &ad);
 	if (rc)
 		return rc;
 	rc = avc_has_perm(tsec->sid, old_isec->sid,
-			  old_isec->sclass,
-			  FILE__RENAME,
-			  &old_isec->avcr, &ad);
+			  old_isec->sclass, FILE__RENAME, &ad);
 	if (rc)
 		return rc;
 	if (old_is_dir && new_dir != old_dir) {
 		rc = avc_has_perm(tsec->sid, old_isec->sid,
-				  old_isec->sclass,
-				  DIR__REPARENT,
-				  &old_isec->avcr, &ad);
+				  old_isec->sclass, DIR__REPARENT, &ad);
 		if (rc)
 			return rc;
 	}
@@ -1181,8 +1170,7 @@
 	av = DIR__ADD_NAME | DIR__SEARCH;
 	if (new_dentry->d_inode)
 		av |= DIR__REMOVE_NAME;
-	rc = avc_has_perm(tsec->sid, new_dsec->sid, SECCLASS_DIR,
-			  av,&new_dsec->avcr, &ad);
+	rc = avc_has_perm(tsec->sid, new_dsec->sid, SECCLASS_DIR, av, &ad);
 	if (rc)
 		return rc;
 	if (new_dentry->d_inode) {
@@ -1190,8 +1178,7 @@
 		new_is_dir = S_ISDIR(new_dentry->d_inode->i_mode);
 		rc = avc_has_perm(tsec->sid, new_isec->sid,
 				  new_isec->sclass,
-				  (new_is_dir ? DIR__RMDIR : FILE__UNLINK),
-				  &new_isec->avcr, &ad);
+				  (new_is_dir ? DIR__RMDIR : FILE__UNLINK), &ad);
 		if (rc)
 			return rc;
 	}
@@ -1211,7 +1198,7 @@
 	tsec = tsk->security;
 	sbsec = sb->s_security;
 	return avc_has_perm(tsec->sid, sbsec->sid, SECCLASS_FILESYSTEM,
-			    perms, NULL, ad);
+			    perms, ad);
 }
 
 /* Convert a Linux mode and permission mask to an access vector. */
@@ -1403,12 +1390,6 @@
 static void selinux_capset_set(struct task_struct *target, kernel_cap_t *effective,
                                kernel_cap_t *inheritable, kernel_cap_t *permitted)
 {
-	int error;
-
-	error = task_has_perm(current, target, PROCESS__SETCAP);
-	if (error)
-		return;
-
 	secondary_ops->capset_set(target, effective, inheritable, permitted);
 }
 
@@ -1448,7 +1429,7 @@
 	 * a bad coupling between this module and sysctl.c */
 	if(op == 001) {
 		error = avc_has_perm(tsec->sid, tsid,
-				     SECCLASS_DIR, DIR__SEARCH, NULL, NULL);
+				     SECCLASS_DIR, DIR__SEARCH, NULL);
 	} else {
 		av = 0;
 		if (op & 004)
@@ -1457,7 +1438,7 @@
 			av |= FILE__WRITE;
 		if (av)
 			error = avc_has_perm(tsec->sid, tsid,
-					     SECCLASS_FILE, av, NULL, NULL);
+					     SECCLASS_FILE, av, NULL);
         }
 
 	return error;
@@ -1494,9 +1475,9 @@
 	return rc;
 }
 
-static int selinux_quota_on(struct file *f)
+static int selinux_quota_on(struct dentry *dentry)
 {
-	return file_has_perm(current, f, FILE__QUOTAON);
+	return dentry_has_perm(current, NULL, dentry, FILE__QUOTAON);
 }
 
 static int selinux_syslog(int type)
@@ -1576,8 +1557,7 @@
 		if (!rc) {
 			rc = avc_has_perm_noaudit(tsec->sid, tsec->sid,
 						  SECCLASS_CAPABILITY,
-						  CAP_TO_MASK(CAP_SYS_ADMIN),
-						  NULL, NULL);
+						  CAP_TO_MASK(CAP_SYS_ADMIN), NULL);
 		}
 		if (rc)
 			free -= free / 32;
@@ -1669,22 +1649,18 @@
 
         if (tsec->sid == newsid) {
 		rc = avc_has_perm(tsec->sid, isec->sid,
-				  SECCLASS_FILE, FILE__EXECUTE_NO_TRANS,
-				  &isec->avcr, &ad);
+				  SECCLASS_FILE, FILE__EXECUTE_NO_TRANS, &ad);
 		if (rc)
 			return rc;
 	} else {
 		/* Check permissions for the transition. */
 		rc = avc_has_perm(tsec->sid, newsid,
-				  SECCLASS_PROCESS, PROCESS__TRANSITION,
-				  NULL,
-				  &ad);
+				  SECCLASS_PROCESS, PROCESS__TRANSITION, &ad);
 		if (rc)
 			return rc;
 
 		rc = avc_has_perm(newsid, isec->sid,
-				  SECCLASS_FILE, FILE__ENTRYPOINT,
-				  &isec->avcr, &ad);
+				  SECCLASS_FILE, FILE__ENTRYPOINT, &ad);
 		if (rc)
 			return rc;
 
@@ -1716,7 +1692,7 @@
 		   the two SIDs, i.e. ahp returns 0. */
 		atsecure = avc_has_perm(tsec->osid, tsec->sid,
 					 SECCLASS_PROCESS,
-					 PROCESS__NOATSECURE, NULL, NULL);
+					 PROCESS__NOATSECURE, NULL);
 	}
 
 	return (atsecure || secondary_ops->bprm_secureexec(bprm));
@@ -1751,8 +1727,7 @@
 			   interested in the inode-based check here. */
 			struct inode *inode = file->f_dentry->d_inode;
 			if (inode_has_perm(current, inode,
-					   FILE__READ | FILE__WRITE,
-					   NULL, NULL)) {
+					   FILE__READ | FILE__WRITE, NULL)) {
 				/* Reset controlling tty. */
 				current->signal->tty = NULL;
 				current->signal->tty_old_pgrp = 0;
@@ -1838,8 +1813,7 @@
 		   unchanged and kill. */
 		if (unsafe & LSM_UNSAFE_SHARE) {
 			rc = avc_has_perm_noaudit(tsec->sid, sid,
-					  SECCLASS_PROCESS, PROCESS__SHARE,
-					  NULL, &avd);
+					  SECCLASS_PROCESS, PROCESS__SHARE, &avd);
 			if (rc) {
 				task_unlock(current);
 				avc_audit(tsec->sid, sid, SECCLASS_PROCESS,
@@ -1853,8 +1827,7 @@
 		   Otherwise, leave SID unchanged and kill. */
 		if (unsafe & (LSM_UNSAFE_PTRACE | LSM_UNSAFE_PTRACE_CAP)) {
 			rc = avc_has_perm_noaudit(tsec->ptrace_sid, sid,
-					  SECCLASS_PROCESS, PROCESS__PTRACE,
-					  NULL, &avd);
+					  SECCLASS_PROCESS, PROCESS__PTRACE, &avd);
 			if (!rc)
 				tsec->sid = sid;
 			task_unlock(current);
@@ -1879,7 +1852,7 @@
                   been updated so that any kill done after the flush
                   will be checked against the new SID. */
 		rc = avc_has_perm(tsec->osid, tsec->sid, SECCLASS_PROCESS,
-				  PROCESS__SIGINH, NULL, NULL);
+				  PROCESS__SIGINH, NULL);
 		if (rc) {
 			memset(&itimer, 0, sizeof itimer);
 			for (i = 0; i < 3; i++)
@@ -1903,7 +1876,7 @@
 		   is lower than the hard limit, e.g. RLIMIT_CORE or 
 		   RLIMIT_STACK.*/
 		rc = avc_has_perm(tsec->osid, tsec->sid, SECCLASS_PROCESS,
-				  PROCESS__RLIMITINH, NULL, NULL);
+				  PROCESS__RLIMITINH, NULL);
 		if (rc) {
 			for (i = 0; i < RLIM_NLIMITS; i++) {
 				rlim = current->signal->rlim + i;
@@ -1914,7 +1887,7 @@
 
 		/* Wake up the parent if it is waiting so that it can
 		   recheck wait permission to the new task SID. */
-		wake_up_interruptible(&current->parent->wait_chldexit);
+		wake_up_interruptible(&current->parent->signal->wait_chldexit);
 
 lock_out:
 		task_lock(current);
@@ -2189,7 +2162,7 @@
 	}
 
 	return inode_has_perm(current, inode,
-			       file_mask_to_av(inode->i_mode, mask), NULL, NULL);
+			       file_mask_to_av(inode->i_mode, mask), NULL);
 }
 
 static int selinux_inode_setattr(struct dentry *dentry, struct iattr *iattr)
@@ -2247,8 +2220,7 @@
 	ad.u.fs.dentry = dentry;
 
 	rc = avc_has_perm(tsec->sid, isec->sid, isec->sclass,
-			  FILE__RELABELFROM,
-			  &isec->avcr, &ad);
+			  FILE__RELABELFROM, &ad);
 	if (rc)
 		return rc;
 
@@ -2257,7 +2229,7 @@
 		return rc;
 
 	rc = avc_has_perm(tsec->sid, newsid, isec->sclass,
-			  FILE__RELABELTO, NULL, &ad);
+			  FILE__RELABELTO, &ad);
 	if (rc)
 		return rc;
 
@@ -2265,7 +2237,6 @@
 			    sbsec->sid,
 			    SECCLASS_FILESYSTEM,
 			    FILESYSTEM__ASSOCIATE,
-			    NULL,
 			    &ad);
 }
 
@@ -2466,6 +2437,17 @@
 
 static int file_map_prot_check(struct file *file, unsigned long prot, int shared)
 {
+	if ((prot & PROT_EXEC) && (!file || (!shared && (prot & PROT_WRITE)))) {
+		/*
+		 * We are making executable an anonymous mapping or a
+		 * private file mapping that will also be writable.
+		 * This has an additional check.
+		 */
+		int rc = task_has_perm(current, current, PROCESS__EXECMEM);
+		if (rc)
+			return rc;
+	}
+
 	if (file) {
 		/* read access is always possible with a mapping */
 		u32 av = FILE__READ;
@@ -2503,6 +2485,18 @@
 	if (rc)
 		return rc;
 
+	if (vma->vm_file != NULL && vma->anon_vma != NULL && (prot & PROT_EXEC)) {
+		/*
+		 * We are making executable a file mapping that has
+		 * had some COW done. Since pages might have been written,
+		 * check ability to execute the possibly modified content.
+		 * This typically should only occur for text relocations.
+		 */
+		int rc = file_has_perm(current, vma->vm_file, FILE__EXECMOD);
+		if (rc)
+			return rc;
+	}
+
 	return file_map_prot_check(vma->vm_file, prot, vma->vm_flags&VM_SHARED);
 }
 
@@ -2587,7 +2581,7 @@
 		perm = signal_to_av(signum);
 
 	return avc_has_perm(fsec->fown_sid, tsec->sid,
-			    SECCLASS_PROCESS, perm, NULL, NULL);
+			    SECCLASS_PROCESS, perm, NULL);
 }
 
 static int selinux_file_receive(struct file *file)
@@ -2715,17 +2709,7 @@
 
 static int selinux_task_setscheduler(struct task_struct *p, int policy, struct sched_param *lp)
 {
-	struct task_security_struct *tsec1, *tsec2;
-
-	tsec1 = current->security;
-	tsec2 = p->security;
-
-	/* No auditing from the setscheduler hook, since the runqueue lock
-	   is held and the system will deadlock if we try to log an audit
-	   message. */
-	return avc_has_perm_noaudit(tsec1->sid, tsec2->sid,
-				    SECCLASS_PROCESS, PROCESS__SETSCHED,
-				    &tsec2->avcr, NULL);
+	return task_has_perm(current, p, PROCESS__SETSCHED);
 }
 
 static int selinux_task_getscheduler(struct task_struct *p)
@@ -2968,8 +2952,7 @@
 
 	AVC_AUDIT_DATA_INIT(&ad,NET);
 	ad.u.net.sk = sock->sk;
-	err = avc_has_perm(tsec->sid, isec->sid, isec->sclass,
-			   perms, &isec->avcr, &ad);
+	err = avc_has_perm(tsec->sid, isec->sid, isec->sclass, perms, &ad);
 
 out:
 	return err;
@@ -2987,7 +2970,7 @@
 	tsec = current->security;
 	err = avc_has_perm(tsec->sid, tsec->sid,
 			   socket_type_to_security_class(family, type,
-			   protocol), SOCKET__CREATE, NULL, NULL);
+			   protocol), SOCKET__CREATE, NULL);
 
 out:
 	return err;
@@ -3068,7 +3051,7 @@
 			ad.u.net.family = family;
 			err = avc_has_perm(isec->sid, sid,
 					   isec->sclass,
-					   SOCKET__NAME_BIND, NULL, &ad);
+					   SOCKET__NAME_BIND, &ad);
 			if (err)
 				goto out;
 		}
@@ -3101,7 +3084,7 @@
 			ipv6_addr_copy(&ad.u.net.v6info.saddr, &addr6->sin6_addr);
 
 		err = avc_has_perm(isec->sid, sid,
-		                   isec->sclass, node_perm, NULL, &ad);
+		                   isec->sclass, node_perm, &ad);
 		if (err)
 			goto out;
 	}
@@ -3201,8 +3184,7 @@
 
 	err = avc_has_perm(isec->sid, other_isec->sid,
 			   isec->sclass,
-			   UNIX_STREAM_SOCKET__CONNECTTO,
-			   &other_isec->avcr, &ad);
+			   UNIX_STREAM_SOCKET__CONNECTTO, &ad);
 	if (err)
 		return err;
 
@@ -3232,9 +3214,7 @@
 	ad.u.net.sk = other->sk;
 
 	err = avc_has_perm(isec->sid, other_isec->sid,
-			   isec->sclass,
-			   SOCKET__SENDTO,
-			   &other_isec->avcr, &ad);
+			   isec->sclass, SOCKET__SENDTO, &ad);
 	if (err)
 		return err;
 
@@ -3312,8 +3292,7 @@
 	if (err)
 		goto out;
 
-	err = avc_has_perm(sock_sid, if_sid, SECCLASS_NETIF,
-	                   netif_perm, NULL, &ad);
+	err = avc_has_perm(sock_sid, if_sid, SECCLASS_NETIF, netif_perm, &ad);
 	if (err)
 		goto out;
 	
@@ -3322,7 +3301,7 @@
 	if (err)
 		goto out;
 	
-	err = avc_has_perm(sock_sid, node_sid, SECCLASS_NODE, node_perm, NULL, &ad);
+	err = avc_has_perm(sock_sid, node_sid, SECCLASS_NODE, node_perm, &ad);
 	if (err)
 		goto out;
 
@@ -3336,8 +3315,8 @@
 		if (err)
 			goto out;
 
-		err = avc_has_perm(sock_sid, port_sid, sock_class,
-		                   recv_perm, NULL, &ad);
+		err = avc_has_perm(sock_sid, port_sid,
+				   sock_class, recv_perm, &ad);
 	}
 out:	
 	return err;
@@ -3486,7 +3465,7 @@
 		goto out;
 
 	err = avc_has_perm(isec->sid, if_sid, SECCLASS_NETIF,
-	                   netif_perm, NULL, &ad) ? NF_DROP : NF_ACCEPT;
+	                   netif_perm, &ad) ? NF_DROP : NF_ACCEPT;
 	if (err != NF_ACCEPT)
 		goto out;
 		
@@ -3497,7 +3476,7 @@
 		goto out;
 	
 	err = avc_has_perm(isec->sid, node_sid, SECCLASS_NODE,
-	                   node_perm, NULL, &ad) ? NF_DROP : NF_ACCEPT;
+	                   node_perm, &ad) ? NF_DROP : NF_ACCEPT;
 	if (err != NF_ACCEPT)
 		goto out;
 
@@ -3514,7 +3493,7 @@
 			goto out;
 
 		err = avc_has_perm(isec->sid, port_sid, isec->sclass,
-		                   send_perm, NULL, &ad) ? NF_DROP : NF_ACCEPT;
+		                   send_perm, &ad) ? NF_DROP : NF_ACCEPT;
 	}
 
 out:
@@ -3651,8 +3630,7 @@
 	AVC_AUDIT_DATA_INIT(&ad, IPC);
 	ad.u.ipc_id = ipc_perms->key;
 
-	return avc_has_perm(tsec->sid, isec->sid, sclass,
-			    perms, &isec->avcr, &ad);
+	return avc_has_perm(tsec->sid, isec->sid, sclass, perms, &ad);
 }
 
 static int selinux_msg_msg_alloc_security(struct msg_msg *msg)
@@ -3684,7 +3662,7 @@
  	ad.u.ipc_id = msq->q_perm.key;
 
 	rc = avc_has_perm(tsec->sid, isec->sid, SECCLASS_MSGQ,
-			  MSGQ__CREATE, &isec->avcr, &ad);
+			  MSGQ__CREATE, &ad);
 	if (rc) {
 		ipc_free_security(&msq->q_perm);
 		return rc;
@@ -3710,7 +3688,7 @@
 	ad.u.ipc_id = msq->q_perm.key;
 
 	return avc_has_perm(tsec->sid, isec->sid, SECCLASS_MSGQ,
-			    MSGQ__ASSOCIATE, &isec->avcr, &ad);
+			    MSGQ__ASSOCIATE, &ad);
 }
 
 static int selinux_msg_queue_msgctl(struct msg_queue *msq, int cmd)
@@ -3774,17 +3752,15 @@
 
 	/* Can this process write to the queue? */
 	rc = avc_has_perm(tsec->sid, isec->sid, SECCLASS_MSGQ,
-			  MSGQ__WRITE, &isec->avcr, &ad);
+			  MSGQ__WRITE, &ad);
 	if (!rc)
 		/* Can this process send the message */
 		rc = avc_has_perm(tsec->sid, msec->sid,
-				  SECCLASS_MSG, MSG__SEND,
-				  &msec->avcr, &ad);
+				  SECCLASS_MSG, MSG__SEND, &ad);
 	if (!rc)
 		/* Can the message be put in the queue? */
 		rc = avc_has_perm(msec->sid, isec->sid,
-				  SECCLASS_MSGQ, MSGQ__ENQUEUE,
-				  &isec->avcr, &ad);
+				  SECCLASS_MSGQ, MSGQ__ENQUEUE, &ad);
 
 	return rc;
 }
@@ -3807,12 +3783,10 @@
  	ad.u.ipc_id = msq->q_perm.key;
 
 	rc = avc_has_perm(tsec->sid, isec->sid,
-			  SECCLASS_MSGQ, MSGQ__READ,
-			  &isec->avcr, &ad);
+			  SECCLASS_MSGQ, MSGQ__READ, &ad);
 	if (!rc)
 		rc = avc_has_perm(tsec->sid, msec->sid,
-				  SECCLASS_MSG, MSG__RECEIVE,
-				  &msec->avcr, &ad);
+				  SECCLASS_MSG, MSG__RECEIVE, &ad);
 	return rc;
 }
 
@@ -3835,7 +3809,7 @@
  	ad.u.ipc_id = shp->shm_perm.key;
 
 	rc = avc_has_perm(tsec->sid, isec->sid, SECCLASS_SHM,
-			  SHM__CREATE, &isec->avcr, &ad);
+			  SHM__CREATE, &ad);
 	if (rc) {
 		ipc_free_security(&shp->shm_perm);
 		return rc;
@@ -3861,7 +3835,7 @@
 	ad.u.ipc_id = shp->shm_perm.key;
 
 	return avc_has_perm(tsec->sid, isec->sid, SECCLASS_SHM,
-			    SHM__ASSOCIATE, &isec->avcr, &ad);
+			    SHM__ASSOCIATE, &ad);
 }
 
 /* Note, at this point, shp is locked down */
@@ -3934,7 +3908,7 @@
  	ad.u.ipc_id = sma->sem_perm.key;
 
 	rc = avc_has_perm(tsec->sid, isec->sid, SECCLASS_SEM,
-			  SEM__CREATE, &isec->avcr, &ad);
+			  SEM__CREATE, &ad);
 	if (rc) {
 		ipc_free_security(&sma->sem_perm);
 		return rc;
@@ -3960,7 +3934,7 @@
 	ad.u.ipc_id = sma->sem_perm.key;
 
 	return avc_has_perm(tsec->sid, isec->sid, SECCLASS_SEM,
-			    SEM__ASSOCIATE, &isec->avcr, &ad);
+			    SEM__ASSOCIATE, &ad);
 }
 
 /* Note, at this point, sma is locked down */
@@ -4128,10 +4102,9 @@
 	u32 sid = 0;
 	int error;
 
-	if (current != p || !strcmp(name, "current")) {
+	if (current != p) {
 		/* SELinux only allows a process to change its own
-		   security attributes, and it only allows the process
-		   current SID to change via exec. */
+		   security attributes. */
 		return -EACCES;
 	}
 
@@ -4144,6 +4117,8 @@
 		error = task_has_perm(current, p, PROCESS__SETEXEC);
 	else if (!strcmp(name, "fscreate"))
 		error = task_has_perm(current, p, PROCESS__SETFSCREATE);
+	else if (!strcmp(name, "current"))
+		error = task_has_perm(current, p, PROCESS__SETCURRENT);
 	else
 		error = -EINVAL;
 	if (error)
@@ -4168,6 +4143,51 @@
 		tsec->exec_sid = sid;
 	else if (!strcmp(name, "fscreate"))
 		tsec->create_sid = sid;
+	else if (!strcmp(name, "current")) {
+		struct av_decision avd;
+
+		if (sid == 0)
+			return -EINVAL;
+
+		/* Only allow single threaded processes to change context */
+		if (atomic_read(&p->mm->mm_users) != 1) {
+			struct task_struct *g, *t;
+			struct mm_struct *mm = p->mm;
+			read_lock(&tasklist_lock);
+			do_each_thread(g, t)
+				if (t->mm == mm && t != p) {
+					read_unlock(&tasklist_lock);
+					return -EPERM;
+				}
+			while_each_thread(g, t);
+			read_unlock(&tasklist_lock);
+                }
+
+		/* Check permissions for the transition. */
+		error = avc_has_perm(tsec->sid, sid, SECCLASS_PROCESS,
+		                     PROCESS__DYNTRANSITION, NULL);
+		if (error)
+			return error;
+
+		/* Check for ptracing, and update the task SID if ok.
+		   Otherwise, leave SID unchanged and fail. */
+		task_lock(p);
+		if (p->ptrace & PT_PTRACED) {
+			error = avc_has_perm_noaudit(tsec->ptrace_sid, sid,
+						     SECCLASS_PROCESS,
+						     PROCESS__PTRACE, &avd);
+			if (!error)
+				tsec->sid = sid;
+			task_unlock(p);
+			avc_audit(tsec->ptrace_sid, sid, SECCLASS_PROCESS,
+				  PROCESS__PTRACE, &avd, error, NULL);
+			if (error)
+				return error;
+		} else {
+			tsec->sid = sid;
+			task_unlock(p);
+		}
+	}
 	else
 		return -EINVAL;
 
diff -Nru a/security/selinux/include/av_inherit.h b/security/selinux/include/av_inherit.h
--- a/security/selinux/include/av_inherit.h	2005-01-10 20:11:20 -08:00
+++ b/security/selinux/include/av_inherit.h	2005-01-10 20:11:20 -08:00
@@ -1,44 +1,30 @@
 /* This file is automatically generated.  Do not edit. */
-/* FLASK */
-
-struct av_inherit
-{
-    u16 tclass;
-    char **common_pts;
-    u32 common_base;
-};
-
-static struct av_inherit av_inherit[] = {
-   { SECCLASS_DIR, common_file_perm_to_string, 0x00020000UL },
-   { SECCLASS_FILE, common_file_perm_to_string, 0x00020000UL },
-   { SECCLASS_LNK_FILE, common_file_perm_to_string, 0x00020000UL },
-   { SECCLASS_CHR_FILE, common_file_perm_to_string, 0x00020000UL },
-   { SECCLASS_BLK_FILE, common_file_perm_to_string, 0x00020000UL },
-   { SECCLASS_SOCK_FILE, common_file_perm_to_string, 0x00020000UL },
-   { SECCLASS_FIFO_FILE, common_file_perm_to_string, 0x00020000UL },
-   { SECCLASS_SOCKET, common_socket_perm_to_string, 0x00400000UL },
-   { SECCLASS_TCP_SOCKET, common_socket_perm_to_string, 0x00400000UL },
-   { SECCLASS_UDP_SOCKET, common_socket_perm_to_string, 0x00400000UL },
-   { SECCLASS_RAWIP_SOCKET, common_socket_perm_to_string, 0x00400000UL },
-   { SECCLASS_NETLINK_SOCKET, common_socket_perm_to_string, 0x00400000UL },
-   { SECCLASS_PACKET_SOCKET, common_socket_perm_to_string, 0x00400000UL },
-   { SECCLASS_KEY_SOCKET, common_socket_perm_to_string, 0x00400000UL },
-   { SECCLASS_UNIX_STREAM_SOCKET, common_socket_perm_to_string, 0x00400000UL },
-   { SECCLASS_UNIX_DGRAM_SOCKET, common_socket_perm_to_string, 0x00400000UL },
-   { SECCLASS_IPC, common_ipc_perm_to_string, 0x00000200UL },
-   { SECCLASS_SEM, common_ipc_perm_to_string, 0x00000200UL },
-   { SECCLASS_MSGQ, common_ipc_perm_to_string, 0x00000200UL },
-   { SECCLASS_SHM, common_ipc_perm_to_string, 0x00000200UL },
-   { SECCLASS_NETLINK_ROUTE_SOCKET, common_socket_perm_to_string, 0x00400000UL },
-   { SECCLASS_NETLINK_FIREWALL_SOCKET, common_socket_perm_to_string, 0x00400000UL },
-   { SECCLASS_NETLINK_TCPDIAG_SOCKET, common_socket_perm_to_string, 0x00400000UL },
-   { SECCLASS_NETLINK_NFLOG_SOCKET, common_socket_perm_to_string, 0x00400000UL },
-   { SECCLASS_NETLINK_XFRM_SOCKET, common_socket_perm_to_string, 0x00400000UL },
-   { SECCLASS_NETLINK_SELINUX_SOCKET, common_socket_perm_to_string, 0x00400000UL },
-   { SECCLASS_NETLINK_AUDIT_SOCKET, common_socket_perm_to_string, 0x00400000UL },
-   { SECCLASS_NETLINK_IP6FW_SOCKET, common_socket_perm_to_string, 0x00400000UL },
-   { SECCLASS_NETLINK_DNRT_SOCKET, common_socket_perm_to_string, 0x00400000UL },
-};
-
-
-/* FLASK */
+   S_(SECCLASS_DIR, file, 0x00020000UL)
+   S_(SECCLASS_FILE, file, 0x00020000UL)
+   S_(SECCLASS_LNK_FILE, file, 0x00020000UL)
+   S_(SECCLASS_CHR_FILE, file, 0x00020000UL)
+   S_(SECCLASS_BLK_FILE, file, 0x00020000UL)
+   S_(SECCLASS_SOCK_FILE, file, 0x00020000UL)
+   S_(SECCLASS_FIFO_FILE, file, 0x00020000UL)
+   S_(SECCLASS_SOCKET, socket, 0x00400000UL)
+   S_(SECCLASS_TCP_SOCKET, socket, 0x00400000UL)
+   S_(SECCLASS_UDP_SOCKET, socket, 0x00400000UL)
+   S_(SECCLASS_RAWIP_SOCKET, socket, 0x00400000UL)
+   S_(SECCLASS_NETLINK_SOCKET, socket, 0x00400000UL)
+   S_(SECCLASS_PACKET_SOCKET, socket, 0x00400000UL)
+   S_(SECCLASS_KEY_SOCKET, socket, 0x00400000UL)
+   S_(SECCLASS_UNIX_STREAM_SOCKET, socket, 0x00400000UL)
+   S_(SECCLASS_UNIX_DGRAM_SOCKET, socket, 0x00400000UL)
+   S_(SECCLASS_IPC, ipc, 0x00000200UL)
+   S_(SECCLASS_SEM, ipc, 0x00000200UL)
+   S_(SECCLASS_MSGQ, ipc, 0x00000200UL)
+   S_(SECCLASS_SHM, ipc, 0x00000200UL)
+   S_(SECCLASS_NETLINK_ROUTE_SOCKET, socket, 0x00400000UL)
+   S_(SECCLASS_NETLINK_FIREWALL_SOCKET, socket, 0x00400000UL)
+   S_(SECCLASS_NETLINK_TCPDIAG_SOCKET, socket, 0x00400000UL)
+   S_(SECCLASS_NETLINK_NFLOG_SOCKET, socket, 0x00400000UL)
+   S_(SECCLASS_NETLINK_XFRM_SOCKET, socket, 0x00400000UL)
+   S_(SECCLASS_NETLINK_SELINUX_SOCKET, socket, 0x00400000UL)
+   S_(SECCLASS_NETLINK_AUDIT_SOCKET, socket, 0x00400000UL)
+   S_(SECCLASS_NETLINK_IP6FW_SOCKET, socket, 0x00400000UL)
+   S_(SECCLASS_NETLINK_DNRT_SOCKET, socket, 0x00400000UL)
diff -Nru a/security/selinux/include/av_perm_to_string.h b/security/selinux/include/av_perm_to_string.h
--- a/security/selinux/include/av_perm_to_string.h	2005-01-10 20:11:22 -08:00
+++ b/security/selinux/include/av_perm_to_string.h	2005-01-10 20:11:22 -08:00
@@ -1,225 +1,227 @@
 /* This file is automatically generated.  Do not edit. */
-/* FLASK */
-
-struct av_perm_to_string
-{
-    u16 tclass;
-    u32 value;
-    char *name;
-};
-
-static struct av_perm_to_string av_perm_to_string[] = {
-   { SECCLASS_FILESYSTEM, FILESYSTEM__MOUNT, "mount" },
-   { SECCLASS_FILESYSTEM, FILESYSTEM__REMOUNT, "remount" },
-   { SECCLASS_FILESYSTEM, FILESYSTEM__UNMOUNT, "unmount" },
-   { SECCLASS_FILESYSTEM, FILESYSTEM__GETATTR, "getattr" },
-   { SECCLASS_FILESYSTEM, FILESYSTEM__RELABELFROM, "relabelfrom" },
-   { SECCLASS_FILESYSTEM, FILESYSTEM__RELABELTO, "relabelto" },
-   { SECCLASS_FILESYSTEM, FILESYSTEM__TRANSITION, "transition" },
-   { SECCLASS_FILESYSTEM, FILESYSTEM__ASSOCIATE, "associate" },
-   { SECCLASS_FILESYSTEM, FILESYSTEM__QUOTAMOD, "quotamod" },
-   { SECCLASS_FILESYSTEM, FILESYSTEM__QUOTAGET, "quotaget" },
-   { SECCLASS_DIR, DIR__ADD_NAME, "add_name" },
-   { SECCLASS_DIR, DIR__REMOVE_NAME, "remove_name" },
-   { SECCLASS_DIR, DIR__REPARENT, "reparent" },
-   { SECCLASS_DIR, DIR__SEARCH, "search" },
-   { SECCLASS_DIR, DIR__RMDIR, "rmdir" },
-   { SECCLASS_FILE, FILE__EXECUTE_NO_TRANS, "execute_no_trans" },
-   { SECCLASS_FILE, FILE__ENTRYPOINT, "entrypoint" },
-   { SECCLASS_FD, FD__USE, "use" },
-   { SECCLASS_TCP_SOCKET, TCP_SOCKET__CONNECTTO, "connectto" },
-   { SECCLASS_TCP_SOCKET, TCP_SOCKET__NEWCONN, "newconn" },
-   { SECCLASS_TCP_SOCKET, TCP_SOCKET__ACCEPTFROM, "acceptfrom" },
-   { SECCLASS_TCP_SOCKET, TCP_SOCKET__NODE_BIND, "node_bind" },
-   { SECCLASS_UDP_SOCKET, UDP_SOCKET__NODE_BIND, "node_bind" },
-   { SECCLASS_RAWIP_SOCKET, RAWIP_SOCKET__NODE_BIND, "node_bind" },
-   { SECCLASS_NODE, NODE__TCP_RECV, "tcp_recv" },
-   { SECCLASS_NODE, NODE__TCP_SEND, "tcp_send" },
-   { SECCLASS_NODE, NODE__UDP_RECV, "udp_recv" },
-   { SECCLASS_NODE, NODE__UDP_SEND, "udp_send" },
-   { SECCLASS_NODE, NODE__RAWIP_RECV, "rawip_recv" },
-   { SECCLASS_NODE, NODE__RAWIP_SEND, "rawip_send" },
-   { SECCLASS_NODE, NODE__ENFORCE_DEST, "enforce_dest" },
-   { SECCLASS_NETIF, NETIF__TCP_RECV, "tcp_recv" },
-   { SECCLASS_NETIF, NETIF__TCP_SEND, "tcp_send" },
-   { SECCLASS_NETIF, NETIF__UDP_RECV, "udp_recv" },
-   { SECCLASS_NETIF, NETIF__UDP_SEND, "udp_send" },
-   { SECCLASS_NETIF, NETIF__RAWIP_RECV, "rawip_recv" },
-   { SECCLASS_NETIF, NETIF__RAWIP_SEND, "rawip_send" },
-   { SECCLASS_UNIX_STREAM_SOCKET, UNIX_STREAM_SOCKET__CONNECTTO, "connectto" },
-   { SECCLASS_UNIX_STREAM_SOCKET, UNIX_STREAM_SOCKET__NEWCONN, "newconn" },
-   { SECCLASS_UNIX_STREAM_SOCKET, UNIX_STREAM_SOCKET__ACCEPTFROM, "acceptfrom" },
-   { SECCLASS_PROCESS, PROCESS__FORK, "fork" },
-   { SECCLASS_PROCESS, PROCESS__TRANSITION, "transition" },
-   { SECCLASS_PROCESS, PROCESS__SIGCHLD, "sigchld" },
-   { SECCLASS_PROCESS, PROCESS__SIGKILL, "sigkill" },
-   { SECCLASS_PROCESS, PROCESS__SIGSTOP, "sigstop" },
-   { SECCLASS_PROCESS, PROCESS__SIGNULL, "signull" },
-   { SECCLASS_PROCESS, PROCESS__SIGNAL, "signal" },
-   { SECCLASS_PROCESS, PROCESS__PTRACE, "ptrace" },
-   { SECCLASS_PROCESS, PROCESS__GETSCHED, "getsched" },
-   { SECCLASS_PROCESS, PROCESS__SETSCHED, "setsched" },
-   { SECCLASS_PROCESS, PROCESS__GETSESSION, "getsession" },
-   { SECCLASS_PROCESS, PROCESS__GETPGID, "getpgid" },
-   { SECCLASS_PROCESS, PROCESS__SETPGID, "setpgid" },
-   { SECCLASS_PROCESS, PROCESS__GETCAP, "getcap" },
-   { SECCLASS_PROCESS, PROCESS__SETCAP, "setcap" },
-   { SECCLASS_PROCESS, PROCESS__SHARE, "share" },
-   { SECCLASS_PROCESS, PROCESS__GETATTR, "getattr" },
-   { SECCLASS_PROCESS, PROCESS__SETEXEC, "setexec" },
-   { SECCLASS_PROCESS, PROCESS__SETFSCREATE, "setfscreate" },
-   { SECCLASS_PROCESS, PROCESS__NOATSECURE, "noatsecure" },
-   { SECCLASS_PROCESS, PROCESS__SIGINH, "siginh" },
-   { SECCLASS_PROCESS, PROCESS__SETRLIMIT, "setrlimit" },
-   { SECCLASS_PROCESS, PROCESS__RLIMITINH, "rlimitinh" },
-   { SECCLASS_MSGQ, MSGQ__ENQUEUE, "enqueue" },
-   { SECCLASS_MSG, MSG__SEND, "send" },
-   { SECCLASS_MSG, MSG__RECEIVE, "receive" },
-   { SECCLASS_SHM, SHM__LOCK, "lock" },
-   { SECCLASS_SECURITY, SECURITY__COMPUTE_AV, "compute_av" },
-   { SECCLASS_SECURITY, SECURITY__COMPUTE_CREATE, "compute_create" },
-   { SECCLASS_SECURITY, SECURITY__COMPUTE_MEMBER, "compute_member" },
-   { SECCLASS_SECURITY, SECURITY__CHECK_CONTEXT, "check_context" },
-   { SECCLASS_SECURITY, SECURITY__LOAD_POLICY, "load_policy" },
-   { SECCLASS_SECURITY, SECURITY__COMPUTE_RELABEL, "compute_relabel" },
-   { SECCLASS_SECURITY, SECURITY__COMPUTE_USER, "compute_user" },
-   { SECCLASS_SECURITY, SECURITY__SETENFORCE, "setenforce" },
-   { SECCLASS_SECURITY, SECURITY__SETBOOL, "setbool" },
-   { SECCLASS_SYSTEM, SYSTEM__IPC_INFO, "ipc_info" },
-   { SECCLASS_SYSTEM, SYSTEM__SYSLOG_READ, "syslog_read" },
-   { SECCLASS_SYSTEM, SYSTEM__SYSLOG_MOD, "syslog_mod" },
-   { SECCLASS_SYSTEM, SYSTEM__SYSLOG_CONSOLE, "syslog_console" },
-   { SECCLASS_CAPABILITY, CAPABILITY__CHOWN, "chown" },
-   { SECCLASS_CAPABILITY, CAPABILITY__DAC_OVERRIDE, "dac_override" },
-   { SECCLASS_CAPABILITY, CAPABILITY__DAC_READ_SEARCH, "dac_read_search" },
-   { SECCLASS_CAPABILITY, CAPABILITY__FOWNER, "fowner" },
-   { SECCLASS_CAPABILITY, CAPABILITY__FSETID, "fsetid" },
-   { SECCLASS_CAPABILITY, CAPABILITY__KILL, "kill" },
-   { SECCLASS_CAPABILITY, CAPABILITY__SETGID, "setgid" },
-   { SECCLASS_CAPABILITY, CAPABILITY__SETUID, "setuid" },
-   { SECCLASS_CAPABILITY, CAPABILITY__SETPCAP, "setpcap" },
-   { SECCLASS_CAPABILITY, CAPABILITY__LINUX_IMMUTABLE, "linux_immutable" },
-   { SECCLASS_CAPABILITY, CAPABILITY__NET_BIND_SERVICE, "net_bind_service" },
-   { SECCLASS_CAPABILITY, CAPABILITY__NET_BROADCAST, "net_broadcast" },
-   { SECCLASS_CAPABILITY, CAPABILITY__NET_ADMIN, "net_admin" },
-   { SECCLASS_CAPABILITY, CAPABILITY__NET_RAW, "net_raw" },
-   { SECCLASS_CAPABILITY, CAPABILITY__IPC_LOCK, "ipc_lock" },
-   { SECCLASS_CAPABILITY, CAPABILITY__IPC_OWNER, "ipc_owner" },
-   { SECCLASS_CAPABILITY, CAPABILITY__SYS_MODULE, "sys_module" },
-   { SECCLASS_CAPABILITY, CAPABILITY__SYS_RAWIO, "sys_rawio" },
-   { SECCLASS_CAPABILITY, CAPABILITY__SYS_CHROOT, "sys_chroot" },
-   { SECCLASS_CAPABILITY, CAPABILITY__SYS_PTRACE, "sys_ptrace" },
-   { SECCLASS_CAPABILITY, CAPABILITY__SYS_PACCT, "sys_pacct" },
-   { SECCLASS_CAPABILITY, CAPABILITY__SYS_ADMIN, "sys_admin" },
-   { SECCLASS_CAPABILITY, CAPABILITY__SYS_BOOT, "sys_boot" },
-   { SECCLASS_CAPABILITY, CAPABILITY__SYS_NICE, "sys_nice" },
-   { SECCLASS_CAPABILITY, CAPABILITY__SYS_RESOURCE, "sys_resource" },
-   { SECCLASS_CAPABILITY, CAPABILITY__SYS_TIME, "sys_time" },
-   { SECCLASS_CAPABILITY, CAPABILITY__SYS_TTY_CONFIG, "sys_tty_config" },
-   { SECCLASS_CAPABILITY, CAPABILITY__MKNOD, "mknod" },
-   { SECCLASS_CAPABILITY, CAPABILITY__LEASE, "lease" },
-   { SECCLASS_PASSWD, PASSWD__PASSWD, "passwd" },
-   { SECCLASS_PASSWD, PASSWD__CHFN, "chfn" },
-   { SECCLASS_PASSWD, PASSWD__CHSH, "chsh" },
-   { SECCLASS_PASSWD, PASSWD__ROOTOK, "rootok" },
-   { SECCLASS_DRAWABLE, DRAWABLE__CREATE, "create" },
-   { SECCLASS_DRAWABLE, DRAWABLE__DESTROY, "destroy" },
-   { SECCLASS_DRAWABLE, DRAWABLE__DRAW, "draw" },
-   { SECCLASS_DRAWABLE, DRAWABLE__COPY, "copy" },
-   { SECCLASS_DRAWABLE, DRAWABLE__GETATTR, "getattr" },
-   { SECCLASS_GC, GC__CREATE, "create" },
-   { SECCLASS_GC, GC__FREE, "free" },
-   { SECCLASS_GC, GC__GETATTR, "getattr" },
-   { SECCLASS_GC, GC__SETATTR, "setattr" },
-   { SECCLASS_WINDOW, WINDOW__ADDCHILD, "addchild" },
-   { SECCLASS_WINDOW, WINDOW__CREATE, "create" },
-   { SECCLASS_WINDOW, WINDOW__DESTROY, "destroy" },
-   { SECCLASS_WINDOW, WINDOW__MAP, "map" },
-   { SECCLASS_WINDOW, WINDOW__UNMAP, "unmap" },
-   { SECCLASS_WINDOW, WINDOW__CHSTACK, "chstack" },
-   { SECCLASS_WINDOW, WINDOW__CHPROPLIST, "chproplist" },
-   { SECCLASS_WINDOW, WINDOW__CHPROP, "chprop" },
-   { SECCLASS_WINDOW, WINDOW__LISTPROP, "listprop" },
-   { SECCLASS_WINDOW, WINDOW__GETATTR, "getattr" },
-   { SECCLASS_WINDOW, WINDOW__SETATTR, "setattr" },
-   { SECCLASS_WINDOW, WINDOW__SETFOCUS, "setfocus" },
-   { SECCLASS_WINDOW, WINDOW__MOVE, "move" },
-   { SECCLASS_WINDOW, WINDOW__CHSELECTION, "chselection" },
-   { SECCLASS_WINDOW, WINDOW__CHPARENT, "chparent" },
-   { SECCLASS_WINDOW, WINDOW__CTRLLIFE, "ctrllife" },
-   { SECCLASS_WINDOW, WINDOW__ENUMERATE, "enumerate" },
-   { SECCLASS_WINDOW, WINDOW__TRANSPARENT, "transparent" },
-   { SECCLASS_WINDOW, WINDOW__MOUSEMOTION, "mousemotion" },
-   { SECCLASS_WINDOW, WINDOW__CLIENTCOMEVENT, "clientcomevent" },
-   { SECCLASS_WINDOW, WINDOW__INPUTEVENT, "inputevent" },
-   { SECCLASS_WINDOW, WINDOW__DRAWEVENT, "drawevent" },
-   { SECCLASS_WINDOW, WINDOW__WINDOWCHANGEEVENT, "windowchangeevent" },
-   { SECCLASS_WINDOW, WINDOW__WINDOWCHANGEREQUEST, "windowchangerequest" },
-   { SECCLASS_WINDOW, WINDOW__SERVERCHANGEEVENT, "serverchangeevent" },
-   { SECCLASS_WINDOW, WINDOW__EXTENSIONEVENT, "extensionevent" },
-   { SECCLASS_FONT, FONT__LOAD, "load" },
-   { SECCLASS_FONT, FONT__FREE, "free" },
-   { SECCLASS_FONT, FONT__GETATTR, "getattr" },
-   { SECCLASS_FONT, FONT__USE, "use" },
-   { SECCLASS_COLORMAP, COLORMAP__CREATE, "create" },
-   { SECCLASS_COLORMAP, COLORMAP__FREE, "free" },
-   { SECCLASS_COLORMAP, COLORMAP__INSTALL, "install" },
-   { SECCLASS_COLORMAP, COLORMAP__UNINSTALL, "uninstall" },
-   { SECCLASS_COLORMAP, COLORMAP__LIST, "list" },
-   { SECCLASS_COLORMAP, COLORMAP__READ, "read" },
-   { SECCLASS_COLORMAP, COLORMAP__STORE, "store" },
-   { SECCLASS_COLORMAP, COLORMAP__GETATTR, "getattr" },
-   { SECCLASS_COLORMAP, COLORMAP__SETATTR, "setattr" },
-   { SECCLASS_PROPERTY, PROPERTY__CREATE, "create" },
-   { SECCLASS_PROPERTY, PROPERTY__FREE, "free" },
-   { SECCLASS_PROPERTY, PROPERTY__READ, "read" },
-   { SECCLASS_PROPERTY, PROPERTY__WRITE, "write" },
-   { SECCLASS_CURSOR, CURSOR__CREATE, "create" },
-   { SECCLASS_CURSOR, CURSOR__CREATEGLYPH, "createglyph" },
-   { SECCLASS_CURSOR, CURSOR__FREE, "free" },
-   { SECCLASS_CURSOR, CURSOR__ASSIGN, "assign" },
-   { SECCLASS_CURSOR, CURSOR__SETATTR, "setattr" },
-   { SECCLASS_XCLIENT, XCLIENT__KILL, "kill" },
-   { SECCLASS_XINPUT, XINPUT__LOOKUP, "lookup" },
-   { SECCLASS_XINPUT, XINPUT__GETATTR, "getattr" },
-   { SECCLASS_XINPUT, XINPUT__SETATTR, "setattr" },
-   { SECCLASS_XINPUT, XINPUT__SETFOCUS, "setfocus" },
-   { SECCLASS_XINPUT, XINPUT__WARPPOINTER, "warppointer" },
-   { SECCLASS_XINPUT, XINPUT__ACTIVEGRAB, "activegrab" },
-   { SECCLASS_XINPUT, XINPUT__PASSIVEGRAB, "passivegrab" },
-   { SECCLASS_XINPUT, XINPUT__UNGRAB, "ungrab" },
-   { SECCLASS_XINPUT, XINPUT__BELL, "bell" },
-   { SECCLASS_XINPUT, XINPUT__MOUSEMOTION, "mousemotion" },
-   { SECCLASS_XINPUT, XINPUT__RELABELINPUT, "relabelinput" },
-   { SECCLASS_XSERVER, XSERVER__SCREENSAVER, "screensaver" },
-   { SECCLASS_XSERVER, XSERVER__GETHOSTLIST, "gethostlist" },
-   { SECCLASS_XSERVER, XSERVER__SETHOSTLIST, "sethostlist" },
-   { SECCLASS_XSERVER, XSERVER__GETFONTPATH, "getfontpath" },
-   { SECCLASS_XSERVER, XSERVER__SETFONTPATH, "setfontpath" },
-   { SECCLASS_XSERVER, XSERVER__GETATTR, "getattr" },
-   { SECCLASS_XSERVER, XSERVER__GRAB, "grab" },
-   { SECCLASS_XSERVER, XSERVER__UNGRAB, "ungrab" },
-   { SECCLASS_XEXTENSION, XEXTENSION__QUERY, "query" },
-   { SECCLASS_XEXTENSION, XEXTENSION__USE, "use" },
-   { SECCLASS_PAX, PAX__PAGEEXEC, "pageexec" },
-   { SECCLASS_PAX, PAX__EMUTRAMP, "emutramp" },
-   { SECCLASS_PAX, PAX__MPROTECT, "mprotect" },
-   { SECCLASS_PAX, PAX__RANDMMAP, "randmmap" },
-   { SECCLASS_PAX, PAX__RANDEXEC, "randexec" },
-   { SECCLASS_PAX, PAX__SEGMEXEC, "segmexec" },
-   { SECCLASS_NETLINK_ROUTE_SOCKET, NETLINK_ROUTE_SOCKET__NLMSG_READ, "nlmsg_read" },
-   { SECCLASS_NETLINK_ROUTE_SOCKET, NETLINK_ROUTE_SOCKET__NLMSG_WRITE, "nlmsg_write" },
-   { SECCLASS_NETLINK_FIREWALL_SOCKET, NETLINK_FIREWALL_SOCKET__NLMSG_READ, "nlmsg_read" },
-   { SECCLASS_NETLINK_FIREWALL_SOCKET, NETLINK_FIREWALL_SOCKET__NLMSG_WRITE, "nlmsg_write" },
-   { SECCLASS_NETLINK_TCPDIAG_SOCKET, NETLINK_TCPDIAG_SOCKET__NLMSG_READ, "nlmsg_read" },
-   { SECCLASS_NETLINK_TCPDIAG_SOCKET, NETLINK_TCPDIAG_SOCKET__NLMSG_WRITE, "nlmsg_write" },
-   { SECCLASS_NETLINK_XFRM_SOCKET, NETLINK_XFRM_SOCKET__NLMSG_READ, "nlmsg_read" },
-   { SECCLASS_NETLINK_XFRM_SOCKET, NETLINK_XFRM_SOCKET__NLMSG_WRITE, "nlmsg_write" },
-   { SECCLASS_NETLINK_AUDIT_SOCKET, NETLINK_AUDIT_SOCKET__NLMSG_READ, "nlmsg_read" },
-   { SECCLASS_NETLINK_AUDIT_SOCKET, NETLINK_AUDIT_SOCKET__NLMSG_WRITE, "nlmsg_write" },
-   { SECCLASS_NETLINK_IP6FW_SOCKET, NETLINK_IP6FW_SOCKET__NLMSG_READ, "nlmsg_read" },
-   { SECCLASS_NETLINK_IP6FW_SOCKET, NETLINK_IP6FW_SOCKET__NLMSG_WRITE, "nlmsg_write" },
-};
-
-
-/* FLASK */
+   S_(SECCLASS_FILESYSTEM, FILESYSTEM__MOUNT, "mount")
+   S_(SECCLASS_FILESYSTEM, FILESYSTEM__REMOUNT, "remount")
+   S_(SECCLASS_FILESYSTEM, FILESYSTEM__UNMOUNT, "unmount")
+   S_(SECCLASS_FILESYSTEM, FILESYSTEM__GETATTR, "getattr")
+   S_(SECCLASS_FILESYSTEM, FILESYSTEM__RELABELFROM, "relabelfrom")
+   S_(SECCLASS_FILESYSTEM, FILESYSTEM__RELABELTO, "relabelto")
+   S_(SECCLASS_FILESYSTEM, FILESYSTEM__TRANSITION, "transition")
+   S_(SECCLASS_FILESYSTEM, FILESYSTEM__ASSOCIATE, "associate")
+   S_(SECCLASS_FILESYSTEM, FILESYSTEM__QUOTAMOD, "quotamod")
+   S_(SECCLASS_FILESYSTEM, FILESYSTEM__QUOTAGET, "quotaget")
+   S_(SECCLASS_DIR, DIR__ADD_NAME, "add_name")
+   S_(SECCLASS_DIR, DIR__REMOVE_NAME, "remove_name")
+   S_(SECCLASS_DIR, DIR__REPARENT, "reparent")
+   S_(SECCLASS_DIR, DIR__SEARCH, "search")
+   S_(SECCLASS_DIR, DIR__RMDIR, "rmdir")
+   S_(SECCLASS_FILE, FILE__EXECUTE_NO_TRANS, "execute_no_trans")
+   S_(SECCLASS_FILE, FILE__ENTRYPOINT, "entrypoint")
+   S_(SECCLASS_FILE, FILE__EXECMOD, "execmod")
+   S_(SECCLASS_FD, FD__USE, "use")
+   S_(SECCLASS_TCP_SOCKET, TCP_SOCKET__CONNECTTO, "connectto")
+   S_(SECCLASS_TCP_SOCKET, TCP_SOCKET__NEWCONN, "newconn")
+   S_(SECCLASS_TCP_SOCKET, TCP_SOCKET__ACCEPTFROM, "acceptfrom")
+   S_(SECCLASS_TCP_SOCKET, TCP_SOCKET__NODE_BIND, "node_bind")
+   S_(SECCLASS_UDP_SOCKET, UDP_SOCKET__NODE_BIND, "node_bind")
+   S_(SECCLASS_RAWIP_SOCKET, RAWIP_SOCKET__NODE_BIND, "node_bind")
+   S_(SECCLASS_NODE, NODE__TCP_RECV, "tcp_recv")
+   S_(SECCLASS_NODE, NODE__TCP_SEND, "tcp_send")
+   S_(SECCLASS_NODE, NODE__UDP_RECV, "udp_recv")
+   S_(SECCLASS_NODE, NODE__UDP_SEND, "udp_send")
+   S_(SECCLASS_NODE, NODE__RAWIP_RECV, "rawip_recv")
+   S_(SECCLASS_NODE, NODE__RAWIP_SEND, "rawip_send")
+   S_(SECCLASS_NODE, NODE__ENFORCE_DEST, "enforce_dest")
+   S_(SECCLASS_NETIF, NETIF__TCP_RECV, "tcp_recv")
+   S_(SECCLASS_NETIF, NETIF__TCP_SEND, "tcp_send")
+   S_(SECCLASS_NETIF, NETIF__UDP_RECV, "udp_recv")
+   S_(SECCLASS_NETIF, NETIF__UDP_SEND, "udp_send")
+   S_(SECCLASS_NETIF, NETIF__RAWIP_RECV, "rawip_recv")
+   S_(SECCLASS_NETIF, NETIF__RAWIP_SEND, "rawip_send")
+   S_(SECCLASS_UNIX_STREAM_SOCKET, UNIX_STREAM_SOCKET__CONNECTTO, "connectto")
+   S_(SECCLASS_UNIX_STREAM_SOCKET, UNIX_STREAM_SOCKET__NEWCONN, "newconn")
+   S_(SECCLASS_UNIX_STREAM_SOCKET, UNIX_STREAM_SOCKET__ACCEPTFROM, "acceptfrom")
+   S_(SECCLASS_PROCESS, PROCESS__FORK, "fork")
+   S_(SECCLASS_PROCESS, PROCESS__TRANSITION, "transition")
+   S_(SECCLASS_PROCESS, PROCESS__SIGCHLD, "sigchld")
+   S_(SECCLASS_PROCESS, PROCESS__SIGKILL, "sigkill")
+   S_(SECCLASS_PROCESS, PROCESS__SIGSTOP, "sigstop")
+   S_(SECCLASS_PROCESS, PROCESS__SIGNULL, "signull")
+   S_(SECCLASS_PROCESS, PROCESS__SIGNAL, "signal")
+   S_(SECCLASS_PROCESS, PROCESS__PTRACE, "ptrace")
+   S_(SECCLASS_PROCESS, PROCESS__GETSCHED, "getsched")
+   S_(SECCLASS_PROCESS, PROCESS__SETSCHED, "setsched")
+   S_(SECCLASS_PROCESS, PROCESS__GETSESSION, "getsession")
+   S_(SECCLASS_PROCESS, PROCESS__GETPGID, "getpgid")
+   S_(SECCLASS_PROCESS, PROCESS__SETPGID, "setpgid")
+   S_(SECCLASS_PROCESS, PROCESS__GETCAP, "getcap")
+   S_(SECCLASS_PROCESS, PROCESS__SETCAP, "setcap")
+   S_(SECCLASS_PROCESS, PROCESS__SHARE, "share")
+   S_(SECCLASS_PROCESS, PROCESS__GETATTR, "getattr")
+   S_(SECCLASS_PROCESS, PROCESS__SETEXEC, "setexec")
+   S_(SECCLASS_PROCESS, PROCESS__SETFSCREATE, "setfscreate")
+   S_(SECCLASS_PROCESS, PROCESS__NOATSECURE, "noatsecure")
+   S_(SECCLASS_PROCESS, PROCESS__SIGINH, "siginh")
+   S_(SECCLASS_PROCESS, PROCESS__SETRLIMIT, "setrlimit")
+   S_(SECCLASS_PROCESS, PROCESS__RLIMITINH, "rlimitinh")
+   S_(SECCLASS_PROCESS, PROCESS__DYNTRANSITION, "dyntransition")
+   S_(SECCLASS_PROCESS, PROCESS__SETCURRENT, "setcurrent")
+   S_(SECCLASS_PROCESS, PROCESS__EXECMEM, "execmem")
+   S_(SECCLASS_MSGQ, MSGQ__ENQUEUE, "enqueue")
+   S_(SECCLASS_MSG, MSG__SEND, "send")
+   S_(SECCLASS_MSG, MSG__RECEIVE, "receive")
+   S_(SECCLASS_SHM, SHM__LOCK, "lock")
+   S_(SECCLASS_SECURITY, SECURITY__COMPUTE_AV, "compute_av")
+   S_(SECCLASS_SECURITY, SECURITY__COMPUTE_CREATE, "compute_create")
+   S_(SECCLASS_SECURITY, SECURITY__COMPUTE_MEMBER, "compute_member")
+   S_(SECCLASS_SECURITY, SECURITY__CHECK_CONTEXT, "check_context")
+   S_(SECCLASS_SECURITY, SECURITY__LOAD_POLICY, "load_policy")
+   S_(SECCLASS_SECURITY, SECURITY__COMPUTE_RELABEL, "compute_relabel")
+   S_(SECCLASS_SECURITY, SECURITY__COMPUTE_USER, "compute_user")
+   S_(SECCLASS_SECURITY, SECURITY__SETENFORCE, "setenforce")
+   S_(SECCLASS_SECURITY, SECURITY__SETBOOL, "setbool")
+   S_(SECCLASS_SECURITY, SECURITY__SETSECPARAM, "setsecparam")
+   S_(SECCLASS_SYSTEM, SYSTEM__IPC_INFO, "ipc_info")
+   S_(SECCLASS_SYSTEM, SYSTEM__SYSLOG_READ, "syslog_read")
+   S_(SECCLASS_SYSTEM, SYSTEM__SYSLOG_MOD, "syslog_mod")
+   S_(SECCLASS_SYSTEM, SYSTEM__SYSLOG_CONSOLE, "syslog_console")
+   S_(SECCLASS_CAPABILITY, CAPABILITY__CHOWN, "chown")
+   S_(SECCLASS_CAPABILITY, CAPABILITY__DAC_OVERRIDE, "dac_override")
+   S_(SECCLASS_CAPABILITY, CAPABILITY__DAC_READ_SEARCH, "dac_read_search")
+   S_(SECCLASS_CAPABILITY, CAPABILITY__FOWNER, "fowner")
+   S_(SECCLASS_CAPABILITY, CAPABILITY__FSETID, "fsetid")
+   S_(SECCLASS_CAPABILITY, CAPABILITY__KILL, "kill")
+   S_(SECCLASS_CAPABILITY, CAPABILITY__SETGID, "setgid")
+   S_(SECCLASS_CAPABILITY, CAPABILITY__SETUID, "setuid")
+   S_(SECCLASS_CAPABILITY, CAPABILITY__SETPCAP, "setpcap")
+   S_(SECCLASS_CAPABILITY, CAPABILITY__LINUX_IMMUTABLE, "linux_immutable")
+   S_(SECCLASS_CAPABILITY, CAPABILITY__NET_BIND_SERVICE, "net_bind_service")
+   S_(SECCLASS_CAPABILITY, CAPABILITY__NET_BROADCAST, "net_broadcast")
+   S_(SECCLASS_CAPABILITY, CAPABILITY__NET_ADMIN, "net_admin")
+   S_(SECCLASS_CAPABILITY, CAPABILITY__NET_RAW, "net_raw")
+   S_(SECCLASS_CAPABILITY, CAPABILITY__IPC_LOCK, "ipc_lock")
+   S_(SECCLASS_CAPABILITY, CAPABILITY__IPC_OWNER, "ipc_owner")
+   S_(SECCLASS_CAPABILITY, CAPABILITY__SYS_MODULE, "sys_module")
+   S_(SECCLASS_CAPABILITY, CAPABILITY__SYS_RAWIO, "sys_rawio")
+   S_(SECCLASS_CAPABILITY, CAPABILITY__SYS_CHROOT, "sys_chroot")
+   S_(SECCLASS_CAPABILITY, CAPABILITY__SYS_PTRACE, "sys_ptrace")
+   S_(SECCLASS_CAPABILITY, CAPABILITY__SYS_PACCT, "sys_pacct")
+   S_(SECCLASS_CAPABILITY, CAPABILITY__SYS_ADMIN, "sys_admin")
+   S_(SECCLASS_CAPABILITY, CAPABILITY__SYS_BOOT, "sys_boot")
+   S_(SECCLASS_CAPABILITY, CAPABILITY__SYS_NICE, "sys_nice")
+   S_(SECCLASS_CAPABILITY, CAPABILITY__SYS_RESOURCE, "sys_resource")
+   S_(SECCLASS_CAPABILITY, CAPABILITY__SYS_TIME, "sys_time")
+   S_(SECCLASS_CAPABILITY, CAPABILITY__SYS_TTY_CONFIG, "sys_tty_config")
+   S_(SECCLASS_CAPABILITY, CAPABILITY__MKNOD, "mknod")
+   S_(SECCLASS_CAPABILITY, CAPABILITY__LEASE, "lease")
+   S_(SECCLASS_PASSWD, PASSWD__PASSWD, "passwd")
+   S_(SECCLASS_PASSWD, PASSWD__CHFN, "chfn")
+   S_(SECCLASS_PASSWD, PASSWD__CHSH, "chsh")
+   S_(SECCLASS_PASSWD, PASSWD__ROOTOK, "rootok")
+   S_(SECCLASS_PASSWD, PASSWD__CRONTAB, "crontab")
+   S_(SECCLASS_DRAWABLE, DRAWABLE__CREATE, "create")
+   S_(SECCLASS_DRAWABLE, DRAWABLE__DESTROY, "destroy")
+   S_(SECCLASS_DRAWABLE, DRAWABLE__DRAW, "draw")
+   S_(SECCLASS_DRAWABLE, DRAWABLE__COPY, "copy")
+   S_(SECCLASS_DRAWABLE, DRAWABLE__GETATTR, "getattr")
+   S_(SECCLASS_GC, GC__CREATE, "create")
+   S_(SECCLASS_GC, GC__FREE, "free")
+   S_(SECCLASS_GC, GC__GETATTR, "getattr")
+   S_(SECCLASS_GC, GC__SETATTR, "setattr")
+   S_(SECCLASS_WINDOW, WINDOW__ADDCHILD, "addchild")
+   S_(SECCLASS_WINDOW, WINDOW__CREATE, "create")
+   S_(SECCLASS_WINDOW, WINDOW__DESTROY, "destroy")
+   S_(SECCLASS_WINDOW, WINDOW__MAP, "map")
+   S_(SECCLASS_WINDOW, WINDOW__UNMAP, "unmap")
+   S_(SECCLASS_WINDOW, WINDOW__CHSTACK, "chstack")
+   S_(SECCLASS_WINDOW, WINDOW__CHPROPLIST, "chproplist")
+   S_(SECCLASS_WINDOW, WINDOW__CHPROP, "chprop")
+   S_(SECCLASS_WINDOW, WINDOW__LISTPROP, "listprop")
+   S_(SECCLASS_WINDOW, WINDOW__GETATTR, "getattr")
+   S_(SECCLASS_WINDOW, WINDOW__SETATTR, "setattr")
+   S_(SECCLASS_WINDOW, WINDOW__SETFOCUS, "setfocus")
+   S_(SECCLASS_WINDOW, WINDOW__MOVE, "move")
+   S_(SECCLASS_WINDOW, WINDOW__CHSELECTION, "chselection")
+   S_(SECCLASS_WINDOW, WINDOW__CHPARENT, "chparent")
+   S_(SECCLASS_WINDOW, WINDOW__CTRLLIFE, "ctrllife")
+   S_(SECCLASS_WINDOW, WINDOW__ENUMERATE, "enumerate")
+   S_(SECCLASS_WINDOW, WINDOW__TRANSPARENT, "transparent")
+   S_(SECCLASS_WINDOW, WINDOW__MOUSEMOTION, "mousemotion")
+   S_(SECCLASS_WINDOW, WINDOW__CLIENTCOMEVENT, "clientcomevent")
+   S_(SECCLASS_WINDOW, WINDOW__INPUTEVENT, "inputevent")
+   S_(SECCLASS_WINDOW, WINDOW__DRAWEVENT, "drawevent")
+   S_(SECCLASS_WINDOW, WINDOW__WINDOWCHANGEEVENT, "windowchangeevent")
+   S_(SECCLASS_WINDOW, WINDOW__WINDOWCHANGEREQUEST, "windowchangerequest")
+   S_(SECCLASS_WINDOW, WINDOW__SERVERCHANGEEVENT, "serverchangeevent")
+   S_(SECCLASS_WINDOW, WINDOW__EXTENSIONEVENT, "extensionevent")
+   S_(SECCLASS_FONT, FONT__LOAD, "load")
+   S_(SECCLASS_FONT, FONT__FREE, "free")
+   S_(SECCLASS_FONT, FONT__GETATTR, "getattr")
+   S_(SECCLASS_FONT, FONT__USE, "use")
+   S_(SECCLASS_COLORMAP, COLORMAP__CREATE, "create")
+   S_(SECCLASS_COLORMAP, COLORMAP__FREE, "free")
+   S_(SECCLASS_COLORMAP, COLORMAP__INSTALL, "install")
+   S_(SECCLASS_COLORMAP, COLORMAP__UNINSTALL, "uninstall")
+   S_(SECCLASS_COLORMAP, COLORMAP__LIST, "list")
+   S_(SECCLASS_COLORMAP, COLORMAP__READ, "read")
+   S_(SECCLASS_COLORMAP, COLORMAP__STORE, "store")
+   S_(SECCLASS_COLORMAP, COLORMAP__GETATTR, "getattr")
+   S_(SECCLASS_COLORMAP, COLORMAP__SETATTR, "setattr")
+   S_(SECCLASS_PROPERTY, PROPERTY__CREATE, "create")
+   S_(SECCLASS_PROPERTY, PROPERTY__FREE, "free")
+   S_(SECCLASS_PROPERTY, PROPERTY__READ, "read")
+   S_(SECCLASS_PROPERTY, PROPERTY__WRITE, "write")
+   S_(SECCLASS_CURSOR, CURSOR__CREATE, "create")
+   S_(SECCLASS_CURSOR, CURSOR__CREATEGLYPH, "createglyph")
+   S_(SECCLASS_CURSOR, CURSOR__FREE, "free")
+   S_(SECCLASS_CURSOR, CURSOR__ASSIGN, "assign")
+   S_(SECCLASS_CURSOR, CURSOR__SETATTR, "setattr")
+   S_(SECCLASS_XCLIENT, XCLIENT__KILL, "kill")
+   S_(SECCLASS_XINPUT, XINPUT__LOOKUP, "lookup")
+   S_(SECCLASS_XINPUT, XINPUT__GETATTR, "getattr")
+   S_(SECCLASS_XINPUT, XINPUT__SETATTR, "setattr")
+   S_(SECCLASS_XINPUT, XINPUT__SETFOCUS, "setfocus")
+   S_(SECCLASS_XINPUT, XINPUT__WARPPOINTER, "warppointer")
+   S_(SECCLASS_XINPUT, XINPUT__ACTIVEGRAB, "activegrab")
+   S_(SECCLASS_XINPUT, XINPUT__PASSIVEGRAB, "passivegrab")
+   S_(SECCLASS_XINPUT, XINPUT__UNGRAB, "ungrab")
+   S_(SECCLASS_XINPUT, XINPUT__BELL, "bell")
+   S_(SECCLASS_XINPUT, XINPUT__MOUSEMOTION, "mousemotion")
+   S_(SECCLASS_XINPUT, XINPUT__RELABELINPUT, "relabelinput")
+   S_(SECCLASS_XSERVER, XSERVER__SCREENSAVER, "screensaver")
+   S_(SECCLASS_XSERVER, XSERVER__GETHOSTLIST, "gethostlist")
+   S_(SECCLASS_XSERVER, XSERVER__SETHOSTLIST, "sethostlist")
+   S_(SECCLASS_XSERVER, XSERVER__GETFONTPATH, "getfontpath")
+   S_(SECCLASS_XSERVER, XSERVER__SETFONTPATH, "setfontpath")
+   S_(SECCLASS_XSERVER, XSERVER__GETATTR, "getattr")
+   S_(SECCLASS_XSERVER, XSERVER__GRAB, "grab")
+   S_(SECCLASS_XSERVER, XSERVER__UNGRAB, "ungrab")
+   S_(SECCLASS_XEXTENSION, XEXTENSION__QUERY, "query")
+   S_(SECCLASS_XEXTENSION, XEXTENSION__USE, "use")
+   S_(SECCLASS_PAX, PAX__PAGEEXEC, "pageexec")
+   S_(SECCLASS_PAX, PAX__EMUTRAMP, "emutramp")
+   S_(SECCLASS_PAX, PAX__MPROTECT, "mprotect")
+   S_(SECCLASS_PAX, PAX__RANDMMAP, "randmmap")
+   S_(SECCLASS_PAX, PAX__RANDEXEC, "randexec")
+   S_(SECCLASS_PAX, PAX__SEGMEXEC, "segmexec")
+   S_(SECCLASS_NETLINK_ROUTE_SOCKET, NETLINK_ROUTE_SOCKET__NLMSG_READ, "nlmsg_read")
+   S_(SECCLASS_NETLINK_ROUTE_SOCKET, NETLINK_ROUTE_SOCKET__NLMSG_WRITE, "nlmsg_write")
+   S_(SECCLASS_NETLINK_FIREWALL_SOCKET, NETLINK_FIREWALL_SOCKET__NLMSG_READ, "nlmsg_read")
+   S_(SECCLASS_NETLINK_FIREWALL_SOCKET, NETLINK_FIREWALL_SOCKET__NLMSG_WRITE, "nlmsg_write")
+   S_(SECCLASS_NETLINK_TCPDIAG_SOCKET, NETLINK_TCPDIAG_SOCKET__NLMSG_READ, "nlmsg_read")
+   S_(SECCLASS_NETLINK_TCPDIAG_SOCKET, NETLINK_TCPDIAG_SOCKET__NLMSG_WRITE, "nlmsg_write")
+   S_(SECCLASS_NETLINK_XFRM_SOCKET, NETLINK_XFRM_SOCKET__NLMSG_READ, "nlmsg_read")
+   S_(SECCLASS_NETLINK_XFRM_SOCKET, NETLINK_XFRM_SOCKET__NLMSG_WRITE, "nlmsg_write")
+   S_(SECCLASS_NETLINK_AUDIT_SOCKET, NETLINK_AUDIT_SOCKET__NLMSG_READ, "nlmsg_read")
+   S_(SECCLASS_NETLINK_AUDIT_SOCKET, NETLINK_AUDIT_SOCKET__NLMSG_WRITE, "nlmsg_write")
+   S_(SECCLASS_NETLINK_IP6FW_SOCKET, NETLINK_IP6FW_SOCKET__NLMSG_READ, "nlmsg_read")
+   S_(SECCLASS_NETLINK_IP6FW_SOCKET, NETLINK_IP6FW_SOCKET__NLMSG_WRITE, "nlmsg_write")
+   S_(SECCLASS_DBUS, DBUS__ACQUIRE_SVC, "acquire_svc")
+   S_(SECCLASS_DBUS, DBUS__SEND_MSG, "send_msg")
+   S_(SECCLASS_NSCD, NSCD__GETPWD, "getpwd")
+   S_(SECCLASS_NSCD, NSCD__GETGRP, "getgrp")
+   S_(SECCLASS_NSCD, NSCD__GETHOST, "gethost")
+   S_(SECCLASS_NSCD, NSCD__GETSTAT, "getstat")
+   S_(SECCLASS_NSCD, NSCD__ADMIN, "admin")
+   S_(SECCLASS_NSCD, NSCD__SHMEMPWD, "shmempwd")
+   S_(SECCLASS_NSCD, NSCD__SHMEMGRP, "shmemgrp")
+   S_(SECCLASS_NSCD, NSCD__SHMEMHOST, "shmemhost")
diff -Nru a/security/selinux/include/av_permissions.h b/security/selinux/include/av_permissions.h
--- a/security/selinux/include/av_permissions.h	2005-01-10 20:11:24 -08:00
+++ b/security/selinux/include/av_permissions.h	2005-01-10 20:11:24 -08:00
@@ -1,6 +1,4 @@
 /* This file is automatically generated.  Do not edit. */
-/* FLASK */
-
 #define COMMON_FILE__IOCTL                               0x00000001UL
 #define COMMON_FILE__READ                                0x00000002UL
 #define COMMON_FILE__WRITE                               0x00000004UL
@@ -107,6 +105,7 @@
 
 #define FILE__EXECUTE_NO_TRANS                    0x00020000UL
 #define FILE__ENTRYPOINT                          0x00040000UL
+#define FILE__EXECMOD                             0x00080000UL
 
 #define LNK_FILE__IOCTL                           0x00000001UL
 #define LNK_FILE__READ                            0x00000002UL
@@ -458,6 +457,9 @@
 #define PROCESS__SIGINH                           0x00100000UL
 #define PROCESS__SETRLIMIT                        0x00200000UL
 #define PROCESS__RLIMITINH                        0x00400000UL
+#define PROCESS__DYNTRANSITION                    0x00800000UL
+#define PROCESS__SETCURRENT                       0x01000000UL
+#define PROCESS__EXECMEM                          0x02000000UL
 
 #define IPC__CREATE                               0x00000001UL
 #define IPC__DESTROY                              0x00000002UL
@@ -515,6 +517,7 @@
 #define SECURITY__COMPUTE_USER                    0x00000040UL
 #define SECURITY__SETENFORCE                      0x00000080UL
 #define SECURITY__SETBOOL                         0x00000100UL
+#define SECURITY__SETSECPARAM                     0x00000200UL
 
 #define SYSTEM__IPC_INFO                          0x00000001UL
 #define SYSTEM__SYSLOG_READ                       0x00000002UL
@@ -555,6 +558,7 @@
 #define PASSWD__CHFN                              0x00000002UL
 #define PASSWD__CHSH                              0x00000004UL
 #define PASSWD__ROOTOK                            0x00000008UL
+#define PASSWD__CRONTAB                           0x00000010UL
 
 #define DRAWABLE__CREATE                          0x00000001UL
 #define DRAWABLE__DESTROY                         0x00000002UL
@@ -876,5 +880,17 @@
 #define NETLINK_DNRT_SOCKET__SENDTO               0x00040000UL
 #define NETLINK_DNRT_SOCKET__RECV_MSG             0x00080000UL
 #define NETLINK_DNRT_SOCKET__SEND_MSG             0x00100000UL
+#define NETLINK_DNRT_SOCKET__NAME_BIND            0x00200000UL
+
+#define DBUS__ACQUIRE_SVC                         0x00000001UL
+#define DBUS__SEND_MSG                            0x00000002UL
+
+#define NSCD__GETPWD                              0x00000001UL
+#define NSCD__GETGRP                              0x00000002UL
+#define NSCD__GETHOST                             0x00000004UL
+#define NSCD__GETSTAT                             0x00000008UL
+#define NSCD__ADMIN                               0x00000010UL
+#define NSCD__SHMEMPWD                            0x00000020UL
+#define NSCD__SHMEMGRP                            0x00000040UL
+#define NSCD__SHMEMHOST                           0x00000080UL
 
-/* FLASK */
diff -Nru a/security/selinux/include/avc.h b/security/selinux/include/avc.h
--- a/security/selinux/include/avc.h	2005-01-10 20:11:17 -08:00
+++ b/security/selinux/include/avc.h	2005-01-10 20:11:17 -08:00
@@ -29,19 +29,6 @@
  */
 struct avc_entry;
 
-/*
- * A reference to an AVC entry.
- */
-struct avc_entry_ref {
-	struct avc_entry *ae;
-};
-
-/* Initialize an AVC entry reference before first use. */
-static inline void avc_entry_ref_init(struct avc_entry_ref *h)
-{
-	h->ae = NULL;
-}
-
 struct task_struct;
 struct vfsmount;
 struct dentry;
@@ -95,15 +82,15 @@
 /*
  * AVC statistics
  */
-#define AVC_ENTRY_LOOKUPS        0
-#define AVC_ENTRY_HITS	         1
-#define AVC_ENTRY_MISSES         2
-#define AVC_ENTRY_DISCARDS       3
-#define AVC_CAV_LOOKUPS          4
-#define AVC_CAV_HITS             5
-#define AVC_CAV_PROBES           6
-#define AVC_CAV_MISSES           7
-#define AVC_NSTATS               8
+struct avc_cache_stats
+{
+	unsigned int lookups;
+	unsigned int hits;
+	unsigned int misses;
+	unsigned int allocations;
+	unsigned int reclaims;
+	unsigned int frees;
+};
 
 /*
  * AVC display support
@@ -118,23 +105,17 @@
 
 void __init avc_init(void);
 
-int avc_lookup(u32 ssid, u32 tsid, u16 tclass,
-               u32 requested, struct avc_entry_ref *aeref);
-
-int avc_insert(u32 ssid, u32 tsid, u16 tclass,
-               struct avc_entry *ae, struct avc_entry_ref *out_aeref);
-
 void avc_audit(u32 ssid, u32 tsid,
                u16 tclass, u32 requested,
                struct av_decision *avd, int result, struct avc_audit_data *auditdata);
 
 int avc_has_perm_noaudit(u32 ssid, u32 tsid,
                          u16 tclass, u32 requested,
-                         struct avc_entry_ref *aeref, struct av_decision *avd);
+                         struct av_decision *avd);
 
 int avc_has_perm(u32 ssid, u32 tsid,
                  u16 tclass, u32 requested,
-                 struct avc_entry_ref *aeref, struct avc_audit_data *auditdata);
+                 struct avc_audit_data *auditdata);
 
 #define AVC_CALLBACK_GRANT		1
 #define AVC_CALLBACK_TRY_REVOKE		2
@@ -150,6 +131,14 @@
 				     u32 *out_retained),
 		     u32 events, u32 ssid, u32 tsid,
 		     u16 tclass, u32 perms);
+
+/* Exported to selinuxfs */
+int avc_get_hash_stats(char *page);
+extern unsigned int avc_cache_threshold;
+
+#ifdef CONFIG_SECURITY_SELINUX_AVC_STATS
+DECLARE_PER_CPU(struct avc_cache_stats, avc_cache_stats);
+#endif
 
 #endif /* _SELINUX_AVC_H_ */
 
diff -Nru a/security/selinux/include/class_to_string.h b/security/selinux/include/class_to_string.h
--- a/security/selinux/include/class_to_string.h	2005-01-10 20:11:24 -08:00
+++ b/security/selinux/include/class_to_string.h	2005-01-10 20:11:24 -08:00
@@ -2,59 +2,57 @@
 /*
  * Security object class definitions
  */
-static char *class_to_string[] =
-{
-    "null",
-    "security",
-    "process",
-    "system",
-    "capability",
-    "filesystem",
-    "file",
-    "dir",
-    "fd",
-    "lnk_file",
-    "chr_file",
-    "blk_file",
-    "sock_file",
-    "fifo_file",
-    "socket",
-    "tcp_socket",
-    "udp_socket",
-    "rawip_socket",
-    "node",
-    "netif",
-    "netlink_socket",
-    "packet_socket",
-    "key_socket",
-    "unix_stream_socket",
-    "unix_dgram_socket",
-    "sem",
-    "msg",
-    "msgq",
-    "shm",
-    "ipc",
-    "passwd",
-    "drawable",
-    "window",
-    "gc",
-    "font",
-    "colormap",
-    "property",
-    "cursor",
-    "xclient",
-    "xinput",
-    "xserver",
-    "xextension",
-    "pax",
-    "netlink_route_socket",
-    "netlink_firewall_socket",
-    "netlink_tcpdiag_socket",
-    "netlink_nflog_socket",
-    "netlink_xfrm_socket",
-    "netlink_selinux_socket",
-    "netlink_audit_socket",
-    "netlink_ip6fw_socket",
-    "netlink_dnrt_socket",
-};
-
+    S_("null")
+    S_("security")
+    S_("process")
+    S_("system")
+    S_("capability")
+    S_("filesystem")
+    S_("file")
+    S_("dir")
+    S_("fd")
+    S_("lnk_file")
+    S_("chr_file")
+    S_("blk_file")
+    S_("sock_file")
+    S_("fifo_file")
+    S_("socket")
+    S_("tcp_socket")
+    S_("udp_socket")
+    S_("rawip_socket")
+    S_("node")
+    S_("netif")
+    S_("netlink_socket")
+    S_("packet_socket")
+    S_("key_socket")
+    S_("unix_stream_socket")
+    S_("unix_dgram_socket")
+    S_("sem")
+    S_("msg")
+    S_("msgq")
+    S_("shm")
+    S_("ipc")
+    S_("passwd")
+    S_("drawable")
+    S_("window")
+    S_("gc")
+    S_("font")
+    S_("colormap")
+    S_("property")
+    S_("cursor")
+    S_("xclient")
+    S_("xinput")
+    S_("xserver")
+    S_("xextension")
+    S_("pax")
+    S_("netlink_route_socket")
+    S_("netlink_firewall_socket")
+    S_("netlink_tcpdiag_socket")
+    S_("netlink_nflog_socket")
+    S_("netlink_xfrm_socket")
+    S_("netlink_selinux_socket")
+    S_("netlink_audit_socket")
+    S_("netlink_ip6fw_socket")
+    S_("netlink_dnrt_socket")
+    S_("dbus")
+    S_("nscd")
diff -Nru a/security/selinux/include/common_perm_to_string.h b/security/selinux/include/common_perm_to_string.h
--- a/security/selinux/include/common_perm_to_string.h	2005-01-10 20:11:18 -08:00
+++ b/security/selinux/include/common_perm_to_string.h	2005-01-10 20:11:18 -08:00
@@ -1,65 +1,58 @@
 /* This file is automatically generated.  Do not edit. */
-/* FLASK */
+TB_(common_file_perm_to_string)
+    S_("ioctl")
+    S_("read")
+    S_("write")
+    S_("create")
+    S_("getattr")
+    S_("setattr")
+    S_("lock")
+    S_("relabelfrom")
+    S_("relabelto")
+    S_("append")
+    S_("unlink")
+    S_("link")
+    S_("rename")
+    S_("execute")
+    S_("swapon")
+    S_("quotaon")
+    S_("mounton")
+TE_(common_file_perm_to_string)
 
-static char *common_file_perm_to_string[] =
-{
-    "ioctl",
-    "read",
-    "write",
-    "create",
-    "getattr",
-    "setattr",
-    "lock",
-    "relabelfrom",
-    "relabelto",
-    "append",
-    "unlink",
-    "link",
-    "rename",
-    "execute",
-    "swapon",
-    "quotaon",
-    "mounton",
-};
+TB_(common_socket_perm_to_string)
+    S_("ioctl")
+    S_("read")
+    S_("write")
+    S_("create")
+    S_("getattr")
+    S_("setattr")
+    S_("lock")
+    S_("relabelfrom")
+    S_("relabelto")
+    S_("append")
+    S_("bind")
+    S_("connect")
+    S_("listen")
+    S_("accept")
+    S_("getopt")
+    S_("setopt")
+    S_("shutdown")
+    S_("recvfrom")
+    S_("sendto")
+    S_("recv_msg")
+    S_("send_msg")
+    S_("name_bind")
+TE_(common_socket_perm_to_string)
 
-static char *common_socket_perm_to_string[] =
-{
-    "ioctl",
-    "read",
-    "write",
-    "create",
-    "getattr",
-    "setattr",
-    "lock",
-    "relabelfrom",
-    "relabelto",
-    "append",
-    "bind",
-    "connect",
-    "listen",
-    "accept",
-    "getopt",
-    "setopt",
-    "shutdown",
-    "recvfrom",
-    "sendto",
-    "recv_msg",
-    "send_msg",
-    "name_bind",
-};
+TB_(common_ipc_perm_to_string)
+    S_("create")
+    S_("destroy")
+    S_("getattr")
+    S_("setattr")
+    S_("read")
+    S_("write")
+    S_("associate")
+    S_("unix_read")
+    S_("unix_write")
+TE_(common_ipc_perm_to_string)
 
-static char *common_ipc_perm_to_string[] =
-{
-    "create",
-    "destroy",
-    "getattr",
-    "setattr",
-    "read",
-    "write",
-    "associate",
-    "unix_read",
-    "unix_write",
-};
-
-
-/* FLASK */
diff -Nru a/security/selinux/include/flask.h b/security/selinux/include/flask.h
--- a/security/selinux/include/flask.h	2005-01-10 20:11:20 -08:00
+++ b/security/selinux/include/flask.h	2005-01-10 20:11:20 -08:00
@@ -56,6 +56,8 @@
 #define SECCLASS_NETLINK_AUDIT_SOCKET                    49
 #define SECCLASS_NETLINK_IP6FW_SOCKET                    50
 #define SECCLASS_NETLINK_DNRT_SOCKET                     51
+#define SECCLASS_DBUS                                    52
+#define SECCLASS_NSCD                                    53
 
 /*
  * Security identifier indices for initial entities
diff -Nru a/security/selinux/include/objsec.h b/security/selinux/include/objsec.h
--- a/security/selinux/include/objsec.h	2005-01-10 20:11:18 -08:00
+++ b/security/selinux/include/objsec.h	2005-01-10 20:11:18 -08:00
@@ -33,7 +33,6 @@
 	u32 sid;             /* current SID */
 	u32 exec_sid;        /* exec SID */
 	u32 create_sid;      /* fscreate SID */
-        struct avc_entry_ref avcr;     /* reference to process permissions */
 	u32 ptrace_sid;      /* SID of ptrace parent */
 };
 
@@ -44,7 +43,6 @@
 	u32 task_sid;        /* SID of creating task */
 	u32 sid;             /* SID of this object */
 	u16 sclass;       /* security class of this object */
-	struct avc_entry_ref avcr;     /* reference to object permissions */
 	unsigned char initialized;     /* initialization flag */
 	struct semaphore sem;
 	unsigned char inherit;         /* inherit SID from parent entry */
@@ -55,8 +53,6 @@
 	struct file *file;              /* back pointer to file object */
 	u32 sid;              /* SID of open file description */
 	u32 fown_sid;         /* SID of file owner (for SIGIO) */
-	struct avc_entry_ref avcr;	/* reference to fd permissions */
-	struct avc_entry_ref inode_avcr;     /* reference to object permissions */
 };
 
 struct superblock_security_struct {
@@ -77,7 +73,6 @@
         unsigned long magic;		/* magic number for this module */
 	struct msg_msg *msg;		/* back pointer */
 	u32 sid;              /* SID of message */
-        struct avc_entry_ref avcr;	/* reference to permissions */
 };
 
 struct ipc_security_struct {
@@ -85,7 +80,6 @@
 	struct kern_ipc_perm *ipc_perm; /* back pointer */
 	u16 sclass;	/* security class of this object */
 	u32 sid;              /* SID of IPC resource */
-        struct avc_entry_ref avcr;	/* reference to permissions */
 };
 
 struct bprm_security_struct {
diff -Nru a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c
--- a/security/selinux/selinuxfs.c	2005-01-10 20:11:23 -08:00
+++ b/security/selinux/selinuxfs.c	2005-01-10 20:11:23 -08:00
@@ -3,6 +3,7 @@
  * 	Added conditional policy language extensions
  *
  * Copyright (C) 2003 - 2004 Tresys Technology, LLC
+ * Copyright (C) 2004 Red Hat, Inc., James Morris <jmorris@redhat.com>
  *	This program is free software; you can redistribute it and/or modify
  *  	it under the terms of the GNU General Public License as published by
  *	the Free Software Foundation, version 2.
@@ -18,6 +19,8 @@
 #include <linux/string.h>
 #include <linux/security.h>
 #include <linux/major.h>
+#include <linux/seq_file.h>
+#include <linux/percpu.h>
 #include <asm/uaccess.h>
 #include <asm/semaphore.h>
 
@@ -51,7 +54,7 @@
 		return -EACCES;
 
 	return avc_has_perm(tsec->sid, SECINITSID_SECURITY,
-			    SECCLASS_SECURITY, perms, NULL, NULL);
+			    SECCLASS_SECURITY, perms, NULL);
 }
 
 enum sel_inos {
@@ -66,7 +69,9 @@
 	SEL_POLICYVERS,	/* return policy version for this kernel */
 	SEL_COMMIT_BOOLS, /* commit new boolean values */
 	SEL_MLS,	/* return if MLS policy is enabled */
-	SEL_DISABLE	/* disable SELinux until next reboot */
+	SEL_DISABLE,	/* disable SELinux until next reboot */
+	SEL_AVC,	/* AVC management directory */
+	SEL_MEMBER,	/* compute polyinstantiation membership decision */
 };
 
 #define TMPBUFLEN	12
@@ -303,12 +308,14 @@
 static ssize_t sel_write_create(struct file * file, char *buf, size_t size);
 static ssize_t sel_write_relabel(struct file * file, char *buf, size_t size);
 static ssize_t sel_write_user(struct file * file, char *buf, size_t size);
+static ssize_t sel_write_member(struct file * file, char *buf, size_t size);
 
 static ssize_t (*write_op[])(struct file *, char *, size_t) = {
 	[SEL_ACCESS] = sel_write_access,
 	[SEL_CREATE] = sel_write_create,
 	[SEL_RELABEL] = sel_write_relabel,
 	[SEL_USER] = sel_write_user,
+	[SEL_MEMBER] = sel_write_member,
 };
 
 static ssize_t selinux_transaction_write(struct file *file, const char __user *buf, size_t size, loff_t *pos)
@@ -578,6 +585,67 @@
 	return length;
 }
 
+static ssize_t sel_write_member(struct file * file, char *buf, size_t size)
+{
+	char *scon, *tcon;
+	u32 ssid, tsid, newsid;
+	u16 tclass;
+	ssize_t length;
+	char *newcon;
+	u32 len;
+
+	length = task_has_security(current, SECURITY__COMPUTE_MEMBER);
+	if (length)
+		return length;
+
+	length = -ENOMEM;
+	scon = kmalloc(size+1, GFP_KERNEL);
+	if (!scon)
+		return length;
+	memset(scon, 0, size+1);
+
+	tcon = kmalloc(size+1, GFP_KERNEL);
+	if (!tcon)
+		goto out;
+	memset(tcon, 0, size+1);
+
+	length = -EINVAL;
+	if (sscanf(buf, "%s %s %hu", scon, tcon, &tclass) != 3)
+		goto out2;
+
+	length = security_context_to_sid(scon, strlen(scon)+1, &ssid);
+	if (length < 0)
+		goto out2;
+	length = security_context_to_sid(tcon, strlen(tcon)+1, &tsid);
+	if (length < 0)
+		goto out2;
+
+	length = security_member_sid(ssid, tsid, tclass, &newsid);
+	if (length < 0)
+		goto out2;
+
+	length = security_sid_to_context(newsid, &newcon, &len);
+	if (length < 0)
+		goto out2;
+
+	if (len > SIMPLE_TRANSACTION_LIMIT) {
+		printk(KERN_ERR "%s:  context size (%u) exceeds payload "
+		       "max\n", __FUNCTION__, len);
+		length = -ERANGE;
+		goto out3;
+	}
+
+	memcpy(buf, newcon, len);
+	length = len;
+out3:
+	kfree(newcon);
+out2:
+	kfree(tcon);
+out:
+	kfree(scon);
+	return length;
+}
+
 static struct inode *sel_make_inode(struct super_block *sb, int mode)
 {
 	struct inode *ret = new_inode(sb);
@@ -887,6 +955,213 @@
 
 struct dentry *selinux_null = NULL;
 
+static ssize_t sel_read_avc_cache_threshold(struct file *filp, char __user *buf,
+					    size_t count, loff_t *ppos)
+{
+	char tmpbuf[TMPBUFLEN];
+	ssize_t length;
+
+	length = scnprintf(tmpbuf, TMPBUFLEN, "%u", avc_cache_threshold);
+	return simple_read_from_buffer(buf, count, ppos, tmpbuf, length);
+}
+
+static ssize_t sel_write_avc_cache_threshold(struct file * file,
+					     const char __user * buf,
+					     size_t count, loff_t *ppos)
+
+{
+	char *page;
+	ssize_t ret;
+	int new_value;
+
+	if (count < 0 || count >= PAGE_SIZE) {
+		ret = -ENOMEM;
+		goto out;
+	}
+
+	if (*ppos != 0) {
+		/* No partial writes. */
+		ret = -EINVAL;
+		goto out;
+	}
+
+	page = (char*)get_zeroed_page(GFP_KERNEL);
+	if (!page) {
+		ret = -ENOMEM;
+		goto out;
+	}
+
+	if (copy_from_user(page, buf, count)) {
+		ret = -EFAULT;
+		goto out_free;
+	}
+
+	if (sscanf(page, "%u", &new_value) != 1) {
+		ret = -EINVAL;
+		goto out;
+	}
+
+	if (new_value != avc_cache_threshold) {
+		ret = task_has_security(current, SECURITY__SETSECPARAM);
+		if (ret)
+			goto out_free;
+		avc_cache_threshold = new_value;
+	}
+	ret = count;
+out_free:
+	free_page((unsigned long)page);
+out:
+	return ret;
+}
+
+static ssize_t sel_read_avc_hash_stats(struct file *filp, char __user *buf,
+				       size_t count, loff_t *ppos)
+{
+	char *page;
+	ssize_t ret = 0;
+
+	page = (char *)__get_free_page(GFP_KERNEL);
+	if (!page) {
+		ret = -ENOMEM;
+		goto out;
+	}
+	ret = avc_get_hash_stats(page);
+	if (ret >= 0)
+		ret = simple_read_from_buffer(buf, count, ppos, page, ret);
+	free_page((unsigned long)page);
+out:
+	return ret;
+}
+
+static struct file_operations sel_avc_cache_threshold_ops = {
+	.read		= sel_read_avc_cache_threshold,
+	.write		= sel_write_avc_cache_threshold,
+};
+
+static struct file_operations sel_avc_hash_stats_ops = {
+	.read		= sel_read_avc_hash_stats,
+};
+
+#ifdef CONFIG_SECURITY_SELINUX_AVC_STATS
+static struct avc_cache_stats *sel_avc_get_stat_idx(loff_t *idx)
+{
+	int cpu;
+
+	for (cpu = *idx; cpu < NR_CPUS; ++cpu) {
+		if (!cpu_possible(cpu))
+			continue;
+		*idx = cpu + 1;
+		return &per_cpu(avc_cache_stats, cpu);
+	}
+	return NULL;
+}
+
+static void *sel_avc_stats_seq_start(struct seq_file *seq, loff_t *pos)
+{
+	loff_t n = *pos - 1;
+
+	if (*pos == 0)
+		return SEQ_START_TOKEN;
+
+	return sel_avc_get_stat_idx(&n);
+}
+
+static void *sel_avc_stats_seq_next(struct seq_file *seq, void *v, loff_t *pos)
+{
+	return sel_avc_get_stat_idx(pos);
+}
+
+static int sel_avc_stats_seq_show(struct seq_file *seq, void *v)
+{
+	struct avc_cache_stats *st = v;
+
+	if (v == SEQ_START_TOKEN)
+		seq_printf(seq, "lookups hits misses allocations reclaims "
+			   "frees\n");
+	else
+		seq_printf(seq, "%u %u %u %u %u %u\n", st->lookups,
+			   st->hits, st->misses, st->allocations,
+			   st->reclaims, st->frees);
+	return 0;
+}
+
+static void sel_avc_stats_seq_stop(struct seq_file *seq, void *v)
+{ }
+
+static struct seq_operations sel_avc_cache_stats_seq_ops = {
+	.start		= sel_avc_stats_seq_start,
+	.next		= sel_avc_stats_seq_next,
+	.show		= sel_avc_stats_seq_show,
+	.stop		= sel_avc_stats_seq_stop,
+};
+
+static int sel_open_avc_cache_stats(struct inode *inode, struct file *file)
+{
+	return seq_open(file, &sel_avc_cache_stats_seq_ops);
+}
+
+static struct file_operations sel_avc_cache_stats_ops = {
+	.open		= sel_open_avc_cache_stats,
+	.read		= seq_read,
+	.llseek		= seq_lseek,
+	.release	= seq_release,
+};
+#endif
+
+static int sel_make_avc_files(struct dentry *dir)
+{
+	int i, ret = 0;
+	static struct tree_descr files[] = {
+		{ "cache_threshold",
+		  &sel_avc_cache_threshold_ops, S_IRUGO|S_IWUSR },
+		{ "hash_stats", &sel_avc_hash_stats_ops, S_IRUGO },
+#ifdef CONFIG_SECURITY_SELINUX_AVC_STATS
+		{ "cache_stats", &sel_avc_cache_stats_ops, S_IRUGO },
+#endif
+	};
+
+	for (i = 0; i < sizeof (files) / sizeof (files[0]); i++) {
+		struct inode *inode;
+		struct dentry *dentry;
+
+		dentry = d_alloc_name(dir, files[i].name);
+		if (!dentry) {
+			ret = -ENOMEM;
+			goto err;
+		}
+
+		inode = sel_make_inode(dir->d_sb, S_IFREG|files[i].mode);
+		if (!inode) {
+			ret = -ENOMEM;
+			goto err;
+		}
+		inode->i_fop = files[i].ops;
+		d_add(dentry, inode);
+	}
+out:
+	return ret;
+err:
+	d_genocide(dir);
+	goto out;
+}
+
+static int sel_make_dir(struct super_block *sb, struct dentry *dentry)
+{
+	int ret = 0;
+	struct inode *inode;
+
+	inode = sel_make_inode(sb, S_IFDIR | S_IRUGO | S_IXUGO);
+	if (!inode) {
+		ret = -ENOMEM;
+		goto out;
+	}
+	inode->i_op = &simple_dir_inode_operations;
+	inode->i_fop = &simple_dir_operations;
+	d_add(dentry, inode);
+out:
+	return ret;
+}
+
 static int sel_fill_super(struct super_block * sb, void * data, int silent)
 {
 	int ret;
@@ -906,6 +1181,7 @@
 		[SEL_COMMIT_BOOLS] = {"commit_pending_bools", &sel_commit_bools_ops, S_IWUSR},
 		[SEL_MLS] = {"mls", &sel_mls_ops, S_IRUGO},
 		[SEL_DISABLE] = {"disable", &sel_disable_ops, S_IWUSR},
+		[SEL_MEMBER] = {"member", &transaction_ops, S_IRUGO|S_IWUGO},
 		/* last one */ {""}
 	};
 	ret = simple_fill_super(sb, SELINUX_MAGIC, selinux_files);
@@ -942,6 +1218,18 @@
 	init_special_inode(inode, S_IFCHR | S_IRUGO | S_IWUGO, MKDEV(MEM_MAJOR, 3));
 	d_add(dentry, inode);
 	selinux_null = dentry;
+
+	dentry = d_alloc_name(sb->s_root, "avc");
+	if (!dentry)
+		return -ENOMEM;
+
+	ret = sel_make_dir(sb, dentry);
+	if (ret)
+		goto out;
+
+	ret = sel_make_avc_files(dentry);
+	if (ret)
+		goto out;
 
 	return 0;
 out:
diff -Nru a/security/selinux/ss/avtab.c b/security/selinux/ss/avtab.c
--- a/security/selinux/ss/avtab.c	2005-01-10 20:11:21 -08:00
+++ b/security/selinux/ss/avtab.c	2005-01-10 20:11:21 -08:00
@@ -303,20 +303,25 @@
 
 int avtab_read_item(void *fp, struct avtab_datum *avdatum, struct avtab_key *avkey)
 {
-	__u32 *buf;
-	__u32 items, items2;
+	u32 buf[7];
+	u32 items, items2;
+	int rc;
 
 	memset(avkey, 0, sizeof(struct avtab_key));
 	memset(avdatum, 0, sizeof(struct avtab_datum));
 
-	buf = next_entry(fp, sizeof(__u32));
-	if (!buf) {
+	rc = next_entry(buf, fp, sizeof(u32));
+	if (rc < 0) {
 		printk(KERN_ERR "security: avtab: truncated entry\n");
 		goto bad;
 	}
 	items2 = le32_to_cpu(buf[0]);
-	buf = next_entry(fp, sizeof(__u32)*items2);
-	if (!buf) {
+	if (items2 > ARRAY_SIZE(buf)) {
+		printk(KERN_ERR "security: avtab: entry overflow\n");
+		goto bad;
+	}
+	rc = next_entry(buf, fp, sizeof(u32)*items2);
+	if (rc < 0) {
 		printk(KERN_ERR "security: avtab: truncated entry\n");
 		goto bad;
 	}
@@ -362,21 +367,22 @@
 
 int avtab_read(struct avtab *a, void *fp, u32 config)
 {
-	int i, rc = -EINVAL;
+	int rc;
 	struct avtab_key avkey;
 	struct avtab_datum avdatum;
-	u32 *buf;
-	u32 nel;
+	u32 buf[1];
+	u32 nel, i;
 
 
-	buf = next_entry(fp, sizeof(u32));
-	if (!buf) {
+	rc = next_entry(buf, fp, sizeof(u32));
+	if (rc < 0) {
 		printk(KERN_ERR "security: avtab: truncated table\n");
 		goto bad;
 	}
 	nel = le32_to_cpu(buf[0]);
 	if (!nel) {
 		printk(KERN_ERR "security: avtab: table is empty\n");
+		rc = -EINVAL;
 		goto bad;
 	}
 	for (i = 0; i < nel; i++) {
diff -Nru a/security/selinux/ss/conditional.c b/security/selinux/ss/conditional.c
--- a/security/selinux/ss/conditional.c	2005-01-10 20:11:17 -08:00
+++ b/security/selinux/ss/conditional.c	2005-01-10 20:11:17 -08:00
@@ -219,15 +219,16 @@
 {
 	char *key = NULL;
 	struct cond_bool_datum *booldatum;
-	__u32 *buf, len;
+	u32 buf[3], len;
+	int rc;
 
 	booldatum = kmalloc(sizeof(struct cond_bool_datum), GFP_KERNEL);
 	if (!booldatum)
 		return -1;
 	memset(booldatum, 0, sizeof(struct cond_bool_datum));
 
-	buf = next_entry(fp, sizeof(__u32) * 3);
-	if (!buf)
+	rc = next_entry(buf, fp, sizeof buf);
+	if (rc < 0)
 		goto err;
 
 	booldatum->value = le32_to_cpu(buf[0]);
@@ -238,13 +239,12 @@
 
 	len = le32_to_cpu(buf[2]);
 
-	buf = next_entry(fp, len);
-	if (!buf)
-		goto err;
 	key = kmalloc(len + 1, GFP_KERNEL);
 	if (!key)
 		goto err;
-	memcpy(key, buf, len);
+	rc = next_entry(key, fp, len);
+	if (rc < 0)
+		goto err;
 	key[len] = 0;
 	if (hashtab_insert(h, key, booldatum))
 		goto err;
@@ -262,15 +262,15 @@
 	struct avtab_key key;
 	struct avtab_datum datum;
 	struct avtab_node *node_ptr;
-	int len, i;
-	__u32 *buf;
-	__u8 found;
+	int rc;
+	u32 buf[1], i, len;
+	u8 found;
 
 	*ret_list = NULL;
 
 	len = 0;
-	buf = next_entry(fp, sizeof(__u32));
-	if (!buf)
+	rc = next_entry(buf, fp, sizeof buf);
+	if (rc < 0)
 		return -1;
 
 	len = le32_to_cpu(buf[0]);
@@ -369,27 +369,27 @@
 
 static int cond_read_node(struct policydb *p, struct cond_node *node, void *fp)
 {
-	__u32 *buf;
-	int len, i;
+	u32 buf[2], len, i;
+	int rc;
 	struct cond_expr *expr = NULL, *last = NULL;
 
-	buf = next_entry(fp, sizeof(__u32));
-	if (!buf)
+	rc = next_entry(buf, fp, sizeof(u32));
+	if (rc < 0)
 		return -1;
 
 	node->cur_state = le32_to_cpu(buf[0]);
 
 	len = 0;
-	buf = next_entry(fp, sizeof(__u32));
-	if (!buf)
+	rc = next_entry(buf, fp, sizeof(u32));
+	if (rc < 0)
 		return -1;
 
 	/* expr */
 	len = le32_to_cpu(buf[0]);
 
 	for (i = 0; i < len; i++ ) {
-		buf = next_entry(fp, sizeof(__u32) * 2);
-		if (!buf)
+		rc = next_entry(buf, fp, sizeof(u32) * 2);
+		if (rc < 0)
 			goto err;
 
 		expr = kmalloc(sizeof(struct cond_expr), GFP_KERNEL);
@@ -425,11 +425,11 @@
 int cond_read_list(struct policydb *p, void *fp)
 {
 	struct cond_node *node, *last = NULL;
-	__u32 *buf;
-	int i, len;
+	u32 buf[1], i, len;
+	int rc;
 
-	buf = next_entry(fp, sizeof(__u32));
-	if (!buf)
+	rc = next_entry(buf, fp, sizeof buf);
+	if (rc < 0)
 		return -1;
 
 	len = le32_to_cpu(buf[0]);
diff -Nru a/security/selinux/ss/ebitmap.c b/security/selinux/ss/ebitmap.c
--- a/security/selinux/ss/ebitmap.c	2005-01-10 20:11:20 -08:00
+++ b/security/selinux/ss/ebitmap.c	2005-01-10 20:11:20 -08:00
@@ -239,13 +239,13 @@
 {
 	int rc = -EINVAL;
 	struct ebitmap_node *n, *l;
-	u32 *buf, mapsize, count, i;
+	u32 buf[3], mapsize, count, i;
 	u64 map;
 
 	ebitmap_init(e);
 
-	buf = next_entry(fp, sizeof(u32)*3);
-	if (!buf)
+	rc = next_entry(buf, fp, sizeof buf);
+	if (rc < 0)
 		goto out;
 
 	mapsize = le32_to_cpu(buf[0]);
@@ -269,8 +269,8 @@
 	}
 	l = NULL;
 	for (i = 0; i < count; i++) {
-		buf = next_entry(fp, sizeof(u32));
-		if (!buf) {
+		rc = next_entry(buf, fp, sizeof(u32));
+		if (rc < 0) {
 			printk(KERN_ERR "security: ebitmap: truncated map\n");
 			goto bad;
 		}
@@ -296,12 +296,11 @@
 			       n->startbit, (e->highbit - MAPSIZE));
 			goto bad_free;
 		}
-		buf = next_entry(fp, sizeof(u64));
-		if (!buf) {
+		rc = next_entry(&map, fp, sizeof(u64));
+		if (rc < 0) {
 			printk(KERN_ERR "security: ebitmap: truncated map\n");
 			goto bad_free;
 		}
-		memcpy(&map, buf, sizeof(u64));
 		n->map = le64_to_cpu(map);
 
 		if (!n->map) {
diff -Nru a/security/selinux/ss/mls.c b/security/selinux/ss/mls.c
--- a/security/selinux/ss/mls.c	2005-01-10 20:11:24 -08:00
+++ b/security/selinux/ss/mls.c	2005-01-10 20:11:24 -08:00
@@ -402,10 +402,11 @@
 
 int mls_read_perm(struct perm_datum *perdatum, void *fp)
 {
-	u32 *buf;
+	u32 buf[1];
+	int rc;
 
-	buf = next_entry(fp, sizeof(u32));
-	if (!buf)
+	rc = next_entry(buf, fp, sizeof buf);
+	if (rc < 0)
 		return -EINVAL;
 	perdatum->base_perms = le32_to_cpu(buf[0]);
 	return 0;
@@ -418,7 +419,8 @@
 struct mls_level *mls_read_level(void *fp)
 {
 	struct mls_level *l;
-	u32 *buf;
+	u32 buf[1];
+	int rc;
 
 	l = kmalloc(sizeof(*l), GFP_ATOMIC);
 	if (!l) {
@@ -427,8 +429,8 @@
 	}
 	memset(l, 0, sizeof(*l));
 
-	buf = next_entry(fp, sizeof(u32));
-	if (!buf) {
+	rc = next_entry(buf, fp, sizeof buf);
+	if (rc < 0) {
 		printk(KERN_ERR "security: mls: truncated level\n");
 		goto bad;
 	}
@@ -453,16 +455,21 @@
  */
 static int mls_read_range_helper(struct mls_range *r, void *fp)
 {
-	u32 *buf;
-	int items, rc = -EINVAL;
+	u32 buf[2], items;
+	int rc;
 
-	buf = next_entry(fp, sizeof(u32));
-	if (!buf)
+	rc = next_entry(buf, fp, sizeof(u32));
+	if (rc < 0)
 		goto out;
 
 	items = le32_to_cpu(buf[0]);
-	buf = next_entry(fp, sizeof(u32) * items);
-	if (!buf) {
+	if (items > ARRAY_SIZE(buf)) {
+		printk(KERN_ERR "security: mls:  range overflow\n");
+		rc = -EINVAL;
+		goto out;
+	}
+	rc = next_entry(buf, fp, sizeof(u32) * items);
+	if (rc < 0) {
 		printk(KERN_ERR "security: mls:  truncated range\n");
 		goto out;
 	}
@@ -515,10 +522,11 @@
 int mls_read_class(struct class_datum *cladatum, void *fp)
 {
 	struct mls_perms *p = &cladatum->mlsperms;
-	u32 *buf;
+	u32 buf[4];
+	int rc;
 
-	buf = next_entry(fp, sizeof(u32)*4);
-	if (!buf) {
+	rc = next_entry(buf, fp, sizeof buf);
+	if (rc < 0) {
 		printk(KERN_ERR "security: mls:  truncated mls permissions\n");
 		return -EINVAL;
 	}
@@ -532,15 +540,13 @@
 int mls_read_user(struct user_datum *usrdatum, void *fp)
 {
 	struct mls_range_list *r, *l;
-	int rc = 0;
+	int rc;
 	u32 nel, i;
-	u32 *buf;
+	u32 buf[1];
 
-	buf = next_entry(fp, sizeof(u32));
-	if (!buf) {
-		rc = -EINVAL;
+	rc = next_entry(buf, fp, sizeof buf);
+	if (rc < 0)
 		goto out;
-	}
 	nel = le32_to_cpu(buf[0]);
 	l = NULL;
 	for (i = 0; i < nel; i++) {
@@ -569,10 +575,11 @@
 
 int mls_read_nlevels(struct policydb *p, void *fp)
 {
-	u32 *buf;
+	u32 buf[1];
+	int rc;
 
-	buf = next_entry(fp, sizeof(u32));
-	if (!buf)
+	rc = next_entry(buf, fp, sizeof buf);
+	if (rc < 0)
 		return -EINVAL;
 	p->nlevels = le32_to_cpu(buf[0]);
 	return 0;
@@ -657,7 +664,7 @@
 	char *key = NULL;
 	struct level_datum *levdatum;
 	int rc;
-	u32 *buf, len;
+	u32 buf[2], len;
 
 	levdatum = kmalloc(sizeof(*levdatum), GFP_ATOMIC);
 	if (!levdatum) {
@@ -666,26 +673,21 @@
 	}
 	memset(levdatum, 0, sizeof(*levdatum));
 
-	buf = next_entry(fp, sizeof(u32)*2);
-	if (!buf) {
-		rc = -EINVAL;
+	rc = next_entry(buf, fp, sizeof buf);
+	if (rc < 0)
 		goto bad;
-	}
 
 	len = le32_to_cpu(buf[0]);
 	levdatum->isalias = le32_to_cpu(buf[1]);
 
-	buf = next_entry(fp, len);
-	if (!buf) {
-		rc = -EINVAL;
-		goto bad;
-	}
 	key = kmalloc(len + 1,GFP_ATOMIC);
 	if (!key) {
 		rc = -ENOMEM;
 		goto bad;
 	}
-	memcpy(key, buf, len);
+	rc = next_entry(key, fp, len);
+	if (rc < 0)
+		goto bad;
 	key[len] = 0;
 
 	levdatum->level = mls_read_level(fp);
@@ -710,7 +712,7 @@
 	char *key = NULL;
 	struct cat_datum *catdatum;
 	int rc;
-	u32 *buf, len;
+	u32 buf[3], len;
 
 	catdatum = kmalloc(sizeof(*catdatum), GFP_ATOMIC);
 	if (!catdatum) {
@@ -719,27 +721,22 @@
 	}
 	memset(catdatum, 0, sizeof(*catdatum));
 
-	buf = next_entry(fp, sizeof(u32)*3);
-	if (!buf) {
-		rc = -EINVAL;
+	rc = next_entry(buf, fp, sizeof buf);
+	if (rc < 0)
 		goto bad;
-	}
 
 	len = le32_to_cpu(buf[0]);
 	catdatum->value = le32_to_cpu(buf[1]);
 	catdatum->isalias = le32_to_cpu(buf[2]);
 
-	buf = next_entry(fp, len);
-	if (!buf) {
-		rc = -EINVAL;
-		goto bad;
-	}
 	key = kmalloc(len + 1,GFP_ATOMIC);
 	if (!key) {
 		rc = -ENOMEM;
 		goto bad;
 	}
-	memcpy(key, buf, len);
+	rc = next_entry(key, fp, len);
+	if (rc < 0)
+		goto bad;
 	key[len] = 0;
 
 	rc = hashtab_insert(h, key, catdatum);
diff -Nru a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c
--- a/security/selinux/ss/policydb.c	2005-01-10 20:11:18 -08:00
+++ b/security/selinux/ss/policydb.c	2005-01-10 20:11:18 -08:00
@@ -633,13 +633,12 @@
 				     struct policydb *p,
 				     void *fp)
 {
-	u32 *buf;
-	int rc = 0;
+	u32 buf[3];
+	int rc;
 
-	buf = next_entry(fp, sizeof(u32)*3);
-	if (!buf) {
+	rc = next_entry(buf, fp, sizeof buf);
+	if (rc < 0) {
 		printk(KERN_ERR "security: context truncated\n");
-		rc = -EINVAL;
 		goto out;
 	}
 	c->user = le32_to_cpu(buf[0]);
@@ -672,7 +671,7 @@
 	char *key = NULL;
 	struct perm_datum *perdatum;
 	int rc;
-	u32 *buf, len;
+	u32 buf[2], len;
 
 	perdatum = kmalloc(sizeof(*perdatum), GFP_KERNEL);
 	if (!perdatum) {
@@ -681,11 +680,9 @@
 	}
 	memset(perdatum, 0, sizeof(*perdatum));
 
-	buf = next_entry(fp, sizeof(u32)*2);
-	if (!buf) {
-		rc = -EINVAL;
+	rc = next_entry(buf, fp, sizeof buf);
+	if (rc < 0)
 		goto bad;
-	}
 
 	len = le32_to_cpu(buf[0]);
 	perdatum->value = le32_to_cpu(buf[1]);
@@ -693,17 +690,14 @@
 	if (rc)
 		goto bad;
 
-	buf = next_entry(fp, len);
-	if (!buf) {
-		rc = -EINVAL;
-		goto bad;
-	}
 	key = kmalloc(len + 1,GFP_KERNEL);
 	if (!key) {
 		rc = -ENOMEM;
 		goto bad;
 	}
-	memcpy(key, buf, len);
+	rc = next_entry(key, fp, len);
+	if (rc < 0)
+		goto bad;
 	key[len] = 0;
 
 	rc = hashtab_insert(h, key, perdatum);
@@ -720,7 +714,7 @@
 {
 	char *key = NULL;
 	struct common_datum *comdatum;
-	u32 *buf, len, nel;
+	u32 buf[4], len, nel;
 	int i, rc;
 
 	comdatum = kmalloc(sizeof(*comdatum), GFP_KERNEL);
@@ -730,11 +724,9 @@
 	}
 	memset(comdatum, 0, sizeof(*comdatum));
 
-	buf = next_entry(fp, sizeof(u32)*4);
-	if (!buf) {
-		rc = -EINVAL;
+	rc = next_entry(buf, fp, sizeof buf);
+	if (rc < 0)
 		goto bad;
-	}
 
 	len = le32_to_cpu(buf[0]);
 	comdatum->value = le32_to_cpu(buf[1]);
@@ -745,17 +737,14 @@
 	comdatum->permissions.nprim = le32_to_cpu(buf[2]);
 	nel = le32_to_cpu(buf[3]);
 
-	buf = next_entry(fp, len);
-	if (!buf) {
-		rc = -EINVAL;
-		goto bad;
-	}
 	key = kmalloc(len + 1,GFP_KERNEL);
 	if (!key) {
 		rc = -ENOMEM;
 		goto bad;
 	}
-	memcpy(key, buf, len);
+	rc = next_entry(key, fp, len);
+	if (rc < 0)
+		goto bad;
 	key[len] = 0;
 
 	for (i = 0; i < nel; i++) {
@@ -780,7 +769,7 @@
 	struct class_datum *cladatum;
 	struct constraint_node *c, *lc;
 	struct constraint_expr *e, *le;
-	u32 *buf, len, len2, ncons, nexpr, nel;
+	u32 buf[6], len, len2, ncons, nexpr, nel;
 	int i, j, depth, rc;
 
 	cladatum = kmalloc(sizeof(*cladatum), GFP_KERNEL);
@@ -790,11 +779,9 @@
 	}
 	memset(cladatum, 0, sizeof(*cladatum));
 
-	buf = next_entry(fp, sizeof(u32)*6);
-	if (!buf) {
-		rc = -EINVAL;
+	rc = next_entry(buf, fp, sizeof(u32)*6);
+	if (rc < 0)
 		goto bad;
-	}
 
 	len = le32_to_cpu(buf[0]);
 	len2 = le32_to_cpu(buf[1]);
@@ -808,17 +795,14 @@
 
 	ncons = le32_to_cpu(buf[5]);
 
-	buf = next_entry(fp, len);
-	if (!buf) {
-		rc = -EINVAL;
-		goto bad;
-	}
 	key = kmalloc(len + 1,GFP_KERNEL);
 	if (!key) {
 		rc = -ENOMEM;
 		goto bad;
 	}
-	memcpy(key, buf, len);
+	rc = next_entry(key, fp, len);
+	if (rc < 0)
+		goto bad;
 	key[len] = 0;
 
 	if (len2) {
@@ -827,12 +811,9 @@
 			rc = -ENOMEM;
 			goto bad;
 		}
-		buf = next_entry(fp, len2);
-		if (!buf) {
-			rc = -EINVAL;
+		rc = next_entry(cladatum->comkey, fp, len2);
+		if (rc < 0)
 			goto bad;
-		}
-		memcpy(cladatum->comkey, buf, len2);
 		cladatum->comkey[len2] = 0;
 
 		cladatum->comdatum = hashtab_search(p->p_commons.table,
@@ -866,8 +847,8 @@
 			cladatum->constraints = c;
 		}
 
-		buf = next_entry(fp, sizeof(u32)*2);
-		if (!buf)
+		rc = next_entry(buf, fp, sizeof(u32)*2);
+		if (rc < 0)
 			goto bad;
 		c->permissions = le32_to_cpu(buf[0]);
 		nexpr = le32_to_cpu(buf[1]);
@@ -887,8 +868,8 @@
 				c->expr = e;
 			}
 
-			buf = next_entry(fp, sizeof(u32)*3);
-			if (!buf)
+			rc = next_entry(buf, fp, sizeof(u32)*3);
+			if (rc < 0)
 				goto bad;
 			e->expr_type = le32_to_cpu(buf[0]);
 			e->attr = le32_to_cpu(buf[1]);
@@ -946,7 +927,7 @@
 	char *key = NULL;
 	struct role_datum *role;
 	int rc;
-	u32 *buf, len;
+	u32 buf[2], len;
 
 	role = kmalloc(sizeof(*role), GFP_KERNEL);
 	if (!role) {
@@ -955,26 +936,21 @@
 	}
 	memset(role, 0, sizeof(*role));
 
-	buf = next_entry(fp, sizeof(u32)*2);
-	if (!buf) {
-		rc = -EINVAL;
+	rc = next_entry(buf, fp, sizeof buf);
+	if (rc < 0)
 		goto bad;
-	}
 
 	len = le32_to_cpu(buf[0]);
 	role->value = le32_to_cpu(buf[1]);
 
-	buf = next_entry(fp, len);
-	if (!buf) {
-		rc = -EINVAL;
-		goto bad;
-	}
 	key = kmalloc(len + 1,GFP_KERNEL);
 	if (!key) {
 		rc = -ENOMEM;
 		goto bad;
 	}
-	memcpy(key, buf, len);
+	rc = next_entry(key, fp, len);
+	if (rc < 0)
+		goto bad;
 	key[len] = 0;
 
 	rc = ebitmap_read(&role->dominates, fp);
@@ -1011,7 +987,7 @@
 	char *key = NULL;
 	struct type_datum *typdatum;
 	int rc;
-	u32 *buf, len;
+	u32 buf[3], len;
 
 	typdatum = kmalloc(sizeof(*typdatum),GFP_KERNEL);
 	if (!typdatum) {
@@ -1020,27 +996,22 @@
 	}
 	memset(typdatum, 0, sizeof(*typdatum));
 
-	buf = next_entry(fp, sizeof(u32)*3);
-	if (!buf) {
-		rc = -EINVAL;
+	rc = next_entry(buf, fp, sizeof buf);
+	if (rc < 0)
 		goto bad;
-	}
 
 	len = le32_to_cpu(buf[0]);
 	typdatum->value = le32_to_cpu(buf[1]);
 	typdatum->primary = le32_to_cpu(buf[2]);
 
-	buf = next_entry(fp, len);
-	if (!buf) {
-		rc = -EINVAL;
-		goto bad;
-	}
 	key = kmalloc(len + 1,GFP_KERNEL);
 	if (!key) {
 		rc = -ENOMEM;
 		goto bad;
 	}
-	memcpy(key, buf, len);
+	rc = next_entry(key, fp, len);
+	if (rc < 0)
+		goto bad;
 	key[len] = 0;
 
 	rc = hashtab_insert(h, key, typdatum);
@@ -1058,7 +1029,7 @@
 	char *key = NULL;
 	struct user_datum *usrdatum;
 	int rc;
-	u32 *buf, len;
+	u32 buf[2], len;
 
 
 	usrdatum = kmalloc(sizeof(*usrdatum), GFP_KERNEL);
@@ -1068,26 +1039,21 @@
 	}
 	memset(usrdatum, 0, sizeof(*usrdatum));
 
-	buf = next_entry(fp, sizeof(u32)*2);
-	if (!buf) {
-		rc = -EINVAL;
+	rc = next_entry(buf, fp, sizeof buf);
+	if (rc < 0)
 		goto bad;
-	}
 
 	len = le32_to_cpu(buf[0]);
 	usrdatum->value = le32_to_cpu(buf[1]);
 
-	buf = next_entry(fp, len);
-	if (!buf) {
-		rc = -EINVAL;
-		goto bad;
-	}
 	key = kmalloc(len + 1,GFP_KERNEL);
 	if (!key) {
 		rc = -ENOMEM;
 		goto bad;
 	}
-	memcpy(key, buf, len);
+	rc = next_entry(key, fp, len);
+	if (rc < 0)
+		goto bad;
 	key[len] = 0;
 
 	rc = ebitmap_read(&usrdatum->roles, fp);
@@ -1133,7 +1099,7 @@
 	struct ocontext *l, *c, *newc;
 	struct genfs *genfs_p, *genfs, *newgenfs;
 	int i, j, rc, r_policyvers = 0;
-	u32 *buf, len, len2, config, nprim, nel, nel2;
+	u32 buf[8], len, len2, config, nprim, nel, nel2;
 	char *policydb_str;
 	struct policydb_compat_info *info;
 
@@ -1146,8 +1112,8 @@
 
 	rc = -EINVAL;
 	/* Read the magic number and string length. */
-	buf = next_entry(fp, sizeof(u32)* 2);
-	if (!buf)
+	rc = next_entry(buf, fp, sizeof(u32)* 2);
+	if (rc < 0)
 		goto bad;
 
 	for (i = 0; i < 2; i++)
@@ -1167,11 +1133,6 @@
 		       len, strlen(POLICYDB_STRING));
 		goto bad;
 	}
-	buf = next_entry(fp, len);
-	if (!buf) {
-		printk(KERN_ERR "security:  truncated policydb string identifier\n");
-		goto bad;
-	}
 	policydb_str = kmalloc(len + 1,GFP_KERNEL);
 	if (!policydb_str) {
 		printk(KERN_ERR "security:  unable to allocate memory for policydb "
@@ -1179,7 +1140,12 @@
 		rc = -ENOMEM;
 		goto bad;
 	}
-	memcpy(policydb_str, buf, len);
+	rc = next_entry(policydb_str, fp, len);
+	if (rc < 0) {
+		printk(KERN_ERR "security:  truncated policydb string identifier\n");
+		kfree(policydb_str);
+		goto bad;
+	}
 	policydb_str[len] = 0;
 	if (strcmp(policydb_str, POLICYDB_STRING)) {
 		printk(KERN_ERR "security:  policydb string %s does not match "
@@ -1192,8 +1158,8 @@
 	policydb_str = NULL;
 
 	/* Read the version, config, and table sizes. */
-	buf = next_entry(fp, sizeof(u32)*4);
-	if (!buf)
+	rc = next_entry(buf, fp, sizeof(u32)*4);
+	if (rc < 0)
 		goto bad;
 	for (i = 0; i < 4; i++)
 		buf[i] = le32_to_cpu(buf[i]);
@@ -1235,11 +1201,9 @@
 		goto bad;
 
 	for (i = 0; i < info->sym_num; i++) {
-		buf = next_entry(fp, sizeof(u32)*2);
-		if (!buf) {
-			rc = -EINVAL;
+		rc = next_entry(buf, fp, sizeof(u32)*2);
+		if (rc < 0)
 			goto bad;
-		}
 		nprim = le32_to_cpu(buf[0]);
 		nel = le32_to_cpu(buf[1]);
 		for (j = 0; j < nel; j++) {
@@ -1261,11 +1225,9 @@
 			goto bad;
 	}
 
-	buf = next_entry(fp, sizeof(u32));
-	if (!buf) {
-		rc = -EINVAL;
+	rc = next_entry(buf, fp, sizeof(u32));
+	if (rc < 0)
 		goto bad;
-	}
 	nel = le32_to_cpu(buf[0]);
 	ltr = NULL;
 	for (i = 0; i < nel; i++) {
@@ -1280,22 +1242,18 @@
 		} else {
 			p->role_tr = tr;
 		}
-		buf = next_entry(fp, sizeof(u32)*3);
-		if (!buf) {
-			rc = -EINVAL;
+		rc = next_entry(buf, fp, sizeof(u32)*3);
+		if (rc < 0)
 			goto bad;
-		}
 		tr->role = le32_to_cpu(buf[0]);
 		tr->type = le32_to_cpu(buf[1]);
 		tr->new_role = le32_to_cpu(buf[2]);
 		ltr = tr;
 	}
 
-	buf = next_entry(fp, sizeof(u32));
-	if (!buf) {
-		rc = -EINVAL;
+	rc = next_entry(buf, fp, sizeof(u32));
+	if (rc < 0)
 		goto bad;
-	}
 	nel = le32_to_cpu(buf[0]);
 	lra = NULL;
 	for (i = 0; i < nel; i++) {
@@ -1310,11 +1268,9 @@
 		} else {
 			p->role_allow = ra;
 		}
-		buf = next_entry(fp, sizeof(u32)*2);
-		if (!buf) {
-			rc = -EINVAL;
+		rc = next_entry(buf, fp, sizeof(u32)*2);
+		if (rc < 0)
 			goto bad;
-		}
 		ra->role = le32_to_cpu(buf[0]);
 		ra->new_role = le32_to_cpu(buf[1]);
 		lra = ra;
@@ -1329,11 +1285,9 @@
 		goto bad;
 
 	for (i = 0; i < info->ocon_num; i++) {
-		buf = next_entry(fp, sizeof(u32));
-		if (!buf) {
-			rc = -EINVAL;
+		rc = next_entry(buf, fp, sizeof(u32));
+		if (rc < 0)
 			goto bad;
-		}
 		nel = le32_to_cpu(buf[0]);
 		l = NULL;
 		for (j = 0; j < nel; j++) {
@@ -1352,8 +1306,8 @@
 			rc = -EINVAL;
 			switch (i) {
 			case OCON_ISID:
-				buf = next_entry(fp, sizeof(u32));
-				if (!buf)
+				rc = next_entry(buf, fp, sizeof(u32));
+				if (rc < 0)
 					goto bad;
 				c->sid[0] = le32_to_cpu(buf[0]);
 				rc = context_read_and_validate(&c->context[0], p, fp);
@@ -1362,19 +1316,18 @@
 				break;
 			case OCON_FS:
 			case OCON_NETIF:
-				buf = next_entry(fp, sizeof(u32));
-				if (!buf)
+				rc = next_entry(buf, fp, sizeof(u32));
+				if (rc < 0)
 					goto bad;
 				len = le32_to_cpu(buf[0]);
-				buf = next_entry(fp, len);
-				if (!buf)
-					goto bad;
 				c->u.name = kmalloc(len + 1,GFP_KERNEL);
 				if (!c->u.name) {
 					rc = -ENOMEM;
 					goto bad;
 				}
-				memcpy(c->u.name, buf, len);
+				rc = next_entry(c->u.name, fp, len);
+				if (rc < 0)
+					goto bad;
 				c->u.name[len] = 0;
 				rc = context_read_and_validate(&c->context[0], p, fp);
 				if (rc)
@@ -1384,8 +1337,8 @@
 					goto bad;
 				break;
 			case OCON_PORT:
-				buf = next_entry(fp, sizeof(u32)*3);
-				if (!buf)
+				rc = next_entry(buf, fp, sizeof(u32)*3);
+				if (rc < 0)
 					goto bad;
 				c->u.port.protocol = le32_to_cpu(buf[0]);
 				c->u.port.low_port = le32_to_cpu(buf[1]);
@@ -1395,8 +1348,8 @@
 					goto bad;
 				break;
 			case OCON_NODE:
-				buf = next_entry(fp, sizeof(u32)* 2);
-				if (!buf)
+				rc = next_entry(buf, fp, sizeof(u32)* 2);
+				if (rc < 0)
 					goto bad;
 				c->u.node.addr = le32_to_cpu(buf[0]);
 				c->u.node.mask = le32_to_cpu(buf[1]);
@@ -1405,22 +1358,21 @@
 					goto bad;
 				break;
 			case OCON_FSUSE:
-				buf = next_entry(fp, sizeof(u32)*2);
-				if (!buf)
+				rc = next_entry(buf, fp, sizeof(u32)*2);
+				if (rc < 0)
 					goto bad;
 				c->v.behavior = le32_to_cpu(buf[0]);
 				if (c->v.behavior > SECURITY_FS_USE_NONE)
 					goto bad;
 				len = le32_to_cpu(buf[1]);
-				buf = next_entry(fp, len);
-				if (!buf)
-					goto bad;
 				c->u.name = kmalloc(len + 1,GFP_KERNEL);
 				if (!c->u.name) {
 					rc = -ENOMEM;
 					goto bad;
 				}
-				memcpy(c->u.name, buf, len);
+				rc = next_entry(c->u.name, fp, len);
+				if (rc < 0)
+					goto bad;
 				c->u.name[len] = 0;
 				rc = context_read_and_validate(&c->context[0], p, fp);
 				if (rc)
@@ -1429,8 +1381,8 @@
 			case OCON_NODE6: {
 				int k;
 
-				buf = next_entry(fp, sizeof(u32) * 8);
-				if (!buf)
+				rc = next_entry(buf, fp, sizeof(u32) * 8);
+				if (rc < 0)
 					goto bad;
 				for (k = 0; k < 4; k++)
 					c->u.node6.addr[k] = le32_to_cpu(buf[k]);
@@ -1444,22 +1396,17 @@
 		}
 	}
 
-	buf = next_entry(fp, sizeof(u32));
-	if (!buf) {
-		rc = -EINVAL;
+	rc = next_entry(buf, fp, sizeof(u32));
+	if (rc < 0)
 		goto bad;
-	}
 	nel = le32_to_cpu(buf[0]);
 	genfs_p = NULL;
 	rc = -EINVAL;
 	for (i = 0; i < nel; i++) {
-		buf = next_entry(fp, sizeof(u32));
-		if (!buf)
+		rc = next_entry(buf, fp, sizeof(u32));
+		if (rc < 0)
 			goto bad;
 		len = le32_to_cpu(buf[0]);
-		buf = next_entry(fp, len);
-		if (!buf)
-			goto bad;
 		newgenfs = kmalloc(sizeof(*newgenfs), GFP_KERNEL);
 		if (!newgenfs) {
 			rc = -ENOMEM;
@@ -1473,7 +1420,12 @@
 			kfree(newgenfs);
 			goto bad;
 		}
-		memcpy(newgenfs->fstype, buf, len);
+		rc = next_entry(newgenfs->fstype, fp, len);
+		if (rc < 0) {
+			kfree(newgenfs->fstype);
+			kfree(newgenfs);
+			goto bad;
+		}
 		newgenfs->fstype[len] = 0;
 		for (genfs_p = NULL, genfs = p->genfs; genfs;
 		     genfs_p = genfs, genfs = genfs->next) {
@@ -1492,18 +1444,15 @@
 			genfs_p->next = newgenfs;
 		else
 			p->genfs = newgenfs;
-		buf = next_entry(fp, sizeof(u32));
-		if (!buf)
+		rc = next_entry(buf, fp, sizeof(u32));
+		if (rc < 0)
 			goto bad;
 		nel2 = le32_to_cpu(buf[0]);
 		for (j = 0; j < nel2; j++) {
-			buf = next_entry(fp, sizeof(u32));
-			if (!buf)
+			rc = next_entry(buf, fp, sizeof(u32));
+			if (rc < 0)
 				goto bad;
 			len = le32_to_cpu(buf[0]);
-			buf = next_entry(fp, len);
-			if (!buf)
-				goto bad;
 
 			newc = kmalloc(sizeof(*newc), GFP_KERNEL);
 			if (!newc) {
@@ -1517,10 +1466,12 @@
 				rc = -ENOMEM;
 				goto bad_newc;
 			}
-			memcpy(newc->u.name, buf, len);
+			rc = next_entry(newc->u.name, fp, len);
+			if (rc < 0)
+				goto bad_newc;
 			newc->u.name[len] = 0;
-			buf = next_entry(fp, sizeof(u32));
-			if (!buf)
+			rc = next_entry(buf, fp, sizeof(u32));
+			if (rc < 0)
 				goto bad_newc;
 			newc->v.sclass = le32_to_cpu(buf[0]);
 			if (context_read_and_validate(&newc->context[0], p, fp))
diff -Nru a/security/selinux/ss/policydb.h b/security/selinux/ss/policydb.h
--- a/security/selinux/ss/policydb.h	2005-01-10 20:11:21 -08:00
+++ b/security/selinux/ss/policydb.h	2005-01-10 20:11:21 -08:00
@@ -271,17 +271,15 @@
 	size_t len;
 };
 
-static inline void *next_entry(struct policy_file *fp, size_t bytes)
+static inline int next_entry(void *buf, struct policy_file *fp, size_t bytes)
 {
-	void *buf;
-
 	if (bytes > fp->len)
-		return NULL;
+		return -EINVAL;
 
-	buf = fp->data;
+	memcpy(buf, fp->data, bytes);
 	fp->data += bytes;
 	fp->len -= bytes;
-	return buf;
+	return 0;
 }
 
 #endif	/* _SS_POLICYDB_H_ */
diff -Nru a/security/selinux/ss/services.c b/security/selinux/ss/services.c
--- a/security/selinux/ss/services.c	2005-01-10 20:11:22 -08:00
+++ b/security/selinux/ss/services.c	2005-01-10 20:11:22 -08:00
@@ -275,7 +275,7 @@
 	 * pair.
 	 */
 	if (tclass == SECCLASS_PROCESS &&
-	    (avd->allowed & PROCESS__TRANSITION) &&
+	    (avd->allowed & (PROCESS__TRANSITION | PROCESS__DYNTRANSITION)) &&
 	    scontext->role != tcontext->role) {
 		for (ra = policydb.role_allow; ra; ra = ra->next) {
 			if (scontext->role == ra->role &&
@@ -283,7 +283,8 @@
 				break;
 		}
 		if (!ra)
-			avd->allowed = (avd->allowed) & ~(PROCESS__TRANSITION);
+			avd->allowed = (avd->allowed) & ~(PROCESS__TRANSITION |
+			                                PROCESS__DYNTRANSITION);
 	}
 
 	return 0;
diff -Nru a/sound/Kconfig b/sound/Kconfig
--- a/sound/Kconfig	2005-01-10 20:11:22 -08:00
+++ b/sound/Kconfig	2005-01-10 20:11:22 -08:00
@@ -70,7 +70,7 @@
 endmenu
 
 menu "Open Sound System"
-	depends on SOUND!=n && (BROKEN || !(SPARC32 || SPARC64))
+	depends on SOUND!=n && (BROKEN || (!SPARC32 && !SPARC64))
 
 config SOUND_PRIME
 	tristate "Open Sound System (DEPRECATED)"
diff -Nru a/sound/arm/sa11xx-uda1341.c b/sound/arm/sa11xx-uda1341.c
--- a/sound/arm/sa11xx-uda1341.c	2005-01-10 20:11:16 -08:00
+++ b/sound/arm/sa11xx-uda1341.c	2005-01-10 20:11:16 -08:00
@@ -21,7 +21,7 @@
  *                              merged HAL layer (patches from Brian)
  */
 
-/* $Id: sa11xx-uda1341.c,v 1.18 2004/07/20 15:54:09 cladisch Exp $ */
+/* $Id: sa11xx-uda1341.c,v 1.19 2004/12/15 15:26:10 tiwai Exp $ */
 
 /***************************************************************************************************
 *
@@ -875,7 +875,6 @@
 #endif
 	l3_command(chip->uda1341, CMD_SUSPEND, NULL);
 	sa11xx_uda1341_audio_shutdown(chip);
-	snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
 	return 0;
 }
 
@@ -891,7 +890,6 @@
 #else
 	//FIXME
 #endif
-	snd_power_change_state(card, SNDRV_CTL_POWER_D0);
 	return 0;
 }
 #endif /* COMFIG_PM */
diff -Nru a/sound/core/Kconfig b/sound/core/Kconfig
--- a/sound/core/Kconfig	2005-01-10 20:11:21 -08:00
+++ b/sound/core/Kconfig	2005-01-10 20:11:21 -08:00
@@ -83,7 +83,7 @@
 
 config SND_BIT32_EMUL
 	tristate "Emulation for 32-bit applications"
-	depends on SND && (MIPS64 || SPARC64 || PPC64 || X86_64 && IA32_EMULATION)
+	depends on SND && COMPAT
 	select SND_PCM
 	select SND_RAWMIDI
 	select SND_TIMER
diff -Nru a/sound/core/control.c b/sound/core/control.c
--- a/sound/core/control.c	2005-01-10 20:11:16 -08:00
+++ b/sound/core/control.c	2005-01-10 20:11:16 -08:00
@@ -31,6 +31,9 @@
 #include <sound/info.h>
 #include <sound/control.h>
 
+/* max number of user-defined controls */
+#define MAX_USER_CONTROLS	32
+
 typedef struct _snd_kctl_ioctl {
 	struct list_head list;		/* list of all ioctls */
 	snd_kctl_ioctl_func_t fioctl;
@@ -635,19 +638,13 @@
 	return result;
 }
 
-static int snd_ctl_elem_read(snd_card_t *card, snd_ctl_elem_value_t __user *_control)
+int snd_ctl_elem_read(snd_card_t *card, snd_ctl_elem_value_t *control)
 {
-	snd_ctl_elem_value_t *control;
 	snd_kcontrol_t *kctl;
 	snd_kcontrol_volatile_t *vd;
 	unsigned int index_offset;
 	int result, indirect;
-	
-	control = kmalloc(sizeof(*control), GFP_KERNEL);
-	if (control == NULL)
-		return -ENOMEM;	
-	if (copy_from_user(control, _control, sizeof(*control)))
-		return -EFAULT;
+
 	down_read(&card->controls_rwsem);
 	kctl = snd_ctl_find_id(card, &control->id);
 	if (kctl == NULL) {
@@ -668,27 +665,36 @@
 		}
 	}
 	up_read(&card->controls_rwsem);
+	return result;
+}
+
+static int snd_ctl_elem_read_user(snd_card_t *card, snd_ctl_elem_value_t __user *_control)
+{
+	snd_ctl_elem_value_t *control;
+	int result;
+	
+	control = kmalloc(sizeof(*control), GFP_KERNEL);
+	if (control == NULL)
+		return -ENOMEM;	
+	if (copy_from_user(control, _control, sizeof(*control))) {
+		kfree(control);
+		return -EFAULT;
+	}
+	result = snd_ctl_elem_read(card, control);
 	if (result >= 0)
 		if (copy_to_user(_control, control, sizeof(*control)))
-			return -EFAULT;
+			result = -EFAULT;
 	kfree(control);
 	return result;
 }
 
-static int snd_ctl_elem_write(snd_ctl_file_t *file, snd_ctl_elem_value_t __user *_control)
+int snd_ctl_elem_write(snd_card_t *card, snd_ctl_file_t *file, snd_ctl_elem_value_t *control)
 {
-	snd_card_t *card = file->card;
-	snd_ctl_elem_value_t *control;
 	snd_kcontrol_t *kctl;
 	snd_kcontrol_volatile_t *vd;
 	unsigned int index_offset;
 	int result, indirect;
 
-	control = kmalloc(sizeof(*control), GFP_KERNEL);
-	if (control == NULL)
-		return -ENOMEM;	
-	if (copy_from_user(control, _control, sizeof(*control)))
-		return -EFAULT;
 	down_read(&card->controls_rwsem);
 	kctl = snd_ctl_find_id(card, &control->id);
 	if (kctl == NULL) {
@@ -702,7 +708,7 @@
 		} else {
 			if (!(vd->access & SNDRV_CTL_ELEM_ACCESS_WRITE) ||
 			    kctl->put == NULL ||
-			    (vd->owner != NULL && vd->owner != file)) {
+			    (file && vd->owner != NULL && vd->owner != file)) {
 				result = -EPERM;
 			} else {
 				snd_ctl_build_ioff(&control->id, kctl, index_offset);
@@ -711,16 +717,30 @@
 			if (result > 0) {
 				up_read(&card->controls_rwsem);
 				snd_ctl_notify(card, SNDRV_CTL_EVENT_MASK_VALUE, &control->id);
-				result = 0;
-				goto __unlocked;
+				return 0;
 			}
 		}
 	}
 	up_read(&card->controls_rwsem);
-      __unlocked:
+	return result;
+}
+
+static int snd_ctl_elem_write_user(snd_ctl_file_t *file, snd_ctl_elem_value_t __user *_control)
+{
+	snd_ctl_elem_value_t *control;
+	int result;
+
+	control = kmalloc(sizeof(*control), GFP_KERNEL);
+	if (control == NULL)
+		return -ENOMEM;	
+	if (copy_from_user(control, _control, sizeof(*control))) {
+		kfree(control);
+		return -EFAULT;
+	}
+	result = snd_ctl_elem_write(file->card, file, control);
 	if (result >= 0)
 		if (copy_to_user(_control, control, sizeof(*control)))
-			return -EFAULT;
+			result = -EFAULT;
 	kfree(control);
 	return result;
 }
@@ -784,30 +804,21 @@
 }
 
 struct user_element {
-	enum sndrv_ctl_elem_type type;	/* element type */
-	unsigned int elem_count;	/* count of elements */
-	union {
-		struct {
-			unsigned int items;
-		} enumerated;
-	} u;
+	snd_ctl_elem_info_t info;
 	void *elem_data;		/* element data */
 	unsigned long elem_data_size;	/* size of element data in bytes */
 	void *priv_data;		/* private data (like strings for enumerated type) */
 	unsigned long priv_data_size;	/* size of private data in bytes */
-	unsigned short dimen_count;	/* count of dimensions */
-	unsigned short dimen[0];	/* array of dimensions */
 };
 
 static int snd_ctl_elem_user_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
 {
 	struct user_element *ue = kcontrol->private_data;
 
-	uinfo->type = ue->type;
-	uinfo->count = ue->elem_count;
-	if (ue->type == SNDRV_CTL_ELEM_TYPE_ENUMERATED) {
-		uinfo->value.enumerated.items = ue->u.enumerated.items;
-		if (uinfo->value.enumerated.item >= ue->u.enumerated.items)
+	*uinfo = ue->info;
+	if (ue->info.type == SNDRV_CTL_ELEM_TYPE_ENUMERATED) {
+		uinfo->value.enumerated.items = ue->info.value.enumerated.items;
+		if (uinfo->value.enumerated.item >= ue->info.value.enumerated.items)
 			uinfo->value.enumerated.item = 0;
 		strlcpy(uinfo->value.enumerated.name,
 			(char *)ue->priv_data + uinfo->value.enumerated.item * 64,
@@ -829,9 +840,10 @@
 	int change;
 	struct user_element *ue = kcontrol->private_data;
 	
-	change = memcmp(&ucontrol->value, ue->elem_data, ue->elem_data_size);
-	memcpy(ue->elem_data, &ucontrol->value, ue->elem_data_size);
-	return !!change;
+	change = memcmp(&ucontrol->value, ue->elem_data, ue->elem_data_size) != 0;
+	if (change)
+		memcpy(ue->elem_data, &ucontrol->value, ue->elem_data_size);
+	return change;
 }
 
 static void snd_ctl_elem_user_free(snd_kcontrol_t * kcontrol)
@@ -845,34 +857,35 @@
 	snd_ctl_elem_info_t info;
 	snd_kcontrol_t kctl, *_kctl;
 	unsigned int access;
-	long private_size, dimen_size, extra_size;
+	long private_size, extra_size;
 	struct user_element *ue;
 	int idx, err;
 	
+	if (card->user_ctl_count >= MAX_USER_CONTROLS)
+		return -ENOMEM;
 	if (copy_from_user(&info, _info, sizeof(info)))
 		return -EFAULT;
 	if (info.count > 1024)
 		return -EINVAL;
 	access = info.access == 0 ? SNDRV_CTL_ELEM_ACCESS_READWRITE :
-		 (info.access & (SNDRV_CTL_ELEM_ACCESS_READWRITE|SNDRV_CTL_ELEM_ACCESS_INACTIVE|
-		 		 SNDRV_CTL_ELEM_ACCESS_DINDIRECT|SNDRV_CTL_ELEM_ACCESS_INDIRECT));
-	if (access & (SNDRV_CTL_ELEM_ACCESS_DINDIRECT | SNDRV_CTL_ELEM_ACCESS_INDIRECT))
-		return -EINVAL;
+		(info.access & (SNDRV_CTL_ELEM_ACCESS_READWRITE|SNDRV_CTL_ELEM_ACCESS_INACTIVE));
 	info.id.numid = 0;
 	memset(&kctl, 0, sizeof(kctl));
 	down_write(&card->controls_rwsem);
-	if (!!((_kctl = snd_ctl_find_id(card, &info.id)) != NULL) ^ replace) {
-		up_write(&card->controls_rwsem);
-		return !replace ? -EBUSY : -ENOENT;
-	}
-	if (replace) {
-		err = snd_ctl_remove(card, _kctl);
-		if (err < 0) {
-			up_write(&card->controls_rwsem);
-			return err;
-		}
+	_kctl = snd_ctl_find_id(card, &info.id);
+	err = 0;
+	if (_kctl) {
+		if (replace)
+			err = snd_ctl_remove(card, _kctl);
+		else
+			err = -EBUSY;
+	} else {
+		if (replace)
+			err = -ENOENT;
 	}
 	up_write(&card->controls_rwsem);
+	if (err < 0)
+		return err;
 	memcpy(&kctl.id, &info.id, sizeof(info.id));
 	kctl.count = info.owner ? info.owner : 1;
 	access |= SNDRV_CTL_ELEM_ACCESS_USER;
@@ -902,7 +915,7 @@
 		private_size = sizeof(unsigned int);
 		if (info.count > 128)
 			return -EINVAL;
-		if (info.value.enumerated.items > 1024)
+		if (info.value.enumerated.items > 128)
 			return -EINVAL;
 		extra_size = info.value.enumerated.items * 64;
 		break;
@@ -920,31 +933,18 @@
 		return -EINVAL;
 	}
 	private_size *= info.count;
-	if (private_size > 1024 * 1024)
-		return -EINVAL;
-	dimen_size = 0;
-	if (!(info.access & SNDRV_CTL_ELEM_ACCESS_DINDIRECT))
-		for (idx = 0; idx < 4 && info.dimen.d[idx]; idx++)
-			dimen_size += sizeof(unsigned short);
-	ue = kcalloc(1, sizeof(struct user_element) + dimen_size + private_size + extra_size, GFP_KERNEL);
+	ue = kcalloc(1, sizeof(struct user_element) + private_size + extra_size, GFP_KERNEL);
 	if (ue == NULL)
 		return -ENOMEM;
-	ue->type = info.type;
-	ue->elem_count = info.count;
-	if (!(info.access & SNDRV_CTL_ELEM_ACCESS_DINDIRECT)) {
-		for (idx = 0; idx < 4 && info.dimen.d[idx]; idx++)
-			ue->dimen[idx] = info.dimen.d[idx];
-		ue->dimen_count = dimen_size / sizeof(unsigned short);
-	}
-	ue->elem_data = (char *)ue + sizeof(ue) + dimen_size;
+	ue->info = info;
+	ue->elem_data = (char *)ue + sizeof(ue);
 	ue->elem_data_size = private_size;
 	if (extra_size) {
-		ue->priv_data = (char *)ue + sizeof(ue) + dimen_size + private_size;
+		ue->priv_data = (char *)ue + sizeof(ue) + private_size;
 		ue->priv_data_size = extra_size;
-		if (ue->type == SNDRV_CTL_ELEM_TYPE_ENUMERATED) {
-			if (copy_from_user(ue->priv_data, *(char **)info.value.enumerated.name, extra_size))
+		if (ue->info.type == SNDRV_CTL_ELEM_TYPE_ENUMERATED) {
+			if (copy_from_user(ue->priv_data, *(char __user **)info.value.enumerated.name, extra_size))
 				return -EFAULT;
-			ue->u.enumerated.items = info.value.enumerated.items;
 		}
 	}
 	kctl.private_free = snd_ctl_elem_user_free;
@@ -961,16 +961,29 @@
 		snd_ctl_free_one(_kctl);
 		return err;
 	}
+
+	down_write(&card->controls_rwsem);
+	card->user_ctl_count++;
+	up_write(&card->controls_rwsem);
+
 	return 0;
 }
 
 static int snd_ctl_elem_remove(snd_ctl_file_t *file, snd_ctl_elem_id_t __user *_id)
 {
 	snd_ctl_elem_id_t id;
+	int err;
 
 	if (copy_from_user(&id, _id, sizeof(id)))
 		return -EFAULT;
-	return snd_ctl_remove_unlocked_id(file, &id);
+	err = snd_ctl_remove_unlocked_id(file, &id);
+	if (! err) {
+		snd_card_t *card = file->card;
+		down_write(&card->controls_rwsem);
+		card->user_ctl_count--;
+		up_write(&card->controls_rwsem);
+	}
+	return err;
 }
 
 static int snd_ctl_subscribe_events(snd_ctl_file_t *file, int __user *ptr)
@@ -1002,18 +1015,23 @@
 {
 	switch (power_state) {
 	case SNDRV_CTL_POWER_D0:
-	case SNDRV_CTL_POWER_D1:
-	case SNDRV_CTL_POWER_D2:
-		if (card->power_state != power_state)
+		if (card->power_state != power_state) {
 			/* FIXME: pass the correct state value */
 			card->pm_resume(card, 0);
+			snd_power_change_state(card, power_state);
+		}
 		break;
 	case SNDRV_CTL_POWER_D3hot:
-	case SNDRV_CTL_POWER_D3cold:
-		if (card->power_state != power_state)
+		if (card->power_state != power_state) {
 			/* FIXME: pass the correct state value */
 			card->pm_suspend(card, 0);
+			snd_power_change_state(card, power_state);
+		}
 		break;
+	case SNDRV_CTL_POWER_D1:
+	case SNDRV_CTL_POWER_D2:
+	case SNDRV_CTL_POWER_D3cold:
+		/* not supported yet */
 	default:
 		return -EINVAL;
 	}
@@ -1045,9 +1063,9 @@
 	case SNDRV_CTL_IOCTL_ELEM_INFO:
 		return snd_ctl_elem_info(ctl, argp);
 	case SNDRV_CTL_IOCTL_ELEM_READ:
-		return snd_ctl_elem_read(ctl->card, argp);
+		return snd_ctl_elem_read_user(ctl->card, argp);
 	case SNDRV_CTL_IOCTL_ELEM_WRITE:
-		return snd_ctl_elem_write(ctl, argp);
+		return snd_ctl_elem_write_user(ctl, argp);
 	case SNDRV_CTL_IOCTL_ELEM_LOCK:
 		return snd_ctl_elem_lock(ctl, argp);
 	case SNDRV_CTL_IOCTL_ELEM_UNLOCK:
@@ -1252,11 +1270,11 @@
 };
 
 /*
- * registration of the control device:
- * called from init.c
+ * registration of the control device
  */
-int snd_ctl_register(snd_card_t *card)
+static int snd_ctl_dev_register(snd_device_t *device)
 {
+	snd_card_t *card = device->device_data;
 	int err, cardnum;
 	char name[16];
 
@@ -1271,11 +1289,11 @@
 }
 
 /*
- * disconnection of the control device:
- * called from init.c
+ * disconnection of the control device
  */
-int snd_ctl_disconnect(snd_card_t *card)
+static int snd_ctl_dev_disconnect(snd_device_t *device)
 {
+	snd_card_t *card = device->device_data;
 	struct list_head *flist;
 	snd_ctl_file_t *ctl;
 
@@ -1290,19 +1308,13 @@
 }
 
 /*
- * de-registration of the control device:
- * called from init.c
+ * free all controls
  */
-int snd_ctl_unregister(snd_card_t *card)
+static int snd_ctl_dev_free(snd_device_t *device)
 {
-	int err, cardnum;
+	snd_card_t *card = device->device_data;
 	snd_kcontrol_t *control;
 
-	snd_assert(card != NULL, return -ENXIO);
-	cardnum = card->number;
-	snd_assert(cardnum >= 0 && cardnum < SNDRV_CARDS, return -ENXIO);
-	if ((err = snd_unregister_device(SNDRV_DEVICE_TYPE_CONTROL, card, 0)) < 0)
-		return err;
 	down_write(&card->controls_rwsem);
 	while (!list_empty(&card->controls)) {
 		control = snd_kcontrol(card->controls.next);
@@ -1310,4 +1322,37 @@
 	}
 	up_write(&card->controls_rwsem);
 	return 0;
+}
+
+/*
+ * de-registration of the control device
+ */
+static int snd_ctl_dev_unregister(snd_device_t *device)
+{
+	snd_card_t *card = device->device_data;
+	int err, cardnum;
+
+	snd_assert(card != NULL, return -ENXIO);
+	cardnum = card->number;
+	snd_assert(cardnum >= 0 && cardnum < SNDRV_CARDS, return -ENXIO);
+	if ((err = snd_unregister_device(SNDRV_DEVICE_TYPE_CONTROL, card, 0)) < 0)
+		return err;
+	return snd_ctl_dev_free(device);
+}
+
+/*
+ * create control core:
+ * called from init.c
+ */
+int snd_ctl_create(snd_card_t *card)
+{
+	static snd_device_ops_t ops = {
+		.dev_free = snd_ctl_dev_free,
+		.dev_register =	snd_ctl_dev_register,
+		.dev_disconnect = snd_ctl_dev_disconnect,
+		.dev_unregister = snd_ctl_dev_unregister
+	};
+
+	snd_assert(card != NULL, return -ENXIO);
+	return snd_device_new(card, SNDRV_DEV_CONTROL, card, &ops);
 }
diff -Nru a/sound/core/hwdep.c b/sound/core/hwdep.c
--- a/sound/core/hwdep.c	2005-01-10 20:11:16 -08:00
+++ b/sound/core/hwdep.c	2005-01-10 20:11:16 -08:00
@@ -35,7 +35,7 @@
 MODULE_DESCRIPTION("Hardware dependent layer");
 MODULE_LICENSE("GPL");
 
-snd_hwdep_t *snd_hwdep_devices[SNDRV_CARDS * SNDRV_MINOR_HWDEPS];
+static snd_hwdep_t *snd_hwdep_devices[SNDRV_CARDS * SNDRV_MINOR_HWDEPS];
 
 static DECLARE_MUTEX(register_mutex);
 
diff -Nru a/sound/core/info.c b/sound/core/info.c
--- a/sound/core/info.c	2005-01-10 20:11:22 -08:00
+++ b/sound/core/info.c	2005-01-10 20:11:22 -08:00
@@ -20,18 +20,14 @@
  */
 
 #include <sound/driver.h>
-#include <linux/version.h>
 #include <linux/init.h>
 #include <linux/vmalloc.h>
 #include <linux/time.h>
 #include <linux/smp_lock.h>
-#include <linux/utsname.h>
-#include <linux/config.h>
-
 #include <sound/core.h>
-#include <sound/version.h>
 #include <sound/minors.h>
 #include <sound/info.h>
+#include <sound/version.h>
 #include <linux/proc_fs.h>
 #include <linux/devfs_fs_kernel.h>
 #include <stdarg.h>
@@ -129,8 +125,8 @@
 	de->owner = THIS_MODULE;
 }
 
-void snd_remove_proc_entry(struct proc_dir_entry *parent,
-			   struct proc_dir_entry *de)
+static void snd_remove_proc_entry(struct proc_dir_entry *parent,
+				  struct proc_dir_entry *de)
 {
 	if (de)
 		remove_proc_entry(de->name, parent);
@@ -525,8 +521,8 @@
  *
  * Returns the pointer of new instance or NULL on failure.
  */
-struct proc_dir_entry *snd_create_proc_entry(const char *name, mode_t mode,
-					     struct proc_dir_entry *parent)
+static struct proc_dir_entry *snd_create_proc_entry(const char *name, mode_t mode,
+						    struct proc_dir_entry *parent)
 {
 	struct proc_dir_entry *p;
 	p = create_proc_entry(name, mode, parent);
@@ -895,8 +891,7 @@
 {
 	if (entry == NULL)
 		return;
-	if (entry->name)
-		kfree((char *)entry->name);
+	kfree(entry->name);
 	if (entry->private_free)
 		entry->private_free(entry);
 	kfree(entry);
@@ -962,18 +957,10 @@
 
 static void snd_info_version_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer)
 {
-	static char *kernel_version = system_utsname.release;
-
 	snd_iprintf(buffer,
-		    "Advanced Linux Sound Architecture Driver Version " CONFIG_SND_VERSION CONFIG_SND_DATE ".\n"
-		    "Compiled on " __DATE__ " for kernel %s"
-#ifdef CONFIG_SMP
-		    " (SMP)"
-#endif
-#ifdef MODVERSIONS
-		    " with versioned symbols"
-#endif
-		    ".\n", kernel_version);
+		    "Advanced Linux Sound Architecture Driver Version "
+		    CONFIG_SND_VERSION CONFIG_SND_DATE ".\n"
+		   );
 }
 
 static int __init snd_info_version_init(void)
diff -Nru a/sound/core/init.c b/sound/core/init.c
--- a/sound/core/init.c	2005-01-10 20:11:17 -08:00
+++ b/sound/core/init.c	2005-01-10 20:11:17 -08:00
@@ -37,7 +37,6 @@
 	struct snd_shutdown_f_ops *next;
 };
 
-int snd_cards_count = 0;
 unsigned int snd_cards_lock = 0;	/* locked for registering/using */
 snd_card_t *snd_cards[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = NULL};
 rwlock_t snd_card_rwlock = RW_LOCK_UNLOCKED;
@@ -125,7 +124,7 @@
 #endif
 	/* the control interface cannot be accessed from the user space until */
 	/* snd_cards_bitmask and snd_cards are set with snd_card_register */
-	if ((err = snd_ctl_register(card)) < 0) {
+	if ((err = snd_ctl_create(card)) < 0) {
 		snd_printd("unable to register control minors\n");
 		goto __error;
 	}
@@ -138,7 +137,7 @@
 	return card;
 
       __error_ctl:
-	snd_ctl_unregister(card);
+	snd_device_free_all(card, SNDRV_DEV_CMD_PRE);
       __error:
 	kfree(card);
       	return NULL;
@@ -217,8 +216,6 @@
 	/* phase 3: notify all connected devices about disconnection */
 	/* at this point, they cannot respond to any calls except release() */
 
-	snd_ctl_disconnect(card);
-
 #if defined(CONFIG_SND_MIXER_OSS) || defined(CONFIG_SND_MIXER_OSS_MODULE)
 	if (snd_mixer_oss_notify_callback)
 		snd_mixer_oss_notify_callback(card, SND_MIXER_OSS_NOTIFY_DISCONNECT);
@@ -251,7 +248,6 @@
 		return -EINVAL;
 	write_lock(&snd_card_rwlock);
 	snd_cards[card->number] = NULL;
-	snd_cards_count--;
 	write_unlock(&snd_card_rwlock);
 
 #ifdef CONFIG_PM
@@ -279,10 +275,6 @@
 		snd_printk(KERN_ERR "unable to free all devices (normal)\n");
 		/* Fatal, but this situation should never occur */
 	}
-	if (snd_ctl_unregister(card) < 0) {
-		snd_printk(KERN_ERR "unable to unregister control minors\n");
-		/* Not fatal error */
-	}
 	if (snd_device_free_all(card, SNDRV_DEV_CMD_POST) < 0) {
 		snd_printk(KERN_ERR "unable to free all devices (post)\n");
 		/* Fatal, but this situation should never occur */
@@ -441,7 +433,6 @@
 	if (card->id[0] == '\0')
 		choose_default_id(card);
 	snd_cards[card->number] = card;
-	snd_cards_count++;
 	write_unlock(&snd_card_rwlock);
 	if ((err = snd_info_card_register(card)) < 0) {
 		snd_printd("unable to create card info\n");
@@ -665,12 +656,11 @@
 	spin_unlock(&card->files_lock);
 	if (card->files == NULL)
 		wake_up(&card->shutdown_sleep);
-	if (mfile) {
-		kfree(mfile);
-	} else {
+	if (!mfile) {
 		snd_printk(KERN_ERR "ALSA card file remove problem (%p)\n", file);
 		return -ENOENT;
 	}
+	kfree(mfile);
 	return 0;
 }
 
@@ -745,12 +735,18 @@
 
 	switch (rqst) {
 	case PM_SUSPEND:
+		if (card->power_state == SNDRV_CTL_POWER_D3hot)
+			break;
 		/* FIXME: the correct state value? */
 		card->pm_suspend(card, 0);
+		snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
 		break;
 	case PM_RESUME:
+		if (card->power_state == SNDRV_CTL_POWER_D0)
+			break;
 		/* FIXME: the correct state value? */
 		card->pm_resume(card, 0);
+		snd_power_change_state(card, SNDRV_CTL_POWER_D0);
 		break;
 	}
 	return 0;
@@ -793,6 +789,7 @@
 	/* FIXME: correct state value? */
 	err = card->pm_suspend(card, 0);
 	pci_save_state(dev);
+	snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
 	return err;
 }
 
@@ -806,7 +803,9 @@
 	/* restore the PCI config space */
 	pci_restore_state(dev);
 	/* FIXME: correct state value? */
-	return card->pm_resume(card, 0);
+	card->pm_resume(card, 0);
+	snd_power_change_state(card, SNDRV_CTL_POWER_D0);
+	return 0;
 }
 #endif
 
diff -Nru a/sound/core/ioctl32/hwdep32.c b/sound/core/ioctl32/hwdep32.c
--- a/sound/core/ioctl32/hwdep32.c	2005-01-10 20:11:22 -08:00
+++ b/sound/core/ioctl32/hwdep32.c	2005-01-10 20:11:22 -08:00
@@ -36,24 +36,24 @@
 
 static inline int _snd_ioctl32_hwdep_dsp_image(unsigned int fd, unsigned int cmd, unsigned long arg, struct file *file, unsigned int native_ctl)
 {
-	struct sndrv_hwdep_dsp_image data;
-	struct sndrv_hwdep_dsp_image32 data32;
-	mm_segment_t oldseg;
-	int err;
+	struct sndrv_hwdep_dsp_image __user *data, *dst;
+	struct sndrv_hwdep_dsp_image32 __user *data32, *src;
+	compat_caddr_t ptr;
 
-	if (copy_from_user(&data32, (void __user *)arg, sizeof(data32)))
+	data32 = compat_ptr(arg);
+	data = compat_alloc_user_space(sizeof(*data));
+
+	/* index and name */
+	if (copy_in_user(data, data32, 4 + 64))
+		return -EFAULT;
+	if (__get_user(ptr, &data32->image) ||
+	    __put_user(compat_ptr(ptr), &data->image))
 		return -EFAULT;
-	memset(&data, 0, sizeof(data));
-	data.index = data32.index;
-	memcpy(data.name, data32.name, sizeof(data.name));
-	data.image = compat_ptr(data32.image);
-	data.length = data32.length;
-	data.driver_data = data32.driver_data;
-	oldseg = get_fs();
-	set_fs(KERNEL_DS);
-	err = file->f_op->ioctl(file->f_dentry->d_inode, file, native_ctl, (unsigned long)&data);
-	set_fs(oldseg);
-	return err;
+	src = data32;
+	dst = data;
+	COPY_CVT(length);
+	COPY_CVT(driver_data);
+	return file->f_op->ioctl(file->f_dentry->d_inode, file, native_ctl, (unsigned long)data);
 }
 
 DEFINE_ALSA_IOCTL_ENTRY(hwdep_dsp_image, hwdep_dsp_image, SNDRV_HWDEP_IOCTL_DSP_LOAD);
diff -Nru a/sound/core/ioctl32/ioctl32.c b/sound/core/ioctl32/ioctl32.c
--- a/sound/core/ioctl32/ioctl32.c	2005-01-10 20:11:16 -08:00
+++ b/sound/core/ioctl32/ioctl32.c	2005-01-10 20:11:16 -08:00
@@ -27,9 +27,11 @@
 #include <linux/fs.h>
 #include <sound/core.h>
 #include <sound/control.h>
+#include <sound/minors.h>
 #include <asm/uaccess.h>
 #include "ioctl32.h"
 
+
 /*
  * register/unregister mappers
  * exported for other modules
@@ -93,43 +95,28 @@
 	unsigned char reserved[50];
 } /* don't set packed attribute here */;
 
-#define CVT_sndrv_ctl_elem_list()\
-{\
-	COPY(offset);\
-	COPY(space);\
-	COPY(used);\
-	COPY(count);\
-	CPTR(pids);\
-}
-
 static inline int _snd_ioctl32_ctl_elem_list(unsigned int fd, unsigned int cmd, unsigned long arg, struct file *file, unsigned int native_ctl)
 {
-	struct sndrv_ctl_elem_list32 data32;
-	struct sndrv_ctl_elem_list data;
-	mm_segment_t oldseg;
+	struct sndrv_ctl_elem_list32 __user *data32;
+	struct sndrv_ctl_elem_list __user *data;
+	compat_caddr_t ptr;
 	int err;
 
-	if (copy_from_user(&data32, (void __user *)arg, sizeof(data32)))
+	data32 = compat_ptr(arg);
+	data = compat_alloc_user_space(sizeof(*data));
+
+	/* offset, space, used, count */
+	if (copy_in_user(data, data32, 4 * sizeof(u32)))
 		return -EFAULT;
-	memset(&data, 0, sizeof(data));
-	data.offset = data32.offset;
-	data.space = data32.space;
-	data.used = data32.used;
-	data.count = data32.count;
-	data.pids = compat_ptr(data32.pids);
-	oldseg = get_fs();
-	set_fs(KERNEL_DS);
-	err = file->f_op->ioctl(file->f_dentry->d_inode, file, native_ctl, (unsigned long)&data);
-	set_fs(oldseg);
+	/* pids */
+	if (__get_user(ptr, &data32->pids) ||
+	    __put_user(compat_ptr(ptr), &data->pids))
+		return -EFAULT;
+	err = file->f_op->ioctl(file->f_dentry->d_inode, file, native_ctl, (unsigned long)data);
 	if (err < 0)
 		return err;
 	/* copy the result */
-	data32.offset = data.offset;
-	data32.space = data.space;
-	data32.used = data.used;
-	data32.count = data.count;
-	//data.pids = data.pids;
-	if (copy_to_user((void __user *)arg, &data32, sizeof(data32)))
+	if (copy_in_user(data32, data, 4 * sizeof(u32)))
 		return -EFAULT;
 	return 0;
 }
@@ -170,54 +157,59 @@
 
 static inline int _snd_ioctl32_ctl_elem_info(unsigned int fd, unsigned int cmd, unsigned long arg, struct file *file, unsigned int native_ctl)
 {
-	struct sndrv_ctl_elem_info data;
-	struct sndrv_ctl_elem_info32 data32;
+	struct sndrv_ctl_elem_info __user *data, *src;
+	struct sndrv_ctl_elem_info32 __user *data32, *dst;
+	unsigned int type;
 	int err;
-	mm_segment_t oldseg;
 
-	if (copy_from_user(&data32, (void __user *)arg, sizeof(data32)))
+	data32 = compat_ptr(arg);
+	data = compat_alloc_user_space(sizeof(*data));
+
+	/* copy id */
+	if (copy_in_user(&data->id, &data32->id, sizeof(data->id)))
 		return -EFAULT;
-	memset(&data, 0, sizeof(data));
-	data.id = data32.id;
 	/* we need to copy the item index.
 	 * hope this doesn't break anything..
 	 */
-	data.value.enumerated.item = data32.value.enumerated.item;
-	oldseg = get_fs();
-	set_fs(KERNEL_DS);
-	err = file->f_op->ioctl(file->f_dentry->d_inode, file, native_ctl, (unsigned long)&data);
-	set_fs(oldseg);
+	if (copy_in_user(&data->value.enumerated.item,
+			 &data32->value.enumerated.item,
+			 sizeof(data->value.enumerated.item)))
+		return -EFAULT;
+	err = file->f_op->ioctl(file->f_dentry->d_inode, file, native_ctl, (unsigned long)data);
 	if (err < 0)
 		return err;
 	/* restore info to 32bit */
-	data32.id = data.id;
-	data32.type = data.type;
-	data32.access = data.access;
-	data32.count = data.count;
-	data32.owner = data.owner;
-	switch (data.type) {
+	/* for COPY_CVT macro */
+	src = data;
+	dst = data32;
+	/* id, type, access, count */
+	if (copy_in_user(&data32->id, &data->id, sizeof(data->id)) ||
+	    copy_in_user(&data32->type, &data->type, 3 * sizeof(u32)))
+		return -EFAULT;
+	COPY_CVT(owner);
+	__get_user(type, &data->type);
+	switch (type) {
 	case SNDRV_CTL_ELEM_TYPE_BOOLEAN:
 	case SNDRV_CTL_ELEM_TYPE_INTEGER:
-		data32.value.integer.min = data.value.integer.min;
-		data32.value.integer.max = data.value.integer.max;
-		data32.value.integer.step = data.value.integer.step;
+		COPY_CVT(value.integer.min);
+		COPY_CVT(value.integer.max);
+		COPY_CVT(value.integer.step);
 		break;
 	case SNDRV_CTL_ELEM_TYPE_INTEGER64:
-		data32.value.integer64.min = data.value.integer64.min;
-		data32.value.integer64.max = data.value.integer64.max;
-		data32.value.integer64.step = data.value.integer64.step;
+		if (copy_in_user(&data32->value.integer64,
+				 &data->value.integer64,
+				 sizeof(data->value.integer64)))
+			return -EFAULT;
 		break;
 	case SNDRV_CTL_ELEM_TYPE_ENUMERATED:
-		data32.value.enumerated.items = data.value.enumerated.items;
-		data32.value.enumerated.item = data.value.enumerated.item;
-		memcpy(data32.value.enumerated.name, data.value.enumerated.name,
-		       sizeof(data.value.enumerated.name));
+		if (copy_in_user(&data32->value.enumerated,
+				 &data->value.enumerated,
+				 sizeof(data->value.enumerated)))
+			return -EFAULT;
 		break;
 	default:
 		break;
 	}
-	if (copy_to_user((void __user *)arg, &data32, sizeof(data32)))
-		return -EFAULT;
 	return 0;
 }
 
@@ -250,130 +242,173 @@
 
 
 /* hmm, it's so hard to retrieve the value type from the control id.. */
-static int get_ctl_type(struct file *file, snd_ctl_elem_id_t *id)
+static int get_ctl_type(snd_card_t *card, snd_ctl_elem_id_t *id)
 {
-	snd_ctl_file_t *ctl;
 	snd_kcontrol_t *kctl;
 	snd_ctl_elem_info_t info;
 	int err;
 
-	ctl = file->private_data;
-
-	down_read(&ctl->card->controls_rwsem);
-	kctl = snd_ctl_find_id(ctl->card, id);
+	down_read(&card->controls_rwsem);
+	kctl = snd_ctl_find_id(card, id);
 	if (! kctl) {
-		up_read(&ctl->card->controls_rwsem);
+		up_read(&card->controls_rwsem);
 		return -ENXIO;
 	}
 	info.id = *id;
 	err = kctl->info(kctl, &info);
-	up_read(&ctl->card->controls_rwsem);
+	up_read(&card->controls_rwsem);
 	if (err >= 0)
 		err = info.type;
 	return err;
 }
 
+extern int snd_major;
 
 static inline int _snd_ioctl32_ctl_elem_value(unsigned int fd, unsigned int cmd, unsigned long arg, struct file *file, unsigned int native_ctl)
 {
 	struct sndrv_ctl_elem_value *data;
-	struct sndrv_ctl_elem_value32 *data32;
+	struct sndrv_ctl_elem_value32 __user *data32;
+	snd_ctl_file_t *ctl;
 	int err, i;
 	int type;
-	mm_segment_t oldseg;
 
-	/* FIXME: check the sane ioctl.. */
+	/* sanity check */
+	if (imajor(file->f_dentry->d_inode) != snd_major ||
+	    SNDRV_MINOR_DEVICE(iminor(file->f_dentry->d_inode)) != SNDRV_MINOR_CONTROL)
+		return -ENOTTY;
+
+	if ((ctl = file->private_data) == NULL)
+		return -ENOTTY;
 
+	data32 = compat_ptr(arg);
 	data = kmalloc(sizeof(*data), GFP_KERNEL);
-	data32 = kmalloc(sizeof(*data32), GFP_KERNEL);
-	if (data == NULL || data32 == NULL) {
-		err = -ENOMEM;
+	if (data == NULL)
+		return -ENOMEM;
+
+	if (copy_from_user(&data->id, &data32->id, sizeof(data->id))) {
+		err = -EFAULT;
 		goto __end;
 	}
-
-	if (copy_from_user(data32, (void __user *)arg, sizeof(*data32))) {
+	if (__get_user(data->indirect, &data32->indirect)) {
 		err = -EFAULT;
 		goto __end;
 	}
-	memset(data, 0, sizeof(*data));
-	data->id = data32->id;
-	data->indirect = data32->indirect;
-	if (data->indirect) /* FIXME: this is not correct for long arrays */
-		data->value.integer.value_ptr = compat_ptr(data32->value.integer.value_ptr);
-	type = get_ctl_type(file, &data->id);
+	/* FIXME: indirect access is not supported */
+	if (data->indirect) {
+		err = -EINVAL;
+		goto __end;
+	}
+	type = get_ctl_type(ctl->card, &data->id);
 	if (type < 0) {
 		err = type;
 		goto __end;
 	}
-	if (! data->indirect) {
-		switch (type) {
-		case SNDRV_CTL_ELEM_TYPE_BOOLEAN:
-		case SNDRV_CTL_ELEM_TYPE_INTEGER:
-			for (i = 0; i < 128; i++)
-				data->value.integer.value[i] = data32->value.integer.value[i];
-			break;
-		case SNDRV_CTL_ELEM_TYPE_INTEGER64:
-			for (i = 0; i < 64; i++)
-				data->value.integer64.value[i] = data32->value.integer64.value[i];
-			break;
-		case SNDRV_CTL_ELEM_TYPE_ENUMERATED:
-			for (i = 0; i < 128; i++)
-				data->value.enumerated.item[i] = data32->value.enumerated.item[i];
-			break;
-		case SNDRV_CTL_ELEM_TYPE_BYTES:
-			memcpy(data->value.bytes.data, data32->value.bytes.data,
-			       sizeof(data->value.bytes.data));
-			break;
-		case SNDRV_CTL_ELEM_TYPE_IEC958:
-			data->value.iec958 = data32->value.iec958;
-			break;
-		default:
-			printk("unknown type %d\n", type);
-			break;
+
+	switch (type) {
+	case SNDRV_CTL_ELEM_TYPE_BOOLEAN:
+	case SNDRV_CTL_ELEM_TYPE_INTEGER:
+		for (i = 0; i < 128; i++) {
+			int val;
+			if (__get_user(val, &data32->value.integer.value[i])) {
+				err = -EFAULT;
+				goto __end;
+			}
+			data->value.integer.value[i] = val;
 		}
+		break;
+	case SNDRV_CTL_ELEM_TYPE_INTEGER64:
+		if (__copy_from_user(data->value.integer64.value,
+				     data32->value.integer64.value,
+				     sizeof(data->value.integer64.value))) {
+			err = -EFAULT;
+			goto __end;
+		}
+		break;
+	case SNDRV_CTL_ELEM_TYPE_ENUMERATED:
+		if (__copy_from_user(data->value.enumerated.item,
+				     data32->value.enumerated.item,
+				     sizeof(data32->value.enumerated.item))) {
+			err = -EFAULT;
+			goto __end;
+		}
+		break;
+	case SNDRV_CTL_ELEM_TYPE_BYTES:
+		if (__copy_from_user(data->value.bytes.data,
+				     data32->value.bytes.data,
+				     sizeof(data32->value.bytes.data))) {
+			err = -EFAULT;
+			goto __end;
+		}
+		break;
+	case SNDRV_CTL_ELEM_TYPE_IEC958:
+		if (__copy_from_user(&data->value.iec958,
+				     &data32->value.iec958,
+				     sizeof(data32->value.iec958))) {
+			err = -EFAULT;
+			goto __end;
+		}
+		break;
+	default:
+		printk(KERN_ERR "snd_ioctl32_ctl_elem_value: unknown type %d\n", type);
+		err = -EINVAL;
+		goto __end;
 	}
 
-	oldseg = get_fs();
-	set_fs(KERNEL_DS);
-	err = file->f_op->ioctl(file->f_dentry->d_inode, file, native_ctl, (unsigned long)data);
-	set_fs(oldseg);
+	if (native_ctl == SNDRV_CTL_IOCTL_ELEM_READ)
+		err = snd_ctl_elem_read(ctl->card, data);
+	else
+		err = snd_ctl_elem_write(ctl->card, ctl, data);
 	if (err < 0)
 		goto __end;
 	/* restore info to 32bit */
-	if (! data->indirect) {
-		switch (type) {
-		case SNDRV_CTL_ELEM_TYPE_BOOLEAN:
-		case SNDRV_CTL_ELEM_TYPE_INTEGER:
-			for (i = 0; i < 128; i++)
-				data32->value.integer.value[i] = data->value.integer.value[i];
-			break;
-		case SNDRV_CTL_ELEM_TYPE_INTEGER64:
-			for (i = 0; i < 64; i++)
-				data32->value.integer64.value[i] = data->value.integer64.value[i];
-			break;
-		case SNDRV_CTL_ELEM_TYPE_ENUMERATED:
-			for (i = 0; i < 128; i++)
-				data32->value.enumerated.item[i] = data->value.enumerated.item[i];
-			break;
-		case SNDRV_CTL_ELEM_TYPE_BYTES:
-			memcpy(data32->value.bytes.data, data->value.bytes.data,
-			       sizeof(data->value.bytes.data));
-			break;
-		case SNDRV_CTL_ELEM_TYPE_IEC958:
-			data32->value.iec958 = data->value.iec958;
-			break;
-		default:
-			break;
+	switch (type) {
+	case SNDRV_CTL_ELEM_TYPE_BOOLEAN:
+	case SNDRV_CTL_ELEM_TYPE_INTEGER:
+		for (i = 0; i < 128; i++) {
+			int val;
+			val = data->value.integer.value[i];
+			if (__put_user(val, &data32->value.integer.value[i])) {
+				err = -EFAULT;
+				goto __end;
+			}
+		}
+		break;
+	case SNDRV_CTL_ELEM_TYPE_INTEGER64:
+		if (__copy_to_user(data32->value.integer64.value,
+				   data->value.integer64.value,
+				   sizeof(data32->value.integer64.value))) {
+			err = -EFAULT;
+			goto __end;
+		}
+		break;
+	case SNDRV_CTL_ELEM_TYPE_ENUMERATED:
+		if (__copy_to_user(data32->value.enumerated.item,
+				   data->value.enumerated.item,
+				   sizeof(data32->value.enumerated.item))) {
+			err = -EFAULT;
+			goto __end;
 		}
+		break;
+	case SNDRV_CTL_ELEM_TYPE_BYTES:
+		if (__copy_to_user(data32->value.bytes.data,
+				   data->value.bytes.data,
+				   sizeof(data32->value.bytes.data))) {
+			err = -EFAULT;
+			goto __end;
+		}
+		break;
+	case SNDRV_CTL_ELEM_TYPE_IEC958:
+		if (__copy_to_user(&data32->value.iec958,
+				   &data->value.iec958,
+				   sizeof(data32->value.iec958))) {
+			err = -EFAULT;
+			goto __end;
+		}
+		break;
 	}
 	err = 0;
-	if (copy_to_user((void __user *)arg, data32, sizeof(*data32)))
-		err = -EFAULT;
       __end:
-      	if (data32)
-      		kfree(data32);
-	if (data)
-		kfree(data);
+	kfree(data);
 	return err;
 }
 
diff -Nru a/sound/core/ioctl32/ioctl32.h b/sound/core/ioctl32/ioctl32.h
--- a/sound/core/ioctl32/ioctl32.h	2005-01-10 20:11:18 -08:00
+++ b/sound/core/ioctl32/ioctl32.h	2005-01-10 20:11:18 -08:00
@@ -28,20 +28,37 @@
 
 #include <linux/compat.h>
 
-#define COPY(x)  (dst->x = src->x)
-#define CPTR(x)	 (dst->x = compat_ptr(src->x))
+#define COPY(x) \
+	do { \
+		if (copy_in_user(&dst->x, &src->x, sizeof(dst->x))) \
+			return -EFAULT; \
+	} while (0)
+
+#define COPY_ARRAY(x) \
+	do { \
+		if (copy_in_user(dst->x, src->x, sizeof(dst->x))) \
+			return -EFAULT; \
+	} while (0)
+
+#define COPY_CVT(x) \
+	do { \
+		__typeof__(src->x) __val_tmp; \
+		if (get_user(__val_tmp, &src->x) || \
+		    put_user(__val_tmp, &dst->x))\
+			return -EFAULT; \
+	} while (0)
 
 #define convert_from_32(type, dstp, srcp)\
 {\
-	struct sndrv_##type *dst = dstp;\
-	struct sndrv_##type##32 *src = srcp;\
+	struct sndrv_##type __user *dst = dstp;\
+	struct sndrv_##type##32 __user *src = srcp;\
 	CVT_##sndrv_##type();\
 }
 
 #define convert_to_32(type, dstp, srcp)\
 {\
-	struct sndrv_##type *src = srcp;\
-	struct sndrv_##type##32 *dst = dstp;\
+	struct sndrv_##type __user *src = srcp;\
+	struct sndrv_##type##32 __user *dst = dstp;\
 	CVT_##sndrv_##type();\
 }
 
@@ -49,65 +66,19 @@
 #define DEFINE_ALSA_IOCTL(type) \
 static inline int _snd_ioctl32_##type(unsigned int fd, unsigned int cmd, unsigned long arg, struct file *file, unsigned int native_ctl)\
 {\
-	struct sndrv_##type##32 data32;\
-	struct sndrv_##type data;\
-	mm_segment_t oldseg;\
-	int err;\
-	if (copy_from_user(&data32, (void __user *)arg, sizeof(data32)))\
-		return -EFAULT;\
-	memset(&data, 0, sizeof(data));\
-	convert_from_32(type, &data, &data32);\
-	oldseg = get_fs();\
-	set_fs(KERNEL_DS);\
-	err = file->f_op->ioctl(file->f_dentry->d_inode, file, native_ctl, (unsigned long)&data);\
-	set_fs(oldseg);\
-	if (err < 0) \
-		return err;\
-	if (native_ctl & (_IOC_READ << _IOC_DIRSHIFT)) {\
-		convert_to_32(type, &data32, &data);\
-		if (copy_to_user((void __user *)arg, &data32, sizeof(data32)))\
-			return -EFAULT;\
-	}\
-	return 0;\
-}
-
-#define DEFINE_ALSA_IOCTL_BIG(type) \
-static inline int _snd_ioctl32_##type(unsigned int fd, unsigned int cmd, unsigned long arg, struct file *file, unsigned int native_ctl)\
-{\
-	struct sndrv_##type##32 *data32;\
-	struct sndrv_##type *data;\
-	mm_segment_t oldseg;\
+	struct sndrv_##type##32 __user *data32;\
+	struct sndrv_##type __user *data;\
 	int err;\
-	data32 = kmalloc(sizeof(*data32), GFP_KERNEL); \
-	data = kmalloc(sizeof(*data), GFP_KERNEL); \
-	if (data32 == NULL || data == NULL) { \
-		err = -ENOMEM; \
-		goto __end; \
-	}\
-	if (copy_from_user(data32, (void __user *)arg, sizeof(*data32))) { \
-		err = -EFAULT; \
-		goto __end; \
-	}\
-	memset(data, 0, sizeof(*data));\
+	data32 = compat_ptr(arg);\
+	data = compat_alloc_user_space(sizeof(*data));\
 	convert_from_32(type, data, data32);\
-	oldseg = get_fs();\
-	set_fs(KERNEL_DS);\
 	err = file->f_op->ioctl(file->f_dentry->d_inode, file, native_ctl, (unsigned long)data);\
-	set_fs(oldseg);\
 	if (err < 0) \
-		goto __end;\
-	err = 0;\
+		return err;\
 	if (native_ctl & (_IOC_READ << _IOC_DIRSHIFT)) {\
 		convert_to_32(type, data32, data);\
-		if (copy_to_user((void __user *)arg, data32, sizeof(*data32)))\
-			err = -EFAULT;\
 	}\
-      __end:\
-      	if (data)\
-      		kfree(data);\
-      	if (data32)\
-      		kfree(data32);\
-	return err;\
+	return 0;\
 }
 
 #define DEFINE_ALSA_IOCTL_ENTRY(name,type,native_ctl) \
diff -Nru a/sound/core/ioctl32/pcm32.c b/sound/core/ioctl32/pcm32.c
--- a/sound/core/ioctl32/pcm32.c	2005-01-10 20:11:20 -08:00
+++ b/sound/core/ioctl32/pcm32.c	2005-01-10 20:11:20 -08:00
@@ -24,6 +24,7 @@
 #include <linux/compat.h>
 #include <sound/core.h>
 #include <sound/pcm.h>
+#include <sound/minors.h>
 #include "ioctl32.h"
 
 
@@ -41,23 +42,15 @@
 	u32 val;
 };
 
-#define CVT_sndrv_pcm_sframes_str() { COPY(val); }
-#define CVT_sndrv_pcm_uframes_str() { COPY(val); }
+#define CVT_sndrv_pcm_sframes_str() { COPY_CVT(val); }
+#define CVT_sndrv_pcm_uframes_str() { COPY_CVT(val); }
 
 
-struct sndrv_interval32 {
-	u32 min, max;
-	unsigned int openmin:1,
-		     openmax:1,
-		     integer:1,
-		     empty:1;
-};
-
 struct sndrv_pcm_hw_params32 {
 	u32 flags;
 	struct sndrv_mask masks[SNDRV_PCM_HW_PARAM_LAST_MASK - SNDRV_PCM_HW_PARAM_FIRST_MASK + 1]; /* this must be identical */
 	struct sndrv_mask mres[5];	/* reserved masks */
-	struct sndrv_interval32 intervals[SNDRV_PCM_HW_PARAM_LAST_INTERVAL - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL + 1];
+	struct sndrv_interval intervals[SNDRV_PCM_HW_PARAM_LAST_INTERVAL - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL + 1];
 	struct sndrv_interval ires[9];	/* reserved intervals */
 	u32 rmask;
 	u32 cmask;
@@ -69,31 +62,6 @@
 	unsigned char reserved[64];
 } __attribute__((packed));
 
-#define numberof(array) ARRAY_SIZE(array)
-
-#define CVT_sndrv_pcm_hw_params()\
-{\
-	unsigned int i;\
-	COPY(flags);\
-	for (i = 0; i < numberof(dst->masks); i++)\
-		COPY(masks[i]);\
-	for (i = 0; i < numberof(dst->intervals); i++) {\
-		COPY(intervals[i].min);\
-		COPY(intervals[i].max);\
-		COPY(intervals[i].openmin);\
-		COPY(intervals[i].openmax);\
-		COPY(intervals[i].integer);\
-		COPY(intervals[i].empty);\
-	}\
-	COPY(rmask);\
-	COPY(cmask);\
-	COPY(info);\
-	COPY(msbits);\
-	COPY(rate_num);\
-	COPY(rate_den);\
-	COPY(fifo_size);\
-}
-
 struct sndrv_pcm_sw_params32 {
 	s32 tstamp_mode;
 	u32 period_step;
@@ -113,13 +81,13 @@
 	COPY(tstamp_mode);\
 	COPY(period_step);\
 	COPY(sleep_min);\
-	COPY(avail_min);\
-	COPY(xfer_align);\
-	COPY(start_threshold);\
-	COPY(stop_threshold);\
-	COPY(silence_threshold);\
-	COPY(silence_size);\
-	COPY(boundary);\
+	COPY_CVT(avail_min);\
+	COPY_CVT(xfer_align);\
+	COPY_CVT(start_threshold);\
+	COPY_CVT(stop_threshold);\
+	COPY_CVT(silence_threshold);\
+	COPY_CVT(silence_size);\
+	COPY_CVT(boundary);\
 }
 
 struct sndrv_pcm_channel_info32 {
@@ -132,7 +100,7 @@
 #define CVT_sndrv_pcm_channel_info()\
 {\
 	COPY(channel);\
-	COPY(offset);\
+	COPY_CVT(offset);\
 	COPY(first);\
 	COPY(step);\
 }
@@ -154,16 +122,16 @@
 #define CVT_sndrv_pcm_status()\
 {\
 	COPY(state);\
-	COPY(trigger_tstamp.tv_sec);\
-	COPY(trigger_tstamp.tv_nsec);\
-	COPY(tstamp.tv_sec);\
-	COPY(tstamp.tv_nsec);\
-	COPY(appl_ptr);\
-	COPY(hw_ptr);\
-	COPY(delay);\
-	COPY(avail);\
-	COPY(avail_max);\
-	COPY(overrange);\
+	COPY_CVT(trigger_tstamp.tv_sec);\
+	COPY_CVT(trigger_tstamp.tv_nsec);\
+	COPY_CVT(tstamp.tv_sec);\
+	COPY_CVT(tstamp.tv_nsec);\
+	COPY_CVT(appl_ptr);\
+	COPY_CVT(hw_ptr);\
+	COPY_CVT(delay);\
+	COPY_CVT(avail);\
+	COPY_CVT(avail_max);\
+	COPY_CVT(overrange);\
 	COPY(suspended_state);\
 }
 
@@ -173,61 +141,73 @@
 DEFINE_ALSA_IOCTL(pcm_channel_info);
 DEFINE_ALSA_IOCTL(pcm_status);
 
-/* recalcuate the boundary within 32bit */
-static void recalculate_boundary(struct file *file)
+/* sanity device check */
+extern int snd_major;
+static int sanity_check_pcm(struct file *file)
 {
-	snd_pcm_file_t *pcm_file;
-	snd_pcm_substream_t *substream;
-	snd_pcm_runtime_t *runtime;
+	unsigned short minor;
+	if (imajor(file->f_dentry->d_inode) != snd_major)
+		return -ENOTTY;
+	minor = iminor(file->f_dentry->d_inode);
+	if (minor >= 256 || 
+	    minor % SNDRV_MINOR_DEVICES < SNDRV_MINOR_PCM_PLAYBACK)
+		return -ENOTTY;
+	return 0;
+}
 
-	/* FIXME: need to check whether fop->ioctl is sane */
-	if (! (pcm_file = file->private_data))
-		return;
-	if (! (substream = pcm_file->substream))
-		return;
-	if (! (runtime = substream->runtime))
+/* recalcuate the boundary within 32bit */
+static void recalculate_boundary(snd_pcm_runtime_t *runtime)
+{
+	if (! runtime->buffer_size)
 		return;
 	runtime->boundary = runtime->buffer_size;
 	while (runtime->boundary * 2 <= 0x7fffffffUL - runtime->buffer_size)
 		runtime->boundary *= 2;
 }
 
-static inline int _snd_ioctl32_pcm_hw_params(unsigned int fd, unsigned int cmd, unsigned long arg, struct file *file, unsigned int native_ctl)
+/* both for HW_PARAMS and HW_REFINE */
+static int _snd_ioctl32_pcm_hw_params(unsigned int fd, unsigned int cmd, unsigned long arg, struct file *file, unsigned int native_ctl)
 {
-	struct sndrv_pcm_hw_params32 *data32;
+	struct sndrv_pcm_hw_params32 __user *data32;
 	struct sndrv_pcm_hw_params *data;
-	mm_segment_t oldseg;
+	snd_pcm_file_t *pcm_file;
+	snd_pcm_substream_t *substream;
+	snd_pcm_runtime_t *runtime;
 	int err;
 
-	data32 = kmalloc(sizeof(*data32), GFP_KERNEL);
+	if (sanity_check_pcm(file))
+		return -ENOTTY;
+	if (! (pcm_file = file->private_data))
+		return -ENOTTY;
+	if (! (substream = pcm_file->substream))
+		return -ENOTTY;
+	if (! (runtime = substream->runtime))
+		return -ENOTTY;
+
+	data32 = compat_ptr(arg);
 	data = kmalloc(sizeof(*data), GFP_KERNEL);
-	if (data32 == NULL || data == NULL) {
-		err = -ENOMEM;
-		goto __end;
-	}
-	if (copy_from_user(data32, (void __user *)arg, sizeof(*data32))) {
+	if (data == NULL)
+		return -ENOMEM;
+	if (copy_from_user(data, data32, sizeof(*data32))) {
 		err = -EFAULT;
-		goto __end;
+		goto error;
 	}
-	memset(data, 0, sizeof(*data));
-	convert_from_32(pcm_hw_params, data, data32);
-	oldseg = get_fs();
-	set_fs(KERNEL_DS);
-	err = file->f_op->ioctl(file->f_dentry->d_inode, file, native_ctl, (unsigned long)data);
-	set_fs(oldseg);
+	if (native_ctl == SNDRV_PCM_IOCTL_HW_REFINE)
+		err = snd_pcm_hw_refine(substream, data);
+	else
+		err = snd_pcm_hw_params(substream, data);
 	if (err < 0)
-		goto __end;
-	err = 0;
-	convert_to_32(pcm_hw_params, data32, data);
-	if (copy_to_user((void __user *)arg, data32, sizeof(*data32)))
+		goto error;
+	if (copy_to_user(data32, data, sizeof(*data32)) ||
+	    __put_user((u32)data->fifo_size, &data32->fifo_size)) {
 		err = -EFAULT;
-	else
-		recalculate_boundary(file);
-      __end:
-      	if (data)
-      		kfree(data);
-      	if (data32)
-      		kfree(data32);
+		goto error;
+	}
+
+	if (native_ctl == SNDRV_PCM_IOCTL_HW_PARAMS)
+		recalculate_boundary(runtime);
+ error:
+	kfree(data);
 	return err;
 }
 
@@ -240,27 +220,27 @@
 	u32 frames;
 } __attribute__((packed));
 
-static inline int _snd_ioctl32_xferi(unsigned int fd, unsigned int cmd, unsigned long arg, struct file *file, unsigned int native_ctl)
+static int _snd_ioctl32_xferi(unsigned int fd, unsigned int cmd, unsigned long arg, struct file *file, unsigned int native_ctl)
 {
 	struct sndrv_xferi32 data32;
-	struct sndrv_xferi data;
-	mm_segment_t oldseg;
+	struct sndrv_xferi __user *data;
+	snd_pcm_sframes_t result;
 	int err;
 
 	if (copy_from_user(&data32, (void __user *)arg, sizeof(data32)))
 		return -EFAULT;
-	memset(&data, 0, sizeof(data));
-	data.result = data32.result;
-	data.buf = compat_ptr(data32.buf);
-	data.frames = data32.frames;
-	oldseg = get_fs();
-	set_fs(KERNEL_DS);
-	err = file->f_op->ioctl(file->f_dentry->d_inode, file, native_ctl, (unsigned long)&data);
-	set_fs(oldseg);
+	data = compat_alloc_user_space(sizeof(*data));
+	if (put_user((snd_pcm_sframes_t)data32.result, &data->result) ||
+	    __put_user(compat_ptr(data32.buf), &data->buf) ||
+	    __put_user((snd_pcm_uframes_t)data32.frames, &data->frames))
+		return -EFAULT;
+	err = file->f_op->ioctl(file->f_dentry->d_inode, file, native_ctl, (unsigned long)data);
 	if (err < 0)
 		return err;
 	/* copy the result */
-	data32.result = data.result;
+	if (__get_user(result, &data->result))
+		return -EFAULT;
+	data32.result = result;
 	if (copy_to_user((void __user *)arg, &data32, sizeof(data32)))
 		return -EFAULT;
 	return 0;
@@ -280,22 +260,24 @@
  * handler there expands again the same 128 pointers on stack, so it is better
  * to handle the function (calling pcm_readv/writev) directly in this handler.
  */
-static inline int _snd_ioctl32_xfern(unsigned int fd, unsigned int cmd, unsigned long arg, struct file *file, unsigned int native_ctl)
+static int _snd_ioctl32_xfern(unsigned int fd, unsigned int cmd, unsigned long arg, struct file *file, unsigned int native_ctl)
 {
 	snd_pcm_file_t *pcm_file;
 	snd_pcm_substream_t *substream;
+	struct sndrv_xfern32 __user *srcptr = compat_ptr(arg);
 	struct sndrv_xfern32 data32;
-	struct sndrv_xfern32 __user *srcptr = (void __user *)arg;
-	void __user **bufs = NULL;
+	void __user **bufs;
 	int err = 0, ch, i;
 	u32 __user *bufptr;
-	mm_segment_t oldseg;
-
-	/* FIXME: need to check whether fop->ioctl is sane */
 
-	pcm_file = file->private_data;
-	substream = pcm_file->substream;
-	snd_assert(substream != NULL && substream->runtime, return -ENXIO);
+	if (sanity_check_pcm(file))
+		return -ENOTTY;
+	if (! (pcm_file = file->private_data))
+		return -ENOTTY;
+	if (! (substream = pcm_file->substream))
+		return -ENOTTY;
+	if (! substream->runtime)
+		return -ENOTTY;
 
 	/* check validty of the command */
 	switch (native_ctl) {
@@ -312,22 +294,21 @@
 	}
 	if ((ch = substream->runtime->channels) > 128)
 		return -EINVAL;
-	if (get_user(data32.frames, &srcptr->frames))
+	if (copy_from_user(&data32, (void __user *)arg, sizeof(data32)))
 		return -EFAULT;
-	__get_user(data32.bufs, &srcptr->bufs);
 	bufptr = compat_ptr(data32.bufs);
-	bufs = kmalloc(sizeof(void *) * 128, GFP_KERNEL);
+	bufs = kmalloc(sizeof(void __user *) * ch, GFP_KERNEL);
 	if (bufs == NULL)
 		return -ENOMEM;
 	for (i = 0; i < ch; i++) {
 		u32 ptr;
-		if (get_user(ptr, bufptr))
+		if (get_user(ptr, bufptr)) {
+			kfree(bufs);
 			return -EFAULT;
+		}
 		bufs[ch] = compat_ptr(ptr);
 		bufptr++;
 	}
-	oldseg = get_fs();
-	set_fs(KERNEL_DS);
 	switch (native_ctl) {
 	case SNDRV_PCM_IOCTL_WRITEN_FRAMES:
 		err = snd_pcm_lib_writev(substream, bufs, data32.frames);
@@ -336,109 +317,15 @@
 		err = snd_pcm_lib_readv(substream, bufs, data32.frames);
 		break;
 	}
-	set_fs(oldseg);
 	if (err >= 0) {
 		if (put_user(err, &srcptr->result))
 			err = -EFAULT;
 	}
 	kfree(bufs);
-	return 0;
-}
-
-
-struct sndrv_pcm_hw_params_old32 {
-	u32 flags;
-	u32 masks[SNDRV_PCM_HW_PARAM_SUBFORMAT -
-			   SNDRV_PCM_HW_PARAM_ACCESS + 1];
-	struct sndrv_interval32 intervals[SNDRV_PCM_HW_PARAM_TICK_TIME -
-					SNDRV_PCM_HW_PARAM_SAMPLE_BITS + 1];
-	u32 rmask;
-	u32 cmask;
-	u32 info;
-	u32 msbits;
-	u32 rate_num;
-	u32 rate_den;
-	u32 fifo_size;
-	unsigned char reserved[64];
-} __attribute__((packed));
-
-#define __OLD_TO_NEW_MASK(x) ((x&7)|((x&0x07fffff8)<<5))
-#define __NEW_TO_OLD_MASK(x) ((x&7)|((x&0xffffff00)>>5))
-
-static void snd_pcm_hw_convert_from_old_params(snd_pcm_hw_params_t *params, struct sndrv_pcm_hw_params_old32 *oparams)
-{
-	unsigned int i;
-
-	memset(params, 0, sizeof(*params));
-	params->flags = oparams->flags;
-	for (i = 0; i < ARRAY_SIZE(oparams->masks); i++)
-		params->masks[i].bits[0] = oparams->masks[i];
-	memcpy(params->intervals, oparams->intervals, sizeof(oparams->intervals));
-	params->rmask = __OLD_TO_NEW_MASK(oparams->rmask);
-	params->cmask = __OLD_TO_NEW_MASK(oparams->cmask);
-	params->info = oparams->info;
-	params->msbits = oparams->msbits;
-	params->rate_num = oparams->rate_num;
-	params->rate_den = oparams->rate_den;
-	params->fifo_size = oparams->fifo_size;
-}
-
-static void snd_pcm_hw_convert_to_old_params(struct sndrv_pcm_hw_params_old32 *oparams, snd_pcm_hw_params_t *params)
-{
-	unsigned int i;
-
-	memset(oparams, 0, sizeof(*oparams));
-	oparams->flags = params->flags;
-	for (i = 0; i < ARRAY_SIZE(oparams->masks); i++)
-		oparams->masks[i] = params->masks[i].bits[0];
-	memcpy(oparams->intervals, params->intervals, sizeof(oparams->intervals));
-	oparams->rmask = __NEW_TO_OLD_MASK(params->rmask);
-	oparams->cmask = __NEW_TO_OLD_MASK(params->cmask);
-	oparams->info = params->info;
-	oparams->msbits = params->msbits;
-	oparams->rate_num = params->rate_num;
-	oparams->rate_den = params->rate_den;
-	oparams->fifo_size = params->fifo_size;
-}
-
-static inline int _snd_ioctl32_pcm_hw_params_old(unsigned int fd, unsigned int cmd, unsigned long arg, struct file *file, unsigned int native_ctl)
-{
-	struct sndrv_pcm_hw_params_old32 *data32;
-	struct sndrv_pcm_hw_params *data;
-	mm_segment_t oldseg;
-	int err;
-
-	data32 = kcalloc(1, sizeof(*data32), GFP_KERNEL);
-	data = kcalloc(1, sizeof(*data), GFP_KERNEL);
-	if (data32 == NULL || data == NULL) {
-		err = -ENOMEM;
-		goto __end;
-	}
-	if (copy_from_user(data32, (void __user *)arg, sizeof(*data32))) {
-		err = -EFAULT;
-		goto __end;
-	}
-	snd_pcm_hw_convert_from_old_params(data, data32);
-	oldseg = get_fs();
-	set_fs(KERNEL_DS);
-	err = file->f_op->ioctl(file->f_dentry->d_inode, file, native_ctl, (unsigned long)data);
-	set_fs(oldseg);
-	if (err < 0)
-		goto __end;
-	snd_pcm_hw_convert_to_old_params(data32, data);
-	err = 0;
-	if (copy_to_user((void __user *)arg, data32, sizeof(*data32)))
-		err = -EFAULT;
-	else
-		recalculate_boundary(file);
-      __end:
-      	if (data)
-      		kfree(data);
-      	if (data32)
-      		kfree(data32);
 	return err;
 }
 
+
 struct sndrv_pcm_mmap_status32 {
 	s32 state;
 	s32 pad1;
@@ -469,15 +356,15 @@
 	COPY(flags);\
 	COPY(s.status.state);\
 	COPY(s.status.pad1);\
-	COPY(s.status.hw_ptr);\
-	COPY(s.status.tstamp.tv_sec);\
-	COPY(s.status.tstamp.tv_nsec);\
+	COPY_CVT(s.status.hw_ptr);\
+	COPY_CVT(s.status.tstamp.tv_sec);\
+	COPY_CVT(s.status.tstamp.tv_nsec);\
 	COPY(s.status.suspended_state);\
-	COPY(c.control.appl_ptr);\
-	COPY(c.control.avail_min);\
+	COPY_CVT(c.control.appl_ptr);\
+	COPY_CVT(c.control.avail_min);\
 }
 
-DEFINE_ALSA_IOCTL_BIG(pcm_sync_ptr);
+DEFINE_ALSA_IOCTL(pcm_sync_ptr);
 
 /*
  */
@@ -485,8 +372,6 @@
 DEFINE_ALSA_IOCTL_ENTRY(pcm_hw_refine, pcm_hw_params, SNDRV_PCM_IOCTL_HW_REFINE);
 DEFINE_ALSA_IOCTL_ENTRY(pcm_hw_params, pcm_hw_params, SNDRV_PCM_IOCTL_HW_PARAMS);
 DEFINE_ALSA_IOCTL_ENTRY(pcm_sw_params, pcm_sw_params, SNDRV_PCM_IOCTL_SW_PARAMS);
-DEFINE_ALSA_IOCTL_ENTRY(pcm_hw_refine_old, pcm_hw_params_old, SNDRV_PCM_IOCTL_HW_REFINE);
-DEFINE_ALSA_IOCTL_ENTRY(pcm_hw_params_old, pcm_hw_params_old, SNDRV_PCM_IOCTL_HW_PARAMS);
 DEFINE_ALSA_IOCTL_ENTRY(pcm_status, pcm_status, SNDRV_PCM_IOCTL_STATUS);
 DEFINE_ALSA_IOCTL_ENTRY(pcm_delay, pcm_sframes_str, SNDRV_PCM_IOCTL_DELAY);
 DEFINE_ALSA_IOCTL_ENTRY(pcm_channel_info, pcm_channel_info, SNDRV_PCM_IOCTL_CHANNEL_INFO);
@@ -538,8 +423,6 @@
 	SNDRV_PCM_IOCTL_READI_FRAMES32 = _IOR('A', 0x51, struct sndrv_xferi32),
 	SNDRV_PCM_IOCTL_WRITEN_FRAMES32 = _IOW('A', 0x52, struct sndrv_xfern32),
 	SNDRV_PCM_IOCTL_READN_FRAMES32 = _IOR('A', 0x53, struct sndrv_xfern32),
-	SNDRV_PCM_IOCTL_HW_REFINE_OLD32 = _IOWR('A', 0x10, struct sndrv_pcm_hw_params_old32),
-	SNDRV_PCM_IOCTL_HW_PARAMS_OLD32 = _IOWR('A', 0x11, struct sndrv_pcm_hw_params_old32),
 	SNDRV_PCM_IOCTL_SYNC_PTR32 = _IOWR('A', 0x23, struct sndrv_pcm_sync_ptr32),
 
 };
@@ -551,8 +434,6 @@
 	MAP_COMPAT(SNDRV_PCM_IOCTL_TSTAMP),
 	{ SNDRV_PCM_IOCTL_HW_REFINE32, AP(pcm_hw_refine) },
 	{ SNDRV_PCM_IOCTL_HW_PARAMS32, AP(pcm_hw_params) },
-	{ SNDRV_PCM_IOCTL_HW_REFINE_OLD32, AP(pcm_hw_refine_old) },
-	{ SNDRV_PCM_IOCTL_HW_PARAMS_OLD32, AP(pcm_hw_params_old) },
 	MAP_COMPAT(SNDRV_PCM_IOCTL_HW_FREE),
 	{ SNDRV_PCM_IOCTL_SW_PARAMS32, AP(pcm_sw_params) },
 	{ SNDRV_PCM_IOCTL_STATUS32, AP(pcm_status) },
diff -Nru a/sound/core/ioctl32/rawmidi32.c b/sound/core/ioctl32/rawmidi32.c
--- a/sound/core/ioctl32/rawmidi32.c	2005-01-10 20:11:19 -08:00
+++ b/sound/core/ioctl32/rawmidi32.c	2005-01-10 20:11:19 -08:00
@@ -38,9 +38,11 @@
 #define CVT_sndrv_rawmidi_params()\
 {\
 	COPY(stream);\
-	COPY(buffer_size);\
-	COPY(avail_min);\
-	COPY(no_active_sensing);\
+	COPY_CVT(buffer_size);\
+	COPY_CVT(avail_min);\
+	if (copy_in_user(((size_t __user *)&dst->avail_min + 1),\
+			 ((size_t __user *)&src->avail_min + 1), 4)) \
+		return -EFAULT;\
 }
 
 struct sndrv_rawmidi_status32 {
@@ -54,10 +56,10 @@
 #define CVT_sndrv_rawmidi_status()\
 {\
 	COPY(stream);\
-	COPY(tstamp.tv_sec);\
-	COPY(tstamp.tv_nsec);\
-	COPY(avail);\
-	COPY(xruns);\
+	COPY_CVT(tstamp.tv_sec);\
+	COPY_CVT(tstamp.tv_nsec);\
+	COPY_CVT(avail);\
+	COPY_CVT(xruns);\
 }
 
 DEFINE_ALSA_IOCTL(rawmidi_params);
diff -Nru a/sound/core/ioctl32/seq32.c b/sound/core/ioctl32/seq32.c
--- a/sound/core/ioctl32/seq32.c	2005-01-10 20:11:23 -08:00
+++ b/sound/core/ioctl32/seq32.c	2005-01-10 20:11:23 -08:00
@@ -42,13 +42,14 @@
 
 	u32 kernel;			/* reserved for kernel use (must be NULL) */
 	u32 flags;		/* misc. conditioning */
-	char reserved[60];		/* for future use */
+	unsigned char time_queue;	/* queue # for timestamping */
+	char reserved[59];		/* for future use */
 };
 
 #define CVT_sndrv_seq_port_info()\
 {\
 	COPY(addr);\
-	memcpy(dst->name, src->name, sizeof(dst->name));\
+	COPY_ARRAY(name);\
 	COPY(capability);\
 	COPY(type);\
 	COPY(midi_channels);\
@@ -57,6 +58,7 @@
 	COPY(read_use);\
 	COPY(write_use);\
 	COPY(flags);\
+	COPY(time_queue);\
 }
 
 DEFINE_ALSA_IOCTL(seq_port_info);
diff -Nru a/sound/core/ioctl32/timer32.c b/sound/core/ioctl32/timer32.c
--- a/sound/core/ioctl32/timer32.c	2005-01-10 20:11:19 -08:00
+++ b/sound/core/ioctl32/timer32.c	2005-01-10 20:11:19 -08:00
@@ -41,9 +41,9 @@
 {\
 	COPY(flags);\
 	COPY(card);\
-	memcpy(dst->id, src->id, sizeof(src->id));\
-	memcpy(dst->name, src->name, sizeof(src->name));\
-	COPY(resolution);\
+	COPY_ARRAY(id);\
+	COPY_ARRAY(name);\
+	COPY_CVT(resolution);\
 }
 
 struct sndrv_timer_status32 {
@@ -57,8 +57,8 @@
 
 #define CVT_sndrv_timer_status()\
 {\
-	COPY(tstamp.tv_sec);\
-	COPY(tstamp.tv_nsec);\
+	COPY_CVT(tstamp.tv_sec);\
+	COPY_CVT(tstamp.tv_nsec);\
 	COPY(resolution);\
 	COPY(lost);\
 	COPY(overrun);\
diff -Nru a/sound/core/memory.c b/sound/core/memory.c
--- a/sound/core/memory.c	2005-01-10 20:11:16 -08:00
+++ b/sound/core/memory.c	2005-01-10 20:11:16 -08:00
@@ -89,7 +89,7 @@
 	}
 }
 
-void *__snd_kmalloc(size_t size, int flags, void *caller)
+static void *__snd_kmalloc(size_t size, int flags, void *caller)
 {
 	unsigned long cpu_flags;
 	struct snd_alloc_track *t;
@@ -131,10 +131,8 @@
 {
 	unsigned long flags;
 	struct snd_alloc_track *t;
-	if (obj == NULL) {
-		snd_printk(KERN_WARNING "null kfree (called from %p)\n", __builtin_return_address(0));
+	if (obj == NULL)
 		return;
-	}
 	t = snd_alloc_track_entry(obj);
 	if (t->magic != KMALLOC_MAGIC) {
 		snd_printk(KERN_WARNING "bad kfree (called from %p)\n", __builtin_return_address(0));
@@ -170,10 +168,8 @@
 void snd_hidden_vfree(void *obj)
 {
 	struct snd_alloc_track *t;
-	if (obj == NULL) {
-		snd_printk(KERN_WARNING "null vfree (called from %p)\n", __builtin_return_address(0));
+	if (obj == NULL)
 		return;
-	}
 	t = snd_alloc_track_entry(obj);
 	if (t->magic != VMALLOC_MAGIC) {
 		snd_printk(KERN_ERR "bad vfree (called from %p)\n", __builtin_return_address(0));
@@ -257,7 +253,7 @@
  *
  * Returns zero if successful, or non-zero on failure.
  */
-int copy_to_user_fromio(void __user *dst, const void __iomem *src, size_t count)
+int copy_to_user_fromio(void __user *dst, const volatile void __iomem *src, size_t count)
 {
 #if defined(__i386__) || defined(CONFIG_SPARC32)
 	return copy_to_user(dst, (const void*)src, count) ? -EFAULT : 0;
@@ -267,7 +263,7 @@
 		size_t c = count;
 		if (c > sizeof(buf))
 			c = sizeof(buf);
-		memcpy_fromio(buf, src, c);
+		memcpy_fromio(buf, (void __iomem *)src, c);
 		if (copy_to_user(dst, buf, c))
 			return -EFAULT;
 		count -= c;
@@ -288,7 +284,7 @@
  *
  * Returns zero if successful, or non-zero on failure.
  */
-int copy_from_user_toio(void __iomem *dst, const void __user *src, size_t count)
+int copy_from_user_toio(volatile void __iomem *dst, const void __user *src, size_t count)
 {
 #if defined(__i386__) || defined(CONFIG_SPARC32)
 	return copy_from_user((void*)dst, src, count) ? -EFAULT : 0;
diff -Nru a/sound/core/oss/mixer_oss.c b/sound/core/oss/mixer_oss.c
--- a/sound/core/oss/mixer_oss.c	2005-01-10 20:11:20 -08:00
+++ b/sound/core/oss/mixer_oss.c	2005-01-10 20:11:20 -08:00
@@ -360,8 +360,8 @@
 }
 
 /* FIXME: need to unlock BKL to allow preemption */
-int snd_mixer_oss_ioctl(struct inode *inode, struct file *file,
-			unsigned int cmd, unsigned long arg)
+static int snd_mixer_oss_ioctl(struct inode *inode, struct file *file,
+			       unsigned int cmd, unsigned long arg)
 {
 	int err;
 	/* FIXME: need to unlock BKL to allow preemption */
@@ -527,10 +527,8 @@
 		*right = snd_mixer_oss_conv1(uctl->value.integer.value[1], uinfo->value.integer.min, uinfo->value.integer.max, &pslot->volume[1]);
       __unalloc:
 	up_read(&card->controls_rwsem);
-      	if (uctl)
-      		kfree(uctl);
-      	if (uinfo)
-      		kfree(uinfo);
+      	kfree(uctl);
+      	kfree(uinfo);
 }
 
 static void snd_mixer_oss_get_volume1_sw(snd_mixer_oss_file_t *fmixer,
@@ -566,10 +564,8 @@
 		*right = 0;
       __unalloc:
 	up_read(&card->controls_rwsem);
-      	if (uctl)
-      		kfree(uctl);
-      	if (uinfo)
-		kfree(uinfo);
+      	kfree(uctl);
+	kfree(uinfo);
 }
 
 static int snd_mixer_oss_get_volume1(snd_mixer_oss_file_t *fmixer,
@@ -628,10 +624,8 @@
 		snd_ctl_notify(card, SNDRV_CTL_EVENT_MASK_VALUE, &kctl->id);
       __unalloc:
 	up_read(&card->controls_rwsem);
-      	if (uctl)
-      		kfree(uctl);
-      	if (uinfo)
-		kfree(uinfo);
+      	kfree(uctl);
+	kfree(uinfo);
 }
 
 static void snd_mixer_oss_put_volume1_sw(snd_mixer_oss_file_t *fmixer,
@@ -673,10 +667,8 @@
 		snd_ctl_notify(card, SNDRV_CTL_EVENT_MASK_VALUE, &kctl->id);
       __unalloc:
 	up_read(&card->controls_rwsem);
-      	if (uctl)
-      		kfree(uctl);
-      	if (uinfo)
-		kfree(uinfo);
+      	kfree(uctl);
+	kfree(uinfo);
 }
 
 static int snd_mixer_oss_put_volume1(snd_mixer_oss_file_t *fmixer,
@@ -802,10 +794,8 @@
 	err = 0;
       __unlock:
      	up_read(&card->controls_rwsem);
-      	if (uctl)
-      		kfree(uctl);
-      	if (uinfo)
-      		kfree(uinfo);
+      	kfree(uctl);
+      	kfree(uinfo);
       	return err;
 }
 
@@ -853,10 +843,8 @@
 	err = 0;
       __unlock:
 	up_read(&card->controls_rwsem);
-	if (uctl)
-		kfree(uctl);
-	if (uinfo)
-		kfree(uinfo);
+	kfree(uctl);
+	kfree(uinfo);
 	return err;
 }
 
diff -Nru a/sound/core/oss/mulaw.c b/sound/core/oss/mulaw.c
--- a/sound/core/oss/mulaw.c	2005-01-10 20:11:23 -08:00
+++ b/sound/core/oss/mulaw.c	2005-01-10 20:11:23 -08:00
@@ -301,6 +301,7 @@
 	data = (mulaw_t*)plugin->extra_data;
 	data->func = func;
 	data->conv = getput_index(format->format);
+	snd_assert(data->conv >= 0 && data->conv < 4*2*2, return -EINVAL);
 	plugin->transfer = mulaw_transfer;
 	*r_plugin = plugin;
 	return 0;
diff -Nru a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c
--- a/sound/core/oss/pcm_oss.c	2005-01-10 20:11:22 -08:00
+++ b/sound/core/oss/pcm_oss.c	2005-01-10 20:11:22 -08:00
@@ -46,7 +46,7 @@
 
 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;
+static int nonblock_open = 1;
 
 MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>, Abramo Bagnara <abramo@alsa-project.org>");
 MODULE_DESCRIPTION("PCM OSS emulation for ALSA.");
@@ -77,7 +77,7 @@
 	set_fs(fs);
 }
 
-int snd_pcm_oss_plugin_clear(snd_pcm_substream_t *substream)
+static int snd_pcm_oss_plugin_clear(snd_pcm_substream_t *substream)
 {
 	snd_pcm_runtime_t *runtime = substream->runtime;
 	snd_pcm_plugin_t *plugin, *next;
@@ -92,7 +92,7 @@
 	return 0;
 }
 
-int snd_pcm_plugin_insert(snd_pcm_plugin_t *plugin)
+static int snd_pcm_plugin_insert(snd_pcm_plugin_t *plugin)
 {
 	snd_pcm_runtime_t *runtime = plugin->plug->runtime;
 	plugin->next = runtime->oss.plugin_first;
@@ -513,8 +513,7 @@
 
 	runtime->oss.params = 0;
 	runtime->oss.prepare = 1;
-	if (runtime->oss.buffer != NULL)
-		vfree(runtime->oss.buffer);
+	vfree(runtime->oss.buffer);
 	runtime->oss.buffer = vmalloc(runtime->oss.period_bytes);
 	runtime->oss.buffer_used = 0;
 	if (runtime->dma_area)
@@ -524,12 +523,9 @@
 
 	err = 0;
 failure:
-	if (sw_params)
-		kfree(sw_params);
-	if (params)
-		kfree(params);
-	if (sparams)
-		kfree(sparams);
+	kfree(sw_params);
+	kfree(params);
+	kfree(sparams);
 	return err;
 }
 
@@ -1671,8 +1667,7 @@
 {
 	snd_pcm_runtime_t *runtime;
 	runtime = substream->runtime;
-	if (runtime->oss.buffer)
-		vfree(runtime->oss.buffer);
+	vfree(runtime->oss.buffer);
 	snd_pcm_oss_plugin_clear(substream);
 	substream->oss.file = NULL;
 	substream->oss.oss = 0;
diff -Nru a/sound/core/oss/pcm_plugin.c b/sound/core/oss/pcm_plugin.c
--- a/sound/core/oss/pcm_plugin.c	2005-01-10 20:11:17 -08:00
+++ b/sound/core/oss/pcm_plugin.c	2005-01-10 20:11:17 -08:00
@@ -86,8 +86,7 @@
 	snd_assert((size % 8) == 0, return -ENXIO);
 	size /= 8;
 	if (plugin->buf_frames < frames) {
-		if (plugin->buf)
-			vfree(plugin->buf);
+		vfree(plugin->buf);
 		plugin->buf = vmalloc(size);
 		plugin->buf_frames = frames;
 	}
@@ -217,14 +216,10 @@
 		return 0;
 	if (plugin->private_free)
 		plugin->private_free(plugin);
-	if (plugin->buf_channels)
-		kfree(plugin->buf_channels);
-	if (plugin->buf)
-		vfree(plugin->buf);
-	if (plugin->src_vmask)
-		kfree(plugin->src_vmask);
-	if (plugin->dst_vmask)
-		kfree(plugin->dst_vmask);
+	kfree(plugin->buf_channels);
+	vfree(plugin->buf);
+	kfree(plugin->src_vmask);
+	kfree(plugin->dst_vmask);
 	kfree(plugin);
 	return 0;
 }
@@ -390,7 +385,7 @@
 	snd_pcm_plugin_format_t srcformat;
 	int src_access, dst_access;
 	snd_pcm_plugin_t *plugin = NULL;
-	int err, first;
+	int err;
 	int stream = snd_pcm_plug_stream(plug);
 	int slave_interleaved = (params_channels(slave_params) == 1 ||
 				 params_access(slave_params) == SNDRV_PCM_ACCESS_RW_INTERLEAVED);
@@ -442,7 +437,6 @@
 			tmpformat.format = dstformat.format;
 		else
 			tmpformat.format = SNDRV_PCM_FORMAT_S16;
-		first = plugin == NULL;
 		switch (srcformat.format) {
 		case SNDRV_PCM_FORMAT_MU_LAW:
 			err = snd_pcm_plugin_build_mulaw(plug,
@@ -656,8 +650,8 @@
 	return count;
 }
 
-int snd_pcm_plug_playback_channels_mask(snd_pcm_plug_t *plug,
-					bitset_t *client_vmask)
+static int snd_pcm_plug_playback_channels_mask(snd_pcm_plug_t *plug,
+					       bitset_t *client_vmask)
 {
 	snd_pcm_plugin_t *plugin = snd_pcm_plug_last(plug);
 	if (plugin == NULL) {
@@ -683,33 +677,6 @@
 			plugin = plugin->prev;
 		}
 		bitset_and(client_vmask, dstmask, plugin->src_format.channels);
-		return 0;
-	}
-}
-
-int snd_pcm_plug_capture_channels_mask(snd_pcm_plug_t *plug,
-				       bitset_t *client_vmask)
-{
-	snd_pcm_plugin_t *plugin = snd_pcm_plug_first(plug);
-	if (plugin == NULL) {
-		return 0;
-	} else {
-		int schannels = plugin->src_format.channels;
-		bitset_t bs[bitset_size(schannels)];
-		bitset_t *srcmask = bs;
-		bitset_t *dstmask;
-		int err;
-		bitset_one(srcmask, schannels);
-		while (1) {
-			err = plugin->dst_channels_mask(plugin, srcmask, &dstmask);
-			if (err < 0)
-				return err;
-			srcmask = dstmask;
-			if (plugin->next == NULL)
-				break;
-			plugin = plugin->next;
-		}
-		bitset_and(client_vmask, srcmask, plugin->dst_format.channels);
 		return 0;
 	}
 }
diff -Nru a/sound/core/oss/pcm_plugin.h b/sound/core/oss/pcm_plugin.h
--- a/sound/core/oss/pcm_plugin.h	2005-01-10 20:11:21 -08:00
+++ b/sound/core/oss/pcm_plugin.h	2005-01-10 20:11:21 -08:00
@@ -168,7 +168,6 @@
 snd_pcm_sframes_t snd_pcm_plug_client_size(snd_pcm_plug_t *handle, snd_pcm_uframes_t drv_size);
 snd_pcm_sframes_t snd_pcm_plug_slave_size(snd_pcm_plug_t *handle, snd_pcm_uframes_t clt_size);
 
-#define ROUTE_PLUGIN_USE_FLOAT 0
 #define FULL ROUTE_PLUGIN_RESOLUTION
 #define HALF ROUTE_PLUGIN_RESOLUTION / 2
 typedef int route_ttable_entry_t;
diff -Nru a/sound/core/oss/rate.c b/sound/core/oss/rate.c
--- a/sound/core/oss/rate.c	2005-01-10 20:11:19 -08:00
+++ b/sound/core/oss/rate.c	2005-01-10 20:11:19 -08:00
@@ -355,7 +355,9 @@
 		return err;
 	data = (rate_t *)plugin->extra_data;
 	data->get = getput_index(src_format->format);
+	snd_assert(data->get >= 0 && data->get < 4*2*2, return -EINVAL);
 	data->put = getput_index(dst_format->format);
+	snd_assert(data->put >= 0 && data->put < 4*2*2, return -EINVAL);
 
 	if (src_format->rate < dst_format->rate) {
 		data->pitch = ((src_format->rate << SHIFT) + (dst_format->rate >> 1)) / dst_format->rate;
diff -Nru a/sound/core/oss/route.c b/sound/core/oss/route.c
--- a/sound/core/oss/route.c	2005-01-10 20:11:22 -08:00
+++ b/sound/core/oss/route.c	2005-01-10 20:11:22 -08:00
@@ -46,9 +46,6 @@
 typedef struct {
 	int channel;
 	int as_int;
-#if ROUTE_PLUGIN_USE_FLOAT
-	float as_float;
-#endif
 } ttable_src_t;
 
 struct ttable_dst {
@@ -59,7 +56,7 @@
 };
 
 struct route_private_data {
-	enum {R_UINT32=0, R_UINT64=1, R_FLOAT=2} sum_type;
+	enum {R_UINT32=0, R_UINT64=1} sum_type;
 	int get, put;
 	int conv;
 	int src_sample_size;
@@ -69,9 +66,6 @@
 typedef union {
 	u_int32_t as_uint32;
 	u_int64_t as_uint64;
-#if ROUTE_PLUGIN_USE_FLOAT
-	float as_float;
-#endif
 } sum_t;
 
 
@@ -136,20 +130,13 @@
 #include "plugin_ops.h"
 #undef GET_U_LABELS
 #undef PUT_U32_LABELS
-	static void *zero_labels[3] = { &&zero_int32, &&zero_int64,
-#if ROUTE_PLUGIN_USE_FLOAT
-				 &&zero_float
-#endif
-	};
+	static void *zero_labels[2] = { &&zero_int32, &&zero_int64 };
 	/* sum_type att */
-	static void *add_labels[3 * 2] = { &&add_int32_noatt, &&add_int32_att,
+	static void *add_labels[2 * 2] = { &&add_int32_noatt, &&add_int32_att,
 				    &&add_int64_noatt, &&add_int64_att,
-#if ROUTE_PLUGIN_USE_FLOAT
-				    &&add_float_noatt, &&add_float_att
-#endif
 	};
 	/* sum_type att shift */
-	static void *norm_labels[3 * 2 * 4] = { NULL,
+	static void *norm_labels[2 * 2 * 4] = { NULL,
 					 &&norm_int32_8_noatt,
 					 &&norm_int32_16_noatt,
 					 &&norm_int32_24_noatt,
@@ -165,16 +152,6 @@
 					 &&norm_int64_8_att,
 					 &&norm_int64_16_att,
 					 &&norm_int64_24_att,
-#if ROUTE_PLUGIN_USE_FLOAT
-					 &&norm_float_0,
-					 &&norm_float_8,
-					 &&norm_float_16,
-					 &&norm_float_24,
-					 &&norm_float_0,
-					 &&norm_float_8,
-					 &&norm_float_16,
-					 &&norm_float_24,
-#endif
 	};
 	route_t *data = (route_t *)plugin->extra_data;
 	void *zero, *get, *add, *norm, *put_u32;
@@ -225,11 +202,6 @@
 	zero_int64: 
 		sum.as_uint64 = 0;
 		goto zero_end;
-#if ROUTE_PLUGIN_USE_FLOAT
-	zero_float:
-		sum.as_float = 0.0;
-		goto zero_end;
-#endif
 	zero_end:
 		for (srcidx = 0; srcidx < nsrcs; ++srcidx) {
 			char *src = srcs[srcidx];
@@ -257,15 +229,6 @@
 			if (ttp->as_int)
 				sum.as_uint64 += sample;
 			goto after_sum;
-#if ROUTE_PLUGIN_USE_FLOAT
-		add_float_att:
-			sum.as_float += sample * ttp->as_float;
-			goto after_sum;
-		add_float_noatt:
-			if (ttp->as_int)
-				sum.as_float += sample;
-			goto after_sum;
-#endif
 		after_sum:
 			srcs[srcidx] += src_steps[srcidx];
 			ttp++;
@@ -321,25 +284,6 @@
 			sample = sum.as_uint64;
 		goto after_norm;
 
-#if ROUTE_PLUGIN_USE_FLOAT
-	norm_float_8:
-		sum.as_float *= 1 << 8;
-		goto norm_float;
-	norm_float_16:
-		sum.as_float *= 1 << 16;
-		goto norm_float;
-	norm_float_24:
-		sum.as_float *= 1 << 24;
-		goto norm_float;
-	norm_float_0:
-	norm_float:
-		sum.as_float = floor(sum.as_float + 0.5);
-		if (sum.as_float > (u_int32_t)0xffffffff)
-			sample = (u_int32_t)0xffffffff;
-		else
-			sample = sum.as_float;
-		goto after_norm;
-#endif
 	after_norm:
 		
 		/* Put sample */
@@ -353,9 +297,9 @@
 	}
 }
 
-int route_src_channels_mask(snd_pcm_plugin_t *plugin,
-			  bitset_t *dst_vmask,
-			  bitset_t **src_vmask)
+static int route_src_channels_mask(snd_pcm_plugin_t *plugin,
+				   bitset_t *dst_vmask,
+				   bitset_t **src_vmask)
 {
 	route_t *data = (route_t *)plugin->extra_data;
 	int schannels = plugin->src_format.channels;
@@ -377,9 +321,9 @@
 	return 0;
 }
 
-int route_dst_channels_mask(snd_pcm_plugin_t *plugin,
-			  bitset_t *src_vmask,
-			  bitset_t **dst_vmask)
+static int route_dst_channels_mask(snd_pcm_plugin_t *plugin,
+				   bitset_t *src_vmask,
+				   bitset_t **dst_vmask)
 {
 	route_t *data = (route_t *)plugin->extra_data;
 	int dchannels = plugin->dst_format.channels;
@@ -407,8 +351,7 @@
 	route_t *data = (route_t *)plugin->extra_data;
 	unsigned int dst_channel;
 	for (dst_channel = 0; dst_channel < plugin->dst_format.channels; ++dst_channel) {
-		if (data->ttable[dst_channel].srcs != NULL)
-			kfree(data->ttable[dst_channel].srcs);
+		kfree(data->ttable[dst_channel].srcs);
 	}
 }
 
@@ -434,13 +377,7 @@
 			snd_assert(*sptr >= 0 || *sptr <= FULL, return -ENXIO);
 			if (*sptr != 0) {
 				srcs[nsrcs].channel = src_channel;
-#if ROUTE_PLUGIN_USE_FLOAT
-				/* Also in user space for non attenuated */
-				srcs[nsrcs].as_int = (*sptr == FULL ? ROUTE_PLUGIN_RESOLUTION : 0);
-				srcs[nsrcs].as_float = *sptr;
-#else
 				srcs[nsrcs].as_int = *sptr;
-#endif
 				if (*sptr != FULL)
 					att = 1;
 				t += *sptr;
@@ -559,17 +496,15 @@
 	data = (route_t *) plugin->extra_data;
 
 	data->get = getput_index(src_format->format);
+	snd_assert(data->get >= 0 && data->get < 4*2*2, return -EINVAL);
 	data->put = getput_index(dst_format->format);
+	snd_assert(data->get >= 0 && data->get < 4*2*2, return -EINVAL);
 	data->conv = conv_index(src_format->format, dst_format->format);
 
-#if ROUTE_PLUGIN_USE_FLOAT
-	data->sum_type = R_FLOAT;
-#else
 	if (snd_pcm_format_width(src_format->format) == 32)
 		data->sum_type = R_UINT64;
 	else
 		data->sum_type = R_UINT32;
-#endif
 	data->src_sample_size = snd_pcm_format_width(src_format->format) / 8;
 
 	if ((err = route_load_ttable(plugin, ttable)) < 0) {
diff -Nru a/sound/core/pcm.c b/sound/core/pcm.c
--- a/sound/core/pcm.c	2005-01-10 20:11:23 -08:00
+++ b/sound/core/pcm.c	2005-01-10 20:11:23 -08:00
@@ -126,12 +126,12 @@
 #define FORMAT(v) [SNDRV_PCM_FORMAT_##v] = #v
 #define SUBFORMAT(v) [SNDRV_PCM_SUBFORMAT_##v] = #v 
 
-char *snd_pcm_stream_names[] = {
+static char *snd_pcm_stream_names[] = {
 	STREAM(PLAYBACK),
 	STREAM(CAPTURE),
 };
 
-char *snd_pcm_state_names[] = {
+static char *snd_pcm_state_names[] = {
 	STATE(OPEN),
 	STATE(SETUP),
 	STATE(PREPARED),
@@ -142,7 +142,7 @@
 	STATE(SUSPENDED),
 };
 
-char *snd_pcm_access_names[] = {
+static char *snd_pcm_access_names[] = {
 	ACCESS(MMAP_INTERLEAVED), 
 	ACCESS(MMAP_NONINTERLEAVED),
 	ACCESS(MMAP_COMPLEX),
@@ -150,7 +150,7 @@
 	ACCESS(RW_NONINTERLEAVED),
 };
 
-char *snd_pcm_format_names[] = {
+static char *snd_pcm_format_names[] = {
 	FORMAT(S8),
 	FORMAT(U8),
 	FORMAT(S16_LE),
@@ -191,22 +191,22 @@
 	FORMAT(U18_3BE),
 };
 
-char *snd_pcm_subformat_names[] = {
+static char *snd_pcm_subformat_names[] = {
 	SUBFORMAT(STD), 
 };
 
-char *snd_pcm_tstamp_mode_names[] = {
+static char *snd_pcm_tstamp_mode_names[] = {
 	TSTAMP(NONE),
 	TSTAMP(MMAP),
 };
 
-const char *snd_pcm_stream_name(snd_pcm_stream_t stream)
+static const char *snd_pcm_stream_name(snd_pcm_stream_t stream)
 {
 	snd_assert(stream <= SNDRV_PCM_STREAM_LAST, return NULL);
 	return snd_pcm_stream_names[stream];
 }
 
-const char *snd_pcm_access_name(snd_pcm_access_t access)
+static const char *snd_pcm_access_name(snd_pcm_access_t access)
 {
 	snd_assert(access <= SNDRV_PCM_ACCESS_LAST, return NULL);
 	return snd_pcm_access_names[access];
@@ -218,19 +218,19 @@
 	return snd_pcm_format_names[format];
 }
 
-const char *snd_pcm_subformat_name(snd_pcm_subformat_t subformat)
+static const char *snd_pcm_subformat_name(snd_pcm_subformat_t subformat)
 {
 	snd_assert(subformat <= SNDRV_PCM_SUBFORMAT_LAST, return NULL);
 	return snd_pcm_subformat_names[subformat];
 }
 
-const char *snd_pcm_tstamp_mode_name(snd_pcm_tstamp_t mode)
+static const char *snd_pcm_tstamp_mode_name(snd_pcm_tstamp_t mode)
 {
 	snd_assert(mode <= SNDRV_PCM_TSTAMP_LAST, return NULL);
 	return snd_pcm_tstamp_mode_names[mode];
 }
 
-const char *snd_pcm_state_name(snd_pcm_state_t state)
+static const char *snd_pcm_state_name(snd_pcm_state_t state)
 {
 	snd_assert(state <= SNDRV_PCM_STATE_LAST, return NULL);
 	return snd_pcm_state_names[state];
@@ -238,7 +238,7 @@
 
 #if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE)
 #include <linux/soundcard.h>
-const char *snd_pcm_oss_format_name(int format)
+static const char *snd_pcm_oss_format_name(int format)
 {
 	switch (format) {
 	case AFMT_MU_LAW:
@@ -830,8 +830,7 @@
 		runtime->private_free(runtime);
 	snd_free_pages((void*)runtime->status, PAGE_ALIGN(sizeof(snd_pcm_mmap_status_t)));
 	snd_free_pages((void*)runtime->control, PAGE_ALIGN(sizeof(snd_pcm_mmap_control_t)));
-	if (runtime->hw_constraints.rules)
-		kfree(runtime->hw_constraints.rules);
+	kfree(runtime->hw_constraints.rules);
 	kfree(runtime);
 	substream->runtime = NULL;
 	substream->pstr->substream_opened--;
@@ -1035,7 +1034,6 @@
 EXPORT_SYMBOL(snd_pcm_open_substream);
 EXPORT_SYMBOL(snd_pcm_release_substream);
 EXPORT_SYMBOL(snd_pcm_format_name);
-EXPORT_SYMBOL(snd_pcm_subformat_name);
   /* pcm_native.c */
 EXPORT_SYMBOL(snd_pcm_link_rwlock);
 EXPORT_SYMBOL(snd_pcm_start);
@@ -1046,10 +1044,6 @@
 EXPORT_SYMBOL(snd_pcm_kernel_playback_ioctl);
 EXPORT_SYMBOL(snd_pcm_kernel_capture_ioctl);
 EXPORT_SYMBOL(snd_pcm_kernel_ioctl);
-EXPORT_SYMBOL(snd_pcm_open);
-EXPORT_SYMBOL(snd_pcm_release);
-EXPORT_SYMBOL(snd_pcm_playback_poll);
-EXPORT_SYMBOL(snd_pcm_capture_poll);
 EXPORT_SYMBOL(snd_pcm_mmap_data);
 #if SNDRV_PCM_INFO_MMAP_IOMEM
 EXPORT_SYMBOL(snd_pcm_lib_mmap_iomem);
@@ -1062,7 +1056,6 @@
 EXPORT_SYMBOL(snd_pcm_format_big_endian);
 EXPORT_SYMBOL(snd_pcm_format_width);
 EXPORT_SYMBOL(snd_pcm_format_physical_width);
-EXPORT_SYMBOL(snd_pcm_format_size);
 EXPORT_SYMBOL(snd_pcm_format_silence_64);
 EXPORT_SYMBOL(snd_pcm_format_set_silence);
 EXPORT_SYMBOL(snd_pcm_build_linear_format);
diff -Nru a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c
--- a/sound/core/pcm_lib.c	2005-01-10 20:11:18 -08:00
+++ b/sound/core/pcm_lib.c	2005-01-10 20:11:18 -08:00
@@ -371,7 +371,7 @@
 	return n;
 }
 
-int snd_interval_refine_min(snd_interval_t *i, unsigned int min, int openmin)
+static int snd_interval_refine_min(snd_interval_t *i, unsigned int min, int openmin)
 {
 	int changed = 0;
 	assert(!snd_interval_empty(i));
@@ -396,7 +396,7 @@
 	return changed;
 }
 
-int snd_interval_refine_max(snd_interval_t *i, unsigned int max, int openmax)
+static int snd_interval_refine_max(snd_interval_t *i, unsigned int max, int openmax)
 {
 	int changed = 0;
 	assert(!snd_interval_empty(i));
@@ -474,7 +474,7 @@
 	return changed;
 }
 
-int snd_interval_refine_first(snd_interval_t *i)
+static int snd_interval_refine_first(snd_interval_t *i)
 {
 	assert(!snd_interval_empty(i));
 	if (snd_interval_single(i))
@@ -486,7 +486,7 @@
 	return 1;
 }
 
-int snd_interval_refine_last(snd_interval_t *i)
+static int snd_interval_refine_last(snd_interval_t *i)
 {
 	assert(!snd_interval_empty(i));
 	if (snd_interval_single(i))
@@ -498,7 +498,7 @@
 	return 1;
 }
 
-int snd_interval_refine_set(snd_interval_t *i, unsigned int val)
+static int snd_interval_refine_set(snd_interval_t *i, unsigned int val)
 {
 	snd_interval_t t;
 	t.empty = 0;
@@ -718,9 +718,9 @@
  *
  * Returns non-zero if the value is changed, zero if not changed.
  */
-int snd_interval_ratden(snd_interval_t *i,
-		    unsigned int rats_count, ratden_t *rats,
-		    unsigned int *nump, unsigned int *denp)
+static int snd_interval_ratden(snd_interval_t *i,
+			       unsigned int rats_count, ratden_t *rats,
+			       unsigned int *nump, unsigned int *denp)
 {
 	unsigned int best_num, best_diff, best_den;
 	unsigned int k;
@@ -858,7 +858,7 @@
         return changed;
 }
 
-int snd_interval_step(snd_interval_t *i, unsigned int min, unsigned int step)
+static int snd_interval_step(snd_interval_t *i, unsigned int min, unsigned int step)
 {
 	unsigned int n;
 	int changed = 0;
@@ -1856,80 +1856,6 @@
  *  Conditions
  */
 
-/**
- * snd_pcm_playback_ready - check whether the playback buffer is available
- * @substream: the pcm substream instance
- *
- * Checks whether enough free space is available on the playback buffer.
- *
- * Returns non-zero if available, or zero if not.
- */
-int snd_pcm_playback_ready(snd_pcm_substream_t *substream)
-{
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	return snd_pcm_playback_avail(runtime) >= runtime->control->avail_min;
-}
-
-/**
- * snd_pcm_capture_ready - check whether the capture buffer is available
- * @substream: the pcm substream instance
- *
- * Checks whether enough capture data is available on the capture buffer.
- *
- * Returns non-zero if available, or zero if not.
- */
-int snd_pcm_capture_ready(snd_pcm_substream_t *substream)
-{
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	return snd_pcm_capture_avail(runtime) >= runtime->control->avail_min;
-}
-
-/**
- * snd_pcm_playback_data - check whether any data exists on the playback buffer
- * @substream: the pcm substream instance
- *
- * Checks whether any data exists on the playback buffer. If stop_threshold
- * is bigger or equal to boundary, then this function returns always non-zero.
- *
- * Returns non-zero if exists, or zero if not.
- */
-int snd_pcm_playback_data(snd_pcm_substream_t *substream)
-{
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	
-	if (runtime->stop_threshold >= runtime->boundary)
-		return 1;
-	return snd_pcm_playback_avail(runtime) < runtime->buffer_size;
-}
-
-/**
- * snd_pcm_playback_empty - check whether the playback buffer is empty
- * @substream: the pcm substream instance
- *
- * Checks whether the playback buffer is empty.
- *
- * Returns non-zero if empty, or zero if not.
- */
-int snd_pcm_playback_empty(snd_pcm_substream_t *substream)
-{
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	return snd_pcm_playback_avail(runtime) >= runtime->buffer_size;
-}
-
-/**
- * snd_pcm_capture_empty - check whether the capture buffer is empty
- * @substream: the pcm substream instance
- *
- * Checks whether the capture buffer is empty.
- *
- * Returns non-zero if empty, or zero if not.
- */
-int snd_pcm_capture_empty(snd_pcm_substream_t *substream)
-{
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	return snd_pcm_capture_avail(runtime) == 0;
-}
-
 static void snd_pcm_system_tick_set(snd_pcm_substream_t *substream, 
 				    unsigned long ticks)
 {
@@ -2643,7 +2569,6 @@
 EXPORT_SYMBOL(snd_interval_refine);
 EXPORT_SYMBOL(snd_interval_list);
 EXPORT_SYMBOL(snd_interval_ratnum);
-EXPORT_SYMBOL(snd_interval_ratden);
 EXPORT_SYMBOL(snd_interval_muldivk);
 EXPORT_SYMBOL(snd_interval_mulkdiv);
 EXPORT_SYMBOL(snd_interval_div);
@@ -2660,6 +2585,7 @@
 EXPORT_SYMBOL(snd_pcm_hw_param_near);
 EXPORT_SYMBOL(snd_pcm_hw_param_set);
 EXPORT_SYMBOL(snd_pcm_hw_refine);
+EXPORT_SYMBOL(snd_pcm_hw_params);
 EXPORT_SYMBOL(snd_pcm_hw_constraints_init);
 EXPORT_SYMBOL(snd_pcm_hw_constraints_complete);
 EXPORT_SYMBOL(snd_pcm_hw_constraint_list);
@@ -2674,10 +2600,6 @@
 EXPORT_SYMBOL(snd_pcm_set_ops);
 EXPORT_SYMBOL(snd_pcm_set_sync);
 EXPORT_SYMBOL(snd_pcm_lib_ioctl);
-EXPORT_SYMBOL(snd_pcm_playback_ready);
-EXPORT_SYMBOL(snd_pcm_capture_ready);
-EXPORT_SYMBOL(snd_pcm_playback_data);
-EXPORT_SYMBOL(snd_pcm_capture_empty);
 EXPORT_SYMBOL(snd_pcm_stop);
 EXPORT_SYMBOL(snd_pcm_period_elapsed);
 EXPORT_SYMBOL(snd_pcm_lib_write);
@@ -2687,7 +2609,6 @@
 EXPORT_SYMBOL(snd_pcm_lib_buffer_bytes);
 EXPORT_SYMBOL(snd_pcm_lib_period_bytes);
 /* pcm_memory.c */
-EXPORT_SYMBOL(snd_pcm_lib_preallocate_free);
 EXPORT_SYMBOL(snd_pcm_lib_preallocate_free_for_all);
 EXPORT_SYMBOL(snd_pcm_lib_preallocate_pages);
 EXPORT_SYMBOL(snd_pcm_lib_preallocate_pages_for_all);
diff -Nru a/sound/core/pcm_memory.c b/sound/core/pcm_memory.c
--- a/sound/core/pcm_memory.c	2005-01-10 20:11:20 -08:00
+++ b/sound/core/pcm_memory.c	2005-01-10 20:11:20 -08:00
@@ -37,7 +37,7 @@
 module_param(maximum_substreams, int, 0444);
 MODULE_PARM_DESC(maximum_substreams, "Maximum substreams with preallocated DMA memory.");
 
-const static size_t snd_minimum_buffer = 16384;
+static const size_t snd_minimum_buffer = 16384;
 
 
 /*
diff -Nru a/sound/core/pcm_native.c b/sound/core/pcm_native.c
--- a/sound/core/pcm_native.c	2005-01-10 20:11:18 -08:00
+++ b/sound/core/pcm_native.c	2005-01-10 20:11:18 -08:00
@@ -329,8 +329,8 @@
 	return err;
 }
 
-static int snd_pcm_hw_params(snd_pcm_substream_t *substream,
-			     snd_pcm_hw_params_t *params)
+int snd_pcm_hw_params(snd_pcm_substream_t *substream,
+		      snd_pcm_hw_params_t *params)
 {
 	snd_pcm_runtime_t *runtime;
 	int err;
@@ -1445,7 +1445,7 @@
 
  _end:
 	snd_pcm_stream_unlock_irq(substream);
-	if (drec && drec != &drec_tmp)
+	if (drec != &drec_tmp)
 		kfree(drec);
  _unlock:
 	snd_power_unlock(card);
@@ -2020,7 +2020,7 @@
 	return 0;
 }
 
-int snd_pcm_open(struct inode *inode, struct file *file)
+static int snd_pcm_open(struct inode *inode, struct file *file)
 {
 	int cardnum = SNDRV_MINOR_CARD(iminor(inode));
 	int device = SNDRV_MINOR_DEVICE(iminor(inode));
@@ -2079,7 +2079,7 @@
       	return err;
 }
 
-int snd_pcm_release(struct inode *inode, struct file *file)
+static int snd_pcm_release(struct inode *inode, struct file *file)
 {
 	snd_pcm_t *pcm;
 	snd_pcm_substream_t *substream;
@@ -2101,7 +2101,7 @@
 	return 0;
 }
 
-snd_pcm_sframes_t snd_pcm_playback_rewind(snd_pcm_substream_t *substream, snd_pcm_uframes_t frames)
+static snd_pcm_sframes_t snd_pcm_playback_rewind(snd_pcm_substream_t *substream, snd_pcm_uframes_t frames)
 {
 	snd_pcm_runtime_t *runtime = substream->runtime;
 	snd_pcm_sframes_t appl_ptr;
@@ -2150,7 +2150,7 @@
 	return ret;
 }
 
-snd_pcm_sframes_t snd_pcm_capture_rewind(snd_pcm_substream_t *substream, snd_pcm_uframes_t frames)
+static snd_pcm_sframes_t snd_pcm_capture_rewind(snd_pcm_substream_t *substream, snd_pcm_uframes_t frames)
 {
 	snd_pcm_runtime_t *runtime = substream->runtime;
 	snd_pcm_sframes_t appl_ptr;
@@ -2199,7 +2199,7 @@
 	return ret;
 }
 
-snd_pcm_sframes_t snd_pcm_playback_forward(snd_pcm_substream_t *substream, snd_pcm_uframes_t frames)
+static snd_pcm_sframes_t snd_pcm_playback_forward(snd_pcm_substream_t *substream, snd_pcm_uframes_t frames)
 {
 	snd_pcm_runtime_t *runtime = substream->runtime;
 	snd_pcm_sframes_t appl_ptr;
@@ -2249,7 +2249,7 @@
 	return ret;
 }
 
-snd_pcm_sframes_t snd_pcm_capture_forward(snd_pcm_substream_t *substream, snd_pcm_uframes_t frames)
+static snd_pcm_sframes_t snd_pcm_capture_forward(snd_pcm_substream_t *substream, snd_pcm_uframes_t frames)
 {
 	snd_pcm_runtime_t *runtime = substream->runtime;
 	snd_pcm_sframes_t appl_ptr;
@@ -2835,7 +2835,7 @@
 	return result;
 }
 
-unsigned int snd_pcm_playback_poll(struct file *file, poll_table * wait)
+static unsigned int snd_pcm_playback_poll(struct file *file, poll_table * wait)
 {
 	snd_pcm_file_t *pcm_file;
 	snd_pcm_substream_t *substream;
@@ -2873,7 +2873,7 @@
 	return mask;
 }
 
-unsigned int snd_pcm_capture_poll(struct file *file, poll_table * wait)
+static unsigned int snd_pcm_capture_poll(struct file *file, poll_table * wait)
 {
 	snd_pcm_file_t *pcm_file;
 	snd_pcm_substream_t *substream;
diff -Nru a/sound/core/rawmidi.c b/sound/core/rawmidi.c
--- a/sound/core/rawmidi.c	2005-01-10 20:11:16 -08:00
+++ b/sound/core/rawmidi.c	2005-01-10 20:11:16 -08:00
@@ -54,7 +54,7 @@
 static int snd_rawmidi_dev_disconnect(snd_device_t *device);
 static int snd_rawmidi_dev_unregister(snd_device_t *device);
 
-snd_rawmidi_t *snd_rawmidi_devices[SNDRV_CARDS * SNDRV_RAWMIDI_DEVICES];
+static snd_rawmidi_t *snd_rawmidi_devices[SNDRV_CARDS * SNDRV_RAWMIDI_DEVICES];
 
 static DECLARE_MUTEX(register_mutex);
 
@@ -795,8 +795,10 @@
 	return err;
 }
 
-int snd_rawmidi_control_ioctl(snd_card_t * card, snd_ctl_file_t * control,
-			      unsigned int cmd, unsigned long arg)
+static int snd_rawmidi_control_ioctl(snd_card_t * card,
+				     snd_ctl_file_t * control,
+				     unsigned int cmd,
+				     unsigned long arg)
 {
 	void __user *argp = (void __user *)arg;
 	unsigned int tmp;
diff -Nru a/sound/core/seq/Makefile b/sound/core/seq/Makefile
--- a/sound/core/seq/Makefile	2005-01-10 20:11:22 -08:00
+++ b/sound/core/seq/Makefile	2005-01-10 20:11:22 -08:00
@@ -37,6 +37,8 @@
 obj-$(CONFIG_SND_VIRMIDI) += snd-seq-virmidi.o snd-seq-midi-event.o
 obj-$(call sequencer,$(CONFIG_SND_RAWMIDI)) += snd-seq-midi.o snd-seq-midi-event.o
 obj-$(call sequencer,$(CONFIG_SND_OPL3_LIB)) += snd-seq-midi-event.o snd-seq-midi-emul.o snd-seq-instr.o
+obj-$(call sequencer,$(CONFIG_SND_OPL4_LIB)) += snd-seq-midi-event.o snd-seq-midi-emul.o snd-seq-instr.o
+obj-$(call sequencer,$(CONFIG_SND_GUS_SYNTH)) += snd-seq-instr.o
 obj-$(call sequencer,$(CONFIG_SND_SBAWE)) += snd-seq-midi-emul.o snd-seq-virmidi.o
 obj-$(call sequencer,$(CONFIG_SND_EMU10K1)) += snd-seq-midi-emul.o snd-seq-virmidi.o
 obj-$(call sequencer,$(CONFIG_SND_TRIDENT)) += snd-seq-midi-emul.o snd-seq-instr.o
diff -Nru a/sound/core/seq/instr/ainstr_fm.c b/sound/core/seq/instr/ainstr_fm.c
--- a/sound/core/seq/instr/ainstr_fm.c	2005-01-10 20:11:18 -08:00
+++ b/sound/core/seq/instr/ainstr_fm.c	2005-01-10 20:11:18 -08:00
@@ -30,8 +30,6 @@
 MODULE_DESCRIPTION("Advanced Linux Sound Architecture FM Instrument support.");
 MODULE_LICENSE("GPL");
 
-char *snd_seq_fm_id = SNDRV_SEQ_INSTR_ID_OPL2_3;
-
 static int snd_seq_fm_put(void *private_data, snd_seq_kinstr_t *instr,
 			  char __user *instr_data, long len, int atomic, int cmd)
 {
@@ -129,7 +127,7 @@
 	memset(ops, 0, sizeof(*ops));
 	// ops->private_data = private_data;
 	ops->add_len = sizeof(fm_instrument_t);
-	ops->instr_type = snd_seq_fm_id;
+	ops->instr_type = SNDRV_SEQ_INSTR_ID_OPL2_3;
 	ops->put = snd_seq_fm_put;
 	ops->get = snd_seq_fm_get;
 	ops->get_size = snd_seq_fm_get_size;
@@ -155,5 +153,4 @@
 module_init(alsa_ainstr_fm_init)
 module_exit(alsa_ainstr_fm_exit)
 
-EXPORT_SYMBOL(snd_seq_fm_id);
 EXPORT_SYMBOL(snd_seq_fm_init);
diff -Nru a/sound/core/seq/instr/ainstr_gf1.c b/sound/core/seq/instr/ainstr_gf1.c
--- a/sound/core/seq/instr/ainstr_gf1.c	2005-01-10 20:11:21 -08:00
+++ b/sound/core/seq/instr/ainstr_gf1.c	2005-01-10 20:11:21 -08:00
@@ -31,8 +31,6 @@
 MODULE_DESCRIPTION("Advanced Linux Sound Architecture GF1 (GUS) Patch support.");
 MODULE_LICENSE("GPL");
 
-char *snd_seq_gf1_id = SNDRV_SEQ_INSTR_ID_GUS_PATCH;
-
 static unsigned int snd_seq_gf1_size(unsigned int size, unsigned int format)
 {
 	unsigned int result = size;
@@ -331,7 +329,7 @@
 	ops->private_data = private_data;
 	ops->kops.private_data = ops;
 	ops->kops.add_len = sizeof(gf1_instrument_t);
-	ops->kops.instr_type = snd_seq_gf1_id;
+	ops->kops.instr_type = SNDRV_SEQ_INSTR_ID_GUS_PATCH;
 	ops->kops.put = snd_seq_gf1_put;
 	ops->kops.get = snd_seq_gf1_get;
 	ops->kops.get_size = snd_seq_gf1_get_size;
@@ -357,5 +355,4 @@
 module_init(alsa_ainstr_gf1_init)
 module_exit(alsa_ainstr_gf1_exit)
 
-EXPORT_SYMBOL(snd_seq_gf1_id);
 EXPORT_SYMBOL(snd_seq_gf1_init);
diff -Nru a/sound/core/seq/instr/ainstr_iw.c b/sound/core/seq/instr/ainstr_iw.c
--- a/sound/core/seq/instr/ainstr_iw.c	2005-01-10 20:11:19 -08:00
+++ b/sound/core/seq/instr/ainstr_iw.c	2005-01-10 20:11:19 -08:00
@@ -31,8 +31,6 @@
 MODULE_DESCRIPTION("Advanced Linux Sound Architecture IWFFFF support.");
 MODULE_LICENSE("GPL");
 
-char *snd_seq_iwffff_id = SNDRV_SEQ_INSTR_ID_INTERWAVE;
-
 static unsigned int snd_seq_iwffff_size(unsigned int size, unsigned int format)
 {
 	unsigned int result = size;
@@ -595,7 +593,7 @@
 	ops->private_data = private_data;
 	ops->kops.private_data = ops;
 	ops->kops.add_len = sizeof(iwffff_instrument_t);
-	ops->kops.instr_type = snd_seq_iwffff_id;
+	ops->kops.instr_type = SNDRV_SEQ_INSTR_ID_INTERWAVE;
 	ops->kops.put = snd_seq_iwffff_put;
 	ops->kops.get = snd_seq_iwffff_get;
 	ops->kops.get_size = snd_seq_iwffff_get_size;
@@ -621,5 +619,4 @@
 module_init(alsa_ainstr_iw_init)
 module_exit(alsa_ainstr_iw_exit)
 
-EXPORT_SYMBOL(snd_seq_iwffff_id);
 EXPORT_SYMBOL(snd_seq_iwffff_init);
diff -Nru a/sound/core/seq/instr/ainstr_simple.c b/sound/core/seq/instr/ainstr_simple.c
--- a/sound/core/seq/instr/ainstr_simple.c	2005-01-10 20:11:21 -08:00
+++ b/sound/core/seq/instr/ainstr_simple.c	2005-01-10 20:11:21 -08:00
@@ -31,8 +31,6 @@
 MODULE_DESCRIPTION("Advanced Linux Sound Architecture Simple Instrument support.");
 MODULE_LICENSE("GPL");
 
-char *snd_seq_simple_id = SNDRV_SEQ_INSTR_ID_SIMPLE;
-
 static unsigned int snd_seq_simple_size(unsigned int size, unsigned int format)
 {
 	unsigned int result = size;
@@ -188,7 +186,7 @@
 	ops->private_data = private_data;
 	ops->kops.private_data = ops;
 	ops->kops.add_len = sizeof(simple_instrument_t);
-	ops->kops.instr_type = snd_seq_simple_id;
+	ops->kops.instr_type = SNDRV_SEQ_INSTR_ID_SIMPLE;
 	ops->kops.put = snd_seq_simple_put;
 	ops->kops.get = snd_seq_simple_get;
 	ops->kops.get_size = snd_seq_simple_get_size;
@@ -214,5 +212,4 @@
 module_init(alsa_ainstr_simple_init)
 module_exit(alsa_ainstr_simple_exit)
 
-EXPORT_SYMBOL(snd_seq_simple_id);
 EXPORT_SYMBOL(snd_seq_simple_init);
diff -Nru a/sound/core/seq/oss/seq_oss_device.h b/sound/core/seq/oss/seq_oss_device.h
--- a/sound/core/seq/oss/seq_oss_device.h	2005-01-10 20:11:19 -08:00
+++ b/sound/core/seq/oss/seq_oss_device.h	2005-01-10 20:11:19 -08:00
@@ -185,7 +185,6 @@
 
 /* misc. functions for proc interface */
 char *enabled_str(int bool);
-char *filemode_str(int fmode);
 
 
 /* for debug */
diff -Nru a/sound/core/seq/oss/seq_oss_init.c b/sound/core/seq/oss/seq_oss_init.c
--- a/sound/core/seq/oss/seq_oss_init.c	2005-01-10 20:11:16 -08:00
+++ b/sound/core/seq/oss/seq_oss_init.c	2005-01-10 20:11:16 -08:00
@@ -491,6 +491,26 @@
 	snd_seq_oss_timer_stop(dp->timer);
 }
 
+
+/*
+ * misc. functions for proc interface
+ */
+char *
+enabled_str(int bool)
+{
+	return bool ? "enabled" : "disabled";
+}
+
+static char *
+filemode_str(int val)
+{
+	static char *str[] = {
+		"none", "read", "write", "read/write",
+	};
+	return str[val & SNDRV_SEQ_OSS_FILE_ACMODE];
+}
+
+
 /*
  * proc interface
  */
@@ -522,23 +542,4 @@
 			snd_seq_oss_readq_info_read(dp->readq, buf);
 	}
 }
-
-/*
- * misc. functions for proc interface
- */
-char *
-enabled_str(int bool)
-{
-	return bool ? "enabled" : "disabled";
-}
-
-char *
-filemode_str(int val)
-{
-	static char *str[] = {
-		"none", "read", "write", "read/write",
-	};
-	return str[val & SNDRV_SEQ_OSS_FILE_ACMODE];
-}
-
 
diff -Nru a/sound/core/seq/oss/seq_oss_misc.c b/sound/core/seq/oss/seq_oss_misc.c
--- a/sound/core/seq/oss/seq_oss_misc.c	2005-01-10 20:11:16 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,110 +0,0 @@
-/*----------------------------------------------------------------
- * miscellaneous functions
- *----------------------------------------------------------------*/
-
-unsigned short snd_seq_oss_semitone_tuning[24] = 
-{
-/*   0 */ 10000, 10595, 11225, 11892, 12599, 13348, 14142, 14983, 
-/*   8 */ 15874, 16818, 17818, 18877, 20000, 21189, 22449, 23784, 
-/*  16 */ 25198, 26697, 28284, 29966, 31748, 33636, 35636, 37755
-};
-
-unsigned short snd_seq_oss_cent_tuning[100] =
-{
-/*   0 */ 10000, 10006, 10012, 10017, 10023, 10029, 10035, 10041, 
-/*   8 */ 10046, 10052, 10058, 10064, 10070, 10075, 10081, 10087, 
-/*  16 */ 10093, 10099, 10105, 10110, 10116, 10122, 10128, 10134, 
-/*  24 */ 10140, 10145, 10151, 10157, 10163, 10169, 10175, 10181, 
-/*  32 */ 10187, 10192, 10198, 10204, 10210, 10216, 10222, 10228, 
-/*  40 */ 10234, 10240, 10246, 10251, 10257, 10263, 10269, 10275, 
-/*  48 */ 10281, 10287, 10293, 10299, 10305, 10311, 10317, 10323, 
-/*  56 */ 10329, 10335, 10341, 10347, 10353, 10359, 10365, 10371, 
-/*  64 */ 10377, 10383, 10389, 10395, 10401, 10407, 10413, 10419, 
-/*  72 */ 10425, 10431, 10437, 10443, 10449, 10455, 10461, 10467, 
-/*  80 */ 10473, 10479, 10485, 10491, 10497, 10503, 10509, 10515, 
-/*  88 */ 10521, 10528, 10534, 10540, 10546, 10552, 10558, 10564, 
-/*  96 */ 10570, 10576, 10582, 10589
-};
-
-/* convert from MIDI note to frequency */
-int
-snd_seq_oss_note_to_freq(int note_num)
-{
-
-	/*
-	 * This routine converts a midi note to a frequency (multiplied by 1000)
-	 */
-
-	int note, octave, note_freq;
-	static int notes[] = {
-		261632, 277189, 293671, 311132, 329632, 349232,
-		369998, 391998, 415306, 440000, 466162, 493880
-	};
-
-#define BASE_OCTAVE	5
-
-	octave = note_num / 12;
-	note = note_num % 12;
-
-	note_freq = notes[note];
-
-	if (octave < BASE_OCTAVE)
-		note_freq >>= (BASE_OCTAVE - octave);
-	else if (octave > BASE_OCTAVE)
-		note_freq <<= (octave - BASE_OCTAVE);
-
-	/*
-	 * note_freq >>= 1;
-	 */
-
-	return note_freq;
-}
-
-unsigned long
-snd_seq_oss_compute_finetune(unsigned long base_freq, int bend, int range, int vibrato_cents)
-{
-	unsigned long amount;
-	int negative, semitones, cents, multiplier = 1;
-
-	if (!bend || !range || !base_freq)
-		return base_freq;
-
-	if (range >= 8192)
-		range = 8192;
-
-	bend = bend * range / 8192;	/* Convert to cents */
-	bend += vibrato_cents;
-
-	if (!bend)
-		return base_freq;
-
-	negative = bend < 0 ? 1 : 0;
-
-	if (bend < 0)
-		bend *= -1;
-	if (bend > range)
-		bend = range;
-
-	/*
-	   if (bend > 2399)
-	   bend = 2399;
-	 */
-	while (bend > 2399) {
-		multiplier *= 4;
-		bend -= 2400;
-	}
-
-	semitones = bend / 100;
-	if (semitones > 99)
-		semitones = 99;
-	cents = bend % 100;
-
-	amount = (int) (snd_seq_oss_semitone_tuning[semitones] * multiplier *
-			snd_seq_oss_cent_tuning[cents]) / 10000;
-
-	if (negative)
-		return (base_freq * 10000) / amount;	/* Bend down */
-	else
-		return (base_freq * amount) / 10000;	/* Bend up */
-}
-
diff -Nru a/sound/core/seq/oss/seq_oss_readq.c b/sound/core/seq/oss/seq_oss_readq.c
--- a/sound/core/seq/oss/seq_oss_readq.c	2005-01-10 20:11:17 -08:00
+++ b/sound/core/seq/oss/seq_oss_readq.c	2005-01-10 20:11:17 -08:00
@@ -74,8 +74,7 @@
 snd_seq_oss_readq_delete(seq_oss_readq_t *q)
 {
 	if (q) {
-		if (q->q)
-			kfree(q->q);
+		kfree(q->q);
 		kfree(q);
 	}
 }
diff -Nru a/sound/core/seq/oss/seq_oss_timer.c b/sound/core/seq/oss/seq_oss_timer.c
--- a/sound/core/seq/oss/seq_oss_timer.c	2005-01-10 20:11:17 -08:00
+++ b/sound/core/seq/oss/seq_oss_timer.c	2005-01-10 20:11:17 -08:00
@@ -149,7 +149,7 @@
 	ev.queue = dp->queue;
 	ev.data.queue.queue = dp->queue;
 	ev.data.queue.param.value = value;
-	return snd_seq_kernel_client_dispatch(dp->cseq, &ev, 0, 0);
+	return snd_seq_kernel_client_dispatch(dp->cseq, &ev, 1, 0);
 }
 
 /*
diff -Nru a/sound/core/seq/seq_clientmgr.c b/sound/core/seq/seq_clientmgr.c
--- a/sound/core/seq/seq_clientmgr.c	2005-01-10 20:11:16 -08:00
+++ b/sound/core/seq/seq_clientmgr.c	2005-01-10 20:11:16 -08:00
@@ -751,8 +751,8 @@
  *               n == 0 : the event was not passed to any client.
  *               n < 0  : error - event was not processed.
  */
-int snd_seq_deliver_event(client_t *client, snd_seq_event_t *event,
-			  int atomic, int hop)
+static int snd_seq_deliver_event(client_t *client, snd_seq_event_t *event,
+				 int atomic, int hop)
 {
 	int result;
 
@@ -904,7 +904,7 @@
 		return -ENXIO; /* queue is not allocated */
 
 	/* allocate an event cell */
-	err = snd_seq_event_dup(client->pool, event, &cell, !blocking && !atomic, file);
+	err = snd_seq_event_dup(client->pool, event, &cell, !blocking || atomic, file);
 	if (err < 0)
 		return err;
 
diff -Nru a/sound/core/seq/seq_clientmgr.h b/sound/core/seq/seq_clientmgr.h
--- a/sound/core/seq/seq_clientmgr.h	2005-01-10 20:11:22 -08:00
+++ b/sound/core/seq/seq_clientmgr.h	2005-01-10 20:11:22 -08:00
@@ -100,6 +100,5 @@
 int snd_seq_kernel_client_enqueue_blocking(int client, snd_seq_event_t * ev, struct file *file, int atomic, int hop);
 int snd_seq_kernel_client_write_poll(int clientid, struct file *file, poll_table *wait);
 int snd_seq_client_notify_subscription(int client, int port, snd_seq_port_subscribe_t *info, int evtype);
-int snd_seq_deliver_event(client_t *client, snd_seq_event_t *event, int atomic, int hop);
 
 #endif
diff -Nru a/sound/core/seq/seq_instr.c b/sound/core/seq/seq_instr.c
--- a/sound/core/seq/seq_instr.c	2005-01-10 20:11:18 -08:00
+++ b/sound/core/seq/seq_instr.c	2005-01-10 20:11:18 -08:00
@@ -49,19 +49,7 @@
 	}
 }
 
-snd_seq_kcluster_t *snd_seq_cluster_new(int atomic)
-{
-	return kcalloc(1, sizeof(snd_seq_kcluster_t), atomic ? GFP_ATOMIC : GFP_KERNEL);
-}
-
-void snd_seq_cluster_free(snd_seq_kcluster_t *cluster, int atomic)
-{
-	if (cluster == NULL)
-		return;
-	kfree(cluster);
-}
-
-snd_seq_kinstr_t *snd_seq_instr_new(int add_len, int atomic)
+static snd_seq_kinstr_t *snd_seq_instr_new(int add_len, int atomic)
 {
 	snd_seq_kinstr_t *instr;
 	
@@ -72,7 +60,7 @@
 	return instr;
 }
 
-int snd_seq_instr_free(snd_seq_kinstr_t *instr, int atomic)
+static int snd_seq_instr_free(snd_seq_kinstr_t *instr, int atomic)
 {
 	int result = 0;
 
@@ -132,7 +120,7 @@
 		while ((cluster = list->chash[idx]) != NULL) {
 			list->chash[idx] = cluster->next;
 			list->ccount--;
-			snd_seq_cluster_free(cluster, 0);
+			kfree(cluster);
 		}
 	}
 	kfree(list);
diff -Nru a/sound/core/seq/seq_memory.c b/sound/core/seq/seq_memory.c
--- a/sound/core/seq/seq_memory.c	2005-01-10 20:11:16 -08:00
+++ b/sound/core/seq/seq_memory.c	2005-01-10 20:11:16 -08:00
@@ -215,7 +215,7 @@
 /*
  * allocate an event cell.
  */
-int snd_seq_cell_alloc(pool_t *pool, snd_seq_event_cell_t **cellp, int nonblock, struct file *file)
+static int snd_seq_cell_alloc(pool_t *pool, snd_seq_event_cell_t **cellp, int nonblock, struct file *file)
 {
 	snd_seq_event_cell_t *cell;
 	unsigned long flags;
@@ -436,8 +436,7 @@
 	pool->total_elements = 0;
 	spin_unlock_irqrestore(&pool->lock, flags);
 
-	if (ptr)
-		vfree(ptr);
+	vfree(ptr);
 
 	spin_lock_irqsave(&pool->lock, flags);
 	pool->closing = 0;
diff -Nru a/sound/core/seq/seq_memory.h b/sound/core/seq/seq_memory.h
--- a/sound/core/seq/seq_memory.h	2005-01-10 20:11:21 -08:00
+++ b/sound/core/seq/seq_memory.h	2005-01-10 20:11:21 -08:00
@@ -64,7 +64,6 @@
 };
 
 extern void snd_seq_cell_free(snd_seq_event_cell_t* cell);
-int snd_seq_cell_alloc(pool_t *pool, snd_seq_event_cell_t **cellp, int nonblock, struct file *file);
 
 int snd_seq_event_dup(pool_t *pool, snd_seq_event_t *event, snd_seq_event_cell_t **cellp, int nonblock, struct file *file);
 
diff -Nru a/sound/core/seq/seq_midi.c b/sound/core/seq/seq_midi.c
--- a/sound/core/seq/seq_midi.c	2005-01-10 20:11:24 -08:00
+++ b/sound/core/seq/seq_midi.c	2005-01-10 20:11:24 -08:00
@@ -43,10 +43,10 @@
 MODULE_AUTHOR("Frank van de Pol <fvdpol@coil.demon.nl>, Jaroslav Kysela <perex@suse.cz>");
 MODULE_DESCRIPTION("Advanced Linux Sound Architecture sequencer MIDI synth.");
 MODULE_LICENSE("GPL");
-int output_buffer_size = PAGE_SIZE;
+static int output_buffer_size = PAGE_SIZE;
 module_param(output_buffer_size, int, 0644);
 MODULE_PARM_DESC(output_buffer_size, "Output buffer size in bytes.");
-int input_buffer_size = PAGE_SIZE;
+static int input_buffer_size = PAGE_SIZE;
 module_param(input_buffer_size, int, 0644);
 MODULE_PARM_DESC(input_buffer_size, "Input buffer size in bytes.");
 
@@ -284,7 +284,7 @@
 }
 
 /* register new midi synth port */
-int
+static int
 snd_seq_midisynth_register_port(snd_seq_device_t *dev)
 {
 	seq_midisynth_client_t *client;
@@ -423,7 +423,7 @@
 }
 
 /* release midi synth port */
-int
+static int
 snd_seq_midisynth_unregister_port(snd_seq_device_t *dev)
 {
 	seq_midisynth_client_t *client;
diff -Nru a/sound/core/seq/seq_midi_emul.c b/sound/core/seq/seq_midi_emul.c
--- a/sound/core/seq/seq_midi_emul.c	2005-01-10 20:11:22 -08:00
+++ b/sound/core/seq/seq_midi_emul.c	2005-01-10 20:11:22 -08:00
@@ -53,7 +53,7 @@
 static void sysex(snd_midi_op_t *ops, void *private, unsigned char *sysex, int len, snd_midi_channel_set_t *chset);
 static void all_sounds_off(snd_midi_op_t *ops, void *private, snd_midi_channel_t *chan);
 static void all_notes_off(snd_midi_op_t *ops, void *private, snd_midi_channel_t *chan);
-void snd_midi_reset_controllers(snd_midi_channel_t *chan);
+static void snd_midi_reset_controllers(snd_midi_channel_t *chan);
 static void reset_all_channels(snd_midi_channel_set_t *chset);
 
 
@@ -549,12 +549,12 @@
 
 		} else if (buf[5] == 0x01 && buf[6] == 0x30) {
 			/* reverb mode */
-			parsed = SNDRV_MIDI_SYSEX_GS_CHORUS_MODE;
+			parsed = SNDRV_MIDI_SYSEX_GS_REVERB_MODE;
 			chset->gs_reverb_mode = buf[7];
 
 		} else if (buf[5] == 0x01 && buf[6] == 0x38) {
 			/* chorus mode */
-			parsed = SNDRV_MIDI_SYSEX_GS_REVERB_MODE;
+			parsed = SNDRV_MIDI_SYSEX_GS_CHORUS_MODE;
 			chset->gs_chorus_mode = buf[7];
 
 		} else if (buf[5] == 0x00 && buf[6] == 0x04) {
@@ -621,7 +621,7 @@
 /*
  * Initialise a single midi channel control block.
  */
-void snd_midi_channel_init(snd_midi_channel_t *p, int n)
+static void snd_midi_channel_init(snd_midi_channel_t *p, int n)
 {
 	if (p == NULL)
 		return;
@@ -642,7 +642,7 @@
 /*
  * Allocate and initialise a set of midi channel control blocks.
  */
-snd_midi_channel_t *snd_midi_channel_init_set(int n)
+static snd_midi_channel_t *snd_midi_channel_init_set(int n)
 {
 	snd_midi_channel_t *chan;
 	int  i;
@@ -697,7 +697,7 @@
 /*
  * Reset the midi controllers on a particular channel to default values.
  */
-void snd_midi_reset_controllers(snd_midi_channel_t *chan)
+static void snd_midi_reset_controllers(snd_midi_channel_t *chan)
 {
 	memset(chan->control, 0, sizeof(chan->control));
 	chan->gm_volume = 127;
@@ -713,8 +713,7 @@
 {
 	if (chset == NULL)
 		return;
-	if (chset->channels != NULL)
-		kfree(chset->channels);
+	kfree(chset->channels);
 	kfree(chset);
 }
 
@@ -732,7 +731,5 @@
 
 EXPORT_SYMBOL(snd_midi_process_event);
 EXPORT_SYMBOL(snd_midi_channel_set_clear);
-EXPORT_SYMBOL(snd_midi_channel_init);
-EXPORT_SYMBOL(snd_midi_channel_init_set);
 EXPORT_SYMBOL(snd_midi_channel_alloc_set);
 EXPORT_SYMBOL(snd_midi_channel_free_set);
diff -Nru a/sound/core/seq/seq_midi_event.c b/sound/core/seq/seq_midi_event.c
--- a/sound/core/seq/seq_midi_event.c	2005-01-10 20:11:15 -08:00
+++ b/sound/core/seq/seq_midi_event.c	2005-01-10 20:11:15 -08:00
@@ -138,8 +138,7 @@
 void snd_midi_event_free(snd_midi_event_t *dev)
 {
 	if (dev != NULL) {
-		if (dev->buf)
-			kfree(dev->buf);
+		kfree(dev->buf);
 		kfree(dev);
 	}
 }
@@ -202,8 +201,7 @@
 	dev->bufsize = bufsize;
 	reset_encode(dev);
 	spin_unlock_irqrestore(&dev->lock, flags);
-	if (old_buf)
-		kfree(old_buf);
+	kfree(old_buf);
 	return 0;
 }
 
diff -Nru a/sound/core/sgbuf.c b/sound/core/sgbuf.c
--- a/sound/core/sgbuf.c	2005-01-10 20:11:20 -08:00
+++ b/sound/core/sgbuf.c	2005-01-10 20:11:20 -08:00
@@ -51,10 +51,8 @@
 		vunmap(dmab->area);
 	dmab->area = NULL;
 
-	if (sgbuf->table)
-		kfree(sgbuf->table);
-	if (sgbuf->page_table)
-		kfree(sgbuf->page_table);
+	kfree(sgbuf->table);
+	kfree(sgbuf->page_table);
 	kfree(sgbuf);
 	dmab->private_data = NULL;
 	
diff -Nru a/sound/core/sound.c b/sound/core/sound.c
--- a/sound/core/sound.c	2005-01-10 20:11:20 -08:00
+++ b/sound/core/sound.c	2005-01-10 20:11:20 -08:00
@@ -159,7 +159,7 @@
 	return err;
 }
 
-struct file_operations snd_fops =
+static struct file_operations snd_fops =
 {
 	.owner =	THIS_MODULE,
 	.open =		snd_open
@@ -228,12 +228,11 @@
 		return -EBUSY;
 	}
 	list_add_tail(&preg->list, &snd_minors_hash[SNDRV_MINOR_CARD(minor)]);
-	if (strncmp(name, "controlC", 8) || card->number >= cards_limit) {
+	if (strncmp(name, "controlC", 8) || card->number >= cards_limit)
 		devfs_mk_cdev(MKDEV(major, minor), S_IFCHR | device_mode, "snd/%s", name);
-		if (card)
-			device = card->dev;
-		class_simple_device_add(sound_class, MKDEV(major, minor), device, name);
-	}
+	if (card)
+		device = card->dev;
+	class_simple_device_add(sound_class, MKDEV(major, minor), device, name);
 
 	up(&sound_mutex);
 	return 0;
@@ -263,10 +262,9 @@
 		return -EINVAL;
 	}
 
-	if (strncmp(mptr->name, "controlC", 8) || card->number >= cards_limit) { /* created in sound.c */
+	if (strncmp(mptr->name, "controlC", 8) || card->number >= cards_limit) /* created in sound.c */
 		devfs_remove("snd/%s", mptr->name);
-		class_simple_device_remove(MKDEV(major, minor));
-	}
+	class_simple_device_remove(MKDEV(major, minor));
 
 	list_del(&mptr->list);
 	up(&sound_mutex);
@@ -357,10 +355,8 @@
 		return -ENOMEM;
 	}
 	snd_info_minor_register();
-	for (controlnum = 0; controlnum < cards_limit; controlnum++) {
+	for (controlnum = 0; controlnum < cards_limit; controlnum++)
 		devfs_mk_cdev(MKDEV(major, controlnum<<5), S_IFCHR | device_mode, "snd/controlC%d", controlnum);
-		class_simple_device_add(sound_class, MKDEV(major, controlnum<<5), NULL, "controlC%d", controlnum);
-	}
 #ifndef MODULE
 	printk(KERN_INFO "Advanced Linux Sound Architecture Driver Version " CONFIG_SND_VERSION CONFIG_SND_DATE ".\n");
 #endif
@@ -371,10 +367,8 @@
 {
 	short controlnum;
 
-	for (controlnum = 0; controlnum < cards_limit; controlnum++) {
+	for (controlnum = 0; controlnum < cards_limit; controlnum++)
 		devfs_remove("snd/controlC%d", controlnum);
-		class_simple_device_remove(MKDEV(major, controlnum<<5));
-	}
 
 	snd_info_minor_unregister();
 	snd_info_done();
@@ -411,7 +405,6 @@
 EXPORT_SYMBOL(copy_to_user_fromio);
 EXPORT_SYMBOL(copy_from_user_toio);
   /* init.c */
-EXPORT_SYMBOL(snd_cards_count);
 EXPORT_SYMBOL(snd_cards);
 #if defined(CONFIG_SND_MIXER_OSS) || defined(CONFIG_SND_MIXER_OSS_MODULE)
 EXPORT_SYMBOL(snd_mixer_oss_notify_callback);
@@ -447,8 +440,6 @@
   /* info.c */
 #ifdef CONFIG_PROC_FS
 EXPORT_SYMBOL(snd_seq_root);
-EXPORT_SYMBOL(snd_create_proc_entry);
-EXPORT_SYMBOL(snd_remove_proc_entry);
 EXPORT_SYMBOL(snd_iprintf);
 EXPORT_SYMBOL(snd_info_get_line);
 EXPORT_SYMBOL(snd_info_get_str);
@@ -476,6 +467,8 @@
 EXPORT_SYMBOL(snd_ctl_notify);
 EXPORT_SYMBOL(snd_ctl_register_ioctl);
 EXPORT_SYMBOL(snd_ctl_unregister_ioctl);
+EXPORT_SYMBOL(snd_ctl_elem_read);
+EXPORT_SYMBOL(snd_ctl_elem_write);
   /* misc.c */
 EXPORT_SYMBOL(snd_task_name);
 #ifdef CONFIG_SND_VERBOSE_PRINTK
diff -Nru a/sound/core/timer.c b/sound/core/timer.c
--- a/sound/core/timer.c	2005-01-10 20:11:20 -08:00
+++ b/sound/core/timer.c	2005-01-10 20:11:20 -08:00
@@ -351,8 +351,7 @@
 	}
 	if (timeri->private_free)
 		timeri->private_free(timeri);
-	if (timeri->owner)
-		kfree(timeri->owner);
+	kfree(timeri->owner);
 	kfree(timeri);
 	if (timer && timer->card)
 		module_put(timer->card->module);
@@ -1004,8 +1003,7 @@
 
 static void snd_timer_free_system(snd_timer_t *timer)
 {
-	if (timer->private_data)
-		kfree(timer->private_data);
+	kfree(timer->private_data);
 }
 
 static int snd_timer_register_system(void)
@@ -1226,10 +1224,8 @@
 		fasync_helper(-1, file, 0, &tu->fasync);
 		if (tu->timeri)
 			snd_timer_close(tu->timeri);
-		if (tu->queue)
-			kfree(tu->queue);
-		if (tu->tqueue)
-			kfree(tu->tqueue);
+		kfree(tu->queue);
+		kfree(tu->tqueue);
 		kfree(tu);
 	}
 	return 0;
diff -Nru a/sound/drivers/opl3/Makefile b/sound/drivers/opl3/Makefile
--- a/sound/drivers/opl3/Makefile	2005-01-10 20:11:15 -08:00
+++ b/sound/drivers/opl3/Makefile	2005-01-10 20:11:15 -08:00
@@ -18,4 +18,5 @@
 sequencer = $(if $(subst y,,$(CONFIG_SND_SEQUENCER)),$(if $(1),m),$(if $(CONFIG_SND_SEQUENCER),$(1)))
 
 obj-$(CONFIG_SND_OPL3_LIB) += snd-opl3-lib.o
+obj-$(CONFIG_SND_OPL4_LIB) += snd-opl3-lib.o
 obj-$(call sequencer,$(CONFIG_SND_OPL3_LIB)) += snd-opl3-synth.o
diff -Nru a/sound/drivers/opl3/opl3_drums.c b/sound/drivers/opl3/opl3_drums.c
--- a/sound/drivers/opl3/opl3_drums.c	2005-01-10 20:11:24 -08:00
+++ b/sound/drivers/opl3/opl3_drums.c	2005-01-10 20:11:24 -08:00
@@ -80,7 +80,7 @@
 /*
  * set drum voice characteristics
  */
-void snd_opl3_drum_voice_set(opl3_t *opl3, snd_opl3_drum_voice_t *data)
+static void snd_opl3_drum_voice_set(opl3_t *opl3, snd_opl3_drum_voice_t *data)
 {
 	unsigned char op_offset = snd_opl3_regmap[data->voice][data->op];
 	unsigned char voice_offset = data->voice;
@@ -114,7 +114,7 @@
 /*
  * Set drum voice pitch
  */
-void snd_opl3_drum_note_set(opl3_t *opl3, snd_opl3_drum_note_t *data)
+static void snd_opl3_drum_note_set(opl3_t *opl3, snd_opl3_drum_note_t *data)
 {
 	unsigned char voice_offset = data->voice;
 	unsigned short opl3_reg;
@@ -131,8 +131,8 @@
 /*
  * Set drum voice volume and position
  */
-void snd_opl3_drum_vol_set(opl3_t *opl3, snd_opl3_drum_voice_t *data, int vel,
-			   snd_midi_channel_t *chan)
+static void snd_opl3_drum_vol_set(opl3_t *opl3, snd_opl3_drum_voice_t *data,
+				  int vel, snd_midi_channel_t *chan)
 {
 	unsigned char op_offset = snd_opl3_regmap[data->voice][data->op];
 	unsigned char voice_offset = data->voice;
diff -Nru a/sound/drivers/opl3/opl3_lib.c b/sound/drivers/opl3/opl3_lib.c
--- a/sound/drivers/opl3/opl3_lib.c	2005-01-10 20:11:17 -08:00
+++ b/sound/drivers/opl3/opl3_lib.c	2005-01-10 20:11:17 -08:00
@@ -37,7 +37,7 @@
 
 extern char snd_opl3_regmap[MAX_OPL2_VOICES][4];
 
-void snd_opl2_command(opl3_t * opl3, unsigned short cmd, unsigned char val)
+static void snd_opl2_command(opl3_t * opl3, unsigned short cmd, unsigned char val)
 {
 	unsigned long flags;
 	unsigned long port;
@@ -60,7 +60,7 @@
 	spin_unlock_irqrestore(&opl3->reg_lock, flags);
 }
 
-void snd_opl3_command(opl3_t * opl3, unsigned short cmd, unsigned char val)
+static void snd_opl3_command(opl3_t * opl3, unsigned short cmd, unsigned char val)
 {
 	unsigned long flags;
 	unsigned long port;
@@ -364,7 +364,7 @@
 	spin_lock_init(&opl3->timer_lock);
 	init_MUTEX(&opl3->access_mutex);
 
-	if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, opl3, &ops)) < 0) {
+	if ((err = snd_device_new(card, SNDRV_DEV_CODEC, opl3, &ops)) < 0) {
 		snd_opl3_free(opl3);
 		return err;
 	}
diff -Nru a/sound/drivers/opl3/opl3_midi.c b/sound/drivers/opl3/opl3_midi.c
--- a/sound/drivers/opl3/opl3_midi.c	2005-01-10 20:11:19 -08:00
+++ b/sound/drivers/opl3/opl3_midi.c	2005-01-10 20:11:19 -08:00
@@ -263,7 +263,7 @@
 /*
  * Start system timer
  */
-void snd_opl3_start_timer(opl3_t *opl3)
+static void snd_opl3_start_timer(opl3_t *opl3)
 {
 	unsigned long flags;
 	spin_lock_irqsave(&opl3->sys_timer_lock, flags);
diff -Nru a/sound/drivers/opl3/opl3_seq.c b/sound/drivers/opl3/opl3_seq.c
--- a/sound/drivers/opl3/opl3_seq.c	2005-01-10 20:11:20 -08:00
+++ b/sound/drivers/opl3/opl3_seq.c	2005-01-10 20:11:20 -08:00
@@ -96,7 +96,7 @@
 	up(&opl3->access_mutex);
 }
 
-int snd_opl3_synth_use(void *private_data, snd_seq_port_subscribe_t * info)
+static int snd_opl3_synth_use(void *private_data, snd_seq_port_subscribe_t * info)
 {
 	opl3_t *opl3 = private_data;
 	int err;
@@ -123,7 +123,7 @@
 	return 0;
 }
 
-int snd_opl3_synth_unuse(void *private_data, snd_seq_port_subscribe_t * info)
+static int snd_opl3_synth_unuse(void *private_data, snd_seq_port_subscribe_t * info)
 {
 	opl3_t *opl3 = private_data;
 
diff -Nru a/sound/drivers/opl4/opl4_lib.c b/sound/drivers/opl4/opl4_lib.c
--- a/sound/drivers/opl4/opl4_lib.c	2005-01-10 20:11:22 -08:00
+++ b/sound/drivers/opl4/opl4_lib.c	2005-01-10 20:11:22 -08:00
@@ -229,21 +229,20 @@
 		return err;
 	}
 
-	err = snd_opl3_create(card, fm_port, fm_port + 2, opl4->hardware, 1, &opl3);
+	err = snd_device_new(card, SNDRV_DEV_CODEC, opl4, &ops);
 	if (err < 0) {
 		snd_opl4_free(opl4);
 		return err;
 	}
 
-	/* opl3 initialization disabled opl4, so reenable */
-	snd_opl4_enable_opl4(opl4);
-
-	err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, opl4, &ops);
+	err = snd_opl3_create(card, fm_port, fm_port + 2, opl4->hardware, 1, &opl3);
 	if (err < 0) {
-		snd_device_free(card, opl3);
-		snd_opl4_free(opl4);
+		snd_device_free(card, opl4);
 		return err;
 	}
+
+	/* opl3 initialization disabled opl4, so reenable */
+	snd_opl4_enable_opl4(opl4);
 
 	snd_opl4_create_mixer(opl4);
 #ifdef CONFIG_PROC_FS
diff -Nru a/sound/drivers/vx/vx_cmd.c b/sound/drivers/vx/vx_cmd.c
--- a/sound/drivers/vx/vx_cmd.c	2005-01-10 20:11:21 -08:00
+++ b/sound/drivers/vx/vx_cmd.c	2005-01-10 20:11:21 -08:00
@@ -29,7 +29,7 @@
 /*
  * Array of DSP commands
  */
-struct vx_cmd_info vx_dsp_cmds[] = {
+static struct vx_cmd_info vx_dsp_cmds[] = {
 [CMD_VERSION] =			{ 0x010000, 2, RMH_SSIZE_FIXED, 1 },
 [CMD_SUPPORTED] =		{ 0x020000, 1, RMH_SSIZE_FIXED, 2 },
 [CMD_TEST_IT] =			{ 0x040000, 1, RMH_SSIZE_FIXED, 1 },
diff -Nru a/sound/drivers/vx/vx_cmd.h b/sound/drivers/vx/vx_cmd.h
--- a/sound/drivers/vx/vx_cmd.h	2005-01-10 20:11:18 -08:00
+++ b/sound/drivers/vx/vx_cmd.h	2005-01-10 20:11:18 -08:00
@@ -209,8 +209,6 @@
 /*
  *
  */
-extern struct vx_cmd_info vx_dsp_cmds[];
-
 void vx_init_rmh(struct vx_rmh *rmh, unsigned int cmd);
 
 /**
diff -Nru a/sound/drivers/vx/vx_core.c b/sound/drivers/vx/vx_core.c
--- a/sound/drivers/vx/vx_core.c	2005-01-10 20:11:22 -08:00
+++ b/sound/drivers/vx/vx_core.c	2005-01-10 20:11:22 -08:00
@@ -25,6 +25,7 @@
 #include <linux/slab.h>
 #include <linux/interrupt.h>
 #include <linux/init.h>
+#include <linux/firmware.h>
 #include <sound/core.h>
 #include <sound/pcm.h>
 #include <sound/asoundef.h>
@@ -430,20 +431,19 @@
  * snd_vx_boot_xilinx - boot up the xilinx interface
  * @boot: the boot record to load
  */
-int snd_vx_load_boot_image(vx_core_t *chip, const snd_hwdep_dsp_image_t *boot)
+int snd_vx_load_boot_image(vx_core_t *chip, const struct firmware *boot)
 {
 	unsigned int i;
 	int no_fillup = vx_has_new_dsp(chip);
 
 	/* check the length of boot image */
-	snd_assert(boot->length > 0, return -EINVAL);
-	snd_assert(boot->length % 3 == 0, return -EINVAL);
-	snd_assert(boot->image, return -EINVAL);
+	snd_assert(boot->size > 0, return -EINVAL);
+	snd_assert(boot->size % 3 == 0, return -EINVAL);
 #if 0
 	{
 		/* more strict check */
-		unsigned int c = ((u32)boot->image[0] << 16) | ((u32)boot->image[1] << 8) | boot->image[2];
-		snd_assert(boot->length == (c + 2) * 3, return -EINVAL);
+		unsigned int c = ((u32)boot->data[0] << 16) | ((u32)boot->data[1] << 8) | boot->data[2];
+		snd_assert(boot->size == (c + 2) * 3, return -EINVAL);
 	}
 #endif
 
@@ -454,7 +454,7 @@
 
 	/* download boot strap */
 	for (i = 0; i < 0x600; i += 3) {
-		if (i >= boot->length) {
+		if (i >= boot->size) {
 			if (no_fillup)
 				break;
 			if (vx_wait_isr_bit(chip, ISR_TX_EMPTY) < 0) {
@@ -465,9 +465,7 @@
 			vx_outb(chip, TXM, 0);
 			vx_outb(chip, TXL, 0);
 		} else {
-			unsigned char image[3];
-			if (copy_from_user(image, boot->image + i, 3))
-				return -EFAULT;
+			unsigned char *image = boot->data + i;
 			if (vx_wait_isr_bit(chip, ISR_TX_EMPTY) < 0) {
 				snd_printk(KERN_ERR "dsp boot failed at %d\n", i);
 				return -EIO;
@@ -653,7 +651,7 @@
 /**
  * snd_vx_dsp_boot - load the DSP boot
  */
-int snd_vx_dsp_boot(vx_core_t *chip, const snd_hwdep_dsp_image_t *boot)
+int snd_vx_dsp_boot(vx_core_t *chip, const struct firmware *boot)
 {
 	int err;
 	int cold_reset = !(chip->chip_status & VX_STAT_DEVICE_INIT);
@@ -671,21 +669,20 @@
 /**
  * snd_vx_dsp_load - load the DSP image
  */
-int snd_vx_dsp_load(vx_core_t *chip, const snd_hwdep_dsp_image_t *dsp)
+int snd_vx_dsp_load(vx_core_t *chip, const struct firmware *dsp)
 {
 	unsigned int i;
 	int err;
 	unsigned int csum = 0;
-	unsigned char image[3], *cptr;
+	unsigned char *image, *cptr;
 
-	snd_assert(dsp->length % 3 == 0, return -EINVAL);
+	snd_assert(dsp->size % 3 == 0, return -EINVAL);
 
 	vx_toggle_dac_mute(chip, 1);
 
 	/* Transfert data buffer from PC to DSP */
-	for (i = 0; i < dsp->length; i += 3) {
-		if (copy_from_user(image, dsp->image + i, 3))
-			return -EFAULT;
+	for (i = 0; i < dsp->size; i += 3) {
+		image = dsp->data + i;
 		/* Wait DSP ready for a new read */
 		if ((err = vx_wait_isr_bit(chip, ISR_TX_EMPTY)) < 0) {
 			printk("dsp loading error at position %d\n", i);
@@ -717,6 +714,54 @@
 	return 0;
 }
 
+#ifdef CONFIG_PM
+/*
+ * suspend
+ */
+static int snd_vx_suspend(snd_card_t *card, unsigned int state)
+{
+	vx_core_t *chip = card->pm_private_data;
+	unsigned int i;
+
+	snd_assert(chip, return -EINVAL);
+
+	chip->chip_status |= VX_STAT_IN_SUSPEND;
+	for (i = 0; i < chip->hw->num_codecs; i++)
+		snd_pcm_suspend_all(chip->pcm[i]);
+
+	return 0;
+}
+
+/*
+ * resume
+ */
+static int snd_vx_resume(snd_card_t *card, unsigned int state)
+{
+	vx_core_t *chip = card->pm_private_data;
+	int i, err;
+
+	snd_assert(chip, return -EINVAL);
+
+	chip->chip_status &= ~VX_STAT_CHIP_INIT;
+
+	for (i = 0; i < 4; i++) {
+		if (! chip->firmware[i])
+			continue;
+		err = chip->ops->load_dsp(chip, i, chip->firmware[i]);
+		if (err < 0) {
+			snd_printk(KERN_ERR "vx: firmware resume error at DSP %d\n", i);
+			return -EIO;
+		}
+	}
+
+	chip->chip_status |= VX_STAT_CHIP_INIT;
+	chip->chip_status &= ~VX_STAT_IN_SUSPEND;
+
+	return 0;
+}
+
+#endif
+
 /**
  * snd_vx_create - constructor for vx_core_t
  * @hw: hardware specific record
@@ -734,7 +779,7 @@
 
 	snd_assert(card && hw && ops, return NULL);
 
-	chip = kcalloc(1, sizeof(chip) + extra_size, GFP_KERNEL);
+	chip = kcalloc(1, sizeof(*chip) + extra_size, GFP_KERNEL);
 	if (! chip) {
 		snd_printk(KERN_ERR "vx_core: no memory\n");
 		return NULL;
@@ -753,37 +798,13 @@
 	strcpy(card->driver, hw->name);
 	sprintf(card->shortname, "Digigram %s", hw->name);
 
+	snd_card_set_pm_callback(card, snd_vx_suspend, snd_vx_resume, chip);
+
 	vx_proc_init(chip);
 
 	return chip;
 }
 
-#ifdef CONFIG_PM
-/*
- * suspend
- */
-void snd_vx_suspend(vx_core_t *chip)
-{
-	unsigned int i;
-
-	chip->chip_status |= VX_STAT_IN_SUSPEND;
-	for (i = 0; i < chip->hw->num_codecs; i++)
-		snd_pcm_suspend_all(chip->pcm[i]);
-	if (chip->hwdep)
-		chip->hwdep->dsp_loaded = 0;
-}
-
-/*
- * resume
- */
-void snd_vx_resume(vx_core_t *chip)
-{
-	/* clear all stuff... */
-	chip->chip_status &= ~(VX_STAT_IN_SUSPEND|VX_STAT_CHIP_INIT);
-}
-
-#endif
-
 /*
  * module entries
  */
@@ -804,13 +825,10 @@
  */
 EXPORT_SYMBOL(snd_vx_check_reg_bit);
 EXPORT_SYMBOL(snd_vx_create);
-EXPORT_SYMBOL(snd_vx_hwdep_new);
+EXPORT_SYMBOL(snd_vx_setup_firmware);
+EXPORT_SYMBOL(snd_vx_free_firmware);
 EXPORT_SYMBOL(snd_vx_irq_handler);
 EXPORT_SYMBOL(snd_vx_delay);
 EXPORT_SYMBOL(snd_vx_dsp_boot);
 EXPORT_SYMBOL(snd_vx_dsp_load);
 EXPORT_SYMBOL(snd_vx_load_boot_image);
-#ifdef CONFIG_PM
-EXPORT_SYMBOL(snd_vx_suspend);
-EXPORT_SYMBOL(snd_vx_resume);
-#endif
diff -Nru a/sound/drivers/vx/vx_hwdep.c b/sound/drivers/vx/vx_hwdep.c
--- a/sound/drivers/vx/vx_hwdep.c	2005-01-10 20:11:18 -08:00
+++ b/sound/drivers/vx/vx_hwdep.c	2005-01-10 20:11:18 -08:00
@@ -1,7 +1,7 @@
 /*
  * Driver for Digigram VX soundcards
  *
- * hwdep device manager
+ * DSP firmware management
  *
  * Copyright (c) 2002 by Takashi Iwai <tiwai@suse.de>
  *
@@ -21,10 +21,89 @@
  */
 
 #include <sound/driver.h>
+#include <linux/firmware.h>
 #include <sound/core.h>
 #include <sound/hwdep.h>
 #include <sound/vx_core.h>
 
+#ifdef SND_VX_FW_LOADER
+
+int snd_vx_setup_firmware(vx_core_t *chip)
+{
+	static char *fw_files[VX_TYPE_NUMS][4] = {
+		[VX_TYPE_BOARD] = {
+			NULL, "x1_1_vx2.xlx", "bd56002.boot", "l_1_vx2.d56",
+		},
+		[VX_TYPE_V2] = {
+			NULL, "x1_2_v22.xlx", "bd563v2.boot", "l_1_v22.d56",
+		},
+		[VX_TYPE_MIC] = {
+			NULL, "x1_2_v22.xlx", "bd563v2.boot", "l_1_v22.d56",
+		},
+		[VX_TYPE_VXPOCKET] = {
+			"bx_1_vxp.b56", "x1_1_vxp.xlx", "bd563s3.boot", "l_1_vxp.d56"
+		},
+		[VX_TYPE_VXP440] = {
+			"bx_1_vp4.b56", "x1_1_vp4.xlx", "bd563s3.boot", "l_1_vp4.d56"
+		},
+	};
+
+	int i, err;
+
+	for (i = 0; i < 4; i++) {
+		char path[32];
+		const struct firmware *fw;
+		if (! fw_files[chip->type][i])
+			continue;
+		sprintf(path, "vx/%s", fw_files[chip->type][i]);
+		if (request_firmware(&fw, path, chip->dev)) {
+			snd_printk(KERN_ERR "vx: can't load firmware %s\n", path);
+			return -ENOENT;
+		}
+		err = chip->ops->load_dsp(chip, i, fw);
+		if (err < 0) {
+			release_firmware(fw);
+			return err;
+		}
+		if (i == 1)
+			chip->chip_status |= VX_STAT_XILINX_LOADED;
+#ifdef CONFIG_PM
+		chip->firmware[i] = fw;
+#else
+		release_firmware(fw);
+#endif
+	}
+
+	/* ok, we reached to the last one */
+	/* create the devices if not built yet */
+	if ((err = snd_vx_pcm_new(chip)) < 0)
+		return err;
+
+	if ((err = snd_vx_mixer_new(chip)) < 0)
+		return err;
+
+	if (chip->ops->add_controls)
+		if ((err = chip->ops->add_controls(chip)) < 0)
+			return err;
+
+	chip->chip_status |= VX_STAT_DEVICE_INIT;
+	chip->chip_status |= VX_STAT_CHIP_INIT;
+
+	return snd_card_register(chip->card);
+}
+
+/* exported */
+void snd_vx_free_firmware(vx_core_t *chip)
+{
+#ifdef CONFIG_PM
+	int i;
+	for (i = 0; i < 4; i++)
+		release_firmware(chip->firmware[i]);
+#endif
+}
+
+#else /* old style firmware loading */
+
 static int vx_hwdep_open(snd_hwdep_t *hw, struct file *file)
 {
 	return 0;
@@ -58,19 +137,54 @@
 	return 0;
 }
 
+static void free_fw(const struct firmware *fw)
+{
+	if (fw) {
+		vfree(fw->data);
+		kfree(fw);
+	}
+}
+
 static int vx_hwdep_dsp_load(snd_hwdep_t *hw, snd_hwdep_dsp_image_t *dsp)
 {
 	vx_core_t *vx = hw->private_data;
 	int index, err;
+	struct firmware *fw;
 
 	snd_assert(vx->ops->load_dsp, return -ENXIO);
-	err = vx->ops->load_dsp(vx, dsp);
-	if (err < 0)
-		return err;
+
+	fw = kmalloc(sizeof(*fw), GFP_KERNEL);
+	if (! fw) {
+		snd_printk(KERN_ERR "cannot allocate firmware\n");
+		return -ENOMEM;
+	}
+	fw->size = dsp->length;
+	fw->data = vmalloc(fw->size);
+	if (! fw->data) {
+		snd_printk(KERN_ERR "cannot allocate firmware image (length=%d)\n",
+			   (int)fw->size);
+		kfree(fw);
+		return -ENOMEM;
+	}
+	if (copy_from_user(fw->data, dsp->image, dsp->length)) {
+		free_fw(fw);
+		return -EFAULT;
+	}
 
 	index = dsp->index;
 	if (! vx_is_pcmcia(vx))
 		index++;
+	err = vx->ops->load_dsp(vx, index, fw);
+	if (err < 0) {
+		free_fw(fw);
+		return err;
+	}
+#ifdef CONFIG_PM
+	vx->firmware[index] = fw;
+#else
+	free_fw(fw);
+#endif
+
 	if (index == 1)
 		vx->chip_status |= VX_STAT_XILINX_LOADED;
 	if (index < 3)
@@ -100,7 +214,7 @@
 
 
 /* exported */
-int snd_vx_hwdep_new(vx_core_t *chip)
+int snd_vx_setup_firmware(vx_core_t *chip)
 {
 	int err;
 	snd_hwdep_t *hw;
@@ -118,5 +232,17 @@
 	sprintf(hw->name, "VX Loader (%s)", chip->card->driver);
 	chip->hwdep = hw;
 
-	return 0;
+	return snd_card_register(chip->card);
 }
+
+/* exported */
+void snd_vx_free_firmware(vx_core_t *chip)
+{
+#ifdef CONFIG_PM
+	int i;
+	for (i = 0; i < 4; i++)
+		free_fw(chip->firmware[i]);
+#endif
+}
+
+#endif /* SND_VX_FW_LOADER */
diff -Nru a/sound/drivers/vx/vx_pcm.c b/sound/drivers/vx/vx_pcm.c
--- a/sound/drivers/vx/vx_pcm.c	2005-01-10 20:11:16 -08:00
+++ b/sound/drivers/vx/vx_pcm.c	2005-01-10 20:11:16 -08:00
@@ -549,7 +549,8 @@
 
 static snd_pcm_hardware_t vx_pcm_playback_hw = {
 	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
-				 SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_MMAP_VALID),
+				 SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_MMAP_VALID |
+				 SNDRV_PCM_INFO_RESUME),
 	.formats =		/*SNDRV_PCM_FMTBIT_U8 |*/ SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_3LE,
 	.rates =		SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000,
 	.rate_min =		5000,
@@ -802,6 +803,7 @@
 		
 	switch (cmd) {
 	case SNDRV_PCM_TRIGGER_START:
+	case SNDRV_PCM_TRIGGER_RESUME:
 		if (! pipe->is_capture)
 			vx_pcm_playback_transfer(chip, subs, pipe, 2);
 		/* FIXME:
@@ -813,6 +815,7 @@
 		pipe->running = 1;
 		break;
 	case SNDRV_PCM_TRIGGER_STOP:
+	case SNDRV_PCM_TRIGGER_SUSPEND:
 		vx_toggle_pipe(chip, pipe, 0);
 		vx_stop_pipe(chip, pipe);
 		vx_stop_stream(chip, pipe);
@@ -946,7 +949,8 @@
 
 static snd_pcm_hardware_t vx_pcm_capture_hw = {
 	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
-				 SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_MMAP_VALID),
+				 SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_MMAP_VALID |
+				 SNDRV_PCM_INFO_RESUME),
 	.formats =		/*SNDRV_PCM_FMTBIT_U8 |*/ SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_3LE,
 	.rates =		SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000,
 	.rate_min =		5000,
diff -Nru a/sound/drivers/vx/vx_uer.c b/sound/drivers/vx/vx_uer.c
--- a/sound/drivers/vx/vx_uer.c	2005-01-10 20:11:17 -08:00
+++ b/sound/drivers/vx/vx_uer.c	2005-01-10 20:11:17 -08:00
@@ -197,7 +197,7 @@
  * vx_change_clock_source - change the clock source
  * @source: the new source
  */
-void vx_change_clock_source(vx_core_t *chip, int source)
+static void vx_change_clock_source(vx_core_t *chip, int source)
 {
 	unsigned long flags;
 
diff -Nru a/sound/i2c/cs8427.c b/sound/i2c/cs8427.c
--- a/sound/i2c/cs8427.c	2005-01-10 20:11:15 -08:00
+++ b/sound/i2c/cs8427.c	2005-01-10 20:11:15 -08:00
@@ -30,6 +30,8 @@
 #include <sound/cs8427.h>
 #include <sound/asoundef.h>
 
+static void snd_cs8427_reset(snd_i2c_device_t *cs8427);
+
 MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>");
 MODULE_DESCRIPTION("IEC958 (S/PDIF) receiver & transmitter by Cirrus Logic");
 MODULE_LICENSE("GPL");
@@ -65,16 +67,6 @@
 	return res;
 }
 
-int snd_cs8427_detect(snd_i2c_bus_t *bus, unsigned char addr)
-{
-	int res;
-
-	snd_i2c_lock(bus);
-	res = snd_i2c_probeaddr(bus, CS8427_ADDR | (addr & 7));
-	snd_i2c_unlock(bus);
-	return res;
-}
-
 int snd_cs8427_reg_write(snd_i2c_device_t *device, unsigned char reg, unsigned char val)
 {
 	int err;
@@ -89,7 +81,7 @@
 	return 0;
 }
 
-int snd_cs8427_reg_read(snd_i2c_device_t *device, unsigned char reg)
+static int snd_cs8427_reg_read(snd_i2c_device_t *device, unsigned char reg)
 {
 	int err;
 	unsigned char buf;
@@ -156,8 +148,7 @@
 
 static void snd_cs8427_free(snd_i2c_device_t *device)
 {
-	if (device->private_data)
-		kfree(device->private_data);
+	kfree(device->private_data);
 }
 
 int snd_cs8427_create(snd_i2c_bus_t *bus,
@@ -288,7 +279,7 @@
  * put back AES3INPUT. This workaround is described in latest
  * CS8427 datasheet, otherwise TXDSERIAL will not work.
  */
-void snd_cs8427_reset(snd_i2c_device_t *cs8427)
+static void snd_cs8427_reset(snd_i2c_device_t *cs8427)
 {
 	cs8427_t *chip;
 	unsigned long end_time;
@@ -573,11 +564,9 @@
 module_init(alsa_cs8427_module_init)
 module_exit(alsa_cs8427_module_exit)
 
-EXPORT_SYMBOL(snd_cs8427_detect);
 EXPORT_SYMBOL(snd_cs8427_create);
 EXPORT_SYMBOL(snd_cs8427_reset);
 EXPORT_SYMBOL(snd_cs8427_reg_write);
-EXPORT_SYMBOL(snd_cs8427_reg_read);
 EXPORT_SYMBOL(snd_cs8427_iec958_build);
 EXPORT_SYMBOL(snd_cs8427_iec958_active);
 EXPORT_SYMBOL(snd_cs8427_iec958_pcm);
diff -Nru a/sound/i2c/i2c.c b/sound/i2c/i2c.c
--- a/sound/i2c/i2c.c	2005-01-10 20:11:18 -08:00
+++ b/sound/i2c/i2c.c	2005-01-10 20:11:18 -08:00
@@ -94,7 +94,7 @@
 		bus->master = master;
 	}
 	strlcpy(bus->name, name, sizeof(bus->name));
-	if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, bus, &ops)) < 0) {
+	if ((err = snd_device_new(card, SNDRV_DEV_BUS, bus, &ops)) < 0) {
 		snd_i2c_bus_free(bus);
 		return err;
 	}
diff -Nru a/sound/i2c/l3/uda1341.c b/sound/i2c/l3/uda1341.c
--- a/sound/i2c/l3/uda1341.c	2005-01-10 20:11:19 -08:00
+++ b/sound/i2c/l3/uda1341.c	2005-01-10 20:11:19 -08:00
@@ -17,7 +17,7 @@
  * 2002-05-12   Tomas Kasparek  another code cleanup
  */
 
-/* $Id: uda1341.c,v 1.13 2004/07/20 15:54:13 cladisch Exp $ */
+/* $Id: uda1341.c,v 1.15 2005/01/03 12:05:20 tiwai Exp $ */
 
 #include <sound/driver.h>
 #include <linux/module.h>
@@ -679,7 +679,7 @@
 		return err;
 	}
 
-	if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, uda1341, &ops)) < 0) {
+	if ((err = snd_device_new(card, SNDRV_DEV_CODEC, uda1341, &ops)) < 0) {
 		l3_detach_client(uda1341);
 		kfree(uda1341);
 		return err;
@@ -730,8 +730,7 @@
 
 static void uda1341_detach(struct l3_client *clnt)
 {
-	if (clnt->driver_data)
-		kfree(clnt->driver_data);
+	kfree(clnt->driver_data);
 }
 
 static int
diff -Nru a/sound/i2c/other/ak4117.c b/sound/i2c/other/ak4117.c
--- a/sound/i2c/other/ak4117.c	2005-01-10 20:11:19 -08:00
+++ b/sound/i2c/other/ak4117.c	2005-01-10 20:11:19 -08:00
@@ -103,7 +103,7 @@
 	chip->rcs1 = reg_read(chip, AK4117_REG_RCS1);
 	chip->rcs2 = reg_read(chip, AK4117_REG_RCS2);
 
-	if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0)
+	if ((err = snd_device_new(card, SNDRV_DEV_CODEC, chip, &ops)) < 0)
 		goto __fail;
 
 	if (r_ak4117)
diff -Nru a/sound/isa/ad1816a/ad1816a_lib.c b/sound/isa/ad1816a/ad1816a_lib.c
--- a/sound/isa/ad1816a/ad1816a_lib.c	2005-01-10 20:11:20 -08:00
+++ b/sound/isa/ad1816a/ad1816a_lib.c	2005-01-10 20:11:20 -08:00
@@ -46,20 +46,20 @@
 	return -EBUSY;
 }
 
-inline unsigned char snd_ad1816a_in(ad1816a_t *chip, unsigned char reg)
+static inline unsigned char snd_ad1816a_in(ad1816a_t *chip, unsigned char reg)
 {
 	snd_ad1816a_busy_wait(chip);
 	return inb(AD1816A_REG(reg));
 }
 
-inline void snd_ad1816a_out(ad1816a_t *chip, unsigned char reg,
+static inline void snd_ad1816a_out(ad1816a_t *chip, unsigned char reg,
 			    unsigned char value)
 {
 	snd_ad1816a_busy_wait(chip);
 	outb(value, AD1816A_REG(reg));
 }
 
-inline void snd_ad1816a_out_mask(ad1816a_t *chip, unsigned char reg,
+static inline void snd_ad1816a_out_mask(ad1816a_t *chip, unsigned char reg,
 				 unsigned char mask, unsigned char value)
 {
 	snd_ad1816a_out(chip, reg,
@@ -372,6 +372,7 @@
 	.fifo_size =		0,
 };
 
+#if 0 /* not used now */
 static int snd_ad1816a_timer_close(snd_timer_t *timer)
 {
 	ad1816a_t *chip = snd_timer_chip(timer);
@@ -435,6 +436,7 @@
 	.start =	snd_ad1816a_timer_start,
 	.stop =		snd_ad1816a_timer_stop,
 };
+#endif /* not used now */
 
 
 static int snd_ad1816a_playback_open(snd_pcm_substream_t *substream)
@@ -692,6 +694,7 @@
 	return 0;
 }
 
+#if 0 /* not used now */
 static void snd_ad1816a_timer_free(snd_timer_t *timer)
 {
 	ad1816a_t *chip = timer->private_data;
@@ -720,6 +723,7 @@
 		*rtimer = timer;
 	return 0;
 }
+#endif /* not used now */
 
 /*
  *
diff -Nru a/sound/isa/ad1848/ad1848_lib.c b/sound/isa/ad1848/ad1848_lib.c
--- a/sound/isa/ad1848/ad1848_lib.c	2005-01-10 20:11:22 -08:00
+++ b/sound/isa/ad1848/ad1848_lib.c	2005-01-10 20:11:22 -08:00
@@ -119,9 +119,8 @@
 #endif
 }
 
-void snd_ad1848_dout(ad1848_t *chip,
-		     unsigned char reg,
-		     unsigned char value)
+static void snd_ad1848_dout(ad1848_t *chip,
+			    unsigned char reg, unsigned char value)
 {
 	int timeout;
 
@@ -132,7 +131,7 @@
 	mb();
 }
 
-unsigned char snd_ad1848_in(ad1848_t *chip, unsigned char reg)
+static unsigned char snd_ad1848_in(ad1848_t *chip, unsigned char reg)
 {
 	int timeout;
 
@@ -147,9 +146,9 @@
 	return inb(AD1848P(chip, REG));
 }
 
-#ifdef CONFIG_SND_DEBUG
+#if 0
 
-void snd_ad1848_debug(ad1848_t *chip)
+static void snd_ad1848_debug(ad1848_t *chip)
 {
 	printk("AD1848 REGS:      INDEX = 0x%02x  ", inb(AD1848P(chip, REGSEL)));
 	printk("                 STATUS = 0x%02x\n", inb(AD1848P(chip, STATUS)));
@@ -177,7 +176,7 @@
  *  AD1848 detection / MCE routines
  */
 
-void snd_ad1848_mce_up(ad1848_t *chip)
+static void snd_ad1848_mce_up(ad1848_t *chip)
 {
 	unsigned long flags;
 	int timeout;
@@ -198,7 +197,7 @@
 	spin_unlock_irqrestore(&chip->reg_lock, flags);
 }
 
-void snd_ad1848_mce_down(ad1848_t *chip)
+static void snd_ad1848_mce_down(ad1848_t *chip)
 {
 	unsigned long flags;
 	int timeout;
@@ -584,7 +583,7 @@
 	return 0;
 }
 
-irqreturn_t snd_ad1848_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t snd_ad1848_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
 	ad1848_t *chip = dev_id;
 
@@ -649,16 +648,12 @@
 {
 	ad1848_t *chip = card->pm_private_data;
 
-	if (card->power_state == SNDRV_CTL_POWER_D3hot)
-		return 0;
-
 	snd_pcm_suspend_all(chip->pcm);
 	/* FIXME: save registers? */
 
 	if (chip->thinkpad_flag)
 		snd_ad1848_thinkpad_twiddle(chip, 0);
 
-	snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
 	return 0;
 }
 
@@ -666,15 +661,11 @@
 {
 	ad1848_t *chip = card->pm_private_data;
 
-	if (card->power_state == SNDRV_CTL_POWER_D0)
-		return 0;
-
 	if (chip->thinkpad_flag)
 		snd_ad1848_thinkpad_twiddle(chip, 1);
 
 	/* FIXME: restore registers? */
 
-	snd_power_change_state(card, SNDRV_CTL_POWER_D0);
 	return 0;
 }
 #endif /* CONFIG_PM */
@@ -1264,12 +1255,7 @@
 	return 0;
 }
 
-EXPORT_SYMBOL(snd_ad1848_in);
 EXPORT_SYMBOL(snd_ad1848_out);
-EXPORT_SYMBOL(snd_ad1848_dout);
-EXPORT_SYMBOL(snd_ad1848_mce_up);
-EXPORT_SYMBOL(snd_ad1848_mce_down);
-EXPORT_SYMBOL(snd_ad1848_interrupt);
 EXPORT_SYMBOL(snd_ad1848_create);
 EXPORT_SYMBOL(snd_ad1848_pcm);
 EXPORT_SYMBOL(snd_ad1848_get_pcm_ops);
diff -Nru a/sound/isa/als100.c b/sound/isa/als100.c
--- a/sound/isa/als100.c	2005-01-10 20:11:16 -08:00
+++ b/sound/isa/als100.c	2005-01-10 20:11:16 -08:00
@@ -94,6 +94,8 @@
 	{ .id = "ALS0120", .devs = { { "@@@2001" }, { "@X@2001" }, { "@H@2001" } } },
 	/* ALS200 */
 	{ .id = "ALS0200", .devs = { { "@@@0020" }, { "@X@0020" }, { "@H@0001" } } },
+	/* ALS200 OEM */
+	{ .id = "ALS0200", .devs = { { "@@@0020" }, { "@X@0020" }, { "@H@0020" } } },
 	/* RTL3000 */
 	{ .id = "RTL3000", .devs = { { "@@@2001" }, { "@X@2001" }, { "@H@2001" } } },
 	{ .id = "", } /* end */
diff -Nru a/sound/isa/cs423x/cs4231_lib.c b/sound/isa/cs423x/cs4231_lib.c
--- a/sound/isa/cs423x/cs4231_lib.c	2005-01-10 20:11:17 -08:00
+++ b/sound/isa/cs423x/cs4231_lib.c	2005-01-10 20:11:17 -08:00
@@ -166,8 +166,8 @@
 #endif
 }
 
-void snd_cs4231_outm(cs4231_t *chip, unsigned char reg,
-		     unsigned char mask, unsigned char value)
+static void snd_cs4231_outm(cs4231_t *chip, unsigned char reg,
+			    unsigned char mask, unsigned char value)
 {
 	int timeout;
 	unsigned char tmp;
@@ -271,9 +271,9 @@
 #endif
 }
 
-#ifdef CONFIG_SND_DEBUG
+#if 0
 
-void snd_cs4231_debug(cs4231_t *chip)
+static void snd_cs4231_debug(cs4231_t *chip)
 {
 	printk("CS4231 REGS:      INDEX = 0x%02x  ", cs4231_inb(chip, CS4231P(REGSEL)));
 	printk("                 STATUS = 0x%02x\n", cs4231_inb(chip, CS4231P(STATUS)));
@@ -356,7 +356,6 @@
 {
 	unsigned long flags;
 	int timeout;
-	signed long time;
 
 	snd_cs4231_busy_wait(chip);
 #if 0
@@ -390,34 +389,26 @@
 #if 0
 	printk("(2) timeout = %i, jiffies = %li\n", timeout, jiffies);
 #endif
-	timeout = HZ / 4 / 2;
-	time = 2;
+	/* in 10 ms increments, check condition, up to 250 ms */
+	timeout = 25;
 	while (snd_cs4231_in(chip, CS4231_TEST_INIT) & CS4231_CALIB_IN_PROGRESS) {
-		set_current_state(TASK_INTERRUPTIBLE);
-		time = schedule_timeout(time);
-		if (time > 0)
-			continue;
-		time = 2;
 		if (--timeout < 0) {
 			snd_printk("mce_down - auto calibration time out (2)\n");
 			return;
 		}
+		msleep(10);
 	}
 #if 0
 	printk("(3) jiffies = %li\n", jiffies);
 #endif
-	timeout = HZ / 10 / 2;
-	time = 2;
+	/* in 10 ms increments, check condition, up to 100 ms */
+	timeout = 10;
 	while (cs4231_inb(chip, CS4231P(REGSEL)) & CS4231_INIT) {
-		set_current_state(TASK_INTERRUPTIBLE);		
-		time = schedule_timeout(time);
-		if (time > 0)
-			continue;
-		time = 2;
 		if (--timeout < 0) {
 			snd_printk(KERN_ERR "mce_down - auto calibration time out (3)\n");
 			return;
 		}
+		msleep(10);
 	}
 #if 0
 	printk("(4) jiffies = %li\n", jiffies);
@@ -694,7 +685,7 @@
 
 	snd_cs4231_mce_down(chip);
 
-#ifdef SNDRV_DEBUGq_MCE
+#ifdef SNDRV_DEBUG_MCE
 	snd_printk("init: (1)\n");
 #endif
 	snd_cs4231_mce_up(chip);
@@ -1035,7 +1026,7 @@
 
  */
 
-int snd_cs4231_probe(cs4231_t *chip)
+static int snd_cs4231_probe(cs4231_t *chip)
 {
 	unsigned long flags;
 	int i, id, rev;
@@ -1406,20 +1397,16 @@
 static int snd_cs4231_pm_suspend(snd_card_t *card, unsigned int state)
 {
 	cs4231_t *chip = card->pm_private_data;
-	if (chip->suspend) {
+	if (chip->suspend)
 		chip->suspend(chip);
-		snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
-	}
 	return 0;
 }
 
 static int snd_cs4231_pm_resume(snd_card_t *card, unsigned int state)
 {
 	cs4231_t *chip = card->pm_private_data;
-	if (chip->resume) {
+	if (chip->resume)
 		chip->resume(chip);
-		snd_power_change_state(card, SNDRV_CTL_POWER_D0);
-	}
 	return 0;
 }
 #endif /* CONFIG_PM */
@@ -1943,7 +1930,6 @@
 
 EXPORT_SYMBOL(snd_cs4231_out);
 EXPORT_SYMBOL(snd_cs4231_in);
-EXPORT_SYMBOL(snd_cs4231_outm);
 EXPORT_SYMBOL(snd_cs4236_ext_out);
 EXPORT_SYMBOL(snd_cs4236_ext_in);
 EXPORT_SYMBOL(snd_cs4231_mce_up);
diff -Nru a/sound/isa/cs423x/cs4236.c b/sound/isa/cs423x/cs4236.c
--- a/sound/isa/cs423x/cs4236.c	2005-01-10 20:11:16 -08:00
+++ b/sound/isa/cs423x/cs4236.c	2005-01-10 20:11:16 -08:00
@@ -242,6 +242,8 @@
 	{ .id = "CSCd937", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } },
 	/* CS4235 without MPU401 */
 	{ .id = "CSCe825", .devs = { { "CSC0100" }, { "CSC0110" } } },
+	/* Unknown SiS530 - CS4235 */
+	{ .id = "CSC4825", .devs = { { "CSC0100" }, { "CSC0110" } } },
 	/* IBM IntelliStation M Pro 6898 11U - CS4236B */
 	{ .id = "CSCe835", .devs = { { "CSC0000" }, { "CSC0010" } } },
 	/* IBM PC 300PL Onboard - CS4236B */
diff -Nru a/sound/isa/es1688/es1688_lib.c b/sound/isa/es1688/es1688_lib.c
--- a/sound/isa/es1688/es1688_lib.c	2005-01-10 20:11:20 -08:00
+++ b/sound/isa/es1688/es1688_lib.c	2005-01-10 20:11:20 -08:00
@@ -70,7 +70,7 @@
 	return snd_es1688_dsp_command(chip, data);
 }
 
-int snd_es1688_read(es1688_t *chip, unsigned char reg)
+static int snd_es1688_read(es1688_t *chip, unsigned char reg)
 {
 	/* Read a byte from an extended mode register of ES1688 */
 	if (!snd_es1688_dsp_command(chip, 0xc0))
@@ -89,7 +89,7 @@
 	udelay(10);
 }
 
-unsigned char snd_es1688_mixer_read(es1688_t *chip, unsigned char reg)
+static unsigned char snd_es1688_mixer_read(es1688_t *chip, unsigned char reg)
 {
 	unsigned char result;
 
@@ -479,7 +479,7 @@
 	return snd_es1688_trigger(chip, cmd, 0x0f);
 }
 
-irqreturn_t snd_es1688_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t snd_es1688_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
 	es1688_t *chip = dev_id;
 
@@ -1041,8 +1041,6 @@
 }
 
 EXPORT_SYMBOL(snd_es1688_mixer_write);
-EXPORT_SYMBOL(snd_es1688_mixer_read);
-EXPORT_SYMBOL(snd_es1688_interrupt);
 EXPORT_SYMBOL(snd_es1688_create);
 EXPORT_SYMBOL(snd_es1688_pcm);
 EXPORT_SYMBOL(snd_es1688_mixer);
diff -Nru a/sound/isa/es18xx.c b/sound/isa/es18xx.c
--- a/sound/isa/es18xx.c	2005-01-10 20:11:18 -08:00
+++ b/sound/isa/es18xx.c	2005-01-10 20:11:18 -08:00
@@ -268,7 +268,7 @@
 	return ret;
 }
 
-inline void snd_es18xx_mixer_write(es18xx_t *chip,
+static inline void snd_es18xx_mixer_write(es18xx_t *chip,
 			    unsigned char reg, unsigned char data)
 {
 	unsigned long flags;
@@ -281,7 +281,7 @@
 #endif
 }
 
-inline int snd_es18xx_mixer_read(es18xx_t *chip, unsigned char reg)
+static inline int snd_es18xx_mixer_read(es18xx_t *chip, unsigned char reg)
 {
 	unsigned long flags;
 	int data;
@@ -1569,7 +1569,7 @@
 	snd_pcm_lib_preallocate_free_for_all(pcm);
 }
 
-int __devinit snd_es18xx_pcm(es18xx_t *chip, int device, snd_pcm_t ** rpcm)
+static int __devinit snd_es18xx_pcm(es18xx_t *chip, int device, snd_pcm_t ** rpcm)
 {
         snd_pcm_t *pcm;
 	char str[16];
@@ -1624,7 +1624,6 @@
 	snd_es18xx_write(chip, ES18XX_PM, chip->pm_reg);
 	snd_es18xx_write(chip, ES18XX_PM, chip->pm_reg ^= ES18XX_PM_SUS);
 
-	snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
 	return 0;
 }
 
@@ -1635,7 +1634,6 @@
 	/* restore PM register, we won't wake till (not 0x07) i/o activity though */
 	snd_es18xx_write(chip, ES18XX_PM, chip->pm_reg ^= ES18XX_PM_FM);
 
-	snd_power_change_state(card, SNDRV_CTL_POWER_D0);
 	return 0;
 }
 #endif /* CONFIG_PM */
@@ -1849,7 +1847,7 @@
 static int isapnp[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};
 #endif
 static long port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* 0x220,0x240,0x260,0x280 */
-#ifndef CONFIG_PNP_
+#ifndef CONFIG_PNP
 static long mpu_port[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = -1};
 #else
 static long mpu_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;
@@ -1988,7 +1986,7 @@
 	kfree(cfg);
 	return 0;
 }
-#endif /* CONFIG_PNP_ */
+#endif /* CONFIG_PNP */
 
 static int __devinit snd_audiodrive_probe(int dev, struct pnp_card_link *pcard,
 					  const struct pnp_card_device_id *pid)
diff -Nru a/sound/isa/gus/gus_dma.c b/sound/isa/gus/gus_dma.c
--- a/sound/isa/gus/gus_dma.c	2005-01-10 20:11:15 -08:00
+++ b/sound/isa/gus/gus_dma.c	2005-01-10 20:11:15 -08:00
@@ -25,7 +25,7 @@
 #include <sound/core.h>
 #include <sound/gus.h>
 
-void snd_gf1_dma_ack(snd_gus_card_t * gus)
+static void snd_gf1_dma_ack(snd_gus_card_t * gus)
 {
 	unsigned long flags;
 
@@ -35,11 +35,11 @@
 	spin_unlock_irqrestore(&gus->reg_lock, flags);
 }
 
-void snd_gf1_dma_program(snd_gus_card_t * gus,
-			 unsigned int addr,
-			 unsigned long buf_addr,
-			 unsigned int count,
-			 unsigned int cmd)
+static void snd_gf1_dma_program(snd_gus_card_t * gus,
+				unsigned int addr,
+				unsigned long buf_addr,
+				unsigned int count,
+				unsigned int cmd)
 {
 	unsigned long flags;
 	unsigned int address;
diff -Nru a/sound/isa/gus/gus_mem.c b/sound/isa/gus/gus_mem.c
--- a/sound/isa/gus/gus_mem.c	2005-01-10 20:11:18 -08:00
+++ b/sound/isa/gus/gus_mem.c	2005-01-10 20:11:18 -08:00
@@ -100,8 +100,7 @@
 		if (block->prev)
 			block->prev->next = block->next;
 	}
-	if (block->name)
-		kfree(block->name);
+	kfree(block->name);
 	kfree(block);
 	return 0;
 }
diff -Nru a/sound/isa/gus/gus_sample.c b/sound/isa/gus/gus_sample.c
--- a/sound/isa/gus/gus_sample.c	2005-01-10 20:11:19 -08:00
+++ b/sound/isa/gus/gus_sample.c	2005-01-10 20:11:19 -08:00
@@ -42,7 +42,7 @@
 	instr = snd_seq_instr_find(gus->gf1.ilist, &v->instr, 0, 1);
 	if (instr != NULL) {
 		if (instr->ops) {
-			if (instr->ops->instr_type == snd_seq_simple_id)
+			if (!strcmp(instr->ops->instr_type, SNDRV_SEQ_INSTR_ID_SIMPLE))
 				snd_gf1_simple_init(v);
 		}
 		snd_seq_instr_free_use(gus->gf1.ilist, instr);
diff -Nru a/sound/isa/opl3sa2.c b/sound/isa/opl3sa2.c
--- a/sound/isa/opl3sa2.c	2005-01-10 20:11:23 -08:00
+++ b/sound/isa/opl3sa2.c	2005-01-10 20:11:23 -08:00
@@ -341,7 +341,7 @@
 	return 0;
 }
 
-int snd_opl3sa2_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_opl3sa2_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
 {
 	opl3sa2_t *chip = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
@@ -358,7 +358,7 @@
 	return 0;
 }
 
-int snd_opl3sa2_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_opl3sa2_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
 {
 	opl3sa2_t *chip = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
@@ -388,7 +388,7 @@
   .get = snd_opl3sa2_get_double, .put = snd_opl3sa2_put_double, \
   .private_value = left_reg | (right_reg << 8) | (shift_left << 16) | (shift_right << 19) | (mask << 24) | (invert << 22) }
 
-int snd_opl3sa2_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_opl3sa2_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
 {
 	int mask = (kcontrol->private_value >> 24) & 0xff;
 
@@ -399,7 +399,7 @@
 	return 0;
 }
 
-int snd_opl3sa2_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_opl3sa2_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
 {
 	opl3sa2_t *chip = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
@@ -421,7 +421,7 @@
 	return 0;
 }
 
-int snd_opl3sa2_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_opl3sa2_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
 {
 	opl3sa2_t *chip = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
@@ -539,7 +539,6 @@
 	/* power down */
 	snd_opl3sa2_write(chip, OPL3SA2_PM_CTRL, OPL3SA2_PM_D3);
 
-	snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
 	return 0;
 }
 
@@ -563,7 +562,6 @@
 	/* restore cs4231 */
 	chip->cs4231_resume(chip->cs4231);
 
-	snd_power_change_state(card, SNDRV_CTL_POWER_D0);
 	return 0;
 }
 #endif /* CONFIG_PM */
@@ -713,7 +711,7 @@
 		chip->single_dma = 1;
 	if ((err = snd_opl3sa2_detect(chip)) < 0)
 		goto __error;
-	if (request_irq(xirq, snd_opl3sa2_interrupt, SA_INTERRUPT, "OPL3-SA2/3", (void *)chip)) {
+	if (request_irq(xirq, snd_opl3sa2_interrupt, SA_INTERRUPT, "OPL3-SA2", (void *)chip)) {
 		snd_printk(KERN_ERR "opl3sa2: can't grab IRQ %d\n", xirq);
 		err = -ENODEV;
 		goto __error;
diff -Nru a/sound/isa/opti9xx/opti92x-ad1848.c b/sound/isa/opti9xx/opti92x-ad1848.c
--- a/sound/isa/opti9xx/opti92x-ad1848.c	2005-01-10 20:11:16 -08:00
+++ b/sound/isa/opti9xx/opti92x-ad1848.c	2005-01-10 20:11:16 -08:00
@@ -1095,7 +1095,7 @@
 	spin_unlock_irqrestore(&chip->lock, flags);
 }
 
-irqreturn_t snd_opti93x_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t snd_opti93x_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
 	opti93x_t *codec = dev_id;
 	unsigned char status;
@@ -1263,9 +1263,9 @@
 	}
 }
 
-int snd_opti93x_create(snd_card_t *card, opti9xx_t *chip,
-		       int dma1, int dma2,
-		       opti93x_t **rcodec)
+static int snd_opti93x_create(snd_card_t *card, opti9xx_t *chip,
+			      int dma1, int dma2,
+			      opti93x_t **rcodec)
 {
 	static snd_device_ops_t ops = {
 		.dev_free =	snd_opti93x_dev_free,
@@ -1359,7 +1359,7 @@
 	snd_pcm_lib_preallocate_free_for_all(pcm);
 }
 
-int snd_opti93x_pcm(opti93x_t *codec, int device, snd_pcm_t **rpcm)
+static int snd_opti93x_pcm(opti93x_t *codec, int device, snd_pcm_t **rpcm)
 {
 	int error;
 	snd_pcm_t *pcm;
@@ -1603,7 +1603,7 @@
 }
 };
                                         
-int snd_opti93x_mixer(opti93x_t *chip)
+static int snd_opti93x_mixer(opti93x_t *chip)
 {
 	snd_card_t *card;
 	snd_kcontrol_new_t knew;
diff -Nru a/sound/isa/sb/emu8000.c b/sound/isa/sb/emu8000.c
--- a/sound/isa/sb/emu8000.c	2005-01-10 20:11:18 -08:00
+++ b/sound/isa/sb/emu8000.c	2005-01-10 20:11:18 -08:00
@@ -1133,7 +1133,7 @@
 		return err;
 	}
 	
-	if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, hw, &ops)) < 0) {
+	if ((err = snd_device_new(card, SNDRV_DEV_CODEC, hw, &ops)) < 0) {
 		snd_emu8000_free(hw);
 		return err;
 	}
diff -Nru a/sound/isa/sb/emu8000_callback.c b/sound/isa/sb/emu8000_callback.c
--- a/sound/isa/sb/emu8000_callback.c	2005-01-10 20:11:18 -08:00
+++ b/sound/isa/sb/emu8000_callback.c	2005-01-10 20:11:18 -08:00
@@ -528,6 +528,10 @@
 	emu8000_t *hw;
 	hw = emu->hw;
 
+	/* skip header */
+	buf += 16;
+	len -= 16;
+
 	switch (type) {
 	case SNDRV_EMU8000_LOAD_CHORUS_FX:
 		return snd_emu8000_load_chorus_fx(hw, mode, buf, len);
diff -Nru a/sound/isa/sb/emu8000_pcm.c b/sound/isa/sb/emu8000_pcm.c
--- a/sound/isa/sb/emu8000_pcm.c	2005-01-10 20:11:23 -08:00
+++ b/sound/isa/sb/emu8000_pcm.c	2005-01-10 20:11:23 -08:00
@@ -260,8 +260,7 @@
 static int emu8k_pcm_close(snd_pcm_substream_t *subs)
 {
 	emu8k_pcm_t *rec = subs->runtime->private_data;
-	if (rec)
-		kfree(rec);
+	kfree(rec);
 	subs->runtime->private_data = NULL;
 	return 0;
 }
diff -Nru a/sound/isa/sb/sb16_main.c b/sound/isa/sb/sb16_main.c
--- a/sound/isa/sb/sb16_main.c	2005-01-10 20:11:19 -08:00
+++ b/sound/isa/sb/sb16_main.c	2005-01-10 20:11:19 -08:00
@@ -509,7 +509,7 @@
  *  open/close
  */
 
-int snd_sb16_playback_open(snd_pcm_substream_t * substream)
+static int snd_sb16_playback_open(snd_pcm_substream_t * substream)
 {
 	unsigned long flags;
 	sb_t *chip = snd_pcm_substream_chip(substream);
@@ -566,7 +566,7 @@
 	return 0;
 }
 
-int snd_sb16_playback_close(snd_pcm_substream_t * substream)
+static int snd_sb16_playback_close(snd_pcm_substream_t * substream)
 {
 	unsigned long flags;
 	sb_t *chip = snd_pcm_substream_chip(substream);
@@ -579,7 +579,7 @@
 	return 0;
 }
 
-int snd_sb16_capture_open(snd_pcm_substream_t * substream)
+static int snd_sb16_capture_open(snd_pcm_substream_t * substream)
 {
 	unsigned long flags;
 	sb_t *chip = snd_pcm_substream_chip(substream);
@@ -636,7 +636,7 @@
 	return 0;
 }
 
-int snd_sb16_capture_close(snd_pcm_substream_t * substream)
+static int snd_sb16_capture_close(snd_pcm_substream_t * substream)
 {
 	unsigned long flags;
 	sb_t *chip = snd_pcm_substream_chip(substream);
@@ -728,7 +728,7 @@
 	return change;
 }
 
-snd_kcontrol_new_t snd_sb16_dma_control = {
+static snd_kcontrol_new_t snd_sb16_dma_control = {
 	.iface = SNDRV_CTL_ELEM_IFACE_PCM,
 	.name = "16-bit DMA Allocation",
 	.info = snd_sb16_dma_control_info,
diff -Nru a/sound/isa/sb/sb8_main.c b/sound/isa/sb/sb8_main.c
--- a/sound/isa/sb/sb8_main.c	2005-01-10 20:11:18 -08:00
+++ b/sound/isa/sb/sb8_main.c	2005-01-10 20:11:18 -08:00
@@ -425,7 +425,7 @@
  *
  */
  
-int snd_sb8_open(snd_pcm_substream_t *substream)
+static int snd_sb8_open(snd_pcm_substream_t *substream)
 {
 	sb_t *chip = snd_pcm_substream_chip(substream);
 	snd_pcm_runtime_t *runtime = substream->runtime;
@@ -471,7 +471,7 @@
 	return 0;	
 }
 
-int snd_sb8_close(snd_pcm_substream_t *substream)
+static int snd_sb8_close(snd_pcm_substream_t *substream)
 {
 	unsigned long flags;
 	sb_t *chip = snd_pcm_substream_chip(substream);
diff -Nru a/sound/isa/sb/sb_common.c b/sound/isa/sb/sb_common.c
--- a/sound/isa/sb/sb_common.c	2005-01-10 20:11:23 -08:00
+++ b/sound/isa/sb/sb_common.c	2005-01-10 20:11:23 -08:00
@@ -92,7 +92,7 @@
 	return -ENODEV;
 }
 
-int snd_sbdsp_version(sb_t * chip)
+static int snd_sbdsp_version(sb_t * chip)
 {
 	unsigned int result = -ENODEV;
 
diff -Nru a/sound/isa/sscape.c b/sound/isa/sscape.c
--- a/sound/isa/sscape.c	2005-01-10 20:11:16 -08:00
+++ b/sound/isa/sscape.c	2005-01-10 20:11:16 -08:00
@@ -487,7 +487,7 @@
 		 * the userspace pointer ...
 		 */
 		len = min(size, dma.bytes);
-		__copy_from_user(dma.area, data, len);
+		len -= __copy_from_user(dma.area, data, len);
 		data += len;
 		size -= len;
 
@@ -571,8 +571,9 @@
 		if (data < 0) {
 			snd_printk(KERN_ERR "sscape: timeout reading firmware version\n");
 			ret = -EAGAIN;
-		} else {
-			__copy_to_user(&bb->version, &data, sizeof(bb->version));
+		}
+		else if (__copy_to_user(&bb->version, &data, sizeof(bb->version))) {
+			ret = -EFAULT;
 		}
 	}
 
@@ -591,7 +592,7 @@
 {
 	unsigned long flags;
 	char __user *code;
-	int err, ret;
+	int err;
 
 	/*
 	 * We are going to have to copy this data into a special
@@ -601,12 +602,11 @@
 	 * NOTE: This buffer is 64K long! That's WAY too big to
 	 *       copy into a stack-temporary anyway.
 	 */
-	if (get_user(code, &mc->code))
+	if ( get_user(code, &mc->code) ||
+	     !access_ok(VERIFY_READ, code, SSCAPE_MICROCODE_SIZE) )
 		return -EFAULT;
-	if ((err = verify_area(VERIFY_READ, code, SSCAPE_MICROCODE_SIZE)) != 0)
-		return err;
 
-	if ((ret = upload_dma_data(sscape, code, SSCAPE_MICROCODE_SIZE)) == 0) {
+	if ((err = upload_dma_data(sscape, code, SSCAPE_MICROCODE_SIZE)) == 0) {
 		snd_printk(KERN_INFO "sscape: MIDI firmware loaded\n");
 	}
 
@@ -616,7 +616,7 @@
 
 	initialise_mpu401(sscape->mpu);
 
-	return ret;
+	return err;
 }
 
 /*
@@ -673,14 +673,14 @@
 			 * DMA-able buffer before we can upload it. We shall therefore
 			 * just check that the data pointer is valid for now ...
 			 */
-			if ((err = verify_area(VERIFY_READ, bb->code, sizeof(bb->code))) != 0)
-				return err;
+			if ( !access_ok(VERIFY_READ, bb->code, sizeof(bb->code)) )
+				return -EFAULT;
 
 			/*
 			 * Now check that we can write the firmware version number too...
 			 */
-			if ((err = verify_area(VERIFY_WRITE, &bb->version, sizeof(bb->version))) != 0)
-				return err;
+			if ( !access_ok(VERIFY_WRITE, &bb->version, sizeof(bb->version)) )
+				return -EFAULT;
 
 			err = sscape_upload_bootblock(sscape, bb);
 		}
diff -Nru a/sound/isa/wavefront/wavefront.c b/sound/isa/wavefront/wavefront.c
--- a/sound/isa/wavefront/wavefront.c	2005-01-10 20:11:21 -08:00
+++ b/sound/isa/wavefront/wavefront.c	2005-01-10 20:11:21 -08:00
@@ -279,7 +279,7 @@
 	return IRQ_HANDLED;
 }
 
-snd_hwdep_t * __devinit
+static snd_hwdep_t * __devinit
 snd_wavefront_new_synth (snd_card_t *card,
 			 int hw_dev,
 			 snd_wavefront_card_t *acard)
@@ -305,7 +305,7 @@
 	return wavefront_synth;
 }
 
-snd_hwdep_t * __devinit
+static snd_hwdep_t * __devinit
 snd_wavefront_new_fx (snd_card_t *card,
 		      int hw_dev,
 		      snd_wavefront_card_t *acard,
@@ -332,7 +332,7 @@
 static snd_wavefront_mpu_id internal_id = internal_mpu;
 static snd_wavefront_mpu_id external_id = external_mpu;
 
-snd_rawmidi_t * __devinit
+static snd_rawmidi_t * __devinit
 snd_wavefront_new_midi (snd_card_t *card,
 			int midi_dev,
 			snd_wavefront_card_t *acard,
diff -Nru a/sound/isa/wavefront/wavefront_fx.c b/sound/isa/wavefront/wavefront_fx.c
--- a/sound/isa/wavefront/wavefront_fx.c	2005-01-10 20:11:20 -08:00
+++ b/sound/isa/wavefront/wavefront_fx.c	2005-01-10 20:11:20 -08:00
@@ -537,8 +537,7 @@
 			     r.data[1], /* addr */
 			     r.data[2], /* cnt */
 			     pd);
-		if (page_data)
-			kfree(page_data);
+		kfree(page_data);
 		break;
 
 	default:
diff -Nru a/sound/isa/wavefront/wavefront_synth.c b/sound/isa/wavefront/wavefront_synth.c
--- a/sound/isa/wavefront/wavefront_synth.c	2005-01-10 20:11:18 -08:00
+++ b/sound/isa/wavefront/wavefront_synth.c	2005-01-10 20:11:18 -08:00
@@ -32,58 +32,58 @@
 #include <sound/snd_wavefront.h>
 #include <sound/initval.h>
 
-int wf_raw = 0; /* we normally check for "raw state" to firmware
-		   loading. if non-zero, then during driver loading, the
-		   state of the board is ignored, and we reset the
-		   board and load the firmware anyway.
-		*/
+static int wf_raw = 0; /* we normally check for "raw state" to firmware
+			  loading. if non-zero, then during driver loading, the
+			  state of the board is ignored, and we reset the
+			  board and load the firmware anyway.
+		       */
 		   
-int fx_raw = 1; /* if this is zero, we'll leave the FX processor in
-		   whatever state it is when the driver is loaded.
-		   The default is to download the microprogram and
-		   associated coefficients to set it up for "default"
-		   operation, whatever that means.
-		*/
-
-int debug_default = 0;  /* you can set this to control debugging
-			      during driver loading. it takes any combination
-			      of the WF_DEBUG_* flags defined in
-			      wavefront.h
-			   */
+static int fx_raw = 1; /* if this is zero, we'll leave the FX processor in
+			  whatever state it is when the driver is loaded.
+			  The default is to download the microprogram and
+			  associated coefficients to set it up for "default"
+			  operation, whatever that means.
+		       */
+
+static int debug_default = 0;  /* you can set this to control debugging
+				  during driver loading. it takes any combination
+				  of the WF_DEBUG_* flags defined in
+				  wavefront.h
+			       */
 
 /* XXX this needs to be made firmware and hardware version dependent */
 
-char *ospath = "/etc/sound/wavefront.os"; /* where to find a processed
-					     version of the WaveFront OS
-					  */
-
-int wait_usecs = 150; /* This magic number seems to give pretty optimal
-			 throughput based on my limited experimentation.
-			 If you want to play around with it and find a better
-			 value, be my guest. Remember, the idea is to
-			 get a number that causes us to just busy wait
-			 for as many WaveFront commands as possible, without
-			 coming up with a number so large that we hog the
-			 whole CPU.
-
-			 Specifically, with this number, out of about 134,000
-			 status waits, only about 250 result in a sleep.
-		      */
-
-int sleep_interval = 100;   /* HZ/sleep_interval seconds per sleep */
-int sleep_tries = 50;       /* number of times we'll try to sleep */
-
-int reset_time = 2;        /* hundreths of a second we wait after a HW
-			      reset for the expected interrupt.
-			   */
-
-int ramcheck_time = 20;    /* time in seconds to wait while ROM code
-			      checks on-board RAM.
-			   */
-
-int osrun_time = 10;       /* time in seconds we wait for the OS to
-			      start running.
-			   */
+static char *ospath = "/etc/sound/wavefront.os"; /* where to find a processed
+						    version of the WaveFront OS
+						 */
+
+static int wait_usecs = 150; /* This magic number seems to give pretty optimal
+				throughput based on my limited experimentation.
+				If you want to play around with it and find a better
+				value, be my guest. Remember, the idea is to
+				get a number that causes us to just busy wait
+				for as many WaveFront commands as possible, without
+				coming up with a number so large that we hog the
+				whole CPU.
+
+				Specifically, with this number, out of about 134,000
+				status waits, only about 250 result in a sleep.
+			    */
+
+static int sleep_interval = 100;   /* HZ/sleep_interval seconds per sleep */
+static int sleep_tries = 50;       /* number of times we'll try to sleep */
+
+static int reset_time = 2;        /* hundreths of a second we wait after a HW
+				     reset for the expected interrupt.
+				  */
+
+static int ramcheck_time = 20;    /* time in seconds to wait while ROM code
+				     checks on-board RAM.
+				  */
+
+static int osrun_time = 10;       /* time in seconds we wait for the OS to
+				     start running.
+				  */
 module_param(wf_raw, int, 0444);
 MODULE_PARM_DESC(wf_raw, "if non-zero, assume that we need to boot the OS");
 module_param(fx_raw, int, 0444);
@@ -1709,7 +1709,7 @@
 7 Unused
 */
 
-int __init
+static int __init
 snd_wavefront_interrupt_bits (int irq)
 
 {
@@ -1922,7 +1922,7 @@
 
 {
 	unsigned char section[WF_SECTION_MAX];
-	char section_length; /* yes, just a char; max value is WF_SECTION_MAX */
+	signed char section_length; /* yes, just a char; max value is WF_SECTION_MAX */
 	int section_cnt_downloaded = 0;
 	int fd;
 	int c;
diff -Nru a/sound/oss/ac97.c b/sound/oss/ac97.c
--- a/sound/oss/ac97.c	2005-01-10 20:11:20 -08:00
+++ b/sound/oss/ac97.c	2005-01-10 20:11:20 -08:00
@@ -133,7 +133,7 @@
 
 /* Return the contents of register REG; use the cache if the value in it
    is valid.  Returns a negative error code on failure. */
-int
+static int
 ac97_get_register (struct ac97_hwint *dev, u8 reg) 
 {
     if (reg > 127 || (reg & 1))
@@ -226,7 +226,7 @@
     }
 }
 
-int
+static int
 ac97_set_mixer (struct ac97_hwint *dev, int oss_channel, u16 oss_value)
 {
     int scaled_value;
@@ -262,7 +262,7 @@
     return result;
 }
 
-int
+static int
 ac97_get_mixer_scaled (struct ac97_hwint *dev, int oss_channel)
 {
     struct ac97_chn_desc *channel = ac97_find_chndesc (dev, oss_channel);
@@ -292,7 +292,7 @@
 				  channel->is_inverted);
 }
 
-int
+static int
 ac97_get_recmask (struct ac97_hwint *dev)
 {
     int recReg = ac97_get_register (dev, AC97_RECORD_SELECT);
@@ -309,7 +309,7 @@
     }
 }
 
-int
+static int
 ac97_set_recmask (struct ac97_hwint *dev, int oss_recmask)
 {
     int x;
@@ -439,10 +439,7 @@
 
 EXPORT_SYMBOL(ac97_init);
 EXPORT_SYMBOL(ac97_set_values);
-EXPORT_SYMBOL(ac97_set_mixer);
-EXPORT_SYMBOL(ac97_get_register);
 EXPORT_SYMBOL(ac97_put_register);
-EXPORT_SYMBOL(ac97_get_mixer_scaled);
 EXPORT_SYMBOL(ac97_mixer_ioctl);
 EXPORT_SYMBOL(ac97_reset);
 MODULE_LICENSE("GPL");
diff -Nru a/sound/oss/ac97.h b/sound/oss/ac97.h
--- a/sound/oss/ac97.h	2005-01-10 20:11:20 -08:00
+++ b/sound/oss/ac97.h	2005-01-10 20:11:20 -08:00
@@ -184,25 +184,9 @@
 extern int ac97_set_values (struct ac97_hwint *dev,
 			    struct ac97_mixer_value_list *value_list);
 
-/* Sets one mixer channel OSS_CHANNEL to the scaled value OSS_VALUE.
-   Returns the resulting (rescaled) value, or a negative value
-   representing an error code.
-
-   Stereo channels have two values in OSS_VALUE (the left value is in the
-   lower 8 bits, the right value is in the upper 8 bits). */
-extern int ac97_set_mixer (struct ac97_hwint *dev, int oss_channel,
-			   u16 oss_value);
-
-/* Return the contents of the specified AC97 register REG; it uses the
-   last-written value if it is available.  */
-extern int ac97_get_register (struct ac97_hwint *dev, u8 reg);
-
 /* Writes the specified VALUE to the AC97 register REG in the mixer.
    Takes care of setting the last-written cache as well.  */
 extern int ac97_put_register (struct ac97_hwint *dev, u8 reg, u16 value);
-
-/* Returns the last OSS value written to the OSS_CHANNEL mixer channel.  */
-extern int ac97_get_mixer_scaled (struct ac97_hwint *dev, int oss_channel);
 
 /* Default ioctl. */
 extern int ac97_mixer_ioctl (struct ac97_hwint *dev, unsigned int cmd,
diff -Nru a/sound/oss/ac97_codec.c b/sound/oss/ac97_codec.c
--- a/sound/oss/ac97_codec.c	2005-01-10 20:11:16 -08:00
+++ b/sound/oss/ac97_codec.c	2005-01-10 20:11:16 -08:00
@@ -52,6 +52,7 @@
 #include <linux/errno.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
+#include <linux/pci.h>
 #include <linux/ac97_codec.h>
 #include <asm/uaccess.h>
 
@@ -128,6 +129,9 @@
 	{0x41445348, "Analog Devices AD1881A",	&null_ops},
 	{0x41445360, "Analog Devices AD1885",	&default_ops},
 	{0x41445361, "Analog Devices AD1886",	&ad1886_ops},
+	{0x41445370, "Analog Devices AD1981",	&null_ops},
+	{0x41445372, "Analog Devices AD1981A",	&null_ops},
+	{0x41445374, "Analog Devices AD1981B",	&null_ops},
 	{0x41445460, "Analog Devices AD1885",	&default_ops},
 	{0x41445461, "Analog Devices AD1886",	&ad1886_ops},
 	{0x414B4D00, "Asahi Kasei AK4540",	&null_ops},
@@ -1453,5 +1457,92 @@
 }
 
 EXPORT_SYMBOL_GPL(ac97_unregister_driver);
+
+static int swap_headphone(int remove_master)
+{
+	struct list_head *l;
+	struct ac97_codec *c;
 	
+	if (remove_master) {
+		down(&codec_sem);
+		list_for_each(l, &codecs)
+		{
+			c = list_entry(l, struct ac97_codec, list);
+			if (supported_mixer(c, SOUND_MIXER_PHONEOUT))
+				c->supported_mixers &= ~SOUND_MASK_PHONEOUT;
+		}
+		up(&codec_sem);
+	} else
+		ac97_hw[SOUND_MIXER_PHONEOUT].offset = AC97_MASTER_VOL_STEREO;
+
+	/* Scale values already match */
+	ac97_hw[SOUND_MIXER_VOLUME].offset = AC97_MASTER_VOL_MONO;
+	return 0;
+}
+
+static int apply_quirk(int quirk)
+{
+	switch (quirk) {
+	case AC97_TUNE_NONE:
+		return 0;
+	case AC97_TUNE_HP_ONLY:
+		return swap_headphone(1);
+	case AC97_TUNE_SWAP_HP:
+		return swap_headphone(0);
+	case AC97_TUNE_SWAP_SURROUND:
+		return -ENOSYS; /* not yet implemented */
+	case AC97_TUNE_AD_SHARING:
+		return -ENOSYS; /* not yet implemented */
+	case AC97_TUNE_ALC_JACK:
+		return -ENOSYS; /* not yet implemented */
+	}
+	return -EINVAL;
+}
+
+/**
+ *	ac97_tune_hardware - tune up the hardware
+ *	@pdev: pci_dev pointer
+ *	@quirk: quirk list
+ *	@override: explicit quirk value (overrides if not AC97_TUNE_DEFAULT)
+ *
+ *	Do some workaround for each pci device, such as renaming of the
+ *	headphone (true line-out) control as "Master".
+ *	The quirk-list must be terminated with a zero-filled entry.
+ *
+ *	Returns zero if successful, or a negative error code on failure.
+ */
+
+int ac97_tune_hardware(struct pci_dev *pdev, struct ac97_quirk *quirk, int override)
+{
+	int result;
+
+	if (!quirk)
+		return -EINVAL;
+
+	if (override != AC97_TUNE_DEFAULT) {
+		result = apply_quirk(override);
+		if (result < 0)
+			printk(KERN_ERR "applying quirk type %d failed (%d)\n", override, result);
+		return result;
+	}
+
+	for (; quirk->vendor; quirk++) {
+		if (quirk->vendor != pdev->subsystem_vendor)
+			continue;
+		if ((! quirk->mask && quirk->device == pdev->subsystem_device) ||
+		    quirk->device == (quirk->mask & pdev->subsystem_device)) {
+#ifdef DEBUG
+			printk("ac97 quirk for %s (%04x:%04x)\n", quirk->name, ac97->subsystem_vendor, pdev->subsystem_device);
+#endif
+			result = apply_quirk(quirk->type);
+			if (result < 0)
+				printk(KERN_ERR "applying quirk type %d for %s failed (%d)\n", quirk->type, quirk->name, result);
+			return result;
+		}
+	}
+	return 0;
+}
+
+EXPORT_SYMBOL_GPL(ac97_tune_hardware);
+
 MODULE_LICENSE("GPL");
diff -Nru a/sound/oss/aci.c b/sound/oss/aci.c
--- a/sound/oss/aci.c	2005-01-10 20:11:19 -08:00
+++ b/sound/oss/aci.c	2005-01-10 20:11:19 -08:00
@@ -83,18 +83,18 @@
 
 #ifdef MODULE
 static int reset;
-MODULE_PARM(reset,"i");
+module_param(reset, bool, 0);
 MODULE_PARM_DESC(reset,"When set to 1, reset aci mixer.");
 #else
 static int reset = 1;
 #endif
 
 static int ide=-1;
-MODULE_PARM(ide,"i");
+module_param(ide, int, 0);
 MODULE_PARM_DESC(ide,"1 enable, 0 disable ide-port - untested"
 		 " default: do nothing");
 static int wss=-1;
-MODULE_PARM(wss,"i");
+module_param(wss, int, 0);
 MODULE_PARM_DESC(wss,"change between ACI/WSS-mixer; use 0 and 1 - untested"
 		 " default: do nothing; for PCM1-pro only");
 
diff -Nru a/sound/oss/ad1816.c b/sound/oss/ad1816.c
--- a/sound/oss/ad1816.c	2005-01-10 20:11:22 -08:00
+++ b/sound/oss/ad1816.c	2005-01-10 20:11:22 -08:00
@@ -1215,16 +1215,16 @@
 /* use isapnp for configuration */
 static int isapnp	= 1;
 static int isapnpjump;
-MODULE_PARM(isapnp, "i");
-MODULE_PARM(isapnpjump, "i");
+module_param(isapnp, bool, 0);
+module_param(isapnpjump, int, 0);
 #endif
 
-MODULE_PARM(io,"i");
-MODULE_PARM(irq,"i");
-MODULE_PARM(dma,"i");
-MODULE_PARM(dma2,"i");
-MODULE_PARM(ad1816_clockfreq,"i");
-MODULE_PARM(options,"i");
+module_param(io, int, 0);
+module_param(irq, int, 0);
+module_param(dma, int, 0);
+module_param(dma2, int, 0);
+module_param(ad1816_clockfreq, int, 0);
+module_param(options, int, 0);
 
 #ifdef __ISAPNP__
 static struct {
@@ -1245,8 +1245,9 @@
 MODULE_DEVICE_TABLE(isapnp, isapnp_ad1816_list);
 
 
-void __init ad1816_config_pnp_card(struct pnp_card *card, unsigned short vendor,
-	unsigned short function)
+static void __init ad1816_config_pnp_card(struct pnp_card *card,
+					  unsigned short vendor,
+					  unsigned short function)
 {
 	struct address_info cfg;
   	struct pnp_dev *card_dev = pnp_find_dev(card, vendor, function, NULL);
@@ -1270,7 +1271,7 @@
 	}
 }
 
-void __init ad1816_config_pnp_cards(void)
+static void __init ad1816_config_pnp_cards(void)
 {
 	int nr_pnp_cfg;
 	int i;
diff -Nru a/sound/oss/ad1848.c b/sound/oss/ad1848.c
--- a/sound/oss/ad1848.c	2005-01-10 20:11:20 -08:00
+++ b/sound/oss/ad1848.c	2005-01-10 20:11:20 -08:00
@@ -123,9 +123,9 @@
 static struct address_info cfg;
 static int nr_ad1848_devs;
 
-int deskpro_xl;
-int deskpro_m;
-int soundpro;
+static int deskpro_xl;
+static int deskpro_m;
+static int soundpro;
 
 static volatile signed char irq2dev[17] = {
 	-1, -1, -1, -1, -1, -1, -1, -1,
@@ -2905,24 +2905,24 @@
 static int __initdata dma2 = -1;
 static int __initdata type = 0;
 
-MODULE_PARM(io, "i");                   /* I/O for a raw AD1848 card */
-MODULE_PARM(irq, "i");                  /* IRQ to use */
-MODULE_PARM(dma, "i");                  /* First DMA channel */
-MODULE_PARM(dma2, "i");                 /* Second DMA channel */
-MODULE_PARM(type, "i");                 /* Card type */
-MODULE_PARM(deskpro_xl, "i");           /* Special magic for Deskpro XL boxen */
-MODULE_PARM(deskpro_m, "i");            /* Special magic for Deskpro M box */
-MODULE_PARM(soundpro, "i");             /* More special magic for SoundPro chips */
+module_param(io, int, 0);		/* I/O for a raw AD1848 card */
+module_param(irq, int, 0);		/* IRQ to use */
+module_param(dma, int, 0);		/* First DMA channel */
+module_param(dma2, int, 0);		/* Second DMA channel */
+module_param(type, int, 0);		/* Card type */
+module_param(deskpro_xl, bool, 0);	/* Special magic for Deskpro XL boxen */
+module_param(deskpro_m, bool, 0);	/* Special magic for Deskpro M box */
+module_param(soundpro, bool, 0);	/* More special magic for SoundPro chips */
 
 #ifdef CONFIG_PNP
-MODULE_PARM(isapnp,	"i");
-MODULE_PARM(isapnpjump,	"i");
-MODULE_PARM(reverse,	"i");
+module_param(isapnp, int, 0);
+module_param(isapnpjump, int, 0);
+module_param(reverse, bool, 0);
 MODULE_PARM_DESC(isapnp,	"When set to 0, Plug & Play support will be disabled");
 MODULE_PARM_DESC(isapnpjump,	"Jumps to a specific slot in the driver's PnP table. Use the source, Luke.");
 MODULE_PARM_DESC(reverse,	"When set to 1, will reverse ISAPnP search order");
 
-struct pnp_dev	*ad1848_dev  = NULL;
+static struct pnp_dev	*ad1848_dev  = NULL;
 
 /* Please add new entries at the end of the table */
 static struct {
diff -Nru a/sound/oss/ad1889.c b/sound/oss/ad1889.c
--- a/sound/oss/ad1889.c	2005-01-10 20:11:18 -08:00
+++ b/sound/oss/ad1889.c	2005-01-10 20:11:18 -08:00
@@ -82,20 +82,6 @@
 	ac97_codec->codec_write(dev->ac97_codec, AC97_POWER_CONTROL, 0);
 }
 
-static inline void ad1889_set_adc_rate(ad1889_dev_t *dev, int rate)
-{
-	struct ac97_codec *ac97_codec = dev->ac97_codec;
-
-	DBG("Setting ADC rate to %d\n", rate);
-	dev->state[AD_ADC_STATE].dmabuf.rate = rate;
-	AD1889_WRITEW(dev, AD_DSRES, rate);
-
-	/* Cycle the ADC to enable the new rate */
-	ac97_codec->codec_write(dev->ac97_codec, AC97_POWER_CONTROL, 0x0100);
-	WAIT_10MS();
-	ac97_codec->codec_write(dev->ac97_codec, AC97_POWER_CONTROL, 0);
-}
-
 static inline void ad1889_set_wav_fmt(ad1889_dev_t *dev, int fmt)
 {
 	u16 tmp;
@@ -308,8 +294,8 @@
 	ad1889_start_wav(&dev->state[AD_WAV_STATE]);
 }
 
-int ad1889_read_proc (char *page, char **start, off_t off,
-		      int count, int *eof, void *data)
+static int ad1889_read_proc (char *page, char **start, off_t off,
+			     int count, int *eof, void *data)
 {
 	char *out = page;
 	int len, i;
diff -Nru a/sound/oss/adlib_card.c b/sound/oss/adlib_card.c
--- a/sound/oss/adlib_card.c	2005-01-10 20:11:17 -08:00
+++ b/sound/oss/adlib_card.c	2005-01-10 20:11:17 -08:00
@@ -31,7 +31,7 @@
 
 static int __initdata io = -1;
 
-MODULE_PARM(io, "i");
+module_param(io, int, 0);
 
 static int __init init_adlib(void)
 {
diff -Nru a/sound/oss/aedsp16.c b/sound/oss/aedsp16.c
--- a/sound/oss/aedsp16.c	2005-01-10 20:11:19 -08:00
+++ b/sound/oss/aedsp16.c	2005-01-10 20:11:19 -08:00
@@ -438,7 +438,7 @@
 	int cdrombase;
 };
 
-struct d_hcfg decoded_hcfg __initdata = {0, };
+static struct d_hcfg decoded_hcfg __initdata = {0, };
 
 #endif /* CONFIG_SC6600 */
 
@@ -610,7 +610,7 @@
 }
 #endif
 
-void __init aedsp16_hard_decode(void) {
+static void __init aedsp16_hard_decode(void) {
 
 	DBG((" aedsp16_hard_decode: 0x%x, 0x%x\n", hard_cfg[0], hard_cfg[1]));
 
@@ -654,7 +654,7 @@
 	DBG(("success.\n"));
 }
 
-void __init aedsp16_hard_encode(void) {
+static void __init aedsp16_hard_encode(void) {
 
 	DBG((" aedsp16_hard_encode: 0x%x, 0x%x\n", hard_cfg[0], hard_cfg[1]));
 
@@ -1252,7 +1252,7 @@
 	DBG(("done.\n"));
 }
 
-int __init init_aedsp16(void)
+static int __init init_aedsp16(void)
 {
 	int initialized = FALSE;
 
@@ -1294,7 +1294,7 @@
 	return initialized;
 }
 
-void __init uninit_aedsp16(void)
+static void __init uninit_aedsp16(void)
 {
 	if (ae_config.mss_base != -1)
 		uninit_aedsp16_mss();
@@ -1311,17 +1311,17 @@
 static int __initdata mss_base = -1;
 static int __initdata mpu_base = -1;
 
-MODULE_PARM(io, "i");
+module_param(io, int, 0);
 MODULE_PARM_DESC(io, "I/O base address (0x220 0x240)");
-MODULE_PARM(irq, "i");
+module_param(irq, int, 0);
 MODULE_PARM_DESC(irq, "IRQ line (5 7 9 10 11)");
-MODULE_PARM(dma, "i");
+module_param(dma, int, 0);
 MODULE_PARM_DESC(dma, "dma line (0 1 3)");
-MODULE_PARM(mpu_irq, "i");
+module_param(mpu_irq, int, 0);
 MODULE_PARM_DESC(mpu_irq, "MPU-401 IRQ line (5 7 9 10 0)");
-MODULE_PARM(mss_base, "i");
+module_param(mss_base, int, 0);
 MODULE_PARM_DESC(mss_base, "MSS emulation I/O base address (0x530 0xE80)");
-MODULE_PARM(mpu_base, "i");
+module_param(mpu_base, int, 0);
 MODULE_PARM_DESC(mpu_base,"MPU-401 I/O base address (0x300 0x310 0x320 0x330)");
 MODULE_AUTHOR("Riccardo Facchetti <fizban@tin.it>");
 MODULE_DESCRIPTION("Audio Excel DSP 16 Driver Version " VERSION);
diff -Nru a/sound/oss/ali5455.c b/sound/oss/ali5455.c
--- a/sound/oss/ali5455.c	2005-01-10 20:11:21 -08:00
+++ b/sound/oss/ali5455.c	2005-01-10 20:11:21 -08:00
@@ -3651,12 +3651,13 @@
 MODULE_AUTHOR("");
 MODULE_DESCRIPTION("ALI 5455 audio support");
 MODULE_LICENSE("GPL");
-MODULE_PARM(clocking, "i");
-MODULE_PARM(strict_clocking, "i");
-MODULE_PARM(codec_pcmout_share_spdif_locked, "i");
-MODULE_PARM(codec_independent_spdif_locked, "i");
-MODULE_PARM(controller_pcmout_share_spdif_locked, "i");
-MODULE_PARM(controller_independent_spdif_locked, "i");
+module_param(clocking, int, 0);
+/* FIXME: bool? */
+module_param(strict_clocking, uint, 0);
+module_param(codec_pcmout_share_spdif_locked, uint, 0);
+module_param(codec_independent_spdif_locked, uint, 0);
+module_param(controller_pcmout_share_spdif_locked, uint, 0);
+module_param(controller_independent_spdif_locked, uint, 0);
 #define ALI5455_MODULE_NAME "ali5455"
 static struct pci_driver ali_pci_driver = {
 	.name		= ALI5455_MODULE_NAME,
diff -Nru a/sound/oss/awe_wave.c b/sound/oss/awe_wave.c
--- a/sound/oss/awe_wave.c	2005-01-10 20:11:18 -08:00
+++ b/sound/oss/awe_wave.c	2005-01-10 20:11:18 -08:00
@@ -207,8 +207,8 @@
 #define AWE_DEFAULT_MEM_SIZE	-1	/* autodetect */
 #endif
 
-int io = AWE_DEFAULT_BASE_ADDR; /* Emu8000 base address */
-int memsize = AWE_DEFAULT_MEM_SIZE; /* memory size in Kbytes */
+static int io = AWE_DEFAULT_BASE_ADDR; /* Emu8000 base address */
+static int memsize = AWE_DEFAULT_MEM_SIZE; /* memory size in Kbytes */
 #ifdef CONFIG_PNP
 static int isapnp = -1;
 #else
@@ -219,11 +219,11 @@
 MODULE_DESCRIPTION("SB AWE32/64 WaveTable driver");
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(io, "i");
+module_param(io, int, 0);
 MODULE_PARM_DESC(io, "base i/o port of Emu8000");
-MODULE_PARM(memsize, "i");
+module_param(memsize, int, 0);
 MODULE_PARM_DESC(memsize, "onboard DRAM size in Kbytes");
-MODULE_PARM(isapnp, "i");
+module_param(isapnp, bool, 0);
 MODULE_PARM_DESC(isapnp, "use ISAPnP detection");
 
 /* DRAM start offset */
@@ -6113,12 +6113,12 @@
 	return 0;
 }
 
-int __init attach_awe(void)
+static int __init attach_awe(void)
 {
 	return awe_detect() ? 0 : -ENODEV;
 }
 
-void __exit unload_awe(void)
+static void __exit unload_awe(void)
 {
 	pnp_unregister_driver(&awe_pnp_driver);
 	awe_dettach_device();
diff -Nru a/sound/oss/btaudio.c b/sound/oss/btaudio.c
--- a/sound/oss/btaudio.c	2005-01-10 20:11:17 -08:00
+++ b/sound/oss/btaudio.c	2005-01-10 20:11:17 -08:00
@@ -1113,15 +1113,15 @@
 module_init(btaudio_init_module);
 module_exit(btaudio_cleanup_module);
 
-MODULE_PARM(dsp1,"i");
-MODULE_PARM(dsp2,"i");
-MODULE_PARM(mixer,"i");
-MODULE_PARM(debug,"i");
-MODULE_PARM(irq_debug,"i");
-MODULE_PARM(digital,"i");
-MODULE_PARM(analog,"i");
-MODULE_PARM(rate,"i");
-MODULE_PARM(latency,"i");
+module_param(dsp1, int, S_IRUGO);
+module_param(dsp2, int, S_IRUGO);
+module_param(mixer, int, S_IRUGO);
+module_param(debug, int, S_IRUGO | S_IWUSR);
+module_param(irq_debug, int, S_IRUGO | S_IWUSR);
+module_param(digital, int, S_IRUGO);
+module_param(analog, int, S_IRUGO);
+module_param(rate, int, S_IRUGO);
+module_param(latency, int, S_IRUGO);
 MODULE_PARM_DESC(latency,"pci latency timer");
 
 MODULE_DEVICE_TABLE(pci, btaudio_pci_tbl);
diff -Nru a/sound/oss/cmpci.c b/sound/oss/cmpci.c
--- a/sound/oss/cmpci.c	2005-01-10 20:11:19 -08:00
+++ b/sound/oss/cmpci.c	2005-01-10 20:11:19 -08:00
@@ -479,17 +479,17 @@
 static	int	use_mic_as_bass = 0;
 static	int	mic_boost = 0;
 static	int	hw_copy = 0;
-MODULE_PARM(mpuio, "i");
-MODULE_PARM(fmio, "i");
-MODULE_PARM(joystick, "i");
-MODULE_PARM(spdif_inverse, "i");
-MODULE_PARM(spdif_loop, "i");
-MODULE_PARM(spdif_out, "i");
-MODULE_PARM(use_line_as_rear, "i");
-MODULE_PARM(use_line_as_bass, "i");
-MODULE_PARM(use_mic_as_bass, "i");
-MODULE_PARM(mic_boost, "i");
-MODULE_PARM(hw_copy, "i");
+module_param(mpuio, int, 0);
+module_param(fmio, int, 0);
+module_param(joystick, bool, 0);
+module_param(spdif_inverse, bool, 0);
+module_param(spdif_loop, bool, 0);
+module_param(spdif_out, bool, 0);
+module_param(use_line_as_rear, bool, 0);
+module_param(use_line_as_bass, bool, 0);
+module_param(use_mic_as_bass, bool, 0);
+module_param(mic_boost, bool, 0);
+module_param(hw_copy, bool, 0);
 MODULE_PARM_DESC(mpuio, "(0x330, 0x320, 0x310, 0x300) Base of MPU-401, 0 to disable");
 MODULE_PARM_DESC(fmio, "(0x388, 0x3C8, 0x3E0) Base of OPL3, 0 to disable");
 MODULE_PARM_DESC(joystick, "(1/0) Enable joystick interface, still need joystick driver");
@@ -1160,15 +1160,6 @@
 
 	if (s->status & DO_DUAL_DAC)
 		enable_adc(s);
-}
-
-static inline void enable_dac(struct cm_state *s)
-{
-	unsigned long flags;
-
-	spin_lock_irqsave(&s->lock, flags);
-	enable_dac_unlocked(s);
-	spin_unlock_irqrestore(&s->lock, flags);
 }
 
 static inline void stop_adc_unlocked(struct cm_state *s)
diff -Nru a/sound/oss/cs4232.c b/sound/oss/cs4232.c
--- a/sound/oss/cs4232.c	2005-01-10 20:11:19 -08:00
+++ b/sound/oss/cs4232.c	2005-01-10 20:11:19 -08:00
@@ -54,7 +54,6 @@
 
 #include "sound_config.h"
 
-#include "cs4232.h"
 #include "ad1848.h"
 #include "mpu401.h"
 
@@ -78,7 +77,7 @@
 static int synth_base, synth_irq;
 static int mpu_detected;
 
-int probe_cs4232_mpu(struct address_info *hw_config)
+static int probe_cs4232_mpu(struct address_info *hw_config)
 {
 	/*
 	 *	Just write down the config values.
@@ -363,25 +362,25 @@
 MODULE_AUTHOR("Hannu Savolainen, Paul Barton-Davis"); 
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(io,"i");
+module_param(io, int, 0);
 MODULE_PARM_DESC(io,"base I/O port for AD1848");
-MODULE_PARM(irq,"i");
+module_param(irq, int, 0);
 MODULE_PARM_DESC(irq,"IRQ for AD1848 chip");
-MODULE_PARM(dma,"i");
+module_param(dma, int, 0);
 MODULE_PARM_DESC(dma,"8 bit DMA for AD1848 chip");
-MODULE_PARM(dma2,"i");
+module_param(dma2, int, 0);
 MODULE_PARM_DESC(dma2,"16 bit DMA for AD1848 chip");
-MODULE_PARM(mpuio,"i");
+module_param(mpuio, int, 0);
 MODULE_PARM_DESC(mpuio,"MPU 401 base address");
-MODULE_PARM(mpuirq,"i");
+module_param(mpuirq, int, 0);
 MODULE_PARM_DESC(mpuirq,"MPU 401 IRQ");
-MODULE_PARM(synthio,"i");
+module_param(synthio, int, 0);
 MODULE_PARM_DESC(synthio,"Maui WaveTable base I/O port");
-MODULE_PARM(synthirq,"i");
+module_param(synthirq, int, 0);
 MODULE_PARM_DESC(synthirq,"Maui WaveTable IRQ");
-MODULE_PARM(isapnp,"i");
+module_param(isapnp, bool, 0);
 MODULE_PARM_DESC(isapnp,"Enable ISAPnP probing (default 1)");
-MODULE_PARM(bss,"i");
+module_param(bss, bool, 0);
 MODULE_PARM_DESC(bss,"Enable Bose Sound System Support (default 0)");
 
 /*
diff -Nru a/sound/oss/cs4232.h b/sound/oss/cs4232.h
--- a/sound/oss/cs4232.h	2005-01-10 20:11:24 -08:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,3 +0,0 @@
-
-int probe_cs4232_mpu (struct address_info *hw_config);
-void attach_cs4232_mpu (struct address_info *hw_config);
diff -Nru a/sound/oss/cs4281/cs4281_wrapper-24.c b/sound/oss/cs4281/cs4281_wrapper-24.c
--- a/sound/oss/cs4281/cs4281_wrapper-24.c	2005-01-10 20:11:18 -08:00
+++ b/sound/oss/cs4281/cs4281_wrapper-24.c	2005-01-10 20:11:18 -08:00
@@ -26,8 +26,8 @@
 
 #include <linux/spinlock.h>
 
-int cs4281_resume_null(struct pci_dev *pcidev) { return 0; }
-int cs4281_suspend_null(struct pci_dev *pcidev, u32 state) { return 0; }
+static int cs4281_resume_null(struct pci_dev *pcidev) { return 0; }
+static int cs4281_suspend_null(struct pci_dev *pcidev, u32 state) { return 0; }
 
 #define free_dmabuf(state, dmabuf) \
 	pci_free_consistent(state->pcidev, \
diff -Nru a/sound/oss/cs4281/cs4281m.c b/sound/oss/cs4281/cs4281m.c
--- a/sound/oss/cs4281/cs4281m.c	2005-01-10 20:11:23 -08:00
+++ b/sound/oss/cs4281/cs4281m.c	2005-01-10 20:11:23 -08:00
@@ -111,7 +111,7 @@
 // rather than 64k as some of the games work more responsively.
 // log base 2( buff sz = 32k).
 static unsigned long defaultorder = 3;
-MODULE_PARM(defaultorder, "i");
+module_param(defaultorder, ulong, 0);
 
 //
 // Turn on/off debugging compilation by commenting out "#define CSDEBUG"
@@ -159,8 +159,8 @@
 #if CSDEBUG
 static unsigned long cs_debuglevel = 1;	// levels range from 1-9
 static unsigned long cs_debugmask = CS_INIT | CS_ERROR;	// use CS_DBGOUT with various mask values
-MODULE_PARM(cs_debuglevel, "i");
-MODULE_PARM(cs_debugmask, "i");
+module_param(cs_debuglevel, ulong, 0);
+module_param(cs_debugmask, ulong, 0);
 #endif
 #define CS_TRUE 	1
 #define CS_FALSE 	0
@@ -197,7 +197,7 @@
 })
 
 //LIST_HEAD(cs4281_devs);
-struct list_head cs4281_devs = { &cs4281_devs, &cs4281_devs };
+static struct list_head cs4281_devs = { &cs4281_devs, &cs4281_devs };
 
 struct cs4281_state; 
 
@@ -1019,7 +1019,7 @@
 *  Suspend - save the ac97 regs, mute the outputs and power down the part.  
 *
 ****************************************************************************/
-void cs4281_ac97_suspend(struct cs4281_state *s)
+static void cs4281_ac97_suspend(struct cs4281_state *s)
 {
 	int Count,i;
 
@@ -1070,7 +1070,7 @@
 *  Resume - power up the part and restore its registers..  
 *
 ****************************************************************************/
-void cs4281_ac97_resume(struct cs4281_state *s)
+static void cs4281_ac97_resume(struct cs4281_state *s)
 {
 	int Count,i;
 
@@ -1143,7 +1143,7 @@
 } // SavePowerState
 */
 
-void cs4281_SuspendFIFO(struct cs4281_state *s, struct cs4281_pipeline *pl)
+static void cs4281_SuspendFIFO(struct cs4281_state *s, struct cs4281_pipeline *pl)
 {
  /*
  * We need to save the contents of the BASIC FIFO Registers.
@@ -1151,7 +1151,7 @@
 	pl->u32FCRn_Save = readl(s->pBA0 + pl->u32FCRnAddress);
 	pl->u32FSICn_Save = readl(s->pBA0 + pl->u32FSICnAddress);
 }
-void cs4281_ResumeFIFO(struct cs4281_state *s, struct cs4281_pipeline *pl)
+static void cs4281_ResumeFIFO(struct cs4281_state *s, struct cs4281_pipeline *pl)
 {
  /*
  * We need to restore the contents of the BASIC FIFO Registers.
@@ -1159,7 +1159,7 @@
 	writel(pl->u32FCRn_Save,s->pBA0 + pl->u32FCRnAddress);
 	writel(pl->u32FSICn_Save,s->pBA0 + pl->u32FSICnAddress);
 }
-void cs4281_SuspendDMAengine(struct cs4281_state *s, struct cs4281_pipeline *pl)
+static void cs4281_SuspendDMAengine(struct cs4281_state *s, struct cs4281_pipeline *pl)
 {
 	//
 	// We need to save the contents of the BASIC DMA Registers.
@@ -1171,7 +1171,7 @@
 	pl->u32DCCn_Save = readl(s->pBA0 + pl->u32DCCnAddress);
 	pl->u32DCAn_Save = readl(s->pBA0 + pl->u32DCAnAddress);
 }
-void cs4281_ResumeDMAengine(struct cs4281_state *s, struct cs4281_pipeline *pl)
+static void cs4281_ResumeDMAengine(struct cs4281_state *s, struct cs4281_pipeline *pl)
 {
 	//
 	// We need to save the contents of the BASIC DMA Registers.
@@ -1184,7 +1184,7 @@
 	writel( pl->u32DCAn_Save, s->pBA0 + pl->u32DCAnAddress);
 }
 
-int cs4281_suspend(struct cs4281_state *s)
+static int cs4281_suspend(struct cs4281_state *s)
 {
 	int i;
 	u32 u32CLKCR1;
@@ -1340,7 +1340,7 @@
 	return 0;
 }
 
-int cs4281_resume(struct cs4281_state *s)
+static int cs4281_resume(struct cs4281_state *s)
 {
 	int i;
 	unsigned temp1;
@@ -1695,7 +1695,7 @@
 #define DMABUF_MINORDER 1	// ==> min buffer size = 8K.
 
 
-void dealloc_dmabuf(struct cs4281_state *s, struct dmabuf *db)
+static void dealloc_dmabuf(struct cs4281_state *s, struct dmabuf *db)
 {
 	struct page *map, *mapend;
 
@@ -4112,7 +4112,7 @@
 
 
 #ifndef NOT_CS4281_PM
-void __devinit cs4281_BuildFIFO(
+static void __devinit cs4281_BuildFIFO(
 	struct cs4281_pipeline *p, 
 	struct cs4281_state *s)
 {
@@ -4159,7 +4159,7 @@
 
 }
 
-void __devinit cs4281_BuildDMAengine(
+static void __devinit cs4281_BuildDMAengine(
 	struct cs4281_pipeline *p, 
 	struct cs4281_state *s)
 {
@@ -4229,7 +4229,7 @@
 
 }
 
-void __devinit cs4281_InitPM(struct cs4281_state *s)
+static void __devinit cs4281_InitPM(struct cs4281_state *s)
 {
 	int i;
 	struct cs4281_pipeline *p;
@@ -4459,7 +4459,7 @@
 
 MODULE_DEVICE_TABLE(pci, cs4281_pci_tbl);
 
-struct pci_driver cs4281_pci_driver = {
+static struct pci_driver cs4281_pci_driver = {
 	.name	  = "cs4281",
 	.id_table = cs4281_pci_tbl,
 	.probe	  = cs4281_probe,
@@ -4468,7 +4468,7 @@
 	.resume	  = CS4281_RESUME_TBL,
 };
 
-int __init cs4281_init_module(void)
+static int __init cs4281_init_module(void)
 {
 	int rtn = 0;
 	CS_DBGOUT(CS_INIT | CS_FUNCTION, 2, printk(KERN_INFO 
@@ -4483,7 +4483,7 @@
 	return rtn;
 }
 
-void __exit cs4281_cleanup_module(void)
+static void __exit cs4281_cleanup_module(void)
 {
 	pci_unregister_driver(&cs4281_pci_driver);
 #ifndef NOT_CS4281_PM
@@ -4503,9 +4503,3 @@
 module_init(cs4281_init_module);
 module_exit(cs4281_cleanup_module);
 
-#ifndef MODULE
-int __init init_cs4281(void)
-{
-	return cs4281_init_module();
-}
-#endif
diff -Nru a/sound/oss/cs4281/cs4281pm-24.c b/sound/oss/cs4281/cs4281pm-24.c
--- a/sound/oss/cs4281/cs4281pm-24.c	2005-01-10 20:11:20 -08:00
+++ b/sound/oss/cs4281/cs4281pm-24.c	2005-01-10 20:11:20 -08:00
@@ -30,8 +30,8 @@
 #define cs_pm_register(a, b, c) pm_register((a), (b), (c));
 #define cs_pm_unregister_all(a) pm_unregister_all((a));
 
-int cs4281_suspend(struct cs4281_state *s);
-int cs4281_resume(struct cs4281_state *s);
+static int cs4281_suspend(struct cs4281_state *s);
+static int cs4281_resume(struct cs4281_state *s);
 /* 
 * for now (12/22/00) only enable the pm_register PM support.
 * allow these table entries to be null.
@@ -41,7 +41,7 @@
 #define CS4281_SUSPEND_TBL cs4281_suspend_null
 #define CS4281_RESUME_TBL cs4281_resume_null
 
-int cs4281_pm_callback(struct pm_dev *dev, pm_request_t rqst, void *data)
+static int cs4281_pm_callback(struct pm_dev *dev, pm_request_t rqst, void *data)
 {
 	struct cs4281_state *state;
 
diff -Nru a/sound/oss/cs46xx.c b/sound/oss/cs46xx.c
--- a/sound/oss/cs46xx.c	2005-01-10 20:11:23 -08:00
+++ b/sound/oss/cs46xx.c	2005-01-10 20:11:24 -08:00
@@ -175,24 +175,24 @@
 
 #if CSDEBUG
 static unsigned long cs_debuglevel=1;			/* levels range from 1-9 */
-MODULE_PARM(cs_debuglevel, "i");
+module_param(cs_debuglevel, ulong, 0644);
 static unsigned long cs_debugmask=CS_INIT | CS_ERROR;	/* use CS_DBGOUT with various mask values */
-MODULE_PARM(cs_debugmask, "i");
+module_param(cs_debugmask, ulong, 0644);
 #endif
 static unsigned long hercules_egpio_disable;  /* if non-zero set all EGPIO to 0 */
-MODULE_PARM(hercules_egpio_disable, "i");
+module_param(hercules_egpio_disable, ulong, 0);
 static unsigned long initdelay=700;  /* PM delay in millisecs */
-MODULE_PARM(initdelay, "i");
+module_param(initdelay, ulong, 0);
 static unsigned long powerdown=-1;  /* turn on/off powerdown processing in driver */
-MODULE_PARM(powerdown, "i");
+module_param(powerdown, ulong, 0);
 #define DMABUF_DEFAULTORDER 3
 static unsigned long defaultorder=DMABUF_DEFAULTORDER;
-MODULE_PARM(defaultorder, "i");
+module_param(defaultorder, ulong, 0);
 
 static int external_amp;
-MODULE_PARM(external_amp, "i");
+module_param(external_amp, bool, 0);
 static int thinkpad;
-MODULE_PARM(thinkpad, "i");
+module_param(thinkpad, bool, 0);
 
 /*
 * set the powerdown module parm to 0 to disable all 
@@ -219,7 +219,7 @@
 #define CS46XX_ARCH	     	"32"	//architecture key
 #endif
 
-struct list_head cs46xx_devs = { &cs46xx_devs, &cs46xx_devs };
+static struct list_head cs46xx_devs = { &cs46xx_devs, &cs46xx_devs };
 
 /* magic numbers to protect our data structures */
 #define CS_CARD_MAGIC		0x43525553 /* "CRUS" */
@@ -391,30 +391,9 @@
 static int cs46xx_suspend_tbl(struct pci_dev *pcidev, u32 state);
 static int cs46xx_resume_tbl(struct pci_dev *pcidev);
 
-static inline unsigned ld2(unsigned int x)
-{
-	unsigned r = 0;
-	
-	if (x >= 0x10000) {
-		x >>= 16;
-		r += 16;
-	}
-	if (x >= 0x100) {
-		x >>= 8;
-		r += 8;
-	}
-	if (x >= 0x10) {
-		x >>= 4;
-		r += 4;
-	}
-	if (x >= 4) {
-		x >>= 2;
-		r += 2;
-	}
-	if (x >= 2)
-		r++;
-	return r;
-}
+#ifndef CS46XX_ACPI_SUPPORT
+static int cs46xx_pm_callback(struct pm_dev *dev, pm_request_t rqst, void *data);
+#endif
 
 #if CSDEBUG
 
@@ -426,7 +405,7 @@
 #define SOUND_MIXER_CS_SETDBGMASK 	_SIOWR('M',123, int)
 #define SOUND_MIXER_CS_APM	 	_SIOWR('M',124, int)
 
-void printioctl(unsigned int x)
+static void printioctl(unsigned int x)
 {
     unsigned int i;
     unsigned char vidx;
@@ -964,7 +943,7 @@
  * "SetCaptureSPValues()" -- Initialize record task values before each
  * 	capture startup.  
  */
-void SetCaptureSPValues(struct cs_card *card)
+static void SetCaptureSPValues(struct cs_card *card)
 {
 	unsigned i, offset;
 	CS_DBGOUT(CS_FUNCTION, 8, printk("cs46xx: SetCaptureSPValues()+\n") );
@@ -3490,7 +3469,7 @@
 *  Suspend - save the ac97 regs, mute the outputs and power down the part.  
 *
 ****************************************************************************/
-void cs46xx_ac97_suspend(struct cs_card *card)
+static void cs46xx_ac97_suspend(struct cs_card *card)
 {
 	int Count,i;
 	struct ac97_codec *dev=card->ac97_codec[0];
@@ -3561,7 +3540,7 @@
 *  Resume - power up the part and restore its registers..  
 *
 ****************************************************************************/
-void cs46xx_ac97_resume(struct cs_card *card)
+static void cs46xx_ac97_resume(struct cs_card *card)
 {
 	int Count,i;
 	struct ac97_codec *dev=card->ac97_codec[0];
@@ -4149,7 +4128,6 @@
 	return 0;
 }
 
-void __exit cs46xx_cleanup_module(void);
 static int cs_ioctl_mixdev(struct inode *inode, struct file *file, unsigned int cmd,
 				unsigned long arg)
 {
@@ -5719,7 +5697,7 @@
 
 MODULE_DEVICE_TABLE(pci, cs46xx_pci_tbl);
 
-struct pci_driver cs46xx_pci_driver = {
+static struct pci_driver cs46xx_pci_driver = {
 	.name	  = "cs46xx",
 	.id_table = cs46xx_pci_tbl,
 	.probe	  = cs46xx_probe,
@@ -5728,7 +5706,7 @@
 	.resume	  = CS46XX_RESUME_TBL,
 };
 
-int __init cs46xx_init_module(void)
+static int __init cs46xx_init_module(void)
 {
 	int rtn = 0;
 	CS_DBGOUT(CS_INIT | CS_FUNCTION, 2, printk(KERN_INFO 
@@ -5746,7 +5724,7 @@
 	return rtn;
 }
 
-void __exit cs46xx_cleanup_module(void)
+static void __exit cs46xx_cleanup_module(void)
 {
 	pci_unregister_driver(&cs46xx_pci_driver);
 	cs_pm_unregister_all(cs46xx_pm_callback);
@@ -5757,7 +5735,8 @@
 module_init(cs46xx_init_module);
 module_exit(cs46xx_cleanup_module);
 
-int cs46xx_pm_callback(struct pm_dev *dev, pm_request_t rqst, void *data)
+#ifndef CS46XX_ACPI_SUPPORT
+static int cs46xx_pm_callback(struct pm_dev *dev, pm_request_t rqst, void *data)
 {
 	struct cs_card *card;
 
@@ -5792,6 +5771,7 @@
 
 	return 0;
 }
+#endif
 
 #if CS46XX_ACPI_SUPPORT
 static int cs46xx_suspend_tbl(struct pci_dev *pcidev, u32 state)
diff -Nru a/sound/oss/cs46xx_wrapper-24.h b/sound/oss/cs46xx_wrapper-24.h
--- a/sound/oss/cs46xx_wrapper-24.h	2005-01-10 20:11:20 -08:00
+++ b/sound/oss/cs46xx_wrapper-24.h	2005-01-10 20:11:20 -08:00
@@ -30,7 +30,7 @@
 
 #define CS_OWNER .owner =
 #define CS_THIS_MODULE THIS_MODULE,
-void cs46xx_null(struct pci_dev *pcidev) { return; }
+static inline void cs46xx_null(struct pci_dev *pcidev) { return; }
 #define cs4x_mem_map_reserve(page) SetPageReserved(page)
 #define cs4x_mem_map_unreserve(page) ClearPageReserved(page)
 
diff -Nru a/sound/oss/cs46xxpm-24.h b/sound/oss/cs46xxpm-24.h
--- a/sound/oss/cs46xxpm-24.h	2005-01-10 20:11:22 -08:00
+++ b/sound/oss/cs46xxpm-24.h	2005-01-10 20:11:22 -08:00
@@ -48,6 +48,5 @@
 #define CS46XX_SUSPEND_TBL cs46xx_null
 #define CS46XX_RESUME_TBL cs46xx_null
 #endif
-int cs46xx_pm_callback(struct pm_dev *dev, pm_request_t rqst, void *data);
 
 #endif
diff -Nru a/sound/oss/emu10k1/audio.c b/sound/oss/emu10k1/audio.c
--- a/sound/oss/emu10k1/audio.c	2005-01-10 20:11:16 -08:00
+++ b/sound/oss/emu10k1/audio.c	2005-01-10 20:11:16 -08:00
@@ -49,6 +49,9 @@
 static void calculate_ofrag(struct woinst *);
 static void calculate_ifrag(struct wiinst *);
 
+static void emu10k1_waveout_bh(unsigned long refdata);
+static void emu10k1_wavein_bh(unsigned long refdata);
+
 /* Audio file operations */
 static ssize_t emu10k1_audio_read(struct file *file, char __user *buffer, size_t count, loff_t * ppos)
 {
@@ -1032,7 +1035,7 @@
 	return dmapage;
 }
 
-struct vm_operations_struct emu10k1_mm_ops = {
+static struct vm_operations_struct emu10k1_mm_ops = {
 	.nopage         = emu10k1_mm_nopage,
 };
 
@@ -1191,7 +1194,7 @@
 		wiinst->mmapped = 0;
 		wiinst->total_recorded = 0;
 		wiinst->blocks = 0;
-		wiinst->lock = SPIN_LOCK_UNLOCKED;
+		spin_lock_init(&wiinst->lock);
 		tasklet_init(&wiinst->timer.tasklet, emu10k1_wavein_bh, (unsigned long) wave_dev);
 		wave_dev->wiinst = wiinst;
 		emu10k1_wavein_setformat(wave_dev, &wiinst->format);
@@ -1235,7 +1238,7 @@
 		woinst->total_copied = 0;
 		woinst->total_played = 0;
 		woinst->blocks = 0;
-		woinst->lock = SPIN_LOCK_UNLOCKED;
+		spin_lock_init(&woinst->lock);
 		tasklet_init(&woinst->timer.tasklet, emu10k1_waveout_bh, (unsigned long) wave_dev);
 		wave_dev->woinst = woinst;
 		emu10k1_waveout_setformat(wave_dev, &woinst->format);
@@ -1506,7 +1509,7 @@
 	return;
 }
 
-void emu10k1_wavein_bh(unsigned long refdata)
+static void emu10k1_wavein_bh(unsigned long refdata)
 {
 	struct emu10k1_wavedevice *wave_dev = (struct emu10k1_wavedevice *) refdata;
 	struct wiinst *wiinst = wave_dev->wiinst;
@@ -1537,7 +1540,7 @@
 	return;
 }
 
-void emu10k1_waveout_bh(unsigned long refdata)
+static void emu10k1_waveout_bh(unsigned long refdata)
 {
 	struct emu10k1_wavedevice *wave_dev = (struct emu10k1_wavedevice *) refdata;
 	struct woinst *woinst = wave_dev->woinst;
diff -Nru a/sound/oss/emu10k1/audio.h b/sound/oss/emu10k1/audio.h
--- a/sound/oss/emu10k1/audio.h	2005-01-10 20:11:22 -08:00
+++ b/sound/oss/emu10k1/audio.h	2005-01-10 20:11:22 -08:00
@@ -41,7 +41,4 @@
         u16 enablebits;
 };
 
-void emu10k1_waveout_bh(unsigned long);
-void emu10k1_wavein_bh(unsigned long);
-
 #endif /* _AUDIO_H */
diff -Nru a/sound/oss/emu10k1/cardmi.c b/sound/oss/emu10k1/cardmi.c
--- a/sound/oss/emu10k1/cardmi.c	2005-01-10 20:11:19 -08:00
+++ b/sound/oss/emu10k1/cardmi.c	2005-01-10 20:11:19 -08:00
@@ -38,6 +38,26 @@
 #include "cardmi.h"
 #include "irqmgr.h"
 
+
+static int emu10k1_mpuin_callback(struct emu10k1_mpuin *card_mpuin, u32 msg, unsigned long data, u32 bytesvalid);
+
+static int sblive_miStateInit(struct emu10k1_mpuin *);
+static int sblive_miStateEntry(struct emu10k1_mpuin *, u8);
+static int sblive_miStateParse(struct emu10k1_mpuin *, u8);
+static int sblive_miState3Byte(struct emu10k1_mpuin *, u8);
+static int sblive_miState3ByteKey(struct emu10k1_mpuin *, u8);
+static int sblive_miState3ByteVel(struct emu10k1_mpuin *, u8);
+static int sblive_miState2Byte(struct emu10k1_mpuin *, u8);
+static int sblive_miState2ByteKey(struct emu10k1_mpuin *, u8);
+static int sblive_miStateSysCommon2(struct emu10k1_mpuin *, u8);
+static int sblive_miStateSysCommon2Key(struct emu10k1_mpuin *, u8);
+static int sblive_miStateSysCommon3(struct emu10k1_mpuin *, u8);
+static int sblive_miStateSysCommon3Key(struct emu10k1_mpuin *, u8);
+static int sblive_miStateSysCommon3Vel(struct emu10k1_mpuin *, u8);
+static int sblive_miStateSysExNorm(struct emu10k1_mpuin *, u8);
+static int sblive_miStateSysReal(struct emu10k1_mpuin *, u8);
+
+
 static struct {
 	int (*Fn) (struct emu10k1_mpuin *, u8);
 } midistatefn[] = {
@@ -69,6 +89,7 @@
 	sblive_miStateSysReal}	/* 0xF4 - 0xF6 ,0xF8 - 0xFF     */
 };
 
+
 /* Installs the IRQ handler for the MPU in port                 */
 
 /* and initialize parameters                                    */
@@ -269,7 +290,7 @@
 /* Passes the message with the data back to the client          */
 
 /* via IRQ & DPC callbacks to Ring 3                            */
-int emu10k1_mpuin_callback(struct emu10k1_mpuin *card_mpuin, u32 msg, unsigned long data, u32 bytesvalid)
+static int emu10k1_mpuin_callback(struct emu10k1_mpuin *card_mpuin, u32 msg, unsigned long data, u32 bytesvalid)
 {
 	unsigned long timein;
 	struct midi_queue *midiq;
@@ -374,7 +395,7 @@
 /*****************************************************************************/
 
 /* FIXME: This should be a macro */
-int sblive_miStateInit(struct emu10k1_mpuin *card_mpuin)
+static int sblive_miStateInit(struct emu10k1_mpuin *card_mpuin)
 {
 	card_mpuin->status = 0;	/* For MIDI running status */
 	card_mpuin->fstatus = 0;	/* For 0xFn status only */
@@ -388,12 +409,12 @@
 }
 
 /* FIXME: This should be a macro */
-int sblive_miStateEntry(struct emu10k1_mpuin *card_mpuin, u8 data)
+static int sblive_miStateEntry(struct emu10k1_mpuin *card_mpuin, u8 data)
 {
 	return midistatefn[card_mpuin->curstate].Fn(card_mpuin, data);
 }
 
-int sblive_miStateParse(struct emu10k1_mpuin *card_mpuin, u8 data)
+static int sblive_miStateParse(struct emu10k1_mpuin *card_mpuin, u8 data)
 {
 	switch (data & 0xf0) {
 	case 0x80:
@@ -457,7 +478,7 @@
 	return midistatefn[card_mpuin->curstate].Fn(card_mpuin, data);
 }
 
-int sblive_miState3Byte(struct emu10k1_mpuin *card_mpuin, u8 data)
+static int sblive_miState3Byte(struct emu10k1_mpuin *card_mpuin, u8 data)
 {
 	u8 temp = data & 0xf0;
 
@@ -473,8 +494,7 @@
 	return midistatefn[STIN_PARSE].Fn(card_mpuin, data);
 }
 
-int sblive_miState3ByteKey(struct emu10k1_mpuin *card_mpuin, u8 data)
-
+static int sblive_miState3ByteKey(struct emu10k1_mpuin *card_mpuin, u8 data)
 /* byte 1 */
 {
 	unsigned long tmp;
@@ -502,8 +522,7 @@
 	return CTSTATUS_NEXT_BYTE;
 }
 
-int sblive_miState3ByteVel(struct emu10k1_mpuin *card_mpuin, u8 data)
-
+static int sblive_miState3ByteVel(struct emu10k1_mpuin *card_mpuin, u8 data)
 /* byte 2 */
 {
 	unsigned long tmp;
@@ -539,7 +558,7 @@
 	return 0;
 }
 
-int sblive_miState2Byte(struct emu10k1_mpuin *card_mpuin, u8 data)
+static int sblive_miState2Byte(struct emu10k1_mpuin *card_mpuin, u8 data)
 {
 	u8 temp = data & 0xf0;
 
@@ -556,8 +575,7 @@
 	return midistatefn[STIN_PARSE].Fn(card_mpuin, data);
 }
 
-int sblive_miState2ByteKey(struct emu10k1_mpuin *card_mpuin, u8 data)
-
+static int sblive_miState2ByteKey(struct emu10k1_mpuin *card_mpuin, u8 data)
 /* byte 1 */
 {
 	unsigned long tmp;
@@ -590,7 +608,7 @@
 	return 0;
 }
 
-int sblive_miStateSysCommon2(struct emu10k1_mpuin *card_mpuin, u8 data)
+static int sblive_miStateSysCommon2(struct emu10k1_mpuin *card_mpuin, u8 data)
 {
 	card_mpuin->fstatus = data;
 	card_mpuin->curstate = STIN_SYS_COMMON_2_KEY;
@@ -598,8 +616,7 @@
 	return CTSTATUS_NEXT_BYTE;
 }
 
-int sblive_miStateSysCommon2Key(struct emu10k1_mpuin *card_mpuin, u8 data)
-
+static int sblive_miStateSysCommon2Key(struct emu10k1_mpuin *card_mpuin, u8 data)
 /* byte 1 */
 {
 	unsigned long tmp;
@@ -632,7 +649,7 @@
 	return 0;
 }
 
-int sblive_miStateSysCommon3(struct emu10k1_mpuin *card_mpuin, u8 data)
+static int sblive_miStateSysCommon3(struct emu10k1_mpuin *card_mpuin, u8 data)
 {
 	card_mpuin->fstatus = data;
 	card_mpuin->curstate = STIN_SYS_COMMON_3_KEY;
@@ -640,8 +657,7 @@
 	return CTSTATUS_NEXT_BYTE;
 }
 
-int sblive_miStateSysCommon3Key(struct emu10k1_mpuin *card_mpuin, u8 data)
-
+static int sblive_miStateSysCommon3Key(struct emu10k1_mpuin *card_mpuin, u8 data)
 /* byte 1 */
 {
 	unsigned long tmp;
@@ -670,8 +686,7 @@
 	return CTSTATUS_NEXT_BYTE;
 }
 
-int sblive_miStateSysCommon3Vel(struct emu10k1_mpuin *card_mpuin, u8 data)
-
+static int sblive_miStateSysCommon3Vel(struct emu10k1_mpuin *card_mpuin, u8 data)
 /* byte 2 */
 {
 	unsigned long tmp;
@@ -708,7 +723,7 @@
 	return 0;
 }
 
-int sblive_miStateSysExNorm(struct emu10k1_mpuin *card_mpuin, u8 data)
+static int sblive_miStateSysExNorm(struct emu10k1_mpuin *card_mpuin, u8 data)
 {
 	unsigned long flags;
 
@@ -809,7 +824,7 @@
 	return CTSTATUS_NEXT_BYTE;
 }
 
-int sblive_miStateSysReal(struct emu10k1_mpuin *card_mpuin, u8 data)
+static int sblive_miStateSysReal(struct emu10k1_mpuin *card_mpuin, u8 data)
 {
 	emu10k1_mpuin_callback(card_mpuin, ICARDMIDI_INDATA, data, 1);
 
diff -Nru a/sound/oss/emu10k1/cardmi.h b/sound/oss/emu10k1/cardmi.h
--- a/sound/oss/emu10k1/cardmi.h	2005-01-10 20:11:22 -08:00
+++ b/sound/oss/emu10k1/cardmi.h	2005-01-10 20:11:22 -08:00
@@ -91,24 +91,7 @@
 int emu10k1_mpuin_stop(struct emu10k1_card *);
 int emu10k1_mpuin_reset(struct emu10k1_card *);
 
-int sblive_miStateInit(struct emu10k1_mpuin *);
-int sblive_miStateEntry(struct emu10k1_mpuin *, u8);
-int sblive_miStateParse(struct emu10k1_mpuin *, u8);
-int sblive_miState3Byte(struct emu10k1_mpuin *, u8);
-int sblive_miState3ByteKey(struct emu10k1_mpuin *, u8);
-int sblive_miState3ByteVel(struct emu10k1_mpuin *, u8);
-int sblive_miState2Byte(struct emu10k1_mpuin *, u8);
-int sblive_miState2ByteKey(struct emu10k1_mpuin *, u8);
-int sblive_miStateSysCommon2(struct emu10k1_mpuin *, u8);
-int sblive_miStateSysCommon2Key(struct emu10k1_mpuin *, u8);
-int sblive_miStateSysCommon3(struct emu10k1_mpuin *, u8);
-int sblive_miStateSysCommon3Key(struct emu10k1_mpuin *, u8);
-int sblive_miStateSysCommon3Vel(struct emu10k1_mpuin *, u8);
-int sblive_miStateSysExNorm(struct emu10k1_mpuin *, u8);
-int sblive_miStateSysReal(struct emu10k1_mpuin *, u8);
-
 int emu10k1_mpuin_irqhandler(struct emu10k1_card *);
 void emu10k1_mpuin_bh(unsigned long);
-int emu10k1_mpuin_callback(struct emu10k1_mpuin *card_mpuin, u32 msg, unsigned long data, u32 bytesvalid);
 
 #endif  /* _CARDMI_H */
diff -Nru a/sound/oss/emu10k1/cardwi.c b/sound/oss/emu10k1/cardwi.c
--- a/sound/oss/emu10k1/cardwi.c	2005-01-10 20:11:20 -08:00
+++ b/sound/oss/emu10k1/cardwi.c	2005-01-10 20:11:20 -08:00
@@ -42,7 +42,7 @@
  * This function will return a valid sound format as close
  * to the requested one as possible. 
  */
-void query_format(int recsrc, struct wave_format *wave_fmt)
+static void query_format(int recsrc, struct wave_format *wave_fmt)
 {
 
 	switch (recsrc) {
diff -Nru a/sound/oss/emu10k1/efxmgr.c b/sound/oss/emu10k1/efxmgr.c
--- a/sound/oss/emu10k1/efxmgr.c	2005-01-10 20:11:16 -08:00
+++ b/sound/oss/emu10k1/efxmgr.c	2005-01-10 20:11:16 -08:00
@@ -101,8 +101,8 @@
 #define VOLCTRL_STEP_SIZE        5
 
 //An internal function for setting OSS mixer controls.
-void emu10k1_set_oss_vol(struct emu10k1_card *card, int oss_mixer,
-			 unsigned int left, unsigned int right)
+static void emu10k1_set_oss_vol(struct emu10k1_card *card, int oss_mixer,
+				unsigned int left, unsigned int right)
 {
 	extern char volume_params[SOUND_MIXER_NRDEVICES];
 
diff -Nru a/sound/oss/emu10k1/hwaccess.c b/sound/oss/emu10k1/hwaccess.c
--- a/sound/oss/emu10k1/hwaccess.c	2005-01-10 20:11:17 -08:00
+++ b/sound/oss/emu10k1/hwaccess.c	2005-01-10 20:11:17 -08:00
@@ -105,31 +105,6 @@
 	return 0;		/* Should never reach this point */
 }
 
-/* Returns an attenuation based upon a cumulative volume value */
-
-/* Algorithm calculates 0x200 - 0x10 log2 (input) */
-u8 sumVolumeToAttenuation(u32 value)
-{
-	u16 count = 16;
-	s16 ans;
-
-	if (value == 0)
-		return 0xFF;
-
-	/* Find first SET bit. This is the integer part of the value */
-	while ((value & 0x10000) == 0) {
-		value <<= 1;
-		count--;
-	}
-
-	/* The REST of the data is the fractional part. */
-	ans = (s16) (0x110 - ((count << 4) + ((value & 0x0FFFFL) >> 12)));
-	if (ans > 0xFF)
-		ans = 0xFF;
-
-	return (u8) ans;
-}
-
 /*******************************************
 * write/read PCI function 0 registers      *
 ********************************************/
@@ -160,6 +135,7 @@
 	return;
 }
 
+#ifdef DBGEMU
 void emu10k1_writefn0_2(struct emu10k1_card *card, u32 reg, u32 data, int size)
 {
 	unsigned long flags;
@@ -177,6 +153,7 @@
 
 	return;
 }
+#endif  /*  DBGEMU  */
 
 u32 emu10k1_readfn0(struct emu10k1_card * card, u32 reg)
 {
@@ -338,17 +315,6 @@
         outl(val, card->iobase + INTE);
         spin_unlock_irqrestore(&card->lock, flags);
         return;
-}
-
-void emu10k1_set_stop_on_loop(struct emu10k1_card *card, u32 voicenum)
-{
-	/* Voice interrupt */
-	if (voicenum >= 32)
-		sblive_writeptr(card, SOLEH | ((0x0100 | (voicenum - 32)) << 16), 0, 1);
-	else
-		sblive_writeptr(card, SOLEL | ((0x0100 | voicenum) << 16), 0, 1);
-
-	return;
 }
 
 void emu10k1_clear_stop_on_loop(struct emu10k1_card *card, u32 voicenum)
diff -Nru a/sound/oss/emu10k1/hwaccess.h b/sound/oss/emu10k1/hwaccess.h
--- a/sound/oss/emu10k1/hwaccess.h	2005-01-10 20:11:24 -08:00
+++ b/sound/oss/emu10k1/hwaccess.h	2005-01-10 20:11:24 -08:00
@@ -212,7 +212,6 @@
 #define TIMEOUT 		    16384
 
 u32 srToPitch(u32);
-u8 sumVolumeToAttenuation(u32);
 
 extern struct list_head emu10k1_devs;
 
@@ -232,7 +231,6 @@
 
 void emu10k1_irq_enable(struct emu10k1_card *, u32);
 void emu10k1_irq_disable(struct emu10k1_card *, u32);
-void emu10k1_set_stop_on_loop(struct emu10k1_card *, u32);
 void emu10k1_clear_stop_on_loop(struct emu10k1_card *, u32);
 
 /* AC97 Codec register access function */
diff -Nru a/sound/oss/emu10k1/main.c b/sound/oss/emu10k1/main.c
--- a/sound/oss/emu10k1/main.c	2005-01-10 20:11:23 -08:00
+++ b/sound/oss/emu10k1/main.c	2005-01-10 20:11:23 -08:00
@@ -309,8 +309,8 @@
 	unregister_sound_dsp(card->audio_dev);
 }
 
-int emu10k1_info_proc (char *page, char **start, off_t off,
-		    int count, int *eof, void *data)
+static int emu10k1_info_proc (char *page, char **start, off_t off,
+			      int count, int *eof, void *data)
 {
 	struct emu10k1_card *card = data;
 	int len = 0;
@@ -524,7 +524,7 @@
 {
 	INIT_LIST_HEAD(&card->timers);
 	card->timer_delay = TIMER_STOPPED;
-	card->timer_lock = SPIN_LOCK_UNLOCKED;
+	spin_lock_init(&card->timer_lock);
 }
 
 static void __devinit addxmgr_init(struct emu10k1_card *card)
@@ -873,7 +873,7 @@
 		sblive_writeptr(card, DBG, 0, 0);
 	}
 
-	mgr->lock = SPIN_LOCK_UNLOCKED;
+	spin_lock_init(&mgr->lock);
 
 	// Set up Volume controls, try to keep this the same for both Audigy and Live
 
diff -Nru a/sound/oss/emu10k1/voicemgr.c b/sound/oss/emu10k1/voicemgr.c
--- a/sound/oss/emu10k1/voicemgr.c	2005-01-10 20:11:24 -08:00
+++ b/sound/oss/emu10k1/voicemgr.c	2005-01-10 20:11:24 -08:00
@@ -39,7 +39,8 @@
 #define PITCH_67882 0x00005a82
 #define PITCH_57081 0x00004c1c
 
-u32 emu10k1_select_interprom(struct emu10k1_card *card, struct emu_voice *voice)
+static u32 emu10k1_select_interprom(struct emu10k1_card *card,
+				    struct emu_voice *voice)
 {
 	if(voice->pitch_target==PITCH_48000)
 		return CCCA_INTERPROM_0;
diff -Nru a/sound/oss/es1370.c b/sound/oss/es1370.c
--- a/sound/oss/es1370.c	2005-01-10 20:11:23 -08:00
+++ b/sound/oss/es1370.c	2005-01-10 20:11:23 -08:00
@@ -2525,9 +2525,9 @@
 
 static unsigned int devindex;
 
-MODULE_PARM(lineout, "1-" __MODULE_STRING(NR_DEVICE) "i");
+module_param_array(lineout, bool, NULL, 0);
 MODULE_PARM_DESC(lineout, "if 1 the LINE input is converted to LINE out");
-MODULE_PARM(micbias, "1-" __MODULE_STRING(NR_DEVICE) "i");
+module_param_array(micbias, bool, NULL, 0);
 MODULE_PARM_DESC(micbias, "sets the +5V bias for an electret microphone");
 
 MODULE_AUTHOR("Thomas M. Sailer, sailer@ife.ee.ethz.ch, hb9jnx@hb9w.che.eu");
diff -Nru a/sound/oss/es1371.c b/sound/oss/es1371.c
--- a/sound/oss/es1371.c	2005-01-10 20:11:21 -08:00
+++ b/sound/oss/es1371.c	2005-01-10 20:11:21 -08:00
@@ -2741,11 +2741,11 @@
 
 static unsigned int devindex;
 
-MODULE_PARM(spdif, "1-" __MODULE_STRING(NR_DEVICE) "i");
+module_param_array(spdif, bool, NULL, 0);
 MODULE_PARM_DESC(spdif, "if 1 the output is in S/PDIF digital mode");
-MODULE_PARM(nomix, "1-" __MODULE_STRING(NR_DEVICE) "i");
+module_param_array(nomix, bool, NULL, 0);
 MODULE_PARM_DESC(nomix, "if 1 no analog audio is mixed to the digital output");
-MODULE_PARM(amplifier, "1-" __MODULE_STRING(NR_DEVICE) "i");
+module_param_array(amplifier, bool, NULL, 0);
 MODULE_PARM_DESC(amplifier, "Set to 1 if the machine needs the amp control enabling (many laptops)");
 
 MODULE_AUTHOR("Thomas M. Sailer, sailer@ife.ee.ethz.ch, hb9jnx@hb9w.che.eu");
diff -Nru a/sound/oss/forte.c b/sound/oss/forte.c
--- a/sound/oss/forte.c	2005-01-10 20:11:18 -08:00
+++ b/sound/oss/forte.c	2005-01-10 20:11:18 -08:00
@@ -238,7 +238,7 @@
  * @reg:	register to read
  */
 
-u16
+static u16
 forte_ac97_read (struct ac97_codec *codec, u8 reg)
 {
 	u16 ret = 0;
@@ -283,7 +283,7 @@
  * @val:	value to write
  */
 
-void
+static void
 forte_ac97_write (struct ac97_codec *codec, u8 reg, u16 val)
 {
 	struct forte_chip *chip = codec->private_data;
diff -Nru a/sound/oss/gus_card.c b/sound/oss/gus_card.c
--- a/sound/oss/gus_card.c	2005-01-10 20:11:15 -08:00
+++ b/sound/oss/gus_card.c	2005-01-10 20:11:15 -08:00
@@ -218,17 +218,17 @@
 static int __initdata dma16 = -1;	/* Set this for modules that need it */
 static int __initdata type = 0;		/* 1 for PnP */
 
-MODULE_PARM(io, "i");
-MODULE_PARM(irq, "i");
-MODULE_PARM(dma, "i");
-MODULE_PARM(dma16, "i");
-MODULE_PARM(type, "i");
+module_param(io, int, 0);
+module_param(irq, int, 0);
+module_param(dma, int, 0);
+module_param(dma16, int, 0);
+module_param(type, int, 0);
 #ifdef CONFIG_SOUND_GUSMAX
-MODULE_PARM(no_wave_dma, "i");
+module_param(no_wave_dma, int, 0);
 #endif
 #ifdef CONFIG_SOUND_GUS16
-MODULE_PARM(db16, "i");
-MODULE_PARM(gus16, "i");
+module_param(db16, int, 0);
+module_param(gus16, int, 0);
 #endif
 MODULE_LICENSE("GPL");
 
diff -Nru a/sound/oss/gus_wave.c b/sound/oss/gus_wave.c
--- a/sound/oss/gus_wave.c	2005-01-10 20:11:24 -08:00
+++ b/sound/oss/gus_wave.c	2005-01-10 20:11:24 -08:00
@@ -94,7 +94,7 @@
 static int      only_read_access;
 static int      only_8_bits;
 
-int             iw_mode = 0;
+static int      iw_mode = 0;
 int             gus_wave_volume = 60;
 int             gus_pcm_volume = 80;
 int             have_gus_max = 0;
diff -Nru a/sound/oss/i810_audio.c b/sound/oss/i810_audio.c
--- a/sound/oss/i810_audio.c	2005-01-10 20:11:21 -08:00
+++ b/sound/oss/i810_audio.c	2005-01-10 20:11:21 -08:00
@@ -111,6 +111,7 @@
 static int strict_clocking;
 static unsigned int clocking;
 static int spdif_locked;
+static int ac97_quirk = AC97_TUNE_DEFAULT;
 
 //#define DEBUG
 //#define DEBUG2
@@ -481,6 +482,124 @@
 #define CIV_TO_LVI(card, port, off) \
 	I810_IOWRITEB(MODULOP2(GET_CIV((card), (port)) + (off), SG_LEN), (card), (port) + OFF_LVI)
 
+static struct ac97_quirk ac97_quirks[] __devinitdata = {
+	{
+		.vendor = 0x0e11,
+		.device = 0x00b8,
+		.name = "Compaq Evo D510C",
+		.type = AC97_TUNE_HP_ONLY
+	},
+	{
+		.vendor = 0x1028,
+		.device = 0x00d8,
+		.name = "Dell Precision 530",   /* AD1885 */
+		.type = AC97_TUNE_HP_ONLY
+	},
+	{
+		.vendor = 0x1028,
+		.device = 0x0126,
+		.name = "Dell Optiplex GX260",  /* AD1981A */
+		.type = AC97_TUNE_HP_ONLY
+	},
+	{
+		.vendor = 0x1028,
+		.device = 0x012d,
+		.name = "Dell Precision 450",   /* AD1981B*/
+		.type = AC97_TUNE_HP_ONLY
+	},
+	{       /* FIXME: which codec? */
+		.vendor = 0x103c,
+		.device = 0x00c3,
+		.name = "Hewlett-Packard onboard",
+		.type = AC97_TUNE_HP_ONLY
+	},
+	{
+		.vendor = 0x103c,
+		.device = 0x12f1,
+		.name = "HP xw8200",    /* AD1981B*/
+		.type = AC97_TUNE_HP_ONLY
+	},
+	{
+		.vendor = 0x103c,
+		.device = 0x3008,
+		.name = "HP xw4200",    /* AD1981B*/
+		.type = AC97_TUNE_HP_ONLY
+	},
+	{
+		.vendor = 0x10f1,
+		.device = 0x2665,
+		.name = "Fujitsu-Siemens Celsius",      /* AD1981? */
+		.type = AC97_TUNE_HP_ONLY
+	},
+	{
+		.vendor = 0x10f1,
+		.device = 0x2885,
+		.name = "AMD64 Mobo",   /* ALC650 */
+		.type = AC97_TUNE_HP_ONLY
+	},
+	{
+		.vendor = 0x110a,
+		.device = 0x0056,
+		.name = "Fujitsu-Siemens Scenic",       /* AD1981? */
+		.type = AC97_TUNE_HP_ONLY
+	},
+	{
+		.vendor = 0x11d4,
+		.device = 0x5375,
+		.name = "ADI AD1985 (discrete)",
+		.type = AC97_TUNE_HP_ONLY
+	},
+	{
+		.vendor = 0x1462,
+		.device = 0x5470,
+		.name = "MSI P4 ATX 645 Ultra",
+		.type = AC97_TUNE_HP_ONLY
+	},
+	{
+		.vendor = 0x1734,
+		.device = 0x0088,
+		.name = "Fujitsu-Siemens D1522",	/* AD1981 */
+		.type = AC97_TUNE_HP_ONLY
+	},
+	{
+		.vendor = 0x8086,
+		.device = 0x4856,
+		.name = "Intel D845WN (82801BA)",
+		.type = AC97_TUNE_SWAP_HP
+	},
+	{
+		.vendor = 0x8086,
+		.device = 0x4d44,
+		.name = "Intel D850EMV2",       /* AD1885 */
+		.type = AC97_TUNE_HP_ONLY
+	},
+	{
+		.vendor = 0x8086,
+		.device = 0x4d56,
+		.name = "Intel ICH/AD1885",
+		.type = AC97_TUNE_HP_ONLY
+	},
+	{
+		.vendor = 0x1028,
+		.device = 0x012d,
+		.name = "Dell Precision 450",   /* AD1981B*/
+		.type = AC97_TUNE_HP_ONLY
+	},
+	{
+		.vendor = 0x103c,
+		.device = 0x3008,
+		.name = "HP xw4200",    /* AD1981B*/
+		.type = AC97_TUNE_HP_ONLY
+	},
+	{
+		.vendor = 0x103c,
+		.device = 0x12f1,
+		.name = "HP xw8200",    /* AD1981B*/
+		.type = AC97_TUNE_HP_ONLY
+	},
+	{ } /* terminator */
+};
+
 static struct i810_card *devs = NULL;
 
 static int i810_open_mixdev(struct inode *inode, struct file *file);
@@ -3043,6 +3162,9 @@
 		card->ac97_codec[num_ac97] = codec;
 	}
 
+	/* tune up the primary codec */
+	ac97_tune_hardware(card->pci_dev, ac97_quirks, ac97_quirk);
+
 	/* pick the minimum of channels supported by ICHx or codec(s) */
 	card->channels = (card->channels > total_channels)?total_channels:card->channels;
 
@@ -3460,15 +3582,15 @@
 }	
 #endif /* CONFIG_PM */
 
-MODULE_AUTHOR("");
+MODULE_AUTHOR("The Linux kernel team");
 MODULE_DESCRIPTION("Intel 810 audio support");
 MODULE_LICENSE("GPL");
-MODULE_PARM(ftsodell, "i");
-MODULE_PARM(clocking, "i");
-MODULE_PARM(strict_clocking, "i");
-MODULE_PARM(spdif_locked, "i");
+module_param(ftsodell, int, 0444);
+module_param(clocking, uint, 0444);
+module_param(strict_clocking, int, 0444);
+module_param(spdif_locked, int, 0444);
 
-#define I810_MODULE_NAME "intel810_audio"
+#define I810_MODULE_NAME "i810_audio"
 
 static struct pci_driver i810_pci_driver = {
 	.name		= I810_MODULE_NAME,
diff -Nru a/sound/oss/mad16.c b/sound/oss/mad16.c
--- a/sound/oss/mad16.c	2005-01-10 20:11:21 -08:00
+++ b/sound/oss/mad16.c	2005-01-10 20:11:21 -08:00
@@ -874,19 +874,19 @@
 static int __initdata opl4 = 0;
 static int __initdata joystick = 0;
 
-MODULE_PARM(mpu_io, "i");
-MODULE_PARM(mpu_irq, "i");
-MODULE_PARM(io,"i");
-MODULE_PARM(dma,"i");
-MODULE_PARM(dma16,"i");
-MODULE_PARM(irq,"i");
-MODULE_PARM(cdtype,"i");
-MODULE_PARM(cdirq,"i");
-MODULE_PARM(cdport,"i");
-MODULE_PARM(cddma,"i");
-MODULE_PARM(opl4,"i");
-MODULE_PARM(joystick,"i");
-MODULE_PARM(debug,"i");
+module_param(mpu_io, int, 0);
+module_param(mpu_irq, int, 0);
+module_param(io, int, 0);
+module_param(dma, int, 0);
+module_param(dma16, int, 0);
+module_param(irq, int, 0);
+module_param(cdtype, int, 0);
+module_param(cdirq, int, 0);
+module_param(cdport, int, 0);
+module_param(cddma, int, 0);
+module_param(opl4, int, 0);
+module_param(joystick, bool, 0);
+module_param(debug, bool, 0644);
 
 static int __initdata dma_map[2][8] =
 {
diff -Nru a/sound/oss/maestro.c b/sound/oss/maestro.c
--- a/sound/oss/maestro.c	2005-01-10 20:11:22 -08:00
+++ b/sound/oss/maestro.c	2005-01-10 20:11:22 -08:00
@@ -262,11 +262,11 @@
 MODULE_LICENSE("GPL");
 
 #ifdef M_DEBUG
-MODULE_PARM(debug,"i");
+module_param(debug, bool, 0644);
 #endif
-MODULE_PARM(dsps_order,"i");
-MODULE_PARM(use_pm,"i");
-MODULE_PARM(clocking, "i");
+module_param(dsps_order, int, 0);
+module_param(use_pm, int, 0);
+module_param(clocking, int, 0);
 
 /* --------------------------------------------------------------------- */
 #define DRIVER_VERSION "0.15"
@@ -344,7 +344,7 @@
 
 /* these masks indicate which units we care about at
 	which states */
-u16 acpi_state_mask[] = {
+static u16 acpi_state_mask[] = {
 	[ACPI_D0] = ACPI_ALL,
 	[ACPI_D1] = ACPI_SLEEP,
 	[ACPI_D2] = ACPI_SLEEP,
@@ -610,7 +610,7 @@
 	be sure to fill it in if you add oss mixers
 	to anyone's supported mixer defines */
 
- unsigned int mixer_defaults[SOUND_MIXER_NRDEVICES] = {
+static unsigned int mixer_defaults[SOUND_MIXER_NRDEVICES] = {
 	[SOUND_MIXER_VOLUME] =          0x3232,
 	[SOUND_MIXER_BASS] =            0x3232,
 	[SOUND_MIXER_TREBLE] =          0x3232,
@@ -3363,7 +3363,7 @@
 /* this guy tries to find the pci power management
  * register bank.  this should really be in core
  * code somewhere.  1 on success. */
-int
+static int
 parse_power(struct ess_card *card, struct pci_dev *pcidev)
 {
 	u32 n;
@@ -3629,7 +3629,7 @@
 	.remove	  = maestro_remove,
 };
 
-int __init init_maestro(void)
+static int __init init_maestro(void)
 {
 	int rc;
 
@@ -3666,7 +3666,7 @@
 /* --------------------------------------------------------------------- */
 
 
-void cleanup_maestro(void) {
+static void cleanup_maestro(void) {
 	M_printk("maestro: unloading\n");
 	pci_unregister_driver(&maestro_pci_driver);
 	pm_unregister_all(maestro_pm_callback);
diff -Nru a/sound/oss/maestro3.c b/sound/oss/maestro3.c
--- a/sound/oss/maestro3.c	2005-01-10 20:11:22 -08:00
+++ b/sound/oss/maestro3.c	2005-01-10 20:11:22 -08:00
@@ -378,7 +378,7 @@
 static int m3_suspend(struct pci_dev *pci_dev, u32 state);
 static void check_suspend(struct m3_card *card);
 
-struct notifier_block m3_reboot_nb = {
+static struct notifier_block m3_reboot_nb = {
 	.notifier_call = m3_notifier,
 };
 
@@ -1024,8 +1024,8 @@
     DPRINTK(DPINT,"set_dmac??\n");
 }
 
-u32 get_dma_pos(struct m3_card *card,
-        int instance_addr)
+static u32 get_dma_pos(struct m3_card *card,
+		       int instance_addr)
 {
     u16 hi = 0, lo = 0;
     int retry = 10;
@@ -1047,7 +1047,7 @@
     return lo | (hi<<16);
 }
 
-u32 get_dmaa(struct m3_state *s)
+static u32 get_dmaa(struct m3_state *s)
 {
     u32 offset;
 
@@ -1059,7 +1059,7 @@
     return offset;
 }
 
-u32 get_dmac(struct m3_state *s)
+static u32 get_dmac(struct m3_state *s)
 {
     u32 offset;
 
@@ -2102,7 +2102,7 @@
     return i == 0;
 }
 
-u16 m3_ac97_read(struct ac97_codec *codec, u8 reg)
+static u16 m3_ac97_read(struct ac97_codec *codec, u8 reg)
 {
     u16 ret = 0;
     struct m3_card *card = codec->private_data;
@@ -2129,7 +2129,7 @@
     return ret;
 }
 
-void m3_ac97_write(struct ac97_codec *codec, u8 reg, u16 val)
+static void m3_ac97_write(struct ac97_codec *codec, u8 reg, u16 val)
 {
     struct m3_card *card = codec->private_data;
 
@@ -2187,7 +2187,7 @@
 	.release = m3_release_mixdev,
 };
 
-void remote_codec_config(int io, int isremote)
+static void remote_codec_config(int io, int isremote)
 {
     isremote = isremote ? 1 : 0;
 
@@ -2571,7 +2571,7 @@
 };
 
 #ifdef CONFIG_PM
-int alloc_dsp_suspendmem(struct m3_card *card)
+static int alloc_dsp_suspendmem(struct m3_card *card)
 {
     int len = sizeof(u16) * (REV_B_CODE_MEMORY_LENGTH + REV_B_DATA_MEMORY_LENGTH);
 
@@ -2580,7 +2580,7 @@
 
     return 0;
 }
-void free_dsp_suspendmem(struct m3_card *card)
+static void free_dsp_suspendmem(struct m3_card *card)
 {
    if(card->suspend_mem)
        vfree(card->suspend_mem);
@@ -2919,10 +2919,10 @@
 MODULE_LICENSE("GPL");
 
 #ifdef M_DEBUG
-MODULE_PARM(debug,"i");
+module_param(debug, int, 0);
 #endif
-MODULE_PARM(external_amp,"i");
-MODULE_PARM(gpio_pin, "i");
+module_param(external_amp, int, 0);
+module_param(gpio_pin, int, 0);
 
 static struct pci_driver m3_pci_driver = {
 	.name	  = "ess_m3_audio",
diff -Nru a/sound/oss/maestro3.h b/sound/oss/maestro3.h
--- a/sound/oss/maestro3.h	2005-01-10 20:11:18 -08:00
+++ b/sound/oss/maestro3.h	2005-01-10 20:11:18 -08:00
@@ -695,7 +695,7 @@
  * DSP Code images
  */
 
-u16 assp_kernel_image[] = {
+static u16 assp_kernel_image[] = {
     0x7980, 0x0030, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x00FB, 0x7980, 0x00DD, 0x7980, 0x03B4, 
     0x7980, 0x0332, 0x7980, 0x0287, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x03B4, 
     0x7980, 0x031A, 0x7980, 0x03B4, 0x7980, 0x022F, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x03B4, 
@@ -782,7 +782,7 @@
  * Mini sample rate converter code image
  * that is to be loaded at 0x400 on the DSP.
  */
-u16 assp_minisrc_image[] = {
+static u16 assp_minisrc_image[] = {
 
     0xBF80, 0x101E, 0x906E, 0x006E, 0x8B88, 0x6980, 0xEF88, 0x906F, 0x0D6F, 0x6900, 0xEB08, 0x0412, 
     0xBC20, 0x696E, 0xB801, 0x906E, 0x7980, 0x0403, 0xB90E, 0x8807, 0xBE43, 0xBF01, 0xBE47, 0xBE41, 
diff -Nru a/sound/oss/maui.c b/sound/oss/maui.c
--- a/sound/oss/maui.c	2005-01-10 20:11:21 -08:00
+++ b/sound/oss/maui.c	2005-01-10 20:11:21 -08:00
@@ -420,8 +420,8 @@
 static int __initdata io = -1;
 static int __initdata irq = -1;
 
-MODULE_PARM(io,"i");
-MODULE_PARM(irq,"i");
+module_param(io, int, 0);
+module_param(irq, int, 0);
 
 /*
  *	Install a Maui card. Needs mpu401 loaded already.
diff -Nru a/sound/oss/mpu401.c b/sound/oss/mpu401.c
--- a/sound/oss/mpu401.c	2005-01-10 20:11:22 -08:00
+++ b/sound/oss/mpu401.c	2005-01-10 20:11:22 -08:00
@@ -1770,8 +1770,8 @@
 static int io = -1;
 static int irq = -1;
 
-MODULE_PARM(irq, "i");
-MODULE_PARM(io, "i");
+module_param(irq, int, 0);
+module_param(io, int, 0);
 
 static int __init init_mpu401(void)
 {
diff -Nru a/sound/oss/msnd_pinnacle.c b/sound/oss/msnd_pinnacle.c
--- a/sound/oss/msnd_pinnacle.c	2005-01-10 20:11:20 -08:00
+++ b/sound/oss/msnd_pinnacle.c	2005-01-10 20:11:20 -08:00
@@ -1603,24 +1603,6 @@
 MODULE_DESCRIPTION			("Turtle Beach " LONGNAME " Linux Driver");
 MODULE_LICENSE("GPL");
 
-MODULE_PARM				(io, "i");
-MODULE_PARM				(irq, "i");
-MODULE_PARM				(mem, "i");
-MODULE_PARM				(write_ndelay, "i");
-MODULE_PARM				(fifosize, "i");
-MODULE_PARM				(calibrate_signal, "i");
-#ifndef MSND_CLASSIC
-MODULE_PARM				(digital, "i");
-MODULE_PARM				(cfg, "i");
-MODULE_PARM				(reset, "i");
-MODULE_PARM				(mpu_io, "i");
-MODULE_PARM				(mpu_irq, "i");
-MODULE_PARM				(ide_io0, "i");
-MODULE_PARM				(ide_io1, "i");
-MODULE_PARM				(ide_irq, "i");
-MODULE_PARM				(joystick_io, "i");
-#endif
-
 static int io __initdata =		-1;
 static int irq __initdata =		-1;
 static int mem __initdata =		-1;
@@ -1726,6 +1708,23 @@
 calibrate_signal __initdata =		CONFIG_MSND_CALSIGNAL;
 #endif /* MODULE */
 
+module_param				(io, int, 0);
+module_param				(irq, int, 0);
+module_param				(mem, int, 0);
+module_param				(write_ndelay, int, 0);
+module_param				(fifosize, int, 0);
+module_param				(calibrate_signal, int, 0);
+#ifndef MSND_CLASSIC
+module_param				(digital, bool, 0);
+module_param				(cfg, int, 0);
+module_param				(reset, int, 0);
+module_param				(mpu_io, int, 0);
+module_param				(mpu_irq, int, 0);
+module_param				(ide_io0, int, 0);
+module_param				(ide_io1, int, 0);
+module_param				(ide_irq, int, 0);
+module_param				(joystick_io, int, 0);
+#endif
 
 static int __init msnd_init(void)
 {
diff -Nru a/sound/oss/nm256_audio.c b/sound/oss/nm256_audio.c
--- a/sound/oss/nm256_audio.c	2005-01-10 20:11:18 -08:00
+++ b/sound/oss/nm256_audio.c	2005-01-10 20:11:18 -08:00
@@ -157,7 +157,7 @@
  * attempted.
  */
 
-int
+static int
 nm256_setInfo (int dev, struct nm256_info *card)
 {
     int x;
@@ -1673,17 +1673,17 @@
 MODULE_LICENSE("GPL");
 
 
-struct pci_driver nm256_pci_driver = {
+static struct pci_driver nm256_pci_driver = {
 	.name		= "nm256_audio",
 	.id_table	= nm256_pci_tbl,
 	.probe		= nm256_probe,
 	.remove		= nm256_remove,
 };
 
-MODULE_PARM (usecache, "i");
-MODULE_PARM (buffertop, "i");
-MODULE_PARM (nm256_debug, "i");
-MODULE_PARM (force_load, "i");
+module_param(usecache, bool, 0);
+module_param(buffertop, int, 0);
+module_param(nm256_debug, bool, 0644);
+module_param(force_load, bool, 0);
 
 static int __init do_init_nm256(void)
 {
diff -Nru a/sound/oss/opl3.c b/sound/oss/opl3.c
--- a/sound/oss/opl3.c	2005-01-10 20:11:19 -08:00
+++ b/sound/oss/opl3.c	2005-01-10 20:11:19 -08:00
@@ -1202,7 +1202,7 @@
 
 static int io = -1;
 
-MODULE_PARM(io, "i");
+module_param(io, int, 0);
 
 static int __init init_opl3 (void)
 {
diff -Nru a/sound/oss/opl3sa.c b/sound/oss/opl3sa.c
--- a/sound/oss/opl3sa.c	2005-01-10 20:11:24 -08:00
+++ b/sound/oss/opl3sa.c	2005-01-10 20:11:24 -08:00
@@ -245,12 +245,12 @@
 static int __initdata mpu_io	= -1;
 static int __initdata mpu_irq	= -1;
 
-MODULE_PARM(io,"i");
-MODULE_PARM(irq,"i");
-MODULE_PARM(dma,"i");
-MODULE_PARM(dma2,"i");
-MODULE_PARM(mpu_io,"i");
-MODULE_PARM(mpu_irq,"i");
+module_param(io, int, 0);
+module_param(irq, int, 0);
+module_param(dma, int, 0);
+module_param(dma2, int, 0);
+module_param(mpu_io, int, 0);
+module_param(mpu_irq, int, 0);
 
 static int __init init_opl3sa(void)
 {
diff -Nru a/sound/oss/opl3sa2.c b/sound/oss/opl3sa2.c
--- a/sound/oss/opl3sa2.c	2005-01-10 20:11:15 -08:00
+++ b/sound/oss/opl3sa2.c	2005-01-10 20:11:15 -08:00
@@ -177,9 +177,6 @@
 static int __initdata isapnp = 1;
 static int __initdata multiple = 1;
 
-/* PnP devices */
-struct pnp_dev* opl3sa2_dev[OPL3SA2_CARDS_MAX];
-
 /* Whether said devices have been activated */
 static int opl3sa2_activated[OPL3SA2_CARDS_MAX];
 #else
@@ -192,35 +189,35 @@
 MODULE_LICENSE("GPL");
 
 
-MODULE_PARM(io, "i");
+module_param(io, int, 0);
 MODULE_PARM_DESC(io, "Set I/O base of OPL3-SA2 or SA3 card (usually 0x370.  Address must be even and must be from 0x100 to 0xFFE)");
 
-MODULE_PARM(mss_io, "i");
+module_param(mss_io, int, 0);
 MODULE_PARM_DESC(mss_io, "Set MSS (audio) I/O base (0x530, 0xE80, or other. Address must end in 0 or 4 and must be from 0x530 to 0xF48)");
 
-MODULE_PARM(mpu_io, "i");
+module_param(mpu_io, int, 0);
 MODULE_PARM_DESC(mpu_io, "Set MIDI I/O base (0x330 or other. Address must be even and must be from 0x300 to 0x334)");
 
-MODULE_PARM(irq, "i");
+module_param(irq, int, 0);
 MODULE_PARM_DESC(mss_irq, "Set MSS (audio) IRQ (5, 7, 9, 10, 11, 12)");
 
-MODULE_PARM(dma, "i");
+module_param(dma, int, 0);
 MODULE_PARM_DESC(dma, "Set MSS (audio) first DMA channel (0, 1, 3)");
 
-MODULE_PARM(dma2, "i");
+module_param(dma2, int, 0);
 MODULE_PARM_DESC(dma2, "Set MSS (audio) second DMA channel (0, 1, 3)");
 
-MODULE_PARM(ymode, "i");
+module_param(ymode, int, 0);
 MODULE_PARM_DESC(ymode, "Set Yamaha 3D enhancement mode (0 = Desktop/Normal, 1 = Notebook PC (1), 2 = Notebook PC (2), 3 = Hi-Fi)");
 
-MODULE_PARM(loopback, "i");
+module_param(loopback, int, 0);
 MODULE_PARM_DESC(loopback, "Set A/D input source. Useful for echo cancellation (0 = Mic Rch (default), 1 = Mono output loopback)");
 
 #ifdef CONFIG_PNP
-MODULE_PARM(isapnp, "i");
+module_param(isapnp, bool, 0);
 MODULE_PARM_DESC(isapnp, "When set to 0, ISA PnP support will be disabled");
 
-MODULE_PARM(multiple, "i");
+module_param(multiple, bool, 0);
 MODULE_PARM_DESC(multiple, "When set to 0, will not search for multiple cards");
 #endif
 
@@ -775,7 +772,7 @@
 }
 
 #ifdef CONFIG_PNP
-struct pnp_device_id pnp_opl3sa2_list[] = {
+static struct pnp_device_id pnp_opl3sa2_list[] = {
 	{.id = "YMH0021", .driver_data = 0},
 	{.id = ""}
 };
diff -Nru a/sound/oss/pas2_card.c b/sound/oss/pas2_card.c
--- a/sound/oss/pas2_card.c	2005-01-10 20:11:21 -08:00
+++ b/sound/oss/pas2_card.c	2005-01-10 20:11:21 -08:00
@@ -240,8 +240,6 @@
 	mix_write(0x80 | 5, 0x078B);
 	mix_write(5, 0x078B);
 
-#if !defined(DISABLE_SB_EMULATION)
-
 	{
 		struct address_info *sb_config;
 
@@ -279,9 +277,6 @@
 		else
 			pas_write(0x00, 0xF788);
 	}
-#else
-	pas_write(0x00, 0xF788);
-#endif
 
 	if (!ok)
 		printk(KERN_WARNING "PAS16: Driver not enabled\n");
@@ -349,11 +344,6 @@
 		if (config_pas_hw(hw_config))
 		{
 			pas_pcm_init(hw_config);
-
-#if !defined(MODULE) && !defined(DISABLE_SB_EMULATION)
-			sb_dsp_disable_midi(pas_sb_base);	/* No MIDI capability */
-#endif
-
 			pas_midi_init();
 			pas_init_mixer();
 		}
@@ -393,19 +383,19 @@
 static int __initdata sb_dma	= -1;
 static int __initdata sb_dma16	= -1;
 
-MODULE_PARM(io,"i");
-MODULE_PARM(irq,"i");
-MODULE_PARM(dma,"i");
-MODULE_PARM(dma16,"i");
-
-MODULE_PARM(sb_io,"i");
-MODULE_PARM(sb_irq,"i");
-MODULE_PARM(sb_dma,"i");
-MODULE_PARM(sb_dma16,"i");
-
-MODULE_PARM(joystick,"i");
-MODULE_PARM(symphony,"i");
-MODULE_PARM(broken_bus_clock,"i");
+module_param(io, int, 0);
+module_param(irq, int, 0);
+module_param(dma, int, 0);
+module_param(dma16, int, 0);
+
+module_param(sb_io, int, 0);
+module_param(sb_irq, int, 0);
+module_param(sb_dma, int, 0);
+module_param(sb_dma16, int, 0);
+
+module_param(joystick, bool, 0);
+module_param(symphony, bool, 0);
+module_param(broken_bus_clock, bool, 0);
 
 MODULE_LICENSE("GPL");
 
diff -Nru a/sound/oss/pss.c b/sound/oss/pss.c
--- a/sound/oss/pss.c	2005-01-10 20:11:23 -08:00
+++ b/sound/oss/pss.c	2005-01-10 20:11:23 -08:00
@@ -118,9 +118,9 @@
 
 /* If compiled into kernel, it enable or disable pss mixer */
 #ifdef CONFIG_PSS_MIXER
-static unsigned char pss_mixer = 1;
+static int pss_mixer = 1;
 #else
-static unsigned char pss_mixer;
+static int pss_mixer;
 #endif
 
 
@@ -649,7 +649,7 @@
 	.ioctl	= pss_mixer_ioctl
 };
 
-void disable_all_emulations(void)
+static void disable_all_emulations(void)
 {
 	outw(0x0000, REG(CONF_PSS));	/* 0x0400 enables joystick */
 	outw(0x0000, REG(CONF_WSS));
@@ -658,7 +658,7 @@
 	outw(0x0000, REG(CONF_CDROM));
 }
 
-void configure_nonsound_components(void)
+static void configure_nonsound_components(void)
 {
 	/* Configure Joystick port */
 
@@ -1153,29 +1153,29 @@
 static int pss_keep_settings  = 1;	/* Keep hardware settings at module exit */
 static char *pss_firmware = "/etc/sound/pss_synth";
 
-MODULE_PARM(pss_io, "i");
+module_param(pss_io, int, 0);
 MODULE_PARM_DESC(pss_io, "Set i/o base of PSS card (probably 0x220 or 0x240)");
-MODULE_PARM(mss_io, "i");
+module_param(mss_io, int, 0);
 MODULE_PARM_DESC(mss_io, "Set WSS (audio) i/o base (0x530, 0x604, 0xE80, 0xF40, or other. Address must end in 0 or 4 and must be from 0x100 to 0xFF4)");
-MODULE_PARM(mss_irq, "i");
+module_param(mss_irq, int, 0);
 MODULE_PARM_DESC(mss_irq, "Set WSS (audio) IRQ (3, 5, 7, 9, 10, 11, 12)");
-MODULE_PARM(mss_dma, "i");
+module_param(mss_dma, int, 0);
 MODULE_PARM_DESC(mss_dma, "Set WSS (audio) DMA (0, 1, 3)");
-MODULE_PARM(mpu_io, "i");
+module_param(mpu_io, int, 0);
 MODULE_PARM_DESC(mpu_io, "Set MIDI i/o base (0x330 or other. Address must be on 4 location boundaries and must be from 0x100 to 0xFFC)");
-MODULE_PARM(mpu_irq, "i");
+module_param(mpu_irq, int, 0);
 MODULE_PARM_DESC(mpu_irq, "Set MIDI IRQ (3, 5, 7, 9, 10, 11, 12)");
-MODULE_PARM(pss_cdrom_port, "i");
+module_param(pss_cdrom_port, int, 0);
 MODULE_PARM_DESC(pss_cdrom_port, "Set the PSS CDROM port i/o base (0x340 or other)");
-MODULE_PARM(pss_enable_joystick, "i");
+module_param(pss_enable_joystick, bool, 0);
 MODULE_PARM_DESC(pss_enable_joystick, "Enables the PSS joystick port (1 to enable, 0 to disable)");
-MODULE_PARM(pss_no_sound, "i");
+module_param(pss_no_sound, bool, 0);
 MODULE_PARM_DESC(pss_no_sound, "Configure sound compoents (0 - no, 1 - yes)");
-MODULE_PARM(pss_keep_settings, "i");
+module_param(pss_keep_settings, bool, 0);
 MODULE_PARM_DESC(pss_keep_settings, "Keep hardware setting at driver unloading (0 - no, 1 - yes)");
-MODULE_PARM(pss_firmware, "s");
+module_param(pss_firmware, charp, 0);
 MODULE_PARM_DESC(pss_firmware, "Location of the firmware file (default - /etc/sound/pss_synth)");
-MODULE_PARM(pss_mixer, "b");
+module_param(pss_mixer, bool, 0);
 MODULE_PARM_DESC(pss_mixer, "Enable (1) or disable (0) PSS mixer (controlling of output volume, bass, treble, synth volume). The mixer is not available on all PSS cards.");
 MODULE_AUTHOR("Hannu Savolainen, Vladimir Michl");
 MODULE_DESCRIPTION("Module for PSS sound cards (based on AD1848, ADSP-2115 and ESC614). This module includes control of output amplifier and synth volume of the Beethoven ADSP-16 card (this may work with other PSS cards).");
diff -Nru a/sound/oss/rme96xx.c b/sound/oss/rme96xx.c
--- a/sound/oss/rme96xx.c	2005-01-10 20:11:18 -08:00
+++ b/sound/oss/rme96xx.c	2005-01-10 20:11:18 -08:00
@@ -68,7 +68,7 @@
 #define NR_DEVICE 2
 
 static int devices = 1;
-MODULE_PARM(devices, "1-" __MODULE_STRING(NR_DEVICE) "i");
+module_param(devices, int, 0);
 MODULE_PARM_DESC(devices, "number of dsp devices allocated by the driver");
 
 
@@ -339,7 +339,7 @@
 
 /* fiddling with the card (first level hardware control) */
 
-inline void rme96xx_set_ctrl(rme96xx_info* s,int mask)
+static inline void rme96xx_set_ctrl(rme96xx_info* s,int mask)
 {
 
 	s->control_register|=mask;
@@ -347,7 +347,7 @@
 
 }
 
-inline void rme96xx_unset_ctrl(rme96xx_info* s,int mask)
+static inline void rme96xx_unset_ctrl(rme96xx_info* s,int mask)
 {
 
 	s->control_register&=(~mask);
@@ -355,7 +355,7 @@
 
 }
 
-inline int rme96xx_get_sample_rate_status(rme96xx_info* s)
+static inline int rme96xx_get_sample_rate_status(rme96xx_info* s)
 {
 	int val;
 	u32 status;
@@ -366,7 +366,7 @@
 	return val;
 }
 
-inline int rme96xx_get_sample_rate_ctrl(rme96xx_info* s)
+static inline int rme96xx_get_sample_rate_ctrl(rme96xx_info* s)
 {
 	int val;
 	val = (s->control_register & RME96xx_freq) ? 48000 : 44100;
@@ -539,7 +539,7 @@
 /* the function returns the hardware pointer in bytes */
 #define RME96xx_BURSTBYTES -64  /* bytes by which hwptr could be off */
 
-inline int rme96xx_gethwptr(rme96xx_info* s,int exact)
+static inline int rme96xx_gethwptr(rme96xx_info* s,int exact)
 {
 	unsigned long flags;
 	if (exact) {
@@ -557,7 +557,7 @@
 	return (s->hwbufid ? s->fragsize : 0);
 }
 
-inline void rme96xx_setlatency(rme96xx_info* s,int l)
+static inline void rme96xx_setlatency(rme96xx_info* s,int l)
 {
 	s->latency = l;
 	s->fragsize = 1<<(8+l);
@@ -626,7 +626,7 @@
 }
 
 
-inline int rme96xx_getospace(struct dmabuf * dma, unsigned int hwp)
+static inline int rme96xx_getospace(struct dmabuf * dma, unsigned int hwp)
 {
 	int cnt;
 	int  swptr;
@@ -643,7 +643,7 @@
 	return cnt;
 }
 
-inline int rme96xx_getispace(struct dmabuf * dma, unsigned int hwp)
+static inline int rme96xx_getispace(struct dmabuf * dma, unsigned int hwp)
 {
 	int cnt;
 	int  swptr;
@@ -661,7 +661,7 @@
 }
 
 
-inline int rme96xx_copyfromuser(struct dmabuf* dma,const char __user * buffer,int count,int hop)
+static inline int rme96xx_copyfromuser(struct dmabuf* dma,const char __user * buffer,int count,int hop)
 {
 	int swptr = dma->writeptr;
 	switch (dma->format) {
@@ -710,7 +710,7 @@
 }
 
 /* The count argument is the number of bytes */
-inline int rme96xx_copytouser(struct dmabuf* dma,const char __user* buffer,int count,int hop)
+static inline int rme96xx_copytouser(struct dmabuf* dma,const char __user* buffer,int count,int hop)
 {
 	int swptr = dma->readptr;
 	switch (dma->format) {
@@ -793,7 +793,7 @@
  PCI detection and module initialization stuff 
  ----------------------------------------------------------------------------*/
 
-void* busmaster_malloc(int size) {
+static void* busmaster_malloc(int size) {
      int pg; /* 2 s exponent of memory size */
         char *buf;
 
@@ -819,7 +819,7 @@
 	return NULL;
 }
 
-void busmaster_free(void* ptr,int size) {
+static void busmaster_free(void* ptr,int size) {
         int pg;
 	struct page* page, *last_page;
 
@@ -866,7 +866,7 @@
 }
 
 
-int rme96xx_init(rme96xx_info* s)
+static int rme96xx_init(rme96xx_info* s)
 {
 	int i;
 	int status;
diff -Nru a/sound/oss/sb.h b/sound/oss/sb.h
--- a/sound/oss/sb.h	2005-01-10 20:11:15 -08:00
+++ b/sound/oss/sb.h	2005-01-10 20:11:15 -08:00
@@ -176,11 +176,8 @@
 int sb_audio_open(int dev, int mode);
 void sb_audio_close(int dev);
 
-extern sb_devc *last_sb;
-
 /*	From sb_common.c */
 void sb_dsp_disable_midi(int port);
-void sb_dsp_disable_recording(int port);
 int probe_sbmpu (struct address_info *hw_config, struct module *owner);
 void unload_sbmpu (struct address_info *hw_config);
 
diff -Nru a/sound/oss/sb_card.c b/sound/oss/sb_card.c
--- a/sound/oss/sb_card.c	2005-01-10 20:11:20 -08:00
+++ b/sound/oss/sb_card.c	2005-01-10 20:11:20 -08:00
@@ -52,7 +52,7 @@
 static int __initdata acer 	= 0; /* Do acer notebook init? */
 static int __initdata sm_games 	= 0; /* Logitech soundman games? */
 
-struct sb_card_config *legacy = NULL;
+static struct sb_card_config *legacy = NULL;
 
 #ifdef CONFIG_PNP
 static int __initdata pnp       = 1;
diff -Nru a/sound/oss/sb_common.c b/sound/oss/sb_common.c
--- a/sound/oss/sb_common.c	2005-01-10 20:11:16 -08:00
+++ b/sound/oss/sb_common.c	2005-01-10 20:11:16 -08:00
@@ -81,7 +81,7 @@
 
 #endif
 
-sb_devc *last_sb;		/* Last sb loaded */
+static sb_devc *last_sb;		/* Last sb loaded */
 
 int sb_dsp_command(sb_devc * devc, unsigned char val)
 {
@@ -521,7 +521,7 @@
 	
 	DDB(printk("sb_dsp_detect(%x) entered\n", hw_config->io_base));
 
-	devc->lock = SPIN_LOCK_UNLOCKED;
+	spin_lock_init(&devc->lock);
 	devc->type = hw_config->card_subtype;
 
 	devc->base = hw_config->io_base;
@@ -876,14 +876,6 @@
 	return 1;
 }
 
-void sb_dsp_disable_midi(int io_base)
-{
-}
-
-void sb_dsp_disable_recording(int io_base)
-{
-}
-
 /* if (sbmpu) below we allow mpu401 to manage the midi devs
    otherwise we have to unload them. (Andrzej Krzysztofowicz) */
    
@@ -1292,7 +1284,6 @@
 EXPORT_SYMBOL(sb_dsp_init);
 EXPORT_SYMBOL(sb_dsp_detect);
 EXPORT_SYMBOL(sb_dsp_unload);
-EXPORT_SYMBOL(sb_dsp_disable_midi);
 EXPORT_SYMBOL(sb_be_quiet);
 EXPORT_SYMBOL(probe_sbmpu);
 EXPORT_SYMBOL(unload_sbmpu);
diff -Nru a/sound/oss/sb_ess.c b/sound/oss/sb_ess.c
--- a/sound/oss/sb_ess.c	2005-01-10 20:11:18 -08:00
+++ b/sound/oss/sb_ess.c	2005-01-10 20:11:18 -08:00
@@ -1696,7 +1696,7 @@
 	sb_common_mixer_set(devc, dev, left, right);
 }
 
-int es_rec_set_recmask(sb_devc * devc, int mask)
+static int es_rec_set_recmask(sb_devc * devc, int mask)
 {
 	int i, i_mask, cur_mask, diff_mask;
 	int value, left, right;
diff -Nru a/sound/oss/sequencer.c b/sound/oss/sequencer.c
--- a/sound/oss/sequencer.c	2005-01-10 20:11:19 -08:00
+++ b/sound/oss/sequencer.c	2005-01-10 20:11:19 -08:00
@@ -1091,7 +1091,7 @@
 	return 0;
 }
 
-void seq_drain_midi_queues(void)
+static void seq_drain_midi_queues(void)
 {
 	int i, n;
 
diff -Nru a/sound/oss/sgalaxy.c b/sound/oss/sgalaxy.c
--- a/sound/oss/sgalaxy.c	2005-01-10 20:11:20 -08:00
+++ b/sound/oss/sgalaxy.c	2005-01-10 20:11:20 -08:00
@@ -153,11 +153,11 @@
 static int __initdata dma2	= -1;
 static int __initdata sgbase	= -1;
 
-MODULE_PARM(io,"i");
-MODULE_PARM(irq,"i");
-MODULE_PARM(dma,"i");
-MODULE_PARM(dma2,"i");
-MODULE_PARM(sgbase,"i");
+module_param(io, int, 0);
+module_param(irq, int, 0);
+module_param(dma, int, 0);
+module_param(dma2, int, 0);
+module_param(sgbase, int, 0);
 
 static int __init init_sgalaxy(void)
 {
diff -Nru a/sound/oss/sonicvibes.c b/sound/oss/sonicvibes.c
--- a/sound/oss/sonicvibes.c	2005-01-10 20:11:18 -08:00
+++ b/sound/oss/sonicvibes.c	2005-01-10 20:11:18 -08:00
@@ -2453,7 +2453,7 @@
 
 static unsigned int devindex;
 
-MODULE_PARM(reverb, "1-" __MODULE_STRING(NR_DEVICE) "i");
+module_param_array(reverb, bool, NULL, 0);
 MODULE_PARM_DESC(reverb, "if 1 enables the reverb circuitry. NOTE: your card must have the reverb RAM");
 #if 0
 MODULE_PARM(wavetable, "1-" __MODULE_STRING(NR_DEVICE) "i");
diff -Nru a/sound/oss/soundcard.c b/sound/oss/soundcard.c
--- a/sound/oss/soundcard.c	2005-01-10 20:11:19 -08:00
+++ b/sound/oss/soundcard.c	2005-01-10 20:11:19 -08:00
@@ -535,8 +535,8 @@
 static int dmabuf;
 static int dmabug;
 
-MODULE_PARM(dmabuf, "i");
-MODULE_PARM(dmabug, "i");
+module_param(dmabuf, int, 0444);
+module_param(dmabug, int, 0444);
 
 static int __init oss_init(void)
 {
diff -Nru a/sound/oss/sscape.c b/sound/oss/sscape.c
--- a/sound/oss/sscape.c	2005-01-10 20:11:20 -08:00
+++ b/sound/oss/sscape.c	2005-01-10 20:11:20 -08:00
@@ -1400,13 +1400,13 @@
 static int __initdata mpu_irq = -1;
 static int __initdata mpu_io = -1;
 
-MODULE_PARM(dma, "i");
-MODULE_PARM(irq, "i");
-MODULE_PARM(io, "i");
-MODULE_PARM(spea, "i");		/* spea=0/1 set the old_hardware */
-MODULE_PARM(mpu_irq, "i");
-MODULE_PARM(mpu_io, "i");
-MODULE_PARM(mss, "i");
+module_param(dma, int, 0);
+module_param(irq, int, 0);
+module_param(io, int, 0);
+module_param(spea, int, 0);		/* spea=0/1 set the old_hardware */
+module_param(mpu_irq, int, 0);
+module_param(mpu_io, int, 0);
+module_param(mss, int, 0);
 
 static int __init init_sscape(void)
 {
diff -Nru a/sound/oss/trident.c b/sound/oss/trident.c
--- a/sound/oss/trident.c	2005-01-10 20:11:21 -08:00
+++ b/sound/oss/trident.c	2005-01-10 20:11:21 -08:00
@@ -4014,7 +4014,8 @@
 	}
 }
 
-struct proc_dir_entry *res;
+static struct proc_dir_entry *res;
+
 static int
 ali_write_proc(struct file *file, const char __user *buffer, unsigned long count, void *data)
 {
diff -Nru a/sound/oss/trix.c b/sound/oss/trix.c
--- a/sound/oss/trix.c	2005-01-10 20:11:15 -08:00
+++ b/sound/oss/trix.c	2005-01-10 20:11:15 -08:00
@@ -413,16 +413,16 @@
 static int __initdata mpu_io	= -1;
 static int __initdata mpu_irq	= -1;
 
-MODULE_PARM(io,"i");
-MODULE_PARM(irq,"i");
-MODULE_PARM(dma,"i");
-MODULE_PARM(dma2,"i");
-MODULE_PARM(sb_io,"i");
-MODULE_PARM(sb_dma,"i");
-MODULE_PARM(sb_irq,"i");
-MODULE_PARM(mpu_io,"i");
-MODULE_PARM(mpu_irq,"i");
-MODULE_PARM(joystick, "i");
+module_param(io, int, 0);
+module_param(irq, int, 0);
+module_param(dma, int, 0);
+module_param(dma2, int, 0);
+module_param(sb_io, int, 0);
+module_param(sb_dma, int, 0);
+module_param(sb_irq, int, 0);
+module_param(mpu_io, int, 0);
+module_param(mpu_irq, int, 0);
+module_param(joystick, bool, 0);
 
 static int __init init_trix(void)
 {
diff -Nru a/sound/oss/uart401.c b/sound/oss/uart401.c
--- a/sound/oss/uart401.c	2005-01-10 20:11:22 -08:00
+++ b/sound/oss/uart401.c	2005-01-10 20:11:22 -08:00
@@ -430,11 +430,11 @@
 
 static struct address_info cfg_mpu;
 
-static int __initdata io = -1;
-static int __initdata irq = -1;
+static int io = -1;
+static int irq = -1;
 
-MODULE_PARM(io, "i");
-MODULE_PARM(irq, "i");
+module_param(io, int, 0444);
+module_param(irq, int, 0444);
 
 
 static int __init init_uart401(void)
diff -Nru a/sound/oss/uart6850.c b/sound/oss/uart6850.c
--- a/sound/oss/uart6850.c	2005-01-10 20:11:20 -08:00
+++ b/sound/oss/uart6850.c	2005-01-10 20:11:20 -08:00
@@ -316,8 +316,8 @@
 static int __initdata io = -1;
 static int __initdata irq = -1;
 
-MODULE_PARM(io,"i");
-MODULE_PARM(irq,"i");
+module_param(io, int, 0);
+module_param(irq, int, 0);
 
 static int __init init_uart6850(void)
 {
diff -Nru a/sound/oss/via82cxxx_audio.c b/sound/oss/via82cxxx_audio.c
--- a/sound/oss/via82cxxx_audio.c	2005-01-10 20:11:17 -08:00
+++ b/sound/oss/via82cxxx_audio.c	2005-01-10 20:11:17 -08:00
@@ -62,11 +62,6 @@
         }
 #endif
 
-#if defined(CONFIG_PROC_FS) && \
-    defined(CONFIG_SOUND_VIA82CXXX_PROCFS)
-#define VIA_PROC_FS 1
-#endif
-
 #define VIA_SUPPORT_MMAP 1 /* buggy, for now... */
 
 #define MAX_CARDS	1
@@ -366,18 +361,6 @@
 static void via_chan_pcm_fmt (struct via_channel *chan, int reset);
 static void via_chan_buffer_free (struct via_info *card, struct via_channel *chan);
 
-#ifdef VIA_PROC_FS
-static int via_init_proc (void);
-static void via_cleanup_proc (void);
-static int via_card_init_proc (struct via_info *card);
-static void via_card_cleanup_proc (struct via_info *card);
-#else
-static inline int via_init_proc (void) { return 0; }
-static inline void via_cleanup_proc (void) {}
-static inline int via_card_init_proc (struct via_info *card) { return 0; }
-static inline void via_card_cleanup_proc (struct via_info *card) {}
-#endif
-
 
 /****************************************************************
  *
@@ -2179,7 +2162,7 @@
 #endif /* VM_RESERVED */
 
 
-struct vm_operations_struct via_mm_ops = {
+static struct vm_operations_struct via_mm_ops = {
 	.nopage		= via_mm_nopage,
 
 #ifndef VM_RESERVED
@@ -3484,21 +3467,12 @@
 	}
 
 	/*
-	 * per-card /proc info
-	 */
-	rc = via_card_init_proc (card);
-	if (rc) {
-		printk (KERN_ERR PFX "card-specific /proc init failed, aborting\n");
-		goto err_out_have_dsp;
-	}
-
-	/*
 	 * init and turn on interrupts, as the last thing we do
 	 */
 	rc = via_interrupt_init (card);
 	if (rc) {
 		printk (KERN_ERR PFX "interrupt init failed, aborting\n");
-		goto err_out_have_proc;
+		goto err_out_have_dsp;
 	}
 
 	printk (KERN_INFO PFX "board #%d at 0x%04lX, IRQ %d\n",
@@ -3538,9 +3512,6 @@
 	DPRINTK ("EXIT, returning 0\n");
 	return 0;
 
-err_out_have_proc:
-	via_card_cleanup_proc (card);
-
 err_out_have_dsp:
 	via_dsp_cleanup (card);
 
@@ -3582,7 +3553,6 @@
 #endif
 
 	free_irq (card->pdev->irq, card);
-	via_card_cleanup_proc (card);
 	via_dsp_cleanup (card);
 	via_ac97_cleanup (card);
 
@@ -3615,15 +3585,8 @@
 
 	DPRINTK ("ENTER\n");
 
-	rc = via_init_proc ();
-	if (rc) {
-		DPRINTK ("EXIT, returning %d\n", rc);
-		return rc;
-	}
-
 	rc = pci_register_driver (&via_driver);
 	if (rc) {
-		via_cleanup_proc ();
 		DPRINTK ("EXIT, returning %d\n", rc);
 		return rc;
 	}
@@ -3638,7 +3601,6 @@
 	DPRINTK ("ENTER\n");
 
 	pci_unregister_driver (&via_driver);
-	via_cleanup_proc ();
 
 	DPRINTK ("EXIT\n");
 }
@@ -3651,181 +3613,3 @@
 MODULE_DESCRIPTION("DSP audio and mixer driver for Via 82Cxxx audio devices");
 MODULE_LICENSE("GPL");
 
-
-#ifdef VIA_PROC_FS
-
-/****************************************************************
- *
- * /proc/driver/via/info
- *
- *
- */
-
-static int via_info_read_proc (char *page, char **start, off_t off,
-			       int count, int *eof, void *data)
-{
-#define YN(val,bit) (((val) & (bit)) ? "yes" : "no")
-#define ED(val,bit) (((val) & (bit)) ? "enable" : "disable")
-
-	int len = 0;
-	u8 r40, r41, r42, r44;
-	struct via_info *card = data;
-
-	DPRINTK ("ENTER\n");
-
-	assert (card != NULL);
-
-	len += sprintf (page+len, VIA_CARD_NAME "\n\n");
-
-	pci_read_config_byte (card->pdev, 0x40, &r40);
-	pci_read_config_byte (card->pdev, 0x41, &r41);
-	pci_read_config_byte (card->pdev, 0x42, &r42);
-	pci_read_config_byte (card->pdev, 0x44, &r44);
-
-	len += sprintf (page+len,
-		"Via 82Cxxx PCI registers:\n"
-		"\n"
-		"40  Codec Ready: %s\n"
-		"    Codec Low-power: %s\n"
-		"    Secondary Codec Ready: %s\n"
-		"\n"
-		"41  Interface Enable: %s\n"
-		"    De-Assert Reset: %s\n"
-		"    Force SYNC high: %s\n"
-		"    Force SDO high: %s\n"
-		"    Variable Sample Rate On-Demand Mode: %s\n"
-		"    SGD Read Channel PCM Data Out: %s\n"
-		"    FM Channel PCM Data Out: %s\n"
-		"    SB PCM Data Out: %s\n"
-		"\n"
-		"42  Game port enabled: %s\n"
-		"    SoundBlaster enabled: %s\n"
-		"    FM enabled: %s\n"
-		"    MIDI enabled: %s\n"
-		"\n"
-		"44  AC-Link Interface Access: %s\n"
-		"    Secondary Codec Support: %s\n"
-
-		"\n",
-
-		YN (r40, VIA_CR40_AC97_READY),
-		YN (r40, VIA_CR40_AC97_LOW_POWER),
-		YN (r40, VIA_CR40_SECONDARY_READY),
-
-		ED (r41, VIA_CR41_AC97_ENABLE),
-		YN (r41, (1 << 6)),
-		YN (r41, (1 << 5)),
-		YN (r41, (1 << 4)),
-		ED (r41, (1 << 3)),
-		ED (r41, (1 << 2)),
-		ED (r41, (1 << 1)),
-		ED (r41, (1 << 0)),
-
-		YN (r42, VIA_CR42_GAME_ENABLE),
-		YN (r42, VIA_CR42_SB_ENABLE),
-		YN (r42, VIA_CR42_FM_ENABLE),
-		YN (r42, VIA_CR42_MIDI_ENABLE),
-
-		YN (r44, VIA_CR44_AC_LINK_ACCESS),
-		YN (r44, VIA_CR44_SECOND_CODEC_SUPPORT)
-
-		);
-
-	DPRINTK ("EXIT, returning %d\n", len);
-	return len;
-
-#undef YN
-#undef ED
-}
-
-
-/****************************************************************
- *
- * /proc/driver/via/... setup and cleanup
- *
- *
- */
-
-static int __init via_init_proc (void)
-{
-	DPRINTK ("ENTER\n");
-
-	if (!proc_mkdir ("driver/via", 0))
-		return -EIO;
-
-	DPRINTK ("EXIT, returning 0\n");
-	return 0;
-}
-
-
-static void via_cleanup_proc (void)
-{
-	DPRINTK ("ENTER\n");
-
-	remove_proc_entry ("driver/via", NULL);
-
-	DPRINTK ("EXIT\n");
-}
-
-
-static int __devinit via_card_init_proc (struct via_info *card)
-{
-	char s[32];
-	int rc;
-
-	DPRINTK ("ENTER\n");
-
-	sprintf (s, "driver/via/%d", card->card_num);
-	if (!proc_mkdir (s, 0)) {
-		rc = -EIO;
-		goto err_out_none;
-	}
-
-	sprintf (s, "driver/via/%d/info", card->card_num);
-	if (!create_proc_read_entry (s, 0, 0, via_info_read_proc, card)) {
-		rc = -EIO;
-		goto err_out_dir;
-	}
-
-	sprintf (s, "driver/via/%d/ac97", card->card_num);
-	if (!create_proc_read_entry (s, 0, 0, ac97_read_proc, card->ac97)) {
-		rc = -EIO;
-		goto err_out_info;
-	}
-
-	DPRINTK ("EXIT, returning 0\n");
-	return 0;
-
-err_out_info:
-	sprintf (s, "driver/via/%d/info", card->card_num);
-	remove_proc_entry (s, NULL);
-
-err_out_dir:
-	sprintf (s, "driver/via/%d", card->card_num);
-	remove_proc_entry (s, NULL);
-
-err_out_none:
-	DPRINTK ("EXIT, returning %d\n", rc);
-	return rc;
-}
-
-
-static void via_card_cleanup_proc (struct via_info *card)
-{
-	char s[32];
-
-	DPRINTK ("ENTER\n");
-
-	sprintf (s, "driver/via/%d/ac97", card->card_num);
-	remove_proc_entry (s, NULL);
-
-	sprintf (s, "driver/via/%d/info", card->card_num);
-	remove_proc_entry (s, NULL);
-
-	sprintf (s, "driver/via/%d", card->card_num);
-	remove_proc_entry (s, NULL);
-
-	DPRINTK ("EXIT\n");
-}
-
-#endif /* VIA_PROC_FS */
diff -Nru a/sound/oss/vwsnd.c b/sound/oss/vwsnd.c
--- a/sound/oss/vwsnd.c	2005-01-10 20:11:19 -08:00
+++ b/sound/oss/vwsnd.c	2005-01-10 20:11:19 -08:00
@@ -256,7 +256,7 @@
 {
 	static void li_destroy(lithium_t *);
 
-	lith->lock = SPIN_LOCK_UNLOCKED;
+	spin_lock_init(&lith->lock);
 	lith->page0 = ioremap_nocache(baseaddr + LI_PAGE0_OFFSET, PAGE_SIZE);
 	lith->page1 = ioremap_nocache(baseaddr + LI_PAGE1_OFFSET, PAGE_SIZE);
 	lith->page2 = ioremap_nocache(baseaddr + LI_PAGE2_OFFSET, PAGE_SIZE);
@@ -3380,13 +3380,13 @@
 	init_MUTEX(&devc->io_sema);
 	init_MUTEX(&devc->mix_sema);
 	devc->open_mode = 0;
-	devc->rport.lock = SPIN_LOCK_UNLOCKED;
+	spin_lock_init(&devc->rport.lock);
 	init_waitqueue_head(&devc->rport.queue);
 	devc->rport.swstate = SW_OFF;
 	devc->rport.hwstate = HW_STOPPED;
 	devc->rport.flags = 0;
 	devc->rport.swbuf = NULL;
-	devc->wport.lock = SPIN_LOCK_UNLOCKED;
+	spin_lock_init(&devc->wport.lock);
 	init_waitqueue_head(&devc->wport.queue);
 	devc->wport.swstate = SW_OFF;
 	devc->wport.hwstate = HW_STOPPED;
diff -Nru a/sound/oss/wavfront.c b/sound/oss/wavfront.c
--- a/sound/oss/wavfront.c	2005-01-10 20:11:19 -08:00
+++ b/sound/oss/wavfront.c	2005-01-10 20:11:19 -08:00
@@ -157,14 +157,14 @@
 		   board and load the firmware anyway.
 		*/
 		   
-int fx_raw = 1; /* if this is zero, we'll leave the FX processor in
-		   whatever state it is when the driver is loaded.
-		   The default is to download the microprogram and
-		   associated coefficients to set it up for "default"
-		   operation, whatever that means.
-		*/
+static int fx_raw = 1; /* if this is zero, we'll leave the FX processor in
+		          whatever state it is when the driver is loaded.
+		          The default is to download the microprogram and
+		          associated coefficients to set it up for "default"
+		          operation, whatever that means.
+		       */
 
-int debug_default;      /* you can set this to control debugging
+static int debug_default;  /* you can set this to control debugging
 			      during driver loading. it takes any combination
 			      of the WF_DEBUG_* flags defined in
 			      wavefront.h
@@ -172,44 +172,46 @@
 
 /* XXX this needs to be made firmware and hardware version dependent */
 
-char *ospath = "/etc/sound/wavefront.os"; /* where to find a processed
-					     version of the WaveFront OS
-					  */
-
-int wait_polls = 2000;	/* This is a number of tries we poll the status register
-			   before resorting to sleeping. WaveFront being an ISA
-			   card each poll takes about 1.2us. So before going to
-			   sleep we wait up to 2.4ms in a loop.
-			*/
+static char *ospath = "/etc/sound/wavefront.os"; /* where to find a processed
+					            version of the WaveFront OS
+					          */
+
+static int wait_polls = 2000; /* This is a number of tries we poll the
+				 status register before resorting to sleeping.
+				 WaveFront being an ISA card each poll takes
+				 about 1.2us. So before going to
+			         sleep we wait up to 2.4ms in a loop.
+			     */
+
+static int sleep_length = HZ/100; /* This says how long we're going to
+				     sleep between polls.
+			             10ms sounds reasonable for fast response.
+			          */
 
-int sleep_length = HZ/100; /* This says how long we're going to sleep between polls.
-			      10ms sounds reasonable for fast response.
-			   */
+static int sleep_tries = 50;       /* Wait for status 0.5 seconds total. */
 
-int sleep_tries = 50;       /* Wait for status 0.5 seconds total. */
-
-int reset_time = 2;        /* hundreths of a second we wait after a HW reset for
+static int reset_time = 2; /* hundreths of a second we wait after a HW reset for
 			      the expected interrupt.
 			   */
 
-int ramcheck_time = 20;    /* time in seconds to wait while ROM code
-			      checks on-board RAM.
-			   */
-
-int osrun_time = 10;       /* time in seconds we wait for the OS to
-			      start running.
-			   */
-
-MODULE_PARM(wf_raw,"i");
-MODULE_PARM(fx_raw,"i");
-MODULE_PARM(debug_default,"i");
-MODULE_PARM(wait_polls,"i");
-MODULE_PARM(sleep_length,"i");
-MODULE_PARM(sleep_tries,"i");
-MODULE_PARM(ospath,"s");
-MODULE_PARM(reset_time,"i");
-MODULE_PARM(ramcheck_time,"i");
-MODULE_PARM(osrun_time,"i");
+static int ramcheck_time = 20;    /* time in seconds to wait while ROM code
+			             checks on-board RAM.
+			          */
+
+static int osrun_time = 10;  /* time in seconds we wait for the OS to
+			        start running.
+			     */
+
+module_param(wf_raw, int, 0);
+module_param(fx_raw, int, 0);
+module_param(debug_default, int, 0);
+module_param(wait_polls, int, 0);
+module_param(sleep_length, int, 0);
+module_param(sleep_tries, int, 0);
+module_param(ospath, charp, 0);
+module_param(reset_time, int, 0);
+module_param(ramcheck_time, int, 0);
+module_param(osrun_time, int, 0);
 
 /***************************************************************************/
 
@@ -2036,7 +2038,7 @@
 	}
 }
 
-int
+static int
 wavefront_oss_load_patch (int devno, int format, const char __user *addr,
 			  int offs, int count, int pmgr_flag)
 {
@@ -2165,7 +2167,7 @@
 7 Unused
 */
 
-int
+static int
 wavefront_interrupt_bits (int irq)
 
 {
@@ -2193,7 +2195,7 @@
 	return bits;
 }
 
-void
+static void
 wavefront_should_cause_interrupt (int val, int port, int timeout)
 
 {
@@ -2895,16 +2897,6 @@
 	return 0;
 }	
 
-int __init attach_wffx (void)
-{
-	if ((dev.fx_mididev = sound_alloc_mididev ()) < 0) {
-		printk (KERN_WARNING LOGNAME "cannot install FX Midi driver\n");
-		return -1;
-	}
-
-	return 0;
-}
-
 void
 wffx_mute (int onoff)
     
@@ -3490,8 +3482,8 @@
 MODULE_AUTHOR      ("Paul Barton-Davis <pbd@op.net>");
 MODULE_DESCRIPTION ("Turtle Beach WaveFront Linux Driver");
 MODULE_LICENSE("GPL");
-MODULE_PARM        (io,"i");
-MODULE_PARM        (irq,"i");
+module_param       (io, int, 0);
+module_param       (irq, int, 0);
 
 static int __init init_wavfront (void)
 {
diff -Nru a/sound/oss/ymfpci.c b/sound/oss/ymfpci.c
--- a/sound/oss/ymfpci.c	2005-01-10 20:11:20 -08:00
+++ b/sound/oss/ymfpci.c	2005-01-10 20:11:20 -08:00
@@ -124,11 +124,6 @@
  *  common I/O routines
  */
 
-static inline u8 ymfpci_readb(ymfpci_t *codec, u32 offset)
-{
-	return readb(codec->reg_area_virt + offset);
-}
-
 static inline void ymfpci_writeb(ymfpci_t *codec, u32 offset, u8 val)
 {
 	writeb(val, codec->reg_area_virt + offset);
@@ -2504,8 +2499,8 @@
 # ifdef MODULE
 static int mpu_io;
 static int synth_io;
-MODULE_PARM(mpu_io, "i");
-MODULE_PARM(synth_io, "i");
+module_param(mpu_io, int, 0);
+module_param(synth_io, int, 0);
 # else
 static int mpu_io     = 0x330;
 static int synth_io   = 0x388;
diff -Nru a/sound/pci/Kconfig b/sound/pci/Kconfig
--- a/sound/pci/Kconfig	2005-01-10 20:11:18 -08:00
+++ b/sound/pci/Kconfig	2005-01-10 20:11:18 -08:00
@@ -106,8 +106,9 @@
         depends on SND
 	select SND_PCM
         help
-	  Say Y here to include support for recording audio from TV
-	  cards based on Brooktree Bt878/Bt879 chips.
+	  If you want to record audio from TV cards based on
+	  Brooktree Bt878/Bt879 chips, say Y here and read
+	  <file:Documentation/sound/alsa/Bt87x.txt>.
 
 	  To compile this driver as a module, choose M here: the module
 	  will be called snd-bt87x.
@@ -171,6 +172,29 @@
 	  To compile this driver as a module, choose M here: the module
 	  will be called snd-emu10k1.
 
+config SND_EMU10K1X
+	tristate "Emu10k1X (Dell OEM Version)"
+	depends on SND
+	select SND_AC97_CODEC
+	select SND_RAWMIDI
+	help
+	  Say Y here to include support for the Dell OEM version of the
+	  Sound Blaster Live!.
+
+	  To compile this driver as a module, choose M here: the module
+	  will be called snd-emu10k1x.
+
+config SND_CA0106
+	tristate "SB Audigy LS / Live 24bit"
+	depends on SND
+	select SND_AC97_CODEC
+	help
+	  Say Y here to include support for the Sound Blaster Audigy LS
+	  and Live 24bit.
+
+	  To compile this driver as a module, choose M here: the module
+	  will be called snd-ca0106.
+
 config SND_KORG1212
 	tristate "Korg 1212 IO"
 	depends on SND
@@ -468,6 +492,17 @@
 
 	  To compile this driver as a module, choose M here: the module
 	  will be called snd-via82xx.
+
+config SND_VIA82XX_MODEM
+	tristate "VIA 82C686A/B, 8233 based Modems"
+	depends on SND
+	select SND_AC97_CODEC
+	help
+	  Say Y here to include support for the integrated MC97 modem on
+	  motherboards with VIA chipsets.
+
+	  To compile this driver as a module, choose M here: the module
+	  will be called snd-via82xx-modem.
 
 config SND_VX222
 	tristate "Digigram VX222"
diff -Nru a/sound/pci/Makefile b/sound/pci/Makefile
--- a/sound/pci/Makefile	2005-01-10 20:11:15 -08:00
+++ b/sound/pci/Makefile	2005-01-10 20:11:15 -08:00
@@ -22,6 +22,7 @@
 snd-rme96-objs := rme96.o
 snd-sonicvibes-objs := sonicvibes.o
 snd-via82xx-objs := via82xx.o
+snd-via82xx-modem-objs := via82xx_modem.o
 
 # Toplevel Module Dependency
 obj-$(CONFIG_SND_ALS4000) += snd-als4000.o
@@ -43,11 +44,13 @@
 obj-$(CONFIG_SND_RME96) += snd-rme96.o
 obj-$(CONFIG_SND_SONICVIBES) += snd-sonicvibes.o
 obj-$(CONFIG_SND_VIA82XX) += snd-via82xx.o
+obj-$(CONFIG_SND_VIA82XX_MODEM) += snd-via82xx-modem.o
 
 obj-$(CONFIG_SND) += \
 	ac97/ \
 	ali5451/ \
 	au88x0/ \
+	ca0106/ \
 	cs46xx/ \
 	emu10k1/ \
 	ice1712/ \
diff -Nru a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c
--- a/sound/pci/ac97/ac97_codec.c	2005-01-10 20:11:24 -08:00
+++ b/sound/pci/ac97/ac97_codec.c	2005-01-10 20:11:24 -08:00
@@ -332,11 +332,11 @@
 {
 	if (!snd_ac97_valid_reg(ac97, reg))
 		return;
-	spin_lock(&ac97->reg_lock);
+	down(&ac97->reg_mutex);
 	ac97->regs[reg] = value;
-	spin_unlock(&ac97->reg_lock);
 	ac97->bus->ops->write(ac97, reg, value);
 	set_bit(reg, ac97->reg_accessed);
+	up(&ac97->reg_mutex);
 }
 
 /**
@@ -357,14 +357,13 @@
 
 	if (!snd_ac97_valid_reg(ac97, reg))
 		return -EINVAL;
-	spin_lock(&ac97->reg_lock);
+	down(&ac97->reg_mutex);
 	change = ac97->regs[reg] != value;
 	if (change) {
 		ac97->regs[reg] = value;
-		spin_unlock(&ac97->reg_lock);
 		ac97->bus->ops->write(ac97, reg, value);
-	} else
-		spin_unlock(&ac97->reg_lock);
+	}
+	up(&ac97->reg_mutex);
 	return change;
 }
 
@@ -384,20 +383,29 @@
 int snd_ac97_update_bits(ac97_t *ac97, unsigned short reg, unsigned short mask, unsigned short value)
 {
 	int change;
-	unsigned short old, new;
 
 	if (!snd_ac97_valid_reg(ac97, reg))
 		return -EINVAL;
-	spin_lock(&ac97->reg_lock);
+	down(&ac97->reg_mutex);
+	change = snd_ac97_update_bits_nolock(ac97, reg, mask, value);
+	up(&ac97->reg_mutex);
+	return change;
+}
+
+/* no lock version - see snd_ac97_updat_bits() */
+int snd_ac97_update_bits_nolock(ac97_t *ac97, unsigned short reg,
+				unsigned short mask, unsigned short value)
+{
+	int change;
+	unsigned short old, new;
+
 	old = snd_ac97_read_cache(ac97, reg);
 	new = (old & ~mask) | value;
 	change = old != new;
 	if (change) {
 		ac97->regs[reg] = new;
-		spin_unlock(&ac97->reg_lock);
 		ac97->bus->ops->write(ac97, reg, new);
-	} else
-		spin_unlock(&ac97->reg_lock);
+	}
 	return change;
 }
 
@@ -406,15 +414,14 @@
 	int change;
 	unsigned short old, new, cfg;
 
-	down(&ac97->mutex);
-	spin_lock(&ac97->reg_lock);
+	down(&ac97->page_mutex);
 	old = ac97->spec.ad18xx.pcmreg[codec];
 	new = (old & ~mask) | value;
-	cfg = snd_ac97_read_cache(ac97, AC97_AD_SERIAL_CFG);
 	change = old != new;
 	if (change) {
+		down(&ac97->reg_mutex);
+		cfg = snd_ac97_read_cache(ac97, AC97_AD_SERIAL_CFG);
 		ac97->spec.ad18xx.pcmreg[codec] = new;
-		spin_unlock(&ac97->reg_lock);
 		/* select single codec */
 		ac97->bus->ops->write(ac97, AC97_AD_SERIAL_CFG,
 				 (cfg & ~0x7000) |
@@ -424,9 +431,9 @@
 		/* select all codecs */
 		ac97->bus->ops->write(ac97, AC97_AD_SERIAL_CFG,
 				 cfg | 0x7000);
-	} else
-		spin_unlock(&ac97->reg_lock);
-	up(&ac97->mutex);
+		up(&ac97->reg_mutex);
+	}
+	up(&ac97->page_mutex);
 	return change;
 }
 
@@ -536,104 +543,70 @@
 	return snd_ac97_update_bits(ac97, reg, 1 << shift, val << shift);
 }
 
-int snd_ac97_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+int snd_ac97_info_volsw(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
 {
 	int mask = (kcontrol->private_value >> 16) & 0xff;
+	int shift = (kcontrol->private_value >> 8) & 0x0f;
+	int rshift = (kcontrol->private_value >> 12) & 0x0f;
 
 	uinfo->type = mask == 1 ? SNDRV_CTL_ELEM_TYPE_BOOLEAN : SNDRV_CTL_ELEM_TYPE_INTEGER;
-	uinfo->count = 1;
+	uinfo->count = shift == rshift ? 1 : 2;
 	uinfo->value.integer.min = 0;
 	uinfo->value.integer.max = mask;
 	return 0;
 }
 
-int snd_ac97_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+int snd_ac97_get_volsw(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
 {
 	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
 	int reg = kcontrol->private_value & 0xff;
-	int shift = (kcontrol->private_value >> 8) & 0xff;
+	int shift = (kcontrol->private_value >> 8) & 0x0f;
+	int rshift = (kcontrol->private_value >> 12) & 0x0f;
 	int mask = (kcontrol->private_value >> 16) & 0xff;
 	int invert = (kcontrol->private_value >> 24) & 0x01;
 	
 	ucontrol->value.integer.value[0] = (snd_ac97_read_cache(ac97, reg) >> shift) & mask;
-	if (invert)
+	if (shift != rshift)
+		ucontrol->value.integer.value[1] = (snd_ac97_read_cache(ac97, reg) >> rshift) & mask;
+	if (invert) {
 		ucontrol->value.integer.value[0] = mask - ucontrol->value.integer.value[0];
+		if (shift != rshift)
+			ucontrol->value.integer.value[1] = mask - ucontrol->value.integer.value[1];
+	}
 	return 0;
 }
 
-int snd_ac97_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+int snd_ac97_put_volsw(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
 {
 	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
 	int reg = kcontrol->private_value & 0xff;
-	int shift = (kcontrol->private_value >> 8) & 0xff;
+	int shift = (kcontrol->private_value >> 8) & 0x0f;
+	int rshift = (kcontrol->private_value >> 12) & 0x0f;
 	int mask = (kcontrol->private_value >> 16) & 0xff;
 	int invert = (kcontrol->private_value >> 24) & 0x01;
-	unsigned short val;
+	unsigned short val, val2, val_mask;
 	
 	val = (ucontrol->value.integer.value[0] & mask);
 	if (invert)
 		val = mask - val;
-	return snd_ac97_update_bits(ac97, reg, mask << shift, val << shift);
+	val_mask = mask << shift;
+	val = val << shift;
+	if (shift != rshift) {
+		val2 = (ucontrol->value.integer.value[1] & mask);
+		if (invert)
+			val2 = mask - val2;
+		val_mask |= mask << rshift;
+		val |= val2 << rshift;
+	}
+	return snd_ac97_update_bits(ac97, reg, val_mask, val);
 }
 
 #define AC97_DOUBLE(xname, reg, shift_left, shift_right, mask, invert) \
-{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), .info = snd_ac97_info_double, \
-  .get = snd_ac97_get_double, .put = snd_ac97_put_double, \
+{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), .info = snd_ac97_info_volsw, \
+  .get = snd_ac97_get_volsw, .put = snd_ac97_put_volsw, \
   .private_value = (reg) | ((shift_left) << 8) | ((shift_right) << 12) | ((mask) << 16) | ((invert) << 24) }
 
-static int snd_ac97_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
-{
-	int mask = (kcontrol->private_value >> 16) & 0xff;
-
-	uinfo->type = mask == 1 ? SNDRV_CTL_ELEM_TYPE_BOOLEAN : SNDRV_CTL_ELEM_TYPE_INTEGER;
-	uinfo->count = 2;
-	uinfo->value.integer.min = 0;
-	uinfo->value.integer.max = mask;
-	return 0;
-}
-
-static int snd_ac97_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
-{
-	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
-	int reg = kcontrol->private_value & 0xff;
-	int shift_left = (kcontrol->private_value >> 8) & 0x0f;
-	int shift_right = (kcontrol->private_value >> 12) & 0x0f;
-	int mask = (kcontrol->private_value >> 16) & 0xff;
-	int invert = (kcontrol->private_value >> 24) & 0xff;
-	
-	spin_lock(&ac97->reg_lock);
-	ucontrol->value.integer.value[0] = (snd_ac97_read_cache(ac97, reg) >> shift_left) & mask;
-	ucontrol->value.integer.value[1] = (snd_ac97_read_cache(ac97, reg) >> shift_right) & mask;
-	spin_unlock(&ac97->reg_lock);
-	if (invert) {
-		ucontrol->value.integer.value[0] = mask - ucontrol->value.integer.value[0];
-		ucontrol->value.integer.value[1] = mask - ucontrol->value.integer.value[1];
-	}
-	return 0;
-}
-
-static int snd_ac97_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
-{
-	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
-	int reg = kcontrol->private_value & 0xff;
-	int shift_left = (kcontrol->private_value >> 8) & 0x0f;
-	int shift_right = (kcontrol->private_value >> 12) & 0x0f;
-	int mask = (kcontrol->private_value >> 16) & 0xff;
-	int invert = (kcontrol->private_value >> 24) & 0xff;
-	unsigned short val1, val2;
-	
-	val1 = ucontrol->value.integer.value[0] & mask;
-	val2 = ucontrol->value.integer.value[1] & mask;
-	if (invert) {
-		val1 = mask - val1;
-		val2 = mask - val2;
-	}
-	return snd_ac97_update_bits(ac97, reg, 
-				    (mask << shift_left) | (mask << shift_right),
-				    (val1 << shift_left) | (val2 << shift_right));
-}
-
-int snd_ac97_getput_page(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol,
+static int snd_ac97_getput_page(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol,
 			 int (*func)(snd_kcontrol_t *, snd_ctl_elem_value_t *))
 {
 	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
@@ -644,27 +617,27 @@
 	    (reg >= 0x60 && reg < 0x70)) {
 		unsigned short page_save;
 		unsigned short page = (kcontrol->private_value >> 25) & 0x0f;
-		down(&ac97->mutex); /* lock paging */
+		down(&ac97->page_mutex); /* lock paging */
 		page_save = snd_ac97_read(ac97, AC97_INT_PAGING) & AC97_PAGE_MASK;
 		snd_ac97_update_bits(ac97, AC97_INT_PAGING, AC97_PAGE_MASK, page);
 		err = func(kcontrol, ucontrol);
 		snd_ac97_update_bits(ac97, AC97_INT_PAGING, AC97_PAGE_MASK, page_save);
-		up(&ac97->mutex); /* unlock paging */
+		up(&ac97->page_mutex); /* unlock paging */
 	} else
 		err = func(kcontrol, ucontrol);
 	return err;
 }
 
 /* for rev2.3 paging */
-int snd_ac97_page_get_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+int snd_ac97_page_get_volsw(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
 {
-	return snd_ac97_getput_page(kcontrol, ucontrol, snd_ac97_get_single);
+	return snd_ac97_getput_page(kcontrol, ucontrol, snd_ac97_get_volsw);
 }
 
 /* for rev2.3 paging */
-int snd_ac97_page_put_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+int snd_ac97_page_put_volsw(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
 {
-	return snd_ac97_getput_page(kcontrol, ucontrol, snd_ac97_put_single);
+	return snd_ac97_getput_page(kcontrol, ucontrol, snd_ac97_put_volsw);
 }
 
 static const snd_kcontrol_new_t snd_ac97_controls_master_mono[2] = {
@@ -682,16 +655,9 @@
 AC97_SINGLE("PC Speaker Playback Volume", AC97_PC_BEEP, 1, 15, 1)
 };
 
-static const snd_kcontrol_new_t snd_ac97_controls_phone[2] = {
-AC97_SINGLE("Phone Playback Switch", AC97_PHONE, 15, 1, 1),
-AC97_SINGLE("Phone Playback Volume", AC97_PHONE, 0, 15, 1)
-};
+static const snd_kcontrol_new_t snd_ac97_controls_mic_boost =
+	AC97_SINGLE("Mic Boost (+20dB)", AC97_MIC, 6, 1, 0);
 
-static const snd_kcontrol_new_t snd_ac97_controls_mic[3] = {
-AC97_SINGLE("Mic Playback Switch", AC97_MIC, 15, 1, 1),
-AC97_SINGLE("Mic Playback Volume", AC97_MIC, 0, 15, 1),
-AC97_SINGLE("Mic Boost (+20dB)", AC97_MIC, 6, 1, 0)
-};
 
 static const snd_kcontrol_new_t snd_ac97_control_capture_src = {
 	.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
@@ -793,12 +759,12 @@
 {
 	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
 
-	spin_lock(&ac97->reg_lock);
+	down(&ac97->reg_mutex);
 	ucontrol->value.iec958.status[0] = ac97->spdif_status & 0xff;
 	ucontrol->value.iec958.status[1] = (ac97->spdif_status >> 8) & 0xff;
 	ucontrol->value.iec958.status[2] = (ac97->spdif_status >> 16) & 0xff;
 	ucontrol->value.iec958.status[3] = (ac97->spdif_status >> 24) & 0xff;
-	spin_unlock(&ac97->reg_lock);
+	up(&ac97->reg_mutex);
 	return 0;
 }
                         
@@ -809,7 +775,6 @@
 	unsigned short val = 0;
 	int change;
 
-	spin_lock(&ac97->reg_lock);
 	new = val = ucontrol->value.iec958.status[0] & (IEC958_AES0_PROFESSIONAL|IEC958_AES0_NONAUDIO);
 	if (ucontrol->value.iec958.status[0] & IEC958_AES0_PROFESSIONAL) {
 		new |= ucontrol->value.iec958.status[0] & (IEC958_AES0_PRO_FS|IEC958_AES0_PRO_EMPHASIS_5015);
@@ -838,9 +803,9 @@
 		}
 	}
 
+	down(&ac97->reg_mutex);
 	change = ac97->spdif_status != new;
 	ac97->spdif_status = new;
-	spin_unlock(&ac97->reg_lock);
 
 	if (ac97->flags & AC97_CS_SPDIF) {
 		int x = (val >> 12) & 0x03;
@@ -849,23 +814,24 @@
 		case 2: x = 0; break;  // 48.0
 		default: x = 0; break; // illegal.
 		}
-		change |= snd_ac97_update_bits(ac97, AC97_CSR_SPDIF, 0x3fff, ((val & 0xcfff) | (x << 12)));
+		change |= snd_ac97_update_bits_nolock(ac97, AC97_CSR_SPDIF, 0x3fff, ((val & 0xcfff) | (x << 12)));
 	} else if (ac97->flags & AC97_CX_SPDIF) {
 		int v;
 		v = new & (IEC958_AES0_CON_EMPHASIS_5015|IEC958_AES0_CON_NOT_COPYRIGHT) ? 0 : AC97_CXR_COPYRGT;
 		v |= new & IEC958_AES0_NONAUDIO ? AC97_CXR_SPDIF_AC3 : AC97_CXR_SPDIF_PCM;
-		change |= snd_ac97_update_bits(ac97, AC97_CXR_AUDIO_MISC, 
-					       AC97_CXR_SPDIF_MASK | AC97_CXR_COPYRGT,
-					       v);
+		change |= snd_ac97_update_bits_nolock(ac97, AC97_CXR_AUDIO_MISC, 
+						      AC97_CXR_SPDIF_MASK | AC97_CXR_COPYRGT,
+						      v);
 	} else {
 		unsigned short extst = snd_ac97_read_cache(ac97, AC97_EXTENDED_STATUS);
-		snd_ac97_update_bits(ac97, AC97_EXTENDED_STATUS, AC97_EA_SPDIF, 0); /* turn off */
+		snd_ac97_update_bits_nolock(ac97, AC97_EXTENDED_STATUS, AC97_EA_SPDIF, 0); /* turn off */
 
-		change |= snd_ac97_update_bits(ac97, AC97_SPDIF, 0x3fff, val);
+		change |= snd_ac97_update_bits_nolock(ac97, AC97_SPDIF, 0x3fff, val);
 		if (extst & AC97_EA_SPDIF) {
-			snd_ac97_update_bits(ac97, AC97_EXTENDED_STATUS, AC97_EA_SPDIF, AC97_EA_SPDIF); /* turn on again */
+			snd_ac97_update_bits_nolock(ac97, AC97_EXTENDED_STATUS, AC97_EA_SPDIF, AC97_EA_SPDIF); /* turn on again */
                 }
 	}
+	up(&ac97->reg_mutex);
 
 	return change;
 }
@@ -878,26 +844,26 @@
 	int mask = (kcontrol->private_value >> 16) & 0xff;
 	// int invert = (kcontrol->private_value >> 24) & 0xff;
 	unsigned short value, old, new;
+	int change;
 
 	value = (ucontrol->value.integer.value[0] & mask);
 
+	down(&ac97->reg_mutex);
 	mask <<= shift;
 	value <<= shift;
-	spin_lock(&ac97->reg_lock);
 	old = snd_ac97_read_cache(ac97, reg);
 	new = (old & ~mask) | value;
-	spin_unlock(&ac97->reg_lock);
+	change = old != new;
 
-	if (old != new) {
-		int change;
+	if (change) {
 		unsigned short extst = snd_ac97_read_cache(ac97, AC97_EXTENDED_STATUS);
-		snd_ac97_update_bits(ac97, AC97_EXTENDED_STATUS, AC97_EA_SPDIF, 0); /* turn off */
-		change = snd_ac97_update_bits(ac97, reg, mask, value);
+		snd_ac97_update_bits_nolock(ac97, AC97_EXTENDED_STATUS, AC97_EA_SPDIF, 0); /* turn off */
+		change = snd_ac97_update_bits_nolock(ac97, reg, mask, value);
 		if (extst & AC97_EA_SPDIF)
-			snd_ac97_update_bits(ac97, AC97_EXTENDED_STATUS, AC97_EA_SPDIF, AC97_EA_SPDIF); /* turn on again */
-		return change;
+			snd_ac97_update_bits_nolock(ac97, AC97_EXTENDED_STATUS, AC97_EA_SPDIF, AC97_EA_SPDIF); /* turn on again */
 	}
-	return 0;
+	up(&ac97->reg_mutex);
+	return change;
 }
 
 const snd_kcontrol_new_t snd_ac97_controls_spdif[5] = {
@@ -927,8 +893,8 @@
 	{
 		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
 		.name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,NONE) "AC97-SPSA",
-		.info = snd_ac97_info_single,
-		.get = snd_ac97_get_single,
+		.info = snd_ac97_info_volsw,
+		.get = snd_ac97_get_volsw,
 		.put = snd_ac97_put_spsa,
 		.private_value = AC97_SINGLE_VALUE(AC97_EXTENDED_STATUS, 4, 3, 0)
 	},
@@ -1007,10 +973,10 @@
 	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
 	int codec = kcontrol->private_value & 3;
 	
-	spin_lock(&ac97->reg_lock);
+	down(&ac97->page_mutex);
 	ucontrol->value.integer.value[0] = 31 - ((ac97->spec.ad18xx.pcmreg[codec] >> 0) & 31);
 	ucontrol->value.integer.value[1] = 31 - ((ac97->spec.ad18xx.pcmreg[codec] >> 8) & 31);
-	spin_unlock(&ac97->reg_lock);
+	up(&ac97->page_mutex);
 	return 0;
 }
 
@@ -1055,8 +1021,7 @@
 {
 	if (bus) {
 		snd_ac97_bus_proc_done(bus);
-		if (bus->pcms)
-			kfree(bus->pcms);
+		kfree(bus->pcms);
 		if (bus->private_free)
 			bus->private_free(bus);
 		kfree(bus);
@@ -1148,6 +1113,26 @@
 	return 1;		/* success, useable */
 }
 
+static void check_volume_resolution(ac97_t *ac97, int reg, unsigned char *lo_max, unsigned char *hi_max)
+{
+	unsigned short cbit[3] = { 0x20, 0x10, 0x01 };
+	unsigned char max[3] = { 63, 31, 15 };
+	int i;
+
+	*lo_max = *hi_max = 0;
+	for (i = 0 ; i < ARRAY_SIZE(cbit); i++) {
+		unsigned short val;
+		snd_ac97_write(ac97, reg, 0x8080 | cbit[i] | (cbit[i] << 8));
+		val = snd_ac97_read(ac97, reg);
+		if (! *lo_max && (val & cbit[i]))
+			*lo_max = max[i];
+		if (! *hi_max && (val & (cbit[i] << 8)))
+			*hi_max = max[i];
+		if (*lo_max && *hi_max)
+			break;
+	}
+}
+
 int snd_ac97_try_bit(ac97_t * ac97, int reg, int bit)
 {
 	unsigned short mask, val, orig, res;
@@ -1161,21 +1146,6 @@
 	return res == val;
 }
 
-static void snd_ac97_change_volume_params1(ac97_t * ac97, int reg, unsigned char *max)
-{
-	unsigned short val, val1;
-
-	*max = 63;
-	val = 0x8000 | 0x0020;
-	snd_ac97_write(ac97, reg, val);
-	val1 = snd_ac97_read(ac97, reg);
-	if (val != val1) {
-		*max = 31;
-	}
-	/* reset volume to zero */
-	snd_ac97_write_cache(ac97, reg, 0x8000);
-}
-
 /* check the volume resolution of center/lfe */
 static void snd_ac97_change_volume_params2(ac97_t * ac97, int reg, int shift, unsigned char *max)
 {
@@ -1192,34 +1162,6 @@
 	snd_ac97_write_cache(ac97, reg, 0x8080);
 }
 
-/* check whether the volume resolution is 4 or 5 bits */
-static void snd_ac97_change_volume_params3(ac97_t * ac97, int reg, unsigned char *max)
-{
-	unsigned short val, val1;
-
-	*max = 31;
-	val = 0x8000 | 0x0010;
-	snd_ac97_write(ac97, reg, val);
-	val1 = snd_ac97_read(ac97, reg);
-	if (val != val1) {
-		*max = 15;
-	}
-	/* reset volume to zero */
-	snd_ac97_write_cache(ac97, reg, 0x8000);
-}
-
-/* check whether the volume is mono or stereo */
-static int snd_ac97_is_stereo_vol(ac97_t *ac97, int reg)
-{
-	unsigned short val, val1, val2;
-	val = snd_ac97_read(ac97, reg);
-	val1 = val | 0x8000 | (0x01 << 8);
-	snd_ac97_write(ac97, reg, val1);
-	val2 = snd_ac97_read(ac97, reg);
-	snd_ac97_write(ac97, reg, val); /* restore */
-	return val1 == val2;
-}
-
 static inline int printable(unsigned int x)
 {
 	x &= 0xff;
@@ -1246,22 +1188,22 @@
 static int snd_ac97_cmute_new(snd_card_t *card, char *name, int reg, ac97_t *ac97)
 {
 	snd_kcontrol_t *kctl;
-	int stereo = 0;
+	int err;
+	unsigned short val, val1, mute_mask;
 
 	if (! snd_ac97_valid_reg(ac97, reg))
 		return 0;
 
+	mute_mask = 0x8000;
+	val = snd_ac97_read(ac97, reg);
 	if (ac97->flags & AC97_STEREO_MUTES) {
 		/* check whether both mute bits work */
-		unsigned short val, val1;
-		val = snd_ac97_read(ac97, reg);
 		val1 = val | 0x8080;
 		snd_ac97_write(ac97, reg, val1);
 		if (val1 == snd_ac97_read(ac97, reg))
-			stereo = 1;
-		snd_ac97_write(ac97, reg, val);
+			mute_mask = 0x8080;
 	}
-	if (stereo) {
+	if (mute_mask == 0x8080) {
 		snd_kcontrol_new_t tmp = AC97_DOUBLE(name, reg, 15, 7, 1, 1);
 		tmp.index = ac97->num;
 		kctl = snd_ctl_new1(&tmp, ac97);
@@ -1270,50 +1212,68 @@
 		tmp.index = ac97->num;
 		kctl = snd_ctl_new1(&tmp, ac97);
 	}
-	return snd_ctl_add(card, kctl);
+	err = snd_ctl_add(card, kctl);
+	if (err < 0)
+		return err;
+	/* mute as default */
+	snd_ac97_write_cache(ac97, reg, val | mute_mask);
+	return 0;
 }
 
 /*
- * create volumes for normal stereo controls
+ * create a volume for normal stereo/mono controls
  */
-static int snd_ac97_cvol_new(snd_card_t *card, char *name, int reg, unsigned int max, ac97_t *ac97)
+static int snd_ac97_cvol_new(snd_card_t *card, char *name, int reg, unsigned int lo_max,
+			     unsigned int hi_max, ac97_t *ac97)
 {
 	int err;
-	snd_kcontrol_new_t tmp = AC97_DOUBLE(name, reg, 8, 0, (unsigned int)max, 1);
-	tmp.index = ac97->num;
+	snd_kcontrol_t *kctl;
 
 	if (! snd_ac97_valid_reg(ac97, reg))
 		return 0;
-	if ((err = snd_ctl_add(card, snd_ctl_new1(&tmp, ac97))) < 0)
+	if (hi_max) {
+		/* invert */
+		snd_kcontrol_new_t tmp = AC97_DOUBLE(name, reg, 8, 0, lo_max, 1);
+		tmp.index = ac97->num;
+		kctl = snd_ctl_new1(&tmp, ac97);
+	} else {
+		/* invert */
+		snd_kcontrol_new_t tmp = AC97_SINGLE(name, reg, 0, lo_max, 1);
+		tmp.index = ac97->num;
+		kctl = snd_ctl_new1(&tmp, ac97);
+	}
+	err = snd_ctl_add(card, kctl);
+	if (err < 0)
 		return err;
 	snd_ac97_write_cache(ac97, reg,
-			     ((ac97->flags & AC97_STEREO_MUTES) ? 0x8080 : 0x8000) |
-			     (unsigned short)max | ((unsigned short)max << 8));
+			     (snd_ac97_read(ac97, reg) & 0x8080) |
+			     lo_max | (hi_max << 8));
 	return 0;
 }
 
 /*
- * create mute-switch and volumes for normal stereo controls
+ * create a mute-switch and a volume for normal stereo/mono controls
  */
-static int snd_ac97_cmix_new(snd_card_t *card, const char *pfx, int reg, int check_res, ac97_t *ac97)
+static int snd_ac97_cmix_new(snd_card_t *card, const char *pfx, int reg, ac97_t *ac97)
 {
 	int err;
 	char name[44];
-	unsigned char max;
+	unsigned char lo_max, hi_max;
 
 	if (! snd_ac97_valid_reg(ac97, reg))
 		return 0;
 
-	sprintf(name, "%s Switch", pfx);
-	if ((err = snd_ac97_cmute_new(card, name, reg, ac97)) < 0)
-		return err;
-	sprintf(name, "%s Volume", pfx);
-	if (check_res)
-		snd_ac97_change_volume_params1(ac97, reg, &max);
-	else
-		max = 31; /* 5bit */
-	if ((err = snd_ac97_cvol_new(card, name, reg, max, ac97)) < 0)
-		return err;
+	if (snd_ac97_try_bit(ac97, reg, 15)) {
+		sprintf(name, "%s Switch", pfx);
+		if ((err = snd_ac97_cmute_new(card, name, reg, ac97)) < 0)
+			return err;
+	}
+	check_volume_resolution(ac97, reg, &lo_max, &hi_max);
+	if (lo_max) {
+		sprintf(name, "%s Volume", pfx);
+		if ((err = snd_ac97_cvol_new(card, name, reg, lo_max, hi_max, ac97)) < 0)
+			return err;
+	}
 	return 0;
 }
 
@@ -1331,7 +1291,11 @@
 	/* build master controls */
 	/* AD claims to remove this control from AD1887, although spec v2.2 does not allow this */
 	if (snd_ac97_try_volume_mix(ac97, AC97_MASTER)) {
-		if ((err = snd_ac97_cmix_new(card, "Master Playback", AC97_MASTER, 1, ac97)) < 0)
+		if (ac97->flags & AC97_HAS_NO_MASTER_VOL)
+			err = snd_ac97_cmute_new(card, "Master Playback Switch", AC97_MASTER, ac97);
+		else
+			err = snd_ac97_cmix_new(card, "Master Playback", AC97_MASTER, ac97);
+		if (err < 0)
 			return err;
 	}
 
@@ -1363,32 +1327,20 @@
 
 	/* build surround controls */
 	if (snd_ac97_try_volume_mix(ac97, AC97_SURROUND_MASTER)) {
-		if ((err = snd_ctl_add(card, snd_ac97_cnew(&snd_ac97_controls_surround[0], ac97))) < 0)
-			return err;
-		if ((err = snd_ctl_add(card, kctl = snd_ac97_cnew(&snd_ac97_controls_surround[1], ac97))) < 0)
+		if ((err = snd_ac97_cmix_new(card, "Surround Playback", AC97_SURROUND_MASTER, ac97)) < 0)
 			return err;
-		snd_ac97_change_volume_params2(ac97, AC97_SURROUND_MASTER, 0, &max);
-		kctl->private_value &= ~(0xff << 16);
-		kctl->private_value |= (int)max << 16;
-		snd_ac97_write_cache(ac97, AC97_SURROUND_MASTER, 0x8080 | max | (max << 8));
 	}
 
 	/* build headphone controls */
 	if (snd_ac97_try_volume_mix(ac97, AC97_HEADPHONE)) {
-		if ((err = snd_ac97_cmix_new(card, "Headphone Playback", AC97_HEADPHONE, 1, ac97)) < 0)
+		if ((err = snd_ac97_cmix_new(card, "Headphone Playback", AC97_HEADPHONE, ac97)) < 0)
 			return err;
 	}
 	
 	/* build master mono controls */
 	if (snd_ac97_try_volume_mix(ac97, AC97_MASTER_MONO)) {
-		if ((err = snd_ctl_add(card, snd_ac97_cnew(&snd_ac97_controls_master_mono[0], ac97))) < 0)
-			return err;
-		if ((err = snd_ctl_add(card, kctl = snd_ac97_cnew(&snd_ac97_controls_master_mono[1], ac97))) < 0)
+		if ((err = snd_ac97_cmix_new(card, "Master Mono Playback", AC97_MASTER_MONO, ac97)) < 0)
 			return err;
-		snd_ac97_change_volume_params1(ac97, AC97_MASTER_MONO, &max);
-		kctl->private_value &= ~(0xff << 16);
-		kctl->private_value |= (int)max << 16;
-		snd_ac97_write_cache(ac97, AC97_MASTER_MONO, 0x8000 | max);
 	}
 	
 	/* build master tone controls */
@@ -1416,56 +1368,39 @@
 	
 	/* build Phone controls */
 	if (snd_ac97_try_volume_mix(ac97, AC97_PHONE)) {
-		if ((err = snd_ctl_add(card, snd_ac97_cnew(&snd_ac97_controls_phone[0], ac97))) < 0)
+		if ((err = snd_ac97_cmix_new(card, "Phone Playback", AC97_PHONE, ac97)) < 0)
 			return err;
-		if ((err = snd_ctl_add(card, kctl = snd_ac97_cnew(&snd_ac97_controls_phone[1], ac97))) < 0)
-			return err;
-		snd_ac97_change_volume_params3(ac97, AC97_PHONE, &max);
-		kctl->private_value &= ~(0xff << 16);
-		kctl->private_value |= (int)max << 16;
-		snd_ac97_write_cache(ac97, AC97_PHONE, 0x8000 | max);
 	}
 	
 	/* build MIC controls */
-	snd_ac97_change_volume_params3(ac97, AC97_MIC, &max);
-	if (snd_ac97_is_stereo_vol(ac97, AC97_MIC)) {
-		/* build stereo mic */
-		if ((err = snd_ac97_cmute_new(card, "Mic Playback Switch", AC97_MIC, ac97)) < 0)
-			return err;
-		if ((err = snd_ac97_cvol_new(card, "Mic Playback Volume", AC97_MIC, max, ac97)) < 0)
+	if (snd_ac97_try_volume_mix(ac97, AC97_MIC)) {
+		if ((err = snd_ac97_cmix_new(card, "Mic Playback", AC97_MIC, ac97)) < 0)
 			return err;
-		if ((err = snd_ctl_add(card, snd_ac97_cnew(&snd_ac97_controls_mic[2], ac97))) < 0)
+		if ((err = snd_ctl_add(card, snd_ac97_cnew(&snd_ac97_controls_mic_boost, ac97))) < 0)
 			return err;
-	} else {
-		/* build mono mic */
-		for (idx = 0; idx < 3; idx++) {
-			if ((err = snd_ctl_add(card, kctl = snd_ac97_cnew(&snd_ac97_controls_mic[idx], ac97))) < 0)
-				return err;
-			if (idx == 1) {		// volume
-				kctl->private_value &= ~(0xff << 16);
-				kctl->private_value |= (int)max << 16;
-			}
-		}
-		snd_ac97_write_cache(ac97, AC97_MIC, 0x8000 | max);
 	}
 
 	/* build Line controls */
-	if ((err = snd_ac97_cmix_new(card, "Line Playback", AC97_LINE, 0, ac97)) < 0)
-		return err;
+	if (snd_ac97_try_volume_mix(ac97, AC97_LINE)) {
+		if ((err = snd_ac97_cmix_new(card, "Line Playback", AC97_LINE, ac97)) < 0)
+			return err;
+	}
 	
 	/* build CD controls */
-	if ((err = snd_ac97_cmix_new(card, "CD Playback", AC97_CD, 0, ac97)) < 0)
-		return err;
+	if (snd_ac97_try_volume_mix(ac97, AC97_CD)) {
+		if ((err = snd_ac97_cmix_new(card, "CD Playback", AC97_CD, ac97)) < 0)
+			return err;
+	}
 	
 	/* build Video controls */
 	if (snd_ac97_try_volume_mix(ac97, AC97_VIDEO)) {
-		if ((err = snd_ac97_cmix_new(card, "Video Playback", AC97_VIDEO, 0, ac97)) < 0)
+		if ((err = snd_ac97_cmix_new(card, "Video Playback", AC97_VIDEO, ac97)) < 0)
 			return err;
 	}
 
 	/* build Aux controls */
 	if (snd_ac97_try_volume_mix(ac97, AC97_AUX)) {
-		if ((err = snd_ac97_cmix_new(card, "Aux Playback", AC97_AUX, 0, ac97)) < 0)
+		if ((err = snd_ac97_cmix_new(card, "Aux Playback", AC97_AUX, ac97)) < 0)
 			return err;
 	}
 
@@ -1497,15 +1432,12 @@
 		}
 		snd_ac97_write_cache(ac97, AC97_PCM, init_val);
 	} else {
-		if ((err = snd_ac97_cmute_new(card, "PCM Playback Switch", AC97_PCM, ac97)) < 0)
+		if (ac97->flags & AC97_HAS_NO_PCM_VOL)
+			err = snd_ac97_cmute_new(card, "PCM Playback Switch", AC97_PCM, ac97);
+		else
+			err = snd_ac97_cmix_new(card, "PCM Playback", AC97_PCM, ac97);
+		if (err < 0)
 			return err;
-		/* FIXME: C-Media chips have no PCM volume!! */
-		if (ac97->id == AC97_ID_CM9739)
-			snd_ac97_write_cache(ac97, AC97_PCM, 0x9f1f);
-		else {
-			if ((err = snd_ac97_cvol_new(card, "PCM Playback Volume", AC97_PCM, 31, ac97)) < 0)
-				return err;
-		}
 	}
 
 	/* build Capture controls */
@@ -1662,6 +1594,14 @@
 {
 	unsigned int result = 0;
 
+	if (ac97->bus->no_vra) {
+		*r_result = SNDRV_PCM_RATE_48000;
+		if ((ac97->flags & AC97_DOUBLE_RATE) &&
+		    reg == AC97_PCM_FRONT_DAC_RATE)
+			*r_result |= SNDRV_PCM_RATE_96000;
+		return;
+	}
+
 	if ((ac97->ext_id & AC97_EI_DRA) && reg == AC97_PCM_FRONT_DAC_RATE)
 		snd_ac97_update_bits(ac97, AC97_EXTENDED_STATUS,
 				     AC97_EA_DRA, 0);
@@ -1863,7 +1803,7 @@
 	bus->clock = 48000;
 	spin_lock_init(&bus->bus_lock);
 	snd_ac97_bus_proc_init(bus);
-	if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, bus, &dev_ops)) < 0) {
+	if ((err = snd_device_new(card, SNDRV_DEV_BUS, bus, &dev_ops)) < 0) {
 		snd_ac97_bus_free(bus);
 		return err;
 	}
@@ -1936,8 +1876,8 @@
 	ac97->limited_regs = template->limited_regs;
 	memcpy(ac97->reg_accessed, template->reg_accessed, sizeof(ac97->reg_accessed));
 	bus->codec[ac97->num] = ac97;
-	spin_lock_init(&ac97->reg_lock);
-	init_MUTEX(&ac97->mutex);
+	init_MUTEX(&ac97->reg_mutex);
+	init_MUTEX(&ac97->page_mutex);
 
 	if (ac97->pci) {
 		pci_read_config_word(ac97->pci, PCI_SUBSYSTEM_VENDOR_ID, &ac97->subsystem_vendor);
@@ -1968,7 +1908,8 @@
       __access_ok:
 	ac97->id = snd_ac97_read(ac97, AC97_VENDOR_ID1) << 16;
 	ac97->id |= snd_ac97_read(ac97, AC97_VENDOR_ID2);
-	if (ac97->id == 0x00000000 || ac97->id == 0xffffffff) {
+	if (! (ac97->scaps & AC97_SCAP_DETECT_BY_VENDOR) &&
+	    (ac97->id == 0x00000000 || ac97->id == 0xffffffff)) {
 		snd_printk(KERN_ERR "AC'97 %d access is not valid [0x%x], removing mixer.\n", ac97->num, ac97->id);
 		snd_ac97_free(ac97);
 		return -EIO;
@@ -2064,9 +2005,11 @@
 		ac97->addr = (ac97->ext_id & AC97_EI_ADDR_MASK) >> AC97_EI_ADDR_SHIFT;
 	else
 		ac97->addr = (ac97->ext_mid & AC97_MEI_ADDR_MASK) >> AC97_MEI_ADDR_SHIFT;
-	if (ac97->ext_id & 0x0189) {	/* L/R, MIC, SDAC, LDAC VRA support */
+	if (ac97->ext_id & 0x01c9) {	/* L/R, MIC, SDAC, LDAC VRA support */
 		reg = snd_ac97_read(ac97, AC97_EXTENDED_STATUS);
-		reg |= ac97->ext_id & 0x0189;
+		reg |= ac97->ext_id & 0x01c0; /* LDAC/SDAC/CDAC */
+		if (! bus->no_vra)
+			reg |= ac97->ext_id & 0x0009; /* VRA/VRM */
 		snd_ac97_write_cache(ac97, AC97_EXTENDED_STATUS, reg);
 	}
 	if ((ac97->ext_id & AC97_EI_DRA) && bus->dra) {
@@ -2108,6 +2051,7 @@
 	snd_ac97_get_name(ac97, ac97->id, name, !ac97_is_audio(ac97));
 	snd_ac97_get_name(NULL, ac97->id, name, !ac97_is_audio(ac97));  // ac97->id might be changed in the special setup code
 	if (ac97_is_audio(ac97)) {
+		char comp[16];
 		if (card->mixername[0] == '\0') {
 			strcpy(card->mixername, name);
 		} else {
@@ -2116,7 +2060,8 @@
 				strcat(card->mixername, name);
 			}
 		}
-		if ((err = snd_component_add(card, "AC97a")) < 0) {
+		sprintf(comp, "AC97a:%08x", ac97->id);
+		if ((err = snd_component_add(card, comp)) < 0) {
 			snd_ac97_free(ac97);
 			return err;
 		}
@@ -2126,6 +2071,7 @@
 		}
 	}
 	if (ac97_is_modem(ac97)) {
+		char comp[16];
 		if (card->mixername[0] == '\0') {
 			strcpy(card->mixername, name);
 		} else {
@@ -2134,7 +2080,8 @@
 				strcat(card->mixername, name);
 			}
 		}
-		if ((err = snd_component_add(card, "AC97m")) < 0) {
+		sprintf(comp, "AC97m:%08x", ac97->id);
+		if ((err = snd_component_add(card, comp)) < 0) {
 			snd_ac97_free(ac97);
 			return err;
 		}
@@ -2153,7 +2100,7 @@
 		snd_ac97_write_cache(ac97, AC97_EXTENDED_STATUS, reg);
 	}
 	snd_ac97_proc_init(ac97);
-	if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, ac97, &ops)) < 0) {
+	if ((err = snd_device_new(card, SNDRV_DEV_CODEC, ac97, &ops)) < 0) {
 		snd_ac97_free(ac97);
 		return err;
 	}
@@ -2213,6 +2160,46 @@
 	snd_ac97_powerdown(ac97);
 }
 
+/*
+ * restore ac97 status
+ */
+void snd_ac97_restore_status(ac97_t *ac97)
+{
+	int i;
+
+	for (i = 2; i < 0x7c ; i += 2) {
+		if (i == AC97_POWERDOWN || i == AC97_EXTENDED_ID)
+			continue;
+		/* restore only accessible registers
+		 * some chip (e.g. nm256) may hang up when unsupported registers
+		 * are accessed..!
+		 */
+		if (test_bit(i, ac97->reg_accessed)) {
+			snd_ac97_write(ac97, i, ac97->regs[i]);
+			snd_ac97_read(ac97, i);
+		}
+	}
+}
+
+/*
+ * restore IEC958 status
+ */
+void snd_ac97_restore_iec958(ac97_t *ac97)
+{
+	if (ac97->ext_id & AC97_EI_SPDIF) {
+		if (ac97->regs[AC97_EXTENDED_STATUS] & AC97_EA_SPDIF) {
+			/* reset spdif status */
+			snd_ac97_update_bits(ac97, AC97_EXTENDED_STATUS, AC97_EA_SPDIF, 0);
+			snd_ac97_write(ac97, AC97_EXTENDED_STATUS, ac97->regs[AC97_EXTENDED_STATUS]);
+			if (ac97->flags & AC97_CS_SPDIF)
+				snd_ac97_write(ac97, AC97_CSR_SPDIF, ac97->regs[AC97_CSR_SPDIF]);
+			else
+				snd_ac97_write(ac97, AC97_SPDIF, ac97->regs[AC97_SPDIF]);
+			snd_ac97_update_bits(ac97, AC97_EXTENDED_STATUS, AC97_EA_SPDIF, AC97_EA_SPDIF); /* turn on again */
+		}
+	}
+}
+
 /**
  * snd_ac97_resume - General resume function for AC97 codec
  * @ac97: the ac97 instance
@@ -2222,7 +2209,7 @@
  */
 void snd_ac97_resume(ac97_t *ac97)
 {
-	int i, is_ad18xx, codec;
+	int i;
 
 	if (ac97->bus->ops->reset) {
 		ac97->bus->ops->reset(ac97);
@@ -2264,72 +2251,18 @@
 	if (ac97->bus->ops->init)
 		ac97->bus->ops->init(ac97);
 
-	is_ad18xx = (ac97->flags & AC97_AD_MULTI);
-	if (is_ad18xx) {
-		/* restore the AD18xx codec configurations */
-		for (codec = 0; codec < 3; codec++) {
-			if (! ac97->spec.ad18xx.id[codec])
-				continue;
-			/* select single codec */
-			snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG, 0x7000,
-					     ac97->spec.ad18xx.unchained[codec] | ac97->spec.ad18xx.chained[codec]);
-			ac97->bus->ops->write(ac97, AC97_AD_CODEC_CFG, ac97->spec.ad18xx.codec_cfg[codec]);
-		}
-		/* select all codecs */
-		snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG, 0x7000, 0x7000);
-	}
-
-	/* restore ac97 status */
-	for (i = 2; i < 0x7c ; i += 2) {
-		if (i == AC97_POWERDOWN || i == AC97_EXTENDED_ID)
-			continue;
-		/* restore only accessible registers
-		 * some chip (e.g. nm256) may hang up when unsupported registers
-		 * are accessed..!
-		 */
-		if (test_bit(i, ac97->reg_accessed)) {
-			if (is_ad18xx) {
-				/* handle multi codecs for AD18xx */
-				if (i == AC97_PCM) {
-					for (codec = 0; codec < 3; codec++) {
-						if (! ac97->spec.ad18xx.id[codec])
-							continue;
-						/* select single codec */
-						snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG, 0x7000,
-								     ac97->spec.ad18xx.unchained[codec] | ac97->spec.ad18xx.chained[codec]);
-						/* update PCM bits */
-						ac97->bus->ops->write(ac97, AC97_PCM, ac97->spec.ad18xx.pcmreg[codec]);
-					}
-					/* select all codecs */
-					snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG, 0x7000, 0x7000);
-					continue;
-				} else if (i == AC97_AD_TEST ||
-					   i == AC97_AD_CODEC_CFG ||
-					   i == AC97_AD_SERIAL_CFG)
-					continue; /* ignore */
-			}
-			snd_ac97_write(ac97, i, ac97->regs[i]);
-			snd_ac97_read(ac97, i);
-		}
-	}
-
-	if (ac97->ext_id & AC97_EI_SPDIF) {
-		if (ac97->regs[AC97_EXTENDED_STATUS] & AC97_EA_SPDIF) {
-			/* reset spdif status */
-			snd_ac97_update_bits(ac97, AC97_EXTENDED_STATUS, AC97_EA_SPDIF, 0);
-			snd_ac97_write(ac97, AC97_EXTENDED_STATUS, ac97->regs[AC97_EXTENDED_STATUS]);
-			if (ac97->flags & AC97_CS_SPDIF)
-				snd_ac97_write(ac97, AC97_CSR_SPDIF, ac97->regs[AC97_CSR_SPDIF]);
-			else
-				snd_ac97_write(ac97, AC97_SPDIF, ac97->regs[AC97_SPDIF]);
-			snd_ac97_update_bits(ac97, AC97_EXTENDED_STATUS, AC97_EA_SPDIF, AC97_EA_SPDIF); /* turn on again */
-		}
+	if (ac97->build_ops->resume)
+		ac97->build_ops->resume(ac97);
+	else {
+		snd_ac97_restore_status(ac97);
+		snd_ac97_restore_iec958(ac97);
 	}
 }
 #endif
 
 
 /*
+ * Hardware tuning
  */
 static void set_ctl_name(char *dst, const char *src, const char *suffix)
 {
@@ -2339,6 +2272,7 @@
 		strcpy(dst, src);
 }	
 
+/* remove the control with the given name and optional suffix */
 int snd_ac97_remove_ctl(ac97_t *ac97, const char *name, const char *suffix)
 {
 	snd_ctl_elem_id_t id;
@@ -2357,6 +2291,7 @@
 	return snd_ctl_find_id(ac97->bus->card, &sid);
 }
 
+/* rename the control with the given name and optional suffix */
 int snd_ac97_rename_ctl(ac97_t *ac97, const char *src, const char *dst, const char *suffix)
 {
 	snd_kcontrol_t *kctl = ctl_find(ac97, src, suffix);
@@ -2374,6 +2309,7 @@
 	snd_ac97_rename_ctl(ac97, src, dst, "Volume");
 }
 
+/* swap controls */
 int snd_ac97_swap_ctl(ac97_t *ac97, const char *s1, const char *s2, const char *suffix)
 {
 	snd_kcontrol_t *kctl1, *kctl2;
@@ -2387,20 +2323,29 @@
 	return -ENOENT;
 }
 
-static int swap_headphone(ac97_t *ac97, int remove_master)
+/* ac97 tune: use Headphone control as master */
+static int tune_hp_only(ac97_t *ac97)
 {
 	if (ctl_find(ac97, "Headphone Playback Switch", NULL) == NULL)
 		return -ENOENT;
-	if (remove_master) {
-		snd_ac97_remove_ctl(ac97, "Master Playback", "Switch");
-		snd_ac97_remove_ctl(ac97, "Master Playback", "Volume");
-	} else
-		snd_ac97_rename_vol_ctl(ac97, "Master Playback", "Line-Out Playback");
+	snd_ac97_remove_ctl(ac97, "Master Playback", "Switch");
+	snd_ac97_remove_ctl(ac97, "Master Playback", "Volume");
 	snd_ac97_rename_vol_ctl(ac97, "Headphone Playback", "Master Playback");
 	return 0;
 }
 
-static int swap_surround(ac97_t *ac97)
+/* ac97 tune: swap Headphone and Master controls */
+static int tune_swap_hp(ac97_t *ac97)
+{
+	if (ctl_find(ac97, "Headphone Playback Switch", NULL) == NULL)
+		return -ENOENT;
+	snd_ac97_rename_vol_ctl(ac97, "Master Playback", "Line-Out Playback");
+	snd_ac97_rename_vol_ctl(ac97, "Headphone Playback", "Master Playback");
+	return 0;
+}
+
+/* ac97 tune: swap Surround and Master controls */
+static int tune_swap_surround(ac97_t *ac97)
 {
 	if (snd_ac97_swap_ctl(ac97, "Master Playback", "Surround Playback", "Switch") ||
 	    snd_ac97_swap_ctl(ac97, "Master Playback", "Surround Playback", "Volume"))
@@ -2408,6 +2353,7 @@
 	return 0;
 }
 
+/* ac97 tune: set up mic sharing for AD codecs */
 static int tune_ad_sharing(ac97_t *ac97)
 {
 	unsigned short scfg;
@@ -2424,6 +2370,7 @@
 static const snd_kcontrol_new_t snd_ac97_alc_jack_detect = 
 AC97_SINGLE("Jack Detect", AC97_ALC650_CLOCK, 5, 1, 0);
 
+/* ac97 tune: set up ALC jack-select */
 static int tune_alc_jack(ac97_t *ac97)
 {
 	if ((ac97->id & 0xffffff00) != 0x414c4700) {
@@ -2435,6 +2382,7 @@
 	return snd_ctl_add(ac97->bus->card, snd_ac97_cnew(&snd_ac97_alc_jack_detect, ac97));
 }
 
+/* ac97 tune: inversed EAPD bit */
 static int tune_inv_eapd(ac97_t *ac97)
 {
 	snd_kcontrol_t *kctl = ctl_find(ac97, "External Amplifier", NULL);
@@ -2444,24 +2392,79 @@
 	return 0;
 }
 
-static int apply_quirk(ac97_t *ac97, int quirk)
+static int master_mute_sw_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
 {
-	switch (quirk) {
-	case AC97_TUNE_NONE:
-		return 0;
-	case AC97_TUNE_HP_ONLY:
-		return swap_headphone(ac97, 1);
-	case AC97_TUNE_SWAP_HP:
-		return swap_headphone(ac97, 0);
-	case AC97_TUNE_SWAP_SURROUND:
-		return swap_surround(ac97);
-	case AC97_TUNE_AD_SHARING:
-		return tune_ad_sharing(ac97);
-	case AC97_TUNE_ALC_JACK:
-		return tune_alc_jack(ac97);
-	case AC97_TUNE_INV_EAPD:
-		return tune_inv_eapd(ac97);
+	int err = snd_ac97_put_volsw(kcontrol, ucontrol);
+	if (err > 0) {
+		ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
+		int shift = (kcontrol->private_value >> 8) & 0x0f;
+		int rshift = (kcontrol->private_value >> 12) & 0x0f;
+		unsigned short mask;
+		if (shift != rshift)
+			mask = 0x8080;
+		else
+			mask = 0x8000;
+		snd_ac97_update_bits(ac97, AC97_POWERDOWN, 0x8000,
+				     (ac97->regs[AC97_MASTER] & mask) == mask ?
+				     0x8000 : 0);
 	}
+	return err;
+}
+
+/* ac97 tune: EAPD controls mute LED bound with the master mute */
+static int tune_mute_led(ac97_t *ac97)
+{
+	snd_kcontrol_t *msw = ctl_find(ac97, "Master Playback Switch", NULL);
+	if (! msw)
+		return -ENOENT;
+	msw->put = master_mute_sw_put;
+	snd_ac97_remove_ctl(ac97, "External Amplifier", NULL);
+	snd_ac97_update_bits(ac97, AC97_POWERDOWN, 0x8000, 0x8000); /* mute LED on */
+	return 0;
+}
+
+struct quirk_table {
+	const char *name;
+	int (*func)(ac97_t *);
+};
+
+static struct quirk_table applicable_quirks[] = {
+	{ "none", NULL },
+	{ "hp_only", tune_hp_only },
+	{ "swap_hp", tune_swap_hp },
+	{ "swap_surround", tune_swap_surround },
+	{ "ad_sharing", tune_ad_sharing },
+	{ "alc_jack", tune_alc_jack },
+	{ "inv_eapd", tune_inv_eapd },
+	{ "mute_led", tune_mute_led },
+};
+
+/* apply the quirk with the given type */
+static int apply_quirk(ac97_t *ac97, int type)
+{
+	if (type <= 0)
+		return 0;
+	else if (type >= ARRAY_SIZE(applicable_quirks))
+		return -EINVAL;
+	if (applicable_quirks[type].func)
+		return applicable_quirks[type].func(ac97);
+	return 0;
+}
+
+/* apply the quirk with the given name */
+static int apply_quirk_str(ac97_t *ac97, const char *typestr)
+{
+	int i;
+	struct quirk_table *q;
+
+	for (i = 0; i < ARRAY_SIZE(applicable_quirks); i++) {
+		q = &applicable_quirks[i];
+		if (q->name && ! strcmp(typestr, q->name))
+			return apply_quirk(ac97, i);
+	}
+	/* for compatibility, accept the numbers, too */
+	if (*typestr >= '0' && *typestr <= '9')
+		return apply_quirk(ac97, (int)simple_strtol(typestr, NULL, 10));
 	return -EINVAL;
 }
 
@@ -2469,7 +2472,7 @@
  * snd_ac97_tune_hardware - tune up the hardware
  * @ac97: the ac97 instance
  * @quirk: quirk list
- * @override: explicit quirk value (overrides the list if not AC97_TUNE_DEFAULT)
+ * @override: explicit quirk value (overrides the list if non-NULL)
  *
  * Do some workaround for each pci device, such as renaming of the
  * headphone (true line-out) control as "Master".
@@ -2478,16 +2481,17 @@
  * Returns zero if successful, or a negative error code on failure.
  */
 
-int snd_ac97_tune_hardware(ac97_t *ac97, struct ac97_quirk *quirk, int override)
+int snd_ac97_tune_hardware(ac97_t *ac97, struct ac97_quirk *quirk, const char *override)
 {
 	int result;
 
 	snd_assert(quirk, return -EINVAL);
 
-	if (override != AC97_TUNE_DEFAULT) {
-		result = apply_quirk(ac97, override);
+	/* quirk overriden? */
+	if (override && strcmp(override, "-1") && strcmp(override, "default")) {
+		result = apply_quirk_str(ac97, override);
 		if (result < 0)
-			snd_printk(KERN_ERR "applying quirk type %d failed (%d)\n", override, result);
+			snd_printk(KERN_ERR "applying quirk type %s failed (%d)\n", override, result);
 		return result;
 	}
 
diff -Nru a/sound/pci/ac97/ac97_local.h b/sound/pci/ac97/ac97_local.h
--- a/sound/pci/ac97/ac97_local.h	2005-01-10 20:11:18 -08:00
+++ b/sound/pci/ac97/ac97_local.h	2005-01-10 20:11:18 -08:00
@@ -22,15 +22,15 @@
  *
  */
 
-#define AC97_SINGLE_VALUE(reg,shift,mask,invert) ((reg) | ((shift) << 8) | ((mask) << 16) | ((invert) << 24))
-#define AC97_PAGE_SINGLE_VALUE(reg,shift,mask,invert,page) ((reg) | ((shift) << 8) | ((mask) << 16) | ((invert) << 24) | ((page) << 25))
+#define AC97_SINGLE_VALUE(reg,shift,mask,invert) ((reg) | ((shift) << 8) | ((shift) << 12) | ((mask) << 16) | ((invert) << 24))
+#define AC97_PAGE_SINGLE_VALUE(reg,shift,mask,invert,page) (AC97_SINGLE_VALUE(reg,shift,mask,invert) | ((page) << 25))
 #define AC97_SINGLE(xname, reg, shift, mask, invert) \
-{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .info = snd_ac97_info_single, \
-  .get = snd_ac97_get_single, .put = snd_ac97_put_single, \
+{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .info = snd_ac97_info_volsw, \
+  .get = snd_ac97_get_volsw, .put = snd_ac97_put_volsw, \
   .private_value =  AC97_SINGLE_VALUE(reg, shift, mask, invert) }
 #define AC97_PAGE_SINGLE(xname, reg, shift, mask, invert, page)		\
-{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .info = snd_ac97_info_single, \
-  .get = snd_ac97_page_get_single, .put = snd_ac97_page_put_single, \
+{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .info = snd_ac97_info_volsw, \
+  .get = snd_ac97_page_get_volsw, .put = snd_ac97_page_put_volsw, \
   .private_value =  AC97_PAGE_SINGLE_VALUE(reg, shift, mask, invert, page) }
 
 /* ac97_codec.c */
@@ -39,16 +39,21 @@
 extern const snd_kcontrol_new_t snd_ac97_controls_spdif[];
 snd_kcontrol_t *snd_ac97_cnew(const snd_kcontrol_new_t *_template, ac97_t * ac97);
 void snd_ac97_get_name(ac97_t *ac97, unsigned int id, char *name, int modem);
-int snd_ac97_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo);
-int snd_ac97_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol);
-int snd_ac97_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol);
-int snd_ac97_page_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol);
-int snd_ac97_page_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol);
+int snd_ac97_info_volsw(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo);
+int snd_ac97_get_volsw(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol);
+int snd_ac97_put_volsw(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol);
+int snd_ac97_page_get_volsw(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol);
+int snd_ac97_page_put_volsw(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol);
 int snd_ac97_try_bit(ac97_t * ac97, int reg, int bit);
 int snd_ac97_remove_ctl(ac97_t *ac97, const char *name, const char *suffix);
 int snd_ac97_rename_ctl(ac97_t *ac97, const char *src, const char *dst, const char *suffix);
 int snd_ac97_swap_ctl(ac97_t *ac97, const char *s1, const char *s2, const char *suffix);
 void snd_ac97_rename_vol_ctl(ac97_t *ac97, const char *src, const char *dst);
+void snd_ac97_restore_status(ac97_t *ac97);
+void snd_ac97_restore_iec958(ac97_t *ac97);
+
+int snd_ac97_update_bits_nolock(ac97_t *ac97, unsigned short reg,
+				unsigned short mask, unsigned short value);
 
 /* ac97_proc.c */
 #ifdef CONFIG_PROC_FS
diff -Nru a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c
--- a/sound/pci/ac97/ac97_patch.c	2005-01-10 20:11:22 -08:00
+++ b/sound/pci/ac97/ac97_patch.c	2005-01-10 20:11:22 -08:00
@@ -55,12 +55,12 @@
 	unsigned short page_save;
 	int ret;
 
-	down(&ac97->mutex);
+	down(&ac97->page_mutex);
 	page_save = snd_ac97_read(ac97, AC97_INT_PAGING) & AC97_PAGE_MASK;
 	snd_ac97_update_bits(ac97, AC97_INT_PAGING, AC97_PAGE_MASK, page);
 	ret = snd_ac97_update_bits(ac97, reg, mask, value);
 	snd_ac97_update_bits(ac97, AC97_INT_PAGING, AC97_PAGE_MASK, page_save);
-	up(&ac97->mutex); /* unlock paging */
+	up(&ac97->page_mutex); /* unlock paging */
 	return ret;
 }
 
@@ -775,6 +775,71 @@
 /*
  * Analog Device AD18xx, AD19xx codecs
  */
+#ifdef CONFIG_PM
+static void ad18xx_resume(ac97_t *ac97)
+{
+	static unsigned short setup_regs[] = {
+		AC97_AD_MISC, AC97_AD_SERIAL_CFG, AC97_AD_JACK_SPDIF,
+	};
+	int i, codec;
+
+	for (i = 0; i < (int)ARRAY_SIZE(setup_regs); i++) {
+		unsigned short reg = setup_regs[i];
+		if (test_bit(reg, ac97->reg_accessed)) {
+			snd_ac97_write(ac97, reg, ac97->regs[reg]);
+			snd_ac97_read(ac97, reg);
+		}
+	}
+
+	if (! (ac97->flags & AC97_AD_MULTI))
+		/* normal restore */
+		snd_ac97_restore_status(ac97);
+	else {
+		/* restore the AD18xx codec configurations */
+		for (codec = 0; codec < 3; codec++) {
+			if (! ac97->spec.ad18xx.id[codec])
+				continue;
+			/* select single codec */
+			snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG, 0x7000,
+					     ac97->spec.ad18xx.unchained[codec] | ac97->spec.ad18xx.chained[codec]);
+			ac97->bus->ops->write(ac97, AC97_AD_CODEC_CFG, ac97->spec.ad18xx.codec_cfg[codec]);
+		}
+		/* select all codecs */
+		snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG, 0x7000, 0x7000);
+
+		/* restore status */
+		for (i = 2; i < 0x7c ; i += 2) {
+			if (i == AC97_POWERDOWN || i == AC97_EXTENDED_ID)
+				continue;
+			if (test_bit(i, ac97->reg_accessed)) {
+				/* handle multi codecs for AD18xx */
+				if (i == AC97_PCM) {
+					for (codec = 0; codec < 3; codec++) {
+						if (! ac97->spec.ad18xx.id[codec])
+							continue;
+						/* select single codec */
+						snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG, 0x7000,
+								     ac97->spec.ad18xx.unchained[codec] | ac97->spec.ad18xx.chained[codec]);
+						/* update PCM bits */
+						ac97->bus->ops->write(ac97, AC97_PCM, ac97->spec.ad18xx.pcmreg[codec]);
+					}
+					/* select all codecs */
+					snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG, 0x7000, 0x7000);
+					continue;
+				} else if (i == AC97_AD_TEST ||
+					   i == AC97_AD_CODEC_CFG ||
+					   i == AC97_AD_SERIAL_CFG)
+					continue; /* ignore */
+			}
+			snd_ac97_write(ac97, i, ac97->regs[i]);
+			snd_ac97_read(ac97, i);
+		}
+	}
+
+	snd_ac97_restore_iec958(ac97);
+}
+#endif
+
 int patch_ad1819(ac97_t * ac97)
 {
 	unsigned short scfg;
@@ -843,6 +908,12 @@
 	}
 }
 
+static struct snd_ac97_build_ops patch_ad1881_build_ops = {
+#ifdef CONFIG_PM
+	.resume = &ad18xx_resume
+#endif
+};
+
 int patch_ad1881(ac97_t * ac97)
 {
 	static const char cfg_idxs[3][2] = {
@@ -897,6 +968,7 @@
 		ac97->id &= 0xffff0000;
 		ac97->id |= ac97->spec.ad18xx.id[0];
 	}
+	ac97->build_ops = &patch_ad1881_build_ops;
 	return 0;
 }
 
@@ -919,7 +991,10 @@
 }
 
 static struct snd_ac97_build_ops patch_ad1885_build_ops = {
-	.build_specific = &patch_ad1885_specific
+	.build_specific = &patch_ad1885_specific,
+#ifdef CONFIG_PM
+	.resume = &ad18xx_resume
+#endif
 };
 
 int patch_ad1885(ac97_t * ac97)
@@ -1013,8 +1088,23 @@
  	return patch_build_controls(ac97, &snd_ac97_ad198x_spdif_source, 1);
 }
 
+static const snd_kcontrol_new_t snd_ac97_ad1981x_jack_sense[] = {
+	AC97_SINGLE("Headphone Jack Sense", AC97_AD_JACK_SPDIF, 11, 1, 0),
+	AC97_SINGLE("Line Jack Sense", AC97_AD_JACK_SPDIF, 12, 1, 0),
+};
+
+static int patch_ad1981a_specific(ac97_t * ac97)
+{
+	return patch_build_controls(ac97, snd_ac97_ad1981x_jack_sense,
+				    ARRAY_SIZE(snd_ac97_ad1981x_jack_sense));
+}
+
 static struct snd_ac97_build_ops patch_ad1981a_build_ops = {
-	.build_post_spdif = patch_ad198x_post_spdif
+	.build_post_spdif = patch_ad198x_post_spdif,
+	.build_specific = patch_ad1981a_specific,
+#ifdef CONFIG_PM
+	.resume = ad18xx_resume
+#endif
 };
 
 int patch_ad1981a(ac97_t *ac97)
@@ -1023,6 +1113,7 @@
 	ac97->build_ops = &patch_ad1981a_build_ops;
 	snd_ac97_update_bits(ac97, AC97_AD_MISC, AC97_AD198X_MSPLT, AC97_AD198X_MSPLT);
 	ac97->flags |= AC97_STEREO_MUTES;
+	snd_ac97_update_bits(ac97, AC97_AD_JACK_SPDIF, 1<<11, 1<<11); /* HP jack sense */
 	return 0;
 }
 
@@ -1031,12 +1122,20 @@
 
 static int patch_ad1981b_specific(ac97_t *ac97)
 {
-	return patch_build_controls(ac97, &snd_ac97_ad198x_2cmic, 1);
+	int err;
+
+	if ((err = patch_build_controls(ac97, &snd_ac97_ad198x_2cmic, 1)) < 0)
+		return err;
+	return patch_build_controls(ac97, snd_ac97_ad1981x_jack_sense,
+				    ARRAY_SIZE(snd_ac97_ad1981x_jack_sense));
 }
 
 static struct snd_ac97_build_ops patch_ad1981b_build_ops = {
 	.build_post_spdif = patch_ad198x_post_spdif,
-	.build_specific = patch_ad1981b_specific
+	.build_specific = patch_ad1981b_specific,
+#ifdef CONFIG_PM
+	.resume = ad18xx_resume
+#endif
 };
 
 int patch_ad1981b(ac97_t *ac97)
@@ -1045,6 +1144,7 @@
 	ac97->build_ops = &patch_ad1981b_build_ops;
 	snd_ac97_update_bits(ac97, AC97_AD_MISC, AC97_AD198X_MSPLT, AC97_AD198X_MSPLT);
 	ac97->flags |= AC97_STEREO_MUTES;
+	snd_ac97_update_bits(ac97, AC97_AD_JACK_SPDIF, 1<<11, 1<<11); /* HP jack sense */
 	return 0;
 }
 
@@ -1150,7 +1250,10 @@
 
 static struct snd_ac97_build_ops patch_ad1888_build_ops = {
 	.build_post_spdif = patch_ad198x_post_spdif,
-	.build_specific = patch_ad1888_specific
+	.build_specific = patch_ad1888_specific,
+#ifdef CONFIG_PM
+	.resume = ad18xx_resume
+#endif
 };
 
 int patch_ad1888(ac97_t * ac97)
@@ -1184,7 +1287,10 @@
 
 static struct snd_ac97_build_ops patch_ad1980_build_ops = {
 	.build_post_spdif = patch_ad198x_post_spdif,
-	.build_specific = patch_ad1980_specific
+	.build_specific = patch_ad1980_specific,
+#ifdef CONFIG_PM
+	.resume = ad18xx_resume
+#endif
 };
 
 int patch_ad1980(ac97_t * ac97)
@@ -1210,7 +1316,10 @@
 
 static struct snd_ac97_build_ops patch_ad1985_build_ops = {
 	.build_post_spdif = patch_ad198x_post_spdif,
-	.build_specific = patch_ad1985_specific
+	.build_specific = patch_ad1985_specific,
+#ifdef CONFIG_PM
+	.resume = ad18xx_resume
+#endif
 };
 
 int patch_ad1985(ac97_t * ac97)
@@ -1294,7 +1403,7 @@
 	{
 		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
 		.name = "Mic As Center/LFE",
-		.info = snd_ac97_info_single,
+		.info = snd_ac97_info_volsw,
 		.get = snd_ac97_alc650_mic_get,
 		.put = snd_ac97_alc650_mic_put,
 		.private_value = AC97_SINGLE_VALUE(0, 0, 1, 0) /* only mask needed */
@@ -1304,7 +1413,8 @@
 static const snd_kcontrol_new_t snd_ac97_spdif_controls_alc650[] = {
         AC97_SINGLE("IEC958 Capture Switch", AC97_ALC650_MULTICH, 11, 1, 0),
         AC97_SINGLE("Analog to IEC958 Output", AC97_ALC650_MULTICH, 12, 1, 0),
-        AC97_SINGLE("IEC958 Input Monitor", AC97_ALC650_MULTICH, 13, 1, 0),
+	/* disable this controls since it doesn't work as expected */
+	/* AC97_SINGLE("IEC958 Input Monitor", AC97_ALC650_MULTICH, 13, 1, 0), */
 };
 
 static int patch_alc650_specific(ac97_t * ac97)
@@ -1405,7 +1515,7 @@
 	{
 		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
 		.name = "Mic As Center/LFE",
-		.info = snd_ac97_info_single,
+		.info = snd_ac97_info_volsw,
 		.get = snd_ac97_alc655_mic_get,
 		.put = snd_ac97_alc655_mic_put,
 		.private_value = AC97_SINGLE_VALUE(0, 0, 1, 0) /* only mask needed */
@@ -1454,7 +1564,8 @@
 
 static const snd_kcontrol_new_t snd_ac97_spdif_controls_alc655[] = {
         AC97_PAGE_SINGLE("IEC958 Capture Switch", AC97_ALC650_MULTICH, 11, 1, 0, 0),
-        AC97_PAGE_SINGLE("IEC958 Input Monitor", AC97_ALC650_MULTICH, 14, 1, 0, 0),
+	/* disable this controls since it doesn't work as expected */
+        /* AC97_PAGE_SINGLE("IEC958 Input Monitor", AC97_ALC650_MULTICH, 14, 1, 0, 0), */
 	{
 		.iface  = SNDRV_CTL_ELEM_IFACE_MIXER,
 		.name   = "IEC958 Playback Route",
@@ -1557,7 +1668,7 @@
 	{
 		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
 		.name = "Line-In As Surround",
-		.info = snd_ac97_info_single,
+		.info = snd_ac97_info_volsw,
 		.get = ac97_alc850_surround_get,
 		.put = ac97_alc850_surround_put,
 		.private_value = AC97_SINGLE_VALUE(0, 0, 1, 0) /* only mask needed */
@@ -1565,7 +1676,7 @@
 	{
 		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
 		.name = "Mic As Center/LFE",
-		.info = snd_ac97_info_single,
+		.info = snd_ac97_info_volsw,
 		.get = ac97_alc850_mic_get,
 		.put = ac97_alc850_mic_put,
 		.private_value = AC97_SINGLE_VALUE(0, 0, 1, 0) /* only mask needed */
@@ -1644,6 +1755,11 @@
 int patch_cm9738(ac97_t * ac97)
 {
 	ac97->build_ops = &patch_cm9738_ops;
+	/* FIXME: can anyone confirm below? */
+	/* CM9738 has no PCM volume although the register reacts */
+	ac97->flags |= AC97_HAS_NO_PCM_VOL;
+	snd_ac97_write_cache(ac97, AC97_PCM, 0x8000);
+
 	return 0;
 }
 
@@ -1720,7 +1836,7 @@
 	{
 		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
 		.name = "Mic As Center/LFE",
-		.info = snd_ac97_info_single,
+		.info = snd_ac97_info_volsw,
 		.get = snd_ac97_cm9739_center_mic_get,
 		.put = snd_ac97_cm9739_center_mic_put,
 		.private_value = AC97_SINGLE_VALUE(0, 0, 1, 0) /* only mask needed */
@@ -1748,6 +1864,11 @@
 
 	ac97->build_ops = &patch_cm9739_ops;
 
+	/* CM9739/A has no Master and PCM volume although the register reacts */
+	ac97->flags |= AC97_HAS_NO_MASTER_VOL | AC97_HAS_NO_PCM_VOL;
+	snd_ac97_write_cache(ac97, AC97_MASTER, 0x8000);
+	snd_ac97_write_cache(ac97, AC97_PCM, 0x8000);
+
 	/* check spdif */
 	val = snd_ac97_read(ac97, AC97_EXTENDED_STATUS);
 	if (val & AC97_EA_SPCV) {
@@ -1766,8 +1887,12 @@
 	/* bit 12: disable center/lfe (swithable) */
 	/* bit 10: disable surround/line (switchable) */
 	/* bit 9: mix 2 surround off */
+	/* bit 4: undocumented; 0 mutes the CM9739A, which defaults to 1 */
+	/* bit 3: undocumented; surround? */
 	/* bit 0: dB */
-	val = (1 << 13);
+	val = snd_ac97_read(ac97, AC97_CM9739_MULTI_CHAN) & (1 << 4);
+	val |= (1 << 3);
+	val |= (1 << 13);
 	if (! (ac97->ext_id & AC97_EI_SPDIF))
 		val |= (1 << 14);
 	snd_ac97_write_cache(ac97, AC97_CM9739_MULTI_CHAN, val);
@@ -1830,7 +1955,7 @@
 	{
 		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
 		.name = "Line-In As Surround",
-		.info = snd_ac97_info_single,
+		.info = snd_ac97_info_volsw,
 		.get = snd_ac97_cm9761_linein_rear_get,
 		.put = snd_ac97_cm9761_linein_rear_put,
 		.private_value = AC97_SINGLE_VALUE(0, 0, 1, 0) /* only mask needed */
@@ -1838,7 +1963,7 @@
 	{
 		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
 		.name = "Mic As Center/LFE",
-		.info = snd_ac97_info_single,
+		.info = snd_ac97_info_volsw,
 		.get = snd_ac97_cm9761_center_mic_get,
 		.put = snd_ac97_cm9761_center_mic_put,
 		.private_value = AC97_SINGLE_VALUE(0, 0, 1, 0) /* only mask needed */
@@ -1858,6 +1983,11 @@
 int patch_cm9761(ac97_t *ac97)
 {
 	unsigned short val;
+
+	/* CM9761 has no Master and PCM volume although the register reacts */
+	ac97->flags |= AC97_HAS_NO_MASTER_VOL | AC97_HAS_NO_PCM_VOL;
+	snd_ac97_write_cache(ac97, AC97_MASTER, 0x8000);
+	snd_ac97_write_cache(ac97, AC97_PCM, 0x8000);
 
 	ac97->spec.dev_flags = 0; /* 1 = model 82 revision B */
 	if (ac97->id == AC97_ID_CM9761_82) {
diff -Nru a/sound/pci/ac97/ac97_pcm.c b/sound/pci/ac97/ac97_pcm.c
--- a/sound/pci/ac97/ac97_pcm.c	2005-01-10 20:11:16 -08:00
+++ b/sound/pci/ac97/ac97_pcm.c	2005-01-10 20:11:16 -08:00
@@ -206,14 +206,12 @@
 		mask = AC97_SC_SPSR_MASK;
 	}
 
-	spin_lock(&ac97->reg_lock);
+	down(&ac97->reg_mutex);
 	old = snd_ac97_read(ac97, reg) & mask;
-	spin_unlock(&ac97->reg_lock);
 	if (old != bits) {
-		snd_ac97_update_bits(ac97, AC97_EXTENDED_STATUS, AC97_EA_SPDIF, 0);
-		snd_ac97_update_bits(ac97, reg, mask, bits);
+		snd_ac97_update_bits_nolock(ac97, AC97_EXTENDED_STATUS, AC97_EA_SPDIF, 0);
+		snd_ac97_update_bits_nolock(ac97, reg, mask, bits);
 		/* update the internal spdif bits */
-		spin_lock(&ac97->reg_lock);
 		sbits = ac97->spdif_status;
 		if (sbits & IEC958_AES0_PROFESSIONAL) {
 			sbits &= ~IEC958_AES0_PRO_FS;
@@ -231,9 +229,9 @@
 			}
 		}
 		ac97->spdif_status = sbits;
-		spin_unlock(&ac97->reg_lock);
 	}
-	snd_ac97_update_bits(ac97, AC97_EXTENDED_STATUS, AC97_EA_SPDIF, AC97_EA_SPDIF);
+	snd_ac97_update_bits_nolock(ac97, AC97_EXTENDED_STATUS, AC97_EA_SPDIF, AC97_EA_SPDIF);
+	up(&ac97->reg_mutex);
 	return 0;
 }
 
diff -Nru a/sound/pci/ac97/ac97_proc.c b/sound/pci/ac97/ac97_proc.c
--- a/sound/pci/ac97/ac97_proc.c	2005-01-10 20:11:23 -08:00
+++ b/sound/pci/ac97/ac97_proc.c	2005-01-10 20:11:23 -08:00
@@ -296,7 +296,7 @@
 {
 	ac97_t *ac97 = entry->private_data;
 	
-	down(&ac97->mutex);
+	down(&ac97->page_mutex);
 	if ((ac97->id & 0xffffff40) == AC97_ID_AD1881) {	// Analog Devices AD1881/85/86
 		int idx;
 		for (idx = 0; idx < 3; idx++)
@@ -322,7 +322,7 @@
 	} else {
 		snd_ac97_proc_read_main(ac97, buffer, 0);
 	}
-	up(&ac97->mutex);
+	up(&ac97->page_mutex);
 }
 
 #ifdef CONFIG_SND_DEBUG
@@ -332,7 +332,7 @@
 	ac97_t *ac97 = entry->private_data;
 	char line[64];
 	unsigned int reg, val;
-	down(&ac97->mutex);
+	down(&ac97->page_mutex);
 	while (!snd_info_get_line(buffer, line, sizeof(line))) {
 		if (sscanf(line, "%x %x", &reg, &val) != 2)
 			continue;
@@ -340,7 +340,7 @@
 		if (reg < 0x80 && (reg & 1) == 0 && val <= 0xffff)
 			snd_ac97_write_cache(ac97, reg, val);
 	}
-	up(&ac97->mutex);
+	up(&ac97->page_mutex);
 }
 #endif
 
@@ -359,7 +359,7 @@
 {
 	ac97_t *ac97 = entry->private_data;
 
-	down(&ac97->mutex);
+	down(&ac97->page_mutex);
 	if ((ac97->id & 0xffffff40) == AC97_ID_AD1881) {	// Analog Devices AD1881/85/86
 
 		int idx;
@@ -375,7 +375,7 @@
 	} else {
 		snd_ac97_proc_regs_read_main(ac97, buffer, 0);
 	}	
-	up(&ac97->mutex);
+	up(&ac97->page_mutex);
 }
 
 void snd_ac97_proc_init(ac97_t * ac97)
diff -Nru a/sound/pci/ac97/ak4531_codec.c b/sound/pci/ac97/ak4531_codec.c
--- a/sound/pci/ac97/ak4531_codec.c	2005-01-10 20:11:16 -08:00
+++ b/sound/pci/ac97/ak4531_codec.c	2005-01-10 20:11:16 -08:00
@@ -72,16 +72,15 @@
 static int snd_ak4531_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
 {
 	ak4531_t *ak4531 = snd_kcontrol_chip(kcontrol);
-	unsigned long flags;
 	int reg = kcontrol->private_value & 0xff;
 	int shift = (kcontrol->private_value >> 16) & 0x07;
 	int mask = (kcontrol->private_value >> 24) & 0xff;
 	int invert = (kcontrol->private_value >> 22) & 1;
 	int val;
 
-	spin_lock_irqsave(&ak4531->reg_lock, flags);
+	down(&ak4531->reg_mutex);
 	val = (ak4531->regs[reg] >> shift) & mask;
-	spin_unlock_irqrestore(&ak4531->reg_lock, flags);
+	up(&ak4531->reg_mutex);
 	if (invert) {
 		val = mask - val;
 	}
@@ -92,7 +91,6 @@
 static int snd_ak4531_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
 {
 	ak4531_t *ak4531 = snd_kcontrol_chip(kcontrol);
-	unsigned long flags;
 	int reg = kcontrol->private_value & 0xff;
 	int shift = (kcontrol->private_value >> 16) & 0x07;
 	int mask = (kcontrol->private_value >> 24) & 0xff;
@@ -105,11 +103,11 @@
 		val = mask - val;
 	}
 	val <<= shift;
-	spin_lock_irqsave(&ak4531->reg_lock, flags);
+	down(&ak4531->reg_mutex);
 	val = (ak4531->regs[reg] & ~(mask << shift)) | val;
 	change = val != ak4531->regs[reg];
 	ak4531->write(ak4531, reg, ak4531->regs[reg] = val);
-	spin_unlock_irqrestore(&ak4531->reg_lock, flags);
+	up(&ak4531->reg_mutex);
 	return change;
 }
 
@@ -133,7 +131,6 @@
 static int snd_ak4531_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
 {
 	ak4531_t *ak4531 = snd_kcontrol_chip(kcontrol);
-	unsigned long flags;
 	int left_reg = kcontrol->private_value & 0xff;
 	int right_reg = (kcontrol->private_value >> 8) & 0xff;
 	int left_shift = (kcontrol->private_value >> 16) & 0x07;
@@ -142,10 +139,10 @@
 	int invert = (kcontrol->private_value >> 22) & 1;
 	int left, right;
 
-	spin_lock_irqsave(&ak4531->reg_lock, flags);
+	down(&ak4531->reg_mutex);
 	left = (ak4531->regs[left_reg] >> left_shift) & mask;
 	right = (ak4531->regs[right_reg] >> right_shift) & mask;
-	spin_unlock_irqrestore(&ak4531->reg_lock, flags);
+	up(&ak4531->reg_mutex);
 	if (invert) {
 		left = mask - left;
 		right = mask - right;
@@ -158,7 +155,6 @@
 static int snd_ak4531_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
 {
 	ak4531_t *ak4531 = snd_kcontrol_chip(kcontrol);
-	unsigned long flags;
 	int left_reg = kcontrol->private_value & 0xff;
 	int right_reg = (kcontrol->private_value >> 8) & 0xff;
 	int left_shift = (kcontrol->private_value >> 16) & 0x07;
@@ -176,7 +172,7 @@
 	}
 	left <<= left_shift;
 	right <<= right_shift;
-	spin_lock_irqsave(&ak4531->reg_lock, flags);
+	down(&ak4531->reg_mutex);
 	if (left_reg == right_reg) {
 		left = (ak4531->regs[left_reg] & ~((mask << left_shift) | (mask << right_shift))) | left | right;
 		change = left != ak4531->regs[left_reg];
@@ -188,7 +184,7 @@
 		ak4531->write(ak4531, left_reg, ak4531->regs[left_reg] = left);
 		ak4531->write(ak4531, right_reg, ak4531->regs[right_reg] = right);
 	}
-	spin_unlock_irqrestore(&ak4531->reg_lock, flags);
+	up(&ak4531->reg_mutex);
 	return change;
 }
 
@@ -210,25 +206,23 @@
 static int snd_ak4531_get_input_sw(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
 {
 	ak4531_t *ak4531 = snd_kcontrol_chip(kcontrol);
-	unsigned long flags;
 	int reg1 = kcontrol->private_value & 0xff;
 	int reg2 = (kcontrol->private_value >> 8) & 0xff;
 	int left_shift = (kcontrol->private_value >> 16) & 0x0f;
 	int right_shift = (kcontrol->private_value >> 24) & 0x0f;
 
-	spin_lock_irqsave(&ak4531->reg_lock, flags);
+	down(&ak4531->reg_mutex);
 	ucontrol->value.integer.value[0] = (ak4531->regs[reg1] >> left_shift) & 1;
 	ucontrol->value.integer.value[1] = (ak4531->regs[reg2] >> left_shift) & 1;
 	ucontrol->value.integer.value[2] = (ak4531->regs[reg1] >> right_shift) & 1;
 	ucontrol->value.integer.value[3] = (ak4531->regs[reg2] >> right_shift) & 1;
-	spin_unlock_irqrestore(&ak4531->reg_lock, flags);
+	up(&ak4531->reg_mutex);
 	return 0;
 }
 
 static int snd_ak4531_put_input_sw(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
 {
 	ak4531_t *ak4531 = snd_kcontrol_chip(kcontrol);
-	unsigned long flags;
 	int reg1 = kcontrol->private_value & 0xff;
 	int reg2 = (kcontrol->private_value >> 8) & 0xff;
 	int left_shift = (kcontrol->private_value >> 16) & 0x0f;
@@ -236,7 +230,7 @@
 	int change;
 	int val1, val2;
 
-	spin_lock_irqsave(&ak4531->reg_lock, flags);
+	down(&ak4531->reg_mutex);
 	val1 = ak4531->regs[reg1] & ~((1 << left_shift) | (1 << right_shift));
 	val2 = ak4531->regs[reg2] & ~((1 << left_shift) | (1 << right_shift));
 	val1 |= (ucontrol->value.integer.value[0] & 1) << left_shift;
@@ -246,7 +240,7 @@
 	change = val1 != ak4531->regs[reg1] || val2 != ak4531->regs[reg2];
 	ak4531->write(ak4531, reg1, ak4531->regs[reg1] = val1);
 	ak4531->write(ak4531, reg2, ak4531->regs[reg2] = val2);
-	spin_unlock_irqrestore(&ak4531->reg_lock, flags);
+	up(&ak4531->reg_mutex);
 	return change;
 }
 
@@ -367,7 +361,7 @@
 	if (ak4531 == NULL)
 		return -ENOMEM;
 	*ak4531 = *_ak4531;
-	spin_lock_init(&ak4531->reg_lock);
+	init_MUTEX(&ak4531->reg_mutex);
 	if ((err = snd_component_add(card, "AK4531")) < 0) {
 		snd_ak4531_free(ak4531);
 		return err;
@@ -388,7 +382,7 @@
 		}
 	}
 	snd_ak4531_proc_init(card, ak4531);
-	if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, ak4531, &ops)) < 0) {
+	if ((err = snd_device_new(card, SNDRV_DEV_CODEC, ak4531, &ops)) < 0) {
 		snd_ak4531_free(ak4531);
 		return err;
 	}
diff -Nru a/sound/pci/ali5451/ali5451.c b/sound/pci/ali5451/ali5451.c
--- a/sound/pci/ali5451/ali5451.c	2005-01-10 20:11:22 -08:00
+++ b/sound/pci/ali5451/ali5451.c	2005-01-10 20:11:22 -08:00
@@ -1933,7 +1933,6 @@
 
 	spin_unlock_irq(&chip->reg_lock);
 	pci_disable_device(chip->pci);
-	snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
 	return 0;
 }
 
@@ -1971,7 +1970,6 @@
 	spin_unlock_irq(&chip->reg_lock);
 
 	snd_ac97_resume(chip->ac97);
-	snd_power_change_state(card, SNDRV_CTL_POWER_D0);
 	
 	return 0;
 }
@@ -1989,8 +1987,7 @@
 		pci_release_regions(codec->pci);
 	pci_disable_device(codec->pci);
 #ifdef CONFIG_PM
-	if (codec->image)
-		kfree(codec->image);
+	kfree(codec->image);
 #endif
 	kfree(codec);
 	return 0;
diff -Nru a/sound/pci/atiixp.c b/sound/pci/atiixp.c
--- a/sound/pci/atiixp.c	2005-01-10 20:11:19 -08:00
+++ b/sound/pci/atiixp.c	2005-01-10 20:11:19 -08:00
@@ -264,7 +264,6 @@
 	ac97_t *ac97[NUM_ATI_CODECS];
 
 	spinlock_t reg_lock;
-	spinlock_t ac97_lock;
 
 	atiixp_dma_t dmas[NUM_ATI_DMAS];
 	struct ac97_pcm *pcms[NUM_ATI_PCMS];
@@ -476,20 +475,14 @@
 static unsigned short snd_atiixp_ac97_read(ac97_t *ac97, unsigned short reg)
 {
 	atiixp_t *chip = ac97->private_data;
-	unsigned short data;
-	spin_lock(&chip->ac97_lock);
-	data = snd_atiixp_codec_read(chip, ac97->num, reg);
-	spin_unlock(&chip->ac97_lock);
-	return data;
+	return snd_atiixp_codec_read(chip, ac97->num, reg);
     
 }
 
 static void snd_atiixp_ac97_write(ac97_t *ac97, unsigned short reg, unsigned short val)
 {
 	atiixp_t *chip = ac97->private_data;
-	spin_lock(&chip->ac97_lock);
 	snd_atiixp_codec_write(chip, ac97->num, reg, val);
-	spin_unlock(&chip->ac97_lock);
 }
 
 /*
@@ -1409,7 +1402,6 @@
 
 	pci_set_power_state(chip->pci, 3);
 	pci_disable_device(chip->pci);
-	snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
 	return 0;
 }
 
@@ -1429,7 +1421,6 @@
 		if (chip->ac97[i])
 			snd_ac97_resume(chip->ac97[i]);
 
-	snd_power_change_state(card, SNDRV_CTL_POWER_D0);
 	return 0;
 }
 #endif /* CONFIG_PM */
@@ -1508,7 +1499,6 @@
 	}
 
 	spin_lock_init(&chip->reg_lock);
-	spin_lock_init(&chip->ac97_lock);
 	init_MUTEX(&chip->open_mutex);
 	chip->card = card;
 	chip->pci = pci;
diff -Nru a/sound/pci/atiixp_modem.c b/sound/pci/atiixp_modem.c
--- a/sound/pci/atiixp_modem.c	2005-01-10 20:11:23 -08:00
+++ b/sound/pci/atiixp_modem.c	2005-01-10 20:11:23 -08:00
@@ -247,7 +247,6 @@
 	ac97_t *ac97[NUM_ATI_CODECS];
 
 	spinlock_t reg_lock;
-	spinlock_t ac97_lock;
 
 	atiixp_dma_t dmas[NUM_ATI_DMAS];
 	struct ac97_pcm *pcms[NUM_ATI_PCMS];
@@ -457,20 +456,14 @@
 static unsigned short snd_atiixp_ac97_read(ac97_t *ac97, unsigned short reg)
 {
 	atiixp_t *chip = ac97->private_data;
-	unsigned short data;
-	spin_lock(&chip->ac97_lock);
-	data = snd_atiixp_codec_read(chip, ac97->num, reg);
-	spin_unlock(&chip->ac97_lock);
-	return data;
+	return snd_atiixp_codec_read(chip, ac97->num, reg);
     
 }
 
 static void snd_atiixp_ac97_write(ac97_t *ac97, unsigned short reg, unsigned short val)
 {
 	atiixp_t *chip = ac97->private_data;
-	spin_lock(&chip->ac97_lock);
 	snd_atiixp_codec_write(chip, ac97->num, reg, val);
-	spin_unlock(&chip->ac97_lock);
 }
 
 /*
@@ -1131,7 +1124,6 @@
 
 	pci_set_power_state(chip->pci, 3);
 	pci_disable_device(chip->pci);
-	snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
 	return 0;
 }
 
@@ -1151,7 +1143,6 @@
 		if (chip->ac97[i])
 			snd_ac97_resume(chip->ac97[i]);
 
-	snd_power_change_state(card, SNDRV_CTL_POWER_D0);
 	return 0;
 }
 #endif /* CONFIG_PM */
@@ -1230,7 +1221,6 @@
 	}
 
 	spin_lock_init(&chip->reg_lock);
-	spin_lock_init(&chip->ac97_lock);
 	init_MUTEX(&chip->open_mutex);
 	chip->card = card;
 	chip->pci = pci;
diff -Nru a/sound/pci/au88x0/au88x0.c b/sound/pci/au88x0/au88x0.c
--- a/sound/pci/au88x0/au88x0.c	2005-01-10 20:11:19 -08:00
+++ b/sound/pci/au88x0/au88x0.c	2005-01-10 20:11:19 -08:00
@@ -4,7 +4,7 @@
  *
  *   This driver is the result of the OpenVortex Project from Savannah
  * (savannah.nongnu.org/projects/openvortex). I would like to thank
- * the developers of OpenVortex, Jeff Muizelar and Kester Maddock, from
+ * the developers of OpenVortex, Jeff Muizelaar and Kester Maddock, from
  * whom i got plenty of help, and their codebase was invaluable.
  *   Thanks to the ALSA developers, they helped a lot working out
  * the ALSA part.
@@ -170,9 +170,8 @@
 	if ((err = pci_request_regions(pci, CARD_NAME_SHORT)) != 0)
 		goto regions_out;
 
-	chip->mmio =
-	    ioremap_nocache(pci_resource_start(pci, 0),
-			    pci_resource_len(pci, 0));
+	chip->mmio = ioremap_nocache(pci_resource_start(pci, 0),
+	                             pci_resource_len(pci, 0));
 	if (!chip->mmio) {
 		printk(KERN_ERR "MMIO area remap failed.\n");
 		err = -ENOMEM;
@@ -187,10 +186,9 @@
 		goto core_out;
 	}
 
-	if ((err =
-	     request_irq(pci->irq, vortex_interrupt,
-			 SA_INTERRUPT | SA_SHIRQ, CARD_NAME_SHORT,
-			 (void *)chip)) != 0) {
+	if ((err = request_irq(pci->irq, vortex_interrupt,
+	                       SA_INTERRUPT | SA_SHIRQ, CARD_NAME_SHORT,
+	                       chip)) != 0) {
 		printk(KERN_ERR "cannot grab irq\n");
 		goto irq_out;
 	}
@@ -214,7 +212,6 @@
       irq_out:
 	vortex_core_shutdown(chip);
       core_out:
-	//FIXME: the type of chip->mmio might need to be changed??
 	iounmap(chip->mmio);
       ioremap_out:
 	pci_release_regions(chip->pci_dev);
diff -Nru a/sound/pci/au88x0/au88x0.h b/sound/pci/au88x0/au88x0.h
--- a/sound/pci/au88x0/au88x0.h	2005-01-10 20:11:19 -08:00
+++ b/sound/pci/au88x0/au88x0.h	2005-01-10 20:11:19 -08:00
@@ -80,7 +80,8 @@
 #define VORTEX_RESOURCE_LAST	0x00000005
 
 /* Check for SDAC bit in "Extended audio ID" AC97 register */
-#define VORTEX_IS_QUAD(x) ((x->codec == NULL) ?  0 : (x->codec->ext_id&0x80))
+//#define VORTEX_IS_QUAD(x) (((x)->codec == NULL) ?  0 : ((x)->codec->ext_id&0x80))
+#define VORTEX_IS_QUAD(x) ((x)->isquad)
 /* Check if chip has bug. */
 #define IS_BAD_CHIP(x) (\
 	(x->rev == 0xfe && x->device == PCI_DEVICE_ID_AUREAL_VORTEX_2) || \
@@ -164,6 +165,8 @@
 	int xt_mode;		/* 1: speakers, 0:headphones. */
 #endif
 
+	int isquad;		/* cache of extended ID codec flag. */
+
 	/* Gameport stuff. */
 	struct gameport *gameport;
 
@@ -208,6 +211,7 @@
 static void vortex_adbdma_pausefifo(vortex_t * vortex, int adbdma);
 static void vortex_adbdma_resumefifo(vortex_t * vortex, int adbdma);
 static int inline vortex_adbdma_getlinearpos(vortex_t * vortex, int adbdma);
+static void vortex_adbdma_resetup(vortex_t *vortex, int adbdma);
 
 #ifndef CHIP_AU8810
 static void vortex_wtdma_startfifo(vortex_t * vortex, int wtdma);
diff -Nru a/sound/pci/au88x0/au88x0_core.c b/sound/pci/au88x0/au88x0_core.c
--- a/sound/pci/au88x0/au88x0_core.c	2005-01-10 20:11:22 -08:00
+++ b/sound/pci/au88x0/au88x0_core.c	2005-01-10 20:11:22 -08:00
@@ -21,7 +21,7 @@
  These functions are mainly the result of translations made
  from the original disassembly of the au88x0 binary drivers,
  written by Aureal before they went down.
- Many thanks to the Jeff Muizelar, Kester Maddock, and whoever
+ Many thanks to the Jeff Muizelaar, Kester Maddock, and whoever
  contributed to the OpenVortex project.
  The author of this file, put the few available pieces together
  and translated the rest of the riddle (Mix, Src and connection stuff).
@@ -1223,6 +1223,33 @@
 	return delta;
 }
 
+
+static void vortex_adbdma_resetup(vortex_t *vortex, int adbdma) {
+	stream_t *dma = &vortex->dma_adb[adbdma];
+	int p, pp, i;
+
+	/* refresh hw page table */
+	for (i=0 ; i < 4 && i < dma->nr_periods; i++) {
+		/* p: audio buffer page index */
+		p = dma->period_virt + i;
+		if (p >= dma->nr_periods)
+			p -= dma->nr_periods;
+		/* pp: hardware DMA page index. */
+		pp = dma->period_real + i;
+		if (dma->nr_periods < 4) {
+			if (pp >= dma->nr_periods)
+				pp -= dma->nr_periods;
+		}
+		else {
+			if (pp >= 4)
+				pp -= 4;
+		}
+		hwwrite(vortex->mmio, VORTEX_ADBDMA_BUFBASE+(((adbdma << 2)+pp) << 2), snd_sgbuf_get_addr(dma->sgbuf, dma->period_bytes * p));
+		/* Force write thru cache. */
+		hwread(vortex->mmio, VORTEX_ADBDMA_BUFBASE + (((adbdma << 2)+pp) << 2));
+	}
+}
+
 static int inline vortex_adbdma_getlinearpos(vortex_t * vortex, int adbdma)
 {
 	stream_t *dma = &vortex->dma_adb[adbdma];
@@ -2081,7 +2108,6 @@
 	    || ((dir == SNDRV_PCM_STREAM_CAPTURE) && (nr_ch > 2)))
 		return -EBUSY;
 
-	spin_lock(&vortex->lock);
 	if (dma >= 0) {
 		en = 0;
 		vortex_adb_checkinout(vortex,
@@ -2277,7 +2303,6 @@
 		}
 	}
 	vortex->dma_adb[dma].nr_ch = nr_ch;
-	spin_unlock(&vortex->lock);
 
 #if 0
 	/* AC97 Codec channel setup. FIXME: this has no effect on some cards !! */
@@ -2406,22 +2431,28 @@
 	}
 	if (source & IRQ_PCMOUT) {
 		/* ALSA period acknowledge. */
+		spin_lock(&vortex->lock);
 		for (i = 0; i < NR_ADB; i++) {
 			if (vortex->dma_adb[i].fifo_status == FIFO_START) {
 				if (vortex_adbdma_bufshift(vortex, i)) ;
+				spin_unlock(&vortex->lock);
 				snd_pcm_period_elapsed(vortex->dma_adb[i].
 						       substream);
+				spin_lock(&vortex->lock);
 			}
 		}
 #ifndef CHIP_AU8810
 		for (i = 0; i < NR_WT; i++) {
 			if (vortex->dma_wt[i].fifo_status == FIFO_START) {
 				if (vortex_wtdma_bufshift(vortex, i)) ;
+				spin_unlock(&vortex->lock);
 				snd_pcm_period_elapsed(vortex->dma_wt[i].
 						       substream);
+				spin_lock(&vortex->lock);
 			}
 		}
 #endif
+		spin_unlock(&vortex->lock);
 		handled = 1;
 	}
 	//Acknowledge the Timer interrupt
@@ -2450,32 +2481,32 @@
 
 	for (i = 0; i < 32; i++) {
 		hwwrite(vortex->mmio, (VORTEX_CODEC_CHN + (i << 2)), 0);
-		udelay(2000);
+		msleep(2);
 	}
 	if (0) {
 		hwwrite(vortex->mmio, VORTEX_CODEC_CTRL, 0x8068);
-		udelay(1000);
+		msleep(1);
 		hwwrite(vortex->mmio, VORTEX_CODEC_CTRL, 0x00e8);
-		udelay(1000);
+		msleep(1);
 	} else {
 		hwwrite(vortex->mmio, VORTEX_CODEC_CTRL, 0x00a8);
-		udelay(2000);
+		msleep(2);
 		hwwrite(vortex->mmio, VORTEX_CODEC_CTRL, 0x80a8);
-		udelay(2000);
+		msleep(2);
 		hwwrite(vortex->mmio, VORTEX_CODEC_CTRL, 0x80e8);
-		udelay(2000);
+		msleep(2);
 		hwwrite(vortex->mmio, VORTEX_CODEC_CTRL, 0x80a8);
-		udelay(2000);
+		msleep(2);
 		hwwrite(vortex->mmio, VORTEX_CODEC_CTRL, 0x00a8);
-		udelay(2000);
+		msleep(2);
 		hwwrite(vortex->mmio, VORTEX_CODEC_CTRL, 0x00e8);
 	}
 	for (i = 0; i < 32; i++) {
 		hwwrite(vortex->mmio, (VORTEX_CODEC_CHN + (i << 2)), 0);
-		udelay(5000);
+		msleep(5);
 	}
 	hwwrite(vortex->mmio, VORTEX_CODEC_CTRL, 0xe8);
-	udelay(1000);
+	msleep(1);
 	/* Enable codec channels 0 and 1. */
 	hwwrite(vortex->mmio, VORTEX_CODEC_EN,
 		hwread(vortex->mmio, VORTEX_CODEC_EN) | EN_CODEC);
@@ -2486,16 +2517,13 @@
 {
 
 	vortex_t *card = (vortex_t *) codec->private_data;
-	unsigned long flags;
 	unsigned int lifeboat = 0;
-	spin_lock_irqsave(&card->lock, flags);
 
 	/* wait for transactions to clear */
 	while (!(hwread(card->mmio, VORTEX_CODEC_CTRL) & 0x100)) {
 		udelay(100);
 		if (lifeboat++ > POLL_COUNT) {
 			printk(KERN_ERR "vortex: ac97 codec stuck busy\n");
-			spin_unlock_irqrestore(&card->lock, flags);
 			return;
 		}
 	}
@@ -2507,8 +2535,6 @@
 
 	/* Flush Caches. */
 	hwread(card->mmio, VORTEX_CODEC_IO);
-
-	spin_unlock_irqrestore(&card->lock, flags);
 }
 
 static unsigned short vortex_codec_read(ac97_t * codec, unsigned short addr)
@@ -2516,17 +2542,13 @@
 
 	vortex_t *card = (vortex_t *) codec->private_data;
 	u32 read_addr, data;
-	unsigned long flags;
 	unsigned lifeboat = 0;
 
-	spin_lock_irqsave(&card->lock, flags);
-
 	/* wait for transactions to clear */
 	while (!(hwread(card->mmio, VORTEX_CODEC_CTRL) & 0x100)) {
 		udelay(100);
 		if (lifeboat++ > POLL_COUNT) {
 			printk(KERN_ERR "vortex: ac97 codec stuck busy\n");
-			spin_unlock_irqrestore(&card->lock, flags);
 			return 0xffff;
 		}
 	}
@@ -2535,20 +2557,15 @@
 	hwwrite(card->mmio, VORTEX_CODEC_IO, read_addr);
 
 	/* wait for address */
-	{
+	do {
 		udelay(100);
 		data = hwread(card->mmio, VORTEX_CODEC_IO);
 		if (lifeboat++ > POLL_COUNT) {
 			printk(KERN_ERR "vortex: ac97 address never arrived\n");
-			spin_unlock_irqrestore(&card->lock, flags);
 			return 0xffff;
 		}
-	}
-	while ((data & VORTEX_CODEC_ADDMASK) !=
-	       (addr << VORTEX_CODEC_ADDSHIFT)) ;
-
-	/* Unlock. */
-	spin_unlock_irqrestore(&card->lock, flags);
+	} while ((data & VORTEX_CODEC_ADDMASK) !=
+		 (addr << VORTEX_CODEC_ADDSHIFT));
 
 	/* return data. */
 	return (u16) (data & VORTEX_CODEC_DATMASK);
@@ -2644,10 +2661,10 @@
 	printk(KERN_INFO "Vortex: init.... ");
 	/* Hardware Init. */
 	hwwrite(vortex->mmio, VORTEX_CTRL, 0xffffffff);
-	udelay(5000);
+	msleep(5);
 	hwwrite(vortex->mmio, VORTEX_CTRL,
 		hwread(vortex->mmio, VORTEX_CTRL) & 0xffdfffff);
-	udelay(5000);
+	msleep(5);
 	/* Reset IRQ flags */
 	hwwrite(vortex->mmio, VORTEX_IRQ_SOURCE, 0xffffffff);
 	hwread(vortex->mmio, VORTEX_IRQ_STAT);
@@ -2714,7 +2731,7 @@
 
 	hwwrite(vortex->mmio, VORTEX_IRQ_CTRL, 0);
 	hwwrite(vortex->mmio, VORTEX_CTRL, 0);
-	udelay(5000);
+	msleep(5);
 	hwwrite(vortex->mmio, VORTEX_IRQ_SOURCE, 0xffff);
 
 	printk(KERN_INFO "done.\n");
diff -Nru a/sound/pci/au88x0/au88x0_eq.c b/sound/pci/au88x0/au88x0_eq.c
--- a/sound/pci/au88x0/au88x0_eq.c	2005-01-10 20:11:22 -08:00
+++ b/sound/pci/au88x0/au88x0_eq.c	2005-01-10 20:11:22 -08:00
@@ -45,6 +45,8 @@
 #define VORTEX_EQ_SOURCE (VORTEX_EQ_BASE + 0x430)
 #define VORTEX_EQ_CTRL   (VORTEX_EQ_BASE + 0x440)
 
+#define VORTEX_BAND_COEFF_SIZE 0x30
+
 /* CEqHw.s */
 static void vortex_EqHw_SetTimeConsts(vortex_t * vortex, u16 gain, u16 level)
 {
@@ -52,10 +54,10 @@
 	hwwrite(vortex->mmio, 0x2b3c8, level);
 }
 
-static inline short sign_invert(short a)
+static inline u16 sign_invert(u16 a)
 {
 	/* -(-32768) -> -32768 so we do -(-32768) -> 32767 to make the result positive */
-	if (a == -32768)
+	if (a == (u16)-32768)
 		return 32767;
 	else
 		return -a;
@@ -71,13 +73,13 @@
 		hwwrite(vortex->mmio, 0x2b004 + n * 0x30, coefs[i + 1]);
 
 		if (eqhw->this08 == 0) {
-			hwwrite(vortex->mmio, 0x2b008 + n * 0x30, coefs[i + 2] & 0xffff);
-			hwwrite(vortex->mmio, 0x2b00c + n * 0x30, coefs[i + 3] & 0xffff);
-			hwwrite(vortex->mmio, 0x2b010 + n * 0x30, coefs[i + 4] & 0xffff);
+			hwwrite(vortex->mmio, 0x2b008 + n * 0x30, coefs[i + 2]);
+			hwwrite(vortex->mmio, 0x2b00c + n * 0x30, coefs[i + 3]);
+			hwwrite(vortex->mmio, 0x2b010 + n * 0x30, coefs[i + 4]);
 		} else {
-			hwwrite(vortex->mmio, 0x2b008 + n * 0x30, sign_invert(coefs[2 + i]) & 0xffff);
-			hwwrite(vortex->mmio, 0x2b00c + n * 0x30, sign_invert(coefs[3 + i]) & 0xffff);
-		        hwwrite(vortex->mmio, 0x2b010 + n * 0x30, sign_invert(coefs[4 + i]) & 0xffff);
+			hwwrite(vortex->mmio, 0x2b008 + n * 0x30, sign_invert(coefs[2 + i]));
+			hwwrite(vortex->mmio, 0x2b00c + n * 0x30, sign_invert(coefs[3 + i]));
+		        hwwrite(vortex->mmio, 0x2b010 + n * 0x30, sign_invert(coefs[4 + i]));
 		}
 		i += 5;
 	}
@@ -93,13 +95,13 @@
 		hwwrite(vortex->mmio, 0x2b1e4 + n * 0x30, coefs[1 + i]);
 
 		if (eqhw->this08 == 0) {
-			hwwrite(vortex->mmio, 0x2b1e8 + n * 0x30, coefs[2 + i] & 0xffff);
-			hwwrite(vortex->mmio, 0x2b1ec + n * 0x30, coefs[3 + i] & 0xffff);
-			hwwrite(vortex->mmio, 0x2b1f0 + n * 0x30, coefs[4 + i] & 0xffff);
+			hwwrite(vortex->mmio, 0x2b1e8 + n * 0x30, coefs[2 + i]);
+			hwwrite(vortex->mmio, 0x2b1ec + n * 0x30, coefs[3 + i]);
+			hwwrite(vortex->mmio, 0x2b1f0 + n * 0x30, coefs[4 + i]);
 		} else {
-			hwwrite(vortex->mmio, 0x2b1e8 + n * 0x30, sign_invert(coefs[2 + i]) & 0xffff);
-			hwwrite(vortex->mmio, 0x2b1ec + n * 0x30, sign_invert(coefs[3 + i]) & 0xffff);
-			hwwrite(vortex->mmio, 0x2b1f0 + n * 0x30, sign_invert(coefs[4 + i]) & 0xffff);
+			hwwrite(vortex->mmio, 0x2b1e8 + n * 0x30, sign_invert(coefs[2 + i]));
+			hwwrite(vortex->mmio, 0x2b1ec + n * 0x30, sign_invert(coefs[3 + i]));
+			hwwrite(vortex->mmio, 0x2b1f0 + n * 0x30, sign_invert(coefs[4 + i]));
 		}
 		i += 5;
 	}
@@ -176,8 +178,8 @@
 		hwwrite(vortex->mmio, 0x2b3d4, a);
 		hwwrite(vortex->mmio, 0x2b3ec, b);
 	} else {
-		hwwrite(vortex->mmio, 0x2b3d4, sign_invert(a) & 0xffff);
-		hwwrite(vortex->mmio, 0x2b3ec, sign_invert(b) & 0xffff);
+		hwwrite(vortex->mmio, 0x2b3d4, sign_invert(a));
+		hwwrite(vortex->mmio, 0x2b3ec, sign_invert(b));
 	}
 }
 
@@ -319,25 +321,27 @@
 
 #endif
 /* EQ band levels settings */
-static void vortex_EqHw_SetLevels(vortex_t * vortex, u16 a[])
+static void vortex_EqHw_SetLevels(vortex_t * vortex, u16 peaks[])
 {
 	eqhw_t *eqhw = &(vortex->eq.this04);
-	int ebx;
+	int i;
 
-	for (ebx = 0; ebx < eqhw->this04; ebx++) {
-		hwwrite(vortex->mmio, 0x2b024 + ebx * 0x30, a[ebx]);
+	/* set left peaks */
+	for (i = 0; i < eqhw->this04; i++) {
+		hwwrite(vortex->mmio, 0x2b024 + i * VORTEX_BAND_COEFF_SIZE, peaks[i]);
 	}
 
-	hwwrite(vortex->mmio, 0x2b3cc, a[eqhw->this04]);
-	hwwrite(vortex->mmio, 0x2b3d8, a[eqhw->this04 + 1]);
+	hwwrite(vortex->mmio, 0x2b3cc, peaks[eqhw->this04]);
+	hwwrite(vortex->mmio, 0x2b3d8, peaks[eqhw->this04 + 1]);
 
-	for (ebx = 0; ebx < eqhw->this04; ebx++) {
-		hwwrite(vortex->mmio, 0x2b204 + ebx * 0x30,
-			a[ebx + (eqhw->this04 + 2)]);
+	/* set right peaks */
+	for (i = 0; i < eqhw->this04; i++) {
+		hwwrite(vortex->mmio, 0x2b204 + i * VORTEX_BAND_COEFF_SIZE,
+			peaks[i + (eqhw->this04 + 2)]);
 	}
 
-	hwwrite(vortex->mmio, 0x2b3e4, a[2 + (eqhw->this04 * 2)]);
-	hwwrite(vortex->mmio, 0x2b3f0, a[3 + (eqhw->this04 * 2)]);
+	hwwrite(vortex->mmio, 0x2b3e4, peaks[2 + (eqhw->this04 * 2)]);
+	hwwrite(vortex->mmio, 0x2b3f0, peaks[3 + (eqhw->this04 * 2)]);
 }
 
 #if 0
diff -Nru a/sound/pci/au88x0/au88x0_mixer.c b/sound/pci/au88x0/au88x0_mixer.c
--- a/sound/pci/au88x0/au88x0_mixer.c	2005-01-10 20:11:17 -08:00
+++ b/sound/pci/au88x0/au88x0_mixer.c	2005-01-10 20:11:17 -08:00
@@ -26,5 +26,7 @@
 	memset(&ac97, 0, sizeof(ac97));
 	// Intialize AC97 codec stuff.
 	ac97.private_data = vortex;
-	return snd_ac97_mixer(pbus, &ac97, &vortex->codec);
+	err = snd_ac97_mixer(pbus, &ac97, &vortex->codec);
+	vortex->isquad = ((vortex->codec == NULL) ?  0 : (vortex->codec->ext_id&0x80));
+	return err;
 }
diff -Nru a/sound/pci/au88x0/au88x0_pcm.c b/sound/pci/au88x0/au88x0_pcm.c
--- a/sound/pci/au88x0/au88x0_pcm.c	2005-01-10 20:11:19 -08:00
+++ b/sound/pci/au88x0/au88x0_pcm.c	2005-01-10 20:11:19 -08:00
@@ -206,6 +206,7 @@
 	   printk(KERN_INFO "Vortex: periods %d, period_bytes %d, channels = %d\n", params_periods(hw_params),
 	   params_period_bytes(hw_params), params_channels(hw_params));
 	 */
+	spin_lock_irq(&chip->lock);
 	// Make audio routes and config buffer DMA.
 	if (VORTEX_PCM_TYPE(substream->pcm) != VORTEX_PCM_WT) {
 		int dma, type = VORTEX_PCM_TYPE(substream->pcm);
@@ -243,6 +244,7 @@
 					params_periods(hw_params));
 	}
 #endif
+	spin_unlock_irq(&chip->lock);
 	return 0;
 }
 
@@ -252,6 +254,7 @@
 	vortex_t *chip = snd_pcm_substream_chip(substream);
 	stream_t *stream = (stream_t *) (substream->runtime->private_data);
 
+	spin_lock_irq(&chip->lock);
 	// Delete audio routes.
 	if (VORTEX_PCM_TYPE(substream->pcm) != VORTEX_PCM_WT) {
 		if (stream != NULL)
@@ -266,6 +269,7 @@
 	}
 #endif
 	substream->runtime->private_data = NULL;
+	spin_unlock_irq(&chip->lock);
 
 	return snd_pcm_lib_free_pages(substream);
 }
@@ -284,6 +288,7 @@
 	else
 		dir = 0;
 	fmt = vortex_alsafmt_aspfmt(runtime->format);
+	spin_lock_irq(&chip->lock);
 	if (VORTEX_PCM_TYPE(substream->pcm) != VORTEX_PCM_WT) {
 		vortex_adbdma_setmode(chip, dma, 1, dir, fmt, 0 /*? */ ,
 				      0);
@@ -298,6 +303,7 @@
 		vortex_wtdma_setstartbuffer(chip, dma, 0);
 	}
 #endif
+	spin_unlock_irq(&chip->lock);
 	return 0;
 }
 
@@ -308,13 +314,16 @@
 	stream_t *stream = (stream_t *) substream->runtime->private_data;
 	int dma = stream->dma;
 
+	spin_lock(&chip->lock);
 	switch (cmd) {
 	case SNDRV_PCM_TRIGGER_START:
 		// do something to start the PCM engine
 		//printk(KERN_INFO "vortex: start %d\n", dma);
 		stream->fifo_enabled = 1;
-		if (VORTEX_PCM_TYPE(substream->pcm) != VORTEX_PCM_WT)
+		if (VORTEX_PCM_TYPE(substream->pcm) != VORTEX_PCM_WT) {
+			vortex_adbdma_resetup(chip, dma);
 			vortex_adbdma_startfifo(chip, dma);
+		}
 #ifndef CHIP_AU8810
 		else {
 			printk(KERN_INFO "vortex: wt start %d\n", dma);
@@ -355,8 +364,10 @@
 #endif
 		break;
 	default:
+		spin_unlock(&chip->lock);
 		return -EINVAL;
 	}
+	spin_unlock(&chip->lock);
 	return 0;
 }
 
diff -Nru a/sound/pci/azt3328.c b/sound/pci/azt3328.c
--- a/sound/pci/azt3328.c	2005-01-10 20:11:19 -08:00
+++ b/sound/pci/azt3328.c	2005-01-10 20:11:20 -08:00
@@ -214,17 +214,17 @@
 
 MODULE_DEVICE_TABLE(pci, snd_azf3328_ids);
 
-void snd_azf3328_io2_write(azf3328_t *chip, int reg, unsigned char value)
+static inline void snd_azf3328_io2_write(azf3328_t *chip, int reg, unsigned char value)
 {
 	outb(value, chip->io2_port + reg);
 }
 
-unsigned char snd_azf3328_io2_read(azf3328_t *chip, int reg)
+static inline unsigned char snd_azf3328_io2_read(azf3328_t *chip, int reg)
 {
 	return inb(chip->io2_port + reg);
 }
 
-void snd_azf3328_mixer_write(azf3328_t *chip, int reg, unsigned long value, int type)
+static void snd_azf3328_mixer_write(azf3328_t *chip, int reg, unsigned long value, int type)
 {
 	switch(type) {
 	case WORD_VALUE:
@@ -239,26 +239,7 @@
 	}
 }
 
-unsigned long snd_azf3328_mixer_read(azf3328_t *chip, int reg, int type)
-{
-	unsigned long res = 0;
-
-	switch(type) {
-	case WORD_VALUE:
-		res = (unsigned long)inw(chip->mixer_port + reg);
-		break;
-	case DWORD_VALUE:
-		res = (unsigned long)inl(chip->mixer_port + reg);
-		break;
-	case BYTE_VALUE:
-		res = (unsigned long)inb(chip->mixer_port + reg);
-		break;
-	}
-
-	return res;
-}
-
-void snd_azf3328_mixer_set_mute(azf3328_t *chip, int reg, int do_mute)
+static void snd_azf3328_mixer_set_mute(azf3328_t *chip, int reg, int do_mute)
 {
 	unsigned char oldval;
 
@@ -272,7 +253,7 @@
 	outb(oldval, chip->mixer_port + reg + 1);
 }
 
-void snd_azf3328_mixer_write_volume_gradually(azf3328_t *chip, int reg, unsigned char dst_vol_left, unsigned char dst_vol_right, int chan_sel, int delay)
+static void snd_azf3328_mixer_write_volume_gradually(azf3328_t *chip, int reg, unsigned char dst_vol_left, unsigned char dst_vol_right, int chan_sel, int delay)
 {
 	unsigned char curr_vol_left = 0, curr_vol_right = 0;
 	int left_done = 0, right_done = 0;
@@ -1363,14 +1344,14 @@
 	for (tmp=0; tmp <= 0x01; tmp += 1)
 		snd_azf3328_dbgmisc("0x%02x: opl 0x%04x, mpu300 0x%04x, mpu310 0x%04x, mpu320 0x%04x, mpu330 0x%04x\n", tmp, inb(0x388 + tmp), inb(0x300 + tmp), inb(0x310 + tmp), inb(0x320 + tmp), inb(0x330 + tmp));
 
-	/* create mixer interface & switches */
-	if ((err = snd_azf3328_mixer_new(chip)) < 0)
-		return err;
-
 	if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) {
 		snd_azf3328_free(chip);
 		return err;
 	}
+
+	/* create mixer interface & switches */
+	if ((err = snd_azf3328_mixer_new(chip)) < 0)
+		return err;
 
 #if 0
 	/* set very low bitrate to reduce noise and power consumption? */
diff -Nru a/sound/pci/bt87x.c b/sound/pci/bt87x.c
--- a/sound/pci/bt87x.c	2005-01-10 20:11:19 -08:00
+++ b/sound/pci/bt87x.c	2005-01-10 20:11:19 -08:00
@@ -45,6 +45,7 @@
 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 digital_rate[SNDRV_CARDS] = { [0 ... (SNDRV_CARDS-1)] = 0 }; /* digital input rate */
+static int load_all;	/* allow to load the non-whitelisted cards */
 
 module_param_array(index, int, NULL, 0444);
 MODULE_PARM_DESC(index, "Index value for Bt87x soundcard");
@@ -54,6 +55,8 @@
 MODULE_PARM_DESC(enable, "Enable Bt87x soundcard");
 module_param_array(digital_rate, int, NULL, 0444);
 MODULE_PARM_DESC(digital_rate, "Digital input rate for Bt87x soundcard");
+module_param(load_all, bool, 0444);
+MODULE_PARM_DESC(load_all, "Allow to load the non-whitelisted cards");
 
 
 #ifndef PCI_VENDOR_ID_BROOKTREE
@@ -173,7 +176,11 @@
 	unsigned int lines;
 
 	u32 reg_control;
+	u32 interrupt_mask;
+
 	int current_line;
+
+	int pci_parity_errors;
 };
 
 enum { DEVICE_DIGITAL, DEVICE_ANALOG };
@@ -246,33 +253,53 @@
 	}
 }
 
+static void snd_bt87x_pci_error(bt87x_t *chip, unsigned int status)
+{
+	u16 pci_status;
+
+	pci_read_config_word(chip->pci, PCI_STATUS, &pci_status);
+	pci_status &= PCI_STATUS_PARITY | PCI_STATUS_SIG_TARGET_ABORT |
+		PCI_STATUS_REC_TARGET_ABORT | PCI_STATUS_REC_MASTER_ABORT |
+		PCI_STATUS_SIG_SYSTEM_ERROR | PCI_STATUS_DETECTED_PARITY;
+	pci_write_config_word(chip->pci, PCI_STATUS, pci_status);
+	if (pci_status != PCI_STATUS_DETECTED_PARITY)
+		snd_printk(KERN_ERR "Aieee - PCI error! status %#08x, PCI status %#04x\n",
+			   status & ERROR_INTERRUPTS, pci_status);
+	else {
+		snd_printk(KERN_ERR "Aieee - PCI parity error detected!\n");
+		/* error 'handling' similar to aic7xxx_pci.c: */
+		chip->pci_parity_errors++;
+		if (chip->pci_parity_errors > 20) {
+			snd_printk(KERN_ERR "Too many PCI parity errors observed.\n");
+			snd_printk(KERN_ERR "Some device on this bus is generating bad parity.\n");
+			snd_printk(KERN_ERR "This is an error *observed by*, not *generated by*, this card.\n");
+			snd_printk(KERN_ERR "PCI parity error checking has been disabled.\n");
+			chip->interrupt_mask &= ~(INT_PPERR | INT_RIPERR);
+			snd_bt87x_writel(chip, REG_INT_MASK, chip->interrupt_mask);
+		}
+	}
+}
+
 static irqreturn_t snd_bt87x_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
 	bt87x_t *chip = dev_id;
-	unsigned int status;
+	unsigned int status, irq_status;
 
 	status = snd_bt87x_readl(chip, REG_INT_STAT);
-	if (!(status & MY_INTERRUPTS))
+	irq_status = status & chip->interrupt_mask;
+	if (!irq_status)
 		return IRQ_NONE;
-	snd_bt87x_writel(chip, REG_INT_STAT, status & MY_INTERRUPTS);
+	snd_bt87x_writel(chip, REG_INT_STAT, irq_status);
 
-	if (status & ERROR_INTERRUPTS) {
-		if (status & (INT_FBUS | INT_FTRGT))
+	if (irq_status & ERROR_INTERRUPTS) {
+		if (irq_status & (INT_FBUS | INT_FTRGT))
 			snd_printk(KERN_WARNING "FIFO overrun, status %#08x\n", status);
-		if (status & INT_OCERR)
+		if (irq_status & INT_OCERR)
 			snd_printk(KERN_ERR "internal RISC error, status %#08x\n", status);
-		if (status & (INT_PPERR | INT_RIPERR | INT_PABORT)) {
-			u16 pci_status;
-			pci_read_config_word(chip->pci, PCI_STATUS, &pci_status);
-			pci_write_config_word(chip->pci, PCI_STATUS, pci_status &
-					      (PCI_STATUS_PARITY | PCI_STATUS_SIG_TARGET_ABORT |
-					       PCI_STATUS_REC_TARGET_ABORT | PCI_STATUS_REC_MASTER_ABORT |
-					       PCI_STATUS_SIG_SYSTEM_ERROR | PCI_STATUS_DETECTED_PARITY));
-			snd_printk(KERN_ERR "Aieee - PCI error! status %#08x, PCI status %#04x\n",
-				   status, pci_status);
-		}
+		if (irq_status & (INT_PPERR | INT_RIPERR | INT_PABORT))
+			snd_bt87x_pci_error(chip, irq_status);
 	}
-	if ((status & INT_RISCI) && (chip->reg_control & CTL_ACAP_EN)) {
+	if ((irq_status & INT_RISCI) && (chip->reg_control & CTL_ACAP_EN)) {
 		int current_block, irq_block;
 
 		/* assume that exactly one line has been recorded */
@@ -458,7 +485,7 @@
 	snd_bt87x_writel(chip, REG_RISC_STRT_ADD, chip->dma_risc.addr);
 	snd_bt87x_writel(chip, REG_PACKET_LEN,
 			 chip->line_bytes | (chip->lines << 16));
-	snd_bt87x_writel(chip, REG_INT_MASK, MY_INTERRUPTS);
+	snd_bt87x_writel(chip, REG_INT_MASK, chip->interrupt_mask);
 	snd_bt87x_writel(chip, REG_GPIO_DMA_CTL, chip->reg_control);
 	spin_unlock(&chip->reg_lock);
 	return 0;
@@ -717,6 +744,7 @@
 	}
 
 	chip->reg_control = CTL_DA_ES2 | CTL_PKTP_16 | (15 << CTL_DA_SDR_SHIFT);
+	chip->interrupt_mask = MY_INTERRUPTS;
 	snd_bt87x_writel(chip, REG_GPIO_DMA_CTL, chip->reg_control);
 	snd_bt87x_writel(chip, REG_INT_MASK, 0);
 	snd_bt87x_writel(chip, REG_INT_STAT, MY_INTERRUPTS);
@@ -741,13 +769,73 @@
 	return 0;
 }
 
+#define BT_DEVICE(chip, subvend, subdev, rate) \
+	{ .vendor = PCI_VENDOR_ID_BROOKTREE, \
+	  .device = PCI_DEVICE_ID_BROOKTREE_##chip, \
+	  .subvendor = subvend, .subdevice = subdev, \
+	  .driver_data = rate }
+
+/* driver_data is the default digital_rate value for that device */
+static struct pci_device_id snd_bt87x_ids[] = {
+	BT_DEVICE(878, 0x0070, 0x13eb, 32000), /* Hauppauge WinTV series */
+	BT_DEVICE(879, 0x0070, 0x13eb, 32000), /* Hauppauge WinTV series */
+	BT_DEVICE(878, 0x0070, 0xff01, 44100), /* Viewcast Osprey 200 */
+	{ }
+};
+MODULE_DEVICE_TABLE(pci, snd_bt87x_ids);
+
+/* cards known not to have audio
+ * (DVB cards use the audio function to transfer MPEG data) */
+static struct {
+	unsigned short subvendor, subdevice;
+} blacklist[] __devinitdata = {
+	{0x0071, 0x0101}, /* Nebula Electronics DigiTV */
+	{0x11bd, 0x0026}, /* Pinnacle PCTV SAT CI */
+	{0x1461, 0x0761}, /* AVermedia AverTV DVB-T */
+	{0x1461, 0x0771}, /* AVermedia DVB-T 771 */
+	{0x1822, 0x0001}, /* Twinhan VisionPlus DVB-T */
+	{0x18ac, 0xdb10}, /* DVICO FusionHDTV DVB-T Lite */
+	{0x270f, 0xfc00}, /* Chaintech Digitop DST-1000 DVB-S */
+};
+
+/* return the rate of the card, or a negative value if it's blacklisted */
+static int __devinit snd_bt87x_detect_card(struct pci_dev *pci)
+{
+	int i;
+	const struct pci_device_id *supported;
+
+	supported = pci_match_device(snd_bt87x_ids, pci);
+	if (supported)
+		return supported->driver_data;
+
+	for (i = 0; i < ARRAY_SIZE(blacklist); ++i)
+		if (blacklist[i].subvendor == pci->subsystem_vendor &&
+		    blacklist[i].subdevice == pci->subsystem_device) {
+			snd_printdd(KERN_INFO "card %#04x:%#04x has no audio\n",
+				    pci->subsystem_vendor, pci->subsystem_device);
+			return -EBUSY;
+		}
+
+	snd_printk(KERN_INFO "unknown card %#04x:%#04x, using default rate 32000\n",
+		   pci->subsystem_vendor, pci->subsystem_device);
+	snd_printk(KERN_DEBUG "please mail id, board name, and, "
+		   "if it works, the correct digital_rate option to "
+		   "<alsa-devel@lists.sf.net>\n");
+	return 32000; /* default rate */
+}
+
 static int __devinit snd_bt87x_probe(struct pci_dev *pci,
 				     const struct pci_device_id *pci_id)
 {
 	static int dev;
 	snd_card_t *card;
 	bt87x_t *chip;
-	int err;
+	int err, rate;
+
+	rate = pci_id->driver_data;
+	if (! rate)
+		if ((rate = snd_bt87x_detect_card(pci)) <= 0)
+			return -ENODEV;
 
 	if (dev >= SNDRV_CARDS)
 		return -ENODEV;
@@ -767,7 +855,7 @@
 	if (digital_rate[dev] > 0)
 		chip->dig_rate = digital_rate[dev];
 	else
-		chip->dig_rate = (int)pci_id->driver_data;
+		chip->dig_rate = rate;
 
 	err = snd_bt87x_pcm(chip, DEVICE_DIGITAL, "Bt87x Digital");
 	if (err < 0)
@@ -811,22 +899,13 @@
 	pci_set_drvdata(pci, NULL);
 }
 
-#define BT_DEVICE(chip, subvend, subdev, rate) \
-	{ .vendor = PCI_VENDOR_ID_BROOKTREE, \
-	  .device = PCI_DEVICE_ID_BROOKTREE_##chip, \
-	  .subvendor = subvend, .subdevice = subdev, \
-	  .driver_data = rate }
-
-/* driver_data is the default digital_rate value for that device */
-static struct pci_device_id snd_bt87x_ids[] = {
-	BT_DEVICE(878, 0x0070, 0xff01, 44100), /* Osprey 200 */
-
-	/* default entries for 32kHz and generic Bt87x cards */
-	BT_DEVICE(878, PCI_ANY_ID, PCI_ANY_ID, 32000),
-	BT_DEVICE(879, PCI_ANY_ID, PCI_ANY_ID, 32000),
+/* default entries for all Bt87x cards - it's not exported */
+/* driver_data is set to 0 to call detection */
+static struct pci_device_id snd_bt87x_default_ids[] = {
+	BT_DEVICE(878, PCI_ANY_ID, PCI_ANY_ID, 0),
+	BT_DEVICE(879, PCI_ANY_ID, PCI_ANY_ID, 0),
 	{ }
 };
-MODULE_DEVICE_TABLE(pci, snd_bt87x_ids);
 
 static struct pci_driver driver = {
 	.name = "Bt87x",
@@ -837,6 +916,8 @@
 
 static int __init alsa_card_bt87x_init(void)
 {
+	if (load_all)
+		driver.id_table = snd_bt87x_default_ids;
 	return pci_module_init(&driver);
 }
 
diff -Nru a/sound/pci/ca0106/Makefile b/sound/pci/ca0106/Makefile
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/sound/pci/ca0106/Makefile	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,3 @@
+snd-ca0106-objs := ca0106_main.o ca0106_proc.o ca0106_mixer.o
+
+obj-$(CONFIG_SND_CA0106) += snd-ca0106.o
diff -Nru a/sound/pci/ca0106/ca0106.h b/sound/pci/ca0106/ca0106.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/sound/pci/ca0106/ca0106.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,549 @@
+/*
+ *  Copyright (c) 2004 James Courtier-Dutton <James@superbug.demon.co.uk>
+ *  Driver CA0106 chips. e.g. Sound Blaster Audigy LS and Live 24bit
+ *  Version: 0.0.20
+ *
+ *  FEATURES currently supported:
+ *    See ca0106_main.c for features.
+ * 
+ *  Changelog:
+ *    Support interrupts per period.
+ *    Removed noise from Center/LFE channel when in Analog mode.
+ *    Rename and remove mixer controls.
+ *  0.0.6
+ *    Use separate card based DMA buffer for periods table list.
+ *  0.0.7
+ *    Change remove and rename ctrls into lists.
+ *  0.0.8
+ *    Try to fix capture sources.
+ *  0.0.9
+ *    Fix AC3 output.
+ *    Enable S32_LE format support.
+ *  0.0.10
+ *    Enable playback 48000 and 96000 rates. (Rates other that these do not work, even with "plug:front".)
+ *  0.0.11
+ *    Add Model name recognition.
+ *  0.0.12
+ *    Correct interrupt timing. interrupt at end of period, instead of in the middle of a playback period.
+ *    Remove redundent "voice" handling.
+ *  0.0.13
+ *    Single trigger call for multi channels.
+ *  0.0.14
+ *    Set limits based on what the sound card hardware can do.
+ *    playback periods_min=2, periods_max=8
+ *    capture hw constraints require period_size = n * 64 bytes.
+ *    playback hw constraints require period_size = n * 64 bytes.
+ *  0.0.15
+ *    Separated ca0106.c into separate functional .c files.
+ *  0.0.16
+ *    Implement 192000 sample rate.
+ *  0.0.17
+ *    Add support for SB0410 and SB0413.
+ *  0.0.18
+ *    Modified Copyright message.
+ *  0.0.19
+ *    Added I2C and SPI registers. Filled in interrupt enable.
+ *  0.0.20
+ *    Added GPIO info for SB Live 24bit.
+ *
+ *
+ *  This code was initally based on code from ALSA's emu10k1x.c which is:
+ *  Copyright (c) by Francisco Moraes <fmoraes@nc.rr.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., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+ *
+ */
+
+/************************************************************************************************/
+/* PCI function 0 registers, address = <val> + PCIBASE0						*/
+/************************************************************************************************/
+
+#define PTR			0x00		/* Indexed register set pointer register	*/
+						/* NOTE: The CHANNELNUM and ADDRESS words can	*/
+						/* be modified independently of each other.	*/
+						/* CNL[1:0], ADDR[27:16]                        */
+
+#define DATA			0x04		/* Indexed register set data register		*/
+						/* DATA[31:0]					*/
+
+#define IPR			0x08		/* Global interrupt pending register		*/
+						/* Clear pending interrupts by writing a 1 to	*/
+						/* the relevant bits and zero to the other bits	*/
+#define IPR_MIDI_RX_B		0x00020000	/* MIDI UART-B Receive buffer non-empty		*/
+#define IPR_MIDI_TX_B		0x00010000	/* MIDI UART-B Transmit buffer empty		*/
+#define IPR_SPDIF_IN_USER	0x00004000      /* SPDIF input user data has 16 more bits	*/
+#define IPR_SPDIF_OUT_USER	0x00002000      /* SPDIF output user data needs 16 more bits	*/
+#define IPR_SPDIF_OUT_FRAME	0x00001000      /* SPDIF frame about to start			*/
+#define IPR_SPI			0x00000800      /* SPI transaction completed			*/
+#define IPR_I2C_EEPROM		0x00000400      /* I2C EEPROM transaction completed		*/
+#define IPR_I2C_DAC		0x00000200      /* I2C DAC transaction completed		*/
+#define IPR_AI			0x00000100      /* Audio pending register changed. See PTR reg 0x76	*/
+#define IPR_GPI			0x00000080      /* General Purpose input changed		*/
+#define IPR_SRC_LOCKED          0x00000040      /* SRC lock status changed			*/
+#define IPR_SPDIF_STATUS        0x00000020      /* SPDIF status changed				*/
+#define IPR_TIMER2              0x00000010      /* 192000Hz Timer				*/
+#define IPR_TIMER1              0x00000008      /* 44100Hz Timer				*/
+#define IPR_MIDI_RX_A		0x00000004	/* MIDI UART-A Receive buffer non-empty		*/
+#define IPR_MIDI_TX_A		0x00000002	/* MIDI UART-A Transmit buffer empty		*/
+#define IPR_PCI			0x00000001	/* PCI Bus error				*/
+
+#define INTE			0x0c		/* Interrupt enable register			*/
+
+#define INTE_MIDI_RX_B		0x00020000	/* MIDI UART-B Receive buffer non-empty		*/
+#define INTE_MIDI_TX_B		0x00010000	/* MIDI UART-B Transmit buffer empty		*/
+#define INTE_SPDIF_IN_USER	0x00004000      /* SPDIF input user data has 16 more bits	*/
+#define INTE_SPDIF_OUT_USER	0x00002000      /* SPDIF output user data needs 16 more bits	*/
+#define INTE_SPDIF_OUT_FRAME	0x00001000      /* SPDIF frame about to start			*/
+#define INTE_SPI		0x00000800      /* SPI transaction completed			*/
+#define INTE_I2C_EEPROM		0x00000400      /* I2C EEPROM transaction completed		*/
+#define INTE_I2C_DAC		0x00000200      /* I2C DAC transaction completed		*/
+#define INTE_AI			0x00000100      /* Audio pending register changed. See PTR reg 0x75 */
+#define INTE_GPI		0x00000080      /* General Purpose input changed		*/
+#define INTE_SRC_LOCKED         0x00000040      /* SRC lock status changed			*/
+#define INTE_SPDIF_STATUS       0x00000020      /* SPDIF status changed				*/
+#define INTE_TIMER2             0x00000010      /* 192000Hz Timer				*/
+#define INTE_TIMER1             0x00000008      /* 44100Hz Timer				*/
+#define INTE_MIDI_RX_A		0x00000004	/* MIDI UART-A Receive buffer non-empty		*/
+#define INTE_MIDI_TX_A		0x00000002	/* MIDI UART-A Transmit buffer empty		*/
+#define INTE_PCI		0x00000001	/* PCI Bus error				*/
+
+#define UNKNOWN10		0x10		/* Unknown ??. Defaults to 0 */
+#define HCFG			0x14		/* Hardware config register			*/
+						/* 0x1000 causes AC3 to fails. It adds a dither bit. */
+
+#define HCFG_STAC		0x10000000	/* Special mode for STAC9460 Codec. */
+#define HCFG_CAPTURE_I2S_BYPASS	0x08000000	/* 1 = bypass I2S input async SRC. */
+#define HCFG_CAPTURE_SPDIF_BYPASS 0x04000000	/* 1 = bypass SPDIF input async SRC. */
+#define HCFG_PLAYBACK_I2S_BYPASS 0x02000000	/* 0 = I2S IN mixer output, 1 = I2S IN1. */
+#define HCFG_FORCE_LOCK		0x01000000	/* For test only. Force input SRC tracker to lock. */
+#define HCFG_PLAYBACK_ATTENUATION 0x00006000	/* Playback attenuation mask. 0 = 0dB, 1 = 6dB, 2 = 12dB, 3 = Mute. */
+#define HCFG_PLAYBACK_DITHER	0x00001000	/* 1 = Add dither bit to all playback channels. */
+#define HCFG_PLAYBACK_S32_LE	0x00000800	/* 1 = S32_LE, 0 = S16_LE                       */
+#define HCFG_CAPTURE_S32_LE	0x00000400	/* 1 = S32_LE, 0 = S16_LE (S32_LE current not working)	*/
+#define HCFG_8_CHANNEL_PLAY	0x00000200	/* 1 = 8 channels, 0 = 2 channels per substream.*/
+#define HCFG_8_CHANNEL_CAPTURE	0x00000100	/* 1 = 8 channels, 0 = 2 channels per substream.*/
+#define HCFG_MONO		0x00000080	/* 1 = I2S Input mono                           */
+#define HCFG_I2S_OUTPUT		0x00000010	/* 1 = I2S Output disabled                      */
+#define HCFG_AC97		0x00000008	/* 0 = AC97 1.0, 1 = AC97 2.0                   */
+#define HCFG_LOCK_PLAYBACK_CACHE 0x00000004	/* 1 = Cancel bustmaster accesses to soundcache */
+						/* NOTE: This should generally never be used.  	*/
+#define HCFG_LOCK_CAPTURE_CACHE	0x00000002	/* 1 = Cancel bustmaster accesses to soundcache */
+						/* NOTE: This should generally never be used.  	*/
+#define HCFG_AUDIOENABLE	0x00000001	/* 0 = CODECs transmit zero-valued samples	*/
+						/* Should be set to 1 when the EMU10K1 is	*/
+						/* completely initialized.			*/
+#define GPIO			0x18		/* Defaults: 005f03a3-Analog, 005f02a2-SPDIF.   */
+						/* Here pins 0,1,2,3,4,,6 are output. 5,7 are input */
+						/* For the Audigy LS, pin 0 (or bit 8) controls the SPDIF/Analog jack. */
+						/* SB Live 24bit:
+						 * bit 8 0 = SPDIF in and out / 1 = Analog (Mic or Line)-in.
+						 * bit 9 0 = Mute / 1 = Analog out.
+						 * bit 10 0 = Line-in / 1 = Mic-in.
+						 * bit 11 0 = ? / 1 = ?
+						 * bit 12 0 = ? / 1 = ?
+						 * bit 13 0 = ? / 1 = ?
+						 * bit 14 0 = Mute / 1 = Analog out
+						 * bit 15 0 = ? / 1 = ?
+						 * Both bit 9 and bit 14 have to be set for analog sound to work on the SB Live 24bit.
+						 */
+						/* 8 general purpose programmable In/Out pins.
+						 * GPI [8:0] Read only. Default 0.
+						 * GPO [15:8] Default 0x9. (Default to SPDIF jack enabled for SPDIF)
+						 * GPO Enable [23:16] Default 0x0f. Setting a bit to 1, causes the pin to be an output pin.
+						 */
+#define AC97DATA		0x1c		/* AC97 register set data register (16 bit)	*/
+
+#define AC97ADDRESS		0x1e		/* AC97 register set address register (8 bit)	*/
+
+/********************************************************************************************************/
+/* CA0106 pointer-offset register set, accessed through the PTR and DATA registers                     */
+/********************************************************************************************************/
+                                                                                                                           
+/* Initally all registers from 0x00 to 0x3f have zero contents. */
+#define PLAYBACK_LIST_ADDR	0x00		/* Base DMA address of a list of pointers to each period/size */
+						/* One list entry: 4 bytes for DMA address, 
+						 * 4 bytes for period_size << 16.
+						 * One list entry is 8 bytes long.
+						 * One list entry for each period in the buffer.
+						 */
+						/* ADDR[31:0], Default: 0x0 */
+#define PLAYBACK_LIST_SIZE	0x01		/* Size of list in bytes << 16. E.g. 8 periods -> 0x00380000  */
+						/* SIZE[21:16], Default: 0x8 */
+#define PLAYBACK_LIST_PTR	0x02		/* Pointer to the current period being played */
+						/* PTR[5:0], Default: 0x0 */
+#define PLAYBACK_UNKNOWN3	0x03		/* Not used ?? */
+#define PLAYBACK_DMA_ADDR	0x04		/* Playback DMA addresss */
+						/* DMA[31:0], Default: 0x0 */
+#define PLAYBACK_PERIOD_SIZE	0x05		/* Playback period size. win2000 uses 0x04000000 */
+						/* SIZE[31:16], Default: 0x0 */
+#define PLAYBACK_POINTER	0x06		/* Playback period pointer. Used with PLAYBACK_LIST_PTR to determine buffer position currently in DAC */
+						/* POINTER[15:0], Default: 0x0 */
+#define PLAYBACK_PERIOD_END_ADDR 0x07		/* Playback fifo end address */
+						/* END_ADDR[15:0], FLAG[16] 0 = don't stop, 1 = stop */
+#define PLAYBACK_FIFO_OFFSET_ADDRESS	0x08	/* Current fifo offset address [21:16] */
+						/* Cache size valid [5:0] */
+#define PLAYBACK_UNKNOWN9	0x09		/* 0x9 to 0xf Unused */
+#define CAPTURE_DMA_ADDR	0x10		/* Capture DMA address */
+						/* DMA[31:0], Default: 0x0 */
+#define CAPTURE_BUFFER_SIZE	0x11		/* Capture buffer size */
+						/* SIZE[31:16], Default: 0x0 */
+#define CAPTURE_POINTER		0x12		/* Capture buffer pointer. Sample currently in ADC */
+						/* POINTER[15:0], Default: 0x0 */
+#define CAPTURE_FIFO_OFFSET_ADDRESS	0x13	/* Current fifo offset address [21:16] */
+						/* Cache size valid [5:0] */
+#define PLAYBACK_LAST_SAMPLE    0x20		/* The sample currently being played */
+/* 0x21 - 0x3f unused */
+#define BASIC_INTERRUPT         0x40		/* Used by both playback and capture interrupt handler */
+						/* Playback (0x1<<channel_id) */
+						/* Capture  (0x100<<channel_id) */
+						/* Playback sample rate 96000 = 0x20000 */
+						/* Start Playback [3:0] (one bit per channel)
+						 * Start Capture [11:8] (one bit per channel)
+						 * Playback rate [23:16] (2 bits per channel) (0=48kHz, 1=44.1kHz, 2=96kHz, 3=192Khz)
+						 * Playback mixer in enable [27:24] (one bit per channel)
+						 * Playback mixer out enable [31:28] (one bit per channel)
+						 */
+/* The Digital out jack is shared with the Center/LFE Analogue output. 
+ * The jack has 4 poles. I will call 1 - Tip, 2 - Next to 1, 3 - Next to 2, 4 - Next to 3
+ * For Analogue: 1 -> Center Speaker, 2 -> Sub Woofer, 3 -> Ground, 4 -> Ground
+ * For Digital: 1 -> Front SPDIF, 2 -> Rear SPDIF, 3 -> Center/Subwoofer SPDIF, 4 -> Ground.
+ * Standard 4 pole Video A/V cable with RCA outputs: 1 -> White, 2 -> Yellow, 3 -> Sheild on all three, 4 -> Red.
+ * So, from this you can see that you cannot use a Standard 4 pole Video A/V cable with the SB Audigy LS card.
+ */
+/* The Front SPDIF PCM gets mixed with samples from the AC97 codec, so can only work for Stereo PCM and not AC3/DTS
+ * The Rear SPDIF can be used for Stereo PCM and also AC3/DTS
+ * The Center/LFE SPDIF cannot be used for AC3/DTS, but can be used for Stereo PCM.
+ * Summary: For ALSA we use the Rear channel for SPDIF Digital AC3/DTS output
+ */
+/* A standard 2 pole mono mini-jack to RCA plug can be used for SPDIF Stereo PCM output from the Front channel.
+ * A standard 3 pole stereo mini-jack to 2 RCA plugs can be used for SPDIF AC3/DTS and Stereo PCM output utilising the Rear channel and just one of the RCA plugs. 
+ */
+#define SPCS0			0x41		/* SPDIF output Channel Status 0 register. For Rear. default=0x02108004, non-audio=0x02108006	*/
+#define SPCS1			0x42		/* SPDIF output Channel Status 1 register. For Front */
+#define SPCS2			0x43		/* SPDIF output Channel Status 2 register. For Center/LFE */
+#define SPCS3			0x44		/* SPDIF output Channel Status 3 register. Unknown */
+						/* When Channel set to 0: */
+#define SPCS_CLKACCYMASK	0x30000000	/* Clock accuracy				*/
+#define SPCS_CLKACCY_1000PPM	0x00000000	/* 1000 parts per million			*/
+#define SPCS_CLKACCY_50PPM	0x10000000	/* 50 parts per million				*/
+#define SPCS_CLKACCY_VARIABLE	0x20000000	/* Variable accuracy				*/
+#define SPCS_SAMPLERATEMASK	0x0f000000	/* Sample rate					*/
+#define SPCS_SAMPLERATE_44	0x00000000	/* 44.1kHz sample rate				*/
+#define SPCS_SAMPLERATE_48	0x02000000	/* 48kHz sample rate				*/
+#define SPCS_SAMPLERATE_32	0x03000000	/* 32kHz sample rate				*/
+#define SPCS_CHANNELNUMMASK	0x00f00000	/* Channel number				*/
+#define SPCS_CHANNELNUM_UNSPEC	0x00000000	/* Unspecified channel number			*/
+#define SPCS_CHANNELNUM_LEFT	0x00100000	/* Left channel					*/
+#define SPCS_CHANNELNUM_RIGHT	0x00200000	/* Right channel				*/
+#define SPCS_SOURCENUMMASK	0x000f0000	/* Source number				*/
+#define SPCS_SOURCENUM_UNSPEC	0x00000000	/* Unspecified source number			*/
+#define SPCS_GENERATIONSTATUS	0x00008000	/* Originality flag (see IEC-958 spec)		*/
+#define SPCS_CATEGORYCODEMASK	0x00007f00	/* Category code (see IEC-958 spec)		*/
+#define SPCS_MODEMASK		0x000000c0	/* Mode (see IEC-958 spec)			*/
+#define SPCS_EMPHASISMASK	0x00000038	/* Emphasis					*/
+#define SPCS_EMPHASIS_NONE	0x00000000	/* No emphasis					*/
+#define SPCS_EMPHASIS_50_15	0x00000008	/* 50/15 usec 2 channel				*/
+#define SPCS_COPYRIGHT		0x00000004	/* Copyright asserted flag -- do not modify	*/
+#define SPCS_NOTAUDIODATA	0x00000002	/* 0 = Digital audio, 1 = not audio		*/
+#define SPCS_PROFESSIONAL	0x00000001	/* 0 = Consumer (IEC-958), 1 = pro (AES3-1992)	*/
+
+						/* When Channel set to 1: */
+#define SPCS_WORD_LENGTH_MASK	0x0000000f	/* Word Length Mask				*/
+#define SPCS_WORD_LENGTH_16	0x00000008	/* Word Length 16 bit				*/
+#define SPCS_WORD_LENGTH_17	0x00000006	/* Word Length 17 bit				*/
+#define SPCS_WORD_LENGTH_18	0x00000004	/* Word Length 18 bit				*/
+#define SPCS_WORD_LENGTH_19	0x00000002	/* Word Length 19 bit				*/
+#define SPCS_WORD_LENGTH_20A	0x0000000a	/* Word Length 20 bit				*/
+#define SPCS_WORD_LENGTH_20	0x00000009	/* Word Length 20 bit (both 0xa and 0x9 are 20 bit) */
+#define SPCS_WORD_LENGTH_21	0x00000007	/* Word Length 21 bit				*/
+#define SPCS_WORD_LENGTH_21	0x00000007	/* Word Length 21 bit				*/
+#define SPCS_WORD_LENGTH_22	0x00000005	/* Word Length 22 bit				*/
+#define SPCS_WORD_LENGTH_23	0x00000003	/* Word Length 23 bit				*/
+#define SPCS_WORD_LENGTH_24	0x0000000b	/* Word Length 24 bit				*/
+#define SPCS_ORIGINAL_SAMPLE_RATE_MASK	0x000000f0 /* Original Sample rate			*/
+#define SPCS_ORIGINAL_SAMPLE_RATE_NONE	0x00000000 /* Original Sample rate not indicated	*/
+#define SPCS_ORIGINAL_SAMPLE_RATE_16000	0x00000010 /* Original Sample rate	*/
+#define SPCS_ORIGINAL_SAMPLE_RATE_RES1	0x00000020 /* Original Sample rate	*/
+#define SPCS_ORIGINAL_SAMPLE_RATE_32000	0x00000030 /* Original Sample rate	*/
+#define SPCS_ORIGINAL_SAMPLE_RATE_12000	0x00000040 /* Original Sample rate	*/
+#define SPCS_ORIGINAL_SAMPLE_RATE_11025	0x00000050 /* Original Sample rate	*/
+#define SPCS_ORIGINAL_SAMPLE_RATE_8000	0x00000060 /* Original Sample rate	*/
+#define SPCS_ORIGINAL_SAMPLE_RATE_RES2	0x00000070 /* Original Sample rate	*/
+#define SPCS_ORIGINAL_SAMPLE_RATE_192000 0x00000080 /* Original Sample rate	*/
+#define SPCS_ORIGINAL_SAMPLE_RATE_24000	0x00000090 /* Original Sample rate	*/
+#define SPCS_ORIGINAL_SAMPLE_RATE_96000	0x000000a0 /* Original Sample rate	*/
+#define SPCS_ORIGINAL_SAMPLE_RATE_48000	0x000000b0 /* Original Sample rate	*/
+#define SPCS_ORIGINAL_SAMPLE_RATE_176400 0x000000c0 /* Original Sample rate	*/
+#define SPCS_ORIGINAL_SAMPLE_RATE_22050	0x000000d0 /* Original Sample rate	*/
+#define SPCS_ORIGINAL_SAMPLE_RATE_88200	0x000000e0 /* Original Sample rate	*/
+#define SPCS_ORIGINAL_SAMPLE_RATE_44100	0x000000f0 /* Original Sample rate	*/
+
+#define SPDIF_SELECT1		0x45		/* Enables SPDIF or Analogue outputs 0-SPDIF, 0xf00-Analogue */
+						/* 0x100 - Front, 0x800 - Rear, 0x200 - Center/LFE.
+						 * But as the jack is shared, use 0xf00.
+						 * The Windows2000 driver uses 0x0000000f for both digital and analog.
+						 * 0xf00 introduces interesting noises onto the Center/LFE.
+						 * If you turn the volume up, you hear computer noise,
+						 * e.g. mouse moving, changing between app windows etc.
+						 * So, I am going to set this to 0x0000000f all the time now,
+						 * same as the windows driver does.
+						 * Use register SPDIF_SELECT2(0x72) to switch between SPDIF and Analog.
+						 */
+						/* When Channel = 0:
+						 * Wide SPDIF format [3:0] (one bit for each channel) (0=20bit, 1=24bit)
+						 * Tristate SPDIF Output [11:8] (one bit for each channel) (0=Not tristate, 1=Tristate)
+						 * SPDIF Bypass enable [19:16] (one bit for each channel) (0=Not bypass, 1=Bypass)
+						 */
+						/* When Channel = 1:
+						 * SPDIF 0 User data [7:0]
+						 * SPDIF 1 User data [15:8]
+						 * SPDIF 0 User data [23:16]
+						 * SPDIF 0 User data [31:24]
+						 * User data can be sent by using the SPDIF output frame pending and SPDIF output user bit interrupts.
+						 */
+#define WATERMARK		0x46		/* Test bit to indicate cache usage level */
+#define SPDIF_INPUT_STATUS	0x49		/* SPDIF Input status register. Bits the same as SPCS.
+						 * When Channel = 0: Bits the same as SPCS channel 0.
+						 * When Channel = 1: Bits the same as SPCS channel 1.
+						 * When Channel = 2:
+						 * SPDIF Input User data [16:0]
+						 * SPDIF Input Frame count [21:16]
+						 */
+#define CAPTURE_CACHE_DATA	0x50		/* 0x50-0x5f Recorded samples. */
+#define CAPTURE_SOURCE          0x60            /* Capture Source 0 = MIC */
+#define CAPTURE_SOURCE_CHANNEL0 0xf0000000	/* Mask for selecting the Capture sources */
+#define CAPTURE_SOURCE_CHANNEL1 0x0f000000	/* 0 - SPDIF mixer output. */
+#define CAPTURE_SOURCE_CHANNEL2 0x00f00000      /* 1 - What you hear or . 2 - ?? */
+#define CAPTURE_SOURCE_CHANNEL3 0x000f0000	/* 3 - Mic in, Line in, TAD in, Aux in. */
+#define CAPTURE_SOURCE_RECORD_MAP 0x0000ffff	/* Default 0x00e4 */
+						/* Record Map [7:0] (2 bits per channel) 0=mapped to channel 0, 1=mapped to channel 1, 2=mapped to channel2, 3=mapped to channel3 
+						 * Record source select for channel 0 [18:16]
+						 * Record source select for channel 1 [22:20]
+						 * Record source select for channel 2 [26:24]
+						 * Record source select for channel 3 [30:28]
+						 * 0 - SPDIF mixer output.
+						 * 1 - i2s mixer output.
+						 * 2 - SPDIF input.
+						 * 3 - i2s input.
+						 * 4 - AC97 capture.
+						 * 5 - SRC output.
+						 */
+#define CAPTURE_VOLUME1         0x61            /* Capture  volume per channel 0-3 */
+#define CAPTURE_VOLUME2         0x62            /* Capture  volume per channel 4-7 */
+
+#define PLAYBACK_ROUTING1       0x63            /* Playback routing of channels 0-7. Effects AC3 output. Default 0x32765410 */
+#define ROUTING1_REAR           0x77000000      /* Channel_id 0 sends to 10, Channel_id 1 sends to 32 */
+#define ROUTING1_NULL           0x00770000      /* Channel_id 2 sends to 54, Channel_id 3 sends to 76 */
+#define ROUTING1_CENTER_LFE     0x00007700      /* 0x32765410 means, send Channel_id 0 to FRONT, Channel_id 1 to REAR */
+#define ROUTING1_FRONT          0x00000077	/* Channel_id 2 to CENTER_LFE, Channel_id 3 to NULL. */
+						/* Channel_id's handle stereo channels. Channel X is a single mono channel */
+						/* Host is input from the PCI bus. */
+						/* Host channel 0 [2:0] -> SPDIF Mixer/Router channel 0-7.
+						 * Host channel 1 [6:4] -> SPDIF Mixer/Router channel 0-7.
+						 * Host channel 2 [10:8] -> SPDIF Mixer/Router channel 0-7.
+						 * Host channel 3 [14:12] -> SPDIF Mixer/Router channel 0-7.
+						 * Host channel 4 [18:16] -> SPDIF Mixer/Router channel 0-7.
+						 * Host channel 5 [22:20] -> SPDIF Mixer/Router channel 0-7.
+						 * Host channel 6 [26:24] -> SPDIF Mixer/Router channel 0-7.
+						 * Host channel 7 [30:28] -> SPDIF Mixer/Router channel 0-7.
+						 */
+
+#define PLAYBACK_ROUTING2       0x64            /* Playback Routing . Feeding Capture channels back into Playback. Effects AC3 output. Default 0x76767676 */
+						/* SRC is input from the capture inputs. */
+						/* SRC channel 0 [2:0] -> SPDIF Mixer/Router channel 0-7.
+						 * SRC channel 1 [6:4] -> SPDIF Mixer/Router channel 0-7.
+						 * SRC channel 2 [10:8] -> SPDIF Mixer/Router channel 0-7.
+						 * SRC channel 3 [14:12] -> SPDIF Mixer/Router channel 0-7.
+						 * SRC channel 4 [18:16] -> SPDIF Mixer/Router channel 0-7.
+						 * SRC channel 5 [22:20] -> SPDIF Mixer/Router channel 0-7.
+						 * SRC channel 6 [26:24] -> SPDIF Mixer/Router channel 0-7.
+						 * SRC channel 7 [30:28] -> SPDIF Mixer/Router channel 0-7.
+						 */
+
+#define PLAYBACK_MUTE           0x65            /* Unknown. While playing 0x0, while silent 0x00fc0000 */
+						/* SPDIF Mixer input control:
+						 * Invert SRC to SPDIF Mixer [7-0] (One bit per channel)
+						 * Invert Host to SPDIF Mixer [15:8] (One bit per channel)
+						 * SRC to SPDIF Mixer disable [23:16] (One bit per channel)
+						 * Host to SPDIF Mixer disable [31:24] (One bit per channel)
+						 */
+#define PLAYBACK_VOLUME1        0x66            /* Playback SPDIF volume per channel. Set to the same PLAYBACK_VOLUME(0x6a) */
+						/* PLAYBACK_VOLUME1 must be set to 30303030 for SPDIF AC3 Playback */
+						/* SPDIF mixer input volume. 0=12dB, 0x30=0dB, 0xFE=-51.5dB, 0xff=Mute */
+						/* One register for each of the 4 stereo streams. */
+						/* SRC Right volume [7:0]
+						 * SRC Left  volume [15:8]
+						 * Host Right volume [23:16]
+						 * Host Left  volume [31:24]
+						 */
+#define CAPTURE_ROUTING1        0x67            /* Capture Routing. Default 0x32765410 */
+						/* Similar to register 0x63, except that the destination is the I2S mixer instead of the SPDIF mixer. I.E. Outputs to the Analog outputs instead of SPDIF. */
+#define CAPTURE_ROUTING2        0x68            /* Unknown Routing. Default 0x76767676 */
+						/* Similar to register 0x64, except that the destination is the I2S mixer instead of the SPDIF mixer. I.E. Outputs to the Analog outputs instead of SPDIF. */
+#define CAPTURE_MUTE            0x69            /* Unknown. While capturing 0x0, while silent 0x00fc0000 */
+						/* Similar to register 0x65, except that the destination is the I2S mixer instead of the SPDIF mixer. I.E. Outputs to the Analog outputs instead of SPDIF. */
+#define PLAYBACK_VOLUME2        0x6a            /* Playback Analog volume per channel. Does not effect AC3 output */
+						/* Similar to register 0x66, except that the destination is the I2S mixer instead of the SPDIF mixer. I.E. Outputs to the Analog outputs instead of SPDIF. */
+#define UNKNOWN6b               0x6b            /* Unknown. Readonly. Default 00400000 00400000 00400000 00400000 */
+#define UART_A_DATA		0x6c            /* Uart, used in setting sample rates, bits per sample etc. */
+#define UART_A_CMD		0x6d            /* Uart, used in setting sample rates, bits per sample etc. */
+#define UART_B_DATA		0x6e            /* Uart, Unknown. */
+#define UART_B_CMD		0x6f            /* Uart, Unknown. */
+#define SAMPLE_RATE_TRACKER_STATUS 0x70         /* Readonly. Default 00108000 00108000 00500000 00500000 */
+						/* Estimated sample rate [19:0] Relative to 48kHz. 0x8000 =  1.0
+						 * Rate Locked [20]
+						 * SPDIF Locked [21] For SPDIF channel only.
+						 * Valid Audio [22] For SPDIF channel only.
+						 */
+#define CAPTURE_CONTROL         0x71            /* Some sort of routing. default = 40c81000 30303030 30300000 00700000 */
+						/* Channel_id 0: 0x40c81000 must be changed to 0x40c80000 for SPDIF AC3 input or output. */
+						/* Channel_id 1: 0xffffffff(mute) 0x30303030(max) controls CAPTURE feedback into PLAYBACK. */
+						/* Sample rate output control register Channel=0
+						 * Sample output rate [1:0] (0=48kHz, 1=44.1kHz, 2=96kHz, 3=192Khz)
+						 * Sample input rate [3:2] (0=48kHz, 1=Not available, 2=96kHz, 3=192Khz)
+						 * SRC input source select [4] 0=Audio from digital mixer, 1=Audio from analog source.
+						 * Record rate [9:8] (0=48kHz, 1=Not available, 2=96kHz, 3=192Khz)
+						 * Record mixer output enable [12:10] 
+						 * I2S input rate master mode [15:14] (0=48kHz, 1=44.1kHz, 2=96kHz, 3=192Khz)
+						 * I2S output rate [17:16] (0=48kHz, 1=44.1kHz, 2=96kHz, 3=192Khz)
+						 * I2S output source select [18] (0=Audio from host, 1=Audio from SRC)
+						 * Record mixer I2S enable [20:19] (enable/disable i2sin1 and i2sin0)
+						 * I2S output master clock select [21] (0=256*I2S output rate, 1=512*I2S output rate.)
+						 * I2S input master clock select [22] (0=256*I2S input rate, 1=512*I2S input rate.)
+						 * I2S input mode [23] (0=Slave, 1=Master)
+						 * SPDIF output rate [25:24] (0=48kHz, 1=44.1kHz, 2=96kHz, 3=192Khz)
+						 * SPDIF output source select [26] (0=host, 1=SRC)
+						 * Not used [27]
+						 * Record Source 0 input [29:28] (0=SPDIF in, 1=I2S in, 2=AC97 Mic, 3=AC97 PCM)
+						 * Record Source 1 input [31:30] (0=SPDIF in, 1=I2S in, 2=AC97 Mic, 3=AC97 PCM)
+						 */ 
+						/* Sample rate output control register Channel=1
+						 * I2S Input 0 volume Right [7:0]
+						 * I2S Input 0 volume Left [15:8]
+						 * I2S Input 1 volume Right [23:16]
+						 * I2S Input 1 volume Left [31:24]
+						 */
+						/* Sample rate output control register Channel=2
+						 * SPDIF Input volume Right [23:16]
+						 * SPDIF Input volume Left [31:24]
+						 */
+						/* Sample rate output control register Channel=3
+						 * No used
+						 */
+#define SPDIF_SELECT2           0x72            /* Some sort of routing. Channel_id 0 only. default = 0x0f0f003f. Analog 0x000b0000, Digital 0x0b000000 */
+#define ROUTING2_FRONT_MASK     0x00010000      /* Enable for Front speakers. */
+#define ROUTING2_CENTER_LFE_MASK 0x00020000     /* Enable for Center/LFE speakers. */
+#define ROUTING2_REAR_MASK      0x00080000      /* Enable for Rear speakers. */
+						/* Audio output control
+						 * AC97 output enable [5:0]
+						 * I2S output enable [19:16]
+						 * SPDIF output enable [27:24]
+						 */ 
+#define UNKNOWN73               0x73            /* Unknown. Readonly. Default 0x0 */
+#define CHIP_VERSION            0x74            /* P17 Chip version. Channel_id 0 only. Default 00000071 */
+#define EXTENDED_INT_MASK       0x75            /* Used by both playback and capture interrupt handler */
+						/* Sets which Interrupts are enabled. */
+						/* 0x00000001 = Half period. Playback.
+						 * 0x00000010 = Full period. Playback.
+						 * 0x00000100 = Half buffer. Playback.
+						 * 0x00001000 = Full buffer. Playback.
+						 * 0x00010000 = Half buffer. Capture.
+						 * 0x00100000 = Full buffer. Capture.
+						 * Capture can only do 2 periods.
+						 * 0x01000000 = End audio. Playback.
+						 * 0x40000000 = Half buffer Playback,Caputre xrun.
+						 * 0x80000000 = Full buffer Playback,Caputre xrun.
+						 */
+#define EXTENDED_INT            0x76            /* Used by both playback and capture interrupt handler */
+						/* Shows which interrupts are active at the moment. */
+						/* Same bit layout as EXTENDED_INT_MASK */
+#define COUNTER77               0x77		/* Counter range 0 to 0x3fffff, 192000 counts per second. */
+#define COUNTER78               0x78		/* Counter range 0 to 0x3fffff, 44100 counts per second. */
+#define EXTENDED_INT_TIMER      0x79            /* Channel_id 0 only. Used by both playback and capture interrupt handler */
+						/* Causes interrupts based on timer intervals. */
+#define SPI			0x7a		/* SPI: Serial Interface Register */
+#define I2C_A			0x7b		/* I2C Address. 32 bit */
+#define I2C_0			0x7c		/* I2C Data Port 0. 32 bit */
+#define I2C_1			0x7d		/* I2C Data Port 1. 32 bit */
+
+
+#define SET_CHANNEL 0  /* Testing channel outputs 0=Front, 1=Center/LFE, 2=Unknown, 3=Rear */
+#define PCM_FRONT_CHANNEL 0
+#define PCM_REAR_CHANNEL 1
+#define PCM_CENTER_LFE_CHANNEL 2
+#define PCM_UNKNOWN_CHANNEL 3
+#define CONTROL_FRONT_CHANNEL 0
+#define CONTROL_REAR_CHANNEL 3
+#define CONTROL_CENTER_LFE_CHANNEL 1
+#define CONTROL_UNKNOWN_CHANNEL 2
+
+typedef struct snd_ca0106_channel ca0106_channel_t;
+typedef struct snd_ca0106 ca0106_t;
+typedef struct snd_ca0106_pcm ca0106_pcm_t;
+
+struct snd_ca0106_channel {
+	ca0106_t *emu;
+	int number;
+	int use;
+	void (*interrupt)(ca0106_t *emu, ca0106_channel_t *channel);
+	ca0106_pcm_t *epcm;
+};
+
+struct snd_ca0106_pcm {
+	ca0106_t *emu;
+	snd_pcm_substream_t *substream;
+        int channel_id;
+	unsigned short running;
+};
+
+// definition of the chip-specific record
+struct snd_ca0106 {
+	snd_card_t *card;
+	struct pci_dev *pci;
+
+	unsigned long port;
+	struct resource *res_port;
+	int irq;
+
+	unsigned int revision;		/* chip revision */
+	unsigned int serial;            /* serial number */
+	unsigned short model;		/* subsystem id */
+
+	spinlock_t emu_lock;
+
+	ac97_t *ac97;
+	snd_pcm_t *pcm;
+
+	ca0106_channel_t playback_channels[4];
+	ca0106_channel_t capture_channels[4];
+	u32 spdif_bits[4];             /* s/pdif out setup */
+	int spdif_enable;
+	int capture_source;
+
+	struct snd_dma_buffer buffer;
+};
+
+int __devinit snd_ca0106_mixer(ca0106_t *emu);
+int __devinit snd_ca0106_proc_init(ca0106_t * emu);
+
+unsigned int snd_ca0106_ptr_read(ca0106_t * emu, 
+					  unsigned int reg, 
+					  unsigned int chn);
+
+void snd_ca0106_ptr_write(ca0106_t *emu, 
+				   unsigned int reg, 
+				   unsigned int chn, 
+				   unsigned int data);
+
diff -Nru a/sound/pci/ca0106/ca0106_main.c b/sound/pci/ca0106/ca0106_main.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/sound/pci/ca0106/ca0106_main.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,1274 @@
+/*
+ *  Copyright (c) 2004 James Courtier-Dutton <James@superbug.demon.co.uk>
+ *  Driver CA0106 chips. e.g. Sound Blaster Audigy LS and Live 24bit
+ *  Version: 0.0.21
+ *
+ *  FEATURES currently supported:
+ *    Front, Rear and Center/LFE.
+ *    Surround40 and Surround51.
+ *    Capture from MIC an LINE IN input.
+ *    SPDIF digital playback of PCM stereo and AC3/DTS works.
+ *    (One can use a standard mono mini-jack to one RCA plugs cable.
+ *     or one can use a standard stereo mini-jack to two RCA plugs cable.
+ *     Plug one of the RCA plugs into the Coax input of the external decoder/receiver.)
+ *    ( In theory one could output 3 different AC3 streams at once, to 3 different SPDIF outputs. )
+ *    Notes on how to capture sound:
+ *      The AC97 is used in the PLAYBACK direction.
+ *      The output from the AC97 chip, instead of reaching the speakers, is fed into the Philips 1361T ADC.
+ *      So, to record from the MIC, set the MIC Playback volume to max,
+ *      unmute the MIC and turn up the MASTER Playback volume.
+ *      So, to prevent feedback when capturing, minimise the "Capture feedback into Playback" volume.
+ *   
+ *    The only playback controls that currently do anything are: -
+ *    Analog Front
+ *    Analog Rear
+ *    Analog Center/LFE
+ *    SPDIF Front
+ *    SPDIF Rear
+ *    SPDIF Center/LFE
+ *   
+ *    For capture from Mic in or Line in.
+ *    Digital/Analog ( switch must be in Analog mode for CAPTURE. )
+ * 
+ *    CAPTURE feedback into PLAYBACK
+ * 
+ *  Changelog:
+ *    Support interrupts per period.
+ *    Removed noise from Center/LFE channel when in Analog mode.
+ *    Rename and remove mixer controls.
+ *  0.0.6
+ *    Use separate card based DMA buffer for periods table list.
+ *  0.0.7
+ *    Change remove and rename ctrls into lists.
+ *  0.0.8
+ *    Try to fix capture sources.
+ *  0.0.9
+ *    Fix AC3 output.
+ *    Enable S32_LE format support.
+ *  0.0.10
+ *    Enable playback 48000 and 96000 rates. (Rates other that these do not work, even with "plug:front".)
+ *  0.0.11
+ *    Add Model name recognition.
+ *  0.0.12
+ *    Correct interrupt timing. interrupt at end of period, instead of in the middle of a playback period.
+ *    Remove redundent "voice" handling.
+ *  0.0.13
+ *    Single trigger call for multi channels.
+ *  0.0.14
+ *    Set limits based on what the sound card hardware can do.
+ *    playback periods_min=2, periods_max=8
+ *    capture hw constraints require period_size = n * 64 bytes.
+ *    playback hw constraints require period_size = n * 64 bytes.
+ *  0.0.15
+ *    Minor updates.
+ *  0.0.16
+ *    Implement 192000 sample rate.
+ *  0.0.17
+ *    Add support for SB0410 and SB0413.
+ *  0.0.18
+ *    Modified Copyright message.
+ *  0.0.19
+ *    Finally fix support for SB Live 24 bit. SB0410 and SB0413.
+ *    The output codec needs resetting, otherwise all output is muted.
+ *  0.0.20
+ *    Merge "pci_disable_device(pci);" fixes.
+ *  0.0.21
+ *    Add 4 capture channels. (SPDIF only comes in on channel 0. )
+ *    Add SPDIF capture using optional digital I/O module for SB Live 24bit. (Analog capture does not yet work.)
+ *
+ *  BUGS:
+ *    Some stability problems when unloading the snd-ca0106 kernel module.
+ *    --
+ *
+ *  TODO:
+ *    4 Capture channels, only one implemented so far.
+ *    Other capture rates apart from 48khz not implemented.
+ *    MIDI
+ *    --
+ *  GENERAL INFO:
+ *    Model: SB0310
+ *    P17 Chip: CA0106-DAT
+ *    AC97 Codec: STAC 9721
+ *    ADC: Philips 1361T (Stereo 24bit)
+ *    DAC: WM8746EDS (6-channel, 24bit, 192Khz)
+ *
+ *  GENERAL INFO:
+ *    Model: SB0410
+ *    P17 Chip: CA0106-DAT
+ *    AC97 Codec: None
+ *    ADC: WM8775EDS (4 Channel)
+ *    DAC: CS4382 (114 dB, 24-Bit, 192 kHz, 8-Channel D/A Converter with DSD Support)
+ *    SPDIF Out control switches between Mic in and SPDIF out.
+ *    No sound out or mic input working yet.
+ * 
+ *  GENERAL INFO:
+ *    Model: SB0413
+ *    P17 Chip: CA0106-DAT
+ *    AC97 Codec: None.
+ *    ADC: Unknown
+ *    DAC: Unknown
+ *    Trying to handle it like the SB0410.
+ *
+ *  This code was initally based on code from ALSA's emu10k1x.c which is:
+ *  Copyright (c) by Francisco Moraes <fmoraes@nc.rr.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., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+ *
+ */
+#include <sound/driver.h>
+#include <linux/delay.h>
+#include <linux/init.h>
+#include <linux/interrupt.h>
+#include <linux/pci.h>
+#include <linux/slab.h>
+#include <linux/moduleparam.h>
+#include <sound/core.h>
+#include <sound/initval.h>
+#include <sound/pcm.h>
+#include <sound/ac97_codec.h>
+#include <sound/info.h>
+
+MODULE_AUTHOR("James Courtier-Dutton <James@superbug.demon.co.uk>");
+MODULE_DESCRIPTION("CA0106");
+MODULE_LICENSE("GPL");
+MODULE_SUPPORTED_DEVICE("{{Creative,SB CA0106 chip}}");
+
+// module parameters (see "Module Parameters")
+static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;
+static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;
+static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;
+
+module_param_array(index, int, NULL, 0444);
+MODULE_PARM_DESC(index, "Index value for the CA0106 soundcard.");
+module_param_array(id, charp, NULL, 0444);
+MODULE_PARM_DESC(id, "ID string for the CA0106 soundcard.");
+module_param_array(enable, bool, NULL, 0444);
+MODULE_PARM_DESC(enable, "Enable the CA0106 soundcard.");
+
+#include "ca0106.h"
+
+typedef struct {
+	u32 serial;
+	char * name;
+} ca0106_names_t;
+
+static ca0106_names_t ca0106_chip_names[] = {
+	 { 0x10021102, "AudigyLS [SB0310]"} , 
+	 { 0x10051102, "AudigyLS [SB0310b]"} , /* Unknown AudigyLS that also says SB0310 on it */
+	 { 0x10061102, "Live! 7.1 24bit [SB0410]"} , /* New Sound Blaster Live! 7.1 24bit. This does not have an AC97. 53SB041000001 */
+	 { 0x10071102, "Live! 7.1 24bit [SB0413]"} , /* New Dell Sound Blaster Live! 7.1 24bit. This does not have an AC97.  */
+	 { 0, "AudigyLS [Unknown]" }
+};
+
+/* hardware definition */
+static snd_pcm_hardware_t snd_ca0106_playback_hw = {
+	.info =			(SNDRV_PCM_INFO_MMAP | 
+				 SNDRV_PCM_INFO_INTERLEAVED |
+				 SNDRV_PCM_INFO_BLOCK_TRANSFER |
+				 SNDRV_PCM_INFO_MMAP_VALID),
+	.formats =		SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S32_LE,
+	.rates =		SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_96000 | SNDRV_PCM_RATE_192000,
+	.rate_min =		48000,
+	.rate_max =		192000,
+	.channels_min =		2,  //1,
+	.channels_max =		2,  //6,
+	.buffer_bytes_max =	(32*1024),
+	.period_bytes_min =	64,
+	.period_bytes_max =	(16*1024),
+	.periods_min =		2,
+	.periods_max =		8,
+	.fifo_size =		0,
+};
+
+static snd_pcm_hardware_t snd_ca0106_capture_hw = {
+	.info =			(SNDRV_PCM_INFO_MMAP | 
+				 SNDRV_PCM_INFO_INTERLEAVED |
+				 SNDRV_PCM_INFO_BLOCK_TRANSFER |
+				 SNDRV_PCM_INFO_MMAP_VALID),
+	.formats =		SNDRV_PCM_FMTBIT_S16_LE,
+	.rates =		SNDRV_PCM_RATE_48000,
+	.rate_min =		48000,
+	.rate_max =		48000,
+	.channels_min =		2,
+	.channels_max =		2,
+	.buffer_bytes_max =	(32*1024),
+	.period_bytes_min =	64,
+	.period_bytes_max =	(16*1024),
+	.periods_min =		2,
+	.periods_max =		2,
+	.fifo_size =		0,
+};
+
+unsigned int snd_ca0106_ptr_read(ca0106_t * emu, 
+					  unsigned int reg, 
+					  unsigned int chn)
+{
+	unsigned long flags;
+	unsigned int regptr, val;
+  
+	regptr = (reg << 16) | chn;
+
+	spin_lock_irqsave(&emu->emu_lock, flags);
+	outl(regptr, emu->port + PTR);
+	val = inl(emu->port + DATA);
+	spin_unlock_irqrestore(&emu->emu_lock, flags);
+	return val;
+}
+
+void snd_ca0106_ptr_write(ca0106_t *emu, 
+				   unsigned int reg, 
+				   unsigned int chn, 
+				   unsigned int data)
+{
+	unsigned int regptr;
+	unsigned long flags;
+
+	regptr = (reg << 16) | chn;
+
+	spin_lock_irqsave(&emu->emu_lock, flags);
+	outl(regptr, emu->port + PTR);
+	outl(data, emu->port + DATA);
+	spin_unlock_irqrestore(&emu->emu_lock, flags);
+}
+
+static void snd_ca0106_intr_enable(ca0106_t *emu, unsigned int intrenb)
+{
+	unsigned long flags;
+	unsigned int enable;
+  
+	spin_lock_irqsave(&emu->emu_lock, flags);
+	enable = inl(emu->port + INTE) | intrenb;
+	outl(enable, emu->port + INTE);
+	spin_unlock_irqrestore(&emu->emu_lock, flags);
+}
+
+static void snd_ca0106_pcm_free_substream(snd_pcm_runtime_t *runtime)
+{
+	ca0106_pcm_t *epcm = runtime->private_data;
+  
+	if (epcm) {
+		kfree(epcm);
+	}
+}
+
+/* open_playback callback */
+static int snd_ca0106_pcm_open_playback_channel(snd_pcm_substream_t *substream, int channel_id)
+{
+	ca0106_t *chip = snd_pcm_substream_chip(substream);
+        ca0106_channel_t *channel = &(chip->playback_channels[channel_id]);
+	ca0106_pcm_t *epcm;
+	snd_pcm_runtime_t *runtime = substream->runtime;
+	int err;
+
+	epcm = kcalloc(1, sizeof(*epcm), GFP_KERNEL);
+
+	if (epcm == NULL)
+		return -ENOMEM;
+	epcm->emu = chip;
+	epcm->substream = substream;
+        epcm->channel_id=channel_id;
+  
+	runtime->private_data = epcm;
+	runtime->private_free = snd_ca0106_pcm_free_substream;
+  
+	runtime->hw = snd_ca0106_playback_hw;
+
+        channel->emu = chip;
+        channel->number = channel_id;
+
+        channel->use=1;
+        //printk("open:channel_id=%d, chip=%p, channel=%p\n",channel_id, chip, channel);
+        //channel->interrupt = snd_ca0106_pcm_channel_interrupt;
+        channel->epcm=epcm;
+	if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0)
+                return err;
+	if ((err = snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, 64)) < 0)
+                return err;
+	return 0;
+}
+
+/* close callback */
+static int snd_ca0106_pcm_close_playback(snd_pcm_substream_t *substream)
+{
+	ca0106_t *chip = snd_pcm_substream_chip(substream);
+	snd_pcm_runtime_t *runtime = substream->runtime;
+        ca0106_pcm_t *epcm = runtime->private_data;
+        chip->playback_channels[epcm->channel_id].use=0;
+/* FIXME: maybe zero others */
+	return 0;
+}
+
+static int snd_ca0106_pcm_open_playback_front(snd_pcm_substream_t *substream)
+{
+	return snd_ca0106_pcm_open_playback_channel(substream, PCM_FRONT_CHANNEL);
+}
+
+static int snd_ca0106_pcm_open_playback_center_lfe(snd_pcm_substream_t *substream)
+{
+	return snd_ca0106_pcm_open_playback_channel(substream, PCM_CENTER_LFE_CHANNEL);
+}
+
+static int snd_ca0106_pcm_open_playback_unknown(snd_pcm_substream_t *substream)
+{
+	return snd_ca0106_pcm_open_playback_channel(substream, PCM_UNKNOWN_CHANNEL);
+}
+
+static int snd_ca0106_pcm_open_playback_rear(snd_pcm_substream_t *substream)
+{
+	return snd_ca0106_pcm_open_playback_channel(substream, PCM_REAR_CHANNEL);
+}
+
+/* open_capture callback */
+static int snd_ca0106_pcm_open_capture_channel(snd_pcm_substream_t *substream, int channel_id)
+{
+	ca0106_t *chip = snd_pcm_substream_chip(substream);
+        ca0106_channel_t *channel = &(chip->capture_channels[channel_id]);
+	ca0106_pcm_t *epcm;
+	snd_pcm_runtime_t *runtime = substream->runtime;
+	int err;
+
+	epcm = kcalloc(1, sizeof(*epcm), GFP_KERNEL);
+	if (epcm == NULL) {
+                snd_printk("open_capture_channel: failed epcm alloc\n");
+		return -ENOMEM;
+        }
+	epcm->emu = chip;
+	epcm->substream = substream;
+        epcm->channel_id=channel_id;
+  
+	runtime->private_data = epcm;
+	runtime->private_free = snd_ca0106_pcm_free_substream;
+  
+	runtime->hw = snd_ca0106_capture_hw;
+
+        channel->emu = chip;
+        channel->number = channel_id;
+
+        channel->use=1;
+        //printk("open:channel_id=%d, chip=%p, channel=%p\n",channel_id, chip, channel);
+        //channel->interrupt = snd_ca0106_pcm_channel_interrupt;
+        channel->epcm=epcm;
+	if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0)
+                return err;
+	//snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_SIZE, &hw_constraints_capture_period_sizes);
+	if ((err = snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, 64)) < 0)
+                return err;
+	return 0;
+}
+
+/* close callback */
+static int snd_ca0106_pcm_close_capture(snd_pcm_substream_t *substream)
+{
+	ca0106_t *chip = snd_pcm_substream_chip(substream);
+	snd_pcm_runtime_t *runtime = substream->runtime;
+        ca0106_pcm_t *epcm = runtime->private_data;
+        chip->capture_channels[epcm->channel_id].use=0;
+/* FIXME: maybe zero others */
+	return 0;
+}
+
+static int snd_ca0106_pcm_open_0_capture(snd_pcm_substream_t *substream)
+{
+	return snd_ca0106_pcm_open_capture_channel(substream, 0);
+}
+
+static int snd_ca0106_pcm_open_1_capture(snd_pcm_substream_t *substream)
+{
+	return snd_ca0106_pcm_open_capture_channel(substream, 1);
+}
+
+static int snd_ca0106_pcm_open_2_capture(snd_pcm_substream_t *substream)
+{
+	return snd_ca0106_pcm_open_capture_channel(substream, 2);
+}
+
+static int snd_ca0106_pcm_open_3_capture(snd_pcm_substream_t *substream)
+{
+	return snd_ca0106_pcm_open_capture_channel(substream, 3);
+}
+
+/* hw_params callback */
+static int snd_ca0106_pcm_hw_params_playback(snd_pcm_substream_t *substream,
+				      snd_pcm_hw_params_t * hw_params)
+{
+	return snd_pcm_lib_malloc_pages(substream,
+					params_buffer_bytes(hw_params));
+}
+
+/* hw_free callback */
+static int snd_ca0106_pcm_hw_free_playback(snd_pcm_substream_t *substream)
+{
+	return snd_pcm_lib_free_pages(substream);
+}
+
+/* hw_params callback */
+static int snd_ca0106_pcm_hw_params_capture(snd_pcm_substream_t *substream,
+				      snd_pcm_hw_params_t * hw_params)
+{
+	return snd_pcm_lib_malloc_pages(substream,
+					params_buffer_bytes(hw_params));
+}
+
+/* hw_free callback */
+static int snd_ca0106_pcm_hw_free_capture(snd_pcm_substream_t *substream)
+{
+	return snd_pcm_lib_free_pages(substream);
+}
+
+/* prepare playback callback */
+static int snd_ca0106_pcm_prepare_playback(snd_pcm_substream_t *substream)
+{
+	ca0106_t *emu = snd_pcm_substream_chip(substream);
+	snd_pcm_runtime_t *runtime = substream->runtime;
+	ca0106_pcm_t *epcm = runtime->private_data;
+	int channel = epcm->channel_id;
+	u32 *table_base = (u32 *)(emu->buffer.area+(8*16*channel));
+	u32 period_size_bytes = frames_to_bytes(runtime, runtime->period_size);
+	u32 hcfg_mask = HCFG_PLAYBACK_S32_LE;
+	u32 hcfg_set = 0x00000000;
+	u32 hcfg;
+	u32 reg40_mask = 0x30000 << (channel<<1);
+	u32 reg40_set = 0;
+	u32 reg40;
+	/* FIXME: Depending on mixer selection of SPDIF out or not, select the spdif rate or the DAC rate. */
+	u32 reg71_mask = 0x03030000 ; /* Global. Set SPDIF rate. We only support 44100 to spdif, not to DAC. */
+	u32 reg71_set = 0;
+	u32 reg71;
+	int i;
+	
+        //snd_printk("prepare:channel_number=%d, rate=%d, format=0x%x, channels=%d, buffer_size=%ld, period_size=%ld, periods=%u, frames_to_bytes=%d\n",channel, runtime->rate, runtime->format, runtime->channels, runtime->buffer_size, runtime->period_size, runtime->periods, frames_to_bytes(runtime, 1));
+        //snd_printk("dma_addr=%x, dma_area=%p, table_base=%p\n",runtime->dma_addr, runtime->dma_area, table_base);
+	//snd_printk("dma_addr=%x, dma_area=%p, dma_bytes(size)=%x\n",emu->buffer.addr, emu->buffer.area, emu->buffer.bytes);
+	/* Rate can be set per channel. */
+	/* reg40 control host to fifo */
+	/* reg71 controls DAC rate. */
+	switch (runtime->rate) {
+	case 44100:
+		reg40_set = 0x10000 << (channel<<1);
+		reg71_set = 0x01010000; 
+		break;
+        case 48000:
+		reg40_set = 0;
+		reg71_set = 0; 
+		break;
+	case 96000:
+		reg40_set = 0x20000 << (channel<<1);
+		reg71_set = 0x02020000; 
+		break;
+	case 192000:
+		reg40_set = 0x30000 << (channel<<1);
+		reg71_set = 0x03030000; 
+		break;
+	default:
+		reg40_set = 0;
+		reg71_set = 0; 
+		break;
+	}
+	/* Format is a global setting */
+	/* FIXME: Only let the first channel accessed set this. */
+	switch (runtime->format) {
+	case SNDRV_PCM_FORMAT_S16_LE:
+		hcfg_set = 0;
+		break;
+	case SNDRV_PCM_FORMAT_S32_LE:
+		hcfg_set = HCFG_PLAYBACK_S32_LE;
+		break;
+	default:
+		hcfg_set = 0;
+		break;
+	}
+	hcfg = inl(emu->port + HCFG) ;
+	hcfg = (hcfg & ~hcfg_mask) | hcfg_set;
+	outl(hcfg, emu->port + HCFG);
+	reg40 = snd_ca0106_ptr_read(emu, 0x40, 0);
+	reg40 = (reg40 & ~reg40_mask) | reg40_set;
+	snd_ca0106_ptr_write(emu, 0x40, 0, reg40);
+	reg71 = snd_ca0106_ptr_read(emu, 0x71, 0);
+	reg71 = (reg71 & ~reg71_mask) | reg71_set;
+	snd_ca0106_ptr_write(emu, 0x71, 0, reg71);
+
+	/* FIXME: Check emu->buffer.size before actually writing to it. */
+        for(i=0; i < runtime->periods; i++) {
+		table_base[i*2]=runtime->dma_addr+(i*period_size_bytes);
+		table_base[(i*2)+1]=period_size_bytes<<16;
+	}
+ 
+	snd_ca0106_ptr_write(emu, PLAYBACK_LIST_ADDR, channel, emu->buffer.addr+(8*16*channel));
+	snd_ca0106_ptr_write(emu, PLAYBACK_LIST_SIZE, channel, (runtime->periods - 1) << 19);
+	snd_ca0106_ptr_write(emu, PLAYBACK_LIST_PTR, channel, 0);
+	snd_ca0106_ptr_write(emu, PLAYBACK_DMA_ADDR, channel, runtime->dma_addr);
+	snd_ca0106_ptr_write(emu, PLAYBACK_PERIOD_SIZE, channel, frames_to_bytes(runtime, runtime->period_size)<<16); // buffer size in bytes
+	snd_ca0106_ptr_write(emu, PLAYBACK_POINTER, channel, 0);
+	snd_ca0106_ptr_write(emu, 0x07, channel, 0x0);
+	snd_ca0106_ptr_write(emu, 0x08, channel, 0);
+        snd_ca0106_ptr_write(emu, PLAYBACK_MUTE, 0x0, 0x0); /* Unmute output */
+#if 0
+	snd_ca0106_ptr_write(emu, SPCS0, 0,
+			       SPCS_CLKACCY_1000PPM | SPCS_SAMPLERATE_48 |
+			       SPCS_CHANNELNUM_LEFT | SPCS_SOURCENUM_UNSPEC |
+			       SPCS_GENERATIONSTATUS | 0x00001200 |
+			       0x00000000 | SPCS_EMPHASIS_NONE | SPCS_COPYRIGHT );
+	}
+#endif
+
+	return 0;
+}
+
+/* prepare capture callback */
+static int snd_ca0106_pcm_prepare_capture(snd_pcm_substream_t *substream)
+{
+	ca0106_t *emu = snd_pcm_substream_chip(substream);
+	snd_pcm_runtime_t *runtime = substream->runtime;
+	ca0106_pcm_t *epcm = runtime->private_data;
+	int channel = epcm->channel_id;
+        //printk("prepare:channel_number=%d, rate=%d, format=0x%x, channels=%d, buffer_size=%ld, period_size=%ld, frames_to_bytes=%d\n",channel, runtime->rate, runtime->format, runtime->channels, runtime->buffer_size, runtime->period_size,  frames_to_bytes(runtime, 1));
+	snd_ca0106_ptr_write(emu, 0x13, channel, 0);
+	snd_ca0106_ptr_write(emu, CAPTURE_DMA_ADDR, channel, runtime->dma_addr);
+	snd_ca0106_ptr_write(emu, CAPTURE_BUFFER_SIZE, channel, frames_to_bytes(runtime, runtime->buffer_size)<<16); // buffer size in bytes
+	snd_ca0106_ptr_write(emu, CAPTURE_POINTER, channel, 0);
+
+	return 0;
+}
+
+/* trigger_playback callback */
+static int snd_ca0106_pcm_trigger_playback(snd_pcm_substream_t *substream,
+				    int cmd)
+{
+	ca0106_t *emu = snd_pcm_substream_chip(substream);
+	snd_pcm_runtime_t *runtime;
+	ca0106_pcm_t *epcm;
+	int channel;
+	int result = 0;
+	struct list_head *pos;
+        snd_pcm_substream_t *s;
+	u32 basic = 0;
+	u32 extended = 0;
+	int running=0;
+
+	switch (cmd) {
+	case SNDRV_PCM_TRIGGER_START:
+		running=1;
+		break;
+	case SNDRV_PCM_TRIGGER_STOP:
+	default:
+		running=0;
+		break;
+	}
+        snd_pcm_group_for_each(pos, substream) {
+                s = snd_pcm_group_substream_entry(pos);
+		runtime = s->runtime;
+		epcm = runtime->private_data;
+		channel = epcm->channel_id;
+		//snd_printk("channel=%d\n",channel);
+		epcm->running = running;
+		basic |= (0x1<<channel);
+		extended |= (0x10<<channel);
+                snd_pcm_trigger_done(s, substream);
+        }
+	//snd_printk("basic=0x%x, extended=0x%x\n",basic, extended);
+
+	switch (cmd) {
+	case SNDRV_PCM_TRIGGER_START:
+		snd_ca0106_ptr_write(emu, EXTENDED_INT_MASK, 0, snd_ca0106_ptr_read(emu, EXTENDED_INT_MASK, 0) | (extended));
+		snd_ca0106_ptr_write(emu, BASIC_INTERRUPT, 0, snd_ca0106_ptr_read(emu, BASIC_INTERRUPT, 0)|(basic));
+		break;
+	case SNDRV_PCM_TRIGGER_STOP:
+		snd_ca0106_ptr_write(emu, BASIC_INTERRUPT, 0, snd_ca0106_ptr_read(emu, BASIC_INTERRUPT, 0) & ~(basic));
+		snd_ca0106_ptr_write(emu, EXTENDED_INT_MASK, 0, snd_ca0106_ptr_read(emu, EXTENDED_INT_MASK, 0) & ~(extended));
+		break;
+	default:
+		result = -EINVAL;
+		break;
+	}
+	return result;
+}
+
+/* trigger_capture callback */
+static int snd_ca0106_pcm_trigger_capture(snd_pcm_substream_t *substream,
+				    int cmd)
+{
+	ca0106_t *emu = snd_pcm_substream_chip(substream);
+	snd_pcm_runtime_t *runtime = substream->runtime;
+	ca0106_pcm_t *epcm = runtime->private_data;
+	int channel = epcm->channel_id;
+	int result = 0;
+
+	switch (cmd) {
+	case SNDRV_PCM_TRIGGER_START:
+		snd_ca0106_ptr_write(emu, EXTENDED_INT_MASK, 0, snd_ca0106_ptr_read(emu, EXTENDED_INT_MASK, 0) | (0x110000<<channel));
+		snd_ca0106_ptr_write(emu, BASIC_INTERRUPT, 0, snd_ca0106_ptr_read(emu, BASIC_INTERRUPT, 0)|(0x100<<channel));
+		epcm->running = 1;
+		break;
+	case SNDRV_PCM_TRIGGER_STOP:
+		snd_ca0106_ptr_write(emu, BASIC_INTERRUPT, 0, snd_ca0106_ptr_read(emu, BASIC_INTERRUPT, 0) & ~(0x100<<channel));
+		snd_ca0106_ptr_write(emu, EXTENDED_INT_MASK, 0, snd_ca0106_ptr_read(emu, EXTENDED_INT_MASK, 0) & ~(0x110000<<channel));
+		epcm->running = 0;
+		break;
+	default:
+		result = -EINVAL;
+		break;
+	}
+	return result;
+}
+
+/* pointer_playback callback */
+static snd_pcm_uframes_t
+snd_ca0106_pcm_pointer_playback(snd_pcm_substream_t *substream)
+{
+	ca0106_t *emu = snd_pcm_substream_chip(substream);
+	snd_pcm_runtime_t *runtime = substream->runtime;
+	ca0106_pcm_t *epcm = runtime->private_data;
+	snd_pcm_uframes_t ptr, ptr1, ptr2,ptr3,ptr4 = 0;
+	int channel = epcm->channel_id;
+
+	if (!epcm->running)
+		return 0;
+
+	ptr3 = snd_ca0106_ptr_read(emu, PLAYBACK_LIST_PTR, channel);
+	ptr1 = snd_ca0106_ptr_read(emu, PLAYBACK_POINTER, channel);
+	ptr4 = snd_ca0106_ptr_read(emu, PLAYBACK_LIST_PTR, channel);
+	if (ptr3 != ptr4) ptr1 = snd_ca0106_ptr_read(emu, PLAYBACK_POINTER, channel);
+	ptr2 = bytes_to_frames(runtime, ptr1);
+	ptr2+= (ptr4 >> 3) * runtime->period_size;
+	ptr=ptr2;
+        if (ptr >= runtime->buffer_size)
+		ptr -= runtime->buffer_size;
+	//printk("ptr1 = 0x%lx, ptr2=0x%lx, ptr=0x%lx, buffer_size = 0x%x, period_size = 0x%x, bits=%d, rate=%d\n", ptr1, ptr2, ptr, (int)runtime->buffer_size, (int)runtime->period_size, (int)runtime->frame_bits, (int)runtime->rate);
+
+	return ptr;
+}
+
+/* pointer_capture callback */
+static snd_pcm_uframes_t
+snd_ca0106_pcm_pointer_capture(snd_pcm_substream_t *substream)
+{
+	ca0106_t *emu = snd_pcm_substream_chip(substream);
+	snd_pcm_runtime_t *runtime = substream->runtime;
+	ca0106_pcm_t *epcm = runtime->private_data;
+	snd_pcm_uframes_t ptr, ptr1, ptr2 = 0;
+	int channel = channel=epcm->channel_id;
+
+	if (!epcm->running)
+		return 0;
+
+	ptr1 = snd_ca0106_ptr_read(emu, CAPTURE_POINTER, channel);
+	ptr2 = bytes_to_frames(runtime, ptr1);
+	ptr=ptr2;
+        if (ptr >= runtime->buffer_size)
+		ptr -= runtime->buffer_size;
+	//printk("ptr1 = 0x%lx, ptr2=0x%lx, ptr=0x%lx, buffer_size = 0x%x, period_size = 0x%x, bits=%d, rate=%d\n", ptr1, ptr2, ptr, (int)runtime->buffer_size, (int)runtime->period_size, (int)runtime->frame_bits, (int)runtime->rate);
+
+	return ptr;
+}
+
+/* operators */
+static snd_pcm_ops_t snd_ca0106_playback_front_ops = {
+	.open =        snd_ca0106_pcm_open_playback_front,
+	.close =       snd_ca0106_pcm_close_playback,
+	.ioctl =       snd_pcm_lib_ioctl,
+	.hw_params =   snd_ca0106_pcm_hw_params_playback,
+	.hw_free =     snd_ca0106_pcm_hw_free_playback,
+	.prepare =     snd_ca0106_pcm_prepare_playback,
+	.trigger =     snd_ca0106_pcm_trigger_playback,
+	.pointer =     snd_ca0106_pcm_pointer_playback,
+};
+
+static snd_pcm_ops_t snd_ca0106_capture_0_ops = {
+	.open =        snd_ca0106_pcm_open_0_capture,
+	.close =       snd_ca0106_pcm_close_capture,
+	.ioctl =       snd_pcm_lib_ioctl,
+	.hw_params =   snd_ca0106_pcm_hw_params_capture,
+	.hw_free =     snd_ca0106_pcm_hw_free_capture,
+	.prepare =     snd_ca0106_pcm_prepare_capture,
+	.trigger =     snd_ca0106_pcm_trigger_capture,
+	.pointer =     snd_ca0106_pcm_pointer_capture,
+};
+
+static snd_pcm_ops_t snd_ca0106_capture_1_ops = {
+	.open =        snd_ca0106_pcm_open_1_capture,
+	.close =       snd_ca0106_pcm_close_capture,
+	.ioctl =       snd_pcm_lib_ioctl,
+	.hw_params =   snd_ca0106_pcm_hw_params_capture,
+	.hw_free =     snd_ca0106_pcm_hw_free_capture,
+	.prepare =     snd_ca0106_pcm_prepare_capture,
+	.trigger =     snd_ca0106_pcm_trigger_capture,
+	.pointer =     snd_ca0106_pcm_pointer_capture,
+};
+
+static snd_pcm_ops_t snd_ca0106_capture_2_ops = {
+	.open =        snd_ca0106_pcm_open_2_capture,
+	.close =       snd_ca0106_pcm_close_capture,
+	.ioctl =       snd_pcm_lib_ioctl,
+	.hw_params =   snd_ca0106_pcm_hw_params_capture,
+	.hw_free =     snd_ca0106_pcm_hw_free_capture,
+	.prepare =     snd_ca0106_pcm_prepare_capture,
+	.trigger =     snd_ca0106_pcm_trigger_capture,
+	.pointer =     snd_ca0106_pcm_pointer_capture,
+};
+
+static snd_pcm_ops_t snd_ca0106_capture_3_ops = {
+	.open =        snd_ca0106_pcm_open_3_capture,
+	.close =       snd_ca0106_pcm_close_capture,
+	.ioctl =       snd_pcm_lib_ioctl,
+	.hw_params =   snd_ca0106_pcm_hw_params_capture,
+	.hw_free =     snd_ca0106_pcm_hw_free_capture,
+	.prepare =     snd_ca0106_pcm_prepare_capture,
+	.trigger =     snd_ca0106_pcm_trigger_capture,
+	.pointer =     snd_ca0106_pcm_pointer_capture,
+};
+
+static snd_pcm_ops_t snd_ca0106_playback_center_lfe_ops = {
+        .open =         snd_ca0106_pcm_open_playback_center_lfe,
+        .close =        snd_ca0106_pcm_close_playback,
+        .ioctl =        snd_pcm_lib_ioctl,
+        .hw_params =    snd_ca0106_pcm_hw_params_playback,
+        .hw_free =      snd_ca0106_pcm_hw_free_playback,
+        .prepare =      snd_ca0106_pcm_prepare_playback,     
+        .trigger =      snd_ca0106_pcm_trigger_playback,  
+        .pointer =      snd_ca0106_pcm_pointer_playback, 
+};
+
+static snd_pcm_ops_t snd_ca0106_playback_unknown_ops = {
+        .open =         snd_ca0106_pcm_open_playback_unknown,
+        .close =        snd_ca0106_pcm_close_playback,
+        .ioctl =        snd_pcm_lib_ioctl,
+        .hw_params =    snd_ca0106_pcm_hw_params_playback,
+        .hw_free =      snd_ca0106_pcm_hw_free_playback,
+        .prepare =      snd_ca0106_pcm_prepare_playback,     
+        .trigger =      snd_ca0106_pcm_trigger_playback,  
+        .pointer =      snd_ca0106_pcm_pointer_playback, 
+};
+
+static snd_pcm_ops_t snd_ca0106_playback_rear_ops = {
+        .open =         snd_ca0106_pcm_open_playback_rear,
+        .close =        snd_ca0106_pcm_close_playback,
+        .ioctl =        snd_pcm_lib_ioctl,
+        .hw_params =    snd_ca0106_pcm_hw_params_playback,
+		.hw_free =      snd_ca0106_pcm_hw_free_playback,
+        .prepare =      snd_ca0106_pcm_prepare_playback,     
+        .trigger =      snd_ca0106_pcm_trigger_playback,  
+        .pointer =      snd_ca0106_pcm_pointer_playback, 
+};
+
+
+static unsigned short snd_ca0106_ac97_read(ac97_t *ac97,
+					     unsigned short reg)
+{
+	ca0106_t *emu = ac97->private_data;
+	unsigned long flags;
+	unsigned short val;
+
+	spin_lock_irqsave(&emu->emu_lock, flags);
+	outb(reg, emu->port + AC97ADDRESS);
+	val = inw(emu->port + AC97DATA);
+	spin_unlock_irqrestore(&emu->emu_lock, flags);
+	return val;
+}
+
+static void snd_ca0106_ac97_write(ac97_t *ac97,
+				    unsigned short reg, unsigned short val)
+{
+	ca0106_t *emu = ac97->private_data;
+	unsigned long flags;
+  
+	spin_lock_irqsave(&emu->emu_lock, flags);
+	outb(reg, emu->port + AC97ADDRESS);
+	outw(val, emu->port + AC97DATA);
+	spin_unlock_irqrestore(&emu->emu_lock, flags);
+}
+
+static int snd_ca0106_ac97(ca0106_t *chip)
+{
+	ac97_bus_t *pbus;
+	ac97_template_t ac97;
+	int err;
+	static ac97_bus_ops_t ops = {
+		.write = snd_ca0106_ac97_write,
+		.read = snd_ca0106_ac97_read,
+	};
+  
+	if ((err = snd_ac97_bus(chip->card, 0, &ops, NULL, &pbus)) < 0)
+		return err;
+	pbus->no_vra = 1; /* we don't need VRA */
+
+	memset(&ac97, 0, sizeof(ac97));
+	ac97.private_data = chip;
+	return snd_ac97_mixer(pbus, &ac97, &chip->ac97);
+}
+
+static int snd_ca0106_free(ca0106_t *chip)
+{
+	if (chip->res_port != NULL) {    /* avoid access to already used hardware */
+		// disable interrupts
+		snd_ca0106_ptr_write(chip, BASIC_INTERRUPT, 0, 0);
+		outl(0, chip->port + INTE);
+		snd_ca0106_ptr_write(chip, EXTENDED_INT_MASK, 0, 0);
+		udelay(1000);
+		// disable audio
+		//outl(HCFG_LOCKSOUNDCACHE, chip->port + HCFG);
+		outl(0, chip->port + HCFG);
+		/* FIXME: We need to stop and DMA transfers here.
+		 *        But as I am not sure how yet, we cannot from the dma pages.
+		 * So we can fix: snd-malloc: Memory leak?  pages not freed = 8
+		 */
+	}
+	// release the data
+#if 1
+	if (chip->buffer.area)
+		snd_dma_free_pages(&chip->buffer);
+#endif
+
+	// release the i/o port
+	if (chip->res_port) {
+		release_resource(chip->res_port);
+		kfree_nocheck(chip->res_port);
+	}
+	// release the irq
+	if (chip->irq >= 0)
+		free_irq(chip->irq, (void *)chip);
+	pci_disable_device(chip->pci);
+	kfree(chip);
+	return 0;
+}
+
+static int snd_ca0106_dev_free(snd_device_t *device)
+{
+	ca0106_t *chip = device->device_data;
+	return snd_ca0106_free(chip);
+}
+
+static irqreturn_t snd_ca0106_interrupt(int irq, void *dev_id,
+					  struct pt_regs *regs)
+{
+	unsigned int status;
+
+	ca0106_t *chip = dev_id;
+	int i;
+	int mask;
+        unsigned int stat76;
+	ca0106_channel_t *pchannel;
+
+	spin_lock(&chip->emu_lock);
+
+	status = inl(chip->port + IPR);
+
+	// call updater, unlock before it
+	spin_unlock(&chip->emu_lock);
+  
+	if (! status)
+		return IRQ_NONE;
+
+        stat76 = snd_ca0106_ptr_read(chip, EXTENDED_INT, 0);
+	//snd_printk("interrupt status = 0x%08x, stat76=0x%08x\n", status, stat76);
+	//snd_printk("ptr=0x%08x\n",snd_ca0106_ptr_read(chip, PLAYBACK_POINTER, 0));
+        mask = 0x11; /* 0x1 for one half, 0x10 for the other half period. */
+	for(i = 0; i < 4; i++) {
+		pchannel = &(chip->playback_channels[i]);
+		if(stat76 & mask) {
+/* FIXME: Select the correct substream for period elapsed */
+			if(pchannel->use) {
+                          snd_pcm_period_elapsed(pchannel->epcm->substream);
+	                //printk(KERN_INFO "interrupt [%d] used\n", i);
+                        }
+		}
+	        //printk(KERN_INFO "channel=%p\n",pchannel);
+	        //printk(KERN_INFO "interrupt stat76[%d] = %08x, use=%d, channel=%d\n", i, stat76, pchannel->use, pchannel->number);
+		mask <<= 1;
+	}
+        mask = 0x110000; /* 0x1 for one half, 0x10 for the other half period. */
+	for(i = 0; i < 4; i++) {
+		pchannel = &(chip->capture_channels[i]);
+		if(stat76 & mask) {
+/* FIXME: Select the correct substream for period elapsed */
+			if(pchannel->use) {
+                          snd_pcm_period_elapsed(pchannel->epcm->substream);
+	                //printk(KERN_INFO "interrupt [%d] used\n", i);
+                        }
+		}
+	        //printk(KERN_INFO "channel=%p\n",pchannel);
+	        //printk(KERN_INFO "interrupt stat76[%d] = %08x, use=%d, channel=%d\n", i, stat76, pchannel->use, pchannel->number);
+		mask <<= 1;
+	}
+
+        snd_ca0106_ptr_write(chip, EXTENDED_INT, 0, stat76);
+	spin_lock(&chip->emu_lock);
+	// acknowledge the interrupt if necessary
+	outl(status, chip->port+IPR);
+
+	spin_unlock(&chip->emu_lock);
+
+	return IRQ_HANDLED;
+}
+
+static void snd_ca0106_pcm_free(snd_pcm_t *pcm)
+{
+	ca0106_t *emu = pcm->private_data;
+	emu->pcm = NULL;
+	snd_pcm_lib_preallocate_free_for_all(pcm);
+}
+
+static int __devinit snd_ca0106_pcm(ca0106_t *emu, int device, snd_pcm_t **rpcm)
+{
+	snd_pcm_t *pcm;
+	snd_pcm_substream_t *substream;
+	int err;
+  
+	if (rpcm)
+		*rpcm = NULL;
+	if ((err = snd_pcm_new(emu->card, "ca0106", device, 1, 1, &pcm)) < 0)
+		return err;
+  
+	pcm->private_data = emu;
+	pcm->private_free = snd_ca0106_pcm_free;
+
+	switch (device) {
+	case 0:
+	  snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_ca0106_playback_front_ops);
+	  snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_ca0106_capture_0_ops);
+          break;
+	case 1:
+	  snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_ca0106_playback_rear_ops);
+	  snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_ca0106_capture_1_ops);
+          break;
+	case 2:
+	  snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_ca0106_playback_center_lfe_ops);
+	  snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_ca0106_capture_2_ops);
+          break;
+	case 3:
+	  snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_ca0106_playback_unknown_ops);
+	  snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_ca0106_capture_3_ops);
+          break;
+        }
+
+	pcm->info_flags = 0;
+	pcm->dev_subclass = SNDRV_PCM_SUBCLASS_GENERIC_MIX;
+	strcpy(pcm->name, "CA0106");
+	emu->pcm = pcm;
+
+	for(substream = pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; 
+	    substream; 
+	    substream = substream->next) {
+		if ((err = snd_pcm_lib_preallocate_pages(substream, 
+							 SNDRV_DMA_TYPE_DEV, 
+							 snd_dma_pci_data(emu->pci), 
+							 64*1024, 64*1024)) < 0) /* FIXME: 32*1024 for sound buffer, between 32and64 for Periods table. */
+			return err;
+	}
+
+	for (substream = pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream; 
+	      substream; 
+	      substream = substream->next) {
+ 		if ((err = snd_pcm_lib_preallocate_pages(substream, 
+	                                           SNDRV_DMA_TYPE_DEV, 
+	                                           snd_dma_pci_data(emu->pci), 
+	                                           64*1024, 64*1024)) < 0)
+			return err;
+	}
+  
+	if (rpcm)
+		*rpcm = pcm;
+  
+	return 0;
+}
+
+static int __devinit snd_ca0106_create(snd_card_t *card,
+					 struct pci_dev *pci,
+					 ca0106_t **rchip)
+{
+	ca0106_t *chip;
+	int err;
+	int ch;
+	static snd_device_ops_t ops = {
+		.dev_free = snd_ca0106_dev_free,
+	};
+  
+	*rchip = NULL;
+  
+	if ((err = pci_enable_device(pci)) < 0)
+		return err;
+	if (pci_set_dma_mask(pci, 0xffffffffUL) < 0 ||
+	    pci_set_consistent_dma_mask(pci, 0xffffffffUL) < 0) {
+		printk(KERN_ERR "error to set 32bit mask DMA\n");
+		pci_disable_device(pci);
+		return -ENXIO;
+	}
+  
+	chip = kcalloc(1, sizeof(*chip), GFP_KERNEL);
+	if (chip == NULL) {
+		pci_disable_device(pci);
+		return -ENOMEM;
+	}
+  
+	chip->card = card;
+	chip->pci = pci;
+	chip->irq = -1;
+
+	spin_lock_init(&chip->emu_lock);
+  
+	chip->port = pci_resource_start(pci, 0);
+	if ((chip->res_port = request_region(chip->port, 0x20,
+					     "snd_ca0106")) == NULL) { 
+		snd_ca0106_free(chip);
+		printk(KERN_ERR "cannot allocate the port\n");
+		return -EBUSY;
+	}
+
+	if (request_irq(pci->irq, snd_ca0106_interrupt,
+			SA_INTERRUPT|SA_SHIRQ, "snd_ca0106",
+			(void *)chip)) {
+		snd_ca0106_free(chip);
+		printk(KERN_ERR "cannot grab irq\n");
+		return -EBUSY;
+	}
+	chip->irq = pci->irq;
+  
+ 	/* This stores the periods table. */ 
+	if(snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci), 1024, &chip->buffer) < 0) {
+		snd_ca0106_free(chip);
+		return -ENOMEM;
+	}
+
+	pci_set_master(pci);
+	/* read revision & serial */
+	pci_read_config_byte(pci, PCI_REVISION_ID, (char *)&chip->revision);
+	pci_read_config_dword(pci, PCI_SUBSYSTEM_VENDOR_ID, &chip->serial);
+	pci_read_config_word(pci, PCI_SUBSYSTEM_ID, &chip->model);
+#if 1
+	printk(KERN_INFO "Model %04x Rev %08x Serial %08x\n", chip->model,
+	       chip->revision, chip->serial);
+#endif
+
+	outl(0, chip->port + INTE);
+
+	/*
+	 *  Init to 0x02109204 :
+	 *  Clock accuracy    = 0     (1000ppm)
+	 *  Sample Rate       = 2     (48kHz)
+	 *  Audio Channel     = 1     (Left of 2)
+	 *  Source Number     = 0     (Unspecified)
+	 *  Generation Status = 1     (Original for Cat Code 12)
+	 *  Cat Code          = 12    (Digital Signal Mixer)
+	 *  Mode              = 0     (Mode 0)
+	 *  Emphasis          = 0     (None)
+	 *  CP                = 1     (Copyright unasserted)
+	 *  AN                = 0     (Audio data)
+	 *  P                 = 0     (Consumer)
+	 */
+	snd_ca0106_ptr_write(chip, SPCS0, 0,
+				chip->spdif_bits[0] =
+				SPCS_CLKACCY_1000PPM | SPCS_SAMPLERATE_48 |
+				SPCS_CHANNELNUM_LEFT | SPCS_SOURCENUM_UNSPEC |
+				SPCS_GENERATIONSTATUS | 0x00001200 |
+				0x00000000 | SPCS_EMPHASIS_NONE | SPCS_COPYRIGHT);
+	/* Only SPCS1 has been tested */
+	snd_ca0106_ptr_write(chip, SPCS1, 0,
+				chip->spdif_bits[1] =
+				SPCS_CLKACCY_1000PPM | SPCS_SAMPLERATE_48 |
+				SPCS_CHANNELNUM_LEFT | SPCS_SOURCENUM_UNSPEC |
+				SPCS_GENERATIONSTATUS | 0x00001200 |
+				0x00000000 | SPCS_EMPHASIS_NONE | SPCS_COPYRIGHT);
+	snd_ca0106_ptr_write(chip, SPCS2, 0,
+				chip->spdif_bits[2] =
+				SPCS_CLKACCY_1000PPM | SPCS_SAMPLERATE_48 |
+				SPCS_CHANNELNUM_LEFT | SPCS_SOURCENUM_UNSPEC |
+				SPCS_GENERATIONSTATUS | 0x00001200 |
+				0x00000000 | SPCS_EMPHASIS_NONE | SPCS_COPYRIGHT);
+	snd_ca0106_ptr_write(chip, SPCS3, 0,
+				chip->spdif_bits[3] =
+				SPCS_CLKACCY_1000PPM | SPCS_SAMPLERATE_48 |
+				SPCS_CHANNELNUM_LEFT | SPCS_SOURCENUM_UNSPEC |
+				SPCS_GENERATIONSTATUS | 0x00001200 |
+				0x00000000 | SPCS_EMPHASIS_NONE | SPCS_COPYRIGHT);
+
+        snd_ca0106_ptr_write(chip, PLAYBACK_MUTE, 0, 0x00fc0000);
+        snd_ca0106_ptr_write(chip, CAPTURE_MUTE, 0, 0x00fc0000);
+
+        /* Write 0x8000 to AC97_REC_GAIN to mute it. */
+        outb(AC97_REC_GAIN, chip->port + AC97ADDRESS);
+        outw(0x8000, chip->port + AC97DATA);
+#if 0
+	snd_ca0106_ptr_write(chip, SPCS0, 0, 0x2108006);
+	snd_ca0106_ptr_write(chip, 0x42, 0, 0x2108006);
+	snd_ca0106_ptr_write(chip, 0x43, 0, 0x2108006);
+	snd_ca0106_ptr_write(chip, 0x44, 0, 0x2108006);
+#endif
+
+	//snd_ca0106_ptr_write(chip, SPDIF_SELECT2, 0, 0xf0f003f); /* OSS drivers set this. */
+	/* Analog or Digital output */
+	snd_ca0106_ptr_write(chip, SPDIF_SELECT1, 0, 0xf);
+	snd_ca0106_ptr_write(chip, SPDIF_SELECT2, 0, 0x000b0000); /* 0x0b000000 for digital, 0x000b0000 for analog, from win2000 drivers */
+	chip->spdif_enable = 0; /* Set digital SPDIF output off */
+	chip->capture_source = 3; /* Set CAPTURE_SOURCE */
+	//snd_ca0106_ptr_write(chip, 0x45, 0, 0); /* Analogue out */
+	//snd_ca0106_ptr_write(chip, 0x45, 0, 0xf00); /* Digital out */
+
+	snd_ca0106_ptr_write(chip, CAPTURE_CONTROL, 0, 0x40c81000); /* goes to 0x40c80000 when doing SPDIF IN/OUT */
+	snd_ca0106_ptr_write(chip, CAPTURE_CONTROL, 1, 0xffffffff); /* (Mute) CAPTURE feedback into PLAYBACK volume. Only lower 16 bits matter. */
+	snd_ca0106_ptr_write(chip, CAPTURE_CONTROL, 2, 0x30300000); /* SPDIF IN Volume */
+	snd_ca0106_ptr_write(chip, CAPTURE_CONTROL, 3, 0x00700000); /* SPDIF IN Volume, 0x70 = (vol & 0x3f) | 0x40 */
+	snd_ca0106_ptr_write(chip, PLAYBACK_ROUTING1, 0, 0x32765410);
+	snd_ca0106_ptr_write(chip, PLAYBACK_ROUTING2, 0, 0x76767676);
+	snd_ca0106_ptr_write(chip, CAPTURE_ROUTING1, 0, 0x32765410);
+	snd_ca0106_ptr_write(chip, CAPTURE_ROUTING2, 0, 0x76767676);
+	for(ch = 0; ch < 4; ch++) {
+		snd_ca0106_ptr_write(chip, CAPTURE_VOLUME1, ch, 0x30303030); /* Only high 16 bits matter */
+		snd_ca0106_ptr_write(chip, CAPTURE_VOLUME2, ch, 0x30303030);
+		//snd_ca0106_ptr_write(chip, PLAYBACK_VOLUME1, ch, 0x40404040); /* Mute */
+		//snd_ca0106_ptr_write(chip, PLAYBACK_VOLUME2, ch, 0x40404040); /* Mute */
+		snd_ca0106_ptr_write(chip, PLAYBACK_VOLUME1, ch, 0xffffffff); /* Mute */
+		snd_ca0106_ptr_write(chip, PLAYBACK_VOLUME2, ch, 0xffffffff); /* Mute */
+	}
+        snd_ca0106_ptr_write(chip, CAPTURE_SOURCE, 0x0, 0x333300e4); /* Select MIC, Line in, TAD in, AUX in */
+	chip->capture_source = 3; /* Set CAPTURE_SOURCE */
+
+        if ((chip->serial == 0x10061102) || (chip->serial == 0x10071102) ) { /* The SB0410 and SB0413 use GPIO differently. */
+		/* FIXME: Still need to find out what the other GPIO bits do. E.g. For digital spdif out. */
+		outl(0x0, chip->port+GPIO);
+		//outl(0x00f0e000, chip->port+GPIO); /* Analog */
+		outl(0x005f4300, chip->port+GPIO); /* Analog */
+	} else {
+		outl(0x0, chip->port+GPIO);
+		outl(0x005f03a3, chip->port+GPIO); /* Analog */
+		//outl(0x005f02a2, chip->port+GPIO);   /* SPDIF */
+	}
+	snd_ca0106_intr_enable(chip, 0x105); /* Win2000 uses 0x1e0 */
+
+	//outl(HCFG_LOCKSOUNDCACHE|HCFG_AUDIOENABLE, chip->port+HCFG);
+	//outl(0x00001409, chip->port+HCFG); /* 0x1000 causes AC3 to fails. Maybe it effects 24 bit output. */
+	//outl(0x00000009, chip->port+HCFG);
+	outl(HCFG_AC97 | HCFG_AUDIOENABLE, chip->port+HCFG); /* AC97 2.0, Enable outputs. */
+
+	if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL,
+				  chip, &ops)) < 0) {
+		snd_ca0106_free(chip);
+		return err;
+	}
+	*rchip = chip;
+	return 0;
+}
+
+static int __devinit snd_ca0106_probe(struct pci_dev *pci,
+					const struct pci_device_id *pci_id)
+{
+	static int dev;
+	snd_card_t *card;
+	ca0106_t *chip;
+	ca0106_names_t *c;
+	int err;
+
+	if (dev >= SNDRV_CARDS)
+		return -ENODEV;
+	if (!enable[dev]) {
+		dev++;
+		return -ENOENT;
+	}
+
+	card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
+	if (card == NULL)
+		return -ENOMEM;
+
+	if ((err = snd_ca0106_create(card, pci, &chip)) < 0) {
+		snd_card_free(card);
+		return err;
+	}
+
+	if ((err = snd_ca0106_pcm(chip, 0, NULL)) < 0) {
+		snd_card_free(card);
+		return err;
+	}
+	if ((err = snd_ca0106_pcm(chip, 1, NULL)) < 0) {
+		snd_card_free(card);
+		return err;
+	}
+	if ((err = snd_ca0106_pcm(chip, 2, NULL)) < 0) {
+		snd_card_free(card);
+		return err;
+	}
+	if ((err = snd_ca0106_pcm(chip, 3, NULL)) < 0) {
+		snd_card_free(card);
+		return err;
+	}
+        if ((chip->serial != 0x10061102) && (chip->serial != 0x10071102) ) { /* The SB0410 and SB0413 do not have an ac97 chip. */
+		if ((err = snd_ca0106_ac97(chip)) < 0) {
+			snd_card_free(card);
+			return err;
+		}
+	}
+	if ((err = snd_ca0106_mixer(chip)) < 0) {
+		snd_card_free(card);
+		return err;
+	}
+
+	snd_ca0106_proc_init(chip);
+
+	strcpy(card->driver, "CA0106");
+	strcpy(card->shortname, "CA0106");
+
+	for (c=ca0106_chip_names; c->serial; c++) {
+		if (c->serial == chip->serial) break;
+	}
+	sprintf(card->longname, "%s at 0x%lx irq %i",
+		c->name, chip->port, chip->irq);
+
+	if ((err = snd_card_register(card)) < 0) {
+		snd_card_free(card);
+		return err;
+	}
+
+	pci_set_drvdata(pci, card);
+	dev++;
+	return 0;
+}
+
+static void __devexit snd_ca0106_remove(struct pci_dev *pci)
+{
+	snd_card_free(pci_get_drvdata(pci));
+	pci_set_drvdata(pci, NULL);
+}
+
+// PCI IDs
+static struct pci_device_id snd_ca0106_ids[] = {
+	{ 0x1102, 0x0007, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },	/* Audigy LS or Live 24bit */
+	{ 0, }
+};
+MODULE_DEVICE_TABLE(pci, snd_ca0106_ids);
+
+// pci_driver definition
+static struct pci_driver driver = {
+	.name = "CA0106",
+	.id_table = snd_ca0106_ids,
+	.probe = snd_ca0106_probe,
+	.remove = __devexit_p(snd_ca0106_remove),
+};
+
+// initialization of the module
+static int __init alsa_card_ca0106_init(void)
+{
+	int err;
+
+	if ((err = pci_module_init(&driver)) > 0)
+		return err;
+
+	return 0;
+}
+
+// clean up the module
+static void __exit alsa_card_ca0106_exit(void)
+{
+	pci_unregister_driver(&driver);
+}
+
+module_init(alsa_card_ca0106_init)
+module_exit(alsa_card_ca0106_exit)
diff -Nru a/sound/pci/ca0106/ca0106_mixer.c b/sound/pci/ca0106/ca0106_mixer.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/sound/pci/ca0106/ca0106_mixer.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,635 @@
+#define __NO_VERSION__
+/*
+ *  Copyright (c) 2004 James Courtier-Dutton <James@superbug.demon.co.uk>
+ *  Driver CA0106 chips. e.g. Sound Blaster Audigy LS and Live 24bit
+ *  Version: 0.0.16
+ *
+ *  FEATURES currently supported:
+ *    See ca0106_main.c for features.
+ * 
+ *  Changelog:
+ *    Support interrupts per period.
+ *    Removed noise from Center/LFE channel when in Analog mode.
+ *    Rename and remove mixer controls.
+ *  0.0.6
+ *    Use separate card based DMA buffer for periods table list.
+ *  0.0.7
+ *    Change remove and rename ctrls into lists.
+ *  0.0.8
+ *    Try to fix capture sources.
+ *  0.0.9
+ *    Fix AC3 output.
+ *    Enable S32_LE format support.
+ *  0.0.10
+ *    Enable playback 48000 and 96000 rates. (Rates other that these do not work, even with "plug:front".)
+ *  0.0.11
+ *    Add Model name recognition.
+ *  0.0.12
+ *    Correct interrupt timing. interrupt at end of period, instead of in the middle of a playback period.
+ *    Remove redundent "voice" handling.
+ *  0.0.13
+ *    Single trigger call for multi channels.
+ *  0.0.14
+ *    Set limits based on what the sound card hardware can do.
+ *    playback periods_min=2, periods_max=8
+ *    capture hw constraints require period_size = n * 64 bytes.
+ *    playback hw constraints require period_size = n * 64 bytes.
+ *  0.0.15
+ *    Separated ca0106.c into separate functional .c files.
+ *  0.0.16
+ *    Modified Copyright message.
+ *
+ *  This code was initally based on code from ALSA's emu10k1x.c which is:
+ *  Copyright (c) by Francisco Moraes <fmoraes@nc.rr.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., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+ *
+ */
+#include <sound/driver.h>
+#include <linux/delay.h>
+#include <linux/init.h>
+#include <linux/interrupt.h>
+#include <linux/pci.h>
+#include <linux/slab.h>
+#include <linux/moduleparam.h>
+#include <sound/core.h>
+#include <sound/initval.h>
+#include <sound/pcm.h>
+#include <sound/ac97_codec.h>
+#include <sound/info.h>
+
+#include "ca0106.h"
+
+static int snd_ca0106_shared_spdif_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+{
+	uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
+	uinfo->count = 1;
+	uinfo->value.integer.min = 0;
+	uinfo->value.integer.max = 1;
+	return 0;
+}
+
+static int snd_ca0106_shared_spdif_get(snd_kcontrol_t * kcontrol,
+					snd_ctl_elem_value_t * ucontrol)
+{
+	ca0106_t *emu = snd_kcontrol_chip(kcontrol);
+
+	ucontrol->value.enumerated.item[0] = emu->spdif_enable;
+	return 0;
+}
+
+static int snd_ca0106_shared_spdif_put(snd_kcontrol_t * kcontrol,
+					snd_ctl_elem_value_t * ucontrol)
+{
+	ca0106_t *emu = snd_kcontrol_chip(kcontrol);
+	unsigned int val;
+	int change = 0;
+	u32 mask;
+
+	val = ucontrol->value.enumerated.item[0] ;
+	change = (emu->spdif_enable != val);
+	if (change) {
+		emu->spdif_enable = val;
+		if (val == 1) {
+			/* Digital */
+			snd_ca0106_ptr_write(emu, SPDIF_SELECT1, 0, 0xf);
+			snd_ca0106_ptr_write(emu, SPDIF_SELECT2, 0, 0x0b000000);
+			snd_ca0106_ptr_write(emu, CAPTURE_CONTROL, 0,
+				snd_ca0106_ptr_read(emu, CAPTURE_CONTROL, 0) & ~0x1000);
+			mask = inl(emu->port + GPIO) & ~0x101;
+			outl(mask, emu->port + GPIO);
+
+		} else {
+			/* Analog */
+			snd_ca0106_ptr_write(emu, SPDIF_SELECT1, 0, 0xf);
+			snd_ca0106_ptr_write(emu, SPDIF_SELECT2, 0, 0x000b0000);
+			snd_ca0106_ptr_write(emu, CAPTURE_CONTROL, 0,
+				snd_ca0106_ptr_read(emu, CAPTURE_CONTROL, 0) | 0x1000);
+			mask = inl(emu->port + GPIO) | 0x101;
+			outl(mask, emu->port + GPIO);
+		}
+	}
+        return change;
+}
+
+static snd_kcontrol_new_t snd_ca0106_shared_spdif __devinitdata =
+{
+	.iface =	SNDRV_CTL_ELEM_IFACE_MIXER,
+	.name =		"SPDIF Out",
+	.info =		snd_ca0106_shared_spdif_info,
+	.get =		snd_ca0106_shared_spdif_get,
+	.put =		snd_ca0106_shared_spdif_put
+};
+
+static int snd_ca0106_capture_source_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+{
+	static char *texts[6] = { "SPDIF out", "i2s mixer out", "SPDIF in", "i2s in", "AC97 in", "SRC out" };
+
+	uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
+	uinfo->count = 1;
+	uinfo->value.enumerated.items = 6;
+	if (uinfo->value.enumerated.item > 5)
+                uinfo->value.enumerated.item = 5;
+	strcpy(uinfo->value.enumerated.name, texts[uinfo->value.enumerated.item]);
+	return 0;
+}
+
+static int snd_ca0106_capture_source_get(snd_kcontrol_t * kcontrol,
+					snd_ctl_elem_value_t * ucontrol)
+{
+	ca0106_t *emu = snd_kcontrol_chip(kcontrol);
+
+	ucontrol->value.enumerated.item[0] = emu->capture_source;
+	return 0;
+}
+
+static int snd_ca0106_capture_source_put(snd_kcontrol_t * kcontrol,
+					snd_ctl_elem_value_t * ucontrol)
+{
+	ca0106_t *emu = snd_kcontrol_chip(kcontrol);
+	unsigned int val;
+	int change = 0;
+	u32 mask;
+	u32 source;
+
+	val = ucontrol->value.enumerated.item[0] ;
+	change = (emu->capture_source != val);
+	if (change) {
+		emu->capture_source = val;
+		source = (val << 28) | (val << 24) | (val << 20) | (val << 16);
+		mask = snd_ca0106_ptr_read(emu, CAPTURE_SOURCE, 0) & 0xffff;
+		snd_ca0106_ptr_write(emu, CAPTURE_SOURCE, 0, source | mask);
+	}
+        return change;
+}
+
+static snd_kcontrol_new_t snd_ca0106_capture_source __devinitdata =
+{
+	.iface =	SNDRV_CTL_ELEM_IFACE_MIXER,
+	.name =		"Capture Source",
+	.info =		snd_ca0106_capture_source_info,
+	.get =		snd_ca0106_capture_source_get,
+	.put =		snd_ca0106_capture_source_put
+};
+
+static int snd_ca0106_spdif_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+{
+	uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
+	uinfo->count = 1;
+	return 0;
+}
+
+static int snd_ca0106_spdif_get(snd_kcontrol_t * kcontrol,
+                                 snd_ctl_elem_value_t * ucontrol)
+{
+	ca0106_t *emu = snd_kcontrol_chip(kcontrol);
+	unsigned int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);
+
+	ucontrol->value.iec958.status[0] = (emu->spdif_bits[idx] >> 0) & 0xff;
+	ucontrol->value.iec958.status[1] = (emu->spdif_bits[idx] >> 8) & 0xff;
+	ucontrol->value.iec958.status[2] = (emu->spdif_bits[idx] >> 16) & 0xff;
+	ucontrol->value.iec958.status[3] = (emu->spdif_bits[idx] >> 24) & 0xff;
+        return 0;
+}
+
+static int snd_ca0106_spdif_get_mask(snd_kcontrol_t * kcontrol,
+				      snd_ctl_elem_value_t * ucontrol)
+{
+	ucontrol->value.iec958.status[0] = 0xff;
+	ucontrol->value.iec958.status[1] = 0xff;
+	ucontrol->value.iec958.status[2] = 0xff;
+	ucontrol->value.iec958.status[3] = 0xff;
+        return 0;
+}
+
+static int snd_ca0106_spdif_put(snd_kcontrol_t * kcontrol,
+                                 snd_ctl_elem_value_t * ucontrol)
+{
+	ca0106_t *emu = snd_kcontrol_chip(kcontrol);
+	unsigned int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);
+	int change;
+	unsigned int val;
+
+	val = (ucontrol->value.iec958.status[0] << 0) |
+	      (ucontrol->value.iec958.status[1] << 8) |
+	      (ucontrol->value.iec958.status[2] << 16) |
+	      (ucontrol->value.iec958.status[3] << 24);
+	change = val != emu->spdif_bits[idx];
+	if (change) {
+		snd_ca0106_ptr_write(emu, SPCS0 + idx, 0, val);
+		emu->spdif_bits[idx] = val;
+	}
+        return change;
+}
+
+static snd_kcontrol_new_t snd_ca0106_spdif_mask_control =
+{
+	.access =	SNDRV_CTL_ELEM_ACCESS_READ,
+        .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
+        .name =         SNDRV_CTL_NAME_IEC958("",PLAYBACK,MASK),
+	.count =	4,
+        .info =         snd_ca0106_spdif_info,
+        .get =          snd_ca0106_spdif_get_mask
+};
+
+static snd_kcontrol_new_t snd_ca0106_spdif_control =
+{
+        .iface =	SNDRV_CTL_ELEM_IFACE_MIXER,
+        .name =         SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT),
+	.count =	4,
+        .info =         snd_ca0106_spdif_info,
+        .get =          snd_ca0106_spdif_get,
+        .put =          snd_ca0106_spdif_put
+};
+
+static int snd_ca0106_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+{
+        uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
+        uinfo->count = 2;
+        uinfo->value.integer.min = 0;
+        uinfo->value.integer.max = 255;
+        return 0;
+}
+
+static int snd_ca0106_volume_get(snd_kcontrol_t * kcontrol,
+                                       snd_ctl_elem_value_t * ucontrol, int reg, int channel_id)
+{
+        ca0106_t *emu = snd_kcontrol_chip(kcontrol);
+        unsigned int value;
+
+        value = snd_ca0106_ptr_read(emu, reg, channel_id);
+        ucontrol->value.integer.value[0] = 0xff - ((value >> 24) & 0xff); /* Left */
+        ucontrol->value.integer.value[1] = 0xff - ((value >> 16) & 0xff); /* Right */
+        return 0;
+}
+
+static int snd_ca0106_volume_get_spdif_front(snd_kcontrol_t * kcontrol,
+                                       snd_ctl_elem_value_t * ucontrol)
+{
+	int channel_id = CONTROL_FRONT_CHANNEL;
+	int reg = PLAYBACK_VOLUME1;
+        return snd_ca0106_volume_get(kcontrol, ucontrol, reg, channel_id);
+}
+
+static int snd_ca0106_volume_get_spdif_center_lfe(snd_kcontrol_t * kcontrol,
+                                       snd_ctl_elem_value_t * ucontrol)
+{
+	int channel_id = CONTROL_CENTER_LFE_CHANNEL;
+	int reg = PLAYBACK_VOLUME1;
+        return snd_ca0106_volume_get(kcontrol, ucontrol, reg, channel_id);
+}
+static int snd_ca0106_volume_get_spdif_unknown(snd_kcontrol_t * kcontrol,
+                                       snd_ctl_elem_value_t * ucontrol)
+{
+	int channel_id = CONTROL_UNKNOWN_CHANNEL;
+	int reg = PLAYBACK_VOLUME1;
+        return snd_ca0106_volume_get(kcontrol, ucontrol, reg, channel_id);
+}
+static int snd_ca0106_volume_get_spdif_rear(snd_kcontrol_t * kcontrol,
+                                       snd_ctl_elem_value_t * ucontrol)
+{
+	int channel_id = CONTROL_REAR_CHANNEL;
+	int reg = PLAYBACK_VOLUME1;
+        return snd_ca0106_volume_get(kcontrol, ucontrol, reg, channel_id);
+}
+static int snd_ca0106_volume_get_analog_front(snd_kcontrol_t * kcontrol,
+                                       snd_ctl_elem_value_t * ucontrol)
+{
+	int channel_id = CONTROL_FRONT_CHANNEL;
+	int reg = PLAYBACK_VOLUME2;
+        return snd_ca0106_volume_get(kcontrol, ucontrol, reg, channel_id);
+}
+
+static int snd_ca0106_volume_get_analog_center_lfe(snd_kcontrol_t * kcontrol,
+                                       snd_ctl_elem_value_t * ucontrol)
+{
+	int channel_id = CONTROL_CENTER_LFE_CHANNEL;
+	int reg = PLAYBACK_VOLUME2;
+        return snd_ca0106_volume_get(kcontrol, ucontrol, reg, channel_id);
+}
+static int snd_ca0106_volume_get_analog_unknown(snd_kcontrol_t * kcontrol,
+                                       snd_ctl_elem_value_t * ucontrol)
+{
+	int channel_id = CONTROL_UNKNOWN_CHANNEL;
+	int reg = PLAYBACK_VOLUME2;
+        return snd_ca0106_volume_get(kcontrol, ucontrol, reg, channel_id);
+}
+static int snd_ca0106_volume_get_analog_rear(snd_kcontrol_t * kcontrol,
+                                       snd_ctl_elem_value_t * ucontrol)
+{
+	int channel_id = CONTROL_REAR_CHANNEL;
+	int reg = PLAYBACK_VOLUME2;
+        return snd_ca0106_volume_get(kcontrol, ucontrol, reg, channel_id);
+}
+
+static int snd_ca0106_volume_get_feedback(snd_kcontrol_t * kcontrol,
+                                       snd_ctl_elem_value_t * ucontrol)
+{
+	int channel_id = 1;
+	int reg = CAPTURE_CONTROL;
+        return snd_ca0106_volume_get(kcontrol, ucontrol, reg, channel_id);
+}
+                                                                                                                           
+static int snd_ca0106_volume_put(snd_kcontrol_t * kcontrol,
+                                       snd_ctl_elem_value_t * ucontrol, int reg, int channel_id)
+{
+        ca0106_t *emu = snd_kcontrol_chip(kcontrol);
+        unsigned int value;
+        //value = snd_ca0106_ptr_read(emu, reg, channel_id);
+        //value = value & 0xffff;
+        value = ((0xff - ucontrol->value.integer.value[0]) << 24) | ((0xff - ucontrol->value.integer.value[1]) << 16);
+        value = value | ((0xff - ucontrol->value.integer.value[0]) << 8) | ((0xff - ucontrol->value.integer.value[1]) );
+        snd_ca0106_ptr_write(emu, reg, channel_id, value);
+        return 1;
+}
+static int snd_ca0106_volume_put_spdif_front(snd_kcontrol_t * kcontrol,
+                                       snd_ctl_elem_value_t * ucontrol)
+{
+	int channel_id = CONTROL_FRONT_CHANNEL;
+	int reg = PLAYBACK_VOLUME1;
+        return snd_ca0106_volume_put(kcontrol, ucontrol, reg, channel_id);
+}
+static int snd_ca0106_volume_put_spdif_center_lfe(snd_kcontrol_t * kcontrol,
+                                       snd_ctl_elem_value_t * ucontrol)
+{
+	int channel_id = CONTROL_CENTER_LFE_CHANNEL;
+	int reg = PLAYBACK_VOLUME1;
+        return snd_ca0106_volume_put(kcontrol, ucontrol, reg, channel_id);
+}
+static int snd_ca0106_volume_put_spdif_unknown(snd_kcontrol_t * kcontrol,
+                                       snd_ctl_elem_value_t * ucontrol)
+{
+	int channel_id = CONTROL_UNKNOWN_CHANNEL;
+	int reg = PLAYBACK_VOLUME1;
+        return snd_ca0106_volume_put(kcontrol, ucontrol, reg, channel_id);
+}
+static int snd_ca0106_volume_put_spdif_rear(snd_kcontrol_t * kcontrol,
+                                       snd_ctl_elem_value_t * ucontrol)
+{
+	int channel_id = CONTROL_REAR_CHANNEL;
+	int reg = PLAYBACK_VOLUME1;
+        return snd_ca0106_volume_put(kcontrol, ucontrol, reg, channel_id);
+}
+static int snd_ca0106_volume_put_analog_front(snd_kcontrol_t * kcontrol,
+                                       snd_ctl_elem_value_t * ucontrol)
+{
+	int channel_id = CONTROL_FRONT_CHANNEL;
+	int reg = PLAYBACK_VOLUME2;
+        return snd_ca0106_volume_put(kcontrol, ucontrol, reg, channel_id);
+}
+static int snd_ca0106_volume_put_analog_center_lfe(snd_kcontrol_t * kcontrol,
+                                       snd_ctl_elem_value_t * ucontrol)
+{
+	int channel_id = CONTROL_CENTER_LFE_CHANNEL;
+	int reg = PLAYBACK_VOLUME2;
+        return snd_ca0106_volume_put(kcontrol, ucontrol, reg, channel_id);
+}
+static int snd_ca0106_volume_put_analog_unknown(snd_kcontrol_t * kcontrol,
+                                       snd_ctl_elem_value_t * ucontrol)
+{
+	int channel_id = CONTROL_UNKNOWN_CHANNEL;
+	int reg = PLAYBACK_VOLUME2;
+        return snd_ca0106_volume_put(kcontrol, ucontrol, reg, channel_id);
+}
+static int snd_ca0106_volume_put_analog_rear(snd_kcontrol_t * kcontrol,
+                                       snd_ctl_elem_value_t * ucontrol)
+{
+	int channel_id = CONTROL_REAR_CHANNEL;
+	int reg = PLAYBACK_VOLUME2;
+        return snd_ca0106_volume_put(kcontrol, ucontrol, reg, channel_id);
+}
+
+static int snd_ca0106_volume_put_feedback(snd_kcontrol_t * kcontrol,
+                                       snd_ctl_elem_value_t * ucontrol)
+{
+	int channel_id = 1;
+	int reg = CAPTURE_CONTROL;
+        return snd_ca0106_volume_put(kcontrol, ucontrol, reg, channel_id);
+}
+
+static snd_kcontrol_new_t snd_ca0106_volume_control_analog_front =
+{
+        .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
+        .name =         "Analog Front Volume",
+        .info =         snd_ca0106_volume_info,
+        .get =          snd_ca0106_volume_get_analog_front,
+        .put =          snd_ca0106_volume_put_analog_front
+};
+static snd_kcontrol_new_t snd_ca0106_volume_control_analog_center_lfe =
+{
+        .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
+        .name =         "Analog Center/LFE Volume",
+        .info =         snd_ca0106_volume_info,
+        .get =          snd_ca0106_volume_get_analog_center_lfe,
+        .put =          snd_ca0106_volume_put_analog_center_lfe
+};
+static snd_kcontrol_new_t snd_ca0106_volume_control_analog_unknown =
+{
+        .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
+        .name =         "Analog Unknown Volume",
+        .info =         snd_ca0106_volume_info,
+        .get =          snd_ca0106_volume_get_analog_unknown,
+        .put =          snd_ca0106_volume_put_analog_unknown
+};
+static snd_kcontrol_new_t snd_ca0106_volume_control_analog_rear =
+{
+        .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
+        .name =         "Analog Rear Volume",
+        .info =         snd_ca0106_volume_info,
+        .get =          snd_ca0106_volume_get_analog_rear,
+        .put =          snd_ca0106_volume_put_analog_rear
+};
+static snd_kcontrol_new_t snd_ca0106_volume_control_spdif_front =
+{
+        .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
+        .name =         "SPDIF Front Volume",
+        .info =         snd_ca0106_volume_info,
+        .get =          snd_ca0106_volume_get_spdif_front,
+        .put =          snd_ca0106_volume_put_spdif_front
+};
+static snd_kcontrol_new_t snd_ca0106_volume_control_spdif_center_lfe =
+{
+        .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
+        .name =         "SPDIF Center/LFE Volume",
+        .info =         snd_ca0106_volume_info,
+        .get =          snd_ca0106_volume_get_spdif_center_lfe,
+        .put =          snd_ca0106_volume_put_spdif_center_lfe
+};
+static snd_kcontrol_new_t snd_ca0106_volume_control_spdif_unknown =
+{
+        .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
+        .name =         "SPDIF Unknown Volume",
+        .info =         snd_ca0106_volume_info,
+        .get =          snd_ca0106_volume_get_spdif_unknown,
+        .put =          snd_ca0106_volume_put_spdif_unknown
+};
+static snd_kcontrol_new_t snd_ca0106_volume_control_spdif_rear =
+{
+        .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
+        .name =         "SPDIF Rear Volume",
+        .info =         snd_ca0106_volume_info,
+        .get =          snd_ca0106_volume_get_spdif_rear,
+        .put =          snd_ca0106_volume_put_spdif_rear
+};
+
+static snd_kcontrol_new_t snd_ca0106_volume_control_feedback =
+{
+        .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
+        .name =         "CAPTURE feedback into PLAYBACK",
+        .info =         snd_ca0106_volume_info,
+        .get =          snd_ca0106_volume_get_feedback,
+        .put =          snd_ca0106_volume_put_feedback
+};
+
+
+static int remove_ctl(snd_card_t *card, const char *name)
+{
+	snd_ctl_elem_id_t id;
+	memset(&id, 0, sizeof(id));
+	strcpy(id.name, name);
+	id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
+	return snd_ctl_remove_id(card, &id);
+}
+
+static snd_kcontrol_t *ctl_find(snd_card_t *card, const char *name)
+{
+	snd_ctl_elem_id_t sid;
+	memset(&sid, 0, sizeof(sid));
+	/* FIXME: strcpy is bad. */
+	strcpy(sid.name, name);
+	sid.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
+	return snd_ctl_find_id(card, &sid);
+}
+
+static int rename_ctl(snd_card_t *card, const char *src, const char *dst)
+{
+	snd_kcontrol_t *kctl = ctl_find(card, src);
+	if (kctl) {
+		strcpy(kctl->id.name, dst);
+		return 0;
+	}
+	return -ENOENT;
+}
+
+int __devinit snd_ca0106_mixer(ca0106_t *emu)
+{
+        int err;
+        snd_kcontrol_t *kctl;
+        snd_card_t *card = emu->card;
+	char **c;
+	static char *ca0106_remove_ctls[] = {
+		"Master Mono Playback Switch",
+		"Master Mono Playback Volume",
+		"3D Control - Switch",
+		"3D Control Sigmatel - Depth",
+		"PCM Playback Switch",
+		"PCM Playback Volume",
+		"CD Playback Switch",
+		"CD Playback Volume",
+		"Phone Playback Switch",
+		"Phone Playback Volume",
+		"Video Playback Switch",
+		"Video Playback Volume",
+		"PC Speaker Playback Switch",
+		"PC Speaker Playback Volume",
+		"Mono Output Select",
+		"Capture Source",
+		"Capture Switch",
+		"Capture Volume",
+		"External Amplifier",
+		"Sigmatel 4-Speaker Stereo Playback Switch",
+		"Sigmatel Surround Phase Inversion Playback ",
+		NULL
+	};
+	static char *ca0106_rename_ctls[] = {
+		"Master Playback Switch", "Capture Switch",
+		"Master Playback Volume", "Capture Volume",
+		"Line Playback Switch", "AC97 Line Capture Switch",
+		"Line Playback Volume", "AC97 Line Capture Volume",
+		"Aux Playback Switch", "AC97 Aux Capture Switch",
+		"Aux Playback Volume", "AC97 Aux Capture Volume",
+		"Mic Playback Switch", "AC97 Mic Capture Switch",
+		"Mic Playback Volume", "AC97 Mic Capture Volume",
+		"Mic Select", "AC97 Mic Select",
+		"Mic Boost (+20dB)", "AC97 Mic Boost (+20dB)",
+		NULL
+	};
+#if 1
+	for (c=ca0106_remove_ctls; *c; c++)
+		remove_ctl(card, *c);
+	for (c=ca0106_rename_ctls; *c; c += 2)
+		rename_ctl(card, c[0], c[1]);
+#endif
+
+        if ((kctl = snd_ctl_new1(&snd_ca0106_volume_control_analog_front, emu)) == NULL)
+                return -ENOMEM;
+        if ((err = snd_ctl_add(card, kctl)))
+                return err;
+        if ((kctl = snd_ctl_new1(&snd_ca0106_volume_control_analog_rear, emu)) == NULL)
+                return -ENOMEM;
+        if ((err = snd_ctl_add(card, kctl)))
+                return err;
+        if ((kctl = snd_ctl_new1(&snd_ca0106_volume_control_analog_center_lfe, emu)) == NULL)
+                return -ENOMEM;
+        if ((err = snd_ctl_add(card, kctl)))
+                return err;
+        if ((kctl = snd_ctl_new1(&snd_ca0106_volume_control_analog_unknown, emu)) == NULL)
+                return -ENOMEM;
+        if ((err = snd_ctl_add(card, kctl)))
+                return err;
+        if ((kctl = snd_ctl_new1(&snd_ca0106_volume_control_spdif_front, emu)) == NULL)
+                return -ENOMEM;
+        if ((err = snd_ctl_add(card, kctl)))
+                return err;
+        if ((kctl = snd_ctl_new1(&snd_ca0106_volume_control_spdif_rear, emu)) == NULL)
+                return -ENOMEM;
+        if ((err = snd_ctl_add(card, kctl)))
+                return err;
+        if ((kctl = snd_ctl_new1(&snd_ca0106_volume_control_spdif_center_lfe, emu)) == NULL)
+                return -ENOMEM;
+        if ((err = snd_ctl_add(card, kctl)))
+                return err;
+        if ((kctl = snd_ctl_new1(&snd_ca0106_volume_control_spdif_unknown, emu)) == NULL)
+                return -ENOMEM;
+        if ((err = snd_ctl_add(card, kctl)))
+                return err;
+        if ((kctl = snd_ctl_new1(&snd_ca0106_volume_control_feedback, emu)) == NULL)
+                return -ENOMEM;
+        if ((err = snd_ctl_add(card, kctl)))
+                return err;
+	if ((kctl = snd_ctl_new1(&snd_ca0106_spdif_mask_control, emu)) == NULL)
+		return -ENOMEM;
+	if ((err = snd_ctl_add(card, kctl)))
+		return err;
+	if ((kctl = snd_ctl_new1(&snd_ca0106_shared_spdif, emu)) == NULL)
+		return -ENOMEM;
+	if ((err = snd_ctl_add(card, kctl)))
+		return err;
+	if ((kctl = snd_ctl_new1(&snd_ca0106_capture_source, emu)) == NULL)
+		return -ENOMEM;
+	if ((err = snd_ctl_add(card, kctl)))
+		return err;
+	if ((kctl = ctl_find(card, SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT))) != NULL) {
+		/* already defined by ac97, remove it */
+		/* FIXME: or do we need both controls? */
+		remove_ctl(card, SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT));
+	}
+	if ((kctl = snd_ctl_new1(&snd_ca0106_spdif_control, emu)) == NULL)
+		return -ENOMEM;
+	if ((err = snd_ctl_add(card, kctl)))
+		return err;
+        return 0;
+}
+
diff -Nru a/sound/pci/ca0106/ca0106_proc.c b/sound/pci/ca0106/ca0106_proc.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/sound/pci/ca0106/ca0106_proc.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,437 @@
+#define __NO_VERSION__
+/*
+ *  Copyright (c) 2004 James Courtier-Dutton <James@superbug.demon.co.uk>
+ *  Driver CA0106 chips. e.g. Sound Blaster Audigy LS and Live 24bit
+ *  Version: 0.0.17
+ *
+ *  FEATURES currently supported:
+ *    See ca0106_main.c for features.
+ * 
+ *  Changelog:
+ *    Support interrupts per period.
+ *    Removed noise from Center/LFE channel when in Analog mode.
+ *    Rename and remove mixer controls.
+ *  0.0.6
+ *    Use separate card based DMA buffer for periods table list.
+ *  0.0.7
+ *    Change remove and rename ctrls into lists.
+ *  0.0.8
+ *    Try to fix capture sources.
+ *  0.0.9
+ *    Fix AC3 output.
+ *    Enable S32_LE format support.
+ *  0.0.10
+ *    Enable playback 48000 and 96000 rates. (Rates other that these do not work, even with "plug:front".)
+ *  0.0.11
+ *    Add Model name recognition.
+ *  0.0.12
+ *    Correct interrupt timing. interrupt at end of period, instead of in the middle of a playback period.
+ *    Remove redundent "voice" handling.
+ *  0.0.13
+ *    Single trigger call for multi channels.
+ *  0.0.14
+ *    Set limits based on what the sound card hardware can do.
+ *    playback periods_min=2, periods_max=8
+ *    capture hw constraints require period_size = n * 64 bytes.
+ *    playback hw constraints require period_size = n * 64 bytes.
+ *  0.0.15
+ *    Separate ca0106.c into separate functional .c files.
+ *  0.0.16
+ *    Modified Copyright message.
+ *  0.0.17
+ *    Add iec958 file in proc file system to show status of SPDIF in.
+ *    
+ *  This code was initally based on code from ALSA's emu10k1x.c which is:
+ *  Copyright (c) by Francisco Moraes <fmoraes@nc.rr.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., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+ *
+ */
+#include <sound/driver.h>
+#include <linux/delay.h>
+#include <linux/init.h>
+#include <linux/interrupt.h>
+#include <linux/pci.h>
+#include <linux/slab.h>
+#include <linux/moduleparam.h>
+#include <sound/core.h>
+#include <sound/initval.h>
+#include <sound/pcm.h>
+#include <sound/ac97_codec.h>
+#include <sound/info.h>
+#include <sound/asoundef.h>
+
+#include "ca0106.h"
+
+
+struct snd_ca0106_category_str {
+	int val;
+	const char *name;
+};
+
+static struct snd_ca0106_category_str snd_ca0106_con_category[] = {
+	{ IEC958_AES1_CON_DAT, "DAT" },
+	{ IEC958_AES1_CON_VCR, "VCR" },
+	{ IEC958_AES1_CON_MICROPHONE, "microphone" },
+	{ IEC958_AES1_CON_SYNTHESIZER, "synthesizer" },
+	{ IEC958_AES1_CON_RATE_CONVERTER, "rate converter" },
+	{ IEC958_AES1_CON_MIXER, "mixer" },
+	{ IEC958_AES1_CON_SAMPLER, "sampler" },
+	{ IEC958_AES1_CON_PCM_CODER, "PCM coder" },
+	{ IEC958_AES1_CON_IEC908_CD, "CD" },
+	{ IEC958_AES1_CON_NON_IEC908_CD, "non-IEC908 CD" },
+	{ IEC958_AES1_CON_GENERAL, "general" },
+};
+
+
+void snd_ca0106_proc_dump_iec958( snd_info_buffer_t *buffer, u32 value)
+{
+	int i;
+	u32 status[4];
+	status[0] = value & 0xff;
+	status[1] = (value >> 8) & 0xff;
+	status[2] = (value >> 16)  & 0xff;
+	status[3] = (value >> 24)  & 0xff;
+	
+	if (! (status[0] & IEC958_AES0_PROFESSIONAL)) {
+		/* consumer */
+		snd_iprintf(buffer, "Mode: consumer\n");
+		snd_iprintf(buffer, "Data: ");
+		if (!(status[0] & IEC958_AES0_NONAUDIO)) {
+			snd_iprintf(buffer, "audio\n");
+		} else {
+			snd_iprintf(buffer, "non-audio\n");
+		}
+		snd_iprintf(buffer, "Rate: ");
+		switch (status[3] & IEC958_AES3_CON_FS) {
+		case IEC958_AES3_CON_FS_44100:
+			snd_iprintf(buffer, "44100 Hz\n");
+			break;
+		case IEC958_AES3_CON_FS_48000:
+			snd_iprintf(buffer, "48000 Hz\n");
+			break;
+		case IEC958_AES3_CON_FS_32000:
+			snd_iprintf(buffer, "32000 Hz\n");
+			break;
+		default:
+			snd_iprintf(buffer, "unknown\n");
+			break;
+		}
+		snd_iprintf(buffer, "Copyright: ");
+		if (status[0] & IEC958_AES0_CON_NOT_COPYRIGHT) {
+			snd_iprintf(buffer, "permitted\n");
+		} else {
+			snd_iprintf(buffer, "protected\n");
+		}
+		snd_iprintf(buffer, "Emphasis: ");
+		if ((status[0] & IEC958_AES0_CON_EMPHASIS) != IEC958_AES0_CON_EMPHASIS_5015) {
+			snd_iprintf(buffer, "none\n");
+		} else {
+			snd_iprintf(buffer, "50/15us\n");
+		}
+		snd_iprintf(buffer, "Category: ");
+		for (i = 0; i < ARRAY_SIZE(snd_ca0106_con_category); i++) {
+			if ((status[1] & IEC958_AES1_CON_CATEGORY) == snd_ca0106_con_category[i].val) {
+				snd_iprintf(buffer, "%s\n", snd_ca0106_con_category[i].name);
+				break;
+			}
+		}
+		if (i >= ARRAY_SIZE(snd_ca0106_con_category)) {
+			snd_iprintf(buffer, "unknown 0x%x\n", status[1] & IEC958_AES1_CON_CATEGORY);
+		}
+		snd_iprintf(buffer, "Original: ");
+		if (status[1] & IEC958_AES1_CON_ORIGINAL) {
+			snd_iprintf(buffer, "original\n");
+		} else {
+			snd_iprintf(buffer, "1st generation\n");
+		}
+		snd_iprintf(buffer, "Clock: ");
+		switch (status[3] & IEC958_AES3_CON_CLOCK) {
+		case IEC958_AES3_CON_CLOCK_1000PPM:
+			snd_iprintf(buffer, "1000 ppm\n");
+			break;
+		case IEC958_AES3_CON_CLOCK_50PPM:
+			snd_iprintf(buffer, "50 ppm\n");
+			break;
+		case IEC958_AES3_CON_CLOCK_VARIABLE:
+			snd_iprintf(buffer, "variable pitch\n");
+			break;
+		default:
+			snd_iprintf(buffer, "unknown\n");
+			break;
+		}
+	} else {
+		snd_iprintf(buffer, "Mode: professional\n");
+		snd_iprintf(buffer, "Data: ");
+		if (!(status[0] & IEC958_AES0_NONAUDIO)) {
+			snd_iprintf(buffer, "audio\n");
+		} else {
+			snd_iprintf(buffer, "non-audio\n");
+		}
+		snd_iprintf(buffer, "Rate: ");
+		switch (status[0] & IEC958_AES0_PRO_FS) {
+		case IEC958_AES0_PRO_FS_44100:
+			snd_iprintf(buffer, "44100 Hz\n");
+			break;
+		case IEC958_AES0_PRO_FS_48000:
+			snd_iprintf(buffer, "48000 Hz\n");
+			break;
+		case IEC958_AES0_PRO_FS_32000:
+			snd_iprintf(buffer, "32000 Hz\n");
+			break;
+		default:
+			snd_iprintf(buffer, "unknown\n");
+			break;
+		}
+		snd_iprintf(buffer, "Rate Locked: ");
+		if (status[0] & IEC958_AES0_PRO_FREQ_UNLOCKED)
+			snd_iprintf(buffer, "no\n");
+		else
+			snd_iprintf(buffer, "yes\n");
+		snd_iprintf(buffer, "Emphasis: ");
+		switch (status[0] & IEC958_AES0_PRO_EMPHASIS) {
+		case IEC958_AES0_PRO_EMPHASIS_CCITT:
+			snd_iprintf(buffer, "CCITT J.17\n");
+			break;
+		case IEC958_AES0_PRO_EMPHASIS_NONE:
+			snd_iprintf(buffer, "none\n");
+			break;
+		case IEC958_AES0_PRO_EMPHASIS_5015:
+			snd_iprintf(buffer, "50/15us\n");
+			break;
+		case IEC958_AES0_PRO_EMPHASIS_NOTID:
+		default:
+			snd_iprintf(buffer, "unknown\n");
+			break;
+		}
+		snd_iprintf(buffer, "Stereophonic: ");
+		if ((status[1] & IEC958_AES1_PRO_MODE) == IEC958_AES1_PRO_MODE_STEREOPHONIC) {
+			snd_iprintf(buffer, "stereo\n");
+		} else {
+			snd_iprintf(buffer, "not indicated\n");
+		}
+		snd_iprintf(buffer, "Userbits: ");
+		switch (status[1] & IEC958_AES1_PRO_USERBITS) {
+		case IEC958_AES1_PRO_USERBITS_192:
+			snd_iprintf(buffer, "192bit\n");
+			break;
+		case IEC958_AES1_PRO_USERBITS_UDEF:
+			snd_iprintf(buffer, "user-defined\n");
+			break;
+		default:
+			snd_iprintf(buffer, "unkown\n");
+			break;
+		}
+		snd_iprintf(buffer, "Sample Bits: ");
+		switch (status[2] & IEC958_AES2_PRO_SBITS) {
+		case IEC958_AES2_PRO_SBITS_20:
+			snd_iprintf(buffer, "20 bit\n");
+			break;
+		case IEC958_AES2_PRO_SBITS_24:
+			snd_iprintf(buffer, "24 bit\n");
+			break;
+		case IEC958_AES2_PRO_SBITS_UDEF:
+			snd_iprintf(buffer, "user defined\n");
+			break;
+		default:
+			snd_iprintf(buffer, "unknown\n");
+			break;
+		}
+		snd_iprintf(buffer, "Word Length: ");
+		switch (status[2] & IEC958_AES2_PRO_WORDLEN) {
+		case IEC958_AES2_PRO_WORDLEN_22_18:
+			snd_iprintf(buffer, "22 bit or 18 bit\n");
+			break;
+		case IEC958_AES2_PRO_WORDLEN_23_19:
+			snd_iprintf(buffer, "23 bit or 19 bit\n");
+			break;
+		case IEC958_AES2_PRO_WORDLEN_24_20:
+			snd_iprintf(buffer, "24 bit or 20 bit\n");
+			break;
+		case IEC958_AES2_PRO_WORDLEN_20_16:
+			snd_iprintf(buffer, "20 bit or 16 bit\n");
+			break;
+		default:
+			snd_iprintf(buffer, "unknown\n");
+			break;
+		}
+	}
+}
+
+static void snd_ca0106_proc_iec958(snd_info_entry_t *entry, 
+				       snd_info_buffer_t * buffer)
+{
+	ca0106_t *emu = entry->private_data;
+	u32 value;
+
+        value = snd_ca0106_ptr_read(emu, SAMPLE_RATE_TRACKER_STATUS, 0);
+	snd_iprintf(buffer, "Status: %s, %s, %s\n",
+		  (value & 0x100000) ? "Rate Locked" : "Not Rate Locked",
+		  (value & 0x200000) ? "SPDIF Locked" : "No SPDIF Lock",
+		  (value & 0x400000) ? "Audio Valid" : "No valid audio" );
+	snd_iprintf(buffer, "Estimated sample rate: %u\n", 
+		  ((value & 0xfffff) * 48000) / 0x8000 );
+	if (value & 0x200000) {
+		snd_iprintf(buffer, "IEC958/SPDIF input status:\n");
+        	value = snd_ca0106_ptr_read(emu, SPDIF_INPUT_STATUS, 0);
+		snd_ca0106_proc_dump_iec958(buffer, value);
+	}
+
+	snd_iprintf(buffer, "\n");
+}
+
+static void snd_ca0106_proc_reg_write32(snd_info_entry_t *entry, 
+				       snd_info_buffer_t * buffer)
+{
+	ca0106_t *emu = entry->private_data;
+	unsigned long flags;
+        char line[64];
+        u32 reg, val;
+        while (!snd_info_get_line(buffer, line, sizeof(line))) {
+                if (sscanf(line, "%x %x", &reg, &val) != 2)
+                        continue;
+                if ((reg < 0x40) && (reg >=0) && (val <= 0xffffffff) ) {
+			spin_lock_irqsave(&emu->emu_lock, flags);
+			outl(val, emu->port + (reg & 0xfffffffc));
+			spin_unlock_irqrestore(&emu->emu_lock, flags);
+		}
+        }
+}
+
+static void snd_ca0106_proc_reg_read32(snd_info_entry_t *entry, 
+				       snd_info_buffer_t * buffer)
+{
+	ca0106_t *emu = entry->private_data;
+	unsigned long value;
+	unsigned long flags;
+	int i;
+	snd_iprintf(buffer, "Registers:\n\n");
+	for(i = 0; i < 0x20; i+=4) {
+		spin_lock_irqsave(&emu->emu_lock, flags);
+		value = inl(emu->port + i);
+		spin_unlock_irqrestore(&emu->emu_lock, flags);
+		snd_iprintf(buffer, "Register %02X: %08lX\n", i, value);
+	}
+}
+
+static void snd_ca0106_proc_reg_read16(snd_info_entry_t *entry, 
+				       snd_info_buffer_t * buffer)
+{
+	ca0106_t *emu = entry->private_data;
+        unsigned int value;
+	unsigned long flags;
+	int i;
+	snd_iprintf(buffer, "Registers:\n\n");
+	for(i = 0; i < 0x20; i+=2) {
+		spin_lock_irqsave(&emu->emu_lock, flags);
+		value = inw(emu->port + i);
+		spin_unlock_irqrestore(&emu->emu_lock, flags);
+		snd_iprintf(buffer, "Register %02X: %04X\n", i, value);
+	}
+}
+
+static void snd_ca0106_proc_reg_read8(snd_info_entry_t *entry, 
+				       snd_info_buffer_t * buffer)
+{
+	ca0106_t *emu = entry->private_data;
+	unsigned int value;
+	unsigned long flags;
+	int i;
+	snd_iprintf(buffer, "Registers:\n\n");
+	for(i = 0; i < 0x20; i+=1) {
+		spin_lock_irqsave(&emu->emu_lock, flags);
+		value = inb(emu->port + i);
+		spin_unlock_irqrestore(&emu->emu_lock, flags);
+		snd_iprintf(buffer, "Register %02X: %02X\n", i, value);
+	}
+}
+
+static void snd_ca0106_proc_reg_read1(snd_info_entry_t *entry, 
+				       snd_info_buffer_t * buffer)
+{
+	ca0106_t *emu = entry->private_data;
+	unsigned long value;
+	int i,j;
+
+	snd_iprintf(buffer, "Registers\n");
+	for(i = 0; i < 0x40; i++) {
+		snd_iprintf(buffer, "%02X: ",i);
+		for (j = 0; j < 4; j++) {
+                  value = snd_ca0106_ptr_read(emu, i, j);
+		  snd_iprintf(buffer, "%08lX ", value);
+                }
+	        snd_iprintf(buffer, "\n");
+	}
+}
+
+static void snd_ca0106_proc_reg_read2(snd_info_entry_t *entry, 
+				       snd_info_buffer_t * buffer)
+{
+	ca0106_t *emu = entry->private_data;
+	unsigned long value;
+	int i,j;
+
+	snd_iprintf(buffer, "Registers\n");
+	for(i = 0x40; i < 0x80; i++) {
+		snd_iprintf(buffer, "%02X: ",i);
+		for (j = 0; j < 4; j++) {
+                  value = snd_ca0106_ptr_read(emu, i, j);
+		  snd_iprintf(buffer, "%08lX ", value);
+                }
+	        snd_iprintf(buffer, "\n");
+	}
+}
+
+static void snd_ca0106_proc_reg_write(snd_info_entry_t *entry, 
+				       snd_info_buffer_t * buffer)
+{
+	ca0106_t *emu = entry->private_data;
+        char line[64];
+        unsigned int reg, channel_id , val;
+        while (!snd_info_get_line(buffer, line, sizeof(line))) {
+                if (sscanf(line, "%x %x %x", &reg, &channel_id, &val) != 3)
+                        continue;
+                if ((reg < 0x80) && (reg >=0) && (val <= 0xffffffff) && (channel_id >=0) && (channel_id <= 3) )
+                        snd_ca0106_ptr_write(emu, reg, channel_id, val);
+        }
+}
+
+
+int __devinit snd_ca0106_proc_init(ca0106_t * emu)
+{
+	snd_info_entry_t *entry;
+	
+	if(! snd_card_proc_new(emu->card, "iec958", &entry))
+		snd_info_set_text_ops(entry, emu, 1024, snd_ca0106_proc_iec958);
+	if(! snd_card_proc_new(emu->card, "ca0106_reg32", &entry)) {
+		snd_info_set_text_ops(entry, emu, 1024, snd_ca0106_proc_reg_read32);
+		entry->c.text.write_size = 64;
+		entry->c.text.write = snd_ca0106_proc_reg_write32;
+	}
+	if(! snd_card_proc_new(emu->card, "ca0106_reg16", &entry))
+		snd_info_set_text_ops(entry, emu, 1024, snd_ca0106_proc_reg_read16);
+	if(! snd_card_proc_new(emu->card, "ca0106_reg8", &entry))
+		snd_info_set_text_ops(entry, emu, 1024, snd_ca0106_proc_reg_read8);
+	if(! snd_card_proc_new(emu->card, "ca0106_regs1", &entry)) {
+		snd_info_set_text_ops(entry, emu, 1024, snd_ca0106_proc_reg_read1);
+		entry->c.text.write_size = 64;
+		entry->c.text.write = snd_ca0106_proc_reg_write;
+//		entry->private_data = emu;
+	}
+	if(! snd_card_proc_new(emu->card, "ca0106_regs2", &entry)) 
+		snd_info_set_text_ops(entry, emu, 1024, snd_ca0106_proc_reg_read2);
+	return 0;
+}
+
diff -Nru a/sound/pci/cmipci.c b/sound/pci/cmipci.c
--- a/sound/pci/cmipci.c	2005-01-10 20:11:20 -08:00
+++ b/sound/pci/cmipci.c	2005-01-10 20:11:20 -08:00
@@ -2608,8 +2608,8 @@
 
 	if (request_irq(pci->irq, snd_cmipci_interrupt, SA_INTERRUPT|SA_SHIRQ, card->driver, (void *)cm)) {
 		snd_printk("unable to grab IRQ %d\n", pci->irq);
-		err = -EBUSY;
-		goto __error;
+		snd_cmipci_free(cm);
+		return -EBUSY;
 	}
 	cm->irq = pci->irq;
 
@@ -2662,6 +2662,11 @@
 		break;
 	}
 
+	if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, cm, &ops)) < 0) {
+		snd_cmipci_free(cm);
+		return err;
+	}
+
 	/* set MPU address */
 	switch (iomidi) {
 	case 0x320: val = CM_VMPU_320; break;
@@ -2717,22 +2722,22 @@
 	/* create pcm devices */
 	pcm_index = pcm_spdif_index = 0;
 	if ((err = snd_cmipci_pcm_new(cm, pcm_index)) < 0)
-		goto __error;
+		return err;
 	pcm_index++;
 	if (cm->has_dual_dac) {
 		if ((err = snd_cmipci_pcm2_new(cm, pcm_index)) < 0)
-			goto __error;
+			return err;
 		pcm_index++;
 	}
 	if (cm->can_ac3_hw || cm->can_ac3_sw) {
 		pcm_spdif_index = pcm_index;
 		if ((err = snd_cmipci_pcm_spdif_new(cm, pcm_index)) < 0)
-			goto __error;
+			return err;
 	}
 
 	/* create mixer interface & switches */
 	if ((err = snd_cmipci_mixer_new(cm, pcm_spdif_index)) < 0)
-		goto __error;
+		return err;
 
 	if (iomidi > 0) {
 		if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_CMIPCI,
@@ -2742,10 +2747,6 @@
 		}
 	}
 
-	if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, cm, &ops)) < 0) {
-		snd_cmipci_free(cm);
-		return err;
-	}
 #ifdef USE_VAR48KRATE
 	for (val = 0; val < ARRAY_SIZE(rates); val++)
 		snd_cmipci_set_pll(cm, rates[val], val);
@@ -2785,10 +2786,6 @@
 
 	*rcmipci = cm;
 	return 0;
-
- __error:
-	snd_cmipci_free(cm);
-	return err;
 }
 
 /*
diff -Nru a/sound/pci/cs4281.c b/sound/pci/cs4281.c
--- a/sound/pci/cs4281.c	2005-01-10 20:11:22 -08:00
+++ b/sound/pci/cs4281.c	2005-01-10 20:11:22 -08:00
@@ -1439,15 +1439,15 @@
 		return tmp;
 	}
 
-	snd_cs4281_proc_init(chip);
-
-	snd_card_set_pm_callback(card, cs4281_suspend, cs4281_resume, chip);
-
 	if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) {
 		snd_cs4281_free(chip);
 		return err;
 	}
 
+	snd_cs4281_proc_init(chip);
+
+	snd_card_set_pm_callback(card, cs4281_suspend, cs4281_resume, chip);
+
 	snd_card_set_dev(card, &pci->dev);
 
 	*rchip = chip;
@@ -2079,7 +2079,6 @@
 	snd_cs4281_pokeBA0(chip, BA0_CLKCR1, ulCLK);
 
 	pci_disable_device(chip->pci);
-	snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
 	return 0;
 }
 
@@ -2112,7 +2111,6 @@
 	ulCLK &= ~CLKCR1_CKRA;
 	snd_cs4281_pokeBA0(chip, BA0_CLKCR1, ulCLK);
 
-	snd_power_change_state(card, SNDRV_CTL_POWER_D0);
 	return 0;
 }
 #endif /* CONFIG_PM */
diff -Nru a/sound/pci/cs46xx/cs46xx_lib.c b/sound/pci/cs46xx/cs46xx_lib.c
--- a/sound/pci/cs46xx/cs46xx_lib.c	2005-01-10 20:11:16 -08:00
+++ b/sound/pci/cs46xx/cs46xx_lib.c	2005-01-10 20:11:16 -08:00
@@ -68,6 +68,20 @@
 
 static void amp_voyetra(cs46xx_t *chip, int change);
 
+#ifdef CONFIG_SND_CS46XX_NEW_DSP
+static snd_pcm_ops_t snd_cs46xx_playback_rear_ops;
+static snd_pcm_ops_t snd_cs46xx_playback_indirect_rear_ops;
+static snd_pcm_ops_t snd_cs46xx_playback_clfe_ops;
+static snd_pcm_ops_t snd_cs46xx_playback_indirect_clfe_ops;
+static snd_pcm_ops_t snd_cs46xx_playback_iec958_ops;
+static snd_pcm_ops_t snd_cs46xx_playback_indirect_iec958_ops;
+#endif
+
+static snd_pcm_ops_t snd_cs46xx_playback_ops;
+static snd_pcm_ops_t snd_cs46xx_playback_indirect_ops;
+static snd_pcm_ops_t snd_cs46xx_capture_ops;
+static snd_pcm_ops_t snd_cs46xx_capture_indirect_ops;
+
 static unsigned short snd_cs46xx_codec_read(cs46xx_t *chip,
 					    unsigned short reg,
 					    int codec_index)
@@ -99,7 +113,7 @@
 	if ((tmp & ACCTL_VFRM) == 0) {
 		snd_printk(KERN_WARNING  "cs46xx: ACCTL_VFRM not set 0x%x\n",tmp);
 		snd_cs46xx_pokeBA0(chip, BA0_ACCTL, (tmp & (~ACCTL_ESYN)) | ACCTL_VFRM );
-		mdelay(50);
+		msleep(50);
 		tmp = snd_cs46xx_peekBA0(chip, BA0_ACCTL + offset);
 		snd_cs46xx_pokeBA0(chip, BA0_ACCTL, tmp | ACCTL_ESYN | ACCTL_VFRM );
 
@@ -1446,7 +1460,7 @@
 }
 
 #ifdef CONFIG_SND_CS46XX_NEW_DSP
-snd_pcm_ops_t snd_cs46xx_playback_rear_ops = {
+static snd_pcm_ops_t snd_cs46xx_playback_rear_ops = {
 	.open =			snd_cs46xx_playback_open_rear,
 	.close =		snd_cs46xx_playback_close,
 	.ioctl =		snd_pcm_lib_ioctl,
@@ -1457,7 +1471,7 @@
 	.pointer =		snd_cs46xx_playback_direct_pointer,
 };
 
-snd_pcm_ops_t snd_cs46xx_playback_indirect_rear_ops = {
+static snd_pcm_ops_t snd_cs46xx_playback_indirect_rear_ops = {
 	.open =			snd_cs46xx_playback_open_rear,
 	.close =		snd_cs46xx_playback_close,
 	.ioctl =		snd_pcm_lib_ioctl,
@@ -1469,7 +1483,7 @@
 	.ack =			snd_cs46xx_playback_transfer,
 };
 
-snd_pcm_ops_t snd_cs46xx_playback_clfe_ops = {
+static snd_pcm_ops_t snd_cs46xx_playback_clfe_ops = {
 	.open =			snd_cs46xx_playback_open_clfe,
 	.close =		snd_cs46xx_playback_close,
 	.ioctl =		snd_pcm_lib_ioctl,
@@ -1480,7 +1494,7 @@
 	.pointer =		snd_cs46xx_playback_direct_pointer,
 };
 
-snd_pcm_ops_t snd_cs46xx_playback_indirect_clfe_ops = {
+static snd_pcm_ops_t snd_cs46xx_playback_indirect_clfe_ops = {
 	.open =			snd_cs46xx_playback_open_clfe,
 	.close =		snd_cs46xx_playback_close,
 	.ioctl =		snd_pcm_lib_ioctl,
@@ -1492,7 +1506,7 @@
 	.ack =			snd_cs46xx_playback_transfer,
 };
 
-snd_pcm_ops_t snd_cs46xx_playback_iec958_ops = {
+static snd_pcm_ops_t snd_cs46xx_playback_iec958_ops = {
 	.open =			snd_cs46xx_playback_open_iec958,
 	.close =		snd_cs46xx_playback_close_iec958,
 	.ioctl =		snd_pcm_lib_ioctl,
@@ -1503,7 +1517,7 @@
 	.pointer =		snd_cs46xx_playback_direct_pointer,
 };
 
-snd_pcm_ops_t snd_cs46xx_playback_indirect_iec958_ops = {
+static snd_pcm_ops_t snd_cs46xx_playback_indirect_iec958_ops = {
 	.open =			snd_cs46xx_playback_open_iec958,
 	.close =		snd_cs46xx_playback_close_iec958,
 	.ioctl =		snd_pcm_lib_ioctl,
@@ -1517,7 +1531,7 @@
 
 #endif
 
-snd_pcm_ops_t snd_cs46xx_playback_ops = {
+static snd_pcm_ops_t snd_cs46xx_playback_ops = {
 	.open =			snd_cs46xx_playback_open,
 	.close =		snd_cs46xx_playback_close,
 	.ioctl =		snd_pcm_lib_ioctl,
@@ -1528,7 +1542,7 @@
 	.pointer =		snd_cs46xx_playback_direct_pointer,
 };
 
-snd_pcm_ops_t snd_cs46xx_playback_indirect_ops = {
+static snd_pcm_ops_t snd_cs46xx_playback_indirect_ops = {
 	.open =			snd_cs46xx_playback_open,
 	.close =		snd_cs46xx_playback_close,
 	.ioctl =		snd_pcm_lib_ioctl,
@@ -1540,7 +1554,7 @@
 	.ack =			snd_cs46xx_playback_transfer,
 };
 
-snd_pcm_ops_t snd_cs46xx_capture_ops = {
+static snd_pcm_ops_t snd_cs46xx_capture_ops = {
 	.open =			snd_cs46xx_capture_open,
 	.close =		snd_cs46xx_capture_close,
 	.ioctl =		snd_pcm_lib_ioctl,
@@ -1551,7 +1565,7 @@
 	.pointer =		snd_cs46xx_capture_direct_pointer,
 };
 
-snd_pcm_ops_t snd_cs46xx_capture_indirect_ops = {
+static snd_pcm_ops_t snd_cs46xx_capture_indirect_ops = {
 	.open =			snd_cs46xx_capture_open,
 	.close =		snd_cs46xx_capture_close,
 	.ioctl =		snd_pcm_lib_ioctl,
@@ -2305,6 +2319,36 @@
 };
 
 #ifdef CONFIG_SND_CS46XX_NEW_DSP
+/* set primary cs4294 codec into Extended Audio Mode */
+static int snd_cs46xx_front_dup_get(snd_kcontrol_t *kcontrol, 
+				    snd_ctl_elem_value_t *ucontrol)
+{
+	cs46xx_t *chip = snd_kcontrol_chip(kcontrol);
+	unsigned short val;
+	val = snd_ac97_read(chip->ac97[CS46XX_PRIMARY_CODEC_INDEX], AC97_CSR_ACMODE);
+	ucontrol->value.integer.value[0] = (val & 0x200) ? 0 : 1;
+	return 0;
+}
+
+static int snd_cs46xx_front_dup_put(snd_kcontrol_t *kcontrol, 
+				    snd_ctl_elem_value_t *ucontrol)
+{
+	cs46xx_t *chip = snd_kcontrol_chip(kcontrol);
+	return snd_ac97_update_bits(chip->ac97[CS46XX_PRIMARY_CODEC_INDEX],
+				    AC97_CSR_ACMODE, 0x200,
+				    ucontrol->value.integer.value[0] ? 0 : 0x200);
+}
+
+static snd_kcontrol_new_t snd_cs46xx_front_dup_ctl = {
+	.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+	.name = "Duplicate Front",
+	.info = snd_mixer_boolean_info,
+	.get = snd_cs46xx_front_dup_get,
+	.put = snd_cs46xx_front_dup_put,
+};
+#endif
+
+#ifdef CONFIG_SND_CS46XX_NEW_DSP
 /* Only available on the Hercules Game Theater XP soundcard */
 static snd_kcontrol_new_t snd_hercules_controls[] __devinitdata = {
 {
@@ -2451,10 +2495,11 @@
 	if (chip->nr_ac97_codecs == 1) {
 		unsigned int id2 = chip->ac97[CS46XX_PRIMARY_CODEC_INDEX]->id & 0xffff;
 		if (id2 == 0x592b || id2 == 0x592d) {
-			/* set primary cs4294 codec into Extended Audio Mode */
-			snd_printdd("setting EAM bit on cs4294 CODEC\n");
-			snd_cs46xx_codec_write(chip, AC97_CSR_ACMODE, 0x200,
-					       CS46XX_PRIMARY_CODEC_INDEX);
+			err = snd_ctl_add(card, snd_ctl_new1(&snd_cs46xx_front_dup_ctl, chip));
+			if (err < 0)
+				return err;
+			snd_ac97_write_cache(chip->ac97[CS46XX_PRIMARY_CODEC_INDEX],
+					     AC97_CSR_ACMODE, 0x200);
 		}
 	}
 	/* do soundcard specific mixer setup */
@@ -3680,7 +3725,6 @@
 	chip->active_ctrl(chip, -chip->amplifier);
 	chip->amplifier = amp_saved; /* restore the status */
 	pci_disable_device(chip->pci);
-	snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
 	return 0;
 }
 
@@ -3717,7 +3761,6 @@
 	else
 		chip->active_ctrl(chip, -1); /* disable CLKRUN */
 	chip->amplifier = amp_saved;
-	snd_power_change_state(card, SNDRV_CTL_POWER_D0);
 	return 0;
 }
 #endif /* CONFIG_PM */
@@ -3866,15 +3909,15 @@
 		return err;
 	}
 
-	snd_cs46xx_proc_init(card, chip);
-
-	snd_card_set_pm_callback(card, snd_cs46xx_suspend, snd_cs46xx_resume, chip);
-
 	if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) {
 		snd_cs46xx_free(chip);
 		return err;
 	}
 	
+	snd_cs46xx_proc_init(card, chip);
+
+	snd_card_set_pm_callback(card, snd_cs46xx_suspend, snd_cs46xx_resume, chip);
+
 	chip->active_ctrl(chip, -1); /* disable CLKRUN */
 
 	snd_card_set_dev(card, &pci->dev);
diff -Nru a/sound/pci/cs46xx/cs46xx_lib.h b/sound/pci/cs46xx/cs46xx_lib.h
--- a/sound/pci/cs46xx/cs46xx_lib.h	2005-01-10 20:11:16 -08:00
+++ b/sound/pci/cs46xx/cs46xx_lib.h	2005-01-10 20:11:16 -08:00
@@ -53,18 +53,6 @@
 #define BA1_DWORD_SIZE		(13 * 1024 + 512)
 #define BA1_MEMORY_COUNT	3
 
-extern snd_pcm_ops_t snd_cs46xx_playback_ops;
-extern snd_pcm_ops_t snd_cs46xx_playback_indirect_ops;
-extern snd_pcm_ops_t snd_cs46xx_capture_ops;
-extern snd_pcm_ops_t snd_cs46xx_capture_indirect_ops;
-extern snd_pcm_ops_t snd_cs46xx_playback_rear_ops;
-extern snd_pcm_ops_t snd_cs46xx_playback_indirect_rear_ops;
-extern snd_pcm_ops_t snd_cs46xx_playback_iec958_ops;
-extern snd_pcm_ops_t snd_cs46xx_playback_indirect_iec958_ops;
-extern snd_pcm_ops_t snd_cs46xx_playback_clfe_ops;
-extern snd_pcm_ops_t snd_cs46xx_playback_indirect_clfe_ops;
-
-
 /*
  *  common I/O routines
  */
@@ -99,11 +87,9 @@
 void                   cs46xx_dsp_spos_destroy (cs46xx_t * chip);
 int                    cs46xx_dsp_load_module (cs46xx_t * chip,dsp_module_desc_t * module);
 symbol_entry_t *       cs46xx_dsp_lookup_symbol (cs46xx_t * chip,char * symbol_name,int symbol_type);
-symbol_entry_t *       cs46xx_dsp_lookup_symbol_addr (cs46xx_t * chip,u32 address,int symbol_type);
 int                    cs46xx_dsp_proc_init (snd_card_t * card, cs46xx_t *chip);
 int                    cs46xx_dsp_proc_done (cs46xx_t *chip);
 int                    cs46xx_dsp_scb_and_task_init (cs46xx_t *chip);
-int                    cs46xx_dsp_async_init (cs46xx_t *chip,dsp_scb_descriptor_t * fg_entry);
 int                    snd_cs46xx_download (cs46xx_t *chip,u32 *src,unsigned long offset,
                                             unsigned long len);
 int                    snd_cs46xx_clear_BA1(cs46xx_t *chip,unsigned long offset,unsigned long len);
@@ -120,8 +106,6 @@
 dsp_scb_descriptor_t * cs46xx_dsp_create_scb (cs46xx_t *chip,char * name, u32 * scb_data,u32 dest);
 void                   cs46xx_dsp_proc_free_scb_desc (dsp_scb_descriptor_t * scb);
 void                   cs46xx_dsp_proc_register_scb_desc (cs46xx_t *chip,dsp_scb_descriptor_t * scb);
-dsp_task_descriptor_t * cs46xx_dsp_create_task_tree (cs46xx_t *chip,char * name, 
-                                                     u32 * task_data,u32 dest,int size);
 dsp_scb_descriptor_t * cs46xx_dsp_create_timing_master_scb (cs46xx_t *chip);
 dsp_scb_descriptor_t * cs46xx_dsp_create_codec_out_scb(cs46xx_t * chip,char * codec_name,
                                                        u16 channel_disp,u16 fifo_addr,
@@ -136,21 +120,11 @@
                                                       dsp_scb_descriptor_t * parent_scb,
                                                       int scb_child_type);
 void                   cs46xx_dsp_remove_scb (cs46xx_t *chip,dsp_scb_descriptor_t * scb);
-dsp_scb_descriptor_t * cs46xx_dsp_create_generic_scb (cs46xx_t *chip,char * name, 
-                                                      u32 * scb_data,u32 dest,
-                                                      char * task_entry_name,
-                                                      dsp_scb_descriptor_t * parent_scb,
-                                                      int scb_child_type);
 dsp_scb_descriptor_t *  cs46xx_dsp_create_codec_in_scb(cs46xx_t * chip,char * codec_name,
                                                        u16 channel_disp,u16 fifo_addr,
                                                        u16 sample_buffer_addr,
                                                        u32 dest,dsp_scb_descriptor_t * parent_scb,
                                                        int scb_child_type);
-dsp_scb_descriptor_t * cs46xx_dsp_create_pcm_reader_scb(cs46xx_t * chip,char * scb_name,
-                                                        u16 sample_buffer_addr,u32 dest,
-                                                        int virtual_channel,u32 playback_hw_addr,
-                                                        dsp_scb_descriptor_t * parent_scb,
-                                                        int scb_child_type);
 dsp_scb_descriptor_t *  cs46xx_dsp_create_src_task_scb(cs46xx_t * chip,char * scb_name,
 						       int sample_rate,
                                                        u16 src_buffer_addr,
@@ -169,15 +143,6 @@
                                                             u32 dest,
                                                             dsp_scb_descriptor_t * parent_scb,
                                                             int scb_child_type);
-dsp_scb_descriptor_t *  cs46xx_dsp_create_pcm_serial_input_scb(cs46xx_t * chip,char * scb_name,u32 dest,
-                                                               dsp_scb_descriptor_t * input_scb,
-                                                               dsp_scb_descriptor_t * parent_scb,
-                                                               int scb_child_type);
-dsp_scb_descriptor_t * cs46xx_dsp_create_asynch_fg_tx_scb(cs46xx_t * chip,char * scb_name,u32 dest,
-                                                          u16 hfg_scb_address,
-                                                          u16 asynch_buffer_address,
-                                                          dsp_scb_descriptor_t * parent_scb,
-                                                          int scb_child_type);
 dsp_scb_descriptor_t * cs46xx_dsp_create_asynch_fg_rx_scb(cs46xx_t * chip,char * scb_name,u32 dest,
                                                           u16 hfg_scb_address,
                                                           u16 asynch_buffer_address,
@@ -190,11 +155,6 @@
                                                              u16 mix_buffer_addr,u16 writeback_spb,u32 dest,
                                                              dsp_scb_descriptor_t * parent_scb,
                                                              int scb_child_type);
-dsp_scb_descriptor_t *  cs46xx_dsp_create_output_snoop_scb(cs46xx_t * chip,char * scb_name,u32 dest,
-                                                           u16 snoop_buffer_address,
-                                                           dsp_scb_descriptor_t * snoop_scb,
-                                                           dsp_scb_descriptor_t * parent_scb,
-                                                           int scb_child_type);
 dsp_scb_descriptor_t *  cs46xx_dsp_create_magic_snoop_scb(cs46xx_t * chip,char * scb_name,u32 dest,
                                                           u16 snoop_buffer_address,
                                                           dsp_scb_descriptor_t * snoop_scb,
diff -Nru a/sound/pci/cs46xx/dsp_spos.c b/sound/pci/cs46xx/dsp_spos.c
--- a/sound/pci/cs46xx/dsp_spos.c	2005-01-10 20:11:24 -08:00
+++ b/sound/pci/cs46xx/dsp_spos.c	2005-01-10 20:11:24 -08:00
@@ -37,6 +37,8 @@
 #include "cs46xx_lib.h"
 #include "dsp_spos.h"
 
+static int cs46xx_dsp_async_init (cs46xx_t *chip, dsp_scb_descriptor_t * fg_entry);
+
 static wide_opcode_t wide_opcodes[] = { 
 	WIDE_FOR_BEGIN_LOOP,
 	WIDE_FOR_BEGIN_LOOP2,
@@ -289,15 +291,9 @@
 		cs46xx_dsp_proc_free_scb_desc ( (ins->scbs + i) );
 	}
 
-	if (ins->code.data)
-		kfree(ins->code.data);
-
-	if (ins->symbol_table.symbols)
-		vfree(ins->symbol_table.symbols);
-
-	if (ins->modules)
-		kfree(ins->modules);
-	
+	kfree(ins->code.data);
+	vfree(ins->symbol_table.symbols);
+	kfree(ins->modules);
 	kfree(ins);
 	up(&chip->spos_mutex);
 }
@@ -439,7 +435,7 @@
 }
 
 
-symbol_entry_t * cs46xx_dsp_lookup_symbol_addr (cs46xx_t * chip, u32 address, int symbol_type)
+static symbol_entry_t * cs46xx_dsp_lookup_symbol_addr (cs46xx_t * chip, u32 address, int symbol_type)
 {
 	int i;
 	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
@@ -914,7 +910,7 @@
 	int i;
 
 	for (i = 0; i < size; ++i) {
-		if (debug_tree) printk ("addr %p, val %08x\n", spdst,task_data[i]);
+		if (debug_tree) printk ("addr %p, val %08x\n",spdst,task_data[i]);
 		writel(task_data[i],spdst);
 		spdst += sizeof(u32);
 	}
@@ -928,7 +924,7 @@
 	int i;
 
 	for (i = 0; i < 0x10; ++i) {
-		if (debug_scb) printk ("addr %p, val %08x\n", spdst,scb_data[i]);
+		if (debug_scb) printk ("addr %p, val %08x\n",spdst,scb_data[i]);
 		writel(scb_data[i],spdst);
 		spdst += sizeof(u32);
 	}
@@ -1019,7 +1015,7 @@
 }
 
 
-dsp_task_descriptor_t *  cs46xx_dsp_create_task_tree (cs46xx_t *chip,char * name, u32 * task_data,u32 dest,int size)
+static dsp_task_descriptor_t *  cs46xx_dsp_create_task_tree (cs46xx_t *chip,char * name, u32 * task_data,u32 dest,int size)
 {
 	dsp_task_descriptor_t * desc;
 
@@ -1452,7 +1448,7 @@
 	return -EINVAL;
 }
 
-int cs46xx_dsp_async_init (cs46xx_t *chip, dsp_scb_descriptor_t * fg_entry)
+static int cs46xx_dsp_async_init (cs46xx_t *chip, dsp_scb_descriptor_t * fg_entry)
 {
 	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
 	symbol_entry_t * s16_async_codec_input_task;
diff -Nru a/sound/pci/cs46xx/dsp_spos_scb_lib.c b/sound/pci/cs46xx/dsp_spos_scb_lib.c
--- a/sound/pci/cs46xx/dsp_spos_scb_lib.c	2005-01-10 20:11:22 -08:00
+++ b/sound/pci/cs46xx/dsp_spos_scb_lib.c	2005-01-10 20:11:22 -08:00
@@ -342,7 +342,7 @@
 	return scb;
 }
 
-dsp_scb_descriptor_t * 
+static dsp_scb_descriptor_t * 
 cs46xx_dsp_create_generic_scb (cs46xx_t *chip,char * name, u32 * scb_data,u32 dest,
                                char * task_entry_name,
                                dsp_scb_descriptor_t * parent_scb,
@@ -481,7 +481,7 @@
 }
 
 
-dsp_scb_descriptor_t * 
+static dsp_scb_descriptor_t * 
 cs46xx_dsp_create_pcm_reader_scb(cs46xx_t * chip,char * scb_name,
                                  u16 sample_buffer_addr,u32 dest,
                                  int virtual_channel, u32 playback_hw_addr,
@@ -687,6 +687,7 @@
 	return scb;
 }
 
+#if 0 /* not used */
 dsp_scb_descriptor_t * 
 cs46xx_dsp_create_filter_scb(cs46xx_t * chip,char * scb_name,
 			     u16 buffer_addr,u32 dest,
@@ -735,6 +736,7 @@
 
  	return scb;
 }
+#endif /* not used */
 
 dsp_scb_descriptor_t * 
 cs46xx_dsp_create_mix_only_scb(cs46xx_t * chip,char * scb_name,
@@ -874,7 +876,7 @@
 }
 
 
-dsp_scb_descriptor_t * 
+static dsp_scb_descriptor_t * 
 cs46xx_dsp_create_pcm_serial_input_scb(cs46xx_t * chip,char * scb_name,u32 dest,
                                        dsp_scb_descriptor_t * input_scb,
                                        dsp_scb_descriptor_t * parent_scb,
@@ -917,7 +919,7 @@
 }
 
 
-dsp_scb_descriptor_t * 
+static dsp_scb_descriptor_t * 
 cs46xx_dsp_create_asynch_fg_tx_scb(cs46xx_t * chip,char * scb_name,u32 dest,
                                    u16 hfg_scb_address,
                                    u16 asynch_buffer_address,
@@ -1013,6 +1015,7 @@
 }
 
 
+#if 0 /* not used */
 dsp_scb_descriptor_t * 
 cs46xx_dsp_create_output_snoop_scb(cs46xx_t * chip,char * scb_name,u32 dest,
                                    u16 snoop_buffer_address,
@@ -1052,6 +1055,7 @@
 					    scb_child_type);
 	return scb;
 }
+#endif /* not used */
 
 
 dsp_scb_descriptor_t * 
diff -Nru a/sound/pci/cs46xx/imgs/cwcdma.h b/sound/pci/cs46xx/imgs/cwcdma.h
--- a/sound/pci/cs46xx/imgs/cwcdma.h	2005-01-10 20:11:18 -08:00
+++ b/sound/pci/cs46xx/imgs/cwcdma.h	2005-01-10 20:11:18 -08:00
@@ -3,7 +3,7 @@
 #ifndef __HEADER_cwcdma_H__
 #define __HEADER_cwcdma_H__
 
-symbol_entry_t cwcdma_symbols[] = {
+static symbol_entry_t cwcdma_symbols[] = {
   { 0x8000, "EXECCHILD",0x03 },
   { 0x8001, "EXECCHILD_98",0x03 },
   { 0x8003, "EXECCHILD_PUSH1IND",0x03 },
@@ -33,7 +33,7 @@
   { 0x0018, "#CODE_END",0x00 },
 }; /* cwcdma symbols */
 
-u32 cwcdma_code[] = {
+static u32 cwcdma_code[] = {
 /* OVERLAYBEGINADDRESS */
 /* 0000 */ 0x00002731,0x00001400,0x0004c108,0x000e5044,
 /* 0002 */ 0x0005f608,0x00000000,0x000007ae,0x000be300,
@@ -51,11 +51,11 @@
 
 /* #CODE_END */
 
-segment_desc_t cwcdma_segments[] = {
+static segment_desc_t cwcdma_segments[] = {
   { SEGTYPE_SP_PROGRAM, 0x00000000, 0x00000030, cwcdma_code },
 };
 
-dsp_module_desc_t cwcdma_module = {
+static dsp_module_desc_t cwcdma_module = {
   "cwcdma",
   {
     27,
diff -Nru a/sound/pci/emu10k1/Makefile b/sound/pci/emu10k1/Makefile
--- a/sound/pci/emu10k1/Makefile	2005-01-10 20:11:18 -08:00
+++ b/sound/pci/emu10k1/Makefile	2005-01-10 20:11:18 -08:00
@@ -5,8 +5,9 @@
 
 snd-emu10k1-objs := emu10k1.o emu10k1_main.o \
 		    irq.o memory.o voice.o emumpu401.o emupcm.o io.o \
-		    emuproc.o emumixer.o emufx.o
+		    emuproc.o emumixer.o emufx.o timer.o
 snd-emu10k1-synth-objs := emu10k1_synth.o emu10k1_callback.o emu10k1_patch.o
+snd-emu10k1x-objs := emu10k1x.o
 
 #
 # this function returns:
@@ -19,3 +20,4 @@
 # Toplevel Module Dependency
 obj-$(CONFIG_SND_EMU10K1) += snd-emu10k1.o
 obj-$(call sequencer,$(CONFIG_SND_EMU10K1)) += snd-emu10k1-synth.o
+obj-$(CONFIG_SND_EMU10K1X) += snd-emu10k1x.o
diff -Nru a/sound/pci/emu10k1/emu10k1.c b/sound/pci/emu10k1/emu10k1.c
--- a/sound/pci/emu10k1/emu10k1.c	2005-01-10 20:11:15 -08:00
+++ b/sound/pci/emu10k1/emu10k1.c	2005-01-10 20:11:15 -08:00
@@ -2,6 +2,9 @@
  *  The driver for the EMU10K1 (SB Live!) based soundcards
  *  Copyright (c) by Jaroslav Kysela <perex@suse.cz>
  *
+ *  Copyright (c) by James Courtier-Dutton <James@superbug.demon.co.uk>
+ *      Added support for Audigy 2 Value.
+ *
  *
  *   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
@@ -17,6 +20,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  *
+ * 
  */
 
 #include <sound/driver.h>
@@ -68,12 +72,27 @@
 module_param_array(enable_ir, bool, NULL, 0444);
 MODULE_PARM_DESC(enable_ir, "Enable IR.");
 
+/*
+ * Class 0401: 1102:0008 (rev 00) Subsystem: 1102:1001 -> Audigy2 Value  Model:SB0400
+ */
 static struct pci_device_id snd_emu10k1_ids[] = {
 	{ 0x1102, 0x0002, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },	/* EMU10K1 */
 	{ 0x1102, 0x0004, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 },	/* Audigy */
+	{ 0x1102, 0x0008, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 },	/* Audigy 2 Value SB0400 */
 	{ 0, }
 };
 
+/*
+ * Audigy 2 Value notes:
+ * A_IOCFG Input (GPIO)
+ * 0x400  = Front analog jack plugged in. (Green socket)
+ * 0x1000 = Read analog jack plugged in. (Black socket)
+ * 0x2000 = Center/LFE analog jack plugged in. (Orange socket)
+ * A_IOCFG Output (GPIO)
+ * 0x60 = Sound out of front Left.
+ * Win sets it to 0xXX61
+ */
+
 MODULE_DEVICE_TABLE(pci, snd_emu10k1_ids);
 
 static int __devinit snd_card_emu10k1_probe(struct pci_dev *pci,
@@ -124,6 +143,12 @@
 		snd_card_free(card);
 		return err;
 	}
+	
+	if ((err = snd_emu10k1_timer(emu, 0)) < 0) {
+		snd_card_free(card);
+		return err;
+	}
+
 	if (emu->audigy) {
 		if ((err = snd_emu10k1_audigy_midi(emu)) < 0) {
 			snd_card_free(card);
@@ -155,7 +180,10 @@
 	}
 #endif
  
-	if (emu->audigy && (emu->revision == 4) ) {
+	if (emu->audigy && (emu->serial == 0x10011102) ) {
+		strcpy(card->driver, "Audigy2");
+		strcpy(card->shortname, "Sound Blaster Audigy2_Value");
+	} else if (emu->audigy && (emu->revision == 4) ) {
 		strcpy(card->driver, "Audigy2");
 		strcpy(card->shortname, "Sound Blaster Audigy2");
 	} else if (emu->audigy) {
@@ -168,7 +196,7 @@
 		strcpy(card->driver, "EMU10K1");
 		strcpy(card->shortname, "Sound Blaster Live!");
 	}
-	sprintf(card->longname, "%s (rev.%d) at 0x%lx, irq %i", card->shortname, emu->revision, emu->port, emu->irq);
+	sprintf(card->longname, "%s (rev.%d, serial:0x%x) at 0x%lx, irq %i", card->shortname, emu->revision, emu->serial, emu->port, emu->irq);
 
 	if ((err = snd_card_register(card)) < 0) {
 		snd_card_free(card);
diff -Nru a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c
--- a/sound/pci/emu10k1/emu10k1_main.c	2005-01-10 20:11:22 -08:00
+++ b/sound/pci/emu10k1/emu10k1_main.c	2005-01-10 20:11:22 -08:00
@@ -3,6 +3,10 @@
  *                   Creative Labs, Inc.
  *  Routines for control of EMU10K1 chips
  *
+ *  Copyright (c) by James Courtier-Dutton <James@superbug.demon.co.uk>
+ *      Added support for Audigy 2 Value.
+ *
+ *
  *  BUGS:
  *    --
  *
@@ -183,6 +187,26 @@
 		outl(0x6E0000, emu->port + 0x20);
 		outl(0xFF00FF00, emu->port + 0x24);
 	}
+	if (emu->audigy && (emu->serial == 0x10011102) ) { /* audigy2 Value */
+		/* Hacks for Alice3 to work independent of haP16V driver */
+		u32 tmp;
+
+		snd_printk(KERN_ERR "Audigy2 value:Special config.\n");
+		//Setup SRCMulti_I2S SamplingRate
+		tmp = snd_emu10k1_ptr_read(emu, A_SPDIF_SAMPLERATE, 0);
+		tmp &= 0xfffff1ff;
+		tmp |= (0x2<<9);
+		snd_emu10k1_ptr_write(emu, A_SPDIF_SAMPLERATE, 0, tmp);
+
+		/* Setup SRCSel (Enable Spdif,I2S SRCMulti) */
+		outl(0x600000, emu->port + 0x20);
+		outl(0x14, emu->port + 0x24);
+
+		/* Setup SRCMulti Input Audio Enable */
+		outl(0x7b0000, emu->port + 0x20);
+		outl(0xFF000000, emu->port + 0x24);
+	}
+
 
 	/*
 	 *  Clear page with silence & setup all pointers to this page
@@ -267,6 +291,9 @@
 			 * This has to be done after init ALice3 I2SOut beyond 48KHz.
 			 * So, sequence is important. */
 			outl(inl(emu->port + A_IOCFG) | 0x0040, emu->port + A_IOCFG);
+		} else if (emu->serial == 0x10011102) { /* audigy2 value */
+			/* Unmute Analog now. */
+			outl(inl(emu->port + A_IOCFG) | 0x0060, emu->port + A_IOCFG);
 		} else {
 			/* Disable routing from AC97 line out to Front speakers */
 			outl(inl(emu->port + A_IOCFG) | 0x0080, emu->port + A_IOCFG);
@@ -553,10 +580,8 @@
 		snd_dma_free_pages(&emu->silent_page);
 	if (emu->ptb_pages.area)
 		snd_dma_free_pages(&emu->ptb_pages);
-	if (emu->page_ptr_table)
-		vfree(emu->page_ptr_table);
-	if (emu->page_addr_table)
-		vfree(emu->page_addr_table);
+	vfree(emu->page_ptr_table);
+	vfree(emu->page_addr_table);
 	if (emu->irq >= 0)
 		free_irq(emu->irq, (void *)emu);
 	if (emu->port)
@@ -590,7 +615,7 @@
 	*remu = NULL;
 
 	// is_audigy = (int)pci->driver_data;
-	is_audigy = (pci->device == 0x0004);
+	is_audigy = (pci->device == 0x0004) || ( (pci->device == 0x0008) );
 
 	/* enable PCI device */
 	if ((err = pci_enable_device(pci)) < 0)
@@ -689,7 +714,7 @@
 		emu->no_ac97 = 1;	
 	}
 	
-	if (emu->revision == 4 && emu->model == 0x2002) {
+	if (emu->revision == 4 && (emu->model == 0x2001 || emu->model == 0x2002)) {
 		/* Audigy 2 ZS */
 		snd_printdd(KERN_INFO "Audigy2 ZS is detected. setting 7.1 mode.\n");
 		emu->spk71 = 1;
diff -Nru a/sound/pci/emu10k1/emu10k1_synth.c b/sound/pci/emu10k1/emu10k1_synth.c
--- a/sound/pci/emu10k1/emu10k1_synth.c	2005-01-10 20:11:17 -08:00
+++ b/sound/pci/emu10k1/emu10k1_synth.c	2005-01-10 20:11:17 -08:00
@@ -28,7 +28,7 @@
 /*
  * create a new hardware dependent device for Emu10k1
  */
-int snd_emu10k1_synth_new_device(snd_seq_device_t *dev)
+static int snd_emu10k1_synth_new_device(snd_seq_device_t *dev)
 {
 	snd_emux_t *emu;
 	emu10k1_t *hw;
@@ -76,7 +76,7 @@
 	return 0;
 }
 
-int snd_emu10k1_synth_delete_device(snd_seq_device_t *dev)
+static int snd_emu10k1_synth_delete_device(snd_seq_device_t *dev)
 {
 	snd_emux_t *emu;
 	emu10k1_t *hw;
diff -Nru a/sound/pci/emu10k1/emu10k1x.c b/sound/pci/emu10k1/emu10k1x.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/sound/pci/emu10k1/emu10k1x.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,1644 @@
+/*
+ *  Copyright (c) by Francisco Moraes <fmoraes@nc.rr.com>
+ *  Driver EMU10K1X chips
+ *
+ *  Parts of this code were adapted from audigyls.c driver which is
+ *  Copyright (c) by James Courtier-Dutton <James@superbug.demon.co.uk>
+ *
+ *  BUGS:
+ *    --
+ *
+ *  TODO:
+ *
+ *  Chips (SB0200 model):
+ *    - EMU10K1X-DBQ
+ *    - STAC 9708T
+ *
+ *   This program is free software; you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation; either version 2 of the License, or
+ *   (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+ *
+ */
+#include <sound/driver.h>
+#include <linux/init.h>
+#include <linux/interrupt.h>
+#include <linux/pci.h>
+#include <linux/slab.h>
+#include <linux/moduleparam.h>
+#include <sound/core.h>
+#include <sound/initval.h>
+#include <sound/pcm.h>
+#include <sound/ac97_codec.h>
+#include <sound/info.h>
+#include <sound/rawmidi.h>
+
+MODULE_AUTHOR("Francisco Moraes <fmoraes@nc.rr.com>");
+MODULE_DESCRIPTION("EMU10K1X");
+MODULE_LICENSE("GPL");
+MODULE_SUPPORTED_DEVICE("{{Dell Creative Labs,SB Live!}");
+
+// module parameters (see "Module Parameters")
+static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;
+static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;
+static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;
+
+module_param_array(index, int, NULL, 0444);
+MODULE_PARM_DESC(index, "Index value for the EMU10K1X soundcard.");
+module_param_array(id, charp, NULL, 0444);
+MODULE_PARM_DESC(id, "ID string for the EMU10K1X soundcard.");
+module_param_array(enable, bool, NULL, 0444);
+MODULE_PARM_DESC(enable, "Enable the EMU10K1X soundcard.");
+
+
+// some definitions were borrowed from emu10k1 driver as they seem to be the same
+/************************************************************************************************/
+/* PCI function 0 registers, address = <val> + PCIBASE0						*/
+/************************************************************************************************/
+
+#define PTR			0x00		/* Indexed register set pointer register	*/
+						/* NOTE: The CHANNELNUM and ADDRESS words can	*/
+						/* be modified independently of each other.	*/
+
+#define DATA			0x04		/* Indexed register set data register		*/
+
+#define IPR			0x08		/* Global interrupt pending register		*/
+						/* Clear pending interrupts by writing a 1 to	*/
+						/* the relevant bits and zero to the other bits	*/
+#define IPR_MIDITRANSBUFEMPTY   0x00000001	/* MIDI UART transmit buffer empty		*/
+#define IPR_MIDIRECVBUFEMPTY    0x00000002	/* MIDI UART receive buffer empty		*/
+#define IPR_CH_0_LOOP           0x00000800      /* Channel 0 loop                               */
+#define IPR_CH_0_HALF_LOOP      0x00000100      /* Channel 0 half loop                          */
+#define IPR_CAP_0_LOOP          0x00080000      /* Channel capture loop                         */
+#define IPR_CAP_0_HALF_LOOP     0x00010000      /* Channel capture half loop                    */
+
+#define INTE			0x0c		/* Interrupt enable register			*/
+#define INTE_MIDITXENABLE       0x00000001	/* Enable MIDI transmit-buffer-empty interrupts	*/
+#define INTE_MIDIRXENABLE       0x00000002	/* Enable MIDI receive-buffer-empty interrupts	*/
+#define INTE_CH_0_LOOP          0x00000800      /* Channel 0 loop                               */
+#define INTE_CH_0_HALF_LOOP     0x00000100      /* Channel 0 half loop                          */
+#define INTE_CAP_0_LOOP         0x00080000      /* Channel capture loop                         */
+#define INTE_CAP_0_HALF_LOOP    0x00010000      /* Channel capture half loop                    */
+
+#define HCFG			0x14		/* Hardware config register			*/
+
+#define HCFG_LOCKSOUNDCACHE	0x00000008	/* 1 = Cancel bustmaster accesses to soundcache */
+						/* NOTE: This should generally never be used.  	*/
+#define HCFG_AUDIOENABLE	0x00000001	/* 0 = CODECs transmit zero-valued samples	*/
+						/* Should be set to 1 when the EMU10K1 is	*/
+						/* completely initialized.			*/
+#define GPIO			0x18		/* Defaults: 00001080-Analog, 00001000-SPDIF.   */
+
+
+#define AC97DATA		0x1c		/* AC97 register set data register (16 bit)	*/
+
+#define AC97ADDRESS		0x1e		/* AC97 register set address register (8 bit)	*/
+
+/********************************************************************************************************/
+/* Emu10k1x pointer-offset register set, accessed through the PTR and DATA registers			*/
+/********************************************************************************************************/
+#define PLAYBACK_LIST_ADDR	0x00		/* Base DMA address of a list of pointers to each period/size */
+						/* One list entry: 4 bytes for DMA address, 
+						 * 4 bytes for period_size << 16.
+						 * One list entry is 8 bytes long.
+						 * One list entry for each period in the buffer.
+						 */
+#define PLAYBACK_LIST_SIZE	0x01		/* Size of list in bytes << 16. E.g. 8 periods -> 0x00380000  */
+#define PLAYBACK_LIST_PTR	0x02		/* Pointer to the current period being played */
+#define PLAYBACK_DMA_ADDR	0x04		/* Playback DMA addresss */
+#define PLAYBACK_PERIOD_SIZE	0x05		/* Playback period size */
+#define PLAYBACK_POINTER	0x06		/* Playback period pointer. Sample currently in DAC */
+#define PLAYBACK_UNKNOWN1       0x07
+#define PLAYBACK_UNKNOWN2       0x08
+
+/* Only one capture channel supported */
+#define CAPTURE_DMA_ADDR	0x10		/* Capture DMA address */
+#define CAPTURE_BUFFER_SIZE	0x11		/* Capture buffer size */
+#define CAPTURE_POINTER		0x12		/* Capture buffer pointer. Sample currently in ADC */
+#define CAPTURE_UNKNOWN         0x13
+
+/* From 0x20 - 0x3f, last samples played on each channel */
+
+#define TRIGGER_CHANNEL         0x40            /* Trigger channel playback                     */
+#define TRIGGER_CHANNEL_0       0x00000001      /* Trigger channel 0                            */
+#define TRIGGER_CHANNEL_1       0x00000002      /* Trigger channel 1                            */
+#define TRIGGER_CHANNEL_2       0x00000004      /* Trigger channel 2                            */
+#define TRIGGER_CAPTURE         0x00000100      /* Trigger capture channel                      */
+
+#define ROUTING                 0x41            /* Setup sound routing ?                        */
+#define ROUTING_FRONT_LEFT      0x00000001
+#define ROUTING_FRONT_RIGHT     0x00000002
+#define ROUTING_REAR_LEFT       0x00000004
+#define ROUTING_REAR_RIGHT      0x00000008
+#define ROUTING_CENTER_LFE      0x00010000
+
+#define SPCS0			0x42		/* SPDIF output Channel Status 0 register	*/
+
+#define SPCS1			0x43		/* SPDIF output Channel Status 1 register	*/
+
+#define SPCS2			0x44		/* SPDIF output Channel Status 2 register	*/
+
+#define SPCS_CLKACCYMASK	0x30000000	/* Clock accuracy				*/
+#define SPCS_CLKACCY_1000PPM	0x00000000	/* 1000 parts per million			*/
+#define SPCS_CLKACCY_50PPM	0x10000000	/* 50 parts per million				*/
+#define SPCS_CLKACCY_VARIABLE	0x20000000	/* Variable accuracy				*/
+#define SPCS_SAMPLERATEMASK	0x0f000000	/* Sample rate					*/
+#define SPCS_SAMPLERATE_44	0x00000000	/* 44.1kHz sample rate				*/
+#define SPCS_SAMPLERATE_48	0x02000000	/* 48kHz sample rate				*/
+#define SPCS_SAMPLERATE_32	0x03000000	/* 32kHz sample rate				*/
+#define SPCS_CHANNELNUMMASK	0x00f00000	/* Channel number				*/
+#define SPCS_CHANNELNUM_UNSPEC	0x00000000	/* Unspecified channel number			*/
+#define SPCS_CHANNELNUM_LEFT	0x00100000	/* Left channel					*/
+#define SPCS_CHANNELNUM_RIGHT	0x00200000	/* Right channel				*/
+#define SPCS_SOURCENUMMASK	0x000f0000	/* Source number				*/
+#define SPCS_SOURCENUM_UNSPEC	0x00000000	/* Unspecified source number			*/
+#define SPCS_GENERATIONSTATUS	0x00008000	/* Originality flag (see IEC-958 spec)		*/
+#define SPCS_CATEGORYCODEMASK	0x00007f00	/* Category code (see IEC-958 spec)		*/
+#define SPCS_MODEMASK		0x000000c0	/* Mode (see IEC-958 spec)			*/
+#define SPCS_EMPHASISMASK	0x00000038	/* Emphasis					*/
+#define SPCS_EMPHASIS_NONE	0x00000000	/* No emphasis					*/
+#define SPCS_EMPHASIS_50_15	0x00000008	/* 50/15 usec 2 channel				*/
+#define SPCS_COPYRIGHT		0x00000004	/* Copyright asserted flag -- do not modify	*/
+#define SPCS_NOTAUDIODATA	0x00000002	/* 0 = Digital audio, 1 = not audio		*/
+#define SPCS_PROFESSIONAL	0x00000001	/* 0 = Consumer (IEC-958), 1 = pro (AES3-1992)	*/
+
+#define SPDIF_SELECT		0x45		/* Enables SPDIF or Analogue outputs 0-Analogue, 0x700-SPDIF */
+
+/* This is the MPU port on the card                      					*/
+#define MUDATA		0x47
+#define MUCMD		0x48
+#define MUSTAT		MUCMD
+
+/* From 0x50 - 0x5f, last samples captured */
+
+/**
+ * The hardware has 3 channels for playback and 1 for capture.
+ *  - channel 0 is the front channel
+ *  - channel 1 is the rear channel
+ *  - channel 2 is the center/lfe chanel
+ * Volume is controlled by the AC97 for the front and rear channels by
+ * the PCM Playback Volume, Sigmatel Surround Playback Volume and 
+ * Surround Playback Volume. The Sigmatel 4-Speaker Stereo switch affects
+ * the front/rear channel mixing in the REAR OUT jack. When using the
+ * 4-Speaker Stereo, both front and rear channels will be mixed in the
+ * REAR OUT.
+ * The center/lfe channel has no volume control and cannot be muted during
+ * playback.
+ */
+
+typedef struct snd_emu10k1x_voice emu10k1x_voice_t;
+typedef struct snd_emu10k1x emu10k1x_t;
+typedef struct snd_emu10k1x_pcm emu10k1x_pcm_t;
+
+struct snd_emu10k1x_voice {
+	emu10k1x_t *emu;
+	int number;
+	int use;
+  
+	emu10k1x_pcm_t *epcm;
+};
+
+struct snd_emu10k1x_pcm {
+	emu10k1x_t *emu;
+	snd_pcm_substream_t *substream;
+	emu10k1x_voice_t *voice;
+	unsigned short running;
+};
+
+typedef struct {
+	struct snd_emu10k1x *emu;
+	snd_rawmidi_t *rmidi;
+	snd_rawmidi_substream_t *substream_input;
+	snd_rawmidi_substream_t *substream_output;
+	unsigned int midi_mode;
+	spinlock_t input_lock;
+	spinlock_t output_lock;
+	spinlock_t open_lock;
+	int tx_enable, rx_enable;
+	int port;
+	int ipr_tx, ipr_rx;
+	void (*interrupt)(emu10k1x_t *emu, unsigned int status);
+} emu10k1x_midi_t;
+
+// definition of the chip-specific record
+struct snd_emu10k1x {
+	snd_card_t *card;
+	struct pci_dev *pci;
+
+	unsigned long port;
+	struct resource *res_port;
+	int irq;
+
+	unsigned int revision;		/* chip revision */
+	unsigned int serial;            /* serial number */
+	unsigned short model;		/* subsystem id */
+
+	spinlock_t emu_lock;
+	spinlock_t voice_lock;
+
+	ac97_t *ac97;
+	snd_pcm_t *pcm;
+
+	emu10k1x_voice_t voices[3];
+	emu10k1x_voice_t capture_voice;
+	u32 spdif_bits[3]; // SPDIF out setup
+
+	struct snd_dma_buffer dma_buffer;
+
+	emu10k1x_midi_t midi;
+};
+
+/* hardware definition */
+static snd_pcm_hardware_t snd_emu10k1x_playback_hw = {
+	.info =			(SNDRV_PCM_INFO_MMAP | 
+				 SNDRV_PCM_INFO_INTERLEAVED |
+				 SNDRV_PCM_INFO_BLOCK_TRANSFER |
+				 SNDRV_PCM_INFO_MMAP_VALID),
+	.formats =		SNDRV_PCM_FMTBIT_S16_LE,
+	.rates =		SNDRV_PCM_RATE_48000,
+	.rate_min =		48000,
+	.rate_max =		48000,
+	.channels_min =		2,
+	.channels_max =		2,
+	.buffer_bytes_max =	(32*1024),
+	.period_bytes_min =	64,
+	.period_bytes_max =	(16*1024),
+	.periods_min =		2,
+	.periods_max =		8,
+	.fifo_size =		0,
+};
+
+static snd_pcm_hardware_t snd_emu10k1x_capture_hw = {
+	.info =			(SNDRV_PCM_INFO_MMAP | 
+				 SNDRV_PCM_INFO_INTERLEAVED |
+				 SNDRV_PCM_INFO_BLOCK_TRANSFER |
+				 SNDRV_PCM_INFO_MMAP_VALID),
+	.formats =		SNDRV_PCM_FMTBIT_S16_LE,
+	.rates =		SNDRV_PCM_RATE_48000,
+	.rate_min =		48000,
+	.rate_max =		48000,
+	.channels_min =		2,
+	.channels_max =		2,
+	.buffer_bytes_max =	(32*1024),
+	.period_bytes_min =	64,
+	.period_bytes_max =	(16*1024),
+	.periods_min =		2,
+	.periods_max =		2,
+	.fifo_size =		0,
+};
+
+static unsigned int snd_emu10k1x_ptr_read(emu10k1x_t * emu, 
+					  unsigned int reg, 
+					  unsigned int chn)
+{
+	unsigned long flags;
+	unsigned int regptr, val;
+  
+	regptr = (reg << 16) | chn;
+
+	spin_lock_irqsave(&emu->emu_lock, flags);
+	outl(regptr, emu->port + PTR);
+	val = inl(emu->port + DATA);
+	spin_unlock_irqrestore(&emu->emu_lock, flags);
+	return val;
+}
+
+static void snd_emu10k1x_ptr_write(emu10k1x_t *emu, 
+				   unsigned int reg, 
+				   unsigned int chn, 
+				   unsigned int data)
+{
+	unsigned int regptr;
+	unsigned long flags;
+
+	regptr = (reg << 16) | chn;
+
+	spin_lock_irqsave(&emu->emu_lock, flags);
+	outl(regptr, emu->port + PTR);
+	outl(data, emu->port + DATA);
+	spin_unlock_irqrestore(&emu->emu_lock, flags);
+}
+
+static void snd_emu10k1x_intr_enable(emu10k1x_t *emu, unsigned int intrenb)
+{
+	unsigned long flags;
+	unsigned int enable;
+  
+	spin_lock_irqsave(&emu->emu_lock, flags);
+	enable = inl(emu->port + INTE) | intrenb;
+	outl(enable, emu->port + INTE);
+	spin_unlock_irqrestore(&emu->emu_lock, flags);
+}
+
+static void snd_emu10k1x_intr_disable(emu10k1x_t *emu, unsigned int intrenb)
+{
+	unsigned long flags;
+	unsigned int enable;
+  
+	spin_lock_irqsave(&emu->emu_lock, flags);
+	enable = inl(emu->port + INTE) & ~intrenb;
+	outl(enable, emu->port + INTE);
+	spin_unlock_irqrestore(&emu->emu_lock, flags);
+}
+
+static void snd_emu10k1x_gpio_write(emu10k1x_t *emu, unsigned int value)
+{
+	unsigned long flags;
+
+	spin_lock_irqsave(&emu->emu_lock, flags);
+	outl(value, emu->port + GPIO);
+	spin_unlock_irqrestore(&emu->emu_lock, flags);
+}
+
+static void snd_emu10k1x_pcm_free_substream(snd_pcm_runtime_t *runtime)
+{
+	emu10k1x_pcm_t *epcm = runtime->private_data;
+  
+	if (epcm)
+		kfree(epcm);
+}
+
+static void snd_emu10k1x_pcm_interrupt(emu10k1x_t *emu, emu10k1x_voice_t *voice)
+{
+	emu10k1x_pcm_t *epcm;
+
+	if ((epcm = voice->epcm) == NULL)
+		return;
+	if (epcm->substream == NULL)
+		return;
+#if 0
+	snd_printk(KERN_INFO "IRQ: position = 0x%x, period = 0x%x, size = 0x%x\n",
+		   epcm->substream->ops->pointer(epcm->substream),
+		   snd_pcm_lib_period_bytes(epcm->substream),
+		   snd_pcm_lib_buffer_bytes(epcm->substream));
+#endif
+	snd_pcm_period_elapsed(epcm->substream);
+}
+
+/* open callback */
+static int snd_emu10k1x_playback_open(snd_pcm_substream_t *substream)
+{
+	emu10k1x_t *chip = snd_pcm_substream_chip(substream);
+	emu10k1x_pcm_t *epcm;
+	snd_pcm_runtime_t *runtime = substream->runtime;
+	int err;
+
+	if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0) {
+		return err;
+	}
+	if ((err = snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, 64)) < 0)
+                return err;
+
+	epcm = kcalloc(1, sizeof(*epcm), GFP_KERNEL);
+	if (epcm == NULL)
+		return -ENOMEM;
+	epcm->emu = chip;
+	epcm->substream = substream;
+  
+	runtime->private_data = epcm;
+	runtime->private_free = snd_emu10k1x_pcm_free_substream;
+  
+	runtime->hw = snd_emu10k1x_playback_hw;
+
+	return 0;
+}
+
+/* close callback */
+static int snd_emu10k1x_playback_close(snd_pcm_substream_t *substream)
+{
+	return 0;
+}
+
+/* hw_params callback */
+static int snd_emu10k1x_pcm_hw_params(snd_pcm_substream_t *substream,
+				      snd_pcm_hw_params_t * hw_params)
+{
+	snd_pcm_runtime_t *runtime = substream->runtime;
+	emu10k1x_pcm_t *epcm = runtime->private_data;
+
+	if (! epcm->voice) {
+		epcm->voice = &epcm->emu->voices[substream->pcm->device];
+		epcm->voice->use = 1;
+		epcm->voice->epcm = epcm;
+	}
+
+	return snd_pcm_lib_malloc_pages(substream,
+					params_buffer_bytes(hw_params));
+}
+
+/* hw_free callback */
+static int snd_emu10k1x_pcm_hw_free(snd_pcm_substream_t *substream)
+{
+	snd_pcm_runtime_t *runtime = substream->runtime;
+	emu10k1x_pcm_t *epcm;
+
+	if (runtime->private_data == NULL)
+		return 0;
+	
+	epcm = runtime->private_data;
+
+	if (epcm->voice) {
+		epcm->voice->use = 0;
+		epcm->voice->epcm = NULL;
+		epcm->voice = NULL;
+	}
+
+	return snd_pcm_lib_free_pages(substream);
+}
+
+/* prepare callback */
+static int snd_emu10k1x_pcm_prepare(snd_pcm_substream_t *substream)
+{
+	emu10k1x_t *emu = snd_pcm_substream_chip(substream);
+	snd_pcm_runtime_t *runtime = substream->runtime;
+	emu10k1x_pcm_t *epcm = runtime->private_data;
+	int voice = epcm->voice->number;
+	u32 *table_base = (u32 *)(emu->dma_buffer.area+1024*voice);
+	u32 period_size_bytes = frames_to_bytes(runtime, runtime->period_size);
+	int i;
+	
+	for(i=0; i < runtime->periods; i++) {
+		*table_base++=runtime->dma_addr+(i*period_size_bytes);
+		*table_base++=period_size_bytes<<16;
+	}
+
+	snd_emu10k1x_ptr_write(emu, PLAYBACK_LIST_ADDR, voice, emu->dma_buffer.addr+1024*voice);
+	snd_emu10k1x_ptr_write(emu, PLAYBACK_LIST_SIZE, voice, (runtime->periods - 1) << 19);
+	snd_emu10k1x_ptr_write(emu, PLAYBACK_LIST_PTR, voice, 0);
+	snd_emu10k1x_ptr_write(emu, PLAYBACK_POINTER, voice, 0);
+	snd_emu10k1x_ptr_write(emu, PLAYBACK_UNKNOWN1, voice, 0);
+	snd_emu10k1x_ptr_write(emu, PLAYBACK_UNKNOWN2, voice, 0);
+	snd_emu10k1x_ptr_write(emu, PLAYBACK_DMA_ADDR, voice, runtime->dma_addr);
+
+	snd_emu10k1x_ptr_write(emu, PLAYBACK_PERIOD_SIZE, voice, frames_to_bytes(runtime, runtime->period_size)<<16);
+
+	return 0;
+}
+
+/* trigger callback */
+static int snd_emu10k1x_pcm_trigger(snd_pcm_substream_t *substream,
+				    int cmd)
+{
+	emu10k1x_t *emu = snd_pcm_substream_chip(substream);
+	snd_pcm_runtime_t *runtime = substream->runtime;
+	emu10k1x_pcm_t *epcm = runtime->private_data;
+	int channel = epcm->voice->number;
+	int result = 0;
+
+//	snd_printk(KERN_INFO "trigger - emu10k1x = 0x%x, cmd = %i, pointer = %d\n", (int)emu, cmd, (int)substream->ops->pointer(substream));
+
+	switch (cmd) {
+	case SNDRV_PCM_TRIGGER_START:
+		if(runtime->periods == 2)
+			snd_emu10k1x_intr_enable(emu, (INTE_CH_0_LOOP | INTE_CH_0_HALF_LOOP) << channel);
+		else
+			snd_emu10k1x_intr_enable(emu, INTE_CH_0_LOOP << channel);
+		epcm->running = 1;
+		snd_emu10k1x_ptr_write(emu, TRIGGER_CHANNEL, 0, snd_emu10k1x_ptr_read(emu, TRIGGER_CHANNEL, 0)|(TRIGGER_CHANNEL_0<<channel));
+		break;
+	case SNDRV_PCM_TRIGGER_STOP:
+		epcm->running = 0;
+		snd_emu10k1x_intr_disable(emu, (INTE_CH_0_LOOP | INTE_CH_0_HALF_LOOP) << channel);
+		snd_emu10k1x_ptr_write(emu, TRIGGER_CHANNEL, 0, snd_emu10k1x_ptr_read(emu, TRIGGER_CHANNEL, 0) & ~(TRIGGER_CHANNEL_0<<channel));
+		break;
+	default:
+		result = -EINVAL;
+		break;
+	}
+	return result;
+}
+
+/* pointer callback */
+static snd_pcm_uframes_t
+snd_emu10k1x_pcm_pointer(snd_pcm_substream_t *substream)
+{
+	emu10k1x_t *emu = snd_pcm_substream_chip(substream);
+	snd_pcm_runtime_t *runtime = substream->runtime;
+	emu10k1x_pcm_t *epcm = runtime->private_data;
+	int channel = epcm->voice->number;
+	snd_pcm_uframes_t ptr = 0, ptr1 = 0, ptr2= 0,ptr3 = 0,ptr4 = 0;
+
+	if (!epcm->running)
+		return 0;
+
+	ptr3 = snd_emu10k1x_ptr_read(emu, PLAYBACK_LIST_PTR, channel);
+	ptr1 = snd_emu10k1x_ptr_read(emu, PLAYBACK_POINTER, channel);
+	ptr4 = snd_emu10k1x_ptr_read(emu, PLAYBACK_LIST_PTR, channel);
+
+	if(ptr4 == 0 && ptr1 == frames_to_bytes(runtime, runtime->buffer_size))
+		return 0;
+	
+	if (ptr3 != ptr4) 
+		ptr1 = snd_emu10k1x_ptr_read(emu, PLAYBACK_POINTER, channel);
+	ptr2 = bytes_to_frames(runtime, ptr1);
+	ptr2 += (ptr4 >> 3) * runtime->period_size;
+	ptr = ptr2;
+
+	if (ptr >= runtime->buffer_size)
+		ptr -= runtime->buffer_size;
+
+	return ptr;
+}
+
+/* operators */
+static snd_pcm_ops_t snd_emu10k1x_playback_ops = {
+	.open =        snd_emu10k1x_playback_open,
+	.close =       snd_emu10k1x_playback_close,
+	.ioctl =       snd_pcm_lib_ioctl,
+	.hw_params =   snd_emu10k1x_pcm_hw_params,
+	.hw_free =     snd_emu10k1x_pcm_hw_free,
+	.prepare =     snd_emu10k1x_pcm_prepare,
+	.trigger =     snd_emu10k1x_pcm_trigger,
+	.pointer =     snd_emu10k1x_pcm_pointer,
+};
+
+/* open_capture callback */
+static int snd_emu10k1x_pcm_open_capture(snd_pcm_substream_t *substream)
+{
+	emu10k1x_t *chip = snd_pcm_substream_chip(substream);
+	emu10k1x_pcm_t *epcm;
+	snd_pcm_runtime_t *runtime = substream->runtime;
+	int err;
+
+	if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0)
+                return err;
+	if ((err = snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, 64)) < 0)
+                return err;
+
+	epcm = kcalloc(1, sizeof(*epcm), GFP_KERNEL);
+	if (epcm == NULL)
+		return -ENOMEM;
+
+	epcm->emu = chip;
+	epcm->substream = substream;
+
+	runtime->private_data = epcm;
+	runtime->private_free = snd_emu10k1x_pcm_free_substream;
+
+	runtime->hw = snd_emu10k1x_capture_hw;
+
+	return 0;
+}
+
+/* close callback */
+static int snd_emu10k1x_pcm_close_capture(snd_pcm_substream_t *substream)
+{
+	return 0;
+}
+
+/* hw_params callback */
+static int snd_emu10k1x_pcm_hw_params_capture(snd_pcm_substream_t *substream,
+					      snd_pcm_hw_params_t * hw_params)
+{
+	snd_pcm_runtime_t *runtime = substream->runtime;
+	emu10k1x_pcm_t *epcm = runtime->private_data;
+
+	if (! epcm->voice) {
+		if (epcm->emu->capture_voice.use)
+			return -EBUSY;
+		epcm->voice = &epcm->emu->capture_voice;
+		epcm->voice->epcm = epcm;
+		epcm->voice->use = 1;
+	}
+
+	return snd_pcm_lib_malloc_pages(substream,
+					params_buffer_bytes(hw_params));
+}
+
+/* hw_free callback */
+static int snd_emu10k1x_pcm_hw_free_capture(snd_pcm_substream_t *substream)
+{
+	snd_pcm_runtime_t *runtime = substream->runtime;
+
+	emu10k1x_pcm_t *epcm;
+
+	if (runtime->private_data == NULL)
+		return 0;
+	epcm = runtime->private_data;
+
+	if (epcm->voice) {
+		epcm->voice->use = 0;
+		epcm->voice->epcm = NULL;
+		epcm->voice = NULL;
+	}
+
+	return snd_pcm_lib_free_pages(substream);
+}
+
+/* prepare capture callback */
+static int snd_emu10k1x_pcm_prepare_capture(snd_pcm_substream_t *substream)
+{
+	emu10k1x_t *emu = snd_pcm_substream_chip(substream);
+	snd_pcm_runtime_t *runtime = substream->runtime;
+
+	snd_emu10k1x_ptr_write(emu, CAPTURE_DMA_ADDR, 0, runtime->dma_addr);
+	snd_emu10k1x_ptr_write(emu, CAPTURE_BUFFER_SIZE, 0, frames_to_bytes(runtime, runtime->buffer_size)<<16); // buffer size in bytes
+	snd_emu10k1x_ptr_write(emu, CAPTURE_POINTER, 0, 0);
+	snd_emu10k1x_ptr_write(emu, CAPTURE_UNKNOWN, 0, 0);
+
+	return 0;
+}
+
+/* trigger_capture callback */
+static int snd_emu10k1x_pcm_trigger_capture(snd_pcm_substream_t *substream,
+					    int cmd)
+{
+	emu10k1x_t *emu = snd_pcm_substream_chip(substream);
+	snd_pcm_runtime_t *runtime = substream->runtime;
+	emu10k1x_pcm_t *epcm = runtime->private_data;
+	int result = 0;
+
+	switch (cmd) {
+	case SNDRV_PCM_TRIGGER_START:
+		snd_emu10k1x_intr_enable(emu, INTE_CAP_0_LOOP | 
+					 INTE_CAP_0_HALF_LOOP);
+		snd_emu10k1x_ptr_write(emu, TRIGGER_CHANNEL, 0, snd_emu10k1x_ptr_read(emu, TRIGGER_CHANNEL, 0)|TRIGGER_CAPTURE);
+		epcm->running = 1;
+		break;
+	case SNDRV_PCM_TRIGGER_STOP:
+		epcm->running = 0;
+		snd_emu10k1x_intr_disable(emu, INTE_CAP_0_LOOP | 
+					  INTE_CAP_0_HALF_LOOP);
+		snd_emu10k1x_ptr_write(emu, TRIGGER_CHANNEL, 0, snd_emu10k1x_ptr_read(emu, TRIGGER_CHANNEL, 0) & ~(TRIGGER_CAPTURE));
+		break;
+	default:
+		result = -EINVAL;
+		break;
+	}
+	return result;
+}
+
+/* pointer_capture callback */
+static snd_pcm_uframes_t
+snd_emu10k1x_pcm_pointer_capture(snd_pcm_substream_t *substream)
+{
+	emu10k1x_t *emu = snd_pcm_substream_chip(substream);
+	snd_pcm_runtime_t *runtime = substream->runtime;
+	emu10k1x_pcm_t *epcm = runtime->private_data;
+	snd_pcm_uframes_t ptr;
+
+	if (!epcm->running)
+		return 0;
+
+	ptr = bytes_to_frames(runtime, snd_emu10k1x_ptr_read(emu, CAPTURE_POINTER, 0));
+	if (ptr >= runtime->buffer_size)
+		ptr -= runtime->buffer_size;
+
+	return ptr;
+}
+
+static snd_pcm_ops_t snd_emu10k1x_capture_ops = {
+	.open =        snd_emu10k1x_pcm_open_capture,
+	.close =       snd_emu10k1x_pcm_close_capture,
+	.ioctl =       snd_pcm_lib_ioctl,
+	.hw_params =   snd_emu10k1x_pcm_hw_params_capture,
+	.hw_free =     snd_emu10k1x_pcm_hw_free_capture,
+	.prepare =     snd_emu10k1x_pcm_prepare_capture,
+	.trigger =     snd_emu10k1x_pcm_trigger_capture,
+	.pointer =     snd_emu10k1x_pcm_pointer_capture,
+};
+
+static unsigned short snd_emu10k1x_ac97_read(ac97_t *ac97,
+					     unsigned short reg)
+{
+	emu10k1x_t *emu = ac97->private_data;
+	unsigned long flags;
+	unsigned short val;
+  
+	spin_lock_irqsave(&emu->emu_lock, flags);
+	outb(reg, emu->port + AC97ADDRESS);
+	val = inw(emu->port + AC97DATA);
+	spin_unlock_irqrestore(&emu->emu_lock, flags);
+	return val;
+}
+
+static void snd_emu10k1x_ac97_write(ac97_t *ac97,
+				    unsigned short reg, unsigned short val)
+{
+	emu10k1x_t *emu = ac97->private_data;
+	unsigned long flags;
+  
+	spin_lock_irqsave(&emu->emu_lock, flags);
+	outb(reg, emu->port + AC97ADDRESS);
+	outw(val, emu->port + AC97DATA);
+	spin_unlock_irqrestore(&emu->emu_lock, flags);
+}
+
+static int snd_emu10k1x_ac97(emu10k1x_t *chip)
+{
+	ac97_bus_t *pbus;
+	ac97_template_t ac97;
+	int err;
+	static ac97_bus_ops_t ops = {
+		.write = snd_emu10k1x_ac97_write,
+		.read = snd_emu10k1x_ac97_read,
+	};
+  
+	if ((err = snd_ac97_bus(chip->card, 0, &ops, NULL, &pbus)) < 0)
+		return err;
+	pbus->no_vra = 1; /* we don't need VRA */
+
+	memset(&ac97, 0, sizeof(ac97));
+	ac97.private_data = chip;
+	return snd_ac97_mixer(pbus, &ac97, &chip->ac97);
+}
+
+static int snd_emu10k1x_free(emu10k1x_t *chip)
+{
+	snd_emu10k1x_ptr_write(chip, TRIGGER_CHANNEL, 0, 0);
+	// disable interrupts
+	outl(0, chip->port + INTE);
+	// disable audio
+	outl(HCFG_LOCKSOUNDCACHE, chip->port + HCFG);
+
+	// release the i/o port
+	if (chip->res_port) {
+		release_resource(chip->res_port);
+		kfree_nocheck(chip->res_port);
+	}
+	// release the irq
+	if (chip->irq >= 0)
+		free_irq(chip->irq, (void *)chip);
+
+	// release the DMA
+	if (chip->dma_buffer.area) {
+		snd_dma_free_pages(&chip->dma_buffer);
+	}
+
+	pci_disable_device(chip->pci);
+
+	// release the data
+	kfree(chip);
+	return 0;
+}
+
+static int snd_emu10k1x_dev_free(snd_device_t *device)
+{
+	emu10k1x_t *chip = device->device_data;
+	return snd_emu10k1x_free(chip);
+}
+
+static irqreturn_t snd_emu10k1x_interrupt(int irq, void *dev_id,
+					  struct pt_regs *regs)
+{
+	unsigned int status;
+
+	emu10k1x_t *chip = dev_id;
+	emu10k1x_voice_t *pvoice = chip->voices;
+	int i;
+	int mask;
+
+	status = inl(chip->port + IPR);
+
+	if(status) {
+		// capture interrupt
+		if(status & (IPR_CAP_0_LOOP | IPR_CAP_0_HALF_LOOP)) {
+			emu10k1x_voice_t *pvoice = &chip->capture_voice;
+			if(pvoice->use)
+				snd_emu10k1x_pcm_interrupt(chip, pvoice);
+			else
+				snd_emu10k1x_intr_disable(chip, 
+							  INTE_CAP_0_LOOP |
+							  INTE_CAP_0_HALF_LOOP);
+		}
+		
+		mask = IPR_CH_0_LOOP|IPR_CH_0_HALF_LOOP;
+		for(i = 0; i < 3; i++) {
+			if(status & mask) {
+				if(pvoice->use)
+					snd_emu10k1x_pcm_interrupt(chip, pvoice);
+				else 
+					snd_emu10k1x_intr_disable(chip, mask);
+			}
+			pvoice++;
+			mask <<= 1;
+		}
+		
+		if (status & (IPR_MIDITRANSBUFEMPTY|IPR_MIDIRECVBUFEMPTY)) {
+			if (chip->midi.interrupt)
+				chip->midi.interrupt(chip, status);
+			else
+				snd_emu10k1x_intr_disable(chip, INTE_MIDITXENABLE|INTE_MIDIRXENABLE);
+		}
+		
+		// acknowledge the interrupt if necessary
+		if(status)
+			outl(status, chip->port+IPR);
+
+//		snd_printk(KERN_INFO "interrupt %08x\n", status);
+	}
+
+	return IRQ_HANDLED;
+}
+
+static void snd_emu10k1x_pcm_free(snd_pcm_t *pcm)
+{
+	emu10k1x_t *emu = pcm->private_data;
+	emu->pcm = NULL;
+	snd_pcm_lib_preallocate_free_for_all(pcm);
+}
+
+static int __devinit snd_emu10k1x_pcm(emu10k1x_t *emu, int device, snd_pcm_t **rpcm)
+{
+	snd_pcm_t *pcm;
+	int err;
+	int capture = 0;
+  
+	if (rpcm)
+		*rpcm = NULL;
+	if (device == 0)
+		capture = 1;
+	
+	if ((err = snd_pcm_new(emu->card, "emu10k1x", device, 1, capture, &pcm)) < 0)
+		return err;
+  
+	pcm->private_data = emu;
+	pcm->private_free = snd_emu10k1x_pcm_free;
+	
+	switch(device) {
+	case 0:
+		snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_emu10k1x_playback_ops);
+		snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_emu10k1x_capture_ops);
+		break;
+	case 1:
+	case 2:
+		snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_emu10k1x_playback_ops);
+		break;
+	}
+
+	pcm->info_flags = 0;
+	pcm->dev_subclass = SNDRV_PCM_SUBCLASS_GENERIC_MIX;
+	switch(device) {
+	case 0:
+		strcpy(pcm->name, "EMU10K1X Front");
+		break;
+	case 1:
+		strcpy(pcm->name, "EMU10K1X Rear");
+		break;
+	case 2:
+		strcpy(pcm->name, "EMU10K1X Center/LFE");
+		break;
+	}
+	emu->pcm = pcm;
+
+	snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
+					      snd_dma_pci_data(emu->pci), 
+					      32*1024, 32*1024);
+  
+	if (rpcm)
+		*rpcm = pcm;
+  
+	return 0;
+}
+
+static int __devinit snd_emu10k1x_create(snd_card_t *card,
+					 struct pci_dev *pci,
+					 emu10k1x_t **rchip)
+{
+	emu10k1x_t *chip;
+	int err;
+	int ch;
+	static snd_device_ops_t ops = {
+		.dev_free = snd_emu10k1x_dev_free,
+	};
+  
+	*rchip = NULL;
+  
+	if ((err = pci_enable_device(pci)) < 0)
+		return err;
+	if (pci_set_dma_mask(pci, 0x0fffffff) < 0 ||
+	    pci_set_consistent_dma_mask(pci, 0x0fffffff) < 0) {
+		snd_printk(KERN_ERR "error to set 28bit mask DMA\n");
+		pci_disable_device(pci);
+		return -ENXIO;
+	}
+  
+	chip = kcalloc(1, sizeof(*chip), GFP_KERNEL);
+	if (chip == NULL) {
+		pci_disable_device(pci);
+		return -ENOMEM;
+	}
+  
+	chip->card = card;
+	chip->pci = pci;
+	chip->irq = -1;
+
+	spin_lock_init(&chip->emu_lock);
+	spin_lock_init(&chip->voice_lock);
+  
+	chip->port = pci_resource_start(pci, 0);
+	if ((chip->res_port = request_region(chip->port, 8,
+					     "EMU10K1X")) == NULL) { 
+		snd_printk(KERN_ERR "emu10k1x: cannot allocate the port 0x%lx\n", chip->port);
+		snd_emu10k1x_free(chip);
+		return -EBUSY;
+	}
+
+	if (request_irq(pci->irq, snd_emu10k1x_interrupt,
+			SA_INTERRUPT|SA_SHIRQ, "EMU10K1X",
+			(void *)chip)) {
+		snd_printk(KERN_ERR "emu10k1x: cannot grab irq %d\n", pci->irq);
+		snd_emu10k1x_free(chip);
+		return -EBUSY;
+	}
+	chip->irq = pci->irq;
+  
+	if(snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci),
+			       4 * 1024, &chip->dma_buffer) < 0) {
+		snd_emu10k1x_free(chip);
+		return -ENOMEM;
+	}
+
+	pci_set_master(pci);
+	/* read revision & serial */
+	pci_read_config_byte(pci, PCI_REVISION_ID, (char *)&chip->revision);
+	pci_read_config_dword(pci, PCI_SUBSYSTEM_VENDOR_ID, &chip->serial);
+	pci_read_config_word(pci, PCI_SUBSYSTEM_ID, &chip->model);
+	snd_printk(KERN_INFO "Model %04x Rev %08x Serial %08x\n", chip->model,
+		   chip->revision, chip->serial);
+
+	outl(0, chip->port + INTE);	
+
+	for(ch = 0; ch < 3; ch++) {
+		chip->voices[ch].emu = chip;
+		chip->voices[ch].number = ch;
+	}
+
+	/*
+	 *  Init to 0x02109204 :
+	 *  Clock accuracy    = 0     (1000ppm)
+	 *  Sample Rate       = 2     (48kHz)
+	 *  Audio Channel     = 1     (Left of 2)
+	 *  Source Number     = 0     (Unspecified)
+	 *  Generation Status = 1     (Original for Cat Code 12)
+	 *  Cat Code          = 12    (Digital Signal Mixer)
+	 *  Mode              = 0     (Mode 0)
+	 *  Emphasis          = 0     (None)
+	 *  CP                = 1     (Copyright unasserted)
+	 *  AN                = 0     (Audio data)
+	 *  P                 = 0     (Consumer)
+	 */
+	snd_emu10k1x_ptr_write(chip, SPCS0, 0,
+			       chip->spdif_bits[0] = 
+			       SPCS_CLKACCY_1000PPM | SPCS_SAMPLERATE_48 |
+			       SPCS_CHANNELNUM_LEFT | SPCS_SOURCENUM_UNSPEC |
+			       SPCS_GENERATIONSTATUS | 0x00001200 |
+			       0x00000000 | SPCS_EMPHASIS_NONE | SPCS_COPYRIGHT);
+	snd_emu10k1x_ptr_write(chip, SPCS1, 0,
+			       chip->spdif_bits[1] = 
+			       SPCS_CLKACCY_1000PPM | SPCS_SAMPLERATE_48 |
+			       SPCS_CHANNELNUM_LEFT | SPCS_SOURCENUM_UNSPEC |
+			       SPCS_GENERATIONSTATUS | 0x00001200 |
+			       0x00000000 | SPCS_EMPHASIS_NONE | SPCS_COPYRIGHT);
+	snd_emu10k1x_ptr_write(chip, SPCS2, 0,
+			       chip->spdif_bits[2] = 
+			       SPCS_CLKACCY_1000PPM | SPCS_SAMPLERATE_48 |
+			       SPCS_CHANNELNUM_LEFT | SPCS_SOURCENUM_UNSPEC |
+			       SPCS_GENERATIONSTATUS | 0x00001200 |
+			       0x00000000 | SPCS_EMPHASIS_NONE | SPCS_COPYRIGHT);
+
+	snd_emu10k1x_ptr_write(chip, SPDIF_SELECT, 0, 0x700); // disable SPDIF
+	snd_emu10k1x_ptr_write(chip, ROUTING, 0, 0x1003F); // routing
+	snd_emu10k1x_gpio_write(chip, 0x1080); // analog mode
+
+	outl(HCFG_LOCKSOUNDCACHE|HCFG_AUDIOENABLE, chip->port+HCFG);
+
+	if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL,
+				  chip, &ops)) < 0) {
+		snd_emu10k1x_free(chip);
+		return err;
+	}
+	*rchip = chip;
+	return 0;
+}
+
+static void snd_emu10k1x_proc_reg_read(snd_info_entry_t *entry, 
+				       snd_info_buffer_t * buffer)
+{
+	emu10k1x_t *emu = entry->private_data;
+	unsigned long value,value1,value2;
+	unsigned long flags;
+	int i;
+
+	snd_iprintf(buffer, "Registers:\n\n");
+	for(i = 0; i < 0x20; i+=4) {
+		spin_lock_irqsave(&emu->emu_lock, flags);
+		value = inl(emu->port + i);
+		spin_unlock_irqrestore(&emu->emu_lock, flags);
+		snd_iprintf(buffer, "Register %02X: %08lX\n", i, value);
+	}
+	snd_iprintf(buffer, "\nRegisters\n\n");
+	for(i = 0; i <= 0x48; i++) {
+		value = snd_emu10k1x_ptr_read(emu, i, 0);
+		if(i < 0x10 || (i >= 0x20 && i < 0x40)) {
+			value1 = snd_emu10k1x_ptr_read(emu, i, 1);
+			value2 = snd_emu10k1x_ptr_read(emu, i, 2);
+			snd_iprintf(buffer, "%02X: %08lX %08lX %08lX\n", i, value, value1, value2);
+		} else {
+			snd_iprintf(buffer, "%02X: %08lX\n", i, value);
+		}
+	}
+}
+
+static void snd_emu10k1x_proc_reg_write(snd_info_entry_t *entry, 
+					snd_info_buffer_t *buffer)
+{
+	emu10k1x_t *emu = entry->private_data;
+	char line[64];
+	unsigned int reg, channel_id , val;
+
+	while (!snd_info_get_line(buffer, line, sizeof(line))) {
+		if (sscanf(line, "%x %x %x", &reg, &channel_id, &val) != 3)
+			continue;
+
+		if ((reg < 0x49) && (reg >=0) && (val <= 0xffffffff) 
+		    && (channel_id >=0) && (channel_id <= 2) )
+			snd_emu10k1x_ptr_write(emu, reg, channel_id, val);
+	}
+}
+
+static int __devinit snd_emu10k1x_proc_init(emu10k1x_t * emu)
+{
+	snd_info_entry_t *entry;
+	
+	if(! snd_card_proc_new(emu->card, "emu10k1x_regs", &entry)) {
+		snd_info_set_text_ops(entry, emu, 1024, snd_emu10k1x_proc_reg_read);
+		entry->c.text.write_size = 64;
+		entry->c.text.write = snd_emu10k1x_proc_reg_write;
+		entry->private_data = emu;
+	}
+	
+	return 0;
+}
+
+static int snd_emu10k1x_shared_spdif_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+{
+	uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
+	uinfo->count = 1;
+	uinfo->value.integer.min = 0;
+	uinfo->value.integer.max = 1;
+	return 0;
+}
+
+static int snd_emu10k1x_shared_spdif_get(snd_kcontrol_t * kcontrol,
+					 snd_ctl_elem_value_t * ucontrol)
+{
+	emu10k1x_t *emu = snd_kcontrol_chip(kcontrol);
+
+	ucontrol->value.integer.value[0] = (snd_emu10k1x_ptr_read(emu, SPDIF_SELECT, 0) == 0x700) ? 0 : 1;
+
+	return 0;
+}
+
+static int snd_emu10k1x_shared_spdif_put(snd_kcontrol_t * kcontrol,
+					 snd_ctl_elem_value_t * ucontrol)
+{
+	emu10k1x_t *emu = snd_kcontrol_chip(kcontrol);
+	unsigned int val;
+	int change = 0;
+
+	val = ucontrol->value.integer.value[0] ;
+
+	if (val) {
+		// enable spdif output
+		snd_emu10k1x_ptr_write(emu, SPDIF_SELECT, 0, 0x000);
+		snd_emu10k1x_ptr_write(emu, ROUTING, 0, 0x700);
+		snd_emu10k1x_gpio_write(emu, 0x1000);
+	} else {
+		// disable spdif output
+		snd_emu10k1x_ptr_write(emu, SPDIF_SELECT, 0, 0x700);
+		snd_emu10k1x_ptr_write(emu, ROUTING, 0, 0x1003F);
+		snd_emu10k1x_gpio_write(emu, 0x1080);
+	}
+	return change;
+}
+
+static snd_kcontrol_new_t snd_emu10k1x_shared_spdif __devinitdata =
+{
+	.iface =	SNDRV_CTL_ELEM_IFACE_MIXER,
+	.name =		"Analog/Digital Output Jack",
+	.info =		snd_emu10k1x_shared_spdif_info,
+	.get =		snd_emu10k1x_shared_spdif_get,
+	.put =		snd_emu10k1x_shared_spdif_put
+};
+
+static int snd_emu10k1x_spdif_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+{
+	uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
+	uinfo->count = 1;
+	return 0;
+}
+
+static int snd_emu10k1x_spdif_get(snd_kcontrol_t * kcontrol,
+				  snd_ctl_elem_value_t * ucontrol)
+{
+	emu10k1x_t *emu = snd_kcontrol_chip(kcontrol);
+	unsigned int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);
+
+	ucontrol->value.iec958.status[0] = (emu->spdif_bits[idx] >> 0) & 0xff;
+	ucontrol->value.iec958.status[1] = (emu->spdif_bits[idx] >> 8) & 0xff;
+	ucontrol->value.iec958.status[2] = (emu->spdif_bits[idx] >> 16) & 0xff;
+	ucontrol->value.iec958.status[3] = (emu->spdif_bits[idx] >> 24) & 0xff;
+	return 0;
+}
+
+static int snd_emu10k1x_spdif_get_mask(snd_kcontrol_t * kcontrol,
+				       snd_ctl_elem_value_t * ucontrol)
+{
+	ucontrol->value.iec958.status[0] = 0xff;
+	ucontrol->value.iec958.status[1] = 0xff;
+	ucontrol->value.iec958.status[2] = 0xff;
+	ucontrol->value.iec958.status[3] = 0xff;
+	return 0;
+}
+
+static int snd_emu10k1x_spdif_put(snd_kcontrol_t * kcontrol,
+				  snd_ctl_elem_value_t * ucontrol)
+{
+	emu10k1x_t *emu = snd_kcontrol_chip(kcontrol);
+	unsigned int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);
+	int change;
+	unsigned int val;
+
+	val = (ucontrol->value.iec958.status[0] << 0) |
+		(ucontrol->value.iec958.status[1] << 8) |
+		(ucontrol->value.iec958.status[2] << 16) |
+		(ucontrol->value.iec958.status[3] << 24);
+	change = val != emu->spdif_bits[idx];
+	if (change) {
+		snd_emu10k1x_ptr_write(emu, SPCS0 + idx, 0, val);
+		emu->spdif_bits[idx] = val;
+	}
+	return change;
+}
+
+static snd_kcontrol_new_t snd_emu10k1x_spdif_mask_control =
+{
+	.access =	SNDRV_CTL_ELEM_ACCESS_READ,
+	.iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
+	.name =         SNDRV_CTL_NAME_IEC958("",PLAYBACK,MASK),
+	.count =	3,
+	.info =         snd_emu10k1x_spdif_info,
+	.get =          snd_emu10k1x_spdif_get_mask
+};
+
+static snd_kcontrol_new_t snd_emu10k1x_spdif_control =
+{
+	.iface =	SNDRV_CTL_ELEM_IFACE_MIXER,
+	.name =         SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT),
+	.count =	3,
+	.info =         snd_emu10k1x_spdif_info,
+	.get =          snd_emu10k1x_spdif_get,
+	.put =          snd_emu10k1x_spdif_put
+};
+
+static int __devinit snd_emu10k1x_mixer(emu10k1x_t *emu)
+{
+	int err;
+	snd_kcontrol_t *kctl;
+	snd_card_t *card = emu->card;
+
+	if ((kctl = snd_ctl_new1(&snd_emu10k1x_spdif_mask_control, emu)) == NULL)
+		return -ENOMEM;
+	if ((err = snd_ctl_add(card, kctl)))
+		return err;
+	if ((kctl = snd_ctl_new1(&snd_emu10k1x_shared_spdif, emu)) == NULL)
+		return -ENOMEM;
+	if ((err = snd_ctl_add(card, kctl)))
+		return err;
+	if ((kctl = snd_ctl_new1(&snd_emu10k1x_spdif_control, emu)) == NULL)
+		return -ENOMEM;
+	if ((err = snd_ctl_add(card, kctl)))
+		return err;
+
+	return 0;
+}
+
+#define EMU10K1X_MIDI_MODE_INPUT	(1<<0)
+#define EMU10K1X_MIDI_MODE_OUTPUT	(1<<1)
+
+static inline unsigned char mpu401_read(emu10k1x_t *emu, emu10k1x_midi_t *mpu, int idx)
+{
+	return (unsigned char)snd_emu10k1x_ptr_read(emu, mpu->port + idx, 0);
+}
+
+static inline void mpu401_write(emu10k1x_t *emu, emu10k1x_midi_t *mpu, int data, int idx)
+{
+	snd_emu10k1x_ptr_write(emu, mpu->port + idx, 0, data);
+}
+
+#define mpu401_write_data(emu, mpu, data)	mpu401_write(emu, mpu, data, 0)
+#define mpu401_write_cmd(emu, mpu, data)	mpu401_write(emu, mpu, data, 1)
+#define mpu401_read_data(emu, mpu)		mpu401_read(emu, mpu, 0)
+#define mpu401_read_stat(emu, mpu)		mpu401_read(emu, mpu, 1)
+
+#define mpu401_input_avail(emu,mpu)	(!(mpu401_read_stat(emu,mpu) & 0x80))
+#define mpu401_output_ready(emu,mpu)	(!(mpu401_read_stat(emu,mpu) & 0x40))
+
+#define MPU401_RESET		0xff
+#define MPU401_ENTER_UART	0x3f
+#define MPU401_ACK		0xfe
+
+static void mpu401_clear_rx(emu10k1x_t *emu, emu10k1x_midi_t *mpu)
+{
+	int timeout = 100000;
+	for (; timeout > 0 && mpu401_input_avail(emu, mpu); timeout--)
+		mpu401_read_data(emu, mpu);
+#ifdef CONFIG_SND_DEBUG
+	if (timeout <= 0)
+		snd_printk(KERN_ERR "cmd: clear rx timeout (status = 0x%x)\n", mpu401_read_stat(emu, mpu));
+#endif
+}
+
+/*
+
+ */
+
+static void do_emu10k1x_midi_interrupt(emu10k1x_t *emu, emu10k1x_midi_t *midi, unsigned int status)
+{
+	unsigned char byte;
+
+	if (midi->rmidi == NULL) {
+		snd_emu10k1x_intr_disable(emu, midi->tx_enable | midi->rx_enable);
+		return;
+	}
+
+	spin_lock(&midi->input_lock);
+	if ((status & midi->ipr_rx) && mpu401_input_avail(emu, midi)) {
+		if (!(midi->midi_mode & EMU10K1X_MIDI_MODE_INPUT)) {
+			mpu401_clear_rx(emu, midi);
+		} else {
+			byte = mpu401_read_data(emu, midi);
+			spin_unlock(&midi->input_lock);
+			if (midi->substream_input)
+				snd_rawmidi_receive(midi->substream_input, &byte, 1);
+			spin_lock(&midi->input_lock);
+		}
+	}
+	spin_unlock(&midi->input_lock);
+
+	spin_lock(&midi->output_lock);
+	if ((status & midi->ipr_tx) && mpu401_output_ready(emu, midi)) {
+		if (midi->substream_output &&
+		    snd_rawmidi_transmit(midi->substream_output, &byte, 1) == 1) {
+			mpu401_write_data(emu, midi, byte);
+		} else {
+			snd_emu10k1x_intr_disable(emu, midi->tx_enable);
+		}
+	}
+	spin_unlock(&midi->output_lock);
+}
+
+static void snd_emu10k1x_midi_interrupt(emu10k1x_t *emu, unsigned int status)
+{
+	do_emu10k1x_midi_interrupt(emu, &emu->midi, status);
+}
+
+static void snd_emu10k1x_midi_cmd(emu10k1x_t * emu, emu10k1x_midi_t *midi, unsigned char cmd, int ack)
+{
+	unsigned long flags;
+	int timeout, ok;
+
+	spin_lock_irqsave(&midi->input_lock, flags);
+	mpu401_write_data(emu, midi, 0x00);
+	/* mpu401_clear_rx(emu, midi); */
+
+	mpu401_write_cmd(emu, midi, cmd);
+	if (ack) {
+		ok = 0;
+		timeout = 10000;
+		while (!ok && timeout-- > 0) {
+			if (mpu401_input_avail(emu, midi)) {
+				if (mpu401_read_data(emu, midi) == MPU401_ACK)
+					ok = 1;
+			}
+		}
+		if (!ok && mpu401_read_data(emu, midi) == MPU401_ACK)
+			ok = 1;
+	} else {
+		ok = 1;
+	}
+	spin_unlock_irqrestore(&midi->input_lock, flags);
+	if (!ok)
+		snd_printk(KERN_ERR "midi_cmd: 0x%x failed at 0x%lx (status = 0x%x, data = 0x%x)!!!\n",
+			   cmd, emu->port,
+			   mpu401_read_stat(emu, midi),
+			   mpu401_read_data(emu, midi));
+}
+
+static int snd_emu10k1x_midi_input_open(snd_rawmidi_substream_t * substream)
+{
+	emu10k1x_t *emu;
+	emu10k1x_midi_t *midi = (emu10k1x_midi_t *)substream->rmidi->private_data;
+	unsigned long flags;
+	
+	emu = midi->emu;
+	snd_assert(emu, return -ENXIO);
+	spin_lock_irqsave(&midi->open_lock, flags);
+	midi->midi_mode |= EMU10K1X_MIDI_MODE_INPUT;
+	midi->substream_input = substream;
+	if (!(midi->midi_mode & EMU10K1X_MIDI_MODE_OUTPUT)) {
+		spin_unlock_irqrestore(&midi->open_lock, flags);
+		snd_emu10k1x_midi_cmd(emu, midi, MPU401_RESET, 1);
+		snd_emu10k1x_midi_cmd(emu, midi, MPU401_ENTER_UART, 1);
+	} else {
+		spin_unlock_irqrestore(&midi->open_lock, flags);
+	}
+	return 0;
+}
+
+static int snd_emu10k1x_midi_output_open(snd_rawmidi_substream_t * substream)
+{
+	emu10k1x_t *emu;
+	emu10k1x_midi_t *midi = (emu10k1x_midi_t *)substream->rmidi->private_data;
+	unsigned long flags;
+
+	emu = midi->emu;
+	snd_assert(emu, return -ENXIO);
+	spin_lock_irqsave(&midi->open_lock, flags);
+	midi->midi_mode |= EMU10K1X_MIDI_MODE_OUTPUT;
+	midi->substream_output = substream;
+	if (!(midi->midi_mode & EMU10K1X_MIDI_MODE_INPUT)) {
+		spin_unlock_irqrestore(&midi->open_lock, flags);
+		snd_emu10k1x_midi_cmd(emu, midi, MPU401_RESET, 1);
+		snd_emu10k1x_midi_cmd(emu, midi, MPU401_ENTER_UART, 1);
+	} else {
+		spin_unlock_irqrestore(&midi->open_lock, flags);
+	}
+	return 0;
+}
+
+static int snd_emu10k1x_midi_input_close(snd_rawmidi_substream_t * substream)
+{
+	emu10k1x_t *emu;
+	emu10k1x_midi_t *midi = (emu10k1x_midi_t *)substream->rmidi->private_data;
+	unsigned long flags;
+
+	emu = midi->emu;
+	snd_assert(emu, return -ENXIO);
+	spin_lock_irqsave(&midi->open_lock, flags);
+	snd_emu10k1x_intr_disable(emu, midi->rx_enable);
+	midi->midi_mode &= ~EMU10K1X_MIDI_MODE_INPUT;
+	midi->substream_input = NULL;
+	if (!(midi->midi_mode & EMU10K1X_MIDI_MODE_OUTPUT)) {
+		spin_unlock_irqrestore(&midi->open_lock, flags);
+		snd_emu10k1x_midi_cmd(emu, midi, MPU401_RESET, 0);
+	} else {
+		spin_unlock_irqrestore(&midi->open_lock, flags);
+	}
+	return 0;
+}
+
+static int snd_emu10k1x_midi_output_close(snd_rawmidi_substream_t * substream)
+{
+	emu10k1x_t *emu;
+	emu10k1x_midi_t *midi = (emu10k1x_midi_t *)substream->rmidi->private_data;
+	unsigned long flags;
+
+	emu = midi->emu;
+	snd_assert(emu, return -ENXIO);
+	spin_lock_irqsave(&midi->open_lock, flags);
+	snd_emu10k1x_intr_disable(emu, midi->tx_enable);
+	midi->midi_mode &= ~EMU10K1X_MIDI_MODE_OUTPUT;
+	midi->substream_output = NULL;
+	if (!(midi->midi_mode & EMU10K1X_MIDI_MODE_INPUT)) {
+		spin_unlock_irqrestore(&midi->open_lock, flags);
+		snd_emu10k1x_midi_cmd(emu, midi, MPU401_RESET, 0);
+	} else {
+		spin_unlock_irqrestore(&midi->open_lock, flags);
+	}
+	return 0;
+}
+
+static void snd_emu10k1x_midi_input_trigger(snd_rawmidi_substream_t * substream, int up)
+{
+	emu10k1x_t *emu;
+	emu10k1x_midi_t *midi = (emu10k1x_midi_t *)substream->rmidi->private_data;
+	emu = midi->emu;
+	snd_assert(emu, return);
+
+	if (up)
+		snd_emu10k1x_intr_enable(emu, midi->rx_enable);
+	else
+		snd_emu10k1x_intr_disable(emu, midi->rx_enable);
+}
+
+static void snd_emu10k1x_midi_output_trigger(snd_rawmidi_substream_t * substream, int up)
+{
+	emu10k1x_t *emu;
+	emu10k1x_midi_t *midi = (emu10k1x_midi_t *)substream->rmidi->private_data;
+	unsigned long flags;
+
+	emu = midi->emu;
+	snd_assert(emu, return);
+
+	if (up) {
+		int max = 4;
+		unsigned char byte;
+	
+		/* try to send some amount of bytes here before interrupts */
+		spin_lock_irqsave(&midi->output_lock, flags);
+		while (max > 0) {
+			if (mpu401_output_ready(emu, midi)) {
+				if (!(midi->midi_mode & EMU10K1X_MIDI_MODE_OUTPUT) ||
+				    snd_rawmidi_transmit(substream, &byte, 1) != 1) {
+					/* no more data */
+					spin_unlock_irqrestore(&midi->output_lock, flags);
+					return;
+				}
+				mpu401_write_data(emu, midi, byte);
+				max--;
+			} else {
+				break;
+			}
+		}
+		spin_unlock_irqrestore(&midi->output_lock, flags);
+		snd_emu10k1x_intr_enable(emu, midi->tx_enable);
+	} else {
+		snd_emu10k1x_intr_disable(emu, midi->tx_enable);
+	}
+}
+
+/*
+
+ */
+
+static snd_rawmidi_ops_t snd_emu10k1x_midi_output =
+{
+	.open =		snd_emu10k1x_midi_output_open,
+	.close =	snd_emu10k1x_midi_output_close,
+	.trigger =	snd_emu10k1x_midi_output_trigger,
+};
+
+static snd_rawmidi_ops_t snd_emu10k1x_midi_input =
+{
+	.open =		snd_emu10k1x_midi_input_open,
+	.close =	snd_emu10k1x_midi_input_close,
+	.trigger =	snd_emu10k1x_midi_input_trigger,
+};
+
+static void snd_emu10k1x_midi_free(snd_rawmidi_t *rmidi)
+{
+	emu10k1x_midi_t *midi = (emu10k1x_midi_t *)rmidi->private_data;
+	midi->interrupt = NULL;
+	midi->rmidi = NULL;
+}
+
+static int __devinit emu10k1x_midi_init(emu10k1x_t *emu, emu10k1x_midi_t *midi, int device, char *name)
+{
+	snd_rawmidi_t *rmidi;
+	int err;
+
+	if ((err = snd_rawmidi_new(emu->card, name, device, 1, 1, &rmidi)) < 0)
+		return err;
+	midi->emu = emu;
+	spin_lock_init(&midi->open_lock);
+	spin_lock_init(&midi->input_lock);
+	spin_lock_init(&midi->output_lock);
+	strcpy(rmidi->name, name);
+	snd_rawmidi_set_ops(rmidi, SNDRV_RAWMIDI_STREAM_OUTPUT, &snd_emu10k1x_midi_output);
+	snd_rawmidi_set_ops(rmidi, SNDRV_RAWMIDI_STREAM_INPUT, &snd_emu10k1x_midi_input);
+	rmidi->info_flags |= SNDRV_RAWMIDI_INFO_OUTPUT |
+	                     SNDRV_RAWMIDI_INFO_INPUT |
+	                     SNDRV_RAWMIDI_INFO_DUPLEX;
+	rmidi->private_data = midi;
+	rmidi->private_free = snd_emu10k1x_midi_free;
+	midi->rmidi = rmidi;
+	return 0;
+}
+
+static int __devinit snd_emu10k1x_midi(emu10k1x_t *emu)
+{
+	emu10k1x_midi_t *midi = &emu->midi;
+	int err;
+
+	if ((err = emu10k1x_midi_init(emu, midi, 0, "EMU10K1X MPU-401 (UART)")) < 0)
+		return err;
+
+	midi->tx_enable = INTE_MIDITXENABLE;
+	midi->rx_enable = INTE_MIDIRXENABLE;
+	midi->port = MUDATA;
+	midi->ipr_tx = IPR_MIDITRANSBUFEMPTY;
+	midi->ipr_rx = IPR_MIDIRECVBUFEMPTY;
+	midi->interrupt = snd_emu10k1x_midi_interrupt;
+	return 0;
+}
+
+static int __devinit snd_emu10k1x_probe(struct pci_dev *pci,
+					const struct pci_device_id *pci_id)
+{
+	static int dev;
+	snd_card_t *card;
+	emu10k1x_t *chip;
+	int err;
+
+	if (dev >= SNDRV_CARDS)
+		return -ENODEV;
+	if (!enable[dev]) {
+		dev++;
+		return -ENOENT;
+	}
+
+	card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
+	if (card == NULL)
+		return -ENOMEM;
+
+	if ((err = snd_emu10k1x_create(card, pci, &chip)) < 0) {
+		snd_card_free(card);
+		return err;
+	}
+
+	if ((err = snd_emu10k1x_pcm(chip, 0, NULL)) < 0) {
+		snd_card_free(card);
+		return err;
+	}
+	if ((err = snd_emu10k1x_pcm(chip, 1, NULL)) < 0) {
+		snd_card_free(card);
+		return err;
+	}
+	if ((err = snd_emu10k1x_pcm(chip, 2, NULL)) < 0) {
+		snd_card_free(card);
+		return err;
+	}
+
+	if ((err = snd_emu10k1x_ac97(chip)) < 0) {
+		snd_card_free(card);
+		return err;
+	}
+
+	if ((err = snd_emu10k1x_mixer(chip)) < 0) {
+		snd_card_free(card);
+		return err;
+	}
+	
+	if ((err = snd_emu10k1x_midi(chip)) < 0) {
+		snd_card_free(card);
+		return err;
+	}
+
+	snd_emu10k1x_proc_init(chip);
+
+	strcpy(card->driver, "EMU10K1X");
+	strcpy(card->shortname, "Dell Sound Blaster Live!");
+	sprintf(card->longname, "%s at 0x%lx irq %i",
+		card->shortname, chip->port, chip->irq);
+
+	if ((err = snd_card_register(card)) < 0) {
+		snd_card_free(card);
+		return err;
+	}
+
+	pci_set_drvdata(pci, card);
+	dev++;
+	return 0;
+}
+
+static void __devexit snd_emu10k1x_remove(struct pci_dev *pci)
+{
+	snd_card_free(pci_get_drvdata(pci));
+	pci_set_drvdata(pci, NULL);
+}
+
+// PCI IDs
+static struct pci_device_id snd_emu10k1x_ids[] = {
+	{ 0x1102, 0x0006, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },	/* Dell OEM version (EMU10K1) */
+	{ 0, }
+};
+MODULE_DEVICE_TABLE(pci, snd_emu10k1x_ids);
+
+// pci_driver definition
+static struct pci_driver driver = {
+	.name = "EMU10K1X",
+	.id_table = snd_emu10k1x_ids,
+	.probe = snd_emu10k1x_probe,
+	.remove = __devexit_p(snd_emu10k1x_remove),
+};
+
+// initialization of the module
+static int __init alsa_card_emu10k1x_init(void)
+{
+	int err;
+
+	if ((err = pci_module_init(&driver)) > 0)
+		return err;
+
+	return 0;
+}
+
+// clean up the module
+static void __exit alsa_card_emu10k1x_exit(void)
+{
+	pci_unregister_driver(&driver);
+}
+
+module_init(alsa_card_emu10k1x_init)
+module_exit(alsa_card_emu10k1x_exit)
diff -Nru a/sound/pci/emu10k1/emufx.c b/sound/pci/emu10k1/emufx.c
--- a/sound/pci/emu10k1/emufx.c	2005-01-10 20:11:19 -08:00
+++ b/sound/pci/emu10k1/emufx.c	2005-01-10 20:11:19 -08:00
@@ -437,7 +437,7 @@
 }
 
 int snd_emu10k1_fx8010_unregister_irq_handler(emu10k1_t *emu,
-						     snd_emu10k1_fx8010_irq_t *irq)
+					      snd_emu10k1_fx8010_irq_t *irq)
 {
 	snd_emu10k1_fx8010_irq_t *tmp;
 	unsigned long flags;
@@ -470,8 +470,8 @@
 {
 	snd_assert(*ptr < 512, return);
 	set_bit(*ptr, icode->code_valid);
-	icode->code[*ptr    ][0] = ((x & 0x3ff) << 10) | (y & 0x3ff);
-	icode->code[(*ptr)++][1] = ((op & 0x0f) << 20) | ((r & 0x3ff) << 10) | (a & 0x3ff);
+	icode->code[(*ptr)   * 2 + 0] = ((x & 0x3ff) << 10) | (y & 0x3ff);
+	icode->code[(*ptr)++ * 2 + 1] = ((op & 0x0f) << 20) | ((r & 0x3ff) << 10) | (a & 0x3ff);
 }
 
 #define OP(icode, ptr, op, r, a, x, y) \
@@ -482,14 +482,14 @@
 {
 	snd_assert(*ptr < 1024, return);
 	set_bit(*ptr, icode->code_valid);
-	icode->code[*ptr    ][0] = ((x & 0x7ff) << 12) | (y & 0x7ff);
-	icode->code[(*ptr)++][1] = ((op & 0x0f) << 24) | ((r & 0x7ff) << 12) | (a & 0x7ff);
+	icode->code[(*ptr)   * 2 + 0] = ((x & 0x7ff) << 12) | (y & 0x7ff);
+	icode->code[(*ptr)++ * 2 + 1] = ((op & 0x0f) << 24) | ((r & 0x7ff) << 12) | (a & 0x7ff);
 }
 
 #define A_OP(icode, ptr, op, r, a, x, y) \
 	snd_emu10k1_audigy_write_op(icode, ptr, op, r, a, x, y)
 
-void snd_emu10k1_efx_write(emu10k1_t *emu, unsigned int pc, unsigned int data)
+static void snd_emu10k1_efx_write(emu10k1_t *emu, unsigned int pc, unsigned int data)
 {
 	pc += emu->audigy ? A_MICROCODEBASE : MICROCODEBASE;
 	snd_emu10k1_ptr_write(emu, pc, 0, data);
@@ -501,83 +501,108 @@
 	return snd_emu10k1_ptr_read(emu, pc, 0);
 }
 
-static void snd_emu10k1_gpr_poke(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
+static int snd_emu10k1_gpr_poke(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
 {
 	int gpr;
+	u32 val;
 
 	for (gpr = 0; gpr < (emu->audigy ? 0x200 : 0x100); gpr++) {
 		if (!test_bit(gpr, icode->gpr_valid))
 			continue;
-		snd_emu10k1_ptr_write(emu, emu->gpr_base + gpr, 0, icode->gpr_map[gpr]);
+		if (get_user(val, &icode->gpr_map[gpr]))
+			return -EFAULT;
+		snd_emu10k1_ptr_write(emu, emu->gpr_base + gpr, 0, val);
 	}
+	return 0;
 }
 
-static void snd_emu10k1_gpr_peek(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
+static int snd_emu10k1_gpr_peek(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
 {
 	int gpr;
+	u32 val;
 
 	for (gpr = 0; gpr < (emu->audigy ? 0x200 : 0x100); gpr++) {
 		set_bit(gpr, icode->gpr_valid);
-		icode->gpr_map[gpr] = snd_emu10k1_ptr_read(emu, emu->gpr_base + gpr, 0);
+		val = snd_emu10k1_ptr_read(emu, emu->gpr_base + gpr, 0);
+		if (put_user(val, &icode->gpr_map[gpr]))
+			return -EFAULT;
 	}
+	return 0;
 }
 
-static void snd_emu10k1_tram_poke(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
+static int snd_emu10k1_tram_poke(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
 {
 	int tram;
+	u32 addr, val;
 
 	for (tram = 0; tram < (emu->audigy ? 0x100 : 0xa0); tram++) {
 		if (!test_bit(tram, icode->tram_valid))
 			continue;
-		snd_emu10k1_ptr_write(emu, TANKMEMDATAREGBASE + tram, 0, icode->tram_data_map[tram]);
-		if (!emu->audigy)
-			snd_emu10k1_ptr_write(emu, TANKMEMADDRREGBASE + tram, 0, icode->tram_addr_map[tram]);
-		else {
-			snd_emu10k1_ptr_write(emu, TANKMEMADDRREGBASE + tram, 0, icode->tram_addr_map[tram] << 12);
-			snd_emu10k1_ptr_write(emu, A_TANKMEMCTLREGBASE + tram, 0, icode->tram_addr_map[tram] >> 20);
+		if (get_user(val, &icode->tram_data_map[tram]) ||
+		    get_user(addr, &icode->tram_addr_map[tram]))
+			return -EFAULT;
+		snd_emu10k1_ptr_write(emu, TANKMEMDATAREGBASE + tram, 0, val);
+		if (!emu->audigy) {
+			snd_emu10k1_ptr_write(emu, TANKMEMADDRREGBASE + tram, 0, addr);
+		} else {
+			snd_emu10k1_ptr_write(emu, TANKMEMADDRREGBASE + tram, 0, addr << 12);
+			snd_emu10k1_ptr_write(emu, A_TANKMEMCTLREGBASE + tram, 0, addr >> 20);
 		}
 	}
+	return 0;
 }
 
-static void snd_emu10k1_tram_peek(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
+static int snd_emu10k1_tram_peek(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
 {
 	int tram;
+	u32 val, addr;
 
 	memset(icode->tram_valid, 0, sizeof(icode->tram_valid));
 	for (tram = 0; tram < (emu->audigy ? 0x100 : 0xa0); tram++) {
 		set_bit(tram, icode->tram_valid);
-		icode->tram_data_map[tram] = snd_emu10k1_ptr_read(emu, TANKMEMDATAREGBASE + tram, 0);
-		if (!emu->audigy)
-			icode->tram_addr_map[tram] = snd_emu10k1_ptr_read(emu, TANKMEMADDRREGBASE + tram, 0);
-		else {
-			icode->tram_addr_map[tram] = snd_emu10k1_ptr_read(emu, TANKMEMADDRREGBASE + tram, 0) >> 12;
-			icode->tram_addr_map[tram] |= snd_emu10k1_ptr_read(emu, A_TANKMEMCTLREGBASE + tram, 0) << 20;
+		val = snd_emu10k1_ptr_read(emu, TANKMEMDATAREGBASE + tram, 0);
+		if (!emu->audigy) {
+			addr = snd_emu10k1_ptr_read(emu, TANKMEMADDRREGBASE + tram, 0);
+		} else {
+			addr = snd_emu10k1_ptr_read(emu, TANKMEMADDRREGBASE + tram, 0) >> 12;
+			addr |= snd_emu10k1_ptr_read(emu, A_TANKMEMCTLREGBASE + tram, 0) << 20;
 		}
+		if (put_user(val, &icode->tram_data_map[tram]) ||
+		    put_user(addr, &icode->tram_addr_map[tram]))
+			return -EFAULT;
 	}
+	return 0;
 }
 
-static void snd_emu10k1_code_poke(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
+static int snd_emu10k1_code_poke(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
 {
-	u32 pc;
+	u32 pc, lo, hi;
 
-	for (pc = 0; pc < (emu->audigy ? 1024 : 512); pc++) {
-		if (!test_bit(pc, icode->code_valid))
+	for (pc = 0; pc < (emu->audigy ? 2*1024 : 2*512); pc += 2) {
+		if (!test_bit(pc / 2, icode->code_valid))
 			continue;
-		snd_emu10k1_efx_write(emu, pc * 2, icode->code[pc][0]);
-		snd_emu10k1_efx_write(emu, pc * 2 + 1, icode->code[pc][1]);
+		if (get_user(lo, &icode->code[pc + 0]) ||
+		    get_user(hi, &icode->code[pc + 1]))
+			return -EFAULT;
+		snd_emu10k1_efx_write(emu, pc + 0, lo);
+		snd_emu10k1_efx_write(emu, pc + 1, hi);
 	}
+	return 0;
 }
 
-static void snd_emu10k1_code_peek(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
+static int snd_emu10k1_code_peek(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
 {
 	u32 pc;
 
 	memset(icode->code_valid, 0, sizeof(icode->code_valid));
-	for (pc = 0; pc < (emu->audigy ? 1024 : 512); pc++) {
-		set_bit(pc, icode->code_valid);
-		icode->code[pc][0] = snd_emu10k1_efx_read(emu, pc * 2);
-		icode->code[pc][1] = snd_emu10k1_efx_read(emu, pc * 2 + 1);
+	for (pc = 0; pc < (emu->audigy ? 2*1024 : 2*512); pc += 2) {
+		set_bit(pc / 2, icode->code_valid);
+		if (put_user(snd_emu10k1_efx_read(emu, pc + 0), &icode->code[pc + 0]))
+			return -EFAULT;
+		if (put_user(snd_emu10k1_efx_read(emu, pc + 1), &icode->code[pc + 1]))
+			return -EFAULT;
 	}
+	return 0;
 }
 
 static snd_emu10k1_fx8010_ctl_t *snd_emu10k1_look_for_ctl(emu10k1_t *emu, snd_ctl_elem_id_t *id)
@@ -647,7 +672,7 @@
 	kfree(ctl);
 }
 
-static void snd_emu10k1_add_controls(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
+static int snd_emu10k1_add_controls(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
 {
 	unsigned int i, j;
 	emu10k1_fx8010_control_gpr_t __user *_gctl;
@@ -656,17 +681,20 @@
 	snd_kcontrol_new_t knew;
 	snd_kcontrol_t *kctl;
 	snd_ctl_elem_value_t *val;
+	int err = 0;
 
 	val = (snd_ctl_elem_value_t *)kmalloc(sizeof(*val), GFP_KERNEL);
 	if (!val)
-		return;
+		return -ENOMEM;
 	for (i = 0, _gctl = icode->gpr_add_controls;
 	     i < icode->gpr_add_control_count; i++, _gctl++) {
-		if (copy_from_user(&gctl, _gctl, sizeof(gctl)))
-			break;
+		if (copy_from_user(&gctl, _gctl, sizeof(gctl))) {
+			err = -EFAULT;
+			goto __error;
+		}
 		snd_runtime_check(gctl.id.iface == SNDRV_CTL_ELEM_IFACE_MIXER ||
-		                  gctl.id.iface == SNDRV_CTL_ELEM_IFACE_PCM, continue);
-		snd_runtime_check(gctl.id.name[0] != '\0', continue);
+		                  gctl.id.iface == SNDRV_CTL_ELEM_IFACE_PCM, err = -EINVAL; goto __error);
+		snd_runtime_check(gctl.id.name[0] != '\0', err = -EINVAL; goto __error);
 		ctl = snd_emu10k1_look_for_ctl(emu, &gctl.id);
 		memset(&knew, 0, sizeof(knew));
 		knew.iface = gctl.id.iface;
@@ -694,9 +722,9 @@
 				continue;
 			knew.private_value = (unsigned long)ctl;
 			memcpy(ctl, &nctl, sizeof(nctl));
-			if (snd_ctl_add(emu->card, kctl = snd_ctl_new1(&knew, emu)) < 0) {
+			if ((err = snd_ctl_add(emu->card, kctl = snd_ctl_new1(&knew, emu))) < 0) {
 				kfree(ctl);
-				continue;
+				goto __error;
 			}
 			kctl->private_free = snd_emu10k1_ctl_private_free;
 			ctl->kcontrol = kctl;
@@ -711,10 +739,12 @@
 		}
 		snd_emu10k1_gpr_ctl_put(ctl->kcontrol, val);
 	}
+      __error:
 	kfree(val);
+	return err;
 }
 
-static void snd_emu10k1_del_controls(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
+static int snd_emu10k1_del_controls(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
 {
 	unsigned int i;
 	snd_ctl_elem_id_t id;
@@ -724,13 +754,14 @@
 	
 	for (i = 0, _id = icode->gpr_del_controls;
 	     i < icode->gpr_del_control_count; i++, _id++) {
-	     	snd_runtime_check(copy_from_user(&id, _id, sizeof(id)) == 0, continue);
+	     	snd_runtime_check(copy_from_user(&id, _id, sizeof(id)) == 0, return -EFAULT);
 		down_write(&card->controls_rwsem);
 		ctl = snd_emu10k1_look_for_ctl(emu, &id);
 		if (ctl)
 			snd_ctl_remove(card, ctl->kcontrol);
 		up_write(&card->controls_rwsem);
 	}
+	return 0;
 }
 
 static int snd_emu10k1_list_controls(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
@@ -789,11 +820,12 @@
 	else
 		snd_emu10k1_ptr_write(emu, DBG, 0, emu->fx8010.dbg | EMU10K1_DBG_SINGLE_STEP);
 	/* ok, do the main job */
-	snd_emu10k1_del_controls(emu, icode);
-	snd_emu10k1_gpr_poke(emu, icode);
-	snd_emu10k1_tram_poke(emu, icode);
-	snd_emu10k1_code_poke(emu, icode);
-	snd_emu10k1_add_controls(emu, icode);
+	if ((err = snd_emu10k1_del_controls(emu, icode)) < 0 ||
+	    (err = snd_emu10k1_gpr_poke(emu, icode)) < 0 ||
+	    (err = snd_emu10k1_tram_poke(emu, icode)) < 0 ||
+	    (err = snd_emu10k1_code_poke(emu, icode)) < 0 ||
+	    (err = snd_emu10k1_add_controls(emu, icode)) < 0)
+		goto __error;
 	/* start FX processor when the DSP code is updated */
 	if (emu->audigy)
 		snd_emu10k1_ptr_write(emu, A_DBG, 0, emu->fx8010.dbg);
@@ -811,10 +843,13 @@
 	down(&emu->fx8010.lock);
 	strlcpy(icode->name, emu->fx8010.name, sizeof(icode->name));
 	/* ok, do the main job */
-	snd_emu10k1_gpr_peek(emu, icode);
-	snd_emu10k1_tram_peek(emu, icode);
-	snd_emu10k1_code_peek(emu, icode);
-	err = snd_emu10k1_list_controls(emu, icode);
+	err = snd_emu10k1_gpr_peek(emu, icode);
+	if (err >= 0)
+		err = snd_emu10k1_tram_peek(emu, icode);
+	if (err >= 0)
+		err = snd_emu10k1_code_peek(emu, icode);
+	if (err >= 0)
+		err = snd_emu10k1_list_controls(emu, icode);
 	up(&emu->fx8010.lock);
 	return err;
 }
@@ -957,20 +992,24 @@
 	const int stereo_mix = capture + 2;
 	const int tmp = 0x88;
 	u32 ptr;
-	emu10k1_fx8010_code_t *icode;
-	emu10k1_fx8010_control_gpr_t *controls, *ctl;
+	emu10k1_fx8010_code_t *icode = NULL;
+	emu10k1_fx8010_control_gpr_t *controls = NULL, *ctl;
 	mm_segment_t seg;
 
 	spin_lock_init(&emu->fx8010.irq_lock);
 	INIT_LIST_HEAD(&emu->fx8010.gpr_ctl);
 
-	if ((icode = kcalloc(1, sizeof(*icode), GFP_KERNEL)) == NULL)
-		return -ENOMEM;
-	if ((controls = kcalloc(SND_EMU10K1_GPR_CONTROLS, sizeof(*controls), GFP_KERNEL)) == NULL) {
-		kfree(icode);
-		return -ENOMEM;
+	if ((icode = kcalloc(1, sizeof(*icode), GFP_KERNEL)) == NULL ||
+	    (icode->gpr_map = kcalloc(512 + 256 + 256 + 2 * 1024, sizeof(u_int32_t), GFP_KERNEL)) == NULL ||
+	    (controls = kcalloc(SND_EMU10K1_GPR_CONTROLS, sizeof(*controls), GFP_KERNEL)) == NULL) {
+		err = -ENOMEM;
+		goto __err;
 	}
 
+	icode->tram_data_map = icode->gpr_map + 512;
+	icode->tram_addr_map = icode->tram_data_map + 256;
+	icode->code = icode->tram_addr_map + 256;
+
 	/* clear free GPRs */
 	for (i = 0; i < 512; i++)
 		set_bit(i, icode->gpr_valid);
@@ -1312,8 +1351,12 @@
 	A_PUT_OUTPUT(A_EXTOUT_LFE, playback+5 + SND_EMU10K1_PLAYBACK_CHANNELS);
 
 	/* ADC buffer */
+#ifdef EMU10K1_CAPTURE_DIGITAL_OUT
+	A_PUT_STEREO_OUTPUT(A_EXTOUT_ADC_CAP_L, A_EXTOUT_ADC_CAP_R, playback + SND_EMU10K1_PLAYBACK_CHANNELS);
+#else
 	A_PUT_OUTPUT(A_EXTOUT_ADC_CAP_L, capture);
 	A_PUT_OUTPUT(A_EXTOUT_ADC_CAP_R, capture+1);
+#endif
 
 	/*
 	 * ok, set up done..
@@ -1335,8 +1378,13 @@
 	snd_leave_user(seg);
 
  __err:
-	kfree(controls);
-	kfree(icode);
+ 	if (controls != NULL)
+		kfree(controls);
+	if (icode != NULL) {
+		if (icode->gpr_map != NULL)
+			kfree(icode->gpr_map);
+		kfree(icode);
+	}
 	return err;
 }
 
@@ -1398,8 +1446,8 @@
 	int err, i, z, gpr, tmp, playback, capture;
 	u32 ptr;
 	emu10k1_fx8010_code_t *icode;
-	emu10k1_fx8010_pcm_t *ipcm;
-	emu10k1_fx8010_control_gpr_t *controls, *ctl;
+	emu10k1_fx8010_pcm_t *ipcm = NULL;
+	emu10k1_fx8010_control_gpr_t *controls = NULL, *ctl;
 	mm_segment_t seg;
 
 	spin_lock_init(&emu->fx8010.irq_lock);
@@ -1407,15 +1455,16 @@
 
 	if ((icode = kcalloc(1, sizeof(*icode), GFP_KERNEL)) == NULL)
 		return -ENOMEM;
-	if ((controls = kcalloc(SND_EMU10K1_GPR_CONTROLS, sizeof(emu10k1_fx8010_control_gpr_t), GFP_KERNEL)) == NULL) {
-		kfree(icode);
-		return -ENOMEM;
-	}
-	if ((ipcm = kcalloc(1, sizeof(*ipcm), GFP_KERNEL)) == NULL) {
-		kfree(controls);
-		kfree(icode);
-		return -ENOMEM;
+	if ((icode->gpr_map = kcalloc(256 + 160 + 160 + 2 * 512, sizeof(u_int32_t), GFP_KERNEL)) == NULL ||
+            (controls = kcalloc(SND_EMU10K1_GPR_CONTROLS, sizeof(emu10k1_fx8010_control_gpr_t), GFP_KERNEL)) == NULL ||
+	    (ipcm = kcalloc(1, sizeof(*ipcm), GFP_KERNEL)) == NULL) {
+		err = -ENOMEM;
+		goto __err;
 	}
+
+	icode->tram_data_map = icode->gpr_map + 256;
+	icode->tram_addr_map = icode->tram_data_map + 160;
+	icode->code = icode->tram_addr_map + 160;
 	
 	/* clear free GPRs */
 	for (i = 0; i < 256; i++)
@@ -1906,9 +1955,15 @@
 	if (err >= 0)
 		err = snd_emu10k1_ipcm_poke(emu, ipcm);
       __err:
-	kfree(ipcm);
-	kfree(controls);
-	kfree(icode);
+      	if (ipcm != NULL)
+		kfree(ipcm);
+	if (controls != NULL)
+		kfree(controls);
+	if (icode != NULL) {
+		if (icode->gpr_map != NULL)
+			kfree(icode->gpr_map);
+		kfree(icode);
+	}
 	return err;
 }
 
@@ -1959,7 +2014,7 @@
 		}
 		size = 0x2000 << size_reg;
 	}
-	if (emu->fx8010.etram_pages.bytes == size)
+	if ((emu->fx8010.etram_pages.bytes / 2) == size)
 		return 0;
 	spin_lock_irq(&emu->emu_lock);
 	outl(HCFG_LOCKTANKCACHE_MASK | inl(emu->port + HCFG), emu->port + HCFG);
diff -Nru a/sound/pci/emu10k1/emumixer.c b/sound/pci/emu10k1/emumixer.c
--- a/sound/pci/emu10k1/emumixer.c	2005-01-10 20:11:22 -08:00
+++ b/sound/pci/emu10k1/emumixer.c	2005-01-10 20:11:22 -08:00
@@ -54,7 +54,7 @@
 	ucontrol->value.iec958.status[2] = (emu->spdif_bits[idx] >> 16) & 0xff;
 	ucontrol->value.iec958.status[3] = (emu->spdif_bits[idx] >> 24) & 0xff;
 	spin_unlock_irqrestore(&emu->reg_lock, flags);
-        return 0;
+	return 0;
 }
 
 static int snd_emu10k1_spdif_get_mask(snd_kcontrol_t * kcontrol,
@@ -64,7 +64,7 @@
 	ucontrol->value.iec958.status[1] = 0xff;
 	ucontrol->value.iec958.status[2] = 0xff;
 	ucontrol->value.iec958.status[3] = 0xff;
-        return 0;
+	return 0;
 }
 
 static int snd_emu10k1_spdif_put(snd_kcontrol_t * kcontrol,
@@ -87,27 +87,27 @@
 		emu->spdif_bits[idx] = val;
 	}
 	spin_unlock_irqrestore(&emu->reg_lock, flags);
-        return change;
+	return change;
 }
 
 static snd_kcontrol_new_t snd_emu10k1_spdif_mask_control =
 {
 	.access =	SNDRV_CTL_ELEM_ACCESS_READ,
-        .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
-        .name =         SNDRV_CTL_NAME_IEC958("",PLAYBACK,MASK),
+	.iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
+	.name =         SNDRV_CTL_NAME_IEC958("",PLAYBACK,MASK),
 	.count =	4,
-        .info =         snd_emu10k1_spdif_info,
-        .get =          snd_emu10k1_spdif_get_mask
+	.info =         snd_emu10k1_spdif_info,
+	.get =          snd_emu10k1_spdif_get_mask
 };
 
 static snd_kcontrol_new_t snd_emu10k1_spdif_control =
 {
-        .iface =	SNDRV_CTL_ELEM_IFACE_MIXER,
-        .name =         SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT),
+	.iface =	SNDRV_CTL_ELEM_IFACE_MIXER,
+	.name =         SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT),
 	.count =	4,
-        .info =         snd_emu10k1_spdif_info,
-        .get =          snd_emu10k1_spdif_get,
-        .put =          snd_emu10k1_spdif_put
+	.info =         snd_emu10k1_spdif_info,
+	.get =          snd_emu10k1_spdif_get,
+	.put =          snd_emu10k1_spdif_put
 };
 
 
@@ -165,7 +165,7 @@
 			ucontrol->value.integer.value[(voice * num_efx) + idx] = 
 				mix->send_routing[voice][idx] & mask;
 	spin_unlock_irqrestore(&emu->reg_lock, flags);
-        return 0;
+	return 0;
 }
 
 static int snd_emu10k1_send_routing_put(snd_kcontrol_t * kcontrol,
@@ -199,18 +199,18 @@
 		}
 	}
 	spin_unlock_irqrestore(&emu->reg_lock, flags);
-        return change;
+	return change;
 }
 
 static snd_kcontrol_new_t snd_emu10k1_send_routing_control =
 {
 	.access =	SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE,
-        .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
-        .name =         "EMU10K1 PCM Send Routing",
+	.iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
+	.name =         "EMU10K1 PCM Send Routing",
 	.count =	32,
-        .info =         snd_emu10k1_send_routing_info,
-        .get =          snd_emu10k1_send_routing_get,
-        .put =          snd_emu10k1_send_routing_put
+	.info =         snd_emu10k1_send_routing_info,
+	.get =          snd_emu10k1_send_routing_get,
+	.put =          snd_emu10k1_send_routing_put
 };
 
 static int snd_emu10k1_send_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
@@ -236,7 +236,7 @@
 	for (idx = 0; idx < 3*num_efx; idx++)
 		ucontrol->value.integer.value[idx] = mix->send_volume[idx/num_efx][idx%num_efx];
 	spin_unlock_irqrestore(&emu->reg_lock, flags);
-        return 0;
+	return 0;
 }
 
 static int snd_emu10k1_send_volume_put(snd_kcontrol_t * kcontrol,
@@ -268,18 +268,18 @@
 		}
 	}
 	spin_unlock_irqrestore(&emu->reg_lock, flags);
-        return change;
+	return change;
 }
 
 static snd_kcontrol_new_t snd_emu10k1_send_volume_control =
 {
 	.access =	SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE,
-        .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
-        .name =         "EMU10K1 PCM Send Volume",
+	.iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
+	.name =         "EMU10K1 PCM Send Volume",
 	.count =	32,
-        .info =         snd_emu10k1_send_volume_info,
-        .get =          snd_emu10k1_send_volume_get,
-        .put =          snd_emu10k1_send_volume_put
+	.info =         snd_emu10k1_send_volume_info,
+	.get =          snd_emu10k1_send_volume_get,
+	.put =          snd_emu10k1_send_volume_put
 };
 
 static int snd_emu10k1_attn_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
@@ -303,7 +303,7 @@
 	for (idx = 0; idx < 3; idx++)
 		ucontrol->value.integer.value[idx] = mix->attn[idx];
 	spin_unlock_irqrestore(&emu->reg_lock, flags);
-        return 0;
+	return 0;
 }
 
 static int snd_emu10k1_attn_put(snd_kcontrol_t * kcontrol,
@@ -331,18 +331,18 @@
 		}
 	}
 	spin_unlock_irqrestore(&emu->reg_lock, flags);
-        return change;
+	return change;
 }
 
 static snd_kcontrol_new_t snd_emu10k1_attn_control =
 {
 	.access =	SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE,
-        .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
-        .name =         "EMU10K1 PCM Volume",
+	.iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
+	.name =         "EMU10K1 PCM Volume",
 	.count =	32,
-        .info =         snd_emu10k1_attn_info,
-        .get =          snd_emu10k1_attn_get,
-        .put =          snd_emu10k1_attn_put
+	.info =         snd_emu10k1_attn_info,
+	.get =          snd_emu10k1_attn_get,
+	.put =          snd_emu10k1_attn_put
 };
 
 static int snd_emu10k1_shared_spdif_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
@@ -363,7 +363,7 @@
 		ucontrol->value.integer.value[0] = inl(emu->port + A_IOCFG) & A_IOCFG_GPOUT0 ? 1 : 0;
 	else
 		ucontrol->value.integer.value[0] = inl(emu->port + HCFG) & HCFG_GPOUT0 ? 1 : 0;
-        return 0;
+	return 0;
 }
 
 static int snd_emu10k1_shared_spdif_put(snd_kcontrol_t * kcontrol,
@@ -394,7 +394,7 @@
 		outl(reg | val, emu->port + HCFG);
 	}
 	spin_unlock_irqrestore(&emu->reg_lock, flags);
-        return change;
+	return change;
 }
 
 static snd_kcontrol_new_t snd_emu10k1_shared_spdif __devinitdata =
@@ -519,6 +519,7 @@
 
 		if ((err = snd_ac97_bus(emu->card, 0, &ops, NULL, &pbus)) < 0)
 			return err;
+		pbus->no_vra = 1; /* we don't need VRA */
 		
 		memset(&ac97, 0, sizeof(ac97));
 		ac97.private_data = emu;
diff -Nru a/sound/pci/emu10k1/emupcm.c b/sound/pci/emu10k1/emupcm.c
--- a/sound/pci/emu10k1/emupcm.c	2005-01-10 20:11:15 -08:00
+++ b/sound/pci/emu10k1/emupcm.c	2005-01-10 20:11:15 -08:00
@@ -267,6 +267,7 @@
 		send_routing[3] = 3;
 		memset(send_amount, 0, sizeof(send_amount));
 	} else {
+		/* mono, left, right (master voice = left) */
 		tmp = stereo ? (master ? 1 : 2) : 0;
 		memcpy(send_routing, &mix->send_routing[tmp][0], 8);
 		memcpy(send_amount, &mix->send_volume[tmp][0], 8);
@@ -292,15 +293,9 @@
 	// setup routing
 	if (emu->audigy) {
 		snd_emu10k1_ptr_write(emu, A_FXRT1, voice,
-				      ((unsigned int)send_routing[3] << 24) |
-				      ((unsigned int)send_routing[2] << 16) |
-				      ((unsigned int)send_routing[1] << 8) |
-				      (unsigned int)send_routing[0]);
+				      snd_emu10k1_compose_audigy_fxrt1(send_routing));
 		snd_emu10k1_ptr_write(emu, A_FXRT2, voice,
-				      ((unsigned int)send_routing[7] << 24) |
-				      ((unsigned int)send_routing[6] << 16) |
-				      ((unsigned int)send_routing[5] << 8) |
-				      (unsigned int)send_routing[4]);
+				      snd_emu10k1_compose_audigy_fxrt2(send_routing));
 		snd_emu10k1_ptr_write(emu, A_SENDAMOUNTS, voice,
 				      ((unsigned int)send_amount[4] << 24) |
 				      ((unsigned int)send_amount[5] << 16) |
@@ -777,8 +772,7 @@
 {
 	emu10k1_pcm_t *epcm = runtime->private_data;
 
-	if (epcm)
-		kfree(epcm);
+	kfree(epcm);
 }
 
 static int snd_emu10k1_playback_open(snd_pcm_substream_t * substream)
diff -Nru a/sound/pci/emu10k1/emuproc.c b/sound/pci/emu10k1/emuproc.c
--- a/sound/pci/emu10k1/emuproc.c	2005-01-10 20:11:18 -08:00
+++ b/sound/pci/emu10k1/emuproc.c	2005-01-10 20:11:18 -08:00
@@ -175,32 +175,45 @@
 	};
 
 	emu10k1_t *emu = entry->private_data;
-	unsigned int val;
+	unsigned int val, val1;
 	int nefx = emu->audigy ? 64 : 32;
 	char **outputs = emu->audigy ? audigy_outs : creative_outs;
 	int idx;
 	
 	snd_iprintf(buffer, "EMU10K1\n\n");
-	val = emu->audigy ?
-		snd_emu10k1_ptr_read(emu, A_FXRT1, 0) :
-		snd_emu10k1_ptr_read(emu, FXRT, 0);
 	snd_iprintf(buffer, "Card                  : %s\n",
 		    emu->audigy ? "Audigy" : (emu->APS ? "EMU APS" : "Creative"));
 	snd_iprintf(buffer, "Internal TRAM (words) : 0x%x\n", emu->fx8010.itram_size);
 	snd_iprintf(buffer, "External TRAM (words) : 0x%x\n", (int)emu->fx8010.etram_pages.bytes);
 	snd_iprintf(buffer, "\n");
-	if (emu->audigy) {
-		snd_iprintf(buffer, "Effect Send Routing   : A=%i, B=%i, C=%i, D=%i\n",
-			    val & 0x3f,
-			    (val >> 8) & 0x3f,
-			    (val >> 16) & 0x3f,
-			    (val >> 24) & 0x3f);
-	} else {
-		snd_iprintf(buffer, "Effect Send Routing   : A=%i, B=%i, C=%i, D=%i\n",
-			    (val >> 16) & 0x0f,
-			    (val >> 20) & 0x0f,
-			    (val >> 24) & 0x0f,
-			    (val >> 28) & 0x0f);
+	snd_iprintf(buffer, "Effect Send Routing   :\n");
+	for (idx = 0; idx < NUM_G; idx++) {
+		val = emu->audigy ?
+			snd_emu10k1_ptr_read(emu, A_FXRT1, idx) :
+			snd_emu10k1_ptr_read(emu, FXRT, idx);
+		val1 = emu->audigy ?
+			snd_emu10k1_ptr_read(emu, A_FXRT2, idx) :
+			0;
+		if (emu->audigy) {
+			snd_iprintf(buffer, "Ch%i: A=%i, B=%i, C=%i, D=%i, ",
+				idx,
+				val & 0x3f,
+				(val >> 8) & 0x3f,
+				(val >> 16) & 0x3f,
+				(val >> 24) & 0x3f);
+			snd_iprintf(buffer, "E=%i, F=%i, G=%i, H=%i\n",
+				val1 & 0x3f,
+				(val1 >> 8) & 0x3f,
+				(val1 >> 16) & 0x3f,
+				(val1 >> 24) & 0x3f);
+		} else {
+			snd_iprintf(buffer, "Ch%i: A=%i, B=%i, C=%i, D=%i\n",
+				idx,
+				(val >> 16) & 0x0f,
+				(val >> 20) & 0x0f,
+				(val >> 24) & 0x0f,
+				(val >> 28) & 0x0f);
+		}
 	}
 	snd_iprintf(buffer, "\nCaptured FX Outputs   :\n");
 	for (idx = 0; idx < nefx; idx++) {
@@ -309,6 +322,152 @@
 	return 0;
 }
 
+#ifdef CONFIG_SND_DEBUG
+static void snd_emu_proc_io_reg_read(snd_info_entry_t *entry,
+				     snd_info_buffer_t * buffer)
+{
+	emu10k1_t *emu = entry->private_data;
+	unsigned long value;
+	unsigned long flags;
+	int i;
+	snd_iprintf(buffer, "IO Registers:\n\n");
+	for(i = 0; i < 0x40; i+=4) {
+		spin_lock_irqsave(&emu->emu_lock, flags);
+		value = inl(emu->port + i);
+		spin_unlock_irqrestore(&emu->emu_lock, flags);
+		snd_iprintf(buffer, "%02X: %08lX\n", i, value);
+	}
+}
+
+static void snd_emu_proc_io_reg_write(snd_info_entry_t *entry,
+                                      snd_info_buffer_t * buffer)
+{
+	emu10k1_t *emu = entry->private_data;
+	unsigned long flags;
+	char line[64];
+	u32 reg, val;
+	while (!snd_info_get_line(buffer, line, sizeof(line))) {
+		if (sscanf(line, "%x %x", &reg, &val) != 2)
+			continue;
+		if ((reg < 0x40) && (reg >=0) && (val <= 0xffffffff) ) {
+			spin_lock_irqsave(&emu->emu_lock, flags);
+			outl(val, emu->port + (reg & 0xfffffffc));
+			spin_unlock_irqrestore(&emu->emu_lock, flags);
+		}
+	}
+}
+
+static unsigned int snd_ptr_read(emu10k1_t * emu,
+				 unsigned int iobase,
+				 unsigned int reg,
+				 unsigned int chn)
+{
+	unsigned long flags;
+	unsigned int regptr, val;
+
+	regptr = (reg << 16) | chn;
+
+	spin_lock_irqsave(&emu->emu_lock, flags);
+	outl(regptr, emu->port + iobase + PTR);
+	val = inl(emu->port + iobase + DATA);
+	spin_unlock_irqrestore(&emu->emu_lock, flags);
+	return val;
+}
+
+static void snd_ptr_write(emu10k1_t *emu,
+			  unsigned int iobase,
+			  unsigned int reg,
+			  unsigned int chn,
+			  unsigned int data)
+{
+	unsigned int regptr;
+	unsigned long flags;
+
+	regptr = (reg << 16) | chn;
+
+	spin_lock_irqsave(&emu->emu_lock, flags);
+	outl(regptr, emu->port + iobase + PTR);
+	outl(data, emu->port + iobase + DATA);
+	spin_unlock_irqrestore(&emu->emu_lock, flags);
+}
+
+
+static void snd_emu_proc_ptr_reg_read(snd_info_entry_t *entry,
+				      snd_info_buffer_t * buffer, int iobase, int offset, int length)
+{
+	emu10k1_t *emu = entry->private_data;
+	unsigned long value;
+	int i,j;
+	if (offset+length > 0x80) {
+		snd_iprintf(buffer, "Input values out of range\n");
+		return;
+	}
+	snd_iprintf(buffer, "Registers 0x%x\n", iobase);
+	for(i = offset; i < offset+length; i++) {
+		snd_iprintf(buffer, "%02X: ",i);
+		for (j = 0; j < 4; j++) {
+			if(iobase == 0)
+                		value = snd_ptr_read(emu, 0, i, j);
+			else
+                		value = snd_ptr_read(emu, 0x20, i, j);
+			snd_iprintf(buffer, "%08lX ", value);
+		}
+		snd_iprintf(buffer, "\n");
+	}
+}
+
+static void snd_emu_proc_ptr_reg_write(snd_info_entry_t *entry,
+				       snd_info_buffer_t * buffer, int iobase)
+{
+	emu10k1_t *emu = entry->private_data;
+	char line[64];
+	unsigned int reg, channel_id , val;
+	while (!snd_info_get_line(buffer, line, sizeof(line))) {
+		if (sscanf(line, "%x %x %x", &reg, &channel_id, &val) != 3)
+			continue;
+		if ((reg < 0x80) && (reg >=0) && (val <= 0xffffffff) && (channel_id >=0) && (channel_id <= 3) )
+			snd_ptr_write(emu, iobase, reg, channel_id, val);
+	}
+}
+
+static void snd_emu_proc_ptr_reg_write00(snd_info_entry_t *entry,
+					 snd_info_buffer_t * buffer)
+{
+	snd_emu_proc_ptr_reg_write(entry, buffer, 0);
+}
+
+static void snd_emu_proc_ptr_reg_write20(snd_info_entry_t *entry,
+					 snd_info_buffer_t * buffer)
+{
+	snd_emu_proc_ptr_reg_write(entry, buffer, 0x20);
+}
+	
+
+static void snd_emu_proc_ptr_reg_read00a(snd_info_entry_t *entry,
+					 snd_info_buffer_t * buffer)
+{
+	snd_emu_proc_ptr_reg_read(entry, buffer, 0, 0, 0x40);
+}
+
+static void snd_emu_proc_ptr_reg_read00b(snd_info_entry_t *entry,
+					 snd_info_buffer_t * buffer)
+{
+	snd_emu_proc_ptr_reg_read(entry, buffer, 0, 0x40, 0x40);
+}
+
+static void snd_emu_proc_ptr_reg_read20a(snd_info_entry_t *entry,
+					 snd_info_buffer_t * buffer)
+{
+	snd_emu_proc_ptr_reg_read(entry, buffer, 0x20, 0, 0x40);
+}
+
+static void snd_emu_proc_ptr_reg_read20b(snd_info_entry_t *entry,
+					 snd_info_buffer_t * buffer)
+{
+	snd_emu_proc_ptr_reg_read(entry, buffer, 0x20, 0x40, 0x40);
+}
+#endif
+
 static struct snd_info_entry_ops snd_emu10k1_proc_ops_fx8010 = {
 	.read = snd_emu10k1_fx8010_read,
 };
@@ -316,9 +475,36 @@
 int __devinit snd_emu10k1_proc_init(emu10k1_t * emu)
 {
 	snd_info_entry_t *entry;
+#ifdef CONFIG_SND_DEBUG
+	if (! snd_card_proc_new(emu->card, "io_regs", &entry)) {
+		snd_info_set_text_ops(entry, emu, 1024, snd_emu_proc_io_reg_read);
+		entry->c.text.write_size = 64;
+		entry->c.text.write = snd_emu_proc_io_reg_write;
+	}
+	if (! snd_card_proc_new(emu->card, "ptr_regs00a", &entry)) {
+		snd_info_set_text_ops(entry, emu, 1024, snd_emu_proc_ptr_reg_read00a);
+		entry->c.text.write_size = 64;
+		entry->c.text.write = snd_emu_proc_ptr_reg_write00;
+	}
+	if (! snd_card_proc_new(emu->card, "ptr_regs00b", &entry)) {
+		snd_info_set_text_ops(entry, emu, 1024, snd_emu_proc_ptr_reg_read00b);
+		entry->c.text.write_size = 64;
+		entry->c.text.write = snd_emu_proc_ptr_reg_write00;
+	}
+	if (! snd_card_proc_new(emu->card, "ptr_regs20a", &entry)) {
+		snd_info_set_text_ops(entry, emu, 1024, snd_emu_proc_ptr_reg_read20a);
+		entry->c.text.write_size = 64;
+		entry->c.text.write = snd_emu_proc_ptr_reg_write20;
+	}
+	if (! snd_card_proc_new(emu->card, "ptr_regs20b", &entry)) {
+		snd_info_set_text_ops(entry, emu, 1024, snd_emu_proc_ptr_reg_read20b);
+		entry->c.text.write_size = 64;
+		entry->c.text.write = snd_emu_proc_ptr_reg_write20;
+	}
+#endif
 	
 	if (! snd_card_proc_new(emu->card, "emu10k1", &entry))
-		snd_info_set_text_ops(entry, emu, 1024, snd_emu10k1_proc_read);
+		snd_info_set_text_ops(entry, emu, 2048, snd_emu10k1_proc_read);
 
 	if (! snd_card_proc_new(emu->card, "fx8010_gpr", &entry)) {
 		entry->content = SNDRV_INFO_CONTENT_DATA;
diff -Nru a/sound/pci/emu10k1/io.c b/sound/pci/emu10k1/io.c
--- a/sound/pci/emu10k1/io.c	2005-01-10 20:11:17 -08:00
+++ b/sound/pci/emu10k1/io.c	2005-01-10 20:11:17 -08:00
@@ -313,28 +313,3 @@
 	return 0;		/* Should never reach this point */
 }
 
-/*
- *  Returns an attenuation based upon a cumulative volume value
- *  Algorithm calculates 0x200 - 0x10 log2 (input)
- */
- 
-unsigned char snd_emu10k1_sum_vol_attn(unsigned int value)
-{
-	unsigned short count = 16, ans;
-
-	if (value == 0)
-		return 0xFF;
-
-	/* Find first SET bit. This is the integer part of the value */
-	while ((value & 0x10000) == 0) {
-		value <<= 1;
-		count--;
-	}
-
-	/* The REST of the data is the fractional part. */
-	ans = (unsigned short) (0x110 - ((count << 4) + ((value & 0x0FFFFL) >> 12)));
-	if (ans > 0xFF)
-		ans = 0xFF;
-
-	return (unsigned char) ans;
-}
diff -Nru a/sound/pci/emu10k1/irq.c b/sound/pci/emu10k1/irq.c
--- a/sound/pci/emu10k1/irq.c	2005-01-10 20:11:21 -08:00
+++ b/sound/pci/emu10k1/irq.c	2005-01-10 20:11:21 -08:00
@@ -112,8 +112,8 @@
 			status &= ~(IPR_A_MIDITRANSBUFEMPTY2|IPR_A_MIDIRECVBUFEMPTY2);
 		}
 		if (status & IPR_INTERVALTIMER) {
-			if (emu->timer_interrupt)
-				emu->timer_interrupt(emu);
+			if (emu->timer)
+				snd_timer_interrupt(emu->timer, emu->timer->sticks);
 			else
 				snd_emu10k1_intr_disable(emu, INTE_INTERVALTIMERENB);
 			status &= ~IPR_INTERVALTIMER;
diff -Nru a/sound/pci/emu10k1/timer.c b/sound/pci/emu10k1/timer.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/sound/pci/emu10k1/timer.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,99 @@
+/*
+ *  Copyright (c) by Lee Revell <rlrevell@joe-job.com>
+ *  
+ *  Routines for control of EMU10K1 chips
+ *
+ *  Copied from similar code by Clemens Ladisch in the ymfpci driver
+ * 
+ *  BUGS:
+ *    --
+ *
+ *  TODO:
+ *    --
+ *
+ *   This program is free software; you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation; either version 2 of the License, or
+ *   (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+ *
+ */
+
+#include <sound/driver.h>
+#include <linux/time.h>
+#include <sound/core.h>
+#include <sound/emu10k1.h>
+
+static int snd_emu10k1_timer_start(snd_timer_t *timer)
+{
+	emu10k1_t *emu;
+	unsigned long flags;
+	unsigned int delay;
+
+	emu = snd_timer_chip(timer);
+	delay = timer->sticks - 1;
+	if (delay < 5 ) /* minimum time is 5 ticks */
+		delay = 5;
+	spin_lock_irqsave(&emu->reg_lock, flags);
+	snd_emu10k1_intr_enable(emu, INTE_INTERVALTIMERENB);
+	outw(delay & TIMER_RATE_MASK, emu->port + TIMER);
+	spin_unlock_irqrestore(&emu->reg_lock, flags);
+	return 0;
+}
+
+static int snd_emu10k1_timer_stop(snd_timer_t *timer)
+{
+	emu10k1_t *emu;
+	unsigned long flags;
+
+	emu = snd_timer_chip(timer);
+	spin_lock_irqsave(&emu->reg_lock, flags);
+	snd_emu10k1_intr_disable(emu, INTE_INTERVALTIMERENB);
+	spin_unlock_irqrestore(&emu->reg_lock, flags);
+	return 0;
+}
+
+static int snd_emu10k1_timer_precise_resolution(snd_timer_t *timer,
+					       unsigned long *num, unsigned long *den)
+{
+	*num = 1;
+	*den = 48000;
+	return 0;
+}
+
+static struct _snd_timer_hardware snd_emu10k1_timer_hw = {
+	.flags = SNDRV_TIMER_HW_AUTO,
+	.resolution = 20833, /* 1 sample @ 48KHZ = 20.833...us */
+	.ticks = 1024,
+	.start = snd_emu10k1_timer_start,
+	.stop = snd_emu10k1_timer_stop,
+	.precise_resolution = snd_emu10k1_timer_precise_resolution,
+};
+
+int __devinit snd_emu10k1_timer(emu10k1_t *emu, int device)
+{
+	snd_timer_t *timer = NULL;
+	snd_timer_id_t tid;
+	int err;
+
+	tid.dev_class = SNDRV_TIMER_CLASS_CARD;
+	tid.dev_sclass = SNDRV_TIMER_SCLASS_NONE;
+	tid.card = emu->card->number;
+	tid.device = device;
+	tid.subdevice = 0;
+	if ((err = snd_timer_new(emu->card, "EMU10K1", &tid, &timer)) >= 0) {
+		strcpy(timer->name, "EMU10K1 timer");
+		timer->private_data = emu;
+		timer->hw = snd_emu10k1_timer_hw;
+	}
+	emu->timer = timer;
+	return err;
+}
diff -Nru a/sound/pci/ens1370.c b/sound/pci/ens1370.c
--- a/sound/pci/ens1370.c	2005-01-10 20:11:21 -08:00
+++ b/sound/pci/ens1370.c	2005-01-10 20:11:21 -08:00
@@ -573,24 +573,18 @@
 				   unsigned short reg, unsigned short val)
 {
 	ensoniq_t *ensoniq = ak4531->private_data;
-	unsigned long flags;
 	unsigned long end_time = jiffies + HZ / 10;
 
 #if 0
 	printk("CODEC WRITE: reg = 0x%x, val = 0x%x (0x%x), creg = 0x%x\n", reg, val, ES_1370_CODEC_WRITE(reg, val), ES_REG(ensoniq, 1370_CODEC));
 #endif
 	do {
-		spin_lock_irqsave(&ensoniq->reg_lock, flags);
 		if (!(inl(ES_REG(ensoniq, STATUS)) & ES_1370_CSTAT)) {
 			outw(ES_1370_CODEC_WRITE(reg, val), ES_REG(ensoniq, 1370_CODEC));
-			spin_unlock_irqrestore(&ensoniq->reg_lock, flags);
 			return;
 		}
-		spin_unlock_irqrestore(&ensoniq->reg_lock, flags);
-#if 0
 		set_current_state(TASK_UNINTERRUPTIBLE);
 		schedule_timeout(1);
-#endif
 	} while (time_after(end_time, jiffies));
 	snd_printk("codec write timeout, status = 0x%x\n", inl(ES_REG(ensoniq, STATUS)));
 }
@@ -603,11 +597,10 @@
 				   unsigned short reg, unsigned short val)
 {
 	ensoniq_t *ensoniq = ac97->private_data;
-	unsigned long flags;
 	unsigned int t, x;
 
+	down(&ensoniq->src_mutex);
 	for (t = 0; t < POLL_COUNT; t++) {
-		spin_lock_irqsave(&ensoniq->reg_lock, flags);
 		if (!(inl(ES_REG(ensoniq, 1371_CODEC)) & ES_1371_CODEC_WIP)) {
 			/* save the current state for latter */
 			x = snd_es1371_wait_src_ready(ensoniq);
@@ -629,11 +622,11 @@
 			/* restore SRC reg */
 			snd_es1371_wait_src_ready(ensoniq);
 			outl(x, ES_REG(ensoniq, 1371_SMPRATE));
-			spin_unlock_irqrestore(&ensoniq->reg_lock, flags);
+			up(&ensoniq->src_mutex);
 			return;
 		}
-		spin_unlock_irqrestore(&ensoniq->reg_lock, flags);
 	}
+	up(&ensoniq->src_mutex);
 	snd_printk("codec write timeout at 0x%lx [0x%x]\n", ES_REG(ensoniq, 1371_CODEC), inl(ES_REG(ensoniq, 1371_CODEC)));
 }
 
@@ -641,12 +634,11 @@
 					    unsigned short reg)
 {
 	ensoniq_t *ensoniq = ac97->private_data;
-	unsigned long flags;
 	unsigned int t, x, fail = 0;
 
       __again:
+	down(&ensoniq->src_mutex);
 	for (t = 0; t < POLL_COUNT; t++) {
-		spin_lock_irqsave(&ensoniq->reg_lock, flags);
 		if (!(inl(ES_REG(ensoniq, 1371_CODEC)) & ES_1371_CODEC_WIP)) {
 			/* save the current state for latter */
 			x = snd_es1371_wait_src_ready(ensoniq);
@@ -676,19 +668,19 @@
 			/* now wait for the stinkin' data (RDY) */
 			for (t = 0; t < POLL_COUNT; t++) {
 				if ((x = inl(ES_REG(ensoniq, 1371_CODEC))) & ES_1371_CODEC_RDY) {
-					spin_unlock_irqrestore(&ensoniq->reg_lock, flags);
+					up(&ensoniq->src_mutex);
 					return ES_1371_CODEC_READ(x);
 				}
 			}
-			spin_unlock_irqrestore(&ensoniq->reg_lock, flags);
+			up(&ensoniq->src_mutex);
 			if (++fail > 10) {
 				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);
 	}
+	up(&ensoniq->src_mutex);
 	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;
 }
@@ -1635,8 +1627,10 @@
 		if (err < 0)
 			return err;
 	}
-	if ((ensoniq->subsystem_vendor_id == 0x1274) &&
-	    (ensoniq->subsystem_device_id == 0x2000)) { /* GA-7DXR */
+	if (((ensoniq->subsystem_vendor_id == 0x1274) &&
+	    (ensoniq->subsystem_device_id == 0x2000)) || /* GA-7DXR */
+	    ((ensoniq->subsystem_vendor_id == 0x1458) &&
+	    (ensoniq->subsystem_device_id == 0xa000))) { /* GA-8IEXP */
 		 err = snd_ctl_add(card, snd_ctl_new1(&snd_ens1373_line, ensoniq));
 		 if (err < 0)
 			 return err;
@@ -1930,7 +1924,6 @@
 	ensoniq->subsystem_vendor_id = cmdw;
 	pci_read_config_word(pci, PCI_SUBSYSTEM_ID, &cmdw);
 	ensoniq->subsystem_device_id = cmdw;
-	snd_ensoniq_proc_init(ensoniq);
 #ifdef CHIP1370
 #if 0
 	ensoniq->ctrl = ES_1370_CDC_EN | ES_1370_SERR_DISABLE | ES_1370_PCLKDIVO(ES_1370_SRTODIV(8000));
@@ -2022,6 +2015,8 @@
 		snd_ensoniq_free(ensoniq);
 		return err;
 	}
+
+	snd_ensoniq_proc_init(ensoniq);
 
 	snd_card_set_dev(card, &pci->dev);
 
diff -Nru a/sound/pci/es1938.c b/sound/pci/es1938.c
--- a/sound/pci/es1938.c	2005-01-10 20:11:20 -08:00
+++ b/sound/pci/es1938.c	2005-01-10 20:11:20 -08:00
@@ -1395,7 +1395,6 @@
 	outb(0x00, SLIO_REG(chip, IRQCONTROL)); /* disable irqs */
 
 	pci_disable_device(chip->pci);
-	snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
 	return 0;
 }
 
@@ -1415,7 +1414,6 @@
 			snd_es1938_write(chip, *s, *d);
 	}
 
-	snd_power_change_state(card, SNDRV_CTL_POWER_D0);
 	return 0;
 }
 #endif /* CONFIG_PM */
@@ -1424,8 +1422,9 @@
 {
 	/* disable irqs */
 	outb(0x00, SLIO_REG(chip, IRQCONTROL));
-	/*if (chip->rmidi)
-	  snd_es1938_mixer_bits(chip, ESSSB_IREG_MPU401CONTROL, 0x40, 0);*/
+	if (chip->rmidi)
+		snd_es1938_mixer_bits(chip, ESSSB_IREG_MPU401CONTROL, 0x40, 0);
+
 #if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE))
 	if (chip->gameport.io)
 		gameport_unregister_port(&chip->gameport);
@@ -1576,6 +1575,9 @@
 
 	/* MPU401 */
 	if (status & 0x80) {
+		// the following line is evil! It switches off MIDI interrupt handling after the first interrupt received.
+		// replacing the last 0 by 0x40 works for ESS-Solo1, but just doing nothing works as well!
+		// andreas@flying-snail.de
 		// snd_es1938_mixer_bits(chip, ESSSB_IREG_MPU401CONTROL, 0x40, 0); /* ack? */
 		if (chip->rmidi) {
 			handled = 1;
@@ -1690,8 +1692,11 @@
 	if (snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401,
 				chip->mpu_port, 1, chip->irq, 0, &chip->rmidi) < 0) {
 		printk(KERN_ERR "es1938: unable to initialize MPU-401\n");
-	} /*else
-	    snd_es1938_mixer_bits(chip, ESSSB_IREG_MPU401CONTROL, 0x40, 0x40);*/
+	} else {
+		// this line is vital for MIDI interrupt handling on ess-solo1
+		// andreas@flying-snail.de
+		snd_es1938_mixer_bits(chip, ESSSB_IREG_MPU401CONTROL, 0x40, 0x40);
+	}
 
 #if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE))
 	chip->gameport.io = chip->game_port;
diff -Nru a/sound/pci/es1968.c b/sound/pci/es1968.c
--- a/sound/pci/es1968.c	2005-01-10 20:11:21 -08:00
+++ b/sound/pci/es1968.c	2005-01-10 20:11:21 -08:00
@@ -584,7 +584,7 @@
 	snd_rawmidi_t *rmidi;
 
 	spinlock_t reg_lock;
-	struct semaphore ac97_mutex;	/* ac97 lock */
+	spinlock_t ac97_lock;
 	struct tasklet_struct hwvol_tq;
 
 	/* Maestro Stuff */
@@ -686,35 +686,36 @@
 static void snd_es1968_ac97_write(ac97_t *ac97, unsigned short reg, unsigned short val)
 {
 	es1968_t *chip = ac97->private_data;
+	unsigned long flags;
 
-	down(&chip->ac97_mutex);
 	snd_es1968_ac97_wait(chip);
 
 	/* Write the bus */
+	spin_lock_irqsave(&chip->ac97_lock, flags);
 	outw(val, chip->io_port + ESM_AC97_DATA);
-	msleep(1);
+	/*msleep(1);*/
 	outb(reg, chip->io_port + ESM_AC97_INDEX);
-	msleep(1);
-
-	up(&chip->ac97_mutex);
+	/*msleep(1);*/
+	spin_unlock_irqrestore(&chip->ac97_lock, flags);
 }
 
 static unsigned short snd_es1968_ac97_read(ac97_t *ac97, unsigned short reg)
 {
 	u16 data = 0;
 	es1968_t *chip = ac97->private_data;
+	unsigned long flags;
 
-	down(&chip->ac97_mutex);
 	snd_es1968_ac97_wait(chip);
 
+	spin_lock_irqsave(&chip->ac97_lock, flags);
 	outb(reg | 0x80, chip->io_port + ESM_AC97_INDEX);
-	msleep(1);
+	/*msleep(1);*/
 
 	if (! snd_es1968_ac97_wait(chip)) {
 		data = inw(chip->io_port + ESM_AC97_DATA);
-		msleep(1);
+		/*msleep(1);*/
 	}
-	up(&chip->ac97_mutex);
+	spin_unlock_irqrestore(&chip->ac97_lock, flags);
 
 	return data;
 }
@@ -837,23 +838,19 @@
 static void snd_es1968_bob_stop(es1968_t *chip)
 {
 	u16 reg;
-	unsigned long flags;
 
-	spin_lock_irqsave(&chip->reg_lock, flags);
 	reg = __maestro_read(chip, 0x11);
 	reg &= ~ESM_BOB_ENABLE;
 	__maestro_write(chip, 0x11, reg);
 	reg = __maestro_read(chip, 0x17);
 	reg &= ~ESM_BOB_START;
 	__maestro_write(chip, 0x17, reg);
-	spin_unlock_irqrestore(&chip->reg_lock, flags);
 }
 
 static void snd_es1968_bob_start(es1968_t *chip)
 {
 	int prescale;
 	int divide;
-	unsigned long flags;
 
 	/* compute ideal interrupt frequency for buffer size & play rate */
 	/* first, find best prescaler value to match freq */
@@ -882,13 +879,11 @@
 	} else if (divide > 1)
 		divide--;
 
-	spin_lock_irqsave(&chip->reg_lock, flags);
 	__maestro_write(chip, 6, 0x9000 | (prescale << 5) | divide);	/* set reg */
 
 	/* Now set IDR 11/17 */
 	__maestro_write(chip, 0x11, __maestro_read(chip, 0x11) | 1);
 	__maestro_write(chip, 0x17, __maestro_read(chip, 0x17) | 1);
-	spin_unlock_irqrestore(&chip->reg_lock, flags);
 }
 
 /* call with substream spinlock */
@@ -1931,6 +1926,7 @@
 {
 	es1968_t *chip = (es1968_t *) private_data;
 	int x, val;
+	unsigned long flags;
 
 	/* Figure out which volume control button was pushed,
 	   based on differences from the default register
@@ -1945,11 +1941,15 @@
 	if (! chip->master_switch || ! chip->master_volume)
 		return;
 
-	/* FIXME: more clean up is needed.. */
+	/* FIXME: we can't call snd_ac97_* functions since here is in tasklet. */
+	spin_lock_irqsave(&chip->ac97_lock, flags);
 	val = chip->ac97->regs[AC97_MASTER];
 	if (x & 1) {
 		/* mute */
-		snd_ac97_write_cache(chip->ac97, AC97_MASTER, val ^ 0x8000);
+		val ^= 0x8000;
+		chip->ac97->regs[AC97_MASTER] = val;
+		outw(val, chip->io_port + ESM_AC97_DATA);
+		outb(AC97_MASTER, chip->io_port + ESM_AC97_INDEX);
 		snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_VALUE,
 			       &chip->master_switch->id);
 	} else {
@@ -1967,10 +1967,13 @@
 			if ((val & 0xff00) < 0x1f00)
 				val += 0x0100;
 		}
-		snd_ac97_write_cache(chip->ac97, AC97_MASTER, val);
+		chip->ac97->regs[AC97_MASTER] = val;
+		outw(val, chip->io_port + ESM_AC97_DATA);
+		outb(AC97_MASTER, chip->io_port + ESM_AC97_INDEX);
 		snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_VALUE,
 			       &chip->master_volume->id);
 	}
+	spin_unlock_irqrestore(&chip->ac97_lock, flags);
 }
 
 /*
@@ -2034,6 +2037,7 @@
 
 	if ((err = snd_ac97_bus(chip->card, 0, &ops, NULL, &pbus)) < 0)
 		return err;
+	pbus->no_vra = 1; /* ES1968 doesn't need VRA */
 
 	memset(&ac97, 0, sizeof(ac97));
 	ac97.private_data = chip;
@@ -2412,7 +2416,6 @@
 	snd_es1968_bob_stop(chip);
 	snd_es1968_set_acpi(chip, ACPI_D3);
 	pci_disable_device(chip->pci);
-	snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
 	return 0;
 }
 
@@ -2443,7 +2446,6 @@
 	if (chip->bobclient)
 		snd_es1968_bob_start(chip);
 
-	snd_power_change_state(card, SNDRV_CTL_POWER_D0);
 	return 0;
 }
 #endif /* CONFIG_PM */
@@ -2537,7 +2539,7 @@
 	spin_lock_init(&chip->substream_lock);
 	INIT_LIST_HEAD(&chip->buf_list);
 	INIT_LIST_HEAD(&chip->substream_list);
-	init_MUTEX(&chip->ac97_mutex);
+	spin_lock_init(&chip->ac97_lock);
 	init_MUTEX(&chip->memory_mutex);
 	tasklet_init(&chip->hwvol_tq, es1968_update_hw_volume, (unsigned long)chip);
 	chip->card = card;
diff -Nru a/sound/pci/fm801.c b/sound/pci/fm801.c
--- a/sound/pci/fm801.c	2005-01-10 20:11:21 -08:00
+++ b/sound/pci/fm801.c	2005-01-10 20:11:21 -08:00
@@ -208,15 +208,16 @@
 				 unsigned short mask, unsigned short value)
 {
 	int change;
+	unsigned long flags;
 	unsigned short old, new;
 
-	spin_lock(&chip->reg_lock);
+	spin_lock_irqsave(&chip->reg_lock, flags);
 	old = inw(chip->port + reg);
 	new = (old & ~mask) | value;
 	change = old != new;
 	if (change)
 		outw(new, chip->port + reg);
-	spin_unlock(&chip->reg_lock);
+	spin_unlock_irqrestore(&chip->reg_lock, flags);
 	return change;
 }
 
@@ -415,13 +416,12 @@
 
 static int snd_fm801_playback_prepare(snd_pcm_substream_t * substream)
 {
-	unsigned long flags;
 	fm801_t *chip = snd_pcm_substream_chip(substream);
 	snd_pcm_runtime_t *runtime = substream->runtime;
 
 	chip->ply_size = snd_pcm_lib_buffer_bytes(substream);
 	chip->ply_count = snd_pcm_lib_period_bytes(substream);
-	spin_lock_irqsave(&chip->reg_lock, flags);
+	spin_lock_irq(&chip->reg_lock);
 	chip->ply_ctrl &= ~(FM801_START | FM801_16BIT |
 			     FM801_STEREO | FM801_RATE_MASK |
 			     FM801_CHANNELS_MASK);
@@ -442,19 +442,18 @@
 	chip->ply_pos = 0;
 	outl(chip->ply_buffer, FM801_REG(chip, PLY_BUF1));
 	outl(chip->ply_buffer + (chip->ply_count % chip->ply_size), FM801_REG(chip, PLY_BUF2));
-	spin_unlock_irqrestore(&chip->reg_lock, flags);
+	spin_unlock_irq(&chip->reg_lock);
 	return 0;
 }
 
 static int snd_fm801_capture_prepare(snd_pcm_substream_t * substream)
 {
-	unsigned long flags;
 	fm801_t *chip = snd_pcm_substream_chip(substream);
 	snd_pcm_runtime_t *runtime = substream->runtime;
 
 	chip->cap_size = snd_pcm_lib_buffer_bytes(substream);
 	chip->cap_count = snd_pcm_lib_period_bytes(substream);
-	spin_lock_irqsave(&chip->reg_lock, flags);
+	spin_lock_irq(&chip->reg_lock);
 	chip->cap_ctrl &= ~(FM801_START | FM801_16BIT |
 			     FM801_STEREO | FM801_RATE_MASK);
 	if (snd_pcm_format_width(runtime->format) == 16)
@@ -469,7 +468,7 @@
 	chip->cap_pos = 0;
 	outl(chip->cap_buffer, FM801_REG(chip, CAP_BUF1));
 	outl(chip->cap_buffer + (chip->cap_count % chip->cap_size), FM801_REG(chip, CAP_BUF2));
-	spin_unlock_irqrestore(&chip->reg_lock, flags);
+	spin_unlock_irq(&chip->reg_lock);
 	return 0;
 }
 
diff -Nru a/sound/pci/ice1712/ak4xxx.c b/sound/pci/ice1712/ak4xxx.c
--- a/sound/pci/ice1712/ak4xxx.c	2005-01-10 20:11:15 -08:00
+++ b/sound/pci/ice1712/ak4xxx.c	2005-01-10 20:11:15 -08:00
@@ -151,8 +151,7 @@
 		return;
 	for (akidx = 0; akidx < ice->akm_codecs; akidx++) {
 		akm4xxx_t *ak = &ice->akm[akidx];
-		if (ak->private_value[0])
-			kfree((void *)ak->private_value[0]);
+		kfree((void*)ak->private_value[0]);
 	}
 	kfree(ice->akm);
 }
diff -Nru a/sound/pci/ice1712/aureon.c b/sound/pci/ice1712/aureon.c
--- a/sound/pci/ice1712/aureon.c	2005-01-10 20:11:24 -08:00
+++ b/sound/pci/ice1712/aureon.c	2005-01-10 20:11:24 -08:00
@@ -27,18 +27,10 @@
  *   both controls in the future, once if wm codecs are reused in
  *   many boards.
  *
- * - writing over SPI is implemented but reading is not yet.
- *   the SPDIF-in channel status, etc. can be read from CS chip.
- *
  * - DAC digital volumes are not implemented in the mixer.
  *   if they show better response than DAC analog volumes, we can use them
  *   instead.
  *
- * - Aureon boards are equipped with AC97 codec, too.  it's used to do
- *   the analog mixing but not easily controllable (it's not connected
- *   directly from envy24ht chip).  so let's leave it as it is.
- *
- *
  *   Lowlevel functions for AudioTrak Prodigy 7.1 (and possibly 192) cards
  *      Copyright (c) 2003 Dimitromanolakis Apostolos <apostol@cs.utoronto.ca>
  *
@@ -53,10 +45,6 @@
  *                    we have no digital output, no capture, pretty bad clicks and poops
  *                    on mixer switch and other coll stuff.
  *
- * - Prodigy boards are equipped with AC97 STAC9744 chip , too.  it's used to do
- *   the analog mixing but not easily controllable (it's not connected
- *   directly from envy24ht chip).  so let's leave it as it is.
- *
  */      
 
 #include <sound/driver.h>
@@ -89,6 +77,14 @@
 #define WM_OUT_MUX2		0x1e	/* output MUX */
 #define WM_RESET		0x1f	/* software reset */
 
+/* CS8415A registers */
+#define CS8415_CTRL1	0x01
+#define CS8415_CTRL2	0x02
+#define CS8415_QSUB		0x14
+#define CS8415_RATIO	0x1E
+#define CS8415_C_BUFFER	0x20
+#define CS8415_ID		0x7F
+
 static void aureon_ac97_write(ice1712_t *ice, unsigned short reg, unsigned short val) {
 	unsigned int tmp;
 
@@ -325,47 +321,109 @@
 static void aureon_spi_write(ice1712_t *ice, unsigned int cs, unsigned int data, int bits)
 {
 	unsigned int tmp;
-	unsigned int cscs;
 	int i;
 
 	tmp = snd_ice1712_gpio_read(ice);
 
-	if (ice->eeprom.subvendor == VT1724_SUBDEVICE_PRODIGY71)
-		cscs = PRODIGY_CS8415_CS;
-	else
-		cscs = AUREON_CS8415_CS;
-
-	snd_ice1712_gpio_set_mask(ice, ~(AUREON_WM_RW|AUREON_WM_DATA|AUREON_WM_CLK|
-					 AUREON_WM_CS|cscs));
+	snd_ice1712_gpio_set_mask(ice, ~(AUREON_WM_RW|AUREON_SPI_MOSI|AUREON_SPI_CLK|
+					 AUREON_WM_CS|AUREON_CS8415_CS));
 	tmp |= AUREON_WM_RW;
 	tmp &= ~cs;
 	snd_ice1712_gpio_write(ice, tmp);
 	udelay(1);
 
 	for (i = bits - 1; i >= 0; i--) {
-		tmp &= ~AUREON_WM_CLK;
+		tmp &= ~AUREON_SPI_CLK;
 		snd_ice1712_gpio_write(ice, tmp);
 		udelay(1);
 		if (data & (1 << i))
-			tmp |= AUREON_WM_DATA;
+			tmp |= AUREON_SPI_MOSI;
 		else
-			tmp &= ~AUREON_WM_DATA;
+			tmp &= ~AUREON_SPI_MOSI;
 		snd_ice1712_gpio_write(ice, tmp);
 		udelay(1);
-		tmp |= AUREON_WM_CLK;
+		tmp |= AUREON_SPI_CLK;
 		snd_ice1712_gpio_write(ice, tmp);
 		udelay(1);
 	}
 
-	tmp &= ~AUREON_WM_CLK;
+	tmp &= ~AUREON_SPI_CLK;
 	tmp |= cs;
 	snd_ice1712_gpio_write(ice, tmp);
 	udelay(1);
-	tmp |= AUREON_WM_CLK;
+	tmp |= AUREON_SPI_CLK;
+	snd_ice1712_gpio_write(ice, tmp);
+	udelay(1);
+}
+
+/*
+ * Read data in SPI mode
+ */
+static void aureon_spi_read(ice1712_t *ice, unsigned int cs, unsigned int data, int bits, unsigned char *buffer, int size) {
+	int i, j;
+	unsigned int tmp;
+
+	tmp = (snd_ice1712_gpio_read(ice) & ~AUREON_SPI_CLK) | AUREON_CS8415_CS|AUREON_WM_CS;
+	snd_ice1712_gpio_write(ice, tmp);
+	tmp &= ~cs;
 	snd_ice1712_gpio_write(ice, tmp);
 	udelay(1);
+
+	for (i=bits-1; i>=0; i--) {
+		if (data & (1 << i))
+			tmp |= AUREON_SPI_MOSI;
+		else
+			tmp &= ~AUREON_SPI_MOSI;
+		snd_ice1712_gpio_write(ice, tmp);
+		udelay(1);
+
+		tmp |= AUREON_SPI_CLK;
+		snd_ice1712_gpio_write(ice, tmp);
+		udelay(1);
+
+		tmp &= ~AUREON_SPI_CLK;
+		snd_ice1712_gpio_write(ice, tmp);
+		udelay(1);
+	}
+
+	for (j=0; j<size; j++) {
+		unsigned char outdata = 0;
+		for (i=7; i>=0; i--) {
+			tmp = snd_ice1712_gpio_read(ice);
+			outdata <<= 1;
+			outdata |= (tmp & AUREON_SPI_MISO) ? 1 : 0;
+			udelay(1);
+
+			tmp |= AUREON_SPI_CLK;
+			snd_ice1712_gpio_write(ice, tmp);
+			udelay(1);
+
+			tmp &= ~AUREON_SPI_CLK;
+			snd_ice1712_gpio_write(ice, tmp);
+			udelay(1);
+		}
+		buffer[j] = outdata;
+	}
+
+	tmp |= cs;
+	snd_ice1712_gpio_write(ice, tmp);
+}
+
+static unsigned char aureon_cs8415_get(ice1712_t *ice, int reg) {
+	unsigned char val;
+	aureon_spi_write(ice, AUREON_CS8415_CS, 0x2000 | reg, 16);
+	aureon_spi_read(ice, AUREON_CS8415_CS, 0x21, 8, &val, 1);
+	return val;
+}
+
+static void aureon_cs8415_read(ice1712_t *ice, int reg, unsigned char *buffer, int size) {
+	aureon_spi_write(ice, AUREON_CS8415_CS, 0x2000 | reg, 16);
+	aureon_spi_read(ice, AUREON_CS8415_CS, 0x21, 8, buffer, size);
+}
+
+static void aureon_cs8415_put(ice1712_t *ice, int reg, unsigned char val) {
+	aureon_spi_write(ice, AUREON_CS8415_CS, 0x200000 | (reg << 8) | val, 24);
 }
-     
 
 /*
  * get the current register value of WM codec
@@ -845,12 +903,32 @@
 		"Mic",		//AIN4
 		"AC97"		//AIN5
 	};
+	static char *universe_texts[] = {
+		"Aux1",		//AIN1
+		"CD",		//AIN2
+		"Phono",	//AIN3
+		"Line",		//AIN4
+		"Aux2",		//AIN5
+		"Mic",		//AIN6
+		"Aux3",		//AIN7
+		"AC97"		//AIN8
+	};
+	ice1712_t *ice = snd_kcontrol_chip(kcontrol);
+
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
 	uinfo->count = 2;
-	uinfo->value.enumerated.items = 5;
-	if (uinfo->value.enumerated.item >= uinfo->value.enumerated.items)
-		uinfo->value.enumerated.item = uinfo->value.enumerated.items - 1;
-	strcpy(uinfo->value.enumerated.name, texts[uinfo->value.enumerated.item]);
+	if (ice->eeprom.subvendor == VT1724_SUBDEVICE_AUREON71_UNIVERSE) {
+		uinfo->value.enumerated.items = 8;
+		if (uinfo->value.enumerated.item >= uinfo->value.enumerated.items)
+			uinfo->value.enumerated.item = uinfo->value.enumerated.items - 1;
+		strcpy(uinfo->value.enumerated.name, universe_texts[uinfo->value.enumerated.item]);
+	}
+	else {
+		uinfo->value.enumerated.items = 5;
+		if (uinfo->value.enumerated.item >= uinfo->value.enumerated.items)
+			uinfo->value.enumerated.item = uinfo->value.enumerated.items - 1;
+		strcpy(uinfo->value.enumerated.name, texts[uinfo->value.enumerated.item]);
+	}
 	return 0;
 }
 
@@ -886,6 +964,154 @@
 }
 
 /*
+ * CS8415 Input mux
+ */
+static int aureon_cs8415_mux_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
+{
+	ice1712_t *ice = snd_kcontrol_chip(kcontrol);
+	static char *aureon_texts[] = {
+		"CD",		//RXP0
+		"Optical"	//RXP1
+	};
+	static char *prodigy_texts[] = {
+		"CD",
+		"Coax"
+	};
+	uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
+	uinfo->count = 1;
+	uinfo->value.enumerated.items = 2;
+	if (uinfo->value.enumerated.item >= uinfo->value.enumerated.items)
+		uinfo->value.enumerated.item = uinfo->value.enumerated.items - 1;
+	if (ice->eeprom.subvendor == VT1724_SUBDEVICE_PRODIGY71)
+		strcpy(uinfo->value.enumerated.name, prodigy_texts[uinfo->value.enumerated.item]);
+	else
+		strcpy(uinfo->value.enumerated.name, aureon_texts[uinfo->value.enumerated.item]);
+	return 0;
+}
+
+static int aureon_cs8415_mux_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontrol)
+{
+	ice1712_t *ice = snd_kcontrol_chip(kcontrol);
+
+	//snd_ice1712_save_gpio_status(ice);
+	//val = aureon_cs8415_get(ice, CS8415_CTRL2);
+	ucontrol->value.integer.value[0] = ice->spec.aureon.cs8415_mux;
+	//snd_ice1712_restore_gpio_status(ice);
+	return 0;
+}
+
+static int aureon_cs8415_mux_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontrol)
+{
+	ice1712_t *ice = snd_kcontrol_chip(kcontrol);
+	unsigned short oval, nval;
+	int change;
+
+	snd_ice1712_save_gpio_status(ice);
+	oval = aureon_cs8415_get(ice, CS8415_CTRL2);
+	nval = oval & ~0x07;
+	nval |= ucontrol->value.integer.value[0] & 7;
+	change = (oval != nval);
+	if (change)
+		aureon_cs8415_put(ice, CS8415_CTRL2, nval);
+	snd_ice1712_restore_gpio_status(ice);
+	ice->spec.aureon.cs8415_mux = ucontrol->value.integer.value[0];
+	return change;
+}
+
+static int aureon_cs8415_rate_info (snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
+{
+	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
+	uinfo->count = 1;
+	uinfo->value.integer.min = 0;
+	uinfo->value.integer.max = 192000;
+	return 0;
+}
+
+static int aureon_cs8415_rate_get (snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+{
+	ice1712_t *ice = snd_kcontrol_chip(kcontrol);
+	unsigned char ratio;
+	ratio = aureon_cs8415_get(ice, CS8415_RATIO);
+	ucontrol->value.integer.value[0] = (int)((unsigned int)ratio * 750);
+	return 0;
+}
+
+/*
+ * CS8415A Mute
+ */
+static int aureon_cs8415_mute_info (snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
+{
+	uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
+	uinfo->count = 1;
+	return 0;
+}
+
+static int aureon_cs8415_mute_get (snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+{
+	ice1712_t *ice = snd_kcontrol_chip(kcontrol);
+	snd_ice1712_save_gpio_status(ice);
+	ucontrol->value.integer.value[0] = (aureon_cs8415_get(ice, CS8415_CTRL1) & 0x20) ? 0 : 1;
+	snd_ice1712_restore_gpio_status(ice);
+	return 0;
+}
+
+static int aureon_cs8415_mute_put (snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+{
+	ice1712_t *ice = snd_kcontrol_chip(kcontrol);
+	unsigned char oval, nval;
+	int change;
+	snd_ice1712_save_gpio_status(ice);
+	oval = aureon_cs8415_get(ice, CS8415_CTRL1);
+	if (ucontrol->value.integer.value[0])
+		nval = oval & ~0x20;
+	else
+		nval = oval | 0x20;
+	if ((change = (oval != nval)))
+		aureon_cs8415_put(ice, CS8415_CTRL1, nval);
+	snd_ice1712_restore_gpio_status(ice);
+	return change;
+}
+
+/*
+ * CS8415A Q-Sub info
+ */
+static int aureon_cs8415_qsub_info (snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) {
+	uinfo->type = SNDRV_CTL_ELEM_TYPE_BYTES;
+	uinfo->count = 10;
+	return 0;
+}
+
+static int aureon_cs8415_qsub_get (snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) {
+	ice1712_t *ice = snd_kcontrol_chip(kcontrol);
+	
+	snd_ice1712_save_gpio_status(ice);
+	aureon_cs8415_read(ice, CS8415_QSUB, ucontrol->value.bytes.data, 10);
+	snd_ice1712_restore_gpio_status(ice);
+
+	return 0;
+}
+
+static int aureon_cs8415_spdif_info (snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) {
+	uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
+	uinfo->count = 1;
+	return 0;
+}
+
+static int aureon_cs8415_mask_get (snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) {
+	memset(ucontrol->value.iec958.status, 0xFF, 24);
+	return 0;
+}
+
+static int aureon_cs8415_spdif_get (snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) {
+	ice1712_t *ice = snd_kcontrol_chip(kcontrol);
+
+	snd_ice1712_save_gpio_status(ice);
+	aureon_cs8415_read(ice, CS8415_C_BUFFER, ucontrol->value.iec958.status, 24);
+	snd_ice1712_restore_gpio_status(ice);
+	return 0;
+}
+
+/*
  * Headphone Amplifier
  */
 static int aureon_set_headphone_amp(ice1712_t *ice, int enable)
@@ -1142,7 +1368,7 @@
 	},
 	{
 		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
-		.name = "Headphone Amplifier Switch",
+		.name = "External Amplifier",
 		.info = aureon_hpamp_info,
 		.get = aureon_hpamp_get,
 		.put = aureon_hpamp_put
@@ -1160,7 +1386,7 @@
 		.info = aureon_oversampling_info,
 		.get = aureon_oversampling_get,
 		.put = aureon_oversampling_put
-	},
+	}
 };
 
 static snd_kcontrol_new_t ac97_controls[] __devinitdata = {
@@ -1246,12 +1472,165 @@
  	},
  	{
  		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
- 		.name = "Mic Boost",
+ 		.name = "Mic Boost (+20dB)",
+ 		.info = aureon_ac97_micboost_info,
+ 		.get = aureon_ac97_micboost_get,
+ 		.put = aureon_ac97_micboost_put
+ 	}
+};
+
+static snd_kcontrol_new_t universe_ac97_controls[] __devinitdata = {
+ 	{
+ 		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+		.name = "AC97 Playback Switch",
+		.info = aureon_ac97_mmute_info,
+		.get = aureon_ac97_mmute_get,
+		.put = aureon_ac97_mmute_put,
+		.private_value = AC97_MASTER
+ 	},
+ 	{
+ 		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+ 		.name = "AC97 Playback Volume",
+ 		.info = aureon_ac97_vol_info,
+ 		.get = aureon_ac97_vol_get,
+ 		.put = aureon_ac97_vol_put,
+ 		.private_value = AC97_MASTER|AUREON_AC97_STEREO
+ 	},
+ 	{
+ 		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+ 		.name = "CD Playback Switch",
+ 		.info = aureon_ac97_mute_info,
+ 		.get = aureon_ac97_mute_get,
+ 		.put = aureon_ac97_mute_put,
+ 		.private_value = AC97_AUX
+ 	},
+ 	{
+ 		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+ 		.name = "CD Playback Volume",
+ 		.info = aureon_ac97_vol_info,
+ 		.get = aureon_ac97_vol_get,
+ 		.put = aureon_ac97_vol_put,
+ 		.private_value = AC97_AUX|AUREON_AC97_STEREO
+ 	},
+ 	{
+ 		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+ 		.name = "Phono Playback Switch",
+ 		.info = aureon_ac97_mute_info,
+ 		.get = aureon_ac97_mute_get,
+ 		.put = aureon_ac97_mute_put,
+ 		.private_value = AC97_CD,
+ 	},
+ 	{
+ 		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+ 		.name = "Phono Playback Volume",
+ 		.info = aureon_ac97_vol_info,
+ 		.get = aureon_ac97_vol_get,
+ 		.put = aureon_ac97_vol_put,
+ 		.private_value = AC97_CD|AUREON_AC97_STEREO
+ 	},
+ 	{
+ 		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+ 		.name = "Line Playback Switch",
+ 		.info = aureon_ac97_mute_info,
+ 		.get = aureon_ac97_mute_get,
+ 		.put = aureon_ac97_mute_put,
+ 		.private_value = AC97_LINE
+ 	},
+ 	{
+ 		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+ 		.name = "Line Playback Volume",
+ 		.info = aureon_ac97_vol_info,
+ 		.get = aureon_ac97_vol_get,
+ 		.put = aureon_ac97_vol_put,
+ 		.private_value = AC97_LINE|AUREON_AC97_STEREO
+ 	},
+ 	{
+ 		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+ 		.name = "Mic Playback Switch",
+ 		.info = aureon_ac97_mute_info,
+ 		.get = aureon_ac97_mute_get,
+ 		.put = aureon_ac97_mute_put,
+ 		.private_value = AC97_MIC
+ 	},
+ 	{
+ 		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+ 		.name = "Mic Playback Volume",
+ 		.info = aureon_ac97_vol_info,
+ 		.get = aureon_ac97_vol_get,
+ 		.put = aureon_ac97_vol_put,
+ 		.private_value = AC97_MIC
+ 	},
+ 	{
+ 		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+ 		.name = "Mic Boost (+20dB)",
  		.info = aureon_ac97_micboost_info,
  		.get = aureon_ac97_micboost_get,
  		.put = aureon_ac97_micboost_put
+ 	},
+ 	{
+ 		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+ 		.name = "Aux Playback Switch",
+ 		.info = aureon_ac97_mute_info,
+ 		.get = aureon_ac97_mute_get,
+ 		.put = aureon_ac97_mute_put,
+ 		.private_value = AC97_VIDEO,
+ 	},
+ 	{
+ 		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+ 		.name = "Aux Playback Volume",
+ 		.info = aureon_ac97_vol_info,
+ 		.get = aureon_ac97_vol_get,
+ 		.put = aureon_ac97_vol_put,
+ 		.private_value = AC97_VIDEO|AUREON_AC97_STEREO
  	}
 };
+
+	
+static snd_kcontrol_new_t cs8415_controls[] __devinitdata = {
+	{
+		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+		.name = SNDRV_CTL_NAME_IEC958("",CAPTURE,SWITCH),
+		.info = aureon_cs8415_mute_info,
+		.get = aureon_cs8415_mute_get,
+		.put = aureon_cs8415_mute_put
+	},
+ 	{
+ 		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+		.name = SNDRV_CTL_NAME_IEC958("",CAPTURE,NONE) "Source",
+		.info = aureon_cs8415_mux_info,
+		.get = aureon_cs8415_mux_get,
+		.put = aureon_cs8415_mux_put,
+	},
+	{
+		.iface = SNDRV_CTL_ELEM_IFACE_PCM,
+		.name = SNDRV_CTL_NAME_IEC958("Q-subcode ",CAPTURE,DEFAULT),
+		.access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE,
+		.info = aureon_cs8415_qsub_info,
+		.get = aureon_cs8415_qsub_get,
+	},
+	{
+		.iface = SNDRV_CTL_ELEM_IFACE_PCM,
+		.name = SNDRV_CTL_NAME_IEC958("",CAPTURE,MASK),
+		.access = SNDRV_CTL_ELEM_ACCESS_READ,
+		.info = aureon_cs8415_spdif_info,
+		.get = aureon_cs8415_mask_get
+	},
+	{
+		.iface = SNDRV_CTL_ELEM_IFACE_PCM,
+		.name = SNDRV_CTL_NAME_IEC958("",CAPTURE,DEFAULT),
+		.access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE,
+		.info = aureon_cs8415_spdif_info,
+		.get = aureon_cs8415_spdif_get
+	},
+	{
+		.iface = SNDRV_CTL_ELEM_IFACE_PCM,
+		.name = SNDRV_CTL_NAME_IEC958("",CAPTURE,NONE) "Rate",
+		.access =SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE,
+		.info = aureon_cs8415_rate_info,
+		.get = aureon_cs8415_rate_get
+	}
+};
+
  
 static int __devinit aureon_add_controls(ice1712_t *ice)
 {
@@ -1273,10 +1652,40 @@
 			return err;
 	}
 	
-	for (i = 0; i < ARRAY_SIZE(ac97_controls); i++) {
-		err = snd_ctl_add(ice->card, snd_ctl_new1(&ac97_controls[i], ice));
-		if (err < 0)
-			return err;
+	if (ice->eeprom.subvendor == VT1724_SUBDEVICE_AUREON71_UNIVERSE) {
+		for (i = 0; i < ARRAY_SIZE(universe_ac97_controls); i++) {
+			err = snd_ctl_add(ice->card, snd_ctl_new1(&universe_ac97_controls[i], ice));
+			if (err < 0)
+				return err;
+		}
+	}
+	else {
+		for (i = 0; i < ARRAY_SIZE(ac97_controls); i++) {
+			err = snd_ctl_add(ice->card, snd_ctl_new1(&ac97_controls[i], ice));
+			if (err < 0)
+				return err;
+		}
+	}
+
+	{
+		unsigned char id;
+		snd_ice1712_save_gpio_status(ice);
+		id = aureon_cs8415_get(ice, CS8415_ID);
+		if (id != 0x41)
+			snd_printk("No CS8415 chip. Skipping CS8415 controls.\n");
+		else if ((id & 0x0F) != 0x01)
+			snd_printk("Detected unsupported CS8415 rev. (%c)\n", (char)((id & 0x0F) + 'A' - 1));
+		else {
+			for (i = 0; i< ARRAY_SIZE(cs8415_controls); i++) {
+				snd_kcontrol_t *kctl;
+				err = snd_ctl_add(ice->card, (kctl = snd_ctl_new1(&cs8415_controls[i], ice)));
+				if (err < 0)
+					return err;
+				if (i > 1)
+					kctl->id.device = ice->pcm->device;
+			}
+		}
+		snd_ice1712_restore_gpio_status(ice);
 	}
 	
 	return 0;
@@ -1290,9 +1699,9 @@
 {
 	static unsigned short wm_inits_aureon[] = {
 		/* These come first to reduce init pop noise */
-		0x1b, 0x005,		/* ADC Mux (AC'97 source) */
-		0x1c, 0x00B,		/* Out Mux1 (VOUT1 = ADC+AUX, VOUT2 = ADC) */
-		0x1d, 0x009,		/* Out Mux2 (VOUT2 = ADC, VOUT3 = ADC) */
+		0x1b, 0x044,		/* ADC Mux (AC'97 source) */
+		0x1c, 0x00B,		/* Out Mux1 (VOUT1 = DAC+AUX, VOUT2 = DAC) */
+		0x1d, 0x009,		/* Out Mux2 (VOUT2 = DAC, VOUT3 = DAC) */
 
 		0x18, 0x000,		/* All power-up */
 
@@ -1375,7 +1784,6 @@
 	};
 	unsigned int tmp;
 	unsigned short *p;
-	unsigned int cscs;
 	int err, i;
 
 	if (ice->eeprom.subvendor == VT1724_SUBDEVICE_AUREON51_SKY) {
@@ -1396,23 +1804,17 @@
 	if ((err = aureon_ac97_init(ice)) != 0)
 		return err;
 
-	if (ice->eeprom.subvendor == VT1724_SUBDEVICE_PRODIGY71)
-		cscs = PRODIGY_CS8415_CS;
-	else
-		cscs = AUREON_CS8415_CS;
-
 	snd_ice1712_gpio_set_dir(ice, 0x5fffff); /* fix this for the time being */
 
 	/* reset the wm codec as the SPI mode */
 	snd_ice1712_save_gpio_status(ice);
-	snd_ice1712_gpio_set_mask(ice, ~(AUREON_WM_RESET|AUREON_WM_CS|
-					 cscs|AUREON_HP_SEL));
+	snd_ice1712_gpio_set_mask(ice, ~(AUREON_WM_RESET|AUREON_WM_CS|AUREON_CS8415_CS|AUREON_HP_SEL));
 
 	tmp = snd_ice1712_gpio_read(ice);
 	tmp &= ~AUREON_WM_RESET;
 	snd_ice1712_gpio_write(ice, tmp);
 	udelay(1);
-	tmp |= AUREON_WM_CS | cscs;
+	tmp |= AUREON_WM_CS | AUREON_CS8415_CS;
 	snd_ice1712_gpio_write(ice, tmp);
 	udelay(1);
 	tmp |= AUREON_WM_RESET;
@@ -1429,8 +1831,8 @@
 
 	/* initialize CS8415A codec */
 	for (p = cs_inits; *p != (unsigned short)-1; p++)
-		aureon_spi_write(ice, cscs,
-				 *p | 0x200000, 24);
+		aureon_spi_write(ice, AUREON_CS8415_CS, *p | 0x200000, 24);
+	ice->spec.aureon.cs8415_mux = 1;
 
 	aureon_set_headphone_amp(ice, 1);
 
@@ -1525,12 +1927,12 @@
  	{
  		.subvendor = VT1724_SUBDEVICE_AUREON71_UNIVERSE,
  		.name = "Terratec Aureon 7.1-Universe",
-		/* model not needed - identical with 7.1-Space */
+		.model = "universe",
  		.chip_init = aureon_init,
  		.build_controls = aureon_add_controls,
  		.eeprom_size = sizeof(aureon71_eeprom),
  		.eeprom_data = aureon71_eeprom,
-		.driver = "Aureon71",
+		.driver = "Aureon71Universe",
 	},
 	{
 		.subvendor = VT1724_SUBDEVICE_PRODIGY71,
diff -Nru a/sound/pci/ice1712/aureon.h b/sound/pci/ice1712/aureon.h
--- a/sound/pci/ice1712/aureon.h	2005-01-10 20:11:23 -08:00
+++ b/sound/pci/ice1712/aureon.h	2005-01-10 20:11:23 -08:00
@@ -38,10 +38,10 @@
 
 /* GPIO bits */
 #define AUREON_CS8415_CS	(1 << 22)
-#define AUREON_CS8415_CDTO	(1 << 21)
+#define AUREON_SPI_MISO		(1 << 21)
 #define AUREON_WM_RESET		(1 << 20)
-#define AUREON_WM_CLK		(1 << 19)
-#define AUREON_WM_DATA		(1 << 18)
+#define AUREON_SPI_CLK		(1 << 19)
+#define AUREON_SPI_MOSI		(1 << 18)
 #define AUREON_WM_RW		(1 << 17)
 #define AUREON_AC97_RESET	(1 << 16)
 #define AUREON_DIGITAL_SEL1	(1 << 15)
@@ -52,9 +52,5 @@
 #define AUREON_AC97_DATA_LOW	(1 << 9)
 #define AUREON_AC97_DATA_HIGH	(1 << 8)
 #define AUREON_AC97_DATA_MASK	0xFF
-
-/* Prodigy has different pin assignment for chip select */
-#define PRODIGY_CS8415_CS	(1 << 23)
-#define PRODIGY_CS8415_CDTO	(1 << 22)
 
 #endif /* __SOUND_AUREON_H */
diff -Nru a/sound/pci/ice1712/delta.c b/sound/pci/ice1712/delta.c
--- a/sound/pci/ice1712/delta.c	2005-01-10 20:11:16 -08:00
+++ b/sound/pci/ice1712/delta.c	2005-01-10 20:11:16 -08:00
@@ -530,6 +530,9 @@
 		ice->num_total_dacs = 8;
 		ice->num_total_adcs = 8;
 		break;
+	case ICE1712_SUBDEVICE_DELTADIO2496:
+		ice->num_total_dacs = 4;	/* two AK4324 codecs */
+		break;
 	case ICE1712_SUBDEVICE_VX442:
 		ice->num_total_dacs = 4;
 		ice->num_total_adcs = 4;
diff -Nru a/sound/pci/ice1712/ice1712.h b/sound/pci/ice1712/ice1712.h
--- a/sound/pci/ice1712/ice1712.h	2005-01-10 20:11:16 -08:00
+++ b/sound/pci/ice1712/ice1712.h	2005-01-10 20:11:16 -08:00
@@ -365,6 +365,7 @@
 		/* AC97 register cache for Aureon */
 		struct aureon_spec {
 			unsigned short stac9744[64];
+			unsigned int cs8415_mux;
 			unsigned short master[2];
 			unsigned short vol[8];
 		} aureon;
diff -Nru a/sound/pci/ice1712/ice1724.c b/sound/pci/ice1712/ice1724.c
--- a/sound/pci/ice1712/ice1724.c	2005-01-10 20:11:18 -08:00
+++ b/sound/pci/ice1712/ice1724.c	2005-01-10 20:11:18 -08:00
@@ -1814,7 +1814,7 @@
 
 static snd_kcontrol_new_t snd_vt1724_mixer_pro_spdif_route __devinitdata = {
 	.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
-	.name = "IEC958 Playback Route",
+	.name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,NONE) "Route",
 	.info = snd_vt1724_pro_route_info,
 	.get = snd_vt1724_pro_route_spdif_get,
 	.put = snd_vt1724_pro_route_spdif_put,
diff -Nru a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c
--- a/sound/pci/intel8x0.c	2005-01-10 20:11:20 -08:00
+++ b/sound/pci/intel8x0.c	2005-01-10 20:11:20 -08:00
@@ -66,7 +66,7 @@
 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};
-static int ac97_quirk[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = AC97_TUNE_DEFAULT};
+static char *ac97_quirk[SNDRV_CARDS];
 static int buggy_irq[SNDRV_CARDS];
 static int xbox[SNDRV_CARDS];
 
@@ -82,7 +82,7 @@
 MODULE_PARM_DESC(enable, "Enable Intel i8x0 soundcard.");
 module_param_array(ac97_clock, int, NULL, 0444);
 MODULE_PARM_DESC(ac97_clock, "AC'97 codec clock (0 = auto-detect).");
-module_param_array(ac97_quirk, int, NULL, 0444);
+module_param_array(ac97_quirk, charp, NULL, 0444);
 MODULE_PARM_DESC(ac97_quirk, "AC'97 workaround for strange hardware.");
 module_param_array(buggy_irq, bool, NULL, 0444);
 MODULE_PARM_DESC(buggy_irq, "Enable workaround for buggy interrupts on some motherboards.");
@@ -380,6 +380,7 @@
 	unsigned int ali_slot;			/* ALI DMA slot */
 	struct ac97_pcm *pcm;
 	int pcm_open_flag;
+	unsigned int page_attr_changed: 1;
 } ichdev_t;
 
 typedef struct _snd_intel8x0 intel8x0_t;
@@ -421,7 +422,6 @@
 	unsigned int ac97_sdin[3];
 
 	spinlock_t reg_lock;
-	spinlock_t ac97_lock;
 	
 	u32 bdbars_count;
 	struct snd_dma_buffer bdbars;
@@ -589,13 +589,11 @@
 {
 	intel8x0_t *chip = ac97->private_data;
 	
-	spin_lock(&chip->ac97_lock);
 	if (snd_intel8x0_codec_semaphore(chip, ac97->num) < 0) {
 		if (! chip->in_ac97_init)
 			snd_printk("codec_write %d: semaphore is not ready for register 0x%x\n", ac97->num, reg);
 	}
 	iaputword(chip, reg + ac97->num * 0x80, val);
-	spin_unlock(&chip->ac97_lock);
 }
 
 static unsigned short snd_intel8x0_codec_read(ac97_t *ac97,
@@ -605,7 +603,6 @@
 	unsigned short res;
 	unsigned int tmp;
 
-	spin_lock(&chip->ac97_lock);
 	if (snd_intel8x0_codec_semaphore(chip, ac97->num) < 0) {
 		if (! chip->in_ac97_init)
 			snd_printk("codec_read %d: semaphore is not ready for register 0x%x\n", ac97->num, reg);
@@ -620,7 +617,6 @@
 			res = 0xffff;
 		}
 	}
-	spin_unlock(&chip->ac97_lock);
 	return res;
 }
 
@@ -628,7 +624,6 @@
 {
 	unsigned int tmp;
 
-	spin_lock(&chip->ac97_lock);
 	if (snd_intel8x0_codec_semaphore(chip, codec) >= 0) {
 		iagetword(chip, codec * 0x80);
 		if ((tmp = igetdword(chip, ICHREG(GLOB_STA))) & ICH_RCS) {
@@ -636,7 +631,6 @@
 			iputdword(chip, ICHREG(GLOB_STA), tmp & ~(ICH_SRI|ICH_PRI|ICH_TRI|ICH_GSCI));
 		}
 	}
-	spin_unlock(&chip->ac97_lock);
 }
 
 /*
@@ -669,7 +663,6 @@
 	intel8x0_t *chip = ac97->private_data;
 	unsigned short data = 0xffff;
 
-	spin_lock(&chip->ac97_lock);
 	if (snd_intel8x0_ali_codec_semaphore(chip))
 		goto __err;
 	reg |= ALI_CPR_ADDR_READ;
@@ -680,7 +673,6 @@
 		goto __err;
 	data = igetword(chip, ICHREG(ALI_SPR));
  __err:
-	spin_unlock(&chip->ac97_lock);
 	return data;
 }
 
@@ -688,17 +680,13 @@
 {
 	intel8x0_t *chip = ac97->private_data;
 
-	spin_lock(&chip->ac97_lock);
-	if (snd_intel8x0_ali_codec_semaphore(chip)) {
-		spin_unlock(&chip->ac97_lock);
+	if (snd_intel8x0_ali_codec_semaphore(chip))
 		return;
-	}
 	iputword(chip, ICHREG(ALI_CPR), val);
 	if (ac97->num)
 		reg |= ALI_CPR_ADDR_SECONDARY;
 	iputword(chip, ICHREG(ALI_CPR_ADDR), reg);
 	snd_intel8x0_ali_codec_ready(chip, ALI_CSPSR_WRITE_OK);
-	spin_unlock(&chip->ac97_lock);
 }
 
 
@@ -942,17 +930,22 @@
 	intel8x0_t *chip = snd_pcm_substream_chip(substream);
 	ichdev_t *ichdev = get_ichdev(substream);
 	snd_pcm_runtime_t *runtime = substream->runtime;
-	size_t size = params_buffer_bytes(hw_params);
 	int dbl = params_rate(hw_params) > 48000;
 	int err;
 
-	if (chip->fix_nocache && runtime->dma_area && runtime->dma_bytes < size)
+	if (chip->fix_nocache && ichdev->page_attr_changed) {
 		fill_nocache(runtime->dma_area, runtime->dma_bytes, 0); /* clear */
+		ichdev->page_attr_changed = 0;
+	}
 	err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params));
 	if (err < 0)
 		return err;
-	if (chip->fix_nocache && err > 0)
-		fill_nocache(runtime->dma_area, runtime->dma_bytes, 1);
+	if (chip->fix_nocache) {
+		if (runtime->dma_area && ! ichdev->page_attr_changed) {
+			fill_nocache(runtime->dma_area, runtime->dma_bytes, 1);
+			ichdev->page_attr_changed = 1;
+		}
+	}
 	if (ichdev->pcm_open_flag) {
 		snd_ac97_pcm_close(ichdev->pcm);
 		ichdev->pcm_open_flag = 0;
@@ -978,8 +971,10 @@
 		snd_ac97_pcm_close(ichdev->pcm);
 		ichdev->pcm_open_flag = 0;
 	}
-	if (chip->fix_nocache && substream->runtime->dma_area)
+	if (chip->fix_nocache && ichdev->page_attr_changed) {
 		fill_nocache(substream->runtime->dma_area, substream->runtime->dma_bytes, 0);
+		ichdev->page_attr_changed = 0;
+	}
 	return snd_pcm_lib_free_pages(substream);
 }
 
@@ -1729,6 +1724,12 @@
 		.name = "Compaq Evo D510C",
 		.type = AC97_TUNE_HP_ONLY
 	},
+        {
+		.vendor = 0x0e11,
+		.device = 0x0860,
+		.name = "HP/Compaq nx7010",
+		.type = AC97_TUNE_MUTE_LED
+        },
 	{
 		.vendor = 0x1014,
 		.device = 0x1f00,
@@ -1743,6 +1744,12 @@
 	},
 	{
 		.vendor = 0x1028,
+		.device = 0x010d,
+		.name = "Dell",	/* which model?  AD1885 */
+		.type = AC97_TUNE_HP_ONLY
+	},
+	{
+		.vendor = 0x1028,
 		.device = 0x0126,
 		.name = "Dell Optiplex GX260",	/* AD1981A */
 		.type = AC97_TUNE_HP_ONLY
@@ -1753,6 +1760,12 @@
 		.name = "Dell Precision 450",	/* AD1981B*/
 		.type = AC97_TUNE_HP_ONLY
 	},
+	{
+		.vendor = 0x1028,
+		.device = 0x0147,
+		.name = "Dell",	/* which model?  AD1981B*/
+		.type = AC97_TUNE_HP_ONLY
+	},
 	{	/* FIXME: which codec? */
 		.vendor = 0x103c,
 		.device = 0x00c3,
@@ -1761,6 +1774,12 @@
 	},
 	{
 		.vendor = 0x103c,
+		.device = 0x0890,
+		.name = "HP NC6000",
+		.type = AC97_TUNE_MUTE_LED
+	},
+	{
+		.vendor = 0x103c,
 		.device = 0x12f1,
 		.name = "HP xw8200",	/* AD1981B*/
 		.type = AC97_TUNE_HP_ONLY
@@ -1883,7 +1902,7 @@
 	{ } /* terminator */
 };
 
-static int __devinit snd_intel8x0_mixer(intel8x0_t *chip, int ac97_clock, int ac97_quirk)
+static int __devinit snd_intel8x0_mixer(intel8x0_t *chip, int ac97_clock, const char *quirk_override)
 {
 	ac97_bus_t *pbus;
 	ac97_template_t ac97;
@@ -1979,7 +1998,7 @@
 		}
 	}
 	/* tune up the primary codec */
-	snd_ac97_tune_hardware(chip->ac97[0], ac97_quirks, ac97_quirk);
+	snd_ac97_tune_hardware(chip->ac97[0], ac97_quirks, quirk_override);
 	/* enable separate SDINs for ICH4 */
 	if (chip->device_type == DEVICE_INTEL_ICH4)
 		pbus->isdin = 1;
@@ -2279,11 +2298,21 @@
 
 	for (i = 0; i < chip->pcm_devs; i++)
 		snd_pcm_suspend_all(chip->pcm[i]);
+	/* clear nocache */
+	if (chip->fix_nocache) {
+		for (i = 0; i < chip->bdbars_count; i++) {
+			ichdev_t *ichdev = &chip->ichd[i];
+			if (ichdev->substream && ichdev->page_attr_changed) {
+				snd_pcm_runtime_t *runtime = ichdev->substream->runtime;
+				if (runtime->dma_area)
+					fill_nocache(runtime->dma_area, runtime->dma_bytes, 0);
+			}
+		}
+	}
 	for (i = 0; i < 3; i++)
 		if (chip->ac97[i])
 			snd_ac97_suspend(chip->ac97[i]);
 	pci_disable_device(chip->pci);
-	snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
 	return 0;
 }
 
@@ -2308,7 +2337,7 @@
 	if (chip->fix_nocache) {
 		for (i = 0; i < chip->bdbars_count; i++) {
 			ichdev_t *ichdev = &chip->ichd[i];
-			if (ichdev->substream) {
+			if (ichdev->substream && ichdev->page_attr_changed) {
 				snd_pcm_runtime_t *runtime = ichdev->substream->runtime;
 				if (runtime->dma_area)
 					fill_nocache(runtime->dma_area, runtime->dma_bytes, 1);
@@ -2316,7 +2345,6 @@
 		}
 	}
 
-	snd_power_change_state(card, SNDRV_CTL_POWER_D0);
 	return 0;
 }
 #endif /* CONFIG_PM */
@@ -2505,7 +2533,6 @@
 		return -ENOMEM;
 	}
 	spin_lock_init(&chip->reg_lock);
-	spin_lock_init(&chip->ac97_lock);
 	chip->device_type = device_type;
 	chip->card = card;
 	chip->pci = pci;
@@ -2765,11 +2792,7 @@
 
 static int __init alsa_card_intel8x0_init(void)
 {
-	int err;
-
-        if ((err = pci_module_init(&driver)) < 0)
-                return err;
-        return 0;
+	return pci_module_init(&driver);
 }
 
 static void __exit alsa_card_intel8x0_exit(void)
diff -Nru a/sound/pci/intel8x0m.c b/sound/pci/intel8x0m.c
--- a/sound/pci/intel8x0m.c	2005-01-10 20:11:19 -08:00
+++ b/sound/pci/intel8x0m.c	2005-01-10 20:11:19 -08:00
@@ -253,7 +253,6 @@
 	ac97_t *ac97;
 
 	spinlock_t reg_lock;
-	spinlock_t ac97_lock;
 	
 	struct snd_dma_buffer bdbars;
 	u32 bdbars_count;
@@ -411,13 +410,11 @@
 {
 	intel8x0_t *chip = ac97->private_data;
 	
-	spin_lock(&chip->ac97_lock);
 	if (snd_intel8x0m_codec_semaphore(chip, ac97->num) < 0) {
 		if (! chip->in_ac97_init)
 			snd_printk("codec_write %d: semaphore is not ready for register 0x%x\n", ac97->num, reg);
 	}
 	iaputword(chip, reg + ac97->num * 0x80, val);
-	spin_unlock(&chip->ac97_lock);
 }
 
 static unsigned short snd_intel8x0_codec_read(ac97_t *ac97,
@@ -427,7 +424,6 @@
 	unsigned short res;
 	unsigned int tmp;
 
-	spin_lock(&chip->ac97_lock);
 	if (snd_intel8x0m_codec_semaphore(chip, ac97->num) < 0) {
 		if (! chip->in_ac97_init)
 			snd_printk("codec_read %d: semaphore is not ready for register 0x%x\n", ac97->num, reg);
@@ -442,7 +438,6 @@
 			res = 0xffff;
 		}
 	}
-	spin_unlock(&chip->ac97_lock);
 	return res;
 }
 
@@ -1093,7 +1088,6 @@
 	if (chip->ac97)
 		snd_ac97_suspend(chip->ac97);
 	pci_disable_device(chip->pci);
-	snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
 	return 0;
 }
 
@@ -1106,7 +1100,6 @@
 	if (chip->ac97)
 		snd_ac97_resume(chip->ac97);
 
-	snd_power_change_state(card, SNDRV_CTL_POWER_D0);
 	return 0;
 }
 #endif /* CONFIG_PM */
@@ -1179,7 +1172,6 @@
 		return -ENOMEM;
 	}
 	spin_lock_init(&chip->reg_lock);
-	spin_lock_init(&chip->ac97_lock);
 	chip->device_type = device_type;
 	chip->card = card;
 	chip->pci = pci;
diff -Nru a/sound/pci/korg1212/korg1212.c b/sound/pci/korg1212/korg1212.c
--- a/sound/pci/korg1212/korg1212.c	2005-01-10 20:11:15 -08:00
+++ b/sound/pci/korg1212/korg1212.c	2005-01-10 20:11:15 -08:00
@@ -472,7 +472,8 @@
                         "SPDIF-R",
 };
 
-u16 ClockSourceSelector[] = {0x8000,   // selects source as ADAT at 44.1 kHz
+static u16 ClockSourceSelector[] =
+                            {0x8000,   // selects source as ADAT at 44.1 kHz
                              0x0000,   // selects source as ADAT at 48 kHz
                              0x8001,   // selects source as S/PDIF at 44.1 kHz
                              0x0001,   // selects source as S/PDIF at 48 kHz
@@ -2411,14 +2412,17 @@
 	if (rc) K1212_DEBUG_PRINTK("K1212_DEBUG: Reboot Card - RC = %d [%s]\n", rc, stateName[korg1212->cardState]);
 #endif
 
+        if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, korg1212, &ops)) < 0) {
+                snd_korg1212_free(korg1212);
+                return err;
+        }
+        
 	snd_korg1212_EnableCardInterrupts(korg1212);
 
 	mdelay(CARD_BOOT_DELAY_IN_MS);
 
-        if (snd_korg1212_downloadDSPCode(korg1212)) {
-                snd_korg1212_free(korg1212);
+        if (snd_korg1212_downloadDSPCode(korg1212))
         	return -EBUSY;
-	}
 
 	printk(KERN_INFO "dspMemPhy       = %08x U[%08x]\n"
                "PlayDataPhy     = %08x L[%08x]\n"
@@ -2433,10 +2437,8 @@
                korg1212->RoutingTablePhy, LowerWordSwap(korg1212->RoutingTablePhy),
                korg1212->AdatTimeCodePhy, LowerWordSwap(korg1212->AdatTimeCodePhy));
 
-        if ((err = snd_pcm_new(korg1212->card, "korg1212", 0, 1, 1, &korg1212->pcm)) < 0) {
-                snd_korg1212_free(korg1212);
+        if ((err = snd_pcm_new(korg1212->card, "korg1212", 0, 1, 1, &korg1212->pcm)) < 0)
                 return err;
-	}
 
 	korg1212->pcm->private_data = korg1212;
         korg1212->pcm->private_free = snd_korg1212_free_pcm;
@@ -2453,18 +2455,11 @@
 
         for (i = 0; i < ARRAY_SIZE(snd_korg1212_controls); i++) {
                 err = snd_ctl_add(korg1212->card, snd_ctl_new1(&snd_korg1212_controls[i], korg1212));
-                if (err < 0) {
-			snd_korg1212_free(korg1212);
+                if (err < 0)
                         return err;
-		}
         }
 
         snd_korg1212_proc_init(korg1212);
-        
-        if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, korg1212, &ops)) < 0) {
-                snd_korg1212_free(korg1212);
-                return err;
-        }
         
 	snd_card_set_dev(card, &pci->dev);
 
diff -Nru a/sound/pci/maestro3.c b/sound/pci/maestro3.c
--- a/sound/pci/maestro3.c	2005-01-10 20:11:20 -08:00
+++ b/sound/pci/maestro3.c	2005-01-10 20:11:20 -08:00
@@ -1835,34 +1835,24 @@
 snd_m3_ac97_read(ac97_t *ac97, unsigned short reg)
 {
 	m3_t *chip = ac97->private_data;
-	unsigned short ret = 0;
-	unsigned long flags;
 
-	spin_lock_irqsave(&chip->reg_lock, flags);
 	if (snd_m3_ac97_wait(chip))
-		goto __error;
-	snd_m3_outb(chip, 0x80 | (reg & 0x7f), 0x30);
+		return 0xffff;
+	snd_m3_outb(chip, 0x80 | (reg & 0x7f), CODEC_COMMAND);
 	if (snd_m3_ac97_wait(chip))
-		goto __error;
-	ret = snd_m3_inw(chip, 0x32);
-__error:
-	spin_unlock_irqrestore(&chip->reg_lock, flags);
-	return ret;
+		return 0xffff;
+	return snd_m3_inw(chip, CODEC_DATA);
 }
 
 static void
 snd_m3_ac97_write(ac97_t *ac97, unsigned short reg, unsigned short val)
 {
 	m3_t *chip = ac97->private_data;
-	unsigned long flags;
 
-	spin_lock_irqsave(&chip->reg_lock, flags);
 	if (snd_m3_ac97_wait(chip))
-		goto __error;
-	snd_m3_outw(chip, val, 0x32);
-	snd_m3_outb(chip, reg & 0x7f, 0x30);
-__error:
-	spin_unlock_irqrestore(&chip->reg_lock, flags);
+		return;
+	snd_m3_outw(chip, val, CODEC_DATA);
+	snd_m3_outb(chip, reg & 0x7f, CODEC_COMMAND);
 }
 
 
@@ -2374,8 +2364,7 @@
 	}
 
 #ifdef CONFIG_PM
-	if (chip->suspend_mem)
-		vfree(chip->suspend_mem);
+	vfree(chip->suspend_mem);
 #endif
 
 	if (chip->irq >= 0) {
@@ -2425,7 +2414,6 @@
 	snd_m3_outw(chip, 0xffff, 0x56);
 
 	pci_disable_device(chip->pci);
-	snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
 	return 0;
 }
 
@@ -2468,7 +2456,6 @@
 	snd_m3_enable_ints(chip);
 	snd_m3_amp_enable(chip, 1);
 
-	snd_power_change_state(card, SNDRV_CTL_POWER_D0);
 	return 0;
 }
 #endif /* CONFIG_PM */
@@ -2577,26 +2564,7 @@
 
 	snd_m3_assp_init(chip);
 	snd_m3_amp_enable(chip, 1);
-    
-	if ((err = snd_m3_mixer(chip)) < 0) {
-		snd_m3_free(chip);
-		return err;
-	}
 
-	for (i = 0; i < chip->num_substreams; i++) {
-		m3_dma_t *s = &chip->substreams[i];
-		s->chip = chip;
-		if ((err = snd_m3_assp_client_init(chip, s, i)) < 0) {
-			snd_m3_free(chip);
-			return err;
-		}
-	}
-    
-	if ((err = snd_m3_pcm(chip, 0)) < 0) {
-		snd_m3_free(chip);
-		return err;
-	}
-    
 	if (request_irq(pci->irq, snd_m3_interrupt, SA_INTERRUPT|SA_SHIRQ,
 			card->driver, (void *)chip)) {
 		snd_printk("unable to grab IRQ %d\n", pci->irq);
@@ -2618,6 +2586,19 @@
 		return err;
 	}
 
+	if ((err = snd_m3_mixer(chip)) < 0)
+		return err;
+
+	for (i = 0; i < chip->num_substreams; i++) {
+		m3_dma_t *s = &chip->substreams[i];
+		s->chip = chip;
+		if ((err = snd_m3_assp_client_init(chip, s, i)) < 0)
+			return err;
+	}
+
+	if ((err = snd_m3_pcm(chip, 0)) < 0)
+		return err;
+    
 	snd_m3_enable_ints(chip);
 	snd_m3_assp_continue(chip);
 
diff -Nru a/sound/pci/mixart/mixart.c b/sound/pci/mixart/mixart.c
--- a/sound/pci/mixart/mixart.c	2005-01-10 20:11:20 -08:00
+++ b/sound/pci/mixart/mixart.c	2005-01-10 20:11:20 -08:00
@@ -1019,13 +1019,6 @@
 		return err;
 	}
 
-	if (idx == 0) {
-		/* create a DSP loader only on first cardX*/
-		err = snd_mixart_hwdep_new(mgr);
-		if (err < 0)
-			return err;
-	}
-
 	snd_card_set_dev(card, &mgr->pci->dev);
 
 	return 0;
@@ -1359,7 +1352,7 @@
 			idx = index[dev];
 		else
 			idx = index[dev] + i;
-		snprintf(tmpid, sizeof(tmpid), "%s-%d", id[dev], i);
+		snprintf(tmpid, sizeof(tmpid), "%s-%d", id[dev] ? id[dev] : "MIXART", i);
 		card = snd_card_new(idx, tmpid, THIS_MODULE, 0);
 
 		if (! card) {
@@ -1410,6 +1403,13 @@
 	}
 	/* init bufferinfo_array */
 	memset(mgr->bufferinfo.area, 0, size);
+
+	/* set up firmware */
+	err = snd_mixart_setup_firmware(mgr);
+	if (err < 0) {
+		snd_mixart_free(mgr);
+		return err;
+	}
 
 	pci_set_drvdata(pci, mgr);
 	dev++;
diff -Nru a/sound/pci/mixart/mixart_core.c b/sound/pci/mixart/mixart_core.c
--- a/sound/pci/mixart/mixart_core.c	2005-01-10 20:11:23 -08:00
+++ b/sound/pci/mixart/mixart_core.c	2005-01-10 20:11:23 -08:00
@@ -72,9 +72,12 @@
 static int get_msg(mixart_mgr_t *mgr, mixart_msg_t *resp, u32 msg_frame_address )
 {
 	unsigned long flags;
-	u32  headptr, i;
+	u32  headptr;
 	u32  size;
 	int  err;
+#ifndef __BIG_ENDIAN
+	unsigned int i;
+#endif
 
 	spin_lock_irqsave(&mgr->msg_lock, flags);
 	err = 0;
diff -Nru a/sound/pci/mixart/mixart_hwdep.c b/sound/pci/mixart/mixart_hwdep.c
--- a/sound/pci/mixart/mixart_hwdep.c	2005-01-10 20:11:23 -08:00
+++ b/sound/pci/mixart/mixart_hwdep.c	2005-01-10 20:11:23 -08:00
@@ -1,7 +1,7 @@
 /*
  * Driver for Digigram miXart soundcards
  *
- * hwdep device manager
+ * DSP firmware management
  *
  * Copyright (c) 2003 by Digigram <alsa@digigram.com>
  *
@@ -22,6 +22,8 @@
 
 #include <sound/driver.h>
 #include <linux/interrupt.h>
+#include <linux/pci.h>
+#include <linux/firmware.h>
 #include <asm/io.h>
 #include <sound/core.h>
 #include "mixart.h"
@@ -30,19 +32,6 @@
 #include "mixart_hwdep.h"
 
 
-/* miXart hwdep interface id string */
-#define SND_MIXART_HWDEP_ID       "miXart Loader"
-
-static int mixart_hwdep_open(snd_hwdep_t *hw, struct file *file)
-{
-	return 0;
-}
-
-static int mixart_hwdep_release(snd_hwdep_t *hw, struct file *file)
-{
-	return 0;
-}
-
 /**
  * wait for a value on a peudo register, exit with a timeout
  *
@@ -109,34 +98,30 @@
 	u32     p_align;
 };
 
-static int mixart_load_elf(mixart_mgr_t *mgr, snd_hwdep_dsp_image_t *dsp )
+static int mixart_load_elf(mixart_mgr_t *mgr, const struct firmware *dsp )
 {
 	char                    elf32_magic_number[4] = {0x7f,'E','L','F'};
-	snd_mixart_elf32_ehdr_t elf_header;
+	snd_mixart_elf32_ehdr_t *elf_header;
 	int                     i;
 
-	if ( copy_from_user(&elf_header, dsp->image , sizeof(snd_mixart_elf32_ehdr_t)) )
-		return -EFAULT;
-
+	elf_header = (snd_mixart_elf32_ehdr_t *)dsp->data;
 	for( i=0; i<4; i++ )
-		if ( elf32_magic_number[i] != elf_header.e_ident[i] )
+		if ( elf32_magic_number[i] != elf_header->e_ident[i] )
 			return -EINVAL;
 
-	if( elf_header.e_phoff != 0 ) {
+	if( elf_header->e_phoff != 0 ) {
 		snd_mixart_elf32_phdr_t     elf_programheader;
 
-		for( i=0; i < be16_to_cpu(elf_header.e_phnum); i++ ) {
-			u32 pos = be32_to_cpu(elf_header.e_phoff) + (u32)(i * be16_to_cpu(elf_header.e_phentsize));
+		for( i=0; i < be16_to_cpu(elf_header->e_phnum); i++ ) {
+			u32 pos = be32_to_cpu(elf_header->e_phoff) + (u32)(i * be16_to_cpu(elf_header->e_phentsize));
 
-			if( copy_from_user( &elf_programheader, dsp->image + pos, sizeof(elf_programheader) ) )
-				return -EFAULT;
+			memcpy( &elf_programheader, dsp->data + pos, sizeof(elf_programheader) );
 
 			if(elf_programheader.p_type != 0) {
 				if( elf_programheader.p_filesz != 0 ) {
-					if(copy_from_user_toio( MIXART_MEM( mgr, be32_to_cpu(elf_programheader.p_vaddr)),
-								dsp->image + be32_to_cpu( elf_programheader.p_offset ),
-								be32_to_cpu( elf_programheader.p_filesz )))
-						return -EFAULT;
+					memcpy_toio( MIXART_MEM( mgr, be32_to_cpu(elf_programheader.p_vaddr)),
+						     dsp->data + be32_to_cpu( elf_programheader.p_offset ),
+						     be32_to_cpu( elf_programheader.p_filesz ));
 				}
 			}
 		}
@@ -144,20 +129,6 @@
 	return 0;
 }
 
-static int mixart_hwdep_dsp_status(snd_hwdep_t *hw, snd_hwdep_dsp_status_t *info)
-{
-	mixart_mgr_t *mgr = hw->private_data;
-
-	strcpy(info->id, "miXart");
-        info->num_dsps = MIXART_HARDW_FILES_MAX_INDEX;
-
-	if (mgr->hwdep->dsp_loaded & (1 <<  MIXART_MOTHERBOARD_ELF_INDEX))
-		info->chip_ready = 1;
-
-	info->version = MIXART_DRIVER_VERSION;
-	return 0;
-}
-
 /*
  * get basic information and init miXart
  */
@@ -344,9 +315,8 @@
 /* firmware base addresses (when hard coded) */
 #define MIXART_MOTHERBOARD_XLX_BASE_ADDRESS   0x00600000
 
-static int mixart_hwdep_dsp_load(snd_hwdep_t *hw, snd_hwdep_dsp_image_t *dsp)
+static int mixart_dsp_load(mixart_mgr_t* mgr, int index, const struct firmware *dsp)
 {
-	mixart_mgr_t* mgr = hw->private_data;
 	int           err, card_index;
 	u32           status_xilinx, status_elf, status_daught;
 	u32           val;
@@ -364,7 +334,7 @@
 		return -EAGAIN; /* try again later */
 	}
 
-	switch (dsp->index)   {
+	switch (index)   {
 	case MIXART_MOTHERBOARD_XLX_INDEX:
 
 		/* xilinx already loaded ? */ 
@@ -379,8 +349,8 @@
 		}
 
 		/* check xilinx validity */
-		snd_assert(((u32*)(dsp->image))[0]==0xFFFFFFFF, return -EINVAL);
-		snd_assert(dsp->length % 4 == 0, return -EINVAL);
+		snd_assert(((u32*)(dsp->data))[0]==0xFFFFFFFF, return -EINVAL);
+		snd_assert(dsp->size % 4 == 0, return -EINVAL);
 
 		/* set xilinx status to copying */
 		writel_be( 1, MIXART_MEM( mgr, MIXART_PSEUDOREG_MXLX_STATUS_OFFSET ));
@@ -388,11 +358,10 @@
 		/* setup xilinx base address */
 		writel_be( MIXART_MOTHERBOARD_XLX_BASE_ADDRESS, MIXART_MEM( mgr,MIXART_PSEUDOREG_MXLX_BASE_ADDR_OFFSET ));
 		/* setup code size for xilinx file */
-		writel_be( dsp->length, MIXART_MEM( mgr, MIXART_PSEUDOREG_MXLX_SIZE_OFFSET ));
+		writel_be( dsp->size, MIXART_MEM( mgr, MIXART_PSEUDOREG_MXLX_SIZE_OFFSET ));
 
 		/* copy xilinx code */
-		if (copy_from_user_toio(  MIXART_MEM( mgr, MIXART_MOTHERBOARD_XLX_BASE_ADDRESS),  dsp->image,  dsp->length))
-			return -EFAULT;
+		memcpy_toio(  MIXART_MEM( mgr, MIXART_MOTHERBOARD_XLX_BASE_ADDRESS),  dsp->data,  dsp->size);
     
 		/* set xilinx status to copy finished */
 		writel_be( 2, MIXART_MEM( mgr, MIXART_PSEUDOREG_MXLX_STATUS_OFFSET ));
@@ -428,7 +397,7 @@
 		writel_be( 1, MIXART_MEM( mgr, MIXART_PSEUDOREG_ELF_STATUS_OFFSET ));
 
 		/* process the copying of the elf packets */
-		err = mixart_load_elf( mgr, dsp);
+		err = mixart_load_elf( mgr, dsp );
 		if (err < 0) return err;
 
 		/* set elf status to copy finished */
@@ -479,11 +448,11 @@
 		}
  
 		/* check daughterboard xilinx validity */
-		snd_assert(((u32*)(dsp->image))[0]==0xFFFFFFFF, return -EINVAL);
-		snd_assert(dsp->length % 4 == 0, return -EINVAL);
+		snd_assert(((u32*)(dsp->data))[0]==0xFFFFFFFF, return -EINVAL);
+		snd_assert(dsp->size % 4 == 0, return -EINVAL);
 
 		/* inform mixart about the size of the file */
-		writel_be( dsp->length, MIXART_MEM( mgr, MIXART_PSEUDOREG_DXLX_SIZE_OFFSET ));
+		writel_be( dsp->size, MIXART_MEM( mgr, MIXART_PSEUDOREG_DXLX_SIZE_OFFSET ));
 
 		/* set daughterboard status to 1 */
 		writel_be( 1, MIXART_MEM( mgr, MIXART_PSEUDOREG_DXLX_STATUS_OFFSET ));
@@ -500,8 +469,7 @@
 		snd_assert(val != 0, return -EINVAL);
 
 		/* copy daughterboard xilinx code */
-		if (copy_from_user_toio(  MIXART_MEM( mgr, val),  dsp->image,  dsp->length))
-			return -EFAULT;
+		memcpy_toio(  MIXART_MEM( mgr, val),  dsp->data,  dsp->size);
 
 		/* set daughterboard status to 4 */
 		writel_be( 4, MIXART_MEM( mgr, MIXART_PSEUDOREG_DXLX_STATUS_OFFSET ));
@@ -549,7 +517,92 @@
 }
 
 
-int snd_mixart_hwdep_new(mixart_mgr_t *mgr)
+#if defined(CONFIG_FW_LOADER) || defined(CONFIG_FW_LOADER_MODULE)
+#if !defined(CONFIG_USE_MIXARTLOADER) && !defined(CONFIG_SND_MIXART) /* built-in kernel */
+#define SND_MIXART_FW_LOADER	/* use the standard firmware loader */
+#endif
+#endif
+
+#ifdef SND_MIXART_FW_LOADER
+
+int snd_mixart_setup_firmware(mixart_mgr_t *mgr)
+{
+	static char *fw_files[3] = {
+		"miXart8.xlx", "miXart8.elf", "miXart8AES.xlx"
+	};
+	char path[32];
+
+	const struct firmware *fw_entry;
+	int i, err;
+
+	for (i = 0; i < 3; i++) {
+		sprintf(path, "mixart/%s", fw_files[i]);
+		if (request_firmware(&fw_entry, path, &mgr->pci->dev)) {
+			snd_printk(KERN_ERR "miXart: can't load firmware %s\n", path);
+			return -ENOENT;
+		}
+		/* fake hwdep dsp record */
+		err = mixart_dsp_load(mgr, i, fw_entry);
+		release_firmware(fw_entry);
+		if (err < 0)
+			return err;
+	}
+	return 0;
+}
+
+
+#else /* old style firmware loading */
+
+/* miXart hwdep interface id string */
+#define SND_MIXART_HWDEP_ID       "miXart Loader"
+
+static int mixart_hwdep_open(snd_hwdep_t *hw, struct file *file)
+{
+	return 0;
+}
+
+static int mixart_hwdep_release(snd_hwdep_t *hw, struct file *file)
+{
+	return 0;
+}
+
+static int mixart_hwdep_dsp_status(snd_hwdep_t *hw, snd_hwdep_dsp_status_t *info)
+{
+	mixart_mgr_t *mgr = hw->private_data;
+
+	strcpy(info->id, "miXart");
+        info->num_dsps = MIXART_HARDW_FILES_MAX_INDEX;
+
+	if (mgr->hwdep->dsp_loaded & (1 <<  MIXART_MOTHERBOARD_ELF_INDEX))
+		info->chip_ready = 1;
+
+	info->version = MIXART_DRIVER_VERSION;
+	return 0;
+}
+
+static int mixart_hwdep_dsp_load(snd_hwdep_t *hw, snd_hwdep_dsp_image_t *dsp)
+{
+	mixart_mgr_t* mgr = hw->private_data;
+	struct firmware fw;
+	int err;
+
+	fw.size = dsp->length;
+	fw.data = vmalloc(dsp->length);
+	if (! fw.data) {
+		snd_printk(KERN_ERR "miXart: cannot allocate image size %d\n",
+			   (int)dsp->length);
+		return -ENOMEM;
+	}
+	if (copy_from_user(fw.data, dsp->image, dsp->length)) {
+		vfree(fw.data);
+		return -EFAULT;
+	}
+	err = mixart_dsp_load(mgr, dsp->index, &fw);
+	vfree(fw.data);
+	return err;
+}
+
+int snd_mixart_setup_firmware(mixart_mgr_t *mgr)
 {
 	int err;
 	snd_hwdep_t *hw;
@@ -568,5 +621,8 @@
 	sprintf(hw->name,  SND_MIXART_HWDEP_ID);
 	mgr->hwdep = hw;
 	mgr->hwdep->dsp_loaded = 0;
-	return 0;
+
+	return snd_card_register(mgr->chip[0]->card);
 }
+
+#endif /* SND_MIXART_FW_LOADER */
diff -Nru a/sound/pci/mixart/mixart_hwdep.h b/sound/pci/mixart/mixart_hwdep.h
--- a/sound/pci/mixart/mixart_hwdep.h	2005-01-10 20:11:22 -08:00
+++ b/sound/pci/mixart/mixart_hwdep.h	2005-01-10 20:11:22 -08:00
@@ -140,7 +140,6 @@
 #define MIXART_OIDI                             0x008   /* 0000 0000 1000 */
 
 
-/* exported */
-int snd_mixart_hwdep_new(mixart_mgr_t *mgr);
+int snd_mixart_setup_firmware(mixart_mgr_t *mgr);
 
 #endif /* __SOUND_MIXART_HWDEP_H */
diff -Nru a/sound/pci/nm256/nm256.c b/sound/pci/nm256/nm256.c
--- a/sound/pci/nm256/nm256.c	2005-01-10 20:11:22 -08:00
+++ b/sound/pci/nm256/nm256.c	2005-01-10 20:11:22 -08:00
@@ -1130,7 +1130,7 @@
 		return 0;
 	res = snd_nm256_readw(chip, chip->mixer_base + reg);
 	/* Magic delay.  Bleah yucky.  */
-	udelay(1000);
+	msleep(1);
 	return res;
 }
 
@@ -1151,7 +1151,7 @@
 	/* Wait for the write to take, too. */
 	while (tries-- > 0) {
 		snd_nm256_writew(chip, base + reg, val);
-		udelay(1000);  /* a little delay here seems better.. */
+		msleep(1);  /* a little delay here seems better.. */
 		if (snd_nm256_ac97_ready(chip))
 			return;
 	}
@@ -1275,7 +1275,6 @@
 	snd_ac97_suspend(chip->ac97);
 	chip->coeffs_current = 0;
 	pci_disable_device(chip->pci);
-	snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
 	return 0;
 }
 
@@ -1290,7 +1289,6 @@
 	/* restore ac97 */
 	snd_ac97_resume(chip->ac97);
 
-	snd_power_change_state(card, SNDRV_CTL_POWER_D0);
 	return 0;
 }
 #endif /* CONFIG_PM */
@@ -1488,12 +1486,6 @@
 
 	snd_nm256_init_chip(chip);
 
-	if ((err = snd_nm256_pcm(chip, 0)) < 0)
-		goto __error;
-	
-	if ((err = snd_nm256_mixer(chip)) < 0)
-		goto __error;
-
 	// pci_set_master(pci); /* needed? */
 	
 	snd_card_set_pm_callback(card, nm256_suspend, nm256_resume, chip);
@@ -1612,6 +1604,12 @@
 	if (reset_workaround[dev]) {
 		snd_printdd(KERN_INFO "nm256: reset_workaround activated\n");
 		chip->reset_workaround = 1;
+	}
+
+	if ((err = snd_nm256_pcm(chip, 0)) < 0 ||
+	    (err = snd_nm256_mixer(chip)) < 0) {
+		snd_card_free(card);
+		return err;
 	}
 
 	sprintf(card->shortname, "NeoMagic %s", card->driver);
diff -Nru a/sound/pci/rme32.c b/sound/pci/rme32.c
--- a/sound/pci/rme32.c	2005-01-10 20:11:23 -08:00
+++ b/sound/pci/rme32.c	2005-01-10 20:11:23 -08:00
@@ -1916,21 +1916,21 @@
 		.private_value = IEC958_AES0_PROFESSIONAL | IEC958_AES0_PRO_EMPHASIS
 	},
 	{
-		.iface = SNDRV_CTL_ELEM_IFACE_PCM,
+		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
 		.name =	"Input Connector",
 		.info =	snd_rme32_info_inputtype_control,
 		.get =	snd_rme32_get_inputtype_control,
 		.put =	snd_rme32_put_inputtype_control
 	},
 	{
-		.iface = SNDRV_CTL_ELEM_IFACE_PCM,
+		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
 		.name =	"Loopback Input",
 		.info =	snd_rme32_info_loopback_control,
 		.get =	snd_rme32_get_loopback_control,
 		.put =	snd_rme32_put_loopback_control
 	},
 	{
-		.iface = SNDRV_CTL_ELEM_IFACE_PCM,
+		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
 		.name =	"Sample Clock Source",
 		.info =	snd_rme32_info_clockmode_control,
 		.get =	snd_rme32_get_clockmode_control,
diff -Nru a/sound/pci/rme96.c b/sound/pci/rme96.c
--- a/sound/pci/rme96.c	2005-01-10 20:11:18 -08:00
+++ b/sound/pci/rme96.c	2005-01-10 20:11:18 -08:00
@@ -2285,35 +2285,35 @@
 			IEC958_AES0_PRO_EMPHASIS
 },
 {
-        .iface =        SNDRV_CTL_ELEM_IFACE_PCM,
+        .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
 	.name =         "Input Connector",
 	.info =         snd_rme96_info_inputtype_control, 
 	.get =          snd_rme96_get_inputtype_control,
 	.put =          snd_rme96_put_inputtype_control 
 },
 {
-        .iface =        SNDRV_CTL_ELEM_IFACE_PCM,
+        .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
 	.name =         "Loopback Input",
 	.info =         snd_rme96_info_loopback_control,
 	.get =          snd_rme96_get_loopback_control,
 	.put =          snd_rme96_put_loopback_control
 },
 {
-        .iface =        SNDRV_CTL_ELEM_IFACE_PCM,
+        .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
 	.name =         "Sample Clock Source",
 	.info =         snd_rme96_info_clockmode_control, 
 	.get =          snd_rme96_get_clockmode_control,
 	.put =          snd_rme96_put_clockmode_control
 },
 {
-        .iface =        SNDRV_CTL_ELEM_IFACE_PCM,
+        .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
 	.name =         "Monitor Tracks",
 	.info =         snd_rme96_info_montracks_control, 
 	.get =          snd_rme96_get_montracks_control,
 	.put =          snd_rme96_put_montracks_control
 },
 {
-        .iface =        SNDRV_CTL_ELEM_IFACE_PCM,
+        .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
 	.name =         "Attenuation",
 	.info =         snd_rme96_info_attenuation_control, 
 	.get =          snd_rme96_get_attenuation_control,
diff -Nru a/sound/pci/rme9652/hdsp.c b/sound/pci/rme9652/hdsp.c
--- a/sound/pci/rme9652/hdsp.c	2005-01-10 20:11:18 -08:00
+++ b/sound/pci/rme9652/hdsp.c	2005-01-10 20:11:18 -08:00
@@ -27,6 +27,7 @@
 #include <linux/interrupt.h>
 #include <linux/slab.h>
 #include <linux/pci.h>
+#include <linux/firmware.h>
 #include <linux/moduleparam.h>
 
 #include <sound/core.h>
@@ -399,6 +400,13 @@
 #define HDSP_DMA_AREA_BYTES ((HDSP_MAX_CHANNELS+1) * HDSP_CHANNEL_BUFFER_BYTES)
 #define HDSP_DMA_AREA_KILOBYTES (HDSP_DMA_AREA_BYTES/1024)
 
+/* use hotplug firmeare loader? */
+#if defined(CONFIG_FW_LOADER) || defined(CONFIG_FW_LOADER_MODULE)
+#ifndef HDSP_USE_HWDEP_LOADER
+#define HDSP_FW_LOADER
+#endif
+#endif
+
 typedef struct _hdsp             hdsp_t;
 typedef struct _hdsp_midi        hdsp_midi_t;
 typedef struct _hdsp_9632_meters hdsp_9632_meters_t;
@@ -585,8 +593,8 @@
 MODULE_DEVICE_TABLE(pci, snd_hdsp_ids);
 
 /* prototypes */
-static int __devinit snd_hdsp_create_alsa_devices(snd_card_t *card, hdsp_t *hdsp);
-static int __devinit snd_hdsp_create_pcm(snd_card_t *card, hdsp_t *hdsp);
+static int snd_hdsp_create_alsa_devices(snd_card_t *card, hdsp_t *hdsp);
+static int snd_hdsp_create_pcm(snd_card_t *card, hdsp_t *hdsp);
 static int snd_hdsp_enable_io (hdsp_t *hdsp);
 static void snd_hdsp_initialize_midi_flush (hdsp_t *hdsp);
 static void snd_hdsp_initialize_channels (hdsp_t *hdsp);
@@ -934,6 +942,7 @@
 	}
 
 	position &= HDSP_BufferPositionMask;
+	position /= 4;
 	position &= (hdsp->period_bytes/2) - 1;
 	return position;
 }
@@ -1443,14 +1452,14 @@
 	return 0;
 }
 
-snd_rawmidi_ops_t snd_hdsp_midi_output =
+static snd_rawmidi_ops_t snd_hdsp_midi_output =
 {
 	.open =		snd_hdsp_midi_output_open,
 	.close =	snd_hdsp_midi_output_close,
 	.trigger =	snd_hdsp_midi_output_trigger,
 };
 
-snd_rawmidi_ops_t snd_hdsp_midi_input =
+static snd_rawmidi_ops_t snd_hdsp_midi_input =
 {
 	.open =		snd_hdsp_midi_input_open,
 	.close =	snd_hdsp_midi_input_close,
@@ -2728,7 +2737,7 @@
 {
 	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
 	
-	ucontrol->value.enumerated.item[0] = hdsp_pref_sync_ref(hdsp);
+	ucontrol->value.enumerated.item[0] = hdsp_autosync_ref(hdsp);
 	return 0;
 }
 
@@ -3137,7 +3146,7 @@
 static snd_kcontrol_new_t snd_hdsp_96xx_aeb = HDSP_AEB("Analog Extension Board", 0);
 static snd_kcontrol_new_t snd_hdsp_adat_sync_check = HDSP_ADAT_SYNC_CHECK;
 
-int snd_hdsp_create_controls(snd_card_t *card, hdsp_t *hdsp)
+static int snd_hdsp_create_controls(snd_card_t *card, hdsp_t *hdsp)
 {
 	unsigned int idx;
 	int err;
@@ -3651,7 +3660,7 @@
 	return 0;
 }
 
-void hdsp_midi_tasklet(unsigned long arg)
+static void hdsp_midi_tasklet(unsigned long arg)
 {
 	hdsp_t *hdsp = (hdsp_t *)arg;
 	
@@ -4652,6 +4661,7 @@
 		}
 		break;
 	}
+#ifndef HDSP_FW_LOADER
 	case SNDRV_HDSP_IOCTL_UPLOAD_FIRMWARE: {
 		hdsp_firmware_t __user *firmware;
 		u32 __user *firmware_data;
@@ -4661,6 +4671,9 @@
 		/* SNDRV_HDSP_IOCTL_GET_VERSION must have been called */
 		if (hdsp->io_type == Undefined) return -EINVAL;
 
+		if (hdsp->state & (HDSP_FirmwareCached | HDSP_FirmwareLoaded))
+			return -EBUSY;
+
 		snd_printk("initializing firmware upload\n");
 		firmware = (hdsp_firmware_t __user *)argp;
 
@@ -4694,6 +4707,7 @@
 		}
 		break;
 	}
+#endif
 	case SNDRV_HDSP_IOCTL_GET_MIXER: {
 		hdsp_mixer_t __user *mixer = (hdsp_mixer_t __user *)argp;
 		if (copy_to_user(mixer->matrix, hdsp->mixer_matrix, sizeof(unsigned short)*HDSP_MATRIX_MIXER_SIZE))
@@ -4749,8 +4763,7 @@
 	return 0;
 }
 
-static int __devinit snd_hdsp_create_pcm(snd_card_t *card,
-					 hdsp_t *hdsp)
+static int snd_hdsp_create_pcm(snd_card_t *card, hdsp_t *hdsp)
 {
 	snd_pcm_t *pcm;
 	int err;
@@ -4841,7 +4854,7 @@
 	snd_hdsp_flush_midi_input (hdsp, 1);
 }
 
-static int __devinit snd_hdsp_create_alsa_devices(snd_card_t *card, hdsp_t *hdsp)
+static int snd_hdsp_create_alsa_devices(snd_card_t *card, hdsp_t *hdsp)
 {
 	int err;
 	
@@ -4894,6 +4907,86 @@
 	return 0;
 }
 
+#ifdef HDSP_FW_LOADER
+/* load firmware via hotplug fw loader */
+static int __devinit hdsp_request_fw_loader(hdsp_t *hdsp)
+{
+	const char *fwfile;
+	const struct firmware *fw;
+	int err;
+		
+	if (hdsp->io_type == H9652 || hdsp->io_type == H9632)
+		return 0;
+	if (hdsp->io_type == Undefined) {
+		if ((err = hdsp_get_iobox_version(hdsp)) < 0)
+			return err;
+		if (hdsp->io_type == H9652 || hdsp->io_type == H9632)
+			return 0;
+	}
+	if (hdsp_check_for_iobox (hdsp))
+		return -EIO;
+
+	/* caution: max length of firmware filename is 30! */
+	switch (hdsp->io_type) {
+	case Multiface:
+		if (hdsp->firmware_rev == 0xa)
+			fwfile = "multiface_firmware.bin";
+		else
+			fwfile = "multiface_firmware_rev11.bin";
+		break;
+	case Digiface:
+		if (hdsp->firmware_rev == 0xa)
+			fwfile = "digiface_firmware.bin";
+		else
+			fwfile = "digiface_firmware_rev11.bin";
+		break;
+	default:
+		snd_printk(KERN_ERR "hdsp: invalid io_type %d\n", hdsp->io_type);
+		return -EINVAL;
+	}
+
+	if (request_firmware(&fw, fwfile, &hdsp->pci->dev)) {
+		snd_printk(KERN_ERR "hdsp: cannot load firmware %s\n", fwfile);
+		return -ENOENT;
+	}
+	if (fw->size < sizeof(hdsp->firmware_cache)) {
+		snd_printk(KERN_ERR "hdsp: too short firmware size %d (expected %d)\n",
+			   (int)fw->size, (int)sizeof(hdsp->firmware_cache));
+		release_firmware(fw);
+		return -EINVAL;
+	}
+#ifdef SNDRV_BIG_ENDIAN
+	{
+		int i;
+		u32 *src = hdsp->data;
+		for (i = 0; i < ARRAY_SIZE(hdsp->firmware_cache); i++, src++)
+			hdsp->firmware_cache[i] = ((*src & 0x000000ff) << 16) |
+				((*src & 0x0000ff00) << 8)  |
+				((*src & 0x00ff0000) >> 8)  |
+				((*src & 0xff000000) >> 16);
+	}
+#else
+	memcpy(hdsp->firmware_cache, fw->data, sizeof(hdsp->firmware_cache));
+#endif
+	release_firmware(fw);
+	
+	hdsp->state |= HDSP_FirmwareCached;
+
+	if ((err = snd_hdsp_load_firmware_from_cache(hdsp)) < 0)
+		return err;
+		
+	if (!(hdsp->state & HDSP_InitializationComplete)) {
+		snd_hdsp_initialize_channels(hdsp);
+		snd_hdsp_initialize_midi_flush(hdsp);
+		if ((err = snd_hdsp_create_alsa_devices(hdsp->card, hdsp)) < 0) {
+			snd_printk("error creating alsa devices\n");
+			return err;
+		}
+	}
+	return 0;
+}
+#endif
+
 static int __devinit snd_hdsp_create(snd_card_t *card,
 				     hdsp_t *hdsp,
 				     int precise_ptr)
@@ -5002,11 +5095,16 @@
 	}
 	
 	if ((hdsp_read (hdsp, HDSP_statusRegister) & HDSP_DllError) != 0) {
+#ifdef HDSP_FW_LOADER
+		if ((err = hdsp_request_fw_loader(hdsp)) < 0)
+			return err;
+#else
 		snd_printk("card initialization pending : waiting for firmware\n");
 		if ((err = snd_hdsp_create_hwdep(card, hdsp)) < 0) {
 			return err;
 		}
 		return 0;
+#endif
 	} 
 	
 	snd_printk("Firmware already loaded, initializing card.\n");
diff -Nru a/sound/pci/rme9652/rme9652.c b/sound/pci/rme9652/rme9652.c
--- a/sound/pci/rme9652/rme9652.c	2005-01-10 20:11:18 -08:00
+++ b/sound/pci/rme9652/rme9652.c	2005-01-10 20:11:18 -08:00
@@ -1584,7 +1584,7 @@
 static snd_kcontrol_new_t snd_rme9652_adat1_input =
 RME9652_ADAT1_IN("ADAT1 Input Source", 0);
 
-int snd_rme9652_create_controls(snd_card_t *card, rme9652_t *rme9652)
+static int snd_rme9652_create_controls(snd_card_t *card, rme9652_t *rme9652)
 {
 	unsigned int idx;
 	int err;
diff -Nru a/sound/pci/sonicvibes.c b/sound/pci/sonicvibes.c
--- a/sound/pci/sonicvibes.c	2005-01-10 20:11:21 -08:00
+++ b/sound/pci/sonicvibes.c	2005-01-10 20:11:21 -08:00
@@ -357,8 +357,8 @@
 	return value;
 }
 
-#ifdef CONFIG_SND_DEBUG
-void snd_sonicvibes_debug(sonicvibes_t * sonic)
+#if 0
+static void snd_sonicvibes_debug(sonicvibes_t * sonic)
 {
 	printk("SV REGS:          INDEX = 0x%02x  ", inb(SV_REG(sonic, INDEX)));
 	printk("                 STATUS = 0x%02x\n", inb(SV_REG(sonic, STATUS)));
@@ -1333,12 +1333,13 @@
 #endif
 	sonic->revision = snd_sonicvibes_in(sonic, SV_IREG_REVISION);
 	snd_ctl_add(card, snd_ctl_new1(&snd_sonicvibes_game_control, sonic));
-	snd_sonicvibes_proc_init(sonic);
 
 	if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, sonic, &ops)) < 0) {
 		snd_sonicvibes_free(sonic);
 		return err;
 	}
+
+	snd_sonicvibes_proc_init(sonic);
 
 	snd_card_set_dev(card, &pci->dev);
 
diff -Nru a/sound/pci/trident/trident_main.c b/sound/pci/trident/trident_main.c
--- a/sound/pci/trident/trident_main.c	2005-01-10 20:11:20 -08:00
+++ b/sound/pci/trident/trident_main.c	2005-01-10 20:11:20 -08:00
@@ -53,6 +53,9 @@
 #endif
 static int snd_trident_sis_reset(trident_t *trident);
 
+static void snd_trident_clear_voices(trident_t * trident, unsigned short v_min, unsigned short v_max);
+static int snd_trident_free(trident_t *trident);
+
 /*
  *  common I/O routines
  */
@@ -632,7 +635,7 @@
    Returns:     Delta value.
   
   ---------------------------------------------------------------------------*/
-unsigned int snd_trident_convert_rate(unsigned int rate)
+static unsigned int snd_trident_convert_rate(unsigned int rate)
 {
 	unsigned int delta;
 
@@ -692,7 +695,7 @@
    Returns:     Delta value.
   
   ---------------------------------------------------------------------------*/
-unsigned int snd_trident_spurious_threshold(unsigned int rate, unsigned int period_size)
+static unsigned int snd_trident_spurious_threshold(unsigned int rate, unsigned int period_size)
 {
 	unsigned int res = (rate * period_size) / 48000;
 	if (res < 64)
@@ -713,7 +716,7 @@
    Returns:     Control value.
   
   ---------------------------------------------------------------------------*/
-unsigned int snd_trident_control_mode(snd_pcm_substream_t *substream)
+static unsigned int snd_trident_control_mode(snd_pcm_substream_t *substream)
 {
 	unsigned int CTRL;
 	snd_pcm_runtime_t *runtime = substream->runtime;
@@ -770,8 +773,8 @@
   
   ---------------------------------------------------------------------------*/
 
-int snd_trident_allocate_pcm_mem(snd_pcm_substream_t * substream,
-				 snd_pcm_hw_params_t * hw_params)
+static int snd_trident_allocate_pcm_mem(snd_pcm_substream_t * substream,
+					snd_pcm_hw_params_t * hw_params)
 {
 	trident_t *trident = snd_pcm_substream_chip(substream);
 	snd_pcm_runtime_t *runtime = substream->runtime;
@@ -804,8 +807,8 @@
   
   ---------------------------------------------------------------------------*/
 
-int snd_trident_allocate_evoice(snd_pcm_substream_t * substream,
-				snd_pcm_hw_params_t * hw_params)
+static int snd_trident_allocate_evoice(snd_pcm_substream_t * substream,
+				       snd_pcm_hw_params_t * hw_params)
 {
 	trident_t *trident = snd_pcm_substream_chip(substream);
 	snd_pcm_runtime_t *runtime = substream->runtime;
@@ -3611,10 +3614,13 @@
 		return err;
 	}
 
-	if ((err = snd_trident_mixer(trident, pcm_spdif_device)) < 0) {
+	if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, trident, &ops)) < 0) {
 		snd_trident_free(trident);
 		return err;
 	}
+
+	if ((err = snd_trident_mixer(trident, pcm_spdif_device)) < 0)
+		return err;
 	
 	/* initialise synth voices */
 	for (i = 0; i < 64; i++) {
@@ -3635,12 +3641,7 @@
 
 	
 	snd_card_set_pm_callback(card, snd_trident_suspend, snd_trident_resume, trident);
-
 	snd_trident_proc_init(trident);
-	if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, trident, &ops)) < 0) {
-		snd_trident_free(trident);
-		return err;
-	}
 	snd_card_set_dev(card, &pci->dev);
 	*rtrident = trident;
 	return 0;
@@ -3650,7 +3651,7 @@
    snd_trident_free
   
    Description: This routine will free the device specific class for
-            q    the 4DWave card. 
+                the 4DWave card. 
                 
    Paramters:   trident  - device specific private data for 4DWave card
 
@@ -3658,7 +3659,7 @@
   
   ---------------------------------------------------------------------------*/
 
-int snd_trident_free(trident_t *trident)
+static int snd_trident_free(trident_t *trident)
 {
 #if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE))
 	if (trident->gameport) {
@@ -3679,8 +3680,7 @@
 			snd_util_memhdr_free(trident->tlb.memhdr);
 		if (trident->tlb.silent_page.area)
 			snd_dma_free_pages(&trident->tlb.silent_page);
-		if (trident->tlb.shadow_entries)
-			vfree(trident->tlb.shadow_entries);
+		vfree(trident->tlb.shadow_entries);
 		snd_dma_free_pages(&trident->tlb.buffer);
 	}
 	if (trident->irq >= 0)
@@ -3807,9 +3807,9 @@
 }
 
 /*---------------------------------------------------------------------------
-   snd_trident_attach_synthesizer, snd_trident_detach_synthesizer
+   snd_trident_attach_synthesizer
   
-   Description: Attach/detach synthesizer hooks
+   Description: Attach synthesizer hooks
                 
    Paramters:   trident  - device specific private data for 4DWave card
 
@@ -3828,17 +3828,6 @@
 	return 0;
 }
 
-int snd_trident_detach_synthesizer(trident_t *trident)
-{
-#if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE))
-	if (trident->seq_dev) {
-		snd_device_free(trident->card, trident->seq_dev);
-		trident->seq_dev = NULL;
-	}
-#endif
-	return 0;
-}
-
 snd_trident_voice_t *snd_trident_alloc_voice(trident_t * trident, int type, int client, int port)
 {
 	snd_trident_voice_t *pvoice;
@@ -3911,7 +3900,7 @@
 		private_free(voice);
 }
 
-void snd_trident_clear_voices(trident_t * trident, unsigned short v_min, unsigned short v_max)
+static void snd_trident_clear_voices(trident_t * trident, unsigned short v_min, unsigned short v_max)
 {
 	unsigned int i, val, mask[2] = { 0, 0 };
 
@@ -3955,7 +3944,6 @@
 		break;
 	}
 	pci_disable_device(trident->pci);
-	snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
 	return 0;
 }
 
@@ -3990,7 +3978,6 @@
 
 	snd_trident_enable_eso(trident);
 
-	snd_power_change_state(card, SNDRV_CTL_POWER_D0);
 	trident->in_suspend = 0;
 	return 0;
 }
@@ -4001,9 +3988,7 @@
 EXPORT_SYMBOL(snd_trident_start_voice);
 EXPORT_SYMBOL(snd_trident_stop_voice);
 EXPORT_SYMBOL(snd_trident_write_voice_regs);
-EXPORT_SYMBOL(snd_trident_clear_voices);
 /* trident_memory.c symbols */
 EXPORT_SYMBOL(snd_trident_synth_alloc);
 EXPORT_SYMBOL(snd_trident_synth_free);
-EXPORT_SYMBOL(snd_trident_synth_bzero);
 EXPORT_SYMBOL(snd_trident_synth_copy_from_user);
diff -Nru a/sound/pci/trident/trident_memory.c b/sound/pci/trident/trident_memory.c
--- a/sound/pci/trident/trident_memory.c	2005-01-10 20:11:20 -08:00
+++ b/sound/pci/trident/trident_memory.c	2005-01-10 20:11:20 -08:00
@@ -450,29 +450,6 @@
 }
 
 /*
- * bzero(blk + offset, size)
- */
-int snd_trident_synth_bzero(trident_t *trident, snd_util_memblk_t *blk, int offset, int size)
-{
-	int page, nextofs, end_offset, temp, temp1;
-
-	offset += blk->offset;
-	end_offset = offset + size;
-	page = get_aligned_page(offset) + 1;
-	do {
-		nextofs = aligned_page_offset(page);
-		temp = nextofs - offset;
-		temp1 = end_offset - offset;
-		if (temp1 < temp)
-			temp = temp1;
-		memset(offset_ptr(trident, offset), 0, temp);
-		offset = nextofs;
-		page++;
-	} while (offset < end_offset);
-	return 0;
-}
-
-/*
  * copy_from_user(blk + offset, data, size)
  */
 int snd_trident_synth_copy_from_user(trident_t *trident, snd_util_memblk_t *blk, int offset, const char __user *data, int size)
diff -Nru a/sound/pci/trident/trident_synth.c b/sound/pci/trident/trident_synth.c
--- a/sound/pci/trident/trident_synth.c	2005-01-10 20:11:18 -08:00
+++ b/sound/pci/trident/trident_synth.c	2005-01-10 20:11:18 -08:00
@@ -618,7 +618,7 @@
 	instr = snd_seq_instr_find(trident->synth.ilist, &v->instr, 0, 1);
 	if (instr != NULL) {
 		if (instr->ops) {
-			if (instr->ops->instr_type == snd_seq_simple_id)
+			if (!strcmp(instr->ops->instr_type, SNDRV_SEQ_INSTR_ID_SIMPLE))
 				snd_trident_simple_init(v);
 		}
 		snd_seq_instr_free_use(trident->synth.ilist, instr);
@@ -811,7 +811,7 @@
 	snd_seq_instr_list_free_cond(p->trident->synth.ilist, &ifree, client, 0);
 }
 
-int snd_trident_synth_event_input(snd_seq_event_t * ev, int direct, void *private_data, int atomic, int hop)
+static int snd_trident_synth_event_input(snd_seq_event_t * ev, int direct, void *private_data, int atomic, int hop)
 {
 	snd_trident_port_t *p = (snd_trident_port_t *) private_data;
 
diff -Nru a/sound/pci/via82xx.c b/sound/pci/via82xx.c
--- a/sound/pci/via82xx.c	2005-01-10 20:11:21 -08:00
+++ b/sound/pci/via82xx.c	2005-01-10 20:11:21 -08:00
@@ -81,7 +81,7 @@
 static int joystick[SNDRV_CARDS];
 #endif
 static int ac97_clock[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 48000};
-static int ac97_quirk[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = AC97_TUNE_DEFAULT};
+static char *ac97_quirk[SNDRV_CARDS];
 static int dxs_support[SNDRV_CARDS];
 
 module_param_array(index, int, NULL, 0444);
@@ -98,7 +98,7 @@
 #endif
 module_param_array(ac97_clock, int, NULL, 0444);
 MODULE_PARM_DESC(ac97_clock, "AC'97 codec clock (default 48000Hz).");
-module_param_array(ac97_quirk, int, NULL, 0444);
+module_param_array(ac97_quirk, charp, NULL, 0444);
 MODULE_PARM_DESC(ac97_quirk, "AC'97 workaround for strange hardware.");
 module_param_array(dxs_support, int, NULL, 0444);
 MODULE_PARM_DESC(dxs_support, "Support for DXS channels (0 = auto, 1 = enable, 2 = disable, 3 = 48k only, 4 = no VRA)");
@@ -332,6 +332,7 @@
 	struct snd_via_sg_table *idx_table;
 	/* for recovery from the unexpected pointer */
 	unsigned int lastpos;
+	unsigned int fragsize;
 	unsigned int bufsize;
 	unsigned int bufsize2;
 };
@@ -390,7 +391,6 @@
 	unsigned int ac97_secondary;	/* secondary AC'97 codec is present */
 
 	spinlock_t reg_lock;
-	spinlock_t ac97_lock;
 	snd_info_entry_t *proc_entry;
 
 #ifdef SUPPORT_JOYSTICK
@@ -478,6 +478,7 @@
 	dev->tbl_entries = idx;
 	dev->bufsize = periods * fragsize;
 	dev->bufsize2 = dev->bufsize / 2;
+	dev->fragsize = fragsize;
 	return 0;
 }
 
@@ -562,10 +563,8 @@
 	xval <<= VIA_REG_AC97_CODEC_ID_SHIFT;
 	xval |= reg << VIA_REG_AC97_CMD_SHIFT;
 	xval |= val << VIA_REG_AC97_DATA_SHIFT;
-	spin_lock(&chip->ac97_lock);
 	snd_via82xx_codec_xwrite(chip, xval);
 	snd_via82xx_codec_ready(chip, ac97->num);
-	spin_unlock(&chip->ac97_lock);
 }
 
 static unsigned short snd_via82xx_codec_read(ac97_t *ac97, unsigned short reg)
@@ -578,10 +577,8 @@
 	xval |= ac97->num ? VIA_REG_AC97_SECONDARY_VALID : VIA_REG_AC97_PRIMARY_VALID;
 	xval |= VIA_REG_AC97_READ;
 	xval |= (reg & 0x7f) << VIA_REG_AC97_CMD_SHIFT;
-	spin_lock(&chip->ac97_lock);
       	while (1) {
       		if (again++ > 3) {
-		        spin_unlock(&chip->ac97_lock);
 			snd_printk(KERN_ERR "codec_read: codec %i is not valid [0x%x]\n", ac97->num, snd_via82xx_codec_xread(chip));
 		      	return 0xffff;
 		}
@@ -593,7 +590,6 @@
 			break;
 		}
 	}
-	spin_unlock(&chip->ac97_lock);
 	return val & 0xffff;
 }
 
@@ -706,29 +702,34 @@
 
 static inline unsigned int calc_linear_pos(viadev_t *viadev, unsigned int idx, unsigned int count)
 {
-	unsigned int size, res;
+	unsigned int size, base, res;
 
 	size = viadev->idx_table[idx].size;
-	res = viadev->idx_table[idx].offset + size - count;
+	base = viadev->idx_table[idx].offset;
+	res = base + size - count;
 
 	/* check the validity of the calculated position */
 	if (size < count) {
 		snd_printd(KERN_ERR "invalid via82xx_cur_ptr (size = %d, count = %d)\n", (int)size, (int)count);
 		res = viadev->lastpos;
-	} else if (check_invalid_pos(viadev, res)) {
+	} else {
+		if (! count) {
+			/* Some mobos report count = 0 on the DMA boundary,
+			 * i.e. count = size indeed.
+			 * Let's check whether this step is above the expected size.
+			 */
+			int delta = res - viadev->lastpos;
+			if (delta < 0)
+				delta += viadev->bufsize;
+			if ((unsigned int)delta > viadev->fragsize)
+				res = base;
+		}
+		if (check_invalid_pos(viadev, res)) {
 #ifdef POINTER_DEBUG
-		printk("fail: idx = %i/%i, lastpos = 0x%x, bufsize2 = 0x%x, offsize = 0x%x, size = 0x%x, count = 0x%x\n", idx, viadev->tbl_entries, viadev->lastpos, viadev->bufsize2, viadev->idx_table[idx].offset, viadev->idx_table[idx].size, count);
+			printk(KERN_DEBUG "fail: idx = %i/%i, lastpos = 0x%x, bufsize2 = 0x%x, offsize = 0x%x, size = 0x%x, count = 0x%x\n", idx, viadev->tbl_entries, viadev->lastpos, viadev->bufsize2, viadev->idx_table[idx].offset, viadev->idx_table[idx].size, count);
 #endif
-		if (count && size < count) {
-			snd_printd(KERN_ERR "invalid via82xx_cur_ptr, using last valid pointer\n");
-			res = viadev->lastpos;
-		} else {
-			if (! count)
-				/* bogus count 0 on the DMA boundary? */
-				res = viadev->idx_table[idx].offset;
-			else
-				/* count register returns full size when end of buffer is reached */
-				res = viadev->idx_table[idx].offset + size;
+			/* count register returns full size when end of buffer is reached */
+			res = base + size;
 			if (check_invalid_pos(viadev, res)) {
 				snd_printd(KERN_ERR "invalid via82xx_cur_ptr (2), using last valid pointer\n");
 				res = viadev->lastpos;
@@ -778,12 +779,20 @@
 	via82xx_t *chip = snd_pcm_substream_chip(substream);
 	viadev_t *viadev = (viadev_t *)substream->runtime->private_data;
 	unsigned int idx, count, res;
+	int timeout = 5000;
 	
 	snd_assert(viadev->tbl_entries, return 0);
 	if (!(inb(VIADEV_REG(viadev, OFFSET_STATUS)) & VIA_REG_STAT_ACTIVE))
 		return 0;
 	spin_lock(&chip->reg_lock);
-	count = inl(VIADEV_REG(viadev, OFFSET_CURR_COUNT));
+	do {
+		count = inl(VIADEV_REG(viadev, OFFSET_CURR_COUNT));
+		/* some mobos read 0 count */
+		if ((count & 0xffffff) || ! viadev->running)
+			break;
+	} while (--timeout);
+	if (! timeout)
+		snd_printd(KERN_ERR "zero position is read\n");
 	idx = count >> 24;
 	if (idx >= viadev->tbl_entries) {
 #ifdef POINTER_DEBUG
@@ -1593,7 +1602,7 @@
 	{ } /* terminator */
 };
 
-static int __devinit snd_via82xx_mixer_new(via82xx_t *chip, int ac97_quirk)
+static int __devinit snd_via82xx_mixer_new(via82xx_t *chip, const char *quirk_override)
 {
 	ac97_template_t ac97;
 	int err;
@@ -1616,7 +1625,7 @@
 	if ((err = snd_ac97_mixer(chip->ac97_bus, &ac97, &chip->ac97)) < 0)
 		return err;
 
-	snd_ac97_tune_hardware(chip->ac97, ac97_quirks, ac97_quirk);
+	snd_ac97_tune_hardware(chip->ac97, ac97_quirks, quirk_override);
 
 	if (chip->chip_type != TYPE_VIA686) {
 		/* use slot 10/11 */
@@ -1635,8 +1644,6 @@
 	int i, err, caps;
 	unsigned char val;
 
-	pci_write_config_byte(chip->pci, VIA_FUNC_ENABLE,
-			      chip->old_legacy & ~(VIA_FUNC_ENABLE_SB|VIA_FUNC_ENABLE_FM));
 	caps = chip->chip_type == TYPE_VIA8233A ? 1 : 2;
 	for (i = 0; i < caps; i++) {
 		snd_via8233_capture_source.index = i;
@@ -1673,7 +1680,6 @@
 	legacy_cfg = chip->old_legacy_cfg;
 	legacy |= VIA_FUNC_MIDI_IRQMASK;	/* FIXME: correct? (disable MIDI) */
 	legacy &= ~VIA_FUNC_ENABLE_GAME;	/* disable joystick */
-	legacy &= ~(VIA_FUNC_ENABLE_SB|VIA_FUNC_ENABLE_FM);	/* diable SB & FM */
 	if (chip->revision >= VIA_REV_686_H) {
 		rev_h = 1;
 		if (mpu_port[dev] >= 0x200) {	/* force MIDI */
@@ -1911,7 +1917,6 @@
 
 	pci_set_power_state(chip->pci, 3);
 	pci_disable_device(chip->pci);
-	snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
 	return 0;
 }
 
@@ -1946,7 +1951,6 @@
 	for (i = 0; i < chip->num_devs; i++)
 		snd_via82xx_channel_reset(chip, &chip->devs[i]);
 
-	snd_power_change_state(card, SNDRV_CTL_POWER_D0);
 	return 0;
 }
 #endif /* CONFIG_PM */
@@ -2016,7 +2020,6 @@
 	chip->revision = revision;
 
 	spin_lock_init(&chip->reg_lock);
-	spin_lock_init(&chip->ac97_lock);
 	spin_lock_init(&chip->rates[0].lock);
 	spin_lock_init(&chip->rates[1].lock);
 	chip->card = card;
@@ -2025,6 +2028,8 @@
 
 	pci_read_config_byte(pci, VIA_FUNC_ENABLE, &chip->old_legacy);
 	pci_read_config_byte(pci, VIA_PNP_CONTROL, &chip->old_legacy_cfg);
+	pci_write_config_byte(chip->pci, VIA_FUNC_ENABLE,
+			      chip->old_legacy & ~(VIA_FUNC_ENABLE_SB|VIA_FUNC_ENABLE_FM));
 
 	if ((err = pci_request_regions(pci, card->driver)) < 0) {
 		kfree(chip);
@@ -2107,11 +2112,14 @@
 		{ .vendor = 0x1297, .device = 0xa232, .action = VIA_DXS_ENABLE }, /* Shuttle ?? */
 		{ .vendor = 0x1297, .device = 0xc160, .action = VIA_DXS_ENABLE }, /* Shuttle SK41G */
 		{ .vendor = 0x1458, .device = 0xa002, .action = VIA_DXS_ENABLE }, /* Gigabyte GA-7VAXP */
-		{ .vendor = 0x147b, .device = 0x1401, .action = VIA_DXS_ENABLE }, /* ABIT KD7(-RAID) */
-		{ .vendor = 0x14ff, .device = 0x0403, .action = VIA_DXS_ENABLE }, /* Twinhead mobo */
 		{ .vendor = 0x1462, .device = 0x3800, .action = VIA_DXS_ENABLE }, /* MSI KT266 */
-		{ .vendor = 0x1462, .device = 0x7120, .action = VIA_DXS_ENABLE }, /* MSI KT4V */
 		{ .vendor = 0x1462, .device = 0x5901, .action = VIA_DXS_NO_VRA }, /* MSI KT6 Delta-SR */
+		{ .vendor = 0x1462, .device = 0x7120, .action = VIA_DXS_ENABLE }, /* MSI KT4V */
+		{ .vendor = 0x147b, .device = 0x1401, .action = VIA_DXS_ENABLE }, /* ABIT KD7(-RAID) */
+		{ .vendor = 0x147b, .device = 0x1411, .action = VIA_DXS_ENABLE }, /* ABIT VA-20 */
+		{ .vendor = 0x147b, .device = 0x1413, .action = VIA_DXS_ENABLE }, /* ABIT KV8 Pro */
+		{ .vendor = 0x147b, .device = 0x1415, .action = VIA_DXS_NO_VRA }, /* Abit AV8 */
+		{ .vendor = 0x14ff, .device = 0x0403, .action = VIA_DXS_ENABLE }, /* Twinhead mobo */
 		{ .vendor = 0x1584, .device = 0x8120, .action = VIA_DXS_ENABLE }, /* Gericom/Targa/Vobis/Uniwill laptop */
 		{ .vendor = 0x1584, .device = 0x8123, .action = VIA_DXS_NO_VRA }, /* Uniwill (Targa Visionary XP-210) */
 		{ .vendor = 0x161f, .device = 0x202b, .action = VIA_DXS_NO_VRA }, /* Amira Note book */
diff -Nru a/sound/pci/via82xx_modem.c b/sound/pci/via82xx_modem.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/sound/pci/via82xx_modem.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,1256 @@
+/*
+ *   ALSA modem driver for VIA VT82xx (South Bridge)
+ *
+ *   VT82C686A/B/C, VT8233A/C, VT8235
+ *
+ *	Copyright (c) 2000 Jaroslav Kysela <perex@suse.cz>
+ *	                   Tjeerd.Mulder <Tjeerd.Mulder@fujitsu-siemens.com>
+ *                    2002 Takashi Iwai <tiwai@suse.de>
+ *
+ *   This program is free software; you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation; either version 2 of the License, or
+ *   (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+ *
+ */
+
+/*
+ * Changes:
+ *
+ * Sep. 2,  2004  Sasha Khapyorsky <sashak@smlink.com>
+ *      Modified from original audio driver 'via82xx.c' to support AC97
+ *      modems.
+ */
+
+#include <sound/driver.h>
+#include <asm/io.h>
+#include <linux/delay.h>
+#include <linux/interrupt.h>
+#include <linux/init.h>
+#include <linux/pci.h>
+#include <linux/slab.h>
+#include <linux/moduleparam.h>
+#include <sound/core.h>
+#include <sound/pcm.h>
+#include <sound/pcm_params.h>
+#include <sound/info.h>
+#include <sound/ac97_codec.h>
+#include <sound/initval.h>
+
+#if 0
+#define POINTER_DEBUG
+#endif
+
+MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>");
+MODULE_DESCRIPTION("VIA VT82xx modem");
+MODULE_LICENSE("GPL");
+MODULE_SUPPORTED_DEVICE("{{VIA,VT82C686A/B/C modem,pci}}");
+
+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)] = 48000};
+
+module_param_array(index, int, NULL, 0444);
+MODULE_PARM_DESC(index, "Index value for VIA 82xx bridge.");
+module_param_array(id, charp, NULL, 0444);
+MODULE_PARM_DESC(id, "ID string for VIA 82xx bridge.");
+module_param_array(enable, bool, NULL, 0444);
+MODULE_PARM_DESC(enable, "Enable modem part of VIA 82xx bridge.");
+module_param_array(ac97_clock, int, NULL, 0444);
+MODULE_PARM_DESC(ac97_clock, "AC'97 codec clock (default 48000Hz).");
+
+
+/*
+ *  Direct registers
+ */
+
+#define VIAREG(via, x) ((via)->port + VIA_REG_##x)
+#define VIADEV_REG(viadev, x) ((viadev)->port + VIA_REG_##x)
+
+/* common offsets */
+#define VIA_REG_OFFSET_STATUS		0x00	/* byte - channel status */
+#define   VIA_REG_STAT_ACTIVE		0x80	/* RO */
+#define   VIA_REG_STAT_PAUSED		0x40	/* RO */
+#define   VIA_REG_STAT_TRIGGER_QUEUED	0x08	/* RO */
+#define   VIA_REG_STAT_STOPPED		0x04	/* RWC */
+#define   VIA_REG_STAT_EOL		0x02	/* RWC */
+#define   VIA_REG_STAT_FLAG		0x01	/* RWC */
+#define VIA_REG_OFFSET_CONTROL		0x01	/* byte - channel control */
+#define   VIA_REG_CTRL_START		0x80	/* WO */
+#define   VIA_REG_CTRL_TERMINATE	0x40	/* WO */
+#define   VIA_REG_CTRL_AUTOSTART	0x20
+#define   VIA_REG_CTRL_PAUSE		0x08	/* RW */
+#define   VIA_REG_CTRL_INT_STOP		0x04		
+#define   VIA_REG_CTRL_INT_EOL		0x02
+#define   VIA_REG_CTRL_INT_FLAG		0x01
+#define   VIA_REG_CTRL_RESET		0x01	/* RW - probably reset? undocumented */
+#define   VIA_REG_CTRL_INT (VIA_REG_CTRL_INT_FLAG | VIA_REG_CTRL_INT_EOL | VIA_REG_CTRL_AUTOSTART)
+#define VIA_REG_OFFSET_TYPE		0x02	/* byte - channel type (686 only) */
+#define   VIA_REG_TYPE_AUTOSTART	0x80	/* RW - autostart at EOL */
+#define   VIA_REG_TYPE_16BIT		0x20	/* RW */
+#define   VIA_REG_TYPE_STEREO		0x10	/* RW */
+#define   VIA_REG_TYPE_INT_LLINE	0x00
+#define   VIA_REG_TYPE_INT_LSAMPLE	0x04
+#define   VIA_REG_TYPE_INT_LESSONE	0x08
+#define   VIA_REG_TYPE_INT_MASK		0x0c
+#define   VIA_REG_TYPE_INT_EOL		0x02
+#define   VIA_REG_TYPE_INT_FLAG		0x01
+#define VIA_REG_OFFSET_TABLE_PTR	0x04	/* dword - channel table pointer */
+#define VIA_REG_OFFSET_CURR_PTR		0x04	/* dword - channel current pointer */
+#define VIA_REG_OFFSET_STOP_IDX		0x08	/* dword - stop index, channel type, sample rate */
+#define VIA_REG_OFFSET_CURR_COUNT	0x0c	/* dword - channel current count (24 bit) */
+#define VIA_REG_OFFSET_CURR_INDEX	0x0f	/* byte - channel current index (for via8233 only) */
+
+#define DEFINE_VIA_REGSET(name,val) \
+enum {\
+	VIA_REG_##name##_STATUS		= (val),\
+	VIA_REG_##name##_CONTROL	= (val) + 0x01,\
+	VIA_REG_##name##_TYPE		= (val) + 0x02,\
+	VIA_REG_##name##_TABLE_PTR	= (val) + 0x04,\
+	VIA_REG_##name##_CURR_PTR	= (val) + 0x04,\
+	VIA_REG_##name##_STOP_IDX	= (val) + 0x08,\
+	VIA_REG_##name##_CURR_COUNT	= (val) + 0x0c,\
+}
+
+/* modem block */
+DEFINE_VIA_REGSET(MO, 0x40);
+DEFINE_VIA_REGSET(MI, 0x50);
+
+/* AC'97 */
+#define VIA_REG_AC97			0x80	/* dword */
+#define   VIA_REG_AC97_CODEC_ID_MASK	(3<<30)
+#define   VIA_REG_AC97_CODEC_ID_SHIFT	30
+#define   VIA_REG_AC97_CODEC_ID_PRIMARY	0x00
+#define   VIA_REG_AC97_CODEC_ID_SECONDARY 0x01
+#define   VIA_REG_AC97_SECONDARY_VALID	(1<<27)
+#define   VIA_REG_AC97_PRIMARY_VALID	(1<<25)
+#define   VIA_REG_AC97_BUSY		(1<<24)
+#define   VIA_REG_AC97_READ		(1<<23)
+#define   VIA_REG_AC97_CMD_SHIFT	16
+#define   VIA_REG_AC97_CMD_MASK		0x7e
+#define   VIA_REG_AC97_DATA_SHIFT	0
+#define   VIA_REG_AC97_DATA_MASK	0xffff
+
+#define VIA_REG_SGD_SHADOW		0x84	/* dword */
+#define   VIA_REG_SGD_STAT_PB_FLAG	(1<<0)
+#define   VIA_REG_SGD_STAT_CP_FLAG	(1<<1)
+#define   VIA_REG_SGD_STAT_FM_FLAG	(1<<2)
+#define   VIA_REG_SGD_STAT_PB_EOL	(1<<4)
+#define   VIA_REG_SGD_STAT_CP_EOL	(1<<5)
+#define   VIA_REG_SGD_STAT_FM_EOL	(1<<6)
+#define   VIA_REG_SGD_STAT_PB_STOP	(1<<8)
+#define   VIA_REG_SGD_STAT_CP_STOP	(1<<9)
+#define   VIA_REG_SGD_STAT_FM_STOP	(1<<10)
+#define   VIA_REG_SGD_STAT_PB_ACTIVE	(1<<12)
+#define   VIA_REG_SGD_STAT_CP_ACTIVE	(1<<13)
+#define   VIA_REG_SGD_STAT_FM_ACTIVE	(1<<14)
+#define   VIA_REG_SGD_STAT_MR_FLAG      (1<<16)
+#define   VIA_REG_SGD_STAT_MW_FLAG      (1<<17)
+#define   VIA_REG_SGD_STAT_MR_EOL       (1<<20)
+#define   VIA_REG_SGD_STAT_MW_EOL       (1<<21)
+#define   VIA_REG_SGD_STAT_MR_STOP      (1<<24)
+#define   VIA_REG_SGD_STAT_MW_STOP      (1<<25)
+#define   VIA_REG_SGD_STAT_MR_ACTIVE    (1<<28)
+#define   VIA_REG_SGD_STAT_MW_ACTIVE    (1<<29)
+
+#define VIA_REG_GPI_STATUS		0x88
+#define VIA_REG_GPI_INTR		0x8c
+
+#define VIA_TBL_BIT_FLAG	0x40000000
+#define VIA_TBL_BIT_EOL		0x80000000
+
+/* pci space */
+#define VIA_ACLINK_STAT		0x40
+#define  VIA_ACLINK_C11_READY	0x20
+#define  VIA_ACLINK_C10_READY	0x10
+#define  VIA_ACLINK_C01_READY	0x04 /* secondary codec ready */
+#define  VIA_ACLINK_LOWPOWER	0x02 /* low-power state */
+#define  VIA_ACLINK_C00_READY	0x01 /* primary codec ready */
+#define VIA_ACLINK_CTRL		0x41
+#define  VIA_ACLINK_CTRL_ENABLE	0x80 /* 0: disable, 1: enable */
+#define  VIA_ACLINK_CTRL_RESET	0x40 /* 0: assert, 1: de-assert */
+#define  VIA_ACLINK_CTRL_SYNC	0x20 /* 0: release SYNC, 1: force SYNC hi */
+#define  VIA_ACLINK_CTRL_SDO	0x10 /* 0: release SDO, 1: force SDO hi */
+#define  VIA_ACLINK_CTRL_VRA	0x08 /* 0: disable VRA, 1: enable VRA */
+#define  VIA_ACLINK_CTRL_PCM	0x04 /* 0: disable PCM, 1: enable PCM */
+#define  VIA_ACLINK_CTRL_FM	0x02 /* via686 only */
+#define  VIA_ACLINK_CTRL_SB	0x01 /* via686 only */
+#define  VIA_ACLINK_CTRL_INIT	(VIA_ACLINK_CTRL_ENABLE|\
+				 VIA_ACLINK_CTRL_RESET|\
+				 VIA_ACLINK_CTRL_PCM)
+#define VIA_FUNC_ENABLE		0x42
+#define  VIA_FUNC_MIDI_PNP	0x80 /* FIXME: it's 0x40 in the datasheet! */
+#define  VIA_FUNC_MIDI_IRQMASK	0x40 /* FIXME: not documented! */
+#define  VIA_FUNC_RX2C_WRITE	0x20
+#define  VIA_FUNC_SB_FIFO_EMPTY	0x10
+#define  VIA_FUNC_ENABLE_GAME	0x08
+#define  VIA_FUNC_ENABLE_FM	0x04
+#define  VIA_FUNC_ENABLE_MIDI	0x02
+#define  VIA_FUNC_ENABLE_SB	0x01
+#define VIA_PNP_CONTROL		0x43
+#define VIA_MC97_CTRL		0x44
+#define  VIA_MC97_CTRL_ENABLE   0x80
+#define  VIA_MC97_CTRL_SECONDARY 0x40
+#define  VIA_MC97_CTRL_INIT     (VIA_MC97_CTRL_ENABLE|\
+                                 VIA_MC97_CTRL_SECONDARY)
+
+
+typedef struct _snd_via82xx_modem via82xx_t;
+typedef struct via_dev viadev_t;
+
+/*
+ * pcm stream
+ */
+
+struct snd_via_sg_table {
+	unsigned int offset;
+	unsigned int size;
+} ;
+
+#define VIA_TABLE_SIZE	255
+
+struct via_dev {
+	unsigned int reg_offset;
+	unsigned long port;
+	int direction;	/* playback = 0, capture = 1 */
+        snd_pcm_substream_t *substream;
+	int running;
+	unsigned int tbl_entries; /* # descriptors */
+	struct snd_dma_buffer table;
+	struct snd_via_sg_table *idx_table;
+	/* for recovery from the unexpected pointer */
+	unsigned int lastpos;
+	unsigned int bufsize;
+	unsigned int bufsize2;
+};
+
+enum { TYPE_CARD_VIA82XX_MODEM = 1 };
+
+#define VIA_MAX_MODEM_DEVS	2
+
+struct _snd_via82xx_modem {
+	int irq;
+
+	unsigned long port;
+
+	unsigned int intr_mask; /* SGD_SHADOW mask to check interrupts */
+
+	struct pci_dev *pci;
+	snd_card_t *card;
+
+	unsigned int num_devs;
+	unsigned int playback_devno, capture_devno;
+	viadev_t devs[VIA_MAX_MODEM_DEVS];
+
+	snd_pcm_t *pcms[2];
+
+	ac97_bus_t *ac97_bus;
+	ac97_t *ac97;
+	unsigned int ac97_clock;
+	unsigned int ac97_secondary;	/* secondary AC'97 codec is present */
+
+	spinlock_t reg_lock;
+	snd_info_entry_t *proc_entry;
+};
+
+static struct pci_device_id snd_via82xx_modem_ids[] = {
+	{ 0x1106, 0x3068, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TYPE_CARD_VIA82XX_MODEM, },
+	{ 0, }
+};
+
+MODULE_DEVICE_TABLE(pci, snd_via82xx_modem_ids);
+
+/*
+ */
+
+/*
+ * allocate and initialize the descriptor buffers
+ * periods = number of periods
+ * fragsize = period size in bytes
+ */
+static int build_via_table(viadev_t *dev, snd_pcm_substream_t *substream,
+			   struct pci_dev *pci,
+			   unsigned int periods, unsigned int fragsize)
+{
+	unsigned int i, idx, ofs, rest;
+	via82xx_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_sg_buf *sgbuf = snd_pcm_substream_sgbuf(substream);
+
+	if (dev->table.area == NULL) {
+		/* the start of each lists must be aligned to 8 bytes,
+		 * but the kernel pages are much bigger, so we don't care
+		 */
+		if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(chip->pci),
+					PAGE_ALIGN(VIA_TABLE_SIZE * 2 * 8),
+					&dev->table) < 0)
+			return -ENOMEM;
+	}
+	if (! dev->idx_table) {
+		dev->idx_table = kmalloc(sizeof(*dev->idx_table) * VIA_TABLE_SIZE, GFP_KERNEL);
+		if (! dev->idx_table)
+			return -ENOMEM;
+	}
+
+	/* fill the entries */
+	idx = 0;
+	ofs = 0;
+	for (i = 0; i < periods; i++) {
+		rest = fragsize;
+		/* fill descriptors for a period.
+		 * a period can be split to several descriptors if it's
+		 * over page boundary.
+		 */
+		do {
+			unsigned int r;
+			unsigned int flag;
+
+			if (idx >= VIA_TABLE_SIZE) {
+				snd_printk(KERN_ERR "via82xx: too much table size!\n");
+				return -EINVAL;
+			}
+			((u32 *)dev->table.area)[idx << 1] = cpu_to_le32((u32)snd_pcm_sgbuf_get_addr(sgbuf, ofs));
+			r = PAGE_SIZE - (ofs % PAGE_SIZE);
+			if (rest < r)
+				r = rest;
+			rest -= r;
+			if (! rest) {
+				if (i == periods - 1)
+					flag = VIA_TBL_BIT_EOL; /* buffer boundary */
+				else
+					flag = VIA_TBL_BIT_FLAG; /* period boundary */
+			} else
+				flag = 0; /* period continues to the next */
+			// printk("via: tbl %d: at %d  size %d (rest %d)\n", idx, ofs, r, rest);
+			((u32 *)dev->table.area)[(idx<<1) + 1] = cpu_to_le32(r | flag);
+			dev->idx_table[idx].offset = ofs;
+			dev->idx_table[idx].size = r;
+			ofs += r;
+			idx++;
+		} while (rest > 0);
+	}
+	dev->tbl_entries = idx;
+	dev->bufsize = periods * fragsize;
+	dev->bufsize2 = dev->bufsize / 2;
+	return 0;
+}
+
+
+static int clean_via_table(viadev_t *dev, snd_pcm_substream_t *substream,
+			   struct pci_dev *pci)
+{
+	if (dev->table.area) {
+		snd_dma_free_pages(&dev->table);
+		dev->table.area = NULL;
+	}
+	if (dev->idx_table) {
+		kfree(dev->idx_table);
+		dev->idx_table = NULL;
+	}
+	return 0;
+}
+
+/*
+ *  Basic I/O
+ */
+
+static inline unsigned int snd_via82xx_codec_xread(via82xx_t *chip)
+{
+	return inl(VIAREG(chip, AC97));
+}
+ 
+static inline void snd_via82xx_codec_xwrite(via82xx_t *chip, unsigned int val)
+{
+	outl(val, VIAREG(chip, AC97));
+}
+ 
+static int snd_via82xx_codec_ready(via82xx_t *chip, int secondary)
+{
+	unsigned int timeout = 1000;	/* 1ms */
+	unsigned int val;
+	
+	while (timeout-- > 0) {
+		udelay(1);
+		if (!((val = snd_via82xx_codec_xread(chip)) & VIA_REG_AC97_BUSY))
+			return val & 0xffff;
+	}
+	snd_printk(KERN_ERR "codec_ready: codec %i is not ready [0x%x]\n", secondary, snd_via82xx_codec_xread(chip));
+	return -EIO;
+}
+ 
+static int snd_via82xx_codec_valid(via82xx_t *chip, int secondary)
+{
+	unsigned int timeout = 1000;	/* 1ms */
+	unsigned int val, val1;
+	unsigned int stat = !secondary ? VIA_REG_AC97_PRIMARY_VALID :
+					 VIA_REG_AC97_SECONDARY_VALID;
+	
+	while (timeout-- > 0) {
+		val = snd_via82xx_codec_xread(chip);
+		val1 = val & (VIA_REG_AC97_BUSY | stat);
+		if (val1 == stat)
+			return val & 0xffff;
+		udelay(1);
+	}
+	return -EIO;
+}
+ 
+static void snd_via82xx_codec_wait(ac97_t *ac97)
+{
+	via82xx_t *chip = ac97->private_data;
+	int err;
+	err = snd_via82xx_codec_ready(chip, ac97->num);
+	/* here we need to wait fairly for long time.. */
+	set_current_state(TASK_UNINTERRUPTIBLE);
+	schedule_timeout(HZ/2);
+}
+
+static void snd_via82xx_codec_write(ac97_t *ac97,
+				    unsigned short reg,
+				    unsigned short val)
+{
+	via82xx_t *chip = ac97->private_data;
+	unsigned int xval;
+	
+	xval = !ac97->num ? VIA_REG_AC97_CODEC_ID_PRIMARY : VIA_REG_AC97_CODEC_ID_SECONDARY;
+	xval <<= VIA_REG_AC97_CODEC_ID_SHIFT;
+	xval |= reg << VIA_REG_AC97_CMD_SHIFT;
+	xval |= val << VIA_REG_AC97_DATA_SHIFT;
+	snd_via82xx_codec_xwrite(chip, xval);
+	snd_via82xx_codec_ready(chip, ac97->num);
+}
+
+static unsigned short snd_via82xx_codec_read(ac97_t *ac97, unsigned short reg)
+{
+	via82xx_t *chip = ac97->private_data;
+	unsigned int xval, val = 0xffff;
+	int again = 0;
+
+	xval = ac97->num << VIA_REG_AC97_CODEC_ID_SHIFT;
+	xval |= ac97->num ? VIA_REG_AC97_SECONDARY_VALID : VIA_REG_AC97_PRIMARY_VALID;
+	xval |= VIA_REG_AC97_READ;
+	xval |= (reg & 0x7f) << VIA_REG_AC97_CMD_SHIFT;
+      	while (1) {
+      		if (again++ > 3) {
+			snd_printk(KERN_ERR "codec_read: codec %i is not valid [0x%x]\n", ac97->num, snd_via82xx_codec_xread(chip));
+		      	return 0xffff;
+		}
+		snd_via82xx_codec_xwrite(chip, xval);
+		udelay (20);
+		if (snd_via82xx_codec_valid(chip, ac97->num) >= 0) {
+			udelay(25);
+			val = snd_via82xx_codec_xread(chip);
+			break;
+		}
+	}
+	return val & 0xffff;
+}
+
+static void snd_via82xx_channel_reset(via82xx_t *chip, viadev_t *viadev)
+{
+	outb(VIA_REG_CTRL_PAUSE | VIA_REG_CTRL_TERMINATE | VIA_REG_CTRL_RESET,
+	     VIADEV_REG(viadev, OFFSET_CONTROL));
+	inb(VIADEV_REG(viadev, OFFSET_CONTROL));
+	udelay(50);
+	/* disable interrupts */
+	outb(0x00, VIADEV_REG(viadev, OFFSET_CONTROL));
+	/* clear interrupts */
+	outb(0x03, VIADEV_REG(viadev, OFFSET_STATUS));
+	outb(0x00, VIADEV_REG(viadev, OFFSET_TYPE)); /* for via686 */
+	// outl(0, VIADEV_REG(viadev, OFFSET_CURR_PTR));
+	viadev->lastpos = 0;
+}
+
+
+/*
+ *  Interrupt handler
+ */
+
+static irqreturn_t snd_via82xx_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+{
+	via82xx_t *chip = dev_id;
+	unsigned int status;
+	unsigned int i;
+
+	status = inl(VIAREG(chip, SGD_SHADOW));
+	if (! (status & chip->intr_mask)) {
+		return IRQ_NONE;
+	}
+// _skip_sgd:
+
+	/* check status for each stream */
+	spin_lock(&chip->reg_lock);
+	for (i = 0; i < chip->num_devs; i++) {
+		viadev_t *viadev = &chip->devs[i];
+		unsigned char c_status = inb(VIADEV_REG(viadev, OFFSET_STATUS));
+		c_status &= (VIA_REG_STAT_EOL|VIA_REG_STAT_FLAG|VIA_REG_STAT_STOPPED);
+		if (! c_status)
+			continue;
+		if (viadev->substream && viadev->running) {
+			spin_unlock(&chip->reg_lock);
+			snd_pcm_period_elapsed(viadev->substream);
+			spin_lock(&chip->reg_lock);
+		}
+		outb(c_status, VIADEV_REG(viadev, OFFSET_STATUS)); /* ack */
+	}
+	spin_unlock(&chip->reg_lock);
+	return IRQ_HANDLED;
+}
+
+/*
+ *  PCM callbacks
+ */
+
+/*
+ * trigger callback
+ */
+static int snd_via82xx_pcm_trigger(snd_pcm_substream_t * substream, int cmd)
+{
+	via82xx_t *chip = snd_pcm_substream_chip(substream);
+	viadev_t *viadev = (viadev_t *)substream->runtime->private_data;
+	unsigned char val = 0;
+
+	switch (cmd) {
+	case SNDRV_PCM_TRIGGER_START:
+		val |= VIA_REG_CTRL_START;
+		viadev->running = 1;
+		break;
+	case SNDRV_PCM_TRIGGER_STOP:
+		val = VIA_REG_CTRL_TERMINATE;
+		viadev->running = 0;
+		break;
+	case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
+		val |= VIA_REG_CTRL_PAUSE;
+		viadev->running = 0;
+		break;
+	case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
+		viadev->running = 1;
+		break;
+	default:
+		return -EINVAL;
+	}
+	outb(val, VIADEV_REG(viadev, OFFSET_CONTROL));
+	if (cmd == SNDRV_PCM_TRIGGER_STOP)
+		snd_via82xx_channel_reset(chip, viadev);
+	return 0;
+}
+
+static int snd_via82xx_modem_pcm_trigger(snd_pcm_substream_t * substream, int cmd)
+{
+	via82xx_t *chip = snd_pcm_substream_chip(substream);
+	unsigned int val = 0;
+	switch (cmd) {
+	case SNDRV_PCM_TRIGGER_START:
+		val = snd_ac97_read(chip->ac97, AC97_GPIO_STATUS);
+		outl(val|AC97_GPIO_LINE1_OH, VIAREG(chip, GPI_STATUS));
+		break;
+	case SNDRV_PCM_TRIGGER_STOP:
+		val = snd_ac97_read(chip->ac97, AC97_GPIO_STATUS);
+		outl(val&~AC97_GPIO_LINE1_OH, VIAREG(chip, GPI_STATUS));
+		break;
+	default:
+		break;
+	}
+	return snd_via82xx_pcm_trigger(substream, cmd);
+}
+
+/*
+ * pointer callbacks
+ */
+
+/*
+ * calculate the linear position at the given sg-buffer index and the rest count
+ */
+
+#define check_invalid_pos(viadev,pos) \
+	((pos) < viadev->lastpos && ((pos) >= viadev->bufsize2 || viadev->lastpos < viadev->bufsize2))
+
+static inline unsigned int calc_linear_pos(viadev_t *viadev, unsigned int idx, unsigned int count)
+{
+	unsigned int size, res;
+
+	size = viadev->idx_table[idx].size;
+	res = viadev->idx_table[idx].offset + size - count;
+
+	/* check the validity of the calculated position */
+	if (size < count) {
+		snd_printd(KERN_ERR "invalid via82xx_cur_ptr (size = %d, count = %d)\n", (int)size, (int)count);
+		res = viadev->lastpos;
+	} else if (check_invalid_pos(viadev, res)) {
+#ifdef POINTER_DEBUG
+		printk("fail: idx = %i/%i, lastpos = 0x%x, bufsize2 = 0x%x, offsize = 0x%x, size = 0x%x, count = 0x%x\n", idx, viadev->tbl_entries, viadev->lastpos, viadev->bufsize2, viadev->idx_table[idx].offset, viadev->idx_table[idx].size, count);
+#endif
+		if (count && size < count) {
+			snd_printd(KERN_ERR "invalid via82xx_cur_ptr, using last valid pointer\n");
+			res = viadev->lastpos;
+		} else {
+			if (! count)
+				/* bogus count 0 on the DMA boundary? */
+				res = viadev->idx_table[idx].offset;
+			else
+				/* count register returns full size when end of buffer is reached */
+				res = viadev->idx_table[idx].offset + size;
+			if (check_invalid_pos(viadev, res)) {
+				snd_printd(KERN_ERR "invalid via82xx_cur_ptr (2), using last valid pointer\n");
+				res = viadev->lastpos;
+			}
+		}
+	}
+	viadev->lastpos = res; /* remember the last position */
+	if (res >= viadev->bufsize)
+		res -= viadev->bufsize;
+	return res;
+}
+
+/*
+ * get the current pointer on via686
+ */
+static snd_pcm_uframes_t snd_via686_pcm_pointer(snd_pcm_substream_t *substream)
+{
+	via82xx_t *chip = snd_pcm_substream_chip(substream);
+	viadev_t *viadev = (viadev_t *)substream->runtime->private_data;
+	unsigned int idx, ptr, count, res;
+
+	snd_assert(viadev->tbl_entries, return 0);
+	if (!(inb(VIADEV_REG(viadev, OFFSET_STATUS)) & VIA_REG_STAT_ACTIVE))
+		return 0;
+
+	spin_lock(&chip->reg_lock);
+	count = inl(VIADEV_REG(viadev, OFFSET_CURR_COUNT)) & 0xffffff;
+	/* The via686a does not have the current index register,
+	 * so we need to calculate the index from CURR_PTR.
+	 */
+	ptr = inl(VIADEV_REG(viadev, OFFSET_CURR_PTR));
+	if (ptr <= (unsigned int)viadev->table.addr)
+		idx = 0;
+	else /* CURR_PTR holds the address + 8 */
+		idx = ((ptr - (unsigned int)viadev->table.addr) / 8 - 1) % viadev->tbl_entries;
+	res = calc_linear_pos(viadev, idx, count);
+	spin_unlock(&chip->reg_lock);
+
+	return bytes_to_frames(substream->runtime, res);
+}
+
+/*
+ * hw_params callback:
+ * allocate the buffer and build up the buffer description table
+ */
+static int snd_via82xx_hw_params(snd_pcm_substream_t * substream,
+				 snd_pcm_hw_params_t * hw_params)
+{
+	via82xx_t *chip = snd_pcm_substream_chip(substream);
+	viadev_t *viadev = (viadev_t *)substream->runtime->private_data;
+	int err;
+
+	err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params));
+	if (err < 0)
+		return err;
+	err = build_via_table(viadev, substream, chip->pci,
+			      params_periods(hw_params),
+			      params_period_bytes(hw_params));
+	if (err < 0)
+		return err;
+
+	snd_ac97_write(chip->ac97, AC97_LINE1_RATE, params_rate(hw_params));
+	snd_ac97_write(chip->ac97, AC97_LINE1_LEVEL, 0);
+
+	return 0;
+}
+
+/*
+ * hw_free callback:
+ * clean up the buffer description table and release the buffer
+ */
+static int snd_via82xx_hw_free(snd_pcm_substream_t * substream)
+{
+	via82xx_t *chip = snd_pcm_substream_chip(substream);
+	viadev_t *viadev = (viadev_t *)substream->runtime->private_data;
+
+	clean_via_table(viadev, substream, chip->pci);
+	snd_pcm_lib_free_pages(substream);
+	return 0;
+}
+
+
+/*
+ * set up the table pointer
+ */
+static void snd_via82xx_set_table_ptr(via82xx_t *chip, viadev_t *viadev)
+{
+	snd_via82xx_codec_ready(chip, chip->ac97_secondary);
+	outl((u32)viadev->table.addr, VIADEV_REG(viadev, OFFSET_TABLE_PTR));
+	udelay(20);
+	snd_via82xx_codec_ready(chip, chip->ac97_secondary);
+}
+
+/*
+ * prepare callback for playback and capture
+ */
+static int snd_via82xx_pcm_prepare(snd_pcm_substream_t *substream)
+{
+	via82xx_t *chip = snd_pcm_substream_chip(substream);
+	viadev_t *viadev = (viadev_t *)substream->runtime->private_data;
+
+	snd_via82xx_channel_reset(chip, viadev);
+	/* this must be set after channel_reset */
+	snd_via82xx_set_table_ptr(chip, viadev);
+	outb(VIA_REG_TYPE_AUTOSTART|VIA_REG_TYPE_INT_EOL|VIA_REG_TYPE_INT_FLAG,
+	     VIADEV_REG(viadev, OFFSET_TYPE));
+	return 0;
+}
+
+/*
+ * pcm hardware definition, identical for both playback and capture
+ */
+static snd_pcm_hardware_t snd_via82xx_hw =
+{
+	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
+				 SNDRV_PCM_INFO_BLOCK_TRANSFER |
+				 SNDRV_PCM_INFO_MMAP_VALID |
+				 SNDRV_PCM_INFO_RESUME |
+				 SNDRV_PCM_INFO_PAUSE),
+	.formats =		SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE,
+	.rates =		SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_KNOT,
+	.rate_min =		8000,
+	.rate_max =		16000,
+	.channels_min =		1,
+	.channels_max =		1,
+	.buffer_bytes_max =	128 * 1024,
+	.period_bytes_min =	32,
+	.period_bytes_max =	128 * 1024,
+	.periods_min =		2,
+	.periods_max =		VIA_TABLE_SIZE / 2,
+	.fifo_size =		0,
+};
+
+
+/*
+ * open callback skeleton
+ */
+static int snd_via82xx_modem_pcm_open(via82xx_t *chip, viadev_t *viadev, snd_pcm_substream_t * substream)
+{
+	snd_pcm_runtime_t *runtime = substream->runtime;
+	int err;
+        static unsigned int rates[] = { 8000,  9600, 12000, 16000 };
+        static snd_pcm_hw_constraint_list_t hw_constraints_rates = {
+                .count = ARRAY_SIZE(rates),
+                .list = rates,
+                .mask = 0,
+        };
+
+	runtime->hw = snd_via82xx_hw;
+	
+        if ((err = snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, &hw_constraints_rates)) < 0)
+                return err;
+
+	/* we may remove following constaint when we modify table entries
+	   in interrupt */
+	if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0)
+		return err;
+
+	runtime->private_data = viadev;
+	viadev->substream = substream;
+
+	return 0;
+}
+
+
+/*
+ * open callback for playback
+ */
+static int snd_via82xx_playback_open(snd_pcm_substream_t * substream)
+{
+	via82xx_t *chip = snd_pcm_substream_chip(substream);
+	viadev_t *viadev = &chip->devs[chip->playback_devno + substream->number];
+
+	return snd_via82xx_modem_pcm_open(chip, viadev, substream);
+}
+
+/*
+ * open callback for capture
+ */
+static int snd_via82xx_capture_open(snd_pcm_substream_t * substream)
+{
+	via82xx_t *chip = snd_pcm_substream_chip(substream);
+	viadev_t *viadev = &chip->devs[chip->capture_devno + substream->pcm->device];
+
+	return snd_via82xx_modem_pcm_open(chip, viadev, substream);
+}
+
+/*
+ * close callback
+ */
+static int snd_via82xx_pcm_close(snd_pcm_substream_t * substream)
+{
+	viadev_t *viadev = (viadev_t *)substream->runtime->private_data;
+
+	viadev->substream = NULL;
+	return 0;
+}
+
+
+/* via686 playback callbacks */
+static snd_pcm_ops_t snd_via686_playback_ops = {
+	.open =		snd_via82xx_playback_open,
+	.close =	snd_via82xx_pcm_close,
+	.ioctl =	snd_pcm_lib_ioctl,
+	.hw_params =	snd_via82xx_hw_params,
+	.hw_free =	snd_via82xx_hw_free,
+	.prepare =	snd_via82xx_pcm_prepare,
+	.trigger =	snd_via82xx_modem_pcm_trigger,
+	.pointer =	snd_via686_pcm_pointer,
+	.page =		snd_pcm_sgbuf_ops_page,
+};
+
+/* via686 capture callbacks */
+static snd_pcm_ops_t snd_via686_capture_ops = {
+	.open =		snd_via82xx_capture_open,
+	.close =	snd_via82xx_pcm_close,
+	.ioctl =	snd_pcm_lib_ioctl,
+	.hw_params =	snd_via82xx_hw_params,
+	.hw_free =	snd_via82xx_hw_free,
+	.prepare =	snd_via82xx_pcm_prepare,
+	.trigger =	snd_via82xx_modem_pcm_trigger,
+	.pointer =	snd_via686_pcm_pointer,
+	.page =		snd_pcm_sgbuf_ops_page,
+};
+
+
+static void init_viadev(via82xx_t *chip, int idx, unsigned int reg_offset, int direction)
+{
+	chip->devs[idx].reg_offset = reg_offset;
+	chip->devs[idx].direction = direction;
+	chip->devs[idx].port = chip->port + reg_offset;
+}
+
+/*
+ * create a pcm instance for via686a/b
+ */
+static int __devinit snd_via686_pcm_new(via82xx_t *chip)
+{
+	snd_pcm_t *pcm;
+	int err;
+
+	chip->playback_devno = 0;
+	chip->capture_devno = 1;
+	chip->num_devs = 2;
+	chip->intr_mask = 0x330000; /* FLAGS | EOL for MR, MW */
+
+	err = snd_pcm_new(chip->card, chip->card->shortname, 0, 1, 1, &pcm);
+	if (err < 0)
+		return err;
+	snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_via686_playback_ops);
+	snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_via686_capture_ops);
+	pcm->private_data = chip;
+	strcpy(pcm->name, chip->card->shortname);
+	chip->pcms[0] = pcm;
+	init_viadev(chip, 0, VIA_REG_MO_STATUS, 0);
+	init_viadev(chip, 1, VIA_REG_MI_STATUS, 1);
+
+	if ((err = snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG,
+							 snd_dma_pci_data(chip->pci), 64*1024, 128*1024)) < 0)
+		return err;
+
+	return 0;
+}
+
+
+/*
+ *  Mixer part
+ */
+
+
+static void snd_via82xx_mixer_free_ac97_bus(ac97_bus_t *bus)
+{
+	via82xx_t *chip = bus->private_data;
+	chip->ac97_bus = NULL;
+}
+
+static void snd_via82xx_mixer_free_ac97(ac97_t *ac97)
+{
+	via82xx_t *chip = ac97->private_data;
+	chip->ac97 = NULL;
+}
+
+
+static int __devinit snd_via82xx_mixer_new(via82xx_t *chip)
+{
+	ac97_template_t ac97;
+	int err;
+	static ac97_bus_ops_t ops = {
+		.write = snd_via82xx_codec_write,
+		.read = snd_via82xx_codec_read,
+		.wait = snd_via82xx_codec_wait,
+	};
+
+	if ((err = snd_ac97_bus(chip->card, 0, &ops, chip, &chip->ac97_bus)) < 0)
+		return err;
+	chip->ac97_bus->private_free = snd_via82xx_mixer_free_ac97_bus;
+	chip->ac97_bus->clock = chip->ac97_clock;
+	chip->ac97_bus->shared_type = AC97_SHARED_TYPE_VIA;
+
+	memset(&ac97, 0, sizeof(ac97));
+	ac97.private_data = chip;
+	ac97.private_free = snd_via82xx_mixer_free_ac97;
+	ac97.pci = chip->pci;
+	ac97.scaps = AC97_SCAP_SKIP_AUDIO;
+	ac97.num = chip->ac97_secondary;
+
+	if ((err = snd_ac97_mixer(chip->ac97_bus, &ac97, &chip->ac97)) < 0)
+		return err;
+
+	return 0;
+}
+
+
+/*
+ * proc interface
+ */
+static void snd_via82xx_proc_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer)
+{
+	via82xx_t *chip = entry->private_data;
+	int i;
+	
+	snd_iprintf(buffer, "%s\n\n", chip->card->longname);
+	for (i = 0; i < 0xa0; i += 4) {
+		snd_iprintf(buffer, "%02x: %08x\n", i, inl(chip->port + i));
+	}
+}
+
+static void __devinit snd_via82xx_proc_init(via82xx_t *chip)
+{
+	snd_info_entry_t *entry;
+
+	if (! snd_card_proc_new(chip->card, "via82xx", &entry))
+		snd_info_set_text_ops(entry, chip, 1024, snd_via82xx_proc_read);
+}
+
+/*
+ *
+ */
+
+static int __devinit snd_via82xx_chip_init(via82xx_t *chip)
+{
+	ac97_t ac97;
+	unsigned int val;
+	int max_count;
+	unsigned char pval;
+
+	memset(&ac97, 0, sizeof(ac97));
+	ac97.private_data = chip;
+
+	pci_read_config_byte(chip->pci, VIA_MC97_CTRL, &pval);
+	if((pval & VIA_MC97_CTRL_INIT) != VIA_MC97_CTRL_INIT) {
+		pci_write_config_byte(chip->pci, 0x44, pval|VIA_MC97_CTRL_INIT);
+		udelay(100);
+	}
+
+	pci_read_config_byte(chip->pci, VIA_ACLINK_STAT, &pval);
+	if (! (pval & VIA_ACLINK_C00_READY)) { /* codec not ready? */
+		/* deassert ACLink reset, force SYNC */
+		pci_write_config_byte(chip->pci, VIA_ACLINK_CTRL,
+				      VIA_ACLINK_CTRL_ENABLE |
+				      VIA_ACLINK_CTRL_RESET |
+				      VIA_ACLINK_CTRL_SYNC);
+		udelay(100);
+#if 1 /* FIXME: should we do full reset here for all chip models? */
+		pci_write_config_byte(chip->pci, VIA_ACLINK_CTRL, 0x00);
+		udelay(100);
+#else
+		/* deassert ACLink reset, force SYNC (warm AC'97 reset) */
+		pci_write_config_byte(chip->pci, VIA_ACLINK_CTRL,
+				      VIA_ACLINK_CTRL_RESET|VIA_ACLINK_CTRL_SYNC);
+		udelay(2);
+#endif
+		/* ACLink on, deassert ACLink reset, VSR, SGD data out */
+		pci_write_config_byte(chip->pci, VIA_ACLINK_CTRL, VIA_ACLINK_CTRL_INIT);
+		udelay(100);
+	}
+	
+	pci_read_config_byte(chip->pci, VIA_ACLINK_CTRL, &pval);
+	if ((pval & VIA_ACLINK_CTRL_INIT) != VIA_ACLINK_CTRL_INIT) {
+		/* ACLink on, deassert ACLink reset, VSR, SGD data out */
+		pci_write_config_byte(chip->pci, VIA_ACLINK_CTRL, VIA_ACLINK_CTRL_INIT);
+		udelay(100);
+	}
+
+	/* wait until codec ready */
+	max_count = ((3 * HZ) / 4) + 1;
+	do {
+		pci_read_config_byte(chip->pci, VIA_ACLINK_STAT, &pval);
+		if (pval & VIA_ACLINK_C00_READY) /* primary codec ready */
+			break;
+		set_current_state(TASK_UNINTERRUPTIBLE);
+		schedule_timeout(1);
+	} while (--max_count > 0);
+
+	if ((val = snd_via82xx_codec_xread(chip)) & VIA_REG_AC97_BUSY)
+		snd_printk("AC'97 codec is not ready [0x%x]\n", val);
+
+	/* and then reset codec.. */
+#if 0 /* do we need it? when? */
+	snd_via82xx_codec_ready(chip, 0);
+	snd_via82xx_codec_write(&ac97, AC97_RESET, 0x0000);
+	snd_via82xx_codec_read(&ac97, 0);
+#endif
+
+	snd_via82xx_codec_xwrite(chip, VIA_REG_AC97_READ |
+				 VIA_REG_AC97_SECONDARY_VALID |
+				 (VIA_REG_AC97_CODEC_ID_SECONDARY << VIA_REG_AC97_CODEC_ID_SHIFT));
+	max_count = ((3 * HZ) / 4) + 1;
+	snd_via82xx_codec_xwrite(chip, VIA_REG_AC97_READ |
+				 VIA_REG_AC97_SECONDARY_VALID |
+				 (VIA_REG_AC97_CODEC_ID_SECONDARY << VIA_REG_AC97_CODEC_ID_SHIFT));
+	do {
+		if ((val = snd_via82xx_codec_xread(chip)) & VIA_REG_AC97_SECONDARY_VALID) {
+			chip->ac97_secondary = 1;
+			goto __ac97_ok2;
+		}
+		set_current_state(TASK_INTERRUPTIBLE);
+		schedule_timeout(1);
+	} while (--max_count > 0);
+	/* This is ok, the most of motherboards have only one codec */
+
+      __ac97_ok2:
+
+	/* route FM trap to IRQ, disable FM trap */
+	// pci_write_config_byte(chip->pci, VIA_FM_NMI_CTRL, 0);
+	/* disable all GPI interrupts */
+	outl(0, VIAREG(chip, GPI_INTR));
+
+	return 0;
+}
+
+#ifdef CONFIG_PM
+/*
+ * power management
+ */
+static int snd_via82xx_suspend(snd_card_t *card, unsigned int state)
+{
+	via82xx_t *chip = card->pm_private_data;
+	int i;
+
+	for (i = 0; i < 2; i++)
+		if (chip->pcms[i])
+			snd_pcm_suspend_all(chip->pcms[i]);
+	for (i = 0; i < chip->num_devs; i++)
+		snd_via82xx_channel_reset(chip, &chip->devs[i]);
+	synchronize_irq(chip->irq);
+	snd_ac97_suspend(chip->ac97);
+	pci_set_power_state(chip->pci, 3);
+	pci_disable_device(chip->pci);
+	return 0;
+}
+
+static int snd_via82xx_resume(snd_card_t *card, unsigned int state)
+{
+	via82xx_t *chip = card->pm_private_data;
+	int i;
+
+	pci_enable_device(chip->pci);
+	pci_set_power_state(chip->pci, 0);
+	pci_set_master(chip->pci);
+
+	snd_via82xx_chip_init(chip);
+
+	snd_ac97_resume(chip->ac97);
+
+	for (i = 0; i < chip->num_devs; i++)
+		snd_via82xx_channel_reset(chip, &chip->devs[i]);
+
+	return 0;
+}
+#endif /* CONFIG_PM */
+
+static int snd_via82xx_free(via82xx_t *chip)
+{
+	unsigned int i;
+
+	if (chip->irq < 0)
+		goto __end_hw;
+	/* disable interrupts */
+	for (i = 0; i < chip->num_devs; i++)
+		snd_via82xx_channel_reset(chip, &chip->devs[i]);
+	synchronize_irq(chip->irq);
+      __end_hw:
+	if (chip->irq >= 0)
+		free_irq(chip->irq, (void *)chip);
+	pci_release_regions(chip->pci);
+	pci_disable_device(chip->pci);
+	kfree(chip);
+	return 0;
+}
+
+static int snd_via82xx_dev_free(snd_device_t *device)
+{
+	via82xx_t *chip = device->device_data;
+	return snd_via82xx_free(chip);
+}
+
+static int __devinit snd_via82xx_create(snd_card_t * card,
+					struct pci_dev *pci,
+					int chip_type,
+					int revision,
+					unsigned int ac97_clock,
+					via82xx_t ** r_via)
+{
+	via82xx_t *chip;
+	int err;
+        static snd_device_ops_t ops = {
+		.dev_free =	snd_via82xx_dev_free,
+        };
+
+	if ((err = pci_enable_device(pci)) < 0)
+		return err;
+
+	if ((chip = kcalloc(1, sizeof(*chip), GFP_KERNEL)) == NULL) {
+		pci_disable_device(pci);
+		return -ENOMEM;
+	}
+
+	spin_lock_init(&chip->reg_lock);
+	chip->card = card;
+	chip->pci = pci;
+	chip->irq = -1;
+
+	if ((err = pci_request_regions(pci, card->driver)) < 0) {
+		kfree(chip);
+		pci_disable_device(pci);
+		return err;
+	}
+	chip->port = pci_resource_start(pci, 0);
+	if (request_irq(pci->irq, snd_via82xx_interrupt, SA_INTERRUPT|SA_SHIRQ,
+			card->driver, (void *)chip)) {
+		snd_printk("unable to grab IRQ %d\n", pci->irq);
+		snd_via82xx_free(chip);
+		return -EBUSY;
+	}
+	chip->irq = pci->irq;
+	if (ac97_clock >= 8000 && ac97_clock <= 48000)
+		chip->ac97_clock = ac97_clock;
+	synchronize_irq(chip->irq);
+
+	if ((err = snd_via82xx_chip_init(chip)) < 0) {
+		snd_via82xx_free(chip);
+		return err;
+	}
+
+	if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) {
+		snd_via82xx_free(chip);
+		return err;
+	}
+
+	/* The 8233 ac97 controller does not implement the master bit
+	 * in the pci command register. IMHO this is a violation of the PCI spec.
+	 * We call pci_set_master here because it does not hurt. */
+	pci_set_master(pci);
+
+	snd_card_set_dev(card, &pci->dev);
+
+	*r_via = chip;
+	return 0;
+}
+
+
+static int __devinit snd_via82xx_probe(struct pci_dev *pci,
+				       const struct pci_device_id *pci_id)
+{
+	static int dev;
+	snd_card_t *card;
+	via82xx_t *chip;
+	unsigned char revision;
+	int chip_type = 0, card_type;
+	unsigned int i;
+	int err;
+
+	if (dev >= SNDRV_CARDS)
+		return -ENODEV;
+	if (!enable[dev]) {
+		dev++;
+		return -ENOENT;
+	}
+
+	card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
+	if (card == NULL)
+		return -ENOMEM;
+
+	card_type = pci_id->driver_data;
+	pci_read_config_byte(pci, PCI_REVISION_ID, &revision);
+	switch (card_type) {
+	case TYPE_CARD_VIA82XX_MODEM:
+		strcpy(card->driver, "VIA82XX-MODEM");
+		sprintf(card->shortname, "VIA 82XX modem");
+		break;
+	default:
+		snd_printk(KERN_ERR "invalid card type %d\n", card_type);
+		err = -EINVAL;
+		goto __error;
+	}
+		
+	if ((err = snd_via82xx_create(card, pci, chip_type, revision, ac97_clock[dev], &chip)) < 0)
+		goto __error;
+	if ((err = snd_via82xx_mixer_new(chip)) < 0)
+		goto __error;
+
+	if ((err = snd_via686_pcm_new(chip)) < 0 )
+		goto __error;
+
+	snd_card_set_pm_callback(card, snd_via82xx_suspend, snd_via82xx_resume, chip);
+
+	/* disable interrupts */
+	for (i = 0; i < chip->num_devs; i++)
+		snd_via82xx_channel_reset(chip, &chip->devs[i]);
+
+	sprintf(card->longname, "%s at 0x%lx, irq %d",
+		card->shortname, chip->port, chip->irq);
+
+	snd_via82xx_proc_init(chip);
+
+	if ((err = snd_card_register(card)) < 0) {
+		snd_card_free(card);
+		return err;
+	}
+	pci_set_drvdata(pci, card);
+	dev++;
+	return 0;
+
+ __error:
+	snd_card_free(card);
+	return err;
+}
+
+static void __devexit snd_via82xx_remove(struct pci_dev *pci)
+{
+	snd_card_free(pci_get_drvdata(pci));
+	pci_set_drvdata(pci, NULL);
+}
+
+static struct pci_driver driver = {
+	.name = "VIA 82xx Modem",
+	.id_table = snd_via82xx_modem_ids,
+	.probe = snd_via82xx_probe,
+	.remove = __devexit_p(snd_via82xx_remove),
+	SND_PCI_PM_CALLBACKS
+};
+
+static int __init alsa_card_via82xx_init(void)
+{
+	return pci_module_init(&driver);
+}
+
+static void __exit alsa_card_via82xx_exit(void)
+{
+	pci_unregister_driver(&driver);
+}
+
+module_init(alsa_card_via82xx_init)
+module_exit(alsa_card_via82xx_exit)
diff -Nru a/sound/pci/vx222/vx222.c b/sound/pci/vx222/vx222.c
--- a/sound/pci/vx222/vx222.c	2005-01-10 20:11:19 -08:00
+++ b/sound/pci/vx222/vx222.c	2005-01-10 20:11:19 -08:00
@@ -61,8 +61,8 @@
 };
 
 static struct pci_device_id snd_vx222_ids[] = {
-	{ 0x10b5, 0x9050, PCI_ANY_ID, PCI_ANY_ID, 0, 0, VX_PCI_VX222_OLD, },   /* PLX */
-	{ 0x10b5, 0x9030, PCI_ANY_ID, PCI_ANY_ID, 0, 0, VX_PCI_VX222_NEW, },   /* PLX */
+	{ 0x10b5, 0x9050, 0x1369, PCI_ANY_ID, 0, 0, VX_PCI_VX222_OLD, },   /* PLX */
+	{ 0x10b5, 0x9030, 0x1369, PCI_ANY_ID, 0, 0, VX_PCI_VX222_NEW, },   /* PLX */
 	{ 0, }
 };
 
@@ -225,7 +225,11 @@
 	snd_printdd("%s at 0x%lx & 0x%lx, irq %i\n",
 		    card->shortname, vx->port[0], vx->port[1], vx->core.irq);
 
-	if ((err = snd_vx_hwdep_new(&vx->core)) < 0) {
+#ifdef SND_VX_FW_LOADER
+	vx->core.dev = &pci->dev;
+#endif
+
+	if ((err = snd_vx_setup_firmware(&vx->core)) < 0) {
 		snd_card_free(card);
 		return err;
 	}
@@ -251,6 +255,7 @@
 	.id_table = snd_vx222_ids,
 	.probe = snd_vx222_probe,
 	.remove = __devexit_p(snd_vx222_remove),
+	SND_PCI_PM_CALLBACKS
 };
 
 static int __init alsa_card_vx222_init(void)
diff -Nru a/sound/pci/vx222/vx222_ops.c b/sound/pci/vx222/vx222_ops.c
--- a/sound/pci/vx222/vx222_ops.c	2005-01-10 20:11:15 -08:00
+++ b/sound/pci/vx222/vx222_ops.c	2005-01-10 20:11:15 -08:00
@@ -22,6 +22,7 @@
 
 #include <sound/driver.h>
 #include <linux/delay.h>
+#include <linux/firmware.h>
 #include <sound/core.h>
 #include <sound/control.h>
 #include <asm/io.h>
@@ -351,12 +352,11 @@
 /*
  * load the xilinx image
  */
-static int vx2_load_xilinx_binary(vx_core_t *chip, const snd_hwdep_dsp_image_t *xilinx)
+static int vx2_load_xilinx_binary(vx_core_t *chip, const struct firmware *xilinx)
 {
 	unsigned int i;
 	unsigned int port;
-	unsigned char data;
-	unsigned char __user *image;
+	unsigned char *image;
 
 	/* XILINX reset (wait at least 1 milisecond between reset on and off). */
 	vx_outl(chip, CNTRL, VX_CNTRL_REGISTER_VALUE | VX_XILINX_RESET_MASK);
@@ -371,10 +371,9 @@
 	else
 		port = VX_GPIOC; /* VX222 V2 and VX222_MIC_BOARD with new PLX9030 use this register */
 
-	image = xilinx->image;
-	for (i = 0; i < xilinx->length; i++, image++) {
-		__get_user(data, image);
-		if (put_xilinx_data(chip, port, 8, data) < 0)
+	image = xilinx->data;
+	for (i = 0; i < xilinx->size; i++, image++) {
+		if (put_xilinx_data(chip, port, 8, *image) < 0)
 			return -EINVAL;
 		/* don't take too much time in this loop... */
 		cond_resched();
@@ -400,25 +399,22 @@
 /*
  * load the boot/dsp images
  */
-static int vx2_load_dsp(vx_core_t *vx, const snd_hwdep_dsp_image_t *dsp)
+static int vx2_load_dsp(vx_core_t *vx, int index, const struct firmware *dsp)
 {
 	int err;
 
-	if (*dsp->name)
-		snd_printdd("loading dsp [%d] %s, size = %Zd\n",
-			dsp->index, dsp->name, dsp->length);
-	switch (dsp->index) {
-	case 0:
+	switch (index) {
+	case 1:
 		/* xilinx image */
 		if ((err = vx2_load_xilinx_binary(vx, dsp)) < 0)
 			return err;
 		if ((err = vx2_test_xilinx(vx)) < 0)
 			return err;
 		return 0;
-	case 1:
+	case 2:
 		/* DSP boot */
 		return snd_vx_dsp_boot(vx, dsp);
-	case 2:
+	case 3:
 		/* DSP image */
 		return snd_vx_dsp_load(vx, dsp);
 	default:
diff -Nru a/sound/pci/ymfpci/ymfpci_main.c b/sound/pci/ymfpci/ymfpci_main.c
--- a/sound/pci/ymfpci/ymfpci_main.c	2005-01-10 20:11:22 -08:00
+++ b/sound/pci/ymfpci/ymfpci_main.c	2005-01-10 20:11:22 -08:00
@@ -258,7 +258,7 @@
 	return -ENOMEM;
 }
 
-int snd_ymfpci_voice_alloc(ymfpci_t *chip, ymfpci_voice_type_t type, int pair, ymfpci_voice_t **rvoice)
+static int snd_ymfpci_voice_alloc(ymfpci_t *chip, ymfpci_voice_type_t type, int pair, ymfpci_voice_t **rvoice)
 {
 	unsigned long flags;
 	int result;
@@ -278,7 +278,7 @@
 	return result;		
 }
 
-int snd_ymfpci_voice_free(ymfpci_t *chip, ymfpci_voice_t *pvoice)
+static int snd_ymfpci_voice_free(ymfpci_t *chip, ymfpci_voice_t *pvoice)
 {
 	unsigned long flags;
 	
@@ -831,8 +831,7 @@
 {
 	ymfpci_pcm_t *ypcm = runtime->private_data;
 	
-	if (ypcm)
-		kfree(ypcm);
+	kfree(ypcm);
 }
 
 static int snd_ymfpci_playback_open_1(snd_pcm_substream_t * substream)
@@ -1714,6 +1713,7 @@
 	if ((err = snd_ac97_bus(chip->card, 0, &ops, chip, &chip->ac97_bus)) < 0)
 		return err;
 	chip->ac97_bus->private_free = snd_ymfpci_mixer_free_ac97_bus;
+	chip->ac97_bus->no_vra = 1; /* YMFPCI doesn't need VRA */
 
 	memset(&ac97, 0, sizeof(ac97));
 	ac97.private_data = chip;
@@ -1721,6 +1721,10 @@
 	if ((err = snd_ac97_mixer(chip->ac97_bus, &ac97, &chip->ac97)) < 0)
 		return err;
 
+	/* to be sure */
+	snd_ac97_update_bits(chip->ac97, AC97_EXTENDED_STATUS,
+			     AC97_EA_VRA|AC97_EA_VRM, 0);
+
 	for (idx = 0; idx < ARRAY_SIZE(snd_ymfpci_controls); idx++) {
 		if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_ymfpci_controls[idx], chip))) < 0)
 			return err;
@@ -2065,8 +2069,7 @@
 #endif
 
 #ifdef CONFIG_PM
-	if (chip->saved_regs)
-		vfree(chip->saved_regs);
+	vfree(chip->saved_regs);
 #endif
 	if (chip->mpu_res) {
 		release_resource(chip->mpu_res);
@@ -2155,7 +2158,6 @@
 	snd_ymfpci_writel(chip, YDSXGR_NATIVEDACOUTVOL, 0);
 	snd_ymfpci_disable_dsp(chip);
 	pci_disable_device(chip->pci);
-	snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
 	return 0;
 }
 
@@ -2183,7 +2185,6 @@
 		chip->active_bank = snd_ymfpci_readl(chip, YDSXGR_CTRLSELECT);
 		spin_unlock_irq(&chip->reg_lock);
 	}
-	snd_power_change_state(card, SNDRV_CTL_POWER_D0);
 	return 0;
 }
 #endif /* CONFIG_PM */
@@ -2265,12 +2266,12 @@
 	snd_card_set_pm_callback(card, snd_ymfpci_suspend, snd_ymfpci_resume, chip);
 #endif
 
-	snd_ymfpci_proc_init(card, chip);
-
 	if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) {
 		snd_ymfpci_free(chip);
 		return err;
 	}
+
+	snd_ymfpci_proc_init(card, chip);
 
 	snd_card_set_dev(card, &pci->dev);
 
diff -Nru a/sound/pcmcia/pdaudiocf/pdaudiocf.h b/sound/pcmcia/pdaudiocf/pdaudiocf.h
--- a/sound/pcmcia/pdaudiocf/pdaudiocf.h	2005-01-10 20:11:15 -08:00
+++ b/sound/pcmcia/pdaudiocf/pdaudiocf.h	2005-01-10 20:11:15 -08:00
@@ -130,8 +130,6 @@
 	return inw(chip->port + reg);
 }
 
-unsigned char pdacf_ak4117_read(void *private_data, unsigned char reg);
-void pdacf_ak4117_write(void *private_data, unsigned char reg, unsigned char val);
 pdacf_t *snd_pdacf_create(snd_card_t *card);
 int snd_pdacf_ak4117_create(pdacf_t *pdacf);
 void snd_pdacf_powerdown(pdacf_t *chip);
diff -Nru a/sound/pcmcia/pdaudiocf/pdaudiocf_core.c b/sound/pcmcia/pdaudiocf/pdaudiocf_core.c
--- a/sound/pcmcia/pdaudiocf/pdaudiocf_core.c	2005-01-10 20:11:17 -08:00
+++ b/sound/pcmcia/pdaudiocf/pdaudiocf_core.c	2005-01-10 20:11:17 -08:00
@@ -28,7 +28,7 @@
 /*
  *
  */
-unsigned char pdacf_ak4117_read(void *private_data, unsigned char reg)
+static unsigned char pdacf_ak4117_read(void *private_data, unsigned char reg)
 {
 	pdacf_t *chip = private_data;
 	unsigned long timeout;
@@ -60,7 +60,7 @@
 	return res;
 }
 
-void pdacf_ak4117_write(void *private_data, unsigned char reg, unsigned char val)
+static void pdacf_ak4117_write(void *private_data, unsigned char reg, unsigned char val)
 {
 	pdacf_t *chip = private_data;
 	unsigned long timeout;
@@ -267,7 +267,6 @@
 	outw(val, chip->port + PDAUDIOCF_REG_IER);
 	chip->chip_status |= PDAUDIOCF_STAT_IS_SUSPENDED;	/* ignore interrupts from now */
 	snd_pdacf_powerdown(chip);
-	snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
 	return 0;
 }
 
@@ -287,7 +286,6 @@
 	       (snd_ak4117_external_rate(chip->ak4117) <= 0 || !check_signal(chip)))
 		mdelay(1);
 	chip->chip_status &= ~PDAUDIOCF_STAT_IS_SUSPENDED;
-	snd_power_change_state(card, SNDRV_CTL_POWER_D0);
 	return 0;
 }
 #endif
diff -Nru a/sound/pcmcia/vx/vx_entry.c b/sound/pcmcia/vx/vx_entry.c
--- a/sound/pcmcia/vx/vx_entry.c	2005-01-10 20:11:15 -08:00
+++ b/sound/pcmcia/vx/vx_entry.c	2005-01-10 20:11:15 -08:00
@@ -68,7 +68,10 @@
 	if (hw)
 		hw->card_list[vxp->index] = NULL;
 	chip->card = NULL;
+	if (chip->dev)
+		kfree(chip->dev);
 
+	snd_vx_free_firmware(chip);
 	kfree(chip);
 	return 0;
 }
@@ -120,6 +123,19 @@
 	if (! chip)
 		return NULL;
 
+#ifdef SND_VX_FW_LOADER
+	/* fake a device here since pcmcia doesn't give a valid device... */
+	chip->dev = kcalloc(1, sizeof(*chip->dev), GFP_KERNEL);
+	if (! chip->dev) {
+		snd_printk(KERN_ERR "vxp: can't malloc chip->dev\n");
+		kfree(chip);
+		snd_card_free(card);
+		return NULL;
+	}
+	device_initialize(chip->dev);
+	sprintf(chip->dev->bus_id, "vxpocket%d", i);
+#endif
+
 	if (snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops) < 0) {
 		kfree(chip);
 		snd_card_free(card);
@@ -156,11 +172,8 @@
 	link->conf.ConfigIndex = 1;
 	link->conf.Present = PRESENT_OPTION;
 
-	/* Chain drivers */
-	link->next = hw->dev_list;
-	hw->dev_list = link;
-
 	/* Register with Card Services */
+	memset(&client_reg, 0, sizeof(client_reg));
 	client_reg.dev_info = hw->dev_info;
 	client_reg.Attributes = INFO_IO_CLIENT | INFO_CARD_SHARE;
 	client_reg.EventMask = 
@@ -177,10 +190,16 @@
 	ret = pcmcia_register_client(&link->handle, &client_reg);
 	if (ret != CS_SUCCESS) {
 		cs_error(link->handle, RegisterClient, ret);
-		snd_vxpocket_detach(hw, link);
+		snd_card_free(card);
 		return NULL;
 	}
 
+	/* Chain drivers */
+	link->next = hw->dev_list;
+	hw->dev_list = link;
+
+	/* snd_card_set_pm_callback(card, snd_vxpocket_suspend, snd_vxpocket_resume, chip); */
+
 	return link;
 }
 
@@ -208,12 +227,9 @@
 	sprintf(card->longname, "%s at 0x%x, irq %i",
 		card->shortname, port, irq);
 
-	if ((err = snd_vx_hwdep_new(chip)) < 0)
-		return err;
-
 	chip->irq = irq;
 
-	if ((err = snd_card_register(chip->card)) < 0)
+	if ((err = snd_vx_setup_firmware(chip)) < 0)
 		return err;
 
 	return 0;
@@ -226,7 +242,12 @@
  */
 void snd_vxpocket_detach(struct snd_vxp_entry *hw, dev_link_t *link)
 {
-	vx_core_t *chip = link->priv;
+	vx_core_t *chip;
+
+	if (! link)
+		return;
+
+	chip = link->priv;
 
 	snd_printdd(KERN_DEBUG "vxpocket_detach called\n");
 	/* Remove the interface data from the linked list */
@@ -234,10 +255,10 @@
 		dev_link_t **linkp;
 		/* Locate device structure */
 		for (linkp = &hw->dev_list; *linkp; linkp = &(*linkp)->next)
-			if (*linkp == link)
+			if (*linkp == link) {
+				*linkp = link->next;
 				break;
-		if (*linkp)
-			*linkp = link->next;
+			}
 	}
 	chip->chip_status |= VX_STAT_IS_STALE; /* to be sure */
 	snd_card_disconnect(chip->card);
@@ -266,13 +287,16 @@
 	vx_core_t *chip = link->priv;
 	struct snd_vxpocket *vxp = (struct snd_vxpocket *)chip;
 	tuple_t tuple;
-	cisparse_t parse;
-	config_info_t conf;
+	cisparse_t *parse = NULL;
 	u_short buf[32];
 	int last_fn, last_ret;
 
 	snd_printdd(KERN_DEBUG "vxpocket_config called\n");
-	tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY;
+	parse = kmalloc(sizeof(*parse), GFP_KERNEL);
+	if (! parse) {
+		snd_printk(KERN_ERR "vx: cannot allocate\n");
+		return;
+	}
 	tuple.Attributes = 0;
 	tuple.TupleData = (cisdata_t *)buf;
 	tuple.TupleDataMax = sizeof(buf);
@@ -280,12 +304,9 @@
 	tuple.DesiredTuple = CISTPL_CONFIG;
 	CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(handle, &tuple));
 	CS_CHECK(GetTupleData, pcmcia_get_tuple_data(handle, &tuple));
-	CS_CHECK(ParseTuple, pcmcia_parse_tuple(handle, &tuple, &parse));
-	link->conf.ConfigBase = parse.config.base;
-	link->conf.ConfigIndex = 1;
-
-	CS_CHECK(GetConfigurationInfo, pcmcia_get_configuration_info(handle, &conf));
-	link->conf.Vcc = conf.Vcc;
+	CS_CHECK(ParseTuple, pcmcia_parse_tuple(handle, &tuple, parse));
+	link->conf.ConfigBase = parse->config.base;
+	link->conf.Present = parse->config.rmask[0];
 
 	/* Configure card */
 	link->state |= DEV_CONFIG;
@@ -299,6 +320,7 @@
 
 	link->dev = &vxp->node;
 	link->state &= ~DEV_CONFIG_PENDING;
+	kfree(parse);
 	return;
 
 cs_failed:
@@ -307,6 +329,8 @@
 	pcmcia_release_configuration(link->handle);
 	pcmcia_release_io(link->handle, &link->io);
 	pcmcia_release_irq(link->handle, &link->irq);
+	link->state &= ~DEV_CONFIG;
+	kfree(parse);
 }
 
 
@@ -328,16 +352,16 @@
 		break;
 	case CS_EVENT_CARD_INSERTION:
 		snd_printdd(KERN_DEBUG "CARD_INSERTION..\n");
-		link->state |= DEV_PRESENT;
+		link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
 		vxpocket_config(link);
 		break;
 #ifdef CONFIG_PM
 	case CS_EVENT_PM_SUSPEND:
 		snd_printdd(KERN_DEBUG "SUSPEND\n");
 		link->state |= DEV_SUSPEND;
-		if (chip) {
+		if (chip && chip->card->pm_suspend) {
 			snd_printdd(KERN_DEBUG "snd_vx_suspend calling\n");
-			snd_vx_suspend(chip);
+			chip->card->pm_suspend(chip->card, 0);
 		}
 		/* Fall through... */
 	case CS_EVENT_RESET_PHYSICAL:
@@ -355,9 +379,9 @@
 			//struct snd_vxpocket *vxp = (struct snd_vxpocket *)chip;
 			snd_printdd(KERN_DEBUG "requestconfig...\n");
 			pcmcia_request_configuration(link->handle, &link->conf);
-			if (chip) {
+			if (chip && chip->card->pm_resume) {
 				snd_printdd(KERN_DEBUG "calling snd_vx_resume\n");
-				snd_vx_resume(chip);
+				chip->card->pm_resume(chip->card, 0);
 			}
 		}
 		snd_printdd(KERN_DEBUG "resume done!\n");
diff -Nru a/sound/pcmcia/vx/vxp_ops.c b/sound/pcmcia/vx/vxp_ops.c
--- a/sound/pcmcia/vx/vxp_ops.c	2005-01-10 20:11:17 -08:00
+++ b/sound/pcmcia/vx/vxp_ops.c	2005-01-10 20:11:17 -08:00
@@ -22,6 +22,7 @@
 
 #include <sound/driver.h>
 #include <linux/delay.h>
+#include <linux/firmware.h>
 #include <sound/core.h>
 #include <asm/io.h>
 #include "vxpocket.h"
@@ -144,13 +145,13 @@
  * vx_load_xilinx_binary - load the xilinx binary image
  * the binary image is the binary array converted from the bitstream file.
  */
-static int vxp_load_xilinx_binary(vx_core_t *_chip, const snd_hwdep_dsp_image_t *xilinx)
+static int vxp_load_xilinx_binary(vx_core_t *_chip, const struct firmware *fw)
 {
 	struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
 	unsigned int i;
 	int c;
 	int regCSUER, regRUER;
-	unsigned char __user *image;
+	unsigned char *image;
 	unsigned char data;
 
 	/* Switch to programmation mode */
@@ -171,9 +172,9 @@
 
 	/* set HF1 for loading xilinx binary */
 	vx_outb(chip, ICR, ICR_HF1);
-	image = xilinx->image;
-	for (i = 0; i < xilinx->length; i++, image++) {
-		__get_user(data, image);
+	image = fw->data;
+	for (i = 0; i < fw->size; i++, image++) {
+		data = *image;
 		if (vx_wait_isr_bit(_chip, ISR_TX_EMPTY) < 0)
 			goto _error;
 		vx_outb(chip, TXL, data);
@@ -200,7 +201,7 @@
 	c |= (int)vx_inb(chip, RXM) << 8;
 	c |= vx_inb(chip, RXL);
 
-	snd_printdd(KERN_DEBUG "xilinx: dsp size received 0x%x, orig 0x%x\n", c, xilinx->length);
+	snd_printdd(KERN_DEBUG "xilinx: dsp size received 0x%x, orig 0x%x\n", c, fw->size);
 
 	vx_outb(chip, ICR, ICR_HF0);
 
@@ -242,30 +243,27 @@
 /*
  * vxp_load_dsp - load_dsp callback
  */
-static int vxp_load_dsp(vx_core_t *vx, const snd_hwdep_dsp_image_t *dsp)
+static int vxp_load_dsp(vx_core_t *vx, int index, const struct firmware *fw)
 {
 	int err;
 
-	if (*dsp->name)
-		snd_printdd("loading dsp [%d] %s, size = %d\n", dsp->index, dsp->name, dsp->length);
-
-	switch (dsp->index) {
+	switch (index) {
 	case 0:
 		/* xilinx boot */
 		if ((err = vx_check_magic(vx)) < 0)
 			return err;
-		if ((err = snd_vx_load_boot_image(vx, dsp)) < 0)
+		if ((err = snd_vx_load_boot_image(vx, fw)) < 0)
 			return err;
 		return 0;
 	case 1:
 		/* xilinx image */
-		return vxp_load_xilinx_binary(vx, dsp);
+		return vxp_load_xilinx_binary(vx, fw);
 	case 2:
 		/* DSP boot */
-		return snd_vx_dsp_boot(vx, dsp);
+		return snd_vx_dsp_boot(vx, fw);
 	case 3:
 		/* DSP image */
-		return snd_vx_dsp_load(vx, dsp);
+		return snd_vx_dsp_load(vx, fw);
 	default:
 		snd_BUG();
 		return -EINVAL;
diff -Nru a/sound/ppc/pmac.c b/sound/ppc/pmac.c
--- a/sound/ppc/pmac.c	2005-01-10 20:11:23 -08:00
+++ b/sound/ppc/pmac.c	2005-01-10 20:11:23 -08:00
@@ -71,7 +71,7 @@
 
 static void snd_pmac_dbdma_free(pmac_dbdma_t *rec)
 {
-	if (rec && rec->space)
+	if (rec)
 		kfree(rec->space);
 }
 
@@ -318,7 +318,8 @@
 	stat = ld_le16(&cp->xfer_status);
 	if (stat & (ACTIVE|DEAD)) {
 		count = in_le16(&cp->res_count);
-		count = rec->period_size - count;
+		if (count)
+			count = rec->period_size - count;
 	}
 #endif
 	count += rec->cur_period * rec->period_size;
@@ -425,10 +426,10 @@
 	.rate_max =		44100,
 	.channels_min =		2,
 	.channels_max =		2,
-	.buffer_bytes_max =	32768,
+	.buffer_bytes_max =	131072,
 	.period_bytes_min =	256,
 	.period_bytes_max =	16384,
-	.periods_min =		1,
+	.periods_min =		3,
 	.periods_max =		PMAC_MAX_FRAGS,
 };
 
@@ -444,10 +445,10 @@
 	.rate_max =		44100,
 	.channels_min =		2,
 	.channels_max =		2,
-	.buffer_bytes_max =	32768,
+	.buffer_bytes_max =	131072,
 	.period_bytes_min =	256,
 	.period_bytes_max =	16384,
-	.periods_min =		1,
+	.periods_min =		3,
 	.periods_max =		PMAC_MAX_FRAGS,
 };
 
@@ -550,6 +551,8 @@
 	if (chip->can_duplex)
 		snd_pcm_set_sync(subs);
 
+	/* constraints to fix choppy sound */
+	snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS);
 	return 0;
 }
 
@@ -1248,7 +1251,6 @@
 	if (chip->rx_irq >= 0)
 		disable_irq(chip->rx_irq);
 	snd_pmac_sound_feature(chip, 0);
-	snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
 	return 0;
 }
 
@@ -1275,7 +1277,6 @@
 	if (chip->rx_irq >= 0)
 		enable_irq(chip->rx_irq);
 
-	snd_power_change_state(card, SNDRV_CTL_POWER_D0);
 	return 0;
 }
 
diff -Nru a/sound/sparc/cs4231.c b/sound/sparc/cs4231.c
--- a/sound/sparc/cs4231.c	2005-01-10 20:11:15 -08:00
+++ b/sound/sparc/cs4231.c	2005-01-10 20:11:15 -08:00
@@ -390,7 +390,7 @@
  *  Basic I/O functions
  */
 
-void snd_cs4231_outm(cs4231_t *chip, unsigned char reg,
+static void snd_cs4231_outm(cs4231_t *chip, unsigned char reg,
 		     unsigned char mask, unsigned char value)
 {
 	int timeout;
@@ -473,9 +473,9 @@
 	return ret;
 }
 
-#ifdef CONFIG_SND_DEBUG
+#if 0
 
-void snd_cs4231_debug(cs4231_t *chip)
+static void snd_cs4231_debug(cs4231_t *chip)
 {
 	printk("CS4231 REGS:      INDEX = 0x%02x  ",
 	       __cs4231_readb(chip, CS4231P(chip, REGSEL)));
@@ -560,7 +560,6 @@
 {
 	unsigned long flags;
 	int timeout;
-	signed long time;
 
 	spin_lock_irqsave(&chip->lock, flags);
 	snd_cs4231_busy_wait(chip);
@@ -594,29 +593,29 @@
 #if 0
 	printk("(2) timeout = %i, jiffies = %li\n", timeout, jiffies);
 #endif
-	time = HZ / 4;
+	/* in 10ms increments, check condition, up to 250ms */
+	timeout = 25;
 	while (snd_cs4231_in(chip, CS4231_TEST_INIT) & CS4231_CALIB_IN_PROGRESS) {
 		spin_unlock_irqrestore(&chip->lock, flags);
-		if (time <= 0) {
+		if (--timeout < 0) {
 			snd_printk("mce_down - auto calibration time out (2)\n");
 			return;
 		}
-		set_current_state(TASK_INTERRUPTIBLE);
-		time = schedule_timeout(time);
+		msleep(10);
 		spin_lock_irqsave(&chip->lock, flags);
 	}
 #if 0
 	printk("(3) jiffies = %li\n", jiffies);
 #endif
-	time = HZ / 10;
+	/* in 10ms increments, check condition, up to 100ms */
+	timeout = 10;
 	while (__cs4231_readb(chip, CS4231P(chip, REGSEL)) & CS4231_INIT) {
 		spin_unlock_irqrestore(&chip->lock, flags);
-		if (time <= 0) {
+		if (--timeout < 0) {
 			snd_printk("mce_down - auto calibration time out (3)\n");
 			return;
 		}
-		set_current_state(TASK_INTERRUPTIBLE);		
-		time = schedule_timeout(time);
+		msleep(10);
 		spin_lock_irqsave(&chip->lock, flags);
 	}
 	spin_unlock_irqrestore(&chip->lock, flags);
diff -Nru a/sound/synth/emux/emux.c b/sound/synth/emux/emux.c
--- a/sound/synth/emux/emux.c	2005-01-10 20:11:19 -08:00
+++ b/sound/synth/emux/emux.c	2005-01-10 20:11:19 -08:00
@@ -137,12 +137,8 @@
 	if (emu->sflist)
 		snd_sf_free(emu->sflist);
 
-	if (emu->voices)
-		kfree(emu->voices);
-
-	if (emu->name)
-		kfree(emu->name);
-
+	kfree(emu->voices);
+	kfree(emu->name);
 	kfree(emu);
 	return 0;
 }
diff -Nru a/sound/synth/emux/emux_seq.c b/sound/synth/emux/emux_seq.c
--- a/sound/synth/emux/emux_seq.c	2005-01-10 20:11:24 -08:00
+++ b/sound/synth/emux/emux_seq.c	2005-01-10 20:11:24 -08:00
@@ -197,8 +197,7 @@
 #ifdef SNDRV_EMUX_USE_RAW_EFFECT
 		snd_emux_delete_effect(p);
 #endif
-		if (p->chset.channels)
-			kfree(p->chset.channels);
+		kfree(p->chset.channels);
 		kfree(p);
 	}
 }
diff -Nru a/sound/synth/emux/emux_synth.c b/sound/synth/emux/emux_synth.c
--- a/sound/synth/emux/emux_synth.c	2005-01-10 20:11:18 -08:00
+++ b/sound/synth/emux/emux_synth.c	2005-01-10 20:11:18 -08:00
@@ -363,16 +363,6 @@
 
 
 /*
- * for Emu10k1 - release at least 1 voice currently using
- */
-int
-snd_emux_release_voice(snd_emux_t *emu)
-{
-	return 0;
-}
-
-
-/*
  * terminate note - if free flag is true, free the terminated voice
  */
 static void
diff -Nru a/sound/synth/emux/soundfont.c b/sound/synth/emux/soundfont.c
--- a/sound/synth/emux/soundfont.c	2005-01-10 20:11:21 -08:00
+++ b/sound/synth/emux/soundfont.c	2005-01-10 20:11:21 -08:00
@@ -1460,11 +1460,3 @@
 	return 0;
 }
 
-/*
- * Return the used memory size (in words)
- */
-int
-snd_soundfont_mem_used(snd_sf_list_t *sflist)
-{
-	return sflist->mem_used;
-}
diff -Nru a/sound/usb/Kconfig b/sound/usb/Kconfig
--- a/sound/usb/Kconfig	2005-01-10 20:11:21 -08:00
+++ b/sound/usb/Kconfig	2005-01-10 20:11:21 -08:00
@@ -17,7 +17,7 @@
 
 config SND_USB_USX2Y
 	tristate "Tascam US-122, US-224 and US-428 USB driver"
-	depends on SND && USB
+	depends on SND && USB && (X86 || PPC || ALPHA)
 	select SND_HWDEP
 	select SND_RAWMIDI
 	select SND_PCM
diff -Nru a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c
--- a/sound/usb/usbaudio.c	2005-01-10 20:11:21 -08:00
+++ b/sound/usb/usbaudio.c	2005-01-10 20:11:21 -08:00
@@ -725,7 +725,7 @@
 	subs->running = 0;
 
 	if (!force && subs->stream->chip->shutdown) /* to be sure... */
-		return 0;
+		return -EBADFD;
 
 	async = !can_sleep && async_unlink;
 
@@ -770,6 +770,9 @@
 	unsigned int i;
 	int err;
 
+	if (subs->stream->chip->shutdown)
+		return -EBADFD;
+
 	for (i = 0; i < subs->nurbs; i++) {
 		snd_assert(subs->dataurb[i].urb, return -EINVAL);
 		if (subs->ops.prepare(subs, runtime, subs->dataurb[i].urb) < 0) {
@@ -2063,8 +2066,7 @@
 		return; /* not initialized */
 	list_for_each_safe(p, n, &subs->fmt_list) {
 		struct audioformat *fp = list_entry(p, struct audioformat, list);
-		if (fp->rate_table)
-			kfree(fp->rate_table);
+		kfree(fp->rate_table);
 		kfree(fp);
 	}
 }
@@ -2176,13 +2178,13 @@
 static int is_big_endian_format(struct usb_device *dev, struct audioformat *fp)
 {
 	/* M-Audio */
-	if (dev->descriptor.idVendor == 0x0763) {
+	if (le16_to_cpu(dev->descriptor.idVendor) == 0x0763) {
 		/* Quattro: captured data only */
-		if (dev->descriptor.idProduct == 0x2001 &&
+		if (le16_to_cpu(dev->descriptor.idProduct) == 0x2001 &&
 		    fp->endpoint & USB_DIR_IN)
 			return 1;
 		/* Audiophile USB */
-		if (dev->descriptor.idProduct == 0x2003)
+		if (le16_to_cpu(dev->descriptor.idProduct) == 0x2003)
 			return 1;
 	}
 	return 0;
@@ -2246,7 +2248,8 @@
 		break;
 	case USB_AUDIO_FORMAT_PCM8:
 		/* Dallas DS4201 workaround */
-		if (dev->descriptor.idVendor == 0x04fa && dev->descriptor.idProduct == 0x4201)
+		if (le16_to_cpu(dev->descriptor.idVendor) == 0x04fa &&
+		    le16_to_cpu(dev->descriptor.idProduct) == 0x4201)
 			pcm_format = SNDRV_PCM_FORMAT_S8;
 		else
 			pcm_format = SNDRV_PCM_FORMAT_U8;
@@ -2414,7 +2417,8 @@
 	/* extigy apparently supports sample rates other than 48k
 	 * but not in ordinary way.  so we enable only 48k atm.
 	 */
-	if (dev->descriptor.idVendor == 0x041e && dev->descriptor.idProduct == 0x3000) {
+	if (le16_to_cpu(dev->descriptor.idVendor) == 0x041e && 
+	    le16_to_cpu(dev->descriptor.idProduct) == 0x3000) {
 		if (fmt[3] == USB_FORMAT_TYPE_I &&
 		    stream == SNDRV_PCM_STREAM_PLAYBACK &&
 		    fp->rates != SNDRV_PCM_RATE_48000)
@@ -2448,7 +2452,7 @@
 		    (altsd->bInterfaceSubClass != USB_SUBCLASS_AUDIO_STREAMING &&
 		     altsd->bInterfaceSubClass != USB_SUBCLASS_VENDOR_SPEC) ||
 		    altsd->bNumEndpoints < 1 ||
-		    get_endpoint(alts, 0)->wMaxPacketSize == 0)
+		    le16_to_cpu(get_endpoint(alts, 0)->wMaxPacketSize) == 0)
 			continue;
 		/* must be isochronous */
 		if ((get_endpoint(alts, 0)->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) !=
@@ -2511,14 +2515,14 @@
 		fp->endpoint = get_endpoint(alts, 0)->bEndpointAddress;
 		fp->ep_attr = get_endpoint(alts, 0)->bmAttributes;
 		/* FIXME: decode wMaxPacketSize of high bandwith endpoints */
-		fp->maxpacksize = get_endpoint(alts, 0)->wMaxPacketSize;
+		fp->maxpacksize = le16_to_cpu(get_endpoint(alts, 0)->wMaxPacketSize);
 		fp->attributes = csep[3];
 
 		/* some quirks for attributes here */
 
 		/* workaround for AudioTrak Optoplay */
-		if (dev->descriptor.idVendor == 0x0a92 &&
-		    dev->descriptor.idProduct == 0x0053) {
+		if (le16_to_cpu(dev->descriptor.idVendor) == 0x0a92 &&
+		    le16_to_cpu(dev->descriptor.idProduct) == 0x0053) {
 			/* Optoplay sets the sample rate attribute although
 			 * it seems not supporting it in fact.
 			 */
@@ -2526,8 +2530,8 @@
 		}
 
 		/* workaround for M-Audio Audiophile USB */
-		if (dev->descriptor.idVendor == 0x0763 &&
-		    dev->descriptor.idProduct == 0x2003) {
+		if (le16_to_cpu(dev->descriptor.idVendor) == 0x0763 &&
+		    le16_to_cpu(dev->descriptor.idProduct) == 0x2003) {
 			/* doesn't set the sample rate attribute, but supports it */
 			fp->attributes |= EP_CS_ATTR_SAMPLE_RATE;
 		}
@@ -2536,11 +2540,11 @@
 		 * plantronics headset and Griffin iMic have set adaptive-in
 		 * although it's really not...
 		 */
-		if ((dev->descriptor.idVendor == 0x047f &&
-		     dev->descriptor.idProduct == 0x0ca1) ||
+		if ((le16_to_cpu(dev->descriptor.idVendor) == 0x047f &&
+		     le16_to_cpu(dev->descriptor.idProduct) == 0x0ca1) ||
 		    /* Griffin iMic (note that there is an older model 77d:223) */
-		    (dev->descriptor.idVendor == 0x077d &&
-		     dev->descriptor.idProduct == 0x07af)) {
+		    (le16_to_cpu(dev->descriptor.idVendor) == 0x077d &&
+		     le16_to_cpu(dev->descriptor.idProduct) == 0x07af)) {
 			fp->ep_attr &= ~EP_ATTR_MASK;
 			if (stream == SNDRV_PCM_STREAM_PLAYBACK)
 				fp->ep_attr |= EP_ATTR_ADAPTIVE;
@@ -2550,8 +2554,7 @@
 
 		/* ok, let's parse further... */
 		if (parse_audio_format(dev, fp, format, fmt, stream) < 0) {
-			if (fp->rate_table)
-				kfree(fp->rate_table);
+			kfree(fp->rate_table);
 			kfree(fp);
 			continue;
 		}
@@ -2559,8 +2562,7 @@
 		snd_printdd(KERN_INFO "%d:%u:%d: add audio endpoint 0x%x\n", dev->devnum, iface_no, i, fp->endpoint);
 		err = add_audio_endpoint(chip, stream, fp);
 		if (err < 0) {
-			if (fp->rate_table)
-				kfree(fp->rate_table);
+			kfree(fp->rate_table);
 			kfree(fp);
 			return err;
 		}
@@ -2693,15 +2695,13 @@
 	err = add_audio_endpoint(chip, stream, fp);
 	if (err < 0) {
 		kfree(fp);
-		if (rate_table)
-			kfree(rate_table);
+		kfree(rate_table);
 		return err;
 	}
 	if (fp->iface != get_iface_desc(&iface->altsetting[0])->bInterfaceNumber ||
 	    fp->altset_idx >= iface->num_altsetting) {
 		kfree(fp);
-		if (rate_table)
-			kfree(rate_table);
+		kfree(rate_table);
 		return -EINVAL;
 	}
 	alts = &iface->altsetting[fp->altset_idx];
@@ -2788,7 +2788,7 @@
 			.type = QUIRK_MIDI_FIXED_ENDPOINT,
 			.data = &ua25_ep
 		};
-		if (chip->dev->descriptor.idProduct == 0x002b)
+		if (le16_to_cpu(chip->dev->descriptor.idProduct) == 0x002b)
 			return snd_usb_create_midi_interface(chip, iface,
 							     &ua700_quirk);
 		else
@@ -2807,7 +2807,7 @@
 	fp->iface = altsd->bInterfaceNumber;
 	fp->endpoint = get_endpoint(alts, 0)->bEndpointAddress;
 	fp->ep_attr = get_endpoint(alts, 0)->bmAttributes;
-	fp->maxpacksize = get_endpoint(alts, 0)->wMaxPacketSize;
+	fp->maxpacksize = le16_to_cpu(get_endpoint(alts, 0)->wMaxPacketSize);
 
 	switch (fp->maxpacksize) {
 	case 0x120:
@@ -2873,7 +2873,7 @@
 	fp->iface = altsd->bInterfaceNumber;
 	fp->endpoint = get_endpoint(alts, 0)->bEndpointAddress;
 	fp->ep_attr = get_endpoint(alts, 0)->bmAttributes;
-	fp->maxpacksize = get_endpoint(alts, 0)->wMaxPacketSize;
+	fp->maxpacksize = le16_to_cpu(get_endpoint(alts, 0)->wMaxPacketSize);
 	fp->rate_max = fp->rate_min = combine_triple(&alts->extra[8]);
 
 	stream = (fp->endpoint & USB_DIR_IN)
@@ -2931,8 +2931,8 @@
 	struct usb_host_config *config = dev->actconfig;
 	int err;
 
-	if (get_cfg_desc(config)->wTotalLength == EXTIGY_FIRMWARE_SIZE_OLD ||
-	    get_cfg_desc(config)->wTotalLength == EXTIGY_FIRMWARE_SIZE_NEW) {
+	if (le16_to_cpu(get_cfg_desc(config)->wTotalLength) == EXTIGY_FIRMWARE_SIZE_OLD ||
+	    le16_to_cpu(get_cfg_desc(config)->wTotalLength) == EXTIGY_FIRMWARE_SIZE_NEW) {
 		snd_printdd("sending Extigy boot sequence...\n");
 		/* Send message to force it to reconnect with full interface. */
 		err = snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev,0),
@@ -2944,7 +2944,8 @@
 		if (err < 0) snd_printdd("error usb_get_descriptor: %d\n", err);
 		err = usb_reset_configuration(dev);
 		if (err < 0) snd_printdd("error usb_reset_configuration: %d\n", err);
-		snd_printdd("extigy_boot: new boot length = %d\n", get_cfg_desc(config)->wTotalLength);
+		snd_printdd("extigy_boot: new boot length = %d\n",
+			    le16_to_cpu(get_cfg_desc(config)->wTotalLength));
 		return -ENODEV; /* quit this anyway */
 	}
 	return 0;
@@ -3000,7 +3001,9 @@
 {
 	snd_usb_audio_t *chip = entry->private_data;
 	if (! chip->shutdown)
-		snd_iprintf(buffer, "%04x:%04x\n", chip->dev->descriptor.idVendor, chip->dev->descriptor.idProduct);
+		snd_iprintf(buffer, "%04x:%04x\n", 
+			    le16_to_cpu(chip->dev->descriptor.idVendor),
+			    le16_to_cpu(chip->dev->descriptor.idProduct));
 }
 
 static void snd_usb_audio_create_proc(snd_usb_audio_t *chip)
@@ -3081,7 +3084,8 @@
 
 	strcpy(card->driver, "USB-Audio");
 	sprintf(component, "USB%04x:%04x",
-		dev->descriptor.idVendor, dev->descriptor.idProduct);
+		le16_to_cpu(dev->descriptor.idVendor),
+		le16_to_cpu(dev->descriptor.idProduct));
 	snd_component_add(card, component);
 
 	/* retrieve the device string as shortname */
@@ -3093,7 +3097,8 @@
       			       card->shortname, sizeof(card->shortname)) <= 0) {
 			/* no name available from anywhere, so use ID */
 			sprintf(card->shortname, "USB Device %#04x:%#04x",
-				dev->descriptor.idVendor, dev->descriptor.idProduct);
+				le16_to_cpu(dev->descriptor.idVendor),
+				le16_to_cpu(dev->descriptor.idProduct));
 		}
 	}
 
@@ -3160,7 +3165,8 @@
 
 	/* SB Extigy needs special boot-up sequence */
 	/* if more models come, this will go to the quirk list. */
-	if (dev->descriptor.idVendor == 0x041e && dev->descriptor.idProduct == 0x3000) {
+	if (le16_to_cpu(dev->descriptor.idVendor) == 0x041e && 
+	    le16_to_cpu(dev->descriptor.idProduct) == 0x3000) {
 		if (snd_usb_extigy_boot_quirk(dev, intf) < 0)
 			goto __err_val;
 		config = dev->actconfig;
@@ -3194,8 +3200,8 @@
 		}
 		for (i = 0; i < SNDRV_CARDS; i++)
 			if (enable[i] && ! usb_chip[i] &&
-			    (vid[i] == -1 || vid[i] == dev->descriptor.idVendor) &&
-			    (pid[i] == -1 || pid[i] == dev->descriptor.idProduct)) {
+			    (vid[i] == -1 || vid[i] == le16_to_cpu(dev->descriptor.idVendor)) &&
+			    (pid[i] == -1 || pid[i] == le16_to_cpu(dev->descriptor.idProduct))) {
 				if (snd_usb_audio_create(dev, i, quirk, &chip) < 0) {
 					goto __error;
 				}
diff -Nru a/sound/usb/usbmidi.c b/sound/usb/usbmidi.c
--- a/sound/usb/usbmidi.c	2005-01-10 20:11:22 -08:00
+++ b/sound/usb/usbmidi.c	2005-01-10 20:11:22 -08:00
@@ -59,7 +59,7 @@
 	__u8  bDescriptorType;
 	__u8  bDescriptorSubtype;
 	__u8  bcdMSC[2];
-	__u16 wTotalLength;
+	__le16 wTotalLength;
 } __attribute__ ((packed));
 
 struct usb_ms_endpoint_descriptor {
@@ -504,8 +504,7 @@
 static void snd_usbmidi_in_endpoint_delete(snd_usb_midi_in_endpoint_t* ep)
 {
 	if (ep->urb) {
-		if (ep->urb->transfer_buffer)
-			kfree(ep->urb->transfer_buffer);
+		kfree(ep->urb->transfer_buffer);
 		usb_free_urb(ep->urb);
 	}
 	kfree(ep);
@@ -521,7 +520,7 @@
 	struct usb_host_interface *hostif;
 	struct usb_interface_descriptor* intfd;
 
-	if (umidi->chip->dev->descriptor.idVendor != 0x0582)
+	if (le16_to_cpu(umidi->chip->dev->descriptor.idVendor) != 0x0582)
 		return NULL;
 	intf = umidi->iface;
 	if (!intf || intf->num_altsetting != 2)
@@ -632,8 +631,7 @@
 	if (ep->tasklet.func)
 		tasklet_kill(&ep->tasklet);
 	if (ep->urb) {
-		if (ep->urb->transfer_buffer)
-			kfree(ep->urb->transfer_buffer);
+		kfree(ep->urb->transfer_buffer);
 		usb_free_urb(ep->urb);
 	}
 	kfree(ep);
@@ -839,8 +837,8 @@
 
 	/* TODO: read port name from jack descriptor */
 	name_format = "%s MIDI %d";
-	vendor = umidi->chip->dev->descriptor.idVendor;
-	product = umidi->chip->dev->descriptor.idProduct;
+	vendor = le16_to_cpu(umidi->chip->dev->descriptor.idVendor);
+	product = le16_to_cpu(umidi->chip->dev->descriptor.idProduct);
 	for (i = 0; i < ARRAY_SIZE(snd_usbmidi_port_names); ++i) {
 		if (snd_usbmidi_port_names[i].vendor == vendor &&
 		    snd_usbmidi_port_names[i].product == product &&
diff -Nru a/sound/usb/usbmixer.c b/sound/usb/usbmixer.c
--- a/sound/usb/usbmixer.c	2005-01-10 20:11:17 -08:00
+++ b/sound/usb/usbmixer.c	2005-01-10 20:11:17 -08:00
@@ -374,7 +374,7 @@
 static int check_matrix_bitmap(unsigned char *bmap, int ich, int och, int num_outs)
 {
 	int idx = ich * num_outs + och;
-	return bmap[-(idx >> 3)] & (0x80 >> (idx & 7));
+	return bmap[idx >> 3] & (0x80 >> (idx & 7));
 }
 
 
@@ -573,7 +573,7 @@
 static void usb_mixer_elem_free(snd_kcontrol_t *kctl)
 {
 	if (kctl->private_data) {
-		kfree((void *)kctl->private_data);
+		kfree(kctl->private_data);
 		kctl->private_data = NULL;
 	}
 }
@@ -931,14 +931,14 @@
  */
 
 static void build_mixer_unit_ctl(mixer_build_t *state, unsigned char *desc,
-				 int in_ch, int unitid)
+				 int in_pin, int in_ch, int unitid,
+				 usb_audio_term_t *iterm)
 {
 	usb_mixer_elem_info_t *cval;
-	unsigned int num_ins = desc[4];
-	unsigned int num_outs = desc[5 + num_ins];
+	unsigned int input_pins = desc[4];
+	unsigned int num_outs = desc[5 + input_pins];
 	unsigned int i, len;
 	snd_kcontrol_t *kctl;
-	usb_audio_term_t iterm;
 
 	if (check_ignored_ctl(state, unitid, 0))
 		return;
@@ -947,16 +947,13 @@
 	if (! cval)
 		return;
 
-	if (check_input_term(state, desc[5 + in_ch], &iterm) < 0)
-		return;
-
 	cval->chip = state->chip;
 	cval->ctrlif = state->ctrlif;
 	cval->id = unitid;
 	cval->control = in_ch + 1; /* based on 1 */
 	cval->val_type = USB_MIXER_S16;
 	for (i = 0; i < num_outs; i++) {
-		if (check_matrix_bitmap(desc + 9 + num_ins, in_ch, i, num_outs)) {
+		if (check_matrix_bitmap(desc + 9 + input_pins, in_ch, i, num_outs)) {
 			cval->cmask |= (1 << i);
 			cval->channels++;
 		}
@@ -975,9 +972,9 @@
 
 	len = check_mapped_name(state, unitid, 0, kctl->id.name, sizeof(kctl->id.name));
 	if (! len)
-		len = get_term_name(state, &iterm, kctl->id.name, sizeof(kctl->id.name), 0);
+		len = get_term_name(state, iterm, kctl->id.name, sizeof(kctl->id.name), 0);
 	if (! len)
-		len = sprintf(kctl->id.name, "Mixer Source %d", in_ch);
+		len = sprintf(kctl->id.name, "Mixer Source %d", in_ch + 1);
 	strlcat(kctl->id.name + len, " Volume", sizeof(kctl->id.name));
 
 	snd_printdd(KERN_INFO "[%d] MU [%s] ch = %d, val = %d/%d\n",
@@ -991,17 +988,44 @@
  */
 static int parse_audio_mixer_unit(mixer_build_t *state, int unitid, unsigned char *desc)
 {
-	int num_ins, num_outs;
-	int i, err;
-	if (desc[0] < 12 || ! (num_ins = desc[4]) || ! (num_outs = desc[5 + num_ins]))
+	usb_audio_term_t iterm;
+	int input_pins, num_ins, num_outs;
+	int pin, ich, err;
+
+	if (desc[0] < 11 || ! (input_pins = desc[4]) || ! (num_outs = desc[5 + input_pins])) {
+		snd_printk(KERN_ERR "invalid MIXER UNIT descriptor %d\n", unitid);
 		return -EINVAL;
+	}
+	/* no bmControls field (e.g. Maya44) -> ignore */
+	if (desc[0] <= 10 + input_pins) {
+		snd_printdd(KERN_INFO "MU %d has no bmControls field\n", unitid);
+		return 0;
+	}
 
-	for (i = 0; i < num_ins; i++) {
-		err = parse_audio_unit(state, desc[5 + i]);
+	num_ins = 0;
+	ich = 0;
+	for (pin = 0; pin < input_pins; pin++) {
+		err = parse_audio_unit(state, desc[5 + pin]);
+		if (err < 0)
+			return err;
+		err = check_input_term(state, desc[5 + pin], &iterm);
 		if (err < 0)
 			return err;
-		if (check_matrix_bitmap(desc + 9 + num_ins, i, 0, num_outs))
-			build_mixer_unit_ctl(state, desc, i, unitid);
+		num_ins += iterm.channels;
+		for (; ich < num_ins; ++ich) {
+			int och, ich_has_controls = 0;
+
+			for (och = 0; och < num_outs; ++och) {
+				if (check_matrix_bitmap(desc + 9 + input_pins,
+							ich, och, num_outs)) {
+					ich_has_controls = 1;
+					break;
+				}
+			}
+			if (ich_has_controls)
+				build_mixer_unit_ctl(state, desc, pin, ich,
+						     unitid, &iterm);
+		}
 	}
 	return 0;
 }
@@ -1490,12 +1514,12 @@
 	state.buffer = hostif->extra;
 	state.buflen = hostif->extralen;
 	state.ctrlif = ctrlif;
-	state.vendor = dev->idVendor;
-	state.product = dev->idProduct;
+	state.vendor = le16_to_cpu(dev->idVendor);
+	state.product = le16_to_cpu(dev->idProduct);
 
 	/* check the mapping table */
 	for (map = usbmix_ctl_maps; map->vendor; map++) {
-		if (map->vendor == dev->idVendor && map->product == dev->idProduct) {
+		if (map->vendor == le16_to_cpu(dev->idVendor) && map->product == le16_to_cpu(dev->idProduct)) {
 			state.map = map->map;
 			chip->ignore_ctl_error = map->ignore_ctl_error;
 			break;
diff -Nru a/sound/usb/usx2y/Makefile b/sound/usb/usx2y/Makefile
--- a/sound/usb/usx2y/Makefile	2005-01-10 20:11:19 -08:00
+++ b/sound/usb/usx2y/Makefile	2005-01-10 20:11:19 -08:00
@@ -1,3 +1,3 @@
-snd-usb-usx2y-objs := usbusx2y.o usbusx2yaudio.o usX2Yhwdep.o
+snd-usb-usx2y-objs := usbusx2y.o usX2Yhwdep.o usx2yhwdeppcm.o
 
 obj-$(CONFIG_SND_USB_USX2Y) += snd-usb-usx2y.o
diff -Nru a/sound/usb/usx2y/usX2Yhwdep.c b/sound/usb/usx2y/usX2Yhwdep.c
--- a/sound/usb/usx2y/usX2Yhwdep.c	2005-01-10 20:11:15 -08:00
+++ b/sound/usb/usx2y/usX2Yhwdep.c	2005-01-10 20:11:15 -08:00
@@ -31,6 +31,8 @@
 #include "usbusx2y.h"
 #include "usX2Yhwdep.h"
 
+int usX2Y_hwdep_pcm_new(snd_card_t* card);
+
 
 static struct page * snd_us428ctls_vm_nopage(struct vm_area_struct *area, unsigned long address, int *type)
 {
@@ -95,20 +97,14 @@
 {
 	unsigned int	mask = 0;
 	usX2Ydev_t	*us428 = (usX2Ydev_t*)hw->private_data;
-	static unsigned	LastN;
-
+	us428ctls_sharedmem_t *shm = us428->us428ctls_sharedmem;
 	if (us428->chip_status & USX2Y_STAT_CHIP_HUP)
 		return POLLHUP;
 
 	poll_wait(file, &us428->us428ctls_wait_queue_head, wait);
 
-	down(&us428->open_mutex);
-	if (us428->us428ctls_sharedmem
-	    && us428->us428ctls_sharedmem->CtlSnapShotLast != LastN) {
+	if (shm != NULL && shm->CtlSnapShotLast != shm->CtlSnapShotRed)
 		mask |= POLLIN;
-		LastN = us428->us428ctls_sharedmem->CtlSnapShotLast;
-	}
-	up(&us428->open_mutex);
 
 	return mask;
 }
@@ -133,7 +129,7 @@
 	};
 	int id = -1;
 
-	switch (((usX2Ydev_t*)hw->private_data)->chip.dev->descriptor.idProduct) {
+	switch (le16_to_cpu(((usX2Ydev_t*)hw->private_data)->chip.dev->descriptor.idProduct)) {
 	case USB_ID_US122:
 		id = USX2Y_TYPE_122;
 		break;
@@ -185,7 +181,7 @@
 	};
 	struct usb_device *dev = usX2Y(card)->chip.dev;
 	struct usb_interface *iface = usb_ifnum_to_if(dev, 0);
-	snd_usb_audio_quirk_t *quirk = dev->descriptor.idProduct == USB_ID_US428 ? &quirk_2 : &quirk_1;
+	snd_usb_audio_quirk_t *quirk = le16_to_cpu(dev->descriptor.idProduct) == USB_ID_US428 ? &quirk_2 : &quirk_1;
 
 	snd_printdd("usX2Y_create_usbmidi \n");
 	return snd_usb_create_midi_interface(&usX2Y(card)->chip, iface, quirk);
@@ -201,6 +197,8 @@
 			break;
 		}
 		if ((err = usX2Y_audio_create(card)) < 0) 
+			break;
+		if ((err = usX2Y_hwdep_pcm_new(card)) < 0)
 			break;
 		if ((err = snd_card_register(card)) < 0)
 			break;
diff -Nru a/sound/usb/usx2y/usbusx2y.c b/sound/usb/usx2y/usbusx2y.c
--- a/sound/usb/usx2y/usbusx2y.c	2005-01-10 20:11:16 -08:00
+++ b/sound/usb/usx2y/usbusx2y.c	2005-01-10 20:11:16 -08:00
@@ -1,6 +1,30 @@
 /*
- * usbus428.c - ALSA USB US-428 Driver
+ * usbusy2y.c - ALSA USB US-428 Driver
  *
+2004-12-14 Karsten Wiese
+	Version 0.8.7.1:
+	snd_pcm_open for rawusb pcm-devices now returns -EBUSY if called without rawusb's hwdep device being open.
+
+2004-12-02 Karsten Wiese
+	Version 0.8.7:
+	Use macro usb_maxpacket() for portability.
+
+2004-10-26 Karsten Wiese
+	Version 0.8.6:
+	wake_up() process waiting in usX2Y_urbs_start() on error.
+
+2004-10-21 Karsten Wiese
+	Version 0.8.5:
+	nrpacks is runtime or compiletime configurable now with tested values from 1 to 4.
+
+2004-10-03 Karsten Wiese
+	Version 0.8.2:
+	Avoid any possible racing while in prepare callback.
+
+2004-09-30 Karsten Wiese
+	Version 0.8.0:
+	Simplified things and made ohci work again.
+
 2004-09-20 Karsten Wiese
 	Version 0.7.3:
 	Use usb_kill_urb() instead of deprecated (kernel 2.6.9) usb_unlink_urb().
@@ -84,7 +108,7 @@
 	Version 0.0.2: midi works with snd-usb-midi, audio (only fullduplex now) with i.e. bristol.
 	The firmware has been sniffed from win2k us-428 driver 3.09.
 
- *   Copyright (c) 2002 Karsten Wiese
+ *   Copyright (c) 2002 - 2004 Karsten Wiese
  *
  *   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
@@ -119,7 +143,7 @@
 
 
 MODULE_AUTHOR("Karsten Wiese <annabellesgarden@yahoo.de>");
-MODULE_DESCRIPTION("TASCAM "NAME_ALLCAPS" Version 0.7.3");
+MODULE_DESCRIPTION("TASCAM "NAME_ALLCAPS" Version 0.8.7.1");
 MODULE_LICENSE("GPL");
 MODULE_SUPPORTED_DEVICE("{{TASCAM(0x1604), "NAME_ALLCAPS"(0x8001)(0x8005)(0x8007) }}");
 
@@ -285,8 +309,7 @@
 			S->urb[i] = NULL;
 		}
 	}
-	if (S->buffer)
-		kfree(S->buffer);
+	kfree(S->buffer);
 }
 
 
@@ -325,13 +348,15 @@
 	card->private_free = snd_usX2Y_card_private_free;
 	usX2Y(card)->chip.dev = device;
 	usX2Y(card)->chip.card = card;
-	init_MUTEX (&usX2Y(card)->open_mutex);
+	init_waitqueue_head(&usX2Y(card)->prepare_wait_queue);
+	init_MUTEX (&usX2Y(card)->prepare_mutex);
 	INIT_LIST_HEAD(&usX2Y(card)->chip.midi_list);
 	strcpy(card->driver, "USB "NAME_ALLCAPS"");
 	sprintf(card->shortname, "TASCAM "NAME_ALLCAPS"");
 	sprintf(card->longname, "%s (%x:%x if %d at %03d/%03d)",
 		card->shortname, 
-		device->descriptor.idVendor, device->descriptor.idProduct,
+		le16_to_cpu(device->descriptor.idVendor),
+		le16_to_cpu(device->descriptor.idProduct),
 		0,//us428(card)->usbmidi.ifnum,
 		usX2Y(card)->chip.dev->bus->busnum, usX2Y(card)->chip.dev->devnum
 		);
@@ -344,10 +369,10 @@
 {
 	int		err;
 	snd_card_t*	card;
-	if (device->descriptor.idVendor != 0x1604 ||
-	    (device->descriptor.idProduct != USB_ID_US122 &&
-	     device->descriptor.idProduct != USB_ID_US224 &&
-	     device->descriptor.idProduct != USB_ID_US428) ||
+	if (le16_to_cpu(device->descriptor.idVendor) != 0x1604 ||
+	    (le16_to_cpu(device->descriptor.idProduct) != USB_ID_US122 &&
+	     le16_to_cpu(device->descriptor.idProduct) != USB_ID_US224 &&
+	     le16_to_cpu(device->descriptor.idProduct) != USB_ID_US428) ||
 	    !(card = usX2Y_create_card(device)))
 		return NULL;
 	if ((err = usX2Y_hwdep_new(card, device)) < 0  ||
@@ -389,8 +414,7 @@
 
 static void snd_usX2Y_card_private_free(snd_card_t *card)
 {
-	if (usX2Y(card)->In04Buf)
-		kfree(usX2Y(card)->In04Buf);
+	kfree(usX2Y(card)->In04Buf);
 	usb_free_urb(usX2Y(card)->In04urb);
 	if (usX2Y(card)->us428ctls_sharedmem)
 		snd_free_pages(usX2Y(card)->us428ctls_sharedmem, sizeof(*usX2Y(card)->us428ctls_sharedmem));
diff -Nru a/sound/usb/usx2y/usbusx2y.h b/sound/usb/usx2y/usbusx2y.h
--- a/sound/usb/usx2y/usbusx2y.h	2005-01-10 20:11:21 -08:00
+++ b/sound/usb/usx2y/usbusx2y.h	2005-01-10 20:11:21 -08:00
@@ -3,15 +3,8 @@
 #include "../usbaudio.h"
 #include "usbus428ctldefs.h" 
 
-#define NRURBS	        2	/* */
-#define NRPACKS		1	/* FIXME: Currently only 1 works.
-				   usb-frames/ms per urb: 1 and 2 are supported.
-				   setting to 2 will PERHAPS make it easier for slow machines.
-				   Jitter will be higher though.
-				   On my PIII 500Mhz Laptop setting to 1 is the only way to go 
-				   for PLAYING synths. i.e. Jack & Aeolus sound quit nicely 
-				   at 4 periods 64 frames. 
-				*/
+#define NRURBS	        2	
+
 
 #define URBS_AsyncSeq 10
 #define URB_DataLen_AsyncSeq 32
@@ -27,6 +20,7 @@
 } snd_usX2Y_urbSeq_t;
 
 typedef struct snd_usX2Y_substream snd_usX2Y_substream_t;
+#include "usx2yhwdeppcm.h"
 
 typedef struct {
 	snd_usb_audio_t 	chip;
@@ -40,13 +34,42 @@
 	snd_usX2Y_AsyncSeq_t	AS04;
 	unsigned int		rate,
 				format;
-	int			refframes;
 	int			chip_status;
-	struct semaphore	open_mutex;
+	struct semaphore	prepare_mutex;
 	us428ctls_sharedmem_t	*us428ctls_sharedmem;
+	int			wait_iso_frame;
 	wait_queue_head_t	us428ctls_wait_queue_head;
-	snd_usX2Y_substream_t	*substream[4];
+	snd_usX2Y_hwdep_pcm_shm_t	*hwdep_pcm_shm;
+	snd_usX2Y_substream_t	*subs[4];
+	snd_usX2Y_substream_t	* volatile  prepare_subs;
+	wait_queue_head_t	prepare_wait_queue;
 } usX2Ydev_t;
+
+
+struct snd_usX2Y_substream {
+	usX2Ydev_t	*usX2Y;
+	snd_pcm_substream_t *pcm_substream;
+
+	int			endpoint;		
+	unsigned int		maxpacksize;		/* max packet size in bytes */
+
+	atomic_t		state;
+#define state_STOPPED	0
+#define state_STARTING1 1
+#define state_STARTING2 2
+#define state_STARTING3 3
+#define state_PREPARED	4
+#define state_PRERUNNING  6
+#define state_RUNNING	8
+
+	int			hwptr;			/* free frame position in the buffer (only for playback) */
+	int			hwptr_done;		/* processed frame position in the buffer */
+	int			transfer_done;		/* processed frames since last period update */
+
+	struct urb		*urb[NRURBS];	/* data urb table */
+	struct urb		*completed_urb;
+	char			*tmpbuf;			/* temporary buffer for playback */
+};
 
 
 #define usX2Y(c) ((usX2Ydev_t*)(c)->private_data)
diff -Nru a/sound/usb/usx2y/usbusx2yaudio.c b/sound/usb/usx2y/usbusx2yaudio.c
--- a/sound/usb/usx2y/usbusx2yaudio.c	2005-01-10 20:11:19 -08:00
+++ b/sound/usb/usx2y/usbusx2yaudio.c	2005-01-10 20:11:19 -08:00
@@ -1,10 +1,9 @@
 /*
- *   US-428 AUDIO
-
- *   Copyright (c) 2002-2003 by Karsten Wiese
- 
+ *   US-X2Y AUDIO
+ *   Copyright (c) 2002-2004 by Karsten Wiese
+ *
  *   based on
-
+ *
  *   (Tentative) USB Audio Driver for ALSA
  *
  *   Main and PCM part
@@ -42,34 +41,30 @@
 #include "usx2y.h"
 #include "usbusx2y.h"
 
-
-struct snd_usX2Y_substream {
-	usX2Ydev_t	*usX2Y;
-	snd_pcm_substream_t *pcm_substream;
-
-	unsigned char		endpoint;		
-	unsigned int		datapipe;  		/* the data i/o pipe */
-	unsigned int		maxpacksize;		/* max packet size in bytes */
-
-	char			prepared,
-				running,
-				stalled;
-
-	int			hwptr;			/* free frame position in the buffer (only for playback) */
-	int			hwptr_done;		/* processed frame position in the buffer */
-	int			transfer_done;		/* processed frames since last period update */
-
-	struct urb		*urb[NRURBS];	/* data urb table */
-	int			next_urb_complete;
-	struct urb		*completed_urb;
-	char			*tmpbuf;			/* temporary buffer for playback */
-	volatile int		submitted_urbs;
-	wait_queue_head_t	wait_queue;
-};
-
-
-
-
+#define USX2Y_NRPACKS 4			/* Default value used for nr of packs per urb.
+					  1 to 4 have been tested ok on uhci.
+					  To use 3 on ohci, you'd need a patch:
+					  look for "0000425-linux-2.6.9-rc4-mm1_ohci-hcd.patch.gz" on
+					  "https://bugtrack.alsa-project.org/alsa-bug/bug_view_page.php?bug_id=0000425"
+					  .
+					  1, 2 and 4 work out of the box on ohci, if I recall correctly.
+					  Bigger is safer operation,
+					  smaller gives lower latencies.
+					*/
+#define USX2Y_NRPACKS_VARIABLE y	/* If your system works ok with this module's parameter
+					   nrpacks set to 1, you might as well comment 
+					   this #define out, and thereby produce smaller, faster code.
+					   You'd also set USX2Y_NRPACKS to 1 then.
+					*/
+
+#ifdef USX2Y_NRPACKS_VARIABLE
+ static int nrpacks = USX2Y_NRPACKS; /* number of packets per urb */
+ #define  nr_of_packs() nrpacks
+ module_param(nrpacks, int, 0444);
+ MODULE_PARM_DESC(nrpacks, "Number of packets per URB.");
+#else
+ #define nr_of_packs() USX2Y_NRPACKS
+#endif
 
 
 static int usX2Y_urb_capt_retire(snd_usX2Y_substream_t *subs)
@@ -80,15 +75,15 @@
 	int 		i, len, lens = 0, hwptr_done = subs->hwptr_done;
 	usX2Ydev_t	*usX2Y = subs->usX2Y;
 
-	for (i = 0; i < NRPACKS; i++) {
+	for (i = 0; i < nr_of_packs(); i++) {
 		cp = (unsigned char*)urb->transfer_buffer + urb->iso_frame_desc[i].offset;
 		if (urb->iso_frame_desc[i].status) { /* active? hmm, skip this */
-			snd_printdd("activ frame status %i\n", urb->iso_frame_desc[i].status);
+			snd_printk("activ frame status %i. Most propably some hardware problem.\n", urb->iso_frame_desc[i].status);
 			return urb->iso_frame_desc[i].status;
 		}
 		len = urb->iso_frame_desc[i].actual_length / usX2Y->stride;
 		if (! len) {
-			snd_printk("0 == len ERROR!\n");
+			snd_printd("0 == len ERROR!\n");
 			continue;
 		}
 
@@ -134,7 +129,7 @@
 	snd_pcm_runtime_t *runtime = subs->pcm_substream->runtime;
 
 	count = 0;
-	for (pack = 0; pack < NRPACKS; pack++) {
+	for (pack = 0; pack <  nr_of_packs(); pack++) {
 		/* calculate the size of a packet */
 		counts = cap_urb->iso_frame_desc[pack].actual_length / usX2Y->stride;
 		count += counts;
@@ -142,28 +137,32 @@
 			snd_printk("should not be here with counts=%i\n", counts);
 			return -EPIPE;
 		}
-
 		/* set up descriptor */
-		urb->iso_frame_desc[pack].offset = pack ? urb->iso_frame_desc[pack - 1].offset + urb->iso_frame_desc[pack - 1].length : 0;
-		urb->iso_frame_desc[pack].length = counts * usX2Y->stride;
-	}
-	if (subs->hwptr + count > runtime->buffer_size) {
-		/* err, the transferred area goes over buffer boundary.
-		 * copy the data to the temp buffer.
-		 */
-		int len;
-		len = runtime->buffer_size - subs->hwptr;
-		urb->transfer_buffer = subs->tmpbuf;
-		memcpy(subs->tmpbuf, runtime->dma_area + subs->hwptr * usX2Y->stride, len * usX2Y->stride);
-		memcpy(subs->tmpbuf + len * usX2Y->stride, runtime->dma_area, (count - len) * usX2Y->stride);
-		subs->hwptr += count;
-		subs->hwptr -= runtime->buffer_size;
-	} else {
-		/* set the buffer pointer */
-		urb->transfer_buffer = runtime->dma_area + subs->hwptr * usX2Y->stride;
-		if ((subs->hwptr += count) >= runtime->buffer_size)
+		urb->iso_frame_desc[pack].offset = pack ?
+			urb->iso_frame_desc[pack - 1].offset + urb->iso_frame_desc[pack - 1].length :
+			0;
+		urb->iso_frame_desc[pack].length = cap_urb->iso_frame_desc[pack].actual_length;
+	}
+	if (atomic_read(&subs->state) >= state_PRERUNNING)
+		if (subs->hwptr + count > runtime->buffer_size) {
+			/* err, the transferred area goes over buffer boundary.
+			 * copy the data to the temp buffer.
+			 */
+			int len;
+			len = runtime->buffer_size - subs->hwptr;
+			urb->transfer_buffer = subs->tmpbuf;
+			memcpy(subs->tmpbuf, runtime->dma_area + subs->hwptr * usX2Y->stride, len * usX2Y->stride);
+			memcpy(subs->tmpbuf + len * usX2Y->stride, runtime->dma_area, (count - len) * usX2Y->stride);
+			subs->hwptr += count;
+			subs->hwptr -= runtime->buffer_size;
+		} else {
+			/* set the buffer pointer */
+			urb->transfer_buffer = runtime->dma_area + subs->hwptr * usX2Y->stride;
+			if ((subs->hwptr += count) >= runtime->buffer_size)
 			subs->hwptr -= runtime->buffer_size;			
-	}
+		}
+	else
+		urb->transfer_buffer = subs->tmpbuf;
 	urb->transfer_buffer_length = count * usX2Y->stride;
 	return 0;
 }
@@ -173,14 +172,10 @@
  *
  * update the current position and call callback if a period is processed.
  */
-inline static int usX2Y_urb_play_retire(snd_usX2Y_substream_t *subs, struct urb *urb)
+static void usX2Y_urb_play_retire(snd_usX2Y_substream_t *subs, struct urb *urb)
 {
 	snd_pcm_runtime_t *runtime = subs->pcm_substream->runtime;
-	int		len = (urb->iso_frame_desc[0].actual_length
-#if NRPACKS > 1
-			       + urb->iso_frame_desc[1].actual_length
-#endif
-		               ) / subs->usX2Y->stride;
+	int		len = urb->actual_length / subs->usX2Y->stride;
 
 	subs->transfer_done += len;
 	subs->hwptr_done +=  len;
@@ -190,224 +185,206 @@
 		subs->transfer_done -= runtime->period_size;
 		snd_pcm_period_elapsed(subs->pcm_substream);
 	}
-	return 0;
 }
 
-inline static int usX2Y_urb_submit(snd_usX2Y_substream_t *subs, struct urb *urb, int frame)
+static int usX2Y_urb_submit(snd_usX2Y_substream_t *subs, struct urb *urb, int frame)
 {
 	int err;
 	if (!urb)
 		return -ENODEV;
-	urb->start_frame = (frame + NRURBS*NRPACKS) & (1024 - 1);
+	urb->start_frame = (frame + NRURBS * nr_of_packs());  // let hcd do rollover sanity checks
 	urb->hcpriv = NULL;
 	urb->dev = subs->usX2Y->chip.dev; /* we need to set this at each time */
 	if ((err = usb_submit_urb(urb, GFP_ATOMIC)) < 0) {
-		snd_printk("%i\n", err);
+		snd_printk("usb_submit_urb() returned %i\n", err);
 		return err;
-	} else {
-		subs->submitted_urbs++;
-		if (subs->next_urb_complete < 0) 
-			subs->next_urb_complete = 0;
 	}
 	return 0;
 }
 
-
-static inline int frame_distance(int from, int to)
+static inline int usX2Y_usbframe_complete(snd_usX2Y_substream_t *capsubs, snd_usX2Y_substream_t *playbacksubs, int frame)
 {
-	int distance = to - from;
-	if (distance < -512)
-		distance += 1024;
-	else
-		if (distance > 511)
-			distance -= 1024;
-	return distance;
-}
+	int err, state;
+	{
+		struct urb *urb = playbacksubs->completed_urb;
 
+		state = atomic_read(&playbacksubs->state);
+		if (NULL != urb) {
+			if (state == state_RUNNING)
+				usX2Y_urb_play_retire(playbacksubs, urb);
+			else
+				if (state >= state_PRERUNNING) {
+					atomic_inc(&playbacksubs->state);
+				}
+		} else {
+			switch (state) {
+			case state_STARTING1:
+				urb = playbacksubs->urb[0];
+				atomic_inc(&playbacksubs->state);
+				break;
+			case state_STARTING2:
+				urb = playbacksubs->urb[1];
+				atomic_inc(&playbacksubs->state);
+				break;
+			}
+		}
+		if (urb) {
+			if ((err = usX2Y_urb_play_prepare(playbacksubs, capsubs->completed_urb, urb)) ||
+			    (err = usX2Y_urb_submit(playbacksubs, urb, frame))) {
+				return err;
+			}
+		}
 
-static void usX2Y_subs_set_next_urb_complete(snd_usX2Y_substream_t *subs)
-{
-	int next_urb_complete = subs->next_urb_complete + 1;
-	int distance;
-	if (next_urb_complete >= NRURBS)
-		next_urb_complete = 0;
-	distance = frame_distance(subs->completed_urb->start_frame,
-				  subs->urb[next_urb_complete]->start_frame);
-	if (1 == distance) {
-		subs->next_urb_complete = next_urb_complete;
-	} else {
-		snd_printdd("distance %i not set_nuc %i %i %i \n", distance, subs->endpoint, next_urb_complete, subs->urb[next_urb_complete]->status);
-		subs->next_urb_complete = -1;
+		playbacksubs->completed_urb = NULL;
 	}
+	state = atomic_read(&capsubs->state);
+	if (state >= state_PREPARED) {
+		if (state == state_RUNNING) {
+			if ((err = usX2Y_urb_capt_retire(capsubs)))
+				return err;
+		} else
+			if (state >= state_PRERUNNING) {
+				atomic_inc(&capsubs->state);
+			}
+		if ((err = usX2Y_urb_submit(capsubs, capsubs->completed_urb, frame)))
+			return err;
+	}
+	capsubs->completed_urb = NULL;
+	return 0;
 }
 
 
-static inline void usX2Y_usbframe_complete(snd_usX2Y_substream_t *capsubs, snd_usX2Y_substream_t *playbacksubs, int frame)
+static void usX2Y_clients_stop(usX2Ydev_t *usX2Y)
 {
-	{
-		struct urb *urb;
-		if ((urb = playbacksubs->completed_urb)) {
-			if (playbacksubs->prepared)
-				usX2Y_urb_play_retire(playbacksubs, urb);
-			usX2Y_subs_set_next_urb_complete(playbacksubs);
+	int s, u;
+	for (s = 0; s < 4; s++) {
+		snd_usX2Y_substream_t *subs = usX2Y->subs[s];
+		if (subs) {
+			snd_printdd("%i %p state=%i\n", s, subs, atomic_read(&subs->state));
+			atomic_set(&subs->state, state_STOPPED);
 		}
-		if (playbacksubs->running) {
-			if (NULL == urb)
-				urb = playbacksubs->urb[playbacksubs->next_urb_complete + 1];
-			if (urb && 0 == usX2Y_urb_play_prepare(playbacksubs,
-							       capsubs->completed_urb,
-							       urb)) {
-				if (usX2Y_urb_submit(playbacksubs, urb, frame) < 0)
-					return;
-			} else
-				snd_pcm_stop(playbacksubs->pcm_substream, SNDRV_PCM_STATE_XRUN);
+	}
+	for (s = 0; s < 4; s++) {
+		snd_usX2Y_substream_t *subs = usX2Y->subs[s];
+		if (subs) {
+			if (atomic_read(&subs->state) >= state_PRERUNNING) {
+				snd_pcm_stop(subs->pcm_substream, SNDRV_PCM_STATE_XRUN);
+			}
+			for (u = 0; u < NRURBS; u++) {
+				struct urb *urb = subs->urb[u];
+				if (NULL != urb)
+					snd_printdd("%i status=%i start_frame=%i\n", u, urb->status, urb->start_frame);
+			}
 		}
-		playbacksubs->completed_urb = NULL;
 	}
-	if (capsubs->running)
-		usX2Y_urb_capt_retire(capsubs);
-	usX2Y_subs_set_next_urb_complete(capsubs);
-	if (capsubs->prepared)
-		usX2Y_urb_submit(capsubs, capsubs->completed_urb, frame);
-	capsubs->completed_urb = NULL;
+	usX2Y->prepare_subs = NULL;
+	wake_up(&usX2Y->prepare_wait_queue);
 }
 
-
-static void usX2Y_clients_stop(snd_usX2Y_substream_t *subs)
+static void usX2Y_error_urb_status(usX2Ydev_t *usX2Y, snd_usX2Y_substream_t *subs, struct urb *urb)
 {
-	usX2Ydev_t *usX2Y = subs->usX2Y;
-	int i;
-	for (i = 0; i < 4; i++) {
-		snd_usX2Y_substream_t *substream = usX2Y->substream[i];
-		if (substream && substream->running)
-			snd_pcm_stop(substream->pcm_substream, SNDRV_PCM_STATE_XRUN);
-	}
+	snd_printk("ep=%i stalled with status=%i\n", subs->endpoint, urb->status);
+	urb->status = 0;
+	usX2Y_clients_stop(usX2Y);
 }
 
+static void usX2Y_error_sequence(usX2Ydev_t *usX2Y, snd_usX2Y_substream_t *subs, struct urb *urb)
+{
+	snd_printk("Sequence Error!(hcd_frame=%i ep=%i%s;wait=%i,frame=%i).\n"
+		   "Most propably some urb of usb-frame %i is still missing.\n"
+		   "Cause could be too long delays in usb-hcd interrupt handling.\n",
+		   usb_get_current_frame_number(usX2Y->chip.dev),
+		   subs->endpoint, usb_pipein(urb->pipe) ? "in" : "out", usX2Y->wait_iso_frame, urb->start_frame, usX2Y->wait_iso_frame);
+	usX2Y_clients_stop(usX2Y);
+}
 
 static void i_usX2Y_urb_complete(struct urb *urb, struct pt_regs *regs)
 {
 	snd_usX2Y_substream_t *subs = (snd_usX2Y_substream_t*)urb->context;
+	usX2Ydev_t *usX2Y = subs->usX2Y;
 
-	subs->submitted_urbs--;
-	if (urb->status) {
-		snd_printk("ep=%i stalled with status=%i\n", subs->endpoint, urb->status);
-		subs->stalled = 1;
-		usX2Y_clients_stop(subs);
-		urb->status = 0;
+	if (unlikely(atomic_read(&subs->state) < state_PREPARED)) {
+		snd_printdd("hcd_frame=%i ep=%i%s status=%i start_frame=%i\n", usb_get_current_frame_number(usX2Y->chip.dev), subs->endpoint, usb_pipein(urb->pipe) ? "in" : "out", urb->status, urb->start_frame);
+		return;
+	}
+	if (unlikely(urb->status)) {
+		usX2Y_error_urb_status(usX2Y, subs, urb);
 		return;
 	}
-	if (urb == subs->urb[subs->next_urb_complete]) {
+	if (likely((0xFFFF & urb->start_frame) == usX2Y->wait_iso_frame))
 		subs->completed_urb = urb;
-	} else {
-		snd_printk("Sequence Error!(ep=%i;nuc=%i,frame=%i)\n",
-			   subs->endpoint, subs->next_urb_complete, urb->start_frame);
-		subs->stalled = 1;
-		usX2Y_clients_stop(subs);
+	else {
+		usX2Y_error_sequence(usX2Y, subs, urb);
 		return;
 	}
-	if (waitqueue_active(&subs->wait_queue))
-		wake_up(&subs->wait_queue);
 	{
-		snd_usX2Y_substream_t *capsubs = subs->usX2Y->substream[SNDRV_PCM_STREAM_CAPTURE],
-			*playbacksubs = subs->usX2Y->substream[SNDRV_PCM_STREAM_PLAYBACK];
-		if (capsubs->completed_urb &&
-		    (playbacksubs->completed_urb ||
-		     !playbacksubs->prepared ||
-		     (playbacksubs->prepared && (playbacksubs->next_urb_complete < 0 ||	// not started yet
-						 frame_distance(capsubs->completed_urb->start_frame,
-								playbacksubs->urb[playbacksubs->next_urb_complete]->start_frame)
-						 > 0 ||					// other expected later
-						 playbacksubs->stalled))))
-			usX2Y_usbframe_complete(capsubs, playbacksubs, urb->start_frame);
+		snd_usX2Y_substream_t *capsubs = usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE],
+			*playbacksubs = usX2Y->subs[SNDRV_PCM_STREAM_PLAYBACK];
+		if (capsubs->completed_urb && atomic_read(&capsubs->state) >= state_PREPARED &&
+		    (playbacksubs->completed_urb || atomic_read(&playbacksubs->state) < state_PREPARED)) {
+			if (!usX2Y_usbframe_complete(capsubs, playbacksubs, urb->start_frame)) {
+				if (nr_of_packs() <= urb->start_frame &&
+				    urb->start_frame <= (2 * nr_of_packs() - 1))	// uhci and ohci
+					usX2Y->wait_iso_frame = urb->start_frame - nr_of_packs();
+				else
+					usX2Y->wait_iso_frame +=  nr_of_packs();
+			} else {
+				snd_printdd("\n");
+				usX2Y_clients_stop(usX2Y);
+			}
+		}
 	}
 }
 
-
-static int usX2Y_urbs_capt_start(snd_usX2Y_substream_t *subs)
+static void usX2Y_urbs_set_complete(usX2Ydev_t * usX2Y, void (*complete)(struct urb *, struct pt_regs *))
 {
-	int i, err;
-
-	for (i = 0; i < NRURBS; i++) {
-		unsigned long pack;
-		struct urb *urb = subs->urb[i];
-		urb->dev = subs->usX2Y->chip.dev;
-		urb->transfer_flags = URB_ISO_ASAP;
-		for (pack = 0; pack < NRPACKS; pack++) {
-			urb->iso_frame_desc[pack].offset = subs->maxpacksize * pack;
-			urb->iso_frame_desc[pack].length = subs->maxpacksize;
-		}
-		urb->transfer_buffer_length = subs->maxpacksize * NRPACKS; 
-		if ((err = usb_submit_urb(urb, GFP_ATOMIC)) < 0) {
-			snd_printk (KERN_ERR "cannot submit datapipe for urb %d, err = %d\n", i, err);
-			return -EPIPE;
-		} else {
-			subs->submitted_urbs++;
-		}
-		urb->transfer_flags = 0;
+	int s, u;
+	for (s = 0; s < 4; s++) {
+		snd_usX2Y_substream_t *subs = usX2Y->subs[s];
+		if (NULL != subs)
+			for (u = 0; u < NRURBS; u++) {
+				struct urb * urb = subs->urb[u];
+				if (NULL != urb)
+					urb->complete = complete;
+			}
 	}
-	subs->stalled = 0;
-	subs->next_urb_complete = 0;
-	subs->prepared = 1;
-	return 0;
 }
 
-/* 
- *  wait until all urbs are processed.
- */
-static int usX2Y_urbs_wait_clear(snd_usX2Y_substream_t *subs)
+static void usX2Y_subs_startup_finish(usX2Ydev_t * usX2Y)
 {
-	int timeout = HZ;
-
-	do {
-		if (0 == subs->submitted_urbs)
-			break;
-		set_current_state(TASK_UNINTERRUPTIBLE);
-		snd_printdd("snd_usX2Y_urbs_wait_clear waiting\n");
-		schedule_timeout(1);
-	} while (--timeout > 0);
-	if (subs->submitted_urbs)
-		snd_printk(KERN_ERR "timeout: still %d active urbs..\n", subs->submitted_urbs);
-	return 0;
+	usX2Y_urbs_set_complete(usX2Y, i_usX2Y_urb_complete);
+	usX2Y->prepare_subs = NULL;
 }
-/*
- * return the current pcm pointer.  just return the hwptr_done value.
- */
-static snd_pcm_uframes_t snd_usX2Y_pcm_pointer(snd_pcm_substream_t *substream)
-{
-	snd_usX2Y_substream_t *subs = (snd_usX2Y_substream_t *)substream->runtime->private_data;
-	return subs->hwptr_done;
-}
-/*
- * start/stop substream
- */
-static int snd_usX2Y_pcm_trigger(snd_pcm_substream_t *substream, int cmd)
+
+static void i_usX2Y_subs_startup(struct urb *urb, struct pt_regs *regs)
 {
-	snd_usX2Y_substream_t *subs = (snd_usX2Y_substream_t *)substream->runtime->private_data;
+	snd_usX2Y_substream_t *subs = (snd_usX2Y_substream_t*)urb->context;
+	usX2Ydev_t *usX2Y = subs->usX2Y;
+	snd_usX2Y_substream_t *prepare_subs = usX2Y->prepare_subs;
+	if (NULL != prepare_subs)
+		if (urb->start_frame == prepare_subs->urb[0]->start_frame) {
+			usX2Y_subs_startup_finish(usX2Y);
+			atomic_inc(&prepare_subs->state);
+			wake_up(&usX2Y->prepare_wait_queue);
+		}
 
-	switch (cmd) {
-	case SNDRV_PCM_TRIGGER_START:
-		snd_printdd("snd_usX2Y_pcm_trigger(START)\n");
-		if (subs->usX2Y->substream[SNDRV_PCM_STREAM_CAPTURE]->stalled)
-			return -EPIPE;
-		else
-			subs->running = 1;
-		break;
-	case SNDRV_PCM_TRIGGER_STOP:
-		snd_printdd("snd_usX2Y_pcm_trigger(STOP)\n");
-		subs->running = 0;
-		break;
-	default:
-		return -EINVAL;
-	}
-	return 0;
+	i_usX2Y_urb_complete(urb, regs);
 }
 
+static void usX2Y_subs_prepare(snd_usX2Y_substream_t *subs)
+{
+	snd_printdd("usX2Y_substream_prepare(%p) ep=%i urb0=%p urb1=%p\n", subs, subs->endpoint, subs->urb[0], subs->urb[1]);
+	/* reset the pointer */
+	subs->hwptr = 0;
+	subs->hwptr_done = 0;
+	subs->transfer_done = 0;
+}
 
 
 static void usX2Y_urb_release(struct urb** urb, int free_tb)
 {
 	if (*urb) {
+		usb_kill_urb(*urb);
 		if (free_tb)
 			kfree((*urb)->transfer_buffer);
 		usb_free_urb(*urb);
@@ -415,98 +392,181 @@
 	}
 }
 /*
- * release a substream
+ * release a substreams urbs
  */
 static void usX2Y_urbs_release(snd_usX2Y_substream_t *subs)
 {
 	int i;
-	snd_printdd("snd_usX2Y_urbs_release() %i\n", subs->endpoint);
-	usX2Y_urbs_wait_clear(subs);
+	snd_printdd("usX2Y_urbs_release() %i\n", subs->endpoint);
 	for (i = 0; i < NRURBS; i++)
-		usX2Y_urb_release(subs->urb + i, subs != subs->usX2Y->substream[SNDRV_PCM_STREAM_PLAYBACK]);
+		usX2Y_urb_release(subs->urb + i, subs != subs->usX2Y->subs[SNDRV_PCM_STREAM_PLAYBACK]);
 
 	if (subs->tmpbuf) {
 		kfree(subs->tmpbuf);
 		subs->tmpbuf = NULL;
 	}
 }
-
-static void usX2Y_substream_prepare(snd_usX2Y_substream_t *subs)
-{
-	snd_printdd("usX2Y_substream_prepare() ep=%i urb0=%p urb1=%p\n", subs->endpoint, subs->urb[0], subs->urb[1]);
-	/* reset the pointer */
-	subs->hwptr = 0;
-	subs->hwptr_done = 0;
-	subs->transfer_done = 0;
-}
-
-
 /*
  * initialize a substream's urbs
  */
 static int usX2Y_urbs_allocate(snd_usX2Y_substream_t *subs)
 {
 	int i;
-	int is_playback = subs == subs->usX2Y->substream[SNDRV_PCM_STREAM_PLAYBACK];
+	unsigned int pipe;
+	int is_playback = subs == subs->usX2Y->subs[SNDRV_PCM_STREAM_PLAYBACK];
 	struct usb_device *dev = subs->usX2Y->chip.dev;
+	struct usb_host_endpoint *ep;
 
-	snd_assert(!subs->prepared, return 0);
+	pipe = is_playback ? usb_sndisocpipe(dev, subs->endpoint) :
+			usb_rcvisocpipe(dev, subs->endpoint);
+	subs->maxpacksize = usb_maxpacket(dev, pipe, is_playback);
+	if (!subs->maxpacksize)
+		return -EINVAL;
 
-	if (is_playback) {	/* allocate a temporary buffer for playback */
-		subs->datapipe = usb_sndisocpipe(dev, subs->endpoint);
-		subs->maxpacksize = dev->epmaxpacketout[subs->endpoint];
+	if (is_playback && NULL == subs->tmpbuf) {	/* allocate a temporary buffer for playback */
+		subs->tmpbuf = kcalloc(nr_of_packs(), subs->maxpacksize, GFP_KERNEL);
 		if (NULL == subs->tmpbuf) {
-			subs->tmpbuf = kcalloc(NRPACKS, subs->maxpacksize, GFP_KERNEL);
-			if (NULL == subs->tmpbuf) {
-				snd_printk(KERN_ERR "cannot malloc tmpbuf\n");
-				return -ENOMEM;
-			}
+			snd_printk(KERN_ERR "cannot malloc tmpbuf\n");
+			return -ENOMEM;
 		}
-	} else {
-		subs->datapipe = usb_rcvisocpipe(dev, subs->endpoint);
-		subs->maxpacksize = dev->epmaxpacketin[subs->endpoint];
 	}
-
 	/* allocate and initialize data urbs */
 	for (i = 0; i < NRURBS; i++) {
 		struct urb** purb = subs->urb + i;
-		if (*purb)
+		if (*purb) {
+			usb_kill_urb(*purb);
 			continue;
-		*purb = usb_alloc_urb(NRPACKS, GFP_KERNEL);
+		}
+		*purb = usb_alloc_urb(nr_of_packs(), GFP_KERNEL);
 		if (NULL == *purb) {
 			usX2Y_urbs_release(subs);
 			return -ENOMEM;
 		}
 		if (!is_playback && !(*purb)->transfer_buffer) {
 			/* allocate a capture buffer per urb */
-			(*purb)->transfer_buffer = kmalloc(subs->maxpacksize*NRPACKS, GFP_KERNEL);
+			(*purb)->transfer_buffer = kmalloc(subs->maxpacksize * nr_of_packs(), GFP_KERNEL);
 			if (NULL == (*purb)->transfer_buffer) {
 				usX2Y_urbs_release(subs);
 				return -ENOMEM;
 			}
 		}
 		(*purb)->dev = dev;
-		(*purb)->pipe = subs->datapipe;
-		(*purb)->number_of_packets = NRPACKS;
+		(*purb)->pipe = pipe;
+		(*purb)->number_of_packets = nr_of_packs();
 		(*purb)->context = subs;
 		(*purb)->interval = 1;
-		(*purb)->complete = snd_usb_complete_callback(i_usX2Y_urb_complete);
+		(*purb)->complete = i_usX2Y_subs_startup;
 	}
 	return 0;
 }
 
-static void i_usX2Y_04Int(struct urb* urb, struct pt_regs *regs)
+static void usX2Y_subs_startup(snd_usX2Y_substream_t *subs)
 {
-	usX2Ydev_t*	usX2Y = urb->context;
-	
-	if (urb->status) {
-		snd_printk("snd_usX2Y_04Int() urb->status=%i\n", urb->status);
-		return;
+	usX2Ydev_t *usX2Y = subs->usX2Y;
+	usX2Y->prepare_subs = subs;
+	subs->urb[0]->start_frame = -1;
+	wmb();
+	usX2Y_urbs_set_complete(usX2Y, i_usX2Y_subs_startup);
+}
+
+static int usX2Y_urbs_start(snd_usX2Y_substream_t *subs)
+{
+	int i, err;
+	usX2Ydev_t *usX2Y = subs->usX2Y;
+
+	if ((err = usX2Y_urbs_allocate(subs)) < 0)
+		return err;
+	subs->completed_urb = NULL;
+	for (i = 0; i < 4; i++) {
+		snd_usX2Y_substream_t *subs = usX2Y->subs[i];
+		if (subs != NULL && atomic_read(&subs->state) >= state_PREPARED)
+			goto start;
 	}
-	if (0 == --usX2Y->US04->len)
-		wake_up(&usX2Y->In04WaitQueue);
+	usX2Y->wait_iso_frame = -1;
+ start:
+	{
+		usX2Y_subs_startup(subs);
+		for (i = 0; i < NRURBS; i++) {
+			struct urb *urb = subs->urb[i];
+			if (usb_pipein(urb->pipe)) {
+				unsigned long pack;
+				if (0 == i)
+					atomic_set(&subs->state, state_STARTING3);
+				urb->dev = usX2Y->chip.dev;
+				urb->transfer_flags = URB_ISO_ASAP;
+				for (pack = 0; pack < nr_of_packs(); pack++) {
+					urb->iso_frame_desc[pack].offset = subs->maxpacksize * pack;
+					urb->iso_frame_desc[pack].length = subs->maxpacksize;
+				}
+				urb->transfer_buffer_length = subs->maxpacksize * nr_of_packs(); 
+				if ((err = usb_submit_urb(urb, GFP_ATOMIC)) < 0) {
+					snd_printk (KERN_ERR "cannot submit datapipe for urb %d, err = %d\n", i, err);
+					err = -EPIPE;
+					goto cleanup;
+				} else {
+					if (0 > usX2Y->wait_iso_frame)
+						usX2Y->wait_iso_frame = urb->start_frame;
+				}
+				urb->transfer_flags = 0;
+			} else {
+				atomic_set(&subs->state, state_STARTING1);
+				break;
+			}
+		}
+		err = 0;
+		wait_event(usX2Y->prepare_wait_queue, NULL == usX2Y->prepare_subs);
+		if (atomic_read(&subs->state) != state_PREPARED) {
+			err = -EPIPE;
+		}
+
+	cleanup:
+		if (err) {
+			usX2Y_subs_startup_finish(usX2Y);
+			usX2Y_clients_stop(usX2Y);		// something is completely wroong > stop evrything
+		}
+	}
+	return err;
+}
+
+/*
+ * return the current pcm pointer.  just return the hwptr_done value.
+ */
+static snd_pcm_uframes_t snd_usX2Y_pcm_pointer(snd_pcm_substream_t *substream)
+{
+	snd_usX2Y_substream_t *subs = (snd_usX2Y_substream_t *)substream->runtime->private_data;
+	return subs->hwptr_done;
 }
 /*
+ * start/stop substream
+ */
+static int snd_usX2Y_pcm_trigger(snd_pcm_substream_t *substream, int cmd)
+{
+	snd_usX2Y_substream_t *subs = (snd_usX2Y_substream_t *)substream->runtime->private_data;
+
+	switch (cmd) {
+	case SNDRV_PCM_TRIGGER_START:
+		snd_printdd("snd_usX2Y_pcm_trigger(START)\n");
+		if (atomic_read(&subs->state) == state_PREPARED &&
+		    atomic_read(&subs->usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE]->state) >= state_PREPARED) {
+			atomic_set(&subs->state, state_PRERUNNING);
+		} else {
+			snd_printdd("\n");
+			return -EPIPE;
+		}
+		break;
+	case SNDRV_PCM_TRIGGER_STOP:
+		snd_printdd("snd_usX2Y_pcm_trigger(STOP)\n");
+		if (atomic_read(&subs->state) >= state_PRERUNNING)
+			atomic_set(&subs->state, state_PREPARED);
+		break;
+	default:
+		return -EINVAL;
+	}
+	return 0;
+}
+
+
+/*
  * allocate a buffer, setup samplerate
  *
  * so far we use a physically linear buffer although packetize transfer
@@ -592,76 +652,74 @@
 };
 #define NOOF_SETRATE_URBS ARRAY_SIZE(SetRate48000)
 
+static void i_usX2Y_04Int(struct urb* urb, struct pt_regs *regs)
+{
+	usX2Ydev_t*	usX2Y = urb->context;
+	
+	if (urb->status) {
+		snd_printk("snd_usX2Y_04Int() urb->status=%i\n", urb->status);
+	}
+	if (0 == --usX2Y->US04->len)
+		wake_up(&usX2Y->In04WaitQueue);
+}
+
 static int usX2Y_rate_set(usX2Ydev_t *usX2Y, int rate)
 {
 	int			err = 0, i;
 	snd_usX2Y_urbSeq_t	*us = NULL;
 	int			*usbdata = NULL;
-	DECLARE_WAITQUEUE(wait, current);
 	struct s_c2		*ra = rate == 48000 ? SetRate48000 : SetRate44100;
 
 	if (usX2Y->rate != rate) {
-		do {
-			us = kmalloc(sizeof(*us) + sizeof(struct urb*) * NOOF_SETRATE_URBS, GFP_KERNEL);
-			if (NULL == us) {
-				err = -ENOMEM;
-				break;
-			}
-			memset(us, 0, sizeof(*us) + sizeof(struct urb*) * NOOF_SETRATE_URBS); 
-			usbdata = kmalloc(sizeof(int)*NOOF_SETRATE_URBS, GFP_KERNEL);
-			if (NULL == usbdata) {
+		us = kmalloc(sizeof(*us) + sizeof(struct urb*) * NOOF_SETRATE_URBS, GFP_KERNEL);
+		if (NULL == us) {
+			err = -ENOMEM;
+			goto cleanup;
+		}
+		memset(us, 0, sizeof(*us) + sizeof(struct urb*) * NOOF_SETRATE_URBS); 
+		usbdata = kmalloc(sizeof(int)*NOOF_SETRATE_URBS, GFP_KERNEL);
+		if (NULL == usbdata) {
+			err = -ENOMEM;
+			goto cleanup;
+		}
+		for (i = 0; i < NOOF_SETRATE_URBS; ++i) {
+			if (NULL == (us->urb[i] = usb_alloc_urb(0, GFP_KERNEL))) {
 				err = -ENOMEM;
-				break;
+				goto cleanup;
 			}
-			for (i = 0; i < NOOF_SETRATE_URBS; ++i) {
-				if (NULL == (us->urb[i] = usb_alloc_urb(0, GFP_KERNEL))) {
-					err = -ENOMEM;
-					break;
-				}
-				((char*)(usbdata + i))[0] = ra[i].c1;
-				((char*)(usbdata + i))[1] = ra[i].c2;
-				usb_fill_bulk_urb(us->urb[i], usX2Y->chip.dev, usb_sndbulkpipe(usX2Y->chip.dev, 4),
-						  usbdata + i, 2, i_usX2Y_04Int, usX2Y);
+			((char*)(usbdata + i))[0] = ra[i].c1;
+			((char*)(usbdata + i))[1] = ra[i].c2;
+			usb_fill_bulk_urb(us->urb[i], usX2Y->chip.dev, usb_sndbulkpipe(usX2Y->chip.dev, 4),
+					  usbdata + i, 2, i_usX2Y_04Int, usX2Y);
 #ifdef OLD_USB
-				us->urb[i]->transfer_flags = USB_QUEUE_BULK;
+			us->urb[i]->transfer_flags = USB_QUEUE_BULK;
 #endif
-			}
-			if (err)
-				break;
-
-			add_wait_queue(&usX2Y->In04WaitQueue, &wait);
-			set_current_state(TASK_INTERRUPTIBLE);
-			us->submitted =	0;
-			us->len =	NOOF_SETRATE_URBS;
-			usX2Y->US04 =	us;
-		
-			do {
-				signed long	timeout = schedule_timeout(HZ/2);
-                	
-				if (signal_pending(current)) {
-					err = -ERESTARTSYS;
-					break;
-				}
-				if (0 == timeout) {
-					err = -ENODEV;
-					break;
-				}
-				usX2Y->rate = rate;
-				usX2Y->refframes = rate == 48000 ? 47 : 44;
-			} while (0);
-		
-			remove_wait_queue(&usX2Y->In04WaitQueue, &wait);
-		} while (0);
-
+		}
+		us->submitted =	0;
+		us->len =	NOOF_SETRATE_URBS;
+		usX2Y->US04 =	us;
+		wait_event_timeout(usX2Y->In04WaitQueue, 0 == us->len, HZ);
+		usX2Y->US04 =	NULL;
+		if (us->len)
+			err = -ENODEV;
+	cleanup:
 		if (us) {
 			us->submitted =	2*NOOF_SETRATE_URBS;
 			for (i = 0; i < NOOF_SETRATE_URBS; ++i) {
-				usb_kill_urb(us->urb[i]);
-				usb_free_urb(us->urb[i]);
+				struct urb *urb = us->urb[i];
+				if (urb->status) {
+					if (!err)
+						err = -ENODEV;
+					usb_kill_urb(urb);
+				}
+				usb_free_urb(urb);
 			}
 			usX2Y->US04 = NULL;
 			kfree(usbdata);
 			kfree(us);
+			if (!err) {
+				usX2Y->rate = rate;
+			}
 		}
 	}
 
@@ -745,27 +803,28 @@
 {
 	snd_pcm_runtime_t *runtime = substream->runtime;
 	snd_usX2Y_substream_t *subs = (snd_usX2Y_substream_t *)runtime->private_data;
+	down(&subs->usX2Y->prepare_mutex);
 	snd_printdd("snd_usX2Y_hw_free(%p)\n", substream);
 
 	if (SNDRV_PCM_STREAM_PLAYBACK == substream->stream) {
-		snd_usX2Y_substream_t *cap_subs = subs->usX2Y->substream[SNDRV_PCM_STREAM_CAPTURE];
-		subs->prepared = 0;
+		snd_usX2Y_substream_t *cap_subs = subs->usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE];
+		atomic_set(&subs->state, state_STOPPED);
 		usX2Y_urbs_release(subs);
 		if (!cap_subs->pcm_substream ||
 		    !cap_subs->pcm_substream->runtime ||
 		    !cap_subs->pcm_substream->runtime->status ||
 		    cap_subs->pcm_substream->runtime->status->state < SNDRV_PCM_STATE_PREPARED) {
-			cap_subs->prepared = 0;
+			atomic_set(&cap_subs->state, state_STOPPED);
 			usX2Y_urbs_release(cap_subs);
 		}
 	} else {
-		snd_usX2Y_substream_t *playback_subs = subs->usX2Y->substream[SNDRV_PCM_STREAM_PLAYBACK];
-		if (!playback_subs->prepared) {
-			subs->prepared = 0;
+		snd_usX2Y_substream_t *playback_subs = subs->usX2Y->subs[SNDRV_PCM_STREAM_PLAYBACK];
+		if (atomic_read(&playback_subs->state) < state_PREPARED) {
+			atomic_set(&subs->state, state_STOPPED);
 			usX2Y_urbs_release(subs);
 		}
 	}
-
+	up(&subs->usX2Y->prepare_mutex);
 	return snd_pcm_lib_free_pages(substream);
 }
 /*
@@ -777,71 +836,32 @@
 {
 	snd_pcm_runtime_t *runtime = substream->runtime;
 	snd_usX2Y_substream_t *subs = (snd_usX2Y_substream_t *)runtime->private_data;
-	snd_usX2Y_substream_t *capsubs = subs->usX2Y->substream[SNDRV_PCM_STREAM_CAPTURE];
+	usX2Ydev_t *usX2Y = subs->usX2Y;
+	snd_usX2Y_substream_t *capsubs = subs->usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE];
 	int err = 0;
 	snd_printdd("snd_usX2Y_pcm_prepare(%p)\n", substream);
 
+	down(&usX2Y->prepare_mutex);
+	usX2Y_subs_prepare(subs);
 // Start hardware streams
 // SyncStream first....
-	if (! capsubs->prepared) {
-		if (subs->usX2Y->format != runtime->format)
-			if ((err = usX2Y_format_set(subs->usX2Y, runtime->format)) < 0)
-				return err;
-		if (subs->usX2Y->rate != runtime->rate)
-			if ((err = usX2Y_rate_set(subs->usX2Y, runtime->rate)) < 0)
-				return err;
-		snd_printdd("starting capture pipe for playpipe\n");
-		usX2Y_urbs_allocate(capsubs);
-		capsubs->completed_urb = NULL;
-		{
-			DECLARE_WAITQUEUE(wait, current);
-			add_wait_queue(&capsubs->wait_queue, &wait);
-			if (0 <= (err = usX2Y_urbs_capt_start(capsubs))) {
-				signed long timeout;
-				set_current_state(TASK_INTERRUPTIBLE);
-				timeout = schedule_timeout(HZ/4);
-				if (signal_pending(current))
-					err = -ERESTARTSYS;
-				else {
-					snd_printdd("%li\n", HZ/4 - timeout);
-					if (0 == timeout)
-						err = -EPIPE;
-				}
-			}
-			remove_wait_queue(&capsubs->wait_queue, &wait);
-			if (0 > err)
-				return err;
-		}
+	if (atomic_read(&capsubs->state) < state_PREPARED) {
+		if (usX2Y->format != runtime->format)
+			if ((err = usX2Y_format_set(usX2Y, runtime->format)) < 0)
+				goto up_prepare_mutex;
+		if (usX2Y->rate != runtime->rate)
+			if ((err = usX2Y_rate_set(usX2Y, runtime->rate)) < 0)
+				goto up_prepare_mutex;
+		snd_printdd("starting capture pipe for %s\n", subs == capsubs ? "self" : "playpipe");
+		if (0 > (err = usX2Y_urbs_start(capsubs)))
+			goto up_prepare_mutex;
 	}
 
-	if (subs != capsubs) {
-		int u;
-		if (!subs->prepared) {
-			if ((err = usX2Y_urbs_allocate(subs)) < 0)
-				return err;
-			subs->prepared = 1;
-		}
-		while (subs->submitted_urbs)
-			for (u = 0; u < NRURBS; u++) {
-				snd_printdd("%i\n", subs->urb[u]->status);
-				while(subs->urb[u]->status  ||  NULL != subs->urb[u]->hcpriv) {
-					signed long timeout;
-					snd_printdd("ep=%i waiting for urb=%p status=%i hcpriv=%p\n",
-						    subs->endpoint, subs->urb[u],
-						    subs->urb[u]->status, subs->urb[u]->hcpriv);
-					set_current_state(TASK_INTERRUPTIBLE);
-					timeout = schedule_timeout(HZ/10);
-					if (signal_pending(current)) {
-						return -ERESTARTSYS;
-					}
-				}
-			}
-		subs->completed_urb = NULL;
-		subs->next_urb_complete = -1;
-		subs->stalled = 0;
-	}
+	if (subs != capsubs && atomic_read(&subs->state) < state_PREPARED)
+		err = usX2Y_urbs_start(subs);
 
-	usX2Y_substream_prepare(subs);
+ up_prepare_mutex:
+	up(&usX2Y->prepare_mutex);
 	return err;
 }
 
@@ -872,6 +892,9 @@
 					 snd_pcm_substream_chip(substream))[substream->stream];
 	snd_pcm_runtime_t	*runtime = substream->runtime;
 
+	if (subs->usX2Y->chip_status & USX2Y_STAT_CHIP_MMAP_PCM_URBS)
+		return -EBUSY;
+
 	runtime->hw = snd_usX2Y_2c;
 	runtime->private_data = subs;
 	subs->pcm_substream = substream;
@@ -933,7 +956,7 @@
 	snd_pcm_t *pcm;
 	int err, i;
 	snd_usX2Y_substream_t **usX2Y_substream =
-		usX2Y(card)->substream + 2 * usX2Y(card)->chip.pcm_devs;
+		usX2Y(card)->subs + 2 * usX2Y(card)->chip.pcm_devs;
 
 	for (i = playback_endpoint ? SNDRV_PCM_STREAM_PLAYBACK : SNDRV_PCM_STREAM_CAPTURE;
 	     i <= SNDRV_PCM_STREAM_CAPTURE; ++i) {
@@ -942,7 +965,6 @@
 			snd_printk(KERN_ERR "cannot malloc\n");
 			return -ENOMEM;
 		}
-		init_waitqueue_head(&usX2Y_substream[i]->wait_queue);
 		usX2Y_substream[i]->usX2Y = usX2Y(card);
 	}
 
@@ -986,40 +1008,20 @@
 }
 
 /*
- * free the chip instance
- *
- * here we have to do not much, since pcm and controls are already freed
- *
- */
-static int snd_usX2Y_device_dev_free(snd_device_t *device)
-{
-	return 0;
-}
-
-
-/*
  * create a chip instance and set its names.
  */
 int usX2Y_audio_create(snd_card_t* card)
 {
 	int err = 0;
-	static snd_device_ops_t ops = {
-		.dev_free = snd_usX2Y_device_dev_free,
-	};
 	
 	INIT_LIST_HEAD(&usX2Y(card)->chip.pcm_list);
 
-	if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, usX2Y(card), &ops)) < 0) {
-//		snd_usX2Y_audio_free(usX2Y(card));
-		return err;
-	}
-
 	if (0 > (err = usX2Y_audio_stream_new(card, 0xA, 0x8)))
 		return err;
-	if (usX2Y(card)->chip.dev->descriptor.idProduct == USB_ID_US428)
+	if (le16_to_cpu(usX2Y(card)->chip.dev->descriptor.idProduct) == USB_ID_US428)
 	     if (0 > (err = usX2Y_audio_stream_new(card, 0, 0xA)))
 		     return err;
-	if (usX2Y(card)->chip.dev->descriptor.idProduct != USB_ID_US122)
+	if (le16_to_cpu(usX2Y(card)->chip.dev->descriptor.idProduct) != USB_ID_US122)
 		err = usX2Y_rate_set(usX2Y(card), 44100);	// Lets us428 recognize output-volume settings, disturbs us122.
 	return err;
 }
diff -Nru a/sound/usb/usx2y/usx2y.h b/sound/usb/usx2y/usx2y.h
--- a/sound/usb/usx2y/usx2y.h	2005-01-10 20:11:22 -08:00
+++ b/sound/usb/usx2y/usx2y.h	2005-01-10 20:11:22 -08:00
@@ -27,6 +27,7 @@
 
 /* hwdep id string */
 #define SND_USX2Y_LOADER_ID		"USX2Y Loader"
+#define SND_USX2Y_USBPCM_ID		"USX2Y USBPCM"
 
 /* hardware type */
 enum {
@@ -42,8 +43,9 @@
 
 /* chip status */
 enum {
-	USX2Y_STAT_CHIP_INIT	= (1 << 0),	/* all operational */
-	USX2Y_STAT_CHIP_HUP	= (1 << 31),	/* all operational */
+	USX2Y_STAT_CHIP_INIT	=	(1 << 0),	/* all operational */
+	USX2Y_STAT_CHIP_MMAP_PCM_URBS = (1 << 1),	/* pcm transport over mmaped urbs */
+	USX2Y_STAT_CHIP_HUP	=	(1 << 31),	/* all operational */
 };
 
 #endif /* __SOUND_USX2Y_COMMON_H */
diff -Nru a/sound/usb/usx2y/usx2yhwdeppcm.c b/sound/usb/usx2y/usx2yhwdeppcm.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/sound/usb/usx2y/usx2yhwdeppcm.c	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,807 @@
+/*
+ *   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
+ */
+
+/* USX2Y "rawusb" aka hwdep_pcm implementation
+
+ Its usb's unableness to atomically handle power of 2 period sized data chuncs
+ at standard samplerates,
+ what led to this part of the usx2y module: 
+ It provides the alsa kernel half of the usx2y-alsa-jack driver pair.
+ The pair uses a hardware dependant alsa-device for mmaped pcm transport.
+ Advantage achieved:
+         The usb_hc moves pcm data from/into memory via DMA.
+         That memory is mmaped by jack's usx2y driver.
+         Jack's usx2y driver is the first/last to read/write pcm data.
+         Read/write is a combination of power of 2 period shaping and
+         float/int conversation.
+         Compared to mainline alsa/jack we leave out power of 2 period shaping inside
+         snd-usb-usx2y which needs memcpy() and additional buffers.
+         As a side effect possible unwanted pcm-data coruption resulting of
+         standard alsa's snd-usb-usx2y period shaping scheme falls away.
+         Result is sane jack operation at buffering schemes down to 128frames,
+         2 periods.
+         plain usx2y alsa mode is able to achieve 64frames, 4periods, but only at the
+         cost of easier triggered i.e. aeolus xruns (128 or 256frames,
+         2periods works but is useless cause of crackling).
+ 
+ This is a first "proof of concept" implementation.
+ Later, funcionalities should migrate to more apropriate places:
+ Userland:
+ - The jackd could mmap its float-pcm buffers directly from alsa-lib.
+ - alsa-lib could provide power of 2 period sized shaping combined with int/float
+   conversation.
+   Currently the usx2y jack driver provides above 2 services.
+ Kernel:
+ - rawusb dma pcm buffer transport should go to snd-usb-lib, so also snd-usb-audio
+   devices can use it.
+   Currently rawusb dma pcm buffer transport (this file) is only available to snd-usb-usx2y. 
+*/
+
+#include "usbusx2yaudio.c"
+
+#if defined(USX2Y_NRPACKS_VARIABLE) || (!defined(USX2Y_NRPACKS_VARIABLE) &&  USX2Y_NRPACKS == 1)
+
+#include <sound/hwdep.h>
+
+
+static int usX2Y_usbpcm_urb_capt_retire(snd_usX2Y_substream_t *subs)
+{
+	struct urb	*urb = subs->completed_urb;
+	snd_pcm_runtime_t *runtime = subs->pcm_substream->runtime;
+	int 		i, lens = 0, hwptr_done = subs->hwptr_done;
+	usX2Ydev_t	*usX2Y = subs->usX2Y;
+	if (0 > usX2Y->hwdep_pcm_shm->capture_iso_start) { //FIXME
+		int head = usX2Y->hwdep_pcm_shm->captured_iso_head + 1;
+		if (head >= ARRAY_SIZE(usX2Y->hwdep_pcm_shm->captured_iso))
+			head = 0;
+		usX2Y->hwdep_pcm_shm->capture_iso_start = head;
+		snd_printdd("cap start %i\n", head);
+	}
+	for (i = 0; i < nr_of_packs(); i++) {
+		if (urb->iso_frame_desc[i].status) { /* active? hmm, skip this */
+			snd_printk("activ frame status %i. Most propably some hardware problem.\n", urb->iso_frame_desc[i].status);
+			return urb->iso_frame_desc[i].status;
+		}
+		lens += urb->iso_frame_desc[i].actual_length / usX2Y->stride;
+	}
+	if ((hwptr_done += lens) >= runtime->buffer_size)
+		hwptr_done -= runtime->buffer_size;
+	subs->hwptr_done = hwptr_done;
+	subs->transfer_done += lens;
+	/* update the pointer, call callback if necessary */
+	if (subs->transfer_done >= runtime->period_size) {
+		subs->transfer_done -= runtime->period_size;
+		snd_pcm_period_elapsed(subs->pcm_substream);
+	}
+	return 0;
+}
+
+static inline int usX2Y_iso_frames_per_buffer(snd_pcm_runtime_t *runtime, usX2Ydev_t * usX2Y)
+{
+	return (runtime->buffer_size * 1000) / usX2Y->rate + 1;	//FIXME: so far only correct period_size == 2^x ?
+}
+
+/*
+ * prepare urb for playback data pipe
+ *
+ * we copy the data directly from the pcm buffer.
+ * the current position to be copied is held in hwptr field.
+ * since a urb can handle only a single linear buffer, if the total
+ * transferred area overflows the buffer boundary, we cannot send
+ * it directly from the buffer.  thus the data is once copied to
+ * a temporary buffer and urb points to that.
+ */
+static int usX2Y_hwdep_urb_play_prepare(snd_usX2Y_substream_t *subs,
+				  struct urb *urb)
+{
+	int count, counts, pack;
+	usX2Ydev_t *usX2Y = subs->usX2Y;
+	struct snd_usX2Y_hwdep_pcm_shm *shm = usX2Y->hwdep_pcm_shm;
+	snd_pcm_runtime_t *runtime = subs->pcm_substream->runtime;
+
+	if (0 > shm->playback_iso_start) {
+		shm->playback_iso_start = shm->captured_iso_head -
+			usX2Y_iso_frames_per_buffer(runtime, usX2Y);
+		if (0 > shm->playback_iso_start)
+			shm->playback_iso_start += ARRAY_SIZE(shm->captured_iso);
+		shm->playback_iso_head = shm->playback_iso_start;
+	}
+
+	count = 0;
+	for (pack = 0; pack < nr_of_packs(); pack++) {
+		/* calculate the size of a packet */
+		counts = shm->captured_iso[shm->playback_iso_head].length / usX2Y->stride;
+		if (counts < 43 || counts > 50) {
+			snd_printk("should not be here with counts=%i\n", counts);
+			return -EPIPE;
+		}
+		/* set up descriptor */
+		urb->iso_frame_desc[pack].offset = shm->captured_iso[shm->playback_iso_head].offset;
+		urb->iso_frame_desc[pack].length = shm->captured_iso[shm->playback_iso_head].length;
+		if (atomic_read(&subs->state) != state_RUNNING)
+			memset((char *)urb->transfer_buffer + urb->iso_frame_desc[pack].offset, 0,
+			       urb->iso_frame_desc[pack].length);
+		if (++shm->playback_iso_head >= ARRAY_SIZE(shm->captured_iso))
+			shm->playback_iso_head = 0;
+		count += counts;
+	}
+	urb->transfer_buffer_length = count * usX2Y->stride;
+	return 0;
+}
+
+
+static inline void usX2Y_usbpcm_urb_capt_iso_advance(snd_usX2Y_substream_t *subs, struct urb *urb)
+{
+	int pack;
+	for (pack = 0; pack < nr_of_packs(); ++pack) {
+		struct usb_iso_packet_descriptor *desc = urb->iso_frame_desc + pack;
+		if (NULL != subs) {
+			snd_usX2Y_hwdep_pcm_shm_t *shm = subs->usX2Y->hwdep_pcm_shm;
+			int head = shm->captured_iso_head + 1;
+			if (head >= ARRAY_SIZE(shm->captured_iso))
+				head = 0;
+			shm->captured_iso[head].frame = urb->start_frame + pack;
+			shm->captured_iso[head].offset = desc->offset;
+			shm->captured_iso[head].length = desc->actual_length;
+			shm->captured_iso_head = head;
+			shm->captured_iso_frames++;
+		}
+		if ((desc->offset += desc->length * NRURBS*nr_of_packs()) +
+		    desc->length >= SSS)
+			desc->offset -= (SSS - desc->length);
+	}
+}
+
+static inline int usX2Y_usbpcm_usbframe_complete(snd_usX2Y_substream_t *capsubs,
+					   snd_usX2Y_substream_t *capsubs2,
+					   snd_usX2Y_substream_t *playbacksubs, int frame)
+{
+	int err, state;
+	struct urb *urb = playbacksubs->completed_urb;
+
+	state = atomic_read(&playbacksubs->state);
+	if (NULL != urb) {
+		if (state == state_RUNNING)
+			usX2Y_urb_play_retire(playbacksubs, urb);
+		else
+			if (state >= state_PRERUNNING) {
+				atomic_inc(&playbacksubs->state);
+			}
+	} else {
+		switch (state) {
+		case state_STARTING1:
+			urb = playbacksubs->urb[0];
+			atomic_inc(&playbacksubs->state);
+			break;
+		case state_STARTING2:
+			urb = playbacksubs->urb[1];
+			atomic_inc(&playbacksubs->state);
+			break;
+		}
+	}
+	if (urb) {
+		if ((err = usX2Y_hwdep_urb_play_prepare(playbacksubs, urb)) ||
+		    (err = usX2Y_urb_submit(playbacksubs, urb, frame))) {
+			return err;
+		}
+	}
+	
+	playbacksubs->completed_urb = NULL;
+
+	state = atomic_read(&capsubs->state);
+	if (state >= state_PREPARED) {
+		if (state == state_RUNNING) {
+			if ((err = usX2Y_usbpcm_urb_capt_retire(capsubs)))
+				return err;
+		} else {
+			if (state >= state_PRERUNNING)
+				atomic_inc(&capsubs->state);
+		}
+		usX2Y_usbpcm_urb_capt_iso_advance(capsubs, capsubs->completed_urb);
+		if (NULL != capsubs2)
+			usX2Y_usbpcm_urb_capt_iso_advance(NULL, capsubs2->completed_urb);
+		if ((err = usX2Y_urb_submit(capsubs, capsubs->completed_urb, frame)))
+			return err;
+		if (NULL != capsubs2)
+			if ((err = usX2Y_urb_submit(capsubs2, capsubs2->completed_urb, frame)))
+				return err;
+	}
+	capsubs->completed_urb = NULL;
+	if (NULL != capsubs2)
+		capsubs2->completed_urb = NULL;
+	return 0;
+}
+
+
+static void i_usX2Y_usbpcm_urb_complete(struct urb *urb, struct pt_regs *regs)
+{
+	snd_usX2Y_substream_t *subs = (snd_usX2Y_substream_t*)urb->context;
+	usX2Ydev_t *usX2Y = subs->usX2Y;
+	snd_usX2Y_substream_t *capsubs, *capsubs2, *playbacksubs;
+
+	if (unlikely(atomic_read(&subs->state) < state_PREPARED)) {
+		snd_printdd("hcd_frame=%i ep=%i%s status=%i start_frame=%i\n", usb_get_current_frame_number(usX2Y->chip.dev), subs->endpoint, usb_pipein(urb->pipe) ? "in" : "out", urb->status, urb->start_frame);
+		return;
+	}
+	if (unlikely(urb->status)) {
+		usX2Y_error_urb_status(usX2Y, subs, urb);
+		return;
+	}
+	if (likely((0xFFFF & urb->start_frame) == usX2Y->wait_iso_frame))
+		subs->completed_urb = urb;
+	else {
+		usX2Y_error_sequence(usX2Y, subs, urb);
+		return;
+	}
+
+	capsubs = usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE];
+	capsubs2 = usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE + 2];
+	playbacksubs = usX2Y->subs[SNDRV_PCM_STREAM_PLAYBACK];
+	if (capsubs->completed_urb && atomic_read(&capsubs->state) >= state_PREPARED &&
+	    (NULL == capsubs2 || capsubs2->completed_urb) &&
+	    (playbacksubs->completed_urb || atomic_read(&playbacksubs->state) < state_PREPARED)) {
+		if (!usX2Y_usbpcm_usbframe_complete(capsubs, capsubs2, playbacksubs, urb->start_frame)) {
+			if (nr_of_packs() <= urb->start_frame &&
+			    urb->start_frame <= (2 * nr_of_packs() - 1))	// uhci and ohci
+				usX2Y->wait_iso_frame = urb->start_frame - nr_of_packs();
+			else
+				usX2Y->wait_iso_frame +=  nr_of_packs();
+		} else {
+			snd_printdd("\n");
+			usX2Y_clients_stop(usX2Y);
+		}
+	}
+}
+
+
+static void usX2Y_hwdep_urb_release(struct urb** urb)
+{
+	usb_kill_urb(*urb);
+	usb_free_urb(*urb);
+	*urb = NULL;
+}
+
+/*
+ * release a substream
+ */
+static void usX2Y_usbpcm_urbs_release(snd_usX2Y_substream_t *subs)
+{
+	int i;
+	snd_printdd("snd_usX2Y_urbs_release() %i\n", subs->endpoint);
+	for (i = 0; i < NRURBS; i++)
+		usX2Y_hwdep_urb_release(subs->urb + i);
+}
+
+static void usX2Y_usbpcm_subs_startup_finish(usX2Ydev_t * usX2Y)
+{
+	usX2Y_urbs_set_complete(usX2Y, i_usX2Y_usbpcm_urb_complete);
+	usX2Y->prepare_subs = NULL;
+}
+
+static void i_usX2Y_usbpcm_subs_startup(struct urb *urb, struct pt_regs *regs)
+{
+	snd_usX2Y_substream_t *subs = (snd_usX2Y_substream_t*)urb->context;
+	usX2Ydev_t *usX2Y = subs->usX2Y;
+	snd_usX2Y_substream_t *prepare_subs = usX2Y->prepare_subs;
+	if (NULL != prepare_subs &&
+	    urb->start_frame == prepare_subs->urb[0]->start_frame) {
+		atomic_inc(&prepare_subs->state);
+		if (prepare_subs == usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE]) {
+			snd_usX2Y_substream_t *cap_subs2 = usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE + 2];
+			if (cap_subs2 != NULL)
+				atomic_inc(&cap_subs2->state);
+		}
+		usX2Y_usbpcm_subs_startup_finish(usX2Y);
+		wake_up(&usX2Y->prepare_wait_queue);
+	}
+
+	i_usX2Y_usbpcm_urb_complete(urb, regs);
+}
+
+/*
+ * initialize a substream's urbs
+ */
+static int usX2Y_usbpcm_urbs_allocate(snd_usX2Y_substream_t *subs)
+{
+	int i;
+	unsigned int pipe;
+	int is_playback = subs == subs->usX2Y->subs[SNDRV_PCM_STREAM_PLAYBACK];
+	struct usb_device *dev = subs->usX2Y->chip.dev;
+
+	pipe = is_playback ? usb_sndisocpipe(dev, subs->endpoint) :
+			usb_rcvisocpipe(dev, subs->endpoint);
+	subs->maxpacksize = usb_maxpacket(dev, pipe, is_playback);
+	if (!subs->maxpacksize)
+		return -EINVAL;
+
+	/* allocate and initialize data urbs */
+	for (i = 0; i < NRURBS; i++) {
+		struct urb** purb = subs->urb + i;
+		if (*purb) {
+			usb_kill_urb(*purb);
+			continue;
+		}
+		*purb = usb_alloc_urb(nr_of_packs(), GFP_KERNEL);
+		if (NULL == *purb) {
+			usX2Y_usbpcm_urbs_release(subs);
+			return -ENOMEM;
+		}
+		(*purb)->transfer_buffer = is_playback ?
+			subs->usX2Y->hwdep_pcm_shm->playback : (
+				subs->endpoint == 0x8 ?
+				subs->usX2Y->hwdep_pcm_shm->capture0x8 :
+				subs->usX2Y->hwdep_pcm_shm->capture0xA);
+
+		(*purb)->dev = dev;
+		(*purb)->pipe = pipe;
+		(*purb)->number_of_packets = nr_of_packs();
+		(*purb)->context = subs;
+		(*purb)->interval = 1;
+		(*purb)->complete = i_usX2Y_usbpcm_subs_startup;
+	}
+	return 0;
+}
+
+/*
+ * free the buffer
+ */
+static int snd_usX2Y_usbpcm_hw_free(snd_pcm_substream_t *substream)
+{
+	snd_pcm_runtime_t *runtime = substream->runtime;
+	snd_usX2Y_substream_t *subs = (snd_usX2Y_substream_t *)runtime->private_data,
+		*cap_subs2 = subs->usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE + 2];
+	down(&subs->usX2Y->prepare_mutex);
+	snd_printdd("snd_usX2Y_usbpcm_hw_free(%p)\n", substream);
+
+	if (SNDRV_PCM_STREAM_PLAYBACK == substream->stream) {
+		snd_usX2Y_substream_t *cap_subs = subs->usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE];
+		atomic_set(&subs->state, state_STOPPED);
+		usX2Y_usbpcm_urbs_release(subs);
+		if (!cap_subs->pcm_substream ||
+		    !cap_subs->pcm_substream->runtime ||
+		    !cap_subs->pcm_substream->runtime->status ||
+		    cap_subs->pcm_substream->runtime->status->state < SNDRV_PCM_STATE_PREPARED) {
+			atomic_set(&cap_subs->state, state_STOPPED);
+			if (NULL != cap_subs2)
+				atomic_set(&cap_subs2->state, state_STOPPED);
+			usX2Y_usbpcm_urbs_release(cap_subs);
+			if (NULL != cap_subs2)
+				usX2Y_usbpcm_urbs_release(cap_subs2);
+		}
+	} else {
+		snd_usX2Y_substream_t *playback_subs = subs->usX2Y->subs[SNDRV_PCM_STREAM_PLAYBACK];
+		if (atomic_read(&playback_subs->state) < state_PREPARED) {
+			atomic_set(&subs->state, state_STOPPED);
+			if (NULL != cap_subs2)
+				atomic_set(&cap_subs2->state, state_STOPPED);
+			usX2Y_usbpcm_urbs_release(subs);
+			if (NULL != cap_subs2)
+				usX2Y_usbpcm_urbs_release(cap_subs2);
+		}
+	}
+	up(&subs->usX2Y->prepare_mutex);
+	return snd_pcm_lib_free_pages(substream);
+}
+
+static void usX2Y_usbpcm_subs_startup(snd_usX2Y_substream_t *subs)
+{
+	usX2Ydev_t * usX2Y = subs->usX2Y;
+	usX2Y->prepare_subs = subs;
+	subs->urb[0]->start_frame = -1;
+	smp_wmb();	// Make shure above modifications are seen by i_usX2Y_subs_startup()
+	usX2Y_urbs_set_complete(usX2Y, i_usX2Y_usbpcm_subs_startup);
+}
+
+static int usX2Y_usbpcm_urbs_start(snd_usX2Y_substream_t *subs)
+{
+	int	p, u, err,
+		stream = subs->pcm_substream->stream;
+	usX2Ydev_t *usX2Y = subs->usX2Y;
+
+	if (SNDRV_PCM_STREAM_CAPTURE == stream) {
+		usX2Y->hwdep_pcm_shm->captured_iso_head = -1;
+		usX2Y->hwdep_pcm_shm->captured_iso_frames = 0;
+	}
+
+	for (p = 0; 3 >= (stream + p); p += 2) {
+		snd_usX2Y_substream_t *subs = usX2Y->subs[stream + p];
+		if (subs != NULL) {
+			if ((err = usX2Y_usbpcm_urbs_allocate(subs)) < 0)
+				return err;
+			subs->completed_urb = NULL;
+		}
+	}
+
+	for (p = 0; p < 4; p++) {
+		snd_usX2Y_substream_t *subs = usX2Y->subs[p];
+		if (subs != NULL && atomic_read(&subs->state) >= state_PREPARED)
+			goto start;
+	}
+	usX2Y->wait_iso_frame = -1;
+
+ start:
+	usX2Y_usbpcm_subs_startup(subs);
+	for (u = 0; u < NRURBS; u++) {
+		for (p = 0; 3 >= (stream + p); p += 2) {
+			snd_usX2Y_substream_t *subs = usX2Y->subs[stream + p];
+			if (subs != NULL) {
+				struct urb *urb = subs->urb[u];
+				if (usb_pipein(urb->pipe)) {
+					unsigned long pack;
+					if (0 == u)
+						atomic_set(&subs->state, state_STARTING3);
+					urb->dev = usX2Y->chip.dev;
+					urb->transfer_flags = URB_ISO_ASAP;
+					for (pack = 0; pack < nr_of_packs(); pack++) {
+						urb->iso_frame_desc[pack].offset = subs->maxpacksize * (pack + u * nr_of_packs());
+						urb->iso_frame_desc[pack].length = subs->maxpacksize;
+					}
+					urb->transfer_buffer_length = subs->maxpacksize * nr_of_packs(); 
+					if ((err = usb_submit_urb(urb, GFP_KERNEL)) < 0) {
+						snd_printk (KERN_ERR "cannot usb_submit_urb() for urb %d, err = %d\n", u, err);
+						err = -EPIPE;
+						goto cleanup;
+					}  else {
+						snd_printdd("%i\n", urb->start_frame);
+						if (0 > usX2Y->wait_iso_frame)
+							usX2Y->wait_iso_frame = urb->start_frame;
+					}
+					urb->transfer_flags = 0;
+				} else {
+					atomic_set(&subs->state, state_STARTING1);
+					break;
+				}			
+			}
+		}
+	}
+	err = 0;
+	wait_event(usX2Y->prepare_wait_queue, NULL == usX2Y->prepare_subs);
+	if (atomic_read(&subs->state) != state_PREPARED)
+		err = -EPIPE;
+		
+ cleanup:
+	if (err) {
+		usX2Y_subs_startup_finish(usX2Y);	// Call it now
+		usX2Y_clients_stop(usX2Y);		// something is completely wroong > stop evrything			
+	}
+	return err;
+}
+
+/*
+ * prepare callback
+ *
+ * set format and initialize urbs
+ */
+static int snd_usX2Y_usbpcm_prepare(snd_pcm_substream_t *substream)
+{
+	snd_pcm_runtime_t *runtime = substream->runtime;
+	snd_usX2Y_substream_t *subs = (snd_usX2Y_substream_t *)runtime->private_data;
+	usX2Ydev_t *usX2Y = subs->usX2Y;
+	snd_usX2Y_substream_t *capsubs = subs->usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE];
+	int err = 0;
+	snd_printdd("snd_usX2Y_pcm_prepare(%p)\n", substream);
+
+	if (NULL == usX2Y->hwdep_pcm_shm) {
+		if (NULL == (usX2Y->hwdep_pcm_shm = snd_malloc_pages(sizeof(snd_usX2Y_hwdep_pcm_shm_t), GFP_KERNEL)))
+			return -ENOMEM;
+		memset(usX2Y->hwdep_pcm_shm, 0, sizeof(snd_usX2Y_hwdep_pcm_shm_t));
+	}
+
+	down(&usX2Y->prepare_mutex);
+	usX2Y_subs_prepare(subs);
+// Start hardware streams
+// SyncStream first....
+	if (atomic_read(&capsubs->state) < state_PREPARED) {
+		if (usX2Y->format != runtime->format)
+			if ((err = usX2Y_format_set(usX2Y, runtime->format)) < 0)
+				goto up_prepare_mutex;
+		if (usX2Y->rate != runtime->rate)
+			if ((err = usX2Y_rate_set(usX2Y, runtime->rate)) < 0)
+				goto up_prepare_mutex;
+		snd_printdd("starting capture pipe for %s\n", subs == capsubs ? "self" : "playpipe");
+		if (0 > (err = usX2Y_usbpcm_urbs_start(capsubs)))
+			goto up_prepare_mutex;
+	}
+
+	if (subs != capsubs) {
+		usX2Y->hwdep_pcm_shm->playback_iso_start = -1;
+		if (atomic_read(&subs->state) < state_PREPARED) {
+			while (usX2Y_iso_frames_per_buffer(runtime, usX2Y) > usX2Y->hwdep_pcm_shm->captured_iso_frames) {
+				signed long timeout;
+				snd_printd("Wait: iso_frames_per_buffer=%i,captured_iso_frames=%i\n", usX2Y_iso_frames_per_buffer(runtime, usX2Y), usX2Y->hwdep_pcm_shm->captured_iso_frames);
+				set_current_state(TASK_INTERRUPTIBLE);
+				timeout = schedule_timeout(HZ/100 + 1);
+				if (signal_pending(current)) {
+					err = -ERESTARTSYS;
+					goto up_prepare_mutex;
+				}
+			} 
+			if (0 > (err = usX2Y_usbpcm_urbs_start(subs)))
+				goto up_prepare_mutex;
+		}
+		snd_printd("Ready: iso_frames_per_buffer=%i,captured_iso_frames=%i\n", usX2Y_iso_frames_per_buffer(runtime, usX2Y), usX2Y->hwdep_pcm_shm->captured_iso_frames);
+	} else
+		usX2Y->hwdep_pcm_shm->capture_iso_start = -1;
+
+ up_prepare_mutex:
+	up(&usX2Y->prepare_mutex);
+	return err;
+}
+
+static snd_pcm_hardware_t snd_usX2Y_4c =
+{
+	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
+				 SNDRV_PCM_INFO_BLOCK_TRANSFER |
+				 SNDRV_PCM_INFO_MMAP_VALID),
+	.formats =                 SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_3LE,
+	.rates =                   SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000,
+	.rate_min =                44100,
+	.rate_max =                48000,
+	.channels_min =            2,
+	.channels_max =            4,
+	.buffer_bytes_max =	(2*128*1024),
+	.period_bytes_min =	64,
+	.period_bytes_max =	(128*1024),
+	.periods_min =		2,
+	.periods_max =		1024,
+	.fifo_size =              0
+};
+
+
+
+static int snd_usX2Y_usbpcm_open(snd_pcm_substream_t *substream)
+{
+	snd_usX2Y_substream_t	*subs = ((snd_usX2Y_substream_t **)
+					 snd_pcm_substream_chip(substream))[substream->stream];
+	snd_pcm_runtime_t	*runtime = substream->runtime;
+
+	if (!(subs->usX2Y->chip_status & USX2Y_STAT_CHIP_MMAP_PCM_URBS))
+		return -EBUSY;
+
+	runtime->hw = SNDRV_PCM_STREAM_PLAYBACK == substream->stream ? snd_usX2Y_2c :
+		(subs->usX2Y->subs[3] ? snd_usX2Y_4c : snd_usX2Y_2c);
+	runtime->private_data = subs;
+	subs->pcm_substream = substream;
+	snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_PERIOD_TIME, 1000, 200000);
+	return 0;
+}
+
+
+static int snd_usX2Y_usbpcm_close(snd_pcm_substream_t *substream)
+{
+	snd_pcm_runtime_t *runtime = substream->runtime;
+	snd_usX2Y_substream_t *subs = (snd_usX2Y_substream_t *)runtime->private_data;
+	int err = 0;
+	snd_printd("\n");
+	subs->pcm_substream = NULL;
+	return err;
+}
+
+
+static snd_pcm_ops_t snd_usX2Y_usbpcm_ops = 
+{
+	.open =		snd_usX2Y_usbpcm_open,
+	.close =	snd_usX2Y_usbpcm_close,
+	.ioctl =	snd_pcm_lib_ioctl,
+	.hw_params =	snd_usX2Y_pcm_hw_params,
+	.hw_free =	snd_usX2Y_usbpcm_hw_free,
+	.prepare =	snd_usX2Y_usbpcm_prepare,
+	.trigger =	snd_usX2Y_pcm_trigger,
+	.pointer =	snd_usX2Y_pcm_pointer,
+};
+
+
+static int usX2Y_pcms_lock_check(snd_card_t *card)
+{
+	struct list_head *list;
+	snd_device_t *dev;
+	snd_pcm_t *pcm;
+	int err = 0;
+	list_for_each(list, &card->devices) {
+		dev = snd_device(list);
+		if (dev->type != SNDRV_DEV_PCM)
+			continue;
+		pcm = dev->device_data;
+		down(&pcm->open_mutex);
+	}
+	list_for_each(list, &card->devices) {
+		int s;
+		dev = snd_device(list);
+		if (dev->type != SNDRV_DEV_PCM)
+			continue;
+		pcm = dev->device_data;
+		for (s = 0; s < 2; ++s) {
+			snd_pcm_substream_t *substream;
+			substream = pcm->streams[s].substream;
+			if (substream && substream->open_flag)
+				err = -EBUSY;
+		}
+	}
+	return err;
+}
+
+
+static void usX2Y_pcms_unlock(snd_card_t *card)
+{
+	struct list_head *list;
+	snd_device_t *dev;
+	snd_pcm_t *pcm;
+	list_for_each(list, &card->devices) {
+		dev = snd_device(list);
+		if (dev->type != SNDRV_DEV_PCM)
+			continue;
+		pcm = dev->device_data;
+		up(&pcm->open_mutex);
+	}
+}
+
+
+static int snd_usX2Y_hwdep_pcm_open(snd_hwdep_t *hw, struct file *file)
+{
+	// we need to be the first 
+	snd_card_t *card = hw->card;
+	int err = usX2Y_pcms_lock_check(card);
+	if (0 == err)
+		usX2Y(card)->chip_status |= USX2Y_STAT_CHIP_MMAP_PCM_URBS;
+	usX2Y_pcms_unlock(card);
+	return err;
+}
+
+
+static int snd_usX2Y_hwdep_pcm_release(snd_hwdep_t *hw, struct file *file)
+{
+	snd_card_t *card = hw->card;
+	int err = usX2Y_pcms_lock_check(card);
+	if (0 == err)
+		usX2Y(hw->card)->chip_status &= ~USX2Y_STAT_CHIP_MMAP_PCM_URBS;
+	usX2Y_pcms_unlock(card);
+	return err;
+}
+
+
+static void snd_usX2Y_hwdep_pcm_vm_open(struct vm_area_struct *area)
+{
+}
+
+
+static void snd_usX2Y_hwdep_pcm_vm_close(struct vm_area_struct *area)
+{
+}
+
+
+static struct page * snd_usX2Y_hwdep_pcm_vm_nopage(struct vm_area_struct *area, unsigned long address, int *type)
+{
+	unsigned long offset;
+	struct page *page;
+	void *vaddr;
+
+	offset = area->vm_pgoff << PAGE_SHIFT;
+	offset += address - area->vm_start;
+	snd_assert((offset % PAGE_SIZE) == 0, return NOPAGE_OOM);
+	vaddr = (char*)((usX2Ydev_t*)area->vm_private_data)->hwdep_pcm_shm + offset;
+	page = virt_to_page(vaddr);
+
+	if (type)
+		*type = VM_FAULT_MINOR;
+
+	return page;
+}
+
+
+static struct vm_operations_struct snd_usX2Y_hwdep_pcm_vm_ops = {
+	.open = snd_usX2Y_hwdep_pcm_vm_open,
+	.close = snd_usX2Y_hwdep_pcm_vm_close,
+	.nopage = snd_usX2Y_hwdep_pcm_vm_nopage,
+};
+
+
+static int snd_usX2Y_hwdep_pcm_mmap(snd_hwdep_t * hw, struct file *filp, struct vm_area_struct *area)
+{
+	unsigned long	size = (unsigned long)(area->vm_end - area->vm_start);
+	usX2Ydev_t	*usX2Y = (usX2Ydev_t*)hw->private_data;
+
+	if (!(((usX2Ydev_t*)hw->private_data)->chip_status & USX2Y_STAT_CHIP_INIT))
+		return -EBUSY;
+
+	/* if userspace tries to mmap beyond end of our buffer, fail */ 
+	if (size > PAGE_ALIGN(sizeof(snd_usX2Y_hwdep_pcm_shm_t))) {
+		snd_printd("%lu > %lu\n", size, (unsigned long)sizeof(snd_usX2Y_hwdep_pcm_shm_t)); 
+		return -EINVAL;
+	}
+
+	if (!usX2Y->hwdep_pcm_shm) {
+		return -ENODEV;
+	}
+	area->vm_ops = &snd_usX2Y_hwdep_pcm_vm_ops;
+	area->vm_flags |= VM_RESERVED;
+	snd_printd("vm_flags=0x%lX\n", area->vm_flags);
+	area->vm_private_data = hw->private_data;
+	return 0;
+}
+
+
+static void snd_usX2Y_hwdep_pcm_private_free(snd_hwdep_t *hwdep)
+{
+	usX2Ydev_t *usX2Y = (usX2Ydev_t *)hwdep->private_data;
+	if (NULL != usX2Y->hwdep_pcm_shm)
+		snd_free_pages(usX2Y->hwdep_pcm_shm, sizeof(snd_usX2Y_hwdep_pcm_shm_t));
+}
+
+
+static void snd_usX2Y_usbpcm_private_free(snd_pcm_t *pcm)
+{
+	snd_pcm_lib_preallocate_free_for_all(pcm);
+}
+
+
+int usX2Y_hwdep_pcm_new(snd_card_t* card)
+{
+	int err;
+	snd_hwdep_t *hw;
+	snd_pcm_t *pcm;
+	struct usb_device *dev = usX2Y(card)->chip.dev;
+	if (1 != nr_of_packs())
+		return 0;
+
+	if ((err = snd_hwdep_new(card, SND_USX2Y_USBPCM_ID, 1, &hw)) < 0) {
+		snd_printd("\n");
+		return err;
+	}
+	hw->iface = SNDRV_HWDEP_IFACE_USX2Y_PCM;
+	hw->private_data = usX2Y(card);
+	hw->private_free = snd_usX2Y_hwdep_pcm_private_free;
+	hw->ops.open = snd_usX2Y_hwdep_pcm_open;
+	hw->ops.release = snd_usX2Y_hwdep_pcm_release;
+	hw->ops.mmap = snd_usX2Y_hwdep_pcm_mmap;
+	hw->exclusive = 1;
+	sprintf(hw->name, "/proc/bus/usb/%03d/%03d/hwdeppcm", dev->bus->busnum, dev->devnum);
+
+	err = snd_pcm_new(card, NAME_ALLCAPS" hwdep Audio", 2, 1, 1, &pcm);
+	if (err < 0) {
+		return err;
+	}
+	snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_usX2Y_usbpcm_ops);
+	snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_usX2Y_usbpcm_ops);
+
+	pcm->private_data = usX2Y(card)->subs;
+	pcm->private_free = snd_usX2Y_usbpcm_private_free;
+	pcm->info_flags = 0;
+
+	sprintf(pcm->name, NAME_ALLCAPS" hwdep Audio");
+	if (0 > (err = snd_pcm_lib_preallocate_pages(pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream,
+						     SNDRV_DMA_TYPE_CONTINUOUS,
+						     snd_dma_continuous_data(GFP_KERNEL),
+						     64*1024, 128*1024)) ||
+	    0 > (err = snd_pcm_lib_preallocate_pages(pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream,
+	    					     SNDRV_DMA_TYPE_CONTINUOUS,
+	    					     snd_dma_continuous_data(GFP_KERNEL),
+						     64*1024, 128*1024))) {
+		snd_usX2Y_usbpcm_private_free(pcm);
+		return err;
+	}
+
+
+	return 0;
+}
+
+#else
+
+int usX2Y_hwdep_pcm_new(snd_card_t* card)
+{
+	return 0;
+}
+
+#endif
diff -Nru a/sound/usb/usx2y/usx2yhwdeppcm.h b/sound/usb/usx2y/usx2yhwdeppcm.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/sound/usb/usx2y/usx2yhwdeppcm.h	2005-01-10 20:11:24 -08:00
@@ -0,0 +1,21 @@
+#define MAXPACK 50
+#define MAXBUFFERMS 100
+#define MAXSTRIDE 3
+
+#define SSS (((MAXPACK*MAXBUFFERMS*MAXSTRIDE + 4096) / 4096) * 4096)
+struct snd_usX2Y_hwdep_pcm_shm {
+	char playback[SSS];
+	char capture0x8[SSS];
+	char capture0xA[SSS];
+	volatile int playback_iso_head;
+	int playback_iso_start;
+	struct {
+		int	frame,
+			offset,
+			length;
+	} captured_iso[128];
+	volatile int captured_iso_head;
+	volatile unsigned captured_iso_frames;
+	int capture_iso_start;
+};
+typedef struct snd_usX2Y_hwdep_pcm_shm snd_usX2Y_hwdep_pcm_shm_t;
diff -Nru a/usr/Makefile b/usr/Makefile
--- a/usr/Makefile	2005-01-10 20:11:19 -08:00
+++ b/usr/Makefile	2005-01-10 20:11:19 -08:00
@@ -5,40 +5,60 @@
 
 clean-files := initramfs_data.cpio.gz initramfs_list
 
-# If you want a different list of files in the initramfs_data.cpio
-# then you can either overwrite the cpio_list in this directory
-# or set INITRAMFS_LIST to another filename.
-INITRAMFS_LIST := $(obj)/initramfs_list
-
 # initramfs_data.o contains the initramfs_data.cpio.gz image.
 # The image is included using .incbin, a dependency which is not
 # tracked automatically.
 $(obj)/initramfs_data.o: $(obj)/initramfs_data.cpio.gz FORCE
 
-# initramfs-y are the programs which will be copied into the CPIO
-# archive. Currently, the filenames are hardcoded in gen_init_cpio,
-# but we need the information for the build as well, so it's duplicated
-# here.
-
-# Commented out for now
-# initramfs-y := $(obj)/root/hello
+ifdef CONFIG_INITRAMFS_ROOT_UID
+gen_initramfs_args += -u $(CONFIG_INITRAMFS_ROOT_UID)
+endif
+
+ifdef CONFIG_INITRAMFS_ROOT_GID
+gen_initramfs_args += -g $(CONFIG_INITRAMFS_ROOT_GID)
+endif
+
+# The $(shell echo $(CONFIG_INITRAMFS_SOURCE)) is to remove the
+# gratuitous begin and end quotes from the Kconfig string type.
+# Internal, escaped quotes in the Kconfig string will loose the
+# escape and become active quotes.
+quotefixed_initramfs_source := $(shell echo $(CONFIG_INITRAMFS_SOURCE))
 
 filechk_initramfs_list = $(CONFIG_SHELL) \
- $(srctree)/scripts/gen_initramfs_list.sh $(CONFIG_INITRAMFS_SOURCE)
-			   
+ $(srctree)/scripts/gen_initramfs_list.sh $(gen_initramfs_args) $(quotefixed_initramfs_source)
+
 $(obj)/initramfs_list: FORCE
 	$(call filechk,initramfs_list)
 
 quiet_cmd_cpio = CPIO    $@
       cmd_cpio = ./$< $(obj)/initramfs_list > $@
 
+
+# Check if the INITRAMFS_SOURCE is a cpio archive
+ifneq (,$(findstring .cpio,$(quotefixed_initramfs_source)))
+
+# INITRAMFS_SOURCE has a cpio archive - verify that it's a single file
+ifneq (1,$(words $(quotefixed_initramfs_source)))
+$(error Only a single file may be specified in CONFIG_INITRAMFS_SOURCE (="$(quotefixed_initramfs_source)") when a cpio archive is directly specified.)
+endif
+# Now use the cpio archive directly
+initramfs_data_cpio = $(quotefixed_initramfs_source)
+targets += $(quotefixed_initramfs_source)
+
+else
+
+# INITRAMFS_SOURCE is not a cpio archive - create one
 $(obj)/initramfs_data.cpio: $(obj)/gen_init_cpio \
                             $(initramfs-y) $(obj)/initramfs_list FORCE
 	$(call if_changed,cpio)
 
 targets += initramfs_data.cpio
+initramfs_data_cpio = $(obj)/initramfs_data.cpio
+
+endif
+
 
-$(obj)/initramfs_data.cpio.gz: $(obj)/initramfs_data.cpio FORCE
+$(obj)/initramfs_data.cpio.gz: $(initramfs_data_cpio) FORCE
 	$(call if_changed,gzip)
 
 targets += initramfs_data.cpio.gz
diff -Nru a/usr/gen_init_cpio.c b/usr/gen_init_cpio.c
--- a/usr/gen_init_cpio.c	2005-01-10 20:11:20 -08:00
+++ b/usr/gen_init_cpio.c	2005-01-10 20:11:20 -08:00
@@ -10,13 +10,19 @@
 #include <ctype.h>
 #include <limits.h>
 
+/*
+ * Original work by Jeff Garzik
+ *
+ * External file lists, symlink, pipe and fifo support by Thayne Harbaugh
+ */
+
 #define xstr(s) #s
 #define str(s) xstr(s)
 
 static unsigned int offset;
 static unsigned int ino = 721;
 
-struct file_type {
+struct file_handler {
 	const char *type;
 	int (*handler)(const char *line);
 };
@@ -80,7 +86,7 @@
 		0,			/* minor */
 		0,			/* rmajor */
 		0,			/* rminor */
-		(unsigned)strlen(name) + 1, /* namesize */
+		(unsigned)strlen(name)+1, /* namesize */
 		0);			/* chksum */
 	push_hdr(s);
 	push_rest(name);
@@ -91,7 +97,55 @@
 	}
 }
 
-static int cpio_mkdir(const char *name, unsigned int mode,
+static int cpio_mkslink(const char *name, const char *target,
+			 unsigned int mode, uid_t uid, gid_t gid)
+{
+	char s[256];
+	time_t mtime = time(NULL);
+
+	sprintf(s,"%s%08X%08X%08lX%08lX%08X%08lX"
+	       "%08X%08X%08X%08X%08X%08X%08X",
+		"070701",		/* magic */
+		ino++,			/* ino */
+		S_IFLNK | mode,		/* mode */
+		(long) uid,		/* uid */
+		(long) gid,		/* gid */
+		1,			/* nlink */
+		(long) mtime,		/* mtime */
+		(unsigned)strlen(target)+1, /* filesize */
+		3,			/* major */
+		1,			/* minor */
+		0,			/* rmajor */
+		0,			/* rminor */
+		(unsigned)strlen(name) + 1,/* namesize */
+		0);			/* chksum */
+	push_hdr(s);
+	push_string(name);
+	push_pad();
+	push_string(target);
+	push_pad();
+	return 0;
+}
+
+static int cpio_mkslink_line(const char *line)
+{
+	char name[PATH_MAX + 1];
+	char target[PATH_MAX + 1];
+	unsigned int mode;
+	int uid;
+	int gid;
+	int rc = -1;
+
+	if (5 != sscanf(line, "%" str(PATH_MAX) "s %" str(PATH_MAX) "s %o %d %d", name, target, &mode, &uid, &gid)) {
+		fprintf(stderr, "Unrecognized dir format '%s'", line);
+		goto fail;
+	}
+	rc = cpio_mkslink(name, target, mode, uid, gid);
+ fail:
+	return rc;
+}
+
+static int cpio_mkgeneric(const char *name, unsigned int mode,
 		       uid_t uid, gid_t gid)
 {
 	char s[256];
@@ -101,7 +155,7 @@
 	       "%08X%08X%08X%08X%08X%08X%08X",
 		"070701",		/* magic */
 		ino++,			/* ino */
-		S_IFDIR | mode,		/* mode */
+		mode,			/* mode */
 		(long) uid,		/* uid */
 		(long) gid,		/* gid */
 		2,			/* nlink */
@@ -118,7 +172,33 @@
 	return 0;
 }
 
-static int cpio_mkdir_line(const char *line)
+enum generic_types {
+	GT_DIR,
+	GT_PIPE,
+	GT_SOCK
+};
+
+struct generic_type {
+	const char *type;
+	mode_t mode;
+};
+
+static struct generic_type generic_type_table[] = {
+	[GT_DIR] = {
+		.type = "dir",
+		.mode = S_IFDIR
+	},
+	[GT_PIPE] = {
+		.type = "pipe",
+		.mode = S_IFIFO
+	},
+	[GT_SOCK] = {
+		.type = "sock",
+		.mode = S_IFSOCK
+	}
+};
+
+static int cpio_mkgeneric_line(const char *line, enum generic_types gt)
 {
 	char name[PATH_MAX + 1];
 	unsigned int mode;
@@ -127,14 +207,31 @@
 	int rc = -1;
 
 	if (4 != sscanf(line, "%" str(PATH_MAX) "s %o %d %d", name, &mode, &uid, &gid)) {
-		fprintf(stderr, "Unrecognized dir format '%s'", line);
+		fprintf(stderr, "Unrecognized %s format '%s'",
+			line, generic_type_table[gt].type);
 		goto fail;
 	}
-	rc = cpio_mkdir(name, mode, uid, gid);
+	mode |= generic_type_table[gt].mode;
+	rc = cpio_mkgeneric(name, mode, uid, gid);
  fail:
 	return rc;
 }
 
+static int cpio_mkdir_line(const char *line)
+{
+	return cpio_mkgeneric_line(line, GT_DIR);
+}
+
+static int cpio_mkpipe_line(const char *line)
+{
+	return cpio_mkgeneric_line(line, GT_PIPE);
+}
+
+static int cpio_mksock_line(const char *line)
+{
+	return cpio_mkgeneric_line(line, GT_SOCK);
+}
+
 static int cpio_mknod(const char *name, unsigned int mode,
 		       uid_t uid, gid_t gid, char dev_type,
 		       unsigned int maj, unsigned int min)
@@ -286,12 +383,16 @@
 		"describe the files to be included in the initramfs archive:\n"
 		"\n"
 		"# a comment\n"
-		"file <name> <location> <mode> <uid> <gid> \n"
+		"file <name> <location> <mode> <uid> <gid>\n"
 		"dir <name> <mode> <uid> <gid>\n"
 		"nod <name> <mode> <uid> <gid> <dev_type> <maj> <min>\n"
+		"slink <name> <target> <mode> <uid> <gid>\n"
+		"pipe <name> <mode> <uid> <gid>\n"
+		"sock <name> <mode> <uid> <gid>\n"
 		"\n"
-		"<name>      name of the file/dir/nod in the archive\n"
+		"<name>      name of the file/dir/nod/etc in the archive\n"
 		"<location>  location of the file in the current filesystem\n"
+		"<target>    link target\n"
 		"<mode>      mode/permissions of the file\n"
 		"<uid>       user id (0=root)\n"
 		"<gid>       group id (0=root)\n"
@@ -309,7 +410,7 @@
 		prog);
 }
 
-struct file_type file_type_table[] = {
+struct file_handler file_handler_table[] = {
 	{
 		.type    = "file",
 		.handler = cpio_mkfile_line,
@@ -320,6 +421,15 @@
 		.type    = "dir",
 		.handler = cpio_mkdir_line,
 	}, {
+		.type    = "slink",
+		.handler = cpio_mkslink_line,
+	}, {
+		.type    = "pipe",
+		.handler = cpio_mkpipe_line,
+	}, {
+		.type    = "sock",
+		.handler = cpio_mksock_line,
+	}, {
 		.type    = NULL,
 		.handler = NULL,
 	}
@@ -382,10 +492,10 @@
 			ec = -1;
 		}
 
-		for (type_idx = 0; file_type_table[type_idx].type; type_idx++) {
+		for (type_idx = 0; file_handler_table[type_idx].type; type_idx++) {
 			int rc;
-			if (! strcmp(line, file_type_table[type_idx].type)) {
-				if ((rc = file_type_table[type_idx].handler(args))) {
+			if (! strcmp(line, file_handler_table[type_idx].type)) {
+				if ((rc = file_handler_table[type_idx].handler(args))) {
 					ec = rc;
 					fprintf(stderr, " line %d\n", line_nr);
 				}
@@ -393,7 +503,7 @@
 			}
 		}
 
-		if (NULL == file_type_table[type_idx].type) {
+		if (NULL == file_handler_table[type_idx].type) {
 			fprintf(stderr, "unknown file type line %d: '%s'\n",
 				line_nr, line);
 		}
